function initRealTimeChart(){function n(){t.setData([getRandomData()]);t.draw();var i;realtime==="on"?i=setTimeout(n,320):clearTimeout(i)}var t=$.plot("#real_time_chart",[getRandomData()],{series:{shadowSize:0,color:"rgb(0, 188, 212)"},grid:{borderColor:"#f3f3f3",borderWidth:1,tickColor:"#f3f3f3"},lines:{fill:!0},yaxis:{min:0,max:100},xaxis:{min:0,max:100}});n();$("#realtime").on("change",function(){realtime=this.checked?"on":"off";n()})}function initSparkline(){$(".sparkline").each(function(){var n=$(this);n.sparkline("html",n.data())})}function initDonutChart(){Morris.Donut({element:"donut_chart",data:[{label:"Chrome",value:37},{label:"Firefox",value:30},{label:"Safari",value:18},{label:"Opera",value:12},{label:"Other",value:3}],colors:["rgb(233, 30, 99)","rgb(0, 188, 212)","rgb(255, 152, 0)","rgb(0, 150, 136)","rgb(96, 125, 139)"],formatter:function(n){return n+"%"}})}function getRandomData(){var r,n,i,t;for(data.length>0&&(data=data.slice(1));data.length<totalPoints;)r=data.length>0?data[data.length-1]:50,n=r+Math.random()*10-5,n<0?n=0:n>100&&(n=100),data.push(n);for(i=[],t=0;t<data.length;++t)i.push([t,data[t]]);return i}var realtime,data,totalPoints;(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(jQuery)})(function(n){function i(n,t){return n.toFixed(t.decimals)}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,this.dataOptions(),r);this.init()};t.DEFAULTS={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:i,onUpdate:null,onComplete:null};t.prototype.init=function(){this.value=this.options.from;this.loops=Math.ceil(this.options.speed/this.options.refreshInterval);this.loopCount=0;this.increment=(this.options.to-this.options.from)/this.loops};t.prototype.dataOptions=function(){var n={from:this.$element.data("from"),to:this.$element.data("to"),speed:this.$element.data("speed"),refreshInterval:this.$element.data("refresh-interval"),decimals:this.$element.data("decimals")},i=Object.keys(n),r,t;for(r in i)t=i[r],typeof n[t]=="undefined"&&delete n[t];return n};t.prototype.update=function(){this.value+=this.increment;this.loopCount++;this.render();typeof this.options.onUpdate=="function"&&this.options.onUpdate.call(this.$element,this.value);this.loopCount>=this.loops&&(clearInterval(this.interval),this.value=this.options.to,typeof this.options.onComplete=="function"&&this.options.onComplete.call(this.$element,this.value))};t.prototype.render=function(){var n=this.options.formatter.call(this.$element,this.value,this.options);this.$element.text(n)};t.prototype.restart=function(){this.stop();this.init();this.start()};t.prototype.start=function(){this.stop();this.render();this.interval=setInterval(this.update.bind(this),this.options.refreshInterval)};t.prototype.stop=function(){this.interval&&clearInterval(this.interval)};t.prototype.toggle=function(){this.interval?this.stop():this.start()};n.fn.countTo=function(i){return this.each(function(){var u=n(this),r=u.data("countTo"),f=!r||typeof i=="object",e=typeof i=="object"?i:{},o=typeof i=="string"?i:"start";f&&(r&&r.stop(),u.data("countTo",r=new t(this,e)));r[o].call(r)})}}),function(n,t){typeof exports=="object"&&typeof module=="object"?module.exports=t():typeof define=="function"&&define.amd?define([],t):typeof exports=="object"?exports.Raphael=t():n.Raphael=t()}(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,t,i){var u,r;!(u=[i(1),i(3),i(4)],r=function(n){return n}.apply(t,u),r!==undefined&&(n.exports=r))},function(n,t,i){var u,r;!(u=[i(2)],r=function(n){function t(i){var r,u;return t.is(i,"function")?ci?i():n.on("raphael.DOMload",i):t.is(i,nt)?t._engine.create[a](t,i.splice(0,3+t.is(i[0],y))).add(i):(r=Array.prototype.slice.call(arguments,0),t.is(r[r.length-1],"function")?(u=r.pop(),ci?u.call(t._engine.create[a](t,r)):n.on("raphael.DOMload",function(){u.call(t._engine.create[a](t,r))})):t._engine.create[a](t,arguments))}function yt(n){var i,t;if(typeof n=="function"||Object(n)!==n)return n;i=new n.constructor;for(t in n)n[l](t)&&(i[t]=yt(n[t]));return i}function ff(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return n.push(n.splice(i,1)[0])}function tt(n,t,i){function r(){var o=Array.prototype.slice.call(arguments,0),u=o.join("␀"),f=r.cache=r.cache||{},e=r.count=r.count||[];return f[l](u)?(ff(e,u),i?i(f[u]):f[u]):(e.length>=1e3&&delete f[e.shift()],e.push(u),f[u]=n[a](t,o),i?i(f[u]):f[u])}return r}function fi(){return this.hex}function pr(n,t){for(var i,f=[],r=0,u=n.length;u-2*!t>r;r+=2)i=[{x:+n[r-2],y:+n[r-1]},{x:+n[r],y:+n[r+1]},{x:+n[r+2],y:+n[r+3]},{x:+n[r+4],y:+n[r+5]}],t?r?u-4==r?i[3]={x:+n[0],y:+n[1]}:u-2==r&&(i[2]={x:+n[0],y:+n[1]},i[3]={x:+n[2],y:+n[3]}):i[0]={x:+n[u-2],y:+n[u-1]}:u-4==r?i[3]=i[2]:r||(i[0]={x:+n[r],y:+n[r+1]}),f.push(["C",(-i[0].x+6*i[1].x+i[2].x)/6,(-i[0].y+6*i[1].y+i[2].y)/6,(i[1].x+6*i[2].x-i[3].x)/6,(i[1].y+6*i[2].y-i[3].y)/6,i[2].x,i[2].y]);return f}function wr(n,t,i,r,u){var f=-3*t+9*i-9*r+3*u,e=n*f+6*t-12*i+6*r;return n*e-3*t+3*i}function at(n,t,i,u,f,e,o,s,h){var c;h==null&&(h=1);h=h>1?1:h<0?0:h;var l=h/2,w=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],b=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],a=0;for(c=0;c<12;c++){var v=l*w[c]+l,y=wr(v,n,i,f,o),p=wr(v,t,u,e,s),k=y*y+p*p;a+=b[c]*r.sqrt(k)}return l*a}function of(n,t,i,r,u,f,e,o,s){if(!(s<0)&&!(at(n,t,i,r,u,f,e,o)<s)){for(var a=1,l=a/2,h=a-l,c=at(n,t,i,r,u,f,e,o,h);v(c-s)>.01;)l/=2,h+=(c<s?1:-1)*l,c=at(n,t,i,r,u,f,e,o,h);return h}}function sf(n,t,i,r,u,f,o,s){if(!(e(n,i)<c(u,o))&&!(c(n,i)>e(u,o))&&!(e(t,r)<c(f,s))&&!(c(t,r)>e(f,s))){var p=(n*r-t*i)*(u-o)-(n-i)*(u*s-f*o),w=(n*r-t*i)*(f-s)-(t-r)*(u*s-f*o),a=(n-i)*(f-s)-(t-r)*(u-o);if(a){var v=p/a,y=w/a,h=+v.toFixed(2),l=+y.toFixed(2);if(!(h<+c(n,i).toFixed(2))&&!(h>+e(n,i).toFixed(2))&&!(h<+c(u,o).toFixed(2))&&!(h>+e(u,o).toFixed(2))&&!(l<+c(t,r).toFixed(2))&&!(l>+e(t,r).toFixed(2))&&!(l<+c(f,s).toFixed(2))&&!(l>+e(f,s).toFixed(2)))return{x:v,y:y}}}}function wi(n,i,r){var ut=t.bezierBBox(n),ft=t.bezierBBox(i),u,h,l,d,g;if(!t.isBBoxIntersect(ut,ft))return r?0:[];var et=at.apply(0,n),ot=at.apply(0,i),p=e(~~(et/5),1),w=e(~~(ot/5),1),nt=[],tt=[],rt={},it=r?0:[];for(u=0;u<p+1;u++)h=t.findDotsAtSegment.apply(t,n.concat(u/p)),nt.push({x:h.x,y:h.y,t:u/p});for(u=0;u<w+1;u++)h=t.findDotsAtSegment.apply(t,i.concat(u/w)),tt.push({x:h.x,y:h.y,t:u/w});for(u=0;u<p;u++)for(l=0;l<w;l++){var o=nt[u],a=nt[u+1],s=tt[l],y=tt[l+1],b=v(a.x-o.x)<.001?"y":"x",k=v(y.x-s.x)<.001?"y":"x",f=sf(o.x,o.y,a.x,a.y,s.x,s.y,y.x,y.y);if(f){if(rt[f.x.toFixed(4)]==f.y.toFixed(4))continue;rt[f.x.toFixed(4)]=f.y.toFixed(4);d=o.t+v((f[b]-o[b])/(a[b]-o[b]))*(a.t-o.t);g=s.t+v((f[k]-s[k])/(y[k]-s[k]))*(y.t-s.t);d>=0&&d<=1.001&&g>=0&&g<=1.001&&(r?it++:it.push({x:f.x,y:f.y,t1:c(d,1),t2:c(g,1)}))}}return it}function bi(n,i,r){var e,o,s,h,b,k,d,g,c,l,y,p,nt,a,w,tt,v,u,f,it;for(n=t._path2curve(n),i=t._path2curve(i),y=r?0:[],p=0,nt=n.length;p<nt;p++)if(a=n[p],a[0]=="M")e=b=a[1],o=k=a[2];else for(a[0]=="C"?(c=[e,o].concat(a.slice(1)),e=c[6],o=c[7]):(c=[e,o,e,o,b,k,b,k],e=b,o=k),w=0,tt=i.length;w<tt;w++)if(v=i[w],v[0]=="M")s=d=v[1],h=g=v[2];else if(v[0]=="C"?(l=[s,h].concat(v.slice(1)),s=l[6],h=l[7]):(l=[s,h,s,h,d,g,d,g],s=d,h=g),u=wi(c,l,r),r)y+=u;else{for(f=0,it=u.length;f<it;f++)u[f].segment1=p,u[f].segment2=w,u[f].bez1=c,u[f].bez2=l;y=y.concat(u)}return y}function st(n,t,i,r,u,f){n!=null?(this.a=+n,this.b=+t,this.c=+i,this.d=+r,this.e=+u,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function uu(){return this.x+ct+this.y+ct+this.width+" × "+this.height}function bf(n,t,i,r,u,f){function l(n){return((h*n+o)*n+e)*n}function y(n,t){var i=p(n,t);return((a*i+c)*i+s)*i}function p(n,t){for(var r,u,f,s,i=n,c=0;c<8;c++){if(f=l(i)-n,v(f)<t)return i;if(s=(3*h*i+2*o)*i+e,v(s)<1e-6)break;i=i-f/s}if(r=0,u=1,i=n,i<r)return r;if(i>u)return u;while(r<u){if(f=l(i),v(f-n)<t)return i;n>f?r=i:u=i;i=(u-r)/2+r}return i}var e=3*t,o=3*(r-t)-e,h=1-e-o,s=3*i,c=3*(u-i)-s,a=1-s-c;return y(n,1/(200*f))}function ut(n,t){var i=[],u={},r;if(this.ms=t,this.times=1,n){for(r in n)n[l](r)&&(u[s(r)]=n[r],i.push(s(r)));i.sort(gu)}this.anim=u;this.top=i[i.length-1];this.percents=i}function wt(i,r,f,e,h,c){var nt,v,et,a,at,dt,ii,tt,vt,gt,yt,d,ut,ht,ct,ni,ft,lt;f=s(f);var it,ot,wt,ti,bt,kt,b=i.ms,p={},g={},k={};if(e){for(v=0,et=u.length;v<et;v++)if(nt=u[v],nt.el.id==r.id&&nt.anim==i){nt.percent!=f?(u.splice(v,1),wt=1):ot=nt;r.attr(nt.totalOrigin);break}}else e=+g;for(v=0,et=i.percents.length;v<et;v++)if(i.percents[v]==f||i.percents[v]>e*i.top){f=i.percents[v];bt=i.percents[v-1]||0;b=b/i.top*(f-bt);ti=i.percents[v+1];it=i.anim[f];break}else e&&r.attr(i.anim[i.percents[v]]);if(it){if(ot)ot.initstatus=e,ot.start=new Date-ot.ms*e;else{for(a in it)if(it[l](a)&&(vi[l](a)||r.paper.customAttributes[l](a))){p[a]=r.attr(a);p[a]==null&&(p[a]=pu[a]);g[a]=it[a];switch(vi[a]){case y:k[a]=(g[a]-p[a])/b;break;case"colour":p[a]=t.getRGB(p[a]);at=t.getRGB(g[a]);k[a]={r:(at.r-p[a].r)/b,g:(at.g-p[a].g)/b,b:(at.b-p[a].b)/b};break;case"path":for(dt=pt(p[a],g[a]),ii=dt[1],p[a]=dt[0],k[a]=[],v=0,et=p[a].length;v<et;v++)for(k[a][v]=[0],tt=1,vt=p[a][v].length;tt<vt;tt++)k[a][v][tt]=(ii[v][tt]-p[a][v][tt])/b;break;case"transform":if(gt=r._,yt=lf(gt[a],g[a]),yt)for(p[a]=yt.from,g[a]=yt.to,k[a]=[],k[a].real=!0,v=0,et=p[a].length;v<et;v++)for(k[a][v]=[p[a][v][0]],tt=1,vt=p[a][v].length;tt<vt;tt++)k[a][v][tt]=(g[a][v][tt]-p[a][v][tt])/b;else d=r.matrix||new st,ut={_:{transform:gt.transform},getBBox:function(){return r.getBBox(1)}},p[a]=[d.a,d.b,d.c,d.d,d.e,d.f],nu(ut,g[a]),g[a]=ut._.transform,k[a]=[(ut.matrix.a-d.a)/b,(ut.matrix.b-d.b)/b,(ut.matrix.c-d.c)/b,(ut.matrix.d-d.d)/b,(ut.matrix.e-d.e)/b,(ut.matrix.f-d.f)/b];break;case"csv":if(ht=w(it[a])[rt](li),ct=w(p[a])[rt](li),a=="clip-rect")for(p[a]=ct,k[a]=[],v=ct.length;v--;)k[a][v]=(ht[v]-p[a][v])/b;g[a]=ht;break;default:for(ht=[][o](it[a]),ct=[][o](p[a]),k[a]=[],v=r.paper.customAttributes[a].length;v--;)k[a][v]=((ht[v]||0)-(ct[v]||0))/b}}if(ni=it.easing,ft=t.easing_formulas[ni],ft||(ft=w(ni).match(yu),ft&&ft.length==5?(lt=ft,ft=function(n){return bf(n,+lt[1],+lt[2],+lt[3],+lt[4],b)}):ft=nf),kt=it.start||i.start||+new Date,nt={anim:i,percent:f,timestamp:kt,start:kt+(i.del||0),status:0,initstatus:e||0,stop:!1,ms:b,easing:ft,from:p,diff:k,to:g,el:r,callback:it.callback,prev:bt,next:ti,repeat:c||i.times,origin:r.attr(),totalOrigin:h},u.push(nt),e&&!ot&&!wt&&(nt.stop=!0,nt.start=new Date-b*e,u.length==1))return ur();wt&&(nt.start=new Date-nt.ms*e);u.length==1&&ou(ur)}n("raphael.anim.start."+r.id,r,i)}}function su(n){for(var t=0;t<u.length;t++)u[t].el.paper==n&&u.splice(t--,1)}var ii,ri,tf,ef,et,nr,ht,ru,d,vt,p,hi;t.version="2.2.0";t.eve=n;var ci,li=/[, ]+/,hu={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},cu=/\{(\d+)\}/g,l="hasOwnProperty",i={doc:document,win:window},er={was:Object.prototype[l].call(i.win,"Raphael"),is:i.win.Raphael},or=function(){this.ca=this.customAttributes={}},h,a="apply",o="concat",bt="ontouchstart"in i.win||i.win.DocumentTouch&&i.doc instanceof DocumentTouch,k="",ct=" ",w=String,rt="split",sr="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[rt](ct),kt={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},dt=w.prototype.toLowerCase,r=Math,e=r.max,c=r.min,v=r.abs,g=r.pow,b=r.PI,y="number",gt="string",nt="array",lu=Object.prototype.toString,kf=t._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,au=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,vu={NaN:1,Infinity:1,"-Infinity":1},yu=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,ai=r.round,s=parseFloat,ft=parseInt,hr=w.prototype.toUpperCase,pu=t._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,"class":""},vi=t._availableAnimAttrs={blur:y,"clip-rect":"csv",cx:y,cy:y,fill:"colour","fill-opacity":y,"font-size":y,height:y,opacity:y,path:"path",r:y,rx:y,ry:y,stroke:"colour","stroke-opacity":y,"stroke-width":y,transform:"transform",width:y,x:y,y:y},yi=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,wu={hs:1,rg:1},bu=/,?([achlmqrstvxz]),?/gi,ku=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,du=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,cr=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig,df=t._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,lt={},gf=function(n,t){return n.key-t.key},gu=function(n,t){return s(n)-s(t)},ne=function(){},nf=function(n){return n},ni=t._rectPath=function(n,t,i,r,u){return u?[["M",n+u,t],["l",i-u*2,0],["a",u,u,0,0,1,u,u],["l",0,r-u*2],["a",u,u,0,0,1,-u,u],["l",u*2-i,0],["a",u,u,0,0,1,-u,-u],["l",0,u*2-r],["a",u,u,0,0,1,u,-u],["z"]]:[["M",n,t],["l",i,0],["l",0,r],["l",-i,0],["z"]]},lr=function(n,t,i,r){return r==null&&(r=i),[["M",n,t],["m",0,-r],["a",i,r,0,1,1,0,2*r],["a",i,r,0,1,1,0,-2*r],["z"]]},ti=t._getPath={path:function(n){return n.attr("path")},circle:function(n){var t=n.attrs;return lr(t.cx,t.cy,t.r)},ellipse:function(n){var t=n.attrs;return lr(t.cx,t.cy,t.rx,t.ry)},rect:function(n){var t=n.attrs;return ni(t.x,t.y,t.width,t.height,t.r)},image:function(n){var t=n.attrs;return ni(t.x,t.y,t.width,t.height)},text:function(n){var t=n._getBBox();return ni(t.x,t.y,t.width,t.height)},set:function(n){var t=n._getBBox();return ni(t.x,t.y,t.width,t.height)}},pi=t.mapPath=function(n,t){if(!t)return n;var f,e,u,i,o,s,r;for(n=pt(n),u=0,o=n.length;u<o;u++)for(r=n[u],i=1,s=r.length;i<s;i+=2)f=t.x(r[i],r[i+1]),e=t.y(r[i],r[i+1]),r[i]=f,r[i+1]=e;return n};if(t._g=i,t.type=i.win.SVGAngle||i.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML",t.type=="VML"){if(ii=i.doc.createElement("div"),ii.innerHTML='<v:shape adj="1"/>',ri=ii.firstChild,ri.style.behavior="url(#default#VML)",!(ri&&typeof ri.adj=="object"))return t.type=k;ii=null}t.svg=!(t.vml=t.type=="VML");t._Paper=or;t.fn=h=or.prototype=t.prototype;t._id=0;t.is=function(n,t){return(t=dt.call(t),t=="finite")?!vu[l](+n):t=="array"?n instanceof Array:t=="null"&&n===null||t==typeof n&&n!==null||t=="object"&&n===Object(n)||t=="array"&&Array.isArray&&Array.isArray(n)||lu.call(n).slice(8,-1).toLowerCase()==t};t.angle=function(n,i,u,f,e,o){if(e==null){var s=n-u,h=i-f;return!s&&!h?0:(180+r.atan2(-h,-s)*180/b+360)%360}return t.angle(n,i,e,o)-t.angle(u,f,e,o)};t.rad=function(n){return n%360*b/180};t.deg=function(n){return Math.round(n*180/b%360*1e3)/1e3};t.snapTo=function(n,i,r){var f,u;if(r=t.is(r,"finite")?r:10,t.is(n,nt)){for(f=n.length;f--;)if(v(n[f]-i)<=r)return n[f]}else{if(n=+n,u=i%n,u<r)return i-u;if(u>n-r)return i-u+n}return i};tf=t.createUUID=function(n,t){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(n,t).toUpperCase()}}(/[xy]/g,function(n){var t=r.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)});t.setWindow=function(r){n("raphael.setWindow",t,i.win,r);i.win=r;i.doc=i.win.document;t._engine.initWin&&t._engine.initWin(i.win)};var ui=function(n){var e,u,f,o,r;if(t.vml){e=/^\s+|\s+$/g;try{f=new ActiveXObject("htmlfile");f.write("<body>");f.close();u=f.body}catch(s){u=createPopup().document.body}o=u.createTextRange();ui=tt(function(n){try{u.style.color=w(n).replace(e,k);var t=o.queryCommandValue("ForeColor");return t=(t&255)<<16|t&65280|(t&16711680)>>>16,"#"+("000000"+t.toString(16)).slice(-6)}catch(i){return"none"}})}else r=i.doc.createElement("i"),r.title="Raphaël Colour Picker",r.style.display="none",i.doc.body.appendChild(r),ui=tt(function(n){return r.style.color=n,i.doc.defaultView.getComputedStyle(r,k).getPropertyValue("color")});return ui(n)},rf=function(){return"hsb("+[this.h,this.s,this.b]+")"},uf=function(){return"hsl("+[this.h,this.s,this.l]+")"},ar=function(){return this.hex},vr=function(n,i,r){if(i==null&&t.is(n,"object")&&"r"in n&&"g"in n&&"b"in n&&(r=n.b,i=n.g,n=n.r),i==null&&t.is(n,gt)){var u=t.getRGB(n);n=u.r;i=u.g;r=u.b}return(n>1||i>1||r>1)&&(n/=255,i/=255,r/=255),[n,i,r]},yr=function(n,i,r,u){n*=255;i*=255;r*=255;var f={r:n,g:i,b:r,hex:t.rgb(n,i,r),toString:ar};return t.is(u,"finite")&&(f.opacity=u),f};t.color=function(n){var i;return t.is(n,"object")&&"h"in n&&"s"in n&&"b"in n?(i=t.hsb2rgb(n),n.r=i.r,n.g=i.g,n.b=i.b,n.hex=i.hex):t.is(n,"object")&&"h"in n&&"s"in n&&"l"in n?(i=t.hsl2rgb(n),n.r=i.r,n.g=i.g,n.b=i.b,n.hex=i.hex):(t.is(n,"string")&&(n=t.getRGB(n)),t.is(n,"object")&&"r"in n&&"g"in n&&"b"in n?(i=t.rgb2hsl(n),n.h=i.h,n.s=i.s,n.l=i.l,i=t.rgb2hsb(n),n.v=i.b):(n={hex:"none"},n.r=n.g=n.b=n.h=n.s=n.v=n.l=-1)),n.toString=ar,n};t.hsb2rgb=function(n,t,i,r){this.is(n,"object")&&"h"in n&&"s"in n&&"b"in n&&(i=n.b,t=n.s,r=n.o,n=n.h);n*=360;var e,o,s,f,u;return n=n%360/60,u=i*t,f=u*(1-v(n%2-1)),e=o=s=i-u,n=~~n,e+=[u,f,0,0,f,u][n],o+=[f,u,u,f,0,0][n],s+=[0,0,f,u,u,f][n],yr(e,o,s,r)};t.hsl2rgb=function(n,t,i,r){this.is(n,"object")&&"h"in n&&"s"in n&&"l"in n&&(i=n.l,t=n.s,n=n.h);(n>1||t>1||i>1)&&(n/=360,t/=100,i/=100);n*=360;var e,o,s,f,u;return n=n%360/60,u=2*t*(i<.5?i:1-i),f=u*(1-v(n%2-1)),e=o=s=i-u/2,n=~~n,e+=[u,f,0,0,f,u][n],o+=[f,u,u,f,0,0][n],s+=[0,0,f,u,u,f][n],yr(e,o,s,r)};t.rgb2hsb=function(n,t,i){i=vr(n,t,i);n=i[0];t=i[1];i=i[2];var f,o,u,r;return u=e(n,t,i),r=u-c(n,t,i),f=r==0?null:u==n?(t-i)/r:u==t?(i-n)/r+2:(n-t)/r+4,f=(f+360)%6/6,o=r==0?0:r/u,{h:f,s:o,b:u,toString:rf}};t.rgb2hsl=function(n,t,i){i=vr(n,t,i);n=i[0];t=i[1];i=i[2];var o,h,u,f,s,r;return f=e(n,t,i),s=c(n,t,i),r=f-s,o=r==0?null:f==n?(t-i)/r:f==t?(i-n)/r+2:(n-t)/r+4,o=(o+360)%6/6,u=(f+s)/2,h=r==0?0:u<.5?r/(2*u):r/(2-2*u),{h:o,s:h,l:u,toString:uf}};t._path2string=function(){return this.join(",").replace(bu,"$1")};ef=t._preload=function(n,t){var r=i.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em";r.onload=function(){t.call(this);this.onload=null;i.doc.body.removeChild(this)};r.onerror=function(){i.doc.body.removeChild(this)};i.doc.body.appendChild(r);r.src=n};t.getRGB=tt(function(n){if(!n||!!((n=w(n)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:fi};if(n=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:fi};wu[l](n.toLowerCase().substring(0,2))||n.charAt()=="#"||(n=ui(n));var u,f,e,o,h,i,r=n.match(au);return r?(r[2]&&(e=ft(r[2].substring(5),16),f=ft(r[2].substring(3,5),16),u=ft(r[2].substring(1,3),16)),r[3]&&(e=ft((h=r[3].charAt(3))+h,16),f=ft((h=r[3].charAt(2))+h,16),u=ft((h=r[3].charAt(1))+h,16)),r[4]&&(i=r[4][rt](yi),u=s(i[0]),i[0].slice(-1)=="%"&&(u*=2.55),f=s(i[1]),i[1].slice(-1)=="%"&&(f*=2.55),e=s(i[2]),i[2].slice(-1)=="%"&&(e*=2.55),r[1].toLowerCase().slice(0,4)=="rgba"&&(o=s(i[3])),i[3]&&i[3].slice(-1)=="%"&&(o/=100)),r[5])?(i=r[5][rt](yi),u=s(i[0]),i[0].slice(-1)=="%"&&(u*=2.55),f=s(i[1]),i[1].slice(-1)=="%"&&(f*=2.55),e=s(i[2]),i[2].slice(-1)=="%"&&(e*=2.55),(i[0].slice(-3)=="deg"||i[0].slice(-1)=="°")&&(u/=360),r[1].toLowerCase().slice(0,4)=="hsba"&&(o=s(i[3])),i[3]&&i[3].slice(-1)=="%"&&(o/=100),t.hsb2rgb(u,f,e,o)):r[6]?(i=r[6][rt](yi),u=s(i[0]),i[0].slice(-1)=="%"&&(u*=2.55),f=s(i[1]),i[1].slice(-1)=="%"&&(f*=2.55),e=s(i[2]),i[2].slice(-1)=="%"&&(e*=2.55),(i[0].slice(-3)=="deg"||i[0].slice(-1)=="°")&&(u/=360),r[1].toLowerCase().slice(0,4)=="hsla"&&(o=s(i[3])),i[3]&&i[3].slice(-1)=="%"&&(o/=100),t.hsl2rgb(u,f,e,o)):(r={r:u,g:f,b:e,toString:fi},r.hex="#"+(16777216|e|f<<8|u<<16).toString(16).slice(1),t.is(o,"finite")&&(r.opacity=o),r):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:fi}},t);t.hsb=tt(function(n,i,r){return t.hsb2rgb(n,i,r).hex});t.hsl=tt(function(n,i,r){return t.hsl2rgb(n,i,r).hex});t.rgb=tt(function(n,t,i){function r(n){return n+.5|0}return"#"+(16777216|r(i)|r(t)<<8|r(n)<<16).toString(16).slice(1)});t.getColor=function(n){var t=this.getColor.start=this.getColor.start||{h:0,s:1,b:n||.75},i=this.hsb2rgb(t.h,t.s,t.b);return t.h+=.075,t.h>1&&(t.h=0,t.s-=.2,t.s<=0&&(this.getColor.start={h:0,s:1,b:t.b})),i.hex};t.getColor.reset=function(){delete this.start};t.parsePathString=function(n){var r,u,i;return n?(r=et(n),r.arr)?it(r.arr):(u={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[],t.is(n,nt)&&t.is(n[0],nt)&&(i=it(n)),i.length||w(n).replace(ku,function(n,t,r){var f=[],e=t.toLowerCase();if(r.replace(cr,function(n,t){t&&f.push(+t)}),e=="m"&&f.length>2&&(i.push([t][o](f.splice(0,2))),e="l",t=t=="m"?"l":"L"),e=="r")i.push([t][o](f));else while(f.length>=u[e])if(i.push([t][o](f.splice(0,u[e]))),!u[e])break}),i.toString=t._path2string,r.arr=it(i),i):null};t.parseTransformString=tt(function(n){if(!n)return null;var i=[];return t.is(n,nt)&&t.is(n[0],nt)&&(i=it(n)),i.length||w(n).replace(du,function(n,t,r){var u=[],f=dt.call(t);r.replace(cr,function(n,t){t&&u.push(+t)});i.push([t][o](u))}),i.toString=t._path2string,i});et=function(n){var t=et.ps=et.ps||{};return t[n]?t[n].sleep=100:t[n]={sleep:100},setTimeout(function(){for(var i in t)t[l](i)&&i!=n&&(t[i].sleep--,t[i].sleep||delete t[i])}),t[n]};t.findDotsAtSegment=function(n,t,i,u,f,e,o,s,h){var c=1-h,w=g(c,3),k=g(c,2),l=h*h,d=l*h,tt=w*n+k*3*h*i+c*3*h*h*f+d*o,it=w*t+k*3*h*u+c*3*h*h*e+d*s,a=n+2*h*(i-n)+l*(f-2*i+n),v=t+2*h*(u-t)+l*(e-2*u+t),y=i+2*h*(f-i)+l*(o-2*f+i),p=u+2*h*(e-u)+l*(s-2*e+u),rt=c*n+h*i,ut=c*t+h*u,ft=c*f+h*o,et=c*e+h*s,nt=90-r.atan2(a-y,v-p)*180/b;return(a>y||v<p)&&(nt+=180),{x:tt,y:it,m:{x:a,y:v},n:{x:y,y:p},start:{x:rt,y:ut},end:{x:ft,y:et},alpha:nt}};t.bezierBBox=function(n,i,r,u,f,e,o,s){t.is(n,"array")||(n=[n,i,r,u,f,e,o,s]);var h=gr.apply(null,n);return{x:h.min.x,y:h.min.y,x2:h.max.x,y2:h.max.y,width:h.max.x-h.min.x,height:h.max.y-h.min.y}};t.isPointInsideBBox=function(n,t,i){return t>=n.x&&t<=n.x2&&i>=n.y&&i<=n.y2};t.isBBoxIntersect=function(n,i){var r=t.isPointInsideBBox;return r(i,n.x,n.y)||r(i,n.x2,n.y)||r(i,n.x,n.y2)||r(i,n.x2,n.y2)||r(n,i.x,i.y)||r(n,i.x2,i.y)||r(n,i.x,i.y2)||r(n,i.x2,i.y2)||(n.x<i.x2&&n.x>i.x||i.x<n.x2&&i.x>n.x)&&(n.y<i.y2&&n.y>i.y||i.y<n.y2&&i.y>n.y)};t.pathIntersection=function(n,t){return bi(n,t)};t.pathIntersectionNumber=function(n,t){return bi(n,t,1)};t.isPointInsidePath=function(n,i,r){var u=t.pathBBox(n);return t.isPointInsideBBox(u,i,r)&&bi(n,[["M",i,r],["H",u.x2+10]],1)%2==1};t._removedFactory=function(t){return function(){n("raphael.log",null,"Raphaël: you are calling to method “"+t+"” of removed object",t)}};var ki=t.pathBBox=function(n){var l=et(n),h,p,u;if(l.bbox)return yt(l.bbox);if(!n)return{x:0,y:0,width:0,height:0,x2:0,y2:0};n=pt(n);var f=0,s=0,i=[],r=[],t;for(h=0,p=n.length;h<p;h++)t=n[h],t[0]=="M"?(f=t[1],s=t[2],i.push(f),r.push(s)):(u=gr(f,s,t[1],t[2],t[3],t[4],t[5],t[6]),i=i[o](u.min.x,u.max.x),r=r[o](u.min.y,u.max.y),f=t[5],s=t[6]);var v=c[a](0,i),y=c[a](0,r),w=e[a](0,i),b=e[a](0,r),k=w-v,d=b-y,g={x:v,y:y,x2:w,y2:b,width:k,height:d,cx:v+k/2,cy:y+d/2};return l.bbox=yt(g),g},it=function(n){var i=yt(n);return i.toString=t._path2string,i},hf=t._pathToRelative=function(n){var v=et(n),u,p,f,i,s,w,h,b,c;if(v.rel)return it(v.rel);t.is(n,nt)&&t.is(n&&n[0],nt)||(n=t.parsePathString(n));var r=[],o=0,e=0,l=0,a=0,y=0;for(n[0][0]=="M"&&(o=n[0][1],e=n[0][2],l=o,a=e,y++,r.push(["M",o,e])),u=y,p=n.length;u<p;u++){if(f=r[u]=[],i=n[u],i[0]!=dt.call(i[0])){f[0]=dt.call(i[0]);switch(f[0]){case"a":f[1]=i[1];f[2]=i[2];f[3]=i[3];f[4]=i[4];f[5]=i[5];f[6]=+(i[6]-o).toFixed(3);f[7]=+(i[7]-e).toFixed(3);break;case"v":f[1]=+(i[1]-e).toFixed(3);break;case"m":l=i[1];a=i[2];default:for(s=1,w=i.length;s<w;s++)f[s]=+(i[s]-(s%2?o:e)).toFixed(3)}}else for(f=r[u]=[],i[0]=="m"&&(l=i[1]+o,a=i[2]+e),h=0,b=i.length;h<b;h++)r[u][h]=i[h];c=r[u].length;switch(r[u][0]){case"z":o=l;e=a;break;case"h":o+=+r[u][c-1];break;case"v":e+=+r[u][c-1];break;default:o+=+r[u][c-2];e+=+r[u][c-1]}}return r.toString=t._path2string,v.rel=it(r),r},br=t._pathToAbsolute=function(n){var p=et(n),w,i,r,v,k,h,e,y,c,d;if(p.abs)return it(p.abs);if(t.is(n,nt)&&t.is(n&&n[0],nt)||(n=t.parsePathString(n)),!n||!n.length)return[["M",0,0]];var s=[],u=0,f=0,l=0,a=0,b=0;for(n[0][0]=="M"&&(u=+n[0][1],f=+n[0][2],l=u,a=f,b++,s[0]=["M",u,f]),w=n.length==3&&n[0][0]=="M"&&n[1][0].toUpperCase()=="R"&&n[2][0].toUpperCase()=="Z",v=b,k=n.length;v<k;v++){if(s.push(i=[]),r=n[v],r[0]!=hr.call(r[0])){i[0]=hr.call(r[0]);switch(i[0]){case"A":i[1]=r[1];i[2]=r[2];i[3]=r[3];i[4]=r[4];i[5]=r[5];i[6]=+(r[6]+u);i[7]=+(r[7]+f);break;case"V":i[1]=+r[1]+f;break;case"H":i[1]=+r[1]+u;break;case"R":for(h=[u,f][o](r.slice(1)),e=2,y=h.length;e<y;e++)h[e]=+h[e]+u,h[++e]=+h[e]+f;s.pop();s=s[o](pr(h,w));break;case"M":l=+r[1]+u;a=+r[2]+f;default:for(e=1,y=r.length;e<y;e++)i[e]=+r[e]+(e%2?u:f)}}else if(r[0]=="R")h=[u,f][o](r.slice(1)),s.pop(),s=s[o](pr(h,w)),i=["R"][o](r.slice(-2));else for(c=0,d=r.length;c<d;c++)i[c]=r[c];switch(i[0]){case"Z":u=l;f=a;break;case"H":u=i[1];break;case"V":f=i[1];break;case"M":l=i[i.length-2];a=i[i.length-1];default:u=i[i.length-2];f=i[i.length-1]}}return s.toString=t._path2string,p.abs=it(s),s},ei=function(n,t,i,r){return[n,t,i,r,i,r]},kr=function(n,t,i,r,u,f){var e=1/3,o=2/3;return[e*n+o*i,e*t+o*r,e*u+o*i,e*f+o*r,u,f]},dr=function(n,t,i,u,f,e,s,h,c,l){var at=b*120/180,et=b/180*(+f||0),p=[],g,ot=tt(function(n,t,i){var u=n*r.cos(i)-t*r.sin(i),f=n*r.sin(i)+t*r.cos(i);return{x:u,y:f}}),st,lt,w,gt;if(l)y=l[0],a=l[1],ut=l[2],ft=l[3];else{g=ot(n,t,-et);n=g.x;t=g.y;g=ot(h,c,-et);h=g.x;c=g.y;var oi=r.cos(b/180*f),si=r.sin(b/180*f),k=(n-h)/2,d=(t-c)/2,it=k*k/(i*i)+d*d/(u*u);it>1&&(it=r.sqrt(it),i=it*i,u=it*u);var ht=i*i,ct=u*u,vt=(e==s?-1:1)*r.sqrt(v((ht*ct-ht*d*d-ct*k*k)/(ht*d*d+ct*k*k))),ut=vt*i*d/u+(n+h)/2,ft=vt*-u*k/i+(t+c)/2,y=r.asin(((t-ft)/u).toFixed(9)),a=r.asin(((c-ft)/u).toFixed(9));y=n<ut?b-y:y;a=h<ut?b-a:a;y<0&&(y=b*2+y);a<0&&(a=b*2+a);s&&y>a&&(y=y-b*2);!s&&a>y&&(a=a-b*2)}if(st=a-y,v(st)>at){var ni=a,ti=h,ii=c;a=y+at*(s&&a>y?1:-1);h=ut+i*r.cos(a);c=ft+u*r.sin(a);p=dr(h,c,i,u,f,0,s,ti,ii,[a,ni,ut,ft])}st=a-y;var ri=r.cos(y),ui=r.sin(y),fi=r.cos(a),ei=r.sin(a),yt=r.tan(st/4),pt=4/3*i*yt,wt=4/3*u*yt,bt=[n,t],nt=[n+pt*ui,t-wt*ri],kt=[h+pt*ei,c-wt*fi],dt=[h,c];if(nt[0]=2*bt[0]-nt[0],nt[1]=2*bt[1]-nt[1],l)return[nt,kt,dt][o](p);for(p=[nt,kt,dt][o](p).join()[rt](","),lt=[],w=0,gt=p.length;w<gt;w++)lt[w]=w%2?ot(p[w-1],p[w],et).y:ot(p[w],p[w+1],et).x;return lt},oi=function(n,t,i,r,u,f,e,o,s){var h=1-s;return{x:g(h,3)*n+g(h,2)*3*s*i+h*3*s*s*u+g(s,3)*e,y:g(h,3)*t+g(h,2)*3*s*r+h*3*s*s*f+g(s,3)*o}},gr=tt(function(n,t,i,u,f,o,s,h){var b=f-2*i+n-(s-2*f+i),l=2*(i-n)-2*(f-i),g=n-i,p=(-l+r.sqrt(l*l-4*b*g))/2/b,w=(-l-r.sqrt(l*l-4*b*g))/2/b,k=[t,h],d=[n,s],y;return v(p)>"1e12"&&(p=.5),v(w)>"1e12"&&(w=.5),p>0&&p<1&&(y=oi(n,t,i,u,f,o,s,h,p),d.push(y.x),k.push(y.y)),w>0&&w<1&&(y=oi(n,t,i,u,f,o,s,h,w),d.push(y.x),k.push(y.y)),b=o-2*u+t-(h-2*o+u),l=2*(u-t)-2*(o-u),g=t-u,p=(-l+r.sqrt(l*l-4*b*g))/2/b,w=(-l-r.sqrt(l*l-4*b*g))/2/b,v(p)>"1e12"&&(p=.5),v(w)>"1e12"&&(w=.5),p>0&&p<1&&(y=oi(n,t,i,u,f,o,s,h,p),d.push(y.x),k.push(y.y)),w>0&&w<1&&(y=oi(n,t,i,u,f,o,s,h,w),d.push(y.x),k.push(y.y)),{min:{x:c[a](0,d),y:c[a](0,k)},max:{x:e[a](0,d),y:e[a](0,k)}}}),pt=t._path2curve=tt(function(n,t){var g=!t&&et(n),i,b;if(!t&&g.curve)return it(g.curve);var u=br(n),r=t&&br(t),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},nt=function(n,t,i){var r,u;if(!n)return["C",t.x,t.y,t.x,t.y,t.x,t.y];n[0]in{T:1,Q:1}||(t.qx=t.qy=null);switch(n[0]){case"M":t.X=n[1];t.Y=n[2];break;case"A":n=["C"][o](dr[a](0,[t.x,t.y][o](n.slice(1))));break;case"S":i=="C"||i=="S"?(r=t.x*2-t.bx,u=t.y*2-t.by):(r=t.x,u=t.y);n=["C",r,u][o](n.slice(1));break;case"T":i=="Q"||i=="T"?(t.qx=t.x*2-t.qx,t.qy=t.y*2-t.qy):(t.qx=t.x,t.qy=t.y);n=["C"][o](kr(t.x,t.y,t.qx,t.qy,n[1],n[2]));break;case"Q":t.qx=n[1];t.qy=n[2];n=["C"][o](kr(t.x,t.y,n[1],n[2],n[3],n[4]));break;case"L":n=["C"][o](ei(t.x,t.y,n[1],n[2]));break;case"H":n=["C"][o](ei(t.x,t.y,n[1],t.y));break;case"V":n=["C"][o](ei(t.x,t.y,t.x,n[1]));break;case"Z":n=["C"][o](ei(t.x,t.y,t.X,t.Y))}return n},tt=function(n,t){if(n[t].length>7){n[t].shift();for(var i=n[t];i.length;)l[t]="A",r&&(v[t]="A"),n.splice(t++,0,["C"][o](i.splice(0,6)));n.splice(t,1);b=e(u.length,r&&r.length||0)}},rt=function(n,t,i,f,o){n&&t&&n[o][0]=="M"&&t[o][0]!="M"&&(t.splice(o,0,["M",f.x,f.y]),i.bx=0,i.by=0,i.x=n[o][1],i.y=n[o][2],b=e(u.length,r&&r.length||0))},l=[],v=[],c="",w="";for(i=0,b=e(u.length,r&&r.length||0);i<b;i++){u[i]&&(c=u[i][0]);c!="C"&&(l[i]=c,i&&(w=l[i-1]));u[i]=nt(u[i],f,w);l[i]!="A"&&c=="C"&&(l[i]="C");tt(u,i);r&&(r[i]&&(c=r[i][0]),c!="C"&&(v[i]=c,i&&(w=v[i-1])),r[i]=nt(r[i],h,w),v[i]!="A"&&c=="C"&&(v[i]="C"),tt(r,i));rt(u,r,f,h,i);rt(r,u,h,f,i);var y=u[i],p=r&&r[i],k=y.length,d=r&&p.length;f.x=y[k-2];f.y=y[k-1];f.bx=s(y[k-4])||f.x;f.by=s(y[k-3])||f.y;h.bx=r&&(s(p[d-4])||h.x);h.by=r&&(s(p[d-3])||h.y);h.x=r&&p[d-2];h.y=r&&p[d-1]}return r||(g.curve=it(u)),r?[u,r]:u},null,it),re=t._parseDots=tt(function(n){for(var r,h,c,e,f,l,u=[],i=0,o=n.length;i<o;i++){if(r={},h=n[i].match(/^([^:]*):?([\d\.]*)/),r.color=t.getRGB(h[1]),r.color.error)return null;r.opacity=r.color.opacity;r.color=r.color.hex;h[2]&&(r.offset=h[2]+"%");u.push(r)}for(i=1,o=u.length-1;i<o;i++)if(!u[i].offset){for(c=s(u[i-1].offset||0),e=0,f=i+1;f<o;f++)if(u[f].offset){e=u[f].offset;break}for(e||(e=100,f=o),e=s(e),l=(e-c)/(f-i+1);i<f;i++)c+=l,u[i].offset=c+"%"}return u}),si=t._tear=function(n,t){n==t.top&&(t.top=n.prev);n==t.bottom&&(t.bottom=n.next);n.next&&(n.next.prev=n.prev);n.prev&&(n.prev.next=n.next)},ue=t._tofront=function(n,t){t.top!==n&&(si(n,t),n.next=null,n.prev=t.top,t.top.next=n,t.top=n)},fe=t._toback=function(n,t){t.bottom!==n&&(si(n,t),n.next=t.bottom,n.prev=null,t.bottom.prev=n,t.bottom=n)},ee=t._insertafter=function(n,t,i){si(n,i);t==i.top&&(i.top=n);t.next&&(t.next.prev=n);n.next=t.next;n.prev=t;t.next=n},oe=t._insertbefore=function(n,t,i){si(n,i);t==i.bottom&&(i.bottom=n);t.prev&&(t.prev.next=n);n.prev=t.prev;t.prev=n;n.next=t},cf=t.toMatrix=function(n,t){var r=ki(n),i={_:{transform:k},getBBox:function(){return r}};return nu(i,t),i.matrix},se=t.transformPath=function(n,t){return pi(n,cf(n,t))},nu=t._extractTransform=function(n,i){var b,tt;if(i==null)return n._.transform;i=w(i).replace(/\.{3}|\u2026/g,n._.transform||k);var a=t.parseTransformString(i),v=0,g=0,nt=0,y=1,p=1,e=n._,u=new st;if(e.transform=a||[],a)for(b=0,tt=a.length;b<tt;b++){var r=a[b],o=r.length,l=w(r[0]).toLowerCase(),d=r[0]!=l,s=d?u.invert():0,it,rt,h,c,f;l=="t"&&o==3?d?(it=s.x(0,0),rt=s.y(0,0),h=s.x(r[1],r[2]),c=s.y(r[1],r[2]),u.translate(h-it,c-rt)):u.translate(r[1],r[2]):l=="r"?o==2?(f=f||n.getBBox(1),u.rotate(r[1],f.x+f.width/2,f.y+f.height/2),v+=r[1]):o==4&&(d?(h=s.x(r[2],r[3]),c=s.y(r[2],r[3]),u.rotate(r[1],h,c)):u.rotate(r[1],r[2],r[3]),v+=r[1]):l=="s"?o==2||o==3?(f=f||n.getBBox(1),u.scale(r[1],r[o-1],f.x+f.width/2,f.y+f.height/2),y*=r[1],p*=r[o-1]):o==5&&(d?(h=s.x(r[3],r[4]),c=s.y(r[3],r[4]),u.scale(r[1],r[2],h,c)):u.scale(r[1],r[2],r[3],r[4]),y*=r[1],p*=r[2]):l=="m"&&o==7&&u.add(r[1],r[2],r[3],r[4],r[5],r[6]);e.dirtyT=1;n.matrix=u}n.matrix=u;e.sx=y;e.sy=p;e.deg=v;e.dx=g=u.e;e.dy=nt=u.f;y==1&&p==1&&!v&&e.bbox?(e.bbox.x+=+g,e.bbox.y+=+nt):e.dirtyT=1},tu=function(n){var t=n[0];switch(t.toLowerCase()){case"t":return[t,0,0];case"m":return[t,1,0,0,1,0,0];case"r":return n.length==4?[t,0,n[2],n[3]]:[t,0];case"s":return n.length==5?[t,1,1,n[3],n[4]]:n.length==3?[t,1,1]:[t,1]}},lf=t._equaliseTransform=function(n,i){i=w(i).replace(/\.{3}|\u2026/g,n);n=t.parseTransformString(n)||[];i=t.parseTransformString(i)||[];for(var l=e(n.length,i.length),s=[],h=[],u=0,f,c,r,o;u<l;u++){if(r=n[u]||tu(i[u]),o=i[u]||tu(r),r[0]!=o[0]||r[0].toLowerCase()=="r"&&(r[2]!=o[2]||r[3]!=o[3])||r[0].toLowerCase()=="s"&&(r[3]!=o[3]||r[4]!=o[4]))return;for(s[u]=[],h[u]=[],f=0,c=e(r.length,o.length);f<c;f++)f in r&&(s[u][f]=r[f]),f in o&&(h[u][f]=o[f])}return{from:s,to:h}};t._getContainer=function(n,r,u,f){var e;if(e=f==null&&!t.is(n,"object")?i.doc.getElementById(n):n,e!=null)return e.tagName?r==null?{container:e,width:e.style.pixelWidth||e.offsetWidth,height:e.style.pixelHeight||e.offsetHeight}:{container:e,width:r,height:u}:{container:1,x:n,y:r,width:u,height:f}};t.pathToRelative=hf;t._engine={};t.path2curve=pt;t.matrix=function(n,t,i,r,u,f){return new st(n,t,i,r,u,f)},function(n){function i(n){return n[0]*n[0]+n[1]*n[1]}function u(n){var t=r.sqrt(i(n));n[0]&&(n[0]/=t);n[1]&&(n[1]/=t)}n.add=function(n,t,i,r,u,f){var e=[[],[],[]],a=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],l=[[n,i,u],[t,r,f],[0,0,1]],o,s,h,c;for(n&&n instanceof st&&(l=[[n.a,n.c,n.e],[n.b,n.d,n.f],[0,0,1]]),o=0;o<3;o++)for(s=0;s<3;s++){for(c=0,h=0;h<3;h++)c+=a[o][h]*l[h][s];e[o][s]=c}this.a=e[0][0];this.b=e[1][0];this.c=e[0][1];this.d=e[1][1];this.e=e[0][2];this.f=e[1][2]};n.invert=function(){var n=this,t=n.a*n.d-n.b*n.c;return new st(n.d/t,-n.b/t,-n.c/t,n.a/t,(n.c*n.f-n.d*n.e)/t,(n.b*n.e-n.a*n.f)/t)};n.clone=function(){return new st(this.a,this.b,this.c,this.d,this.e,this.f)};n.translate=function(n,t){this.add(1,0,0,1,n,t)};n.scale=function(n,t,i,r){t==null&&(t=n);(i||r)&&this.add(1,0,0,1,i,r);this.add(n,0,0,t,0,0);(i||r)&&this.add(1,0,0,1,-i,-r)};n.rotate=function(n,i,u){n=t.rad(n);i=i||0;u=u||0;var f=+r.cos(n).toFixed(9),e=+r.sin(n).toFixed(9);this.add(f,e,-e,f,i,u);this.add(1,0,0,1,-i,-u)};n.x=function(n,t){return n*this.a+t*this.c+this.e};n.y=function(n,t){return n*this.b+t*this.d+this.f};n.get=function(n){return+this[w.fromCharCode(97+n)].toFixed(4)};n.toString=function(){return t.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()};n.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"};n.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]};n.split=function(){var n={},f,e,o;return n.dx=this.e,n.dy=this.f,f=[[this.a,this.c],[this.b,this.d]],n.scalex=r.sqrt(i(f[0])),u(f[0]),n.shear=f[0][0]*f[1][0]+f[0][1]*f[1][1],f[1]=[f[1][0]-f[0][0]*n.shear,f[1][1]-f[0][1]*n.shear],n.scaley=r.sqrt(i(f[1])),u(f[1]),n.shear/=n.scaley,e=-f[0][1],o=f[1][1],o<0?(n.rotate=t.deg(r.acos(o)),e<0&&(n.rotate=360-n.rotate)):n.rotate=t.deg(r.asin(e)),n.isSimple=!+n.shear.toFixed(9)&&(n.scalex.toFixed(9)==n.scaley.toFixed(9)||!n.rotate),n.isSuperSimple=!+n.shear.toFixed(9)&&n.scalex.toFixed(9)==n.scaley.toFixed(9)&&!n.rotate,n.noRotation=!+n.shear.toFixed(9)&&!n.rotate,n};n.toTransformString=function(n){var t=n||this[rt]();return t.isSimple?(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx||t.dy?"t"+[t.dx,t.dy]:k)+(t.scalex!=1||t.scaley!=1?"s"+[t.scalex,t.scaley,0,0]:k)+(t.rotate?"r"+[t.rotate,0,0]:k)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(st.prototype);var af=function(){this.returnValue=!1},vf=function(){return this.originalEvent.preventDefault()},yf=function(){this.cancelBubble=!0},pf=function(){return this.originalEvent.stopPropagation()},iu=function(n){var t=i.doc.documentElement.scrollTop||i.doc.body.scrollTop,r=i.doc.documentElement.scrollLeft||i.doc.body.scrollLeft;return{x:n.clientX+r,y:n.clientY+t}},wf=function(){return i.doc.addEventListener?function(n,t,i,r){var f=function(n){var t=iu(n);return i.call(r,n,t.x,t.y)},u;return n.addEventListener(t,f,!1),bt&&kt[t]&&(u=function(t){for(var f=iu(t),e=t,u=0,o=t.targetTouches&&t.targetTouches.length;u<o;u++)if(t.targetTouches[u].target==n){t=t.targetTouches[u];t.originalEvent=e;t.preventDefault=vf;t.stopPropagation=pf;break}return i.call(r,t,f.x,f.y)},n.addEventListener(kt[t],u,!1)),function(){return n.removeEventListener(t,f,!1),bt&&kt[t]&&n.removeEventListener(kt[t],u,!1),!0}}:i.doc.attachEvent?function(n,t,r,u){var f=function(n){n=n||i.win.event;var t=i.doc.documentElement.scrollTop||i.doc.body.scrollTop,f=i.doc.documentElement.scrollLeft||i.doc.body.scrollLeft,e=n.clientX+f,o=n.clientY+t;return n.preventDefault=n.preventDefault||af,n.stopPropagation=n.stopPropagation||yf,r.call(u,n,e,o)};return n.attachEvent("on"+t,f),function(){return n.detachEvent("on"+t,f),!0}}:void 0}(),ot=[],di=function(t){for(var f=t.clientX,e=t.clientY,v=i.doc.documentElement.scrollTop||i.doc.body.scrollTop,y=i.doc.documentElement.scrollLeft||i.doc.body.scrollLeft,r,l=ot.length,s,o;l--;){if(r=ot[l],bt&&t.touches){for(s=t.touches.length;s--;)if(o=t.touches[s],o.identifier==r.el._drag.id){f=o.clientX;e=o.clientY;(t.originalEvent?t.originalEvent:t).preventDefault();break}}else t.preventDefault();var u=r.el.node,h,a=u.nextSibling,c=u.parentNode,p=u.style.display;i.win.opera&&c.removeChild(u);u.style.display="none";h=r.el.paper.getElementByPoint(f,e);u.style.display=p;i.win.opera&&(a?c.insertBefore(u,a):c.appendChild(u));h&&n("raphael.drag.over."+r.el.id,r.el,h);f+=y;e+=v;n("raphael.drag.move."+r.el.id,r.move_scope||r.el,f-r.el._drag.x,e-r.el._drag.y,f,e,t)}},gi=function(i){t.unmousemove(di).unmouseup(gi);for(var u=ot.length,r;u--;)r=ot[u],r.el._drag={},n("raphael.drag.end."+r.el.id,r.end_scope||r.start_scope||r.move_scope||r.el,i);ot=[]},f=t.el={};for(nr=sr.length;nr--;)(function(n){t[n]=f[n]=function(r,u){return t.is(r,"function")&&(this.events=this.events||[],this.events.push({name:n,f:r,unbind:wf(this.shape||this.node||i.doc,n,r,u||this)})),this};t["un"+n]=f["un"+n]=function(i){for(var r=this.events||[],u=r.length;u--;)r[u].name==n&&(t.is(i,"undefined")||r[u].f==i)&&(r[u].unbind(),r.splice(u,1),r.length||delete this.events);return this}})(sr[nr]);f.data=function(i,r){var u=lt[this.id]=lt[this.id]||{},f;if(arguments.length==0)return u;if(arguments.length==1){if(t.is(i,"object")){for(f in i)i[l](f)&&this.data(f,i[f]);return this}return n("raphael.data.get."+this.id,this,u[i],i),u[i]}return u[i]=r,n("raphael.data.set."+this.id,this,r,i),this};f.removeData=function(n){return n==null?lt[this.id]={}:lt[this.id]&&delete lt[this.id][n],this};f.getData=function(){return yt(lt[this.id]||{})};f.hover=function(n,t,i,r){return this.mouseover(n,i).mouseout(t,r||i)};f.unhover=function(n,t){return this.unmouseover(n).unmouseout(t)};ht=[];f.drag=function(r,u,f,e,o,s){function h(h){var l,c;(h.originalEvent||h).preventDefault();var a=h.clientX,v=h.clientY,y=i.doc.documentElement.scrollTop||i.doc.body.scrollTop,p=i.doc.documentElement.scrollLeft||i.doc.body.scrollLeft;if(this._drag.id=h.identifier,bt&&h.touches)for(l=h.touches.length;l--;)if(c=h.touches[l],this._drag.id=c.identifier,c.identifier==this._drag.id){a=c.clientX;v=c.clientY;break}this._drag.x=a+p;this._drag.y=v+y;ot.length||t.mousemove(di).mouseup(gi);ot.push({el:this,move_scope:e,start_scope:o,end_scope:s});u&&n.on("raphael.drag.start."+this.id,u);r&&n.on("raphael.drag.move."+this.id,r);f&&n.on("raphael.drag.end."+this.id,f);n("raphael.drag.start."+this.id,o||e||this,h.clientX+p,h.clientY+y,h)}return this._drag={},ht.push({el:this,start:h}),this.mousedown(h),this};f.onDragOver=function(t){t?n.on("raphael.drag.over."+this.id,t):n.unbind("raphael.drag.over."+this.id)};f.undrag=function(){for(var i=ht.length;i--;)ht[i].el==this&&(this.unmousedown(ht[i].start),ht.splice(i,1),n.unbind("raphael.drag.*."+this.id));ht.length||t.unmousemove(di).unmouseup(gi);ot=[]};h.circle=function(n,i,r){var u=t._engine.circle(this,n||0,i||0,r||0);return this.__set__&&this.__set__.push(u),u};h.rect=function(n,i,r,u,f){var e=t._engine.rect(this,n||0,i||0,r||0,u||0,f||0);return this.__set__&&this.__set__.push(e),e};h.ellipse=function(n,i,r,u){var f=t._engine.ellipse(this,n||0,i||0,r||0,u||0);return this.__set__&&this.__set__.push(f),f};h.path=function(n){!n||t.is(n,gt)||t.is(n[0],nt)||(n+=k);var i=t._engine.path(t.format[a](t,arguments),this);return this.__set__&&this.__set__.push(i),i};h.image=function(n,i,r,u,f){var e=t._engine.image(this,n||"about:blank",i||0,r||0,u||0,f||0);return this.__set__&&this.__set__.push(e),e};h.text=function(n,i,r){var u=t._engine.text(this,n||0,i||0,w(r));return this.__set__&&this.__set__.push(u),u};h.set=function(n){t.is(n,"array")||(n=Array.prototype.splice.call(arguments,0,arguments.length));var i=new vt(n);return this.__set__&&this.__set__.push(i),i.paper=this,i.type="set",i};h.setStart=function(n){this.__set__=n||this.set()};h.setFinish=function(){var n=this.__set__;return delete this.__set__,n};h.getSize=function(){var n=this.canvas.parentNode;return{width:n.offsetWidth,height:n.offsetHeight}};h.setSize=function(n,i){return t._engine.setSize.call(this,n,i)};h.setViewBox=function(n,i,r,u,f){return t._engine.setViewBox.call(this,n,i,r,u,f)};h.top=h.bottom=null;h.raphael=t;ru=function(n){var u=n.getBoundingClientRect(),f=n.ownerDocument,t=f.body,r=f.documentElement,e=r.clientTop||t.clientTop||0,o=r.clientLeft||t.clientLeft||0,s=u.top+(i.win.pageYOffset||r.scrollTop||t.scrollTop)-e,h=u.left+(i.win.pageXOffset||r.scrollLeft||t.scrollLeft)-o;return{y:s,x:h}};h.getElementByPoint=function(n,t){var o=this,f=o.canvas,r=i.doc.elementFromPoint(n,t),s,u,e;if(i.win.opera&&r.tagName=="svg"&&(s=ru(f),u=f.createSVGRect(),u.x=n-s.x,u.y=t-s.y,u.width=u.height=1,e=f.getIntersectionList(u,null),e.length&&(r=e[e.length-1])),!r)return null;while(r.parentNode&&r!=f.parentNode&&!r.raphael)r=r.parentNode;return r==o.canvas.parentNode&&(r=f),r&&r.raphael?o.getById(r.raphaelid):null};h.getElementsByBBox=function(n){var i=this.set();return this.forEach(function(r){t.isBBoxIntersect(r.getBBox(),n)&&i.push(r)}),i};h.getById=function(n){for(var t=this.bottom;t;){if(t.id==n)return t;t=t.next}return null};h.forEach=function(n,t){for(var i=this.bottom;i;){if(n.call(t,i)===!1)return this;i=i.next}return this};h.getElementsByPoint=function(n,t){var i=this.set();return this.forEach(function(r){r.isPointInside(n,t)&&i.push(r)}),i};f.isPointInside=function(n,i){var r=this.realPath=ti[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(r=t.transformPath(r,this.attr("transform"))),t.isPointInsidePath(r,n,i)};f.getBBox=function(n){if(this.removed)return{};var t=this._;return n?((t.dirty||!t.bboxwt)&&(this.realPath=ti[this.type](this),t.bboxwt=ki(this.realPath),t.bboxwt.toString=uu,t.dirty=0),t.bboxwt):((t.dirty||t.dirtyT||!t.bbox)&&((t.dirty||!this.realPath)&&(t.bboxwt=0,this.realPath=ti[this.type](this)),t.bbox=ki(pi(this.realPath,this.matrix)),t.bbox.toString=uu,t.dirty=t.dirtyT=0),t.bbox)};f.clone=function(){if(this.removed)return null;var n=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(n),n};f.glow=function(n){var r;if(this.type=="text")return null;n=n||{};var t={width:(n.width||10)+(+this.attr("stroke-width")||1),fill:n.fill||!1,opacity:n.opacity==null?.5:n.opacity,offsetx:n.offsetx||0,offsety:n.offsety||0,color:n.color||"#000"},u=t.width/2,f=this.paper,e=f.set(),i=this.realPath||ti[this.type](this);for(i=this.matrix?pi(i,this.matrix):i,r=1;r<u+1;r++)e.push(f.path(i).attr({stroke:t.color,fill:t.fill?t.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(t.width/u*r).toFixed(3),opacity:+(t.opacity/u).toFixed(3)}));return e.insertBefore(this).translate(t.offsetx,t.offsety)};var tr=function(n,i,r,u,f,e,o,s,h){return h==null?at(n,i,r,u,f,e,o,s):t.findDotsAtSegment(n,i,r,u,f,e,o,s,of(n,i,r,u,f,e,o,s,h))},ir=function(n,i){return function(r,u,f){var y,p;r=pt(r);var s,h,e,a,c="",v={},o,l=0;for(y=0,p=r.length;y<p;y++){if(e=r[y],e[0]=="M")s=+e[1],h=+e[2];else{if(a=tr(s,h,e[1],e[2],e[3],e[4],e[5],e[6]),l+a>u){if(i&&!v.start){if(o=tr(s,h,e[1],e[2],e[3],e[4],e[5],e[6],u-l),c+=["C"+o.start.x,o.start.y,o.m.x,o.m.y,o.x,o.y],f)return c;v.start=c;c=["M"+o.x,o.y+"C"+o.n.x,o.n.y,o.end.x,o.end.y,e[5],e[6]].join();l+=a;s=+e[5];h=+e[6];continue}if(!n&&!i)return o=tr(s,h,e[1],e[2],e[3],e[4],e[5],e[6],u-l),{x:o.x,y:o.y,alpha:o.alpha}}l+=a;s=+e[5];h=+e[6]}c+=e.shift()+e}return v.end=c,o=n?l:i?v:t.findDotsAtSegment(s,h,e[0],e[1],e[2],e[3],e[4],e[5],1),o.alpha&&(o={x:o.x,y:o.y,alpha:o.alpha}),o}},fu=ir(1),eu=ir(),rr=ir(0,1);t.getTotalLength=fu;t.getPointAtLength=eu;t.getSubpath=function(n,t,i){if(this.getTotalLength(n)-i<1e-6)return rr(n,t).end;var r=rr(n,i,1);return t?rr(r,t).end:r};f.getTotalLength=function(){var n=this.getPath();if(n)return this.node.getTotalLength?this.node.getTotalLength():fu(n)};f.getPointAtLength=function(n){var t=this.getPath();if(t)return eu(t,n)};f.getPath=function(){var n,i=t._getPath[this.type];if(this.type!="text"&&this.type!="set")return i&&(n=i(this)),n};f.getSubpath=function(n,i){var r=this.getPath();if(r)return t.getSubpath(r,n,i)};d=t.easing_formulas={linear:function(n){return n},"<":function(n){return g(n,1.7)},">":function(n){return g(n,.48)},"<>":function(n){var i=.48-n/1.04,u=r.sqrt(.1734+i*i),f=u-i,o=g(v(f),1/3)*(f<0?-1:1),e=-u-i,s=g(v(e),1/3)*(e<0?-1:1),t=o+s+.5;return(1-t)*3*t*t+t*t*t},backIn:function(n){var t=1.70158;return n*n*((t+1)*n-t)},backOut:function(n){n=n-1;var t=1.70158;return n*n*((t+1)*n+t)+1},elastic:function(n){return n==!!n?n:g(2,-10*n)*r.sin((n-.075)*2*b/.3)+1},bounce:function(n){var r=7.5625,t=2.75,i;return n<1/t?i=r*n*n:n<2/t?(n-=1.5/t,i=r*n*n+.75):n<2.5/t?(n-=2.25/t,i=r*n*n+.9375):(n-=2.625/t,i=r*n*n+.984375),i}};d.easeIn=d["ease-in"]=d["<"];d.easeOut=d["ease-out"]=d[">"];d.easeInOut=d["ease-in-out"]=d["<>"];d["back-in"]=d.backIn;d["back-out"]=d.backOut;var u=[],ou=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(n){setTimeout(n,16)},ur=function(){for(var ft=+new Date,b=0,i,v,r,f,g,c,nt,p,ut;b<u.length;b++)if(i=u[b],!i.el.removed&&!i.paused){var k=ft-i.start,h=i.ms,et=i.easing,s=i.from,a=i.diff,tt=i.to,ot=i.t,w=i.el,it={},e,rt={},d;if(i.initstatus?(k=(i.initstatus*i.anim.top-i.prev)/(i.percent-i.prev)*h,i.status=i.initstatus,delete i.initstatus,i.stop&&u.splice(b--,1)):i.status=(i.prev+(i.percent-i.prev)*(k/h))/i.anim.top,!(k<0))if(k<h){v=et(k/h);for(r in s)if(s[l](r)){switch(vi[r]){case y:e=+s[r]+v*h*a[r];break;case"colour":e="rgb("+[fr(ai(s[r].r+v*h*a[r].r)),fr(ai(s[r].g+v*h*a[r].g)),fr(ai(s[r].b+v*h*a[r].b))].join(",")+")";break;case"path":for(e=[],f=0,g=s[r].length;f<g;f++){for(e[f]=[s[r][f][0]],c=1,nt=s[r][f].length;c<nt;c++)e[f][c]=+s[r][f][c]+v*h*a[r][f][c];e[f]=e[f].join(ct)}e=e.join(ct);break;case"transform":if(a[r].real)for(e=[],f=0,g=s[r].length;f<g;f++)for(e[f]=[s[r][f][0]],c=1,nt=s[r][f].length;c<nt;c++)e[f][c]=s[r][f][c]+v*h*a[r][f][c];else p=function(n){return+s[r][n]+v*h*a[r][n]},e=[["m",p(0),p(1),p(2),p(3),p(4),p(5)]];break;case"csv":if(r=="clip-rect")for(e=[],f=4;f--;)e[f]=+s[r][f]+v*h*a[r][f];break;default:for(ut=[][o](s[r]),e=[],f=w.paper.customAttributes[r].length;f--;)e[f]=+ut[f]+v*h*a[r][f]}it[r]=e}w.attr(it),function(t,i,r){setTimeout(function(){n("raphael.anim.frame."+t,i,r)})}(w.id,w,i.anim)}else{if(function(i,r,u){setTimeout(function(){n("raphael.anim.frame."+r.id,r,u);n("raphael.anim.finish."+r.id,r,u);t.is(i,"function")&&i.call(r)})}(i.callback,w,i.anim),w.attr(tt),u.splice(b--,1),i.repeat>1&&!i.next){for(d in tt)tt[l](d)&&(rt[d]=i.totalOrigin[d]);i.el.attr(rt);wt(i.anim,i.el,i.anim.percents[0],null,i.totalOrigin,i.repeat-1)}i.next&&!i.stop&&wt(i.anim,i.el,i.next,null,i.totalOrigin,i.repeat)}}u.length&&ou(ur)},fr=function(n){return n>255?255:n<0?0:n};f.animateWith=function(n,i,r,f,e,o){var s=this,c,h,l;if(s.removed)return o&&o.call(s),s;for(c=r instanceof ut?r:t.animation(r,f,e,o),wt(c,s,c.percents[0],null,s.attr()),h=0,l=u.length;h<l;h++)if(u[h].anim==i&&u[h].el==n){u[l-1].start=u[h].start;break}return s};f.onAnimation=function(t){return t?n.on("raphael.anim.frame."+this.id,t):n.unbind("raphael.anim.frame."+this.id),this};ut.prototype.delay=function(n){var t=new ut(this.anim,this.ms);return t.times=this.times,t.del=+n||0,t};ut.prototype.repeat=function(n){var t=new ut(this.anim,this.ms);return t.del=this.del,t.times=r.floor(e(n,0))||1,t};t.animation=function(n,i,r,u){var o,a,f,e,h,c;if(n instanceof ut)return n;(t.is(r,"function")||!r)&&(u=u||r||null,r=null);n=Object(n);i=+i||0;o={};for(f in n)n[l](f)&&s(f)!=f&&s(f)+"%"!=f&&(a=!0,o[f]=n[f]);if(a)return r&&(o.easing=r),u&&(o.callback=u),new ut({100:o},i);if(u){e=0;for(h in n)c=ft(h),n[l](h)&&c>e&&(e=c);e+="%";n[e].callback||(n[e].callback=u)}return new ut(n,i)};f.animate=function(n,i,r,u){var f=this,e;return f.removed?(u&&u.call(f),f):(e=n instanceof ut?n:t.animation(n,i,r,u),wt(e,f,e.percents[0],null,f.attr()),f)};f.setTime=function(n,t){return n&&t!=null&&this.status(n,c(t,n.ms)/n.ms),this};f.status=function(n,t){var f=[],r=0,e,i;if(t!=null)return wt(n,this,-1,c(t,1)),this;for(e=u.length;r<e;r++)if(i=u[r],i.el.id==this.id&&(!n||i.anim==n)){if(n)return i.status;f.push({anim:i.anim,status:i.status})}return n?0:f};f.pause=function(t){for(var i=0;i<u.length;i++)u[i].el.id!=this.id||t&&u[i].anim!=t||n("raphael.anim.pause."+this.id,this,u[i].anim)!==!1&&(u[i].paused=!0);return this};f.resume=function(t){for(var r,i=0;i<u.length;i++)u[i].el.id!=this.id||t&&u[i].anim!=t||(r=u[i],n("raphael.anim.resume."+this.id,this,r.anim)!==!1&&(delete r.paused,this.status(r.anim,r.status)));return this};f.stop=function(t){for(var i=0;i<u.length;i++)u[i].el.id!=this.id||t&&u[i].anim!=t||n("raphael.anim.stop."+this.id,this,u[i].anim)!==!1&&u.splice(i--,1);return this};n.on("raphael.remove",su);n.on("raphael.clear",su);f.toString=function(){return"Raphaël’s object"};vt=function(n){if(this.items=[],this.length=0,this.type="set",n)for(var t=0,i=n.length;t<i;t++)n[t]&&(n[t].constructor==f.constructor||n[t].constructor==vt)&&(this[this.items.length]=this.items[this.items.length]=n[t],this.length++)};p=vt.prototype;p.push=function(){for(var n,t,i=0,r=arguments.length;i<r;i++)n=arguments[i],n&&(n.constructor==f.constructor||n.constructor==vt)&&(t=this.items.length,this[t]=this.items[t]=n,this.length++);return this};p.pop=function(){return this.length&&delete this[this.length--],this.items.pop()};p.forEach=function(n,t){for(var i=0,r=this.items.length;i<r;i++)if(n.call(t,this.items[i],i)===!1)return this;return this};for(hi in f)f[l](hi)&&(p[hi]=function(n){return function(){var t=arguments;return this.forEach(function(i){i[n][a](i,t)})}}(hi));p.attr=function(n,i){var r,f,u,e;if(n&&t.is(n,nt)&&t.is(n[0],"object"))for(r=0,f=n.length;r<f;r++)this.items[r].attr(n[r]);else for(u=0,e=this.items.length;u<e;u++)this.items[u].attr(n,i);return this};p.clear=function(){while(this.length)this.pop()};p.splice=function(n,t){var r;n=n<0?e(this.length+n,0):n;t=e(0,c(this.length-n,t));for(var u=[],o=[],f=[],i=2;i<arguments.length;i++)f.push(arguments[i]);for(i=0;i<t;i++)o.push(this[n+i]);for(;i<this.length-n;i++)u.push(this[n+i]);for(r=f.length,i=0;i<r+u.length;i++)this.items[n+i]=this[n+i]=i<r?f[i]:u[i-r];for(i=this.items.length=this.length-=t-r;this[i];)delete this[i++];return new vt(o)};p.exclude=function(n){for(var t=0,i=this.length;t<i;t++)if(this[t]==n)return this.splice(t,1),!0};p.animate=function(n,i,r,u){var o;(t.is(r,"function")||!r)&&(u=r||null);var e=this.items.length,f=e,h,c=this,s;if(!e)return this;for(u&&(s=function(){--e||u.call(c)}),r=t.is(r,gt)?r:s,o=t.animation(n,i,r,s),h=this.items[--f].animate(o);f--;)this.items[f]&&!this.items[f].removed&&this.items[f].animateWith(h,o,o),this.items[f]&&!this.items[f].removed||e--;return this};p.insertAfter=function(n){for(var t=this.items.length;t--;)this.items[t].insertAfter(n);return this};p.getBBox=function(){for(var n,t=[],i=[],r=[],u=[],f=this.items.length;f--;)this.items[f].removed||(n=this.items[f].getBBox(),t.push(n.x),i.push(n.y),r.push(n.x+n.width),u.push(n.y+n.height));return t=c[a](0,t),i=c[a](0,i),r=e[a](0,r),u=e[a](0,u),{x:t,y:i,x2:r,y2:u,width:r-t,height:u-i}};p.clone=function(n){n=this.paper.set();for(var t=0,i=this.items.length;t<i;t++)n.push(this.items[t].clone());return n};p.toString=function(){return"Raphaël‘s set"};p.glow=function(n){var t=this.paper.set();return this.forEach(function(i){var r=i.glow(n);r!=null&&r.forEach(function(n){t.push(n)})}),t};p.isPointInside=function(n,t){var i=!1;return this.forEach(function(r){if(r.isPointInside(n,t))return i=!0,!1}),i};t.registerFont=function(n){var i,u,f,r,t,e;if(!n.face)return n;this.fonts=this.fonts||{};i={w:n.w,face:{},glyphs:{}};u=n.face["font-family"];for(f in n.face)n.face[l](f)&&(i.face[f]=n.face[f]);if(this.fonts[u]?this.fonts[u].push(i):this.fonts[u]=[i],!n.svg){i.face["units-per-em"]=ft(n.face["units-per-em"],10);for(r in n.glyphs)if(n.glyphs[l](r)&&(t=n.glyphs[r],i.glyphs[r]={w:t.w,k:{},d:t.d&&"M"+t.d.replace(/[mlcxtrv]/g,function(n){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[n]||"M"})+"z"},t.k))for(e in t.k)t[l](e)&&(i.glyphs[r].k[e]=t.k[e])}return n};h.getFont=function(n,i,r,u){var f,h,o,e,s,c;if(u=u||"normal",r=r||"normal",i=+i||{normal:400,bold:700,lighter:300,bolder:800}[i]||400,t.fonts){if(f=t.fonts[n],!f){h=new RegExp("(^|\\s)"+n.replace(/[^\w\d\s+!~.:_-]/g,k)+"(\\s|$)","i");for(o in t.fonts)if(t.fonts[l](o)&&h.test(o)){f=t.fonts[o];break}}if(f)for(s=0,c=f.length;s<c;s++)if(e=f[s],e.face["font-weight"]==i&&(e.face["font-style"]==r||!e.face["font-style"])&&e.face["font-stretch"]==u)break;return e}};h.print=function(n,i,r,u,f,o,s,h){var a,et,d,y;o=o||"middle";s=e(c(s||0,1),-1);h=e(c(h||1,3),1);var v=w(r)[rt](k),g=0,p=0,tt=k,l;if(t.is(u,"string")&&(u=this.getFont(u)),u){l=(f||16)/u.face["units-per-em"];var b=u.face.bbox[rt](li),it=+b[0],nt=b[3]-b[1],ut=0,ft=+b[1]+(o=="baseline"?nt+ +u.face.descent:nt/2);for(a=0,et=v.length;a<et;a++)v[a]=="\n"?(g=0,y=0,p=0,ut+=nt*h):(d=p&&u.glyphs[v[a-1]]||{},y=u.glyphs[v[a]],g+=p?(d.w||u.w)+(d.k&&d.k[v[a]]||0)+u.w*s:0,p=1),y&&y.d&&(tt+=t.transformPath(y.d,["t",g*l,ut*l,"s",l,l,it,ft,"t",(n-it)/l,(i-ft)/l]))}return this.path(tt).attr({fill:"#000",stroke:"none"})};h.add=function(n){if(t.is(n,"array"))for(var u=this.set(),r=0,f=n.length,i;r<f;r++)i=n[r]||{},hu[l](i.type)&&u.push(this[i.type]().attr(i));return u};t.format=function(n,i){var r=t.is(i,nt)?[0][o](i):arguments;return n&&t.is(n,gt)&&r.length-1&&(n=n.replace(cu,function(n,t){return r[++t]==null?k:r[t]})),n||k};t.fullfill=function(){var n=/\{([^\}]+)\}/g,t=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,i=function(n,i,r){var u=r;return i.replace(t,function(n,t,i,r,f){t=t||r;u&&(t in u&&(u=u[t]),typeof u=="function"&&f&&(u=u()))}),u=(u==null||u==r?n:u)+""};return function(t,r){return String(t).replace(n,function(n,t){return i(n,t,r)})}}();t.ninja=function(){if(er.was)i.win.Raphael=er.is;else{window.Raphael=undefined;try{delete window.Raphael}catch(n){}}return t};t.st=p;n.on("raphael.DOMload",function(){ci=!0});return function(n,i,r){function u(){/in/.test(n.readyState)?setTimeout(u,9):t.eve("raphael.DOMload")}n.readyState==null&&n.addEventListener&&(n.addEventListener(i,r=function(){n.removeEventListener(i,r,!1);n.readyState="complete"},!1),n.readyState="loading");u()}(document,"DOMContentLoaded"),t}.apply(t,u),r!==undefined&&(n.exports=r))},function(n,t){var r,i;(function(u){var a="0.5.0",l="hasOwnProperty",s=/[\.\/]/,v=/\s*,\s*/,y="*",d=function(){},p=function(n,t){return n-t},f,e,h={n:{}},w=function(){for(var n=0,t=this.length;n<t;n++)if(typeof this[n]!="undefined")return this[n]},b=function(){for(var n=this.length;--n;)if(typeof this[n]!="undefined")return this[n]},k=Object.prototype.toString,c=String,o=Array.isArray||function(n){return n instanceof Array||k.call(n)=="[object Array]"};eve=function(n,t){var d=h,y=e,l=Array.prototype.slice.call(arguments,2),o=eve.listeners(n),c=0,i,s=[],a={},u=[],k=f,r,v;for(u.firstDefined=w,u.lastDefined=b,f=n,e=0,r=0,v=o.length;r<v;r++)"zIndex"in o[r]&&(s.push(o[r].zIndex),o[r].zIndex<0&&(a[o[r].zIndex]=o[r]));for(s.sort(p);s[c]<0;)if(i=a[s[c++]],u.push(i.apply(t,l)),e)return e=y,u;for(r=0;r<v;r++)if(i=o[r],"zIndex"in i)if(i.zIndex==s[c]){if(u.push(i.apply(t,l)),e)break;do if(c++,i=a[s[c]],i&&u.push(i.apply(t,l)),e)break;while(i)}else a[i.zIndex]=i;else if(u.push(i.apply(t,l)),e)break;return e=y,f=k,u};eve._events=h;eve.listeners=function(n){for(var a=o(n)?n:n.split(s),t=h,i,v,f,u,w,e,c=[t],l=[],r=0,p=a.length;r<p;r++){for(e=[],u=0,w=c.length;u<w;u++)for(t=c[u].n,v=[t[a[r]],t[y]],f=2;f--;)i=v[f],i&&(e.push(i),l=l.concat(i.f||[]));c=e}return l};eve.separator=function(n){n?(n=c(n).replace(/(?=[\.\^\]\[\-])/g,"\\"),n="["+n+"]",s=new RegExp(n)):s=/[\.\/]/};eve.on=function(n,t){var r,i,u;if(typeof t!="function")return function(){};for(r=o(n)?o(n[0])?n:[n]:c(n).split(v),i=0,u=r.length;i<u;i++)(function(n){for(var u=o(n)?n:c(n).split(s),i=h,e,r=0,f=u.length;r<f;r++)i=i.n,i=i.hasOwnProperty(u[r])&&i[u[r]]||(i[u[r]]={n:{}});for(i.f=i.f||[],r=0,f=i.f.length;r<f;r++)if(i.f[r]==t){e=!0;break}e||i.f.push(t)})(r[i]);return function(n){+n==+n&&(t.zIndex=+n)}};eve.f=function(n){var t=[].slice.call(arguments,1);return function(){eve.apply(null,[n,null].concat(t).concat([].slice.call(arguments,0)))}};eve.stop=function(){e=1};eve.nt=function(n){var t=o(f)?f.join("."):f;return n?new RegExp("(?:\\.|\\/|^)"+n+"(?:\\.|\\/|$)").test(t):t};eve.nts=function(){return o(f)?f:f.split(s)};eve.off=eve.unbind=function(n,t){var e,i,f,w,u,p,r,k,a,b;if(!n){eve._events=h={n:{}};return}if(e=o(n)?o(n[0])?n:[n]:c(n).split(v),e.length>1){for(u=0,p=e.length;u<p;u++)eve.off(e[u],t);return}for(e=o(n)?n:c(n).split(s),a=[h],u=0,p=e.length;u<p;u++)for(r=0;r<a.length;r+=w.length-2){if(w=[r,1],i=a[r].n,e[u]!=y)i[e[u]]&&w.push(i[e[u]]);else for(f in i)i[l](f)&&w.push(i[f]);a.splice.apply(a,w)}for(u=0,p=a.length;u<p;u++)for(i=a[u];i.n;){if(t){if(i.f){for(r=0,k=i.f.length;r<k;r++)if(i.f[r]==t){i.f.splice(r,1);break}i.f.length||delete i.f}for(f in i.n)if(i.n[l](f)&&i.n[f].f){for(b=i.n[f].f,r=0,k=b.length;r<k;r++)if(b[r]==t){b.splice(r,1);break}b.length||delete i.n[f].f}}else{delete i.f;for(f in i.n)i.n[l](f)&&i.n[f].f&&delete i.n[f].f}i=i.n}};eve.once=function(n,t){var i=function(){return eve.off(n,i),t.apply(this,arguments)};return eve.on(n,i)};eve.version=a;eve.toString=function(){return"You are running Eve "+a};typeof n!="undefined"&&n.exports?n.exports=eve:!(r=[],i=function(){return eve}.apply(t,r),i!==undefined&&(n.exports=i))})(this)},function(n,t,i){var u,r;!(u=[i(1)],r=function(n){var tt,y;if(!n||n.svg){var i="hasOwnProperty",u=String,f=parseFloat,it=parseInt,l=Math,d=l.max,p=l.abs,g=l.pow,a=/[, ]+/,w=n.eve,o="",b=" ",v="http://www.w3.org/1999/xlink",et={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},e={};n.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var t=function(r,f){if(f){typeof r=="string"&&(r=t(r));for(var e in f)f[i](e)&&(e.substring(0,6)=="xlink:"?r.setAttributeNS(v,e.substring(6),u(f[e])):r.setAttribute(e,u(f[e])))}else r=n._g.doc.createElementNS("http://www.w3.org/2000/svg",r),r.style&&(r.style.webkitTapHighlightColor="rgba(0,0,0,0)");return r},rt=function(i,r){var w="linear",a=i.id+r,b=.5,h=.5,tt=i.node,it=i.paper,k=tt.style,v=n._g.doc.getElementById(a),y,e,nt,c,s,rt;if(!v){if(r=u(r).replace(n._radial_gradient,function(n,t,i){if(w="radial",t&&i){b=f(t);h=f(i);var r=(h>.5)*2-1;g(b-.5,2)+g(h-.5,2)>.25&&(h=l.sqrt(.25-g(b-.5,2))*r+.5)&&h!=.5&&(h=h.toFixed(5)-1e-5*r)}return o}),r=r.split(/\s*\-\s*/),w=="linear"){if(y=r.shift(),y=-f(y),isNaN(y))return null;e=[0,0,l.cos(n.rad(y)),l.sin(n.rad(y))];nt=1/(d(p(e[2]),p(e[3]))||1);e[2]*=nt;e[3]*=nt;e[2]<0&&(e[0]=-e[2],e[2]=0);e[3]<0&&(e[1]=-e[3],e[3]=0)}if(c=n._parseDots(r),!c)return null;if(a=a.replace(/[\(\)\s,\xb0#]/g,"_"),i.gradient&&a!=i.gradient.id&&(it.defs.removeChild(i.gradient),delete i.gradient),!i.gradient)for(v=t(w+"Gradient",{id:a}),i.gradient=v,t(v,w=="radial"?{fx:b,fy:h}:{x1:e[0],y1:e[1],x2:e[2],y2:e[3],gradientTransform:i.matrix.invert()}),it.defs.appendChild(v),s=0,rt=c.length;s<rt;s++)v.appendChild(t("stop",{offset:c[s].offset?c[s].offset:s?"100%":"0%","stop-color":c[s].color||"#fff","stop-opacity":isFinite(c[s].opacity)?c[s].opacity:1}))}return t(tt,{fill:st(a),opacity:1,"fill-opacity":1}),k.fill=o,k.opacity=1,k.fillOpacity=1,1},ot=function(){var n=document.documentMode;return n&&(n===9||n===10)},st=function(n){if(ot())return"url('#"+n+"')";var t=document.location,i=t.protocol+"//"+t.host+t.pathname+t.search;return"url('"+i+"#"+n+"')"},k=function(n){var i=n.getBBox(1);t(n.pattern,{patternTransform:n.matrix.invert()+" translate("+i.x+","+i.y+")"})},s=function(r,f,s){var b,k,g,tt,it,rt;if(r.type=="path"){for(var ut=u(f).toLowerCase().split("-"),ht=r.paper,h=s?"end":"start",ct=r.node,l=r.attrs,d=l["stroke-width"],ft=ut.length,a="classic",p,w,ot,st,c,v=3,y=3,nt=5;ft--;)switch(ut[ft]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":a=ut[ft];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":v=5;break;case"short":v=2}a=="open"?(v+=2,y+=2,nt+=2,ot=1,st=s?4:1,c={fill:"none",stroke:l.stroke}):(st=ot=v/2,c={fill:l.stroke,stroke:"none"});r._.arrows?s?(r._.arrows.endPath&&e[r._.arrows.endPath]--,r._.arrows.endMarker&&e[r._.arrows.endMarker]--):(r._.arrows.startPath&&e[r._.arrows.startPath]--,r._.arrows.startMarker&&e[r._.arrows.startMarker]--):r._.arrows={};a!="none"?(b="raphael-marker-"+a,k="raphael-marker-"+h+a+v+y+"-obj"+r.id,n._g.doc.getElementById(b)?e[b]++:(ht.defs.appendChild(t(t("path"),{"stroke-linecap":"round",d:et[a],id:b})),e[b]=1),g=n._g.doc.getElementById(k),g?(e[k]++,tt=g.getElementsByTagName("use")[0]):(g=t(t("marker"),{id:k,markerHeight:y,markerWidth:v,orient:"auto",refX:st,refY:y/2}),tt=t(t("use"),{"xlink:href":"#"+b,transform:(s?"rotate(180 "+v/2+" "+y/2+") ":o)+"scale("+v/nt+","+y/nt+")","stroke-width":(2/(v/nt+y/nt)).toFixed(4)}),g.appendChild(tt),ht.defs.appendChild(g),e[k]=1),t(tt,c),it=ot*(a!="diamond"&&a!="oval"),s?(p=r._.arrows.startdx*d||0,w=n.getTotalLength(l.path)-it*d):(p=it*d,w=n.getTotalLength(l.path)-(r._.arrows.enddx*d||0)),c={},c["marker-"+h]="url(#"+k+")",(w||p)&&(c.d=n.getSubpath(l.path,p,w)),t(ct,c),r._.arrows[h+"Path"]=b,r._.arrows[h+"Marker"]=k,r._.arrows[h+"dx"]=it,r._.arrows[h+"Type"]=a,r._.arrows[h+"String"]=f):(s?(p=r._.arrows.startdx*d||0,w=n.getTotalLength(l.path)-p):(p=0,w=n.getTotalLength(l.path)-(r._.arrows.enddx*d||0)),r._.arrows[h+"Path"]&&t(ct,{d:n.getSubpath(l.path,p,w)}),delete r._.arrows[h+"Path"],delete r._.arrows[h+"Marker"],delete r._.arrows[h+"dx"],delete r._.arrows[h+"Type"],delete r._.arrows[h+"String"]);for(c in e)e[i](c)&&!e[c]&&(rt=n._g.doc.getElementById(c),rt&&rt.parentNode.removeChild(rt))}},ht={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},ut=function(n,i,r){if(i=ht[u(i).toLowerCase()],i){for(var e=n.attrs["stroke-width"]||"1",s={round:e,square:e,butt:0}[n.attrs["stroke-linecap"]||r["stroke-linecap"]]||0,o=[],f=i.length;f--;)o[f]=i[f]*e+(f%2?1:-1)*s;t(n.node,{"stroke-dasharray":o.join(",")})}else t(n.node,{"stroke-dasharray":"none"})},nt=function(r,f){var h=r.node,c=r.attrs,pt=h.style.visibility,l,e,b,vt,g,et,nt,y,ot,at,st,ht,lt,w,tt,ft,yt;h.style.visibility="hidden";for(l in f)if(f[i](l)){if(!n._availableAttrs[i](l))continue;e=f[l];c[l]=e;switch(l){case"blur":r.blur(e);break;case"title":b=h.getElementsByTagName("title");b.length&&(b=b[0])?b.firstChild.nodeValue=e:(b=t("title"),vt=n._g.doc.createTextNode(e),b.appendChild(vt),h.appendChild(b));break;case"href":case"target":g=h.parentNode;g.tagName.toLowerCase()!="a"&&(et=t("a"),g.insertBefore(et,h),et.appendChild(h),g=et);l=="target"?g.setAttributeNS(v,"show",e=="blank"?"new":e):g.setAttributeNS(v,l,e);break;case"cursor":h.style.cursor=e;break;case"transform":r.transform(e);break;case"arrow-start":s(r,e);break;case"arrow-end":s(r,e,1);break;case"clip-rect":nt=u(e).split(a);nt.length==4&&(r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode),y=t("clipPath"),ot=t("rect"),y.id=n.createUUID(),t(ot,{x:nt[0],y:nt[1],width:nt[2],height:nt[3]}),y.appendChild(ot),r.paper.defs.appendChild(y),t(h,{"clip-path":"url(#"+y.id+")"}),r.clip=ot);e||(at=h.getAttribute("clip-path"),at&&(st=n._g.doc.getElementById(at.replace(/(^url\(#|\)$)/g,o)),st&&st.parentNode.removeChild(st),t(h,{"clip-path":o}),delete r.clip));break;case"path":r.type=="path"&&(t(h,{d:e?c.path=n._pathToAbsolute(e):"M0,0"}),r._.dirty=1,r._.arrows&&("startString"in r._.arrows&&s(r,r._.arrows.startString),"endString"in r._.arrows&&s(r,r._.arrows.endString,1)));break;case"width":if(h.setAttribute(l,e),r._.dirty=1,c.fx)l="x",e=c.x;else break;case"x":c.fx&&(e=-c.x-(c.width||0));case"rx":if(l=="rx"&&r.type=="rect")break;case"cx":h.setAttribute(l,e);r.pattern&&k(r);r._.dirty=1;break;case"height":if(h.setAttribute(l,e),r._.dirty=1,c.fy)l="y",e=c.y;else break;case"y":c.fy&&(e=-c.y-(c.height||0));case"ry":if(l=="ry"&&r.type=="rect")break;case"cy":h.setAttribute(l,e);r.pattern&&k(r);r._.dirty=1;break;case"r":r.type=="rect"?t(h,{rx:e,ry:e}):h.setAttribute(l,e);r._.dirty=1;break;case"src":r.type=="image"&&h.setAttributeNS(v,"href",e);break;case"stroke-width":(r._.sx!=1||r._.sy!=1)&&(e/=d(p(r._.sx),p(r._.sy))||1);h.setAttribute(l,e);c["stroke-dasharray"]&&ut(r,c["stroke-dasharray"],f);r._.arrows&&("startString"in r._.arrows&&s(r,r._.arrows.startString),"endString"in r._.arrows&&s(r,r._.arrows.endString,1));break;case"stroke-dasharray":ut(r,e,f);break;case"fill":if(ht=u(e).match(n._ISURL),ht){y=t("pattern");lt=t("image");y.id=n.createUUID();t(y,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});t(lt,{x:0,y:0,"xlink:href":ht[1]});y.appendChild(lt),function(i){n._preload(ht[1],function(){var n=this.offsetWidth,r=this.offsetHeight;t(i,{width:n,height:r});t(lt,{width:n,height:r})})}(y);r.paper.defs.appendChild(y);t(h,{fill:"url(#"+y.id+")"});r.pattern=y;r.pattern&&k(r);break}if(w=n.getRGB(e),w.error){if((r.type=="circle"||r.type=="ellipse"||u(e).charAt()!="r")&&rt(r,e)){("opacity"in c||"fill-opacity"in c)&&(tt=n._g.doc.getElementById(h.getAttribute("fill").replace(/^url\(#|\)$/g,o)),tt&&(ft=tt.getElementsByTagName("stop"),t(ft[ft.length-1],{"stop-opacity":("opacity"in c?c.opacity:1)*("fill-opacity"in c?c["fill-opacity"]:1)})));c.gradient=e;c.fill="none";break}}else delete f.gradient,delete c.gradient,!n.is(c.opacity,"undefined")&&n.is(f.opacity,"undefined")&&t(h,{opacity:c.opacity}),!n.is(c["fill-opacity"],"undefined")&&n.is(f["fill-opacity"],"undefined")&&t(h,{"fill-opacity":c["fill-opacity"]});w[i]("opacity")&&t(h,{"fill-opacity":w.opacity>1?w.opacity/100:w.opacity});case"stroke":w=n.getRGB(e);h.setAttribute(l,w.hex);l=="stroke"&&w[i]("opacity")&&t(h,{"stroke-opacity":w.opacity>1?w.opacity/100:w.opacity});l=="stroke"&&r._.arrows&&("startString"in r._.arrows&&s(r,r._.arrows.startString),"endString"in r._.arrows&&s(r,r._.arrows.endString,1));break;case"gradient":(r.type=="circle"||r.type=="ellipse"||u(e).charAt()!="r")&&rt(r,e);break;case"opacity":c.gradient&&!c[i]("stroke-opacity")&&t(h,{"stroke-opacity":e>1?e/100:e});case"fill-opacity":if(c.gradient){tt=n._g.doc.getElementById(h.getAttribute("fill").replace(/^url\(#|\)$/g,o));tt&&(ft=tt.getElementsByTagName("stop"),t(ft[ft.length-1],{"stop-opacity":e}));break}default:l=="font-size"&&(e=it(e,10)+"px");yt=l.replace(/(\-.)/g,function(n){return n.substring(1).toUpperCase()});h.style[yt]=e;r._.dirty=1;h.setAttribute(l,e)}}ct(r,f);h.style.visibility=pt},ft=1.2,ct=function(r,f){var y,h,l,e,a,p,v;if(r.type=="text"&&(f[i]("text")||f[i]("font")||f[i]("font-size")||f[i]("x")||f[i]("y"))){var c=r.attrs,s=r.node,w=s.firstChild?it(n._g.doc.defaultView.getComputedStyle(s.firstChild,o).getPropertyValue("font-size"),10):10;if(f[i]("text")){for(c.text=f.text;s.firstChild;)s.removeChild(s.firstChild);for(y=u(f.text).split("\n"),h=[],e=0,a=y.length;e<a;e++)l=t("tspan"),e&&t(l,{dy:w*ft,x:c.x}),l.appendChild(n._g.doc.createTextNode(y[e])),s.appendChild(l),h[e]=l}else for(h=s.getElementsByTagName("tspan"),e=0,a=h.length;e<a;e++)e?t(h[e],{dy:w*ft,x:c.x}):t(h[0],{dy:0});t(s,{x:c.x,y:c.y});r._.dirty=1;p=r._getBBox();v=c.y-(p.y+p.height/2);v&&n.is(v,"finite")&&t(h[0],{dy:v})}},c=function(n){return n.parentNode&&n.parentNode.tagName.toLowerCase()==="a"?n.parentNode:n},h=function(t,i){function r(){return("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5)}this[0]=this.node=t;t.raphael=!0;this.id=r();t.raphaelid=this.id;this.matrix=n.matrix();this.realPath=null;this.paper=i;this.attrs=this.attrs||{};this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1};i.bottom||(i.bottom=this);this.prev=i.top;i.top&&(i.top.next=this);i.top=this;this.next=null},r=n.el;h.prototype=r;r.constructor=h;n._engine.path=function(n,i){var u=t("path"),r;return i.canvas&&i.canvas.appendChild(u),r=new h(u,i),r.type="path",nt(r,{fill:"none",stroke:"#000",path:n}),r};r.rotate=function(n,t,i){if(this.removed)return this;if(n=u(n).split(a),n.length-1&&(t=f(n[1]),i=f(n[2])),n=f(n[0]),i==null&&(t=i),t==null||i==null){var r=this.getBBox(1);t=r.x+r.width/2;i=r.y+r.height/2}return this.transform(this._.transform.concat([["r",n,t,i]])),this};r.scale=function(n,t,i,r){if(this.removed)return this;if(n=u(n).split(a),n.length-1&&(t=f(n[1]),i=f(n[2]),r=f(n[3])),n=f(n[0]),t==null&&(t=n),r==null&&(i=r),i==null||r==null)var e=this.getBBox(1);return i=i==null?e.x+e.width/2:i,r=r==null?e.y+e.height/2:r,this.transform(this._.transform.concat([["s",n,t,i,r]])),this};r.translate=function(n,t){return this.removed?this:(n=u(n).split(a),n.length-1&&(t=f(n[1])),n=f(n[0])||0,t=+t||0,this.transform(this._.transform.concat([["t",n,t]])),this)};r.transform=function(r){var u=this._,f;return r==null?u.transform:(n._extractTransform(this,r),this.clip&&t(this.clip,{transform:this.matrix.invert()}),this.pattern&&k(this),this.node&&t(this.node,{transform:this.matrix}),(u.sx!=1||u.sy!=1)&&(f=this.attrs[i]("stroke-width")?this.attrs["stroke-width"]:1,this.attr({"stroke-width":f})),this)};r.hide=function(){return this.removed||(this.node.style.display="none"),this};r.show=function(){return this.removed||(this.node.style.display=""),this};r.remove=function(){var r=c(this.node),t,i;if(!this.removed&&r.parentNode){t=this.paper;t.__set__&&t.__set__.exclude(this);w.unbind("raphael.*.*."+this.id);this.gradient&&t.defs.removeChild(this.gradient);n._tear(this,t);r.parentNode.removeChild(r);this.removeData();for(i in this)this[i]=typeof this[i]=="function"?n._removedFactory(i):null;this.removed=!0}};r._getBBox=function(){var r,i,n,t;this.node.style.display=="none"&&(this.show(),r=!0);i=!1;this.paper.canvas.parentElement?n=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(n=this.paper.canvas.parentNode.style);n&&n.display=="none"&&(i=!0,n.display="");t={};try{t=this.node.getBBox()}catch(u){t={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{t=t||{};i&&(n.display="none")}return r&&this.hide(),t};r.attr=function(t,r){var e,c,l,s,o,h,f,u,v,y;if(this.removed)return this;if(t==null){e={};for(c in this.attrs)this.attrs[i](c)&&(e[c]=this.attrs[c]);return e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(r==null&&n.is(t,"string")){if(t=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(t=="transform")return this._.transform;for(l=t.split(a),s={},o=0,h=l.length;o<h;o++)t=l[o],s[t]=t in this.attrs?this.attrs[t]:n.is(this.paper.customAttributes[t],"function")?this.paper.customAttributes[t].def:n._availableAttrs[t];return h-1?s:s[l[0]]}if(r==null&&n.is(t,"array")){for(s={},o=0,h=t.length;o<h;o++)s[t[o]]=this.attr(t[o]);return s}r!=null?(f={},f[t]=r):t!=null&&n.is(t,"object")&&(f=t);for(u in f)w("raphael.attr."+u+"."+this.id,this,f[u]);for(u in this.paper.customAttributes)if(this.paper.customAttributes[i](u)&&f[i](u)&&n.is(this.paper.customAttributes[u],"function")){v=this.paper.customAttributes[u].apply(this,[].concat(f[u]));this.attrs[u]=f[u];for(y in v)v[i](y)&&(f[y]=v[y])}return nt(this,f),this};r.toFront=function(){var t,i;return this.removed?this:(t=c(this.node),t.parentNode.appendChild(t),i=this.paper,i.top!=this&&n._tofront(this,i),this)};r.toBack=function(){var t,i,r;return this.removed?this:(t=c(this.node),i=t.parentNode,i.insertBefore(t,i.firstChild),n._toback(this,this.paper),r=this.paper,this)};r.insertAfter=function(t){if(this.removed||!t)return this;var r=c(this.node),i=c(t.node||t[t.length-1].node);return i.nextSibling?i.parentNode.insertBefore(r,i.nextSibling):i.parentNode.appendChild(r),n._insertafter(this,t,this.paper),this};r.insertBefore=function(t){if(this.removed||!t)return this;var r=c(this.node),i=c(t.node||t[0].node);return i.parentNode.insertBefore(r,i),n._insertbefore(this,t,this.paper),this};r.blur=function(i){var r=this,u,f;return+i!=0?(u=t("filter"),f=t("feGaussianBlur"),r.attrs.blur=i,u.id=n.createUUID(),t(f,{stdDeviation:+i||1.5}),u.appendChild(f),r.paper.defs.appendChild(u),r._blur=u,t(r.node,{filter:"url(#"+u.id+")"})):(r._blur&&(r._blur.parentNode.removeChild(r._blur),delete r._blur,delete r.attrs.blur),r.node.removeAttribute("filter")),r};n._engine.circle=function(n,i,r,u){var e=t("circle"),f;return n.canvas&&n.canvas.appendChild(e),f=new h(e,n),f.attrs={cx:i,cy:r,r:u,fill:"none",stroke:"#000"},f.type="circle",t(e,f.attrs),f};n._engine.rect=function(n,i,r,u,f,e){var s=t("rect"),o;return n.canvas&&n.canvas.appendChild(s),o=new h(s,n),o.attrs={x:i,y:r,width:u,height:f,rx:e||0,ry:e||0,fill:"none",stroke:"#000"},o.type="rect",t(s,o.attrs),o};n._engine.ellipse=function(n,i,r,u,f){var o=t("ellipse"),e;return n.canvas&&n.canvas.appendChild(o),e=new h(o,n),e.attrs={cx:i,cy:r,rx:u,ry:f,fill:"none",stroke:"#000"},e.type="ellipse",t(o,e.attrs),e};n._engine.image=function(n,i,r,u,f,e){var o=t("image"),s;return t(o,{x:r,y:u,width:f,height:e,preserveAspectRatio:"none"}),o.setAttributeNS(v,"href",i),n.canvas&&n.canvas.appendChild(o),s=new h(o,n),s.attrs={x:r,y:u,width:f,height:e,src:i},s.type="image",s};n._engine.text=function(i,r,u,f){var o=t("text"),e;return i.canvas&&i.canvas.appendChild(o),e=new h(o,i),e.attrs={x:r,y:u,"text-anchor":"middle",text:f,"font-family":n._availableAttrs["font-family"],"font-size":n._availableAttrs["font-size"],stroke:"none",fill:"#000"},e.type="text",nt(e,e.attrs),e};n._engine.setSize=function(n,t){return this.width=n||this.width,this.height=t||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this};n._engine.create=function(){var u=n._getContainer.apply(0,arguments),i=u&&u.container,o=u.x,s=u.y,f=u.width,e=u.height,r,h,c;if(!i)throw new Error("SVG container not found.");return r=t("svg"),h="overflow:hidden;",o=o||0,s=s||0,f=f||512,e=e||342,t(r,{height:e,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),i==1?(r.style.cssText=h+"position:absolute;left:"+o+"px;top:"+s+"px",n._g.doc.body.appendChild(r),c=1):(r.style.cssText=h+"position:relative",i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r)),i=new n._Paper,i.width=f,i.height=e,i.canvas=r,i.clear(),i._left=i._top=0,c&&(i.renderfix=function(){}),i.renderfix(),i};n._engine.setViewBox=function(n,i,r,u,f){w("raphael.setViewBox",this,this._viewBox,[n,i,r,u,f]);var h=this.getSize(),o=d(r/h.width,u/h.height),e=this.top,l=f?"xMidYMid meet":"xMinYMin",s,c;for(n==null?(this._vbSize&&(o=1),delete this._vbSize,s="0 0 "+this.width+b+this.height):(this._vbSize=o,s=n+b+i+b+r+b+u),t(this.canvas,{viewBox:s,preserveAspectRatio:l});o&&e;)c="stroke-width"in e.attrs?e.attrs["stroke-width"]:1,e.attr({"stroke-width":c}),e._.dirty=1,e._.dirtyT=1,e=e.prev;return this._viewBox=[n,i,r,u,!!f],this};n.prototype.renderfix=function(){var n=this.canvas,u=n.style,t,i,r;try{t=n.getScreenCTM()||n.createSVGMatrix()}catch(f){t=n.createSVGMatrix()}i=-t.e%1;r=-t.f%1;(i||r)&&(i&&(this._left=(this._left+i)%1,u.left=this._left+"px"),r&&(this._top=(this._top+r)%1,u.top=this._top+"px"))};n.prototype.clear=function(){n.eve("raphael.clear",this);for(var i=this.canvas;i.firstChild;)i.removeChild(i.firstChild);this.bottom=this.top=null;(this.desc=t("desc")).appendChild(n._g.doc.createTextNode("Created with Raphaël "+n.version));i.appendChild(this.desc);i.appendChild(this.defs=t("defs"))};n.prototype.remove=function(){w("raphael.remove",this);this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]=typeof this[t]=="function"?n._removedFactory(t):null};tt=n.st;for(y in r)r[i](y)&&!tt[i](y)&&(tt[y]=function(n){return function(){var t=arguments;return this.forEach(function(i){i[n].apply(i,t)})}}(y))}}.apply(t,u),r!==undefined&&(n.exports=r))},function(n,t,i){var u,r;!(u=[i(1)],r=function(n){var s,k,y;if(!n||n.vml){var h="hasOwnProperty",r=String,f=parseFloat,c=Math,e=c.round,d=c.max,g=c.min,p=c.abs,l="fill",a=/[, ]+/,ut=n.eve,ft=" progid:DXImageTransform.Microsoft",o=" ",u="",nt={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},et=/([clmz]),?([^clmz]*)/gi,ot=/ progid:\S+Blur\([^\)]+\)/g,st=/-?[^,\s-]+/g,tt="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",t=21600,ht={path:1,rect:1,image:1},ct={circle:1,ellipse:1},lt=function(i){var l=/[ahqstv]/ig,a=n._pathToAbsolute,v,c,y,f,s,w,h,p;if(r(i).match(l)&&(a=n._path2curve),l=/[clmz]/g,a==n._pathToAbsolute&&!r(i).match(l))return r(i).replace(et,function(n,i,r){var u=[],o=i.toLowerCase()=="m",f=nt[i];return r.replace(st,function(n){o&&u.length==2&&(f+=u+nt[i=="m"?"l":"L"],u=[]);u.push(e(n*t))}),f+u});for(c=a(i),v=[],s=0,w=c.length;s<w;s++){for(y=c[s],f=c[s][0].toLowerCase(),f=="z"&&(f="x"),h=1,p=y.length;h<p;h++)f+=e(y[h]*t)+(h!=p-1?",":u);v.push(f)}return v.join(o)},it=function(t,i,r){var u=n.matrix();return u.rotate(-t,.5,.5),{dx:u.x(i,r),dy:u.y(i,r)}},w=function(n,i,r,u,f,e){var v=n._,k=n.matrix,h=v.fillpos,c=n.node,y=c.style,w=1,b="",d=t/i,g=t/r,a,s;(y.visibility="hidden",i&&r)&&(c.coordsize=p(d)+o+p(g),y.rotation=e*(i*r<0?-1:1),e&&(a=it(e,u,f),u=a.dx,f=a.dy),i<0&&(b+="x"),r<0&&(b+=" y")&&(w=-1),y.flip=b,c.coordorigin=u*-d+o+f*-g,(h||v.fillsize)&&(s=c.getElementsByTagName(l),s=s&&s[0],c.removeChild(s),h&&(a=it(e,k.x(h[0],h[1]),k.y(h[0],h[1])),s.position=a.dx*w+o+a.dy*w),v.fillsize&&(s.size=v.fillsize[0]*p(i)+o+v.fillsize[1]*p(r)),c.appendChild(s)),y.visibility="visible")};n.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var rt=function(n,t,i){for(var u=r(t).toLowerCase().split("-"),o=i?"end":"start",f=u.length,s="classic",h="medium",c="medium",e;f--;)switch(u[f]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":s=u[f];break;case"wide":case"narrow":c=u[f];break;case"long":case"short":h=u[f]}e=n.node.getElementsByTagName("stroke")[0];e[o+"arrow"]=s;e[o+"arrowlength"]=h;e[o+"arrowwidth"]=c},v=function(i,c){var yt,nt,ot,ut,ft,y,si,pt,st,tt,k,dt,gt,et,ni,vt,ri,bt,hi;i.attrs=i.attrs||{};var b=i.node,v=i.attrs,it=b.style,ui=ht[i.type]&&(c.x!=v.x||c.y!=v.y||c.width!=v.width||c.height!=v.height||c.cx!=v.cx||c.cy!=v.cy||c.rx!=v.rx||c.ry!=v.ry||c.r!=v.r),ci=ct[i.type]&&(v.cx!=c.cx||v.cy!=c.cy||v.r!=c.r||v.rx!=c.rx||v.ry!=c.ry),p=i;for(yt in c)c[h](yt)&&(v[yt]=c[yt]);if(ui&&(v.path=n._getPath[i.type](i),i._.dirty=1),c.href&&(b.href=c.href),c.title&&(b.title=c.title),c.target&&(b.target=c.target),c.cursor&&(it.cursor=c.cursor),"blur"in c&&i.blur(c.blur),(c.path&&i.type=="path"||ui)&&(b.path=lt(~r(v.path).toLowerCase().indexOf("r")?n._pathToAbsolute(v.path):v.path),i._.dirty=1,i.type=="image"&&(i._.fillpos=[v.x,v.y],i._.fillsize=[v.width,v.height],w(i,1,1,0,0,0))),"transform"in c&&i.transform(c.transform),ci){var kt=+v.cx,fi=+v.cy,ei=+v.rx||+v.r||0,oi=+v.ry||+v.r||0;b.path=n.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",e((kt-ei)*t),e((fi-oi)*t),e((kt+ei)*t),e((fi+oi)*t),e(kt*t));i._.dirty=1}if("clip-rect"in c&&(nt=r(c["clip-rect"]).split(a),nt.length==4&&(nt[2]=+nt[2]+ +nt[0],nt[3]=+nt[3]+ +nt[1],ot=b.clipRect||n._g.doc.createElement("div"),ut=ot.style,ut.clip=n.format("rect({1}px {2}px {3}px {0}px)",nt),b.clipRect||(ut.position="absolute",ut.top=0,ut.left=0,ut.width=i.paper.width+"px",ut.height=i.paper.height+"px",b.parentNode.insertBefore(ot,b),ot.appendChild(b),b.clipRect=ot)),c["clip-rect"]||b.clipRect&&(b.clipRect.style.clip="auto")),i.textpath&&(ft=i.textpath.style,c.font&&(ft.font=c.font),c["font-family"]&&(ft.fontFamily='"'+c["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,u)+'"'),c["font-size"]&&(ft.fontSize=c["font-size"]),c["font-weight"]&&(ft.fontWeight=c["font-weight"]),c["font-style"]&&(ft.fontStyle=c["font-style"])),"arrow-start"in c&&rt(p,c["arrow-start"]),"arrow-end"in c&&rt(p,c["arrow-end"],1),(c.opacity!=null||c.fill!=null||c.src!=null||c.stroke!=null||c["stroke-width"]!=null||c["stroke-opacity"]!=null||c["fill-opacity"]!=null||c["stroke-dasharray"]!=null||c["stroke-miterlimit"]!=null||c["stroke-linejoin"]!=null||c["stroke-linecap"]!=null)&&(y=b.getElementsByTagName(l),si=!1,y=y&&y[0],y||(si=y=s(l)),i.type=="image"&&c.src&&(y.src=c.src),c.fill&&(y.on=!0),(y.on==null||c.fill=="none"||c.fill===null)&&(y.on=!1),y.on&&c.fill&&(pt=r(c.fill).match(n._ISURL),pt?(y.parentNode==b&&b.removeChild(y),y.rotate=!0,y.src=pt[1],y.type="tile",st=i.getBBox(1),y.position=st.x+o+st.y,i._.fillpos=[st.x,st.y],n._preload(pt[1],function(){i._.fillsize=[this.offsetWidth,this.offsetHeight]})):(y.color=n.getRGB(c.fill).hex,y.src=u,y.type="solid",n.getRGB(c.fill).error&&(p.type in{circle:1,ellipse:1}||r(c.fill).charAt()!="r")&&at(p,c.fill,y)&&(v.fill="none",v.gradient=c.fill,y.rotate=!1))),("fill-opacity"in c||"opacity"in c)&&(tt=((+v["fill-opacity"]+1||2)-1)*((+v.opacity+1||2)-1)*((+n.getRGB(c.fill).o+1||2)-1),tt=g(d(tt,0),1),y.opacity=tt,y.src&&(y.color="none")),b.appendChild(y),k=b.getElementsByTagName("stroke")&&b.getElementsByTagName("stroke")[0],dt=!1,k||(dt=k=s("stroke")),(c.stroke&&c.stroke!="none"||c["stroke-width"]||c["stroke-opacity"]!=null||c["stroke-dasharray"]||c["stroke-miterlimit"]||c["stroke-linejoin"]||c["stroke-linecap"])&&(k.on=!0),(c.stroke=="none"||c.stroke===null||k.on==null||c.stroke==0||c["stroke-width"]==0)&&(k.on=!1),gt=n.getRGB(c.stroke),k.on&&c.stroke&&(k.color=gt.hex),tt=((+v["stroke-opacity"]+1||2)-1)*((+v.opacity+1||2)-1)*((+gt.o+1||2)-1),et=(f(c["stroke-width"])||1)*.75,tt=g(d(tt,0),1),c["stroke-width"]==null&&(et=v["stroke-width"]),c["stroke-width"]&&(k.weight=et),et&&et<1&&(tt*=et)&&(k.weight=1),k.opacity=tt,c["stroke-linejoin"]&&(k.joinstyle=c["stroke-linejoin"]||"miter"),k.miterlimit=c["stroke-miterlimit"]||8,c["stroke-linecap"]&&(k.endcap=c["stroke-linecap"]=="butt"?"flat":c["stroke-linecap"]=="square"?"square":"round"),"stroke-dasharray"in c&&(ni={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"},k.dashstyle=ni[h](c["stroke-dasharray"])?ni[c["stroke-dasharray"]]:u),dt&&b.appendChild(k)),p.type=="text"){p.paper.canvas.style.display=u;var ti=p.paper.span,ii=100,wt=v.font&&v.font.match(/\d+(?:\.\d*)?(?=px)/);for(it=ti.style,v.font&&(it.font=v.font),v["font-family"]&&(it.fontFamily=v["font-family"]),v["font-weight"]&&(it.fontWeight=v["font-weight"]),v["font-style"]&&(it.fontStyle=v["font-style"]),wt=f(v["font-size"]||wt&&wt[0])||10,it.fontSize=wt*ii+"px",p.textpath.string&&(ti.innerHTML=r(p.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>")),vt=ti.getBoundingClientRect(),p.W=v.w=(vt.right-vt.left)/ii,p.H=v.h=(vt.bottom-vt.top)/ii,p.X=v.x,p.Y=v.y+p.H/2,(("x"in c)||("y"in c))&&(p.path.v=n.format("m{0},{1}l{2},{1}",e(v.x*t),e(v.y*t),e(v.x*t)+1)),ri=["x","y","text","font","font-family","font-weight","font-style","font-size"],bt=0,hi=ri.length;bt<hi;bt++)if(ri[bt]in c){p._.dirty=1;break}switch(v["text-anchor"]){case"start":p.textpath.style["v-text-align"]="left";p.bbx=p.W/2;break;case"end":p.textpath.style["v-text-align"]="right";p.bbx=-p.W/2;break;default:p.textpath.style["v-text-align"]="center";p.bbx=0}p.textpath.style["v-text-kern"]=!0}},at=function(t,i,e){var l,s,a,h,w;t.attrs=t.attrs||{};var b=t.attrs,v=Math.pow,y="linear",p=".5 .5";if((t.attrs.gradient=i,i=r(i).replace(n._radial_gradient,function(n,t,i){return y="radial",t&&i&&(t=f(t),i=f(i),v(t-.5,2)+v(i-.5,2)>.25&&(i=c.sqrt(.25-v(t-.5,2))*((i>.5)*2-1)+.5),p=t+o+i),u}),i=i.split(/\s*\-\s*/),y=="linear"&&(l=i.shift(),l=-f(l),isNaN(l)))||(s=n._parseDots(i),!s))return null;if(t=t.shape||t.node,s.length){for(t.removeChild(e),e.on=!0,e.method="none",e.color=s[0].color,e.color2=s[s.length-1].color,a=[],h=0,w=s.length;h<w;h++)s[h].offset&&a.push(s[h].offset+o+s[h].color);e.colors=a.length?a.join():"0% "+e.color;y=="radial"?(e.type="gradientTitle",e.focus="100%",e.focussize="0 0",e.focusposition=p,e.angle=0):(e.type="gradient",e.angle=(270-l)%360);t.appendChild(e)}return 1},b=function(t,i){this[0]=this.node=t;t.raphael=!0;this.id=n._oid++;t.raphaelid=this.id;this.X=0;this.Y=0;this.attrs={};this.paper=i;this.matrix=n.matrix();this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1};i.bottom||(i.bottom=this);this.prev=i.top;i.top&&(i.top.next=this);i.top=this;this.next=null},i=n.el;b.prototype=i;i.constructor=b;i.transform=function(i){var e,a,h;if(i==null)return this._.transform;e=this.paper._viewBoxShift;a=e?"s"+[e.scale,e.scale]+"-1-1t"+[e.dx,e.dy]:u;e&&(h=i=r(i).replace(/\.{3}|\u2026/g,this._.transform||u));n._extractTransform(this,a+i);var s=this.matrix.clone(),c=this.skew,l=this.node,f,v=~r(this.attrs.fill).indexOf("-"),d=!r(this.attrs.fill).indexOf("url(");if(s.translate(1,1),d||v||this.type=="image")if(c.matrix="1 0 0 1",c.offset="0 0",f=s.split(),v&&f.noRotation||!f.isSimple){l.style.filter=s.toFilter();var y=this.getBBox(),p=this.getBBox(1),b=y.x-p.x,k=y.y-p.y;l.coordorigin=b*-t+o+k*-t;w(this,1,1,b,k,0)}else l.style.filter=u,w(this,f.scalex,f.scaley,f.dx,f.dy,f.rotate);else l.style.filter=u,c.matrix=r(s),c.offset=s.offset();return h!==null&&(this._.transform=h,n._extractTransform(this,h)),this};i.rotate=function(n,t,i){if(this.removed)return this;if(n!=null){if(n=r(n).split(a),n.length-1&&(t=f(n[1]),i=f(n[2])),n=f(n[0]),i==null&&(t=i),t==null||i==null){var u=this.getBBox(1);t=u.x+u.width/2;i=u.y+u.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",n,t,i]])),this}};i.translate=function(n,t){return this.removed?this:(n=r(n).split(a),n.length-1&&(t=f(n[1])),n=f(n[0])||0,t=+t||0,this._.bbox&&(this._.bbox.x+=n,this._.bbox.y+=t),this.transform(this._.transform.concat([["t",n,t]])),this)};i.scale=function(n,t,i,u){if(this.removed)return this;if(n=r(n).split(a),n.length-1&&(t=f(n[1]),i=f(n[2]),u=f(n[3]),isNaN(i)&&(i=null),isNaN(u)&&(u=null)),n=f(n[0]),t==null&&(t=n),u==null&&(i=u),i==null||u==null)var e=this.getBBox(1);return i=i==null?e.x+e.width/2:i,u=u==null?e.y+e.height/2:u,this.transform(this._.transform.concat([["s",n,t,i,u]])),this._.dirtyT=1,this};i.hide=function(){return this.removed||(this.node.style.display="none"),this};i.show=function(){return this.removed||(this.node.style.display=u),this};i.auxGetBBox=n.el.getBBox;i.getBBox=function(){var t=this.auxGetBBox(),n,i;return this.paper&&this.paper._viewBoxShift?(n={},i=1/this.paper._viewBoxShift.scale,n.x=t.x-this.paper._viewBoxShift.dx,n.x*=i,n.y=t.y-this.paper._viewBoxShift.dy,n.y*=i,n.width=t.width*i,n.height=t.height*i,n.x2=n.x+n.width,n.y2=n.y+n.height,n):t};i._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}};i.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this);n.eve.unbind("raphael.*.*."+this.id);n._tear(this,this.paper);this.node.parentNode.removeChild(this.node);this.shape&&this.shape.parentNode.removeChild(this.shape);for(var t in this)this[t]=typeof this[t]=="function"?n._removedFactory(t):null;this.removed=!0}};i.attr=function(t,i){var f,c,y,o,e,s,r,u,p,w;if(this.removed)return this;if(t==null){f={};for(c in this.attrs)this.attrs[h](c)&&(f[c]=this.attrs[c]);return f.gradient&&f.fill=="none"&&(f.fill=f.gradient)&&delete f.gradient,f.transform=this._.transform,f}if(i==null&&n.is(t,"string")){if(t==l&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;for(y=t.split(a),o={},e=0,s=y.length;e<s;e++)t=y[e],o[t]=t in this.attrs?this.attrs[t]:n.is(this.paper.customAttributes[t],"function")?this.paper.customAttributes[t].def:n._availableAttrs[t];return s-1?o:o[y[0]]}if(this.attrs&&i==null&&n.is(t,"array")){for(o={},e=0,s=t.length;e<s;e++)o[t[e]]=this.attr(t[e]);return o}i!=null&&(r={},r[t]=i);i==null&&n.is(t,"object")&&(r=t);for(u in r)ut("raphael.attr."+u+"."+this.id,this,r[u]);if(r){for(u in this.paper.customAttributes)if(this.paper.customAttributes[h](u)&&r[h](u)&&n.is(this.paper.customAttributes[u],"function")){p=this.paper.customAttributes[u].apply(this,[].concat(r[u]));this.attrs[u]=r[u];for(w in p)p[h](w)&&(r[w]=p[w])}r.text&&this.type=="text"&&(this.textpath.string=r.text);v(this,r)}return this};i.toFront=function(){return this.removed||this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&n._tofront(this,this.paper),this};i.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),n._toback(this,this.paper)),this)};i.insertAfter=function(t){return this.removed?this:(t.constructor==n.st.constructor&&(t=t[t.length-1]),t.node.nextSibling?t.node.parentNode.insertBefore(this.node,t.node.nextSibling):t.node.parentNode.appendChild(this.node),n._insertafter(this,t,this.paper),this)};i.insertBefore=function(t){return this.removed?this:(t.constructor==n.st.constructor&&(t=t[0]),t.node.parentNode.insertBefore(this.node,t.node),n._insertbefore(this,t,this.paper),this)};i.blur=function(t){var i=this.node.runtimeStyle,r=i.filter;return r=r.replace(ot,u),+t!=0?(this.attrs.blur=t,i.filter=r+o+ft+".Blur(pixelradius="+(+t||1.5)+")",i.margin=n.format("-{0}px 0 0 -{0}px",e(+t||1.5))):(i.filter=r,i.margin=0,delete this.attrs.blur),this};n._engine.path=function(n,i){var f=s("shape"),r,h,e;return f.style.cssText=tt,f.coordsize=t+o+t,f.coordorigin=i.coordorigin,r=new b(f,i),h={fill:"none",stroke:"#000"},n&&(h.path=n),r.type="path",r.path=[],r.Path=u,v(r,h),i.canvas&&i.canvas.appendChild(f),e=s("skew"),e.on=!0,f.appendChild(e),r.skew=e,r.transform(u),r};n._engine.rect=function(t,i,r,u,f,e){var h=n._rectPath(i,r,u,f,e),o=t.path(h),s=o.attrs;return o.X=s.x=i,o.Y=s.y=r,o.W=s.width=u,o.H=s.height=f,s.r=e,s.path=h,o.type="rect",o};n._engine.ellipse=function(n,t,i,r,u){var f=n.path(),e=f.attrs;return f.X=t-r,f.Y=i-u,f.W=r*2,f.H=u*2,f.type="ellipse",v(f,{cx:t,cy:i,rx:r,ry:u}),f};n._engine.circle=function(n,t,i,r){var u=n.path(),f=u.attrs;return u.X=t-r,u.Y=i-r,u.W=u.H=r*2,u.type="circle",v(u,{cx:t,cy:i,r:r}),u};n._engine.image=function(t,i,r,u,f,e){var a=n._rectPath(r,u,f,e),o=t.path(a).attr({stroke:"none"}),s=o.attrs,c=o.node,h=c.getElementsByTagName(l)[0];return s.src=i,o.X=s.x=r,o.Y=s.y=u,o.W=s.width=f,o.H=s.height=e,s.path=a,o.type="image",h.parentNode==c&&c.removeChild(h),h.rotate=!0,h.src=i,h.type="tile",o._.fillpos=[r,u],o._.fillsize=[f,e],c.appendChild(h),w(o,1,1,0,0,0),o};n._engine.text=function(i,f,h,c){var a=s("shape"),y=s("path"),p=s("textpath"),l,k,w;return f=f||0,h=h||0,c=c||"",y.v=n.format("m{0},{1}l{2},{1}",e(f*t),e(h*t),e(f*t)+1),y.textpathok=!0,p.string=r(c),p.on=!0,a.style.cssText=tt,a.coordsize=t+o+t,a.coordorigin="0 0",l=new b(a,i),k={fill:"#000",stroke:"none",font:n._availableAttrs.font,text:c},l.shape=a,l.path=y,l.textpath=p,l.type="text",l.attrs.text=r(c),l.attrs.x=f,l.attrs.y=h,l.attrs.w=1,l.attrs.h=1,v(l,k),a.appendChild(p),a.appendChild(y),i.canvas.appendChild(a),w=s("skew"),w.on=!0,a.appendChild(w),l.skew=w,l.transform(u),l};n._engine.setSize=function(t,i){var r=this.canvas.style;return this.width=t,this.height=i,t==+t&&(t+="px"),i==+i&&(i+="px"),r.width=t,r.height=i,r.clip="rect(0 "+t+" "+i+" 0)",this._viewBox&&n._engine.setViewBox.apply(this,this._viewBox),this};n._engine.setViewBox=function(t,i,r,u,f){n.eve("raphael.setViewBox",this,this._viewBox,[t,i,r,u,f]);var s=this.getSize(),h=s.width,c=s.height,e,o;return f&&(e=c/u,o=h/r,r*e<h&&(t-=(h-r*e)/2/e),u*o<c&&(i-=(c-u*o)/2/o)),this._viewBox=[t,i,r,u,!!f],this._viewBoxShift={dx:-t,dy:-i,scale:s},this.forEach(function(n){n.transform("...")}),this};n._engine.initWin=function(n){var t=n.document;t.styleSheets.length<31?t.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):t.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{t.namespaces.rvml||t.namespaces.add("rvml","urn:schemas-microsoft-com:vml");s=function(n){return t.createElement("<rvml:"+n+' class="rvml">')}}catch(i){s=function(n){return t.createElement("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}};n._engine.initWin(n._g.win);n._engine.create=function(){var e=n._getContainer.apply(0,arguments),f=e.container,r=e.height,u=e.width,c=e.x,l=e.y;if(!f)throw new Error("VML container not found.");var i=new n._Paper,s=i.canvas=n._g.doc.createElement("div"),h=s.style;return c=c||0,l=l||0,u=u||512,r=r||342,i.width=u,i.height=r,u==+u&&(u+="px"),r==+r&&(r+="px"),i.coordsize=t*1e3+o+t*1e3,i.coordorigin="0 0",i.span=n._g.doc.createElement("span"),i.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(i.span),h.cssText=n.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",u,r),f==1?(n._g.doc.body.appendChild(s),h.left=c+"px",h.top=l+"px",h.position="absolute"):f.firstChild?f.insertBefore(s,f.firstChild):f.appendChild(s),i.renderfix=function(){},i};n.prototype.clear=function(){n.eve("raphael.clear",this);this.canvas.innerHTML=u;this.span=n._g.doc.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas.appendChild(this.span);this.bottom=this.top=null};n.prototype.remove=function(){n.eve("raphael.remove",this);this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]=typeof this[t]=="function"?n._removedFactory(t):null;return!0};k=n.st;for(y in i)i[h](y)&&!k[h](y)&&(k[y]=function(n){return function(){var t=arguments;return this.forEach(function(i){i[n].apply(i,t)})}}(y))}}.apply(t,u),r!==undefined&&(n.exports=r))}])});
/* @license
morris.js v0.5.0
Copyright 2014 Olly Smith All rights reserved.
Licensed under the BSD-2-Clause License.
*/
(function(){var t,n,r,u,e=[].slice,i=function(n,t){return function(){return n.apply(t,arguments)}},o={}.hasOwnProperty,f=function(n,t){function r(){this.constructor=n}for(var i in t)o.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n},s=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===n)return t;return-1};n=window.Morris={};t=jQuery;n.EventEmitter=function(){function n(){}return n.prototype.on=function(n,t){return this.handlers==null&&(this.handlers={}),this.handlers[n]==null&&(this.handlers[n]=[]),this.handlers[n].push(t),this},n.prototype.fire=function(){var u,f,t,n,o,i,r;if(t=arguments[0],u=2<=arguments.length?e.call(arguments,1):[],this.handlers!=null&&this.handlers[t]!=null){for(i=this.handlers[t],r=[],n=0,o=i.length;n<o;n++)f=i[n],r.push(f.apply(null,u));return r}},n}();n.commas=function(n){var r,t,i,u;return n!=null?(i=n<0?"-":"",r=Math.abs(n),t=Math.floor(r).toFixed(0),i+=t.replace(/(?=(?:\d{3})+$)(?!^)/g,","),u=r.toString(),u.length>t.length&&(i+=u.slice(t.length)),i):"-"};n.pad2=function(n){return(n<10?"0":"")+n};n.Grid=function(r){function u(n){this.resizeHandler=i(this.resizeHandler,this);var r=this;if(this.el=typeof n.element=="string"?t(document.getElementById(n.element)):t(n.element),this.el==null||this.el.length===0)throw new Error("Graph container element not found");this.el.css("position")==="static"&&this.el.css("position","relative");this.options=t.extend({},this.gridDefaults,this.defaults||{},n);typeof this.options.units=="string"&&(this.options.postUnits=n.units);this.raphael=new Raphael(this.el[0]);this.elementWidth=null;this.elementHeight=null;this.dirty=!1;this.selectFrom=null;this.init&&this.init();this.setData(this.options.data);this.el.bind("mousemove",function(n){var i,u,f,e,t;return u=r.el.offset(),t=n.pageX-u.left,r.selectFrom?(i=r.data[r.hitTest(Math.min(t,r.selectFrom))]._x,f=r.data[r.hitTest(Math.max(t,r.selectFrom))]._x,e=f-i,r.selectionRect.attr({x:i,width:e})):r.fire("hovermove",t,n.pageY-u.top)});this.el.bind("mouseleave",function(){return r.selectFrom&&(r.selectionRect.hide(),r.selectFrom=null),r.fire("hoverout")});this.el.bind("touchstart touchmove touchend",function(n){var t,i;return i=n.originalEvent.touches[0]||n.originalEvent.changedTouches[0],t=r.el.offset(),r.fire("hovermove",i.pageX-t.left,i.pageY-t.top)});this.el.bind("click",function(n){var t;return t=r.el.offset(),r.fire("gridclick",n.pageX-t.left,n.pageY-t.top)});this.options.rangeSelect&&(this.selectionRect=this.raphael.rect(0,0,0,this.el.innerHeight()).attr({fill:this.options.rangeSelectColor,stroke:!1}).toBack().hide(),this.el.bind("mousedown",function(n){var t;return t=r.el.offset(),r.startRange(n.pageX-t.left)}),this.el.bind("mouseup",function(n){var t;return t=r.el.offset(),r.endRange(n.pageX-t.left),r.fire("hovermove",n.pageX-t.left,n.pageY-t.top)}));this.options.resize&&t(window).bind("resize",function(){return r.timeoutId!=null&&window.clearTimeout(r.timeoutId),r.timeoutId=window.setTimeout(r.resizeHandler,100)});this.el.css("-webkit-tap-highlight-color","rgba(0,0,0,0)");this.postInit&&this.postInit()}return f(u,r),u.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,gridTextFamily:"sans-serif",gridTextWeight:"normal",hideHover:!1,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"],rangeSelect:null,rangeSelectColor:"#eef",resize:!1},u.prototype.setData=function(t,i){var w,c,s,l,a,r,h,v,o,y,b,f,e,u,p;if(i==null&&(i=!0),this.options.data=t,t==null||t.length===0){this.data=[];this.raphael.clear();this.hover!=null&&this.hover.hide();return}return f=this.cumulative?0:null,e=this.cumulative?0:null,this.options.goals.length>0&&(a=Math.min.apply(Math,this.options.goals),l=Math.max.apply(Math,this.options.goals),e=e!=null?Math.min(e,a):a,f=f!=null?Math.max(f,l):l),this.data=function(){var i,a,l;for(l=[],s=i=0,a=t.length;i<a;s=++i)h=t[s],r={src:h},r.label=h[this.options.xkey],this.options.parseTime?(r.x=n.parseDate(r.label),this.options.dateFormat?r.label=this.options.dateFormat(r.x):typeof r.label=="number"&&(r.label=new Date(r.label).toString())):(r.x=s,this.options.xLabelFormat&&(r.label=this.options.xLabelFormat(r))),o=0,r.y=function(){var n,r,t,i;for(t=this.options.ykeys,i=[],c=n=0,r=t.length;n<r;c=++n)b=t[c],u=h[b],typeof u=="string"&&(u=parseFloat(u)),u!=null&&typeof u!="number"&&(u=null),u!=null&&(this.cumulative?o+=u:f!=null?(f=Math.max(u,f),e=Math.min(u,e)):f=e=u),this.cumulative&&o!=null&&(f=Math.max(o,f),e=Math.min(o,e)),i.push(u);return i}.call(this),l.push(r);return l}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(n,t){return(n.x>t.x)-(t.x>n.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.events.length>0&&(this.events=this.options.parseTime?function(){var t,u,i,r;for(i=this.options.events,r=[],t=0,u=i.length;t<u;t++)w=i[t],r.push(n.parseDate(w));return r}.call(this):this.options.events,this.xmax=Math.max(this.xmax,Math.max.apply(Math,this.events)),this.xmin=Math.min(this.xmin,Math.min.apply(Math,this.events))),this.xmin===this.xmax&&(this.xmin-=1,this.xmax+=1),this.ymin=this.yboundary("min",e),this.ymax=this.yboundary("max",f),this.ymin===this.ymax&&(e&&(this.ymin-=1),this.ymax+=1),((p=this.options.axes)===!0||p==="both"||p==="y"||this.options.grid===!0)&&(this.options.ymax===this.gridDefaults.ymax&&this.options.ymin===this.gridDefaults.ymin?(this.grid=this.autoGridLines(this.ymin,this.ymax,this.options.numLines),this.ymin=Math.min(this.ymin,this.grid[0]),this.ymax=Math.max(this.ymax,this.grid[this.grid.length-1])):(v=(this.ymax-this.ymin)/(this.options.numLines-1),this.grid=function(){var n,r,t,i;for(i=[],y=n=r=this.ymin,t=this.ymax;v>0?n<=t:n>=t;y=n+=v)i.push(y);return i}.call(this))),this.dirty=!0,i?this.redraw():void 0},u.prototype.yboundary=function(n,t){var i,r;return i=this.options["y"+n],typeof i=="string"?i.slice(0,4)==="auto"?i.length>5?(r=parseInt(i.slice(5),10),t==null)?r:Math[n](t,r):t!=null?t:0:parseInt(i,10):i},u.prototype.autoGridLines=function(n,t,i){var u,f,s,h,c,r,e,o,l;return c=t-n,l=Math.floor(Math.log(c)/Math.log(10)),e=Math.pow(10,l),f=Math.floor(n/e)*e,u=Math.ceil(t/e)*e,r=(u-f)/(i-1),e===1&&r>1&&Math.ceil(r)!==r&&(r=Math.ceil(r),u=f+r*(i-1)),f<0&&u>0&&(f=Math.floor(n/r)*r,u=Math.ceil(t/r)*r),r<1?(h=Math.floor(Math.log(r)/Math.log(10)),s=function(){var n,t;for(t=[],o=n=f;r>0?n<=u:n>=u;o=n+=r)t.push(parseFloat(o.toFixed(1-h)));return t}()):s=function(){var n,t;for(t=[],o=n=f;r>0?n<=u:n>=u;o=n+=r)t.push(o);return t}(),s},u.prototype._calc=function(){var f,e,n,t,i,o,r,u;return i=this.el.width(),n=this.el.height(),(this.elementWidth!==i||this.elementHeight!==n||this.dirty)&&(this.elementWidth=i,this.elementHeight=n,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,((r=this.options.axes)===!0||r==="both"||r==="y")&&(o=function(){var n,r,t,i;for(t=this.grid,i=[],n=0,r=t.length;n<r;n++)e=t[n],i.push(this.measureText(this.yAxisFormat(e)).width);return i}.call(this),this.left+=Math.max.apply(Math,o)),((u=this.options.axes)===!0||u==="both"||u==="x")&&(f=function(){var n,i,r;for(r=[],t=n=0,i=this.data.length;0<=i?n<i:n>i;t=0<=i?++n:--n)r.push(this.measureText(this.data[t].text,-this.options.xLabelAngle).height);return r}.call(this),this.bottom-=Math.max.apply(Math,f)),this.width=Math.max(1,this.right-this.left),this.height=Math.max(1,this.bottom-this.top),this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin),this.calc)?this.calc():void 0},u.prototype.transY=function(n){return this.bottom-(n-this.ymin)*this.dy},u.prototype.transX=function(n){return this.data.length===1?(this.left+this.right)/2:this.left+(n-this.xmin)*this.dx},u.prototype.redraw=function(){return this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents(),this.draw?this.draw():void 0},u.prototype.measureText=function(n,t){var r,i;return t==null&&(t=0),i=this.raphael.text(100,100,n).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).rotate(t),r=i.getBBox(),i.remove(),r},u.prototype.yAxisFormat=function(n){return this.yLabelFormat(n)},u.prototype.yLabelFormat=function(t){return typeof this.options.yLabelFormat=="function"?this.options.yLabelFormat(t):""+this.options.preUnits+n.commas(t)+this.options.postUnits},u.prototype.drawGrid=function(){var i,r,n,o,u,f,e,t;if(this.options.grid!==!1||(u=this.options.axes)===!0||u==="both"||u==="y"){for(f=this.grid,t=[],n=0,o=f.length;n<o;n++)i=f[n],r=this.transY(i),((e=this.options.axes)===!0||e==="both"||e==="y")&&this.drawYAxisLabel(this.left-this.options.padding/2,r,this.yAxisFormat(i)),this.options.grid?t.push(this.drawGridLine("M"+this.left+","+r+"H"+(this.left+this.width))):t.push(void 0);return t}},u.prototype.drawGoals=function(){var u,f,n,t,e,i,r;for(i=this.options.goals,r=[],n=t=0,e=i.length;t<e;n=++t)f=i[n],u=this.options.goalLineColors[n%this.options.goalLineColors.length],r.push(this.drawGoal(f,u));return r},u.prototype.drawEvents=function(){var u,f,n,t,e,i,r;for(i=this.events,r=[],n=t=0,e=i.length;t<e;n=++t)f=i[n],u=this.options.eventLineColors[n%this.options.eventLineColors.length],r.push(this.drawEvent(f,u));return r},u.prototype.drawGoal=function(n,t){return this.raphael.path("M"+this.left+","+this.transY(n)+"H"+this.right).attr("stroke",t).attr("stroke-width",this.options.goalStrokeWidth)},u.prototype.drawEvent=function(n,t){return this.raphael.path("M"+this.transX(n)+","+this.bottom+"V"+this.top).attr("stroke",t).attr("stroke-width",this.options.eventStrokeWidth)},u.prototype.drawYAxisLabel=function(n,t,i){return this.raphael.text(n,t,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor).attr("text-anchor","end")},u.prototype.drawGridLine=function(n){return this.raphael.path(n).attr("stroke",this.options.gridLineColor).attr("stroke-width",this.options.gridStrokeWidth)},u.prototype.startRange=function(n){return this.hover.hide(),this.selectFrom=n,this.selectionRect.attr({x:n,width:0}).show()},u.prototype.endRange=function(n){var t,i;if(this.selectFrom)return i=Math.min(this.selectFrom,n),t=Math.max(this.selectFrom,n),this.options.rangeSelect.call(this.el,{start:this.data[this.hitTest(i)].x,end:this.data[this.hitTest(t)].x}),this.selectFrom=null},u.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},u}(n.EventEmitter);n.parseDate=function(n){var e,o,c,s,u,r,h,i,t,f,l;return typeof n=="number"?n:(o=n.match(/^(\d+) Q(\d)$/),s=n.match(/^(\d+)-(\d+)$/),u=n.match(/^(\d+)-(\d+)-(\d+)$/),h=n.match(/^(\d+) W(\d+)$/),i=n.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/),t=n.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/),o?new Date(parseInt(o[1],10),parseInt(o[2],10)*3-1,1).getTime():s?new Date(parseInt(s[1],10),parseInt(s[2],10)-1,1).getTime():u?new Date(parseInt(u[1],10),parseInt(u[2],10)-1,parseInt(u[3],10)).getTime():h?(f=new Date(parseInt(h[1],10),0,1),f.getDay()!==4&&f.setMonth(0,1+(11-f.getDay())%7),f.getTime()+parseInt(h[2],10)*6048e5):i?i[6]?(r=0,i[6]!=="Z"&&(r=parseInt(i[8],10)*60+parseInt(i[9],10),i[7]==="+"&&(r=0-r)),Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)+r)):new Date(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)).getTime():t?(l=parseFloat(t[6]),e=Math.floor(l),c=Math.round((l-e)*1e3),t[8]?(r=0,t[8]!=="Z"&&(r=parseInt(t[10],10)*60+parseInt(t[11],10),t[9]==="+"&&(r=0-r)),Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10)+r,e,c)):new Date(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10),e,c).getTime()):new Date(parseInt(n,10),0,1).getTime())};n.Hover=function(){function i(i){i==null&&(i={});this.options=t.extend({},n.Hover.defaults,i);this.el=t("<div class='"+this.options["class"]+"'><\/div>");this.el.hide();this.options.parent.append(this.el)}return i.defaults={"class":"morris-hover morris-default-style"},i.prototype.update=function(n,t,i){return n?(this.html(n),this.show(),this.moveTo(t,i)):this.hide()},i.prototype.html=function(n){return this.el.html(n)},i.prototype.moveTo=function(n,t){var r,f,e,u,o,i;return o=this.options.parent.innerWidth(),u=this.options.parent.innerHeight(),f=this.el.outerWidth(),r=this.el.outerHeight(),e=Math.min(Math.max(0,n-f/2),o-f),t!=null?(i=t-r-10,i<0&&(i=t+10,i+r>u&&(i=u/2-r/2))):i=u/2-r/2,this.el.css({left:e+"px",top:parseInt(i)+"px"})},i.prototype.show=function(){return this.el.show()},i.prototype.hide=function(){return this.el.hide()},i}();n.Line=function(t){function r(t){if(this.hilight=i(this.hilight,this),this.onHoverOut=i(this.onHoverOut,this),this.onHoverMove=i(this.onHoverMove,this),this.onGridClick=i(this.onGridClick,this),!(this instanceof n.Line))return new n.Line(t);r.__super__.constructor.call(this,t)}return f(r,t),r.prototype.init=function(){if(this.options.hideHover!=="always"){this.hover=new n.Hover({parent:this.el});this.on("hovermove",this.onHoverMove);this.on("hoverout",this.onHoverOut);return this.on("gridclick",this.onGridClick)}},r.prototype.defaults={lineWidth:3,pointSize:4,lineColors:["#0b62a4","#7A92A3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],pointStrokeWidths:[1],pointStrokeColors:["#ffffff"],pointFillColors:[],smooth:!0,xLabels:"auto",xLabelFormat:null,xLabelMargin:24,hideHover:!1},r.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},r.prototype.calcPoints=function(){var n,t,i,f,r,u;for(r=this.data,u=[],i=0,f=r.length;i<f;i++)n=r[i],n._x=this.transX(n.x),n._y=function(){var i,f,u,r;for(u=n.y,r=[],i=0,f=u.length;i<f;i++)t=u[i],t!=null?r.push(this.transY(t)):r.push(t);return r}.call(this),u.push(n._ymax=Math.min.apply(Math,[this.bottom].concat(function(){var i,f,r,u;for(r=n._y,u=[],i=0,f=r.length;i<f;i++)t=r[i],t!=null&&u.push(t);return u}())));return u},r.prototype.hitTest=function(n){var t,u,i,f,r;if(this.data.length===0)return null;for(r=this.data.slice(1),t=i=0,f=r.length;i<f;t=++i)if(u=r[t],n<(u._x+this.data[t]._x)/2)break;return t},r.prototype.onGridClick=function(n,t){var i;return i=this.hitTest(n),this.fire("click",i,this.data[i].src,n,t)},r.prototype.onHoverMove=function(n){var t;return t=this.hitTest(n),this.displayHoverForRow(t)},r.prototype.onHoverOut=function(){if(this.options.hideHover!==!1)return this.displayHoverForRow(null)},r.prototype.displayHoverForRow=function(n){var t;return n!=null?((t=this.hover).update.apply(t,this.hoverContentForRow(n)),this.hilight(n)):(this.hover.hide(),this.hilight())},r.prototype.hoverContentForRow=function(n){var i,r,t,e,u,o,f;for(t=this.data[n],i="<div class='morris-hover-row-label'>"+t.label+"<\/div>",f=t.y,r=u=0,o=f.length;u<o;r=++u)e=f[r],i+="<div class='morris-hover-point' style='color: "+this.colorFor(t,r,"label")+"'>\n  "+this.options.labels[r]+":\n  "+this.yLabelFormat(e)+"\n<\/div>";return typeof this.options.hoverCallback=="function"&&(i=this.options.hoverCallback(n,this.options,i,t.src)),[i,t._x,t._ymax]},r.prototype.generatePaths=function(){var r,t,i,u;return this.paths=function(){var f,e,h,o;for(o=[],t=f=0,e=this.options.ykeys.length;0<=e?f<e:f>e;t=0<=e?++f:--f)u=typeof this.options.smooth=="boolean"?this.options.smooth:(h=this.options.ykeys[t],s.call(this.options.smooth,h)>=0),r=function(){var n,f,r,u;for(r=this.data,u=[],n=0,f=r.length;n<f;n++)i=r[n],i._y[t]!==void 0&&u.push({x:i._x,y:i._y[t]});return u}.call(this),r.length>1?o.push(n.Line.createPath(r,u,this.bottom)):o.push(null);return o}.call(this)},r.prototype.draw=function(){var n;return((n=this.options.axes)===!0||n==="both"||n==="x")&&this.drawXAxis(),this.drawSeries(),this.options.hideHover===!1?this.displayHoverForRow(this.data.length-1):void 0},r.prototype.drawXAxis=function(){var h,e,i,r,u,o,c,f,l,s,t=this;for(c=this.bottom+this.options.padding/2,u=null,r=null,h=function(n,i){var e,f,o,s,h;return e=t.drawXAxisLabel(t.transX(i),c,n),h=e.getBBox(),e.transform("r"+-t.options.xLabelAngle),f=e.getBBox(),e.transform("t0,"+f.height/2+"..."),t.options.xLabelAngle!==0&&(s=-.5*h.width*Math.cos(t.options.xLabelAngle*Math.PI/180),e.transform("t"+s+",0...")),f=e.getBBox(),(u==null||u>=f.x+f.width||r!=null&&r>=f.x)&&f.x>=0&&f.x+f.width<t.el.width()?(t.options.xLabelAngle!==0&&(o=1.25*t.options.gridTextSize/Math.sin(t.options.xLabelAngle*Math.PI/180),r=f.x-o),u=f.x-t.options.xLabelMargin):e.remove()},i=this.options.parseTime?this.data.length===1&&this.options.xLabels==="auto"?[[this.data[0].label,this.data[0].x]]:n.labelSeries(this.xmin,this.xmax,this.width,this.options.xLabels,this.options.xLabelFormat):function(){var n,r,t,i;for(t=this.data,i=[],n=0,r=t.length;n<r;n++)o=t[n],i.push([o.label,o.x]);return i}.call(this),i.reverse(),s=[],f=0,l=i.length;f<l;f++)e=i[f],s.push(h(e[0],e[1]));return s},r.prototype.drawSeries=function(){var n,t,i,r,u,f;for(this.seriesPoints=[],n=t=r=this.options.ykeys.length-1;r<=0?t<=0:t>=0;n=r<=0?++t:--t)this._drawLineFor(n);for(f=[],n=i=u=this.options.ykeys.length-1;u<=0?i<=0:i>=0;n=u<=0?++i:--i)f.push(this._drawPointFor(n));return f},r.prototype._drawPointFor=function(n){var r,t,i,e,u,f;for(this.seriesPoints[n]=[],u=this.data,f=[],i=0,e=u.length;i<e;i++)t=u[i],r=null,t._y[n]!=null&&(r=this.drawLinePoint(t._x,t._y[n],this.colorFor(t,n,"point"),n)),f.push(this.seriesPoints[n].push(r));return f},r.prototype._drawLineFor=function(n){var t;return t=this.paths[n],t!==null?this.drawLinePath(t,this.colorFor(null,n,"line"),n):void 0},r.createPath=function(t,i,r){var u,l,h,f,o,a,s,e,v,y,p,w,c,b;for(s="",i&&(h=n.Line.gradients(t)),e={y:null},f=c=0,b=t.length;c<b;f=++c)u=t[f],u.y!=null&&(e.y!=null?i?(l=h[f],a=h[f-1],o=(u.x-e.x)/4,v=e.x+o,p=Math.min(r,e.y+o*a),y=u.x-o,w=Math.min(r,u.y-o*l),s+="C"+v+","+p+","+y+","+w+","+u.x+","+u.y):s+="L"+u.x+","+u.y:i&&h[f]==null||(s+="M"+u.x+","+u.y)),e=u;return s},r.gradients=function(n){var f,e,i,r,u,o,s,t;for(e=function(n,t){return(n.y-t.y)/(n.x-t.x)},t=[],i=o=0,s=n.length;o<s;i=++o)f=n[i],f.y!=null?(r=n[i+1]||{y:null},u=n[i-1]||{y:null},u.y!=null&&r.y!=null?t.push(e(u,r)):u.y!=null?t.push(e(u,f)):r.y!=null?t.push(e(f,r)):t.push(null)):t.push(null);return t},r.prototype.hilight=function(n){var t,i,r,u,f;if(this.prevHilight!==null&&this.prevHilight!==n)for(t=i=0,u=this.seriesPoints.length-1;0<=u?i<=u:i>=u;t=0<=u?++i:--i)this.seriesPoints[t][this.prevHilight]&&this.seriesPoints[t][this.prevHilight].animate(this.pointShrinkSeries(t));if(n!==null&&this.prevHilight!==n)for(t=r=0,f=this.seriesPoints.length-1;0<=f?r<=f:r>=f;t=0<=f?++r:--r)this.seriesPoints[t][n]&&this.seriesPoints[t][n].animate(this.pointGrowSeries(t));return this.prevHilight=n},r.prototype.colorFor=function(n,t,i){return typeof this.options.lineColors=="function"?this.options.lineColors.call(this,n,t,i):i==="point"?this.options.pointFillColors[t%this.options.pointFillColors.length]||this.options.lineColors[t%this.options.lineColors.length]:this.options.lineColors[t%this.options.lineColors.length]},r.prototype.drawXAxisLabel=function(n,t,i){return this.raphael.text(n,t,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},r.prototype.drawLinePath=function(n,t,i){return this.raphael.path(n).attr("stroke",t).attr("stroke-width",this.lineWidthForSeries(i))},r.prototype.drawLinePoint=function(n,t,i,r){return this.raphael.circle(n,t,this.pointSizeForSeries(r)).attr("fill",i).attr("stroke-width",this.pointStrokeWidthForSeries(r)).attr("stroke",this.pointStrokeColorForSeries(r))},r.prototype.pointStrokeWidthForSeries=function(n){return this.options.pointStrokeWidths[n%this.options.pointStrokeWidths.length]},r.prototype.pointStrokeColorForSeries=function(n){return this.options.pointStrokeColors[n%this.options.pointStrokeColors.length]},r.prototype.lineWidthForSeries=function(n){return this.options.lineWidth instanceof Array?this.options.lineWidth[n%this.options.lineWidth.length]:this.options.lineWidth},r.prototype.pointSizeForSeries=function(n){return this.options.pointSize instanceof Array?this.options.pointSize[n%this.options.pointSize.length]:this.options.pointSize},r.prototype.pointGrowSeries=function(n){return Raphael.animation({r:this.pointSizeForSeries(n)+3},25,"linear")},r.prototype.pointShrinkSeries=function(n){return Raphael.animation({r:this.pointSizeForSeries(n)},25,"linear")},r}(n.Grid);n.labelSeries=function(i,r,u,f,e){var s,y,p,w,c,l,o,a,h,b,v;if(p=200*(r-i)/u,y=new Date(i),o=n.LABEL_SPECS[f],o===void 0)for(v=n.AUTO_LABEL_ORDER,h=0,b=v.length;h<b;h++)if(w=v[h],l=n.LABEL_SPECS[w],p>=l.span){o=l;break}for(o===void 0&&(o=n.LABEL_SPECS.second),e&&(o=t.extend({},o,{fmt:e})),s=o.start(y),c=[];(a=s.getTime())<=r;)a>=i&&c.push([o.fmt(s),a]),o.incr(s);return c};r=function(t){return{span:t*6e4,start:function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours())},fmt:function(t){return""+n.pad2(t.getHours())+":"+n.pad2(t.getMinutes())},incr:function(n){return n.setUTCMinutes(n.getUTCMinutes()+t)}}};u=function(t){return{span:t*1e3,start:function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes())},fmt:function(t){return""+n.pad2(t.getHours())+":"+n.pad2(t.getMinutes())+":"+n.pad2(t.getSeconds())},incr:function(n){return n.setUTCSeconds(n.getUTCSeconds()+t)}}};n.LABEL_SPECS={decade:{span:1728e8,start:function(n){return new Date(n.getFullYear()-n.getFullYear()%10,0,1)},fmt:function(n){return""+n.getFullYear()},incr:function(n){return n.setFullYear(n.getFullYear()+10)}},year:{span:1728e7,start:function(n){return new Date(n.getFullYear(),0,1)},fmt:function(n){return""+n.getFullYear()},incr:function(n){return n.setFullYear(n.getFullYear()+1)}},month:{span:24192e5,start:function(n){return new Date(n.getFullYear(),n.getMonth(),1)},fmt:function(t){return""+t.getFullYear()+"-"+n.pad2(t.getMonth()+1)},incr:function(n){return n.setMonth(n.getMonth()+1)}},week:{span:6048e5,start:function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate())},fmt:function(t){return""+t.getFullYear()+"-"+n.pad2(t.getMonth()+1)+"-"+n.pad2(t.getDate())},incr:function(n){return n.setDate(n.getDate()+7)}},day:{span:864e5,start:function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate())},fmt:function(t){return""+t.getFullYear()+"-"+n.pad2(t.getMonth()+1)+"-"+n.pad2(t.getDate())},incr:function(n){return n.setDate(n.getDate()+1)}},hour:r(60),"30min":r(30),"15min":r(15),"10min":r(10),"5min":r(5),minute:r(1),"30sec":u(30),"15sec":u(15),"10sec":u(10),"5sec":u(5),second:u(1)};n.AUTO_LABEL_ORDER=["decade","year","month","week","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"];n.Area=function(i){function r(i){var f;if(!(this instanceof n.Area))return new n.Area(i);f=t.extend({},u,i);this.cumulative=!f.behaveLikeLine;f.fillOpacity==="auto"&&(f.fillOpacity=f.behaveLikeLine?.8:1);r.__super__.constructor.call(this,f)}var u;return f(r,i),u={fillOpacity:"auto",behaveLikeLine:!1},r.prototype.calcPoints=function(){var n,i,r,t,e,u,f;for(u=this.data,f=[],t=0,e=u.length;t<e;t++)n=u[t],n._x=this.transX(n.x),i=0,n._y=function(){var t,e,f,u;for(f=n.y,u=[],t=0,e=f.length;t<e;t++)r=f[t],this.options.behaveLikeLine?u.push(this.transY(r)):(i+=r||0,u.push(this.transY(i)));return u}.call(this),f.push(n._ymax=Math.max.apply(Math,n._y));return f},r.prototype.drawSeries=function(){var n,i,t,o,r,u,f,e;for(this.seriesPoints=[],i=this.options.behaveLikeLine?function(){u=[];for(var n=0,t=this.options.ykeys.length-1;0<=t?n<=t:n>=t;0<=t?n++:n--)u.push(n);return u}.apply(this):function(){f=[];for(var n=r=this.options.ykeys.length-1;r<=0?n<=0:n>=0;r<=0?n++:n--)f.push(n);return f}.apply(this),e=[],t=0,o=i.length;t<o;t++)n=i[t],this._drawFillFor(n),this._drawLineFor(n),e.push(this._drawPointFor(n));return e},r.prototype._drawFillFor=function(n){var t;return t=this.paths[n],t!==null?(t=t+("L"+this.transX(this.xmax)+","+this.bottom+"L"+this.transX(this.xmin)+","+this.bottom+"Z"),this.drawFilledPath(t,this.fillForSeries(n))):void 0},r.prototype.fillForSeries=function(n){var t;return t=Raphael.rgb2hsl(this.colorFor(this.data[n],n,"line")),Raphael.hsl(t.h,this.options.behaveLikeLine?t.s*.9:t.s*.75,Math.min(.98,this.options.behaveLikeLine?t.l*1.2:t.l*1.25))},r.prototype.drawFilledPath=function(n,t){return this.raphael.path(n).attr("fill",t).attr("fill-opacity",this.options.fillOpacity).attr("stroke","none")},r}(n.Line);n.Bar=function(r){function u(r){if(this.onHoverOut=i(this.onHoverOut,this),this.onHoverMove=i(this.onHoverMove,this),this.onGridClick=i(this.onGridClick,this),!(this instanceof n.Bar))return new n.Bar(r);u.__super__.constructor.call(this,t.extend({},r,{parseTime:!1}))}return f(u,r),u.prototype.init=function(){if(this.cumulative=this.options.stacked,this.options.hideHover!=="always"){this.hover=new n.Hover({parent:this.el});this.on("hovermove",this.onHoverMove);this.on("hoverout",this.onHoverOut);return this.on("gridclick",this.onGridClick)}},u.prototype.defaults={barSizeRatio:.75,barGap:3,barColors:["#0b62a4","#7a92a3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],barOpacity:1,barRadius:[0,0,0,0],xLabelMargin:50},u.prototype.calc=function(){var n;return this.calcBars(),this.options.hideHover===!1?(n=this.hover).update.apply(n,this.hoverContentForRow(this.data.length-1)):void 0},u.prototype.calcBars=function(){var n,t,i,r,e,u,f;for(u=this.data,f=[],n=r=0,e=u.length;r<e;n=++r)t=u[n],t._x=this.left+this.width*(n+.5)/this.data.length,f.push(t._y=function(){var n,f,u,r;for(u=t.y,r=[],n=0,f=u.length;n<f;n++)i=u[n],i!=null?r.push(this.transY(i)):r.push(null);return r}.call(this));return f},u.prototype.draw=function(){var n;return((n=this.options.axes)===!0||n==="both"||n==="x")&&this.drawXAxis(),this.drawSeries()},u.prototype.drawXAxis=function(){var o,t,n,h,c,u,f,s,l,a,i,r,e;for(a=this.bottom+(this.options.xAxisLabelTopPadding||this.options.padding/2),f=null,u=null,e=[],o=i=0,r=this.data.length;0<=r?i<r:i>r;o=0<=r?++i:--i)s=this.data[this.data.length-1-o],t=this.drawXAxisLabel(s._x,a,s.label),l=t.getBBox(),t.transform("r"+-this.options.xLabelAngle),n=t.getBBox(),t.transform("t0,"+n.height/2+"..."),this.options.xLabelAngle!==0&&(c=-.5*l.width*Math.cos(this.options.xLabelAngle*Math.PI/180),t.transform("t"+c+",0...")),(f==null||f>=n.x+n.width||u!=null&&u>=n.x)&&n.x>=0&&n.x+n.width<this.el.width()?(this.options.xLabelAngle!==0&&(h=1.25*this.options.gridTextSize/Math.sin(this.options.xLabelAngle*Math.PI/180),u=n.x-h),e.push(f=n.x-this.options.xLabelMargin)):e.push(t.remove());return e},u.prototype.drawSeries=function(){var n,h,t,i,c,l,v,r,o,u,a,y,f,e,s;return t=this.width/this.options.data.length,r=this.options.stacked?1:this.options.ykeys.length,n=(t*this.options.barSizeRatio-this.options.barGap*(r-1))/r,this.options.barSize&&(n=Math.min(n,this.options.barSize)),y=t-n*r-this.options.barGap*(r-1),v=y/2,s=this.ymin<=0&&this.ymax>=0?this.transY(0):null,this.bars=function(){var r,w,y,p;for(y=this.data,p=[],i=r=0,w=y.length;r<w;i=++r)o=y[i],c=0,p.push(function(){var y,w,p,r;for(p=o._y,r=[],u=y=0,w=p.length;y<w;u=++y)e=p[u],e!==null?(s?(f=Math.min(e,s),h=Math.max(e,s)):(f=e,h=this.bottom),l=this.left+i*t+v,this.options.stacked||(l+=u*(n+this.options.barGap)),a=h-f,this.options.verticalGridCondition&&this.options.verticalGridCondition(o.x)&&this.drawBar(this.left+i*t,this.top,t,Math.abs(this.top-this.bottom),this.options.verticalGridColor,this.options.verticalGridOpacity,this.options.barRadius),this.options.stacked&&(f-=c),this.drawBar(l,f,n,a,this.colorFor(o,u,"bar"),this.options.barOpacity,this.options.barRadius),r.push(c+=a)):r.push(null);return r}.call(this));return p}.call(this)},u.prototype.colorFor=function(n,t,i){var r,u;return typeof this.options.barColors=="function"?(r={x:n.x,y:n.y[t],label:n.label},u={index:t,key:this.options.ykeys[t],label:this.options.labels[t]},this.options.barColors.call(this,r,u,i)):this.options.barColors[t%this.options.barColors.length]},u.prototype.hitTest=function(n){return this.data.length===0?null:(n=Math.max(Math.min(n,this.right),this.left),Math.min(this.data.length-1,Math.floor((n-this.left)/(this.width/this.data.length))))},u.prototype.onGridClick=function(n,t){var i;return i=this.hitTest(n),this.fire("click",i,this.data[i].src,n,t)},u.prototype.onHoverMove=function(n){var t,i;return t=this.hitTest(n),(i=this.hover).update.apply(i,this.hoverContentForRow(t))},u.prototype.onHoverOut=function(){if(this.options.hideHover!==!1)return this.hover.hide()},u.prototype.hoverContentForRow=function(n){var t,i,r,e,o,u,s,f;for(r=this.data[n],t="<div class='morris-hover-row-label'>"+r.label+"<\/div>",f=r.y,i=u=0,s=f.length;u<s;i=++u)o=f[i],t+="<div class='morris-hover-point' style='color: "+this.colorFor(r,i,"label")+"'>\n  "+this.options.labels[i]+":\n  "+this.yLabelFormat(o)+"\n<\/div>";return typeof this.options.hoverCallback=="function"&&(t=this.options.hoverCallback(n,this.options,t,r.src)),e=this.left+(n+.5)*this.width/this.data.length,[t,e]},u.prototype.drawXAxisLabel=function(n,t,i){return this.raphael.text(n,t,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},u.prototype.drawBar=function(n,t,i,r,u,f,e){var o,s;return o=Math.max.apply(Math,e),s=o===0||o>r?this.raphael.rect(n,t,i,r):this.raphael.path(this.roundedRect(n,t,i,r,e)),s.attr("fill",u).attr("fill-opacity",f).attr("stroke","none")},u.prototype.roundedRect=function(n,t,i,r,u){return u==null&&(u=[0,0,0,0]),["M",n,u[0]+t,"Q",n,t,n+u[0],t,"L",n+i-u[1],t,"Q",n+i,t,n+i,t+u[1],"L",n+i,t+r-u[2],"Q",n+i,t+r,n+i-u[2],t+r,"L",n+u[3],t+r,"Q",n,t+r,n,t+r-u[3],"Z"]},u}(n.Grid);n.Donut=function(r){function u(r){this.resizeHandler=i(this.resizeHandler,this);this.select=i(this.select,this);this.click=i(this.click,this);var u=this;if(!(this instanceof n.Donut))return new n.Donut(r);if(this.options=t.extend({},this.defaults,r),this.el=typeof r.element=="string"?t(document.getElementById(r.element)):t(r.element),this.el===null||this.el.length===0)throw new Error("Graph placeholder not found.");r.data!==void 0&&r.data.length!==0&&(this.raphael=new Raphael(this.el[0]),this.options.resize&&t(window).bind("resize",function(){return u.timeoutId!=null&&window.clearTimeout(u.timeoutId),u.timeoutId=window.setTimeout(u.resizeHandler,100)}),this.setData(r.data))}return f(u,r),u.prototype.defaults={colors:["#0B62A4","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],backgroundColor:"#FFFFFF",labelColor:"#000000",formatter:n.commas,resize:!1},u.prototype.redraw=function(){var d,r,u,e,t,o,g,l,a,f,v,i,s,h,y,c,nt,tt,it,p,w,b,k;for(this.raphael.clear(),r=this.el.width()/2,u=this.el.height()/2,s=(Math.min(r,u)-10)/3,v=0,p=this.values,h=0,nt=p.length;h<nt;h++)i=p[h],v+=i;for(l=5/(2*s),d=1.9999*Math.PI-l*this.data.length,o=0,t=0,this.segments=[],w=this.values,e=y=0,tt=w.length;y<tt;e=++y){i=w[e];a=o+l+d*(i/v);f=new n.DonutSegment(r,u,s*2,s,o,a,this.data[e].color||this.options.colors[t%this.options.colors.length],this.options.backgroundColor,t,this.raphael);f.render();this.segments.push(f);f.on("hover",this.select);f.on("click",this.click);o=a;t+=1}for(this.text1=this.drawEmptyDonutLabel(r,u-10,this.options.labelColor,15,800),this.text2=this.drawEmptyDonutLabel(r,u+10,this.options.labelColor,14),g=Math.max.apply(Math,this.values),t=0,b=this.values,k=[],c=0,it=b.length;c<it;c++){if(i=b[c],i===g){this.select(t);break}k.push(t+=1)}return k},u.prototype.setData=function(n){var t;return this.data=n,this.values=function(){var n,u,i,r;for(i=this.data,r=[],n=0,u=i.length;n<u;n++)t=i[n],r.push(parseFloat(t.value));return r}.call(this),this.redraw()},u.prototype.click=function(n){return this.fire("click",n,this.data[n])},u.prototype.select=function(n){var t,u,f,i,e,r;for(r=this.segments,i=0,e=r.length;i<e;i++)u=r[i],u.deselect();return f=this.segments[n],f.select(),t=this.data[n],this.setLabels(t.label,this.options.formatter(t.value,t))},u.prototype.setLabels=function(n,t){var u,s,h,f,i,e,r,o;return u=(Math.min(this.el.width()/2,this.el.height()/2)-10)*2/3,f=1.8*u,h=u/2,s=u/3,this.text1.attr({text:n,transform:""}),i=this.text1.getBBox(),e=Math.min(f/i.width,h/i.height),this.text1.attr({transform:"S"+e+","+e+","+(i.x+i.width/2)+","+(i.y+i.height)}),this.text2.attr({text:t,transform:""}),r=this.text2.getBBox(),o=Math.min(f/r.width,s/r.height),this.text2.attr({transform:"S"+o+","+o+","+(r.x+r.width/2)+","+r.y})},u.prototype.drawEmptyDonutLabel=function(n,t,i,r,u){var f;return f=this.raphael.text(n,t,"").attr("font-size",r).attr("fill",i),u!=null&&f.attr("font-weight",u),f},u.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},u}(n.EventEmitter);n.DonutSegment=function(n){function t(n,t,r,u,f,e,o,s,h,c){this.cx=n;this.cy=t;this.inner=r;this.outer=u;this.color=o;this.backgroundColor=s;this.index=h;this.raphael=c;this.deselect=i(this.deselect,this);this.select=i(this.select,this);this.sin_p0=Math.sin(f);this.cos_p0=Math.cos(f);this.sin_p1=Math.sin(e);this.cos_p1=Math.cos(e);this.is_long=e-f>Math.PI?1:0;this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5);this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer);this.hilight=this.calcArc(this.inner)}return f(t,n),t.prototype.calcArcPoints=function(n){return[this.cx+n*this.sin_p0,this.cy+n*this.cos_p0,this.cx+n*this.sin_p1,this.cy+n*this.cos_p1]},t.prototype.calcSegment=function(n,t){var u,f,e,o,s,h,c,l,i,r;return i=this.calcArcPoints(n),u=i[0],e=i[1],f=i[2],o=i[3],r=this.calcArcPoints(t),s=r[0],c=r[1],h=r[2],l=r[3],"M"+u+","+e+("A"+n+","+n+",0,"+this.is_long+",0,"+f+","+o)+("L"+h+","+l)+("A"+t+","+t+",0,"+this.is_long+",1,"+s+","+c)+"Z"},t.prototype.calcArc=function(n){var i,r,u,f,t;return t=this.calcArcPoints(n),i=t[0],u=t[1],r=t[2],f=t[3],"M"+i+","+u+("A"+n+","+n+",0,"+this.is_long+",0,"+r+","+f)},t.prototype.render=function(){var n=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return n.fire("hover",n.index)},function(){return n.fire("click",n.index)})},t.prototype.drawDonutArc=function(n,t){return this.raphael.path(n).attr({stroke:t,"stroke-width":2,opacity:0})},t.prototype.drawDonutSegment=function(n,t,i,r,u){return this.raphael.path(n).attr({fill:t,stroke:i,"stroke-width":3}).hover(r).click(u)},t.prototype.select=function(){if(!this.selected)return this.seg.animate({path:this.selectedPath},150,"<>"),this.arc.animate({opacity:1},150,"<>"),this.selected=!0},t.prototype.deselect=function(){if(this.selected)return this.seg.animate({path:this.path},150,"<>"),this.arc.animate({opacity:0},150,"<>"),this.selected=!1},t}(n.EventEmitter)}).call(this);
/*!
 * Chart.js
 * http://chartjs.org/
 * Version: 2.6.0
 *
 * Copyright 2017 Nick Downie
 * Released under the MIT license
 * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
 */
(function(n){if(typeof exports=="object"&&typeof module!="undefined")module.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var t;t=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this;t.Chart=n()}})(function(){var n;return function t(n,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!n[f]){if(h=typeof require=="function"&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};n[f][0].call(s.exports,function(t){var i=n[f][1][t];return u(i?i:t)},s,s.exports,t,n,i,r)}return i[f].exports}for(var e=typeof require=="function"&&require,f=0;f<r.length;f++)u(r[f]);return u}({1:[function(n,t){function u(n){var t;if(n){var f=[0,0,0],e=1,u=n.match(/^#([a-fA-F0-9]{3})$/);if(u)for(u=u[1],t=0;t<f.length;t++)f[t]=parseInt(u[t]+u[t],16);else if(u=n.match(/^#([a-fA-F0-9]{6})$/))for(u=u[1],t=0;t<f.length;t++)f[t]=parseInt(u.slice(t*2,t*2+2),16);else if(u=n.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(t=0;t<f.length;t++)f[t]=parseInt(u[t+1]);e=parseFloat(u[4])}else if(u=n.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(t=0;t<f.length;t++)f[t]=Math.round(parseFloat(u[t+1])*2.55);e=parseFloat(u[4])}else if(u=n.match(/(\w+)/)){if(u[1]=="transparent")return[0,0,0,0];if(f=r[u[1]],!f)return}for(t=0;t<f.length;t++)f[t]=i(f[t],0,255);return e=e||e==0?i(e,0,1):1,f[3]=e,f}}function f(n){var r,t;if(n&&(r=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,t=n.match(r),t)){var u=parseFloat(t[4]),f=i(parseInt(t[1]),0,360),e=i(parseFloat(t[2]),0,100),o=i(parseFloat(t[3]),0,100),s=i(isNaN(u)?1:u,0,1);return[f,e,o,s]}}function h(n){var r,t;if(n&&(r=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,t=n.match(r),t)){var u=parseFloat(t[4]),f=i(parseInt(t[1]),0,360),e=i(parseFloat(t[2]),0,100),o=i(parseFloat(t[3]),0,100),s=i(isNaN(u)?1:u,0,1);return[f,e,o,s]}}function v(n){var t=u(n);return t&&t.slice(0,3)}function y(n){var t=f(n);return t&&t.slice(0,3)}function p(n){var t=u(n);return t?t[3]:(t=f(n))||(t=h(n))?t[3]:void 0}function w(n){return"#"+e(n[0])+e(n[1])+e(n[2])}function b(n,t){return t<1||n[3]&&n[3]<1?c(n,t):"rgb("+n[0]+", "+n[1]+", "+n[2]+")"}function c(n,t){return t===undefined&&(t=n[3]!==undefined?n[3]:1),"rgba("+n[0]+", "+n[1]+", "+n[2]+", "+t+")"}function k(n,t){if(t<1||n[3]&&n[3]<1)return l(n,t);var i=Math.round(n[0]/255*100),r=Math.round(n[1]/255*100),u=Math.round(n[2]/255*100);return"rgb("+i+"%, "+r+"%, "+u+"%)"}function l(n,t){var i=Math.round(n[0]/255*100),r=Math.round(n[1]/255*100),u=Math.round(n[2]/255*100);return"rgba("+i+"%, "+r+"%, "+u+"%, "+(t||n[3]||1)+")"}function d(n,t){return t<1||n[3]&&n[3]<1?a(n,t):"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)"}function a(n,t){return t===undefined&&(t=n[3]!==undefined?n[3]:1),"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+t+")"}function g(n,t){return t===undefined&&(t=n[3]!==undefined?n[3]:1),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+(t!==undefined&&t!==1?", "+t:"")+")"}function nt(n){return o[n.slice(0,3)]}function i(n,t,i){return Math.min(Math.max(t,n),i)}function e(n){var t=n.toString(16).toUpperCase();return t.length<2?"0"+t:t}var r=n(5),o,s;t.exports={getRgba:u,getHsla:f,getRgb:v,getHsl:y,getHwb:h,getAlpha:p,hexString:w,rgbString:b,rgbaString:c,percentString:k,percentaString:l,hslString:d,hslaString:a,hwbString:g,keyword:nt};o={};for(s in r)o[r[s]]=s},{"5":5}],2:[function(n,t){var u=n(4),r=n(1),i=function(n){if(n instanceof i)return n;if(!(this instanceof i))return new i(n);this.valid=!1;this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var t;typeof n=="string"?(t=r.getRgba(n),t?this.setValues("rgb",t):(t=r.getHsla(n))?this.setValues("hsl",t):(t=r.getHwb(n))&&this.setValues("hwb",t)):typeof n=="object"&&(t=n,t.r!==undefined||t.red!==undefined?this.setValues("rgb",t):t.l!==undefined||t.lightness!==undefined?this.setValues("hsl",t):t.v!==undefined||t.value!==undefined?this.setValues("hsv",t):t.w!==undefined||t.whiteness!==undefined?this.setValues("hwb",t):(t.c!==undefined||t.cyan!==undefined)&&this.setValues("cmyk",t))};i.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 n=this.values;return n.alpha!==1?n.hwb.concat([n.alpha]):n.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var n=this.values;return n.rgb.concat([n.alpha])},hslaArray:function(){var n=this.values;return n.hsl.concat([n.alpha])},alpha:function(n){return n===undefined?this.values.alpha:(this.setValues("alpha",n),this)},red:function(n){return this.setChannel("rgb",0,n)},green:function(n){return this.setChannel("rgb",1,n)},blue:function(n){return this.setChannel("rgb",2,n)},hue:function(n){return n&&(n%=360,n=n<0?360+n:n),this.setChannel("hsl",0,n)},saturation:function(n){return this.setChannel("hsl",1,n)},lightness:function(n){return this.setChannel("hsl",2,n)},saturationv:function(n){return this.setChannel("hsv",1,n)},whiteness:function(n){return this.setChannel("hwb",1,n)},blackness:function(n){return this.setChannel("hwb",2,n)},value:function(n){return this.setChannel("hsv",2,n)},cyan:function(n){return this.setChannel("cmyk",0,n)},magenta:function(n){return this.setChannel("cmyk",1,n)},yellow:function(n){return this.setChannel("cmyk",2,n)},black:function(n){return this.setChannel("cmyk",3,n)},hexString:function(){return r.hexString(this.values.rgb)},rgbString:function(){return r.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return r.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return r.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return r.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return r.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return r.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return r.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var n=this.values.rgb;return n[0]<<16|n[1]<<8|n[2]},luminosity:function(){for(var i,r=this.values.rgb,n=[],t=0;t<r.length;t++)i=r[t]/255,n[t]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4);return.2126*n[0]+.7152*n[1]+.0722*n[2]},contrast:function(n){var t=this.luminosity(),i=n.luminosity();return t>i?(t+.05)/(i+.05):(i+.05)/(t+.05)},level:function(n){var t=this.contrast(n);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var n=this.values.rgb,t=(n[0]*299+n[1]*587+n[2]*114)/1e3;return t<128},light:function(){return!this.dark()},negate:function(){for(var t=[],n=0;n<3;n++)t[n]=255-this.values.rgb[n];return this.setValues("rgb",t),this},lighten:function(n){var t=this.values.hsl;return t[2]+=t[2]*n,this.setValues("hsl",t),this},darken:function(n){var t=this.values.hsl;return t[2]-=t[2]*n,this.setValues("hsl",t),this},saturate:function(n){var t=this.values.hsl;return t[1]+=t[1]*n,this.setValues("hsl",t),this},desaturate:function(n){var t=this.values.hsl;return t[1]-=t[1]*n,this.setValues("hsl",t),this},whiten:function(n){var t=this.values.hwb;return t[1]+=t[1]*n,this.setValues("hwb",t),this},blacken:function(n){var t=this.values.hwb;return t[2]+=t[2]*n,this.setValues("hwb",t),this},greyscale:function(){var n=this.values.rgb,t=n[0]*.3+n[1]*.59+n[2]*.11;return this.setValues("rgb",[t,t,t]),this},clearer:function(n){var t=this.values.alpha;return this.setValues("alpha",t-t*n),this},opaquer:function(n){var t=this.values.alpha;return this.setValues("alpha",t+t*n),this},rotate:function(n){var t=this.values.hsl,i=(t[0]+n)%360;return t[0]=i<0?360+i:i,this.setValues("hsl",t),this},mix:function(n,t){var i=this,r=n,e=t===undefined?.5:t,u=2*e-1,o=i.alpha()-r.alpha(),f=((u*o==-1?u:(u+o)/(1+u*o))+1)/2,s=1-f;return this.rgb(f*i.red()+s*r.red(),f*i.green()+s*r.green(),f*i.blue()+s*r.blue()).alpha(i.alpha()*e+r.alpha()*(1-e))},toJSON:function(){return this.rgb()},clone:function(){var f=new i,r=this.values,e=f.values,n,u;for(var t in r)r.hasOwnProperty(t)&&(n=r[t],u={}.toString.call(n),u==="[object Array]"?e[t]=n.slice(0):u==="[object Number]"?e[t]=n:console.error("unexpected color value:",n));return f}};i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]};i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]};i.prototype.getValues=function(n){for(var i=this.values,r={},t=0;t<n.length;t++)r[n.charAt(t)]=i[n][t];return i.alpha!==1&&(r.a=i.alpha),r};i.prototype.setValues=function(n,t){var r=this.values,o=this.spaces,c=this.maxes,f=1,i,s,h,e;if(this.valid=!0,n==="alpha")f=t;else if(t.length)r[n]=t.slice(0,n.length),f=t[n.length];else if(t[n.charAt(0)]!==undefined){for(i=0;i<n.length;i++)r[n][i]=t[n.charAt(i)];f=t.a}else if(t[o[n][0]]!==undefined){for(s=o[n],i=0;i<n.length;i++)r[n][i]=t[s[i]];f=t.alpha}if(r.alpha=Math.max(0,Math.min(1,f===undefined?r.alpha:f)),n==="alpha")return!1;for(i=0;i<n.length;i++)h=Math.max(0,Math.min(c[n][i],r[n][i])),r[n][i]=Math.round(h);for(e in o)e!==n&&(r[e]=u[n][e](r[n]));return!0};i.prototype.setSpace=function(n,t){var i=t[0];return i===undefined?this.getValues(n):(typeof i=="number"&&(i=Array.prototype.slice.call(t)),this.setValues(n,i),this)};i.prototype.setChannel=function(n,t,i){var r=this.values[n];return i===undefined?r[t]:i===r[t]?this:(r[t]=i,this.setValues(n,r),this)};typeof window!="undefined"&&(window.Color=i);t.exports=i},{"1":1,"4":4}],3:[function(n,t){function u(n){var u=n[0]/255,f=n[1]/255,e=n[2]/255,r=Math.min(u,f,e),t=Math.max(u,f,e),o=t-r,i,h,s;return t==r?i=0:u==t?i=(f-e)/o:f==t?i=2+(e-u)/o:e==t&&(i=4+(u-f)/o),i=Math.min(i*60,360),i<0&&(i+=360),s=(r+t)/2,h=t==r?0:s<=.5?o/(t+r):o/(2-t-r),[i,h*100,s*100]}function c(n){var r=n[0],u=n[1],f=n[2],o=Math.min(r,u,f),i=Math.max(r,u,f),e=i-o,t,s,h;return s=i==0?0:e/i*100,i==o?t=0:r==i?t=(u-f)/e:u==i?t=2+(f-r)/e:f==i&&(t=4+(r-u)/e),t=Math.min(t*60,360),t<0&&(t+=360),h=i/255*100,[t,s,h]}function f(n){var i=n[0],r=n[1],t=n[2],f=u(n)[0],e=1/255*Math.min(i,Math.min(r,t)),t=1-1/255*Math.max(i,Math.max(r,t));return[f,e*100,t*100]}function e(n){var i=n[0]/255,r=n[1]/255,u=n[2]/255,f,e,o,t;return t=Math.min(1-i,1-r,1-u),f=(1-i-t)/(1-t)||0,e=(1-r-t)/(1-t)||0,o=(1-u-t)/(1-t)||0,[f*100,e*100,o*100,t*100]}function o(n){return nt[JSON.stringify(n)]}function y(n){var t=n[0]/255,i=n[1]/255,r=n[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92;i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var u=t*.4124+i*.3576+r*.1805,f=t*.2126+i*.7152+r*.0722,e=t*.0193+i*.1192+r*.9505;return[u*100,f*100,e*100]}function p(n){var u=y(n),i=u[0],t=u[1],r=u[2],f,e,o;return i/=95.047,t/=100,r/=108.883,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,f=116*t-16,e=500*(i-t),o=200*(t-r),[f,e,o]}function ft(n){return k(p(n))}function l(n){var h=n[0]/360,o=n[1]/100,i=n[2]/100,r,f,t,s,u,e;if(o==0)return u=i*255,[u,u,u];for(f=i<.5?i*(1+o):i+o-i*o,r=2*i-f,s=[0,0,0],e=0;e<3;e++)t=h+1/3*-(e-1),t<0&&t++,t>1&&t--,u=6*t<1?r+(f-r)*6*t:2*t<1?f:3*t<2?r+(f-r)*(2/3-t)*6:r,s[e]=u*255;return s}function et(n){var f=n[0],i=n[1]/100,t=n[2]/100,r,u;return t===0?[0,0,0]:(t*=2,i*=t<=1?t:2-t,u=(t+i)/2,r=2*i/(t+i),[f,r*100,u*100])}function ot(n){return f(l(n))}function st(n){return e(l(n))}function ht(n){return o(l(n))}function a(n){var r=n[0]/60,u=n[1]/100,t=n[2]/100,s=Math.floor(r)%6,o=r-Math.floor(r),i=255*t*(1-u),f=255*t*(1-u*o),e=255*t*(1-u*(1-o)),t=255*t;switch(s){case 0:return[t,e,i];case 1:return[f,t,i];case 2:return[i,t,e];case 3:return[i,f,t];case 4:return[e,i,t];case 5:return[t,i,f]}}function ct(n){var f=n[0],r=n[1]/100,u=n[2]/100,i,t;return t=(2-r)*u,i=r*u,i/=t<=1?t:2-t,i=i||0,t/=2,[f,i*100,t*100]}function lt(n){return f(a(n))}function at(n){return e(a(n))}function vt(n){return o(a(n))}function s(n){var h=n[0]/360,t=n[1]/100,o=n[2]/100,s=t+o,f,i,e,u;s>1&&(t/=s,o/=s);f=Math.floor(6*h);i=1-o;e=6*h-f;(f&1)!=0&&(e=1-e);u=t+e*(i-t);switch(f){default:case 6:case 0:r=i;g=u;b=t;break;case 1:r=u;g=i;b=t;break;case 2:r=t;g=i;b=u;break;case 3:r=t;g=u;b=i;break;case 4:r=u;g=t;b=i;break;case 5:r=i;g=t;b=u}return[r*255,g*255,b*255]}function yt(n){return u(s(n))}function pt(n){return c(s(n))}function wt(n){return e(s(n))}function bt(n){return o(s(n))}function h(n){var f=n[0]/100,e=n[1]/100,o=n[2]/100,t=n[3]/100,i,r,u;return i=1-Math.min(1,f*(1-t)+t),r=1-Math.min(1,e*(1-t)+t),u=1-Math.min(1,o*(1-t)+t),[i*255,r*255,u*255]}function kt(n){return u(h(n))}function dt(n){return c(h(n))}function gt(n){return f(h(n))}function ni(n){return o(h(n))}function it(n){var u=n[0]/100,f=n[1]/100,e=n[2]/100,t,i,r;return t=u*3.2406+f*-1.5372+e*-.4986,i=u*-.9689+f*1.8758+e*.0415,r=u*.0557+f*-.204+e*1.057,t=t>.0031308?1.055*Math.pow(t,1/2.4)-.055:t=t*12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i=i*12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,t=Math.min(Math.max(0,t),1),i=Math.min(Math.max(0,i),1),r=Math.min(Math.max(0,r),1),[t*255,i*255,r*255]}function rt(n){var i=n[0],t=n[1],r=n[2],u,f,e;return i/=95.047,t/=100,r/=108.883,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,u=116*t-16,f=500*(i-t),e=200*(t-r),[u,f,e]}function ti(n){return k(rt(n))}function w(n){var f=n[0],e=n[1],o=n[2],r,i,u,t;return f<=8?(i=f*100/903.3,t=7.787*(i/100)+16/116):(i=100*Math.pow((f+16)/116,3),t=Math.pow(i/100,1/3)),r=r/95.047<=.008856?r=95.047*(e/500+t-16/116)/7.787:95.047*Math.pow(e/500+t,3),u=u/108.883<=.008859?u=108.883*(t-o/200-16/116)/7.787:108.883*Math.pow(t-o/200,3),[r,i,u]}function k(n){var e=n[0],i=n[1],r=n[2],u,t,f;return u=Math.atan2(r,i),t=u*180/Math.PI,t<0&&(t+=360),f=Math.sqrt(i*i+r*r),[e,f,t]}function ut(n){return it(w(n))}function d(n){var f=n[0],i=n[1],e=n[2],r,u,t;return t=e/180*Math.PI,r=i*Math.cos(t),u=i*Math.sin(t),[f,r,u]}function ii(n){return w(d(n))}function ri(n){return ut(d(n))}function i(n){return v[n]}function ui(n){return u(i(n))}function fi(n){return c(i(n))}function ei(n){return f(i(n))}function oi(n){return e(i(n))}function si(n){return p(i(n))}function hi(n){return y(i(n))}var v,nt,tt;t.exports={rgb2hsl:u,rgb2hsv:c,rgb2hwb:f,rgb2cmyk:e,rgb2keyword:o,rgb2xyz:y,rgb2lab:p,rgb2lch:ft,hsl2rgb:l,hsl2hsv:et,hsl2hwb:ot,hsl2cmyk:st,hsl2keyword:ht,hsv2rgb:a,hsv2hsl:ct,hsv2hwb:lt,hsv2cmyk:at,hsv2keyword:vt,hwb2rgb:s,hwb2hsl:yt,hwb2hsv:pt,hwb2cmyk:wt,hwb2keyword:bt,cmyk2rgb:h,cmyk2hsl:kt,cmyk2hsv:dt,cmyk2hwb:gt,cmyk2keyword:ni,keyword2rgb:i,keyword2hsl:ui,keyword2hsv:fi,keyword2hwb:ei,keyword2cmyk:oi,keyword2lab:si,keyword2xyz:hi,xyz2rgb:it,xyz2lab:rt,xyz2lch:ti,lab2xyz:w,lab2rgb:ut,lab2lch:k,lch2lab:d,lch2xyz:ii,lch2rgb:ri};v={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]};nt={};for(tt in v)nt[JSON.stringify(v[tt])]=tt},{}],4:[function(n,t){var f=n(3),i=function(){return new u},r,u;for(r in f){i[r+"Raw"]=function(n){return function(t){return typeof t=="number"&&(t=Array.prototype.slice.call(arguments)),f[n](t)}}(r);var o=/(\w+)2(\w+)/.exec(r),e=o[1],s=o[2];i[e]=i[e]||{};i[e][s]=i[r]=function(n){return function(t){var i,r;if(typeof t=="number"&&(t=Array.prototype.slice.call(arguments)),i=f[n](t),typeof i=="string"||i===undefined)return i;for(r=0;r<i.length;r++)i[r]=Math.round(i[r]);return i}}(r)}u=function(){this.convs={}};u.prototype.routeSpace=function(n,t){var i=t[0];return i===undefined?this.getValues(n):(typeof i=="number"&&(i=Array.prototype.slice.call(t)),this.setValues(n,i))};u.prototype.setValues=function(n,t){return this.space=n,this.convs={},this.convs[n]=t,this};u.prototype.getValues=function(n){var t=this.convs[n],r,u;return t||(r=this.space,u=this.convs[r],t=i[r][n](u),this.convs[n]=t),t};["rgb","hsl","hsv","cmyk","keyword"].forEach(function(n){u.prototype[n]=function(){return this.routeSpace(n,arguments)}});t.exports=i},{"3":3}],5:[function(n,t){t.exports={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]}},{}],6:[function(t,i,r){
//! moment.js
//! version : 2.18.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function(t,u){typeof r=="object"&&typeof i!="undefined"?i.exports=u():typeof n=="function"&&n.amd?n(u):t.moment=u()})(this,function(){"use strict";function r(){return sf.apply(null,arguments)}function th(n){sf=n}function rt(n){return n instanceof Array||Object.prototype.toString.call(n)==="[object Array]"}function ai(n){return n!=null&&Object.prototype.toString.call(n)==="[object Object]"}function ih(n){for(var t in n)return!1;return!0}function b(n){return n===void 0}function ni(n){return typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]"}function di(n){return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}function hf(n,t){for(var r=[],i=0;i<n.length;++i)r.push(t(n[i],i));return r}function v(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function wt(n,t){for(var i in t)v(t,i)&&(n[i]=t[i]);return v(t,"toString")&&(n.toString=t.toString),v(t,"valueOf")&&(n.valueOf=t.valueOf),n}function ot(n,t,i,r){return wo(n,t,i,r,!0).utc()}function rh(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function e(n){return n._pf==null&&(n._pf=rh()),n._pf}function gr(n){if(n._isValid==null){var t=e(n),r=lf.call(t.parsedDateParts,function(n){return n!=null}),i=!isNaN(n._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(n._strict&&(i=i&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===undefined),Object.isFrozen!=null&&Object.isFrozen(n))return i;n._isValid=i}return n._isValid}function gi(n){var t=ot(NaN);return n!=null?wt(e(t),n):e(t).userInvalidated=!0,t}function nu(n,t){var i,r,u;if(b(t._isAMomentObject)||(n._isAMomentObject=t._isAMomentObject),b(t._i)||(n._i=t._i),b(t._f)||(n._f=t._f),b(t._l)||(n._l=t._l),b(t._strict)||(n._strict=t._strict),b(t._tzm)||(n._tzm=t._tzm),b(t._isUTC)||(n._isUTC=t._isUTC),b(t._offset)||(n._offset=t._offset),b(t._pf)||(n._pf=e(t)),b(t._locale)||(n._locale=t._locale),nr.length>0)for(i=0;i<nr.length;i++)r=nr[i],u=t[r],b(u)||(n[r]=u);return n}function vi(n){nu(this,n);this._d=new Date(n._d!=null?n._d.getTime():NaN);this.isValid()||(this._d=new Date(NaN));tr===!1&&(tr=!0,r.updateOffset(this),tr=!1)}function bt(n){return n instanceof vi||n!=null&&n._isAMomentObject!=null}function nt(n){return n<0?Math.ceil(n)||0:Math.floor(n)}function o(n){var t=+n,i=0;return t!==0&&isFinite(t)&&(i=nt(t)),i}function af(n,t,i){for(var f=Math.min(n.length,t.length),e=Math.abs(n.length-t.length),u=0,r=0;r<f;r++)(i&&n[r]!==t[r]||!i&&o(n[r])!==o(t[r]))&&u++;return u+e}function vf(n){r.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+n)}function tt(n,t){var i=!0;return wt(function(){var e,u,f,o;if(r.deprecationHandler!=null&&r.deprecationHandler(null,n),i){for(e=[],f=0;f<arguments.length;f++){if(u="",typeof arguments[f]=="object"){u+="\n["+f+"] ";for(o in arguments[0])u+=o+": "+arguments[0][o]+", ";u=u.slice(0,-2)}else u=arguments[f];e.push(u)}vf(n+"\nArguments: "+Array.prototype.slice.call(e).join("")+"\n"+(new Error).stack);i=!1}return t.apply(this,arguments)},t)}function yf(n,t){r.deprecationHandler!=null&&r.deprecationHandler(n,t);tu[n]||(vf(t),tu[n]=!0)}function st(n){return n instanceof Function||Object.prototype.toString.call(n)==="[object Function]"}function uh(n){var t;for(var i in n)t=n[i],st(t)?this[i]=t:this["_"+i]=t;this._config=n;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function pf(n,t){var r=wt({},n);for(var i in t)v(t,i)&&(ai(n[i])&&ai(t[i])?(r[i]={},wt(r[i],n[i]),wt(r[i],t[i])):t[i]!=null?r[i]=t[i]:delete r[i]);for(i in n)v(n,i)&&!v(t,i)&&ai(n[i])&&(r[i]=wt({},r[i]));return r}function iu(n){n!=null&&this.set(n)}function fh(n,t,i){var r=this._calendar[n]||this._calendar.sameElse;return st(r)?r.call(t,i):r}function eh(n){var t=this._longDateFormat[n],i=this._longDateFormat[n.toUpperCase()];return t||!i?t:(this._longDateFormat[n]=i.replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n])}function oh(){return this._invalidDate}function sh(n){return this._ordinal.replace("%d",n)}function hh(n,t,i,r){var u=this._relativeTime[i];return st(u)?u(n,t,i,r):u.replace(/%d/i,n)}function ch(n,t){var i=this._relativeTime[n>0?"future":"past"];return st(i)?i(t):i.replace(/%s/i,t)}function k(n,t){var i=n.toLowerCase();ei[i]=ei[i+"s"]=ei[t]=n}function it(n){return typeof n=="string"?ei[n]||ei[n.toLowerCase()]:undefined}function ru(n){var r={},t;for(var i in n)v(n,i)&&(t=it(i),t&&(r[t]=n[i]));return r}function d(n,t){uu[n]=t}function lh(n){var t=[];for(var i in n)t.push({unit:i,priority:uu[i]});return t.sort(function(n,t){return n.priority-t.priority}),t}function oi(n,t){return function(i){return i!=null?(re(this,n,i),r.updateOffset(this,t),this):ir(this,n)}}function ir(n,t){return n.isValid()?n._d["get"+(n._isUTC?"UTC":"")+t]():NaN}function re(n,t,i){n.isValid()&&n._d["set"+(n._isUTC?"UTC":"")+t](i)}function ah(n){return(n=it(n),st(this[n]))?this[n]():this}function vh(n,t){var r,i;if(typeof n=="object")for(n=ru(n),r=lh(n),i=0;i<r.length;i++)this[r[i].unit](n[r[i].unit]);else if(n=it(n),st(this[n]))return this[n](t);return this}function at(n,t,i){var r=""+Math.abs(n),u=t-r.length,f=n>=0;return(f?i?"+":"":"-")+Math.pow(10,Math.max(0,u)).toString().substr(1)+r}function f(n,t,i,r){var u=r;typeof r=="string"&&(u=function(){return this[r]()});n&&(si[n]=u);t&&(si[t[0]]=function(){return at(u.apply(this,arguments),t[1],t[2])});i&&(si[i]=function(){return this.localeData().ordinal(u.apply(this,arguments),n)})}function yh(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function ph(n){for(var t=n.match(ue),i=0,r=t.length;i<r;i++)t[i]=si[t[i]]?si[t[i]]:yh(t[i]);return function(i){for(var f="",u=0;u<r;u++)f+=st(t[u])?t[u].call(i,n):t[u];return f}}function eu(n,t){return n.isValid()?(t=fe(t,n.localeData()),fu[t]=fu[t]||ph(t),fu[t](n)):n.localeData().invalidDate()}function fe(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(rr.lastIndex=0;i>=0&&rr.test(n);)n=n.replace(rr,r),rr.lastIndex=0,i-=1;return n}function u(n,t,i){hu[n]=st(t)?t:function(n){return n&&i?i:t}}function bh(n,t){return v(hu,n)?hu[n](t._strict,t._locale):new RegExp(kh(n))}function kh(n){return ti(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u}))}function ti(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function l(n,t){var i,r=t;for(typeof n=="string"&&(n=[n]),ni(t)&&(r=function(n,i){i[t]=o(n)}),i=0;i<n.length;i++)hr[n[i]]=r}function pi(n,t){l(n,function(n,i,r,u){r._w=r._w||{};t(n,r._w,r,u)})}function dh(n,t,i){t!=null&&v(hr,n)&&hr[n](t,i._a,i,n)}function cu(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function tc(n,t){return n?rt(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||lu).test(t)?"format":"standalone"][n.month()]:rt(this._months)?this._months:this._months.standalone}function ic(n,t){return n?rt(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[lu.test(t)?"format":"standalone"][n.month()]:rt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function rc(n,t,i){var u,r,e,f=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],u=0;u<12;++u)e=ot([2e3,u]),this._shortMonthsParse[u]=this.monthsShort(e,"").toLocaleLowerCase(),this._longMonthsParse[u]=this.months(e,"").toLocaleLowerCase();return i?t==="MMM"?(r=w.call(this._shortMonthsParse,f),r!==-1?r:null):(r=w.call(this._longMonthsParse,f),r!==-1?r:null):t==="MMM"?(r=w.call(this._shortMonthsParse,f),r!==-1)?r:(r=w.call(this._longMonthsParse,f),r!==-1?r:null):(r=w.call(this._longMonthsParse,f),r!==-1)?r:(r=w.call(this._shortMonthsParse,f),r!==-1?r:null)}function uc(n,t,i){var r,u,f;if(this._monthsParseExact)return rc.call(this,n,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if((u=ot([2e3,r]),i&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),i||this._monthsParse[r]||(f="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[r]=new RegExp(f.replace(".",""),"i")),i&&t==="MMMM"&&this._longMonthsParse[r].test(n))||i&&t==="MMM"&&this._shortMonthsParse[r].test(n)||!i&&this._monthsParse[r].test(n))return r}function ve(n,t){var i;if(!n.isValid())return n;if(typeof t=="string")if(/^\d+$/.test(t))t=o(t);else if(t=n.localeData().monthsParse(t),!ni(t))return n;return i=Math.min(n.date(),cu(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n}function ye(n){return n!=null?(ve(this,n),r.updateOffset(this,!0),this):ir(this,"Month")}function fc(){return cu(this.year(),this.month())}function ec(n){return this._monthsParseExact?(v(this,"_monthsRegex")||be.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):(v(this,"_monthsShortRegex")||(this._monthsShortRegex=pe),this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex)}function oc(n){return this._monthsParseExact?(v(this,"_monthsRegex")||be.call(this),n?this._monthsStrictRegex:this._monthsRegex):(v(this,"_monthsRegex")||(this._monthsRegex=we),this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex)}function be(){function f(n,t){return t.length-n.length}for(var i=[],r=[],t=[],u,n=0;n<12;n++)u=ot([2e3,n]),i.push(this.monthsShort(u,"")),r.push(this.months(u,"")),t.push(this.months(u,"")),t.push(this.monthsShort(u,""));for(i.sort(f),r.sort(f),t.sort(f),n=0;n<12;n++)i[n]=ti(i[n]),r[n]=ti(r[n]);for(n=0;n<24;n++)t[n]=ti(t[n]);this._monthsRegex=new RegExp("^("+t.join("|")+")","i");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function wi(n){return ke(n)?366:365}function ke(n){return n%4==0&&n%100!=0||n%400==0}function sc(){return ke(this.year())}function hc(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return n<100&&n>=0&&isFinite(o.getFullYear())&&o.setFullYear(n),o}function cr(n){var t=new Date(Date.UTC.apply(null,arguments));return n<100&&n>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(n),t}function lr(n,t,i){var r=7+t-i,u=(7+cr(n,0,r).getUTCDay()-t)%7;return-u+r-1}function de(n,t,i,r,u){var s=(7+i-r)%7,h=lr(n,r,u),f=1+7*(t-1)+s+h,e,o;return f<=0?(e=n-1,o=wi(e)+f):f>wi(n)?(e=n+1,o=f-wi(n)):(e=n,o=f),{year:e,dayOfYear:o}}function bi(n,t,i){var e=lr(n.year(),t,i),r=Math.floor((n.dayOfYear()-e-1)/7)+1,f,u;return r<1?(u=n.year()-1,f=r+ri(u,t,i)):r>ri(n.year(),t,i)?(f=r-ri(n.year(),t,i),u=n.year()+1):(u=n.year(),f=r),{week:f,year:u}}function ri(n,t,i){var r=lr(n,t,i),u=lr(n+1,t,i);return(wi(n)-r+u)/7}function cc(n){return bi(n,this._week.dow,this._week.doy).week}function lc(){return this._week.dow}function ac(){return this._week.doy}function vc(n){var t=this.localeData().week(this);return n==null?t:this.add((n-t)*7,"d")}function yc(n){var t=bi(this,1,4).week;return n==null?t:this.add((n-t)*7,"d")}function pc(n,t){return typeof n!="string"?n:isNaN(n)?(n=t.weekdaysParse(n),typeof n=="number")?n:null:parseInt(n,10)}function wc(n,t){return typeof n=="string"?t.weekdaysParse(n)%7||7:isNaN(n)?null:n}function bc(n,t){return n?rt(this._weekdays)?this._weekdays[n.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][n.day()]:rt(this._weekdays)?this._weekdays:this._weekdays.standalone}function kc(n){return n?this._weekdaysShort[n.day()]:this._weekdaysShort}function dc(n){return n?this._weekdaysMin[n.day()]:this._weekdaysMin}function gc(n,t,i){var f,r,e,u=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)e=ot([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(e,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(e,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(e,"").toLocaleLowerCase();return i?t==="dddd"?(r=w.call(this._weekdaysParse,u),r!==-1?r:null):t==="ddd"?(r=w.call(this._shortWeekdaysParse,u),r!==-1?r:null):(r=w.call(this._minWeekdaysParse,u),r!==-1?r:null):t==="dddd"?(r=w.call(this._weekdaysParse,u),r!==-1)?r:(r=w.call(this._shortWeekdaysParse,u),r!==-1)?r:(r=w.call(this._minWeekdaysParse,u),r!==-1?r:null):t==="ddd"?(r=w.call(this._shortWeekdaysParse,u),r!==-1)?r:(r=w.call(this._weekdaysParse,u),r!==-1)?r:(r=w.call(this._minWeekdaysParse,u),r!==-1?r:null):(r=w.call(this._minWeekdaysParse,u),r!==-1)?r:(r=w.call(this._weekdaysParse,u),r!==-1)?r:(r=w.call(this._shortWeekdaysParse,u),r!==-1?r:null)}function nl(n,t,i){var r,u,f;if(this._weekdaysParseExact)return gc.call(this,n,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if((u=ot([2e3,1]).day(r),i&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(u,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(u,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(u,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(f="^"+this.weekdays(u,"")+"|^"+this.weekdaysShort(u,"")+"|^"+this.weekdaysMin(u,""),this._weekdaysParse[r]=new RegExp(f.replace(".",""),"i")),i&&t==="dddd"&&this._fullWeekdaysParse[r].test(n))||i&&t==="ddd"&&this._shortWeekdaysParse[r].test(n)||i&&t==="dd"&&this._minWeekdaysParse[r].test(n)||!i&&this._weekdaysParse[r].test(n))return r}function tl(n){if(!this.isValid())return n!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return n!=null?(n=pc(n,this.localeData()),this.add(n-t,"d")):t}function il(n){if(!this.isValid())return n!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return n==null?t:this.add(n-t,"d")}function rl(n){if(!this.isValid())return n!=null?this:NaN;if(n!=null){var t=wc(n,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function ul(n){return this._weekdaysParseExact?(v(this,"_weekdaysRegex")||vu.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):(v(this,"_weekdaysRegex")||(this._weekdaysRegex=ro),this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex)}function fl(n){return this._weekdaysParseExact?(v(this,"_weekdaysRegex")||vu.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(v(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=uo),this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function el(n){return this._weekdaysParseExact?(v(this,"_weekdaysRegex")||vu.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(v(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=fo),this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function vu(){function u(n,t){return t.length-n.length}for(var e=[],i=[],r=[],t=[],f,o,s,h,n=0;n<7;n++)f=ot([2e3,1]).day(n),o=this.weekdaysMin(f,""),s=this.weekdaysShort(f,""),h=this.weekdays(f,""),e.push(o),i.push(s),r.push(h),t.push(o),t.push(s),t.push(h);for(e.sort(u),i.sort(u),r.sort(u),t.sort(u),n=0;n<7;n++)i[n]=ti(i[n]),r[n]=ti(r[n]),t[n]=ti(t[n]);this._weekdaysRegex=new RegExp("^("+t.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function yu(){return this.hours()%12||12}function ol(){return this.hours()||24}function eo(n,t){f(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function oo(n,t){return t._meridiemParse}function sl(n){return(n+"").toLowerCase().charAt(0)==="p"}function hl(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"}function co(n){return n?n.toLowerCase().replace("_","-"):n}function ll(n){for(var r=0,i,t,f,u;r<n.length;){for(u=co(n[r]).split("-"),i=u.length,t=co(n[r+1]),t=t?t.split("-"):null;i>0;){if(f=lo(u.slice(0,i).join("-")),f)return f;if(t&&t.length>=i&&af(u,t,!0)>=i-1)break;i--}r++}return null}function lo(n){var r=null;if(!y[n]&&typeof i!="undefined"&&i&&i.exports)try{r=ar._abbr;t("./locale/"+n);hi(r)}catch(u){}return y[n]}function hi(n,t){var i;return n&&(i=b(t)?kt(n):pu(n,t),i&&(ar=i)),ar._abbr}function pu(n,t){if(t!==null){var i=ho;if(t.abbr=n,y[n]!=null)yf("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=y[n]._config;else if(t.parentLocale!=null)if(y[t.parentLocale]!=null)i=y[t.parentLocale]._config;else return ki[t.parentLocale]||(ki[t.parentLocale]=[]),ki[t.parentLocale].push({name:n,config:t}),null;return y[n]=new iu(pf(i,t)),ki[n]&&ki[n].forEach(function(n){pu(n.name,n.config)}),hi(n),y[n]}return delete y[n],null}function al(n,t){if(t!=null){var i,r=ho;y[n]!=null&&(r=y[n]._config);t=pf(r,t);i=new iu(t);i.parentLocale=y[n];y[n]=i;hi(n)}else y[n]!=null&&(y[n].parentLocale!=null?y[n]=y[n].parentLocale:y[n]!=null&&delete y[n]);return y[n]}function kt(n){var t;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return ar;if(!rt(n)){if(t=lo(n),t)return t;n=[n]}return ll(n)}function vl(){return bf(y)}function wu(n){var i,t=n._a;return t&&e(n).overflow===-2&&(i=t[vt]<0||t[vt]>11?vt:t[ht]<1||t[ht]>cu(t[ut],t[vt])?ht:t[p]<0||t[p]>24||t[p]===24&&(t[ft]!==0||t[yt]!==0||t[ii]!==0)?p:t[ft]<0||t[ft]>59?ft:t[yt]<0||t[yt]>59?yt:t[ii]<0||t[ii]>999?ii:-1,e(n)._overflowDayOfYear&&(i<ut||i>ht)&&(i=ht),e(n)._overflowWeeks&&i===-1&&(i=gh),e(n)._overflowWeekday&&i===-1&&(i=nc),e(n).overflow=i),n}function ao(n){var t,r,o=n._i,i=yl.exec(o)||pl.exec(o),s,f,u,h;if(i){for(e(n).iso=!0,t=0,r=vr.length;t<r;t++)if(vr[t][1].exec(i[1])){f=vr[t][0];s=vr[t][2]!==!1;break}if(f==null){n._isValid=!1;return}if(i[3]){for(t=0,r=bu.length;t<r;t++)if(bu[t][1].exec(i[3])){u=(i[2]||" ")+bu[t][0];break}if(u==null){n._isValid=!1;return}}if(!s&&u!=null){n._isValid=!1;return}if(i[4])if(wl.exec(i[4]))h="Z";else{n._isValid=!1;return}n._f=f+(u||"")+(h||"");yr(n)}else n._isValid=!1}function yo(n){var u,t,f,o,s,h,c={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"},i,r,l,a;if(u=n._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,""),t=vo.exec(u),t){if(f=t[1]?"ddd"+(t[1].length===5?", ":" "):"",o="D MMM "+(t[2].length>10?"YYYY ":"YY "),s="HH:mm"+(t[4]?":ss":""),t[1]&&(l=new Date(t[2]),a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][l.getDay()],t[1].substr(0,3)!==a)){e(n).weekdayMismatch=!0;n._isValid=!1;return}switch(t[5].length){case 2:r===0?i=" +0000":(r="YXWVUTSRQPONZABCDEFGHIKLM".indexOf(t[5][1].toUpperCase())-12,i=(r<0?" -":" +")+(""+r).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:i=c[t[5]];break;default:i=c[" GMT"]}t[5]=i;n._i=t.splice(1).join("");h=" ZZ";n._f=f+o+s+h;yr(n);e(n).rfc2822=!0}else n._isValid=!1}function kl(n){var t=bl.exec(n._i);if(t!==null){n._d=new Date(+t[1]);return}if(ao(n),n._isValid===!1)delete n._isValid;else return;if(yo(n),n._isValid===!1)delete n._isValid;else return;r.createFromInputFallback(n)}function ci(n,t,i){return n!=null?n:t!=null?t:i}function dl(n){var t=new Date(r.now());return n._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ku(n){var t,i,r=[],u,f;if(!n._d){for(u=dl(n),n._w&&n._a[ht]==null&&n._a[vt]==null&&gl(n),n._dayOfYear!=null&&(f=ci(n._a[ut],u[ut]),(n._dayOfYear>wi(f)||n._dayOfYear===0)&&(e(n)._overflowDayOfYear=!0),i=cr(f,0,n._dayOfYear),n._a[vt]=i.getUTCMonth(),n._a[ht]=i.getUTCDate()),t=0;t<3&&n._a[t]==null;++t)n._a[t]=r[t]=u[t];for(;t<7;t++)n._a[t]=r[t]=n._a[t]==null?t===2?1:0:n._a[t];n._a[p]===24&&n._a[ft]===0&&n._a[yt]===0&&n._a[ii]===0&&(n._nextDay=!0,n._a[p]=0);n._d=(n._useUTC?cr:hc).apply(null,r);n._tzm!=null&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);n._nextDay&&(n._a[p]=24)}}function gl(n){var t,o,u,i,r,f,h,s,c;t=n._w;t.GG!=null||t.W!=null||t.E!=null?(r=1,f=4,o=ci(t.GG,n._a[ut],bi(a(),1,4).year),u=ci(t.W,1),i=ci(t.E,1),(i<1||i>7)&&(s=!0)):(r=n._locale._week.dow,f=n._locale._week.doy,c=bi(a(),r,f),o=ci(t.gg,n._a[ut],c.year),u=ci(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(s=!0)):t.e!=null?(i=t.e+r,(t.e<0||t.e>6)&&(s=!0)):i=r);u<1||u>ri(o,r,f)?e(n)._overflowWeeks=!0:s!=null?e(n)._overflowWeekday=!0:(h=de(o,u,i,r,f),n._a[ut]=h.year,n._dayOfYear=h.dayOfYear)}function yr(n){if(n._f===r.ISO_8601){ao(n);return}if(n._f===r.RFC_2822){yo(n);return}n._a=[];e(n).empty=!0;for(var t=""+n._i,i,u,s,c=t.length,h=0,o=fe(n._f,n._locale).match(ue)||[],f=0;f<o.length;f++)u=o[f],i=(t.match(bh(u,n))||[])[0],i&&(s=t.substr(0,t.indexOf(i)),s.length>0&&e(n).unusedInput.push(s),t=t.slice(t.indexOf(i)+i.length),h+=i.length),si[u]?(i?e(n).empty=!1:e(n).unusedTokens.push(u),dh(u,i,n)):n._strict&&!i&&e(n).unusedTokens.push(u);e(n).charsLeftOver=c-h;t.length>0&&e(n).unusedInput.push(t);n._a[p]<=12&&e(n).bigHour===!0&&n._a[p]>0&&(e(n).bigHour=undefined);e(n).parsedDateParts=n._a.slice(0);e(n).meridiem=n._meridiem;n._a[p]=na(n._locale,n._a[p],n._meridiem);ku(n);wu(n)}function na(n,t,i){var r;return i==null?t:n.meridiemHour!=null?n.meridiemHour(t,i):n.isPM!=null?(r=n.isPM(i),r&&t<12&&(t+=12),r||t!==12||(t=0),t):t}function ta(n){var t,f,u,r,i;if(n._f.length===0){e(n).invalidFormat=!0;n._d=new Date(NaN);return}for(r=0;r<n._f.length;r++)(i=0,t=nu({},n),n._useUTC!=null&&(t._useUTC=n._useUTC),t._f=n._f[r],yr(t),gr(t))&&(i+=e(t).charsLeftOver,i+=e(t).unusedTokens.length*10,e(t).score=i,(u==null||i<u)&&(u=i,f=t));wt(n,f||t)}function ia(n){if(!n._d){var t=ru(n._i);n._a=hf([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)});ku(n)}}function ra(n){var t=new vi(wu(po(n)));return t._nextDay&&(t.add(1,"d"),t._nextDay=undefined),t}function po(n){var t=n._i,i=n._f;return(n._locale=n._locale||kt(n._l),t===null||i===undefined&&t==="")?gi({nullInput:!0}):(typeof t=="string"&&(n._i=t=n._locale.preparse(t)),bt(t))?new vi(wu(t)):(di(t)?n._d=t:rt(i)?ta(n):i?yr(n):ua(n),gr(n)||(n._d=null),n)}function ua(n){var t=n._i;b(t)?n._d=new Date(r.now()):di(t)?n._d=new Date(t.valueOf()):typeof t=="string"?kl(n):rt(t)?(n._a=hf(t.slice(0),function(n){return parseInt(n,10)}),ku(n)):ai(t)?ia(n):ni(t)?n._d=new Date(t):r.createFromInputFallback(n)}function wo(n,t,i,r,u){var f={};return(i===!0||i===!1)&&(r=i,i=undefined),(ai(n)&&ih(n)||rt(n)&&n.length===0)&&(n=undefined),f._isAMomentObject=!0,f._useUTC=f._isUTC=u,f._l=i,f._i=n,f._f=t,f._strict=r,ra(f)}function a(n,t,i,r){return wo(n,t,i,r,!1)}function go(n,t){var r,i;if(t.length===1&&rt(t[0])&&(t=t[0]),!t.length)return a();for(r=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][n](r))&&(r=t[i]);return r}function fa(){var n=[].slice.call(arguments,0);return go("isBefore",n)}function ea(){var n=[].slice.call(arguments,0);return go("isAfter",n)}function oa(n){var i,r,t;for(i in n)if(!(li.indexOf(i)!==-1&&(n[i]==null||!isNaN(n[i]))))return!1;for(r=!1,t=0;t<li.length;++t)if(n[li[t]]){if(r)return!1;parseFloat(n[li[t]])!==o(n[li[t]])&&(r=!0)}return!0}function sa(){return this._isValid}function ha(){return ct(NaN)}function pr(n){var t=ru(n),i=t.year||0,r=t.quarter||0,u=t.month||0,f=t.week||0,e=t.day||0,o=t.hour||0,s=t.minute||0,h=t.second||0,c=t.millisecond||0;this._isValid=oa(t);this._milliseconds=+c+h*1e3+s*6e4+o*36e5;this._days=+e+f*7;this._months=+u+r*3+i*12;this._data={};this._locale=kt();this._bubble()}function du(n){return n instanceof pr}function gu(n){return n<0?Math.round(-1*n)*-1:Math.round(n)}function ts(n,t){f(n,0,0,function(){var n=this.utcOffset(),i="+";return n<0&&(n=-n,i="-"),i+at(~~(n/60),2)+t+at(~~n%60,2)})}function nf(n,t){var i=(t||"").match(n);if(i===null)return null;var f=i[i.length-1]||[],r=(f+"").match(is)||["-",0,0],u=+(r[1]*60)+o(r[2]);return u===0?0:r[0]==="+"?u:-u}function tf(n,t){var i,u;return t._isUTC?(i=t.clone(),u=(bt(n)||di(n)?n.valueOf():a(n).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+u),r.updateOffset(i,!1),i):a(n).local()}function rf(n){return-Math.round(n._d.getTimezoneOffset()/15)*15}function ca(n,t,i){var u=this._offset||0,f;if(!this.isValid())return n!=null?this:NaN;if(n!=null){if(typeof n=="string"){if(n=nf(sr,n),n===null)return this}else Math.abs(n)<16&&!i&&(n=n*60);return!this._isUTC&&t&&(f=rf(this)),this._offset=n,this._isUTC=!0,f!=null&&this.add(f,"m"),u!==n&&(!t||this._changeInProgress?ss(this,ct(n-u,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?u:rf(this)}function la(n,t){return n!=null?(typeof n!="string"&&(n=-n),this.utcOffset(n,t),this):-this.utcOffset()}function aa(n){return this.utcOffset(0,n)}function va(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(rf(this),"m")),this}function ya(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var n=nf(wh,this._i);n!=null?this.utcOffset(n):this.utcOffset(0,!0)}return this}function pa(n){return this.isValid()?(n=n?a(n).utcOffset():0,(this.utcOffset()-n)%60==0):!1}function wa(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ba(){var n,t;return b(this._isDSTShifted)?(n={},nu(n,this),n=po(n),n._a?(t=n._isUTC?ot(n._a):a(n._a),this._isDSTShifted=this.isValid()&&af(n._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted):this._isDSTShifted}function ka(){return this.isValid()?!this._isUTC:!1}function da(){return this.isValid()?this._isUTC:!1}function rs(){return this.isValid()?this._isUTC&&this._offset===0:!1}function ct(n,t){var i=n,r=null,u,f,e;return du(n)?i={ms:n._milliseconds,d:n._days,M:n._months}:ni(n)?(i={},t?i[t]=n:i.milliseconds=n):(r=us.exec(n))?(u=r[1]==="-"?-1:1,i={y:0,d:o(r[ht])*u,h:o(r[p])*u,m:o(r[ft])*u,s:o(r[yt])*u,ms:o(gu(r[ii]*1e3))*u}):(r=fs.exec(n))?(u=r[1]==="-"?-1:1,i={y:ui(r[2],u),M:ui(r[3],u),w:ui(r[4],u),d:ui(r[5],u),h:ui(r[6],u),m:ui(r[7],u),s:ui(r[8],u)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(e=ga(a(i.from),a(i.to)),i={},i.ms=e.milliseconds,i.M=e.months),f=new pr(i),du(n)&&v(n,"_locale")&&(f._locale=n._locale),f}function ui(n,t){var i=n&&parseFloat(n.replace(",","."));return(isNaN(i)?0:i)*t}function es(n,t){var i={milliseconds:0,months:0};return i.months=t.month()-n.month()+(t.year()-n.year())*12,n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function ga(n,t){var i;return(n.isValid()&&t.isValid())?(t=tf(t,n),n.isBefore(t)?i=es(n,t):(i=es(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function os(n,t){return function(i,r){var u,f;return r===null||isNaN(+r)||(yf(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=i,i=r,r=f),i=typeof i=="string"?+i:i,u=ct(i,r),ss(this,u,n),this}}function ss(n,t,i,u){var o=t._milliseconds,f=gu(t._days),e=gu(t._months);n.isValid()&&(u=u==null?!0:u,o&&n._d.setTime(n._d.valueOf()+o*i),f&&re(n,"Date",ir(n,"Date")+f*i),e&&ve(n,ir(n,"Month")+e*i),u&&r.updateOffset(n,f||e))}function nv(n,t){var i=n.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function tv(n,t){var u=n||a(),f=tf(u,this).startOf("day"),i=r.calendarFormat(this,f)||"sameElse",e=t&&(st(t[i])?t[i].call(this,u):t[i]);return this.format(e||this.localeData().calendar(i,this,a(u)))}function iv(){return new vi(this)}function rv(n,t){var i=bt(n)?n:a(n);return(this.isValid()&&i.isValid())?(t=it(b(t)?"millisecond":t),t==="millisecond"?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf()):!1}function uv(n,t){var i=bt(n)?n:a(n);return(this.isValid()&&i.isValid())?(t=it(b(t)?"millisecond":t),t==="millisecond"?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf()):!1}function fv(n,t,i,r){return r=r||"()",(r[0]==="("?this.isAfter(n,i):!this.isBefore(n,i))&&(r[1]===")"?this.isBefore(t,i):!this.isAfter(t,i))}function ev(n,t){var i=bt(n)?n:a(n),r;return(this.isValid()&&i.isValid())?(t=it(t||"millisecond"),t==="millisecond"?this.valueOf()===i.valueOf():(r=i.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function ov(n,t){return this.isSame(n,t)||this.isAfter(n,t)}function sv(n,t){return this.isSame(n,t)||this.isBefore(n,t)}function hv(n,t,i){var f,e,u,r;return this.isValid()?(f=tf(n,this),!f.isValid())?NaN:(e=(f.utcOffset()-this.utcOffset())*6e4,t=it(t),t==="year"||t==="month"||t==="quarter"?(r=cv(this,f),t==="quarter"?r=r/3:t==="year"&&(r=r/12)):(u=this-f,r=t==="second"?u/1e3:t==="minute"?u/6e4:t==="hour"?u/36e5:t==="day"?(u-e)/864e5:t==="week"?(u-e)/6048e5:u),i?r:nt(r)):NaN}function cv(n,t){var r=(t.year()-n.year())*12+(t.month()-n.month()),i=n.clone().add(r,"months"),u,f;return t-i<0?(u=n.clone().add(r-1,"months"),f=(t-i)/(i-u)):(u=n.clone().add(r+1,"months"),f=(t-i)/(u-i)),-(r+f)||0}function lv(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function av(){if(!this.isValid())return null;var n=this.clone().utc();return n.year()<0||n.year()>9999?eu(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):st(Date.prototype.toISOString)?this.toDate().toISOString():eu(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function vv(){var n,t;if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";n="moment";t="";this.isLocal()||(n=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z");var i="["+n+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",u=t+'[")]';return this.format(i+r+"-MM-DD[T]HH:mm:ss.SSS"+u)}function yv(n){n||(n=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=eu(this,n);return this.localeData().postformat(t)}function pv(n,t){return this.isValid()&&(bt(n)&&n.isValid()||a(n).isValid())?ct({to:this,from:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function wv(n){return this.from(a(),n)}function bv(n,t){return this.isValid()&&(bt(n)&&n.isValid()||a(n).isValid())?ct({from:this,to:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function kv(n){return this.to(a(),n)}function ls(n){var t;return n===undefined?this._locale._abbr:(t=kt(n),t!=null&&(this._locale=t),this)}function as(){return this._locale}function dv(n){n=it(n);switch(n){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return n==="week"&&this.weekday(0),n==="isoWeek"&&this.isoWeekday(1),n==="quarter"&&this.month(Math.floor(this.month()/3)*3),this}function gv(n){return(n=it(n),n===undefined||n==="millisecond")?this:(n==="date"&&(n="day"),this.startOf(n).add(1,n==="isoWeek"?"week":n).subtract(1,"ms"))}function ny(){return this._d.valueOf()-(this._offset||0)*6e4}function ty(){return Math.floor(this.valueOf()/1e3)}function iy(){return new Date(this.valueOf())}function ry(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function uy(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function fy(){return this.isValid()?this.toISOString():null}function ey(){return gr(this)}function oy(){return wt({},e(this))}function sy(){return e(this).overflow}function hy(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function wr(n,t){f(0,[n,n.length],0,t)}function cy(n){return vs.call(this,n,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function ly(n){return vs.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function ay(){return ri(this.year(),1,4)}function vy(){var n=this.localeData()._week;return ri(this.year(),n.dow,n.doy)}function vs(n,t,i,r,u){var f;return n==null?bi(this,r,u).year:(f=ri(n,r,u),t>f&&(t=f),yy.call(this,n,t,i,r,u))}function yy(n,t,i,r,u){var e=de(n,t,i,r,u),f=cr(e.year,0,e.dayOfYear);return this.year(f.getUTCFullYear()),this.month(f.getUTCMonth()),this.date(f.getUTCDate()),this}function py(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}function wy(n){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return n==null?t:this.add(n-t,"d")}function by(n,t){t[ii]=o(("0."+n)*1e3)}function ky(){return this._isUTC?"UTC":""}function dy(){return this._isUTC?"Coordinated Universal Time":""}function gy(n){return a(n*1e3)}function np(){return a.apply(null,arguments).parseZone()}function bs(n){return n}function br(n,t,i,r){var u=kt(),f=ot().set(r,t);return u[i](f,n)}function ks(n,t,i){if(ni(n)&&(t=n,n=undefined),n=n||"",t!=null)return br(n,t,i,"month");for(var u=[],r=0;r<12;r++)u[r]=br(n,r,i,"month");return u}function ef(n,t,i,r){var o,f,u,e;if(typeof n=="boolean"?(ni(t)&&(i=t,t=undefined),t=t||""):(t=n,i=t,n=!1,ni(t)&&(i=t,t=undefined),t=t||""),o=kt(),f=n?o._week.dow:0,i!=null)return br(t,(i+f)%7,r,"day");for(e=[],u=0;u<7;u++)e[u]=br(t,(u+f)%7,r,"day");return e}function tp(n,t){return ks(n,t,"months")}function ip(n,t){return ks(n,t,"monthsShort")}function rp(n,t,i){return ef(n,t,i,"weekdays")}function up(n,t,i){return ef(n,t,i,"weekdaysShort")}function fp(n,t,i){return ef(n,t,i,"weekdaysMin")}function ep(){var n=this._data;return this._milliseconds=lt(this._milliseconds),this._days=lt(this._days),this._months=lt(this._months),n.milliseconds=lt(n.milliseconds),n.seconds=lt(n.seconds),n.minutes=lt(n.minutes),n.hours=lt(n.hours),n.months=lt(n.months),n.years=lt(n.years),this}function ds(n,t,i,r){var u=ct(t,i);return n._milliseconds+=r*u._milliseconds,n._days+=r*u._days,n._months+=r*u._months,n._bubble()}function op(n,t){return ds(this,n,t,1)}function sp(n,t){return ds(this,n,t,-1)}function gs(n){return n<0?Math.floor(n):Math.ceil(n)}function hp(){var r=this._milliseconds,n=this._days,t=this._months,i=this._data,u,f,e,s,o;return r>=0&&n>=0&&t>=0||r<=0&&n<=0&&t<=0||(r+=gs(of(t)+n)*864e5,n=0,t=0),i.milliseconds=r%1e3,u=nt(r/1e3),i.seconds=u%60,f=nt(u/60),i.minutes=f%60,e=nt(f/60),i.hours=e%24,n+=nt(e/24),o=nt(nh(n)),t+=o,n-=gs(of(o)),s=nt(t/12),t%=12,i.days=n,i.months=t,i.years=s,this}function nh(n){return n*4800/146097}function of(n){return n*146097/4800}function cp(n){if(!this.isValid())return NaN;var t,r,i=this._milliseconds;if(n=it(n),n==="month"||n==="year")return t=this._days+i/864e5,r=this._months+nh(t),n==="month"?r:r/12;t=this._days+Math.round(of(this._months));switch(n){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return t*24+i/36e5;case"minute":return t*1440+i/6e4;case"second":return t*86400+i/1e3;case"millisecond":return Math.floor(t*864e5)+i;default:throw new Error("Unknown unit "+n);}}function lp(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+o(this._months/12)*31536e6:NaN}function gt(n){return function(){return this.as(n)}}function gp(n){return n=it(n),this.isValid()?this[n+"s"]():NaN}function fi(n){return function(){return this.isValid()?this._data[n]:NaN}}function ow(){return nt(this.days()/7)}function sw(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function hw(n,t,i){var r=ct(n).abs(),u=pt(r.as("s")),e=pt(r.as("m")),o=pt(r.as("h")),s=pt(r.as("d")),h=pt(r.as("M")),c=pt(r.as("y")),f=u<=et.ss&&["s",u]||u<et.s&&["ss",u]||e<=1&&["m"]||e<et.m&&["mm",e]||o<=1&&["h"]||o<et.h&&["hh",o]||s<=1&&["d"]||s<et.d&&["dd",s]||h<=1&&["M"]||h<et.M&&["MM",h]||c<=1&&["y"]||["yy",c];return f[2]=t,f[3]=+n>0,f[4]=i,sw.apply(null,f)}function cw(n){return n===undefined?pt:typeof n=="function"?(pt=n,!0):!1}function lw(n,t){return et[n]===undefined?!1:t===undefined?et[n]:(et[n]=t,n==="s"&&(et.ss=t-1),!0)}function aw(n){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),i=hw(this,!n,t);return n&&(i=t.pastFuture(+this,i)),t.postformat(i)}function dr(){if(!this.isValid())return this.localeData().invalidDate();var t=kr(this._milliseconds)/1e3,a=kr(this._days),i=kr(this._months),n,e,o;n=nt(t/60);e=nt(n/60);t%=60;n%=60;o=nt(i/12);i%=12;var s=o,h=i,c=a,r=e,u=n,f=t,l=this.asSeconds();return l?(l<0?"-":"")+"P"+(s?s+"Y":"")+(h?h+"M":"")+(c?c+"D":"")+(r||u||f?"T":"")+(r?r+"H":"")+(u?u+"M":"")+(f?f+"S":""):"P0D"}var sf,cf,lf,nr,tr,tu,wf,bf,kf,df,gf,ne,te,ie,ei,uu,hr,w,lu,le,ae,pe,we,au,ge,no,to,io,ro,uo,fo,so,vo,bo,ko,ns,li,is,us,fs,hs,cs,uf,ff,ys,ps,dt,ws,n,h,lt,pt,et,kr,s;cf=Array.prototype.some?Array.prototype.some:function(n){for(var i=Object(this),r=i.length>>>0,t=0;t<r;t++)if(t in i&&n.call(this,i[t],t,i))return!0;return!1};lf=cf;nr=r.momentProperties=[];tr=!1;tu={};r.suppressDeprecationWarnings=!1;r.deprecationHandler=null;wf=Object.keys?Object.keys:function(n){var t,i=[];for(t in n)v(n,t)&&i.push(t);return i};bf=wf;kf={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};df={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};gf="Invalid date";ne="%d";te=/\d{1,2}/;ie={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};ei={};uu={};var ue=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,rr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fu={},si={};var ee=/\d/,g=/\d\d/,oe=/\d{3}/,ou=/\d{4}/,ur=/[+-]?\d{6}/,c=/\d\d?/,se=/\d\d\d\d?/,he=/\d\d\d\d\d\d?/,fr=/\d{1,3}/,su=/\d{1,4}/,er=/[+-]?\d{1,6}/,or=/[+-]?\d+/,wh=/Z|[+-]\d\d:?\d\d/gi,sr=/Z|[+-]\d\d(?::?\d\d)?/gi,yi=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,hu={};hr={};var ut=0,vt=1,ht=2,p=3,ft=4,yt=5,ii=6,gh=7,nc=8,ce;ce=Array.prototype.indexOf?Array.prototype.indexOf:function(n){for(var t=0;t<this.length;++t)if(this[t]===n)return t;return-1};w=ce;f("M",["MM",2],"Mo",function(){return this.month()+1});f("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)});f("MMMM",0,0,function(n){return this.localeData().months(this,n)});k("month","M");d("month",8);u("M",c);u("MM",c,g);u("MMM",function(n,t){return t.monthsShortRegex(n)});u("MMMM",function(n,t){return t.monthsRegex(n)});l(["M","MM"],function(n,t){t[vt]=o(n)-1});l(["MMM","MMMM"],function(n,t,i,r){var u=i._locale.monthsParse(n,r,i._strict);u!=null?t[vt]=u:e(i).invalidMonth=n});lu=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;le="January_February_March_April_May_June_July_August_September_October_November_December".split("_");ae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");pe=yi;we=yi;f("Y",0,0,function(){var n=this.year();return n<=9999?""+n:"+"+n});f(0,["YY",2],0,function(){return this.year()%100});f(0,["YYYY",4],0,"year");f(0,["YYYYY",5],0,"year");f(0,["YYYYYY",6,!0],0,"year");k("year","y");d("year",1);u("Y",or);u("YY",c,g);u("YYYY",su,ou);u("YYYYY",er,ur);u("YYYYYY",er,ur);l(["YYYYY","YYYYYY"],ut);l("YYYY",function(n,t){t[ut]=n.length===2?r.parseTwoDigitYear(n):o(n)});l("YY",function(n,t){t[ut]=r.parseTwoDigitYear(n)});l("Y",function(n,t){t[ut]=parseInt(n,10)});r.parseTwoDigitYear=function(n){return o(n)+(o(n)>68?1900:2e3)};au=oi("FullYear",!0);f("w",["ww",2],"wo","week");f("W",["WW",2],"Wo","isoWeek");k("week","w");k("isoWeek","W");d("week",5);d("isoWeek",5);u("w",c);u("ww",c,g);u("W",c);u("WW",c,g);pi(["w","ww","W","WW"],function(n,t,i,r){t[r.substr(0,1)]=o(n)});ge={dow:0,doy:6};f("d",0,"do","day");f("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)});f("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)});f("dddd",0,0,function(n){return this.localeData().weekdays(this,n)});f("e",0,0,"weekday");f("E",0,0,"isoWeekday");k("day","d");k("weekday","e");k("isoWeekday","E");d("day",11);d("weekday",11);d("isoWeekday",11);u("d",c);u("e",c);u("E",c);u("dd",function(n,t){return t.weekdaysMinRegex(n)});u("ddd",function(n,t){return t.weekdaysShortRegex(n)});u("dddd",function(n,t){return t.weekdaysRegex(n)});pi(["dd","ddd","dddd"],function(n,t,i,r){var u=i._locale.weekdaysParse(n,r,i._strict);u!=null?t.d=u:e(i).invalidWeekday=n});pi(["d","e","E"],function(n,t,i,r){t[r]=o(n)});no="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");to="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");io="Su_Mo_Tu_We_Th_Fr_Sa".split("_");ro=yi;uo=yi;fo=yi;f("H",["HH",2],0,"hour");f("h",["hh",2],0,yu);f("k",["kk",2],0,ol);f("hmm",0,0,function(){return""+yu.apply(this)+at(this.minutes(),2)});f("hmmss",0,0,function(){return""+yu.apply(this)+at(this.minutes(),2)+at(this.seconds(),2)});f("Hmm",0,0,function(){return""+this.hours()+at(this.minutes(),2)});f("Hmmss",0,0,function(){return""+this.hours()+at(this.minutes(),2)+at(this.seconds(),2)});eo("a",!0);eo("A",!1);k("hour","h");d("hour",13);u("a",oo);u("A",oo);u("H",c);u("h",c);u("k",c);u("HH",c,g);u("hh",c,g);u("kk",c,g);u("hmm",se);u("hmmss",he);u("Hmm",se);u("Hmmss",he);l(["H","HH"],p);l(["k","kk"],function(n,t){var i=o(n);t[p]=i===24?0:i});l(["a","A"],function(n,t,i){i._isPm=i._locale.isPM(n);i._meridiem=n});l(["h","hh"],function(n,t,i){t[p]=o(n);e(i).bigHour=!0});l("hmm",function(n,t,i){var r=n.length-2;t[p]=o(n.substr(0,r));t[ft]=o(n.substr(r));e(i).bigHour=!0});l("hmmss",function(n,t,i){var r=n.length-4,u=n.length-2;t[p]=o(n.substr(0,r));t[ft]=o(n.substr(r,2));t[yt]=o(n.substr(u));e(i).bigHour=!0});l("Hmm",function(n,t){var i=n.length-2;t[p]=o(n.substr(0,i));t[ft]=o(n.substr(i))});l("Hmmss",function(n,t){var i=n.length-4,r=n.length-2;t[p]=o(n.substr(0,i));t[ft]=o(n.substr(i,2));t[yt]=o(n.substr(r))});so=/[ap]\.?m?\.?/i;var cl=oi("Hours",!0),ho={calendar:kf,longDateFormat:df,invalidDate:gf,ordinal:ne,dayOfMonthOrdinalParse:te,relativeTime:ie,months:le,monthsShort:ae,week:ge,weekdays:no,weekdaysMin:io,weekdaysShort:to,meridiemParse:so},y={},ki={},ar;var yl=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pl=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wl=/Z|[+-]\d\d(?::?\d\d)?/,vr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],bu=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],bl=/^\/?Date\((\-?\d+)/i;for(vo=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/,r.createFromInputFallback=tt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){},bo=tt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=a.apply(null,arguments);return this.isValid()&&n.isValid()?n<this?this:n:gi()}),ko=tt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=a.apply(null,arguments);return this.isValid()&&n.isValid()?n>this?this:n:gi()}),ns=function(){return Date.now?Date.now():+new Date},li=["year","quarter","month","week","day","hour","minute","second","millisecond"],ts("Z",":"),ts("ZZ",""),u("Z",sr),u("ZZ",sr),l(["Z","ZZ"],function(n,t,i){i._useUTC=!0;i._tzm=nf(sr,n)}),is=/([\+\-]|\d\d)/gi,r.updateOffset=function(){},us=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,fs=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/,ct.fn=pr.prototype,ct.invalid=ha,hs=os(1,"add"),cs=os(-1,"subtract"),r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",uf=tt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return n===undefined?this.localeData():this.locale(n)}),f(0,["gg",2],0,function(){return this.weekYear()%100}),f(0,["GG",2],0,function(){return this.isoWeekYear()%100}),wr("gggg","weekYear"),wr("ggggg","weekYear"),wr("GGGG","isoWeekYear"),wr("GGGGG","isoWeekYear"),k("weekYear","gg"),k("isoWeekYear","GG"),d("weekYear",1),d("isoWeekYear",1),u("G",or),u("g",or),u("GG",c,g),u("gg",c,g),u("GGGG",su,ou),u("gggg",su,ou),u("GGGGG",er,ur),u("ggggg",er,ur),pi(["gggg","ggggg","GGGG","GGGGG"],function(n,t,i,r){t[r.substr(0,2)]=o(n)}),pi(["gg","GG"],function(n,t,i,u){t[u]=r.parseTwoDigitYear(n)}),f("Q",0,"Qo","quarter"),k("quarter","Q"),d("quarter",7),u("Q",ee),l("Q",function(n,t){t[vt]=(o(n)-1)*3}),f("D",["DD",2],"Do","date"),k("date","D"),d("date",9),u("D",c),u("DD",c,g),u("Do",function(n,t){return n?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),l(["D","DD"],ht),l("Do",function(n,t){t[ht]=o(n.match(c)[0],10)}),ff=oi("Date",!0),f("DDD",["DDDD",3],"DDDo","dayOfYear"),k("dayOfYear","DDD"),d("dayOfYear",4),u("DDD",fr),u("DDDD",oe),l(["DDD","DDDD"],function(n,t,i){i._dayOfYear=o(n)}),f("m",["mm",2],0,"minute"),k("minute","m"),d("minute",14),u("m",c),u("mm",c,g),l(["m","mm"],ft),ys=oi("Minutes",!1),f("s",["ss",2],0,"second"),k("second","s"),d("second",15),u("s",c),u("ss",c,g),l(["s","ss"],yt),ps=oi("Seconds",!1),f("S",0,0,function(){return~~(this.millisecond()/100)}),f(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),f(0,["SSS",3],0,"millisecond"),f(0,["SSSS",4],0,function(){return this.millisecond()*10}),f(0,["SSSSS",5],0,function(){return this.millisecond()*100}),f(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),f(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),f(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),f(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),k("millisecond","ms"),d("millisecond",16),u("S",fr,ee),u("SS",fr,g),u("SSS",fr,oe),dt="SSSS";dt.length<=9;dt+="S")u(dt,/\d+/);for(dt="S";dt.length<=9;dt+="S")l(dt,by);ws=oi("Milliseconds",!1);f("z",0,0,"zoneAbbr");f("zz",0,0,"zoneName");n=vi.prototype;n.add=hs;n.calendar=tv;n.clone=iv;n.diff=hv;n.endOf=gv;n.format=yv;n.from=pv;n.fromNow=wv;n.to=bv;n.toNow=kv;n.get=ah;n.invalidAt=sy;n.isAfter=rv;n.isBefore=uv;n.isBetween=fv;n.isSame=ev;n.isSameOrAfter=ov;n.isSameOrBefore=sv;n.isValid=ey;n.lang=uf;n.locale=ls;n.localeData=as;n.max=ko;n.min=bo;n.parsingFlags=oy;n.set=vh;n.startOf=dv;n.subtract=cs;n.toArray=ry;n.toObject=uy;n.toDate=iy;n.toISOString=av;n.inspect=vv;n.toJSON=fy;n.toString=lv;n.unix=ty;n.valueOf=ny;n.creationData=hy;n.year=au;n.isLeapYear=sc;n.weekYear=cy;n.isoWeekYear=ly;n.quarter=n.quarters=py;n.month=ye;n.daysInMonth=fc;n.week=n.weeks=vc;n.isoWeek=n.isoWeeks=yc;n.weeksInYear=vy;n.isoWeeksInYear=ay;n.date=ff;n.day=n.days=tl;n.weekday=il;n.isoWeekday=rl;n.dayOfYear=wy;n.hour=n.hours=cl;n.minute=n.minutes=ys;n.second=n.seconds=ps;n.millisecond=n.milliseconds=ws;n.utcOffset=ca;n.utc=aa;n.local=va;n.parseZone=ya;n.hasAlignedHourOffset=pa;n.isDST=wa;n.isLocal=ka;n.isUtcOffset=da;n.isUtc=rs;n.isUTC=rs;n.zoneAbbr=ky;n.zoneName=dy;n.dates=tt("dates accessor is deprecated. Use date instead.",ff);n.months=tt("months accessor is deprecated. Use month instead",ye);n.years=tt("years accessor is deprecated. Use year instead",au);n.zone=tt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",la);n.isDSTShifted=tt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ba);h=iu.prototype;h.calendar=fh;h.longDateFormat=eh;h.invalidDate=oh;h.ordinal=sh;h.preparse=bs;h.postformat=bs;h.relativeTime=hh;h.pastFuture=ch;h.set=uh;h.months=tc;h.monthsShort=ic;h.monthsParse=uc;h.monthsRegex=oc;h.monthsShortRegex=ec;h.week=cc;h.firstDayOfYear=ac;h.firstDayOfWeek=lc;h.weekdays=bc;h.weekdaysMin=dc;h.weekdaysShort=kc;h.weekdaysParse=nl;h.weekdaysRegex=ul;h.weekdaysShortRegex=fl;h.weekdaysMinRegex=el;h.isPM=sl;h.meridiem=hl;hi("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var t=n%10,i=o(n%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return n+i}});r.lang=tt("moment.lang is deprecated. Use moment.locale instead.",hi);r.langData=tt("moment.langData is deprecated. Use moment.localeData instead.",kt);lt=Math.abs;var ap=gt("ms"),vp=gt("s"),yp=gt("m"),pp=gt("h"),wp=gt("d"),bp=gt("w"),kp=gt("M"),dp=gt("y");var nw=fi("milliseconds"),tw=fi("seconds"),iw=fi("minutes"),rw=fi("hours"),uw=fi("days"),fw=fi("months"),ew=fi("years");return pt=Math.round,et={ss:44,s:45,m:45,h:22,d:26,M:11},kr=Math.abs,s=pr.prototype,s.isValid=sa,s.abs=ep,s.add=op,s.subtract=sp,s.as=cp,s.asMilliseconds=ap,s.asSeconds=vp,s.asMinutes=yp,s.asHours=pp,s.asDays=wp,s.asWeeks=bp,s.asMonths=kp,s.asYears=dp,s.valueOf=lp,s._bubble=hp,s.get=gp,s.milliseconds=nw,s.seconds=tw,s.minutes=iw,s.hours=rw,s.days=uw,s.weeks=ow,s.months=fw,s.years=ew,s.humanize=aw,s.toISOString=dr,s.toString=dr,s.toJSON=dr,s.locale=ls,s.localeData=as,s.toIsoString=tt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",dr),s.lang=uf,f("X",0,0,"unix"),f("x",0,0,"valueOf"),u("x",or),u("X",/[+-]?\d+(\.\d{1,3})?/),l("X",function(n,t,i){i._d=new Date(parseFloat(n,10)*1e3)}),l("x",function(n,t,i){i._d=new Date(o(n))}),r.version="2.18.1",th(a),r.fn=n,r.min=fa,r.max=ea,r.now=ns,r.utc=ot,r.unix=gy,r.months=tp,r.isDate=di,r.locale=hi,r.invalid=gi,r.duration=ct,r.isMoment=bt,r.weekdays=rp,r.parseZone=np,r.localeData=kt,r.isDuration=du,r.monthsShort=ip,r.weekdaysMin=fp,r.defineLocale=pu,r.updateLocale=al,r.locales=vl,r.weekdaysShort=up,r.normalizeUnits=it,r.relativeTimeRounding=cw,r.relativeTimeThreshold=lw,r.calendarFormat=nv,r.prototype=n,r})},{}],7:[function(n,t){var i=n(28)(),r;n(26)(i);n(40)(i);n(22)(i);n(25)(i);n(30)(i);n(21)(i);n(23)(i);n(24)(i);n(29)(i);n(32)(i);n(33)(i);n(31)(i);n(27)(i);n(34)(i);n(35)(i);n(36)(i);n(37)(i);n(38)(i);n(46)(i);n(44)(i);n(45)(i);n(47)(i);n(48)(i);n(49)(i);n(15)(i);n(16)(i);n(17)(i);n(18)(i);n(19)(i);n(20)(i);n(8)(i);n(9)(i);n(10)(i);n(11)(i);n(12)(i);n(13)(i);n(14)(i);r=[];r.push(n(41)(i),n(42)(i),n(43)(i));i.plugins.register(r);t.exports=i;typeof window!="undefined"&&(window.Chart=i)},{"10":10,"11":11,"12":12,"13":13,"14":14,"15":15,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"23":23,"24":24,"25":25,"26":26,"27":27,"28":28,"29":29,"30":30,"31":31,"32":32,"33":33,"34":34,"35":35,"36":36,"37":37,"38":38,"40":40,"41":41,"42":42,"43":43,"44":44,"45":45,"46":46,"47":47,"48":48,"49":49,"8":8,"9":9}],8:[function(n,t){"use strict";t.exports=function(n){n.Bar=function(t,i){return i.type="bar",new n(t,i)}}},{}],9:[function(n,t){"use strict";t.exports=function(n){n.Bubble=function(t,i){return i.type="bubble",new n(t,i)}}},{}],10:[function(n,t){"use strict";t.exports=function(n){n.Doughnut=function(t,i){return i.type="doughnut",new n(t,i)}}},{}],11:[function(n,t){"use strict";t.exports=function(n){n.Line=function(t,i){return i.type="line",new n(t,i)}}},{}],12:[function(n,t){"use strict";t.exports=function(n){n.PolarArea=function(t,i){return i.type="polarArea",new n(t,i)}}},{}],13:[function(n,t){"use strict";t.exports=function(n){n.Radar=function(t,i){return i.type="radar",new n(t,i)}}},{}],14:[function(n,t){"use strict";t.exports=function(n){var t={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-1"}],yAxes:[{type:"linear",position:"left",id:"y-axis-1"}]},tooltips:{callbacks:{title:function(){return""},label:function(n){return"("+n.xLabel+", "+n.yLabel+")"}}}};n.defaults.scatter=t;n.controllers.scatter=n.controllers.line;n.Scatter=function(t,i){return i.type="scatter",new n(t,i)}}},{}],15:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers;n.defaults.bar={hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}};n.controllers.bar=n.DatasetController.extend({dataElementType:n.elements.Rectangle,initialize:function(){var t=this,i;n.DatasetController.prototype.initialize.apply(t,arguments);i=t.getMeta();i.stack=t.getDataset().stack;i.bar=!0},update:function(n){var i=this,r=i.getMeta().data,t,u;for(i._ruler=i.getRuler(),t=0,u=r.length;t<u;++t)i.updateElement(r[t],t,n)},updateElement:function(n,i,r){var f=this,s=f.chart,h=f.getMeta(),e=f.getDataset(),u=n.custom||{},o=s.options.elements.rectangle;n._xScale=f.getScaleForId(h.xAxisID);n._yScale=f.getScaleForId(h.yAxisID);n._datasetIndex=f.index;n._index=i;n._model={datasetLabel:e.label,label:s.data.labels[i],borderSkipped:u.borderSkipped?u.borderSkipped:o.borderSkipped,backgroundColor:u.backgroundColor?u.backgroundColor:t.getValueAtIndexOrDefault(e.backgroundColor,i,o.backgroundColor),borderColor:u.borderColor?u.borderColor:t.getValueAtIndexOrDefault(e.borderColor,i,o.borderColor),borderWidth:u.borderWidth?u.borderWidth:t.getValueAtIndexOrDefault(e.borderWidth,i,o.borderWidth)};f.updateElementGeometry(n,i,r);n.pivot()},updateElementGeometry:function(n,t,i){var r=this,u=n._model,h=r.getValueScale(),o=h.getBasePixel(),f=h.isHorizontal(),c=r._ruler||r.getRuler(),s=r.calculateBarValuePixels(r.index,t),e=r.calculateBarIndexPixels(r.index,t,c);u.horizontal=f;u.base=i?o:s.base;u.x=f?i?o:s.head:e.center;u.y=f?e.center:i?o:s.head;u.height=f?e.size:undefined;u.width=f?undefined:e.size},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())},getStackCount:function(n){for(var e=this,u=e.chart,o=e.getIndexScale(),f=o.options.stacked,s=n===undefined?u.data.datasets.length:n+1,r=[],t,i=0;i<s;++i)t=u.getDatasetMeta(i),t.bar&&u.isDatasetVisible(i)&&(f===!1||f===!0&&r.indexOf(t.stack)===-1||f===undefined&&(t.stack===undefined||r.indexOf(t.stack)===-1))&&r.push(t.stack);return r.length},getStackIndex:function(n){return this.getStackCount(n)-1},getRuler:function(){var o=this,n=o.getIndexScale(),i=n.options,s=o.getStackCount(),h=n.isHorizontal()?n.width:n.height,u=h/n.ticks.length,f=u*i.categoryPercentage,e=f/s,r=e*i.barPercentage;return r=Math.min(t.getValueOrDefault(i.barThickness,r),t.getValueOrDefault(i.maxBarThickness,Infinity)),{stackCount:s,tickSize:u,categorySize:f,categorySpacing:u-f,fullBarSize:e,barSize:r,barSpacing:e-r,scale:n}},calculateBarValuePixels:function(n,t){var o=this,s=o.chart,w=o.getMeta(),r=o.getValueScale(),v=s.data.datasets,h=Number(v[n].data[t]),y=r.options.stacked,p=w.stack,c=0,i,u,f,l,e,a;if(y||y===undefined&&p!==undefined)for(i=0;i<n;++i)u=s.getDatasetMeta(i),u.bar&&u.stack===p&&u.controller.getValueScaleId()===r.id&&s.isDatasetVisible(i)&&(f=Number(v[i].data[t]),(h<0&&f<0||h>=0&&f>0)&&(c+=f));return l=r.getPixelForValue(c),e=r.getPixelForValue(c+h),a=(e-l)/2,{size:a,base:l,head:e,center:e+a/2}},calculateBarIndexPixels:function(n,t,i){var f=this,o=i.scale,e=f.chart.isCombo,s=f.getStackIndex(n),r=o.getPixelForValue(null,t,n,e),u=i.barSize;return r-=e?i.tickSize/2:0,r+=i.fullBarSize*s,r+=i.categorySpacing/2,r+=i.barSpacing/2,{size:u,base:r,head:r+u,center:r+u/2}},draw:function(){var r=this,u=r.chart,f=r.getMeta().data,e=r.getDataset(),o=f.length,n=0,i;for(t.canvas.clipArea(u.ctx,u.chartArea);n<o;++n)i=e.data[n],i===null||i===undefined||isNaN(i)||f[n].draw();t.canvas.unclipArea(u.ctx)},setHoverStyle:function(n){var u=this.chart.data.datasets[n._datasetIndex],f=n._index,i=n.custom||{},r=n._model;r.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:t.getValueAtIndexOrDefault(u.hoverBackgroundColor,f,t.getHoverColor(r.backgroundColor));r.borderColor=i.hoverBorderColor?i.hoverBorderColor:t.getValueAtIndexOrDefault(u.hoverBorderColor,f,t.getHoverColor(r.borderColor));r.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:t.getValueAtIndexOrDefault(u.hoverBorderWidth,f,r.borderWidth)},removeHoverStyle:function(n){var r=this.chart.data.datasets[n._datasetIndex],u=n._index,i=n.custom||{},f=n._model,e=this.chart.options.elements.rectangle;f.backgroundColor=i.backgroundColor?i.backgroundColor:t.getValueAtIndexOrDefault(r.backgroundColor,u,e.backgroundColor);f.borderColor=i.borderColor?i.borderColor:t.getValueAtIndexOrDefault(r.borderColor,u,e.borderColor);f.borderWidth=i.borderWidth?i.borderWidth:t.getValueAtIndexOrDefault(r.borderWidth,u,e.borderWidth)}});n.defaults.horizontalBar={hover:{mode:"label"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(n,t){var i="";return n.length>0&&(n[0].yLabel?i=n[0].yLabel:t.labels.length>0&&n[0].index<t.labels.length&&(i=t.labels[n[0].index])),i},label:function(n,t){var i=t.datasets[n.datasetIndex].label||"";return i+": "+n.xLabel}}}};n.controllers.horizontalBar=n.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{}],16:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers;n.defaults.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(n,t){var i=t.datasets[n.datasetIndex].label||"",r=t.datasets[n.datasetIndex].data[n.index];return i+": ("+n.xLabel+", "+n.yLabel+", "+r.r+")"}}}};n.controllers.bubble=n.DatasetController.extend({dataElementType:n.elements.Point,update:function(n){var i=this,r=i.getMeta(),u=r.data;t.each(u,function(t,r){i.updateElement(t,r,n)})},updateElement:function(i,r,u){var f=this,a=f.getMeta(),h=f.getScaleForId(a.xAxisID),c=f.getScaleForId(a.yAxisID),e=i.custom||{},v=f.getDataset(),o=v.data[r],y=f.chart.options.elements.point,l=f.index,s;t.extend(i,{_xScale:h,_yScale:c,_datasetIndex:l,_index:r,_model:{x:u?h.getPixelForDecimal(.5):h.getPixelForValue(typeof o=="object"?o:NaN,r,l,f.chart.isCombo),y:u?c.getBasePixel():c.getPixelForValue(o,r,l),radius:u?0:e.radius?e.radius:f.getRadius(o),hitRadius:e.hitRadius?e.hitRadius:t.getValueAtIndexOrDefault(v.hitRadius,r,y.hitRadius)}});n.DatasetController.prototype.removeHoverStyle.call(f,i,y);s=i._model;s.skip=e.skip?e.skip:isNaN(s.x)||isNaN(s.y);i.pivot()},getRadius:function(n){return n.r||this.chart.options.elements.point.radius},setHoverStyle:function(i){var r=this;n.DatasetController.prototype.setHoverStyle.call(r,i);var u=r.chart.data.datasets[i._datasetIndex],f=i._index,e=i.custom||{},o=i._model;o.radius=e.hoverRadius?e.hoverRadius:t.getValueAtIndexOrDefault(u.hoverRadius,f,r.chart.options.elements.point.hoverRadius)+r.getRadius(u.data[f])},removeHoverStyle:function(t){var i=this;n.DatasetController.prototype.removeHoverStyle.call(i,t,i.chart.options.elements.point);var u=i.chart.data.datasets[t._datasetIndex].data[t._index],r=t.custom||{},f=t._model;f.radius=r.radius?r.radius:i.getRadius(u)}})}},{}],17:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers,i=n.defaults;i.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(n){var t=[],i;t.push('<ul class="'+n.id+'-legend">');var u=n.data,r=u.datasets,f=u.labels;if(r.length)for(i=0;i<r[0].data.length;++i)t.push('<li><span style="background-color:'+r[0].backgroundColor[i]+'"><\/span>'),f[i]&&t.push(f[i]),t.push("<\/li>");return t.push("<\/ul>"),t.join("")},legend:{labels:{generateLabels:function(n){var i=n.data;return i.labels.length&&i.datasets.length?i.labels.map(function(r,u){var h=n.getDatasetMeta(0),e=i.datasets[0],c=h.data[u],f=c&&c.custom||{},o=t.getValueAtIndexOrDefault,s=n.options.elements.arc,l=f.backgroundColor?f.backgroundColor:o(e.backgroundColor,u,s.backgroundColor),a=f.borderColor?f.borderColor:o(e.borderColor,u,s.borderColor),v=f.borderWidth?f.borderWidth:o(e.borderWidth,u,s.borderWidth);return{text:r,fillStyle:l,strokeStyle:a,lineWidth:v,hidden:isNaN(e.data[u])||h.data[u].hidden,index:u}}):[]}},onClick:function(n,t){for(var u=t.index,f=this.chart,r,i=0,e=(f.data.datasets||[]).length;i<e;++i)r=f.getDatasetMeta(i),r.data[u]&&(r.data[u].hidden=!r.data[u].hidden);f.update()}},cutoutPercentage:50,rotation:Math.PI*-.5,circumference:Math.PI*2,tooltips:{callbacks:{title:function(){return""},label:function(n,i){var r=i.labels[n.index],u=": "+i.datasets[n.datasetIndex].data[n.index];return t.isArray(r)?(r=r.slice(),r[0]+=u):r+=u,r}}}};i.pie=t.clone(i.doughnut);t.extend(i.pie,{cutoutPercentage:0});n.controllers.doughnut=n.controllers.pie=n.DatasetController.extend({dataElementType:n.elements.Arc,linkScales:t.noop,getRingIndex:function(n){for(var i=0,t=0;t<n;++t)this.chart.isDatasetVisible(t)&&++i;return i},update:function(n){var u=this,i=u.chart,h=i.chartArea,c=i.options,w=c.elements.arc,b=h.right-h.left-w.borderWidth,k=h.bottom-h.top-w.borderWidth,d=Math.min(b,k),v={x:0,y:0},y=u.getMeta(),p=c.cutoutPercentage,g=c.circumference,r;if(g<Math.PI*2){r=c.rotation%(Math.PI*2);r+=Math.PI*2*(r>=Math.PI?-1:r<-Math.PI?1:0);var f=r+g,e={x:Math.cos(r),y:Math.sin(r)},o={x:Math.cos(f),y:Math.sin(f)},tt=r<=0&&0<=f||r<=Math.PI*2&&Math.PI*2<=f,it=r<=Math.PI*.5&&Math.PI*.5<=f||r<=Math.PI*2.5&&Math.PI*2.5<=f,rt=r<=-Math.PI&&-Math.PI<=f||r<=Math.PI&&Math.PI<=f,ut=r<=-Math.PI*.5&&-Math.PI*.5<=f||r<=Math.PI*1.5&&Math.PI*1.5<=f,s=p/100,l={x:rt?-1:Math.min(e.x*(e.x<0?1:s),o.x*(o.x<0?1:s)),y:ut?-1:Math.min(e.y*(e.y<0?1:s),o.y*(o.y<0?1:s))},a={x:tt?1:Math.max(e.x*(e.x>0?1:s),o.x*(o.x>0?1:s)),y:it?1:Math.max(e.y*(e.y>0?1:s),o.y*(o.y>0?1:s))},nt={width:(a.x-l.x)*.5,height:(a.y-l.y)*.5};d=Math.min(b/nt.width,k/nt.height);v={x:(a.x+l.x)*-.5,y:(a.y+l.y)*-.5}}i.borderWidth=u.getMaxBorderWidth(y.data);i.outerRadius=Math.max((d-i.borderWidth)/2,0);i.innerRadius=Math.max(p?i.outerRadius/100*p:0,0);i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount();i.offsetX=v.x*i.outerRadius;i.offsetY=v.y*i.outerRadius;y.total=u.calculateTotal();u.outerRadius=i.outerRadius-i.radiusLength*u.getRingIndex(u.index);u.innerRadius=Math.max(u.outerRadius-i.radiusLength,0);t.each(y.data,function(t,i){u.updateElement(t,i,n)})},updateElement:function(n,i,r){var u=this,f=u.chart,s=f.chartArea,e=f.options,h=e.animation,l=(s.left+s.right)/2,a=(s.top+s.bottom)/2,v=e.rotation,y=e.rotation,c=u.getDataset(),p=r&&h.animateRotate?0:n.hidden?0:u.calculateCircumference(c.data[i])*(e.circumference/(2*Math.PI)),w=r&&h.animateScale?0:u.innerRadius,b=r&&h.animateScale?0:u.outerRadius,k=t.getValueAtIndexOrDefault,o;t.extend(n,{_datasetIndex:u.index,_index:i,_model:{x:l+f.offsetX,y:a+f.offsetY,startAngle:v,endAngle:y,circumference:p,outerRadius:b,innerRadius:w,label:k(c.label,i,f.data.labels[i])}});o=n._model;this.removeHoverStyle(n);r&&h.animateRotate||(o.startAngle=i===0?e.rotation:u.getMeta().data[i-1]._model.endAngle,o.endAngle=o.startAngle+o.circumference);n.pivot()},removeHoverStyle:function(t){n.DatasetController.prototype.removeHoverStyle.call(this,t,this.chart.options.elements.arc)},calculateTotal:function(){var r=this.getDataset(),u=this.getMeta(),i=0,n;return t.each(u.data,function(t,u){n=r.data[u];isNaN(n)||t.hidden||(i+=Math.abs(n))}),i},calculateCircumference:function(n){var t=this.getMeta().total;return t>0&&!isNaN(n)?Math.PI*2*(n/t):0},getMaxBorderWidth:function(n){for(var t=0,f=this.index,e=n.length,r,u,i=0;i<e;i++)r=n[i]._model?n[i]._model.borderWidth:0,u=n[i]._chart?n[i]._chart.config.data.datasets[f].hoverBorderWidth:0,t=r>t?r:t,t=u>t?u:t;return t}})}},{}],18:[function(n,t){"use strict";t.exports=function(n){function i(n,i){return t.getValueOrDefault(n.showLine,i.showLines)}var t=n.helpers;n.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}};n.controllers.line=n.DatasetController.extend({datasetElementType:n.elements.Line,dataElementType:n.elements.Point,update:function(n){var o=this,l=o.getMeta(),s=l.dataset,h=l.data||[],a=o.chart.options,f=a.elements.line,y=o.getScaleForId(l.yAxisID),e,c,r,u=o.getDataset(),v=i(u,a);for(v&&(r=s.custom||{},u.tension!==undefined&&u.lineTension===undefined&&(u.lineTension=u.tension),s._scale=y,s._datasetIndex=o.index,s._children=h,s._model={spanGaps:u.spanGaps?u.spanGaps:a.spanGaps,tension:r.tension?r.tension:t.getValueOrDefault(u.lineTension,f.tension),backgroundColor:r.backgroundColor?r.backgroundColor:u.backgroundColor||f.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:u.borderWidth||f.borderWidth,borderColor:r.borderColor?r.borderColor:u.borderColor||f.borderColor,borderCapStyle:r.borderCapStyle?r.borderCapStyle:u.borderCapStyle||f.borderCapStyle,borderDash:r.borderDash?r.borderDash:u.borderDash||f.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:u.borderDashOffset||f.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:u.borderJoinStyle||f.borderJoinStyle,fill:r.fill?r.fill:u.fill!==undefined?u.fill:f.fill,steppedLine:r.steppedLine?r.steppedLine:t.getValueOrDefault(u.steppedLine,f.stepped),cubicInterpolationMode:r.cubicInterpolationMode?r.cubicInterpolationMode:t.getValueOrDefault(u.cubicInterpolationMode,f.cubicInterpolationMode)},s.pivot()),e=0,c=h.length;e<c;++e)o.updateElement(h[e],e,n);for(v&&s._model.tension!==0&&o.updateBezierControlPoints(),e=0,c=h.length;e<c;++e)h[e].pivot()},getPointBackgroundColor:function(n,i){var r=this.chart.options.elements.point.backgroundColor,u=this.getDataset(),f=n.custom||{};return f.backgroundColor?r=f.backgroundColor:u.pointBackgroundColor?r=t.getValueAtIndexOrDefault(u.pointBackgroundColor,i,r):u.backgroundColor&&(r=u.backgroundColor),r},getPointBorderColor:function(n,i){var r=this.chart.options.elements.point.borderColor,u=this.getDataset(),f=n.custom||{};return f.borderColor?r=f.borderColor:u.pointBorderColor?r=t.getValueAtIndexOrDefault(u.pointBorderColor,i,r):u.borderColor&&(r=u.borderColor),r},getPointBorderWidth:function(n,i){var r=this.chart.options.elements.point.borderWidth,u=this.getDataset(),f=n.custom||{};return isNaN(f.borderWidth)?isNaN(u.pointBorderWidth)?isNaN(u.borderWidth)||(r=u.borderWidth):r=t.getValueAtIndexOrDefault(u.pointBorderWidth,i,r):r=f.borderWidth,r},updateElement:function(n,i,r){var f=this,e=f.getMeta(),o=n.custom||{},u=f.getDataset(),s=f.index,h=u.data[i],v=f.getScaleForId(e.yAxisID),y=f.getScaleForId(e.xAxisID),c=f.chart.options.elements.point,l,a,p=f.chart.data.labels||[],w=p.length===1||u.data.length===1||f.chart.isCombo;u.radius!==undefined&&u.pointRadius===undefined&&(u.pointRadius=u.radius);u.hitRadius!==undefined&&u.pointHitRadius===undefined&&(u.pointHitRadius=u.hitRadius);l=y.getPixelForValue(typeof h=="object"?h:NaN,i,s,w);a=r?v.getBasePixel():f.calculatePointY(h,i,s);n._xScale=y;n._yScale=v;n._datasetIndex=s;n._index=i;n._model={x:l,y:a,skip:o.skip||isNaN(l)||isNaN(a),radius:o.radius||t.getValueAtIndexOrDefault(u.pointRadius,i,c.radius),pointStyle:o.pointStyle||t.getValueAtIndexOrDefault(u.pointStyle,i,c.pointStyle),backgroundColor:f.getPointBackgroundColor(n,i),borderColor:f.getPointBorderColor(n,i),borderWidth:f.getPointBorderWidth(n,i),tension:e.dataset._model?e.dataset._model.tension:0,steppedLine:e.dataset._model?e.dataset._model.steppedLine:!1,hitRadius:o.hitRadius||t.getValueAtIndexOrDefault(u.pointHitRadius,i,c.hitRadius)}},calculatePointY:function(n,t,i){var o=this,s=o.chart,v=o.getMeta(),r=o.getScaleForId(v.yAxisID),c=0,l=0,u,a,h,f,e;if(r.options.stacked){for(u=0;u<i;u++)a=s.data.datasets[u],h=s.getDatasetMeta(u),h.type==="line"&&h.yAxisID===r.id&&s.isDatasetVisible(u)&&(f=Number(r.getRightValue(a.data[t])),f<0?l+=f||0:c+=f||0);return(e=Number(r.getRightValue(n)),e<0)?r.getPixelForValue(l+e):r.getPixelForValue(c+e)}return r.getPixelForValue(n)},updateBezierControlPoints:function(){function s(n,t,i){return Math.max(Math.min(n,i),t)}var h=this,e=h.getMeta(),u=h.chart.chartArea,r=e.data||[],i,o,c,n,f;if(e.dataset._model.spanGaps&&(r=r.filter(function(n){return!n._model.skip})),e.dataset._model.cubicInterpolationMode==="monotone")t.splineCurveMonotone(r);else for(i=0,o=r.length;i<o;++i)c=r[i],n=c._model,f=t.splineCurve(t.previousItem(r,i)._model,n,t.nextItem(r,i)._model,e.dataset._model.tension),n.controlPointPreviousX=f.previous.x,n.controlPointPreviousY=f.previous.y,n.controlPointNextX=f.next.x,n.controlPointNextY=f.next.y;if(h.chart.options.elements.line.capBezierPoints)for(i=0,o=r.length;i<o;++i)n=r[i]._model,n.controlPointPreviousX=s(n.controlPointPreviousX,u.left,u.right),n.controlPointPreviousY=s(n.controlPointPreviousY,u.top,u.bottom),n.controlPointNextX=s(n.controlPointNextX,u.left,u.right),n.controlPointNextY=s(n.controlPointNextY,u.top,u.bottom)},draw:function(){var r=this,t=r.chart,f=r.getMeta(),e=f.data||[],o=t.chartArea,s=e.length,u=0;for(n.canvasHelpers.clipArea(t.ctx,o),i(r.getDataset(),t.options)&&f.dataset.draw(),n.canvasHelpers.unclipArea(t.ctx);u<s;++u)e[u].draw(o)},setHoverStyle:function(n){var r=this.chart.data.datasets[n._datasetIndex],u=n._index,f=n.custom||{},i=n._model;i.radius=f.hoverRadius||t.getValueAtIndexOrDefault(r.pointHoverRadius,u,this.chart.options.elements.point.hoverRadius);i.backgroundColor=f.hoverBackgroundColor||t.getValueAtIndexOrDefault(r.pointHoverBackgroundColor,u,t.getHoverColor(i.backgroundColor));i.borderColor=f.hoverBorderColor||t.getValueAtIndexOrDefault(r.pointHoverBorderColor,u,t.getHoverColor(i.borderColor));i.borderWidth=f.hoverBorderWidth||t.getValueAtIndexOrDefault(r.pointHoverBorderWidth,u,i.borderWidth)},removeHoverStyle:function(n){var i=this,r=i.chart.data.datasets[n._datasetIndex],u=n._index,e=n.custom||{},f=n._model;r.radius!==undefined&&r.pointRadius===undefined&&(r.pointRadius=r.radius);f.radius=e.radius||t.getValueAtIndexOrDefault(r.pointRadius,u,i.chart.options.elements.point.radius);f.backgroundColor=i.getPointBackgroundColor(n,u);f.borderColor=i.getPointBorderColor(n,u);f.borderWidth=i.getPointBorderWidth(n,u)}})}},{}],19:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers;n.defaults.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,aspectRatio:1,legendCallback:function(n){var t=[],i;t.push('<ul class="'+n.id+'-legend">');var u=n.data,r=u.datasets,f=u.labels;if(r.length)for(i=0;i<r[0].data.length;++i)t.push('<li><span style="background-color:'+r[0].backgroundColor[i]+'"><\/span>'),f[i]&&t.push(f[i]),t.push("<\/li>");return t.push("<\/ul>"),t.join("")},legend:{labels:{generateLabels:function(n){var i=n.data;return i.labels.length&&i.datasets.length?i.labels.map(function(r,u){var h=n.getDatasetMeta(0),e=i.datasets[0],c=h.data[u],f=c.custom||{},o=t.getValueAtIndexOrDefault,s=n.options.elements.arc,l=f.backgroundColor?f.backgroundColor:o(e.backgroundColor,u,s.backgroundColor),a=f.borderColor?f.borderColor:o(e.borderColor,u,s.borderColor),v=f.borderWidth?f.borderWidth:o(e.borderWidth,u,s.borderWidth);return{text:r,fillStyle:l,strokeStyle:a,lineWidth:v,hidden:isNaN(e.data[u])||h.data[u].hidden,index:u}}):[]}},onClick:function(n,t){for(var f=t.index,r=this.chart,u,i=0,e=(r.data.datasets||[]).length;i<e;++i)u=r.getDatasetMeta(i),u.data[f].hidden=!u.data[f].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(n,t){return t.labels[n.index]+": "+n.yLabel}}}};n.controllers.polarArea=n.DatasetController.extend({dataElementType:n.elements.Arc,linkScales:t.noop,update:function(n){var r=this,i=r.chart,u=i.chartArea,e=r.getMeta(),f=i.options,o=f.elements.arc,s=Math.min(u.right-u.left,u.bottom-u.top);i.outerRadius=Math.max((s-o.borderWidth/2)/2,0);i.innerRadius=Math.max(f.cutoutPercentage?i.outerRadius/100*f.cutoutPercentage:1,0);i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount();r.outerRadius=i.outerRadius-i.radiusLength*r.index;r.innerRadius=r.outerRadius-i.radiusLength;e.count=r.countVisibleElements();t.each(e.data,function(t,i){r.updateElement(t,i,n)})},updateElement:function(n,i,r){for(var u=this,s=u.chart,e=u.getDataset(),l=s.options,h=l.animation,f=s.scale,w=t.getValueAtIndexOrDefault,a=s.data.labels,v=u.calculateCircumference(e.data[i]),b=f.xCenter,k=f.yCenter,y=0,d=u.getMeta(),o=0;o<i;++o)isNaN(e.data[o])||d.data[o].hidden||++y;var c=l.startAngle,g=n.hidden?0:f.getDistanceFromCenterForValue(e.data[i]),p=c+v*y,nt=p+(n.hidden?0:v),tt=h.animateScale?0:f.getDistanceFromCenterForValue(e.data[i]);t.extend(n,{_datasetIndex:u.index,_index:i,_scale:f,_model:{x:b,y:k,innerRadius:0,outerRadius:r?tt:g,startAngle:r&&h.animateRotate?c:p,endAngle:r&&h.animateRotate?c:nt,label:w(a,i,a[i])}});u.removeHoverStyle(n);n.pivot()},removeHoverStyle:function(t){n.DatasetController.prototype.removeHoverStyle.call(this,t,this.chart.options.elements.arc)},countVisibleElements:function(){var i=this.getDataset(),r=this.getMeta(),n=0;return t.each(r.data,function(t,r){isNaN(i.data[r])||t.hidden||n++}),n},calculateCircumference:function(n){var t=this.getMeta().count;return t>0&&!isNaN(n)?2*Math.PI/t:0}})}},{}],20:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers;n.defaults.radar={aspectRatio:1,scale:{type:"radialLinear"},elements:{line:{tension:0}}};n.controllers.radar=n.DatasetController.extend({datasetElementType:n.elements.Line,dataElementType:n.elements.Point,linkScales:t.noop,update:function(n){var f=this,e=f.getMeta(),s=e.dataset,o=e.data,i=s.custom||{},r=f.getDataset(),u=f.chart.options.elements.line,h=f.chart.scale;r.tension!==undefined&&r.lineTension===undefined&&(r.lineTension=r.tension);t.extend(e.dataset,{_datasetIndex:f.index,_scale:h,_children:o,_loop:!0,_model:{tension:i.tension?i.tension:t.getValueOrDefault(r.lineTension,u.tension),backgroundColor:i.backgroundColor?i.backgroundColor:r.backgroundColor||u.backgroundColor,borderWidth:i.borderWidth?i.borderWidth:r.borderWidth||u.borderWidth,borderColor:i.borderColor?i.borderColor:r.borderColor||u.borderColor,fill:i.fill?i.fill:r.fill!==undefined?r.fill:u.fill,borderCapStyle:i.borderCapStyle?i.borderCapStyle:r.borderCapStyle||u.borderCapStyle,borderDash:i.borderDash?i.borderDash:r.borderDash||u.borderDash,borderDashOffset:i.borderDashOffset?i.borderDashOffset:r.borderDashOffset||u.borderDashOffset,borderJoinStyle:i.borderJoinStyle?i.borderJoinStyle:r.borderJoinStyle||u.borderJoinStyle}});e.dataset.pivot();t.each(o,function(t,i){f.updateElement(t,i,n)},f);f.updateBezierControlPoints()},updateElement:function(n,i,r){var o=this,u=n.custom||{},f=o.getDataset(),s=o.chart.scale,e=o.chart.options.elements.point,h=s.getPointPositionForValue(i,f.data[i]);f.radius!==undefined&&f.pointRadius===undefined&&(f.pointRadius=f.radius);f.hitRadius!==undefined&&f.pointHitRadius===undefined&&(f.pointHitRadius=f.hitRadius);t.extend(n,{_datasetIndex:o.index,_index:i,_scale:s,_model:{x:r?s.xCenter:h.x,y:r?s.yCenter:h.y,tension:u.tension?u.tension:t.getValueOrDefault(f.lineTension,o.chart.options.elements.line.tension),radius:u.radius?u.radius:t.getValueAtIndexOrDefault(f.pointRadius,i,e.radius),backgroundColor:u.backgroundColor?u.backgroundColor:t.getValueAtIndexOrDefault(f.pointBackgroundColor,i,e.backgroundColor),borderColor:u.borderColor?u.borderColor:t.getValueAtIndexOrDefault(f.pointBorderColor,i,e.borderColor),borderWidth:u.borderWidth?u.borderWidth:t.getValueAtIndexOrDefault(f.pointBorderWidth,i,e.borderWidth),pointStyle:u.pointStyle?u.pointStyle:t.getValueAtIndexOrDefault(f.pointStyle,i,e.pointStyle),hitRadius:u.hitRadius?u.hitRadius:t.getValueAtIndexOrDefault(f.pointHitRadius,i,e.hitRadius)}});n._model.skip=u.skip?u.skip:isNaN(n._model.x)||isNaN(n._model.y)},updateBezierControlPoints:function(){var n=this.chart.chartArea,i=this.getMeta();t.each(i.data,function(r,u){var f=r._model,e=t.splineCurve(t.previousItem(i.data,u,!0)._model,f,t.nextItem(i.data,u,!0)._model,f.tension);f.controlPointPreviousX=Math.max(Math.min(e.previous.x,n.right),n.left);f.controlPointPreviousY=Math.max(Math.min(e.previous.y,n.bottom),n.top);f.controlPointNextX=Math.max(Math.min(e.next.x,n.right),n.left);f.controlPointNextY=Math.max(Math.min(e.next.y,n.bottom),n.top);r.pivot()})},setHoverStyle:function(n){var u=this.chart.data.datasets[n._datasetIndex],i=n.custom||{},f=n._index,r=n._model;r.radius=i.hoverRadius?i.hoverRadius:t.getValueAtIndexOrDefault(u.pointHoverRadius,f,this.chart.options.elements.point.hoverRadius);r.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:t.getValueAtIndexOrDefault(u.pointHoverBackgroundColor,f,t.getHoverColor(r.backgroundColor));r.borderColor=i.hoverBorderColor?i.hoverBorderColor:t.getValueAtIndexOrDefault(u.pointHoverBorderColor,f,t.getHoverColor(r.borderColor));r.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:t.getValueAtIndexOrDefault(u.pointHoverBorderWidth,f,r.borderWidth)},removeHoverStyle:function(n){var r=this.chart.data.datasets[n._datasetIndex],i=n.custom||{},u=n._index,f=n._model,e=this.chart.options.elements.point;f.radius=i.radius?i.radius:t.getValueAtIndexOrDefault(r.pointRadius,u,e.radius);f.backgroundColor=i.backgroundColor?i.backgroundColor:t.getValueAtIndexOrDefault(r.pointBackgroundColor,u,e.backgroundColor);f.borderColor=i.borderColor?i.borderColor:t.getValueAtIndexOrDefault(r.pointBorderColor,u,e.borderColor);f.borderWidth=i.borderWidth?i.borderWidth:t.getValueAtIndexOrDefault(r.pointBorderWidth,u,e.borderWidth)}})}},{}],21:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers;n.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:t.noop,onComplete:t.noop};n.Animation=n.Element.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null});n.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(n,t,i,r){var u=this.animations,f,e;for(t.chart=n,r||(n.animating=!0),f=0,e=u.length;f<e;++f)if(u[f].chart===n){u[f]=t;return}u.push(t);u.length===1&&this.requestAnimationFrame()},cancelAnimation:function(n){var i=t.findIndex(this.animations,function(t){return t.chart===n});i!==-1&&(this.animations.splice(i,1),n.animating=!1)},requestAnimationFrame:function(){var n=this;n.request===null&&(n.request=t.requestAnimFrame.call(window,function(){n.request=null;n.startDigest()}))},startDigest:function(){var n=this,r=Date.now(),t=0,i;n.dropFrames>1&&(t=Math.floor(n.dropFrames),n.dropFrames=n.dropFrames%1);n.advance(1+t);i=Date.now();n.dropFrames+=(i-r)/n.frameDuration;n.animations.length>0&&n.requestAnimationFrame()},advance:function(n){for(var f=this.animations,i,r,u=0;u<f.length;)i=f[u],r=i.chart,i.currentStep=(i.currentStep||0)+n,i.currentStep=Math.min(i.currentStep,i.numSteps),t.callback(i.render,[r,i],r),t.callback(i.onAnimationProgress,[i],r),i.currentStep>=i.numSteps?(t.callback(i.onAnimationComplete,[i],r),r.animating=!1,f.splice(u,1)):++u}};Object.defineProperty(n.Animation.prototype,"animationObject",{get:function(){return this}});Object.defineProperty(n.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(n){this.chart=n}})}},{}],22:[function(n,t){"use strict";t.exports=function(n){var t=n.canvasHelpers={};t.drawPoint=function(t,i,r,u,f){var l,h,o,s,c,e;if(typeof i=="object"&&(l=i.toString(),l==="[object HTMLImageElement]"||l==="[object HTMLCanvasElement]")){t.drawImage(i,u-i.width/2,f-i.height/2,i.width,i.height);return}if(!isNaN(r)&&!(r<=0)){switch(i){default:t.beginPath();t.arc(u,f,r,0,Math.PI*2);t.closePath();t.fill();break;case"triangle":t.beginPath();h=3*r/Math.sqrt(3);c=h*Math.sqrt(3)/2;t.moveTo(u-h/2,f+c/3);t.lineTo(u+h/2,f+c/3);t.lineTo(u,f-2*c/3);t.closePath();t.fill();break;case"rect":e=1/Math.SQRT2*r;t.beginPath();t.fillRect(u-e,f-e,2*e,2*e);t.strokeRect(u-e,f-e,2*e,2*e);break;case"rectRounded":var a=r/Math.SQRT2,y=u-a,p=f-a,v=Math.SQRT2*r;n.helpers.drawRoundedRectangle(t,y,p,v,v,r/2);t.fill();break;case"rectRot":e=1/Math.SQRT2*r;t.beginPath();t.moveTo(u-e,f);t.lineTo(u,f+e);t.lineTo(u+e,f);t.lineTo(u,f-e);t.closePath();t.fill();break;case"cross":t.beginPath();t.moveTo(u,f+r);t.lineTo(u,f-r);t.moveTo(u-r,f);t.lineTo(u+r,f);t.closePath();break;case"crossRot":t.beginPath();o=Math.cos(Math.PI/4)*r;s=Math.sin(Math.PI/4)*r;t.moveTo(u-o,f-s);t.lineTo(u+o,f+s);t.moveTo(u-o,f+s);t.lineTo(u+o,f-s);t.closePath();break;case"star":t.beginPath();t.moveTo(u,f+r);t.lineTo(u,f-r);t.moveTo(u-r,f);t.lineTo(u+r,f);o=Math.cos(Math.PI/4)*r;s=Math.sin(Math.PI/4)*r;t.moveTo(u-o,f-s);t.lineTo(u+o,f+s);t.moveTo(u-o,f+s);t.lineTo(u+o,f-s);t.closePath();break;case"line":t.beginPath();t.moveTo(u-r,f);t.lineTo(u+r,f);t.closePath();break;case"dash":t.beginPath();t.moveTo(u,f);t.lineTo(u+r,f);t.closePath()}t.stroke()}};t.clipArea=function(n,t){n.save();n.beginPath();n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top);n.clip()};t.unclipArea=function(n){n.restore()};t.lineTo=function(n,t,i,r){if(i.steppedLine){i.steppedLine==="after"?n.lineTo(t.x,i.y):n.lineTo(i.x,t.y);n.lineTo(i.x,i.y);return}if(!i.tension){n.lineTo(i.x,i.y);return}n.bezierCurveTo(r?t.controlPointPreviousX:t.controlPointNextX,r?t.controlPointPreviousY:t.controlPointNextY,r?i.controlPointNextX:i.controlPointPreviousX,r?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y)};n.helpers.canvas=t}},{}],23:[function(n,t){"use strict";t.exports=function(n){function f(i){i=i||{};var r=i.data=i.data||{};return r.datasets=r.datasets||[],r.labels=r.labels||[],i.options=t.configMerge(n.defaults.global,n.defaults[i.type],i.options||{}),i}function e(n){var t=n.options;t.scale?n.scale.options=t.scale:t.scales&&t.scales.xAxes.concat(t.scales.yAxes).forEach(function(t){n.scales[t.id].options=t});n.tooltip._options=t.tooltips}function u(n){return n==="top"||n==="bottom"}var t=n.helpers,i=n.plugins,r=n.platform;n.types={};n.instances={};n.controllers={};t.extend(n.prototype,{construct:function(i,u){var e=this;u=f(u);var s=r.acquireContext(i,u),o=s&&s.canvas,h=o&&o.height,c=o&&o.width;if(e.id=t.uid(),e.ctx=s,e.canvas=o,e.config=u,e.width=c,e.height=h,e.aspectRatio=h?c/h:null,e.options=u.options,e._bufferedRender=!1,e.chart=e,e.controller=e,n.instances[e.id]=e,Object.defineProperty(e,"data",{get:function(){return e.config.data},set:function(n){e.config.data=n}}),!s||!o){console.error("Failed to create chart: can't acquire context from the given item");return}e.initialize();e.update()},initialize:function(){var n=this;return i.notify(n,"beforeInit"),t.retinaScale(n),n.bindEvents(),n.options.responsive&&n.resize(!0),n.ensureScalesHaveIDs(),n.buildScales(),n.initToolTip(),i.notify(n,"afterInit"),n},clear:function(){return t.clear(this),this},stop:function(){return n.animationService.cancelAnimation(this),this},resize:function(n){var r=this,h=r.options,u=r.canvas,s=h.maintainAspectRatio&&r.aspectRatio||null,f=Math.floor(t.getMaximumWidth(u)),e=Math.floor(s?f/s:t.getMaximumHeight(u)),o;if((r.width!==f||r.height!==e)&&(u.width=r.width=f,u.height=r.height=e,u.style.width=f+"px",u.style.height=e+"px",t.retinaScale(r),!n)){if(o={width:f,height:e},i.notify(r,"resize",[o]),r.options.onResize)r.options.onResize(r,o);r.stop();r.update(r.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var i=this.options,r=i.scales||{},n=i.scale;t.each(r.xAxes,function(n,t){n.id=n.id||"x-axis-"+t});t.each(r.yAxes,function(n,t){n.id=n.id||"y-axis-"+t});n&&(n.id=n.id||"scale")},buildScales:function(){var i=this,r=i.options,e=i.scales={},f=[];r.scales&&(f=f.concat((r.scales.xAxes||[]).map(function(n){return{options:n,dtype:"category",dposition:"bottom"}}),(r.scales.yAxes||[]).map(function(n){return{options:n,dtype:"linear",dposition:"left"}})));r.scale&&f.push({options:r.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"});t.each(f,function(r){var f=r.options,h=t.getValueOrDefault(f.type,r.dtype),s=n.scaleService.getScaleConstructor(h),o;s&&(u(f.position)!==u(r.dposition)&&(f.position=r.dposition),o=new s({id:f.id,options:f,ctx:i.ctx,chart:i}),e[o.id]=o,r.isDefault&&(i.scale=o))});n.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var i=this,r=[],f=[],u;if(t.each(i.data.datasets,function(t,u){var e=i.getDatasetMeta(u),o;if(e.type||(e.type=t.type||i.config.type),r.push(e.type),e.controller)e.controller.updateIndex(u);else{if(o=n.controllers[e.type],o===undefined)throw new Error('"'+e.type+'" is not a chart type.');e.controller=new o(i,u);f.push(e.controller)}},i),r.length>1)for(u=1;u<r.length;u++)if(r[u]!==r[u-1]){i.isCombo=!0;break}return f},resetElements:function(){var n=this;t.each(n.data.datasets,function(t,i){n.getDatasetMeta(i).controller.reset()},n)},reset:function(){this.resetElements();this.tooltip.initialize()},update:function(n,r){var u=this,f;(e(u),i.notify(u,"beforeUpdate")!==!1)&&(u.tooltip._data=u.data,f=u.buildOrUpdateControllers(),t.each(u.data.datasets,function(n,t){u.getDatasetMeta(t).controller.buildOrUpdateElements()},u),u.updateLayout(),t.each(f,function(n){n.reset()}),u.updateDatasets(),i.notify(u,"afterUpdate"),u._bufferedRender?u._bufferedRequest={lazy:r,duration:n}:u.render(n,r))},updateLayout:function(){var t=this;i.notify(t,"beforeLayout")!==!1&&(n.layoutService.update(this,this.width,this.height),i.notify(t,"afterScaleUpdate"),i.notify(t,"afterLayout"))},updateDatasets:function(){var n=this,t,r;if(i.notify(n,"beforeDatasetsUpdate")!==!1){for(t=0,r=n.data.datasets.length;t<r;++t)n.updateDataset(t);i.notify(n,"afterDatasetsUpdate")}},updateDataset:function(n){var t=this,r=t.getDatasetMeta(n),u={meta:r,index:n};i.notify(t,"beforeDatasetUpdate",[u])!==!1&&(r.controller.update(),i.notify(t,"afterDatasetUpdate",[u]))},render:function(r,u){var f=this,e,o,s;if(i.notify(f,"beforeRender")!==!1)return e=f.options.animation,o=function(n){i.notify(f,"afterRender");t.callback(e&&e.onComplete,[n],f)},e&&(typeof r!="undefined"&&r!==0||typeof r=="undefined"&&e.duration!==0)?(s=new n.Animation({numSteps:(r||e.duration)/16.66,easing:e.easing,render:function(n,i){var f=t.easingEffects[i.easing],r=i.currentStep,u=r/i.numSteps;n.draw(f(u),u,r)},onAnimationProgress:e.onProgress,onAnimationComplete:o}),n.animationService.addAnimation(f,s,r,u)):(f.draw(),o(new n.Animation({numSteps:0,chart:f}))),f},draw:function(n){var r=this;(r.clear(),(n===undefined||n===null)&&(n=1),r.transition(n),i.notify(r,"beforeDraw",[n])!==!1)&&(t.each(r.boxes,function(n){n.draw(r.chartArea)},r),r.scale&&r.scale.draw(),r.drawDatasets(n),r.tooltip.draw(),i.notify(r,"afterDraw",[n]))},transition:function(n){for(var t=this,i=0,r=(t.data.datasets||[]).length;i<r;++i)t.isDatasetVisible(i)&&t.getDatasetMeta(i).controller.transition(n);t.tooltip.transition(n)},drawDatasets:function(n){var t=this,r;if(i.notify(t,"beforeDatasetsDraw",[n])!==!1){for(r=(t.data.datasets||[]).length-1;r>=0;--r)t.isDatasetVisible(r)&&t.drawDataset(r,n);i.notify(t,"afterDatasetsDraw",[n])}},drawDataset:function(n,t){var r=this,u=r.getDatasetMeta(n),f={meta:u,index:n,easingValue:t};i.notify(r,"beforeDatasetDraw",[f])!==!1&&(u.controller.draw(t),i.notify(r,"afterDatasetDraw",[f]))},getElementAtEvent:function(t){return n.Interaction.modes.single(this,t)},getElementsAtEvent:function(t){return n.Interaction.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return n.Interaction.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,i,r){var u=n.Interaction.modes[i];return typeof u=="function"?u(this,t,r):[]},getDatasetAtEvent:function(t){return n.Interaction.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(n){var r=this,t=r.data.datasets[n],i;return t._meta||(t._meta={}),i=t._meta[r.id],i||(i=t._meta[r.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,n=0,i=this.data.datasets.length;n<i;++n)this.isDatasetVisible(n)&&t++;return t},isDatasetVisible:function(n){var t=this.getDatasetMeta(n);return typeof t.hidden=="boolean"?!t.hidden:!this.data.datasets[n].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var u=this,s=u.canvas,f,e,o;for(u.stop(),e=0,o=u.data.datasets.length;e<o;++e)f=u.getDatasetMeta(e),f.controller&&(f.controller.destroy(),f.controller=null);s&&(u.unbindEvents(),t.clear(u),r.releaseContext(u.ctx),u.canvas=null,u.ctx=null);i.notify(u,"destroy");delete n.instances[u.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new n.Tooltip({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t);t.tooltip.initialize()},bindEvents:function(){var n=this,u=n._listeners={},i=function(){n.eventHandler.apply(n,arguments)};t.each(n.options.events,function(t){r.addEventListener(n,t,i);u[t]=i});n.options.responsive&&(i=function(){n.resize()},r.addEventListener(n,"resize",i),u.resize=i)},unbindEvents:function(){var n=this,i=n._listeners;i&&(delete n._listeners,t.each(i,function(t,i){r.removeEventListener(n,i,t)}))},updateHoverStyle:function(n,t,i){for(var e=i?"setHoverStyle":"removeHoverStyle",r,u=0,f=n.length;u<f;++u)r=n[u],r&&this.getDatasetMeta(r._datasetIndex).controller[e](r)},eventHandler:function(n){var t=this,f=t.tooltip,u,r;if(i.notify(t,"beforeEvent",[n])!==!1)return t._bufferedRender=!0,t._bufferedRequest=null,u=t.handleEvent(n),u|=f&&f.handleEvent(n),i.notify(t,"afterEvent",[n]),r=t._bufferedRequest,r?t.render(r.duration,r.lazy):u&&!t.animating&&(t.stop(),t.render(t.options.hover.animationDuration,!0)),t._bufferedRender=!1,t._bufferedRequest=null,t},handleEvent:function(n){var i=this,u=i.options||{},r=u.hover,f=!1;return i.lastActive=i.lastActive||[],i.active=n.type==="mouseout"?[]:i.getElementsAtEventForMode(n,r.mode,r),r.onHover&&r.onHover.call(i,n.native,i.active),(n.type==="mouseup"||n.type==="click")&&u.onClick&&u.onClick.call(i,n.native,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,r.mode,!1),i.active.length&&r.mode&&i.updateHoverStyle(i.active,r.mode,!0),f=!t.arrayEquals(i.active,i.lastActive),i.lastActive=i.active,f}});n.Controller=n}},{}],24:[function(n,t){"use strict";t.exports=function(n){function u(n,r){if(n._chartjs){n._chartjs.listeners.push(r);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[r]}});i.forEach(function(i){var r="onData"+i.charAt(0).toUpperCase()+i.slice(1),u=n[i];Object.defineProperty(n,i,{configurable:!0,enumerable:!1,value:function(){var i=Array.prototype.slice.call(arguments),f=u.apply(this,i);return t.each(n._chartjs.listeners,function(n){typeof n[r]=="function"&&n[r].apply(n,i)}),f}})})}function r(n,t){var f=n._chartjs,r,u;f&&((r=f.listeners,u=r.indexOf(t),u!==-1&&r.splice(u,1),r.length>0)||(i.forEach(function(t){delete n[t]}),delete n._chartjs))}var t=n.helpers,i=["push","pop","shift","splice","unshift"];n.DatasetController=function(n,t){this.initialize(n,t)};t.extend(n.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(n,t){var i=this;i.chart=n;i.index=t;i.linkScales();i.addElements()},updateIndex:function(n){this.index=n},linkScales:function(){var n=this,t=n.getMeta(),i=n.getDataset();t.xAxisID===null&&(t.xAxisID=i.xAxisID||n.chart.options.scales.xAxes[0].id);t.yAxisID===null&&(t.yAxisID=i.yAxisID||n.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(n){return this.chart.scales[n]},reset:function(){this.update(!0)},destroy:function(){this._data&&r(this._data,this)},createMetaDataset:function(){var n=this,t=n.datasetElementType;return t&&new t({_chart:n.chart,_datasetIndex:n.index})},createMetaData:function(n){var t=this,i=t.dataElementType;return i&&new i({_chart:t.chart,_datasetIndex:t.index,_index:n})},addElements:function(){for(var t=this,i=t.getMeta(),f=t.getDataset().data||[],r=i.data,n=0,u=f.length;n<u;++n)r[n]=r[n]||t.createMetaData(n);i.dataset=i.dataset||t.createMetaDataset()},addElementAndReset:function(n){var t=this.createMetaData(n);this.getMeta().data.splice(n,0,t);this.updateElement(t,n,!0)},buildOrUpdateElements:function(){var n=this,i=n.getDataset(),t=i.data||(i.data=[]);n._data!==t&&(n._data&&r(n._data,n),u(t,n),n._data=t);n.resyncElements()},update:t.noop,transition:function(n){for(var t=this.getMeta(),r=t.data||[],u=r.length,i=0;i<u;++i)r[i].transition(n);t.dataset&&t.dataset.transition(n)},draw:function(){var n=this.getMeta(),i=n.data||[],r=i.length,t=0;for(n.dataset&&n.dataset.draw();t<r;++t)i[t].draw()},removeHoverStyle:function(n,i){var u=this.chart.data.datasets[n._datasetIndex],f=n._index,r=n.custom||{},e=t.getValueAtIndexOrDefault,o=n._model;o.backgroundColor=r.backgroundColor?r.backgroundColor:e(u.backgroundColor,f,i.backgroundColor);o.borderColor=r.borderColor?r.borderColor:e(u.borderColor,f,i.borderColor);o.borderWidth=r.borderWidth?r.borderWidth:e(u.borderWidth,f,i.borderWidth)},setHoverStyle:function(n){var u=this.chart.data.datasets[n._datasetIndex],f=n._index,i=n.custom||{},e=t.getValueAtIndexOrDefault,o=t.getHoverColor,r=n._model;r.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:e(u.hoverBackgroundColor,f,o(r.backgroundColor));r.borderColor=i.hoverBorderColor?i.hoverBorderColor:e(u.hoverBorderColor,f,o(r.borderColor));r.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:e(u.hoverBorderWidth,f,r.borderWidth)},resyncElements:function(){var i=this,r=i.getMeta(),u=i.getDataset().data,n=r.data.length,t=u.length;t<n?r.data.splice(t,n-t):t>n&&i.insertElements(n,t-n)},insertElements:function(n,t){for(var i=0;i<t;++i)this.addElementAndReset(n+i)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(n,t){this.getMeta().data.splice(n,t);this.insertElements(n,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}});n.DatasetController.extend=t.inherits}},{}],25:[function(n,t){"use strict";var i=n(2);t.exports=function(n){function r(n,t,r,u){for(var v=Object.keys(r),f,c,o,e,h,l,a,s=0,y=v.length;s<y;++s)if(f=v[s],e=r[f],t.hasOwnProperty(f)||(t[f]=e),c=t[f],c!==e&&f[0]!=="_"){if(n.hasOwnProperty(f)||(n[f]=c),o=n[f],h=typeof e,h===typeof o)if(h==="string"){if(l=i(o),l.valid&&(a=i(e),a.valid)){t[f]=a.mix(l,u).rgbString();continue}}else if(h==="number"&&isFinite(o)&&isFinite(e)){t[f]=o+(e-o)*u;continue}t[f]=e}}var t=n.helpers;n.elements={};n.Element=function(n){t.extend(this,n);this.initialize.apply(this,arguments)};t.extend(n.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var n=this;return n._view||(n._view=t.clone(n._model)),n._start={},n},transition:function(n){var t=this,i=t._model,u=t._start,f=t._view;return!i||n===1?(t._view=i,t._start=null,t):(f||(f=t._view={}),u||(u=t._start={}),r(u,f,i,n),t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return t.isNumber(this._model.x)&&t.isNumber(this._model.y)}});n.Element.extend=t.inherits}},{"2":2}],26:[function(n,t){"use strict";var i=n(2);t.exports=function(n){function u(n,t,i){var r;return typeof n=="string"?(r=parseInt(n,10),n.indexOf("%")!==-1&&(r=r/100*t.parentNode[i])):r=n,r}function f(n){return n!==undefined&&n!==null&&n!=="none"}function e(n,t,i){var r=document.defaultView,e=n.parentNode,o=r.getComputedStyle(n)[t],s=r.getComputedStyle(e)[t],h=f(o),c=f(s),l=Number.POSITIVE_INFINITY;return h||c?Math.min(h?u(o,n,i):l,c?u(s,e,i):l):"none"}var t=n.helpers={},r;t.each=function(n,i,r,u){var f,e,o;if(t.isArray(n))if(e=n.length,u)for(f=e-1;f>=0;f--)i.call(r,n[f],f);else for(f=0;f<e;f++)i.call(r,n[f],f);else if(typeof n=="object")for(o=Object.keys(n),e=o.length,f=0;f<e;f++)i.call(r,n[o[f]],o[f])};t.clone=function(n){var i={};return t.each(n,function(n,r){i[r]=t.isArray(n)?n.slice(0):typeof n=="object"&&n!==null?t.clone(n):n}),i};t.extend=function(n){for(var r=function(t,i){n[i]=t},i=1,u=arguments.length;i<u;i++)t.each(arguments[i],r);return n};t.configMerge=function(i){var r=t.clone(i);return t.each(Array.prototype.slice.call(arguments,1),function(i){t.each(i,function(i,u){var e=r.hasOwnProperty(u),f=e?r[u]:{};r[u]=u==="scales"?t.scaleMerge(f,i):u==="scale"?t.configMerge(f,n.scaleService.getScaleDefaults(i.type),i):!e||typeof f!="object"||t.isArray(f)||f===null||typeof i!="object"||t.isArray(i)?i:t.configMerge(f,i)})}),r};t.scaleMerge=function(i,r){var u=t.clone(i);return t.each(r,function(i,r){r==="xAxes"||r==="yAxes"?u.hasOwnProperty(r)?t.each(i,function(i,f){var o=t.getValueOrDefault(i.type,r==="xAxes"?"category":"linear"),e=n.scaleService.getScaleDefaults(o);f>=u[r].length||!u[r][f].type?u[r].push(t.configMerge(e,i)):u[r][f]=i.type&&i.type!==u[r][f].type?t.configMerge(u[r][f],e,i):t.configMerge(u[r][f],i)}):(u[r]=[],t.each(i,function(i){var f=t.getValueOrDefault(i.type,r==="xAxes"?"category":"linear");u[r].push(t.configMerge(n.scaleService.getScaleDefaults(f),i))})):u[r]=u.hasOwnProperty(r)&&typeof u[r]=="object"&&u[r]!==null&&typeof i=="object"?t.configMerge(u[r],i):i}),u};t.getValueAtIndexOrDefault=function(n,i,r){return n===undefined||n===null?r:t.isArray(n)?i<n.length?n[i]:r:n};t.getValueOrDefault=function(n,t){return n===undefined?t:n};t.indexOf=Array.prototype.indexOf?function(n,t){return n.indexOf(t)}:function(n,t){for(var i=0,r=n.length;i<r;++i)if(n[i]===t)return i;return-1};t.where=function(n,i){if(t.isArray(n)&&Array.prototype.filter)return n.filter(i);var r=[];return t.each(n,function(n){i(n)&&r.push(n)}),r};t.findIndex=Array.prototype.findIndex?function(n,t,i){return n.findIndex(t,i)}:function(n,t,i){i=i===undefined?n:i;for(var r=0,u=n.length;r<u;++r)if(t.call(i,n[r],r,n))return r;return-1};t.findNextWhere=function(n,t,i){var r,u;for((i===undefined||i===null)&&(i=-1),r=i+1;r<n.length;r++)if(u=n[r],t(u))return u};t.findPreviousWhere=function(n,t,i){var r,u;for((i===undefined||i===null)&&(i=n.length),r=i-1;r>=0;r--)if(u=n[r],t(u))return u};t.inherits=function(n){var r=this,i=n&&n.hasOwnProperty("constructor")?n.constructor:function(){return r.apply(this,arguments)},u=function(){this.constructor=i};return u.prototype=r.prototype,i.prototype=new u,i.extend=t.inherits,n&&t.extend(i.prototype,n),i.__super__=r.prototype,i};t.noop=function(){};t.uid=function(){var n=0;return function(){return n++}}();t.isNumber=function(n){return!isNaN(parseFloat(n))&&isFinite(n)};t.almostEquals=function(n,t,i){return Math.abs(n-t)<i};t.almostWhole=function(n,t){var i=Math.round(n);return i-t<n&&i+t>n};t.max=function(n){return n.reduce(function(n,t){return isNaN(t)?n:Math.max(n,t)},Number.NEGATIVE_INFINITY)};t.min=function(n){return n.reduce(function(n,t){return isNaN(t)?n:Math.min(n,t)},Number.POSITIVE_INFINITY)};t.sign=Math.sign?function(n){return Math.sign(n)}:function(n){return(n=+n,n===0||isNaN(n))?n:n>0?1:-1};t.log10=Math.log10?function(n){return Math.log10(n)}:function(n){return Math.log(n)/Math.LN10};t.toRadians=function(n){return n*(Math.PI/180)};t.toDegrees=function(n){return n*(180/Math.PI)};t.getAngleFromPoint=function(n,t){var i=t.x-n.x,r=t.y-n.y,f=Math.sqrt(i*i+r*r),u=Math.atan2(r,i);return u<-.5*Math.PI&&(u+=2*Math.PI),{angle:u,distance:f}};t.distanceBetweenPoints=function(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))};t.aliasPixel=function(n){return n%2==0?0:.5};t.splineCurve=function(n,t,i,r){var f=n.skip?t:n,u=t,e=i.skip?t:i,h=Math.sqrt(Math.pow(u.x-f.x,2)+Math.pow(u.y-f.y,2)),c=Math.sqrt(Math.pow(e.x-u.x,2)+Math.pow(e.y-u.y,2)),o=h/(h+c),s=c/(h+c),l,a;return o=isNaN(o)?0:o,s=isNaN(s)?0:s,l=r*o,a=r*s,{previous:{x:u.x-l*(e.x-f.x),y:u.y-l*(e.y-f.y)},next:{x:u.x+a*(e.x-f.x),y:u.y+a*(e.y-f.y)}}};t.EPSILON=Number.EPSILON||1e-14;t.splineCurveMonotone=function(n){for(var e=(n||[]).map(function(n){return{model:n._model,deltaK:0,mK:0}}),s=e.length,f,i,u,h,c,l,a,v,o,r=0;r<s;++r)(i=e[r],i.model.skip)||(f=r>0?e[r-1]:null,u=r<s-1?e[r+1]:null,u&&!u.model.skip&&(h=u.model.x-i.model.x,i.deltaK=h!==0?(u.model.y-i.model.y)/h:0),i.mK=!f||f.model.skip?i.deltaK:!u||u.model.skip?f.deltaK:this.sign(f.deltaK)!==this.sign(i.deltaK)?0:(f.deltaK+i.deltaK)/2);for(r=0;r<s-1;++r)if(i=e[r],u=e[r+1],!i.model.skip&&!u.model.skip){if(t.almostEquals(i.deltaK,0,this.EPSILON)){i.mK=u.mK=0;continue}(c=i.mK/i.deltaK,l=u.mK/i.deltaK,v=Math.pow(c,2)+Math.pow(l,2),v<=9)||(a=3/Math.sqrt(v),i.mK=c*a*i.deltaK,u.mK=l*a*i.deltaK)}for(r=0;r<s;++r)(i=e[r],i.model.skip)||(f=r>0?e[r-1]:null,u=r<s-1?e[r+1]:null,f&&!f.model.skip&&(o=(i.model.x-f.model.x)/3,i.model.controlPointPreviousX=i.model.x-o,i.model.controlPointPreviousY=i.model.y-o*i.mK),u&&!u.model.skip&&(o=(u.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+o,i.model.controlPointNextY=i.model.y+o*i.mK))};t.nextItem=function(n,t,i){return i?t>=n.length-1?n[0]:n[t+1]:t>=n.length-1?n[n.length-1]:n[t+1]};t.previousItem=function(n,t,i){return i?t<=0?n[n.length-1]:n[t-1]:t<=0?n[0]:n[t-1]};t.niceNum=function(n,i){var u=Math.floor(t.log10(n)),r=n/Math.pow(10,u),f;return f=i?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10,f*Math.pow(10,u)};r=t.easingEffects={linear:function(n){return n},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return-1*n*(n-2)},easeInOutQuad:function(n){return(n/=1/2)<1?1/2*n*n:-1/2*(--n*(n-2)-1)},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return 1*((n=n/1-1)*n*n+1)},easeInOutCubic:function(n){return(n/=1/2)<1?1/2*n*n*n:1/2*((n-=2)*n*n+2)},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return-1*((n=n/1-1)*n*n*n-1)},easeInOutQuart:function(n){return(n/=1/2)<1?1/2*n*n*n*n:-1/2*((n-=2)*n*n*n-2)},easeInQuint:function(n){return 1*(n/=1)*n*n*n*n},easeOutQuint:function(n){return 1*((n=n/1-1)*n*n*n*n+1)},easeInOutQuint:function(n){return(n/=1/2)<1?1/2*n*n*n*n*n:1/2*((n-=2)*n*n*n*n+2)},easeInSine:function(n){return-1*Math.cos(n/1*(Math.PI/2))+1},easeOutSine:function(n){return 1*Math.sin(n/1*(Math.PI/2))},easeInOutSine:function(n){return-1/2*(Math.cos(Math.PI*n/1)-1)},easeInExpo:function(n){return n===0?1:1*Math.pow(2,10*(n/1-1))},easeOutExpo:function(n){return n===1?1:1*(-Math.pow(2,-10*n)+1)},easeInOutExpo:function(n){return n===0?0:n===1?1:(n/=1/2)<1?1/2*Math.pow(2,10*(n-1)):1/2*(-Math.pow(2,-10*--n)+2)},easeInCirc:function(n){return n>=1?n:-1*(Math.sqrt(1-(n/=1)*n)-1)},easeOutCirc:function(n){return 1*Math.sqrt(1-(n=n/1-1)*n)},easeInOutCirc:function(n){return(n/=1/2)<1?-1/2*(Math.sqrt(1-n*n)-1):1/2*(Math.sqrt(1-(n-=2)*n)+1)},easeInElastic:function(n){var r=1.70158,t=0,i=1;return n===0?0:(n/=1)==1?1:(t||(t=1*.3),i<Math.abs(1)?(i=1,r=t/4):r=t/(2*Math.PI)*Math.asin(1/i),-(i*Math.pow(2,10*(n-=1))*Math.sin((n*1-r)*2*Math.PI/t)))},easeOutElastic:function(n){var r=1.70158,t=0,i=1;return n===0?0:(n/=1)==1?1:(t||(t=1*.3),i<Math.abs(1)?(i=1,r=t/4):r=t/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*n)*Math.sin((n*1-r)*2*Math.PI/t)+1)},easeInOutElastic:function(n){var r=1.70158,t=0,i=1;return n===0?0:(n/=1/2)==2?1:(t||(t=1*.3*1.5),i<Math.abs(1)?(i=1,r=t/4):r=t/(2*Math.PI)*Math.asin(1/i),n<1)?-.5*i*Math.pow(2,10*(n-=1))*Math.sin((n*1-r)*2*Math.PI/t):i*Math.pow(2,-10*(n-=1))*Math.sin((n*1-r)*2*Math.PI/t)*.5+1},easeInBack:function(n){var t=1.70158;return 1*(n/=1)*n*((t+1)*n-t)},easeOutBack:function(n){var t=1.70158;return 1*((n=n/1-1)*n*((t+1)*n+t)+1)},easeInOutBack:function(n){var t=1.70158;return(n/=1/2)<1?1/2*n*n*(((t*=1.525)+1)*n-t):1/2*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:function(n){return 1-r.easeOutBounce(1-n)},easeOutBounce:function(n){return(n/=1)<1/2.75?1*7.5625*n*n:n<2/2.75?1*(7.5625*(n-=1.5/2.75)*n+.75):n<2.5/2.75?1*(7.5625*(n-=2.25/2.75)*n+.9375):1*(7.5625*(n-=2.625/2.75)*n+.984375)},easeInOutBounce:function(n){return n<1/2?r.easeInBounce(n*2)*.5:r.easeOutBounce(n*2-1)*.5+1*.5}};t.requestAnimFrame=function(){return typeof window=="undefined"?function(n){n()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(n){return window.setTimeout(n,1e3/60)}}();t.getRelativePosition=function(n,i){var f,e,s=n.originalEvent||n,r=n.currentTarget||n.srcElement,u=r.getBoundingClientRect(),o=s.touches;o&&o.length>0?(f=o[0].clientX,e=o[0].clientY):(f=s.clientX,e=s.clientY);var h=parseFloat(t.getStyle(r,"padding-left")),c=parseFloat(t.getStyle(r,"padding-top")),l=parseFloat(t.getStyle(r,"padding-right")),a=parseFloat(t.getStyle(r,"padding-bottom")),v=u.right-u.left-h-l,y=u.bottom-u.top-c-a;return f=Math.round((f-u.left-h)/v*r.width/i.currentDevicePixelRatio),e=Math.round((e-u.top-c)/y*r.height/i.currentDevicePixelRatio),{x:f,y:e}};t.addEvent=function(n,t,i){n.addEventListener?n.addEventListener(t,i):n.attachEvent?n.attachEvent("on"+t,i):n["on"+t]=i};t.removeEvent=function(n,i,r){n.removeEventListener?n.removeEventListener(i,r,!1):n.detachEvent?n.detachEvent("on"+i,r):n["on"+i]=t.noop};t.getConstraintWidth=function(n){return e(n,"max-width","clientWidth")};t.getConstraintHeight=function(n){return e(n,"max-height","clientHeight")};t.getMaximumWidth=function(n){var i=n.parentNode,f=parseInt(t.getStyle(i,"padding-left"),10),e=parseInt(t.getStyle(i,"padding-right"),10),r=i.clientWidth-f-e,u=t.getConstraintWidth(n);return isNaN(u)?r:Math.min(r,u)};t.getMaximumHeight=function(n){var i=n.parentNode,f=parseInt(t.getStyle(i,"padding-top"),10),e=parseInt(t.getStyle(i,"padding-bottom"),10),r=i.clientHeight-f-e,u=t.getConstraintHeight(n);return isNaN(u)?r:Math.min(r,u)};t.getStyle=function(n,t){return n.currentStyle?n.currentStyle[t]:document.defaultView.getComputedStyle(n,null).getPropertyValue(t)};t.retinaScale=function(n){var t=n.currentDevicePixelRatio=window.devicePixelRatio||1;if(t!==1){var i=n.canvas,r=n.height,u=n.width;i.height=r*t;i.width=u*t;n.ctx.scale(t,t);i.style.height=r+"px";i.style.width=u+"px"}};t.clear=function(n){n.ctx.clearRect(0,0,n.width,n.height)};t.fontString=function(n,t,i){return t+" "+n+"px "+i};t.longestText=function(n,i,r,u){var o,f,e,s,h;if(u=u||{},o=u.data=u.data||{},f=u.garbageCollect=u.garbageCollect||[],u.font!==i&&(o=u.data={},f=u.garbageCollect=[],u.font=i),n.font=i,e=0,t.each(r,function(i){i!==undefined&&i!==null&&t.isArray(i)!==!0?e=t.measureText(n,o,f,e,i):t.isArray(i)&&t.each(i,function(i){i===undefined||i===null||t.isArray(i)||(e=t.measureText(n,o,f,e,i))})}),s=f.length/2,s>r.length){for(h=0;h<s;h++)delete o[f[h]];f.splice(0,s)}return e};t.measureText=function(n,t,i,r,u){var f=t[u];return f||(f=t[u]=n.measureText(u).width,i.push(u)),f>r&&(r=f),r};t.numberOfLabelLines=function(n){var i=1;return t.each(n,function(n){t.isArray(n)&&n.length>i&&(i=n.length)}),i};t.drawRoundedRectangle=function(n,t,i,r,u,f){n.beginPath();n.moveTo(t+f,i);n.lineTo(t+r-f,i);n.quadraticCurveTo(t+r,i,t+r,i+f);n.lineTo(t+r,i+u-f);n.quadraticCurveTo(t+r,i+u,t+r-f,i+u);n.lineTo(t+f,i+u);n.quadraticCurveTo(t,i+u,t,i+u-f);n.lineTo(t,i+f);n.quadraticCurveTo(t,i,t+f,i);n.closePath()};t.color=i?function(t){return t instanceof CanvasGradient&&(t=n.defaults.global.defaultColor),i(t)}:function(n){return console.error("Color.js not found!"),n};t.isArray=Array.isArray?function(n){return Array.isArray(n)}:function(n){return Object.prototype.toString.call(n)==="[object Array]"};t.arrayEquals=function(n,i){var r,e,u,f;if(!n||!i||n.length!==i.length)return!1;for(r=0,e=n.length;r<e;++r)if(u=n[r],f=i[r],u instanceof Array&&f instanceof Array){if(!t.arrayEquals(u,f))return!1}else if(u!==f)return!1;return!0};t.callback=function(n,t,i){n&&typeof n.call=="function"&&n.apply(i,t)};t.getHoverColor=function(n){return n instanceof CanvasPattern?n:t.color(n).saturate(.5).darken(.1).rgbString()};t.callCallback=t.callback}},{"2":2}],27:[function(n,t){"use strict";t.exports=function(n){function t(n,t){return n.native?{x:n.x,y:n.y}:e.getRelativePosition(n,t)}function i(n,t){for(var s=n.data.datasets,u,r,o,f,i=0,e=s.length;i<e;++i)if(n.isDatasetVisible(i))for(u=n.getDatasetMeta(i),r=0,o=u.data.length;r<o;++r)f=u.data[r],f._view.skip||t(f)}function r(n,t){var r=[];return i(n,function(n){n.inRange(t.x,t.y)&&r.push(n)}),r}function u(n,t,r,u){var f=Number.POSITIVE_INFINITY,o=[];return u||(u=e.distanceBetweenPoints),i(n,function(n){if(!r||n.inRange(t.x,t.y)){var e=n.getCenterPoint(),i=u(t,e);i<f?(o=[n],f=i):i===f&&o.push(n)}}),o}function f(n,i,f){var e=t(i,n),h=function(n,t){return Math.abs(n.x-t.x)},o=f.intersect?r(n,e):u(n,e,!1,h),s=[];return o.length?(n.data.datasets.forEach(function(t,i){if(n.isDatasetVisible(i)){var u=n.getDatasetMeta(i),r=u.data[o[0]._index];r&&!r._view.skip&&s.push(r)}}),s):[]}var e=n.helpers;n.Interaction={modes:{single:function(n,r){var f=t(r,n),u=[];return i(n,function(n){if(n.inRange(f.x,f.y))return u.push(n),u}),u.slice(0,1)},label:f,index:f,dataset:function(n,i,f){var o=t(i,n),e=f.intersect?r(n,o):u(n,o,!1);return e.length>0&&(e=n.getDatasetMeta(e[0]._datasetIndex).data),e},"x-axis":function(n,t){return f(n,t,!0)},point:function(n,i){var u=t(i,n);return r(n,u)},nearest:function(n,i,r){var e=t(i,n),f=u(n,e,r.intersect);return f.length>1&&f.sort(function(n,t){var r=n.getArea(),u=t.getArea(),i=r-u;return i===0&&(i=n._datasetIndex-t._datasetIndex),i}),f.slice(0,1)},x:function(n,r,u){var f=t(r,n),e=[],o=!1;return i(n,function(n){n.inXRange(f.x)&&e.push(n);n.inRange(f.x,f.y)&&(o=!0)}),u.intersect&&!o&&(e=[]),e},y:function(n,r,u){var f=t(r,n),e=[],o=!1;return i(n,function(n){n.inYRange(f.y)&&e.push(n);n.inRange(f.x,f.y)&&(o=!0)}),u.intersect&&!o&&(e=[]),e}}}}},{}],28:[function(n,t){"use strict";t.exports=function(){var n=function(n,t){return this.construct(n,t),this};return n.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(n){var t=[],i;for(t.push('<ul class="'+n.id+'-legend">'),i=0;i<n.data.datasets.length;i++)t.push('<li><span style="background-color:'+n.data.datasets[i].backgroundColor+'"><\/span>'),n.data.datasets[i].label&&t.push(n.data.datasets[i].label),t.push("<\/li>");return t.push("<\/ul>"),t.join("")}}},n.Chart=n,n}},{}],29:[function(n,t){"use strict";t.exports=function(n){function i(n,i){return t.where(n,function(n){return n.position===i})}function r(n,t){n.forEach(function(n,t){return n._tmpIndex_=t,n});n.sort(function(n,i){var r=t?i:n,u=t?n:i;return r.weight===u.weight?r._tmpIndex_-u._tmpIndex_:r.weight-u.weight});n.forEach(function(n){delete n._tmpIndex_})}var t=n.helpers;n.layoutService={defaults:{},addBox:function(n,t){n.boxes||(n.boxes=[]);t.fullWidth=t.fullWidth||!1;t.position=t.position||"top";t.weight=t.weight||0;n.boxes.push(t)},removeBox:function(n,t){var i=n.boxes?n.boxes.indexOf(t):-1;i!==-1&&n.boxes.splice(i,1)},configure:function(n,t,i){for(var f=["fullWidth","position","weight"],e=f.length,u=0,r;u<e;++u)r=f[u],i.hasOwnProperty(r)&&(t[r]=i[r])},update:function(n,u,f){function ni(n){var t,i=n.isHorizontal();i?(t=n.update(n.fullWidth?ut:v,gt),y-=t.height):(t=n.update(dt,pt),v-=t.width);st.push({horizontal:i,minSize:t,box:n})}function wt(n){var i=t.findNextWhere(st,function(t){return t.box===n}),r;i&&(n.isHorizontal()?(r={left:Math.max(e,ft),right:Math.max(w,et),top:0,bottom:0},n.update(n.fullWidth?ut:v,ot/2,r)):n.update(i.minSize.width,y))}function ti(n){var i=t.findNextWhere(st,function(t){return t.box===n}),r={left:0,right:0,top:o,bottom:b};i&&n.update(i.minSize.width,y,r)}function vt(n){n.isHorizontal()?(n.left=n.fullWidth?p:e,n.right=n.fullWidth?u-k:e+v,n.top=rt,n.bottom=rt+n.height,rt=n.bottom):(n.left=it,n.right=it+n.width,n.top=o,n.bottom=o+y,it=n.right)}var lt,at,nt,tt,it,rt;if(n){var yt=n.options.layout,c=yt?yt.padding:null,p=0,k=0,d=0,g=0;isNaN(c)?(p=c.left||0,k=c.right||0,d=c.top||0,g=c.bottom||0):(p=c,k=c,d=c,g=c);var s=i(n.boxes,"left"),h=i(n.boxes,"right"),l=i(n.boxes,"top"),a=i(n.boxes,"bottom"),bt=i(n.boxes,"chartArea");r(s,!0);r(h,!1);r(l,!0);r(a,!1);var ut=u-p-k,ot=f-d-g,kt=ut/2,pt=ot/2,dt=(u-kt)/(s.length+h.length),gt=(f-pt)/(l.length+a.length),v=ut,y=ot,st=[];t.each(s.concat(h,l,a),ni);var ft=0,et=0,ht=0,ct=0;t.each(l.concat(a),function(n){if(n.getPadding){var t=n.getPadding();ft=Math.max(ft,t.left);et=Math.max(et,t.right)}});t.each(s.concat(h),function(n){if(n.getPadding){var t=n.getPadding();ht=Math.max(ht,t.top);ct=Math.max(ct,t.bottom)}});var e=p,w=k,o=d,b=g;t.each(s.concat(h),wt);t.each(s,function(n){e+=n.width});t.each(h,function(n){w+=n.width});t.each(l.concat(a),wt);t.each(l,function(n){o+=n.height});t.each(a,function(n){b+=n.height});t.each(s.concat(h),ti);e=p;w=k;o=d;b=g;t.each(s,function(n){e+=n.width});t.each(h,function(n){w+=n.width});t.each(l,function(n){o+=n.height});t.each(a,function(n){b+=n.height});lt=Math.max(ft-e,0);e+=lt;w+=Math.max(et-w,0);at=Math.max(ht-o,0);o+=at;b+=Math.max(ct-b,0);nt=f-o-b;tt=u-e-w;(tt!==v||nt!==y)&&(t.each(s,function(n){n.height=nt}),t.each(h,function(n){n.height=nt}),t.each(l,function(n){n.fullWidth||(n.width=tt)}),t.each(a,function(n){n.fullWidth||(n.width=tt)}),y=nt,v=tt);it=p+lt;rt=d+at;t.each(s.concat(l),vt);it+=v;rt+=y;t.each(h,vt);t.each(a,vt);n.chartArea={left:e,top:o,right:e+v,bottom:o+y};t.each(bt,function(t){t.left=n.chartArea.left;t.top=n.chartArea.top;t.right=n.chartArea.right;t.bottom=n.chartArea.bottom;t.update(v,y)})}}}}},{}],30:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers;n.defaults.global.plugins={};n.plugins={_plugins:[],_cacheId:0,register:function(n){var t=this._plugins;[].concat(n).forEach(function(n){t.indexOf(n)===-1&&t.push(n)});this._cacheId++},unregister:function(n){var t=this._plugins;[].concat(n).forEach(function(n){var i=t.indexOf(n);i!==-1&&t.splice(i,1)});this._cacheId++},clear:function(){this._plugins=[];this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(n,t,i){for(var s=this.descriptors(n),h=s.length,u,f,e,o,r=0;r<h;++r)if(u=s[r],f=u.plugin,o=f[t],typeof o=="function"&&(e=[n].concat(i||[]),e.push(u.options),o.apply(f,e)===!1))return!1;return!0},descriptors:function(i){var r=i._plugins||(i._plugins={});if(r.id===this._cacheId)return r.descriptors;var e=[],u=[],f=i&&i.config||{},o=n.defaults.global.plugins,s=f.options&&f.options.plugins||{};return this._plugins.concat(f.plugins||[]).forEach(function(n){var f=e.indexOf(n),r,i;f===-1&&(r=n.id,i=s[r],i!==!1)&&(i===!0&&(i=t.clone(o[r])),e.push(n),u.push({plugin:n,options:i||{}}))}),r.descriptors=u,r.id=this._cacheId,u}};n.pluginService=n.plugins;n.PluginBase=n.Element.extend({})}},{}],31:[function(n,t){"use strict";t.exports=function(n){function r(n,i,r){return t.isArray(i)?t.longestText(n,r,i):n.measureText(i).width}function i(i){var r=t.getValueOrDefault,u=n.defaults.global,f=r(i.fontSize,u.defaultFontSize),e=r(i.fontStyle,u.defaultFontStyle),o=r(i.fontFamily,u.defaultFontFamily);return{size:f,style:e,family:o,font:t.fontString(f,e,o)}}var t=n.helpers;n.defaults.scale={display:!0,position:"left",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:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:n.Ticks.formatters.values}};n.Scale=n.Element.extend({getPadding:function(){var n=this;return{left:n.paddingLeft||0,top:n.paddingTop||0,right:n.paddingRight||0,bottom:n.paddingBottom||0}},beforeUpdate:function(){t.callback(this.options.beforeUpdate,[this])},update:function(n,i,r){var u=this;return u.beforeUpdate(),u.maxWidth=n,u.maxHeight=i,u.margins=t.extend({left:0,right:0,top:0,bottom:0},r),u.longestTextCache=u.longestTextCache||{},u.beforeSetDimensions(),u.setDimensions(),u.afterSetDimensions(),u.beforeDataLimits(),u.determineDataLimits(),u.afterDataLimits(),u.beforeBuildTicks(),u.buildTicks(),u.afterBuildTicks(),u.beforeTickToLabelConversion(),u.convertTicksToLabels(),u.afterTickToLabelConversion(),u.beforeCalculateTickRotation(),u.calculateTickRotation(),u.afterCalculateTickRotation(),u.beforeFit(),u.fit(),u.afterFit(),u.afterUpdate(),u.minSize},afterUpdate:function(){t.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){t.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var n=this;n.isHorizontal()?(n.width=n.maxWidth,n.left=0,n.right=n.width):(n.height=n.maxHeight,n.top=0,n.bottom=n.height);n.paddingLeft=0;n.paddingTop=0;n.paddingRight=0;n.paddingBottom=0},afterSetDimensions:function(){t.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){t.callback(this.options.beforeDataLimits,[this])},determineDataLimits:t.noop,afterDataLimits:function(){t.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){t.callback(this.options.beforeBuildTicks,[this])},buildTicks:t.noop,afterBuildTicks:function(){t.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){t.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var n=this,t=n.options.ticks;n.ticks=n.ticks.map(t.userCallback||t.callback)},afterTickToLabelConversion:function(){t.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){t.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var n=this,o=n.ctx,u=n.options.ticks,s=i(u),r,e;if(o.font=s.font,r=u.minRotation||0,n.options.display&&n.isHorizontal())for(var f=t.longestText(o,s.font,n.ticks,n.longestTextCache),h=f,c,l,a=n.getPixelForTick(1)-n.getPixelForTick(0)-6;h>a&&r<u.maxRotation;){if(e=t.toRadians(r),c=Math.cos(e),l=Math.sin(e),l*f>n.maxHeight){r--;break}r++;h=c*f}n.labelRotation=r},afterCalculateTickRotation:function(){t.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){t.callback(this.options.beforeFit,[this])},fit:function(){var n=this,u=n.minSize={width:0,height:0},e=n.options,l=e.ticks,v=e.scaleLabel,y=e.gridLines,s=e.display,h=n.isHorizontal(),f=i(l),p=i(v).size*1.5,w=e.gridLines.tickMarkLength;if(u.width=h?n.isFullWidth()?n.maxWidth-n.margins.left-n.margins.right:n.maxWidth:s&&y.drawTicks?w:0,u.height=h?s&&y.drawTicks?w:0:n.maxHeight,v.display&&s&&(h?u.height+=p:u.width+=p),l.display&&s){var o=t.longestText(n.ctx,f.font,n.ticks,n.longestTextCache),b=t.numberOfLabelLines(n.ticks),a=f.size*.5;if(h){n.longestLabelWidth=o;var k=t.toRadians(n.labelRotation),c=Math.cos(k),nt=Math.sin(k),tt=nt*o+f.size*b+a*b;u.height=Math.min(n.maxHeight,u.height+tt);n.ctx.font=f.font;var it=n.ticks[0],d=r(n.ctx,it,f.font),rt=n.ticks[n.ticks.length-1],g=r(n.ctx,rt,f.font);n.labelRotation!==0?(n.paddingLeft=e.position==="bottom"?c*d+3:c*a+3,n.paddingRight=e.position==="bottom"?c*a+3:c*g+3):(n.paddingLeft=d/2+3,n.paddingRight=g/2+3)}else l.mirror?o=0:o+=n.options.ticks.padding,u.width=Math.min(n.maxWidth,u.width+o),n.paddingTop=f.size/2,n.paddingBottom=f.size/2}n.handleMargins();n.width=u.width;n.height=u.height},handleMargins:function(){var n=this;n.margins&&(n.paddingLeft=Math.max(n.paddingLeft-n.margins.left,0),n.paddingTop=Math.max(n.paddingTop-n.margins.top,0),n.paddingRight=Math.max(n.paddingRight-n.margins.right,0),n.paddingBottom=Math.max(n.paddingBottom-n.margins.bottom,0))},afterFit:function(){t.callback(this.options.afterFit,[this])},isHorizontal:function(){return this.options.position==="top"||this.options.position==="bottom"},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(n){return n===null||typeof n=="undefined"?NaN:typeof n=="number"&&!isFinite(n)?NaN:typeof n=="object"?n instanceof Date||n.isValid?n:this.getRightValue(this.isHorizontal()?n.x:n.y):n},getLabelForIndex:t.noop,getPixelForValue:t.noop,getValueForPixel:t.noop,getPixelForTick:function(n,t){var i=this,f,e;if(i.isHorizontal()){var o=i.width-(i.paddingLeft+i.paddingRight),r=o/Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),u=r*n+i.paddingLeft;return t&&(u+=r/2),f=i.left+Math.round(u),f+(i.isFullWidth()?i.margins.left:0)}return e=i.height-(i.paddingTop+i.paddingBottom),i.top+n*(e/(i.ticks.length-1))},getPixelForDecimal:function(n){var t=this;if(t.isHorizontal()){var i=t.width-(t.paddingLeft+t.paddingRight),r=i*n+t.paddingLeft,u=t.left+Math.round(r);return u+(t.isFullWidth()?t.margins.left:0)}return t.top+n*t.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var n=this,t=n.min,i=n.max;return n.beginAtZero?0:t<0&&i<0?i:t>0&&i>0?t:0},draw:function(r){var u=this,o=u.options,k,d,g,nt,tt;if(o.display){var f=u.ctx,a=n.defaults.global,h=o.ticks,e=o.gridLines,v=o.scaleLabel,y=u.labelRotation!==0,s,ht=h.autoSkip,p=u.isHorizontal(),w;h.maxTicksLimit&&(w=h.maxTicksLimit);var ct=t.getValueOrDefault(h.fontColor,a.defaultFontColor),et=i(h),c=e.drawTicks?e.tickMarkLength:0,lt=t.getValueOrDefault(v.fontColor,a.defaultFontColor),l=i(v),ot=t.toRadians(u.labelRotation),at=Math.cos(ot),st=u.longestLabelWidth*at;if(f.fillStyle=ct,k=[],p){if(s=!1,(st+h.autoSkipPadding)*u.ticks.length>u.width-(u.paddingLeft+u.paddingRight)&&(s=1+Math.floor((st+h.autoSkipPadding)*u.ticks.length/(u.width-(u.paddingLeft+u.paddingRight)))),w&&u.ticks.length>w)while(!s||u.ticks.length/(s||1)>w)s||(s=1),s+=1;ht||(s=!1)}var vt=o.position==="right"?u.left:u.right-c,yt=o.position==="right"?u.left+c:u.right,pt=o.position==="bottom"?u.top:u.bottom-c,wt=o.position==="bottom"?u.top+c:u.bottom;if(t.each(u.ticks,function(n,i){var kt,dt,l,g,nt,tt,it,rt,ut,ft,et,st,ht,ct,lt,v,f,w,gt,b,at,d,bt;n!==undefined&&n!==null&&(kt=u.ticks.length===i+1,dt=s>1&&i%s>0||i%s==0&&i+s>=u.ticks.length,(!dt||kt)&&n!==undefined&&n!==null)&&(i===(typeof u.zeroLineIndex!="undefined"?u.zeroLineIndex:0)?(l=e.zeroLineWidth,g=e.zeroLineColor,nt=e.zeroLineBorderDash,tt=e.zeroLineBorderDashOffset):(l=t.getValueAtIndexOrDefault(e.lineWidth,i),g=t.getValueAtIndexOrDefault(e.color,i),nt=t.getValueOrDefault(e.borderDash,a.borderDash),tt=t.getValueOrDefault(e.borderDashOffset,a.borderDashOffset)),f="middle",w="middle",p?(o.position==="bottom"?(w=y?"middle":"top",f=y?"right":"center",v=u.top+c):(w=y?"middle":"bottom",f=y?"left":"center",v=u.bottom-c),gt=u.getPixelForTick(i)+t.aliasPixel(l),lt=u.getPixelForTick(i,e.offsetGridLines)+h.labelOffset,it=ut=et=ht=gt,rt=pt,ft=wt,st=r.top,ct=r.bottom):(b=o.position==="left",at=h.padding,h.mirror?(f=b?"left":"right",d=at):(f=b?"right":"left",d=c+at),lt=b?u.right-d:u.left+d,bt=u.getPixelForTick(i),bt+=t.aliasPixel(l),v=u.getPixelForTick(i,e.offsetGridLines),it=vt,ut=yt,et=r.left,ht=r.right,rt=ft=st=ct=bt),k.push({tx1:it,ty1:rt,tx2:ut,ty2:ft,x1:et,y1:st,x2:ht,y2:ct,labelX:lt,labelY:v,glWidth:l,glColor:g,glBorderDash:nt,glBorderDashOffset:tt,rotation:-1*ot,label:n,textBaseline:w,textAlign:f}))}),t.each(k,function(n){var i,r,u;if(e.display&&(f.save(),f.lineWidth=n.glWidth,f.strokeStyle=n.glColor,f.setLineDash&&(f.setLineDash(n.glBorderDash),f.lineDashOffset=n.glBorderDashOffset),f.beginPath(),e.drawTicks&&(f.moveTo(n.tx1,n.ty1),f.lineTo(n.tx2,n.ty2)),e.drawOnChartArea&&(f.moveTo(n.x1,n.y1),f.lineTo(n.x2,n.y2)),f.stroke(),f.restore()),h.display){if(f.save(),f.translate(n.labelX,n.labelY),f.rotate(n.rotation),f.font=et.font,f.textBaseline=n.textBaseline,f.textAlign=n.textAlign,i=n.label,t.isArray(i))for(r=0,u=0;r<i.length;++r)f.fillText(""+i[r],0,u),u+=et.size*1.5;else f.fillText(i,0,0);f.restore()}}),v.display&&(nt=0,p?(d=u.left+(u.right-u.left)/2,g=o.position==="bottom"?u.bottom-l.size/2:u.top+l.size/2):(tt=o.position==="left",d=tt?u.left+l.size/2:u.right-l.size/2,g=u.top+(u.bottom-u.top)/2,nt=tt?-.5*Math.PI:.5*Math.PI),f.save(),f.translate(d,g),f.rotate(nt),f.textAlign="center",f.textBaseline="middle",f.fillStyle=lt,f.font=l.font,f.fillText(v.labelString,0,0),f.restore()),e.drawBorder){f.lineWidth=t.getValueAtIndexOrDefault(e.lineWidth,0);f.strokeStyle=t.getValueAtIndexOrDefault(e.color,0);var it=u.left,rt=u.right,ut=u.top,ft=u.bottom,b=t.aliasPixel(f.lineWidth);p?(ut=ft=o.position==="top"?u.bottom:u.top,ut+=b,ft+=b):(it=rt=o.position==="left"?u.right:u.left,it+=b,rt+=b);f.beginPath();f.moveTo(it,ut);f.lineTo(rt,ft);f.stroke()}}}})}},{}],32:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers;n.scaleService={constructors:{},defaults:{},registerScaleType:function(n,i,r){this.constructors[n]=i;this.defaults[n]=t.clone(r)},getScaleConstructor:function(n){return this.constructors.hasOwnProperty(n)?this.constructors[n]:undefined},getScaleDefaults:function(i){return this.defaults.hasOwnProperty(i)?t.scaleMerge(n.defaults.scale,this.defaults[i]):{}},updateScaleDefaults:function(n,i){var r=this.defaults;r.hasOwnProperty(n)&&(r[n]=t.extend(r[n],i))},addScalesToLayout:function(i){t.each(i.scales,function(t){t.fullWidth=t.options.fullWidth;t.position=t.options.position;t.weight=t.options.weight;n.layoutService.addBox(i,t)})}}}},{}],33:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers;n.Ticks={generators:{linear:function(n,i){var e=[],r,h,f,o,u,s;for(n.stepSize&&n.stepSize>0?r=n.stepSize:(h=t.niceNum(i.max-i.min,!1),r=t.niceNum(h/(n.maxTicks-1),!0)),f=Math.floor(i.min/r)*r,o=Math.ceil(i.max/r)*r,n.min&&n.max&&n.stepSize&&t.almostWhole((n.max-n.min)/n.stepSize,r/1e3)&&(f=n.min,o=n.max),u=(o-f)/r,u=t.almostEquals(u,Math.round(u),r/1e3)?Math.round(u):Math.ceil(u),e.push(n.min!==undefined?n.min:f),s=1;s<u;++s)e.push(f+s*r);return e.push(n.max!==undefined?n.max:o),e},logarithmic:function(n,i){var e=[],s=t.getValueOrDefault,u=s(n.min,Math.pow(10,Math.floor(t.log10(i.min)))),o=Math.floor(t.log10(i.max)),c=Math.ceil(i.max/Math.pow(10,o)),r,f,h;u===0?(r=Math.floor(t.log10(i.minNotZero)),f=Math.floor(i.minNotZero/Math.pow(10,r)),e.push(u),u=f*Math.pow(10,r)):(r=Math.floor(t.log10(u)),f=Math.floor(u/Math.pow(10,r)));do e.push(u),++f,f===10&&(f=1,++r),u=f*Math.pow(10,r);while(r<o||r===o&&f<c);return h=s(n.max,u),e.push(h),e}},formatters:{values:function(n){return t.isArray(n)?n:""+n},linear:function(n,i,r){var e=r.length>3?r[2]-r[1]:r[1]-r[0],o,u,f;return Math.abs(e)>1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),o=t.log10(Math.abs(e)),u="",n!==0?(f=-1*Math.floor(o),f=Math.max(Math.min(f,20),0),u=n.toFixed(f)):u="0",u},logarithmic:function(n,i,r){var u=n/Math.pow(10,Math.floor(t.log10(n)));return n===0?"0":u===1||u===2||u===5||i===0||i===r.length-1?n.toExponential():""}}}}},{}],34:[function(n,t){"use strict";t.exports=function(n){function r(n,i){var r=t.color(n);return r.alpha(i*r.alpha()).rgbaString()}function i(n,i){return i&&(t.isArray(i)?Array.prototype.push.apply(n,i):n.push(i)),n}function f(n){var r=n._xScale,u=n._yScale||n._scale,t=n._index,i=n._datasetIndex;return{xLabel:r?r.getLabelForIndex(t,i):"",yLabel:u?u.getLabelForIndex(t,i):"",index:t,datasetIndex:i,x:n._model.x,y:n._model.y}}function u(i){var r=n.defaults.global,u=t.getValueOrDefault;return{xPadding:i.xPadding,yPadding:i.yPadding,xAlign:i.xAlign,yAlign:i.yAlign,bodyFontColor:i.bodyFontColor,_bodyFontFamily:u(i.bodyFontFamily,r.defaultFontFamily),_bodyFontStyle:u(i.bodyFontStyle,r.defaultFontStyle),_bodyAlign:i.bodyAlign,bodyFontSize:u(i.bodyFontSize,r.defaultFontSize),bodySpacing:i.bodySpacing,titleFontColor:i.titleFontColor,_titleFontFamily:u(i.titleFontFamily,r.defaultFontFamily),_titleFontStyle:u(i.titleFontStyle,r.defaultFontStyle),titleFontSize:u(i.titleFontSize,r.defaultFontSize),_titleAlign:i.titleAlign,titleSpacing:i.titleSpacing,titleMarginBottom:i.titleMarginBottom,footerFontColor:i.footerFontColor,_footerFontFamily:u(i.footerFontFamily,r.defaultFontFamily),_footerFontStyle:u(i.footerFontStyle,r.defaultFontStyle),footerFontSize:u(i.footerFontSize,r.defaultFontSize),_footerAlign:i.footerAlign,footerSpacing:i.footerSpacing,footerMarginTop:i.footerMarginTop,caretSize:i.caretSize,cornerRadius:i.cornerRadius,backgroundColor:i.backgroundColor,opacity:0,legendColorBackground:i.multiKeyBackground,displayColors:i.displayColors,borderColor:i.borderColor,borderWidth:i.borderWidth}}function e(n,i){var f=n._chart.ctx,r=i.yPadding*2,e=0,a=i.body,o=a.reduce(function(n,t){return n+t.before.length+t.lines.length+t.after.length},0),c,u;o+=i.beforeBody.length+i.afterBody.length;var s=i.title.length,h=i.footer.length,v=i.titleFontSize,l=i.bodyFontSize,y=i.footerFontSize;return r+=s*v,r+=s?(s-1)*i.titleSpacing:0,r+=s?i.titleMarginBottom:0,r+=o*l,r+=o?(o-1)*i.bodySpacing:0,r+=h?i.footerMarginTop:0,r+=h*y,r+=h?(h-1)*i.footerSpacing:0,c=0,u=function(n){e=Math.max(e,f.measureText(n).width+c)},f.font=t.fontString(v,i._titleFontStyle,i._titleFontFamily),t.each(i.title,u),f.font=t.fontString(l,i._bodyFontStyle,i._bodyFontFamily),t.each(i.beforeBody.concat(i.afterBody),u),c=i.displayColors?l+2:0,t.each(a,function(n){t.each(n.before,u);t.each(n.lines,u);t.each(n.after,u)}),c=0,f.font=t.fontString(y,i._footerFontStyle,i._footerFontFamily),t.each(i.footer,u),e+=2*i.xPadding,{width:e,height:r}}function o(n,t){var i=n._model,o=n._chart,e=n._chart.chartArea,u="center",r="center",s,h,a,v,c,l,y,f;return i.y<t.height?r="top":i.y>o.height-t.height&&(r="bottom"),l=(e.left+e.right)/2,y=(e.top+e.bottom)/2,r==="center"?(s=function(n){return n<=l},h=function(n){return n>l}):(s=function(n){return n<=t.width/2},h=function(n){return n>=o.width-t.width/2}),a=function(n){return n+t.width>o.width},v=function(n){return n-t.width<0},c=function(n){return n<=y?"top":"bottom"},s(i.x)?(u="left",a(i.x)&&(u="center",r=c(i.y))):h(i.x)&&(u="right",v(i.x)&&(u="center",r=c(i.y))),f=n._options,{xAlign:f.xAlign?f.xAlign:u,yAlign:f.yAlign?f.yAlign:r}}function s(n,t,i){var r=n.x,e=n.y,c=n.caretSize,s=n.caretPadding,l=n.cornerRadius,u=i.xAlign,o=i.yAlign,f=c+s,h=l+s;return u==="right"?r-=t.width:u==="center"&&(r-=t.width/2),o==="top"?e+=f:e-=o==="bottom"?t.height+f:t.height/2,o==="center"?u==="left"?r+=f:u==="right"&&(r-=f):u==="left"?r-=h:u==="right"&&(r+=h),{x:r,y:e}}var t=n.helpers;n.defaults.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:t.noop,title:function(n,t){var r="",u=t.labels,f=u?u.length:0,i;return n.length>0&&(i=n[0],i.xLabel?r=i.xLabel:f>0&&i.index<f&&(r=u[i.index])),r},afterTitle:t.noop,beforeBody:t.noop,beforeLabel:t.noop,label:function(n,t){var i=t.datasets[n.datasetIndex].label||"";return i&&(i+=": "),i+n.yLabel},labelColor:function(n,t){var r=t.getDatasetMeta(n.datasetIndex),u=r.data[n.index],i=u._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},afterLabel:t.noop,afterBody:t.noop,beforeFooter:t.noop,footer:t.noop,afterFooter:t.noop}};n.Tooltip=n.Element.extend({initialize:function(){this._model=u(this._options)},getTitle:function(){var t=this,u=t._options,r=u.callbacks,f=r.beforeTitle.apply(t,arguments),e=r.title.apply(t,arguments),o=r.afterTitle.apply(t,arguments),n=[];return n=i(n,f),n=i(n,e),i(n,o)},getBeforeBody:function(){var n=this._options.callbacks.beforeBody.apply(this,arguments);return t.isArray(n)?n:n!==undefined?[n]:[]},getBody:function(n,r){var u=this,f=u._options.callbacks,e=[];return t.each(n,function(n){var t={before:[],lines:[],after:[]};i(t.before,f.beforeLabel.call(u,n,r));i(t.lines,f.label.call(u,n,r));i(t.after,f.afterLabel.call(u,n,r));e.push(t)}),e},getAfterBody:function(){var n=this._options.callbacks.afterBody.apply(this,arguments);return t.isArray(n)?n:n!==undefined?[n]:[]},getFooter:function(){var t=this,r=t._options.callbacks,u=r.beforeFooter.apply(t,arguments),f=r.footer.apply(t,arguments),e=r.afterFooter.apply(t,arguments),n=[];return n=i(n,u),n=i(n,f),i(n,e)},update:function(i){var h=this,l=h._options,a=h._model,r=h._model=u(l),w=h._active,v=h._data,b={xAlign:a.xAlign,yAlign:a.yAlign},d={x:a.x,y:a.y},y={width:a.width,height:a.height},p={x:a.caretX,y:a.caretY},k,nt,g,c;if(w.length){for(r.opacity=1,g=[],p=n.Tooltip.positioners[l.position](w,h._eventPosition),c=[],k=0,nt=w.length;k<nt;++k)c.push(f(w[k]));l.filter&&(c=c.filter(function(n){return l.filter(n,v)}));l.itemSort&&(c=c.sort(function(n,t){return l.itemSort(n,t,v)}));t.each(c,function(n){g.push(l.callbacks.labelColor.call(h,n,h._chart))});r.title=h.getTitle(c,v);r.beforeBody=h.getBeforeBody(c,v);r.body=h.getBody(c,v);r.afterBody=h.getAfterBody(c,v);r.footer=h.getFooter(c,v);r.x=Math.round(p.x);r.y=Math.round(p.y);r.caretPadding=l.caretPadding;r.labelColors=g;r.dataPoints=c;y=e(this,r);b=o(this,y);d=s(r,y,b)}else r.opacity=0;return r.xAlign=b.xAlign,r.yAlign=b.yAlign,r.x=d.x,r.y=d.y,r.width=y.width,r.height=y.height,r.caretX=p.x,r.caretY=p.y,h._model=r,i&&l.custom&&l.custom.call(h,r),h},drawCaret:function(n,t){var r=this._chart.ctx,u=this._view,i=this.getCaretPosition(n,t,u);r.lineTo(i.x1,i.y1);r.lineTo(i.x2,i.y2);r.lineTo(i.x3,i.y3)},getCaretPosition:function(n,t,i){var u,f,o,e,s,h,r=i.caretSize,y=i.cornerRadius,l=i.xAlign,p=i.yAlign,c=n.x,a=n.y,v=t.width,w=t.height,b;return p==="center"?(s=a+w/2,l==="left"?(u=c,f=u-r,o=u,e=s+r,h=s-r):(u=c+v,f=u+r,o=u,e=s-r,h=s+r)):(l==="left"?(f=c+y+r,u=f-r,o=f+r):l==="right"?(f=c+v-y-r,u=f-r,o=f+r):(f=c+v/2,u=f-r,o=f+r),p==="top"?(e=a,s=e-r,h=e):(e=a+w,s=e+r,h=e,b=o,o=u,u=b)),{x1:u,x2:f,x3:o,y1:e,y2:s,y3:h}},drawTitle:function(n,i,u,f){var o=i.title,s,h,e,c;if(o.length)for(u.textAlign=i._titleAlign,u.textBaseline="top",s=i.titleFontSize,h=i.titleSpacing,u.fillStyle=r(i.titleFontColor,f),u.font=t.fontString(s,i._titleFontStyle,i._titleFontFamily),e=0,c=o.length;e<c;++e)u.fillText(o[e],n.x,n.y),n.y+=s+h,e+1===o.length&&(n.y+=i.titleMarginBottom-h)},drawBody:function(n,i,u,f){var e=i.bodyFontSize,l=i.bodySpacing,a=i.body,h,s,o,c;u.textAlign=i._bodyAlign;u.textBaseline="top";h=r(i.bodyFontColor,f);u.fillStyle=h;u.font=t.fontString(e,i._bodyFontStyle,i._bodyFontFamily);s=0;o=function(t){u.fillText(t,n.x+s,n.y);n.y+=e+l};t.each(i.beforeBody,o);c=i.displayColors;s=c?e+2:0;t.each(a,function(s,l){t.each(s.before,o);t.each(s.lines,function(t){c&&(u.fillStyle=r(i.legendColorBackground,f),u.fillRect(n.x,n.y,e,e),u.strokeStyle=r(i.labelColors[l].borderColor,f),u.strokeRect(n.x,n.y,e,e),u.fillStyle=r(i.labelColors[l].backgroundColor,f),u.fillRect(n.x+1,n.y+1,e-2,e-2),u.fillStyle=h);o(t)});t.each(s.after,o)});s=0;t.each(i.afterBody,o);n.y-=l},drawFooter:function(n,i,u,f){var e=i.footer;e.length&&(n.y+=i.footerMarginTop,u.textAlign=i._footerAlign,u.textBaseline="top",u.fillStyle=r(i.footerFontColor,f),u.font=t.fontString(i.footerFontSize,i._footerFontStyle,i._footerFontFamily),t.each(e,function(t){u.fillText(t,n.x,n.y);n.y+=i.footerFontSize+i.footerSpacing}))},drawBackground:function(n,t,i,u,f){i.fillStyle=r(t.backgroundColor,f);i.strokeStyle=r(t.borderColor,f);i.lineWidth=t.borderWidth;var a=t.xAlign,l=t.yAlign,e=n.x,o=n.y,h=u.width,c=u.height,s=t.cornerRadius;i.beginPath();i.moveTo(e+s,o);l==="top"&&this.drawCaret(n,u);i.lineTo(e+h-s,o);i.quadraticCurveTo(e+h,o,e+h,o+s);l==="center"&&a==="right"&&this.drawCaret(n,u);i.lineTo(e+h,o+c-s);i.quadraticCurveTo(e+h,o+c,e+h-s,o+c);l==="bottom"&&this.drawCaret(n,u);i.lineTo(e+s,o+c);i.quadraticCurveTo(e,o+c,e,o+c-s);l==="center"&&a==="left"&&this.drawCaret(n,u);i.lineTo(e,o+s);i.quadraticCurveTo(e,o,e+s,o);i.closePath();i.fill();t.borderWidth>0&&i.stroke()},draw:function(){var i=this._chart.ctx,n=this._view;if(n.opacity!==0){var u={width:n.width,height:n.height},t={x:n.x,y:n.y},r=Math.abs(n.opacity<.001)?0:n.opacity,f=n.title.length||n.beforeBody.length||n.body.length||n.afterBody.length||n.footer.length;this._options.enabled&&f&&(this.drawBackground(t,n,i,u,r),t.x+=n.xPadding,t.y+=n.yPadding,this.drawTitle(t,n,i,r),this.drawBody(t,n,i,r),this.drawFooter(t,n,i,r))}},handleEvent:function(n){var i=this,r=i._options,u=!1,f;return(i._lastActive=i._lastActive||[],i._active=n.type==="mouseout"?[]:i._chart.getElementsAtEventForMode(n,r.mode,r),u=!t.arrayEquals(i._active,i._lastActive),!u)?!1:(i._lastActive=i._active,(r.enabled||r.custom)&&(i._eventPosition={x:n.x,y:n.y},f=i._model,i.update(!0),i.pivot(),u|=f.x!==i._model.x||f.y!==i._model.y),u)}});n.Tooltip.positioners={average:function(n){var i,u;if(!n.length)return!1;for(var e=0,o=0,r=0,t=0,f=n.length;t<f;++t)i=n[t],i&&i.hasValue()&&(u=i.tooltipPosition(),e+=u.x,o+=u.y,++r);return{x:Math.round(e/r),y:Math.round(o/r)}},nearest:function(n,i){for(var s=i.x,h=i.y,f,c=Number.POSITIVE_INFINITY,r,a,e,o,u=0,l=n.length;u<l;++u)r=n[u],r&&r.hasValue()&&(a=r.getCenterPoint(),e=t.distanceBetweenPoints(i,a),e<c&&(c=e,f=r));return f&&(o=f.tooltipPosition(),s=o.x,h=o.y),{x:s,y:h}}}}},{}],35:[function(n,t){"use strict";t.exports=function(n){var i=n.helpers,t=n.defaults.global;t.elements.arc={backgroundColor:t.defaultColor,borderColor:"#fff",borderWidth:2};n.elements.Arc=n.Element.extend({inLabelRange:function(n){var t=this._view;return t?Math.pow(n-t.x,2)<Math.pow(t.radius+t.hoverRadius,2):!1},inRange:function(n,t){var r=this._view,h,c;if(r){for(var o=i.getAngleFromPoint(r,{x:n,y:t}),u=o.angle,s=o.distance,e=r.startAngle,f=r.endAngle;f<e;)f+=2*Math.PI;while(u>f)u-=2*Math.PI;while(u<e)u+=2*Math.PI;return h=u>=e&&u<=f,c=s>=r.innerRadius&&s<=r.outerRadius,h&&c}return!1},getCenterPoint:function(){var n=this._view,t=(n.startAngle+n.endAngle)/2,i=(n.innerRadius+n.outerRadius)/2;return{x:n.x+Math.cos(t)*i,y:n.y+Math.sin(t)*i}},getArea:function(){var n=this._view;return Math.PI*((n.endAngle-n.startAngle)/(2*Math.PI))*(Math.pow(n.outerRadius,2)-Math.pow(n.innerRadius,2))},tooltipPosition:function(){var n=this._view,t=n.startAngle+(n.endAngle-n.startAngle)/2,i=(n.outerRadius-n.innerRadius)/2+n.innerRadius;return{x:n.x+Math.cos(t)*i,y:n.y+Math.sin(t)*i}},draw:function(){var t=this._chart.ctx,n=this._view,i=n.startAngle,r=n.endAngle;t.beginPath();t.arc(n.x,n.y,n.outerRadius,i,r);t.arc(n.x,n.y,n.innerRadius,r,i,!0);t.closePath();t.strokeStyle=n.borderColor;t.lineWidth=n.borderWidth;t.fillStyle=n.backgroundColor;t.fill();t.lineJoin="bevel";n.borderWidth&&t.stroke()}})}},{}],36:[function(n,t){"use strict";t.exports=function(n){var i=n.helpers,t=n.defaults.global;n.defaults.global.elements.line={tension:.4,backgroundColor:t.defaultColor,borderWidth:3,borderColor:t.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0};n.elements.Line=n.Element.extend({draw:function(){var h=this,u=h._view,n=h._chart.ctx,a=u.spanGaps,f=h._children.slice(),s=t.elements.line,e=-1,r,l,c,o;for(h._loop&&f.length&&f.push(f[0]),n.save(),n.lineCap=u.borderCapStyle||s.borderCapStyle,n.setLineDash&&n.setLineDash(u.borderDash||s.borderDash),n.lineDashOffset=u.borderDashOffset||s.borderDashOffset,n.lineJoin=u.borderJoinStyle||s.borderJoinStyle,n.lineWidth=u.borderWidth||s.borderWidth,n.strokeStyle=u.borderColor||t.defaultColor,n.beginPath(),e=-1,r=0;r<f.length;++r)l=f[r],c=i.previousItem(f,r),o=l._view,r===0?o.skip||(n.moveTo(o.x,o.y),e=r):(c=e===-1?c:f[e],o.skip||((e===r-1||a)&&e!==-1?i.canvas.lineTo(n,c._view,l._view):n.moveTo(o.x,o.y),e=r));n.stroke();n.restore()}})}},{}],37:[function(n,t){"use strict";t.exports=function(n){function r(n){var t=this._view;return t?Math.pow(n-t.x,2)<Math.pow(t.radius+t.hitRadius,2):!1}function f(n){var t=this._view;return t?Math.pow(n-t.y,2)<Math.pow(t.radius+t.hitRadius,2):!1}var u=n.helpers,i=n.defaults.global,t=i.defaultColor;i.elements.point={radius:3,pointStyle:"circle",backgroundColor:t,borderWidth:1,borderColor:t,hitRadius:1,hoverRadius:4,hoverBorderWidth:1};n.elements.Point=n.Element.extend({inRange:function(n,t){var i=this._view;return i?Math.pow(n-i.x,2)+Math.pow(t-i.y,2)<Math.pow(i.hitRadius+i.radius,2):!1},inLabelRange:r,inXRange:r,inYRange:f,getCenterPoint:function(){var n=this._view;return{x:n.x,y:n.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var n=this._view;return{x:n.x,y:n.y,padding:n.radius+n.borderWidth}},draw:function(r){var e=this._view,f=this._model,o=this._chart.ctx,v=e.pointStyle,y=e.radius,c=e.x,l=e.y,a=n.helpers.color,h=1.01,s=0;e.skip||(o.strokeStyle=e.borderColor||t,o.lineWidth=u.getValueOrDefault(e.borderWidth,i.elements.point.borderWidth),o.fillStyle=e.backgroundColor||t,r!==undefined&&(f.x<r.left||r.right*h<f.x||f.y<r.top||r.bottom*h<f.y)&&(f.x<r.left?s=(c-f.x)/(r.left-f.x):r.right*h<f.x?s=(f.x-c)/(f.x-r.right):f.y<r.top?s=(l-f.y)/(r.top-f.y):r.bottom*h<f.y&&(s=(f.y-l)/(f.y-r.bottom)),s=Math.round(s*100)/100,o.strokeStyle=a(o.strokeStyle).alpha(s).rgbString(),o.fillStyle=a(o.fillStyle).alpha(s).rgbString()),n.canvasHelpers.drawPoint(o,v,y,c,l))}})}},{}],38:[function(n,t){"use strict";t.exports=function(n){function r(n){return n._view.width!==undefined}function t(n){var t=n._view,i,u,f,e,o,s;return r(n)?(o=t.width/2,i=t.x-o,u=t.x+o,f=Math.min(t.y,t.base),e=Math.max(t.y,t.base)):(s=t.height/2,i=Math.min(t.x,t.base),u=Math.max(t.x,t.base),f=t.y-s,e=t.y+s),{left:i,top:f,right:u,bottom:e}}var i=n.defaults.global;i.elements.rectangle={backgroundColor:i.defaultColor,borderWidth:0,borderColor:i.defaultColor,borderSkipped:"bottom"};n.elements.Rectangle=n.Element.extend({draw:function(){function d(n){return g[(y+n)%4]}var t=this._chart.ctx,n=this._view,i,r,u,f,h,c,e,o=n.borderWidth,v,s,a;if(n.horizontal?(i=n.base,r=n.x,u=n.y-n.height/2,f=n.y+n.height/2,h=r>i?1:-1,c=1,e=n.borderSkipped||"left"):(i=n.x-n.width/2,r=n.x+n.width/2,u=n.y,f=n.base,h=1,c=f>u?1:-1,e=n.borderSkipped||"bottom"),o){v=Math.min(Math.abs(i-r),Math.abs(u-f));o=o>v?v:o;var l=o/2,p=i+(e!=="left"?l*h:0),w=r+(e!=="right"?-l*h:0),b=u+(e!=="top"?l*c:0),k=f+(e!=="bottom"?-l*c:0);p!==w&&(u=b,f=k);b!==k&&(i=p,r=w)}t.beginPath();t.fillStyle=n.backgroundColor;t.strokeStyle=n.borderColor;t.lineWidth=o;var g=[[i,f],[i,u],[r,u],[r,f]],y=["bottom","left","top","right"].indexOf(e,0);for(y===-1&&(y=0),s=d(0),t.moveTo(s[0],s[1]),a=1;a<4;a++)s=d(a),t.lineTo(s[0],s[1]);t.fill();o&&t.stroke()},height:function(){var n=this._view;return n.base-n.y},inRange:function(n,i){var u=!1,r;return this._view&&(r=t(this),u=n>=r.left&&n<=r.right&&i>=r.top&&i<=r.bottom),u},inLabelRange:function(n,i){var f=this,e,u;return f._view?(e=!1,u=t(f),r(f)?n>=u.left&&n<=u.right:i>=u.top&&i<=u.bottom):!1},inXRange:function(n){var i=t(this);return n>=i.left&&n<=i.right},inYRange:function(n){var i=t(this);return n>=i.top&&n<=i.bottom},getCenterPoint:function(){var n=this._view,t,i;return r(this)?(t=n.x,i=(n.y+n.base)/2):(t=(n.x+n.base)/2,i=n.y),{x:t,y:i}},getArea:function(){var n=this._view;return n.width*Math.abs(n.y-n.base)},tooltipPosition:function(){var n=this._view;return{x:n.x,y:n.y}}})}},{}],39:[function(n,t){"use strict";t.exports=function(n){function i(n,i){var r=t.getStyle(n,i),u=r&&r.match(/^(\d+)(\.\d+)?px$/);return u?Number(u[1]):undefined}function f(n,t){var r=n.style,f=n.getAttribute("height"),e=n.getAttribute("width"),u,o;return n._chartjs={initial:{height:f,width:e,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",(e===null||e==="")&&(u=i(n,"width"),u!==undefined&&(n.width=u)),(f===null||f==="")&&(n.style.height===""?n.height=n.width/(t.options.aspectRatio||2):(o=i(n,"height"),u!==undefined&&(n.height=o))),n}function r(n,t,i,r,u){return{type:n,chart:t,"native":u||null,x:i!==undefined?i:null,y:r!==undefined?r:null}}function e(n,i){var e=u[n.type]||n.type,f=t.getRelativePosition(n,i);return r(e,i,f.x,f.y,n)}function o(n){var i=document.createElement("iframe");return i.className="chartjs-hidden-iframe",i.style.cssText="display:block;overflow:hidden;border:0;margin:0;top:0;left:0;bottom:0;right:0;height:100%;width:100%;position:absolute;pointer-events:none;z-index:-1;",i.tabIndex=-1,t.addEvent(i,"load",function(){t.addEvent(i.contentWindow||i,"resize",n);n()}),i}function s(n,i,u){var f=n._chartjs={ticking:!1},e=function(){f.ticking||(f.ticking=!0,t.requestAnimFrame.call(window,function(){if(f.resizer)return f.ticking=!1,i(r("resize",u))}))};f.resizer=o(e);n.insertBefore(f.resizer,n.firstChild)}function h(n){if(n&&n._chartjs){var t=n._chartjs.resizer;t&&(t.parentNode.removeChild(t),n._chartjs.resizer=null);delete n._chartjs}}var t=n.helpers,u={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};return{acquireContext:function(n,t){typeof n=="string"?n=document.getElementById(n):n.length&&(n=n[0]);n&&n.canvas&&(n=n.canvas);var i=n&&n.getContext&&n.getContext("2d");return i&&i.canvas===n?(f(n,t),i):null},releaseContext:function(n){var i=n.canvas,r;i._chartjs&&(r=i._chartjs.initial,["height","width"].forEach(function(n){var t=r[n];t===undefined||t===null?i.removeAttribute(n):i.setAttribute(n,t)}),t.each(r.style||{},function(n,t){i.style[t]=n}),i.width=i.width,delete i._chartjs)},addEventListener:function(n,i,r){var u=n.canvas;if(i==="resize"){s(u.parentNode,r,n);return}var f=r._chartjs||(r._chartjs={}),o=f.proxies||(f.proxies={}),h=o[n.id+"_"+i]=function(t){r(e(t,n))};t.addEvent(u,i,h)},removeEventListener:function(n,i,r){var u=n.canvas;if(i==="resize"){h(u.parentNode,r);return}var e=r._chartjs||{},o=e.proxies||{},f=o[n.id+"_"+i];f&&t.removeEvent(u,i,f)}}}},{}],40:[function(n,t){"use strict";var i=n(39);t.exports=function(n){n.platform={acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}};n.helpers.extend(n.platform,i(n))}},{"39":39}],41:[function(n,t){"use strict";t.exports=function(n){function e(n,t,i){var f=n._model||{},r=f.fill,u;if(r===undefined&&(r=!!f.backgroundColor),r===!1||r===null)return!1;if(r===!0)return"origin";if(u=parseFloat(r,10),isFinite(u)&&Math.floor(u)===u)return((r[0]==="-"||r[0]==="+")&&(u=t+u),u===t||u<0||u>=i)?!1:u;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function o(n){var r=n.el._model||{},i=n.el._scale||{},u=n.fill,t=null,f;if(isFinite(u))return null;if(u==="start"?t=r.scaleBottom===undefined?i.bottom:r.scaleBottom:u==="end"?t=r.scaleTop===undefined?i.top:r.scaleTop:r.scaleZero!==undefined?t=r.scaleZero:i.getBasePosition?t=i.getBasePosition():i.getBasePixel&&(t=i.getBasePixel()),t!==undefined&&t!==null){if(t.x!==undefined&&t.y!==undefined)return t;if(typeof t=="number"&&isFinite(t))return f=i.isHorizontal(),{x:f?t:null,y:f?null:t}}return null}function s(n,t,i){var e=n[t],r=e.fill,f=[t],u;if(!i)return r;while(r!==!1&&f.indexOf(r)===-1){if(!isFinite(r))return r;if(u=n[r],!u)return!1;if(u.visible)return r;f.push(r);r=u.fill}return!1}function h(n){var t=n.fill,i="dataset";return t===!1?null:(isFinite(t)||(i="boundary"),f[i](n))}function i(n){return n&&!n.skip}function r(n,i,r,u,f){var e;if(u&&f){for(n.moveTo(i[0].x,i[0].y),e=1;e<u;++e)t.canvas.lineTo(n,i[e-1],i[e]);for(n.lineTo(r[f-1].x,r[f-1].y),e=f-1;e>0;--e)t.canvas.lineTo(n,r[e],r[e-1],!0)}}function c(n,t,u,f,e,o){var k=t.length,g=f.spanGaps,s=[],h=[],c=0,l=0,v,d,p,a,y,w,b;for(n.beginPath(),v=0,d=k+!!o;v<d;++v)p=v%k,a=t[p]._view,y=u(a,p,f),w=i(a),b=i(y),w&&b?(c=s.push(a),l=h.push(y)):c&&l&&(g?(w&&s.push(a),b&&h.push(y)):(r(n,s,h,c,l),c=l=0,s=[],h=[]));r(n,s,h,c,l);n.closePath();n.fillStyle=e;n.fill()}n.defaults.global.plugins.filler={propagate:!0};var u=n.defaults,t=n.helpers,f={dataset:function(n){var t=n.fill,i=n.chart,r=i.getDatasetMeta(t),f=r&&i.isDatasetVisible(t),u=f&&r.dataset._children||[];return u.length?function(n,t){return u[t]._view||null}:null},boundary:function(n){var t=n.boundary,i=t?t.x:null,r=t?t.y:null;return function(n){return{x:i===null?n.x:i,y:r===null?n.y:r}}}};return{id:"filler",afterDatasetsUpdate:function(t,i){for(var c=(t.data.datasets||[]).length,v=i.propagate,l=[],a,f,u,r=0;r<c;++r)a=t.getDatasetMeta(r),f=a.dataset,u=null,f&&f._model&&f instanceof n.elements.Line&&(u={visible:t.isDatasetVisible(r),fill:e(f,r,c),chart:t,el:f}),a.$filler=u,l.push(u);for(r=0;r<c;++r)(u=l[r],u)&&(u.fill=s(l,r,v),u.boundary=o(u),u.mapper=h(u))},beforeDatasetDraw:function(n,t){var i=t.meta.$filler;if(i){var r=i.el,f=r._view,e=r._children||[],o=i.mapper,s=f.backgroundColor||u.global.defaultColor;o&&s&&e.length&&c(n.ctx,e,o,f,s,r._loop)}}}}},{}],42:[function(n,t){"use strict";t.exports=function(n){function u(n,t){return n.usePointStyle?t*Math.SQRT2:n.boxWidth}function f(t,i){var u=new n.Legend({ctx:t.ctx,options:i,chart:t});r.configure(t,u,i);r.addBox(t,u);t.legend=u}var t=n.helpers,r=n.layoutService,i=t.noop;return n.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(n,t){var r=t.datasetIndex,i=this.chart,u=i.getDatasetMeta(r);u.hidden=u.hidden===null?!i.data.datasets[r].hidden:null;i.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(n){var i=n.data;return t.isArray(i.datasets)?i.datasets.map(function(i,r){return{text:i.label,fillStyle:t.isArray(i.backgroundColor)?i.backgroundColor[0]:i.backgroundColor,hidden:!n.isDatasetVisible(r),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,datasetIndex:r}},this):[]}}},n.Legend=n.Element.extend({initialize:function(n){t.extend(this,n);this.legendHitBoxes=[];this.doughnutMode=!1},beforeUpdate:i,update:function(n,t,i){var r=this;return r.beforeUpdate(),r.maxWidth=n,r.maxHeight=t,r.margins=i,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:i,beforeSetDimensions:i,setDimensions:function(){var n=this;n.isHorizontal()?(n.width=n.maxWidth,n.left=0,n.right=n.width):(n.height=n.maxHeight,n.top=0,n.bottom=n.height);n.paddingLeft=0;n.paddingTop=0;n.paddingRight=0;n.paddingBottom=0;n.minSize={width:0,height:0}},afterSetDimensions:i,beforeBuildLabels:i,buildLabels:function(){var n=this,i=n.options.labels,t=i.generateLabels.call(n,n.chart);i.filter&&(t=t.filter(function(t){return i.filter(t,n.chart.data)}));n.options.reverse&&t.reverse();n.legendItems=t},afterBuildLabels:i,beforeFit:i,fit:function(){var i=this,w=i.options,r=w.labels,c=w.display,h=i.ctx,l=n.defaults.global,a=t.getValueOrDefault,f=a(r.fontSize,l.defaultFontSize),nt=a(r.fontStyle,l.defaultFontStyle),tt=a(r.fontFamily,l.defaultFontFamily),it=t.fontString(f,nt,tt),b=i.legendHitBoxes=[],e=i.minSize,k=i.isHorizontal(),o,v;if(k?(e.width=i.maxWidth,e.height=c?10:0):(e.width=c?10:0,e.height=i.maxHeight),c)if(h.font=it,k)o=i.lineWidths=[0],v=i.legendItems.length?f+r.padding:0,h.textAlign="left",h.textBaseline="top",t.each(i.legendItems,function(n,t){var s=u(r,f),e=s+f/2+h.measureText(n.text).width;o[o.length-1]+e+r.padding>=i.width&&(v+=f+r.padding,o[o.length]=i.left);b[t]={left:0,top:0,width:e,height:f};o[o.length-1]+=e+r.padding}),e.height+=v;else{var rt=r.padding,d=i.columnWidths=[],y=r.padding,s=0,p=0,g=f+rt;t.each(i.legendItems,function(n,t){var o=u(r,f),i=o+f/2+h.measureText(n.text).width;p+g>e.height&&(y+=s+r.padding,d.push(s),s=0,p=0);s=Math.max(s,i);p+=g;b[t]={left:0,top:0,width:i,height:f}});y+=s;d.push(s);e.width+=y}i.width=e.width;i.height=e.height},afterFit:i,isHorizontal:function(){return this.options.position==="top"||this.options.position==="bottom"},draw:function(){var r=this,a=r.options,e=a.labels,c=n.defaults.global,l=c.elements.line,y=r.width,w=r.lineWidths,v;if(a.display){var i=r.ctx,f,o=t.getValueOrDefault,b=o(e.fontColor,c.defaultFontColor),s=o(e.fontSize,c.defaultFontSize),d=o(e.fontStyle,c.defaultFontStyle),g=o(e.fontFamily,c.defaultFontFamily),nt=t.fontString(s,d,g);i.textAlign="left";i.textBaseline="top";i.lineWidth=.5;i.strokeStyle=b;i.fillStyle=b;i.font=nt;var h=u(e,s),k=r.legendHitBoxes,tt=function(t,r,u){var f;if(!isNaN(h)&&!(h<=0)){if(i.save(),i.fillStyle=o(u.fillStyle,c.defaultColor),i.lineCap=o(u.lineCap,l.borderCapStyle),i.lineDashOffset=o(u.lineDashOffset,l.borderDashOffset),i.lineJoin=o(u.lineJoin,l.borderJoinStyle),i.lineWidth=o(u.lineWidth,l.borderWidth),i.strokeStyle=o(u.strokeStyle,c.defaultColor),f=o(u.lineWidth,l.borderWidth)===0,i.setLineDash&&i.setLineDash(o(u.lineDash,l.borderDash)),a.labels&&a.labels.usePointStyle){var e=s*Math.SQRT2/2,v=e/Math.SQRT2,y=t+v,p=r+v;n.canvasHelpers.drawPoint(i,u.pointStyle,e,y,p)}else f||i.strokeRect(t,r,h,s),i.fillRect(t,r,h,s);i.restore()}},it=function(n,t,r,u){i.fillText(r.text,h+s/2+n,t);r.hidden&&(i.beginPath(),i.lineWidth=2,i.moveTo(h+s/2+n,t+s/2),i.lineTo(h+s/2+n+u,t+s/2),i.stroke())},p=r.isHorizontal();f=p?{x:r.left+(y-w[0])/2,y:r.top+e.padding,line:0}:{x:r.left+e.padding,y:r.top+e.padding,line:0};v=s+e.padding;t.each(r.legendItems,function(n,t){var c=i.measureText(n.text).width,l=h+s/2+c,u=f.x,o=f.y;p?u+l>=y&&(o=f.y+=v,f.line++,u=f.x=r.left+(y-w[f.line])/2):o+v>r.bottom&&(u=f.x=u+r.columnWidths[f.line]+e.padding,o=f.y=r.top+e.padding,f.line++);tt(u,o,n);k[t].left=u;k[t].top=o;it(u,o,n,c);p?f.x+=l+e.padding:f.y+=v})}},handleEvent:function(n){var t=this,e=t.options,o=n.type==="mouseup"?"click":n.type,s=!1,u,f,h,r,i;if(o==="mousemove"){if(!e.onHover)return}else if(o==="click"){if(!e.onClick)return}else return;if(u=n.x,f=n.y,u>=t.left&&u<=t.right&&f>=t.top&&f<=t.bottom)for(h=t.legendHitBoxes,r=0;r<h.length;++r)if(i=h[r],u>=i.left&&u<=i.left+i.width&&f>=i.top&&f<=i.top+i.height)if(o==="click"){e.onClick.call(t,n.native,t.legendItems[r]);s=!0;break}else if(o==="mousemove"){e.onHover.call(t,n.native,t.legendItems[r]);s=!0;break}return s}}),{id:"legend",beforeInit:function(n){var t=n.options.legend;t&&f(n,t)},beforeUpdate:function(i){var u=i.options.legend,e=i.legend;u?(u=t.configMerge(n.defaults.global.legend,u),e?(r.configure(i,e,u),e.options=u):f(i,u)):e&&(r.removeBox(i,e),delete i.legend)},afterEvent:function(n,t){var i=n.legend;i&&i.handleEvent(t)}}}},{}],43:[function(n,t){"use strict";t.exports=function(n){function u(t,i){var u=new n.Title({ctx:t.ctx,options:i,chart:t});r.configure(t,u,i);r.addBox(t,u);t.titleBlock=u}var i=n.helpers,r=n.layoutService,t=i.noop;return n.defaults.global.title={display:!1,position:"top",fullWidth:!0,weight:2e3,fontStyle:"bold",padding:10,text:""},n.Title=n.Element.extend({initialize:function(n){var t=this;i.extend(t,n);t.legendHitBoxes=[]},beforeUpdate:t,update:function(n,t,i){var r=this;return r.beforeUpdate(),r.maxWidth=n,r.maxHeight=t,r.margins=i,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:t,beforeSetDimensions:t,setDimensions:function(){var n=this;n.isHorizontal()?(n.width=n.maxWidth,n.left=0,n.right=n.width):(n.height=n.maxHeight,n.top=0,n.bottom=n.height);n.paddingLeft=0;n.paddingTop=0;n.paddingRight=0;n.paddingBottom=0;n.minSize={width:0,height:0}},afterSetDimensions:t,beforeBuildLabels:t,buildLabels:t,afterBuildLabels:t,beforeFit:t,fit:function(){var t=this,o=i.getValueOrDefault,u=t.options,s=n.defaults.global,f=u.display,e=o(u.fontSize,s.defaultFontSize),r=t.minSize;t.isHorizontal()?(r.width=t.maxWidth,r.height=f?e+u.padding*2:0):(r.width=f?e+u.padding*2:0,r.height=t.maxHeight);t.width=r.width;t.height=r.height},afterFit:t,isHorizontal:function(){var n=this.options.position;return n==="top"||n==="bottom"},draw:function(){var u=this,t=u.ctx,e=i.getValueOrDefault,r=u.options,o=n.defaults.global;if(r.display){var h=e(r.fontSize,o.defaultFontSize),w=e(r.fontStyle,o.defaultFontStyle),b=e(r.fontFamily,o.defaultFontFamily),k=i.fontString(h,w,b),p=0,c,l,f=u.top,s=u.left,a=u.bottom,v=u.right,y;t.fillStyle=e(r.fontColor,o.defaultFontColor);t.font=k;u.isHorizontal()?(c=s+(v-s)/2,l=f+(a-f)/2,y=v-s):(c=r.position==="left"?s+h/2:v-h/2,l=f+(a-f)/2,y=a-f,p=Math.PI*(r.position==="left"?-.5:.5));t.save();t.translate(c,l);t.rotate(p);t.textAlign="center";t.textBaseline="middle";t.fillText(r.text,0,0,y);t.restore()}}}),{id:"title",beforeInit:function(n){var t=n.options.title;t&&u(n,t)},beforeUpdate:function(t){var f=t.options.title,e=t.titleBlock;f?(f=i.configMerge(n.defaults.global.title,f),e?(r.configure(t,e,f),e.options=f):u(t,f)):e&&(n.layoutService.removeBox(t,e),delete t.titleBlock)}}}},{}],44:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers,i=n.Scale.extend({getLabels:function(){var n=this.chart.data;return(this.isHorizontal()?n.xLabels:n.yLabels)||n.labels},determineDataLimits:function(){var n=this,r=n.getLabels(),i;n.minIndex=0;n.maxIndex=r.length-1;n.options.ticks.min!==undefined&&(i=t.indexOf(r,n.options.ticks.min),n.minIndex=i!==-1?i:n.minIndex);n.options.ticks.max!==undefined&&(i=t.indexOf(r,n.options.ticks.max),n.maxIndex=i!==-1?i:n.maxIndex);n.min=r[n.minIndex];n.max=r[n.maxIndex]},buildTicks:function(){var n=this,t=n.getLabels();n.ticks=n.minIndex===0&&n.maxIndex===t.length-1?t:t.slice(n.minIndex,n.maxIndex+1)},getLabelForIndex:function(n,t){var i=this,r=i.chart.data,u=i.isHorizontal();return r.yLabels&&!u?i.getRightValue(r.datasets[t].data[n]):i.ticks[n-i.minIndex]},getPixelForValue:function(n,t,i,r){var u=this,l=Math.max(u.maxIndex+1-u.minIndex-(u.options.gridLines.offsetGridLines?0:1),1),f,a,e,o,s,h,c;return(n!==undefined&&n!==null&&(f=u.isHorizontal()?n.x:n.y),(f!==undefined||n!==undefined&&isNaN(t))&&(a=u.getLabels(),n=f||n,e=a.indexOf(n),t=e!==-1?e:t),u.isHorizontal())?(o=u.width/l,s=o*(t-u.minIndex),(u.options.gridLines.offsetGridLines&&r||u.maxIndex===u.minIndex&&r)&&(s+=o/2),u.left+Math.round(s)):(h=u.height/l,c=h*(t-u.minIndex),u.options.gridLines.offsetGridLines&&r&&(c+=h/2),u.top+Math.round(c))},getPixelForTick:function(n,t){return this.getPixelForValue(this.ticks[n],n+this.minIndex,null,t)},getValueForPixel:function(n){var t=this,u=Math.max(t.ticks.length-(t.options.gridLines.offsetGridLines?0:1),1),i=t.isHorizontal(),r=(i?t.width:t.height)/u;return n-=i?t.left:t.top,t.options.gridLines.offsetGridLines&&(n-=r/2),n<=0?0:Math.round(n/r)},getBasePixel:function(){return this.bottom}});n.scaleService.registerScaleType("category",i,{position:"bottom"})}},{}],45:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers,i={position:"left",ticks:{callback:n.Ticks.formatters.linear}},r=n.LinearScaleBase.extend({determineDataLimits:function(){function o(t){return h?t.xAxisID===n.id:t.yAxisID===n.id}var n=this,f=n.options,i=n.chart,s=i.data,e=s.datasets,h=n.isHorizontal(),u,r;n.min=null;n.max=null;u=f.stacked;u===undefined&&t.each(e,function(n,t){if(!u){var r=i.getDatasetMeta(t);i.isDatasetVisible(t)&&o(r)&&r.stack!==undefined&&(u=!0)}});f.stacked||u?(r={},t.each(e,function(u,e){var s=i.getDatasetMeta(e),c=[s.type,f.stacked===undefined&&s.stack===undefined?e:"",s.stack].join("."),h,l;r[c]===undefined&&(r[c]={positiveValues:[],negativeValues:[]});h=r[c].positiveValues;l=r[c].negativeValues;i.isDatasetVisible(e)&&o(s)&&t.each(u.data,function(t,i){var r=+n.getRightValue(t);isNaN(r)||s.data[i].hidden||(h[i]=h[i]||0,l[i]=l[i]||0,f.relativePoints?h[i]=100:r<0?l[i]+=r:h[i]+=r)})}),t.each(r,function(i){var r=i.positiveValues.concat(i.negativeValues),u=t.min(r),f=t.max(r);n.min=n.min===null?u:Math.min(n.min,u);n.max=n.max===null?f:Math.max(n.max,f)})):t.each(e,function(r,u){var f=i.getDatasetMeta(u);i.isDatasetVisible(u)&&o(f)&&t.each(r.data,function(t,i){var r=+n.getRightValue(t);isNaN(r)||f.data[i].hidden||(n.min===null?n.min=r:r<n.min&&(n.min=r),n.max===null?n.max=r:r>n.max&&(n.max=r))})});n.min=isFinite(n.min)?n.min:0;n.max=isFinite(n.max)?n.max:1;this.handleTickRangeOptions()},getTickLimit:function(){var u,r=this,i=r.options.ticks,f;return r.isHorizontal()?u=Math.min(i.maxTicksLimit?i.maxTicksLimit:11,Math.ceil(r.width/50)):(f=t.getValueOrDefault(i.fontSize,n.defaults.global.defaultFontSize),u=Math.min(i.maxTicksLimit?i.maxTicksLimit:11,Math.ceil(r.height/(2*f)))),u},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(n,t){return+this.getRightValue(this.chart.data.datasets[t].data[n])},getPixelForValue:function(n){var t=this,r=t.start,u=+t.getRightValue(n),i,f=t.end-r;return t.isHorizontal()?(i=t.left+t.width/f*(u-r),Math.round(i)):(i=t.bottom-t.height/f*(u-r),Math.round(i))},getValueForPixel:function(n){var t=this,i=t.isHorizontal(),r=i?t.width:t.height,u=(i?n-t.left:t.bottom-n)/r;return t.start+(t.end-t.start)*u},getPixelForTick:function(n){return this.getPixelForValue(this.ticksAsNumbers[n])}});n.scaleService.registerScaleType("linear",r,i)}},{}],46:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers,i=t.noop;n.LinearScaleBase=n.Scale.extend({handleTickRangeOptions:function(){var n=this,f=n.options,i=f.ticks,r,u;i.beginAtZero&&(r=t.sign(n.min),u=t.sign(n.max),r<0&&u<0?n.max=0:r>0&&u>0&&(n.min=0));i.min!==undefined?n.min=i.min:i.suggestedMin!==undefined&&(n.min=n.min===null?i.suggestedMin:Math.min(n.min,i.suggestedMin));i.max!==undefined?n.max=i.max:i.suggestedMax!==undefined&&(n.max=n.max===null?i.suggestedMax:Math.max(n.max,i.suggestedMax));n.min===n.max&&(n.max++,i.beginAtZero||n.min--)},getTickLimit:i,handleDirectionalChanges:i,buildTicks:function(){var i=this,o=i.options,r=o.ticks,f=i.getTickLimit(),e,u;f=Math.max(2,f);e={maxTicks:f,min:r.min,max:r.max,stepSize:t.getValueOrDefault(r.fixedStepSize,r.stepSize)};u=i.ticks=n.Ticks.generators.linear(e,i);i.handleDirectionalChanges();i.max=t.max(u);i.min=t.min(u);r.reverse?(u.reverse(),i.start=i.max,i.end=i.min):(i.start=i.min,i.end=i.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice();t.zeroLineIndex=t.ticks.indexOf(0);n.Scale.prototype.convertTicksToLabels.call(t)}})}},{}],47:[function(n,t){"use strict";t.exports=function(n){var t=n.helpers,i={position:"left",ticks:{callback:n.Ticks.formatters.logarithmic}},r=n.Scale.extend({determineDataLimits:function(){function o(t){return l?t.xAxisID===n.id:t.yAxisID===n.id}var n=this,r=n.options,s=r.ticks,i=n.chart,c=i.data,e=c.datasets,h=t.getValueOrDefault,l=n.isHorizontal(),u,f;n.min=null;n.max=null;n.minNotZero=null;u=r.stacked;u===undefined&&t.each(e,function(n,t){if(!u){var r=i.getDatasetMeta(t);i.isDatasetVisible(t)&&o(r)&&r.stack!==undefined&&(u=!0)}});r.stacked||u?(f={},t.each(e,function(u,e){var s=i.getDatasetMeta(e),h=[s.type,r.stacked===undefined&&s.stack===undefined?e:"",s.stack].join(".");i.isDatasetVisible(e)&&o(s)&&(f[h]===undefined&&(f[h]=[]),t.each(u.data,function(t,i){var u=f[h],e=+n.getRightValue(t);isNaN(e)||s.data[i].hidden||(u[i]=u[i]||0,r.relativePoints?u[i]=100:u[i]+=e)}))}),t.each(f,function(i){var r=t.min(i),u=t.max(i);n.min=n.min===null?r:Math.min(n.min,r);n.max=n.max===null?u:Math.max(n.max,u)})):t.each(e,function(r,u){var f=i.getDatasetMeta(u);i.isDatasetVisible(u)&&o(f)&&t.each(r.data,function(t,i){var r=+n.getRightValue(t);isNaN(r)||f.data[i].hidden||(n.min===null?n.min=r:r<n.min&&(n.min=r),n.max===null?n.max=r:r>n.max&&(n.max=r),r!==0&&(n.minNotZero===null||r<n.minNotZero)&&(n.minNotZero=r))})});n.min=h(s.min,n.min);n.max=h(s.max,n.max);n.min===n.max&&(n.min!==0&&n.min!==null?(n.min=Math.pow(10,Math.floor(t.log10(n.min))-1),n.max=Math.pow(10,Math.floor(t.log10(n.max))+1)):(n.min=1,n.max=10))},buildTicks:function(){var i=this,f=i.options,u=f.ticks,e={min:u.min,max:u.max},r=i.ticks=n.Ticks.generators.logarithmic(e,i);i.isHorizontal()||r.reverse();i.max=t.max(r);i.min=t.min(r);u.reverse?(r.reverse(),i.start=i.max,i.end=i.min):(i.start=i.min,i.end=i.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice();n.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(n,t){return+this.getRightValue(this.chart.data.datasets[t].data[n])},getPixelForTick:function(n){return this.getPixelForValue(this.tickValues[n])},getPixelForValue:function(n){var i=this,r,e,o=i.start,u=+i.getRightValue(n),f,h=i.options,s=h.ticks;return i.isHorizontal()?(f=t.log10(i.end)-t.log10(o),u===0?e=i.left:(r=i.width,e=i.left+r/f*(t.log10(u)-t.log10(o)))):(r=i.height,o!==0||s.reverse?i.end===0&&s.reverse?(f=t.log10(i.start)-t.log10(i.minNotZero),e=u===i.end?i.top:u===i.minNotZero?i.top+r*.02:i.top+r*.02+r*.98/f*(t.log10(u)-t.log10(i.minNotZero))):u===0?e=s.reverse?i.top:i.bottom:(f=t.log10(i.end)-t.log10(o),r=i.height,e=i.bottom-r/f*(t.log10(u)-t.log10(o))):(f=t.log10(i.end)-t.log10(i.minNotZero),e=u===o?i.bottom:u===i.minNotZero?i.bottom-r*.02:i.bottom-r*.02-r*.98/f*(t.log10(u)-t.log10(i.minNotZero)))),e},getValueForPixel:function(n){var i=this,f=t.log10(i.end)-t.log10(i.start),u,r;return i.isHorizontal()?(r=i.width,u=i.start*Math.pow(10,(n-i.left)*f/r)):(r=i.height,u=Math.pow(10,(i.bottom-n)*f/r)/i.start),u}});n.scaleService.registerScaleType("logarithmic",r,i)}},{}],48:[function(n,t){"use strict";t.exports=function(n){function r(n){var t=n.options;return t.angleLines.display||t.pointLabels.display?n.chart.data.labels.length:0}function f(n){var r=n.options.pointLabels,u=t.getValueOrDefault(r.fontSize,i.defaultFontSize),f=t.getValueOrDefault(r.fontStyle,i.defaultFontStyle),e=t.getValueOrDefault(r.fontFamily,i.defaultFontFamily),o=t.fontString(u,f,e);return{size:u,style:f,family:e,font:o}}function s(n,i,r){return t.isArray(r)?{w:t.longestText(n,n.font,r),h:r.length*i+(r.length-1)*1.5*i}:{w:n.measureText(r).width,h:i}}function e(n,t,i,r,u){return n===r||n===u?{start:t-i/2,end:t+i/2}:n<r||n>u?{start:t-i-5,end:t}:{start:t,end:t+i+5}}function h(n){var y=f(n),p=Math.min(n.height/2,n.width/2),i={r:n.width,l:0,t:n.height,b:0},o={},u,c,v,w;for(n.ctx.font=y.font,n._pointLabelSizes=[],w=r(n),u=0;u<w;u++){v=n.getPointPosition(u,p);c=s(n.ctx,y.size,n.pointLabels[u]||"");n._pointLabelSizes[u]=c;var h=n.getIndexAngle(u),b=t.toDegrees(h)%360,l=e(b,v.x,c.w,0,180),a=e(b,v.y,c.h,90,270);l.start<i.l&&(i.l=l.start,o.l=h);l.end>i.r&&(i.r=l.end,o.r=h);a.start<i.t&&(i.t=a.start,o.t=h);a.end>i.b&&(i.b=a.end,o.b=h)}n.setReductions(p,i,o)}function c(n){var t=Math.min(n.height/2,n.width/2);n.drawingArea=Math.round(t);n.setCenterPoint(0,0,0,0)}function l(n){return n===0||n===180?"center":n<180?"left":"right"}function a(n,i,r,u){var e,o,f;if(t.isArray(i))for(e=r.y,o=1.5*u,f=0;f<i.length;++f)n.fillText(i[f],r.x,e),e+=o;else n.fillText(i,r.x,r.y)}function v(n,t,i){n===90||n===270?i.y-=t.h/2:(n>270||n<90)&&(i.y-=t.h)}function y(n){var u=n.ctx,g=t.getValueOrDefault,o=n.options,s=o.angleLines,b=o.pointLabels,h,c,e,y,p,k,d,w;for(u.lineWidth=s.lineWidth,u.strokeStyle=s.color,h=n.getDistanceFromCenterForValue(o.reverse?n.min:n.max),c=f(n),u.textBaseline="top",e=r(n)-1;e>=0;e--)s.display&&(y=n.getPointPosition(e,h),u.beginPath(),u.moveTo(n.xCenter,n.yCenter),u.lineTo(y.x,y.y),u.stroke(),u.closePath()),b.display&&(p=n.getPointPosition(e,h+5),k=g(b.fontColor,i.defaultFontColor),u.font=c.font,u.fillStyle=k,d=n.getIndexAngle(e),w=t.toDegrees(d),u.textAlign=l(w),v(w,n._pointLabelSizes[e],p),a(u,n.pointLabels[e]||"",p,c.size))}function p(n,i,u,f){var e=n.ctx,h,o,s;if(e.strokeStyle=t.getValueAtIndexOrDefault(i.color,f-1),e.lineWidth=t.getValueAtIndexOrDefault(i.lineWidth,f-1),n.options.gridLines.circular)e.beginPath(),e.arc(n.xCenter,n.yCenter,u,0,Math.PI*2),e.closePath(),e.stroke();else{if(h=r(n),h===0)return;for(e.beginPath(),o=n.getPointPosition(0,u),e.moveTo(o.x,o.y),s=1;s<h;s++)o=n.getPointPosition(s,u),e.lineTo(o.x,o.y);e.closePath();e.stroke()}}function u(n){return t.isNumber(n)?n:0}var t=n.helpers,i=n.defaults.global,o={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:n.Ticks.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(n){return n}}},w=n.LinearScaleBase.extend({setDimensions:function(){var n=this,u=n.options,f=u.ticks,r,e;n.width=n.maxWidth;n.height=n.maxHeight;n.xCenter=Math.round(n.width/2);n.yCenter=Math.round(n.height/2);r=t.min([n.height,n.width]);e=t.getValueOrDefault(f.fontSize,i.defaultFontSize);n.drawingArea=u.display?r/2-(e/2+f.backdropPaddingY):r/2},determineDataLimits:function(){var n=this,u=n.chart,i=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;t.each(u.data.datasets,function(f,e){if(u.isDatasetVisible(e)){var o=u.getDatasetMeta(e);t.each(f.data,function(t,u){var f=+n.getRightValue(t);isNaN(f)||o.data[u].hidden||(i=Math.min(f,i),r=Math.max(f,r))})}});n.min=i===Number.POSITIVE_INFINITY?0:i;n.max=r===Number.NEGATIVE_INFINITY?0:r;n.handleTickRangeOptions()},getTickLimit:function(){var n=this.options.ticks,r=t.getValueOrDefault(n.fontSize,i.defaultFontSize);return Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*r)))},convertTicksToLabels:function(){var t=this;n.LinearScaleBase.prototype.convertTicksToLabels.call(t);t.pointLabels=t.chart.data.labels.map(t.options.pointLabels.callback,t)},getLabelForIndex:function(n,t){return+this.getRightValue(this.chart.data.datasets[t].data[n])},fit:function(){this.options.pointLabels.display?h(this):c(this)},setReductions:function(n,t,i){var r=this,f=t.l/Math.sin(i.l),e=Math.max(t.r-r.width,0)/Math.sin(i.r),o=-t.t/Math.cos(i.t),s=-Math.max(t.b-r.height,0)/Math.cos(i.b);f=u(f);e=u(e);o=u(o);s=u(s);r.drawingArea=Math.min(Math.round(n-(f+e)/2),Math.round(n-(o+s)/2));r.setCenterPoint(f,e,o,s)},setCenterPoint:function(n,t,i,r){var u=this,f=u.width-t-u.drawingArea,e=n+u.drawingArea,o=i+u.drawingArea,s=u.height-r-u.drawingArea;u.xCenter=Math.round((e+f)/2+u.left);u.yCenter=Math.round((o+s)/2+u.top)},getIndexAngle:function(n){var t=Math.PI*2/r(this),i=this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0,u=i*Math.PI/180;return n*t+u},getDistanceFromCenterForValue:function(n){var t=this,i;return n===null?0:(i=t.drawingArea/(t.max-t.min),t.options.reverse)?(t.max-n)*i:(n-t.min)*i},getPointPosition:function(n,t){var i=this,r=i.getIndexAngle(n)-Math.PI/2;return{x:Math.round(Math.cos(r)*t)+i.xCenter,y:Math.round(Math.sin(r)*t)+i.yCenter}},getPointPositionForValue:function(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))},getBasePosition:function(){var n=this,t=n.min,i=n.max;return n.getPointPositionForValue(0,n.beginAtZero?0:t<0&&i<0?i:t>0&&i>0?t:0)},draw:function(){var r=this,f=r.options,s=f.gridLines,n=f.ticks,e=t.getValueOrDefault;if(f.display){var u=r.ctx,o=e(n.fontSize,i.defaultFontSize),h=e(n.fontStyle,i.defaultFontStyle),c=e(n.fontFamily,i.defaultFontFamily),l=t.fontString(o,h,c);t.each(r.ticks,function(t,h){var c,a,y,v;(h>0||f.reverse)&&(c=r.getDistanceFromCenterForValue(r.ticksAsNumbers[h]),a=r.yCenter-c,s.display&&h!==0&&p(r,s,c,h),n.display&&(y=e(n.fontColor,i.defaultFontColor),u.font=l,n.showLabelBackdrop&&(v=u.measureText(t).width,u.fillStyle=n.backdropColor,u.fillRect(r.xCenter-v/2-n.backdropPaddingX,a-o/2-n.backdropPaddingY,v+n.backdropPaddingX*2,o+n.backdropPaddingY*2)),u.textAlign="center",u.textBaseline="middle",u.fillStyle=y,u.fillText(t,r.xCenter,a)))});(f.angleLines.display||f.pointLabels.display)&&y(r)}}});n.scaleService.registerScaleType("radialLinear",w,o)}},{}],49:[function(n,t){"use strict";var i=n(6);i=typeof i=="function"?i:window.moment;t.exports=function(n){function r(n,t){var r=n.options.time,u;return typeof r.parser=="string"?i(t,r.parser):typeof r.parser=="function"?r.parser(t):typeof t.getMonth=="function"||typeof t=="number"?i(t):t.isValid&&t.isValid()?t:(u=r.format,typeof u!="string"&&u.call)?(console.warn("options.time.format is deprecated and replaced by options.time.parser."),u(t)):i(t,u)}function e(n,t,i,r){for(var f,h,e=Object.keys(u),o,c=e.length,s=e.indexOf(n);s<c;s++)if(o=e[s],f=u[o],h=f.steps&&f.steps[f.steps.length-1]||f.maxStep,h===undefined||Math.ceil((i-t)/(h*f.size))<=r)break;return o}function o(n,t,i,r){var e=u[i],h=e.size,o=Math.ceil((t-n)/h),f=1,c=t-n,l,s;if(e.steps)for(l=e.steps.length,s=0;s<l&&o>r;s++)f=e.steps[s],o=Math.ceil(c/(h*f));else while(o>r&&r>0)++f,o=Math.ceil(c/(h*f));return f}function s(n,t,r){var u=[],o,f,e;if(n.maxTicks){for(o=n.stepSize,u.push(n.min!==undefined?n.min:r.min),f=i(r.min);f.add(o,n.unit).valueOf()<r.max;)u.push(f.valueOf());e=n.max||r.max;u[u.length-1]!==e&&u.push(e)}return u}var t=n.helpers,u={millisecond:{size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{size:1e3,steps:[1,2,5,10,30]},minute:{size:6e4,steps:[1,2,5,10,30]},hour:{size:36e5,steps:[1,2,3,6,12]},day:{size:864e5,steps:[1,2,5]},week:{size:6048e5,maxStep:4},month:{size:2628e6,maxStep:3},quarter:{size:7884e6,maxStep:4},year:{size:3154e7,maxStep:!1}},f;n.Ticks.generators.time=function(n,t){var u,r,f=n.isoWeekday;return n.unit==="week"&&f!==!1?(u=i(t.min).startOf("isoWeek").isoWeekday(f).valueOf(),r=i(t.max).startOf("isoWeek").isoWeekday(f),t.max-r>0&&r.add(1,"week"),r=r.valueOf()):(u=i(t.min).startOf(n.unit).valueOf(),r=i(t.max).startOf(n.unit),t.max-r>0&&r.add(1,n.unit),r=r.valueOf()),s(n,t,{min:u,max:r})};f=n.Scale.extend({initialize:function(){if(!i)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");n.Scale.prototype.initialize.call(this)},determineDataLimits:function(){var n=this,e=n.options.time,u=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER,s=n.chart.data,o={labels:[],datasets:[]},i;t.each(s.labels,function(t,s){var h=r(n,t);h.isValid()&&(e.round&&h.startOf(e.round),i=h.valueOf(),u=Math.min(i,u),f=Math.max(i,f),o.labels[s]=i)});t.each(s.datasets,function(s,h){var c=[];typeof s.data[0]=="object"&&s.data[0]!==null&&n.chart.isDatasetVisible(h)?t.each(s.data,function(t,o){var s=r(n,n.getRightValue(t));s.isValid()&&(e.round&&s.startOf(e.round),i=s.valueOf(),u=Math.min(i,u),f=Math.max(i,f),c[o]=i)}):c=o.labels.slice();o.datasets[h]=c});n.dataMin=u;n.dataMax=f;n._parsedData=o},buildTicks:function(){var i=this,u=i.options.time,f,s,h=i.dataMin,a=i.dataMax,v,c,l,y;u.min&&(v=r(i,u.min),u.round&&v.round(u.round),f=v.valueOf());u.max&&(s=r(i,u.max).valueOf());c=i.getLabelCapacity(f||h);l=u.unit||e(u.minUnit,f||h,s||a,c);i.displayFormat=u.displayFormats[l];y=u.stepSize||o(f||h,s||a,l,c);i.ticks=n.Ticks.generators.time({maxTicks:c,min:f,max:s,stepSize:y,unit:l,isoWeekday:u.isoWeekday},{min:h,max:a});i.max=t.max(i.ticks);i.min=t.min(i.ticks)},getLabelForIndex:function(n,t){var i=this,u=i.chart.data.labels&&n<i.chart.data.labels.length?i.chart.data.labels[n]:"",f=i.chart.data.datasets[t].data[n];return f!==null&&typeof f=="object"&&(u=i.getRightValue(f)),i.options.time.tooltipFormat&&(u=r(i,u).format(i.options.time.tooltipFormat)),u},tickFormatFunction:function(n,i,r){var u=n.format(this.displayFormat),f=this.options.ticks,e=t.getValueOrDefault(f.callback,f.userCallback);return e?e(u,i,r):u},convertTicksToLabels:function(){var n=this;n.ticksAsTimestamps=n.ticks;n.ticks=n.ticks.map(function(n){return i(n)}).map(n.tickFormatFunction,n)},getPixelForOffset:function(n){var t=this,i=t.max-t.min,r=i?(n-t.min)/i:0,u,f;return t.isHorizontal()?(u=t.width*r,t.left+Math.round(u)):(f=t.height*r,t.top+Math.round(f))},getPixelForValue:function(n,t,i){var f=this,u=null;return t!==undefined&&i!==undefined&&(u=f._parsedData.datasets[i][t]),u===null&&(n&&n.isValid||(n=r(f,f.getRightValue(n))),n&&n.isValid&&n.isValid()&&(u=n.valueOf())),u!==null?f.getPixelForOffset(u):void 0},getPixelForTick:function(n){return this.getPixelForOffset(this.ticksAsTimestamps[n])},getValueForPixel:function(n){var t=this,r=t.isHorizontal()?t.width:t.height,u=(n-(t.isHorizontal()?t.left:t.top))/r;return i(t.min+u*(t.max-t.min))},getLabelWidth:function(i){var u=this,r=u.options.ticks,f=u.ctx.measureText(i).width,e=Math.cos(t.toRadians(r.maxRotation)),o=Math.sin(t.toRadians(r.maxRotation)),s=t.getValueOrDefault(r.fontSize,n.defaults.global.defaultFontSize);return f*e+s*o},getLabelCapacity:function(n){var t=this;t.displayFormat=t.options.time.displayFormats.millisecond;var r=t.tickFormatFunction(i(n),0,[]),u=t.getLabelWidth(r),f=t.isHorizontal()?t.width:t.height;return f/u}});n.scaleService.registerScaleType("time",f,{position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}})}},{"6":6}]},{},[7])(7)}),function(n){n.color={};n.color.make=function(t,i,r,u){var f={};return f.r=t||0,f.g=i||0,f.b=r||0,f.a=u!=null?u:1,f.add=function(n,t){for(var i=0;i<n.length;++i)f[n.charAt(i)]+=t;return f.normalize()},f.scale=function(n,t){for(var i=0;i<n.length;++i)f[n.charAt(i)]*=t;return f.normalize()},f.toString=function(){return f.a>=1?"rgb("+[f.r,f.g,f.b].join(",")+")":"rgba("+[f.r,f.g,f.b,f.a].join(",")+")"},f.normalize=function(){function n(n,t,i){return t<n?n:t>i?i:t}return f.r=n(0,parseInt(f.r),255),f.g=n(0,parseInt(f.g),255),f.b=n(0,parseInt(f.b),255),f.a=n(0,f.a,1),f},f.clone=function(){return n.color.make(f.r,f.b,f.g,f.a)},f.normalize()};n.color.extract=function(t,i){var r;do{if(r=t.css(i).toLowerCase(),r!=""&&r!="transparent")break;t=t.parent()}while(t.length&&!n.nodeName(t.get(0),"body"));return r=="rgba(0, 0, 0, 0)"&&(r="transparent"),n.color.parse(r)};n.color.parse=function(i){var r,u=n.color.make,f;return(r=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(i))?u(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10)):(r=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(i))?u(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4])):(r=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(i))?u(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55):(r=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(i))?u(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55,parseFloat(r[4])):(r=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(i))?u(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)):(r=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(i))?u(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)):(f=n.trim(i).toLowerCase(),f=="transparent"?u(255,255,255,0):(r=t[f]||[0,0,0],u(r[0],r[1],r[2])))};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],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],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(n){function t(t,i){var r=i.children("."+t)[0];if(r==null&&(r=document.createElement("canvas"),r.className=t,n(r).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(i),!r.getContext))if(window.G_vmlCanvasManager)r=window.G_vmlCanvasManager.initElement(r);else throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");this.element=r;var u=this.context=r.getContext("2d"),f=window.devicePixelRatio||1,e=u.webkitBackingStorePixelRatio||u.mozBackingStorePixelRatio||u.msBackingStorePixelRatio||u.oBackingStorePixelRatio||u.backingStorePixelRatio||1;this.pixelRatio=f/e;this.resize(i.width(),i.height());this.textContainer=null;this.text={};this._textCache={}}function r(i,r,f,e){function nt(n,t){t=[l].concat(t);for(var i=0;i<n.length;++i)n[i].apply(this,t)}function ui(){for(var i,u={Canvas:t},r=0;r<e.length;++r)i=e[r],i.init(l,u),i.options&&n.extend(!0,o,i.options)}function fi(t){var f;n.extend(!0,o,t);t&&t.colors&&(o.colors=t.colors);o.xaxis.color==null&&(o.xaxis.color=n.color.parse(o.grid.color).scale("a",.22).toString());o.yaxis.color==null&&(o.yaxis.color=n.color.parse(o.grid.color).scale("a",.22).toString());o.xaxis.tickColor==null&&(o.xaxis.tickColor=o.grid.tickColor||o.xaxis.color);o.yaxis.tickColor==null&&(o.yaxis.tickColor=o.grid.tickColor||o.yaxis.color);o.grid.borderColor==null&&(o.grid.borderColor=o.grid.color);o.grid.tickColor==null&&(o.grid.tickColor=n.color.parse(o.grid.color).scale("a",.22).toString());for(var r,s=i.css("font-size"),c=s?+s.replace("px",""):13,h={style:i.css("font-style"),size:Math.round(.8*c),variant:i.css("font-variant"),weight:i.css("font-weight"),family:i.css("font-family")},e=o.xaxes.length||1,u=0;u<e;++u)r=o.xaxes[u],r&&!r.tickColor&&(r.tickColor=r.color),r=n.extend(!0,{},o.xaxis,r),o.xaxes[u]=r,r.font&&(r.font=n.extend({},h,r.font),r.font.color||(r.font.color=r.color),r.font.lineHeight||(r.font.lineHeight=Math.round(r.font.size*1.15)));for(e=o.yaxes.length||1,u=0;u<e;++u)r=o.yaxes[u],r&&!r.tickColor&&(r.tickColor=r.color),r=n.extend(!0,{},o.yaxis,r),o.yaxes[u]=r,r.font&&(r.font=n.extend({},h,r.font),r.font.color||(r.font.color=r.color),r.font.lineHeight||(r.font.lineHeight=Math.round(r.font.size*1.15)));for(o.xaxis.noTicks&&o.xaxis.ticks==null&&(o.xaxis.ticks=o.xaxis.noTicks),o.yaxis.noTicks&&o.yaxis.ticks==null&&(o.yaxis.ticks=o.yaxis.noTicks),o.x2axis&&(o.xaxes[1]=n.extend(!0,{},o.xaxis,o.x2axis),o.xaxes[1].position="top",o.x2axis.min==null&&(o.xaxes[1].min=null),o.x2axis.max==null&&(o.xaxes[1].max=null)),o.y2axis&&(o.yaxes[1]=n.extend(!0,{},o.yaxis,o.y2axis),o.yaxes[1].position="right",o.y2axis.min==null&&(o.yaxes[1].min=null),o.y2axis.max==null&&(o.yaxes[1].max=null)),o.grid.coloredAreas&&(o.grid.markings=o.grid.coloredAreas),o.grid.coloredAreasColor&&(o.grid.markingsColor=o.grid.coloredAreasColor),o.lines&&n.extend(!0,o.series.lines,o.lines),o.points&&n.extend(!0,o.series.points,o.points),o.bars&&n.extend(!0,o.series.bars,o.bars),o.shadowSize!=null&&(o.series.shadowSize=o.shadowSize),o.highlightColor!=null&&(o.series.highlightColor=o.highlightColor),u=0;u<o.xaxes.length;++u)et(y,u+1).options=o.xaxes[u];for(u=0;u<o.yaxes.length;++u)et(w,u+1).options=o.yaxes[u];for(f in p)o.hooks[f]&&o.hooks[f].length&&(p[f]=p[f].concat(o.hooks[f]));nt(p.processOptions,[o])}function ht(n){c=ei(n);si();hi()}function ei(t){for(var r,u=[],i=0;i<t.length;++i)r=n.extend(!0,{},o.series),t[i].data!=null?(r.data=t[i].data,delete t[i].data,n.extend(!0,r,t[i]),t[i].data=r.data):r.data=t[i],u.push(r);return u}function ft(n,t){var i=n[t+"axis"];return typeof i=="object"&&(i=i.n),typeof i!="number"&&(i=1),i}function it(){return n.grep(y.concat(w),function(n){return n})}function ct(n){for(var i={},t,r=0;r<y.length;++r)t=y[r],t&&t.used&&(i["x"+t.n]=t.c2p(n.left));for(r=0;r<w.length;++r)t=w[r],t&&t.used&&(i["y"+t.n]=t.c2p(n.top));return i.x1!==undefined&&(i.x=i.x1),i.y1!==undefined&&(i.y=i.y1),i}function oi(n){for(var u={},t,i,r=0;r<y.length;++r)if(t=y[r],t&&t.used&&(i="x"+t.n,n[i]==null&&t.n==1&&(i="x"),n[i]!=null)){u.left=t.p2c(n[i]);break}for(r=0;r<w.length;++r)if(t=w[r],t&&t.used&&(i="y"+t.n,n[i]==null&&t.n==1&&(i="y"),n[i]!=null)){u.top=t.p2c(n[i]);break}return u}function et(t,i){return t[i-1]||(t[i-1]={n:i,direction:t==y?"x":"y",options:n.extend(!0,{},t==y?o.xaxis:o.yaxis)}),t[i-1]}function si(){for(var f=c.length,e=-1,u,h,t,l,a,i=0;i<c.length;++i)u=c[i].color,u!=null&&(f--,typeof u=="number"&&u>e&&(e=u));f<=e&&(f=e+1);var v,s=[],p=o.colors,b=p.length,r=0;for(i=0;i<f;i++)v=n.color.parse(p[i%b]||"#666"),i%b==0&&i&&(r=r>=0?r<.5?-r-.2:0:-r),s[i]=v.scale("rgb",1+r);for(h=0,i=0;i<c.length;++i){if(t=c[i],t.color==null?(t.color=s[h].toString(),++h):typeof t.color=="number"&&(t.color=s[t.color].toString()),t.lines.show==null){a=!0;for(l in t)if(t[l]&&t[l].show){a=!1;break}a&&(t.lines.show=!0)}t.lines.zero==null&&(t.lines.zero=!!t.lines.fill);t.xaxis=et(y,ft(t,"x"));t.yaxis=et(w,ft(t,"y"))}}function hi(){function b(n,t,i){t<n.datamin&&t!=-v&&(n.datamin=t);i>n.datamax&&i!=v&&(n.datamax=i)}var y=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,v=Number.MAX_VALUE,f,l,e,r,t,u,h,i,s,ut,ft,o,et,ot,k,a;for(n.each(it(),function(n,t){t.datamin=y;t.datamax=w;t.used=!1}),f=0;f<c.length;++f)t=c[f],t.datapoints={points:[]},nt(p.processRawData,[t,t.data,t.datapoints]);for(f=0;f<c.length;++f)if(t=c[f],ft=t.data,o=t.datapoints.format,o||(o=[],o.push({x:!0,number:!0,required:!0}),o.push({y:!0,number:!0,required:!0}),(t.bars.show||t.lines.show&&t.lines.fill)&&(et=!!(t.bars.show&&t.bars.zero||t.lines.show&&t.lines.zero),o.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:et}),t.bars.horizontal&&(delete o[o.length-1].y,o[o.length-1].x=!0)),t.datapoints.format=o),t.datapoints.pointsize==null)for(t.datapoints.pointsize=o.length,h=t.datapoints.pointsize,u=t.datapoints.points,ot=t.lines.show&&t.lines.steps,t.xaxis.used=t.yaxis.used=!0,l=e=0;l<ft.length;++l,e+=h){if(ut=ft[l],k=ut==null,!k)for(r=0;r<h;++r)i=ut[r],s=o[r],s&&(s.number&&i!=null&&(i=+i,isNaN(i)?i=null:i==Infinity?i=v:i==-Infinity&&(i=-v)),i==null&&(s.required&&(k=!0),s.defaultValue!=null&&(i=s.defaultValue))),u[e+r]=i;if(k)for(r=0;r<h;++r)i=u[e+r],i!=null&&(s=o[r],s.autoscale!==!1&&(s.x&&b(t.xaxis,i,i),s.y&&b(t.yaxis,i,i))),u[e+r]=null;else if(ot&&e>0&&u[e-h]!=null&&u[e-h]!=u[e]&&u[e-h+1]!=u[e+1]){for(r=0;r<h;++r)u[e+h+r]=u[e+r];u[e+1]=u[e-h+1];e+=h}}for(f=0;f<c.length;++f)t=c[f],nt(p.processDatapoints,[t,t.datapoints]);for(f=0;f<c.length;++f){t=c[f];u=t.datapoints.points;h=t.datapoints.pointsize;o=t.datapoints.format;var d=y,g=y,tt=w,rt=w;for(l=0;l<u.length;l+=h)if(u[l]!=null)for(r=0;r<h;++r)(i=u[l+r],s=o[r],s&&s.autoscale!==!1&&i!=v&&i!=-v)&&(s.x&&(i<d&&(d=i),i>tt&&(tt=i)),s.y&&(i<g&&(g=i),i>rt&&(rt=i)));if(t.bars.show){switch(t.bars.align){case"left":a=0;break;case"right":a=-t.bars.barWidth;break;default:a=-t.bars.barWidth/2}t.bars.horizontal?(g+=a,rt+=a+t.bars.barWidth):(d+=a,tt+=a+t.bars.barWidth)}b(t.xaxis,d,tt);b(t.yaxis,g,rt)}n.each(it(),function(n,t){t.datamin==y&&(t.datamin=null);t.datamax==w&&(t.datamax=null)})}function ci(){i.css("padding",0).children().filter(function(){return!n(this).hasClass("flot-overlay")&&!n(this).hasClass("flot-base")}).remove();i.css("position")=="static"&&i.css("position","relative");a=new t("flot-base",i);tt=new t("flot-overlay",i);s=a.context;v=tt.context;k=n(tt.element).unbind();var r=i.data("plot");r&&(r.shutdown(),tt.clear());i.data("plot",l)}function li(){o.grid.hoverable&&(k.mousemove(bt),k.bind("mouseleave",kt));o.grid.clickable&&k.click(dt);nt(p.bindEvents,[k])}function lt(){rt&&clearTimeout(rt);k.unbind("mousemove",bt);k.unbind("mouseleave",kt);k.unbind("click",dt);nt(p.shutdown,[k])}function ai(n){function u(n){return n}var i,r,t=n.options.transform||u,f=n.options.inverseTransform;n.direction=="x"?(i=n.scale=d/Math.abs(t(n.max)-t(n.min)),r=Math.min(t(n.max),t(n.min))):(i=n.scale=b/Math.abs(t(n.max)-t(n.min)),i=-i,r=Math.max(t(n.max),t(n.min)));n.p2c=t==u?function(n){return(n-r)*i}:function(n){return(t(n)-r)*i};n.c2p=f?function(n){return f(r+n/i)}:function(n){return r+n/i}}function vi(n){for(var e,o,t=n.options,r=n.ticks||[],i=t.labelWidth||0,u=t.labelHeight||0,s=i||(n.direction=="x"?Math.floor(a.width/(r.length||1)):null),h=n.direction+"Axis "+n.direction+n.n+"Axis",c="flot-"+n.direction+"-axis flot-"+n.direction+n.n+"-axis "+h,l=t.font||"flot-tick-label tickLabel",f=0;f<r.length;++f)(e=r[f],e.label)&&(o=a.getTextInfo(c,e.label,l,null,s),i=Math.max(i,o.width),u=Math.max(u,o.height));n.labelWidth=t.labelWidth||i;n.labelHeight=t.labelHeight||u}function yi(t){var r=t.labelWidth,u=t.labelHeight,e=t.options.position,l=t.direction==="x",f=t.options.tickLength,i=o.grid.axisMargin,s=o.grid.labelMargin,v=!0,p=!0,b=!0,c=!1;n.each(l?y:w,function(n,i){i&&(i.show||i.reserveSpace)&&(i===t?c=!0:i.options.position===e&&(c?p=!1:v=!1),c||(b=!1))});p&&(i=0);f==null&&(f=b?"full":5);isNaN(+f)||(s+=+f);l?(u+=s,e=="bottom"?(h.bottom+=u+i,t.box={top:a.height-h.bottom,height:u}):(t.box={top:h.top+i,height:u},h.top+=u+i)):(r+=s,e=="left"?(t.box={left:h.left+i,width:r},h.left+=r+i):(h.right+=r+i,t.box={left:a.width-h.right,width:r}));t.position=e;t.tickLength=f;t.box.padding=s;t.innermost=v}function pi(n){n.direction=="x"?(n.box.left=h.left-n.labelWidth/2,n.box.width=a.width-h.left-h.right+n.labelWidth):(n.box.top=h.top-n.labelHeight/2,n.box.height=a.height-h.bottom-h.top+n.labelHeight)}function wi(){var i=o.grid.minBorderMargin,r,t;if(i==null)for(i=0,r=0;r<c.length;++r)i=Math.max(i,2*(c[r].points.radius+c[r].points.lineWidth/2));t={left:i,right:i,top:i,bottom:i};n.each(it(),function(n,i){i.reserveSpace&&i.ticks&&i.ticks.length&&(i.direction==="x"?(t.left=Math.max(t.left,i.labelWidth/2),t.right=Math.max(t.right,i.labelWidth/2)):(t.bottom=Math.max(t.bottom,i.labelHeight/2),t.top=Math.max(t.top,i.labelHeight/2)))});h.left=Math.ceil(Math.max(t.left,h.left));h.right=Math.ceil(Math.max(t.right,h.right));h.top=Math.ceil(Math.max(t.top,h.top));h.bottom=Math.ceil(Math.max(t.bottom,h.bottom))}function at(){var r,e=it(),u=o.grid.show,f,t,i;for(t in h)f=o.grid.margin||0,h[t]=typeof f=="number"?f:f[t]||0;nt(p.processOffset,[h]);for(t in h)h[t]+=typeof o.grid.borderWidth=="object"?u?o.grid.borderWidth[t]:0:u?o.grid.borderWidth:0;if(n.each(e,function(n,t){var i=t.options;t.show=i.show==null?t.used:i.show;t.reserveSpace=i.reserveSpace==null?t.show:i.reserveSpace;bi(t)}),u){for(i=n.grep(e,function(n){return n.show||n.reserveSpace}),n.each(i,function(n,t){ki(t);di(t);gi(t,t.ticks);vi(t)}),r=i.length-1;r>=0;--r)yi(i[r]);wi();n.each(i,function(n,t){pi(t)})}d=a.width-h.left-h.right;b=a.height-h.bottom-h.top;n.each(e,function(n,t){ai(t)});u&&tr();er()}function bi(n){var t=n.options,r=+(t.min!=null?t.min:n.datamin),i=+(t.max!=null?t.max:n.datamax),f=i-r,e,u;f==0?(e=i==0?1:.01,t.min==null&&(r-=e),(t.max==null||t.min!=null)&&(i+=e)):(u=t.autoscaleMargin,u!=null&&(t.min==null&&(r-=f*u,r<0&&n.datamin!=null&&n.datamin>=0&&(r=0)),t.max==null&&(i+=f*u,i>0&&n.datamax!=null&&n.datamax<=0&&(i=0))));n.min=r;n.max=i}function ki(t){var i=t.options,b,v,h,f,r,s,p,c;b=typeof i.ticks=="number"&&i.ticks>0?i.ticks:.3*Math.sqrt(t.direction=="x"?a.width:a.height);var l=(t.max-t.min)/b,o=-Math.floor(Math.log(l)/Math.LN10),e=i.tickDecimals;if(e!=null&&o>e&&(o=e),v=Math.pow(10,-o),h=l/v,h<1.5?f=1:h<3?(f=2,h>2.25&&(e==null||o+1<=e)&&(f=2.5,++o)):f=h<7.5?5:10,f*=v,i.minTickSize!=null&&f<i.minTickSize&&(f=i.minTickSize),t.delta=l,t.tickDecimals=Math.max(0,e!=null?e:o),t.tickSize=i.tickSize||f,i.mode=="time"&&!t.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");t.tickGenerator||(t.tickGenerator=function(n){var i=[],e=u(n.min,n.tickSize),r=0,t=Number.NaN,f;do f=t,t=e+r*n.tickSize,i.push(t),++r;while(t<n.max&&t!=f);return i},t.tickFormatter=function(n,t){var u=t.tickDecimals?Math.pow(10,t.tickDecimals):1,i=""+Math.round(n*u)/u,f,r;return t.tickDecimals!=null&&(f=i.indexOf("."),r=f==-1?0:i.length-f-1,r<t.tickDecimals)?(r?i:i+".")+(""+u).substr(1,t.tickDecimals-r):i});n.isFunction(i.tickFormatter)&&(t.tickFormatter=function(n,t){return""+i.tickFormatter(n,t)});i.alignTicksWithAxis!=null&&(r=(t.direction=="x"?y:w)[i.alignTicksWithAxis-1],r&&r.used&&r!=t&&(s=t.tickGenerator(t),s.length>0&&(i.min==null&&(t.min=Math.min(t.min,s[0])),i.max==null&&s.length>1&&(t.max=Math.max(t.max,s[s.length-1]))),t.tickGenerator=function(n){for(var u=[],t,i=0;i<r.ticks.length;++i)t=(r.ticks[i].v-r.min)/(r.max-r.min),t=n.min+t*(n.max-n.min),u.push(t);return u},t.mode||i.tickDecimals!=null||(p=Math.max(0,-Math.floor(Math.log(t.delta)/Math.LN10)+1),c=t.tickGenerator(t),c.length>1&&/\..*0$/.test((c[1]-c[0]).toFixed(p))||(t.tickDecimals=p))))}function di(t){var i=t.options.ticks,e=[],o,u,f,r;for(i==null||typeof i=="number"&&i>0?e=t.tickGenerator(t):i&&(e=n.isFunction(i)?i(t):i),t.ticks=[],o=0;o<e.length;++o)f=null,r=e[o],typeof r=="object"?(u=+r[0],r.length>1&&(f=r[1])):u=+r,f==null&&(f=t.tickFormatter(u,t)),isNaN(u)||t.ticks.push({v:u,label:f})}function gi(n,t){n.options.autoscaleMargin&&t.length>0&&(n.options.min==null&&(n.min=Math.min(n.min,t[0].v)),n.options.max==null&&t.length>1&&(n.max=Math.max(n.max,t[t.length-1].v)))}function vt(){var n,t;for(a.clear(),nt(p.drawBackground,[s]),n=o.grid,n.show&&n.backgroundColor&&nr(),n.show&&!n.aboveData&&pt(),t=0;t<c.length;++t)nt(p.drawSeries,[s,c[t]]),ir(c[t]);nt(p.draw,[s]);n.show&&n.aboveData&&pt();a.render();ut()}function yt(n,t){for(var s,f,i,r,u,o=it(),e=0;e<o.length;++e)if(f=o[e],f.direction==t&&(u=t+f.n+"axis",n[u]||f.n!=1||(u=t+"axis"),n[u])){i=n[u].from;r=n[u].to;break}return n[u]||(f=t=="x"?y[0]:w[0],i=n[t+"1"],r=n[t+"2"]),i!=null&&r!=null&&i>r&&(s=i,i=r,r=s),{from:i,to:r,axis:f}}function nr(){s.save();s.translate(h.left,h.top);s.fillStyle=ri(o.grid.backgroundColor,b,0,"rgba(255, 255, 255, 0)");s.fillRect(0,0,d,b);s.restore()}function pt(){var v,f,t,e,k,rt,et,ot,tt,ut,w;if(s.save(),s.translate(h.left,h.top),k=o.grid.markings,k)for(n.isFunction(k)&&(f=l.getAxes(),f.xmin=f.xaxis.min,f.xmax=f.xaxis.max,f.ymin=f.yaxis.min,f.ymax=f.yaxis.max,k=k(f)),v=0;v<k.length;++v){var nt=k[v],i=yt(nt,"x"),r=yt(nt,"y");(i.from==null&&(i.from=i.axis.min),i.to==null&&(i.to=i.axis.max),r.from==null&&(r.from=r.axis.min),r.to==null&&(r.to=r.axis.max),i.to<i.axis.min||i.from>i.axis.max||r.to<r.axis.min||r.from>r.axis.max)||(i.from=Math.max(i.from,i.axis.min),i.to=Math.min(i.to,i.axis.max),r.from=Math.max(r.from,r.axis.min),r.to=Math.min(r.to,r.axis.max),rt=i.from===i.to,et=r.from===r.to,rt&&et)||(i.from=Math.floor(i.axis.p2c(i.from)),i.to=Math.floor(i.axis.p2c(i.to)),r.from=Math.floor(r.axis.p2c(r.from)),r.to=Math.floor(r.axis.p2c(r.to)),rt||et?(ot=nt.lineWidth||o.grid.markingsLineWidth,tt=ot%2?.5:0,s.beginPath(),s.strokeStyle=nt.color||o.grid.markingsColor,s.lineWidth=ot,rt?(s.moveTo(i.to+tt,r.from),s.lineTo(i.to+tt,r.to)):(s.moveTo(i.from,r.to+tt),s.lineTo(i.to,r.to+tt)),s.stroke()):(s.fillStyle=nt.color||o.grid.markingsColor,s.fillRect(i.from,r.to,i.to-i.from,r.from-r.to)))}for(f=it(),t=o.grid.borderWidth,ut=0;ut<f.length;++ut){var u=f[ut],ft=u.box,g=u.tickLength,c,a,y,p;if(u.show&&u.ticks.length!=0){for(s.lineWidth=1,u.direction=="x"?(c=0,a=g=="full"?u.position=="top"?0:b:ft.top-h.top+(u.position=="top"?ft.height:0)):(a=0,c=g=="full"?u.position=="left"?0:d:ft.left-h.left+(u.position=="left"?ft.width:0)),u.innermost||(s.strokeStyle=u.options.color,s.beginPath(),y=p=0,u.direction=="x"?y=d+1:p=b+1,s.lineWidth==1&&(u.direction=="x"?a=Math.floor(a)+.5:c=Math.floor(c)+.5),s.moveTo(c,a),s.lineTo(c+y,a+p),s.stroke()),s.strokeStyle=u.options.tickColor,s.beginPath(),v=0;v<u.ticks.length;++v)(w=u.ticks[v].v,y=p=0,isNaN(w)||w<u.min||w>u.max||g=="full"&&(typeof t=="object"&&t[u.position]>0||t>0)&&(w==u.min||w==u.max))||(u.direction=="x"?(c=u.p2c(w),p=g=="full"?-b:g,u.position=="top"&&(p=-p)):(a=u.p2c(w),y=g=="full"?-d:g,u.position=="left"&&(y=-y)),s.lineWidth==1&&(u.direction=="x"?c=Math.floor(c)+.5:a=Math.floor(a)+.5),s.moveTo(c,a),s.lineTo(c+y,a+p));s.stroke()}}t&&(e=o.grid.borderColor,typeof t=="object"||typeof e=="object"?(typeof t!="object"&&(t={top:t,right:t,bottom:t,left:t}),typeof e!="object"&&(e={top:e,right:e,bottom:e,left:e}),t.top>0&&(s.strokeStyle=e.top,s.lineWidth=t.top,s.beginPath(),s.moveTo(0-t.left,0-t.top/2),s.lineTo(d,0-t.top/2),s.stroke()),t.right>0&&(s.strokeStyle=e.right,s.lineWidth=t.right,s.beginPath(),s.moveTo(d+t.right/2,0-t.top),s.lineTo(d+t.right/2,b),s.stroke()),t.bottom>0&&(s.strokeStyle=e.bottom,s.lineWidth=t.bottom,s.beginPath(),s.moveTo(d+t.right,b+t.bottom/2),s.lineTo(0,b+t.bottom/2),s.stroke()),t.left>0&&(s.strokeStyle=e.left,s.lineWidth=t.left,s.beginPath(),s.moveTo(0-t.left/2,b+t.bottom),s.lineTo(0-t.left/2,0),s.stroke())):(s.lineWidth=t,s.strokeStyle=o.grid.borderColor,s.strokeRect(-t/2,-t/2,d+t,b+t)));s.restore()}function tr(){n.each(it(),function(n,t){var i=t.box,l=t.direction+"Axis "+t.direction+t.n+"Axis",c="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+l,v=t.options.font||"flot-tick-label tickLabel",r,u,f,o,s,e;if(a.removeText(c),t.show&&t.ticks.length!=0)for(e=0;e<t.ticks.length;++e)(r=t.ticks[e],!r.label||r.v<t.min||r.v>t.max)||(t.direction=="x"?(o="center",u=h.left+t.p2c(r.v),t.position=="bottom"?f=i.top+i.padding:(f=i.top+i.height-i.padding,s="bottom")):(s="middle",f=h.top+t.p2c(r.v),t.position=="left"?(u=i.left+i.width-i.padding,o="right"):u=i.left+i.padding),a.addText(c,u,f,r.label,v,null,null,o,s))})}function ir(n){n.lines.show&&rr(n);n.bars.show&&fr(n);n.points.show&&ur(n)}function rr(n){function u(n,t,i,r,u){var l=n.points,a=n.pointsize,v=null,y=null,c;for(s.beginPath(),c=a;c<l.length;c+=a){var f=l[c-a],e=l[c-a+1],o=l[c],h=l[c+1];if(f!=null&&o!=null){if(e<=h&&e<u.min){if(h<u.min)continue;f=(u.min-e)/(h-e)*(o-f)+f;e=u.min}else if(h<=e&&h<u.min){if(e<u.min)continue;o=(u.min-e)/(h-e)*(o-f)+f;h=u.min}if(e>=h&&e>u.max){if(h>u.max)continue;f=(u.max-e)/(h-e)*(o-f)+f;e=u.max}else if(h>=e&&h>u.max){if(e>u.max)continue;o=(u.max-e)/(h-e)*(o-f)+f;h=u.max}if(f<=o&&f<r.min){if(o<r.min)continue;e=(r.min-f)/(o-f)*(h-e)+e;f=r.min}else if(o<=f&&o<r.min){if(f<r.min)continue;h=(r.min-f)/(o-f)*(h-e)+e;o=r.min}if(f>=o&&f>r.max){if(o>r.max)continue;e=(r.max-f)/(o-f)*(h-e)+e;f=r.max}else if(o>=f&&o>r.max){if(f>r.max)continue;h=(r.max-f)/(o-f)*(h-e)+e;o=r.max}(f!=v||e!=y)&&s.moveTo(r.p2c(f)+t,u.p2c(e)+i);v=o;y=h;s.lineTo(r.p2c(o)+t,u.p2c(h)+i)}}s.stroke()}function e(n,t,i){for(var c=n.points,o=n.pointsize,b=Math.min(Math.max(0,i.min),i.max),h=0,l=!1,a=1,p=0,w=0,v,y;;){if(o>0&&h>c.length+o)break;h+=o;var r=c[h-o],u=c[h-o+a],f=c[h],e=c[h+a];if(l){if(o>0&&r!=null&&f==null){w=h;o=-o;a=2;continue}if(o<0&&h==p+o){s.fill();l=!1;o=-o;a=1;h=p=w+o;continue}}if(r!=null&&f!=null){if(r<=f&&r<t.min){if(f<t.min)continue;u=(t.min-r)/(f-r)*(e-u)+u;r=t.min}else if(f<=r&&f<t.min){if(r<t.min)continue;e=(t.min-r)/(f-r)*(e-u)+u;f=t.min}if(r>=f&&r>t.max){if(f>t.max)continue;u=(t.max-r)/(f-r)*(e-u)+u;r=t.max}else if(f>=r&&f>t.max){if(r>t.max)continue;e=(t.max-r)/(f-r)*(e-u)+u;f=t.max}if(l||(s.beginPath(),s.moveTo(t.p2c(r),i.p2c(b)),l=!0),u>=i.max&&e>=i.max){s.lineTo(t.p2c(r),i.p2c(i.max));s.lineTo(t.p2c(f),i.p2c(i.max));continue}else if(u<=i.min&&e<=i.min){s.lineTo(t.p2c(r),i.p2c(i.min));s.lineTo(t.p2c(f),i.p2c(i.min));continue}v=r;y=f;u<=e&&u<i.min&&e>=i.min?(r=(i.min-u)/(e-u)*(f-r)+r,u=i.min):e<=u&&e<i.min&&u>=i.min&&(f=(i.min-u)/(e-u)*(f-r)+r,e=i.min);u>=e&&u>i.max&&e<=i.max?(r=(i.max-u)/(e-u)*(f-r)+r,u=i.max):e>=u&&e>i.max&&u<=i.max&&(f=(i.max-u)/(e-u)*(f-r)+r,e=i.max);r!=v&&s.lineTo(t.p2c(v),i.p2c(u));s.lineTo(t.p2c(r),i.p2c(u));s.lineTo(t.p2c(f),i.p2c(e));f!=y&&(s.lineTo(t.p2c(f),i.p2c(e)),s.lineTo(t.p2c(y),i.p2c(e)))}}}var t,i,r,f;s.save();s.translate(h.left,h.top);s.lineJoin="round";t=n.lines.lineWidth;i=n.shadowSize;t>0&&i>0&&(s.lineWidth=i,s.strokeStyle="rgba(0,0,0,0.1)",r=Math.PI/18,u(n.datapoints,Math.sin(r)*(t/2+i/2),Math.cos(r)*(t/2+i/2),n.xaxis,n.yaxis),s.lineWidth=i/2,u(n.datapoints,Math.sin(r)*(t/2+i/4),Math.cos(r)*(t/2+i/4),n.xaxis,n.yaxis));s.lineWidth=t;s.strokeStyle=n.color;f=ot(n.lines,n.color,0,b);f&&(s.fillStyle=f,e(n.datapoints,n.xaxis,n.yaxis));t>0&&u(n.datapoints,0,0,n.xaxis,n.yaxis);s.restore()}function ur(n){function r(n,t,i,r,u,f,e,o){for(var h,c,a=n.points,v=n.pointsize,l=0;l<a.length;l+=v)(h=a[l],c=a[l+1],h==null||h<f.min||h>f.max||c<e.min||c>e.max)||(s.beginPath(),h=f.p2c(h),c=e.p2c(c)+r,o=="circle"?s.arc(h,c,t,0,u?Math.PI:Math.PI*2,!1):o(s,h,c,t,u),s.closePath(),i&&(s.fillStyle=i,s.fill()),s.stroke())}var t;s.save();s.translate(h.left,h.top);var i=n.points.lineWidth,e=n.shadowSize,u=n.points.radius,f=n.points.symbol;i==0&&(i=.0001);i>0&&e>0&&(t=e/2,s.lineWidth=t,s.strokeStyle="rgba(0,0,0,0.1)",r(n.datapoints,u,null,t+t/2,!0,n.xaxis,n.yaxis,f),s.strokeStyle="rgba(0,0,0,0.2)",r(n.datapoints,u,null,t/2,!0,n.xaxis,n.yaxis,f));s.lineWidth=i;s.strokeStyle=n.color;r(n.datapoints,u,ot(n.points,n.color),0,!1,n.xaxis,n.yaxis,f);s.restore()}function wt(n,t,i,r,u,f,e,o,s,h,c){var l,y,a,v,p,w,b,k,d;(h?(k=w=b=!0,p=!1,l=i,y=n,v=t+r,a=t+u,y<l&&(d=y,y=l,l=d,p=!0,w=!1)):(p=w=b=!0,k=!1,l=n+r,y=n+u,a=i,v=t,v<a&&(d=v,v=a,a=d,k=!0,b=!1)),y<e.min||l>e.max||v<o.min||a>o.max)||(l<e.min&&(l=e.min,p=!1),y>e.max&&(y=e.max,w=!1),a<o.min&&(a=o.min,k=!1),v>o.max&&(v=o.max,b=!1),l=e.p2c(l),a=o.p2c(a),y=e.p2c(y),v=o.p2c(v),f&&(s.fillStyle=f(a,v),s.fillRect(l,v,y-l,a-v)),c>0&&(p||w||b||k)&&(s.beginPath(),s.moveTo(l,a),p?s.lineTo(l,v):s.moveTo(l,v),b?s.lineTo(y,v):s.moveTo(y,v),w?s.lineTo(y,a):s.moveTo(y,a),k?s.lineTo(l,a):s.moveTo(l,a),s.stroke()))}function fr(n){function r(t,i,r,u,f,e){for(var h=t.points,c=t.pointsize,o=0;o<h.length;o+=c)h[o]!=null&&wt(h[o],h[o+1],h[o+2],i,r,u,f,e,s,n.bars.horizontal,n.bars.lineWidth)}var t,i;s.save();s.translate(h.left,h.top);s.lineWidth=n.bars.lineWidth;s.strokeStyle=n.color;switch(n.bars.align){case"left":t=0;break;case"right":t=-n.bars.barWidth;break;default:t=-n.bars.barWidth/2}i=n.bars.fill?function(t,i){return ot(n.bars,n.color,t,i)}:null;r(n.datapoints,t,t+n.bars.barWidth,i,n.xaxis,n.yaxis);s.restore()}function ot(t,i,r,u){var e=t.fill,f;return e?t.fillColor?ri(t.fillColor,r,u,i):(f=n.color.parse(i),f.a=typeof e=="number"?e:.4,f.normalize(),f.toString()):null}function er(){var g,r,w,b,v,t,k;if(o.legend.container!=null?n(o.legend.container).html(""):i.find(".legend").remove(),o.legend.show){var f=[],e=[],y=!1,d=o.legend.labelFormatter,s,p;for(r=0;r<c.length;++r)s=c[r],s.label&&(p=d?d(s.label,s):s.label,p&&e.push({label:p,color:s.color}));for(o.legend.sorted&&(n.isFunction(o.legend.sorted)?e.sort(o.legend.sorted):o.legend.sorted=="reverse"?e.reverse():(g=o.legend.sorted!="descending",e.sort(function(n,t){return n.label==t.label?0:n.label<t.label!=g?1:-1}))),r=0;r<e.length;++r)w=e[r],r%o.legend.noColumns==0&&(y&&f.push("<\/tr>"),f.push("<tr>"),y=!0),f.push('<td class="legendColorBox"><div style="border:1px solid '+o.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+w.color+';overflow:hidden"><\/div><\/div><\/td><td class="legendLabel">'+w.label+"<\/td>");if(y&&f.push("<\/tr>"),f.length!=0)if(b='<table style="font-size:smaller;color:'+o.grid.color+'">'+f.join("")+"<\/table>",o.legend.container!=null)n(o.legend.container).html(b);else{var l="",a=o.legend.position,u=o.legend.margin;u[0]==null&&(u=[u,u]);a.charAt(0)=="n"?l+="top:"+(u[1]+h.top)+"px;":a.charAt(0)=="s"&&(l+="bottom:"+(u[1]+h.bottom)+"px;");a.charAt(1)=="e"?l+="right:"+(u[0]+h.right)+"px;":a.charAt(1)=="w"&&(l+="left:"+(u[0]+h.left)+"px;");v=n('<div class="legend">'+b.replace('style="','style="position:absolute;'+l+";")+"<\/div>").appendTo(i);o.legend.backgroundOpacity!=0&&(t=o.legend.backgroundColor,t==null&&(t=o.grid.backgroundColor,t=t&&typeof t=="string"?n.color.parse(t):n.color.extract(v,"background-color"),t.a=1,t=t.toString()),k=v.children(),n('<div style="position:absolute;width:'+k.width()+"px;height:"+k.height()+"px;"+l+"background-color:"+t+';"> <\/div>').prependTo(v).css("opacity",o.legend.backgroundOpacity))}}}function or(n,t,i){for(var w=o.grid.mouseActiveRadius,it=w*w+1,a=null,r,s,e,h,p,tt,u=c.length-1;u>=0;--u)if(i(c[u])){var f=c[u],b=f.xaxis,k=f.yaxis,l=f.datapoints.points,v=b.c2p(n),y=k.c2p(t),g=w/b.scale,nt=w/k.scale;if(s=f.datapoints.pointsize,b.options.inverseTransform&&(g=Number.MAX_VALUE),k.options.inverseTransform&&(nt=Number.MAX_VALUE),f.lines.show||f.points.show)for(r=0;r<l.length;r+=s)if((e=l[r],h=l[r+1],e!=null)&&!(e-v>g)&&!(e-v<-g)&&!(h-y>nt)&&!(h-y<-nt)){var rt=Math.abs(b.p2c(e)-n),ut=Math.abs(k.p2c(h)-t),ft=rt*rt+ut*ut;ft<it&&(it=ft,a=[u,r/s])}if(f.bars.show&&!a){switch(f.bars.align){case"left":p=0;break;case"right":p=-f.bars.barWidth;break;default:p=-f.bars.barWidth/2}for(tt=p+f.bars.barWidth,r=0;r<l.length;r+=s){var e=l[r],h=l[r+1],d=l[r+2];e!=null&&(c[u].bars.horizontal?v<=Math.max(d,e)&&v>=Math.min(d,e)&&y>=h+p&&y<=h+tt:v>=e+p&&v<=e+tt&&y>=Math.min(d,h)&&y<=Math.max(d,h))&&(a=[u,r/s])}}}return a?(u=a[0],r=a[1],s=c[u].datapoints.pointsize,{datapoint:c[u].datapoints.points.slice(r*s,(r+1)*s),dataIndex:r,series:c[u],seriesIndex:u}):null}function bt(n){o.grid.hoverable&&st("plothover",n,function(n){return n.hoverable!=!1})}function kt(n){o.grid.hoverable&&st("plothover",n,function(){return!1})}function dt(n){st("plotclick",n,function(n){return n.clickable!=!1})}function st(n,t,r){var e=k.offset(),l=t.pageX-e.left-h.left,a=t.pageY-e.top-h.top,c=ct({left:l,top:a}),u,s,f;if(c.pageX=t.pageX,c.pageY=t.pageY,u=or(l,a,r),u&&(u.pageX=parseInt(u.series.xaxis.p2c(u.datapoint[0])+e.left+h.left,10),u.pageY=parseInt(u.series.yaxis.p2c(u.datapoint[1])+e.top+h.top,10)),o.grid.autoHighlight){for(s=0;s<g.length;++s)f=g[s],f.auto!=n||u&&f.series==u.series&&f.point[0]==u.datapoint[0]&&f.point[1]==u.datapoint[1]||ti(f.series,f.point);u&&ni(u.series,u.datapoint,n)}i.trigger(n,[c,u])}function ut(){var n=o.interaction.redrawOverlayInterval;if(n==-1){gt();return}rt||(rt=setTimeout(gt,n))}function gt(){rt=null;v.save();tt.clear();v.translate(h.left,h.top);for(var n,t=0;t<g.length;++t)n=g[t],n.series.bars.show?hr(n.series,n.point):sr(n.series,n.point);v.restore();nt(p.drawOverlay,[v])}function ni(n,t,i){var r,u;typeof n=="number"&&(n=c[n]);typeof t=="number"&&(r=n.datapoints.pointsize,t=n.datapoints.points.slice(r*t,r*(t+1)));u=ii(n,t);u==-1?(g.push({series:n,point:t,auto:i}),ut()):i||(g[u].auto=!1)}function ti(n,t){var i,r;if(n==null&&t==null){g=[];ut();return}typeof n=="number"&&(n=c[n]);typeof t=="number"&&(i=n.datapoints.pointsize,t=n.datapoints.points.slice(i*t,i*(t+1)));r=ii(n,t);r!=-1&&(g.splice(r,1),ut())}function ii(n,t){for(var r,i=0;i<g.length;++i)if(r=g[i],r.series==n&&r.point[0]==t[0]&&r.point[1]==t[1])return i;return-1}function sr(t,i){var r=i[0],u=i[1],f=t.xaxis,e=t.yaxis,h=typeof t.highlightColor=="string"?t.highlightColor:n.color.parse(t.color).scale("a",.5).toString(),o,s;r<f.min||r>f.max||u<e.min||u>e.max||(o=t.points.radius+t.points.lineWidth/2,v.lineWidth=o,v.strokeStyle=h,s=1.5*o,r=f.p2c(r),u=e.p2c(u),v.beginPath(),t.points.symbol=="circle"?v.arc(r,u,s,0,2*Math.PI,!1):t.points.symbol(v,r,u,s,!1),v.closePath(),v.stroke())}function hr(t,i){var u=typeof t.highlightColor=="string"?t.highlightColor:n.color.parse(t.color).scale("a",.5).toString(),f=u,r;switch(t.bars.align){case"left":r=0;break;case"right":r=-t.bars.barWidth;break;default:r=-t.bars.barWidth/2}v.lineWidth=t.bars.lineWidth;v.strokeStyle=u;wt(i[0],i[1],i[2]||0,r,r+t.bars.barWidth,function(){return f},t.xaxis,t.yaxis,v,t.bars.horizontal,t.bars.lineWidth)}function ri(t,i,r,u){var h,e,c,f,o;if(typeof t=="string")return t;for(h=s.createLinearGradient(0,r,0,i),e=0,c=t.colors.length;e<c;++e)f=t.colors[e],typeof f!="string"&&(o=n.color.parse(u),f.brightness!=null&&(o=o.scale("rgb",f.brightness)),f.opacity!=null&&(o.a*=f.opacity),f=o.toString()),h.addColorStop(e/(c-1),f);return h}var c=[],o={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},a=null,tt=null,k=null,s=null,v=null,y=[],w=[],h={left:0,right:0,top:0,bottom:0},d=0,b=0,p={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},l=this,g,rt;l.setData=ht;l.setupGrid=at;l.draw=vt;l.getPlaceholder=function(){return i};l.getCanvas=function(){return a.element};l.getPlotOffset=function(){return h};l.width=function(){return d};l.height=function(){return b};l.offset=function(){var n=k.offset();return n.left+=h.left,n.top+=h.top,n};l.getData=function(){return c};l.getAxes=function(){var t={};return n.each(y.concat(w),function(n,i){i&&(t[i.direction+(i.n!=1?i.n:"")+"axis"]=i)}),t};l.getXAxes=function(){return y};l.getYAxes=function(){return w};l.c2p=ct;l.p2c=oi;l.getOptions=function(){return o};l.highlight=ni;l.unhighlight=ti;l.triggerRedrawOverlay=ut;l.pointOffset=function(n){return{left:parseInt(y[ft(n,"x")-1].p2c(+n.x)+h.left,10),top:parseInt(w[ft(n,"y")-1].p2c(+n.y)+h.top,10)}};l.shutdown=lt;l.destroy=function(){lt();i.removeData("plot").empty();c=[];o=null;a=null;tt=null;k=null;s=null;v=null;y=[];w=[];p=null;g=[];l=null};l.resize=function(){var n=i.width(),t=i.height();a.resize(n,t);tt.resize(n,t)};l.hooks=p;ui(l);fi(f);ci();ht(r);at();vt();li();g=[];rt=null}function u(n,t){return t*Math.floor(n/t)}var i=Object.prototype.hasOwnProperty;n.fn.detach||(n.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})});t.prototype.resize=function(n,t){if(n<=0||t<=0)throw new Error("Invalid dimensions for plot, width = "+n+", height = "+t);var i=this.element,u=this.context,r=this.pixelRatio;this.width!=n&&(i.width=n*r,i.style.width=n+"px",this.width=n);this.height!=t&&(i.height=t*r,i.style.height=t+"px",this.height=t);u.restore();u.save();u.scale(r,r)};t.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)};t.prototype.render=function(){var h=this._textCache,r,u,f,c,t,e,o,s,n;for(r in h)if(i.call(h,r)){u=this.getTextLayer(r);f=h[r];u.hide();for(c in f)if(i.call(f,c)){t=f[c];for(e in t)if(i.call(t,e)){for(o=t[e].positions,s=0;n=o[s];s++)n.active?n.rendered||(u.append(n.element),n.rendered=!0):(o.splice(s--,1),n.rendered&&n.element.detach());o.length==0&&delete t[e]}}u.show()}};t.prototype.getTextLayer=function(t){var i=this.text[t];return i==null&&(this.textContainer==null&&(this.textContainer=n("<div class='flot-text'><\/div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),i=this.text[t]=n("<div><\/div>").addClass(t).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),i};t.prototype.getTextInfo=function(t,i,r,u,f){var h,o,s,c,e;return i=""+i,h=typeof r=="object"?r.style+" "+r.variant+" "+r.weight+" "+r.size+"px/"+r.lineHeight+"px "+r.family:r,o=this._textCache[t],o==null&&(o=this._textCache[t]={}),s=o[h],s==null&&(s=o[h]={}),c=s[i],c==null&&(e=n("<div><\/div>").html(i).css({position:"absolute","max-width":f,top:-9999}).appendTo(this.getTextLayer(t)),typeof r=="object"?e.css({font:h,color:r.color}):typeof r=="string"&&e.addClass(r),c=s[i]={width:e.outerWidth(!0),height:e.outerHeight(!0),element:e,positions:[]},e.detach()),c};t.prototype.addText=function(n,t,i,r,u,f,e,o,s){var h=this.getTextInfo(n,r,u,f,e),l=h.positions,a,c;for(o=="center"?t-=h.width/2:o=="right"&&(t-=h.width),s=="middle"?i-=h.height/2:s=="bottom"&&(i-=h.height),a=0;c=l[a];a++)if(c.x==t&&c.y==i){c.active=!0;return}c={active:!0,rendered:!1,element:l.length?h.element.clone():h.element,x:t,y:i};l.push(c);c.element.css({top:Math.round(i),left:Math.round(t),"text-align":o})};t.prototype.removeText=function(n,t,r,u,f,e){var h,a,c,v,l,o,s;if(u==null){if(h=this._textCache[n],h!=null)for(a in h)if(i.call(h,a)){c=h[a];for(v in c)if(i.call(c,v))for(l=c[v].positions,o=0;s=l[o];o++)s.active=!1}}else for(l=this.getTextInfo(n,u,f,e).positions,o=0;s=l[o];o++)s.x==t&&s.y==r&&(s.active=!1)};n.plot=function(t,i,u){return new r(n(t),i,u,n.plot.plugins)};n.plot.version="0.8.3";n.plot.plugins=[];n.fn.plot=function(t,i){return this.each(function(){n.plot(this,t,i)})}}(jQuery),function($,n,t){function c(t){var a,o;for(f===!0&&(f=t||1),a=i.length-1;a>=0;a--)if(o=$(i[a]),o[0]==n||o.is(":visible")){var v=o.width(),y=o.height(),s=o.data(e);s&&(v!==s.w||y!==s.h)&&(o.trigger(h,[s.w=v,s.h=y]),f=t||!0)}else s=o.data(e),s.w=0,s.h=0;u!==null&&(f&&(t==null||t-f<1e3)?u=n.requestAnimationFrame(c):(u=setTimeout(c,r[l]),f=!1))}var i=[],r=$.resize=$.extend($.resize,{}),u,f=!1,s="setTimeout",h="resize",e=h+"-special-event",l="pendingDelay",a="activeDelay",o="throttleWindow";r[l]=200;r[a]=20;r[o]=!0;$.event.special[h]={setup:function(){if(!r[o]&&this[s])return!1;var n=$(this);i.push(this);n.data(e,{w:n.width(),h:n.height()});i.length===1&&(u=t,c())},teardown:function(){var t,n;if(!r[o]&&this[s])return!1;for(t=$(this),n=i.length-1;n>=0;n--)if(i[n]==this){i.splice(n,1);break}t.removeData(e);i.length||(f?cancelAnimationFrame(u):clearTimeout(u),u=null)},add:function(n){function u(n,r,u){var f=$(this),o=f.data(e)||{};o.w=r!==t?r:f.width();o.h=u!==t?u:f.height();i.apply(this,arguments)}if(!r[o]&&this[s])return!1;var i;if($.isFunction(n))return i=n,u;i=n.handler;n.handler=u}};n.requestAnimationFrame||(n.requestAnimationFrame=function(){return n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(t){return n.setTimeout(function(){t((new Date).getTime())},r[a])}}());n.cancelAnimationFrame||(n.cancelAnimationFrame=function(){return n.webkitCancelRequestAnimationFrame||n.mozCancelRequestAnimationFrame||n.oCancelRequestAnimationFrame||n.msCancelRequestAnimationFrame||clearTimeout}())}(jQuery,this),function(n){function t(n){function t(){var t=n.getPlaceholder();t.width()!=0&&t.height()!=0&&(n.resize(),n.setupGrid(),n.draw())}function i(n){n.getPlaceholder().resize(t)}function r(n){n.getPlaceholder().unbind("resize",t)}n.hooks.bindEvents.push(i);n.hooks.shutdown.push(r)}n.plot.plugins.push({init:t,options:{},name:"resize",version:"1.0"})}(jQuery),function(n){function r(r){function w(t){l||(l=!0,a=t.getCanvas(),h=n(a).parent(),u=t.getOptions(),t.setData(b(t.getData())))}function b(t){for(var i,f=0,e=0,o=0,s=u.series.pie.combine.color,h=[],r=0;r<t.length;++r)i=t[r].data,n.isArray(i)&&i.length==1&&(i=i[0]),n.isArray(i)?i[1]=!isNaN(parseFloat(i[1]))&&isFinite(i[1])?+i[1]:0:i=!isNaN(parseFloat(i))&&isFinite(i)?[1,+i]:[1,0],t[r].data=[i];for(r=0;r<t.length;++r)f+=t[r].data[0][1];for(r=0;r<t.length;++r)i=t[r].data[0][1],i/f<=u.series.pie.combine.threshold&&(e+=i,o++,s||(s=t[r].color));for(r=0;r<t.length;++r)i=t[r].data[0][1],(o<2||i/f>u.series.pie.combine.threshold)&&h.push(n.extend(t[r],{data:[[1,i]],color:t[r].color,label:t[r].label,angle:i*Math.PI*2/f,percent:i/(f/100)}));return o>1&&h.push({data:[[1,e]],color:s,label:u.series.pie.combine.label,angle:e*Math.PI*2/f,percent:e/(f/100)}),h}function k(r,s){function k(){f.clearRect(0,0,y,p);h.children().filter(".pieLabel, .pieLabelBackground").remove()}function d(){var i=u.series.pie.shadow.left,r=u.series.pie.shadow.top,s=10,h=u.series.pie.shadow.alpha,n=u.series.pie.radius>1?u.series.pie.radius:o*u.series.pie.radius,t;if(!(n>=y/2-i)&&!(n*u.series.pie.tilt>=p/2-r)&&!(n<=s)){for(f.save(),f.translate(i,r),f.globalAlpha=h,f.fillStyle="#000",f.translate(e,c),f.scale(1,u.series.pie.tilt),t=1;t<=s;t++)f.beginPath(),f.arc(0,0,n,0,Math.PI*2,!1),f.fill(),n-=t;f.restore()}}function g(){function l(n,t,r){n<=0||isNaN(n)||(r?f.fillStyle=t:(f.strokeStyle=t,f.lineJoin="round"),f.beginPath(),Math.abs(n-Math.PI*2)>1e-9&&f.moveTo(0,0),f.arc(0,0,s,i,i+n/2,!1),f.arc(0,0,s,i+n/2,i+n,!1),f.closePath(),i+=n,r?f.fill():f.stroke())}function w(){function s(t,i,r){var w,s,b,v,nt;if(t.data[0][1]==0)return!0;w=u.legend.labelFormatter;b=u.series.pie.label.formatter;s=w?w(t.label,t):t.label;b&&(s=b(s,t));var k=(i+t.angle+i)/2,d=e+Math.round(Math.cos(k)*f),g=c+Math.round(Math.sin(k)*f)*u.series.pie.tilt,tt="<span class='pieLabel' id='pieLabel"+r+"' style='position:absolute;top:"+g+"px;left:"+d+"px;'>"+s+"<\/span>";h.append(tt);var o=h.children("#pieLabel"+r),l=g-o.height()/2,a=d-o.width()/2;return(o.css("top",l),o.css("left",a),0-l>0||0-a>0||p-(l+o.height())<0||y-(a+o.width())<0)?!1:(u.series.pie.label.background.opacity!=0&&(v=u.series.pie.label.background.color,v==null&&(v=t.color),nt="top:"+l+"px;left:"+a+"px;",n("<div class='pieLabelBackground' style='position:absolute;width:"+o.width()+"px;height:"+o.height()+"px;"+nt+"background-color:"+v+";'><\/div>").css("opacity",u.series.pie.label.background.opacity).insertBefore(o)),!0)}for(var i=r,f=u.series.pie.label.radius>1?u.series.pie.label.radius:o*u.series.pie.label.radius,t=0;t<a.length;++t){if(a[t].percent>=u.series.pie.label.threshold*100&&!s(a[t],i,t))return!1;i+=a[t].angle}return!0}var r=Math.PI*u.series.pie.startAngle,s=u.series.pie.radius>1?u.series.pie.radius:o*u.series.pie.radius,i,t;for(f.save(),f.translate(e,c),f.scale(1,u.series.pie.tilt),f.save(),i=r,t=0;t<a.length;++t)a[t].startAngle=i,l(a[t].angle,a[t].color,!0);if(f.restore(),u.series.pie.stroke.width>0){for(f.save(),f.lineWidth=u.series.pie.stroke.width,i=r,t=0;t<a.length;++t)l(a[t].angle,u.series.pie.stroke.color,!1);f.restore()}return v(f),f.restore(),u.series.pie.label.show?w():!0}var a,w;if(h){var y=r.getPlaceholder().width(),p=r.getPlaceholder().height(),b=h.children().filter(".legend").children().width()||0;f=s;l=!1;o=Math.min(y,p/u.series.pie.tilt)/2;c=p/2+u.series.pie.offset.top;e=y/2;u.series.pie.offset.left=="auto"?(u.legend.position.match("w")?e+=b/2:e-=b/2,e<o?e=o:e>y-o&&(e=y-o)):e+=u.series.pie.offset.left;a=r.getData();w=0;do w>0&&(o*=i),w+=1,k(),u.series.pie.tilt<=.8&&d();while(!g()&&w<t);w>=t&&(k(),h.prepend("<div class='error'>Could not draw pie with labels contained inside canvas<\/div>"));r.setSeries&&r.insertLegend&&(r.setSeries(a),r.insertLegend())}}function v(n){if(u.series.pie.innerRadius>0){n.save();var t=u.series.pie.innerRadius>1?u.series.pie.innerRadius:o*u.series.pie.innerRadius;n.globalCompositeOperation="destination-out";n.beginPath();n.fillStyle=u.series.pie.stroke.color;n.arc(0,0,t,0,Math.PI*2,!1);n.fill();n.closePath();n.restore();n.save();n.beginPath();n.strokeStyle=u.series.pie.stroke.color;n.arc(0,0,t,0,Math.PI*2,!1);n.stroke();n.closePath();n.restore()}}function d(n,t){for(var u=!1,i=-1,f=n.length,r=f-1;++i<f;r=i)(n[i][1]<=t[1]&&t[1]<n[r][1]||n[r][1]<=t[1]&&t[1]<n[i][1])&&t[0]<(n[r][0]-n[i][0])*(t[1]-n[i][1])/(n[r][1]-n[i][1])+n[i][0]&&(u=!u);return u}function g(n,t){for(var i,l=r.getData(),h=r.getOptions(),u=h.series.pie.radius>1?h.series.pie.radius:o*h.series.pie.radius,a,v,s=0;s<l.length;++s)if(i=l[s],i.pie.show){if(f.save(),f.beginPath(),f.moveTo(0,0),f.arc(0,0,u,i.startAngle,i.startAngle+i.angle/2,!1),f.arc(0,0,u,i.startAngle+i.angle/2,i.startAngle+i.angle,!1),f.closePath(),a=n-e,v=t-c,f.isPointInPath){if(f.isPointInPath(n-e,t-c))return f.restore(),{datapoint:[i.percent,i.data],dataIndex:0,series:i,seriesIndex:s}}else{var y=u*Math.cos(i.startAngle),p=u*Math.sin(i.startAngle),w=u*Math.cos(i.startAngle+i.angle/4),b=u*Math.sin(i.startAngle+i.angle/4),k=u*Math.cos(i.startAngle+i.angle/2),g=u*Math.sin(i.startAngle+i.angle/2),nt=u*Math.cos(i.startAngle+i.angle/1.5),tt=u*Math.sin(i.startAngle+i.angle/1.5),it=u*Math.cos(i.startAngle+i.angle),rt=u*Math.sin(i.startAngle+i.angle),ut=[[0,0],[y,p],[w,b],[k,g],[nt,tt],[it,rt]],ft=[a,v];if(d(ut,ft))return f.restore(),{datapoint:[i.percent,i.data],dataIndex:0,series:i,seriesIndex:s}}f.restore()}return null}function nt(n){y("plothover",n)}function tt(n){y("plotclick",n)}function y(n,t){var o=r.offset(),l=parseInt(t.pageX-o.left),a=parseInt(t.pageY-o.top),i=g(l,a),f,e,c;if(u.grid.autoHighlight)for(f=0;f<s.length;++f)e=s[f],e.auto!=n||i&&e.series==i.series||rt(e.series);i&&it(i.series,n);c={pageX:t.pageX,pageY:t.pageY};h.trigger(n,[c,i])}function it(n,t){var i=p(n);i==-1?(s.push({series:n,auto:t}),r.triggerRedrawOverlay()):t||(s[i].auto=!1)}function rt(n){n==null&&(s=[],r.triggerRedrawOverlay());var t=p(n);t!=-1&&(s.splice(t,1),r.triggerRedrawOverlay())}function p(n){for(var i,t=0;t<s.length;++t)if(i=s[t],i.series==n)return t;return-1}function ut(n,t){function f(n){n.angle<=0||isNaN(n.angle)||(t.fillStyle="rgba(255, 255, 255, "+i.series.pie.highlight.opacity+")",t.beginPath(),Math.abs(n.angle-Math.PI*2)>1e-9&&t.moveTo(0,0),t.arc(0,0,u,n.startAngle,n.startAngle+n.angle/2,!1),t.arc(0,0,u,n.startAngle+n.angle/2,n.startAngle+n.angle,!1),t.closePath(),t.fill())}var i=n.getOptions(),u=i.series.pie.radius>1?i.series.pie.radius:o*i.series.pie.radius,r;for(t.save(),t.translate(e,c),t.scale(1,i.series.pie.tilt),r=0;r<s.length;++r)f(s[r].series);v(t);t.restore()}var a=null,h=null,u=null,o=null,e=null,c=null,l=!1,f=null,s=[];r.hooks.processOptions.push(function(n,t){t.series.pie.show&&(t.grid.show=!1,t.series.pie.label.show=="auto"&&(t.series.pie.label.show=t.legend.show?!1:!0),t.series.pie.radius=="auto"&&(t.series.pie.radius=t.series.pie.label.show?3/4:1),t.series.pie.tilt>1?t.series.pie.tilt=1:t.series.pie.tilt<0&&(t.series.pie.tilt=0))});r.hooks.bindEvents.push(function(n,t){var i=n.getOptions();i.series.pie.show&&(i.grid.hoverable&&t.unbind("mousemove").mousemove(nt),i.grid.clickable&&t.unbind("click").click(tt))});r.hooks.processDatapoints.push(function(n,t,i,r){var u=n.getOptions();u.series.pie.show&&w(n,t,i,r)});r.hooks.drawOverlay.push(function(n,t){var i=n.getOptions();i.series.pie.show&&ut(n,t)});r.hooks.draw.push(function(n,t){var i=n.getOptions();i.series.pie.show&&k(n,t)})}var t=10,i=.95,u={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:3/2,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(n,t){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+t.color+";'>"+n+"<br/>"+Math.round(t.percent)+"%<\/div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};n.plot.plugins.push({init:r,options:u,name:"pie",version:"1.1"})}(jQuery),function(n){function i(n,t,i,r){var o=t.xaxis.options.mode=="categories",s=t.yaxis.options.mode=="categories",u,f,h,e;if(o||s)for(u=r.format,u||(f=t,u=[],u.push({x:!0,number:!0,required:!0}),u.push({y:!0,number:!0,required:!0}),(f.bars.show||f.lines.show&&f.lines.fill)&&(h=!!(f.bars.show&&f.bars.zero||f.lines.show&&f.lines.zero),u.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:h}),f.bars.horizontal&&(delete u[u.length-1].y,u[u.length-1].x=!0)),r.format=u),e=0;e<u.length;++e)u[e].x&&o&&(u[e].number=!1),u[e].y&&s&&(u[e].number=!1)}function r(n){var t=-1;for(var i in n)n[i]>t&&(t=n[i]);return t+1}function u(n){var i=[],r,t;for(r in n.categories)t=n.categories[r],t>=n.min&&t<=n.max&&i.push([t,r]);return i.sort(function(n,t){return n[0]-t[0]}),i}function t(t,i,r){var s,e,o,h;if(t[i].options.mode=="categories"){if(!t[i].categories){if(s={},e=t[i].options.categories||{},n.isArray(e))for(o=0;o<e.length;++o)s[e[o]]=o;else for(h in e)s[h]=e[h];t[i].categories=s}t[i].options.ticks||(t[i].options.ticks=u);f(r,i,t[i].categories)}}function f(n,t,i){for(var u,e,o=n.points,s=n.pointsize,c=n.format,l=t.charAt(0),h=r(i),f=0;f<o.length;f+=s)if(o[f]!=null)for(u=0;u<s;++u)(e=o[f+u],e!=null&&c[u][l])&&(e in i||(i[e]=h,++h),o[f+u]=i[e])}function e(n,i,r){t(i,"xaxis",r);t(i,"yaxis",r)}function o(n){n.hooks.processRawData.push(i);n.hooks.processDatapoints.push(e)}n.plot.plugins.push({init:o,options:{xaxis:{categories:null},yaxis:{categories:null}},name:"categories",version:"1.0"})}(jQuery),function(n){function i(n,t){return t*Math.floor(n/t)}function r(n,t,i,r){var c,o,u;if(typeof n.strftime=="function")return n.strftime(t);var f=function(n,t){return n=""+n,t=""+(t==null?"0":t),n.length==1?t+n:n},s=[],h=!1,e=n.getHours(),l=e<12;for(i==null&&(i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),r==null&&(r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),c=e>12?e-12:e==0?12:e,o=0;o<t.length;++o)if(u=t.charAt(o),h){switch(u){case"a":u=""+r[n.getDay()];break;case"b":u=""+i[n.getMonth()];break;case"d":u=f(n.getDate());break;case"e":u=f(n.getDate()," ");break;case"h":case"H":u=f(e);break;case"I":u=f(c);break;case"l":u=f(c," ");break;case"m":u=f(n.getMonth()+1);break;case"M":u=f(n.getMinutes());break;case"q":u=""+(Math.floor(n.getMonth()/3)+1);break;case"S":u=f(n.getSeconds());break;case"y":u=f(n.getFullYear()%100);break;case"Y":u=""+n.getFullYear();break;case"p":u=l?"am":"pm";break;case"P":u=l?"AM":"PM";break;case"w":u=""+n.getDay()}s.push(u);h=!1}else u=="%"?h=!0:s.push(u);return s.join("")}function f(n){function u(n,t,i,r){n[t]=function(){return i[r].apply(i,arguments)}}var i={date:n},r,t;for(n.strftime!=undefined&&u(i,"strftime",n,"strftime"),u(i,"getTime",n,"getTime"),u(i,"setTime",n,"setTime"),r=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"],t=0;t<r.length;t++)u(i,"get"+r[t],n,"getUTC"+r[t]),u(i,"set"+r[t],n,"setUTC"+r[t]);return i}function u(n,t){if(t.timezone=="browser")return new Date(n);if(t.timezone&&t.timezone!="utc"){if(typeof timezoneJS!="undefined"&&typeof timezoneJS.Date!="undefined"){var i=new timezoneJS.Date;return i.setTimezone(t.timezone),i.setTime(n),i}return f(new Date(n))}return f(new Date(n))}function h(f){f.hooks.processOptions.push(function(f){n.each(f.getAxes(),function(n,f){var e=f.options;e.mode=="time"&&(f.tickGenerator=function(n){var k=[],r=u(n.min,e),d=0,l=e.tickSize&&e.tickSize[1]==="quarter"||e.minTickSize&&e.minTickSize[1]==="quarter"?s:o,c,y,f,w,p,h,a,b,v,g,nt,tt;for(e.minTickSize!=null&&(d=typeof e.tickSize=="number"?e.tickSize:e.minTickSize[0]*t[e.minTickSize[1]]),c=0;c<l.length-1;++c)if(n.delta<(l[c][0]*t[l[c][1]]+l[c+1][0]*t[l[c+1][1]])/2&&l[c][0]*t[l[c][1]]>=d)break;y=l[c][0];f=l[c][1];f=="year"&&(e.minTickSize!=null&&e.minTickSize[1]=="year"?y=Math.floor(e.minTickSize[0]):(w=Math.pow(10,Math.floor(Math.log(n.delta/t.year)/Math.LN10)),p=n.delta/t.year/w,y=(p<1.5?1:p<3?2:p<7.5?5:10)*w),y<1&&(y=1));n.tickSize=e.tickSize||[y,f];h=n.tickSize[0];f=n.tickSize[1];a=h*t[f];f=="second"?r.setSeconds(i(r.getSeconds(),h)):f=="minute"?r.setMinutes(i(r.getMinutes(),h)):f=="hour"?r.setHours(i(r.getHours(),h)):f=="month"?r.setMonth(i(r.getMonth(),h)):f=="quarter"?r.setMonth(3*i(r.getMonth()/3,h)):f=="year"&&r.setFullYear(i(r.getFullYear(),h));r.setMilliseconds(0);a>=t.minute&&r.setSeconds(0);a>=t.hour&&r.setMinutes(0);a>=t.day&&r.setHours(0);a>=t.day*4&&r.setDate(1);a>=t.month*2&&r.setMonth(i(r.getMonth(),3));a>=t.quarter*2&&r.setMonth(i(r.getMonth(),6));a>=t.year&&r.setMonth(0);b=0;v=Number.NaN;do g=v,v=r.getTime(),k.push(v),f=="month"||f=="quarter"?h<1?(r.setDate(1),nt=r.getTime(),r.setMonth(r.getMonth()+(f=="quarter"?3:1)),tt=r.getTime(),r.setTime(v+b*t.hour+(tt-nt)*h),b=r.getHours(),r.setHours(0)):r.setMonth(r.getMonth()+h*(f=="quarter"?3:1)):f=="year"?r.setFullYear(r.getFullYear()+h):r.setTime(v+a);while(v<n.max&&v!=g);return k},f.tickFormatter=function(n,i){var l=u(n,i.options);if(e.timeformat!=null)return r(l,e.timeformat,e.monthNames,e.dayNames);var o=i.options.tickSize&&i.options.tickSize[1]=="quarter"||i.options.minTickSize&&i.options.minTickSize[1]=="quarter",f=i.tickSize[0]*t[i.tickSize[1]],s=i.max-i.min,h=e.twelveHourClock?" %p":"",c=e.twelveHourClock?"%I":"%H",a;return a=f<t.minute?c+":%M:%S"+h:f<t.day?s<2*t.day?c+":%M"+h:"%b %d "+c+":%M"+h:f<t.month?"%b %d":o&&f<t.quarter||!o&&f<t.year?s<t.year?"%b":"%b %Y":o&&f<t.year?s<t.year?"Q%q":"Q%q %Y":"%Y",r(l,a,e.monthNames,e.dayNames)})})})}var t={second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:365.2425*864e5},e=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],o=e.concat([[3,"month"],[6,"month"],[1,"year"]]),s=e.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);n.plot.plugins.push({init:h,options:{xaxis:{timezone:null,timeformat:null,twelveHourClock:!1,monthNames:null}},name:"time",version:"1.0"});n.plot.formatDate=r;n.plot.dateGenerator=u}(jQuery),function(n,t,i){(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):jQuery&&!jQuery.fn.sparkline&&n(jQuery)})(function(r){"use strict";var c={},tt,u,e,s,l,o,v,it,rt,y,pt,ut,ft,et,h,ot,st,a,p,ht,ct,lt,w,b,k,at,vt,yt,d,g,nt,f,wt=0;tt=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:i,normalRangeMax:i,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:i,chartRangeMax:i,chartRangeMinX:i,chartRangeMaxX:i,tooltipFormat:new e('<span style="color: {{color}}">&#9679;<\/span> {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:i,nullColor:i,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:i,chartRangeMin:i,chartRangeClip:!1,colorMap:i,tooltipFormat:new e('<span style="color: {{color}}">&#9679;<\/span> {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new e('<span style="color: {{color}}">&#9679;<\/span> {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss","0":"Draw","1":"Win"}}},discrete:{lineHeight:"auto",thresholdColor:i,thresholdValue:0,chartRangeMax:i,chartRangeMin:i,chartRangeClip:!1,tooltipFormat:new e("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:i,tooltipFormat:new e("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new e('<span style="color: {{color}}">&#9679;<\/span> {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:i,targetColor:"#4a2",chartRangeMax:i,chartRangeMin:i,tooltipFormat:new e("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}};at='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;box-sizing: content-box;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}';u=function(){var n,t;return n=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(n.prototype=r.extend(new arguments[0],arguments[arguments.length-1]),n._super=arguments[0].prototype):n.prototype=arguments[arguments.length-1],arguments.length>2&&(t=Array.prototype.slice.call(arguments,1,-1),t.unshift(n.prototype),r.extend.apply(r,t))):n.prototype=arguments[0],n.prototype.cls=n,n};r.SPFormatClass=e=u({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(n,t){this.format=n;this.fclass=t},render:function(n,t,r){var h=this,c=n,e,o,f,u,s;return this.format.replace(this.fre,function(){var n;return(o=arguments[1],f=arguments[3],e=h.precre.exec(o),e?(s=e[2],o=e[1]):s=!1,u=c[o],u===i)?"":f&&t&&t[f]?(n=t[f],n.get?t[f].get(u)||u:t[f][u]||u):(rt(u)&&(u=r.get("numberFormatter")?r.get("numberFormatter")(u):et(u,s,r.get("numberDigitGroupCount"),r.get("numberDigitGroupSep"),r.get("numberDecimalMark"))),u)})}});r.spformat=function(n,t){return new e(n,t)};s=function(n,t,i){return n<t?t:n>i?i:n};l=function(n,i){var r;return i===2?(r=t.floor(n.length/2),n.length%2?n[r]:(n[r-1]+n[r])/2):n.length%2?(r=(n.length*i+i)/4,r%1?(n[t.floor(r)]+n[t.floor(r)-1])/2:n[r-1]):(r=(n.length*i+2)/4,r%1?(n[t.floor(r)]+n[t.floor(r)-1])/2:n[r-1])};o=function(n){var t;switch(n){case"undefined":n=i;break;case"null":n=null;break;case"true":n=!0;break;case"false":n=!1;break;default:t=parseFloat(n);n==t&&(n=t)}return n};v=function(n){for(var i=[],t=n.length;t--;)i[t]=o(n[t]);return i};it=function(n,t){for(var u=[],i=0,r=n.length;i<r;i++)n[i]!==t&&u.push(n[i]);return u};rt=function(n){return!isNaN(parseFloat(n))&&isFinite(n)};et=function(n,t,i,u,f){var e,o;for(n=(t===!1?parseFloat(n).toString():n.toFixed(t)).split(""),e=(e=r.inArray(".",n))<0?n.length:e,e<n.length&&(n[e]=f),o=e-i;o>0;o-=i)n.splice(o,0,u);return n.join("")};y=function(n,t,i){for(var r=t.length;r--;)if((!i||t[r]!==null)&&t[r]!==n)return!1;return!0};pt=function(n){for(var i=0,t=n.length;t--;)i+=typeof n[t]=="number"?n[t]:0;return i};ft=function(n){return r.isArray(n)?n:[n]};ut=function(t){var i,r;if(n.createStyleSheet)try{n.createStyleSheet().cssText=t;return}catch(u){r=!0}i=n.createElement("style");i.type="text/css";n.getElementsByTagName("head")[0].appendChild(i);r?n.styleSheets[n.styleSheets.length-1].cssText=t:i[typeof n.body.style.WebkitAppearance=="string"?"innerText":"innerHTML"]=t};r.fn.simpledraw=function(t,u,f,e){var o,s,h;if(f&&(o=this.data("_jqs_vcanvas")))return o;if(r.fn.sparkline.canvas===!1)return!1;if(r.fn.sparkline.canvas===i)if(h=n.createElement("canvas"),!(h.getContext&&h.getContext("2d")))if(n.namespaces&&!n.namespaces.v)n.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),r.fn.sparkline.canvas=function(n,t,i){return new nt(n,t,i)};else return r.fn.sparkline.canvas=!1,!1;else r.fn.sparkline.canvas=function(n,t,i,r){return new g(n,t,i,r)};return t===i&&(t=r(this).innerWidth()),u===i&&(u=r(this).innerHeight()),o=r.fn.sparkline.canvas(t,u,this,e),s=r(this).data("_jqs_mhandler"),s&&s.registerCanvas(o),o};r.fn.cleardraw=function(){var n=this.data("_jqs_vcanvas");n&&n.reset()};r.RangeMapClass=h=u({init:function(n){var i,t,r=[];for(i in n)n.hasOwnProperty(i)&&typeof i=="string"&&i.indexOf(":")>-1&&(t=i.split(":"),t[0]=t[0].length===0?-Infinity:parseFloat(t[0]),t[1]=t[1].length===0?Infinity:parseFloat(t[1]),t[2]=n[i],r.push(t));this.map=n;this.rangelist=r||!1},get:function(n){var r=this.rangelist,u,t,f;if((f=this.map[n])!==i)return f;if(r)for(u=r.length;u--;)if(t=r[u],t[0]<=n&&t[1]>=n)return t[2];return i}});r.range_map=function(n){return new h(n)};ot=u({init:function(n,t){var i=r(n);this.$el=i;this.options=t;this.currentPageX=0;this.currentPageY=0;this.el=n;this.splist=[];this.tooltip=null;this.over=!1;this.displayTooltips=!t.get("disableTooltips");this.highlightEnabled=!t.get("disableHighlight")},registerSparkline:function(n){this.splist.push(n);this.over&&this.updateDisplay()},registerCanvas:function(n){var t=r(n.canvas);this.canvas=n;this.$canvas=t;t.mouseenter(r.proxy(this.mouseenter,this));t.mouseleave(r.proxy(this.mouseleave,this));t.click(r.proxy(this.mouseclick,this))},reset:function(n){this.splist=[];this.tooltip&&n&&(this.tooltip.remove(),this.tooltip=i)},mouseclick:function(n){var t=r.Event("sparklineClick");t.originalEvent=n;t.sparklines=this.splist;this.$el.trigger(t)},mouseenter:function(t){r(n.body).unbind("mousemove.jqs");r(n.body).bind("mousemove.jqs",r.proxy(this.mousemove,this));this.over=!0;this.currentPageX=t.pageX;this.currentPageY=t.pageY;this.currentEl=t.target;!this.tooltip&&this.displayTooltips&&(this.tooltip=new st(this.options),this.tooltip.updatePosition(t.pageX,t.pageY));this.updateDisplay()},mouseleave:function(){r(n.body).unbind("mousemove.jqs");var i=this.splist,e=i.length,u=!1,f,t;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),t=0;t<e;t++)f=i[t],f.clearRegionHighlight()&&(u=!0);u&&this.canvas.render()},mousemove:function(n){this.currentPageX=n.pageX;this.currentPageY=n.pageY;this.currentEl=n.target;this.tooltip&&this.tooltip.updatePosition(n.pageX,n.pageY);this.updateDisplay()},updateDisplay:function(){var i=this.splist,o=i.length,s=!1,h=this.$canvas.offset(),c=this.currentPageX-h.left,l=this.currentPageY-h.top,u,t,n,f,e;if(this.over){for(n=0;n<o;n++)t=i[n],f=t.setRegionHighlight(this.currentEl,c,l),f&&(s=!0);if(s){if(e=r.Event("sparklineRegionChange"),e.sparklines=this.splist,this.$el.trigger(e),this.tooltip){for(u="",n=0;n<o;n++)t=i[n],u+=t.getCurrentRegionTooltip();this.tooltip.setContent(u)}this.disableHighlight||this.canvas.render()}f===null&&this.mouseleave()}}});st=u({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(t){var u=t.get("tooltipClassname","jqstooltip"),f=this.sizeStyle,i;this.container=t.get("tooltipContainer")||n.body;this.tooltipOffsetX=t.get("tooltipOffsetX",10);this.tooltipOffsetY=t.get("tooltipOffsetY",12);r("#jqssizetip").remove();r("#jqstooltip").remove();this.sizetip=r("<div/>",{id:"jqssizetip",style:f,"class":u});this.tooltip=r("<div/>",{id:"jqstooltip","class":u}).appendTo(this.container);i=this.tooltip.offset();this.offsetLeft=i.left;this.offsetTop=i.top;this.hidden=!0;r(window).unbind("resize.jqs scroll.jqs");r(window).bind("resize.jqs scroll.jqs",r.proxy(this.updateWindowDims,this));this.updateWindowDims()},updateWindowDims:function(){this.scrollTop=r(window).scrollTop();this.scrollLeft=r(window).scrollLeft();this.scrollRight=this.scrollLeft+r(window).width();this.updatePosition()},getSize:function(n){this.sizetip.html(n).appendTo(this.container);this.width=this.sizetip.width()+1;this.height=this.sizetip.height();this.sizetip.remove()},setContent:function(n){if(!n){this.tooltip.css("visibility","hidden");this.hidden=!0;return}this.getSize(n);this.tooltip.html(n).css({width:this.width,height:this.height,visibility:"visible"});this.hidden&&(this.hidden=!1,this.updatePosition())},updatePosition:function(n,t){if(n===i){if(this.mousex===i)return;n=this.mousex-this.offsetLeft;t=this.mousey-this.offsetTop}else this.mousex=n=n-this.offsetLeft,this.mousey=t=t-this.offsetTop;this.height&&this.width&&!this.hidden&&(t-=this.height+this.tooltipOffsetY,n+=this.tooltipOffsetX,t<this.scrollTop&&(t=this.scrollTop),n<this.scrollLeft?n=this.scrollLeft:n+this.width>this.scrollRight&&(n=this.scrollRight-this.width),this.tooltip.css({left:n,top:t}))},remove:function(){this.tooltip.remove();this.sizetip.remove();this.sizetip=this.tooltip=i;r(window).unbind("resize.jqs scroll.jqs")}});vt=function(){ut(at)};r(vt);f=[];r.fn.sparkline=function(t,u){return this.each(function(){var e=new r.fn.sparkline.options(this,u),h=r(this),s,o;if(s=function(){var s,a,c,f,u,l,o;if(t==="html"||t===i?(o=this.getAttribute(e.get("tagValuesAttribute")),(o===i||o===null)&&(o=h.html()),s=o.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")):s=t,a=e.get("width")==="auto"?s.length*e.get("defaultPixelsPerValue"):e.get("width"),e.get("height")==="auto"?e.get("composite")&&r.data(this,"_jqs_vcanvas")||(f=n.createElement("span"),f.innerHTML="a",h.html(f),c=r(f).innerHeight()||r(f).height(),r(f).remove(),f=null):c=e.get("height"),e.get("disableInteraction")?u=!1:(u=r.data(this,"_jqs_mhandler"),u?e.get("composite")||u.reset():(u=new ot(this,e),r.data(this,"_jqs_mhandler",u))),e.get("composite")&&!r.data(this,"_jqs_vcanvas")){r.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),r.data(this,"_jqs_errnotify",!0));return}l=new r.fn.sparkline[e.get("type")](this,s,e,a,c);l.render();u&&u.registerSparkline(l)},r(this).html()&&!e.get("disableHiddenCheck")&&r(this).is(":hidden")||!r(this).parents("body").length){if(!e.get("composite")&&r.data(this,"_jqs_pending"))for(o=f.length;o;o--)f[o-1][0]==this&&f.splice(o-1,1);f.push([this,s]);r.data(this,"_jqs_pending",!0)}else s.call(this)})};r.fn.sparkline.defaults=tt();r.sparkline_display_visible=function(){for(var t,i=[],n=0,u=f.length;n<u;n++)t=f[n][0],r(t).is(":visible")&&!r(t).parents().is(":hidden")?(f[n][1].call(t),r.data(f[n][0],"_jqs_pending",!1),i.push(n)):r(t).closest("html").length||r.data(t,"_jqs_pending")||(r.data(f[n][0],"_jqs_pending",!1),i.push(n));for(n=i.length;n;n--)f.splice(i[n-1],1)};r.fn.sparkline.options=u({init:function(n,t){var e,i,u,f;this.userOptions=t=t||{};this.tag=n;this.tagValCache={};i=r.fn.sparkline.defaults;u=i.common;this.tagOptionsPrefix=t.enableTagOptions&&(t.tagOptionsPrefix||u.tagOptionsPrefix);f=this.getTagSetting("type");e=f===c?i[t.type||u.type]:i[f];this.mergedOptions=r.extend({},u,e,t)},getTagSetting:function(n){var u=this.tagOptionsPrefix,t,r,f,e;if(u===!1||u===i)return c;if(this.tagValCache.hasOwnProperty(n))t=this.tagValCache.key;else{if(t=this.tag.getAttribute(u+n),t===i||t===null)t=c;else if(t.substr(0,1)==="[")for(t=t.substr(1,t.length-2).split(","),r=t.length;r--;)t[r]=o(t[r].replace(/(^\s*)|(\s*$)/g,""));else if(t.substr(0,1)==="{")for(f=t.substr(1,t.length-2).split(","),t={},r=f.length;r--;)e=f[r].split(":",2),t[e[0].replace(/(^\s*)|(\s*$)/g,"")]=o(e[1].replace(/(^\s*)|(\s*$)/g,""));else t=o(t);this.tagValCache.key=t}return t},get:function(n,t){var r=this.getTagSetting(n),u;return r!==c?r:(u=this.mergedOptions[n])===i?t:u}});r.fn.sparkline._base=u({disabled:!1,init:function(n,t,u,f,e){this.el=n;this.$el=r(n);this.values=t;this.options=u;this.width=f;this.height=e;this.currentRegion=i},initTarget:function(){var n=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),n))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return this.disabled?(this.el.innerHTML="",!1):!0},getRegion:function(){},setRegionHighlight:function(n,t,r){var f=this.currentRegion,e=!this.options.get("disableHighlight"),u;return t>this.canvasWidth||r>this.canvasHeight||t<0||r<0?null:(u=this.getRegion(n,t,r),f!==u)?(f!==i&&e&&this.removeHighlight(),this.currentRegion=u,u!==i&&e&&this.renderHighlight(),!0):!1},clearRegionHighlight:function(){return this.currentRegion!==i?(this.removeHighlight(),this.currentRegion=i,!0):!1},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(){},getCurrentRegionTooltip:function(){var t=this.options,y="",h=[],n,o,p,w,b,u,c,l,a,k,v,s,d,f;if(this.currentRegion===i)return"";if(n=this.getCurrentRegionFields(),v=t.get("tooltipFormatter"),v)return v(this,t,n);if(t.get("tooltipChartTitle")&&(y+='<div class="jqs jqstitle">'+t.get("tooltipChartTitle")+"<\/div>\n"),o=this.options.get("tooltipFormat"),!o)return"";if(r.isArray(o)||(o=[o]),r.isArray(n)||(n=[n]),c=this.options.get("tooltipFormatFieldlist"),l=this.options.get("tooltipFormatFieldlistKey"),c&&l){for(a=[],u=n.length;u--;)k=n[u][l],(f=r.inArray(k,c))!=-1&&(a[f]=n[u]);n=a}for(p=o.length,d=n.length,u=0;u<p;u++)for(s=o[u],typeof s=="string"&&(s=new e(s)),w=s.fclass||"jqsfield",f=0;f<d;f++)n[f].isNull&&t.get("tooltipSkipNull")||(r.extend(n[f],{prefix:t.get("tooltipPrefix"),suffix:t.get("tooltipSuffix")}),b=s.render(n[f],t.get("tooltipValueLookups"),t),h.push('<div class="'+w+'">'+b+"<\/div>"));return h.length?y+h.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(n,i){var e=i.get("highlightColor"),o=i.get("highlightLighten"),u,h,f,r;if(e)return e;if(o&&(u=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(n)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(n),u)){for(f=[],h=n.length===4?16:1,r=0;r<3;r++)f[r]=s(t.round(parseInt(u[r+1],16)*h*o),0,255);return"rgb("+f.join(",")+")"}return n}});a={changeHighlight:function(n){var i=this.currentRegion,f=this.target,u=this.regionShapes[i],t;u&&(t=this.renderRegion(i,n),r.isArray(t)||r.isArray(u)?(f.replaceWithShapes(u,t),this.regionShapes[i]=r.map(t,function(n){return n.id})):(f.replaceWithShape(u,t),this.regionShapes[i]=t.id))},render:function(){var e=this.values,o=this.target,u=this.regionShapes,n,f,t,i;if(this.cls._super.render.call(this)){for(t=e.length;t--;)if(n=this.renderRegion(t),n)if(r.isArray(n)){for(f=[],i=n.length;i--;)n[i].append(),f.push(n[i].id);u[t]=f}else n.append(),u[t]=n.id;else u[t]=null;o.render()}}};r.fn.sparkline.line=p=u(r.fn.sparkline._base,{type:"line",init:function(n,t,i,r,u){p._super.init.call(this,n,t,i,r,u);this.vertices=[];this.regionMap=[];this.xvalues=[];this.yvalues=[];this.yminmax=[];this.hightlightSpotId=null;this.lastShapeId=null;this.initTarget()},getRegion:function(n,t){for(var u=this.regionMap,r=u.length;r--;)if(u[r]!==null&&t>=u[r][0]&&t<=u[r][1])return u[r][2];return i},getCurrentRegionFields:function(){var n=this.currentRegion;return{isNull:this.yvalues[n]===null,x:this.xvalues[n],y:this.yvalues[n],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:n}},renderHighlight:function(){var h=this.currentRegion,t=this.target,n=this.vertices[h],r=this.options,e=r.get("spotRadius"),o=r.get("highlightSpotColor"),s=r.get("highlightLineColor"),u,f;n&&(e&&o&&(u=t.drawCircle(n[0],n[1],e,i,o),this.highlightSpotId=u.id,t.insertAfterShape(this.lastShapeId,u)),s&&(f=t.drawLine(n[0],this.canvasTop,n[0],this.canvasTop+this.canvasHeight,s),this.highlightLineId=f.id,t.insertAfterShape(this.lastShapeId,f)))},removeHighlight:function(){var n=this.target;this.highlightSpotId&&(n.removeShapeId(this.highlightSpotId),this.highlightSpotId=null);this.highlightLineId&&(n.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){for(var i=this.values,c=i.length,r=this.xvalues,e=this.yvalues,u=this.yminmax,f,s,h,o,n=0;n<c;n++)f=i[n],s=typeof i[n]=="string",h=typeof i[n]=="object"&&i[n]instanceof Array,o=s&&i[n].split(":"),s&&o.length===2?(r.push(Number(o[0])),e.push(Number(o[1])),u.push(Number(o[1]))):h?(r.push(f[0]),e.push(f[1]),u.push(f[1])):(r.push(n),i[n]===null||i[n]==="null"?e.push(null):(e.push(Number(f)),u.push(Number(f))));this.options.get("xvalues")&&(r=this.options.get("xvalues"));this.maxy=this.maxyorg=t.max.apply(t,u);this.miny=this.minyorg=t.min.apply(t,u);this.maxx=t.max.apply(t,r);this.minx=t.min.apply(t,r);this.xvalues=r;this.yvalues=e;this.yminmax=u},processRangeOptions:function(){var n=this.options,t=n.get("normalRangeMin"),r=n.get("normalRangeMax");t!==i&&(t<this.miny&&(this.miny=t),r>this.maxy&&(this.maxy=r));n.get("chartRangeMin")!==i&&(n.get("chartRangeClip")||n.get("chartRangeMin")<this.miny)&&(this.miny=n.get("chartRangeMin"));n.get("chartRangeMax")!==i&&(n.get("chartRangeClip")||n.get("chartRangeMax")>this.maxy)&&(this.maxy=n.get("chartRangeMax"));n.get("chartRangeMinX")!==i&&(n.get("chartRangeClipX")||n.get("chartRangeMinX")<this.minx)&&(this.minx=n.get("chartRangeMinX"));n.get("chartRangeMaxX")!==i&&(n.get("chartRangeClipX")||n.get("chartRangeMaxX")>this.maxx)&&(this.maxx=n.get("chartRangeMaxX"))},drawNormalRange:function(n,r,u,f,e){var s=this.options.get("normalRangeMin"),o=this.options.get("normalRangeMax"),h=r+t.round(u-u*((o-this.miny)/e)),c=t.round(u*(o-s)/e);this.target.drawRect(n,h,f,c,i,this.options.get("normalRangeColor")).append()},render:function(){var n=this.options,v=this.target,c=this.canvasWidth,o=this.canvasHeight,at=this.vertices,f=n.get("spotRadius"),pt=this.regionMap,b,y,k,l,a,ht,e,ut,g,d,vt,tt,yt,ct,ft,et,ot,st,nt,it,rt,lt,w,s,u;if(p._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),w=this.xvalues,s=this.yvalues,this.yminmax.length&&!(this.yvalues.length<2))){for(l=a=0,b=this.maxx-this.minx==0?1:this.maxx-this.minx,y=this.maxy-this.miny==0?1:this.maxy-this.miny,k=this.yvalues.length-1,f&&(c<f*4||o<f*4)&&(f=0),f&&(rt=n.get("highlightSpotColor")&&!n.get("disableInteraction"),(rt||n.get("minSpotColor")||n.get("spotColor")&&s[k]===this.miny)&&(o-=t.ceil(f)),(rt||n.get("maxSpotColor")||n.get("spotColor")&&s[k]===this.maxy)&&(o-=t.ceil(f),l+=t.ceil(f)),(rt||(n.get("minSpotColor")||n.get("maxSpotColor"))&&(s[0]===this.miny||s[0]===this.maxy))&&(a+=t.ceil(f),c-=t.ceil(f)),(rt||n.get("spotColor")||n.get("minSpotColor")||n.get("maxSpotColor")&&(s[k]===this.miny||s[k]===this.maxy))&&(c-=t.ceil(f))),o--,n.get("normalRangeMin")===i||n.get("drawNormalOnTop")||this.drawNormalRange(a,l,o,c,y),e=[],ut=[e],ct=ft=null,et=s.length,u=0;u<et;u++)g=w[u],vt=w[u+1],d=s[u],tt=a+t.round((g-this.minx)*(c/b)),yt=u<et-1?a+t.round((vt-this.minx)*(c/b)):c,ft=tt+(yt-tt)/2,pt[u]=[ct||0,ft,u],ct=ft,d===null?u&&(s[u-1]!==null&&(e=[],ut.push(e)),at.push(null)):(d<this.miny&&(d=this.miny),d>this.maxy&&(d=this.maxy),e.length||e.push([tt,l+o]),ht=[tt,l+t.round(o-o*((d-this.miny)/y))],e.push(ht),at.push(ht));for(ot=[],st=[],nt=ut.length,u=0;u<nt;u++)e=ut[u],e.length&&(n.get("fillColor")&&(e.push([e[e.length-1][0],l+o]),st.push(e.slice(0)),e.pop()),e.length>2&&(e[0]=[e[0][0],e[1][1]]),ot.push(e));for(nt=st.length,u=0;u<nt;u++)v.drawShape(st[u],n.get("fillColor"),n.get("fillColor")).append();for(n.get("normalRangeMin")!==i&&n.get("drawNormalOnTop")&&this.drawNormalRange(a,l,o,c,y),nt=ot.length,u=0;u<nt;u++)v.drawShape(ot[u],n.get("lineColor"),i,n.get("lineWidth")).append();if(f&&n.get("valueSpots"))for(it=n.get("valueSpots"),it.get===i&&(it=new h(it)),u=0;u<et;u++)lt=it.get(s[u]),lt&&v.drawCircle(a+t.round((w[u]-this.minx)*(c/b)),l+t.round(o-o*((s[u]-this.miny)/y)),f,i,lt).append();f&&n.get("spotColor")&&s[k]!==null&&v.drawCircle(a+t.round((w[w.length-1]-this.minx)*(c/b)),l+t.round(o-o*((s[k]-this.miny)/y)),f,i,n.get("spotColor")).append();this.maxy!==this.minyorg&&(f&&n.get("minSpotColor")&&(g=w[r.inArray(this.minyorg,s)],v.drawCircle(a+t.round((g-this.minx)*(c/b)),l+t.round(o-o*((this.minyorg-this.miny)/y)),f,i,n.get("minSpotColor")).append()),f&&n.get("maxSpotColor")&&(g=w[r.inArray(this.maxyorg,s)],v.drawCircle(a+t.round((g-this.minx)*(c/b)),l+t.round(o-o*((this.maxyorg-this.miny)/y)),f,i,n.get("maxSpotColor")).append()));this.lastShapeId=v.getLastShapeId();this.canvasTop=l;v.render()}}});r.fn.sparkline.bar=ht=u(r.fn.sparkline._base,a,{type:"bar",init:function(n,u,f,e,c){var ct=parseInt(f.get("barWidth"),10),lt=parseInt(f.get("barSpacing"),10),dt=f.get("chartRangeMin"),gt=f.get("chartRangeMax"),at=f.get("chartRangeClip"),nt=Infinity,d=-Infinity,vt,yt,pt,tt,b,a,rt,wt,ut,ft,y,p,bt,kt,w,et,g,ni,ti,l,k,ii,ot,st;for(ht._super.init.call(this,n,u,f,e,c),a=0,rt=u.length;a<rt;a++)l=u[a],vt=typeof l=="string"&&l.indexOf(":")>-1,(vt||r.isArray(l))&&(w=!0,vt&&(l=u[a]=v(l.split(":"))),l=it(l,null),yt=t.min.apply(t,l),pt=t.max.apply(t,l),yt<nt&&(nt=yt),pt>d&&(d=pt));for(this.stacked=w,this.regionShapes={},this.barWidth=ct,this.barSpacing=lt,this.totalBarWidth=ct+lt,this.width=e=u.length*ct+(u.length-1)*lt,this.initTarget(),at&&(bt=dt===i?-Infinity:dt,kt=gt===i?Infinity:gt),b=[],tt=w?[]:b,ot=[],st=[],a=0,rt=u.length;a<rt;a++)if(w)for(et=u[a],u[a]=ti=[],ot[a]=0,tt[a]=st[a]=0,g=0,ni=et.length;g<ni;g++)l=ti[g]=at?s(et[g],bt,kt):et[g],l!==null&&(l>0&&(ot[a]+=l),nt<0&&d>0?l<0?st[a]+=t.abs(l):tt[a]+=l:tt[a]+=t.abs(l-(l<0?d:nt)),b.push(l));else l=at?s(u[a],bt,kt):u[a],l=u[a]=o(l),l!==null&&b.push(l);this.max=p=t.max.apply(t,b);this.min=y=t.min.apply(t,b);this.stackMax=d=w?t.max.apply(t,ot):p;this.stackMin=nt=w?t.min.apply(t,b):y;f.get("chartRangeMin")!==i&&(f.get("chartRangeClip")||f.get("chartRangeMin")<y)&&(y=f.get("chartRangeMin"));f.get("chartRangeMax")!==i&&(f.get("chartRangeClip")||f.get("chartRangeMax")>p)&&(p=f.get("chartRangeMax"));this.zeroAxis=ut=f.get("zeroAxis",!0);ft=y<=0&&p>=0&&ut?0:ut==!1?y:y>0?y:p;this.xaxisOffset=ft;wt=w?t.max.apply(t,tt)+t.max.apply(t,st):p-y;this.canvasHeightEf=ut&&y<0?this.canvasHeight-2:this.canvasHeight-1;y<ft?(ii=w&&p>=0?d:p,k=(ii-ft)/wt*this.canvasHeight,k!==t.ceil(k)&&(this.canvasHeightEf-=2,k=t.ceil(k))):k=this.canvasHeight;this.yoffset=k;r.isArray(f.get("colorMap"))?(this.colorMapByIndex=f.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=f.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===i&&(this.colorMapByValue=new h(this.colorMapByValue)));this.range=wt},getRegion:function(n,r){var u=t.floor(r/this.totalBarWidth);return u<0||u>=this.values.length?i:u},getCurrentRegionFields:function(){for(var i=this.currentRegion,r=ft(this.values[i]),u=[],n,t=r.length;t--;)n=r[t],u.push({isNull:n===null,value:n,color:this.calcColor(t,n,i),offset:i});return u},calcColor:function(n,t,u){var o=this.colorMapByIndex,s=this.colorMapByValue,e=this.options,f,h;return f=this.stacked?e.get("stackedBarColor"):t<0?e.get("negBarColor"):e.get("barColor"),t===0&&e.get("zeroColor")!==i&&(f=e.get("zeroColor")),s&&(h=s.get(t))?f=h:o&&o.length>u&&(f=o[u]),r.isArray(f)?f[n%f.length]:f},renderRegion:function(n,u){var f=this.values[n],h=this.options,c=this.xaxisOffset,p=[],b=this.range,rt=this.stacked,k=this.target,d=n*this.totalBarWidth,ut=this.canvasHeightEf,o=this.yoffset,l,a,e,g,w,v,nt,s,tt,it;if(f=r.isArray(f)?f:[f],nt=f.length,s=f[0],g=y(null,f),it=y(c,f,!0),g)return h.get("nullColor")?(e=u?h.get("nullColor"):this.calcHighlightColor(h.get("nullColor"),h),l=o>0?o-1:o,k.drawRect(d,l,this.barWidth-1,0,e,e)):i;for(w=o,v=0;v<nt;v++){if(s=f[v],rt&&s===c){if(!it||tt)continue;tt=!0}a=b>0?t.floor(ut*(t.abs(s-c)/b))+1:1;s<c||s===c&&o===0?(l=w,w+=a):(l=o-a,o-=a);e=this.calcColor(v,s,n);u&&(e=this.calcHighlightColor(e,h));p.push(k.drawRect(d,l,this.barWidth-1,a-1,e,e))}return p.length===1?p[0]:p}});r.fn.sparkline.tristate=ct=u(r.fn.sparkline._base,a,{type:"tristate",init:function(n,t,u,f,e){var o=parseInt(u.get("barWidth"),10),s=parseInt(u.get("barSpacing"),10);ct._super.init.call(this,n,t,u,f,e);this.regionShapes={};this.barWidth=o;this.barSpacing=s;this.totalBarWidth=o+s;this.values=r.map(t,Number);this.width=f=t.length*o+(t.length-1)*s;r.isArray(u.get("colorMap"))?(this.colorMapByIndex=u.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=u.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===i&&(this.colorMapByValue=new h(this.colorMapByValue)));this.initTarget()},getRegion:function(n,i){return t.floor(i/this.totalBarWidth)},getCurrentRegionFields:function(){var n=this.currentRegion;return{isNull:this.values[n]===i,value:this.values[n],color:this.calcColor(this.values[n],n),offset:n}},calcColor:function(n,t){var u=this.values,i=this.options,r=this.colorMapByIndex,f=this.colorMapByValue,e;return f&&(e=f.get(n))?e:r&&r.length>t?r[t]:u[t]<0?i.get("negBarColor"):u[t]>0?i.get("posBarColor"):i.get("zeroBarColor")},renderRegion:function(n,i){var o=this.values,l=this.options,s=this.target,h,f,u,c,e,r;if(h=s.pixelHeight,u=t.round(h/2),c=n*this.totalBarWidth,o[n]<0?(e=u,f=u-1):o[n]>0?(e=0,f=u-1):(e=u-1,f=2),r=this.calcColor(o[n],n),r!==null)return i&&(r=this.calcHighlightColor(r,l)),s.drawRect(c,e,this.barWidth-1,f-1,r,r)}});r.fn.sparkline.discrete=lt=u(r.fn.sparkline._base,a,{type:"discrete",init:function(n,u,f,e,o){lt._super.init.call(this,n,u,f,e,o);this.regionShapes={};this.values=u=r.map(u,Number);this.min=t.min.apply(t,u);this.max=t.max.apply(t,u);this.range=this.max-this.min;this.width=e=f.get("width")==="auto"?u.length*2:this.width;this.interval=t.floor(e/u.length);this.itemWidth=e/u.length;f.get("chartRangeMin")!==i&&(f.get("chartRangeClip")||f.get("chartRangeMin")<this.min)&&(this.min=f.get("chartRangeMin"));f.get("chartRangeMax")!==i&&(f.get("chartRangeClip")||f.get("chartRangeMax")>this.max)&&(this.max=f.get("chartRangeMax"));this.initTarget();this.target&&(this.lineHeight=f.get("lineHeight")==="auto"?t.round(this.canvasHeight*.3):f.get("lineHeight"))},getRegion:function(n,i){return t.floor(i/this.itemWidth)},getCurrentRegionFields:function(){var n=this.currentRegion;return{isNull:this.values[n]===i,value:this.values[n],offset:n}},renderRegion:function(n,i){var a=this.values,r=this.options,h=this.min,v=this.max,y=this.range,p=this.interval,w=this.target,b=this.canvasHeight,c=this.lineHeight,l=b-c,f,e,u,o;return e=s(a[n],h,v),o=n*p,f=t.round(l-l*((e-h)/y)),u=r.get("thresholdColor")&&e<r.get("thresholdValue")?r.get("thresholdColor"):r.get("lineColor"),i&&(u=this.calcHighlightColor(u,r)),w.drawLine(o,f,o,f+c,u)}});r.fn.sparkline.bullet=w=u(r.fn.sparkline._base,{type:"bullet",init:function(n,r,u,f,e){var s,h,o;w._super.init.call(this,n,r,u,f,e);this.values=r=v(r);o=r.slice();o[0]=o[0]===null?o[2]:o[0];o[1]=r[1]===null?o[2]:o[1];s=t.min.apply(t,r);h=t.max.apply(t,r);s=u.get("base")===i?s<0?s:0:u.get("base");this.min=s;this.max=h;this.range=h-s;this.shapes={};this.valueShapes={};this.regiondata={};this.width=f=u.get("width")==="auto"?"4.0em":f;this.target=this.$el.simpledraw(f,e,u.get("composite"));r.length||(this.disabled=!0);this.initTarget()},getRegion:function(n,t,r){var u=this.target.getShapeAt(n,t,r);return u!==i&&this.shapes[u]!==i?this.shapes[u]:i},getCurrentRegionFields:function(){var n=this.currentRegion;return{fieldkey:n.substr(0,1),value:this.values[n.substr(1)],region:n}},changeHighlight:function(n){var i=this.currentRegion,r=this.valueShapes[i],t;delete this.shapes[r];switch(i.substr(0,1)){case"r":t=this.renderRange(i.substr(1),n);break;case"p":t=this.renderPerformance(n);break;case"t":t=this.renderTarget(n)}this.valueShapes[i]=t.id;this.shapes[t.id]=i;this.target.replaceWithShape(r,t)},renderRange:function(n,i){var u=this.values[n],f=t.round(this.canvasWidth*((u-this.min)/this.range)),r=this.options.get("rangeColors")[n-2];return i&&(r=this.calcHighlightColor(r,this.options)),this.target.drawRect(0,0,f-1,this.canvasHeight-1,r,r)},renderPerformance:function(n){var r=this.values[1],u=t.round(this.canvasWidth*((r-this.min)/this.range)),i=this.options.get("performanceColor");return n&&(i=this.calcHighlightColor(i,this.options)),this.target.drawRect(0,t.round(this.canvasHeight*.3),u-1,t.round(this.canvasHeight*.4)-1,i,i)},renderTarget:function(n){var u=this.values[0],f=t.round(this.canvasWidth*((u-this.min)/this.range)-this.options.get("targetWidth")/2),r=t.round(this.canvasHeight*.1),e=this.canvasHeight-r*2,i=this.options.get("targetColor");return n&&(i=this.calcHighlightColor(i,this.options)),this.target.drawRect(f,r,this.options.get("targetWidth")-1,e-1,i,i)},render:function(){var i=this.values.length,r=this.target,t,n;if(w._super.render.call(this)){for(t=2;t<i;t++)n=this.renderRange(t).append(),this.shapes[n.id]="r"+t,this.valueShapes["r"+t]=n.id;this.values[1]!==null&&(n=this.renderPerformance().append(),this.shapes[n.id]="p1",this.valueShapes.p1=n.id);this.values[0]!==null&&(n=this.renderTarget().append(),this.shapes[n.id]="t0",this.valueShapes.t0=n.id);r.render()}}});r.fn.sparkline.pie=b=u(r.fn.sparkline._base,{type:"pie",init:function(n,i,u,f,e){var s=0,o;if(b._super.init.call(this,n,i,u,f,e),this.shapes={},this.valueShapes={},this.values=i=r.map(i,Number),u.get("width")==="auto"&&(this.width=this.height),i.length>0)for(o=i.length;o--;)s+=i[o];this.total=s;this.initTarget();this.radius=t.floor(t.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(n,t,r){var u=this.target.getShapeAt(n,t,r);return u!==i&&this.shapes[u]!==i?this.shapes[u]:i},getCurrentRegionFields:function(){var n=this.currentRegion;return{isNull:this.values[n]===i,value:this.values[n],percent:this.values[n]/this.total*100,color:this.options.get("sliceColors")[n%this.options.get("sliceColors").length],offset:n}},changeHighlight:function(n){var t=this.currentRegion,i=this.renderSlice(t,n),r=this.valueShapes[t];delete this.shapes[r];this.target.replaceWithShape(r,i);this.valueShapes[t]=i.id;this.shapes[i.id]=t},renderSlice:function(n,r){for(var p=this.target,f=this.options,h=this.radius,w=f.get("borderWidth"),c=f.get("offset"),b=2*t.PI,l=this.values,a=this.total,e=c?2*t.PI*(c/360):0,v,o,s,y=l.length,u=0;u<y;u++){if(v=e,o=e,a>0&&(o=e+b*(l[u]/a)),n===u)return s=f.get("sliceColors")[u%f.get("sliceColors").length],r&&(s=this.calcHighlightColor(s,f)),p.drawPieSlice(h,h,h-w,v,o,i,s);e=o}},render:function(){var e=this.target,o=this.values,s=this.options,r=this.radius,u=s.get("borderWidth"),f,n;if(b._super.render.call(this)){for(u&&e.drawCircle(r,r,t.floor(r-u/2),s.get("borderColor"),i,u).append(),n=o.length;n--;)o[n]&&(f=this.renderSlice(n).append(),this.valueShapes[n]=f.id,this.shapes[f.id]=n);e.render()}}});r.fn.sparkline.box=k=u(r.fn.sparkline._base,{type:"box",init:function(n,t,i,u,f){k._super.init.call(this,n,t,i,u,f);this.values=r.map(t,Number);this.width=i.get("width")==="auto"?"4.0em":u;this.initTarget();this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){var n=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return this.loutlier!==i&&n.push({field:"lo",value:this.loutlier}),this.routlier!==i&&n.push({field:"ro",value:this.routlier}),this.lwhisker!==i&&n.push({field:"lw",value:this.lwhisker}),this.rwhisker!==i&&n.push({field:"rw",value:this.rwhisker}),n},render:function(){var s=this.target,r=this.values,g=r.length,n=this.options,nt=this.canvasWidth,u=this.canvasHeight,e=n.get("chartRangeMin")===i?t.min.apply(t,r):n.get("chartRangeMin"),it=n.get("chartRangeMax")===i?t.max.apply(t,r):n.get("chartRangeMax"),o=0,h,w,tt,a,p,v,c,b,y,d,f;if(k._super.render.call(this)){if(n.get("raw"))n.get("showOutliers")&&r.length>5?(w=r[0],h=r[1],a=r[2],p=r[3],v=r[4],c=r[5],b=r[6]):(h=r[0],a=r[1],p=r[2],v=r[3],c=r[4]);else if(r.sort(function(n,t){return n-t}),a=l(r,1),p=l(r,2),v=l(r,3),tt=v-a,n.get("showOutliers")){for(h=c=i,y=0;y<g;y++)h===i&&r[y]>a-tt*n.get("outlierIQR")&&(h=r[y]),r[y]<v+tt*n.get("outlierIQR")&&(c=r[y]);w=r[0];b=r[g-1]}else h=r[0],c=r[g-1];this.quartiles=[a,p,v];this.lwhisker=h;this.rwhisker=c;this.loutlier=w;this.routlier=b;f=nt/(it-e+1);n.get("showOutliers")&&(o=t.ceil(n.get("spotRadius")),nt-=2*t.ceil(n.get("spotRadius")),f=nt/(it-e+1),w<h&&s.drawCircle((w-e)*f+o,u/2,n.get("spotRadius"),n.get("outlierLineColor"),n.get("outlierFillColor")).append(),b>c&&s.drawCircle((b-e)*f+o,u/2,n.get("spotRadius"),n.get("outlierLineColor"),n.get("outlierFillColor")).append());s.drawRect(t.round((a-e)*f+o),t.round(u*.1),t.round((v-a)*f),t.round(u*.8),n.get("boxLineColor"),n.get("boxFillColor")).append();s.drawLine(t.round((h-e)*f+o),t.round(u/2),t.round((a-e)*f+o),t.round(u/2),n.get("lineColor")).append();s.drawLine(t.round((h-e)*f+o),t.round(u/4),t.round((h-e)*f+o),t.round(u-u/4),n.get("whiskerColor")).append();s.drawLine(t.round((c-e)*f+o),t.round(u/2),t.round((v-e)*f+o),t.round(u/2),n.get("lineColor")).append();s.drawLine(t.round((c-e)*f+o),t.round(u/4),t.round((c-e)*f+o),t.round(u-u/4),n.get("whiskerColor")).append();s.drawLine(t.round((p-e)*f+o),t.round(u*.1),t.round((p-e)*f+o),t.round(u*.9),n.get("medianColor")).append();n.get("target")&&(d=t.ceil(n.get("spotRadius")),s.drawLine(t.round((n.get("target")-e)*f+o),t.round(u/2-d),t.round((n.get("target")-e)*f+o),t.round(u/2+d),n.get("targetColor")).append(),s.drawLine(t.round((n.get("target")-e)*f+o-d),t.round(u/2),t.round((n.get("target")-e)*f+o+d),t.round(u/2),n.get("targetColor")).append());s.render()}}});yt=u({init:function(n,t,i,r){this.target=n;this.id=t;this.type=i;this.args=r},append:function(){return this.target.appendShape(this),this}});d=u({_pxregex:/(\d+)(px)?\s*$/i,init:function(n,t,i){n&&(this.width=n,this.height=t,this.target=i,this.lastShapeId=null,i[0]&&(i=i[0]),r.data(i,"_jqs_vcanvas",this))},drawLine:function(n,t,i,r,u,f){return this.drawShape([[n,t],[i,r]],u,f)},drawShape:function(n,t,i,r){return this._genShape("Shape",[n,t,i,r])},drawCircle:function(n,t,i,r,u,f){return this._genShape("Circle",[n,t,i,r,u,f])},drawPieSlice:function(n,t,i,r,u,f,e){return this._genShape("PieSlice",[n,t,i,r,u,f,e])},drawRect:function(n,t,i,r,u,f){return this._genShape("Rect",[n,t,i,r,u,f])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(n,t){r(t).html(n)},_calculatePixelDims:function(n,t,i){var u;u=this._pxregex.exec(t);this.pixelHeight=u?u[1]:r(i).height();u=this._pxregex.exec(n);this.pixelWidth=u?u[1]:r(i).width()},_genShape:function(n,t){var i=wt++;return t.unshift(i),new yt(this,i,n,t)},appendShape:function(){alert("appendShape not implemented")},replaceWithShape:function(){alert("replaceWithShape not implemented")},insertAfterShape:function(){alert("insertAfterShape not implemented")},removeShapeId:function(){alert("removeShapeId not implemented")},getShapeAt:function(){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}});g=u(d,{init:function(t,u,f,e){g._super.init.call(this,t,u,f);this.canvas=n.createElement("canvas");f[0]&&(f=f[0]);r.data(f,"_jqs_vcanvas",this);r(this.canvas).css({display:"inline-block",width:t,height:u,verticalAlign:"top"});this._insert(this.canvas,f);this._calculatePixelDims(t,u,this.canvas);this.canvas.width=this.pixelWidth;this.canvas.height=this.pixelHeight;this.interact=e;this.shapes={};this.shapeseq=[];this.currentTargetShapeId=i;r(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(n,t,r){var u=this.canvas.getContext("2d");return n!==i&&(u.strokeStyle=n),u.lineWidth=r===i?1:r,t!==i&&(u.fillStyle=t),u},reset:function(){var n=this._getContext();n.clearRect(0,0,this.pixelWidth,this.pixelHeight);this.shapes={};this.shapeseq=[];this.currentTargetShapeId=i},_drawShape:function(n,t,r,u,f){var e=this._getContext(r,u,f),o,s;for(e.beginPath(),e.moveTo(t[0][0]+.5,t[0][1]+.5),o=1,s=t.length;o<s;o++)e.lineTo(t[o][0]+.5,t[o][1]+.5);r!==i&&e.stroke();u!==i&&e.fill();this.targetX!==i&&this.targetY!==i&&e.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=n)},_drawCircle:function(n,r,u,f,e,o,s){var h=this._getContext(e,o,s);h.beginPath();h.arc(r,u,f,0,2*t.PI,!1);this.targetX!==i&&this.targetY!==i&&h.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=n);e!==i&&h.stroke();o!==i&&h.fill()},_drawPieSlice:function(n,t,r,u,f,e,o,s){var h=this._getContext(o,s);h.beginPath();h.moveTo(t,r);h.arc(t,r,u,f,e,!1);h.lineTo(t,r);h.closePath();o!==i&&h.stroke();s&&h.fill();this.targetX!==i&&this.targetY!==i&&h.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=n)},_drawRect:function(n,t,i,r,u,f,e){return this._drawShape(n,[[t,i],[t+r,i],[t+r,i+u],[t,i+u],[t,i]],f,e)},appendShape:function(n){return this.shapes[n.id]=n,this.shapeseq.push(n.id),this.lastShapeId=n.id,n.id},replaceWithShape:function(n,t){var r=this.shapeseq,i;for(this.shapes[t.id]=t,i=r.length;i--;)r[i]==n&&(r[i]=t.id);delete this.shapes[n]},replaceWithShapes:function(n,t){for(var r=this.shapeseq,f={},u,e,i=n.length;i--;)f[n[i]]=!0;for(i=r.length;i--;)u=r[i],f[u]&&(r.splice(i,1),delete this.shapes[u],e=i);for(i=t.length;i--;)r.splice(e,0,t[i].id),this.shapes[t[i].id]=t[i]},insertAfterShape:function(n,t){for(var r=this.shapeseq,i=r.length;i--;)if(r[i]===n){r.splice(i+1,0,t.id);this.shapes[t.id]=t;return}},removeShapeId:function(n){for(var i=this.shapeseq,t=i.length;t--;)if(i[t]===n){i.splice(t,1);break}delete this.shapes[n]},getShapeAt:function(n,t,i){return this.targetX=t,this.targetY=i,this.render(),this.currentTargetShapeId},render:function(){var i=this.shapeseq,u=this.shapes,f=i.length,e=this._getContext(),r,t,n;for(e.clearRect(0,0,this.pixelWidth,this.pixelHeight),n=0;n<f;n++)r=i[n],t=u[r],this["_draw"+t.type].apply(this,t.args);this.interact||(this.shapes={},this.shapeseq=[])}});nt=u(d,{init:function(t,i,u){var f;nt._super.init.call(this,t,i,u);u[0]&&(u=u[0]);r.data(u,"_jqs_vcanvas",this);this.canvas=n.createElement("span");r(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:t,height:i,margin:"0px",padding:"0px",verticalAlign:"top"});this._insert(this.canvas,u);this._calculatePixelDims(t,i,this.canvas);this.canvas.width=this.pixelWidth;this.canvas.height=this.pixelHeight;f='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"><\/v:group>';this.canvas.insertAdjacentHTML("beforeEnd",f);this.group=r(this.canvas).children()[0];this.rendered=!1;this.prerender=""},_drawShape:function(n,t,r,u,f){for(var e=[],s,h,c,l,o=0,a=t.length;o<a;o++)e[o]=""+t[o][0]+","+t[o][1];return s=e.splice(0,1),f=f===i?1:f,h=r===i?' stroked="false" ':' strokeWeight="'+f+'px" strokeColor="'+r+'" ',c=u===i?' filled="false"':' fillColor="'+u+'" filled="true" ',l=e[0]===e[e.length-1]?"x ":"",'<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"  id="jqsshape'+n+'" '+h+c+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;"  path="m '+s+" l "+e.join(", ")+" "+l+'e"> <\/v:shape>'},_drawCircle:function(n,t,r,u,f,e,o){var s,h;return t-=u,r-=u,s=f===i?' stroked="false" ':' strokeWeight="'+o+'px" strokeColor="'+f+'" ',h=e===i?' filled="false"':' fillColor="'+e+'" filled="true" ','<v:oval  id="jqsshape'+n+'" '+s+h+' style="position:absolute;top:'+r+"px; left:"+t+"px; width:"+u*2+"px; height:"+u*2+'px"><\/v:oval>'},_drawPieSlice:function(n,r,u,f,e,o,s,h){var y,c,l,a,v,p,w;if(e===o)return"";if(o-e==2*t.PI&&(e=0,o=2*t.PI),c=r+t.round(t.cos(e)*f),l=u+t.round(t.sin(e)*f),a=r+t.round(t.cos(o)*f),v=u+t.round(t.sin(o)*f),c===a&&l===v){if(o-e<t.PI)return"";c=a=r+f;l=v=u}return c===a&&l===v&&o-e<t.PI?"":(y=[r-f,u-f,r+f,u+f,c,l,a,v],p=s===i?' stroked="false" ':' strokeWeight="1px" strokeColor="'+s+'" ',w=h===i?' filled="false"':' fillColor="'+h+'" filled="true" ','<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"  id="jqsshape'+n+'" '+p+w+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;"  path="m '+r+","+u+" wa "+y.join(", ")+' x e"> <\/v:shape>')},_drawRect:function(n,t,i,r,u,f,e){return this._drawShape(n,[[t,i],[t,i+u],[t+r,i+u],[t+r,i],[t,i]],f,e)},reset:function(){this.group.innerHTML=""},appendShape:function(n){var t=this["_draw"+n.type].apply(this,n.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",t):this.prerender+=t,this.lastShapeId=n.id,n.id},replaceWithShape:function(n,t){var i=r("#jqsshape"+n),u=this["_draw"+t.type].apply(this,t.args);i[0].outerHTML=u},replaceWithShapes:function(n,t){for(var f=r("#jqsshape"+n[0]),u="",e=t.length,i=0;i<e;i++)u+=this["_draw"+t[i].type].apply(this,t[i].args);for(f[0].outerHTML=u,i=1;i<n.length;i++)r("#jqsshape"+n[i]).remove()},insertAfterShape:function(n,t){var i=r("#jqsshape"+n),u=this["_draw"+t.type].apply(this,t.args);i[0].insertAdjacentHTML("afterEnd",u)},removeShapeId:function(n){var t=r("#jqsshape"+n);this.group.removeChild(t[0])},getShapeAt:function(n){return n.id.substr(8)},render:function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})})}(document,Math);$(function(){$(".count-to").countTo();$(".sales-count-to").countTo({formatter:function(n){return"$"+n.toFixed(2).replace(/(\d)(?=(\d\d\d)+(?!\d))/g," ").replace(".",",")}});initRealTimeChart();initDonutChart();initSparkline()});realtime="on";data=[];totalPoints=110;