Files
moodle/lib/amd/build/chartjs-lazy.min.js
2021-01-14 07:36:35 +08:00

3 lines
236 KiB
JavaScript

function _typeof(e){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(e){return typeof e}}else{_typeof=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return _typeof(e)}(function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define ("core/chartjs-lazy",t):(e=e||self,e.Chart=t())})(this,function(){'use strict';var zt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Vt={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]},Ht=t(function(e){var a={};for(var i in Vt){if(Vt.hasOwnProperty(i)){a[Vt[i]]=i}}var o=e.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 o){if(o.hasOwnProperty(n)){if(!("channels"in o[n])){throw new Error("missing channels property: "+n)}if(!("labels"in o[n])){throw new Error("missing channel labels property: "+n)}if(o[n].labels.length!==o[n].channels){throw new Error("channel and label counts mismatch: "+n)}var r=o[n].channels,l=o[n].labels;delete o[n].channels;delete o[n].labels;Object.defineProperty(o[n],"channels",{value:r});Object.defineProperty(o[n],"labels",{value:l})}}o.rgb.hsl=function(e){var t=e[0]/255,a=e[1]/255,i=e[2]/255,o=Math.min(t,a,i),n=Math.max(t,a,i),r=n-o,d,c,g;if(n===o){d=0}else if(t===n){d=(a-i)/r}else if(a===n){d=2+(i-t)/r}else if(i===n){d=4+(t-a)/r}d=Math.min(60*d,360);if(0>d){d+=360}g=(o+n)/2;if(n===o){c=0}else if(.5>=g){c=r/(n+o)}else{c=r/(2-n-o)}return[d,100*c,100*g]};o.rgb.hsv=function(e){var t,a,i,o,n,l=e[0]/255,r=e[1]/255,d=e[2]/255,g=Math.max(l,r,d),m=g-Math.min(l,r,d),u=function(e){return(g-e)/6/m+1/2};if(0===m){o=n=0}else{n=m/g;t=u(l);a=u(r);i=u(d);if(l===g){o=i-a}else if(r===g){o=1/3+t-i}else if(d===g){o=2/3+a-t}if(0>o){o+=1}else if(1<o){o-=1}}return[360*o,100*n,100*g]};o.rgb.hwb=function(e){var t=e[0],a=e[1],i=e[2],n=o.rgb.hsl(e)[0],r=1/255*Math.min(t,Math.min(a,i));i=1-1/255*Math.max(t,Math.max(a,i));return[n,100*r,100*i]};o.rgb.cmyk=function(e){var t=e[0]/255,a=e[1]/255,i=e[2]/255,o,n,r,l;l=Math.min(1-t,1-a,1-i);o=(1-t-l)/(1-l)||0;n=(1-a-l)/(1-l)||0;r=(1-i-l)/(1-l)||0;return[100*o,100*n,100*r,100*l]};function t(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}o.rgb.keyword=function(e){var i=a[e];if(i){return i}var o=1/0,n;for(var r in Vt){if(Vt.hasOwnProperty(r)){var l=Vt[r],s=t(e,l);if(s<o){o=s;n=r}}}return n};o.keyword.rgb=function(e){return Vt[e]};o.rgb.xyz=function(e){var t=e[0]/255,a=e[1]/255,i=e[2]/255;t=.04045<t?Math.pow((t+.055)/1.055,2.4):t/12.92;a=.04045<a?Math.pow((a+.055)/1.055,2.4):a/12.92;i=.04045<i?Math.pow((i+.055)/1.055,2.4):i/12.92;var o=.4124*t+.3576*a+.1805*i,n=.2126*t+.7152*a+.0722*i,l=.0193*t+.1192*a+.9505*i;return[100*o,100*n,100*l]};o.rgb.lab=function(e){var t=o.rgb.xyz(e),i=t[0],n=t[1],r=t[2],s,d,c;i/=95.047;n/=100;r/=108.883;i=.008856<i?Math.pow(i,1/3):7.787*i+16/116;n=.008856<n?Math.pow(n,1/3):7.787*n+16/116;r=.008856<r?Math.pow(r,1/3):7.787*r+16/116;s=116*n-16;d=500*(i-n);c=200*(n-r);return[s,d,c]};o.hsl.rgb=function(e){var t=e[0]/360,a=e[1]/100,o=e[2]/100,n,r,l,s,d;if(0===a){d=255*o;return[d,d,d]}if(.5>o){r=o*(1+a)}else{r=o+a-o*a}n=2*o-r;s=[0,0,0];for(var c=0;3>c;c++){l=t+1/3*-(c-1);if(0>l){l++}if(1<l){l--}if(1>6*l){d=n+6*(r-n)*l}else if(1>2*l){d=r}else if(2>3*l){d=n+6*((r-n)*(2/3-l))}else{d=n}s[c]=255*d}return s};o.hsl.hsv=function(e){var t=e[0],a=e[1]/100,i=e[2]/100,o=a,n=Math.max(i,.01),r,d;i*=2;a*=1>=i?i:2-i;o*=1>=n?n:2-n;d=(i+a)/2;r=0===i?2*o/(n+o):2*a/(i+a);return[t,100*r,100*d]};o.hsv.rgb=function(e){var a=e[0]/60,i=e[1]/100,o=e[2]/100,n=Math.floor(a)%6,r=a-Math.floor(a),l=255*o*(1-i),s=255*o*(1-i*r),d=255*o*(1-i*(1-r));o*=255;switch(n){case 0:return[o,d,l];case 1:return[s,o,l];case 2:return[l,o,d];case 3:return[l,s,o];case 4:return[d,l,o];case 5:return[o,l,s];}};o.hsv.hsl=function(e){var t=e[0],a=e[1]/100,i=e[2]/100,o=Math.max(i,.01),n,r,s;s=(2-a)*i;n=(2-a)*o;r=a*o;r/=1>=n?n:2-n;r=r||0;s/=2;return[t,100*r,100*s]};o.hwb.rgb=function(e){var t=e[0]/360,a=e[1]/100,o=e[2]/100,l=a+o,s,d,c,h;if(1<l){a/=l;o/=l}s=Math.floor(6*t);d=1-o;c=6*t-s;if(0!=(1&s)){c=1-c}h=a+c*(d-a);var m,u,p;switch(s){default:case 6:case 0:m=d;u=h;p=a;break;case 1:m=h;u=d;p=a;break;case 2:m=a;u=d;p=h;break;case 3:m=a;u=h;p=d;break;case 4:m=h;u=a;p=d;break;case 5:m=d;u=a;p=h;break;}return[255*m,255*u,255*p]};o.cmyk.rgb=function(e){var t=e[0]/100,a=e[1]/100,i=e[2]/100,o=e[3]/100,n,l,s;n=1-Math.min(1,t*(1-o)+o);l=1-Math.min(1,a*(1-o)+o);s=1-Math.min(1,i*(1-o)+o);return[255*n,255*l,255*s]};o.xyz.rgb=function(e){var t=e[0]/100,a=e[1]/100,i=e[2]/100,o,n,l;o=3.2406*t+-1.5372*a+-.4986*i;n=-.9689*t+1.8758*a+.0415*i;l=.0557*t+-.204*a+1.057*i;o=.0031308<o?1.055*Math.pow(o,1/2.4)-.055:12.92*o;n=.0031308<n?1.055*Math.pow(n,1/2.4)-.055:12.92*n;l=.0031308<l?1.055*Math.pow(l,1/2.4)-.055:12.92*l;o=Math.min(Math.max(0,o),1);n=Math.min(Math.max(0,n),1);l=Math.min(Math.max(0,l),1);return[255*o,255*n,255*l]};o.xyz.lab=function(e){var t=e[0],i=e[1],o=e[2],n,r,s;t/=95.047;i/=100;o/=108.883;t=.008856<t?Math.pow(t,1/3):7.787*t+16/116;i=.008856<i?Math.pow(i,1/3):7.787*i+16/116;o=.008856<o?Math.pow(o,1/3):7.787*o+16/116;n=116*i-16;r=500*(t-i);s=200*(i-o);return[n,r,s]};o.lab.xyz=function(e){var t=e[0],i=e[1],a=e[2],o,n,r;n=(t+16)/116;o=i/500+n;r=n-a/200;var l=Math.pow(n,3),s=Math.pow(o,3),d=Math.pow(r,3);n=.008856<l?l:(n-16/116)/7.787;o=.008856<s?s:(o-16/116)/7.787;r=.008856<d?d:(r-16/116)/7.787;o*=95.047;n*=100;r*=108.883;return[o,n,r]};o.lab.lch=function(e){var t=e[0],i=e[1],a=e[2],o,n,r;o=Math.atan2(a,i);n=360*o/2/Math.PI;if(0>n){n+=360}r=Math.sqrt(i*i+a*a);return[t,r,n]};o.lch.lab=function(e){var t=e[0],i=e[1],o=e[2],n,r,l;l=2*(o/360)*Math.PI;n=i*Math.cos(l);r=i*Math.sin(l);return[t,n,r]};o.rgb.ansi16=function(e){var t=e[0],a=e[1],i=e[2],n=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];n=Math.round(n/50);if(0===n){return 30}var r=30+(Math.round(i/255)<<2|Math.round(a/255)<<1|Math.round(t/255));if(2===n){r+=60}return r};o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])};o.rgb.ansi256=function(e){var t=e[0],a=e[1],i=e[2];if(t===a&&a===i){if(8>t){return 16}if(248<t){return 231}return Math.round(24*((t-8)/247))+232}var o=16+36*Math.round(5*(t/255))+6*Math.round(5*(a/255))+Math.round(5*(i/255));return o};o.ansi16.rgb=function(e){var t=e%10;if(0==t||7===t){if(50<e){t+=3.5}t=255*(t/10.5);return[t,t,t]}var a=.5*(~~(50<e)+1),i=255*((1&t)*a),o=255*((1&t>>1)*a),n=255*((1&t>>2)*a);return[i,o,n]};o.ansi256.rgb=function(e){if(232<=e){var t=10*(e-232)+8;return[t,t,t]}e-=16;var a,i=255*(Math.floor(e/36)/5),o=255*(Math.floor((a=e%36)/6)/5),n=255*(a%6/5);return[i,o,n]};o.rgb.hex=function(e){var t=((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2])),a=t.toString(16).toUpperCase();return"000000".substring(a.length)+a};o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t){return[0,0,0]}var a=t[0];if(3===t[0].length){a=a.split("").map(function(e){return e+e}).join("")}var i=parseInt(a,16);return[255&i>>16,255&i>>8,255&i]};o.rgb.hcg=function(e){var t=e[0]/255,a=e[1]/255,i=e[2]/255,o=Math.max(Math.max(t,a),i),n=Math.min(Math.min(t,a),i),r=o-n,l,s;if(1>r){l=n/(1-r)}else{l=0}if(0>=r){s=0}else if(o===t){s=(a-i)/r%6}else if(o===a){s=2+(i-t)/r}else{s=4+(t-a)/r+4}s/=6;s%=1;return[360*s,100*r,100*l]};o.hsl.hcg=function(e){var t=e[1]/100,a=e[2]/100,i=1,o=0;if(.5>a){i=2*t*a}else{i=2*t*(1-a)}if(1>i){o=(a-.5*i)/(1-i)}return[e[0],100*i,100*o]};o.hsv.hcg=function(e){var t=e[1]/100,a=e[2]/100,i=t*a,o=0;if(1>i){o=(a-i)/(1-i)}return[e[0],100*i,100*o]};o.hcg.rgb=function(e){var t=e[0]/360,a=e[1]/100,i=e[2]/100;if(0===a){return[255*i,255*i,255*i]}var o=[0,0,0],n=6*(t%1),r=n%1,l=1-r,s=0;switch(Math.floor(n)){case 0:o[0]=1;o[1]=r;o[2]=0;break;case 1:o[0]=l;o[1]=1;o[2]=0;break;case 2:o[0]=0;o[1]=1;o[2]=r;break;case 3:o[0]=0;o[1]=l;o[2]=1;break;case 4:o[0]=r;o[1]=0;o[2]=1;break;default:o[0]=1;o[1]=0;o[2]=l;}s=(1-a)*i;return[255*(a*o[0]+s),255*(a*o[1]+s),255*(a*o[2]+s)]};o.hcg.hsv=function(e){var t=e[1]/100,a=e[2]/100,i=t+a*(1-t),o=0;if(0<i){o=t/i}return[e[0],100*o,100*i]};o.hcg.hsl=function(e){var t=e[1]/100,a=e[2]/100,i=a*(1-t)+.5*t,o=0;if(0<i&&.5>i){o=t/(2*i)}else if(.5<=i&&1>i){o=t/(2*(1-i))}return[e[0],100*o,100*i]};o.hcg.hwb=function(e){var t=e[1]/100,a=e[2]/100,i=t+a*(1-t);return[e[0],100*(i-t),100*(1-i)]};o.hwb.hcg=function(e){var t=e[1]/100,a=e[2]/100,i=1-a,o=i-t,n=0;if(1>o){n=(i-o)/(1-o)}return[e[0],100*o,100*n]};o.apple.rgb=function(e){return[255*(e[0]/65535),255*(e[1]/65535),255*(e[2]/65535)]};o.rgb.apple=function(e){return[65535*(e[0]/255),65535*(e[1]/255),65535*(e[2]/255)]};o.gray.rgb=function(e){return[255*(e[0]/100),255*(e[0]/100),255*(e[0]/100)]};o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]};o.gray.hwb=function(e){return[0,100,e[0]]};o.gray.cmyk=function(e){return[0,0,0,e[0]]};o.gray.lab=function(e){return[e[0],0,0]};o.gray.hex=function(e){var t=255&Math.round(255*(e[0]/100)),a=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(a.length)+a};o.rgb.gray=function(e){var t=(e[0]+e[1]+e[2])/3;return[100*(t/255)]}}),Bt=Ht.rgb,Nt=Ht.hsl,Ut=Ht.hsv,jt=Ht.hwb,Gt=Ht.cmyk,qt=Ht.xyz,Kt=Ht.lab,Xt=Ht.lch,Zt=Ht.hex,Jt=Ht.keyword,Qt=Ht.ansi16,$t=Ht.ansi256,ea=Ht.hcg,ta=Ht.apple,aa=Ht.gray;function a(){for(var e={},t=Object.keys(Ht),a=t.length,o=0;o<a;o++){e[t[o]]={distance:-1,parent:null}}return e}function o(e){var t=a(),o=[e];t[e].distance=0;while(o.length){for(var n=o.pop(),r=Object.keys(Ht[n]),l=r.length,s=0;s<l;s++){var d=r[s],c=t[d];if(-1===c.distance){c.distance=t[n].distance+1;c.parent=n;o.unshift(d)}}}return t}function n(e,t){return function(a){return t(e(a))}}function r(e,t){var a=[t[e].parent,e],i=Ht[t[e].parent][e],o=t[e].parent;while(t[o].parent){a.unshift(t[o].parent);i=n(Ht[t[o].parent][o],i);o=t[o].parent}i.conversion=a;return i}var ia=function(e){for(var t=o(e),a={},n=Object.keys(t),l=n.length,s=0;s<l;s++){var d=n[s],c=t[d];if(null===c.parent){continue}a[d]=r(d,t)}return a},oa={},na=Object.keys(Ht);function l(e){var t=function(t){if(t===void 0||null===t){return t}if(1<arguments.length){t=Array.prototype.slice.call(arguments)}return e(t)};if("conversion"in e){t.conversion=e.conversion}return t}function s(e){var t=function(t){if(t===void 0||null===t){return t}if(1<arguments.length){t=Array.prototype.slice.call(arguments)}var a=e(t);if("object"===_typeof(a)){for(var o=a.length,n=0;n<o;n++){a[n]=Math.round(a[n])}}return a};if("conversion"in e){t.conversion=e.conversion}return t}na.forEach(function(e){oa[e]={};Object.defineProperty(oa[e],"channels",{value:Ht[e].channels});Object.defineProperty(oa[e],"labels",{value:Ht[e].labels});var t=ia(e),a=Object.keys(t);a.forEach(function(a){var i=t[a];oa[e][a]=s(i);oa[e][a].raw=l(i)})});var ra={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]},la={getRgba:d,getHsla:c,getRgb:function(e){var t=d(e);return t&&t.slice(0,3)},getHsl:function(e){var t=c(e);return t&&t.slice(0,3)},getHwb:h,getAlpha:function(e){var t=d(e);if(t){return t[3]}else if(t=c(e)){return t[3]}else if(t=h(e)){return t[3]}},hexString:function(e,t){var t=t!==void 0&&3===e.length?t:e[3];return"#"+f(e[0])+f(e[1])+f(e[2])+(0<=t&&1>t?f(Math.round(255*t)):"")},rgbString:function(e,t){if(1>t||e[3]&&1>e[3]){return g(e,t)}return"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:g,percentString:function(e,t){if(1>t||e[3]&&1>e[3]){return m(e,t)}var a=Math.round(100*(e[0]/255)),i=Math.round(100*(e[1]/255)),o=Math.round(100*(e[2]/255));return"rgb("+a+"%, "+i+"%, "+o+"%)"},percentaString:m,hslString:function(e,t){if(1>t||e[3]&&1>e[3]){return u(e,t)}return"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:u,hwbString:function(e,t){if(t===void 0){t=e[3]!==void 0?e[3]:1}return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(t!==void 0&&1!==t?", "+t:"")+")"},keyword:function(e){return sa[e.slice(0,3)]}};function d(e){if(!e){return}var t=[0,0,0],o=1,n=e.match(/^#([a-fA-F0-9]{3,4})$/i),r="";if(n){n=n[1];r=n[3];for(var l=0;l<t.length;l++){t[l]=parseInt(n[l]+n[l],16)}if(r){o=Math.round(100*(parseInt(r+r,16)/255))/100}}else if(n=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){r=n[2];n=n[1];for(var l=0;l<t.length;l++){t[l]=parseInt(n.slice(2*l,2*l+2),16)}if(r){o=Math.round(100*(parseInt(r,16)/255))/100}}else if(n=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(var l=0;l<t.length;l++){t[l]=parseInt(n[l+1])}o=parseFloat(n[4])}else if(n=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(var l=0;l<t.length;l++){t[l]=Math.round(2.55*parseFloat(n[l+1]))}o=parseFloat(n[4])}else if(n=e.match(/(\w+)/)){if("transparent"==n[1]){return[0,0,0,0]}t=ra[n[1]];if(!t){return}}for(var l=0;l<t.length;l++){t[l]=p(t[l],0,255)}if(!o&&0!=o){o=1}else{o=p(o,0,1)}t[3]=o;return t}function c(e){if(!e){return}var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var i=parseFloat(t[4]),o=p(parseInt(t[1]),0,360),n=p(parseFloat(t[2]),0,100),r=p(parseFloat(t[3]),0,100),l=p(isNaN(i)?1:i,0,1);return[o,n,r,l]}}function h(e){if(!e){return}var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var i=parseFloat(t[4]),o=p(parseInt(t[1]),0,360),n=p(parseFloat(t[2]),0,100),r=p(parseFloat(t[3]),0,100),l=p(isNaN(i)?1:i,0,1);return[o,n,r,l]}}function g(e,t){if(t===void 0){t=e[3]!==void 0?e[3]:1}return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function m(e,t){var a=Math.round(100*(e[0]/255)),i=Math.round(100*(e[1]/255)),o=Math.round(100*(e[2]/255));return"rgba("+a+"%, "+i+"%, "+o+"%, "+(t||e[3]||1)+")"}function u(e,t){if(t===void 0){t=e[3]!==void 0?e[3]:1}return"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function p(e,t,a){return Math.min(Math.max(t,e),a)}function f(e){var t=e.toString(16).toUpperCase();return 2>t.length?"0"+t:t}var sa={};for(var da in ra){sa[ra[da]]=da}var ca=function(e){if(e instanceof ca){return e}if(!(this instanceof ca)){return new ca(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 t;if("string"==typeof e){t=la.getRgba(e);if(t){this.setValues("rgb",t)}else if(t=la.getHsla(e)){this.setValues("hsl",t)}else if(t=la.getHwb(e)){this.setValues("hwb",t)}}else if("object"===_typeof(e)){t=e;if(t.r!==void 0||t.red!==void 0){this.setValues("rgb",t)}else if(t.l!==void 0||t.lightness!==void 0){this.setValues("hsl",t)}else if(t.v!==void 0||t.value!==void 0){this.setValues("hsv",t)}else if(t.w!==void 0||t.whiteness!==void 0){this.setValues("hwb",t)}else if(t.c!==void 0||t.cyan!==void 0){this.setValues("cmyk",t)}}};ca.prototype={isValid:function isValid(){return this.valid},rgb:function rgb(){return this.setSpace("rgb",arguments)},hsl:function hsl(){return this.setSpace("hsl",arguments)},hsv:function hsv(){return this.setSpace("hsv",arguments)},hwb:function hwb(){return this.setSpace("hwb",arguments)},cmyk:function cmyk(){return this.setSpace("cmyk",arguments)},rgbArray:function rgbArray(){return this.values.rgb},hslArray:function hslArray(){return this.values.hsl},hsvArray:function hsvArray(){return this.values.hsv},hwbArray:function hwbArray(){var e=this.values;if(1!==e.alpha){return e.hwb.concat([e.alpha])}return e.hwb},cmykArray:function cmykArray(){return this.values.cmyk},rgbaArray:function rgbaArray(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function hslaArray(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function alpha(e){if(e===void 0){return this.values.alpha}this.setValues("alpha",e);return this},red:function red(e){return this.setChannel("rgb",0,e)},green:function green(e){return this.setChannel("rgb",1,e)},blue:function blue(e){return this.setChannel("rgb",2,e)},hue:function hue(e){if(e){e%=360;e=0>e?360+e:e}return this.setChannel("hsl",0,e)},saturation:function saturation(e){return this.setChannel("hsl",1,e)},lightness:function lightness(e){return this.setChannel("hsl",2,e)},saturationv:function saturationv(e){return this.setChannel("hsv",1,e)},whiteness:function whiteness(e){return this.setChannel("hwb",1,e)},blackness:function blackness(e){return this.setChannel("hwb",2,e)},value:function value(e){return this.setChannel("hsv",2,e)},cyan:function cyan(e){return this.setChannel("cmyk",0,e)},magenta:function magenta(e){return this.setChannel("cmyk",1,e)},yellow:function yellow(e){return this.setChannel("cmyk",2,e)},black:function black(e){return this.setChannel("cmyk",3,e)},hexString:function hexString(){return la.hexString(this.values.rgb)},rgbString:function rgbString(){return la.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return la.rgbaString(this.values.rgb,this.values.alpha)},percentString:function percentString(){return la.percentString(this.values.rgb,this.values.alpha)},hslString:function hslString(){return la.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return la.hslaString(this.values.hsl,this.values.alpha)},hwbString:function hwbString(){return la.hwbString(this.values.hwb,this.values.alpha)},keyword:function keyword(){return la.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function rgbNumber(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function luminosity(){for(var e=this.values.rgb,t=[],a=0,o;a<e.length;a++){o=e[a]/255;t[a]=.03928>=o?o/12.92:Math.pow((o+.055)/1.055,2.4)}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function contrast(e){var t=this.luminosity(),a=e.luminosity();if(t>a){return(t+.05)/(a+.05)}return(a+.05)/(t+.05)},level:function level(e){var t=this.contrast(e);if(7.1<=t){return"AAA"}return 4.5<=t?"AA":""},dark:function dark(){var e=this.values.rgb,t=(299*e[0]+587*e[1]+114*e[2])/1e3;return 128>t},light:function light(){return!this.dark()},negate:function negate(){for(var e=[],t=0;3>t;t++){e[t]=255-this.values.rgb[t]}this.setValues("rgb",e);return this},lighten:function lighten(e){var t=this.values.hsl;t[2]+=t[2]*e;this.setValues("hsl",t);return this},darken:function darken(e){var t=this.values.hsl;t[2]-=t[2]*e;this.setValues("hsl",t);return this},saturate:function saturate(e){var t=this.values.hsl;t[1]+=t[1]*e;this.setValues("hsl",t);return this},desaturate:function desaturate(e){var t=this.values.hsl;t[1]-=t[1]*e;this.setValues("hsl",t);return this},whiten:function whiten(e){var t=this.values.hwb;t[1]+=t[1]*e;this.setValues("hwb",t);return this},blacken:function blacken(e){var t=this.values.hwb;t[2]+=t[2]*e;this.setValues("hwb",t);return this},greyscale:function greyscale(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];this.setValues("rgb",[t,t,t]);return this},clearer:function clearer(e){var t=this.values.alpha;this.setValues("alpha",t-t*e);return this},opaquer:function opaquer(e){var t=this.values.alpha;this.setValues("alpha",t+t*e);return this},rotate:function rotate(e){var t=this.values.hsl,a=(t[0]+e)%360;t[0]=0>a?360+a:a;this.setValues("hsl",t);return this},mix:function mix(e,t){var i=this,o=e,n=t===void 0?.5:t,r=2*n-1,l=i.alpha()-o.alpha(),a=((-1==r*l?r:(r+l)/(1+r*l))+1)/2,s=1-a;return this.rgb(a*i.red()+s*o.red(),a*i.green()+s*o.green(),a*i.blue()+s*o.blue()).alpha(i.alpha()*n+o.alpha()*(1-n))},toJSON:function toJSON(){return this.rgb()},clone:function clone(){var e=new ca,t=this.values,a=e.values,i,o;for(var n in t){if(t.hasOwnProperty(n)){i=t[n];o={}.toString.call(i);if("[object Array]"===o){a[n]=i.slice(0)}else if("[object Number]"===o){a[n]=i}else{console.error("unexpected color value:",i)}}}return e}};ca.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]};ca.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]};ca.prototype.getValues=function(e){for(var t=this.values,a={},o=0;o<e.length;o++){a[e.charAt(o)]=t[e][o]}if(1!==t.alpha){a.a=t.alpha}return a};ca.prototype.setValues=function(e,t){var a=this.values,o=this.spaces,n=this.maxes,r=1,l;this.valid=!0;if("alpha"===e){r=t}else if(t.length){a[e]=t.slice(0,e.length);r=t[e.length]}else if(t[e.charAt(0)]!==void 0){for(l=0;l<e.length;l++){a[e][l]=t[e.charAt(l)]}r=t.a}else if(t[o[e][0]]!==void 0){var s=o[e];for(l=0;l<e.length;l++){a[e][l]=t[s[l]]}r=t.alpha}a.alpha=Math.max(0,Math.min(1,r===void 0?a.alpha:r));if("alpha"===e){return!1}var d;for(l=0;l<e.length;l++){d=Math.max(0,Math.min(n[e][l],a[e][l]));a[e][l]=Math.round(d)}for(var c in o){if(c!==e){a[c]=oa[e][c](a[e])}}return!0};ca.prototype.setSpace=function(e,t){var a=t[0];if(a===void 0){return this.getValues(e)}if("number"==typeof a){a=Array.prototype.slice.call(t)}this.setValues(e,a);return this};ca.prototype.setChannel=function(e,t,a){var i=this.values[e];if(a===void 0){return i[t]}else if(a===i[t]){return this}i[t]=a;this.setValues(e,i);return this};if("undefined"!=typeof window){window.Color=ca}var ha=ca;function y(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}var ga={noop:function(){},uid:function(){var e=0;return function(){return e++}}(),isNullOrUndef:function(e){return null===e||"undefined"==typeof e},isArray:function(e){if(Array.isArray&&Array.isArray(e)){return!0}var t=Object.prototype.toString.call(e);if("[object"===t.substr(0,7)&&"Array]"===t.substr(-6)){return!0}return!1},isObject:function isObject(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){function t(){return e.apply(this,arguments)}t.toString=function(){return e.toString()};return t}(function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)}),valueOrDefault:function(e,t){return"undefined"==typeof e?t:e},valueAtIndexOrDefault:function(e,t,a){return ga.valueOrDefault(ga.isArray(e)?e[t]:e,a)},callback:function callback(e,t,a){if(e&&"function"==typeof e.call){return e.apply(a,t)}},each:function each(e,t,a,o){var n,r,l;if(ga.isArray(e)){r=e.length;if(o){for(n=r-1;0<=n;n--){t.call(a,e[n],n)}}else{for(n=0;n<r;n++){t.call(a,e[n],n)}}}else if(ga.isObject(e)){l=Object.keys(e);r=l.length;for(n=0;n<r;n++){t.call(a,e[l[n]],l[n])}}},arrayEquals:function arrayEquals(e,t){var a,o,n,r;if(!e||!t||e.length!==t.length){return!1}for(a=0,o=e.length;a<o;++a){n=e[a];r=t[a];if(n instanceof Array&&r instanceof Array){if(!ga.arrayEquals(n,r)){return!1}}else if(n!==r){return!1}}return!0},clone:function clone(e){if(ga.isArray(e)){return e.map(ga.clone)}if(ga.isObject(e)){var t=Object.create(e),a=Object.keys(e),i=a.length,o=0;for(;o<i;++o){t[a[o]]=ga.clone(e[a[o]])}return t}return e},_merger:function _merger(e,t,a,i){if(!y(e)){return}var o=t[e],n=a[e];if(ga.isObject(o)&&ga.isObject(n)){ga.merge(o,n,i)}else{t[e]=ga.clone(n)}},_mergerIf:function _mergerIf(e,t,a){if(!y(e)){return}var i=t[e],o=a[e];if(ga.isObject(i)&&ga.isObject(o)){ga.mergeIf(i,o)}else if(!t.hasOwnProperty(e)){t[e]=ga.clone(o)}},merge:function(e,t,a){var o=ga.isArray(t)?t:[t],n=o.length,r,l,s,d,c;if(!ga.isObject(e)){return e}a=a||{};r=a.merger||ga._merger;for(l=0;l<n;++l){t=o[l];if(!ga.isObject(t)){continue}s=Object.keys(t);for(c=0,d=s.length;c<d;++c){r(s[c],e,t,a)}}return e},mergeIf:function mergeIf(e,t){return ga.merge(e,t,{merger:ga._mergerIf})},extend:Object.assign||function(e){return ga.merge(e,[].slice.call(arguments,1),{merger:function merger(e,t,a){t[e]=a[e]}})},inherits:function inherits(e){var t=this,a=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},i=function(){this.constructor=a};i.prototype=t.prototype;a.prototype=new i;a.extend=ga.inherits;if(e){ga.extend(a.prototype,e)}a.__super__=t.prototype;return a},_deprecated:function _deprecated(e,t,a,i){if(t!==void 0){console.warn(e+": \""+a+"\" is deprecated. Please use \""+i+"\" instead")}}},ma=ga;ga.callCallback=ga.callback;ga.indexOf=function(e,t,a){return Array.prototype.indexOf.call(e,t,a)};ga.getValueOrDefault=ga.valueOrDefault;ga.getValueAtIndexOrDefault=ga.valueAtIndexOrDefault;var ua={linear:function linear(e){return e},easeInQuad:function easeInQuad(e){return e*e},easeOutQuad:function easeOutQuad(e){return-e*(e-2)},easeInOutQuad:function easeInOutQuad(e){if(1>(e/=.5)){return .5*e*e}return-.5*(--e*(e-2)-1)},easeInCubic:function easeInCubic(e){return e*e*e},easeOutCubic:function easeOutCubic(e){return(e=e-1)*e*e+1},easeInOutCubic:function easeInOutCubic(e){if(1>(e/=.5)){return .5*e*e*e}return .5*((e-=2)*e*e+2)},easeInQuart:function easeInQuart(e){return e*e*e*e},easeOutQuart:function easeOutQuart(e){return-((e=e-1)*e*e*e-1)},easeInOutQuart:function easeInOutQuart(e){if(1>(e/=.5)){return .5*e*e*e*e}return-.5*((e-=2)*e*e*e-2)},easeInQuint:function easeInQuint(e){return e*e*e*e*e},easeOutQuint:function easeOutQuint(e){return(e=e-1)*e*e*e*e+1},easeInOutQuint:function easeInOutQuint(e){if(1>(e/=.5)){return .5*e*e*e*e*e}return .5*((e-=2)*e*e*e*e+2)},easeInSine:function easeInSine(e){return-Math.cos(e*(Math.PI/2))+1},easeOutSine:function easeOutSine(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function easeInOutSine(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function easeInExpo(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function easeOutExpo(e){return 1===e?1:-Math.pow(2,-10*e)+1},easeInOutExpo:function easeInOutExpo(e){if(0===e){return 0}if(1===e){return 1}if(1>(e/=.5)){return .5*Math.pow(2,10*(e-1))}return .5*(-Math.pow(2,-10*--e)+2)},easeInCirc:function easeInCirc(e){if(1<=e){return e}return-(Math.sqrt(1-e*e)-1)},easeOutCirc:function easeOutCirc(e){return Math.sqrt(1-(e=e-1)*e)},easeInOutCirc:function easeInOutCirc(e){if(1>(e/=.5)){return-.5*(Math.sqrt(1-e*e)-1)}return .5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function easeInElastic(e){var i=1.70158,o=0,n=1;if(0===e){return 0}if(1===e){return 1}if(!o){o=.3}if(1>n){n=1;i=o/4}else{i=o/(2*Math.PI)*Math.asin(1/n)}return-(n*Math.pow(2,10*(e-=1))*Math.sin((e-i)*(2*Math.PI)/o))},easeOutElastic:function easeOutElastic(e){var t=1.70158,i=0,o=1;if(0===e){return 0}if(1===e){return 1}if(!i){i=.3}if(1>o){o=1;t=i/4}else{t=i/(2*Math.PI)*Math.asin(1/o)}return o*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/i)+1},easeInOutElastic:function easeInOutElastic(e){var i=1.70158,o=0,n=1;if(0===e){return 0}if(2==(e/=.5)){return 1}if(!o){o=.45}if(1>n){n=1;i=o/4}else{i=o/(2*Math.PI)*Math.asin(1/n)}if(1>e){return-.5*(n*Math.pow(2,10*(e-=1))*Math.sin((e-i)*(2*Math.PI)/o))}return .5*(n*Math.pow(2,-10*(e-=1))*Math.sin((e-i)*(2*Math.PI)/o))+1},easeInBack:function easeInBack(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function easeOutBack(e){var a=1.70158;return(e=e-1)*e*((a+1)*e+a)+1},easeInOutBack:function easeInOutBack(e){var a=1.70158;if(1>(e/=.5)){return .5*(e*e*(((a*=1.525)+1)*e-a))}return .5*((e-=2)*e*(((a*=1.525)+1)*e+a)+2)},easeInBounce:function easeInBounce(e){return 1-ua.easeOutBounce(1-e)},easeOutBounce:function easeOutBounce(e){if(e<1/2.75){return 7.5625*e*e}if(e<2/2.75){return 7.5625*(e-=1.5/2.75)*e+.75}if(e<2.5/2.75){return 7.5625*(e-=2.25/2.75)*e+.9375}return 7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function easeInOutBounce(e){if(.5>e){return .5*ua.easeInBounce(2*e)}return .5*ua.easeOutBounce(2*e-1)+.5}};ma.easingEffects=ua;var pa=Math.PI,i=pa/2,fa=pa/4,ya=2*pa/3,ba={clear:function clear(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function roundedRect(e,t,a,o,n,l){if(l){var s=Math.min(l,n/2,o/2),r=t+s,d=a+s,c=t+o-s,h=a+n-s;e.moveTo(t,d);if(r<c&&d<h){e.arc(r,d,s,-pa,-i);e.arc(c,d,s,-i,0);e.arc(c,h,s,0,i);e.arc(r,h,s,i,pa)}else if(r<c){e.moveTo(r,a);e.arc(c,d,s,-i,i);e.arc(r,d,s,i,pa+i)}else if(d<h){e.arc(r,d,s,-pa,0);e.arc(r,h,s,0,pa)}else{e.arc(r,d,s,-pa,pa)}e.closePath();e.moveTo(t,a)}else{e.rect(t,a,o,n)}},drawPoint:function drawPoint(e,t,a,o,n,r){var l,s,d,c,h,g=(r||0)*(pa/180);if(t&&"object"===_typeof(t)){l=t.toString();if("[object HTMLImageElement]"===l||"[object HTMLCanvasElement]"===l){e.save();e.translate(o,n);e.rotate(g);e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height);e.restore();return}}if(isNaN(a)||0>=a){return}e.beginPath();switch(t){default:e.arc(o,n,a,0,2*pa);e.closePath();break;case"triangle":e.moveTo(o+Math.sin(g)*a,n-Math.cos(g)*a);g+=ya;e.lineTo(o+Math.sin(g)*a,n-Math.cos(g)*a);g+=ya;e.lineTo(o+Math.sin(g)*a,n-Math.cos(g)*a);e.closePath();break;case"rectRounded":h=.516*a;c=a-h;s=Math.cos(g+fa)*c;d=Math.sin(g+fa)*c;e.arc(o-s,n-d,h,g-pa,g-i);e.arc(o+d,n-s,h,g-i,g);e.arc(o+s,n+d,h,g,g+i);e.arc(o-d,n+s,h,g+i,g+pa);e.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*a;e.rect(o-c,n-c,2*c,2*c);break}g+=fa;case"rectRot":s=Math.cos(g)*a;d=Math.sin(g)*a;e.moveTo(o-s,n-d);e.lineTo(o+d,n-s);e.lineTo(o+s,n+d);e.lineTo(o-d,n+s);e.closePath();break;case"crossRot":g+=fa;case"cross":s=Math.cos(g)*a;d=Math.sin(g)*a;e.moveTo(o-s,n-d);e.lineTo(o+s,n+d);e.moveTo(o+d,n-s);e.lineTo(o-d,n+s);break;case"star":s=Math.cos(g)*a;d=Math.sin(g)*a;e.moveTo(o-s,n-d);e.lineTo(o+s,n+d);e.moveTo(o+d,n-s);e.lineTo(o-d,n+s);g+=fa;s=Math.cos(g)*a;d=Math.sin(g)*a;e.moveTo(o-s,n-d);e.lineTo(o+s,n+d);e.moveTo(o+d,n-s);e.lineTo(o-d,n+s);break;case"line":s=Math.cos(g)*a;d=Math.sin(g)*a;e.moveTo(o-s,n-d);e.lineTo(o+s,n+d);break;case"dash":e.moveTo(o,n);e.lineTo(o+Math.cos(g)*a,n+Math.sin(g)*a);break;}e.fill();e.stroke()},_isPointInArea:function _isPointInArea(e,t){var a=1e-6;return e.x>t.left-a&&e.x<t.right+a&&e.y>t.top-a&&e.y<t.bottom+a},clipArea:function clipArea(e,t){e.save();e.beginPath();e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top);e.clip()},unclipArea:function unclipArea(e){e.restore()},lineTo:function lineTo(e,t,a,i){var o=a.steppedLine;if(o){if("middle"===o){var n=(t.x+a.x)/2;e.lineTo(n,i?a.y:t.y);e.lineTo(n,i?t.y:a.y)}else if("after"===o&&!i||"after"!==o&&i){e.lineTo(t.x,a.y)}else{e.lineTo(a.x,t.y)}e.lineTo(a.x,a.y);return}if(!a.tension){e.lineTo(a.x,a.y);return}e.bezierCurveTo(i?t.controlPointPreviousX:t.controlPointNextX,i?t.controlPointPreviousY:t.controlPointNextY,i?a.controlPointNextX:a.controlPointPreviousX,i?a.controlPointNextY:a.controlPointPreviousY,a.x,a.y)}};ma.clear=ba.clear;ma.drawRoundedRectangle=function(e){e.beginPath();ba.roundedRect.apply(ba,arguments)};var xa={_set:function _set(e,t){return ma.merge(this[e]||(this[e]={}),t)}};xa._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});var _a=xa,ka=ma.valueOrDefault;function b(e){if(!e||ma.isNullOrUndef(e.size)||ma.isNullOrUndef(e.family)){return null}return(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}var va={_factorize:function _factorize(e){var t=[],a=Math.sqrt(e),o;for(o=1;o<a;o++){if(0==e%o){t.push(o);t.push(e/o)}}if(a===(0|a)){t.push(a)}t.sort(function(e,t){return e-t}).pop();return t},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,a=Math.round(t),i=e===Math.pow(10,a);return i?a:t}};ma.log10=va.log10;var wa=function(e,t){return{x:function x(a){return e+e+t-a},setWidth:function setWidth(e){t=e},textAlign:function textAlign(e){if("center"===e){return e}return"right"===e?"left":"right"},xPlus:function xPlus(e,t){return e-t},leftForLtr:function leftForLtr(e,t){return e-t}}},Sa=function(){return{x:function x(e){return e},setWidth:function setWidth(){},textAlign:function textAlign(e){return e},xPlus:function xPlus(e,t){return e+t},leftForLtr:function leftForLtr(e){return e}}},Da=ma;Da.easing={effects:ua};Da.canvas=ba;Da.options={toLineHeight:function toLineHeight(e,t){var a=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!a||"normal"===a[1]){return 1.2*t}e=+a[2];switch(a[3]){case"px":return e;case"%":e/=100;break;}return t*e},toPadding:function toPadding(e){var a,i,o,n;if(ma.isObject(e)){a=+e.top||0;i=+e.right||0;o=+e.bottom||0;n=+e.left||0}else{a=i=o=n=+e||0}return{top:a,right:i,bottom:o,left:n,height:a+o,width:n+i}},_parseFont:function _parseFont(e){var t=_a.global,a=ka(e.fontSize,t.defaultFontSize),i={family:ka(e.fontFamily,t.defaultFontFamily),lineHeight:ma.options.toLineHeight(ka(e.lineHeight,t.defaultLineHeight),a),size:a,style:ka(e.fontStyle,t.defaultFontStyle),weight:null,string:""};i.string=b(i);return i},resolve:function(e,t,a,o){var n=!0,r,l,s;for(r=0,l=e.length;r<l;++r){s=e[r];if(s===void 0){continue}if(t!==void 0&&"function"==typeof s){s=s(t);n=!1}if(a!==void 0&&ma.isArray(s)){s=s[a];n=!1}if(s!==void 0){if(o&&!n){o.cacheable=!1}return s}}}};Da.math=va;Da.rtl={getRtlAdapter:function getAdapter(e,t,a){return e?wa(t,a):Sa()},overrideTextDirection:function overrideTextDirection(e,t){var a,i;if("ltr"===t||"rtl"===t){a=e.canvas.style;i=[a.getPropertyValue("direction"),a.getPropertyPriority("direction")];a.setProperty("direction",t,"important");e.prevTextDirection=i}},restoreTextDirection:function restoreTextDirection(e){var t=e.prevTextDirection;if(t!==void 0){delete e.prevTextDirection;e.canvas.style.setProperty("direction",t[0],t[1])}}};function x(e,t,a,o){var n=Object.keys(a),r,l,s,d,c,h,g,m,u;for(r=0,l=n.length;r<l;++r){s=n[r];h=a[s];if(!t.hasOwnProperty(s)){t[s]=h}d=t[s];if(d===h||"_"===s[0]){continue}if(!e.hasOwnProperty(s)){e[s]=d}c=e[s];g=_typeof(h);if(g===_typeof(c)){if("string"===g){m=ha(c);if(m.valid){u=ha(h);if(u.valid){t[s]=u.mix(m,o).rgbString();continue}}}else if(Da.isFinite(c)&&Da.isFinite(h)){t[s]=c+(h-c)*o;continue}}t[s]=h}}var Ca=function(e){Da.extend(this,e);this.initialize.apply(this,arguments)};Da.extend(Ca.prototype,{_type:void 0,initialize:function initialize(){this.hidden=!1},pivot:function pivot(){var e=this;if(!e._view){e._view=Da.extend({},e._model)}e._start={};return e},transition:function transition(e){var t=this,a=t._model,i=t._start,o=t._view;if(!a||1===e){t._view=Da.extend({},a);t._start=null;return t}if(!o){o=t._view={}}if(!i){i=t._start={}}x(i,o,a,e);return t},tooltipPosition:function tooltipPosition(){return{x:this._model.x,y:this._model.y}},hasValue:function hasValue(){return Da.isNumber(this._model.x)&&Da.isNumber(this._model.y)}});Ca.extend=Da.inherits;var Pa=Ca,Ta=Pa.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Oa=Ta;Object.defineProperty(Ta.prototype,"animationObject",{get:function get(){return this}});Object.defineProperty(Ta.prototype,"chartInstance",{get:function get(){return this.chart},set:function set(e){this.chart=e}});_a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:Da.noop,onComplete:Da.noop}});var Aa={animations:[],request:null,addAnimation:function addAnimation(e,t,a,o){var n=this.animations,r,l;t.chart=e;t.startTime=Date.now();t.duration=a;if(!o){e.animating=!0}for(r=0,l=n.length;r<l;++r){if(n[r].chart===e){n[r]=t;return}}n.push(t);if(1===n.length){this.requestAnimationFrame()}},cancelAnimation:function cancelAnimation(e){var t=Da.findIndex(this.animations,function(t){return t.chart===e});if(-1!==t){this.animations.splice(t,1);e.animating=!1}},requestAnimationFrame:function requestAnimationFrame(){var e=this;if(null===e.request){e.request=Da.requestAnimFrame.call(window,function(){e.request=null;e.startDigest()})}},startDigest:function startDigest(){var e=this;e.advance();if(0<e.animations.length){e.requestAnimationFrame()}},advance:function advance(){var e=this.animations,t,a,o,n,r=0;while(r<e.length){t=e[r];a=t.chart;o=t.numSteps;n=Math.floor((Date.now()-t.startTime)/t.duration*o)+1;t.currentStep=Math.min(n,o);Da.callback(t.render,[a,t],a);Da.callback(t.onAnimationProgress,[t],a);if(t.currentStep>=o){Da.callback(t.onAnimationComplete,[t],a);a.animating=!1;e.splice(r,1)}else{++r}}}},Ma=Da.options.resolve,Ia=["push","pop","shift","splice","unshift"];function _(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}});Ia.forEach(function(t){var a="onData"+t.charAt(0).toUpperCase()+t.slice(1),i=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function value(){var t=Array.prototype.slice.call(arguments),o=i.apply(this,t);Da.each(e._chartjs.listeners,function(e){if("function"==typeof e[a]){e[a].apply(e,t)}});return o}})})}function v(e,t){var a=e._chartjs;if(!a){return}var i=a.listeners,o=i.indexOf(t);if(-1!==o){i.splice(o,1)}if(0<i.length){return}Ia.forEach(function(t){delete e[t]});delete e._chartjs}var La=function(e,t){this.initialize(e,t)};Da.extend(La.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function initialize(e,t){var a=this;a.chart=e;a.index=t;a.linkScales();a.addElements();a._type=a.getMeta().type},updateIndex:function updateIndex(e){this.index=e},linkScales:function linkScales(){var e=this,t=e.getMeta(),a=e.chart,i=a.scales,o=e.getDataset(),n=a.options.scales;if(null===t.xAxisID||!(t.xAxisID in i)||o.xAxisID){t.xAxisID=o.xAxisID||n.xAxes[0].id}if(null===t.yAxisID||!(t.yAxisID in i)||o.yAxisID){t.yAxisID=o.yAxisID||n.yAxes[0].id}},getDataset:function getDataset(){return this.chart.data.datasets[this.index]},getMeta:function getMeta(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function getScaleForId(e){return this.chart.scales[e]},_getValueScaleId:function _getValueScaleId(){return this.getMeta().yAxisID},_getIndexScaleId:function _getIndexScaleId(){return this.getMeta().xAxisID},_getValueScale:function _getValueScale(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function _getIndexScale(){return this.getScaleForId(this._getIndexScaleId())},reset:function reset(){this._update(!0)},destroy:function destroy(){if(this._data){v(this._data,this)}},createMetaDataset:function createMetaDataset(){var e=this,t=e.datasetElementType;return t&&new t({_chart:e.chart,_datasetIndex:e.index})},createMetaData:function createMetaData(e){var t=this,a=t.dataElementType;return a&&new a({_chart:t.chart,_datasetIndex:t.index,_index:e})},addElements:function addElements(){var e=this,t=e.getMeta(),a=e.getDataset().data||[],o=t.data,n,r;for(n=0,r=a.length;n<r;++n){o[n]=o[n]||e.createMetaData(n)}t.dataset=t.dataset||e.createMetaDataset()},addElementAndReset:function addElementAndReset(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t);this.updateElement(t,e,!0)},buildOrUpdateElements:function buildOrUpdateElements(){var e=this,t=e.getDataset(),a=t.data||(t.data=[]);if(e._data!==a){if(e._data){v(e._data,e)}if(a&&Object.isExtensible(a)){_(a,e)}e._data=a}e.resyncElements()},_configure:function _configure(){var e=this;e._config=Da.merge(Object.create(null),[e.chart.options.datasets[e._type],e.getDataset()],{merger:function merger(e,t,a){if("_meta"!==e&&"data"!==e){Da._merger(e,t,a)}}})},_update:function _update(e){var t=this;t._configure();t._cachedDataOpts=null;t.update(e)},update:Da.noop,transition:function transition(e){var t=this.getMeta(),a=t.data||[],o=a.length,n=0;for(;n<o;++n){a[n].transition(e)}if(t.dataset){t.dataset.transition(e)}},draw:function draw(){var e=this.getMeta(),t=e.data||[],a=t.length,o=0;if(e.dataset){e.dataset.draw()}for(;o<a;++o){t[o].draw()}},getStyle:function getStyle(e){var t=this,a=t.getMeta(),i=a.dataset,o;t._configure();if(i&&e===void 0){o=t._resolveDatasetElementOptions(i||{})}else{e=e||0;o=t._resolveDataElementOptions(a.data[e]||{},e)}if(!1===o.fill||null===o.fill){o.backgroundColor=o.borderColor}return o},_resolveDatasetElementOptions:function _resolveDatasetElementOptions(e,t){var a=this,o=a.chart,n=a._config,r=e.custom||{},l=o.options.elements[a.datasetElementType.prototype._type]||{},s=a._datasetElementOptions,d={},c,h,g,m,u={chart:o,dataset:a.getDataset(),datasetIndex:a.index,hover:t};for(c=0,h=s.length;c<h;++c){g=s[c];m=t?"hover"+g.charAt(0).toUpperCase()+g.slice(1):g;d[g]=Ma([r[m],n[m],l[m]],u)}return d},_resolveDataElementOptions:function _resolveDataElementOptions(e,t){var a=this,o=e&&e.custom,n=a._cachedDataOpts;if(n&&!o){return n}var r=a.chart,l=a._config,s=r.options.elements[a.dataElementType.prototype._type]||{},d=a._dataElementOptions,c={},h={chart:r,dataIndex:t,dataset:a.getDataset(),datasetIndex:a.index},g={cacheable:!o},m,u,p,f;o=o||{};if(Da.isArray(d)){for(u=0,p=d.length;u<p;++u){f=d[u];c[f]=Ma([o[f],l[f],s[f]],h,t,g)}}else{m=Object.keys(d);for(u=0,p=m.length;u<p;++u){f=m[u];c[f]=Ma([o[f],l[d[f]],l[f],s[f]],h,t,g)}}if(g.cacheable){a._cachedDataOpts=Object.freeze(c)}return c},removeHoverStyle:function removeHoverStyle(e){Da.merge(e._model,e.$previousStyle||{});delete e.$previousStyle},setHoverStyle:function setHoverStyle(e){var t=this.chart.data.datasets[e._datasetIndex],a=e._index,i=e.custom||{},o=e._model,n=Da.getHoverColor;e.$previousStyle={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderWidth:o.borderWidth};o.backgroundColor=Ma([i.hoverBackgroundColor,t.hoverBackgroundColor,n(o.backgroundColor)],void 0,a);o.borderColor=Ma([i.hoverBorderColor,t.hoverBorderColor,n(o.borderColor)],void 0,a);o.borderWidth=Ma([i.hoverBorderWidth,t.hoverBorderWidth,o.borderWidth],void 0,a)},_removeDatasetHoverStyle:function _removeDatasetHoverStyle(){var e=this.getMeta().dataset;if(e){this.removeHoverStyle(e)}},_setDatasetHoverStyle:function _setDatasetHoverStyle(){var e=this.getMeta().dataset,t={},a,o,n,r,l,s;if(!e){return}s=e._model;l=this._resolveDatasetElementOptions(e,!0);r=Object.keys(l);for(a=0,o=r.length;a<o;++a){n=r[a];t[n]=s[n];s[n]=l[n]}e.$previousStyle=t},resyncElements:function resyncElements(){var e=this,t=e.getMeta(),a=e.getDataset().data,i=t.data.length,o=a.length;if(o<i){t.data.splice(o,i-o)}else if(o>i){e.insertElements(i,o-i)}},insertElements:function insertElements(e,t){for(var a=0;a<t;++a){this.addElementAndReset(e+a)}},onDataPush:function onDataPush(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function onDataPop(){this.getMeta().data.pop()},onDataShift:function onDataShift(){this.getMeta().data.shift()},onDataSplice:function onDataSplice(e,t){this.getMeta().data.splice(e,t);this.insertElements(e,arguments.length-2)},onDataUnshift:function onDataUnshift(){this.insertElements(0,arguments.length)}});La.extend=Da.inherits;var Fa=La,Ra=2*Math.PI;_a._set("global",{elements:{arc:{backgroundColor:_a.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});function w(e,t){var a=t.startAngle,i=t.endAngle,o=t.pixelMargin,n=o/t.outerRadius,r=t.x,l=t.y;e.beginPath();e.arc(r,l,t.outerRadius,a-n,i+n);if(t.innerRadius>o){n=o/t.innerRadius;e.arc(r,l,t.innerRadius-o,i+n,a-n,!0)}else{e.arc(r,l,o,i+Math.PI/2,a-Math.PI/2)}e.closePath();e.clip()}function S(e,t,a,o){var n=a.endAngle,r;if(o){a.endAngle=a.startAngle+Ra;w(e,a);a.endAngle=n;if(a.endAngle===a.startAngle&&a.fullCircles){a.endAngle+=Ra;a.fullCircles--}}e.beginPath();e.arc(a.x,a.y,a.innerRadius,a.startAngle+Ra,a.startAngle,!0);for(r=0;r<a.fullCircles;++r){e.stroke()}e.beginPath();e.arc(a.x,a.y,t.outerRadius,a.startAngle,a.startAngle+Ra);for(r=0;r<a.fullCircles;++r){e.stroke()}}function D(e,t,a){var i="inner"===t.borderAlign;if(i){e.lineWidth=2*t.borderWidth;e.lineJoin="round"}else{e.lineWidth=t.borderWidth;e.lineJoin="bevel"}if(a.fullCircles){S(e,t,a,i)}if(i){w(e,a)}e.beginPath();e.arc(a.x,a.y,t.outerRadius,a.startAngle,a.endAngle);e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0);e.closePath();e.stroke()}var Ea=Pa.extend({_type:"arc",inLabelRange:function inLabelRange(e){var t=this._view;if(t){return Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)}return!1},inRange:function inRange(e,t){var a=this._view;if(a){var i=Da.getAngleFromPoint(a,{x:e,y:t}),o=i.angle,n=i.distance,r=a.startAngle,l=a.endAngle;while(l<r){l+=Ra}while(o>l){o-=Ra}while(o<r){o+=Ra}var s=o>=r&&o<=l,d=n>=a.innerRadius&&n<=a.outerRadius;return s&&d}return!1},getCenterPoint:function getCenterPoint(){var e=this._view,t=(e.startAngle+e.endAngle)/2,a=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*a,y:e.y+Math.sin(t)*a}},getArea:function getArea(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function tooltipPosition(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,a=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*a,y:e.y+Math.sin(t)*a}},draw:function draw(){var e=this._chart.ctx,t=this._view,a="inner"===t.borderAlign?.33:0,o={x:t.x,y:t.y,innerRadius:t.innerRadius,outerRadius:Math.max(t.outerRadius-a,0),pixelMargin:a,startAngle:t.startAngle,endAngle:t.endAngle,fullCircles:Math.floor(t.circumference/Ra)},n;e.save();e.fillStyle=t.backgroundColor;e.strokeStyle=t.borderColor;if(o.fullCircles){o.endAngle=o.startAngle+Ra;e.beginPath();e.arc(o.x,o.y,o.outerRadius,o.startAngle,o.endAngle);e.arc(o.x,o.y,o.innerRadius,o.endAngle,o.startAngle,!0);e.closePath();for(n=0;n<o.fullCircles;++n){e.fill()}o.endAngle=o.startAngle+t.circumference%Ra}e.beginPath();e.arc(o.x,o.y,o.outerRadius,o.startAngle,o.endAngle);e.arc(o.x,o.y,o.innerRadius,o.endAngle,o.startAngle,!0);e.closePath();e.fill();if(t.borderWidth){D(e,t,o)}e.restore()}}),Ya=Da.valueOrDefault,Wa=_a.global.defaultColor;_a._set("global",{elements:{line:{tension:.4,backgroundColor:Wa,borderWidth:3,borderColor:Wa,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var za=Pa.extend({_type:"line",draw:function draw(){var e=this,t=e._view,a=e._chart.ctx,i=t.spanGaps,o=e._children.slice(),n=_a.global,r=n.elements.line,l=-1,s=e._loop,d,c,h;if(!o.length){return}if(e._loop){for(d=0;d<o.length;++d){c=Da.previousItem(o,d);if(!o[d]._view.skip&&c._view.skip){o=o.slice(d).concat(o.slice(0,d));s=i;break}}if(s){o.push(o[0])}}a.save();a.lineCap=t.borderCapStyle||r.borderCapStyle;if(a.setLineDash){a.setLineDash(t.borderDash||r.borderDash)}a.lineDashOffset=Ya(t.borderDashOffset,r.borderDashOffset);a.lineJoin=t.borderJoinStyle||r.borderJoinStyle;a.lineWidth=Ya(t.borderWidth,r.borderWidth);a.strokeStyle=t.borderColor||n.defaultColor;a.beginPath();h=o[0]._view;if(!h.skip){a.moveTo(h.x,h.y);l=0}for(d=1;d<o.length;++d){h=o[d]._view;c=-1===l?Da.previousItem(o,d):o[l];if(!h.skip){if(l!==d-1&&!i||-1===l){a.moveTo(h.x,h.y)}else{Da.canvas.lineTo(a,c._view,h)}l=d}}if(s){a.closePath()}a.stroke();a.restore()}}),Va=Da.valueOrDefault,Ha=_a.global.defaultColor;_a._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:Ha,borderColor:Ha,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});function C(e){var t=this._view;return t?Math.abs(e-t.x)<t.radius+t.hitRadius:!1}var Ba=Pa.extend({_type:"point",inRange:function inRange(e,t){var a=this._view;return a?Math.pow(e-a.x,2)+Math.pow(t-a.y,2)<Math.pow(a.hitRadius+a.radius,2):!1},inLabelRange:C,inXRange:C,inYRange:function(e){var t=this._view;return t?Math.abs(e-t.y)<t.radius+t.hitRadius:!1},getCenterPoint:function getCenterPoint(){var e=this._view;return{x:e.x,y:e.y}},getArea:function getArea(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function tooltipPosition(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function draw(e){var t=this._view,a=this._chart.ctx,i=t.pointStyle,o=t.rotation,n=t.radius,r=t.x,l=t.y,s=_a.global,d=s.defaultColor;if(t.skip){return}if(e===void 0||Da.canvas._isPointInArea(t,e)){a.strokeStyle=t.borderColor||d;a.lineWidth=Va(t.borderWidth,s.elements.point.borderWidth);a.fillStyle=t.backgroundColor||d;Da.canvas.drawPoint(a,i,n,r,l,o)}}}),Na=_a.global.defaultColor;_a._set("global",{elements:{rectangle:{backgroundColor:Na,borderColor:Na,borderSkipped:"bottom",borderWidth:0}}});function P(e){return e&&e.width!==void 0}function T(e){var t,a,i,o,n;if(P(e)){n=e.width/2;t=e.x-n;a=e.x+n;i=Math.min(e.y,e.base);o=Math.max(e.y,e.base)}else{n=e.height/2;t=Math.min(e.x,e.base);a=Math.max(e.x,e.base);i=e.y-n;o=e.y+n}return{left:t,top:i,right:a,bottom:o}}function O(e,t,a){return e===t?a:e===a?t:e}function A(e){var t=e.borderSkipped,a={};if(!t){return a}if(e.horizontal){if(e.base>e.x){t=O(t,"left","right")}}else if(e.base<e.y){t=O(t,"bottom","top")}a[t]=!0;return a}function M(e,a,i){var o=e.borderWidth,n=A(e),s,d,c,h;if(Da.isObject(o)){s=+o.top||0;d=+o.right||0;c=+o.bottom||0;h=+o.left||0}else{s=d=c=h=+o||0}return{t:n.top||0>s?0:s>i?i:s,r:n.right||0>d?0:d>a?a:d,b:n.bottom||0>c?0:c>i?i:c,l:n.left||0>h?0:h>a?a:h}}function I(e){var t=T(e),a=t.right-t.left,i=t.bottom-t.top,o=M(e,a/2,i/2);return{outer:{x:t.left,y:t.top,w:a,h:i},inner:{x:t.left+o.l,y:t.top+o.t,w:a-o.l-o.r,h:i-o.t-o.b}}}function L(e,t,a){var i=null===t,o=null===a,n=!e||i&&o?!1:T(e);return n&&(i||t>=n.left&&t<=n.right)&&(o||a>=n.top&&a<=n.bottom)}var Ua=Pa.extend({_type:"rectangle",draw:function draw(){var e=this._chart.ctx,t=this._view,a=I(t),i=a.outer,o=a.inner;e.fillStyle=t.backgroundColor;e.fillRect(i.x,i.y,i.w,i.h);if(i.w===o.w&&i.h===o.h){return}e.save();e.beginPath();e.rect(i.x,i.y,i.w,i.h);e.clip();e.fillStyle=t.borderColor;e.rect(o.x,o.y,o.w,o.h);e.fill("evenodd");e.restore()},height:function height(){var e=this._view;return e.base-e.y},inRange:function inRange(e,t){return L(this._view,e,t)},inLabelRange:function inLabelRange(e,t){var a=this._view;return P(a)?L(a,e,null):L(a,null,t)},inXRange:function inXRange(e){return L(this._view,e,null)},inYRange:function inYRange(e){return L(this._view,null,e)},getCenterPoint:function getCenterPoint(){var e=this._view,t,a;if(P(e)){t=e.x;a=(e.y+e.base)/2}else{t=(e.x+e.base)/2;a=e.y}return{x:t,y:a}},getArea:function getArea(){var e=this._view;return P(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function tooltipPosition(){var e=this._view;return{x:e.x,y:e.y}}}),ja={};ja.Arc=Ea;ja.Line=za;ja.Point=Ba;ja.Rectangle=Ua;var Ga=Da._deprecated,qa=Da.valueOrDefault;_a._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}});_a._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});function F(e,t){var a=e._length,o,n,r,l;for(r=1,l=t.length;r<l;++r){a=Math.min(a,Math.abs(t[r]-t[r-1]))}for(r=0,l=e.getTicks().length;r<l;++r){n=e.getPixelForTick(r);a=0<r?Math.min(a,Math.abs(n-o)):a;o=n}return a}function R(e,t,a){var i=a.barThickness,o=t.stackCount,n=t.pixels[e],r=Da.isNullOrUndef(i)?F(t.scale,t.pixels):-1,l,s;if(Da.isNullOrUndef(i)){l=r*a.categoryPercentage;s=a.barPercentage}else{l=i*o;s=1}return{chunk:l/o,ratio:s,start:n-l/2}}function E(e,t,a){var i=t.pixels,o=i[e],n=0<e?i[e-1]:null,r=e<i.length-1?i[e+1]:null,l=a.categoryPercentage,s,d;if(null===n){n=o-(null===r?t.end-t.start:r-o)}if(null===r){r=o+o-n}s=o-(o-Math.min(n,r))/2*l;d=Math.abs(r-n)/2*l;return{chunk:d/t.stackCount,ratio:a.barPercentage,start:s}}var Ka=Fa.extend({dataElementType:ja.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function initialize(){var e=this,t,a;Fa.prototype.initialize.apply(e,arguments);t=e.getMeta();t.stack=e.getDataset().stack;t.bar=!0;a=e._getIndexScale().options;Ga("bar chart",a.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage");Ga("bar chart",a.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness");Ga("bar chart",a.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage");Ga("bar chart",e._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength");Ga("bar chart",a.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function update(e){var t=this,a=t.getMeta().data,o,n;t._ruler=t.getRuler();for(o=0,n=a.length;o<n;++o){t.updateElement(a[o],o,e)}},updateElement:function updateElement(e,t,a){var i=this,o=i.getMeta(),n=i.getDataset(),r=i._resolveDataElementOptions(e,t);e._xScale=i.getScaleForId(o.xAxisID);e._yScale=i.getScaleForId(o.yAxisID);e._datasetIndex=i.index;e._index=t;e._model={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderSkipped:r.borderSkipped,borderWidth:r.borderWidth,datasetLabel:n.label,label:i.chart.data.labels[t]};if(Da.isArray(n.data[t])){e._model.borderSkipped=null}i._updateElementGeometry(e,t,a,r);e.pivot()},_updateElementGeometry:function _updateElementGeometry(e,t,a,i){var o=this,n=e._model,r=o._getValueScale(),l=r.getBasePixel(),s=r.isHorizontal(),d=o._ruler||o.getRuler(),c=o.calculateBarValuePixels(o.index,t,i),h=o.calculateBarIndexPixels(o.index,t,d,i);n.horizontal=s;n.base=a?l:c.base;n.x=s?a?l:c.head:h.center;n.y=s?h.center:a?l:c.head;n.height=s?h.size:void 0;n.width=s?void 0:h.size},_getStacks:function _getStacks(e){var t=this,a=t._getIndexScale(),o=a._getMatchingVisibleMetas(t._type),n=a.options.stacked,r=o.length,l=[],s,d;for(s=0;s<r;++s){d=o[s];if(!1===n||-1===l.indexOf(d.stack)||n===void 0&&d.stack===void 0){l.push(d.stack)}if(d.index===e){break}}return l},getStackCount:function getStackCount(){return this._getStacks().length},getStackIndex:function getStackIndex(e,t){var a=this._getStacks(e),i=t!==void 0?a.indexOf(t):-1;return-1===i?a.length-1:i},getRuler:function getRuler(){var e=this,t=e._getIndexScale(),a=[],o,n;for(o=0,n=e.getMeta().data.length;o<n;++o){a.push(t.getPixelForValue(null,o,e.index))}return{pixels:a,start:t._startPixel,end:t._endPixel,stackCount:e.getStackCount(),scale:t}},calculateBarValuePixels:function calculateBarValuePixels(e,t,a){var o=this,n=o.chart,r=o._getValueScale(),l=r.isHorizontal(),s=n.data.datasets,d=r._getMatchingVisibleMetas(o._type),c=r._parseValue(s[e].data[t]),h=a.minBarLength,g=r.options.stacked,m=o.getMeta().stack,u=c.start===void 0?0:0<=c.max&&0<=c.min?c.min:c.max,p=c.start===void 0?c.end:0<=c.max&&0<=c.min?c.max-c.min:c.min-c.max,f=d.length,y,b,x,_,k,v,w;if(g||g===void 0&&m!==void 0){for(y=0;y<f;++y){b=d[y];if(b.index===e){break}if(b.stack===m){w=r._parseValue(s[b.index].data[t]);x=w.start===void 0?w.end:0<=w.min&&0<=w.max?w.max:w.min;if(0>c.min&&0>x||0<=c.max&&0<x){u+=x}}}}_=r.getPixelForValue(u);k=r.getPixelForValue(u+p);v=k-_;if(h!==void 0&&Math.abs(v)<h){v=h;if(0<=p&&!l||0>p&&l){k=_-h}else{k=_+h}}return{size:v,base:_,head:k,center:k+v/2}},calculateBarIndexPixels:function calculateBarIndexPixels(e,t,a,i){var o=this,n="flex"===i.barThickness?E(t,a,i):R(t,a,i),r=o.getStackIndex(e,o.getMeta().stack),l=n.start+n.chunk*r+n.chunk/2,s=Math.min(qa(i.maxBarThickness,1/0),n.chunk*n.ratio);return{base:l-s/2,head:l+s/2,center:l,size:s}},draw:function draw(){var e=this,t=e.chart,a=e._getValueScale(),o=e.getMeta().data,n=e.getDataset(),r=o.length,l=0;Da.canvas.clipArea(t.ctx,t.chartArea);for(;l<r;++l){var s=a._parseValue(n.data[l]);if(!isNaN(s.min)&&!isNaN(s.max)){o[l].draw()}}Da.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function _resolveDataElementOptions(){var e=this,t=Da.extend({},Fa.prototype._resolveDataElementOptions.apply(e,arguments)),a=e._getIndexScale().options,i=e._getValueScale().options;t.barPercentage=qa(a.barPercentage,t.barPercentage);t.barThickness=qa(a.barThickness,t.barThickness);t.categoryPercentage=qa(a.categoryPercentage,t.categoryPercentage);t.maxBarThickness=qa(a.maxBarThickness,t.maxBarThickness);t.minBarLength=qa(i.minBarLength,t.minBarLength);return t}}),Xa=Da.valueOrDefault,Za=Da.options.resolve;_a._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 title(){return""},label:function label(e,t){var a=t.datasets[e.datasetIndex].label||"",i=t.datasets[e.datasetIndex].data[e.index];return a+": ("+e.xLabel+", "+e.yLabel+", "+i.r+")"}}}});var Ja=Fa.extend({dataElementType:ja.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function update(e){var t=this,a=t.getMeta(),i=a.data;Da.each(i,function(a,i){t.updateElement(a,i,e)})},updateElement:function updateElement(e,t,a){var i=this,o=i.getMeta(),n=e.custom||{},r=i.getScaleForId(o.xAxisID),l=i.getScaleForId(o.yAxisID),s=i._resolveDataElementOptions(e,t),d=i.getDataset().data[t],c=i.index,h=a?r.getPixelForDecimal(.5):r.getPixelForValue("object"===_typeof(d)?d:NaN,t,c),g=a?l.getBasePixel():l.getPixelForValue(d,t,c);e._xScale=r;e._yScale=l;e._options=s;e._datasetIndex=c;e._index=t;e._model={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,hitRadius:s.hitRadius,pointStyle:s.pointStyle,rotation:s.rotation,radius:a?0:s.radius,skip:n.skip||isNaN(h)||isNaN(g),x:h,y:g};e.pivot()},setHoverStyle:function setHoverStyle(e){var t=e._model,a=e._options,i=Da.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius};t.backgroundColor=Xa(a.hoverBackgroundColor,i(a.backgroundColor));t.borderColor=Xa(a.hoverBorderColor,i(a.borderColor));t.borderWidth=Xa(a.hoverBorderWidth,a.borderWidth);t.radius=a.radius+a.hoverRadius},_resolveDataElementOptions:function _resolveDataElementOptions(e,t){var a=this,i=a.chart,o=a.getDataset(),n=e.custom||{},r=o.data[t]||{},l=Fa.prototype._resolveDataElementOptions.apply(a,arguments),s={chart:i,dataIndex:t,dataset:o,datasetIndex:a.index};if(a._cachedDataOpts===l){l=Da.extend({},l)}l.radius=Za([n.radius,r.r,a._config.radius,i.options.elements.point.radius],s,t);return l}}),Qa=Da.valueOrDefault,$a=Math.PI,ei=2*$a,ti=$a/2;_a._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function legendCallback(e){var t=document.createElement("ul"),a=e.data,o=a.datasets,n=a.labels,r,l,s,d;t.setAttribute("class",e.id+"-legend");if(o.length){for(r=0,l=o[0].data.length;r<l;++r){s=t.appendChild(document.createElement("li"));d=s.appendChild(document.createElement("span"));d.style.backgroundColor=o[0].backgroundColor[r];if(n[r]){s.appendChild(document.createTextNode(n[r]))}}}return t.outerHTML},legend:{labels:{generateLabels:function generateLabels(e){var t=e.data;if(t.labels.length&&t.datasets.length){return t.labels.map(function(a,o){var i=e.getDatasetMeta(0),n=i.controller.getStyle(o);return{text:a,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:isNaN(t.datasets[0].data[o])||i.data[o].hidden,index:o}})}return[]}},onClick:function onClick(t,e){var a=e.index,o=this.chart,n,r,l;for(n=0,r=(o.data.datasets||[]).length;n<r;++n){l=o.getDatasetMeta(n);if(l.data[a]){l.data[a].hidden=!l.data[a].hidden}}o.update()}},cutoutPercentage:50,rotation:-ti,circumference:ei,tooltips:{callbacks:{title:function title(){return""},label:function label(e,t){var a=t.labels[e.index],i=": "+t.datasets[e.datasetIndex].data[e.index];if(Da.isArray(a)){a=a.slice();a[0]+=i}else{a+=i}return a}}}});var ai=Fa.extend({dataElementType:ja.Arc,linkScales:Da.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function getRingIndex(e){for(var t=0,a=0;a<e;++a){if(this.chart.isDatasetVisible(a)){++t}}return t},update:function update(e){var t=this,a=t.chart,o=a.chartArea,n=a.options,r=1,l=1,s=0,d=0,c=t.getMeta(),h=c.data,g=n.cutoutPercentage/100||0,m=n.circumference,u=t._getRingWeight(t.index),p,f,y,b;if(m<ei){var x=n.rotation%ei;x+=x>=$a?-ei:x<-$a?ei:0;var _=x+m,k=Math.cos(x),v=Math.sin(x),w=Math.cos(_),S=Math.sin(_),D=0>=x&&0<=_||_>=ei,C=x<=ti&&_>=ti||_>=ei+ti,P=x===-$a||_>=$a,T=x<=-ti&&_>=-ti||_>=$a+ti,O=P?-1:Math.min(k,k*g,w,w*g),A=T?-1:Math.min(v,v*g,S,S*g),M=D?1:Math.max(k,k*g,w,w*g),I=C?1:Math.max(v,v*g,S,S*g);r=(M-O)/2;l=(I-A)/2;s=-(M+O)/2;d=-(I+A)/2}for(y=0,b=h.length;y<b;++y){h[y]._options=t._resolveDataElementOptions(h[y],y)}a.borderWidth=t.getMaxBorderWidth();p=(o.right-o.left-a.borderWidth)/r;f=(o.bottom-o.top-a.borderWidth)/l;a.outerRadius=Math.max(Math.min(p,f)/2,0);a.innerRadius=Math.max(a.outerRadius*g,0);a.radiusLength=(a.outerRadius-a.innerRadius)/(t._getVisibleDatasetWeightTotal()||1);a.offsetX=s*a.outerRadius;a.offsetY=d*a.outerRadius;c.total=t.calculateTotal();t.outerRadius=a.outerRadius-a.radiusLength*t._getRingWeightOffset(t.index);t.innerRadius=Math.max(t.outerRadius-a.radiusLength*u,0);for(y=0,b=h.length;y<b;++y){t.updateElement(h[y],y,e)}},updateElement:function updateElement(e,t,a){var i=this,o=i.chart,n=o.chartArea,r=o.options,l=r.animation,s=(n.left+n.right)/2,d=(n.top+n.bottom)/2,c=r.rotation,h=r.rotation,g=i.getDataset(),m=a&&l.animateRotate?0:e.hidden?0:i.calculateCircumference(g.data[t])*(r.circumference/ei),u=a&&l.animateScale?0:i.innerRadius,p=a&&l.animateScale?0:i.outerRadius,f=e._options||{};Da.extend(e,{_datasetIndex:i.index,_index:t,_model:{backgroundColor:f.backgroundColor,borderColor:f.borderColor,borderWidth:f.borderWidth,borderAlign:f.borderAlign,x:s+o.offsetX,y:d+o.offsetY,startAngle:c,endAngle:h,circumference:m,outerRadius:p,innerRadius:u,label:Da.valueAtIndexOrDefault(g.label,t,o.data.labels[t])}});var y=e._model;if(!a||!l.animateRotate){if(0===t){y.startAngle=r.rotation}else{y.startAngle=i.getMeta().data[t-1]._model.endAngle}y.endAngle=y.startAngle+y.circumference}e.pivot()},calculateTotal:function calculateTotal(){var e=this.getDataset(),t=this.getMeta(),a=0,i;Da.each(t.data,function(t,o){i=e.data[o];if(!isNaN(i)&&!t.hidden){a+=Math.abs(i)}});return a},calculateCircumference:function calculateCircumference(e){var t=this.getMeta().total;if(0<t&&!isNaN(e)){return ei*(Math.abs(e)/t)}return 0},getMaxBorderWidth:function getMaxBorderWidth(e){var t=this,a=0,o=t.chart,n,r,l,s,d,c,h,g;if(!e){for(n=0,r=o.data.datasets.length;n<r;++n){if(o.isDatasetVisible(n)){l=o.getDatasetMeta(n);e=l.data;if(n!==t.index){d=l.controller}break}}}if(!e){return 0}for(n=0,r=e.length;n<r;++n){s=e[n];if(d){d._configure();c=d._resolveDataElementOptions(s,n)}else{c=s._options}if("inner"!==c.borderAlign){h=c.borderWidth;g=c.hoverBorderWidth;a=h>a?h:a;a=g>a?g:a}}return a},setHoverStyle:function setHoverStyle(e){var t=e._model,a=e._options,i=Da.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth};t.backgroundColor=Qa(a.hoverBackgroundColor,i(a.backgroundColor));t.borderColor=Qa(a.hoverBorderColor,i(a.borderColor));t.borderWidth=Qa(a.hoverBorderWidth,a.borderWidth)},_getRingWeightOffset:function _getRingWeightOffset(e){for(var t=0,a=0;a<e;++a){if(this.chart.isDatasetVisible(a)){t+=this._getRingWeight(a)}}return t},_getRingWeight:function _getRingWeight(e){return Math.max(Qa(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function _getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});_a._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"}});_a._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var ii=Ka.extend({_getValueScaleId:function _getValueScaleId(){return this.getMeta().xAxisID},_getIndexScaleId:function _getIndexScaleId(){return this.getMeta().yAxisID}}),oi=Da.valueOrDefault,ni=Da.options.resolve,ri=Da.canvas._isPointInArea;_a._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});function Y(e,t){var a=e&&e.options.ticks||{},i=a.reverse,o=a.min===void 0?t:0,n=a.max===void 0?t:0;return{start:i?n:o,end:i?o:n}}function W(e,t,a){var i=a/2,o=Y(e,i),n=Y(t,i);return{top:n.end,right:o.end,bottom:n.start,left:o.start}}function z(e){var a,i,o,n;if(Da.isObject(e)){a=e.top;i=e.right;o=e.bottom;n=e.left}else{a=i=o=n=e}return{top:a,right:i,bottom:o,left:n}}var li=Fa.extend({datasetElementType:ja.Line,dataElementType:ja.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 update(e){var t=this,a=t.getMeta(),o=a.dataset,n=a.data||[],r=t.chart.options,l=t._config,s=t._showLine=oi(l.showLine,r.showLines),d,c;t._xScale=t.getScaleForId(a.xAxisID);t._yScale=t.getScaleForId(a.yAxisID);if(s){if(l.tension!==void 0&&l.lineTension===void 0){l.lineTension=l.tension}o._scale=t._yScale;o._datasetIndex=t.index;o._children=n;o._model=t._resolveDatasetElementOptions(o);o.pivot()}for(d=0,c=n.length;d<c;++d){t.updateElement(n[d],d,e)}if(s&&0!==o._model.tension){t.updateBezierControlPoints()}for(d=0,c=n.length;d<c;++d){n[d].pivot()}},updateElement:function updateElement(e,t,a){var i=this,o=i.getMeta(),n=e.custom||{},r=i.getDataset(),l=i.index,s=r.data[t],d=i._xScale,c=i._yScale,h=o.dataset._model,g,m,u=i._resolveDataElementOptions(e,t);g=d.getPixelForValue("object"===_typeof(s)?s:NaN,t,l);m=a?c.getBasePixel():i.calculatePointY(s,t,l);e._xScale=d;e._yScale=c;e._options=u;e._datasetIndex=l;e._index=t;e._model={x:g,y:m,skip:n.skip||isNaN(g)||isNaN(m),radius:u.radius,pointStyle:u.pointStyle,rotation:u.rotation,backgroundColor:u.backgroundColor,borderColor:u.borderColor,borderWidth:u.borderWidth,tension:oi(n.tension,h?h.tension:0),steppedLine:h?h.steppedLine:!1,hitRadius:u.hitRadius}},_resolveDatasetElementOptions:function _resolveDatasetElementOptions(e){var t=this,a=t._config,i=e.custom||{},o=t.chart.options,n=o.elements.line,r=Fa.prototype._resolveDatasetElementOptions.apply(t,arguments);r.spanGaps=oi(a.spanGaps,o.spanGaps);r.tension=oi(a.lineTension,n.tension);r.steppedLine=ni([i.steppedLine,a.steppedLine,n.stepped]);r.clip=z(oi(a.clip,W(t._xScale,t._yScale,r.borderWidth)));return r},calculatePointY:function calculatePointY(e,t,a){var o=this,n=o.chart,r=o._yScale,l=0,s=0,d,c,h,g,m,u,p;if(r.options.stacked){m=+r.getRightValue(e);u=n._getSortedVisibleDatasetMetas();p=u.length;for(d=0;d<p;++d){h=u[d];if(h.index===a){break}c=n.data.datasets[h.index];if("line"===h.type&&h.yAxisID===r.id){g=+r.getRightValue(c.data[t]);if(0>g){s+=g||0}else{l+=g||0}}}if(0>m){return r.getPixelForValue(s+m)}return r.getPixelForValue(l+m)}return r.getPixelForValue(e)},updateBezierControlPoints:function updateBezierControlPoints(){var t=this,a=t.chart,o=t.getMeta(),n=o.dataset._model,r=a.chartArea,l=o.data||[],s,d,c,h;if(n.spanGaps){l=l.filter(function(e){return!e._model.skip})}function e(e,t,a){return Math.max(Math.min(e,a),t)}if("monotone"===n.cubicInterpolationMode){Da.splineCurveMonotone(l)}else{for(s=0,d=l.length;s<d;++s){c=l[s]._model;h=Da.splineCurve(Da.previousItem(l,s)._model,c,Da.nextItem(l,s)._model,n.tension);c.controlPointPreviousX=h.previous.x;c.controlPointPreviousY=h.previous.y;c.controlPointNextX=h.next.x;c.controlPointNextY=h.next.y}}if(a.options.elements.line.capBezierPoints){for(s=0,d=l.length;s<d;++s){c=l[s]._model;if(ri(c,r)){if(0<s&&ri(l[s-1]._model,r)){c.controlPointPreviousX=e(c.controlPointPreviousX,r.left,r.right);c.controlPointPreviousY=e(c.controlPointPreviousY,r.top,r.bottom)}if(s<l.length-1&&ri(l[s+1]._model,r)){c.controlPointNextX=e(c.controlPointNextX,r.left,r.right);c.controlPointNextY=e(c.controlPointNextY,r.top,r.bottom)}}}}},draw:function draw(){var e=this,t=e.chart,a=e.getMeta(),o=a.data||[],n=t.chartArea,r=t.canvas,l=0,s=o.length,d;if(e._showLine){d=a.dataset._model.clip;Da.canvas.clipArea(t.ctx,{left:!1===d.left?0:n.left-d.left,right:!1===d.right?r.width:n.right+d.right,top:!1===d.top?0:n.top-d.top,bottom:!1===d.bottom?r.height:n.bottom+d.bottom});a.dataset.draw();Da.canvas.unclipArea(t.ctx)}for(;l<s;++l){o[l].draw(n)}},setHoverStyle:function setHoverStyle(e){var t=e._model,a=e._options,i=Da.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius};t.backgroundColor=oi(a.hoverBackgroundColor,i(a.backgroundColor));t.borderColor=oi(a.hoverBorderColor,i(a.borderColor));t.borderWidth=oi(a.hoverBorderWidth,a.borderWidth);t.radius=oi(a.hoverRadius,a.radius)}}),si=Da.options.resolve;_a._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 legendCallback(e){var t=document.createElement("ul"),a=e.data,o=a.datasets,n=a.labels,r,l,s,d;t.setAttribute("class",e.id+"-legend");if(o.length){for(r=0,l=o[0].data.length;r<l;++r){s=t.appendChild(document.createElement("li"));d=s.appendChild(document.createElement("span"));d.style.backgroundColor=o[0].backgroundColor[r];if(n[r]){s.appendChild(document.createTextNode(n[r]))}}}return t.outerHTML},legend:{labels:{generateLabels:function generateLabels(e){var t=e.data;if(t.labels.length&&t.datasets.length){return t.labels.map(function(a,o){var i=e.getDatasetMeta(0),n=i.controller.getStyle(o);return{text:a,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:isNaN(t.datasets[0].data[o])||i.data[o].hidden,index:o}})}return[]}},onClick:function onClick(t,e){var a=e.index,o=this.chart,n,r,l;for(n=0,r=(o.data.datasets||[]).length;n<r;++n){l=o.getDatasetMeta(n);l.data[a].hidden=!l.data[a].hidden}o.update()}},tooltips:{callbacks:{title:function title(){return""},label:function label(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var di=Fa.extend({dataElementType:ja.Arc,linkScales:Da.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function _getIndexScaleId(){return this.chart.scale.id},_getValueScaleId:function _getValueScaleId(){return this.chart.scale.id},update:function update(e){var t=this,a=t.getDataset(),o=t.getMeta(),n=t.chart.options.startAngle||0,r=t._starts=[],l=t._angles=[],s=o.data,d,c,h;t._updateRadius();o.count=t.countVisibleElements();for(d=0,c=a.data.length;d<c;d++){r[d]=n;h=t._computeAngle(d);l[d]=h;n+=h}for(d=0,c=s.length;d<c;++d){s[d]._options=t._resolveDataElementOptions(s[d],d);t.updateElement(s[d],d,e)}},_updateRadius:function _updateRadius(){var e=this,t=e.chart,a=t.chartArea,i=t.options,o=Math.min(a.right-a.left,a.bottom-a.top);t.outerRadius=Math.max(o/2,0);t.innerRadius=Math.max(i.cutoutPercentage?t.outerRadius/100*i.cutoutPercentage:1,0);t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount();e.outerRadius=t.outerRadius-t.radiusLength*e.index;e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function updateElement(e,t,a){var i=this,o=i.chart,n=i.getDataset(),r=o.options,l=r.animation,s=o.scale,d=o.data.labels,c=s.xCenter,h=s.yCenter,g=r.startAngle,m=e.hidden?0:s.getDistanceFromCenterForValue(n.data[t]),u=i._starts[t],p=u+(e.hidden?0:i._angles[t]),f=l.animateScale?0:s.getDistanceFromCenterForValue(n.data[t]),y=e._options||{};Da.extend(e,{_datasetIndex:i.index,_index:t,_scale:s,_model:{backgroundColor:y.backgroundColor,borderColor:y.borderColor,borderWidth:y.borderWidth,borderAlign:y.borderAlign,x:c,y:h,innerRadius:0,outerRadius:a?f:m,startAngle:a&&l.animateRotate?g:u,endAngle:a&&l.animateRotate?g:p,label:Da.valueAtIndexOrDefault(d,t,d[t])}});e.pivot()},countVisibleElements:function countVisibleElements(){var e=this.getDataset(),t=this.getMeta(),a=0;Da.each(t.data,function(t,i){if(!isNaN(e.data[i])&&!t.hidden){a++}});return a},setHoverStyle:function setHoverStyle(e){var t=e._model,a=e._options,i=Da.getHoverColor,o=Da.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth};t.backgroundColor=o(a.hoverBackgroundColor,i(a.backgroundColor));t.borderColor=o(a.hoverBorderColor,i(a.borderColor));t.borderWidth=o(a.hoverBorderWidth,a.borderWidth)},_computeAngle:function _computeAngle(e){var t=this,a=this.getMeta().count,i=t.getDataset(),o=t.getMeta();if(isNaN(i.data[e])||o.data[e].hidden){return 0}var n={chart:t.chart,dataIndex:e,dataset:i,datasetIndex:t.index};return si([t.chart.options.elements.arc.angle,2*Math.PI/a],n,e)}});_a._set("pie",Da.clone(_a.doughnut));_a._set("pie",{cutoutPercentage:0});var ci=Da.valueOrDefault;_a._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var hi=Fa.extend({datasetElementType:ja.Line,dataElementType:ja.Point,linkScales:Da.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 _getIndexScaleId(){return this.chart.scale.id},_getValueScaleId:function _getValueScaleId(){return this.chart.scale.id},update:function update(e){var t=this,a=t.getMeta(),o=a.dataset,n=a.data||[],r=t.chart.scale,l=t._config,s,d;if(l.tension!==void 0&&l.lineTension===void 0){l.lineTension=l.tension}o._scale=r;o._datasetIndex=t.index;o._children=n;o._loop=!0;o._model=t._resolveDatasetElementOptions(o);o.pivot();for(s=0,d=n.length;s<d;++s){t.updateElement(n[s],s,e)}t.updateBezierControlPoints();for(s=0,d=n.length;s<d;++s){n[s].pivot()}},updateElement:function updateElement(e,t,a){var i=this,o=e.custom||{},n=i.getDataset(),r=i.chart.scale,l=r.getPointPositionForValue(t,n.data[t]),s=i._resolveDataElementOptions(e,t),d=i.getMeta().dataset._model,c=a?r.xCenter:l.x,h=a?r.yCenter:l.y;e._scale=r;e._options=s;e._datasetIndex=i.index;e._index=t;e._model={x:c,y:h,skip:o.skip||isNaN(c)||isNaN(h),radius:s.radius,pointStyle:s.pointStyle,rotation:s.rotation,backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,tension:ci(o.tension,d?d.tension:0),hitRadius:s.hitRadius}},_resolveDatasetElementOptions:function _resolveDatasetElementOptions(){var e=this,t=e._config,a=e.chart.options,i=Fa.prototype._resolveDatasetElementOptions.apply(e,arguments);i.spanGaps=ci(t.spanGaps,a.spanGaps);i.tension=ci(t.lineTension,a.elements.line.tension);return i},updateBezierControlPoints:function updateBezierControlPoints(){var t=this,a=t.getMeta(),o=t.chart.chartArea,n=a.data||[],r,l,s,d;if(a.dataset._model.spanGaps){n=n.filter(function(e){return!e._model.skip})}function e(e,t,a){return Math.max(Math.min(e,a),t)}for(r=0,l=n.length;r<l;++r){s=n[r]._model;d=Da.splineCurve(Da.previousItem(n,r,!0)._model,s,Da.nextItem(n,r,!0)._model,s.tension);s.controlPointPreviousX=e(d.previous.x,o.left,o.right);s.controlPointPreviousY=e(d.previous.y,o.top,o.bottom);s.controlPointNextX=e(d.next.x,o.left,o.right);s.controlPointNextY=e(d.next.y,o.top,o.bottom)}},setHoverStyle:function setHoverStyle(e){var t=e._model,a=e._options,i=Da.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius};t.backgroundColor=ci(a.hoverBackgroundColor,i(a.backgroundColor));t.borderColor=ci(a.hoverBorderColor,i(a.borderColor));t.borderWidth=ci(a.hoverBorderWidth,a.borderWidth);t.radius=ci(a.hoverRadius,a.radius)}});_a._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 title(){return""},label:function label(e){return"("+e.xLabel+", "+e.yLabel+")"}}}});_a._set("global",{datasets:{scatter:{showLine:!1}}});var gi={bar:Ka,bubble:Ja,doughnut:ai,horizontalBar:ii,line:li,polarArea:di,pie:ai,radar:hi,scatter:li};function V(t,e){if(t.native){return{x:t.x,y:t.y}}return Da.getRelativePosition(t,e)}function H(e,t){var a=e._getSortedVisibleDatasetMetas(),o,n,r,l,s,d;for(n=0,l=a.length;n<l;++n){o=a[n].data;for(r=0,s=o.length;r<s;++r){d=o[r];if(!d._view.skip){t(d)}}}}function B(e,t){var a=[];H(e,function(e){if(e.inRange(t.x,t.y)){a.push(e)}});return a}function N(e,t,a,i){var o=Number.POSITIVE_INFINITY,n=[];H(e,function(e){if(a&&!e.inRange(t.x,t.y)){return}var r=e.getCenterPoint(),l=i(t,r);if(l<o){n=[e];o=l}else if(l===o){n.push(e)}});return n}function U(e){var t=-1!==e.indexOf("x"),a=-1!==e.indexOf("y");return function(e,i){var o=t?Math.abs(e.x-i.x):0,n=a?Math.abs(e.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(n,2))}}function j(t,a,e){var i=V(a,t);e.axis=e.axis||"x";var o=U(e.axis),n=e.intersect?B(t,i):N(t,i,!1,o),r=[];if(!n.length){return[]}t._getSortedVisibleDatasetMetas().forEach(function(e){var t=e.data[n[0]._index];if(t&&!t._view.skip){r.push(t)}});return r}var mi={modes:{single:function single(t,a){var e=V(a,t),i=[];H(t,function(t){if(t.inRange(e.x,e.y)){i.push(t);return i}});return i.slice(0,1)},label:j,index:j,dataset:function dataset(t,a,e){var i=V(a,t);e.axis=e.axis||"xy";var o=U(e.axis),n=e.intersect?B(t,i):N(t,i,!1,o);if(0<n.length){n=t.getDatasetMeta(n[0]._datasetIndex).data}return n},"x-axis":function xAxis(t,a){return j(t,a,{intersect:!1})},point:function point(t,a){var e=V(a,t);return B(t,e)},nearest:function nearest(t,a,e){var i=V(a,t);e.axis=e.axis||"xy";var o=U(e.axis);return N(t,i,e.intersect,o)},x:function x(t,a,e){var i=V(a,t),o=[],n=!1;H(t,function(e){if(e.inXRange(i.x)){o.push(e)}if(e.inRange(i.x,i.y)){n=!0}});if(e.intersect&&!n){o=[]}return o},y:function y(t,a,e){var i=V(a,t),o=[],n=!1;H(t,function(e){if(e.inYRange(i.y)){o.push(e)}if(e.inRange(i.x,i.y)){n=!0}});if(e.intersect&&!n){o=[]}return o}}},ui=Da.extend;function G(e,t){return Da.where(e,function(e){return e.pos===t})}function q(e,t){return e.sort(function(e,a){var i=t?a:e,o=t?e:a;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function K(e){var t=[],a,o,n;for(a=0,o=(e||[]).length;a<o;++a){n=e[a];t.push({index:a,box:n,pos:n.position,horizontal:n.isHorizontal(),weight:n.weight})}return t}function X(e,t){var a,o,n;for(a=0,o=e.length;a<o;++a){n=e[a];n.width=n.horizontal?n.box.fullWidth&&t.availableWidth:t.vBoxMaxWidth;n.height=n.horizontal&&t.hBoxMaxHeight}}function Z(e){var t=K(e),a=q(G(t,"left"),!0),i=q(G(t,"right")),o=q(G(t,"top"),!0),n=q(G(t,"bottom"));return{leftAndTop:a.concat(o),rightAndBottom:i.concat(n),chartArea:G(t,"chartArea"),vertical:a.concat(i),horizontal:o.concat(n)}}function J(e,t,i,a){return Math.max(e[i],t[i])+Math.max(e[a],t[a])}function Q(e,t,a){var i=a.box,o=e.maxPadding,n,r;if(a.size){e[a.pos]-=a.size}a.size=a.horizontal?i.height:i.width;e[a.pos]+=a.size;if(i.getPadding){var l=i.getPadding();o.top=Math.max(o.top,l.top);o.left=Math.max(o.left,l.left);o.bottom=Math.max(o.bottom,l.bottom);o.right=Math.max(o.right,l.right)}n=t.outerWidth-J(o,e,"left","right");r=t.outerHeight-J(o,e,"top","bottom");if(n!==e.w||r!==e.h){e.w=n;e.h=r;var s=a.horizontal?[n,e.w]:[r,e.h];return s[0]!==s[1]&&(!isNaN(s[0])||!isNaN(s[1]))}}function $(e){var a=e.maxPadding;function t(t){var i=Math.max(a[t]-e[t],0);e[t]+=i;return i}e.y+=t("top");e.x+=t("left");t("right");t("bottom")}function ee(e,t){var i=t.maxPadding;function a(e){var a={left:0,top:0,right:0,bottom:0};e.forEach(function(e){a[e]=Math.max(t[e],i[e])});return a}return e?a(["left","right"]):a(["top","bottom"])}function te(e,t,a){var o=[],n,r,l,s,d,c;for(n=0,r=e.length;n<r;++n){l=e[n];s=l.box;s.update(l.width||t.w,l.height||t.h,ee(l.horizontal,t));if(Q(t,a,l)){c=!0;if(o.length){d=!0}}if(!s.fullWidth){o.push(l)}}return d?te(o,t,a)||c:c}function ae(e,t,a){var o=a.padding,n=t.x,r=t.y,l,s,d,c;for(l=0,s=e.length;l<s;++l){d=e[l];c=d.box;if(d.horizontal){c.left=c.fullWidth?o.left:t.left;c.right=c.fullWidth?a.outerWidth-o.right:t.left+t.w;c.top=r;c.bottom=r+c.height;c.width=c.right-c.left;r=c.bottom}else{c.left=n;c.right=n+c.width;c.top=t.top;c.bottom=t.top+t.h;c.height=c.bottom-c.top;n=c.right}}t.x=n;t.y=r}_a._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var pi={defaults:{},addBox:function addBox(e,t){if(!e.boxes){e.boxes=[]}t.fullWidth=t.fullWidth||!1;t.position=t.position||"top";t.weight=t.weight||0;t._layers=t._layers||function(){return[{z:0,draw:function draw(){t.draw.apply(t,arguments)}}]};e.boxes.push(t)},removeBox:function removeBox(e,t){var a=e.boxes?e.boxes.indexOf(t):-1;if(-1!==a){e.boxes.splice(a,1)}},configure:function configure(e,t,a){var o=["fullWidth","position","weight"],n=o.length,r=0,l;for(;r<n;++r){l=o[r];if(a.hasOwnProperty(l)){t[l]=a[l]}}},update:function update(e,t,a){if(!e){return}var i=e.options.layout||{},o=Da.options.toPadding(i.padding),n=t-o.width,r=a-o.height,l=Z(e.boxes),s=l.vertical,d=l.horizontal,c=Object.freeze({outerWidth:t,outerHeight:a,padding:o,availableWidth:n,vBoxMaxWidth:n/2/s.length,hBoxMaxHeight:r/2}),h=ui({maxPadding:ui({},o),w:n,h:r,x:o.left,y:o.top},o);X(s.concat(d),c);te(s,h,c);if(te(d,h,c)){te(s,h,c)}$(h);ae(l.leftAndTop,h,c);h.x+=h.w;h.y+=h.h;ae(l.rightAndBottom,h,c);e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h};Da.each(l.chartArea,function(t){var a=t.box;ui(a,e.chartArea);a.update(h.w,h.h)})}},fi=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}),yi=function(e){return e&&e["default"]||e}(fi),bi="$chartjs",xi="chartjs-",_i=xi+"size-monitor",ki=xi+"render-monitor",vi=["animationstart","webkitAnimationStart"],wi={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ie(e,t){var a=Da.getStyle(e,t),i=a&&a.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function oe(e,t){var a=e.style,i=e.getAttribute("height"),o=e.getAttribute("width");e[bi]={initial:{height:i,width:o,style:{display:a.display,height:a.height,width:a.width}}};a.display=a.display||"block";if(null===o||""===o){var n=ie(e,"width");if(n!==void 0){e.width=n}}if(null===i||""===i){if(""===e.style.height){e.height=e.width/(t.options.aspectRatio||2)}else{var r=ie(e,"height");if(n!==void 0){e.height=r}}}return e}var Si=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function get(){e=!0}});window.addEventListener("e",null,t)}catch(t){}return e}(),Di=Si?{passive:!0}:!1;function ne(e,t,a){e.addEventListener(t,a,Di)}function re(e,t,a){e.removeEventListener(t,a,Di)}function le(e,t,a,i,o){return{type:e,chart:t,native:o||null,x:a!==void 0?a:null,y:i!==void 0?i:null}}function se(e,t){var a=wi[e.type]||e.type,i=Da.getRelativePosition(e,t);return le(a,t,i.x,i.y,e)}function de(e,t){var a=!1,i=[];return function(){i=Array.prototype.slice.call(arguments);t=t||this;if(!a){a=!0;Da.requestAnimFrame.call(window,function(){a=!1;e.apply(t,i)})}}}function ce(e){var t=document.createElement("div");t.className=e||"";return t}function he(e){var t=ce(_i),a=ce(_i+"-expand"),i=ce(_i+"-shrink");a.appendChild(ce());i.appendChild(ce());t.appendChild(a);t.appendChild(i);t._reset=function(){a.scrollLeft=1000000;a.scrollTop=1000000;i.scrollLeft=1000000;i.scrollTop=1000000};var o=function(){t._reset();e()};ne(a,"scroll",o.bind(a,"expand"));ne(i,"scroll",o.bind(i,"shrink"));return t}function ge(e,t){var a=e[bi]||(e[bi]={}),i=a.renderProxy=function(a){if(a.animationName===xi+"render-animation"){t()}};Da.each(vi,function(t){ne(e,t,i)});a.reflow=!!e.offsetParent;e.classList.add(ki)}function me(e){var t=e[bi]||{},a=t.renderProxy;if(a){Da.each(vi,function(t){re(e,t,a)});delete t.renderProxy}e.classList.remove(ki)}function ue(e,t,a){var i=e[bi]||(e[bi]={}),o=i.resizer=he(de(function(){if(i.resizer){var o=a.options.maintainAspectRatio&&e.parentNode,n=o?o.clientWidth:0;t(le("resize",a));if(o&&o.clientWidth<n&&a.canvas){t(le("resize",a))}}}));ge(e,function(){if(i.resizer){var t=e.parentNode;if(t&&t!==o.parentNode){t.insertBefore(o,t.firstChild)}o._reset()}})}function pe(e){var t=e[bi]||{},a=t.resizer;delete t.resizer;me(e);if(a&&a.parentNode){a.parentNode.removeChild(a)}}function fe(e,t){var a=e[bi]||(e[bi]={});if(!a.containsStyles){a.containsStyles=!0;t="/* Chart.js */\n"+t;var i=document.createElement("style");i.setAttribute("type","text/css");i.appendChild(document.createTextNode(t));e.appendChild(i)}}var Ci={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function _ensureLoaded(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document,a=t.host?t:document.head;fe(a,yi)}},acquireContext:function acquireContext(e,t){if("string"==typeof e){e=document.getElementById(e)}else if(e.length){e=e[0]}if(e&&e.canvas){e=e.canvas}var a=e&&e.getContext&&e.getContext("2d");if(a&&a.canvas===e){this._ensureLoaded(e);oe(e,t);return a}return null},releaseContext:function releaseContext(e){var t=e.canvas;if(!t[bi]){return}var a=t[bi].initial;["height","width"].forEach(function(e){var i=a[e];if(Da.isNullOrUndef(i)){t.removeAttribute(e)}else{t.setAttribute(e,i)}});Da.each(a.style||{},function(e,a){t.style[a]=e});t.width=t.width;delete t[bi]},addEventListener:function addEventListener(e,t,a){var i=e.canvas;if("resize"===t){ue(i,a,e);return}var o=a[bi]||(a[bi]={}),n=o.proxies||(o.proxies={}),r=n[e.id+"_"+t]=function(t){a(se(t,e))};ne(i,t,r)},removeEventListener:function removeEventListener(e,t,a){var i=e.canvas;if("resize"===t){pe(i);return}var o=a[bi]||{},n=o.proxies||{},r=n[e.id+"_"+t];if(!r){return}re(i,t,r)}};Da.addEvent=ne;Da.removeEvent=re;var Pi=Ci._enabled?Ci:{acquireContext:function acquireContext(e){if(e&&e.canvas){e=e.canvas}return e&&e.getContext("2d")||null}},Ti=Da.extend({initialize:function initialize(){},acquireContext:function acquireContext(){},releaseContext:function releaseContext(){},addEventListener:function addEventListener(){},removeEventListener:function removeEventListener(){}},Pi);_a._set("global",{plugins:{}});var Oi={_plugins:[],_cacheId:0,register:function register(e){var t=this._plugins;[].concat(e).forEach(function(e){if(-1===t.indexOf(e)){t.push(e)}});this._cacheId++},unregister:function unregister(e){var t=this._plugins;[].concat(e).forEach(function(e){var a=t.indexOf(e);if(-1!==a){t.splice(a,1)}});this._cacheId++},clear:function clear(){this._plugins=[];this._cacheId++},count:function count(){return this._plugins.length},getAll:function getAll(){return this._plugins},notify:function notify(e,t,a){var o=this.descriptors(e),n=o.length,r,l,s,d,c;for(r=0;r<n;++r){l=o[r];s=l.plugin;c=s[t];if("function"==typeof c){d=[e].concat(a||[]);d.push(l.options);if(!1===c.apply(s,d)){return!1}}}return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId){return t.descriptors}var a=[],i=[],o=e&&e.config||{},n=o.options&&o.options.plugins||{};this._plugins.concat(o.plugins||[]).forEach(function(e){var t=a.indexOf(e);if(-1!==t){return}var o=e.id,r=n[o];if(!1===r){return}if(!0===r){r=Da.clone(_a.global.plugins[o])}a.push(e);i.push({plugin:e,options:r||{}})});t.descriptors=i;t.id=this._cacheId;return i},_invalidate:function _invalidate(e){delete e.$plugins}},Ai={constructors:{},defaults:{},registerScaleType:function registerScaleType(e,t,a){this.constructors[e]=t;this.defaults[e]=Da.clone(a)},getScaleConstructor:function getScaleConstructor(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function getScaleDefaults(e){return this.defaults.hasOwnProperty(e)?Da.merge(Object.create(null),[_a.scale,this.defaults[e]]):{}},updateScaleDefaults:function updateScaleDefaults(e,t){var a=this;if(a.defaults.hasOwnProperty(e)){a.defaults[e]=Da.extend(a.defaults[e],t)}},addScalesToLayout:function addScalesToLayout(e){Da.each(e.scales,function(t){t.fullWidth=t.options.fullWidth;t.position=t.options.position;t.weight=t.options.weight;pi.addBox(e,t)})}},Mi=Da.valueOrDefault,Ii=Da.rtl.getRtlAdapter;_a._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:Da.noop,title:function(e,t){var a="",i=t.labels,o=i?i.length:0;if(0<e.length){var n=e[0];if(n.label){a=n.label}else if(n.xLabel){a=n.xLabel}else if(0<o&&n.index<o){a=i[n.index]}}return a},afterTitle:Da.noop,beforeBody:Da.noop,beforeLabel:Da.noop,label:function(e,t){var a=t.datasets[e.datasetIndex].label||"";if(a){a+=": "}if(!Da.isNullOrUndef(e.value)){a+=e.value}else{a+=e.yLabel}return a},labelColor:function labelColor(e,t){var a=t.getDatasetMeta(e.datasetIndex),i=a.data[e.index],o=i._view;return{borderColor:o.borderColor,backgroundColor:o.backgroundColor}},labelTextColor:function labelTextColor(){return this._options.bodyFontColor},afterLabel:Da.noop,afterBody:Da.noop,beforeFooter:Da.noop,footer:Da.noop,afterFooter:Da.noop}}});var Li={average:function average(e){if(!e.length){return!1}var t,a,o=0,n=0,r=0;for(t=0,a=e.length;t<a;++t){var l=e[t];if(l&&l.hasValue()){var s=l.tooltipPosition();o+=s.x;n+=s.y;++r}}return{x:o/r,y:n/r}},nearest:function nearest(e,t){var a=t.x,o=t.y,n=Number.POSITIVE_INFINITY,r,l,s;for(r=0,l=e.length;r<l;++r){var c=e[r];if(c&&c.hasValue()){var h=c.getCenterPoint(),g=Da.distanceBetweenPoints(t,h);if(g<n){n=g;s=c}}}if(s){var d=s.tooltipPosition();a=d.x;o=d.y}return{x:a,y:o}}};function ye(e,t){if(t){if(Da.isArray(t)){Array.prototype.push.apply(e,t)}else{e.push(t)}}return e}function be(e){if(("string"==typeof e||e instanceof String)&&-1<e.indexOf("\n")){return e.split("\n")}return e}function xe(e){var t=e._xScale,a=e._yScale||e._scale,i=e._index,o=e._datasetIndex,n=e._chart.getDatasetMeta(o).controller,r=n._getIndexScale(),l=n._getValueScale();return{xLabel:t?t.getLabelForIndex(i,o):"",yLabel:a?a.getLabelForIndex(i,o):"",label:r?""+r.getLabelForIndex(i,o):"",value:l?""+l.getLabelForIndex(i,o):"",index:i,datasetIndex:o,x:e._model.x,y:e._model.y}}function _e(e){var t=_a.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Mi(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Mi(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Mi(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Mi(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Mi(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Mi(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Mi(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Mi(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Mi(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function ke(e,t){var a=e._chart.ctx,i=2*t.yPadding,o=0,n=t.body,r=n.reduce(function(e,t){return e+t.before.length+t.lines.length+t.after.length},0);r+=t.beforeBody.length+t.afterBody.length;var l=t.title.length,s=t.footer.length,d=t.titleFontSize,c=t.bodyFontSize,h=t.footerFontSize;i+=l*d;i+=l?(l-1)*t.titleSpacing:0;i+=l?t.titleMarginBottom:0;i+=r*c;i+=r?(r-1)*t.bodySpacing:0;i+=s?t.footerMarginTop:0;i+=s*h;i+=s?(s-1)*t.footerSpacing:0;var g=0,m=function(e){o=Math.max(o,a.measureText(e).width+g)};a.font=Da.fontString(d,t._titleFontStyle,t._titleFontFamily);Da.each(t.title,m);a.font=Da.fontString(c,t._bodyFontStyle,t._bodyFontFamily);Da.each(t.beforeBody.concat(t.afterBody),m);g=t.displayColors?c+2:0;Da.each(n,function(e){Da.each(e.before,m);Da.each(e.lines,m);Da.each(e.after,m)});g=0;a.font=Da.fontString(h,t._footerFontStyle,t._footerFontFamily);Da.each(t.footer,m);o+=2*t.xPadding;return{width:o,height:i}}function ve(e,t){var a=e._model,i=e._chart,o=e._chart.chartArea,n="center",r="center";if(a.y<t.height){r="top"}else if(a.y>i.height-t.height){r="bottom"}var l,s,d,c,h,g=(o.left+o.right)/2,m=(o.top+o.bottom)/2;if("center"===r){l=function(e){return e<=g};s=function(e){return e>g}}else{l=function(e){return e<=t.width/2};s=function(e){return e>=i.width-t.width/2}}d=function(e){return e+t.width+a.caretSize+a.caretPadding>i.width};c=function(e){return 0>e-t.width-a.caretSize-a.caretPadding};h=function(e){return e<=m?"top":"bottom"};if(l(a.x)){n="left";if(d(a.x)){n="center";r=h(a.y)}}else if(s(a.x)){n="right";if(c(a.x)){n="center";r=h(a.y)}}var u=e._options;return{xAlign:u.xAlign?u.xAlign:n,yAlign:u.yAlign?u.yAlign:r}}function we(e,t,a,i){var o=e.x,n=e.y,r=e.caretSize,l=e.caretPadding,s=e.cornerRadius,d=a.xAlign,c=a.yAlign,h=r+l,g=s+l;if("right"===d){o-=t.width}else if("center"===d){o-=t.width/2;if(o+t.width>i.width){o=i.width-t.width}if(0>o){o=0}}if("top"===c){n+=h}else if("bottom"===c){n-=t.height+h}else{n-=t.height/2}if("center"===c){if("left"===d){o+=h}else if("right"===d){o-=h}}else if("left"===d){o-=g}else if("right"===d){o+=g}return{x:o,y:n}}function Se(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function De(e){return ye([],be(e))}var Fi=Pa.extend({initialize:function initialize(){this._model=_e(this._options);this._lastActive=[]},getTitle:function getTitle(){var e=this,t=e._options,a=t.callbacks,i=a.beforeTitle.apply(e,arguments),o=a.title.apply(e,arguments),n=a.afterTitle.apply(e,arguments),r=[];r=ye(r,be(i));r=ye(r,be(o));r=ye(r,be(n));return r},getBeforeBody:function getBeforeBody(){return De(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function getBody(e,t){var a=this,i=a._options.callbacks,o=[];Da.each(e,function(e){var n={before:[],lines:[],after:[]};ye(n.before,be(i.beforeLabel.call(a,e,t)));ye(n.lines,i.label.call(a,e,t));ye(n.after,be(i.afterLabel.call(a,e,t)));o.push(n)});return o},getAfterBody:function getAfterBody(){return De(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function getFooter(){var e=this,t=e._options.callbacks,a=t.beforeFooter.apply(e,arguments),i=t.footer.apply(e,arguments),o=t.afterFooter.apply(e,arguments),n=[];n=ye(n,be(a));n=ye(n,be(i));n=ye(n,be(o));return n},update:function update(e){var t=this,o=t._options,n=t._model,r=t._model=_e(o),l=t._active,s=t._data,d={xAlign:n.xAlign,yAlign:n.yAlign},c={x:n.x,y:n.y},h={width:n.width,height:n.height},g={x:n.caretX,y:n.caretY},m,a;if(l.length){r.opacity=1;var u=[],p=[];g=Li[o.position].call(t,l,t._eventPosition);var f=[];for(m=0,a=l.length;m<a;++m){f.push(xe(l[m]))}if(o.filter){f=f.filter(function(e){return o.filter(e,s)})}if(o.itemSort){f=f.sort(function(e,t){return o.itemSort(e,t,s)})}Da.each(f,function(e){u.push(o.callbacks.labelColor.call(t,e,t._chart));p.push(o.callbacks.labelTextColor.call(t,e,t._chart))});r.title=t.getTitle(f,s);r.beforeBody=t.getBeforeBody(f,s);r.body=t.getBody(f,s);r.afterBody=t.getAfterBody(f,s);r.footer=t.getFooter(f,s);r.x=g.x;r.y=g.y;r.caretPadding=o.caretPadding;r.labelColors=u;r.labelTextColors=p;r.dataPoints=f;h=ke(this,r);d=ve(this,h);c=we(r,h,d,t._chart)}else{r.opacity=0}r.xAlign=d.xAlign;r.yAlign=d.yAlign;r.x=c.x;r.y=c.y;r.width=h.width;r.height=h.height;r.caretX=g.x;r.caretY=g.y;t._model=r;if(e&&o.custom){o.custom.call(t,r)}return t},drawCaret:function drawCaret(e,t){var a=this._chart.ctx,i=this._view,o=this.getCaretPosition(e,t,i);a.lineTo(o.x1,o.y1);a.lineTo(o.x2,o.y2);a.lineTo(o.x3,o.y3)},getCaretPosition:function getCaretPosition(e,t,a){var i,o,n,r,l,s,d=a.caretSize,c=a.cornerRadius,h=a.xAlign,g=a.yAlign,m=e.x,u=e.y,p=t.width,f=t.height;if("center"===g){l=u+f/2;if("left"===h){i=m;o=i-d;n=i;r=l+d;s=l-d}else{i=m+p;o=i+d;n=i;r=l-d;s=l+d}}else{if("left"===h){o=m+c+d;i=o-d;n=o+d}else if("right"===h){o=m+p-c-d;i=o-d;n=o+d}else{o=a.caretX;i=o-d;n=o+d}if("top"===g){r=u;l=r-d;s=r}else{r=u+f;l=r+d;s=r;var y=n;n=i;i=y}}return{x1:i,x2:o,x3:n,y1:r,y2:l,y3:s}},drawTitle:function drawTitle(e,t,a){var o=t.title,n=o.length,r,l,s;if(n){var d=Ii(t.rtl,t.x,t.width);e.x=Se(t,t._titleAlign);a.textAlign=d.textAlign(t._titleAlign);a.textBaseline="middle";r=t.titleFontSize;l=t.titleSpacing;a.fillStyle=t.titleFontColor;a.font=Da.fontString(r,t._titleFontStyle,t._titleFontFamily);for(s=0;s<n;++s){a.fillText(o[s],d.x(e.x),e.y+r/2);e.y+=r+l;if(s+1===n){e.y+=t.titleMarginBottom-l}}}},drawBody:function drawBody(e,t,a){var o=t.bodyFontSize,n=t.bodySpacing,r=t._bodyAlign,l=t.body,s=t.displayColors,d=0,c=s?Se(t,"left"):0,h=Ii(t.rtl,t.x,t.width),g=function(t){a.fillText(t,h.x(e.x+d),e.y+o/2);e.y+=o+n},m,u,p,f,y,b,x,_,k=h.textAlign(r);a.textAlign=r;a.textBaseline="middle";a.font=Da.fontString(o,t._bodyFontStyle,t._bodyFontFamily);e.x=Se(t,k);a.fillStyle=t.bodyFontColor;Da.each(t.beforeBody,g);d=s&&"right"!==k?"center"===r?o/2+1:o+2:0;for(y=0,x=l.length;y<x;++y){m=l[y];u=t.labelTextColors[y];p=t.labelColors[y];a.fillStyle=u;Da.each(m.before,g);f=m.lines;for(b=0,_=f.length;b<_;++b){if(s){var v=h.x(c);a.fillStyle=t.legendColorBackground;a.fillRect(h.leftForLtr(v,o),e.y,o,o);a.lineWidth=1;a.strokeStyle=p.borderColor;a.strokeRect(h.leftForLtr(v,o),e.y,o,o);a.fillStyle=p.backgroundColor;a.fillRect(h.leftForLtr(h.xPlus(v,1),o-2),e.y+1,o-2,o-2);a.fillStyle=u}g(f[b])}Da.each(m.after,g)}d=0;Da.each(t.afterBody,g);e.y-=n},drawFooter:function drawFooter(e,t,a){var o=t.footer,n=o.length,r,l;if(n){var s=Ii(t.rtl,t.x,t.width);e.x=Se(t,t._footerAlign);e.y+=t.footerMarginTop;a.textAlign=s.textAlign(t._footerAlign);a.textBaseline="middle";r=t.footerFontSize;a.fillStyle=t.footerFontColor;a.font=Da.fontString(r,t._footerFontStyle,t._footerFontFamily);for(l=0;l<n;++l){a.fillText(o[l],s.x(e.x),e.y+r/2);e.y+=r+t.footerSpacing}}},drawBackground:function drawBackground(e,t,a,i){a.fillStyle=t.backgroundColor;a.strokeStyle=t.borderColor;a.lineWidth=t.borderWidth;var o=t.xAlign,n=t.yAlign,r=e.x,l=e.y,s=i.width,d=i.height,c=t.cornerRadius;a.beginPath();a.moveTo(r+c,l);if("top"===n){this.drawCaret(e,i)}a.lineTo(r+s-c,l);a.quadraticCurveTo(r+s,l,r+s,l+c);if("center"===n&&"right"===o){this.drawCaret(e,i)}a.lineTo(r+s,l+d-c);a.quadraticCurveTo(r+s,l+d,r+s-c,l+d);if("bottom"===n){this.drawCaret(e,i)}a.lineTo(r+c,l+d);a.quadraticCurveTo(r,l+d,r,l+d-c);if("center"===n&&"left"===o){this.drawCaret(e,i)}a.lineTo(r,l+c);a.quadraticCurveTo(r,l,r+c,l);a.closePath();a.fill();if(0<t.borderWidth){a.stroke()}},draw:function draw(){var e=this._chart.ctx,t=this._view;if(0===t.opacity){return}var a={width:t.width,height:t.height},i={x:t.x,y:t.y},o=Math.abs(1e-3>t.opacity)?0:t.opacity,n=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;if(this._options.enabled&&n){e.save();e.globalAlpha=o;this.drawBackground(i,t,e,a);i.y+=t.yPadding;Da.rtl.overrideTextDirection(e,t.textDirection);this.drawTitle(i,t,e);this.drawBody(i,t,e);this.drawFooter(i,t,e);Da.rtl.restoreTextDirection(e,t.textDirection);e.restore()}},handleEvent:function handleEvent(t){var e=this,a=e._options,i=!1;e._lastActive=e._lastActive||[];if("mouseout"===t.type){e._active=[]}else{e._active=e._chart.getElementsAtEventForMode(t,a.mode,a);if(a.reverse){e._active.reverse()}}i=!Da.arrayEquals(e._active,e._lastActive);if(i){e._lastActive=e._active;if(a.enabled||a.custom){e._eventPosition={x:t.x,y:t.y};e.update(!0);e.pivot()}}return i}}),Ri=Fi;Ri.positioners=Li;var Ei=Da.valueOrDefault;_a._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});function Ce(){return Da.merge(Object.create(null),[].slice.call(arguments),{merger:function merger(e,t,a,o){if("xAxes"===e||"yAxes"===e){var n=a[e].length,r,l,s;if(!t[e]){t[e]=[]}for(r=0;r<n;++r){s=a[e][r];l=Ei(s.type,"xAxes"===e?"category":"linear");if(r>=t[e].length){t[e].push({})}if(!t[e][r].type||s.type&&s.type!==t[e][r].type){Da.merge(t[e][r],[Ai.getScaleDefaults(l),s])}else{Da.merge(t[e][r],s)}}}else{Da._merger(e,t,a,o)}}})}function Pe(){return Da.merge(Object.create(null),[].slice.call(arguments),{merger:function merger(e,t,a,i){var o=t[e]||Object.create(null),n=a[e];if("scales"===e){t[e]=Ce(o,n)}else if("scale"===e){t[e]=Da.merge(o,[Ai.getScaleDefaults(n.type),n])}else{Da._merger(e,t,a,i)}}})}function Te(e){e=e||Object.create(null);var t=e.data=e.data||{};t.datasets=t.datasets||[];t.labels=t.labels||[];e.options=Pe(_a.global,_a[e.type],e.options||{});return e}function Oe(e){var t=e.options;Da.each(e.scales,function(t){pi.removeBox(e,t)});t=Pe(_a.global,_a[e.config.type],t);e.options=e.config.options=t;e.ensureScalesHaveIDs();e.buildOrUpdateScales();e.tooltip._options=t.tooltips;e.tooltip.initialize()}function Ae(e,t,a){var i,o=function(e){return e.id===i};do{i=t+a++}while(0<=Da.findIndex(e,o));return i}function Me(e){return"top"===e||"bottom"===e}function Ie(e,t){return function(i,a){return i[e]===a[e]?i[t]-a[t]:i[e]-a[e]}}var Yi=function(e,t){this.construct(e,t);return this};Da.extend(Yi.prototype,{construct:function construct(e,t){var a=this;t=Te(t);var i=Ti.acquireContext(e,t),o=i&&i.canvas,n=o&&o.height,r=o&&o.width;a.id=Da.uid();a.ctx=i;a.canvas=o;a.config=t;a.width=r;a.height=n;a.aspectRatio=n?r/n:null;a.options=t.options;a._bufferedRender=!1;a._layers=[];a.chart=a;a.controller=a;Yi.instances[a.id]=a;Object.defineProperty(a,"data",{get:function get(){return a.config.data},set:function set(e){a.config.data=e}});if(!i||!o){console.error("Failed to create chart: can't acquire context from the given item");return}a.initialize();a.update()},initialize:function initialize(){var e=this;Oi.notify(e,"beforeInit");Da.retinaScale(e,e.options.devicePixelRatio);e.bindEvents();if(e.options.responsive){e.resize(!0)}e.initToolTip();Oi.notify(e,"afterInit");return e},clear:function clear(){Da.canvas.clear(this);return this},stop:function stop(){Aa.cancelAnimation(this);return this},resize:function resize(e){var t=this,a=t.options,i=t.canvas,o=a.maintainAspectRatio&&t.aspectRatio||null,n=Math.max(0,Math.floor(Da.getMaximumWidth(i))),r=Math.max(0,Math.floor(o?n/o:Da.getMaximumHeight(i)));if(t.width===n&&t.height===r){return}i.width=t.width=n;i.height=t.height=r;i.style.width=n+"px";i.style.height=r+"px";Da.retinaScale(t,a.devicePixelRatio);if(!e){var l={width:n,height:r};Oi.notify(t,"resize",[l]);if(a.onResize){a.onResize(t,l)}t.stop();t.update({duration:a.responsiveAnimationDuration})}},ensureScalesHaveIDs:function ensureScalesHaveIDs(){var e=this.options,t=e.scales||{},a=e.scale;Da.each(t.xAxes,function(e,a){if(!e.id){e.id=Ae(t.xAxes,"x-axis-",a)}});Da.each(t.yAxes,function(e,a){if(!e.id){e.id=Ae(t.yAxes,"y-axis-",a)}});if(a){a.id=a.id||"scale"}},buildOrUpdateScales:function buildOrUpdateScales(){var e=this,t=e.options,a=e.scales||{},i=[],o=Object.keys(a).reduce(function(e,t){e[t]=!1;return e},{});if(t.scales){i=i.concat((t.scales.xAxes||[]).map(function(e){return{options:e,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(e){return{options:e,dtype:"linear",dposition:"left"}}))}if(t.scale){i.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"})}Da.each(i,function(t){var i=t.options,n=i.id,r=Ei(i.type,t.dtype);if(Me(i.position)!==Me(t.dposition)){i.position=t.dposition}o[n]=!0;var l=null;if(n in a&&a[n].type===r){l=a[n];l.options=i;l.ctx=e.ctx;l.chart=e}else{var s=Ai.getScaleConstructor(r);if(!s){return}l=new s({id:n,type:r,options:i,ctx:e.ctx,chart:e});a[l.id]=l}l.mergeTicksOptions();if(t.isDefault){e.scale=l}});Da.each(o,function(e,t){if(!e){delete a[t]}});e.scales=a;Ai.addScalesToLayout(this)},buildOrUpdateControllers:function buildOrUpdateControllers(){var e=this,t=[],a=e.data.datasets,o,n;for(o=0,n=a.length;o<n;o++){var r=a[o],l=e.getDatasetMeta(o),s=r.type||e.config.type;if(l.type&&l.type!==s){e.destroyDatasetMeta(o);l=e.getDatasetMeta(o)}l.type=s;l.order=r.order||0;l.index=o;if(l.controller){l.controller.updateIndex(o);l.controller.linkScales()}else{var d=gi[l.type];if(d===void 0){throw new Error("\""+l.type+"\" is not a chart type.")}l.controller=new d(e,o);t.push(l.controller)}}return t},resetElements:function resetElements(){var e=this;Da.each(e.data.datasets,function(t,a){e.getDatasetMeta(a).controller.reset()},e)},reset:function reset(){this.resetElements();this.tooltip.initialize()},update:function update(e){var t=this,a,o;if(!e||"object"!==_typeof(e)){e={duration:e,lazy:arguments[1]}}Oe(t);Oi._invalidate(t);if(!1===Oi.notify(t,"beforeUpdate")){return}t.tooltip._data=t.data;var n=t.buildOrUpdateControllers();for(a=0,o=t.data.datasets.length;a<o;a++){t.getDatasetMeta(a).controller.buildOrUpdateElements()}t.updateLayout();if(t.options.animation&&t.options.animation.duration){Da.each(n,function(e){e.reset()})}t.updateDatasets();t.tooltip.initialize();t.lastActive=[];Oi.notify(t,"afterUpdate");t._layers.sort(Ie("z","_idx"));if(t._bufferedRender){t._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}}else{t.render(e)}},updateLayout:function updateLayout(){var e=this;if(!1===Oi.notify(e,"beforeLayout")){return}pi.update(this,this.width,this.height);e._layers=[];Da.each(e.boxes,function(t){if(t._configure){t._configure()}e._layers.push.apply(e._layers,t._layers())},e);e._layers.forEach(function(e,t){e._idx=t});Oi.notify(e,"afterScaleUpdate");Oi.notify(e,"afterLayout")},updateDatasets:function updateDatasets(){var e=this;if(!1===Oi.notify(e,"beforeDatasetsUpdate")){return}for(var t=0,a=e.data.datasets.length;t<a;++t){e.updateDataset(t)}Oi.notify(e,"afterDatasetsUpdate")},updateDataset:function updateDataset(e){var t=this,a=t.getDatasetMeta(e),i={meta:a,index:e};if(!1===Oi.notify(t,"beforeDatasetUpdate",[i])){return}a.controller._update();Oi.notify(t,"afterDatasetUpdate",[i])},render:function render(e){var t=this;if(!e||"object"!==_typeof(e)){e={duration:e,lazy:arguments[1]}}var a=t.options.animation,i=Ei(e.duration,a&&a.duration),o=e.lazy;if(!1===Oi.notify(t,"beforeRender")){return}var n=function(e){Oi.notify(t,"afterRender");Da.callback(a&&a.onComplete,[e],t)};if(a&&i){var r=new Oa({numSteps:i/16.66,easing:e.easing||a.easing,render:function render(e,t){var a=Da.easing.effects[t.easing],i=t.currentStep,o=i/t.numSteps;e.draw(a(o),o,i)},onAnimationProgress:a.onProgress,onAnimationComplete:n});Aa.addAnimation(t,r,i,o)}else{t.draw();n(new Oa({numSteps:0,chart:t}))}return t},draw:function draw(e){var t=this,a,o;t.clear();if(Da.isNullOrUndef(e)){e=1}t.transition(e);if(0>=t.width||0>=t.height){return}if(!1===Oi.notify(t,"beforeDraw",[e])){return}o=t._layers;for(a=0;a<o.length&&0>=o[a].z;++a){o[a].draw(t.chartArea)}t.drawDatasets(e);for(;a<o.length;++a){o[a].draw(t.chartArea)}t._drawTooltip(e);Oi.notify(t,"afterDraw",[e])},transition:function transition(e){for(var t=this,a=0,o=(t.data.datasets||[]).length;a<o;++a){if(t.isDatasetVisible(a)){t.getDatasetMeta(a).controller.transition(e)}}t.tooltip.transition(e)},_getSortedDatasetMetas:function _getSortedDatasetMetas(e){var t=this,a=t.data.datasets||[],o=[],n,r;for(n=0,r=a.length;n<r;++n){if(!e||t.isDatasetVisible(n)){o.push(t.getDatasetMeta(n))}}o.sort(Ie("order","index"));return o},_getSortedVisibleDatasetMetas:function _getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)},drawDatasets:function drawDatasets(e){var t=this,a,o;if(!1===Oi.notify(t,"beforeDatasetsDraw",[e])){return}a=t._getSortedVisibleDatasetMetas();for(o=a.length-1;0<=o;--o){t.drawDataset(a[o],e)}Oi.notify(t,"afterDatasetsDraw",[e])},drawDataset:function drawDataset(e,t){var a=this,i={meta:e,index:e.index,easingValue:t};if(!1===Oi.notify(a,"beforeDatasetDraw",[i])){return}e.controller.draw(t);Oi.notify(a,"afterDatasetDraw",[i])},_drawTooltip:function _drawTooltip(e){var t=this,a=t.tooltip,i={tooltip:a,easingValue:e};if(!1===Oi.notify(t,"beforeTooltipDraw",[i])){return}a.draw();Oi.notify(t,"afterTooltipDraw",[i])},getElementAtEvent:function getElementAtEvent(t){return mi.modes.single(this,t)},getElementsAtEvent:function getElementsAtEvent(t){return mi.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function getElementsAtXAxis(t){return mi.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function getElementsAtEventForMode(t,e,a){var i=mi.modes[e];if("function"==typeof i){return i(this,t,a)}return[]},getDatasetAtEvent:function getDatasetAtEvent(t){return mi.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function getDatasetMeta(e){var t=this,a=t.data.datasets[e];if(!a._meta){a._meta={}}var i=a._meta[t.id];if(!i){i=a._meta[t.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:a.order||0,index:e}}return i},getVisibleDatasetCount:function getVisibleDatasetCount(){for(var e=0,t=0,a=this.data.datasets.length;t<a;++t){if(this.isDatasetVisible(t)){e++}}return e},isDatasetVisible:function isDatasetVisible(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function generateLegend(){return this.options.legendCallback(this)},destroyDatasetMeta:function destroyDatasetMeta(e){var t=this.id,a=this.data.datasets[e],i=a._meta&&a._meta[t];if(i){i.controller.destroy();delete a._meta[t]}},destroy:function destroy(){var e=this,t=e.canvas,a,o;e.stop();for(a=0,o=e.data.datasets.length;a<o;++a){e.destroyDatasetMeta(a)}if(t){e.unbindEvents();Da.canvas.clear(e);Ti.releaseContext(e.ctx);e.canvas=null;e.ctx=null}Oi.notify(e,"destroy");delete Yi.instances[e.id]},toBase64Image:function toBase64Image(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function initToolTip(){var e=this;e.tooltip=new Ri({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function bindEvents(){var e=this,t=e._listeners={},a=function(){e.eventHandler.apply(e,arguments)};Da.each(e.options.events,function(i){Ti.addEventListener(e,i,a);t[i]=a});if(e.options.responsive){a=function(){e.resize()};Ti.addEventListener(e,"resize",a);t.resize=a}},unbindEvents:function unbindEvents(){var e=this,t=e._listeners;if(!t){return}delete e._listeners;Da.each(t,function(t,a){Ti.removeEventListener(e,a,t)})},updateHoverStyle:function updateHoverStyle(e,t,a){var o=a?"set":"remove",n,r,l;for(r=0,l=e.length;r<l;++r){n=e[r];if(n){this.getDatasetMeta(n._datasetIndex).controller[o+"HoverStyle"](n)}}if("dataset"===t){this.getDatasetMeta(e[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()}},eventHandler:function eventHandler(t){var e=this,a=e.tooltip;if(!1===Oi.notify(e,"beforeEvent",[t])){return}e._bufferedRender=!0;e._bufferedRequest=null;var i=e.handleEvent(t);if(a){i=a._start?a.handleEvent(t):i|a.handleEvent(t)}Oi.notify(e,"afterEvent",[t]);var o=e._bufferedRequest;if(o){e.render(o)}else if(i&&!e.animating){e.stop();e.render({duration:e.options.hover.animationDuration,lazy:!0})}e._bufferedRender=!1;e._bufferedRequest=null;return e},handleEvent:function handleEvent(t){var e=this,a=e.options||{},i=a.hover,o=!1;e.lastActive=e.lastActive||[];if("mouseout"===t.type){e.active=[]}else{e.active=e.getElementsAtEventForMode(t,i.mode,i)}Da.callback(a.onHover||a.hover.onHover,[t.native,e.active],e);if("mouseup"===t.type||"click"===t.type){if(a.onClick){a.onClick.call(e,t.native,e.active)}}if(e.lastActive.length){e.updateHoverStyle(e.lastActive,i.mode,!1)}if(e.active.length&&i.mode){e.updateHoverStyle(e.active,i.mode,!0)}o=!Da.arrayEquals(e.active,e.lastActive);e.lastActive=e.active;return o}});Yi.instances={};var Wi=Yi;Yi.Controller=Yi;Yi.types={};Da.configMerge=Pe;Da.scaleMerge=Ce;function Le(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Fe(e){this.options=e||{}}Da.extend(Fe.prototype,{formats:Le,parse:Le,format:Le,add:Le,diff:Le,startOf:Le,endOf:Le,_create:function _create(e){return e}});Fe.override=function(e){Da.extend(Fe.prototype,e)};var zi={_date:Fe},Vi={formatters:{values:function values(e){return Da.isArray(e)?e:""+e},linear:function linear(e,t,a){var i=3<a.length?a[2]-a[1]:a[1]-a[0];if(1<Math.abs(i)){if(e!==Math.floor(e)){i=e-Math.floor(e)}}var o=Da.log10(Math.abs(i)),n="";if(0!==e){var r=Math.max(Math.abs(a[0]),Math.abs(a[a.length-1]));if(1e-4>r){var l=Da.log10(Math.abs(e)),s=Math.floor(l)-Math.floor(o);s=Math.max(Math.min(s,20),0);n=e.toExponential(s)}else{var d=-1*Math.floor(o);d=Math.max(Math.min(d,20),0);n=e.toFixed(d)}}else{n="0"}return n},logarithmic:function logarithmic(e,t,a){var i=e/Math.pow(10,Math.floor(Da.log10(e)));if(0===e){return"0"}else if(1===i||2===i||5===i||0===t||t===a.length-1){return e.toExponential()}return""}}},Hi=Da.isArray,Bi=Da.isNullOrUndef,Ni=Da.valueOrDefault,Ui=Da.valueAtIndexOrDefault;_a._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:Vi.formatters.values,minor:{},major:{}}});function Re(e,t){var a=[],o=e.length/t,n=0,r=e.length;for(;n<r;n+=o){a.push(e[Math.floor(n)])}return a}function Ee(e,t,a){var i=e.getTicks().length,o=Math.min(t,i-1),n=e.getPixelForTick(o),r=e._startPixel,l=e._endPixel,s=1e-6,d;if(a){if(1===i){d=Math.max(n-r,l-n)}else if(0===t){d=(e.getPixelForTick(1)-n)/2}else{d=(n-e.getPixelForTick(o-1))/2}n+=o<t?d:-d;if(n<r-s||n>l+s){return}}return n}function Ye(e,t){Da.each(e,function(e){var a=e.gc,o=a.length/2,n;if(o>t){for(n=0;n<o;++n){delete e.data[a[n]]}a.splice(0,o)}})}function We(e,t,a,o){var r=a.length,l=[],s=[],d=[],c=0,h=0,g,m,u,p,f,y,b,x,_,k,v,w,S;for(g=0;g<r;++g){p=a[g].label;f=a[g].major?t.major:t.minor;e.font=y=f.string;b=o[y]=o[y]||{data:{},gc:[]};x=f.lineHeight;_=k=0;if(!Bi(p)&&!Hi(p)){_=Da.measureText(e,b.data,b.gc,_,p);k=x}else if(Hi(p)){for(m=0,u=p.length;m<u;++m){v=p[m];if(!Bi(v)&&!Hi(v)){_=Da.measureText(e,b.data,b.gc,_,v);k+=x}}}l.push(_);s.push(k);d.push(x/2);c=Math.max(_,c);h=Math.max(k,h)}Ye(o,r);w=l.indexOf(c);S=s.indexOf(h);function n(e){return{width:l[e]||0,height:s[e]||0,offset:d[e]||0}}return{first:n(0),last:n(r-1),widest:n(w),highest:n(S)}}function ze(e){return e.drawTicks?e.tickMarkLength:0}function Ve(e){var t,a;if(!e.display){return 0}t=Da.options._parseFont(e);a=Da.options.toPadding(e.padding);return t.lineHeight+a.height}function He(e,t){return Da.extend(Da.options._parseFont({fontFamily:Ni(t.fontFamily,e.fontFamily),fontSize:Ni(t.fontSize,e.fontSize),fontStyle:Ni(t.fontStyle,e.fontStyle),lineHeight:Ni(t.lineHeight,e.lineHeight)}),{color:Da.options.resolve([t.fontColor,e.fontColor,_a.global.defaultFontColor])})}function Be(e){var t=He(e,e.minor),a=e.major.enabled?He(e,e.major):t;return{minor:t,major:a}}function Ne(e){var t=[],a,i,o;for(i=0,o=e.length;i<o;++i){a=e[i];if("undefined"!=typeof a._index){t.push(a)}}return t}function Ue(e){var t=e.length,a,o;if(2>t){return!1}for(o=e[0],a=1;a<t;++a){if(e[a]-e[a-1]!==o){return!1}}return o}function je(e,t,a,o){var n=Ue(e),r=(t.length-1)/o,l,s,d,c;if(!n){return Math.max(r,1)}l=Da.math._factorize(n);for(d=0,c=l.length-1;d<c;d++){s=l[d];if(s>r){return s}}return Math.max(r,1)}function Ge(e){var t=[],a,o;for(a=0,o=e.length;a<o;a++){if(e[a].major){t.push(a)}}return t}function qe(e,t,a){var o=0,n=t[0],r,l;a=Math.ceil(a);for(r=0;r<e.length;r++){l=e[r];if(r===n){l._index=r;o++;n=t[o*a]}else{delete l.label}}}function Ke(e,t,a,o){var n=Ni(a,0),r=Math.min(Ni(o,e.length),e.length),l=0,s,d,c,h;t=Math.ceil(t);if(o){s=o-a;t=s/Math.floor(s/t)}h=n;while(0>h){l++;h=Math.round(n+l*t)}for(d=Math.max(n,0);d<r;d++){c=e[d];if(d===h){c._index=d;l++;h=Math.round(n+l*t)}else{delete c.label}}}var ji=Pa.extend({zeroLineIndex:0,getPadding:function getPadding(){var e=this;return{left:e.paddingLeft||0,top:e.paddingTop||0,right:e.paddingRight||0,bottom:e.paddingBottom||0}},getTicks:function getTicks(){return this._ticks},_getLabels:function _getLabels(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function mergeTicksOptions(){},beforeUpdate:function beforeUpdate(){Da.callback(this.options.beforeUpdate,[this])},update:function update(e,t,a){var o=this,n=o.options.ticks,r=n.sampleSize,l,s,d,c,h;o.beforeUpdate();o.maxWidth=e;o.maxHeight=t;o.margins=Da.extend({left:0,right:0,top:0,bottom:0},a);o._ticks=null;o.ticks=null;o._labelSizes=null;o._maxLabelLines=0;o.longestLabelWidth=0;o.longestTextCache=o.longestTextCache||{};o._gridLineItems=null;o._labelItems=null;o.beforeSetDimensions();o.setDimensions();o.afterSetDimensions();o.beforeDataLimits();o.determineDataLimits();o.afterDataLimits();o.beforeBuildTicks();c=o.buildTicks()||[];c=o.afterBuildTicks(c)||c;if((!c||!c.length)&&o.ticks){c=[];for(l=0,s=o.ticks.length;l<s;++l){c.push({value:o.ticks[l],major:!1})}}o._ticks=c;h=r<c.length;d=o._convertTicksToLabels(h?Re(c,r):c);o._configure();o.beforeCalculateTickRotation();o.calculateTickRotation();o.afterCalculateTickRotation();o.beforeFit();o.fit();o.afterFit();o._ticksToDraw=n.display&&(n.autoSkip||"auto"===n.source)?o._autoSkip(c):c;if(h){d=o._convertTicksToLabels(o._ticksToDraw)}o.ticks=d;o.afterUpdate();return o.minSize},_configure:function _configure(){var e=this,t=e.options.ticks.reverse,a,i;if(e.isHorizontal()){a=e.left;i=e.right}else{a=e.top;i=e.bottom;t=!t}e._startPixel=a;e._endPixel=i;e._reversePixels=t;e._length=i-a},afterUpdate:function afterUpdate(){Da.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function beforeSetDimensions(){Da.callback(this.options.beforeSetDimensions,[this])},setDimensions:function setDimensions(){var e=this;if(e.isHorizontal()){e.width=e.maxWidth;e.left=0;e.right=e.width}else{e.height=e.maxHeight;e.top=0;e.bottom=e.height}e.paddingLeft=0;e.paddingTop=0;e.paddingRight=0;e.paddingBottom=0},afterSetDimensions:function afterSetDimensions(){Da.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function beforeDataLimits(){Da.callback(this.options.beforeDataLimits,[this])},determineDataLimits:Da.noop,afterDataLimits:function afterDataLimits(){Da.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function beforeBuildTicks(){Da.callback(this.options.beforeBuildTicks,[this])},buildTicks:Da.noop,afterBuildTicks:function afterBuildTicks(e){var t=this;if(Hi(e)&&e.length){return Da.callback(t.options.afterBuildTicks,[t,e])}t.ticks=Da.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks;return e},beforeTickToLabelConversion:function beforeTickToLabelConversion(){Da.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function convertTicksToLabels(){var e=this,t=e.options.ticks;e.ticks=e.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function afterTickToLabelConversion(){Da.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function beforeCalculateTickRotation(){Da.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function calculateTickRotation(){var e=this,t=e.options,a=t.ticks,i=e.getTicks().length,o=a.minRotation||0,n=a.maxRotation,r=o,l,s,d,c,h,g,m;if(!e._isVisible()||!a.display||o>=n||1>=i||!e.isHorizontal()){e.labelRotation=o;return}l=e._getLabelSizes();s=l.widest.width;d=l.highest.height-l.highest.offset;c=Math.min(e.maxWidth,e.chart.width-s);h=t.offset?e.maxWidth/i:c/(i-1);if(s+6>h){h=c/(i-(t.offset?.5:1));g=e.maxHeight-ze(t.gridLines)-a.padding-Ve(t.scaleLabel);m=Math.sqrt(s*s+d*d);r=Da.toDegrees(Math.min(Math.asin(Math.min((l.highest.height+6)/h,1)),Math.asin(Math.min(g/m,1))-Math.asin(d/m)));r=Math.max(o,Math.min(n,r))}e.labelRotation=r},afterCalculateTickRotation:function afterCalculateTickRotation(){Da.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function beforeFit(){Da.callback(this.options.beforeFit,[this])},fit:function fit(){var e=this,t=e.minSize={width:0,height:0},a=e.chart,i=e.options,o=i.ticks,n=i.scaleLabel,r=i.gridLines,l=e._isVisible(),s="bottom"===i.position,d=e.isHorizontal();if(d){t.width=e.maxWidth}else if(l){t.width=ze(r)+Ve(n)}if(!d){t.height=e.maxHeight}else if(l){t.height=ze(r)+Ve(n)}if(o.display&&l){var c=Be(o),h=e._getLabelSizes(),g=h.first,m=h.last,u=h.widest,p=h.highest,f=.4*c.minor.lineHeight,y=o.padding;if(d){var b=0!==e.labelRotation,x=Da.toRadians(e.labelRotation),_=Math.cos(x),k=Math.sin(x),v=k*u.width+_*(p.height-(b?p.offset:0))+(b?0:f);t.height=Math.min(e.maxHeight,t.height+v+y);var w=e.getPixelForTick(0)-e.left,S=e.right-e.getPixelForTick(e.getTicks().length-1),D,C;if(b){D=s?_*g.width+k*g.offset:k*(g.height-g.offset);C=s?k*(m.height-m.offset):_*m.width+k*m.offset}else{D=g.width/2;C=m.width/2}e.paddingLeft=Math.max((D-w)*e.width/(e.width-w),0)+3;e.paddingRight=Math.max((C-S)*e.width/(e.width-S),0)+3}else{var P=o.mirror?0:u.width+y+f;t.width=Math.min(e.maxWidth,t.width+P);e.paddingTop=g.height/2;e.paddingBottom=m.height/2}}e.handleMargins();if(d){e.width=e._length=a.width-e.margins.left-e.margins.right;e.height=t.height}else{e.width=t.width;e.height=e._length=a.height-e.margins.top-e.margins.bottom}},handleMargins:function handleMargins(){var e=this;if(e.margins){e.margins.left=Math.max(e.paddingLeft,e.margins.left);e.margins.top=Math.max(e.paddingTop,e.margins.top);e.margins.right=Math.max(e.paddingRight,e.margins.right);e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom)}},afterFit:function afterFit(){Da.callback(this.options.afterFit,[this])},isHorizontal:function isHorizontal(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function isFullWidth(){return this.options.fullWidth},getRightValue:function getRightValue(e){if(Bi(e)){return NaN}if(("number"==typeof e||e instanceof Number)&&!isFinite(e)){return NaN}if(e){if(this.isHorizontal()){if(e.x!==void 0){return this.getRightValue(e.x)}}else if(e.y!==void 0){return this.getRightValue(e.y)}}return e},_convertTicksToLabels:function _convertTicksToLabels(e){var t=this,a,o,n;t.ticks=e.map(function(e){return e.value});t.beforeTickToLabelConversion();a=t.convertTicksToLabels(e)||t.ticks;t.afterTickToLabelConversion();for(o=0,n=e.length;o<n;++o){e[o].label=a[o]}return a},_getLabelSizes:function _getLabelSizes(){var e=this,t=e._labelSizes;if(!t){e._labelSizes=t=We(e.ctx,Be(e.options.ticks),e.getTicks(),e.longestTextCache);e.longestLabelWidth=t.widest.width}return t},_parseValue:function _parseValue(e){var t,a,i,o;if(Hi(e)){t=+this.getRightValue(e[0]);a=+this.getRightValue(e[1]);i=Math.min(t,a);o=Math.max(t,a)}else{e=+this.getRightValue(e);t=void 0;a=e;i=e;o=e}return{min:i,max:o,start:t,end:a}},_getScaleLabel:function _getScaleLabel(e){var t=this._parseValue(e);if(t.start!==void 0){return"["+t.start+", "+t.end+"]"}return+this.getRightValue(e)},getLabelForIndex:Da.noop,getPixelForValue:Da.noop,getValueForPixel:Da.noop,getPixelForTick:function getPixelForTick(e){var t=this,a=t.options.offset,i=t._ticks.length,o=1/Math.max(i-(a?0:1),1);return 0>e||e>i-1?null:t.getPixelForDecimal(e*o+(a?o/2:0))},getPixelForDecimal:function getPixelForDecimal(e){var t=this;if(t._reversePixels){e=1-e}return t._startPixel+e*t._length},getDecimalForPixel:function getDecimalForPixel(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function getBasePixel(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function getBaseValue(){var e=this,t=e.min,a=e.max;return e.beginAtZero?0:0>t&&0>a?a:0<t&&0<a?t:0},_autoSkip:function _autoSkip(e){var t=this,a=t.options.ticks,o=t._length,n=a.maxTicksLimit||o/t._tickSize()+1,r=a.major.enabled?Ge(e):[],l=r.length,s=r[0],d=r[l-1],c,h,g,m;if(l>n){qe(e,r,l/n);return Ne(e)}g=je(r,e,o,n);if(0<l){for(c=0,h=l-1;c<h;c++){Ke(e,g,r[c],r[c+1])}m=1<l?(d-s)/(l-1):null;Ke(e,g,Da.isNullOrUndef(m)?0:s-m,s);Ke(e,g,d,Da.isNullOrUndef(m)?e.length:d+m);return Ne(e)}Ke(e,g);return Ne(e)},_tickSize:function _tickSize(){var e=this,t=e.options.ticks,a=Da.toRadians(e.labelRotation),i=Math.abs(Math.cos(a)),o=Math.abs(Math.sin(a)),n=e._getLabelSizes(),r=t.autoSkipPadding||0,l=n?n.widest.width+r:0,s=n?n.highest.height+r:0;return e.isHorizontal()?s*i>l*o?l/i:s/o:s*o<l*i?s/i:l/o},_isVisible:function _isVisible(){var e=this,t=e.chart,a=e.options.display,o,n,r;if("auto"!==a){return!!a}for(o=0,n=t.data.datasets.length;o<n;++o){if(t.isDatasetVisible(o)){r=t.getDatasetMeta(o);if(r.xAxisID===e.id||r.yAxisID===e.id){return!0}}}return!1},_computeGridLineItems:function _computeGridLineItems(e){var t=this,a=t.chart,o=t.options,n=o.gridLines,r=o.position,l=n.offsetGridLines,s=t.isHorizontal(),d=t._ticksToDraw,c=d.length+(l?1:0),h=ze(n),g=[],m=n.drawBorder?Ui(n.lineWidth,0,0):0,u=m/2,p=Da._alignPixel,f=function(e){return p(a,e,m)},y,b,x,_,k,v,w,S,D,C,P,T,O,A,M,I,L;if("top"===r){y=f(t.bottom);w=t.bottom-h;D=y-u;P=f(e.top)+u;O=e.bottom}else if("bottom"===r){y=f(t.top);P=e.top;O=f(e.bottom)-u;w=y+u;D=t.top+h}else if("left"===r){y=f(t.right);v=t.right-h;S=y-u;C=f(e.left)+u;T=e.right}else{y=f(t.left);C=e.left;T=f(e.right)-u;v=y+u;S=t.left+h}for(b=0;b<c;++b){x=d[b]||{};if(Bi(x.label)&&b<d.length){continue}if(b===t.zeroLineIndex&&o.offset===l){A=n.zeroLineWidth;M=n.zeroLineColor;I=n.zeroLineBorderDash||[];L=n.zeroLineBorderDashOffset||0}else{A=Ui(n.lineWidth,b,1);M=Ui(n.color,b,"rgba(0,0,0,0.1)");I=n.borderDash||[];L=n.borderDashOffset||0}_=Ee(t,x._index||b,l);if(_===void 0){continue}k=p(a,_,A);if(s){v=S=C=T=k}else{w=D=P=O=k}g.push({tx1:v,ty1:w,tx2:S,ty2:D,x1:C,y1:P,x2:T,y2:O,width:A,color:M,borderDash:I,borderDashOffset:L})}g.ticksLength=c;g.borderValue=y;return g},_computeLabelItems:function _computeLabelItems(){var e=this,t=e.options,a=t.ticks,o=t.position,n=a.mirror,r=e.isHorizontal(),l=e._ticksToDraw,s=Be(a),d=a.padding,c=ze(t.gridLines),h=-Da.toRadians(e.labelRotation),g=[],m,u,p,f,b,_,k,v,w,S,D,C;if("top"===o){_=e.bottom-c-d;k=!h?"center":"left"}else if("bottom"===o){_=e.top+c+d;k=!h?"center":"right"}else if("left"===o){b=e.right-(n?0:c)-d;k=n?"left":"right"}else{b=e.left+(n?0:c)+d;k=n?"right":"left"}for(m=0,u=l.length;m<u;++m){p=l[m];f=p.label;if(Bi(f)){continue}v=e.getPixelForTick(p._index||m)+a.labelOffset;w=p.major?s.major:s.minor;S=w.lineHeight;D=Hi(f)?f.length:1;if(r){b=v;C="top"===o?((!h?.5:1)-D)*S:(!h?.5:0)*S}else{_=v;C=(1-D)*S/2}g.push({x:b,y:_,rotation:h,label:f,font:w,textOffset:C,textAlign:k})}return g},_drawGrid:function _drawGrid(e){var t=this,a=t.options.gridLines;if(!a.display){return}var o=t.ctx,n=t.chart,r=Da._alignPixel,l=a.drawBorder?Ui(a.lineWidth,0,0):0,s=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e)),d,c,h,g,m;for(h=0,g=s.length;h<g;++h){m=s[h];d=m.width;c=m.color;if(d&&c){o.save();o.lineWidth=d;o.strokeStyle=c;if(o.setLineDash){o.setLineDash(m.borderDash);o.lineDashOffset=m.borderDashOffset}o.beginPath();if(a.drawTicks){o.moveTo(m.tx1,m.ty1);o.lineTo(m.tx2,m.ty2)}if(a.drawOnChartArea){o.moveTo(m.x1,m.y1);o.lineTo(m.x2,m.y2)}o.stroke();o.restore()}}if(l){var u=l,p=Ui(a.lineWidth,s.ticksLength-1,1),f=s.borderValue,y,b,x,_;if(t.isHorizontal()){y=r(n,t.left,u)-u/2;b=r(n,t.right,p)+p/2;x=_=f}else{x=r(n,t.top,u)-u/2;_=r(n,t.bottom,p)+p/2;y=b=f}o.lineWidth=l;o.strokeStyle=Ui(a.color,0);o.beginPath();o.moveTo(y,x);o.lineTo(b,_);o.stroke()}},_drawLabels:function _drawLabels(){var e=this,t=e.options.ticks;if(!t.display){return}var a=e.ctx,o=e._labelItems||(e._labelItems=e._computeLabelItems()),n,r,l,s,d,c,h,g;for(n=0,l=o.length;n<l;++n){d=o[n];c=d.font;a.save();a.translate(d.x,d.y);a.rotate(d.rotation);a.font=c.string;a.fillStyle=c.color;a.textBaseline="middle";a.textAlign=d.textAlign;h=d.label;g=d.textOffset;if(Hi(h)){for(r=0,s=h.length;r<s;++r){a.fillText(""+h[r],0,g);g+=c.lineHeight}}else{a.fillText(h,0,g)}a.restore()}},_drawTitle:function _drawTitle(){var e=this,t=e.ctx,a=e.options,i=a.scaleLabel;if(!i.display){return}var o=Ni(i.fontColor,_a.global.defaultFontColor),n=Da.options._parseFont(i),r=Da.options.toPadding(i.padding),l=n.lineHeight/2,s=a.position,d=0,c,h;if(e.isHorizontal()){c=e.left+e.width/2;h="bottom"===s?e.bottom-l-r.bottom:e.top+l+r.top}else{var g="left"===s;c=g?e.left+l+r.top:e.right-l-r.top;h=e.top+e.height/2;d=g?-.5*Math.PI:.5*Math.PI}t.save();t.translate(c,h);t.rotate(d);t.textAlign="center";t.textBaseline="middle";t.fillStyle=o;t.font=n.string;t.fillText(i.labelString,0,0);t.restore()},draw:function draw(e){var t=this;if(!t._isVisible()){return}t._drawGrid(e);t._drawTitle();t._drawLabels()},_layers:function _layers(){var e=this,t=e.options,a=t.ticks&&t.ticks.z||0,i=t.gridLines&&t.gridLines.z||0;if(!e._isVisible()||a===i||e.draw!==e._draw){return[{z:a,draw:function draw(){e.draw.apply(e,arguments)}}]}return[{z:i,draw:function draw(){e._drawGrid.apply(e,arguments);e._drawTitle.apply(e,arguments)}},{z:a,draw:function draw(){e._drawLabels.apply(e,arguments)}}]},_getMatchingVisibleMetas:function _getMatchingVisibleMetas(e){var t=this,a=t.isHorizontal();return t.chart._getSortedVisibleDatasetMetas().filter(function(i){return(!e||i.type===e)&&(a?i.xAxisID===t.id:i.yAxisID===t.id)})}});ji.prototype._draw=ji.prototype.draw;var Gi=ji,qi=Da.isNullOrUndef,Ki=Gi.extend({determineDataLimits:function determineDataLimits(){var e=this,t=e._getLabels(),a=e.options.ticks,i=a.min,o=a.max,n=0,r=t.length-1,l;if(i!==void 0){l=t.indexOf(i);if(0<=l){n=l}}if(o!==void 0){l=t.indexOf(o);if(0<=l){r=l}}e.minIndex=n;e.maxIndex=r;e.min=t[n];e.max=t[r]},buildTicks:function buildTicks(){var e=this,t=e._getLabels(),a=e.minIndex,i=e.maxIndex;e.ticks=0===a&&i===t.length-1?t:t.slice(a,i+1)},getLabelForIndex:function getLabelForIndex(e,t){var a=this,i=a.chart;if(i.getDatasetMeta(t).controller._getValueScaleId()===a.id){return a.getRightValue(i.data.datasets[t].data[e])}return a._getLabels()[e]},_configure:function _configure(){var e=this,t=e.options.offset,a=e.ticks;Gi.prototype._configure.call(e);if(!e.isHorizontal()){e._reversePixels=!e._reversePixels}if(!a){return}e._startValue=e.minIndex-(t?.5:0);e._valueRange=Math.max(a.length-(t?0:1),1)},getPixelForValue:function getPixelForValue(e,t,a){var i=this,o,n,r;if(!qi(t)&&!qi(a)){e=i.chart.data.datasets[a].data[t]}if(!qi(e)){o=i.isHorizontal()?e.x:e.y}if(o!==void 0||e!==void 0&&isNaN(t)){n=i._getLabels();e=Da.valueOrDefault(o,e);r=n.indexOf(e);t=-1!==r?r:t;if(isNaN(t)){t=e}}return i.getPixelForDecimal((t-i._startValue)/i._valueRange)},getPixelForTick:function getPixelForTick(e){var t=this.ticks;return 0>e||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function getValueForPixel(e){var t=this,a=Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange);return Math.min(Math.max(a,0),t.ticks.length-1)},getBasePixel:function getBasePixel(){return this.bottom}});Ki._defaults={position:"bottom"};var Xi=Da.noop,Zi=Da.isNullOrUndef;function Xe(e,t){var a=[],i=e.stepSize,o=i||1,n=e.maxTicks-1,r=e.min,l=e.max,s=e.precision,d=t.min,c=t.max,h=Da.niceNum((c-d)/n/o)*o,g,m,u,p;if(h<1e-14&&Zi(r)&&Zi(l)){return[d,c]}p=Math.ceil(c/h)-Math.floor(d/h);if(p>n){h=Da.niceNum(p*h/n/o)*o}if(i||Zi(s)){g=Math.pow(10,Da._decimalPlaces(h))}else{g=Math.pow(10,s);h=Math.ceil(h*g)/g}m=Math.floor(d/h)*h;u=Math.ceil(c/h)*h;if(i){if(!Zi(r)&&Da.almostWhole(r/h,h/1e3)){m=r}if(!Zi(l)&&Da.almostWhole(l/h,h/1e3)){u=l}}p=(u-m)/h;if(Da.almostEquals(p,Math.round(p),h/1e3)){p=Math.round(p)}else{p=Math.ceil(p)}m=Math.round(m*g)/g;u=Math.round(u*g)/g;a.push(Zi(r)?m:r);for(var f=1;f<p;++f){a.push(Math.round((m+f*h)*g)/g)}a.push(Zi(l)?u:l);return a}var Ji=Gi.extend({getRightValue:function getRightValue(e){if("string"==typeof e){return+e}return Gi.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function handleTickRangeOptions(){var e=this,t=e.options,a=t.ticks;if(a.beginAtZero){var i=Da.sign(e.min),o=Da.sign(e.max);if(0>i&&0>o){e.max=0}else if(0<i&&0<o){e.min=0}}var n=a.min!==void 0||a.suggestedMin!==void 0,r=a.max!==void 0||a.suggestedMax!==void 0;if(a.min!==void 0){e.min=a.min}else if(a.suggestedMin!==void 0){if(null===e.min){e.min=a.suggestedMin}else{e.min=Math.min(e.min,a.suggestedMin)}}if(a.max!==void 0){e.max=a.max}else if(a.suggestedMax!==void 0){if(null===e.max){e.max=a.suggestedMax}else{e.max=Math.max(e.max,a.suggestedMax)}}if(n!==r){if(e.min>=e.max){if(n){e.max=e.min+1}else{e.min=e.max-1}}}if(e.min===e.max){e.max++;if(!a.beginAtZero){e.min--}}},getTickLimit:function getTickLimit(){var e=this,t=e.options.ticks,a=t.stepSize,i=t.maxTicksLimit,o;if(a){o=Math.ceil(e.max/a)-Math.floor(e.min/a)+1}else{o=e._computeTickLimit();i=i||11}if(i){o=Math.min(i,o)}return o},_computeTickLimit:function _computeTickLimit(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Xi,buildTicks:function buildTicks(){var e=this,t=e.options,a=t.ticks,i=e.getTickLimit();i=Math.max(2,i);var o={maxTicks:i,min:a.min,max:a.max,precision:a.precision,stepSize:Da.valueOrDefault(a.fixedStepSize,a.stepSize)},n=e.ticks=Xe(o,e);e.handleDirectionalChanges();e.max=Da.max(n);e.min=Da.min(n);if(a.reverse){n.reverse();e.start=e.max;e.end=e.min}else{e.start=e.min;e.end=e.max}},convertTicksToLabels:function convertTicksToLabels(){var e=this;e.ticksAsNumbers=e.ticks.slice();e.zeroLineIndex=e.ticks.indexOf(0);Gi.prototype.convertTicksToLabels.call(e)},_configure:function _configure(){var e=this,t=e.getTicks(),a=e.min,i=e.max,o;Gi.prototype._configure.call(e);if(e.options.offset&&t.length){o=(i-a)/Math.max(t.length-1,1)/2;a-=o;i+=o}e._startValue=a;e._endValue=i;e._valueRange=i-a}}),Qi={position:"left",ticks:{callback:Vi.formatters.linear}};function Ze(e,t,a){var i=[a.type,t===void 0&&a.stack===void 0?a.index:"",a.stack].join(".");if(e[i]===void 0){e[i]={pos:[],neg:[]}}return e[i]}function Je(e,t,a,o){var n=e.options,r=n.stacked,l=Ze(t,r,a),s=l.pos,d=l.neg,c=o.length,h,g;for(h=0;h<c;++h){g=e._parseValue(o[h]);if(isNaN(g.min)||isNaN(g.max)||a.data[h].hidden){continue}s[h]=s[h]||0;d[h]=d[h]||0;if(n.relativePoints){s[h]=100}else if(0>g.min||0>g.max){d[h]+=g.min}else{s[h]+=g.max}}}function Qe(e,t,a){var o=a.length,n,r;for(n=0;n<o;++n){r=e._parseValue(a[n]);if(isNaN(r.min)||isNaN(r.max)||t.data[n].hidden){continue}e.min=Math.min(e.min,r.min);e.max=Math.max(e.max,r.max)}}var $i=Ji.extend({determineDataLimits:function determineDataLimits(){var e=this,t=e.options,a=e.chart,o=a.data.datasets,n=e._getMatchingVisibleMetas(),r=t.stacked,l={},s=n.length,d,c,h,g;e.min=Number.POSITIVE_INFINITY;e.max=Number.NEGATIVE_INFINITY;if(r===void 0){for(d=0;!r&&d<s;++d){c=n[d];r=c.stack!==void 0}}for(d=0;d<s;++d){c=n[d];h=o[c.index].data;if(r){Je(e,l,c,h)}else{Qe(e,c,h)}}Da.each(l,function(t){g=t.pos.concat(t.neg);e.min=Math.min(e.min,Da.min(g));e.max=Math.max(e.max,Da.max(g))});e.min=Da.isFinite(e.min)&&!isNaN(e.min)?e.min:0;e.max=Da.isFinite(e.max)&&!isNaN(e.max)?e.max:1;e.handleTickRangeOptions()},_computeTickLimit:function _computeTickLimit(){var e=this,t;if(e.isHorizontal()){return Math.ceil(e.width/40)}t=Da.options._parseFont(e.options.ticks);return Math.ceil(e.height/t.lineHeight)},handleDirectionalChanges:function handleDirectionalChanges(){if(!this.isHorizontal()){this.ticks.reverse()}},getLabelForIndex:function getLabelForIndex(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function getPixelForValue(e){var t=this;return t.getPixelForDecimal((+t.getRightValue(e)-t._startValue)/t._valueRange)},getValueForPixel:function getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function getPixelForTick(e){var t=this.ticksAsNumbers;if(0>e||e>t.length-1){return null}return this.getPixelForValue(t[e])}});$i._defaults=Qi;var eo=Da.valueOrDefault,to=Da.math.log10;function $e(e,t){var a=[],i=eo(e.min,Math.pow(10,Math.floor(to(t.min)))),o=Math.floor(to(t.max)),n=Math.ceil(t.max/Math.pow(10,o)),r,l;if(0===i){r=Math.floor(to(t.minNotZero));l=Math.floor(t.minNotZero/Math.pow(10,r));a.push(i);i=l*Math.pow(10,r)}else{r=Math.floor(to(i));l=Math.floor(i/Math.pow(10,r))}var s=0>r?Math.pow(10,Math.abs(r)):1;do{a.push(i);++l;if(10===l){l=1;++r;s=0<=r?1:s}i=Math.round(l*Math.pow(10,r)*s)/s}while(r<o||r===o&&l<n);var d=eo(e.max,i);a.push(d);return a}var ao={position:"left",ticks:{callback:Vi.formatters.logarithmic}};function et(e,t){return Da.isFinite(e)&&0<=e?e:t}var io=Gi.extend({determineDataLimits:function determineDataLimits(){var t=this,a=t.options,o=t.chart,n=o.data.datasets,r=t.isHorizontal();function e(e){return r?e.xAxisID===t.id:e.yAxisID===t.id}var l,s,d,c,h,g;t.min=Number.POSITIVE_INFINITY;t.max=Number.NEGATIVE_INFINITY;t.minNotZero=Number.POSITIVE_INFINITY;var m=a.stacked;if(m===void 0){for(l=0;l<n.length;l++){s=o.getDatasetMeta(l);if(o.isDatasetVisible(l)&&e(s)&&s.stack!==void 0){m=!0;break}}}if(a.stacked||m){var u={};for(l=0;l<n.length;l++){s=o.getDatasetMeta(l);var p=[s.type,a.stacked===void 0&&s.stack===void 0?l:"",s.stack].join(".");if(o.isDatasetVisible(l)&&e(s)){if(u[p]===void 0){u[p]=[]}c=n[l].data;for(h=0,g=c.length;h<g;h++){var f=u[p];d=t._parseValue(c[h]);if(isNaN(d.min)||isNaN(d.max)||s.data[h].hidden||0>d.min||0>d.max){continue}f[h]=f[h]||0;f[h]+=d.max}}}Da.each(u,function(e){if(0<e.length){var a=Da.min(e),i=Da.max(e);t.min=Math.min(t.min,a);t.max=Math.max(t.max,i)}})}else{for(l=0;l<n.length;l++){s=o.getDatasetMeta(l);if(o.isDatasetVisible(l)&&e(s)){c=n[l].data;for(h=0,g=c.length;h<g;h++){d=t._parseValue(c[h]);if(isNaN(d.min)||isNaN(d.max)||s.data[h].hidden||0>d.min||0>d.max){continue}t.min=Math.min(d.min,t.min);t.max=Math.max(d.max,t.max);if(0!==d.min){t.minNotZero=Math.min(d.min,t.minNotZero)}}}}}t.min=Da.isFinite(t.min)?t.min:null;t.max=Da.isFinite(t.max)?t.max:null;t.minNotZero=Da.isFinite(t.minNotZero)?t.minNotZero:null;this.handleTickRangeOptions()},handleTickRangeOptions:function handleTickRangeOptions(){var e=this,t=e.options.ticks,a=1,i=10;e.min=et(t.min,e.min);e.max=et(t.max,e.max);if(e.min===e.max){if(0!==e.min&&null!==e.min){e.min=Math.pow(10,Math.floor(to(e.min))-1);e.max=Math.pow(10,Math.floor(to(e.max))+1)}else{e.min=a;e.max=i}}if(null===e.min){e.min=Math.pow(10,Math.floor(to(e.max))-1)}if(null===e.max){e.max=0!==e.min?Math.pow(10,Math.floor(to(e.min))+1):i}if(null===e.minNotZero){if(0<e.min){e.minNotZero=e.min}else if(1>e.max){e.minNotZero=Math.pow(10,Math.floor(to(e.max)))}else{e.minNotZero=a}}},buildTicks:function buildTicks(){var e=this,t=e.options.ticks,a=!e.isHorizontal(),i={min:et(t.min),max:et(t.max)},o=e.ticks=$e(i,e);e.max=Da.max(o);e.min=Da.min(o);if(t.reverse){a=!a;e.start=e.max;e.end=e.min}else{e.start=e.min;e.end=e.max}if(a){o.reverse()}},convertTicksToLabels:function convertTicksToLabels(){this.tickValues=this.ticks.slice();Gi.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function getLabelForIndex(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function getPixelForTick(e){var t=this.tickValues;if(0>e||e>t.length-1){return null}return this.getPixelForValue(t[e])},_getFirstTickValue:function _getFirstTickValue(e){var t=Math.floor(to(e)),a=Math.floor(e/Math.pow(10,t));return a*Math.pow(10,t)},_configure:function _configure(){var e=this,t=e.min,a=0;Gi.prototype._configure.call(e);if(0===t){t=e._getFirstTickValue(e.minNotZero);a=eo(e.options.ticks.fontSize,_a.global.defaultFontSize)/e._length}e._startValue=to(t);e._valueOffset=a;e._valueRange=(to(e.max)-to(t))/(1-a)},getPixelForValue:function getPixelForValue(e){var t=this,a=0;e=+t.getRightValue(e);if(e>t.min&&0<e){a=(to(e)-t._startValue)/t._valueRange+t._valueOffset}return t.getPixelForDecimal(a)},getValueForPixel:function getValueForPixel(e){var t=this,a=t.getDecimalForPixel(e);return 0===a&&0===t.min?0:Math.pow(10,t._startValue+(a-t._valueOffset)*t._valueRange)}});io._defaults=ao;var oo=Da.valueOrDefault,no=Da.valueAtIndexOrDefault,ro=Da.options.resolve,lo={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:Vi.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function callback(e){return e}}};function tt(e){var t=e.ticks;if(t.display&&e.display){return oo(t.fontSize,_a.global.defaultFontSize)+2*t.backdropPaddingY}return 0}function at(e,t,a){if(Da.isArray(a)){return{w:Da.longestText(e,e.font,a),h:a.length*t}}return{w:e.measureText(a).width,h:t}}function it(e,t,a,i,o){if(e===i||e===o){return{start:t-a/2,end:t+a/2}}else if(e<i||e>o){return{start:t-a,end:t}}return{start:t,end:t+a}}function ot(e){var t=Da.options._parseFont(e.options.pointLabels),a={l:0,r:e.width,t:0,b:e.height-e.paddingTop},o={},n,r,l;e.ctx.font=t.string;e._pointLabelSizes=[];var s=e.chart.data.labels.length;for(n=0;n<s;n++){l=e.getPointPosition(n,e.drawingArea+5);r=at(e.ctx,t.lineHeight,e.pointLabels[n]);e._pointLabelSizes[n]=r;var d=e.getIndexAngle(n),c=Da.toDegrees(d)%360,h=it(c,l.x,r.w,0,180),g=it(c,l.y,r.h,90,270);if(h.start<a.l){a.l=h.start;o.l=d}if(h.end>a.r){a.r=h.end;o.r=d}if(g.start<a.t){a.t=g.start;o.t=d}if(g.end>a.b){a.b=g.end;o.b=d}}e.setReductions(e.drawingArea,a,o)}function nt(e){if(0===e||180===e){return"center"}else if(180>e){return"left"}return"right"}function rt(e,t,a,o){var n=a.y+o/2,r,l;if(Da.isArray(t)){for(r=0,l=t.length;r<l;++r){e.fillText(t[r],a.x,n);n+=o}}else{e.fillText(t,a.x,n)}}function lt(e,t,a){if(90===e||270===e){a.y-=t.h/2}else if(270<e||90>e){a.y-=t.h}}function st(e){var t=e.ctx,a=e.options,o=a.pointLabels,n=tt(a),r=e.getDistanceFromCenterForValue(a.ticks.reverse?e.min:e.max),l=Da.options._parseFont(o);t.save();t.font=l.string;t.textBaseline="middle";for(var s=e.chart.data.labels.length-1;0<=s;s--){var d=0==s?n/2:0,c=e.getPointPosition(s,r+d+5),h=no(o.fontColor,s,_a.global.defaultFontColor);t.fillStyle=h;var g=e.getIndexAngle(s),m=Da.toDegrees(g);t.textAlign=nt(m);lt(m,e._pointLabelSizes[s],c);rt(t,e.pointLabels[s],c,l.lineHeight)}t.restore()}function dt(e,t,a,o){var n=e.ctx,r=t.circular,l=e.chart.data.labels.length,s=no(t.color,o-1),d=no(t.lineWidth,o-1),c;if(!r&&!l||!s||!d){return}n.save();n.strokeStyle=s;n.lineWidth=d;if(n.setLineDash){n.setLineDash(t.borderDash||[]);n.lineDashOffset=t.borderDashOffset||0}n.beginPath();if(r){n.arc(e.xCenter,e.yCenter,a,0,2*Math.PI)}else{c=e.getPointPosition(0,a);n.moveTo(c.x,c.y);for(var h=1;h<l;h++){c=e.getPointPosition(h,a);n.lineTo(c.x,c.y)}}n.closePath();n.stroke();n.restore()}function ct(e){return Da.isNumber(e)?e:0}var so=Ji.extend({setDimensions:function setDimensions(){var e=this;e.width=e.maxWidth;e.height=e.maxHeight;e.paddingTop=tt(e.options)/2;e.xCenter=Math.floor(e.width/2);e.yCenter=Math.floor((e.height-e.paddingTop)/2);e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function determineDataLimits(){var e=this,t=e.chart,a=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;Da.each(t.data.datasets,function(o,n){if(t.isDatasetVisible(n)){var r=t.getDatasetMeta(n);Da.each(o.data,function(t,o){var n=+e.getRightValue(t);if(isNaN(n)||r.data[o].hidden){return}a=Math.min(n,a);i=Math.max(n,i)})}});e.min=a===Number.POSITIVE_INFINITY?0:a;e.max=i===Number.NEGATIVE_INFINITY?0:i;e.handleTickRangeOptions()},_computeTickLimit:function _computeTickLimit(){return Math.ceil(this.drawingArea/tt(this.options))},convertTicksToLabels:function convertTicksToLabels(){var e=this;Ji.prototype.convertTicksToLabels.call(e);e.pointLabels=e.chart.data.labels.map(function(){var t=Da.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""})},getLabelForIndex:function getLabelForIndex(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function fit(){var e=this,t=e.options;if(t.display&&t.pointLabels.display){ot(e)}else{e.setCenterPoint(0,0,0,0)}},setReductions:function setReductions(e,t,a){var i=this,o=t.l/Math.sin(a.l),n=Math.max(t.r-i.width,0)/Math.sin(a.r),r=-t.t/Math.cos(a.t),l=-Math.max(t.b-(i.height-i.paddingTop),0)/Math.cos(a.b);o=ct(o);n=ct(n);r=ct(r);l=ct(l);i.drawingArea=Math.min(Math.floor(e-(o+n)/2),Math.floor(e-(r+l)/2));i.setCenterPoint(o,n,r,l)},setCenterPoint:function setCenterPoint(e,t,a,i){var o=this,n=o.width-t-o.drawingArea,r=e+o.drawingArea,l=a+o.drawingArea,s=o.height-o.paddingTop-i-o.drawingArea;o.xCenter=Math.floor((r+n)/2+o.left);o.yCenter=Math.floor((l+s)/2+o.top+o.paddingTop)},getIndexAngle:function getIndexAngle(e){var t=this.chart,a=360/t.data.labels.length,i=t.options||{},o=i.startAngle||0,n=(e*a+o)%360;return 2*((0>n?n+360:n)*Math.PI)/360},getDistanceFromCenterForValue:function getDistanceFromCenterForValue(e){var t=this;if(Da.isNullOrUndef(e)){return NaN}var a=t.drawingArea/(t.max-t.min);if(t.options.ticks.reverse){return(t.max-e)*a}return(e-t.min)*a},getPointPosition:function getPointPosition(e,t){var a=this,i=a.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(i)*t+a.xCenter,y:Math.sin(i)*t+a.yCenter}},getPointPositionForValue:function getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function getBasePosition(e){var t=this,a=t.min,i=t.max;return t.getPointPositionForValue(e||0,t.beginAtZero?0:0>a&&0>i?i:0<a&&0<i?a:0)},_drawGrid:function _drawGrid(){var e=this,t=e.ctx,a=e.options,o=a.gridLines,n=a.angleLines,r=oo(n.lineWidth,o.lineWidth),l=oo(n.color,o.color),s,d,c;if(a.pointLabels.display){st(e)}if(o.display){Da.each(e.ticks,function(t,a){if(0!==a){d=e.getDistanceFromCenterForValue(e.ticksAsNumbers[a]);dt(e,o,d,a)}})}if(n.display&&r&&l){t.save();t.lineWidth=r;t.strokeStyle=l;if(t.setLineDash){t.setLineDash(ro([n.borderDash,o.borderDash,[]]));t.lineDashOffset=ro([n.borderDashOffset,o.borderDashOffset,0])}for(s=e.chart.data.labels.length-1;0<=s;s--){d=e.getDistanceFromCenterForValue(a.ticks.reverse?e.min:e.max);c=e.getPointPosition(s,d);t.beginPath();t.moveTo(e.xCenter,e.yCenter);t.lineTo(c.x,c.y);t.stroke()}t.restore()}},_drawLabels:function _drawLabels(){var e=this,t=e.ctx,a=e.options,i=a.ticks;if(!i.display){return}var o=e.getIndexAngle(0),n=Da.options._parseFont(i),r=oo(i.fontColor,_a.global.defaultFontColor),l,s;t.save();t.font=n.string;t.translate(e.xCenter,e.yCenter);t.rotate(o);t.textAlign="center";t.textBaseline="middle";Da.each(e.ticks,function(a,o){if(0===o&&!i.reverse){return}l=e.getDistanceFromCenterForValue(e.ticksAsNumbers[o]);if(i.showLabelBackdrop){s=t.measureText(a).width;t.fillStyle=i.backdropColor;t.fillRect(-s/2-i.backdropPaddingX,-l-n.size/2-i.backdropPaddingY,s+2*i.backdropPaddingX,n.size+2*i.backdropPaddingY)}t.fillStyle=r;t.fillText(a,0,-l)});t.restore()},_drawTitle:Da.noop});so._defaults=lo;var co=Da._deprecated,ho=Da.options.resolve,go=Da.valueOrDefault,mo=Number.MIN_SAFE_INTEGER||-9007199254740991,uo=Number.MAX_SAFE_INTEGER||9007199254740991,po={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}},fo=Object.keys(po);function ht(e,t){return e-t}function gt(e){var t={},a=[],o,n,r;for(o=0,n=e.length;o<n;++o){r=e[o];if(!t[r]){t[r]=!0;a.push(r)}}return a}function mt(e){return Da.valueOrDefault(e.time.min,e.ticks.min)}function ut(e){return Da.valueOrDefault(e.time.max,e.ticks.max)}function pt(e,t,a,o){if("linear"===o||!e.length){return[{time:t,pos:0},{time:a,pos:1}]}var n=[],r=[t],l,s,d,c,h;for(l=0,s=e.length;l<s;++l){c=e[l];if(c>t&&c<a){r.push(c)}}r.push(a);for(l=0,s=r.length;l<s;++l){h=r[l+1];d=r[l-1];c=r[l];if(d===void 0||h===void 0||Math.round((h+d)/2)!==c){n.push({time:c,pos:l/(s-1)})}}return n}function ft(e,t,a){var i=0,o=e.length-1,n,r,l;while(0<=i&&i<=o){n=i+o>>1;r=e[n-1]||null;l=e[n];if(!r){return{lo:null,hi:l}}else if(l[t]<a){i=n+1}else if(r[t]>a){o=n-1}else{return{lo:r,hi:l}}}return{lo:l,hi:null}}function yt(e,t,a,i){var o=ft(e,t,a),n=!o.lo?e[0]:!o.hi?e[e.length-2]:o.lo,r=!o.lo?e[1]:!o.hi?e[e.length-1]:o.hi,l=r[t]-n[t],s=l?(a-n[t])/l:0,d=(r[i]-n[i])*s;return n[i]+d}function bt(e,t){var a=e._adapter,i=e.options.time,o=i.parser,n=o||i.format,r=t;if("function"==typeof o){r=o(r)}if(!Da.isFinite(r)){r="string"==typeof n?a.parse(r,n):a.parse(r)}if(null!==r){return+r}if(!o&&"function"==typeof n){r=n(t);if(!Da.isFinite(r)){r=a.parse(r)}}return r}function xt(e,t){if(Da.isNullOrUndef(t)){return null}var a=e.options.time,i=bt(e,e.getRightValue(t));if(null===i){return i}if(a.round){i=+e._adapter.startOf(i,a.round)}return i}function _t(e,t,a,o){var n=fo.length,r,l,s;for(r=fo.indexOf(e);r<n-1;++r){l=po[fo[r]];s=l.steps?l.steps:uo;if(l.common&&Math.ceil((a-t)/(s*l.size))<=o){return fo[r]}}return fo[n-1]}function kt(e,t,a,o,n){var r,l;for(r=fo.length-1;r>=fo.indexOf(a);r--){l=fo[r];if(po[l].common&&e._adapter.diff(n,o,l)>=t-1){return l}}return fo[a?fo.indexOf(a):0]}function vt(e){for(var t=fo.indexOf(e)+1,a=fo.length;t<a;++t){if(po[fo[t]].common){return fo[t]}}}function wt(e,t,a,i){var o=e._adapter,n=e.options,r=n.time,l=r.unit||_t(r.minUnit,t,a,i),s=ho([r.stepSize,r.unitStepSize,1]),d="week"===l?r.isoWeekday:!1,c=t,h=[],g;if(d){c=+o.startOf(c,"isoWeek",d)}c=+o.startOf(c,d?"day":l);if(o.diff(a,t,l)>1e5*s){throw t+" and "+a+" are too far apart with stepSize of "+s+" "+l}for(g=c;g<a;g=+o.add(g,s,l)){h.push(g)}if(g===a||"ticks"===n.bounds){h.push(g)}return h}function St(e,t,a,i,o){var n=0,r=0,l,s;if(o.offset&&t.length){l=yt(e,"time",t[0],"pos");if(1===t.length){n=1-l}else{n=(yt(e,"time",t[1],"pos")-l)/2}s=yt(e,"time",t[t.length-1],"pos");if(1===t.length){r=s}else{r=(s-yt(e,"time",t[t.length-2],"pos"))/2}}return{start:n,end:r,factor:1/(n+1+r)}}function Dt(e,t,a,i){var o=e._adapter,n=+o.startOf(t[0].value,i),r=t[t.length-1].value,l,s;for(l=n;l<=r;l=+o.add(l,1,i)){s=a[l];if(0<=s){t[s].major=!0}}return t}function Ct(e,t,a){var o=[],n={},r=t.length,l,s;for(l=0;l<r;++l){s=t[l];n[s]=l;o.push({value:s,major:!1})}return 0===r||!a?o:Dt(e,o,n,a)}var yo=Gi.extend({initialize:function initialize(){this.mergeTicksOptions();Gi.prototype.initialize.call(this)},update:function update(){var e=this,t=e.options,a=t.time||(t.time={}),i=e._adapter=new zi._date(t.adapters.date);co("time scale",a.format,"time.format","time.parser");co("time scale",a.min,"time.min","ticks.min");co("time scale",a.max,"time.max","ticks.max");Da.mergeIf(a.displayFormats,i.formats());return Gi.prototype.update.apply(e,arguments)},getRightValue:function getRightValue(e){if(e&&e.t!==void 0){e=e.t}return Gi.prototype.getRightValue.call(this,e)},determineDataLimits:function determineDataLimits(){var e=this,t=e.chart,a=e._adapter,o=e.options,n=o.time.unit||"day",r=uo,l=mo,s=[],d=[],c=[],h,g,m,u,p,f,y,b=e._getLabels();for(h=0,m=b.length;h<m;++h){c.push(xt(e,b[h]))}for(h=0,m=(t.data.datasets||[]).length;h<m;++h){if(t.isDatasetVisible(h)){p=t.data.datasets[h].data;if(Da.isObject(p[0])){d[h]=[];for(g=0,u=p.length;g<u;++g){f=xt(e,p[g]);s.push(f);d[h][g]=f}}else{d[h]=c.slice(0);if(!y){s=s.concat(c);y=!0}}}else{d[h]=[]}}if(c.length){r=Math.min(r,c[0]);l=Math.max(l,c[c.length-1])}if(s.length){s=1<m?gt(s).sort(ht):s.sort(ht);r=Math.min(r,s[0]);l=Math.max(l,s[s.length-1])}r=xt(e,mt(o))||r;l=xt(e,ut(o))||l;r=r===uo?+a.startOf(Date.now(),n):r;l=l===mo?+a.endOf(Date.now(),n)+1:l;e.min=Math.min(r,l);e.max=Math.max(r+1,l);e._table=[];e._timestamps={data:s,datasets:d,labels:c}},buildTicks:function buildTicks(){var e=this,t=e.min,a=e.max,o=e.options,n=o.ticks,r=o.time,l=e._timestamps,s=[],d=e.getLabelCapacity(t),c=n.source,h=o.distribution,g,m,u;if("data"===c||"auto"===c&&"series"===h){l=l.data}else if("labels"===c){l=l.labels}else{l=wt(e,t,a,d)}if("ticks"===o.bounds&&l.length){t=l[0];a=l[l.length-1]}t=xt(e,mt(o))||t;a=xt(e,ut(o))||a;for(g=0,m=l.length;g<m;++g){u=l[g];if(u>=t&&u<=a){s.push(u)}}e.min=t;e.max=a;e._unit=r.unit||(n.autoSkip?_t(r.minUnit,e.min,e.max,d):kt(e,s.length,r.minUnit,e.min,e.max));e._majorUnit=!n.major.enabled||"year"===e._unit?void 0:vt(e._unit);e._table=pt(e._timestamps.data,t,a,h);e._offsets=St(e._table,s,t,a,o);if(n.reverse){s.reverse()}return Ct(e,s,e._majorUnit)},getLabelForIndex:function getLabelForIndex(e,t){var a=this,i=a._adapter,o=a.chart.data,n=a.options.time,r=o.labels&&e<o.labels.length?o.labels[e]:"",l=o.datasets[t].data[e];if(Da.isObject(l)){r=a.getRightValue(l)}if(n.tooltipFormat){return i.format(bt(a,r),n.tooltipFormat)}if("string"==typeof r){return r}return i.format(bt(a,r),n.displayFormats.datetime)},tickFormatFunction:function tickFormatFunction(e,t,a,i){var o=this,n=o._adapter,r=o.options,l=r.time.displayFormats,s=l[o._unit],d=o._majorUnit,c=l[d],h=a[t],g=r.ticks,m=d&&c&&h&&h.major,u=n.format(e,i?i:m?c:s),p=m?g.major:g.minor,f=ho([p.callback,p.userCallback,g.callback,g.userCallback]);return f?f(u,t,a):u},convertTicksToLabels:function convertTicksToLabels(e){var t=[],a,o;for(a=0,o=e.length;a<o;++a){t.push(this.tickFormatFunction(e[a].value,a,e))}return t},getPixelForOffset:function getPixelForOffset(e){var t=this,a=t._offsets,i=yt(t._table,"time",e,"pos");return t.getPixelForDecimal((a.start+i)*a.factor)},getPixelForValue:function getPixelForValue(e,t,a){var i=this,o=null;if(t!==void 0&&a!==void 0){o=i._timestamps.datasets[a][t]}if(null===o){o=xt(i,e)}if(null!==o){return i.getPixelForOffset(o)}},getPixelForTick:function getPixelForTick(e){var t=this.getTicks();return 0<=e&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function getValueForPixel(e){var t=this,a=t._offsets,i=t.getDecimalForPixel(e)/a.factor-a.end,o=yt(t._table,"pos",i,"time");return t._adapter._create(o)},_getLabelSize:function _getLabelSize(e){var t=this,a=t.options.ticks,i=t.ctx.measureText(e).width,o=Da.toRadians(t.isHorizontal()?a.maxRotation:a.minRotation),n=Math.cos(o),r=Math.sin(o),l=go(a.fontSize,_a.global.defaultFontSize);return{w:i*n+l*r,h:i*r+l*n}},getLabelWidth:function getLabelWidth(e){return this._getLabelSize(e).w},getLabelCapacity:function getLabelCapacity(e){var t=this,a=t.options.time,i=a.displayFormats,o=i[a.unit]||i.millisecond,n=t.tickFormatFunction(e,0,Ct(t,[e],t._majorUnit),o),r=t._getLabelSize(n),l=Math.floor(t.isHorizontal()?t.width/r.w:t.height/r.h);if(t.options.offset){l--}return 0<l?l:1}});yo._defaults={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}}};var bo=t(function(t){(function(e,a){t.exports=a()})(zt,function(){var Yt;function a(){return Yt.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e){if(Object.getOwnPropertyNames){return 0===Object.getOwnPropertyNames(e).length}else{for(var t in e){if(e.hasOwnProperty(t)){return!1}}return!0}}function l(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var a=[],o;for(o=0;o<e.length;++o){a.push(t(e[o],o))}return a}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function g(e,t){for(var a in t){if(h(t,a)){e[a]=t[a]}}if(h(t,"toString")){e.toString=t.toString}if(h(t,"valueOf")){e.valueOf=t.valueOf}return e}function u(e,t,a,i){return Ke(e,t,a,i,!0).utc()}function p(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function f(e){if(null==e._pf){e._pf=p()}return e._pf}var Wt;if(Array.prototype.some){Wt=Array.prototype.some}else{Wt=function(e){for(var a=Object(this),t=a.length>>>0,o=0;o<t;o++){if(o in a&&e.call(this,a[o],o,a)){return!0}}return!1}}function y(e){if(null==e._isValid){var t=f(e),a=Wt.call(t.parsedDateParts,function(e){return null!=e}),i=!isNaN(e._d.getTime())&&0>t.overflow&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&a);if(e._strict){i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&t.bigHour===void 0}if(null==Object.isFrozen||!Object.isFrozen(e)){e._isValid=i}else{return i}}return e._isValid}function b(e){var t=u(NaN);if(null!=e){g(f(t),e)}else{f(t).userInvalidated=!0}return t}var zt=a.momentProperties=[];function x(e,t){var a,o,n;if(!l(t._isAMomentObject)){e._isAMomentObject=t._isAMomentObject}if(!l(t._i)){e._i=t._i}if(!l(t._f)){e._f=t._f}if(!l(t._l)){e._l=t._l}if(!l(t._strict)){e._strict=t._strict}if(!l(t._tzm)){e._tzm=t._tzm}if(!l(t._isUTC)){e._isUTC=t._isUTC}if(!l(t._offset)){e._offset=t._offset}if(!l(t._pf)){e._pf=f(t)}if(!l(t._locale)){e._locale=t._locale}if(0<zt.length){for(a=0;a<zt.length;a++){o=zt[a];n=t[o];if(!l(n)){e[o]=n}}}return e}var Vt=!1;function _(e){x(this,e);this._d=new Date(null!=e._d?e._d.getTime():NaN);if(!this.isValid()){this._d=new Date(NaN)}if(!1===Vt){Vt=!0;a.updateOffset(this);Vt=!1}}function k(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function v(e){if(0>e){return Math.ceil(e)||0}else{return Math.floor(e)}}function w(e){var t=+e,a=0;if(0!=t&&isFinite(t)){a=v(t)}return a}function S(e,t,a){var o=Math.min(e.length,t.length),n=Math.abs(e.length-t.length),r=0,l;for(l=0;l<o;l++){if(a&&e[l]!==t[l]||!a&&w(e[l])!==w(t[l])){r++}}return r+n}function D(e){if(!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn){console.warn("Deprecation warning: "+e)}}function C(e,t){var o=!0;return g(function(){if(null!=a.deprecationHandler){a.deprecationHandler(null,e)}if(o){for(var n=[],r,l=0;l<arguments.length;l++){r="";if("object"===_typeof(arguments[l])){r+="\n["+l+"] ";for(var s in arguments[0]){r+=s+": "+arguments[0][s]+", "}r=r.slice(0,-2)}else{r=arguments[l]}n.push(r)}D(e+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+new Error().stack);o=!1}return t.apply(this,arguments)},t)}var Ht={};function P(e,t){if(null!=a.deprecationHandler){a.deprecationHandler(e,t)}if(!Ht[e]){D(t);Ht[e]=!0}}a.suppressDeprecationWarnings=!1;a.deprecationHandler=null;function T(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e,t){var a=g({},e),i;for(i in t){if(h(t,i)){if(n(e[i])&&n(t[i])){a[i]={};g(a[i],e[i]);g(a[i],t[i])}else if(null!=t[i]){a[i]=t[i]}else{delete a[i]}}}for(i in e){if(h(e,i)&&!h(t,i)&&n(e[i])){a[i]=g({},a[i])}}return a}function A(e){if(null!=e){this.set(e)}}var Bt;if(Object.keys){Bt=Object.keys}else{Bt=function(e){var t,a=[];for(t in e){if(h(e,t)){a.push(t)}}return a}}var Nt={};function M(e,t){var a=e.toLowerCase();Nt[a]=Nt[a+"s"]=Nt[t]=e}function I(e){return"string"==typeof e?Nt[e]||Nt[e.toLowerCase()]:void 0}function L(e){var t={},a,i;for(i in e){if(h(e,i)){a=I(i);if(a){t[a]=e[i]}}}return t}var Ut={};function F(e,t){Ut[e]=t}function R(e){var t=[];for(var a in e){t.push({unit:a,priority:Ut[a]})}t.sort(function(e,t){return e.priority-t.priority});return t}function E(e,t,a){var i=""+Math.abs(e),o=t-i.length;return(0<=e?a?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+i}var jt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Gt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,qt={},Kt={};function Y(e,t,a,i){var o=i;if("string"==typeof i){o=function(){return this[i]()}}if(e){Kt[e]=o}if(t){Kt[t[0]]=function(){return E(o.apply(this,arguments),t[1],t[2])}}if(a){Kt[a]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)}}}function W(e){if(e.match(/\[[\s\S]/)){return e.replace(/^\[|\]$/g,"")}return e.replace(/\\/g,"")}function z(e){var t=e.match(jt),a,o;for(a=0,o=t.length;a<o;a++){if(Kt[t[a]]){t[a]=Kt[t[a]]}else{t[a]=W(t[a])}}return function(a){var n="",r;for(r=0;r<o;r++){n+=T(t[r])?t[r].call(a,e):t[r]}return n}}function V(e,t){if(!e.isValid()){return e.localeData().invalidDate()}t=H(t,e.localeData());qt[t]=qt[t]||z(t);return qt[t](e)}function H(e,t){var o=5;function a(e){return t.longDateFormat(e)||e}Gt.lastIndex=0;while(0<=o&&Gt.test(e)){e=e.replace(Gt,a);Gt.lastIndex=0;o-=1}return e}var Xt=/\d/,Zt=/\d\d/,Jt=/\d{3}/,Qt=/\d{4}/,$t=/[+-]?\d{6}/,ea=/\d\d?/,ta=/\d\d\d\d?/,aa=/\d\d\d\d\d\d?/,ia=/\d{1,3}/,oa=/\d{1,4}/,na=/[+-]?\d{1,6}/,ra=/[+-]?\d+/,la=/Z|[+-]\d\d(?::?\d\d)?/gi,sa=/[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,da={};function B(e,t,a){da[e]=T(t)?t:function(e){return e&&a?a:t}}function N(e,t){if(!h(da,e)){return new RegExp(U(e))}return da[e](t._strict,t._locale)}function U(e){return j(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,a,i,o){return t||a||i||o}))}function j(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ca={};function G(e,t){var a,o=t;if("string"==typeof e){e=[e]}if(s(t)){o=function(e,a){a[t]=w(e)}}for(a=0;a<e.length;a++){ca[e[a]]=o}}function q(e,t){G(e,function(e,a,i,o){i._w=i._w||{};t(e,i._w,i,o)})}function K(e,t,a){if(null!=t&&h(ca,e)){ca[e](t,a._a,a,e)}}var ha=1,ga=2,ma=3,ua=4,pa=5,fa=6;Y("Y",0,0,function(){var e=this.year();return 9999>=e?""+e:"+"+e});Y(0,["YY",2],0,function(){return this.year()%100});Y(0,["YYYY",4],0,"year");Y(0,["YYYYY",5],0,"year");Y(0,["YYYYYY",6,!0],0,"year");M("year","y");F("year",1);B("Y",ra);B("YY",ea,Zt);B("YYYY",oa,Qt);B("YYYYY",na,$t);B("YYYYYY",na,$t);G(["YYYYY","YYYYYY"],0);G("YYYY",function(e,t){t[0]=2===e.length?a.parseTwoDigitYear(e):w(e)});G("YY",function(e,t){t[0]=a.parseTwoDigitYear(e)});G("Y",function(e,t){t[0]=parseInt(e,10)});function X(e){return Z(e)?366:365}function Z(e){return 0==e%4&&0!=e%100||0==e%400}a.parseTwoDigitYear=function(e){return w(e)+(68<w(e)?1900:2e3)};var ya=J("FullYear",!0);function J(e,t){return function(i){if(null!=i){$(this,e,i);a.updateOffset(this,t);return this}else{return Q(this,e)}}}function Q(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function $(e,t,a){if(e.isValid()&&!isNaN(a)){if("FullYear"===t&&Z(e.year())&&1===e.month()&&29===e.date()){e._d["set"+(e._isUTC?"UTC":"")+t](a,e.month(),ae(a,e.month()))}else{e._d["set"+(e._isUTC?"UTC":"")+t](a)}}}function ee(e,t){if("object"===_typeof(e)){e=L(e);for(var a=R(e),o=0;o<a.length;o++){this[a[o].unit](e[a[o].unit])}}else{e=I(e);if(T(this[e])){return this[e](t)}}return this}function te(e,t){return(e%t+t)%t}var ba;if(Array.prototype.indexOf){ba=Array.prototype.indexOf}else{ba=function(e){var t;for(t=0;t<this.length;++t){if(this[t]===e){return t}}return-1}}function ae(e,t){if(isNaN(e)||isNaN(t)){return NaN}var a=te(t,12);e+=(t-a)/12;return 1===a?Z(e)?29:28:31-a%7%2}Y("M",["MM",2],"Mo",function(){return this.month()+1});Y("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Y("MMMM",0,0,function(e){return this.localeData().months(this,e)});M("month","M");F("month",8);B("M",ea);B("MM",ea,Zt);B("MMM",function(e,t){return t.monthsShortRegex(e)});B("MMMM",function(e,t){return t.monthsRegex(e)});G(["M","MM"],function(e,t){t[ha]=w(e)-1});G(["MMM","MMMM"],function(e,t,a,i){var o=a._locale.monthsParse(e,i,a._strict);if(null!=o){t[ha]=o}else{f(a).invalidMonth=e}});var xa=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;var _a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ie(e,t,a){var o,n,r,l=e.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[];for(o=0;12>o;++o){r=u([2e3,o]);this._shortMonthsParse[o]=this.monthsShort(r,"").toLocaleLowerCase();this._longMonthsParse[o]=this.months(r,"").toLocaleLowerCase()}}if(a){if("MMM"===t){n=ba.call(this._shortMonthsParse,l);return-1!==n?n:null}else{n=ba.call(this._longMonthsParse,l);return-1!==n?n:null}}else{if("MMM"===t){n=ba.call(this._shortMonthsParse,l);if(-1!==n){return n}n=ba.call(this._longMonthsParse,l);return-1!==n?n:null}else{n=ba.call(this._longMonthsParse,l);if(-1!==n){return n}n=ba.call(this._shortMonthsParse,l);return-1!==n?n:null}}}function oe(e,t){var a;if(!e.isValid()){return e}if("string"==typeof t){if(/^\d+$/.test(t)){t=w(t)}else{t=e.localeData().monthsParse(t);if(!s(t)){return e}}}a=Math.min(e.date(),ae(e.year(),t));e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,a);return e}function ne(e){if(null!=e){oe(this,e);a.updateOffset(this,!0);return this}else{return Q(this,"Month")}}function re(){function e(e,t){return t.length-e.length}var t=[],a=[],o=[],n,r;for(n=0;12>n;n++){r=u([2e3,n]);t.push(this.monthsShort(r,""));a.push(this.months(r,""));o.push(this.months(r,""));o.push(this.monthsShort(r,""))}t.sort(e);a.sort(e);o.sort(e);for(n=0;12>n;n++){t[n]=j(t[n]);a[n]=j(a[n])}for(n=0;24>n;n++){o[n]=j(o[n])}this._monthsRegex=new RegExp("^("+o.join("|")+")","i");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function le(e,t,a,i,o,n,r){var l;if(100>e&&0<=e){l=new Date(e+400,t,a,i,o,n,r);if(isFinite(l.getFullYear())){l.setFullYear(e)}}else{l=new Date(e,t,a,i,o,n,r)}return l}function se(e){var t;if(100>e&&0<=e){var a=Array.prototype.slice.call(arguments);a[0]=e+400;t=new Date(Date.UTC.apply(null,a));if(isFinite(t.getUTCFullYear())){t.setUTCFullYear(e)}}else{t=new Date(Date.UTC.apply(null,arguments))}return t}function de(e,t,a){var i=7+t-a,o=(7+se(e,0,i).getUTCDay()-t)%7;return-o+i-1}function ce(e,t,a,i,o){var n=de(e,i,o),r=1+7*(t-1)+(7+a-i)%7+n,l,s;if(0>=r){l=e-1;s=X(l)+r}else if(r>X(e)){l=e+1;s=r-X(e)}else{l=e;s=r}return{year:l,dayOfYear:s}}function he(e,t,a){var i=de(e.year(),t,a),o=Math.floor((e.dayOfYear()-i-1)/7)+1,n,r;if(1>o){r=e.year()-1;n=o+ge(r,t,a)}else if(o>ge(e.year(),t,a)){n=o-ge(e.year(),t,a);r=e.year()+1}else{r=e.year();n=o}return{week:n,year:r}}function ge(e,t,a){var i=de(e,t,a),o=de(e+1,t,a);return(X(e)-i+o)/7}Y("w",["ww",2],"wo","week");Y("W",["WW",2],"Wo","isoWeek");M("week","w");M("isoWeek","W");F("week",5);F("isoWeek",5);B("w",ea);B("ww",ea,Zt);B("W",ea);B("WW",ea,Zt);q(["w","ww","W","WW"],function(e,t,a,i){t[i.substr(0,1)]=w(e)});Y("d",0,"do","day");Y("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Y("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Y("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Y("e",0,0,"weekday");Y("E",0,0,"isoWeekday");M("day","d");M("weekday","e");M("isoWeekday","E");F("day",11);F("weekday",11);F("isoWeekday",11);B("d",ea);B("e",ea);B("E",ea);B("dd",function(e,t){return t.weekdaysMinRegex(e)});B("ddd",function(e,t){return t.weekdaysShortRegex(e)});B("dddd",function(e,t){return t.weekdaysRegex(e)});q(["dd","ddd","dddd"],function(e,t,a,i){var o=a._locale.weekdaysParse(e,i,a._strict);if(null!=o){t.d=o}else{f(a).invalidWeekday=e}});q(["d","e","E"],function(e,t,a,i){t[i]=w(e)});function me(e,t){if("string"!=typeof e){return e}if(!isNaN(e)){return parseInt(e,10)}e=t.weekdaysParse(e);if("number"==typeof e){return e}return null}function ue(e,t){if("string"==typeof e){return t.weekdaysParse(e)%7||7}return isNaN(e)?null:e}function pe(e,t){return e.slice(t,7).concat(e.slice(0,t))}var ka=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function fe(e,t,a){var o,n,r,l=e.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(o=0;7>o;++o){r=u([2e3,1]).day(o);this._minWeekdaysParse[o]=this.weekdaysMin(r,"").toLocaleLowerCase();this._shortWeekdaysParse[o]=this.weekdaysShort(r,"").toLocaleLowerCase();this._weekdaysParse[o]=this.weekdays(r,"").toLocaleLowerCase()}}if(a){if("dddd"===t){n=ba.call(this._weekdaysParse,l);return-1!==n?n:null}else if("ddd"===t){n=ba.call(this._shortWeekdaysParse,l);return-1!==n?n:null}else{n=ba.call(this._minWeekdaysParse,l);return-1!==n?n:null}}else{if("dddd"===t){n=ba.call(this._weekdaysParse,l);if(-1!==n){return n}n=ba.call(this._shortWeekdaysParse,l);if(-1!==n){return n}n=ba.call(this._minWeekdaysParse,l);return-1!==n?n:null}else if("ddd"===t){n=ba.call(this._shortWeekdaysParse,l);if(-1!==n){return n}n=ba.call(this._weekdaysParse,l);if(-1!==n){return n}n=ba.call(this._minWeekdaysParse,l);return-1!==n?n:null}else{n=ba.call(this._minWeekdaysParse,l);if(-1!==n){return n}n=ba.call(this._weekdaysParse,l);if(-1!==n){return n}n=ba.call(this._shortWeekdaysParse,l);return-1!==n?n:null}}}function ye(){function e(e,t){return t.length-e.length}var t=[],a=[],o=[],n=[],r,l,s,d,c;for(r=0;7>r;r++){l=u([2e3,1]).day(r);s=this.weekdaysMin(l,"");d=this.weekdaysShort(l,"");c=this.weekdays(l,"");t.push(s);a.push(d);o.push(c);n.push(s);n.push(d);n.push(c)}t.sort(e);a.sort(e);o.sort(e);n.sort(e);for(r=0;7>r;r++){a[r]=j(a[r]);o[r]=j(o[r]);n[r]=j(n[r])}this._weekdaysRegex=new RegExp("^("+n.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function be(){return this.hours()%12||12}Y("H",["HH",2],0,"hour");Y("h",["hh",2],0,be);Y("k",["kk",2],0,function(){return this.hours()||24});Y("hmm",0,0,function(){return""+be.apply(this)+E(this.minutes(),2)});Y("hmmss",0,0,function(){return""+be.apply(this)+E(this.minutes(),2)+E(this.seconds(),2)});Y("Hmm",0,0,function(){return""+this.hours()+E(this.minutes(),2)});Y("Hmmss",0,0,function(){return""+this.hours()+E(this.minutes(),2)+E(this.seconds(),2)});function xe(e,t){Y(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}xe("a",!0);xe("A",!1);M("hour","h");F("hour",13);function _e(e,t){return t._meridiemParse}B("a",_e);B("A",_e);B("H",ea);B("h",ea);B("k",ea);B("HH",ea,Zt);B("hh",ea,Zt);B("kk",ea,Zt);B("hmm",ta);B("hmmss",aa);B("Hmm",ta);B("Hmmss",aa);G(["H","HH"],ma);G(["k","kk"],function(e,t){var a=w(e);t[ma]=24===a?0:a});G(["a","A"],function(e,t,a){a._isPm=a._locale.isPM(e);a._meridiem=e});G(["h","hh"],function(e,t,a){t[ma]=w(e);f(a).bigHour=!0});G("hmm",function(e,t,a){var i=e.length-2;t[ma]=w(e.substr(0,i));t[ua]=w(e.substr(i));f(a).bigHour=!0});G("hmmss",function(e,t,a){var i=e.length-4,o=e.length-2;t[ma]=w(e.substr(0,i));t[ua]=w(e.substr(i,2));t[pa]=w(e.substr(o));f(a).bigHour=!0});G("Hmm",function(e,t){var a=e.length-2;t[ma]=w(e.substr(0,a));t[ua]=w(e.substr(a))});G("Hmmss",function(e,t){var a=e.length-4,i=e.length-2;t[ma]=w(e.substr(0,a));t[ua]=w(e.substr(a,2));t[pa]=w(e.substr(i))});var va=J("Hours",!0),wa={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:_a,week:{dow:0,doy:6},weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekdaysShort:ka,meridiemParse:/[ap]\.?m?\.?/i},Sa={},Da={},Ca;function ke(e){return e?e.toLowerCase().replace("_","-"):e}function ve(e){var t=0,a,o,n,r;while(t<e.length){r=ke(e[t]).split("-");a=r.length;o=ke(e[t+1]);o=o?o.split("-"):null;while(0<a){n=we(r.slice(0,a).join("-"));if(n){return n}if(o&&o.length>=a&&S(r,o,!0)>=a-1){break}a--}t++}return Ca}function we(a){var i=null;if(!Sa[a]&&!0&&t&&t.exports){try{i=Ca._abbr;e("./locale/"+a);Se(i)}catch(t){}}return Sa[a]}function Se(e,t){var a;if(e){if(l(t)){a=Ce(e)}else{a=De(e,t)}if(a){Ca=a}else{if("undefined"!=typeof console&&console.warn){console.warn("Locale "+e+" not found. Did you forget to load it?")}}}return Ca._abbr}function De(e,t){if(null!==t){var a,i=wa;t.abbr=e;if(null!=Sa[e]){P("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=Sa[e]._config}else if(null!=t.parentLocale){if(null!=Sa[t.parentLocale]){i=Sa[t.parentLocale]._config}else{a=we(t.parentLocale);if(null!=a){i=a._config}else{if(!Da[t.parentLocale]){Da[t.parentLocale]=[]}Da[t.parentLocale].push({name:e,config:t});return null}}}Sa[e]=new A(O(i,t));if(Da[e]){Da[e].forEach(function(e){De(e.name,e.config)})}Se(e);return Sa[e]}else{delete Sa[e];return null}}function Ce(e){var t;if(e&&e._locale&&e._locale._abbr){e=e._locale._abbr}if(!e){return Ca}if(!o(e)){t=we(e);if(t){return t}e=[e]}return ve(e)}function Pe(){return Bt(Sa)}function Te(e){var t,i=e._a;if(i&&-2===f(e).overflow){t=0>i[ha]||11<i[ha]?ha:1>i[ga]||i[ga]>ae(i[0],i[ha])?ga:0>i[ma]||24<i[ma]||24===i[ma]&&(0!==i[ua]||0!==i[pa]||0!==i[fa])?ma:0>i[ua]||59<i[ua]?ua:0>i[pa]||59<i[pa]?pa:0>i[fa]||999<i[fa]?fa:-1;if(f(e)._overflowDayOfYear&&(t<0||t>ga)){t=ga}if(f(e)._overflowWeeks&&-1===t){t=7}if(f(e)._overflowWeekday&&-1===t){t=8}f(e).overflow=t}return e}function Oe(e,t,a){if(null!=e){return e}if(null!=t){return t}return a}function Ae(e){var t=new Date(a.now());if(e._useUTC){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]}return[t.getFullYear(),t.getMonth(),t.getDate()]}function Me(e){var t,a,o=[],n,r,l;if(e._d){return}n=Ae(e);if(e._w&&null==e._a[ga]&&null==e._a[ha]){Ie(e)}if(null!=e._dayOfYear){l=Oe(e._a[0],n[0]);if(e._dayOfYear>X(l)||0===e._dayOfYear){f(e)._overflowDayOfYear=!0}a=se(l,0,e._dayOfYear);e._a[ha]=a.getUTCMonth();e._a[ga]=a.getUTCDate()}for(t=0;3>t&&null==e._a[t];++t){e._a[t]=o[t]=n[t]}for(;7>t;t++){e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t]}if(24===e._a[ma]&&0===e._a[ua]&&0===e._a[pa]&&0===e._a[fa]){e._nextDay=!0;e._a[ma]=0}e._d=(e._useUTC?se:le).apply(null,o);r=e._useUTC?e._d.getUTCDay():e._d.getDay();if(null!=e._tzm){e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm)}if(e._nextDay){e._a[ma]=24}if(e._w&&"undefined"!=typeof e._w.d&&e._w.d!==r){f(e).weekdayMismatch=!0}}function Ie(e){var t,a,i,o,n,r,l,s;t=e._w;if(null!=t.GG||null!=t.W||null!=t.E){n=1;r=4;a=Oe(t.GG,e._a[0],he(Xe(),1,4).year);i=Oe(t.W,1);o=Oe(t.E,1);if(1>o||7<o){s=!0}}else{n=e._locale._week.dow;r=e._locale._week.doy;var d=he(Xe(),n,r);a=Oe(t.gg,e._a[0],d.year);i=Oe(t.w,d.week);if(null!=t.d){o=t.d;if(0>o||6<o){s=!0}}else if(null!=t.e){o=t.e+n;if(0>t.e||6<t.e){s=!0}}else{o=n}}if(1>i||i>ge(a,n,r)){f(e)._overflowWeeks=!0}else if(null!=s){f(e)._overflowWeekday=!0}else{l=ce(a,i,o,n,r);e._a[0]=l.year;e._dayOfYear=l.dayOfYear}}var Pa=[["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}/]],Ta=[["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/]];function Le(e){var t,a,o=e._i,n=/^\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)?)?$/.exec(o)||/^\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)?)?$/.exec(o),r,s,d,c;if(n){f(e).iso=!0;for(t=0,a=Pa.length;t<a;t++){if(Pa[t][1].exec(n[1])){s=Pa[t][0];r=!1!==Pa[t][2];break}}if(null==s){e._isValid=!1;return}if(n[3]){for(t=0,a=Ta.length;t<a;t++){if(Ta[t][1].exec(n[3])){d=(n[2]||" ")+Ta[t][0];break}}if(null==d){e._isValid=!1;return}}if(!r&&null!=d){e._isValid=!1;return}if(n[4]){if(/Z|[+-]\d\d(?::?\d\d)?/.exec(n[4])){c="Z"}else{e._isValid=!1;return}}e._f=s+(d||"")+(c||"");He(e)}else{e._isValid=!1}}function Fe(e,t,a,i,o,n){var r=[Re(e),_a.indexOf(t),parseInt(a,10),parseInt(i,10),parseInt(o,10)];if(n){r.push(parseInt(n,10))}return r}function Re(e){var t=parseInt(e,10);if(49>=t){return 2e3+t}else if(999>=t){return 1900+t}return t}function Ee(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ye(e,t,a){if(e){var i=ka.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(i!==o){f(a).weekdayMismatch=!0;a._isValid=!1;return!1}}return!0}var Oa={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function We(e,t,a){if(e){return Oa[e]}else if(t){return 0}else{var i=parseInt(a,10),o=i%100;return 60*((i-o)/100)+o}}function ze(e){var t=/^(?:(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}))$/.exec(Ee(e._i));if(t){var a=Fe(t[4],t[3],t[2],t[5],t[6],t[7]);if(!Ye(t[1],a,e)){return}e._a=a;e._tzm=We(t[8],t[9],t[10]);e._d=se.apply(null,e._a);e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm);f(e).rfc2822=!0}else{e._isValid=!1}}function Ve(e){var t=/^\/?Date\((\-?\d+)/i.exec(e._i);if(null!==t){e._d=new Date(+t[1]);return}Le(e);if(!1===e._isValid){delete e._isValid}else{return}ze(e);if(!1===e._isValid){delete e._isValid}else{return}a.createFromInputFallback(e)}a.createFromInputFallback=C("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 and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});a.ISO_8601=function(){};a.RFC_2822=function(){};function He(e){if(e._f===a.ISO_8601){Le(e);return}if(e._f===a.RFC_2822){ze(e);return}e._a=[];f(e).empty=!0;var t=""+e._i,o,n,r,l,s,d=t.length,c=0;r=H(e._f,e._locale).match(jt)||[];for(o=0;o<r.length;o++){l=r[o];n=(t.match(N(l,e))||[])[0];if(n){s=t.substr(0,t.indexOf(n));if(0<s.length){f(e).unusedInput.push(s)}t=t.slice(t.indexOf(n)+n.length);c+=n.length}if(Kt[l]){if(n){f(e).empty=!1}else{f(e).unusedTokens.push(l)}K(l,n,e)}else if(e._strict&&!n){f(e).unusedTokens.push(l)}}f(e).charsLeftOver=d-c;if(0<t.length){f(e).unusedInput.push(t)}if(12>=e._a[ma]&&!0===f(e).bigHour&&0<e._a[ma]){f(e).bigHour=void 0}f(e).parsedDateParts=e._a.slice(0);f(e).meridiem=e._meridiem;e._a[ma]=Be(e._locale,e._a[ma],e._meridiem);Me(e);Te(e)}function Be(e,t,a){var i;if(null==a){return t}if(null!=e.meridiemHour){return e.meridiemHour(t,a)}else if(null!=e.isPM){i=e.isPM(a);if(i&&12>t){t+=12}if(!i&&12===t){t=0}return t}else{return t}}function Ne(e){var t,a,o,n,r;if(0===e._f.length){f(e).invalidFormat=!0;e._d=new Date(NaN);return}for(n=0;n<e._f.length;n++){r=0;t=x({},e);if(null!=e._useUTC){t._useUTC=e._useUTC}t._f=e._f[n];He(t);if(!y(t)){continue}r+=f(t).charsLeftOver;r+=10*f(t).unusedTokens.length;f(t).score=r;if(null==o||r<o){o=r;a=t}}g(e,a||t)}function Ue(e){if(e._d){return}var t=L(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)});Me(e)}function je(e){var t=new _(Te(Ge(e)));if(t._nextDay){t.add(1,"d");t._nextDay=void 0}return t}function Ge(e){var t=e._i,a=e._f;e._locale=e._locale||Ce(e._l);if(null===t||a===void 0&&""===t){return b({nullInput:!0})}if("string"==typeof t){e._i=t=e._locale.preparse(t)}if(k(t)){return new _(Te(t))}else if(d(t)){e._d=t}else if(o(a)){Ne(e)}else if(a){He(e)}else{qe(e)}if(!y(e)){e._d=null}return e}function qe(e){var t=e._i;if(l(t)){e._d=new Date(a.now())}else if(d(t)){e._d=new Date(t.valueOf())}else if("string"==typeof t){Ve(e)}else if(o(t)){e._a=c(t.slice(0),function(e){return parseInt(e,10)});Me(e)}else if(n(t)){Ue(e)}else if(s(t)){e._d=new Date(t)}else{a.createFromInputFallback(e)}}function Ke(e,t,a,i,l){var s={};if(!0===a||!1===a){i=a;a=void 0}if(n(e)&&r(e)||o(e)&&0===e.length){e=void 0}s._isAMomentObject=!0;s._useUTC=s._isUTC=l;s._l=a;s._i=e;s._f=t;s._strict=i;return je(s)}function Xe(e,t,a,i){return Ke(e,t,a,i,!1)}var Aa=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Xe.apply(null,arguments);if(this.isValid()&&e.isValid()){return e<this?this:e}else{return b()}}),Ma=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Xe.apply(null,arguments);if(this.isValid()&&e.isValid()){return e>this?this:e}else{return b()}});function Ze(e,t){var a,n;if(1===t.length&&o(t[0])){t=t[0]}if(!t.length){return Xe()}a=t[0];for(n=1;n<t.length;++n){if(!t[n].isValid()||t[n][e](a)){a=t[n]}}return a}var Ia=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Je(e){for(var t in e){if(!(-1!==ba.call(Ia,t)&&(null==e[t]||!isNaN(e[t])))){return!1}}for(var a=!1,o=0;o<Ia.length;++o){if(e[Ia[o]]){if(a){return!1}if(parseFloat(e[Ia[o]])!==w(e[Ia[o]])){a=!0}}}return!0}function Qe(e){var t=L(e),a=t.year||0,i=t.quarter||0,o=t.month||0,n=t.week||t.isoWeek||0,r=t.day||0,l=t.hour||0,s=t.minute||0,d=t.second||0,c=t.millisecond||0;this._isValid=Je(t);this._milliseconds=+c+1e3*d+6e4*s+60*(60*(1e3*l));this._days=+r+7*n;this._months=+o+3*i+12*a;this._data={};this._locale=Ce();this._bubble()}function $e(e){return e instanceof Qe}function et(e){if(0>e){return-1*Math.round(-1*e)}else{return Math.round(e)}}function tt(e,t){Y(e,0,0,function(){var e=this.utcOffset(),a="+";if(0>e){e=-e;a="-"}return a+E(~~(e/60),2)+t+E(~~e%60,2)})}tt("Z",":");tt("ZZ","");B("Z",la);B("ZZ",la);G(["Z","ZZ"],function(e,t,a){a._useUTC=!0;a._tzm=at(la,e)});function at(e,t){var a=(t||"").match(e);if(null===a){return null}var i=a[a.length-1]||[],o=(i+"").match(/([\+\-]|\d\d)/gi)||["-",0,0],n=+(60*o[1])+w(o[2]);return 0===n?0:"+"===o[0]?n:-n}function it(e,t){var i,o;if(t._isUTC){i=t.clone();o=(k(e)||d(e)?e.valueOf():Xe(e).valueOf())-i.valueOf();i._d.setTime(i._d.valueOf()+o);a.updateOffset(i,!1);return i}else{return Xe(e).local()}}function ot(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}a.updateOffset=function(){};function nt(){return this.isValid()?this._isUTC&&0===this._offset:!1}function rt(e,t){var a=e,i=null,o,n,r;if($e(e)){a={ms:e._milliseconds,d:e._days,M:e._months}}else if(s(e)){a={};if(t){a[t]=e}else{a.milliseconds=e}}else if(!!(i=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/.exec(e))){o="-"===i[1]?-1:1;a={y:0,d:w(i[ga])*o,h:w(i[ma])*o,m:w(i[ua])*o,s:w(i[pa])*o,ms:w(et(1e3*i[fa]))*o}}else if(!!(i=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/.exec(e))){o="-"===i[1]?-1:1;a={y:lt(i[2],o),M:lt(i[3],o),w:lt(i[4],o),d:lt(i[5],o),h:lt(i[6],o),m:lt(i[7],o),s:lt(i[8],o)}}else if(null==a){a={}}else if("object"===_typeof(a)&&("from"in a||"to"in a)){r=dt(Xe(a.from),Xe(a.to));a={};a.ms=r.milliseconds;a.M=r.months}n=new Qe(a);if($e(e)&&h(e,"_locale")){n._locale=e._locale}return n}rt.fn=Qe.prototype;rt.invalid=function(){return rt(NaN)};function lt(e,t){var a=e&&parseFloat(e.replace(",","."));return(isNaN(a)?0:a)*t}function st(e,t){var a={months:t.month()-e.month()+12*(t.year()-e.year())};if(e.clone().add(a.months,"M").isAfter(t)){--a.months}a.milliseconds=+t-+e.clone().add(a.months,"M");return a}function dt(e,t){var a;if(!(e.isValid()&&t.isValid())){return{milliseconds:0,months:0}}t=it(t,e);if(e.isBefore(t)){a=st(e,t)}else{a=st(t,e);a.milliseconds=-a.milliseconds;a.months=-a.months}return a}function ct(e,t){return function(a,i){var o,n;if(null!==i&&!isNaN(+i)){P(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.");n=a;a=i;i=n}a="string"==typeof a?+a:a;o=rt(a,i);ht(this,o,e);return this}}function ht(e,t,i,o){var n=t._milliseconds,r=et(t._days),l=et(t._months);if(!e.isValid()){return}o=null==o?!0:o;if(l){oe(e,Q(e,"Month")+l*i)}if(r){$(e,"Date",Q(e,"Date")+r*i)}if(n){e._d.setTime(e._d.valueOf()+n*i)}if(o){a.updateOffset(e,r||l)}}var La=ct(1,"add"),Fa=ct(-1,"subtract");function gt(e,t){var a=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(a,"months"),o,n;if(0>t-i){o=e.clone().add(a-1,"months");n=(t-i)/(i-o)}else{o=e.clone().add(a+1,"months");n=(t-i)/(o-i)}return-(a+n)||0}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function mt(e){var t;if(e===void 0){return this._locale._abbr}else{t=Ce(e);if(null!=t){this._locale=t}return this}}var Ra=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){if(e===void 0){return this.localeData()}else{return this.locale(e)}});function ut(){return this._locale}var Ea=60000,Ya=60*Ea,Wa=3506328*Ya;function pt(e,t){return(e%t+t)%t}function ft(e,t,a){if(100>e&&0<=e){return new Date(e+400,t,a)-Wa}else{return new Date(e,t,a).valueOf()}}function yt(e,t,a){if(100>e&&0<=e){return Date.UTC(e+400,t,a)-Wa}else{return Date.UTC(e,t,a)}}Y(0,["gg",2],0,function(){return this.weekYear()%100});Y(0,["GG",2],0,function(){return this.isoWeekYear()%100});function bt(e,t){Y(0,[e,e.length],0,t)}bt("gggg","weekYear");bt("ggggg","weekYear");bt("GGGG","isoWeekYear");bt("GGGGG","isoWeekYear");M("weekYear","gg");M("isoWeekYear","GG");F("weekYear",1);F("isoWeekYear",1);B("G",ra);B("g",ra);B("GG",ea,Zt);B("gg",ea,Zt);B("GGGG",oa,Qt);B("gggg",oa,Qt);B("GGGGG",na,$t);B("ggggg",na,$t);q(["gggg","ggggg","GGGG","GGGGG"],function(e,t,a,i){t[i.substr(0,2)]=w(e)});q(["gg","GG"],function(e,t,i,o){t[o]=a.parseTwoDigitYear(e)});function xt(e,t,a,i,o){var n;if(null==e){return he(this,i,o).year}else{n=ge(e,i,o);if(t>n){t=n}return _t.call(this,e,t,a,i,o)}}function _t(e,t,a,i,o){var n=ce(e,t,a,i,o),r=se(n.year,0,n.dayOfYear);this.year(r.getUTCFullYear());this.month(r.getUTCMonth());this.date(r.getUTCDate());return this}Y("Q",0,"Qo","quarter");M("quarter","Q");F("quarter",7);B("Q",Xt);G("Q",function(e,t){t[ha]=3*(w(e)-1)});Y("D",["DD",2],"Do","date");M("date","D");F("date",9);B("D",ea);B("DD",ea,Zt);B("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});G(["D","DD"],ga);G("Do",function(e,t){t[ga]=w(e.match(ea)[0])});var za=J("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear");M("dayOfYear","DDD");F("dayOfYear",4);B("DDD",ia);B("DDDD",Jt);G(["DDD","DDDD"],function(e,t,a){a._dayOfYear=w(e)});Y("m",["mm",2],0,"minute");M("minute","m");F("minute",14);B("m",ea);B("mm",ea,Zt);G(["m","mm"],ua);var Va=J("Minutes",!1);Y("s",["ss",2],0,"second");M("second","s");F("second",15);B("s",ea);B("ss",ea,Zt);G(["s","ss"],pa);var Ha=J("Seconds",!1);Y("S",0,0,function(){return~~(this.millisecond()/100)});Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Y(0,["SSS",3],0,"millisecond");Y(0,["SSSS",4],0,function(){return 10*this.millisecond()});Y(0,["SSSSS",5],0,function(){return 100*this.millisecond()});Y(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()});Y(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()});Y(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()});Y(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()});M("millisecond","ms");F("millisecond",16);B("S",ia,Xt);B("SS",ia,Zt);B("SSS",ia,Jt);var Ba;for(Ba="SSSS";9>=Ba.length;Ba+="S"){B(Ba,/\d+/)}function kt(e,t){t[fa]=w(1e3*("0."+e))}for(Ba="S";9>=Ba.length;Ba+="S"){G(Ba,kt)}var Na=J("Milliseconds",!1);Y("z",0,0,"zoneAbbr");Y("zz",0,0,"zoneName");var Ua=_.prototype;Ua.add=La;Ua.calendar=function(e,t){var i=e||Xe(),o=it(i,this).startOf("day"),n=a.calendarFormat(this,o)||"sameElse",r=t&&(T(t[n])?t[n].call(this,i):t[n]);return this.format(r||this.localeData().calendar(n,this,Xe(i)))};Ua.clone=function(){return new _(this)};Ua.diff=function(e,t,a){var i,o,n;if(!this.isValid()){return NaN}i=it(e,this);if(!i.isValid()){return NaN}o=6e4*(i.utcOffset()-this.utcOffset());t=I(t);switch(t){case"year":n=gt(this,i)/12;break;case"month":n=gt(this,i);break;case"quarter":n=gt(this,i)/3;break;case"second":n=(this-i)/1e3;break;case"minute":n=(this-i)/6e4;break;case"hour":n=(this-i)/36e5;break;case"day":n=(this-i-o)/864e5;break;case"week":n=(this-i-o)/6048e5;break;default:n=this-i;}return a?n:v(n)};Ua.endOf=function(e){var t;e=I(e);if(e===void 0||"millisecond"===e||!this.isValid()){return this}var i=this._isUTC?yt:ft;switch(e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf();t+=Ya-pt(t+(this._isUTC?0:this.utcOffset()*Ea),Ya)-1;break;case"minute":t=this._d.valueOf();t+=Ea-pt(t,Ea)-1;break;case"second":t=this._d.valueOf();t+=1000-pt(t,1000)-1;break;}this._d.setTime(t);a.updateOffset(this,!0);return this};Ua.format=function(e){if(!e){e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat}var t=V(this,e);return this.localeData().postformat(t)};Ua.from=function(e,t){if(this.isValid()&&(k(e)&&e.isValid()||Xe(e).isValid())){return rt({to:this,from:e}).locale(this.locale()).humanize(!t)}else{return this.localeData().invalidDate()}};Ua.fromNow=function(e){return this.from(Xe(),e)};Ua.to=function(e,t){if(this.isValid()&&(k(e)&&e.isValid()||Xe(e).isValid())){return rt({from:this,to:e}).locale(this.locale()).humanize(!t)}else{return this.localeData().invalidDate()}};Ua.toNow=function(e){return this.to(Xe(),e)};Ua.get=function(e){e=I(e);if(T(this[e])){return this[e]()}return this};Ua.invalidAt=function(){return f(this).overflow};Ua.isAfter=function(e,t){var a=k(e)?e:Xe(e);if(!(this.isValid()&&a.isValid())){return!1}t=I(t)||"millisecond";if("millisecond"===t){return this.valueOf()>a.valueOf()}else{return a.valueOf()<this.clone().startOf(t).valueOf()}};Ua.isBefore=function(e,t){var a=k(e)?e:Xe(e);if(!(this.isValid()&&a.isValid())){return!1}t=I(t)||"millisecond";if("millisecond"===t){return this.valueOf()<a.valueOf()}else{return this.clone().endOf(t).valueOf()<a.valueOf()}};Ua.isBetween=function(e,t,a,i){var o=k(e)?e:Xe(e),n=k(t)?t:Xe(t);if(!(this.isValid()&&o.isValid()&&n.isValid())){return!1}i=i||"()";return("("===i[0]?this.isAfter(o,a):!this.isBefore(o,a))&&(")"===i[1]?this.isBefore(n,a):!this.isAfter(n,a))};Ua.isSame=function(e,t){var a=k(e)?e:Xe(e),i;if(!(this.isValid()&&a.isValid())){return!1}t=I(t)||"millisecond";if("millisecond"===t){return this.valueOf()===a.valueOf()}else{i=a.valueOf();return this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf()}};Ua.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)};Ua.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)};Ua.isValid=function(){return y(this)};Ua.lang=Ra;Ua.locale=mt;Ua.localeData=ut;Ua.max=Ma;Ua.min=Aa;Ua.parsingFlags=function(){return g({},f(this))};Ua.set=ee;Ua.startOf=function(e){var t;e=I(e);if(e===void 0||"millisecond"===e||!this.isValid()){return this}var i=this._isUTC?yt:ft;switch(e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf();t-=pt(t+(this._isUTC?0:this.utcOffset()*Ea),Ya);break;case"minute":t=this._d.valueOf();t-=pt(t,Ea);break;case"second":t=this._d.valueOf();t-=pt(t,1000);break;}this._d.setTime(t);a.updateOffset(this,!0);return this};Ua.subtract=Fa;Ua.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]};Ua.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}};Ua.toDate=function(){return new Date(this.valueOf())};Ua.toISOString=function(e){if(!this.isValid()){return null}var t=!0!==e,a=t?this.clone().utc():this;if(0>a.year()||9999<a.year()){return V(a,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ")}if(T(Date.prototype.toISOString)){if(t){return this.toDate().toISOString()}else{return new Date(this.valueOf()+1e3*(60*this.utcOffset())).toISOString().replace("Z",V(a,"Z"))}}return V(a,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")};Ua.inspect=function(){if(!this.isValid()){return"moment.invalid(/* "+this._i+" */)"}var e="moment",t="";if(!this.isLocal()){e=0===this.utcOffset()?"moment.utc":"moment.parseZone";t="Z"}var a="["+e+"(\"]",i=0<=this.year()&&9999>=this.year()?"YYYY":"YYYYYY",o=t+"[\")]";return this.format(a+i+"-MM-DD[T]HH:mm:ss.SSS"+o)};Ua.toJSON=function(){return this.isValid()?this.toISOString():null};Ua.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")};Ua.unix=function(){return Math.floor(this.valueOf()/1e3)};Ua.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)};Ua.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}};Ua.year=ya;Ua.isLeapYear=function(){return Z(this.year())};Ua.weekYear=function(e){return xt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)};Ua.isoWeekYear=function(e){return xt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)};Ua.quarter=Ua.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)};Ua.month=ne;Ua.daysInMonth=function(){return ae(this.year(),this.month())};Ua.week=Ua.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")};Ua.isoWeek=Ua.isoWeeks=function(e){var t=he(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")};Ua.weeksInYear=function(){var e=this.localeData()._week;return ge(this.year(),e.dow,e.doy)};Ua.isoWeeksInYear=function(){return ge(this.year(),1,4)};Ua.date=za;Ua.day=Ua.days=function(e){if(!this.isValid()){return null!=e?this:NaN}var t=this._isUTC?this._d.getUTCDay():this._d.getDay();if(null!=e){e=me(e,this.localeData());return this.add(e-t,"d")}else{return t}};Ua.weekday=function(e){if(!this.isValid()){return null!=e?this:NaN}var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")};Ua.isoWeekday=function(e){if(!this.isValid()){return null!=e?this:NaN}if(null!=e){var t=ue(e,this.localeData());return this.day(this.day()%7?t:t-7)}else{return this.day()||7}};Ua.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")};Ua.hour=Ua.hours=va;Ua.minute=Ua.minutes=Va;Ua.second=Ua.seconds=Ha;Ua.millisecond=Ua.milliseconds=Na;Ua.utcOffset=function(e,t,i){var o=this._offset||0,n;if(!this.isValid()){return null!=e?this:NaN}if(null!=e){if("string"==typeof e){e=at(la,e);if(null===e){return this}}else if(16>Math.abs(e)&&!i){e=60*e}if(!this._isUTC&&t){n=ot(this)}this._offset=e;this._isUTC=!0;if(null!=n){this.add(n,"m")}if(o!==e){if(!t||this._changeInProgress){ht(this,rt(e-o,"m"),1,!1)}else if(!this._changeInProgress){this._changeInProgress=!0;a.updateOffset(this,!0);this._changeInProgress=null}}return this}else{return this._isUTC?o:ot(this)}};Ua.utc=function(e){return this.utcOffset(0,e)};Ua.local=function(e){if(this._isUTC){this.utcOffset(0,e);this._isUTC=!1;if(e){this.subtract(ot(this),"m")}}return this};Ua.parseZone=function(){if(null!=this._tzm){this.utcOffset(this._tzm,!1,!0)}else if("string"==typeof this._i){var e=at(/Z|[+-]\d\d:?\d\d/gi,this._i);if(null!=e){this.utcOffset(e)}else{this.utcOffset(0,!0)}}return this};Ua.hasAlignedHourOffset=function(e){if(!this.isValid()){return!1}e=e?Xe(e).utcOffset():0;return 0==(this.utcOffset()-e)%60};Ua.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()};Ua.isLocal=function(){return this.isValid()?!this._isUTC:!1};Ua.isUtcOffset=function(){return this.isValid()?this._isUTC:!1};Ua.isUtc=nt;Ua.isUTC=nt;Ua.zoneAbbr=function(){return this._isUTC?"UTC":""};Ua.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""};Ua.dates=C("dates accessor is deprecated. Use date instead.",za);Ua.months=C("months accessor is deprecated. Use month instead",ne);Ua.years=C("years accessor is deprecated. Use year instead",ya);Ua.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){if(null!=e){if("string"!=typeof e){e=-e}this.utcOffset(e,t);return this}else{return-this.utcOffset()}});Ua.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted)){return this._isDSTShifted}var e={};x(e,this);e=Ge(e);if(e._a){var t=e._isUTC?u(e._a):Xe(e._a);this._isDSTShifted=this.isValid()&&0<S(e._a,t.toArray())}else{this._isDSTShifted=!1}return this._isDSTShifted});function vt(e){return e}var ja=A.prototype;ja.calendar=function(e,t,a){var i=this._calendar[e]||this._calendar.sameElse;return T(i)?i.call(t,a):i};ja.longDateFormat=function(e){var t=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];if(t||!a){return t}this._longDateFormat[e]=a.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)});return this._longDateFormat[e]};ja.invalidDate=function(){return this._invalidDate};ja.ordinal=function(e){return this._ordinal.replace("%d",e)};ja.preparse=vt;ja.postformat=vt;ja.relativeTime=function(e,t,a,i){var o=this._relativeTime[a];return T(o)?o(e,t,a,i):o.replace(/%d/i,e)};ja.pastFuture=function(e,t){var a=this._relativeTime[0<e?"future":"past"];return T(a)?a(t):a.replace(/%s/i,t)};ja.set=function(e){var t,a;for(a in e){t=e[a];if(T(t)){this[a]=t}else{this["_"+a]=t}}this._config=e;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)};ja.months=function(e,t){if(!e){return o(this._months)?this._months:this._months.standalone}return o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xa).test(t)?"format":"standalone"][e.month()]};ja.monthsShort=function(e,t){if(!e){return o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}return o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xa.test(t)?"format":"standalone"][e.month()]};ja.monthsParse=function(e,t,a){var o,n,r;if(this._monthsParseExact){return ie.call(this,e,t,a)}if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[]}for(o=0;12>o;o++){n=u([2e3,o]);if(a&&!this._longMonthsParse[o]){this._longMonthsParse[o]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i");this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")}if(!a&&!this._monthsParse[o]){r="^"+this.months(n,"")+"|^"+this.monthsShort(n,"");this._monthsParse[o]=new RegExp(r.replace(".",""),"i")}if(a&&"MMMM"===t&&this._longMonthsParse[o].test(e)){return o}else if(a&&"MMM"===t&&this._shortMonthsParse[o].test(e)){return o}else if(!a&&this._monthsParse[o].test(e)){return o}}};ja.monthsRegex=function(e){if(this._monthsParseExact){if(!h(this,"_monthsRegex")){re.call(this)}if(e){return this._monthsStrictRegex}else{return this._monthsRegex}}else{if(!h(this,"_monthsRegex")){this._monthsRegex=sa}return this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex}};ja.monthsShortRegex=function(e){if(this._monthsParseExact){if(!h(this,"_monthsRegex")){re.call(this)}if(e){return this._monthsShortStrictRegex}else{return this._monthsShortRegex}}else{if(!h(this,"_monthsShortRegex")){this._monthsShortRegex=sa}return this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex}};ja.week=function(e){return he(e,this._week.dow,this._week.doy).week};ja.firstDayOfYear=function(){return this._week.doy};ja.firstDayOfWeek=function(){return this._week.dow};ja.weekdays=function(e,t){var a=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?pe(a,this._week.dow):e?a[e.day()]:a};ja.weekdaysMin=function(e){return!0===e?pe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin};ja.weekdaysShort=function(e){return!0===e?pe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort};ja.weekdaysParse=function(e,t,a){var o,n,r;if(this._weekdaysParseExact){return fe.call(this,e,t,a)}if(!this._weekdaysParse){this._weekdaysParse=[];this._minWeekdaysParse=[];this._shortWeekdaysParse=[];this._fullWeekdaysParse=[]}for(o=0;7>o;o++){n=u([2e3,1]).day(o);if(a&&!this._fullWeekdaysParse[o]){this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i");this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i");this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")}if(!this._weekdaysParse[o]){r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,"");this._weekdaysParse[o]=new RegExp(r.replace(".",""),"i")}if(a&&"dddd"===t&&this._fullWeekdaysParse[o].test(e)){return o}else if(a&&"ddd"===t&&this._shortWeekdaysParse[o].test(e)){return o}else if(a&&"dd"===t&&this._minWeekdaysParse[o].test(e)){return o}else if(!a&&this._weekdaysParse[o].test(e)){return o}}};ja.weekdaysRegex=function(e){if(this._weekdaysParseExact){if(!h(this,"_weekdaysRegex")){ye.call(this)}if(e){return this._weekdaysStrictRegex}else{return this._weekdaysRegex}}else{if(!h(this,"_weekdaysRegex")){this._weekdaysRegex=sa}return this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex}};ja.weekdaysShortRegex=function(e){if(this._weekdaysParseExact){if(!h(this,"_weekdaysRegex")){ye.call(this)}if(e){return this._weekdaysShortStrictRegex}else{return this._weekdaysShortRegex}}else{if(!h(this,"_weekdaysShortRegex")){this._weekdaysShortRegex=sa}return this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}};ja.weekdaysMinRegex=function(e){if(this._weekdaysParseExact){if(!h(this,"_weekdaysRegex")){ye.call(this)}if(e){return this._weekdaysMinStrictRegex}else{return this._weekdaysMinRegex}}else{if(!h(this,"_weekdaysMinRegex")){this._weekdaysMinRegex=sa}return this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}};ja.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)};ja.meridiem=function(e,t,a){if(11<e){return a?"pm":"PM"}else{return a?"am":"AM"}};function wt(e,t,a,i){var o=Ce(),n=u().set(i,t);return o[a](n,e)}function St(e,t,a){if(s(e)){t=e;e=void 0}e=e||"";if(null!=t){return wt(e,t,a,"month")}var o,n=[];for(o=0;12>o;o++){n[o]=wt(e,o,a,"month")}return n}function Dt(e,t,a,o){if("boolean"==typeof e){if(s(t)){a=t;t=void 0}t=t||""}else{t=e;a=t;e=!1;if(s(t)){a=t;t=void 0}t=t||""}var n=Ce(),r=e?n._week.dow:0;if(null!=a){return wt(t,(a+r)%7,o,"day")}var l,d=[];for(l=0;7>l;l++){d[l]=wt(t,(l+r)%7,o,"day")}return d}Se("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function ordinal(e){var t=e%10,a=1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+a}});a.lang=C("moment.lang is deprecated. Use moment.locale instead.",Se);a.langData=C("moment.langData is deprecated. Use moment.localeData instead.",Ce);var Ga=Math.abs;function Ct(e,t,a,i){var o=rt(t,a);e._milliseconds+=i*o._milliseconds;e._days+=i*o._days;e._months+=i*o._months;return e._bubble()}function Pt(e){if(0>e){return Math.floor(e)}else{return Math.ceil(e)}}function Tt(e){return 4800*e/146097}function Ot(e){return 146097*e/4800}function At(e){return function(){return this.as(e)}}var qa=At("ms"),Ka=At("s"),Xa=At("m"),Za=At("h"),Ja=At("d"),Qa=At("w"),$a=At("M"),ei=At("Q"),ti=At("y");function Mt(e){return function(){return this.isValid()?this._data[e]:NaN}}var ai=Mt("milliseconds"),ii=Mt("seconds"),oi=Mt("minutes"),ni=Mt("hours"),ri=Mt("days"),li=Mt("months"),si=Mt("years");var di=Math.round,ci={ss:44,s:45,m:45,h:22,d:26,M:11};function It(e,t,a,i,o){return o.relativeTime(t||1,!!a,e,i)}function Lt(e,t,i){var o=rt(e).abs(),n=di(o.as("s")),r=di(o.as("m")),l=di(o.as("h")),s=di(o.as("d")),d=di(o.as("M")),c=di(o.as("y")),h=n<=ci.ss&&["s",n]||n<ci.s&&["ss",n]||1>=r&&["m"]||r<ci.m&&["mm",r]||1>=l&&["h"]||l<ci.h&&["hh",l]||1>=s&&["d"]||s<ci.d&&["dd",s]||1>=d&&["M"]||d<ci.M&&["MM",d]||1>=c&&["y"]||["yy",c];h[2]=t;h[3]=0<+e;h[4]=i;return It.apply(null,h)}function Ft(e){if(e===void 0){return di}if("function"==typeof e){di=e;return!0}return!1}var hi=Math.abs;function Rt(e){return(0<e)-(0>e)||+e}function Et(){if(!this.isValid()){return this.localeData().invalidDate()}var e=hi(this._milliseconds)/1e3,t=hi(this._days),a=hi(this._months),i,o,n;i=v(e/60);o=v(i/60);e%=60;i%=60;n=v(a/12);a%=12;var r=n,l=a,d=t,c=o,h=i,g=e?e.toFixed(3).replace(/\.?0+$/,""):"",s=this.asSeconds();if(!s){return"P0D"}var m=0>s?"-":"",u=Rt(this._months)!==Rt(s)?"-":"",p=Rt(this._days)!==Rt(s)?"-":"",f=Rt(this._milliseconds)!==Rt(s)?"-":"";return m+"P"+(r?u+r+"Y":"")+(l?u+l+"M":"")+(d?p+d+"D":"")+(c||h||g?"T":"")+(c?f+c+"H":"")+(h?f+h+"M":"")+(g?f+g+"S":"")}var gi=Qe.prototype;gi.isValid=function(){return this._isValid};gi.abs=function(){var e=this._data;this._milliseconds=Ga(this._milliseconds);this._days=Ga(this._days);this._months=Ga(this._months);e.milliseconds=Ga(e.milliseconds);e.seconds=Ga(e.seconds);e.minutes=Ga(e.minutes);e.hours=Ga(e.hours);e.months=Ga(e.months);e.years=Ga(e.years);return this};gi.add=function(e,t){return Ct(this,e,t,1)};gi.subtract=function(e,t){return Ct(this,e,t,-1)};gi.as=function(e){if(!this.isValid()){return NaN}var t,a,i=this._milliseconds;e=I(e);if("month"===e||"quarter"===e||"year"===e){t=this._days+i/864e5;a=this._months+Tt(t);switch(e){case"month":return a;case"quarter":return a/3;case"year":return a/12;}}else{t=this._days+Math.round(Ot(this._months));switch(e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e);}}};gi.asMilliseconds=qa;gi.asSeconds=Ka;gi.asMinutes=Xa;gi.asHours=Za;gi.asDays=Ja;gi.asWeeks=Qa;gi.asMonths=$a;gi.asQuarters=ei;gi.asYears=ti;gi.valueOf=function(){if(!this.isValid()){return NaN}return this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*w(this._months/12)};gi._bubble=function(){var e=this._milliseconds,t=this._days,a=this._months,i=this._data,o,n,r,l,s;if(!(0<=e&&0<=t&&0<=a||0>=e&&0>=t&&0>=a)){e+=864e5*Pt(Ot(a)+t);t=0;a=0}i.milliseconds=e%1e3;o=v(e/1e3);i.seconds=o%60;n=v(o/60);i.minutes=n%60;r=v(n/60);i.hours=r%24;t+=v(r/24);s=v(Tt(t));a+=s;t-=Pt(Ot(s));l=v(a/12);a%=12;i.days=t;i.months=a;i.years=l;return this};gi.clone=function(){return rt(this)};gi.get=function(e){e=I(e);return this.isValid()?this[e+"s"]():NaN};gi.milliseconds=ai;gi.seconds=ii;gi.minutes=oi;gi.hours=ni;gi.days=ri;gi.weeks=function(){return v(this.days()/7)};gi.months=li;gi.years=si;gi.humanize=function(e){if(!this.isValid()){return this.localeData().invalidDate()}var t=this.localeData(),a=Lt(this,!e,t);if(e){a=t.pastFuture(+this,a)}return t.postformat(a)};gi.toISOString=Et;gi.toString=Et;gi.toJSON=Et;gi.locale=mt;gi.localeData=ut;gi.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Et);gi.lang=Ra;Y("X",0,0,"unix");Y("x",0,0,"valueOf");B("x",ra);B("X",/[+-]?\d+(\.\d{1,3})?/);G("X",function(e,t,a){a._d=new Date(1e3*parseFloat(e,10))});G("x",function(e,t,a){a._d=new Date(w(e))});a.version="2.24.0";(function(e){Yt=e})(Xe);a.fn=Ua;a.min=function(){var e=[].slice.call(arguments,0);return Ze("isBefore",e)};a.max=function(){var e=[].slice.call(arguments,0);return Ze("isAfter",e)};a.now=function now(){return Date.now?Date.now():+new Date};a.utc=u;a.unix=function(e){return Xe(1e3*e)};a.months=function(e,t){return St(e,t,"months")};a.isDate=d;a.locale=Se;a.invalid=b;a.duration=rt;a.isMoment=k;a.weekdays=function(e,t,a){return Dt(e,t,a,"weekdays")};a.parseZone=function(){return Xe.apply(null,arguments).parseZone()};a.localeData=Ce;a.isDuration=$e;a.monthsShort=function(e,t){return St(e,t,"monthsShort")};a.weekdaysMin=function(e,t,a){return Dt(e,t,a,"weekdaysMin")};a.defineLocale=De;a.updateLocale=function(e,t){if(null!=t){var a,i,o=wa;i=we(e);if(null!=i){o=i._config}t=O(o,t);a=new A(t);a.parentLocale=Sa[e];Sa[e]=a;Se(e)}else{if(null!=Sa[e]){if(null!=Sa[e].parentLocale){Sa[e]=Sa[e].parentLocale}else if(null!=Sa[e]){delete Sa[e]}}}return Sa[e]};a.locales=Pe;a.weekdaysShort=function(e,t,a){return Dt(e,t,a,"weekdaysShort")};a.normalizeUnits=I;a.relativeTimeRounding=Ft;a.relativeTimeThreshold=function(e,t){if(ci[e]===void 0){return!1}if(t===void 0){return ci[e]}ci[e]=t;if("s"===e){ci.ss=t-1}return!0};a.calendarFormat=function(e,t){var a=e.diff(t,"days",!0);return-6>a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse"};a.prototype=Ua;a.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"};return a})}),xo={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"};zi._date.override("function"==typeof bo?{_id:"moment",formats:function formats(){return xo},parse:function(e,t){if("string"==typeof e&&"string"==typeof t){e=bo(e,t)}else if(!(e instanceof bo)){e=bo(e)}return e.isValid()?e.valueOf():null},format:function format(e,t){return bo(e).format(t)},add:function add(e,t,a){return bo(e).add(t,a).valueOf()},diff:function diff(e,t,a){return bo(e).diff(bo(t),a)},startOf:function startOf(e,t,a){e=bo(e);if("isoWeek"===t){return e.isoWeekday(a).valueOf()}return e.startOf(t).valueOf()},endOf:function endOf(e,t){return bo(e).endOf(t).valueOf()},_create:function _create(e){return bo(e)}}:{});_a._set("global",{plugins:{filler:{propagate:!0}}});var _o={dataset:function dataset(e){var t=e.fill,a=e.chart,i=a.getDatasetMeta(t),o=i&&a.isDatasetVisible(t),n=o&&i.dataset._children||[],r=n.length||0;return!r?null:function(e,t){return t<r&&n[t]._view||null}},boundary:function(e){var t=e.boundary,a=t?t.x:null,i=t?t.y:null;if(Da.isArray(t)){return function(e,a){return t[a]}}return function(e){return{x:null===a?e.x:a,y:null===i?e.y:i}}}};function Pt(e,t,a){var i=e._model||{},o=i.fill,n;if(o===void 0){o=!!i.backgroundColor}if(!1===o||null===o){return!1}if(!0===o){return"origin"}n=parseFloat(o,10);if(isFinite(n)&&Math.floor(n)===n){if("-"===o[0]||"+"===o[0]){n=t+n}if(n===t||0>n||n>=a){return!1}return n}switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1;}}function Tt(e){var t=e.el._model||{},a=e.el._scale||{},i=e.fill,o=null,n;if(isFinite(i)){return null}if("start"===i){o=t.scaleBottom===void 0?a.bottom:t.scaleBottom}else if("end"===i){o=t.scaleTop===void 0?a.top:t.scaleTop}else if(t.scaleZero!==void 0){o=t.scaleZero}else if(a.getBasePixel){o=a.getBasePixel()}if(o!==void 0&&null!==o){if(o.x!==void 0&&o.y!==void 0){return o}if(Da.isFinite(o)){n=a.isHorizontal();return{x:n?o:null,y:n?null:o}}}return null}function Ot(e){var t=e.el._scale,a=t.options,o=t.chart.data.labels.length,n=e.fill,r=[],l,s,d,c,h;if(!o){return null}l=a.ticks.reverse?t.max:t.min;s=a.ticks.reverse?t.min:t.max;d=t.getPointPositionForValue(0,l);for(c=0;c<o;++c){h="start"===n||"end"===n?t.getPointPositionForValue(c,"start"===n?l:s):t.getBasePosition(c);if(a.gridLines.circular){h.cx=d.x;h.cy=d.y;h.angle=t.getIndexAngle(c)-Math.PI/2}r.push(h)}return r}function At(e){var t=e.el._scale||{};if(t.getPointPositionForValue){return Ot(e)}return Tt(e)}function Mt(e,t,a){var i=e[t],o=i.fill,n=[t],r;if(!a){return o}while(!1!==o&&-1===n.indexOf(o)){if(!isFinite(o)){return o}r=e[o];if(!r){return!1}if(r.visible){return o}n.push(o);o=r.fill}return!1}function It(e){var t=e.fill,a="dataset";if(!1===t){return null}if(!isFinite(t)){a="boundary"}return _o[a](e)}function Lt(e){return e&&!e.skip}function Ft(e,t,a,o,n){var l,s,d,c;if(!o||!n){return}e.moveTo(t[0].x,t[0].y);for(l=1;l<o;++l){Da.canvas.lineTo(e,t[l-1],t[l])}if(a[0].angle!==void 0){s=a[0].cx;d=a[0].cy;c=Math.sqrt(Math.pow(a[0].x-s,2)+Math.pow(a[0].y-d,2));for(l=n-1;0<l;--l){e.arc(s,d,c,a[l].angle,a[l-1].angle,!0)}return}e.lineTo(a[n-1].x,a[n-1].y);for(l=n-1;0<l;--l){Da.canvas.lineTo(e,a[l],a[l-1],!0)}}function Rt(e,t,a,o,n,r){var l=t.length,s=o.spanGaps,d=[],c=[],h=0,g=0,m,u,p,f,y,b,x,_;e.beginPath();for(m=0,u=l;m<u;++m){p=m%l;f=t[p]._view;y=a(f,p,o);b=Lt(f);x=Lt(y);if(r&&_===void 0&&b){_=m+1;u=l+_}if(b&&x){h=d.push(f);g=c.push(y)}else if(h&&g){if(!s){Ft(e,d,c,h,g);h=g=0;d=[];c=[]}else{if(b){d.push(f)}if(x){c.push(y)}}}}Ft(e,d,c,h,g);e.closePath();e.fillStyle=n;e.fill()}var ko=Da.rtl.getRtlAdapter,vo=Da.noop,wo=Da.valueOrDefault;_a._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function onClick(t,e){var a=e.datasetIndex,i=this.chart,o=i.getDatasetMeta(a);o.hidden=null===o.hidden?!i.data.datasets[a].hidden:null;i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function generateLabels(e){var t=e.data.datasets,a=e.options.legend||{},i=a.labels&&a.labels.usePointStyle;return e._getSortedDatasetMetas().map(function(a){var o=a.controller.getStyle(i?0:void 0);return{text:t[a.index].label,fillStyle:o.backgroundColor,hidden:!e.isDatasetVisible(a.index),lineCap:o.borderCapStyle,lineDash:o.borderDash,lineDashOffset:o.borderDashOffset,lineJoin:o.borderJoinStyle,lineWidth:o.borderWidth,strokeStyle:o.borderColor,pointStyle:o.pointStyle,rotation:o.rotation,datasetIndex:a.index}},this)}}},legendCallback:function legendCallback(e){var t=document.createElement("ul"),a=e.data.datasets,o,n,r,l;t.setAttribute("class",e.id+"-legend");for(o=0,n=a.length;o<n;o++){r=t.appendChild(document.createElement("li"));l=r.appendChild(document.createElement("span"));l.style.backgroundColor=a[o].backgroundColor;if(a[o].label){r.appendChild(document.createTextNode(a[o].label))}}return t.outerHTML}});function Et(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}var So=Pa.extend({initialize:function initialize(e){var t=this;Da.extend(t,e);t.legendHitBoxes=[];t._hoveredItem=null;t.doughnutMode=!1},beforeUpdate:vo,update:function update(e,t,a){var i=this;i.beforeUpdate();i.maxWidth=e;i.maxHeight=t;i.margins=a;i.beforeSetDimensions();i.setDimensions();i.afterSetDimensions();i.beforeBuildLabels();i.buildLabels();i.afterBuildLabels();i.beforeFit();i.fit();i.afterFit();i.afterUpdate();return i.minSize},afterUpdate:vo,beforeSetDimensions:vo,setDimensions:function setDimensions(){var e=this;if(e.isHorizontal()){e.width=e.maxWidth;e.left=0;e.right=e.width}else{e.height=e.maxHeight;e.top=0;e.bottom=e.height}e.paddingLeft=0;e.paddingTop=0;e.paddingRight=0;e.paddingBottom=0;e.minSize={width:0,height:0}},afterSetDimensions:vo,beforeBuildLabels:vo,buildLabels:function buildLabels(){var e=this,t=e.options.labels||{},a=Da.callback(t.generateLabels,[e.chart],e)||[];if(t.filter){a=a.filter(function(a){return t.filter(a,e.chart.data)})}if(e.options.reverse){a.reverse()}e.legendItems=a},afterBuildLabels:vo,beforeFit:vo,fit:function fit(){var e=this,t=e.options,a=t.labels,i=t.display,o=e.ctx,n=Da.options._parseFont(a),r=n.size,l=e.legendHitBoxes=[],s=e.minSize,d=e.isHorizontal();if(d){s.width=e.maxWidth;s.height=i?10:0}else{s.width=i?10:0;s.height=e.maxHeight}if(!i){e.width=s.width=e.height=s.height=0;return}o.font=n.string;if(d){var c=e.lineWidths=[0],h=0;o.textAlign="left";o.textBaseline="middle";Da.each(e.legendItems,function(e,t){var i=Et(a,r),n=i+r/2+o.measureText(e.text).width;if(0===t||c[c.length-1]+n+2*a.padding>s.width){h+=r+a.padding;c[c.length-(0<t?0:1)]=0}l[t]={left:0,top:0,width:n,height:r};c[c.length-1]+=n+a.padding});s.height+=h}else{var g=a.padding,m=e.columnWidths=[],u=e.columnHeights=[],p=a.padding,f=0,y=0;Da.each(e.legendItems,function(e,t){var i=Et(a,r),n=i+r/2+o.measureText(e.text).width;if(0<t&&y+r+2*g>s.height){p+=f+a.padding;m.push(f);u.push(y);f=0;y=0}f=Math.max(f,n);y+=r+g;l[t]={left:0,top:0,width:n,height:r}});p+=f;m.push(f);u.push(y);s.width+=p}e.width=s.width;e.height=s.height},afterFit:vo,isHorizontal:function isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position},draw:function draw(){var e=this,t=e.options,a=t.labels,i=_a.global,o=i.defaultColor,n=i.elements.line,r=e.height,l=e.columnHeights,s=e.width,d=e.lineWidths;if(!t.display){return}var c=ko(t.rtl,e.left,e.minSize.width),h=e.ctx,g=wo(a.fontColor,i.defaultFontColor),m=Da.options._parseFont(a),u=m.size,p;h.textAlign=c.textAlign("left");h.textBaseline="middle";h.lineWidth=.5;h.strokeStyle=g;h.fillStyle=g;h.font=m.string;var f=Et(a,u),b=e.legendHitBoxes,_=function(e,t,i){if(isNaN(f)||0>=f){return}h.save();var r=wo(i.lineWidth,n.borderWidth);h.fillStyle=wo(i.fillStyle,o);h.lineCap=wo(i.lineCap,n.borderCapStyle);h.lineDashOffset=wo(i.lineDashOffset,n.borderDashOffset);h.lineJoin=wo(i.lineJoin,n.borderJoinStyle);h.lineWidth=r;h.strokeStyle=wo(i.strokeStyle,o);if(h.setLineDash){h.setLineDash(wo(i.lineDash,n.borderDash))}if(a&&a.usePointStyle){var l=f*Math.SQRT2/2,s=c.xPlus(e,f/2);Da.canvas.drawPoint(h,i.pointStyle,l,s,t+u/2,i.rotation)}else{h.fillRect(c.leftForLtr(e,f),t,f,u);if(0!==r){h.strokeRect(c.leftForLtr(e,f),t,f,u)}}h.restore()},k=function(e,t,a,i){var o=u/2,n=c.xPlus(e,f+o),r=t+o;h.fillText(a.text,n,r);if(a.hidden){h.beginPath();h.lineWidth=2;h.moveTo(n,r);h.lineTo(c.xPlus(n,i),r);h.stroke()}},v=function(e,i){switch(t.align){case"start":return a.padding;case"end":return e-i;default:return(e-i+a.padding)/2;}},w=e.isHorizontal();if(w){p={x:e.left+v(s,d[0]),y:e.top+a.padding,line:0}}else{p={x:e.left+a.padding,y:e.top+v(r,l[0]),line:0}}Da.rtl.overrideTextDirection(e.ctx,t.textDirection);var S=u+a.padding;Da.each(e.legendItems,function(t,o){var i=h.measureText(t.text).width,n=f+u/2+i,g=p.x,m=p.y;c.setWidth(e.minSize.width);if(w){if(0<o&&g+n+a.padding>e.left+e.minSize.width){m=p.y+=S;p.line++;g=p.x=e.left+v(s,d[p.line])}}else if(0<o&&m+S>e.top+e.minSize.height){g=p.x=g+e.columnWidths[p.line]+a.padding;p.line++;m=p.y=e.top+v(r,l[p.line])}var D=c.x(g);_(D,m,t);b[o].left=c.leftForLtr(D,b[o].width);b[o].top=m;k(D,m,t,i);if(w){p.x+=n+a.padding}else{p.y+=S}});Da.rtl.restoreTextDirection(e.ctx,t.textDirection)},_getLegendItemAt:function _getLegendItemAt(e,t){var a=this,o,n,r;if(e>=a.left&&e<=a.right&&t>=a.top&&t<=a.bottom){r=a.legendHitBoxes;for(o=0;o<r.length;++o){n=r[o];if(e>=n.left&&e<=n.left+n.width&&t>=n.top&&t<=n.top+n.height){return a.legendItems[o]}}}return null},handleEvent:function handleEvent(t){var e=this,a=e.options,i="mouseup"===t.type?"click":t.type,o;if("mousemove"===i){if(!a.onHover&&!a.onLeave){return}}else if("click"===i){if(!a.onClick){return}}else{return}o=e._getLegendItemAt(t.x,t.y);if("click"===i){if(o&&a.onClick){a.onClick.call(e,t.native,o)}}else{if(a.onLeave&&o!==e._hoveredItem){if(e._hoveredItem){a.onLeave.call(e,t.native,e._hoveredItem)}e._hoveredItem=o}if(a.onHover&&o){a.onHover.call(e,t.native,o)}}}});function Yt(e,t){var a=new So({ctx:e.ctx,options:t,chart:e});pi.configure(e,a,t);pi.addBox(e,a);e.legend=a}var Do=Da.noop;_a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Co=Pa.extend({initialize:function initialize(e){var t=this;Da.extend(t,e);t.legendHitBoxes=[]},beforeUpdate:Do,update:function update(e,t,a){var i=this;i.beforeUpdate();i.maxWidth=e;i.maxHeight=t;i.margins=a;i.beforeSetDimensions();i.setDimensions();i.afterSetDimensions();i.beforeBuildLabels();i.buildLabels();i.afterBuildLabels();i.beforeFit();i.fit();i.afterFit();i.afterUpdate();return i.minSize},afterUpdate:Do,beforeSetDimensions:Do,setDimensions:function setDimensions(){var e=this;if(e.isHorizontal()){e.width=e.maxWidth;e.left=0;e.right=e.width}else{e.height=e.maxHeight;e.top=0;e.bottom=e.height}e.paddingLeft=0;e.paddingTop=0;e.paddingRight=0;e.paddingBottom=0;e.minSize={width:0,height:0}},afterSetDimensions:Do,beforeBuildLabels:Do,buildLabels:Do,afterBuildLabels:Do,beforeFit:Do,fit:function fit(){var e=this,t=e.options,a=e.minSize={},i=e.isHorizontal(),o,n;if(!t.display){e.width=a.width=e.height=a.height=0;return}o=Da.isArray(t.text)?t.text.length:1;n=o*Da.options._parseFont(t).lineHeight+2*t.padding;e.width=a.width=i?e.maxWidth:n;e.height=a.height=i?n:e.maxHeight},afterFit:Do,isHorizontal:function isHorizontal(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function draw(){var e=this,t=e.ctx,a=e.options;if(!a.display){return}var o=Da.options._parseFont(a),n=o.lineHeight,r=n/2+a.padding,l=0,s=e.top,d=e.left,c=e.bottom,h=e.right,g,m,u;t.fillStyle=Da.valueOrDefault(a.fontColor,_a.global.defaultFontColor);t.font=o.string;if(e.isHorizontal()){m=d+(h-d)/2;u=s+r;g=h-d}else{m="left"===a.position?d+r:h-r;u=s+(c-s)/2;g=c-s;l=Math.PI*("left"===a.position?-.5:.5)}t.save();t.translate(m,u);t.rotate(l);t.textAlign="center";t.textBaseline="middle";var p=a.text;if(Da.isArray(p)){for(var f=0,b=0;b<p.length;++b){t.fillText(p[b],0,f,g);f+=n}}else{t.fillText(p,0,0,g)}t.restore()}});function Wt(e,t){var a=new Co({ctx:e.ctx,options:t,chart:e});pi.configure(e,a,t);pi.addBox(e,a);e.titleBlock=a}var Po={};Po.filler={id:"filler",afterDatasetsUpdate:function afterDatasetsUpdate(e,t){var a=(e.data.datasets||[]).length,o=t.propagate,n=[],r,l,s,d;for(l=0;l<a;++l){r=e.getDatasetMeta(l);s=r.dataset;d=null;if(s&&s._model&&s instanceof ja.Line){d={visible:e.isDatasetVisible(l),fill:Pt(s,l,a),chart:e,el:s}}r.$filler=d;n.push(d)}for(l=0;l<a;++l){d=n[l];if(!d){continue}d.fill=Mt(n,l,o);d.boundary=At(d);d.mapper=It(d)}},beforeDatasetsDraw:function beforeDatasetsDraw(e){var t=e._getSortedVisibleDatasetMetas(),a=e.ctx,o,n,r,l,s,d,c;for(n=t.length-1;0<=n;--n){o=t[n].$filler;if(!o||!o.visible){continue}r=o.el;l=r._view;s=r._children||[];d=o.mapper;c=l.backgroundColor||_a.global.defaultColor;if(d&&c&&s.length){Da.canvas.clipArea(a,e.chartArea);Rt(a,s,d,l,c,r._loop);Da.canvas.unclipArea(a)}}}};Po.legend={id:"legend",_element:So,beforeInit:function beforeInit(e){var t=e.options.legend;if(t){Yt(e,t)}},beforeUpdate:function beforeUpdate(e){var t=e.options.legend,a=e.legend;if(t){Da.mergeIf(t,_a.global.legend);if(a){pi.configure(e,a,t);a.options=t}else{Yt(e,t)}}else if(a){pi.removeBox(e,a);delete e.legend}},afterEvent:function afterEvent(t,a){var e=t.legend;if(e){e.handleEvent(a)}}};Po.title={id:"title",_element:Co,beforeInit:function beforeInit(e){var t=e.options.title;if(t){Wt(e,t)}},beforeUpdate:function beforeUpdate(e){var t=e.options.title,a=e.titleBlock;if(t){Da.mergeIf(t,_a.global.title);if(a){pi.configure(e,a,t);a.options=t}else{Wt(e,t)}}else if(a){pi.removeBox(e,a);delete e.titleBlock}}};Wi.helpers=Da;(function core_helpers(){Da.where=function(e,t){if(Da.isArray(e)&&Array.prototype.filter){return e.filter(t)}var a=[];Da.each(e,function(e){if(t(e)){a.push(e)}});return a};Da.findIndex=Array.prototype.findIndex?function(e,t,a){return e.findIndex(t,a)}:function(e,t,a){a=a===void 0?e:a;for(var o=0,n=e.length;o<n;++o){if(t.call(a,e[o],o,e)){return o}}return-1};Da.findNextWhere=function(e,t,a){if(Da.isNullOrUndef(a)){a=-1}for(var o=a+1,n;o<e.length;o++){n=e[o];if(t(n)){return n}}};Da.findPreviousWhere=function(e,t,a){if(Da.isNullOrUndef(a)){a=e.length}for(var o=a-1,n;0<=o;o--){n=e[o];if(t(n)){return n}}};Da.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};Da.almostEquals=function(e,t,a){return Math.abs(e-t)<a};Da.almostWhole=function(e,t){var a=Math.round(e);return a-t<=e&&a+t>=e};Da.max=function(e){return e.reduce(function(e,t){if(!isNaN(t)){return Math.max(e,t)}return e},Number.NEGATIVE_INFINITY)};Da.min=function(e){return e.reduce(function(e,t){if(!isNaN(t)){return Math.min(e,t)}return e},Number.POSITIVE_INFINITY)};Da.sign=Math.sign?function(e){return Math.sign(e)}:function(e){e=+e;if(0===e||isNaN(e)){return e}return 0<e?1:-1};Da.toRadians=function(e){return e*(Math.PI/180)};Da.toDegrees=function(e){return e*(180/Math.PI)};Da._decimalPlaces=function(t){if(!Da.isFinite(t)){return}var a=1,i=0;while(Math.round(t*a)/a!==t){a*=10;i++}return i};Da.getAngleFromPoint=function(e,t){var a=t.x-e.x,i=t.y-e.y,o=Math.sqrt(a*a+i*i),n=Math.atan2(i,a);if(n<-.5*Math.PI){n+=2*Math.PI}return{angle:n,distance:o}};Da.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};Da.aliasPixel=function(e){return 0==e%2?0:.5};Da._alignPixel=function(e,t,a){var i=e.currentDevicePixelRatio,o=a/2;return Math.round((t-o)*i)/i+o};Da.splineCurve=function(e,a,i,o){var t=e.skip?a:e,n=a,r=i.skip?a:i,l=Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)),s=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2)),d=l/(l+s),c=s/(l+s);d=isNaN(d)?0:d;c=isNaN(c)?0:c;var h=o*d,g=o*c;return{previous:{x:n.x-h*(r.x-t.x),y:n.y-h*(r.y-t.y)},next:{x:n.x+g*(r.x-t.x),y:n.y+g*(r.y-t.y)}}};Da.EPSILON=Number.EPSILON||1e-14;Da.splineCurveMonotone=function(e){var t=(e||[]).map(function(e){return{model:e._model,deltaK:0,mK:0}}),a=t.length,o,n,r,l;for(o=0;o<a;++o){r=t[o];if(r.model.skip){continue}n=0<o?t[o-1]:null;l=o<a-1?t[o+1]:null;if(l&&!l.model.skip){var s=l.model.x-r.model.x;r.deltaK=0!=s?(l.model.y-r.model.y)/s:0}if(!n||n.model.skip){r.mK=r.deltaK}else if(!l||l.model.skip){r.mK=n.deltaK}else if(this.sign(n.deltaK)!==this.sign(r.deltaK)){r.mK=0}else{r.mK=(n.deltaK+r.deltaK)/2}}var d,c,h,g;for(o=0;o<a-1;++o){r=t[o];l=t[o+1];if(r.model.skip||l.model.skip){continue}if(Da.almostEquals(r.deltaK,0,this.EPSILON)){r.mK=l.mK=0;continue}d=r.mK/r.deltaK;c=l.mK/r.deltaK;g=Math.pow(d,2)+Math.pow(c,2);if(9>=g){continue}h=3/Math.sqrt(g);r.mK=d*h*r.deltaK;l.mK=c*h*r.deltaK}var m;for(o=0;o<a;++o){r=t[o];if(r.model.skip){continue}n=0<o?t[o-1]:null;l=o<a-1?t[o+1]:null;if(n&&!n.model.skip){m=(r.model.x-n.model.x)/3;r.model.controlPointPreviousX=r.model.x-m;r.model.controlPointPreviousY=r.model.y-m*r.mK}if(l&&!l.model.skip){m=(l.model.x-r.model.x)/3;r.model.controlPointNextX=r.model.x+m;r.model.controlPointNextY=r.model.y+m*r.mK}}};Da.nextItem=function(e,t,a){if(a){return t>=e.length-1?e[0]:e[t+1]}return t>=e.length-1?e[e.length-1]:e[t+1]};Da.previousItem=function(e,t,a){if(a){return 0>=t?e[e.length-1]:e[t-1]}return 0>=t?e[0]:e[t-1]};Da.niceNum=function(e,t){var a=Math.floor(Da.log10(e)),i=e/Math.pow(10,a),o;if(t){if(1.5>i){o=1}else if(3>i){o=2}else if(7>i){o=5}else{o=10}}else if(1>=i){o=1}else if(2>=i){o=2}else if(5>=i){o=5}else{o=10}return o*Math.pow(10,a)};Da.requestAnimFrame=function(){if("undefined"==typeof window){return function(e){e()}}return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)}}();Da.getRelativePosition=function(t,a){var i,o,n=t.originalEvent||t,e=t.target||t.srcElement,r=e.getBoundingClientRect(),l=n.touches;if(l&&0<l.length){i=l[0].clientX;o=l[0].clientY}else{i=n.clientX;o=n.clientY}var s=parseFloat(Da.getStyle(e,"padding-left")),d=parseFloat(Da.getStyle(e,"padding-top")),c=parseFloat(Da.getStyle(e,"padding-right")),h=parseFloat(Da.getStyle(e,"padding-bottom")),g=r.right-r.left-s-c,m=r.bottom-r.top-d-h;i=Math.round((i-r.left-s)/g*e.width/a.currentDevicePixelRatio);o=Math.round((o-r.top-d)/m*e.height/a.currentDevicePixelRatio);return{x:i,y:o}};function e(e,t,a){var i;if("string"==typeof e){i=parseInt(e,10);if(-1!==e.indexOf("%")){i=i/100*t.parentNode[a]}}else{i=e}return i}function t(e){return e!==void 0&&null!==e&&"none"!==e}function a(a,i,o){var n=document.defaultView,r=Da._getParentNode(a),l=n.getComputedStyle(a)[i],s=n.getComputedStyle(r)[i],d=t(l),c=t(s),h=Number.POSITIVE_INFINITY;if(d||c){return Math.min(d?e(l,a,o):h,c?e(s,r,o):h)}return"none"}Da.getConstraintWidth=function(e){return a(e,"max-width","clientWidth")};Da.getConstraintHeight=function(e){return a(e,"max-height","clientHeight")};Da._calculatePadding=function(e,t,a){t=Da.getStyle(e,t);return-1<t.indexOf("%")?a*parseInt(t,10)/100:parseInt(t,10)};Da._getParentNode=function(e){var t=e.parentNode;if(t&&"[object ShadowRoot]"===t.toString()){t=t.host}return t};Da.getMaximumWidth=function(e){var t=Da._getParentNode(e);if(!t){return e.clientWidth}var a=t.clientWidth,i=Da._calculatePadding(t,"padding-left",a),o=Da._calculatePadding(t,"padding-right",a),n=a-i-o,r=Da.getConstraintWidth(e);return isNaN(r)?n:Math.min(n,r)};Da.getMaximumHeight=function(e){var t=Da._getParentNode(e);if(!t){return e.clientHeight}var a=t.clientHeight,i=Da._calculatePadding(t,"padding-top",a),o=Da._calculatePadding(t,"padding-bottom",a),n=a-i-o,r=Da.getConstraintHeight(e);return isNaN(r)?n:Math.min(n,r)};Da.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)};Da.retinaScale=function(e,t){var a=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1===a){return}var i=e.canvas,o=e.height,n=e.width;i.height=o*a;i.width=n*a;e.ctx.scale(a,a);if(!i.style.height&&!i.style.width){i.style.height=o+"px";i.style.width=n+"px"}};Da.fontString=function(e,t,a){return t+" "+e+"px "+a};Da.longestText=function(e,t,a,o){o=o||{};var n=o.data=o.data||{},r=o.garbageCollect=o.garbageCollect||[];if(o.font!==t){n=o.data={};r=o.garbageCollect=[];o.font=t}e.font=t;var l=0,s=a.length,d,c,h,g,m;for(d=0;d<s;d++){g=a[d];if(g!==void 0&&null!==g&&!0!==Da.isArray(g)){l=Da.measureText(e,n,r,l,g)}else if(Da.isArray(g)){for(c=0,h=g.length;c<h;c++){m=g[c];if(m!==void 0&&null!==m&&!Da.isArray(m)){l=Da.measureText(e,n,r,l,m)}}}}var u=r.length/2;if(u>a.length){for(d=0;d<u;d++){delete n[r[d]]}r.splice(0,u)}return l};Da.measureText=function(e,t,a,i,o){var n=t[o];if(!n){n=t[o]=e.measureText(o).width;a.push(o)}if(n>i){i=n}return i};Da.numberOfLabelLines=function(e){var t=1;Da.each(e,function(e){if(Da.isArray(e)){if(e.length>t){t=e.length}}});return t};Da.color=!ha?function(e){console.error("Color.js not found!");return e}:function(e){if(e instanceof CanvasGradient){e=_a.global.defaultColor}return ha(e)};Da.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:Da.color(e).saturate(.5).darken(.1).rgbString()}})();Wi._adapters=zi;Wi.Animation=Oa;Wi.animationService=Aa;Wi.controllers=gi;Wi.DatasetController=Fa;Wi.defaults=_a;Wi.Element=Pa;Wi.elements=ja;Wi.Interaction=mi;Wi.layouts=pi;Wi.platform=Ti;Wi.plugins=Oi;Wi.Scale=Gi;Wi.scaleService=Ai;Wi.Ticks=Vi;Wi.Tooltip=Ri;Wi.helpers.each({category:Ki,linear:$i,logarithmic:io,radialLinear:so,time:yo},function(e,t){Wi.scaleService.registerScaleType(t,e,e._defaults)});for(var To in Po){if(Po.hasOwnProperty(To)){Wi.plugins.register(Po[To])}}Wi.platform.initialize();if("undefined"!=typeof window){window.Chart=Wi}Wi.Chart=Wi;Wi.Legend=Po.legend._element;Wi.Title=Po.title._element;Wi.pluginService=Wi.plugins;Wi.PluginBase=Wi.Element.extend({});Wi.canvasHelpers=Wi.helpers.canvas;Wi.layoutService=Wi.layouts;Wi.LinearScaleBase=Ji;Wi.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(e){Wi[e]=function(t,a){return new Wi(t,Wi.helpers.merge(a||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}});return Wi});
//# sourceMappingURL=chartjs-lazy.min.js.map