!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}((function(){return function t(e,n,i){function o(r,s){if(!n[r]){if(!e[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(a)return a(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[r]={exports:{}};e[r][0].call(d.exports,(function(t){return o(e[r][1][t]||t)}),d,d.exports,t,e,n,i)}return n[r].exports}for(var a="function"==typeof require&&require,r=0;r');var n=t.data,i=n.datasets,o=n.labels;if(i.length)for(var a=0;a'),o[a]&&e.push(o[a]),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 o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[i],l=s&&s.custom||{},u=a.valueAtIndexOrDefault,d=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,i,d.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,i,d.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,i,d.borderWidth),hidden:isNaN(r.data[i])||o.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,o,a=e.index,r=this.chart;for(n=0,i=(r.data.datasets||[]).length;n=Math.PI?-1:g<-Math.PI?1:0))+f,m=Math.cos(g),v=Math.sin(g),b=Math.cos(p),y=Math.sin(p),x=g<=0&&0<=p||g<=2*Math.PI&&2*Math.PI<=p,k=g<=.5*Math.PI&&.5*Math.PI<=p||g<=2.5*Math.PI&&2.5*Math.PI<=p,w=g<=-Math.PI&&-Math.PI<=p||g<=Math.PI&&Math.PI<=p,M=g<=.5*-Math.PI&&.5*-Math.PI<=p||g<=1.5*Math.PI&&1.5*Math.PI<=p,S=h/100,C=w?-1:Math.min(m*(m<0?1:S),b*(b<0?1:S)),_=M?-1:Math.min(v*(v<0?1:S),y*(y<0?1:S)),D=x?1:Math.max(m*(0');var n=t.data,i=n.datasets,o=n.labels;if(i.length)for(var a=0;a'),o[a]&&e.push(o[a]),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 o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[i].custom||{},l=a.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,i,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,i,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,i,u.borderWidth),hidden:isNaN(r.data[i])||o.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,o,a=e.index,r=this.chart;for(n=0,i=(r.data.datasets||[]).length;n=e.numSteps?(o.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(a,1)):++a}}},{26:26,46:46}],24:[function(t,e,n){"use strict";var i=t(22),o=t(23),a=t(26),r=t(46),s=t(29),l=t(31),u=t(49),d=t(32),c=t(34),h=t(36);e.exports=function(t){function e(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},r.extend(t.prototype,{construct:function(e,n){var i,o,s=this;(o=(i=(i=n)||{}).data=i.data||{}).datasets=o.datasets||[],o.labels=o.labels||[],i.options=r.configMerge(a.global,a[i.type],i.options||{});var l=u.acquireContext(e,n=i),d=l&&l.canvas,c=d&&d.height,h=d&&d.width;s.id=r.uid(),s.ctx=l,s.canvas=d,s.config=n,s.width=h,s.height=c,s.aspectRatio=c?h/c:null,s.options=n.options,s._bufferedRender=!1,(s.chart=s).controller=s,t.instances[s.id]=s,Object.defineProperty(s,"data",{get:function(){return s.config.data},set:function(t){s.config.data=t}}),l&&d?(s.initialize(),s.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return d.notify(t,"beforeInit"),r.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),d.notify(t,"afterInit"),t},clear:function(){return r.canvas.clear(this),this},stop:function(){return o.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,o=n.maintainAspectRatio&&e.aspectRatio||null,a=Math.max(0,Math.floor(r.getMaximumWidth(i))),s=Math.max(0,Math.floor(o?a/o:r.getMaximumHeight(i)));if((e.width!==a||e.height!==s)&&(i.width=e.width=a,i.height=e.height=s,i.style.width=a+"px",i.style.height=s+"px",r.retinaScale(e,n.devicePixelRatio),!t)){var l={width:a,height:s};d.notify(e,"resize",[l]),e.options.onResize&&e.options.onResize(e,l),e.stop(),e.update({duration:e.options.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;r.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),r.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,n=t.options,i=t.scales||{},o=[],a=Object.keys(i).reduce((function(t,e){return t[e]=!1,t}),{});n.scales&&(o=o.concat((n.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(n.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),n.scale&&o.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),r.each(o,(function(n){var o=n.options,s=o.id,l=r.valueOrDefault(o.type,n.dtype);e(o.position)!==e(n.dposition)&&(o.position=n.dposition),a[s]=!0;var u=null;if(s in i&&i[s].type===l)(u=i[s]).options=o,u.ctx=t.ctx,u.chart=t;else{var d=c.getScaleConstructor(l);if(!d)return;u=new d({id:s,type:l,options:o,ctx:t.ctx,chart:t}),i[u.id]=u}u.mergeTicksOptions(),n.isDefault&&(t.scale=u)})),r.each(a,(function(t,e){t||delete i[e]})),t.scales=i,c.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],i=[];return r.each(e.data.datasets,(function(o,a){var r=e.getDatasetMeta(a),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(a),r=e.getDatasetMeta(a)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(a),r.controller.linkScales();else{var l=t.controllers[r.type];if(void 0===l)throw new Error('"'+r.type+'" is not a chart type.');r.controller=new l(e,a),i.push(r.controller)}}),e),i},resetElements:function(){var t=this;r.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var n,i,o=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),i=(n=o).options,r.each(n.scales,(function(t){l.removeBox(n,t)})),i=r.configMerge(t.defaults.global,t.defaults[n.config.type],i),n.options=n.config.options=i,n.ensureScalesHaveIDs(),n.buildOrUpdateScales(),n.tooltip._options=i.tooltips,n.tooltip.initialize(),d._invalidate(o),!1!==d.notify(o,"beforeUpdate")){o.tooltip._data=o.data;var a=o.buildOrUpdateControllers();r.each(o.data.datasets,(function(t,e){o.getDatasetMeta(e).controller.buildOrUpdateElements()}),o),o.updateLayout(),o.options.animation&&o.options.animation.duration&&r.each(a,(function(t){t.reset()})),o.updateDatasets(),o.tooltip.initialize(),o.lastActive=[],d.notify(o,"afterUpdate"),o._bufferedRender?o._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:o.render(e)}},updateLayout:function(){!1!==d.notify(this,"beforeLayout")&&(l.update(this,this.width,this.height),d.notify(this,"afterScaleUpdate"),d.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==d.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=e[t].length&&e[t].push({}),a.merge(e[t][o],!e[t][o].type||l.type&&l.type!==e[t][o].type?[r.getScaleDefaults(s),l]:l)}else a._merger(t,e,n,i)}})},a.where=function(t,e){if(a.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return a.each(t,(function(t){e(t)&&n.push(t)})),n},a.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,o=t.length;i=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},a.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},a.niceNum=function(t,e){var n=Math.floor(a.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)},a.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)},a.getRelativePosition=function(t,e){var n,i,o=t.originalEvent||t,r=t.target||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;i=l&&0n.length){for(var u=0;ue&&(e=t.length)})),e},a.color=i?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},a.getHoverColor=function(t){return t instanceof CanvasPattern?t:a.color(t).saturate(.5).darken(.1).rgbString()}}},{26:26,3:3,34:34,46:46}],29:[function(t,e,n){"use strict";var i=t(46);function o(t,e){return t.native?{x:t.x,y:t.y}:i.getRelativePosition(t,e)}function a(t,e){var n,i,o,a,r;for(i=0,a=t.data.datasets.length;it.maxHeight){r--;break}r++,c=l*u}t.labelRotation=r},afterCalculateTickRotation:function(){a.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){a.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=s(t._ticks),i=t.options,o=i.ticks,r=i.scaleLabel,l=i.gridLines,h=i.display,f=t.isHorizontal(),g=d(o),p=i.gridLines.tickMarkLength;if(e.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&l.drawTicks?p:0,e.height=f?h&&l.drawTicks?p:0:t.maxHeight,r.display&&h){var m=c(r)+a.options.toPadding(r.padding).height;f?e.height+=m:e.width+=m}if(o.display&&h){var v=a.longestText(t.ctx,g.font,n,t.longestTextCache),b=a.numberOfLabelLines(n),y=.5*g.size,x=t.options.ticks.padding;if(f){t.longestLabelWidth=v;var k=a.toRadians(t.labelRotation),w=Math.cos(k),M=Math.sin(k)*v+g.size*b+y*(b-1)+y;e.height=Math.min(t.maxHeight,e.height+M+x),t.ctx.font=g.font;var S=u(t.ctx,n[0],g.font),C=u(t.ctx,n[n.length-1],g.font);0!==t.labelRotation?(t.paddingLeft="bottom"===i.position?w*S+3:w*y+3,t.paddingRight="bottom"===i.position?w*y+3:w*C+3):(t.paddingLeft=S/2+3,t.paddingRight=C/2+3)}else o.mirror?v=0:v+=x+y,e.width=Math.min(t.maxWidth,e.width+v),t.paddingTop=g.size/2,t.paddingBottom=g.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(){a.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(a.isNullOrUndef(t))return NaN;if("number"==typeof t&&!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:a.noop,getPixelForValue:a.noop,getValueForPixel:a.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),o=i*t+e.paddingLeft;return n&&(o+=i/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}return e.top+t*((e.height-(e.paddingTop+e.paddingBottom))/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;return e.isHorizontal()?e.left+Math.round((e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft)+(e.isFullWidth()?e.margins.left:0):e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(r.width-(r.paddingLeft+r.paddingRight)))),o&&ol.height-e.height&&(c="bottom");var h=(u.left+u.right)/2,f=(u.top+u.bottom)/2;i="center"===c?(n=function(t){return t<=h},function(t){return h=l.width-e.width/2}),o=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},a=function(t){return t-e.width-s.caretSize-s.caretPadding<0},r=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",o(s.x)&&(d="center",c=r(s.y))):i(s.x)&&(d="right",a(s.x)&&(d="center",c=r(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:c}}(this,I=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,o=0,r=e.body,s=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0),l=e.title.length,u=e.footer.length,d=e.titleFontSize,c=e.bodyFontSize,h=e.footerFontSize;i+=l*d,i+=l?(l-1)*e.titleSpacing:0,i+=l?e.titleMarginBottom:0,i+=(s+=e.beforeBody.length+e.afterBody.length)*c,i+=s?(s-1)*e.bodySpacing:0,i+=u?e.footerMarginTop:0,i+=u*h,i+=u?(u-1)*e.footerSpacing:0;var f=0,g=function(t){o=Math.max(o,n.measureText(t).width+f)};return n.font=a.fontString(d,e._titleFontStyle,e._titleFontFamily),a.each(e.title,g),n.font=a.fontString(c,e._bodyFontStyle,e._bodyFontFamily),a.each(e.beforeBody.concat(e.afterBody),g),f=e.displayColors?c+2:0,a.each(r,(function(t){a.each(t.before,g),a.each(t.lines,g),a.each(t.after,g)})),f=0,n.font=a.fontString(h,e._footerFontStyle,e._footerFontFamily),a.each(e.footer,g),{width:o+=2*e.xPadding,height:i}}(this,C)),o=I,l=w._chart,u=(i=C).x,c=i.y,p=i.caretSize+(h=i.caretPadding),m=i.cornerRadius+h,"right"===(f=(s=A).xAlign)?u-=o.width:"center"===f&&((u-=o.width/2)+o.width>l.width&&(u=l.width-o.width),u<0&&(u=0)),"top"===(g=s.yAlign)?c+=p:c-="bottom"===g?o.height+p:o.height/2,"center"===g?"left"===f?u+=p:"right"===f&&(u-=p):"left"===f?u-=m:"right"===f&&(u+=m),P={x:u,y:c}}else C.opacity=0;return C.xAlign=A.xAlign,C.yAlign=A.yAlign,C.x=P.x,C.y=P.y,C.width=I.width,C.height=I.height,C.caretX=T.x,C.caretY=T.y,w._model=C,t&&M.custom&&M.custom.call(w,C),w},drawCaret:function(t,e){var n=this._chart.ctx,i=this.getCaretPosition(t,e,this._view);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(t,e,n){var i,o,a,r,s,l,u=n.caretSize,d=n.cornerRadius,c=n.xAlign,h=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===h)s=g+m/2,l="left"===c?(o=(i=f)-u,a=i,r=s+u,s-u):(o=(i=f+p)+u,a=i,r=s-u,s+u);else if(i="left"===c?(o=f+d+u)-u:"right"===c?(o=f+p-d-u)-u:(o=n.caretX)-u,a=o+u,"top"===h)s=(r=g)-u,l=r;else{s=(r=g+m)+u,l=r;var v=a;a=i,i=v}return{x1:i,x2:o,x3:a,y1:r,y2:s,y3:l}},drawTitle:function(t,e,n,i){var o=e.title;if(o.length){n.textAlign=e._titleAlign,n.textBaseline="top";var r,l,u=e.titleFontSize,d=e.titleSpacing;for(n.fillStyle=s(e.titleFontColor,i),n.font=a.fontString(u,e._titleFontStyle,e._titleFontFamily),r=0,l=o.length;r=n.innerRadius&&r<=n.outerRadius}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=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{26:26,27:27,46:46}],38:[function(t,e,n){"use strict";var i=t(26),o=t(27),a=t(46),r=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:r.defaultColor,borderWidth:3,borderColor:r.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=o.extend({draw:function(){var t,e,n,i,o=this._view,s=this._chart.ctx,l=o.spanGaps,u=this._children.slice(),d=r.elements.line,c=-1;for(this._loop&&u.length&&u.push(u[0]),s.save(),s.lineCap=o.borderCapStyle||d.borderCapStyle,s.setLineDash&&s.setLineDash(o.borderDash||d.borderDash),s.lineDashOffset=o.borderDashOffset||d.borderDashOffset,s.lineJoin=o.borderJoinStyle||d.borderJoinStyle,s.lineWidth=o.borderWidth||d.borderWidth,s.strokeStyle=o.borderColor||r.defaultColor,s.beginPath(),c=-1,t=0;t=t.left&&1.01*t.right>=n.x&&n.y>=t.top&&1.01*t.bottom>=n.y)&&(o.strokeStyle=e.borderColor||r,o.lineWidth=a.valueOrDefault(e.borderWidth,i.global.elements.point.borderWidth),o.fillStyle=e.backgroundColor||r,a.canvas.drawPoint(o,s,u,d,c,l))}})},{26:26,27:27,46:46}],40:[function(t,e,n){"use strict";var i=t(26),o=t(27);function a(t){return void 0!==t._view.width}function r(t){var e,n,i,o,r=t._view;if(a(t)){var s=r.width/2;e=r.x-s,n=r.x+s,i=Math.min(r.y,r.base),o=Math.max(r.y,r.base)}else{var l=r.height/2;e=Math.min(r.x,r.base),n=Math.max(r.x,r.base),i=r.y-l,o=r.y+l}return{left:e,top:i,right:n,bottom:o}}i._set("global",{elements:{rectangle:{backgroundColor:i.global.defaultColor,borderColor:i.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=o.extend({draw:function(){var t,e,n,i,o,a,r,s=this._chart.ctx,l=this._view,u=l.borderWidth;if(r=l.horizontal?(n=l.y-l.height/2,i=l.y+l.height/2,o=(t=l.base)<(e=l.x)?1:-1,a=1,l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,o=1,a=(n=l.y)<(i=l.base)?1:-1,l.borderSkipped||"bottom"),u){var d=Math.min(Math.abs(t-e),Math.abs(n-i)),c=(u=d=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return n},inLabelRange:function(t,e){if(!this._view)return!1;var n=r(this);return a(this)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=r(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=r(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,n=this._view;return e=a(this)?(t=n.x,(n.y+n.base)/2):(t=(n.x+n.base)/2,n.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{26:26,27:27}],41:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(37),e.exports.Line=t(38),e.exports.Point=t(39),e.exports.Rectangle=t(40)},{37:37,38:38,39:39,40:40}],42:[function(t,e,n){"use strict";var i=t(43);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,o,a){if(a){var r=Math.min(a,o/2-1e-7,i/2-1e-7);t.moveTo(e+r,n),t.lineTo(e+i-r,n),t.arcTo(e+i,n,e+i,n+r,r),t.lineTo(e+i,n+o-r),t.arcTo(e+i,n+o,e+i-r,n+o,r),t.lineTo(e+r,n+o),t.arcTo(e,n+o,e,n+o-r,r),t.lineTo(e,n+r),t.arcTo(e,n,e+r,n,r),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,o)},drawPoint:function(t,e,n,i,o,a){var r,s,l,u,d,c;if(a=a||0,!e||"object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(n)||n<=0)){switch(t.save(),t.translate(i,o),t.rotate(a*Math.PI/180),t.beginPath(),e){default:t.arc(0,0,n,0,2*Math.PI),t.closePath();break;case"triangle":d=(s=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(-s/2,d/3),t.lineTo(s/2,d/3),t.lineTo(0,-2*d/3),t.closePath();break;case"rect":c=1/Math.SQRT2*n,t.rect(-c,-c,2*c,2*c);break;case"rectRounded":var h=n/Math.SQRT2,f=Math.SQRT2*n;this.roundedRect(t,-h,-h,f,f,.425*n);break;case"rectRot":c=1/Math.SQRT2*n,t.moveTo(-c,0),t.lineTo(0,c),t.lineTo(c,0),t.lineTo(0,-c),t.closePath();break;case"cross":t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-n,0),t.lineTo(n,0);break;case"crossRot":l=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(-l,-u),t.lineTo(l,u),t.moveTo(-l,u),t.lineTo(l,-u);break;case"star":t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-n,0),t.lineTo(n,0),l=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(-l,-u),t.lineTo(l,u),t.moveTo(-l,u),t.lineTo(l,-u);break;case"line":t.moveTo(-n,0),t.lineTo(n,0);break;case"dash":t.moveTo(0,0),t.lineTo(n,0)}t.fill(),t.stroke(),t.restore()}}else t.drawImage(e,i-e.width/2,o-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},i.clear=n.clear,i.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments)}},{43:43}],43:[function(t,e,n){"use strict";var i,o={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return o.valueOrDefault(o.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,s;if(o.isArray(t))if(r=t.length,i)for(a=r-1;0<=a;a--)e.call(n,t[a],a);else for(a=0;a
';var o=e.childNodes[0],r=e.childNodes[1];e._reset=function(){o.scrollLeft=1e6,o.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return h(o,"scroll",s.bind(o,"expand")),h(r,"scroll",s.bind(r,"shrink")),e}((c=!(u=function(){if(y.resizer)return e(g("resize",n))}),f=[],function(){f=Array.prototype.slice.call(arguments),d=d||this,c||(c=!0,i.requestAnimFrame.call(window,(function(){c=!1,u.apply(d,f)})))}));m=function(){if(y.resizer){var e=t.parentNode;e&&e!==x.parentNode&&e.insertBefore(x,e.firstChild),x._reset()}},v=(p=t)[o]||(p[o]={}),b=v.renderProxy=function(t){t.animationName===s&&m()},i.each(l,(function(t){h(p,t,b)})),v.reflow=!!p.offsetParent,p.classList.add(r)}(d,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var s=((n[o]||{}).proxies||{})[t.id+"_"+e];s&&f(a,e,s)}else!function(t){var e,n,a,s=t[o]||{},u=s.resizer;delete s.resizer,n=(e=t)[o]||{},(a=n.renderProxy)&&(i.each(l,(function(t){f(e,t,a)})),delete n.renderProxy),e.classList.remove(r),u&&u.parentNode&&u.parentNode.removeChild(u)}(a)}},i.addEvent=h,i.removeEvent=f},{46:46}],49:[function(t,e,n){"use strict";var i=t(46),o=t(47),a=t(48);e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a._enabled?a:o)},{46:46,47:47,48:48}],50:[function(t,e,n){"use strict";e.exports={},e.exports.filler=t(51),e.exports.legend=t(52),e.exports.title=t(53)},{51:51,52:52,53:53}],51:[function(t,e,n){"use strict";var i=t(26),o=t(41),a=t(46);i._set("global",{plugins:{filler:{propagate:!0}}});var r={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),o=i&&n.isDatasetVisible(e)&&i.dataset._children||[],a=o.length||0;return a?function(t,e){return e');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 u=o.extend({initialize:function(t){a.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,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:s,beforeSetDimensions:s,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:s,beforeBuildLabels:s,buildLabels:function(){var t=this,e=t.options.labels||{},n=a.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:s,beforeFit:s,fit:function(){var t=this,e=t.options,n=e.labels,o=e.display,r=t.ctx,s=i.global,u=a.valueOrDefault,d=u(n.fontSize,s.defaultFontSize),c=u(n.fontStyle,s.defaultFontStyle),h=u(n.fontFamily,s.defaultFontFamily),f=a.fontString(d,c,h),g=t.legendHitBoxes=[],p=t.minSize,m=t.isHorizontal();if(p.height=m?(p.width=t.maxWidth,o?10:0):(p.width=o?10:0,t.maxHeight),o)if(r.font=f,m){var v=t.lineWidths=[0],b=t.legendItems.length?d+n.padding:0;r.textAlign="left",r.textBaseline="top",a.each(t.legendItems,(function(e,i){var o=l(n,d)+d/2+r.measureText(e.text).width;v[v.length-1]+o+n.padding>=t.width&&(b+=d+n.padding,v[v.length]=t.left),g[i]={left:0,top:0,width:o,height:d},v[v.length-1]+=o+n.padding})),p.height+=b}else{var y=n.padding,x=t.columnWidths=[],k=n.padding,w=0,M=0,S=d+y;a.each(t.legendItems,(function(t,e){var i=l(n,d)+d/2+r.measureText(t.text).width;M+S>p.height&&(k+=w+n.padding,x.push(w),M=w=0),w=Math.max(w,i),M+=S,g[e]={left:0,top:0,width:i,height:d}})),k+=w,x.push(w),p.width+=k}t.width=p.width,t.height=p.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,o=i.global,r=o.elements.line,s=t.width,u=t.lineWidths;if(e.display){var d,c=t.ctx,h=a.valueOrDefault,f=h(n.fontColor,o.defaultFontColor),g=h(n.fontSize,o.defaultFontSize),p=h(n.fontStyle,o.defaultFontStyle),m=h(n.fontFamily,o.defaultFontFamily),v=a.fontString(g,p,m);c.textAlign="left",c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=v;var b=l(n,g),y=t.legendHitBoxes,x=t.isHorizontal();d=x?{x:t.left+(s-u[0])/2,y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+n.padding,line:0};var k=g+n.padding;a.each(t.legendItems,(function(i,l){var f,p,m,v,w,M=c.measureText(i.text).width,S=b+g/2+M,C=d.x,_=d.y;x?s<=C+S&&(_=d.y+=k,d.line++,C=d.x=t.left+(s-u[d.line])/2):_+k>t.bottom&&(C=d.x=C+t.columnWidths[d.line]+n.padding,_=d.y=t.top+n.padding,d.line++),function(t,n,i){if(!(isNaN(b)||b<=0)){c.save(),c.fillStyle=h(i.fillStyle,o.defaultColor),c.lineCap=h(i.lineCap,r.borderCapStyle),c.lineDashOffset=h(i.lineDashOffset,r.borderDashOffset),c.lineJoin=h(i.lineJoin,r.borderJoinStyle),c.lineWidth=h(i.lineWidth,r.borderWidth),c.strokeStyle=h(i.strokeStyle,o.defaultColor);var s=0===h(i.lineWidth,r.borderWidth);if(c.setLineDash&&c.setLineDash(h(i.lineDash,r.borderDash)),e.labels&&e.labels.usePointStyle){var l=g*Math.SQRT2/2,u=l/Math.SQRT2;a.canvas.drawPoint(c,i.pointStyle,l,t+u,n+u)}else s||c.strokeRect(t,n,b,g),c.fillRect(t,n,b,g);c.restore()}}(C,_,i),y[l].left=C,y[l].top=_,p=M,v=b+(m=g/2)+C,c.fillText((f=i).text,v,w=_+m),f.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(v,w),c.lineTo(v+p,w),c.stroke()),x?d.x+=S+n.padding:d.y+=k}))}},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var a=t.x,r=t.y;if(a>=e.left&&a<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&a<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}});function d(t,e){var n=new u({ctx:t.ctx,options:e,chart:t});r.configure(t,n,e),r.addBox(t,n),t.legend=n}e.exports={id:"legend",_element:u,beforeInit:function(t){var e=t.options.legend;e&&d(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(a.mergeIf(e,i.global.legend),n?(r.configure(t,n,e),n.options=e):d(t,e)):n&&(r.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}},{26:26,27:27,31:31,46:46}],53:[function(t,e,n){"use strict";var i=t(26),o=t(27),a=t(46),r=t(31),s=a.noop;i._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var l=o.extend({initialize:function(t){a.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:s,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:s,beforeSetDimensions:s,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:s,beforeBuildLabels:s,buildLabels:s,afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,e=t.options,n=e.display,o=(0,a.valueOrDefault)(e.fontSize,i.global.defaultFontSize),r=t.minSize,s=a.isArray(e.text)?e.text.length:1,l=a.options.toLineHeight(e.lineHeight,o),u=n?s*l+2*e.padding:0;t.isHorizontal()?(r.width=t.maxWidth,r.height=u):(r.width=u,r.height=t.maxHeight),t.width=r.width,t.height=r.height},afterFit:s,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=a.valueOrDefault,o=t.options,r=i.global;if(o.display){var s,l,u,d=n(o.fontSize,r.defaultFontSize),c=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=a.fontString(d,c,h),g=a.options.toLineHeight(o.lineHeight,d),p=g/2+o.padding,m=0,v=t.top,b=t.left,y=t.bottom,x=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(x-b)/2,u=v+p,s=x-b):(l="left"===o.position?b+p:x-p,u=v+(y-v)/2,s=y-v,m=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(m),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(a.isArray(k))for(var w=0,M=0;Mt.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()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var n=o.valueOrDefault(e.fontSize,i.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*n)))}return t},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),o=e.end-n;return e.isHorizontal()?e.left+e.width/o*(i-n):e.bottom-e.height/o*(i-n)},getValueForPixel:function(t){var e=this,n=e.isHorizontal();return e.start+(n?t-e.left:e.bottom-t)/(n?e.width:e.height)*(e.end-e.start)},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});a.registerScaleType("linear",n,e)}},{26:26,34:34,35:35,46:46}],56:[function(t,e,n){"use strict";var i=t(46),o=t(33);e.exports=function(t){var e=i.noop;t.LinearScaleBase=o.extend({getRightValue:function(t){return"string"==typeof t?+t:o.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=i.sign(t.min),o=i.sign(t.max);n<0&&o<0?t.max=0:0=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),o={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:i.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,o,a,r=[];if(t.stepSize&&0t.max)&&(t.max=i),0!==i&&(null===t.minNotZero||id.r&&(d.r=b.end,c.r=m),y.startd.b&&(d.b=y.end,c.b=m)}t.setReductions(r,d,c)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,n){var i=e.l/Math.sin(n.l),o=Math.max(e.r-this.width,0)/Math.sin(n.r),a=-e.t/Math.cos(n.t),r=-Math.max(e.b-this.height,0)/Math.cos(n.b);i=c(i),o=c(o),a=c(a),r=c(r),this.drawingArea=Math.min(Math.round(t-(i+o)/2),Math.round(t-(a+r)/2)),this.setCenterPoint(i,o,a,r)},setCenterPoint:function(t,e,n,i){var o=this,a=n+o.drawingArea,r=o.height-i-o.drawingArea;o.xCenter=Math.round((t+o.drawingArea+(o.width-e-o.drawingArea))/2+o.left),o.yCenter=Math.round((a+r)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/s(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.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+this.xCenter,y:Math.round(Math.sin(n)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:0>1)-1]||null,a=t[i],!o)return{lo:null,hi:a};if(a[e]n))return{lo:o,hi:a};s=i-1}}return{lo:a,hi:null}}(t,e,n),a=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-a[e];return a[i]+(r[i]-a[i])*(s?(n-a[e])/s:0)}function p(t,e){var n=e.parser,o=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof o?i(t,o):(t instanceof i||(t=i(t)),t.isValid()?t:"function"==typeof o?o(t):t)}function m(t,e){if(a.isNullOrUndef(t))return null;var n=e.options.time,i=p(e.getRightValue(t),n);return i.isValid()?(n.round&&i.startOf(n.round),i.valueOf()):null}function v(t){for(var e=c.indexOf(t)+1,n=c.length;e=c.indexOf(e);a--)if(d[r=c[a]].common&&s.as(r)>=t.length)return r;return c[e?c.indexOf(e):0]}(S,w.minUnit,f.min,f.max),f._majorUnit=v(f._unit),f._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,a,r,s,l,u=[],d=[e];for(o=0,a=t.length;o