| Current Path : /home/jeromecohp/www/tmp/yooessentials/modules/element/elements/chart/assets/ |
| Current File : /home/jeromecohp/www/tmp/yooessentials/modules/element/elements/chart/assets/chart.min.js |
/* Essentials YOOtheme Pro (Freemium) 1.6.8; ZOOlanders https://www.zoolanders.com; Copyright (C) Joolanders, SL; http://www.gnu.org/licenses/gpl.html GNU/GPL */
!function(t){"use strict";var s=(t=t)&&"object"==typeof t&&"default"in t?t:{default:t};function l(){return(l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,i=arguments[e];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"&&self;function e(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return co(e??n.path)}},n.exports),n.exports}function co(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var n=e(function(uo,t){uo.exports=function(){var R,Y;function c(){return R.apply(null,arguments)}function W(t){R=t}function o(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function E(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function l(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function z(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(l(t,e))return!1;return!0}function s(t){return t===void 0}function u(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function V(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function H(t,e){var n=[],i,r=t.length;for(i=0;i<r;++i)n.push(e(t[i],i));return n}function B(t,e){for(var n in e)l(e,n)&&(t[n]=e[n]);return l(e,"toString")&&(t.toString=e.toString),l(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,i){return Kn(t,e,n,i,!0).utc()}function j(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function h(t){return t._pf==null&&(t._pf=j()),t._pf}function U(t){if(t._isValid==null){var e=h(t),n=Y.call(e.parsedDateParts,function(t){return t!=null}),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=i;else return i}return t._isValid}function G(t){var e=d(NaN);return t!=null?B(h(e),t):h(e).userInvalidated=!0,e}Array.prototype.some?Y=Array.prototype.some:Y=function(t){var e=Object(this),n=e.length>>>0,i;for(i=0;i<n;i++)if(i in e&&t.call(this,e[i],i,e))return!0;return!1};var q=c.momentProperties=[],Z=!1;function $(t,e){var n,i,r,a=q.length;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=h(e)),s(e._locale)||(t._locale=e._locale),a>0)for(n=0;n<a;n++)i=q[n],r=e[i],s(r)||(t[i]=r);return t}function X(t){$(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Z===!1&&(Z=!0,c.updateOffset(this),Z=!1)}function f(t){return t instanceof X||t!=null&&t._isAMomentObject!=null}function J(t){c.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function t(a,o){var s=!0;return B(function(){if(c.deprecationHandler!=null&&c.deprecationHandler(null,a),s){var t=[],e,n,i,r=arguments.length;for(n=0;n<r;n++){if(e="",typeof arguments[n]=="object"){e+=`
[`+n+"] ";for(i in arguments[0])l(arguments[0],i)&&(e+=i+": "+arguments[0][i]+", ");e=e.slice(0,-2)}else e=arguments[n];t.push(e)}J(a+`
Arguments: `+Array.prototype.slice.call(t).join("")+`
`+(new Error).stack),s=!1}return o.apply(this,arguments)},o)}var K={},Q;function tt(t,e){c.deprecationHandler!=null&&c.deprecationHandler(t,e),K[t]||(J(e),K[t]=!0)}function g(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function et(t){var e,n;for(n in t)l(t,n)&&(e=t[n],g(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function nt(t,e){var n=B({},t),i;for(i in e)l(e,i)&&(E(t[i])&&E(e[i])?(n[i]={},B(n[i],t[i]),B(n[i],e[i])):e[i]!=null?n[i]=e[i]:delete n[i]);for(i in t)l(t,i)&&!l(e,i)&&E(t[i])&&(n[i]=B({},n[i]));return n}function it(t){t!=null&&this.set(t)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,Object.keys?Q=Object.keys:Q=function(t){var e,n=[];for(e in t)l(t,e)&&n.push(e);return n};var rt={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function at(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return g(i)?i.call(e,n):i}function a(t,e,n){var i=""+Math.abs(t),r=e-i.length,a=t>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var ot=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,st=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,lt={},ut={};function i(t,e,n,i){var r=i;typeof i=="string"&&(r=function(){return this[i]()}),t&&(ut[t]=r),e&&(ut[e[0]]=function(){return a(r.apply(this,arguments),e[1],e[2])}),n&&(ut[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function dt(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function ct(i){var r=i.match(ot),t,a;for(t=0,a=r.length;t<a;t++)ut[r[t]]?r[t]=ut[r[t]]:r[t]=dt(r[t]);return function(t){var e="",n;for(n=0;n<a;n++)e+=g(r[n])?r[n].call(t,i):r[n];return e}}function ht(t,e){return t.isValid()?(e=ft(e,t.localeData()),lt[e]=lt[e]||ct(e),lt[e](t)):t.localeData().invalidDate()}function ft(t,e){var n=5;function i(t){return e.longDateFormat(t)||t}for(st.lastIndex=0;n>=0&&st.test(t);)t=t.replace(st,i),st.lastIndex=0,n-=1;return t}var gt={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"};function mt(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(ot).map(function(t){return t==="MMMM"||t==="MM"||t==="DD"||t==="dddd"?t.slice(1):t}).join(""),this._longDateFormat[t])}var pt="Invalid date";function vt(){return this._invalidDate}var yt="%d",bt=/\d{1,2}/;function xt(t){return this._ordinal.replace("%d",t)}var _t={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function wt(t,e,n,i){var r=this._relativeTime[n];return g(r)?r(t,e,n,i):r.replace(/%d/i,t)}function kt(t,e){var n=this._relativeTime[t>0?"future":"past"];return g(n)?n(e):n.replace(/%s/i,e)}var Mt={};function e(t,e){var n=t.toLowerCase();Mt[n]=Mt[n+"s"]=Mt[e]=t}function m(t){return typeof t=="string"?Mt[t]||Mt[t.toLowerCase()]:void 0}function St(t){var e={},n,i;for(i in t)l(t,i)&&(n=m(i),n&&(e[n]=t[i]));return e}var Dt={};function n(t,e){Dt[t]=e}function Ct(t){var e=[],n;for(n in t)l(t,n)&&e.push({unit:n,priority:Dt[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}function Pt(t){return t%4===0&&t%100!==0||t%400===0}function p(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function v(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=p(e)),n}function Tt(e,n){return function(t){return t!=null?(At(this,e,t),c.updateOffset(this,n),this):Ot(this,e)}}function Ot(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function At(t,e,n){t.isValid()&&!isNaN(n)&&(e==="FullYear"&&Pt(t.year())&&t.month()===1&&t.date()===29?(n=v(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),ae(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Ft(t){return t=m(t),g(this[t])?this[t]():this}function It(t,e){if(typeof t=="object"){t=St(t);var n=Ct(t),i,r=n.length;for(i=0;i<r;i++)this[n[i].unit](t[n[i].unit])}else if(t=m(t),g(this[t]))return this[t](e);return this}var Nt=/\d/,r=/\d\d/,Lt=/\d{3}/,Rt=/\d{4}/,Yt=/[+-]?\d{6}/,y=/\d\d?/,Wt=/\d\d\d\d?/,Et=/\d\d\d\d\d\d?/,zt=/\d{1,3}/,Vt=/\d{1,4}/,Ht=/[+-]?\d{1,6}/,Bt=/\d+/,jt=/[+-]?\d+/,Ut=/Z|[+-]\d\d:?\d\d/gi,Gt=/Z|[+-]\d\d(?::?\d\d)?/gi,qt=/[+-]?\d+(\.\d{1,3})?/,Zt=/[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,$t;function b(t,n,i){$t[t]=g(n)?n:function(t,e){return t&&i?i:n}}function Xt(t,e){return l($t,t)?$t[t](e._strict,e._locale):new RegExp(Jt(t))}function Jt(t){return x(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}))}function x(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var $t={},Kt={};function _(t,n){var e,i=n,r;for(typeof t=="string"&&(t=[t]),u(n)&&(i=function(t,e){e[n]=v(t)}),r=t.length,e=0;e<r;e++)Kt[t[e]]=i}function Qt(t,r){_(t,function(t,e,n,i){n._w=n._w||{},r(t,n._w,n,i)})}function te(t,e,n){e!=null&&l(Kt,t)&&Kt[t](e,n._a,n,t)}var w=0,k=1,M=2,S=3,D=4,C=5,ee=6,ne=7,ie=8,P;function re(t,e){return(t%e+e)%e}function ae(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=re(e,12);return t+=(e-n)/12,n===1?Pt(t)?29:28:31-n%7%2}Array.prototype.indexOf?P=Array.prototype.indexOf:P=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},i("M",["MM",2],"Mo",function(){return this.month()+1}),i("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),i("MMMM",0,0,function(t){return this.localeData().months(this,t)}),e("month","M"),n("month",8),b("M",y),b("MM",y,r),b("MMM",function(t,e){return e.monthsShortRegex(t)}),b("MMMM",function(t,e){return e.monthsRegex(t)}),_(["M","MM"],function(t,e){e[k]=v(t)-1}),_(["MMM","MMMM"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);r!=null?e[k]=r:h(n).invalidMonth=t});var oe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),se="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),le=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ue=Zt,de=Zt;function ce(t,e){return t?o(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||le).test(e)?"format":"standalone"][t.month()]:o(this._months)?this._months:this._months.standalone}function he(t,e){return t?o(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[le.test(e)?"format":"standalone"][t.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function fe(t,e,n){var i,r,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)a=d([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(a,"").toLocaleLowerCase();return n?e==="MMM"?(r=P.call(this._shortMonthsParse,o),r!==-1?r:null):(r=P.call(this._longMonthsParse,o),r!==-1?r:null):e==="MMM"?(r=P.call(this._shortMonthsParse,o),r!==-1?r:(r=P.call(this._longMonthsParse,o),r!==-1?r:null)):(r=P.call(this._longMonthsParse,o),r!==-1?r:(r=P.call(this._shortMonthsParse,o),r!==-1?r:null))}function ge(t,e,n){var i,r,a;if(this._monthsParseExact)return fe.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=d([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),!n&&!this._monthsParse[i]&&(a="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(a.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[i].test(t))return i;if(n&&e==="MMM"&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}}function me(t,e){var n;if(!t.isValid())return t;if(typeof e=="string")if(/^\d+$/.test(e))e=v(e);else if(e=t.localeData().monthsParse(e),!u(e))return t;return n=Math.min(t.date(),ae(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function pe(t){return t!=null?(me(this,t),c.updateOffset(this,!0),this):Ot(this,"Month")}function ve(){return ae(this.year(),this.month())}function ye(t){return this._monthsParseExact?(l(this,"_monthsRegex")||xe.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=ue),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function be(t){return this._monthsParseExact?(l(this,"_monthsRegex")||xe.call(this),t?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=de),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function xe(){function t(t,e){return e.length-t.length}var e=[],n=[],i=[],r,a;for(r=0;r<12;r++)a=d([2e3,r]),e.push(this.monthsShort(a,"")),n.push(this.months(a,"")),i.push(this.months(a,"")),i.push(this.monthsShort(a,""));for(e.sort(t),n.sort(t),i.sort(t),r=0;r<12;r++)e[r]=x(e[r]),n[r]=x(n[r]);for(r=0;r<24;r++)i[r]=x(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function _e(t){return Pt(t)?366:365}i("Y",0,0,function(){var t=this.year();return t<=9999?a(t,4):"+"+t}),i(0,["YY",2],0,function(){return this.year()%100}),i(0,["YYYY",4],0,"year"),i(0,["YYYYY",5],0,"year"),i(0,["YYYYYY",6,!0],0,"year"),e("year","y"),n("year",1),b("Y",jt),b("YY",y,r),b("YYYY",Vt,Rt),b("YYYYY",Ht,Yt),b("YYYYYY",Ht,Yt),_(["YYYYY","YYYYYY"],w),_("YYYY",function(t,e){e[w]=t.length===2?c.parseTwoDigitYear(t):v(t)}),_("YY",function(t,e){e[w]=c.parseTwoDigitYear(t)}),_("Y",function(t,e){e[w]=parseInt(t,10)}),c.parseTwoDigitYear=function(t){return v(t)+(v(t)>68?1900:2e3)};var we=Tt("FullYear",!0);function ke(){return Pt(this.year())}function Me(t,e,n,i,r,a,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,i,r,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,i,r,a,o),s}function Se(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function De(t,e,n){var i=7+e-n,r=(7+Se(t,0,i).getUTCDay()-e)%7;return-r+i-1}function Ce(t,e,n,i,r){var a=(7+n-i)%7,o=De(t,i,r),s=1+7*(e-1)+a+o,l,u;return s<=0?(l=t-1,u=_e(l)+s):s>_e(t)?(l=t+1,u=s-_e(t)):(l=t,u=s),{year:l,dayOfYear:u}}function Pe(t,e,n){var i=De(t.year(),e,n),r=Math.floor((t.dayOfYear()-i-1)/7)+1,a,o;return r<1?(o=t.year()-1,a=r+T(o,e,n)):r>T(t.year(),e,n)?(a=r-T(t.year(),e,n),o=t.year()+1):(o=t.year(),a=r),{week:a,year:o}}function T(t,e,n){var i=De(t,e,n),r=De(t+1,e,n);return(_e(t)-i+r)/7}function Te(t){return Pe(t,this._week.dow,this._week.doy).week}i("w",["ww",2],"wo","week"),i("W",["WW",2],"Wo","isoWeek"),e("week","w"),e("isoWeek","W"),n("week",5),n("isoWeek",5),b("w",y),b("ww",y,r),b("W",y),b("WW",y,r),Qt(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=v(t)});var Oe={dow:0,doy:6};function Ae(){return this._week.dow}function Fe(){return this._week.doy}function Ie(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function Ne(t){var e=Pe(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}function Le(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function Re(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Ye(t,e){return t.slice(e,7).concat(t.slice(0,e))}i("d",0,"do","day"),i("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),i("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),i("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),i("e",0,0,"weekday"),i("E",0,0,"isoWeekday"),e("day","d"),e("weekday","e"),e("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),b("d",y),b("e",y),b("E",y),b("dd",function(t,e){return e.weekdaysMinRegex(t)}),b("ddd",function(t,e){return e.weekdaysShortRegex(t)}),b("dddd",function(t,e){return e.weekdaysRegex(t)}),Qt(["dd","ddd","dddd"],function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);r!=null?e.d=r:h(n).invalidWeekday=t}),Qt(["d","e","E"],function(t,e,n,i){e[i]=v(t)});var We="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ee="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ve=Zt,He=Zt,Be=Zt;function je(t,e){var n=o(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?Ye(n,this._week.dow):t?n[t.day()]:n}function Ue(t){return t===!0?Ye(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Ge(t){return t===!0?Ye(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function qe(t,e,n){var i,r,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)a=d([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return n?e==="dddd"?(r=P.call(this._weekdaysParse,o),r!==-1?r:null):e==="ddd"?(r=P.call(this._shortWeekdaysParse,o),r!==-1?r:null):(r=P.call(this._minWeekdaysParse,o),r!==-1?r:null):e==="dddd"?(r=P.call(this._weekdaysParse,o),r!==-1||(r=P.call(this._shortWeekdaysParse,o),r!==-1)?r:(r=P.call(this._minWeekdaysParse,o),r!==-1?r:null)):e==="ddd"?(r=P.call(this._shortWeekdaysParse,o),r!==-1||(r=P.call(this._weekdaysParse,o),r!==-1)?r:(r=P.call(this._minWeekdaysParse,o),r!==-1?r:null)):(r=P.call(this._minWeekdaysParse,o),r!==-1||(r=P.call(this._weekdaysParse,o),r!==-1)?r:(r=P.call(this._shortWeekdaysParse,o),r!==-1?r:null))}function Ze(t,e,n){var i,r,a;if(this._weekdaysParseExact)return qe.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=d([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(a="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[i].test(t))return i;if(n&&e==="ddd"&&this._shortWeekdaysParse[i].test(t))return i;if(n&&e==="dd"&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function $e(t){if(!this.isValid())return t!=null?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return t!=null?(t=Le(t,this.localeData()),this.add(t-e,"d")):e}function Xe(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function Je(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=Re(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function Ke(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||en.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Ve),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Qe(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||en.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=He),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function tn(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||en.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Be),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function en(){function t(t,e){return e.length-t.length}var e=[],n=[],i=[],r=[],a,o,s,l,u;for(a=0;a<7;a++)o=d([2e3,1]).day(a),s=x(this.weekdaysMin(o,"")),l=x(this.weekdaysShort(o,"")),u=x(this.weekdays(o,"")),e.push(s),n.push(l),i.push(u),r.push(s),r.push(l),r.push(u);e.sort(t),n.sort(t),i.sort(t),r.sort(t),this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function nn(){return this.hours()%12||12}function rn(){return this.hours()||24}function an(t,e){i(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function on(t,e){return e._meridiemParse}function sn(t){return(t+"").toLowerCase().charAt(0)==="p"}i("H",["HH",2],0,"hour"),i("h",["hh",2],0,nn),i("k",["kk",2],0,rn),i("hmm",0,0,function(){return""+nn.apply(this)+a(this.minutes(),2)}),i("hmmss",0,0,function(){return""+nn.apply(this)+a(this.minutes(),2)+a(this.seconds(),2)}),i("Hmm",0,0,function(){return""+this.hours()+a(this.minutes(),2)}),i("Hmmss",0,0,function(){return""+this.hours()+a(this.minutes(),2)+a(this.seconds(),2)}),an("a",!0),an("A",!1),e("hour","h"),n("hour",13),b("a",on),b("A",on),b("H",y),b("h",y),b("k",y),b("HH",y,r),b("hh",y,r),b("kk",y,r),b("hmm",Wt),b("hmmss",Et),b("Hmm",Wt),b("Hmmss",Et),_(["H","HH"],S),_(["k","kk"],function(t,e,n){var i=v(t);e[S]=i===24?0:i}),_(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),_(["h","hh"],function(t,e,n){e[S]=v(t),h(n).bigHour=!0}),_("hmm",function(t,e,n){var i=t.length-2;e[S]=v(t.substr(0,i)),e[D]=v(t.substr(i)),h(n).bigHour=!0}),_("hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[S]=v(t.substr(0,i)),e[D]=v(t.substr(i,2)),e[C]=v(t.substr(r)),h(n).bigHour=!0}),_("Hmm",function(t,e,n){var i=t.length-2;e[S]=v(t.substr(0,i)),e[D]=v(t.substr(i))}),_("Hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[S]=v(t.substr(0,i)),e[D]=v(t.substr(i,2)),e[C]=v(t.substr(r))});var ln,un=Tt("Hours",!0);function dn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var cn={calendar:rt,longDateFormat:gt,invalidDate:pt,ordinal:yt,dayOfMonthOrdinalParse:bt,relativeTime:_t,months:oe,monthsShort:se,week:Oe,weekdays:We,weekdaysMin:ze,weekdaysShort:Ee,meridiemParse:/[ap]\.?m?\.?/i},O={},hn={},fn;function gn(t,e){var n,i=Math.min(t.length,e.length);for(n=0;n<i;n+=1)if(t[n]!==e[n])return n;return i}function mn(t){return t&&t.toLowerCase().replace("_","-")}function pn(t){for(var e=0,n,i,r,a;e<t.length;){for(a=mn(t[e]).split("-"),n=a.length,i=mn(t[e+1]),i=i?i.split("-"):null;n>0;){if(r=yn(a.slice(0,n).join("-")),r)return r;if(i&&i.length>=n&&gn(a,i)>=n-1)break;n--}e++}return fn}function vn(t){return t.match("^[^/\\\\]*$")!=null}function yn(t){var e=null,n;if(O[t]===void 0&&!0&&uo&&uo.exports&&vn(t))try{e=fn._abbr,n=co,n("./locale/"+t),bn(e)}catch{O[t]=null}return O[t]}function bn(t,e){var n;return t&&(s(e)?n=wn(t):n=xn(t,e),n?fn=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),fn._abbr}function xn(t,e){if(e!==null){var n,i=cn;if(e.abbr=t,O[t]!=null)tt("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=O[t]._config;else if(e.parentLocale!=null)if(O[e.parentLocale]!=null)i=O[e.parentLocale]._config;else if(n=yn(e.parentLocale),n!=null)i=n._config;else return hn[e.parentLocale]||(hn[e.parentLocale]=[]),hn[e.parentLocale].push({name:t,config:e}),null;return O[t]=new it(nt(i,e)),hn[t]&&hn[t].forEach(function(t){xn(t.name,t.config)}),bn(t),O[t]}else return delete O[t],null}function _n(t,e){if(e!=null){var n,i,r=cn;O[t]!=null&&O[t].parentLocale!=null?O[t].set(nt(O[t]._config,e)):(i=yn(t),i!=null&&(r=i._config),e=nt(r,e),i==null&&(e.abbr=t),n=new it(e),n.parentLocale=O[t],O[t]=n),bn(t)}else O[t]!=null&&(O[t].parentLocale!=null?(O[t]=O[t].parentLocale,t===bn()&&bn(t)):O[t]!=null&&delete O[t]);return O[t]}function wn(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return fn;if(!o(t)){if(e=yn(t),e)return e;t=[t]}return pn(t)}function kn(){return Q(O)}function Mn(t){var e,n=t._a;return n&&h(t).overflow===-2&&(e=n[k]<0||n[k]>11?k:n[M]<1||n[M]>ae(n[w],n[k])?M:n[S]<0||n[S]>24||n[S]===24&&(n[D]!==0||n[C]!==0||n[ee]!==0)?S:n[D]<0||n[D]>59?D:n[C]<0||n[C]>59?C:n[ee]<0||n[ee]>999?ee:-1,h(t)._overflowDayOfYear&&(e<w||e>M)&&(e=M),h(t)._overflowWeeks&&e===-1&&(e=ne),h(t)._overflowWeekday&&e===-1&&(e=ie),h(t).overflow=e),t}var 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=/^\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)?)?$/,Cn=/Z|[+-]\d\d(?::?\d\d)?/,Pn=[["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}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Tn=[["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/]],On=/^\/?Date\((-?\d+)/i,An=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Fn={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function In(t){var e,n,i=t._i,r=Sn.exec(i)||Dn.exec(i),a,o,s,l,u=Pn.length,d=Tn.length;if(r){for(h(t).iso=!0,e=0,n=u;e<n;e++)if(Pn[e][1].exec(r[1])){o=Pn[e][0],a=Pn[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(r[3]){for(e=0,n=d;e<n;e++)if(Tn[e][1].exec(r[3])){s=(r[2]||" ")+Tn[e][0];break}if(s==null){t._isValid=!1;return}}if(!a&&s!=null){t._isValid=!1;return}if(r[4])if(Cn.exec(r[4]))l="Z";else{t._isValid=!1;return}t._f=o+(s||"")+(l||""),Un(t)}else t._isValid=!1}function Nn(t,e,n,i,r,a){var o=[Ln(t),se.indexOf(e),parseInt(n,10),parseInt(i,10),parseInt(r,10)];return a&&o.push(parseInt(a,10)),o}function Ln(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Rn(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Yn(t,e,n){if(t){var i=Ee.indexOf(t),r=new Date(e[0],e[1],e[2]).getDay();if(i!==r)return h(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Wn(t,e,n){if(t)return Fn[t];if(e)return 0;var i=parseInt(n,10),r=i%100,a=(i-r)/100;return a*60+r}function En(t){var e=An.exec(Rn(t._i)),n;if(e){if(n=Nn(e[4],e[3],e[2],e[5],e[6],e[7]),!Yn(e[1],n,t))return;t._a=n,t._tzm=Wn(e[8],e[9],e[10]),t._d=Se.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),h(t).rfc2822=!0}else t._isValid=!1}function zn(t){var e=On.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(In(t),t._isValid===!1)delete t._isValid;else return;if(En(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:c.createFromInputFallback(t)}function Vn(t,e,n){return t??e??n}function Hn(t){var e=new Date(c.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Bn(t){var e,n,i=[],r,a,o;if(!t._d){for(r=Hn(t),t._w&&t._a[M]==null&&t._a[k]==null&&jn(t),t._dayOfYear!=null&&(o=Vn(t._a[w],r[w]),(t._dayOfYear>_e(o)||t._dayOfYear===0)&&(h(t)._overflowDayOfYear=!0),n=Se(o,0,t._dayOfYear),t._a[k]=n.getUTCMonth(),t._a[M]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=i[e]=r[e];for(;e<7;e++)t._a[e]=i[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[S]===24&&t._a[D]===0&&t._a[C]===0&&t._a[ee]===0&&(t._nextDay=!0,t._a[S]=0),t._d=(t._useUTC?Se:Me).apply(null,i),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[S]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==a&&(h(t).weekdayMismatch=!0)}}function jn(t){var e,n,i,r,a,o,s,l,u;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(a=1,o=4,n=Vn(e.GG,t._a[w],Pe(A(),1,4).year),i=Vn(e.W,1),r=Vn(e.E,1),(r<1||r>7)&&(l=!0)):(a=t._locale._week.dow,o=t._locale._week.doy,u=Pe(A(),a,o),n=Vn(e.gg,t._a[w],u.year),i=Vn(e.w,u.week),e.d!=null?(r=e.d,(r<0||r>6)&&(l=!0)):e.e!=null?(r=e.e+a,(e.e<0||e.e>6)&&(l=!0)):r=a),i<1||i>T(n,a,o)?h(t)._overflowWeeks=!0:l!=null?h(t)._overflowWeekday=!0:(s=Ce(n,i,r,a,o),t._a[w]=s.year,t._dayOfYear=s.dayOfYear)}function Un(t){if(t._f===c.ISO_8601){In(t);return}if(t._f===c.RFC_2822){En(t);return}t._a=[],h(t).empty=!0;var e=""+t._i,n,i,r,a,o,s=e.length,l=0,u,d;for(r=ft(t._f,t._locale).match(ot)||[],d=r.length,n=0;n<d;n++)a=r[n],i=(e.match(Xt(a,t))||[])[0],i&&(o=e.substr(0,e.indexOf(i)),o.length>0&&h(t).unusedInput.push(o),e=e.slice(e.indexOf(i)+i.length),l+=i.length),ut[a]?(i?h(t).empty=!1:h(t).unusedTokens.push(a),te(a,i,t)):t._strict&&!i&&h(t).unusedTokens.push(a);h(t).charsLeftOver=s-l,e.length>0&&h(t).unusedInput.push(e),t._a[S]<=12&&h(t).bigHour===!0&&t._a[S]>0&&(h(t).bigHour=void 0),h(t).parsedDateParts=t._a.slice(0),h(t).meridiem=t._meridiem,t._a[S]=Gn(t._locale,t._a[S],t._meridiem),u=h(t).era,u!==null&&(t._a[w]=t._locale.erasConvertYear(u,t._a[w])),Bn(t),Mn(t)}function Gn(t,e,n){var i;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(i=t.isPM(n),i&&e<12&&(e+=12),!i&&e===12&&(e=0)),e)}function qn(t){var e,n,i,r,a,o,s=!1,l=t._f.length;if(l===0){h(t).invalidFormat=!0,t._d=new Date(NaN);return}for(r=0;r<l;r++)a=0,o=!1,e=$({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[r],Un(e),U(e)&&(o=!0),a+=h(e).charsLeftOver,a+=h(e).unusedTokens.length*10,h(e).score=a,s?a<i&&(i=a,n=e):(i==null||a<i||o)&&(i=a,n=e,o&&(s=!0));B(t,n||e)}function Zn(t){if(!t._d){var e=St(t._i),n=e.day===void 0?e.date:e.day;t._a=H([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),Bn(t)}}function $n(t){var e=new X(Mn(Xn(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Xn(t){var e=t._i,n=t._f;return t._locale=t._locale||wn(t._l),e===null||n===void 0&&e===""?G({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),f(e)?new X(Mn(e)):(V(e)?t._d=e:o(n)?qn(t):n?Un(t):Jn(t),U(t)||(t._d=null),t))}function Jn(t){var e=t._i;s(e)?t._d=new Date(c.now()):V(e)?t._d=new Date(e.valueOf()):typeof e=="string"?zn(t):o(e)?(t._a=H(e.slice(0),function(t){return parseInt(t,10)}),Bn(t)):E(e)?Zn(t):u(e)?t._d=new Date(e):c.createFromInputFallback(t)}function Kn(t,e,n,i,r){var a={};return(e===!0||e===!1)&&(i=e,e=void 0),(n===!0||n===!1)&&(i=n,n=void 0),(E(t)&&z(t)||o(t)&&t.length===0)&&(t=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=r,a._l=n,a._i=t,a._f=e,a._strict=i,$n(a)}function A(t,e,n,i){return Kn(t,e,n,i,!1)}c.createFromInputFallback=t("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var Qn=t("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=A.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:G()}),ti=t("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=A.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:G()});function ei(t,e){var n,i;if(e.length===1&&o(e[0])&&(e=e[0]),!e.length)return A();for(n=e[0],i=1;i<e.length;++i)(!e[i].isValid()||e[i][t](n))&&(n=e[i]);return n}function ni(){var t=[].slice.call(arguments,0);return ei("isBefore",t)}function ii(){var t=[].slice.call(arguments,0);return ei("isAfter",t)}var ri=function(){return Date.now?Date.now():+new Date},ai=["year","quarter","month","week","day","hour","minute","second","millisecond"];function oi(t){var e,n=!1,i,r=ai.length;for(e in t)if(l(t,e)&&!(P.call(ai,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(i=0;i<r;++i)if(t[ai[i]]){if(n)return!1;parseFloat(t[ai[i]])!==v(t[ai[i]])&&(n=!0)}return!0}function si(){return this._isValid}function li(){return F(NaN)}function ui(t){var e=St(t),n=e.year||0,i=e.quarter||0,r=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,l=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=oi(e),this._milliseconds=+d+u*1e3+l*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+r+i*3+n*12,this._data={},this._locale=wn(),this._bubble()}function di(t){return t instanceof ui}function ci(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function hi(t,e,n){var i=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),a=0,o;for(o=0;o<i;o++)(n&&t[o]!==e[o]||!n&&v(t[o])!==v(e[o]))&&a++;return a+r}function fi(t,n){i(t,0,0,function(){var t=this.utcOffset(),e="+";return t<0&&(t=-t,e="-"),e+a(~~(t/60),2)+n+a(~~t%60,2)})}fi("Z",":"),fi("ZZ",""),b("Z",Gt),b("ZZ",Gt),_(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=mi(Gt,t)});var gi=/([\+\-]|\d\d)/gi;function mi(t,e){var n=(e||"").match(t),i,r,a;return n===null?null:(i=n[n.length-1]||[],r=(i+"").match(gi)||["-",0,0],a=+(r[1]*60)+v(r[2]),a===0?0:r[0]==="+"?a:-a)}function pi(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(f(t)||V(t)?t.valueOf():A(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),c.updateOffset(n,!1),n):A(t).local()}function vi(t){return-Math.round(t._d.getTimezoneOffset())}function yi(t,e,n){var i=this._offset||0,r;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=mi(Gt,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(r=vi(this)),this._offset=t,this._isUTC=!0,r!=null&&this.add(r,"m"),i!==t&&(!e||this._changeInProgress?Li(this,F(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:vi(this)}function bi(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function xi(t){return this.utcOffset(0,t)}function _i(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(vi(this),"m")),this}function wi(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=mi(Ut,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function ki(t){return this.isValid()?(t=t?A(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function Mi(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Si(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={},e;return $(t,this),t=Xn(t),t._a?(e=t._isUTC?d(t._a):A(t._a),this._isDSTShifted=this.isValid()&&hi(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Di(){return this.isValid()?!this._isUTC:!1}function Ci(){return this.isValid()?this._isUTC:!1}function Pi(){return this.isValid()?this._isUTC&&this._offset===0:!1}c.updateOffset=function(){};var Ti=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Oi=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function F(t,e){var n=t,i=null,r,a,o;return di(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:u(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(i=Ti.exec(t))?(r=i[1]==="-"?-1:1,n={y:0,d:v(i[M])*r,h:v(i[S])*r,m:v(i[D])*r,s:v(i[C])*r,ms:v(ci(i[ee]*1e3))*r}):(i=Oi.exec(t))?(r=i[1]==="-"?-1:1,n={y:Ai(i[2],r),M:Ai(i[3],r),w:Ai(i[4],r),d:Ai(i[5],r),h:Ai(i[6],r),m:Ai(i[7],r),s:Ai(i[8],r)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=Ii(A(n.from),A(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new ui(n),di(t)&&l(t,"_locale")&&(a._locale=t._locale),di(t)&&l(t,"_isValid")&&(a._isValid=t._isValid),a}function Ai(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Fi(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ii(t,e){var n;return t.isValid()&&e.isValid()?(e=pi(e,t),t.isBefore(e)?n=Fi(t,e):(n=Fi(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ni(r,a){return function(t,e){var n,i;return e!==null&&!isNaN(+e)&&(tt(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=t,t=e,e=i),n=F(t,e),Li(this,n,r),this}}function Li(t,e,n,i){var r=e._milliseconds,a=ci(e._days),o=ci(e._months);!t.isValid()||(i=i??!0,o&&me(t,Ot(t,"Month")+o*n),a&&At(t,"Date",Ot(t,"Date")+a*n),r&&t._d.setTime(t._d.valueOf()+r*n),i&&c.updateOffset(t,a||o))}F.fn=ui.prototype,F.invalid=li;var Ri=Ni(1,"add"),Yi=Ni(-1,"subtract");function Wi(t){return typeof t=="string"||t instanceof String}function Ei(t){return f(t)||V(t)||Wi(t)||u(t)||Vi(t)||zi(t)||t===null||t===void 0}function zi(t){var e=E(t)&&!z(t),n=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,a,o=i.length;for(r=0;r<o;r+=1)a=i[r],n=n||l(t,a);return e&&n}function Vi(e){var t=o(e),n=!1;return t&&(n=e.filter(function(t){return!u(t)&&Wi(e)}).length===0),t&&n}function Hi(t){var e=E(t)&&!z(t),n=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],r,a;for(r=0;r<i.length;r+=1)a=i[r],n=n||l(t,a);return e&&n}function Bi(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 ji(t,e){arguments.length===1&&(arguments[0]?Ei(arguments[0])?(t=arguments[0],e=void 0):Hi(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||A(),i=pi(n,this).startOf("day"),r=c.calendarFormat(this,i)||"sameElse",a=e&&(g(e[r])?e[r].call(this,n):e[r]);return this.format(a||this.localeData().calendar(r,this,A(n)))}function Ui(){return new X(this)}function Gi(t,e){var n=f(t)?t:A(t);return this.isValid()&&n.isValid()?(e=m(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function qi(t,e){var n=f(t)?t:A(t);return this.isValid()&&n.isValid()?(e=m(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function Zi(t,e,n,i){var r=f(t)?t:A(t),a=f(e)?e:A(e);return this.isValid()&&r.isValid()&&a.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(r,n):!this.isBefore(r,n))&&(i[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function $i(t,e){var n=f(t)?t:A(t),i;return this.isValid()&&n.isValid()?(e=m(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf())):!1}function Xi(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Ji(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Ki(t,e,n){var i,r,a;if(!this.isValid())return NaN;if(i=pi(t,this),!i.isValid())return NaN;switch(r=(i.utcOffset()-this.utcOffset())*6e4,e=m(e),e){case"year":a=Qi(this,i)/12;break;case"month":a=Qi(this,i);break;case"quarter":a=Qi(this,i)/3;break;case"second":a=(this-i)/1e3;break;case"minute":a=(this-i)/6e4;break;case"hour":a=(this-i)/36e5;break;case"day":a=(this-i-r)/864e5;break;case"week":a=(this-i-r)/6048e5;break;default:a=this-i}return n?a:p(a)}function Qi(t,e){if(t.date()<e.date())return-Qi(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),i=t.clone().add(n,"months"),r,a;return e-i<0?(r=t.clone().add(n-1,"months"),a=(e-i)/(i-r)):(r=t.clone().add(n+1,"months"),a=(e-i)/(r-i)),-(n+a)||0}function tr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function er(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?ht(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):g(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ht(n,"Z")):ht(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function nr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,i,r,a;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",a=e+'[")]',this.format(n+i+r+a)}function ir(t){t||(t=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var e=ht(this,t);return this.localeData().postformat(e)}function rr(t,e){return this.isValid()&&(f(t)&&t.isValid()||A(t).isValid())?F({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ar(t){return this.from(A(),t)}function or(t,e){return this.isValid()&&(f(t)&&t.isValid()||A(t).isValid())?F({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function sr(t){return this.to(A(),t)}function lr(t){var e;return t===void 0?this._locale._abbr:(e=wn(t),e!=null&&(this._locale=e),this)}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ur=t("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function dr(){return this._locale}var cr=1e3,hr=60*cr,fr=60*hr,gr=(365*400+97)*24*fr;function mr(t,e){return(t%e+e)%e}function pr(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-gr:new Date(t,e,n).valueOf()}function vr(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-gr:Date.UTC(t,e,n)}function yr(t){var e,n;if(t=m(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?vr:pr,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-=mr(e+(this._isUTC?0:this.utcOffset()*hr),fr);break;case"minute":e=this._d.valueOf(),e-=mr(e,hr);break;case"second":e=this._d.valueOf(),e-=mr(e,cr);break}return this._d.setTime(e),c.updateOffset(this,!0),this}function br(t){var e,n;if(t=m(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?vr:pr,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+=fr-mr(e+(this._isUTC?0:this.utcOffset()*hr),fr)-1;break;case"minute":e=this._d.valueOf(),e+=hr-mr(e,hr)-1;break;case"second":e=this._d.valueOf(),e+=cr-mr(e,cr)-1;break}return this._d.setTime(e),c.updateOffset(this,!0),this}function xr(){return this._d.valueOf()-(this._offset||0)*6e4}function _r(){return Math.floor(this.valueOf()/1e3)}function wr(){return new Date(this.valueOf())}function kr(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Mr(){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 Sr(){return this.isValid()?this.toISOString():null}function Dr(){return U(this)}function Cr(){return B({},h(this))}function Pr(){return h(this).overflow}function Tr(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Or(t,e){var n,i,r,a=this._eras||wn("en")._eras;for(n=0,i=a.length;n<i;++n){switch(typeof a[n].since){case"string":r=c(a[n].since).startOf("day"),a[n].since=r.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":r=c(a[n].until).startOf("day").valueOf(),a[n].until=r.valueOf();break}}return a}function Ar(t,e,n){var i,r,a=this.eras(),o,s,l;for(t=t.toUpperCase(),i=0,r=a.length;i<r;++i)if(o=a[i].name.toUpperCase(),s=a[i].abbr.toUpperCase(),l=a[i].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(s===t)return a[i];break;case"NNNN":if(o===t)return a[i];break;case"NNNNN":if(l===t)return a[i];break}else if([o,s,l].indexOf(t)>=0)return a[i]}function Fr(t,e){var n=t.since<=t.until?1:-1;return e===void 0?c(t.since).year():c(t.since).year()+(e-t.offset)*n}function Ir(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until||i[t].until<=n&&n<=i[t].since)return i[t].name;return""}function Nr(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until||i[t].until<=n&&n<=i[t].since)return i[t].narrow;return""}function Lr(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until||i[t].until<=n&&n<=i[t].since)return i[t].abbr;return""}function Rr(){var t,e,n,i,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=r[t].since<=r[t].until?1:-1,i=this.clone().startOf("day").valueOf(),r[t].since<=i&&i<=r[t].until||r[t].until<=i&&i<=r[t].since)return(this.year()-c(r[t].since).year())*n+r[t].offset;return this.year()}function Yr(t){return l(this,"_erasNameRegex")||jr.call(this),t?this._erasNameRegex:this._erasRegex}function Wr(t){return l(this,"_erasAbbrRegex")||jr.call(this),t?this._erasAbbrRegex:this._erasRegex}function Er(t){return l(this,"_erasNarrowRegex")||jr.call(this),t?this._erasNarrowRegex:this._erasRegex}function zr(t,e){return e.erasAbbrRegex(t)}function Vr(t,e){return e.erasNameRegex(t)}function Hr(t,e){return e.erasNarrowRegex(t)}function Br(t,e){return e._eraYearOrdinalRegex||Bt}function jr(){var t=[],e=[],n=[],i=[],r,a,o=this.eras();for(r=0,a=o.length;r<a;++r)e.push(x(o[r].name)),t.push(x(o[r].abbr)),n.push(x(o[r].narrow)),i.push(x(o[r].name)),i.push(x(o[r].abbr)),i.push(x(o[r].narrow));this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function Ur(t,e){i(0,[t,t.length],0,e)}function Gr(t){return Kr.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function qr(t){return Kr.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Zr(){return T(this.year(),1,4)}function $r(){return T(this.isoWeekYear(),1,4)}function Xr(){var t=this.localeData()._week;return T(this.year(),t.dow,t.doy)}function Jr(){var t=this.localeData()._week;return T(this.weekYear(),t.dow,t.doy)}function Kr(t,e,n,i,r){var a;return t==null?Pe(this,i,r).year:(a=T(t,i,r),e>a&&(e=a),Qr.call(this,t,e,n,i,r))}function Qr(t,e,n,i,r){var a=Ce(t,e,n,i,r),o=Se(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function ta(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}i("N",0,0,"eraAbbr"),i("NN",0,0,"eraAbbr"),i("NNN",0,0,"eraAbbr"),i("NNNN",0,0,"eraName"),i("NNNNN",0,0,"eraNarrow"),i("y",["y",1],"yo","eraYear"),i("y",["yy",2],0,"eraYear"),i("y",["yyy",3],0,"eraYear"),i("y",["yyyy",4],0,"eraYear"),b("N",zr),b("NN",zr),b("NNN",zr),b("NNNN",Vr),b("NNNNN",Hr),_(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,i){var r=n._locale.erasParse(t,i,n._strict);r?h(n).era=r:h(n).invalidEra=t}),b("y",Bt),b("yy",Bt),b("yyy",Bt),b("yyyy",Bt),b("yo",Br),_(["y","yy","yyy","yyyy"],w),_(["yo"],function(t,e,n,i){var r;n._locale._eraYearOrdinalRegex&&(r=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[w]=n._locale.eraYearOrdinalParse(t,r):e[w]=parseInt(t,10)}),i(0,["gg",2],0,function(){return this.weekYear()%100}),i(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ur("gggg","weekYear"),Ur("ggggg","weekYear"),Ur("GGGG","isoWeekYear"),Ur("GGGGG","isoWeekYear"),e("weekYear","gg"),e("isoWeekYear","GG"),n("weekYear",1),n("isoWeekYear",1),b("G",jt),b("g",jt),b("GG",y,r),b("gg",y,r),b("GGGG",Vt,Rt),b("gggg",Vt,Rt),b("GGGGG",Ht,Yt),b("ggggg",Ht,Yt),Qt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=v(t)}),Qt(["gg","GG"],function(t,e,n,i){e[i]=c.parseTwoDigitYear(t)}),i("Q",0,"Qo","quarter"),e("quarter","Q"),n("quarter",7),b("Q",Nt),_("Q",function(t,e){e[k]=(v(t)-1)*3}),i("D",["DD",2],"Do","date"),e("date","D"),n("date",9),b("D",y),b("DD",y,r),b("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),_(["D","DD"],M),_("Do",function(t,e){e[M]=v(t.match(y)[0])});var ea=Tt("Date",!0);function na(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}i("DDD",["DDDD",3],"DDDo","dayOfYear"),e("dayOfYear","DDD"),n("dayOfYear",4),b("DDD",zt),b("DDDD",Lt),_(["DDD","DDDD"],function(t,e,n){n._dayOfYear=v(t)}),i("m",["mm",2],0,"minute"),e("minute","m"),n("minute",14),b("m",y),b("mm",y,r),_(["m","mm"],D);var ia=Tt("Minutes",!1),ra=(i("s",["ss",2],0,"second"),e("second","s"),n("second",15),b("s",y),b("ss",y,r),_(["s","ss"],C),Tt("Seconds",!1)),aa,oa;for(i("S",0,0,function(){return~~(this.millisecond()/100)}),i(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),i(0,["SSS",3],0,"millisecond"),i(0,["SSSS",4],0,function(){return this.millisecond()*10}),i(0,["SSSSS",5],0,function(){return this.millisecond()*100}),i(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),i(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),i(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),i(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),e("millisecond","ms"),n("millisecond",16),b("S",zt,Nt),b("SS",zt,r),b("SSS",zt,Lt),aa="SSSS";aa.length<=9;aa+="S")b(aa,Bt);function sa(t,e){e[ee]=v(("0."+t)*1e3)}for(aa="S";aa.length<=9;aa+="S")_(aa,sa);function la(){return this._isUTC?"UTC":""}function ua(){return this._isUTC?"Coordinated Universal Time":""}oa=Tt("Milliseconds",!1),i("z",0,0,"zoneAbbr"),i("zz",0,0,"zoneName");var I=X.prototype;function da(t){return A(t*1e3)}function ca(){return A.apply(null,arguments).parseZone()}function ha(t){return t}I.add=Ri,I.calendar=ji,I.clone=Ui,I.diff=Ki,I.endOf=br,I.format=ir,I.from=rr,I.fromNow=ar,I.to=or,I.toNow=sr,I.get=Ft,I.invalidAt=Pr,I.isAfter=Gi,I.isBefore=qi,I.isBetween=Zi,I.isSame=$i,I.isSameOrAfter=Xi,I.isSameOrBefore=Ji,I.isValid=Dr,I.lang=ur,I.locale=lr,I.localeData=dr,I.max=ti,I.min=Qn,I.parsingFlags=Cr,I.set=It,I.startOf=yr,I.subtract=Yi,I.toArray=kr,I.toObject=Mr,I.toDate=wr,I.toISOString=er,I.inspect=nr,typeof Symbol<"u"&&Symbol.for!=null&&(I[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),I.toJSON=Sr,I.toString=tr,I.unix=_r,I.valueOf=xr,I.creationData=Tr,I.eraName=Ir,I.eraNarrow=Nr,I.eraAbbr=Lr,I.eraYear=Rr,I.year=we,I.isLeapYear=ke,I.weekYear=Gr,I.isoWeekYear=qr,I.quarter=I.quarters=ta,I.month=pe,I.daysInMonth=ve,I.week=I.weeks=Ie,I.isoWeek=I.isoWeeks=Ne,I.weeksInYear=Xr,I.weeksInWeekYear=Jr,I.isoWeeksInYear=Zr,I.isoWeeksInISOWeekYear=$r,I.date=ea,I.day=I.days=$e,I.weekday=Xe,I.isoWeekday=Je,I.dayOfYear=na,I.hour=I.hours=un,I.minute=I.minutes=ia,I.second=I.seconds=ra,I.millisecond=I.milliseconds=oa,I.utcOffset=yi,I.utc=xi,I.local=_i,I.parseZone=wi,I.hasAlignedHourOffset=ki,I.isDST=Mi,I.isLocal=Di,I.isUtcOffset=Ci,I.isUtc=Pi,I.isUTC=Pi,I.zoneAbbr=la,I.zoneName=ua,I.dates=t("dates accessor is deprecated. Use date instead.",ea),I.months=t("months accessor is deprecated. Use month instead",pe),I.years=t("years accessor is deprecated. Use year instead",we),I.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",bi),I.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Si);var N=it.prototype;function fa(t,e,n,i){var r=wn(),a=d().set(i,e);return r[n](a,t)}function ga(t,e,n){if(u(t)&&(e=t,t=void 0),t=t||"",e!=null)return fa(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=fa(t,i,n,"month");return r}function ma(t,e,n,i){typeof t=="boolean"?(u(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,u(e)&&(n=e,e=void 0),e=e||"");var r=wn(),a=t?r._week.dow:0,o,s=[];if(n!=null)return fa(e,(n+a)%7,i,"day");for(o=0;o<7;o++)s[o]=fa(e,(o+a)%7,i,"day");return s}function pa(t,e){return ga(t,e,"months")}function va(t,e){return ga(t,e,"monthsShort")}function ya(t,e,n){return ma(t,e,n,"weekdays")}function ba(t,e,n){return ma(t,e,n,"weekdaysShort")}function xa(t,e,n){return ma(t,e,n,"weekdaysMin")}N.calendar=at,N.longDateFormat=mt,N.invalidDate=vt,N.ordinal=xt,N.preparse=ha,N.postformat=ha,N.relativeTime=wt,N.pastFuture=kt,N.set=et,N.eras=Or,N.erasParse=Ar,N.erasConvertYear=Fr,N.erasAbbrRegex=Wr,N.erasNameRegex=Yr,N.erasNarrowRegex=Er,N.months=ce,N.monthsShort=he,N.monthsParse=ge,N.monthsRegex=be,N.monthsShortRegex=ye,N.week=Te,N.firstDayOfYear=Fe,N.firstDayOfWeek=Ae,N.weekdays=je,N.weekdaysMin=Ge,N.weekdaysShort=Ue,N.weekdaysParse=Ze,N.weekdaysRegex=Ke,N.weekdaysShortRegex=Qe,N.weekdaysMinRegex=tn,N.isPM=sn,N.meridiem=dn,bn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=v(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}}),c.lang=t("moment.lang is deprecated. Use moment.locale instead.",bn),c.langData=t("moment.langData is deprecated. Use moment.localeData instead.",wn);var _a=Math.abs;function wa(){var t=this._data;return this._milliseconds=_a(this._milliseconds),this._days=_a(this._days),this._months=_a(this._months),t.milliseconds=_a(t.milliseconds),t.seconds=_a(t.seconds),t.minutes=_a(t.minutes),t.hours=_a(t.hours),t.months=_a(t.months),t.years=_a(t.years),this}function ka(t,e,n,i){var r=F(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function Ma(t,e){return ka(this,t,e,1)}function Sa(t,e){return ka(this,t,e,-1)}function Da(t){return t<0?Math.floor(t):Math.ceil(t)}function Ca(){var t=this._milliseconds,e=this._days,n=this._months,i=this._data,r,a,o,s,l;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=Da(Ta(n)+e)*864e5,e=0,n=0),i.milliseconds=t%1e3,r=p(t/1e3),i.seconds=r%60,a=p(r/60),i.minutes=a%60,o=p(a/60),i.hours=o%24,e+=p(o/24),l=p(Pa(e)),n+=l,e-=Da(Ta(l)),s=p(n/12),n%=12,i.days=e,i.months=n,i.years=s,this}function Pa(t){return t*4800/146097}function Ta(t){return t*146097/4800}function Oa(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if(t=m(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+i/864e5,n=this._months+Pa(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Ta(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return e*24+i/36e5;case"minute":return e*1440+i/6e4;case"second":return e*86400+i/1e3;case"millisecond":return Math.floor(e*864e5)+i;default:throw new Error("Unknown unit "+t)}}function Aa(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+v(this._months/12)*31536e6:NaN}function Fa(t){return function(){return this.as(t)}}var Ia=Fa("ms"),Na=Fa("s"),La=Fa("m"),Ra=Fa("h"),Ya=Fa("d"),Wa=Fa("w"),Ea=Fa("M"),za=Fa("Q"),Va=Fa("y");function Ha(){return F(this)}function Ba(t){return t=m(t),this.isValid()?this[t+"s"]():NaN}function ja(t){return function(){return this.isValid()?this._data[t]:NaN}}var Ua=ja("milliseconds"),Ga=ja("seconds"),qa=ja("minutes"),Za=ja("hours"),$a=ja("days"),Xa=ja("months"),Ja=ja("years");function Ka(){return p(this.days()/7)}var Qa=Math.round,to={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function eo(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function no(t,e,n,i){var r=F(t).abs(),a=Qa(r.as("s")),o=Qa(r.as("m")),s=Qa(r.as("h")),l=Qa(r.as("d")),u=Qa(r.as("M")),d=Qa(r.as("w")),c=Qa(r.as("y")),h=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||c<=1&&["y"]||["yy",c],h[2]=e,h[3]=+t>0,h[4]=i,eo.apply(null,h)}function io(t){return t===void 0?Qa:typeof t=="function"?(Qa=t,!0):!1}function ro(t,e){return to[t]===void 0?!1:e===void 0?to[t]:(to[t]=e,t==="s"&&(to.ss=e-1),!0)}function ao(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,i=to,r,a;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(i=Object.assign({},to,e),e.s!=null&&e.ss==null&&(i.ss=e.s-1)),r=this.localeData(),a=no(this,!n,i,r),n&&(a=r.pastFuture(+this,a)),r.postformat(a)}var oo=Math.abs;function so(t){return(t>0)-(t<0)||+t}function lo(){if(!this.isValid())return this.localeData().invalidDate();var t=oo(this._milliseconds)/1e3,e=oo(this._days),n=oo(this._months),i,r,a,o,s=this.asSeconds(),l,u,d,c;return s?(i=p(t/60),r=p(i/60),t%=60,i%=60,a=p(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",l=s<0?"-":"",u=so(this._months)!==so(s)?"-":"",d=so(this._days)!==so(s)?"-":"",c=so(this._milliseconds)!==so(s)?"-":"",l+"P"+(a?u+a+"Y":"")+(n?u+n+"M":"")+(e?d+e+"D":"")+(r||i||t?"T":"")+(r?c+r+"H":"")+(i?c+i+"M":"")+(t?c+o+"S":"")):"P0D"}var L=ui.prototype;return L.isValid=si,L.abs=wa,L.add=Ma,L.subtract=Sa,L.as=Oa,L.asMilliseconds=Ia,L.asSeconds=Na,L.asMinutes=La,L.asHours=Ra,L.asDays=Ya,L.asWeeks=Wa,L.asMonths=Ea,L.asQuarters=za,L.asYears=Va,L.valueOf=Aa,L._bubble=Ca,L.clone=Ha,L.get=Ba,L.milliseconds=Ua,L.seconds=Ga,L.minutes=qa,L.hours=Za,L.days=$a,L.weeks=Ka,L.months=Xa,L.years=Ja,L.humanize=ao,L.toISOString=lo,L.toString=lo,L.toJSON=lo,L.locale=lr,L.localeData=dr,L.toIsoString=t("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lo),L.lang=ur,i("X",0,0,"unix"),i("x",0,0,"valueOf"),b("x",jt),b("X",qt),_("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)}),_("x",function(t,e,n){n._d=new Date(v(t))}),c.version="2.29.2",W(A),c.fn=I,c.min=ni,c.max=ii,c.now=ri,c.utc=d,c.unix=da,c.months=pa,c.isDate=V,c.locale=bn,c.invalid=G,c.duration=F,c.isMoment=f,c.weekdays=ya,c.parseZone=ca,c.localeData=wn,c.isDuration=di,c.monthsShort=va,c.weekdaysMin=xa,c.defineLocale=xn,c.updateLocale=_n,c.locales=kn,c.weekdaysShort=ba,c.normalizeUnits=m,c.relativeTimeRounding=io,c.relativeTimeThreshold=ro,c.calendarFormat=Bi,c.prototype=I,c.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"},c}()}),c=e(function(t,e){t.exports=function(i){function R(t,e){return e={exports:{}},t(e,e.exports),e.exports}function Y(t){return t&&t.default||t}i=i&&i.hasOwnProperty("default")?i.default:i;var d={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]},u=R(function(t){var s={};for(var e in d)d.hasOwnProperty(e)&&(s[d[e]]=e);var l=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var n in l)if(l.hasOwnProperty(n)){if(!("channels"in l[n]))throw new Error("missing channels property: "+n);if(!("labels"in l[n]))throw new Error("missing channel labels property: "+n);if(l[n].labels.length!==l[n].channels)throw new Error("channel and label counts mismatch: "+n);var i=l[n].channels,r=l[n].labels;delete l[n].channels,delete l[n].labels,Object.defineProperty(l[n],"channels",{value:i}),Object.defineProperty(l[n],"labels",{value:r})}l.rgb.hsl=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,r=Math.min(e,n,i),a=Math.max(e,n,i),o=a-r,s,l,u;return a===r?s=0:e===a?s=(n-i)/o:n===a?s=2+(i-e)/o:i===a&&(s=4+(e-n)/o),s=Math.min(s*60,360),s<0&&(s+=360),u=(r+a)/2,a===r?l=0:u<=.5?l=o/(a+r):l=o/(2-a-r),[s,l*100,u*100]},l.rgb.hsv=function(t){var e,n,i,r,a,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),c=function(t){return(u-t)/6/d+1/2};return d===0?r=a=0:(a=d/u,e=c(o),n=c(s),i=c(l),o===u?r=i-n:s===u?r=1/3+e-i:l===u&&(r=2/3+n-e),r<0?r+=1:r>1&&(r-=1)),[r*360,a*100,u*100]},l.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2],r=l.rgb.hsl(t)[0],a=1/255*Math.min(e,Math.min(n,i));return i=1-1/255*Math.max(e,Math.max(n,i)),[r,a*100,i*100]},l.rgb.cmyk=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,r,a,o,s;return s=Math.min(1-e,1-n,1-i),r=(1-e-s)/(1-s)||0,a=(1-n-s)/(1-s)||0,o=(1-i-s)/(1-s)||0,[r*100,a*100,o*100,s*100]};function u(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}l.rgb.keyword=function(t){var e=s[t];if(e)return e;var n=1/0,i;for(var r in d)if(d.hasOwnProperty(r)){var a=d[r],o=u(t,a);o<n&&(n=o,i=r)}return i},l.keyword.rgb=function(t){return d[t]},l.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var r=e*.4124+n*.3576+i*.1805,a=e*.2126+n*.7152+i*.0722,o=e*.0193+n*.1192+i*.9505;return[r*100,a*100,o*100]},l.rgb.lab=function(t){var e=l.rgb.xyz(t),n=e[0],i=e[1],r=e[2],a,o,s;return n/=95.047,i/=100,r/=108.883,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,a=116*i-16,o=500*(n-i),s=200*(i-r),[a,o,s]},l.hsl.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100,r,a,o,s,l;if(n===0)return l=i*255,[l,l,l];i<.5?a=i*(1+n):a=i+n-i*n,r=2*i-a,s=[0,0,0];for(var u=0;u<3;u++)o=e+1/3*-(u-1),o<0&&o++,o>1&&o--,6*o<1?l=r+(a-r)*6*o:2*o<1?l=a:3*o<2?l=r+(a-r)*(2/3-o)*6:l=r,s[u]=l*255;return s},l.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,r=n,a=Math.max(i,.01),o,s;return i*=2,n*=i<=1?i:2-i,r*=a<=1?a:2-a,s=(i+n)/2,o=i===0?2*r/(a+r):2*n/(i+n),[e,o*100,s*100]},l.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,r=Math.floor(e)%6,a=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*a),l=255*i*(1-n*(1-a));switch(i*=255,r){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]}},l.hsv.hsl=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,r=Math.max(i,.01),a,o,s;return s=(2-n)*i,a=(2-n)*r,o=n*r,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]},l.hwb.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100,r=n+i,a,o,s,l;r>1&&(n/=r,i/=r),a=Math.floor(6*e),o=1-i,s=6*e-a,(a&1)!==0&&(s=1-s),l=n+s*(o-n);var u,d,c;switch(a){default:case 6:case 0:u=o,d=l,c=n;break;case 1:u=l,d=o,c=n;break;case 2:u=n,d=o,c=l;break;case 3:u=n,d=l,c=o;break;case 4:u=l,d=n,c=o;break;case 5:u=o,d=n,c=l;break}return[u*255,d*255,c*255]},l.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,r=t[3]/100,a,o,s;return a=1-Math.min(1,e*(1-r)+r),o=1-Math.min(1,n*(1-r)+r),s=1-Math.min(1,i*(1-r)+r),[a*255,o*255,s*255]},l.xyz.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,r,a,o;return r=e*3.2406+n*-1.5372+i*-.4986,a=e*-.9689+n*1.8758+i*.0415,o=e*.0557+n*-.204+i*1.057,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[r*255,a*255,o*255]},l.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2],r,a,o;return e/=95.047,n/=100,i/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,r=116*n-16,a=500*(e-n),o=200*(n-i),[r,a,o]},l.lab.xyz=function(t){var e=t[0],n=t[1],i=t[2],r,a,o;a=(e+16)/116,r=n/500+a,o=a-i/200;var s=Math.pow(a,3),l=Math.pow(r,3),u=Math.pow(o,3);return a=s>.008856?s:(a-16/116)/7.787,r=l>.008856?l:(r-16/116)/7.787,o=u>.008856?u:(o-16/116)/7.787,r*=95.047,a*=100,o*=108.883,[r,a,o]},l.lab.lch=function(t){var e=t[0],n=t[1],i=t[2],r,a,o;return r=Math.atan2(i,n),a=r*360/2/Math.PI,a<0&&(a+=360),o=Math.sqrt(n*n+i*i),[e,o,a]},l.lch.lab=function(t){var e=t[0],n=t[1],i=t[2],r,a,o;return o=i/360*2*Math.PI,r=n*Math.cos(o),a=n*Math.sin(o),[e,r,a]},l.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:l.rgb.hsv(t)[2];if(r=Math.round(r/50),r===0)return 30;var a=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return r===2&&(a+=60),a},l.hsv.ansi16=function(t){return l.rgb.ansi16(l.hsv.rgb(t),t[2])},l.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];if(e===n&&n===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var r=16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5);return r},l.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var n=(~~(t>50)+1)*.5,i=(e&1)*n*255,r=(e>>1&1)*n*255,a=(e>>2&1)*n*255;return[i,r,a]},l.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var n,i=Math.floor(t/36)/5*255,r=Math.floor((n=t%36)/6)/5*255,a=n%6/5*255;return[i,r,a]},l.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),n=e.toString(16).toUpperCase();return"000000".substring(n.length)+n},l.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];e[0].length===3&&(n=n.split("").map(function(t){return t+t}).join(""));var i=parseInt(n,16),r=i>>16&255,a=i>>8&255,o=i&255;return[r,a,o]},l.rgb.hcg=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,r=Math.max(Math.max(e,n),i),a=Math.min(Math.min(e,n),i),o=r-a,s,l;return o<1?s=a/(1-o):s=0,o<=0?l=0:r===e?l=(n-i)/o%6:r===n?l=2+(i-e)/o:l=4+(e-n)/o+4,l/=6,l%=1,[l*360,o*100,s*100]},l.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,r=0;return n<.5?i=2*e*n:i=2*e*(1-n),i<1&&(r=(n-.5*i)/(1-i)),[t[0],i*100,r*100]},l.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,r=0;return i<1&&(r=(n-i)/(1-i)),[t[0],i*100,r*100]},l.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(n===0)return[i*255,i*255,i*255];var r=[0,0,0],a=e%1*6,o=a%1,s=1-o,l=0;switch(Math.floor(a)){case 0:r[0]=1,r[1]=o,r[2]=0;break;case 1:r[0]=s,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=o;break;case 3:r[0]=0,r[1]=s,r[2]=1;break;case 4:r[0]=o,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=s}return l=(1-n)*i,[(n*r[0]+l)*255,(n*r[1]+l)*255,(n*r[2]+l)*255]},l.hcg.hsv=function(t){var e=t[1]/100,n=t[2]/100,i=e+n*(1-e),r=0;return i>0&&(r=e/i),[t[0],r*100,i*100]},l.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100,i=n*(1-e)+.5*e,r=0;return i>0&&i<.5?r=e/(2*i):i>=.5&&i<1&&(r=e/(2*(1-i))),[t[0],r*100,i*100]},l.hcg.hwb=function(t){var e=t[1]/100,n=t[2]/100,i=e+n*(1-e);return[t[0],(i-e)*100,(1-i)*100]},l.hwb.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1-n,r=i-e,a=0;return r<1&&(a=(i-r)/(1-r)),[t[0],r*100,a*100]},l.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},l.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},l.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},l.gray.hsl=l.gray.hsv=function(t){return[0,0,t[0]]},l.gray.hwb=function(t){return[0,100,t[0]]},l.gray.cmyk=function(t){return[0,0,0,t[0]]},l.gray.lab=function(t){return[t[0],0,0]},l.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,n=(e<<16)+(e<<8)+e,i=n.toString(16).toUpperCase();return"000000".substring(i.length)+i},l.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});function W(){for(var t={},e=Object.keys(u),n=e.length,i=0;i<n;i++)t[e[i]]={distance:-1,parent:null};return t}function E(t){var e=W(),n=[t];for(e[t].distance=0;n.length;)for(var i=n.pop(),r=Object.keys(u[i]),a=r.length,o=0;o<a;o++){var s=r[o],l=e[s];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,n.unshift(s))}return e}function z(e,n){return function(t){return n(e(t))}}function V(t,e){for(var n=[e[t].parent,t],i=u[e[t].parent][t],r=e[t].parent;e[r].parent;)n.unshift(e[r].parent),i=z(u[e[r].parent][r],i),r=e[r].parent;return i.conversion=n,i}u.rgb,u.hsl,u.hsv,u.hwb,u.cmyk,u.xyz,u.lab,u.lch,u.hex,u.keyword,u.ansi16,u.ansi256,u.hcg,u.apple,u.gray;var H=function(t){for(var e=E(t),n={},i=Object.keys(e),r=i.length,a=0;a<r;a++){var o=i[a],s=e[o];s.parent!==null&&(n[o]=V(o,e))}return n},B={},j;function U(e){var t=function(t){return t==null?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function G(r){var t=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var e=r(t);if(typeof e=="object")for(var n=e.length,i=0;i<n;i++)e[i]=Math.round(e[i]);return e};return"conversion"in r&&(t.conversion=r.conversion),t}Object.keys(u).forEach(function(n){B[n]={},Object.defineProperty(B[n],"channels",{value:u[n].channels}),Object.defineProperty(B[n],"labels",{value:u[n].labels});var i=H(n),t=Object.keys(i);t.forEach(function(t){var e=i[t];B[n][t]=G(e),B[n][t].raw=U(e)})});var q=B,Z={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]},r={getRgba:$,getHsla:X,getRgb:K,getHsl:Q,getHwb:J,getAlpha:tt,hexString:et,rgbString:nt,rgbaString:it,percentString:rt,percentaString:at,hslString:ot,hslaString:st,hwbString:lt,keyword:ut};function $(t){if(!!t){var e=/^#([a-fA-F0-9]{3,4})$/i,n=/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,i=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,r=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,a=/(\w+)/,o=[0,0,0],s=1,l=t.match(e),u="";if(l){l=l[1],u=l[3];for(var d=0;d<o.length;d++)o[d]=parseInt(l[d]+l[d],16);u&&(s=Math.round(parseInt(u+u,16)/255*100)/100)}else if(l=t.match(n)){u=l[2],l=l[1];for(var d=0;d<o.length;d++)o[d]=parseInt(l.slice(d*2,d*2+2),16);u&&(s=Math.round(parseInt(u,16)/255*100)/100)}else if(l=t.match(i)){for(var d=0;d<o.length;d++)o[d]=parseInt(l[d+1]);s=parseFloat(l[4])}else if(l=t.match(r)){for(var d=0;d<o.length;d++)o[d]=Math.round(parseFloat(l[d+1])*2.55);s=parseFloat(l[4])}else if(l=t.match(a)){if(l[1]=="transparent")return[0,0,0,0];if(o=Z[l[1]],!o)return}for(var d=0;d<o.length;d++)o[d]=c(o[d],0,255);return!s&&s!=0?s=1:s=c(s,0,1),o[3]=s,o}}function X(t){if(!!t){var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,n=t.match(e);if(n){var i=parseFloat(n[4]),r=c(parseInt(n[1]),0,360),a=c(parseFloat(n[2]),0,100),o=c(parseFloat(n[3]),0,100),s=c(isNaN(i)?1:i,0,1);return[r,a,o,s]}}}function J(t){if(!!t){var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,n=t.match(e);if(n){var i=parseFloat(n[4]),r=c(parseInt(n[1]),0,360),a=c(parseFloat(n[2]),0,100),o=c(parseFloat(n[3]),0,100),s=c(isNaN(i)?1:i,0,1);return[r,a,o,s]}}}function K(t){var e=$(t);return e&&e.slice(0,3)}function Q(t){var e=X(t);return e&&e.slice(0,3)}function tt(t){var e=$(t);if(e)return e[3];if(e=X(t))return e[3];if(e=J(t))return e[3]}function et(t,e){var e=e!==void 0&&t.length===3?e:t[3];return"#"+dt(t[0])+dt(t[1])+dt(t[2])+(e>=0&&e<1?dt(Math.round(e*255)):"")}function nt(t,e){return e<1||t[3]&&t[3]<1?it(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function it(t,e){return e===void 0&&(e=t[3]!==void 0?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function rt(t,e){if(e<1||t[3]&&t[3]<1)return at(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+r+"%)"}function at(t,e){var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgba("+n+"%, "+i+"%, "+r+"%, "+(e||t[3]||1)+")"}function ot(t,e){return e<1||t[3]&&t[3]<1?st(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function st(t,e){return e===void 0&&(e=t[3]!==void 0?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function lt(t,e){return e===void 0&&(e=t[3]!==void 0?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(e!==void 0&&e!==1?", "+e:"")+")"}function ut(t){return ct[t.slice(0,3)]}function c(t,e,n){return Math.min(Math.max(e,t),n)}function dt(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var ct={},ht;for(ht in Z)ct[Z[ht]]=ht;var o=function t(e){if(e instanceof t)return e;if(!(this instanceof t))return new t(e);this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var n;typeof e=="string"?(n=r.getRgba(e),n?this.setValues("rgb",n):(n=r.getHsla(e))?this.setValues("hsl",n):(n=r.getHwb(e))&&this.setValues("hwb",n)):typeof e=="object"&&(n=e,n.r!==void 0||n.red!==void 0?this.setValues("rgb",n):n.l!==void 0||n.lightness!==void 0?this.setValues("hsl",n):n.v!==void 0||n.value!==void 0?this.setValues("hsv",n):n.w!==void 0||n.whiteness!==void 0?this.setValues("hwb",n):(n.c!==void 0||n.cyan!==void 0)&&this.setValues("cmyk",n))},ft=((o.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return t.alpha!==1?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return t===void 0?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t%=360,t=t<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return r.hexString(this.values.rgb)},rgbString:function(){return r.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return r.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return r.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return r.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return r.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return r.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return r.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=t[0]*.3+t[1]*.59+t[2]*.11;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,r=e===void 0?.5:e,a=2*r-1,o=n.alpha()-i.alpha(),s=((a*o===-1?a:(a+o)/(1+a*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()*r+i.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t=new o,e=this.values,n=t.values,i,r;for(var a in e)e.hasOwnProperty(a)&&(i=e[a],r={}.toString.call(i),r==="[object Array]"?n[a]=i.slice(0):r==="[object Number]"?n[a]=i:console.error("unexpected color value:",i));return t}}).spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return e.alpha!==1&&(n.a=e.alpha),n},o.prototype.setValues=function(t,e){var n=this.values,i=this.spaces,r=this.maxes,a=1,o;if(this.valid=!0,t==="alpha")a=e;else if(e.length)n[t]=e.slice(0,t.length),a=e[t.length];else if(e[t.charAt(0)]!==void 0){for(o=0;o<t.length;o++)n[t][o]=e[t.charAt(o)];a=e.a}else if(e[i[t][0]]!==void 0){var s=i[t];for(o=0;o<t.length;o++)n[t][o]=e[s[o]];a=e.alpha}if(n.alpha=Math.max(0,Math.min(1,a===void 0?n.alpha:a)),t==="alpha")return!1;var l;for(o=0;o<t.length;o++)l=Math.max(0,Math.min(r[t][o],n[t][o])),n[t][o]=Math.round(l);for(var u in i)u!==t&&(n[u]=q[t][u](n[t]));return!0},o.prototype.setSpace=function(t,e){var n=e[0];return n===void 0?this.getValues(t):(typeof n=="number"&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},o.prototype.setChannel=function(t,e,n){var i=this.values[t];return n===void 0?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},typeof window<"u"&&(window.Color=o),o);function gt(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}var h={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),isNullOrUndef:function(t){return t===null||typeof t>"u"},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return e.substr(0,7)==="[object"&&e.substr(-6)==="Array]"},isObject:function(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"},isFinite:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(t){return(typeof t=="number"||t instanceof Number)&&isFinite(t)}),valueOrDefault:function(t,e){return typeof t>"u"?e:t},valueAtIndexOrDefault:function(t,e,n){return h.valueOrDefault(h.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)},each:function(t,e,n,i){var r,a,o;if(h.isArray(t))if(a=t.length,i)for(r=a-1;r>=0;r--)e.call(n,t[r],r);else for(r=0;r<a;r++)e.call(n,t[r],r);else if(h.isObject(t))for(o=Object.keys(t),a=o.length,r=0;r<a;r++)e.call(n,t[o[r]],o[r])},arrayEquals:function(t,e){var n,i,r,a;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],a=e[n],r instanceof Array&&a instanceof Array){if(!h.arrayEquals(r,a))return!1}else if(r!==a)return!1;return!0},clone:function(t){if(h.isArray(t))return t.map(h.clone);if(h.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),i=n.length,r=0;r<i;++r)e[n[r]]=h.clone(t[n[r]]);return e}return t},_merger:function(t,e,n,i){if(!!gt(t)){var r=e[t],a=n[t];h.isObject(r)&&h.isObject(a)?h.merge(r,a,i):e[t]=h.clone(a)}},_mergerIf:function(t,e,n){if(!!gt(t)){var i=e[t],r=n[t];h.isObject(i)&&h.isObject(r)?h.mergeIf(i,r):e.hasOwnProperty(t)||(e[t]=h.clone(r))}},merge:function(t,e,n){var i=h.isArray(e)?e:[e],r=i.length,a,o,s,l,u;if(!h.isObject(t))return t;for(n=n||{},a=n.merger||h._merger,o=0;o<r;++o)if(e=i[o],!!h.isObject(e))for(s=Object.keys(e),u=0,l=s.length;u<l;++u)a(s[u],t,e,n);return t},mergeIf:function(t,e){return h.merge(t,e,{merger:h._mergerIf})},extend:Object.assign||function(t){return h.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=h.inherits,t&&h.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){e!==void 0&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},l=h,mt=(h.callCallback=h.callback,h.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},h.getValueOrDefault=h.valueOrDefault,h.getValueAtIndexOrDefault=h.valueAtIndexOrDefault,{linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-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(t=t-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-((t=t-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 t*t*t*t*t},easeOutQuint:function(t){return(t=t-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-Math.cos(t*(Math.PI/2))+1},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return t===0?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return t===1?1:-Math.pow(2,-10*t)+1},easeInOutExpo:function(t){return t===0?0:t===1?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t=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 t===0?0:t===1?1:(n||(n=.3),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 t===0?0:t===1?1:(n||(n=.3),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 t===0?0:(t/=.5)===2?1:(n||(n=.45),e=n/(2*Math.PI)*Math.asin(1/i),t<1?-.5*(i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):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=t-1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-mt.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?mt.easeInBounce(t*2)*.5:mt.easeOutBounce(t*2-1)*.5+.5}}),pt={effects:mt},f=(l.easingEffects=mt,Math.PI),vt=f/180,yt=f*2,g=f/2,bt=f/4,xt=f*2/3,_t={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,r,a){if(a){var o=Math.min(a,r/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+r-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-f,-g),t.arc(u,l,o,-g,0),t.arc(u,d,o,0,g),t.arc(s,d,o,g,f)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-g,g),t.arc(s,l,o,g,f+g)):l<d?(t.arc(s,l,o,-f,0),t.arc(s,d,o,0,f)):t.arc(s,l,o,-f,f),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,r)},drawPoint:function(t,e,n,i,r,a){var o,s,l,u,d,c=(a||0)*vt;if(e&&typeof e=="object"&&(o=e.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){t.save(),t.translate(i,r),t.rotate(c),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),t.restore();return}if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,r,n,0,yt),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(c)*n,r-Math.cos(c)*n),c+=xt,t.lineTo(i+Math.sin(c)*n,r-Math.cos(c)*n),c+=xt,t.lineTo(i+Math.sin(c)*n,r-Math.cos(c)*n),t.closePath();break;case"rectRounded":d=n*.516,u=n-d,s=Math.cos(c+bt)*u,l=Math.sin(c+bt)*u,t.arc(i-s,r-l,d,c-f,c-g),t.arc(i+l,r-s,d,c-g,c),t.arc(i+s,r+l,d,c,c+g),t.arc(i-l,r+s,d,c+g,c+f),t.closePath();break;case"rect":if(!a){u=Math.SQRT1_2*n,t.rect(i-u,r-u,2*u,2*u);break}c+=bt;case"rectRot":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(i-s,r-l),t.lineTo(i+l,r-s),t.lineTo(i+s,r+l),t.lineTo(i-l,r+s),t.closePath();break;case"crossRot":c+=bt;case"cross":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s);break;case"star":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s),c+=bt,s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s);break;case"line":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l);break;case"dash":t.moveTo(i,r),t.lineTo(i+Math.cos(c)*n,r+Math.sin(c)*n);break}t.fill(),t.stroke()}},_isPointInArea:function(t,e){var n=1e-6;return t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n},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){var r=n.steppedLine;if(r){if(r==="middle"){var a=(e.x+n.x)/2;t.lineTo(a,i?n.y:e.y),t.lineTo(a,i?e.y:n.y)}else r==="after"&&!i||r!=="after"&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y);return}if(!n.tension){t.lineTo(n.x,n.y);return}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)}},wt=_t,kt=(l.clear=_t.clear,l.drawRoundedRectangle=function(t){t.beginPath(),_t.roundedRect.apply(_t,arguments)},{_set:function(t,e){return l.merge(this[t]||(this[t]={}),e)}}),D=(kt._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0}),kt),Mt=l.valueOrDefault;function St(t){return!t||l.isNullOrUndef(t.size)||l.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}var Dt={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t},toPadding:function(t){var e,n,i,r;return l.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,r=+t.left||0):e=n=i=r=+t||0,{top:e,right:n,bottom:i,left:r,height:e+i,width:r+n}},_parseFont:function(t){var e=D.global,n=Mt(t.fontSize,e.defaultFontSize),i={family:Mt(t.fontFamily,e.defaultFontFamily),lineHeight:l.options.toLineHeight(Mt(t.lineHeight,e.defaultLineHeight),n),size:n,style:Mt(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=St(i),i},resolve:function(t,e,n,i){var r=!0,a,o,s;for(a=0,o=t.length;a<o;++a)if(s=t[a],s!==void 0&&(e!==void 0&&typeof s=="function"&&(s=s(e),r=!1),n!==void 0&&l.isArray(s)&&(s=s[n],r=!1),s!==void 0))return i&&!r&&(i.cacheable=!1),s}},Ct={_factorize:function(t){var e=[],n=Math.sqrt(t),i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(n|0)&&e.push(n),e.sort(function(t,e){return t-e}).pop(),e},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e),i=t===Math.pow(10,n);return i?n:e}},Pt=Ct,Tt=(l.log10=Ct.log10,function(e,n){return{x:function(t){return e+e+n-t},setWidth:function(t){n=t},textAlign:function(t){return t==="center"?t:t==="right"?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}),Ot=function(){return{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},At,Ft,It,Nt,I=l,Lt,Rt=wt,Yt=Dt,Wt=Pt,Et={getRtlAdapter:function(t,e,n){return t?Tt(e,n):Ot()},overrideTextDirection:function(t,e){var n,i;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};function zt(t,e,n,i){var r=Object.keys(n),a,o,s,l,u,d,c,h,f;for(a=0,o=r.length;a<o;++a)if(s=r[a],d=n[s],e.hasOwnProperty(s)||(e[s]=d),l=e[s],!(l===d||s[0]==="_")){if(t.hasOwnProperty(s)||(t[s]=l),u=t[s],c=typeof d,c===typeof u)if(c==="string"){if(h=ft(u),h.valid&&(f=ft(d),f.valid)){e[s]=f.mix(h,i).rgbString();continue}}else if(I.isFinite(u)&&I.isFinite(d)){e[s]=u+(d-u)*i;continue}e[s]=d}}I.easing=pt,I.canvas=Rt,I.options=Yt,I.math=Wt,I.rtl=Et;var Vt=function(t){I.extend(this,t),this.initialize.apply(this,arguments)},t=(I.extend(Vt.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=I.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,r=e._view;return!n||t===1?(e._view=I.extend({},n),e._start=null,e):(r||(r=e._view={}),i||(i=e._start={}),zt(i,r,n,t),e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return I.isNumber(this._model.x)&&I.isNumber(this._model.y)}}),Vt.extend=I.inherits,Vt),Ht=t.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Bt=Ht,jt=(Object.defineProperty(Ht.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Ht.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),D._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:I.noop,onComplete:I.noop}}),{animations:[],request:null,addAnimation:function(t,e,n,i){var r=this.animations,a,o;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,o=r.length;a<o;++a)if(r[a].chart===t){r[a]=e;return}r.push(e),r.length===1&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=I.findIndex(this.animations,function(t){return t.chart===e});t!==-1&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var t=this;t.request===null&&(t.request=I.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this;t.advance(),t.animations.length>0&&t.requestAnimationFrame()},advance:function(){for(var t=this.animations,e,n,i,r,a=0;a<t.length;)e=t[a],n=e.chart,i=e.numSteps,r=Math.floor((Date.now()-e.startTime)/e.duration*i)+1,e.currentStep=Math.min(r,i),I.callback(e.render,[n,e],n),I.callback(e.onAnimationProgress,[e],n),e.currentStep>=i?(I.callback(e.onAnimationComplete,[e],n),n.animating=!1,t.splice(a,1)):++a}}),Ut=I.options.resolve,Gt=["push","pop","shift","splice","unshift"];function qt(r,t){if(r._chartjs){r._chartjs.listeners.push(t);return}Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Gt.forEach(function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),i=r[t];Object.defineProperty(r,t,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),t=i.apply(this,e);return I.each(r._chartjs.listeners,function(t){typeof t[n]=="function"&&t[n].apply(t,e)}),t}})})}function Zt(e,t){var n=e._chartjs;if(!!n){var i=n.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(Gt.forEach(function(t){delete e[t]}),delete e._chartjs)}}var $t=function(t,e){this.initialize(t,e)},m=(I.extend($t.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.chart,i=n.scales,r=t.getDataset(),a=n.options.scales;(e.xAxisID===null||!(e.xAxisID in i)||r.xAxisID)&&(e.xAxisID=r.xAxisID||a.xAxes[0].id),(e.yAxisID===null||!(e.yAxisID in i)||r.yAxisID)&&(e.yAxisID=r.yAxisID||a.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&&Zt(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=this,e=t.getMeta(),n=t.getDataset().data||[],i=e.data,r,a;for(r=0,a=n.length;r<a;++r)i[r]=i[r]||t.createMetaData(r);e.dataset=e.dataset||t.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t=this,e=t.getDataset(),n=e.data||(e.data=[]);t._data!==n&&(t._data&&Zt(t._data,t),n&&Object.isExtensible(n)&&qt(n,t),t._data=n),t.resyncElements()},_configure:function(){var t=this;t._config=I.merge(Object.create(null),[t.chart.options.datasets[t._type],t.getDataset()],{merger:function(t,e,n){t!=="_meta"&&t!=="data"&&I._merger(t,e,n)}})},_update:function(t){var e=this;e._configure(),e._cachedDataOpts=null,e.update(t)},update:I.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,r=0;r<i;++r)n[r].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e=this,n=e.getMeta(),i=n.dataset,r;return e._configure(),i&&t===void 0?r=e._resolveDatasetElementOptions(i||{}):(t=t||0,r=e._resolveDataElementOptions(n.data[t]||{},t)),(r.fill===!1||r.fill===null)&&(r.backgroundColor=r.borderColor),r},_resolveDatasetElementOptions:function(t,e){var n=this,i=n.chart,r=n._config,a=t.custom||{},o=i.options.elements[n.datasetElementType.prototype._type]||{},s=n._datasetElementOptions,l={},u,d,c,h,f={chart:i,dataset:n.getDataset(),datasetIndex:n.index,hover:e};for(u=0,d=s.length;u<d;++u)c=s[u],h=e?"hover"+c.charAt(0).toUpperCase()+c.slice(1):c,l[c]=Ut([a[h],r[h],o[h]],f);return l},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,r=n._cachedDataOpts;if(r&&!i)return r;var a=n.chart,o=n._config,s=a.options.elements[n.dataElementType.prototype._type]||{},l=n._dataElementOptions,u={},d={chart:a,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},c={cacheable:!i},h,f,g,m;if(i=i||{},I.isArray(l))for(f=0,g=l.length;f<g;++f)m=l[f],u[m]=Ut([i[m],o[m],s[m]],d,e,c);else for(h=Object.keys(l),f=0,g=h.length;f<g;++f)m=h[f],u[m]=Ut([i[m],o[l[m]],o[m],s[m]],d,e,c);return c.cacheable&&(n._cachedDataOpts=Object.freeze(u)),u},removeHoverStyle:function(t){I.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},r=t._model,a=I.getHoverColor;t.$previousStyle={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth},r.backgroundColor=Ut([i.hoverBackgroundColor,e.hoverBackgroundColor,a(r.backgroundColor)],void 0,n),r.borderColor=Ut([i.hoverBorderColor,e.hoverBorderColor,a(r.borderColor)],void 0,n),r.borderWidth=Ut([i.hoverBorderWidth,e.hoverBorderWidth,r.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t=this.getMeta().dataset,e={},n,i,r,a,o,s;if(!!t){for(s=t._model,o=this._resolveDatasetElementOptions(t,!0),a=Object.keys(o),n=0,i=a.length;n<i;++n)r=a[n],e[r]=s[r],s[r]=o[r];t.$previousStyle=e}},resyncElements:function(){var t=this,e=t.getMeta(),n=t.getDataset().data,i=e.data.length,r=n.length;r<i?e.data.splice(r,i-r):r>i&&t.insertElements(i,r-i)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),$t.extend=I.inherits,$t),p=Math.PI*2;function Xt(t,e){var n=e.startAngle,i=e.endAngle,r=e.pixelMargin,a=r/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-a,i+a),e.innerRadius>r?(a=r/e.innerRadius,t.arc(o,s,e.innerRadius-r,i+a,n-a,!0)):t.arc(o,s,r,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function Jt(t,e,n,i){var r=n.endAngle,a;for(i&&(n.endAngle=n.startAngle+p,Xt(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=p,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+p,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+p),a=0;a<n.fullCircles;++a)t.stroke()}function Kt(t,e,n){var i=e.borderAlign==="inner";i?(t.lineWidth=e.borderWidth*2,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&Jt(t,e,n,i),i&&Xt(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}D._set("global",{elements:{arc:{backgroundColor:D.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var Qt=t.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return e?Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2):!1},inRange:function(t,e){var n=this._view;if(n){for(var i=I.getAngleFromPoint(n,{x:t,y:e}),r=i.angle,a=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=p;for(;r>s;)r-=p;for(;r<o;)r+=p;var l=r>=o&&r<=s,u=a>=n.innerRadius&&a<=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=this._chart.ctx,e=this._view,n=e.borderAlign==="inner"?.33:0,i={x:e.x,y:e.y,innerRadius:e.innerRadius,outerRadius:Math.max(e.outerRadius-n,0),pixelMargin:n,startAngle:e.startAngle,endAngle:e.endAngle,fullCircles:Math.floor(e.circumference/p)},r;if(t.save(),t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,i.fullCircles){for(i.endAngle=i.startAngle+p,t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),r=0;r<i.fullCircles;++r)t.fill();i.endAngle=i.startAngle+e.circumference%p}t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),t.fill(),e.borderWidth&&Kt(t,e,i),t.restore()}}),te=I.valueOrDefault,ee=D.global.defaultColor,ne=(D._set("global",{elements:{line:{tension:.4,backgroundColor:ee,borderWidth:3,borderColor:ee,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),t.extend({_type:"line",draw:function(){var t=this,e=t._view,n=t._chart.ctx,i=e.spanGaps,r=t._children.slice(),a=D.global,o=a.elements.line,s=-1,l=t._loop,u,d,c;if(!!r.length){if(t._loop){for(u=0;u<r.length;++u)if(d=I.previousItem(r,u),!r[u]._view.skip&&d._view.skip){r=r.slice(u).concat(r.slice(0,u)),l=i;break}l&&r.push(r[0])}for(n.save(),n.lineCap=e.borderCapStyle||o.borderCapStyle,n.setLineDash&&n.setLineDash(e.borderDash||o.borderDash),n.lineDashOffset=te(e.borderDashOffset,o.borderDashOffset),n.lineJoin=e.borderJoinStyle||o.borderJoinStyle,n.lineWidth=te(e.borderWidth,o.borderWidth),n.strokeStyle=e.borderColor||a.defaultColor,n.beginPath(),c=r[0]._view,c.skip||(n.moveTo(c.x,c.y),s=0),u=1;u<r.length;++u)c=r[u]._view,d=s===-1?I.previousItem(r,u):r[s],c.skip||(s!==u-1&&!i||s===-1?n.moveTo(c.x,c.y):I.canvas.lineTo(n,d._view,c),s=u);l&&n.closePath(),n.stroke(),n.restore()}}})),ie=I.valueOrDefault,re=D.global.defaultColor;function ae(t){var e=this._view;return e?Math.abs(t-e.x)<e.radius+e.hitRadius:!1}function oe(t){var e=this._view;return e?Math.abs(t-e.y)<e.radius+e.hitRadius:!1}D._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:re,borderColor:re,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var se=t.extend({_type:"point",inRange:function(t,e){var n=this._view;return n?Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2):!1},inLabelRange:ae,inXRange:ae,inYRange:oe,getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,r=e.rotation,a=e.radius,o=e.x,s=e.y,l=D.global,u=l.defaultColor;e.skip||(t===void 0||I.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=ie(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,I.canvas.drawPoint(n,i,a,o,s,r))}}),le=D.global.defaultColor;function ue(t){return t&&t.width!==void 0}function de(t){var e,n,i,r,a;return ue(t)?(a=t.width/2,e=t.x-a,n=t.x+a,i=Math.min(t.y,t.base),r=Math.max(t.y,t.base)):(a=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-a,r=t.y+a),{left:e,top:i,right:n,bottom:r}}function ce(t,e,n){return t===e?n:t===n?e:t}function he(t){var e=t.borderSkipped,n={};return e&&(t.horizontal?t.base>t.x&&(e=ce(e,"left","right")):t.base<t.y&&(e=ce(e,"bottom","top")),n[e]=!0),n}function fe(t,e,n){var i=t.borderWidth,r=he(t),a,o,s,l;return I.isObject(i)?(a=+i.top||0,o=+i.right||0,s=+i.bottom||0,l=+i.left||0):a=o=s=l=+i||0,{t:r.top||a<0?0:a>n?n:a,r:r.right||o<0?0:o>e?e:o,b:r.bottom||s<0?0:s>n?n:s,l:r.left||l<0?0:l>e?e:l}}function ge(t){var e=de(t),n=e.right-e.left,i=e.bottom-e.top,r=fe(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b}}}function me(t,e,n){var i=e===null,r=n===null,a=!t||i&&r?!1:de(t);return a&&(i||e>=a.left&&e<=a.right)&&(r||n>=a.top&&n<=a.bottom)}D._set("global",{elements:{rectangle:{backgroundColor:le,borderColor:le,borderSkipped:"bottom",borderWidth:0}}});var pe=t.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=ge(e),i=n.outer,r=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),!(i.w===r.w&&i.h===r.h)&&(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(r.x,r.y,r.w,r.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return me(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return ue(n)?me(n,t,null):me(n,null,e)},inXRange:function(t){return me(this._view,t,null)},inYRange:function(t){return me(this._view,null,t)},getCenterPoint:function(){var t=this._view,e,n;return ue(t)?(e=t.x,n=(t.y+t.base)/2):(e=(t.x+t.base)/2,n=t.y),{x:e,y:n}},getArea:function(){var t=this._view;return ue(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}}}),v={},ve,ye=ne,be=se,xe=pe,_e=(v.Arc=Qt,v.Line=ye,v.Point=be,v.Rectangle=xe,I._deprecated),we=I.valueOrDefault;function ke(t,e){var n=t._length,i,r,a,o;for(a=1,o=e.length;a<o;++a)n=Math.min(n,Math.abs(e[a]-e[a-1]));for(a=0,o=t.getTicks().length;a<o;++a)r=t.getPixelForTick(a),n=a>0?Math.min(n,Math.abs(r-i)):n,i=r;return n}function Me(t,e,n){var i=n.barThickness,r=e.stackCount,a=e.pixels[t],o=I.isNullOrUndef(i)?ke(e.scale,e.pixels):-1,s,l;return I.isNullOrUndef(i)?(s=o*n.categoryPercentage,l=n.barPercentage):(s=i*r,l=1),{chunk:s/r,ratio:l,start:a-s/2}}function Se(t,e,n){var i=e.pixels,r=i[t],a=t>0?i[t-1]:null,o=t<i.length-1?i[t+1]:null,s=n.categoryPercentage,l,u;return a===null&&(a=r-(o===null?e.end-e.start:o-r)),o===null&&(o=r+r-a),l=r-(r-Math.min(a,o))/2*s,u=Math.abs(o-a)/2*s,{chunk:u/e.stackCount,ratio:n.barPercentage,start:l}}D._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),D._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var De=m.extend({dataElementType:v.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t=this,e,n;m.prototype.initialize.apply(t,arguments),e=t.getMeta(),e.stack=t.getDataset().stack,e.bar=!0,n=t._getIndexScale().options,_e("bar chart",n.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),_e("bar chart",n.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),_e("bar chart",n.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),_e("bar chart",t._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),_e("bar chart",n.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e=this,n=e.getMeta().data,i,r;for(e._ruler=e.getRuler(),i=0,r=n.length;i<r;++i)e.updateElement(n[i],i,t)},updateElement:function(t,e,n){var i=this,r=i.getMeta(),a=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(r.xAxisID),t._yScale=i.getScaleForId(r.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:a.label,label:i.chart.data.labels[e]},I.isArray(a.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var r=this,a=t._model,o=r._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=r._ruler||r.getRuler(),d=r.calculateBarValuePixels(r.index,e,i),c=r.calculateBarIndexPixels(r.index,e,u,i);a.horizontal=l,a.base=n?s:d.base,a.x=l?n?s:d.head:c.center,a.y=l?c.center:n?s:d.head,a.height=l?c.size:void 0,a.width=l?void 0:c.size},_getStacks:function(t){var e=this,n=e._getIndexScale(),i=n._getMatchingVisibleMetas(e._type),r=n.options.stacked,a=i.length,o=[],s,l;for(s=0;s<a&&(l=i[s],(r===!1||o.indexOf(l.stack)===-1||r===void 0&&l.stack===void 0)&&o.push(l.stack),l.index!==t);++s);return o},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=e!==void 0?n.indexOf(e):-1;return i===-1?n.length-1:i},getRuler:function(){var t=this,e=t._getIndexScale(),n=[],i,r;for(i=0,r=t.getMeta().data.length;i<r;++i)n.push(e.getPixelForValue(null,i,t.index));return{pixels:n,start:e._startPixel,end:e._endPixel,stackCount:t.getStackCount(),scale:e}},calculateBarValuePixels:function(t,e,n){var i=this,r=i.chart,a=i._getValueScale(),o=a.isHorizontal(),s=r.data.datasets,l=a._getMatchingVisibleMetas(i._type),u=a._parseValue(s[t].data[e]),d=n.minBarLength,c=a.options.stacked,h=i.getMeta().stack,f=u.start===void 0?0:u.max>=0&&u.min>=0?u.min:u.max,g=u.start===void 0?u.end:u.max>=0&&u.min>=0?u.max-u.min:u.min-u.max,m=l.length,p,v,y,b,x,_,w;if(c||c===void 0&&h!==void 0)for(p=0;p<m&&(v=l[p],v.index!==t);++p)v.stack===h&&(w=a._parseValue(s[v.index].data[e]),y=w.start===void 0?w.end:w.min>=0&&w.max>=0?w.max:w.min,(u.min<0&&y<0||u.max>=0&&y>0)&&(f+=y));return b=a.getPixelForValue(f),x=a.getPixelForValue(f+g),_=x-b,d!==void 0&&Math.abs(_)<d&&(_=d,g>=0&&!o||g<0&&o?x=b-d:x=b+d),{size:_,base:b,head:x,center:x+_/2}},calculateBarIndexPixels:function(t,e,n,i){var r=this,a=i.barThickness==="flex"?Se(e,n,i):Me(e,n,i),o=r.getStackIndex(t,r.getMeta().stack),s=a.start+a.chunk*o+a.chunk/2,l=Math.min(we(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}},draw:function(){var t=this,e=t.chart,n=t._getValueScale(),i=t.getMeta().data,r=t.getDataset(),a=i.length,o=0;for(I.canvas.clipArea(e.ctx,e.chartArea);o<a;++o){var s=n._parseValue(r.data[o]);!isNaN(s.min)&&!isNaN(s.max)&&i[o].draw()}I.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var t=this,e=I.extend({},m.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,i=t._getValueScale().options;return e.barPercentage=we(n.barPercentage,e.barPercentage),e.barThickness=we(n.barThickness,e.barThickness),e.categoryPercentage=we(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=we(n.maxBarThickness,e.maxBarThickness),e.minBarLength=we(i.minBarLength,e.minBarLength),e}}),Ce=I.valueOrDefault,Pe=I.options.resolve,Te=(D._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}}),m.extend({dataElementType:v.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(n){var i=this,t=i.getMeta(),e=t.data;I.each(e,function(t,e){i.updateElement(t,e,n)})},updateElement:function(t,e,n){var i=this,r=i.getMeta(),a=t.custom||{},o=i.getScaleForId(r.xAxisID),s=i.getScaleForId(r.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,c=n?o.getPixelForDecimal(.5):o.getPixelForValue(typeof u=="object"?u:NaN,e,d),h=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:a.skip||isNaN(c)||isNaN(h),x:c,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=I.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ce(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Ce(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Ce(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,r=n.getDataset(),a=t.custom||{},o=r.data[e]||{},s=m.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:r,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=I.extend({},s)),s.radius=Pe([a.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}})),Oe=I.valueOrDefault,F=Math.PI,N=F*2,L=F/2,Ae=(D._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=document.createElement("ul"),n=t.data,i=n.datasets,r=n.labels,a,o,s,l;if(e.setAttribute("class",t.id+"-legend"),i.length)for(a=0,o=i[0].data.length;a<o;++a)s=e.appendChild(document.createElement("li")),l=s.appendChild(document.createElement("span")),l.style.backgroundColor=i[0].backgroundColor[a],r[a]&&s.appendChild(document.createTextNode(r[a]));return e.outerHTML},legend:{labels:{generateLabels:function(r){var a=r.data;return a.labels.length&&a.datasets.length?a.labels.map(function(t,e){var n=r.getDatasetMeta(0),i=n.controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(a.datasets[0].data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var n=e.index,i=this.chart,r,a,o;for(r=0,a=(i.data.datasets||[]).length;r<a;++r)o=i.getDatasetMeta(r),o.data[n]&&(o.data[n].hidden=!o.data[n].hidden);i.update()}},cutoutPercentage:50,rotation:-L,circumference:N,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return I.isArray(n)?(n=n.slice(),n[0]+=i):n+=i,n}}}}),m.extend({dataElementType:v.Arc,linkScales:I.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e=this,n=e.chart,i=n.chartArea,r=n.options,a=1,o=1,s=0,l=0,u=e.getMeta(),d=u.data,c=r.cutoutPercentage/100||0,h=r.circumference,f=e._getRingWeight(e.index),g,m,p,v;if(h<N){var y=r.rotation%N;y+=y>=F?-N:y<-F?N:0;var b=y+h,x=Math.cos(y),_=Math.sin(y),w=Math.cos(b),k=Math.sin(b),M=y<=0&&b>=0||b>=N,S=y<=L&&b>=L||b>=N+L,D=y===-F||b>=F,C=y<=-L&&b>=-L||b>=F+L,P=D?-1:Math.min(x,x*c,w,w*c),T=C?-1:Math.min(_,_*c,k,k*c),O=M?1:Math.max(x,x*c,w,w*c),A=S?1:Math.max(_,_*c,k,k*c);a=(O-P)/2,o=(A-T)/2,s=-(O+P)/2,l=-(A+T)/2}for(p=0,v=d.length;p<v;++p)d[p]._options=e._resolveDataElementOptions(d[p],p);for(n.borderWidth=e.getMaxBorderWidth(),g=(i.right-i.left-n.borderWidth)/a,m=(i.bottom-i.top-n.borderWidth)/o,n.outerRadius=Math.max(Math.min(g,m)/2,0),n.innerRadius=Math.max(n.outerRadius*c,0),n.radiusLength=(n.outerRadius-n.innerRadius)/(e._getVisibleDatasetWeightTotal()||1),n.offsetX=s*n.outerRadius,n.offsetY=l*n.outerRadius,u.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength*f,0),p=0,v=d.length;p<v;++p)e.updateElement(d[p],p,t)},updateElement:function(t,e,n){var i=this,r=i.chart,a=r.chartArea,o=r.options,s=o.animation,l=(a.left+a.right)/2,u=(a.top+a.bottom)/2,d=o.rotation,c=o.rotation,h=i.getDataset(),f=n&&s.animateRotate||t.hidden?0:i.calculateCircumference(h.data[e])*(o.circumference/N),g=n&&s.animateScale?0:i.innerRadius,m=n&&s.animateScale?0:i.outerRadius,p=t._options||{};I.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,borderAlign:p.borderAlign,x:l+r.offsetX,y:u+r.offsetY,startAngle:d,endAngle:c,circumference:f,outerRadius:m,innerRadius:g,label:I.valueAtIndexOrDefault(h.label,e,r.data.labels[e])}});var v=t._model;(!n||!s.animateRotate)&&(e===0?v.startAngle=o.rotation:v.startAngle=i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var n=this.getDataset(),t=this.getMeta(),i=0,r;return I.each(t.data,function(t,e){r=n.data[e],!isNaN(r)&&!t.hidden&&(i+=Math.abs(r))}),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?N*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e=this,n=0,i=e.chart,r,a,o,s,l,u,d,c;if(!t)for(r=0,a=i.data.datasets.length;r<a;++r)if(i.isDatasetVisible(r)){o=i.getDatasetMeta(r),t=o.data,r!==e.index&&(l=o.controller);break}if(!t)return 0;for(r=0,a=t.length;r<a;++r)s=t[r],l?(l._configure(),u=l._resolveDataElementOptions(s,r)):u=s._options,u.borderAlign!=="inner"&&(d=u.borderWidth,c=u.hoverBorderWidth,n=d>n?d:n,n=c>n?c:n);return n},setHoverStyle:function(t){var e=t._model,n=t._options,i=I.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Oe(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Oe(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Oe(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Oe(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}})),Fe=(D._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),D._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}}),De.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}})),y=I.valueOrDefault,Ie=I.options.resolve,Ne=I.canvas._isPointInArea;function Le(t,e){var n=t&&t.options.ticks||{},i=n.reverse,r=n.min===void 0?e:0,a=n.max===void 0?e:0;return{start:i?a:r,end:i?r:a}}function Re(t,e,n){var i=n/2,r=Le(t,i),a=Le(e,i);return{top:a.end,right:r.end,bottom:a.start,left:r.start}}function Ye(t){var e,n,i,r;return I.isObject(t)?(e=t.top,n=t.right,i=t.bottom,r=t.left):e=n=i=r=t,{top:e,right:n,bottom:i,left:r}}D._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var We=m.extend({datasetElementType:v.Line,dataElementType:v.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e=this,n=e.getMeta(),i=n.dataset,r=n.data||[],a=e.chart.options,o=e._config,s=e._showLine=y(o.showLine,a.showLines),l,u;for(e._xScale=e.getScaleForId(n.xAxisID),e._yScale=e.getScaleForId(n.yAxisID),s&&(o.tension!==void 0&&o.lineTension===void 0&&(o.lineTension=o.tension),i._scale=e._yScale,i._datasetIndex=e.index,i._children=r,i._model=e._resolveDatasetElementOptions(i),i.pivot()),l=0,u=r.length;l<u;++l)e.updateElement(r[l],l,t);for(s&&i._model.tension!==0&&e.updateBezierControlPoints(),l=0,u=r.length;l<u;++l)r[l].pivot()},updateElement:function(t,e,n){var i=this,r=i.getMeta(),a=t.custom||{},o=i.getDataset(),s=i.index,l=o.data[e],u=i._xScale,d=i._yScale,c=r.dataset._model,h,f,g=i._resolveDataElementOptions(t,e);h=u.getPixelForValue(typeof l=="object"?l:NaN,e,s),f=n?d.getBasePixel():i.calculatePointY(l,e,s),t._xScale=u,t._yScale=d,t._options=g,t._datasetIndex=s,t._index=e,t._model={x:h,y:f,skip:a.skip||isNaN(h)||isNaN(f),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:y(a.tension,c?c.tension:0),steppedLine:c?c.steppedLine:!1,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},r=e.chart.options,a=r.elements.line,o=m.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=y(n.spanGaps,r.spanGaps),o.tension=y(n.lineTension,a.tension),o.steppedLine=Ie([i.steppedLine,n.steppedLine,a.stepped]),o.clip=Ye(y(n.clip,Re(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i=this,r=i.chart,a=i._yScale,o=0,s=0,l,u,d,c,h,f,g;if(a.options.stacked){for(h=+a.getRightValue(t),f=r._getSortedVisibleDatasetMetas(),g=f.length,l=0;l<g&&(d=f[l],d.index!==n);++l)u=r.data.datasets[d.index],d.type==="line"&&d.yAxisID===a.id&&(c=+a.getRightValue(u.data[e]),c<0?s+=c||0:o+=c||0);return h<0?a.getPixelForValue(s+h):a.getPixelForValue(o+h)}return a.getPixelForValue(t)},updateBezierControlPoints:function(){var t=this,e=t.chart,n=t.getMeta(),i=n.dataset._model,r=e.chartArea,a=n.data||[],o,s,l,u;i.spanGaps&&(a=a.filter(function(t){return!t._model.skip}));function d(t,e,n){return Math.max(Math.min(t,n),e)}if(i.cubicInterpolationMode==="monotone")I.splineCurveMonotone(a);else for(o=0,s=a.length;o<s;++o)l=a[o]._model,u=I.splineCurve(I.previousItem(a,o)._model,l,I.nextItem(a,o)._model,i.tension),l.controlPointPreviousX=u.previous.x,l.controlPointPreviousY=u.previous.y,l.controlPointNextX=u.next.x,l.controlPointNextY=u.next.y;if(e.options.elements.line.capBezierPoints)for(o=0,s=a.length;o<s;++o)l=a[o]._model,Ne(l,r)&&(o>0&&Ne(a[o-1]._model,r)&&(l.controlPointPreviousX=d(l.controlPointPreviousX,r.left,r.right),l.controlPointPreviousY=d(l.controlPointPreviousY,r.top,r.bottom)),o<a.length-1&&Ne(a[o+1]._model,r)&&(l.controlPointNextX=d(l.controlPointNextX,r.left,r.right),l.controlPointNextY=d(l.controlPointNextY,r.top,r.bottom)))},draw:function(){var t=this,e=t.chart,n=t.getMeta(),i=n.data||[],r=e.chartArea,a=e.canvas,o=0,s=i.length,l;for(t._showLine&&(l=n.dataset._model.clip,I.canvas.clipArea(e.ctx,{left:l.left===!1?0:r.left-l.left,right:l.right===!1?a.width:r.right+l.right,top:l.top===!1?0:r.top-l.top,bottom:l.bottom===!1?a.height:r.bottom+l.bottom}),n.dataset.draw(),I.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(r)},setHoverStyle:function(t){var e=t._model,n=t._options,i=I.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=y(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=y(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=y(n.hoverBorderWidth,n.borderWidth),e.radius=y(n.hoverRadius,n.radius)}}),Ee=I.options.resolve,ze=(D._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e=document.createElement("ul"),n=t.data,i=n.datasets,r=n.labels,a,o,s,l;if(e.setAttribute("class",t.id+"-legend"),i.length)for(a=0,o=i[0].data.length;a<o;++a)s=e.appendChild(document.createElement("li")),l=s.appendChild(document.createElement("span")),l.style.backgroundColor=i[0].backgroundColor[a],r[a]&&s.appendChild(document.createTextNode(r[a]));return e.outerHTML},legend:{labels:{generateLabels:function(r){var a=r.data;return a.labels.length&&a.datasets.length?a.labels.map(function(t,e){var n=r.getDatasetMeta(0),i=n.controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(a.datasets[0].data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var n=e.index,i=this.chart,r,a,o;for(r=0,a=(i.data.datasets||[]).length;r<a;++r)o=i.getDatasetMeta(r),o.data[n].hidden=!o.data[n].hidden;i.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}}),m.extend({dataElementType:v.Arc,linkScales:I.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e=this,n=e.getDataset(),i=e.getMeta(),r=e.chart.options.startAngle||0,a=e._starts=[],o=e._angles=[],s=i.data,l,u,d;for(e._updateRadius(),i.count=e.countVisibleElements(),l=0,u=n.data.length;l<u;l++)a[l]=r,d=e._computeAngle(l),o[l]=d,r+=d;for(l=0,u=s.length;l<u;++l)s[l]._options=e._resolveDataElementOptions(s[l],l),e.updateElement(s[l],l,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,r=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(r/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,r=i.chart,a=i.getDataset(),o=r.options,s=o.animation,l=r.scale,u=r.data.labels,d=l.xCenter,c=l.yCenter,h=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(a.data[e]),g=i._starts[e],m=g+(t.hidden?0:i._angles[e]),p=s.animateScale?0:l.getDistanceFromCenterForValue(a.data[e]),v=t._options||{};I.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:c,innerRadius:0,outerRadius:n?p:f,startAngle:n&&s.animateRotate?h:g,endAngle:n&&s.animateRotate?h:m,label:I.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var n=this.getDataset(),t=this.getMeta(),i=0;return I.each(t.data,function(t,e){!isNaN(n.data[e])&&!t.hidden&&i++}),i},setHoverStyle:function(t){var e=t._model,n=t._options,i=I.getHoverColor,r=I.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=r(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=r(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=r(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),r=e.getMeta();if(isNaN(i.data[t])||r.data[t].hidden)return 0;var a={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return Ee([e.chart.options.elements.arc.angle,2*Math.PI/n],a,t)}})),Ve=(D._set("pie",I.clone(D.doughnut)),D._set("pie",{cutoutPercentage:0}),Ae),b=I.valueOrDefault,He=(D._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}}),m.extend({datasetElementType:v.Line,dataElementType:v.Point,linkScales:I.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e=this,n=e.getMeta(),i=n.dataset,r=n.data||[],a=e.chart.scale,o=e._config,s,l;for(o.tension!==void 0&&o.lineTension===void 0&&(o.lineTension=o.tension),i._scale=a,i._datasetIndex=e.index,i._children=r,i._loop=!0,i._model=e._resolveDatasetElementOptions(i),i.pivot(),s=0,l=r.length;s<l;++s)e.updateElement(r[s],s,t);for(e.updateBezierControlPoints(),s=0,l=r.length;s<l;++s)r[s].pivot()},updateElement:function(t,e,n){var i=this,r=t.custom||{},a=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,a.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,c=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:c,skip:r.skip||isNaN(d)||isNaN(c),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:b(r.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,i=m.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=b(e.spanGaps,n.spanGaps),i.tension=b(e.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var t=this,e=t.getMeta(),n=t.chart.chartArea,i=e.data||[],r,a,o,s;e.dataset._model.spanGaps&&(i=i.filter(function(t){return!t._model.skip}));function l(t,e,n){return Math.max(Math.min(t,n),e)}for(r=0,a=i.length;r<a;++r)o=i[r]._model,s=I.splineCurve(I.previousItem(i,r,!0)._model,o,I.nextItem(i,r,!0)._model,o.tension),o.controlPointPreviousX=l(s.previous.x,n.left,n.right),o.controlPointPreviousY=l(s.previous.y,n.top,n.bottom),o.controlPointNextX=l(s.next.x,n.left,n.right),o.controlPointNextY=l(s.next.y,n.top,n.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=I.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=b(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=b(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=b(n.hoverBorderWidth,n.borderWidth),e.radius=b(n.hoverRadius,n.radius)}}));D._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),D._set("global",{datasets:{scatter:{showLine:!1}}});var Be,je={bar:De,bubble:Te,doughnut:Ae,horizontalBar:Fe,line:We,polarArea:ze,pie:Ve,radar:He,scatter:We};function s(t,e){return t.native?{x:t.x,y:t.y}:I.getRelativePosition(t,e)}function Ue(t,e){var n=t._getSortedVisibleDatasetMetas(),i,r,a,o,s,l;for(r=0,o=n.length;r<o;++r)for(i=n[r].data,a=0,s=i.length;a<s;++a)l=i[a],l._view.skip||e(l)}function Ge(t,e){var n=[];return Ue(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function qe(t,i,r,a){var o=Number.POSITIVE_INFINITY,s=[];return Ue(t,function(t){if(!(r&&!t.inRange(i.x,i.y))){var e=t.getCenterPoint(),n=a(i,e);n<o?(s=[t],o=n):n===o&&s.push(t)}}),s}function Ze(t){var r=t.indexOf("x")!==-1,a=t.indexOf("y")!==-1;return function(t,e){var n=r?Math.abs(t.x-e.x):0,i=a?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))}}function $e(t,e,n){var i=s(e,t);n.axis=n.axis||"x";var r=Ze(n.axis),a=n.intersect?Ge(t,i):qe(t,i,!1,r),o=[];return a.length?(t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[a[0]._index];e&&!e._view.skip&&o.push(e)}),o):[]}var Xe={modes:{single:function(t,e){var n=s(e,t),i=[];return Ue(t,function(t){if(t.inRange(n.x,n.y))return i.push(t),i}),i.slice(0,1)},label:$e,index:$e,dataset:function(t,e,n){var i=s(e,t);n.axis=n.axis||"xy";var r=Ze(n.axis),a=n.intersect?Ge(t,i):qe(t,i,!1,r);return a.length>0&&(a=t.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(t,e){return $e(t,e,{intersect:!1})},point:function(t,e){var n=s(e,t);return Ge(t,n)},nearest:function(t,e,n){var i=s(e,t);n.axis=n.axis||"xy";var r=Ze(n.axis);return qe(t,i,n.intersect,r)},x:function(t,e,n){var i=s(e,t),r=[],a=!1;return Ue(t,function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(a=!0)}),n.intersect&&!a&&(r=[]),r},y:function(t,e,n){var i=s(e,t),r=[],a=!1;return Ue(t,function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(a=!0)}),n.intersect&&!a&&(r=[]),r}}},Je=I.extend;function Ke(t,e){return I.where(t,function(t){return t.pos===e})}function Qe(t,r){return t.sort(function(t,e){var n=r?e:t,i=r?t:e;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function tn(t){var e=[],n,i,r;for(n=0,i=(t||[]).length;n<i;++n)r=t[n],e.push({index:n,box:r,pos:r.position,horizontal:r.isHorizontal(),weight:r.weight});return e}function en(t,e){var n,i,r;for(n=0,i=t.length;n<i;++n)r=t[n],r.width=r.horizontal?r.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,r.height=r.horizontal&&e.hBoxMaxHeight}function nn(t){var e=tn(t),n=Qe(Ke(e,"left"),!0),i=Qe(Ke(e,"right")),r=Qe(Ke(e,"top"),!0),a=Qe(Ke(e,"bottom"));return{leftAndTop:n.concat(r),rightAndBottom:i.concat(a),chartArea:Ke(e,"chartArea"),vertical:n.concat(i),horizontal:r.concat(a)}}function rn(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function an(t,e,n){var i=n.box,r=t.maxPadding,a,o;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?i.height:i.width,t[n.pos]+=n.size,i.getPadding){var s=i.getPadding();r.top=Math.max(r.top,s.top),r.left=Math.max(r.left,s.left),r.bottom=Math.max(r.bottom,s.bottom),r.right=Math.max(r.right,s.right)}if(a=e.outerWidth-rn(r,t,"left","right"),o=e.outerHeight-rn(r,t,"top","bottom"),a!==t.w||o!==t.h){t.w=a,t.h=o;var l=n.horizontal?[a,t.w]:[o,t.h];return l[0]!==l[1]&&(!isNaN(l[0])||!isNaN(l[1]))}}function on(n){var i=n.maxPadding;function t(t){var e=Math.max(i[t]-n[t],0);return n[t]+=e,e}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function sn(t,n){var i=n.maxPadding;function e(t){var e={left:0,top:0,right:0,bottom:0};return t.forEach(function(t){e[t]=Math.max(n[t],i[t])}),e}return e(t?["left","right"]:["top","bottom"])}function ln(t,e,n){var i=[],r,a,o,s,l,u;for(r=0,a=t.length;r<a;++r)o=t[r],s=o.box,s.update(o.width||e.w,o.height||e.h,sn(o.horizontal,e)),an(e,n,o)&&(u=!0,i.length&&(l=!0)),s.fullWidth||i.push(o);return l&&ln(i,e,n)||u}function un(t,e,n){var i=n.padding,r=e.x,a=e.y,o,s,l,u;for(o=0,s=t.length;o<s;++o)l=t[o],u=l.box,l.horizontal?(u.left=u.fullWidth?i.left:e.left,u.right=u.fullWidth?n.outerWidth-i.right:e.left+e.w,u.top=a,u.bottom=a+u.height,u.width=u.right-u.left,a=u.bottom):(u.left=r,u.right=r+u.width,u.top=e.top,u.bottom=e.top+e.h,u.height=u.bottom-u.top,r=u.right);e.x=r,e.y=a}D._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var a={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i=["fullWidth","position","weight"],r=i.length,a=0,o;a<r;++a)o=i[a],n.hasOwnProperty(o)&&(e[o]=n[o])},update:function(n,t,e){if(!!n){var i=n.options.layout||{},r=I.options.toPadding(i.padding),a=t-r.width,o=e-r.height,s=nn(n.boxes),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:a,vBoxMaxWidth:a/2/l.length,hBoxMaxHeight:o/2}),c=Je({maxPadding:Je({},r),w:a,h:o,x:r.left,y:r.top},r);en(l.concat(u),d),ln(l,c,d),ln(u,c,d)&&ln(l,c,d),on(c),un(s.leftAndTop,c,d),c.x+=c.w,c.y+=c.h,un(s.rightAndBottom,c,d),n.chartArea={left:c.left,top:c.top,right:c.left+c.w,bottom:c.top+c.h},I.each(s.chartArea,function(t){var e=t.box;Je(e,n.chartArea),e.update(c.w,c.h)})}}},dn={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},cn,hn,fn=Y(Object.freeze({__proto__:null,default:`/*\r
* DOM element rendering detection\r
* https://davidwalsh.name/detect-node-insertion\r
*/\r
@keyframes chartjs-render-animation {\r
from { opacity: 0.99; }\r
to { opacity: 1; }\r
}\r
\r
.chartjs-render-monitor {\r
animation: chartjs-render-animation 0.001s;\r
}\r
\r
/*\r
* DOM element resizing detection\r
* https://github.com/marcj/css-element-queries\r
*/\r
.chartjs-size-monitor,\r
.chartjs-size-monitor-expand,\r
.chartjs-size-monitor-shrink {\r
position: absolute;\r
direction: ltr;\r
left: 0;\r
top: 0;\r
right: 0;\r
bottom: 0;\r
overflow: hidden;\r
pointer-events: none;\r
visibility: hidden;\r
z-index: -1;\r
}\r
\r
.chartjs-size-monitor-expand > div {\r
position: absolute;\r
width: 1000000px;\r
height: 1000000px;\r
left: 0;\r
top: 0;\r
}\r
\r
.chartjs-size-monitor-shrink > div {\r
position: absolute;\r
width: 200%;\r
height: 200%;\r
left: 0;\r
top: 0;\r
}\r
`})),x="$chartjs",gn="chartjs-",mn=gn+"size-monitor",pn=gn+"render-monitor",vn=gn+"render-animation",yn=["animationstart","webkitAnimationStart"],bn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function xn(t,e){var n=I.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}function _n(t,e){var n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[x]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",r===null||r===""){var a=xn(t,"width");a!==void 0&&(t.width=a)}if(i===null||i==="")if(t.style.height==="")t.height=t.width/(e.options.aspectRatio||2);else{var o=xn(t,"height");a!==void 0&&(t.height=o)}return t}var wn,kn=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch{}return t}()?{passive:!0}:!1;function Mn(t,e,n){t.addEventListener(e,n,kn)}function Sn(t,e,n){t.removeEventListener(e,n,kn)}function Dn(t,e,n,i,r){return{type:t,chart:e,native:r||null,x:n!==void 0?n:null,y:i!==void 0?i:null}}function Cn(t,e){var n=bn[t.type]||t.type,i=I.getRelativePosition(t,e);return Dn(n,e,i.x,i.y,t)}function Pn(t,e){var n=!1,i=[];return function(){i=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,I.requestAnimFrame.call(window,function(){n=!1,t.apply(e,i)}))}}function Tn(t){var e=document.createElement("div");return e.className=t||"",e}function On(t){var e=1e6,n=Tn(mn),i=Tn(mn+"-expand"),r=Tn(mn+"-shrink");i.appendChild(Tn()),r.appendChild(Tn()),n.appendChild(i),n.appendChild(r),n._reset=function(){i.scrollLeft=e,i.scrollTop=e,r.scrollLeft=e,r.scrollTop=e};var a=function(){n._reset(),t()};return Mn(i,"scroll",a.bind(i,"expand")),Mn(r,"scroll",a.bind(r,"shrink")),n}function An(e,n){var t=e[x]||(e[x]={}),i=t.renderProxy=function(t){t.animationName===vn&&n()};I.each(yn,function(t){Mn(e,t,i)}),t.reflow=!!e.offsetParent,e.classList.add(pn)}function Fn(e){var t=e[x]||{},n=t.renderProxy;n&&(I.each(yn,function(t){Sn(e,t,n)}),delete t.renderProxy),e.classList.remove(pn)}function In(n,i,r){var a=n[x]||(n[x]={}),e=a.resizer=On(Pn(function(){if(a.resizer){var t=r.options.maintainAspectRatio&&n.parentNode,e=t?t.clientWidth:0;i(Dn("resize",r)),t&&t.clientWidth<e&&r.canvas&&i(Dn("resize",r))}}));An(n,function(){if(a.resizer){var t=n.parentNode;t&&t!==e.parentNode&&t.insertBefore(e,t.firstChild),e._reset()}})}function Nn(t){var e=t[x]||{},n=e.resizer;delete e.resizer,Fn(t),n&&n.parentNode&&n.parentNode.removeChild(n)}function Ln(t,e){var n=t[x]||(t[x]={});if(!n.containsStyles){n.containsStyles=!0,e=`/* Chart.js */
`+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}var Rn={disableCSSInjection:!1,_enabled:typeof window<"u"&&typeof document<"u",_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document,n=e.host?e:document.head;Ln(n,fn)}},acquireContext:function(t,e){typeof t=="string"?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),_n(t,e),n):null},releaseContext:function(t){var n=t.canvas;if(!!n[x]){var i=n[x].initial;["height","width"].forEach(function(t){var e=i[t];I.isNullOrUndef(e)?n.removeAttribute(t):n.setAttribute(t,e)}),I.each(i.style||{},function(t,e){n.style[e]=t}),n.width=n.width,delete n[x]}},addEventListener:function(e,t,n){var i=e.canvas;if(t==="resize"){In(i,n,e);return}var r=n[x]||(n[x]={}),a=r.proxies||(r.proxies={}),o=a[e.id+"_"+t]=function(t){n(Cn(t,e))};Mn(i,t,o)},removeEventListener:function(t,e,n){var i=t.canvas;if(e==="resize"){Nn(i);return}var r=n[x]||{},a=r.proxies||{},o=a[t.id+"_"+e];!o||Sn(i,e,o)}},Yn=(I.addEvent=Mn,I.removeEvent=Sn,Rn._enabled?Rn:dn),Wn=I.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Yn),_=(D._set("global",{plugins:{}}),{_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){e.indexOf(t)===-1&&e.push(t)}),this._cacheId++},unregister:function(t){var n=this._plugins;[].concat(t).forEach(function(t){var e=n.indexOf(t);e!==-1&&n.splice(e,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i=this.descriptors(t),r=i.length,a,o,s,l,u;for(a=0;a<r;++a)if(o=i[a],s=o.plugin,u=s[e],typeof u=="function"&&(l=[t].concat(n||[]),l.push(o.options),u.apply(s,l)===!1))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var r=[],a=[],n=t&&t.config||{},o=n.options&&n.options.plugins||{};return this._plugins.concat(n.plugins||[]).forEach(function(t){var e=r.indexOf(t);if(e===-1){var n=t.id,i=o[n];i!==!1&&(i===!0&&(i=I.clone(D.global.plugins[n])),r.push(t),a.push({plugin:t,options:i||{}}))}}),e.descriptors=a,e.id=this._cacheId,a},_invalidate:function(t){delete t.$plugins}}),En={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=I.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?I.merge(Object.create(null),[D.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var n=this;n.defaults.hasOwnProperty(t)&&(n.defaults[t]=I.extend(n.defaults[t],e))},addScalesToLayout:function(e){I.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,a.addBox(e,t)})}},n=I.valueOrDefault,zn=I.rtl.getRtlAdapter,Vn=(D._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:I.noop,title:function(t,e){var n="",i=e.labels,r=i?i.length:0;if(t.length>0){var a=t[0];a.label?n=a.label:a.xLabel?n=a.xLabel:r>0&&a.index<r&&(n=i[a.index])}return n},afterTitle:I.noop,beforeBody:I.noop,beforeLabel:I.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),I.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex),i=n.data[t.index],r=i._view;return{borderColor:r.borderColor,backgroundColor:r.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:I.noop,afterBody:I.noop,beforeFooter:I.noop,footer:I.noop,afterFooter:I.noop}}}),{average:function(t){if(!t.length)return!1;var e,n,i=0,r=0,a=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,r+=s.y,++a}}return{x:i/a,y:r/a}},nearest:function(t,e){var n=e.x,i=e.y,r=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=t.length;a<o;++a){var l=t[a];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=I.distanceBetweenPoints(e,u);d<r&&(r=d,s=l)}}if(s){var c=s.tooltipPosition();n=c.x,i=c.y}return{x:n,y:i}}});function w(t,e){return e&&(I.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function k(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
`)>-1?t.split(`
`):t}function Hn(t){var e=t._xScale,n=t._yScale||t._scale,i=t._index,r=t._datasetIndex,a=t._chart.getDatasetMeta(r).controller,o=a._getIndexScale(),s=a._getValueScale();return{xLabel:e?e.getLabelForIndex(i,r):"",yLabel:n?n.getLabelForIndex(i,r):"",label:o?""+o.getLabelForIndex(i,r):"",value:s?""+s.getLabelForIndex(i,r):"",index:i,datasetIndex:r,x:t._model.x,y:t._model.y}}function Bn(t){var e=D.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:n(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:n(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:n(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:n(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:n(t.titleFontStyle,e.defaultFontStyle),titleFontSize:n(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:n(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:n(t.footerFontStyle,e.defaultFontStyle),footerFontSize:n(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 jn(t,e){var n=t._chart.ctx,i=e.yPadding*2,r=0,a=e.body,o=a.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,c=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*c,i+=l?(l-1)*e.footerSpacing:0;var h=0,f=function(t){r=Math.max(r,n.measureText(t).width+h)};return n.font=I.fontString(u,e._titleFontStyle,e._titleFontFamily),I.each(e.title,f),n.font=I.fontString(d,e._bodyFontStyle,e._bodyFontFamily),I.each(e.beforeBody.concat(e.afterBody),f),h=e.displayColors?d+2:0,I.each(a,function(t){I.each(t.before,f),I.each(t.lines,f),I.each(t.after,f)}),h=0,n.font=I.fontString(c,e._footerFontStyle,e._footerFontFamily),I.each(e.footer,f),r+=2*e.xPadding,{width:r,height:i}}function Un(t,e){var n=t._model,i=t._chart,r=t._chart.chartArea,a="center",o="center";n.y<e.height?o="top":n.y>i.height-e.height&&(o="bottom");var s,l,u,d,c,h=(r.left+r.right)/2,f=(r.top+r.bottom)/2;o==="center"?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=i.width-e.width/2}),u=function(t){return t+e.width+n.caretSize+n.caretPadding>i.width},d=function(t){return t-e.width-n.caretSize-n.caretPadding<0},c=function(t){return t<=f?"top":"bottom"},s(n.x)?(a="left",u(n.x)&&(a="center",o=c(n.y))):l(n.x)&&(a="right",d(n.x)&&(a="center",o=c(n.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:a,yAlign:g.yAlign?g.yAlign:o}}function Gn(t,e,n,i){var r=t.x,a=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,d=n.yAlign,c=o+s,h=l+s;return u==="right"?r-=e.width:u==="center"&&(r-=e.width/2,r+e.width>i.width&&(r=i.width-e.width),r<0&&(r=0)),d==="top"?a+=c:d==="bottom"?a-=e.height+c:a-=e.height/2,d==="center"?u==="left"?r+=c:u==="right"&&(r-=c):u==="left"?r-=h:u==="right"&&(r+=h),{x:r,y:a}}function qn(t,e){return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-t.xPadding:t.x+t.xPadding}function Zn(t){return w([],k(t))}var $n,Xn,Jn=t.extend({initialize:function(){this._model=Bn(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),r=n.title.apply(t,arguments),a=n.afterTitle.apply(t,arguments),o=[];return o=w(o,k(i)),o=w(o,k(r)),o=w(o,k(a)),o},getBeforeBody:function(){return Zn(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,n){var i=this,r=i._options.callbacks,a=[];return I.each(t,function(t){var e={before:[],lines:[],after:[]};w(e.before,k(r.beforeLabel.call(i,t,n))),w(e.lines,r.label.call(i,t,n)),w(e.after,k(r.afterLabel.call(i,t,n))),a.push(e)}),a},getAfterBody:function(){return Zn(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),r=e.afterFooter.apply(t,arguments),a=[];return a=w(a,k(n)),a=w(a,k(i)),a=w(a,k(r)),a},update:function(t){var e=this,n=e._options,i=e._model,r=e._model=Bn(n),a=e._active,o=e._data,s={xAlign:i.xAlign,yAlign:i.yAlign},l={x:i.x,y:i.y},u={width:i.width,height:i.height},d={x:i.caretX,y:i.caretY},c,h;if(a.length){r.opacity=1;var f=[],g=[];d=Vn[n.position].call(e,a,e._eventPosition);var m=[];for(c=0,h=a.length;c<h;++c)m.push(Hn(a[c]));n.filter&&(m=m.filter(function(t){return n.filter(t,o)})),n.itemSort&&(m=m.sort(function(t,e){return n.itemSort(t,e,o)})),I.each(m,function(t){f.push(n.callbacks.labelColor.call(e,t,e._chart)),g.push(n.callbacks.labelTextColor.call(e,t,e._chart))}),r.title=e.getTitle(m,o),r.beforeBody=e.getBeforeBody(m,o),r.body=e.getBody(m,o),r.afterBody=e.getAfterBody(m,o),r.footer=e.getFooter(m,o),r.x=d.x,r.y=d.y,r.caretPadding=n.caretPadding,r.labelColors=f,r.labelTextColors=g,r.dataPoints=m,u=jn(this,r),s=Un(this,u),l=Gn(r,u,s,e._chart)}else r.opacity=0;return r.xAlign=s.xAlign,r.yAlign=s.yAlign,r.x=l.x,r.y=l.y,r.width=u.width,r.height=u.height,r.caretX=d.x,r.caretY=d.y,e._model=r,t&&n.custom&&n.custom.call(e,r),e},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,r=this.getCaretPosition(t,e,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,n){var i,r,a,o,s,l,u=n.caretSize,d=n.cornerRadius,c=n.xAlign,h=n.yAlign,f=t.x,g=t.y,m=e.width,p=e.height;if(h==="center")s=g+p/2,c==="left"?(i=f,r=i-u,a=i,o=s+u,l=s-u):(i=f+m,r=i+u,a=i,o=s-u,l=s+u);else if(c==="left"?(r=f+d+u,i=r-u,a=r+u):c==="right"?(r=f+m-d-u,i=r-u,a=r+u):(r=n.caretX,i=r-u,a=r+u),h==="top")o=g,s=o-u,l=o;else{o=g+p,s=o+u,l=o;var v=a;a=i,i=v}return{x1:i,x2:r,x3:a,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i=e.title,r=i.length,a,o,s;if(r){var l=zn(e.rtl,e.x,e.width);for(t.x=qn(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",a=e.titleFontSize,o=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=I.fontString(a,e._titleFontStyle,e._titleFontFamily),s=0;s<r;++s)n.fillText(i[s],l.x(t.x),t.y+a/2),t.y+=a+o,s+1===r&&(t.y+=e.titleMarginBottom-o)}},drawBody:function(e,t,n){var i=t.bodyFontSize,r=t.bodySpacing,a=t._bodyAlign,o=t.body,s=t.displayColors,l=0,u=s?qn(t,"left"):0,d=zn(t.rtl,t.x,t.width),c=function(t){n.fillText(t,d.x(e.x+l),e.y+i/2),e.y+=i+r},h,f,g,m,p,v,y,b,x=d.textAlign(a);for(n.textAlign=a,n.textBaseline="middle",n.font=I.fontString(i,t._bodyFontStyle,t._bodyFontFamily),e.x=qn(t,x),n.fillStyle=t.bodyFontColor,I.each(t.beforeBody,c),l=s&&x!=="right"?a==="center"?i/2+1:i+2:0,p=0,y=o.length;p<y;++p){for(h=o[p],f=t.labelTextColors[p],g=t.labelColors[p],n.fillStyle=f,I.each(h.before,c),m=h.lines,v=0,b=m.length;v<b;++v){if(s){var _=d.x(u);n.fillStyle=t.legendColorBackground,n.fillRect(d.leftForLtr(_,i),e.y,i,i),n.lineWidth=1,n.strokeStyle=g.borderColor,n.strokeRect(d.leftForLtr(_,i),e.y,i,i),n.fillStyle=g.backgroundColor,n.fillRect(d.leftForLtr(d.xPlus(_,1),i-2),e.y+1,i-2,i-2),n.fillStyle=f}c(m[v])}I.each(h.after,c)}l=0,I.each(t.afterBody,c),e.y-=r},drawFooter:function(t,e,n){var i=e.footer,r=i.length,a,o;if(r){var s=zn(e.rtl,e.x,e.width);for(t.x=qn(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",a=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=I.fontString(a,e._footerFontStyle,e._footerFontFamily),o=0;o<r;++o)n.fillText(i[o],s.x(t.x),t.y+a/2),t.y+=a+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var r=e.xAlign,a=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),a==="top"&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),a==="center"&&r==="right"&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),a==="bottom"&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),a==="center"&&r==="left"&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(e.opacity!==0){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},r=Math.abs(e.opacity<.001)?0:e.opacity,a=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(i,e,t,n),i.y+=e.yPadding,I.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),I.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e=this,n=e._options,i=!1;return e._lastActive=e._lastActive||[],t.type==="mouseout"?e._active=[]:(e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),n.reverse&&e._active.reverse()),i=!I.arrayEquals(e._active,e._lastActive),i&&(e._lastActive=e._active,(n.enabled||n.custom)&&(e._eventPosition={x:t.x,y:t.y},e.update(!0),e.pivot())),i}}),Kn=(Jn.positioners=Vn,I.valueOrDefault);function Qn(){return I.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if(t==="xAxes"||t==="yAxes"){var r=n[t].length,a,o,s;for(e[t]||(e[t]=[]),a=0;a<r;++a)s=n[t][a],o=Kn(s.type,t==="xAxes"?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||s.type&&s.type!==e[t][a].type?I.merge(e[t][a],[En.getScaleDefaults(o),s]):I.merge(e[t][a],s)}else I._merger(t,e,n,i)}})}function ti(){return I.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var r=e[t]||Object.create(null),a=n[t];t==="scales"?e[t]=Qn(r,a):t==="scale"?e[t]=I.merge(r,[En.getScaleDefaults(a.type),a]):I._merger(t,e,n,i)}})}function ei(t){t=t||Object.create(null);var e=t.data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=ti(D.global,D[t.type],t.options||{}),t}function ni(e){var t=e.options;I.each(e.scales,function(t){a.removeBox(e,t)}),t=ti(D.global,D[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function ii(t,e,n){var i,r=function(t){return t.id===i};do{i=e+n++}while(I.findIndex(t,r)>=0);return i}function ri(t){return t==="top"||t==="bottom"}function ai(n,i){return function(t,e){return t[n]===e[n]?t[i]-e[i]:t[n]-e[n]}}D._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 oi=function(t,e){return this.construct(t,e),this},M=(I.extend(oi.prototype,{construct:function(t,e){var n=this;e=ei(e);var i=Wn.acquireContext(t,e),r=i&&i.canvas,a=r&&r.height,o=r&&r.width;if(n.id=I.uid(),n.ctx=i,n.canvas=r,n.config=e,n.width=o,n.height=a,n.aspectRatio=a?o/a:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,oi.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),!i||!r){console.error("Failed to create chart: can't acquire context from the given item");return}n.initialize(),n.update()},initialize:function(){var t=this;return _.notify(t,"beforeInit"),I.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),_.notify(t,"afterInit"),t},clear:function(){return I.canvas.clear(this),this},stop:function(){return jt.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,r=n.maintainAspectRatio&&e.aspectRatio||null,a=Math.max(0,Math.floor(I.getMaximumWidth(i))),o=Math.max(0,Math.floor(r?a/r:I.getMaximumHeight(i)));if(!(e.width===a&&e.height===o)&&(i.width=e.width=a,i.height=e.height=o,i.style.width=a+"px",i.style.height=o+"px",I.retinaScale(e,n.devicePixelRatio),!t)){var s={width:a,height:o};_.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,n=t.scales||{},e=t.scale;I.each(n.xAxes,function(t,e){t.id||(t.id=ii(n.xAxes,"x-axis-",e))}),I.each(n.yAxes,function(t,e){t.id||(t.id=ii(n.yAxes,"y-axis-",e))}),e&&(e.id=e.id||"scale")},buildOrUpdateScales:function(){var o=this,t=o.options,s=o.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),I.each(e,function(t){var e=t.options,n=e.id,i=Kn(e.type,t.dtype);ri(e.position)!==ri(t.dposition)&&(e.position=t.dposition),l[n]=!0;var r=null;if(n in s&&s[n].type===i)r=s[n],r.options=e,r.ctx=o.ctx,r.chart=o;else{var a=En.getScaleConstructor(i);if(!a)return;r=new a({id:n,type:i,options:e,ctx:o.ctx,chart:o}),s[r.id]=r}r.mergeTicksOptions(),t.isDefault&&(o.scale=r)}),I.each(l,function(t,e){t||delete s[e]}),o.scales=s,En.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t=this,e=[],n=t.data.datasets,i,r;for(i=0,r=n.length;i<r;i++){var a=n[i],o=t.getDatasetMeta(i),s=a.type||t.config.type;if(o.type&&o.type!==s&&(t.destroyDatasetMeta(i),o=t.getDatasetMeta(i)),o.type=s,o.order=a.order||0,o.index=i,o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{var l=je[o.type];if(l===void 0)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(t,i),e.push(o.controller)}}return e},resetElements:function(){var n=this;I.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this,n,i;if((!t||typeof t!="object")&&(t={duration:t,lazy:arguments[1]}),ni(e),_._invalidate(e),_.notify(e,"beforeUpdate")!==!1){e.tooltip._data=e.data;var r=e.buildOrUpdateControllers();for(n=0,i=e.data.datasets.length;n<i;n++)e.getDatasetMeta(n).controller.buildOrUpdateElements();e.updateLayout(),e.options.animation&&e.options.animation.duration&&I.each(r,function(t){t.reset()}),e.updateDatasets(),e.tooltip.initialize(),e.lastActive=[],_.notify(e,"afterUpdate"),e._layers.sort(ai("z","_idx")),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;_.notify(e,"beforeLayout")!==!1&&(a.update(this,this.width,this.height),e._layers=[],I.each(e.boxes,function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())},e),e._layers.forEach(function(t,e){t._idx=e}),_.notify(e,"afterScaleUpdate"),_.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(_.notify(t,"beforeDatasetsUpdate")!==!1){for(var e=0,n=t.data.datasets.length;e<n;++e)t.updateDataset(e);_.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,n=e.getDatasetMeta(t),i={meta:n,index:t};_.notify(e,"beforeDatasetUpdate",[i])!==!1&&(n.controller._update(),_.notify(e,"afterDatasetUpdate",[i]))},render:function(t){var e=this;(!t||typeof t!="object")&&(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Kn(t.duration,n&&n.duration),r=t.lazy;if(_.notify(e,"beforeRender")!==!1){var a=function(t){_.notify(e,"afterRender"),I.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new Bt({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=I.easing.effects[e.easing],i=e.currentStep,r=i/e.numSteps;t.draw(n(r),r,i)},onAnimationProgress:n.onProgress,onAnimationComplete:a});jt.addAnimation(e,o,i,r)}else e.draw(),a(new Bt({numSteps:0,chart:e}));return e}},draw:function(t){var e=this,n,i;if(e.clear(),I.isNullOrUndef(t)&&(t=1),e.transition(t),!(e.width<=0||e.height<=0)&&_.notify(e,"beforeDraw",[t])!==!1){for(i=e._layers,n=0;n<i.length&&i[n].z<=0;++n)i[n].draw(e.chartArea);for(e.drawDatasets(t);n<i.length;++n)i[n].draw(e.chartArea);e._drawTooltip(t),_.notify(e,"afterDraw",[t])}},transition:function(t){for(var e=this,n=0,i=(e.data.datasets||[]).length;n<i;++n)e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.transition(t);e.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e=this,n=e.data.datasets||[],i=[],r,a;for(r=0,a=n.length;r<a;++r)(!t||e.isDatasetVisible(r))&&i.push(e.getDatasetMeta(r));return i.sort(ai("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e=this,n,i;if(_.notify(e,"beforeDatasetsDraw",[t])!==!1){for(n=e._getSortedVisibleDatasetMetas(),i=n.length-1;i>=0;--i)e.drawDataset(n[i],t);_.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,i={meta:t,index:t.index,easingValue:e};_.notify(n,"beforeDatasetDraw",[i])!==!1&&(t.controller.draw(e),_.notify(n,"afterDatasetDraw",[i]))},_drawTooltip:function(t){var e=this,n=e.tooltip,i={tooltip:n,easingValue:t};_.notify(e,"beforeTooltipDraw",[i])!==!1&&(n.draw(),_.notify(e,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return Xe.modes.single(this,t)},getElementsAtEvent:function(t){return Xe.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return Xe.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=Xe.modes[e];return typeof i=="function"?i(this,t,n):[]},getDatasetAtEvent:function(t){return Xe.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var i=n._meta[e.id];return i||(i=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:t}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return typeof e.hidden=="boolean"?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t=this,e=t.canvas,n,i;for(t.stop(),n=0,i=t.data.datasets.length;n<i;++n)t.destroyDatasetMeta(n);e&&(t.unbindEvents(),I.canvas.clear(t),Wn.releaseContext(t.ctx),t.canvas=null,t.ctx=null),_.notify(t,"destroy"),delete oi.instances[t.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Jn({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var e=this,n=e._listeners={},i=function(){e.eventHandler.apply(e,arguments)};I.each(e.options.events,function(t){Wn.addEventListener(e,t,i),n[t]=i}),e.options.responsive&&(i=function(){e.resize()},Wn.addEventListener(e,"resize",i),n.resize=i)},unbindEvents:function(){var n=this,t=n._listeners;!t||(delete n._listeners,I.each(t,function(t,e){Wn.removeEventListener(n,e,t)}))},updateHoverStyle:function(t,e,n){var i=n?"set":"remove",r,a,o;for(a=0,o=t.length;a<o;++a)r=t[a],r&&this.getDatasetMeta(r._datasetIndex).controller[i+"HoverStyle"](r);e==="dataset"&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+i+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(_.notify(e,"beforeEvent",[t])!==!1){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),_.notify(e,"afterEvent",[t]);var r=e._bufferedRequest;return r?e.render(r):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e=this,n=e.options||{},i=n.hover,r=!1;return e.lastActive=e.lastActive||[],t.type==="mouseout"?e.active=[]:e.active=e.getElementsAtEventForMode(t,i.mode,i),I.callback(n.onHover||n.hover.onHover,[t.native,e.active],e),(t.type==="mouseup"||t.type==="click")&&n.onClick&&n.onClick.call(e,t.native,e.active),e.lastActive.length&&e.updateHoverStyle(e.lastActive,i.mode,!1),e.active.length&&i.mode&&e.updateHoverStyle(e.active,i.mode,!0),r=!I.arrayEquals(e.active,e.lastActive),e.lastActive=e.active,r}}),oi.instances={},oi),si=((oi.Controller=oi).types={},I.configMerge=ti,I.scaleMerge=Qn,function(){I.where=function(t,e){if(I.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return I.each(t,function(t){e(t)&&n.push(t)}),n},I.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=n===void 0?t:n;for(var i=0,r=t.length;i<r;++i)if(e.call(n,t[i],i,t))return i;return-1},I.findNextWhere=function(t,e,n){I.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var r=t[i];if(e(r))return r}},I.findPreviousWhere=function(t,e,n){I.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var r=t[i];if(e(r))return r}},I.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},I.almostEquals=function(t,e,n){return Math.abs(t-e)<n},I.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},I.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},I.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},I.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return t=+t,t===0||isNaN(t)?t:t>0?1:-1},I.toRadians=function(t){return t*(Math.PI/180)},I.toDegrees=function(t){return t*(180/Math.PI)},I._decimalPlaces=function(t){if(!!I.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},I.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i),a=Math.atan2(i,n);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:r}},I.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},I.aliasPixel=function(t){return t%2===0?0:.5},I._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,r=n/2;return Math.round((e-r)*i)/i+r},I.splineCurve=function(t,e,n,i){var r=t.skip?e:t,a=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(a.x-r.x,2)+Math.pow(a.y-r.y,2)),l=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),u=s/(s+l),d=l/(s+l);u=isNaN(u)?0:u,d=isNaN(d)?0:d;var c=i*u,h=i*d;return{previous:{x:a.x-c*(o.x-r.x),y:a.y-c*(o.y-r.y)},next:{x:a.x+h*(o.x-r.x),y:a.y+h*(o.y-r.y)}}},I.EPSILON=Number.EPSILON||1e-14,I.splineCurveMonotone=function(t){var e=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),n=e.length,i,r,a,o;for(i=0;i<n;++i)if(a=e[i],!a.model.skip){if(r=i>0?e[i-1]:null,o=i<n-1?e[i+1]:null,o&&!o.model.skip){var s=o.model.x-a.model.x;a.deltaK=s!==0?(o.model.y-a.model.y)/s:0}!r||r.model.skip?a.mK=a.deltaK:!o||o.model.skip?a.mK=r.deltaK:this.sign(r.deltaK)!==this.sign(a.deltaK)?a.mK=0:a.mK=(r.deltaK+a.deltaK)/2}var l,u,d,c;for(i=0;i<n-1;++i)if(a=e[i],o=e[i+1],!(a.model.skip||o.model.skip)){if(I.almostEquals(a.deltaK,0,this.EPSILON)){a.mK=o.mK=0;continue}l=a.mK/a.deltaK,u=o.mK/a.deltaK,c=Math.pow(l,2)+Math.pow(u,2),!(c<=9)&&(d=3/Math.sqrt(c),a.mK=l*d*a.deltaK,o.mK=u*d*a.deltaK)}var h;for(i=0;i<n;++i)a=e[i],!a.model.skip&&(r=i>0?e[i-1]:null,o=i<n-1?e[i+1]:null,r&&!r.model.skip&&(h=(a.model.x-r.model.x)/3,a.model.controlPointPreviousX=a.model.x-h,a.model.controlPointPreviousY=a.model.y-h*a.mK),o&&!o.model.skip&&(h=(o.model.x-a.model.x)/3,a.model.controlPointNextX=a.model.x+h,a.model.controlPointNextY=a.model.y+h*a.mK))},I.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},I.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},I.niceNum=function(t,e){var n=Math.floor(I.log10(t)),i=t/Math.pow(10,n),r;return e?i<1.5?r=1:i<3?r=2:i<7?r=5:r=10:i<=1?r=1:i<=2?r=2:i<=5?r=5:r=10,r*Math.pow(10,n)},I.requestAnimFrame=function(){return typeof window>"u"?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),I.getRelativePosition=function(t,e){var n,i,r=t.originalEvent||t,a=t.target||t.srcElement,o=a.getBoundingClientRect(),s=r.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=r.clientX,i=r.clientY);var l=parseFloat(I.getStyle(a,"padding-left")),u=parseFloat(I.getStyle(a,"padding-top")),d=parseFloat(I.getStyle(a,"padding-right")),c=parseFloat(I.getStyle(a,"padding-bottom")),h=o.right-o.left-l-d,f=o.bottom-o.top-u-c;return n=Math.round((n-o.left-l)/h*a.width/e.currentDevicePixelRatio),i=Math.round((i-o.top-u)/f*a.height/e.currentDevicePixelRatio),{x:n,y:i}};function d(t,e,n){var i;return typeof t=="string"?(i=parseInt(t,10),t.indexOf("%")!==-1&&(i=i/100*e.parentNode[n])):i=t,i}function c(t){return t!=null&&t!=="none"}function e(t,e,n){var i=document.defaultView,r=I._getParentNode(t),a=i.getComputedStyle(t)[e],o=i.getComputedStyle(r)[e],s=c(a),l=c(o),u=Number.POSITIVE_INFINITY;return s||l?Math.min(s?d(a,t,n):u,l?d(o,r,n):u):"none"}I.getConstraintWidth=function(t){return e(t,"max-width","clientWidth")},I.getConstraintHeight=function(t){return e(t,"max-height","clientHeight")},I._calculatePadding=function(t,e,n){return e=I.getStyle(t,e),e.indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},I._getParentNode=function(t){var e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e},I.getMaximumWidth=function(t){var e=I._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=I._calculatePadding(e,"padding-left",n),r=I._calculatePadding(e,"padding-right",n),a=n-i-r,o=I.getConstraintWidth(t);return isNaN(o)?a:Math.min(a,o)},I.getMaximumHeight=function(t){var e=I._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=I._calculatePadding(e,"padding-top",n),r=I._calculatePadding(e,"padding-bottom",n),a=n-i-r,o=I.getConstraintHeight(t);return isNaN(o)?a:Math.min(a,o)},I.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},I.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||typeof window<"u"&&window.devicePixelRatio||1;if(n!==1){var i=t.canvas,r=t.height,a=t.width;i.height=r*n,i.width=a*n,t.ctx.scale(n,n),!i.style.height&&!i.style.width&&(i.style.height=r+"px",i.style.width=a+"px")}},I.fontString=function(t,e,n){return e+" "+t+"px "+n},I.longestText=function(t,e,n,i){i=i||{};var r=i.data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},a=i.garbageCollect=[],i.font=e),t.font=e;var o=0,s=n.length,l,u,d,c,h;for(l=0;l<s;l++)if(c=n[l],c!=null&&I.isArray(c)!==!0)o=I.measureText(t,r,a,o,c);else if(I.isArray(c))for(u=0,d=c.length;u<d;u++)h=c[u],h!=null&&!I.isArray(h)&&(o=I.measureText(t,r,a,o,h));var f=a.length/2;if(f>n.length){for(l=0;l<f;l++)delete r[a[l]];a.splice(0,f)}return o},I.measureText=function(t,e,n,i,r){var a=e[r];return a||(a=e[r]=t.measureText(r).width,n.push(r)),a>i&&(i=a),i},I.numberOfLabelLines=function(t){var e=1;return I.each(t,function(t){I.isArray(t)&&t.length>e&&(e=t.length)}),e},I.color=ft?function(t){return t instanceof CanvasGradient&&(t=D.global.defaultColor),ft(t)}:function(t){return console.error("Color.js not found!"),t},I.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:I.color(t).saturate(.5).darken(.1).rgbString()}});function li(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function ui(t){this.options=t||{}}I.extend(ui.prototype,{formats:li,parse:li,format:li,add:li,diff:li,startOf:li,endOf:li,_create:function(t){return t}}),ui.override=function(t){I.extend(ui.prototype,t)};var di,ci={_date:ui},hi={formatters:{values:function(t){return I.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var r=I.log10(Math.abs(i)),a="";if(t!==0){var o=Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]));if(o<1e-4){var s=I.log10(Math.abs(t)),l=Math.floor(s)-Math.floor(r);l=Math.max(Math.min(l,20),0),a=t.toExponential(l)}else{var u=-1*Math.floor(r);u=Math.max(Math.min(u,20),0),a=t.toFixed(u)}}else a="0";return a},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(I.log10(t)));return t===0?"0":i===1||i===2||i===5||e===0||e===n.length-1?t.toExponential():""}}},fi=I.isArray,gi=I.isNullOrUndef,mi=I.valueOrDefault,pi=I.valueAtIndexOrDefault;function vi(t,e){for(var n=[],i=t.length/e,r=0,a=t.length;r<a;r+=i)n.push(t[Math.floor(r)]);return n}function yi(t,e,n){var i=t.getTicks().length,r=Math.min(e,i-1),a=t.getPixelForTick(r),o=t._startPixel,s=t._endPixel,l=1e-6,u;if(!(n&&(i===1?u=Math.max(a-o,s-a):e===0?u=(t.getPixelForTick(1)-a)/2:u=(a-t.getPixelForTick(r-1))/2,a+=r<e?u:-u,a<o-l||a>s+l)))return a}function bi(t,r){I.each(t,function(t){var e=t.gc,n=e.length/2,i;if(n>r){for(i=0;i<n;++i)delete t.data[e[i]];e.splice(0,n)}})}function xi(t,e,n,i){var r=n.length,a=[],o=[],s=[],l=0,u=0,d,c,h,f,g,m,p,v,y,b,x,_,w;for(d=0;d<r;++d){if(f=n[d].label,g=n[d].major?e.major:e.minor,t.font=m=g.string,p=i[m]=i[m]||{data:{},gc:[]},v=g.lineHeight,y=b=0,!gi(f)&&!fi(f))y=I.measureText(t,p.data,p.gc,y,f),b=v;else if(fi(f))for(c=0,h=f.length;c<h;++c)x=f[c],!gi(x)&&!fi(x)&&(y=I.measureText(t,p.data,p.gc,y,x),b+=v);a.push(y),o.push(b),s.push(v/2),l=Math.max(y,l),u=Math.max(b,u)}bi(i,r),_=a.indexOf(l),w=o.indexOf(u);function k(t){return{width:a[t]||0,height:o[t]||0,offset:s[t]||0}}return{first:k(0),last:k(r-1),widest:k(_),highest:k(w)}}function _i(t){return t.drawTicks?t.tickMarkLength:0}function wi(t){var e,n;return t.display?(e=I.options._parseFont(t),n=I.options.toPadding(t.padding),e.lineHeight+n.height):0}function ki(t,e){return I.extend(I.options._parseFont({fontFamily:mi(e.fontFamily,t.fontFamily),fontSize:mi(e.fontSize,t.fontSize),fontStyle:mi(e.fontStyle,t.fontStyle),lineHeight:mi(e.lineHeight,t.lineHeight)}),{color:I.options.resolve([e.fontColor,t.fontColor,D.global.defaultFontColor])})}function Mi(t){var e=ki(t,t.minor),n=t.major.enabled?ki(t,t.major):e;return{minor:e,major:n}}function Si(t){var e=[],n,i,r;for(i=0,r=t.length;i<r;++i)n=t[i],typeof n._index<"u"&&e.push(n);return e}function Di(t){var e=t.length,n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}function Ci(t,e,n,i){var r=Di(t),a=(e.length-1)/i,o,s,l,u;if(!r)return Math.max(a,1);for(o=I.math._factorize(r),l=0,u=o.length-1;l<u;l++)if(s=o[l],s>a)return s;return Math.max(a,1)}function Pi(t){var e=[],n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}function Ti(t,e,n){var i=0,r=e[0],a,o;for(n=Math.ceil(n),a=0;a<t.length;a++)o=t[a],a===r?(o._index=a,i++,r=e[i*n]):delete o.label}function Oi(t,e,n,i){var r=mi(n,0),a=Math.min(mi(i,t.length),t.length),o=0,s,l,u,d;for(e=Math.ceil(e),i&&(s=i-n,e=s/Math.floor(s/e)),d=r;d<0;)o++,d=Math.round(r+o*e);for(l=Math.max(r,0);l<a;l++)u=t[l],l===d?(u._index=l,o++,d=Math.round(r+o*e)):delete u.label}D._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:hi.formatters.values,minor:{},major:{}}});var Ai=t.extend({zeroLineIndex:0,getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){I.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i=this,r=i.options.ticks,a=r.sampleSize,o,s,l,u,d;if(i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=I.extend({left:0,right:0,top:0,bottom:0},n),i._ticks=null,i.ticks=null,i._labelSizes=null,i._maxLabelLines=0,i.longestLabelWidth=0,i.longestTextCache=i.longestTextCache||{},i._gridLineItems=null,i._labelItems=null,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeDataLimits(),i.determineDataLimits(),i.afterDataLimits(),i.beforeBuildTicks(),u=i.buildTicks()||[],u=i.afterBuildTicks(u)||u,(!u||!u.length)&&i.ticks)for(u=[],o=0,s=i.ticks.length;o<s;++o)u.push({value:i.ticks[o],major:!1});return i._ticks=u,d=a<u.length,l=i._convertTicksToLabels(d?vi(u,a):u),i._configure(),i.beforeCalculateTickRotation(),i.calculateTickRotation(),i.afterCalculateTickRotation(),i.beforeFit(),i.fit(),i.afterFit(),i._ticksToDraw=r.display&&(r.autoSkip||r.source==="auto")?i._autoSkip(u):u,d&&(l=i._convertTicksToLabels(i._ticksToDraw)),i.ticks=l,i.afterUpdate(),i.minSize},_configure:function(){var t=this,e=t.options.ticks.reverse,n,i;t.isHorizontal()?(n=t.left,i=t.right):(n=t.top,i=t.bottom,e=!e),t._startPixel=n,t._endPixel=i,t._reversePixels=e,t._length=i-n},afterUpdate:function(){I.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){I.callback(this.options.beforeSetDimensions,[this])},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},afterSetDimensions:function(){I.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){I.callback(this.options.beforeDataLimits,[this])},determineDataLimits:I.noop,afterDataLimits:function(){I.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){I.callback(this.options.beforeBuildTicks,[this])},buildTicks:I.noop,afterBuildTicks:function(t){var e=this;return fi(t)&&t.length?I.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=I.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){I.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){I.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){I.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.options,n=e.ticks,i=t.getTicks().length,r=n.minRotation||0,a=n.maxRotation,o=r,s,l,u,d,c,h,f;if(!t._isVisible()||!n.display||r>=a||i<=1||!t.isHorizontal()){t.labelRotation=r;return}s=t._getLabelSizes(),l=s.widest.width,u=s.highest.height-s.highest.offset,d=Math.min(t.maxWidth,t.chart.width-l),c=e.offset?t.maxWidth/i:d/(i-1),l+6>c&&(c=d/(i-(e.offset?.5:1)),h=t.maxHeight-_i(e.gridLines)-n.padding-wi(e.scaleLabel),f=Math.sqrt(l*l+u*u),o=I.toDegrees(Math.min(Math.asin(Math.min((s.highest.height+6)/c,1)),Math.asin(Math.min(h/f,1))-Math.asin(u/f))),o=Math.max(r,Math.min(a,o))),t.labelRotation=o},afterCalculateTickRotation:function(){I.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){I.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,r=i.ticks,a=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l=i.position==="bottom",u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=_i(o)+wi(a)),u?s&&(e.height=_i(o)+wi(a)):e.height=t.maxHeight,r.display&&s){var d=Mi(r),c=t._getLabelSizes(),h=c.first,f=c.last,g=c.widest,m=c.highest,p=d.minor.lineHeight*.4,v=r.padding;if(u){var y=t.labelRotation!==0,b=I.toRadians(t.labelRotation),x=Math.cos(b),_=Math.sin(b),w=_*g.width+x*(m.height-(y?m.offset:0))+(y?0:p);e.height=Math.min(t.maxHeight,e.height+w+v);var k=t.getPixelForTick(0)-t.left,M=t.right-t.getPixelForTick(t.getTicks().length-1),S,D;y?(S=l?x*h.width+_*h.offset:_*(h.height-h.offset),D=l?_*(f.height-f.offset):x*f.width+_*f.offset):(S=h.width/2,D=f.width/2),t.paddingLeft=Math.max((S-k)*t.width/(t.width-k),0)+3,t.paddingRight=Math.max((D-M)*t.width/(t.width-M),0)+3}else{var C=r.mirror?0:g.width+v+p;e.width=Math.min(t.maxWidth,e.width+C),t.paddingTop=h.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){I.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return t==="top"||t==="bottom"},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(gi(t))return NaN;if((typeof t=="number"||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(t.x!==void 0)return this.getRightValue(t.x)}else if(t.y!==void 0)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e=this,n,i,r;for(e.ticks=t.map(function(t){return t.value}),e.beforeTickToLabelConversion(),n=e.convertTicksToLabels(t)||e.ticks,e.afterTickToLabelConversion(),i=0,r=t.length;i<r;++i)t[i].label=n[i];return n},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=xi(t.ctx,Mi(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,r;return fi(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),r=Math.max(e,n)):(t=+this.getRightValue(t),e=void 0,n=t,i=t,r=t),{min:i,max:r,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return e.start!==void 0?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:I.noop,getPixelForValue:I.noop,getValueForPixel:I.noop,getPixelForTick:function(t){var e=this,n=e.options.offset,i=e._ticks.length,r=1/Math.max(i-(n?0:1),1);return t<0||t>i-1?null:e.getPixelForDecimal(t*r+(n?r/2:0))},getPixelForDecimal:function(t){var e=this;return e._reversePixels&&(t=1-t),e._startPixel+t*e._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e=this,n=e.options.ticks,i=e._length,r=n.maxTicksLimit||i/e._tickSize()+1,a=n.major.enabled?Pi(t):[],o=a.length,s=a[0],l=a[o-1],u,d,c,h;if(o>r)return Ti(t,a,o/r),Si(t);if(c=Ci(a,t,i,r),o>0){for(u=0,d=o-1;u<d;u++)Oi(t,c,a[u],a[u+1]);return h=o>1?(l-s)/(o-1):null,Oi(t,c,I.isNullOrUndef(h)?0:s-h,s),Oi(t,c,l,I.isNullOrUndef(h)?t.length:l+h),Si(t)}return Oi(t,c),Si(t)},_tickSize:function(){var t=this,e=t.options.ticks,n=I.toRadians(t.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),a=t._getLabelSizes(),o=e.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return t.isHorizontal()?l*i>s*r?s/i:l/r:l*r<s*i?l/i:s/r},_isVisible:function(){var t=this,e=t.chart,n=t.options.display,i,r,a;if(n!=="auto")return!!n;for(i=0,r=e.data.datasets.length;i<r;++i)if(e.isDatasetVisible(i)&&(a=e.getDatasetMeta(i),a.xAxisID===t.id||a.yAxisID===t.id))return!0;return!1},_computeGridLineItems:function(t){var e=this,n=e.chart,i=e.options,r=i.gridLines,a=i.position,o=r.offsetGridLines,s=e.isHorizontal(),l=e._ticksToDraw,u=l.length+(o?1:0),d=_i(r),c=[],h=r.drawBorder?pi(r.lineWidth,0,0):0,f=h/2,g=I._alignPixel,m=function(t){return g(n,t,h)},p,v,y,b,x,_,w,k,M,S,D,C,P,T,O,A,F;for(a==="top"?(p=m(e.bottom),w=e.bottom-d,M=p-f,D=m(t.top)+f,P=t.bottom):a==="bottom"?(p=m(e.top),D=t.top,P=m(t.bottom)-f,w=p+f,M=e.top+d):a==="left"?(p=m(e.right),_=e.right-d,k=p-f,S=m(t.left)+f,C=t.right):(p=m(e.left),S=t.left,C=m(t.right)-f,_=p+f,k=e.left+d),v=0;v<u;++v)y=l[v]||{},!(gi(y.label)&&v<l.length)&&(v===e.zeroLineIndex&&i.offset===o?(T=r.zeroLineWidth,O=r.zeroLineColor,A=r.zeroLineBorderDash||[],F=r.zeroLineBorderDashOffset||0):(T=pi(r.lineWidth,v,1),O=pi(r.color,v,"rgba(0,0,0,0.1)"),A=r.borderDash||[],F=r.borderDashOffset||0),b=yi(e,y._index||v,o),b!==void 0&&(x=g(n,b,T),s?_=k=S=C=x:w=M=D=P=x,c.push({tx1:_,ty1:w,tx2:k,ty2:M,x1:S,y1:D,x2:C,y2:P,width:T,color:O,borderDash:A,borderDashOffset:F})));return c.ticksLength=u,c.borderValue=p,c},_computeLabelItems:function(){var t=this,e=t.options,n=e.ticks,i=e.position,r=n.mirror,a=t.isHorizontal(),o=t._ticksToDraw,s=Mi(n),l=n.padding,u=_i(e.gridLines),d=-I.toRadians(t.labelRotation),c=[],h,f,g,m,p,v,y,b,x,_,w,k;for(i==="top"?(v=t.bottom-u-l,y=d?"left":"center"):i==="bottom"?(v=t.top+u+l,y=d?"right":"center"):i==="left"?(p=t.right-(r?0:u)-l,y=r?"left":"right"):(p=t.left+(r?0:u)+l,y=r?"right":"left"),h=0,f=o.length;h<f;++h)g=o[h],m=g.label,!gi(m)&&(b=t.getPixelForTick(g._index||h)+n.labelOffset,x=g.major?s.major:s.minor,_=x.lineHeight,w=fi(m)?m.length:1,a?(p=b,k=i==="top"?((d?1:.5)-w)*_:(d?0:.5)*_):(v=b,k=(1-w)*_/2),c.push({x:p,y:v,rotation:d,label:m,font:x,textOffset:k,textAlign:y}));return c},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(!!n.display){var i=e.ctx,r=e.chart,a=I._alignPixel,o=n.drawBorder?pi(n.lineWidth,0,0):0,s=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t)),l,u,d,c,h;for(d=0,c=s.length;d<c;++d)h=s[d],l=h.width,u=h.color,l&&u&&(i.save(),i.lineWidth=l,i.strokeStyle=u,i.setLineDash&&(i.setLineDash(h.borderDash),i.lineDashOffset=h.borderDashOffset),i.beginPath(),n.drawTicks&&(i.moveTo(h.tx1,h.ty1),i.lineTo(h.tx2,h.ty2)),n.drawOnChartArea&&(i.moveTo(h.x1,h.y1),i.lineTo(h.x2,h.y2)),i.stroke(),i.restore());if(o){var f=o,g=pi(n.lineWidth,s.ticksLength-1,1),m=s.borderValue,p,v,y,b;e.isHorizontal()?(p=a(r,e.left,f)-f/2,v=a(r,e.right,g)+g/2,y=b=m):(y=a(r,e.top,f)-f/2,b=a(r,e.bottom,g)+g/2,p=v=m),i.lineWidth=o,i.strokeStyle=pi(n.color,0),i.beginPath(),i.moveTo(p,y),i.lineTo(v,b),i.stroke()}}},_drawLabels:function(){var t=this,e=t.options.ticks;if(!!e.display){var n=t.ctx,i=t._labelItems||(t._labelItems=t._computeLabelItems()),r,a,o,s,l,u,d,c;for(r=0,o=i.length;r<o;++r){if(l=i[r],u=l.font,n.save(),n.translate(l.x,l.y),n.rotate(l.rotation),n.font=u.string,n.fillStyle=u.color,n.textBaseline="middle",n.textAlign=l.textAlign,d=l.label,c=l.textOffset,fi(d))for(a=0,s=d.length;a<s;++a)n.fillText(""+d[a],0,c),c+=u.lineHeight;else n.fillText(d,0,c);n.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(!!i.display){var r=mi(i.fontColor,D.global.defaultFontColor),a=I.options._parseFont(i),o=I.options.toPadding(i.padding),s=a.lineHeight/2,l=n.position,u=0,d,c;if(t.isHorizontal())d=t.left+t.width/2,c=l==="bottom"?t.bottom-s-o.bottom:t.top+s+o.top;else{var h=l==="left";d=h?t.left+s+o.top:t.right-s-o.top,c=t.top+t.height/2,u=h?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(d,c),e.rotate(u),e.textAlign="center",e.textBaseline="middle",e.fillStyle=r,e.font=a.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){var e=this;!e._isVisible()||(e._drawGrid(t),e._drawTitle(),e._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return!t._isVisible()||n===i||t.draw!==t._draw?[{z:n,draw:function(){t.draw.apply(t,arguments)}}]:[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(e){var n=this,i=n.isHorizontal();return n.chart._getSortedVisibleDatasetMetas().filter(function(t){return(!e||t.type===e)&&(i?t.xAxisID===n.id:t.yAxisID===n.id)})}}),S=(Ai.prototype._draw=Ai.prototype.draw,Ai),Fi=I.isNullOrUndef,Ii={position:"bottom"},Ni=S.extend({determineDataLimits:function(){var t=this,e=t._getLabels(),n=t.options.ticks,i=n.min,r=n.max,a=0,o=e.length-1,s;i!==void 0&&(s=e.indexOf(i),s>=0&&(a=s)),r!==void 0&&(s=e.indexOf(r),s>=0&&(o=s)),t.minIndex=a,t.maxIndex=o,t.min=e[a],t.max=e[o]},buildTicks:function(){var t=this,e=t._getLabels(),n=t.minIndex,i=t.maxIndex;t.ticks=n===0&&i===e.length-1?e:e.slice(n,i+1)},getLabelForIndex:function(t,e){var n=this,i=n.chart;return i.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(i.data.datasets[e].data[t]):n._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;S.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i=this,r,a,o;return!Fi(e)&&!Fi(n)&&(t=i.chart.data.datasets[n].data[e]),Fi(t)||(r=i.isHorizontal()?t.x:t.y),(r!==void 0||t!==void 0&&isNaN(e))&&(a=i._getLabels(),t=I.valueOrDefault(r,t),o=a.indexOf(t),e=o!==-1?o:e,isNaN(e)&&(e=t)),i.getPixelForDecimal((e-i._startValue)/i._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this,n=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(n,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}}),Li,Ri=(Ni._defaults=Ii,I.noop),Yi=I.isNullOrUndef;function Wi(t,e){var n=[],i=1e-14,r=t.stepSize,a=r||1,o=t.maxTicks-1,s=t.min,l=t.max,u=t.precision,d=e.min,c=e.max,h=I.niceNum((c-d)/o/a)*a,f,g,m,p;if(h<i&&Yi(s)&&Yi(l))return[d,c];p=Math.ceil(c/h)-Math.floor(d/h),p>o&&(h=I.niceNum(p*h/o/a)*a),r||Yi(u)?f=Math.pow(10,I._decimalPlaces(h)):(f=Math.pow(10,u),h=Math.ceil(h*f)/f),g=Math.floor(d/h)*h,m=Math.ceil(c/h)*h,r&&(!Yi(s)&&I.almostWhole(s/h,h/1e3)&&(g=s),!Yi(l)&&I.almostWhole(l/h,h/1e3)&&(m=l)),p=(m-g)/h,I.almostEquals(p,Math.round(p),h/1e3)?p=Math.round(p):p=Math.ceil(p),g=Math.round(g*f)/f,m=Math.round(m*f)/f,n.push(Yi(s)?g:s);for(var v=1;v<p;++v)n.push(Math.round((g+v*h)*f)/f);return n.push(Yi(l)?m:l),n}var Ei=S.extend({getRightValue:function(t){return typeof t=="string"?+t:S.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options,n=e.ticks;if(n.beginAtZero){var i=I.sign(t.min),r=I.sign(t.max);i<0&&r<0?t.max=0:i>0&&r>0&&(t.min=0)}var a=n.min!==void 0||n.suggestedMin!==void 0,o=n.max!==void 0||n.suggestedMax!==void 0;n.min!==void 0?t.min=n.min:n.suggestedMin!==void 0&&(t.min===null?t.min=n.suggestedMin:t.min=Math.min(t.min,n.suggestedMin)),n.max!==void 0?t.max=n.max:n.suggestedMax!==void 0&&(t.max===null?t.max=n.suggestedMax:t.max=Math.max(t.max,n.suggestedMax)),a!==o&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,n.beginAtZero||t.min--)},getTickLimit:function(){var t=this,e=t.options.ticks,n=e.stepSize,i=e.maxTicksLimit,r;return n?r=Math.ceil(t.max/n)-Math.floor(t.min/n)+1:(r=t._computeTickLimit(),i=i||11),i&&(r=Math.min(i,r)),r},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Ri,buildTicks:function(){var t=this,e=t.options,n=e.ticks,i=t.getTickLimit();i=Math.max(2,i);var r={maxTicks:i,min:n.min,max:n.max,precision:n.precision,stepSize:I.valueOrDefault(n.fixedStepSize,n.stepSize)},a=t.ticks=Wi(r,t);t.handleDirectionalChanges(),t.max=I.max(a),t.min=I.min(a),n.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),S.prototype.convertTicksToLabels.call(t)},_configure:function(){var t=this,e=t.getTicks(),n=t.min,i=t.max,r;S.prototype._configure.call(t),t.options.offset&&e.length&&(r=(i-n)/Math.max(e.length-1,1)/2,n-=r,i+=r),t._startValue=n,t._endValue=i,t._valueRange=i-n}}),zi={position:"left",ticks:{callback:hi.formatters.linear}},Vi=0,Hi=1;function Bi(t,e,n){var i=[n.type,e===void 0&&n.stack===void 0?n.index:"",n.stack].join(".");return t[i]===void 0&&(t[i]={pos:[],neg:[]}),t[i]}function ji(t,e,n,i){var r=t.options,a=r.stacked,o=Bi(e,a,n),s=o.pos,l=o.neg,u=i.length,d,c;for(d=0;d<u;++d)c=t._parseValue(i[d]),!(isNaN(c.min)||isNaN(c.max)||n.data[d].hidden)&&(s[d]=s[d]||0,l[d]=l[d]||0,r.relativePoints?s[d]=100:c.min<0||c.max<0?l[d]+=c.min:s[d]+=c.max)}function Ui(t,e,n){var i=n.length,r,a;for(r=0;r<i;++r)a=t._parseValue(n[r]),!(isNaN(a.min)||isNaN(a.max)||e.data[r].hidden)&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var Gi=Ei.extend({determineDataLimits:function(){var e=this,t=e.options,n=e.chart,i=n.data.datasets,r=e._getMatchingVisibleMetas(),a=t.stacked,o={},s=r.length,l,u,d,c;if(e.min=Number.POSITIVE_INFINITY,e.max=Number.NEGATIVE_INFINITY,a===void 0)for(l=0;!a&&l<s;++l)u=r[l],a=u.stack!==void 0;for(l=0;l<s;++l)u=r[l],d=i[u.index].data,a?ji(e,o,u,d):Ui(e,u,d);I.each(o,function(t){c=t.pos.concat(t.neg),e.min=Math.min(e.min,I.min(c)),e.max=Math.max(e.max,I.max(c))}),e.min=I.isFinite(e.min)&&!isNaN(e.min)?e.min:Vi,e.max=I.isFinite(e.max)&&!isNaN(e.max)?e.max:Hi,e.handleTickRangeOptions()},_computeTickLimit:function(){var t=this,e;return t.isHorizontal()?Math.ceil(t.width/40):(e=I.options._parseFont(t.options.ticks),Math.ceil(t.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this;return e.getPixelForDecimal((+e.getRightValue(t)-e._startValue)/e._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),qi,Zi=(Gi._defaults=zi,I.valueOrDefault),C=I.math.log10;function $i(t,e){var n=[],i=Zi(t.min,Math.pow(10,Math.floor(C(e.min)))),r=Math.floor(C(e.max)),a=Math.ceil(e.max/Math.pow(10,r)),o,s;i===0?(o=Math.floor(C(e.minNotZero)),s=Math.floor(e.minNotZero/Math.pow(10,o)),n.push(i),i=s*Math.pow(10,o)):(o=Math.floor(C(i)),s=Math.floor(i/Math.pow(10,o)));var l=o<0?Math.pow(10,Math.abs(o)):1;do{n.push(i),++s,s===10&&(s=1,++o,l=o>=0?1:l),i=Math.round(s*Math.pow(10,o)*l)/l}while(o<r||o===r&&s<a);var u=Zi(t.max,i);return n.push(u),n}var Xi={position:"left",ticks:{callback:hi.formatters.logarithmic}};function Ji(t,e){return I.isFinite(t)&&t>=0?t:e}var Ki=S.extend({determineDataLimits:function(){var i=this,t=i.options,e=i.chart,n=e.data.datasets,r=i.isHorizontal();function a(t){return r?t.xAxisID===i.id:t.yAxisID===i.id}var o,s,l,u,d,c;i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,i.minNotZero=Number.POSITIVE_INFINITY;var h=t.stacked;if(h===void 0)for(o=0;o<n.length;o++)if(s=e.getDatasetMeta(o),e.isDatasetVisible(o)&&a(s)&&s.stack!==void 0){h=!0;break}if(t.stacked||h){var f={};for(o=0;o<n.length;o++){s=e.getDatasetMeta(o);var g=[s.type,t.stacked===void 0&&s.stack===void 0?o:"",s.stack].join(".");if(e.isDatasetVisible(o)&&a(s))for(f[g]===void 0&&(f[g]=[]),u=n[o].data,d=0,c=u.length;d<c;d++){var m=f[g];l=i._parseValue(u[d]),!(isNaN(l.min)||isNaN(l.max)||s.data[d].hidden||l.min<0||l.max<0)&&(m[d]=m[d]||0,m[d]+=l.max)}}I.each(f,function(t){if(t.length>0){var e=I.min(t),n=I.max(t);i.min=Math.min(i.min,e),i.max=Math.max(i.max,n)}})}else for(o=0;o<n.length;o++)if(s=e.getDatasetMeta(o),e.isDatasetVisible(o)&&a(s))for(u=n[o].data,d=0,c=u.length;d<c;d++)l=i._parseValue(u[d]),!(isNaN(l.min)||isNaN(l.max)||s.data[d].hidden||l.min<0||l.max<0)&&(i.min=Math.min(l.min,i.min),i.max=Math.max(l.max,i.max),l.min!==0&&(i.minNotZero=Math.min(l.min,i.minNotZero)));i.min=I.isFinite(i.min)?i.min:null,i.max=I.isFinite(i.max)?i.max:null,i.minNotZero=I.isFinite(i.minNotZero)?i.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks,n=1,i=10;t.min=Ji(e.min,t.min),t.max=Ji(e.max,t.max),t.min===t.max&&(t.min!==0&&t.min!==null?(t.min=Math.pow(10,Math.floor(C(t.min))-1),t.max=Math.pow(10,Math.floor(C(t.max))+1)):(t.min=n,t.max=i)),t.min===null&&(t.min=Math.pow(10,Math.floor(C(t.max))-1)),t.max===null&&(t.max=t.min!==0?Math.pow(10,Math.floor(C(t.min))+1):i),t.minNotZero===null&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(C(t.max))):t.minNotZero=n)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Ji(e.min),max:Ji(e.max)},r=t.ticks=$i(i,t);t.max=I.max(r),t.min=I.min(r),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&r.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),S.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(C(t)),n=Math.floor(t/Math.pow(10,e));return n*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;S.prototype._configure.call(t),e===0&&(e=t._getFirstTickValue(t.minNotZero),n=Zi(t.options.ticks.fontSize,D.global.defaultFontSize)/t._length),t._startValue=C(e),t._valueOffset=n,t._valueRange=(C(t.max)-C(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return t=+e.getRightValue(t),t>e.min&&t>0&&(n=(C(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return n===0&&e.min===0?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Qi,tr=(Ki._defaults=Xi,I.valueOrDefault),er=I.valueAtIndexOrDefault,nr=I.options.resolve,ir={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:hi.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function rr(t){var e=t.ticks;return e.display&&t.display?tr(e.fontSize,D.global.defaultFontSize)+e.backdropPaddingY*2:0}function ar(t,e,n){return I.isArray(n)?{w:I.longestText(t,t.font,n),h:n.length*e}:{w:t.measureText(n).width,h:e}}function or(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function sr(t){var e=I.options._parseFont(t.options.pointLabels),n={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},r,a,o;t.ctx.font=e.string,t._pointLabelSizes=[];var s=t.chart.data.labels.length;for(r=0;r<s;r++){o=t.getPointPosition(r,t.drawingArea+5),a=ar(t.ctx,e.lineHeight,t.pointLabels[r]),t._pointLabelSizes[r]=a;var l=t.getIndexAngle(r),u=I.toDegrees(l)%360,d=or(u,o.x,a.w,0,180),c=or(u,o.y,a.h,90,270);d.start<n.l&&(n.l=d.start,i.l=l),d.end>n.r&&(n.r=d.end,i.r=l),c.start<n.t&&(n.t=c.start,i.t=l),c.end>n.b&&(n.b=c.end,i.b=l)}t.setReductions(t.drawingArea,n,i)}function lr(t){return t===0||t===180?"center":t<180?"left":"right"}function ur(t,e,n,i){var r=n.y+i/2,a,o;if(I.isArray(e))for(a=0,o=e.length;a<o;++a)t.fillText(e[a],n.x,r),r+=i;else t.fillText(e,n.x,r)}function dr(t,e,n){t===90||t===270?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function cr(t){var e=t.ctx,n=t.options,i=n.pointLabels,r=rr(n),a=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=I.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=s===0?r/2:0,u=t.getPointPosition(s,a+l+5),d=er(i.fontColor,s,D.global.defaultFontColor);e.fillStyle=d;var c=t.getIndexAngle(s),h=I.toDegrees(c);e.textAlign=lr(h),dr(h,t._pointLabelSizes[s],u),ur(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}function hr(t,e,n,i){var r=t.ctx,a=e.circular,o=t.chart.data.labels.length,s=er(e.color,i-1),l=er(e.lineWidth,i-1),u;if(!(!a&&!o||!s||!l)){if(r.save(),r.strokeStyle=s,r.lineWidth=l,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),a)r.arc(t.xCenter,t.yCenter,n,0,Math.PI*2);else{u=t.getPointPosition(0,n),r.moveTo(u.x,u.y);for(var d=1;d<o;d++)u=t.getPointPosition(d,n),r.lineTo(u.x,u.y)}r.closePath(),r.stroke(),r.restore()}}function fr(t){return I.isNumber(t)?t:0}var gr=Ei.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=rr(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 r=this,n=r.chart,a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;I.each(n.data.datasets,function(t,e){if(n.isDatasetVisible(e)){var i=n.getDatasetMeta(e);I.each(t.data,function(t,e){var n=+r.getRightValue(t);isNaN(n)||i.data[e].hidden||(a=Math.min(n,a),o=Math.max(n,o))})}}),r.min=a===Number.POSITIVE_INFINITY?0:a,r.max=o===Number.NEGATIVE_INFINITY?0:o,r.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/rr(this.options))},convertTicksToLabels:function(){var e=this;Ei.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(function(){var t=I.callback(e.options.pointLabels.callback,arguments,e);return t||t===0?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?sr(t):t.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,r=e.l/Math.sin(n.l),a=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);r=fr(r),a=fr(a),o=fr(o),s=fr(s),i.drawingArea=Math.min(Math.floor(t-(r+a)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(r,a,o,s)},setCenterPoint:function(t,e,n,i){var r=this,a=r.width-e-r.drawingArea,o=t+r.drawingArea,s=n+r.drawingArea,l=r.height-r.paddingTop-i-r.drawingArea;r.xCenter=Math.floor((o+a)/2+r.left),r.yCenter=Math.floor((s+l)/2+r.top+r.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=360/e.data.labels.length,i=e.options||{},r=i.startAngle||0,a=(t*n+r)%360;return(a<0?a+360:a)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(I.isNullOrUndef(t))return NaN;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(t){var e=this,n=e.min,i=e.max;return e.getPointPositionForValue(t||0,e.beginAtZero?0:n<0&&i<0?i:n>0&&i>0?n:0)},_drawGrid:function(){var n=this,t=n.ctx,e=n.options,i=e.gridLines,r=e.angleLines,a=tr(r.lineWidth,i.lineWidth),o=tr(r.color,i.color),s,l,u;if(e.pointLabels.display&&cr(n),i.display&&I.each(n.ticks,function(t,e){e!==0&&(l=n.getDistanceFromCenterForValue(n.ticksAsNumbers[e]),hr(n,i,l,e))}),r.display&&a&&o){for(t.save(),t.lineWidth=a,t.strokeStyle=o,t.setLineDash&&(t.setLineDash(nr([r.borderDash,i.borderDash,[]])),t.lineDashOffset=nr([r.borderDashOffset,i.borderDashOffset,0])),s=n.chart.data.labels.length-1;s>=0;s--)l=n.getDistanceFromCenterForValue(e.ticks.reverse?n.min:n.max),u=n.getPointPosition(s,l),t.beginPath(),t.moveTo(n.xCenter,n.yCenter),t.lineTo(u.x,u.y),t.stroke();t.restore()}},_drawLabels:function(){var n=this,i=n.ctx,t=n.options,r=t.ticks;if(!!r.display){var e=n.getIndexAngle(0),a=I.options._parseFont(r),o=tr(r.fontColor,D.global.defaultFontColor),s,l;i.save(),i.font=a.string,i.translate(n.xCenter,n.yCenter),i.rotate(e),i.textAlign="center",i.textBaseline="middle",I.each(n.ticks,function(t,e){e===0&&!r.reverse||(s=n.getDistanceFromCenterForValue(n.ticksAsNumbers[e]),r.showLabelBackdrop&&(l=i.measureText(t).width,i.fillStyle=r.backdropColor,i.fillRect(-l/2-r.backdropPaddingX,-s-a.size/2-r.backdropPaddingY,l+r.backdropPaddingX*2,a.size+r.backdropPaddingY*2)),i.fillStyle=o,i.fillText(t,0,-s))}),i.restore()}},_drawTitle:I.noop}),mr,pr=(gr._defaults=ir,I._deprecated),vr=I.options.resolve,yr=I.valueOrDefault,br=Number.MIN_SAFE_INTEGER||-9007199254740991,xr=Number.MAX_SAFE_INTEGER||9007199254740991,_r={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},P=Object.keys(_r);function wr(t,e){return t-e}function kr(t){var e={},n=[],i,r,a;for(i=0,r=t.length;i<r;++i)a=t[i],e[a]||(e[a]=!0,n.push(a));return n}function Mr(t){return I.valueOrDefault(t.time.min,t.ticks.min)}function Sr(t){return I.valueOrDefault(t.time.max,t.ticks.max)}function Dr(t,e,n,i){if(i==="linear"||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var r=[],a=[e],o,s,l,u,d;for(o=0,s=t.length;o<s;++o)u=t[o],u>e&&u<n&&a.push(u);for(a.push(n),o=0,s=a.length;o<s;++o)d=a[o+1],l=a[o-1],u=a[o],(l===void 0||d===void 0||Math.round((d+l)/2)!==u)&&r.push({time:u,pos:o/(s-1)});return r}function Cr(t,e,n){for(var i=0,r=t.length-1,a,o,s;i>=0&&i<=r;)if(a=i+r>>1,o=t[a-1]||null,s=t[a],o)if(s[e]<n)i=a+1;else if(o[e]>n)r=a-1;else return{lo:o,hi:s};else return{lo:null,hi:s};return{lo:s,hi:null}}function Pr(t,e,n,i){var r=Cr(t,e,n),a=r.lo?r.hi?r.lo:t[t.length-2]:t[0],o=r.lo?r.hi?r.hi:t[t.length-1]:t[1],s=o[e]-a[e],l=s?(n-a[e])/s:0,u=(o[i]-a[i])*l;return a[i]+u}function Tr(t,e){var n=t._adapter,i=t.options.time,r=i.parser,a=r||i.format,o=e;return typeof r=="function"&&(o=r(o)),I.isFinite(o)||(o=typeof a=="string"?n.parse(o,a):n.parse(o)),o!==null?+o:(!r&&typeof a=="function"&&(o=a(e),I.isFinite(o)||(o=n.parse(o))),o)}function Or(t,e){if(I.isNullOrUndef(e))return null;var n=t.options.time,i=Tr(t,t.getRightValue(e));return i===null||n.round&&(i=+t._adapter.startOf(i,n.round)),i}function Ar(t,e,n,i){var r=P.length,a,o,s;for(a=P.indexOf(t);a<r-1;++a)if(o=_r[P[a]],s=o.steps?o.steps:xr,o.common&&Math.ceil((n-e)/(s*o.size))<=i)return P[a];return P[r-1]}function Fr(t,e,n,i,r){var a,o;for(a=P.length-1;a>=P.indexOf(n);a--)if(o=P[a],_r[o].common&&t._adapter.diff(r,i,o)>=e-1)return o;return P[n?P.indexOf(n):0]}function Ir(t){for(var e=P.indexOf(t)+1,n=P.length;e<n;++e)if(_r[P[e]].common)return P[e]}function Nr(t,e,n,i){var r=t._adapter,a=t.options,o=a.time,s=o.unit||Ar(o.minUnit,e,n,i),l=vr([o.stepSize,o.unitStepSize,1]),u=s==="week"?o.isoWeekday:!1,d=e,c=[],h;if(u&&(d=+r.startOf(d,"isoWeek",u)),d=+r.startOf(d,u?"day":s),r.diff(n,e,s)>1e5*l)throw e+" and "+n+" are too far apart with stepSize of "+l+" "+s;for(h=d;h<n;h=+r.add(h,l,s))c.push(h);return(h===n||a.bounds==="ticks")&&c.push(h),c}function Lr(t,e,n,i,r){var a=0,o=0,s,l;return r.offset&&e.length&&(s=Pr(t,"time",e[0],"pos"),e.length===1?a=1-s:a=(Pr(t,"time",e[1],"pos")-s)/2,l=Pr(t,"time",e[e.length-1],"pos"),e.length===1?o=l:o=(l-Pr(t,"time",e[e.length-2],"pos"))/2),{start:a,end:o,factor:1/(a+1+o)}}function Rr(t,e,n,i){var r=t._adapter,a=+r.startOf(e[0].value,i),o=e[e.length-1].value,s,l;for(s=a;s<=o;s=+r.add(s,1,i))l=n[s],l>=0&&(e[l].major=!0);return e}function Yr(t,e,n){var i=[],r={},a=e.length,o,s;for(o=0;o<a;++o)s=e[o],r[s]=o,i.push({value:s,major:!1});return a===0||!n?i:Rr(t,i,r,n)}var Wr={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}},Er=S.extend({initialize:function(){this.mergeTicksOptions(),S.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new ci._date(e.adapters.date);return pr("time scale",n.format,"time.format","time.parser"),pr("time scale",n.min,"time.min","ticks.min"),pr("time scale",n.max,"time.max","ticks.max"),I.mergeIf(n.displayFormats,i.formats()),S.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&t.t!==void 0&&(t=t.t),S.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t=this,e=t.chart,n=t._adapter,i=t.options,r=i.time.unit||"day",a=xr,o=br,s=[],l=[],u=[],d,c,h,f,g,m,p,v=t._getLabels();for(d=0,h=v.length;d<h;++d)u.push(Or(t,v[d]));for(d=0,h=(e.data.datasets||[]).length;d<h;++d)if(e.isDatasetVisible(d))if(g=e.data.datasets[d].data,I.isObject(g[0]))for(l[d]=[],c=0,f=g.length;c<f;++c)m=Or(t,g[c]),s.push(m),l[d][c]=m;else l[d]=u.slice(0),p||(s=s.concat(u),p=!0);else l[d]=[];u.length&&(a=Math.min(a,u[0]),o=Math.max(o,u[u.length-1])),s.length&&(s=h>1?kr(s).sort(wr):s.sort(wr),a=Math.min(a,s[0]),o=Math.max(o,s[s.length-1])),a=Or(t,Mr(i))||a,o=Or(t,Sr(i))||o,a=a===xr?+n.startOf(Date.now(),r):a,o=o===br?+n.endOf(Date.now(),r)+1:o,t.min=Math.min(a,o),t.max=Math.max(a+1,o),t._table=[],t._timestamps={data:s,datasets:l,labels:u}},buildTicks:function(){var t=this,e=t.min,n=t.max,i=t.options,r=i.ticks,a=i.time,o=t._timestamps,s=[],l=t.getLabelCapacity(e),u=r.source,d=i.distribution,c,h,f;for(u==="data"||u==="auto"&&d==="series"?o=o.data:u==="labels"?o=o.labels:o=Nr(t,e,n,l),i.bounds==="ticks"&&o.length&&(e=o[0],n=o[o.length-1]),e=Or(t,Mr(i))||e,n=Or(t,Sr(i))||n,c=0,h=o.length;c<h;++c)f=o[c],f>=e&&f<=n&&s.push(f);return t.min=e,t.max=n,t._unit=a.unit||(r.autoSkip?Ar(a.minUnit,t.min,t.max,l):Fr(t,s.length,a.minUnit,t.min,t.max)),t._majorUnit=!r.major.enabled||t._unit==="year"?void 0:Ir(t._unit),t._table=Dr(t._timestamps.data,e,n,d),t._offsets=Lr(t._table,s,e,n,i),r.reverse&&s.reverse(),Yr(t,s,t._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,r=n.chart.data,a=n.options.time,o=r.labels&&t<r.labels.length?r.labels[t]:"",s=r.datasets[e].data[t];return I.isObject(s)&&(o=n.getRightValue(s)),a.tooltipFormat?i.format(Tr(n,o),a.tooltipFormat):typeof o=="string"?o:i.format(Tr(n,o),a.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var r=this,a=r._adapter,o=r.options,s=o.time.displayFormats,l=s[r._unit],u=r._majorUnit,d=s[u],c=n[e],h=o.ticks,f=u&&d&&c&&c.major,g=a.format(t,i||(f?d:l)),m=f?h.major:h.minor,p=vr([m.callback,m.userCallback,h.callback,h.userCallback]);return p?p(g,e,n):g},convertTicksToLabels:function(t){var e=[],n,i;for(n=0,i=t.length;n<i;++n)e.push(this.tickFormatFunction(t[n].value,n,t));return e},getPixelForOffset:function(t){var e=this,n=e._offsets,i=Pr(e._table,"time",t,"pos");return e.getPixelForDecimal((n.start+i)*n.factor)},getPixelForValue:function(t,e,n){var i=this,r=null;if(e!==void 0&&n!==void 0&&(r=i._timestamps.datasets[n][e]),r===null&&(r=Or(i,t)),r!==null)return i.getPixelForOffset(r)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,n=e._offsets,i=e.getDecimalForPixel(t)/n.factor-n.end,r=Pr(e._table,"pos",i,"time");return e._adapter._create(r)},_getLabelSize:function(t){var e=this,n=e.options.ticks,i=e.ctx.measureText(t).width,r=I.toRadians(e.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(r),o=Math.sin(r),s=yr(n.fontSize,D.global.defaultFontSize);return{w:i*a+s*o,h:i*o+s*a}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,a=e.tickFormatFunction(t,0,Yr(e,[t],e._majorUnit),r),o=e._getLabelSize(a),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}}),zr,Vr=(Er._defaults=Wr,{category:Ni,linear:Gi,logarithmic:Ki,radialLinear:gr,time:Er}),Hr={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"},Br=(ci._date.override(typeof i=="function"?{_id:"moment",formats:function(){return Hr},parse:function(t,e){return typeof t=="string"&&typeof e=="string"?t=i(t,e):t instanceof i||(t=i(t)),t.isValid()?t.valueOf():null},format:function(t,e){return i(t).format(e)},add:function(t,e,n){return i(t).add(e,n).valueOf()},diff:function(t,e,n){return i(t).diff(i(e),n)},startOf:function(t,e,n){return t=i(t),e==="isoWeek"?t.isoWeekday(n).valueOf():t.startOf(e).valueOf()},endOf:function(t,e){return i(t).endOf(e).valueOf()},_create:function(t){return i(t)}}:{}),D._set("global",{plugins:{filler:{propagate:!0}}}),{dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),r=i&&n.isDatasetVisible(e),a=r&&i.dataset._children||[],o=a.length||0;return o?function(t,e){return e<o&&a[e]._view||null}:null},boundary:function(t){var n=t.boundary,e=n?n.x:null,i=n?n.y:null;return I.isArray(n)?function(t,e){return n[e]}:function(t){return{x:e===null?t.x:e,y:i===null?t.y:i}}}});function jr(t,e,n){var i=t._model||{},r=i.fill,a;if(r===void 0&&(r=!!i.backgroundColor),r===!1||r===null)return!1;if(r===!0)return"origin";if(a=parseFloat(r,10),isFinite(a)&&Math.floor(a)===a)return(r[0]==="-"||r[0]==="+")&&(a=e+a),a===e||a<0||a>=n?!1:a;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 Ur(t){var e=t.el._model||{},n=t.el._scale||{},i=t.fill,r=null,a;if(isFinite(i))return null;if(i==="start"?r=e.scaleBottom===void 0?n.bottom:e.scaleBottom:i==="end"?r=e.scaleTop===void 0?n.top:e.scaleTop:e.scaleZero!==void 0?r=e.scaleZero:n.getBasePixel&&(r=n.getBasePixel()),r!=null){if(r.x!==void 0&&r.y!==void 0)return r;if(I.isFinite(r))return a=n.isHorizontal(),{x:a?r:null,y:a?null:r}}return null}function Gr(t){var e=t.el._scale,n=e.options,i=e.chart.data.labels.length,r=t.fill,a=[],o,s,l,u,d;if(!i)return null;for(o=n.ticks.reverse?e.max:e.min,s=n.ticks.reverse?e.min:e.max,l=e.getPointPositionForValue(0,o),u=0;u<i;++u)d=r==="start"||r==="end"?e.getPointPositionForValue(u,r==="start"?o:s):e.getBasePosition(u),n.gridLines.circular&&(d.cx=l.x,d.cy=l.y,d.angle=e.getIndexAngle(u)-Math.PI/2),a.push(d);return a}function qr(t){var e=t.el._scale||{};return e.getPointPositionForValue?Gr(t):Ur(t)}function Zr(t,e,n){var i=t[e],r=i.fill,a=[e],o;if(!n)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!isFinite(r))return r;if(o=t[r],!o)return!1;if(o.visible)return r;a.push(r),r=o.fill}return!1}function $r(t){var e=t.fill,n="dataset";return e===!1?null:(isFinite(e)||(n="boundary"),Br[n](t))}function Xr(t){return t&&!t.skip}function Jr(t,e,n,i,r){var a,o,s,l;if(!(!i||!r)){for(t.moveTo(e[0].x,e[0].y),a=1;a<i;++a)I.canvas.lineTo(t,e[a-1],e[a]);if(n[0].angle!==void 0){for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),a=r-1;a>0;--a)t.arc(o,s,l,n[a].angle,n[a-1].angle,!0);return}for(t.lineTo(n[r-1].x,n[r-1].y),a=r-1;a>0;--a)I.canvas.lineTo(t,n[a],n[a-1],!0)}}function Kr(t,e,n,i,r,a){var o=e.length,s=i.spanGaps,l=[],u=[],d=0,c=0,h,f,g,m,p,v,y,b;for(t.beginPath(),h=0,f=o;h<f;++h)g=h%o,m=e[g]._view,p=n(m,g,i),v=Xr(m),y=Xr(p),a&&b===void 0&&v&&(b=h+1,f=o+b),v&&y?(d=l.push(m),c=u.push(p)):d&&c&&(s?(v&&l.push(m),y&&u.push(p)):(Jr(t,l,u,d,c),d=c=0,l=[],u=[]));Jr(t,l,u,d,c),t.closePath(),t.fillStyle=r,t.fill()}var Qr={id:"filler",afterDatasetsUpdate:function(t,e){var n=(t.data.datasets||[]).length,i=e.propagate,r=[],a,o,s,l;for(o=0;o<n;++o)a=t.getDatasetMeta(o),s=a.dataset,l=null,s&&s._model&&s instanceof v.Line&&(l={visible:t.isDatasetVisible(o),fill:jr(s,o,n),chart:t,el:s}),a.$filler=l,r.push(l);for(o=0;o<n;++o)l=r[o],l&&(l.fill=Zr(r,o,i),l.boundary=qr(l),l.mapper=$r(l))},beforeDatasetsDraw:function(t){var e=t._getSortedVisibleDatasetMetas(),n=t.ctx,i,r,a,o,s,l,u;for(r=e.length-1;r>=0;--r)i=e[r].$filler,!(!i||!i.visible)&&(a=i.el,o=a._view,s=a._children||[],l=i.mapper,u=o.backgroundColor||D.global.defaultColor,l&&u&&s.length&&(I.canvas.clipArea(n,t.chartArea),Kr(n,s,l,o,u,a._loop),I.canvas.unclipArea(n)))}},ta=I.rtl.getRtlAdapter,e=I.noop,T=I.valueOrDefault;function ea(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}D._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,r=i.getDatasetMeta(n);r.hidden=r.hidden===null?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(n){var i=n.data.datasets,t=n.options.legend||{},r=t.labels&&t.labels.usePointStyle;return n._getSortedDatasetMetas().map(function(t){var e=t.controller.getStyle(r?0:void 0);return{text:i[t.index].label,fillStyle:e.backgroundColor,hidden:!n.isDatasetVisible(t.index),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,rotation:e.rotation,datasetIndex:t.index}},this)}}},legendCallback:function(t){var e=document.createElement("ul"),n=t.data.datasets,i,r,a,o;for(e.setAttribute("class",t.id+"-legend"),i=0,r=n.length;i<r;i++)a=e.appendChild(document.createElement("li")),o=a.appendChild(document.createElement("span")),o.style.backgroundColor=n[i].backgroundColor,n[i].label&&a.appendChild(document.createTextNode(n[i].label));return e.outerHTML}});var na=t.extend({initialize:function(t){var e=this;I.extend(e,t),e.legendHitBoxes=[],e._hoveredItem=null,e.doughnutMode=!1},beforeUpdate:e,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:e,beforeSetDimensions:e,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:e,beforeBuildLabels:e,buildLabels:function(){var e=this,n=e.options.labels||{},t=I.callback(n.generateLabels,[e.chart],e)||[];n.filter&&(t=t.filter(function(t){return n.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:e,beforeFit:e,fit:function(){var t=this,e=t.options,r=e.labels,n=e.display,a=t.ctx,i=I.options._parseFont(r),o=i.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=n?10:0):(l.width=n?10:0,l.height=t.maxHeight),!n){t.width=l.width=t.height=l.height=0;return}if(a.font=i.string,u){var d=t.lineWidths=[0],c=0;a.textAlign="left",a.textBaseline="middle",I.each(t.legendItems,function(t,e){var n=ea(r,o),i=n+o/2+a.measureText(t.text).width;(e===0||d[d.length-1]+i+2*r.padding>l.width)&&(c+=o+r.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+r.padding}),l.height+=c}else{var h=r.padding,f=t.columnWidths=[],g=t.columnHeights=[],m=r.padding,p=0,v=0;I.each(t.legendItems,function(t,e){var n=ea(r,o),i=n+o/2+a.measureText(t.text).width;e>0&&v+o+2*h>l.height&&(m+=p+r.padding,f.push(p),g.push(v),p=0,v=0),p=Math.max(p,i),v+=o+h,s[e]={left:0,top:0,width:i,height:o}}),m+=p,f.push(p),g.push(v),l.width+=m}t.width=l.width,t.height=l.height},afterFit:e,isHorizontal:function(){return this.options.position==="top"||this.options.position==="bottom"},draw:function(){var s=this,n=s.options,l=n.labels,t=D.global,u=t.defaultColor,d=t.elements.line,c=s.height,h=s.columnHeights,f=s.width,g=s.lineWidths;if(!!n.display){var m=ta(n.rtl,s.left,s.minSize.width),p=s.ctx,e=T(l.fontColor,t.defaultFontColor),i=I.options._parseFont(l),v=i.size,y;p.textAlign=m.textAlign("left"),p.textBaseline="middle",p.lineWidth=.5,p.strokeStyle=e,p.fillStyle=e,p.font=i.string;var b=ea(l,v),x=s.legendHitBoxes,_=function(t,e,n){if(!(isNaN(b)||b<=0)){p.save();var i=T(n.lineWidth,d.borderWidth);if(p.fillStyle=T(n.fillStyle,u),p.lineCap=T(n.lineCap,d.borderCapStyle),p.lineDashOffset=T(n.lineDashOffset,d.borderDashOffset),p.lineJoin=T(n.lineJoin,d.borderJoinStyle),p.lineWidth=i,p.strokeStyle=T(n.strokeStyle,u),p.setLineDash&&p.setLineDash(T(n.lineDash,d.borderDash)),l&&l.usePointStyle){var r=b*Math.SQRT2/2,a=m.xPlus(t,b/2),o=e+v/2;I.canvas.drawPoint(p,n.pointStyle,r,a,o,n.rotation)}else p.fillRect(m.leftForLtr(t,b),e,b,v),i!==0&&p.strokeRect(m.leftForLtr(t,b),e,b,v);p.restore()}},w=function(t,e,n,i){var r=v/2,a=m.xPlus(t,b+r),o=e+r;p.fillText(n.text,a,o),n.hidden&&(p.beginPath(),p.lineWidth=2,p.moveTo(a,o),p.lineTo(m.xPlus(a,i),o),p.stroke())},k=function(t,e){switch(n.align){case"start":return l.padding;case"end":return t-e;default:return(t-e+l.padding)/2}},M=s.isHorizontal();M?y={x:s.left+k(f,g[0]),y:s.top+l.padding,line:0}:y={x:s.left+l.padding,y:s.top+k(c,h[0]),line:0},I.rtl.overrideTextDirection(s.ctx,n.textDirection);var S=v+l.padding;I.each(s.legendItems,function(t,e){var n=p.measureText(t.text).width,i=b+v/2+n,r=y.x,a=y.y;m.setWidth(s.minSize.width),M?e>0&&r+i+l.padding>s.left+s.minSize.width&&(a=y.y+=S,y.line++,r=y.x=s.left+k(f,g[y.line])):e>0&&a+S>s.top+s.minSize.height&&(r=y.x=r+s.columnWidths[y.line]+l.padding,y.line++,a=y.y=s.top+k(c,h[y.line]));var o=m.x(r);_(o,a,t),x[e].left=m.leftForLtr(o,x[e].width),x[e].top=a,w(o,a,t,n),M?y.x+=i+l.padding:y.y+=S}),I.rtl.restoreTextDirection(s.ctx,n.textDirection)}},_getLegendItemAt:function(t,e){var n=this,i,r,a;if(t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom)for(a=n.legendHitBoxes,i=0;i<a.length;++i)if(r=a[i],t>=r.left&&t<=r.left+r.width&&e>=r.top&&e<=r.top+r.height)return n.legendItems[i];return null},handleEvent:function(t){var e=this,n=e.options,i=t.type==="mouseup"?"click":t.type,r;if(i==="mousemove"){if(!n.onHover&&!n.onLeave)return}else if(i==="click"){if(!n.onClick)return}else return;r=e._getLegendItemAt(t.x,t.y),i==="click"?r&&n.onClick&&n.onClick.call(e,t.native,r):(n.onLeave&&r!==e._hoveredItem&&(e._hoveredItem&&n.onLeave.call(e,t.native,e._hoveredItem),e._hoveredItem=r),n.onHover&&r&&n.onHover.call(e,t.native,r))}});function ia(t,e){var n=new na({ctx:t.ctx,options:e,chart:t});a.configure(t,n,e),a.addBox(t,n),t.legend=n}var ra={id:"legend",_element:na,beforeInit:function(t){var e=t.options.legend;e&&ia(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(I.mergeIf(e,D.global.legend),n?(a.configure(t,n,e),n.options=e):ia(t,e)):n&&(a.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},O=I.noop,aa=(D._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}}),t.extend({initialize:function(t){var e=this;I.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:O,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:O,beforeSetDimensions:O,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:O,beforeBuildLabels:O,buildLabels:O,afterBuildLabels:O,beforeFit:O,fit:function(){var t=this,e=t.options,n=t.minSize={},i=t.isHorizontal(),r,a;if(!e.display){t.width=n.width=t.height=n.height=0;return}r=I.isArray(e.text)?e.text.length:1,a=r*I.options._parseFont(e).lineHeight+e.padding*2,t.width=n.width=i?t.maxWidth:a,t.height=n.height=i?a:t.maxHeight},afterFit:O,isHorizontal:function(){var t=this.options.position;return t==="top"||t==="bottom"},draw:function(){var t=this,e=t.ctx,n=t.options;if(!!n.display){var i=I.options._parseFont(n),r=i.lineHeight,a=r/2+n.padding,o=0,s=t.top,l=t.left,u=t.bottom,d=t.right,c,h,f;e.fillStyle=I.valueOrDefault(n.fontColor,D.global.defaultFontColor),e.font=i.string,t.isHorizontal()?(h=l+(d-l)/2,f=s+a,c=d-l):(h=n.position==="left"?l+a:d-a,f=s+(u-s)/2,c=u-s,o=Math.PI*(n.position==="left"?-.5:.5)),e.save(),e.translate(h,f),e.rotate(o),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(I.isArray(g))for(var m=0,p=0;p<g.length;++p)e.fillText(g[p],0,m,c),m+=r;else e.fillText(g,0,0,c);e.restore()}}}));function oa(t,e){var n=new aa({ctx:t.ctx,options:e,chart:t});a.configure(t,n,e),a.addBox(t,n),t.titleBlock=n}var sa,A={},la,ua=ra,da={id:"title",_element:aa,beforeInit:function(t){var e=t.options.title;e&&oa(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(I.mergeIf(e,D.global.title),n?(a.configure(t,n,e),n.options=e):oa(t,e)):n&&(a.removeBox(t,n),delete t.titleBlock)}},ca;for(ca in A.filler=Qr,A.legend=ua,A.title=da,M.helpers=I,si(),M._adapters=ci,M.Animation=Bt,M.animationService=jt,M.controllers=je,M.DatasetController=m,M.defaults=D,M.Element=t,M.elements=v,M.Interaction=Xe,M.layouts=a,M.platform=Wn,M.plugins=_,M.Scale=S,M.scaleService=En,M.Ticks=hi,M.Tooltip=Jn,M.helpers.each(Vr,function(t,e){M.scaleService.registerScaleType(e,t,t._defaults)}),A)A.hasOwnProperty(ca)&&M.plugins.register(A[ca]);M.platform.initialize();var ha=M;return typeof window<"u"&&(window.Chart=M),(M.Chart=M).Legend=A.legend._element,M.Title=A.title._element,M.pluginService=M.plugins,M.PluginBase=M.Element.extend({}),M.canvasHelpers=M.helpers.canvas,M.layoutService=M.layouts,M.LinearScaleBase=Ei,M.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(n){M[n]=function(t,e){return new M(t,M.helpers.merge(e||{},{type:n.charAt(0).toLowerCase()+n.slice(1)}))}}),ha}(function(){try{return n}catch{}}())});e(function(t,e){function i(t,e){e?window.setTimeout(t,e):l.requestAnimFrame.call(window,t)}function r(t,e){var n=parseInt(t,10);return isNaN(n)?0:"string"==typeof t&&-1!==t.indexOf("%")?n/100*e:n}function a(t){var e,n=t[d].options,t=t.chart.canvas;if(t&&null!==t.offsetParent)return t=t.getBoundingClientRect(),e=r(n.yOffset||0,t.height),n=r(n.xOffset||0,t.width),0<=t.right-n&&0<=t.bottom-e&&t.left+n<=window.innerWidth&&t.top+e<=window.innerHeight}function o(t){var r=t.target[u];r.ticking||(r.ticking=!0,i(function(){for(var t,e=r.charts.slice(),n=e.length,i=0;i<n;++i)a(t=e[i])&&(s(t),t[d].appeared=!0,t.update());r.ticking=!1}))}function s(n){n[d].elements.forEach(function(t){var e=t[u].charts;e.splice(e.indexOf(n),1),e.length||(l.removeEvent(t,"scroll",o),delete t[u])}),n[d].elements=[]}var n,l,u,d;l=(n=(n=c)&&n.hasOwnProperty("default")?n.default:n).helpers,u="$chartjs_deferred",d="$deferred",n.defaults.global.plugins.deferred={xOffset:0,yOffset:0,delay:0},n.plugins.register({id:"deferred",beforeInit:function(t,e){t[d]={options:e,appeared:!1,delayed:!1,loaded:!1,elements:[]};for(var n,i=t,r=i.chart.canvas.parentElement;r;)!function(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeType===Node.DOCUMENT_NODE;var e=l.getStyle(t,"overflow-x"),t=l.getStyle(t,"overflow-y");return"auto"===e||"scroll"===e||"auto"===t||"scroll"===t}(r)||(0===(n=(n=r[u]||(r[u]={})).charts||(n.charts=[])).length&&l.addEvent(r,"scroll",o),n.push(i),i[d].elements.push(r)),r=r.parentElement||r.ownerDocument},beforeDatasetsUpdate:function(t,e){var n=t[d];if(!n.loaded){if(!n.appeared&&!a(t))return!1;if(n.appeared=!0,n.loaded=!0,s(t),0<e.delay)return n.delayed=!0,i(function(){t.ctx&&(n.delayed=!1,t.update())},e.delay),!1}if(n.delayed)return!1},destroy:function(t){s(t)}})}),s.default.util.$$("[data-yooessentials-chart]").forEach(function(t){function e(t,e){return{scaleLabel:{display:(e=void 0===e?{}:e)[t+"Label"]&&0<e[t+"Label"].length,labelString:e[t+"Label"],fontFamily:e.fontFamily||a.fontFamily,fontColor:e.fontColor||a.fontColor},ticks:{fontSize:e.fontSize?parseInt(e.fontSize):12,fontColor:e.fontColor||a.fontColor,lineHeight:e.lineHeight?parseInt(e.lineHeight):1,fontFamily:e.fontFamily||a.fontFamily,beginAtZero:i.beginAtZero}}}var n=s.default.util.$("canvas",t).getContext("2d"),i=JSON.parse(t.dataset.yooessentialsChart),r=JSON.parse(t.dataset.labels),t=JSON.parse(t.dataset.sets),a={fontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",fontColor:"#666"},o=[].concat(function(t){var e,n=[];for(e in t)n.push(t[e].type);return n.filter(Boolean)}(t),[i.type]),r={type:i.type,label:i.label,data:{labels:r,datasets:t},options:{plugins:{},animation:i.animation||{},tooltips:l({display:!0},i.tooltips||{}),title:l({display:!0},i.title||{}),legend:l({},i.legend||{},{fontFamily:i.fontFamily||a.defaultFont})}};o.join(",").match(/line|bar|horizontalBar|bubble/)&&(r.options.scales={yAxes:[l({},e("y",i.labels),{gridLines:{offsetGridLines:"horizontalBar"===i.type}})],xAxes:[l({},e("x",i.labels),{gridLines:{offsetGridLines:"bar"===i.type}})]}),i.deferred&&(r.options.plugins.deferred={yOffset:"30%",delay:500}),new c(n,r)})}(UIkit);