(function(x,U){"object"===typeof module&&module.exports?module.exports=x.document?U(x):U:x.Highcharts=U(x)})("undefined"!==typeof window?window:this,function(x){function U(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw Error(c);x.console&&console.log(c)}function za(a,b,c){this.options=b;this.elem=a;this.prop=c}function F(){var a,b=arguments,c,d={},e=function(a,b){var c,d;"object"!==typeof a&&(a={});for(d in b)b.hasOwnProperty(d)&&(c=b[d],a[d]=c&&"object"===typeof c&&
"[object Array]"!==Object.prototype.toString.call(c)&&"renderTo"!==d&&"number"!==typeof c.nodeType?e(a[d]||{},c):b[d]);return a};!0===b[0]&&(d=b[1],b=Array.prototype.slice.call(b,2));c=b.length;for(a=0;a<c;a++)d=e(d,b[a]);return d}function K(a,b){return parseInt(a,b||10)}function Aa(a){return"string"===typeof a}function aa(a){return a&&"object"===typeof a}function oa(a){return"[object Array]"===Object.prototype.toString.call(a)}function ka(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}
function r(a){return a!==I&&null!==a}function P(a,b,c){var d,e;if(Aa(b))r(c)?a.setAttribute(b,c):a&&a.getAttribute&&(e=a.getAttribute(b));else if(r(b)&&aa(b))for(d in b)a.setAttribute(d,b[d]);return e}function V(a){return oa(a)?a:[a]}function qa(a,b,c){if(b)return setTimeout(a,b,c);a.call(0,c)}function N(a,b){Na&&!ta&&b&&b.opacity!==I&&(b.filter="alpha(opacity="+100*b.opacity+")");E(a.style,b)}function Y(a,b,c,d,e){a=D.createElement(a);b&&E(a,b);e&&N(a,{padding:0,border:"none",margin:0});c&&N(a,c);
d&&d.appendChild(a);return a}function ia(a,b){var c=function(){};c.prototype=new a;E(c.prototype,b);return c}function Ia(a,b,c){return Array((b||2)+1-String(a).length).join(c||0)+a}function Oa(a){return 6E4*(gb&&gb(a)||wb||0)}function Fa(a,b){for(var c="{",d=!1,e,f,g,h,k,l=[];-1!==(c=a.indexOf(c));){e=a.slice(0,c);if(d){f=e.split(":");g=f.shift().split(".");k=g.length;e=b;for(h=0;h<k;h++)e=e[g[h]];f.length&&(f=f.join(":"),g=/\.([0-9])/,h=ga.lang,/f$/.test(f)?(k=(k=f.match(g))?k[1]:-1,null!==e&&(e=
L.numberFormat(e,k,h.decimalPoint,-1<f.indexOf(",")?h.thousandsSep:""))):e=bb(f,e))}l.push(e);a=a.slice(c+1);c=(d=!d)?"}":"{"}l.push(a);return l.join("")}function y(a){return ha.pow(10,ja(ha.log(a)/ha.LN10))}function B(a,b,c,d,e){var f,g=a;c=t(c,1);f=a/c;b||(b=[1,2,2.5,5,10],!1===d&&(1===c?b=[1,2,5,10]:.1>=c&&(b=[1/c])));for(d=0;d<b.length&&!(g=b[d],e&&g*c>=a||!e&&f<=(b[d]+(b[d+1]||b[d]))/2);d++);return g*c}function Ya(a,b){var c=a.length,d,e;for(e=0;e<c;e++)a[e].safeI=e;a.sort(function(a,c){d=b(a,
c);return 0===d?a.safeI-c.safeI:d});for(e=0;e<c;e++)delete a[e].safeI}function G(a){for(var b=a.length,c=a[0];b--;)a[b]<c&&(c=a[b]);return c}function Ua(a){for(var b=a.length,c=a[0];b--;)a[b]>c&&(c=a[b]);return c}function Ja(a,b){for(var c in a)a[c]&&a[c]!==b&&a[c].destroy&&a[c].destroy(),delete a[c]}function Ba(a){pb||(pb=Y(Za));a&&pb.appendChild(a);pb.innerHTML=""}function C(a,b){return parseFloat(a.toPrecision(b||14))}function cb(a,b){b.renderer.globalAnimation=t(a,b.animation)}function hb(a){return aa(a)?
F(a):{duration:a?500:0}}function Ib(){var a=ga.global,b=a.useUTC,c=b?"getUTC":"get",d=b?"setUTC":"set";Ca=a.Date||x.Date;wb=b&&a.timezoneOffset;gb=b&&a.getTimezoneOffset;qb=function(a,c,d,h,k,l){var m;b?(m=Ca.UTC.apply(0,arguments),m+=Oa(m)):m=(new Ca(a,c,t(d,1),t(h,0),t(k,0),t(l,0))).getTime();return m};xb=c+"Minutes";yb=c+"Hours";zb=c+"Day";db=c+"Date";ib=c+"Month";jb=c+"FullYear";Jb=d+"Milliseconds";Kb=d+"Seconds";Lb=d+"Minutes";Mb=d+"Hours";rb=d+"Date";Ab=d+"Month";Bb=d+"FullYear"}function R(a){if(!(this instanceof
R))return new R(a);this.init(a)}function S(){}function ea(a,b,c,d){this.axis=a;this.pos=b;this.type=c||"";this.isNew=!0;c||d||this.addLabel()}function Nb(a,b,c,d,e){var f=a.chart.inverted;this.axis=a;this.isNegative=c;this.options=b;this.x=d;this.total=null;this.points={};this.stack=e;this.rightCliff=this.leftCliff=0;this.alignOptions={align:b.align||(f?c?"left":"right":"center"),verticalAlign:b.verticalAlign||(f?"middle":c?"bottom":"top"),y:t(b.y,f?4:c?14:-6),x:t(b.x,f?c?-6:6:0)};this.textAlign=
b.textAlign||(f?c?"right":"left":"center")}var I,D=x.document,ha=Math,M=ha.round,ja=ha.floor,Ka=ha.ceil,z=ha.max,Q=ha.min,ba=ha.abs,la=ha.cos,ra=ha.sin,Ga=ha.PI,xa=2*Ga/360,Pa=x.navigator&&x.navigator.userAgent||"",Ob=x.opera,Na=/(msie|trident|edge)/i.test(Pa)&&!Ob,sb=D&&8===D.documentMode,tb=!Na&&/AppleWebKit/.test(Pa),$a=/Firefox/.test(Pa),Pb=/(Mobile|Android|Windows Phone)/.test(Pa),Va="http://www.w3.org/2000/svg",ta=D&&D.createElementNS&&!!D.createElementNS(Va,"svg").createSVGRect,Tb=$a&&4>parseInt(Pa.split("Firefox/")[1],
10),ya=D&&!ta&&!Na&&!!D.createElement("canvas").getContext,kb,lb,Qb={},Cb=0,pb,ga,bb,O,Qa=function(){},fa=[],mb=0,Za="div",Ub=/^[0-9]+$/,ub=["plotTop","marginRight","marginBottom","plotLeft"],Ca,qb,wb,gb,xb,yb,zb,db,ib,jb,Jb,Kb,Lb,Mb,rb,Ab,Bb,Z={},L;L=x.Highcharts?U(16,!0):{win:x};L.seriesTypes=Z;var Wa=[],Da,Ha,u,Ra,Db,Sa,W,ma,T,eb,ab;za.prototype={dSetter:function(){var a=this.paths[0],b=this.paths[1],c=[],d=this.now,e=a.length,f;if(1===d)c=this.toD;else if(e===b.length&&1>d)for(;e--;)f=parseFloat(a[e]),
c[e]=isNaN(f)?a[e]:d*parseFloat(b[e]-f)+f;else c=b;this.elem.attr("d",c)},update:function(){var a=this.elem,b=this.prop,c=this.now,d=this.options.step;if(this[b+"Setter"])this[b+"Setter"]();else a.attr?a.element&&a.attr(b,c):a.style[b]=c+this.unit;d&&d.call(a,c,this)},run:function(a,b,c){var d=this,e=function(a){return e.stopped?!1:d.step(a)},f;this.startTime=+new Ca;this.start=a;this.end=b;this.unit=c;this.now=this.start;this.pos=0;e.elem=this.elem;e()&&1===Wa.push(e)&&(e.timerId=setInterval(function(){for(f=
0;f<Wa.length;f++)Wa[f]()||Wa.splice(f--,1);Wa.length||clearInterval(e.timerId)},13))},step:function(a){var b=+new Ca,c,d=this.options;c=this.elem;var e=d.complete,f=d.duration,g=d.curAnim,h;if(c.attr&&!c.element)c=!1;else if(a||b>=f+this.startTime){this.now=this.end;this.pos=1;this.update();a=g[this.prop]=!0;for(h in g)!0!==g[h]&&(a=!1);a&&e&&e.call(c);c=!1}else this.pos=d.easing((b-this.startTime)/f),this.now=this.start+(this.end-this.start)*this.pos,this.update(),c=!0;return c},initPath:function(a,
b,c){b=b||"";var d=a.shift,e=-1<b.indexOf("C"),f=e?7:3,g;b=b.split(" ");c=[].concat(c);var h=a.isArea,k=h?2:1,l=function(a){for(g=a.length;g--;)"M"!==a[g]&&"L"!==a[g]||a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(l(b),l(c));if(d<=c.length/f&&b.length===c.length)for(;d--;)c=c.slice(0,f).concat(c),h&&(c=c.concat(c.slice(c.length-f)));a.shift=0;if(b.length)for(a=c.length;b.length<a;)d=b.slice().splice(b.length/k-f,f*k),e&&(d[f-6]=d[f-2],d[f-5]=d[f-1]),[].splice.apply(b,[b.length/k,0].concat(d));
return[b,c]}};var E=L.extend=function(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a},X=L.isNumber=function(a){return"number"===typeof a&&!isNaN(a)},t=L.pick=function(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++)if(c=a[b],c!==I&&null!==c)return c},nb=L.wrap=function(a,b,c){var d=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments);a.unshift(d);return c.apply(this,a)}};bb=function(a,b,c){if(!X(b))return ga.lang.invalidDate||"";a=t(a,"%Y-%m-%d %H:%M:%S");var d=new Ca(b-Oa(b)),e,
f=d[yb](),g=d[zb](),h=d[db](),k=d[ib](),l=d[jb](),m=ga.lang,n=m.weekdays,p=m.shortWeekdays,d=E({a:p?p[g]:n[g].substr(0,3),A:n[g],d:Ia(h),e:Ia(h,2," "),w:g,b:m.shortMonths[k],B:m.months[k],m:Ia(k+1),y:l.toString().substr(2,2),Y:l,H:Ia(f),k:f,I:Ia(f%12||12),l:f%12||12,M:Ia(d[xb]()),p:12>f?"AM":"PM",P:12>f?"am":"pm",S:Ia(d.getSeconds()),L:Ia(M(b%1E3),3)},L.dateFormats);for(e in d)for(;-1!==a.indexOf("%"+e);)a=a.replace("%"+e,"function"===typeof d[e]?d[e](b):d[e]);return c?a.substr(0,1).toUpperCase()+
a.substr(1):a};O={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};L.numberFormat=function(a,b,c,d){a=+a||0;b=+b;var e=ga.lang,f=(a.toString().split(".")[1]||"").length,g,h,k=Math.abs(a);-1===b?b=Math.min(f,20):X(b)||(b=2);g=String(K(k.toFixed(b)));h=3<g.length?g.length%3:0;c=t(c,e.decimalPoint);d=t(d,e.thousandsSep);a=(0>a?"-":"")+(h?g.substr(0,h)+d:"");a+=g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d);b&&(d=Math.abs(k-g+Math.pow(10,-Math.max(b,f)-1)),
a+=c+d.toFixed(b).slice(2));return a};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};Da=function(a,b){var c;return"width"===b?Math.min(a.offsetWidth,a.scrollWidth)-Da(a,"padding-left")-Da(a,"padding-right"):"height"===b?Math.min(a.offsetHeight,a.scrollHeight)-Da(a,"padding-top")-Da(a,"padding-bottom"):(c=x.getComputedStyle(a,void 0))&&K(c.getPropertyValue(b))};Ha=function(a,b){return b.indexOf?b.indexOf(a):[].indexOf.call(b,a)};Ra=function(a,b){return[].filter.call(a,b)};Sa=function(a,
b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a[d],a[d],d,a);return c};Db=function(a){var b=D.documentElement;a=a.getBoundingClientRect();return{top:a.top+(x.pageYOffset||b.scrollTop)-(b.clientTop||0),left:a.left+(x.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}};ab=function(a){for(var b=Wa.length;b--;)Wa[b].elem===a&&(Wa[b].stopped=!0)};u=function(a,b){return Array.prototype.forEach.call(a,b)};W=function(a,b,c){function d(b){b.target=b.srcElement||x;c.call(a,b)}var e=a.hcEvents=a.hcEvents||{};
a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&(a.hcEventsIE||(a.hcEventsIE={}),a.hcEventsIE[c.toString()]=d,a.attachEvent("on"+b,d));e[b]||(e[b]=[]);e[b].push(c)};ma=function(a,b,c){function d(b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.attachEvent&&(c=a.hcEventsIE[c.toString()],a.detachEvent("on"+b,c))}function e(){var c,e;if(a.nodeName)for(e in b?(c={},c[b]=!0):c=g,c)if(g[e])for(c=g[e].length;c--;)d(e,g[e][c])}var f,g=a.hcEvents,h;g&&(b?(f=g[b]||[],c?(h=Ha(c,f),-1<
h&&(f.splice(h,1),g[b]=f),d(b,c)):(e(),g[b]=[])):(e(),a.hcEvents={}))};T=function(a,b,c,d){var e;e=a.hcEvents;var f,g;c=c||{};if(D.createEvent&&(a.dispatchEvent||a.fireEvent))e=D.createEvent("Events"),e.initEvent(b,!0,!0),e.target=a,E(e,c),a.dispatchEvent?a.dispatchEvent(e):a.fireEvent(b,e);else if(e)for(e=e[b]||[],f=e.length,c.preventDefault||(c.preventDefault=function(){c.defaultPrevented=!0}),c.target=a,c.type||(c.type=b),b=0;b<f;b++)g=e[b],!1===g.call(a,c)&&c.preventDefault();d&&!c.defaultPrevented&&
d(c)};eb=function(a,b,c){var d,e="",f,g,h;aa(c)||(d=arguments,c={duration:d[2],easing:d[3],complete:d[4]});X(c.duration)||(c.duration=400);c.easing="function"===typeof c.easing?c.easing:Math[c.easing]||Math.easeInOutSine;c.curAnim=F(b);for(h in b)g=new za(a,c,h),f=null,"d"===h?(g.paths=g.initPath(a,a.d,b.d),g.toD=b.d,d=0,f=1):a.attr?d=a.attr(h):(d=parseFloat(Da(a,h))||0,"opacity"!==h&&(e="px")),f||(f=b[h]),f.match&&f.match("px")&&(f=f.replace(/px/g,"")),g.run(d,f,e)};x.jQuery&&(x.jQuery.fn.highcharts=
function(){var a=[].slice.call(arguments);if(this[0])return a[0]?(new (L[Aa(a[0])?a.shift():"Chart"])(this[0],a[0],a[1]),this):fa[P(this[0],"data-highcharts-chart")]});D&&!D.defaultView&&(Da=function(a,b){var c;c={width:"clientWidth",height:"clientHeight"}[b];if(a.style[b])return K(a.style[b]);"opacity"===b&&(b="filter");if(c)return a.style.zoom=1,Math.max(a[c]-2*Da(a,"padding"),0);c=a.currentStyle[b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()})];"filter"===b&&(c=c.replace(/alpha\(opacity=([0-9]+)\)/,
function(a,b){return b/100}));return""===c?1:K(c)});Array.prototype.forEach||(u=function(a,b){for(var c=0,d=a.length;c<d;c++)if(!1===b.call(a[c],a[c],c,a))return c});Array.prototype.indexOf||(Ha=function(a,b){var c,d=0;if(b)for(c=b.length;d<c;d++)if(b[d]===a)return d;return-1});Array.prototype.filter||(Ra=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)b(a[d],d)&&c.push(a[d]);return c});L.Fx=za;L.inArray=Ha;L.each=u;L.grep=Ra;L.offset=Db;L.map=Sa;L.addEvent=W;L.removeEvent=ma;L.fireEvent=T;L.animate=
eb;L.animObject=hb;L.stop=ab;ga={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),
resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/4.2.5/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",
align:"center",margin:15,style:{color:"#333333",fontSize:"18px"},widthAdjust:-44},subtitle:{text:"",align:"center",style:{color:"#555555"},widthAdjust:-44},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},lineWidth:2,marker:{lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0,lineWidthPlus:1,radiusPlus:2},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===
this.y?"":L.numberFormat(this.y,-1)},style:{color:"contrast",fontSize:"11px",fontWeight:"bold",textShadow:"0 0 6px contrast, 0 0 3px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},
borderColor:"#909090",borderRadius:0,navigation:{activeColor:"#274b6d",inactiveColor:"#CCC"},shadow:!1,itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"white",opacity:.5,
textAlign:"center"}},tooltip:{enabled:!0,animation:ta,backgroundColor:"rgba(249, 249, 249, .85)",borderWidth:1,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',
shadow:!0,snap:Pb?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"9px"}}};var sa=ga.plotOptions,ua=sa.line;Ib();R.prototype={parsers:[{regex:/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*\)/,parse:function(a){return[K(a[1]),
K(a[2]),K(a[3]),parseFloat(a[4],10)]}},{regex:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(a){return[K(a[1],16),K(a[2],16),K(a[3],16),1]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(a){return[K(a[1]),K(a[2]),K(a[3]),1]}}],init:function(a){var b,c,d,e;if((this.input=a)&&a.stops)this.stops=Sa(a.stops,function(a){return new R(a[1])});else for(d=this.parsers.length;d--&&!c;)e=this.parsers[d],(b=e.regex.exec(a))&&(c=e.parse(b));this.rgba=
c||[]},get:function(a){var b=this.input,c=this.rgba,d;this.stops?(d=F(b),d.stops=[].concat(d.stops),u(this.stops,function(b,c){d.stops[c]=[d.stops[c][0],b.get(a)]})):d=c&&X(c[0])?"rgb"===a||!a&&1===c[3]?"rgb("+c[0]+","+c[1]+","+c[2]+")":"a"===a?c[3]:"rgba("+c.join(",")+")":b;return d},brighten:function(a){var b,c=this.rgba;if(this.stops)u(this.stops,function(b){b.brighten(a)});else if(X(a)&&0!==a)for(b=0;3>b;b++)c[b]+=K(255*a),0>c[b]&&(c[b]=0),255<c[b]&&(c[b]=255);return this},setOpacity:function(a){this.rgba[3]=
a;return this}};S.prototype={opacity:1,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textDecoration textOverflow textShadow".split(" "),init:function(a,b){this.element="span"===b?Y(b):D.createElementNS(Va,b);this.renderer=a},animate:function(a,b,c){b=t(b,this.renderer.globalAnimation,!0);ab(this);b?(c&&(b.complete=c),eb(this,a,b)):this.attr(a,null,c);return this},colorGradient:function(a,b,c){var d=this.renderer,e,f,g,h,k,l,m,n,p,q,v,H=[],w;a.linearGradient?
f="linearGradient":a.radialGradient&&(f="radialGradient");if(f){g=a[f];k=d.gradients;m=a.stops;q=c.radialReference;oa(g)&&(a[f]=g={x1:g[0],y1:g[1],x2:g[2],y2:g[3],gradientUnits:"userSpaceOnUse"});"radialGradient"===f&&q&&!r(g.gradientUnits)&&(h=g,g=F(g,d.getRadialAttr(q,h),{gradientUnits:"userSpaceOnUse"}));for(v in g)"id"!==v&&H.push(v,g[v]);for(v in m)H.push(m[v]);H=H.join(",");k[H]?q=k[H].attr("id"):(g.id=q="highcharts-"+Cb++,k[H]=l=d.createElement(f).attr(g).add(d.defs),l.radAttr=h,l.stops=[],
u(m,function(a){0===a[1].indexOf("rgba")?(e=R(a[1]),n=e.get("rgb"),p=e.get("a")):(n=a[1],p=1);a=d.createElement("stop").attr({offset:a[0],"stop-color":n,"stop-opacity":p}).add(l);l.stops.push(a)}));w="url("+d.url+"#"+q+")";c.setAttribute(b,w);c.gradient=H;a.toString=function(){return w}}},applyTextShadow:function(a){var b=this.element,c,d=-1!==a.indexOf("contrast"),e={},f=this.renderer.forExport,g=f||b.style.textShadow!==I&&!Na;d&&(e.textShadow=a=a.replace(/contrast/g,this.renderer.getContrast(b.style.fill)));
if(tb||f)e.textRendering="geometricPrecision";g?this.css(e):(this.fakeTS=!0,this.ySetter=this.xSetter,c=[].slice.call(b.getElementsByTagName("tspan")),u(a.split(/\s?,\s?/g),function(a){var d=b.firstChild,e,f;a=a.split(" ");e=a[a.length-1];(f=a[a.length-2])&&u(c,function(a,c){var g;0===c&&(a.setAttribute("x",b.getAttribute("x")),c=b.getAttribute("y"),a.setAttribute("y",c||0),null===c&&b.setAttribute("y",0));g=a.cloneNode(1);P(g,{"class":"highcharts-text-shadow",fill:e,stroke:e,"stroke-opacity":1/z(K(f),
3),"stroke-width":f,"stroke-linejoin":"round"});b.insertBefore(g,d)})}))},attr:function(a,b,c){var d,e=this.element,f,g=this,h;"string"===typeof a&&b!==I&&(d=a,a={},a[d]=b);if("string"===typeof a)g=(this[a+"Getter"]||this._defaultGetter).call(this,a,e);else{for(d in a)b=a[d],h=!1,this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(d)&&(f||(this.symbolAttr(a),f=!0),h=!0),!this.rotation||"x"!==d&&"y"!==d||(this.doTransform=!0),h||(h=this[d+"Setter"]||this._defaultSetter,h.call(this,
b,d,e),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(d)&&this.updateShadows(d,b,h));this.doTransform&&(this.updateTransform(),this.doTransform=!1)}c&&c();return g},updateShadows:function(a,b,c){for(var d=this.shadows,e=d.length;e--;)c.call(d[e],"height"===a?Math.max(b-(d[e].cutHeight||0),0):"d"===a?this.d:b,a,d[e])},addClass:function(a){var b=this.element,c=P(b,"class")||"";-1===c.indexOf(a)&&P(b,"class",c+" "+a);return this},symbolAttr:function(a){var b=this;u("x y r start end width height innerR anchorX anchorY".split(" "),
function(c){b[c]=t(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a){var b,c={},d,e=this.strokeWidth||0;d=M(e)%2/2;a.x=ja(a.x||this.x||0)+d;a.y=ja(a.y||this.y||0)+d;a.width=ja((a.width||this.width||0)-2*d);a.height=ja((a.height||this.height||0)-2*d);a.strokeWidth=e;for(b in a)this[b]!==a[b]&&(this[b]=c[b]=a[b]);return c},css:function(a){var b=this.styles,
c={},d=this.element,e,f,g="";e=!b;a&&a.color&&(a.fill=a.color);if(b)for(f in a)a[f]!==b[f]&&(c[f]=a[f],e=!0);if(e){e=this.textWidth=a&&a.width&&"text"===d.nodeName.toLowerCase()&&K(a.width)||this.textWidth;b&&(a=E(b,c));this.styles=a;e&&(ya||!ta&&this.renderer.forExport)&&delete a.width;if(Na&&!ta)N(this.element,a);else{b=function(a,b){return"-"+b.toLowerCase()};for(f in a)g+=f.replace(/([A-Z])/g,b)+":"+a[f]+";";P(d,"style",g)}e&&this.added&&this.renderer.buildText(this)}return this},on:function(a,
b){var c=this,d=c.element;lb&&"click"===a?(d.ontouchstart=function(a){c.touchEventFired=Ca.now();a.preventDefault();b.call(d,a)},d.onclick=function(a){(-1===Pa.indexOf("Android")||1100<Ca.now()-(c.touchEventFired||0))&&b.call(d,a)}):d["on"+a]=b;return this},setRadialReference:function(a){var b=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;b&&b.radAttr&&b.animate(this.renderer.getRadialAttr(a,b.radAttr));return this},translate:function(a,b){return this.attr({translateX:a,
translateY:b})},invert:function(){this.inverted=!0;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.scaleX,d=this.scaleY,e=this.inverted,f=this.rotation,g=this.element;e&&(a+=this.attr("width"),b+=this.attr("height"));a=["translate("+a+","+b+")"];e?a.push("rotate(90) scale(-1,1)"):f&&a.push("rotate("+f+" "+(g.getAttribute("x")||0)+" "+(g.getAttribute("y")||0)+")");(r(c)||r(d))&&a.push("scale("+t(c,1)+" "+t(d,1)+")");a.length&&g.setAttribute("transform",
a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){var d,e,f,g,h={};e=this.renderer;f=e.alignedObjects;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!c||Aa(c))this.alignTo=d=c||"renderer",ka(f,this),f.push(this),c=null}else a=this.alignOptions,b=this.alignByTranslate,d=this.alignTo;c=t(c,e[d],e);d=a.align;e=a.verticalAlign;f=(c.x||0)+(a.x||0);g=(c.y||0)+(a.y||0);if("right"===d||"center"===d)f+=(c.width-(a.width||0))/{right:1,center:2}[d];
h[b?"translateX":"x"]=M(f);if("bottom"===e||"middle"===e)g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=M(g);this[this.placed?"animate":"attr"](h);this.placed=!0;this.alignAttr=h;return this},getBBox:function(a,b){var c,d=this.renderer,e,f,g,h=this.element,k=this.styles;e=this.textStr;var l,m=h.style,n,p=d.cache,q=d.cacheKeys,v;f=t(b,this.rotation);g=f*xa;e!==I&&(v=["",f||0,k&&k.fontSize,h.style.width].join(),v=""===e||Ub.test(e)?"num:"+e.toString().length+v:e+v);v&&
!a&&(c=p[v]);if(!c){if(h.namespaceURI===Va||d.forExport){try{n=this.fakeTS&&function(a){u(h.querySelectorAll(".highcharts-text-shadow"),function(b){b.style.display=a})},$a&&m.textShadow?(l=m.textShadow,m.textShadow=""):n&&n("none"),c=h.getBBox?E({},h.getBBox()):{width:h.offsetWidth,height:h.offsetHeight},l?m.textShadow=l:n&&n("")}catch(H){}if(!c||0>c.width)c={width:0,height:0}}else c=this.htmlGetBBox();d.isSVG&&(d=c.width,e=c.height,Na&&k&&"11px"===k.fontSize&&"16.9"===e.toPrecision(3)&&(c.height=
e=14),f&&(c.width=ba(e*ra(g))+ba(d*la(g)),c.height=ba(e*la(g))+ba(d*ra(g))));if(v){for(;250<q.length;)delete p[q.shift()];p[v]||q.push(v);p[v]=c}}return c},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||150,complete:function(){b.attr({y:-9999})}})},add:function(a){var b=this.renderer,c=this.element,d;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;
void 0!==this.textStr&&b.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)d=this.zIndexSetter();d||(a?a.element:b.box).appendChild(c);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},c=a.shadows,d=a.renderer.isSVG&&"SPAN"===b.nodeName&&a.parentGroup,e,f;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;ab(a);a.clipPath&&(a.clipPath=a.clipPath.destroy());if(a.stops){for(f=
0;f<a.stops.length;f++)a.stops[f]=a.stops[f].destroy();a.stops=null}a.safeRemoveChild(b);for(c&&u(c,function(b){a.safeRemoveChild(b)});d&&d.div&&0===d.div.childNodes.length;)b=d.parentGroup,a.safeRemoveChild(d.div),delete d.div,d=b;a.alignTo&&ka(a.renderer.alignedObjects,a);for(e in a)delete a[e];return null},shadow:function(a,b,c){var d=[],e,f,g=this.element,h,k,l,m;if(a){k=t(a.width,3);l=(a.opacity||.15)/k;m=this.parentInverted?"(-1,-1)":"("+t(a.offsetX,1)+", "+t(a.offsetY,1)+")";for(e=1;e<=k;e++)f=
g.cloneNode(0),h=2*k+1-2*e,P(f,{isShadow:"true",stroke:a.color||"black","stroke-opacity":l*e,"stroke-width":h,transform:"translate"+m,fill:"none"}),c&&(P(f,"height",z(P(f,"height")-h,0)),f.cutHeight=h),b?b.element.appendChild(f):g.parentNode.insertBefore(f,g),d.push(f);this.shadows=d}return this},xGetter:function(a){"circle"===this.element.nodeName&&(a={x:"cx",y:"cy"}[a]||a);return this._defaultGetter(a)},_defaultGetter:function(a){a=t(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&
(a=parseFloat(a));return a},dSetter:function(a,b,c){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");c.setAttribute(b,a);this[b]=a},dashstyleSetter:function(a){var b,c=this["stroke-width"];"inherit"===c&&(c=1);if(a=a&&a.toLowerCase()){a=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(b=a.length;b--;)a[b]=
K(a[b])*c;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,b,c){this[b]=a;c.setAttribute(b,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=D.createElementNS(Va,"title"),this.element.appendChild(b));b.firstChild&&b.removeChild(b.firstChild);b.appendChild(D.createTextNode(String(t(a),"").replace(/<[^>]*>/g,
"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,b,c){"string"===typeof a?c.setAttribute(b,a):a&&this.colorGradient(a,b,c)},visibilitySetter:function(a,b,c){"inherit"===a?c.removeAttribute(b):c.setAttribute(b,a)},zIndexSetter:function(a,b){var c=this.renderer,d=this.parentGroup,c=(d||c).element||c.box,e,f,g=this.element,h;e=this.added;var k;r(a)&&(g.zIndex=a,a=+a,this[b]===a&&(e=!1),this[b]=a);if(e){(a=
this.zIndex)&&d&&(d.handleZ=!0);d=c.childNodes;for(k=0;k<d.length&&!h;k++)if(e=d[k],f=e.zIndex,e!==g&&(K(f)>a||!r(a)&&r(f)))c.insertBefore(g,e),h=!0;h||c.appendChild(g)}return h},_defaultSetter:function(a,b,c){c.setAttribute(b,a)}};S.prototype.yGetter=S.prototype.xGetter;S.prototype.translateXSetter=S.prototype.translateYSetter=S.prototype.rotationSetter=S.prototype.verticalAlignSetter=S.prototype.scaleXSetter=S.prototype.scaleYSetter=function(a,b){this[b]=a;this.doTransform=!0};S.prototype["stroke-widthSetter"]=
S.prototype.strokeSetter=function(a,b,c){this[b]=a;this.stroke&&this["stroke-width"]?(this.strokeWidth=this["stroke-width"],S.prototype.fillSetter.call(this,this.stroke,"stroke",c),c.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===b&&0===a&&this.hasStroke&&(c.removeAttribute("stroke"),this.hasStroke=!1)};var Ta=function(){this.init.apply(this,arguments)};Ta.prototype={Element:S,init:function(a,b,c,d,e,f){var g;d=this.createElement("svg").attr({version:"1.1"}).css(this.getStyle(d));
g=d.element;a.appendChild(g);-1===a.innerHTML.indexOf("xmlns")&&P(g,"xmlns",Va);this.isSVG=!0;this.box=g;this.boxWrapper=d;this.alignedObjects=[];this.url=($a||tb)&&D.getElementsByTagName("base").length?x.location.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(D.createTextNode("Created with Highcharts 4.2.5"));this.defs=this.createElement("defs").add();this.allowHTML=f;this.forExport=e;this.gradients={};this.cache=
{};this.cacheKeys=[];this.imgCount=0;this.setSize(b,c,!1);var h;$a&&a.getBoundingClientRect&&(this.subPixelFix=b=function(){N(a,{left:0,top:0});h=a.getBoundingClientRect();N(a,{left:Ka(h.left)-h.left+"px",top:Ka(h.top)-h.top+"px"})},b(),W(x,"resize",b))},getStyle:function(a){return this.style=E({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=
null;this.boxWrapper=this.boxWrapper.destroy();Ja(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.subPixelFix&&ma(x,"resize",this.subPixelFix);return this.alignedObjects=null},createElement:function(a){var b=new this.Element;b.init(this,a);return b},draw:function(){},getRadialAttr:function(a,b){return{cx:a[0]-a[2]/2+b.cx*a[2],cy:a[1]-a[2]/2+b.cy*a[2],r:b.r*a[2]}},buildText:function(a){for(var b=a.element,c=this,d=c.forExport,e=t(a.textStr,"").toString(),f=-1!==e.indexOf("<"),
g=b.childNodes,h,k,l,m=P(b,"x"),n=a.styles,p=a.textWidth,q=n&&n.lineHeight,v=n&&n.textShadow,H=n&&"ellipsis"===n.textOverflow,w=g.length,na=p&&!a.added&&this.box,J=function(a){return q?K(q):c.fontMetrics(/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:n&&n.fontSize||c.style.fontSize||12,a).h};w--;)b.removeChild(g[w]);f||v||H||-1!==e.indexOf(" ")?(h=/<.*style="([^"]+)".*>/,k=/<.*href="(http[^"]+)".*>/,na&&na.appendChild(b),e=f?e.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,
'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g):[e],e=Ra(e,function(a){return""!==a}),u(e,function(e,f){var g,q=0;e=e.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");g=e.split("|||");u(g,function(e){if(""!==e||1===g.length){var v={},w=D.createElementNS(Va,"tspan"),t;h.test(e)&&(t=e.match(h)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),P(w,"style",t));k.test(e)&&!d&&(P(w,"onclick",'location.href="'+
e.match(k)[1]+'"'),N(w,{cursor:"pointer"}));e=(e.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">");if(" "!==e){w.appendChild(D.createTextNode(e));q?v.dx=0:f&&null!==m&&(v.x=m);P(w,v);b.appendChild(w);!q&&f&&(!ta&&d&&N(w,{display:"block"}),P(w,"dy",J(w)));if(p){for(var v=e.replace(/([^\^])-/g,"$1- ").split(" "),u=1<g.length||f||1<v.length&&"nowrap"!==n.whiteSpace,na,A,r=[],z=J(w),y=1,B=a.rotation,C=e,E=C.length;(u||H)&&(v.length||r.length);)a.rotation=0,na=a.getBBox(!0),A=na.width,
!ta&&c.forExport&&(A=c.measureSpanWidth(w.firstChild.data,a.styles)),na=A>p,void 0===l&&(l=na),H&&l?(E/=2,""===C||!na&&.5>E?v=[]:(C=e.substring(0,C.length+(na?-1:1)*Ka(E)),v=[C+(3<p?"\u2026":"")],w.removeChild(w.firstChild))):na&&1!==v.length?(w.removeChild(w.firstChild),r.unshift(v.pop())):(v=r,r=[],v.length&&(y++,w=D.createElementNS(Va,"tspan"),P(w,{dy:z,x:m}),t&&P(w,"style",t),b.appendChild(w)),A>p&&(p=A)),v.length&&w.appendChild(D.createTextNode(v.join(" ").replace(/- /g,"-")));a.rotation=B}q++}}})}),
l&&a.attr("title",a.textStr),na&&na.removeChild(b),v&&a.applyTextShadow&&a.applyTextShadow(v)):b.appendChild(D.createTextNode(e.replace(/&lt;/g,"<").replace(/&gt;/g,">")))},getContrast:function(a){a=R(a).rgba;return 384<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,b,c,d,e,f,g,h,k){var l=this.label(a,b,c,k,null,null,null,null,"button"),m=0,n,p,q,v,H,w;a={x1:0,y1:0,x2:0,y2:1};e=F({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:a,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},
e);q=e.style;delete e.style;f=F(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#FFF"],[1,"#ACF"]]}},f);v=f.style;delete f.style;g=F(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#9BD"],[1,"#CDF"]]}},g);H=g.style;delete g.style;h=F(e,{style:{color:"#CCC"}},h);w=h.style;delete h.style;W(l.element,Na?"mouseover":"mouseenter",function(){3!==m&&l.attr(f).css(v)});W(l.element,Na?"mouseout":"mouseleave",function(){3!==m&&(n=[e,f,g][m],p=[q,v,H][m],l.attr(n).css(p))});l.setState=function(a){(l.state=
m=a)?2===a?l.attr(g).css(H):3===a&&l.attr(h).css(w):l.attr(e).css(q)};return l.on("click",function(a){3!==m&&d.call(l,a)}).attr(e).css(E({cursor:"default"},q))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=M(a[1])-b%2/2);a[2]===a[5]&&(a[2]=a[5]=M(a[2])+b%2/2);return a},path:function(a){var b={fill:"none"};oa(a)?b.d=a:aa(a)&&E(b,a);return this.createElement("path").attr(b)},circle:function(a,b,c){a=aa(a)?a:{x:a,y:b,r:c};b=this.createElement("circle");b.xSetter=b.ySetter=function(a,b,c){c.setAttribute("c"+
b,a)};return b.attr(a)},arc:function(a,b,c,d,e,f){aa(a)&&(b=a.y,c=a.r,d=a.innerR,e=a.start,f=a.end,a=a.x);a=this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e||0,end:f||0});a.r=c;return a},rect:function(a,b,c,d,e,f){e=aa(a)?a.r:e;var g=this.createElement("rect");a=aa(a)?a:a===I?{}:{x:a,y:b,width:z(c,0),height:z(d,0)};f!==I&&(g.strokeWidth=f,a=g.crisp(a));e&&(a.r=e);g.rSetter=function(a,b,c){P(c,{rx:a,ry:a})};return g.attr(a)},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=
a;this.height=b;for(this.boxWrapper[t(c,!0)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return r(a)?b.attr({"class":"highcharts-"+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:"none"};1<arguments.length&&E(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,
b,c,d,e,f){var g=this,h,k=this.symbols[a],k=k&&k(M(b),M(c),d,e,f),l=/^url\((.*?)\)$/,m,n;k?(h=this.path(k),E(h,{symbolName:a,x:b,y:c,width:d,height:e}),f&&E(h,f)):l.test(a)&&(n=function(a,b){a.element&&(a.attr({width:b[0],height:b[1]}),a.alignByTranslate||a.translate(M((d-b[0])/2),M((e-b[1])/2)))},m=a.match(l)[1],a=Qb[m]||f&&f.width&&f.height&&[f.width,f.height],h=this.image(m).attr({x:b,y:c}),h.isImg=!0,a?n(h,a):(h.attr({width:0,height:0}),Y("img",{onload:function(){0===this.width&&(N(this,{position:"absolute",
top:"-999em"}),D.body.appendChild(this));n(h,Qb[m]=[this.width,this.height]);this.parentNode&&this.parentNode.removeChild(this);g.imgCount--;if(!g.imgCount&&fa[g.chartIndex].onload)fa[g.chartIndex].onload()},src:m}),this.imgCount++));return h},symbols:{circle:function(a,b,c,d){var e=.166*c;return["M",a+c/2,b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d,"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d,
a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start;c=e.r||c||d;var g=e.end-.001;d=e.innerR;var h=e.open,k=la(f),l=ra(f),m=la(g),g=ra(g);e=e.end-f<Ga?0:1;return["M",a+c*k,b+c*l,"A",c,c,0,e,1,a+c*m,b+c*g,h?"M":"L",a+d*m,b+d*g,"A",d,d,0,e,0,a+d*k,b+d*l,h?"":"Z"]},callout:function(a,b,c,d,e){var f=Q(e&&e.r||0,c,d),g=f+6,h=e&&e.anchorX;e=e&&e.anchorY;
var k;k=["M",a+f,b,"L",a+c-f,b,"C",a+c,b,a+c,b,a+c,b+f,"L",a+c,b+d-f,"C",a+c,b+d,a+c,b+d,a+c-f,b+d,"L",a+f,b+d,"C",a,b+d,a,b+d,a,b+d-f,"L",a,b+f,"C",a,b,a,b,a+f,b];h&&h>c&&e>b+g&&e<b+d-g?k.splice(13,3,"L",a+c,e-6,a+c+6,e,a+c,e+6,a+c,b+d-f):h&&0>h&&e>b+g&&e<b+d-g?k.splice(33,3,"L",a,e+6,a-6,e,a,e-6,a,b+f):e&&e>d&&h>a+g&&h<a+c-g?k.splice(23,3,"L",h+6,b+d,h,b+d+6,h-6,b+d,a+f,b+d):e&&0>e&&h>a+g&&h<a+c-g&&k.splice(3,3,"L",h-6,b,h,b-6,h+6,b,c-f,b);return k}},clipRect:function(a,b,c,d){var e="highcharts-"+
Cb++,f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=this.rect(a,b,c,d,0).add(f);a.id=e;a.clipPath=f;a.count=0;return a},text:function(a,b,c,d){var e=ya||!ta&&this.forExport,f={};if(d&&(this.allowHTML||!this.forExport))return this.html(a,b,c);f.x=Math.round(b||0);c&&(f.y=Math.round(c));if(a||0===a)f.text=a;a=this.createElement("text").attr(f);e&&a.css({position:"absolute"});d||(a.xSetter=function(a,b,c){var d=c.getElementsByTagName("tspan"),e,f=c.getAttribute(b),p;for(p=0;p<d.length;p++)e=
d[p],e.getAttribute(b)===f&&e.setAttribute(b,a);c.setAttribute(b,a)});return a},fontMetrics:function(a,b){var c,d;a=a||this.style.fontSize;!a&&b&&x.getComputedStyle&&(b=b.element||b,a=(c=x.getComputedStyle(b,""))&&c.fontSize);a=/px/.test(a)?K(a):/em/.test(a)?12*parseFloat(a):12;c=24>a?a+3:M(1.2*a);d=M(.8*c);return{h:c,b:d,f:a}},rotCorr:function(a,b,c){var d=a;b&&c&&(d=z(d*la(b*xa),4));return{x:-a/3*ra(b*xa),y:d}},label:function(a,b,c,d,e,f,g,h,k){var l=this,m=l.g(k),n=l.text("",0,0,g).attr({zIndex:1}),
p,q,v=0,H=3,w=0,t,J,A,Eb,z=0,pa={},y,C,B,x,G;B=function(){var a,b;a=n.element.style;q=(void 0===t||void 0===J||m.styles.textAlign)&&r(n.textStr)&&n.getBBox();m.width=(t||q.width||0)+2*H+w;m.height=(J||q.height||0)+2*H;y=H+l.fontMetrics(a&&a.fontSize,n).b;C&&(p||(a=z,b=(h?-y:0)+z,m.box=p=d?l.symbol(d,a,b,m.width,m.height,pa):l.rect(a,b,m.width,m.height,0,pa["stroke-width"]),p.isImg||p.attr("fill","none"),p.add(m)),p.isImg||p.attr(E({width:M(m.width),height:M(m.height)},pa)),pa=null)};x=function(){var a=
m.styles,a=a&&a.textAlign,b=w+H,c;c=h?0:y;r(t)&&q&&("center"===a||"right"===a)&&(b+={center:.5,right:1}[a]*(t-q.width));if(b!==n.x||c!==n.y)n.attr("x",b),c!==I&&n.attr("y",c);n.x=b;n.y=c};G=function(a,b){p?p.attr(a,b):pa[a]=b};m.onAdd=function(){n.add(m);m.attr({text:a||0===a?a:"",x:b,y:c});p&&r(e)&&m.attr({anchorX:e,anchorY:f})};m.widthSetter=function(a){t=a};m.heightSetter=function(a){J=a};m.paddingSetter=function(a){r(a)&&a!==H&&(H=m.padding=a,x())};m.paddingLeftSetter=function(a){r(a)&&a!==w&&
(w=a,x())};m.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==v&&(v=a,q&&m.attr({x:A}))};m.textSetter=function(a){a!==I&&n.textSetter(a);B();x()};m["stroke-widthSetter"]=function(a,b){a&&(C=!0);z=a%2/2;G(b,a)};m.strokeSetter=m.fillSetter=m.rSetter=function(a,b){"fill"===b&&a&&(C=!0);G(b,a)};m.anchorXSetter=function(a,b){e=a;G(b,M(a)-z-A)};m.anchorYSetter=function(a,b){f=a;G(b,a-Eb)};m.xSetter=function(a){m.x=a;v&&(a-=v*((t||q.width)+2*H));A=M(a);m.attr("translateX",A)};m.ySetter=function(a){Eb=
m.y=M(a);m.attr("translateY",Eb)};var D=m.css;return E(m,{css:function(a){if(a){var b={};a=F(a);u(m.textProps,function(c){a[c]!==I&&(b[c]=a[c],delete a[c])});n.css(b)}return D.call(m,a)},getBBox:function(){return{width:q.width+2*H,height:q.height+2*H,x:q.x-H,y:q.y-H}},shadow:function(a){p&&p.shadow(a);return m},destroy:function(){ma(m.element,"mouseenter");ma(m.element,"mouseleave");n&&(n=n.destroy());p&&(p=p.destroy());S.prototype.destroy.call(m);m=l=B=x=G=null}})}};kb=Ta;E(S.prototype,{htmlCss:function(a){var b=
this.element;if(b=a&&"SPAN"===b.tagName&&a.width)delete a.width,this.textWidth=b,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=E(this.styles,a);N(this.element,a);return this},htmlGetBBox:function(){var a=this.element;"text"===a.nodeName&&(a.style.position="absolute");return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.translateX||
0,d=this.translateY||0,e=this.x||0,f=this.y||0,g=this.textAlign||"left",h={left:0,center:.5,right:1}[g],k=this.shadows,l=this.styles;N(b,{marginLeft:c,marginTop:d});k&&u(k,function(a){N(a,{marginLeft:c+1,marginTop:d+1})});this.inverted&&u(b.childNodes,function(c){a.invertChild(c,b)});if("SPAN"===b.tagName){var k=this.rotation,m=K(this.textWidth),n=l&&l.whiteSpace,p=[k,g,b.innerHTML,this.textWidth,this.textAlign].join();p!==this.cTT&&(l=a.fontMetrics(b.style.fontSize).b,r(k)&&this.setSpanRotation(k,
h,l),b.offsetWidth>m&&/[ \-]/.test(b.textContent||b.innerText)?(N(b,{width:m+"px",display:"block",whiteSpace:n||"normal"}),this.hasTextWidth=!0):this.hasTextWidth&&(N(b,{width:"",display:"",whiteSpace:n||"nowrap"}),this.hasTextWidth=!1),this.getSpanCorrection(this.hasTextWidth?m:b.offsetWidth,l,h,k,g));N(b,{left:e+(this.xCorr||0)+"px",top:f+(this.yCorr||0)+"px"});tb&&(l=b.offsetHeight);this.cTT=p}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,c){var d={},e=Na?"-ms-transform":tb?"-webkit-transform":
$a?"MozTransform":Ob?"-o-transform":"";d[e]=d.transform="rotate("+a+"deg)";d[e+($a?"Origin":"-origin")]=d.transformOrigin=100*b+"% "+c+"px";N(this.element,d)},getSpanCorrection:function(a,b,c){this.xCorr=-a*c;this.yCorr=-b}});E(Ta.prototype,{html:function(a,b,c){var d=this.createElement("span"),e=d.element,f=d.renderer,g=f.isSVG,h=function(a,b){u(["opacity","visibility"],function(c){nb(a,c+"Setter",function(a,c,d,e){a.call(this,c,d,e);b[d]=c})})};d.textSetter=function(a){a!==e.innerHTML&&delete this.bBox;
e.innerHTML=this.textStr=a;d.htmlUpdateTransform()};g&&h(d,d.element.style);d.xSetter=d.ySetter=d.alignSetter=d.rotationSetter=function(a,b){"align"===b&&(b="textAlign");d[b]=a;d.htmlUpdateTransform()};d.attr({text:a,x:M(b),y:M(c)}).css({position:"absolute",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});e.style.whiteSpace="nowrap";d.css=d.htmlCss;g&&(d.add=function(a){var b,c=f.box.parentNode,g=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)g.push(a),a=a.parentGroup;u(g.reverse(),
function(a){var d,e=P(a.element,"class");e&&(e={className:e});b=a.div=a.div||Y(Za,e,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",opacity:a.opacity},b||c);d=b.style;E(a,{translateXSetter:function(b,c){d.left=b+"px";a[c]=b;a.doTransform=!0},translateYSetter:function(b,c){d.top=b+"px";a[c]=b;a.doTransform=!0}});h(a,d)})}}else b=c;b.appendChild(e);d.added=!0;d.alignOnAdd&&d.htmlUpdateTransform();return d});return d}});var da;if(!ta&&!ya){da={init:function(a,b){var c=["<",
b,' filled="f" stroked="f"'],d=["position: ","absolute",";"],e=b===Za;("shape"===b||e)&&d.push("left:0;top:0;width:1px;height:1px;");d.push("visibility: ",e?"hidden":"visible");c.push(' style="',d.join(""),'"/>');b&&(c=e||"span"===b||"img"===b?c.join(""):a.prepVML(c),this.element=Y(c));this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box,e=a&&a.inverted,d=a?a.element||a:d;a&&(this.parentGroup=a);e&&b.invertChild(c,d);d.appendChild(c);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&
this.updateTransform();if(this.onAdd)this.onAdd();return this},updateTransform:S.prototype.htmlUpdateTransform,setSpanRotation:function(){var a=this.rotation,b=la(a*xa),c=ra(a*xa);N(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11=",b,", M12=",-c,", M21=",c,", M22=",b,", sizingMethod='auto expand')"].join(""):"none"})},getSpanCorrection:function(a,b,c,d,e){var f=d?la(d*xa):1,g=d?ra(d*xa):0,h=t(this.elemHeight,this.element.offsetHeight),k;this.xCorr=0>f&&-a;this.yCorr=0>g&&-h;
k=0>f*g;this.xCorr+=g*b*(k?1-c:c);this.yCorr-=f*b*(d?k?c:1-c:1);e&&"left"!==e&&(this.xCorr-=a*c*(0>f?-1:1),d&&(this.yCorr-=h*c*(0>g?-1:1)),N(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)X(a[b])?c[b]=M(10*a[b])-5:"Z"===a[b]?c[b]="x":(c[b]=a[b],!a.isArc||"wa"!==a[b]&&"at"!==a[b])||(c[b+5]===c[b+7]&&(c[b+7]+=a[b+7]>a[b+5]?1:-1),c[b+6]===c[b+8]&&(c[b+8]+=a[b+8]>a[b+6]?1:-1));return c.join(" ")||"x"},clip:function(a){var b=this,c;a?(c=a.members,ka(c,b),c.push(b),b.destroyClip=
function(){ka(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:sb?"inherit":"rect(auto)"});return b.css(a)},css:S.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Ba(a)},destroy:function(){this.destroyClip&&this.destroyClip();return S.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=x.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var c;a=a.split(/[ ,]/);c=a.length;if(9===c||11===c)a[c-4]=a[c-2]=K(a[c-2])-10*b;return a.join(" ")},
shadow:function(a,b,c){var d=[],e,f=this.element,g=this.renderer,h,k=f.style,l,m=f.path,n,p,q,v;m&&"string"!==typeof m.value&&(m="x");p=m;if(a){q=t(a.width,3);v=(a.opacity||.15)/q;for(e=1;3>=e;e++)n=2*q+1-2*e,c&&(p=this.cutOffPath(m.value,n+.5)),l=['<shape isShadow="true" strokeweight="',n,'" filled="false" path="',p,'" coordsize="10 10" style="',f.style.cssText,'" />'],h=Y(g.prepVML(l),null,{left:K(k.left)+t(a.offsetX,1),top:K(k.top)+t(a.offsetY,1)}),c&&(h.cutOff=n+1),l=['<stroke color="',a.color||
"black",'" opacity="',v*e,'"/>'],Y(g.prepVML(l),null,null,h),b?b.element.appendChild(h):f.parentNode.insertBefore(h,f),d.push(h);this.shadows=d}return this},updateShadows:Qa,setAttr:function(a,b){sb?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){this.element.className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||Y(this.renderer.prepVML(["<stroke/>"]),null,null,c))[b]=a||"solid";this[b]=a},dSetter:function(a,b,c){var d=this.shadows;a=a||[];this.d=
a.join&&a.join(" ");c.path=a=this.pathToVML(a);if(d)for(c=d.length;c--;)d[c].path=d[c].cutOff?this.cutOffPath(a,d[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var d=c.nodeName;"SPAN"===d?c.style.color=a:"IMG"!==d&&(c.filled="none"!==a,this.setAttr("fillcolor",this.renderer.color(a,c,b,this)))},"fill-opacitySetter":function(a,b,c){Y(this.renderer.prepVML(["<",b.split("-")[0],' opacity="',a,'"/>']),null,null,c)},opacitySetter:Qa,rotationSetter:function(a,b,c){c=c.style;this[b]=c[b]=a;
c.left=-M(ra(a*xa)+1)+"px";c.top=M(la(a*xa))+"px"},strokeSetter:function(a,b,c){this.setAttr("strokecolor",this.renderer.color(a,c,b,this))},"stroke-widthSetter":function(a,b,c){c.stroked=!!a;this[b]=a;X(a)&&(a+="px");this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,c){"inherit"===a&&(a="visible");this.shadows&&u(this.shadows,function(c){c.style[b]=a});"DIV"===c.nodeName&&(a="hidden"===a?"-999em":0,sb||(c.style[b]=a?"visible":"hidden"),b="top");
c.style[b]=a},xSetter:function(a,b,c){this[b]=a;"x"===b?b="left":"y"===b&&(b="top");this.updateClipping?(this[b]=a,this.updateClipping()):c.style[b]=a},zIndexSetter:function(a,b,c){c.style[b]=a}};da["stroke-opacitySetter"]=da["fill-opacitySetter"];L.VMLElement=da=ia(S,da);da.prototype.ySetter=da.prototype.widthSetter=da.prototype.heightSetter=da.prototype.xSetter;var Fb={Element:da,isIE8:-1<Pa.indexOf("MSIE 8.0"),init:function(a,b,c,d){var e;this.alignedObjects=[];d=this.createElement(Za).css(E(this.getStyle(d),
{position:"relative"}));e=d.element;a.appendChild(d.element);this.isVML=!0;this.box=e;this.boxWrapper=d;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(b,c,!1);if(!D.namespaces.hcv){D.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{D.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(f){D.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},
isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,d){var e=this.createElement(),f=aa(a);return E(e,{members:[],count:0,left:(f?a.x:a)+1,top:(f?a.y:b)+1,width:(f?a.width:c)-1,height:(f?a.height:d)-1,getCSS:function(a){var b=a.element,c=b.nodeName;a=a.inverted;var d=this.top-("shape"===c?b.offsetTop:0),e=this.left,b=e+this.width,f=d+this.height,d={clip:"rect("+M(a?e:d)+"px,"+M(a?f:b)+"px,"+M(a?b:f)+"px,"+M(a?d:e)+"px)"};!a&&sb&&"DIV"===c&&E(d,{width:b+"px",height:f+"px"});return d},
updateClipping:function(){u(e.members,function(a){a.element&&a.css(e.getCSS(a))})}})},color:function(a,b,c,d){var e=this,f,g=/^rgba/,h,k,l="none";a&&a.linearGradient?k="gradient":a&&a.radialGradient&&(k="pattern");if(k){var m,n,p=a.linearGradient||a.radialGradient,q,v,H,w,t,J="";a=a.stops;var A,r=[],z=function(){h=['<fill colors="'+r.join(",")+'" opacity="',H,'" o:opacity2="',v,'" type="',k,'" ',J,'focus="100%" method="any" />'];Y(e.prepVML(h),null,null,b)};q=a[0];A=a[a.length-1];0<q[0]&&a.unshift([0,
q[1]]);1>A[0]&&a.push([1,A[1]]);u(a,function(a,b){g.test(a[1])?(f=R(a[1]),m=f.get("rgb"),n=f.get("a")):(m=a[1],n=1);r.push(100*a[0]+"% "+m);b?(H=n,w=m):(v=n,t=m)});if("fill"===c)if("gradient"===k)c=p.x1||p[0]||0,a=p.y1||p[1]||0,q=p.x2||p[2]||0,p=p.y2||p[3]||0,J='angle="'+(90-180*ha.atan((p-a)/(q-c))/Ga)+'"',z();else{var l=p.r,pa=2*l,y=2*l,C=p.cx,B=p.cy,x=b.radialReference,E,l=function(){x&&(E=d.getBBox(),C+=(x[0]-E.x)/E.width-.5,B+=(x[1]-E.y)/E.height-.5,pa*=x[2]/E.width,y*=x[2]/E.height);J='src="'+
ga.global.VMLRadialGradientURL+'" size="'+pa+","+y+'" origin="0.5,0.5" position="'+C+","+B+'" color2="'+t+'" ';z()};d.added?l():d.onAdd=l;l=w}else l=m}else g.test(a)&&"IMG"!==b.tagName?(f=R(a),d[c+"-opacitySetter"](f.get("a"),c,b),l=f.get("rgb")):(l=b.getElementsByTagName(c),l.length&&(l[0].opacity=1,l[0].type="solid"),l=a);return l},prepVML:function(a){var b=this.isIE8;a=a.join("");b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=-1===a.indexOf('style="')?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):
a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","<hcv:");return a},text:Ta.prototype.html,path:function(a){var b={coordsize:"10 10"};oa(a)?b.d=a:aa(a)&&E(b,a);return this.createElement("shape").attr(b)},circle:function(a,b,c){var d=this.symbol("circle");aa(a)&&(c=a.r,b=a.y,a=a.x);d.isCircle=!0;d.r=c;return d.attr({x:a,y:b})},g:function(a){var b;a&&(b={className:"highcharts-"+a,"class":"highcharts-"+a});return this.createElement(Za).attr(b)},image:function(a,
b,c,d,e){var f=this.createElement("img").attr({src:a});1<arguments.length&&f.attr({x:b,y:c,width:d,height:e});return f},createElement:function(a){return"rect"===a?this.symbol(a):Ta.prototype.createElement.call(this,a)},invertChild:function(a,b){var c=this,d=b.style,e="IMG"===a.tagName&&a.style;N(a,{flip:"x",left:K(d.width)-(e?K(e.top):1),top:K(d.height)-(e?K(e.left):1),rotation:-90});u(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||
d;c=e.innerR;d=la(f);var k=ra(f),l=la(g),m=ra(g);if(0===g-f)return["x"];f=["wa",a-h,b-h,a+h,b+h,a+h*d,b+h*k,a+h*l,b+h*m];e.open&&!c&&f.push("e","M",a,b);f.push("at",a-c,b-c,a+c,b+c,a+c*l,b+c*m,a+c*d,b+c*k,"x","e");f.isArc=!0;return f},circle:function(a,b,c,d,e){e&&(c=d=2*e.r);e&&e.isCircle&&(a-=c/2,b-=d/2);return["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){return Ta.prototype.symbols[r(e)&&e.r?"callout":"square"].call(0,a,b,c,d,e)}}};L.VMLRenderer=da=function(){this.init.apply(this,
arguments)};da.prototype=F(Ta.prototype,Fb);kb=da}Ta.prototype.measureSpanWidth=function(a,b){var c=D.createElement("span"),d;d=D.createTextNode(a);c.appendChild(d);N(c,b);this.box.appendChild(c);d=c.offsetWidth;Ba(c);return d};var Rb;ya&&(L.CanVGRenderer=da=function(){Va="http://www.w3.org/1999/xhtml"},da.prototype.symbols={},Rb=function(){function a(){var a=b.length,d;for(d=0;d<a;d++)b[d]();b=[]}var b=[];return{push:function(c,d){if(0===b.length){var e=D.getElementsByTagName("head")[0],f=D.createElement("script");
f.type="text/javascript";f.src=d;f.onload=a;e.appendChild(f)}b.push(c)}}}(),kb=da);ea.prototype={addLabel:function(){var a=this.axis,b=a.options,c=a.chart,d=a.categories,e=a.names,f=this.pos,g=b.labels,h=a.tickPositions,k=f===h[0],l=f===h[h.length-1],e=d?t(d[f],e[f],f):f,d=this.label,h=h.info,m;a.isDatetimeAxis&&h&&(m=b.dateTimeLabelFormats[h.higherRanks[f]||h.unitName]);this.isFirst=k;this.isLast=l;b=a.labelFormatter.call({axis:a,chart:c,isFirst:k,isLast:l,dateTimeLabelFormat:m,value:a.isLog?C(a.lin2log(e)):
e});r(d)?d&&d.attr({text:b}):(this.labelLength=(this.label=d=r(b)&&g.enabled?c.renderer.text(b,0,0,g.useHTML).css(F(g.style)).add(a.labelGroup):null)&&d.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var b=this.axis,c=a.x,d=b.chart.chartWidth,e=b.chart.spacing,f=t(b.labelLeft,Q(b.pos,e[3])),e=t(b.labelRight,z(b.pos+b.len,d-e[1])),g=this.label,h=this.rotation,k={left:0,center:.5,right:1}[b.labelAlign],
l=g.getBBox().width,m=b.getSlotWidth(),n=m,p=1,q,v={};if(h)0>h&&c-k*l<f?q=M(c/la(h*xa)-f):0<h&&c+k*l>e&&(q=M((d-c)/la(h*xa)));else if(d=c+(1-k)*l,c-k*l<f?n=a.x+n*(1-k)-f:d>e&&(n=e-a.x+n*k,p=-1),n=Q(m,n),n<m&&"center"===b.labelAlign&&(a.x+=p*(m-n-k*(m-Q(l,n)))),l>n||b.autoRotation&&g.styles.width)q=n;q&&(v.width=q,b.options.labels.style.textOverflow||(v.textOverflow="ellipsis"),g.css(v))},getPosition:function(a,b,c,d){var e=this.axis,f=e.chart,g=d&&f.oldChartHeight||f.chartHeight;return{x:a?e.translate(b+
c,null,null,d)+e.transB:e.left+e.offset+(e.opposite?(d&&f.oldChartWidth||f.chartWidth)-e.right-e.left:0),y:a?g-e.bottom+e.offset-(e.opposite?e.height:0):g-e.translate(b+c,null,null,d)-e.transB}},getLabelPosition:function(a,b,c,d,e,f,g,h){var k=this.axis,l=k.transA,m=k.reversed,n=k.staggerLines,p=k.tickRotCorr||{x:0,y:0},q=e.y;r(q)||(q=0===k.side?c.rotation?-8:-c.getBBox().height:2===k.side?p.y+8:la(c.rotation*xa)*(p.y-c.getBBox(!1,0).height/2));a=a+e.x+p.x-(f&&d?f*l*(m?-1:1):0);b=b+q-(f&&!d?f*l*(m?
1:-1):0);n&&(c=g/(h||1)%n,k.opposite&&(c=n-c-1),b+=k.labelOffset/n*c);return{x:a,y:M(b)}},getMarkPath:function(a,b,c,d,e,f){return f.crispLine(["M",a,b,"L",a+(e?0:-c),b+(e?c:0)],d)},render:function(a,b,c){var d=this.axis,e=d.options,f=d.chart.renderer,g=d.horiz,h=this.type,k=this.label,l=this.pos,m=e.labels,n=this.gridLine,p=h?h+"Grid":"grid",q=h?h+"Tick":"tick",v=e[p+"LineWidth"],H=e[p+"LineColor"],w=e[p+"LineDashStyle"],p=d.tickSize(q),q=e[q+"Color"],u=this.mark,J=m.step,A=!0,r=d.tickmarkOffset,
z=this.getPosition(g,l,r,b),pa=z.x,z=z.y,y=g&&pa===d.pos+d.len||!g&&z===d.pos?-1:1;c=t(c,1);this.isActive=!0;if(v&&(l=d.getPlotLinePath(l+r,v*y,b,!0),n===I&&(n={stroke:H,"stroke-width":v},w&&(n.dashstyle=w),h||(n.zIndex=1),b&&(n.opacity=0),this.gridLine=n=v?f.path(l).attr(n).add(d.gridGroup):null),!b&&n&&l))n[this.isNew?"attr":"animate"]({d:l,opacity:c});p&&(d.opposite&&(p[0]=-p[0]),h=this.getMarkPath(pa,z,p[0],p[1]*y,g,f),u?u.animate({d:h,opacity:c}):this.mark=f.path(h).attr({stroke:q,"stroke-width":p[1],
opacity:c}).add(d.axisGroup));k&&X(pa)&&(k.xy=z=this.getLabelPosition(pa,z,k,g,m,r,a,J),this.isFirst&&!this.isLast&&!t(e.showFirstLabel,1)||this.isLast&&!this.isFirst&&!t(e.showLastLabel,1)?A=!1:!g||d.isRadial||m.step||m.rotation||b||0===c||this.handleOverflow(z),J&&a%J&&(A=!1),A&&X(z.y)?(z.opacity=c,k[this.isNew?"attr":"animate"](z),this.isNew=!1):k.attr("y",-9999))},destroy:function(){Ja(this,this.axis)}};L.PlotLineOrBand=function(a,b){this.axis=a;b&&(this.options=b,this.id=b.id)};L.PlotLineOrBand.prototype=
{render:function(){var a=this,b=a.axis,c=b.horiz,d=a.options,e=d.label,f=a.label,g=d.width,h=d.to,k=d.from,l=r(k)&&r(h),m=d.value,n=d.dashStyle,p=a.svgElem,q=[],v,H=d.color,w=t(d.zIndex,0),u=d.events,J={},A=b.chart.renderer,q=b.log2lin;b.isLog&&(k=q(k),h=q(h),m=q(m));if(g){if(q=b.getPlotLinePath(m,g),J={stroke:H,"stroke-width":g},n)J.dashstyle=n}else if(l)q=b.getPlotBandPath(k,h,d),H&&(J.fill=H),d.borderWidth&&(J.stroke=d.borderColor,J["stroke-width"]=d.borderWidth);else return;J.zIndex=w;if(p)if(q)p.show(),
p.animate({d:q});else{if(p.hide(),f)a.label=f=f.destroy()}else if(q&&q.length&&(a.svgElem=p=A.path(q).attr(J).add(),u))for(v in d=function(b){p.on(b,function(c){u[b].apply(a,[c])})},u)d(v);e&&r(e.text)&&q&&q.length&&0<b.width&&0<b.height&&!q.flat?(e=F({align:c&&l&&"center",x:c?!l&&4:10,verticalAlign:!c&&l&&"middle",y:c?l?16:10:l?6:-4,rotation:c&&!l&&90},e),this.renderLabel(e,q,l,w)):f&&f.hide();return a},renderLabel:function(a,b,c,d){var e=this.label,f=this.axis.chart.renderer;e||(e={align:a.textAlign||
a.align,rotation:a.rotation},e.zIndex=d,this.label=e=f.text(a.text,0,0,a.useHTML).attr(e).css(a.style).add());d=[b[1],b[4],c?b[6]:b[1]];b=[b[2],b[5],c?b[7]:b[2]];c=G(d);f=G(b);e.align(a,!1,{x:c,y:f,width:Ua(d)-c,height:Ua(b)-f});e.show()},destroy:function(){ka(this.axis.plotLinesAndBands,this);delete this.axis;Ja(this)}};var va=L.Axis=function(){this.init.apply(this,arguments)};va.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",
day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#D8D8D8",labels:{enabled:!0,style:{color:"#606060",cursor:"default",fontSize:"11px"},x:0},lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",
style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return L.numberFormat(this.total,-1)},style:F(sa.line.dataLabels.style,{color:"#000000"})}},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],
x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,b){var c=b.isX;this.chart=a;this.horiz=a.inverted?!c:c;this.coll=(this.isXAxis=c)?"xAxis":"yAxis";this.opposite=b.opposite;this.side=b.side||(this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(b);var d=this.options,e=d.type;this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter;this.userOptions=b;this.minPixelPadding=0;this.reversed=d.reversed;this.visible=!1!==
d.visible;this.zoomEnabled=!1!==d.zoomEnabled;this.categories=d.categories||"category"===e;this.names=this.names||[];this.isLog="logarithmic"===e;this.isDatetimeAxis="datetime"===e;this.isLinked=r(d.linkedTo);this.ticks={};this.labelEdge=[];this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;this.range=d.range;this.offset=d.offset||0;this.stacks={};this.oldStacks={};this.stacksTouched=0;this.min=this.max=null;this.crosshair=
t(d.crosshair,V(a.options.tooltip.crosshairs)[c?0:1],!1);var f,d=this.options.events;-1===Ha(this,a.axes)&&(c&&!this.isColorAxis?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this));this.series=this.series||[];a.inverted&&c&&this.reversed===I&&(this.reversed=!0);this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(f in d)W(this,f,d[f]);this.isLog&&(this.val2lin=this.log2lin,this.lin2val=this.lin2log)},setOptions:function(a){this.options=F(this.defaultOptions,
this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],F(ga[this.coll],a))},defaultLabelFormatter:function(){var a=this.axis,b=this.value,c=a.categories,d=this.dateTimeLabelFormat,e=ga.lang.numericSymbols,f=e&&e.length,g,h=a.options.labels.format,a=a.isLog?b:a.tickInterval;if(h)g=Fa(h,this);else if(c)g=b;else if(d)g=bb(d,b);else if(f&&1E3<=a)for(;f--&&g===I;)c=Math.pow(1E3,f+1),a>=c&&0===
10*b%c&&null!==e[f]&&(g=L.numberFormat(b/c,-1)+e[f]);g===I&&(g=1E4<=ba(b)?L.numberFormat(b,-1):L.numberFormat(b,-1,I,""));return g},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();u(a.series,function(c){if(c.visible||!b.options.chart.ignoreHiddenSeries){var d=c.options,e=d.threshold,f;a.hasVisibleSeries=!0;a.isLog&&0>=e&&(e=null);if(a.isXAxis){if(d=c.xData,d.length)c=G(d),!(X(c)||
c instanceof Ca)&&(d=Ra(d,function(a){return X(a)}),c=G(d)),a.dataMin=Q(t(a.dataMin,d[0]),c),a.dataMax=z(t(a.dataMax,d[0]),Ua(d))}else if(c.getExtremes(),f=c.dataMax,c=c.dataMin,r(c)&&r(f)&&(a.dataMin=Q(t(a.dataMin,c),c),a.dataMax=z(t(a.dataMax,f),f)),r(e)&&(a.threshold=e),!d.softThreshold||a.isLog)a.softThreshold=!1}})},translate:function(a,b,c,d,e,f){var g=this.linkedParent||this,h=1,k=0,l=d?g.oldTransA:g.transA;d=d?g.oldMin:g.min;var m=g.minPixelPadding;e=(g.isOrdinal||g.isBroken||g.isLog&&e)&&
g.lin2val;l||(l=g.transA);c&&(h*=-1,k=g.len);g.reversed&&(h*=-1,k-=h*(g.sector||g.len));b?(a=a*h+k,a-=m,a=a/l+d,e&&(a=g.lin2val(a))):(e&&(a=g.val2lin(a)),"between"===f&&(f=.5),a=h*(a-d)*l+k+h*m+(X(f)?l*f*g.pointRange:0));return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,c,d,e){var f=this.chart,g=this.left,h=this.top,k,l,m=c&&f.oldChartHeight||
f.chartHeight,n=c&&f.oldChartWidth||f.chartWidth,p;k=this.transB;var q=function(a,b,c){if(a<b||a>c)d?a=Q(z(b,a),c):p=!0;return a};e=t(e,this.translate(a,null,null,c));a=c=M(e+k);k=l=M(m-e-k);X(e)?this.horiz?(k=h,l=m-this.bottom,a=c=q(a,g,g+this.width)):(a=g,c=n-this.right,k=l=q(k,h,h+this.height)):p=!0;return p&&!d?null:f.renderer.crispLine(["M",a,k,"L",c,l],b||1)},getLinearTickPositions:function(a,b,c){var d,e=C(ja(b/a)*a),f=C(Ka(c/a)*a),g=[];if(b===c&&X(b))return[b];for(b=e;b<=f;){g.push(b);b=C(b+
a);if(b===d)break;d=b}return g},getMinorTickPositions:function(){var a=this.options,b=this.tickPositions,c=this.minorTickInterval,d=[],e,f=this.pointRangePadding||0;e=this.min-f;var f=this.max+f,g=f-e;if(g&&g/c<this.len/3)if(this.isLog)for(f=b.length,e=1;e<f;e++)d=d.concat(this.getLogTickPositions(c,b[e-1],b[e],!0));else if(this.isDatetimeAxis&&"auto"===a.minorTickInterval)d=d.concat(this.getTimeTicks(this.normalizeTimeTickInterval(c),e,f,a.startOfWeek));else for(b=e+(b[0]-e)%c;b<=f;b+=c)d.push(b);
0!==d.length&&this.trimTicks(d,a.startOnTick,a.endOnTick);return d},adjustForMinRange:function(){var a=this.options,b=this.min,c=this.max,d,e=this.dataMax-this.dataMin>=this.minRange,f,g,h,k,l;this.isXAxis&&this.minRange===I&&!this.isLog&&(r(a.min)||r(a.max)?this.minRange=null:(u(this.series,function(a){k=a.xData;for(g=a.xIncrement?1:k.length-1;0<g;g--)if(h=k[g]-k[g-1],f===I||h<f)f=h}),this.minRange=Q(5*f,this.dataMax-this.dataMin)));c-b<this.minRange&&(l=this.minRange,d=(l-c+b)/2,d=[b-d,t(a.min,
b-d)],e&&(d[2]=this.dataMin),b=Ua(d),c=[b+l,t(a.max,b+l)],e&&(c[2]=this.dataMax),c=G(c),c-b<l&&(d[0]=c-l,d[1]=t(a.min,c-l),b=Ua(d)));this.min=b;this.max=c},getClosest:function(){var a;u(this.series,function(b){var c=b.closestPointRange;!b.noSharedTooltip&&r(c)&&(a=r(a)?Q(a,c):c)});return a},setAxisTranslation:function(a){var b=this,c=b.max-b.min,d=b.axisPointRange||0,e,f=0,g=0,h=b.linkedParent,k=!!b.categories,l=b.transA,m=b.isXAxis;if(m||k||d)if(h?(f=h.minPointOffset,g=h.pointRangePadding):(e=b.getClosest(),
u(b.series,function(a){var c=k?1:m?t(a.options.pointRange,e,0):b.axisPointRange||0;a=a.options.pointPlacement;d=z(d,c);b.single||(f=z(f,Aa(a)?0:c/2),g=z(g,"on"===a?0:c))})),h=b.ordinalSlope&&e?b.ordinalSlope/e:1,b.minPointOffset=f*=h,b.pointRangePadding=g*=h,b.pointRange=Q(d,c),m)b.closestPointRange=e;a&&(b.oldTransA=l);b.translationSlope=b.transA=l=b.len/(c+g||1);b.transB=b.horiz?b.left:b.bottom;b.minPixelPadding=l*f},minFromRange:function(){return this.max-this.range},setTickInterval:function(a){var b=
this,c=b.chart,d=b.options,e=b.isLog,f=b.log2lin,g=b.isDatetimeAxis,h=b.isXAxis,k=b.isLinked,l=d.maxPadding,m=d.minPadding,n=d.tickInterval,p=d.tickPixelInterval,q=b.categories,v=b.threshold,H=b.softThreshold,w,na,J,A;g||q||k||this.getTickAmount();J=t(b.userMin,d.min);A=t(b.userMax,d.max);k?(b.linkedParent=c[b.coll][d.linkedTo],c=b.linkedParent.getExtremes(),b.min=t(c.min,c.dataMin),b.max=t(c.max,c.dataMax),d.type!==b.linkedParent.options.type&&U(11,1)):(!H&&r(v)&&(b.dataMin>=v?(w=v,m=0):b.dataMax<=
v&&(na=v,l=0)),b.min=t(J,w,b.dataMin),b.max=t(A,na,b.dataMax));e&&(!a&&0>=Q(b.min,t(b.dataMin,b.min))&&U(10,1),b.min=C(f(b.min),15),b.max=C(f(b.max),15));b.range&&r(b.max)&&(b.userMin=b.min=J=z(b.min,b.minFromRange()),b.userMax=A=b.max,b.range=null);T(b,"foundExtremes");b.beforePadding&&b.beforePadding();b.adjustForMinRange();!(q||b.axisPointRange||b.usePercentage||k)&&r(b.min)&&r(b.max)&&(f=b.max-b.min)&&(!r(J)&&m&&(b.min-=f*m),!r(A)&&l&&(b.max+=f*l));X(d.floor)&&(b.min=z(b.min,d.floor));X(d.ceiling)&&
(b.max=Q(b.max,d.ceiling));H&&r(b.dataMin)&&((v=v||0,!r(J)&&b.min<v&&b.dataMin>=v)?b.min=v:!r(A)&&b.max>v&&b.dataMax<=v&&(b.max=v));b.tickInterval=b.min===b.max||void 0===b.min||void 0===b.max?1:k&&!n&&p===b.linkedParent.options.tickPixelInterval?n=b.linkedParent.tickInterval:t(n,this.tickAmount?(b.max-b.min)/z(this.tickAmount-1,1):void 0,q?1:(b.max-b.min)*p/z(b.len,p));h&&!a&&u(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);b.beforeSetTickPositions&&
b.beforeSetTickPositions();b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval));b.pointRange&&!n&&(b.tickInterval=z(b.pointRange,b.tickInterval));a=t(d.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);!n&&b.tickInterval<a&&(b.tickInterval=a);g||e||n||(b.tickInterval=B(b.tickInterval,null,y(b.tickInterval),t(d.allowDecimals,!(.5<b.tickInterval&&5>b.tickInterval&&1E3<b.max&&9999>b.max)),!!this.tickAmount));!this.tickAmount&&this.len&&(b.tickInterval=b.unsquish());
this.setTickPositions()},setTickPositions:function(){var a=this.options,b,c=a.tickPositions,d=a.tickPositioner,e=a.startOnTick,f=a.endOnTick,g;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===a.minorTickInterval&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.tickPositions=b=c&&c.slice();!b&&(b=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,
a.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),b.length>this.len&&(b=[b[0],b.pop()]),this.tickPositions=b,d&&(d=d.apply(this,[this.min,this.max])))&&(this.tickPositions=b=d);this.isLinked||(this.trimTicks(b,e,f),this.min===this.max&&r(this.min)&&!this.tickAmount&&(g=!0,this.min-=.5,this.max+=.5),this.single=g,c||d||this.adjustTickAmount())},trimTicks:function(a,
b,c){var d=a[0],e=a[a.length-1],f=this.minPointOffset||0;if(b)this.min=d;else for(;this.min-f>a[0];)a.shift();if(c)this.max=e;else for(;this.max+f<a[a.length-1];)a.pop();0===a.length&&r(d)&&a.push((e+d)/2)},alignToOthers:function(){var a={},b,c=this.options;!1!==this.chart.options.chart.alignTicks&&!1!==c.alignTicks&&u(this.chart[this.coll],function(c){var e=c.options,e=[c.horiz?e.left:e.top,e.width,e.height,e.pane].join();c.series.length&&(a[e]?b=!0:a[e]=1)});return b},getTickAmount:function(){var a=
this.options,b=a.tickAmount,c=a.tickPixelInterval;!r(a.tickInterval)&&this.len<c&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(b=2);!b&&this.alignToOthers()&&(b=Ka(this.len/c)+1);4>b&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,c=this.tickAmount,d=this.finalTickAmt,e=b&&b.length;if(e<c){for(;b.length<c;)b.push(C(b[b.length-1]+a));this.transA*=(e-1)/(c-1);this.max=b[b.length-1]}else e>c&&(this.tickInterval*=2,this.setTickPositions());
if(r(d)){for(a=c=b.length;a--;)(3===d&&1===a%2||2>=d&&0<a&&a<c-1)&&b.splice(a,1);this.finalTickAmt=I}},setScale:function(){var a,b;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();b=this.len!==this.oldAxisLength;u(this.series,function(b){if(b.isDirtyData||b.isDirty||b.xAxis.isDirty)a=!0});b||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=
!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty)||(this.isDirty=b||this.min!==this.oldMin||this.max!==this.oldMax):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,b,c,d,e){var f=this,g=f.chart;c=t(c,!0);u(f.series,function(a){delete a.kdTree});e=E(e,{min:a,max:b});T(f,"setExtremes",e,function(){f.userMin=a;f.userMax=b;f.eventArgs=e;c&&g.redraw(d)})},zoom:function(a,b){var c=this.dataMin,d=this.dataMax,e=this.options,
f=Q(c,t(e.min,c)),e=z(d,t(e.max,d));this.allowZoomOutside||(r(c)&&a<=f&&(a=f),r(d)&&b>=e&&(b=e));this.displayBtn=a!==I||b!==I;this.setExtremes(a,b,!1,I,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=this.horiz,e=t(b.width,a.plotWidth-c+(b.offsetRight||0)),f=t(b.height,a.plotHeight),g=t(b.top,a.plotTop),b=t(b.left,a.plotLeft+c),c=/%$/;c.test(f)&&(f=Math.round(parseFloat(f)/100*a.plotHeight));c.test(g)&&(g=Math.round(parseFloat(g)/100*a.plotHeight+
a.plotTop));this.left=b;this.top=g;this.width=e;this.height=f;this.bottom=a.chartHeight-f-g;this.right=a.chartWidth-e-b;this.len=z(d?e:f,0);this.pos=d?b:g},getExtremes:function(){var a=this.isLog,b=this.lin2log;return{min:a?C(b(this.min)):this.min,max:a?C(b(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=this.lin2log,d=b?c(this.min):this.min,b=b?c(this.max):this.max;null===a?a=0>b?b:d:d>a?a=d:b<a&&
(a=b);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){a=(t(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var b=this.options,c=b[a+"Length"],d=t(b[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(d&&c)return"inside"===b[a+"Position"]&&(c=-c),[c,d]},labelMetrics:function(){return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize,this.ticks[0]&&this.ticks[0].label)},unsquish:function(){var a=this.options.labels,b=this.horiz,
c=this.tickInterval,d=c,e=this.len/(((this.categories?1:0)+this.max-this.min)/c),f,g=a.rotation,h=this.labelMetrics(),k,l=Number.MAX_VALUE,m,n=function(a){a/=e||1;a=1<a?Ka(a):1;return a*c};b?(m=!a.staggerLines&&!a.step&&(r(g)?[g]:e<t(a.autoRotationLimit,80)&&a.autoRotation))&&u(m,function(a){var b;if(a===g||a&&-90<=a&&90>=a)k=n(ba(h.h/ra(xa*a))),b=k+ba(a/360),b<l&&(l=b,f=a,d=k)}):a.step||(d=n(h.h));this.autoRotation=m;this.labelRotation=t(f,g);return d},getSlotWidth:function(){var a=this.chart,b=
this.horiz,c=this.options.labels,d=Math.max(this.tickPositions.length-(this.categories?0:1),1),e=a.margin[3];return b&&2>(c.step||0)&&!c.rotation&&(this.staggerLines||1)*a.plotWidth/d||!b&&(e&&e-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,c=this.tickPositions,d=this.ticks,e=this.options.labels,f=this.horiz,g=this.getSlotWidth(),h=z(1,M(g-2*(e.padding||5))),k={},l=this.labelMetrics(),m=e.style.textOverflow,n,p=0,q,v;Aa(e.rotation)||(k.rotation=e.rotation||
0);if(this.autoRotation)u(c,function(a){(a=d[a])&&a.labelLength>p&&(p=a.labelLength)}),p>h&&p>l.h?k.rotation=this.labelRotation:this.labelRotation=0;else if(g&&(n={width:h+"px"},!m))for(n.textOverflow="clip",q=c.length;!f&&q--;)if(v=c[q],h=d[v].label)if("ellipsis"===h.styles.textOverflow?h.css({textOverflow:"clip"}):d[v].labelLength>g&&h.css({width:g+"px"}),h.getBBox().height>this.len/c.length-(l.h-l.f))h.specCss={textOverflow:"ellipsis"};k.rotation&&(n={width:(p>.5*a.chartHeight?.33*a.chartHeight:
a.chartHeight)+"px"},!m)&&(n.textOverflow="ellipsis");if(this.labelAlign=e.align||this.autoLabelAlign(this.labelRotation))k.align=this.labelAlign;u(c,function(a){var b=(a=d[a])&&a.label;b&&(b.attr(k),n&&b.css(F(n,b.specCss)),delete b.specCss,a.rotation=k.rotation)});this.tickRotCorr=b.rotCorr(l.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||r(this.min)&&r(this.max)&&!!this.tickPositions},getOffset:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,e=
a.tickPositions,f=a.ticks,g=a.horiz,h=a.side,k=b.inverted?[1,0,3,2][h]:h,l,m,n=0,p,q=0,v=d.title,H=d.labels,w=0,na=a.opposite,J=b.axisOffset,b=b.clipOffset,A=[-1,1,1,-1][h],y,C=a.axisParent,pa=this.tickSize("tick");l=a.hasData();a.showAxis=m=l||t(d.showEmpty,!0);a.staggerLines=a.horiz&&H.staggerLines;a.axisGroup||(a.gridGroup=c.g("grid").attr({zIndex:d.gridZIndex||1}).add(C),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).add(C),a.labelGroup=c.g("axis-labels").attr({zIndex:H.zIndex||7}).addClass("highcharts-"+
a.coll.toLowerCase()+"-labels").add(C));if(l||a.isLinked){if(u(e,function(b){f[b]?f[b].addLabel():f[b]=new ea(a,b)}),a.renderUnsquish(),!1!==H.reserveSpace&&(0===h||2===h||{1:"left",3:"right"}[h]===a.labelAlign||"center"===a.labelAlign)&&u(e,function(a){w=z(f[a].getLabelSize(),w)}),a.staggerLines)w*=a.staggerLines,a.labelOffset=w*(a.opposite?-1:1)}else for(y in f)f[y].destroy(),delete f[y];v&&v.text&&!1!==v.enabled&&(a.axisTitle||((y=v.textAlign)||(y=(g?{low:"left",middle:"center",high:"right"}:{low:na?
"right":"left",middle:"center",high:na?"left":"right"})[v.align]),a.axisTitle=c.text(v.text,0,0,v.useHTML).attr({zIndex:7,rotation:v.rotation||0,align:y}).addClass("highcharts-"+this.coll.toLowerCase()+"-title").css(v.style).add(a.axisGroup),a.axisTitle.isNew=!0),m&&(n=a.axisTitle.getBBox()[g?"height":"width"],p=v.offset,q=r(p)?0:t(v.margin,g?5:10)),a.axisTitle[m?"show":"hide"](!0));a.offset=A*t(d.offset,J[h]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};c=0===h?-a.labelMetrics().h:2===h?a.tickRotCorr.y:
0;q=Math.abs(w)+q;w&&(q-=c,q+=A*(g?t(H.y,a.tickRotCorr.y+8*A):H.x));a.axisTitleMargin=t(p,q);J[h]=z(J[h],a.axisTitleMargin+n+A*a.offset,q,l&&e.length&&pa?pa[0]:0);d=d.offset?0:2*ja(d.lineWidth/2);b[k]=z(b[k],d)},getLinePath:function(a){var b=this.chart,c=this.opposite,d=this.offset,e=this.horiz,f=this.left+(c?this.width:0)+d,d=b.chartHeight-this.bottom-(c?this.height:0)+d;c&&(a*=-1);return b.renderer.crispLine(["M",e?this.left:f,e?d:this.top,"L",e?b.chartWidth-this.right:f,e?d:b.chartHeight-this.bottom],
a)},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,d=this.len,e=this.options.title,f=a?b:c,g=this.opposite,h=this.offset,k=e.x||0,l=e.y||0,m=K(e.style.fontSize||12),d={low:f+(a?0:d),middle:f+d/2,high:f+(a?d:0)}[e.align],b=(a?c+this.height:b)+(a?1:-1)*(g?-1:1)*this.axisTitleMargin+(2===this.side?m:0);return{x:a?d+k:b+(g?this.width:0)+h+k,y:a?b+l-(g?this.height:0)+h:d+l}},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,e=a.isLog,f=a.lin2log,g=a.isLinked,h=a.tickPositions,
k=a.axisTitle,l=a.ticks,m=a.minorTicks,n=a.alternateBands,p=d.stackLabels,q=d.alternateGridColor,v=a.tickmarkOffset,H=d.lineWidth,w,t=b.hasRendered&&X(a.oldMin),J=a.showAxis,A=hb(c.globalAnimation),z,r;a.labelEdge.length=0;a.overlap=!1;u([l,m,n],function(a){for(var b in a)a[b].isActive=!1});if(a.hasData()||g)a.minorTickInterval&&!a.categories&&u(a.getMinorTickPositions(),function(b){m[b]||(m[b]=new ea(a,b,"minor"));t&&m[b].isNew&&m[b].render(null,!0);m[b].render(null,!1,1)}),h.length&&(u(h,function(b,
c){if(!g||b>=a.min&&b<=a.max)l[b]||(l[b]=new ea(a,b)),t&&l[b].isNew&&l[b].render(c,!0,.1),l[b].render(c)}),v&&(0===a.min||a.single))&&(l[-1]||(l[-1]=new ea(a,-1,null,!0)),l[-1].render(-1)),q&&u(h,function(c,d){r=h[d+1]!==I?h[d+1]+v:a.max-v;0===d%2&&c<a.max&&r<=a.max+(b.polar?-v:v)&&(n[c]||(n[c]=new L.PlotLineOrBand(a)),z=c+v,n[c].options={from:e?f(z):z,to:e?f(r):r,color:q},n[c].render(),n[c].isActive=!0)}),a._addedPlotLB||(u((d.plotLines||[]).concat(d.plotBands||[]),function(b){a.addPlotBandOrLine(b)}),
a._addedPlotLB=!0);u([l,m,n],function(a){var c,d,e=[],f=A.duration;for(c in a)a[c].isActive||(a[c].render(c,!1,0),a[c].isActive=!1,e.push(c));qa(function(){for(d=e.length;d--;)a[e[d]]&&!a[e[d]].isActive&&(a[e[d]].destroy(),delete a[e[d]])},a!==n&&b.hasRendered&&f?f:0)});H&&(w=a.getLinePath(H),a.axisLine?a.axisLine.animate({d:w}):a.axisLine=c.path(w).attr({stroke:d.lineColor,"stroke-width":H,zIndex:7}).add(a.axisGroup),a.axisLine[J?"show":"hide"](!0));k&&J&&(k[k.isNew?"attr":"animate"](a.getTitlePosition()),
k.isNew=!1);p&&p.enabled&&a.renderStackTotals();a.isDirty=!1},redraw:function(){this.visible&&(this.render(),u(this.plotLinesAndBands,function(a){a.render()}));u(this.series,function(a){a.isDirty=!0})},destroy:function(a){var b=this,c=b.stacks,d,e=b.plotLinesAndBands;a||ma(b);for(d in c)Ja(c[d]),c[d]=null;u([b.ticks,b.minorTicks,b.alternateBands],function(a){Ja(a)});for(a=e.length;a--;)e[a].destroy();u("stackTotalGroup axisLine axisTitle axisGroup cross gridGroup labelGroup".split(" "),function(a){b[a]&&
(b[a]=b[a].destroy())});this.cross&&this.cross.destroy()},drawCrosshair:function(a,b){var c,d=this.crosshair,e,f;this.crosshair&&!1!==(r(b)||!t(d.snap,!0))?(t(d.snap,!0)?r(b)&&(c=this.isXAxis?b.plotX:this.len-b.plotY):c=this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos,c=this.isRadial?this.getPlotLinePath(this.isXAxis?b.x:t(b.stackY,b.y))||null:this.getPlotLinePath(null,null,null,null,c)||null,null===c)?this.hideCrosshair():(e=this.categories&&!this.isRadial,f=t(d.width,e?this.transA:1),this.cross)?
this.cross.attr({d:c,visibility:"visible","stroke-width":f}):(e={"pointer-events":"none","stroke-width":f,stroke:d.color||(e?"rgba(155,200,255,0.2)":"#C0C0C0"),zIndex:t(d.zIndex,2)},d.dashStyle&&(e.dashstyle=d.dashStyle),this.cross=this.chart.renderer.path(c).attr(e).add()):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}};E(va.prototype,{getPlotBandPath:function(a,b){var c=this.getPlotLinePath(b,null,null,!0),d=this.getPlotLinePath(a,null,null,!0);d&&c?(d.flat=d.toString()===
c.toString(),d.push(c[4],c[5],c[1],c[2])):d=null;return d},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(a,b){var c=(new L.PlotLineOrBand(this,a)).render(),d=this.userOptions;c&&(b&&(d[b]=d[b]||[],d[b].push(a)),this.plotLinesAndBands.push(c));return c},removePlotBandOrLine:function(a){for(var b=this.plotLinesAndBands,c=this.options,d=this.userOptions,e=b.length;e--;)b[e].id===a&&
b[e].destroy();u([c.plotLines||[],d.plotLines||[],c.plotBands||[],d.plotBands||[]],function(b){for(e=b.length;e--;)b[e].id===a&&ka(b,b[e])})}});va.prototype.getTimeTicks=function(a,b,c,d){var e=[],f={},g=ga.global.useUTC,h,k=new Ca(b-Oa(b)),l=a.unitRange,m=a.count;if(r(b)){k[Jb](l>=O.second?0:m*ja(k.getMilliseconds()/m));if(l>=O.second)k[Kb](l>=O.minute?0:m*ja(k.getSeconds()/m));if(l>=O.minute)k[Lb](l>=O.hour?0:m*ja(k[xb]()/m));if(l>=O.hour)k[Mb](l>=O.day?0:m*ja(k[yb]()/m));if(l>=O.day)k[rb](l>=O.month?
1:m*ja(k[db]()/m));l>=O.month&&(k[Ab](l>=O.year?0:m*ja(k[ib]()/m)),h=k[jb]());l>=O.year&&(h-=h%m,k[Bb](h));if(l===O.week)k[rb](k[db]()-k[zb]()+t(d,1));b=1;if(wb||gb)k=k.getTime(),k=new Ca(k+Oa(k));h=k[jb]();d=k.getTime();for(var n=k[ib](),p=k[db](),q=!g||!!gb,v=(O.day+(g?Oa(k):6E4*k.getTimezoneOffset()))%O.day;d<c;)e.push(d),l===O.year?d=qb(h+b*m,0):l===O.month?d=qb(h,n+b*m):!q||l!==O.day&&l!==O.week?d+=l*m:d=qb(h,n,p+b*m*(l===O.day?1:7)),b++;e.push(d);u(Ra(e,function(a){return l<=O.hour&&a%O.day===
v}),function(a){f[a]="day"})}e.info=E(a,{higherRanks:f,totalRange:l*m});return e};va.prototype.normalizeTimeTickInterval=function(a,b){var c=b||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],d=c[c.length-1],e=O[d[0]],f=d[1],g;for(g=0;g<c.length&&!(d=c[g],e=O[d[0]],f=d[1],c[g+1]&&a<=(e*f[f.length-1]+O[c[g+1][0]])/2);g++);e===O.year&&a<5*e&&(f=[1,2,5]);
c=B(a/e,f,"year"===d[0]?z(y(a/e),1):1);return{unitRange:e,count:c,unitName:d[0]}};va.prototype.getLogTickPositions=function(a,b,c,d){var e=this.options,f=this.len,g=this.lin2log,h=this.log2lin,k=[];d||(this._minorAutoInterval=null);if(.5<=a)a=M(a),k=this.getLinearTickPositions(a,b,c);else if(.08<=a)for(var f=ja(b),l,m,n,p,q,e=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];f<c+1&&!q;f++)for(m=e.length,l=0;l<m&&!q;l++)n=h(g(f)*e[l]),n>b&&(!d||p<=c)&&p!==I&&k.push(p),p>c&&(q=!0),p=n;else(b=g(b),
c=g(c),a=e[d?"minorTickInterval":"tickInterval"],a=t("auto"===a?null:a,this._minorAutoInterval,e.tickPixelInterval/(d?5:1)*(c-b)/((d?f/this.tickPositions.length:f)||1)),a=B(a,null,y(a)),k=Sa(this.getLinearTickPositions(a,b,c),h),d)||(this._minorAutoInterval=a/5);d||(this.tickInterval=a);return k};va.prototype.log2lin=function(a){return ha.log(a)/ha.LN10};va.prototype.lin2log=function(a){return ha.pow(10,a)};var Sb=L.Tooltip=function(){this.init.apply(this,arguments)};Sb.prototype={init:function(a,
b){var c=b.borderWidth,d=b.style,e=K(d.padding);this.chart=a;this.options=b;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.label=a.renderer.label("",0,0,b.shape||"callout",null,null,b.useHTML,null,"tooltip").attr({padding:e,fill:b.backgroundColor,"stroke-width":c,r:b.borderRadius,zIndex:8}).css(d).css({padding:0}).add().attr({y:-9999});ya||this.label.shadow(b.shadow);this.shared=b.shared},destroy:function(){this.label&&(this.label=this.label.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},
move:function(a,b,c,d){var e=this,f=e.now,g=!1!==e.options.animation&&!e.isHidden&&(1<ba(a-f.x)||1<ba(b-f.y)),h=e.followPointer||1<e.len;E(f,{x:g?(2*f.x+a)/3:a,y:g?(f.y+b)/2:b,anchorX:h?I:g?(2*f.anchorX+c)/3:c,anchorY:h?I:g?(f.anchorY+d)/2:d});e.label.attr(f);g&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32))},hide:function(a){var b=this;clearTimeout(this.hideTimer);a=t(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=qa(function(){b.label[a?
"fadeOut":"hide"]();b.isHidden=!0},a))},getAnchor:function(a,b){var c,d=this.chart,e=d.inverted,f=d.plotTop,g=d.plotLeft,h=0,k=0,l,m;a=V(a);c=a[0].tooltipPos;this.followPointer&&b&&(b.chartX===I&&(b=d.pointer.normalize(b)),c=[b.chartX-d.plotLeft,b.chartY-f]);c||(u(a,function(a){l=a.series.yAxis;m=a.series.xAxis;h+=a.plotX+(!e&&m?m.left-g:0);k+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&l?l.top-f:0)}),h/=a.length,k/=a.length,c=[e?d.plotWidth-k:h,this.shared&&!e&&1<a.length&&b?b.chartY-f:e?d.plotHeight-
h:k]);return Sa(c,M)},getPosition:function(a,b,c){var d=this.chart,e=this.distance,f={},g=c.h||0,h,k=["y",d.chartHeight,b,c.plotY+d.plotTop,d.plotTop,d.plotTop+d.plotHeight],l=["x",d.chartWidth,a,c.plotX+d.plotLeft,d.plotLeft,d.plotLeft+d.plotWidth],m=!this.followPointer&&t(c.ttBelow,!d.inverted===!!c.negative),n=function(a,b,c,d,h,k){var l=c<d-e,p=d+e+c<b,n=d-e-c;d+=e;if(m&&p)f[a]=d;else if(!m&&l)f[a]=n;else if(l)f[a]=Q(k-c,0>n-g?n:n-g);else if(p)f[a]=z(h,d+g+c>b?d:d+g);else return!1},p=function(a,
b,c,d){var g;d<e||d>b-e?g=!1:f[a]=d<c/2?1:d>b-c/2?b-c-2:d-c/2;return g},q=function(a){var b=k;k=l;l=b;h=a},v=function(){!1!==n.apply(0,k)?!1===p.apply(0,l)&&!h&&(q(!0),v()):h?f.x=f.y=0:(q(!0),v())};(d.inverted||1<this.len)&&q();v();return f},defaultFormatter:function(a){var b=this.points||V(this),c;c=[a.tooltipFooterHeaderFormatter(b[0])];c=c.concat(a.bodyFormatter(b));c.push(a.tooltipFooterHeaderFormatter(b[0],!0));return c.join("")},refresh:function(a,b){var c=this.chart,d=this.label,e=this.options,
f,g,h,k={},l,m=[];l=e.formatter||this.defaultFormatter;var k=c.hoverPoints,n,p=this.shared;clearTimeout(this.hideTimer);this.followPointer=V(a)[0].series.tooltipOptions.followPointer;h=this.getAnchor(a,b);f=h[0];g=h[1];!p||a.series&&a.series.noSharedTooltip?k=a.getLabelConfig():(c.hoverPoints=a,k&&u(k,function(a){a.setState()}),u(a,function(a){a.setState("hover");m.push(a.getLabelConfig())}),k={x:a[0].category,y:a[0].y},k.points=m,this.len=m.length,a=a[0]);l=l.call(k,this);k=a.series;this.distance=
t(k.tooltipOptions.distance,16);!1===l?this.hide():(this.isHidden&&(ab(d),d.attr("opacity",1).show()),d.attr({text:l}),n=e.borderColor||a.color||k.color||"#606060",d.attr({stroke:n}),this.updatePosition({plotX:f,plotY:g,negative:a.negative,ttBelow:a.ttBelow,h:h[2]||0}),this.isHidden=!1);T(c,"tooltipRefresh",{text:l,x:f+c.plotLeft,y:g+c.plotTop,borderColor:n})},updatePosition:function(a){var b=this.chart,c=this.label,c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(M(c.x),
M(c.y||0),a.plotX+b.plotLeft,a.plotY+b.plotTop)},getXDateFormat:function(a,b,c){var d;b=b.dateTimeLabelFormats;var e=c&&c.closestPointRange,f,g={millisecond:15,second:12,minute:9,hour:6,day:3},h,k="millisecond";if(e){h=bb("%m-%d %H:%M:%S.%L",a.x);for(f in O){if(e===O.week&&+bb("%w",a.x)===c.options.startOfWeek&&"00:00:00.000"===h.substr(6)){f="week";break}if(O[f]>e){f=k;break}if(g[f]&&h.substr(g[f])!=="01-01 00:00:00.000".substr(g[f]))break;"week"!==f&&(k=f)}f&&(d=b[f])}else d=b.day;return d||b.year},
tooltipFooterHeaderFormatter:function(a,b){var c=b?"footer":"header",d=a.series,e=d.tooltipOptions,f=e.xDateFormat,g=d.xAxis,h=g&&"datetime"===g.options.type&&X(a.key),c=e[c+"Format"];h&&!f&&(f=this.getXDateFormat(a,e,g));h&&f&&(c=c.replace("{point.key}","{point.key:"+f+"}"));return Fa(c,{point:a,series:d})},bodyFormatter:function(a){return Sa(a,function(a){var c=a.series.tooltipOptions;return(c.pointFormatter||a.point.tooltipFormatter).call(a.point,c.pointFormat)})}};var wa;lb=D&&D.documentElement.ontouchstart!==
I;var fb=L.Pointer=function(a,b){this.init(a,b)};fb.prototype={init:function(a,b){var c=b.chart,d=c.events,e=ya?"":c.zoomType,c=a.inverted,f;this.options=b;this.chart=a;this.zoomX=f=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=f&&!c||e&&c;this.zoomVert=e&&!c||f&&c;this.hasZoom=f||e;this.runChartClick=d&&!!d.click;this.pinchDown=[];this.lastValidTouch={};L.Tooltip&&b.tooltip.enabled&&(a.tooltip=new Sb(a,b.tooltip),this.followTouchMove=t(b.tooltip.followTouchMove,!0));this.setDOMEvents()},normalize:function(a,
b){var c,d;a=a||x.event;a.target||(a.target=a.srcElement);d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;b||(this.chartPosition=b=Db(this.chart.container));d.pageX===I?(c=z(a.x,a.clientX-b.left),d=a.y):(c=d.pageX-b.left,d=d.pageY-b.top);return E(a,{chartX:M(c),chartY:M(d)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};u(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},runPointActions:function(a){var b=
this.chart,c=b.series,d=b.tooltip,e=d?d.shared:!1,f=b.hoverPoint,g=b.hoverSeries,h,k=[Number.MAX_VALUE,Number.MAX_VALUE],l,m,n=[],p=[],q;if(!e&&!g)for(h=0;h<c.length;h++)if(c[h].directTouch||!c[h].options.stickyTracking)c=[];g&&(e?g.noSharedTooltip:g.directTouch)&&f?p=[f]:(u(c,function(b){l=b.noSharedTooltip&&e;m=!e&&b.directTouch;b.visible&&!l&&!m&&t(b.options.enableMouseTracking,!0)&&(q=b.searchPoint(a,!l&&1===b.kdDimensions))&&n.push(q)}),u(n,function(a){a&&u(["dist","distX"],function(b,c){if(X(a[b])){var d=
a[b]===k[c]&&a.series.group.zIndex>=p[c].series.group.zIndex;if(a[b]<k[c]||d)k[c]=a[b],p[c]=a}})}));if(e)for(h=n.length;h--;)(n[h].clientX!==p[1].clientX||n[h].series.noSharedTooltip)&&n.splice(h,1);if(p[0]&&(p[0]!==this.prevKDPoint||d&&d.isHidden))if(e&&!p[0].series.noSharedTooltip)n.length&&d&&d.refresh(n,a),u(n,function(b){b.onMouseOver(a,b!==(g&&g.directTouch&&f||p[0]))}),this.prevKDPoint=p[1];else{d&&d.refresh(p[0],a);if(!g||!g.directTouch)p[0].onMouseOver(a);this.prevKDPoint=p[0]}else c=g&&
g.tooltipOptions.followPointer,d&&c&&!d.isHidden&&(c=d.getAnchor([{}],a),d.updatePosition({plotX:c[0],plotY:c[1]}));this._onDocumentMouseMove||(this._onDocumentMouseMove=function(a){if(fa[wa])fa[wa].pointer.onDocumentMouseMove(a)},W(D,"mousemove",this._onDocumentMouseMove));u(e?n:[t(f,p[1])],function(c){u(b.axes,function(b){c&&c.series[b.coll]!==b||b.drawCrosshair(a,c)})})},reset:function(a,b){var c=this.chart,d=c.hoverSeries,e=c.hoverPoint,f=c.hoverPoints,g=c.tooltip,h=g&&g.shared?f:e;a&&h&&u(V(h),
function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)g&&h&&(g.refresh(h),e&&(e.setState(e.state,!0),u(c.axes,function(a){t(a.crosshair&&a.crosshair.snap,!0)?a.drawCrosshair(null,e):a.hideCrosshair()})));else{if(e)e.onMouseOut();f&&u(f,function(a){a.setState()});if(d)d.onMouseOut();g&&g.hide(b);this._onDocumentMouseMove&&(ma(D,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null);u(c.axes,function(a){a.hideCrosshair()});this.hoverX=c.hoverPoints=c.hoverPoint=null}},scaleGroups:function(a,
b){var c=this.chart,d;u(c.series,function(e){d=a||e.getPlotBox();e.xAxis&&e.xAxis.zoomEnabled&&(e.group.attr(d),e.markerGroup&&(e.markerGroup.attr(d),e.markerGroup.clip(b?c.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(d))});c.clipRect.attr(b||c.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,c=b.options.chart,d=a.chartX,e=a.chartY,f=this.zoomHor,
g=this.zoomVert,h=b.plotLeft,k=b.plotTop,l=b.plotWidth,m=b.plotHeight,n,p=this.selectionMarker,q=this.mouseDownX,v=this.mouseDownY,t=c.panKey&&a[c.panKey+"Key"];if(!p||!p.touch)if(d<h?d=h:d>h+l&&(d=h+l),e<k?e=k:e>k+m&&(e=k+m),this.hasDragged=Math.sqrt(Math.pow(q-d,2)+Math.pow(v-e,2)),10<this.hasDragged)n=b.isInsidePlot(q-h,v-k),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&n&&!t&&!p&&(this.selectionMarker=p=b.renderer.rect(h,k,f?1:l,g?1:m,0).attr({fill:c.selectionMarkerFill||"rgba(69,114,167,0.25)",
zIndex:7}).add()),p&&f&&(d-=q,p.attr({width:ba(d),x:(0<d?0:d)+q})),p&&g&&(d=e-v,p.attr({height:ba(d),y:(0<d?0:d)+v})),n&&!p&&c.panning&&b.pan(a,c.panning)},drop:function(a){var b=this,c=this.chart,d=this.hasPinched;if(this.selectionMarker){var e={originalEvent:a,xAxis:[],yAxis:[]},f=this.selectionMarker,g=f.attr?f.attr("x"):f.x,h=f.attr?f.attr("y"):f.y,k=f.attr?f.attr("width"):f.width,l=f.attr?f.attr("height"):f.height,m;if(this.hasDragged||d)u(c.axes,function(c){if(c.zoomEnabled&&r(c.min)&&(d||b[{xAxis:"zoomX",
yAxis:"zoomY"}[c.coll]])){var f=c.horiz,q="touchend"===a.type?c.minPixelPadding:0,v=c.toValue((f?g:h)+q),f=c.toValue((f?g+k:h+l)-q);e[c.coll].push({axis:c,min:Q(v,f),max:z(v,f)});m=!0}}),m&&T(c,"selection",e,function(a){c.zoom(E(a,d?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();d&&this.scaleGroups()}c&&(N(c.container,{cursor:c._cursor}),c.cancelClick=10<this.hasDragged,c.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=
this.normalize(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(a){fa[wa]&&fa[wa].pointer.drop(a)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition;a=this.normalize(a,c);c&&!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&this.reset()},onContainerMouseLeave:function(a){var b=fa[wa];b&&(a.relatedTarget||a.toElement)&&(b.pointer.reset(),b.pointer.chartPosition=null)},onContainerMouseMove:function(a){var b=
this.chart;r(wa)&&fa[wa]&&fa[wa].mouseIsDown||(wa=b.index);a=this.normalize(a);a.returnValue=!1;"mousedown"===b.mouseIsDown&&this.drag(a);(this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop))&&!b.openMenu&&this.runPointActions(a)},inClass:function(a,b){for(var c;a;){if(c=P(a,"class")){if(-1!==c.indexOf(b))return!0;if(-1!==c.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||
a.toElement;if(b&&a&&!b.options.stickyTracking&&!this.inClass(a,"highcharts-tooltip")&&!this.inClass(a,"highcharts-series-"+b.index))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,d=b.plotLeft,e=b.plotTop;a=this.normalize(a);b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(T(c.series,"click",E(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(E(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-d,a.chartY-e)&&T(b,"click",a)))},setDOMEvents:function(){var a=
this,b=a.chart.container;b.onmousedown=function(b){a.onContainerMouseDown(b)};b.onmousemove=function(b){a.onContainerMouseMove(b)};b.onclick=function(b){a.onContainerClick(b)};W(b,"mouseleave",a.onContainerMouseLeave);1===mb&&W(D,"mouseup",a.onDocumentMouseUp);lb&&(b.ontouchstart=function(b){a.onContainerTouchStart(b)},b.ontouchmove=function(b){a.onContainerTouchMove(b)},1===mb&&W(D,"touchend",a.onDocumentTouchEnd))},destroy:function(){var a;ma(this.chart.container,"mouseleave",this.onContainerMouseLeave);
mb||(ma(D,"mouseup",this.onDocumentMouseUp),ma(D,"touchend",this.onDocumentTouchEnd));clearInterval(this.tooltipTimeout);for(a in this)this[a]=null}};E(L.Pointer.prototype,{pinchTranslate:function(a,b,c,d,e,f){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,a,b,c,d,e,f);(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,a,b,c,d,e,f)},pinchTranslateDirection:function(a,b,c,d,e,f,g,h){var k=this.chart,l=a?"x":"y",m=a?"X":"Y",n="chart"+m,p=a?"width":"height",q=k["plot"+(a?
"Left":"Top")],v,t,w=h||1,u=k.inverted,J=k.bounds[a?"h":"v"],A=1===b.length,z=b[0][n],r=c[0][n],y=!A&&b[1][n],C=!A&&c[1][n],B;c=function(){!A&&20<ba(z-y)&&(w=h||ba(r-C)/ba(z-y));t=(q-r)/w+z;v=k["plot"+(a?"Width":"Height")]/w};c();b=t;b<J.min?(b=J.min,B=!0):b+v>J.max&&(b=J.max-v,B=!0);B?(r-=.8*(r-g[l][0]),A||(C-=.8*(C-g[l][1])),c()):g[l]=[r,C];u||(f[l]=t-q,f[p]=v);f=u?1/w:w;e[p]=v;e[l]=b;d[u?a?"scaleY":"scaleX":"scale"+m]=w;d["translate"+m]=f*q+(r-f*z)},pinch:function(a){var b=this,c=b.chart,d=b.pinchDown,
e=a.touches,f=e.length,g=b.lastValidTouch,h=b.hasZoom,k=b.selectionMarker,l={},m=1===f&&(b.inClass(a.target,"highcharts-tracker")&&c.runTrackerClick||b.runChartClick),n={};1<f&&(b.initiated=!0);h&&b.initiated&&!m&&a.preventDefault();Sa(e,function(a){return b.normalize(a)});"touchstart"===a.type?(u(e,function(a,b){d[b]={chartX:a.chartX,chartY:a.chartY}}),g.x=[d[0].chartX,d[1]&&d[1].chartX],g.y=[d[0].chartY,d[1]&&d[1].chartY],u(c.axes,function(a){if(a.zoomEnabled){var b=c.bounds[a.horiz?"h":"v"],d=
a.minPixelPadding,e=a.toPixels(t(a.options.min,a.dataMin)),f=a.toPixels(t(a.options.max,a.dataMax)),g=Q(e,f),e=z(e,f);b.min=Q(a.pos,g-d);b.max=z(a.pos+a.len,e+d)}}),b.res=!0):d.length&&(k||(b.selectionMarker=k=E({destroy:Qa,touch:!0},c.plotBox)),b.pinchTranslate(d,e,l,k,n,g),b.hasPinched=h,b.scaleGroups(l,n),!h&&b.followTouchMove&&1===f?this.runPointActions(b.normalize(a)):b.res&&(b.res=!1,this.reset(!1,0)))},touch:function(a,b){var c=this.chart,d;wa=c.index;1===a.touches.length?(a=this.normalize(a),
c.isInsidePlot(a.chartX-c.plotLeft,a.chartY-c.plotTop)&&!c.openMenu)?(b&&this.runPointActions(a),"touchmove"===a.type&&(c=this.pinchDown,d=c[0]?4<=Math.sqrt(Math.pow(c[0].chartX-a.chartX,2)+Math.pow(c[0].chartY-a.chartY,2)):!1),t(d,!0)&&this.pinch(a)):b&&this.reset():2===a.touches.length&&this.pinch(a)},onContainerTouchStart:function(a){this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(a){fa[wa]&&fa[wa].pointer.drop(a)}});if(x.PointerEvent||x.MSPointerEvent){var La=
{},Gb=!!x.PointerEvent,Vb=function(){var a,b=[];b.item=function(a){return this[a]};for(a in La)La.hasOwnProperty(a)&&b.push({pageX:La[a].pageX,pageY:La[a].pageY,target:La[a].target});return b},Hb=function(a,b,c,d){"touch"!==a.pointerType&&a.pointerType!==a.MSPOINTER_TYPE_TOUCH||!fa[wa]||(d(a),d=fa[wa].pointer,d[b]({type:c,target:a.currentTarget,preventDefault:Qa,touches:Vb()}))};E(fb.prototype,{onContainerPointerDown:function(a){Hb(a,"onContainerTouchStart","touchstart",function(a){La[a.pointerId]=
{pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){Hb(a,"onContainerTouchMove","touchmove",function(a){La[a.pointerId]={pageX:a.pageX,pageY:a.pageY};La[a.pointerId].target||(La[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){Hb(a,"onDocumentTouchEnd","touchend",function(a){delete La[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,Gb?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,Gb?
"pointermove":"MSPointerMove",this.onContainerPointerMove);a(D,Gb?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});nb(fb.prototype,"init",function(a,b,c){a.call(this,b,c);this.hasZoom&&N(b.container,{"-ms-touch-action":"none","touch-action":"none"})});nb(fb.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(W)});nb(fb.prototype,"destroy",function(a){this.batchMSEvents(ma);a.call(this)})}var vb=L.Legend=function(a,b){this.init(a,b)};vb.prototype=
{init:function(a,b){var c=this,d=b.itemStyle,e=b.itemMarginTop||0;this.options=b;b.enabled&&(c.itemStyle=d,c.itemHiddenStyle=F(d,b.itemHiddenStyle),c.itemMarginTop=e,c.padding=d=t(b.padding,8),c.initialItemX=d,c.initialItemY=d-5,c.maxItemWidth=0,c.chart=a,c.itemHeight=0,c.symbolWidth=t(b.symbolWidth,16),c.pages=[],c.render(),W(c.chart,"endResize",function(){c.positionCheckboxes()}))},colorizeItem:function(a,b){var c=this.options,d=a.legendItem,e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,
c=b?c.itemStyle.color:g,h=b?a.legendColor||a.color||"#CCC":g,g=a.options&&a.options.marker,k={fill:h},l;d&&d.css({fill:c,color:c});e&&e.attr({stroke:h});if(f){if(g&&f.isMarker)for(l in k.stroke=h,g=a.convertAttribs(g),g)d=g[l],d!==I&&(k[l]=d);f.attr(k)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(b?e:this.legendWidth-e-2*c-4,d);f&&(f.x=e,f.y=d)},destroyItem:function(a){var b=a.checkbox;
u(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&Ba(a.checkbox)},destroy:function(){var a=this.group,b=this.box;b&&(this.box=b.destroy());a&&(this.group=a.destroy())},positionCheckboxes:function(a){var b=this.group.alignAttr,c,d=this.clipHeight||this.legendHeight,e=this.titleHeight;b&&(c=b.translateY,u(this.allItems,function(f){var g=f.checkbox,h;g&&(h=c+e+g.y+(a||0)+3,N(g,{left:b.translateX+f.checkboxOffset+g.x-20+"px",top:h+"px",display:h>c-
6&&h<c+d-6?"":"none"}))}))},renderTitle:function(){var a=this.padding,b=this.options.title,c=0;b.text&&(this.title||(this.title=this.chart.renderer.label(b.text,a-3,a-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(b.style).add(this.group)),a=this.title.getBBox(),c=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:c}));this.titleHeight=c},setText:function(a){var b=this.options;a.legendItem.attr({text:b.labelFormat?Fa(b.labelFormat,a):b.labelFormatter.call(a)})},
renderItem:function(a){var b=this.chart,c=b.renderer,d=this.options,e="horizontal"===d.layout,f=this.symbolWidth,g=d.symbolPadding,h=this.itemStyle,k=this.itemHiddenStyle,l=this.padding,m=e?t(d.itemDistance,20):0,n=!d.rtl,p=d.width,q=d.itemMarginBottom||0,v=this.itemMarginTop,H=this.initialItemX,w=a.legendItem,u=a.series&&a.series.drawLegendSymbol?a.series:a,J=u.options,J=this.createCheckboxForItem&&J&&J.showCheckbox,A=d.useHTML;w||(a.legendGroup=c.g("legend-item").attr({zIndex:1}).add(this.scrollGroup),
a.legendItem=w=c.text("",n?f+g:-g,this.baseline||0,A).css(F(a.visible?h:k)).attr({align:n?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(this.fontMetrics=c.fontMetrics(h.fontSize,w),this.baseline=this.fontMetrics.f+3+v,w.attr("y",this.baseline)),u.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,w,A,h,k),J&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);this.setText(a);c=w.getBBox();f=a.checkboxOffset=d.itemWidth||a.legendItemWidth||f+g+c.width+m+(J?20:
0);this.itemHeight=g=M(a.legendItemHeight||c.height);e&&this.itemX-H+f>(p||b.chartWidth-2*l-H-d.x)&&(this.itemX=H,this.itemY+=v+this.lastLineHeight+q,this.lastLineHeight=0);this.maxItemWidth=z(this.maxItemWidth,f);this.lastItemY=v+this.itemY+q;this.lastLineHeight=z(g,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];e?this.itemX+=f:(this.itemY+=v+g+q,this.lastLineHeight=g);this.offsetWidth=p||z((e?this.itemX-H-m:f)+l,this.offsetWidth)},getAllItems:function(){var a=[];u(this.chart.series,
function(b){var c=b.options;t(c.showInLegend,r(c.linkedTo)?!1:I,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))});return a},adjustMargins:function(a,b){var c=this.chart,d=this.options,e=d.align.charAt(0)+d.verticalAlign.charAt(0)+d.layout.charAt(0);this.display&&!d.floating&&u([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(f,g){f.test(e)&&!r(a[g])&&(c[ub[g]]=z(c[ub[g]],c.legend[(g+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][g]*d[g%2?"x":"y"]+t(d.margin,
12)+b[g]))})},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.group,e,f,g,h,k=a.box,l=a.options,m=a.padding,n=l.borderWidth,p=l.backgroundColor;a.itemX=a.initialItemX;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;d||(a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup));a.renderTitle();e=a.getAllItems();Ya(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});
l.reversed&&e.reverse();a.allItems=e;a.display=f=!!e.length;a.lastLineHeight=0;u(e,function(b){a.renderItem(b)});g=(l.width||a.offsetWidth)+m;h=a.lastItemY+a.lastLineHeight+a.titleHeight;h=a.handleOverflow(h);h+=m;if(n||p)k?0<g&&0<h&&(k[k.isNew?"attr":"animate"](k.crisp({width:g,height:h})),k.isNew=!1):(a.box=k=c.rect(0,0,g,h,l.borderRadius,n||0).attr({stroke:l.borderColor,"stroke-width":n||0,fill:p||"none"}).add(d).shadow(l.shadow),k.isNew=!0),k[f?"show":"hide"]();a.legendWidth=g;a.legendHeight=
h;u(e,function(b){a.positionItem(b)});f&&d.align(E({width:g,height:h},l),!0,"spacingBox");b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+("top"===e.verticalAlign?-f:f)-this.padding,g=e.maxHeight,h,k=this.clipRect,l=e.navigation,m=t(l.animation,!0),n=l.arrowSize||12,p=this.nav,q=this.pages,v=this.padding,H,w=this.allItems,r=function(a){k.attr({height:a});b.contentGroup.div&&(b.contentGroup.div.style.clip=
"rect("+v+"px,9999px,"+(v+a)+"px,0)")};"horizontal"===e.layout&&(f/=2);g&&(f=Q(f,g));q.length=0;a>f&&!1!==l.enabled?(this.clipHeight=h=z(f-20-this.titleHeight-v,0),this.currentPage=t(this.currentPage,1),this.fullHeight=a,u(w,function(a,b){var c=a._legendItemPos[1],d=M(a.legendItem.getBBox().height),e=q.length;if(!e||c-q[e-1]>h&&(H||c)!==q[e-1])q.push(H||c),e++;b===w.length-1&&c+d-q[e-1]>h&&q.push(c);c!==H&&(H=c)}),k||(k=b.clipRect=d.clipRect(0,v,9999,0),b.contentGroup.clip(k)),r(h),p||(this.nav=p=
d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,n,n).on("click",function(){b.scroll(-1,m)}).add(p),this.pager=d.text("",15,10).css(l.style).add(p),this.down=d.symbol("triangle-down",0,0,n,n).on("click",function(){b.scroll(1,m)}).add(p)),b.scroll(0),a=f):p&&(r(c.chartHeight),p.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,b){var c=this.pages,d=c.length,e=this.currentPage+a,f=this.clipHeight,g=this.options.navigation,h=g.activeColor,
g=g.inactiveColor,k=this.pager,l=this.padding;e>d&&(e=d);0<e&&(b!==I&&cb(b,this.chart),this.nav.attr({translateX:l,translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===e?g:h}).css({cursor:1===e?"default":"pointer"}),k.attr({text:e+"/"+d}),this.down.attr({x:18+this.pager.getBBox().width,fill:e===d?g:h}).css({cursor:e===d?"default":"pointer"}),c=-c[e-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=e,this.positionCheckboxes(c))}};da=
L.LegendSymbolMixin={drawRectangle:function(a,b){var c=a.options.symbolHeight||a.fontMetrics.f;b.legendSymbol=this.chart.renderer.rect(0,a.baseline-c+1,a.symbolWidth,c,a.options.symbolRadius||0).attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var b=this.options,c=b.marker,d=a.symbolWidth,e=this.chart.renderer,f=this.legendGroup;a=a.baseline-M(.3*a.fontMetrics.b);var g;b.lineWidth&&(g={"stroke-width":b.lineWidth},b.dashStyle&&(g.dashstyle=b.dashStyle),this.legendLine=e.path(["M",0,
a,"L",d,a]).attr(g).add(f));c&&!1!==c.enabled&&(b=c.radius,this.legendSymbol=c=e.symbol(this.symbol,d/2-b,a-b,2*b,2*b,c).add(f),c.isMarker=!0)}};(/Trident\/7\.0/.test(Pa)||$a)&&nb(vb.prototype,"positionItem",function(a,b){var c=this,d=function(){b._legendItemPos&&a.call(c,b)};d();setTimeout(d)});var ob=L.Chart=function(){this.getArgs.apply(this,arguments)};L.chart=function(a,b,c){return new ob(a,b,c)};ob.prototype={callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(Aa(a[0])||a[0].nodeName)this.renderTo=
a.shift();this.init(a[0],a[1])},init:function(a,b){var c,d=a.series;a.series=null;c=F(ga,a);c.series=a.series=d;this.userOptions=a;d=c.chart;this.margin=this.splashArray("margin",d);this.spacing=this.splashArray("spacing",d);var e=d.events;this.bounds={h:{},v:{}};this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.hasCartesianSeries=d.showAxes;var f=this,g;f.index=fa.length;fa.push(f);mb++;!1!==d.reflow&&W(f,"load",function(){f.initReflow()});if(e)for(g in e)W(f,g,e[g]);
f.xAxis=[];f.yAxis=[];f.animation=ya?!1:t(d.animation,!0);f.pointCount=f.colorCounter=f.symbolCounter=0;f.firstRender()},initSeries:function(a){var b=this.options.chart;(b=Z[a.type||b.type||b.defaultSeriesType])||U(17,!0);b=new b;b.init(this,a);return b},isInsidePlot:function(a,b,c){var d=c?b:a;a=c?a:b;return 0<=d&&d<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(a){var b=this.axes,c=this.series,d=this.pointer,e=this.legend,f=this.isDirtyLegend,g,h,k=this.hasCartesianSeries,l=this.isDirtyBox,
m=c.length,n=m,p=this.renderer,q=p.isHidden(),v=[];cb(a,this);q&&this.cloneRenderTo();for(this.layOutTitles();n--;)if(a=c[n],a.options.stacking&&(g=!0,a.isDirty)){h=!0;break}if(h)for(n=m;n--;)if(a=c[n],a.options.stacking)a.isDirty=!0;u(c,function(a){a.isDirty&&"point"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),f=!0);a.isDirtyData&&T(a,"updatedData")});f&&e.options.enabled&&(e.render(),this.isDirtyLegend=!1);g&&this.getStacks();k&&!this.isResizing&&(this.maxTicks=null,u(b,function(a){a.setScale()}));
this.getMargins();k&&(u(b,function(a){a.isDirty&&(l=!0)}),u(b,function(a){var b=a.min+","+a.max;a.extKey!==b&&(a.extKey=b,v.push(function(){T(a,"afterSetExtremes",E(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(l||g)&&a.redraw()}));l&&this.drawChartBox();u(c,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()});d&&d.reset(!0);p.draw();T(this,"redraw");q&&this.cloneRenderTo(!0);u(v,function(a){a.call()})},get:function(a){var b=this.axes,c=this.series,d,e;for(d=0;d<b.length;d++)if(b[d].options.id===
a)return b[d];for(d=0;d<c.length;d++)if(c[d].options.id===a)return c[d];for(d=0;d<c.length;d++)for(e=c[d].points||[],b=0;b<e.length;b++)if(e[b].id===a)return e[b];return null},getAxes:function(){var a=this,b=this.options,c=b.xAxis=V(b.xAxis||{}),b=b.yAxis=V(b.yAxis||{});u(c,function(a,b){a.index=b;a.isX=!0});u(b,function(a,b){a.index=b});c=c.concat(b);u(c,function(b){new va(a,b)})},getSelectedPoints:function(){var a=[];u(this.series,function(b){a=a.concat(Ra(b.points||[],function(a){return a.selected}))});
return a},getSelectedSeries:function(){return Ra(this.series,function(a){return a.selected})},setTitle:function(a,b,c){var d=this,e=d.options,f;f=e.title=F(e.title,a);e=e.subtitle=F(e.subtitle,b);u([["title",a,f],["subtitle",b,e]],function(a){var b=a[0],c=d[b],e=a[1];a=a[2];c&&e&&(d[b]=c=c.destroy());a&&a.text&&!c&&(d[b]=d.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+b,zIndex:a.zIndex||4}).css(a.style).add())});d.layOutTitles(c)},layOutTitles:function(a){var b=0,c=
this.title,d=this.subtitle,e=this.options,f=e.title,e=e.subtitle,g=this.renderer,h=this.spacingBox;!c||(c.css({width:(f.width||h.width+f.widthAdjust)+"px"}).align(E({y:g.fontMetrics(f.style.fontSize,c).b-3},f),!1,h),f.floating||f.verticalAlign)||(b=c.getBBox().height);d&&(d.css({width:(e.width||h.width+e.widthAdjust)+"px"}).align(E({y:b+(f.margin-13)+g.fontMetrics(e.style.fontSize,c).b},e),!1,h),!e.floating&&!e.verticalAlign&&(b=Ka(b+d.getBBox().height)));c=this.titleOffset!==b;this.titleOffset=b;
!this.isDirtyBox&&c&&(this.isDirtyBox=c,this.hasRendered&&t(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var a=this.options.chart,b=a.width,a=a.height,c=this.renderToClone||this.renderTo;r(b)||(this.containerWidth=Da(c,"width"));r(a)||(this.containerHeight=Da(c,"height"));this.chartWidth=z(0,b||this.containerWidth||600);this.chartHeight=z(0,t(a,19<this.containerHeight?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),
Ba(b),delete this.renderToClone):(c&&c.parentNode===this.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),N(b,{position:"absolute",top:"-9999px",display:"block"}),b.style.setProperty&&b.style.setProperty("display","block","important"),D.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var a,b=this.options,c=b.chart,d,e;a=this.renderTo;var f="highcharts-"+Cb++;a||(this.renderTo=a=c.renderTo);Aa(a)&&(this.renderTo=a=D.getElementById(a));a||U(13,
!0);d=K(P(a,"data-highcharts-chart"));X(d)&&fa[d]&&fa[d].hasRendered&&fa[d].destroy();P(a,"data-highcharts-chart",this.index);a.innerHTML="";c.skipClone||a.offsetWidth||this.cloneRenderTo();this.getChartSize();d=this.chartWidth;e=this.chartHeight;this.container=a=Y(Za,{className:"highcharts-container"+(c.className?" "+c.className:""),id:f},E({position:"relative",overflow:"hidden",width:d+"px",height:e+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},
c.style),this.renderToClone||a);this._cursor=a.style.cursor;this.renderer=new (L[c.renderer]||kb)(a,d,e,c.style,c.forExport,b.exporting&&b.exporting.allowHTML);ya&&this.renderer.create(this,a,d,e);this.renderer.chartIndex=this.index},getMargins:function(a){var b=this.spacing,c=this.margin,d=this.titleOffset;this.resetMargins();d&&!r(c[0])&&(this.plotTop=z(this.plotTop,d+this.options.title.margin+b[0]));this.legend.adjustMargins(c,b);this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);
this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],c=a.margin;a.hasCartesianSeries&&u(a.axes,function(a){a.visible&&a.getOffset()});u(ub,function(d,e){r(c[e])||(a[d]+=b[e])});a.setChartSize()},reflow:function(a){var b=this,c=b.options.chart,d=b.renderTo,e=c.width||Da(d,"width"),f=c.height||Da(d,"height"),c=a?a.target:x;if(!b.hasUserSize&&!b.isPrinting&&e&&f&&(c===x||c===D)){if(e!==b.containerWidth||f!==b.containerHeight)clearTimeout(b.reflowTimeout),
b.reflowTimeout=qa(function(){b.container&&(b.setSize(e,f,!1),b.hasUserSize=null)},a?100:0);b.containerWidth=e;b.containerHeight=f}},initReflow:function(){var a=this,b=function(b){a.reflow(b)};W(x,"resize",b);W(a,"destroy",function(){ma(x,"resize",b)})},setSize:function(a,b,c){var d=this,e,f,g=d.renderer;d.isResizing+=1;cb(c,d);d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;r(a)&&(d.chartWidth=e=z(0,M(a)),d.hasUserSize=!!e);r(b)&&(d.chartHeight=f=z(0,M(b)));a=g.globalAnimation;(a?eb:
N)(d.container,{width:e+"px",height:f+"px"},a);d.setChartSize(!0);g.setSize(e,f,c);d.maxTicks=null;u(d.axes,function(a){a.isDirty=!0;a.setScale()});u(d.series,function(a){a.isDirty=!0});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.layOutTitles();d.getMargins();d.redraw(c);d.oldChartHeight=null;T(d,"resize");qa(function(){d&&T(d,"endResize",null,function(){--d.isResizing})},hb(a).duration)},setChartSize:function(a){var b=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,f=this.options.chart,
g=this.spacing,h=this.clipOffset,k,l,m,n;this.plotLeft=k=M(this.plotLeft);this.plotTop=l=M(this.plotTop);this.plotWidth=m=z(0,M(d-k-this.marginRight));this.plotHeight=n=z(0,M(e-l-this.marginBottom));this.plotSizeX=b?n:m;this.plotSizeY=b?m:n;this.plotBorderWidth=f.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:g[3],y:g[0],width:d-g[3]-g[1],height:e-g[0]-g[2]};this.plotBox=c.plotBox={x:k,y:l,width:m,height:n};d=2*ja(this.plotBorderWidth/2);b=Ka(z(d,h[3])/2);c=Ka(z(d,h[0])/2);this.clipBox={x:b,y:c,
width:ja(this.plotSizeX-z(d,h[1])/2-b),height:z(0,ja(this.plotSizeY-z(d,h[2])/2-c))};a||u(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this;u(ub,function(b,c){a[b]=t(a.margin[c],a.spacing[c])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g=this.plotBorder,h=this.plotBGImage,k=a.borderWidth||0,l=a.backgroundColor,
m=a.plotBackgroundColor,n=a.plotBackgroundImage,p=a.plotBorderWidth||0,q,v=this.plotLeft,t=this.plotTop,u=this.plotWidth,r=this.plotHeight,J=this.plotBox,A=this.clipRect,z=this.clipBox;q=k+(a.shadow?8:0);if(k||l)e?e.animate(e.crisp({width:c-q,height:d-q})):(e={fill:l||"none"},k&&(e.stroke=a.borderColor,e["stroke-width"]=k),this.chartBackground=b.rect(q/2,q/2,c-q,d-q,a.borderRadius,k).attr(e).addClass("highcharts-background").add().shadow(a.shadow));m&&(f?f.animate(J):this.plotBackground=b.rect(v,
t,u,r,0).attr({fill:m}).add().shadow(a.plotShadow));n&&(h?h.animate(J):this.plotBGImage=b.image(n,v,t,u,r).add());A?A.animate({width:z.width,height:z.height}):this.clipRect=b.clipRect(z);p&&(g?(g.strokeWidth=-p,g.animate(g.crisp({x:v,y:t,width:u,height:r}))):this.plotBorder=b.rect(v,t,u,r,0,-p).attr({stroke:a.plotBorderColor,"stroke-width":p,fill:"none",zIndex:1}).add());this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,f;u(["inverted","angular","polar"],
function(g){c=Z[b.type||b.defaultSeriesType];f=a[g]||b[g]||c&&c.prototype[g];for(e=d&&d.length;!f&&e--;)(c=Z[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},linkSeries:function(){var a=this,b=a.series;u(b,function(a){a.linkedSeries.length=0});u(b,function(b){var d=b.options.linkedTo;Aa(d)&&(d=":previous"===d?a.series[b.index-1]:a.get(d))&&(d.linkedSeries.push(b),b.linkedParent=d,b.visible=t(b.options.visible,d.options.visible,b.visible))})},renderSeries:function(){u(this.series,function(a){a.translate();
a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&u(b.items,function(c){var d=E(b.style,c.style),e=K(d.left)+a.plotLeft,f=K(d.top)+a.plotTop+12;delete d.left;delete d.top;a.renderer.text(c.html,e,f).attr({zIndex:2}).css(d).add()})},render:function(){var a=this.axes,b=this.renderer,c=this.options,d,e,f,g;this.setTitle();this.legend=new vb(this,c.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();d=this.plotWidth;e=this.plotHeight-=21;u(a,function(a){a.setScale()});
this.getAxisMargins();f=1.1<d/this.plotWidth;g=1.05<e/this.plotHeight;if(f||g)this.maxTicks=null,u(a,function(a){(a.horiz&&f||!a.horiz&&g)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&u(a,function(a){a.visible&&a.render()});this.seriesGroup||(this.seriesGroup=b.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.showCredits(c.credits);this.hasRendered=!0},showCredits:function(a){a.enabled&&!this.credits&&(this.credits=this.renderer.text(a.text,
0,0).on("click",function(){a.href&&(x.location.href=a.href)}).attr({align:a.position.align,zIndex:8}).css(a.style).add().align(a.position))},destroy:function(){var a=this,b=a.axes,c=a.series,d=a.container,e,f=d&&d.parentNode;T(a,"destroy");fa[a.index]=I;mb--;a.renderTo.removeAttribute("data-highcharts-chart");ma(a);for(e=b.length;e--;)b[e]=b[e].destroy();for(e=c.length;e--;)c[e]=c[e].destroy();u("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer scroller rangeSelector legend resetZoomButton tooltip renderer".split(" "),
function(b){var c=a[b];c&&c.destroy&&(a[b]=c.destroy())});d&&(d.innerHTML="",ma(d),f&&Ba(d));for(e in a)delete a[e]},isReadyToRender:function(){var a=this;return!ta&&x==x.top&&"complete"!==D.readyState||ya&&!x.canvg?(ya?Rb.push(function(){a.firstRender()},a.options.global.canvasToolsURL):D.attachEvent("onreadystatechange",function(){D.detachEvent("onreadystatechange",a.firstRender);"complete"===D.readyState&&a.firstRender()}),!1):!0},firstRender:function(){var a=this,b=a.options;if(a.isReadyToRender()){a.getContainer();
T(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();u(b.series||[],function(b){a.initSeries(b)});a.linkSeries();T(a,"beforeRender");L.Pointer&&(a.pointer=new fb(a,b));a.render();a.renderer.draw();if(!a.renderer.imgCount&&a.onload)a.onload();a.cloneRenderTo(!0)}},onload:function(){var a=this;u([this.callback].concat(this.callbacks),function(b){b&&void 0!==a.index&&b.apply(a,[a])});T(a,"load");this.onload=null},splashArray:function(a,b){var c=b[a],c=aa(c)?c:[c,c,c,c];return[t(b[a+
"Top"],c[0]),t(b[a+"Right"],c[1]),t(b[a+"Bottom"],c[2]),t(b[a+"Left"],c[3])]}};var Fb=L.CenteredSeriesMixin={getCenter:function(){var a=this.options,b=this.chart,c=2*(a.slicedOffset||0),d=b.plotWidth-2*c,b=b.plotHeight-2*c,e=a.center,e=[t(e[0],"50%"),t(e[1],"50%"),a.size||"100%",a.innerSize||0],f=Q(d,b),g,h;for(g=0;4>g;++g)h=e[g],a=2>g||2===g&&/%$/.test(h),e[g]=(/%$/.test(h)?[d,b,f,e[2]][g]*parseFloat(h)/100:parseFloat(h))+(a?c:0);e[3]>e[2]&&(e[3]=e[2]);return e}},Xa=function(){};Xa.prototype={init:function(a,
b,c){this.series=a;this.color=a.color;this.applyOptions(b,c);this.pointAttr={};a.options.colorByPoint&&(b=a.options.colors||a.chart.options.colors,this.color=this.color||b[a.colorCounter++],a.colorCounter===b.length)&&(a.colorCounter=0);a.chart.pointCount++;return this},applyOptions:function(a,b){var c=this.series,d=c.options.pointValKey||c.pointValKey;a=Xa.prototype.optionsToObject.call(this,a);E(this,a);this.options=this.options?E(this.options,a):a;d&&(this.y=this[d]);this.isNull=null===this.x||
null===this.y;void 0===this.x&&c&&(this.x=void 0===b?c.autoIncrement():b);return this},optionsToObject:function(a){var b={},c=this.series,d=c.options.keys,e=d||c.pointArrayMap||["y"],f=e.length,g=0,h=0;if(X(a)||null===a)b[e[0]]=a;else if(oa(a))for(!d&&a.length>f&&(c=typeof a[0],"string"===c?b.name=a[0]:"number"===c&&(b.x=a[0]),g++);h<f;)d&&void 0===a[g]||(b[e[h]]=a[g]),g++,h++;else"object"===typeof a&&(b=a,a.dataLabels&&(c._hasPointLabels=!0),a.marker&&(c._hasPointMarkers=!0));return b},destroy:function(){var a=
this.series.chart,b=a.hoverPoints,c;a.pointCount--;b&&(this.setState(),ka(b,this),!b.length)&&(a.hoverPoints=null);if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)ma(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(c in this)this[c]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],b,c=6;c--;)b=a[c],this[b]&&(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,
y:this.y,color:this.color,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=t(c.valueDecimals,""),e=c.valuePrefix||"",f=c.valueSuffix||"";u(b.pointArrayMap||["y"],function(b){b="{point."+b;if(e||f)a=a.replace(b+"}",e+b+"}"+f);a=a.replace(b+"}",b+":,."+d+"f}")});return Fa(a,{point:this,series:this.series})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;
(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents();"click"===a&&e.allowPointSelect&&(c=function(a){d.select&&d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});T(this,a,b,c)},visible:!0};var ca=L.Series=function(){};ca.prototype={isCartesian:!0,type:"line",pointClass:Xa,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x",
"y"],init:function(a,b){var c=this,d,e,f=a.series,g=function(a,b){return t(a.options.index,a._i)-t(b.options.index,b._i)};c.chart=a;c.options=b=c.setOptions(b);c.linkedSeries=[];c.bindAxes();E(c,{name:b.name,state:"",pointAttr:{},visible:!1!==b.visible,selected:!0===b.selected});ya&&(b.animation=!1);e=b.events;for(d in e)W(c,d,e[d]);if(e&&e.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;c.getColor();c.getSymbol();u(c.parallelArrays,function(a){c[a+"Data"]=
[]});c.setData(b.data,!1);c.isCartesian&&(a.hasCartesianSeries=!0);f.push(c);c._i=f.length-1;Ya(f,g);this.yAxis&&Ya(this.yAxis.series,g);u(f,function(a,b){a.index=b;a.name=a.name||"Series "+(b+1)})},bindAxes:function(){var a=this,b=a.options,c=a.chart,d;u(a.axisTypes||[],function(e){u(c[e],function(c){d=c.options;if(b[e]===d.index||b[e]!==I&&b[e]===d.id||b[e]===I&&0===d.index)c.series.push(a),a[e]=c,c.isDirty=!0});!a[e]&&a.optionalAxis!==e&&U(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,
d=arguments,e=X(b)?function(d){var e="y"===d&&c.toYData?c.toYData(a):a[d];c[d+"Data"][b]=e}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))};u(c.parallelArrays,e)},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,d=a.pointIntervalUnit,b=t(b,a.pointStart,0);this.pointInterval=c=t(this.pointInterval,a.pointInterval,1);d&&(a=new Ca(b),"day"===d?a=+a[rb](a[db]()+c):"month"===d?a=+a[Ab](a[ib]()+c):"year"===d&&(a=+a[Bb](a[jb]()+c)),c=a-b);this.xIncrement=
b+c;return b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},d=b.plotOptions||{},e=c[this.type];this.userOptions=a;c=F(e,c.series,a);this.tooltipOptions=F(ga.tooltip,ga.plotOptions[this.type].tooltip,b.tooltip,d.series&&d.series.tooltip,d[this.type]&&d[this.type].tooltip,a.tooltip);null===e.marker&&delete c.marker;this.zoneAxis=c.zoneAxis;a=this.zones=(c.zones||[]).slice();!c.negativeColor&&!c.negativeFillColor||c.zones||a.push({value:c[this.zoneAxis+"Threshold"]||
c.threshold||0,color:c.negativeColor,fillColor:c.negativeFillColor});a.length&&r(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});return c},getCyclic:function(a,b,c){var d=this.userOptions,e="_"+a+"Index",f=a+"Counter";b||(r(d[e])?b=d[e]:(d[e]=b=this.chart[f]%c.length,this.chart[f]+=1),b=c[b]);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||sa[this.type].color,this.chart.options.colors)},getSymbol:function(){var a=
this.options.marker;this.getCyclic("symbol",a.symbol,this.chart.options.symbols);/^url/.test(this.symbol)&&(a.radius=0)},drawLegendSymbol:da.drawLineMarker,setData:function(a,b,c,d){var e=this,f=e.points,g=f&&f.length||0,h,k=e.options,l=e.chart,m=null,n=e.xAxis,p=n&&!!n.categories,q=k.turboThreshold,v=this.xData,H=this.yData,w=(h=e.pointArrayMap)&&h.length;a=a||[];h=a.length;b=t(b,!0);if(!1!==d&&h&&g===h&&!e.cropped&&!e.hasGroupedData&&e.visible)u(a,function(a,b){f[b].update&&a!==k.data[b]&&f[b].update(a,
!1,null,!1)});else{e.xIncrement=null;e.colorCounter=0;u(this.parallelArrays,function(a){e[a+"Data"].length=0});if(q&&h>q){for(c=0;null===m&&c<h;)m=a[c],c++;if(X(m)){p=t(k.pointStart,0);m=t(k.pointInterval,1);for(c=0;c<h;c++)v[c]=p,H[c]=a[c],p+=m;e.xIncrement=p}else if(oa(m))if(w)for(c=0;c<h;c++)m=a[c],v[c]=m[0],H[c]=m.slice(1,w+1);else for(c=0;c<h;c++)m=a[c],v[c]=m[0],H[c]=m[1];else U(12)}else for(c=0;c<h;c++)a[c]!==I&&(m={series:e},e.pointClass.prototype.applyOptions.apply(m,[a[c]]),e.updateParallelArrays(m,
c),p&&r(m.name))&&(n.names[m.x]=m.name);Aa(H[0])&&U(14,!0);e.data=[];e.options.data=e.userOptions.data=a;for(c=g;c--;)f[c]&&f[c].destroy&&f[c].destroy();n&&(n.minRange=n.userMinRange);e.isDirty=e.isDirtyData=l.isDirtyBox=!0;c=!1}"point"===k.legendType&&(this.processData(),this.generatePoints());b&&l.redraw(c)},processData:function(a){var b=this.xData,c=this.yData,d=b.length,e;e=0;var f,g,h=this.xAxis,k,l=this.options;k=l.cropThreshold;var m=this.getExtremesFromAll||l.getExtremesFromAll,n=this.isCartesian,
l=h&&h.val2lin,p=h&&h.isLog,q,v;if(n&&!this.isDirty&&!h.isDirty&&!this.yAxis.isDirty&&!a)return!1;h&&(a=h.getExtremes(),q=a.min,v=a.max);if(n&&this.sorted&&!m&&(!k||d>k||this.forceCrop))if(b[d-1]<q||b[0]>v)b=[],c=[];else if(b[0]<q||b[d-1]>v)e=this.cropData(this.xData,this.yData,q,v),b=e.xData,c=e.yData,e=e.start,f=!0;for(k=b.length||1;--k;)d=p?l(b[k])-l(b[k-1]):b[k]-b[k-1],0<d&&(g===I||d<g)?g=d:0>d&&this.requireSorting&&U(15);this.cropped=f;this.cropStart=e;this.processedXData=b;this.processedYData=
c;this.closestPointRange=g},cropData:function(a,b,c,d){var e=a.length,f=0,g=e,h=t(this.cropShoulder,1),k;for(k=0;k<e;k++)if(a[k]>=c){f=z(0,k-h);break}for(c=k;c<e;c++)if(a[c]>d){g=c+h;break}return{xData:a.slice(f,g),yData:b.slice(f,g),start:f,end:g}},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,e=this.processedYData,f=this.pointClass,g=d.length,h=this.cropStart||0,k,l=this.hasGroupedData,m,n=[],p;b||l||(b=[],b.length=a.length,b=this.data=b);for(p=0;p<g;p++)k=
h+p,l?(n[p]=(new f).init(this,[d[p]].concat(V(e[p]))),n[p].dataGroup=this.groupMap[p]):(b[k]?m=b[k]:a[k]!==I&&(b[k]=m=(new f).init(this,a[k],d[p])),n[p]=m),n[p].index=k;if(b&&(g!==(c=b.length)||l))for(p=0;p<c;p++)if(p===h&&!l&&(p+=g),b[p])b[p].destroyElements(),b[p].plotX=I;this.data=b;this.points=n},getExtremes:function(a){var b=this.yAxis,c=this.processedXData,d,e=[],f=0;d=this.xAxis.getExtremes();var g=d.min,h=d.max,k,l,m,n;a=a||this.stackedYData||this.processedYData||[];d=a.length;for(n=0;n<d;n++)if(l=
c[n],m=a[n],k=null!==m&&m!==I&&(!b.isLog||m.length||0<m),l=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(c[n+1]||l)>=g&&(c[n-1]||l)<=h,k&&l)if(k=m.length)for(;k--;)null!==m[k]&&(e[f++]=m[k]);else e[f++]=m;this.dataMin=G(e);this.dataMax=Ua(e)},translate:function(){this.processedXData||this.processData();this.generatePoints();for(var a=this.options,b=a.stacking,c=this.xAxis,d=c.categories,e=this.yAxis,f=this.points,g=f.length,h=!!this.modifyValue,k=a.pointPlacement,l="between"===
k||X(k),m=a.threshold,n=a.startFromThreshold?m:0,p,q,v,u,w=Number.MAX_VALUE,a=0;a<g;a++){var y=f[a],J=y.x,A=y.y;q=y.low;var B=b&&e.stacks[(this.negStacks&&A<(n?0:m)?"-":"")+this.stackKey];e.isLog&&null!==A&&0>=A&&(y.y=A=null,U(10));y.plotX=p=C(Q(z(-1E5,c.translate(J,0,0,0,1,k,"flags"===this.type)),1E5));b&&this.visible&&!y.isNull&&B&&B[J]&&(u=this.getStackIndicator(u,J,this.index),B=B[J],A=B.points[u.key],q=A[0],A=A[1],q===n&&(q=t(m,e.min)),e.isLog&&0>=q&&(q=null),y.total=y.stackTotal=B.total,y.percentage=
B.total&&y.y/B.total*100,y.stackY=A,B.setOffset(this.pointXOffset||0,this.barW||0));y.yBottom=r(q)?e.translate(q,0,1,0,1):null;h&&(A=this.modifyValue(A,y));y.plotY=q="number"===typeof A&&Infinity!==A?Q(z(-1E5,e.translate(A,0,1,0,1)),1E5):I;y.isInside=q!==I&&0<=q&&q<=e.len&&0<=p&&p<=c.len;y.clientX=l?c.translate(J,0,0,0,1):p;y.negative=y.y<(m||0);y.category=d&&d[y.x]!==I?d[y.x]:y.x;y.isNull||(void 0!==v&&(w=Q(w,ba(p-v))),v=p)}this.closestPointRangePx=w},getValidPoints:function(a,b){var c=this.chart;
return Ra(a||this.points||[],function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,d=b.renderer,e=b.inverted,f=this.clipBox,g=f||b.clipBox,h=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,g.height,c.xAxis,c.yAxis].join(),k=b[h],l=b[h+"m"];k||(a&&(g.width=0,b[h+"m"]=l=d.clipRect(-99,e?-b.plotLeft:-b.plotTop,99,e?b.chartWidth:b.chartHeight)),b[h]=k=d.clipRect(g));a&&(k.count+=1);!1!==c.clip&&(this.group.clip(a||
f?k:b.clipRect),this.markerGroup.clip(l),this.sharedClipKey=h);a||(--k.count,0>=k.count&&h&&b[h]&&(f||(b[h]=b[h].destroy()),b[h+"m"]&&(b[h+"m"]=b[h+"m"].destroy())))},animate:function(a){var b=this.chart,c=this.options.animation,d;c&&!aa(c)&&(c=sa[this.type].animation);a?this.setClip(c):(d=this.sharedClipKey,(a=b[d])&&a.animate({width:b.plotSizeX},c),b[d+"m"]&&b[d+"m"].animate({width:b.plotSizeX+99},c),this.animate=null)},afterAnimate:function(){this.setClip();T(this,"afterAnimate")},drawPoints:function(){var a,
b=this.points,c=this.chart,d,e,f,g,h,k,l,m,n=this.options.marker,p=this.pointAttr[""],q,v,u,w=this.markerGroup,y=t(n.enabled,this.xAxis.isRadial,this.closestPointRangePx>2*n.radius);if(!1!==n.enabled||this._hasPointMarkers)for(f=b.length;f--;)(g=b[f],d=ja(g.plotX),e=g.plotY,m=g.graphic,q=g.marker||{},v=!!g.marker,a=y&&q.enabled===I||q.enabled,u=g.isInside,a&&X(e)&&null!==g.y)?(a=g.pointAttr[g.selected?"select":""]||p,h=a.r,k=t(q.symbol,this.symbol),l=0===k.indexOf("url"),m)?m[u?"show":"hide"](!0).attr(a).animate(E({x:d-
h,y:e-h},m.symbolName?{width:2*h,height:2*h}:{})):u&&(0<h||l)&&(g.graphic=c.renderer.symbol(k,d-h,e-h,2*h,2*h,v?q:n).attr(a).add(w)):m&&(g.graphic=m.destroy())},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e)g=e[f],h[f]=t(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var a=this,b=a.options,c=sa[a.type].marker?b.marker:b,d=c.states,e=d.hover,f,g=a.color,h=a.options.negativeColor,k={stroke:g,fill:g},l=a.points||[],m,n=[],p,q=
a.pointAttrToOptions;f=a.hasPointSpecificOptions;var v=c.lineColor,H=c.fillColor;m=b.turboThreshold;var w=a.zones,y=a.zoneAxis||"y",J,A;b.marker?(e.radius=e.radius||c.radius+e.radiusPlus,e.lineWidth=e.lineWidth||c.lineWidth+e.lineWidthPlus):(e.color=e.color||R(e.color||g).brighten(e.brightness).get(),e.negativeColor=e.negativeColor||R(e.negativeColor||h).brighten(e.brightness).get());n[""]=a.convertAttribs(c,k);u(["hover","select"],function(b){n[b]=a.convertAttribs(d[b],n[""])});a.pointAttr=n;g=l.length;
if(!m||g<m||f)for(;g--;){m=l[g];(c=m.options&&m.options.marker||m.options)&&!1===c.enabled&&(c.radius=0);k=null;if(w.length){f=0;for(k=w[f];m[y]>=k.value;)k=w[++f];m.color=m.fillColor=k=t(k.color,a.color)}f=b.colorByPoint||m.color;if(m.options)for(A in q)r(c[q[A]])&&(f=!0);if(f){c=c||{};p=[];d=c.states||{};f=d.hover=d.hover||{};if(!b.marker||m.negative&&!f.fillColor&&!e.fillColor)f[a.pointAttrToOptions.fill]=f.color||!m.options.color&&e[m.negative&&h?"negativeColor":"color"]||R(m.color).brighten(f.brightness||
e.brightness).get();J={color:m.color};H||(J.fillColor=m.color);v||(J.lineColor=m.color);c.hasOwnProperty("color")&&!c.color&&delete c.color;k&&!e.fillColor&&(f.fillColor=k);p[""]=a.convertAttribs(E(J,c),n[""]);p.hover=a.convertAttribs(d.hover,n.hover,p[""]);p.select=a.convertAttribs(d.select,n.select,p[""])}else p=n;m.pointAttr=p}},destroy:function(){var a=this,b=a.chart,c=/AppleWebKit\/533/.test(Pa),d,e=a.data||[],f,g,h;T(a,"destroy");ma(a);u(a.axisTypes||[],function(b){if(h=a[b])ka(h.series,a),
h.isDirty=h.forceRedraw=!0});a.legendItem&&a.chart.legend.destroyItem(a);for(d=e.length;d--;)(f=e[d])&&f.destroy&&f.destroy();a.points=null;clearTimeout(a.animationTimeout);for(g in a)a[g]instanceof S&&!a[g].survive&&(d=c&&"group"===g?"hide":"destroy",a[g][d]());b.hoverSeries===a&&(b.hoverSeries=null);ka(b.series,a);for(g in a)delete a[g]},getGraphPath:function(a,b,c){var d=this,e=d.options,f=e.step,g,h=[],k;a=a||d.points;(g=a.reversed)&&a.reverse();(f={right:1,center:2}[f]||f&&3)&&g&&(f=4-f);e.connectNulls&&
!b&&!c&&(a=this.getValidPoints(a));u(a,function(g,m){var n=g.plotX,p=g.plotY,q=a[m-1];(g.leftCliff||q&&q.rightCliff)&&!c&&(k=!0);g.isNull&&!r(b)&&0<m?k=!e.connectNulls:g.isNull&&!b?k=!0:(0===m||k?q=["M",g.plotX,g.plotY]:d.getPointSpline?q=d.getPointSpline(a,g,m):f?(q=1===f?["L",q.plotX,p]:2===f?["L",(q.plotX+n)/2,q.plotY,"L",(q.plotX+n)/2,p]:["L",n,q.plotY],q.push("L",n,p)):q=["L",n,p],h.push.apply(h,q),k=!1)});return d.graphPath=h},drawGraph:function(){var a=this,b=this.options,c=[["graph",b.lineColor||
this.color,b.dashStyle]],d=b.lineWidth,e="square"!==b.linecap,f=(this.gappedPath||this.getGraphPath).call(this),g=this.fillGraph&&this.color||"none";u(this.zones,function(d,e){c.push(["zoneGraph"+e,d.color||a.color,d.dashStyle||b.dashStyle])});u(c,function(c,k){var l=c[0],m=a[l];m?m.animate({d:f}):(d||g)&&f.length&&(m={stroke:c[1],"stroke-width":d,fill:g,zIndex:1},c[2]?m.dashstyle=c[2]:e&&(m["stroke-linecap"]=m["stroke-linejoin"]="round"),a[l]=a.chart.renderer.path(f).attr(m).add(a.group).shadow(2>
k&&b.shadow))})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,d=this.zones,e,f,g=this.clips||[],h,k=this.graph,l=this.area,m=z(b.chartWidth,b.chartHeight),n=this[(this.zoneAxis||"y")+"Axis"],p,q=n.reversed,v=b.inverted,y=n.horiz,w,r,J,A=!1;d.length&&(k||l)&&n.min!==I&&(k&&k.hide(),l&&l.hide(),p=n.getExtremes(),u(d,function(d,u){e=q?y?b.plotWidth:0:y?0:n.toPixels(p.min);e=Q(z(t(f,e),0),m);f=Q(z(M(n.toPixels(t(d.value,p.max),!0)),0),m);A&&(e=f=n.toPixels(p.max));w=Math.abs(e-f);r=Q(e,
f);J=z(e,f);if(n.isXAxis)(h={x:v?J:r,y:0,width:w,height:m},y)||(h.x=b.plotHeight-h.x);else if(h={x:0,y:v?J:r,width:m,height:w},y)h.y=b.plotWidth-h.y;b.inverted&&c.isVML&&(h=n.isXAxis?{x:0,y:q?r:J,height:h.width,width:b.chartWidth}:{x:h.y-b.plotLeft-b.spacingBox.x,y:0,width:h.height,height:b.chartHeight});g[u]?g[u].animate(h):(g[u]=c.clipRect(h),k&&a["zoneGraph"+u].clip(g[u]),l&&a["zoneArea"+u].clip(g[u]));A=d.value>p.max}),this.clips=g)},invertGroups:function(){function a(){var a={width:b.yAxis.len,
height:b.xAxis.len};u(["group","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})}var b=this,c=b.chart;b.xAxis&&(W(c,"resize",a),W(b,"destroy",function(){ma(c,"resize",a)}),a(),b.invertGroups=a)},plotGroup:function(a,b,c,d,e){var f=this[a],g=!f;g&&(this[a]=f=this.chart.renderer.g(b).attr({zIndex:d||.1}).add(e),f.addClass("highcharts-series-"+this.index));f.attr({visibility:c})[g?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&
(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,d=a.options,e=!!a.animate&&b.renderer.isSVG&&hb(d.animation).duration,f=a.visible?"inherit":"hidden",g=d.zIndex,h=a.hasRendered,k=b.seriesGroup;c=a.plotGroup("group","series",f,g,k);a.markerGroup=a.plotGroup("markerGroup","markers",f,g,k);e&&a.animate(!0);a.getAttribs();c.inverted=a.isCartesian?b.inverted:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());
u(a.points,function(a){a.redraw&&a.redraw()});a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();b.inverted&&a.invertGroups();!1===d.clip||a.sharedClipKey||h||c.clip(b.clipRect);e&&a.animate();h||(a.animationTimeout=qa(function(){a.afterAnimate()},e));a.isDirty=a.isDirtyData=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,c=this.group,d=this.xAxis,e=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,
height:a.plotHeight}),c.animate({translateX:t(d&&d.left,a.plotLeft),translateY:t(e&&e.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdDimensions:1,kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,d=this.yAxis,e=this.chart.inverted;return this.searchKDTree({clientX:e?c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:e?d.len-a.chartX+d.pos:a.chartY-d.pos},b)},buildKDTree:function(){function a(c,e,f){var g,h;if(h=c&&c.length)return g=b.kdAxisArray[e%f],c.sort(function(a,
b){return a[g]-b[g]}),h=Math.floor(h/2),{point:c[h],left:a(c.slice(0,h),e+1,f),right:a(c.slice(h+1),e+1,f)}}var b=this,c=b.kdDimensions;delete b.kdTree;qa(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),c,c)},b.options.kdNow?0:1)},searchKDTree:function(a,b){function c(a,b,l,m){var n=b.point,p=d.kdAxisArray[l%m],q,v,t=n;v=r(a[e])&&r(n[e])?Math.pow(a[e]-n[e],2):null;q=r(a[f])&&r(n[f])?Math.pow(a[f]-n[f],2):null;q=(v||0)+(q||0);n.dist=r(q)?Math.sqrt(q):Number.MAX_VALUE;n.distX=r(v)?Math.sqrt(v):
Number.MAX_VALUE;p=a[p]-n[p];q=0>p?"left":"right";v=0>p?"right":"left";b[q]&&(q=c(a,b[q],l+1,m),t=q[g]<t[g]?q:n);b[v]&&Math.sqrt(p*p)<t[g]&&(a=c(a,b[v],l+1,m),t=a[g]<t[g]?a:t);return t}var d=this,e=this.kdAxisArray[0],f=this.kdAxisArray[1],g=b?"distX":"dist";this.kdTree||this.buildKDTree();if(this.kdTree)return c(a,this.kdTree,this.kdDimensions,this.kdDimensions)}};Nb.prototype={destroy:function(){Ja(this,this.axis)},render:function(a){var b=this.options,c=b.format,c=c?Fa(c,this):b.formatter.call(this);
this.label?this.label.attr({text:c,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(c,null,null,b.useHTML).css(b.style).attr({align:this.textAlign,rotation:b.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,b){var c=this.axis,d=c.chart,e=d.inverted,f=c.reversed,f=this.isNegative&&!f||!this.isNegative&&f,g=c.translate(c.usePercentage?100:this.total,0,0,0,1),c=c.translate(0),c=ba(g-c),h=d.xAxis[0].translate(this.x)+a,k=d.plotHeight,f={x:e?f?g:g-c:h,y:e?k-h-b:f?k-g-c:k-g,width:e?
c:b,height:e?b:c};if(e=this.label)e.align(this.alignOptions,null,f),f=e.alignAttr,e[!1===this.options.crop||d.isInsidePlot(f.x,f.y)?"show":"hide"](!0)}};ob.prototype.getStacks=function(){var a=this;u(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});u(a.series,function(b){!b.options.stacking||!0!==b.visible&&!1!==a.options.chart.ignoreHiddenSeries||(b.stackKey=b.type+t(b.options.stack,""))})};va.prototype.buildStacks=function(){var a=this.series,b,c=t(this.options.reversedStacks,
!0),d=a.length,e;if(!this.isXAxis){this.usePercentage=!1;for(e=d;e--;)a[c?e:d-e-1].setStackedPoints();for(e=d;e--;)b=a[c?e:d-e-1],b.setStackCliffs&&b.setStackCliffs();if(this.usePercentage)for(e=0;e<d;e++)a[e].setPercentStacks()}};va.prototype.renderStackTotals=function(){var a=this.chart,b=a.renderer,c=this.stacks,d,e,f=this.stackTotalGroup;f||(this.stackTotalGroup=f=b.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());f.translate(a.plotLeft,a.plotTop);for(d in c)for(e in a=c[d],a)a[e].render(f)};
va.prototype.resetStacks=function(){var a=this.stacks,b,c;if(!this.isXAxis)for(b in a)for(c in a[b])a[b][c].touched<this.stacksTouched?(a[b][c].destroy(),delete a[b][c]):(a[b][c].total=null,a[b][c].cum=0)};va.prototype.cleanStacks=function(){var a,b,c;if(!this.isXAxis)for(b in this.oldStacks&&(a=this.stacks=this.oldStacks),a)for(c in a[b])a[b][c].cum=a[b][c].total};ca.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var a=
this.processedXData,b=this.processedYData,c=[],d=b.length,e=this.options,f=e.threshold,g=e.startFromThreshold?f:0,h=e.stack,e=e.stacking,k=this.stackKey,l="-"+k,m=this.negStacks,n=this.yAxis,p=n.stacks,q=n.oldStacks,v,u,w,y,r,A,B;n.stacksTouched+=1;for(r=0;r<d;r++)A=a[r],B=b[r],v=this.getStackIndicator(v,A,this.index),y=v.key,w=(u=m&&B<(g?0:f))?l:k,p[w]||(p[w]={}),p[w][A]||(q[w]&&q[w][A]?(p[w][A]=q[w][A],p[w][A].total=null):p[w][A]=new Nb(n,n.options.stackLabels,u,A,h)),w=p[w][A],null!==B&&(w.points[y]=
w.points[this.index]=[t(w.cum,g)],w.touched=n.stacksTouched,0<v.index&&!1===this.singleStacks&&(w.points[y][0]=w.points[this.index+","+A+",0"][0])),"percent"===e?(u=u?k:l,m&&p[u]&&p[u][A]?(u=p[u][A],w.total=u.total=z(u.total,w.total)+ba(B)||0):w.total=C(w.total+(ba(B)||0))):w.total=C(w.total+(B||0)),w.cum=t(w.cum,g)+(B||0),null!==B&&(w.points[y].push(w.cum),c[r]=w.cum);"percent"===e&&(n.usePercentage=!0);this.stackedYData=c;n.oldStacks={}}};ca.prototype.setPercentStacks=function(){var a=this,b=a.stackKey,
c=a.yAxis.stacks,d=a.processedXData,e;u([b,"-"+b],function(b){for(var g,h=d.length,k,l;h--;)if(k=d[h],e=a.getStackIndicator(e,k,a.index),g=(l=c[b]&&c[b][k])&&l.points[e.key],k=g)l=l.total?100/l.total:0,k[0]=C(k[0]*l),k[1]=C(k[1]*l),a.stackedYData[h]=k[1]})};ca.prototype.getStackIndicator=function(a,b,c){r(a)&&a.x===b?a.index++:a={x:b,index:0};a.key=[c,b,a.index].join();return a};E(ob.prototype,{addSeries:function(a,b,c){var d,e=this;a&&(b=t(b,!0),T(e,"addSeries",{options:a},function(){d=e.initSeries(a);
e.isDirtyLegend=!0;e.linkSeries();b&&e.redraw(c)}));return d},addAxis:function(a,b,c,d){var e=b?"xAxis":"yAxis",f=this.options;a=F(a,{index:this[e].length,isX:b});new va(this,a);f[e]=V(f[e]||{});f[e].push(a);t(c,!0)&&this.redraw(d)},showLoading:function(a){var b=this,c=b.options,d=b.loadingDiv,e=c.loading,f=function(){d&&N(d,{left:b.plotLeft+"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};d||(b.loadingDiv=d=Y(Za,{className:"highcharts-loading"},E(e.style,{zIndex:10,display:"none"}),
b.container),b.loadingSpan=Y("span",null,e.labelStyle,d),W(b,"redraw",f));b.loadingSpan.innerHTML=a||c.lang.loading;b.loadingShown||(N(d,{opacity:0,display:""}),eb(d,{opacity:e.style.opacity},{duration:e.showDuration||0}),b.loadingShown=!0);f()},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&eb(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){N(b,{display:"none"})}});this.loadingShown=!1}});E(Xa.prototype,{update:function(a,b,c,d){function e(){f.applyOptions(a);
null===f.y&&h&&(f.graphic=h.destroy());aa(a)&&!oa(a)&&(f.redraw=function(){h&&h.element&&a&&a.marker&&a.marker.symbol&&(f.graphic=h.destroy());a&&a.dataLabels&&f.dataLabel&&(f.dataLabel=f.dataLabel.destroy());f.redraw=null});k=f.index;g.updateParallelArrays(f,k);n&&f.name&&(n[f.x]=f.name);m.data[k]=aa(m.data[k])&&!oa(m.data[k])?f.options:a;g.isDirty=g.isDirtyData=!0;!g.fixedBox&&g.hasCartesianSeries&&(l.isDirtyBox=!0);"point"===m.legendType&&(l.isDirtyLegend=!0);b&&l.redraw(c)}var f=this,g=f.series,
h=f.graphic,k,l=g.chart,m=g.options,n=g.xAxis&&g.xAxis.names;b=t(b,!0);!1===d?e():f.firePointEvent("update",{options:a},e)},remove:function(a,b){this.series.removePoint(Ha(this,this.series.data),a,b)}});E(ca.prototype,{addPoint:function(a,b,c,d){var e=this,f=e.options,g=e.data,h=e.graph,k=e.area,l=e.chart,m=e.xAxis&&e.xAxis.names,n=h&&h.shift||0,p=["graph","area"],h=f.data,q,v=e.xData;cb(d,l);if(c){for(d=e.zones.length;d--;)p.push("zoneGraph"+d,"zoneArea"+d);u(p,function(a){e[a]&&(e[a].shift=n+(f.step?
2:1))})}k&&(k.isArea=!0);b=t(b,!0);k={series:e};e.pointClass.prototype.applyOptions.apply(k,[a]);p=k.x;d=v.length;if(e.requireSorting&&p<v[d-1])for(q=!0;d&&v[d-1]>p;)d--;e.updateParallelArrays(k,"splice",d,0,0);e.updateParallelArrays(k,d);m&&k.name&&(m[p]=k.name);h.splice(d,0,a);q&&(e.data.splice(d,0,null),e.processData());"point"===f.legendType&&e.generatePoints();c&&(g[0]&&g[0].remove?g[0].remove(!1):(g.shift(),e.updateParallelArrays(k,"shift"),h.shift()));e.isDirty=!0;e.isDirtyData=!0;b&&(e.getAttribs(),
l.redraw())},removePoint:function(a,b,c){var d=this,e=d.data,f=e[a],g=d.points,h=d.chart,k=function(){g&&g.length===e.length&&g.splice(a,1);e.splice(a,1);d.options.data.splice(a,1);d.updateParallelArrays(f||{series:d},"splice",a,1);f&&f.destroy();d.isDirty=!0;d.isDirtyData=!0;b&&h.redraw()};cb(c,h);b=t(b,!0);f?f.firePointEvent("remove",null,k):k()},remove:function(a,b){var c=this,d=c.chart;T(c,"remove",null,function(){c.destroy();d.isDirtyLegend=d.isDirtyBox=!0;d.linkSeries();t(a,!0)&&d.redraw(b)})},
update:function(a,b){var c=this,d=this.chart,e=this.userOptions,f=this.type,g=Z[f].prototype,h=["group","markerGroup","dataLabelsGroup"],k;if(a.type&&a.type!==f||void 0!==a.zIndex)h.length=0;u(h,function(a){h[a]=c[a];delete c[a]});a=F(e,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},a);this.remove(!1);for(k in g)this[k]=I;E(this,Z[a.type||f].prototype);u(h,function(a){c[a]=h[a]});this.init(d,a);d.linkSeries();t(b,!0)&&d.redraw(!1)}});E(va.prototype,{update:function(a,
b){var c=this.chart;a=c.options[this.coll][this.options.index]=F(this.userOptions,a);this.destroy(!0);this._addedPlotLB=this.chart._labelPanes=I;this.init(c,E(a,{events:I}));c.isDirtyBox=!0;t(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,d=this.series,e=d.length;e--;)d[e]&&d[e].remove(!1);ka(b.axes,this);ka(b[c],this);b.options[c].splice(this.options.index,1);u(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;t(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},
b)},setCategories:function(a,b){this.update({categories:a},b)}});var Ma=ia(ca);Z.line=Ma;sa.area=F(ua,{softThreshold:!1,threshold:0});var Ea=ia(ca,{type:"area",singleStacks:!1,getStackPoints:function(){var a=[],b=[],c=this.xAxis,d=this.yAxis,e=d.stacks[this.stackKey],f={},g=this.points,h=this.index,k=d.series,l=k.length,m,n=t(d.options.reversedStacks,!0)?1:-1,p,q;if(this.options.stacking){for(p=0;p<g.length;p++)f[g[p].x]=g[p];for(q in e)null!==e[q].total&&b.push(q);b.sort(function(a,b){return a-b});
m=Sa(k,function(){return this.visible});u(b,function(g,k){var q=0,t,y;if(f[g]&&!f[g].isNull)a.push(f[g]),u([-1,1],function(a){var c=1===a?"rightNull":"leftNull",d=0,q=e[b[k+a]];if(q)for(p=h;0<=p&&p<l;)(t=q.points[p])||(p===h?f[g][c]=!0:m[p]&&(y=e[g].points[p])&&(d-=y[1]-y[0])),p+=n;f[g][1===a?"rightCliff":"leftCliff"]=d});else{for(p=h;0<=p&&p<l;){if(t=e[g].points[p]){q=t[1];break}p+=n}q=d.toPixels(q,!0);a.push({isNull:!0,plotX:c.toPixels(g,!0),plotY:q,yBottom:q})}})}return a},getGraphPath:function(a){var b=
ca.prototype.getGraphPath,c=this.options,d=c.stacking,e=this.yAxis,f,g,h=[],k=[],l=this.index,m,n=e.stacks[this.stackKey],p=c.threshold,q=e.getThreshold(c.threshold),v,c=c.connectNulls||"percent"===d,u=function(b,c,f){var g=a[b];b=d&&n[g.x].points[l];var v=g[f+"Null"]||0;f=g[f+"Cliff"]||0;var t,u,g=!0;f||v?(t=(v?b[0]:b[1])+f,u=b[0]+f,g=!!v):!d&&a[c]&&a[c].isNull&&(t=u=p);void 0!==t&&(k.push({plotX:m,plotY:null===t?q:e.getThreshold(t),isNull:g}),h.push({plotX:m,plotY:null===u?q:e.getThreshold(u)}))};
a=a||this.points;d&&(a=this.getStackPoints());for(f=0;f<a.length;f++)if(g=a[f].isNull,m=t(a[f].rectPlotX,a[f].plotX),v=t(a[f].yBottom,q),!g||c)c||u(f,f-1,"left"),g&&!d&&c||(k.push(a[f]),h.push({x:f,plotX:m,plotY:v})),c||u(f,f+1,"right");f=b.call(this,k,!0,!0);h.reversed=!0;g=b.call(this,h,!0,!0);g.length&&(g[0]="L");f=f.concat(g);b=b.call(this,k,!1,c);this.areaPath=f;return b},drawGraph:function(){this.areaPath=[];ca.prototype.drawGraph.apply(this);var a=this,b=this.areaPath,c=this.options,d=[["area",
this.color,c.fillColor]];u(this.zones,function(b,f){d.push(["zoneArea"+f,b.color||a.color,b.fillColor||c.fillColor])});u(d,function(d){var f=d[0],g=a[f];g?g.animate({d:b}):(g={fill:d[2]||d[1],zIndex:0},d[2]||(g["fill-opacity"]=t(c.fillOpacity,.75)),a[f]=a.chart.renderer.path(b).attr(g).add(a.group))})},drawLegendSymbol:da.drawRectangle});Z.area=Ea;sa.spline=F(ua);Ma=ia(ca,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1];c=a[c+1];var g,h,k,l;if(f&&!f.isNull&&c&&!c.isNull){a=
f.plotY;k=c.plotX;c=c.plotY;var m=0;g=(1.5*d+f.plotX)/2.5;h=(1.5*e+a)/2.5;k=(1.5*d+k)/2.5;l=(1.5*e+c)/2.5;k!==g&&(m=(l-h)*(k-d)/(k-g)+e-l);h+=m;l+=m;h>a&&h>e?(h=z(a,e),l=2*e-h):h<a&&h<e&&(h=Q(a,e),l=2*e-h);l>c&&l>e?(l=z(c,e),h=2*e-l):l<c&&l<e&&(l=Q(c,e),h=2*e-l);b.rightContX=k;b.rightContY=l}b=["C",t(f.rightContX,f.plotX),t(f.rightContY,f.plotY),t(g,d),t(h,e),d,e];f.rightContX=f.rightContY=null;return b}});Z.spline=Ma;sa.areaspline=F(sa.area);Ea=Ea.prototype;Ma=ia(Ma,{type:"areaspline",getStackPoints:Ea.getStackPoints,
getGraphPath:Ea.getGraphPath,setStackCliffs:Ea.setStackCliffs,drawGraph:Ea.drawGraph,drawLegendSymbol:da.drawRectangle});Z.areaspline=Ma;sa.column=F(ua,{borderColor:"#FFFFFF",borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1,halo:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},
threshold:0});Ma=ia(ca,{type:"column",pointAttrToOptions:{stroke:"borderColor",fill:"color",r:"borderRadius"},cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){ca.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&u(b.series,function(b){b.type===a.type&&(b.isDirty=!0)})},getColumnMetrics:function(){var a=this,b=a.options,c=a.xAxis,d=a.yAxis,e=c.reversed,f,g={},h=0;!1===b.grouping?h=1:u(a.chart.series,function(b){var c=b.options,
e=b.yAxis,k;b.type===a.type&&b.visible&&d.len===e.len&&d.pos===e.pos&&(c.stacking?(f=b.stackKey,g[f]===I&&(g[f]=h++),k=g[f]):!1!==c.grouping&&(k=h++),b.columnIndex=k)});var k=Q(ba(c.transA)*(c.ordinalSlope||b.pointRange||c.closestPointRange||c.tickInterval||1),c.len),l=k*b.groupPadding,m=(k-2*l)/h,b=Q(b.maxPointWidth||c.len,t(b.pointWidth,m*(1-2*b.pointPadding)));a.columnMetrics={width:b,offset:(m-b)/2+(l+((a.columnIndex||0)+(e?1:0))*m-k/2)*(e?-1:1)};return a.columnMetrics},crispCol:function(a,b,
c,d){var e=this.chart,f=this.borderWidth,g=-(f%2?.5:0),f=f%2?.5:1;e.inverted&&e.renderer.isVML&&(f+=1);c=Math.round(a+c)+g;a=Math.round(a)+g;c-=a;d=Math.round(b+d)+f;g=.5>=ba(b)&&.5<d;b=Math.round(b)+f;d-=b;g&&d&&(--b,d+=1);return{x:a,y:b,width:c,height:d}},translate:function(){var a=this,b=a.chart,c=a.options,d=a.borderWidth=t(c.borderWidth,2>a.closestPointRange*a.xAxis.transA?0:1),e=a.yAxis,f=a.translatedThreshold=e.getThreshold(c.threshold),g=t(c.minPointLength,5),h=a.getColumnMetrics(),k=h.width,
l=a.barW=z(k,1+2*d),m=a.pointXOffset=h.offset;b.inverted&&(f-=.5);c.pointPadding&&(l=Ka(l));ca.prototype.translate.apply(a);u(a.points,function(c){var d=Q(t(c.yBottom,f),9E4),h=999+ba(d),h=Q(z(-h,c.plotY),e.len+h),v=c.plotX+m,u=l,w=Q(h,d),y,r=z(h,d)-w;ba(r)<g&&g&&(r=g,y=!e.reversed&&!c.negative||e.reversed&&c.negative,w=ba(w-f)>g?d-g:f-(y?g:0));c.barX=v;c.pointWidth=k;c.tooltipPos=b.inverted?[e.len+e.pos-b.plotLeft-h,a.xAxis.len-v-u/2,r]:[v+u/2,h+e.pos-b.plotTop,r];c.shapeType="rect";c.shapeArgs=
a.crispCol(v,w,u,r)})},getSymbol:Qa,drawLegendSymbol:da.drawRectangle,drawGraph:Qa,drawPoints:function(){var a=this,b=this.chart,c=a.options,d=b.renderer,e=c.animationLimit||250,f,g;u(a.points,function(h){var k=h.graphic,l;X(h.plotY)&&null!==h.y?(f=h.shapeArgs,l=r(a.borderWidth)?{"stroke-width":a.borderWidth}:{},g=h.pointAttr[h.selected?"select":""]||a.pointAttr[""],k?(ab(k),k.attr(l).attr(g)[b.pointCount<e?"animate":"attr"](F(f))):h.graphic=d[h.shapeType](f).attr(l).attr(g).add(h.group||a.group).shadow(c.shadow,
null,c.stacking&&!c.borderRadius)):k&&(h.graphic=k.destroy())})},animate:function(a){var b=this,c=this.yAxis,d=b.options,e=this.chart.inverted,f={};ta&&(a?(f.scaleY=.001,a=Q(c.pos+c.len,z(c.pos,c.toPixels(d.threshold))),e?f.translateX=a-c.len:f.translateY=a,b.group.attr(f)):(f[e?"translateX":"translateY"]=c.pos,b.group.animate(f,E(hb(b.options.animation),{step:function(a,c){b.group.attr({scaleY:z(.001,c.pos)})}})),b.animate=null))},remove:function(){var a=this,b=a.chart;b.hasRendered&&u(b.series,
function(b){b.type===a.type&&(b.isDirty=!0)});ca.prototype.remove.apply(a,arguments)}});Z.column=Ma;sa.bar=F(sa.column);Ea=ia(Ma,{type:"bar",inverted:!0});Z.bar=Ea;sa.scatter=F(ua,{lineWidth:0,marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px;"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}});Ea=ia(ca,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group",
"markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,kdDimensions:2,drawGraph:function(){this.options.lineWidth&&ca.prototype.drawGraph.call(this)}});Z.scatter=Ea;sa.pie=F(ua,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return null===this.y?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,
tooltip:{followPointer:!0}});ua={type:"pie",isCartesian:!1,pointClass:ia(Xa,{init:function(){Xa.prototype.init.apply(this,arguments);var a=this,b;a.name=t(a.name,"Slice");b=function(b){a.slice("select"===b.type)};W(a,"select",b);W(a,"unselect",b);return a},setVisible:function(a,b){var c=this,d=c.series,e=d.chart,f=d.options.ignoreHiddenPoint;b=t(b,f);a!==c.visible&&(c.visible=c.options.visible=a=a===I?!c.visible:a,d.options.data[Ha(c,d.data)]=c.options,u(["graphic","dataLabel","connector","shadowGroup"],
function(b){if(c[b])c[b][a?"show":"hide"](!0)}),c.legendItem&&e.legend.colorizeItem(c,a),!a&&"hover"===c.state&&c.setState(""),f&&(d.isDirty=!0),b&&e.redraw())},slice:function(a,b,c){var d=this.series;cb(c,d.chart);t(b,!0);this.sliced=this.options.sliced=a=r(a)?a:!this.sliced;d.options.data[Ha(this,d.data)]=this.options;a=a?this.slicedTranslation:{translateX:0,translateY:0};this.graphic.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)},haloPath:function(a){var b=this.shapeArgs,c=this.series.chart;
return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.plotLeft+b.x,c.plotTop+b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r,start:b.start,end:b.end})}}),requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},animate:function(a){var b=this,c=b.points,d=b.startAngleRad;a||(u(c,function(a){var c=a.graphic,g=a.shapeArgs;c&&(c.attr({r:a.startR||b.center[3]/
2,start:d,end:d}),c.animate({r:g.r,start:g.start,end:g.end},b.options.animation))}),b.animate=null)},updateTotals:function(){var a,b=0,c=this.points,d=c.length,e,f=this.options.ignoreHiddenPoint;for(a=0;a<d;a++)e=c[a],b+=f&&!e.visible?0:e.y;this.total=b;for(a=0;a<d;a++)e=c[a],e.percentage=0<b&&(e.visible||!f)?e.y/b*100:0,e.total=b},generatePoints:function(){ca.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();var b=0,c=this.options,d=c.slicedOffset,
e=d+c.borderWidth,f,g,h,k=c.startAngle||0,l=this.startAngleRad=Ga/180*(k-90),k=(this.endAngleRad=Ga/180*(t(c.endAngle,k+360)-90))-l,m=this.points,n=c.dataLabels.distance,c=c.ignoreHiddenPoint,p,q=m.length,v;a||(this.center=a=this.getCenter());this.getX=function(b,c){h=ha.asin(Q((b-a[1])/(a[2]/2+n),1));return a[0]+(c?-1:1)*la(h)*(a[2]/2+n)};for(p=0;p<q;p++){v=m[p];f=l+b*k;if(!c||v.visible)b+=v.percentage/100;g=l+b*k;v.shapeType="arc";v.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:M(1E3*f)/
1E3,end:M(1E3*g)/1E3};h=(g+f)/2;h>1.5*Ga?h-=2*Ga:h<-Ga/2&&(h+=2*Ga);v.slicedTranslation={translateX:M(la(h)*d),translateY:M(ra(h)*d)};f=la(h)*a[2]/2;g=ra(h)*a[2]/2;v.tooltipPos=[a[0]+.7*f,a[1]+.7*g];v.half=h<-Ga/2||h>Ga/2?1:0;v.angle=h;e=Q(e,n/2);v.labelPos=[a[0]+f+la(h)*n,a[1]+g+ra(h)*n,a[0]+f+la(h)*e,a[1]+g+ra(h)*e,a[0]+f,a[1]+g,0>n?"center":v.half?"right":"left",h]}},drawGraph:null,drawPoints:function(){var a=this,b=a.chart.renderer,c,d,e=a.options.shadow,f,g,h,k;e&&!a.shadowGroup&&(a.shadowGroup=
b.g("shadow").add(a.group));u(a.points,function(l){null!==l.y&&(d=l.graphic,h=l.shapeArgs,f=l.shadowGroup,g=l.pointAttr[l.selected?"select":""],g.stroke||(g.stroke=g.fill),e&&!f&&(f=l.shadowGroup=b.g("shadow").add(a.shadowGroup)),c=l.sliced?l.slicedTranslation:{translateX:0,translateY:0},f&&f.attr(c),d?d.setRadialReference(a.center).attr(g).animate(E(h,c)):(k={"stroke-linejoin":"round"},l.visible||(k.visibility="hidden"),l.graphic=d=b[l.shapeType](h).setRadialReference(a.center).attr(g).attr(k).attr(c).add(a.group).shadow(e,
f)))})},searchPoint:Qa,sortByAngle:function(a,b){a.sort(function(a,d){return void 0!==a.angle&&(d.angle-a.angle)*b})},drawLegendSymbol:da.drawRectangle,getCenter:Fb.getCenter,getSymbol:Qa};ua=ia(ca,ua);Z.pie=ua;ca.prototype.drawDataLabels=function(){var a=this,b=a.options,c=b.cursor,d=b.dataLabels,e=a.points,f,g,h=a.hasRendered||0,k,l,m=t(d.defer,!0),n=a.chart.renderer;if(d.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(d),l=a.plotGroup("dataLabelsGroup","data-labels",m&&!h?"hidden":
"visible",d.zIndex||6),m&&(l.attr({opacity:+h}),h||W(a,"afterAnimate",function(){a.visible&&l.show();l[b.animation?"animate":"attr"]({opacity:1},{duration:200})})),g=d,u(e,function(e){var h,m=e.dataLabel,u,w,y=e.connector,z=!0,A,B={};f=e.dlOptions||e.options&&e.options.dataLabels;h=t(f&&f.enabled,g.enabled)&&null!==e.y;if(m&&!h)e.dataLabel=m.destroy();else if(h){d=F(g,f);A=d.style;h=d.rotation;u=e.getLabelConfig();k=d.format?Fa(d.format,u):d.formatter.call(u,d);A.color=t(d.color,A.color,a.color,"black");
if(m)if(r(k))m.attr({text:k}),z=!1;else{if(e.dataLabel=m=m.destroy(),y)e.connector=y.destroy()}else if(r(k)){m={fill:d.backgroundColor,stroke:d.borderColor,"stroke-width":d.borderWidth,r:d.borderRadius||0,rotation:h,padding:d.padding,zIndex:1};"contrast"===A.color&&(B.color=d.inside||0>d.distance||b.stacking?n.getContrast(e.color||a.color):"#000000");c&&(B.cursor=c);for(w in m)m[w]===I&&delete m[w];m=e.dataLabel=n[h?"text":"label"](k,0,-9999,d.shape,null,null,d.useHTML).attr(m).css(E(A,B)).add(l).shadow(d.shadow)}m&&
a.alignDataLabel(e,m,d,null,z)}})};ca.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=t(a.plotX,-9999),k=t(a.plotY,-9999),l=b.getBBox(),m=f.renderer.fontMetrics(c.style.fontSize).b,n=c.rotation,p=c.align,q=this.visible&&(a.series.forceDL||f.isInsidePlot(h,M(k),g)||d&&f.isInsidePlot(h,g?d.x+1:d.y+d.height-1,g)),v="justify"===t(c.overflow,"justify");q&&(d=E({x:g?f.plotWidth-k:h,y:M(g?f.plotHeight-h:k),width:0,height:0},d),E(c,{width:l.width,height:l.height}),n?(v=!1,g=f.renderer.rotCorr(m,
n),g={x:d.x+c.x+d.width/2+g.x,y:d.y+c.y+{top:0,middle:.5,bottom:1}[c.verticalAlign]*d.height},b[e?"attr":"animate"](g).attr({align:p}),h=(n+720)%360,h=180<h&&360>h,"left"===p?g.y-=h?l.height:0:"center"===p?(g.x-=l.width/2,g.y-=l.height/2):"right"===p&&(g.x-=l.width,g.y-=h?0:l.height)):(b.align(c,null,d),g=b.alignAttr),v?this.justifyDataLabel(b,c,g,l,d,e):t(c.crop,!0)&&(q=f.isInsidePlot(g.x,g.y)&&f.isInsidePlot(g.x+l.width,g.y+l.height)),c.shape&&!n&&b.attr({anchorX:a.plotX,anchorY:a.plotY}));q||(ab(b),
b.attr({y:-9999}),b.placed=!1)};ca.prototype.justifyDataLabel=function(a,b,c,d,e,f){var g=this.chart,h=b.align,k=b.verticalAlign,l,m,n=a.box?0:a.padding||0;l=c.x+n;0>l&&("right"===h?b.align="left":b.x=-l,m=!0);l=c.x+d.width-n;l>g.plotWidth&&("left"===h?b.align="right":b.x=g.plotWidth-l,m=!0);l=c.y+n;0>l&&("bottom"===k?b.verticalAlign="top":b.y=-l,m=!0);l=c.y+d.height-n;l>g.plotHeight&&("top"===k?b.verticalAlign="bottom":b.y=g.plotHeight-l,m=!0);m&&(a.placed=!f,a.align(b,null,e))};Z.pie&&(Z.pie.prototype.drawDataLabels=
function(){var a=this,b=a.data,c,d=a.chart,e=a.options.dataLabels,f=t(e.connectorPadding,10),g=t(e.connectorWidth,1),h=d.plotWidth,k=d.plotHeight,l,m,n=t(e.softConnector,!0),p=e.distance,q=a.center,v=q[2]/2,y=q[1],w=0<p,r,B,A,C=[[],[]],E,x,G,I,D,L=[0,0,0,0],Ya=function(a,b){return b.y-a.y};if(a.visible&&(e.enabled||a._hasPointLabels)){ca.prototype.drawDataLabels.apply(a);u(b,function(a){a.dataLabel&&a.visible&&(C[a.half].push(a),a.dataLabel._pos=null)});for(I=2;I--;){var F=[],K=[],N=C[I],R=N.length,
O;if(R){a.sortByAngle(N,I-.5);for(D=b=0;!b&&N[D];)b=N[D]&&N[D].dataLabel&&(N[D].dataLabel.getBBox().height||21),D++;if(0<p){B=Q(y+v+p,d.plotHeight);for(D=z(0,y-v-p);D<=B;D+=b)F.push(D);B=F.length;if(R>B){c=[].concat(N);c.sort(Ya);for(D=R;D--;)c[D].rank=D;for(D=R;D--;)N[D].rank>=B&&N.splice(D,1);R=N.length}for(D=0;D<R;D++){c=N[D];A=c.labelPos;c=9999;var P,S;for(S=0;S<B;S++)P=ba(F[S]-A[1]),P<c&&(c=P,O=S);if(O<D&&null!==F[D])O=D;else for(B<R-D+O&&null!==F[D]&&(O=B-R+D);null===F[O];)O++;K.push({i:O,y:F[O]});
F[O]=null}K.sort(Ya)}for(D=0;D<R;D++){c=N[D];A=c.labelPos;r=c.dataLabel;G=!1===c.visible?"hidden":"inherit";c=A[1];if(0<p){if(B=K.pop(),O=B.i,x=B.y,c>x&&null!==F[O+1]||c<x&&null!==F[O-1])x=Q(z(0,c),d.plotHeight)}else x=c;E=e.justify?q[0]+(I?-1:1)*(v+p):a.getX(x===y-v-p||x===y+v+p?c:x,I);r._attr={visibility:G,align:A[6]};r._pos={x:E+e.x+({left:f,right:-f}[A[6]]||0),y:x+e.y-10};r.connX=E;r.connY=x;null===this.options.size&&(B=r.width,E-B<f?L[3]=z(M(B-E+f),L[3]):E+B>h-f&&(L[1]=z(M(E+B-h+f),L[1])),0>
x-b/2?L[0]=z(M(-x+b/2),L[0]):x+b/2>k&&(L[2]=z(M(x+b/2-k),L[2])))}}}if(0===Ua(L)||this.verifyDataLabelOverflow(L))this.placeDataLabels(),w&&g&&u(this.points,function(b){l=b.connector;A=b.labelPos;(r=b.dataLabel)&&r._pos&&b.visible?(G=r._attr.visibility,E=r.connX,x=r.connY,m=n?["M",E+("left"===A[6]?5:-5),x,"C",E,x,2*A[2]-A[4],2*A[3]-A[5],A[2],A[3],"L",A[4],A[5]]:["M",E+("left"===A[6]?5:-5),x,"L",A[2],A[3],"L",A[4],A[5]],l?(l.animate({d:m}),l.attr("visibility",G)):b.connector=l=a.chart.renderer.path(m).attr({"stroke-width":g,
stroke:e.connectorColor||b.color||"#606060",visibility:G}).add(a.dataLabelsGroup)):l&&(b.connector=l.destroy())})}},Z.pie.prototype.placeDataLabels=function(){u(this.points,function(a){var b=a.dataLabel;b&&a.visible&&((a=b._pos)?(b.attr(b._attr),b[b.moved?"animate":"attr"](a),b.moved=!0):b&&b.attr({y:-9999}))})},Z.pie.prototype.alignDataLabel=Qa,Z.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,d=c.center,e=c.minSize||80,f=e,g;null!==d[0]?f=z(b[2]-z(a[1],a[3]),e):
(f=z(b[2]-a[1]-a[3],e),b[0]+=(a[3]-a[1])/2);null!==d[1]?f=z(Q(f,b[2]-z(a[0],a[2])),e):(f=z(Q(f,b[2]-a[0]-a[2]),e),b[1]+=(a[0]-a[2])/2);f<b[2]?(b[2]=f,b[3]=Math.min(/%$/.test(c.innerSize||0)?f*parseFloat(c.innerSize||0)/100:parseFloat(c.innerSize||0),f),this.translate(b),this.drawDataLabels&&this.drawDataLabels()):g=!0;return g});Z.column&&(Z.column.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart.inverted,g=a.series,h=a.dlBox||a.shapeArgs,k=t(a.below,a.plotY>t(this.translatedThreshold,
g.yAxis.len)),l=t(c.inside,!!this.options.stacking);h&&(d=F(h),0>d.y&&(d.height+=d.y,d.y=0),h=d.y+d.height-g.yAxis.len,0<h&&(d.height-=h),f&&(d={x:g.yAxis.len-d.y-d.height,y:g.xAxis.len-d.x-d.width,width:d.height,height:d.width}),l||(f?(d.x+=k?0:d.width,d.width=0):(d.y+=k?d.height:0,d.height=0)));c.align=t(c.align,!f||l?"center":k?"right":"left");c.verticalAlign=t(c.verticalAlign,f||l?"middle":k?"top":"bottom");ca.prototype.alignDataLabel.call(this,a,b,c,d,e)});(function(a){var b=a.Chart,c=a.each,
d=a.pick,e=a.addEvent;b.prototype.callbacks.push(function(a){function b(){var e=[];c(a.series,function(a){var b=a.options.dataLabels,f=a.dataLabelCollections||["dataLabel"];(b.enabled||a._hasPointLabels)&&!b.allowOverlap&&a.visible&&c(f,function(b){c(a.points,function(a){a[b]&&(a[b].labelrank=d(a.labelrank,a.shapeArgs&&a.shapeArgs.height),e.push(a[b]))})})});a.hideOverlappingLabels(e)}b();e(a,"redraw",b)});b.prototype.hideOverlappingLabels=function(a){var b=a.length,d,e,l,m,n,p,q,v,t;for(e=0;e<b;e++)if(d=
a[e])d.oldOpacity=d.opacity,d.newOpacity=1;a.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(e=0;e<b;e++)for(l=a[e],d=e+1;d<b;++d)if(m=a[d],l&&m&&l.placed&&m.placed&&0!==l.newOpacity&&0!==m.newOpacity&&(n=l.alignAttr,p=m.alignAttr,q=l.parentGroup,v=m.parentGroup,t=2*(l.box?0:l.padding),n=!(p.x+v.translateX>n.x+q.translateX+(l.width-t)||p.x+v.translateX+(m.width-t)<n.x+q.translateX||p.y+v.translateY>n.y+q.translateY+(l.height-t)||p.y+v.translateY+(m.height-t)<n.y+q.translateY)))(l.labelrank<
m.labelrank?l:m).newOpacity=0;c(a,function(a){var b,c;a&&(c=a.newOpacity,a.oldOpacity!==c&&a.placed&&(c?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=c,a[a.isOld?"animate":"attr"](a.alignAttr,null,b)),a.isOld=!0)})}})(L);ua=L.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,d=a.options.cursor,e=d&&{cursor:d},f=function(a){for(var c=a.target,d;c&&!d;)d=c.point,c=c.parentNode;if(d!==I&&d!==b.hoverPoint)d.onMouseOver(a)};u(a.points,function(a){a.graphic&&(a.graphic.element.point=
a);a.dataLabel&&(a.dataLabel.element.point=a)});a._hasTracking||(u(a.trackerGroups,function(b){if(a[b]&&(a[b].addClass("highcharts-tracker").on("mouseover",f).on("mouseout",function(a){c.onTrackerMouseOut(a)}).css(e),lb))a[b].on("touchstart",f)}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,f=a.chart,g=f.pointer,h=f.renderer,k=f.options.tooltip.snap,l=a.tracker,m=b.cursor,n=m&&{cursor:m},p=function(){if(f.hoverSeries!==
a)a.onMouseOver()},q="rgba(192,192,192,"+(ta?1E-4:.002)+")";if(e&&!c)for(m=e+1;m--;)"M"===d[m]&&d.splice(m+1,0,d[m+1]-k,d[m+2],"L"),(m&&"M"===d[m]||m===e)&&d.splice(m,0,"L",d[m-2]+k,d[m-1]);l?l.attr({d:d}):(a.tracker=h.path(d).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:q,fill:c?q:"none","stroke-width":b.lineWidth+(c?0:2*k),zIndex:2}).add(a.group),u([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",p).on("mouseout",function(a){g.onTrackerMouseOut(a)}).css(n);
if(lb)a.on("touchstart",p)}))}};Z.column&&(Ma.prototype.drawTracker=ua.drawTrackerPoint);Z.pie&&(Z.pie.prototype.drawTracker=ua.drawTrackerPoint);Z.scatter&&(Ea.prototype.drawTracker=ua.drawTrackerPoint);E(vb.prototype,{setItemEvents:function(a,b,c,d,e){var f=this;(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover");b.css(f.options.itemHoverStyle)}).on("mouseout",function(){b.css(a.visible?d:e);a.setState()}).on("click",function(b){var c=function(){a.setVisible&&a.setVisible()};b={browserEvent:b};
a.firePointEvent?a.firePointEvent("legendItemClick",b,c):T(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=Y("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);W(a.checkbox,"click",function(b){T(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});ga.legend.itemStyle.cursor="pointer";E(ob.prototype,{showResetZoom:function(){var a=this,b=ga.lang,c=a.options.chart.resetZoomButton,
d=c.theme,e=d.states,f="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,e&&e.hover).attr({align:c.position.align,title:b.resetZoomTitle}).add().align(c.position,!1,f)},zoomOut:function(){var a=this;T(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,c=this.pointer,d=!1,e;!a||a.resetSelection?u(this.axes,function(a){b=a.zoom()}):u(a.xAxis.concat(a.yAxis),function(a){var e=a.axis,h=e.isXAxis;if(c[h?
"zoomX":"zoomY"]||c[h?"pinchX":"pinchY"])b=e.zoom(a.min,a.max),e.displayBtn&&(d=!0)});e=this.resetZoomButton;d&&!e?this.showResetZoom():!d&&aa(e)&&(this.resetZoomButton=e.destroy());b&&this.redraw(t(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,e;d&&u(d,function(a){a.setState()});u("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,h=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",k=c[d],l=(b.pointRange||0)/
2,m=b.getExtremes(),n=b.toValue(k-h,!0)+l,l=b.toValue(k+b.len-h,!0)-l,k=k>h;b.series.length&&(k||n>Q(m.dataMin,m.min))&&(!k||l<z(m.dataMax,m.max))&&(b.setExtremes(n,l,!1,!1,{trigger:"pan"}),e=!0);c[d]=h});e&&c.redraw(!1);N(c.container,{cursor:"move"})}});E(Xa.prototype,{select:function(a,b){var c=this,d=c.series,e=d.chart;a=t(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=c.options.selected=a;d.options.data[Ha(c,d.data)]=c.options;c.setState(a&&"select");
b||u(e.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=a.options.selected=!1,d.options.data[Ha(a,d.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},onMouseOver:function(a,b){var c=this.series,d=c.chart,e=d.tooltip,f=d.hoverPoint;if(d.hoverSeries!==c)c.onMouseOver();if(f&&f!==this)f.onMouseOut();this.series&&(this.firePointEvent("mouseOver"),e&&(!e.shared||c.noSharedTooltip)&&e.refresh(this,a),this.setState("hover"),!b)&&(d.hoverPoint=this)},onMouseOut:function(){var a=
this.series.chart,b=a.hoverPoints;this.firePointEvent("mouseOut");b&&-1!==Ha(this,b)||(this.setState(),a.hoverPoint=null)},importEvents:function(){if(!this.hasImportedEvents){var a=F(this.series.options.point,this.options).events,b;this.events=a;for(b in a)W(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a,b){var c=ja(this.plotX),d=this.plotY,e=this.series,f=e.options.states,g=sa[e.type].marker&&e.options.marker,h=g&&!g.enabled,k=g&&g.states[a],l=k&&!1===k.enabled,m=e.stateMarkerGraphic,
n=this.marker||{},p=e.chart,q=e.halo,t;a=a||"";t=this.pointAttr[a]||e.pointAttr[a];if(!(a===this.state&&!b||this.selected&&"select"!==a||f[a]&&!1===f[a].enabled||a&&(l||h&&!1===k.enabled)||a&&n.states&&n.states[a]&&!1===n.states[a].enabled)){if(this.graphic)g=g&&this.graphic.symbolName&&t.r,this.graphic.attr(F(t,g?{x:c-g,y:d-g,width:2*g,height:2*g}:{})),m&&m.hide();else{if(a&&k)if(g=k.radius,n=n.symbol||e.symbol,m&&m.currentSymbol!==n&&(m=m.destroy()),m)m[b?"animate":"attr"]({x:c-g,y:d-g});else n&&
(e.stateMarkerGraphic=m=p.renderer.symbol(n,c-g,d-g,2*g,2*g).attr(t).add(e.markerGroup),m.currentSymbol=n);m&&(m[a&&p.isInsidePlot(c,d,p.inverted)?"show":"hide"](),m.element.point=this)}(c=f[a]&&f[a].halo)&&c.size?(q||(e.halo=q=p.renderer.path().add(p.seriesGroup)),q.attr(E({fill:this.color||e.color,"fill-opacity":c.opacity,zIndex:-1},c.attributes))[b?"animate":"attr"]({d:this.haloPath(c.size)})):q&&q.attr({d:[]});this.state=a}},haloPath:function(a){var b=this.series,c=b.chart,d=b.getPlotBox(),e=
c.inverted,f=Math.floor(this.plotX);return c.renderer.symbols.circle(d.translateX+(e?b.yAxis.len-this.plotY:f)-a,d.translateY+(e?b.xAxis.len-f:this.plotY)-a,2*a,2*a)}});E(ca.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&T(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&
T(this,"mouseOut");!c||a.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=this.options,c=this.graph,d=b.states,e=b.lineWidth,b=0;a=a||"";if(this.state!==a&&(this.state=a,(!d[a]||!1!==d[a].enabled)&&(a&&(e=d[a].lineWidth||e+(d[a].lineWidthPlus||0)),c&&!c.dashstyle)))for(a={"stroke-width":e},c.attr(a);this["zoneGraph"+b];)this["zoneGraph"+b].attr(a),b+=1},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,f,g=d.options.chart.ignoreHiddenSeries,
h=c.visible;f=(c.visible=a=c.userOptions.visible=a===I?!h:a)?"show":"hide";u(["group","dataLabelsGroup","markerGroup","tracker"],function(a){if(c[a])c[a][f]()});if(d.hoverSeries===c||(d.hoverPoint&&d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&u(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});u(c.linkedSeries,function(b){b.setVisible(a,!1)});g&&(d.isDirtyBox=!0);!1!==b&&d.redraw();T(c,f)},show:function(){this.setVisible(!0)},
hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=a===I?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);T(this,a?"select":"unselect")},drawTracker:ua.drawTrackerGraph});E(L,{Color:R,Point:Xa,Tick:ea,Renderer:kb,SVGElement:S,SVGRenderer:Ta,arrayMin:G,arrayMax:Ua,charts:fa,correctFloat:C,dateFormat:bb,error:U,format:Fa,pathAnim:void 0,getOptions:function(){return ga},hasBidiBug:Tb,isTouchDevice:Pb,setOptions:function(a){ga=F(!0,ga,a);Ib();return ga},addEvent:W,removeEvent:ma,
createElement:Y,discardElement:Ba,css:N,each:u,map:Sa,merge:F,splat:V,stableSort:Ya,extendClass:ia,pInt:K,svg:ta,canvas:ya,vml:!ta&&!ya,product:"Highcharts",version:"4.2.5"});return L});(function(x){"object"===typeof module&&module.exports?module.exports=x:x(Highcharts)})(function(x){var U=x.win,za=U.document,F=x.Chart,K=x.addEvent,Aa=x.removeEvent,aa=x.fireEvent,oa=x.createElement,ka=x.discardElement,r=x.css,P=x.merge,V=x.each,qa=x.extend,N=x.splat,Y=Math.max,ia=x.isTouchDevice,Ia=x.Renderer.prototype.symbols,Oa=x.getOptions(),Fa;qa(Oa.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",
contextButtonTitle:"Chart context menu"});Oa.navigation={menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF",padding:"5px 0"},menuItemStyle:{padding:"0 10px",background:"none",color:"#303030",fontSize:ia?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{symbolFill:"#E0E0E0",symbolSize:14,symbolStroke:"#666",symbolStrokeWidth:3,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,theme:{fill:"white",stroke:"none"},verticalAlign:"top",width:24}};
Oa.exporting={type:"image/png",url:"http://export.highcharts.com/",printMaxWidth:780,buttons:{contextButton:{menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},
{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]}}};x.post=function(y,r,x){var G;y=oa("form",P({method:"post",action:y,enctype:"multipart/form-data"},x),{display:"none"},za.body);for(G in r)oa("input",{type:"hidden",name:G,value:r[G]},null,y);y.submit();ka(y)};qa(F.prototype,{sanitizeSVG:function(y){return y.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\([^#]+#/g,
"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (NS[0-9]+\:)?href=/g," xlink:href=").replace(/\n/," ").replace(/<\/svg>.*?$/,"</svg>").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1="rgb($2)" $1-opacity="$3"').replace(/&nbsp;/g,"\u00a0").replace(/&shy;/g,"\u00ad").replace(/<IMG /g,"<image ").replace(/<(\/?)TITLE>/g,"<$1title>").replace(/height=([^" ]+)/g,'height="$1"').replace(/width=([^" ]+)/g,'width="$1"').replace(/hc-svg-href="([^"]+)">/g,
'xlink:href="$1"/>').replace(/ id=([^" >]+)/g,' id="$1"').replace(/class=([^" >]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(y){return y.toLowerCase()})},getChartHTML:function(){return this.container.innerHTML},getSVG:function(y){var r=this,F,G,K,Ja,Ba,C=P(r.options,y),U=C.exporting.allowHTML;za.createElementNS||(za.createElementNS=function(r,y){return za.createElement(y)});G=oa("div",null,{position:"absolute",top:"-9999em",width:r.chartWidth+
"px",height:r.chartHeight+"px"},za.body);K=r.renderTo.style.width;Ba=r.renderTo.style.height;K=C.exporting.sourceWidth||C.chart.width||/px$/.test(K)&&parseInt(K,10)||600;Ba=C.exporting.sourceHeight||C.chart.height||/px$/.test(Ba)&&parseInt(Ba,10)||400;qa(C.chart,{animation:!1,renderTo:G,forExport:!0,renderer:"SVGRenderer",width:K,height:Ba});C.exporting.enabled=!1;delete C.data;C.series=[];V(r.series,function(r){Ja=P(r.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:r.visible});
Ja.isInternal||C.series.push(Ja)});y&&V(["xAxis","yAxis"],function(r){V(N(y[r]),function(y,B){C[r][B]=P(C[r][B],y)})});F=new x.Chart(C,r.callback);V(["xAxis","yAxis"],function(y){V(r[y],function(r,B){var x=F[y][B],C=r.getExtremes(),G=C.userMin,C=C.userMax;x&&(void 0!==G||void 0!==C)&&x.setExtremes(G,C,!0,!1)})});K=F.getChartHTML();C=null;F.destroy();ka(G);U&&(G=K.match(/<\/svg>(.*?$)/))&&(G='<foreignObject x="0" y="0" width="200" height="200"><body xmlns="http://www.w3.org/1999/xhtml">'+G[1]+"</body></foreignObject>",
K=K.replace("</svg>",G+"</svg>"));K=this.sanitizeSVG(K);return K=K.replace(/(url\(#highcharts-[0-9]+)&quot;/g,"$1").replace(/&quot;/g,"'")},getSVGForExport:function(r,B){var x=this.options.exporting;return this.getSVG(P({chart:{borderRadius:0}},x.chartOptions,B,{exporting:{sourceWidth:r&&r.sourceWidth||x.sourceWidth,sourceHeight:r&&r.sourceHeight||x.sourceHeight}}))},exportChart:function(r,B){var F=this.getSVGForExport(r,B);r=P(this.options.exporting,r);x.post(r.url,{filename:r.filename||"chart",
type:r.type,width:r.width||0,scale:r.scale||2,svg:F},r.formAttributes)},print:function(){var r=this,B=r.container,x=[],G=B.parentNode,F=za.body,K=F.childNodes,N=r.options.exporting.printMaxWidth,C,P,Y;if(!r.isPrinting){r.isPrinting=!0;r.pointer.reset(null,0);aa(r,"beforePrint");if(Y=N&&r.chartWidth>N)C=r.hasUserSize,P=[r.chartWidth,r.chartHeight,!1],r.setSize(N,r.chartHeight,!1);V(K,function(r,y){1===r.nodeType&&(x[y]=r.style.display,r.style.display="none")});F.appendChild(B);U.focus();U.print();
setTimeout(function(){G.appendChild(B);V(K,function(r,y){1===r.nodeType&&(r.style.display=x[y])});r.isPrinting=!1;Y&&(r.setSize.apply(r,P),r.hasUserSize=C);aa(r,"afterPrint")},1E3)}},contextMenu:function(y,B,x,G,F,N,P){var C=this,U=C.options.navigation,aa=U.menuItemStyle,ka=C.chartWidth,R=C.chartHeight,S="cache-"+y,ea=C[S],ia=Y(F,N),I,D,ha,M=function(r){C.pointer.inClass(r.target,y)||D()};ea||(C[S]=ea=oa("div",{className:y},{position:"absolute",zIndex:1E3,padding:ia+"px"},C.container),I=oa("div",
null,qa({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},U.menuStyle),ea),D=function(){r(ea,{display:"none"});P&&P.setState(0);C.openMenu=!1},K(ea,"mouseleave",function(){ha=setTimeout(D,500)}),K(ea,"mouseenter",function(){clearTimeout(ha)}),K(za,"mouseup",M),K(C,"destroy",function(){Aa(za,"mouseup",M)}),V(B,function(y){if(y){var B=y.separator?oa("hr",null,null,I):oa("div",{onmouseover:function(){r(this,U.menuItemHoverStyle)},onmouseout:function(){r(this,
aa)},onclick:function(r){r&&r.stopPropagation();D();y.onclick&&y.onclick.apply(C,arguments)},innerHTML:y.text||C.options.lang[y.textKey]},qa({cursor:"pointer"},aa),I);C.exportDivElements.push(B)}}),C.exportDivElements.push(I,ea),C.exportMenuWidth=ea.offsetWidth,C.exportMenuHeight=ea.offsetHeight);B={display:"block"};x+C.exportMenuWidth>ka?B.right=ka-x-F-ia+"px":B.left=x-ia+"px";G+N+C.exportMenuHeight>R&&"top"!==P.alignOptions.verticalAlign?B.bottom=R-G-ia+"px":B.top=G+N-ia+"px";r(ea,B);C.openMenu=
!0},addButton:function(r){var B=this,F=B.renderer,G=P(B.options.navigation.buttonOptions,r),K=G.onclick,N=G.menuItems,U,C,aa={stroke:G.symbolStroke,fill:G.symbolFill},Y=G.symbolSize||12;B.btnCount||(B.btnCount=0);B.exportDivElements||(B.exportDivElements=[],B.exportSVGElements=[]);if(!1!==G.enabled){var V=G.theme,R=V.states,S=R&&R.hover,R=R&&R.select,ea;delete V.states;K?ea=function(r){r.stopPropagation();K.call(B,r)}:N&&(ea=function(){B.contextMenu(C.menuClassName,N,C.translateX,C.translateY,C.width,
C.height,C);C.setState(2)});G.text&&G.symbol?V.paddingLeft=x.pick(V.paddingLeft,25):G.text||qa(V,{width:G.width,height:G.height,padding:0});C=F.button(G.text,0,0,ea,V,S,R).attr({title:B.options.lang[G._titleKey],"stroke-linecap":"round",zIndex:3});C.menuClassName=r.menuClassName||"highcharts-menu-"+B.btnCount++;G.symbol&&(U=F.symbol(G.symbol,G.symbolX-Y/2,G.symbolY-Y/2,Y,Y).attr(qa(aa,{"stroke-width":G.symbolStrokeWidth||1,zIndex:1})).add(C));C.add().align(qa(G,{width:C.width,x:x.pick(G.x,Fa)}),!0,
"spacingBox");Fa+=(C.width+G.buttonSpacing)*("right"===G.align?-1:1);B.exportSVGElements.push(C,U)}},destroyExport:function(r){r=r.target;var B,x;for(B=0;B<r.exportSVGElements.length;B++)if(x=r.exportSVGElements[B])x.onclick=x.ontouchstart=null,r.exportSVGElements[B]=x.destroy();for(B=0;B<r.exportDivElements.length;B++)x=r.exportDivElements[B],Aa(x,"mouseleave"),r.exportDivElements[B]=x.onmouseout=x.onmouseover=x.ontouchstart=x.onclick=null,ka(x)}});Ia.menu=function(r,x,F,G){return["M",r,x+2.5,"L",
r+F,x+2.5,"M",r,x+G/2+.5,"L",r+F,x+G/2+.5,"M",r,x+G-1.5,"L",r+F,x+G-1.5]};F.prototype.callbacks.push(function(r){var x,F=r.options.exporting,G=F.buttons;Fa=0;if(!1!==F.enabled){for(x in G)r.addButton(G[x]);K(r,"destroy",r.destroyExport)}})});