/* Highcharts Stock v1.0 Beta (2011-07-05) (c) 2009-2011 Torstein H?nsi License: www.highcharts.com/license */ (function(){function ca(a,b){var d;a||(a={});for(d in b)a[d]=b[d];return a}function Yb(){for(var a=0,b=arguments,d=b.length,c={};a3?d.length%3:0;return e+(g?d.substr(0,g)+c:"")+d.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+c)+(f?b+nb(a-d).toFixed(f).slice(2):"")}function Rd(a,b,d,c){var e;d=C(d,1);e=a/d;if(!b){b=[1,2,2.5,5,10];if(c&&c.allowDecimals=== false)if(d===1)b=[1,2,5,10];else if(d<=0.1)b=[1/d]}for(c=0;c=h)b.setSeconds(o>=i?0:a*Kb(b.getSeconds()/a));if(o>=i)b[ae](o>=j?0:a*Kb(b[wd]()/a));if(o>=j)b[be](o>=k?0:a*Kb(b[xd]()/a));if(o>=k)b[yd](o>=t?1:a*Kb(b[Oc]()/a));if(o>=t){b[ce](o>=B?0:a*Kb(b[$c]()/a));q=b[ad]()}if(o>=B){q-=q%a;b[de](q)}o===m&&b[yd](b[Oc]()-b[zd]()+C(c,1)); e=1;q=b[ad]();c=b.getTime()/Ob;h=b[$c]();for(i=b[Oc]();c=hb){za=hb;ie=true}else if(ub0||!je))oa+=w*le}kb=ka===oa||ka===undefined||oa===undefined?1:dc&&!E&&ia===H.options.tickPixelInterval?H.tickInterval:C(E,lb?1:(oa-ka)*ia/(Z||1));if(!D){Ac=na.pow(10,Kb(na.log(kb)/na.LN10));M(l.tickInterval)||(kb=Rd(kb,null,Ac,l))}O.tickInterval=kb;jd=l.minorTickInterval==="auto"&&kb?kb/5:l.minorTickInterval;if(D){xa=Sd(kb,ka, oa,l.startOfWeek);kd=l.dateTimeLabelFormats[xa.unit[0]]}else{E=qa(Kb(ka/kb)*kb);H=qa(ld(oa/kb)*kb);xa=[];for(E=qa(E);E<=H;){xa.push(E);E=qa(E+kb)}}if(!dc){if(lb||ge){H=(lb?1:kb)*0.5;if(lb||!M(C(l.min,Bc)))ka-=H;if(lb||!M(C(l.max,Cc)))oa+=H}H=xa[0];E=xa[xa.length-1];if(l.startOnTick)ka=H;else ka>H&&xa.shift();if(l.endOnTick)oa=E;else oa$b[ma]&&l.alignTicks!==false)$b[ma]=xa.length}}function ta(){var p,w;Qc=ka;me=oa;da();T();Ab=ba;ba=Z/(oa-ka||1);if(!Ba)for(p in R)for(w in R[p])R[p][w].cum= R[p][w].total;if(!O.isDirty)O.isDirty=ka!==Qc||oa!==me}function Za(p){p=(new G(p)).render();fc.push(p);return p}function La(){var p=l.title,w=l.stackLabels,H=l.alternateGridColor,K=l.lineWidth,E,ia,W=n.hasRendered,fa=W&&M(Qc)&&!isNaN(Qc);if(Zb.length&&M(ka)&&M(oa)||dc){if(jd&&!lb)for(E=ka+(xa[0]-ka)%jd;E<=oa;E+=jd){pc[E]||(pc[E]=new u(E,true));fa&&pc[E].isNew&&pc[E].render(null,true);pc[E].isActive=true;pc[E].render()}A(xa,function(Q,wa){if(!dc||Q>=ka&&Q<=oa){fa&&Bb[Q].isNew&&Bb[Q].render(wa,true); Bb[Q].isActive=true;Bb[Q].render(wa)}});H&&A(xa,function(Q,wa){if(wa%2===0&&Q=1E3?Qd(p,0):p},nd=aa&&l.labels.staggerLines,qc=l.reversed,rc=lb&&l.tickmarkPlacement==="between"?0.5:0;u.prototype={attachLabel:function(){var p=this.label;if(p&&!this.added){p.deferUpdateTransform=true;p.add(Ca)}},updateTransformLabel:function(){var p=this.label;if(p){p.deferUpdateTransform=false;p.updateTransform()}}, computeBBox:function(){var p=this.label,w;if(p){w=p.getBBox();p.elemWidth=w.width;p.elemHeight=w.height}},addLabel:function(){var p=this.pos,w=l.labels,H=!(p===ka&&!C(l.showFirstLabel,1)||p===oa&&!C(l.showLastLabel,0)),K=lb&&aa&&lb.length&&!w.step&&!w.staggerLines&&!w.rotation&&db/lb.length||!aa&&db/2,E=this.label;p=Ce.call({isFirst:p===xa[0],isLast:p===xa[xa.length-1],dateTimeLabelFormat:kd,value:lb&&lb[p]?lb[p]:p});K=K&&{width:ja(1,N(K-2*(w.padding||10)))+qb};K=ca(K,w.style);if(M(E))E&&E.attr({text:p}).css(K); else this.label=M(p)&&H&&w.enabled?pa.text(p,0,0).attr({align:w.align,rotation:w.rotation}).css(K):null},getLabelSize:function(){var p=this.label;return p?(this.labelBBox=p.getBBox())[aa?"height":"width"]:0},render:function(p,w){var H=!this.minor,K=this.label,E=this.pos,ia=l.labels,W=this.gridLine,fa=H?l.gridLineWidth:l.minorGridLineWidth,jb=H?l.gridLineColor:l.minorGridLineColor,Ya=H?l.gridLineDashStyle:l.minorGridLineDashStyle,Q=this.mark,wa=H?l.tickLength:l.minorTickLength,zb=H?l.tickWidth:l.minorTickWidth|| 0,vb=H?l.tickColor:l.minorTickColor,ob=H?l.tickPosition:l.minorTickPosition;H=ia.step;var hb=w&&sc||Ma,Pb;Pb=aa?ua(E+rc,null,null,w)+Na:Sa+L+(Fa?(w&&Wb||Va)-P-Sa:0);hb=aa?hb-gc+L-(Fa?Rb:0):hb-ua(E+rc,null,null,w)-Na;if(fa){E=va(E+rc,fa,w);if(W===ha){W={stroke:jb,"stroke-width":fa};if(Ya)W.dashstyle=Ya;this.gridLine=W=fa?pa.path(E).attr(W).add(cb):null}W&&E&&W.animate({d:E})}if(zb){if(ob==="inside")wa=-wa;if(Fa)wa=-wa;fa=pa.crispLine([$a,Pb,hb,Ga,Pb+(aa?0:-wa),hb+(aa?wa:0)],zb);if(Q)Q.animate({d:fa}); else this.mark=pa.path(fa).attr({stroke:vb,"stroke-width":zb}).add(Ca)}if(K&&!isNaN(Pb)){Pb=Pb+ia.x-(rc&&aa?rc*ba*(qc?-1:1):0);hb=hb+ia.y-(rc&&!aa?rc*ba*(qc?1:-1):0);M(ia.y)||(hb+=la(K.styles.lineHeight)*0.9-K.getBBox().height/2);if(nd)hb+=p/(H||1)%nd*16;if(H)K[p%H?"hide":"show"]();K[this.isNew?"attr":"animate"]({x:Pb,y:hb})}this.isNew=false},destroy:function(){for(var p in this)this[p]&&this[p].destroy&&this[p].destroy()}};G.prototype={render:function(){var p=this,w=p.options,H=w.label,K=p.label, E=w.width,ia=w.to,W,fa=w.from,jb=w.dashStyle,Ya=p.svgElem,Q=[],wa,zb,vb=w.color;zb=w.zIndex;var ob=w.events;if(E){Q=va(w.value,E);w={stroke:vb,"stroke-width":E};if(jb)w.dashstyle=jb}else if(M(fa)&&M(ia)){fa=ja(fa,ka);ia=Ea(ia,oa);W=va(ia);if((Q=va(fa))&&W)Q.push(W[4],W[5],W[1],W[2]);else Q=null;w={fill:vb}}else return;if(M(zb))w.zIndex=zb;if(Ya)if(Q)Ya.animate({d:Q},null,Ya.onGetPath);else{Ya.hide();Ya.onGetPath=function(){Ya.show()}}else if(Q&&Q.length){p.svgElem=Ya=pa.path(Q).attr(w).add();if(ob){jb= function(hb){Ya.on(hb,function(Pb){ob[hb].apply(p,[Pb])})};for(wa in ob)jb(wa)}}if(H&&M(H.text)&&Q&&Q.length&&Qb>0&&Rb>0){H=Y({align:aa&&W&&"center",x:aa?!W&&4:10,verticalAlign:!aa&&W&&"middle",y:aa?W?16:10:W?6:-4,rotation:aa&&!W&&90},H);if(!K)p.label=K=pa.text(H.text,0,0).attr({align:H.textAlign||H.align,rotation:H.rotation,zIndex:zb}).css(H.style).add();W=[Q[1],Q[4],C(Q[6],Q[1])];Q=[Q[2],Q[5],C(Q[7],Q[2])];wa=Ea.apply(na,W);zb=Ea.apply(na,Q);K.align(H,false,{x:wa,y:zb,width:ja.apply(na,W)-wa,height:ja.apply(na, Q)-zb});K.show()}else K&&K.hide();return p},destroy:function(){for(var p in this){this[p]&&this[p].destroy&&this[p].destroy();delete this[p]}Yc(fc,this)}};I.prototype={setTotal:function(p){this.cum=this.total=p},render:function(p){var w=this.options.formatter.call(this);if(this.label)this.label.attr({text:w,visibility:Cb});else this.label=n.renderer.text(w,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,visibility:Cb}).add(p)},setOffset:function(p,w){var H=this.isNegative, K=O.translate(this.total),E=O.translate(0);E=nb(K-E);var ia=n.xAxis[0].translate(this.x)+p,W=n.plotHeight;H={x:ya?H?K:K-E:ia,y:ya?W-ia-w:H?W-K-E:W-K,width:ya?E:w,height:ya?w:E};this.label&&this.label.align(this.alignOptions,null,H).attr({visibility:Lb})}};ua=function(p,w,H,K,E){var ia=1,W=0,fa=K?Ab:ba;K=K?Qc:ka;fa||(fa=ba);if(H){ia*=-1;W=Z}if(qc){ia*=-1;W-=ia*Z}if(w){if(qc)p=Z-p;p=p/fa+K;if(z&&E)p=na.pow(10,p)}else{if(z&&E)p=na.log(p)/na.LN10;p=ia*(p-K)*fa+W}return p};va=function(p,w,H){var K,E,ia; p=ua(p,null,null,H);var W=H&&sc||Ma,fa=H&&Wb||Va,jb;H=E=N(p+Na);K=ia=N(W-p-Na);if(isNaN(p))jb=true;else if(aa){K=Gb;ia=W-gc;if(HSa+Qb)jb=true}else{H=Sa;E=fa-P;if(KGb+Rb)jb=true}return jb?null:pa.crispLine([$a,H,K,Ga,E,ia],w||0)};wb.push(O);n[Ba?"xAxis":"yAxis"].push(O);if(ya&&Ba&&qc===ha)qc=true;ca(O,{addPlotBand:Za,addPlotLine:Za,adjustTickAmount:function(){if($b&&!D&&!lb&&!dc&&l.alignTicks!==false){var p=Ec,w=xa.length;Ec=$b[ma];if(wp||p===null)p=ka;else if(oa'+(z?Gc("%A, %b %e, %Y",L):L)+""]:[];A(D,function(Na){Z=Na.series;ba.push(Z.tooltipFormatter&&Z.tooltipFormatter(Na)|| Na.point.tooltipFormatter(ma))});return ba.join("
")}function G(D,z){R=Fa?D:(2*R+D)/3;O=Fa?z:(O+z)/2;F.attr({x:R,y:O});Ed=nb(D-R)>1||nb(z-O)>1?function(){G(D,z)}:null}function I(){if(!Fa){var D=n.hoverPoints;F.hide();A(ta,function(z){z&&z.hide()});D&&A(D,function(z){z.setState()});n.hoverPoints=null;Fa=true}}var da,qa=l.borderWidth,T=l.crosshairs,ta=[],Za=l.style,La=l.shared,pb=la(Za.padding),Ba=qa+pb,Fa=true,aa,Wa,R=0,O=0;Za.padding=0;var F=pa.label("",0,0).attr({padding:pb,fill:l.backgroundColor, "stroke-width":qa,r:l.borderRadius,zIndex:8}).css(Za).hide().add().shadow(1);return{shared:La,refresh:function(D){var z,L,ma,Z,ba={},Na=[];ma=D.tooltipPos;z=l.formatter||u;ba=n.hoverPoints;if(La&&!(D.series&&D.series.noSharedTooltip)){Z=0;ba&&A(ba,function(Ab){Ab.setState()});n.hoverPoints=D;A(D,function(Ab){Ab.setState(Tb);Z+=Ab.plotY;Na.push(Ab.getLabelConfig())});L=D[0].plotX;Z=N(Z)/D.length;ba={x:D[0].category};ba.points=Na;D=D[0]}else ba=D.getLabelConfig();ba=z.call(ba);da=D.series;L=C(L,D.plotX); Z=C(Z,D.plotY);z=N(ma?ma[0]:ya?db-Z:L);L=N(ma?ma[1]:ya?eb-L:Z);ma=La||!D.series.isCartesian||ib(z,L);if(ba===false||!ma)I();else{if(Fa){F.show();Fa=false}F.attr({text:ba});ma=F.getBBox();aa=ma.width;Wa=ma.height;F.attr({stroke:l.borderColor||D.color||da.color||"#606060"});z=z-aa+ga-25;L=L-Wa+ea+10;if(z<7){z=7;L-=30}if(LMa)L=Ma-Wa-5;G(N(z-Ba),N(L-Ba))}if(T){T=oc(T);for(z=T.length;z--;){L=D.series[z?"yAxis":"xAxis"];if(T[z]&&L){L=L.getPlotLinePath(D[z?"y":"x"],1);if(ta[z])ta[z].attr({d:L, visibility:Lb});else{ma={"stroke-width":T[z].width||1,stroke:T[z].color||"#C0C0C0",zIndex:2};if(T[z].dashStyle)ma.dashstyle=T[z].dashStyle;ta[z]=pa.path(L).attr(ma).add()}}}}},hide:I}}function f(l,u){function G(R){var O,F=oe&&Da.width/Da.documentElement.clientWidth-1,D,z,L;R=R||sb.event;if(!R.target)R.target=R.srcElement;if(R.originalEvent)R=R.originalEvent;O=R.touches?R.touches.item(0):R;if(R.type!=="mousemove"||sb.opera||F){D=sa;z={left:D.offsetLeft,top:D.offsetTop};for(D=D.offsetParent;D;){z.left+= D.offsetLeft;z.top+=D.offsetTop;if(D!==Da.body&&D!==Da.documentElement){z.left-=D.scrollLeft;z.top-=D.scrollTop}D=D.offsetParent}Rc=z;D=Rc.left;z=Rc.top}if(Zc){L=R.x;O=R.y}else if(O.layerX===ha){L=O.pageX-D;O=O.pageY-z}else{L=R.layerX;O=R.layerY}if(F){L+=N((F+1)*D-D);O+=N((F+1)*z-z)}return ca(R,{chartX:L,chartY:O})}function I(R){var O={xAxis:[],yAxis:[]};A(wb,function(F){var D=F.translate,z=F.isXAxis;O[z?"xAxis":"yAxis"].push({axis:F,value:D((ya?!z:z)?R.chartX-ga:eb-R.chartY+ea,true)})});return O} function da(){var R=l.hoverSeries,O=l.hoverPoint;O&&O.onMouseOut();R&&R.onMouseOut();Oa&&Oa.hide();Fd=null}function qa(){if(La){var R={xAxis:[],yAxis:[]},O=La.getBBox(),F=O.x-ga,D=O.y-ea;if(Za){A(wb,function(z){if(z.options.zoomEnabled!==false){var L=z.translate,ma=z.isXAxis,Z=ya?!ma:ma,ba=L(Z?F:eb-D-O.height,true,0,0,1);L=L(Z?F+O.width:eb-D,true,0,0,1);R[ma?"xAxis":"yAxis"].push({axis:z,min:Ea(ba,L),max:ja(ba,L)})}});Ha(l,"selection",R,Gd)}La=La.destroy()}Ja(sa,{cursor:"auto"});l.mouseIsDown=ac= Za=false;Ub(Da,Hb?"touchend":"mouseup",qa)}var T,ta,Za,La,pb=o.zoomType,Ba=/x/.test(pb),Fa=/y/.test(pb),aa=Ba&&!ya||Fa&&ya,Wa=Fa&&!ya||Ba&&ya;od=function(){if(pd){pd.translate(ga,ea);ya&&pd.attr({width:l.plotWidth,height:l.plotHeight}).invert()}else l.trackerGroup=pd=pa.g("tracker").attr({zIndex:9}).add()};od();if(u.enabled)l.tooltip=Oa=e(u);(function(){var R=true;sa.onmousedown=function(F){F=G(F);l.mouseIsDown=ac=true;T=F.chartX;ta=F.chartY;ra(Da,Hb?"touchend":"mouseup",qa)};var O=function(F){if(!(F&& F.touches&&F.touches.length>1)){F=G(F);if(!Hb)F.returnValue=false;var D=F.chartX,z=F.chartY,L=!ib(D-ga,z-ea);if(Hb&&F.type==="touchstart")if(Aa(F.target,"isTracker"))l.runTrackerClick||F.preventDefault();else!Ta&&!L&&F.preventDefault();if(L){R||da();if(Dga+db)D=ga+db;if(zea+eb)z=ea+eb}if(ac&&F.type!=="touchstart"){Za=Math.sqrt(Math.pow(T-D,2)+Math.pow(ta-z,2));if(Za>10){var ma=ib(T-ga,ta-ea);if(Ic&&(Ba||Fa)&&ma)La||(La=pa.rect(ga,ea,aa?1:db,Wa?1:eb,0).attr({fill:"rgba(69,114,167,0.25)", zIndex:7}).add());if(La&&aa){F=D-T;La.attr({width:nb(F),x:(F>0?0:F)+T})}if(La&&Wa){z=z-ta;La.attr({height:nb(z),y:(z>0?0:z)+ta})}if(ma&&!La&&o.panning){z=l.xAxis[0];F=z.getExtremes();ma=F.dataMin;F=F.dataMax;var Z=z.translate(T-D,true),ba=z.translate(T+db-D,true);Z>ma&&bama&&Z.splice(ba,1);if(Z.length&&Z[0].plotX!==Fd){Oa.refresh(Z);Fd=Z[0].plotX}}if(z&&z.tracker)(F=z.tooltipPoints[Ab])&&F!==D&&F.onMouseOver()}return(R=L)||!Ic}};sa.onmousemove=O;ra(sa,"mouseleave",da);sa.ontouchstart=function(F){if(Ba||Fa)sa.onmousedown(F);O(F)};sa.ontouchmove=O;sa.ontouchend= function(){Za&&da()};sa.onclick=function(F){var D=l.hoverPoint;F=G(F);F.cancelBubble=true;if(!Za)if(D&&Aa(F.target,"isTracker")){var z=D.plotX,L=D.plotY;ca(D,{pageX:Rc.left+ga+(ya?db-L:z),pageY:Rc.top+ea+(ya?eb-z:L)});Ha(D.series,"click",ca(F,{point:D}));D.firePointEvent("click",F)}else{ca(F,I(F));ib(F.chartX-ga,F.chartY-ea)&&Ha(l,"click",F)}Za=false}})();pe=setInterval(function(){Ed&&Ed()},32);ca(this,{zoomX:Ba,zoomY:Fa,resetTracker:da,normalizeMouseEvent:G})}function g(l){var u=l.type||o.type|| o.defaultSeriesType,G=fb[u],I=n.hasRendered;if(I)if(ya&&u==="column")G=fb.bar;else if(!ya&&u==="bar")G=fb.column;u=new G;u.init(n,l);if(!I&&u.inverted)ya=true;if(u.isCartesian)Ic=u.isCartesian;Ka.push(u);return u}function h(){o.alignTicks!==false&&A(wb,function(l){l.adjustTickAmount()});$b=null}function i(l){var u=n.isDirtyLegend,G,I=n.isDirtyBox,da=Ka.length,qa=da,T=n.clipRect;for(xc(l,n);qa--;){l=Ka[qa];if(l.isDirty&&l.options.stacking){G=true;break}}if(G)for(qa=da;qa--;){l=Ka[qa];if(l.options.stacking)l.isDirty= true}A(Ka,function(ta){if(ta.isDirty)if(ta.options.legendType==="point")u=true});if(u&&Hd.renderLegend){Hd.renderLegend();n.isDirtyLegend=false}if(Ic){if(!qd){$b=null;A(wb,function(ta){ta.leastDistance=ha;ta.setScale()})}h();Sc();A(wb,function(ta){if(ta.isDirty||I){ta.redraw();I=true}})}if(I){Id();od();if(T){rd(T);T.animate({width:n.plotSizeX,height:n.plotSizeY})}}A(Ka,function(ta){if(ta.isDirty&&ta.visible&&(!ta.isCartesian||ta.xAxis))ta.redraw()});Hc&&Hc.resetTracker&&Hc.resetTracker();Ha(n,"redraw")} function j(){var l=a.xAxis||{},u=a.yAxis||{};l=oc(l);A(l,function(G,I){G.index=I;G.isX=true});u=oc(u);A(u,function(G,I){G.index=I});l=l.concat(u);A(l,function(G){new d(G)});h()}function k(l,u){gb=Y(a.title,l);$=Y(a.subtitle,u);A([["title",l,gb],["subtitle",u,$]],function(G){var I=G[0],da=n[I],qa=G[1];G=G[2];if(da&&qa){da.destroy();da=null}if(G&&G.text&&!da)n[I]=pa.text(G.text,0,0).attr({align:G.align,"class":"highcharts-"+I,zIndex:1}).css(G.style).add().align(G,false,Ia)})}function m(){Pa=o.renderTo; Sb=Jc+Jd++;if(nc(Pa))Pa=Da.getElementById(Pa);Pa.innerHTML="";if(!Pa.offsetWidth){Xa=Pa.cloneNode(0);Ja(Xa,{position:Kc,top:"-9999px",display:""});Da.body.appendChild(Xa)}tc=(Xa||Pa).offsetWidth;hc=(Xa||Pa).offsetHeight;n.chartWidth=Va=o.width||tc||600;n.chartHeight=Ma=o.height||(hc>19?hc:400);n.container=sa=mb(cc,{className:"highcharts-container"+(o.className?" "+o.className:""),id:Sb},ca({position:qe,overflow:Cb,width:Va+qb,height:Ma+qb,textAlign:"left"},o.style),Xa||Pa);n.renderer=pa=o.forExport? new sd(sa,Va,Ma,true):new Tc(sa,Va,Ma);var l,u;if(re&&sa.getBoundingClientRect){l=function(){Ja(sa,{left:0,top:0});u=sa.getBoundingClientRect();Ja(sa,{left:-(u.left-la(u.left))+qb,top:-(u.top-la(u.top))+qb})};l();ra(sb,"resize",l);ra(n,"destroy",function(){Ub(sb,"resize",l)})}}function t(){function l(){var G=o.width||Pa.offsetWidth,I=o.height||Pa.offsetHeight;if(G&&I){if(G!==tc||I!==hc){clearTimeout(u);u=setTimeout(function(){Kd(G,I,false)},100)}tc=G;hc=I}}var u;ra(sb,"resize",l);ra(n,"destroy",function(){Ub(sb, "resize",l)})}function B(){var l=a.labels,u=a.credits,G;k();Hd=n.legend=new De(n);Sc();A(wb,function(I){I.setTickPositions(true)});h();Sc();Id();Ic&&A(wb,function(I){I.render()});if(!n.seriesGroup)n.seriesGroup=pa.g("series-group").attr({zIndex:3}).add();A(Ka,function(I){I.translate();I.setTooltipPoints();I.render()});l.items&&A(l.items,function(){var I=ca(l.style,this.style),da=la(I.left)+ga,qa=la(I.top)+ea+12;delete I.left;delete I.top;pa.text(this.html,da,qa).attr({zIndex:2}).css(I).add()});if(!n.toolbar)n.toolbar= c(n);if(u.enabled&&!n.credits){G=u.href;pa.text(u.text,0,0).on("click",function(){if(G)location.href=G}).attr({align:u.position.align,zIndex:8}).css(u.style).add().align(u.position)}od();n.hasRendered=true;if(Xa){Pa.appendChild(sa);dd(Xa)}}function v(){var l=Ka.length,u=sa&&sa.parentNode;Ha(n,"destroy");Ub(sb,"unload",v);Ub(n);for(A(wb,function(G){Ub(G)});l--;)Ka[l].destroy();if(sa){sa.innerHTML="";Ub(sa);u&&u.removeChild(sa);sa=null}if(pa)pa.alignedObjects=null;clearInterval(pe);for(l in n)delete n[l]} function J(){if(!Uc&&sb==sb.top&&Da.readyState!=="complete")Da.attachEvent("onreadystatechange",function(){Da.detachEvent("onreadystatechange",J);Da.readyState==="complete"&&J()});else{m();Ha(n,"init");if(se&&a.rangeSelector.enabled)n.rangeSelector=new se(n);Ld();Md();A(a.series||[],function(l){g(l)});n.inverted=ya=C(ya,a.chart.inverted);j();if(te&&a.navigator.enabled||a.scrollbar.enabled)n.scroller=new te(n);n.render=B;n.tracker=Hc=new f(n,a.tooltip);B();b&&b.apply(n,[n]);A(n.callbacks,function(l){l.apply(n, [n])});Ha(n,"load")}}md=Y(md,Ra.xAxis);Cd=Y(Cd,Ra.yAxis);Ra.xAxis=Ra.yAxis=null;var x=a.series;a.series=null;a=Y(Ra,a);a.series=x;var o=a.chart;x=o.margin;x=bc(x)?x:[x,x,x,x];var s=C(o.marginTop,x[0]),q=C(o.marginRight,x[1]),r=C(o.marginBottom,x[2]),y=C(o.marginLeft,x[3]),U=o.spacingTop,X=o.spacingRight,Ua=o.spacingBottom,bb=o.spacingLeft,Ia,gb,$,ea,Xb,tb,ga,rb,Pa,Xa,sa,Sb,tc,hc,Va,Ma,Wb,sc,uc,Lc,ic,V,n=this,Ta=(x=o.events)&&!!x.click,Db,ib,Oa,ac,Eb,vc,wc,eb,db,Hc,pd,od,Hd,jc,kc,Rc,Ic=o.showAxes, qd=0,wb=[],$b,Ka=[],ya,pa,Ed,pe,Fd,Id,Sc,Ld,Md,Kd,Gd,ue,De=function(l){function u(P,ua){var va=P.legendItem,Ca=P.legendLine,cb=P.legendSymbol,ab=Wa.color,za=ua?T.itemStyle.color:ab;ab=ua?P.color:ab;va&&va.css({fill:za});Ca&&Ca.attr({stroke:ab});cb&&cb.attr({stroke:ab,fill:ab})}function G(P,ua,va){var Ca=P.legendItem,cb=P.legendLine,ab=P.legendSymbol;P=P.checkbox;Ca&&Ca.attr({x:ua,y:va});cb&&cb.translate(ua,va-4);ab&&ab.attr({x:ua+ab.xOff,y:va+ab.yOff});if(P){P.x=ua;P.y=va}}function I(){A(pb,function(P){var ua= P.checkbox,va=Sa.alignAttr;ua&&Ja(ua,{left:va.translateX+P.legendItemWidth+ua.x-40+qb,top:va.translateY+ua.y-11+qb})})}function da(P){var ua,va,Ca,cb,ab=P.legendItem;cb=P.series||P;var za=cb.options,ub=za&&za.borderWidth||0;if(!ab){cb=/^(bar|pie|area|column)$/.test(cb.type);P.legendItem=ab=pa.text(T.labelFormatter.call(P),0,0).css(P.visible?Fa:Wa).on("mouseover",function(){P.setState(Tb);ab.css(aa)}).on("mouseout",function(){ab.css(P.visible?Fa:Wa);P.setState()}).on("click",function(){var ec=function(){P.setVisible()}; P.firePointEvent?P.firePointEvent("legendItemClick",null,ec):Ha(P,"legendItemClick",null,ec)}).attr({zIndex:2}).add(Sa);if(!cb&&za&&za.lineWidth){var Zb={"stroke-width":za.lineWidth,zIndex:2};if(za.dashStyle)Zb.dashstyle=za.dashStyle;P.legendLine=pa.path([$a,-Za-La,0,Ga,-La,0]).attr(Zb).add(Sa)}if(cb)Ca=pa.rect(ua=-Za-La,va=-11,Za,12,2).attr({zIndex:3}).add(Sa);else if(za&&za.marker&&za.marker.enabled){Ca=za.marker.radius;Ca=pa.symbol(P.symbol,ua=-Za/2-La-Ca,va=-4-Ca,2*Ca,2*Ca).attr(P.pointAttr[Ib]).attr({zIndex:3}).add(Sa)}if(Ca){Ca.xOff= ua+ub%2/2;Ca.yOff=va+ub%2/2}P.legendSymbol=Ca;u(P,P.visible);if(za&&za.showCheckbox){P.checkbox=mb("input",{type:"checkbox",checked:P.selected,defaultChecked:P.selected},T.itemCheckboxStyle,sa);ra(P.checkbox,"click",function(ec){Ha(P,"checkboxClick",{checked:ec.target.checked},function(){P.select()})})}}ua=ab.getBBox();va=P.legendItemWidth=T.itemWidth||Za+La+ua.width+O;Z=ua.height;if(ta&&z-D+va>(Qb||Va-2*R-D)){z=D;L+=Z}ma=L;G(P,z,L);if(ta)z+=va;else L+=Z;Gb=Qb||ja(ta?z-D:va,Gb)}function qa(){z=D; L=F;ma=Gb=0;Sa||(Sa=pa.g("legend").attr({zIndex:7}).add());pb=[];A(Rb,function(Ca){var cb=Ca.options;if(cb.showInLegend)pb=pb.concat(cb.legendType==="point"?Ca.data:Ca)});pb.sort(function(Ca,cb){return(Ca.options.legendIndex||0)-(cb.options.legendIndex||0)});gc&&pb.reverse();A(pb,da);jc=Qb||Gb;kc=ma-F+Z;if(Na||Ab){jc+=2*R;kc+=2*R;if(ba)jc>0&&kc>0&&ba.animate(ba.crisp(null,null,null,jc,kc));else ba=pa.rect(0,0,jc,kc,T.borderRadius,Na||0).attr({stroke:T.borderColor,"stroke-width":Na||0,fill:Ab||Jb}).add(Sa).shadow(T.shadow); ba[pb.length?"show":"hide"]()}for(var P=["left","right","top","bottom"],ua,va=4;va--;){ua=P[va];if(Ba[ua]&&Ba[ua]!=="auto"){T[va<2?"align":"verticalAlign"]=ua;T[va<2?"x":"y"]=la(Ba[ua])*(va%2?-1:1)}}Sa.align(ca(T,{width:jc,height:kc}),true,Ia);qd||I()}var T=l.options.legend;if(T.enabled){var ta=T.layout==="horizontal",Za=T.symbolWidth,La=T.symbolPadding,pb,Ba=T.style,Fa=T.itemStyle,aa=T.itemHoverStyle,Wa=T.itemHiddenStyle,R=la(Ba.padding),O=20,F=18,D=4+R+Za+La,z,L,ma,Z=0,ba,Na=T.borderWidth,Ab=T.backgroundColor, Sa,Gb,Qb=T.width,Rb=l.series,gc=T.reversed;qa();ra(l,"endResize",I);return{colorizeItem:u,destroyItem:function(P){var ua=P.checkbox;A(["legendItem","legendLine","legendSymbol"],function(va){P[va]&&P[va].destroy()});ua&&dd(P.checkbox)},renderLegend:qa}}};ib=function(l,u){return l>=0&&l<=db&&u>=0&&u<=eb};ue=function(){Ha(n,"selection",{resetSelection:true},Gd);n.toolbar.remove("zoom")};Gd=function(l){var u=Ra.lang,G=n.pointCount<100;n.resetZoomEnabled!==false&&n.toolbar.add("zoom",u.resetZoom,u.resetZoomTitle, ue);!l||l.resetSelection?A(wb,function(I){I.options.zoomEnabled!==false&&I.setExtremes(null,null,false,G)}):A(l.xAxis.concat(l.yAxis),function(I){var da=I.axis;if(n.tracker[da.isXAxis?"zoomX":"zoomY"])da.setExtremes(I.min,I.max,false,G)});i()};Sc=function(){var l=a.legend,u=C(l.margin,10),G=l.x,I=l.y,da=l.align,qa=l.verticalAlign,T;Ld();if((n.title||n.subtitle)&&!M(s))if(T=ja(n.title&&!gb.floating&&!gb.verticalAlign&&gb.y||0,n.subtitle&&!$.floating&&!$.verticalAlign&&$.y||0))ea=ja(ea,T+C(gb.margin, 15)+U);if(l.enabled&&!l.floating)if(da==="right")M(q)||(Xb=ja(Xb,jc-G+u+X));else if(da==="left")M(y)||(ga=ja(ga,jc+G+u+bb));else if(qa==="top")M(s)||(ea=ja(ea,kc+I+u+U));else if(qa==="bottom")M(r)||(tb=ja(tb,kc-I+u+Ua));if(n.extraBottomMargin)tb+=n.extraBottomMargin;if(n.extraTopMargin)ea+=n.extraTopMargin;Ic&&A(wb,function(ta){ta.getOffset()});M(y)||(ga+=rb[3]);M(s)||(ea+=rb[0]);M(r)||(tb+=rb[2]);M(q)||(Xb+=rb[1]);Md()};Kd=function(l,u,G){var I=n.title,da=n.subtitle;qd+=1;xc(G,n);sc=Ma;Wb=Va;if(M(l))n.chartWidth= Va=N(l);if(M(u))n.chartHeight=Ma=N(u);Ja(sa,{width:Va+qb,height:Ma+qb});pa.setSize(Va,Ma,G);db=Va-ga-Xb;eb=Ma-ea-tb;$b=null;A(wb,function(qa){qa.isDirty=true;qa.setScale()});A(Ka,function(qa){qa.isDirty=true});n.isDirtyLegend=true;n.isDirtyBox=true;Sc();I&&I.align(null,null,Ia);da&&da.align(null,null,Ia);i(G);sc=null;Ha(n,"resize");setTimeout(function(){Ha(n,"endResize",null,function(){qd-=1})},cd&&cd.duration||500)};Md=function(){n.plotLeft=ga=N(ga);n.plotTop=ea=N(ea);n.plotWidth=db=N(Va-ga-Xb); n.plotHeight=eb=N(Ma-ea-tb);n.plotSizeX=ya?eb:db;n.plotSizeY=ya?db:eb;Ia={x:bb,y:U,width:Va-bb-X,height:Ma-U-Ua};A(wb,function(l){l.setAxisSize()})};Ld=function(){ea=C(s,U);Xb=C(q,X);tb=C(r,Ua);ga=C(y,bb);rb=[0,0,0,0]};Id=function(){var l=o.borderWidth||0,u=o.backgroundColor,G=o.plotBackgroundColor,I=o.plotBackgroundImage,da,qa={x:ga,y:ea,width:db,height:eb};da=l+(o.shadow?8:0);if(l||u)if(uc)uc.animate(uc.crisp(null,null,null,Va-da,Ma-da));else uc=pa.rect(da/2,da/2,Va-da,Ma-da,o.borderRadius,l).attr({stroke:o.borderColor, "stroke-width":l,fill:u||Jb}).add().shadow(o.shadow);if(G)if(Lc)Lc.animate(qa);else Lc=pa.rect(ga,ea,db,eb,0).attr({fill:G}).add().shadow(o.plotShadow);if(I)if(ic)ic.animate(qa);else ic=pa.image(I,ga,ea,db,eb).add();if(o.plotBorderWidth)if(V)V.animate(V.crisp(null,ga,ea,db,eb));else V=pa.rect(ga,ea,db,eb,0,o.plotBorderWidth).attr({stroke:o.plotBorderColor,"stroke-width":o.plotBorderWidth,zIndex:4}).add();n.isDirtyBox=false};ra(sb,"unload",v);o.reflow!==false&&ra(n,"load",t);if(x)for(Db in x)ra(n, Db,x[Db]);n.options=a;n.series=Ka;n.xAxis=[];n.yAxis=[];n.addSeries=function(l,u,G){var I;if(l){xc(G,n);u=C(u,true);Ha(n,"addSeries",{options:l},function(){I=g(l);I.isDirty=true;n.isDirtyLegend=true;u&&n.redraw()})}return I};n.animation=C(o.animation,true);n.Axis=d;n.destroy=v;n.get=function(l){var u,G,I;for(u=0;u12?Lb:Cb})}sa=true}function e(){ra(a.container,ve,function(V){V=a.tracker.normalizeMouseEvent(V);var n=V.chartX,Ta=V.chartY,Db=Hb?10:7;if(Ta>tb&&Taj+r&&nPa&&nPa+Xa-$?r+Ea(10,U):nXa-2*$)n=Xa-U-2*$;a.xAxis[0].setExtremes(q.translate(n,true),q.translate(n+U,true),true,false)}V.preventDefault&&V.preventDefault()});ra(a.container,Ee,function(V){V=a.tracker.normalizeMouseEvent(V);V=V.chartX;if(VPa+Xa-$)V=Pa+Xa-$;if(B){s=true;c(0,0,V-j,x)}else if(v){s=true;c(0,0,x,V-j)}else if(J){s= true;if(VXa+o-U-2*$)V=Xa+o-U-2*$;c(0,0,V-o,V-o+U)}});ra(document,Fe,function(){s&&a.xAxis[0].setExtremes(q.translate(r,true),q.translate(y,true),true,false);B=v=J=s=o=null;X.cursor=Ua})}var f=a.renderer,g=a.options,h=g.navigator,i=h.enabled,j,k,m=g.scrollbar,t=m.enabled,B,v,J,x,o,s,q,r,y,U,X=document.body.style,Ua,bb=h.handles,Ia=i?h.height:0,gb=h.outlineWidth,$=t?m.height:0,ea=Ia+$,Xb=m.barBorderRadius,tb=h.top||a.chartHeight-Ia-$-g.chart.spacingBottom,ga=gb/2,rb,Pa,Xa,sa;g=h.baseSeries; var Sb=a.series[g]||typeof g==="string"&&a.get(g)||a.series[0],tc,hc,Va,Ma=[],Wb,sc,uc,Lc,ic=[];a.resetZoomEnabled=false;(function(){var V=a.xAxis.length,n=a.yAxis.length;a.extraBottomMargin=ea+h.margin;if(i){var Ta=Sb.options,Db,ib=Ta.data;Ta.data=null;Db=Y(Sb.options,h.series,{threshold:null,clip:false,enableMouseTracking:false,group:"nav",padXAxis:false,xAxis:V,yAxis:n,name:"Navigator",showInLegend:false});Ta.data=Db.data=ib;k=a.initSeries(Db);ra(Sb,"updatedData",function(){var Oa=Sb.xAxis.getExtremes(), ac=Oa.max-Oa.min,Eb=Oa.max>=k.xData[k.xData.length-1],vc=Oa.min-ac<=k.xData[0];k.options.pointStart=Sb.xData[0];k.setData(Sb.options.data);if(Eb){Oa=Oa.dataMax;Sb.xAxis.setExtremes(Oa-ac,Oa)}else if(vc){Oa=Oa.dataMin;Sb.xAxis.setExtremes(Oa,Oa+ac)}else c(ja(Oa.min,Oa.dataMin),Ea(Oa.max,Oa.dataMax))});q=new a.Axis(Y(h.xAxis,{isX:true,type:"datetime",index:V,height:Ia,top:tb,offset:0,offsetLeft:$,offsetRight:-$,startOnTick:false,endOnTick:false,minPadding:0,maxPadding:0,zoomEnabled:false}));new a.Axis(Y(h.yAxis, {alignTicks:false,height:Ia,top:tb,offset:0,index:n,zoomEnabled:false}))}else q={translate:function(Oa,ac){var Eb=Sb.xAxis.getExtremes(),vc=a.plotWidth-2*$,wc=Eb.dataMin;Eb=Eb.dataMax-wc;return ac?Oa*Eb/vc+wc:vc*(Oa-wc)/Eb}};e()})();return{render:c}}function se(a){function b(x,o,s){var q=a.xAxis[0],r=q&&q.getExtremes(),y,U=r&&r.dataMin,X=r&&r.dataMax,Ua,bb=q&&Ea(r.max,X);r=new Date(bb);y=o.type;o=o.count;var Ia,gb,$={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(!(U===null|| X===null)){if($[y]){Ia=$[y]*o;Ua=ja(bb-Ia,U)}else if(y==="month"){r.setMonth(r.getMonth()-o);Ua=ja(r.getTime(),U);Ia=2592E6*o}else if(y==="ytd"){r=new Date(0);y=new Date;gb=y.getFullYear();r.setFullYear(gb);String(gb)!==Gc("%Y",r)&&r.setFullYear(gb-1);Ua=gb=ja(U||0,r.getTime());y=y.getTime();bb=Ea(X||y,y)}else if(y==="year"){r.setFullYear(r.getFullYear()-o);Ua=ja(U,r.getTime());Ia=31536E6*o}else if(y==="all"&&q){Ua=U;bb=X}t[x]&&t[x].setState(2);if(q)setTimeout(function(){q.setExtremes(Ua,bb,C(s,1), 0);m=x},1);else{a.options.xAxis=Y(a.options.xAxis,{range:Ia,min:gb});m=x}}}function d(x,o){var s=x.hasFocus?"%Y-%m-%d":"%b %e, %Y";if(o)x.HCTime=o;x.value=Gc(s,x.HCTime)}function c(x){var o=x==="min",s;mb("span",{innerHTML:h[o?"rangeSelectorFrom":"rangeSelectorTo"]},v.labelStyle,i);s=mb("input",{name:x,className:"highcharts-range-selector",type:"text"},ca({width:"80px",height:"16px",border:"1px solid silver",marginLeft:"5px",marginRight:o?"5px":"0",textAlign:"center"},v.inputStyle),i);s.onfocus=s.onblur= function(q){q=q||window.event;s.hasFocus=q.type==="focus";d(s)};s.onchange=function(){var q=s.value,r=Date.parse(q),y=a.xAxis[0].getExtremes();if(isNaN(r)){r=q.split("-");r=Date.UTC(la(r[0]),la(r[1])-1,la(r[2]))}if(!isNaN(r)&&(o&&r>y.dataMin&&rj.HCTime))a.xAxis[0].setExtremes(o?r:y.min,o?y.max:r)};return s}var e=a.renderer,f,g=a.container,h=Ra.lang,i,j,k,m,t=[],B,v,J=[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd", text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}];a.resetZoomEnabled=false;(function(){a.extraTopMargin=25;v=a.options.rangeSelector;B=v.buttons||J;m=v.selected;ra(g,ve,function(){j&&j.blur();k&&k.blur()});m!==ha&&B[m]&&b(m,B[m],false);ra(a,"load",function(){ra(a.xAxis[0],"setExtremes",function(){t[m]&&t[m].setState(0)})})})();return{render:function(x,o){var s=a.options.chart.style,q=v.buttonTheme,r=v.inputEnabled!==false,y=q&&q.states;if(!f){e.text(h.rangeSelectorZoom,a.plotLeft, a.plotTop-10).css(v.labelStyle).add();A(B,function(U,X){t[X]=e.button(U.text,a.plotLeft+50+X*30,a.plotTop-25,function(){b(X,U);this.isActive=true},ca(q,{padding:1,r:0}),y&&y.hover,y&&y.select).attr({width:28,height:16}).css({textAlign:"center"}).add();m===X&&t[X].setState(2)});if(r){i=mb("div",null,{position:"relative",height:0,fontFamily:s.fontFamily,fontSize:s.fontSize},g.parentNode);i=mb("div",null,ca({position:"absolute",top:-a.chartHeight+a.plotTop-25+"px",right:a.chartWidth-a.plotLeft-a.plotWidth+ "px"},v.inputBoxStyle),i);j=c("min");k=c("max")}}if(r){d(j,x);d(k,o)}f=true}}}var Da=document,sb=window,na=Math,N=na.round,Kb=na.floor,ld=na.ceil,ja=na.max,Ea=na.min,nb=na.abs,Mb=na.cos,Vb=na.sin,lc=na.PI,we=lc*2/360,Mc=navigator.userAgent,Zc=/msie/i.test(Mc)&&!sb.opera,Vc=Da.documentMode===8,oe=/AppleWebKit/.test(Mc),re=/Firefox/.test(Mc),Uc=!!Da.createElementNS&&!!Da.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,Tc,Hb=Da.documentElement.ontouchstart!==undefined,xe={},Jd=0,Ob= 1,ed,Ra,Gc,cd,ud,ha,cc="div",Kc="absolute",qe="relative",Cb="hidden",Jc="highcharts-",Lb="visible",qb="px",Jb="none",$a="M",Ga="L",ye="rgba(192,192,192,"+(Uc?1.0E-6:0.0020)+")",Ib="",Tb="hover",Td="millisecond",Ud="second",Vd="minute",Wd="hour",Xd="day",Yd="week",Zd="month",$d="year",bd,wd,xd,zd,Oc,$c,ad,ae,be,yd,ce,de,S=sb.HighchartsAdapter,Fb=S||{},A=Fb.each,Nd=Fb.grep,Wc=Fb.map,Y=Fb.merge,ra=Fb.addEvent,Ub=Fb.removeEvent,Ha=Fb.fireEvent,td=Fb.animate,rd=Fb.stop,fb={};sb.Highcharts={};Gc=function(a, b,d){function c(B,v){B=B.toString().replace(/^([0-9])$/,"0$1");if(v===3)B=B.toString().replace(/^([0-9]{2})$/,"0$1");return B}if(!M(b)||isNaN(b))return"Invalid date";a=C(a,"%Y-%m-%d %H:%M:%S");var e=new Date(b*Ob),f,g=e[xd](),h=e[zd](),i=e[Oc](),j=e[$c](),k=e[ad](),m=Ra.lang,t=m.weekdays;m=m.months;b={a:t[h].substr(0,3),A:t[h],d:c(i),e:i,b:m[j].substr(0,3),B:m[j],m:c(j+1),y:k.toString().substr(2,2),Y:k,H:c(g),I:c(g%12||12),l:g%12||12,M:c(e[wd]()),p:g<12?"AM":"PM",P:g<12?"am":"pm",S:c(e.getSeconds()), L:c(b%1E3,3)};for(f in b)a=a.replace("%"+f,b[f]);return d?a.substr(0,1).toUpperCase()+a.substr(1):a};ee.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};S&&S.init&&S.init();if(!S&&sb.jQuery){var Nb=jQuery;A=function(a,b){for(var d=0,c=a.length;d-1,f=e?7:3,g;b=b.split(" ");d=[].concat(d);var h,i,j=function(k){for(g=k.length;g--;)k[g]===$a&&k.splice(g+1,0,k[g+1],k[g+2],k[g+1],k[g+2])};if(e){j(b);j(d)}if(a.isArea){h=b.splice(b.length-6,6);i=d.splice(d.length-6,6)}if(c===1)d=[].concat(d).splice(0,f).concat(d);a.shift=0;if(b.length)for(a=d.length;b.length255)b[e]=255}}return this},setOpacity:function(c){b[3]=c;return this}}};fd.prototype={init:function(a,b){this.element=Da.createElementNS("http://www.w3.org/2000/svg",b);this.renderer=a},animate:function(a,b,d){if(b=C(b,cd,true)){b=Y(b);if(d)b.complete=d;td(this,a,b)}else{this.attr(a);d&&d()}},attr:function(a,b){var d= this,c,e,f,g,h,i=d.element,j=i.nodeName,k=d.renderer,m,t=d.shadows,B,v=d;if(nc(a)&&M(b)){c=a;a={};a[c]=b}if(nc(a)){c=a;if(j==="circle")c={x:"cx",y:"cy"}[c]||c;else if(c==="strokeWidth")c="stroke-width";v=Aa(i,c)||d[c]||0;if(c!=="d"&&c!=="visibility")v=parseFloat(v)}else for(c in a){m=false;e=a[c];Ha(d,"setAttr",{key:c,value:e},function(J){f=J.result;if(M(f)&&f!==false)e=f;if(c==="d"){if(e&&e.join)e=e.join(" ");if(/(NaN| {2}|^$)/.test(e))e="M 0 0";d.d=e}else if(c==="x"&&j==="text"){for(g=0;gg||!M(g)&&M(b))){c.insertBefore(f,a);h=true;break}}h||c.appendChild(f);this.added=true;Ha(this,"add");return this},destroy:function(){var a=this.element||{},b=this.shadows,d=this.box,c=a.parentNode,e;a.onclick=a.onmouseout=a.onmouseover= a.onmousemove=null;rd(this);c&&c.removeChild(a);b&&A(b,function(f){(c=f.parentNode)&&c.removeChild(f)});d&&d.destroy();Yc(this.renderer.alignedObjects,this);for(e in this)delete this[e];return null},empty:function(){for(var a=this.element,b=a.childNodes,d=b.length;d--;)a.removeChild(b[d])},shadow:function(a,b){var d=[],c,e,f=this.element,g=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(c=1;c<=3;c++){e=f.cloneNode(0);Aa(e,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*c,"stroke-width":7- 2*c,transform:"translate"+g,fill:Jb});b?b.element.appendChild(e):f.parentNode.insertBefore(e,f);d.push(e)}this.shadows=d}return this}};var sd=function(){this.init.apply(this,arguments)};sd.prototype={Element:fd,init:function(a,b,d,c){var e=location,f;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(f.element);this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Zc?"":e.href.replace(/#.*?$/,"");this.defs=this.createElement("defs").add(); this.forExport=c;this.setSize(b,d,false)},createElement:function(a){var b=new this.Element;b.init(this,a);return b},buildText:function(a){for(var b=a.element,d=C(a.textStr,"").toString().replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,'').replace(//g,"").split(//g),c=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=Aa(b,"x"),h=a.styles,i=re&&h&&h.HcDirection==="rtl"&&!this.forExport&& la(Mc.split("Firefox/")[1])<4,j,k=h&&la(h.width),m=h&&h.lineHeight,t,B=c.length;B--;)b.removeChild(c[B]);k&&!a.added&&this.box.appendChild(b);A(d,function(v,J){var x,o=0,s;v=v.replace(//g,"|||");x=v.split("|||");A(x,function(q){if(q!==""||x.length===1){var r={},y=Da.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(q)&&Aa(y,"style",q.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));if(f.test(q)){Aa(y,"onclick",'location.href="'+q.match(f)[1]+ '"');Ja(y,{cursor:"pointer"})}q=(q.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">");if(i){j=[];for(B=q.length;B--;)j.push(q.charAt(B));q=j.join("")}y.appendChild(Da.createTextNode(q));if(o)r.dx=3;else r.x=g;if(!o){if(J){!Uc&&a.renderer.forExport&&Ja(y,{display:"block"});s=sb.getComputedStyle&&sb.getComputedStyle(t,null).getPropertyValue("line-height");if(!s||isNaN(s))s=m||t.offsetHeight||18;Aa(y,"dy",s)}t=y}Aa(y,r);b.appendChild(y);o++;if(k){q=q.replace(/-/g,"- ").split(" "); for(var U,X=[];q.length||X.length;){U=b.getBBox().width;r=U>k;if(!r||q.length===1){q=X;X=[];if(q.length){y=Da.createElementNS("http://www.w3.org/2000/svg","tspan");Aa(y,{dy:m||16,x:g});b.appendChild(y);if(U>k)k=U}}else{y.removeChild(y.firstChild);X.unshift(q.pop())}q.length&&y.appendChild(Da.createTextNode(q.join(" ").replace(/- /g,"-")))}}}})})},button:function(a,b,d,c,e,f,g){var h=this.label(a,b,d),i=0,j,k,m,t,B;e=Y(Yb("stroke-width",1,"stroke","#999","fill",Yb("linearGradient",[0,0,0,14],"stops", [[0,"#FFF"],[1,"#DDD"]]),"r",3,"padding",3,"style",Yb("color","black")),e);m=e.style;delete e.style;f=Y(e,Yb("stroke","#68A","fill",Yb("linearGradient",[0,0,0,14],"stops",[[0,"#FFF"],[1,"#ACF"]])),f);t=f.style;delete f.style;g=Y(e,Yb("stroke","#68A","fill",Yb("linearGradient",[0,0,0,14],"stops",[[0,"#9BD"],[1,"#CDF"]])),g);B=g.style;delete g.style;ra(h.element,"mouseenter",function(){h.attr(f).css(t)});ra(h.element,"mouseleave",function(){j=[e,f,g][i];k=[m,t,B][i];h.attr(j).css(k)});h.setState=function(v){if(i= v)v===2&&h.attr(g).css(B);else h.attr(e).css(m)};return h.on("click",function(){c.call(h)}).attr(e).css(ca({cursor:"default"},m))},crispLine:function(a,b){if(a[1]===a[4])a[1]=a[4]=N(a[1])+b%2/2;if(a[2]===a[5])a[2]=a[5]=N(a[2])+b%2/2;return a},path:function(a){return this.createElement("path").attr({d:a,fill:Jb})},circle:function(a,b,d){a=bc(a)?a:{x:a,y:b,r:d};return this.createElement("circle").attr(a)},arc:function(a,b,d,c,e,f){if(bc(a)){b=a.y;d=a.r;c=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol("arc", a||0,b||0,d||0,d||0,{innerR:c||0,start:e||0,end:f||0})},rect:function(a,b,d,c,e,f){if(bc(a)){b=a.y;d=a.width;c=a.height;e=a.r;f=a.strokeWidth;a=a.x}e=this.createElement("rect").attr({rx:e,ry:e,fill:Jb});return e.attr(e.crisp(f,a,b,ja(d,0),ja(c,0)))},setSize:function(a,b,d){var c=this.alignedObjects,e=c.length;this.width=a;this.height=b;for(this.boxWrapper[C(d,true)?"animate":"attr"]({width:a,height:b});e--;)c[e].align()},g:function(a){return this.createElement("g").attr(M(a)&&{"class":Jc+a})},image:function(a, b,d,c,e){var f={preserveAspectRatio:Jb};arguments.length>1&&ca(f,{x:b,y:d,width:c,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,d,c,e,f){var g,h=this.symbols[a];h=h&&h(N(b),N(d),c,e,f);var i=/^url\((.*?)\)$/,j;if(h){g=this.path(h);ca(g,{symbolName:a,x:b,y:d,width:c,height:e});f&&ca(g,f)}else if(i.test(a)){var k=function(m,t){m.attr({width:t[0], height:t[1]}).translate(-N(t[0]/2),-N(t[1]/2))};j=a.match(i)[1];a=xe[j];g=this.image(j).attr({x:b,y:d});if(a)k(g,a);else{g.attr({width:0,height:0});mb("img",{onload:function(){k(g,xe[j]=[this.width,this.height])},src:j})}}return g},symbols:{circle:function(a,b,d,c){var e=0.166*d;return[$a,a+d/2,b,"C",a+d+e,b,a+d+e,b+c,a+d/2,b+c,"C",a-e,b+c,a-e,b,a+d/2,b,"Z"]},square:function(a,b,d,c){return[$a,a,b,Ga,a+d,b,a+d,b+c,a,b+c,"Z"]},triangle:function(a,b,d,c){return[$a,a+d/2,b,Ga,a+d,b+c,a,b+c,"Z"]},"triangle-down":function(a, b,d,c){return[$a,a,b,Ga,a+d,b,a+d/2,b+c,"Z"]},diamond:function(a,b,d,c){return[$a,a+d/2,b,Ga,a+d,b+c/2,a+d/2,b+c,a,b+c/2,"Z"]},arc:function(a,b,d,c,e){var f=e.start,g=e.end-1.0E-6;c=e.innerR;var h=Mb(f),i=Vb(f),j=Mb(g);g=Vb(g);e=e.end-f');if(b){d=b===cc||b==="span"||b==="img"?d.join(""):a.prepVML(d);this.element=mb(d)}this.renderer=a},add:function(a){var b=this.renderer,d=this.element,c=b.box;c=a?a.element||a:c;a&&a.inverted&&b.invertChild(d,c);Vc&&c.gVis===Cb&&Ja(d,{visibility:Cb}); c.appendChild(d);this.added=true;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();Ha(this,"add");return this},attr:function(a,b){var d=this,c,e,f,g,h=d.element||{},i=h.style,j=h.nodeName,k=d.renderer,m=d.symbolName,t,B,v=d.shadows,J,x=d;if(nc(a)&&M(b)){c=a;a={};a[c]=b}if(nc(a)){c=a;x=c==="strokeWidth"||c==="stroke-width"?d.strokeweight:d[c]}else for(c in a){e=a[c];J=false;Ha(d,"setAttr",{key:c,value:e},function(o){g=o.result;if(M(g)&&g!==false)e=g;if(m&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!B){d.symbolAttr(a); B=true}J=true}else if(c==="d"){e=e||[];d.d=e.join(" ");f=e.length;for(var s=[];f--;)s[f]=Xc(e[f])?N(e[f]*10)-5:e[f]==="Z"?"x":e[f];e=s.join(" ")||"x";h.path=e;if(v)for(f=v.length;f--;)v[f].path=e;J=true}else if(c==="zIndex"||c==="visibility"){if(Vc&&c==="visibility"&&j==="DIV"){h.gVis=e;t=h.childNodes;for(f=t.length;f--;)Ja(t[f],{visibility:e});if(e===Lb)e=null}if(e)i[c]=e;J=true}else if(c==="width"||c==="height"){if(d.updateClipping){d[c]=e;d.updateClipping()}else i[c]=e;J=true}else if(/^(x|y)$/.test(c)){d[c]= e;if(h.tagName==="SPAN")d.updateTransform();else i[{x:"left",y:"top"}[c]]=e}else if(c==="class")h.className=e;else if(c==="stroke"){e=k.color(e,h,c);c="strokecolor"}else if(c==="stroke-width"||c==="strokeWidth"){h.stroked=e?true:false;c="strokeweight";d[c]=e;if(Xc(e))e+=qb}else if(c==="dashstyle"){(h.getElementsByTagName("stroke")[0]||mb(k.prepVML([""]),null,null,h))[c]=e||"solid";d.dashstyle=e;J=true}else if(c==="fill")if(j==="SPAN")i.color=e;else{h.filled=e!==Jb?true:false;e=k.color(e, h,c);c="fillcolor"}else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="align"){if(c==="align")c="textAlign";d[c]=e;d.updateTransform();J=true}else if(c==="text"){this.bBox=null;h.innerHTML=e;J=true}if(v&&c==="visibility")for(f=v.length;f--;)v[f].style[c]=e;if(!J)if(Vc)try{h[c]=e}catch(q){console.log([h.tagName,c,e].join(", "))}else Aa(h,c,e);o.callback&&o.callback()})}return x},clip:function(a){var b=this,d=a.members;d.push(b);b.destroyClip=function(){Yc(d,b)};return b.css(a.getCSS(b.inverted))}, css:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&a.width){delete a.width;this.textWidth=b;this.updateTransform()}this.styles=ca(this.styles,a);Ja(this.element,a);return this},destroy:function(){this.destroyClip&&this.destroyClip();fd.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,d;b--;){d=a[b];d.parentNode.removeChild(d)}},getBBox:function(a){var b=this.element,d=this.bBox;if(!d||a){if(b.nodeName==="text")b.style.position=Kc;d=this.bBox= {x:b.offsetLeft,y:b.offsetTop,width:b.offsetWidth,height:b.offsetHeight}}return d},on:function(a,b){this.element["on"+a]=function(){var d=sb.event;d.target=d.srcElement;b(d)};return this},updateTransform:function(){if(this.added){var a=this,b=a.element,d=a.translateX||0,c=a.translateY||0,e=a.x||0,f=a.y||0,g=a.textAlign||"left",h={left:0,center:0.5,right:1}[g],i=g&&g!=="left",j=a.shadows;if(d||c){Ja(b,{marginLeft:d,marginTop:c});j&&A(j,function(q){Ja(q,{marginLeft:d+1,marginTop:c+1})})}a.inverted&& A(b.childNodes,function(q){a.renderer.invertChild(q,b)});if(b.tagName==="SPAN"){var k,m;j=a.rotation;var t;k=0;var B=1,v=0,J;t=la(a.textWidth);var x=a.xCorr||0,o=a.yCorr||0,s=[j,g,b.innerHTML,a.textWidth].join(",");if(s!==a.cTT){if(M(j)){k=j*we;B=Mb(k);v=Vb(k);Ja(b,{filter:j?["progid:DXImageTransform.Microsoft.Matrix(M11=",B,", M12=",-v,", M21=",v,", M22=",B,", sizingMethod='auto expand')"].join(""):Jb})}k=C(a.elemWidth,b.offsetWidth);m=C(a.elemHeight,b.offsetHeight);if(k>t){Ja(b,{width:t+qb,display:"block", whiteSpace:"normal"});k=t}t=N((la(b.style.fontSize)||12)*1.2);x=B<0&&-k;o=v<0&&-m;J=B*v<0;x+=v*t*(J?1-h:h);o-=B*t*(j?J?h:1-h:1);if(i){x-=k*h*(B<0?-1:1);if(j)o-=m*h*(v<0?-1:1);Ja(b,{textAlign:g})}a.xCorr=x;a.yCorr=o}Ja(b,{left:e+x,top:f+o});a.cTT=s}}else this.alignOnAdd=true},shadow:function(a,b){var d=[],c,e=this.element,f=this.renderer,g,h=e.style,i,j=e.path;if(j&&typeof j.value!=="string")j="x";if(a){for(c=1;c<=3;c++){i=[''];g=mb(f.prepVML(i),null,{left:la(h.left)+1,top:la(h.top)+1});i=[''];mb(f.prepVML(i),null,null,g);b?b.element.appendChild(g):e.parentNode.insertBefore(g,e);d.push(g)}this.shadows=d}return this}});S=function(){this.init.apply(this,arguments)};S.prototype=Y(sd.prototype,{Element:Fb,isIE8:Mc.indexOf("MSIE 8.0")>-1,init:function(a,b,d){var c;this.alignedObjects=[];c=this.createElement(cc);a.appendChild(c.element); this.box=c.element;this.boxWrapper=c;this.setSize(b,d,false);if(!Da.namespaces.hcv){Da.namespaces.add("hcv","urn:schemas-microsoft-com:vml");Da.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}},clipRect:function(a,b,d,c){var e=this.createElement();return ca(e,{members:[],left:a,top:b,width:d,height:c,getCSS:function(f){var g=this.top,h=this.left,i=h+this.width,j=g+this.height;g={clip:"rect("+N(f?h:g)+"px,"+N(f?j: i)+"px,"+N(f?i:j)+"px,"+N(f?g:h)+"px)"};!f&&Vc&&ca(g,{width:i+qb,height:j+qb});return g},updateClipping:function(){A(e.members,function(f){f.css(e.getCSS(f.inverted))})}})},color:function(a,b,d){var c,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,i,j,k,m;A(a.stops,function(t,B){if(e.test(t[1])){c=mc(t[1]);f=c.get("rgb");g=c.get("a")}else{f=t[1];g=1}if(B){k=f;m=g}else{i=f;j=g}});a=90-na.atan((h[3]-h[1])/(h[2]-h[0]))*180/lc;d=["<",d,' colors="0% ',i,",100% ",k,'" angle="',a,'" opacity="', m,'" o:opacity2="',j,'" type="gradient" focus="100%" />'];mb(this.prepVML(d),null,null,b)}else if(e.test(a)&&b.tagName!=="IMG"){c=mc(a);d=["<",d,' opacity="',c.get("a"),'"/>'];mb(this.prepVML(d),null,null,b);return c.get("rgb")}else return a},prepVML:function(a){var b=this.isIE8;a=a.join("");if(b){a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />');a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')}else a= a.replace("<","1&&f.css({left:b,top:d,width:c,height:e});return f},rect:function(a,b,d,c,e,f){if(bc(a)){b=a.y;d=a.width;c=a.height;f=a.strokeWidth;a=a.x}var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,ja(d,0),ja(c,0)))},invertChild:function(a,b){var d=b.style;Ja(a,{flip:"x",left:la(d.width)-10,top:la(d.height)-10,rotation:-90})},symbols:{arc:function(a,b,d,c,e){c=e.start;var f=e.end,g=Mb(c),h=Vb(c),i=Mb(f),j=Vb(f);e=e.innerR;var k=0.07/d,m=e&&0.1/e||0;if(f-c===0)return["x"];else if(2* lc-f+c',this.name||b.name,": ",!a?"x = "+(this.name||this.x)+", ":"","",!a?"y = ":"",this.y,""].join("")}, update:function(a,b,d){var c=this,e=c.series,f=c.graphic,g,h=e.data,i=h.length,j=e.chart;b=C(b,true);c.firePointEvent("update",{options:a},function(){c.applyOptions(a);if(bc(a)){e.getAttribs();f&&f.attr(c.pointAttr[e.state])}for(g=0;ga+1&&b.push(d.slice(a+1, e));a=e}else e===d.length-1&&b.push(d.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions,d=a.data;a.data=null;a=Y(b[this.type],b.series,a);a.data=d;return a},getColor:function(){var a=this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff";b.wrapColor(a.length)},getSymbol:function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++];b.wrapSymbol(a.length)}, addPoint:function(a,b,d,c){var e=this.data,f=this.graph,g=this.area,h=this.chart,i=this.xData,j=this.yData,k=f.shift||0,m=this.options.data;xc(c,h);if(f&&d)f.shift=k+1;if(g){g.shift=k+1;g.isArea=true}b=C(b,true);c={series:this};this.pointClass.prototype.applyOptions.apply(c,[a]);i.push(c.x);j.push(c.y);m.push(a);if(d)if(e[0])e[0].remove(false);else{e.shift();i.shift();j.shift();m.shift()}this.getAttribs();this.isDirtyData=this.isDirty=true;b&&h.redraw()},setData:function(a,b){var d=this.points,c= this.options,e=this.initialColor,f=this.chart;this.xIncrement=null;if(M(e))f.counters.color=e;e=[];var g=[],h=a.length,i;if(h>(c.turboThreshold||1E3))if(Xc(a[0])){i=C(c.pointStart,0);var j=C(c.pointInterval,1);for(c=0;cf){e=this.xAxis.getExtremes();f=e.min;var g=e.max,h=d-1;if(a[0]g){for(e=0;e=f){c=ja(0,e-1);break}for(;eg){h=e+1;break}a=a.slice(c,h);b=b.slice(c,h)}}this.cropStart=c;this.processedXData=a;this.processedYData=b},generatePoints:function(){var a=this.options.data,b=this.data,d,c=this.processedXData,e=this.processedYData,f=this.pointClass,g=c.length,h=this.cropStart||0,i,j=this.hasGroupedData,k=[],m;if(!b&&!j){b=[];b.length=a.length;b=this.data=b}for(m= 0;m0?-6:12:e.y;f=e.formatter.call(v.getLabelConfig());b=(i?h.plotWidth-o:x)+e.x;d=(i?h.plotHeight-x:o)+r;if(j==="column")b+={left:-1,right:1}[q]*v.barW/2||0;if(s){if(i&&!e.y)d=d+la(s.styles.lineHeight)*0.9-s.getBBox().height/2;s.attr({text:f}).animate({x:b,y:d})}else if(M(f)){s=v.dataLabel=h.renderer.text(f,b,d).attr({align:q,rotation:e.rotation,zIndex:1}).css(e.style).add(g);i&&!e.y&&s.attr({y:d+la(s.styles.lineHeight)*0.9-s.getBBox().height/2})}if(m&& a.options.stacking){x=v.barY;o=v.barW;v=v.barH;s.align(e,null,{x:i?h.plotWidth-x-v:J,y:i?h.plotHeight-J-o:x,width:i?v:o,height:i?o:v})}})}},drawGraph:function(){var a=this,b=a.options,d=a.graph,c=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,i=b.lineWidth,j=b.dashStyle,k,m=a.chart.renderer,t=a.yAxis.getThreshold(b.threshold),B=/^area/.test(a.type),v=[],J=[];A(a.segments,function(x){k=[];A(x,function(r,y){if(a.getPointSpline)k.push.apply(k,a.getPointSpline(x,r,y));else{k.push(y?Ga:$a);y&&b.step&& k.push(r.plotX,x[y-1].plotY);k.push(r.plotX,r.plotY)}});if(x.length>1)c=c.concat(k);else v.push(x[0]);if(B){var o=[],s,q=k.length;for(s=0;s=0;s--)o.push(x[s].plotX,x[s].yBottom);else o.push(Ga,x[x.length-1].plotX,t,Ga,x[0].plotX,t);J=J.concat(o)}});a.graphPath=c;a.singlePoints=v;if(B){e=C(b.fillColor,mc(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.animate({d:J});else a.area=a.chart.renderer.path(J).attr({fill:e}).add(g)}if(d)d.animate({d:c}); else if(i){d={stroke:h,"stroke-width":i};if(j)d.dashstyle=j;a.graph=m.path(c).attr(d).add(g).shadow(b.shadow)}},render:function(){var a=this,b=a.chart,d,c,e=a.options,f=e.clip!==false,g=e.animation,h=g&&a.animate;g=h?g&&g.duration||500:0;var i=a.clipRect;c=b.renderer;if(!i){i=a.clipRect=!b.hasRendered&&b.clipRect?b.clipRect:c.clipRect(0,0,b.plotSizeX,b.plotSizeY);if(!b.clipRect)b.clipRect=i}if(!a.group){d=a.group=c.g("series");if(b.inverted){c=function(){d.attr({width:b.plotWidth,height:b.plotHeight}).invert()}; c();ra(b,"resize",c)}f&&d.clip(a.clipRect);d.attr({visibility:a.visible?Lb:Cb,zIndex:e.zIndex}).translate(a.xAxis.left,a.yAxis.top).add(b.seriesGroup)}a.drawDataLabels();h&&a.animate(true);a.getAttribs();a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==false&&a.drawTracker();h&&a.animate();setTimeout(function(){i.isAnimating=false;if((d=a.group)&&i!==b.clipRect&&i.renderer){if(f)d.clip(a.clipRect=b.clipRect);i.destroy()}},g);a.isDirty=a.isDirtyData=false},redraw:function(){var a= this.chart,b=this.group;if(b){a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight});b.animate({translateX:this.xAxis.left,translateY:this.yAxis.top})}this.translate();this.setTooltipPoints(true);this.isDirtyData&&Ha(this,"updatedData");this.render()},setState:function(a){var b=this.options,d=this.graph,c=b.states;b=b.lineWidth;a=a||Ib;if(this.state!==a){this.state=a;if(!(c[a]&&c[a].enabled===false)){if(a)b=c[a].lineWidth||b+1;if(d&&!d.dashstyle)d.attr({"stroke-width":b},a?0:500)}}},setVisible:function(a, b){var d=this.chart,c=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,i=this.points,j=d.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===ha?!h:a)?"show":"hide";e&&e[h]();if(f)f[h]();else for(e=i.length;e--;){f=i[e];f.tracker&&f.tracker[h]()}g&&g[h]();c&&d.legend.colorizeItem(this,a);this.isDirty=true;this.options.stacking&&A(d.series,function(k){if(k.options.stacking&&k.visible)k.isDirty=true});if(j)d.isDirtyBox=true;b!==false&&d.redraw();Ha(this,h)},show:function(){this.setVisible(true)}, hide:function(){this.setVisible(false)},select:function(a){this.selected=a=a===ha?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;Ha(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,d=[].concat(a.graphPath),c=d.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;h=h&&{cursor:h};var i=a.singlePoints,j;if(c)for(j=c+1;j--;){d[j]===$a&&d.splice(j+1,0,d[j+1]-f,d[j+2],Ga);if(j&&d[j]===$a||j===c)d.splice(j,0,Ga,d[j-2]+f,d[j-1])}for(j=0;ja&&i>e){i=ja(a,e);k=2*e-i}else if(ig&&k>e){k=ja(g,e);i=2*e-k}else if(kq?U-q:s-(y<=s?q:0)}gb=Ua-3}ca(r,{barX:X,barY:Ua,barW:x,barH:bb});r.shapeType="rect";y=ca(b.renderer.Element.prototype.crisp.apply({},[e,X,Ua,x,bb]),{r:d.borderRadius});if(e%2){y.y-=1;y.height+=1}r.shapeArgs=y;r.trackerArgs=M(gb)&&Y(r.shapeArgs,{height:ja(6,bb+3),y:gb})})},getSymbol:function(){}, drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,d=a.chart.renderer,c,e;A(a.points,function(f){var g=f.plotY;if(g!==ha&&!isNaN(g)&&f.y!==null){c=f.graphic;e=f.shapeArgs;if(c){rd(c);c.animate(e)}else f.graphic=c=d[f.shapeType](e).attr(f.pointAttr[f.selected?"select":Ib]).add(a.group).shadow(b.shadow)}})},drawTracker:function(){var a=this,b=a.chart,d=b.renderer,c,e,f=+new Date,g=a.options.cursor,h=g&&{cursor:g},i;A(a.points,function(j){e=j.tracker;c=j.trackerArgs||j.shapeArgs;delete c.strokeWidth; if(j.y!==null)if(e)e.attr(c);else j.tracker=d[j.shapeType](c).attr({isTracker:f,fill:ye,visibility:a.visible?Lb:Cb,zIndex:1}).on(Hb?"touchstart":"mouseover",function(k){i=k.relatedTarget||k.fromElement;b.hoverSeries!==a&&Aa(i,"isTracker")!==f&&a.onMouseOver();j.onMouseOver()}).on("mouseout",function(k){if(!a.options.stickyTracking){i=k.relatedTarget||k.toElement;Aa(i,"isTracker")!==f&&a.onMouseOut()}}).css(h).add(j.group||b.trackerGroup)})},animate:function(a){var b=this,d=b.points;if(!a){A(d,function(c){var e= c.graphic;c=c.shapeArgs;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:c.height,y:c.y},b.options.animation)}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&A(b.series,function(d){if(d.type===a.type)d.isDirty=true});xb.prototype.remove.apply(a,arguments)}});fb.column=vd;S=yb(vd,{type:"bar",init:function(a){a.inverted=this.inverted=true;vd.prototype.init.apply(this,arguments)}});fb.bar=S;S=yb(xb,{type:"scatter",translate:function(){var a=this;xb.prototype.translate.apply(a); A(a.points,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,d=b&&{cursor:b},c;A(a.points,function(e){(c=e.graphic)&&c.attr({isTracker:true}).on("mouseover",function(){a.onMouseOver();e.onMouseOver()}).on("mouseout",function(){a.options.stickyTracking||a.onMouseOut()}).css(d)})}});fb.scatter=S;S=yb(Nc,{init:function(){Nc.prototype.init.apply(this,arguments);var a=this,b;ca(a,{visible:a.visible!== false,name:C(a.name,"Slice")});b=function(){a.slice()};ra(a,"select",b);ra(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,d=this.tracker,c=this.dataLabel,e=this.connector,f;f=(this.visible=a=a===ha?!this.visible:a)?"show":"hide";this.group[f]();d&&d[f]();c&&c[f]();e&&e[f]();this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,d){var c=this.series.chart,e=this.slicedTranslation;xc(d,c);C(b,true);a=this.sliced=M(a)?a:!this.sliced;a={translateX:a?e[0]:c.plotLeft, translateY:a?e[1]:c.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});S=yb(xb,{type:"pie",isCartesian:false,pointClass:S,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color},animate:function(){var a=this;A(a.points,function(b){var d=b.graphic;b=b.shapeArgs;var c=-lc/2;if(d){d.attr({r:0,start:c,end:c});d.animate({r:b.r,start:b.start,end:b.end},a.options.animation)}});a.animate= null},setData:function(){xb.prototype.setData.apply(this,arguments);this.processData();this.generatePoints()},translate:function(){var a=0,b=-0.25,d=this.options,c=d.slicedOffset,e=c+d.borderWidth,f=d.center.concat([d.size,d.innerSize||0]),g=this.chart,h=g.plotWidth,i=g.plotHeight,j,k,m,t=this.points,B=2*lc,v,J=Ea(h,i),x,o,s,q=d.dataLabels.distance;f=Wc(f,function(r,y){return(x=/%$/.test(r))?[h,i,J,J][y]*la(r)/100:r});this.getX=function(r,y){m=na.asin((r-f[1])/(f[2]/2+q));return f[0]+(y?-1:1)*Mb(m)* (f[2]/2+q)};this.center=f;A(t,function(r){a+=r.y});A(t,function(r){v=a?r.y/a:0;j=N(b*B*1E3)/1E3;b+=v;k=N(b*B*1E3)/1E3;r.shapeType="arc";r.shapeArgs={x:f[0],y:f[1],r:f[2]/2,innerR:f[3]/2,start:j,end:k};m=(k+j)/2;r.slicedTranslation=Wc([Mb(m)*c+g.plotLeft,Vb(m)*c+g.plotTop],N);o=Mb(m)*f[2]/2;s=Vb(m)*f[2]/2;r.tooltipPos=[f[0]+o*0.7,f[1]+s*0.7];r.labelPos=[f[0]+o+Mb(m)*q,f[1]+s+Vb(m)*q,f[0]+o+Mb(m)*e,f[1]+s+Vb(m)*e,f[0]+o,f[1]+s,q<0?"center":m0,j,k,m=this.center[1],t=[[],[],[],[]],B,v,J,x,o,s,q,r=4,y;xb.prototype.drawDataLabels.apply(this); A(a,function(U){var X=U.labelPos[7];t[X<0?0:XX.y};r--;){a=0;b=[].concat(t[r]);b.sort(q);for(y=b.length;y--;)b[y].rank=y;for(x=0;x<2;x++){k=(s=r%3)?9999:-9999;o=s?-1:1;for(y=0;yk-j){v=k+o*j;B=this.getX(v,r>1);if(!s&&v+j>m||s&&v-jh){this.hasGroupedData= true;this.points=null;h=c[0];var J=c[k-1];g=g*(J-h)/d;var x=Sd(g,h,J,null,b.units),o,s,q=ha,r=null,y=null,U=null,X=null;for(d=o=0;d=x[1];){if(i==="average"&&q!==ha&&q!==null)q/=o;o=x.shift();if(q!==ha||m){B.push(o);if(m){v.push([r,y,U,X]);r=y=U=X=null}else v.push(q)}q=ha;o=0}s=e[d];if(j&&!m)q=q===ha||q===null?s:q+s;else if(m){X=this.cropStart+d;X=f&&f[X]||this.pointClass.prototype.applyOptions.apply({},[a[X]]);if(r===null)r=X.open;y=y===null?X.high:ja(y,X.high);U=U=== null?X.low:Ea(U,X.low);X=X.close}else if(i==="open"&&q===ha)q=s;else if(i==="high")q=q===ha?s:ja(q,s);else if(i==="low")q=q===ha?s:Ea(q,s);else if(i==="close")q=s;o++}if(b.smoothed){d=B.length-1;for(B[d]=J;d--&&d;)B[d]+=g/2;B[0]=h}this.tooltipHeaderFormat=b.dateTimeLabelFormats[x.unit[0]];this.unit=x.unit}else{B=c;v=e;this.unit=this.tooltipHeaderFormat=null}this.processedXData=B;this.processedYData=v}};S.generatePoints=function(){Je.apply(this);this.groupedData=this.hasGroupedData?this.points:null}; S.destroy=function(){for(var a=this.groupedData||[],b=a.length;b--;)a[b]&&a[b].destroy();Ke.apply(this)};S={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"};Qa.line.dataGrouping=Qa.spline.dataGrouping=Qa.area.dataGrouping=Qa.areaspline.dataGrouping={approximation:"average",groupPixelWidth:2,dateTimeLabelFormats:S,units:[["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]],["week",[1]],["month",[1,3,6]],["year",null]]};Qa.column.dataGrouping={approximation:"sum",groupPixelWidth:10,dateTimeLabelFormats:S};Qa.ohlc=Y(Qa.column,{lineWidth:1,dataGrouping:{groupPixelWidth:5},states:{hover:{lineWidth:3}}});S=yb(Nc,{applyOptions:function(a){var b=this.series,d=0;if(typeof a==="object"&&typeof a.length!=="number"){ca(this,a);this.options=a}else if(a.length){if(a.length===5){if(typeof a[0]==="string")this.name= a[0];else if(typeof a[0]==="number")this.x=a[0];d++}this.open=a[d++];this.high=a[d++];this.low=a[d++];this.close=a[d++]}this.y=this.high;if(this.x===ha&&b)this.x=b.autoIncrement();return this},tooltipFormatter:function(){var a=this.series;return['',this.name||a.name,"
Open: ",this.open,"
High: ",this.high,"
Low: ",this.low,"
Close: ",this.close,"
"].join("")}});var Od=yb(fb.column,{type:"ohlc",valueCount:4,pointClass:S,useThreshold:false, pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},translate:function(){var a=this.yAxis;fb.column.prototype.translate.apply(this);A(this.points,function(b){if(b.open!==null)b.plotOpen=a.translate(b.open,0,1);if(b.close!==null)b.plotClose=a.translate(b.close,0,1)})},drawPoints:function(){var a=this,b=a.chart,d,c,e,f,g,h,i,j;A(a.points,function(k){if(k.plotY!==ha){i=k.graphic;d=k.pointAttr[k.selected?"selected":""];f=d["stroke-width"]%2/2;j=N(k.plotX)+f;g=N(k.barW/2);h=["M",j,N(k.yBottom), "L",j,N(k.plotY)];if(k.open!==null){c=N(k.plotOpen)+f;h.push("M",j,c,"L",j-g,c)}if(k.close!==null){e=N(k.plotClose)+f;h.push("M",j,e,"L",j+g,e)}if(i)i.animate({d:h});else k.graphic=b.renderer.path(h).attr(d).add(a.group)}})},animate:null});fb.ohlc=Od;Qa.candlestick=Y(Qa.column,{lineColor:"black",lineWidth:1,upColor:"white",states:{hover:{lineWidth:2}}});S=yb(Od,{type:"candlestick",pointAttrToOptions:{fill:"color",stroke:"lineColor","stroke-width":"lineWidth"},getAttribs:function(){Od.prototype.getAttribs.apply(this, arguments);var a=this.options,b=a.states;a=a.upColor;var d=Y(this.pointAttr);d[""].fill=a;d.hover.fill=b.hover.upColor||a;d.select.fill=b.select.upColor||a;A(this.points,function(c){if(c.open