!function(t,e){"function"==typeof define&&define.amd?define("Chartist",[],function(){return t.Chartist=e()}):"object"==typeof module&&module.exports?module.exports=e():t.Chartist=e()}(this,function(){var n={version:"0.11.0"};return function(u,g,p){"use strict";p.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},p.noop=function(t){return t},p.alphaNumerate=function(t){return String.fromCharCode(97+t%26)},p.extend=function(t){var e,i,n;for(t=t||{},e=1;e":">",'"':""","'":"'"},p.serialize=function(t){return null==t?t:("number"==typeof t?t=""+t:"object"==typeof t&&(t=JSON.stringify({data:t})),Object.keys(p.escapingMap).reduce(function(t,e){return p.replaceAll(t,e,p.escapingMap[e])},t))},p.deserialize=function(t){if("string"!=typeof t)return t;t=Object.keys(p.escapingMap).reduce(function(t,e){return p.replaceAll(t,p.escapingMap[e],e)},t);try{t=void 0!==(t=JSON.parse(t)).data?t.data:t}catch(t){}return t},p.createSvg=function(e,t,i,n){var a;return t=t||"100%",i=i||"100%",Array.prototype.slice.call(e.querySelectorAll("svg")).filter(function(t){return t.getAttributeNS(p.namespaces.xmlns,"ct")}).forEach(function(t){e.removeChild(t)}),(a=new p.Svg("svg").attr({width:t,height:i}).addClass(n))._node.style.width=t,a._node.style.height=i,e.appendChild(a._node),a},p.normalizeData=function(t,e,i){var n,a={raw:t,normalized:{}};return a.normalized.series=p.getDataArray({series:t.series||[]},e,i),n=a.normalized.series.every(function(t){return t instanceof Array})?Math.max.apply(null,a.normalized.series.map(function(t){return t.length})):a.normalized.series.length,a.normalized.labels=(t.labels||[]).slice(),Array.prototype.push.apply(a.normalized.labels,p.times(Math.max(0,n-a.normalized.labels.length)).map(function(){return""})),e&&p.reverseData(a.normalized),a},p.safeHasProperty=function(t,e){return null!==t&&"object"==typeof t&&t.hasOwnProperty(e)},p.isDataHoleValue=function(t){return null==t||"number"==typeof t&&isNaN(t)},p.reverseData=function(t){t.labels.reverse(),t.series.reverse();for(var e=0;er.high&&(r.high=n),s&&n=i)u.step=1;else if(n&&c=i)u.step=c;else for(;;){if(d&&p.projectLength(t,u.step,u)<=i)u.step*=2;else{if(d||!(p.projectLength(t,u.step/2,u)>=i))break;if(u.step/=2,n&&u.step%1!=0){u.step*=2;break}}if(1e3=u.high;)s=a(s,-u.step);u.min=o,u.max=s,u.range=u.max-u.min;var f=[];for(r=u.min;r<=u.max;r=a(r,u.step)){var g=p.roundWithPrecision(r);g!==f[f.length-1]&&f.push(g)}return u.values=f,u},p.polarToCartesian=function(t,e,i,n){var a=(n-90)*Math.PI/180;return{x:t+i*Math.cos(a),y:e+i*Math.sin(a)}},p.createChartRect=function(t,e,i){var n=!(!e.axisX&&!e.axisY),a=n?e.axisY.offset:0,r=n?e.axisX.offset:0,o=t.width()||p.quantity(e.width).value||0,s=t.height()||p.quantity(e.height).value||0,l=p.normalizePadding(e.chartPadding,i);o=Math.max(o,a+l.left+l.right),s=Math.max(s,r+l.top+l.bottom);var u={padding:l,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return n?("start"===e.axisX.position?(u.y2=l.top+r,u.y1=Math.max(s-l.bottom,u.y2+1)):(u.y2=l.top,u.y1=Math.max(s-l.bottom-r,u.y2+1)),"start"===e.axisY.position?(u.x1=l.left+a,u.x2=Math.max(o-l.right,u.x1+1)):(u.x1=l.left,u.x2=Math.max(o-l.right-a,u.x1+1))):(u.x1=l.left,u.x2=Math.max(o-l.right,u.x1+1),u.y2=l.top,u.y1=Math.max(s-l.bottom,u.y2+1)),u},p.createGrid=function(t,e,i,n,a,r,o,s){var l={};l[i.units.pos+"1"]=t,l[i.units.pos+"2"]=t,l[i.counterUnits.pos+"1"]=n,l[i.counterUnits.pos+"2"]=n+a;var u=r.elem("line",l,o.join(" "));s.emit("draw",p.extend({type:"grid",axis:i,index:e,group:r,element:u},l))},p.createGridBackground=function(t,e,i,n){var a=t.elem("rect",{x:e.x1,y:e.y2,width:e.width(),height:e.height()},i,!0);n.emit("draw",{type:"gridBackground",group:t,element:a})},p.createLabel=function(t,e,i,n,a,r,o,s,l,u,d){var c,h={};if(h[a.units.pos]=t+o[a.units.pos],h[a.counterUnits.pos]=o[a.counterUnits.pos],h[a.units.len]=e,h[a.counterUnits.len]=Math.max(0,r-10),u){var f=g.createElement("span");f.className=l.join(" "),f.setAttribute("xmlns",p.namespaces.xhtml),f.innerText=n[i],f.style[a.units.len]=Math.round(h[a.units.len])+"px",f.style[a.counterUnits.len]=Math.round(h[a.counterUnits.len])+"px",c=s.foreignObject(f,p.extend({style:"overflow: visible;"},h))}else c=s.elem("text",h,l.join(" ")).text(n[i]);d.emit("draw",p.extend({type:"label",axis:a,index:i,group:s,element:c,text:n[i]},h))},p.getSeriesOption=function(t,e,i){if(t.name&&e.series&&e.series[t.name]){var n=e.series[t.name];return n.hasOwnProperty(i)?n[i]:e[i]}return e[i]},p.optionsProvider=function(t,i,n){function e(t){var e=a;if(a=p.extend({},o),i)for(r=0;rt.x;return n&&"explode"===i||!n&&"implode"===i?"start":n&&"implode"===i||!n&&"explode"===i?"end":"middle"}var a={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:D.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};D.Pie=D.Base.extend({constructor:function(t,e,i,n){D.Pie.super.constructor.call(this,t,e,a,D.extend({},a,i),n)},createChart:function(m){var v,t,y,b,x,w=D.normalizeData(this.data),k=[],S=m.startAngle;this.svg=D.createSvg(this.container,m.width,m.height,m.donut?m.classNames.chartDonut:m.classNames.chartPie),t=D.createChartRect(this.svg,m,a.padding),y=Math.min(t.width()/2,t.height()/2),x=m.total||w.normalized.series.reduce(function(t,e){return t+e},0);var _=D.quantity(m.donutWidth);"%"===_.unit&&(_.value*=y/100),y-=m.donut&&!m.donutSolid?_.value/2:0,b="outside"===m.labelPosition||m.donut&&!m.donutSolid?y:"center"===m.labelPosition?0:m.donutSolid?y-_.value/2:y/2,b+=m.labelOffset;var M={x:t.x1+t.width()/2,y:t.y2+t.height()/2},C=1===w.raw.series.filter(function(t){return t.hasOwnProperty("value")?0!==t.value:0!==t}).length;w.raw.series.forEach(function(t,e){k[e]=this.svg.elem("g",null,null)}.bind(this)),m.showLabel&&(v=this.svg.elem("g",null,null)),w.raw.series.forEach(function(t,e){if(0!==w.normalized.series[e]||!m.ignoreEmptyValues){k[e].attr({"ct:series-name":t.name}),k[e].addClass([m.classNames.series,t.className||m.classNames.series+"-"+D.alphaNumerate(e)].join(" "));var i=0'+o+"",s)a+=o+"
";else if(c instanceof y.Pie){var d=function(t,e){for(;(t=t.nextSibling)&&!b(t,e););return t}(n,"ct-label");d&&(a+=((e=d).innerText||e.textContent)+"
")}l&&(m.currency&&(l=null!=m.currencyFormatCallback?m.currencyFormatCallback(l,m):m.currency+l.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g,"$1,")),a+=l=''+l+"")}a&&(f.innerHTML=a,h(t),b(i=f,"tooltip-show")||(i.className=i.className+" tooltip-show"),g=f.offsetHeight,p=f.offsetWidth)}),t("mouseout",e,function(){i(f)}),t("mousemove",null,function(t){!1===m.anchorToPoint&&h(t)})}}}(window,document,t),t.plugins.tooltips}),function(t,e){"function"==typeof define&&define.amd?define([],function(){return t.returnExportsGlobal=e()}):"object"==typeof exports?module.exports=e():t["Chartist.plugins.ctAxisTitle"]=e()}(this,function(){return function(t,e,o){"use strict";var i={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipText:!1},n={xAxis:i,yAxis:i};o.plugins=o.plugins||{},o.plugins.ctAxisTitle=function(r){return r=o.extend({},n,r),function(t){t.on("created",function(t){if(!r.axisX.axisTitle&&!r.axisY.axisTitle)throw new Error("ctAxisTitle plugin - You must provide at least one axis title");if(!t.axisX&&!t.axisY)throw new Error("ctAxisTitle plugin can only be used on charts that have at least one axis");var e,i,n;if(r.axisX.axisTitle&&t.axisX&&(e=t.axisX.axisLength/2+t.options.axisX.offset+t.options.chartPadding.left,i=t.options.chartPadding.top,"end"===t.options.axisX.position&&(i+=t.axisY.axisLength),(n=new o.Svg("text")).addClass(r.axisX.axisClass),n.text(r.axisX.axisTitle),n.attr({x:e+r.axisX.offset.x,y:i+r.axisX.offset.y,"text-anchor":r.axisX.textAnchor}),t.svg.append(n,!0)),r.axisY.axisTitle&&t.axisY){e=0,i=t.axisY.axisLength/2+t.options.chartPadding.top,"end"===t.options.axisY.position&&(e=t.axisX.axisLength);var a="rotate("+(r.axisY.flipTitle?-90:90)+", "+e+", "+i+")";(n=new o.Svg("text")).addClass(r.axisY.axisClass),n.text(r.axisY.axisTitle),n.attr({x:e+r.axisY.offset.x,y:i+r.axisY.offset.y,transform:a,"text-anchor":r.axisY.textAnchor}),t.svg.append(n,!0)}})}}}(window,document,Chartist),Chartist.plugins.ctAxisTitle}),function(e,i){"function"==typeof define&&define.amd?define(["chartist"],function(t){return e.returnExportsGlobal=i(t)}):"object"==typeof exports?module.exports=i(require("chartist")):e["Chartist.plugins.legend"]=i(e.Chartist)}(this,function(r){"use strict";var e={className:"",classNames:!1,removeAll:!1,legendNames:!1,clickable:!0,onClick:null,position:"top"};return r.plugins=r.plugins||{},r.plugins.legend=function(h){function f(t,e){return t-e}if(h&&h.position){if(!("top"===h.position||"bottom"===h.position||h.position instanceof HTMLElement))throw Error("The position you entered is not a valid position");if(h.position instanceof HTMLElement){var t=h.position;delete h.position}}return h=r.extend({},e,h),t&&(h.position=t),function(o){var t=o.container.querySelector(".ct-legend");if(t&&t.parentNode.removeChild(t),h.clickable){var e=o.data.series.map(function(t,e){return"object"!=typeof t&&(t={value:t}),t.className=t.className||o.options.classNames.series+"-"+r.alphaNumerate(e),t});o.data.series=e}var s=document.createElement("ul"),i=o instanceof r.Pie;s.className="ct-legend",o instanceof r.Pie&&s.classList.add("ct-legend-inside"),"string"==typeof h.className&&0>>0,n=0;nRt(t)?(r=t+1,s-Rt(t)):(r=t,s),{year:r,dayOfYear:o}}function Nt(t,e,i){var n,a,r=Et(t.year(),e,i),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return o<1?n=o+Yt(a=t.year()-1,e,i):o>Yt(t.year(),e,i)?(n=o-Yt(t.year(),e,i),a=t.year()+1):(a=t.year(),n=o),{week:n,year:a}}function Yt(t,e,i){var n=Et(t,e,i),a=Et(t+1,e,i);return(Rt(t)-n+a)/7}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),R("week",5),R("isoWeek",5),dt("w",$),dt("ww",$,X),dt("W",$),dt("WW",$,X),pt(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=k(t)});U("d",0,"do","day"),U("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),U("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),U("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),dt("d",$),dt("e",$),dt("E",$),dt("dd",function(t,e){return e.weekdaysMinRegex(t)}),dt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),dt("dddd",function(t,e){return e.weekdaysRegex(t)}),pt(["dd","ddd","dddd"],function(t,e,i,n){var a=i._locale.weekdaysParse(t,n,i._strict);null!=a?e.d=a:p(i).invalidWeekday=t}),pt(["d","e","E"],function(t,e,i,n){e[n]=k(t)});var Ht="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ut="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var jt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Gt=lt;var qt=lt;var Xt=lt;function Zt(){function t(t,e){return e.length-t.length}var e,i,n,a,r,o=[],s=[],l=[],u=[];for(e=0;e<7;e++)i=g([2e3,1]).day(e),n=this.weekdaysMin(i,""),a=this.weekdaysShort(i,""),r=this.weekdays(i,""),o.push(n),s.push(a),l.push(r),u.push(n),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]=ht(s[e]),l[e]=ht(l[e]),u[e]=ht(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 Jt(){return this.hours()%12||12}function Qt(t,e){U(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function $t(t,e){return e._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Jt),U("k",["kk",2],0,function(){return this.hours()||24}),U("hmm",0,0,function(){return""+Jt.apply(this)+E(this.minutes(),2)}),U("hmmss",0,0,function(){return""+Jt.apply(this)+E(this.minutes(),2)+E(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+E(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+E(this.minutes(),2)+E(this.seconds(),2)}),Qt("a",!0),Qt("A",!1),I("hour","h"),R("hour",13),dt("a",$t),dt("A",$t),dt("H",$),dt("h",$),dt("HH",$,X),dt("hh",$,X),dt("hmm",K),dt("hmmss",tt),dt("Hmm",K),dt("Hmmss",tt),gt(["H","HH"],xt),gt(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),gt(["h","hh"],function(t,e,i){e[xt]=k(t),p(i).bigHour=!0}),gt("hmm",function(t,e,i){var n=t.length-2;e[xt]=k(t.substr(0,n)),e[wt]=k(t.substr(n)),p(i).bigHour=!0}),gt("hmmss",function(t,e,i){var n=t.length-4,a=t.length-2;e[xt]=k(t.substr(0,n)),e[wt]=k(t.substr(n,2)),e[kt]=k(t.substr(a)),p(i).bigHour=!0}),gt("Hmm",function(t,e,i){var n=t.length-2;e[xt]=k(t.substr(0,n)),e[wt]=k(t.substr(n))}),gt("Hmmss",function(t,e,i){var n=t.length-4,a=t.length-2;e[xt]=k(t.substr(0,n)),e[wt]=k(t.substr(n,2)),e[kt]=k(t.substr(a))});var Kt,te=V("Hours",!0),ee={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",ordinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:At,monthsShort:Tt,week:{dow:0,doy:6},weekdays:Ht,weekdaysMin:jt,weekdaysShort:Ut,meridiemParse:/[ap]\.?m?\.?/i},ie={};function ne(t){return t?t.toLowerCase().replace("_","-"):t}function ae(t){var e=null;if(!ie[t]&&void 0!==Ri&&Ri&&Ri.exports)try{e=Kt._abbr,Li("./locale/"+t),re(e)}catch(t){}return ie[t]}function re(t,e){var i;return t&&(i=r(e)?se(t):oe(t,e))&&(Kt=i),Kt._abbr}function oe(t,e){if(null===e)return delete ie[t],null;var i=ee;return e.abbr=t,null!=ie[t]?(C("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=ie[t]._config):null!=e.parentLocale&&(null!=ie[e.parentLocale]?i=ie[e.parentLocale]._config:C("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),ie[t]=new T(A(i,e)),re(t),ie[t]}function se(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Kt;if(!s(t)){if(e=ae(t))return e;t=[t]}return function(t){for(var e,i,n,a,r=0;r=e&&S(a,i,!0)>=e-1)break;e--}r++}return null}(t)}function le(t){var e,i=t._a;return i&&-2===p(t).overflow&&(e=i[yt]<0||11Ct(i[vt],i[yt])?bt:i[xt]<0||24Yt(i,r,o)?p(t)._overflowWeeks=!0:null!=l?p(t)._overflowWeekday=!0:(s=Bt(i,n,a,r,o),t._a[vt]=s.year,t._dayOfYear=s.dayOfYear)}(t),t._dayOfYear&&(a=me(t._a[vt],n[vt]),t._dayOfYear>Rt(a)&&(p(t)._overflowDayOfYear=!0),i=zt(a,0,t._dayOfYear),t._a[yt]=i.getUTCMonth(),t._a[bt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=r[e]=n[e];for(;e<7;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[xt]&&0===t._a[wt]&&0===t._a[kt]&&0===t._a[St]&&(t._nextDay=!0,t._a[xt]=0),t._d=(t._useUTC?zt:function(t,e,i,n,a,r,o){var s=new Date(t,e,i,n,a,r,o);return t<100&&0<=t&&isFinite(s.getFullYear())&&s.setFullYear(t),s}).apply(null,r),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[xt]=24)}}function ye(t){if(t._f!==h.ISO_8601){t._a=[],p(t).empty=!0;var e,i,n,a,r,o,s,l,u=""+t._i,d=u.length,c=0;for(n=G(t._f,t._locale).match(B)||[],e=0;ei.valueOf():i.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ti.isLocal=function(){return!!this.isValid()&&!this._isUTC},ti.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ti.isUtc=Oe,ti.isUTC=Oe,ti.zoneAbbr=function(){return this._isUTC?"UTC":""},ti.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ti.dates=i("dates accessor is deprecated. Use date instead.",Xe),ti.months=i("months accessor is deprecated. Use month instead",It),ti.years=i("years accessor is deprecated. Use year instead",Wt),ti.zone=i("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),ti.isDSTShifted=i("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var t={};if(y(t,this),(t=be(t))._a){var e=t._isUTC?g(t._a):we(t._a);this._isDSTShifted=this.isValid()&&0=i.y-i.height/2&&e<=i.y+i.height/2&&t>=i.x&&t<=i.base:e>=i.y-i.height/2&&e<=i.y+i.height/2&&t>=i.base&&t<=i.x),n}}),t.pivot()},calculateBarBase:function(t,e){var i=this.getMeta(),n=this.getScaleForId(i.xAxisID),a=0;if(n.options.stacked){for(var r=this.chart,o=r.data.datasets,s=Number(o[t].data[e]),l=0;l');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var r=0;r'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(l){var u=l.data;return u.labels.length&&u.datasets.length?u.labels.map(function(t,e){var i=l.getDatasetMeta(0),n=u.datasets[0],a=i.data[e],r=a&&a.custom||{},o=P.getValueAtIndexOrDefault,s=l.options.elements.arc;return{text:t,fillStyle:r.backgroundColor?r.backgroundColor:o(n.backgroundColor,e,s.backgroundColor),strokeStyle:r.borderColor?r.borderColor:o(n.borderColor,e,s.borderColor),lineWidth:r.borderWidth?r.borderWidth:o(n.borderWidth,e,s.borderWidth),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,a,r=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i=Math.PI?-1:f<-Math.PI?1:0))+h,p=Math.cos(f),m=Math.sin(f),v=Math.cos(g),y=Math.sin(g),b=f<=0&&0<=g||f<=2*Math.PI&&2*Math.PI<=g,x=f<=.5*Math.PI&&.5*Math.PI<=g||f<=2.5*Math.PI&&2.5*Math.PI<=g,w=f<=-Math.PI&&-Math.PI<=g||f<=Math.PI&&Math.PI<=g,k=f<=.5*-Math.PI&&.5*-Math.PI<=g||f<=1.5*Math.PI&&1.5*Math.PI<=g,S=c/100,_=w?-1:Math.min(p*(p<0?1:S),v*(v<0?1:S)),M=k?-1:Math.min(m*(m<0?1:S),y*(y<0?1:S)),C=b?1:Math.max(p*(0');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var r=0;r'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var i=s.getDatasetMeta(0),n=l.datasets[0],a=i.data[e].custom||{},r=k.getValueAtIndexOrDefault,o=s.options.elements.arc;return{text:t,fillStyle:a.backgroundColor?a.backgroundColor:r(n.backgroundColor,e,o.backgroundColor),strokeStyle:a.borderColor?a.borderColor:r(n.borderColor,e,o.borderColor),lineWidth:a.borderWidth?a.borderWidth:r(n.borderWidth,e,o.borderWidth),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,a,r=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;it.animations[n].animationObject.numSteps&&(t.animations[n].animationObject.currentStep=t.animations[n].animationObject.numSteps),t.animations[n].animationObject.render(t.animations[n].chartInstance,t.animations[n].animationObject),t.animations[n].animationObject.onAnimationProgress&&t.animations[n].animationObject.onAnimationProgress.call&&t.animations[n].animationObject.onAnimationProgress.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].animationObject.currentStep===t.animations[n].animationObject.numSteps?(t.animations[n].animationObject.onAnimationComplete&&t.animations[n].animationObject.onAnimationComplete.call&&t.animations[n].animationObject.onAnimationComplete.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].chartInstance.animating=!1,t.animations.splice(n,1)):++n;var a=(Date.now()-e)/t.frameDuration;t.dropFrames+=a,0=r[a].length||!r[a][e].type?r[a].push(g.configMerge(n,t)):t.type&&t.type!==r[a][e].type?r[a][e]=g.configMerge(r[a][e],n,t):r[a][e]=g.configMerge(r[a][e],t)}):(r[a]=[],g.each(t,function(t){var e=g.getValueOrDefault(t.type,"xAxes"===a?"category":"linear");r[a].push(g.configMerge(o.scaleService.getScaleDefaults(e),t))})):r.hasOwnProperty(a)&&"object"==typeof r[a]&&null!==r[a]&&"object"==typeof t?r[a]=g.configMerge(r[a],t):r[a]=t}),r},g.getValueAtIndexOrDefault=function(t,e,i){return null==t?i:g.isArray(t)?e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},g.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},g.niceNum=function(t,e){var i=Math.floor(g.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)};var e=g.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(1-Math.pow(2,-10*t/1))},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return 1<=t?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-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,i=0,n=1;return 0===t?0:1==(t/=1)?1:(i||(i=.3),e=ni.length){for(var l=0;le&&(e=t.length)}),e},g.drawRoundedRectangle=function(t,e,i,n,a,r){t.beginPath(),t.moveTo(e+r,i),t.lineTo(e+n-r,i),t.quadraticCurveTo(e+n,i,e+n,i+r),t.lineTo(e+n,i+a-r),t.quadraticCurveTo(e+n,i+a,e+n-r,i+a),t.lineTo(e+r,i+a),t.quadraticCurveTo(e,i+a,e,i+a-r),t.lineTo(e,i+r),t.quadraticCurveTo(e,i,e+r,i),t.closePath()},g.color=function(t){return n?t instanceof CanvasGradient?n(o.defaults.global.defaultColor):n(t):(console.log("Color.js not found!"),t)},g.addResizeListener=function(t,e){var i=document.createElement("iframe"),n="chartjs-hidden-iframe";i.classlist?i.classlist.add(n):i.setAttribute("class",n);var a=i.style;a.width="100%",a.display="block",a.border=0,a.height=0,a.margin=0,a.position="absolute",a.left=0,a.right=0,a.top=0,a.bottom=0,t.insertBefore(i,t.firstChild),(i.contentWindow||i).onresize=function(){e&&e()}},g.removeResizeListener=function(t){var e=t.querySelector(".chartjs-hidden-iframe");e&&e.parentNode.removeChild(e)},g.isArray=Array.isArray?function(t){return Array.isArray(t)}:function(t){return"[object Array]"===Object.prototype.toString.call(t)},g.arrayEquals=function(t,e){var i,n,a,r;if(!t||!e||t.length!=e.length)return!1;for(i=0,n=t.length;i');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push(""),e.join("")}}},a.Chart=a}},{}],28:[function(t,e,i){"use strict";e.exports=function(t){var C=t.helpers;t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),t.boxes.push(e)},removeBox:function(t,e){t.boxes&&t.boxes.splice(t.boxes.indexOf(e),1)},update:function(e,i,t){if(e){var n=C.where(e.boxes,function(t){return"left"===t.options.position}),a=C.where(e.boxes,function(t){return"right"===t.options.position}),r=C.where(e.boxes,function(t){return"top"===t.options.position}),o=C.where(e.boxes,function(t){return"bottom"===t.options.position}),s=C.where(e.boxes,function(t){return"chartArea"===t.options.position});r.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),o.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var l=i-0,u=t-0,d=u/2,c=(i-l/2)/(n.length+a.length),h=(t-d)/(r.length+o.length),f=l,g=u,p=[];C.each(n.concat(a,r,o),function(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?l:f,h),g-=e.height):(e=t.update(c,d),f-=e.width);p.push({horizontal:i,minSize:e,box:t})});var m=0,v=0,y=0,b=0;C.each(n.concat(a),_),C.each(n,function(t){m+=t.width}),C.each(a,function(t){v+=t.width}),C.each(r.concat(o),_),C.each(r,function(t){y+=t.height}),C.each(o,function(t){b+=t.height}),C.each(n.concat(a),function(e){var t=C.findNextWhere(p,function(t){return t.box===e}),i={left:0,right:0,top:y,bottom:b};t&&e.update(t.minSize.width,g,i)}),b=y=v=m=0,C.each(n,function(t){m+=t.width}),C.each(a,function(t){v+=t.width}),C.each(r,function(t){y+=t.height}),C.each(o,function(t){b+=t.height});var x=t-y-b,w=i-m-v;w===f&&x===g||(C.each(n,function(t){t.height=x}),C.each(a,function(t){t.height=x}),C.each(r,function(t){t.options.fullWidth||(t.width=w)}),C.each(o,function(t){t.options.fullWidth||(t.width=w)}),g=x,f=w);var k=0,S=0;C.each(n.concat(r),M),k+=f,S+=g,C.each(a,M),C.each(o,M),e.chartArea={left:m,top:y,right:m+f,bottom:y+g},C.each(s,function(t){t.left=e.chartArea.left,t.top=e.chartArea.top,t.right=e.chartArea.right,t.bottom=e.chartArea.bottom,t.update(f,g)})}function _(e){var t=C.findNextWhere(p,function(t){return t.box===e});if(t)if(e.isHorizontal()){var i={left:m,right:v,top:0,bottom:0};e.update(e.options.fullWidth?l:f,u/2,i)}else e.update(t.minSize.width,g)}function M(t){t.isHorizontal()?(t.left=t.options.fullWidth?0:m,t.right=t.options.fullWidth?i-0:m+f,t.top=S,t.bottom=S+t.height,S=t.bottom):(t.left=k,t.right=k+t.width,t.top=y,t.bottom=y+g,k=t.right)}}}}},{}],29:[function(t,e,i){"use strict";e.exports=function(M){var C=M.helpers,t=C.noop;M.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},labels:{boxWidth:40,padding:10,generateLabels:function(i){var t=i.data;return C.isArray(t.datasets)?t.datasets.map(function(t,e){return{text:t.label,fillStyle:C.isArray(t.backgroundColor)?t.backgroundColor[0]:t.backgroundColor,hidden:!i.isDatasetVisible(e),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,datasetIndex:e}},this):[]}}},M.Legend=M.Element.extend({initialize:function(t){C.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:t,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:t,beforeSetDimensions:t,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:t,beforeBuildLabels:t,buildLabels:function(){this.legendItems=this.options.labels.generateLabels.call(this,this.chart),this.options.reverse&&this.legendItems.reverse()},afterBuildLabels:t,beforeFit:t,fit:function(){var n=this,t=n.options,a=t.labels,e=t.display,r=n.ctx,i=M.defaults.global,o=C.getValueOrDefault,s=o(a.fontSize,i.defaultFontSize),l=o(a.fontStyle,i.defaultFontStyle),u=o(a.fontFamily,i.defaultFontFamily),d=C.fontString(s,l,u),c=n.legendHitBoxes=[],h=n.minSize,f=n.isHorizontal();if(f?(h.width=n.maxWidth,h.height=e?10:0):(h.width=e?10:0,h.height=n.maxHeight),e)if(r.font=d,f){var g=n.lineWidths=[0],p=n.legendItems.length?s+a.padding:0;r.textAlign="left",r.textBaseline="top",C.each(n.legendItems,function(t,e){var i=(a.usePointStyle?s*Math.sqrt(2):a.boxWidth)+s/2+r.measureText(t.text).width;g[g.length-1]+i+a.padding>=n.width&&(p+=s+a.padding,g[g.length]=n.left),c[e]={left:0,top:0,width:i,height:s},g[g.length-1]+=i+a.padding}),h.height+=p}else{var m=a.padding,v=n.columnWidths=[],y=a.padding,b=0,x=0,w=s+m;C.each(n.legendItems,function(t,e){var i=(a.usePointStyle?2*a.boxWidth:a.boxWidth)+s/2+r.measureText(t.text).width;x+w>h.height&&(y+=b+a.padding,v.push(b),x=b=0),b=Math.max(b,i),x+=w,c[e]={left:0,top:0,width:i,height:s}}),y+=b,v.push(b),h.width+=y}n.width=h.width,n.height=h.height},afterFit:t,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var d=this,c=d.options,h=c.labels,f=M.defaults.global,g=f.elements.line,p=d.width,m=d.lineWidths;if(c.display){var v,y=d.ctx,b=C.getValueOrDefault,t=b(h.fontColor,f.defaultFontColor),x=b(h.fontSize,f.defaultFontSize),e=b(h.fontStyle,f.defaultFontStyle),i=b(h.fontFamily,f.defaultFontFamily),n=C.fontString(x,e,i);y.textAlign="left",y.textBaseline="top",y.lineWidth=.5,y.strokeStyle=t,y.fillStyle=t,y.font=n;var w=h.boxWidth,k=d.legendHitBoxes,S=d.isHorizontal();v=S?{x:d.left+(p-m[0])/2,y:d.top+h.padding,line:0}:{x:d.left+h.padding,y:d.top+h.padding,line:0};var _=x+h.padding;C.each(d.legendItems,function(t,e){var i,n,a,r,o=y.measureText(t.text).width,s=h.usePointStyle?x+x/2+o:w+x/2+o,l=v.x,u=v.y;S?p<=l+s&&(u=v.y+=_,v.line++,l=v.x=d.left+(p-m[v.line])/2):u+_>d.bottom&&(l=v.x=l+d.columnWidths[v.line]+h.padding,u=v.y=d.top,v.line++),function(t,e,i){if(!(isNaN(w)||w<=0)){if(y.save(),y.fillStyle=b(i.fillStyle,f.defaultColor),y.lineCap=b(i.lineCap,g.borderCapStyle),y.lineDashOffset=b(i.lineDashOffset,g.borderDashOffset),y.lineJoin=b(i.lineJoin,g.borderJoinStyle),y.lineWidth=b(i.lineWidth,g.borderWidth),y.strokeStyle=b(i.strokeStyle,f.defaultColor),y.setLineDash&&y.setLineDash(b(i.lineDash,g.borderDash)),c.labels&&c.labels.usePointStyle){var n=x*Math.SQRT2/2,a=n/Math.SQRT2,r=t+a,o=e+a;M.canvasHelpers.drawPoint(y,i.pointStyle,n,r,o)}else y.strokeRect(t,e,w,x),y.fillRect(t,e,w,x);y.restore()}}(l,u,t),k[e].left=l,k[e].top=u,i=l,n=u,a=t,r=o,y.fillText(a.text,w+x/2+i,n),a.hidden&&(y.beginPath(),y.lineWidth=2,y.moveTo(w+x/2+i,n+x/2),y.lineTo(w+x/2+i+r,n+x/2),y.stroke()),S?v.x+=s+h.padding:v.y+=_})}},handleEvent:function(t){var e=C.getRelativePosition(t,this.chart.chart),i=e.x,n=e.y,a=this.options;if(i>=this.left&&i<=this.right&&n>=this.top&&n<=this.bottom)for(var r=this.legendHitBoxes,o=0;o=s.left&&i<=s.left+s.width&&n>=s.top&&n<=s.top+s.height){a.onClick&&a.onClick.call(this,t,this.legendItems[o]);break}}}}),M.plugins.register({beforeInit:function(t){var e=t.options.legend;e&&(t.legend=new M.Legend({ctx:t.chart.ctx,options:e,chart:t}),M.layoutService.addBox(t,t.legend))}})}},{}],30:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers.noop;t.plugins={_plugins:[],register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)})},unregister:function(t){var i=this._plugins;[].concat(t).forEach(function(t){var e=i.indexOf(t);-1!==e&&i.splice(e,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e){var i,n,a=this._plugins,r=a.length;for(i=0;it.yLabelWidth&&(t.paddingLeft=l+a/2),t.paddingRight=a/2,h*f>t.maxHeight){t.labelRotation--;break}t.labelRotation++,g=c*f}}t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0))},afterCalculateTickRotation:function(){Y.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){Y.callCallback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=t.options,n=N.defaults.global,a=i.ticks,r=i.scaleLabel,o=i.display,s=t.isHorizontal(),l=Y.getValueOrDefault(a.fontSize,n.defaultFontSize),u=Y.getValueOrDefault(a.fontStyle,n.defaultFontStyle),d=Y.getValueOrDefault(a.fontFamily,n.defaultFontFamily),c=Y.fontString(l,u,d),h=Y.getValueOrDefault(r.fontSize,n.defaultFontSize),f=i.gridLines.tickMarkLength;if(e.width=s?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:o?f:0,e.height=s?o?f:0:t.maxHeight,r.display&&o&&(s?e.height+=1.5*h:e.width+=1.5*h),a.display&&o){t.longestTextCache||(t.longestTextCache={});var g=Y.longestText(t.ctx,c,t.ticks,t.longestTextCache),p=Y.numberOfLabelLines(t.ticks),m=.5*l;if(s){t.longestLabelWidth=g;var v=Math.sin(Y.toRadians(t.labelRotation))*t.longestLabelWidth+l*p+m*p;e.height=Math.min(t.maxHeight,e.height+v),t.ctx.font=c;var y=t.ctx.measureText(t.ticks[0]).width,b=t.ctx.measureText(t.ticks[t.ticks.length-1]).width,x=Math.cos(Y.toRadians(t.labelRotation)),w=Math.sin(Y.toRadians(t.labelRotation));t.paddingLeft=0!==t.labelRotation?x*y+3:y/2+3,t.paddingRight=0!==t.labelRotation?w*(l/2)+3:b/2+3}else{var k=t.maxWidth-e.width;a.mirror?g=0:g+=t.options.ticks.padding,gx.width-(x.paddingLeft+x.paddingRight)&&(k=1+Math.floor((m+S.autoSkipPadding)*x.ticks.length/(x.width-(x.paddingLeft+x.paddingRight)))),t&&x.ticks.length>t)for(;!k||x.ticks.length/(k||1)>t;)k||(k=1),k+=1;n||(k=!1)}var P="right"===w.position?x.left:x.right-D,I="right"===w.position?x.left+D:x.right,O="bottom"===w.position?x.top:x.bottom-D,F="bottom"===w.position?x.top+D:x.bottom;if(Y.each(x.ticks,function(t,e){if(null!=t){var i=x.ticks.length===e+1;if((!(1=x.ticks.length)||i)&&null!=t){var n,a,r,o,s,l,u,d,c,h,f,g;a=e===(void 0!==x.zeroLineIndex?x.zeroLineIndex:0)?(n=_.zeroLineWidth,_.zeroLineColor):(n=Y.getValueAtIndexOrDefault(_.lineWidth,e),Y.getValueAtIndexOrDefault(_.color,e));var p,m="middle";if(C){M||(m="top"===w.position?"bottom":"top"),p=M?"right":"center";var v=x.getPixelForTick(e)+Y.aliasPixel(n);f=x.getPixelForTick(e,_.offsetGridLines)+S.labelOffset,g=M?x.top+12:"top"===w.position?x.bottom-D:x.top+D,r=s=u=c=v,o=O,l=F,d=b.top,h=b.bottom}else{p="left"===w.position?S.mirror?(f=x.right+S.padding,"left"):(f=x.right-S.padding,"right"):S.mirror?(f=x.left-S.padding,"right"):(f=x.left+S.padding,"left");var y=x.getPixelForTick(e);y+=Y.aliasPixel(n),g=x.getPixelForTick(e,_.offsetGridLines),r=P,s=I,u=b.left,c=b.right,o=l=d=h=y}T.push({tx1:r,ty1:o,tx2:s,ty2:l,x1:u,y1:d,x2:c,y2:h,labelX:f,labelY:g,glWidth:n,glColor:a,rotation:-1*A,label:t,textBaseline:m,textAlign:p})}}}),Y.each(T,function(t){if(_.display&&(a.lineWidth=t.glWidth,a.strokeStyle=t.glColor,a.beginPath(),_.drawTicks&&(a.moveTo(t.tx1,t.ty1),a.lineTo(t.tx2,t.ty2)),_.drawOnChartArea&&(a.moveTo(t.x1,t.y1),a.lineTo(t.x2,t.y2)),a.stroke()),S.display){a.save(),a.translate(t.labelX,t.labelY),a.rotate(t.rotation),a.font=u,a.textBaseline=t.textBaseline,a.textAlign=t.textAlign;var e=t.label;if(Y.isArray(e))for(var i=0,n=0;is.height-e.height&&(o.yAlign="bottom");var u=(l.left+l.right)/2,d=(l.top+l.bottom)/2;i="center"===o.yAlign?(t=function(t){return t<=u},function(t){return u=s.width-e.width/2}),n=function(t){return t+e.width>s.width},a=function(t){return t-e.width<0},r=function(t){return t<=d?"top":"bottom"},t(o.x)?(o.xAlign="left",n(o.x)&&(o.xAlign="center",o.yAlign=r(o.y))):i(o.x)&&(o.xAlign="right",a(o.x)&&(o.xAlign="center",o.yAlign=r(o.y)))},getBackgroundPoint:function(t,e){var i={x:t.x,y:t.y},n=t.caretSize,a=t.caretPadding,r=t.cornerRadius,o=t.xAlign,s=t.yAlign,l=n+a,u=r+a;return"right"===o?i.x-=e.width:"center"===o&&(i.x-=e.width/2),"top"===s?i.y+=l:i.y-="bottom"===s?e.height+l:e.height/2,"center"===s?"left"===o?i.x+=l:"right"===o&&(i.x-=l):"left"===o?i.x-=u:"right"===o&&(i.x+=u),i},drawCaret:function(t,e,i){var n,a,r,o,s,l,u=this._view,d=this._chart.ctx,c=u.caretSize,h=u.cornerRadius,f=u.xAlign,g=u.yAlign,p=t.x,m=t.y,v=e.width,y=e.height;l="center"===g?(r=(a="left"===f?(n=p)-c:(n=p+v)+c,n),o=(s=m+y/2)-c,s+c):(r="left"===f?(a=(n=p+h)+c)+c:"right"===f?(a=(n=p+v-h)-c)-c:(n=(a=p+v/2)-c,a+c),s="top"===g?(o=m)-c:(o=m+y)+c,o);var b=x.color(u.backgroundColor);d.fillStyle=b.alpha(i*b.alpha()).rgbString(),d.beginPath(),d.moveTo(n,o),d.lineTo(a,s),d.lineTo(r,l),d.closePath(),d.fill()},drawTitle:function(t,e,i,n){var a=e.title;if(a.length){i.textAlign=e._titleAlign,i.textBaseline="top";var r,o,s=e.titleFontSize,l=e.titleSpacing,u=x.color(e.titleFontColor);for(i.fillStyle=u.alpha(n*u.alpha()).rgbString(),i.font=x.fontString(s,e._titleFontStyle,e._titleFontFamily),r=0,o=a.length;r=i.innerRadius&&r<=i.outerRadius;return l&&u}return!1},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],36:[function(t,e,i){"use strict";e.exports=function(t){var f=t.helpers,g=t.defaults.global;t.defaults.global.elements.line={tension:.4,backgroundColor:g.defaultColor,borderWidth:3,borderColor:g.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},t.elements.Line=t.Element.extend({draw:function(){var t=this._view,e=t.spanGaps,i=t.scaleZero,n=this._loop,a=this._chart.ctx;function r(t,e){var i=e._view;!0===e._view.steppedLine?(a.lineTo(e._view.x,t._view.y),a.lineTo(e._view.x,e._view.y)):0===e._view.tension?a.lineTo(i.x,i.y):a.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,i.controlPointPreviousX,i.controlPointPreviousY,i.x,i.y)}a.save();var o,s,l,u,d=this._children.slice(),c=-1;if(n&&d.length&&d.push(d[0]),d.length&&t.fill){for(a.beginPath(),o=0;o=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.y&&e<=i.base:t>=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.base&&e<=i.y)},inLabelRange:function(t){var e=this._view;return!!e&&(t>=e.x-e.width/2&&t<=e.x+e.width/2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],39:[function(t,e,i){"use strict";e.exports=function(t){var n=t.helpers,e=t.Scale.extend({getLabels:function(){var t=this.chart.data;return(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t,e=this,i=e.getLabels();e.minIndex=0,e.maxIndex=i.length-1,void 0!==e.options.ticks.min&&(t=n.indexOf(i,e.options.ticks.min),e.minIndex=-1!==t?t:e.minIndex),void 0!==e.options.ticks.max&&(t=n.indexOf(i,e.options.ticks.max),e.maxIndex=-1!==t?t:e.maxIndex),e.min=i[e.minIndex],e.max=i[e.maxIndex]},buildTicks:function(){var t=this.getLabels();this.ticks=0===this.minIndex&&this.maxIndex===t.length-1?t:t.slice(this.minIndex,this.maxIndex+1)},getLabelForIndex:function(t){return this.ticks[t]},getPixelForValue:function(t,e,i,n){var a=this,r=Math.max(a.maxIndex+1-a.minIndex-(a.options.gridLines.offsetGridLines?0:1),1);if(void 0!==t){var o=a.getLabels().indexOf(t);e=-1!==o?o:e}if(a.isHorizontal()){var s=(a.width-(a.paddingLeft+a.paddingRight))/r,l=s*(e-a.minIndex)+a.paddingLeft;return a.options.gridLines.offsetGridLines&&n&&(l+=s/2),a.left+Math.round(l)}var u=(a.height-(a.paddingTop+a.paddingBottom))/r,d=u*(e-a.minIndex)+a.paddingTop;return a.options.gridLines.offsetGridLines&&n&&(d+=u/2),a.top+Math.round(d)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e=this,i=Math.max(e.ticks.length-(e.options.gridLines.offsetGridLines?0:1),1),n=e.isHorizontal(),a=(n?e.width-(e.paddingLeft+e.paddingRight):e.height-(e.paddingTop+e.paddingBottom))/i;return t-=n?e.left:e.top,e.options.gridLines.offsetGridLines&&(t-=a/2),(t-=n?e.paddingLeft:e.paddingTop)<=0?0:Math.round(t/a)},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",e,{position:"bottom"})}},{}],40:[function(t,e,i){"use strict";e.exports=function(n){var d=n.helpers,t={position:"left",ticks:{callback:function(t,e,i){var n=3o.max&&(o.max=i))})});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 i=d.getValueOrDefault(e.fontSize,n.defaults.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*i)))}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,i,n=this,a=n.paddingLeft,r=n.paddingBottom,o=n.start,s=+n.getRightValue(t),l=n.end-o;return n.isHorizontal()?(i=n.width-(a+n.paddingRight),e=n.left+i/l*(s-o),Math.round(e+a)):(i=n.height-(n.paddingTop+r),e=n.bottom-r-i/l*(s-o),Math.round(e))},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=e.paddingLeft,a=e.paddingBottom,r=i?e.width-(n+e.paddingRight):e.height-(e.paddingTop+a),o=(i?t-e.left-n:e.bottom-a-t)/r;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});n.scaleService.registerScaleType("linear",e,t)}},{}],41:[function(t,e,i){"use strict";e.exports=function(t){var h=t.helpers,e=h.noop;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=h.sign(t.min),n=h.sign(t.max);i<0&&n<0?t.max=0:0r.max&&(r.max=i))})});r.min=n(t.min,r.min),r.max=n(t.max,r.max),r.min===r.max&&(0!==r.min&&null!==r.min?(r.min=Math.pow(10,Math.floor(d.log10(r.min))-1),r.max=Math.pow(10,Math.floor(d.log10(r.max))+1)):(r.min=1,r.max=10))},buildTicks:function(){for(var t=this,e=t.options.ticks,i=d.getValueOrDefault,n=t.ticks=[],a=i(e.min,Math.pow(10,Math.floor(d.log10(t.min))));aa.max&&(a.max=i))})}}),a.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,e=S.getValueOrDefault(t.fontSize,_.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){t.LinearScaleBase.prototype.convertTicksToLabels.call(this),this.pointLabels=this.chart.data.labels.map(this.options.pointLabels.callback,this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,e,i,n,a,r,o,s,l,u,d,c,h=this.options.pointLabels,f=S.getValueOrDefault(h.fontSize,_.defaultFontSize),g=S.getValueOrDefault(h.fontStyle,_.defaultFontStyle),p=S.getValueOrDefault(h.fontFamily,_.defaultFontFamily),m=S.fontString(f,g,p),v=S.min([this.height/2-f-5,this.width/2]),y=this.width,b=0;for(this.ctx.font=m,e=0;ey&&(y=t.x+n,a=e),t.x-ny&&(y=t.x+i,a=e):t.x-i=Math.ceil(n.scaleSizeInUnits/u)){n.unitScale=x.getValueOrDefault(n.options.time.unitStepSize,c.steps[h]);break}break}if(!1===c.maxStep||Math.ceil(n.scaleSizeInUnits/u)