/*! * Chart.js v2.8.0 * https://www.chartjs.org * (c) 2019 Chart.js Contributors * Released under the MIT License */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Chart=e()}(this,(function(){"use strict";var t={rgb2hsl:e,rgb2hsv:n,rgb2hwb:i,rgb2cmyk:a,rgb2keyword:o,rgb2xyz:s,rgb2lab:l,rgb2lch:function(t){return v(l(t))},hsl2rgb:u,hsl2hsv:function(t){var e=t[0],n=t[1]/100,i=t[2]/100;return 0===i?[0,0,0]:[e,2*(n*=(i*=2)<=1?i:2-i)/(i+n)*100,(i+n)/2*100]},hsl2hwb:function(t){return i(u(t))},hsl2cmyk:function(t){return a(u(t))},hsl2keyword:function(t){return o(u(t))},hsv2rgb:d,hsv2hsl:function(t){var e,n,i=t[0],a=t[1]/100,r=t[2]/100;return e=a*r,[i,100*(e=(e/=(n=(2-a)*r)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(d(t))},hsv2cmyk:function(t){return a(d(t))},hsv2keyword:function(t){return o(d(t))},hwb2rgb:h,hwb2hsl:function(t){return e(h(t))},hwb2hsv:function(t){return n(h(t))},hwb2cmyk:function(t){return a(h(t))},hwb2keyword:function(t){return o(h(t))},cmyk2rgb:c,cmyk2hsl:function(t){return e(c(t))},cmyk2hsv:function(t){return n(c(t))},cmyk2hwb:function(t){return i(c(t))},cmyk2keyword:function(t){return o(c(t))},keyword2rgb:_,keyword2hsl:function(t){return e(_(t))},keyword2hsv:function(t){return n(_(t))},keyword2hwb:function(t){return i(_(t))},keyword2cmyk:function(t){return a(_(t))},keyword2lab:function(t){return l(_(t))},keyword2xyz:function(t){return s(_(t))},xyz2rgb:f,xyz2lab:m,xyz2lch:function(t){return v(m(t))},lab2xyz:p,lab2rgb:y,lab2lch:v,lch2lab:x,lch2xyz:function(t){return p(x(t))},lch2rgb:function(t){return y(x(t))}};function e(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s==o?e=0:i==s?e=(a-r)/l:a==s?e=2+(r-i)/l:r==s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s==o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]}function n(t){var e,n,i=t[0],a=t[1],r=t[2],o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return n=0==s?0:l/s*1e3/10,s==o?e=0:i==s?e=(a-r)/l:a==s?e=2+(r-i)/l:r==s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,n,s/255*1e3/10]}function i(t){var n=t[0],i=t[1],a=t[2];return[e(t)[0],1/255*Math.min(n,Math.min(i,a))*100,100*(a=1-1/255*Math.max(n,Math.max(i,a)))]}function a(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function o(t){return w[JSON.stringify(t)]}function s(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]}function l(t){var e=s(t),n=e[0],i=e[1],a=e[2];return i/=100,a/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function u(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];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<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}function d(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]}}function h(t){var e,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),i=6*o-(e=Math.floor(6*o)),0!=(1&e)&&(i=1-i),a=s+i*((n=1-l)-s),e){default:case 6:case 0:r=n,g=a,b=s;break;case 1:r=a,g=n,b=s;break;case 2:r=s,g=n,b=a;break;case 3:r=s,g=a,b=n;break;case 4:r=a,g=s,b=n;break;case 5:r=n,g=s,b=a;break}return[255*r,255*g,255*b]}function c(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]}function f(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]}function m(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]}function p(t){var e,n,i,a,r=t[0],o=t[1],s=t[2];return r<=8?a=(n=100*r/903.3)/100*7.787+16/116:(n=100*Math.pow((r+16)/116,3),a=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(o/500+a-16/116)/7.787:95.047*Math.pow(o/500+a,3),n,i=i/108.883<=.008859?i=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3)]}function v(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]}function y(t){return f(p(t))}function x(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]}function _(t){return k[t]}var k={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]},w={};for(var M in k)w[JSON.stringify(k[M])]=M;var S=function(){return new O};for(var D in t){S[D+"Raw"]=function(e){return function(n){return"number"==typeof n&&(n=Array.prototype.slice.call(arguments)),t[e](n)}}(D);var C=/(\w+)2(\w+)/.exec(D),P=C[1],T=C[2];(S[P]=S[P]||{})[T]=S[D]=function(e){return function(n){"number"==typeof n&&(n=Array.prototype.slice.call(arguments));var i=t[e](n);if("string"==typeof i||void 0===i)return i;for(var a=0;a=0&&e<1?H(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?Y(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:Y,percentString:function(t,e){return e<1||t[3]&&t[3]<1?N(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:N,hslString:function(t,e){return e<1||t[3]&&t[3]<1?z(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:z,hwbString:function(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:"")+")"},keyword:function(t){return E[t.slice(0,3)]}};function R(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;rn?(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;return(299*t[0]+587*t[1]+114*t[2])/1e3<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 j,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e&&(a[r]=t));return n}},j.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},j.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},j.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-$.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*$.easeInBounce(2*t):.5*$.easeOutBounce(2*t-1)+.5}},X={effects:$};Z.easingEffects=$;var K=Math.PI,J=K/180,Q=2*K,tt=K/2,et=K/4,nt=2*K/3,it={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,d=n+a-o;t.moveTo(e,l),se.left-n&&t.xe.top-n&&t.y0&&t.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r=n?(ut.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},yt=ut.options.resolve,bt=["push","pop","shift","splice","unshift"];function xt(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||(bt.forEach((function(e){delete t[e]})),delete t._chartjs)}}var _t=function(t,e){this.initialize(t,e)};ut.extend(_t.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=n.yAxisID||t.chart.options.scales.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&&xt(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;ns;)a-=2*Math.PI;for(;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=n.startAngle,a=n.endAngle,r="inner"===n.borderAlign?.33:0;e.save(),e.beginPath(),e.arc(n.x,n.y,Math.max(n.outerRadius-r,0),i,a),e.arc(n.x,n.y,n.innerRadius,a,i,!0),e.closePath(),e.fillStyle=n.backgroundColor,e.fill(),n.borderWidth&&("inner"===n.borderAlign?(e.beginPath(),t=r/n.outerRadius,e.arc(n.x,n.y,n.outerRadius,i-t,a+t),n.innerRadius>r?(t=r/n.innerRadius,e.arc(n.x,n.y,n.innerRadius-r,a+t,i-t,!0)):e.arc(n.x,n.y,r,a+Math.PI/2,i-Math.PI/2),e.closePath(),e.clip(),e.beginPath(),e.arc(n.x,n.y,n.outerRadius,i,a),e.arc(n.x,n.y,n.innerRadius,a,i,!0),e.closePath(),e.lineWidth=2*n.borderWidth,e.lineJoin="round"):(e.lineWidth=n.borderWidth,e.lineJoin="bevel"),e.strokeStyle=n.borderColor,e.stroke()),e.restore()}}),Mt=ut.valueOrDefault,St=ot.global.defaultColor;ot._set("global",{elements:{line:{tension:.4,backgroundColor:St,borderWidth:3,borderColor:St,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var Dt=gt.extend({draw:function(){var t,e,n,i,a=this,r=a._view,o=a._chart.ctx,s=r.spanGaps,l=a._children.slice(),u=ot.global,d=u.elements.line,h=-1;for(a._loop&&l.length&&l.push(l[0]),o.save(),o.lineCap=r.borderCapStyle||d.borderCapStyle,o.setLineDash&&o.setLineDash(r.borderDash||d.borderDash),o.lineDashOffset=Mt(r.borderDashOffset,d.borderDashOffset),o.lineJoin=r.borderJoinStyle||d.borderJoinStyle,o.lineWidth=Mt(r.borderWidth,d.borderWidth),o.strokeStyle=r.borderColor||u.defaultColor,o.beginPath(),h=-1,t=0;t=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}ot._set("global",{elements:{rectangle:{backgroundColor:It,borderColor:It,borderSkipped:"bottom",borderWidth:0}}});var Wt=gt.extend({draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=Ft(t),n=e.right-e.left,i=e.bottom-e.top,a=function(t,e,n){var i,a,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=Rt(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}}(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}}}(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 Lt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return At(n)?Lt(n,t,null):Lt(n,null,e)},inXRange:function(t){return Lt(this._view,t,null)},inYRange:function(t){return Lt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return At(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 At(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}}}),Yt={},Nt=wt,zt=Dt,Vt=Ot,Ht=Wt;Yt.Arc=Nt,Yt.Line=zt,Yt.Point=Vt,Yt.Rectangle=Ht;var Et=ut.options.resolve;ot._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}});var Bt=kt.extend({dataElementType:Yt.Rectangle,initialize:function(){var t,e=this;kt.prototype.initialize.apply(e,arguments),(t=e.getMeta()).stack=e.getDataset().stack,t.bar=!0},update:function(t){var e,n,i=this,a=i.getMeta().data;for(i._ruler=i.getRuler(),e=0,n=a.length;e0?Math.min(o,i-n):o,n=i;return o}(a,d):-1,{min:n,pixels:d,start:l,end:u,stackCount:r,scale:a}},calculateBarValuePixels:function(t,e){var n,i,a,r,o,s,l=this,u=l.chart,d=l.getMeta(),h=l._getValueScale(),c=h.isHorizontal(),f=u.data.datasets,g=+h.getRightValue(f[t].data[e]),m=h.options.minBarLength,p=h.options.stacked,v=d.stack,y=0;if(p||void 0===p&&void 0!==v)for(n=0;n=0&&a>0)&&(y+=a));return r=h.getPixelForValue(y),s=(o=h.getPixelForValue(y+g))-r,void 0!==m&&Math.abs(s)=0&&!c||g<0&&c?r-m:r+m),{size:s,base:r,head:o,center:o+s/2}},calculateBarIndexPixels:function(t,e,n){var i=n.scale.options,a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var r=0;r'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=e.datasets[0],o=a.data[i],s=o&&o.custom||{},l=t.options.elements.arc;return{text:n,fillStyle:qt([s.backgroundColor,r.backgroundColor,l.backgroundColor],void 0,i),strokeStyle:qt([s.borderColor,r.borderColor,l.borderColor],void 0,i),lineWidth:qt([s.borderWidth,r.borderWidth,l.borderWidth],void 0,i),hidden:isNaN(r.data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+g,y={x:Math.cos(p),y:Math.sin(p)},b={x:Math.cos(v),y:Math.sin(v)},x=p<=0&&v>=0||p<=2*Math.PI&&2*Math.PI<=v,_=p<=.5*Math.PI&&.5*Math.PI<=v||p<=2.5*Math.PI&&2.5*Math.PI<=v,k=p<=-Math.PI&&-Math.PI<=v||p<=Math.PI&&Math.PI<=v,w=p<=.5*-Math.PI&&.5*-Math.PI<=v||p<=1.5*Math.PI&&1.5*Math.PI<=v,M=f/100,S={x:k?-1:Math.min(y.x*(y.x<0?1:M),b.x*(b.x<0?1:M)),y:w?-1:Math.min(y.y*(y.y<0?1:M),b.y*(b.y<0?1:M))},D={x:x?1:Math.max(y.x*(y.x>0?1:M),b.x*(b.x>0?1:M)),y:_?1:Math.max(y.y*(y.y>0?1:M),b.y*(b.y>0?1:M))},C={width:.5*(D.x-S.x),height:.5*(D.y-S.y)};u=Math.min(s/C.width,l/C.height),d={x:-.5*(D.x+S.x),y:-.5*(D.y+S.y)}}for(e=0,n=c.length;e0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Zt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Zt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Zt(n.hoverBorderWidth,n.borderWidth)},_resolveElementOptions:function(t,e){var n,i,a,r=this,o=r.chart,s=r.getDataset(),l=t.custom||{},u=o.options.elements.arc,d={},h={chart:o,dataIndex:e,dataset:s,datasetIndex:r.index},c=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(n=0,i=c.length;n0&&Qt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var r=0;r'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=e.datasets[0],o=a.data[i].custom||{},s=t.options.elements.arc;return{text:n,fillStyle:ne([o.backgroundColor,r.backgroundColor,s.backgroundColor],void 0,i),strokeStyle:ne([o.borderColor,r.borderColor,s.borderColor],void 0,i),lineWidth:ne([o.borderWidth,r.borderWidth,s.borderWidth],void 0,i),hidden:isNaN(r.data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ge(t,e,{intersect:!1})},point:function(t,e){return he(t,ue(e,t))},nearest:function(t,e,n){var i=ue(e,t);n.axis=n.axis||"xy";var a=fe(n.axis);return ce(t,i,n.intersect,a)},x:function(t,e,n){var i=ue(e,t),a=[],r=!1;return de(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=ue(e,t),a=[],r=!1;return de(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}};function pe(t,e){return ut.where(t,(function(t){return t.position===e}))}function ve(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i._tmpIndex_-a._tmpIndex_:i.weight-a.weight})),t.forEach((function(t){delete t._tmpIndex_}))}function ye(t,e){ut.each(t,(function(t){e[t.position]+=t.isHorizontal()?t.height:t.width}))}ot._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var be={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],r=a.length,o=0;o div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&xe.default||xe,ke="chartjs-size-monitor",we="chartjs-render-monitor",Me=["animationstart","webkitAnimationStart"],Se={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function De(t,e){var n=ut.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Ce=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}(),Pe=!!Ce&&{passive:!0};function Te(t,e,n){t.addEventListener(e,n,Pe)}function Oe(t,e,n){t.removeEventListener(e,n,Pe)}function Ie(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 Ae(t){var e=document.createElement("div");return e.className=t||"",e}var Fe={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(){this._loaded||(this._loaded=!0,this.disableCSSInjection||function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,_e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return this._ensureLoaded(),n&&n.canvas===t?(function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t.$chartjs={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=De(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=De(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e.$chartjs){var n=e.$chartjs.initial;["height","width"].forEach((function(t){var i=n[t];ut.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)})),ut.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e.$chartjs}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n.$chartjs||(n.$chartjs={}),r=(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=Se[t.type]||t.type,i=ut.getRelativePosition(t,e);return Ie(n,e,i.x,i.y,t)}(e,t))};Te(i,e,r)}else!function(t,e,n){var i,a,r,o,s=t.$chartjs||(t.$chartjs={}),l=s.resizer=function(t){var e=1e6,n=Ae(ke),i=Ae(ke+"-expand"),a=Ae(ke+"-shrink");i.appendChild(Ae()),a.appendChild(Ae()),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 Te(i,"scroll",r.bind(i,"expand")),Te(a,"scroll",r.bind(a,"shrink")),n}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Ie("resize",n)),i&&i.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 Ee(t){var e=ot.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Ne(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Ne(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Ne(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Ne(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Ne(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Ne(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Ne(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Ne(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Ne(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 Be(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function je(t){return Ve([],He(t))}var Ue=gt.extend({initialize:function(){this._model=Ee(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=Ve(o,He(i)),o=Ve(o,He(a)),o=Ve(o,He(r))},getBeforeBody:function(){return je(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return ut.each(t,(function(t){var r={before:[],lines:[],after:[]};Ve(r.before,He(i.beforeLabel.call(n,t,e))),Ve(r.lines,i.label.call(n,t,e)),Ve(r.after,He(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return je(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=Ve(r,He(n)),r=Ve(r,He(i)),r=Ve(r,He(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=Ee(c),m=h._active,p=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},y={x:f.x,y:f.y},b={width:f.width,height:f.height},x={x:f.caretX,y:f.caretY};if(m.length){g.opacity=1;var _=[],k=[];x=ze[c.position].call(h,m,h._eventPosition);var w=[];for(e=0,n=m.length;el.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(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)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,b),y=function(t,e,n,i){var a=t.x,r=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,d=n.yAlign,h=o+s,c=l+s;return"right"===u?a-=e.width:"center"===u&&((a-=e.width/2)+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(g,b,v,h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=y.x,g.y=y.y,g.width=b.width,g.height=b.height,g.caretX=x.x,g.caretY=x.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,m=e.width,p=e.height;if("center"===c)s=g+p/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+m)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+m-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+p)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i=e.title;if(i.length){t.x=Be(e,e._titleAlign),n.textAlign=e._titleAlign,n.textBaseline="top";var a,r,o=e.titleFontSize,s=e.titleSpacing;for(n.fillStyle=e.titleFontColor,n.font=ut.fontString(o,e._titleFontStyle,e._titleFontFamily),a=0,r=i.length;a0&&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,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),(e=!ut.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),Ge=ze,qe=Ue;qe.positioners=Ge;var Ze=ut.valueOrDefault;function $e(){return ut.merge({},[].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?ut.merge(e[t][a],[Ye.getScaleDefaults(r),o]):ut.merge(e[t][a],o)}else ut._merger(t,e,n,i)}})}function Xe(){return ut.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||{},r=n[t];"scales"===t?e[t]=$e(a,r):"scale"===t?e[t]=ut.merge(a,[Ye.getScaleDefaults(r.type),r]):ut._merger(t,e,n,i)}})}function Ke(t){var e=t.options;ut.each(t.scales,(function(e){be.removeBox(t,e)})),e=Xe(ot.global,ot[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Je(t){return"top"===t||"bottom"===t}ot._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 Qe=function(t,e){return this.construct(t,e),this};ut.extend(Qe.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Xe(ot.global,ot[t.type],t.options||{}),t}(e);var i=Le.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=ut.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.chart=n,n.controller=n,Qe.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())},initialize:function(){var t=this;return We.notify(t,"beforeInit"),ut.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),We.notify(t,"afterInit"),t},clear:function(){return ut.canvas.clear(this),this},stop:function(){return vt.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(ut.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:ut.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",ut.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};We.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;ut.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),ut.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),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"}),ut.each(i,(function(e){var i=e.options,r=i.id,o=Ze(i.type,e.dtype);Je(i.position)!==Je(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Ye.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)})),ut.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Ye.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t=this,e=[];return ut.each(t.data.datasets,(function(n,i){var a=t.getDatasetMeta(i),r=n.type||t.config.type;if(a.type&&a.type!==r&&(t.destroyDatasetMeta(i),a=t.getDatasetMeta(i)),a.type=r,a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{var o=le[a.type];if(void 0===o)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new o(t,i),e.push(a.controller)}}),t),e},resetElements:function(){var t=this;ut.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),Ke(e),We._invalidate(e),!1!==We.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();ut.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),e.options.animation&&e.options.animation.duration&&ut.each(n,(function(t){t.reset()})),e.updateDatasets(),e.tooltip.initialize(),e.lastActive=[],We.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var t=this;!1!==We.notify(t,"beforeLayout")&&(be.update(this,this.width,this.height),We.notify(t,"afterScaleUpdate"),We.notify(t,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==We.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);We.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,i=n.getDatasetMeta(t),a={meta:i,index:t,easingValue:e};!1!==We.notify(n,"beforeDatasetDraw",[a])&&(i.controller.draw(e),We.notify(n,"afterDatasetDraw",[a]))},_drawTooltip:function(t){var e=this,n=e.tooltip,i={tooltip:n,easingValue:t};!1!==We.notify(e,"beforeTooltipDraw",[i])&&(n.draw(),We.notify(e,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return me.modes.single(this,t)},getElementsAtEvent:function(t){return me.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return me.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=me.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return me.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}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=ut.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=ut.log10(Math.abs(t));r=t.toExponential(Math.floor(o)-Math.floor(a))}else{var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(ut.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},on=ut.valueOrDefault,sn=ut.valueAtIndexOrDefault;function ln(t){var e,n,i=[];for(e=0,n=t.length;eu&&rt.maxHeight){r--;break}r++,l=o*s}t.labelRotation=r},afterCalculateTickRotation:function(){ut.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){ut.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=ln(t._ticks),i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l=i.position,u=t.isHorizontal(),d=ut.options._parseFont,h=d(a),c=i.gridLines.tickMarkLength;if(e.width=u?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&o.drawTicks?c:0,e.height=u?s&&o.drawTicks?c:0:t.maxHeight,r.display&&s){var f=d(r),g=ut.options.toPadding(r.padding),m=f.lineHeight+g.height;u?e.height+=m:e.width+=m}if(a.display&&s){var p=ut.longestText(t.ctx,h.string,n,t.longestTextCache),v=ut.numberOfLabelLines(n),y=.5*h.size,b=t.options.ticks.padding;if(t._maxLabelLines=v,t.longestLabelWidth=p,u){var x=ut.toRadians(t.labelRotation),_=Math.cos(x),k=Math.sin(x)*p+h.lineHeight*v+y;e.height=Math.min(t.maxHeight,e.height+k+b),t.ctx.font=h.string;var w,M,S=un(t.ctx,n[0],h.string),D=un(t.ctx,n[n.length-1],h.string),C=t.getPixelForTick(0)-t.left,P=t.right-t.getPixelForTick(n.length-1);0!==t.labelRotation?(w="bottom"===l?_*S:_*y,M="bottom"===l?_*y:_*D):(w=S/2,M=D/2),t.paddingLeft=Math.max(w-C,0)+3,t.paddingRight=Math.max(M-P,0)+3}else a.mirror?p=0:p+=b+y,e.width=Math.min(t.maxWidth,e.width+p),t.paddingTop=h.size/2,t.paddingBottom=h.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){ut.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ut.isNullOrUndef(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},getLabelForIndex:ut.noop,getPixelForValue:ut.noop,getValueForPixel:ut.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),a=i*t+e.paddingLeft;n&&(a+=i/2);var r=e.left+a;return r+=e.isFullWidth()?e.margins.left:0}var o=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(o/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+n;return i+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},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=this,a=i.isHorizontal(),r=i.options.ticks.minor,o=t.length,s=!1,l=r.maxTicksLimit,u=i._tickSize()*(o-1),d=a?i.width-(i.paddingLeft+i.paddingRight):i.height-(i.paddingTop+i.PaddingBottom),h=[];for(u>d&&(s=1+Math.floor(u/d)),o>l&&(s=Math.max(s,1+Math.floor(o/l))),e=0;e1&&e%s>0&&delete n.label,h.push(n);return h},_tickSize:function(){var t=this,e=t.isHorizontal(),n=t.options.ticks.minor,i=ut.toRadians(t.labelRotation),a=Math.abs(Math.cos(i)),r=Math.abs(Math.sin(i)),o=n.autoSkipPadding||0,s=t.longestLabelWidth+o||0,l=ut.options._parseFont(n),u=t._maxLabelLines*l.lineHeight+o||0;return e?u*a>s*r?s/a:u/r:u*r0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.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:cn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:ut.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,m=ut.niceNum((g-f)/u/l)*l;if(m<1e-14&&fn(d)&&fn(h))return[f,g];(r=Math.ceil(g/m)-Math.floor(f/m))>u&&(m=ut.niceNum(r*m/u/l)*l),s||fn(c)?n=Math.pow(10,ut._decimalPlaces(m)):(n=Math.pow(10,c),m=Math.ceil(m*n)/n),i=Math.floor(f/m)*m,a=Math.ceil(g/m)*m,s&&(!fn(d)&&ut.almostWhole(d/m,m/1e3)&&(i=d),!fn(h)&&ut.almostWhole(h/m,m/1e3)&&(a=h)),r=(a-i)/m,r=ut.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(fn(d)?i:d);for(var p=1;pt.max)&&(t.max=i))}))}));t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},_computeTickLimit:function(){var t,e=this;return e.isHorizontal()?Math.ceil(e.width/40):(t=ut.options._parseFont(e.options.ticks),Math.ceil(e.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,n=e.start,i=+e.getRightValue(t),a=e.end-n;return e.isHorizontal()?e.left+e.width/a*(i-n):e.bottom-e.height/a*(i-n)},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),i=n?e.width:e.height,a=(n?t-e.left:e.bottom-t)/i;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}}),vn=mn;pn._defaults=vn;var yn=ut.valueOrDefault,bn={position:"left",ticks:{callback:rn.formatters.logarithmic}};function xn(t,e){return ut.isFinite(t)&&t>=0?t:e}var _n=dn.extend({determineDataLimits:function(){var t=this,e=t.options,n=t.chart,i=n.data.datasets,a=t.isHorizontal();function r(e){return a?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var o=e.stacked;if(void 0===o&&ut.each(i,(function(t,e){if(!o){var i=n.getDatasetMeta(e);n.isDatasetVisible(e)&&r(i)&&void 0!==i.stack&&(o=!0)}})),e.stacked||o){var s={};ut.each(i,(function(i,a){var o=n.getDatasetMeta(a),l=[o.type,void 0===e.stacked&&void 0===o.stack?a:"",o.stack].join(".");n.isDatasetVisible(a)&&r(o)&&(void 0===s[l]&&(s[l]=[]),ut.each(i.data,(function(e,n){var i=s[l],a=+t.getRightValue(e);isNaN(a)||o.data[n].hidden||a<0||(i[n]=i[n]||0,i[n]+=a)})))})),ut.each(s,(function(e){if(e.length>0){var n=ut.min(e),i=ut.max(e);t.min=null===t.min?n:Math.min(t.min,n),t.max=null===t.max?i:Math.max(t.max,i)}}))}else ut.each(i,(function(e,i){var a=n.getDatasetMeta(i);n.isDatasetVisible(i)&&r(a)&&ut.each(e.data,(function(e,n){var i=+t.getRightValue(e);isNaN(i)||a.data[n].hidden||i<0||((null===t.min||it.max)&&(t.max=i),0!==i&&(null===t.minNotZero||i0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(ut.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:xn(e.min),max:xn(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=yn(t.min,Math.pow(10,Math.floor(ut.log10(e.min)))),o=Math.floor(ut.log10(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(ut.log10(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(ut.log10(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10==++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(na?{start:e-n,end:e}:{start:e,end:e+n}}function On(t){return 0===t||180===t?"center":t<180?"left":"right"}function In(t,e,n,i){var a,r,o=n.y+i/2;if(ut.isArray(e))for(a=0,r=e.length;a270||t<90)&&(n.y-=e.h)}function Fn(t){return ut.isNumber(t)?t:0}var Rn=gn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Pn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;ut.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);ut.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Pn(this.options))},convertTicksToLabels:function(){var t=this;gn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(t.options.pointLabels.callback,t)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this,e=t.options;e.display&&e.pointLabels.display?function(t){var e,n,i,a=ut.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,l,u,d=Cn(t);for(e=0;er.r&&(r.r=f.end,o.r=h),g.startr.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(t):t.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Fn(a),r=Fn(r),o=Fn(o),s=Fn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){return t*(2*Math.PI/Cn(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,i=n.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+n.xCenter,y:Math.sin(i)*e+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,i=e.ticks;if(e.display){var a=t.ctx,r=this.getIndexAngle(0),o=ut.options._parseFont(i);(e.angleLines.display||e.pointLabels.display)&&function(t){var e=t.ctx,n=t.options,i=n.angleLines,a=n.gridLines,r=n.pointLabels,o=wn(i.lineWidth,a.lineWidth),s=wn(i.color,a.color),l=Pn(n);e.save(),e.lineWidth=o,e.strokeStyle=s,e.setLineDash&&(e.setLineDash(Sn([i.borderDash,a.borderDash,[]])),e.lineDashOffset=Sn([i.borderDashOffset,a.borderDashOffset,0]));var u=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),d=ut.options._parseFont(r);e.font=d.string,e.textBaseline="middle";for(var h=Cn(t)-1;h>=0;h--){if(i.display&&o&&s){var c=t.getPointPosition(h,u);e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(c.x,c.y),e.stroke()}if(r.display){var f=0===h?l/2:0,g=t.getPointPosition(h,u+f+5),m=Mn(r.fontColor,h,ot.global.defaultFontColor);e.fillStyle=m;var p=t.getIndexAngle(h),v=ut.toDegrees(p);e.textAlign=On(v),An(v,t._pointLabelSizes[h],g),In(e,t.pointLabels[h]||"",g,d.lineHeight)}}e.restore()}(t),ut.each(t.ticks,(function(e,s){if(s>0||i.reverse){var l=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(n.display&&0!==s&&function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=Cn(t),l=Mn(e.color,i-1),u=Mn(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 d=1;d=0&&o<=s;){if(a=t[(i=o+s>>1)-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}}(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 jn(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)),ut.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),ut.isFinite(o)||(o=n.parse(o))),o)}function Un(t,e){if(ut.isNullOrUndef(e))return null;var n=t.options.time,i=jn(t,t.getRightValue(e));return null===i||n.round&&(i=+t._adapter.startOf(i,n.round)),i}function Gn(t){for(var e=Vn.indexOf(t)+1,n=Vn.length;e=a&&n<=r&&u.push(n);return i.min=a,i.max=r,i._unit=s.unit||function(t,e,n,i,a){var r,o;for(r=Vn.length-1;r>=Vn.indexOf(n);r--)if(o=Vn[r],zn[o].common&&t._adapter.diff(a,i,o)>=e.length)return o;return Vn[n?Vn.indexOf(n):0]}(i,u,s.minUnit,i.min,i.max),i._majorUnit=Gn(i._unit),i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;ae&&s=0&&t0?o:1}});qn._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var Zn={category:hn,linear:pn,logarithmic:_n,radialLinear:Rn,time:qn},$n=function(t,e){return function(t,e){t.exports=function(){var e,n;function i(){return e.apply(null,arguments)}function a(t){e=t}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}function l(t){return void 0===t}function u(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function d(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function h(t,e){var n,i=[];for(n=0;n>>0,i=0;i0)for(n=0;n0?"future":"past"];return A(n)?n(e):n.replace(/%s/i,e)}var Z={};function $(t,e){var n=t.toLowerCase();Z[n]=Z[n+"s"]=Z[e]=t}function X(t){return"string"==typeof t?Z[t]||Z[t.toLowerCase()]:void 0}function K(t){var e,n,i={};for(n in t)c(t,n)&&(e=X(n))&&(i[e]=t[n]);return i}var J={};function Q(t,e){J[t]=e}function tt(t){var e=[];for(var n in t)e.push({unit:n,priority:J[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}function et(t,e,n){var i=""+Math.abs(t),a=e-i.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+i}var nt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,it=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,at={},rt={};function ot(t,e,n,i){var a=i;"string"==typeof i&&(a=function(){return this[i]()}),t&&(rt[t]=a),e&&(rt[e[0]]=function(){return et(a.apply(this,arguments),e[1],e[2])}),n&&(rt[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function st(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function lt(t){var e,n,i=t.match(nt);for(e=0,n=i.length;e=0&&it.test(t);)t=t.replace(it,i),it.lastIndex=0,n-=1;return t}var ht=/\d/,ct=/\d\d/,ft=/\d{3}/,gt=/\d{4}/,mt=/[+-]?\d{6}/,pt=/\d\d?/,vt=/\d\d\d\d?/,yt=/\d\d\d\d\d\d?/,bt=/\d{1,3}/,xt=/\d{1,4}/,_t=/[+-]?\d{1,6}/,kt=/\d+/,wt=/[+-]?\d+/,Mt=/Z|[+-]\d\d:?\d\d/gi,St=/Z|[+-]\d\d(?::?\d\d)?/gi,Dt=/[+-]?\d+(\.\d{1,3})?/,Ct=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Pt={};function Tt(t,e,n){Pt[t]=A(e)?e:function(t,i){return t&&n?n:e}}function Ot(t,e){return c(Pt,t)?Pt[t](e._strict,e._locale):new RegExp(It(t))}function It(t){return At(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,i,a){return e||n||i||a})))}function At(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Ft={};function Rt(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),u(e)&&(i=function(t,n){n[e]=S(t)}),n=0;n68?1900:2e3)};var Zt,$t=Kt("FullYear",!0);function Xt(){return qt(this.year())}function Kt(t,e){return function(n){return null!=n?(Qt(this,t,n),i.updateOffset(this,e),this):Jt(this,t)}}function Jt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Qt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&qt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),ie(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function te(t){return A(this[t=X(t)])?this[t]():this}function ee(t,e){if("object"==typeof t)for(var n=tt(t=K(t)),i=0;i=0?(s=new Date(t+400,e,n,i,a,r,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,i,a,r,o),s}function xe(t){var e;if(t<100&&t>=0){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function _e(t,e,n){var i=7+e-n;return-(7+xe(t,0,i).getUTCDay()-e)%7+i-1}function ke(t,e,n,i,a){var r,o,s=1+7*(e-1)+(7+n-i)%7+_e(t,i,a);return s<=0?o=Gt(r=t-1)+s:s>Gt(t)?(r=t+1,o=s-Gt(t)):(r=t,o=s),{year:r,dayOfYear:o}}function we(t,e,n){var i,a,r=_e(t.year(),e,n),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return o<1?i=o+Me(a=t.year()-1,e,n):o>Me(t.year(),e,n)?(i=o-Me(t.year(),e,n),a=t.year()+1):(a=t.year(),i=o),{week:i,year:a}}function Me(t,e,n){var i=_e(t,e,n),a=_e(t+1,e,n);return(Gt(t)-i+a)/7}function Se(t){return we(t,this._week.dow,this._week.doy).week}ot("w",["ww",2],"wo","week"),ot("W",["WW",2],"Wo","isoWeek"),$("week","w"),$("isoWeek","W"),Q("week",5),Q("isoWeek",5),Tt("w",pt),Tt("ww",pt,ct),Tt("W",pt),Tt("WW",pt,ct),Lt(["w","ww","W","WW"],(function(t,e,n,i){e[i.substr(0,1)]=S(t)}));var De={dow:0,doy:6};function Ce(){return this._week.dow}function Pe(){return this._week.doy}function Te(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Oe(t){var e=we(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Ie(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function Ae(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Fe(t,e){return t.slice(e,7).concat(t.slice(0,e))}ot("d",0,"do","day"),ot("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),ot("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),ot("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),ot("e",0,0,"weekday"),ot("E",0,0,"isoWeekday"),$("day","d"),$("weekday","e"),$("isoWeekday","E"),Q("day",11),Q("weekday",11),Q("isoWeekday",11),Tt("d",pt),Tt("e",pt),Tt("E",pt),Tt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),Tt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),Tt("dddd",(function(t,e){return e.weekdaysRegex(t)})),Lt(["dd","ddd","dddd"],(function(t,e,n,i){var a=n._locale.weekdaysParse(t,i,n._strict);null!=a?e.d=a:p(n).invalidWeekday=t})),Lt(["d","e","E"],(function(t,e,n,i){e[i]=S(t)}));var Re="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");function Le(t,e){var n=r(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Fe(n,this._week.dow):t?n[t.day()]:n}var We="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function Ye(t){return!0===t?Fe(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}var Ne="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function ze(t){return!0===t?Fe(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Ve(t,e,n){var i,a,r,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=g([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(a=Zt.call(this._weekdaysParse,o))?a:null:"ddd"===e?-1!==(a=Zt.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=Zt.call(this._minWeekdaysParse,o))?a:null:"dddd"===e?-1!==(a=Zt.call(this._weekdaysParse,o))||-1!==(a=Zt.call(this._shortWeekdaysParse,o))||-1!==(a=Zt.call(this._minWeekdaysParse,o))?a:null:"ddd"===e?-1!==(a=Zt.call(this._shortWeekdaysParse,o))||-1!==(a=Zt.call(this._weekdaysParse,o))||-1!==(a=Zt.call(this._minWeekdaysParse,o))?a:null:-1!==(a=Zt.call(this._minWeekdaysParse,o))||-1!==(a=Zt.call(this._weekdaysParse,o))||-1!==(a=Zt.call(this._shortWeekdaysParse,o))?a:null}function He(t,e,n){var i,a,r;if(this._weekdaysParseExact)return Ve.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(a=g([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function Ee(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Ie(t,this.localeData()),this.add(t-e,"d")):e}function Be(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function je(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Ae(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}var Ue=Ct;function Ge(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ke.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ue),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}var qe=Ct;function Ze(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ke.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}var $e=Ct;function Xe(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ke.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$e),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ke(){function t(t,e){return e.length-t.length}var e,n,i,a,r,o=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=g([2e3,1]).day(e),i=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),r=this.weekdays(n,""),o.push(i),s.push(a),l.push(r),u.push(i),u.push(a),u.push(r);for(o.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=At(s[e]),l[e]=At(l[e]),u[e]=At(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Je(){return this.hours()%12||12}function Qe(){return this.hours()||24}function tn(t,e){ot(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function en(t,e){return e._meridiemParse}function nn(t){return"p"===(t+"").toLowerCase().charAt(0)}ot("H",["HH",2],0,"hour"),ot("h",["hh",2],0,Je),ot("k",["kk",2],0,Qe),ot("hmm",0,0,(function(){return""+Je.apply(this)+et(this.minutes(),2)})),ot("hmmss",0,0,(function(){return""+Je.apply(this)+et(this.minutes(),2)+et(this.seconds(),2)})),ot("Hmm",0,0,(function(){return""+this.hours()+et(this.minutes(),2)})),ot("Hmmss",0,0,(function(){return""+this.hours()+et(this.minutes(),2)+et(this.seconds(),2)})),tn("a",!0),tn("A",!1),$("hour","h"),Q("hour",13),Tt("a",en),Tt("A",en),Tt("H",pt),Tt("h",pt),Tt("k",pt),Tt("HH",pt,ct),Tt("hh",pt,ct),Tt("kk",pt,ct),Tt("hmm",vt),Tt("hmmss",yt),Tt("Hmm",vt),Tt("Hmmss",yt),Rt(["H","HH"],Vt),Rt(["k","kk"],(function(t,e,n){var i=S(t);e[Vt]=24===i?0:i})),Rt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),Rt(["h","hh"],(function(t,e,n){e[Vt]=S(t),p(n).bigHour=!0})),Rt("hmm",(function(t,e,n){var i=t.length-2;e[Vt]=S(t.substr(0,i)),e[Ht]=S(t.substr(i)),p(n).bigHour=!0})),Rt("hmmss",(function(t,e,n){var i=t.length-4,a=t.length-2;e[Vt]=S(t.substr(0,i)),e[Ht]=S(t.substr(i,2)),e[Et]=S(t.substr(a)),p(n).bigHour=!0})),Rt("Hmm",(function(t,e,n){var i=t.length-2;e[Vt]=S(t.substr(0,i)),e[Ht]=S(t.substr(i))})),Rt("Hmmss",(function(t,e,n){var i=t.length-4,a=t.length-2;e[Vt]=S(t.substr(0,i)),e[Ht]=S(t.substr(i,2)),e[Et]=S(t.substr(a))}));var an=/[ap]\.?m?\.?/i;function rn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var on,sn=Kt("Hours",!0),ln={calendar:W,longDateFormat:N,invalidDate:V,ordinal:E,dayOfMonthOrdinalParse:B,relativeTime:U,months:re,monthsShort:se,week:De,weekdays:Re,weekdaysMin:Ne,weekdaysShort:We,meridiemParse:an},un={},dn={};function hn(t){return t?t.toLowerCase().replace("_","-"):t}function cn(t){for(var e,n,i,a,r=0;r0;){if(i=fn(a.slice(0,e).join("-")))return i;if(n&&n.length>=e&&D(a,n,!0)>=e-1)break;e--}r++}return on}function fn(e){var n=null;if(!un[e]&&t&&t.exports)try{n=on._abbr,function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}(),gn(n)}catch(t){}return un[e]}function gn(t,e){var n;return t&&((n=l(e)?vn(t):mn(t,e))?on=n:"undefined"!=typeof console&&console.warn),on._abbr}function mn(t,e){if(null!==e){var n,i=ln;if(e.abbr=t,null!=un[t])I("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=un[t]._config;else if(null!=e.parentLocale)if(null!=un[e.parentLocale])i=un[e.parentLocale]._config;else{if(null==(n=fn(e.parentLocale)))return dn[e.parentLocale]||(dn[e.parentLocale]=[]),dn[e.parentLocale].push({name:t,config:e}),null;i=n._config}return un[t]=new L(R(i,e)),dn[t]&&dn[t].forEach((function(t){mn(t.name,t.config)})),gn(t),un[t]}return delete un[t],null}function pn(t,e){if(null!=e){var n,i,a=ln;null!=(i=fn(t))&&(a=i._config),(n=new L(e=R(a,e))).parentLocale=un[t],un[t]=n,gn(t)}else null!=un[t]&&(null!=un[t].parentLocale?un[t]=un[t].parentLocale:null!=un[t]&&delete un[t]);return un[t]}function vn(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return on;if(!r(t)){if(e=fn(t))return e;t=[t]}return cn(t)}function yn(){return T(un)}function bn(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[Nt]<0||n[Nt]>11?Nt:n[zt]<1||n[zt]>ie(n[Yt],n[Nt])?zt:n[Vt]<0||n[Vt]>24||24===n[Vt]&&(0!==n[Ht]||0!==n[Et]||0!==n[Bt])?Vt:n[Ht]<0||n[Ht]>59?Ht:n[Et]<0||n[Et]>59?Et:n[Bt]<0||n[Bt]>999?Bt:-1,p(t)._overflowDayOfYear&&(ezt)&&(e=zt),p(t)._overflowWeeks&&-1===e&&(e=jt),p(t)._overflowWeekday&&-1===e&&(e=Ut),p(t).overflow=e),t}function xn(t,e,n){return null!=t?t:null!=e?e:n}function _n(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function kn(t){var e,n,i,a,r,o=[];if(!t._d){for(i=_n(t),t._w&&null==t._a[zt]&&null==t._a[Nt]&&wn(t),null!=t._dayOfYear&&(r=xn(t._a[Yt],i[Yt]),(t._dayOfYear>Gt(r)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=xe(r,0,t._dayOfYear),t._a[Nt]=n.getUTCMonth(),t._a[zt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=i[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Vt]&&0===t._a[Ht]&&0===t._a[Et]&&0===t._a[Bt]&&(t._nextDay=!0,t._a[Vt]=0),t._d=(t._useUTC?xe:be).apply(null,o),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}function wn(t){var e,n,i,a,r,o,s,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)r=1,o=4,n=xn(e.GG,t._a[Yt],we(Zn(),1,4).year),i=xn(e.W,1),((a=xn(e.E,1))<1||a>7)&&(l=!0);else{r=t._locale._week.dow,o=t._locale._week.doy;var u=we(Zn(),r,o);n=xn(e.gg,t._a[Yt],u.year),i=xn(e.w,u.week),null!=e.d?((a=e.d)<0||a>6)&&(l=!0):null!=e.e?(a=e.e+r,(e.e<0||e.e>6)&&(l=!0)):a=r}i<1||i>Me(n,r,o)?p(t)._overflowWeeks=!0:null!=l?p(t)._overflowWeekday=!0:(s=ke(n,i,a,r,o),t._a[Yt]=s.year,t._dayOfYear=s.dayOfYear)}var Mn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Dn=/Z|[+-]\d\d(?::?\d\d)?/,Cn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Pn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Tn=/^\/?Date\((\-?\d+)/i;function On(t){var e,n,i,a,r,o,s=t._i,l=Mn.exec(s)||Sn.exec(s);if(l){for(p(t).iso=!0,e=0,n=Cn.length;e0&&p(t).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),u+=n.length),rt[r]?(n?p(t).empty=!1:p(t).unusedTokens.push(r),Wt(r,n,t)):t._strict&&!n&&p(t).unusedTokens.push(r);p(t).charsLeftOver=l-u,s.length>0&&p(t).unusedInput.push(s),t._a[Vt]<=12&&!0===p(t).bigHour&&t._a[Vt]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[Vt]=Hn(t._locale,t._a[Vt],t._meridiem),kn(t),bn(t)}else Nn(t);else On(t)}function Hn(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0),e):e}function En(t){var e,n,i,a,r;if(0===t._f.length)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(a=0;athis?this:t:y()}));function Kn(t,e){var n,i;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return Zn();for(n=e[0],i=1;ithis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function xi(){if(!l(this._isDSTShifted))return this._isDSTShifted;var t={};if(x(t,this),(t=Un(t))._a){var e=t._isUTC?g(t._a):Zn(t._a);this._isDSTShifted=this.isValid()&&D(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function _i(){return!!this.isValid()&&!this._isUTC}function ki(){return!!this.isValid()&&this._isUTC}function wi(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Mi=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Si=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Di(t,e){var n,i,a,r=t,o=null;return oi(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:u(t)?(r={},e?r[e]=t:r.milliseconds=t):(o=Mi.exec(t))?(n="-"===o[1]?-1:1,r={y:0,d:S(o[zt])*n,h:S(o[Vt])*n,m:S(o[Ht])*n,s:S(o[Et])*n,ms:S(si(1e3*o[Bt]))*n}):(o=Si.exec(t))?(n="-"===o[1]?-1:1,r={y:Ci(o[2],n),M:Ci(o[3],n),w:Ci(o[4],n),d:Ci(o[5],n),h:Ci(o[6],n),m:Ci(o[7],n),s:Ci(o[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(a=Ti(Zn(r.from),Zn(r.to)),(r={}).ms=a.milliseconds,r.M=a.months),i=new ri(r),oi(t)&&c(t,"_locale")&&(i._locale=t._locale),i}function Ci(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Pi(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ti(t,e){var n;return t.isValid()&&e.isValid()?(e=hi(e,t),t.isBefore(e)?n=Pi(t,e):((n=Pi(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Oi(t,e){return function(n,i){var a;return null===i||isNaN(+i)||(I(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=i,i=a),Ii(this,Di(n="string"==typeof n?+n:n,i),t),this}}function Ii(t,e,n,a){var r=e._milliseconds,o=si(e._days),s=si(e._months);t.isValid()&&(a=null==a||a,s&&he(t,Jt(t,"Month")+s*n),o&&Qt(t,"Date",Jt(t,"Date")+o*n),r&&t._d.setTime(t._d.valueOf()+r*n),a&&i.updateOffset(t,o||s))}Di.fn=ri.prototype,Di.invalid=ai;var Ai=Oi(1,"add"),Fi=Oi(-1,"subtract");function Ri(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Li(t,e){var n=t||Zn(),a=hi(n,this).startOf("day"),r=i.calendarFormat(this,a)||"sameElse",o=e&&(A(e[r])?e[r].call(this,n):e[r]);return this.format(o||this.localeData().calendar(r,this,Zn(n)))}function Wi(){return new k(this)}function Yi(t,e){var n=w(t)?t:Zn(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=X(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?ut(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",ut(n,"Z")):ut(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function qi(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",r=e+'[")]';return this.format(n+i+a+r)}function Zi(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=ut(this,t);return this.localeData().postformat(e)}function $i(t,e){return this.isValid()&&(w(t)&&t.isValid()||Zn(t).isValid())?Di({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Xi(t){return this.from(Zn(),t)}function Ki(t,e){return this.isValid()&&(w(t)&&t.isValid()||Zn(t).isValid())?Di({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Ji(t){return this.to(Zn(),t)}function Qi(t){var e;return void 0===t?this._locale._abbr:(null!=(e=vn(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ta=P("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function ea(){return this._locale}var na=1e3,ia=60*na,aa=60*ia,ra=3506328*aa;function oa(t,e){return(t%e+e)%e}function sa(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-ra:new Date(t,e,n).valueOf()}function la(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-ra:Date.UTC(t,e,n)}function ua(t){var e;if(void 0===(t=X(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?la:sa;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=oa(e+(this._isUTC?0:this.utcOffset()*ia),aa);break;case"minute":e=this._d.valueOf(),e-=oa(e,ia);break;case"second":e=this._d.valueOf(),e-=oa(e,na);break}return this._d.setTime(e),i.updateOffset(this,!0),this}function da(t){var e;if(void 0===(t=X(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?la:sa;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=aa-oa(e+(this._isUTC?0:this.utcOffset()*ia),aa)-1;break;case"minute":e=this._d.valueOf(),e+=ia-oa(e,ia)-1;break;case"second":e=this._d.valueOf(),e+=na-oa(e,na)-1;break}return this._d.setTime(e),i.updateOffset(this,!0),this}function ha(){return this._d.valueOf()-6e4*(this._offset||0)}function ca(){return Math.floor(this.valueOf()/1e3)}function fa(){return new Date(this.valueOf())}function ga(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function ma(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function pa(){return this.isValid()?this.toISOString():null}function va(){return v(this)}function ya(){return f({},p(this))}function ba(){return p(this).overflow}function xa(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function _a(t,e){ot(0,[t,t.length],0,e)}function ka(t){return Da.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function wa(t){return Da.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Ma(){return Me(this.year(),1,4)}function Sa(){var t=this.localeData()._week;return Me(this.year(),t.dow,t.doy)}function Da(t,e,n,i,a){var r;return null==t?we(this,i,a).year:(e>(r=Me(t,i,a))&&(e=r),Ca.call(this,t,e,n,i,a))}function Ca(t,e,n,i,a){var r=ke(t,e,n,i,a),o=xe(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function Pa(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}ot(0,["gg",2],0,(function(){return this.weekYear()%100})),ot(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),_a("gggg","weekYear"),_a("ggggg","weekYear"),_a("GGGG","isoWeekYear"),_a("GGGGG","isoWeekYear"),$("weekYear","gg"),$("isoWeekYear","GG"),Q("weekYear",1),Q("isoWeekYear",1),Tt("G",wt),Tt("g",wt),Tt("GG",pt,ct),Tt("gg",pt,ct),Tt("GGGG",xt,gt),Tt("gggg",xt,gt),Tt("GGGGG",_t,mt),Tt("ggggg",_t,mt),Lt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,i){e[i.substr(0,2)]=S(t)})),Lt(["gg","GG"],(function(t,e,n,a){e[a]=i.parseTwoDigitYear(t)})),ot("Q",0,"Qo","quarter"),$("quarter","Q"),Q("quarter",7),Tt("Q",ht),Rt("Q",(function(t,e){e[Nt]=3*(S(t)-1)})),ot("D",["DD",2],"Do","date"),$("date","D"),Q("date",9),Tt("D",pt),Tt("DD",pt,ct),Tt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),Rt(["D","DD"],zt),Rt("Do",(function(t,e){e[zt]=S(t.match(pt)[0])}));var Ta=Kt("Date",!0);function Oa(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}ot("DDD",["DDDD",3],"DDDo","dayOfYear"),$("dayOfYear","DDD"),Q("dayOfYear",4),Tt("DDD",bt),Tt("DDDD",ft),Rt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=S(t)})),ot("m",["mm",2],0,"minute"),$("minute","m"),Q("minute",14),Tt("m",pt),Tt("mm",pt,ct),Rt(["m","mm"],Ht);var Ia=Kt("Minutes",!1);ot("s",["ss",2],0,"second"),$("second","s"),Q("second",15),Tt("s",pt),Tt("ss",pt,ct),Rt(["s","ss"],Et);var Aa,Fa=Kt("Seconds",!1);for(ot("S",0,0,(function(){return~~(this.millisecond()/100)})),ot(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),ot(0,["SSS",3],0,"millisecond"),ot(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),ot(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),ot(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),ot(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),ot(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),ot(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),$("millisecond","ms"),Q("millisecond",16),Tt("S",bt,ht),Tt("SS",bt,ct),Tt("SSS",bt,ft),Aa="SSSS";Aa.length<=9;Aa+="S")Tt(Aa,kt);function Ra(t,e){e[Bt]=S(1e3*("0."+t))}for(Aa="S";Aa.length<=9;Aa+="S")Rt(Aa,Ra);var La=Kt("Milliseconds",!1);function Wa(){return this._isUTC?"UTC":""}function Ya(){return this._isUTC?"Coordinated Universal Time":""}ot("z",0,0,"zoneAbbr"),ot("zz",0,0,"zoneName");var Na=k.prototype;function za(t){return Zn(1e3*t)}function Va(){return Zn.apply(null,arguments).parseZone()}function Ha(t){return t}Na.add=Ai,Na.calendar=Li,Na.clone=Wi,Na.diff=Bi,Na.endOf=da,Na.format=Zi,Na.from=$i,Na.fromNow=Xi,Na.to=Ki,Na.toNow=Ji,Na.get=te,Na.invalidAt=ba,Na.isAfter=Yi,Na.isBefore=Ni,Na.isBetween=zi,Na.isSame=Vi,Na.isSameOrAfter=Hi,Na.isSameOrBefore=Ei,Na.isValid=va,Na.lang=ta,Na.locale=Qi,Na.localeData=ea,Na.max=Xn,Na.min=$n,Na.parsingFlags=ya,Na.set=ee,Na.startOf=ua,Na.subtract=Fi,Na.toArray=ga,Na.toObject=ma,Na.toDate=fa,Na.toISOString=Gi,Na.inspect=qi,Na.toJSON=pa,Na.toString=Ui,Na.unix=ca,Na.valueOf=ha,Na.creationData=xa,Na.year=$t,Na.isLeapYear=Xt,Na.weekYear=ka,Na.isoWeekYear=wa,Na.quarter=Na.quarters=Pa,Na.month=ce,Na.daysInMonth=fe,Na.week=Na.weeks=Te,Na.isoWeek=Na.isoWeeks=Oe,Na.weeksInYear=Sa,Na.isoWeeksInYear=Ma,Na.date=Ta,Na.day=Na.days=Ee,Na.weekday=Be,Na.isoWeekday=je,Na.dayOfYear=Oa,Na.hour=Na.hours=sn,Na.minute=Na.minutes=Ia,Na.second=Na.seconds=Fa,Na.millisecond=Na.milliseconds=La,Na.utcOffset=fi,Na.utc=mi,Na.local=pi,Na.parseZone=vi,Na.hasAlignedHourOffset=yi,Na.isDST=bi,Na.isLocal=_i,Na.isUtcOffset=ki,Na.isUtc=wi,Na.isUTC=wi,Na.zoneAbbr=Wa,Na.zoneName=Ya,Na.dates=P("dates accessor is deprecated. Use date instead.",Ta),Na.months=P("months accessor is deprecated. Use month instead",ce),Na.years=P("years accessor is deprecated. Use year instead",$t),Na.zone=P("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gi),Na.isDSTShifted=P("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",xi);var Ea=L.prototype;function Ba(t,e,n,i){var a=vn(),r=g().set(i,e);return a[n](r,t)}function ja(t,e,n){if(u(t)&&(e=t,t=void 0),t=t||"",null!=e)return Ba(t,e,n,"month");var i,a=[];for(i=0;i<12;i++)a[i]=Ba(t,i,n,"month");return a}function Ua(t,e,n,i){"boolean"==typeof t?(u(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,u(e)&&(n=e,e=void 0),e=e||"");var a,r=vn(),o=t?r._week.dow:0;if(null!=n)return Ba(e,(n+o)%7,i,"day");var s=[];for(a=0;a<7;a++)s[a]=Ba(e,(a+o)%7,i,"day");return s}function Ga(t,e){return ja(t,e,"months")}function qa(t,e){return ja(t,e,"monthsShort")}function Za(t,e,n){return Ua(t,e,n,"weekdays")}function $a(t,e,n){return Ua(t,e,n,"weekdaysShort")}function Xa(t,e,n){return Ua(t,e,n,"weekdaysMin")}Ea.calendar=Y,Ea.longDateFormat=z,Ea.invalidDate=H,Ea.ordinal=j,Ea.preparse=Ha,Ea.postformat=Ha,Ea.relativeTime=G,Ea.pastFuture=q,Ea.set=F,Ea.months=oe,Ea.monthsShort=le,Ea.monthsParse=de,Ea.monthsRegex=ve,Ea.monthsShortRegex=me,Ea.week=Se,Ea.firstDayOfYear=Pe,Ea.firstDayOfWeek=Ce,Ea.weekdays=Le,Ea.weekdaysMin=ze,Ea.weekdaysShort=Ye,Ea.weekdaysParse=He,Ea.weekdaysRegex=Ge,Ea.weekdaysShortRegex=Ze,Ea.weekdaysMinRegex=Xe,Ea.isPM=nn,Ea.meridiem=rn,gn("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===S(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=P("moment.lang is deprecated. Use moment.locale instead.",gn),i.langData=P("moment.langData is deprecated. Use moment.localeData instead.",vn);var Ka=Math.abs;function Ja(){var t=this._data;return this._milliseconds=Ka(this._milliseconds),this._days=Ka(this._days),this._months=Ka(this._months),t.milliseconds=Ka(t.milliseconds),t.seconds=Ka(t.seconds),t.minutes=Ka(t.minutes),t.hours=Ka(t.hours),t.months=Ka(t.months),t.years=Ka(t.years),this}function Qa(t,e,n,i){var a=Di(e,n);return t._milliseconds+=i*a._milliseconds,t._days+=i*a._days,t._months+=i*a._months,t._bubble()}function tr(t,e){return Qa(this,t,e,1)}function er(t,e){return Qa(this,t,e,-1)}function nr(t){return t<0?Math.floor(t):Math.ceil(t)}function ir(){var t,e,n,i,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*nr(rr(s)+o),o=0,s=0),l.milliseconds=r%1e3,t=M(r/1e3),l.seconds=t%60,e=M(t/60),l.minutes=e%60,n=M(e/60),l.hours=n%24,o+=M(n/24),s+=a=M(ar(o)),o-=nr(rr(a)),i=M(s/12),s%=12,l.days=o,l.months=s,l.years=i,this}function ar(t){return 4800*t/146097}function rr(t){return 146097*t/4800}function or(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=X(t))||"quarter"===t||"year"===t)switch(e=this._days+i/864e5,n=this._months+ar(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(rr(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function sr(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN}function lr(t){return function(){return this.as(t)}}var ur=lr("ms"),dr=lr("s"),hr=lr("m"),cr=lr("h"),fr=lr("d"),gr=lr("w"),mr=lr("M"),pr=lr("Q"),vr=lr("y");function yr(){return Di(this)}function br(t){return t=X(t),this.isValid()?this[t+"s"]():NaN}function xr(t){return function(){return this.isValid()?this._data[t]:NaN}}var _r=xr("milliseconds"),kr=xr("seconds"),wr=xr("minutes"),Mr=xr("hours"),Sr=xr("days"),Dr=xr("months"),Cr=xr("years");function Pr(){return M(this.days()/7)}var Tr=Math.round,Or={ss:44,s:45,m:45,h:22,d:26,M:11};function Ir(t,e,n,i,a){return a.relativeTime(e||1,!!n,t,i)}function Ar(t,e,n){var i=Di(t).abs(),a=Tr(i.as("s")),r=Tr(i.as("m")),o=Tr(i.as("h")),s=Tr(i.as("d")),l=Tr(i.as("M")),u=Tr(i.as("y")),d=a<=Or.ss&&["s",a]||a0,d[4]=n,Ir.apply(null,d)}function Fr(t){return void 0===t?Tr:"function"==typeof t&&(Tr=t,!0)}function Rr(t,e){return void 0!==Or[t]&&(void 0===e?Or[t]:(Or[t]=e,"s"===t&&(Or.ss=e-1),!0))}function Lr(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=Ar(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}var Wr=Math.abs;function Yr(t){return(t>0)-(t<0)||+t}function Nr(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Wr(this._milliseconds)/1e3,i=Wr(this._days),a=Wr(this._months);t=M(n/60),e=M(t/60),n%=60,t%=60;var r=M(a/12),o=a%=12,s=i,l=e,u=t,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Yr(this._months)!==Yr(h)?"-":"",g=Yr(this._days)!==Yr(h)?"-":"",m=Yr(this._milliseconds)!==Yr(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(o?f+o+"M":"")+(s?g+s+"D":"")+(l||u||d?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(d?m+d+"S":"")}var zr=ri.prototype;return zr.isValid=ii,zr.abs=Ja,zr.add=tr,zr.subtract=er,zr.as=or,zr.asMilliseconds=ur,zr.asSeconds=dr,zr.asMinutes=hr,zr.asHours=cr,zr.asDays=fr,zr.asWeeks=gr,zr.asMonths=mr,zr.asQuarters=pr,zr.asYears=vr,zr.valueOf=sr,zr._bubble=ir,zr.clone=yr,zr.get=br,zr.milliseconds=_r,zr.seconds=kr,zr.minutes=wr,zr.hours=Mr,zr.days=Sr,zr.weeks=Pr,zr.months=Dr,zr.years=Cr,zr.humanize=Lr,zr.toISOString=Nr,zr.toString=Nr,zr.toJSON=Nr,zr.locale=Qi,zr.localeData=ea,zr.toIsoString=P("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Nr),zr.lang=ta,ot("X",0,0,"unix"),ot("x",0,0,"valueOf"),Tt("x",wt),Tt("X",Dt),Rt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),Rt("x",(function(t,e,n){n._d=new Date(S(t))})),i.version="2.24.0",a(Zn),i.fn=Na,i.min=Jn,i.max=Qn,i.now=ti,i.utc=g,i.unix=za,i.months=Ga,i.isDate=d,i.locale=gn,i.invalid=y,i.duration=Di,i.isMoment=w,i.weekdays=Za,i.parseZone=Va,i.localeData=vn,i.isDuration=oi,i.monthsShort=qa,i.weekdaysMin=Xa,i.defineLocale=mn,i.updateLocale=pn,i.locales=yn,i.weekdaysShort=$a,i.normalizeUnits=X,i.relativeTimeRounding=Fr,i.relativeTimeThreshold=Rr,i.calendarFormat=Ri,i.prototype=Na,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}(e={exports:{}}),e.exports}(),Xn={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"};an._date.override("function"==typeof $n?{_id:"moment",formats:function(){return Xn},parse:function(t,e){return"string"==typeof t&&"string"==typeof e?t=$n(t,e):t instanceof $n||(t=$n(t)),t.isValid()?t.valueOf():null},format:function(t,e){return $n(t).format(e)},add:function(t,e,n){return $n(t).add(e,n).valueOf()},diff:function(t,e,n){return $n.duration($n(t).diff($n(e))).as(n)},startOf:function(t,e,n){return t=$n(t),"isoWeek"===e?t.isoWeekday(n).valueOf():t.startOf(e).valueOf()},endOf:function(t,e){return $n(t).endOf(e).valueOf()},_create:function(t){return $n(t)}}:{}),ot._set("global",{plugins:{filler:{propagate:!0}}});var Kn={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?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 Qn(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.getBasePosition?r=i.getBasePosition():i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(ut.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}function ti(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function ei(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),Kn[n](t))}function ni(t){return t&&!t.skip}function ii(t,e,n,i,a){var r;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)ut.canvas.lineTo(t,n[r],n[r-1],!0)}}var ai={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;ie?e:t.boxWidth}ot._set("global",{legend:{display:!0,position:"top",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;return ut.isArray(e.datasets)?e.datasets.map((function(e,n){return{text:e.label,fillStyle:ut.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(n),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:n}}),this):[]}}},legendCallback:function(t){var e=[];e.push('
    ');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push("
"),e.join("")}});var li=gt.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:ri,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:ri,beforeSetDimensions:ri,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:ri,beforeBuildLabels:ri,buildLabels:function(){var t=this,e=t.options.labels||{},n=ut.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:ri,beforeFit:ri,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=ut.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i)if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="top",ut.each(t.legendItems,(function(t,e){var i=si(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=n.padding),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=n.padding,m=0,p=0,v=o+c;ut.each(t.legendItems,(function(t,e){var i=si(n,o)+o/2+a.measureText(t.text).width;e>0&&p+v>l.height-c&&(g+=m+n.padding,f.push(m),m=0,p=0),m=Math.max(m,i),p+=v,s[e]={left:0,top:0,width:i,height:o}})),g+=m,f.push(m),l.width+=g}t.width=l.width,t.height=l.height},afterFit:ri,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=ot.global,a=i.defaultColor,r=i.elements.line,o=t.width,s=t.lineWidths;if(e.display){var l,u=t.ctx,d=oi(n.fontColor,i.defaultFontColor),h=ut.options._parseFont(n),c=h.size;u.textAlign="left",u.textBaseline="middle",u.lineWidth=.5,u.strokeStyle=d,u.fillStyle=d,u.font=h.string;var f=si(n,c),g=t.legendHitBoxes,m=t.isHorizontal();l=m?{x:t.left+(o-s[0])/2+n.padding,y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+n.padding,line:0};var p=c+n.padding;ut.each(t.legendItems,(function(i,d){var h=u.measureText(i.text).width,v=f+c/2+h,y=l.x,b=l.y;m?d>0&&y+v+n.padding>t.left+t.minSize.width&&(b=l.y+=p,l.line++,y=l.x=t.left+(o-s[l.line])/2+n.padding):d>0&&b+p>t.top+t.minSize.height&&(y=l.x=y+t.columnWidths[l.line]+n.padding,b=l.y=t.top+n.padding,l.line++),function(t,n,i){if(!(isNaN(f)||f<=0)){u.save();var o=oi(i.lineWidth,r.borderWidth);if(u.fillStyle=oi(i.fillStyle,a),u.lineCap=oi(i.lineCap,r.borderCapStyle),u.lineDashOffset=oi(i.lineDashOffset,r.borderDashOffset),u.lineJoin=oi(i.lineJoin,r.borderJoinStyle),u.lineWidth=o,u.strokeStyle=oi(i.strokeStyle,a),u.setLineDash&&u.setLineDash(oi(i.lineDash,r.borderDash)),e.labels&&e.labels.usePointStyle){var s=f*Math.SQRT2/2,l=t+f/2,d=n+c/2;ut.canvas.drawPoint(u,i.pointStyle,s,l,d)}else 0!==o&&u.strokeRect(t,n,f,c),u.fillRect(t,n,f,c);u.restore()}}(y,b,i),g[d].left=y,g[d].top=b,function(t,e,n,i){var a=c/2,r=f+a+t,o=e+a;u.fillText(n.text,r,o),n.hidden&&(u.beginPath(),u.lineWidth=2,u.moveTo(r,o),u.lineTo(r+i,o),u.stroke())}(y,b,i,h),m?l.x+=v+n.padding:l.y+=p}))}},_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=a[n]).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 ui(t,e){var n=new li({ctx:t.ctx,options:e,chart:t});be.configure(t,n,e),be.addBox(t,n),t.legend=n}var di={id:"legend",_element:li,beforeInit:function(t){var e=t.options.legend;e&&ui(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(ut.mergeIf(e,ot.global.legend),n?(be.configure(t,n,e),n.options=e):ui(t,e)):n&&(be.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},hi=ut.noop;ot._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var ci=gt.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:hi,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:hi,beforeSetDimensions:hi,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:hi,beforeBuildLabels:hi,buildLabels:hi,afterBuildLabels:hi,beforeFit:hi,fit:function(){var t=this,e=t.options,n=e.display,i=t.minSize,a=ut.isArray(e.text)?e.text.length:1,r=ut.options._parseFont(e),o=n?a*r.lineHeight+2*e.padding:0;t.isHorizontal()?(i.width=t.maxWidth,i.height=o):(i.width=o,i.height=t.maxHeight),t.width=i.width,t.height=i.height},afterFit:hi,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=ut.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=ut.valueOrDefault(n.fontColor,ot.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,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(ut.isArray(g))for(var m=0,p=0;p=0;i--){var a=t[i];if(e(a))return a}},ut.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},ut.almostEquals=function(t,e,n){return Math.abs(t-e)t},ut.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},ut.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},ut.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},ut.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e},ut.toRadians=function(t){return t*(Math.PI/180)},ut.toDegrees=function(t){return t*(180/Math.PI)},ut._decimalPlaces=function(t){if(ut.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},ut.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}},ut.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},ut.aliasPixel=function(t){return t%2==0?0:.5},ut._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},ut.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),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},ut.EPSILON=Number.EPSILON||1e-14,ut.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(a=e0?d[e-1]:null,a=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},ut.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},ut.niceNum=function(t,e){var n=Math.floor(ut.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},ut.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},ut.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(ut.getStyle(r,"padding-left")),u=parseFloat(ut.getStyle(r,"padding-top")),d=parseFloat(ut.getStyle(r,"padding-right")),h=parseFloat(ut.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},ut.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},ut.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},ut._calculatePadding=function(t,e,n){return(e=ut.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},ut._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},ut.getMaximumWidth=function(t){var e=ut._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-ut._calculatePadding(e,"padding-left",n)-ut._calculatePadding(e,"padding-right",n),a=ut.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},ut.getMaximumHeight=function(t){var e=ut._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-ut._calculatePadding(e,"padding-top",n)-ut._calculatePadding(e,"padding-bottom",n),a=ut.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},ut.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},ut.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")}},ut.fontString=function(t,e,n){return e+" "+t+"px "+n},ut.longestText=function(t,e,n,i){var a=(i=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=0;ut.each(n,(function(e){null!=e&&!0!==ut.isArray(e)?o=ut.measureText(t,a,r,o,e):ut.isArray(e)&&ut.each(e,(function(e){null==e||ut.isArray(e)||(o=ut.measureText(t,a,r,o,e))}))}));var s=r.length/2;if(s>n.length){for(var l=0;li&&(i=r),i},ut.numberOfLabelLines=function(t){var e=1;return ut.each(t,(function(t){ut.isArray(t)&&t.length>e&&(e=t.length)})),e},ut.color=G?function(t){return t instanceof CanvasGradient&&(t=ot.global.defaultColor),G(t)}:function(t){return t},ut.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:ut.color(t).saturate(.5).darken(.1).rgbString()}}(),tn._adapters=an,tn.Animation=pt,tn.animationService=vt,tn.controllers=le,tn.DatasetController=kt,tn.defaults=ot,tn.Element=gt,tn.elements=Yt,tn.Interaction=me,tn.layouts=be,tn.platform=Le,tn.plugins=We,tn.Scale=dn,tn.scaleService=Ye,tn.Ticks=rn,tn.Tooltip=qe,tn.helpers.each(Zn,(function(t,e){tn.scaleService.registerScaleType(e,t,t._defaults)})),gi)gi.hasOwnProperty(yi)&&tn.plugins.register(gi[yi]);tn.platform.initialize();var bi=tn;return"undefined"!=typeof window&&(window.Chart=tn),tn.Chart=tn,tn.Legend=gi.legend._element,tn.Title=gi.title._element,tn.pluginService=tn.plugins,tn.PluginBase=tn.Element.extend({}),tn.canvasHelpers=tn.helpers.canvas,tn.layoutService=tn.layouts,tn.LinearScaleBase=gn,tn.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){tn[t]=function(e,n){return new tn(e,tn.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),bi}));