PageSourceSearch

https://cdn.vialibri.net/static/assets/AdminSearchDetails-Dvd9rd9I.js

js vialibri.net collected 2026-09-24 09:37:21 UTC 238,928 bytes, 2 lines download raw bytes

1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e264df3f-5953-4c3e-8703-a5a445e99e6d",t._sentryDebugIdIdentifier="sentry-dbid-e264df3f-5953-4c3e-8703-a5a445e99e6d")}catch(t){}}();import"./_sentry-release-injection-file-SYOkQ1Km.js";import{a as t,t as e}from"./rolldown-runtime-BBzOAo5_.js";import{t as i}from"./react-DuV36FPs.js";import{t as n}from"./prop-types-Ccm1EFGL.js";import{K as s,U as r}from"./index-CRc22cjs.js";var a=e((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={sum:function(t){return t.reduce((function(t,e){return t+e}))}}})),o=e(((t,e)=>{e.exports=function(t){return Object.prototype.toString.call(t).slice(8,-1)}})),l=e(((t,e)=>{e.exports=function(t){return!!t&&"object"==typeof t&&t.constructor===Object}})),h=e(((t,e)=>{e.exports=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}})),c=e(((t,e)=>{var i,n,s=h();function r(t,e,i,n){return t.call(n,e[i],i,e)}e.exports=function(t,e,a){var o,l=0;for(o in null==i&&function(){for(var t in n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=!0,{toString:null})i=!1}(),t)if(!1===r(e,t,o,a))break;if(i)for(var h=t.constructor,c=!!h&&t===h.prototype;(o=n[l++])&&("constructor"===o&&(c||!s(t,o))||t[o]===Object.prototype[o]||!1!==r(e,t,o,a)););}})),u=e(((t,e)=>{var i=h(),n=c();e.exports=function(t,e,s){n(t,(function(n,r){if(i(t,r))return e.call(s,t[r],r,t)}))}})),d=e(((t,e)=>{var i=u();function n(t,e){this[e]=t}e.exports=function(t,e){for(var s,r=0,a=arguments.length;++r<a;)null!=(s=arguments[r])&&i(s,n,t);return t}})),f=e(((t,e)=>{var i=o(),n=l(),s=d();e.exports=function(t){switch(i(t)){case"Object":return n(a=t)?s({},a):a;case"Array":return t.slice();case"RegExp":return r="",r+=(e=t).multiline?"m":"",r+=e.global?"g":"",r+=e.ignoreCase?"i":"",new RegExp(e.source,r);case"Date":return new Date(+t);default:return t}var e,r,a}})),g=e(((t,e)=>{var i=f(),n=u(),s=o(),r=l();function a(t,e){switch(s(t)){case"Object":return function(t,e){if(r(t)){var i={};return n(t,(function(t,i){this[i]=a(t,e)}),i),i}return e?e(t):t}(t,e);case"Array":return function(t,e){var i=[],n=-1,s=t.length;for(;++n<s;)i[n]=a(t[n],e);return i}(t,e);default:return i(t)}}
1e.exports=a})),p=e(((t,e)=>{e.exports=function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}})),b=e(((t,e)=>{var i=o();e.exports=function(t,e){return i(t)===e}})),m=e(((t,e)=>{var i=b();e.exports=function(t){return i(t,"Object")}})),x=e(((t,e)=>{var i=b(),n=Array.isArray||function(t){return i(t,"Array")};e.exports=n})),v=e(((t,e)=>{e.exports=function(t){return t}})),y=e(((t,e)=>{e.exports=function(t){return function(e){return e[t]}}})),_=e(((t,e)=>{var i=u(),n=x();function s(t,e){for(var i=-1,n=t.length;++i<n;)if(r(t[i],e))return!0;return!1}function r(t,e){return t&&"object"==typeof t&&e&&"object"==typeof e?n(t)&&n(e)?function(t,e){for(var i=-1,n=e.length;++i<n;)if(!s(t,e[i]))return!1;return!0}(t,e):function(t,e){var n=!0;return i(e,(function(e,i){if(!r(t[i],e))return n=!1})),n}(t,e):t===e}e.exports=r})),M=e(((t,e)=>{var i=v(),n=y(),s=_();e.exports=function(t,e){if(null==t)return i;switch(typeof t){case"function":return void 0!==e?function(i,n,s){return t.call(e,i,n,s)}:t;case"object":return function(e){return s(e,t)};case"string":case"number":return n(t)}}})),w=e(((t,e)=>{var i=u(),n=M();e.exports=function(t,e,s){e=n(e,s);var r=!0;return i(t,(function(i,n){if(!e(i,n,t))return r=!1,!1})),r}})),k=e(((t,e)=>{var i=h(),n=w(),s=m(),r=p();function a(t,e){return i(this,e)}e.exports=function(t,e,o){return o=o||r,s(t)&&s(e)?n(t,function(t){return function(e,n){return i(this,n)&&t(e,this[n])}}(o),e)&&n(e,a,t):o(t,e)}})),S=e(((t,e)=>{var i=M();e.exports=function(t,e,n){e=i(e,n);var s=!0;if(null==t)return s;for(var r=-1,a=t.length;++r<a;)if(!e(t[r],r,t)){s=!1;break}return s}})),P=e(((t,e)=>{var i=p(),n=x(),s=S();e.exports=function(t,e,r){return r=r||i,n(t)&&n(e)?t.length===e.length&&s(t,function(t){return function(e,i){return i in this&&t(e,this[i])}}(r),e):r(t,e)}})),O=e(((t,e)=>{var i=p(),n=m(),s=x(),r=k(),a=P();e.exports=function t(e,o,l){l=l||i;var h=n(e)&&n(o),c=!h&&s(e)&&s(o);return h||c?(h?r:a)(e,o,(function(e,i){return t(e,i,l)})):l(e,o)}})),D=e(((t,e)=>{!function(i,n){"object"==typeof t&&void 0!==e?e.exports=n():"function"==typeof define&&define.amd?define(n):(i="undefined"!=typeof globalThis?globalThis:i||self).chroma=n()}(t,(function(){for(var t=function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=1),t<e?e:t>i?i:t},e=t,i={},n=0,s=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n<s.length;n+=1){var r=s[n];i["[object "+r+"]"]=r.toLowerCase()}var a=function(t){return i[Object.prototype.toString.call(t)]||"object"},o=a,l=a,h=Math.PI,c={clip_rgb:function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var i=0;i<=3;i++)i<3?((t[i]<0||t[i]>255)&&(t._clipped=!0),t[i]=e(t[i],0,255)):3===i&&(t[i]=e(t[i],0,1));return t},limit:t,type:a,unpack:function(t,e){return void 0===e&&(e=null),t.length>=3?Array.prototype.slice.call(t):"object"==o(t[0])&&e?e.split("").filter((function(e){return void 0!==t[0][e]})).map((function(e){return t[0][e]})):t[0]},last:function(t){if(t.length<2)return null;var e=t.length-1;return"string"==l(t[e])?t[e].toLowerCase():null},PI:h,TWOPI:2*h,PITHIRD:h/3,DEG2RAD:h/180,RAD2DEG:180/h},u={format:{},autodetect:[]},d=c.last,f=c.clip_rgb,g=c.type,p=u,b=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=this;if("object"===g(t[0])&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];var n=d(t),s=!1;if(!n){s=!0,p.sorted||(p.autodetect=p.autodetect.sort((function(t,e){return e.p-t.p})),p.sorted=!0);for(var r=0,a=p.autodetect;r<a.length;r+=1){var o=a[r];if(n=o.test.apply(o,t))break}}if(!p.format[n])throw new Error("unknown format: "+t);i._rgb=f(p.format[n].apply(null,s?t:t.slice(0,-1))),3===i._rgb.length&&i._rgb.push(1)};b.prototype.toString=function(){return"function"==g(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var m=b,x=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(x.Color,[null].concat(t)))};x.Color=m,x.version="2.4.2";var v=x,y=c.unpack,_=Math.max,M=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=y(t,"rgb"),n=i[0],s=i[1],r=i[2],a=1-_(n/=255,_(s/=255,r/=255)),o=a<1?1/(1-a):0;return[(1-n-a)*o,(1-s-a)*o,(1-r-a)*o,a]},w=c.unpack,k=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=(t=w(t,"cmyk"))[0],n=t[1],s=t[2],r=t[3],a=t.length>4?t[4]:1;return 1===r?[0,0,0,a]:[i>=1?0:255*(1-i)*(1-r),n>=1?0:255*(1-n)*(1-r),s>=1?0:255*(1-s)*(1-r),a]},S=v,P=m,O=u,D=c.unpack,A=c.type,C=M;P.prototype.cmyk=function(){return C(this._rgb)},S.cmyk=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(P,[null].concat(t,["cmyk"])))},O.format.cmyk=k,O.autodetect.push({p:2,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=D(t,"cmyk"),"array"===A(t)&&4===t.length)return"cmyk"}});var E=c.unpack,T=c.last,L=function(t){return Math.round(100*t)/100},R=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=E(t,"hsla"),n=T(t)||"lsa";return i[0]=L(i[0]||0),i[1]=L(100*i[1])+"%",i[2]=L(100*i[2])+"%","hsla"===n||i.length>3&&i[3]<1?(i[3]=i.length>3?i[3]:1,n="hsla"):i.length=3,n+"("+i.join(",")+")"},I=c.unpack,F=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=(t=I(t,"rgba"))[0],n=t[1],s=t[2];i/=255,n/=255,s/=255;var r,a,o=Math.min(i,n,s),l=Math.max(i,n,s),h=(l+o)/2;return l===o?(r=0,a=NaN):r=h<.5?(l-o)/(l+o):(l-o)/(2-l-o),i==l?a=(n-s)/(l-o):n==l?a=2+(s-i)/(l-o):s==l&&(a=4+(i-n)/(l-o)),(a*=60)<0&&(a+=360),t.length>3&&void 0!==t[3]?[a,r,h,t[3]]:[a,r,h]},z=c.unpack,N=c.last,j=R,V=F,B=Math.round,W=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=z(t,"rgba"),n=N(t)||"rgb";return"hsl"==n.substr(0,3)?j(V(i),n):(i[0]=B(i[0]),i[1]=B(i[1]),i[2]=B(i[2]),("rgba"===n||i.length>3&&i[3]<1)&&(i[3]=i.length>3?i[3]:1,n="rgba"),n+"("+i.slice(0,"rgb"===n?3:4).join(",")+")")},H=c.unpack,$=Math.round,Y=function(){for(var t,e=[],i=arguments.length;i--;)e[i]=arguments[i];var n,s,r,a=(e=H(e,"hsl"))[0],o=e[1],l=e[2];if(0===o)n=s=r=255*l;else{var h=[0,0,0],c=[0,0,0],u=l<.5?l*(1+o):l+o-l*o,d=2*l-u,f=a/360;h[0]=f+1/3,h[1]=f,h[2]=f-1/3;for(var g=0;g<3;g++)h[g]<0&&(h[g]+=1),h[g]>
11&&(h[g]-=1),6*h[g]<1?c[g]=d+6*(u-d)*h[g]:2*h[g]<1?c[g]=u:3*h[g]<2?c[g]=d+(u-d)*(2/3-h[g])*6:c[g]=d;n=(t=[$(255*c[0]),$(255*c[1]),$(255*c[2])])[0],s=t[1],r=t[2]}return e.length>3?[n,s,r,e[3]]:[n,s,r,1]},U=Y,X=u,q=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,G=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,K=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Z=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,J=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Q=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,tt=Math.round,et=function(t){var e;if(t=t.toLowerCase().trim(),X.format.named)try{return X.format.named(t)}catch(g){}if(e=t.match(q)){for(var i=e.slice(1,4),n=0;n<3;n++)i[n]=+i[n];return i[3]=1,i}if(e=t.match(G)){for(var s=e.slice(1,5),r=0;r<4;r++)s[r]=+s[r];return s}if(e=t.match(K)){for(var a=e.slice(1,4),o=0;o<3;o++)a[o]=tt(2.55*a[o]);return a[3]=1,a}if(e=t.match(Z)){for(var l=e.slice(1,5),h=0;h<3;h++)l[h]=tt(2.55*l[h]);return l[3]=+l[3],l}if(e=t.match(J)){var c=e.slice(1,4);c[1]*=.01,c[2]*=.01;var u=U(c);return u[3]=1,u}if(e=t.match(Q)){var d=e.slice(1,4);d[1]*=.01,d[2]*=.01;var f=U(d);return f[3]=+e[4],f}};et.test=function(t){return q.test(t)||G.test(t)||K.test(t)||Z.test(t)||J.test(t)||Q.test(t)};var it=v,nt=m,st=u,rt=c.type,at=W,ot=et;nt.prototype.css=function(t){return at(this._rgb,t)},it.css=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(nt,[null].concat(t,["css"])))},st.format.css=ot,st.autodetect.push({p:5,test:function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];if(!e.length&&"string"===rt(t)&&ot.test(t))return"css"}});var lt=m,ht=v,ct=c.unpack;u.format.gl=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=ct(t,"rgba");return i[0]*=255,i[1]*=255,i[2]*=255,i},ht.gl=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(lt,[null].concat(t,["gl"])))},lt.prototype.gl=function(){var t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]};var ut=c.unpack,dt=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,n=ut(t,"rgb"),s=n[0],r=n[1],a=n[2],o=Math.min(s,r,a),l=Math.max(s,r,a),h=l-o;return 0===h?i=NaN:(s===l&&(i=(r-a)/h),r===l&&(i=2+(a-s)/h),a===l&&(i=4+(s-r)/h),(i*=60)<0&&(i+=360)),[i,100*h/255,o/(255-h)*100]},ft=c.unpack,gt=Math.floor,pt=function(){for(var t,e,i,n,s,r,a=[],o=arguments.length;o--;)a[o]=arguments[o];var l,h,c,u=(a=ft(a,"hcg"))[0],d=a[1],f=a[2];f*=255;var g=255*d;if(0===d)l=h=c=f;else{360===u&&(u=0),u>360&&(u-=360),u<0&&(u+=360);var p=gt(u/=60),b=u-p,m=f*(1-d),x=m+g*(1-b),v=m+g*b,y=m+g;switch(p){case 0:l=(t=[y,v,m])[0],h=t[1],c=t[2];break;case 1:l=(e=[x,y,m])[0],h=e[1],c=e[2];break;case 2:l=(i=[m,y,v])[0],h=i[1],c=i[2];break;case 3:l=(n=[m,x,y])[0],h=n[1],c=n[2];break;case 4:l=(s=[v,m,y])[0],h=s[1],c=s[2];break;case 5:l=(r=[y,m,x])[0],h=r[1],c=r[2]}}return[l,h,c,a.length>3?a[3]:1]},bt=c.unpack,mt=c.type,xt=v,vt=m,yt=u,_t=dt;vt.prototype.hcg=function(){return _t(this._rgb)},xt.hcg=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(vt,[null].concat(t,["hcg"])))},yt.format.hcg=pt,yt.autodetect.push({p:1,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=bt(t,"hcg"),"array"===mt(t)&&3===t.length)return"hcg"}});var Mt=c.unpack,wt=c.last,kt=Math.round,St=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=Mt(t,"rgba"),n=i[0],s=i[1],r=i[2],a=i[3],o=wt(t)||"auto";void 0===a&&(a=1),"auto"===o&&(o=a<1?"rgba":"rgb");var l="000000"+((n=kt(n))<<16|(s=kt(s))<<8|(r=kt(r))).toString(16);l=l.substr(l.length-6);var h="0"+kt(255*a).toString(16);switch(h=h.substr(h.length-2),o.toLowerCase()){case"rgba":return"#"+l+h;case"argb":return"#"+h+l;default:return"#"+l}},Pt=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ot=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Dt=function(t){if(t.match(Pt)){4!==t.length&&7!==t.length||(t=t.
1substr(1)),3===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var e=parseInt(t,16);return[e>>16,e>>8&255,255&e,1]}if(t.match(Ot)){5!==t.length&&9!==t.length||(t=t.substr(1)),4===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);var i=parseInt(t,16);return[i>>24&255,i>>16&255,i>>8&255,Math.round((255&i)/255*100)/100]}throw new Error("unknown hex color: "+t)},At=v,Ct=m,Et=c.type,Tt=u,Lt=St;Ct.prototype.hex=function(t){return Lt(this._rgb,t)},At.hex=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(Ct,[null].concat(t,["hex"])))},Tt.format.hex=Dt,Tt.autodetect.push({p:4,test:function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];if(!e.length&&"string"===Et(t)&&[3,4,5,6,7,8,9].indexOf(t.length)>=0)return"hex"}});var Rt=c.unpack,It=c.TWOPI,Ft=Math.min,zt=Math.sqrt,Nt=Math.acos,jt=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,n=Rt(t,"rgb"),s=n[0],r=n[1],a=n[2],o=Ft(s/=255,r/=255,a/=255),l=(s+r+a)/3,h=l>0?1-o/l:0;return 0===h?i=NaN:(i=(s-r+(s-a))/2,i/=zt((s-r)*(s-r)+(s-a)*(r-a)),i=Nt(i),a>r&&(i=It-i),i/=It),[360*i,h,l]},Vt=c.unpack,Bt=c.limit,Wt=c.TWOPI,Ht=c.PITHIRD,$t=Math.cos,Yt=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,n,s,r=(t=Vt(t,"hsi"))[0],a=t[1],o=t[2];return isNaN(r)&&(r=0),isNaN(a)&&(a=0),r>360&&(r-=360),r<0&&(r+=360),(r/=360)<1/3?n=1-((s=(1-a)/3)+(i=(1+a*$t(Wt*r)/$t(Ht-Wt*r))/3)):r<2/3?s=1-((i=(1-a)/3)+(n=(1+a*$t(Wt*(r-=1/3))/$t(Ht-Wt*r))/3)):i=1-((n=(1-a)/3)+(s=(1+a*$t(Wt*(r-=2/3))/$t(Ht-Wt*r))/3)),[255*(i=Bt(o*i*3)),255*(n=Bt(o*n*3)),255*(s=Bt(o*s*3)),t.length>3?t[3]:1]},Ut=c.unpack,Xt=c.type,qt=v,Gt=m,Kt=u,Zt=jt;Gt.prototype.hsi=function(){return Zt(this._rgb)},qt.hsi=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(Gt,[null].concat(t,["hsi"])))},Kt.format.hsi=Yt,Kt.autodetect.push({p:2,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=Ut(t,"hsi"),"array"===Xt(t)&&3===t.length)return"hsi"}});var Jt=c.unpack,Qt=c.type,te=v,ee=m,ie=u,ne=F;ee.prototype.hsl=function(){return ne(this._rgb)},te.hsl=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(ee,[null].concat(t,["hsl"])))},ie.format.hsl=Y,ie.autodetect.push({p:2,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=Jt(t,"hsl"),"array"===Qt(t)&&3===t.length)return"hsl"}});var se=c.unpack,re=Math.min,ae=Math.max,oe=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,n,s=(t=se(t,"rgb"))[0],r=t[1],a=t[2],o=re(s,r,a),l=ae(s,r,a),h=l-o;return 0===l?(i=NaN,n=0):(n=h/l,s===l&&(i=(r-a)/h),r===l&&(i=2+(a-s)/h),a===l&&(i=4+(s-r)/h),(i*=60)<0&&(i+=360)),[i,n,l/255]},le=c.unpack,he=Math.floor,ce=function(){for(var t,e,i,n,s,r,a=[],o=arguments.length;o--;)a[o]=arguments[o];var l,h,c,u=(a=le(a,"hsv"))[0],d=a[1],f=a[2];if(f*=255,0===d)l=h=c=f;else{360===u&&(u=0),u>360&&(u-=360),u<0&&(u+=360);var g=he(u/=60),p=u-g,b=f*(1-d),m=f*(1-d*p),x=f*(1-d*(1-p));switch(g){case 0:l=(t=[f,x,b])[0],h=t[1],c=t[2];break;case 1:l=(e=[m,f,b])[0],h=e[1],c=e[2];break;case 2:l=(i=[b,f,x])[0],h=i[1],c=i[2];break;case 3:l=(n=[b,m,f])[0],h=n[1],c=n[2];break;case 4:l=(s=[x,b,f])[0],h=s[1],c=s[2];break;case 5:l=(r=[f,b,m])[0],h=r[1],c=r[2]}}return[l,h,c,a.length>3?a[3]:1]},ue=c.unpack,de=c.type,fe=v,ge=m,pe=u,be=oe;ge.prototype.hsv=function(){return be(this._rgb)},fe.hsv=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(ge,[null].concat(t,["hsv"])))},pe.format.hsv=ce,pe.autodetect.push({p:2,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=ue(t,"hsv"),"array"===de(t)&&3===t.length)return"hsv"}});var me={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},xe=me,ve=c.unpack,ye=Math.pow,_e=function(t){return(t/=255)<=.04045?t/12.92:ye((t+.055)/1.055,2.4)},Me=function(t){return t>xe.t3?ye(t,1/3):t/xe.t2+xe.t0},we=function(t,e,i){return t=_e(t),e=_e(e),i=_e(i),[Me((.4124564*t+.3575761*e+.1804375*i)/xe.Xn),Me((.2126729*t+.7151522*e+.072175*i)/xe.Yn),Me((.0193339*t+.119192*e+.9503041*i)/xe.Zn)]},ke=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=ve(t,"rgb"),n=i[0],s=i[1],r=i[2],a=we(n,s,r),o=a[0],l=a[1],h=116*l-16;return[h<0?0:h,500*(o-l),200*(l-a[2])]},Se=me,Pe=c.unpack,Oe=Math.pow,De=function(t){return 255*(t<=.00304?12.92*t:1.055*Oe(t,1/2.4)-.055)},Ae=function(t){return t>Se.t1?t*t*t:Se.t2*(t-Se.t0)},Ce=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,n,s=(t=Pe(t,"lab"))[0],r=t[1],a=t[2],o=(s+16)/116;return i=isNaN(r)?o:o+r/500,n=isNaN(a)?o:o-a/200,o=Se.Yn*Ae(o),i=Se.Xn*Ae(i),n=Se.Zn*Ae(n),[De(3.2404542*i-1.5371385*o-.4985314*n),De(-.969266*i+1.8760108*o+.041556*n),De(.0556434*i-.2040259*o+1.0572252*n),t.length>3?t[3]:1]}
1,Ee=c.unpack,Te=c.type,Le=v,Re=m,Ie=u,Fe=ke;Re.prototype.lab=function(){return Fe(this._rgb)},Le.lab=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(Re,[null].concat(t,["lab"])))},Ie.format.lab=Ce,Ie.autodetect.push({p:2,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=Ee(t,"lab"),"array"===Te(t)&&3===t.length)return"lab"}});var ze=c.unpack,Ne=c.RAD2DEG,je=Math.sqrt,Ve=Math.atan2,Be=Math.round,We=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=ze(t,"lab"),n=i[0],s=i[1],r=i[2],a=je(s*s+r*r),o=(Ve(r,s)*Ne+360)%360;return 0===Be(1e4*a)&&(o=NaN),[n,a,o]},He=c.unpack,$e=ke,Ye=We,Ue=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=He(t,"rgb"),n=i[0],s=i[1],r=i[2],a=$e(n,s,r),o=a[0],l=a[1],h=a[2];return Ye(o,l,h)},Xe=c.unpack,qe=c.DEG2RAD,Ge=Math.sin,Ke=Math.cos,Ze=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=Xe(t,"lch"),n=i[0],s=i[1],r=i[2];return isNaN(r)&&(r=0),[n,Ke(r*=qe)*s,Ge(r)*s]},Je=c.unpack,Qe=Ze,ti=Ce,ei=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=(t=Je(t,"lch"))[0],n=t[1],s=t[2],r=Qe(i,n,s),a=r[0],o=r[1],l=r[2],h=ti(a,o,l);return[h[0],h[1],h[2],t.length>3?t[3]:1]},ii=c.unpack,ni=ei,si=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=ii(t,"hcl").reverse();return ni.apply(void 0,i)},ri=c.unpack,ai=c.type,oi=v,li=m,hi=u,ci=Ue;li.prototype.lch=function(){return ci(this._rgb)},li.prototype.hcl=function(){return ci(this._rgb).reverse()},oi.lch=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(li,[null].concat(t,["lch"])))},oi.hcl=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(li,[null].concat(t,["hcl"])))},hi.format.lch=ei,hi.format.hcl=si,["lch","hcl"].forEach((function(t){return hi.autodetect.push({p:2,test:function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];if(e=ri(e,t),"array"===ai(e)&&3===e.length)return t}})}));var ui={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
1almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},di=u,fi=c.type,gi=ui,pi=Dt,bi=St;m.prototype.name=function(){for(var t=bi(this._rgb,"rgb"),e=0,i=Object.keys(gi);e<i.length;e+=1){var n=i[e];if(gi[n]===t)return n.toLowerCase()}return t},di.format.named=function(t){if(t=t.toLowerCase(),gi[t])return pi(gi[t]);throw new Error("unknown color name: "+t)},di.autodetect.push({p:5,test:function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];if(!e.length&&"string"===fi(t)&&gi[t.toLowerCase()])return"named"}});var mi=c.unpack,xi=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=mi(t,"rgb");return(i[0]<<16)+(i[1]<<8)+i[2]},vi=c.type,yi=function(t){if("number"==vi(t)&&t>=0&&t<=16777215)return[t>>16,t>>8&255,255&t,1];throw new Error("unknown num color: "+t)},_i=v,Mi=m,wi=u,ki=c.type,Si=xi;Mi.prototype.num=function(){return Si(this._rgb)},_i.num=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(Mi,[null].concat(t,["num"])))},wi.format.num=yi,wi.autodetect.push({p:5,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(1===t.length&&"number"===ki(t[0])&&t[0]>=0&&t[0]<=16777215)return"num"}});var Pi=v,Oi=m,Di=u,Ai=c.unpack,Ci=c.type,Ei=Math.round;Oi.prototype.rgb=function(t){return void 0===t&&(t=!0),!1===t?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Ei)},Oi.prototype.rgba=function(t){return void 0===t&&(t=!0),this._rgb.slice(0,4).map((function(e,i){return i<3?!1===t?e:Ei(e):e}))},Pi.rgb=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(Oi,[null].concat(t,["rgb"])))},Di.format.rgb=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=Ai(t,"rgba");return void 0===i[3]&&(i[3]=1),i},Di.autodetect.push({p:3,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=Ai(t,"rgba"),"array"===Ci(t)&&(3===t.length||4===t.length&&"number"==Ci(t[3])&&t[3]>=0&&t[3]<=1))return"rgb"}});var Ti=Math.log,Li=function(t){var e,i,n,s=t/100;return s<66?(e=255,i=s<6?0:-155.25485562709179-.44596950469579133*(i=s-2)+104.49216199393888*Ti(i),n=s<20?0:.8274096064007395*(n=s-10)-254.76935184120902+115.67994401066147*Ti(n)):(e=351.97690566805693+.114206453784165*(e=s-55)-40.25366309332127*Ti(e),i=325.4494125711974+.07943456536662342*(i=s-50)-28.0852963507957*Ti(i),n=255),[e,i,n,1]},Ri=Li,Ii=c.unpack,Fi=Math.round,zi=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i,n=Ii(t,"rgb"),s=n[0],r=n[2],a=1e3,o=4e4;o-a>.4;){var l=Ri(i=.5*(o+a));l[2]/l[0]>=r/s?o=i:a=i}return Fi(i)},Ni=v,ji=m,Vi=u,Bi=zi;ji.prototype.temp=ji.prototype.kelvin=ji.prototype.temperature=function(){return Bi(this._rgb)},Ni.temp=Ni.kelvin=Ni.temperature=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(ji,[null].concat(t,["temp"])))},Vi.format.temp=Vi.format.kelvin=Vi.format.temperature=Li;var Wi=c.unpack,Hi=Math.cbrt,$i=Math.pow,Yi=Math.sign,Ui=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=Wi(t,"rgb"),n=i[0],s=i[1],r=i[2],a=[Xi(n/255),Xi(s/255),Xi(r/255)],o=a[0],l=a[1],h=a[2],c=Hi(.4122214708*o+.5363325363*l+.0514459929*h),u=Hi(.2119034982*o+.6806995451*l+.1073969566*h),d=Hi(.0883024619*o+.2817188376*l+.6299787005*h);return[.2104542553*c+.793617785*u-.0040720468*d,1.9779984951*c-2.428592205*u+.4505937099*d,.0259040371*c+.7827717662*u-.808675766*d]};function Xi(t){var e=Math.abs(t);return e<.04045?t/12.92:(Yi(t)||1)*$i((e+.055)/1.055,2.4)}var qi=c.unpack,Gi=Math.pow,Ki=Math.sign,Zi=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=(t=qi(t,"lab"))[0],n=t[1],s=t[2],r=Gi(i+.3963377774*n+.2158037573*s,3),a=Gi(i-.1055613458*n-.0638541728*s,3),o=Gi(i-.0894841775*n-1.291485548*s,3);return[255*Ji(4.0767416621*r-3.3077115913*a+.2309699292*o),255*Ji(-1.2684380046*r+2.6097574011*a-.3413193965*o),255*Ji(-.0041960863*r-.7034186147*a+1.707614701*o),t.length>3?t[3]:1]};function Ji(t){var e=Math.abs(t);return e>.0031308?(Ki(t)||1)*(1.055*Gi(e,1/2.4)-.055):12.92*t}var Qi=c.unpack,tn=c.type,en=v,nn=m,sn=u,rn=Ui;nn.prototype.oklab=function(){return rn(this._rgb)},en.oklab=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(nn,[null].concat(t,["oklab"])))},sn.format.oklab=Zi,sn.autodetect.push({p:3,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=Qi(t,"oklab"),"array"===tn(t)&&3===t.length)return"oklab"}});var an=c.unpack,on=Ui,ln=We,hn=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=an(t,"rgb"),n=i[0],s=i[1],r=i[2],a=on(n,s,r),o=a[0],l=a[1],h=a[2];return ln(o,l,h)},cn=c.unpack,un=Ze,dn=Zi,fn=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=(t=cn(t,"lch"))[0],n=t[1],s=t[2],r=un(i,n,s),a=r[0],o=r[1],l=r[2],h=dn(a,o,l);return[h[0],h[1],h[2],t.length>3?t[3]:1]},gn=c.unpack,pn=c.type,bn=v,mn=m,xn=u,vn=hn;mn.prototype.oklch=function(){return vn(this._rgb)},bn.oklch=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(mn,[null].concat(t,["oklch"])))},xn.format.oklch=fn,xn.autodetect.push({p:3,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=gn(t,"oklch"),"array"===pn(t)&&3===t.length)return"oklch"}});var yn=m,_n=c.type;yn.prototype.alpha=function(t,e){return void 0===e&&(e=!1),void 0!==t&&"number"===_n(t)?e?(this._rgb[3]=t,this):new yn([this._rgb[0],this._rgb[1],this._rgb[2],t],"rgb"):this._rgb[3]},m.prototype.clipped=function(){return this._rgb._clipped||!1};var Mn=m,wn=me;Mn.prototype.darken=function(t){void 0===t&&(t=1);var e=this.lab();return e[0]-=wn.Kn*t,new Mn(e,"lab").alpha(this.alpha(),!0)},Mn.prototype.brighten=function(t){return void 0===t&&(t=1),this.darken(-t)},Mn.prototype.darker=Mn.prototype.darken,Mn.prototype.brighter=Mn.prototype.brighten,m.prototype.get=function(t){var e=t.split("."),i=e[0],n=e[1],s=this[i]();if(n){var r=i.indexOf(n)-("ok"===i.substr(0,2)?2:0);if(r>-1)return s[r];throw new Error("unknown channel "+n+" in mode "+i)}return s};var kn=m,Sn=c.type,Pn=Math.pow;kn.prototype.luminance=function(t){if(void 0!==t&&"number"===Sn(t)){if(0===t)return new kn([0,0,0,this._rgb[3]],"rgb");if(1===t)return new kn([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),i=20,n=function(e,s){var r=e.interpolate(s,.5,"rgb"),a=r.luminance();return Math.abs(t-a)<1e-7||!i--?r:a>t?n(e,r):n(r,s)};return new kn((e>t?n(new kn([0,0,0]),this):n(this,new kn([255,255,255]))).rgb().concat([this._rgb[3]]))}return On.apply(void 0,this._rgb.slice(0,3))};
vendor: 13,885 bytes, line 1
1var On=function(t,e,i){return.2126*(t=Dn(t))+.7152*(e=Dn(e))+.0722*(i=Dn(i))},Dn=function(t){return(t/=255)<=.03928?t/12.92:Pn((t+.055)/1.055,2.4)},An={},Cn=m,En=c.type,Tn=An,Ln=function(t,e,i){void 0===i&&(i=.5);for(var n=[],s=arguments.length-3;s-- >0;)n[s]=arguments[s+3];var r=n[0]||"lrgb";if(Tn[r]||n.length||(r=Object.keys(Tn)[0]),!Tn[r])throw new Error("interpolation mode "+r+" is not defined");return"object"!==En(t)&&(t=new Cn(t)),"object"!==En(e)&&(e=new Cn(e)),Tn[r](t,e,i).alpha(t.alpha()+i*(e.alpha()-t.alpha()))},Rn=m,In=Ln;Rn.prototype.mix=Rn.prototype.interpolate=function(t,e){void 0===e&&(e=.5);for(var i=[],n=arguments.length-2;n-- >0;)i[n]=arguments[n+2];return In.apply(void 0,[this,t,e].concat(i))};var Fn=m;Fn.prototype.premultiply=function(t){void 0===t&&(t=!1);var e=this._rgb,i=e[3];return t?(this._rgb=[e[0]*i,e[1]*i,e[2]*i,i],this):new Fn([e[0]*i,e[1]*i,e[2]*i,i],"rgb")};var zn=m,Nn=me;zn.prototype.saturate=function(t){void 0===t&&(t=1);var e=this.lch();return e[1]+=Nn.Kn*t,e[1]<0&&(e[1]=0),new zn(e,"lch").alpha(this.alpha(),!0)},zn.prototype.desaturate=function(t){return void 0===t&&(t=1),this.saturate(-t)};var jn=m,Vn=c.type;jn.prototype.set=function(t,e,i){void 0===i&&(i=!1);var n=t.split("."),s=n[0],r=n[1],a=this[s]();if(r){var o=s.indexOf(r)-("ok"===s.substr(0,2)?2:0);if(o>-1){if("string"==Vn(e))switch(e.charAt(0)){case"+":case"-":a[o]+=+e;break;case"*":a[o]*=+e.substr(1);break;case"/":a[o]/=+e.substr(1);break;default:a[o]=+e}else{if("number"!==Vn(e))throw new Error("unsupported value for Color.set");a[o]=e}var l=new jn(a,s);return i?(this._rgb=l._rgb,this):l}throw new Error("unknown channel "+r+" in mode "+s)}return a};var Bn=m;An.rgb=function(t,e,i){var n=t._rgb,s=e._rgb;return new Bn(n[0]+i*(s[0]-n[0]),n[1]+i*(s[1]-n[1]),n[2]+i*(s[2]-n[2]),"rgb")};var Wn=m,Hn=Math.sqrt,$n=Math.pow;An.lrgb=function(t,e,i){var n=t._rgb,s=n[0],r=n[1],a=n[2],o=e._rgb,l=o[0],h=o[1],c=o[2];return new Wn(Hn($n(s,2)*(1-i)+$n(l,2)*i),Hn($n(r,2)*(1-i)+$n(h,2)*i),Hn($n(a,2)*(1-i)+$n(c,2)*i),"rgb")};var Yn=m;An.lab=function(t,e,i){var n=t.lab(),s=e.lab();return new Yn(n[0]+i*(s[0]-n[0]),n[1]+i*(s[1]-n[1]),n[2]+i*(s[2]-n[2]),"lab")};var Un=m,Xn=function(t,e,i,n){var s,r,a,o,l,h,c,u,d,f,g,p,b;return"hsl"===n?(a=t.hsl(),o=e.hsl()):"hsv"===n?(a=t.hsv(),o=e.hsv()):"hcg"===n?(a=t.hcg(),o=e.hcg()):"hsi"===n?(a=t.hsi(),o=e.hsi()):"lch"===n||"hcl"===n?(n="hcl",a=t.hcl(),o=e.hcl()):"oklch"===n&&(a=t.oklch().reverse(),o=e.oklch().reverse()),"h"!==n.substr(0,1)&&"oklch"!==n||(l=(s=a)[0],c=s[1],d=s[2],h=(r=o)[0],u=r[1],f=r[2]),isNaN(l)||isNaN(h)?isNaN(l)?isNaN(h)?p=NaN:(p=h,1!=d&&0!=d||"hsv"==n||(g=u)):(p=l,1!=f&&0!=f||"hsv"==n||(g=c)):p=l+i*(h>l&&h-l>180?h-(l+360):h<l&&l-h>180?h+360-l:h-l),void 0===g&&(g=c+i*(u-c)),b=d+i*(f-d),new Un("oklch"===n?[b,g,p]:[p,g,b],n)},qn=Xn,Gn=function(t,e,i){return qn(t,e,i,"lch")};An.lch=Gn,An.hcl=Gn;var Kn=m;An.num=function(t,e,i){var n=t.num();return new Kn(n+i*(e.num()-n),"num")};var Zn=Xn;An.hcg=function(t,e,i){return Zn(t,e,i,"hcg")};var Jn=Xn;An.hsi=function(t,e,i){return Jn(t,e,i,"hsi")};var Qn=Xn;An.hsl=function(t,e,i){return Qn(t,e,i,"hsl")};var ts=Xn;An.hsv=function(t,e,i){return ts(t,e,i,"hsv")};var es=m;An.oklab=function(t,e,i){var n=t.oklab(),s=e.oklab();return new es(n[0]+i*(s[0]-n[0]),n[1]+i*(s[1]-n[1]),n[2]+i*(s[2]-n[2]),"oklab")};var is=Xn;An.oklch=function(t,e,i){return is(t,e,i,"oklch")};var ns=m,ss=c.clip_rgb,rs=Math.pow,as=Math.sqrt,os=Math.PI,ls=Math.cos,hs=Math.sin,cs=Math.atan2,us=function(t,e){for(var i=t.length,n=[0,0,0,0],s=0;s<t.length;s++){var r=t[s],a=e[s]/i,o=r._rgb;n[0]+=rs(o[0],2)*a,n[1]+=rs(o[1],2)*a,n[2]+=rs(o[2],2)*a,n[3]+=o[3]*a}return n[0]=as(n[0]),n[1]=as(n[1]),n[2]=as(n[2]),n[3]>.9999999&&(n[3]=1),new ns(ss(n))},ds=v,fs=c.type,gs=Math.pow,ps=function(t){var e="rgb",i=ds("#ccc"),n=0,s=[0,1],r=[],a=[0,0],o=!1,l=[],h=!1,c=0,u=1,d=!1,f={},g=!0,p=1,b=function(t){if((t=t||["#fff","#000"])&&"string"===fs(t)&&ds.brewer&&ds.brewer[t.toLowerCase()]&&(t=ds.brewer[t.toLowerCase()]),"array"===fs(t)){1===t.length&&(t=[t[0],t[0]]),t=t.slice(0);for(var e=0;e<t.length;e++)t[e]=ds(t[e]);r.length=0;for(var i=0;i<t.length;i++)r.push(i/(t.length-1))}return y(),l=t},m=function(t){return t},x=function(t){return t},v=function(t,n){var s,h;if(null==n&&(n=!1),isNaN(t)||null===t)return i;h=n?t:o&&o.length>2?function(t){if(null!=o){for(var e=o.length-1,i=0;i<e&&t>=o[i];)i++;return i-1}return 0}(t)/(o.length-2):u!==c?(t-c)/(u-c):1,h=x(h),n||(h=m(h)),1!==p&&(h=gs(h,p)),h=a[0]+h*(1-a[0]-a[1]),h=Math.min(1,Math.max(0,h));var d=Math.floor(1e4*h);if(g&&f[d])s=f[d];else{if("array"===fs(l))for(var b=0;b<r.length;b++){var v=r[b];if(h<=v){s=l[b];break}if(h>=v&&b===r.length-1){s=l[b];break}if(h>v&&h<r[b+1]){h=(h-v)/(r[b+1]-v),s=ds.interpolate(l[b],l[b+1],h,e);break}}else"function"===fs(l)&&(s=l(h));g&&(f[d]=s)}return s},y=function(){return f={}};b(t);var _=function(t){var e=ds(v(t));return h&&e[h]?e[h]():e};return _.classes=function(t){if(null!=t){if("array"===fs(t))o=t,s=[t[0],t[t.length-1]];else{var e=ds.analyze(s);o=0===t?[e.min,e.max]:ds.limits(e,"e",t)}return _}return o},_.domain=function(t){if(!arguments.length)return s;c=t[0],u=t[t.length-1],r=[];var e=l.length;if(t.length===e&&c!==u)for(var i=0,n=Array.from(t);i<n.length;i+=1){var a=n[i];r.push((a-c)/(u-c))}else{for(var o=0;o<e;o++)r.push(o/(e-1));if(t.length>2){var h=t.map((function(e,i){return i/(t.length-1)})),d=t.map((function(t){return(t-c)/(u-c)}));d.every((function(t,e){return h[e]===t}))||(x=function(t){if(t<=0||t>=1)return t;for(var e=0;t>=d[e+1];)e++;var i=(t-d[e])/(d[e+1]-d[e]);return h[e]+i*(h[e+1]-h[e])})}}return s=[c,u],_},_.mode=function(t){return arguments.length?(e=t,y(),_):e},_.range=function(t,e){return b(t),_},_.out=function(t){return h=t,_},_.spread=function(t){return arguments.length?(n=t,_):n},_.correctLightness=function(t){return null==t&&(t=!0),d=t,y(),m=d?function(t){for(var e=v(0,!0).lab()[0],i=v(1,!0).lab()[0],n=e>i,s=v(t,!0).lab()[0],r=e+(i-e)*t,a=s-r,o=0,l=1,h=20;Math.abs(a)>.01&&h-- >0;)n&&(a*=-1),a<0?(o=t,t+=.5*(l-t)):(l=t,t+=.5*(o-t)),s=v(t,!0).lab()[0],a=s-r;return t}:function(t){return t},_},_.padding=function(t){return null!=t?("number"===fs(t)&&(t=[t,t]),a=t,_):a},_.colors=function(e,i){arguments.length<2&&(i="hex");var n=[];if(0===arguments.length)n=l.slice(0);else if(1===e)n=[_(.5)];else if(e>1){var r=s[0],a=s[1]-r;n=function(t,e,i){for(var n=[],s=t<e,r=i?s?e+1:e-1:e,a=t;s?a<r:a>r;s?a++:a--)n.push(a);return n}(0,e,!1).map((function(t){return _(r+t/(e-1)*a)}))}else{t=[];var h=[];if(o&&o.length>2)for(var c=1,u=o.length,d=1<=u;d?c<u:c>u;d?c++:c--)h.push(.5*(o[c-1]+o[c]));else h=s;n=h.map((function(t){return _(t)}))}return ds[i]&&(n=n.map((function(t){return t[i]()}))),n},_.cache=function(t){return null!=t?(g=t,_):g},_.gamma=function(t){return null!=t?(p=t,_):p},_.nodata=function(t){return null!=t?(i=ds(t),_):i},_};var bs=m,ms=ps,xs=v,vs=function(t,e,i){if(!vs[i])throw new Error("unknown blend mode "+i);return vs[i](t,e)},ys=function(t){return function(e,i){var n=xs(i).rgb(),s=xs(e).rgb();return xs.rgb(t(n,s))}},_s=function(t){return function(e,i){var n=[];return n[0]=t(e[0],i[0]),n[1]=t(e[1],i[1]),n[2]=t(e[2],i[2]),n}};vs.normal=ys(_s((function(t){return t}))),vs.multiply=ys(_s((function(t,e){return t*e/255}))),vs.screen=ys(_s((function(t,e){return 255*(1-(1-t/255)*(1-e/255))}))),vs.overlay=ys(_s((function(t,e){return e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255))}))),vs.darken=ys(_s((function(t,e){return t>e?e:t}))),vs.lighten=ys(_s((function(t,e){return t>e?t:e}))),vs.dodge=ys(_s((function(t,e){return 255===t||(t=e/255*255/(1-t/255))>255?255:t}))),vs.burn=ys(_s((function(t,e){return 255*(1-(1-e/255)/(t/255))})));for(var Ms=vs,ws=c.type,ks=c.clip_rgb,Ss=c.TWOPI,Ps=Math.pow,Os=Math.sin,Ds=Math.cos,As=v,Cs=m,Es=Math.floor,Ts=Math.random,Ls=a,Rs=Math.log,Is=Math.pow,Fs=Math.floor,zs=Math.abs,Ns=function(t,e){void 0===e&&(e=null);var i={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Ls(t)&&(t=Object.values(t)),t.forEach((function(t){e&&"object"===Ls(t)&&(t=t[e]),null==t||isNaN(t)||(i.values.push(t),i.sum+=t,t<i.min&&(i.min=t),t>i.max&&(i.max=t),i.count+=1)})),i.domain=[i.min,i.max],i.limits=function(t,e){return js(i,t,e)},i},js=function(t,e,i){void 0===e&&(e="equal"),void 0===i&&(i=7),"array"==Ls(t)&&(t=Ns(t));var n=t.min,s=t.max,r=t.values.sort((function(t,e){return t-e}));if(1===i)return[n,s];var a=[];if("c"===e.substr(0,1)&&(a.push(n),a.push(s)),"e"===e.substr(0,1)){a.push(n);for(var o=1;o<i;o++)a.push(n+o/i*(s-n));a.push(s)}else if("l"===e.substr(0,1)){if(n<=0)throw new Error("Logarithmic scales are only possible for values > 0");var l=Math.LOG10E*Rs(n),h=Math.LOG10E*Rs(s);a.push(n);for(var c=1;c<i;c++)a.push(Is(10,l+c/i*(h-l)));a.push(s)}else if("q"===e.substr(0,1)){a.push(n);for(var u=1;u<i;u++){var d=(r.length-1)*u/i,f=Fs(d);if(f===d)a.push(r[f]);else{var g=d-f;a.push(r[f]*(1-g)+r[f+1]*g)}}a.push(s)}else if("k"===e.substr(0,1)){var p,b=r.length,m=new Array(b),x=new Array(i),v=!0,y=0,_=null;(_=[]).push(n);for(var M=1;M<i;M++)_.push(n+M/i*(s-n));for(_.push(s);v;){for(var w=0;w<i;w++)x[w]=0;for(var k=0;k<b;k++)for(var S=r[k],P=Number.MAX_VALUE,O=void 0,D=0;D<i;D++){var A=zs(_[D]-S);A<P&&(P=A,O=D),x[O]++,m[k]=O}for(var C=new Array(i),E=0;E<i;E++)C[E]=null;for(var T=0;T<b;T++)null===C[p=m[T]]?C[p]=r[T]:C[p]+=r[T];for(var L=0;L<i;L++)C[L]*=1/x[L];v=!1;for(var R=0;R<i;R++)if(C[R]!==_[R]){v=!0;break}_=C,++y>200&&(v=!1)}for(var I={},F=0;F<i;F++)I[F]=[];for(var z=0;z<b;z++)I[p=m[z]].push(r[z]);for(var N=[],j=0;j<i;j++)N.push(I[j][0]),N.push(I[j][I[j].length-1]);N=N.sort((function(t,e){return t-e})),a.push(N[0]);for(var V=1;V<N.length;V+=2){var B=N[V];isNaN(B)||-1!==a.indexOf(B)||a.push(B)}}return a},Vs={analyze:Ns,limits:js},Bs=m,Ws=m,Hs=Math.sqrt,$s=Math.pow,Ys=Math.min,Us=Math.max,Xs=Math.atan2,qs=Math.abs,Gs=Math.cos,Ks=Math.sin,Zs=Math.exp,Js=Math.PI,Qs=m,tr=m,er=v,ir=ps,nr={cool:function(){return ir([er.hsl(180,1,.9),er.hsl(250,.7,.4)])},hot:function(){return ir(["#000","#f00","#ff0","#fff"]).mode("rgb")}},sr={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},rr=0,ar=Object.keys(sr);rr<ar.length;rr+=1){var or=ar[rr];sr[or.toLowerCase()]=sr[or]}var lr=sr,hr=v;
1return hr.average=function(t,e,i){void 0===e&&(e="lrgb"),void 0===i&&(i=null);var n=t.length;i||(i=Array.from(new Array(n)).map((function(){return 1})));var s=n/i.reduce((function(t,e){return t+e}));if(i.forEach((function(t,e){i[e]*=s})),t=t.map((function(t){return new ns(t)})),"lrgb"===e)return us(t,i);for(var r=t.shift(),a=r.get(e),o=[],l=0,h=0,c=0;c<a.length;c++)if(a[c]=(a[c]||0)*i[0],o.push(isNaN(a[c])?0:i[0]),"h"===e.charAt(c)&&!isNaN(a[c])){var u=a[c]/180*os;l+=ls(u)*i[0],h+=hs(u)*i[0]}var d=r.alpha()*i[0];t.forEach((function(t,n){var s=t.get(e);d+=t.alpha()*i[n+1];for(var r=0;r<a.length;r++)if(!isNaN(s[r]))if(o[r]+=i[n+1],"h"===e.charAt(r)){var c=s[r]/180*os;l+=ls(c)*i[n+1],h+=hs(c)*i[n+1]}else a[r]+=s[r]*i[n+1]}));for(var f=0;f<a.length;f++)if("h"===e.charAt(f)){for(var g=cs(h/o[f],l/o[f])/os*180;g<0;)g+=360;for(;g>=360;)g-=360;a[f]=g}else a[f]=a[f]/o[f];return d/=n,new ns(a,e).alpha(d>.99999?1:d,!0)},hr.bezier=function(t){var e=function(t){var e,i,n,s,r,a,o;if(2===(t=t.map((function(t){return new bs(t)}))).length)e=t.map((function(t){return t.lab()})),r=e[0],a=e[1],s=function(t){return new bs([0,1,2].map((function(e){return r[e]+t*(a[e]-r[e])})),"lab")};else if(3===t.length)i=t.map((function(t){return t.lab()})),r=i[0],a=i[1],o=i[2],s=function(t){return new bs([0,1,2].map((function(e){return(1-t)*(1-t)*r[e]+2*(1-t)*t*a[e]+t*t*o[e]})),"lab")};else if(4===t.length){var l;n=t.map((function(t){return t.lab()})),r=n[0],a=n[1],o=n[2],l=n[3],s=function(t){return new bs([0,1,2].map((function(e){return(1-t)*(1-t)*(1-t)*r[e]+3*(1-t)*(1-t)*t*a[e]+3*(1-t)*t*t*o[e]+t*t*t*l[e]})),"lab")}}else{if(!(t.length>=5))throw new RangeError("No point in running bezier with only one color.");var h,c=t.map((function(t){return t.lab()})),u=t.length-1;h=function(t){for(var e=[1,1],i=1;i<t;i++){for(var n=[1],s=1;s<=e.length;s++)n[s]=(e[s]||0)+e[s-1];e=n}return e}(u),s=function(t){var e=1-t;return new bs([0,1,2].map((function(i){return c.reduce((function(n,s,r){return n+h[r]*Math.pow(e,u-r)*Math.pow(t,r)*s[i]}),0)})),"lab")}}return s}(t);return e.scale=function(){return ms(e)},e},hr.blend=Ms,hr.cubehelix=function(t,e,i,n,s){void 0===t&&(t=300),void 0===e&&(e=-1.5),void 0===i&&(i=1),void 0===n&&(n=1),void 0===s&&(s=[0,1]);var r,a=0;"array"===ws(s)?r=s[1]-s[0]:(r=0,s=[s,s]);var o=function(o){var l=Ss*((t+120)/360+e*o),h=Ps(s[0]+r*o,n),c=(0!==a?i[0]+o*a:i)*h*(1-h)/2,u=Ds(l),d=Os(l);return As(ks([255*(h+c*(-.14861*u+1.78277*d)),255*(h+c*(-.29227*u-.90649*d)),255*(h+c*(1.97294*u)),1]))};return o.start=function(e){return null==e?t:(t=e,o)},o.rotations=function(t){return null==t?e:(e=t,o)},o.gamma=function(t){return null==t?n:(n=t,o)},o.hue=function(t){return null==t?i:("array"===ws(i=t)?0===(a=i[1]-i[0])&&(i=i[1]):a=0,o)},o.lightness=function(t){return null==t?s:("array"===ws(t)?(s=t,r=t[1]-t[0]):(s=[t,t],r=0),o)},o.scale=function(){return As.scale(o)},o.hue(i),o},hr.mix=hr.interpolate=Ln,hr.random=function(){for(var t="#",e=0;e<6;e++)t+="0123456789abcdef".charAt(Es(16*Ts()));return new Cs(t,"hex")},hr.scale=ps,hr.analyze=Vs.analyze,hr.contrast=function(t,e){t=new Bs(t),e=new Bs(e);var i=t.luminance(),n=e.luminance();return i>n?(i+.05)/(n+.05):(n+.05)/(i+.05)},hr.deltaE=function(t,e,i,n,s){void 0===i&&(i=1),void 0===n&&(n=1),void 0===s&&(s=1);var r=function(t){return 360*t/(2*Js)},a=function(t){return 2*Js*t/360};t=new Ws(t),e=new Ws(e);var o=Array.from(t.lab()),l=o[0],h=o[1],c=o[2],u=Array.from(e.lab()),d=u[0],f=u[1],g=u[2],p=(l+d)/2,b=(Hs($s(h,2)+$s(c,2))+Hs($s(f,2)+$s(g,2)))/2,m=.5*(1-Hs($s(b,7)/($s(b,7)+$s(25,7)))),x=h*(1+m),v=f*(1+m),y=Hs($s(x,2)+$s(c,2)),_=Hs($s(v,2)+$s(g,2)),M=(y+_)/2,w=r(Xs(c,x)),k=r(Xs(g,v)),S=w>=0?w:w+360,P=k>=0?k:k+360,O=qs(S-P)>180?(S+P+360)/2:(S+P)/2,D=1-.17*Gs(a(O-30))+.24*Gs(a(2*O))+.32*Gs(a(3*O+6))-.2*Gs(a(4*O-63)),A=P-S;A=qs(A)<=180?A:P<=S?A+360:A-360,A=2*Hs(y*_)*Ks(a(A)/2);var C=d-l,E=_-y,T=1+.015*$s(p-50,2)/Hs(20+$s(p-50,2)),L=1+.045*M,R=1+.015*M*D,I=30*Zs(-$s((O-275)/25,2)),F=-2*Hs($s(M,7)/($s(M,7)+$s(25,7)))*Ks(2*a(I));return Us(0,Ys(100,Hs($s(C/(i*T),2)+$s(E/(n*L),2)+$s(A/(s*R),2)+F*(E/(n*L))*(A/(s*R)))))}
1,hr.distance=function(t,e,i){void 0===i&&(i="lab"),t=new Qs(t),e=new Qs(e);var n=t.get(i),s=e.get(i),r=0;for(var a in n){var o=(n[a]||0)-(s[a]||0);r+=o*o}return Math.sqrt(r)},hr.limits=Vs.limits,hr.valid=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];try{return new(Function.prototype.bind.apply(tr,[null].concat(t))),!0}catch(i){return!1}},hr.scales=nr,hr.colors=ui,hr.brewer=lr,hr}))})),A=e((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=r(a()),i=r(g()),n=r(O()),s=r(D());function r(t){return t&&t.__esModule?t:{default:t}}function o(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return l(t,e)}(t))){var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s,r=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return r=t.done,t},e:function(t){a=!0,s=t},f:function(){try{r||null==n.return||n.return()}finally{if(a)throw s}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function h(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var u={count:5,hueMin:0,hueMax:360,chromaMin:0,chromaMax:100,lightMin:0,lightMax:100,quality:50,samples:800},d=function(t,e){for(var i=Number.MAX_SAFE_INTEGER,n=0,s=0;s<t.length;s+=1){var r=t[s],a=Math.sqrt(Math.pow(Math.abs(r[0]-e[0]),2)+Math.pow(Math.abs(r[1]-e[1]),2)+Math.pow(Math.abs(r[2]-e[2]),2));a<i&&(i=a,n=s)}return n},f=function(t,e){var i=s.default.lab(t),n=i.hcl(),r=i.rgb(),a=s.default.rgb(r).lab();return n[0]>=e.hueMin&&n[0]<=e.hueMax&&n[1]>=e.chromaMin&&n[1]<=e.chromaMax&&n[2]>=e.lightMin&&n[2]<=e.lightMax&&a[0]>=t[0]-2&&a[0]<=t[0]+2&&a[1]>=t[1]-2&&a[1]<=t[1]+2&&a[2]>=t[2]-2&&a[2]<=t[2]+2};t.default=function(){var t=function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?h(Object(i),!0).forEach((function(e){c(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},u,{},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});if(t.count<=0)return[];t.samples<3*t.count&&(t.samples=Math.ceil(3*t.count));var r=[],a=[],l=new Set,g=Math.ceil(Math.cbrt(t.samples)),p=(t.hueMax-t.hueMin)/g,b=(t.chromaMax-t.chromaMin)/g,m=(t.lightMax-t.lightMin)/g;if(p<=0)throw new Error("hueMax must be greater than hueMin!");if(b<=0)throw new Error("chromaMax must be greater than chromaMin!");if(m<=0)throw new Error("lightMax must be greater than lightMin!");for(var x=t.hueMin+p/2;x<=t.hueMax;x+=p)for(var v=t.chromaMin+b/2;v<=t.chromaMax;v+=b)for(var y=t.lightMin+m/2;y<=t.lightMax;y+=m){var _=s.default.hcl(x,v,y).lab();f(_,t)&&l.add(_.toString())}if(l=(l=Array.from(l)).map((function(t){return t.split(",").map((function(t){return parseFloat(t)}))})),l.length<t.count)throw new Error("Not enough samples to generate palette, increase sample count.");for(var M=Math.floor(l.length/t.count),w=0;w<l.length&&(r.push(l[w]),a.push([]),!(r.length>=t.count));w+=M);for(var k=1;k<=t.quality;k+=1){for(var S=(0,i.default)(a),P=(0,i.default)(l),O=0;O<r.length;O+=1){var D=d(P,r[O]);S[O].push(P[D]),P.splice(D,1)}for(var A=0;A<P.length;A+=1){var C=l[A];S[d(r,C)].push(l[A])}for(var E=(0,i.default)(r),T=0;T<S.length;T+=1){var L,R=S[T],I=R.length,F=[],z=[],N=[],j=o(R);try{for(j.s();!(L=j.n()).done;){var V=L.value;F.push(V[0]),z.push(V[1]),N.push(V[2])}}catch($){j.e($)}finally{j.f()}var B=e.default.sum(F)/I,W=e.default.sum(z)/I,H=e.default.sum(N)/I;r[T]=[B,W,H]}if((0,n.default)(E,r))break}return r=function(t){for(var e=t.slice(0),i=[e.shift()];e.length>0;){for(var n=i[i.length-1],s=0,r=Number.MIN_SAFE_INTEGER,a=0;a<e.length;a+=1){var o=Math.sqrt(Math.pow(Math.abs(n[0]-e[a][0]),2)+Math.pow(Math.abs(n[1]-e[a][1]),2)+Math.pow(Math.abs(n[2]-e[a][2]),2));o>r&&(r=o,s=a)}i.push(e.splice(s,1)[0])}return i}(r),r.map((function(t){return s.default.lab(t)}))}})),C=t(i()),E=t(n()),T=s(),L=t(A());function R(t){return t+.5|0}var I=(t,e,i)=>Math.max(Math.min(t,i),e);function F(t){return I(R(2.55*t),0,255)}function z(t){return I(R(255*t),0,255)}
vendor: 65,757 bytes, line 1
1function N(t){return I(R(t/2.55)/100,0,1)}function j(t){return I(R(100*t),0,100)}var V={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},B=[..."0123456789ABCDEF"],W=t=>B[15&t],H=t=>B[(240&t)>>4]+B[15&t],$=t=>(240&t)>>4==(15&t);function Y(t){var e=(t=>$(t.r)&&$(t.g)&&$(t.b)&&$(t.a))(t)?W:H;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}var U=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function X(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function q(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function G(t,e,i){const n=X(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function K(t){const e=t.r/255,i=t.g/255,n=t.b/255,s=Math.max(e,i,n),r=Math.min(e,i,n),a=(s+r)/2;let o,l,h;return s!==r&&(h=s-r,l=a>.5?h/(2-s-r):h/(s+r),o=function(t,e,i,n,s){return t===s?(e-i)/n+(e<i?6:0):e===s?(i-t)/n+2:(t-e)/n+4}(e,i,n,h,s),o=60*o+.5),[0|o,l||0,a]}function Z(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(z)}function J(t,e,i){return Z(X,t,e,i)}function Q(t){return(t%360+360)%360}function tt(t){const e=U.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?F(+e[5]):z(+e[5]));const s=Q(+e[2]),r=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return Z(G,t,e,i)}(s,r,a):"hsv"===e[1]?function(t,e,i){return Z(q,t,e,i)}(s,r,a):J(s,r,a),{r:i[0],g:i[1],b:i[2],a:n}}var et,it={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"},nt={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 st(t){et||((et=function(){const t={},e=Object.keys(nt),i=Object.keys(it);let n,s,r,a,o;for(n=0;n<e.length;n++){for(a=o=e[n],s=0;s<i.length;s++)r=i[s],o=o.replace(r,it[r]);r=parseInt(nt[a],16),t[o]=[r>>16&255,r>>8&255,255&r]}return t}()).transparent=[0,0,0,0]);const e=et[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}var rt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;var at=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,ot=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function lt(t,e,i){if(t){let n=K(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=J(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function ht(t,e){return t?Object.assign(e||{},t):t}function ct(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=z(t[3]))):(e=ht(t,{r:0,g:0,b:0,a:1})).a=z(e.a),e}function ut(t){return"r"===t.charAt(0)?function(t){const e=rt.exec(t);let i,n,s,r=255;if(e){if(e[7]!==i){const t=+e[7];r=e[8]?F(t):I(255*t,0,255)}return i=+e[1],n=+e[3],s=+e[5],i=255&(e[2]?F(i):I(i,0,255)),n=255&(e[4]?F(n):I(n,0,255)),s=255&(e[6]?F(s):I(s,0,255)),{r:i,g:n,b:s,a:r}}}(t):tt(t)}var dt=class t{constructor(e){if(e instanceof t)return e;const i=typeof e;let n;var s,r,a;"object"===i?n=ct(e):"string"===i&&(a=(s=e).length,"#"===s[0]&&(4===a||5===a?r={r:255&17*V[s[1]],g:255&17*V[s[2]],b:255&17*V[s[3]],a:5===a?17*V[s[4]]:255}:7!==a&&9!==a||(r={r:V[s[1]]<<4|V[s[2]],g:V[s[3]]<<4|V[s[4]],b:V[s[5]]<<4|V[s[6]],a:9===a?V[s[7]]<<4|V[s[8]]:255})),n=r||st(e)||ut(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=ht(this._rgb);return t&&(t.a=N(t.a)),t}set rgb(t){this._rgb=ct(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${N(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?Y(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=K(t),i=e[0],n=j(e[1]),s=j(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${s}%, ${N(t.a)})`:`hsl(${i}, ${n}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let s;const r=e===s?.5:e,a=2*r-1,o=i.a-n.a,l=((a*o==-1?a:(a+o)/(1+a*o))+1)/2;s=1-l,i.r=255&l*i.r+s*n.r+.5,i.g=255&l*i.g+s*n.g+.5,i.b=255&l*i.b+s*n.b+.5,i.a=r*i.a+(1-r)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=ot(N(t.r)),s=ot(N(t.g)),r=ot(N(t.b));return{r:z(at(n+i*(ot(N(e.r))-n))),g:z(at(s+i*(ot(N(e.g))-s))),b:z(at(r+i*(ot(N(e.b))-r))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new t(this.rgb)}alpha(t){return this._rgb.a=z(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb;return t.r=t.g=t.b=R(.3*t.r+.59*t.g+.11*t.b),this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return lt(this._rgb,2,t),this}darken(t){return lt(this._rgb,2,-t),this}saturate(t){return lt(this._rgb,1,t),this}desaturate(t){return lt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=K(t);i[0]=Q(i[0]+e),i=J(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}};function ft(){}var gt=(()=>{let t=0;return()=>t++})();function pt(t){return null==t}function bt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function mt(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function xt(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function vt(t,e){return xt(t)?t:e}function yt(t,e){return void 0===t?e:t}var _t=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Mt(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function wt(t,e,i,n){let s,r,a;if(bt(t))if(r=t.length,n)for(s=r-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;s<r;s++)e.call(i,t[s],s);else if(mt(t))for(a=Object.keys(t),r=a.length,s=0;s<r;s++)e.call(i,t[a[s]],a[s])}function kt(t,e){let i,n,s,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(s=t[i],r=e[i],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0}function St(t){if(bt(t))return t.map(St);if(mt(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let s=0;for(;s<n;++s)e[i[s]]=St(t[i[s]]);return e}return t}function Pt(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function Ot(t,e,i,n){if(!Pt(t))return;const s=e[t],r=i[t];mt(s)&&mt(r)?Dt(s,r,n):e[t]=St(r)}function Dt(t,e,i){const n=bt(e)?e:[e],s=n.length;if(!mt(t))return t;const r=(i=i||{}).merger||Ot;let a;for(let o=0;o<s;++o){if(a=n[o],!mt(a))continue;const e=Object.keys(a);for(let n=0,s=e.length;n<s;++n)r(e[n],t,a,i)}return t}function At(t,e){return Dt(t,e,{merger:Ct})}function Ct(t,e,i){if(!Pt(t))return;const n=e[t],s=i[t];mt(n)&&mt(s)?At(n,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=St(s))}var Et={"":t=>t,x:t=>t.x,y:t=>t.y};function Tt(t,e){return(Et[e]||(Et[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const s of e)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e)))(t)}function Lt(t){return t.charAt(0).toUpperCase()+t.slice(1)}var Rt=t=>void 0!==t,It=t=>"function"==typeof t,Ft=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};var zt=Math.PI,Nt=2*zt,jt=Nt+zt,Vt=Number.POSITIVE_INFINITY,Bt=zt/180,Wt=zt/2,Ht=zt/4,$t=2*zt/3,Yt=Math.log10,Ut=Math.sign;function Xt(t,e,i){return Math.abs(t-e)<i}function qt(t){const e=Math.round(t);t=Xt(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Yt(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Gt(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Kt(t,e,i){let n,s,r;for(n=0,s=t.length;n<s;n++)r=t[n][i],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function Zt(t){return t*(zt/180)}function Jt(t){return t*(180/zt)}function Qt(t){if(!xt(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function te(t,e){const i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n);let r=Math.atan2(n,i);return r<-.5*zt&&(r+=Nt),{angle:r,distance:s}}function ee(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ie(t,e){return(t-e+jt)%Nt-zt}function ne(t){return(t%Nt+Nt)%Nt}function se(t,e,i,n){const s=ne(t),r=ne(e),a=ne(i),o=ne(r-s),l=ne(a-s),h=ne(s-r),c=ne(s-a);return s===r||s===a||n&&r===a||o>l&&h<c}function re(t,e,i){return Math.max(e,Math.min(i,t))}function ae(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function oe(t,e,i){i=i||(i=>t[i]<e);let n,s=t.length-1,r=0;for(;s-r>1;)n=r+s>>1,i(n)?r=n:s=n;return{lo:r,hi:s}}var le=(t,e,i,n)=>oe(t,i,n?n=>{const s=t[n][e];return s<i||s===i&&t[n+1][e]===i}:n=>t[n][e]<i),he=(t,e,i)=>oe(t,i,(n=>t[n][e]>=i));var ce=["push","pop","shift","splice","unshift"];function ue(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(ce.forEach((e=>{delete t[e]})),delete t._chartjs)}function de(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}var fe="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function ge(t,e){let i=[],n=!1;return function(...s){i=s,n||(n=!0,fe.call(window,(()=>{n=!1,t.apply(e,i)})))}}var pe=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function be(t,e,i){const n=e.length;let s=0,r=n;if(t._sorted){const{iScale:a,vScale:o,_parsed:l}=t,h=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,c=a.axis,{min:u,max:d,minDefined:f,maxDefined:g}=a.getUserBounds();if(f){if(s=Math.min(le(l,c,u).lo,i?n:le(e,c,a.getPixelForValue(u)).lo),h){const t=l.slice(0,s+1).reverse().findIndex((t=>!pt(t[o.axis])));s-=Math.max(0,t)}s=re(s,0,n-1)}if(g){let t=Math.max(le(l,a.axis,d,!0).hi+1,i?0:le(e,c,a.getPixelForValue(d),!0).hi+1);if(h){const e=l.slice(t-1).findIndex((t=>!pt(t[o.axis])));t+=Math.max(0,e)}r=re(t,s,n)-s}else r=n-s}return{start:s,count:r}}function me(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const r=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),r}var xe=t=>0===t||1===t,ve=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Nt/i),ye=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*Nt/i)+1,_e={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Wt),easeOutSine:t=>Math.sin(t*Wt),easeInOutSine:t=>-.5*(Math.cos(zt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>xe(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>xe(t)?t:ve(t,.075,.3),easeOutElastic:t=>xe(t)?t:ye(t,.075,.3),easeInOutElastic(t){const e=.1125;return xe(t)?t:t<.5?.5*ve(2*t,e,.45):.5+.5*ye(2*t-1,e,.45)},easeInBack:t=>t*t*(2.70158*t-1.70158),easeOutBack:t=>(t-=1)*t*(2.70158*t+1.70158)+1,easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-_e.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*_e.easeInBounce(2*t):.5*_e.easeOutBounce(2*t-1)+.5};function Me(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function we(t){return Me(t)?t:new dt(t)}function ke(t){return Me(t)?t:new dt(t).saturate(.5).darken(.1).hexString()}var Se=["x","y","borderWidth","radius","tension"],Pe=["color","borderColor","backgroundColor"];var Oe=new Map;function De(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Oe.get(i);return n||(n=new Intl.NumberFormat(t,e),Oe.set(i,n)),n}(e,i).format(t)}var Ae={values:t=>bt(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,r=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),r=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=Yt(Math.abs(r)),o=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),De(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(Yt(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?Ae.numeric.call(this,t,e,i):""}};var Ce={formatters:Ae};var Ee=Object.create(null),Te=Object.create(null);function Le(t,e){if(!e)return t;const i=e.split(".");for(let n=0,s=i.length;n<s;++n){const e=i[n];t=t[e]||(t[e]=Object.create(null))}return t}function Re(t,e,i){return"string"==typeof e?Dt(Le(t,e),i):Dt(Le(t,""),e)}var Ie=class{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.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=(t,e)=>ke(e.backgroundColor),this.hoverBorderColor=(t,e)=>ke(e.borderColor),this.hoverColor=(t,e)=>ke(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Re(this,t,e)}get(t){return Le(this,t)}describe(t,e){return Re(Te,t,e)}override(t,e){return Re(Ee,t,e)}route(t,e,i,n){const s=Le(this,t),r=Le(this,i),a="_"+e;Object.defineProperties(s,{[a]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=r[n];return mt(t)?Object.assign({},e,t):yt(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach((t=>t(this)))}},Fe=new Ie({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Pe},numbers:{type:"number",properties:Se}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ce.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function ze(t,e,i,n,s){let r=e[s];return r||(r=e[s]=t.measureText(s).width,i.push(s)),r>n&&(n=r),n}function Ne(t,e,i,n){let s=(n=n||{}).data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},r=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const o=i.length;let l,h,c,u,d;for(l=0;l<o;l++)if(u=i[l],null==u||bt(u)){if(bt(u))for(h=0,c=u.length;h<c;h++)d=u[h],null==d||bt(d)||(a=ze(t,s,r,a,d))}else a=ze(t,s,r,a,u);t.restore();const f=r.length/2;if(f>i.length){for(l=0;l<f;l++)delete s[r[l]];r.splice(0,f)}return a}function je(t,e,i){const n=t.currentDevicePixelRatio,s=0!==i?Math.max(i/2,.5):0;return Math.round((e-s)*n)/n+s}function Ve(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Be(t,e,i,n){!function(t,e,i,n,s){let r,a,o,l,h,c,u,d;const f=e.pointStyle,g=e.rotation,p=e.radius;let b=(g||0)*Bt;if(f&&"object"==typeof f&&(r=f.toString(),"[object HTMLImageElement]"===r||"[object HTMLCanvasElement]"===r))return t.save(),t.translate(i,n),t.rotate(b),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(isNaN(p)||p<=0)return;switch(t.beginPath(),f){default:s?t.ellipse(i,n,s/2,p,0,0,Nt):t.arc(i,n,p,0,Nt),t.closePath();break;case"triangle":c=s?s/2:p,t.moveTo(i+Math.sin(b)*c,n-Math.cos(b)*p),b+=$t,t.lineTo(i+Math.sin(b)*c,n-Math.cos(b)*p),b+=$t,t.lineTo(i+Math.sin(b)*c,n-Math.cos(b)*p),t.closePath();break;case"rectRounded":h=.516*p,l=p-h,a=Math.cos(b+Ht)*l,u=Math.cos(b+Ht)*(s?s/2-h:l),o=Math.sin(b+Ht)*l,d=Math.sin(b+Ht)*(s?s/2-h:l),t.arc(i-u,n-o,h,b-zt,b-Wt),t.arc(i+d,n-a,h,b-Wt,b),t.arc(i+u,n+o,h,b,b+Wt),t.arc(i-d,n+a,h,b+Wt,b+zt),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,c=s?s/2:l,t.rect(i-c,n-l,2*c,2*l);break}b+=Ht;case"rectRot":u=Math.cos(b)*(s?s/2:p),a=Math.cos(b)*p,o=Math.sin(b)*p,d=Math.sin(b)*(s?s/2:p),t.moveTo(i-u,n-o),t.lineTo(i+d,n-a),t.lineTo(i+u,n+o),t.lineTo(i-d,n+a),t.closePath();break;case"crossRot":b+=Ht;case"cross":u=Math.cos(b)*(s?s/2:p),a=Math.cos(b)*p,o=Math.sin(b)*p,d=Math.sin(b)*(s?s/2:p),t.moveTo(i-u,n-o),t.lineTo(i+u,n+o),t.moveTo(i+d,n-a),t.lineTo(i-d,n+a);break;case"star":u=Math.cos(b)*(s?s/2:p),a=Math.cos(b)*p,o=Math.sin(b)*p,d=Math.sin(b)*(s?s/2:p),t.moveTo(i-u,n-o),t.lineTo(i+u,n+o),t.moveTo(i+d,n-a),t.lineTo(i-d,n+a),b+=Ht,u=Math.cos(b)*(s?s/2:p),a=Math.cos(b)*p,o=Math.sin(b)*p,d=Math.sin(b)*(s?s/2:p),t.moveTo(i-u,n-o),t.lineTo(i+u,n+o),t.moveTo(i+d,n-a),t.lineTo(i-d,n+a);break;case"line":a=s?s/2:Math.cos(b)*p,o=Math.sin(b)*p,t.moveTo(i-a,n-o),t.lineTo(i+a,n+o);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(b)*(s?s/2:p),n+Math.sin(b)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}(t,e,i,n,null)}function We(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function He(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function $e(t){t.restore()}function Ye(t,e,i,n,s){if(!e)return t.lineTo(i.x,i.y);if("middle"===s){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===s!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Ue(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function Xe(t,e,i,n,s){if(s.strikethrough||s.underline){const r=t.measureText(n),a=e-r.actualBoundingBoxLeft,o=e+r.actualBoundingBoxRight,l=i-r.actualBoundingBoxAscent,h=i+r.actualBoundingBoxDescent,c=s.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(a,c),t.lineTo(o,c),t.stroke()}}function qe(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function Ge(t,e,i,n,s,r={}){const a=bt(e)?e:[e],o=r.strokeWidth>0&&""!==r.strokeColor;let l,h;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),pt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,r),l=0;l<a.length;++l)h=a[l],r.backdrop&&qe(t,r.backdrop),o&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),pt(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(h,i,n,r.maxWidth)),t.fillText(h,i,n,r.maxWidth),Xe(t,i,n,h,r),n+=Number(s.lineHeight);t.restore()}function Ke(t,e){const{x:i,y:n,w:s,h:r,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,1.5*zt,zt,!0),t.lineTo(i,n+r-a.bottomLeft),t.arc(i+a.bottomLeft,n+r-a.bottomLeft,a.bottomLeft,zt,Wt,!0),t.lineTo(i+s-a.bottomRight,n+r),t.arc(i+s-a.bottomRight,n+r-a.bottomRight,a.bottomRight,Wt,0,!0),t.lineTo(i+s,n+a.topRight),t.arc(i+s-a.topRight,n+a.topRight,a.topRight,0,-Wt,!0),t.lineTo(i+a.topLeft,n)}var Ze=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Je=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Qe(t,e){const i=(""+t).match(Ze);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}var ti=t=>+t||0;function ei(t,e){const i={},n=mt(e),s=n?Object.keys(e):e,r=mt(t)?n?i=>yt(t[i],t[e[i]]):e=>t[e]:()=>t;for(const a of s)i[a]=ti(r(a));return i}function ii(t){return ei(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ni(t){return ei(t,["topLeft","topRight","bottomLeft","bottomRight"])}function si(t){const e=ii(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ri(t,e){t=t||{},e=e||Fe.font;let i=yt(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=yt(t.style,e.style);n&&!(""+n).match(Je)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:yt(t.family,e.family),lineHeight:Qe(yt(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:yt(t.weight,e.weight),string:""};return s.string=function(t){return!t||pt(t.size)||pt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function ai(t,e,i,n){let s,r,a,o=!0;for(s=0,r=t.length;s<r;++s)if(a=t[s],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),o=!1),void 0!==i&&bt(a)&&(a=a[i%a.length],o=!1),void 0!==a))return n&&!o&&(n.cacheable=!1),a}function oi(t,e){return Object.assign(Object.create(t),e)}function li(t,e=[""],i,n,s=(()=>t[0])){const r=i||t;return void 0===n&&(n=vi("_fallback",t)),new Proxy({[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:n,_getTarget:s,override:i=>li([i,...t],e,r,n)},{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>fi(i,n,(()=>function(t,e,i,n){let s;for(const r of e)if(s=vi(ui(r,t),i),void 0!==s)return di(t,s)?mi(i,n,t,s):s}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>yi(t).includes(e),ownKeys:t=>yi(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function hi(t,e,i,n){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ci(t,n),setContext:e=>hi(t,e,i,n),override:s=>hi(t.override(s),e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>fi(t,e,(()=>function(t,e,i){const{_proxy:n,_context:s,_subProxy:r,_descriptors:a}=t;let o=n[e];It(o)&&a.isScriptable(e)&&(o=function(t,e,i,n){const{_proxy:s,_context:r,_subProxy:a,_stack:o}=i;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let l=e(r,a||n);o.delete(t),di(t,l)&&(l=mi(s._scopes,s,t,l));return l}(e,o,t,i));bt(o)&&o.length&&(o=function(t,e,i,n){const{_proxy:s,_context:r,_subProxy:a,_descriptors:o}=i;if(void 0!==r.index&&n(t))return e[r.index%e.length];if(mt(e[0])){const i=e,n=s._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=mi(n,s,t,l);e.push(hi(i,r,a&&a[t],o))}}return e}(e,o,t,a.isIndexable));di(e,o)&&(o=hi(o,s,r&&r[e],a));return o}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function ci(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:It(i)?i:()=>i,isIndexable:It(n)?n:()=>n}}var ui=(t,e)=>t?t+Lt(e):e,di=(t,e)=>mt(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function fi(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const n=i();return t[e]=n,n}function gi(t,e,i){return It(t)?t(e,i):t}var pi=(t,e)=>!0===t?e:"string"==typeof t?Tt(e,t):void 0;function bi(t,e,i,n,s){for(const r of e){const e=pi(i,r);if(e){t.add(e);const r=gi(e._fallback,i,s);if(void 0!==r&&r!==i&&r!==n)return r}else if(!1===e&&void 0!==n&&i!==n)return null}return!1}function mi(t,e,i,n){const s=e._rootScopes,r=gi(e._fallback,i,n),a=[...t,...s],o=new Set;o.add(n);let l=xi(o,a,i,r||i,n);return null!==l&&((void 0===r||r===i||(l=xi(o,a,r,l,n),null!==l))&&li(Array.from(o),[""],s,r,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];return bt(s)&&mt(i)?i:s||{}}(e,i,n))))}function xi(t,e,i,n,s){for(;i;)i=bi(t,e,i,n,s);return i}function vi(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function yi(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function _i(t,e,i,n){const{iScale:s}=t,{key:r="r"}=this._parsing,a=new Array(n);let o,l,h,c;for(o=0,l=n;o<l;++o)h=o+i,c=e[h],a[o]={r:s.parse(Tt(c,r),h)};return a}var Mi=Number.EPSILON||1e-14,wi=(t,e)=>e<t.length&&!t[e].skip&&t[e],ki=t=>"x"===t?"y":"x";function Si(t,e,i,n){const s=t.skip?e:t,r=e,a=i.skip?e:i,o=ee(r,s),l=ee(a,r);let h=o/(o+l),c=l/(o+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const u=n*h,d=n*c;return{previous:{x:r.x-u*(a.x-s.x),y:r.y-u*(a.y-s.y)},next:{x:r.x+d*(a.x-s.x),y:r.y+d*(a.y-s.y)}}}function Pi(t,e="x"){const i=ki(e),n=t.length,s=Array(n).fill(0),r=Array(n);let a,o,l,h=wi(t,0);for(a=0;a<n;++a)if(o=l,l=h,h=wi(t,a+1),l){if(h){const t=h[e]-l[e];s[a]=0!==t?(h[i]-l[i])/t:0}r[a]=o?h?Ut(s[a-1])!==Ut(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}!function(t,e,i){const n=t.length;let s,r,a,o,l,h=wi(t,0);for(let c=0;c<n-1;++c)l=h,h=wi(t,c+1),l&&h&&(Xt(e[c],0,Mi)?i[c]=i[c+1]=0:(s=i[c]/e[c],r=i[c+1]/e[c],o=Math.pow(s,2)+Math.pow(r,2),o<=9||(a=3/Math.sqrt(o),i[c]=s*a*e[c],i[c+1]=r*a*e[c])))}(t,s,r),function(t,e,i="x"){const n=ki(i),s=t.length;let r,a,o,l=wi(t,0);for(let h=0;h<s;++h){if(a=o,o=l,l=wi(t,h+1),!o)continue;const s=o[i],c=o[n];a&&(r=(s-a[i])/3,o[`cp1${i}`]=s-r,o[`cp1${n}`]=c-r*e[h]),l&&(r=(l[i]-s)/3,o[`cp2${i}`]=s+r,o[`cp2${n}`]=c+r*e[h])}}(t,r,e)}function Oi(t,e,i){return Math.max(Math.min(t,i),e)}function Di(t,e,i,n,s){let r,a,o,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Pi(t,s);else{let i=n?t[t.length-1]:t[0];for(r=0,a=t.length;r<a;++r)o=t[r],l=Si(i,o,t[Math.min(r+1,a-(n?0:1))%a],e.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,i=o}e.capBezierPoints&&function(t,e){let i,n,s,r,a,o=We(t[0],e);for(i=0,n=t.length;i<n;++i)a=r,r=o,o=i<n-1&&We(t[i+1],e),r&&(s=t[i],a&&(s.cp1x=Oi(s.cp1x,e.left,e.right),s.cp1y=Oi(s.cp1y,e.top,e.bottom)),o&&(s.cp2x=Oi(s.cp2x,e.left,e.right),s.cp2y=Oi(s.cp2y,e.top,e.bottom)))}(t,i)}function Ai(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ci(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Ei(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}var Ti=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);var Li=["top","right","bottom","left"];function Ri(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const r=Li[s];n[r]=parseFloat(t[e+"-"+r+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var Ii=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function Fi(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,s=Ti(i),r="border-box"===s.boxSizing,a=Ri(s,"padding"),o=Ri(s,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:s,offsetY:r}=n;let a,o,l=!1;if(Ii(s,r,t.target))a=s,o=r;else{const t=e.getBoundingClientRect();a=n.clientX-t.left,o=n.clientY-t.top,l=!0}return{x:a,y:o,box:l}}(t,i),u=a.left+(c&&o.left),d=a.top+(c&&o.top);let{width:f,height:g}=e;return r&&(f-=a.width+o.width,g-=a.height+o.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((h-d)/g*i.height/n)}}var zi=t=>Math.round(10*t)/10;function Ni(t,e,i,n){const s=Ti(t),r=Ri(s,"margin"),a=Ei(s.maxWidth,t,"clientWidth")||Vt,o=Ei(s.maxHeight,t,"clientHeight")||Vt,l=function(t,e,i){let n,s;if(void 0===e||void 0===i){const r=t&&Ci(t);if(r){const t=r.getBoundingClientRect(),a=Ti(r),o=Ri(a,"border","width"),l=Ri(a,"padding");e=t.width-l.width-o.width,i=t.height-l.height-o.height,n=Ei(a.maxWidth,r,"clientWidth"),s=Ei(a.maxHeight,r,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||Vt,maxHeight:s||Vt}}(t,e,i);let{width:h,height:c}=l;if("content-box"===s.boxSizing){const t=Ri(s,"border","width"),e=Ri(s,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-r.width),c=Math.max(0,n?h/n:c-r.height),h=zi(Math.min(h,a,l.maxWidth)),c=zi(Math.min(c,o,l.maxHeight)),h&&!c&&(c=zi(h/2)),(void 0!==e||void 0!==i)&&n&&l.height&&c>l.height&&(c=l.height,h=zi(Math.floor(c*n))),{width:h,height:c}}function ji(t,e,i){const n=e||1,s=zi(t.height*n),r=zi(t.width*n);t.height=zi(t.height),t.width=zi(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==s||a.width!==r)&&(t.currentDevicePixelRatio=n,a.height=s,a.width=r,t.ctx.setTransform(n,0,0,n,0,0),!0)}var Vi=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Ai()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function Bi(t,e){const i=function(t,e){return Ti(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Wi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Hi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function $i(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},a=Wi(t,s,i),o=Wi(s,r,i),l=Wi(r,e,i);return Wi(Wi(a,o,i),Wi(o,l,i),i)}function Yi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Ui(t){return"angle"===t?{between:se,compare:ie,normalize:ne}:{between:ae,compare:(t,e)=>t-e,normalize:t=>t}}function Xi({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:s}}function qi(t,e,i){if(!i)return[t];const{property:n,start:s,end:r}=i,a=e.length,{compare:o,between:l,normalize:h}=Ui(n),{start:c,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:s,end:r}=i,{between:a,normalize:o}=Ui(n),l=e.length;let h,c,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,h=0,c=l;h<c&&a(o(e[u%l][n]),s,r);++h)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:f,style:t.style}}(t,e,i),g=[];let p,b,m,x=!1,v=null;const y=()=>x||l(s,m,p)&&0!==o(s,m),_=()=>!x||0===o(r,p)||l(r,m,p);for(let M=c,w=c;M<=u;++M)b=e[M%a],b.skip||(p=h(b[n]),p!==m&&(x=l(p,s,r),null===v&&y()&&(v=0===o(p,s)?M:w),null!==v&&_()&&(g.push(Xi({start:v,end:M,loop:d,count:a,style:f})),v=null),w=M,m=p));return null!==v&&g.push(Xi({start:v,end:u,loop:d,count:a,style:f})),g}function Gi(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const s=t._chart.getContext(),r=Ki(t.options),{_datasetIndex:a,options:{spanGaps:o}}=t,l=i.length,h=[];let c=r,u=e[0].start,d=u;function f(t,e,n,s){const r=o?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=r;for(;i[e%l].skip;)e+=r;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:n,style:s}),c=s,u=e%l)}}for(const g of e){u=o?u:g.start;let t,e=i[u%l];for(d=u+1;d<=g.end;d++){const r=i[d%l];t=Ki(n.setContext(oi(s,{type:"segment",p0:e,p1:r,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:a}))),Zi(t,c)&&f(u,d-1,g.loop,c),e=r,c=t}u<d-1&&f(u,d-1,g.loop,c)}return h}(t,e,i,n):e}function Ki(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Zi(t,e){if(!e)return!1;const i=[],n=function(t,e){return Me(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,n)!==JSON.stringify(e,n)}function Ji(t,e,i){return t.options.clip?t[i]:e[i]}function Qi(t,e){const i=e._clip;if(i.disabled)return!1;const n=function(t,e){const{xScale:i,yScale:n}=t;return i&&n?{left:Ji(i,e,"left"),right:Ji(i,e,"right"),top:Ji(n,e,"top"),bottom:Ji(n,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:n.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:n.right+(!0===i.right?0:i.right),top:!1===i.top?0:n.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:n.bottom+(!0===i.bottom?0:i.bottom)}}var tn=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const s=e.listeners[n],r=e.duration;s.forEach((n=>n({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)})))}_refresh(){this._request||(this._running=!0,this._request=fe.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let r,a=s.length-1,o=!1;for(;a>=0;--a)r=s[a],r._active?(r._total>i.duration&&(i.duration=r._total),r.tick(t),o=!0):(s[a]=s[s.length-1],s.pop());o&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},en=new tn,nn="transparent",sn={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=we(t||nn),s=n.valid&&we(e||nn);return s&&s.valid?s.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i},rn=class{constructor(t,e,i,n){const s=e[i];n=ai([t.to,n,s,t.from]);const r=ai([t.from,s,n]);this._active=!0,this._fn=t.fn||sn[t.type||typeof r],this._easing=_e[t.easing]||_e.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],s=i-this._start,r=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=ai([t.to,e,n,t.from]),this._from=ai([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,r=this._loop,a=this._to;let o;if(this._active=s!==a&&(r||e<i),!this._active)return this._target[n]=a,void this._notify(!0);e<0?this._target[n]=s:(o=e/i%2,o=r&&o>1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[n]=this._fn(s,a,o))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n<i.length;n++)i[n][e]()}},an=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!mt(t))return;const e=Object.keys(Fe.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((n=>{const s=t[n];if(!mt(s))return;const r={};for(const t of e)r[t]=s[t];(bt(s.properties)&&s.properties||[n]).forEach((t=>{t!==n&&i.has(t)||i.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let s=0;s<n.length;s++){const e=t[n[s]];e&&e.active()&&i.push(e.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let o;for(o=r.length-1;o>=0;--o){const l=r[o];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const h=e[l];let c=s[l];const u=i.get(l);if(c){if(u&&c.active()){c.update(u,h,a);continue}c.cancel()}u&&u.duration?(s[l]=c=new rn(u,t,l,h),n.push(c)):t[l]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(en.add(this._chart,i),!0):void 0}};function on(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:n?r:s,end:n?s:r}}function ln(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,r;for(s=0,r=n.length;s<r;++s)i.push(n[s].index);return i}function hn(t,e,i,n={}){const s=t.keys,r="single"===n.mode;let a,o,l,h;if(null===e)return;let c=!1;for(a=0,o=s.length;a<o;++a){if(l=+s[a],l===i){if(c=!0,n.all)continue;break}h=t.values[l],xt(h)&&(r||0===e||Ut(e)===Ut(h))&&(e+=h)}return c||n.all?e:0}function cn(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function un(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function dn(t,e,i,n){for(const s of e.getMatchingVisibleMetas(n).reverse()){const e=t[s.index];if(i&&e>0||!i&&e<0)return s.index}return null}function fn(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:r,vScale:a,index:o}=n,l=r.axis,h=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(r,a,n),u=e.length;let d;for(let f=0;f<u;++f){const t=e[f],{[l]:i,[h]:r}=t;d=(t._stacks||(t._stacks={}))[h]=un(s,c,i),d[o]=r,d._top=dn(d,a,!0,n.type),d._bottom=dn(d,a,!1,n.type);(d._visualValues||(d._visualValues={}))[o]=r}}function gn(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function pn(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}var bn=t=>"reset"===t||"none"===t,mn=(t,e)=>e?t:Object.assign({},t),xn=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=cn(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&pn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=e.xAxisID=yt(i.xAxisID,gn(t,"x")),r=e.yAxisID=yt(i.yAxisID,gn(t,"y")),a=e.rAxisID=yt(i.rAxisID,gn(t,"r")),o=e.indexAxis,l=e.iAxisID=n(o,s,r,a),h=e.vAxisID=n(o,r,s,a);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ue(this._data,this),t._stacked&&pn(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(mt(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:n}=e,s="x"===i.axis?"x":"y",r="x"===n.axis?"x":"y",a=Object.keys(t),o=new Array(a.length);let l,h,c;for(l=0,h=a.length;l<h;++l)c=a[l],o[l]={[s]:c,[r]:t[c]};return o}(e,t)}else if(i!==e){if(i){ue(i,this);const t=this._cachedMeta;pn(t),t._parsed=[]}e&&Object.isExtensible(e)&&(s=this,(n=e)._chartjs?n._chartjs.listeners.push(s):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[s]}}),ce.forEach((t=>{const e="_onData"+Lt(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const s=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),s}})})))),this._syncList=[],this._data=e}var n,s}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=cn(e.vScale,e),e.stack!==i.stack&&(n=!0,pn(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&(fn(this,e._parsed),e._stacked=cn(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:s,_stacked:r}=i,a=s.axis;let o,l,h,c=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,h=n;else{h=bt(n[t])?this.parseArrayData(i,n,t,e):mt(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const s=()=>null===l[a]||u&&l[a]<u[a];for(o=0;o<e;++o)i._parsed[o+t]=l=h[o],c&&(s()&&(c=!1),u=l);i._sorted=c}r&&fn(this,h)}parsePrimitiveData(t,e,i,n){const{iScale:s,vScale:r}=t,a=s.axis,o=r.axis,l=s.getLabels(),h=s===r,c=new Array(n);let u,d,f;for(u=0,d=n;u<d;++u)f=u+i,c[u]={[a]:h||s.parse(l[f],f),[o]:r.parse(e[f],f)};return c}parseArrayData(t,e,i,n){const{xScale:s,yScale:r}=t,a=new Array(n);let o,l,h,c;for(o=0,l=n;o<l;++o)h=o+i,c=e[h],a[o]={x:s.parse(c[0],h),y:r.parse(c[1],h)};return a}parseObjectData(t,e,i,n){const{xScale:s,yScale:r}=t,{xAxisKey:a="x",yAxisKey:o="y"}=this._parsing,l=new Array(n);let h,c,u,d;for(h=0,c=n;h<c;++h)u=h+i,d=e[u],l[h]={x:s.parse(Tt(d,a),u),y:r.parse(Tt(d,o),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,s=this._cachedMeta,r=e[t.axis];return hn({keys:ln(n,!0),values:e._stacks[t.axis]._visualValues},r,s.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const s=i[e.axis];let r=null===s?NaN:s;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,r=hn(n,s,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,s=i._sorted&&t===i.iScale,r=n.length,a=this._getOtherScale(t),o=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:ln(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(a);let u,d;function f(){d=n[u];const e=d[a.axis];return!xt(d[t.axis])||h>e||c<e}for(u=0;u<r&&(f()||(this.updateRangeFromParsed(l,t,d,o),!s));++u);if(s)for(u=r-1;u>=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,o);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,s,r;for(n=0,s=e.length;n<s;++n)r=e[n][t.axis],xt(r)&&i.push(r);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:n?""+n.getLabelForValue(s[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,n,s;return mt(t)?(e=t.top,i=t.right,n=t.bottom,s=t.left):e=i=n=s=t,{top:e,right:i,bottom:n,left:s,disabled:!1===t}}(yt(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=on(t,i),s=on(e,i);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],s=e.chartArea,r=[],a=this._drawStart||0,o=this._drawCount||n.length-a,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,s,a,o),h=a;h<a+o;++h){const e=n[h];e.hidden||(e.active&&l?r.push(e):e.draw(t,s))}for(h=0;h<r.length;++h)r[h].draw(t,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return oi(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=n.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=function(t,e){return oi(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),s.dataset=n,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n="active"===e,s=this._cachedDataOpts,r=t+"-"+e,a=s[r],o=this.enableOptionSharing&&Rt(i);if(a)return mn(a,o);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=n?[`${t}Hover`,"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),h),d=Object.keys(Fe.elements[t]),f=l.resolveNamedOptions(u,d,(()=>this.getContext(i,n,e)),c);return f.$shared&&(f.$shared=o,s[r]=Object.freeze(mn(f,o))),f}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,r=`animation-${e}`,a=s[r];if(a)return a;let o;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),r=n.getOptionScopes(this.getDataset(),s);o=n.createResolver(r,this.getContext(t,i,e))}const l=new an(n,o&&o.animations);return o&&o._cacheable&&(s[r]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||bn(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,s=this.getSharedOptions(i),r=this.includeOptions(e,s)||s!==n;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:r}}updateElement(t,e,i,n){bn(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!bn(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[a,o,l]of this._syncList)this[a](o,l);this._syncList=[];const n=i.length,s=e.length,r=Math.min(s,n);r&&this.parse(0,r),s>n?this._insertElements(n,s-n,t):s<n&&this._removeElements(s,n-s)}_insertElements(t,e,i=!0){const n=this._cachedMeta,s=n.data,r=t+e;let a;const o=t=>{for(t.length+=e,a=t.length-1;a>=r;a--)t[a]=t[a-e]};for(o(s),a=t;a<r;++a)s[a]=new this.dataElementType;this._parsing&&o(n._parsed),this.parse(t,e),i&&this.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&pn(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}};function vn(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,s=i.length;e<s;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=de(n.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let n,s,r,a,o=e._length;const l=()=>{32767!==r&&-32768!==r&&(Rt(a)&&(o=Math.min(o,Math.abs(r-a)||o)),a=r)};for(n=0,s=i.length;n<s;++n)r=e.getPixelForValue(i[n]),l();for(a=void 0,n=0,s=e.ticks.length;n<s;++n)r=e.getPixelForTick(n),l();return o}function yn(t,e,i,n){return bt(t)?function(t,e,i,n){const s=i.parse(t[0],n),r=i.parse(t[1],n),a=Math.min(s,r),o=Math.max(s,r);let l=a,h=o;Math.abs(a)>Math.abs(o)&&(l=o,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:s,end:r,min:a,max:o}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function _n(t,e,i,n){const s=t.iScale,r=t.vScale,a=s.getLabels(),o=s===r,l=[];let h,c,u,d;for(h=i,c=i+n;h<c;++h)d=e[h],u={},u[s.axis]=o||s.parse(a[h],h),l.push(yn(d,u,r,h));return l}function Mn(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function wn(t,e,i,n){let s=e.borderSkipped;const r={};if(!s)return void(t.borderSkipped=r);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:o,reverse:l,top:h,bottom:c}=function(t){let e,i,n,s,r;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(s="end",r="start"):(s="start",r="end"),{start:i,end:n,reverse:e,top:s,bottom:r}}(t);"middle"===s&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?s=h:(i._bottom||0)===n?s=c:(r[kn(c,a,o,l)]=!0,s=h)),r[kn(s,a,o,l)]=!0,t.borderSkipped=r}function kn(t,e,i,n){var s,r,a;return n?(a=i,t=Sn(t=(s=t)===(r=e)?a:s===a?r:s,i,e)):t=Sn(t,e,i),t}function Sn(t,e,i){return"start"===t?e:"end"===t?i:t}function Pn(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}r(xn,"defaults",{}),r(xn,"datasetElementType",null),r(xn,"dataElementType",null);var On=class extends xn{parsePrimitiveData(t,e,i,n){return _n(t,e,i,n)}parseArrayData(t,e,i,n){return _n(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:s,vScale:r}=t,{xAxisKey:a="x",yAxisKey:o="y"}=this._parsing,l="x"===s.axis?a:o,h="x"===r.axis?a:o,c=[];let u,d,f,g;for(u=i,d=i+n;u<d;++u)g=e[u],f={},f[s.axis]=s.parse(Tt(g,l),u),c.push(yn(Tt(g,h),f,r,u));return c}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const s=i._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const{iScale:e,vScale:i}=this._cachedMeta,n=this.getParsed(t),s=n._custom,r=Mn(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(n[i.axis]);return{label:""+e.getLabelForValue(n[e.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const s="reset"===n,{index:r,_cachedMeta:{vScale:a}}=this,o=a.getBasePixel(),l=a.isHorizontal(),h=this._getRuler(),{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,n);for(let d=e;d<e+i;d++){const e=this.getParsed(d),i=s||pt(e[a.axis])?{base:o,head:o}:this._calculateBarValuePixels(d),f=this._calculateBarIndexPixels(d,h),g=(e._stacks||{})[a.axis],p={horizontal:l,base:i.base,enableBorderRadius:!g||Mn(e._custom)||r===g._top||r===g._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:Math.abs(i.size),width:l?Math.abs(i.size):f.size};u&&(p.options=c||this.resolveDataElementOptions(d,t[d].active?"active":n));const b=p.options||t[d].options;wn(p,b,g,r),Pn(p,b,h.ratio),this.updateElement(t[d],d,p,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),s=i.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),o=a&&a[i.axis],l=t=>{const e=t._parsed.find((t=>t[i.axis]===o)),n=e&&e[t.vScale.axis];if(pt(n)||isNaN(n))return!0};for(const h of n)if((void 0===e||!l(h))&&((!1===s||-1===r.indexOf(h.stack)||void 0===s&&void 0===h.stack)&&r.push(h.stack),h.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(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter((i=>t[i].axis===e)).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[yt("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const n=this._getStacks(t,i),s=void 0!==e?n.indexOf(e):-1;return-1===s?n.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let s,r;for(s=0,r=e.data.length;s<r;++s)n.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));const a=t.barThickness;return{min:a||vn(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:s,minBarLength:r}}=this,a=s||0,o=this.getParsed(t),l=o._custom,h=Mn(l);let c,u,d=o[e.axis],f=0,g=i?this.applyStack(e,o,i):d;g!==d&&(f=g-d,g=d),h&&(d=l.barStart,g=l.barEnd-l.barStart,0!==d&&Ut(d)!==Ut(l.barEnd)&&(f=0),f+=d);const p=pt(s)||h?f:s;let b=e.getPixelForValue(p);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(f+g):b,u=c-b,Math.abs(u)<r){u=function(t,e,i){return 0!==t?Ut(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(u,e,a)*r,d===a&&(b-=u/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1);b=Math.max(Math.min(b,Math.max(t,s)),Math.min(t,s)),c=b+u,i&&!h&&(o._stacks[e.axis]._visualValues[n]=e.getValueForPixel(c)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){const t=Ut(u)*e.getLineWidthForValue(a)/2;b+=t,u-=t}return{size:u,base:b,head:c,center:c+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,s=n.skipNull,r=yt(n.maxBarThickness,1/0);let a,o;const l=this._getAxisCount();if(e.grouped){const i=s?this._getStackCount(t):e.stackCount,h="flex"===n.barThickness?function(t,e,i,n){const s=e.pixels,r=s[t];let a=t>0?s[t-1]:null,o=t<s.length-1?s[t+1]:null;const l=i.categoryPercentage;null===a&&(a=r-(null===o?e.end-e.start:o-r)),null===o&&(o=r+r-a);const h=r-(r-Math.min(a,o))/2*l;return{chunk:Math.abs(o-a)/2*l/n,ratio:i.barPercentage,start:h}}(t,e,n,i*l):function(t,e,i,n){const s=i.barThickness;let r,a;return pt(s)?(r=e.min*i.categoryPercentage,a=i.barPercentage):(r=s*n,a=1),{chunk:r/n,ratio:a,start:e.pixels[t]-r/2}}(t,e,n,i*l),c="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,u=this._getAxis().indexOf(yt(c,this.getFirstScaleIdForIndexAxis())),d=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+u;a=h.start+h.chunk*d+h.chunk/2,o=Math.min(r,h.chunk*h.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),o=Math.min(r,e.min*e.ratio);return{base:a-o/2,head:a+o/2,center:a,size:o}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let s=0;for(;s<n;++s)null===this.getParsed(s)[e.axis]||i[s].hidden||i[s].draw(this._ctx)}};r(On,"id","bar"),r(On,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),r(On,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});var Dn=class extends xn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const s=super.parsePrimitiveData(t,e,i,n);for(let r=0;r<s.length;r++)s[r]._custom=this.resolveDataElementOptions(r+i).radius;return s}parseArrayData(t,e,i,n){const s=super.parseArrayData(t,e,i,n);for(let r=0;r<s.length;r++){const t=e[i+r];s[r]._custom=yt(t[2],this.resolveDataElementOptions(r+i).radius)}return s}parseObjectData(t,e,i,n){const s=super.parseObjectData(t,e,i,n);for(let r=0;r<s.length;r++){const t=e[i+r];s[r]._custom=yt(t&&t.r&&+t.r,this.resolveDataElementOptions(r+i).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:s}=e,r=this.getParsed(t),a=n.getLabelForValue(r.x),o=s.getLabelForValue(r.y),l=r._custom;return{label:i[t]||"",value:"("+a+", "+o+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:o,includeOptions:l}=this._getSharedOptions(e,n),h=r.axis,c=a.axis;for(let u=e;u<e+i;u++){const e=t[u],i=!s&&this.getParsed(u),d={},f=d[h]=s?r.getPixelForDecimal(.5):r.getPixelForValue(i[h]),g=d[c]=s?a.getBasePixel():a.getPixelForValue(i[c]);d.skip=isNaN(f)||isNaN(g),l&&(d.options=o||this.resolveDataElementOptions(u,e.active?"active":n),s&&(d.options.radius=0)),this.updateElement(e,u,d,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const s=n.radius;return"active"!==e&&(n.radius=0),n.radius+=yt(i&&i._custom,s),n}};r(Dn,"id","bubble"),r(Dn,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),r(Dn,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});var An=class extends xn{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let s,r,a=t=>+i[t];if(mt(i[t])){const{key:t="value"}=this._parsing;a=e=>+Tt(i[e],t)}for(s=t,r=t+e;s<r;++s)n._parsed[s]=a(s)}}_getRotation(){return Zt(this.options.rotation-90)}_getCircumference(){return Zt(this.options.circumference)}_getRotationExtents(){let t=Nt,e=-Nt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,s=n._getRotation(),r=n._getCircumference();t=Math.min(t,s),e=Math.max(e,s+r)}return{rotation:t,circumference:e-t}}update(t){const{chartArea:e}=this.chart,i=this._cachedMeta,n=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,r=Math.max((Math.min(e.width,e.height)-s)/2,0),a=Math.min((o=this.options.cutout,l=r,"string"==typeof o&&o.endsWith("%")?parseFloat(o)/100:+o/l),1);var o,l;const h=this._getRingWeight(this.index),{circumference:c,rotation:u}=this._getRotationExtents(),{ratioX:d,ratioY:f,offsetX:g,offsetY:p}=function(t,e,i){let n=1,s=1,r=0,a=0;if(e<Nt){const o=t,l=o+e,h=Math.cos(o),c=Math.sin(o),u=Math.cos(l),d=Math.sin(l),f=(t,e,n)=>se(t,o,l,!0)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>se(t,o,l,!0)?-1:Math.min(e,e*i,n,n*i),p=f(0,h,u),b=f(Wt,c,d),m=g(zt,h,u),x=g(zt+Wt,c,d);n=(p-m)/2,s=(b-x)/2,r=-(p+m)/2,a=-(b+x)/2}return{ratioX:n,ratioY:s,offsetX:r,offsetY:a}}(u,c,a),b=(e.width-s)/d,m=(e.height-s)/f,x=Math.max(Math.min(b,m)/2,0),v=_t(this.options.radius,x),y=(v-Math.max(v*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*v,this.offsetY=p*v,i.total=this.calculateTotal(),this.outerRadius=v-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*h,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,s=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*s/Nt)}updateElements(t,e,i,n){const s="reset"===n,r=this.chart,a=r.chartArea,o=r.options.animation,l=(a.left+a.right)/2,h=(a.top+a.bottom)/2,c=s&&o.animateScale,u=c?0:this.innerRadius,d=c?0:this.outerRadius,{sharedOptions:f,includeOptions:g}=this._getSharedOptions(e,n);let p,b=this._getRotation();for(p=0;p<e;++p)b+=this._circumference(p,s);for(p=e;p<e+i;++p){const e=this._circumference(p,s),i=t[p],r={x:l+this.offsetX,y:h+this.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:d,innerRadius:u};g&&(r.options=f||this.resolveDataElementOptions(p,i.active?"active":n)),b+=e,this.updateElement(i,p,r,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const s=t._parsed[i];null===s||isNaN(s)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(s))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?Nt*(Math.abs(t)/e):0}
1getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=De(e._parsed[t],i.options.locale);return{label:n[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,s,r,a,o;if(!t)for(n=0,s=i.data.datasets.length;n<s;++n)if(i.isDatasetVisible(n)){r=i.getDatasetMeta(n),t=r.data,a=r.controller;break}if(!t)return 0;for(n=0,s=t.length;n<s;++n)o=a.resolveDataElementOptions(n),"inner"!==o.borderAlign&&(e=Math.max(e,o.borderWidth||0,o.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(yt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}};r(An,"id","doughnut"),r(An,"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"}),r(An,"descriptors",{_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),r(An,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:n,color:s,useBorderRadius:r,borderRadius:a}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map(((e,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:e,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.getDataVisibility(o),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:n,pointStyle:i,borderRadius:r&&(a||l.borderRadius),index:o}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});var Cn=class extends xn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:s}=e,r=this.chart._animationsDisabled;let{start:a,count:o}=be(e,n,r);this._drawStart=a,this._drawCount=o,me(e)&&(a=0,o=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:l},t),this.updateElements(n,a,o,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:r,vScale:a,_stacked:o,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,n),u=r.axis,d=a.axis,{spanGaps:f,segment:g}=this.options,p=Gt(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||s||"none"===n,m=e+i,x=t.length;let v=e>0&&this.getParsed(e-1);for(let y=0;y<x;++y){const i=t[y],f=b?i:{};if(y<e||y>=m){f.skip=!0;continue}const x=this.getParsed(y),_=pt(x[d]),M=f[u]=r.getPixelForValue(x[u],y),w=f[d]=s||_?a.getBasePixel():a.getPixelForValue(o?this.applyStack(a,x,o):x[d],y);f.skip=isNaN(M)||isNaN(w)||_,f.stop=y>0&&Math.abs(x[u]-v[u])>p,g&&(f.parsed=x,f.raw=l.data[y]),c&&(f.options=h||this.resolveDataElementOptions(y,i.active?"active":n)),b||this.updateElement(i,y,f,n),v=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};r(Cn,"id","line"),r(Cn,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),r(Cn,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});var En=class extends xn{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=De(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:s}}
vendor: 16,232 bytes, line 1
1parseObjectData(t,e,i,n){return _i.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(n/2,0),r=(s-Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,n){const s="reset"===n,r=this.chart,a=r.options.animation,o=this._cachedMeta.rScale,l=o.xCenter,h=o.yCenter,c=o.getIndexAngle(0)-.5*zt;let u,d=c;const f=360/this.countVisibleElements();for(u=0;u<e;++u)d+=this._computeAngle(u,n,f);for(u=e;u<e+i;u++){const e=t[u];let i=d,g=d+this._computeAngle(u,n,f),p=r.getDataVisibility(u)?o.getDistanceFromCenterForValue(this.getParsed(u).r):0;d=g,s&&(a.animateScale&&(p=0),a.animateRotate&&(i=g=c));const b={x:l,y:h,innerRadius:0,outerRadius:p,startAngle:i,endAngle:g,options:this.resolveDataElementOptions(u,e.active?"active":n)};this.updateElement(e,u,b,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Zt(this.resolveDataElementOptions(t,e).angle||i):0}};r(En,"id","polarArea"),r(En,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),r(En,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map(((e,s)=>{const r=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:n,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});var Tn=class extends An{};r(Tn,"id","pie"),r(Tn,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});var Ln=class extends xn{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return _i.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],s=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const r={_loop:!0,_fullLoop:s.length===n.length,options:e};this.updateElement(i,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const s=this._cachedMeta.rScale,r="reset"===n;for(let a=e;a<e+i;a++){const e=t[a],i=this.resolveDataElementOptions(a,e.active?"active":n),o=s.getPointPositionForValue(a,this.getParsed(a).r),l=r?s.xCenter:o.x,h=r?s.yCenter:o.y,c={x:l,y:h,angle:o.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,a,c,n)}}};r(Ln,"id","radar"),r(Ln,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),r(Ln,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});var Rn=class extends xn{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:s}=e,r=this.getParsed(t),a=n.getLabelForValue(r.x),o=s.getLabelForValue(r.y);return{label:i[t]||"",value:"("+a+", "+o+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:s,count:r}=be(e,i,n);if(this._drawStart=s,this._drawCount=r,me(e)&&(s=0,r=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:r}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!r._decimated,s.points=i;const a=this.resolveDatasetElementOptions(t);a.segment=this.options.segment,this.updateElement(s,void 0,{animated:!n,options:a},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,s,r,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,n){const s="reset"===n,{iScale:r,vScale:a,_stacked:o,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,n),c=this.getSharedOptions(h),u=this.includeOptions(n,c),d=r.axis,f=a.axis,{spanGaps:g,segment:p}=this.options,b=Gt(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||s||"none"===n;let x=e>0&&this.getParsed(e-1);for(let v=e;v<e+i;++v){const e=t[v],i=this.getParsed(v),h=m?e:{},g=pt(i[f]),y=h[d]=r.getPixelForValue(i[d],v),_=h[f]=s||g?a.getBasePixel():a.getPixelForValue(o?this.applyStack(a,i,o):i[f],v);h.skip=isNaN(y)||isNaN(_)||g,h.stop=v>0&&Math.abs(i[d]-x[d])>b,p&&(h.parsed=i,h.raw=l.data[v]),u&&(h.options=c||this.resolveDataElementOptions(v,e.active?"active":n)),m||this.updateElement(e,v,h,n),x=i}this.updateSharedOptions(c,n,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const s=e[0].size(this.resolveDataElementOptions(0)),r=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,s,r)/2}};function In(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}r(Rn,"id","scatter"),r(Rn,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),r(Rn,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Fn=class t{static override(e){Object.assign(t.prototype,e)}constructor(t){r(this,"options",void 0),this.options=t||{}}init(){}formats(){return In()}parse(){return In()}format(){return In()}add(){return In()}diff(){return In()}startOf(){return In()}endOf(){return In()}};function zn(t,e,i,n){const{controller:s,data:r,_sorted:a}=t,o=s._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(o&&e===o.axis&&"r"!==e&&a&&r.length){const a=o._reversePixels?he:le;if(!n){const n=a(r,e,i);if(l){const{vScale:e}=s._cachedMeta,{_parsed:i}=t,r=i.slice(0,n.lo+1).reverse().findIndex((t=>!pt(t[e.axis])));n.lo-=Math.max(0,r);const a=i.slice(n.hi).findIndex((t=>!pt(t[e.axis])));n.hi+=Math.max(0,a)}return n}if(s._sharedOptions){const t=r[0],n="function"==typeof t.getRange&&t.getRange(e);if(n){const t=a(r,e,i-n),s=a(r,e,i+n);return{lo:t.lo,hi:s.hi}}}}return{lo:0,hi:r.length-1}}function Nn(t,e,i,n,s){const r=t.getSortedVisibleDatasetMetas(),a=i[e];for(let o=0,l=r.length;o<l;++o){const{index:t,data:i}=r[o],{lo:l,hi:h}=zn(r[o],e,a,s);for(let e=l;e<=h;++e){const s=i[e];s.skip||n(s,t,e)}}}function jn(t,e,i,n,s){const r=[];if(!s&&!t.isPointInArea(e))return r;return Nn(t,i,e,(function(i,a,o){(s||We(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&r.push({element:i,datasetIndex:a,index:o})}),!0),r}function Vn(t,e,i,n,s,r){let a=[];const o=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const s=e?Math.abs(t.x-n.x):0,r=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(r,2))}}(i);let l=Number.POSITIVE_INFINITY;return Nn(t,i,e,(function(i,h,c){const u=i.inRange(e.x,e.y,s);if(n&&!u)return;const d=i.getCenterPoint(s);if(!r&&!t.isPointInArea(d)&&!u)return;const f=o(e,d);f<l?(a=[{element:i,datasetIndex:h,index:c}],l=f):f===l&&a.push({element:i,datasetIndex:h,index:c})})),a}function Bn(t,e,i,n,s,r){return r||t.isPointInArea(e)?"r"!==i||n?Vn(t,e,i,n,s,r):function(t,e,i,n){let s=[];return Nn(t,i,e,(function(t,i,r){const{startAngle:a,endAngle:o}=t.getProps(["startAngle","endAngle"],n),{angle:l}=te(t,{x:e.x,y:e.y});se(l,a,o)&&s.push({element:t,datasetIndex:i,index:r})})),s}(t,e,i,s):[]}function Wn(t,e,i,n,s){const r=[],a="x"===i?"inXRange":"inYRange";let o=!1;return Nn(t,i,e,((t,n,l)=>{t[a]&&t[a](e[i],s)&&(r.push({element:t,datasetIndex:n,index:l}),o=o||t.inRange(e.x,e.y,s))})),n&&!o?[]:r}var Hn={evaluateInteractionItems:Nn,modes:{index(t,e,i,n){const s=Fi(e,t),r=i.axis||"x",a=i.includeInvisible||!1,o=i.intersect?jn(t,s,r,n,a):Bn(t,s,r,!1,n,a),l=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=o[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,n){const s=Fi(e,t),r=i.axis||"xy",a=i.includeInvisible||!1;let o=i.intersect?jn(t,s,r,n,a):Bn(t,s,r,!1,n,a);if(o.length>0){const e=o[0].datasetIndex,i=t.getDatasetMeta(e).data;o=[];for(let t=0;t<i.length;++t)o.push({element:i[t],datasetIndex:e,index:t})}return o},point:(t,e,i,n)=>jn(t,Fi(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const s=Fi(e,t),r=i.axis||"xy",a=i.includeInvisible||!1;return Bn(t,s,r,i.intersect,n,a)},x:(t,e,i,n)=>Wn(t,Fi(e,t),"x",i.intersect,n),y:(t,e,i,n)=>Wn(t,Fi(e,t),"y",i.intersect,n)}},$n=["left","top","right","bottom"];function Yn(t,e){return t.filter((t=>t.pos===e))}function Un(t,e){return t.filter((t=>-1===$n.indexOf(t.pos)&&t.box.axis===e))}function Xn(t,e){return t.sort(((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight}))}function qn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!$n.includes(n))continue;const r=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=s}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let r,a,o;for(r=0,a=t.length;r<a;++r){o=t[r];const{fullSize:a}=o.box,l=i[o.stack],h=l&&o.stackWeight/l.weight;o.horizontal?(o.width=h?h*n:a&&e.availableWidth,o.height=s):(o.width=n,o.height=h?h*s:a&&e.availableHeight)}return i}function Gn(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function Kn(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Zn(t,e,i,n){const{pos:s,box:r}=i,a=t.maxPadding;if(!mt(s)){i.size&&(t[s]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?r.height:r.width),i.size=e.size/e.count,t[s]+=i.size}r.getPadding&&Kn(a,r.getPadding());const o=Math.max(0,e.outerWidth-Gn(a,t,"left","right")),l=Math.max(0,e.outerHeight-Gn(a,t,"top","bottom")),h=o!==t.w,c=l!==t.h;return t.w=o,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function Jn(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Qn(t,e,i,n){const s=[];let r,a,o,l,h,c;for(r=0,a=t.length,h=0;r<a;++r){o=t[r],l=o.box,l.update(o.width||e.w,o.height||e.h,Jn(o.horizontal,e));const{same:a,other:u}=Zn(e,i,o,n);h|=a&&s.length,c=c||u,l.fullSize||s.push(o)}return h&&Qn(s,e,i,n)||c}function ts(t,e,i,n,s){t.top=i,t.left=e,t.right=e+n,t.bottom=i+s,t.width=n,t.height=s}function es(t,e,i,n){const s=i.padding;let{x:r,y:a}=e;for(const o of t){const t=o.box,l=n[o.stack]||{count:1,placed:0,weight:1},h=o.stackWeight/l.weight||1;if(o.horizontal){const n=e.w*h,r=l.size||t.height;Rt(l.start)&&(a=l.start),t.fullSize?ts(t,s.left,a,i.outerWidth-s.right-s.left,r):ts(t,e.left+l.placed,a,n,r),l.start=a,l.placed+=n,a=t.bottom}else{const n=e.h*h,a=l.size||t.width;Rt(l.start)&&(r=l.start),t.fullSize?ts(t,r,s.top,a,i.outerHeight-s.bottom-s.top):ts(t,r,e.top+l.placed,a,n),l.start=r,l.placed+=n,r=t.right}}e.x=r,e.y=a}var is={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const s=si(t.options.layout.padding),r=Math.max(e-s.width,0),a=Math.max(i-s.height,0),o=function(t){const e=function(t){const e=[];let i,n,s,r,a,o;for(i=0,n=(t||[]).length;i<n;++i)s=t[i],({position:r,options:{stack:a,stackWeight:o=1}}=s),e.push({index:i,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&r+a,stackWeight:o});return e}(t),i=Xn(e.filter((t=>t.box.fullSize)),!0),n=Xn(Yn(e,"left"),!0),s=Xn(Yn(e,"right")),r=Xn(Yn(e,"top"),!0),a=Xn(Yn(e,"bottom")),o=Un(e,"x"),l=Un(e,"y");return{fullSize:i,leftAndTop:n.concat(r),rightAndBottom:s.concat(l).concat(a).concat(o),chartArea:Yn(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:r.concat(a).concat(o)}}(t.boxes),l=o.vertical,h=o.horizontal;wt(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:s,availableWidth:r,availableHeight:a,vBoxMaxWidth:r/2/c,hBoxMaxHeight:a/2}),d=Object.assign({},s);Kn(d,si(n));const f=Object.assign({maxPadding:d,w:r,h:a,x:s.left,y:s.top},s),g=qn(l.concat(h),u);Qn(o.fullSize,f,u,g),Qn(l,f,u,g),Qn(h,f,u,g)&&Qn(l,f,u,g),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),es(o.leftAndTop,f,u,g),f.x+=f.w,f.y+=f.h,es(o.rightAndBottom,f,u,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},wt(o.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}},ns=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}},ss=class extends ns{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},rs="$chartjs",as={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},os=t=>null===t||""===t;var ls=!!Vi&&{passive:!0};function hs(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,ls)}function cs(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function us(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||cs(i.addedNodes,n),e=e&&!cs(i.removedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}function ds(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||cs(i.removedNodes,n),e=e&&!cs(i.addedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}var fs=new Map,gs=0;function ps(){const t=window.devicePixelRatio;t!==gs&&(gs=t,fs.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function bs(t,e,i){const n=t.canvas,s=n&&Ci(n);if(!s)return;const r=ge(((t,e)=>{const n=s.clientWidth;i(t,e),n<s.clientWidth&&i()}),window),a=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||r(i,n)}));return a.observe(s),function(t,e){fs.size||window.addEventListener("resize",ps),fs.set(t,e)}(t,r),a}function ms(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){fs.delete(t),fs.size||window.removeEventListener("resize",ps)}(t)}function xs(t,e,i){const n=t.canvas,s=ge((e=>{null!==t.ctx&&i(function(t,e){const i=as[t.type]||t.type,{x:n,y:s}=Fi(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==s?s:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,ls)}(n,e,s),s}var vs=class extends ns{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),s=t.getAttribute("width");
vendor: 3,604 bytes, line 1
1if(t[rs]={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",os(s)){const e=Bi(t,"width");void 0!==e&&(t.width=e)}if(os(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Bi(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[rs])return!1;const i=e[rs].initial;["height","width"].forEach((t=>{const n=i[t];pt(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e[rs],!0}addEventListener(t,e,i){this.removeEventListener(t,e);(t.$proxies||(t.$proxies={}))[e]=({attach:us,detach:ds,resize:bs}[e]||xs)(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:ms,detach:ms,resize:ms}[e]||hs)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return Ni(t,e,i,n)}isAttached(t){const e=t&&Ci(t);return!(!e||!e.isConnected)}};var ys=class{constructor(){r(this,"x",void 0),r(this,"y",void 0),r(this,"active",!1),r(this,"options",void 0),r(this,"$animations",void 0)}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Gt(this.x)&&Gt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}};function _s(t,e){const i=t.options.ticks,n=function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),s=t._maxLength/i;return Math.floor(Math.min(n,s))}(t),s=Math.min(i.maxTicksLimit||n,n),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],a=r.length,o=r[0],l=r[a-1],h=[];if(a>s)return function(t,e,i,n){let s,r=0,a=i[0];for(n=Math.ceil(n),s=0;s<t.length;s++)s===a&&(e.push(t[s]),r++,a=i[r*n])}(e,h,r,a/s),h;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),s=e.length/i;if(!n)return Math.max(s,1);const r=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(n);for(let a=0,o=r.length-1;a<o;a++){const t=r[a];if(t>s)return t}return Math.max(s,1)}(r,e,s);if(a>0){let t,i;const n=a>1?Math.round((l-o)/(a-1)):null;for(Ms(e,h,c,pt(n)?0:o-n,o),t=0,i=a-1;t<i;t++)Ms(e,h,c,r[t],r[t+1]);return Ms(e,h,c,l,pt(n)?e.length:l+n),h}return Ms(e,h,c),h}function Ms(t,e,i,n,s){const r=yt(n,0),a=Math.min(yt(s,t.length),t.length);let o,l,h,c=0;for(i=Math.ceil(i),s&&(o=s-n,i=o/Math.floor(o/i)),h=r;h<0;)c++,h=Math.round(r+c*i);for(l=Math.max(r,0);l<a;l++)l===h&&(e.push(t[l]),c++,h=Math.round(r+c*i))}r(ys,"defaults",{}),r(ys,"defaultRoutes",void 0);var ws=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,ks=(t,e)=>Math.min(e||t,t);function Ss(t,e){const i=[],n=t.length/e,s=t.length;let r=0;for(;r<s;r+=n)i.push(t[Math.floor(r)]);return i}function Ps(t,e,i){const n=t.ticks.length,s=Math.min(e,n-1),r=t._startPixel,a=t._endPixel,o=1e-6;let l,h=t.getPixelForTick(s);if(!(i&&(l=1===n?Math.max(h-r,a-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(s-1))/2,h+=s<e?l:-l,h<r-o||h>a+o)))return h}function Os(t){return t.drawTicks?t.tickLength:0}function Ds(t,e){if(!t.display)return 0;const i=ri(t.font,e),n=si(t.padding);return(bt(t.text)?t.text.length:1)*i.lineHeight+n.height}function As(t,e,i){let n=(t=>"start"===t?"left":"end"===t?"right":"center")(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>
vendor: 24,439 bytes, line 1
1"left"===t?"right":"right"===t?"left":t)(n)),n}var Cs=class t extends ys{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=vt(t,Number.POSITIVE_INFINITY),e=vt(e,Number.NEGATIVE_INFINITY),i=vt(i,Number.POSITIVE_INFINITY),n=vt(n,Number.NEGATIVE_INFINITY),{min:vt(t,i),max:vt(e,n),minDefined:xt(t),maxDefined:xt(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:s,maxDefined:r}=this.getUserBounds();if(s&&r)return{min:i,max:n};const a=this.getMatchingVisibleMetas();for(let o=0,l=a.length;o<l;++o)e=a[o].controller.getMinMax(this,t),s||(i=Math.min(i,e.min)),r||(n=Math.max(n,e.max));return i=r&&i>n?n:i,n=s&&i>n?i:n,{min:vt(i,vt(n,i)),max:vt(n,vt(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Mt(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:s,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:s}=t,r=_t(e,(s-n)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(n,-Math.abs(r)),max:a(s,r)}}(this,s,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=a<this.ticks.length;this._convertTicksToLabels(o?Ss(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||"auto"===r.source)&&(this.ticks=_s(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Mt(this.options.afterUpdate,[this])}beforeSetDimensions(){Mt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Mt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Mt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Mt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,s;for(i=0,n=t.length;i<n;i++)s=t[i],s.label=Mt(e.callback,[s.value,i,t],this)}afterTickToLabelConversion(){Mt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Mt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=ks(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,s=e.maxRotation;let r,a,o,l=n;if(!this._isVisible()||!e.display||n>=s||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const h=this._getLabelSizes(),c=h.widest.width,u=h.highest.height,d=re(this.chart.width-c,0,this.maxWidth);r=t.offset?this.maxWidth/i:d/(i-1),c+6>r&&(r=d/(i-(t.offset?.5:1)),a=this.maxHeight-Os(t.grid)-e.padding-Ds(t.title,this.chart.options.font),o=Math.sqrt(c*c+u*u),l=Jt(Math.min(Math.asin(re((h.highest.height+6)/r,-1,1)),Math.asin(re(a/o,-1,1))-Math.asin(re(u/o,-1,1)))),l=Math.max(n,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){Mt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Mt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:s}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const r=Ds(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Os(s)+r):(t.height=this.maxHeight,t.width=Os(s)+r),i.display&&this.ticks.length){const{first:e,last:n,widest:s,highest:r}=this._getLabelSizes(),o=2*i.padding,l=Zt(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=i.mirror?0:c*s.width+h*r.height;t.height=Math.min(this.maxHeight,t.height+e+o)}else{const e=i.mirror?0:h*s.width+c*r.height;t.width=Math.min(this.maxWidth,t.width+e+o)}this._calculatePadding(e,n,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:s,padding:r},position:a}=this.options,o=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,u=0;o?l?(c=n*t.width,u=i*e.height):(c=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?c=t.width:"inner"!==s&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-a+r)*this.width/(this.width-a),0),this.paddingRight=Math.max((u-h+r)*this.width/(this.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+r,this.paddingBottom=n+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Mt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)pt(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Ss(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:n,_longestTextCache:s}=this,r=[],a=[],o=Math.floor(e/ks(e,i));let l,h,c,u,d,f,g,p,b,m,x,v=0,y=0;for(l=0;l<e;l+=o){if(u=t[l].label,d=this._resolveTickFontOptions(l),n.font=f=d.string,g=s[f]=s[f]||{data:{},gc:[]},p=d.lineHeight,b=m=0,pt(u)||bt(u)){if(bt(u))for(h=0,c=u.length;h<c;++h)x=u[h],pt(x)||bt(x)||(b=ze(n,g.data,g.gc,b,x),m+=p)}else b=ze(n,g.data,g.gc,b,u),m=p;r.push(b),a.push(m),v=Math.max(b,v),y=Math.max(m,y)}!function(t,e){wt(t,(t=>{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s<n;++s)delete t.data[i[s]];i.splice(0,n)}}))}(s,e);const _=r.indexOf(v),M=a.indexOf(y),w=t=>({width:r[t]||0,height:a[t]||0});return{first:w(0),last:w(e-1),widest:w(_),highest:w(M),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return re(this._alignToPixels?je(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return oi(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=oi(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Zt(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),s=this._getLabelSizes(),r=t.autoSkipPadding||0,a=s?s.widest.width+r:0,o=s?s.highest.height+r:0;return this.isHorizontal()?o*i>a*n?a/i:o/n:o*n<a*i?o/i:a/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:s,position:r,border:a}=n,o=s.offset,l=this.isHorizontal(),h=this.ticks.length+(o?1:0),c=Os(s),u=[],d=a.setContext(this.getContext()),f=d.display?d.width:0,g=f/2,p=function(t){return je(i,t,f)};let b,m,x,v,y,_,M,w,k,S,P,O;if("top"===r)b=p(this.bottom),_=this.bottom-c,w=b-g,S=p(t.top)+g,O=t.bottom;else if("bottom"===r)b=p(this.top),S=t.top,O=p(t.bottom)-g,_=b+g,w=this.top+c;else if("left"===r)b=p(this.right),y=this.right-c,M=b-g,k=p(t.left)+g,P=t.right;else if("right"===r)b=p(this.left),k=t.left,P=p(t.right)-g,y=b+g,M=this.left+c;else if("x"===e){if("center"===r)b=p((t.top+t.bottom)/2+.5);else if(mt(r)){const t=Object.keys(r)[0],e=r[t];b=p(this.chart.scales[t].getPixelForValue(e))}S=t.top,O=t.bottom,_=b+g,w=_+c}else if("y"===e){if("center"===r)b=p((t.left+t.right)/2);else if(mt(r)){const t=Object.keys(r)[0],e=r[t];b=p(this.chart.scales[t].getPixelForValue(e))}y=b-g,M=y-c,k=t.left,P=t.right}const D=yt(n.ticks.maxTicksLimit,h),A=Math.max(1,Math.ceil(h/D));for(m=0;m<h;m+=A){const t=this.getContext(m),e=s.setContext(t),n=a.setContext(t),r=e.lineWidth,h=e.color,c=n.dash||[],d=n.dashOffset,f=e.tickWidth,g=e.tickColor,p=e.tickBorderDash||[],b=e.tickBorderDashOffset;x=Ps(this,m,o),void 0!==x&&(v=je(i,x,r),l?y=M=k=P=v:_=w=S=O=v,u.push({tx1:y,ty1:_,tx2:M,ty2:w,x1:k,y1:S,x2:P,y2:O,width:r,color:h,borderDash:c,borderDashOffset:d,tickWidth:f,tickColor:g,tickBorderDash:p,tickBorderDashOffset:b}))}return this._ticksLength=h,this._borderValue=b,u}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:s}=i,r=this.isHorizontal(),a=this.ticks,{align:o,crossAlign:l,padding:h,mirror:c}=s,u=Os(i.grid),d=u+h,f=c?-h:d,g=-Zt(this.labelRotation),p=[];let b,m,x,v,y,_,M,w,k,S,P,O,D="middle";if("top"===n)_=this.bottom-f,M=this._getXAxisLabelAlignment();else if("bottom"===n)_=this.top+f,M=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(u);M=t.textAlign,y=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(u);M=t.textAlign,y=t.x}else if("x"===e){if("center"===n)_=(t.top+t.bottom)/2+d;else if(mt(n)){const t=Object.keys(n)[0],e=n[t];_=this.chart.scales[t].getPixelForValue(e)+d}M=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)y=(t.left+t.right)/2-d;else if(mt(n)){const t=Object.keys(n)[0],e=n[t];y=this.chart.scales[t].getPixelForValue(e)}M=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===o?D="top":"end"===o&&(D="bottom"));const A=this._getLabelSizes();for(b=0,m=a.length;b<m;++b){x=a[b],v=x.label;const t=s.setContext(this.getContext(b));w=this.getPixelForTick(b)+s.labelOffset,k=this._resolveTickFontOptions(b),S=k.lineHeight,P=bt(v)?v.length:1;const e=P/2,i=t.color,o=t.textStrokeColor,h=t.textStrokeWidth;let u,d=M;if(r?(y=w,"inner"===M&&(d=b===m-1?this.options.reverse?"left":"right":0===b?this.options.reverse?"right":"left":"center"),O="top"===n?"near"===l||0!==g?-P*S+S/2:"center"===l?-A.highest.height/2-e*S+S:-A.highest.height+S/2:"near"===l||0!==g?S/2:"center"===l?A.highest.height/2-e*S:A.highest.height-P*S,c&&(O*=-1),0===g||t.showLabelBackdrop||(y+=S/2*Math.sin(g))):(_=w,O=(1-P)*S/2),t.showLabelBackdrop){const e=si(t.backdropPadding),i=A.heights[b],n=A.widths[b];let s=O-e.top,r=0-e.left;switch(D){case"middle":s-=i/2;break;case"bottom":s-=i}switch(M){case"center":r-=n/2;break;case"right":r-=n;break;case"inner":b===m-1?r-=n:b>0&&(r-=n/2)}u={left:r,top:s,width:n+e.width,height:i+e.height,color:t.backdropColor}}p.push({label:v,font:k,textOffset:O,options:{rotation:g,color:i,strokeColor:o,strokeWidth:h,textAlign:d,textBaseline:D,translation:[y,_],backdrop:u}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Zt(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:s}}=this.options,r=t+s,a=this._getLabelSizes().widest.width;let o,l;return"left"===e?n?(l=this.right+s,"near"===i?o="left":"center"===i?(o="center",l+=a/2):(o="right",l+=a)):(l=this.right-r,"near"===i?o="right":"center"===i?(o="center",l-=a/2):(o="left",l=this.left)):"right"===e?n?(l=this.left+s,"near"===i?o="right":"center"===i?(o="center",l-=a/2):(o="left",l-=a)):(l=this.left+r,"near"===i?o="left":"center"===i?(o="center",l+=a/2):(o="right",l=this.right)):o="right",{textAlign:o,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:s,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,s,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,r;const a=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,r=n.length;s<r;++s){const t=n[s];e.drawOnChartArea&&a({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&a({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:n}}=this,s=i.setContext(this.getContext()),r=i.display?s.width:0;if(!r)return;const a=n.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let l,h,c,u;this.isHorizontal()?(l=je(t,this.left,r)-r/2,h=je(t,this.right,a)+a/2,c=u=o):(c=je(t,this.top,r)-r/2,u=je(t,this.bottom,a)+a/2,l=h=o),e.save(),e.lineWidth=s.width,e.strokeStyle=s.color,e.beginPath(),e.moveTo(l,c),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&He(e,i);const n=this.getLabelItems(t);for(const s of n){const t=s.options,i=s.font;Ge(e,s.label,0,s.textOffset,i,t)}i&&$e(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=ri(i.font),r=si(i.padding),a=i.align;let o=s.lineHeight/2;"bottom"===e||"center"===e||mt(e)?(o+=r.bottom,bt(i.text)&&(o+=s.lineHeight*(i.text.length-1))):o+=r.top;const{titleX:l,titleY:h,maxWidth:c,rotation:u}=function(t,e,i,n){const{top:s,left:r,bottom:a,right:o,chart:l}=t,{chartArea:h,scales:c}=l;let u,d,f,g=0;const p=a-s,b=o-r;if(t.isHorizontal()){if(d=pe(n,r,o),mt(i)){const t=Object.keys(i)[0],n=i[t];f=c[t].getPixelForValue(n)+p-e}else f="center"===i?(h.bottom+h.top)/2+p-e:ws(t,i,e);u=o-r}else{if(mt(i)){const t=Object.keys(i)[0],n=i[t];d=c[t].getPixelForValue(n)-b+e}else d="center"===i?(h.left+h.right)/2-b+e:ws(t,i,e);f=pe(n,a,s),g="left"===i?-Wt:Wt}return{titleX:d,titleY:f,maxWidth:u,rotation:g}}(this,o,e,a);Ge(t,i.text,0,0,s,{color:i.color,maxWidth:c,rotation:u,textAlign:As(a,e,n),textBaseline:"middle",translation:[l,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const e=this.options,i=e.ticks&&e.ticks.z||0,n=yt(e.grid&&e.grid.z,-1),s=yt(e.border&&e.border.z,0);return this._isVisible()&&this.draw===t.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:i,draw:t=>{this.drawLabels(t)}}]:[{z:i,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,r;for(s=0,r=e.length;s<r;++s){const r=e[s];r[i]!==this.id||t&&r.type!==t||n.push(r)}return n}_resolveTickFontOptions(t){return ri(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}},Es=class{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,s=t.id,r=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in n||(n[s]=t,function(t,e,i){const n=Dt(Object.create(null),[i?Fe.get(i):{},Fe.get(e),t.defaults]);Fe.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),s=n.pop(),r=[t].concat(n).join("."),a=e[i].split("."),o=a.pop(),l=a.join(".");Fe.route(r,s,l,o)}))}(e,t.defaultRoutes);t.descriptors&&Fe.describe(e,t.descriptors)}(t,r,i),this.override&&Fe.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Fe[n]&&(delete Fe[n][i],this.override&&delete Ee[i])}};var Ts=class{constructor(){this.controllers=new Es(xn,"datasets",!0),this.elements=new Es(ys,"elements"),this.plugins=new Es(Object,"plugins"),this.scales=new Es(Cs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):wt(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=Lt(t);Mt(i["before"+n],[],i),e[t](i),Mt(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}},Ls=new Ts,Rs=class{constructor(){this._init=void 0}notify(t,e,i,n){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const s=n?this._descriptors(t).filter(n):this._descriptors(t),r=this._notify(s,t,e,i);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),r}_notify(t,e,i,n){n=n||{};for(const s of t){const t=s.plugin;if(!1===Mt(t[i],[e,n,s.options],t)&&n.cancelable)return!1}return!0}invalidate(){pt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=yt(i.options&&i.options.plugins,{}),s=function(t){const e={},i=[],n=Object.keys(Ls.plugins.items);for(let r=0;r<n.length;r++)i.push(Ls.getPlugin(n[r]));const s=t.plugins||[];for(let r=0;r<s.length;r++){const t=s[r];-1===i.indexOf(t)&&(i.push(t),e[t.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,{plugins:e,localIds:i},n,s){const r=[],a=t.getContext();for(const o of e){const e=o.id,l=Is(n[e],s);null!==l&&r.push({plugin:o,options:Fs(t.config,{plugin:o,local:i[e]},l,a)})}return r}(t,s,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}};function Is(t,e){return e||!1!==t?!0===t?{}:t:null}function Fs(t,{plugin:e,local:i},n,s){const r=t.pluginScopeKeys(e),a=t.getOptionScopes(n,r);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function zs(t,e){const i=Fe.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ns(t){if("x"===t||"y"===t||"r"===t)return t}function js(t,...e){if(Ns(t))return t;for(const n of e){const e=n.axis||("top"===(i=n.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&Ns(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Vs(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Bs(t,e){const i=Ee[t.type]||{scales:{}},n=e.scales||{},s=zs(t.type,e),r=Object.create(null);return Object.keys(n).forEach((e=>{const a=n[e];if(!mt(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const o=js(e,a,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Vs(t,"x",i[0])||Vs(t,"y",i[0])}return{}}(e,t),Fe.scales[a.type]),l=function(t,e){return t===e?"_index_":"_value_"}(o,s),h=i.scales||{};r[e]=At(Object.create(null),[{axis:o},a,h[o],h[l]])})),t.data.datasets.forEach((i=>{const s=i.type||t.type,a=i.indexAxis||zs(s,e),o=(Ee[s]||{}).scales||{};Object.keys(o).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),s=i[e+"AxisID"]||e;r[s]=r[s]||Object.create(null),At(r[s],[{axis:e},n[s],o[t]])}))})),Object.keys(r).forEach((t=>{const e=r[t];At(e,[Fe.scales[e.type],Fe.scale])})),r}function Ws(t){const e=t.options||(t.options={});e.plugins=yt(e.plugins,{}),e.scales=Bs(t,e)}function Hs(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}var $s=new Map,Ys=new Set;function Us(t,e){let i=$s.get(t);
vendor: 16,534 bytes, line 1
1return i||(i=e(),$s.set(t,i),Ys.add(i)),i}var Xs=(t,e,i)=>{const n=Tt(e,i);void 0!==n&&t.add(n)},qs=class{constructor(t){this._config=function(t){return(t=t||{}).data=Hs(t.data),Ws(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Hs(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Ws(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Us(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Us(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Us(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Us(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:s}=this,r=this._cachedScopes(t,i),a=r.get(e);if(a)return a;const o=new Set;e.forEach((e=>{t&&(o.add(t),e.forEach((e=>Xs(o,t,e)))),e.forEach((t=>Xs(o,n,t))),e.forEach((t=>Xs(o,Ee[s]||{},t))),e.forEach((t=>Xs(o,Fe,t))),e.forEach((t=>Xs(o,Te,t)))}));const l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),Ys.has(e)&&r.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ee[e]||{},Fe.datasets[e]||{},{type:e},Fe,Te]}resolveNamedOptions(t,e,i,n=[""]){const s={$shared:!0},{resolver:r,subPrefixes:a}=Gs(this._resolverCache,t,n);let o=r;if(function(t,e){const{isScriptable:i,isIndexable:n}=ci(t);for(const s of e){const e=i(s),r=n(s),a=(r||e)&&t[s];if(e&&(It(a)||Ks(a))||r&&bt(a))return!0}return!1}(r,e)){s.$shared=!1;o=hi(r,i=It(i)?i():i,this.createResolver(t,i,a))}for(const l of e)s[l]=o[l];return s}createResolver(t,e,i=[""],n){const{resolver:s}=Gs(this._resolverCache,t,i);return mt(e)?hi(s,e,void 0,n):s}};function Gs(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const s=i.join();let r=n.get(s);return r||(r={resolver:li(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(s,r)),r}var Ks=t=>mt(t)&&Object.getOwnPropertyNames(t).some((e=>It(t[e])));var Zs=["top","bottom","left","right","chartArea"];function Js(t,e){return"top"===t||"bottom"===t||-1===Zs.indexOf(t)&&"x"===e}function Qs(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function tr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Mt(i&&i.onComplete,[t],e)}function er(t){const e=t.chart,i=e.options.animation;Mt(i&&i.onProgress,[t],e)}function ir(t){return Ai()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var nr={},sr=t=>{const e=ir(t);return Object.values(nr).filter((t=>t.canvas===e)).pop()};function rr(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const r=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=r)}}}var ar=class{static register(...t){Ls.add(...t),or()}static unregister(...t){Ls.remove(...t),or()}constructor(t,e){const i=this.config=new qs(e),n=ir(t),s=sr(n);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ai()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ss:vs}(n)),this.platform.updateConfig(i);const a=this.platform.acquireContext(n,r.aspectRatio),o=a&&a.canvas,l=o&&o.height,h=o&&o.width;this.id=gt(),this.ctx=a,this.canvas=o,this.width=h,this.height=l,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 Rs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),r.resizeDelay||0),this._dataChanges=[],nr[this.id]=this,a&&o?(en.listen(this,"complete",tr),en.listen(this,"progress",er),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:s}=this;return pt(t)?e&&s?s:n?i/n: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 Ls}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ji(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ve(this.canvas,this.ctx),this}stop(){return en.stop(this),this}resize(t,e){en.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,s),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,ji(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),Mt(i.onResize,[this,r],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){wt(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];e&&(s=s.concat(Object.keys(e).map((t=>{const i=e[t],n=js(t,i),s="r"===n,r="x"===n;return{options:i,dposition:s?"chartArea":r?"bottom":"left",dtype:s?"radialLinear":r?"category":"linear"}})))),wt(s,(e=>{const s=e.options,r=s.id,a=js(r,s),o=yt(s.type,e.dtype);void 0!==s.position&&Js(s.position,a)===Js(e.dposition)||(s.position=e.dposition),n[r]=!0;let l=null;r in i&&i[r].type===o?l=i[r]:(l=new(Ls.getScale(o))({id:r,type:o,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(s,t)})),wt(n,((t,e)=>{t||delete i[e]})),wt(i,(t=>{is.configure(this,t,t.options),is.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Qs("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let s=this.getDatasetMeta(i);const r=n.type||this.config.type;if(s.type&&s.type!==r&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=r,s.indexAxis=n.indexAxis||zs(r,this.options),s.order=n.order||0,s.index=i,s.label=""+n.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const e=Ls.getController(r),{datasetElementType:n,dataElementType:a}=Fe.datasets[r];Object.assign(e,{dataElementType:Ls.getElement(a),datasetElementType:n&&Ls.getElement(n)}),s.controller=new e(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){wt(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let l=0,h=this.data.datasets.length;l<h;l++){const{controller:t}=this.getDatasetMeta(l),e=!n&&-1===s.indexOf(t);t.buildOrUpdateElements(e),r=Math.max(+t.getMaxOverflow(),r)}r=this._minPadding=i.layout.autoPadding?r:0,this._updateLayout(r),n||wt(s,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Qs("z","_idx"));const{_active:a,_lastEvent:o}=this;o?this._eventHandler(o,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){wt(this.scales,(t=>{is.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options;Ft(new Set(Object.keys(this._listeners)),new Set(t.events))&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e)rr(t,n,"_removeElements"===i?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),n=i(0);for(let s=1;s<e;s++)if(!Ft(n,i(s)))return;return Array.from(n).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;is.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],wt(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,It(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(en.has(this)?this.attached&&!en.running(this)&&en.start(this):(this.draw(),tr({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,s;for(n=0,s=e.length;n<s;++n){const s=e[n];t&&!s.visible||i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},n=Qi(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(n&&He(e,n),t.controller.draw(),n&&$e(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return We(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const s=Hn.modes[e];return"function"==typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=oi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",s=this.getDatasetMeta(t),r=s.controller._resolveAnimations(void 0,n);Rt(e)?(s.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(s,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),en.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ve(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete nr[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};wt(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),i("resize",s),i("detach",r)};r=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){wt(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},wt(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let s,r,a,o;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),a=0,o=t.length;a<o;++a){r=t[a];const e=r&&this.getDatasetMeta(r.datasetIndex).controller;e&&e[n+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));kt(i,e)||(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),r=s(e,t),a=i?t:s(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:s}=this,r=e,a=this._getActiveElements(t,n,i,r),o=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,o);i&&(this._lastEvent=null,Mt(s.onHover,[t,a,this],this),o&&Mt(s.onClick,[t,a,this],this));const h=!kt(a,n);
vendor: 2,601 bytes, line 1
1return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}};function or(){return wt(ar.instances,(t=>t._plugins.invalidate()))}function lr(t,e,i,n){const s=ei(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const r=(i-e)/2,a=Math.min(r,n*e/2),o=t=>{const e=(i-Math.min(r,t))*n/2;return re(t,0,Math.min(r,e))};return{outerStart:o(s.outerStart),outerEnd:o(s.outerEnd),innerStart:re(s.innerStart,0,a),innerEnd:re(s.innerEnd,0,a)}}function hr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function cr(t,e,i,n,s,r){const{x:a,y:o,startAngle:l,pixelMargin:h,innerRadius:c}=e,u=Math.max(e.outerRadius+n+i-h,0),d=c>0?c+n+i+h:0;let f=0;const g=s-l;if(n){const t=((c>0?c-n:0)+(u>0?u-n:0))/2;f=(g-(0!==t?g*t/(t+n):g))/2}const p=(g-Math.max(.001,g*u-i/zt)/u)/2,b=l+p+f,m=s-p-f,{outerStart:x,outerEnd:v,innerStart:y,innerEnd:_}=lr(e,d,u,m-b),M=u-x,w=u-v,k=b+x/M,S=m-v/w,P=d+y,O=d+_,D=b+y/P,A=m-_/O;if(t.beginPath(),r){const e=(k+S)/2;if(t.arc(a,o,u,k,e),t.arc(a,o,u,e,S),v>0){const e=hr(w,S,a,o);t.arc(e.x,e.y,v,S,m+Wt)}const i=hr(O,m,a,o);if(t.lineTo(i.x,i.y),_>0){const e=hr(O,A,a,o);t.arc(e.x,e.y,_,m+Wt,A+Math.PI)}const n=(m-_/d+(b+y/d))/2;if(t.arc(a,o,d,m-_/d,n,!0),t.arc(a,o,d,n,b+y/d,!0),y>0){const e=hr(P,D,a,o);t.arc(e.x,e.y,y,D+Math.PI,b-Wt)}const s=hr(M,b,a,o);if(t.lineTo(s.x,s.y),x>0){const e=hr(M,k,a,o);t.arc(e.x,e.y,x,b-Wt,k)}}else{t.moveTo(a,o);const e=Math.cos(k)*u+a,i=Math.sin(k)*u+o;t.lineTo(e,i);const n=Math.cos(S)*u+a,s=Math.sin(S)*u+o;t.lineTo(n,s)}t.closePath()}function ur(t,e,i,n,s){const{fullCircles:r,startAngle:a,circumference:o,options:l}=e,{borderWidth:h,borderJoinStyle:c,borderDash:u,borderDashOffset:d,borderRadius:f}=l,g="inner"===l.borderAlign;if(!h)return;t.setLineDash(u||[]),t.lineDashOffset=d,g?(t.lineWidth=2*h,t.lineJoin=c||"round"):(t.lineWidth=h,t.lineJoin=c||"bevel");let p=e.endAngle;if(r){cr(t,e,i,n,p,s);for(let e=0;e<r;++e)t.stroke();isNaN(o)||(p=a+(o%Nt||Nt))}g&&function(t,e,i){const{startAngle:n,pixelMargin:s,x:r,y:a,outerRadius:o,innerRadius:l}=e;let h=s/o;t.beginPath(),t.arc(r,a,o,n-h,i+h),l>s?(h=s/l,t.arc(r,a,l,i+h,n-h,!0)):t.arc(r,a,s,i+Wt,n-Wt),t.closePath(),t.clip()}(t,e,p),l.selfJoin&&p-a>=zt&&0===f&&"miter"!==c&&function(t,e,i){const{startAngle:n,x:s,y:r,outerRadius:a,innerRadius:o,options:l}=e,{borderWidth:h,borderJoinStyle:c}=l,u=Math.min(h/a,ne(n-i));if(t.beginPath(),t.arc(s,r,a-h/2,n+u/2,i-u/2),o>0){const e=Math.min(h/o,ne(n-i));
1t.arc(s,r,o+h/2,i-e/2,n+e/2,!0)}else{const e=Math.min(h/2,a*ne(n-i));if("round"===c)t.arc(s,r,e,i-zt/2,n+zt/2,!0);else if("bevel"===c){const a=2*e*e,o=-a*Math.cos(i+zt/2)+s,l=-a*Math.sin(i+zt/2)+r,h=a*Math.cos(n+zt/2)+s,c=a*Math.sin(n+zt/2)+r;t.lineTo(o,l),t.lineTo(h,c)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,p),r||(cr(t,e,i,n,p,s),t.stroke())}r(ar,"defaults",Fe),r(ar,"instances",nr),r(ar,"overrides",Ee),r(ar,"registry",Ls),r(ar,"version","4.5.1"),r(ar,"getChart",sr);var dr=class extends ys{constructor(t){super(),r(this,"circumference",void 0),r(this,"endAngle",void 0),r(this,"fullCircles",void 0),r(this,"innerRadius",void 0),r(this,"outerRadius",void 0),r(this,"pixelMargin",void 0),r(this,"startAngle",void 0),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const{angle:n,distance:s}=te(this.getProps(["x","y"],i),{x:t,y:e}),{startAngle:r,endAngle:a,innerRadius:o,outerRadius:l,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),c=(this.options.spacing+this.options.borderWidth)/2,u=yt(h,a-r),d=se(n,r,a)&&r!==a,f=u>=Nt||d,g=ae(s,o+c,l+c);return f&&g}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:s,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:o,spacing:l}=this.options,h=(n+s)/2,c=(r+a+l+o)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/4,s=(e.spacing||0)/2,r=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>Nt?Math.floor(i/Nt):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*n,Math.sin(a)*n);const o=n*(1-Math.sin(Math.min(zt,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,n,s){const{fullCircles:r,startAngle:a,circumference:o}=e;let l=e.endAngle;if(r){cr(t,e,i,n,l,s);for(let e=0;e<r;++e)t.fill();isNaN(o)||(l=a+(o%Nt||Nt))}cr(t,e,i,n,l,s),t.fill()}(t,this,o,s,r),ur(t,this,o,s,r),t.restore()}};function fr(t,e,i=e){t.lineCap=yt(i.borderCapStyle,e.borderCapStyle),t.setLineDash(yt(i.borderDash,e.borderDash)),t.lineDashOffset=yt(i.borderDashOffset,e.borderDashOffset),t.lineJoin=yt(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=yt(i.borderWidth,e.borderWidth),t.strokeStyle=yt(i.borderColor,e.borderColor)}function gr(t,e,i){t.lineTo(i.x,i.y)}function pr(t,e,i={}){const n=t.length,{start:s=0,end:r=n-1}=i,{start:a,end:o}=e,l=Math.max(s,a),h=Math.min(r,o),c=s<a&&r<a||s>o&&r>o;return{count:n,start:l,loop:e.loop,ilen:h<l&&!c?n+h-l:h-l}}function br(t,e,i,n){const{points:s,options:r}=e,{count:a,start:o,loop:l,ilen:h}=pr(s,i,n),c=function(t){return t.stepped?Ye:t.tension||"monotone"===t.cubicInterpolationMode?Ue:gr}(r);let u,d,f,{move:g=!0,reverse:p}=n||{};for(u=0;u<=h;++u)d=s[(o+(p?h-u:u))%a],d.skip||(g?(t.moveTo(d.x,d.y),g=!1):c(t,f,d,p,r.stepped),f=d);return l&&(d=s[(o+(p?h:0))%a],c(t,f,d,p,r.stepped)),!!l}function mr(t,e,i,n){const s=e.points,{count:r,start:a,ilen:o}=pr(s,i,n),{move:l=!0,reverse:h}=n||{};let c,u,d,f,g,p,b=0,m=0;const x=t=>(a+(h?o-t:t))%r,v=()=>{f!==g&&(t.lineTo(b,g),t.lineTo(b,f),t.lineTo(b,p))};for(l&&(u=s[x(0)],t.moveTo(u.x,u.y)),c=0;c<=o;++c){if(u=s[x(c)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(i<f?f=i:i>g&&(g=i),b=(m*b+e)/++m):(v(),t.lineTo(e,i),d=n,m=0,f=g=i),p=i}v()}function xr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?br:mr}r(dr,"id","arc"),r(dr,"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}),r(dr,"defaultRoutes",{backgroundColor:"backgroundColor"}),r(dr,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t});var vr="function"==typeof Path2D;
vendor: 40,954 bytes, line 1
1function yr(t,e,i,n){vr&&!e.options.segment?function(t,e,i,n){let s=e._path;s||(s=e._path=new Path2D,e.path(s,i,n)&&s.closePath()),fr(t,e.options),t.stroke(s)}(t,e,i,n):function(t,e,i,n){const{segments:s,options:r}=e,a=xr(e);for(const o of s)fr(t,r,o.style),t.beginPath(),a(t,e,o,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}var _r=class extends ys{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Di(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const r=!!t._loop,{start:a,end:o}=function(t,e,i,n){let s=0,r=e-1;if(i&&!n)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,i&&(r+=s);r>s&&t[r%e].skip;)r--;return r%=e,{start:s,end:r}}(i,s,r,n);return Gi(t,!0===n?[{start:a,end:o,loop:r}]:function(t,e,i,n){const s=t.length,r=[];let a,o=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%s];i.skip||i.stop?l.skip||(n=!1,r.push({start:e%s,end:(a-1)%s,loop:n}),e=o=i.stop?a:null):(o=a,l.skip&&(e=a)),l=i}return null!==o&&r.push({start:e%s,end:o%s,loop:n}),r}(i,a,o<a?o+s:o,!!t._fullLoop&&0===a&&o===s-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],s=this.points,r=function(t,e){const i=[],n=t.segments;for(let s=0;s<n.length;s++){const r=qi(n[s],t.points,e);r.length&&i.push(...r)}return i}(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],o=function(t){return t.stepped?Hi:t.tension||"monotone"===t.cubicInterpolationMode?$i:Wi}(i);let l,h;for(l=0,h=r.length;l<h;++l){const{start:h,end:c}=r[l],u=s[h],d=s[c];if(u===d){a.push(u);continue}const f=o(u,d,Math.abs((n-u[e])/(d[e]-u[e])),i.stepped);f[e]=t[e],a.push(f)}return 1===a.length?a[0]:a}pathSegment(t,e,i){return xr(this)(t,this,e,i)}path(t,e,i){const n=this.segments,s=xr(this);let r=this._loop;e=e||0,i=i||this.points.length-e;for(const a of n)r&=s(t,this,a,{start:e,end:e+i-1});return!!r}draw(t,e,i,n){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),yr(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};function Mr(t,e,i,n){const s=t.options,{[i]:r}=t.getProps([i],n);return Math.abs(e-r)<s.radius+s.hitRadius}r(_r,"id","line"),r(_r,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),r(_r,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),r(_r,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t});var wr=class extends ys{constructor(t){super(),r(this,"parsed",void 0),r(this,"skip",void 0),r(this,"stop",void 0),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:s,y:r}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(e-r,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Mr(this,t,"x",e)}inYRange(t,e){return Mr(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!We(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Be(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}};function kr(t,e){const{x:i,y:n,base:s,width:r,height:a}=t.getProps(["x","y","base","width","height"],e);let o,l,h,c,u;return t.horizontal?(u=a/2,o=Math.min(i,s),l=Math.max(i,s),h=n-u,c=n+u):(u=r/2,o=i-u,l=i+u,h=Math.min(n,s),c=Math.max(n,s)),{left:o,top:h,right:l,bottom:c}}function Sr(t,e,i,n){return t?0:re(e,i,n)}function Pr(t){const e=kr(t),i=e.right-e.left,n=e.bottom-e.top,s=function(t,e,i){const n=t.options.borderWidth,s=t.borderSkipped,r=ii(n);return{t:Sr(s.top,r.top,0,i),r:Sr(s.right,r.right,0,e),b:Sr(s.bottom,r.bottom,0,i),l:Sr(s.left,r.left,0,e)}}(t,i/2,n/2),r=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,r=ni(s),a=Math.min(e,i),o=t.borderSkipped,l=n||mt(s);return{topLeft:Sr(!l||o.top||o.left,r.topLeft,0,a),topRight:Sr(!l||o.top||o.right,r.topRight,0,a),bottomLeft:Sr(!l||o.bottom||o.left,r.bottomLeft,0,a),bottomRight:Sr(!l||o.bottom||o.right,r.bottomRight,0,a)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:r},inner:{x:e.left+s.l,y:e.top+s.t,w:i-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,r.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(s.b,s.r))}}}}function Or(t,e,i,n){const s=null===e,r=null===i,a=t&&!(s&&r)&&kr(t,n);return a&&(s||ae(e,a.left,a.right))&&(r||ae(i,a.top,a.bottom))}function Dr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ar(t,e,i={}){const n=t.x!==i.x?-e:0,s=t.y!==i.y?-e:0,r=(t.x+t.w!==i.x+i.w?e:0)-n,a=(t.y+t.h!==i.y+i.h?e:0)-s;return{x:t.x+n,y:t.y+s,w:t.w+r,h:t.h+a,radius:t.radius}}r(wr,"id","point"),r(wr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),r(wr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Cr=class extends ys{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:s,outer:r}=Pr(this),a=(o=r.radius).topLeft||o.topRight||o.bottomLeft||o.bottomRight?Ke:Dr;var o;t.save(),r.w===s.w&&r.h===s.h||(t.beginPath(),a(t,Ar(r,e,s)),t.clip(),a(t,Ar(s,-e,r)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,Ar(s,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Or(this,t,e,i)}inXRange(t,e){return Or(this,t,null,e)}inYRange(t,e){return Or(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+n)/2:e,y:s?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}};r(Cr,"id","bar"),r(Cr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),r(Cr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Er={average(t){if(!t.length)return!1;let e,i,n=new Set,s=0,r=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n.add(t.x),s+=t.y,++r}}return 0!==r&&0!==n.size&&{x:[...n].reduce(((t,e)=>t+e))/n.size,y:s/r}},nearest(t,e){if(!t.length)return!1;let i,n,s,r=e.x,a=e.y,o=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=ee(e,n.getCenterPoint());t<o&&(o=t,s=n)}}if(s){const t=s.tooltipPosition();r=t.x,a=t.y}return{x:r,y:a}}};function Tr(t,e){return e&&(bt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Lr(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Rr(t,e){const{element:i,datasetIndex:n,index:s}=e,r=t.getDatasetMeta(n).controller,{label:a,value:o}=r.getLabelAndValue(s);return{chart:t,label:a,parsed:r.getParsed(s),raw:t.data.datasets[n].data[s],formattedValue:o,dataset:r.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function Ir(t,e){const i=t.chart.ctx,{body:n,footer:s,title:r}=t,{boxWidth:a,boxHeight:o}=e,l=ri(e.bodyFont),h=ri(e.titleFont),c=ri(e.footerFont),u=r.length,d=s.length,f=n.length,g=si(e.padding);let p=g.height,b=0,m=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(m+=t.beforeBody.length+t.afterBody.length,u&&(p+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),m){p+=f*(e.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(m-f)*l.lineHeight+(m-1)*e.bodySpacing}d&&(p+=e.footerMarginTop+d*c.lineHeight+(d-1)*e.footerSpacing);let x=0;const v=function(t){b=Math.max(b,i.measureText(t).width+x)};return i.save(),i.font=h.string,wt(t.title,v),i.font=l.string,wt(t.beforeBody.concat(t.afterBody),v),x=e.displayColors?a+2+e.boxPadding:0,wt(n,(t=>{wt(t.before,v),wt(t.lines,v),wt(t.after,v)})),x=0,i.font=c.string,wt(t.footer,v),i.restore(),b+=g.width,{width:b,height:p}}function Fr(t,e,i,n){const{x:s,width:r}=i,{width:a,chartArea:{left:o,right:l}}=t;let h="center";return"center"===n?h=s<=(o+l)/2?"left":"right":s<=r/2?h="left":s>=a-r/2&&(h="right"),function(t,e,i,n){const{x:s,width:r}=n,a=i.caretSize+i.caretPadding;return"left"===t&&s+r+a>e.width||"right"===t&&s-r-a<0||void 0}(h,t,e,i)&&(h="center"),h}function zr(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||Fr(t,e,i,n),yAlign:n}}function Nr(t,e,i,n){const{caretSize:s,caretPadding:r,cornerRadius:a}=t,{xAlign:o,yAlign:l}=i,h=s+r,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:f}=ni(a);let g=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,o);const p=function(t,e,i){let{y:n,height:s}=t;return"top"===e?n+=i:n-="bottom"===e?s+i:s/2,n}(e,l,h);return"center"===l?"left"===o?g+=h:"right"===o&&(g-=h):"left"===o?g-=Math.max(c,d)+s:"right"===o&&(g+=Math.max(u,f)+s),{x:re(g,0,n.width-e.width),y:re(p,0,n.height-e.height)}}function jr(t,e,i){const n=si(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Vr(t){return Tr([],Lr(t))}function Br(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}var Wr={beforeTitle:ft,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:ft,beforeBody:ft,beforeLabel:ft,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return pt(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:ft,afterBody:ft,beforeFooter:ft,footer:ft,afterFooter:ft};function Hr(t,e,i,n){const s=t[e].call(i,n);return void 0===s?Wr[e].call(i,n):s}var $r=class extends ys{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,s=new an(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,oi(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=Hr(i,"beforeTitle",this,t),s=Hr(i,"title",this,t),r=Hr(i,"afterTitle",this,t);let a=[];return a=Tr(a,Lr(n)),a=Tr(a,Lr(s)),a=Tr(a,Lr(r)),a}getBeforeBody(t,e){return Vr(Hr(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return wt(t,(t=>{const e={before:[],lines:[],after:[]},s=Br(i,t);Tr(e.before,Lr(Hr(s,"beforeLabel",this,t))),Tr(e.lines,Hr(s,"label",this,t)),Tr(e.after,Lr(Hr(s,"afterLabel",this,t))),n.push(e)})),n}getAfterBody(t,e){return Vr(Hr(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=Hr(i,"beforeFooter",this,t),s=Hr(i,"footer",this,t),r=Hr(i,"afterFooter",this,t);let a=[];return a=Tr(a,Lr(n)),a=Tr(a,Lr(s)),a=Tr(a,Lr(r)),a}_createItems(t){const e=this._active,i=this.chart.data,n=[],s=[],r=[];let a,o,l=[];for(a=0,o=e.length;a<o;++a)l.push(Rr(this.chart,e[a]));return t.filter&&(l=l.filter(((e,n,s)=>t.filter(e,n,s,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),wt(l,(e=>{const i=Br(t.callbacks,e);n.push(Hr(i,"labelColor",this,e)),s.push(Hr(i,"labelPointStyle",this,e)),r.push(Hr(i,"labelTextColor",this,e))})),this.labelColors=n,this.labelPointStyles=s,this.labelTextColors=r,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let s,r=[];if(n.length){const t=Er[i.position].call(this,n,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const e=this._size=Ir(this,i),a=Object.assign({},t,e),o=zr(this.chart,i,a),l=Nr(i,a,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=r,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const s=this.getCaretPosition(t,i,n);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:s}=this,{caretSize:r,cornerRadius:a}=i,{topLeft:o,topRight:l,bottomLeft:h,bottomRight:c}=ni(a),{x:u,y:d}=t,{width:f,height:g}=e;let p,b,m,x,v,y;return"center"===s?(v=d+g/2,"left"===n?(p=u,b=p-r,x=v+r,y=v-r):(p=u+f,b=p+r,x=v-r,y=v+r),m=p):(b="left"===n?u+Math.max(o,h)+r:"right"===n?u+f-Math.max(l,c)-r:this.caretX,"top"===s?(x=d,v=x-r,p=b-r,m=b+r):(x=d+g,v=x+r,p=b+r,m=b-r),y=x),{x1:p,x2:b,x3:m,y1:x,y2:v,y3:y}}drawTitle(t,e,i){const n=this.title,s=n.length;let r,a,o;if(s){const l=Yi(i.rtl,this.x,this.width);for(t.x=jr(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",r=ri(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=r.string,o=0;o<s;++o)e.fillText(n[o],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,o+1===s&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,n,s){const r=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:o,boxWidth:l}=s,h=ri(s.bodyFont),c=jr(this,"left",s),u=n.x(c),d=o<h.lineHeight?(h.lineHeight-o)/2:0,f=e.y+d;if(s.usePointStyle){const e={radius:Math.min(l,o)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},i=n.leftForLtr(u,l)+l/2,h=f+o/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Be(t,e,i,h),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Be(t,e,i,h)}else{t.lineWidth=mt(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const e=n.leftForLtr(u,l),i=n.leftForLtr(n.xPlus(u,1),l-2),a=ni(r.borderRadius);Object.values(a).some((t=>0!==t))?(t.beginPath(),t.fillStyle=s.multiKeyBackground,Ke(t,{x:e,y:f,w:l,h:o,radius:a}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Ke(t,{x:i,y:f+1,w:l-2,h:o-2,radius:a}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,f,l,o),t.strokeRect(e,f,l,o),t.fillStyle=r.backgroundColor,t.fillRect(i,f+1,l-2,o-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:s,bodyAlign:r,displayColors:a,boxHeight:o,boxWidth:l,boxPadding:h}=i,c=ri(i.bodyFont);let u=c.lineHeight,d=0;const f=Yi(i.rtl,this.x,this.width),g=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+s},p=f.textAlign(r);let b,m,x,v,y,_,M;for(e.textAlign=r,e.textBaseline="middle",e.font=c.string,t.x=jr(this,p,i),e.fillStyle=i.bodyColor,wt(this.beforeBody,g),d=a&&"right"!==p?"center"===r?l/2+h:l+2+h:0,v=0,_=n.length;v<_;++v){for(b=n[v],m=this.labelTextColors[v],e.fillStyle=m,wt(b.before,g),x=b.lines,a&&x.length&&(this._drawColorBox(e,t,v,f,i),u=Math.max(c.lineHeight,o)),y=0,M=x.length;y<M;++y)g(x[y]),u=c.lineHeight;wt(b.after,g)}d=0,u=c.lineHeight,wt(this.afterBody,g),t.y-=s}drawFooter(t,e,i){const n=this.footer,s=n.length;let r,a;if(s){const o=Yi(i.rtl,this.x,this.width);for(t.x=jr(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=o.textAlign(i.footerAlign),e.textBaseline="middle",r=ri(i.footerFont),e.fillStyle=i.footerColor,e.font=r.string,a=0;a<s;++a)e.fillText(n[a],o.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:s,yAlign:r}=this,{x:a,y:o}=t,{width:l,height:h}=i,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:f}=ni(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+c,o),"top"===r&&this.drawCaret(t,e,i,n),e.lineTo(a+l-u,o),e.quadraticCurveTo(a+l,o,a+l,o+u),"center"===r&&"right"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+l,o+h-f),e.quadraticCurveTo(a+l,o+h,a+l-f,o+h),"bottom"===r&&this.drawCaret(t,e,i,n),e.lineTo(a+d,o+h),e.quadraticCurveTo(a,o+h,a,o+h-d),"center"===r&&"left"===s&&this.drawCaret(t,e,i,n),e.lineTo(a,o+c),e.quadraticCurveTo(a,o,a+c,o),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,s=i&&i.y;if(n||s){const i=Er[t.position].call(this,this._active,this._eventPosition);if(!i)return;const r=this._size=Ir(this,t),a=Object.assign({},i,this._size),o=zr(e,t,a),l=Nr(t,a,o,e);n._to===l.x&&s._to===l.y||(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=r.width,this.height=r.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const r=si(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,n,e),function(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}(t,e.textDirection),s.y+=r.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),s=!kt(i,n),r=this._positionChanged(n,e);(s||r)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,s=this._active||[],r=this._getActiveElements(t,s,e,i),a=this._positionChanged(r,t),o=e||!kt(r,s)||a;return o&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),o}_getActiveElements(t,e,i,n){const s=this.options;if("mouseout"===t.type)return[];if(!n)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const r=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:s}=this,r=Er[s.position].call(this,t,e);return!1!==r&&(i!==r.x||n!==r.y)}};r($r,"positioners",Er);var Yr={id:"tooltip",_element:$r,positioners:Er,afterInit(t,e,i){i&&(t.tooltip=new $r({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:Wr},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function Ur(t,e,i,n){const s=t.indexOf(e);return-1===s?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):s!==t.lastIndexOf(e)?i:s}function Xr(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}var qr=class extends Cs{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(pt(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:re(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Ur(i,t,yt(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let r=t;r<=e;r++)n.push({value:r});return n}getLabelForValue(t){return Xr.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};function Gr(t,e){const i=[],{bounds:n,step:s,min:r,max:a,precision:o,count:l,maxTicks:h,maxDigits:c,includeBounds:u}=t,d=s||1,f=h-1,{min:g,max:p}=e,b=!pt(r),m=!pt(a),x=!pt(l),v=(p-g)/(c+1);let y,_,M,w,k=qt((p-g)/f/d)*d;if(k<1e-14&&!b&&!m)return[{value:g},{value:p}];w=Math.ceil(p/k)-Math.floor(g/k),w>f&&(k=qt(w*k/f/d)*d),pt(o)||(y=Math.pow(10,o),k=Math.ceil(k*y)/y),"ticks"===n?(_=Math.floor(g/k)*k,M=Math.ceil(p/k)*k):(_=g,M=p),b&&m&&s&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-r)/s,k/1e3)?(w=Math.round(Math.min((a-r)/k,h)),k=(a-r)/w,_=r,M=a):x?(_=b?r:_,M=m?a:M,w=l-1,k=(M-_)/w):(w=(M-_)/k,w=Xt(w,Math.round(w),k/1e3)?Math.round(w):Math.ceil(w));const S=Math.max(Qt(k),Qt(_));y=Math.pow(10,pt(o)?S:o),_=Math.round(_*y)/y,M=Math.round(M*y)/y;let P=0;for(b&&(u&&_!==r?(i.push({value:r}),_<r&&P++,Xt(Math.round((_+P*k)*y)/y,r,Kr(r,v,t))&&P++):_<r&&P++);P<w;++P){const t=Math.round((_+P*k)*y)/y;if(m&&t>a)break;i.push({value:t})}return m&&u&&M!==a?i.length&&Xt(i[i.length-1].value,a,Kr(a,v,t))?i[i.length-1].value=a:i.push({value:a}):m&&M!==a||i.push({value:M}),i}function Kr(t,e,{horizontal:i,minRotation:n}){const s=Zt(n),r=(i?Math.sin(s):Math.cos(s))||.001,a=.75*e*(""+t).length;return Math.min(e/r,a)}r(qr,"id","category"),r(qr,"defaults",{ticks:{callback:Xr}});var Zr=class extends Cs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return pt(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:s}=this;const r=t=>n=e?n:t,a=t=>s=i?s:t;if(t){const t=Ut(n),e=Ut(s);t<0&&e<0?a(0):t>0&&e>0&&r(0)}if(n===s){let e=0===s?1:Math.abs(.05*s);a(s+e),t||r(n-e)}this.min=n,this.max=s}getTickLimit(){let t,{maxTicksLimit:e,stepSize:i}=this.options.ticks;return i?(t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),e=e||11),e&&(t=Math.min(e,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Gr({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&Kt(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return De(t,this.chart.options.locale,this.options.ticks.format)}},Jr=class extends Zr{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=xt(t)?t:0,this.max=xt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Zt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};r(Jr,"id","linear"),r(Jr,"defaults",{ticks:{callback:Ce.formatters.numeric}});var Qr=t=>Math.floor(Yt(t)),ta=(t,e)=>Math.pow(10,Qr(t)+e);function ea(t){return t/Math.pow(10,Qr(t))==1}function ia(t,e,i){const n=Math.pow(10,i),s=Math.floor(t/n);return Math.ceil(e/n)-s}function na(t,{min:e,max:i}){e=vt(t.min,e);const n=[],s=Qr(e);let r=function(t,e){let i=Qr(e-t);for(;ia(t,e,i)>10;)i++;for(;ia(t,e,i)<10;)i--;return Math.min(i,Qr(t))}(e,i),a=r<0?Math.pow(10,Math.abs(r)):1;const o=Math.pow(10,r),l=s>r?Math.pow(10,s):0,h=Math.round((e-l)*a)/a,c=Math.floor((e-l)/o/10)*o*10;let u=Math.floor((h-c)/Math.pow(10,r)),d=vt(t.min,Math.round((l+c+u*Math.pow(10,r))*a)/a);for(;d<i;)n.push({value:d,major:ea(d),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(r++,u=2,a=r>=0?1:a),d=Math.round((l+c+u*Math.pow(10,r))*a)/a;const f=vt(t.max,d);return n.push({value:f,major:ea(f),significand:u}),n}var sa=class extends Cs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Zr.prototype.parse.apply(this,[t,e]);if(0!==i)return xt(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=xt(t)?Math.max(0,t):null,this.max=xt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!xt(this._userMin)&&(this.min=t===ta(this.min,0)?ta(this.min,-1):ta(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const s=e=>i=t?i:e,r=t=>n=e?n:t;i===n&&(i<=0?(s(1),r(10)):(s(ta(i,-1)),r(ta(n,1)))),i<=0&&s(ta(n,-1)),n<=0&&r(ta(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=na({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&Kt(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":De(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Yt(t),this._valueRange=Yt(this.max)-Yt(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Yt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};function ra(t){const e=t.ticks;if(e.display&&t.display){const t=si(e.backdropPadding);return yt(e.font&&e.font.size,Fe.font.size)+t.height}return 0}function aa(t,e,i,n,s){return t===n||t===s?{start:e-i/2,end:e+i/2}:t<n||t>s?{start:e-i,end:e}:{start:e,end:e+i}}function oa(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],s=[],r=t._pointLabels.length,a=t.options.pointLabels,o=a.centerPointLabels?zt/r:0;for(let u=0;u<r;u++){const r=a.setContext(t.getPointLabelContext(u));s[u]=r.padding;const d=t.getPointPosition(u,t.drawingArea+s[u],o),f=ri(r.font),g=(l=t.ctx,h=f,c=bt(c=t._pointLabels[u])?c:[c],{w:Ne(l,h.string,c),h:c.length*h.lineHeight});n[u]=g;const p=ne(t.getIndexAngle(u)+o),b=Math.round(Jt(p));la(i,e,p,aa(b,d.x,g.w,0,180),aa(b,d.y,g.h,90,270))}var l,h,c;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const n=[],s=t._pointLabels.length,r=t.options,{centerPointLabels:a,display:o}=r.pointLabels,l={extra:ra(r)/2,additionalAngle:a?zt/s:0};let h;for(let c=0;c<s;c++){l.padding=i[c],l.size=e[c];const s=ha(t,c,l);n.push(s),"auto"===o&&(s.visible=ca(s,h),s.visible&&(h=s))}return n}(t,n,s)}function la(t,e,i,n,s){const r=Math.abs(Math.sin(i)),a=Math.abs(Math.cos(i));let o=0,l=0;n.start<e.l?(o=(e.l-n.start)/r,t.l=Math.min(t.l,e.l-o)):n.end>e.r&&(o=(n.end-e.r)/r,t.r=Math.max(t.r,e.r+o)),s.start<e.t?(l=(e.t-s.start)/a,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function ha(t,e,i){const n=t.drawingArea,{extra:s,additionalAngle:r,padding:a,size:o}=i,l=t.getPointPosition(e,n+s+a,r),h=Math.round(Jt(ne(l.angle+Wt))),c=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(l.y,o.h,h),u=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(h),d=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(l.x,o.w,u);return{visible:!0,x:l.x,y:c,textAlign:u,left:d,top:c,right:d+o.w,bottom:c+o.h}}function ca(t,e){if(!e)return!0;const{left:i,top:n,right:s,bottom:r}=t;return!(We({x:i,y:n},e)||We({x:i,y:r},e)||We({x:s,y:n},e)||We({x:s,y:r},e))}function ua(t,e,i){const{left:n,top:s,right:r,bottom:a}=i,{backdropColor:o}=e;if(!pt(o)){const i=ni(e.borderRadius),l=si(e.backdropPadding);t.fillStyle=o;const h=n-l.left,c=s-l.top,u=r-n+l.width,d=a-s+l.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),Ke(t,{x:h,y:c,w:u,h:d,radius:i}),t.fill()):t.fillRect(h,c,u,d)}}function da(t,e,i,n){const{ctx:s}=t;if(i)s.arc(t.xCenter,t.yCenter,e,0,Nt);else{let i=t.getPointPosition(0,e);s.moveTo(i.x,i.y);for(let r=1;r<n;r++)i=t.getPointPosition(r,e),s.lineTo(i.x,i.y)}}r(sa,"id","logarithmic"),r(sa,"defaults",{ticks:{callback:Ce.formatters.logarithmic,major:{enabled:!0}}});var fa=class extends Zr{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=si(ra(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=xt(t)&&!isNaN(t)?t:0,this.max=xt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ra(this.options))}generateTickLabels(t){Zr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=Mt(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?oa(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){return ne(t*(Nt/(this._pointLabels.length||1))+Zt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(pt(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(pt(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return oi(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-Wt+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:s}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),da(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n,border:s}=e,r=this._pointLabels.length;let a,o,l;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let s=e-1;s>=0;s--){const e=t._pointLabelItems[s];if(!e.visible)continue;const r=n.setContext(t.getPointLabelContext(s));ua(i,r,e);const a=ri(r.font),{x:o,y:l,textAlign:h}=e;Ge(i,t._pointLabels[s],o,l+a.lineHeight/2,a,{color:r.color,textAlign:h,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){o=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),a=n.setContext(i),l=s.setContext(i);!function(t,e,i,n,s){const r=t.ctx,a=e.circular,{color:o,lineWidth:l}=e;!a&&!n||!o||!l||i<0||(r.save(),r.strokeStyle=o,r.lineWidth=l,r.setLineDash(s.dash||[]),r.lineDashOffset=s.dashOffset,r.beginPath(),da(t,i,a,n),r.closePath(),r.stroke(),r.restore())}(this,a,o,r,l)}})),i.display){for(t.save(),a=r-1;a>=0;a--){const n=i.setContext(this.getPointLabelContext(a)),{color:s,lineWidth:r}=n;r&&s&&(t.lineWidth=r,t.strokeStyle=s,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,o=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(a,o),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let s,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,a)=>{if(0===a&&this.min>=0&&!e.reverse)return;const o=i.setContext(this.getContext(a)),l=ri(o.font);if(s=this.getDistanceFromCenterForValue(this.ticks[a].value),o.showLabelBackdrop){t.font=l.string,r=t.measureText(n.label).width,t.fillStyle=o.backdropColor;const e=si(o.backdropPadding);t.fillRect(-r/2-e.left,-s-l.size/2-e.top,r+e.width,l.size+e.height)}Ge(t,n.label,0,-s,l,{color:o.color,strokeColor:o.textStrokeColor,strokeWidth:o.textStrokeWidth})})),t.restore()}drawTitle(){}};r(fa,"id","radialLinear"),r(fa,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ce.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}}),r(fa,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),r(fa,"descriptors",{angleLines:{_fallback:"grid"}});var ga={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}},pa=Object.keys(ga);function ba(t,e){return t-e}function ma(t,e){if(pt(e))return null;const i=t._adapter,{parser:n,round:s,isoWeekday:r}=t._parseOpts;let a=e;return"function"==typeof n&&(a=n(a)),xt(a)||(a="string"==typeof n?i.parse(a,n):i.parse(a)),null===a?null:(s&&(a="week"!==s||!Gt(r)&&!0!==r?i.startOf(a,s):i.startOf(a,"isoWeek",r)),+a)}function xa(t,e,i,n){const s=pa.length;for(let r=pa.indexOf(t);r<s-1;++r){const t=ga[pa[r]],s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(s*t.size))<=n)return pa[r]}return pa[s-1]}function va(t,e,i){if(i){if(i.length){const{lo:n,hi:s}=oe(i,e);t[i[n]>=e?i[n]:i[s]]=!0}}else t[e]=!0}function ya(t,e,i){const n=[],s={},r=e.length;let a,o;for(a=0;a<r;++a)o=e[a],s[o]=a,n.push({value:o,major:!1});return 0!==r&&i?function(t,e,i,n){const s=t._adapter,r=+s.startOf(e[0].value,n),a=e[e.length-1].value;let o,l;for(o=r;o<=a;o=+s.add(o,1,n))l=i[o],l>=0&&(e[l].major=!0);return e}(t,n,s,i):n}var _a=class extends Cs{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),n=this._adapter=new Fn(t.adapters.date);n.init(e),At(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:ma(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:s,minDefined:r,maxDefined:a}=this.getUserBounds();function o(t){r||isNaN(t.min)||(n=Math.min(n,t.min)),a||isNaN(t.max)||(s=Math.max(s,t.max))}r&&a||(o(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||o(this.getMinMax(!1))),n=xt(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),s=xt(s)&&!isNaN(s)?s:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,s-1),this.max=Math.max(n+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const s=this.min,r=function(t,e,i){let n=0,s=t.length;for(;n<s&&t[n]<e;)n++;for(;s>n&&t[s-1]>i;)s--;return n>0||s<t.length?t.slice(n,s):t}(n,s,this.max);return this._unit=e.unit||(i.autoSkip?xa(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):function(t,e,
1i,n,s){for(let r=pa.length-1;r>=pa.indexOf(i);r--){const i=pa[r];if(ga[i].common&&t._adapter.diff(s,n,i)>=e-1)return i}return pa[i?pa.indexOf(i):0]}(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=pa.indexOf(t)+1,i=pa.length;e<i;++e)if(ga[pa[e]].common)return pa[e]}(this._unit):void 0,this.initOffsets(n),t.reverse&&r.reverse(),ya(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t=[]){let e,i,n=0,s=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),s=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;n=re(n,0,r),s=re(s,0,r),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,s=n.time,r=s.unit||xa(s.minUnit,e,i,this._getLabelCapacity(e)),a=yt(n.ticks.stepSize,1),o="week"===r&&s.isoWeekday,l=Gt(o)||!0===o,h={};let c,u,d=e;if(l&&(d=+t.startOf(d,"isoWeek",o)),d=+t.startOf(d,l?"day":r),t.diff(i,e,r)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+r);const f="data"===n.ticks.source&&this.getDataTimestamps();for(c=d,u=0;c<i;c=+t.add(c,a,r),u++)va(h,c,f);return c!==i&&"ticks"!==n.bounds&&1!==u||va(h,c,f),Object.keys(h).sort(ba).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,n=this._unit,s=e||i[n];return this._adapter.format(t,s)}_tickFormatFunction(t,e,i,n){const s=this.options,r=s.ticks.callback;if(r)return Mt(r,[t,e,i],this);const a=s.time.displayFormats,o=this._unit,l=this._majorUnit,h=o&&a[o],c=l&&a[l],u=i[e],d=l&&c&&u&&u.major;return this._adapter.format(t,n||(d?c:h))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=Zt(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(n),r=Math.sin(n),a=this._resolveTickFontOptions(0).size;return{w:i*s+a*r,h:i*r+a*s}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,s=this._tickFormatFunction(t,0,ya(this,[t],this._majorUnit),n),r=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(ma(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return de(t.sort(ba))}};function Ma(t,e,i){let n,s,r,a,o=0,l=t.length-1;i?(e>=t[o].pos&&e<=t[l].pos&&({lo:o,hi:l}=le(t,"pos",e)),({pos:n,time:r}=t[o]),({pos:s,time:a}=t[l])):(e>=t[o].time&&e<=t[l].time&&({lo:o,hi:l}=le(t,"time",e)),({time:n,pos:r}=t[o]),({time:s,pos:a}=t[l]));const h=s-n;return h?r+(a-r)*(e-n)/h:r}r(_a,"id","time"),r(_a,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});var wa=class extends _a{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Ma(e,this.min),this._tableRange=Ma(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],s=[];let r,a,o,l,h;for(r=0,a=t.length;r<a;++r)l=t[r],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(r=0,a=n.length;r<a;++r)h=n[r+1],o=n[r-1],l=n[r],Math.round((h+o)/2)!==l&&s.push({time:l,pos:r/(a-1)});return s}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort(((t,e)=>t-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Ma(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Ma(this._table,i*this._tableRange+this._minPos,!0)}};r(wa,"id","timeseries"),r(wa,"defaults",_a.defaults);var ka="label";function Sa(t,e){"function"==typeof t?t(e):t&&(t.current=e)}function Pa(t,e){t.labels=e}function Oa(t,e,i=ka){const n=[];t.datasets=e.map((e=>{const s=t.datasets.find((t=>t[i]===e[i]));return s&&e.data&&!n.includes(s)?(n.push(s),Object.assign(s,e),s):{...e}}))}function Da(t,e=ka){const i={labels:[],datasets:[]};return Pa(i,t.labels),Oa(i,t.datasets,e),i}function Aa(t,e){const{height:i=150,width:n=300,redraw:s=!1,datasetIdKey:r,type:a,data:o,options:l,plugins:h=[],fallbackContent:c,updateMode:u,...d}=t,f=(0,C.useRef)(null),g=(0,C.useRef)(null),p=()=>
1{f.current&&(g.current=new ar(f.current,{type:a,data:Da(o,r),options:l&&{...l},plugins:h}),Sa(e,g.current))},b=()=>{Sa(e,null),g.current&&(g.current.destroy(),g.current=null)};return(0,C.useEffect)((()=>{!s&&g.current&&l&&function(t,e){const i=t.options;i&&e&&Object.assign(i,e)}(g.current,l)}),[s,l]),(0,C.useEffect)((()=>{!s&&g.current&&Pa(g.current.config.data,o.labels)}),[s,o.labels]),(0,C.useEffect)((()=>{!s&&g.current&&o.datasets&&Oa(g.current.config.data,o.datasets,r)}),[s,o.datasets]),(0,C.useEffect)((()=>{g.current&&(s?(b(),setTimeout(p)):g.current.update(u))}),[s,l,o.labels,o.datasets,u]),(0,C.useEffect)((()=>{g.current&&(b(),setTimeout(p))}),[a]),(0,C.useEffect)((()=>(p(),()=>b())),[]),(0,T.jsx)("canvas",{ref:f,role:"img",height:i,width:n,...d,children:c})}var Ca=(0,C.forwardRef)(Aa);function Ea(t,e){return ar.register(e),(0,C.forwardRef)(((e,i)=>(0,T.jsx)(Ca,{...e,ref:i,type:t})))}var Ta=Ea("doughnut",An);ar.register(dr,Yr);var La=({searchId:t,timingStats:e})=>{const[i,n]=(0,C.useState)(!1);return i?(0,T.jsxs)("div",{className:"box box--shadow margin-top margin-bottom",style:{position:"relative"},children:[(0,T.jsxs)("p",{children:["Search ID:"," ",(0,T.jsx)("a",{href:"/admin/searches/"+t,target:"_blank",rel:"noreferrer",children:t})]}),(0,T.jsx)("a",{style:{position:"absolute",top:"20px",right:"20px"},onClick:()=>n(!1),children:"Hide"}),(0,T.jsxs)("div",{style:{display:"flex",gap:"20px"},children:[(0,T.jsx)("div",{style:{flexGrow:1},children:(0,T.jsx)(Ta,{height:200,data:{labels:Object.keys(e.checkpoints),datasets:[{data:Object.values(e.checkpoints),backgroundColor:(0,L.default)({count:Object.keys(e.checkpoints).length,lightMin:50}).map((t=>t.hex()))}]},options:{plugins:{legend:{display:!1},tooltip:{callbacks:{label:t=>t.formattedValue+"ms"}}}}})}),(0,T.jsx)("div",{children:Object.entries(e.searchers).map((([t,e])=>(0,T.jsxs)("div",{className:"nowrap",children:[t,": ",e,"ms"]},t)))})]})]}):(0,T.jsx)("a",{onClick:()=>n(!0),className:"small margin-top--half",children:"Show timing details (admin only)"})};La.propTypes={searchId:E.default.string};export{La as default};
2//# sourceMappingURL=AdminSearchDetails-Dvd9rd9I.js.map

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