(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32df5a7d"],{"04ca":function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,".ant-card .chart[data-v-4cdb047f]{max-height:300px}.ant-card .chart_dashboard[data-v-4cdb047f]{padding:60px}.ant-card .chart_dashboard .description[data-v-4cdb047f]{width:120px;text-align:center}@media (max-width:512px){.ant-card[data-v-4cdb047f]{margin:10px 0}.ant-card .chart_dashboard[data-v-4cdb047f]{padding:20px}}",""]),t.exports=e},"090e":function(t,e,n){var i=n("04ca");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("499e").default;a("6a85b6b6",i,!0,{sourceMap:!1,shadowMode:!1})},1148:function(t,e,n){"use strict";var i=n("a691"),a=n("1d80");t.exports="".repeat||function(t){var e=String(a(this)),n="",r=i(t);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}},"30ef":function(t,e,n){ /*! * Chart.js v2.9.4 * https://www.chartjs.org * (c) 2020 Chart.js Contributors * Released under the MIT License */ (function(e,i){t.exports=i(function(){try{return n("c1df")}catch(t){}}())})(0,(function(t){"use strict";function e(t,e){return e={exports:{}},t(e,e.exports),e.exports}function n(t){return t&&t["default"]||t}t=t&&t.hasOwnProperty("default")?t["default"]:t;var i={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},a=e((function(t){var e={};for(var n in i)i.hasOwnProperty(n)&&(e[i[n]]=n);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}function l(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}a.rgb.hsl=function(t){var e,n,i,a=t[0]/255,r=t[1]/255,o=t[2]/255,s=Math.min(a,r,o),l=Math.max(a,r,o),u=l-s;return l===s?e=0:a===l?e=(r-o)/u:r===l?e=2+(o-a)/u:o===l&&(e=4+(a-r)/u),e=Math.min(60*e,360),e<0&&(e+=360),i=(s+l)/2,n=l===s?0:i<=.5?u/(l+s):u/(2-l-s),[e,100*n,100*i]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),c=u-Math.min(o,s,l),d=function(t){return(u-t)/6/c+.5};return 0===c?a=r=0:(r=c/u,e=d(o),n=d(s),i=d(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2],r=a.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(n,i));return i=1-1/255*Math.max(e,Math.max(n,i)),[r,100*o,100*i]},a.rgb.cmyk=function(t){var e,n,i,a,r=t[0]/255,o=t[1]/255,s=t[2]/255;return a=Math.min(1-r,1-o,1-s),e=(1-r-a)/(1-a)||0,n=(1-o-a)/(1-a)||0,i=(1-s-a)/(1-a)||0,[100*e,100*n,100*i,100*a]},a.rgb.keyword=function(t){var n=e[t];if(n)return n;var a,r=1/0;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o],u=l(t,s);u.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var a=.4124*e+.3576*n+.1805*i,r=.2126*e+.7152*n+.0722*i,o=.0193*e+.1192*n+.9505*i;return[100*a,100*r,100*o]},a.rgb.lab=function(t){var e,n,i,r=a.rgb.xyz(t),o=r[0],s=r[1],l=r[2];return o/=95.047,s/=100,l/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,l=l>.008856?Math.pow(l,1/3):7.787*l+16/116,e=116*s-16,n=500*(o-s),i=200*(s-l),[e,n,i]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return r=255*l,[r,r,r];n=l<.5?l*(1+s):l+s-l*s,e=2*l-n,a=[0,0,0];for(var u=0;u<3;u++)i=o+1/3*-(u-1),i<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e,n,i=t[0],a=t[1]/100,r=t[2]/100,o=a,s=Math.max(r,.01);return r*=2,a*=r<=1?r:2-r,o*=s<=1?s:2-s,n=(r+a)/2,e=0===r?2*o/(s+o):2*a/(r+a),[i,100*e,100*n]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,e=(2-r)*s,n=r*s,n/=e<=1?e:2-e,n=n||0,i/=2,[a,100*n,100*i]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,c=t[2]/100,d=u+c;switch(d>1&&(u/=d,c/=d),e=Math.floor(6*l),n=1-c,i=6*l-e,0!==(1&e)&&(i=1-i),a=u+i*(n-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a;break}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100,s=t[3]/100;return e=1-Math.min(1,a*(1-s)+s),n=1-Math.min(1,r*(1-s)+s),i=1-Math.min(1,o*(1-s)+s),[255*e,255*n,255*i]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return e=3.2406*a+-1.5372*r+-.4986*o,n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,e=Math.min(Math.max(0,e),1),n=Math.min(Math.max(0,n),1),i=Math.min(Math.max(0,i),1),[255*e,255*n,255*i]},a.xyz.lab=function(t){var e,n,i,a=t[0],r=t[1],o=t[2];return a/=95.047,r/=100,o/=108.883,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,e=116*r-16,n=500*(a-r),i=200*(r-o),[e,n,i]},a.lab.xyz=function(t){var e,n,i,a=t[0],r=t[1],o=t[2];n=(a+16)/116,e=r/500+n,i=n-o/200;var s=Math.pow(n,3),l=Math.pow(e,3),u=Math.pow(i,3);return n=s>.008856?s:(n-16/116)/7.787,e=l>.008856?l:(e-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,e*=95.047,n*=100,i*=108.883,[e,n,i]},a.lab.lch=function(t){var e,n,i,a=t[0],r=t[1],o=t[2];return e=Math.atan2(o,r),n=360*e/2/Math.PI,n<0&&(n+=360),i=Math.sqrt(r*r+o*o),[a,i,n]},a.lch.lab=function(t){var e,n,i,a=t[0],r=t[1],o=t[2];return i=o/360*2*Math.PI,e=r*Math.cos(i),n=r*Math.sin(i),[a,e,n]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(r=Math.round(r/50),0===r)return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];if(e===n&&n===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var a=16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5);return a},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var n=.5*(1+~~(t>50)),i=(1&e)*n*255,a=(e>>1&1)*n*255,r=(e>>2&1)*n*255;return[i,a,r]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;t-=16;var i=Math.floor(t/36)/5*255,a=Math.floor((n=t%36)/6)/5*255,r=n%6/5*255;return[i,a,r]},a.rgb.hex=function(t){var e=((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2])),n=e.toString(16).toUpperCase();return"000000".substring(n.length)+n},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16),a=i>>16&255,r=i>>8&255,o=255&i;return[a,r,o]},a.rgb.hcg=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.max(Math.max(i,a),r),s=Math.min(Math.min(i,a),r),l=o-s;return e=l<1?s/(1-l):0,n=l<=0?0:o===i?(a-r)/l%6:o===a?2+(r-i)/l:4+(i-a)/l+4,n/=6,n%=1,[360*n,100*l,100*e]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return i=n<.5?2*e*n:2*e*(1-n),i<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a=[0,0,0],r=e%1*6,o=r%1,s=1-o,l=0;switch(Math.floor(r)){case 0:a[0]=1,a[1]=o,a[2]=0;break;case 1:a[0]=s,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=o;break;case 3:a[0]=0,a[1]=s,a[2]=1;break;case 4:a[0]=o,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=s}return l=(1-n)*i,[255*(n*a[0]+l),255*(n*a[1]+l),255*(n*a[2]+l)]},a.hcg.hsv=function(t){var e=t[1]/100,n=t[2]/100,i=e+n*(1-e),a=0;return i>0&&(a=e/i),[t[0],100*a,100*i]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100,i=n*(1-e)+.5*e,a=0;return i>0&&i<.5?a=e/(2*i):i>=.5&&i<1&&(a=e/(2*(1-i))),[t[0],100*a,100*i]},a.hcg.hwb=function(t){var e=t[1]/100,n=t[2]/100,i=e+n*(1-e);return[t[0],100*(i-e),100*(1-i)]},a.hwb.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1-n,a=i-e,r=0;return a<1&&(r=(i-a)/(1-a)),[t[0],100*a,100*r]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=(e<<16)+(e<<8)+e,i=n.toString(16).toUpperCase();return"000000".substring(i.length)+i},a.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}}));a.rgb,a.hsl,a.hsv,a.hwb,a.cmyk,a.xyz,a.lab,a.lch,a.hex,a.keyword,a.ansi16,a.ansi256,a.hcg,a.apple,a.gray;function r(){for(var t={},e=Object.keys(a),n=e.length,i=0;i1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}function f(t){var e=function(e){if(void 0===e||null===e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"===typeof n)for(var i=n.length,a=0;a=0&&e<1?L(Math.round(255*e)):"")}function M(t,e){return e<1||t[3]&&t[3]<1?C(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function C(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function S(t,e){if(e<1||t[3]&&t[3]<1)return P(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"}function P(t,e){var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgba("+n+"%, "+i+"%, "+a+"%, "+(e||t[3]||1)+")"}function D(t,e){return e<1||t[3]&&t[3]<1?A(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function A(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function T(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function O(t){return F[t.slice(0,3)]}function I(t,e,n){return Math.min(Math.max(e,t),n)}function L(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var F={};for(var R in p)F[p[R]]=R;var N=function(t){return t instanceof N?t:this instanceof N?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"===typeof t?(e=m.getRgba(t),e?this.setValues("rgb",e):(e=m.getHsla(t))?this.setValues("hsl",e):(e=m.getHwb(t))&&this.setValues("hwb",e)):"object"===typeof t&&(e=t,void 0!==e.r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new N(t);var e};N.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t%=360,t=t<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return m.hexString(this.values.rgb)},rgbString:function(){return m.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return m.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return m.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return m.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return m.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return m.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return m.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;nn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(299*t[0]+587*t[1]+114*t[2])/1e3;return e<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,i=t,a=void 0===e?.5:e,r=2*a-1,o=n.alpha()-i.alpha(),s=((r*o===-1?r:(r+o)/(1+r*o))+1)/2,l=1-s;return this.rgb(s*n.red()+l*i.red(),s*n.green()+l*i.green(),s*n.blue()+l*i.blue()).alpha(n.alpha()*a+i.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new N,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],e={}.toString.call(t),"[object Array]"===e?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},N.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},N.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},N.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i=0;a--)e.call(n,t[a],a);else for(a=0;a=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2===(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var 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:function(t){return 1-V.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*V.easeInBounce(2*t):.5*V.easeOutBounce(2*t-1)+.5}},H={effects:V};W.easingEffects=V;var j=Math.PI,q=j/180,U=2*j,Y=j/2,$=j/4,G=2*j/3,X={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,c=n+a-o;t.moveTo(e,l),se.left-n&&t.xe.top-n&&t.y0&&t.requestAnimationFrame()},advance:function(){var t,e,n,i,a=this.animations,r=0;while(r=n?(ct.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},wt=ct.options.resolve,kt=["push","pop","shift","splice","unshift"];function Mt(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),kt.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return ct.each(t._chartjs.listeners,(function(t){"function"===typeof t[n]&&t[n].apply(t,e)})),a}})})))}function Ct(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(kt.forEach((function(e){delete t[e]})),delete t._chartjs)}}var St=function(t,e){this.initialize(t,e)};ct.extend(St.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.chart,i=n.scales,a=t.getDataset(),r=n.options.scales;null!==e.xAxisID&&e.xAxisID in i&&!a.xAxisID||(e.xAxisID=a.xAxisID||r.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in i&&!a.yAxisID||(e.yAxisID=a.yAxisID||r.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&Ct(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,i=n.getMeta(),a=n.getDataset().data||[],r=i.data;for(t=0,e=a.length;ti&&t.insertElements(i,a-i)},insertElements:function(t,e){for(var n=0;na?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function Tt(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+Dt,At(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=Dt,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+Dt,n.startAngle,!0),a=0;as)a-=Dt;while(a=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/Dt)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+Dt,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;tt.x&&(e=qt(e,"left","right")):t.basen?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function $t(t){var e=jt(t),n=e.right-e.left,i=e.bottom-e.top,a=Yt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}function Gt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&jt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}J._set("global",{elements:{rectangle:{backgroundColor:Vt,borderColor:Vt,borderSkipped:"bottom",borderWidth:0}}});var Xt=bt.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=$t(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return Gt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return Ht(n)?Gt(n,t,null):Gt(n,null,e)},inXRange:function(t){return Gt(this._view,t,null)},inYRange:function(t){return Gt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return Ht(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return Ht(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),Kt={},Zt=It,Jt=Rt,Qt=Wt,te=Xt;Kt.Arc=Zt,Kt.Line=Jt,Kt.Point=Qt,Kt.Rectangle=te;var ee=ct._deprecated,ne=ct.valueOrDefault;function ie(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a0?Math.min(o,Math.abs(i-n)):o,n=i;return o}function ae(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=ct.isNullOrUndef(r)?ie(e.scale,e.pixels):-1;return ct.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}function re(t,e,n){var i,a,r=e.pixels,o=r[t],s=t>0?r[t-1]:null,l=t=0&&m.min>=0?m.min:m.max,_=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,w=p.length;if(b||void 0===b&&void 0!==y)for(i=0;i=0&&u.max>=0?u.max:u.min,(m.min<0&&r<0||m.max>=0&&r>0)&&(x+=r))}return o=h.getPixelForValue(x),s=h.getPixelForValue(x+_),l=s-o,void 0!==v&&Math.abs(l)=0&&!f||_<0&&f?o-v:o+v),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a=this,r="flex"===i.barThickness?re(e,n,i):ae(e,n,i),o=a.getStackIndex(t,a.getMeta().stack),s=r.start+r.chunk*o+r.chunk/2,l=Math.min(ne(i.maxBarThickness,1/0),r.chunk*r.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}},draw:function(){var t=this,e=t.chart,n=t._getValueScale(),i=t.getMeta().data,a=t.getDataset(),r=i.length,o=0;for(ct.canvas.clipArea(e.ctx,e.chartArea);o=de?-he:b<-de?he:0;var y=b+m,x=Math.cos(b),_=Math.sin(b),w=Math.cos(y),k=Math.sin(y),M=b<=0&&y>=0||y>=he,C=b<=fe&&y>=fe||y>=he+fe,S=b===-de||y>=de,P=b<=-fe&&y>=-fe||y>=de+fe,D=S?-1:Math.min(x,x*p,w,w*p),A=P?-1:Math.min(_,_*p,k,k*p),T=M?1:Math.max(x,x*p,w,w*p),O=C?1:Math.max(_,_*p,k,k*p);u=(T-D)/2,c=(O-A)/2,d=-(T+D)/2,h=-(O+A)/2}for(i=0,a=g.length;i0&&!isNaN(t)?he*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=this,c=0,d=u.chart;if(!t)for(e=0,n=d.data.datasets.length;ec?s:c,c=l>c?l:c);return c},setHoverStyle:function(t){var e=t._model,n=t._options,i=ct.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=ce(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=ce(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=ce(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n0&&be(u[t-1]._model,l)&&(n.controlPointPreviousX=c(n.controlPointPreviousX,l.left,l.right),n.controlPointPreviousY=c(n.controlPointPreviousY,l.top,l.bottom)),t0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return Re(t,e,{intersect:!1})},point:function(t,e){var n=Te(e,t);return Ie(t,n)},nearest:function(t,e,n){var i=Te(e,t);n.axis=n.axis||"xy";var a=Fe(n.axis);return Le(t,i,n.intersect,a)},x:function(t,e,n){var i=Te(e,t),a=[],r=!1;return Oe(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Te(e,t),a=[],r=!1;return Oe(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},Ee=ct.extend;function ze(t,e){return ct.where(t,(function(t){return t.pos===e}))}function Be(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function We(t){var e,n,i,a=[];for(e=0,n=(t||[]).length;e div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n",Je=Object.freeze({__proto__:null,default:Ze}),Qe=n(Je),tn="$chartjs",en="chartjs-",nn=en+"size-monitor",an=en+"render-monitor",rn=en+"render-animation",on=["animationstart","webkitAnimationStart"],sn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ln(t,e){var n=ct.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}function un(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[tn]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=ln(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=ln(t,"height");void 0!==r&&(t.height=o)}return t}var cn=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(n){}return t}(),dn=!!cn&&{passive:!0};function hn(t,e,n){t.addEventListener(e,n,dn)}function fn(t,e,n){t.removeEventListener(e,n,dn)}function gn(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function pn(t,e){var n=sn[t.type]||t.type,i=ct.getRelativePosition(t,e);return gn(n,e,i.x,i.y,t)}function mn(t,e){var n=!1,i=[];return function(){i=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,ct.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,i)})))}}function vn(t){var e=document.createElement("div");return e.className=t||"",e}function bn(t){var e=1e6,n=vn(nn),i=vn(nn+"-expand"),a=vn(nn+"-shrink");i.appendChild(vn()),a.appendChild(vn()),n.appendChild(i),n.appendChild(a),n._reset=function(){i.scrollLeft=e,i.scrollTop=e,a.scrollLeft=e,a.scrollTop=e};var r=function(){n._reset(),t()};return hn(i,"scroll",r.bind(i,"expand")),hn(a,"scroll",r.bind(a,"shrink")),n}function yn(t,e){var n=t[tn]||(t[tn]={}),i=n.renderProxy=function(t){t.animationName===rn&&e()};ct.each(on,(function(e){hn(t,e,i)})),n.reflow=!!t.offsetParent,t.classList.add(an)}function xn(t){var e=t[tn]||{},n=e.renderProxy;n&&(ct.each(on,(function(e){fn(t,e,n)})),delete e.renderProxy),t.classList.remove(an)}function _n(t,e,n){var i=t[tn]||(t[tn]={}),a=i.resizer=bn(mn((function(){if(i.resizer){var a=n.options.maintainAspectRatio&&t.parentNode,r=a?a.clientWidth:0;e(gn("resize",n)),a&&a.clientWidth0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index-1?t.split("\n"):t}function Fn(t){var e=t._xScale,n=t._yScale||t._scale,i=t._index,a=t._datasetIndex,r=t._chart.getDatasetMeta(a).controller,o=r._getIndexScale(),s=r._getValueScale();return{xLabel:e?e.getLabelForIndex(i,a):"",yLabel:n?n.getLabelForIndex(i,a):"",label:o?""+o.getLabelForIndex(i,a):"",value:s?""+s.getLabelForIndex(i,a):"",index:i,datasetIndex:a,x:t._model.x,y:t._model.y}}function Rn(t){var e=J.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:An(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:An(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:An(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:An(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:An(t.titleFontStyle,e.defaultFontStyle),titleFontSize:An(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:An(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:An(t.footerFontStyle,e.defaultFontStyle),footerFontSize:An(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Nn(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,c=e.bodyFontSize,d=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*c,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*d,i+=l?(l-1)*e.footerSpacing:0;var h=0,f=function(t){a=Math.max(a,n.measureText(t).width+h)};return n.font=ct.fontString(u,e._titleFontStyle,e._titleFontFamily),ct.each(e.title,f),n.font=ct.fontString(c,e._bodyFontStyle,e._bodyFontFamily),ct.each(e.beforeBody.concat(e.afterBody),f),h=e.displayColors?c+2:0,ct.each(r,(function(t){ct.each(t.before,f),ct.each(t.lines,f),ct.each(t.after,f)})),h=0,n.font=ct.fontString(d,e._footerFontStyle,e._footerFontFamily),ct.each(e.footer,f),a+=2*e.xPadding,{width:a,height:i}}function En(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,c="center",d="center";s.yl.height-e.height&&(d="bottom");var h=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===d?(n=function(t){return t<=h},i=function(t){return t>h}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(c="left",a(s.x)&&(c="center",d=o(s.y))):i(s.x)&&(c="right",r(s.x)&&(c="center",d=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:c,yAlign:g.yAlign?g.yAlign:d}}function zn(t,e,n,i){var a=t.x,r=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,c=n.yAlign,d=o+s,h=l+s;return"right"===u?a-=e.width:"center"===u&&(a-=e.width/2,a+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===c?r+=d:r-="bottom"===c?e.height+d:e.height/2,"center"===c?"left"===u?a+=d:"right"===u&&(a-=d):"left"===u?a-=h:"right"===u&&(a+=h),{x:a,y:r}}function Bn(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Wn(t){return In([],Ln(t))}var Vn=bt.extend({initialize:function(){this._model=Rn(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=In(o,Ln(i)),o=In(o,Ln(a)),o=In(o,Ln(r)),o},getBeforeBody:function(){return Wn(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return ct.each(t,(function(t){var r={before:[],lines:[],after:[]};In(r.before,Ln(i.beforeLabel.call(n,t,e))),In(r.lines,i.label.call(n,t,e)),In(r.after,Ln(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return Wn(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=In(r,Ln(n)),r=In(r,Ln(i)),r=In(r,Ln(a)),r},update:function(t){var e,n,i=this,a=i._options,r=i._model,o=i._model=Rn(a),s=i._active,l=i._data,u={xAlign:r.xAlign,yAlign:r.yAlign},c={x:r.x,y:r.y},d={width:r.width,height:r.height},h={x:r.caretX,y:r.caretY};if(s.length){o.opacity=1;var f=[],g=[];h=On[a.position].call(i,s,i._eventPosition);var p=[];for(e=0,n=s.length;e0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,ct.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),ct.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e=this,n=e._options,i=!1;return e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:(e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),n.reverse&&e._active.reverse()),i=!ct.arrayEquals(e._active,e._lastActive),i&&(e._lastActive=e._active,(n.enabled||n.custom)&&(e._eventPosition={x:t.x,y:t.y},e.update(!0),e.pivot())),i}}),Hn=On,jn=Vn;jn.positioners=Hn;var qn=ct.valueOrDefault;function Un(){return ct.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?ct.merge(e[t][a],[Dn.getScaleDefaults(r),o]):ct.merge(e[t][a],o)}else ct._merger(t,e,n,i)}})}function Yn(){return ct.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||Object.create(null),r=n[t];"scales"===t?e[t]=Un(a,r):"scale"===t?e[t]=ct.merge(a,[Dn.getScaleDefaults(r.type),r]):ct._merger(t,e,n,i)}})}function $n(t){t=t||Object.create(null);var e=t.data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Yn(J.global,J[t.type],t.options||{}),t}function Gn(t){var e=t.options;ct.each(t.scales,(function(e){Xe.removeBox(t,e)})),e=Yn(J.global,J[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Xn(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(ct.findIndex(t,a)>=0);return i}function Kn(t){return"top"===t||"bottom"===t}function Zn(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}J._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Jn=function(t,e){return this.construct(t,e),this};ct.extend(Jn.prototype,{construct:function(t,e){var n=this;e=$n(e);var i=Sn.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=ct.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Jn.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Pn.notify(t,"beforeInit"),ct.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Pn.notify(t,"afterInit"),t},clear:function(){return ct.canvas.clear(this),this},stop:function(){return _t.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(ct.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:ct.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",ct.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Pn.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;ct.each(e.xAxes,(function(t,n){t.id||(t.id=Xn(e.xAxes,"x-axis-",n))})),ct.each(e.yAxes,(function(t,n){t.id||(t.id=Xn(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ct.each(i,(function(e){var i=e.options,r=i.id,o=qn(i.type,e.dtype);Kn(i.position)!==Kn(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)s=n[r],s.options=i,s.ctx=t.ctx,s.chart=t;else{var l=Dn.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),ct.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Dn.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t=0;--n)i.drawDataset(e[n],t);Pn.notify(i,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,i={meta:t,index:t.index,easingValue:e};!1!==Pn.notify(n,"beforeDatasetDraw",[i])&&(t.controller.draw(e),Pn.notify(n,"afterDatasetDraw",[i]))},_drawTooltip:function(t){var e=this,n=e.tooltip,i={tooltip:n,easingValue:t};!1!==Pn.notify(e,"beforeTooltipDraw",[i])&&(n.draw(),Pn.notify(e,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return Ne.modes.single(this,t)},getElementsAtEvent:function(t){return Ne.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return Ne.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=Ne.modes[e];return"function"===typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return Ne.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var i=n._meta[e.id];return i||(i=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:t}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e=0;i--){var a=t[i];if(e(a))return a}},ct.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},ct.almostEquals=function(t,e,n){return Math.abs(t-e)=t},ct.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},ct.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},ct.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1},ct.toRadians=function(t){return t*(Math.PI/180)},ct.toDegrees=function(t){return t*(180/Math.PI)},ct._decimalPlaces=function(t){if(ct.isFinite(t)){var e=1,n=0;while(Math.round(t*e)/e!==t)e*=10,n++;return n}},ct.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},ct.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},ct.aliasPixel=function(t){return t%2===0?0:.5},ct._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},ct.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),c=l/(s+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;var d=i*u,h=i*c;return{previous:{x:r.x-d*(o.x-a.x),y:r.y-d*(o.y-a.y)},next:{x:r.x+h*(o.x-a.x),y:r.y+h*(o.y-a.y)}}},ct.EPSILON=Number.EPSILON||1e-14,ct.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,c=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),d=c.length;for(e=0;e0?c[e-1]:null,a=e0?c[e-1]:null,a=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},ct.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},ct.niceNum=function(t,e){var n,i=Math.floor(ct.log10(t)),a=t/Math.pow(10,i);return n=e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10,n*Math.pow(10,i)},ct.requestAnimFrame=function(){return"undefined"===typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),ct.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(ct.getStyle(r,"padding-left")),u=parseFloat(ct.getStyle(r,"padding-top")),c=parseFloat(ct.getStyle(r,"padding-right")),d=parseFloat(ct.getStyle(r,"padding-bottom")),h=o.right-o.left-l-c,f=o.bottom-o.top-u-d;return n=Math.round((n-o.left-l)/h*r.width/e.currentDevicePixelRatio),i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio),{x:n,y:i}},ct.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},ct.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},ct._calculatePadding=function(t,e,n){return e=ct.getStyle(t,e),e.indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},ct._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},ct.getMaximumWidth=function(t){var e=ct._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=ct._calculatePadding(e,"padding-left",n),a=ct._calculatePadding(e,"padding-right",n),r=n-i-a,o=ct.getConstraintWidth(t);return isNaN(o)?r:Math.min(r,o)},ct.getMaximumHeight=function(t){var e=ct._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=ct._calculatePadding(e,"padding-top",n),a=ct._calculatePadding(e,"padding-bottom",n),r=n-i-a,o=ct.getConstraintHeight(t);return isNaN(o)?r:Math.min(r,o)},ct.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},ct.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!==typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},ct.fontString=function(t,e,n){return e+" "+t+"px "+n},ct.longestText=function(t,e,n,i){i=i||{};var a=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,c,d=0,h=n.length;for(o=0;on.length){for(o=0;oi&&(i=r),i},ct.numberOfLabelLines=function(t){var e=1;return ct.each(t,(function(t){ct.isArray(t)&&t.length>e&&(e=t.length)})),e},ct.color=E?function(t){return t instanceof CanvasGradient&&(t=J.global.defaultColor),E(t)}:function(t){return console.error("Color.js not found!"),t},ct.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:ct.color(t).saturate(.5).darken(.1).rgbString()}};function ei(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function ni(t){this.options=t||{}}ct.extend(ni.prototype,{formats:ei,parse:ei,format:ei,add:ei,diff:ei,startOf:ei,endOf:ei,_create:function(t){return t}}),ni.override=function(t){ct.extend(ni.prototype,t)};var ii=ni,ai={_date:ii},ri={formatters:{values:function(t){return ct.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=ct.log10(Math.abs(i)),r="";if(0!==t){var o=Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]));if(o<1e-4){var s=ct.log10(Math.abs(t)),l=Math.floor(s)-Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toExponential(l)}else{var u=-1*Math.floor(a);u=Math.max(Math.min(u,20),0),r=t.toFixed(u)}}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(ct.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},oi=ct.isArray,si=ct.isNullOrUndef,li=ct.valueOrDefault,ui=ct.valueAtIndexOrDefault;function ci(t,e){for(var n=[],i=t.length/e,a=0,r=t.length;al+u)))return o}function hi(t,e){ct.each(t,(function(t){var n,i=t.gc,a=i.length/2;if(a>e){for(n=0;nu)return r;return Math.max(u,1)}function _i(t){var e,n,i=[];for(e=0,n=t.length;e=h||c<=1||!s.isHorizontal()?s.labelRotation=d:(t=s._getLabelSizes(),e=t.widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),a=l.offset?s.maxWidth/c:i/(c-1),e+6>a&&(a=i/(c-(l.offset?.5:1)),r=s.maxHeight-gi(l.gridLines)-u.padding-pi(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=ct.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(d,Math.min(h,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){ct.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){ct.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=gi(o)+pi(r)),u?s&&(e.height=gi(o)+pi(r)):e.height=t.maxHeight,a.display&&s){var c=vi(a),d=t._getLabelSizes(),h=d.first,f=d.last,g=d.widest,p=d.highest,m=.4*c.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,y=ct.toRadians(t.labelRotation),x=Math.cos(y),_=Math.sin(y),w=_*g.width+x*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+w+v);var k,M,C=t.getPixelForTick(0)-t.left,S=t.right-t.getPixelForTick(t.getTicks().length-1);b?(k=l?x*h.width+_*h.offset:_*(h.height-h.offset),M=l?_*(f.height-f.offset):x*f.width+_*f.offset):(k=h.width/2,M=f.width/2),t.paddingLeft=Math.max((k-C)*t.width/(t.width-C),0)+3,t.paddingRight=Math.max((M-S)*t.width/(t.width-S),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=h.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){ct.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(si(t))return NaN;if(("number"===typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;ni-1?null:e.getPixelForDecimal(t*a+(n?a/2:0))},getPixelForDecimal:function(t){var e=this;return e._reversePixels&&(t=1-t),e._startPixel+t*e._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,i,a,r=this,o=r.options.ticks,s=r._length,l=o.maxTicksLimit||s/r._tickSize()+1,u=o.major.enabled?_i(t):[],c=u.length,d=u[0],h=u[c-1];if(c>l)return wi(t,u,c/l),bi(t);if(i=xi(u,t,s,l),c>0){for(e=0,n=c-1;e1?(h-d)/(c-1):null,ki(t,i,ct.isNullOrUndef(a)?0:d-a,d),ki(t,i,h,ct.isNullOrUndef(a)?t.length:h+a),bi(t)}return ki(t,i),bi(t)},_tickSize:function(){var t=this,e=t.options.ticks,n=ct.toRadians(t.labelRotation),i=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),r=t._getLabelSizes(),o=e.autoSkipPadding||0,s=r?r.widest.width+o:0,l=r?r.highest.height+o:0;return t.isHorizontal()?l*i>s*a?s/i:l/a:l*a=0&&(o=t)),void 0!==r&&(t=n.indexOf(r),t>=0&&(s=t)),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this,e=t._getLabels(),n=t.minIndex,i=t.maxIndex;t.ticks=0===n&&i===e.length-1?e:e.slice(n,i+1)},getLabelForIndex:function(t,e){var n=this,i=n.chart;return i.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(i.data.datasets[e].data[t]):n._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;Ci.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return Si(e)||Si(n)||(t=o.chart.data.datasets[n].data[e]),Si(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=ct.valueOrDefault(i,t),r=a.indexOf(t),e=-1!==r?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this,n=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(n,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}}),Ai=Pi;Di._defaults=Ai;var Ti=ct.noop,Oi=ct.isNullOrUndef;function Ii(t,e){var n,i,a,r,o=[],s=1e-14,l=t.stepSize,u=l||1,c=t.maxTicks-1,d=t.min,h=t.max,f=t.precision,g=e.min,p=e.max,m=ct.niceNum((p-g)/c/u)*u;if(mc&&(m=ct.niceNum(r*m/c/u)*u),l||Oi(f)?n=Math.pow(10,ct._decimalPlaces(m)):(n=Math.pow(10,f),m=Math.ceil(m*n)/n),i=Math.floor(g/m)*m,a=Math.ceil(p/m)*m,l&&(!Oi(d)&&ct.almostWhole(d/m,m/1e3)&&(i=d),!Oi(h)&&ct.almostWhole(h/m,m/1e3)&&(a=h)),r=(a-i)/m,r=ct.almostEquals(r,Math.round(r),m/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Oi(d)?i:d);for(var v=1;v0&&a>0&&(t.min=0)}var r=void 0!==n.min||void 0!==n.suggestedMin,o=void 0!==n.max||void 0!==n.suggestedMax;void 0!==n.min?t.min=n.min:void 0!==n.suggestedMin&&(null===t.min?t.min=n.suggestedMin:t.min=Math.min(t.min,n.suggestedMin)),void 0!==n.max?t.max=n.max:void 0!==n.suggestedMax&&(null===t.max?t.max=n.suggestedMax:t.max=Math.max(t.max,n.suggestedMax)),r!==o&&t.min>=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,n.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this,n=e.options.ticks,i=n.stepSize,a=n.maxTicksLimit;return i?t=Math.ceil(e.max/i)-Math.floor(e.min/i)+1:(t=e._computeTickLimit(),a=a||11),a&&(t=Math.min(a,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Ti,buildTicks:function(){var t=this,e=t.options,n=e.ticks,i=t.getTickLimit();i=Math.max(2,i);var a={maxTicks:i,min:n.min,max:n.max,precision:n.precision,stepSize:ct.valueOrDefault(n.fixedStepSize,n.stepSize)},r=t.ticks=Ii(a,t);t.handleDirectionalChanges(),t.max=ct.max(r),t.min=ct.min(r),n.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),Ci.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,a=e.max;Ci.prototype._configure.call(e),e.options.offset&&n.length&&(t=(a-i)/Math.max(n.length-1,1)/2,i-=t,a+=t),e._startValue=i,e._endValue=a,e._valueRange=a-i}}),Fi={position:"left",ticks:{callback:ri.formatters.linear}},Ri=0,Ni=1;function Ei(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}function zi(t,e,n,i){var a,r,o=t.options,s=o.stacked,l=Ei(e,s,n),u=l.pos,c=l.neg,d=i.length;for(a=0;ae.length-1?null:this.getPixelForValue(e[t])}}),Vi=Fi;Wi._defaults=Vi;var Hi=ct.valueOrDefault,ji=ct.math.log10;function qi(t,e){var n,i,a=[],r=Hi(t.min,Math.pow(10,Math.floor(ji(e.min)))),o=Math.floor(ji(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(ji(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(ji(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),++i,10===i&&(i=1,++n,l=n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n=0?t:e}var $i=Ci.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,c=o.isHorizontal();function d(t){return c?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var h=s.stacked;if(void 0===h)for(t=0;t0){var e=ct.min(t),n=ct.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(ji(t.max))):t.minNotZero=n)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Yi(e.min),max:Yi(e.max)},a=t.ticks=qi(i,t);t.max=ct.max(a),t.min=ct.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),Ci.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(ji(t)),n=Math.floor(t/Math.pow(10,e));return n*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;Ci.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Hi(t.options.ticks.fontSize,J.global.defaultFontSize)/t._length),t._startValue=ji(e),t._valueOffset=n,t._valueRange=(ji(t.max)-ji(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return t=+e.getRightValue(t),t>e.min&&t>0&&(n=(ji(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Gi=Ui;$i._defaults=Gi;var Xi=ct.valueOrDefault,Ki=ct.valueAtIndexOrDefault,Zi=ct.options.resolve,Ji={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:ri.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Qi(t){var e=t.ticks;return e.display&&t.display?Xi(e.fontSize,J.global.defaultFontSize)+2*e.backdropPaddingY:0}function ta(t,e,n){return ct.isArray(n)?{w:ct.longestText(t,t.font,n),h:n.length*e}:{w:t.measureText(n).width,h:e}}function ea(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:ta?{start:e-n,end:e}:{start:e,end:e+n}}function na(t){var e,n,i,a=ct.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s=t.chart.data.labels.length;for(e=0;er.r&&(r.r=c.end,o.r=l),d.startr.b&&(r.b=d.end,o.b=l)}t.setReductions(t.drawingArea,r,o)}function ia(t){return 0===t||180===t?"center":t<180?"left":"right"}function aa(t,e,n,i){var a,r,o=n.y+i/2;if(ct.isArray(e))for(a=0,r=e.length;a270||t<90)&&(n.y-=e.h)}function oa(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Qi(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=ct.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),c=Ki(i.fontColor,s,J.global.defaultFontColor);e.fillStyle=c;var d=t.getIndexAngle(s),h=ct.toDegrees(d);e.textAlign=ia(h),ra(h,t._pointLabelSizes[s],u),aa(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}function sa(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=Ki(e.color,i-1),u=Ki(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var c=1;c0&&i>0?n:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=Xi(s.lineWidth,o.lineWidth),u=Xi(s.color,o.color);if(r.pointLabels.display&&oa(i),o.display&&ct.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),sa(i,o,e,n))})),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(Zi([s.borderDash,o.borderDash,[]])),a.lineDashOffset=Zi([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options,i=n.ticks;if(i.display){var a,r,o=t.getIndexAngle(0),s=ct.options._parseFont(i),l=Xi(i.fontColor,J.global.defaultFontColor);e.save(),e.font=s.string,e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",ct.each(t.ticks,(function(n,o){(0!==o||i.reverse)&&(a=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]),i.showLabelBackdrop&&(r=e.measureText(n).width,e.fillStyle=i.backdropColor,e.fillRect(-r/2-i.backdropPaddingX,-a-s.size/2-i.backdropPaddingY,r+2*i.backdropPaddingX,s.size+2*i.backdropPaddingY)),e.fillStyle=l,e.fillText(n,0,-a))})),e.restore()}},_drawTitle:ct.noop}),ca=Ji;ua._defaults=ca;var da=ct._deprecated,ha=ct.options.resolve,fa=ct.valueOrDefault,ga=Number.MIN_SAFE_INTEGER||-9007199254740991,pa=Number.MAX_SAFE_INTEGER||9007199254740991,ma={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}},va=Object.keys(ma);function ba(t,e){return t-e}function ya(t){var e,n,i,a={},r=[];for(e=0,n=t.length;ee&&s=0&&o<=s){if(i=o+s>>1,a=t[i-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}function Ma(t,e,n,i){var a=ka(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function Ca(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"===typeof a&&(o=a(o)),ct.isFinite(o)||(o="string"===typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!==typeof r||(o=r(e),ct.isFinite(o)||(o=n.parse(o))),o)}function Sa(t,e){if(ct.isNullOrUndef(e))return null;var n=t.options.time,i=Ca(t,t.getRightValue(e));return null===i||n.round&&(i=+t._adapter.startOf(i,n.round)),i}function Pa(t,e,n,i){var a,r,o,s=va.length;for(a=va.indexOf(t);a=va.indexOf(n);r--)if(o=va[r],ma[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return va[n?va.indexOf(n):0]}function Aa(t){for(var e=va.indexOf(t)+1,n=va.length;e1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=d;a=0&&(e[r].major=!0);return e}function La(t,e,n){var i,a,r=[],o={},s=e.length;for(i=0;i1?ya(g).sort(ba):g.sort(ba),h=Math.min(h,g[0]),f=Math.max(f,g[g.length-1])),h=Sa(s,xa(c))||h,f=Sa(s,_a(c))||f,h=h===pa?+u.startOf(Date.now(),d):h,f=f===ga?+u.endOf(Date.now(),d)+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,c=[],d=i.getLabelCapacity(a),h=s.source,f=o.distribution;for(u="data"===h||"auto"===h&&"series"===f?u.data:"labels"===h?u.labels:Ta(i,a,r,d),"ticks"===o.bounds&&u.length&&(a=u[0],r=u[u.length-1]),a=Sa(i,xa(o))||a,r=Sa(i,_a(o))||r,t=0,e=u.length;t=a&&n<=r&&c.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?Pa(l.minUnit,i.min,i.max,d):Da(i,c.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?Aa(i._unit):void 0,i._table=wa(i._timestamps.data,a,r,f),i._offsets=Oa(i._table,c,a,r,o),s.reverse&&c.reverse(),La(i,c,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t=0&&t0?s:1}}),Na=Fa;Ra._defaults=Na;var Ea={category:Di,linear:Wi,logarithmic:$i,radialLinear:ua,time:Ra},za={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};ai._date.override("function"===typeof t?{_id:"moment",formats:function(){return za},parse:function(e,n){return"string"===typeof e&&"string"===typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),J._set("global",{plugins:{filler:{propagate:!0}}});var Ba={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e),r=a&&i.dataset._children||[],o=r.length||0;return o?function(t,e){return e=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function Va(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePixel&&(r=i.getBasePixel()),void 0!==r&&null!==r){if(void 0!==r.x&&void 0!==r.y)return r;if(ct.isFinite(r))return e=i.isHorizontal(),{x:e?r:null,y:e?null:r}}return null}function Ha(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,c=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a0;--r)ct.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function Ga(t,e,n,i,a,r){var o,s,l,u,c,d,h,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,y=0;for(t.beginPath(),o=0,s=g;o=0;--n)e=l[n].$filler,e&&e.visible&&(i=e.el,a=i._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||J.global.defaultColor,o&&s&&r.length&&(ct.canvas.clipArea(u,t.chartArea),Ga(u,r,o,a,s,i._loop),ct.canvas.unclipArea(u)))}},Ka=ct.rtl.getRtlAdapter,Za=ct.noop,Ja=ct.valueOrDefault;function Qa(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}J._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a,r=document.createElement("ul"),o=t.data.datasets;for(r.setAttribute("class",t.id+"-legend"),e=0,n=o.length;el.width)&&(d+=o+n.padding,c[c.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:r,height:o},c[c.length-1]+=r+n.padding})),l.height+=d}else{var h=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;ct.each(t.legendItems,(function(t,e){var i=Qa(n,o),r=i+o/2+a.measureText(t.text).width;e>0&&v+o+2*h>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,r),v+=o+h,s[e]={left:0,top:0,width:r,height:o}})),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Za,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=J.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var c,d=Ka(e.rtl,t.left,t.minSize.width),h=t.ctx,f=Ja(n.fontColor,i.defaultFontColor),g=ct.options._parseFont(n),p=g.size;h.textAlign=d.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=g.string;var m=Qa(n,p),v=t.legendHitBoxes,b=function(t,e,i){if(!(isNaN(m)||m<=0)){h.save();var o=Ja(i.lineWidth,r.borderWidth);if(h.fillStyle=Ja(i.fillStyle,a),h.lineCap=Ja(i.lineCap,r.borderCapStyle),h.lineDashOffset=Ja(i.lineDashOffset,r.borderDashOffset),h.lineJoin=Ja(i.lineJoin,r.borderJoinStyle),h.lineWidth=o,h.strokeStyle=Ja(i.strokeStyle,a),h.setLineDash&&h.setLineDash(Ja(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=d.xPlus(t,m/2),u=e+p/2;ct.canvas.drawPoint(h,i.pointStyle,s,l,u,i.rotation)}else h.fillRect(d.leftForLtr(t,m),e,m,p),0!==o&&h.strokeRect(d.leftForLtr(t,m),e,m,p);h.restore()}},y=function(t,e,n,i){var a=p/2,r=d.xPlus(t,m+a),o=e+a;h.fillText(n.text,r,o),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(r,o),h.lineTo(d.xPlus(r,i),o),h.stroke())},x=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},_=t.isHorizontal();c=_?{x:t.left+x(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+x(o,s[0]),line:0},ct.rtl.overrideTextDirection(t.ctx,e.textDirection);var w=p+n.padding;ct.each(t.legendItems,(function(e,i){var a=h.measureText(e.text).width,r=m+p/2+a,f=c.x,g=c.y;d.setWidth(t.minSize.width),_?i>0&&f+r+n.padding>t.left+t.minSize.width&&(g=c.y+=w,c.line++,f=c.x=t.left+x(l,u[c.line])):i>0&&g+w>t.top+t.minSize.height&&(f=c.x=f+t.columnWidths[c.line]+n.padding,c.line++,g=c.y=t.top+x(o,s[c.line]));var k=d.x(f);b(k,g,e),v[i].left=d.leftForLtr(k,v[i].width),v[i].top=g,y(k,g,e,a),_?c.x+=r+n.padding:c.y+=w})),ct.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n=i.left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function er(t,e){var n=new tr({ctx:t.ctx,options:e,chart:t});Xe.configure(t,n,e),Xe.addBox(t,n),t.legend=n}var nr={id:"legend",_element:tr,beforeInit:function(t){var e=t.options.legend;e&&er(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(ct.mergeIf(e,J.global.legend),n?(Xe.configure(t,n,e),n.options=e):er(t,e)):n&&(Xe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},ir=ct.noop;J._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var ar=bt.extend({initialize:function(t){var e=this;ct.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:ir,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:ir,beforeSetDimensions:ir,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:ir,beforeBuildLabels:ir,buildLabels:ir,afterBuildLabels:ir,beforeFit:ir,fit:function(){var t,e,n=this,i=n.options,a=n.minSize={},r=n.isHorizontal();i.display?(t=ct.isArray(i.text)?i.text.length:1,e=t*ct.options._parseFont(i).lineHeight+2*i.padding,n.width=a.width=r?n.maxWidth:e,n.height=a.height=r?e:n.maxHeight):n.width=a.width=n.height=a.height=0},afterFit:ir,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=ct.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,c=t.top,d=t.left,h=t.bottom,f=t.right;e.fillStyle=ct.valueOrDefault(n.fontColor,J.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=d+(f-d)/2,r=c+l,i=f-d):(a="left"===n.position?d+l:f-l,r=c+(h-c)/2,i=h-c,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(ct.isArray(g))for(var p=0,m=0;m tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components");this.$data._chart=new c.a(this.$refs.canvas.getContext("2d"),{type:e,data:t,options:n,plugins:this.$data._plugins})}},beforeDestroy:function(){this.$data._chart&&this.$data._chart.destroy()}}}d("bar-chart","bar"),d("horizontalbar-chart","horizontalBar"),d("doughnut-chart","doughnut");var h,f,g=d("line-chart","line"),p=(d("pie-chart","pie"),d("polar-chart","polarArea"),d("radar-chart","radar"),d("bubble-chart","bubble"),d("scatter-chart","scatter"),l.reactiveProp),m={name:"LineChart",extends:g,mixins:[p],props:["options"],data:function(){return{updating:!1}},mounted:function(){this.renderChart(this.chartData,this.options)},watch:{chartData:{deep:!0,handler:function(){var t=this;!this.updating&&this.$data&&this.$data._chart&&(this.updating=!0,this.$data._chart.update(),this.$nextTick((function(){return t.updating=!1})))}}}},v=m,b=n("2877"),y=Object(b["a"])(v,h,f,!1,null,"d506df10",null),x=y.exports,_=function(t,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},_(t,e)};function w(t,e){function n(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function k(t){var e="function"===typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function M(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,a,r=n.call(t),o=[];try{while((void 0===e||e-- >0)&&!(i=r.next()).done)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(a)throw a.error}}return o}function C(){for(var t=[],e=0;e"],t))},t.prototype._getNextDelay=function(){var t=this._options,e=t.reconnectionDelayGrowFactor,n=void 0===e?O.reconnectionDelayGrowFactor:e,i=t.minReconnectionDelay,a=void 0===i?O.minReconnectionDelay:i,r=t.maxReconnectionDelay,o=void 0===r?O.maxReconnectionDelay:r,s=0;return this._retryCount>0&&(s=a*Math.pow(n,this._retryCount-1),s>o&&(s=o)),this._debug("next delay",s),s},t.prototype._wait=function(){var t=this;return new Promise((function(e){setTimeout(e,t._getNextDelay())}))},t.prototype._getNextUrl=function(t){if("string"===typeof t)return Promise.resolve(t);if("function"===typeof t){var e=t();if("string"===typeof e)return Promise.resolve(e);if(e.then)return e}throw Error("Invalid URL")},t.prototype._connect=function(){var t=this;if(!this._connectLock&&this._shouldReconnect){this._connectLock=!0;var e=this._options,n=e.maxRetries,i=void 0===n?O.maxRetries:n,a=e.connectionTimeout,r=void 0===a?O.connectionTimeout:a,o=e.WebSocket,s=void 0===o?A():o;if(this._retryCount>=i)this._debug("max retries reached",this._retryCount,">=",i);else{if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!T(s))throw Error("No valid WebSocket class provided");this._wait().then((function(){return t._getNextUrl(t._url)})).then((function(e){t._closeCalled||(t._debug("connect",{url:e,protocols:t._protocols}),t._ws=t._protocols?new s(e,t._protocols):new s(e),t._ws.binaryType=t._binaryType,t._connectLock=!1,t._addListeners(),t._connectTimeout=setTimeout((function(){return t._handleTimeout()}),r))}))}}},t.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new P(Error("TIMEOUT"),this))},t.prototype._disconnect=function(t,e){if(void 0===t&&(t=1e3),this._clearTimeouts(),this._ws){this._removeListeners();try{this._ws.close(t,e),this._handleClose(new D(t,e,this))}catch(n){}}},t.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},t.prototype._callEventListener=function(t,e){"handleEvent"in e?e.handleEvent(t):e(t)},t.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},t.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},t.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},t}(),L=I,F={name:"DashBoard",components:{LineChart:x},data:function(){return{websocket:null,loading:!0,stat:{},memory_pressure:0,memory_used:"",memory_cached:"",memory_free:"",memory_total:"",cpu_analytic:{datasets:[{label:"cpu user",borderColor:"#36a3eb",backgroundColor:"#36a3eb",pointRadius:0,data:[]},{label:"cpu total",borderColor:"#ff6385",backgroundColor:"#ff6385",pointRadius:0,data:[]}],options:{responsive:!0,maintainAspectRatio:!1,responsiveAnimationDuration:0,elements:{line:{tension:0}},scales:{yAxes:[{ticks:{max:100,min:0,stepSize:20,display:!0}}],xAxes:[{type:"time",time:{unit:"minute"}}]}}},cpu:0,disk_percentage:0,disk_total:"",disk_used:"",uptime:"",loadavg:{}}},created:function(){this.websocket=new L(this.getWebSocketRoot()+"/analytic?token="+btoa(this.$store.state.user.token)),this.websocket.onmessage=this.wsOnMessage,this.websocket.onopen=this.wsOpen;for(var t=new Date,e=0;e<120;e++)this.cpu_analytic.datasets[0].data.push({x:t,y:0}),this.cpu_analytic.datasets[1].data.push({x:t,y:0})},destroyed:function(){this.websocket.close()},methods:{wsOpen:function(){this.websocket.send("ping")},wsOnMessage:function(t){var e=JSON.parse(t.data);this.cpu=e.cpu_system+e.cpu_user;var n=new Date;this.cpu_analytic.datasets[0].data.push({x:n,y:e.cpu_user}),this.cpu_analytic.datasets[1].data.push({x:n,y:this.cpu}),this.cpu_analytic.datasets[0].data.length>120&&(this.cpu_analytic.datasets[0].data.shift(),this.cpu_analytic.datasets[1].data.shift()),this.cpu=this.cpu.toFixed(2),this.memory_pressure=e.memory_pressure,this.memory_used=e.memory_used,this.memory_cached=e.memory_cached,this.memory_free=e.memory_free,this.memory_total=e.memory_total,this.disk_percentage=e.disk_percentage,this.disk_used=e.disk_used,this.disk_total=e.disk_total;var i=Math.floor(e.uptime),a=Math.floor(i/86400);i-=86400*a;var r=Math.floor(i/3600);i-=3600*r,this.uptime=a+"d "+r+"h "+Math.floor(i/60)+"m",this.loadavg=e.loadavg}}},R=F,N=(n("ec10"),Object(b["a"])(R,i,a,!1,null,"4cdb047f",null));e["default"]=N.exports},b680:function(t,e,n){"use strict";var i=n("23e7"),a=n("a691"),r=n("408a"),o=n("1148"),s=n("d039"),l=1..toFixed,u=Math.floor,c=function(t,e,n){return 0===e?n:e%2===1?c(t,e-1,n*t):c(t*t,e/2,n)},d=function(t){var e=0,n=t;while(n>=4096)e+=12,n/=4096;while(n>=2)e+=1,n/=2;return e},h=function(t,e,n){var i=-1,a=n;while(++i<6)a+=e*t[i],t[i]=a%1e7,a=u(a/1e7)},f=function(t,e){var n=6,i=0;while(--n>=0)i+=t[n],t[n]=u(i/e),i=i%e*1e7},g=function(t){var e=6,n="";while(--e>=0)if(""!==n||0===e||0!==t[e]){var i=String(t[e]);n=""===n?i:n+o.call("0",7-i.length)+i}return n},p=l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){l.call({})}));i({target:"Number",proto:!0,forced:p},{toFixed:function(t){var e,n,i,s,l=r(this),u=a(t),p=[0,0,0,0,0,0],m="",v="0";if(u<0||u>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(m="-",l=-l),l>1e-21)if(e=d(l*c(2,69,1))-69,n=e<0?l*c(2,-e,1):l/c(2,e,1),n*=4503599627370496,e=52-e,e>0){h(p,0,n),i=u;while(i>=7)h(p,1e7,0),i-=7;h(p,c(10,i,1),0),i=e-1;while(i>=23)f(p,1<<23),i-=23;f(p,1<0?(s=v.length,v=m+(s<=u?"0."+o.call("0",u-s)+v:v.slice(0,s-u)+"."+v.slice(s-u))):v=m+v,v}})},ec10:function(t,e,n){"use strict";n("090e")}}]);