/* Highstock JS v5.0.12 (2017-05-24) (c) 2009-2016 Torstein Honsi License: www.highcharts.com/license */ (function(L,T){"object"===typeof module&&module.exports?module.exports=L.document?T(L):T:L.Highcharts=T(L)})("undefined"!==typeof window?window:this,function(L){L=function(){var a=window,E=a.document,B=a.navigator&&a.navigator.userAgent||"",F=E&&E.createElementNS&&!!E.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,D=/(edge|msie|trident)/i.test(B)&&!window.opera,n=!F,h=/Firefox/.test(B),u=h&&4>parseInt(B.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highstock", version:"5.0.12",deg2rad:2*Math.PI/360,doc:E,hasBidiBug:u,hasTouch:E&&void 0!==E.documentElement.ontouchstart,isMS:D,isWebKit:/AppleWebKit/.test(B),isFirefox:h,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(B),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:F,vml:n,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){var E=[],B=a.charts,F=a.doc,D=a.win;a.error=function(n,h){n=a.isNumber(n)?"Highcharts error #"+ n+": www.highcharts.com/errors/"+n:n;if(h)throw Error(n);D.console&&console.log(n)};a.Fx=function(a,h,u){this.options=h;this.elem=a;this.prop=u};a.Fx.prototype={dSetter:function(){var a=this.paths[0],h=this.paths[1],u=[],r=this.now,x=a.length,t;if(1===r)u=this.toD;else if(x===h.length&&1>r)for(;x--;)t=parseFloat(a[x]),u[x]=isNaN(t)?a[x]:r*parseFloat(h[x]-t)+t;else u=h;this.elem.attr("d",u,null,!0)},update:function(){var a=this.elem,h=this.prop,u=this.now,r=this.options.step;if(this[h+"Setter"])this[h+ "Setter"]();else a.attr?a.element&&a.attr(h,u,null,!0):a.style[h]=u+this.unit;r&&r.call(a,u,this)},run:function(a,h,u){var r=this,n=function(a){return n.stopped?!1:r.step(a)},t;this.startTime=+new Date;this.start=a;this.end=h;this.unit=u;this.now=this.start;this.pos=0;n.elem=this.elem;n.prop=this.prop;n()&&1===E.push(n)&&(n.timerId=setInterval(function(){for(t=0;t=m+this.startTime?(this.now=this.end,this.pos=1,this.update(),u=f[this.prop]=!0,a.objectEach(f,function(a){!0!==a&&(u=!1)}),u&&t&&t.call(x),n=!1):(this.pos=r.easing((h-this.startTime)/m),this.now=this.start+(this.end-this.start)*this.pos,this.update(),n=!0);return n},initPath:function(n,h,u){function r(a){var c,b;for(A=a.length;A--;)c="M"===a[A]||"L"===a[A],b=/[a-zA-Z]/.test(a[A+3]),c&&b&&a.splice(A+1,0,a[A+1],a[A+2],a[A+1],a[A+2])} function x(a,c){for(;a.lengtht?"AM":"PM",P:12>t?"am":"pm",S:A(x.getSeconds()),L:A(Math.round(h%1E3),3)},a.dateFormats);a.objectEach(r,function(a,b){for(;-1!==n.indexOf("%"+b);)n=n.replace("%"+b,"function"===typeof a?a(h):a)});return u?n.substr(0, 1).toUpperCase()+n.substr(1):n};a.formatSingle=function(n,h){var u=/\.([0-9])/,r=a.defaultOptions.lang;/f$/.test(n)?(u=(u=n.match(u))?u[1]:-1,null!==h&&(h=a.numberFormat(h,u,r.decimalPoint,-1=u&&(h=[1/u])));for(r=0;r=n||!x&&t<=(h[r]+(h[r+1]||h[r]))/2);r++);return m=a.correctFloat(m*u,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort= function(a,h){var n=a.length,r,x;for(x=0;xn&&(n=a[h]);return n};a.destroyObjectProperties=function(n,h){a.objectEach(n,function(a,r){a&&a!==h&&a.destroy&&a.destroy();delete n[r]})};a.discardElement=function(n){var h=a.garbageBin;h||(h=a.createElement("div")); n&&h.appendChild(n);h.innerHTML=""};a.correctFloat=function(a,h){return parseFloat(a.toPrecision(h||14))};a.setAnimation=function(n,h){h.renderer.globalAnimation=a.pick(n,h.options.chart.animation,!0)};a.animObject=function(n){return a.isObject(n)?a.merge(n):{duration:n?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(n,h,u,r){n=+n||0;h=+h;var x=a.defaultOptions.lang,t=(n.toString().split(".")[1]||"").length, m,f;-1===h?h=Math.min(t,20):a.isNumber(h)||(h=2);f=(Math.abs(n)+Math.pow(10,-Math.max(h,t)-1)).toFixed(h);t=String(a.pInt(f));m=3n?"-":"")+(m?t.substr(0,m)+r:"");n+=t.substr(m).replace(/(\d{3})(?=\d)/g,"$1"+r);h&&(n+=u+f.slice(-h));return n};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(n,h,u){if("width"===h)return Math.min(n.offsetWidth,n.scrollWidth)-a.getStyle(n,"padding-left")- a.getStyle(n,"padding-right");if("height"===h)return Math.min(n.offsetHeight,n.scrollHeight)-a.getStyle(n,"padding-top")-a.getStyle(n,"padding-bottom");if(n=D.getComputedStyle(n,void 0))n=n.getPropertyValue(h),a.pick(u,!0)&&(n=a.pInt(n));return n};a.inArray=function(a,h){return h.indexOf?h.indexOf(a):[].indexOf.call(h,a)};a.grep=function(a,h){return[].filter.call(a,h)};a.find=function(a,h){return[].find.call(a,h)};a.map=function(a,h){for(var n=[],r=0,x=a.length;r>16,(h&65280)>>8,h&255,1]:4===n&&(r=[(h&3840)>>4|(h&3840)>>8,(h&240)>>4|h&240,(h&15)<<4|h&15,1])),!r)for(x=this.parsers.length;x--&& !r;)t=this.parsers[x],(n=t.regex.exec(h))&&(r=t.parse(n));this.rgba=r||[]},get:function(a){var h=this.input,r=this.rgba,n;this.stops?(n=D(h),n.stops=[].concat(n.stops),E(this.stops,function(h,m){n.stops[m]=[n.stops[m][0],h.get(a)]})):n=r&&B(r[0])?"rgb"===a||!a&&1===r[3]?"rgb("+r[0]+","+r[1]+","+r[2]+")":"a"===a?r[3]:"rgba("+r.join(",")+")":h;return n},brighten:function(a){var h,r=this.rgba;if(this.stops)E(this.stops,function(h){h.brighten(a)});else if(B(a)&&0!==a)for(h=0;3>h;h++)r[h]+=n(255*a),0> r[h]&&(r[h]=0),255C.width)C={width:0,height:0}}else C=this.htmlGetBBox();c.isSVG&&(a=C.width,c=C.height,b&&"11px"===b.fontSize&&17===Math.round(c)&&(C.height=c=14),k&&(C.width=Math.abs(c*Math.sin(z))+Math.abs(a*Math.cos(z)),C.height=Math.abs(c*Math.cos(z))+Math.abs(a*Math.sin(z)))); if(g&&0]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,k,c){"string"===typeof a?c.setAttribute(k,a):a&&this.colorGradient(a,k,c)}, visibilitySetter:function(a,k,c){"inherit"===a?c.removeAttribute(k):c.setAttribute(k,a)},zIndexSetter:function(a,c){var z=this.renderer,l=this.parentGroup,C=(l||z).element||z.box,b,d=this.element,q;b=this.added;var e;t(a)&&(d.zIndex=a,a=+a,this[c]===a&&(b=!1),this[c]=a);if(b){(a=this.zIndex)&&l&&(l.handleZ=!0);c=C.childNodes;for(e=0;ea||!t(a)&&t(b)||0>a&&!t(b)&&C!==z.box)&&(C.insertBefore(d,l),q=!0);q||C.appendChild(d)}return q},_defaultSetter:function(a, k,c){c.setAttribute(k,a)}});E.prototype.yGetter=E.prototype.xGetter;E.prototype.translateXSetter=E.prototype.translateYSetter=E.prototype.rotationSetter=E.prototype.verticalAlignSetter=E.prototype.scaleXSetter=E.prototype.scaleYSetter=function(a,k){this[k]=a;this.doTransform=!0};E.prototype["stroke-widthSetter"]=E.prototype.strokeSetter=function(a,k,c){this[k]=a;this.stroke&&this["stroke-width"]?(E.prototype.fillSetter.call(this,this.stroke,"stroke",c),c.setAttribute("stroke-width",this["stroke-width"]), this.hasStroke=!0):"stroke-width"===k&&0===a&&this.hasStroke&&(c.removeAttribute("stroke"),this.hasStroke=!1)};B=a.SVGRenderer=function(){this.init.apply(this,arguments)};d(B.prototype,{Element:E,SVG_NS:N,init:function(a,k,c,z,l,b){var C;z=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}).css(this.getStyle(z));C=z.element;a.appendChild(C);-1===a.innerHTML.indexOf("xmlns")&&n(C,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=C;this.boxWrapper=z;this.alignedObjects=[];this.url=(q|| K)&&g.getElementsByTagName("base").length?O.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(g.createTextNode("Created with Highstock 5.0.12"));this.defs=this.createElement("defs").add();this.allowHTML=b;this.forExport=l;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(k,c,!1);var d;q&&a.getBoundingClientRect&&(k=function(){r(a,{left:0,top:0});d=a.getBoundingClientRect(); r(a,{left:Math.ceil(d.left)-d.left+"px",top:Math.ceil(d.top)-d.top+"px"})},k(),this.unSubPixelFix=F(O,"resize",k))},getStyle:function(a){return this.style=d({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();f(this.gradients||{});this.gradients= null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var k=new this.Element;k.init(this,a);return k},draw:G,getRadialAttr:function(a,k){return{cx:a[0]-a[2]/2+k.cx*a[2],cy:a[1]-a[2]/2+k.cy*a[2],r:k.r*a[2]}},getSpanWidth:function(a,k){var c=a.getBBox(!0).width;!M&&this.forExport&&(c=this.measureSpanWidth(k.firstChild.data,a.styles));return c},applyEllipsis:function(a,k,c,z){var l=this.getSpanWidth(a,k),b=l>z,l=c,d,q=0,C= c.length,e=function(a){k.removeChild(k.firstChild);a&&k.appendChild(g.createTextNode(a))};if(b){for(;q<=C;)d=Math.ceil((q+C)/2),l=c.substring(0,d)+"\u2026",e(l),l=this.getSpanWidth(a,k),q===C?q=C+1:l>z?C=d-1:q=d;0===C&&e("")}return b},buildText:function(a){var c=a.element,z=this,l=z.forExport,d=I(a.textStr,"").toString(),q=-1!==d.indexOf("\x3c"),C=c.childNodes,y,f,w,G,v=n(c,"x"),p=a.styles,J=a.textWidth,m=p&&p.lineHeight,A=p&&p.textOutline,H=p&&"ellipsis"===p.textOverflow,K=p&&"nowrap"===p.whiteSpace, h=p&&p.fontSize,Q,t,x=C.length,p=J&&!a.added&&this.box,u=function(a){var l;l=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:h||z.style.fontSize||12;return m?k(m):z.fontMetrics(l,a.getAttribute("style")?a:c).h};Q=[d,H,K,m,A,h,J].join();if(Q!==a.textCache){for(a.textCache=Q;x--;)c.removeChild(C[x]);q||A||H||J||-1!==d.indexOf(" ")?(y=/<.*class="([^"]+)".*>/,f=/<.*style="([^"]+)".*>/,w=/<.*href="([^"]+)".*>/,p&&p.appendChild(c),d=q?d.replace(/<(b|strong)>/g,'\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g, '\x3cspan style\x3d"font-style:italic"\x3e').replace(//g,"\x3c/span\x3e").split(//g):[d],d=b(d,function(a){return""!==a}),e(d,function(k,b){var d,q=0;k=k.replace(/^\s+|\s+$/g,"").replace(//g,"\x3c/span\x3e|||");d=k.split("|||");e(d,function(k){if(""!==k||1===d.length){var C={},e=g.createElementNS(z.SVG_NS,"tspan"),p,I;y.test(k)&&(p=k.match(y)[1],n(e,"class",p));f.test(k)&&(I=k.match(f)[1].replace(/(;| |^)color([ :])/, "$1fill$2"),n(e,"style",I));w.test(k)&&!l&&(n(e,"onclick",'location.href\x3d"'+k.match(w)[1]+'"'),r(e,{cursor:"pointer"}));k=(k.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"\x3c").replace(/>/g,"\x3e");if(" "!==k){e.appendChild(g.createTextNode(k));q?C.dx=0:b&&null!==v&&(C.x=v);n(e,C);c.appendChild(e);!q&&t&&(!M&&l&&r(e,{display:"block"}),n(e,"dy",u(e)));if(J){C=k.replace(/([^\^])-/g,"$1- ").split(" ");p=1J,void 0===G&&(G=k),k&&1!==C.length?(e.removeChild(e.firstChild),m.unshift(C.pop())):(C=m,m=[],C.length&&!K&&(e=g.createElementNS(N,"tspan"),n(e,{dy:h,x:v}),I&&n(e,"style",I),c.appendChild(e)),A>J&&(J=A)),C.length&&e.appendChild(g.createTextNode(C.join(" ").replace(/- /g,"-")));a.rotation=Q}q++}}});t=t||c.childNodes.length}),G&&a.attr("title",a.textStr),p&&p.removeChild(c),A&&a.applyTextOutline&&a.applyTextOutline(A)):c.appendChild(g.createTextNode(d.replace(/</g, "\x3c").replace(/>/g,"\x3e")))}},getContrast:function(a){a=u(a).rgba;return 510c?l>k+d&&lq?l>k+d&&lz&&q>a+d&&ql&&q>a+d&&qa?a+3:Math.round(1.2*a);return{h:c,b:Math.round(.8*c),f:a}},rotCorr:function(a,k,c){var z=a;k&&c&&(z=Math.max(z*Math.cos(k*m),4));return{x:-a/3*Math.sin(k*m),y:z}},label:function(k,c, l,b,q,f,w,G,g){var v=this,p=v.g("button"!==g&&"label"),M=p.text=v.text("",0,0,w).attr({zIndex:1}),C,I,J=0,m=3,A=0,H,h,K,Q,r,N={},n,x,u=/^url\((.*?)\)$/.test(b),P=u,R,V,U,O;g&&p.addClass("highcharts-"+g);P=u;R=function(){return(n||0)%2/2};V=function(){var a=M.element.style,k={};I=(void 0===H||void 0===h||r)&&t(M.textStr)&&M.getBBox();p.width=(H||I.width||0)+2*m+A;p.height=(h||I.height||0)+2*m;x=m+v.fontMetrics(a&&a.fontSize,M).b;P&&(C||(p.box=C=v.symbols[b]||u?v.symbol(b):v.rect(),C.addClass(("button"=== g?"":"highcharts-label-box")+(g?" highcharts-"+g+"-box":"")),C.add(p),a=R(),k.x=a,k.y=(G?-x:0)+a),k.width=Math.round(p.width),k.height=Math.round(p.height),C.attr(d(k,N)),N={})};U=function(){var a=A+m,k;k=G?0:x;t(H)&&I&&("center"===r||"right"===r)&&(a+={center:.5,right:1}[r]*(H-I.width));if(a!==M.x||k!==M.y)M.attr("x",a),void 0!==k&&M.attr("y",k);M.x=a;M.y=k};O=function(a,k){C?C.attr(a,k):N[a]=k};p.onAdd=function(){M.add(p);p.attr({text:k||0===k?k:"",x:c,y:l});C&&t(q)&&p.attr({anchorX:q,anchorY:f})}; p.widthSetter=function(k){H=a.isNumber(k)?k:null};p.heightSetter=function(a){h=a};p["text-alignSetter"]=function(a){r=a};p.paddingSetter=function(a){t(a)&&a!==m&&(m=p.padding=a,U())};p.paddingLeftSetter=function(a){t(a)&&a!==A&&(A=a,U())};p.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==J&&(J=a,I&&p.attr({x:K}))};p.textSetter=function(a){void 0!==a&&M.textSetter(a);V();U()};p["stroke-widthSetter"]=function(a,k){a&&(P=!0);n=this["stroke-width"]=a;O(k,a)};p.strokeSetter=p.fillSetter=p.rSetter= function(a,k){"fill"===k&&a&&(P=!0);O(k,a)};p.anchorXSetter=function(a,k){q=p.anchorX=a;O(k,Math.round(a)-R()-K)};p.anchorYSetter=function(a,k){f=p.anchorY=a;O(k,a-Q)};p.xSetter=function(a){p.x=a;J&&(a-=J*((H||I.width)+2*m));K=Math.round(a);p.attr("translateX",K)};p.ySetter=function(a){Q=p.y=Math.round(a);p.attr("translateY",Q)};var B=p.css;return d(p,{css:function(a){if(a){var k={};a=y(a);e(p.textProps,function(c){void 0!==a[c]&&(k[c]=a[c],delete a[c])});M.css(k)}return B.call(p,a)},getBBox:function(){return{width:I.width+ 2*m,height:I.height+2*m,x:I.x-m,y:I.y-m}},shadow:function(a){a&&(V(),C&&C.shadow(a));return p},destroy:function(){z(p.element,"mouseenter");z(p.element,"mouseleave");M&&(M=M.destroy());C&&(C=C.destroy());E.prototype.destroy.call(p);p=v=V=U=O=null}})}});a.Renderer=B})(L);(function(a){var E=a.attr,B=a.createElement,F=a.css,D=a.defined,n=a.each,h=a.extend,u=a.isFirefox,r=a.isMS,x=a.isWebKit,t=a.pInt,m=a.SVGRenderer,f=a.win,g=a.wrap;h(a.SVGElement.prototype,{htmlCss:function(a){var d=this.element;if(d= a&&"SPAN"===d.tagName&&a.width)delete a.width,this.textWidth=d,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=h(this.styles,a);F(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,d=this.element,f=this.translateX||0,b=this.translateY|| 0,g=this.x||0,v=this.y||0,m=this.textAlign||"left",q={left:0,center:.5,right:1}[m],J=this.styles;F(d,{marginLeft:f,marginTop:b});this.shadows&&n(this.shadows,function(a){F(a,{marginLeft:f+1,marginTop:b+1})});this.inverted&&n(d.childNodes,function(c){a.invertChild(c,d)});if("SPAN"===d.tagName){var c=this.rotation,w=t(this.textWidth),K=J&&J.whiteSpace,y=[c,m,d.innerHTML,this.textWidth,this.textAlign].join();y!==this.cTT&&(J=a.fontMetrics(d.style.fontSize).b,D(c)&&this.setSpanRotation(c,q,J),F(d,{width:"", whiteSpace:K||"nowrap"}),d.offsetWidth>w&&/[ \-]/.test(d.textContent||d.innerText)&&F(d,{width:w+"px",display:"block",whiteSpace:K||"normal"}),this.getSpanCorrection(d.offsetWidth,J,q,c,m));F(d,{left:g+(this.xCorr||0)+"px",top:v+(this.yCorr||0)+"px"});x&&(J=d.offsetHeight);this.cTT=y}}else this.alignOnAdd=!0},setSpanRotation:function(a,d,p){var b={},e=r?"-ms-transform":x?"-webkit-transform":u?"MozTransform":f.opera?"-o-transform":"";b[e]=b.transform="rotate("+a+"deg)";b[e+(u?"Origin":"-origin")]= b.transformOrigin=100*d+"% "+p+"px";F(this.element,b)},getSpanCorrection:function(a,d,f){this.xCorr=-a*f;this.yCorr=-d}});h(m.prototype,{html:function(a,d,f){var b=this.createElement("span"),e=b.element,p=b.renderer,m=p.isSVG,q=function(a,c){n(["opacity","visibility"],function(b){g(a,b+"Setter",function(a,b,d,l){a.call(this,b,d,l);c[d]=b})})};b.textSetter=function(a){a!==e.innerHTML&&delete this.bBox;e.innerHTML=this.textStr=a;b.htmlUpdateTransform()};m&&q(b,b.element.style);b.xSetter=b.ySetter=b.alignSetter= b.rotationSetter=function(a,c){"align"===c&&(c="textAlign");b[c]=a;b.htmlUpdateTransform()};b.attr({text:a,x:Math.round(d),y:Math.round(f)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"});e.style.whiteSpace="nowrap";b.css=b.htmlCss;m&&(b.add=function(a){var c,d=p.box.parentNode,f=[];if(this.parentGroup=a){if(c=a.div,!c){for(;a;)f.push(a),a=a.parentGroup;n(f.reverse(),function(a){var e,l=E(a.element,"class");l&&(l={className:l});c=a.div=a.div||B("div",l,{position:"absolute", left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},c||d);e=c.style;h(a,{on:function(){b.on.apply({element:f[0].div},arguments);return a},translateXSetter:function(c,k){e.left=c+"px";a[k]=c;a.doTransform=!0},translateYSetter:function(c,k){e.top=c+"px";a[k]=c;a.doTransform=!0}});q(a,e)})}}else c=d;c.appendChild(e);b.added=!0;b.alignOnAdd&&b.htmlUpdateTransform();return b});return b}})})(L);(function(a){var E,B,F= a.createElement,D=a.css,n=a.defined,h=a.deg2rad,u=a.discardElement,r=a.doc,x=a.each,t=a.erase,m=a.extend;E=a.extendClass;var f=a.isArray,g=a.isNumber,e=a.isObject,d=a.merge;B=a.noop;var p=a.pick,b=a.pInt,A=a.SVGElement,v=a.SVGRenderer,H=a.win;a.svg||(B={docMode8:r&&8===r.documentMode,init:function(a,b){var c=["\x3c",b,' filled\x3d"f" stroked\x3d"f"'],d=["position: ","absolute",";"],q="div"===b;("shape"===b||q)&&d.push("left:0;top:0;width:1px;height:1px;");d.push("visibility: ",q?"hidden":"visible"); c.push(' style\x3d"',d.join(""),'"/\x3e');b&&(c=q||"span"===b||"img"===b?c.join(""):a.prepVML(c),this.element=F(c));this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box,q=a&&a.inverted,d=a?a.element||a:d;a&&(this.parentGroup=a);q&&b.invertChild(c,d);d.appendChild(c);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();if(this.onAdd)this.onAdd();this.className&&this.attr("class",this.className);return this},updateTransform:A.prototype.htmlUpdateTransform, setSpanRotation:function(){var a=this.rotation,b=Math.cos(a*h),c=Math.sin(a*h);D(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11\x3d",b,", M12\x3d",-c,", M21\x3d",c,", M22\x3d",b,", sizingMethod\x3d'auto expand')"].join(""):"none"})},getSpanCorrection:function(a,b,c,d,e){var q=d?Math.cos(d*h):1,f=d?Math.sin(d*h):0,l=p(this.elemHeight,this.element.offsetHeight),w;this.xCorr=0>q&&-a;this.yCorr=0>f&&-l;w=0>q*f;this.xCorr+=f*b*(w?1-c:c);this.yCorr-=q*b*(d?w?c:1-c:1);e&&"left"!== e&&(this.xCorr-=a*c*(0>q?-1:1),d&&(this.yCorr-=l*c*(0>f?-1:1)),D(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)g(a[b])?c[b]=Math.round(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,t(c,b),c.push(b),b.destroyClip=function(){t(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(), a={clip:b.docMode8?"inherit":"rect(auto)"});return b.css(a)},css:A.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&u(a)},destroy:function(){this.destroyClip&&this.destroyClip();return A.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=H.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,d){var c;a=a.split(/[ ,]/);c=a.length;if(9===c||11===c)a[c-4]=a[c-2]=b(a[c-2])-10*d;return a.join(" ")},shadow:function(a,d,c){var e=[],q,f=this.element, g=this.renderer,l,v=f.style,k,z=f.path,m,M,A,J;z&&"string"!==typeof z.value&&(z="x");M=z;if(a){A=p(a.width,3);J=(a.opacity||.15)/A;for(q=1;3>=q;q++)m=2*A+1-2*q,c&&(M=this.cutOffPath(z.value,m+.5)),k=['\x3cshape isShadow\x3d"true" strokeweight\x3d"',m,'" filled\x3d"false" path\x3d"',M,'" coordsize\x3d"10 10" style\x3d"',f.style.cssText,'" /\x3e'],l=F(g.prepVML(k),null,{left:b(v.left)+p(a.offsetX,1),top:b(v.top)+p(a.offsetY,1)}),c&&(l.cutOff=m+1),k=['\x3cstroke color\x3d"',a.color||"#000000",'" opacity\x3d"', J*q,'"/\x3e'],F(g.prepVML(k),null,null,l),d?d.element.appendChild(l):f.parentNode.insertBefore(l,f),e.push(l);this.shadows=e}return this},updateShadows:B,setAttr:function(a,b){this.docMode8?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){(this.added?this.element:this).className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||F(this.renderer.prepVML(["\x3cstroke/\x3e"]),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){F(this.renderer.prepVML(["\x3c",b.split("-")[0],' opacity\x3d"',a,'"/\x3e']),null,null,c)},opacitySetter:B,rotationSetter:function(a,b,c){c= c.style;this[b]=c[b]=a;c.left=-Math.round(Math.sin(a*h)+1)+"px";c.top=Math.round(Math.cos(a*h))+"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;g(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&&x(this.shadows,function(c){c.style[b]=a});"DIV"===c.nodeName&&(a="hidden"===a?"-999em": 0,this.docMode8||(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}},B["stroke-opacitySetter"]=B["fill-opacitySetter"],a.VMLElement=B=E(A,B),B.prototype.ySetter=B.prototype.widthSetter=B.prototype.heightSetter=B.prototype.xSetter,B={Element:B,isIE8:-1J[0]&&b.push([1,J[1]]);x(b,function(k,c){q.test(k[1])?(y=a.color(k[1]),z=y.get("rgb"),g=y.get("a")):(z=k[1],g=1);r.push(100*k[0]+"% "+z);c?(A=g,C=z):(m=g,H=z)});if("fill"===c)if("gradient"===p)c=v.x1||v[0]||0,b=v.y1||v[1]||0,w=v.x2||v[2]||0,v=v.y2||v[3]||0,h='angle\x3d"'+(90-180*Math.atan((v-b)/(w-c))/Math.PI)+'"',n();else{var k=v.r,t=2*k,u=2*k,B=v.cx,E=v.cy,D=d.radialReference,S,k=function(){D&&(S=e.getBBox(),B+=(D[0]- S.x)/S.width-.5,E+=(D[1]-S.y)/S.height-.5,t*=D[2]/S.width,u*=D[2]/S.height);h='src\x3d"'+a.getOptions().global.VMLRadialGradientURL+'" size\x3d"'+t+","+u+'" origin\x3d"0.5,0.5" position\x3d"'+B+","+E+'" color2\x3d"'+H+'" ';n()};e.added?k():e.onAdd=k;k=C}else k=z}else q.test(b)&&"IMG"!==d.tagName?(y=a.color(b),e[c+"-opacitySetter"](y.get("a"),c,d),k=y.get("rgb")):(k=d.getElementsByTagName(c),k.length&&(k[0].opacity=1,k[0].type="solid"),k=b);return k},prepVML:function(a){var b=this.isIE8;a=a.join(""); b?(a=a.replace("/\x3e",' xmlns\x3d"urn:schemas-microsoft-com:vml" /\x3e'),a=-1===a.indexOf('style\x3d"')?a.replace("/\x3e",' style\x3d"display:inline-block;behavior:url(#default#VML);" /\x3e'):a.replace('style\x3d"','style\x3d"display:inline-block;behavior:url(#default#VML);')):a=a.replace("\x3c","\x3chcv:");return a},text:v.prototype.html,path:function(a){var b={coordsize:"10 10"};f(a)?b.d=a:e(a)&&m(b,a);return this.createElement("shape").attr(b)},circle:function(a,b,c){var d=this.symbol("circle"); e(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("div").attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});1d&&n-p*bf&&(q=Math.round((m-n)/Math.cos(d*u)));else if(m=n+(1-p)*b,n-p*bf&&(v=f-a.x+v*p,H=-1),v=Math.min(A,v),vv||r.autoRotation&&(e.styles|| {}).width)q=v;q&&(J.width=q,(r.options.labels.style||{}).textOverflow||(J.textOverflow="ellipsis"),e.css(J))},getPosition:function(a,h,n,m){var f=this.axis,g=f.chart,e=m&&g.oldChartHeight||g.chartHeight;return{x:a?f.translate(h+n,null,null,m)+f.transB:f.left+f.offset+(f.opposite?(m&&g.oldChartWidth||g.chartWidth)-f.right-f.left:0),y:a?e-f.bottom+f.offset-(f.opposite?f.height:0):e-f.translate(h+n,null,null,m)-f.transB}},getLabelPosition:function(a,h,n,m,f,g,e,d){var p=this.axis,b=p.transA,A=p.reversed, v=p.staggerLines,H=p.tickRotCorr||{x:0,y:0},q=f.y;B(q)||(q=0===p.side?n.rotation?-8:-n.getBBox().height:2===p.side?H.y+8:Math.cos(n.rotation*u)*(H.y-n.getBBox(!1,0).height/2));a=a+f.x+H.x-(g&&m?g*b*(A?-1:1):0);h=h+q-(g&&!m?g*b*(A?1:-1):0);v&&(n=e/(d||1)%v,p.opposite&&(n=v-n-1),h+=p.labelOffset/v*n);return{x:a,y:Math.round(h)}},getMarkPath:function(a,h,n,m,f,g){return g.crispLine(["M",a,h,"L",a+(f?0:-n),h+(f?n:0)],m)},renderGridLine:function(a,h,n){var m=this.axis,f=m.options,g=this.gridLine,e={}, d=this.pos,p=this.type,b=m.tickmarkOffset,A=m.chart.renderer,v=p?p+"Grid":"grid",H=f[v+"LineWidth"],q=f[v+"LineColor"],f=f[v+"LineDashStyle"];g||(e.stroke=q,e["stroke-width"]=H,f&&(e.dashstyle=f),p||(e.zIndex=1),a&&(e.opacity=0),this.gridLine=g=A.path().attr(e).addClass("highcharts-"+(p?p+"-":"")+"grid-line").add(m.gridGroup));if(!a&&g&&(a=m.getPlotLinePath(d+b,g.strokeWidth()*n,a,!0)))g[this.isNew?"attr":"animate"]({d:a,opacity:h})},renderMark:function(a,n,t){var m=this.axis,f=m.options,g=m.chart.renderer, e=this.type,d=e?e+"Tick":"tick",p=m.tickSize(d),b=this.mark,A=!b,v=a.x;a=a.y;var H=h(f[d+"Width"],!e&&m.isXAxis?1:0),f=f[d+"Color"];p&&(m.opposite&&(p[0]=-p[0]),A&&(this.mark=b=g.path().addClass("highcharts-"+(e?e+"-":"")+"tick").add(m.axisGroup),b.attr({stroke:f,"stroke-width":H})),b[A?"attr":"animate"]({d:this.getMarkPath(v,a,p[0],b.strokeWidth()*t,m.horiz,g),opacity:n}))},renderLabel:function(a,n,t,m){var f=this.axis,g=f.horiz,e=f.options,d=this.label,p=e.labels,b=p.step,A=f.tickmarkOffset,v=!0, H=a.x;a=a.y;d&&D(H)&&(d.xy=a=this.getLabelPosition(H,a,d,g,p,A,m,b),this.isFirst&&!this.isLast&&!h(e.showFirstLabel,1)||this.isLast&&!this.isFirst&&!h(e.showLastLabel,1)?v=!1:!g||f.isRadial||p.step||p.rotation||n||0===t||this.handleOverflow(a),b&&m%b&&(v=!1),v&&D(a.y)?(a.opacity=t,d[this.isNewLabel?"attr":"animate"](a),this.isNewLabel=!1):(d.attr("y",-9999),this.isNewLabel=!0),this.isNew=!1)},render:function(a,n,t){var m=this.axis,f=m.horiz,g=this.getPosition(f,this.pos,m.tickmarkOffset,n),e=g.x, d=g.y,m=f&&e===m.pos+m.len||!f&&d===m.pos?-1:1;t=h(t,1);this.isActive=!0;this.renderGridLine(n,t,m);this.renderMark(g,t,m);this.renderLabel(g,n,t,a)},destroy:function(){F(this,this.axis)}}})(L);var T=function(a){var E=a.addEvent,B=a.animObject,F=a.arrayMax,D=a.arrayMin,n=a.color,h=a.correctFloat,u=a.defaultOptions,r=a.defined,x=a.deg2rad,t=a.destroyObjectProperties,m=a.each,f=a.extend,g=a.fireEvent,e=a.format,d=a.getMagnitude,p=a.grep,b=a.inArray,A=a.isArray,v=a.isNumber,H=a.isString,q=a.merge,J= a.normalizeTickInterval,c=a.objectEach,w=a.pick,K=a.removeEvent,y=a.splat,G=a.syncTimeout,l=a.Tick,I=function(){this.init.apply(this,arguments)};a.extend(I.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,labels:{enabled:!0,style:{color:"#666666",cursor:"default",fontSize:"11px"},x:0},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",startOfWeek:1, startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1, formatter:function(){return a.numberFormat(this.total,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},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,z){var k=z.isX,l=this;l.chart=a;l.horiz= a.inverted&&!l.isZAxis?!k:k;l.isXAxis=k;l.coll=l.coll||(k?"xAxis":"yAxis");l.opposite=z.opposite;l.side=z.side||(l.horiz?l.opposite?0:2:l.opposite?1:3);l.setOptions(z);var d=this.options,e=d.type;l.labelFormatter=d.labels.formatter||l.defaultLabelFormatter;l.userOptions=z;l.minPixelPadding=0;l.reversed=d.reversed;l.visible=!1!==d.visible;l.zoomEnabled=!1!==d.zoomEnabled;l.hasNames="category"===e||!0===d.categories;l.categories=d.categories||l.hasNames;l.names=l.names||[];l.plotLinesAndBandsGroups= {};l.isLog="logarithmic"===e;l.isDatetimeAxis="datetime"===e;l.positiveValuesOnly=l.isLog&&!l.allowNegativeLog;l.isLinked=r(d.linkedTo);l.ticks={};l.labelEdge=[];l.minorTicks={};l.plotLinesAndBands=[];l.alternateBands={};l.len=0;l.minRange=l.userMinRange=d.minRange||d.maxZoom;l.range=d.range;l.offset=d.offset||0;l.stacks={};l.oldStacks={};l.stacksTouched=0;l.max=null;l.min=null;l.crosshair=w(d.crosshair,y(a.options.tooltip.crosshairs)[k?0:1],!1);z=l.options.events;-1===b(l,a.axes)&&(k?a.axes.splice(a.xAxis.length, 0,l):a.axes.push(l),a[l.coll].push(l));l.series=l.series||[];a.inverted&&!l.isZAxis&&k&&void 0===l.reversed&&(l.reversed=!0);c(z,function(a,k){E(l,k,a)});l.lin2log=d.linearToLogConverter||l.lin2log;l.isLog&&(l.val2lin=l.log2lin,l.lin2val=l.lin2log)},setOptions:function(a){this.options=q(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],q(u[this.coll],a))}, defaultLabelFormatter:function(){var k=this.axis,c=this.value,b=k.categories,l=this.dateTimeLabelFormat,d=u.lang,f=d.numericSymbols,d=d.numericSymbolMagnitude||1E3,y=f&&f.length,p,g=k.options.labels.format,k=k.isLog?Math.abs(c):k.tickInterval;if(g)p=e(g,this);else if(b)p=c;else if(l)p=a.dateFormat(l,c);else if(y&&1E3<=k)for(;y--&&void 0===p;)b=Math.pow(d,y+1),k>=b&&0===10*c%b&&null!==f[y]&&0!==c&&(p=a.numberFormat(c/b,-1)+f[y]);void 0===p&&(p=1E4<=Math.abs(c)?a.numberFormat(c,-1):a.numberFormat(c, -1,void 0,""));return p},getSeriesExtremes:function(){var a=this,c=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();m(a.series,function(k){if(k.visible||!c.options.chart.ignoreHiddenSeries){var b=k.options,l=b.threshold,z;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=l&&(l=null);if(a.isXAxis)b=k.xData,b.length&&(k=D(b),v(k)||k instanceof Date||(b=p(b,function(a){return v(a)}),k=D(b)),a.dataMin=Math.min(w(a.dataMin,b[0]), k),a.dataMax=Math.max(w(a.dataMax,b[0]),F(b)));else if(k.getExtremes(),z=k.dataMax,k=k.dataMin,r(k)&&r(z)&&(a.dataMin=Math.min(w(a.dataMin,k),k),a.dataMax=Math.max(w(a.dataMax,z),z)),r(l)&&(a.threshold=l),!b.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,c,b,l,d,e){var k=this.linkedParent||this,z=1,f=0,y=l?k.oldTransA:k.transA;l=l?k.oldMin:k.min;var p=k.minPixelPadding;d=(k.isOrdinal||k.isBroken||k.isLog&&d)&&k.lin2val;y||(y=k.transA);b&&(z*=-1,f=k.len);k.reversed&& (z*=-1,f-=z*(k.sector||k.len));c?(a=(a*z+f-p)/y+l,d&&(a=k.lin2val(a))):(d&&(a=k.val2lin(a)),a=z*(a-l)*y+f+z*p+(v(e)?y*e:0));return a},toPixels:function(a,c){return this.translate(a,!1,!this.horiz,null,!0)+(c?0:this.pos)},toValue:function(a,c){return this.translate(a-(c?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,c,b,l,d){var k=this.chart,z=this.left,e=this.top,f,y,p=b&&k.oldChartHeight||k.chartHeight,g=b&&k.oldChartWidth||k.chartWidth,q;f=this.transB;var G=function(a,k,c){if(a< k||a>c)l?a=Math.min(Math.max(k,a),c):q=!0;return a};d=w(d,this.translate(a,null,null,b));a=b=Math.round(d+f);f=y=Math.round(p-d-f);v(d)?this.horiz?(f=e,y=p-this.bottom,a=b=G(a,z,z+this.width)):(a=z,b=g-this.right,f=y=G(f,e,e+this.height)):q=!0;return q&&!l?null:k.renderer.crispLine(["M",a,f,"L",b,y],c||1)},getLinearTickPositions:function(a,c,b){var k,l=h(Math.floor(c/a)*a);b=h(Math.ceil(b/a)*a);var z=[];if(this.single)return[c];for(c=l;c<=b;){z.push(c);c=h(c+a);if(c===k)break;k=c}return z},getMinorTickPositions:function(){var a= this,c=a.options,b=a.tickPositions,l=a.minorTickInterval,d=[],e=a.pointRangePadding||0,f=a.min-e,e=a.max+e,y=e-f;if(y&&y/l=this.minRange,v=this.minRange,l=(v-b+c)/2,l=[c-l,w(a.min,c-l)],d&&(l[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),c=F(l),b=[c+v,w(a.max,c+v)], d&&(b[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),b=D(b),b-c=K?(u=K,I=0):c.dataMax<=K&&(x=K,G=0)),c.min=w(B,u,c.dataMin),c.max=w(D,x,c.dataMax));e&&(c.positiveValuesOnly&&!k&&0>=Math.min(c.min,w(c.dataMin,c.min))&&a.error(10,1),c.min=h(f(c.min),15),c.max=h(f(c.max),15));c.range&&r(c.max)&&(c.userMin=c.min=B=Math.max(c.min,c.minFromRange()),c.userMax=D=c.max,c.range=null);g(c,"foundExtremes");c.beforePadding&& c.beforePadding();c.adjustForMinRange();!(n||c.axisPointRange||c.usePercentage||q)&&r(c.min)&&r(c.max)&&(f=c.max-c.min)&&(!r(B)&&I&&(c.min-=f*I),!r(D)&&G&&(c.max+=f*G));v(l.softMin)&&(c.min=Math.min(c.min,l.softMin));v(l.softMax)&&(c.max=Math.max(c.max,l.softMax));v(l.floor)&&(c.min=Math.max(c.min,l.floor));v(l.ceiling)&&(c.max=Math.min(c.max,l.ceiling));t&&r(c.dataMin)&&(K=K||0,!r(B)&&c.min=K?c.min=K:!r(D)&&c.max>K&&c.dataMax<=K&&(c.max=K));c.tickInterval=c.min===c.max||void 0===c.min|| void 0===c.max?1:q&&!A&&H===c.linkedParent.options.tickPixelInterval?A=c.linkedParent.tickInterval:w(A,this.tickAmount?(c.max-c.min)/Math.max(this.tickAmount-1,1):void 0,n?1:(c.max-c.min)*H/Math.max(c.len,H));p&&!k&&m(c.series,function(a){a.processData(c.min!==c.oldMin||c.max!==c.oldMax)});c.setAxisTranslation(!0);c.beforeSetTickPositions&&c.beforeSetTickPositions();c.postProcessTickInterval&&(c.tickInterval=c.postProcessTickInterval(c.tickInterval));c.pointRange&&!A&&(c.tickInterval=Math.max(c.pointRange, c.tickInterval));k=w(l.minTickInterval,c.isDatetimeAxis&&c.closestPointRange);!A&&c.tickIntervalc.tickInterval&&1E3c.max)),!!this.tickAmount));this.tickAmount||(c.tickInterval=c.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,c,b=a.tickPositions,l=a.tickPositioner,d=a.startOnTick,e=a.endOnTick;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.single=this.min===this.max&&r(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=c=b&&b.slice();!c&&(c=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),c.length>this.len&&(c=[c[0],c.pop()]),this.tickPositions=c,l&&(l=l.apply(this,[this.min,this.max])))&&(this.tickPositions=c=l);this.paddedTicks=c.slice(0);this.trimTicks(c,d,e);this.isLinked||(this.single&&(this.min-=.5,this.max+=.5),b||l||this.adjustTickAmount())},trimTicks:function(a,c,b){var k=a[0],l=a[a.length-1],d=this.minPointOffset||0;if(!this.isLinked){if(c&& -Infinity!==k)this.min=k;else for(;this.min-d>a[0];)a.shift();if(b)this.max=l;else for(;this.max+dc&&(this.finalTickAmt=c,c=5);this.tickAmount=c},adjustTickAmount:function(){var a=this.tickInterval,c=this.tickPositions,b=this.tickAmount,l=this.finalTickAmt,d=c&&c.length;if(db&&(this.tickInterval*=2,this.setTickPositions()); if(r(l)){for(a=b=c.length;a--;)(3===l&&1===a%2||2>=l&&0l&&(a=l)),r(b)&&(cl&&(c=l))),this.displayBtn=void 0!==a||void 0!==c,this.setExtremes(a,c,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,c=this.options,b=c.offsets||[0,0,0,0],l=this.horiz,d=w(c.width,a.plotWidth-b[3]+b[1]),e=w(c.height,a.plotHeight-b[0]+b[2]),f=w(c.top,a.plotTop+b[0]),c=w(c.left,a.plotLeft+b[3]),b=/%$/;b.test(e)&&(e= Math.round(parseFloat(e)/100*a.plotHeight));b.test(f)&&(f=Math.round(parseFloat(f)/100*a.plotHeight+a.plotTop));this.left=c;this.top=f;this.width=d;this.height=e;this.bottom=a.chartHeight-e-f;this.right=a.chartWidth-d-c;this.len=Math.max(l?d:e,0);this.pos=l?c:f},getExtremes:function(){var a=this.isLog,c=this.lin2log;return{min:a?h(c(this.min)):this.min,max:a?h(c(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var c= this.isLog,k=this.lin2log,b=c?k(this.min):this.min,c=c?k(this.max):this.max;null===a?a=b:b>a?a=b:ca?"right":195a?"left":"center"},tickSize:function(a){var c=this.options,k=c[a+"Length"],b=w(c[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(b&&k)return"inside"===c[a+"Position"]&&(k=-k),[k,b]},labelMetrics:function(){var a=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&& this.options.labels.style.fontSize,this.ticks[a]&&this.ticks[a].label)},unsquish:function(){var a=this.options.labels,c=this.horiz,b=this.tickInterval,l=b,d=this.len/(((this.categories?1:0)+this.max-this.min)/b),e,f=a.rotation,y=this.labelMetrics(),p,g=Number.MAX_VALUE,v,q=function(a){a/=d||1;a=1=a)p=q(Math.abs(y.h/Math.sin(x*a))),c=p+ Math.abs(a/360),c(b.step||0)&&!b.rotation&&(this.staggerLines||1)*this.len/l||!c&&(d&&d-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,c=a.renderer,b=this.tickPositions,l=this.ticks,d=this.options.labels,e=this.horiz, f=this.getSlotWidth(),y=Math.max(1,Math.round(f-2*(d.padding||5))),p={},g=this.labelMetrics(),v=d.style&&d.style.textOverflow,G,w=0,I,A;H(d.rotation)||(p.rotation=d.rotation||0);m(b,function(a){(a=l[a])&&a.labelLength>w&&(w=a.labelLength)});this.maxLabelLength=w;if(this.autoRotation)w>y&&w>g.h?p.rotation=this.labelRotation:this.labelRotation=0;else if(f&&(G={width:y+"px"},!v))for(G.textOverflow="clip",I=b.length;!e&&I--;)if(A=b[I],y=l[A].label)y.styles&&"ellipsis"===y.styles.textOverflow?y.css({textOverflow:"clip"}): l[A].labelLength>f&&y.css({width:f+"px"}),y.getBBox().height>this.len/b.length-(g.h-g.f)&&(y.specCss={textOverflow:"ellipsis"});p.rotation&&(G={width:(w>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},v||(G.textOverflow="ellipsis"));if(this.labelAlign=d.align||this.autoLabelAlign(this.labelRotation))p.align=this.labelAlign;m(b,function(a){var c=(a=l[a])&&a.label;c&&(c.attr(p),G&&c.css(q(G,c.specCss)),delete c.specCss,a.rotation=p.rotation)});this.tickRotCorr=c.rotCorr(g.b,this.labelRotation|| 0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||r(this.min)&&r(this.max)&&!!this.tickPositions},addTitle:function(a){var c=this.chart.renderer,k=this.horiz,b=this.opposite,l=this.options.title,d;this.axisTitle||((d=l.textAlign)||(d=(k?{low:"left",middle:"center",high:"right"}:{low:b?"right":"left",middle:"center",high:b?"left":"right"})[l.align]),this.axisTitle=c.text(l.text,0,0,l.useHTML).attr({zIndex:7,rotation:l.rotation||0,align:d}).addClass("highcharts-axis-title").css(l.style).add(this.axisGroup), this.axisTitle.isNew=!0);this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var c=this.ticks;c[a]?c[a].addLabel():c[a]=new l(this,a)},getOffset:function(){var a=this,b=a.chart,l=b.renderer,d=a.options,e=a.tickPositions,f=a.ticks,y=a.horiz,p=a.side,g=b.inverted&&!a.isZAxis?[1,0,3,2][p]:p,v,q,G=0,I,A=0,h=d.title,H=d.labels,n=0,K=b.axisOffset,b=b.clipOffset,J=[-1,1,1,-1][p],t=d.className,u=a.axisParent,x=this.tickSize("tick");v=a.hasData();a.showAxis=q=v||w(d.showEmpty,!0);a.staggerLines= a.horiz&&H.staggerLines;a.axisGroup||(a.gridGroup=l.g("grid").attr({zIndex:d.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(t||"")).add(u),a.axisGroup=l.g("axis").attr({zIndex:d.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(t||"")).add(u),a.labelGroup=l.g("axis-labels").attr({zIndex:H.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(t||"")).add(u));v||a.isLinked?(m(e,function(c,b){a.generateTick(c,b)}),a.renderUnsquish(),!1===H.reserveSpace|| 0!==p&&2!==p&&{1:"left",3:"right"}[p]!==a.labelAlign&&"center"!==a.labelAlign||m(e,function(a){n=Math.max(f[a].getLabelSize(),n)}),a.staggerLines&&(n*=a.staggerLines,a.labelOffset=n*(a.opposite?-1:1))):c(f,function(a,c){a.destroy();delete f[c]});h&&h.text&&!1!==h.enabled&&(a.addTitle(q),q&&!1!==h.reserveSpace&&(a.titleOffset=G=a.axisTitle.getBBox()[y?"height":"width"],I=h.offset,A=r(I)?0:w(h.margin,y?5:10)));a.renderLine();a.offset=J*w(d.offset,K[p]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};l=0===p? -a.labelMetrics().h:2===p?a.tickRotCorr.y:0;A=Math.abs(n)+A;n&&(A=A-l+J*(y?w(H.y,a.tickRotCorr.y+8*J):H.x));a.axisTitleMargin=w(I,A);K[p]=Math.max(K[p],a.axisTitleMargin+G+J*a.offset,A,v&&e.length&&x?x[0]+J*a.offset:0);e=2*Math.floor(a.axisLine.strokeWidth()/2);0=this.min&&a<=this.max)k[a]||(k[a]=new l(this,a)),d&&k[a].isNew&&k[a].render(c,!0,.1),k[a].render(c)},render:function(){var b=this,d=b.chart,e=b.options,f=b.isLog,y=b.lin2log,p=b.isLinked,g=b.tickPositions,q=b.axisTitle,w=b.ticks,I=b.minorTicks,A=b.alternateBands,h=e.stackLabels,H=e.alternateGridColor,n=b.tickmarkOffset,K=b.axisLine,J=b.showAxis,r=B(d.renderer.globalAnimation),t,u;b.labelEdge.length=0;b.overlap=!1;m([w,I,A],function(a){c(a,function(a){a.isActive=!1})});if(b.hasData()|| p)b.minorTickInterval&&!b.categories&&m(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),g.length&&(m(g,function(a,c){b.renderTick(a,c)}),n&&(0===b.min||b.single)&&(w[-1]||(w[-1]=new l(b,-1,null,!0)),w[-1].render(-1))),H&&m(g,function(c,l){u=void 0!==g[l+1]?g[l+1]+n:b.max-n;0===l%2&&c=f.second?0:w*Math.floor(q.getMilliseconds()/ w));if(c>=f.second)q[B.hcSetSeconds](c>=f.minute?0:w*Math.floor(q.getSeconds()/w));if(c>=f.minute)q[B.hcSetMinutes](c>=f.hour?0:w*Math.floor(q[B.hcGetMinutes]()/w));if(c>=f.hour)q[B.hcSetHours](c>=f.day?0:w*Math.floor(q[B.hcGetHours]()/w));if(c>=f.day)q[B.hcSetDate](c>=f.month?1:w*Math.floor(q[B.hcGetDate]()/w));c>=f.month&&(q[B.hcSetMonth](c>=f.year?0:w*Math.floor(q[B.hcGetMonth]()/w)),H=q[B.hcGetFullYear]());if(c>=f.year)q[B.hcSetFullYear](H-H%w);if(c===f.week)q[B.hcSetDate](q[B.hcGetDate]()-q[B.hcGetDay]()+ m(p,1));H=q[B.hcGetFullYear]();p=q[B.hcGetMonth]();var y=q[B.hcGetDate](),G=q[B.hcGetHours]();if(B.hcTimezoneOffset||B.hcGetTimezoneOffset)K=(!v||!!B.hcGetTimezoneOffset)&&(d-e>4*f.month||x(e)!==x(d)),q=q.getTime(),q=new B(q+x(q));v=q.getTime();for(e=1;vb.length&&h(b,function(a){0===a%18E5&&"000000000"===F("%H%M%S%L",a)&& (g[a]="day")})}b.info=u(a,{higherRanks:g,totalRange:c*w});return b};E.prototype.normalizeTimeTickInterval=function(a,e){var d=e||[["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]];e=d[d.length-1];var p=f[e[0]],b=e[1],g;for(g=0;gu&&(!x||A<=r)&&void 0!==A&&e.push(A),A>r&&(v=!0),A=b;else u=f(u),r=f(r),a=h[x?"minorTickInterval":"tickInterval"],a=n("auto"===a?null:a,this._minorAutoInterval,h.tickPixelInterval/(x?5:1)*(r-u)/((x?m/this.tickPositions.length:m)||1)),a=D(a,null,B(a)),e=F(this.getLinearTickPositions(a,u,r),g),x||(this._minorAutoInterval=a/5);x||(this.tickInterval=a);return e};E.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};E.prototype.lin2log=function(a){return Math.pow(10, a)}})(L);(function(a,E){var B=a.arrayMax,F=a.arrayMin,D=a.defined,n=a.destroyObjectProperties,h=a.each,u=a.erase,r=a.merge,x=a.pick;a.PlotLineOrBand=function(a,m){this.axis=a;m&&(this.options=m,this.id=m.id)};a.PlotLineOrBand.prototype={render:function(){var h=this,m=h.axis,f=m.horiz,g=h.options,e=g.label,d=h.label,p=g.to,b=g.from,A=g.value,v=D(b)&&D(p),H=D(A),q=h.svgElem,n=!q,c=[],w=g.color,K=x(g.zIndex,0),y=g.events,c={"class":"highcharts-plot-"+(v?"band ":"line ")+(g.className||"")},G={},l=m.chart.renderer, I=v?"bands":"lines",k=m.log2lin;m.isLog&&(b=k(b),p=k(p),A=k(A));H?(c={stroke:w,"stroke-width":g.width},g.dashStyle&&(c.dashstyle=g.dashStyle)):v&&(w&&(c.fill=w),g.borderWidth&&(c.stroke=g.borderColor,c["stroke-width"]=g.borderWidth));G.zIndex=K;I+="-"+K;(w=m.plotLinesAndBandsGroups[I])||(m.plotLinesAndBandsGroups[I]=w=l.g("plot-"+I).attr(G).add());n&&(h.svgElem=q=l.path().attr(c).add(w));if(H)c=m.getPlotLinePath(A,q.strokeWidth());else if(v)c=m.getPlotBandPath(b,p,g);else return;n&&c&&c.length?(q.attr({d:c}), y&&a.objectEach(y,function(a,c){q.on(c,function(a){y[c].apply(h,[a])})})):q&&(c?(q.show(),q.animate({d:c})):(q.hide(),d&&(h.label=d=d.destroy())));e&&D(e.text)&&c&&c.length&&0this.max&&m>this.max;g&&f?(a&&(g.flat=g.toString()===f.toString(),d=0),g.push(e&&f[4]===g[4]?f[4]+d:f[4],e||f[5]!==g[5]?f[5]:f[5]+d,e&&f[1]===g[1]?f[1]+d:f[1],e||f[2]!==g[2]?f[2]:f[2]+d)):g=null;return g},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(h,m){var f=(new a.PlotLineOrBand(this,h)).render(),g=this.userOptions;f&&(m&&(g[m]=g[m]||[],g[m].push(h)),this.plotLinesAndBands.push(f)); return f},removePlotBandOrLine:function(a){for(var m=this.plotLinesAndBands,f=this.options,g=this.userOptions,e=m.length;e--;)m[e].id===a&&m[e].destroy();h([f.plotLines||[],g.plotLines||[],f.plotBands||[],g.plotBands||[]],function(d){for(e=d.length;e--;)d[e].id===a&&u(d,d[e])})},removePlotBand:function(a){this.removePlotBandOrLine(a)},removePlotLine:function(a){this.removePlotBandOrLine(a)}})})(L,T);(function(a){var E=a.dateFormat,B=a.each,F=a.extend,D=a.format,n=a.isNumber,h=a.map,u=a.merge,r=a.pick, x=a.splat,t=a.syncTimeout,m=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)};a.Tooltip.prototype={init:function(a,g){this.chart=a;this.options=g;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=g.split&&!a.inverted;this.shared=g.shared||this.split},cleanSplit:function(a){B(this.chart.series,function(f){var e=f&&f.tt;e&&(!e.isActive||a?f.tt=e.destroy():e.isActive=!1)})},getLabel:function(){var a=this.chart.renderer,g=this.options;this.label||(this.split?this.label= a.g("tooltip"):(this.label=a.label("",0,0,g.shape||"callout",null,null,g.useHTML,null,"tooltip").attr({padding:g.padding,r:g.borderRadius}),this.label.attr({fill:g.backgroundColor,"stroke-width":g.borderWidth}).css(g.style).shadow(g.shadow)),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();u(!0,this.chart.options.tooltip.userOptions,a);this.init(this.chart,u(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&& (this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,g,e,d){var f=this,b=f.now,m=!1!==f.options.animation&&!f.isHidden&&(1g-m?g:g-m);else if(p)b[a]=Math.max(e,k+m+d>c?k:k+m);else return!1},w=function(a,c,d,k){var l;kc-f?l=!1:b[a]=kc-d/2?c-d-2:k-d/2;return l},K=function(a){var c=h;h=q;q=c;v=a},y=function(){!1!==c.apply(0,h)?!1!==w.apply(0,q)||v||(K(!0),y()):v?b.x=b.y=0:(K(!0),y())};(d.inverted||1y&&(m=!1);a=(c.series&&c.series.yAxis&&c.series.yAxis.pos)+(c.plotY||0);a-=p.plotTop;d.push({target:c.isHeader?p.plotHeight+h:a,rank:c.isHeader?1:0,size:f.tt.getBBox().height+1,point:c,x:y,tt:A})});this.cleanSplit(); a.distribute(d,p.plotHeight+h);B(d,function(a){var c=a.point,b=c.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:m||c.isHeader?a.x:c.plotX+p.plotLeft+r(v.distance,16),y:a.pos+p.plotTop,anchorX:c.isHeader?c.plotX+p.plotLeft:c.plotX+b.xAxis.pos,anchorY:c.isHeader?a.pos+p.plotTop-15:c.plotY+b.yAxis.pos})})},updatePosition:function(a){var f=this.chart,e=this.getLabel(),e=(this.options.positioner||this.getPosition).call(this,e.width,e.height,a);this.move(Math.round(e.x),Math.round(e.y|| 0),a.plotX+f.plotLeft,a.plotY+f.plotTop)},getDateFormat:function(a,g,e,d){var f=E("%m-%d %H:%M:%S.%L",g),b,A,v={millisecond:15,second:12,minute:9,hour:6,day:3},h="millisecond";for(A in m){if(a===m.week&&+E("%w",g)===e&&"00:00:00.000"===f.substr(6)){A="week";break}if(m[A]>a){A=h;break}if(v[A]&&f.substr(v[A])!=="01-01 00:00:00.000".substr(v[A]))break;"week"!==A&&(h=A)}A&&(b=d[A]);return b},getXDateFormat:function(a,g,e){g=g.dateTimeLabelFormats;var d=e&&e.closestPointRange;return(d?this.getDateFormat(d, a.x,e.options.startOfWeek,g):g.day)||g.year},tooltipFooterHeaderFormatter:function(a,g){var e=g?"footer":"header";g=a.series;var d=g.tooltipOptions,f=d.xDateFormat,b=g.xAxis,m=b&&"datetime"===b.options.type&&n(a.key),e=d[e+"Format"];m&&!f&&(f=this.getXDateFormat(a,d,b));m&&f&&(e=e.replace("{point.key}","{point.key:"+f+"}"));return D(e,{point:a,series:g})},bodyFormatter:function(a){return h(a,function(a){var e=a.series.tooltipOptions;return(e.pointFormatter||a.point.tooltipFormatter).call(a.point, e.pointFormat)})}}})(L);(function(a){var E=a.addEvent,B=a.attr,F=a.charts,D=a.color,n=a.css,h=a.defined,u=a.doc,r=a.each,x=a.extend,t=a.fireEvent,m=a.offset,f=a.pick,g=a.removeEvent,e=a.splat,d=a.Tooltip,p=a.win;a.Pointer=function(a,d){this.init(a,d)};a.Pointer.prototype={init:function(a,e){this.options=e;this.chart=a;this.runChartClick=e.chart.events&&!!e.chart.events.click;this.pinchDown=[];this.lastValidTouch={};d&&e.tooltip.enabled&&(a.tooltip=new d(a,e.tooltip),this.followTouchMove=f(e.tooltip.followTouchMove, !0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,d=b.options.chart,e=d.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(e=f(d.pinchType,e));this.zoomX=a=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=a&&!b||e&&b;this.zoomVert=e&&!b||a&&b;this.hasZoom=a||e},normalize:function(a,d){var b,e;a=a||p.event;a.target||(a.target=a.srcElement);e=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;d||(this.chartPosition=d=m(this.chart.container));void 0===e.pageX?(b=Math.max(a.x, a.clientX-d.left),d=a.y):(b=e.pageX-d.left,d=e.pageY-d.top);return x(a,{chartX:Math.round(b),chartY:Math.round(d)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};r(this.chart.axes,function(d){b[d.isXAxis?"xAxis":"yAxis"].push({axis:d,value:d.toValue(a[d.horiz?"chartX":"chartY"])})});return b},getKDPoints:function(a,d,e){var b=[],p,g,c;r(a,function(a){p=a.noSharedTooltip&&d;g=!d&&a.directTouch;a.visible&&!g&&f(a.options.enableMouseTracking,!0)&&(c=a.searchPoint(e,!p&&0>a.options.findNearestPointBy.indexOf("y")))&& c.series&&b.push(c)});b.sort(function(a,c){var b=a.distX-c.distX,e=a.dist-c.dist,l=(c.series.group&&c.series.group.zIndex)-(a.series.group&&a.series.group.zIndex);return 0!==b&&d?b:0!==e?e:0!==l?l:a.series.index>c.series.index?-1:1});if(d&&b[0]&&!b[0].series.noSharedTooltip)for(a=b.length;a--;)(b[a].x!==b[0].x||b[a].series.noSharedTooltip)&&b.splice(a,1);return b},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,d){var b= a.series,e=b.xAxis,b=b.yAxis;if(e&&b)return d?{chartX:e.len+e.pos-a.clientX,chartY:b.len+b.pos-a.plotY}:{chartX:a.clientX+e.pos,chartY:a.plotY+b.pos}},getHoverData:function(b,d,e,f,p,g){var c=b,v=d,c=p?e:[v];f=!(!f||!b);d=v&&!v.stickyTracking;var q=function(a,c){return 0===c},y;f?q=function(a){return a===b}:d?q=function(a){return a.series===v}:c=a.grep(e,function(a){return a.stickyTracking});y=f&&!p?[b]:this.getKDPoints(c,p,g);v=(c=a.find(y,q))&&c.series;f||d||!p||(y=this.getKDPoints(e,p,g));y.sort(function(a, c){return a.series.index-c.series.index});return{hoverPoint:c,hoverSeries:v,hoverPoints:y}},runPointActions:function(b,d){var e=this.chart,p=e.tooltip,g=p?p.shared:!1,m=d||e.hoverPoint,c=m&&m.series||e.hoverSeries;d=this.getHoverData(m,c,e.series,!!d||c&&c.directTouch&&this.isDirectTouch,g,b);var w,h,m=d.hoverPoint;w=(c=d.hoverSeries)&&c.tooltipOptions.followPointer;h=(g=g&&m&&!m.series.noSharedTooltip)?d.hoverPoints:m?[m]:[];if(m&&(m!==e.hoverPoint||p&&p.isHidden)){r(e.hoverPoints||[],function(c){-1=== a.inArray(c,h)&&c.setState()});r(h||[],function(a){a.setState("hover")});if(e.hoverSeries!==c)c.onMouseOver();e.hoverPoint&&e.hoverPoint.firePointEvent("mouseOut");m.firePointEvent("mouseOver");e.hoverPoints=h;e.hoverPoint=m;p&&p.refresh(g?h:m,b)}else w&&p&&!p.isHidden&&(c=p.getAnchor([{}],b),p.updatePosition({plotX:c[0],plotY:c[1]}));this.unDocMouseMove||(this.unDocMouseMove=E(u,"mousemove",function(c){var b=F[a.hoverChartIndex];if(b)b.pointer.onDocumentMouseMove(c)}));r(e.axes,function(c){f(c.crosshair.snap, !0)?a.find(h,function(a){return a.series[c.coll]===c})?c.drawCrosshair(b,m):c.hideCrosshair():c.drawCrosshair(b)})},reset:function(a,d){var b=this.chart,f=b.hoverSeries,p=b.hoverPoint,g=b.hoverPoints,c=b.tooltip,m=c&&c.shared?g:p;a&&m&&r(e(m),function(c){c.series.isCartesian&&void 0===c.plotX&&(a=!1)});if(a)c&&m&&(c.refresh(m),p&&(p.setState(p.state,!0),r(b.axes,function(a){a.crosshair&&a.drawCrosshair(null,p)})));else{if(p)p.onMouseOut();g&&r(g,function(a){a.setState()});if(f)f.onMouseOut();c&&c.hide(d); this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());r(b.axes,function(a){a.hideCrosshair()});this.hoverX=b.hoverPoints=b.hoverPoint=null}},scaleGroups:function(a,d){var b=this.chart,e;r(b.series,function(f){e=a||f.getPlotBox();f.xAxis&&f.xAxis.zoomEnabled&&f.group&&(f.group.attr(e),f.markerGroup&&(f.markerGroup.attr(e),f.markerGroup.clip(d?b.clipRect:null)),f.dataLabelsGroup&&f.dataLabelsGroup.attr(e))});b.clipRect.attr(d||b.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,d=b.options.chart,e=a.chartX,f=a.chartY,p=this.zoomHor,c=this.zoomVert,g=b.plotLeft,m=b.plotTop,y=b.plotWidth,G=b.plotHeight,l,I=this.selectionMarker,k=this.mouseDownX,z=this.mouseDownY,h=d.panKey&&a[d.panKey+"Key"];I&&I.touch||(eg+y&&(e=g+y),fm+G&&(f=m+G),this.hasDragged=Math.sqrt(Math.pow(k-e,2)+Math.pow(z-f,2)),10K.max&&(h=K.max-q,z=!0);z?(l-=.8*(l-g[p][0]),y||(k-=.8*(k-g[p][1])),n()):g[p]=[l,k];w||(f[p]=r-H,f[v]=q);f=w?1/c:c;m[v]=q;m[p]=h;t[w?a?"scaleY": "scaleX":"scale"+b]=c;t["translate"+b]=f*H+(l-f*G)},pinch:function(a){var r=this,u=r.chart,t=r.pinchDown,m=a.touches,f=m.length,g=r.lastValidTouch,e=r.hasZoom,d=r.selectionMarker,p={},b=1===f&&(r.inClass(a.target,"highcharts-tracker")&&u.runTrackerClick||r.runChartClick),A={};1e-6&&m(y||d.spacingBox.width-2*c-b.x)&&(this.itemX=c,this.itemY+=l+this.lastLineHeight+G,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,q);this.lastItemY=l+this.itemY+G;this.lastLineHeight=Math.max(e,this.lastLineHeight); a._legendItemPos=[this.itemX,this.itemY];f?this.itemX+=q:(this.itemY+=l+e+G,this.lastLineHeight=e);this.offsetWidth=y||Math.max((f?this.itemX-c-w:q)+c,this.offsetWidth)},getAllItems:function(){var a=[];n(this.chart.series,function(d){var e=d&&d.options;d&&x(e.showInLegend,D(e.linkedTo)?!1:void 0,!0)&&(a=a.concat(d.legendItems||("point"===e.legendType?d.data:d)))});return a},adjustMargins:function(a,d){var e=this.chart,b=this.options,f=b.align.charAt(0)+b.verticalAlign.charAt(0)+b.layout.charAt(0); b.floating||n([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(g,p){g.test(f)&&!D(a[p])&&(e[u[p]]=Math.max(e[u[p]],e.legend[(p+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][p]*b[p%2?"x":"y"]+x(b.margin,12)+d[p]))})},render:function(){var a=this,d=a.chart,f=d.renderer,b=a.group,g,h,H,q,u=a.box,c=a.options,w=a.padding;a.itemX=w;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;b||(a.group=b=f.g("legend").attr({zIndex:7}).add(),a.contentGroup=f.g().attr({zIndex:1}).add(b),a.scrollGroup= f.g().add(a.contentGroup));a.renderTitle();g=a.getAllItems();m(g,function(a,c){return(a.options&&a.options.legendIndex||0)-(c.options&&c.options.legendIndex||0)});c.reversed&&g.reverse();a.allItems=g;a.display=h=!!g.length;a.lastLineHeight=0;n(g,function(c){a.renderItem(c)});H=(c.width||a.offsetWidth)+w;q=a.lastItemY+a.lastLineHeight+a.titleHeight;q=a.handleOverflow(q);q+=w;u||(a.box=u=f.rect().addClass("highcharts-legend-box").attr({r:c.borderRadius}).add(b),u.isNew=!0);u.attr({stroke:c.borderColor, "stroke-width":c.borderWidth||0,fill:c.backgroundColor||"none"}).shadow(c.shadow);0e&&!1!==c.enabled?(this.clipHeight=q=Math.max(e-20-this.titleHeight- m,0),this.currentPage=x(this.currentPage,1),this.fullHeight=a,n(I,function(a,c){var b=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var d=G.length;if(!d||b-G[d-1]>q&&(l||b)!==G[d-1])G.push(l||b),d++;c===I.length-1&&b+a-G[d-1]>q&&G.push(b);b!==l&&(l=b)}),h||(h=d.clipRect=b.clipRect(0,m,9999,0),d.contentGroup.clip(h)),k(q),y||(this.nav=y=b.g().attr({zIndex:1}).add(this.group),this.up=b.symbol("triangle",0,0,r,r).on("click",function(){d.scroll(-1,w)}).add(y),this.pager=b.text("",15, 10).addClass("highcharts-legend-navigation").css(c.style).add(y),this.down=b.symbol("triangle-down",0,0,r,r).on("click",function(){d.scroll(1,w)}).add(y)),d.scroll(0),a=e):y&&(k(),this.nav=y.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,d){var e=this.pages,b=e.length;a=this.currentPage+a;var f=this.clipHeight,g=this.options.navigation,m=this.pager,q=this.padding;a>b&&(a=b);0p&&(g=typeof a[0],"string"===g?f.name=a[0]:"number"=== g&&(f.x=a[0]),b++);m=e.value;)e=f[++g];e&&e.color&&!this.options.color&&(this.color=e.color);return e},destroy:function(){var a=this.series.chart,f=a.hoverPoints,g;a.pointCount--;f&&(this.setState(),D(f,this),f.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)t(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this); for(g in this)this[g]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],f,g=6;g--;)f=a[g],this[f]&&(this[f]=this[f].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var f=this.series,g=f.tooltipOptions,e=x(g.valueDecimals,""), d=g.valuePrefix||"",p=g.valueSuffix||"";B(f.pointArrayMap||["y"],function(b){b="{point."+b;if(d||p)a=a.replace(b+"}",d+b+"}"+p);a=a.replace(b+"}",b+":,."+e+"f}")});return h(a,{point:this,series:this.series})},firePointEvent:function(a,f,g){var e=this,d=this.series.options;(d.point.events[a]||e.options&&e.options.events&&e.options.events[a])&&this.importEvents();"click"===a&&d.allowPointSelect&&(g=function(a){e.select&&e.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});n(this,a,f,g)},visible:!0}})(L); (function(a){var E=a.addEvent,B=a.animObject,F=a.arrayMax,D=a.arrayMin,n=a.correctFloat,h=a.Date,u=a.defaultOptions,r=a.defaultPlotOptions,x=a.defined,t=a.each,m=a.erase,f=a.extend,g=a.fireEvent,e=a.grep,d=a.isArray,p=a.isNumber,b=a.isString,A=a.merge,v=a.objectEach,H=a.pick,q=a.removeEvent,J=a.splat,c=a.SVGElement,w=a.syncTimeout,K=a.win;a.Series=a.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",radius:4, states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{animation:{duration:50},lineWidthPlus:1,marker:{}, halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,c){var b=this,d,k=a.series,e;b.chart=a;b.options=c=b.setOptions(c);b.linkedSeries=[];b.bindAxes();f(b,{name:c.name,state:"",visible:!1!==c.visible,selected:!0===c.selected});d=c.events;v(d,function(a,c){E(b,c,a)});if(d&& d.click||c.point&&c.point.events&&c.point.events.click||c.allowPointSelect)a.runTrackerClick=!0;b.getColor();b.getSymbol();t(b.parallelArrays,function(a){b[a+"Data"]=[]});b.setData(c.data,!1);b.isCartesian&&(a.hasCartesianSeries=!0);k.length&&(e=k[k.length-1]);b._i=H(e&&e._i,-1)+1;a.orderSeries(this.insert(k))},insert:function(a){var c=this.options.index,b;if(p(c)){for(b=a.length;b--;)if(c>=H(a[b].options.index,a[b]._i)){a.splice(b+1,0,this);break}-1===b&&a.unshift(this);b+=1}else a.push(this);return H(b, a.length-1)},bindAxes:function(){var c=this,b=c.options,d=c.chart,e;t(c.axisTypes||[],function(l){t(d[l],function(a){e=a.options;if(b[l]===e.index||void 0!==b[l]&&b[l]===e.id||void 0===b[l]&&0===e.index)c.insert(a.series),c[l]=a,a.isDirty=!0});c[l]||c.optionalAxis===l||a.error(18,!0)})},updateParallelArrays:function(a,c){var b=a.series,d=arguments,k=p(c)?function(d){var l="y"===d&&b.toYData?b.toYData(a):a[d];b[d+"Data"][c]=l}:function(a){Array.prototype[c].apply(b[a+"Data"],Array.prototype.slice.call(d, 2))};t(b.parallelArrays,k)},autoIncrement:function(){var a=this.options,c=this.xIncrement,b,d=a.pointIntervalUnit,c=H(c,a.pointStart,0);this.pointInterval=b=H(this.pointInterval,a.pointInterval,1);d&&(a=new h(c),"day"===d?a=+a[h.hcSetDate](a[h.hcGetDate]()+b):"month"===d?a=+a[h.hcSetMonth](a[h.hcGetMonth]()+b):"year"===d&&(a=+a[h.hcSetFullYear](a[h.hcGetFullYear]()+b)),b=a-c);this.xIncrement=c+b;return c},setOptions:function(a){var c=this.chart,b=c.options,d=b.plotOptions,k=(c.userOptions||{}).plotOptions|| {},e=d[this.type];this.userOptions=a;c=A(e,d.series,a);this.tooltipOptions=A(u.tooltip,u.plotOptions.series&&u.plotOptions.series.tooltip,u.plotOptions[this.type].tooltip,b.tooltip.userOptions,d.series&&d.series.tooltip,d[this.type].tooltip,a.tooltip);this.stickyTracking=H(a.stickyTracking,k[this.type]&&k[this.type].stickyTracking,k.series&&k.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:c.stickyTracking);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,className:"highcharts-negative",color:c.negativeColor,fillColor:c.negativeFillColor});a.length&&x(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});return c},getCyclic:function(a,c,b){var d,l=this.chart,e=this.userOptions,f=a+"Index",g=a+"Counter",y=b?b.length:H(l.options.chart[a+"Count"],l[a+"Count"]);c||(d=H(e[f],e["_"+f]),x(d)||(l.series.length|| (l[g]=0),e["_"+f]=d=l[g]%y,l[g]+=1),b&&(c=b[d]));void 0!==d&&(this[f]=d);this[a]=c},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||r[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,setData:function(c,e,l,f){var k=this,g=k.points,y=g&&g.length||0,q,m=k.options,h=k.chart,w=null,G=k.xAxis, I=m.turboThreshold,v=this.xData,n=this.yData,r=(q=k.pointArrayMap)&&q.length;c=c||[];q=c.length;e=H(e,!0);if(!1!==f&&q&&y===q&&!k.cropped&&!k.hasGroupedData&&k.visible)t(c,function(a,c){g[c].update&&a!==m.data[c]&&g[c].update(a,!1,null,!1)});else{k.xIncrement=null;k.colorCounter=0;t(this.parallelArrays,function(a){k[a+"Data"].length=0});if(I&&q>I){for(l=0;null===w&&lp||this.forceCrop))if(b[e-1]n)b=[],d=[];else if(b[0]n)k=this.cropData(this.xData,this.yData,v,n),b=k.xData,d=k.yData,k=k.start,f=!0;for(p=b.length|| 1;--p;)e=h?q(b[p])-q(b[p-1]):b[p]-b[p-1],0e&&this.requireSorting&&a.error(15);this.cropped=f;this.cropStart=k;this.processedXData=b;this.processedYData=d;this.closestPointRange=g},cropData:function(a,c,b,d){var l=a.length,e=0,f=l,g=H(this.cropShoulder,1),y;for(y=0;y=b){e=Math.max(0,y-g);break}for(b=y;bd){f=b+g;break}return{xData:a.slice(e,f),yData:c.slice(e,f),start:e,end:f}},generatePoints:function(){var a=this.options,c=a.data,b=this.data, d,k=this.processedXData,e=this.processedYData,f=this.pointClass,g=k.length,p=this.cropStart||0,q,m=this.hasGroupedData,a=a.keys,w,h=[],v;b||m||(b=[],b.length=c.length,b=this.data=b);a&&m&&(this.options.keys=!1);for(v=0;v=g&&(b[h]||m)<=y,q&&m)if(q=w.length)for(;q--;)null!==w[q]&&(k[f++]=w[q]);else k[f++]=w;this.dataMin= D(k);this.dataMax=F(k)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,c=a.stacking,b=this.xAxis,d=b.categories,k=this.yAxis,e=this.points,f=e.length,g=!!this.modifyValue,q=a.pointPlacement,m="between"===q||p(q),w=a.threshold,h=a.startFromThreshold?w:0,v,r,K,A,u=Number.MAX_VALUE;"between"===q&&(q=.5);p(q)&&(q*=H(a.pointRange||b.pointRange));for(a=0;a=B&&(t.isNull=!0);t.plotX=v=n(Math.min(Math.max(-1E5,b.translate(J,0,0,0,1,q,"flags"===this.type)),1E5));c&&this.visible&&!t.isNull&&D&&D[J]&&(A=this.getStackIndicator(A,J,this.index),E=D[J],B=E.points[A.key],r=B[0],B=B[1],r===h&&A.key===D[J].base&&(r=H(w,k.min)),k.positiveValuesOnly&&0>=r&&(r=null),t.total=t.stackTotal=E.total,t.percentage=E.total&&t.y/E.total*100,t.stackY=B,E.setOffset(this.pointXOffset||0,this.barW||0));t.yBottom=x(r)?k.translate(r,0,1,0,1): null;g&&(B=this.modifyValue(B,t));t.plotY=r="number"===typeof B&&Infinity!==B?Math.min(Math.max(-1E5,k.translate(B,0,1,0,1)),1E5):void 0;t.isInside=void 0!==r&&0<=r&&r<=k.len&&0<=v&&v<=b.len;t.clientX=m?n(b.translate(J,0,0,0,1,q)):v;t.negative=t.y<(w||0);t.category=d&&void 0!==d[t.x]?d[t.x]:t.x;t.isNull||(void 0!==K&&(u=Math.min(u,Math.abs(v-K))),K=v);t.zone=this.zones.length&&t.getZone()}this.closestPointRangePx=u},getValidPoints:function(a,c){var b=this.chart;return e(a||this.points||[],function(a){return c&& !b.isInsidePlot(a.plotX,a.plotY,b.inverted)?!1:!a.isNull})},setClip:function(a){var c=this.chart,b=this.options,d=c.renderer,k=c.inverted,e=this.clipBox,f=e||c.clipBox,g=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,f.height,b.xAxis,b.yAxis].join(),p=c[g],q=c[g+"m"];p||(a&&(f.width=0,c[g+"m"]=q=d.clipRect(-99,k?-c.plotLeft:-c.plotTop,99,k?c.chartWidth:c.chartHeight)),c[g]=p=d.clipRect(f),p.count={length:0});a&&!p.count[this.index]&&(p.count[this.index]=!0,p.count.length+=1);!1!==b.clip&& (this.group.clip(a||e?p:c.clipRect),this.markerGroup.clip(q),this.sharedClipKey=g);a||(p.count[this.index]&&(delete p.count[this.index],--p.count.length),0===p.count.length&&g&&c[g]&&(e||(c[g]=c[g].destroy()),c[g+"m"]&&(c[g+"m"]=c[g+"m"].destroy())))},animate:function(a){var c=this.chart,b=B(this.options.animation),d;a?this.setClip(b):(d=this.sharedClipKey,(a=c[d])&&a.animate({width:c.plotSizeX},b),c[d+"m"]&&c[d+"m"].animate({width:c.plotSizeX+99},b),this.animate=null)},afterAnimate:function(){this.setClip(); g(this,"afterAnimate")},drawPoints:function(){var a=this.points,c=this.chart,b,d,k,e,f=this.options.marker,g,q,m,w,h=this[this.specialGroup]||this.markerGroup,v=H(f.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=2*f.radius);if(!1!==f.enabled||this._hasPointMarkers)for(d=0;dl&&c.shadow));e&&(e.startX=b.xMap,e.isArea=b.isArea)})},applyZones:function(){var a=this,c=this.chart,b=c.renderer, d=this.zones,k,e,f=this.clips||[],g,p=this.graph,q=this.area,m=Math.max(c.chartWidth,c.chartHeight),w=this[(this.zoneAxis||"y")+"Axis"],h,v,n=c.inverted,r,K,A,u,J=!1;d.length&&(p||q)&&w&&void 0!==w.min&&(v=w.reversed,r=w.horiz,p&&p.hide(),q&&q.hide(),h=w.getExtremes(),t(d,function(d,l){k=v?r?c.plotWidth:0:r?0:w.toPixels(h.min);k=Math.min(Math.max(H(e,k),0),m);e=Math.min(Math.max(Math.round(w.toPixels(H(d.value,h.max),!0)),0),m);J&&(k=e=w.toPixels(h.max));K=Math.abs(k-e);A=Math.min(k,e);u=Math.max(k, e);w.isXAxis?(g={x:n?u:A,y:0,width:K,height:m},r||(g.x=c.plotHeight-g.x)):(g={x:0,y:n?u:A,width:m,height:K},r&&(g.y=c.plotWidth-g.y));n&&b.isVML&&(g=w.isXAxis?{x:0,y:v?A:u,height:g.width,width:c.chartWidth}:{x:g.y-c.plotLeft-c.spacingBox.x,y:0,width:g.height,height:c.chartHeight});f[l]?f[l].animate(g):(f[l]=b.clipRect(g),p&&a["zone-graph-"+l].clip(f[l]),q&&a["zone-area-"+l].clip(f[l]));J=d.value>h.max}),this.clips=f)},invertGroups:function(a){function c(){t(["group","markerGroup"],function(c){b[c]&& (d.renderer.isVML&&b[c].attr({width:b.yAxis.len,height:b.xAxis.len}),b[c].width=b.yAxis.len,b[c].height=b.xAxis.len,b[c].invert(a))})}var b=this,d=b.chart,k;b.xAxis&&(k=E(d,"resize",c),E(b,"destroy",k),c(a),b.invertGroups=c)},plotGroup:function(a,c,b,d,k){var l=this[a],e=!l;e&&(this[a]=l=this.chart.renderer.g().attr({zIndex:d||.1}).add(k));l.addClass("highcharts-"+c+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||""), !0);l.attr({visibility:b})[e?"attr":"animate"](this.getPlotBox());return l},getPlotBox:function(){var a=this.chart,c=this.xAxis,b=this.yAxis;a.inverted&&(c=b,b=this.xAxis);return{translateX:c?c.left:a.plotLeft,translateY:b?b.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,c=a.chart,b,d=a.options,k=!!a.animate&&c.renderer.isSVG&&B(d.animation).duration,e=a.visible?"inherit":"hidden",f=d.zIndex,g=a.hasRendered,p=c.seriesGroup,q=c.inverted;b=a.plotGroup("group","series",e,f,p);a.markerGroup= a.plotGroup("markerGroup","markers",e,f,p);k&&a.animate(!0);b.inverted=a.isCartesian?q:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(q);!1===d.clip||a.sharedClipKey||g||b.clip(c.clipRect);k&&a.animate();g||(a.animationTimeout=w(function(){a.afterAnimate()},k));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,c=this.isDirty||this.isDirtyData, b=this.group,d=this.xAxis,k=this.yAxis;b&&(a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight}),b.animate({translateX:H(d&&d.left,a.plotLeft),translateY:H(k&&k.top,a.plotTop)}));this.translate();this.render();c&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,c){var b=this.xAxis,d=this.yAxis,k=this.chart.inverted;return this.searchKDTree({clientX:k?b.len-a.chartY+b.pos:a.chartX-b.pos,plotY:k?d.len-a.chartX+d.pos:a.chartY-d.pos},c)},buildKDTree:function(){function a(b, d,l){var k,e;if(e=b&&b.length)return k=c.kdAxisArray[d%l],b.sort(function(a,c){return a[k]-c[k]}),e=Math.floor(e/2),{point:b[e],left:a(b.slice(0,e),d+1,l),right:a(b.slice(e+1),d+1,l)}}this.buildingKdTree=!0;var c=this,b=-1q?"left":"right";w=0>q?"right":"left";c[m]&&(m=b(a,c[m],l+1,g),h=m[f]v;)w--;this.updateParallelArrays(q,"splice",w,0,0);this.updateParallelArrays(q,w);k&&q.name&&(k[v]=q.name);p.splice(w,0,a);h&&(this.data.splice(w,0,null),this.processData());"point"===c.legendType&&this.generatePoints();e&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(q,"shift"),p.shift()));this.isDirtyData=this.isDirty=!0;d&&g.redraw(f)},removePoint:function(a,d,e){var c=this,f=c.data,l=f[a],g=c.points, k=c.chart,p=function(){g&&g.length===f.length&&g.splice(a,1);f.splice(a,1);c.options.data.splice(a,1);c.updateParallelArrays(l||{series:c},"splice",a,1);l&&l.destroy();c.isDirty=!0;c.isDirtyData=!0;d&&k.redraw()};q(e,k);d=b(d,!0);l?l.firePointEvent("remove",null,p):p()},remove:function(a,d,e){function c(){f.destroy();l.isDirtyLegend=l.isDirtyBox=!0;l.linkSeries();b(a,!0)&&l.redraw(d)}var f=this,l=f.chart;!1!==e?t(f,"remove",null,c):c()},update:function(a,e){var c=this,f=c.chart,g=c.userOptions,l= c.oldType||c.type,p=a.type||g.type||f.options.chart.type,k=H[l].prototype,q=["group","markerGroup","dataLabelsGroup"],h;if(Object.keys&&"data"===Object.keys(a).toString())return this.setData(a.data,e);if(p&&p!==l||void 0!==a.zIndex)q.length=0;u(q,function(a){q[a]=c[a];delete c[a]});a=d(g,{animation:!1,index:c.index,pointStart:c.xData[0]},{data:c.options.data},a);c.remove(!1,null,!1);for(h in k)c[h]=void 0;x(c,H[p||l].prototype);u(q,function(a){c[a]=q[a]});c.init(f,a);c.oldType=l;f.linkSeries();b(e, !0)&&f.redraw(!1)}});x(F.prototype,{update:function(a,e){var c=this.chart;a=c.options[this.coll][this.options.index]=d(this.userOptions,a);this.destroy(!0);this.init(c,x(a,{events:void 0}));c.isDirtyBox=!0;b(e,!0)&&c.redraw()},remove:function(a){for(var c=this.chart,d=this.coll,f=this.series,g=f.length;g--;)f[g]&&f[g].remove(!1);r(c.axes,this);r(c[d],this);e(c.options[d])?c.options[d].splice(this.options.index,1):delete c.options[d];u(c[d],function(a,c){a.options.index=c});this.destroy();c.isDirtyBox= !0;b(a,!0)&&c.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(L);(function(a){var E=a.color,B=a.each,F=a.map,D=a.pick,n=a.Series,h=a.seriesType;h("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var h=[],n=[],x=this.xAxis,t=this.yAxis,m=t.stacks[this.stackKey],f={},g=this.points,e=this.index,d=t.series,p=d.length,b,A=D(t.options.reversedStacks,!0)?1:-1,v;if(this.options.stacking){for(v= 0;va&&x>h?(x=Math.max(a,h),m=2*h-x):xD&&m>h?(m=Math.max(D,h),x=2*h-m):m=Math.abs(f)&&.5a.closestPointRange*a.xAxis.transA, e=a.borderWidth=u(g.borderWidth,e?0:1),d=a.yAxis,p=a.translatedThreshold=d.getThreshold(g.threshold),b=u(g.minPointLength,5),h=a.getColumnMetrics(),v=h.width,n=a.barW=Math.max(v,1+2*e),q=a.pointXOffset=h.offset;f.inverted&&(p-=.5);g.pointPadding&&(n=Math.ceil(n));r.prototype.translate.apply(a);F(a.points,function(e){var c=u(e.yBottom,p),g=999+Math.abs(c),g=Math.min(Math.max(-g,e.plotY),d.len+g),h=e.plotX+q,m=n,r=Math.min(g,c),l,I=Math.max(g,c)-r;Math.abs(I)b?c-b:p-(l?b:0));e.barX=h;e.pointWidth=v;e.tooltipPos=f.inverted?[d.len+d.pos-f.plotLeft-g,a.xAxis.len-h-m/2,I]:[h+m/2,g+d.pos-f.plotTop,I];e.shapeType="rect";e.shapeArgs=a.crispCol.apply(a,e.isNull?[h,p,m,0]:[h,r,m,I])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(a,f){var g=this.options,e,d=this.pointAttrToOptions||{}; e=d.stroke||"borderColor";var p=d["stroke-width"]||"borderWidth",b=a&&a.color||this.color,m=a[e]||g[e]||this.color||b,v=a[p]||g[p]||this[p]||0,d=g.dashStyle;a&&this.zones.length&&(b=a.getZone(),b=a.options.color||b&&b.color||this.color);f&&(a=h(g.states[f],a.options.states&&a.options.states[f]||{}),f=a.brightness,b=a.color||void 0!==f&&B(b).brighten(a.brightness).get()||b,m=a[e]||m,v=a[p]||v,d=a.dashStyle||d);e={fill:b,stroke:m,"stroke-width":v};g.borderRadius&&(e.r=g.borderRadius);d&&(e.dashstyle= d);return e},drawPoints:function(){var a=this,f=this.chart,g=a.options,e=f.renderer,d=g.animationLimit||250,p;F(a.points,function(b){var m=b.graphic;if(n(b.plotY)&&null!==b.y){p=b.shapeArgs;if(m)m[f.pointCountx;++x)t=u[x],a=2>x||2===x&&/%$/.test(t),u[x]=B(t,[h, D,r,u[2]][x])+(a?n:0);u[3]>u[2]&&(u[3]=u[2]);return u}}})(L);(function(a){var E=a.addEvent,B=a.defined,F=a.each,D=a.extend,n=a.inArray,h=a.noop,u=a.pick,r=a.Point,x=a.Series,t=a.seriesType,m=a.setAnimation;t("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0}, borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1,shadow:!1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var f=this,e=f.points,d=f.startAngleRad;a||(F(e,function(a){var b=a.graphic,e=a.shapeArgs;b&&(b.attr({r:a.startR||f.center[3]/2,start:d,end:d}),b.animate({r:e.r,start:e.start,end:e.end},f.options.animation))}),f.animate=null)}, updateTotals:function(){var a,g=0,e=this.points,d=e.length,p,b=this.options.ignoreHiddenPoint;for(a=0;a1.5*Math.PI?v-=2*Math.PI:v<-Math.PI/2&&(v+=2*Math.PI);t.slicedTranslation={translateX:Math.round(Math.cos(v)*d),translateY:Math.round(Math.sin(v)*d)};h=Math.cos(v)*a[2]/2;c=Math.sin(v)*a[2]/2;t.tooltipPos=[a[0]+.7*h,a[1]+.7*c];t.half=v<-Math.PI/2||v>Math.PI/2?1:0;t.angle=v;b=Math.min(p,t.labelDistance/5);t.labelPos=[a[0]+h+Math.cos(v)*t.labelDistance, a[1]+c+Math.sin(v)*t.labelDistance,a[0]+h+Math.cos(v)*b,a[1]+c+Math.sin(v)*b,a[0]+h,a[1]+c,0>t.labelDistance?"center":t.half?"right":"left",v]}},drawGraph:null,drawPoints:function(){var a=this,g=a.chart.renderer,e,d,p,b,h=a.options.shadow;h&&!a.shadowGroup&&(a.shadowGroup=g.g("shadow").add(a.group));F(a.points,function(f){if(!f.isNull){d=f.graphic;b=f.shapeArgs;e=f.getTranslate();var m=f.shadowGroup;h&&!m&&(m=f.shadowGroup=g.g("shadow").add(a.shadowGroup));m&&m.attr(e);p=a.pointAttribs(f,f.selected&& "select");d?d.setRadialReference(a.center).attr(p).animate(D(b,e)):(f.graphic=d=g[f.shapeType](b).setRadialReference(a.center).attr(e).add(a.group),f.visible||d.attr({visibility:"hidden"}),d.attr(p).attr({"stroke-linejoin":"round"}).shadow(h,m));d.addClass(f.getClassName())}})},searchPoint:h,sortByAngle:function(a,g){a.sort(function(a,d){return void 0!==a.angle&&(d.angle-a.angle)*g})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:h},{init:function(){r.prototype.init.apply(this, arguments);var a=this,g;a.name=u(a.name,"Slice");g=function(e){a.slice("select"===e.type)};E(a,"select",g);E(a,"unselect",g);return a},isValid:function(){return a.isNumber(this.y,!0)&&0<=this.y},setVisible:function(a,g){var e=this,d=e.series,f=d.chart,b=d.options.ignoreHiddenPoint;g=u(g,b);a!==e.visible&&(e.visible=e.options.visible=a=void 0===a?!e.visible:a,d.options.data[n(e,d.data)]=e.options,F(["graphic","dataLabel","connector","shadowGroup"],function(b){if(e[b])e[b][a?"show":"hide"](!0)}),e.legendItem&& f.legend.colorizeItem(e,a),a||"hover"!==e.state||e.setState(""),b&&(d.isDirty=!0),g&&f.redraw())},slice:function(a,g,e){var d=this.series;m(e,d.chart);u(g,!0);this.sliced=this.options.sliced=B(a)?a:!this.sliced;d.options.data[n(this,d.data)]=this.options;this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var f=this.shapeArgs;return this.sliced|| !this.visible?[]:this.series.chart.renderer.symbols.arc(f.x,f.y,f.r+a,f.r+a,{innerR:this.shapeArgs.r,start:f.start,end:f.end})}})})(L);(function(a){var E=a.addEvent,B=a.arrayMax,F=a.defined,D=a.each,n=a.extend,h=a.format,u=a.map,r=a.merge,x=a.noop,t=a.pick,m=a.relativeLength,f=a.Series,g=a.seriesTypes,e=a.stableSort;a.distribute=function(a,f){function b(a,b){return a.target-b.target}var d,g=!0,p=a,q=[],h;h=0;for(d=a.length;d--;)h+=a[d].size;if(h>f){e(a,function(a,b){return(b.rank||0)-(a.rank||0)}); for(h=d=0;h<=f;)h+=a[d].size,d++;q=a.splice(d-1,a.length)}e(a,b);for(a=u(a,function(a){return{size:a.size,targets:[a.target]}});g;){for(d=a.length;d--;)g=a[d],h=(Math.min.apply(0,g.targets)+Math.max.apply(0,g.targets))/2,g.pos=Math.min(Math.max(0,h-g.size/2),f-g.size);d=a.length;for(g=!1;d--;)0a[d].pos&&(a[d-1].size+=a[d].size,a[d-1].targets=a[d-1].targets.concat(a[d].targets),a[d-1].pos+a[d-1].size>f&&(a[d-1].pos=f-a[d-1].size),a.splice(d,1),g=!0)}d=0;D(a,function(a){var c= 0;D(a.targets,function(){p[d].pos=a.pos+c;c+=p[d].size;d++})});p.push.apply(p,q);e(p,b)};f.prototype.drawDataLabels=function(){var d=this,e=d.options,b=e.dataLabels,f=d.points,g,m,q=d.hasRendered||0,n,c,w=t(b.defer,!!e.animation),u=d.chart.renderer;if(b.enabled||d._hasPointLabels)d.dlProcessOptions&&d.dlProcessOptions(b),c=d.plotGroup("dataLabelsGroup","data-labels",w&&!q?"hidden":"visible",b.zIndex||6),w&&(c.attr({opacity:+q}),q||E(d,"afterAnimate",function(){d.visible&&c.show(!0);c[e.animation? "animate":"attr"]({opacity:1},{duration:200})})),m=b,D(f,function(f){var q,l=f.dataLabel,p,k,w=f.connector,v=!l,y;g=f.dlOptions||f.options&&f.options.dataLabels;if(q=t(g&&g.enabled,m.enabled)&&null!==f.y)b=r(m,g),p=f.getLabelConfig(),n=b.format?h(b.format,p):b.formatter.call(p,b),y=b.style,p=b.rotation,y.color=t(b.color,y.color,d.color,"#000000"),"contrast"===y.color&&(f.contrastColor=u.getContrast(f.color||d.color),y.color=b.inside||0>t(f.labelDistance,b.distance)||e.stacking?f.contrastColor:"#000000"), e.cursor&&(y.cursor=e.cursor),k={fill:b.backgroundColor,stroke:b.borderColor,"stroke-width":b.borderWidth,r:b.borderRadius||0,rotation:p,padding:b.padding,zIndex:1},a.objectEach(k,function(a,c){void 0===a&&delete k[c]});!l||q&&F(n)?q&&F(n)&&(l?k.text=n:(l=f.dataLabel=u[p?"text":"label"](n,0,-9999,b.shape,null,null,b.useHTML,null,"data-label"),l.addClass("highcharts-data-label-color-"+f.colorIndex+" "+(b.className||"")+(b.useHTML?"highcharts-tracker":""))),l.attr(k),l.css(y).shadow(b.shadow),l.added|| l.add(c),d.alignDataLabel(f,l,b,null,v)):(f.dataLabel=l=l.destroy(),w&&(f.connector=w.destroy()))})};f.prototype.alignDataLabel=function(a,e,b,f,g){var d=this.chart,q=d.inverted,h=t(a.plotX,-9999),c=t(a.plotY,-9999),p=e.getBBox(),m,v=b.rotation,r=b.align,l=this.visible&&(a.series.forceDL||d.isInsidePlot(h,Math.round(c),q)||f&&d.isInsidePlot(h,q?f.x+1:f.y+f.height-1,q)),I="justify"===t(b.overflow,"justify");if(l&&(m=b.style.fontSize,m=d.renderer.fontMetrics(m,e).b,f=n({x:q?d.plotWidth-c:h,y:Math.round(q? d.plotHeight-h:c),width:0,height:0},f),n(b,{width:p.width,height:p.height}),v?(I=!1,h=d.renderer.rotCorr(m,v),h={x:f.x+b.x+f.width/2+h.x,y:f.y+b.y+{top:0,middle:.5,bottom:1}[b.verticalAlign]*f.height},e[g?"attr":"animate"](h).attr({align:r}),c=(v+720)%360,c=180c,"left"===r?h.y-=c?p.height:0:"center"===r?(h.x-=p.width/2,h.y-=p.height/2):"right"===r&&(h.x-=p.width,h.y-=c?0:p.height)):(e.align(b,null,f),h=e.alignAttr),I?a.isLabelJustified=this.justifyDataLabel(e,b,h,p,f,g):t(b.crop,!0)&&(l=d.isInsidePlot(h.x, h.y)&&d.isInsidePlot(h.x+p.width,h.y+p.height)),b.shape&&!v))e[g?"attr":"animate"]({anchorX:q?d.plotWidth-a.plotY:a.plotX,anchorY:q?d.plotHeight-a.plotX:a.plotY});l||(e.attr({y:-9999}),e.placed=!1)};f.prototype.justifyDataLabel=function(a,e,b,f,g,h){var d=this.chart,p=e.align,c=e.verticalAlign,m,n,v=a.box?0:a.padding||0;m=b.x+v;0>m&&("right"===p?e.align="left":e.x=-m,n=!0);m=b.x+f.width-v;m>d.plotWidth&&("left"===p?e.align="right":e.x=d.plotWidth-m,n=!0);m=b.y+v;0>m&&("bottom"===c?e.verticalAlign= "top":e.y=-m,n=!0);m=b.y+f.height-v;m>d.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=d.plotHeight-m,n=!0);n&&(a.placed=!h,a.align(e,null,g));return n};g.pie&&(g.pie.prototype.drawDataLabels=function(){var d=this,e=d.data,b,g=d.chart,h=d.options.dataLabels,m=t(h.connectorPadding,10),q=t(h.connectorWidth,1),n=g.plotWidth,c=g.plotHeight,w,r=d.center,y=r[2]/2,u=r[1],l,I,k,z,x=[[],[]],M,N,E,O,C=[0,0,0,0];d.visible&&(h.enabled||d._hasPointLabels)&&(D(e,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&& (a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),f.prototype.drawDataLabels.apply(d),D(e,function(a){a.dataLabel&&a.visible&&(x[a.half].push(a),a.dataLabel._pos=null)}),D(x,function(e,f){var q,p,w=e.length,v=[],t;if(w)for(d.sortByAngle(e,f-.5),0b.bottom-2?q:N,f,b),l._attr={visibility:E,align:k[6]}, l._pos={x:M+h.x+({left:m,right:-m}[k[6]]||0),y:N+h.y-10},k.x=M,k.y=N,I=l.getBBox().width,q=null,M-In-m&&(q=Math.round(M+I-n+m),C[1]=Math.max(q,C[1])),0>N-z/2?C[0]=Math.max(Math.round(-N+z/2),C[0]):N+z/2>c&&(C[2]=Math.max(Math.round(N+z/2-c),C[2])),l.sideOverflow=q}),0===B(C)||this.verifyDataLabelOverflow(C))&&(this.placeDataLabels(),q&&D(this.points,function(a){var c;w=a.connector;if((l=a.dataLabel)&&l._pos&&a.visible&&0t(this.translatedThreshold,q.yAxis.len)),m=t(b.inside,!!this.options.stacking);p&&(g=r(p),0>g.y&&(g.height+=g.y,g.y=0),p=g.y+g.height-q.yAxis.len,0a+e||g+cd+f||h+pthis.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,l=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",f=c[d],k=(b.pointRange||0)/2,g=b.getExtremes(),h=b.toValue(f-l,!0)+k,k=b.toValue(f+b.len-l,!0)-k,p=k=h(r.minWidth,0)&&this.chartHeight>=h(r.minHeight,0)}).call(this)&&n.push(a._id)};E.prototype.currentOptions=function(h){function r(h,f,g,e){var d;a.objectEach(h,function(a,b){if(!e&&-1b.length||void 0===e)return a.call(this,g,e,d,p);u=b.length;for(q=0;qd;b[q]5*m||y){if(b[q]>l){for(r=a.call(this,g,b[f],b[q],p);r.length&&r[0]<=l;)r.shift();r.length&&(l=r[r.length-1]);x=x.concat(r)}f=q+1}if(y)break}a=r.info;if(v&&a.unitRange<=t.hour){q=x.length-1;for(f=1;fd?a-1:a;for(k=void 0;v--;)f=q[v],d=Math.abs(k-f),k&&d<.8*I&&(null===w||d<.8*w)?(c[x[v]]&&!c[x[v+1]]?(d=v+1,k=f):d=v,x.splice(d,1)):k=f}return x});r(B.prototype,{beforeSetTickPositions:function(){var a,g=[],e=!1,d,h=this.getExtremes(),b=h.min,m=h.max,n,r=this.isXAxis&&!!this.options.breaks,h=this.options.ordinal,q=this.chart.options.chart.ignoreHiddenSeries;if(h||r){u(this.series, function(b,c){if(!(q&&!1===b.visible||!1===b.takeOrdinalPosition&&!r)&&(g=g.concat(b.processedXData),a=g.length,g.sort(function(a,c){return a-c}),a))for(c=a-1;c--;)g[c]===g[c+1]&&g.splice(c,1)});a=g.length;if(2d||m-g[g.length-1]>d)&&(e=!0)}e?(this.ordinalPositions=g,d=this.ordinal2lin(Math.max(b,g[0]),!0),n=Math.max(this.ordinal2lin(Math.min(m,g[g.length-1]),!0),1),this.ordinalSlope=m=(m-b)/(n-d), this.ordinalOffset=b-d*m):this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0}this.isOrdinal=h&&e;this.groupIntervalFactor=null},val2lin:function(a,g){var e=this.ordinalPositions;if(e){var d=e.length,f,b;for(f=d;f--;)if(e[f]===a){b=f;break}for(f=d-1;f--;)if(a>e[f]||0===f){a=(a-e[f])/(e[f+1]-e[f]);b=f+a;break}g=g?b:this.ordinalSlope*(b||0)+this.ordinalOffset}else g=a;return g},lin2val:function(a,g){var e=this.ordinalPositions;if(e){var d=this.ordinalSlope,f=this.ordinalOffset,b=e.length- 1,h;if(g)0>a?a=e[0]:a>b?a=e[b]:(b=Math.floor(a),h=a-b);else for(;b--;)if(g=d*b+f,a>=g){d=d*(b+1)+f;h=(a-g)/(d-g);break}return void 0!==h&&void 0!==e[b]?e[b]+(h?h*(e[b+1]-e[b]):0):a}return a},getExtendedPositions:function(){var a=this.chart,g=this.series[0].currentDataGrouping,e=this.ordinalIndex,d=g?g.count+g.unitName:"raw",h=this.getExtremes(),b,m;e||(e=this.ordinalIndex={});e[d]||(b={series:[],chart:a,getExtremes:function(){return{min:h.dataMin,max:h.dataMax}},options:{ordinal:!0},val2lin:B.prototype.val2lin, ordinal2lin:B.prototype.ordinal2lin},u(this.series,function(d){m={xAxis:b,xData:d.xData,chart:a,destroyGroupedData:x};m.options={dataGrouping:g?{enabled:!0,forced:!0,approximation:"open",units:[[g.unitName,[g.count]]]}:{enabled:!1}};d.processData.apply(m);b.series.push(m)}),this.beforeSetTickPositions.apply(b),e[d]=b.ordinalPositions);return e[d]},getGroupIntervalFactor:function(a,g,e){var d;e=e.processedXData;var f=e.length,b=[];d=this.groupIntervalFactor;if(!d){for(d=0;db?(r=w,y=e.ordinalPositions?e:w):(r=e.ordinalPositions?e:w,y=w),w=y.ordinalPositions,m>w[w.length-1]&&w.push(m),this.fixedRange=q-n,b=e.toFixedRange(null,null,c.apply(r,[t.apply(r,[n,!0])+b,!0]),c.apply(y,[t.apply(y,[q,!0])+b,!0])),b.min>=Math.min(h.dataMin,n)&& b.max<=Math.max(m,q)&&e.setExtremes(b.min,b.max,!0,!1,{trigger:"pan"}),this.mouseDownX=d,D(this.container,{cursor:"move"})):f=!0}else f=!0;f&&a.apply(this,Array.prototype.slice.call(arguments,1))})})(L);(function(a){function E(){return Array.prototype.slice.call(arguments,1)}function B(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,F(this.pointArrayMap,["y"]))}var F=a.pick,D=a.wrap,n=a.each,h=a.extend,u=a.isArray,r=a.fireEvent,x=a.Axis,t=a.Series;h(x.prototype,{isInBreak:function(a, f){var g=a.repeat||Infinity,e=a.from,d=a.to-a.from;f=f>=e?(f-e)%g:g-(e-f)%g;return a.inclusive?f<=d:f=a)break;else if(e.isInBreak(b,a)){d-=a-b.from;break}return d},e.lin2val=function(a){var d,b;for(b=0;b= a);b++)d.tom;)w-=h;for(;wd.to||h>d.from&&md.from&&md.from&&m>d.to&&mthis.closestPointRange*a&&f.splice(g+1,0,{isNull:!0});return this.getGraphPath(f)};D(a.seriesTypes.column.prototype,"drawPoints",B);D(a.Series.prototype,"drawPoints",B)})(L);(function(a){var E=a.arrayMax,B=a.arrayMin,F=a.Axis,D=a.defaultPlotOptions,n=a.defined,h=a.each,u=a.extend,r=a.format,x=a.isNumber,t=a.merge,m=a.pick,f=a.Point,g=a.Tooltip,e=a.wrap,d=a.Series.prototype,p=d.processData,b=d.generatePoints, A=d.destroy,v={approximation:"average",groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}}, H={line:{},spline:{},area:{},areaspline:{},column:{approximation:"sum",groupPixelWidth:10},arearange:{approximation:"range"},areasplinerange:{approximation:"range"},columnrange:{approximation:"range",groupPixelWidth:10},candlestick:{approximation:"ohlc",groupPixelWidth:10},ohlc:{approximation:"ohlc",groupPixelWidth:5}},q=a.defaultDataGroupingUnits=[["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]],J={sum:function(a){var c=a.length,b;if(!c&&a.hasNulls)b=null;else if(c)for(b=0;c--;)b+=a[c];return b},average:function(a){var c=a.length;a=J.sum(a);x(a)&&c&&(a/=c);return a},averages:function(){var a=[];h(arguments,function(c){a.push(J.average(c))});return a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?E(a):a.hasNulls?null:void 0},low:function(a){return a.length?B(a):a.hasNulls?null:void 0},close:function(a){return a.length? a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,b,d,e){a=J.open(a);b=J.high(b);d=J.low(d);e=J.close(e);if(x(a)||x(b)||x(d)||x(e))return[a,b,d,e]},range:function(a,b){a=J.low(a);b=J.high(b);if(x(a)||x(b))return[a,b];if(null===a&&null===b)return null}};d.groupData=function(a,b,d,e){var c=this.data,f=this.options.data,g=[],k=[],p=[],m=a.length,n,q,r=!!b,w=[];e="function"===typeof e?e:J[e]||H[this.type]&&J[H[this.type].approximation]||J[v.approximation];var u=this.pointArrayMap,t=u&&u.length,y= 0;q=0;var K,A;t?h(u,function(){w.push([])}):w.push([]);K=t||1;for(A=0;A<=m&&!(a[A]>=d[0]);A++);for(A;A<=m;A++){for(;void 0!==d[y+1]&&a[A]>=d[y+1]||A===m;){n=d[y];this.dataGroupInfo={start:q,length:w[0].length};q=e.apply(this,w);void 0!==q&&(g.push(n),k.push(q),p.push(this.dataGroupInfo));q=A;for(n=0;nthis.chart.plotSizeX/e||b&&l.forced)&&(f=!0);return f? e:0};F.prototype.setDataGrouping=function(a,b){var c;b=m(b,!0);a||(a={forced:!1,units:null});if(this instanceof F)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else h(this.chart.options.series,function(c){c.dataGrouping=a},!1);b&&this.chart.redraw()}})(L);(function(a){var E=a.each,B=a.Point,F=a.seriesType,D=a.seriesTypes;F("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cb\x3e {series.name}\x3c/b\x3e\x3cbr/\x3eOpen: {point.open}\x3cbr/\x3eHigh: {point.high}\x3cbr/\x3eLow: {point.low}\x3cbr/\x3eClose: {point.close}\x3cbr/\x3e'}, threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointAttribs:function(a,h){h=D.column.prototype.pointAttribs.call(this,a,h);var n=this.options;delete h.fill;!a.options.color&&n.upColor&&a.opend)););B(e,function(a,d){var f;void 0===a.plotY&&(a.x>=c.min&&a.x<=c.max?a.plotY=g.chartHeight-q.bottom-(q.opposite?q.height:0)+q.offset-t.top:a.shapeArgs={});a.plotX+=w;(b=e[d-1])&&b.plotX===a.plotX&&(void 0=== b.stackIndex&&(b.stackIndex=0),f=b.stackIndex+1);a.stackIndex=f})},drawPoints:function(){var f=this.points,g=this.chart,e=g.renderer,d,h,b=this.options,m=b.y,n,r,q,t,c,w,u,y=this.yAxis;for(r=f.length;r--;)q=f[r],u=q.plotX>this.xAxis.len,d=q.plotX,t=q.stackIndex,n=q.options.shape||b.shape,h=q.plotY,void 0!==h&&(h=q.plotY+m-(void 0!==t&&t*b.stackDistance)),c=t?void 0:q.plotX,w=t?void 0:q.plotY,t=q.graphic,void 0!==h&&0<=d&&!u?(t||(t=q.graphic=e.label("",null,null,n,null,null,b.useHTML).attr(this.pointAttribs(q)).css(F(b.style, q.style)).attr({align:"flag"===n?"left":"center",width:b.width,height:b.height,"text-align":b.textAlign}).addClass("highcharts-point").add(this.markerGroup),q.graphic.div&&(q.graphic.div.point=q),t.shadow(b.shadow)),0d&&(f-=Math.round((h-d)/2),d=h);f=t[a](f,e,d,h);g&&b&&f.push("M",g,e>b?e:e+h,"L",g,b);return f}});n===x&&B(["flag","circlepin","squarepin"],function(a){x.prototype.symbols[a]=t[a]})})(L);(function(a){function E(a,b,d){this.init(a,b,d)}var B=a.addEvent,F=a.Axis,D=a.correctFloat,n=a.defaultOptions,h=a.defined,u=a.destroyObjectProperties,r=a.doc,x=a.each,t=a.fireEvent,m=a.hasTouch,f=a.isTouchDevice, g=a.merge,e=a.pick,d=a.removeEvent,p=a.wrap,b,A={height:f?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!f,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};n.scrollbar=g(!0,A,n.scrollbar);a.swapXY=b=function(a,b){var d= a.length,e;if(b)for(b=0;b=m?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===d.showFull&&(0>=a&&1<=b?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=this;a.mouseMoveHandler=function(b){var d=a.chart.pointer.normalize(b),e=a.options.vertical?"chartY":"chartX",c=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][e]|| (d=a.cursorToScrollbarPosition(d)[e],e=a[e],e=d-e,a.hasDragged=!0,a.updatePosition(c[0]+e,c[1]+e),a.hasDragged&&t(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&t(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=function(b){b=a.chart.pointer.normalize(b);b=a.cursorToScrollbarPosition(b);a.chartX=b.chartX;a.chartY=b.chartY; a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(b){var d=D(a.to-a.from)*a.options.step;a.updatePosition(D(a.from-d),D(a.to-d));t(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.buttonToMaxClick=function(b){var d=(a.to-a.from)*a.options.step;a.updatePosition(a.from+d,a.to+d);t(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.trackClick=function(b){var d=a.chart.pointer.normalize(b),e=a.to-a.from,c=a.y+a.scrollbarTop,f=a.x+a.scrollbarLeft; a.options.vertical&&d.chartY>c||!a.options.vertical&&d.chartX>f?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-e,a.to-e);t(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})}},cursorToScrollbarPosition:function(a){var b=this.options,b=b.minWidth>this.calculatedWidth?b.minWidth:0;return{chartX:(a.chartX-this.x-this.xOffset)/(this.barWidth-b),chartY:(a.chartY-this.y-this.yOffset)/(this.barWidth-b)}},updatePosition:function(a,b){1a&&(b=D(b-a),a=0); this.from=a;this.to=b},update:function(a){this.destroy();this.init(this.chart.renderer,g(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,d=this.scrollbarGroup.element,e=this.mouseDownHandler,c=this.mouseMoveHandler,f=this.mouseUpHandler,a=[[b[a[0]].element,"click",this.buttonToMinClick],[b[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[d,"mousedown",e],[r,"mousemove",c],[r,"mouseup",f]]; m&&a.push([d,"touchstart",e],[r,"touchmove",c],[r,"touchend",f]);x(a,function(a){B.apply(null,a)});this._events=a},removeEvents:function(){x(this._events,function(a){d.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();x(["track","scrollbarRifles","scrollbar","scrollbarGroup","group"],function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,u(a.scrollbarButtons))}};p(F.prototype,"init",function(a){var b= this;a.apply(b,Array.prototype.slice.call(arguments,1));b.options.scrollbar&&b.options.scrollbar.enabled&&(b.options.scrollbar.vertical=!b.horiz,b.options.startOnTick=b.options.endOnTick=!1,b.scrollbar=new E(b.chart.renderer,b.options.scrollbar,b.chart),B(b.scrollbar,"changed",function(a){var d=Math.min(e(b.options.min,b.min),b.min,b.dataMin),c=Math.max(e(b.options.max,b.max),b.max,b.dataMax)-d,f;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(f=d+c*this.to,d+=c*this.from):(f=d+c*(1-this.from),d+=c*(1- this.to));b.setExtremes(d,f,!0,!1,a)}))});p(F.prototype,"render",function(a){var b=Math.min(e(this.options.min,this.min),this.min,this.dataMin),d=Math.max(e(this.options.max,this.max),this.max,this.dataMax),f=this.scrollbar,c=this.titleOffset||0;a.apply(this,Array.prototype.slice.call(arguments,1));if(f){this.horiz?(f.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:c+this.axisTitleMargin+this.offset),this.width,this.height),c=1):(f.position(this.left+this.width+ 2+this.chart.scrollbarsOffsets[0]+(this.opposite?c+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),c=0);if(!this.opposite&&!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[c]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(b)||isNaN(d)||!h(this.min)||!h(this.max)?f.setRange(0,0):(c=(this.min-b)/(d-b),b=(this.max-b)/(d-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?f.setRange(c,b):f.setRange(1-b,1-c))}});p(F.prototype,"getOffset",function(a){var b= this.horiz?2:1,d=this.scrollbar;a.apply(this,Array.prototype.slice.call(arguments,1));d&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[b]+=d.size+d.options.margin)});p(F.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());a.apply(this,Array.prototype.slice.call(arguments,1))});a.Scrollbar=E})(L);(function(a){function E(a){this.init(a)}var B=a.addEvent,F=a.Axis,D=a.Chart,n=a.color,h=a.defaultOptions,u=a.defined,r=a.destroyObjectProperties,x=a.doc,t= a.each,m=a.erase,f=a.error,g=a.extend,e=a.grep,d=a.hasTouch,p=a.isNumber,b=a.isObject,A=a.merge,v=a.pick,H=a.removeEvent,q=a.Scrollbar,J=a.Series,c=a.seriesTypes,w=a.wrap,K=a.swapXY,y=[].concat(a.defaultDataGroupingUnits),G=function(a){var b=e(arguments,p);if(b.length)return Math[a].apply(0,b)};y[4]=["day",[1,2,3,4]];y[5]=["week",[1,2,3]];c=void 0===c.areaspline?"line":"areaspline";g(h,{navigator:{height:40,margin:25,maskInside:!0,handles:{backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:n("#6685c2").setOpacity(.3).get(), outlineColor:"#cccccc",outlineWidth:1,series:{type:c,color:"#335cad",fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:y},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,shadow:!1,threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200, labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});E.prototype={drawHandle:function(a,b,c,d){this.handles[b][d](c?{translateX:Math.round(this.left+this.height/2-8),translateY:Math.round(this.top+parseInt(a,10)+.5)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+ this.height/2-8)})},getHandlePath:function(a){return K(["M",-4.5,.5,"L",3.5,.5,"L",3.5,15.5,"L",-4.5,15.5,"L",-4.5,.5,"M",-1.5,4,"L",-1.5,12,"M",.5,4,"L",.5,12],a)},drawOutline:function(a,b,c,d){var e=this.navigatorOptions.maskInside,f=this.outline.strokeWidth(),l=f/2,f=f%2/2,k=this.outlineHeight,g=this.scrollbarHeight,h=this.size,m=this.left-g,n=this.top;c?(m-=l,c=n+b+f,b=n+a+f,a=["M",m+k,n-g-f,"L",m+k,c,"L",m,c,"L",m,b,"L",m+k,b,"L",m+k,n+h+g].concat(e?["M",m+k,c-l,"L",m+k,b+l]:[])):(a+=m+g-f,b+= m+g-f,n+=l,a=["M",m,n,"L",a,n,"L",a,n+k,"L",b,n+k,"L",b,n,"L",m+h+2*g,n].concat(e?["M",a-l,n,"L",b+l,n]:[]));this.outline[d]({d:a})},drawMasks:function(a,b,c,d){var e=this.left,f=this.top,l=this.height,k,g,h,m;c?(h=[e,e,e],m=[f,f+a,f+b],g=[l,l,l],k=[a,b-a,this.size-b]):(h=[e,e+a,e+b],m=[f,f,f],g=[a,b-a,this.size-b],k=[l,l,l]);t(this.shades,function(a,b){a[d]({x:h[b],y:m[b],width:g[b],height:k[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,d=a.chart,e=d.inverted,f= d.renderer,g;a.navigatorGroup=g=f.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();var h={cursor:e?"ns-resize":"ew-resize"};t([!c,c,!c],function(c,d){a.shades[d]=f.rect().addClass("highcharts-navigator-mask"+(1===d?"-inside":"-outside")).attr({fill:c?b.maskFill:"rgba(0,0,0,0)"}).css(1===d&&h).add(g)});a.outline=f.path().addClass("highcharts-navigator-outline").attr({"stroke-width":b.outlineWidth,stroke:b.outlineColor}).add(g);t([0,1],function(c){a.handles[c]=f.path(a.getHandlePath(e)).attr({zIndex:7- c}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][c]).add(g);var d=b.handles;a.handles[c].attr({fill:d.backgroundColor,stroke:d.borderColor,"stroke-width":1}).css(h)})},update:function(a){this.destroy();A(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,b,c,d){var e=this.chart,f,l,k=this.scrollbarHeight,g,h=this.xAxis;f=h.fake?e.xAxis[0]:h;var m=this.navigatorEnabled,n,q=this.rendered;l=e.inverted;var r=e.xAxis[0].minRange; if(!this.hasDragged||u(c)){if(!p(a)||!p(b))if(q)c=0,d=h.width;else return;this.left=v(h.left,e.plotLeft+k+(l?e.plotWidth:0));this.size=n=g=v(h.len,(l?e.plotHeight:e.plotWidth)-2*k);e=l?k:g+2*k;c=v(c,h.toPixels(a,!0));d=v(d,h.toPixels(b,!0));p(c)&&Infinity!==Math.abs(c)||(c=0,d=e);a=h.toValue(c,!0);b=h.toValue(d,!0);if(Math.abs(b-a)=l&&(a=l-g,m=this.getUnionExtremes().dataMax),a!==e&&(this.fixedWidth=g,b=d.toFixedRange(a,a+g,null,m),c.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(a,b){this.chart.pointer.normalize(a);a=this.chart;var c=a.xAxis[0],d=a.inverted&&!c.reversed||!a.inverted&&c.reversed;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=d?c.min:c.max):(this.grabbedRight= !0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=d?c.max:c.min);a.fixedRange=null},onMouseMove:function(a){var b=this,c=b.chart,d=b.left,e=b.navigatorSize,f=b.range,l=b.dragOffset,g=c.inverted;a.touches&&0===a.touches[0].pageX||(a=c.pointer.normalize(a),c=a.chartX,g&&(d=b.top,c=a.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,c-d,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,c-d)):b.grabbedCenter&&(b.hasDragged=!0,ce+l-f&&(c=e+l-f),b.render(0, 0,c-l,c-l+f)),b.hasDragged&&b.scrollbar&&b.scrollbar.options.liveRedraw&&(a.DOMType=a.type,setTimeout(function(){b.onMouseUp(a)},0)))},onMouseUp:function(a){var b=this.chart,c=this.xAxis,d=this.scrollbar,e,f,l=a.DOMEvent||a;(!this.hasDragged||d&&d.hasDragged)&&"scrollbar"!==a.trigger||(this.zoomedMin===this.otherHandlePos?e=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(f=this.fixedExtreme),this.zoomedMax===this.size&&(f=this.getUnionExtremes().dataMax),c=c.toFixedRange(this.zoomedMin,this.zoomedMax, e,f),u(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),Math.max(c.min,c.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:l}));"mousemove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(t(this.eventsToUnbind,function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a= this.baseSeries||[];this.navigatorEnabled&&a[0]&&!1!==this.navigatorOptions.adaptToUpdatedData&&(t(a,function(a){H(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&H(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,c=b.navigator,d=c.enabled,e=b.scrollbar,f=e.enabled,b=d?c.height:0,l=f?e.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=l;this.scrollbarEnabled=f;this.navigatorEnabled=d;this.navigatorOptions= c;this.scrollbarOptions=e;this.outlineHeight=b+l;this.opposite=v(c.opposite,!d&&a.inverted);var g=this,e=g.baseSeries,f=a.xAxis.length,h=a.yAxis.length,m=e&&e[0]&&e[0].xAxis||a.xAxis[0];a.extraMargin={type:g.opposite?"plotTop":"marginBottom",value:(d||!a.inverted?g.outlineHeight:0)+c.margin};a.inverted&&(a.extraMargin.type=g.opposite?"marginRight":"plotLeft");a.isDirtyBox=!0;g.navigatorEnabled?(g.xAxis=new F(a,A({breaks:m.options.breaks,ordinal:m.options.ordinal},c.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis", isX:!0,type:"datetime",index:f,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[l,0,-l,0],width:b}:{offsets:[0,-l,0,l],height:b})),g.yAxis=new F(a,A(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:h,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),e||c.series.data?g.addBaseSeries():0===a.series.length&&w(a,"redraw",function(b,c){0=Math.round(a.size);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){B(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min, b.max)})},destroy:function(){this.removeEvents();this.xAxis&&(m(this.chart.xAxis,this.xAxis),m(this.chart.axes,this.xAxis));this.yAxis&&(m(this.chart.yAxis,this.yAxis),m(this.chart.axes,this.yAxis));t(this.series||[],function(a){a.destroy&&a.destroy()});t("series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" "),function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);t([this.handles],function(a){r(a)},this)}}; a.Navigator=E;w(F.prototype,"zoom",function(a,b,c){var d=this.chart,e=d.options,f=e.chart.zoomType,g=e.navigator,e=e.rangeSelector,k;this.isXAxis&&(g&&g.enabled||e&&e.enabled)&&("x"===f?d.resetZoomButton="blocked":"y"===f?k=!1:"xy"===f&&(d=this.previousZoom,u(b)?this.previousZoom=[this.min,this.max]:d&&(b=d[0],c=d[1],delete this.previousZoom)));return void 0!==k?k:a.call(this,b,c)});w(D.prototype,"init",function(a,b,c){B(this,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller= this.navigator=new E(this)});a.call(this,b,c)});w(D.prototype,"setChartSize",function(a){var b=this.legend,c=this.navigator,d,e,f,g;a.apply(this,[].slice.call(arguments,1));c&&(e=b.options,f=c.xAxis,g=c.yAxis,d=c.scrollbarHeight,this.inverted?(c.left=c.opposite?this.chartWidth-d-c.height:this.spacing[3]+d,c.top=this.plotTop+d):(c.left=this.plotLeft+d,c.top=c.navigatorOptions.top||this.chartHeight-c.height-d-this.spacing[2]-("bottom"===e.verticalAlign&&e.enabled&&!e.floating?b.legendHeight+v(e.margin, 10):0)),f&&g&&(this.inverted?f.options.left=g.options.left=c.left:f.options.top=g.options.top=c.top,f.setAxisSize(),g.setAxisSize()))});w(J.prototype,"addPoint",function(a,c,d,e,g){var k=this.options.turboThreshold;k&&this.xData.length>k&&b(c,!0)&&this.chart.navigator&&f(20,!0);a.call(this,c,d,e,g)});w(D.prototype,"addSeries",function(a,b,c,d){a=a.call(this,b,!1,d);this.navigator&&this.navigator.setBaseSeries();v(c,!0)&&this.redraw();return a});w(J.prototype,"update",function(a,b,c){a.call(this,b, !1);this.chart.navigator&&this.chart.navigator.setBaseSeries();v(c,!0)&&this.chart.redraw()});D.prototype.callbacks.push(function(a){var b=a.navigator;b&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))})})(L);(function(a){function E(a){this.init(a)}var B=a.addEvent,F=a.Axis,D=a.Chart,n=a.css,h=a.createElement,u=a.dateFormat,r=a.defaultOptions,x=r.global.useUTC,t=a.defined,m=a.destroyObjectProperties,f=a.discardElement,g=a.each,e=a.extend,d=a.fireEvent,p=a.Date,b=a.isNumber,A=a.merge,v=a.pick,H= a.pInt,q=a.splat,J=a.wrap;e(r,{rangeSelector:{buttonTheme:{"stroke-width":0,width:28,height:18,padding:2,zIndex:7},height:35,inputPosition:{align:"right"},labelStyle:{color:"#666666"}}});r.lang=A(r.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});E.prototype={clickButton:function(a,d){var c=this,e=c.chart,f=c.buttonOptions[a],h=e.xAxis[0],m=e.scroller&&e.scroller.getUnionExtremes()||h||{},k=m.dataMin,n=m.dataMax,p,r=h&&Math.round(Math.min(h.max,v(n,h.max))),t=f.type, u,m=f._range,w,C,A,D=f.dataGrouping;if(null!==k&&null!==n){e.fixedRange=m;D&&(this.forcedDataGrouping=!0,F.prototype.setDataGrouping.call(h||{chart:this.chart},D,!1));if("month"===t||"year"===t)h?(t={range:f,max:r,dataMin:k,dataMax:n},p=h.minFromRange.call(t),b(t.newMax)&&(r=t.newMax)):m=f;else if(m)p=Math.max(r-m,k),r=Math.min(p+m,n);else if("ytd"===t)if(h)void 0===n&&(k=Number.MAX_VALUE,n=Number.MIN_VALUE,g(e.series,function(a){a=a.xData;k=Math.min(a[0],k);n=Math.max(a[a.length-1],n)}),d=!1),r= c.getYTDExtremes(n,k,x),p=w=r.min,r=r.max;else{B(e,"beforeRender",function(){c.clickButton(a)});return}else"all"===t&&h&&(p=k,r=n);c.setSelected(a);h?h.setExtremes(p,r,v(d,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:f}):(u=q(e.options.xAxis)[0],A=u.range,u.range=m,C=u.min,u.min=w,B(e,"load",function(){u.range=A;u.min=C}))}},setSelected:function(a){this.selected=this.options.selected=a},defaultButtons:[{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"}],init:function(a){var b=this,c=a.options.rangeSelector,e=c.buttons||[].concat(b.defaultButtons),f=c.selected,h=function(){var a=b.minInput,c=b.maxInput;a&&a.blur&&d(a,"blur");c&&c.blur&&d(c,"blur")};b.chart=a;b.options=c;b.buttons=[];a.extraTopMargin=c.height;b.buttonOptions=e;this.unMouseDown=B(a.container,"mousedown",h);this.unResize=B(a,"resize",h);g(e,b.computeButtonRange);void 0!==f&&e[f]&&this.clickButton(f, !1);B(a,"load",function(){B(a.xAxis[0],"setExtremes",function(c){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==c.trigger&&"updatedData"!==c.trigger&&b.forcedDataGrouping&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this.chart,d=a.xAxis[0],e=Math.round(d.max-d.min),f=!d.hasVisibleSeries,a=a.scroller&&a.scroller.getUnionExtremes()||d,h=a.dataMin,l=a.dataMax,a=this.getYTDExtremes(l,h,x),m=a.min,k=a.max,n=this.selected,p=b(n),q=this.options.allButtonsEnabled,r=this.buttons; g(this.buttonOptions,function(a,b){var c=a._range,g=a.type,t=a.count||1;a=r[b];var u=0;b=b===n;var w=c>l-h,v=c=864E5*{month:28,year:365}[g]*t&&e<=864E5*{month:31,year:366}[g]*t?c=!0:"ytd"===g?(c=k-m===e,x=!b):"all"===g&&(c=d.max-d.min>=l-h,y=!b&&p&&c);g=!q&&(w||v||y||f);c=b&&c||c&&!p&&!x;g?u=3:c&&(p=!0,u=2);a.state!==u&&a.setState(u)})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5, day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,d=this[a+"Input"];t(b)&&(d.previousValue=d.HCTime,d.HCTime=b);d.value=u(c.inputEditDateFormat||"%Y-%m-%d",d.HCTime);this[a+"DateBox"].attr({text:u(c.inputDateFormat||"%b %e, %Y",d.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];n(this[a+"Input"],{left:b.translateX+c.x+"px",top:b.translateY+ "px",width:c.width-2+"px",height:c.height-2+"px",border:"2px solid silver"})},hideInput:function(a){n(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(a){function c(){var a=q.value,c=(m.inputDateParser||Date.parse)(a),e=f.xAxis[0],g=f.scroller&&f.scroller.xAxis?f.scroller.xAxis:e,k=g.dataMin,g=g.dataMax;c!==q.previousValue&&(q.previousValue=c,b(c)||(c=a.split("-"),c=Date.UTC(H(c[0]),H(c[1])-1,H(c[2]))),b(c)&&(x||(c+=6E4*(new Date).getTimezoneOffset()), p?c>d.maxInput.HCTime?c=void 0:cg&&(c=g),void 0!==c&&e.setExtremes(p?c:e.min,p?e.max:c,void 0,void 0,{trigger:"rangeSelectorInput"})))}var d=this,f=d.chart,g=f.renderer.style||{},l=f.renderer,m=f.options.rangeSelector,k=d.div,p="min"===a,q,t,u=this.inputGroup;this[a+"Label"]=t=l.label(r.lang[p?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(u);u.offset+=t.width+5;this[a+"DateBox"]=l=l.label("", u.offset).addClass("highcharts-range-input").attr({padding:2,width:m.inputBoxWidth||90,height:m.inputBoxHeight||17,stroke:m.inputBoxBorderColor||"#cccccc","stroke-width":1,"text-align":"center"}).on("click",function(){d.showInput(a);d[a+"Input"].focus()}).add(u);u.offset+=l.width+(p?10:0);this[a+"Input"]=q=h("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:f.plotTop+"px"},k);t.css(A(g,m.labelStyle));l.css(A({color:"#333333"},g,m.inputStyle));n(q,e({position:"absolute",border:0, width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:g.fontSize,fontFamily:g.fontFamily,left:"-9em"},m.inputStyle));q.onfocus=function(){d.showInput(a)};q.onblur=function(){d.hideInput(a)};q.onchange=c;q.onkeypress=function(a){13===a.keyCode&&c()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a=v((b.buttonPosition||{}).y,a.plotTop-a.axisOffset[0]-b.height);return{buttonTop:a,inputTop:a-10}},getYTDExtremes:function(a,b,d){var c=new p(a),e=c[p.hcGetFullYear]();d=d?p.UTC(e, 0,1):+new p(e,0,1);b=Math.max(b||0,d);c=c.getTime();return{max:Math.min(a||c,c),min:b}},render:function(a,b){var c=this,d=c.chart,f=d.renderer,l=d.container,m=d.options,k=m.exporting&&!1!==m.exporting.enabled&&m.navigation&&m.navigation.buttonOptions,n=m.rangeSelector,p=c.buttons,m=r.lang,q=c.div,q=c.inputGroup,u=n.buttonTheme,w=n.buttonPosition||{},x=n.inputEnabled,C=u&&u.states,A=d.plotLeft,B,D=this.getPosition(),E=c.group,F=c.rendered;!1!==n.enabled&&(F||(c.group=E=f.g("range-selector-buttons").add(), c.zoomText=f.text(m.rangeSelectorZoom,v(w.x,A),15).css(n.labelStyle).add(E),B=v(w.x,A)+c.zoomText.getBBox().width+5,g(c.buttonOptions,function(a,b){p[b]=f.button(a.text,B,0,function(){c.clickButton(b);c.isActive=!0},u,C&&C.hover,C&&C.select,C&&C.disabled).attr({"text-align":"center"}).add(E);B+=p[b].width+v(n.buttonSpacing,5)}),!1!==x&&(c.div=q=h("div",null,{position:"relative",height:0,zIndex:1}),l.parentNode.insertBefore(q,l),c.inputGroup=q=f.g("input-group").add(),q.offset=0,c.drawInput("min"), c.drawInput("max"))),c.updateButtonStates(),E[F?"animate":"attr"]({translateY:D.buttonTop}),!1!==x&&(q.align(e({y:D.inputTop,width:q.offset,x:k&&D.inputTop<(k.y||0)+k.height-d.spacing[0]?-40:0},n.inputPosition),!0,d.spacingBox),t(x)||(d=E.getBBox(),q[q.alignAttr.translateXe&&(f?a=d-c:d=a+c);b(a)||(a=d=void 0); return{min:a,max:d}};F.prototype.minFromRange=function(){var a=this.range,d={month:"Month",year:"FullYear"}[a.type],e,f=this.max,g,h,m=function(a,b){var c=new Date(a),e=c["get"+d]();c["set"+d](e+b);e===c["get"+d]()&&c.setDate(0);return c.getTime()-a};b(a)?(e=f-a,h=a):(e=f+m(f,-a.count),this.chart&&(this.chart.fixedRange=f-e));g=v(this.dataMin,Number.MIN_VALUE);b(e)||(e=g);e<=g&&(e=g,void 0===h&&(h=m(e,a.count)),this.newMax=Math.min(e+h,this.dataMax));b(f)||(e=void 0);return e};J(D.prototype,"init", function(a,b,d){B(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new E(this))});a.call(this,b,d)});D.prototype.callbacks.push(function(a){function c(){d=a.xAxis[0].getExtremes();b(d.min)&&e.render(d.min,d.max)}var d,e=a.rangeSelector,f,g;e&&(g=B(a.xAxis[0],"afterSetExtremes",function(a){e.render(a.min,a.max)}),f=B(a,"redraw",c),c());B(a,"destroy",function(){e&&(f(),g())})});a.RangeSelector=E})(L);(function(a){var E=a.arrayMax,B=a.arrayMin,F=a.Axis,D=a.Chart,n=a.defined, h=a.each,u=a.extend,r=a.format,x=a.grep,t=a.inArray,m=a.isNumber,f=a.isString,g=a.map,e=a.merge,d=a.pick,p=a.Point,b=a.Renderer,A=a.Series,v=a.splat,H=a.SVGRenderer,q=a.VMLRenderer,J=a.wrap,c=A.prototype,w=c.init,K=c.processData,y=p.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(b,c,h){var k=f(b)||b.nodeName,l=arguments[k?1:0],m=l.series,n=a.getOptions(),p,q=d(l.navigator&&l.navigator.enabled,n.navigator.enabled,!0),r=q?{startOnTick:!1,endOnTick:!1}:null,t={marker:{enabled:!1,radius:2}}, u={shadow:!1,borderWidth:0};l.xAxis=g(v(l.xAxis||{}),function(a){return e({minPadding:0,maxPadding:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},n.xAxis,a,{type:"datetime",categories:null},r)});l.yAxis=g(v(l.yAxis||{}),function(a){p=d(a.opposite,!0);return e({labels:{y:-2},opposite:p,showLastLabel:!1,title:{text:null}},n.yAxis,a)});l.series=null;l=e({chart:{panning:!0,pinchType:"x"},navigator:{enabled:q},scrollbar:{enabled:d(n.scrollbar.enabled,!0)},rangeSelector:{enabled:d(n.rangeSelector.enabled, !0)},title:{text:null},tooltip:{shared:!0,crosshairs:!0},legend:{enabled:!1},plotOptions:{line:t,spline:t,area:t,areaspline:t,arearange:t,areasplinerange:t,column:u,columnrange:u,candlestick:u,ohlc:u}},l,{isStock:!0});l.series=m;return k?new D(b,l,h):new D(l,c)};J(F.prototype,"autoLabelAlign",function(a){var b=this.chart,c=this.options,b=b._labelPanes=b._labelPanes||{},d=this.options.labels;return this.chart.options.isStock&&"yAxis"===this.coll&&(c=c.top+","+c.height,!b[c]&&d.enabled)?(15===d.x&& (d.x=0),void 0===d.align&&(d.align="right"),b[c]=this,"right"):a.call(this,[].slice.call(arguments,1))});J(F.prototype,"destroy",function(a){var b=this.chart,c=this.options&&this.options.top+","+this.options.height;c&&b._labelPanes&&b._labelPanes[c]===this&&delete b._labelPanes[c];return a.call(this,Array.prototype.slice.call(arguments,1))});J(F.prototype,"getPlotLinePath",function(b,c,e,k,p,q){var l=this,r=this.isLinked&&!this.series?this.linkedParent.series:this.series,u=l.chart,v=u.renderer,w= l.left,x=l.top,z,y,A,B,G=[],D=[],E,I;if("xAxis"!==l.coll&&"yAxis"!==l.coll)return b.apply(this,[].slice.call(arguments,1));D=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=l.options[b];return m(a)?[u[b][a]]:f(a)?[u.get(a)]:g(r,function(a){return a[b]})}(l.coll);h(l.isXAxis?u.yAxis:u.xAxis,function(a){if(n(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=n(a.options[b])?u[b][a.options[b]]:u[b][0];l===b&&D.push(a)}});E=D.length?[]:[l.isXAxis?u.yAxis[0]:u.xAxis[0]]; h(D,function(b){-1!==t(b,E)||a.find(E,function(a){return a.pos===b.pos&&a.len&&b.len})||E.push(b)});I=d(q,l.translate(c,null,null,k));m(I)&&(l.horiz?h(E,function(a){var b;y=a.pos;B=y+a.len;z=A=Math.round(I+l.transB);if(zw+l.width)p?z=A=Math.min(Math.max(w,z),w+l.width):b=!0;b||G.push("M",z,y,"L",A,B)}):h(E,function(a){var b;z=a.pos;A=z+a.len;y=B=Math.round(x+l.height-I);if(yx+l.height)p?y=B=Math.min(Math.max(x,y),l.top+l.height):b=!0;b||G.push("M",z,y,"L",A,B)}));return 0=f&&(x=-(m.translateX+b.width-f));m.attr({x:p+x,y:l,anchorX:h?p:this.opposite?0:a.chartWidth,anchorY:h?this.opposite?a.chartHeight:0:l+b.height/2})}});c.init=function(){w.apply(this,arguments);this.setCompare(this.options.compare)};c.setCompare=function(a){this.modifyValue="value"=== a||"percent"===a?function(b,c){var d=this.compareValue;if(void 0!==b&&void 0!==d)return b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};c.processData=function(){var a,b=-1,c,d,e,f;K.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,e=d.length,this.pointArrayMap&&(b=t("close",this.pointArrayMap),-1===b&&(b=t(this.pointValKey||"y",this.pointArrayMap))), a=0;a=this.xAxis.min&&0!==f){this.compareValue=f;break}};J(c,"getExtremes",function(a){var b;a.apply(this,[].slice.call(arguments,1));this.modifyValue&&(b=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)],this.dataMin=B(b),this.dataMax=E(b))});F.prototype.setCompare=function(a,b){this.isXAxis||(h(this.series,function(b){b.setCompare(a)}),d(b,!0)&&this.chart.redraw())};p.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}", (0