0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.117.232.108


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/57.0a70e854.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{1059:function(t,e,n){t.exports=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e,n={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]},i=(function(t){var e={};for(var i in n)n.hasOwnProperty(i)&&(e[n[i]]=i);var r=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in r)if(r.hasOwnProperty(a)){if(!("channels"in r[a]))throw new Error("missing channels property: "+a);if(!("labels"in r[a]))throw new Error("missing channel labels property: "+a);if(r[a].labels.length!==r[a].channels)throw new Error("channel and label counts mismatch: "+a);var o=r[a].channels,s=r[a].labels;delete r[a].channels,delete r[a].labels,Object.defineProperty(r[a],"channels",{value:o}),Object.defineProperty(r[a],"labels",{value:s})}r.rgb.hsl=function(t){var e,n,i=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o;return s===o?e=0:i===s?e=(r-a)/l:r===s?e=2+(a-i)/l:a===s&&(e=4+(i-r)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},r.rgb.hsv=function(t){var e,n,i,r,a,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),c=function(t){return(u-t)/6/d+.5};return 0===d?r=a=0:(a=d/u,e=c(o),n=c(s),i=c(l),o===u?r=i-n:s===u?r=1/3+e-i:l===u&&(r=2/3+n-e),r<0?r+=1:r>1&&(r-=1)),[360*r,100*a,100*u]},r.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2],a=r.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(n,i));return i=1-1/255*Math.max(e,Math.max(n,i)),[a,100*o,100*i]},r.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,r=t[2]/255;return e=Math.min(1-n,1-i,1-r),[100*((1-n-e)/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-r-e)/(1-e)||0),100*e]},r.rgb.keyword=function(t){var i=e[t];if(i)return i;var r,a,o,s=1/0;for(var l in n)if(n.hasOwnProperty(l)){var u=n[l],d=(a=t,o=u,Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)+Math.pow(a[2]-o[2],2));d<s&&(s=d,r=l)}return r},r.keyword.rgb=function(t){return n[t]},r.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var r=.4124*e+.3576*n+.1805*i,a=.2126*e+.7152*n+.0722*i,o=.0193*e+.1192*n+.9505*i;return[100*r,100*a,100*o]},r.rgb.lab=function(t){var e=r.rgb.xyz(t),n=e[0],i=e[1],a=e[2];return i/=100,a/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,[116*i-16,500*(n-i),200*(i-a)]},r.hsl.rgb=function(t){var e,n,i,r,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),r=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,a=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,r[u]=255*a;return r},r.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,r=n,a=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,r*=a<=1?a:2-a,[e,100*(0===i?2*r/(a+r):2*n/(i+n)),(i+n)/2*100]},r.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,r=Math.floor(e)%6,a=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*a),l=255*i*(1-n*(1-a));switch(i*=255,r){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},r.hsv.hsl=function(t){var e,n,i,r=t[0],a=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-a)*o,n=a*s,[r,100*(n=(n/=(e=(2-a)*s)<=1?e:2-e)||0),100*(i/=2)]},r.hwb.rgb=function(t){var e,n,i,r,a,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,c=u+d;switch(c>1&&(u/=c,d/=c),e=Math.floor(6*l),i=6*l-e,0!==(1&e)&&(i=1-i),r=u+i*((n=1-d)-u),e){default:case 6:case 0:a=n,o=r,s=u;break;case 1:a=r,o=n,s=u;break;case 2:a=u,o=n,s=r;break;case 3:a=u,o=r,s=n;break;case 4:a=r,o=u,s=n;break;case 5:a=n,o=u,s=r}return[255*a,255*o,255*s]},r.cmyk.rgb=function(t){var e,n,i,r=t[0]/100,a=t[1]/100,o=t[2]/100,s=t[3]/100;return e=1-Math.min(1,r*(1-s)+s),n=1-Math.min(1,a*(1-s)+s),i=1-Math.min(1,o*(1-s)+s),[255*e,255*n,255*i]},r.xyz.rgb=function(t){var e,n,i,r=t[0]/100,a=t[1]/100,o=t[2]/100;return n=-.9689*r+1.8758*a+.0415*o,i=.0557*r+-.204*a+1.057*o,e=(e=3.2406*r+-1.5372*a+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,e=Math.min(Math.max(0,e),1),n=Math.min(Math.max(0,n),1),i=Math.min(Math.max(0,i),1),[255*e,255*n,255*i]},r.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*n-16,500*(e-n),200*(n-i)]},r.lab.xyz=function(t){var e,n,i,r=t[0],a=t[1],o=t[2];e=a/500+(n=(r+16)/116),i=n-o/200;var s=Math.pow(n,3),l=Math.pow(e,3),u=Math.pow(i,3);return n=s>.008856?s:(n-16/116)/7.787,e=l>.008856?l:(e-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},r.lab.lch=function(t){var e,n,i,r=t[0],a=t[1],o=t[2];return e=Math.atan2(o,a),(n=360*e/2/Math.PI)<0&&(n+=360),i=Math.sqrt(a*a+o*o),[r,i,n]},r.lch.lab=function(t){var e,n,i,r=t[0],a=t[1],o=t[2];return i=o/360*2*Math.PI,e=a*Math.cos(i),n=a*Math.sin(i),[r,e,n]},r.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],a=1 in arguments?arguments[1]:r.rgb.hsv(t)[2];if(0===(a=Math.round(a/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===a&&(o+=60),o},r.hsv.ansi16=function(t){return r.rgb.ansi16(r.hsv.rgb(t),t[2])},r.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];if(e===n&&n===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var r=16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5);return r},r.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50)),i=(1&e)*n*255,r=(e>>1&1)*n*255,a=(e>>2&1)*n*255;return[i,r,a]},r.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;t-=16;var i=Math.floor(t/36)/5*255,r=Math.floor((n=t%36)/6)/5*255,a=n%6/5*255;return[i,r,a]},r.rgb.hex=function(t){var e=((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2])),n=e.toString(16).toUpperCase();return"000000".substring(n.length)+n},r.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map(function(t){return t+t}).join(""));var i=parseInt(n,16),r=i>>16&255,a=i>>8&255,o=255&i;return[r,a,o]},r.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,r=t[2]/255,a=Math.max(Math.max(n,i),r),o=Math.min(Math.min(n,i),r),s=a-o;return e=s<=0?0:a===n?(i-r)/s%6:a===i?2+(r-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},r.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,r=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(r=(n-.5*i)/(1-i)),[t[0],100*i,100*r]},r.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,r=0;return i<1&&(r=(n-i)/(1-i)),[t[0],100*i,100*r]},r.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var r=[0,0,0],a=e%1*6,o=a%1,s=1-o,l=0;switch(Math.floor(a)){case 0:r[0]=1,r[1]=o,r[2]=0;break;case 1:r[0]=s,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=o;break;case 3:r[0]=0,r[1]=s,r[2]=1;break;case 4:r[0]=o,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=s}return l=(1-n)*i,[255*(n*r[0]+l),255*(n*r[1]+l),255*(n*r[2]+l)]},r.hcg.hsv=function(t){var e=t[1]/100,n=t[2]/100,i=e+n*(1-e),r=0;return i>0&&(r=e/i),[t[0],100*r,100*i]},r.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100,i=n*(1-e)+.5*e,r=0;return i>0&&i<.5?r=e/(2*i):i>=.5&&i<1&&(r=e/(2*(1-i))),[t[0],100*r,100*i]},r.hcg.hwb=function(t){var e=t[1]/100,n=t[2]/100,i=e+n*(1-e);return[t[0],100*(i-e),100*(1-i)]},r.hwb.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1-n,r=i-e,a=0;return r<1&&(a=(i-r)/(1-r)),[t[0],100*r,100*a]},r.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},r.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},r.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},r.gray.hsl=r.gray.hsv=function(t){return[0,0,t[0]]},r.gray.hwb=function(t){return[0,100,t[0]]},r.gray.cmyk=function(t){return[0,0,0,t[0]]},r.gray.lab=function(t){return[t[0],0,0]},r.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=(e<<16)+(e<<8)+e,i=n.toString(16).toUpperCase();return"000000".substring(i.length)+i},r.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}}(e={exports:{}},e.exports),e.exports);function r(t){var e=function(){for(var t={},e=Object.keys(i),n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;)for(var r=n.pop(),a=Object.keys(i[r]),o=a.length,s=0;s<o;s++){var l=a[s],u=e[l];-1===u.distance&&(u.distance=e[r].distance+1,u.parent=r,n.unshift(l))}return e}function a(t,e){return function(n){return e(t(n))}}function o(t,e){for(var n=[e[t].parent,t],r=i[e[t].parent][t],o=e[t].parent;e[o].parent;)n.unshift(e[o].parent),r=a(i[e[o].parent][o],r),o=e[o].parent;return r.conversion=n,r}i.rgb,i.hsl,i.hsv,i.hwb,i.cmyk,i.xyz,i.lab,i.lch,i.hex,i.keyword,i.ansi16,i.ansi256,i.hcg,i.apple,i.gray;var s={};Object.keys(i).forEach(function(t){s[t]={},Object.defineProperty(s[t],"channels",{value:i[t].channels}),Object.defineProperty(s[t],"labels",{value:i[t].labels});var e=function(t){for(var e=r(t),n={},i=Object.keys(e),a=i.length,s=0;s<a;s++){var l=i[s],u=e[l];null!==u.parent&&(n[l]=o(l,e))}return n}(t),n=Object.keys(e);n.forEach(function(n){var i=e[n];s[t][n]=function(t){var e=function(e){if(void 0===e||null===e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"===typeof n)for(var i=n.length,r=0;r<i;r++)n[r]=Math.round(n[r]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(i),s[t][n].raw=function(t){var e=function(e){return void 0===e||null===e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)})});var l=s,u={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]},d={getRgba:c,getHsla:h,getRgb:function(t){var e=c(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:f,getAlpha:function(t){var e=c(t);return e?e[3]:(e=h(t))?e[3]:(e=f(t))?e[3]:void 0},hexString:function(t,e){var e=void 0!==e&&3===t.length?e:t[3];return"#"+b(t[0])+b(t[1])+b(t[2])+(e>=0&&e<1?b(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?g(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:g,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+r+"%)"},percentaString:p,hslString:function(t,e){return e<1||t[3]&&t[3]<1?m(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:m,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return y[t.slice(0,3)]}};function c(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),r="";if(i){i=i[1],r=i[3];for(var a=0;a<e.length;a++)e[a]=parseInt(i[a]+i[a],16);r&&(n=Math.round(parseInt(r+r,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){r=i[2],i=i[1];for(var a=0;a<e.length;a++)e[a]=parseInt(i.slice(2*a,2*a+2),16);r&&(n=Math.round(parseInt(r,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(var a=0;a<e.length;a++)e[a]=parseInt(i[a+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(var a=0;a<e.length;a++)e[a]=Math.round(2.55*parseFloat(i[a+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=u[i[1]]))return}for(var a=0;a<e.length;a++)e[a]=v(e[a],0,255);return n=n||0==n?v(n,0,1):1,e[3]=n,e}}function h(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]),i=v(parseInt(e[1]),0,360),r=v(parseFloat(e[2]),0,100),a=v(parseFloat(e[3]),0,100),o=v(isNaN(n)?1:n,0,1);return[i,r,a,o]}}}function f(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]),i=v(parseInt(e[1]),0,360),r=v(parseFloat(e[2]),0,100),a=v(parseFloat(e[3]),0,100),o=v(isNaN(n)?1:n,0,1);return[i,r,a,o]}}}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function p(t,e){var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgba("+n+"%, "+i+"%, "+r+"%, "+(e||t[3]||1)+")"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function v(t,e,n){return Math.min(Math.max(e,t),n)}function b(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var y={};for(var x in u)y[u[x]]=x;var _=function t(e){return e instanceof t?e:this instanceof t?(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},void("string"===typeof e?(n=d.getRgba(e))?this.setValues("rgb",n):(n=d.getHsla(e))?this.setValues("hsl",n):(n=d.getHwb(e))&&this.setValues("hwb",n):"object"===typeof e&&(void 0!==(n=e).r||void 0!==n.red?this.setValues("rgb",n):void 0!==n.l||void 0!==n.lightness?this.setValues("hsl",n):void 0!==n.v||void 0!==n.value?this.setValues("hsv",n):void 0!==n.w||void 0!==n.whiteness?this.setValues("hwb",n):void 0===n.c&&void 0===n.cyan||this.setValues("cmyk",n)))):new t(e);var n};(_.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return d.hexString(this.values.rgb)},rgbString:function(){return d.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return d.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return d.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return d.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return d.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return d.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return d.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,r=2*i-1,a=this.alpha()-n.alpha(),o=((r*a===-1?r:(r+a)/(1+r*a))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new _,i=this.values,r=n.values;for(var a in i)i.hasOwnProperty(a)&&(t=i[a],"[object Array]"===(e={}.toString.call(t))?r[a]=t.slice(0):"[object Number]"===e?r[a]=t:console.error("unexpected color value:",t));return n}}).spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},_.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},_.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},_.prototype.setValues=function(t,e){var n,i,r=this.values,a=this.spaces,o=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)r[t]=e.slice(0,t.length),s=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)r[t][n]=e[t.charAt(n)];s=e.a}else if(void 0!==e[a[t][0]]){var u=a[t];for(n=0;n<t.length;n++)r[t][n]=e[u[n]];s=e.alpha}if(r.alpha=Math.max(0,Math.min(1,void 0===s?r.alpha:s)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(o[t][n],r[t][n])),r[t][n]=Math.round(i);for(var d in a)d!==t&&(r[d]=l[t][d](r[t]));return!0},_.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"===typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},_.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},"undefined"!==typeof window&&(window.Color=_);var k=_;function w(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var M={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),isNullOrUndef:function(t){return null===t||"undefined"===typeof t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return("number"===typeof t||t instanceof Number)&&isFinite(t)}),valueOrDefault:function(t,e){return"undefined"===typeof t?e:t},valueAtIndexOrDefault:function(t,e,n){return M.valueOrDefault(M.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"===typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var r,a,o;if(M.isArray(t))if(a=t.length,i)for(r=a-1;r>=0;r--)e.call(n,t[r],r);else for(r=0;r<a;r++)e.call(n,t[r],r);else if(M.isObject(t))for(o=Object.keys(t),a=o.length,r=0;r<a;r++)e.call(n,t[o[r]],o[r])},arrayEquals:function(t,e){var n,i,r,a;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],a=e[n],r instanceof Array&&a instanceof Array){if(!M.arrayEquals(r,a))return!1}else if(r!==a)return!1;return!0},clone:function(t){if(M.isArray(t))return t.map(M.clone);if(M.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),i=n.length,r=0;r<i;++r)e[n[r]]=M.clone(t[n[r]]);return e}return t},_merger:function(t,e,n,i){if(w(t)){var r=e[t],a=n[t];M.isObject(r)&&M.isObject(a)?M.merge(r,a,i):e[t]=M.clone(a)}},_mergerIf:function(t,e,n){if(w(t)){var i=e[t],r=n[t];M.isObject(i)&&M.isObject(r)?M.mergeIf(i,r):e.hasOwnProperty(t)||(e[t]=M.clone(r))}},merge:function(t,e,n){var i,r,a,o,s,l=M.isArray(e)?e:[e],u=l.length;if(!M.isObject(t))return t;for(i=(n=n||{}).merger||M._merger,r=0;r<u;++r)if(e=l[r],M.isObject(e))for(a=Object.keys(e),s=0,o=a.length;s<o;++s)i(a[s],t,e,n);return t},mergeIf:function(t,e){return M.merge(t,e,{merger:M._mergerIf})},extend:Object.assign||function(t){return M.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=M.inherits,t&&M.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},C=M;M.callCallback=M.callback,M.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},M.getValueOrDefault=M.valueOrDefault,M.getValueAtIndexOrDefault=M.valueAtIndexOrDefault;var S={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2===(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},P={effects:S};C.easingEffects=S;var A=Math.PI,D=A/180,I=2*A,T=A/2,O=A/4,F=2*A/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,r,a){if(a){var o=Math.min(a,r/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+r-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-A,-T),t.arc(u,l,o,-T,0),t.arc(u,d,o,0,T),t.arc(s,d,o,T,A)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-T,T),t.arc(s,l,o,T,A+T)):l<d?(t.arc(s,l,o,-A,0),t.arc(s,d,o,0,A)):t.arc(s,l,o,-A,A),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,r)},drawPoint:function(t,e,n,i,r,a){var o,s,l,u,d,c=(a||0)*D;if(e&&"object"===typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,r),t.rotate(c),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,r,n,0,I),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(c)*n,r-Math.cos(c)*n),c+=F,t.lineTo(i+Math.sin(c)*n,r-Math.cos(c)*n),c+=F,t.lineTo(i+Math.sin(c)*n,r-Math.cos(c)*n),t.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(c+O)*u,l=Math.sin(c+O)*u,t.arc(i-s,r-l,d,c-A,c-T),t.arc(i+l,r-s,d,c-T,c),t.arc(i+s,r+l,d,c,c+T),t.arc(i-l,r+s,d,c+T,c+A),t.closePath();break;case"rect":if(!a){u=Math.SQRT1_2*n,t.rect(i-u,r-u,2*u,2*u);break}c+=O;case"rectRot":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(i-s,r-l),t.lineTo(i+l,r-s),t.lineTo(i+s,r+l),t.lineTo(i-l,r+s),t.closePath();break;case"crossRot":c+=O;case"cross":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s);break;case"star":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s),c+=O,s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s);break;case"line":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l);break;case"dash":t.moveTo(i,r),t.lineTo(i+Math.cos(c)*n,r+Math.sin(c)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var r=n.steppedLine;if(r){if("middle"===r){var a=(e.x+n.x)/2;t.lineTo(a,i?n.y:e.y),t.lineTo(a,i?e.y:n.y)}else"after"===r&&!i||"after"!==r&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},R=L;C.clear=L.clear,C.drawRoundedRectangle=function(t){t.beginPath(),L.roundedRect.apply(L,arguments)};var z={_set:function(t,e){return C.merge(this[t]||(this[t]={}),e)}};z._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 E=z,N=C.valueOrDefault,B={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,r;return C.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,r=+t.left||0):e=n=i=r=+t||0,{top:e,right:n,bottom:i,left:r,height:e+i,width:r+n}},_parseFont:function(t){var e=E.global,n=N(t.fontSize,e.defaultFontSize),i={family:N(t.fontFamily,e.defaultFontFamily),lineHeight:C.options.toLineHeight(N(t.lineHeight,e.defaultLineHeight),n),size:n,style:N(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=function(t){return!t||C.isNullOrUndef(t.size)||C.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i},resolve:function(t,e,n,i){var r,a,o,s=!0;for(r=0,a=t.length;r<a;++r)if(void 0!==(o=t[r])&&(void 0!==e&&"function"===typeof o&&(o=o(e),s=!1),void 0!==n&&C.isArray(o)&&(o=o[n],s=!1),void 0!==o))return i&&!s&&(i.cacheable=!1),o}},W={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e===0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort(function(t,e){return t-e}).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e),i=t===Math.pow(10,n);return i?n:e}},V=W;C.log10=W.log10;var j=C,H=P,q=R,U=B,Y=V,K={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};j.easing=H,j.canvas=q,j.options=U,j.math=Y,j.rtl=K;var G=function(t){j.extend(this,t),this.initialize.apply(this,arguments)};j.extend(G.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=j.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,r=e._view;return n&&1!==t?(r||(r=e._view={}),i||(i=e._start={}),function(t,e,n,i){var r,a,o,s,l,u,d,c,h,f=Object.keys(n);for(r=0,a=f.length;r<a;++r)if(o=f[r],u=n[o],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),l=t[o],(d=typeof u)===typeof l)if("string"===d){if((c=k(l)).valid&&(h=k(u)).valid){e[o]=h.mix(c,i).rgbString();continue}}else if(j.isFinite(l)&&j.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,r,n,t),e):(e._view=j.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return j.isNumber(this._model.x)&&j.isNumber(this._model.y)}}),G.extend=j.inherits;var X=G,Z=X.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),$=Z;Object.defineProperty(Z.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Z.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),E._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:j.noop,onComplete:j.noop}});var J={animations:[],request:null,addAnimation:function(t,e,n,i){var r,a,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),r=0,a=o.length;r<a;++r)if(o[r].chart===t)return void(o[r]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=j.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=j.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,r=this.animations,a=0;a<r.length;)t=r[a],e=t.chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),j.callback(t.render,[e,t],e),j.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(j.callback(t.onAnimationComplete,[t],e),e.animating=!1,r.splice(a,1)):++a}},Q=j.options.resolve,tt=["push","pop","shift","splice","unshift"];function et(t,e){var n=t._chartjs;if(n){var i=n.listeners,r=i.indexOf(e);-1!==r&&i.splice(r,1),i.length>0||(tt.forEach(function(e){delete t[e]}),delete t._chartjs)}}var nt=function(t,e){this.initialize(t,e)};j.extend(nt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),r=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||r.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||r.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&et(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],r=n.data;for(t=0,e=i.length;t<e;++t)r[t]=r[t]||this.createMetaData(t);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,i=n.getDataset(),r=i.data||(i.data=[]);n._data!==r&&(n._data&&et(n._data,n),r&&Object.isExtensible(r)&&(e=n,(t=r)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),tt.forEach(function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),r=i.apply(this,e);return j.each(t._chartjs.listeners,function(t){"function"===typeof t[n]&&t[n].apply(t,e)}),r}})}))),n._data=r),n.resyncElements()},_configure:function(){this._config=j.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&j._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:j.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,r=0;r<i;++r)n[r].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this.getMeta(),i=n.dataset;return this._configure(),i&&void 0===t?e=this._resolveDatasetElementOptions(i||{}):(t=t||0,e=this._resolveDataElementOptions(n.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,r,a,o=this,s=o.chart,l=o._config,u=t.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},c=o._datasetElementOptions,h={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,i=c.length;n<i;++n)r=c[n],a=e?"hover"+r.charAt(0).toUpperCase()+r.slice(1):r,h[r]=Q([u[a],l[a],d[a]],f);return h},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,r=n._cachedDataOpts;if(r&&!i)return r;var a,o,s,l,u=n.chart,d=n._config,c=u.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!i};if(i=i||{},j.isArray(h))for(o=0,s=h.length;o<s;++o)l=h[o],f[l]=Q([i[l],d[l],c[l]],g,e,p);else for(a=Object.keys(h),o=0,s=a.length;o<s;++o)l=a[o],f[l]=Q([i[l],d[h[l]],d[l],c[l]],g,e,p);return p.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){j.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},r=t._model,a=j.getHoverColor;t.$previousStyle={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth},r.backgroundColor=Q([i.hoverBackgroundColor,e.hoverBackgroundColor,a(r.backgroundColor)],void 0,n),r.borderColor=Q([i.hoverBorderColor,e.hoverBorderColor,a(r.borderColor)],void 0,n),r.borderWidth=Q([i.hoverBorderWidth,e.hoverBorderWidth,r.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,r,a,o=this.getMeta().dataset,s={};if(o){for(a=o._model,r=this._resolveDatasetElementOptions(o,!0),i=Object.keys(r),t=0,e=i.length;t<e;++t)n=i[t],s[n]=a[n],a[n]=r[n];o.$previousStyle=s}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,i=e.length;i<n?t.data.splice(i,n-i):i>n&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),nt.extend=j.inherits;var it=nt,rt=2*Math.PI;function at(t,e){var n=e.startAngle,i=e.endAngle,r=e.pixelMargin,a=r/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-a,i+a),e.innerRadius>r?(a=r/e.innerRadius,t.arc(o,s,e.innerRadius-r,i+a,n-a,!0)):t.arc(o,s,r,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function ot(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var r,a=n.endAngle;for(i&&(n.endAngle=n.startAngle+rt,at(t,n),n.endAngle=a,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=rt,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+rt,n.startAngle,!0),r=0;r<n.fullCircles;++r)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+rt),r=0;r<n.fullCircles;++r)t.stroke()}(t,e,n,i),i&&at(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}E._set("global",{elements:{arc:{backgroundColor:E.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var st=X.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=j.getAngleFromPoint(n,{x:t,y:e}),r=i.angle,a=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=rt;for(;r>s;)r-=rt;for(;r<o;)r+=rt;var l=r>=o&&r<=s,u=a>=n.innerRadius&&a<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,r={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/rt)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,r.fullCircles){for(r.endAngle=r.startAngle+rt,e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),t=0;t<r.fullCircles;++t)e.fill();r.endAngle=r.startAngle+n.circumference%rt}e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&ot(e,n,r),e.restore()}}),lt=j.valueOrDefault,ut=E.global.defaultColor;E._set("global",{elements:{line:{tension:.4,backgroundColor:ut,borderWidth:3,borderColor:ut,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var dt=X.extend({_type:"line",draw:function(){var t,e,n,i=this,r=i._view,a=i._chart.ctx,o=r.spanGaps,s=i._children.slice(),l=E.global,u=l.elements.line,d=-1,c=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=j.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),c=o;break}c&&s.push(s[0])}for(a.save(),a.lineCap=r.borderCapStyle||u.borderCapStyle,a.setLineDash&&a.setLineDash(r.borderDash||u.borderDash),a.lineDashOffset=lt(r.borderDashOffset,u.borderDashOffset),a.lineJoin=r.borderJoinStyle||u.borderJoinStyle,a.lineWidth=lt(r.borderWidth,u.borderWidth),a.strokeStyle=r.borderColor||l.defaultColor,a.beginPath(),(n=s[0]._view).skip||(a.moveTo(n.x,n.y),d=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===d?j.previousItem(s,t):s[d],n.skip||(d!==t-1&&!o||-1===d?a.moveTo(n.x,n.y):j.canvas.lineTo(a,e._view,n),d=t);c&&a.closePath(),a.stroke(),a.restore()}}}),ct=j.valueOrDefault,ht=E.global.defaultColor;function ft(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}E._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ht,borderColor:ht,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var gt=X.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ft,inXRange:ft,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,r=e.rotation,a=e.radius,o=e.x,s=e.y,l=E.global,u=l.defaultColor;e.skip||(void 0===t||j.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=ct(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,j.canvas.drawPoint(n,i,a,o,s,r))}}),pt=E.global.defaultColor;function mt(t){return t&&void 0!==t.width}function vt(t){var e,n,i,r,a;return mt(t)?(a=t.width/2,e=t.x-a,n=t.x+a,i=Math.min(t.y,t.base),r=Math.max(t.y,t.base)):(a=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-a,r=t.y+a),{left:e,top:i,right:n,bottom:r}}function bt(t,e,n){return t===e?n:t===n?e:t}function yt(t,e,n){var i,r,a,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=bt(e,"left","right")):t.base<t.y&&(e=bt(e,"bottom","top")),n[e]=!0,n):n}(t);return j.isObject(s)?(i=+s.top||0,r=+s.right||0,a=+s.bottom||0,o=+s.left||0):i=r=a=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||r<0?0:r>e?e:r,b:l.bottom||a<0?0:a>n?n:a,l:l.left||o<0?0:o>e?e:o}}function xt(t,e,n){var i=null===e,r=null===n,a=!(!t||i&&r)&&vt(t);return a&&(i||e>=a.left&&e<=a.right)&&(r||n>=a.top&&n<=a.bottom)}E._set("global",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:"bottom",borderWidth:0}}});var _t=X.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=vt(t),n=e.right-e.left,i=e.bottom-e.top,r=yt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b}}}(e),i=n.outer,r=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===r.w&&i.h===r.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(r.x,r.y,r.w,r.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return xt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return mt(n)?xt(n,t,null):xt(n,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return mt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return mt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),kt={},wt=st,Mt=dt,Ct=gt,St=_t;kt.Arc=wt,kt.Line=Mt,kt.Point=Ct,kt.Rectangle=St;var Pt=j._deprecated,At=j.valueOrDefault;function Dt(t,e,n){var i,r,a=n.barThickness,o=e.stackCount,s=e.pixels[t],l=j.isNullOrUndef(a)?function(t,e){var n,i,r,a,o=t._length;for(r=1,a=e.length;r<a;++r)o=Math.min(o,Math.abs(e[r]-e[r-1]));for(r=0,a=t.getTicks().length;r<a;++r)i=t.getPixelForTick(r),o=r>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return j.isNullOrUndef(a)?(i=l*n.categoryPercentage,r=n.barPercentage):(i=a*o,r=1),{chunk:i/o,ratio:r,start:s-i/2}}E._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),E._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var It=it.extend({dataElementType:kt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;it.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Pt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Pt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Pt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Pt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Pt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e<n;++e)this.updateElement(i[e],e,t)},updateElement:function(t,e,n){var i=this,r=i.getMeta(),a=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(r.xAxisID),t._yScale=i.getScaleForId(r.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:a.label,label:i.chart.data.labels[e]},j.isArray(a.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var r=this,a=t._model,o=r._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=r._ruler||r.getRuler(),d=r.calculateBarValuePixels(r.index,e,i),c=r.calculateBarIndexPixels(r.index,e,u,i);a.horizontal=l,a.base=n?s:d.base,a.x=l?n?s:d.head:c.center,a.y=l?c.center:n?s:d.head,a.height=l?c.size:void 0,a.width=l?void 0:c.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),r=i._getMatchingVisibleMetas(this._type),a=i.options.stacked,o=r.length,s=[];for(e=0;e<o&&(n=r[e],(!1===a||-1===s.indexOf(n.stack)||void 0===a&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this._getIndexScale(),i=[];for(t=0,e=this.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var i,r,a,o,s,l,u,d=this.chart,c=this._getValueScale(),h=c.isHorizontal(),f=d.data.datasets,g=c._getMatchingVisibleMetas(this._type),p=c._parseValue(f[t].data[e]),m=n.minBarLength,v=c.options.stacked,b=this.getMeta().stack,y=void 0===p.start?0:p.max>=0&&p.min>=0?p.min:p.max,x=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(r=g[i]).index!==t;++i)r.stack===b&&(u=c._parseValue(f[r.index].data[e]),a=void 0===u.start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&a<0||p.max>=0&&a>0)&&(y+=a));return o=c.getPixelForValue(y),s=c.getPixelForValue(y+x),l=s-o,void 0!==m&&Math.abs(l)<m&&(l=m,s=x>=0&&!h||x<0&&h?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var r="flex"===i.barThickness?function(t,e,n){var i,r=e.pixels,a=r[t],o=t>0?r[t-1]:null,s=t<r.length-1?r[t+1]:null,l=n.categoryPercentage;return null===o&&(o=a-(null===s?e.end-e.start:s-a)),null===s&&(s=a+a-o),i=a-(a-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):Dt(e,n,i),a=this.getStackIndex(t,this.getMeta().stack),o=r.start+r.chunk*a+r.chunk/2,s=Math.min(At(i.maxBarThickness,1/0),r.chunk*r.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),r=n.length,a=0;for(j.canvas.clipArea(t.ctx,t.chartArea);a<r;++a){var o=e._parseValue(i.data[a]);isNaN(o.min)||isNaN(o.max)||n[a].draw()}j.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=j.extend({},it.prototype._resolveDataElementOptions.apply(this,arguments)),e=this._getIndexScale().options,n=this._getValueScale().options;return t.barPercentage=At(e.barPercentage,t.barPercentage),t.barThickness=At(e.barThickness,t.barThickness),t.categoryPercentage=At(e.categoryPercentage,t.categoryPercentage),t.maxBarThickness=At(e.maxBarThickness,t.maxBarThickness),t.minBarLength=At(n.minBarLength,t.minBarLength),t}}),Tt=j.valueOrDefault,Ot=j.options.resolve;E._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}});var Ft=it.extend({dataElementType:kt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta(),i=n.data;j.each(i,function(n,i){e.updateElement(n,i,t)})},updateElement:function(t,e,n){var i=this,r=i.getMeta(),a=t.custom||{},o=i.getScaleForId(r.xAxisID),s=i.getScaleForId(r.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,c=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"===typeof u?u:NaN,e,d),h=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:a.skip||isNaN(c)||isNaN(h),x:c,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Tt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Tt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Tt(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,r=n.getDataset(),a=t.custom||{},o=r.data[e]||{},s=it.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:r,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=j.extend({},s)),s.radius=Ot([a.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),Lt=j.valueOrDefault,Rt=Math.PI,zt=2*Rt,Et=Rt/2;E._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,r=document.createElement("ul"),a=t.data,o=a.datasets,s=a.labels;if(r.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return r.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var r=t.getDatasetMeta(0),a=r.controller.getStyle(i);return{text:n,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,hidden:isNaN(e.datasets[0].data[i])||r.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,r,a=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(r=o.getDatasetMeta(n)).data[a]&&(r.data[a].hidden=!r.data[a].hidden);o.update()}},cutoutPercentage:50,rotation:-Et,circumference:zt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return j.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Nt=it.extend({dataElementType:kt.Arc,linkScales:j.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,r,a=this,o=a.chart,s=o.chartArea,l=o.options,u=1,d=1,c=0,h=0,f=a.getMeta(),g=f.data,p=l.cutoutPercentage/100||0,m=l.circumference,v=a._getRingWeight(a.index);if(m<zt){var b=l.rotation%zt,y=(b+=b>=Rt?-zt:b<-Rt?zt:0)+m,x=Math.cos(b),_=Math.sin(b),k=Math.cos(y),w=Math.sin(y),M=b<=0&&y>=0||y>=zt,C=b<=Et&&y>=Et||y>=zt+Et,S=b===-Rt||y>=Rt,P=b<=-Et&&y>=-Et||y>=Rt+Et,A=S?-1:Math.min(x,x*p,k,k*p),D=P?-1:Math.min(_,_*p,w,w*p),I=M?1:Math.max(x,x*p,k,k*p),T=C?1:Math.max(_,_*p,w,w*p);u=(I-A)/2,d=(T-D)/2,c=-(I+A)/2,h=-(T+D)/2}for(i=0,r=g.length;i<r;++i)g[i]._options=a._resolveDataElementOptions(g[i],i);for(o.borderWidth=a.getMaxBorderWidth(),e=(s.right-s.left-o.borderWidth)/u,n=(s.bottom-s.top-o.borderWidth)/d,o.outerRadius=Math.max(Math.min(e,n)/2,0),o.innerRadius=Math.max(o.outerRadius*p,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(a._getVisibleDatasetWeightTotal()||1),o.offsetX=c*o.outerRadius,o.offsetY=h*o.outerRadius,f.total=a.calculateTotal(),a.outerRadius=o.outerRadius-o.radiusLength*a._getRingWeightOffset(a.index),a.innerRadius=Math.max(a.outerRadius-o.radiusLength*v,0),i=0,r=g.length;i<r;++i)a.updateElement(g[i],i,t)},updateElement:function(t,e,n){var i=this,r=i.chart,a=r.chartArea,o=r.options,s=o.animation,l=(a.left+a.right)/2,u=(a.top+a.bottom)/2,d=o.rotation,c=o.rotation,h=i.getDataset(),f=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(h.data[e])*(o.circumference/zt),g=n&&s.animateScale?0:i.innerRadius,p=n&&s.animateScale?0:i.outerRadius,m=t._options||{};j.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+r.offsetX,y:u+r.offsetY,startAngle:d,endAngle:c,circumference:f,outerRadius:p,innerRadius:g,label:j.valueAtIndexOrDefault(h.label,e,r.data.labels[e])}});var v=t._model;n&&s.animateRotate||(v.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return j.each(n.data,function(n,r){t=e.data[r],isNaN(t)||n.hidden||(i+=Math.abs(t))}),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?zt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,r,a,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){i=d.getDatasetMeta(e),t=i.data,e!==this.index&&(a=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)r=t[e],a?(a._configure(),o=a._resolveDataElementOptions(r,e)):o=r._options,"inner"!==o.borderAlign&&(s=o.borderWidth,l=o.hoverBorderWidth,u=l>(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Lt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});E._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"}}),E._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Bt=It.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Wt=j.valueOrDefault,Vt=j.options.resolve,jt=j.canvas._isPointInArea;function Ht(t,e){var n=t&&t.options.ticks||{},i=n.reverse,r=void 0===n.min?e:0,a=void 0===n.max?e:0;return{start:i?a:r,end:i?r:a}}E._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var qt=it.extend({datasetElementType:kt.Line,dataElementType:kt.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,r=i.getMeta(),a=r.dataset,o=r.data||[],s=i.chart.options,l=i._config,u=i._showLine=Wt(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(r.xAxisID),i._yScale=i.getScaleForId(r.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),a._scale=i._yScale,a._datasetIndex=i.index,a._children=o,a._model=i._resolveDatasetElementOptions(a),a.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==a._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,r,a=this,o=a.getMeta(),s=t.custom||{},l=a.getDataset(),u=a.index,d=l.data[e],c=a._xScale,h=a._yScale,f=o.dataset._model,g=a._resolveDataElementOptions(t,e);i=c.getPixelForValue("object"===typeof d?d:NaN,e,u),r=n?h.getBasePixel():a.calculatePointY(d,e,u),t._xScale=c,t._yScale=h,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:r,skip:s.skip||isNaN(i)||isNaN(r),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Wt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},r=e.chart.options,a=r.elements.line,o=it.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=Wt(n.spanGaps,r.spanGaps),o.tension=Wt(n.lineTension,a.tension),o.steppedLine=Vt([i.steppedLine,n.steppedLine,a.stepped]),o.clip=function(t){var e,n,i,r;return j.isObject(t)?(e=t.top,n=t.right,i=t.bottom,r=t.left):e=n=i=r=t,{top:e,right:n,bottom:i,left:r}}(Wt(n.clip,function(t,e,n){var i=n/2,r=Ht(t,i),a=Ht(e,i);return{top:a.end,right:r.end,bottom:a.start,left:r.start}}(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i,r,a,o,s,l,u,d=this.chart,c=this._yScale,h=0,f=0;if(c.options.stacked){for(s=+c.getRightValue(t),l=d._getSortedVisibleDatasetMetas(),u=l.length,i=0;i<u&&(a=l[i]).index!==n;++i)r=d.data.datasets[a.index],"line"===a.type&&a.yAxisID===c.id&&((o=+c.getRightValue(r.data[e]))<0?f+=o||0:h+=o||0);return s<0?c.getPixelForValue(f+s):c.getPixelForValue(h+s)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,r=this.chart,a=this.getMeta(),o=a.dataset._model,s=r.chartArea,l=a.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter(function(t){return!t._model.skip})),"monotone"===o.cubicInterpolationMode)j.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=j.splineCurve(j.previousItem(l,t)._model,n,j.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(r.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,jt(n,s)&&(t>0&&jt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&jt(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],r=e.chartArea,a=e.canvas,o=0,s=i.length;for(this._showLine&&(t=n.dataset._model.clip,j.canvas.clipArea(e.ctx,{left:!1===t.left?0:r.left-t.left,right:!1===t.right?a.width:r.right+t.right,top:!1===t.top?0:r.top-t.top,bottom:!1===t.bottom?a.height:r.bottom+t.bottom}),n.dataset.draw(),j.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(r)},setHoverStyle:function(t){var e=t._model,n=t._options,i=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Wt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Wt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Wt(n.hoverBorderWidth,n.borderWidth),e.radius=Wt(n.hoverRadius,n.radius)}}),Ut=j.options.resolve;E._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,r=document.createElement("ul"),a=t.data,o=a.datasets,s=a.labels;if(r.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return r.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var r=t.getDatasetMeta(0),a=r.controller.getStyle(i);return{text:n,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,hidden:isNaN(e.datasets[0].data[i])||r.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,r,a=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(r=o.getDatasetMeta(n)).data[a].hidden=!r.data[a].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Yt=it.extend({dataElementType:kt.Arc,linkScales:j.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,r=this,a=r.getDataset(),o=r.getMeta(),s=r.chart.options.startAngle||0,l=r._starts=[],u=r._angles=[],d=o.data;for(r._updateRadius(),o.count=r.countVisibleElements(),e=0,n=a.data.length;e<n;e++)l[e]=s,i=r._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=r._resolveDataElementOptions(d[e],e),r.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,r=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(r/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,r=i.chart,a=i.getDataset(),o=r.options,s=o.animation,l=r.scale,u=r.data.labels,d=l.xCenter,c=l.yCenter,h=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(a.data[e]),g=i._starts[e],p=g+(t.hidden?0:i._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(a.data[e]),v=t._options||{};j.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:c,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?h:g,endAngle:n&&s.animateRotate?h:p,label:j.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return j.each(e.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=j.getHoverColor,r=j.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=r(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=r(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=r(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),r=e.getMeta();if(isNaN(i.data[t])||r.data[t].hidden)return 0;var a={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return Ut([e.chart.options.elements.arc.angle,2*Math.PI/n],a,t)}});E._set("pie",j.clone(E.doughnut)),E._set("pie",{cutoutPercentage:0});var Kt=Nt,Gt=j.valueOrDefault;E._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Xt=it.extend({datasetElementType:kt.Line,dataElementType:kt.Point,linkScales:j.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,r=i.getMeta(),a=r.dataset,o=r.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),a._scale=s,a._datasetIndex=i.index,a._children=o,a._loop=!0,a._model=i._resolveDatasetElementOptions(a),a.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,r=t.custom||{},a=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,a.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,c=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:c,skip:r.skip||isNaN(d)||isNaN(c),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Gt(r.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this._config,e=this.chart.options,n=it.prototype._resolveDatasetElementOptions.apply(this,arguments);return n.spanGaps=Gt(t.spanGaps,e.spanGaps),n.tension=Gt(t.lineTension,e.elements.line.tension),n},updateBezierControlPoints:function(){var t,e,n,i,r=this.getMeta(),a=this.chart.chartArea,o=r.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(r.dataset._model.spanGaps&&(o=o.filter(function(t){return!t._model.skip})),t=0,e=o.length;t<e;++t)n=o[t]._model,i=j.splineCurve(j.previousItem(o,t,!0)._model,n,j.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,a.left,a.right),n.controlPointPreviousY=s(i.previous.y,a.top,a.bottom),n.controlPointNextX=s(i.next.x,a.left,a.right),n.controlPointNextY=s(i.next.y,a.top,a.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Gt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Gt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Gt(n.hoverBorderWidth,n.borderWidth),e.radius=Gt(n.hoverRadius,n.radius)}});E._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),E._set("global",{datasets:{scatter:{showLine:!1}}});var Zt={bar:It,bubble:Ft,doughnut:Nt,horizontalBar:Bt,line:qt,polarArea:Yt,pie:Kt,radar:Xt,scatter:qt};function $t(t,e){return t.native?{x:t.x,y:t.y}:j.getRelativePosition(t,e)}function Jt(t,e){var n,i,r,a,o,s,l=t._getSortedVisibleDatasetMetas();for(i=0,a=l.length;i<a;++i)for(n=l[i].data,r=0,o=n.length;r<o;++r)(s=n[r])._view.skip||e(s)}function Qt(t,e){var n=[];return Jt(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function te(t,e,n,i){var r=Number.POSITIVE_INFINITY,a=[];return Jt(t,function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<r?(a=[t],r=s):s===r&&a.push(t)}}),a}function ee(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var r=e?Math.abs(t.x-i.x):0,a=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(a,2))}}function ne(t,e,n){var i=$t(e,t);n.axis=n.axis||"x";var r=ee(n.axis),a=n.intersect?Qt(t,i):te(t,i,!1,r),o=[];return a.length?(t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[a[0]._index];e&&!e._view.skip&&o.push(e)}),o):[]}var ie={modes:{single:function(t,e){var n=$t(e,t),i=[];return Jt(t,function(t){if(t.inRange(n.x,n.y))return i.push(t),i}),i.slice(0,1)},label:ne,index:ne,dataset:function(t,e,n){var i=$t(e,t);n.axis=n.axis||"xy";var r=ee(n.axis),a=n.intersect?Qt(t,i):te(t,i,!1,r);return a.length>0&&(a=t.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(t,e){return ne(t,e,{intersect:!1})},point:function(t,e){var n=$t(e,t);return Qt(t,n)},nearest:function(t,e,n){var i=$t(e,t);n.axis=n.axis||"xy";var r=ee(n.axis);return te(t,i,n.intersect,r)},x:function(t,e,n){var i=$t(e,t),r=[],a=!1;return Jt(t,function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(a=!0)}),n.intersect&&!a&&(r=[]),r},y:function(t,e,n){var i=$t(e,t),r=[],a=!1;return Jt(t,function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(a=!0)}),n.intersect&&!a&&(r=[]),r}}},re=j.extend;function ae(t,e){return j.where(t,function(t){return t.pos===e})}function oe(t,e){return t.sort(function(t,n){var i=e?n:t,r=e?t:n;return i.weight===r.weight?i.index-r.index:i.weight-r.weight})}function se(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function le(t,e,n){var i,r,a=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?a.height:a.width,t[n.pos]+=n.size,a.getPadding){var s=a.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-se(o,t,"left","right"),r=e.outerHeight-se(o,t,"top","bottom"),i!==t.w||r!==t.h){t.w=i,t.h=r;var l=n.horizontal?[i,t.w]:[r,t.h];return l[0]!==l[1]&&(!isNaN(l[0])||!isNaN(l[1]))}}function ue(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach(function(t){i[t]=Math.max(e[t],n[t])}),i}return i(t?["left","right"]:["top","bottom"])}function de(t,e,n){var i,r,a,o,s,l,u=[];for(i=0,r=t.length;i<r;++i)a=t[i],(o=a.box).update(a.width||e.w,a.height||e.h,ue(a.horizontal,e)),le(e,n,a)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(a);return s&&de(u,e,n)||l}function ce(t,e,n){var i,r,a,o,s=n.padding,l=e.x,u=e.y;for(i=0,r=t.length;i<r;++i)a=t[i],o=a.box,a.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}E._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var he,fe={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,r=["fullWidth","position","weight"],a=r.length,o=0;o<a;++o)i=r[o],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=t.options.layout||{},r=j.options.toPadding(i.padding),a=e-r.width,o=n-r.height,s=function(t){var e=function(t){var e,n,i,r=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],r.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return r}(t),n=oe(ae(e,"left"),!0),i=oe(ae(e,"right")),r=oe(ae(e,"top"),!0),a=oe(ae(e,"bottom"));return{leftAndTop:n.concat(r),rightAndBottom:i.concat(a),chartArea:ae(e,"chartArea"),vertical:n.concat(i),horizontal:r.concat(a)}}(t.boxes),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:a,vBoxMaxWidth:a/2/l.length,hBoxMaxHeight:o/2}),c=re({maxPadding:re({},r),w:a,h:o,x:r.left,y:r.top},r);!function(t,e){var n,i,r;for(n=0,i=t.length;n<i;++n)(r=t[n]).width=r.horizontal?r.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,r.height=r.horizontal&&e.hBoxMaxHeight}(l.concat(u),d),de(l,c,d),de(u,c,d)&&de(l,c,d),function(t){var e=t.maxPadding;function n(n){var i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(c),ce(s.leftAndTop,c,d),c.x+=c.w,c.y+=c.h,ce(s.rightAndBottom,c,d),t.chartArea={left:c.left,top:c.top,right:c.left+c.w,bottom:c.top+c.h},j.each(s.chartArea,function(e){var n=e.box;re(n,t.chartArea),n.update(c.w,c.h)})}}},ge=(he=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"}))&&he.default||he,pe="$chartjs",me="chartjs-size-monitor",ve="chartjs-render-monitor",be="chartjs-render-animation",ye=["animationstart","webkitAnimationStart"],xe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function _e(t,e){var n=j.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var ke=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(n){}return t}()&&{passive:!0};function we(t,e,n){t.addEventListener(e,n,ke)}function Me(t,e,n){t.removeEventListener(e,n,ke)}function Ce(t,e,n,i,r){return{type:t,chart:e,native:r||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Se(t){var e=document.createElement("div");return e.className=t||"",e}function Pe(t,e,n){var i=t[pe]||(t[pe]={}),r=i.resizer=function(t){var e=Se(me),n=Se(me+"-expand"),i=Se(me+"-shrink");n.appendChild(Se()),i.appendChild(Se()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var r=function(){e._reset(),t()};return we(n,"scroll",r.bind(n,"expand")),we(i,"scroll",r.bind(i,"shrink")),e}(function(t,e){var n=!1,i=[];return function(){i=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,j.requestAnimFrame.call(window,function(){n=!1,t.apply(e,i)}))}}(function(){if(i.resizer){var r=n.options.maintainAspectRatio&&t.parentNode,a=r?r.clientWidth:0;e(Ce("resize",n)),r&&r.clientWidth<a&&n.canvas&&e(Ce("resize",n))}}));!function(t,e){var n=t[pe]||(t[pe]={}),i=n.renderProxy=function(t){t.animationName===be&&e()};j.each(ye,function(e){we(t,e,i)}),n.reflow=!!t.offsetParent,t.classList.add(ve)}(t,function(){if(i.resizer){var e=t.parentNode;e&&e!==r.parentNode&&e.insertBefore(r,e.firstChild),r._reset()}})}function Ae(t){var e=t[pe]||{},n=e.resizer;delete e.resizer,function(t){var e=t[pe]||{},n=e.renderProxy;n&&(j.each(ye,function(e){Me(t,e,n)}),delete e.renderProxy),t.classList.remove(ve)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var De={disableCSSInjection:!1,_enabled:"undefined"!==typeof window&&"undefined"!==typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document,n=e.host?e:document.head;!function(t,e){var n=t[pe]||(t[pe]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(n,ge)}},acquireContext:function(t,e){"string"===typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[pe]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===r||""===r){var a=_e(t,"width");void 0!==a&&(t.width=a)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=_e(t,"height");void 0!==a&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[pe]){var n=e[pe].initial;["height","width"].forEach(function(t){var i=n[t];j.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)}),j.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete e[pe]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var r=n[pe]||(n[pe]={}),a=r.proxies||(r.proxies={}),o=a[t.id+"_"+e]=function(e){n(function(t,e){var n=xe[t.type]||t.type,i=j.getRelativePosition(t,e);return Ce(n,e,i.x,i.y,t)}(e,t))};we(i,e,o)}else Pe(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var r=n[pe]||{},a=r.proxies||{},o=a[t.id+"_"+e];o&&Me(i,e,o)}else Ae(i)}};j.addEvent=we,j.removeEvent=Me;var Ie=De._enabled?De:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Te=j.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ie);E._set("global",{plugins:{}});var Oe={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,r,a,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if(r=l[i],a=r.plugin,"function"===typeof(s=a[e])&&((o=[t].concat(n||[])).push(r.options),!1===s.apply(a,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],r=t&&t.config||{},a=r.options&&r.options.plugins||{};return this._plugins.concat(r.plugins||[]).forEach(function(t){var e=n.indexOf(t);if(-1===e){var r=t.id,o=a[r];!1!==o&&(!0===o&&(o=j.clone(E.global.plugins[r])),n.push(t),i.push({plugin:t,options:o||{}}))}}),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},Fe={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=j.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?j.merge(Object.create(null),[E.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=j.extend(this.defaults[t],e))},addScalesToLayout:function(t){j.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,fe.addBox(t,e)})}},Le=j.valueOrDefault,Re=j.rtl.getRtlAdapter;E._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:j.noop,title:function(t,e){var n="",i=e.labels,r=i?i.length:0;if(t.length>0){var a=t[0];a.label?n=a.label:a.xLabel?n=a.xLabel:r>0&&a.index<r&&(n=i[a.index])}return n},afterTitle:j.noop,beforeBody:j.noop,beforeLabel:j.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),j.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex),i=n.data[t.index],r=i._view;return{borderColor:r.borderColor,backgroundColor:r.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:j.noop,afterBody:j.noop,beforeFooter:j.noop,footer:j.noop,afterFooter:j.noop}}});var ze={average:function(t){if(!t.length)return!1;var e,n,i=0,r=0,a=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,r+=s.y,++a}}return{x:i/a,y:r/a}},nearest:function(t,e){var n,i,r,a=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=j.distanceBetweenPoints(e,u);d<s&&(s=d,r=l)}}if(r){var c=r.tooltipPosition();a=c.x,o=c.y}return{x:a,y:o}}};function Ee(t,e){return e&&(j.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ne(t){return("string"===typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Be(t){var e=t._xScale,n=t._yScale||t._scale,i=t._index,r=t._datasetIndex,a=t._chart.getDatasetMeta(r).controller,o=a._getIndexScale(),s=a._getValueScale();return{xLabel:e?e.getLabelForIndex(i,r):"",yLabel:n?n.getLabelForIndex(i,r):"",label:o?""+o.getLabelForIndex(i,r):"",value:s?""+s.getLabelForIndex(i,r):"",index:i,datasetIndex:r,x:t._model.x,y:t._model.y}}function We(t){var e=E.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Le(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Le(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Le(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Le(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Le(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Le(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Le(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Le(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Le(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ve(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function je(t){return Ee([],Ne(t))}var He=X.extend({initialize:function(){this._model=We(this._options),this._lastActive=[]},getTitle:function(){var t=this._options,e=t.callbacks,n=e.beforeTitle.apply(this,arguments),i=e.title.apply(this,arguments),r=e.afterTitle.apply(this,arguments),a=[];return a=Ee(a,Ne(n)),a=Ee(a,Ne(i)),a=Ee(a,Ne(r))},getBeforeBody:function(){return je(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,r=[];return j.each(t,function(t){var a={before:[],lines:[],after:[]};Ee(a.before,Ne(i.beforeLabel.call(n,t,e))),Ee(a.lines,i.label.call(n,t,e)),Ee(a.after,Ne(i.afterLabel.call(n,t,e))),r.push(a)}),r},getAfterBody:function(){return je(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),n=t.footer.apply(this,arguments),i=t.afterFooter.apply(this,arguments),r=[];return r=Ee(r,Ne(e)),r=Ee(r,Ne(n)),r=Ee(r,Ne(i))},update:function(t){var e,n,i=this,r=i._options,a=i._model,o=i._model=We(r),s=i._active,l=i._data,u={xAlign:a.xAlign,yAlign:a.yAlign},d={x:a.x,y:a.y},c={width:a.width,height:a.height},h={x:a.caretX,y:a.caretY};if(s.length){o.opacity=1;var f=[],g=[];h=ze[r.position].call(i,s,i._eventPosition);var p=[];for(e=0,n=s.length;e<n;++e)p.push(Be(s[e]));r.filter&&(p=p.filter(function(t){return r.filter(t,l)})),r.itemSort&&(p=p.sort(function(t,e){return r.itemSort(t,e,l)})),j.each(p,function(t){f.push(r.callbacks.labelColor.call(i,t,i._chart)),g.push(r.callbacks.labelTextColor.call(i,t,i._chart))}),o.title=i.getTitle(p,l),o.beforeBody=i.getBeforeBody(p,l),o.body=i.getBody(p,l),o.afterBody=i.getAfterBody(p,l),o.footer=i.getFooter(p,l),o.x=h.x,o.y=h.y,o.caretPadding=r.caretPadding,o.labelColors=f,o.labelTextColors=g,o.dataPoints=p,c=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,r=0,a=e.body,o=a.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,c=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*c,i+=l?(l-1)*e.footerSpacing:0;var h=0,f=function(t){r=Math.max(r,n.measureText(t).width+h)};return n.font=j.fontString(u,e._titleFontStyle,e._titleFontFamily),j.each(e.title,f),n.font=j.fontString(d,e._bodyFontStyle,e._bodyFontFamily),j.each(e.beforeBody.concat(e.afterBody),f),h=e.displayColors?d+2:0,j.each(a,function(t){j.each(t.before,f),j.each(t.lines,f),j.each(t.after,f)}),h=0,n.font=j.fontString(c,e._footerFontStyle,e._footerFontFamily),j.each(e.footer,f),{width:r+=2*e.xPadding,height:i}}(this,o),u=function(t,e){var n,i,r,a,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",c="center";s.y<e.height?c="top":s.y>l.height-e.height&&(c="bottom");var h=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===c?(n=function(t){return t<=h},i=function(t){return t>h}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),r=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},a=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",r(s.x)&&(d="center",c=o(s.y))):i(s.x)&&(d="right",a(s.x)&&(d="center",c=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:c}}(this,c),d=function(t,e,n,i){var r=t.x,a=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,d=n.yAlign,c=o+s,h=l+s;return"right"===u?r-=e.width:"center"===u&&((r-=e.width/2)+e.width>i.width&&(r=i.width-e.width),r<0&&(r=0)),"top"===d?a+=c:a-="bottom"===d?e.height+c:e.height/2,"center"===d?"left"===u?r+=c:"right"===u&&(r-=c):"left"===u?r-=h:"right"===u&&(r+=h),{x:r,y:a}}(o,c,u,i._chart)}else o.opacity=0;return o.xAlign=u.xAlign,o.yAlign=u.yAlign,o.x=d.x,o.y=d.y,o.width=c.width,o.height=c.height,o.caretX=h.x,o.caretY=h.y,i._model=o,t&&r.custom&&r.custom.call(i,o),i},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,r=this.getCaretPosition(t,e,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,n){var i,r,a,o,s,l,u=n.caretSize,d=n.cornerRadius,c=n.xAlign,h=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===h)s=g+m/2,"left"===c?(r=(i=f)-u,a=i,o=s+u,l=s-u):(r=(i=f+p)+u,a=i,o=s-u,l=s+u);else if("left"===c?(i=(r=f+d+u)-u,a=r+u):"right"===c?(i=(r=f+p-d-u)-u,a=r+u):(r=n.caretX,i=r-u,a=r+u),"top"===h)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=a;a=i,i=v}return{x1:i,x2:r,x3:a,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,r,a,o=e.title,s=o.length;if(s){var l=Re(e.rtl,e.x,e.width);for(t.x=Ve(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,r=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=j.fontString(i,e._titleFontStyle,e._titleFontFamily),a=0;a<s;++a)n.fillText(o[a],l.x(t.x),t.y+i/2),t.y+=i+r,a+1===s&&(t.y+=e.titleMarginBottom-r)}},drawBody:function(t,e,n){var i,r,a,o,s,l,u,d,c=e.bodyFontSize,h=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,m=0,v=p?Ve(e,"left"):0,b=Re(e.rtl,e.x,e.width),y=function(e){n.fillText(e,b.x(t.x+m),t.y+c/2),t.y+=c+h},x=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=j.fontString(c,e._bodyFontStyle,e._bodyFontFamily),t.x=Ve(e,x),n.fillStyle=e.bodyFontColor,j.each(e.beforeBody,y),m=p&&"right"!==x?"center"===f?c/2+1:c+2:0,s=0,u=g.length;s<u;++s){for(i=g[s],r=e.labelTextColors[s],a=e.labelColors[s],n.fillStyle=r,j.each(i.before,y),o=i.lines,l=0,d=o.length;l<d;++l){if(p){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,c),t.y,c,c),n.lineWidth=1,n.strokeStyle=a.borderColor,n.strokeRect(b.leftForLtr(_,c),t.y,c,c),n.fillStyle=a.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),c-2),t.y+1,c-2,c-2),n.fillStyle=r}y(o[l])}j.each(i.after,y)}m=0,j.each(e.afterBody,y),t.y-=h},drawFooter:function(t,e,n){var i,r,a=e.footer,o=a.length;if(o){var s=Re(e.rtl,e.x,e.width);for(t.x=Ve(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=j.fontString(i,e._footerFontStyle,e._footerFontFamily),r=0;r<o;++r)n.fillText(a[r],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var r=e.xAlign,a=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),"top"===a&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===a&&"right"===r&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===a&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===a&&"left"===r&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},r=Math.abs(e.opacity<.001)?0:e.opacity,a=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(i,e,t,n),i.y+=e.yPadding,j.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),j.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e=this,n=e._options,i=!1;return e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:(e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),n.reverse&&e._active.reverse()),(i=!j.arrayEquals(e._active,e._lastActive))&&(e._lastActive=e._active,(n.enabled||n.custom)&&(e._eventPosition={x:t.x,y:t.y},e.update(!0),e.pivot())),i}}),qe=ze,Ue=He;Ue.positioners=qe;var Ye=j.valueOrDefault;function Ke(){return j.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var r,a,o,s=n[t].length;for(e[t]||(e[t]=[]),r=0;r<s;++r)o=n[t][r],a=Ye(o.type,"xAxes"===t?"category":"linear"),r>=e[t].length&&e[t].push({}),!e[t][r].type||o.type&&o.type!==e[t][r].type?j.merge(e[t][r],[Fe.getScaleDefaults(a),o]):j.merge(e[t][r],o)}else j._merger(t,e,n,i)}})}function Ge(){return j.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var r=e[t]||Object.create(null),a=n[t];"scales"===t?e[t]=Ke(r,a):"scale"===t?e[t]=j.merge(r,[Fe.getScaleDefaults(a.type),a]):j._merger(t,e,n,i)}})}function Xe(t,e,n){var i,r=function(t){return t.id===i};do{i=e+n++}while(j.findIndex(t,r)>=0);return i}function Ze(t){return"top"===t||"bottom"===t}function $e(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}E._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Je=function(t,e){return this.construct(t,e),this};j.extend(Je.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Ge(E.global,E[t.type],t.options||{}),t}(e);var i=Te.acquireContext(t,e),r=i&&i.canvas,a=r&&r.height,o=r&&r.width;n.id=j.uid(),n.ctx=i,n.canvas=r,n.config=e,n.width=o,n.height=a,n.aspectRatio=a?o/a:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Je.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&r?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Oe.notify(t,"beforeInit"),j.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Oe.notify(t,"afterInit"),t},clear:function(){return j.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,r=n.maintainAspectRatio&&e.aspectRatio||null,a=Math.max(0,Math.floor(j.getMaximumWidth(i))),o=Math.max(0,Math.floor(r?a/r:j.getMaximumHeight(i)));if((e.width!==a||e.height!==o)&&(i.width=e.width=a,i.height=e.height=o,i.style.width=a+"px",i.style.height=o+"px",j.retinaScale(e,n.devicePixelRatio),!t)){var s={width:a,height:o};Oe.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;j.each(e.xAxes,function(t,n){t.id||(t.id=Xe(e.xAxes,"x-axis-",n))}),j.each(e.yAxes,function(t,n){t.id||(t.id=Xe(e.yAxes,"y-axis-",n))}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],r=Object.keys(n).reduce(function(t,e){return t[e]=!1,t},{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),j.each(i,function(e){var i=e.options,a=i.id,o=Ye(i.type,e.dtype);Ze(i.position)!==Ze(e.dposition)&&(i.position=e.dposition),r[a]=!0;var s=null;if(a in n&&n[a].type===o)(s=n[a]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Fe.getScaleConstructor(o);if(!l)return;s=new l({id:a,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)}),j.each(r,function(t,e){t||delete n[e]}),t.scales=n,Fe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],r=n.data.datasets;for(t=0,e=r.length;t<e;t++){var a=r[t],o=n.getDatasetMeta(t),s=a.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=a.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=Zt[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),i.push(o.controller)}}return i},resetElements:function(){var t=this;j.each(t.data.datasets,function(e,n){t.getDatasetMeta(n).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&"object"===typeof t||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;j.each(t.scales,function(e){fe.removeBox(t,e)}),e=Ge(E.global,E[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}(i),Oe._invalidate(i),!1!==Oe.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var r=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&j.each(r,function(t){t.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Oe.notify(i,"afterUpdate"),i._layers.sort($e("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var t=this;!1!==Oe.notify(t,"beforeLayout")&&(fe.update(this,this.width,this.height),t._layers=[],j.each(t.boxes,function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())},t),t._layers.forEach(function(t,e){t._idx=e}),Oe.notify(t,"afterScaleUpdate"),Oe.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Oe.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Oe.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Oe.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),Oe.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"===typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ye(t.duration,n&&n.duration),r=t.lazy;if(!1!==Oe.notify(e,"beforeRender")){var a=function(t){Oe.notify(e,"afterRender"),j.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new $({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=j.easing.effects[e.easing],i=e.currentStep,r=i/e.numSteps;t.draw(n(r),r,i)},onAnimationProgress:n.onProgress,onAnimationComplete:a});J.addAnimation(e,o,i,r)}else e.draw(),a(new $({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),j.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==Oe.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),Oe.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=this.data.datasets||[],r=[];for(e=0,n=i.length;e<n;++e)t&&!this.isDatasetVisible(e)||r.push(this.getDatasetMeta(e));return r.sort($e("order","index")),r},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Oe.notify(this,"beforeDatasetsDraw",[t])){for(e=this._getSortedVisibleDatasetMetas(),n=e.length-1;n>=0;--n)this.drawDataset(e[n],t);Oe.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Oe.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Oe.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Oe.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Oe.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ie.modes.single(this,t)},getElementsAtEvent:function(t){return ie.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ie.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=ie.modes[e];return"function"===typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return ie.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"===typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),j.canvas.clear(n),Te.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Oe.notify(n,"destroy"),delete Je.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ue({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};j.each(t.options.events,function(i){Te.addEventListener(t,i,n),e[i]=n}),t.options.responsive&&(n=function(){t.resize()},Te.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,j.each(e,function(e,n){Te.removeEventListener(t,n,e)}))},updateHoverStyle:function(t,e,n){var i,r,a,o=n?"set":"remove";for(r=0,a=t.length;r<a;++r)(i=t[r])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Oe.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),Oe.notify(e,"afterEvent",[t]);var r=e._bufferedRequest;return r?e.render(r):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e=this,n=e.options||{},i=n.hover,r=!1;return e.lastActive=e.lastActive||[],"mouseout"===t.type?e.active=[]:e.active=e.getElementsAtEventForMode(t,i.mode,i),j.callback(n.onHover||n.hover.onHover,[t.native,e.active],e),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(e,t.native,e.active),e.lastActive.length&&e.updateHoverStyle(e.lastActive,i.mode,!1),e.active.length&&i.mode&&e.updateHoverStyle(e.active,i.mode,!0),r=!j.arrayEquals(e.active,e.lastActive),e.lastActive=e.active,r}}),Je.instances={};var Qe=Je;function tn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function en(t){this.options=t||{}}Je.Controller=Je,Je.types={},j.configMerge=Ge,j.scaleMerge=Ke,j.extend(en.prototype,{formats:tn,parse:tn,format:tn,add:tn,diff:tn,startOf:tn,endOf:tn,_create:function(t){return t}}),en.override=function(t){j.extend(en.prototype,t)};var nn={_date:en},rn={formatters:{values:function(t){return j.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var r=j.log10(Math.abs(i)),a="";if(0!==t){var o=Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]));if(o<1e-4){var s=j.log10(Math.abs(t)),l=Math.floor(s)-Math.floor(r);l=Math.max(Math.min(l,20),0),a=t.toExponential(l)}else{var u=-1*Math.floor(r);u=Math.max(Math.min(u,20),0),a=t.toFixed(u)}}else a="0";return a},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(j.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},an=j.isArray,on=j.isNullOrUndef,sn=j.valueOrDefault,ln=j.valueAtIndexOrDefault;function un(t,e,n){var i,r=t.getTicks().length,a=Math.min(e,r-1),o=t.getPixelForTick(a),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===r?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(a-1))/2,(o+=a<e?i:-i)<s-1e-6||o>l+1e-6)))return o}function dn(t,e,n,i){var r,a,o,s,l,u,d,c,h,f,g,p,m,v=n.length,b=[],y=[],x=[],_=0,k=0;for(r=0;r<v;++r){if(s=n[r].label,l=n[r].major?e.major:e.minor,t.font=u=l.string,d=i[u]=i[u]||{data:{},gc:[]},c=l.lineHeight,h=f=0,on(s)||an(s)){if(an(s))for(a=0,o=s.length;a<o;++a)g=s[a],on(g)||an(g)||(h=j.measureText(t,d.data,d.gc,h,g),f+=c)}else h=j.measureText(t,d.data,d.gc,h,s),f=c;b.push(h),y.push(f),x.push(c/2),_=Math.max(h,_),k=Math.max(f,k)}function w(t){return{width:b[t]||0,height:y[t]||0,offset:x[t]||0}}return function(t,e){j.each(t,function(t){var n,i=t.gc,r=i.length/2;if(r>e){for(n=0;n<r;++n)delete t.data[i[n]];i.splice(0,r)}})}(i,v),p=b.indexOf(_),m=y.indexOf(k),{first:w(0),last:w(v-1),widest:w(p),highest:w(m)}}function cn(t){return t.drawTicks?t.tickMarkLength:0}function hn(t){var e,n;return t.display?(e=j.options._parseFont(t),n=j.options.toPadding(t.padding),e.lineHeight+n.height):0}function fn(t,e){return j.extend(j.options._parseFont({fontFamily:sn(e.fontFamily,t.fontFamily),fontSize:sn(e.fontSize,t.fontSize),fontStyle:sn(e.fontStyle,t.fontStyle),lineHeight:sn(e.lineHeight,t.lineHeight)}),{color:j.options.resolve([e.fontColor,t.fontColor,E.global.defaultFontColor])})}function gn(t){var e=fn(t,t.minor),n=t.major.enabled?fn(t,t.major):e;return{minor:e,major:n}}function pn(t){var e,n,i,r=[];for(n=0,i=t.length;n<i;++n)"undefined"!==typeof(e=t[n])._index&&r.push(e);return r}function mn(t,e,n,i){var r,a,o,s,l=sn(n,0),u=Math.min(sn(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(r=i-n)/Math.floor(r/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(a=Math.max(l,0);a<u;a++)o=t[a],a===s?(o._index=a,d++,s=Math.round(l+d*e)):delete o.label}E._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:rn.formatters.values,minor:{},major:{}}});var vn=X.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){j.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,r,a,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=j.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],i=0,r=l.ticks.length;i<r;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,s=d<o.length,a=l._convertTicksToLabels(s?function(t,e){for(var n=[],i=t.length/e,r=0,a=t.length;r<a;r+=i)n.push(t[Math.floor(r)]);return n}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(o):o,s&&(a=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=a,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){j.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){j.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){j.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){j.callback(this.options.beforeDataLimits,[this])},determineDataLimits:j.noop,afterDataLimits:function(){j.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){j.callback(this.options.beforeBuildTicks,[this])},buildTicks:j.noop,afterBuildTicks:function(t){var e=this;return an(t)&&t.length?j.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=j.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){j.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){j.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){j.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,r,a,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,c=u.minRotation||0,h=u.maxRotation,f=c;!s._isVisible()||!u.display||c>=h||d<=1||!s.isHorizontal()?s.labelRotation=c:(t=s._getLabelSizes(),e=t.widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),r=l.offset?s.maxWidth/d:i/(d-1),e+6>r&&(r=i/(d-(l.offset?.5:1)),a=s.maxHeight-cn(l.gridLines)-u.padding-hn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=j.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/r,1)),Math.asin(Math.min(a/o,1))-Math.asin(n/o))),f=Math.max(c,Math.min(h,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){j.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){j.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,r=i.ticks,a=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=cn(o)+hn(a)),u?s&&(e.height=cn(o)+hn(a)):e.height=t.maxHeight,r.display&&s){var d=gn(r),c=t._getLabelSizes(),h=c.first,f=c.last,g=c.widest,p=c.highest,m=.4*d.minor.lineHeight,v=r.padding;if(u){var b=0!==t.labelRotation,y=j.toRadians(t.labelRotation),x=Math.cos(y),_=Math.sin(y),k=_*g.width+x*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,C=t.getPixelForTick(0)-t.left,S=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?x*h.width+_*h.offset:_*(h.height-h.offset),M=l?_*(f.height-f.offset):x*f.width+_*f.offset):(w=h.width/2,M=f.width/2),t.paddingLeft=Math.max((w-C)*t.width/(t.width-C),0)+3,t.paddingRight=Math.max((M-S)*t.width/(t.width-S),0)+3}else{var P=r.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=h.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){j.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(on(t))return NaN;if(("number"===typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,r=this;for(r.ticks=t.map(function(t){return t.value}),r.beforeTickToLabelConversion(),e=r.convertTicksToLabels(t)||r.ticks,r.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=dn(t.ctx,gn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,r;return an(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),r=Math.max(e,n)):(t=+this.getRightValue(t),e=void 0,n=t,i=t,r=t),{min:i,max:r,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:j.noop,getPixelForValue:j.noop,getValueForPixel:j.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||t>n-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,r,a=this.options.ticks,o=this._length,s=a.maxTicksLimit||o/this._tickSize()+1,l=a.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,d=l[0],c=l[u-1];if(u>s)return function(t,e,n){var i,r,a=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)r=t[i],i===o?(r._index=i,o=e[++a*n]):delete r.label}(t,l,u/s),pn(t);if(i=function(t,e,n,i){var r,a,o,s,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(r=j.math._factorize(l),o=0,s=r.length-1;o<s;o++)if((a=r[o])>u)return a;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)mn(t,i,l[e],l[e+1]);return r=u>1?(c-d)/(u-1):null,mn(t,i,j.isNullOrUndef(r)?0:d-r,d),mn(t,i,c,j.isNullOrUndef(r)?t.length:c+r),pn(t)}return mn(t,i),pn(t)},_tickSize:function(){var t=this.options.ticks,e=j.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),r=this._getLabelSizes(),a=t.autoSkipPadding||0,o=r?r.widest.width+a:0,s=r?r.highest.height+a:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var t,e,n,i=this.chart,r=this.options.display;if("auto"!==r)return!!r;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((n=i.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,i,r,a,o,s,l,u,d,c,h,f,g,p,m,v,b=this,y=b.chart,x=b.options,_=x.gridLines,k=x.position,w=_.offsetGridLines,M=b.isHorizontal(),C=b._ticksToDraw,S=C.length+(w?1:0),P=cn(_),A=[],D=_.drawBorder?ln(_.lineWidth,0,0):0,I=D/2,T=j._alignPixel,O=function(t){return T(y,t,D)};for("top"===k?(e=O(b.bottom),s=b.bottom-P,u=e-I,c=O(t.top)+I,f=t.bottom):"bottom"===k?(e=O(b.top),c=t.top,f=O(t.bottom)-I,s=e+I,u=b.top+P):"left"===k?(e=O(b.right),o=b.right-P,l=e-I,d=O(t.left)+I,h=t.right):(e=O(b.left),d=t.left,h=O(t.right)-I,o=e+I,l=b.left+P),n=0;n<S;++n)i=C[n]||{},on(i.label)&&n<C.length||(n===b.zeroLineIndex&&x.offset===w?(g=_.zeroLineWidth,p=_.zeroLineColor,m=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=ln(_.lineWidth,n,1),p=ln(_.color,n,"rgba(0,0,0,0.1)"),m=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(r=un(b,i._index||n,w))&&(a=T(y,r,g),M?o=l=d=h=a:s=u=c=f=a,A.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:c,x2:h,y2:f,width:g,color:p,borderDash:m,borderDashOffset:v})));return A.ticksLength=S,A.borderValue=e,A},_computeLabelItems:function(){var t,e,n,i,r,a,o,s,l,u,d,c,h=this,f=h.options,g=f.ticks,p=f.position,m=g.mirror,v=h.isHorizontal(),b=h._ticksToDraw,y=gn(g),x=g.padding,_=cn(f.gridLines),k=-j.toRadians(h.labelRotation),w=[];for("top"===p?(a=h.bottom-_-x,o=k?"left":"center"):"bottom"===p?(a=h.top+_+x,o=k?"right":"center"):"left"===p?(r=h.right-(m?0:_)-x,o=m?"left":"right"):(r=h.left+(m?0:_)+x,o=m?"right":"left"),t=0,e=b.length;t<e;++t)n=b[t],i=n.label,on(i)||(s=h.getPixelForTick(n._index||t)+g.labelOffset,l=n.major?y.major:y.minor,u=l.lineHeight,d=an(i)?i.length:1,v?(r=s,c="top"===p?((k?1:.5)-d)*u:(k?0:.5)*u):(a=s,c=(1-d)*u/2),w.push({x:r,y:a,rotation:k,label:i,font:l,textOffset:c,textAlign:o}));return w},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,r,a,o,s,l=e.ctx,u=e.chart,d=j._alignPixel,c=n.drawBorder?ln(n.lineWidth,0,0):0,h=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(a=0,o=h.length;a<o;++a)s=h[a],i=s.width,r=s.color,i&&r&&(l.save(),l.lineWidth=i,l.strokeStyle=r,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(c){var f,g,p,m,v=c,b=ln(n.lineWidth,h.ticksLength-1,1),y=h.borderValue;e.isHorizontal()?(f=d(u,e.left,v)-v/2,g=d(u,e.right,b)+b/2,p=m=y):(p=d(u,e.top,v)-v/2,m=d(u,e.bottom,b)+b/2,f=g=y),l.lineWidth=c,l.strokeStyle=ln(n.color,0),l.beginPath(),l.moveTo(f,p),l.lineTo(g,m),l.stroke()}}},_drawLabels:function(){var t=this,e=t.options.ticks;if(e.display){var n,i,r,a,o,s,l,u,d=t.ctx,c=t._labelItems||(t._labelItems=t._computeLabelItems());for(n=0,r=c.length;n<r;++n){if(o=c[n],s=o.font,d.save(),d.translate(o.x,o.y),d.rotate(o.rotation),d.font=s.string,d.fillStyle=s.color,d.textBaseline="middle",d.textAlign=o.textAlign,l=o.label,u=o.textOffset,an(l))for(i=0,a=l.length;i<a;++i)d.fillText(""+l[i],0,u),u+=s.lineHeight;else d.fillText(l,0,u);d.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var r,a,o=sn(i.fontColor,E.global.defaultFontColor),s=j.options._parseFont(i),l=j.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,c=0;if(t.isHorizontal())r=t.left+t.width/2,a="bottom"===d?t.bottom-u-l.bottom:t.top+u+l.top;else{var h="left"===d;r=h?t.left+u+l.top:t.right-u-l.top,a=t.top+t.height/2,c=h?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(r,a),e.rotate(c),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter(function(i){return(!t||i.type===t)&&(n?i.xAxisID===e.id:i.yAxisID===e.id)})}});vn.prototype._draw=vn.prototype.draw;var bn=vn,yn=j.isNullOrUndef,xn=bn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,r=i.min,a=i.max,o=0,s=n.length-1;void 0!==r&&(t=n.indexOf(r))>=0&&(o=t),void 0!==a&&(t=n.indexOf(a))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;bn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,r,a,o=this;return yn(e)||yn(n)||(t=o.chart.data.datasets[n].data[e]),yn(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(r=o._getLabels(),t=j.valueOrDefault(i,t),a=r.indexOf(t),e=-1!==a?a:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),_n={position:"bottom"};xn._defaults=_n;var kn=j.noop,wn=j.isNullOrUndef,Mn=bn.extend({getRightValue:function(t){return"string"===typeof t?+t:bn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options,n=e.ticks;if(n.beginAtZero){var i=j.sign(t.min),r=j.sign(t.max);i<0&&r<0?t.max=0:i>0&&r>0&&(t.min=0)}var a=void 0!==n.min||void 0!==n.suggestedMin,o=void 0!==n.max||void 0!==n.suggestedMax;void 0!==n.min?t.min=n.min:void 0!==n.suggestedMin&&(null===t.min?t.min=n.suggestedMin:t.min=Math.min(t.min,n.suggestedMin)),void 0!==n.max?t.max=n.max:void 0!==n.suggestedMax&&(null===t.max?t.max=n.suggestedMax:t.max=Math.max(t.max,n.suggestedMax)),a!==o&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,n.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:kn,buildTicks:function(){var t=this,e=t.options,n=e.ticks,i=t.getTickLimit(),r={maxTicks:i=Math.max(2,i),min:n.min,max:n.max,precision:n.precision,stepSize:j.valueOrDefault(n.fixedStepSize,n.stepSize)},a=t.ticks=function(t,e){var n,i,r,a,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,c=t.max,h=t.precision,f=e.min,g=e.max,p=j.niceNum((g-f)/u/l)*l;if(p<1e-14&&wn(d)&&wn(c))return[f,g];(a=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=j.niceNum(a*p/u/l)*l),s||wn(h)?n=Math.pow(10,j._decimalPlaces(p)):(n=Math.pow(10,h),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,r=Math.ceil(g/p)*p,s&&(!wn(d)&&j.almostWhole(d/p,p/1e3)&&(i=d),!wn(c)&&j.almostWhole(c/p,p/1e3)&&(r=c)),a=(r-i)/p,a=j.almostEquals(a,Math.round(a),p/1e3)?Math.round(a):Math.ceil(a),i=Math.round(i*n)/n,r=Math.round(r*n)/n,o.push(wn(d)?i:d);for(var m=1;m<a;++m)o.push(Math.round((i+m*p)*n)/n);return o.push(wn(c)?r:c),o}(r,t);t.handleDirectionalChanges(),t.max=j.max(a),t.min=j.min(a),n.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),bn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,r=e.max;bn.prototype._configure.call(e),e.options.offset&&n.length&&(t=(r-i)/Math.max(n.length-1,1)/2,i-=t,r+=t),e._startValue=i,e._endValue=r,e._valueRange=r-i}}),Cn={position:"left",ticks:{callback:rn.formatters.linear}};function Sn(t,e,n,i){var r,a,o=t.options,s=o.stacked,l=function(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}(e,s,n),u=l.pos,d=l.neg,c=i.length;for(r=0;r<c;++r)a=t._parseValue(i[r]),isNaN(a.min)||isNaN(a.max)||n.data[r].hidden||(u[r]=u[r]||0,d[r]=d[r]||0,o.relativePoints?u[r]=100:a.min<0||a.max<0?d[r]+=a.min:u[r]+=a.max)}function Pn(t,e,n){var i,r,a=n.length;for(i=0;i<a;++i)r=t._parseValue(n[i]),isNaN(r.min)||isNaN(r.max)||e.data[i].hidden||(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}var An=Mn.extend({determineDataLimits:function(){var t,e,n,i,r=this,a=r.options,o=r.chart,s=o.data.datasets,l=r._getMatchingVisibleMetas(),u=a.stacked,d={},c=l.length;if(r.min=Number.POSITIVE_INFINITY,r.max=Number.NEGATIVE_INFINITY,void 0===u)for(t=0;!u&&t<c;++t)e=l[t],u=void 0!==e.stack;for(t=0;t<c;++t)e=l[t],n=s[e.index].data,u?Sn(r,d,e,n):Pn(r,e,n);j.each(d,function(t){i=t.pos.concat(t.neg),r.min=Math.min(r.min,j.min(i)),r.max=Math.max(r.max,j.max(i))}),r.min=j.isFinite(r.min)&&!isNaN(r.min)?r.min:0,r.max=j.isFinite(r.max)&&!isNaN(r.max)?r.max:1,r.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=j.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),Dn=Cn;An._defaults=Dn;var In=j.valueOrDefault,Tn=j.math.log10,On={position:"left",ticks:{callback:rn.formatters.logarithmic}};function Fn(t,e){return j.isFinite(t)&&t>=0?t:e}var Ln=bn.extend({determineDataLimits:function(){var t,e,n,i,r,a,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function c(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var h=s.stacked;if(void 0===h)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&c(e)&&void 0!==e.stack){h=!0;break}if(s.stacked||h){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&c(e))for(void 0===f[g]&&(f[g]=[]),i=u[t].data,r=0,a=i.length;r<a;r++){var p=f[g];n=o._parseValue(i[r]),isNaN(n.min)||isNaN(n.max)||e.data[r].hidden||n.min<0||n.max<0||(p[r]=p[r]||0,p[r]+=n.max)}}j.each(f,function(t){if(t.length>0){var e=j.min(t),n=j.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}})}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&c(e))for(i=u[t].data,r=0,a=i.length;r<a;r++)n=o._parseValue(i[r]),isNaN(n.min)||isNaN(n.max)||e.data[r].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=j.isFinite(o.min)?o.min:null,o.max=j.isFinite(o.max)?o.max:null,o.minNotZero=j.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=Fn(e.min,t.min),t.max=Fn(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(Tn(t.min))-1),t.max=Math.pow(10,Math.floor(Tn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(Tn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(Tn(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Tn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Fn(e.min),max:Fn(e.max)},r=t.ticks=function(t,e){var n,i,r=[],a=In(t.min,Math.pow(10,Math.floor(Tn(e.min)))),o=Math.floor(Tn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===a?(n=Math.floor(Tn(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),r.push(a),a=i*Math.pow(10,n)):(n=Math.floor(Tn(a)),i=Math.floor(a/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{r.push(a),10===++i&&(i=1,l=++n>=0?1:l),a=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=In(t.max,a);return r.push(u),r}(i,t);t.max=j.max(r),t.min=j.min(r),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&r.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),bn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Tn(t)),n=Math.floor(t/Math.pow(10,e));return n*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;bn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=In(t.options.ticks.fontSize,E.global.defaultFontSize)/t._length),t._startValue=Tn(e),t._valueOffset=n,t._valueRange=(Tn(t.max)-Tn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Tn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Rn=On;Ln._defaults=Rn;var zn=j.valueOrDefault,En=j.valueAtIndexOrDefault,Nn=j.options.resolve,Bn={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:rn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Wn(t){var e=t.ticks;return e.display&&t.display?zn(e.fontSize,E.global.defaultFontSize)+2*e.backdropPaddingY:0}function Vn(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function jn(t){return 0===t||180===t?"center":t<180?"left":"right"}function Hn(t,e,n,i){var r,a,o=n.y+i/2;if(j.isArray(e))for(r=0,a=e.length;r<a;++r)t.fillText(e[r],n.x,o),o+=i;else t.fillText(e,n.x,o)}function qn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Un(t){return j.isNumber(t)?t:0}var Yn=Mn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Wn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;j.each(e.data.datasets,function(r,a){if(e.isDatasetVisible(a)){var o=e.getDatasetMeta(a);j.each(r.data,function(e,r){var a=+t.getRightValue(e);isNaN(a)||o.data[r].hidden||(n=Math.min(a,n),i=Math.max(a,i))})}}),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Wn(this.options))},convertTicksToLabels:function(){var t=this;Mn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(function(){var e=j.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""})},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,r=j.options._parseFont(t.options.pointLabels),a={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=r.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=r.lineHeight,u=t.pointLabels[e],n=j.isArray(u)?{w:j.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var c=t.getIndexAngle(e),h=j.toDegrees(c)%360,f=Vn(h,i.x,n.w,0,180),g=Vn(h,i.y,n.h,90,270);f.start<a.l&&(a.l=f.start,o.l=c),f.end>a.r&&(a.r=f.end,o.r=c),g.start<a.t&&(a.t=g.start,o.t=c),g.end>a.b&&(a.b=g.end,o.b=c)}t.setReductions(t.drawingArea,a,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,r=e.l/Math.sin(n.l),a=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);r=Un(r),a=Un(a),o=Un(o),s=Un(s),i.drawingArea=Math.min(Math.floor(t-(r+a)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(r,a,o,s)},setCenterPoint:function(t,e,n,i){var r=this,a=r.width-e-r.drawingArea,o=t+r.drawingArea,s=n+r.drawingArea,l=r.height-r.paddingTop-i-r.drawingArea;r.xCenter=Math.floor((o+a)/2+r.left),r.yCenter=Math.floor((s+l)/2+r.top+r.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=360/e.data.labels.length,i=e.options||{},r=i.startAngle||0,a=(t*n+r)%360;return(a<0?a+360:a)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(j.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,r=i.ctx,a=i.options,o=a.gridLines,s=a.angleLines,l=zn(s.lineWidth,o.lineWidth),u=zn(s.color,o.color);if(a.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,r=Wn(n),a=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=j.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?r/2:0,u=t.getPointPosition(s,a+l+5),d=En(i.fontColor,s,E.global.defaultFontColor);e.fillStyle=d;var c=t.getIndexAngle(s),h=j.toDegrees(c);e.textAlign=jn(h),qn(h,t._pointLabelSizes[s],u),Hn(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&j.each(i.ticks,function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var r,a=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=En(e.color,i-1),u=En(e.lineWidth,i-1);if((o||s)&&l&&u){if(a.save(),a.strokeStyle=l,a.lineWidth=u,a.setLineDash&&(a.setLineDash(e.borderDash||[]),a.lineDashOffset=e.borderDashOffset||0),a.beginPath(),o)a.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{r=t.getPointPosition(0,n),a.moveTo(r.x,r.y);for(var d=1;d<s;d++)r=t.getPointPosition(d,n),a.lineTo(r.x,r.y)}a.closePath(),a.stroke(),a.restore()}}(i,o,e,n))}),s.display&&l&&u){for(r.save(),r.lineWidth=l,r.strokeStyle=u,r.setLineDash&&(r.setLineDash(Nn([s.borderDash,o.borderDash,[]])),r.lineDashOffset=Nn([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(a.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),r.beginPath(),r.moveTo(i.xCenter,i.yCenter),r.lineTo(n.x,n.y),r.stroke();r.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options,i=n.ticks;if(i.display){var r,a,o=t.getIndexAngle(0),s=j.options._parseFont(i),l=zn(i.fontColor,E.global.defaultFontColor);e.save(),e.font=s.string,e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",j.each(t.ticks,function(n,o){(0!==o||i.reverse)&&(r=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]),i.showLabelBackdrop&&(a=e.measureText(n).width,e.fillStyle=i.backdropColor,e.fillRect(-a/2-i.backdropPaddingX,-r-s.size/2-i.backdropPaddingY,a+2*i.backdropPaddingX,s.size+2*i.backdropPaddingY)),e.fillStyle=l,e.fillText(n,0,-r))}),e.restore()}},_drawTitle:j.noop}),Kn=Bn;Yn._defaults=Kn;var Gn=j._deprecated,Xn=j.options.resolve,Zn=j.valueOrDefault,$n=Number.MIN_SAFE_INTEGER||-9007199254740991,Jn=Number.MAX_SAFE_INTEGER||9007199254740991,Qn={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}},ti=Object.keys(Qn);function ei(t,e){return t-e}function ni(t){return j.valueOrDefault(t.time.min,t.ticks.min)}function ii(t){return j.valueOrDefault(t.time.max,t.ticks.max)}function ri(t,e,n,i){var r=function(t,e,n){for(var i,r,a,o=0,s=t.length-1;o>=0&&o<=s;){if(r=t[(i=o+s>>1)-1]||null,a=t[i],!r)return{lo:null,hi:a};if(a[e]<n)o=i+1;else{if(!(r[e]>n))return{lo:r,hi:a};s=i-1}}return{lo:a,hi:null}}(t,e,n),a=r.lo?r.hi?r.lo:t[t.length-2]:t[0],o=r.lo?r.hi?r.hi:t[t.length-1]:t[1],s=o[e]-a[e],l=s?(n-a[e])/s:0,u=(o[i]-a[i])*l;return a[i]+u}function ai(t,e){var n=t._adapter,i=t.options.time,r=i.parser,a=r||i.format,o=e;return"function"===typeof r&&(o=r(o)),j.isFinite(o)||(o="string"===typeof a?n.parse(o,a):n.parse(o)),null!==o?+o:(r||"function"!==typeof a||(o=a(e),j.isFinite(o)||(o=n.parse(o))),o)}function oi(t,e){if(j.isNullOrUndef(e))return null;var n=t.options.time,i=ai(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function si(t,e,n,i){var r,a,o,s=ti.length;for(r=ti.indexOf(t);r<s-1;++r)if(a=Qn[ti[r]],o=a.steps?a.steps:Jn,a.common&&Math.ceil((n-e)/(o*a.size))<=i)return ti[r];return ti[s-1]}function li(t,e,n){var i,r,a=[],o={},s=e.length;for(i=0;i<s;++i)r=e[i],o[r]=i,a.push({value:r,major:!1});return 0!==s&&n?function(t,e,n,i){var r,a,o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(r=s;r<=l;r=+o.add(r,1,i))(a=n[r])>=0&&(e[a].major=!0);return e}(t,a,o,n):a}var ui=bn.extend({initialize:function(){this.mergeTicksOptions(),bn.prototype.initialize.call(this)},update:function(){var t=this.options,e=t.time||(t.time={}),n=this._adapter=new nn._date(t.adapters.date);return Gn("time scale",e.format,"time.format","time.parser"),Gn("time scale",e.min,"time.min","ticks.min"),Gn("time scale",e.max,"time.max","ticks.max"),j.mergeIf(e.displayFormats,n.formats()),bn.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),bn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,r,a,o,s=this,l=s.chart,u=s._adapter,d=s.options,c=d.time.unit||"day",h=Jn,f=$n,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)m.push(oi(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(r=l.data.datasets[t].data,j.isObject(r[0]))for(p[t]=[],e=0,i=r.length;e<i;++e)a=oi(s,r[e]),g.push(a),p[t][e]=a;else p[t]=m.slice(0),o||(g=g.concat(m),o=!0);else p[t]=[];m.length&&(h=Math.min(h,m[0]),f=Math.max(f,m[m.length-1])),g.length&&(g=n>1?function(t){var e,n,i,r={},a=[];for(e=0,n=t.length;e<n;++e)i=t[e],r[i]||(r[i]=!0,a.push(i));return a}(g).sort(ei):g.sort(ei),h=Math.min(h,g[0]),f=Math.max(f,g[g.length-1])),h=oi(s,ni(d))||h,f=oi(s,ii(d))||f,h=h===Jn?+u.startOf(Date.now(),c):h,f=f===$n?+u.endOf(Date.now(),c)+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var t,e,n,i=this,r=i.min,a=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,d=[],c=i.getLabelCapacity(r),h=s.source,f=o.distribution;for(u="data"===h||"auto"===h&&"series"===f?u.data:"labels"===h?u.labels:function(t,e,n,i){var r,a=t._adapter,o=t.options,s=o.time,l=s.unit||si(s.minUnit,e,n,i),u=Xn([s.stepSize,s.unitStepSize,1]),d="week"===l&&s.isoWeekday,c=e,h=[];if(d&&(c=+a.startOf(c,"isoWeek",d)),c=+a.startOf(c,d?"day":l),a.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(r=c;r<n;r=+a.add(r,u,l))h.push(r);return r!==n&&"ticks"!==o.bounds||h.push(r),h}(i,r,a,c),"ticks"===o.bounds&&u.length&&(r=u[0],a=u[u.length-1]),r=oi(i,ni(o))||r,a=oi(i,ii(o))||a,t=0,e=u.length;t<e;++t)(n=u[t])>=r&&n<=a&&d.push(n);return i.min=r,i.max=a,i._unit=l.unit||(s.autoSkip?si(l.minUnit,i.min,i.max,c):function(t,e,n,i,r){var a,o;for(a=ti.length-1;a>=ti.indexOf(n);a--)if(o=ti[a],Qn[o].common&&t._adapter.diff(r,i,o)>=e-1)return o;return ti[n?ti.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=ti.indexOf(t)+1,n=ti.length;e<n;++e)if(Qn[ti[e]].common)return ti[e]}(i._unit):void 0,i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var r,a,o,s,l,u=[],d=[e];for(r=0,a=t.length;r<a;++r)(s=t[r])>e&&s<n&&d.push(s);for(d.push(n),r=0,a=d.length;r<a;++r)l=d[r+1],o=d[r-1],s=d[r],void 0!==o&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:r/(a-1)});return u}(i._timestamps.data,r,a,f),i._offsets=function(t,e,n,i,r){var a,o,s=0,l=0;return r.offset&&e.length&&(a=ri(t,"time",e[0],"pos"),s=1===e.length?1-a:(ri(t,"time",e[1],"pos")-a)/2,o=ri(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-ri(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(i._table,d,0,0,o),s.reverse&&d.reverse(),li(i,d,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,r=n.chart.data,a=n.options.time,o=r.labels&&t<r.labels.length?r.labels[t]:"",s=r.datasets[e].data[t];return j.isObject(s)&&(o=n.getRightValue(s)),a.tooltipFormat?i.format(ai(n,o),a.tooltipFormat):"string"===typeof o?o:i.format(ai(n,o),a.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var r=this._adapter,a=this.options,o=a.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[e],c=a.ticks,h=l&&u&&d&&d.major,f=r.format(t,i||(h?u:s)),g=h?c.major:c.minor,p=Xn([g.callback,g.userCallback,c.callback,c.userCallback]);return p?p(f,e,n):f},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this._offsets,n=ri(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=oi(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,i=ri(this._table,"pos",n,"time");return this._adapter._create(i)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=j.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(i),a=Math.sin(i),o=Zn(e.fontSize,E.global.defaultFontSize);return{w:n*r+o*a,h:n*a+o*r}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,a=e.tickFormatFunction(t,0,li(e,[t],e._majorUnit),r),o=e._getLabelSize(a),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}}),di={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}}};ui._defaults=di;var ci={category:xn,linear:An,logarithmic:Ln,radialLinear:Yn,time:ui},hi={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"};nn._date.override("function"===typeof t?{_id:"moment",formats:function(){return hi},parse:function(e,n){return"string"===typeof e&&"string"===typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),E._set("global",{plugins:{filler:{propagate:!0}}});var fi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),r=i&&n.isDatasetVisible(e),a=r&&i.dataset._children||[],o=a.length||0;return o?function(t,e){return e<o&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return j.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function gi(t,e,n){var i,r=t._model||{},a=r.fill;if(void 0===a&&(a=!!r.backgroundColor),!1===a||null===a)return!1;if(!0===a)return"origin";if(i=parseFloat(a,10),isFinite(i)&&Math.floor(i)===i)return"-"!==a[0]&&"+"!==a[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(a){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return a;default:return!1}}function pi(t){var e=t.el._scale||{};return e.getPointPositionForValue?function(t){var e,n,i,r,a,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),r=0;r<l;++r)a="start"===u||"end"===u?o.getPointPositionForValue(r,"start"===u?e:n):o.getBasePosition(r),s.gridLines.circular&&(a.cx=i.x,a.cy=i.y,a.angle=o.getIndexAngle(r)-Math.PI/2),d.push(a);return d}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},r=t.fill,a=null;if(isFinite(r))return null;if("start"===r?a=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===r?a=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?a=n.scaleZero:i.getBasePixel&&(a=i.getBasePixel()),void 0!==a&&null!==a){if(void 0!==a.x&&void 0!==a.y)return a;if(j.isFinite(a))return{x:(e=i.isHorizontal())?a:null,y:e?null:a}}return null}(t)}function mi(t,e,n){var i,r=t[e],a=r.fill,o=[e];if(!n)return a;for(;!1!==a&&-1===o.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;o.push(a),a=i.fill}return!1}function vi(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),fi[n](t))}function bi(t){return t&&!t.skip}function yi(t,e,n,i,r){var a,o,s,l;if(i&&r){for(t.moveTo(e[0].x,e[0].y),a=1;a<i;++a)j.canvas.lineTo(t,e[a-1],e[a]);if(void 0===n[0].angle)for(t.lineTo(n[r-1].x,n[r-1].y),a=r-1;a>0;--a)j.canvas.lineTo(t,n[a],n[a-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),a=r-1;a>0;--a)t.arc(o,s,l,n[a].angle,n[a-1].angle,!0)}}function xi(t,e,n,i,r,a){var o,s,l,u,d,c,h,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,y=0;for(t.beginPath(),o=0,s=g;o<s;++o)u=e[l=o%g]._view,d=n(u,l,i),c=bi(u),h=bi(d),a&&void 0===f&&c&&(s=g+(f=o+1)),c&&h?(b=m.push(u),y=v.push(d)):b&&y&&(p?(c&&m.push(u),h&&v.push(d)):(yi(t,m,v,b,y),b=y=0,m=[],v=[]));yi(t,m,v,b,y),t.closePath(),t.fillStyle=r,t.fill()}var _i={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,r,a,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)n=t.getDatasetMeta(i),r=n.dataset,a=null,r&&r._model&&r instanceof kt.Line&&(a={visible:t.isDatasetVisible(i),fill:gi(r,i,o),chart:t,el:r}),n.$filler=a,l.push(a);for(i=0;i<o;++i)(a=l[i])&&(a.fill=mi(l,i,s),a.boundary=pi(a),a.mapper=vi(a))},beforeDatasetsDraw:function(t){var e,n,i,r,a,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(i=e.el,r=i._view,a=i._children||[],o=e.mapper,s=r.backgroundColor||E.global.defaultColor,o&&s&&a.length&&(j.canvas.clipArea(u,t.chartArea),xi(u,a,o,r,s,i._loop),j.canvas.unclipArea(u)))}},ki=j.rtl.getRtlAdapter,wi=j.noop,Mi=j.valueOrDefault;function Ci(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}E._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,r=i.getDatasetMeta(n);r.hidden=null===r.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map(function(n){var r=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:r.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:r.borderWidth,strokeStyle:r.borderColor,pointStyle:r.pointStyle,rotation:r.rotation,datasetIndex:n.index}},this)}}},legendCallback:function(t){var e,n,i,r=document.createElement("ul"),a=t.data.datasets;for(r.setAttribute("class",t.id+"-legend"),e=0,n=a.length;e<n;e++)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[e].backgroundColor,a[e].label&&i.appendChild(document.createTextNode(a[e].label));return r.outerHTML}});var Si=X.extend({initialize:function(t){j.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:wi,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:wi,beforeSetDimensions:wi,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:wi,beforeBuildLabels:wi,buildLabels:function(){var t=this,e=t.options.labels||{},n=j.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter(function(n){return e.filter(n,t.chart.data)})),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:wi,beforeFit:wi,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,r=t.ctx,a=j.options._parseFont(n),o=a.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i){if(r.font=a.string,u){var d=t.lineWidths=[0],c=0;r.textAlign="left",r.textBaseline="middle",j.each(t.legendItems,function(t,e){var i=Ci(n,o),a=i+o/2+r.measureText(t.text).width;(0===e||d[d.length-1]+a+2*n.padding>l.width)&&(c+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:a,height:o},d[d.length-1]+=a+n.padding}),l.height+=c}else{var h=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;j.each(t.legendItems,function(t,e){var i=Ci(n,o),a=i+o/2+r.measureText(t.text).width;e>0&&v+o+2*h>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,a),v+=o+h,s[e]={left:0,top:0,width:a,height:o}}),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:wi,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=E.global,r=i.defaultColor,a=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,c=ki(e.rtl,t.left,t.minSize.width),h=t.ctx,f=Mi(n.fontColor,i.defaultFontColor),g=j.options._parseFont(n),p=g.size;h.textAlign=c.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=g.string;var m=Ci(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},y=t.isHorizontal();d=y?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},j.rtl.overrideTextDirection(t.ctx,e.textDirection);var x=p+n.padding;j.each(t.legendItems,function(e,i){var f=h.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;c.setWidth(t.minSize.width),y?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=x,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+x>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=c.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){h.save();var o=Mi(i.lineWidth,a.borderWidth);if(h.fillStyle=Mi(i.fillStyle,r),h.lineCap=Mi(i.lineCap,a.borderCapStyle),h.lineDashOffset=Mi(i.lineDashOffset,a.borderDashOffset),h.lineJoin=Mi(i.lineJoin,a.borderJoinStyle),h.lineWidth=o,h.strokeStyle=Mi(i.strokeStyle,r),h.setLineDash&&h.setLineDash(Mi(i.lineDash,a.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=c.xPlus(t,m/2),u=e+p/2;j.canvas.drawPoint(h,i.pointStyle,s,l,u,i.rotation)}else h.fillRect(c.leftForLtr(t,m),e,m,p),0!==o&&h.strokeRect(c.leftForLtr(t,m),e,m,p);h.restore()}}(w,k,e),v[i].left=c.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var r=p/2,a=c.xPlus(t,m+r),o=e+r;h.fillText(n.text,a,o),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(a,o),h.lineTo(c.xPlus(a,i),o),h.stroke())}(w,k,e,f),y?d.x+=g+n.padding:d.y+=x}),j.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,r,a=this;if(t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom)for(r=a.legendHitBoxes,n=0;n<r.length;++n)if(i=r[n],t>=i.left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return a.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,r="mouseup"===t.type?"click":t.type;if("mousemove"===r){if(!i.onHover&&!i.onLeave)return}else{if("click"!==r)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===r?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Pi(t,e){var n=new Si({ctx:t.ctx,options:e,chart:t});fe.configure(t,n,e),fe.addBox(t,n),t.legend=n}var Ai={id:"legend",_element:Si,beforeInit:function(t){var e=t.options.legend;e&&Pi(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(j.mergeIf(e,E.global.legend),n?(fe.configure(t,n,e),n.options=e):Pi(t,e)):n&&(fe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Di=j.noop;E._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ii=X.extend({initialize:function(t){j.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Di,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Di,beforeSetDimensions:Di,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Di,beforeBuildLabels:Di,buildLabels:Di,afterBuildLabels:Di,beforeFit:Di,fit:function(){var t,e,n=this,i=n.options,r=n.minSize={},a=n.isHorizontal();i.display?(t=j.isArray(i.text)?i.text.length:1,e=t*j.options._parseFont(i).lineHeight+2*i.padding,n.width=r.width=a?n.maxWidth:e,n.height=r.height=a?e:n.maxHeight):n.width=r.width=n.height=r.height=0},afterFit:Di,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,r,a,o=j.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,c=t.left,h=t.bottom,f=t.right;e.fillStyle=j.valueOrDefault(n.fontColor,E.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(r=c+(f-c)/2,a=d+l,i=f-c):(r="left"===n.position?c+l:f-l,a=d+(h-d)/2,i=h-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(r,a),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(j.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,i),p+=s;else e.fillText(g,0,0,i);e.restore()}}});function Ti(t,e){var n=new Ii({ctx:t.ctx,options:e,chart:t});fe.configure(t,n,e),fe.addBox(t,n),t.titleBlock=n}var Oi={},Fi=_i,Li=Ai,Ri={id:"title",_element:Ii,beforeInit:function(t){var e=t.options.title;e&&Ti(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(j.mergeIf(e,E.global.title),n?(fe.configure(t,n,e),n.options=e):Ti(t,e)):n&&(fe.removeBox(t,n),delete t.titleBlock)}};for(var zi in Oi.filler=Fi,Oi.legend=Li,Oi.title=Ri,Qe.helpers=j,function(){function t(t,e,n){var i;return"string"===typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function e(t){return void 0!==t&&null!==t&&"none"!==t}function n(n,i,r){var a=document.defaultView,o=j._getParentNode(n),s=a.getComputedStyle(n)[i],l=a.getComputedStyle(o)[i],u=e(s),d=e(l),c=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,r):c,d?t(l,o,r):c):"none"}j.where=function(t,e){if(j.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return j.each(t,function(t){e(t)&&n.push(t)}),n},j.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,r=t.length;i<r;++i)if(e.call(n,t[i],i,t))return i;return-1},j.findNextWhere=function(t,e,n){j.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var r=t[i];if(e(r))return r}},j.findPreviousWhere=function(t,e,n){j.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var r=t[i];if(e(r))return r}},j.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},j.almostEquals=function(t,e,n){return Math.abs(t-e)<n},j.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},j.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},j.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},j.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},j.toRadians=function(t){return t*(Math.PI/180)},j.toDegrees=function(t){return t*(180/Math.PI)},j._decimalPlaces=function(t){if(j.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},j.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i),a=Math.atan2(i,n);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:r}},j.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},j.aliasPixel=function(t){return t%2===0?0:.5},j._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,r=n/2;return Math.round((e-r)*i)/i+r},j.splineCurve=function(t,e,n,i){var r=t.skip?e:t,a=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(a.x-r.x,2)+Math.pow(a.y-r.y,2)),l=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),u=s/(s+l),d=l/(s+l);u=isNaN(u)?0:u,d=isNaN(d)?0:d;var c=i*u,h=i*d;return{previous:{x:a.x-c*(o.x-r.x),y:a.y-c*(o.y-r.y)},next:{x:a.x+h*(o.x-r.x),y:a.y+h*(o.y-r.y)}}},j.EPSILON=Number.EPSILON||1e-14,j.splineCurveMonotone=function(t){var e,n,i,r,a,o,s,l,u,d=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),c=d.length;for(e=0;e<c;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(r=e<c-1?d[e+1]:null)&&!r.model.skip){var h=r.model.x-i.model.x;i.deltaK=0!==h?(r.model.y-i.model.y)/h:0}!n||n.model.skip?i.mK=i.deltaK:!r||r.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<c-1;++e)i=d[e],r=d[e+1],i.model.skip||r.model.skip||(j.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=r.mK=0:(a=i.mK/i.deltaK,o=r.mK/i.deltaK,(l=Math.pow(a,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=a*s*i.deltaK,r.mK=o*s*i.deltaK)));for(e=0;e<c;++e)(i=d[e]).model.skip||(n=e>0?d[e-1]:null,r=e<c-1?d[e+1]:null,n&&!n.model.skip&&(u=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-u,i.model.controlPointPreviousY=i.model.y-u*i.mK),r&&!r.model.skip&&(u=(r.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+u,i.model.controlPointNextY=i.model.y+u*i.mK))},j.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},j.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},j.niceNum=function(t,e){var n=Math.floor(j.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},j.requestAnimFrame="undefined"===typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},j.getRelativePosition=function(t,e){var n,i,r=t.originalEvent||t,a=t.target||t.srcElement,o=a.getBoundingClientRect(),s=r.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=r.clientX,i=r.clientY);var l=parseFloat(j.getStyle(a,"padding-left")),u=parseFloat(j.getStyle(a,"padding-top")),d=parseFloat(j.getStyle(a,"padding-right")),c=parseFloat(j.getStyle(a,"padding-bottom")),h=o.right-o.left-l-d,f=o.bottom-o.top-u-c;return n=Math.round((n-o.left-l)/h*a.width/e.currentDevicePixelRatio),i=Math.round((i-o.top-u)/f*a.height/e.currentDevicePixelRatio),{x:n,y:i}},j.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},j.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},j._calculatePadding=function(t,e,n){return(e=j.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},j._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},j.getMaximumWidth=function(t){var e=j._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=j._calculatePadding(e,"padding-left",n),r=j._calculatePadding(e,"padding-right",n),a=n-i-r,o=j.getConstraintWidth(t);return isNaN(o)?a:Math.min(a,o)},j.getMaximumHeight=function(t){var e=j._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=j._calculatePadding(e,"padding-top",n),r=j._calculatePadding(e,"padding-bottom",n),a=n-i-r,o=j.getConstraintHeight(t);return isNaN(o)?a:Math.min(a,o)},j.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},j.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!==typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,r=t.height,a=t.width;i.height=r*n,i.width=a*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=r+"px",i.style.width=a+"px")}},j.fontString=function(t,e,n){return e+" "+t+"px "+n},j.longestText=function(t,e,n,i){var r=(i=i||{}).data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},a=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,c=0,h=n.length;for(o=0;o<h;o++)if(void 0!==(u=n[o])&&null!==u&&!0!==j.isArray(u))c=j.measureText(t,r,a,c,u);else if(j.isArray(u))for(s=0,l=u.length;s<l;s++)void 0===(d=u[s])||null===d||j.isArray(d)||(c=j.measureText(t,r,a,c,d));var f=a.length/2;if(f>n.length){for(o=0;o<f;o++)delete r[a[o]];a.splice(0,f)}return c},j.measureText=function(t,e,n,i,r){var a=e[r];return a||(a=e[r]=t.measureText(r).width,n.push(r)),a>i&&(i=a),i},j.numberOfLabelLines=function(t){var e=1;return j.each(t,function(t){j.isArray(t)&&t.length>e&&(e=t.length)}),e},j.color=k?function(t){return t instanceof CanvasGradient&&(t=E.global.defaultColor),k(t)}:function(t){return console.error("Color.js not found!"),t},j.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:j.color(t).saturate(.5).darken(.1).rgbString()}}(),Qe._adapters=nn,Qe.Animation=$,Qe.animationService=J,Qe.controllers=Zt,Qe.DatasetController=it,Qe.defaults=E,Qe.Element=X,Qe.elements=kt,Qe.Interaction=ie,Qe.layouts=fe,Qe.platform=Te,Qe.plugins=Oe,Qe.Scale=bn,Qe.scaleService=Fe,Qe.Ticks=rn,Qe.Tooltip=Ue,Qe.helpers.each(ci,function(t,e){Qe.scaleService.registerScaleType(e,t,t._defaults)}),Oi)Oi.hasOwnProperty(zi)&&Qe.plugins.register(Oi[zi]);Qe.platform.initialize();var Ei=Qe;return"undefined"!==typeof window&&(window.Chart=Qe),Qe.Chart=Qe,Qe.Legend=Oi.legend._element,Qe.Title=Oi.title._element,Qe.pluginService=Qe.plugins,Qe.PluginBase=Qe.Element.extend({}),Qe.canvasHelpers=Qe.helpers.canvas,Qe.layoutService=Qe.layouts,Qe.LinearScaleBase=Mn,Qe.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){Qe[t]=function(e,n){return new Qe(e,Qe.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),Ei}(function(){try{return n(287)}catch(t){}}())},1060:function(t,e,n){var i=n(390),r=n(1061)(function(t,e,n){i(t,n,e)});t.exports=r},1061:function(t,e,n){var i=n(1062),r=n(1063),a=n(326),o=n(297);t.exports=function(t,e){return function(n,s){var l=o(n)?i:r,u=e?e():{};return l(n,t,a(s,2),u)}}},1062:function(t,e){t.exports=function(t,e,n,i){for(var r=-1,a=null==t?0:t.length;++r<a;){var o=t[r];e(i,o,n(o),t)}return i}},1063:function(t,e,n){var i=n(361);t.exports=function(t,e,n,r){return i(t,function(t,i,a){e(r,t,n(t),a)}),r}},699:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Chart",{enumerable:!0,get:function(){return a.default}}),e.defaults=e.Scatter=e.Bubble=e.Polar=e.Radar=e.HorizontalBar=e.Bar=e.Line=e.Pie=e.Doughnut=e.default=void 0;var i=l(n(2)),r=l(n(4)),a=l(n(1059)),o=l(n(642)),s=l(n(1060));function l(t){return t&&t.__esModule?t:{default:t}}function u(){return(u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function d(t){return(d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach(function(e){k(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function m(t,e,n){return e&&p(t.prototype,e),n&&p(t,n),t}function v(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var n,i=_(t);if(e){var r=_(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return function(t,e){if(e&&("object"===d(e)||"function"===typeof e))return e;return x(t)}(this,n)}}function x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _(t){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w="undefined"!==typeof t&&Object({NODE_ENV:"production",PUBLIC_URL:""})&&"production",M=function(t){v(n,i["default"].Component);var e=y(n);function n(){var t;return g(this,n),k(x(t=e.call(this)),"handleOnClick",function(e){var n=t.chartInstance,i=t.props,r=i.getDatasetAtEvent,a=i.getElementAtEvent,o=i.getElementsAtEvent,s=i.onElementsClick;r&&r(n.getDatasetAtEvent(e),e),a&&a(n.getElementAtEvent(e),e),o&&o(n.getElementsAtEvent(e),e),s&&s(n.getElementsAtEvent(e),e)}),k(x(t),"ref",function(e){t.element=e}),t.chartInstance=void 0,t}return m(n,[{key:"componentDidMount",value:function(){this.renderChart()}},{key:"componentDidUpdate",value:function(){if(this.props.redraw)return this.destroyChart(),void this.renderChart();this.updateChart()}},{key:"shouldComponentUpdate",value:function(t){var e=this.props,n=(e.redraw,e.type),i=e.options,r=e.plugins,a=e.legend,s=e.height,l=e.width;if(!0===t.redraw)return!0;if(s!==t.height||l!==t.width)return!0;if(n!==t.type)return!0;if(!(0,o.default)(a,t.legend))return!0;if(!(0,o.default)(i,t.options))return!0;var u=this.transformDataProp(t);return!(0,o.default)(this.shadowDataProp,u)||!(0,o.default)(r,t.plugins)}},{key:"componentWillUnmount",value:function(){this.destroyChart()}},{key:"transformDataProp",value:function(t){var e=t.data;return"function"==typeof e?e(this.element):e}},{key:"memoizeDataProps",value:function(){if(this.props.data){var t=this.transformDataProp(this.props);return this.shadowDataProp=f(f({},t),{},{datasets:t.datasets&&t.datasets.map(function(t){return f({},t)})}),this.saveCurrentDatasets(),t}}},{key:"checkDatasets",value:function(t){var e="production"!==w&&"prod"!==w,i=this.props.datasetKeyProvider!==n.getLabelAsKey,r=t.length>1;if(e&&r&&!i){var a=!1;t.forEach(function(t){t.label||(a=!0)}),a&&console.error('[react-chartjs-2] Warning: Each dataset needs a unique key. By default, the "label" property on each dataset is used. Alternatively, you may provide a "datasetKeyProvider" as a prop that returns a unique key.')}}},{key:"getCurrentDatasets",value:function(){return this.chartInstance&&this.chartInstance.config.data&&this.chartInstance.config.data.datasets||[]}},{key:"saveCurrentDatasets",value:function(){var t=this;this.datasets=this.datasets||{},this.getCurrentDatasets().forEach(function(e){t.datasets[t.props.datasetKeyProvider(e)]=e})}},{key:"updateChart",value:function(){var t=this,e=this.props.options,n=this.memoizeDataProps(this.props);if(this.chartInstance){e&&(this.chartInstance.options=a.default.helpers.configMerge(this.chartInstance.options,e));var i=this.getCurrentDatasets(),r=n.datasets||[];this.checkDatasets(i);var o=(0,s.default)(i,this.props.datasetKeyProvider);this.chartInstance.config.data.datasets=r.map(function(e){var n=o[t.props.datasetKeyProvider(e)];if(n&&n.type===e.type&&e.data){n.data.splice(e.data.length),e.data.forEach(function(t,i){n.data[i]=e.data[i]});e.data;var i=c(e,["data"]);return f(f({},n),i)}return e});n.datasets;var l=c(n,["datasets"]);this.chartInstance.config.data=f(f({},this.chartInstance.config.data),l),this.chartInstance.update()}}},{key:"renderChart",value:function(){var t=this.props,e=t.options,i=t.legend,r=t.type,s=t.plugins,l=this.element,u=this.memoizeDataProps();"undefined"===typeof i||(0,o.default)(n.defaultProps.legend,i)||(e.legend=i),this.chartInstance=new a.default(l,{type:r,data:u,options:e,plugins:s})}},{key:"destroyChart",value:function(){if(this.chartInstance){this.saveCurrentDatasets();var t=Object.values(this.datasets);this.chartInstance.config.data.datasets=t,this.chartInstance.destroy()}}},{key:"render",value:function(){var t=this.props,e=t.height,n=t.width,r=t.id;return i.default.createElement("canvas",{ref:this.ref,height:e,width:n,id:r,onClick:this.handleOnClick})}}]),n}();k(M,"getLabelAsKey",function(t){return t.label}),k(M,"propTypes",{data:r.default.oneOfType([r.default.object,r.default.func]).isRequired,getDatasetAtEvent:r.default.func,getElementAtEvent:r.default.func,getElementsAtEvent:r.default.func,height:r.default.number,legend:r.default.object,onElementsClick:r.default.func,options:r.default.object,plugins:r.default.arrayOf(r.default.object),redraw:r.default.bool,type:function(t,e,n){if(!a.default.controllers[t[e]])return new Error("Invalid chart type `"+t[e]+"` supplied to `"+n+"`.")},width:r.default.number,datasetKeyProvider:r.default.func}),k(M,"defaultProps",{legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:M.getLabelAsKey});var C=M;e.default=C;var S=function(t){v(n,i["default"].Component);var e=y(n);function n(){return g(this,n),e.apply(this,arguments)}return m(n,[{key:"render",value:function(){var t=this;return i.default.createElement(M,u({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"doughnut"}))}}]),n}();e.Doughnut=S;var P=function(t){v(n,i["default"].Component);var e=y(n);function n(){return g(this,n),e.apply(this,arguments)}return m(n,[{key:"render",value:function(){var t=this;return i.default.createElement(M,u({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"pie"}))}}]),n}();e.Pie=P;var A=function(t){v(n,i["default"].Component);var e=y(n);function n(){return g(this,n),e.apply(this,arguments)}return m(n,[{key:"render",value:function(){var t=this;return i.default.createElement(M,u({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"line"}))}}]),n}();e.Line=A;var D=function(t){v(n,i["default"].Component);var e=y(n);function n(){return g(this,n),e.apply(this,arguments)}return m(n,[{key:"render",value:function(){var t=this;return i.default.createElement(M,u({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"bar"}))}}]),n}();e.Bar=D;var I=function(t){v(n,i["default"].Component);var e=y(n);function n(){return g(this,n),e.apply(this,arguments)}return m(n,[{key:"render",value:function(){var t=this;return i.default.createElement(M,u({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"horizontalBar"}))}}]),n}();e.HorizontalBar=I;var T=function(t){v(n,i["default"].Component);var e=y(n);function n(){return g(this,n),e.apply(this,arguments)}return m(n,[{key:"render",value:function(){var t=this;return i.default.createElement(M,u({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"radar"}))}}]),n}();e.Radar=T;var O=function(t){v(n,i["default"].Component);var e=y(n);function n(){return g(this,n),e.apply(this,arguments)}return m(n,[{key:"render",value:function(){var t=this;return i.default.createElement(M,u({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"polarArea"}))}}]),n}();e.Polar=O;var F=function(t){v(n,i["default"].Component);var e=y(n);function n(){return g(this,n),e.apply(this,arguments)}return m(n,[{key:"render",value:function(){var t=this;return i.default.createElement(M,u({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"bubble"}))}}]),n}();e.Bubble=F;var L=function(t){v(n,i["default"].Component);var e=y(n);function n(){return g(this,n),e.apply(this,arguments)}return m(n,[{key:"render",value:function(){var t=this;return i.default.createElement(M,u({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"scatter"}))}}]),n}();e.Scatter=L;var R=a.default.defaults;e.defaults=R}).call(this,n(172))}}]);
//# sourceMappingURL=57.0a70e854.chunk.js.map