From ef2b414b8beee8c7cc170bc52f5548e6f8e2d694 Mon Sep 17 00:00:00 2001 From: Prakriti-nith Date: Mon, 30 Jul 2018 02:15:25 +0530 Subject: [PATCH] changed path for jspdf.min.js --- .../javascripts}/googlecharts_js/jspdf.min.js | 0 .../adapters/js/highcharts_js/js/highstock.js | 515 ------------------ .../view/adapters/js/highcharts_js/js/map.js | 68 --- .../js/highcharts_js/maps/custom/europe.js | 2 - lib/tasks/google_charts.rake | 4 +- 5 files changed, 2 insertions(+), 587 deletions(-) rename lib/{daru/view/adapters/js => assets/javascripts}/googlecharts_js/jspdf.min.js (100%) delete mode 100644 lib/daru/view/adapters/js/highcharts_js/js/highstock.js delete mode 100644 lib/daru/view/adapters/js/highcharts_js/js/map.js delete mode 100644 lib/daru/view/adapters/js/highcharts_js/maps/custom/europe.js diff --git a/lib/daru/view/adapters/js/googlecharts_js/jspdf.min.js b/lib/assets/javascripts/googlecharts_js/jspdf.min.js similarity index 100% rename from lib/daru/view/adapters/js/googlecharts_js/jspdf.min.js rename to lib/assets/javascripts/googlecharts_js/jspdf.min.js diff --git a/lib/daru/view/adapters/js/highcharts_js/js/highstock.js b/lib/daru/view/adapters/js/highcharts_js/js/highstock.js deleted file mode 100644 index 5b6f38a..0000000 --- a/lib/daru/view/adapters/js/highcharts_js/js/highstock.js +++ /dev/null @@ -1,515 +0,0 @@ -/* - Highstock JS v6.1.0 (2018-04-13) - - (c) 2009-2016 Torstein Honsi - - License: www.highcharts.com/license -*/ -(function(U,K){"object"===typeof module&&module.exports?module.exports=U.document?K(U):K:U.Highcharts=K(U)})("undefined"!==typeof window?window:this,function(U){var K=function(){var a="undefined"===typeof U?window:U,F=a.document,G=a.navigator&&a.navigator.userAgent||"",H=F&&F.createElementNS&&!!F.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,r=/(edge|msie|trident)/i.test(G)&&!a.opera,k=-1!==G.indexOf("Firefox"),f=-1!==G.indexOf("Chrome"),u=k&&4>parseInt(G.split("Firefox/")[1], -10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highstock",version:"6.1.0",deg2rad:2*Math.PI/360,doc:F,hasBidiBug:u,hasTouch:F&&void 0!==F.documentElement.ontouchstart,isMS:r,isWebKit:-1!==G.indexOf("AppleWebKit"),isFirefox:k,isChrome:f,isSafari:!f&&-1!==G.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(G),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:H,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){}, -charts:[]}}();(function(a){a.timers=[];var F=a.charts,G=a.doc,H=a.win;a.error=function(r,k){r=a.isNumber(r)?"Highcharts error #"+r+": www.highcharts.com/errors/"+r:r;if(k)throw Error(r);H.console&&console.log(r)};a.Fx=function(a,k,f){this.options=k;this.elem=a;this.prop=f};a.Fx.prototype={dSetter:function(){var a=this.paths[0],k=this.paths[1],f=[],u=this.now,y=a.length,v;if(1===u)f=this.toD;else if(y===k.length&&1>u)for(;y--;)v=parseFloat(a[y]),f[y]=isNaN(v)?k[y]:u*parseFloat(k[y]-v)+v;else f=k;this.elem.attr("d", -f,null,!0)},update:function(){var a=this.elem,k=this.prop,f=this.now,u=this.options.step;if(this[k+"Setter"])this[k+"Setter"]();else a.attr?a.element&&a.attr(k,f,null,!0):a.style[k]=f+this.unit;u&&u.call(a,f,this)},run:function(r,k,f){var u=this,y=u.options,v=function(a){return v.stopped?!1:u.step(a)},q=H.requestAnimationFrame||function(a){setTimeout(a,13)},d=function(){for(var c=0;c=q+this.startTime?(this.now=this.end,this.pos=1,this.update(),f=d[this.prop]=!0,a.objectEach(d,function(a){!0!== -a&&(f=!1)}),f&&v&&v.call(y),r=!1):(this.pos=u.easing((k-this.startTime)/q),this.now=this.start+(this.end-this.start)*this.pos,this.update(),r=!0);return r},initPath:function(r,k,f){function u(a){var b,c;for(l=a.length;l--;)b="M"===a[l]||"L"===a[l],c=/[a-zA-Z]/.test(a[l+3]),b&&c&&a.splice(l+1,0,a[l+1],a[l+2],a[l+1],a[l+2])}function y(a,b){for(;a.lengtha&&-Infinity=f&&(k=[1/f])));for(u=0;u=r|| -!y&&v<=(k[u]+(k[u+1]||k[u]))/2);u++);return q=a.correctFloat(q*f,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,k){var f=a.length,u,y;for(y=0;yf&&(f=a[k]);return f};a.destroyObjectProperties=function(r,k){a.objectEach(r,function(a, -u){a&&a!==k&&a.destroy&&a.destroy();delete r[u]})};a.discardElement=function(r){var k=a.garbageBin;k||(k=a.createElement("div"));r&&k.appendChild(r);k.innerHTML=""};a.correctFloat=function(a,k){return parseFloat(a.toPrecision(k||14))};a.setAnimation=function(r,k){k.renderer.globalAnimation=a.pick(r,k.options.chart.animation,!0)};a.animObject=function(r){return a.isObject(r)?a.merge(r):{duration:r?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5, -year:314496E5};a.numberFormat=function(r,k,f,u){r=+r||0;k=+k;var y=a.defaultOptions.lang,v=(r.toString().split(".")[1]||"").split("e")[0].length,q,d,c=r.toString().split("e");-1===k?k=Math.min(v,20):a.isNumber(k)?k&&c[1]&&0>c[1]&&(q=k+ +c[1],0<=q?(c[0]=(+c[0]).toExponential(q).split("e")[0],k=q):(c[0]=c[0].split(".")[0]||0,r=20>k?(c[0]*Math.pow(10,c[1])).toFixed(k):0,c[1]=0)):k=2;d=(Math.abs(c[1]?c[0]:r)+Math.pow(10,-Math.max(k,v)-1)).toFixed(k);v=String(a.pInt(d));q=3r?"-":"")+(q?v.substr(0,q)+u:"");r+=v.substr(q).replace(/(\d{3})(?=\d)/g,"$1"+u);k&&(r+=f+d.slice(-k));c[1]&&0!==+r&&(r+="e"+c[1]);return r};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(r,k,f){if("width"===k)return Math.min(r.offsetWidth,r.scrollWidth)-a.getStyle(r,"padding-left")-a.getStyle(r,"padding-right");if("height"===k)return Math.min(r.offsetHeight,r.scrollHeight)-a.getStyle(r,"padding-top")-a.getStyle(r, -"padding-bottom");H.getComputedStyle||a.error(27,!0);if(r=H.getComputedStyle(r,void 0))r=r.getPropertyValue(k),a.pick(f,"opacity"!==k)&&(r=a.pInt(r));return r};a.inArray=function(r,k,f){return(a.indexOfPolyfill||Array.prototype.indexOf).call(k,r,f)};a.grep=function(r,k){return(a.filterPolyfill||Array.prototype.filter).call(r,k)};a.find=Array.prototype.find?function(a,k){return a.find(k)}:function(a,k){var f,u=a.length;for(f=0;f>16,(f&65280)>>8,f&255,1]:4===k&&(y=[(f&3840)>>4|(f&3840)>>8,(f&240)>>4|f&240,(f&15)<<4|f&15,1])),!y)for(v=this.parsers.length;v--&& -!y;)q=this.parsers[v],(k=q.regex.exec(f))&&(y=q.parse(k));this.rgba=y||[]},get:function(a){var f=this.input,k=this.rgba,v;this.stops?(v=r(f),v.stops=[].concat(v.stops),F(this.stops,function(q,d){v.stops[d]=[v.stops[d][0],q.get(a)]})):v=k&&G(k[0])?"rgb"===a||!a&&1===k[3]?"rgb("+k[0]+","+k[1]+","+k[2]+")":"a"===a?k[3]:"rgba("+k.join(",")+")":f;return v},brighten:function(a){var f,y=this.rgba;if(this.stops)F(this.stops,function(f){f.brighten(a)});else if(G(a)&&0!==a)for(f=0;3>f;f++)y[f]+=k(255*a),0> -y[f]&&(y[f]=0),255b.width)b={width:0,height:0}}else b=this.htmlGetBBox();A.isSVG&&(a=b.width,A=b.height,c&&"11px"===c.fontSize&&17===Math.round(A)&& -(b.height=A=14),e&&(b.width=Math.abs(A*Math.sin(C))+Math.abs(a*Math.cos(C)),b.height=Math.abs(A*Math.cos(C))+Math.abs(a*Math.sin(C))));if(L&&0]*>/g,"").replace(/</g,"\x3c").replace(/>/g,"\x3e")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&& -this.renderer.buildText(this))},fillSetter:function(a,g,e){"string"===typeof a?e.setAttribute(g,a):a&&this.complexColor(a,g,e)},visibilitySetter:function(a,g,e){"inherit"===a?e.removeAttribute(g):this[g]!==a&&e.setAttribute(g,a);this[g]=a},zIndexSetter:function(a,g){var e=this.renderer,b=this.parentGroup,A=(b||e).element||e.box,m,c=this.element,h,x,e=A===e.box;m=this.added;var l;q(a)&&(c.zIndex=a,a=+a,this[g]===a&&(m=!1),this[g]=a);if(m){(a=this.zIndex)&&b&&(b.handleZ=!0);g=A.childNodes;for(l=g.length- -1;0<=l&&!h;l--)if(b=g[l],m=b.zIndex,x=!q(m),b!==c)if(0>a&&x&&!e&&!l)A.insertBefore(c,g[l]),h=!0;else if(C(m)<=a||x&&(!q(a)||0<=a))A.insertBefore(c,g[l+1]||null),h=!0;h||(A.insertBefore(c,g[e?3:0]||null),h=!0)}return h},_defaultSetter:function(a,g,e){e.setAttribute(g,a)}});F.prototype.yGetter=F.prototype.xGetter;F.prototype.translateXSetter=F.prototype.translateYSetter=F.prototype.rotationSetter=F.prototype.verticalAlignSetter=F.prototype.rotationOriginXSetter=F.prototype.rotationOriginYSetter=F.prototype.scaleXSetter= -F.prototype.scaleYSetter=F.prototype.matrixSetter=function(a,g){this[g]=a;this.doTransform=!0};G=a.SVGRenderer=function(){this.init.apply(this,arguments)};n(G.prototype,{Element:F,SVG_NS:V,init:function(a,g,e,b,A,C){var m;b=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});m=b.element;a.appendChild(m);k(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&k(m,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=m;this.boxWrapper=b;this.alignedObjects=[];this.url=(t||D)&&z.getElementsByTagName("base").length? -O.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(z.createTextNode("Created with Highstock 6.1.0"));this.defs=this.createElement("defs").add();this.allowHTML=C;this.forExport=A;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(g,e,!1);var c;t&&a.getBoundingClientRect&&(g=function(){y(a,{left:0,top:0});c=a.getBoundingClientRect();y(a,{left:Math.ceil(c.left)- -c.left+"px",top:Math.ceil(c.top)-c.top+"px"})},g(),this.unSubPixelFix=H(O,"resize",g))},definition:function(a){function g(a,b){var C;p(A(a),function(a){var A=e.createElement(a.tagName),m={};J(a,function(a,g){"tagName"!==g&&"children"!==g&&"textContent"!==g&&(m[g]=a)});A.attr(m);A.add(b||e.defs);a.textContent&&A.element.appendChild(z.createTextNode(a.textContent));g(a.children||[],A);C=A});return C}var e=this;return g(a)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a= -this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();c(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var g=new this.Element;g.init(this,a);return g},draw:x,getRadialAttr:function(a,g){return{cx:a[0]-a[2]/2+g.cx*a[2],cy:a[1]-a[2]/2+g.cy*a[2],r:g.r*a[2]}},getSpanWidth:function(a){return a.getBBox(!0).width},applyEllipsis:function(a,g,e,b){var A=a.rotation,C=e,m,c=0,h= -e.length,x=function(a){g.removeChild(g.firstChild);a&&g.appendChild(z.createTextNode(a))},l;a.rotation=0;C=this.getSpanWidth(a,g);if(l=C>b){for(;c<=h;)m=Math.ceil((c+h)/2),C=e.substring(0,m)+"\u2026",x(C),C=this.getSpanWidth(a,g),c===h?c=h+1:C>b?h=m-1:c=m;0===h&&x("")}a.rotation=A;return l},escapes:{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;","'":"\x26#39;",'"':"\x26quot;"},buildText:function(a){var e=a.element,b=this,A=b.forExport,m=g(a.textStr,"").toString(),c=-1!==m.indexOf("\x3c"),h=e.childNodes, -x,d=k(e,"x"),n=a.styles,D=a.textWidth,t=n&&n.lineHeight,L=n&&n.textOutline,w=n&&"ellipsis"===n.textOverflow,P=n&&"nowrap"===n.whiteSpace,I,B=h.length,q=D&&!a.added&&this.box,f=function(a){return t?C(t):b.fontMetrics(void 0,a.getAttribute("style")?a:e).h},v=function(a,g){J(b.escapes,function(e,b){g&&-1!==E(e,g)||(a=a.toString().replace(new RegExp(e,"g"),b))});return a},N=function(a,g){var e;e=a.indexOf("\x3c");a=a.substring(e,a.indexOf("\x3e")-e);e=a.indexOf(g+"\x3d");if(-1!==e&&(e=e+g.length+1,g= -a.charAt(e),'"'===g||"'"===g))return a=a.substring(e+1),a.substring(0,a.indexOf(g))},n=[m,w,P,t,L,n&&n.fontSize,D].join();if(n!==a.textCache){for(a.textCache=n;B--;)e.removeChild(h[B]);c||L||w||D||-1!==m.indexOf(" ")?(q&&q.appendChild(e),m=c?m.replace(/<(b|strong)>/g,'\x3cspan class\x3d"highcharts-strong"\x3e').replace(/<(i|em)>/g,'\x3cspan class\x3d"highcharts-emphasized"\x3e').replace(//g,"\x3c/span\x3e").split(//g):[m],m=l(m,function(a){return""!== -a}),p(m,function(g,C){var m,c=0;g=g.replace(/^\s+|\s+$/g,"").replace(//g,"\x3c/span\x3e|||");m=g.split("|||");p(m,function(g){if(""!==g||1===m.length){var h={},l=z.createElementNS(b.SVG_NS,"tspan"),n,t;(n=N(g,"class"))&&k(l,"class",n);if(n=N(g,"style"))n=n.replace(/(;| |^)color([ :])/,"$1fill$2"),k(l,"style",n);(t=N(g,"href"))&&!A&&(k(l,"onclick",'location.href\x3d"'+t+'"'),k(l,"class","highcharts-anchor"));g=v(g.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!== -g){l.appendChild(z.createTextNode(g));c?h.dx=0:C&&null!==d&&(h.x=d);k(l,h);e.appendChild(l);!c&&I&&(!X&&A&&y(l,{display:"block"}),k(l,"dy",f(l)));if(D){h=g.replace(/([^\^])-/g,"$1- ").split(" ");t=1D,void 0===x&&(x=g),g&&1!==h.length?(l.removeChild(l.firstChild),L.unshift(h.pop())):(h=L,L=[],h.length&&!P&&(l=z.createElementNS(V,"tspan"), -k(l,{dy:B,x:d}),n&&k(l,"style",n),e.appendChild(l)),E>D&&(D=E)),h.length&&l.appendChild(z.createTextNode(h.join(" ").replace(/- /g,"-")));a.rotation=p}c++}}});I=I||e.childNodes.length}),x&&a.attr("title",v(a.textStr,["\x26lt;","\x26gt;"])),q&&q.removeChild(e),L&&a.applyTextOutline&&a.applyTextOutline(L)):e.appendChild(z.createTextNode(v(m)))}},getContrast:function(a){a=u(a).rgba;return 510Math.abs(C.end-C.start-2*Math.PI));var x=Math.cos(m),n=Math.sin(m),D=Math.cos(l),l=Math.sin(l);C=.001>C.end-m-Math.PI?0:1;c=["M",a+c*x,e+h*n,"A",c,h,0,C,1,a+c*D,e+h*l];q(b)&&c.push(A?"M":"L",a+b*D,e+b*l,"A",b,b,0,C,0,a+b*x,e+b*n);c.push(A?"":"Z");return c},callout:function(a,g,e,b,A){var C=Math.min(A&&A.r||0,e,b),m=C+6,c=A&&A.anchorX;A=A&&A.anchorY;var h; -h=["M",a+C,g,"L",a+e-C,g,"C",a+e,g,a+e,g,a+e,g+C,"L",a+e,g+b-C,"C",a+e,g+b,a+e,g+b,a+e-C,g+b,"L",a+C,g+b,"C",a,g+b,a,g+b,a,g+b-C,"L",a,g+C,"C",a,g,a,g,a+C,g];c&&c>e?A>g+m&&Ac?A>g+m&&Ab&&c>a+m&&cA&&c>a+m&&ca?a+3:Math.round(1.2*a);return{h:g,b:Math.round(.8*g),f:a}},rotCorr:function(a,g,e){var b=a;g&&e&&(b=Math.max(b*Math.cos(g*d),4));return{x:-a/3*Math.sin(g*d),y:b}},label:function(g,b,A,C,m,c,h,l,x){var D=this,d=D.g("button"!== -x&&"label"),t=d.text=D.text("",0,0,h).attr({zIndex:1}),L,w,E=0,I=3,B=0,z,J,f,X,k,v={},y,V=/^url\((.*?)\)$/.test(C),u=V,r,M,O,N;x&&d.addClass("highcharts-"+x);u=!0;r=function(){return L.strokeWidth()%2/2};M=function(){var a=t.element.style,g={};w=(void 0===z||void 0===J||k)&&q(t.textStr)&&t.getBBox();d.width=(z||w.width||0)+2*I+B;d.height=(J||w.height||0)+2*I;y=I+D.fontMetrics(a&&a.fontSize,t).b;u&&(L||(d.box=L=D.symbols[C]||V?D.symbol(C):D.rect(),L.addClass(("button"===x?"":"highcharts-label-box")+ -(x?" highcharts-"+x+"-box":"")),L.add(d),a=r(),g.x=a,g.y=(l?-y:0)+a),g.width=Math.round(d.width),g.height=Math.round(d.height),L.attr(n(g,v)),v={})};O=function(){var a=B+I,g;g=l?0:y;q(z)&&w&&("center"===k||"right"===k)&&(a+={center:.5,right:1}[k]*(z-w.width));if(a!==t.x||g!==t.y)t.attr("x",a),void 0!==g&&t.attr("y",g);t.x=a;t.y=g};N=function(a,g){L?L.attr(a,g):v[a]=g};d.onAdd=function(){t.add(d);d.attr({text:g||0===g?g:"",x:b,y:A});L&&q(m)&&d.attr({anchorX:m,anchorY:c})};d.widthSetter=function(g){z= -a.isNumber(g)?g:null};d.heightSetter=function(a){J=a};d["text-alignSetter"]=function(a){k=a};d.paddingSetter=function(a){q(a)&&a!==I&&(I=d.padding=a,O())};d.paddingLeftSetter=function(a){q(a)&&a!==B&&(B=a,O())};d.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==E&&(E=a,w&&d.attr({x:f}))};d.textSetter=function(a){void 0!==a&&t.textSetter(a);M();O()};d["stroke-widthSetter"]=function(a,g){a&&(u=!0);this["stroke-width"]=a;N(g,a)};d.rSetter=function(a,g){N(g,a)};d.anchorXSetter=function(a,g){m= -d.anchorX=a;N(g,Math.round(a)-r()-f)};d.anchorYSetter=function(a,g){c=d.anchorY=a;N(g,a-X)};d.xSetter=function(a){d.x=a;E&&(a-=E*((z||w.width)+2*I),d["forceAnimate:x"]=!0);f=Math.round(a);d.attr("translateX",f)};d.ySetter=function(a){X=d.y=Math.round(a);d.attr("translateY",X)};var G=d.css;return n(d,{css:function(a){if(a){var g={};a=e(a);p(d.textProps,function(e){void 0!==a[e]&&(g[e]=a[e],delete a[e])});t.css(g);"width"in g&&M()}return G.call(d,a)},getBBox:function(){return{width:w.width+2*I,height:w.height+ -2*I,x:w.x-I,y:w.y-I}},destroy:function(){P(d.element,"mouseenter");P(d.element,"mouseleave");t&&(t=t.destroy());L&&(L=L.destroy());F.prototype.destroy.call(d);d=D=M=O=N=null}})}});a.Renderer=G})(K);(function(a){var F=a.attr,G=a.createElement,H=a.css,r=a.defined,k=a.each,f=a.extend,u=a.isFirefox,y=a.isMS,v=a.isWebKit,q=a.pick,d=a.pInt,c=a.SVGRenderer,z=a.win,p=a.wrap;f(a.SVGElement.prototype,{htmlCss:function(a){var b=this.element;if(b=a&&"SPAN"===b.tagName&&a.width)delete a.width,this.textWidth=b, -this.htmlUpdateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=f(this.styles,a);H(this.element,a);return this},htmlGetBBox:function(){var a=this.element;return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.x||0,h=this.y||0,E=this.textAlign||"left",B={left:0,center:.5,right:1}[E],t=this.styles,I=t&&t.whiteSpace;H(b,{marginLeft:this.translateX|| -0,marginTop:this.translateY||0});this.inverted&&k(b.childNodes,function(e){a.invertChild(e,b)});if("SPAN"===b.tagName){var t=this.rotation,w=this.textWidth&&d(this.textWidth),m=[t,E,b.innerHTML,this.textWidth,this.textAlign].join(),D;(D=w!==this.oldTextWidth)&&!(D=w>this.oldTextWidth)&&((D=this.textPxLength)||(H(b,{width:"",whiteSpace:I||"nowrap"}),D=b.offsetWidth),D=D>w);D&&/[ \-]/.test(b.textContent||b.innerText)&&(H(b,{width:w+"px",display:"block",whiteSpace:I||"normal"}),this.oldTextWidth=w); -m!==this.cTT&&(I=a.fontMetrics(b.style.fontSize).b,r(t)&&t!==(this.oldRotation||0)&&this.setSpanRotation(t,B,I),this.getSpanCorrection(!r(t)&&this.textPxLength||b.offsetWidth,I,B,t,E));H(b,{left:c+(this.xCorr||0)+"px",top:h+(this.yCorr||0)+"px"});this.cTT=m;this.oldRotation=t}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,c){var h={},l=this.renderer.getTransformKey();h[l]=h.transform="rotate("+a+"deg)";h[l+(u?"Origin":"-origin")]=h.transformOrigin=100*b+"% "+c+"px";H(this.element,h)},getSpanCorrection:function(a, -b,c){this.xCorr=-a*c;this.yCorr=-b}});f(c.prototype,{getTransformKey:function(){return y&&!/Edge/.test(z.navigator.userAgent)?"-ms-transform":v?"-webkit-transform":u?"MozTransform":z.opera?"-o-transform":""},html:function(a,b,c){var h=this.createElement("span"),l=h.element,d=h.renderer,n=d.isSVG,I=function(a,b){k(["opacity","visibility"],function(m){p(a,m+"Setter",function(a,m,c,g){a.call(this,m,c,g);b[c]=m})});a.addedSetters=!0};h.textSetter=function(a){a!==l.innerHTML&&delete this.bBox;this.textStr= -a;l.innerHTML=q(a,"");h.doTransform=!0};n&&I(h,h.element.style);h.xSetter=h.ySetter=h.alignSetter=h.rotationSetter=function(a,b){"align"===b&&(b="textAlign");h[b]=a;h.doTransform=!0};h.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};h.attr({text:a,x:Math.round(b),y:Math.round(c)}).css({position:"absolute"});l.style.whiteSpace="nowrap";h.css=h.htmlCss;n&&(h.add=function(a){var b,c=d.box.parentNode,e=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)e.push(a), -a=a.parentGroup;k(e.reverse(),function(a){function m(e,b){a[b]=e;"translateX"===b?g.left=e+"px":g.top=e+"px";a.doTransform=!0}var g,C=F(a.element,"class");C&&(C={className:C});b=a.div=a.div||G("div",C,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},b||c);g=b.style;f(a,{classSetter:function(a){return function(g){this.element.setAttribute("class",g);a.className=g}}(b),on:function(){e[0].div&& -h.on.apply({element:e[0].div},arguments);return a},translateXSetter:m,translateYSetter:m});a.addedSetters||I(a,g)})}}else b=c;b.appendChild(l);h.added=!0;h.alignOnAdd&&h.htmlUpdateTransform();return h});return h}})})(K);(function(a){var F=a.defined,G=a.each,H=a.extend,r=a.merge,k=a.pick,f=a.timeUnits,u=a.win;a.Time=function(a){this.update(a,!1)};a.Time.prototype={defaultOptions:{},update:function(f){var v=k(f&&f.useUTC,!0),q=this;this.options=f=r(!0,this.options||{},f);this.Date=f.Date||u.Date;this.timezoneOffset= -(this.useUTC=v)&&f.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=!(v&&!f.getTimezoneOffset&&!f.timezone))||this.timezoneOffset?(this.get=function(a,c){var d=c.getTime(),p=d-q.getTimezoneOffset(c);c.setTime(p);a=c["getUTC"+a]();c.setTime(d);return a},this.set=function(d,c,z){var p;if(-1!==a.inArray(d,["Milliseconds","Seconds","Minutes"]))c["set"+d](z);else p=q.getTimezoneOffset(c),p=c.getTime()-p,c.setTime(p),c["setUTC"+d](z),d=q.getTimezoneOffset(c),p= -c.getTime()+d,c.setTime(p)}):v?(this.get=function(a,c){return c["getUTC"+a]()},this.set=function(a,c,z){return c["setUTC"+a](z)}):(this.get=function(a,c){return c["get"+a]()},this.set=function(a,c,z){return c["set"+a](z)})},makeTime:function(f,v,q,d,c,z){var p,n,b;this.useUTC?(p=this.Date.UTC.apply(0,arguments),n=this.getTimezoneOffset(p),p+=n,b=this.getTimezoneOffset(p),n!==b?p+=b-n:n-36E5!==this.getTimezoneOffset(p-36E5)||a.isSafari||(p-=36E5)):p=(new this.Date(f,v,k(q,1),k(d,0),k(c,0),k(z,0))).getTime(); -return p},timezoneOffsetFunction:function(){var f=this,k=this.options,q=u.moment;if(!this.useUTC)return function(a){return 6E4*(new Date(a)).getTimezoneOffset()};if(k.timezone){if(q)return function(a){return 6E4*-q.tz(a,k.timezone).utcOffset()};a.error(25)}return this.useUTC&&k.getTimezoneOffset?function(a){return 6E4*k.getTimezoneOffset(a)}:function(){return 6E4*(f.timezoneOffset||0)}},dateFormat:function(f,k,q){if(!a.defined(k)||isNaN(k))return a.defaultOptions.lang.invalidDate||"";f=a.pick(f,"%Y-%m-%d %H:%M:%S"); -var d=this,c=new this.Date(k),z=this.get("Hours",c),p=this.get("Day",c),n=this.get("Date",c),b=this.get("Month",c),l=this.get("FullYear",c),h=a.defaultOptions.lang,E=h.weekdays,B=h.shortWeekdays,t=a.pad,c=a.extend({a:B?B[p]:E[p].substr(0,3),A:E[p],d:t(n),e:t(n,2," "),w:p,b:h.shortMonths[b],B:h.months[b],m:t(b+1),y:l.toString().substr(2,2),Y:l,H:t(z),k:z,I:t(z%12||12),l:z%12||12,M:t(d.get("Minutes",c)),p:12>z?"AM":"PM",P:12>z?"am":"pm",S:t(c.getSeconds()),L:t(Math.round(k%1E3),3)},a.dateFormats);a.objectEach(c, -function(a,b){for(;-1!==f.indexOf("%"+b);)f=f.replace("%"+b,"function"===typeof a?a.call(d,k):a)});return q?f.substr(0,1).toUpperCase()+f.substr(1):f},getTimeTicks:function(a,v,q,d){var c=this,z=[],p={},n,b=new c.Date(v),l=a.unitRange,h=a.count||1,E;if(F(v)){c.set("Milliseconds",b,l>=f.second?0:h*Math.floor(c.get("Milliseconds",b)/h));l>=f.second&&c.set("Seconds",b,l>=f.minute?0:h*Math.floor(c.get("Seconds",b)/h));l>=f.minute&&c.set("Minutes",b,l>=f.hour?0:h*Math.floor(c.get("Minutes",b)/h));l>=f.hour&& -c.set("Hours",b,l>=f.day?0:h*Math.floor(c.get("Hours",b)/h));l>=f.day&&c.set("Date",b,l>=f.month?1:h*Math.floor(c.get("Date",b)/h));l>=f.month&&(c.set("Month",b,l>=f.year?0:h*Math.floor(c.get("Month",b)/h)),n=c.get("FullYear",b));l>=f.year&&c.set("FullYear",b,n-n%h);l===f.week&&c.set("Date",b,c.get("Date",b)-c.get("Day",b)+k(d,1));n=c.get("FullYear",b);d=c.get("Month",b);var B=c.get("Date",b),t=c.get("Hours",b);v=b.getTime();c.variableTimezone&&(E=q-v>4*f.month||c.getTimezoneOffset(v)!==c.getTimezoneOffset(q)); -b=b.getTime();for(v=1;bz.length&&G(z,function(a){0===a%18E5&&"000000000"===c.dateFormat("%H%M%S%L",a)&&(p[a]="day")})}z.info=H(a,{higherRanks:p,totalRange:l*h});return z}}})(K);(function(a){var F=a.merge;a.defaultOptions={symbols:["circle","diamond","square","triangle","triangle-down"], -lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:a.Time.prototype.defaultOptions,chart:{borderRadius:0,colorCount:10,defaultSeriesType:"line", -ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{},itemCheckboxStyle:{position:"absolute", -width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{}},loading:{},tooltip:{enabled:!0,animation:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,headerFormat:'\x3cspan class\x3d"highcharts-header"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e', -pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cspan class\x3d"highcharts-strong"\x3e{point.y}\x3c/span\x3e\x3cbr/\x3e'},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},text:"Highcharts.com"}};a.setOptions=function(G){a.defaultOptions=F(!0,a.defaultOptions,G);a.time.update(F(a.defaultOptions.global,a.defaultOptions.time),!1);return a.defaultOptions};a.getOptions=function(){return a.defaultOptions}; -a.defaultPlotOptions=a.defaultOptions.plotOptions;a.time=new a.Time(F(a.defaultOptions.global,a.defaultOptions.time));a.dateFormat=function(G,F,r){return a.time.dateFormat(G,F,r)}})(K);(function(a){var F=a.correctFloat,G=a.defined,H=a.destroyObjectProperties,r=a.fireEvent,k=a.isNumber,f=a.pick,u=a.deg2rad;a.Tick=function(a,f,q,d){this.axis=a;this.pos=f;this.type=q||"";this.isNewLabel=this.isNew=!0;q||d||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,k=a.options,q=a.chart,d= -a.categories,c=a.names,z=this.pos,p=k.labels,n=a.tickPositions,b=z===n[0],l=z===n[n.length-1],c=d?f(d[z],c[z],z):z,d=this.label,n=n.info,h;a.isDatetimeAxis&&n&&(h=k.dateTimeLabelFormats[n.higherRanks[z]||n.unitName]);this.isFirst=b;this.isLast=l;k=a.labelFormatter.call({axis:a,chart:q,isFirst:b,isLast:l,dateTimeLabelFormat:h,value:a.isLog?F(a.lin2log(c)):c,pos:z});if(G(d))d&&d.attr({text:k});else{if(this.label=d=G(k)&&p.enabled?q.renderer.text(k,0,0,p.useHTML).add(a.labelGroup):null)d.textPxLength= -d.getBBox().width;this.rotation=0}},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var k=this.axis,q=k.options.labels,d=a.x,c=k.chart.chartWidth,z=k.chart.spacing,p=f(k.labelLeft,Math.min(k.pos,z[3])),z=f(k.labelRight,Math.max(k.isRadial?0:k.pos+k.len,c-z[1])),n=this.label,b=this.rotation,l={left:0,center:.5,right:1}[k.labelAlign||n.attr("align")],h=n.getBBox().width,E=k.getSlotWidth(),B=E,t=1,I,w={};if(b||!1===q.overflow)0> -b&&d-l*hz&&(I=Math.round((c-d)/Math.cos(b*u)));else if(c=d+(1-l)*h,d-l*hz&&(B=z-a.x+B*l,t=-1),B=Math.min(E,B),BB||k.autoRotation&&(n.styles||{}).width)I=B;I&&(w.width=I,(q.style||{}).textOverflow||(w.textOverflow="ellipsis"),n.css(w))},getPosition:function(f,k,q,d){var c=this.axis,z=c.chart,p=d&&z.oldChartHeight||z.chartHeight;f={x:f?a.correctFloat(c.translate(k+q,null, -null,d)+c.transB):c.left+c.offset+(c.opposite?(d&&z.oldChartWidth||z.chartWidth)-c.right-c.left:0),y:f?p-c.bottom+c.offset-(c.opposite?c.height:0):a.correctFloat(p-c.translate(k+q,null,null,d)-c.transB)};r(this,"afterGetPosition",{pos:f});return f},getLabelPosition:function(a,f,q,d,c,z,p,n){var b=this.axis,l=b.transA,h=b.reversed,E=b.staggerLines,B=b.tickRotCorr||{x:0,y:0},t=c.y,I=d||b.reserveSpaceDefault?0:-b.labelOffset*("center"===b.labelAlign?.5:1),w={};G(t)||(t=0===b.side?q.rotation?-8:-q.getBBox().height: -2===b.side?B.y+8:Math.cos(q.rotation*u)*(B.y-q.getBBox(!1,0).height/2));a=a+c.x+I+B.x-(z&&d?z*l*(h?-1:1):0);f=f+t-(z&&!d?z*l*(h?1:-1):0);E&&(q=p/(n||1)%E,b.opposite&&(q=E-q-1),f+=b.labelOffset/E*q);w.x=a;w.y=Math.round(f);r(this,"afterGetLabelPosition",{pos:w});return w},getMarkPath:function(a,f,q,d,c,z){return z.crispLine(["M",a,f,"L",a+(c?0:-q),f+(c?q:0)],d)},renderGridLine:function(a,f,q){var d=this.axis,c=this.gridLine,z={},p=this.pos,n=this.type,b=d.tickmarkOffset,l=d.chart.renderer;c||(n||(z.zIndex= -1),a&&(z.opacity=0),this.gridLine=c=l.path().attr(z).addClass("highcharts-"+(n?n+"-":"")+"grid-line").add(d.gridGroup));if(!a&&c&&(a=d.getPlotLinePath(p+b,c.strokeWidth()*q,a,!0)))c[this.isNew?"attr":"animate"]({d:a,opacity:f})},renderMark:function(a,f,q){var d=this.axis,c=d.chart.renderer,z=this.type,p=d.tickSize(z?z+"Tick":"tick"),n=this.mark,b=!n,l=a.x;a=a.y;p&&(d.opposite&&(p[0]=-p[0]),b&&(this.mark=n=c.path().addClass("highcharts-"+(z?z+"-":"")+"tick").add(d.axisGroup)),n[b?"attr":"animate"]({d:this.getMarkPath(l, -a,p[0],n.strokeWidth()*q,d.horiz,c),opacity:f}))},renderLabel:function(a,u,q,d){var c=this.axis,z=c.horiz,p=c.options,n=this.label,b=p.labels,l=b.step,c=c.tickmarkOffset,h=!0,E=a.x;a=a.y;n&&k(E)&&(n.xy=a=this.getLabelPosition(E,a,n,z,b,c,d,l),this.isFirst&&!this.isLast&&!f(p.showFirstLabel,1)||this.isLast&&!this.isFirst&&!f(p.showLastLabel,1)?h=!1:!z||b.step||b.rotation||u||0===q||this.handleOverflow(a),l&&d%l&&(h=!1),h&&k(a.y)?(a.opacity=q,n[this.isNewLabel?"attr":"animate"](a),this.isNewLabel=!1): -(n.attr("y",-9999),this.isNewLabel=!0))},render:function(k,u,q){var d=this.axis,c=d.horiz,z=this.getPosition(c,this.pos,d.tickmarkOffset,u),p=z.x,n=z.y,d=c&&p===d.pos+d.len||!c&&n===d.pos?-1:1;q=f(q,1);this.isActive=!0;this.renderGridLine(u,q,d);this.renderMark(z,q,d);this.renderLabel(z,u,q,k);this.isNew=!1;a.fireEvent(this,"afterRender")},destroy:function(){H(this,this.axis)}}})(K);var da=function(a){var F=a.addEvent,G=a.animObject,H=a.arrayMax,r=a.arrayMin,k=a.correctFloat,f=a.defaultOptions,u= -a.defined,y=a.deg2rad,v=a.destroyObjectProperties,q=a.each,d=a.extend,c=a.fireEvent,z=a.format,p=a.getMagnitude,n=a.grep,b=a.inArray,l=a.isArray,h=a.isNumber,E=a.isString,B=a.merge,t=a.normalizeTickInterval,I=a.objectEach,w=a.pick,m=a.removeEvent,D=a.splat,e=a.syncTimeout,x=a.Tick,J=function(){this.init.apply(this,arguments)};a.extend(J.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,x:0},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle"},type:"linear"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return a.numberFormat(this.total, --1)}}},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,e){var g=e.isX,A=this;A.chart=a;A.horiz=a.inverted&&!A.isZAxis?!g:g;A.isXAxis=g;A.coll=A.coll||(g?"xAxis":"yAxis");c(this,"init",{userOptions:e});A.opposite=e.opposite;A.side=e.side||(A.horiz?A.opposite?0: -2:A.opposite?1:3);A.setOptions(e);var C=this.options,m=C.type;A.labelFormatter=C.labels.formatter||A.defaultLabelFormatter;A.userOptions=e;A.minPixelPadding=0;A.reversed=C.reversed;A.visible=!1!==C.visible;A.zoomEnabled=!1!==C.zoomEnabled;A.hasNames="category"===m||!0===C.categories;A.categories=C.categories||A.hasNames;A.names||(A.names=[],A.names.keys={});A.plotLinesAndBandsGroups={};A.isLog="logarithmic"===m;A.isDatetimeAxis="datetime"===m;A.positiveValuesOnly=A.isLog&&!A.allowNegativeLog;A.isLinked= -u(C.linkedTo);A.ticks={};A.labelEdge=[];A.minorTicks={};A.plotLinesAndBands=[];A.alternateBands={};A.len=0;A.minRange=A.userMinRange=C.minRange||C.maxZoom;A.range=C.range;A.offset=C.offset||0;A.stacks={};A.oldStacks={};A.stacksTouched=0;A.max=null;A.min=null;A.crosshair=w(C.crosshair,D(a.options.tooltip.crosshairs)[g?0:1],!1);e=A.options.events;-1===b(A,a.axes)&&(g?a.axes.splice(a.xAxis.length,0,A):a.axes.push(A),a[A.coll].push(A));A.series=A.series||[];a.inverted&&!A.isZAxis&&g&&void 0===A.reversed&& -(A.reversed=!0);I(e,function(a,g){F(A,g,a)});A.lin2log=C.linearToLogConverter||A.lin2log;A.isLog&&(A.val2lin=A.log2lin,A.lin2val=A.lin2log);c(this,"afterInit")},setOptions:function(a){this.options=B(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],B(f[this.coll],a));c(this,"afterSetOptions",{userOptions:a})},defaultLabelFormatter:function(){var g=this.axis, -e=this.value,b=g.chart.time,A=g.categories,m=this.dateTimeLabelFormat,c=f.lang,h=c.numericSymbols,c=c.numericSymbolMagnitude||1E3,l=h&&h.length,x,d=g.options.labels.format,g=g.isLog?Math.abs(e):g.tickInterval;if(d)x=z(d,this,b);else if(A)x=e;else if(m)x=b.dateFormat(m,e);else if(l&&1E3<=g)for(;l--&&void 0===x;)b=Math.pow(c,l+1),g>=b&&0===10*e%b&&null!==h[l]&&0!==e&&(x=a.numberFormat(e/b,-1)+h[l]);void 0===x&&(x=1E4<=Math.abs(e)?a.numberFormat(e,-1):a.numberFormat(e,-1,void 0,""));return x},getSeriesExtremes:function(){var a= -this,e=a.chart;c(this,"getSeriesExtremes",null,function(){a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();q(a.series,function(g){if(g.visible||!e.options.chart.ignoreHiddenSeries){var b=g.options,C=b.threshold,c;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=C&&(C=null);if(a.isXAxis)b=g.xData,b.length&&(g=r(b),c=H(b),h(g)||g instanceof Date||(b=n(b,h),g=r(b),c=H(b)),b.length&&(a.dataMin=Math.min(w(a.dataMin,b[0],g),g),a.dataMax= -Math.max(w(a.dataMax,b[0],c),c)));else if(g.getExtremes(),c=g.dataMax,g=g.dataMin,u(g)&&u(c)&&(a.dataMin=Math.min(w(a.dataMin,g),g),a.dataMax=Math.max(w(a.dataMax,c),c)),u(C)&&(a.threshold=C),!b.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})});c(this,"afterGetSeriesExtremes")},translate:function(a,e,b,A,c,m){var g=this.linkedParent||this,C=1,l=0,x=A?g.oldTransA:g.transA;A=A?g.oldMin:g.min;var d=g.minPixelPadding;c=(g.isOrdinal||g.isBroken||g.isLog&&c)&&g.lin2val;x||(x=g.transA);b&&(C*= --1,l=g.len);g.reversed&&(C*=-1,l-=C*(g.sector||g.len));e?(a=(a*C+l-d)/x+A,c&&(a=g.lin2val(a))):(c&&(a=g.val2lin(a)),a=h(A)?C*(a-A)*x+l+C*d+(h(m)?x*m:0):void 0);return a},toPixels:function(a,e){return this.translate(a,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(a,e){return this.translate(a-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,e,b,A,c){var g=this.chart,C=this.left,m=this.top,l,x,d=b&&g.oldChartHeight||g.chartHeight,D=b&&g.oldChartWidth||g.chartWidth,n;l=this.transB; -var t=function(a,g,e){if(ae)A?a=Math.min(Math.max(g,a),e):n=!0;return a};c=w(c,this.translate(a,null,null,b));c=Math.min(Math.max(-1E5,c),1E5);a=b=Math.round(c+l);l=x=Math.round(d-c-l);h(c)?this.horiz?(l=m,x=d-this.bottom,a=b=t(a,C,C+this.width)):(a=C,b=D-this.right,l=x=t(l,m,m+this.height)):(n=!0,A=!1);return n&&!A?null:g.renderer.crispLine(["M",a,l,"L",b,x],e||1)},getLinearTickPositions:function(a,e,b){var g,c=k(Math.floor(e/a)*a);b=k(Math.ceil(b/a)*a);var C=[],m;k(c+a)===c&&(m=20);if(this.single)return[e]; -for(e=c;e<=b;){C.push(e);e=k(e+a,m);if(e===g)break;g=e}return C},getMinorTickInterval:function(){var a=this.options;return!0===a.minorTicks?w(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval},getMinorTickPositions:function(){var a=this,e=a.options,b=a.tickPositions,A=a.minorTickInterval,c=[],m=a.pointRangePadding||0,h=a.min-m,m=a.max+m,l=m-h;if(l&&l/A=this.minRange,D=this.minRange,A=(D-b+e)/2,A=[e-A,w(a.min,e-A)],c&&(A[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),e=H(A),b=[e+D,w(a.max,e+D)],c&&(b[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),b=r(b),b-e=f?(J=f,n=0):e.dataMax<=f&&(v=f,D=0)),e.min=w(r,J,e.dataMin),e.max=w(y,v,e.dataMax));m&&(e.positiveValuesOnly&&!g&&0>=Math.min(e.min,w(e.dataMin,e.min))&&a.error(10,1),e.min=k(e.log2lin(e.min),15),e.max=k(e.log2lin(e.max),15));e.range&&u(e.max)&&(e.userMin=e.min=r=Math.max(e.dataMin,e.minFromRange()),e.userMax=y=e.max,e.range=null);c(e,"foundExtremes");e.beforePadding&&e.beforePadding();e.adjustForMinRange();!(B||e.axisPointRange|| -e.usePercentage||d)&&u(e.min)&&u(e.max)&&(b=e.max-e.min)&&(!u(r)&&n&&(e.min-=b*n),!u(y)&&D&&(e.max+=b*D));h(A.softMin)&&!h(e.userMin)&&(e.min=Math.min(e.min,A.softMin));h(A.softMax)&&!h(e.userMax)&&(e.max=Math.max(e.max,A.softMax));h(A.floor)&&(e.min=Math.max(e.min,A.floor));h(A.ceiling)&&(e.max=Math.min(e.max,A.ceiling));z&&u(e.dataMin)&&(f=f||0,!u(r)&&e.min=f?e.min=f:!u(y)&&e.max>f&&e.dataMax<=f&&(e.max=f));e.tickInterval=e.min===e.max||void 0===e.min||void 0===e.max?1:d&&!E&&I=== -e.linkedParent.options.tickPixelInterval?E=e.linkedParent.tickInterval:w(E,this.tickAmount?(e.max-e.min)/Math.max(this.tickAmount-1,1):void 0,B?1:(e.max-e.min)*I/Math.max(e.len,I));x&&!g&&q(e.series,function(a){a.processData(e.min!==e.oldMin||e.max!==e.oldMax)});e.setAxisTranslation(!0);e.beforeSetTickPositions&&e.beforeSetTickPositions();e.postProcessTickInterval&&(e.tickInterval=e.postProcessTickInterval(e.tickInterval));e.pointRange&&!E&&(e.tickInterval=Math.max(e.pointRange,e.tickInterval));g= -w(A.minTickInterval,e.isDatetimeAxis&&e.closestPointRange);!E&&e.tickIntervale.tickInterval&&1E3e.max)),!!this.tickAmount));this.tickAmount||(e.tickInterval=e.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,e,b=a.tickPositions;e=this.getMinorTickInterval();var A=a.tickPositioner,m=a.startOnTick,h=a.endOnTick;this.tickmarkOffset= -this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===e&&this.tickInterval?this.tickInterval/5:e;this.single=this.min===this.max&&u(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=e=b&&b.slice();!e&&(e=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),e.length>this.len&&(e=[e[0],e.pop()],e[0]===e[1]&&(e.length=1)),this.tickPositions=e,A&&(A=A.apply(this,[this.min,this.max])))&&(this.tickPositions=e=A);this.paddedTicks=e.slice(0);this.trimTicks(e,m,h);this.isLinked||(this.single&&2>e.length&&(this.min-=.5,this.max+=.5),b||A||this.adjustTickAmount());c(this,"afterSetTickPositions")},trimTicks:function(a,e,b){var g=a[0],c= -a[a.length-1],m=this.minPointOffset||0;if(!this.isLinked){if(e&&-Infinity!==g)this.min=g;else for(;this.min-m>a[0];)a.shift();if(b)this.max=c;else for(;this.max+me&&(this.finalTickAmt=e,e=5);this.tickAmount=e},adjustTickAmount:function(){var a=this.tickInterval,e=this.tickPositions,b=this.tickAmount,c=this.finalTickAmt,m=e&&e.length,h=w(this.threshold,this.softThreshold? -0:null);if(this.hasData()){if(mb&&(this.tickInterval*=2,this.setTickPositions());if(u(c)){for(a=b=e.length;a--;)(3===c&&1===a%2||2>=c&&0c&&(a=c)),u(b)&&(ec&&(e=c))),this.displayBtn=void 0!==a||void 0!==e,this.setExtremes(a, -e,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var e=this.chart,b=this.options,c=b.offsets||[0,0,0,0],m=this.horiz,h=this.width=Math.round(a.relativeLength(w(b.width,e.plotWidth-c[3]+c[1]),e.plotWidth)),l=this.height=Math.round(a.relativeLength(w(b.height,e.plotHeight-c[0]+c[2]),e.plotHeight)),x=this.top=Math.round(a.relativeLength(w(b.top,e.plotTop+c[0]),e.plotHeight,e.plotTop)),b=this.left=Math.round(a.relativeLength(w(b.left,e.plotLeft+c[3]),e.plotWidth,e.plotLeft));this.bottom= -e.chartHeight-l-x;this.right=e.chartWidth-h-b;this.len=Math.max(m?h:l,0);this.pos=m?b:x},getExtremes:function(){var a=this.isLog;return{min:a?k(this.lin2log(this.min)):this.min,max:a?k(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var e=this.isLog,g=e?this.lin2log(this.min):this.min,e=e?this.lin2log(this.max):this.max;null===a||-Infinity===a?a=g:Infinity===a?a=e:g>a?a=g:ea?"right":195a?"left":"center"},tickSize:function(a){var e=this.options,g=e[a+"Length"],b=w(e[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(b&&g)return"inside"===e[a+"Position"]&&(g=-g),[g,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,e=this.horiz,b=this.tickInterval,c=b,m=this.len/(((this.categories?1:0)+this.max-this.min)/b),h,l=a.rotation,x=this.labelMetrics(),d,D=Number.MAX_VALUE,n,t=function(a){a/=m||1;a=1=a)d=t(Math.abs(x.h/Math.sin(y*a))),e=d+Math.abs(a/360),e(b.step||0)&&!b.rotation&&(this.staggerLines||1)*this.len/c||!e&&(b.style&&parseInt(b.style.width,10)||m&&m-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,e=a.renderer,b=this.tickPositions,c=this.ticks,m=this.options.labels,h=this.horiz,l=this.getSlotWidth(),x=Math.max(1,Math.round(l-2*(m.padding|| -5))),d={},D=this.labelMetrics(),n=m.style&&m.style.textOverflow,t,w,I=0,B;E(m.rotation)||(d.rotation=m.rotation||0);q(b,function(a){(a=c[a])&&a.label&&a.label.textPxLength>I&&(I=a.label.textPxLength)});this.maxLabelLength=I;if(this.autoRotation)I>x&&I>D.h?d.rotation=this.labelRotation:this.labelRotation=0;else if(l&&(t=x,!n))for(w="clip",x=b.length;!h&&x--;)if(B=b[x],B=c[B].label)B.styles&&"ellipsis"===B.styles.textOverflow?B.css({textOverflow:"clip"}):B.textPxLength>l&&B.css({width:l+"px"}),B.getBBox().height> -this.len/b.length-(D.h-D.f)&&(B.specificTextOverflow="ellipsis");d.rotation&&(t=I>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight,n||(w="ellipsis"));if(this.labelAlign=m.align||this.autoLabelAlign(this.labelRotation))d.align=this.labelAlign;q(b,function(a){var e=(a=c[a])&&a.label,b={};e&&(e.attr(d),!t||m.style&&m.style.width||!(t=this.min&&a<=this.max)g[a]||(g[a]=new x(this,a)),c&&g[a].isNew&&g[a].render(e,!0,.1),g[a].render(e)},render:function(){var b=this,m=b.chart,l=b.options,A=b.isLog,d=b.isLinked,D=b.tickPositions,n=b.axisTitle,t=b.ticks,w=b.minorTicks,E=b.alternateBands,B=l.stackLabels,f=l.alternateGridColor,p=b.tickmarkOffset,z=b.axisLine,J=b.showAxis,k=G(m.renderer.globalAnimation), -u,v;b.labelEdge.length=0;b.overlap=!1;q([t,w,E],function(a){I(a,function(a){a.isActive=!1})});if(b.hasData()||d)b.minorTickInterval&&!b.categories&&q(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),D.length&&(q(D,function(a,e){b.renderTick(a,e)}),p&&(0===b.min||b.single)&&(t[-1]||(t[-1]=new x(b,-1,null,!0)),t[-1].render(-1))),f&&q(D,function(e,g){v=void 0!==D[g+1]?D[g+1]+p:b.max-p;0===g%2&&eu&&(!v||b<=y)&&void 0!==b&&c.push(b),b>y&&(l=!0),b=n;else u=this.lin2log(u), -y=this.lin2log(y),a=v?this.getMinorTickInterval():f.tickInterval,a=k("auto"===a?null:a,this._minorAutoInterval,f.tickPixelInterval/(v?5:1)*(y-u)/((v?d/this.tickPositions.length:d)||1)),a=r(a,null,G(a)),c=H(this.getLinearTickPositions(a,u,y),this.log2lin),v||(this._minorAutoInterval=a/5);v||(this.tickInterval=a);return c};F.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};F.prototype.lin2log=function(a){return Math.pow(10,a)}})(K);(function(a,F){var G=a.arrayMax,H=a.arrayMin,r=a.defined, -k=a.destroyObjectProperties,f=a.each,u=a.erase,y=a.merge,v=a.pick;a.PlotLineOrBand=function(a,d){this.axis=a;d&&(this.options=d,this.id=d.id)};a.PlotLineOrBand.prototype={render:function(){var f=this,d=f.axis,c=d.horiz,z=f.options,p=z.label,n=f.label,b=z.to,l=z.from,h=z.value,E=r(l)&&r(b),B=r(h),t=f.svgElem,I=!t,w=[],m=v(z.zIndex,0),D=z.events,w={"class":"highcharts-plot-"+(E?"band ":"line ")+(z.className||"")},e={},x=d.chart.renderer,J=E?"bands":"lines",g;d.isLog&&(l=d.log2lin(l),b=d.log2lin(b), -h=d.log2lin(h));e.zIndex=m;J+="-"+m;(g=d.plotLinesAndBandsGroups[J])||(d.plotLinesAndBandsGroups[J]=g=x.g("plot-"+J).attr(e).add());I&&(f.svgElem=t=x.path().attr(w).add(g));if(B)w=d.getPlotLinePath(h,t.strokeWidth());else if(E)w=d.getPlotBandPath(l,b,z);else return;I&&w&&w.length?(t.attr({d:w}),D&&a.objectEach(D,function(a,e){t.on(e,function(a){D[e].apply(f,[a])})})):t&&(w?(t.show(),t.animate({d:w})):(t.hide(),n&&(f.label=n=n.destroy())));p&&r(p.text)&&w&&w.length&&0this.max&&d>this.max;if(f&&c)for(a&&(l=f.toString()===c.toString(),b=0),a=0;a -D-l?D:D-l);else if(x)b[a]=Math.max(h,g+l+m>c?g:g+l);else return!1},w=function(a,c,m,g){var e;gc-n?e=!1:b[a]=gc-m/2?c-m-2:g-m/2;return e},m=function(a){var e=E;E=B;B=e;h=a},D=function(){!1!==I.apply(0,E)?!1!==w.apply(0,B)||h||(m(!0),D()):h?b.x=b.y=0:(m(!0),D())};(d.inverted||1D&&(l=!1);a=(d.series&&d.series.yAxis&&d.series.yAxis.pos)+(d.plotY||0);a-=n.plotTop;p.push({target:d.isHeader?n.plotHeight+E:a,rank:d.isHeader?1:0,size:t.tt.getBBox().height+1,point:d,x:D,tt:m})}});this.cleanSplit();a.distribute(p,n.plotHeight+E);F(p,function(a){var b=a.point,c=b.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:l||b.isHeader?a.x:b.plotX+n.plotLeft+u(h.distance,16),y:a.pos+n.plotTop,anchorX:b.isHeader? -b.plotX+n.plotLeft:b.plotX+c.xAxis.pos,anchorY:b.isHeader?a.pos+n.plotTop-15:b.plotY+c.yAxis.pos})})},updatePosition:function(a){var c=this.chart,d=this.getLabel(),d=(this.options.positioner||this.getPosition).call(this,d.width,d.height,a);this.move(Math.round(d.x),Math.round(d.y||0),a.plotX+c.plotLeft,a.plotY+c.plotTop)},getDateFormat:function(a,c,f,p){var d=this.chart.time,b=d.dateFormat("%m-%d %H:%M:%S.%L",c),l,h,E={millisecond:15,second:12,minute:9,hour:6,day:3},B="millisecond";for(h in q){if(a=== -q.week&&+d.dateFormat("%w",c)===f&&"00:00:00.000"===b.substr(6)){h="week";break}if(q[h]>a){h=B;break}if(E[h]&&b.substr(E[h])!=="01-01 00:00:00.000".substr(E[h]))break;"week"!==h&&(B=h)}h&&(l=p[h]);return l},getXDateFormat:function(a,c,f){c=c.dateTimeLabelFormats;var d=f&&f.closestPointRange;return(d?this.getDateFormat(d,a.x,f.options.startOfWeek,c):c.day)||c.year},tooltipFooterHeaderFormatter:function(a,c){c=c?"footer":"header";var d=a.series,f=d.tooltipOptions,n=f.xDateFormat,b=d.xAxis,l=b&&"datetime"=== -b.options.type&&r(a.key),h=f[c+"Format"];l&&!n&&(n=this.getXDateFormat(a,f,b));l&&n&&F(a.point&&a.point.tooltipDateKeys||["key"],function(a){h=h.replace("{point."+a+"}","{point."+a+":"+n+"}")});return H(h,{point:a,series:d},this.chart.time)},bodyFormatter:function(a){return k(a,function(a){var c=a.series.tooltipOptions;return(c[(a.point.formatPrefix||"point")+"Formatter"]||a.point.tooltipFormatter).call(a.point,c[(a.point.formatPrefix||"point")+"Format"])})}}})(K);(function(a){var F=a.addEvent,G= -a.attr,H=a.charts,r=a.css,k=a.defined,f=a.each,u=a.extend,y=a.find,v=a.fireEvent,q=a.isNumber,d=a.isObject,c=a.offset,z=a.pick,p=a.splat,n=a.Tooltip;a.Pointer=function(a,c){this.init(a,c)};a.Pointer.prototype={init:function(a,c){this.options=c;this.chart=a;this.runChartClick=c.chart.events&&!!c.chart.events.click;this.pinchDown=[];this.lastValidTouch={};n&&(a.tooltip=new n(a,c.tooltip),this.followTouchMove=z(c.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart, -c=b.options.chart,d=c.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(d=z(c.pinchType,d));this.zoomX=a=/x/.test(d);this.zoomY=d=/y/.test(d);this.zoomHor=a&&!b||d&&b;this.zoomVert=d&&!b||a&&b;this.hasZoom=a||d},normalize:function(a,l){var b;b=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;l||(this.chartPosition=l=c(this.chart.container));return u(a,{chartX:Math.round(b.pageX-l.left),chartY:Math.round(b.pageY-l.top)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};f(this.chart.axes, -function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},findNearestKDPoint:function(a,c,h){var b;f(a,function(a){var l=!(a.noSharedTooltip&&c)&&0>a.options.findNearestPointBy.indexOf("y");a=a.searchPoint(h,l);if((l=d(a,!0))&&!(l=!d(b,!0)))var l=b.distX-a.distX,n=b.dist-a.dist,f=(a.series.group&&a.series.group.zIndex)-(b.series.group&&b.series.group.zIndex),l=0<(0!==l&&c?l:0!==n?n:0!==f?f:b.series.index>a.series.index?-1:1);l&&(b=a)});return b}, -getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,c){var b=a.series,l=b.xAxis,b=b.yAxis,d=z(a.clientX,a.plotX),n=a.shapeArgs;if(l&&b)return c?{chartX:l.len+l.pos-d,chartY:b.len+b.pos-a.plotY}:{chartX:d+l.pos,chartY:a.plotY+b.pos};if(n&&n.x&&n.y)return{chartX:n.x,chartY:n.y}},getHoverData:function(b,c,h,n,B,t,p){var l,m=[],D=p&&p.isBoosting;n=!(!n||!b);p=c&&!c.stickyTracking?[c]:a.grep(h,function(a){return a.visible&& -!(!B&&a.directTouch)&&z(a.options.enableMouseTracking,!0)&&a.stickyTracking});c=(l=n?b:this.findNearestKDPoint(p,B,t))&&l.series;l&&(B&&!c.noSharedTooltip?(p=a.grep(h,function(a){return a.visible&&!(!B&&a.directTouch)&&z(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),f(p,function(a){var e=y(a.points,function(a){return a.x===l.x&&!a.isNull});d(e)&&(D&&(e=a.getPoint(e)),m.push(e))})):m.push(l));return{hoverPoint:l,hoverSeries:c,hoverPoints:m}},runPointActions:function(b,c){var h=this.chart, -l=h.tooltip&&h.tooltip.options.enabled?h.tooltip:void 0,d=l?l.shared:!1,n=c||h.hoverPoint,p=n&&n.series||h.hoverSeries,p=this.getHoverData(n,p,h.series,!!c||p&&p.directTouch&&this.isDirectTouch,d,b,{isBoosting:h.isBoosting}),w,n=p.hoverPoint;w=p.hoverPoints;c=(p=p.hoverSeries)&&p.tooltipOptions.followPointer;d=d&&p&&!p.noSharedTooltip;if(n&&(n!==h.hoverPoint||l&&l.isHidden)){f(h.hoverPoints||[],function(b){-1===a.inArray(b,w)&&b.setState()});f(w||[],function(a){a.setState("hover")});if(h.hoverSeries!== -p)p.onMouseOver();h.hoverPoint&&h.hoverPoint.firePointEvent("mouseOut");if(!n.series)return;n.firePointEvent("mouseOver");h.hoverPoints=w;h.hoverPoint=n;l&&l.refresh(d?w:n,b)}else c&&l&&!l.isHidden&&(n=l.getAnchor([{}],b),l.updatePosition({plotX:n[0],plotY:n[1]}));this.unDocMouseMove||(this.unDocMouseMove=F(h.container.ownerDocument,"mousemove",function(b){var c=H[a.hoverChartIndex];if(c)c.pointer.onDocumentMouseMove(b)}));f(h.axes,function(c){var m=z(c.crosshair.snap,!0),e=m?a.find(w,function(a){return a.series[c.coll]=== -c}):void 0;e||!m?c.drawCrosshair(b,e):c.hideCrosshair()})},reset:function(a,c){var b=this.chart,l=b.hoverSeries,d=b.hoverPoint,n=b.hoverPoints,I=b.tooltip,w=I&&I.shared?n:d;a&&w&&f(p(w),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)I&&w&&(I.refresh(w),d&&(d.setState(d.state,!0),f(b.axes,function(a){a.crosshair&&a.drawCrosshair(null,d)})));else{if(d)d.onMouseOut();n&&f(n,function(a){a.setState()});if(l)l.onMouseOut();I&&I.hide(c);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()); -f(b.axes,function(a){a.hideCrosshair()});this.hoverX=b.hoverPoints=b.hoverPoint=null}},scaleGroups:function(a,c){var b=this.chart,l;f(b.series,function(h){l=a||h.getPlotBox();h.xAxis&&h.xAxis.zoomEnabled&&h.group&&(h.group.attr(l),h.markerGroup&&(h.markerGroup.attr(l),h.markerGroup.clip(c?b.clipRect:null)),h.dataLabelsGroup&&h.dataLabelsGroup.attr(l))});b.clipRect.attr(c||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,c=b.options.chart,d=a.chartX,n=a.chartY,f=this.zoomHor,p=this.zoomVert,w=b.plotLeft,m=b.plotTop,D=b.plotWidth,e=b.plotHeight,x,J=this.selectionMarker,g=this.mouseDownX,C=this.mouseDownY,k=c.panKey&&a[c.panKey+"Key"];J&&J.touch||(dw+D&&(d=w+D),nm+e&&(n=m+e),this.hasDragged=Math.sqrt(Math.pow(g-d,2)+Math.pow(C-n,2)),10D.max&&(f=D.max-t,P=!0);P?(J-=.8*(J-z[b][0]),e||(C-=.8*(C-z[b][1])),k()):z[b]= -[J,C];m||(c[b]=I-B,c[E]=t);c=m?1/w:w;d[E]=t;d[b]=f;q[m?a?"scaleY":"scaleX":"scale"+l]=w;q["translate"+l]=c*B+(J-c*x)},pinch:function(a){var u=this,v=u.chart,q=u.pinchDown,d=a.touches,c=d.length,z=u.lastValidTouch,p=u.hasZoom,n=u.selectionMarker,b={},l=1===c&&(u.inClass(a.target,"highcharts-tracker")&&v.runTrackerClick||u.runChartClick),h={};1b-6&&nm?this.maxItemWidth:a.itemWidth;h&&this.itemX-c+b>m&&(this.itemX=c,this.itemY+=n+this.lastLineHeight+f,this.lastLineHeight=0);this.lastItemY=n+this.itemY+f;this.lastLineHeight=Math.max(d,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];h?this.itemX+=b:(this.itemY+=n+d+f,this.lastLineHeight= -d);this.offsetWidth=w||Math.max((h?this.itemX-c-(a.checkbox?0:p):b)+c,this.offsetWidth)},getAllItems:function(){var a=[];k(this.chart.series,function(b){var c=b&&b.options;b&&q(c.showInLegend,r(c.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))});f(this,"afterGetAllItems",{allItems:a});return a},getAlignment:function(){var a=this.options;return a.floating?"":a.align.charAt(0)+a.verticalAlign.charAt(0)+a.layout.charAt(0)},adjustMargins:function(a,b){var c=this.chart, -d=this.options,f=this.getAlignment();f&&k([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(h,l){h.test(f)&&!r(a[l])&&(c[y[l]]=Math.max(c[y[l]],c.legend[(l+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][l]*d[l%2?"x":"y"]+q(d.margin,12)+b[l]+(0===l&&void 0!==c.options.title.margin?c.titleOffset+c.options.title.margin:0)))})},render:function(){var a=this.chart,b=a.renderer,d=this.group,h,f,p,t,I=this.box,w=this.options,m=this.padding;this.itemX=m;this.itemY=this.initialItemY;this.lastItemY= -this.offsetWidth=0;d||(this.group=d=b.g("legend").attr({zIndex:7}).add(),this.contentGroup=b.g().attr({zIndex:1}).add(d),this.scrollGroup=b.g().add(this.contentGroup));this.renderTitle();h=this.getAllItems();c(h,function(a,e){return(a.options&&a.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)});w.reversed&&h.reverse();this.allItems=h;this.display=f=!!h.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;k(h,this.renderItem,this);k(h,this.layoutItem,this); -p=(w.width||this.offsetWidth)+m;t=this.lastItemY+this.lastLineHeight+this.titleHeight;t=this.handleOverflow(t);t+=m;I||(this.box=I=b.rect().addClass("highcharts-legend-box").attr({r:w.borderRadius}).add(d),I.isNew=!0);0c&&!1!==m.enabled?(this.clipHeight=p=Math.max(c-20-this.titleHeight-t,0),this.currentPage=q(this.currentPage,1),this.fullHeight=a,k(C,function(a,e){var b=a._legendItemPos[1],c=Math.round(a.legendItem.getBBox().height),m=J.length;if(!m||b-J[m-1]>p&&(g||b)!==J[m-1])J.push(g||b),m++;a.pageIx=m-1;g&& -(C[e-1].pageIx=m-1);e===C.length-1&&b+c-J[m-1]>p&&(J.push(b),a.pageIx=m);b!==g&&(g=b)}),w||(w=b.clipRect=d.clipRect(0,t,9999,0),b.contentGroup.clip(w)),z(p),x||(this.nav=x=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,e,e).on("click",function(){b.scroll(-1,D)}).add(x),this.pager=d.text("",15,10).addClass("highcharts-legend-navigation").add(x),this.down=d.symbol("triangle-down",0,0,e,e).on("click",function(){b.scroll(1,D)}).add(x)),b.scroll(0),a=c):x&&(z(),this.nav=x.destroy(), -this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,b){var c=this.pages,h=c.length;a=this.currentPage+a;var f=this.clipHeight,n=this.pager,p=this.padding;a>h&&(a=h);0b&&(f=typeof d[0],"string"===f?c.name=d[0]:"number"===f&&(c.x=d[0]),l++);h=p.value;)p=c[++f];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=p&&p.color&&!this.options.color?p.color:this.nonZonedColor;return p},destroy:function(){var a=this.series.chart,c=a.hoverPoints,f;a.pointCount--;c&&(this.setState(),r(c,this),c.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)q(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this); -for(f in this)this[f]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],c,f=6;f--;)c=a[f],this[c]&&(this[c]=this[c].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 c=this.series,d=c.tooltipOptions,p=v(d.valueDecimals,""), -n=d.valuePrefix||"",b=d.valueSuffix||"";G(c.pointArrayMap||["y"],function(c){c="{point."+c;if(n||b)a=a.replace(RegExp(c+"}","g"),n+c+"}"+b);a=a.replace(RegExp(c+"}","g"),c+":,."+p+"f}")});return f(a,{point:this,series:this.series},c.chart.time)},firePointEvent:function(a,c,f){var d=this,n=this.series.options;(n.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents();"click"===a&&n.allowPointSelect&&(f=function(a){d.select&&d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)}); -k(this,a,c,f)},visible:!0}})(K);(function(a){var F=a.addEvent,G=a.animObject,H=a.arrayMax,r=a.arrayMin,k=a.correctFloat,f=a.defaultOptions,u=a.defined,y=a.each,v=a.erase,q=a.extend,d=a.fireEvent,c=a.grep,z=a.isArray,p=a.isNumber,n=a.isString,b=a.merge,l=a.objectEach,h=a.pick,E=a.removeEvent,B=a.splat,t=a.SVGElement,I=a.syncTimeout,w=a.win;a.Series=a.seriesType("line",null,{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{enabledThreshold:2,radius:4,states:{normal:{animation:!0}, -hover:{animation:{duration:50},enabled:!0,radiusPlus:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10}},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,b){var e=this,c,m=a.series,g;e.chart=a;e.options=b=e.setOptions(b);e.linkedSeries=[];e.bindAxes();q(e,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});c=b.events;l(c,function(a,b){F(e,b,a)});if(c&&c.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;e.getColor();e.getSymbol();y(e.parallelArrays,function(a){e[a+"Data"]=[]}); -e.setData(b.data,!1);e.isCartesian&&(a.hasCartesianSeries=!0);m.length&&(g=m[m.length-1]);e._i=h(g&&g._i,-1)+1;a.orderSeries(this.insert(m));d(this,"afterInit")},insert:function(a){var b=this.options.index,e;if(p(b)){for(e=a.length;e--;)if(b>=h(a[e].options.index,a[e]._i)){a.splice(e+1,0,this);break}-1===e&&a.unshift(this);e+=1}else a.push(this);return h(e,a.length-1)},bindAxes:function(){var b=this,c=b.options,e=b.chart,d;y(b.axisTypes||[],function(m){y(e[m],function(a){d=a.options;if(c[m]===d.index|| -void 0!==c[m]&&c[m]===d.id||void 0===c[m]&&0===d.index)b.insert(a.series),b[m]=a,a.isDirty=!0});b[m]||b.optionalAxis===m||a.error(18,!0)})},updateParallelArrays:function(a,b){var e=a.series,c=arguments,m=p(b)?function(c){var g="y"===c&&e.toYData?e.toYData(a):a[c];e[c+"Data"][b]=g}:function(a){Array.prototype[b].apply(e[a+"Data"],Array.prototype.slice.call(c,2))};y(e.parallelArrays,m)},autoIncrement:function(){var a=this.options,b=this.xIncrement,e,c=a.pointIntervalUnit,d=this.chart.time,b=h(b,a.pointStart, -0);this.pointInterval=e=h(this.pointInterval,a.pointInterval,1);c&&(a=new d.Date(b),"day"===c?d.set("Date",a,d.get("Date",a)+e):"month"===c?d.set("Month",a,d.get("Month",a)+e):"year"===c&&d.set("FullYear",a,d.get("FullYear",a)+e),e=a.getTime()-b);this.xIncrement=b+e;return b},setOptions:function(a){var c=this.chart,e=c.options,m=e.plotOptions,l=(c.userOptions||{}).plotOptions||{},g=m[this.type];this.userOptions=a;c=b(g,m.series,a);this.tooltipOptions=b(f.tooltip,f.plotOptions.series&&f.plotOptions.series.tooltip, -f.plotOptions[this.type].tooltip,e.tooltip.userOptions,m.series&&m.series.tooltip,m[this.type].tooltip,a.tooltip);this.stickyTracking=h(a.stickyTracking,l[this.type]&&l[this.type].stickyTracking,l.series&&l.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:c.stickyTracking);null===g.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"});a.length&&u(a[a.length-1].value)&&a.push({});d(this,"afterSetOptions",{options:c});return c},getName:function(){return this.name||"Series "+(this.index+1)},getCyclic:function(a,b,e){var c,m=this.chart,g=this.userOptions,d=a+"Index",f=a+"Counter",l=e?e.length:h(m.options.chart[a+"Count"],m[a+"Count"]);b||(c=h(g[d],g["_"+d]),u(c)||(m.series.length||(m[f]=0),g["_"+d]=c=m[f]%l,m[f]+=1),e&&(b=e[c]));void 0!==c&&(this[d]=c);this[a]=b},getColor:function(){this.getCyclic("color")}, -getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,updateData:function(b){var c=this.options,e=this.points,m=[],d,g,h,f=this.requireSorting;y(b,function(b){var g;g=a.defined(b)&&this.pointClass.prototype.optionsToObject.call({series:this},b).x;p(g)&&(g=a.inArray(g,this.xData,h),-1===g?m.push(b):b!==c.data[g]?(e[g].update(b,!1,null,!1),e[g].touched=!0,f&&(h=g)):e[g]&&(e[g].touched=!0),d=!0)},this); -if(d)for(b=e.length;b--;)g=e[b],g.touched||g.remove(!1),g.touched=!1;else if(b.length===e.length)y(b,function(a,b){e[b].update&&a!==c.data[b]&&e[b].update(a,!1,null,!1)});else return!1;y(m,function(a){this.addPoint(a,!1)},this);return!0},setData:function(b,c,e,d){var m=this,g=m.points,f=g&&g.length||0,x,l=m.options,D=m.chart,t=null,w=m.xAxis,k=l.turboThreshold,I=this.xData,B=this.yData,E=(x=m.pointArrayMap)&&x.length,q;b=b||[];x=b.length;c=h(c,!0);!1!==d&&x&&f&&!m.cropped&&!m.hasGroupedData&&m.visible&& -(q=this.updateData(b));if(!q){m.xIncrement=null;m.colorCounter=0;y(this.parallelArrays,function(a){m[a+"Data"].length=0});if(k&&x>k){for(e=0;null===t&&el||this.forceCrop))if(c[m-1]B)c=[],e=[];else if(c[0]B)d=this.cropData(this.xData,this.yData,I,B),c=d.xData,e=d.yData,d=d.start,g=!0;for(l=c.length||1;--l;)m=p?n(c[l])-n(c[l-1]):c[l]-c[l-1],0m&&k&&(a.error(15),k=!1);this.cropped=g;this.cropStart=d;this.processedXData=c;this.processedYData=e;this.closestPointRange= -h},cropData:function(a,b,e,c,d){var g=a.length,m=0,f=g,x;d=h(d,this.cropShoulder,1);for(x=0;x=e){m=Math.max(0,x-d);break}for(e=x;ec){f=e+d;break}return{xData:a.slice(m,f),yData:b.slice(m,f),start:m,end:f}},generatePoints:function(){var a=this.options,b=a.data,e=this.data,c,d=this.processedXData,g=this.processedYData,h=this.pointClass,f=d.length,l=this.cropStart||0,n,t=this.hasGroupedData,a=a.keys,w,p=[],k;e||t||(e=[],e.length=b.length,e=this.data=e);a&&t&&(this.options.keys= -!1);for(k=0;k=d&&(e[w-n]||l)<=h,f&&l)if(f=t.length)for(;f--;)"number"===typeof t[f]&&(m[g++]=t[f]);else m[g++]=t;this.dataMin=r(m);this.dataMax=H(m)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,e=this.xAxis,c= -e.categories,f=this.yAxis,g=this.points,l=g.length,n=!!this.modifyValue,t=a.pointPlacement,w="between"===t||p(t),I=a.threshold,B=a.startFromThreshold?I:0,E,q,z,v,r=Number.MAX_VALUE;"between"===t&&(t=.5);p(t)&&(t*=h(a.pointRange||e.pointRange));for(a=0;a=G&&(y.isNull=!0);y.plotX=E=k(Math.min(Math.max(-1E5,e.translate(F,0,0,0,1,t,"flags"===this.type)),1E5)); -b&&this.visible&&!y.isNull&&H&&H[F]&&(v=this.getStackIndicator(v,F,this.index),Q=H[F],G=Q.points[v.key],q=G[0],G=G[1],q===B&&v.key===H[F].base&&(q=h(p(I)&&I,f.min)),f.positiveValuesOnly&&0>=q&&(q=null),y.total=y.stackTotal=Q.total,y.percentage=Q.total&&y.y/Q.total*100,y.stackY=G,Q.setOffset(this.pointXOffset||0,this.barW||0));y.yBottom=u(q)?Math.min(Math.max(-1E5,f.translate(q,0,1,0,1)),1E5):null;n&&(G=this.modifyValue(G,y));y.plotY=q="number"===typeof G&&Infinity!==G?Math.min(Math.max(-1E5,f.translate(G, -0,1,0,1)),1E5):void 0;y.isInside=void 0!==q&&0<=q&&q<=f.len&&0<=E&&E<=e.len;y.clientX=w?k(e.translate(F,0,0,0,1,t)):E;y.negative=y.y<(I||0);y.category=c&&void 0!==c[y.x]?c[y.x]:y.x;y.isNull||(void 0!==z&&(r=Math.min(r,Math.abs(E-z))),z=E);y.zone=this.zones.length&&y.getZone()}this.closestPointRangePx=r;d(this,"afterTranslate")},getValidPoints:function(a,b){var e=this.chart;return c(a||this.points||[],function(a){return b&&!e.isInsidePlot(a.plotX,a.plotY,e.inverted)?!1:!a.isNull})},setClip:function(a){var b= -this.chart,e=this.options,c=b.renderer,m=b.inverted,g=this.clipBox,d=g||b.clipBox,h=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,d.height,e.xAxis,e.yAxis].join(),f=b[h],l=b[h+"m"];f||(a&&(d.width=0,m&&(d.x=b.plotSizeX),b[h+"m"]=l=c.clipRect(m?b.plotSizeX+99:-99,m?-b.plotLeft:-b.plotTop,99,m?b.chartWidth:b.chartHeight)),b[h]=f=c.clipRect(d),f.count={length:0});a&&!f.count[this.index]&&(f.count[this.index]=!0,f.count.length+=1);!1!==e.clip&&(this.group.clip(a||g?f:b.clipRect),this.markerGroup.clip(l), -this.sharedClipKey=h);a||(f.count[this.index]&&(delete f.count[this.index],--f.count.length),0===f.count.length&&h&&b[h]&&(g||(b[h]=b[h].destroy()),b[h+"m"]&&(b[h+"m"]=b[h+"m"].destroy())))},animate:function(a){var b=this.chart,e=G(this.options.animation),c;a?this.setClip(e):(c=this.sharedClipKey,(a=b[c])&&a.animate({width:b.plotSizeX,x:0},e),b[c+"m"]&&b[c+"m"].animate({width:b.plotSizeX+99,x:0},e),this.animate=null)},afterAnimate:function(){this.setClip();d(this,"afterAnimate");this.finishedAnimating= -!0},drawPoints:function(){var a=this.points,b=this.chart,e,c,d,g,f=this.options.marker,l,t,n,w=this[this.specialGroup]||this.markerGroup,p,k=h(f.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=f.enabledThreshold*f.radius);if(!1!==f.enabled||this._hasPointMarkers)for(e=0;ek.max;a.resetZones&&0===g&&(g=void 0)}),this.clips=f)},invertGroups:function(a){function b(){y(["group","markerGroup"],function(b){e[b]&&(c.renderer.isVML&&e[b].attr({width:e.yAxis.len,height:e.xAxis.len}),e[b].width=e.yAxis.len,e[b].height=e.xAxis.len,e[b].invert(a))})}var e=this,c=e.chart,d;e.xAxis&&(d=F(c,"resize",b),F(e,"destroy",d),b(a),e.invertGroups=b)},plotGroup:function(a,b,e,c,d){var g=this[a],m=!g;m&&(this[a]=g=this.chart.renderer.g().attr({zIndex:c||.1}).add(d));g.addClass("highcharts-"+ -b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(u(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(g.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0);g.attr({visibility:e})[m?"attr":"animate"](this.getPlotBox());return g},getPlotBox:function(){var a=this.chart,b=this.xAxis,e=this.yAxis;a.inverted&&(b=e,e=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:e?e.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a= -this,b=a.chart,e,c=a.options,h=!!a.animate&&b.renderer.isSVG&&G(c.animation).duration,g=a.visible?"inherit":"hidden",f=c.zIndex,l=a.hasRendered,t=b.seriesGroup,n=b.inverted;e=a.plotGroup("group","series",g,f,t);a.markerGroup=a.plotGroup("markerGroup","markers",g,f,t);h&&a.animate(!0);e.inverted=a.isCartesian?n:!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(n); -!1===c.clip||a.sharedClipKey||l||e.clip(b.clipRect);h&&a.animate();l||(a.animationTimeout=I(function(){a.afterAnimate()},h));a.isDirty=!1;a.hasRendered=!0;d(a,"afterRender")},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,e=this.group,c=this.xAxis,d=this.yAxis;e&&(a.inverted&&e.attr({width:a.plotWidth,height:a.plotHeight}),e.animate({translateX:h(c&&c.left,a.plotLeft),translateY:h(d&&d.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX", -"plotY"],searchPoint:function(a,b){var e=this.xAxis,c=this.yAxis,d=this.chart.inverted;return this.searchKDTree({clientX:d?e.len-a.chartY+e.pos:a.chartX-e.pos,plotY:d?c.len-a.chartX+c.pos:a.chartY-c.pos},b)},buildKDTree:function(){function a(e,c,g){var d,m;if(m=e&&e.length)return d=b.kdAxisArray[c%g],e.sort(function(a,e){return a[d]-e[d]}),m=Math.floor(m/2),{point:e[m],left:a(e.slice(0,m),c+1,g),right:a(e.slice(m+1),c+1,g)}}this.buildingKdTree=!0;var b=this,e=-1t?"left":"right";n=0>t?"right":"left";b[x]&&(x=e(a,b[x],h+1,f),w=x[m]k;)p--;this.updateParallelArrays(t,"splice",p,0,0);this.updateParallelArrays(t,p);g&&t.name&&(g[k]=t.name);l.splice(p,0,a);n&&(this.data.splice(p,0,null),this.processData());"point"===e.legendType&&this.generatePoints();d&&(m[0]&&m[0].remove?m[0].remove(!1):(m.shift(),this.updateParallelArrays(t,"shift"),l.shift()));this.isDirtyData=this.isDirty=!0;c&&h.redraw(f)},removePoint:function(a,c,d){var m=this,e=m.data,f=e[a],h=m.points,g=m.chart,l=function(){h&&h.length===e.length&& -h.splice(a,1);e.splice(a,1);m.options.data.splice(a,1);m.updateParallelArrays(f||{series:m},"splice",a,1);f&&f.destroy();m.isDirty=!0;m.isDirtyData=!0;c&&g.redraw()};B(d,g);c=b(c,!0);f?f.firePointEvent("remove",null,l):l()},remove:function(a,c,d){function m(){e.destroy();f.isDirtyLegend=f.isDirtyBox=!0;f.linkSeries();b(a,!0)&&f.redraw(c)}var e=this,f=e.chart;!1!==d?v(e,"remove",null,m):m()},update:function(c,d){var m=this,h=m.chart,e=m.userOptions,l=m.oldType||m.type,t=c.type||e.type||h.options.chart.type, -g=E[l].prototype,n,w=["group","markerGroup","dataLabelsGroup"],k=["navigatorSeries","baseSeries"],B=m.finishedAnimating&&{animation:!1},I=["data","name","turboThreshold"],z=a.keys(c),u=0a&&v>f?(v=Math.max(a,f),d=2*f-v):vr&&d>f?(d=Math.max(r,f),v=2*f-d):d=Math.abs(d)&&.5a.closestPointRange*a.xAxis.transA,k=a.borderWidth=f(c.borderWidth,k?0:1),p=a.yAxis,n=c.threshold,b=a.translatedThreshold=p.getThreshold(n),l=f(c.minPointLength,5),h=a.getColumnMetrics(),E=h.width,B=a.barW=Math.max(E,1+2*k),t=a.pointXOffset=h.offset;d.inverted&&(b-=.5);c.pointPadding&&(B=Math.ceil(B));u.prototype.translate.apply(a);G(a.points,function(c){var h=f(c.yBottom,b),m=999+Math.abs(h), -m=Math.min(Math.max(-m,c.plotY),p.len+m),k=c.plotX+t,e=B,x=Math.min(m,h),q,g=Math.max(m,h)-x;l&&Math.abs(g)l?h-l:b-(q?l:0));c.barX=k;c.pointWidth=E;c.tooltipPos=d.inverted?[p.len+p.pos-d.plotLeft-m,a.xAxis.len-k-e/2,g]:[k+e/2,m+p.pos-d.plotTop,g];c.shapeType="rect";c.shapeArgs=a.crispCol.apply(a,c.isNull?[k,b,e,0]:[k,x,e,g])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle, -drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},drawPoints:function(){var a=this,d=this.chart,c=a.options,f=d.renderer,p=c.animationLimit||250,n;G(a.points,function(b){var l=b.graphic,h=l&&d.pointCountd;++d)c=v[d],a=2>d||2===d&&/%$/.test(c),v[d]=r(c,[y,f,q,v[2]][d])+(a?u:0);v[3]>v[2]&&(v[3]=v[2]);return v},getStartAndEndRadians:function(a,f){a=G(a)?a:0;f=G(f)&&f>a&&360>f-a?f:a+360;return{start:F*(a+-90),end:F*(f+-90)}}}})(K);(function(a){var F=a.addEvent,G=a.CenteredSeriesMixin,H=a.defined,r=a.each,k=a.extend,f=G.getStartAndEndRadians,u=a.inArray,y=a.noop,v=a.pick,q=a.Point,d=a.Series,c=a.seriesType,z=a.setAnimation;c("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}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var c=this,b=c.points,d=c.startAngleRad;a||(r(b,function(a){var b=a.graphic, -f=a.shapeArgs;b&&(b.attr({r:a.startR||c.center[3]/2,start:d,end:d}),b.animate({r:f.r,start:f.start,end:f.end},c.options.animation))}),c.animate=null)},updateTotals:function(){var a,c=0,b=this.points,d=b.length,f,k=this.options.ignoreHiddenPoint;for(a=0;a1.5*Math.PI?t-=2*Math.PI:t<-Math.PI/2&&(t+=2*Math.PI);g.slicedTranslation={translateX:Math.round(Math.cos(t)*d),translateY:Math.round(Math.sin(t)*d)};p=Math.cos(t)*a[2]/2;D=Math.sin(t)*a[2]/2;g.tooltipPos=[a[0]+.7*p,a[1]+.7*D];g.half=t<-Math.PI/ -2||t>Math.PI/2?1:0;g.angle=t;k=Math.min(h,g.labelDistance/5);g.labelPos=[a[0]+p+Math.cos(t)*g.labelDistance,a[1]+D+Math.sin(t)*g.labelDistance,a[0]+p+Math.cos(t)*k,a[1]+D+Math.sin(t)*k,a[0]+p,a[1]+D,0>g.labelDistance?"center":g.half?"right":"left",t]}},drawGraph:null,drawPoints:function(){var a=this,c=a.chart.renderer,b,d,f;r(a.points,function(h){d=h.graphic;h.isNull?d&&(h.graphic=d.destroy()):(f=h.shapeArgs,b=h.getTranslate(),d?d.setRadialReference(a.center).animate(k(f,b)):(h.graphic=d=c[h.shapeType](f).setRadialReference(a.center).attr(b).add(a.group), -h.visible||d.attr({visibility:"hidden"})),d.addClass(h.getClassName()))})},searchPoint:y,sortByAngle:function(a,c){a.sort(function(a,d){return void 0!==a.angle&&(d.angle-a.angle)*c})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:G.getCenter,getSymbol:y},{init:function(){q.prototype.init.apply(this,arguments);var a=this,c;a.name=v(a.name,"Slice");c=function(b){a.slice("select"===b.type)};F(a,"select",c);F(a,"unselect",c);return a},isValid:function(){return a.isNumber(this.y,!0)&&0<= -this.y},setVisible:function(a,c){var b=this,d=b.series,f=d.chart,n=d.options.ignoreHiddenPoint;c=v(c,n);a!==b.visible&&(b.visible=b.options.visible=a=void 0===a?!b.visible:a,d.options.data[u(b,d.data)]=b.options,r(["graphic","dataLabel","connector","shadowGroup"],function(c){if(b[c])b[c][a?"show":"hide"](!0)}),b.legendItem&&f.legend.colorizeItem(b,a),a||"hover"!==b.state||b.setState(""),n&&(d.isDirty=!0),c&&f.redraw())},slice:function(a,c,b){var d=this.series;z(b,d.chart);v(c,!0);this.sliced=this.options.sliced= -H(a)?a:!this.sliced;d.options.data[u(this,d.data)]=this.options;this.graphic.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var c=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.x,c.y,c.r+a,c.r+a,{innerR:this.shapeArgs.r-1,start:c.start,end:c.end})}})})(K);(function(a){var F=a.addEvent,G=a.arrayMax,H=a.defined,r=a.each,k=a.extend,f=a.format,u=a.map,y=a.merge, -v=a.noop,q=a.pick,d=a.relativeLength,c=a.Series,z=a.seriesTypes,p=a.some,n=a.stableSort;a.distribute=function(b,c,d){function f(a,b){return a.target-b.target}var h,l=!0,k=b,w=[],m;m=0;var D=k.reducedLen||c;for(h=b.length;h--;)m+=b[h].size;if(m>D){n(b,function(a,b){return(b.rank||0)-(a.rank||0)});for(m=h=0;m<=D;)m+=b[h].size,h++;w=b.splice(h-1,b.length)}n(b,f);for(b=u(b,function(a){return{size:a.size,targets:[a.target],align:q(a.align,.5)}});l;){for(h=b.length;h--;)l=b[h],m=(Math.min.apply(0,l.targets)+ -Math.max.apply(0,l.targets))/2,l.pos=Math.min(Math.max(0,m-l.size*l.align),c-l.size);h=b.length;for(l=!1;h--;)0b[h].pos&&(b[h-1].size+=b[h].size,b[h-1].targets=b[h-1].targets.concat(b[h].targets),b[h-1].align=.5,b[h-1].pos+b[h-1].size>c&&(b[h-1].pos=c-b[h-1].size),b.splice(h,1),l=!0)}k.push.apply(k,w);h=0;p(b,function(e){var b=0;if(p(e.targets,function(){k[h].pos=e.pos+b;if(Math.abs(k[h].pos-k[h].target)>d)return r(k.slice(0,h+1),function(a){delete a.pos}),k.reducedLen= -(k.reducedLen||c)-.1*c,k.reducedLen>.1*c&&a.distribute(k,c,d),!0;b+=k[h].size;h++}))return!0});n(k,f)};c.prototype.drawDataLabels=function(){function b(a,e){var b=e.filter;return b?(e=b.operator,a=a[b.property],b=b.value,"\x3e"===e&&a>b||"\x3c"===e&&a=b||"\x3c\x3d"===e&&a<=b||"\x3d\x3d"===e&&a==b||"\x3d\x3d\x3d"===e&&a===b?!0:!1):!0}var c=this,d=c.chart,k=c.options,n=k.dataLabels,t=c.points,p,w,m=c.hasRendered||0,D,e,x=q(n.defer,!!k.animation),z=d.renderer;if(n.enabled||c._hasPointLabels)c.dlProcessOptions&& -c.dlProcessOptions(n),e=c.plotGroup("dataLabelsGroup","data-labels",x&&!m?"hidden":"visible",n.zIndex||6),x&&(e.attr({opacity:+m}),m||F(c,"afterAnimate",function(){c.visible&&e.show(!0);e[k.animation?"animate":"attr"]({opacity:1},{duration:200})})),w=n,r(t,function(g){var h,m=g.dataLabel,l,t,k=g.connector,x=!m,B;p=g.dlOptions||g.options&&g.options.dataLabels;(h=q(p&&p.enabled,w.enabled)&&!g.isNull)&&(h=!0===b(g,p||n));h&&(n=y(w,p),l=g.getLabelConfig(),B=n[g.formatPrefix+"Format"]||n.format,D=H(B)? -f(B,l,d.time):(n[g.formatPrefix+"Formatter"]||n.formatter).call(l,n),l=n.rotation,t={r:n.borderRadius||0,rotation:l,padding:n.padding,zIndex:1},a.objectEach(t,function(a,e){void 0===a&&delete t[e]}));!m||h&&H(D)?h&&H(D)&&(m?t.text=D:(m=g.dataLabel=l?z.text(D,0,-9999).addClass("highcharts-data-label"):z.label(D,0,-9999,n.shape,null,null,n.useHTML,null,"data-label"),m.addClass(" highcharts-data-label-color-"+g.colorIndex+" "+(n.className||"")+(n.useHTML?"highcharts-tracker":""))),m.attr(t),m.added|| -m.add(e),c.alignDataLabel(g,m,n,null,x)):(g.dataLabel=m=m.destroy(),k&&(g.connector=k.destroy()))});a.fireEvent(this,"afterDrawDataLabels")};c.prototype.alignDataLabel=function(a,c,d,f,n){var b=this.chart,h=b.inverted,l=q(a.dlBox&&a.dlBox.centerX,a.plotX,-9999),m=q(a.plotY,-9999),p=c.getBBox(),e,x=d.rotation,B=d.align,g=this.visible&&(a.series.forceDL||b.isInsidePlot(l,Math.round(m),h)||f&&b.isInsidePlot(l,h?f.x+1:f.y+f.height-1,h)),C="justify"===q(d.overflow,"justify");if(g&&(e=b.renderer.fontMetrics(void 0, -c).b,f=k({x:h?this.yAxis.len-m:l,y:Math.round(h?this.xAxis.len-l:m),width:0,height:0},f),k(d,{width:p.width,height:p.height}),x?(C=!1,l=b.renderer.rotCorr(e,x),l={x:f.x+d.x+f.width/2+l.x,y:f.y+d.y+{top:0,middle:.5,bottom:1}[d.verticalAlign]*f.height},c[n?"attr":"animate"](l).attr({align:B}),m=(x+720)%360,m=180m,"left"===B?l.y-=m?p.height:0:"center"===B?(l.x-=p.width/2,l.y-=p.height/2):"right"===B&&(l.x-=p.width,l.y-=m?0:p.height),c.placed=!0,c.alignAttr=l):(c.align(d,null,f),l=c.alignAttr), -C?a.isLabelJustified=this.justifyDataLabel(c,d,l,p,f,n):q(d.crop,!0)&&(g=b.isInsidePlot(l.x,l.y)&&b.isInsidePlot(l.x+p.width,l.y+p.height)),d.shape&&!x))c[n?"attr":"animate"]({anchorX:h?b.plotWidth-a.plotY:a.plotX,anchorY:h?b.plotHeight-a.plotX:a.plotY});g||(c.attr({y:-9999}),c.placed=!1)};c.prototype.justifyDataLabel=function(a,c,d,f,n,t){var b=this.chart,h=c.align,m=c.verticalAlign,l,e,k=a.box?0:a.padding||0;l=d.x+k;0>l&&("right"===h?c.align="left":c.x=-l,e=!0);l=d.x+f.width-k;l>b.plotWidth&&("left"=== -h?c.align="right":c.x=b.plotWidth-l,e=!0);l=d.y+k;0>l&&("bottom"===m?c.verticalAlign="top":c.y=-l,e=!0);l=d.y+f.height-k;l>b.plotHeight&&("top"===m?c.verticalAlign="bottom":c.y=b.plotHeight-l,e=!0);e&&(a.placed=!t,a.align(c,null,n));return e};z.pie&&(z.pie.prototype.drawDataLabels=function(){var b=this,d=b.data,f,n=b.chart,k=b.options.dataLabels,t=q(k.connectorPadding,10),p=q(k.connectorWidth,1),w=n.plotWidth,m=n.plotHeight,D=Math.round(n.chartWidth/3),e,x=b.center,z=x[2]/2,g=x[1],C,u,A,v,y=[[],[]], -F,M,O,N,R=[0,0,0,0];b.visible&&(k.enabled||b._hasPointLabels)&&(r(d,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),c.prototype.drawDataLabels.apply(b),r(d,function(a){a.dataLabel&&a.visible&&(y[a.half].push(a),a.dataLabel._pos=null,a.dataLabel.getBBox().width>D&&(a.dataLabel.css({width:.7*D}),a.dataLabel.shortened=!0))}),r(y,function(e,c){var d,h,l=e.length,p=[],D;if(l)for(b.sortByAngle(e, -c-.5),0f.bottom-2?d:M,c,f),C._attr={visibility:O,align:A[6]},C._pos={x:F+k.x+({left:t,right:-t}[A[6]]||0),y:M+k.y-10},A.x=F,A.y=M,q(k.crop,!0)&&(u=C.getBBox().width,d=null,F-uw-t&&0===c&&(d=Math.round(F+u-w+t),R[1]=Math.max(d,R[1])),0>M-v/2?R[0]=Math.max(Math.round(-M+v/2),R[0]): -M+v/2>m&&(R[2]=Math.max(Math.round(M+v/2-m),R[2])),C.sideOverflow=d)}),0===G(R)||this.verifyDataLabelOverflow(R))&&(this.placeDataLabels(),p&&r(this.points,function(a){var c;e=a.connector;if((C=a.dataLabel)&&C._pos&&a.visible&&0q(this.translatedThreshold,h.yAxis.len)),p=q(f.inside,!!this.options.stacking);l&&(n=y(l),0>n.y&&(n.height+=n.y,n.y=0),l=n.y+n.height-h.yAxis.len,0a+c||f+kb+d||n+mthis.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,f;d&&u(d,function(a){a.setState()});u("xy"===b?[1,0]:[1],function(e){e=c[e?"xAxis":"yAxis"][0];var b=e.horiz, -d=a[b?"chartX":"chartY"],b=b?"mouseDownX":"mouseDownY",g=c[b],h=(e.pointRange||0)/2,m=e.reversed&&!c.inverted||!e.reversed&&c.inverted?-1:1,l=e.getExtremes(),n=e.toValue(g-d,!0)+h*m,m=e.toValue(g+e.len-d,!0)-h*m,k=m=f(q.minWidth,0)&&this.chartHeight>=f(q.minHeight,0)}).call(this)&&k.push(a._id)};F.prototype.currentOptions=function(f){function v(d,c,f,p){var n;a.objectEach(d,function(a,d){if(!p&&-1l.length||void 0===f)return a.call(this,d,f,n,b);D=l.length;for(p=0;pn;l[p]5*h||e){if(l[p]>v){for(z=a.call(this,d,l[c],l[p],b);z.length&&z[0]<=v;)z.shift();z.length&&(v=z[z.length-1]);x=x.concat(z)}c=p+1}if(e)break}a=z.info;if(r&&a.unitRange<= -q.hour){p=x.length-1;for(c=1;cn?C-1:C;for(u=void 0;r--;)c=p[r],n=Math.abs(u-c),u&&n<.8*g&&(null===m||n<.8*m)?(w[x[r]]&&!w[x[r+1]]?(n=r+1,u=c):n=r,x.splice(n,1)):u=c}return x});u(G.prototype,{beforeSetTickPositions:function(){var a, -d=[],p=!1,n,b=this.getExtremes(),l=b.min,h=b.max,q,B=this.isXAxis&&!!this.options.breaks,b=this.options.ordinal,t=Number.MAX_VALUE,r=this.chart.options.chart.ignoreHiddenSeries;n="highcharts-navigator-xaxis"===this.options.className;!this.options.overscroll||this.max!==this.dataMax||this.chart.mouseIsDown&&!n||this.eventArgs&&(!this.eventArgs||"navigator"===this.eventArgs.trigger)||(this.max+=this.options.overscroll,!n&&k(this.userMin)&&(this.min+=this.options.overscroll));if(b||B){f(this.series, -function(b,c){if(!(r&&!1===b.visible||!1===b.takeOrdinalPosition&&!B)&&(d=d.concat(b.processedXData),a=d.length,d.sort(function(a,b){return a-b}),t=Math.min(t,v(b.closestPointRange,t)),a))for(c=a-1;c--;)d[c]===d[c+1]&&d.splice(c,1)});a=d.length;if(2n||h-d[d.length-1]>n)&&(p=!0)}else this.options.overscroll&&(2===a?t=d[1]-d[0]:1===a?(t=this.options.overscroll,d=[d[0],d[0]+t]):t=this.overscrollPointsRange); -p?(this.options.overscroll&&(this.overscrollPointsRange=t,d=d.concat(this.getOverscrollPositions())),this.ordinalPositions=d,n=this.ordinal2lin(Math.max(l,d[0]),!0),q=Math.max(this.ordinal2lin(Math.min(h,d[d.length-1]),!0),1),this.ordinalSlope=h=(h-l)/(q-n),this.ordinalOffset=l-n*h):(this.overscrollPointsRange=v(this.closestPointRange,this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=b&&p;this.groupIntervalFactor=null},val2lin:function(a, -d){var c=this.ordinalPositions;if(c){var f=c.length,b,l;for(b=f;b--;)if(c[b]===a){l=b;break}for(b=f-1;b--;)if(a>c[b]||0===b){a=(a-c[b])/(c[b+1]-c[b]);l=b+a;break}d=d?l:this.ordinalSlope*(l||0)+this.ordinalOffset}else d=a;return d},lin2val:function(a,d){var c=this.ordinalPositions;if(c){var f=this.ordinalSlope,b=this.ordinalOffset,l=c.length-1,h;if(d)0>a?a=c[0]:a>l?a=c[l]:(l=Math.floor(a),h=a-l);else for(;l--;)if(d=f*l+b,a>=d){f=f*(l+1)+b;h=(a-d)/(f-d);break}return void 0!==h&&void 0!==c[l]?c[l]+(h? -h*(c[l+1]-c[l]):0):a}return a},getExtendedPositions:function(){var a=this,d=a.chart,k=a.series[0].currentDataGrouping,n=a.ordinalIndex,b=k?k.count+k.unitName:"raw",l=a.options.overscroll,h=a.getExtremes(),q,B;n||(n=a.ordinalIndex={});n[b]||(q={series:[],chart:d,getExtremes:function(){return{min:h.dataMin,max:h.dataMax+l}},options:{ordinal:!0},val2lin:G.prototype.val2lin,ordinal2lin:G.prototype.ordinal2lin},f(a.series,function(b){B={xAxis:q,xData:b.xData.slice(),chart:d,destroyGroupedData:y};B.xData= -B.xData.concat(a.getOverscrollPositions());B.options={dataGrouping:k?{enabled:!0,forced:!0,approximation:"open",units:[[k.unitName,[k.count]]]}:{enabled:!1}};b.processData.apply(B);q.series.push(B)}),a.beforeSetTickPositions.apply(q),n[b]=q.ordinalPositions);return n[b]},getOverscrollPositions:function(){var c=this.options.overscroll,d=this.overscrollPointsRange,f=[],n=this.dataMax;if(a.defined(d))for(f.push(n);n<=this.dataMax+c;)n+=d,f.push(n);return f},getGroupIntervalFactor:function(a,d,f){var c; -f=f.processedXData;var b=f.length,l=[];c=this.groupIntervalFactor;if(!c){for(c=0;ch?(w=D,x=c.ordinalPositions?c:D):(w=c.ordinalPositions?c:D,x=D),D=x.ordinalPositions,B>D[D.length-1]&&D.push(B),this.fixedRange= -v-t,h=c.toFixedRange(null,null,m.apply(w,[e.apply(w,[t,!0])+h,!0]),m.apply(x,[e.apply(x,[v,!0])+h,!0])),h.min>=Math.min(q.dataMin,t)&&h.max<=Math.max(B,v)+k&&c.setExtremes(h.min,h.max,!0,!1,{trigger:"pan"}),this.mouseDownX=b,r(this.container,{cursor:"move"})):l=!0}else l=!0;l&&(k&&(c.max=c.dataMax+k),a.apply(this,Array.prototype.slice.call(arguments,1)))})})(K);(function(a){function F(){return Array.prototype.slice.call(arguments,1)}function G(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis, -r(this.pointArrayMap,["y"]))}var H=a.addEvent,r=a.pick,k=a.wrap,f=a.each,u=a.extend,y=a.isArray,v=a.fireEvent,q=a.Axis,d=a.Series;u(q.prototype,{isInBreak:function(a,d){var c=a.repeat||Infinity,f=a.from,b=a.to-a.from;d=d>=f?(d-f)%c:c-(f-d)%c;return a.inclusive?d<=b:d=c)break; -else if(a.isInBreak(b,c)){d-=c-b.from;break}return d},a.lin2val=function(c){var d,b;for(b=0;b=c);b++)d.top;)w-=k;for(;wb.to||l>b.from&&qb.from&&qb.from&&q>b.to&&qc&&(c=d);k--;)f[k+1].x-f[k].x>c&&(d=(f[k].x+f[k+1].x)/2,f.splice(k+1,0,{isNull:!0,x:d}),this.options.stacking&&(d=b.stacks[this.stackKey][d]=new a.StackItem(b,b.options.stackLabels, -!1,d,this.stack),d.total=0));return this.getGraphPath(f)};k(a.seriesTypes.column.prototype,"drawPoints",G);k(a.Series.prototype,"drawPoints",G)})(K);(function(a){var F=a.addEvent,G=a.arrayMax,H=a.arrayMin,r=a.Axis,k=a.defaultPlotOptions,f=a.defined,u=a.each,y=a.extend,v=a.format,q=a.isNumber,d=a.merge,c=a.pick,z=a.Point,p=a.Series,n=a.Tooltip,b=a.wrap,l=p.prototype,h=l.processData,E=l.generatePoints,B={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"]}},t={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}},I=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]],w=a.approximations={sum:function(a){var b=a.length,c;if(!b&&a.hasNulls)c=null;else if(b)for(c= -0;b--;)c+=a[b];return c},average:function(a){var b=a.length;a=w.sum(a);q(a)&&b&&(a/=b);return a},averages:function(){var a=[];u(arguments,function(b){a.push(w.average(b))});return void 0===a[0]?void 0:a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?G(a):a.hasNulls?null:void 0},low:function(a){return a.length?H(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,c,d){a=w.open(a);b=w.high(b); -c=w.low(c);d=w.close(d);if(q(a)||q(b)||q(c)||q(d))return[a,b,c,d]},range:function(a,b){a=w.low(a);b=w.high(b);if(q(a)||q(b))return[a,b];if(null===a&&null===b)return null}};l.groupData=function(a,b,c,d){var e=this.data,f=this.options.data,h=[],m=[],k=[],l=a.length,n,x,p=!!b,r=[];d="function"===typeof d?d:w[d]||t[this.type]&&w[t[this.type].approximation]||w[B.approximation];var v=this.pointArrayMap,D=v&&v.length,z=0;x=0;var E,y;D?u(v,function(){r.push([])}):r.push([]);E=D||1;for(y=0;y<=l&&!(a[y]>=c[0]);y++); -for(y;y<=l;y++){for(;void 0!==c[z+1]&&a[y]>=c[z+1]||y===l;){n=c[z];this.dataGroupInfo={start:x,length:r[0].length};x=d.apply(this,r);void 0!==x&&(h.push(n),m.push(x),k.push(this.dataGroupInfo));x=y;for(n=0;nthis.chart.plotSizeX/d||b&& -g.forced)&&(f=!0);return f?d:0};r.prototype.setDataGrouping=function(a,b){var e;b=c(b,!0);a||(a={forced:!1,units:null});if(this instanceof r)for(e=this.series.length;e--;)this.series[e].update({dataGrouping:a},!1);else u(this.chart.options.series,function(b){b.dataGrouping=a},!1);this.ordinalSlope=null;b&&this.chart.redraw()}})(K);(function(a){var F=a.each,G=a.Point,H=a.seriesType,r=a.seriesTypes;H("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\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,stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"close",translate:function(){var a=this,f=a.yAxis,u=!!a.modifyValue,y=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];r.column.prototype.translate.apply(a);F(a.points,function(k){F([k.open,k.high,k.low,k.close,k.low],function(q,d){null!==q&&(u&&(q=a.modifyValue(q)),k[y[d]]=f.toPixels(q,!0))});k.tooltipPos[1]=k.plotHigh+f.pos-a.chart.plotTop})}, -drawPoints:function(){var a=this,f=a.chart;F(a.points,function(k){var r,v,q,d,c=k.graphic,u,p=!c;void 0!==k.plotY&&(c||(k.graphic=c=f.renderer.path().add(a.group)),v=c.strokeWidth()%2/2,u=Math.round(k.plotX)-v,q=Math.round(k.shapeArgs.width/2),d=["M",u,Math.round(k.yBottom),"L",u,Math.round(k.plotHigh)],null!==k.open&&(r=Math.round(k.plotOpen)+v,d.push("M",u,r,"L",u-q,r)),null!==k.close&&(r=Math.round(k.plotClose)+v,d.push("M",u,r,"L",u+q,r)),c[p?"attr":"animate"]({d:d}).addClass(k.getClassName(), -!0))})},animate:null},{getClassName:function(){return G.prototype.getClassName.call(this)+(this.openy)););F(u,function(a,c){var d;a.plotX+=h;if(void 0===a.plotY||n)0<=a.plotX&&a.plotX<=b.len?n?(a.plotY=b.translate(a.x,0,1,0,1),a.plotX=G(a.y)?l.translate(a.y,0,0,0,1):0): -a.plotY=f.chartHeight-b.bottom-(b.opposite?b.height:0)+b.offset-l.top:a.shapeArgs={};(q=u[c-1])&&q.plotX===a.plotX&&(void 0===q.stackIndex&&(q.stackIndex=0),d=q.stackIndex+1);a.stackIndex=d});this.onSeries=d}}}(K);(function(a,F){function G(a){y[a+"pin"]=function(f,d,c,k,p){var n=p&&p.anchorX;p=p&&p.anchorY;"circle"===a&&k>c&&(f-=Math.round((k-c)/2),c=k);f=y[a](f,d,c,k);n&&p&&(f.push("M","circle"===a?f[1]-f[4]:f[1]+f[4]/2,d>p?d:d+k,"L",n,p),f=f.concat(y.circle(n-1,p-1,2,2)));return f}}var H=a.addEvent, -r=a.each,k=a.noop,f=a.seriesType,u=a.TrackerMixin,y=a.SVGRenderer.prototype.symbols;f("flags","column",{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}\x3cbr/\x3e"},threshold:null,y:-30},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:a.Series.prototype.init,translate:F.translate,getPlotBox:F.getPlotBox,drawPoints:function(){var f=this.points,k=this.chart,d=k.renderer, -c,u,p=k.inverted,n=this.options,b=n.y,l,h,E,B,t,y,w=this.yAxis,m={},D=[];for(h=f.length;h--;)E=f[h],y=(p?E.plotY:E.plotX)>this.xAxis.len,c=E.plotX,B=E.stackIndex,l=E.options.shape||n.shape,u=E.plotY,void 0!==u&&(u=E.plotY+b-(void 0!==B&&B*n.stackDistance)),E.anchorX=B?void 0:E.plotX,t=B?void 0:E.plotY,B=E.graphic,void 0!==u&&0<=c&&!y?(B||(B=E.graphic=d.label("",null,null,l,null,null,n.useHTML).attr({align:"flag"===l?"left":"center",width:n.width,height:n.height,"text-align":n.textAlign}).addClass("highcharts-point").add(this.markerGroup), -E.graphic.div&&(E.graphic.div.point=E),B.isNew=!0),0=l?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===c.showFull&&(0>=a&&1<=b?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=this;a.mouseMoveHandler=function(b){var c=a.chart.pointer.normalize(b),d=a.options.vertical?"chartY":"chartX",f=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][d]||(c=a.cursorToScrollbarPosition(c)[d],d=a[d],d=c-d,a.hasDragged=!0,a.updatePosition(f[0]+d,f[1]+d),a.hasDragged&&v(a,"changed",{from:a.from,to:a.to, -trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&v(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 c=r(a.to-a.from)*a.options.step;a.updatePosition(r(a.from- -c),r(a.to-c));v(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.buttonToMaxClick=function(b){var c=(a.to-a.from)*a.options.step;a.updatePosition(a.from+c,a.to+c);v(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.trackClick=function(b){var c=a.chart.pointer.normalize(b),d=a.to-a.from,f=a.y+a.scrollbarTop,h=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>f||!a.options.vertical&&c.chartX>h?a.updatePosition(a.from+d,a.to+d):a.updatePosition(a.from-d,a.to-d); -v(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=r(b-a),a=0);this.from=a;this.to=b},update:function(a){this.destroy();this.init(this.chart.renderer,c(!0,this.options,a),this.chart)},addEvents:function(){var a= -this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,c=this.scrollbarGroup.element,d=this.mouseDownHandler,f=this.mouseMoveHandler,k=this.mouseUpHandler,a=[[b[a[0]].element,"click",this.buttonToMinClick],[b[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[c,"mousedown",d],[c.ownerDocument,"mousemove",f],[c.ownerDocument,"mouseup",k]];q&&a.push([c,"touchstart",d],[c.ownerDocument,"touchmove",f],[c.ownerDocument,"touchend",k]);y(a,function(a){G.apply(null, -a)});this._events=a},removeEvents:function(){y(this._events,function(a){p.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();y(["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))}};n(H.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 F(b.chart.renderer,b.options.scrollbar,b.chart),G(b.scrollbar,"changed",function(a){var c=Math.min(z(b.options.min,b.min),b.min,b.dataMin),d=Math.max(z(b.options.max,b.max),b.max,b.dataMax)-c,f;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(f=c+d*this.to,c+=d*this.from):(f=c+d*(1-this.from),c+=d*(1-this.to));b.setExtremes(c,f,!0,!1,a)}))});n(H.prototype,"render",function(a){var b=Math.min(z(this.options.min, -this.min),this.min,z(this.dataMin,this.min)),c=Math.max(z(this.options.max,this.max),this.max,z(this.dataMax,this.max)),d=this.scrollbar,h=this.titleOffset||0;a.apply(this,Array.prototype.slice.call(arguments,1));if(d){this.horiz?(d.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:h+this.axisTitleMargin+this.offset),this.width,this.height),h=1):(d.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?h+this.axisTitleMargin+this.offset: -0),this.top,this.width,this.height),h=0);if(!this.opposite&&!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[h]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(b)||isNaN(c)||!f(this.min)||!f(this.max)?d.setRange(0,0):(h=(this.min-b)/(c-b),b=(this.max-b)/(c-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?d.setRange(h,b):d.setRange(1-b,1-h))}});n(H.prototype,"getOffset",function(a){var b=this.horiz?2:1,c=this.scrollbar;a.apply(this,Array.prototype.slice.call(arguments, -1));c&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[b]+=c.size+c.options.margin)});n(H.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());a.apply(this,Array.prototype.slice.call(arguments,1))});a.Scrollbar=F})(K);(function(a){function F(a){this.init(a)}var G=a.addEvent,H=a.Axis,r=a.Chart,k=a.defaultOptions,f=a.defined,u=a.destroyObjectProperties,y=a.each,v=a.erase,q=a.error,d=a.extend,c=a.grep,z=a.hasTouch,p=a.isArray,n=a.isNumber,b=a.isObject,l= -a.merge,h=a.pick,E=a.removeEvent,B=a.Scrollbar,t=a.Series,I=a.seriesTypes,w=a.wrap,m=[].concat(a.defaultDataGroupingUnits),D=function(a){var b=c(arguments,n);if(b.length)return Math[a].apply(0,b)};m[4]=["day",[1,2,3,4]];m[5]=["week",[1,2,3]];d(k,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0},series:{type:void 0===I.areaspline?"line":"areaspline",compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2, -smoothed:!0,units:m},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,tickPixelInterval:200,labels:{align:"left",x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}}); -a.Renderer.prototype.symbols["navigator-handle"]=function(a,b,c,d,f){a=f.width/2;b=Math.round(a/3)+.5;f=f.height;return["M",-a-1,.5,"L",a,.5,"L",a,f+.5,"L",-a-1,f+.5,"L",-a-1,.5,"M",-b,4,"L",-b,f-3,"M",b-1,4,"L",b-1,f-3]};F.prototype={drawHandle:function(a,b,c,d){var e=this.navigatorOptions.handles.height;this.handles[b][d](c?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(a,10)+.5-e)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+ -this.height/2-e/2-1)})},drawOutline:function(a,b,c,d){var e=this.navigatorOptions.maskInside,f=this.outline.strokeWidth(),g=f/2,f=f%2/2,h=this.outlineHeight,k=this.scrollbarHeight,m=this.size,l=this.left-k,n=this.top;c?(l-=g,c=n+b+f,b=n+a+f,a=["M",l+h,n-k-f,"L",l+h,c,"L",l,c,"L",l,b,"L",l+h,b,"L",l+h,n+m+k].concat(e?["M",l+h,c-g,"L",l+h,b+g]:[])):(a+=l+k-f,b+=l+k-f,n+=g,a=["M",l,n,"L",a,n,"L",a,n+h,"L",b,n+h,"L",b,n,"L",l+m+2*k,n].concat(e?["M",a-g,n,"L",b+g,n]:[]));this.outline[d]({d:a})},drawMasks:function(a, -b,c,d){var e=this.left,f=this.top,g=this.height,h,k,l,m;c?(l=[e,e,e],m=[f,f+a,f+b],k=[g,g,g],h=[a,b-a,this.size-b]):(l=[e,e+a,e+b],m=[f,f,f],k=[a,b-a,this.size-b],h=[g,g,g]);y(this.shades,function(a,b){a[d]({x:l[b],y:m[b],width:k[b],height:h[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,d=a.chart,f=d.renderer,h;a.navigatorGroup=h=f.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();y([!c,c,!c],function(b,c){a.shades[c]=f.rect().addClass("highcharts-navigator-mask"+ -(1===c?"-inside":"-outside")).add(h)});a.outline=f.path().addClass("highcharts-navigator-outline").add(h);b.handles.enabled&&y([0,1],function(c){b.handles.inverted=d.inverted;a.handles[c]=f.symbol(b.handles.symbols[c],-b.handles.width/2-1,0,b.handles.width,b.handles.height,b.handles);a.handles[c].attr({zIndex:7-c}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][c]).add(h)})},update:function(a){y(this.series||[],function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries}); -this.destroy();l(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(b,c,d,g){var e=this.chart,k,l,m=this.scrollbarHeight,p,x=this.xAxis;k=x.fake?e.xAxis[0]:x;var t=this.navigatorEnabled,q,w=this.rendered;l=e.inverted;var r,u=e.xAxis[0].minRange,v=e.xAxis[0].options.maxRange;if(!this.hasDragged||f(d)){if(!n(b)||!n(c))if(w)d=0,g=h(x.width,k.width);else return;this.left=h(x.left,e.plotLeft+m+(l?e.plotWidth:0));this.size=q=p=h(x.len,(l?e.plotHeight:e.plotWidth)-2*m); -e=l?m:p+2*m;d=h(d,x.toPixels(b,!0));g=h(g,x.toPixels(c,!0));n(d)&&Infinity!==Math.abs(d)||(d=0,g=e);b=x.toValue(d,!0);c=x.toValue(g,!0);r=Math.abs(a.correctFloat(c-b));rv&&(this.grabbedLeft?d=x.toPixels(c-v,!0):this.grabbedRight&&(g=x.toPixels(b+v,!0)));this.zoomedMax=Math.min(Math.max(d,g,0),q);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(d,g),0),q);this.range=this.zoomedMax- -this.zoomedMin;q=Math.round(this.zoomedMax);d=Math.round(this.zoomedMin);t&&(this.navigatorGroup.attr({visibility:"visible"}),w=w&&!this.hasDragged?"animate":"attr",this.drawMasks(d,q,l,w),this.drawOutline(d,q,l,w),this.navigatorOptions.handles.enabled&&(this.drawHandle(d,0,l,w),this.drawHandle(q,1,l,w)));this.scrollbar&&(l?(l=this.top-m,k=this.left-m+(t||!k.opposite?0:(k.titleOffset||0)+k.axisTitleMargin),m=p+2*m):(l=this.top+(t?this.height:-m),k=this.left-m),this.scrollbar.position(k,l,e,m),this.scrollbar.setRange(this.zoomedMin/ -p,this.zoomedMax/p));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,c=b.container,d=[],f,h;a.mouseMoveHandler=f=function(b){a.onMouseMove(b)};a.mouseUpHandler=h=function(b){a.onMouseUp(b)};d=a.getPartsEvents("mousedown");d.push(G(c,"mousemove",f),G(c.ownerDocument,"mouseup",h));z&&(d.push(G(c,"touchmove",f),G(c.ownerDocument,"touchend",h)),d.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=d;a.series&&a.series[0]&&d.push(G(a.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))}, -getPartsEvents:function(a){var b=this,c=[];y(["shades","handles"],function(e){y(b[e],function(d,f){c.push(G(d.element,a,function(a){b[e+"Mousedown"](a,f)}))})});return c},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var c=this.chart,e=this.xAxis,d=this.zoomedMin,h=this.left,k=this.size,l=this.range,m=a.chartX,n,p;c.inverted&&(m=a.chartY,h=this.top);1===b?(this.grabbedCenter=m,this.fixedWidth=l,this.dragOffset=m-d):(a=m-h-l/2,0===b?a=Math.max(0,a):2===b&&a+l>=k&&(a=k-l,e.reversed? -(a-=l,p=this.getUnionExtremes().dataMin):n=this.getUnionExtremes().dataMax),a!==d&&(this.fixedWidth=l,b=e.toFixedRange(a,a+l,p,n),f(b.min)&&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],e=a.inverted&&!c.reversed||!a.inverted&&c.reversed;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=e?c.min:c.max):(this.grabbedRight=!0, -this.otherHandlePos=this.zoomedMin,this.fixedExtreme=e?c.max:c.min);a.fixedRange=null},onMouseMove:function(a){var b=this,c=b.chart,e=b.left,d=b.navigatorSize,f=b.range,h=b.dragOffset,k=c.inverted;a.touches&&0===a.touches[0].pageX||(a=c.pointer.normalize(a),c=a.chartX,k&&(e=b.top,c=a.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,c-e,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,c-e)):b.grabbedCenter&&(b.hasDragged=!0,cd+h-f&&(c=d+h-f),b.render(0,0, -c-h,c-h+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,e=c&&c.reversed,d=this.scrollbar,h,k,l=a.DOMEvent||a;(!this.hasDragged||d&&d.hasDragged)&&"scrollbar"!==a.trigger||(d=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?h=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(k=this.fixedExtreme),this.zoomedMax===this.size&&(k=e?d.dataMin:d.dataMax),0=== -this.zoomedMin&&(h=e?d.dataMax:d.dataMin),c=c.toFixedRange(this.zoomedMin,this.zoomedMax,h,k),f(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&&(y(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&&y(a,function(a){E(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&E(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,c=b.navigator,e=c.enabled,d=b.scrollbar,f=d.enabled,b=e?c.height:0,k=f?d.height:0;this.handles=[];this.shades=[];this.chart= -a;this.setBaseSeries();this.height=b;this.scrollbarHeight=k;this.scrollbarEnabled=f;this.navigatorEnabled=e;this.navigatorOptions=c;this.scrollbarOptions=d;this.outlineHeight=b+k;this.opposite=h(c.opposite,!e&&a.inverted);var m=this,d=m.baseSeries,f=a.xAxis.length,n=a.yAxis.length,p=d&&d[0]&&d[0].xAxis||a.xAxis[0]||{options:{}};a.extraMargin={type:m.opposite?"plotTop":"marginBottom",value:(e||!a.inverted?m.outlineHeight:0)+c.margin};a.inverted&&(a.extraMargin.type=m.opposite?"marginRight":"plotLeft"); -a.isDirtyBox=!0;m.navigatorEnabled?(m.xAxis=new H(a,l({breaks:p.options.breaks,ordinal:p.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:[k,0,-k,0],width:b}:{offsets:[0,-k,0,k],height:b})),m.yAxis=new H(a,l(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:n,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),d||c.series.data? -m.updateNavigatorSeries(!1):0===a.series.length&&(m.unbindRedraw=G(a,"beforeRedraw",function(){0a.inArray(c,h)?(c&&(E(c,"updatedData",e.updatedDataHandler),delete c.navigatorSeries),b.destroy(),!1):!0});h&&h.length&&y(h,function(a){var b= -a.navigatorSeries,g=d({color:a.color},p(t)?k.navigator.series:t);b&&!1===e.navigatorOptions.adaptToUpdatedData||(w.name="Navigator "+h.length,m=a.options||{},q=m.navigatorOptions||{},n=l(m,w,g,q),g=q.data||g.data,e.hasNavigatorData=e.hasNavigatorData||!!g,n.data=g||m.data&&m.data.slice(0),b&&b.options?b.update(n,c):(a.navigatorSeries=f.initSeries(n),a.navigatorSeries.baseSeries=a,x.push(a.navigatorSeries)))});if(t.data&&(!h||!h.length)||p(t))e.hasNavigatorData=!1,t=a.splat(t),y(t,function(a,b){w.name= -"Navigator "+(x.length+1);n=l(k.navigator.series,{color:f.series[b]&&!f.series[b].options.isInternal&&f.series[b].color||f.options.colors[b]||f.options.colors[0]},w,a);n.data=a.data;n.data&&(e.hasNavigatorData=!0,x.push(f.initSeries(n)))});b&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&G(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);y(b,function(b){G(b,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0, -!1)});G(b,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)});!1!==this.navigatorOptions.adaptToUpdatedData&&b.xAxis&&G(b,"updatedData",this.updatedDataHandler);G(b,"remove",function(){this.navigatorSeries&&(v(a.series,this.navigatorSeries),f(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;a.getExtremes&&(!(b=this.getUnionExtremes(!0))||b.dataMin===a.min&&b.dataMax=== -a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,b=this.getExtremes(),c=b.dataMin,d=b.dataMax,b=b.max-b.min,f=a.stickToMin,k=a.stickToMax,m=h(this.options.overscroll,0),l,p,t=a.series&&a.series[0],q=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(f&&(p=c,l=p+b),k&&(l=d+m,f||(p=Math.max(l-b,t&&t.xData?t.xData[0]:-Number.MAX_VALUE))),q&&(f||k)&&n(p)&&(this.min=this.userMin=p,this.max=this.userMax=l));a.stickToMin= -a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries;a.stickToMax=a.xAxis.reversed?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=n(this.xAxis.min)&&this.xAxis.min<=this.xData[0]&&(!this.chart.fixedRange||!a.stickToMax);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){G(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&&(v(this.chart.xAxis,this.xAxis),v(this.chart.axes,this.xAxis));this.yAxis&&(v(this.chart.yAxis,this.yAxis),v(this.chart.axes,this.yAxis));y(this.series||[],function(a){a.destroy&&a.destroy()});y("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);y([this.handles],function(a){u(a)},this)}};a.Navigator=F;w(H.prototype,"zoom",function(a,b,c){var e=this.chart,d=e.options,h=d.chart.zoomType,k=d.chart.pinchType,m=d.navigator,d=d.rangeSelector,l;this.isXAxis&&(m&&m.enabled||d&&d.enabled)&&("x"===h||"x"===k?e.resetZoomButton="blocked":"y"===h?l=!1:"xy"!==h&&"xy"!==k||!this.options.range||(e=this.previousZoom,f(b)?this.previousZoom=[this.min,this.max]:e&&(b=e[0],c=e[1],delete this.previousZoom)));return void 0!== -l?l:a.call(this,b,c)});G(r,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new F(this)});G(r,"afterSetChartSize",function(){var a=this.legend,b=this.navigator,c,d,f,k;b&&(d=a&&a.options,f=b.xAxis,k=b.yAxis,c=b.scrollbarHeight,this.inverted?(b.left=b.opposite?this.chartWidth-c-b.height:this.spacing[3]+c,b.top=this.plotTop+c):(b.left=this.plotLeft+c,b.top=b.navigatorOptions.top||this.chartHeight-b.height-c-this.spacing[2]-(this.rangeSelector&& -this.extraBottomMargin?this.rangeSelector.getHeight():0)-(d&&"bottom"===d.verticalAlign&&d.enabled&&!d.floating?a.legendHeight+h(d.margin,10):0)),f&&k&&(this.inverted?f.options.left=k.options.left=b.left:f.options.top=k.options.top=b.top,f.setAxisSize(),k.setAxisSize()))});w(t.prototype,"addPoint",function(a,c,d,f,h){var e=this.options.turboThreshold;e&&this.xData.length>e&&b(c,!0)&&this.chart.navigator&&q(20,!0);a.call(this,c,d,f,h)});G(r,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null, -!1)});G(t,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)});r.prototype.callbacks.push(function(a){var b=a.navigator;b&&a.xAxis[0]&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))})})(K);(function(a){function F(a){this.init(a)}var G=a.addEvent,H=a.Axis,r=a.Chart,k=a.css,f=a.createElement,u=a.defaultOptions,y=a.defined,v=a.destroyObjectProperties,q=a.discardElement,d=a.each,c=a.extend,z=a.fireEvent,p=a.isNumber,n=a.merge,b=a.pick, -l=a.pInt,h=a.splat,E=a.wrap;c(u,{rangeSelector:{verticalAlign:"top",buttonTheme:{"stroke-width":0,width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0}}});u.lang=n(u.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});F.prototype={clickButton:function(a,c){var f=this,k=f.chart,m=f.buttonOptions[a],l=k.xAxis[0],e=k.scroller&&k.scroller.getUnionExtremes()||l||{},n=e.dataMin,t=e.dataMax, -g,q=l&&Math.round(Math.min(l.max,b(t,l.max))),r=m.type,u,e=m._range,v,B,y,z=m.dataGrouping;if(null!==n&&null!==t){k.fixedRange=e;z&&(this.forcedDataGrouping=!0,H.prototype.setDataGrouping.call(l||{chart:this.chart},z,!1));if("month"===r||"year"===r)l?(r={range:m,max:q,chart:k,dataMin:n,dataMax:t},g=l.minFromRange.call(r),p(r.newMax)&&(q=r.newMax)):e=m;else if(e)g=Math.max(q-e,n),q=Math.min(g+e,t);else if("ytd"===r)if(l)void 0===t&&(n=Number.MAX_VALUE,t=Number.MIN_VALUE,d(k.series,function(a){a=a.xData; -n=Math.min(a[0],n);t=Math.max(a[a.length-1],t)}),c=!1),q=f.getYTDExtremes(t,n,k.time.useUTC),g=v=q.min,q=q.max;else{G(k,"beforeRender",function(){f.clickButton(a)});return}else"all"===r&&l&&(g=n,q=t);g+=m._offsetMin;q+=m._offsetMax;f.setSelected(a);l?l.setExtremes(g,q,b(c,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:m}):(u=h(k.options.xAxis)[0],y=u.range,u.range=e,B=u.min,u.min=v,G(k,"load",function(){u.range=y;u.min=B}))}},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,f=c.buttons||[].concat(b.defaultButtons),h=c.selected,k=function(){var a=b.minInput,c=b.maxInput;a&&a.blur&&z(a,"blur");c&&c.blur&&z(c,"blur")};b.chart=a;b.options=c;b.buttons=[];a.extraTopMargin=c.height;b.buttonOptions=f;this.unMouseDown=G(a.container, -"mousedown",k);this.unResize=G(a,"resize",k);d(f,b.computeButtonRange);void 0!==h&&f[h]&&this.clickButton(h,!1);G(a,"load",function(){a.xAxis&&a.xAxis[0]&&G(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,b=a.xAxis[0],c=Math.round(b.max-b.min),f=!b.hasVisibleSeries,h=a.scroller&&a.scroller.getUnionExtremes()||b,k= -h.dataMin,e=h.dataMax,a=this.getYTDExtremes(e,k,a.time.useUTC),l=a.min,n=a.max,g=this.selected,q=p(g),r=this.options.allButtonsEnabled,u=this.buttons;d(this.buttonOptions,function(a,d){var h=a._range,m=a.type,p=a.count||1,t=u[d],w=0;a=a._offsetMax-a._offsetMin;d=d===g;var x=h>e-k,v=h=864E5*{month:28,year:365}[m]*p-a&&c-36E5<=864E5*{month:31,year:366}[m]*p+a?h=!0:"ytd"===m?(h=n-l+a===c,A=!d):"all"===m&&(h=b.max-b.min>=e-k,B=!d&&q&&h); -m=!r&&(x||v||B||f);p=d&&h||h&&!q&&!A;m?w=3:p&&(q=!0,w=2);t.state!==w&&t.setState(w)})},computeButtonRange:function(a){var c=a.type,d=a.count||1,f={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(f[c])a._range=f[c]*d;else if("month"===c||"year"===c)a._range=864E5*{month:30,year:365}[c]*d;a._offsetMin=b(a.offsetMin,0);a._offsetMax=b(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,d=this.chart.time,f=this[a+ -"Input"];y(b)&&(f.previousValue=f.HCTime,f.HCTime=b);f.value=d.dateFormat(c.inputEditDateFormat||"%Y-%m-%d",f.HCTime);this[a+"DateBox"].attr({text:d.dateFormat(c.inputDateFormat||"%b %e, %Y",f.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];k(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){k(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)}, -drawInput:function(a){function b(){var a=q.value,b=(k.inputDateParser||Date.parse)(a),e=d.xAxis[0],f=d.scroller&&d.scroller.xAxis?d.scroller.xAxis:e,g=f.dataMin,f=f.dataMax;b!==q.previousValue&&(q.previousValue=b,p(b)||(b=a.split("-"),b=Date.UTC(l(b[0]),l(b[1])-1,l(b[2]))),p(b)&&(d.time.useUTC||(b+=6E4*(new Date).getTimezoneOffset()),n?b>c.maxInput.HCTime?b=void 0:bf&&(b=f),void 0!==b&&e.setExtremes(n?b:e.min,n?e.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))} -var c=this,d=c.chart,h=d.renderer,k=d.options.rangeSelector,e=c.div,n="min"===a,q,g,r=this.inputGroup;this[a+"Label"]=g=h.label(u.lang[n?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(r);r.offset+=g.width+5;this[a+"DateBox"]=h=h.label("",r.offset).addClass("highcharts-range-input").attr({padding:2,width:k.inputBoxWidth||90,height:k.inputBoxHeight||17,stroke:k.inputBoxBorderColor||"#cccccc","stroke-width":1,"text-align":"center"}).on("click", -function(){c.showInput(a);c[a+"Input"].focus()}).add(r);r.offset+=h.width+(n?10:0);this[a+"Input"]=q=f("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:d.plotTop+"px"},e);q.onfocus=function(){c.showInput(a)};q.onblur=function(){c.hideInput(a)};q.onchange=b;q.onkeypress=function(a){13===a.keyCode&&b()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a="top"===b.verticalAlign?a.plotTop-a.axisOffset[0]:0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y- -10}},getYTDExtremes:function(a,b,c){var d=this.chart.time,f=new d.Date(a),h=d.get("FullYear",f);c=c?d.Date.UTC(h,0,1):+new d.Date(h,0,1);b=Math.max(b||0,c);f=f.getTime();return{max:Math.min(a||f,f),min:b}},render:function(a,c){var h=this,k=h.chart,l=k.renderer,n=k.container,e=k.options,p=e.exporting&&!1!==e.exporting.enabled&&e.navigation&&e.navigation.buttonOptions,q=u.lang,g=h.div,t=e.rangeSelector,e=t.floating,r=h.buttons,g=h.inputGroup,v=t.buttonTheme,y=t.buttonPosition,z=t.inputPosition,B=t.inputEnabled, -E=v&&v.states,F=k.plotLeft,G,H=h.buttonGroup,K;K=h.rendered;var Y=h.options.verticalAlign,Z=k.legend,aa=Z&&Z.options,ba=y.y,Q=z.y,ca=K||!1,W=0,S=0,T;if(!1!==t.enabled){K||(h.group=K=l.g("range-selector-group").attr({zIndex:7}).add(),h.buttonGroup=H=l.g("range-selector-buttons").add(K),h.zoomText=l.text(q.rangeSelectorZoom,b(F+y.x,F),15).css(t.labelStyle).add(H),G=b(F+y.x,F)+h.zoomText.getBBox().width+5,d(h.buttonOptions,function(a,c){r[c]=l.button(a.text,G,0,function(){var b=a.events&&a.events.click, -e;b&&(e=b.call(a));!1!==e&&h.clickButton(c);h.isActive=!0},v,E&&E.hover,E&&E.select,E&&E.disabled).attr({"text-align":"center"}).add(H);G+=r[c].width+b(t.buttonSpacing,5)}),!1!==B&&(h.div=g=f("div",null,{position:"relative",height:0,zIndex:1}),n.parentNode.insertBefore(g,n),h.inputGroup=g=l.g("input-group").add(K),g.offset=0,h.drawInput("min"),h.drawInput("max")));F=k.plotLeft-k.spacing[3];h.updateButtonStates();p&&this.titleCollision(k)&&"top"===Y&&"right"===y.align&&y.y+H.getBBox().height-12<(p.y|| -0)+p.height&&(W=-40);"left"===y.align?T=y.x-k.spacing[3]:"right"===y.align&&(T=y.x+W-k.spacing[1]);H.align({y:y.y,width:H.getBBox().width,align:y.align,x:T},!0,k.spacingBox);h.group.placed=ca;h.buttonGroup.placed=ca;!1!==B&&(W=p&&this.titleCollision(k)&&"top"===Y&&"right"===z.align&&z.y-g.getBBox().height-12<(p.y||0)+p.height+k.spacing[0]?-40:0,"left"===z.align?T=F:"right"===z.align&&(T=-Math.max(k.axisOffset[1],-W)),g.align({y:z.y,width:g.getBBox().width,align:z.align,x:z.x+T-2},!0,k.spacingBox), -n=g.alignAttr.translateX+g.alignOptions.x-W+g.getBBox().x+2,p=g.alignOptions.width,q=H.alignAttr.translateX+H.getBBox().x,T=H.getBBox().width+20,(z.align===y.align||q+T>n&&n+p>q&&ba=-W?0:-W),translateY:g.alignAttr.translateY+H.getBBox().height+10}),h.setInputValue("min",a),h.setInputValue("max",c),h.inputGroup.placed=ca);h.group.align({verticalAlign:Y},!0,k.spacingBox);a=h.group.getBBox().height+20;c=h.group.alignAttr.translateY; -"bottom"===Y&&(Z=aa&&"bottom"===aa.verticalAlign&&aa.enabled&&!aa.floating?Z.legendHeight+b(aa.margin,10):0,a=a+Z-20,S=c-a-(e?0:t.y)-10);if("top"===Y)e&&(S=0),k.titleOffset&&(S=k.titleOffset+k.options.title.margin),S+=k.margin[0]-k.spacing[0]||0;else if("middle"===Y)if(Q===ba)S=0>Q?c+void 0:c;else if(Q||ba)S=0>Q||0>ba?S-Math.min(Q,ba):c-a+NaN;h.group.translate(t.x,t.y+Math.floor(S));!1!==B&&(h.minInput.style.marginTop=h.group.translateY+"px",h.maxInput.style.marginTop=h.group.translateY+"px");h.rendered= -!0}},getHeight:function(){var a=this.options,b=this.group,c=a.y,d=a.buttonPosition.y,a=a.inputPosition.y,b=b?b.getBBox(!0).height+13+c:0,c=Math.min(a,d);if(0>a&&0>d||0d&&(f?a=c-h:c=a+h);p(a)&&p(c)||(a=c=void 0);return{min:a,max:c}};H.prototype.minFromRange=function(){var a= -this.range,c={month:"Month",year:"FullYear"}[a.type],d,f=this.max,h,k,e=function(a,b){var e=new Date(a),d=e["get"+c]();e["set"+c](d+b);d===e["get"+c]()&&e.setDate(0);return e.getTime()-a};p(a)?(d=f-a,k=a):(d=f+e(f,-a.count),this.chart&&(this.chart.fixedRange=f-d));h=b(this.dataMin,Number.MIN_VALUE);p(d)||(d=h);d<=h&&(d=h,void 0===k&&(k=e(d,a.count)),this.newMax=Math.min(d+k,this.dataMax));p(f)||(d=void 0);return d};G(r,"afterGetContainer",function(){this.options.rangeSelector.enabled&&(this.rangeSelector= -new F(this))});E(r.prototype,"render",function(a,b,c){var f=this.axes,h=this.rangeSelector;h&&(d(f,function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),h.render(),f=h.options.verticalAlign,h.options.floating||("bottom"===f?this.extraBottomMargin=!0:"middle"!==f&&(this.extraTopMargin=!0)));a.call(this,b,c)});G(r,"update",function(a){var b=a.options;a=this.rangeSelector;this.extraTopMargin=this.extraBottomMargin=!1;this.isDirtyBox=!0;a&&(a.render(),b=b.rangeSelector&&b.rangeSelector.verticalAlign|| -a.options&&a.options.verticalAlign,a.options.floating||("bottom"===b?this.extraBottomMargin=!0:"middle"!==b&&(this.extraTopMargin=!0)))});E(r.prototype,"redraw",function(a,b,c){var d=this.rangeSelector;d&&!d.options.floating&&(d.render(),d=d.options.verticalAlign,"bottom"===d?this.extraBottomMargin=!0:"middle"!==d&&(this.extraTopMargin=!0));a.call(this,b,c)});r.prototype.adjustPlotArea=function(){var a=this.rangeSelector;this.rangeSelector&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a), -this.extraBottomMargin&&(this.marginBottom+=a))};r.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();p(c.min)&&d.render(c.min,c.max)}var c,d=a.rangeSelector,f,h;d&&(h=G(a.xAxis[0],"afterSetExtremes",function(a){d.render(a.min,a.max)}),f=G(a,"redraw",b),b());G(a,"destroy",function(){d&&(f(),h())})});a.RangeSelector=F})(K);(function(a){var F=a.addEvent,G=a.arrayMax,H=a.arrayMin,r=a.Axis,k=a.Chart,f=a.defined,u=a.each,y=a.format,v=a.grep,q=a.inArray,d=a.isNumber,c=a.isString, -z=a.map,p=a.merge,n=a.pick,b=a.Point,l=a.Series,h=a.splat,E=a.SVGRenderer,B=a.wrap,t=l.prototype,I=t.init,w=t.processData,m=b.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(b,e,d){var f=c(b)||b.nodeName,g=arguments[f?1:0],l=g.series,m=a.getOptions(),q,r=n(g.navigator&&g.navigator.enabled,m.navigator.enabled,!0),t=r?{startOnTick:!1,endOnTick:!1}:null,u={marker:{enabled:!1,radius:2}},v={shadow:!1,borderWidth:0};g.xAxis=z(h(g.xAxis||{}),function(a,b){return p({minPadding:0,maxPadding:0, -overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},m.xAxis,m.xAxis&&m.xAxis[b],a,{type:"datetime",categories:null},t)});g.yAxis=z(h(g.yAxis||{}),function(a,b){q=n(a.opposite,!0);return p({labels:{y:-2},opposite:q,showLastLabel:!(!a.categories&&"category"!==a.type),title:{text:null}},m.yAxis,m.yAxis&&m.yAxis[b],a)});g.series=null;g=p({chart:{panning:!0,pinchType:"x"},navigator:{enabled:r},scrollbar:{enabled:n(m.scrollbar.enabled,!0)},rangeSelector:{enabled:n(m.rangeSelector.enabled, -!0)},title:{text:null},tooltip:{split:n(m.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1},plotOptions:{line:u,spline:u,area:u,areaspline:u,arearange:u,areasplinerange:u,column:v,columnrange:v,candlestick:v,ohlc:v}},g,{isStock:!0});g.series=l;return f?new k(b,g,d):new k(g,e)};B(r.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.apply(this,[].slice.call(arguments,1))});F(r,"destroy",function(){var a=this.chart,b=this.options&&this.options.top+","+this.options.height;b&&a._labelPanes&&a._labelPanes[b]===this&&delete a._labelPanes[b]});B(r.prototype,"getPlotLinePath",function(b,e,h,k,g,l){var m=this,p=this.isLinked&&!this.series?this.linkedParent.series:this.series,r=m.chart,t=r.renderer,v=m.left,w=m.top,x,y,D,B,C=[],E=[],F,G;if("xAxis"!==m.coll&&"yAxis"!== -m.coll)return b.apply(this,[].slice.call(arguments,1));E=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=m.options[b];return d(a)?[r[b][a]]:c(a)?[r.get(a)]:z(p,function(a){return a[b]})}(m.coll);u(m.isXAxis?r.yAxis:r.xAxis,function(a){if(f(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=f(a.options[b])?r[b][a.options[b]]:r[b][0];m===b&&E.push(a)}});F=E.length?[]:[m.isXAxis?r.yAxis[0]:r.xAxis[0]];u(E,function(b){-1!==q(b,F)||a.find(F,function(a){return a.pos=== -b.pos&&a.len&&b.len})||F.push(b)});G=n(l,m.translate(e,null,null,k));d(G)&&(m.horiz?u(F,function(a){var b;y=a.pos;B=y+a.len;x=D=Math.round(G+m.transB);if(xv+m.width)g?x=D=Math.min(Math.max(v,x),v+m.width):b=!0;b||C.push("M",x,y,"L",D,B)}):u(F,function(a){var b;x=a.pos;D=x+a.len;y=B=Math.round(w+m.height-G);if(yw+m.height)g?y=B=Math.min(Math.max(w,y),m.top+m.height):b=!0;b||C.push("M",x,y,"L",D,B)}));return 0this.max?"hidden":"visible"});g=l.getBBox();if(h){if(q&&!b||!q&&b)k=l.y-g.height}else k=l.y-g.height/2;h?(b=c-g.x,c=c+this.width-g.x):(b="left"===this.labelAlign?c:0,c="right"=== -this.labelAlign?c+this.width:d.chartWidth);l.translateX=c&&(t=-(l.translateX+g.width-c));l.attr({x:a+t,y:k,anchorX:h?a:this.opposite?0:d.chartWidth,anchorY:h?this.opposite?d.chartHeight:0:k+g.height/2})}});t.init=function(){I.apply(this,arguments);this.setCompare(this.options.compare)};t.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,c){var e=this.compareValue;if(void 0!==b&&void 0!==e)return b="value"===a?b-e:b/e*100-(100=== -this.options.compareBase?0:100),c&&(c.change=b),b}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};t.processData=function(){var a,b=-1,c,f,g=!0===this.options.compareStart?0:1,h,k;w.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,f=this.processedYData,h=f.length,this.pointArrayMap&&(b=q("close",this.pointArrayMap),-1===b&&(b=q(this.pointValKey||"y",this.pointArrayMap))),a=0;a=this.xAxis.min&& -0!==k){this.compareValue=k;break}};B(t,"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=H(b),this.dataMax=G(b))});r.prototype.setCompare=function(a,b){this.isXAxis||(u(this.series,function(b){b.setCompare(a)}),n(b,!0)&&this.chart.redraw())};b.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",(0c?this:a,a=(c.max-c.min)*c.transA,c.pixelPadding=c.len-a,c.minPixelPadding= -c.pixelPadding/2,a=c.fixTo)){a=a[1]-c.toValue(a[0],!0);a*=c.transA;if(Math.abs(a)>c.minPixelPadding||c.min===c.dataMin&&c.max===c.dataMax)a=0;c.minPixelPadding-=a}});h(f,"render",function(){this.fixTo=null})})(w);(function(a){var h=a.addEvent,f=a.Axis,l=a.Chart,c=a.color,p,n=a.each,u=a.extend,t=a.isNumber,g=a.Legend,b=a.LegendSymbolMixin,d=a.noop,k=a.merge,q=a.pick;a.ColorAxis||(p=a.ColorAxis=function(){this.init.apply(this,arguments)},u(p.prototype,f.prototype),u(p.prototype,{defaultColorAxisOptions:{lineWidth:0, -minPadding:0,maxPadding:0,gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01},labels:{overflow:"justify",rotation:0},minColor:"#e6ebf5",maxColor:"#003399",tickLength:5,showInLegend:!0},keepProps:["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"].concat(f.prototype.keepProps),init:function(a,b){var e="vertical"!==a.options.legend.layout,r;this.coll="colorAxis";r=k(this.defaultColorAxisOptions,{side:e?2:1, -reversed:!e},b,{opposite:!e,showEmpty:!1,title:null,visible:a.options.legend.enabled});f.prototype.init.call(this,a,r);b.dataClasses&&this.initDataClasses(b);this.initStops();this.horiz=e;this.zoomEnabled=!1;this.defaultLegendLength=200},initDataClasses:function(a){var b,e=0,r=this.chart.options.chart.colorCount,v=this.options,d=a.dataClasses.length;this.dataClasses=b=[];this.legendItems=[];n(a.dataClasses,function(a,m){a=k(a);b.push(a);"category"===v.dataClassColor?(a.colorIndex=e,e++,e===r&&(e= -0)):a.color=c(v.minColor).tweenTo(c(v.maxColor),2>d?.5:m/(d-1))})},setTickPositions:function(){if(!this.dataClasses)return f.prototype.setTickPositions.call(this)},initStops:function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];n(this.stops,function(a){a.color=c(a[1])})},setOptions:function(a){f.prototype.setOptions.call(this,a);this.options.crosshair=this.options.marker},setAxisSize:function(){var a=this.legendSymbol,b=this.chart,e=b.options.legend||{},x, -v;a?(this.left=e=a.attr("x"),this.top=x=a.attr("y"),this.width=v=a.attr("width"),this.height=a=a.attr("height"),this.right=b.chartWidth-e-v,this.bottom=b.chartHeight-x-a,this.len=this.horiz?v:a,this.pos=this.horiz?e:x):this.len=(this.horiz?e.symbolWidth:e.symbolHeight)||this.defaultLegendLength},normalizedValue:function(a){this.isLog&&(a=this.val2lin(a));return 1-(this.max-a)/(this.max-this.min||1)},toColor:function(a,b){var e=this.stops,m,r,d=this.dataClasses,k,c;if(d)for(c=d.length;c--;){if(k=d[c], -m=k.from,e=k.to,(void 0===m||a>=m)&&(void 0===e||a<=e)){b&&(b.dataClass=c,b.colorIndex=k.colorIndex);break}}else{a=this.normalizedValue(a);for(c=e.length;c--&&!(a>e[c][0]););m=e[c]||e[c+1];e=e[c+1]||m;a=1-(e[0]-a)/(e[0]-m[0]||1);r=m.color.tweenTo(e.color,a)}return r},getOffset:function(){var a=this.legendGroup,b=this.chart.axisOffset[this.side];a&&(this.axisParent=a,f.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]= -b)},setLegendColor:function(){var a,b=this.reversed;a=b?1:0;b=b?0:1;a=this.horiz?[a,0,b,0]:[0,b,0,a];this.legendColor={linearGradient:{x1:a[0],y1:a[1],x2:a[2],y2:a[3]},stops:this.stops}},drawLegendSymbol:function(a,b){var e=a.padding,m=a.options,d=this.horiz,k=q(m.symbolWidth,d?this.defaultLegendLength:12),r=q(m.symbolHeight,d?12:this.defaultLegendLength),c=q(m.labelPadding,d?16:30),m=q(m.itemDistance,10);this.setLegendColor();b.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,k,r).attr({zIndex:1}).add(b.legendGroup); -this.legendItemWidth=k+e+(d?m:c);this.legendItemHeight=r+e+(d?c:0)},setState:function(a){n(this.series,function(b){b.setState(a)})},visible:!0,setVisible:d,getSeriesExtremes:function(){var a=this.series,b=a.length;this.dataMin=Infinity;for(this.dataMax=-Infinity;b--;)void 0!==a[b].valueMin&&(this.dataMin=Math.min(this.dataMin,a[b].valueMin),this.dataMax=Math.max(this.dataMax,a[b].valueMax))},drawCrosshair:function(a,b){var e=b&&b.plotX,d=b&&b.plotY,k,m=this.pos,c=this.len;b&&(k=this.toPixels(b[b.series.colorKey]), -km+c&&(k=m+c+2),b.plotX=k,b.plotY=this.len-k,f.prototype.drawCrosshair.call(this,a,b),b.plotX=e,b.plotY=d,this.cross&&!this.cross.addedToColorAxis&&this.legendGroup&&(this.cross.addClass("highcharts-coloraxis-marker").add(this.legendGroup),this.cross.addedToColorAxis=!0))},getPlotLinePath:function(a,b,e,d,k){return t(k)?this.horiz?["M",k-4,this.top-6,"L",k+4,this.top-6,k,this.top,"Z"]:["M",this.left,k,"L",this.left-6,k+6,this.left-6,k-6,"Z"]:f.prototype.getPlotLinePath.call(this,a,b,e, -d)},update:function(a,b){var e=this.chart,d=e.legend;n(this.series,function(a){a.isDirtyData=!0});a.dataClasses&&d.allItems&&(n(d.allItems,function(a){a.isDataClass&&a.legendGroup&&a.legendGroup.destroy()}),e.isDirtyLegend=!0);e.options[this.coll]=k(this.userOptions,a);f.prototype.update.call(this,a,b);this.legendItem&&(this.setLegendColor(),d.colorizeItem(this,!0))},remove:function(){this.legendItem&&this.chart.legend.destroyItem(this);f.prototype.remove.call(this)},getDataClassLegendSymbols:function(){var k= -this,c=this.chart,e=this.legendItems,x=c.options.legend,g=x.valueDecimals,q=x.valueSuffix||"",p;e.length||n(this.dataClasses,function(m,x){var r=!0,v=m.from,f=m.to;p="";void 0===v?p="\x3c ":void 0===f&&(p="\x3e ");void 0!==v&&(p+=a.numberFormat(v,g)+q);void 0!==v&&void 0!==f&&(p+=" - ");void 0!==f&&(p+=a.numberFormat(f,g)+q);e.push(u({chart:c,name:p,options:{},drawLegendSymbol:b.drawRectangle,visible:!0,setState:d,isDataClass:!0,setVisible:function(){r=this.visible=!r;n(k.series,function(a){n(a.points, -function(a){a.dataClass===x&&a.setVisible(r)})});c.legend.colorizeItem(this,r)}},m))});return e},name:""}),n(["fill","stroke"],function(b){a.Fx.prototype[b+"Setter"]=function(){this.elem.attr(b,c(this.start).tweenTo(c(this.end),this.pos),null,!0)}}),h(l,"afterGetAxes",function(){var a=this.options.colorAxis;this.colorAxis=[];a&&new p(this,a)}),h(g,"afterGetAllItems",function(b){var d=[],e=this.chart.colorAxis[0];e&&e.options&&(e.options.showInLegend&&(e.options.dataClasses?d=e.getDataClassLegendSymbols(): -d.push(e)),n(e.series,function(e){a.erase(b.allItems,e)}));for(;d.length;)b.allItems.unshift(d.pop())}),h(g,"afterColorizeItem",function(a){a.visible&&a.item.legendColor&&a.item.legendSymbol.attr({fill:a.item.legendColor})}),h(g,"afterUpdate",function(a,b,e){this.chart.colorAxis[0]&&this.chart.colorAxis[0].update({},e)}))})(w);(function(a){var h=a.defined,f=a.each,l=a.noop;a.colorPointMixin={isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value},setVisible:function(a){var c= -this,n=a?"show":"hide";f(["graphic","dataLabel"],function(a){if(c[a])c[a][n]()})},setState:function(c){a.Point.prototype.setState.call(this,c);this.graphic&&this.graphic.attr({zIndex:"hover"===c?1:0})}};a.colorSeriesMixin={pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],optionalAxis:"colorAxis",trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:l,parallelArrays:["x","y","value"],colorKey:"value",translateColors:function(){var a=this,p=this.options.nullColor,n=this.colorAxis, -l=this.colorKey;f(this.data,function(c){var g=c[l];if(g=c.options.color||(c.isNull?p:n&&void 0!==g?n.toColor(g,c):c.color||a.color))c.color=g})},colorAttribs:function(a){var c={};h(a.color)&&(c[this.colorProp||"fill"]=a.color);return c}}})(w);(function(a){function h(a){a&&(a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)}function f(a){this.init(a)}var l=a.addEvent,c=a.Chart,p=a.doc,n=a.each,u=a.extend,t=a.merge,g=a.pick;f.prototype.init=function(a){this.chart= -a;a.mapNavButtons=[]};f.prototype.update=function(b){var d=this.chart,k=d.options.mapNavigation,c,r=function(a){this.handler.call(d,a);h(a)},m=d.mapNavButtons;b&&(k=d.options.mapNavigation=t(d.options.mapNavigation,b));for(;m.length;)m.pop().destroy();g(k.enableButtons,k.enabled)&&!d.renderer.forExport&&a.objectEach(k.buttons,function(a,b){c=t(k.buttonOptions,a);a=d.renderer.button(c.text,0,0,r,void 0,void 0,void 0,0,"zoomIn"===b?"topbutton":"bottombutton").addClass("highcharts-map-navigation").attr({width:c.width, -height:c.height,title:d.options.lang[b],padding:c.padding,zIndex:5}).add();a.handler=c.onclick;a.align(u(c,{width:a.width,height:2*a.height}),null,c.alignTo);l(a.element,"dblclick",h);m.push(a)});this.updateEvents(k)};f.prototype.updateEvents=function(a){var b=this.chart;g(a.enableDoubleClickZoom,a.enabled)||a.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||l(b.container,"dblclick",function(a){b.pointer.onContainerDblClick(a)}):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick()); -g(a.enableMouseWheelZoom,a.enabled)?this.unbindMouseWheel=this.unbindMouseWheel||l(b.container,void 0===p.onmousewheel?"DOMMouseScroll":"mousewheel",function(a){b.pointer.onContainerMouseWheel(a);h(a);return!1}):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())};u(c.prototype,{fitToBox:function(a,d){n([["x","width"],["y","height"]],function(b){var c=b[0];b=b[1];a[c]+a[b]>d[c]+d[b]&&(a[b]>d[b]?(a[b]=d[b],a[c]=d[c]):a[c]=d[c]+d[b]-a[b]);a[b]>d[b]&&(a[b]=d[b]);a[c]=b.dataMax-b.dataMin&&d.y<=e.dataMin&&d.height>=e.dataMax-e.dataMin;q&&(b.fixTo=[q-b.pos,c]);r&&(e.fixTo=[r-e.pos,k]);void 0===a||v?(b.setExtremes(void 0, -void 0,!1),e.setExtremes(void 0,void 0,!1)):(b.setExtremes(d.x,d.x+d.width,!1),e.setExtremes(d.y,d.y+d.height,!1));this.redraw()}});l(c,"beforeRender",function(){this.mapNavigation=new f(this);this.mapNavigation.update()})})(w);(function(a){var h=a.extend,f=a.pick,l=a.Pointer;a=a.wrap;h(l.prototype,{onContainerDblClick:function(a){var c=this.chart;a=this.normalize(a);c.options.mapNavigation.enableDoubleClickZoomTo?c.pointer.inClass(a.target,"highcharts-tracker")&&c.hoverPoint&&c.hoverPoint.zoomTo(): -c.isInsidePlot(a.chartX-c.plotLeft,a.chartY-c.plotTop)&&c.mapZoom(.5,c.xAxis[0].toValue(a.chartX),c.yAxis[0].toValue(a.chartY),a.chartX,a.chartY)},onContainerMouseWheel:function(a){var c=this.chart,f;a=this.normalize(a);f=a.detail||-(a.wheelDelta/120);c.isInsidePlot(a.chartX-c.plotLeft,a.chartY-c.plotTop)&&c.mapZoom(Math.pow(c.options.mapNavigation.mouseWheelSensitivity,f),c.xAxis[0].toValue(a.chartX),c.yAxis[0].toValue(a.chartY),a.chartX,a.chartY)}});a(l.prototype,"zoomOption",function(a){var c= -this.chart.options.mapNavigation;f(c.enableTouchZoom,c.enabled)&&(this.chart.options.chart.pinchType="xy");a.apply(this,[].slice.call(arguments,1))});a(l.prototype,"pinchTranslate",function(a,f,l,h,t,g,b){a.call(this,f,l,h,t,g,b);"map"===this.chart.options.chart.type&&this.hasZoom&&(a=h.scaleX>h.scaleY,this.pinchTranslateDirection(!a,f,l,h,t,g,b,a?h.scaleX:h.scaleY))})})(w);(function(a){var h=a.colorPointMixin,f=a.each,l=a.extend,c=a.isNumber,p=a.map,n=a.merge,u=a.noop,t=a.pick,g=a.isArray,b=a.Point, -d=a.Series,k=a.seriesType,q=a.seriesTypes,r=a.splat,m=void 0!==a.doc.documentElement.style.vectorEffect;k("map","scatter",{allAreas:!0,animation:!1,marker:null,stickyTracking:!1,joinBy:"hc-key",dataLabels:{formatter:function(){return this.point.value},inside:!0,verticalAlign:"middle",crop:!1,overflow:!1,padding:0},turboThreshold:0,tooltip:{followPointer:!0,pointFormat:"{point.name}: {point.value}\x3cbr/\x3e"},states:{normal:{animation:!0},hover:{halo:null,brightness:.2}}},n(a.colorSeriesMixin,{type:"map", -getExtremesFromAll:!0,useMapGeometry:!0,forceDL:!0,searchPoint:u,directTouch:!0,preserveAspectRatio:!0,pointArrayMap:["value"],getBox:function(e){var b=Number.MAX_VALUE,d=-b,k=b,g=-b,m=b,r=b,q=this.xAxis,y=this.yAxis,l;f(e||[],function(e){if(e.path){"string"===typeof e.path&&(e.path=a.splitPath(e.path));var v=e.path||[],f=v.length,q=!1,x=-b,y=b,h=-b,p=b,n=e.properties;if(!e._foundBox){for(;f--;)c(v[f])&&(q?(x=Math.max(x,v[f]),y=Math.min(y,v[f])):(h=Math.max(h,v[f]),p=Math.min(p,v[f])),q=!q);e._midX= -y+(x-y)*t(e.middleX,n&&n["hc-middle-x"],.5);e._midY=p+(h-p)*t(e.middleY,n&&n["hc-middle-y"],.5);e._maxX=x;e._minX=y;e._maxY=h;e._minY=p;e.labelrank=t(e.labelrank,(x-y)*(h-p));e._foundBox=!0}d=Math.max(d,e._maxX);k=Math.min(k,e._minX);g=Math.max(g,e._maxY);m=Math.min(m,e._minY);r=Math.min(e._maxX-e._minX,e._maxY-e._minY,r);l=!0}});l&&(this.minY=Math.min(m,t(this.minY,b)),this.maxY=Math.max(g,t(this.maxY,-b)),this.minX=Math.min(k,t(this.minX,b)),this.maxX=Math.max(d,t(this.maxX,-b)),q&&void 0===q.options.minRange&& -(q.minRange=Math.min(5*r,(this.maxX-this.minX)/5,q.minRange||b)),y&&void 0===y.options.minRange&&(y.minRange=Math.min(5*r,(this.maxY-this.minY)/5,y.minRange||b)))},getExtremes:function(){d.prototype.getExtremes.call(this,this.valueData);this.chart.hasRendered&&this.isDirtyData&&this.getBox(this.options.data);this.valueMin=this.dataMin;this.valueMax=this.dataMax;this.dataMin=this.minY;this.dataMax=this.maxY},translatePath:function(a){var e=!1,b=this.xAxis,d=this.yAxis,k=b.min,g=b.transA,b=b.minPixelPadding, -m=d.min,r=d.transA,d=d.minPixelPadding,f,q=[];if(a)for(f=a.length;f--;)c(a[f])?(q[f]=e?(a[f]-k)*g+b:(a[f]-m)*r+d,e=!e):q[f]=a[f];return q},setData:function(e,b,k,m){var v=this.options,q=this.chart.options.chart,x=q&&q.map,l=v.mapData,h=v.joinBy,t=null===h,B=v.keys||this.pointArrayMap,z=[],u={},A=this.chart.mapTransforms;!l&&x&&(l="string"===typeof x?a.maps[x]:x);t&&(h="_i");h=this.joinBy=r(h);h[1]||(h[1]=h[0]);e&&f(e,function(b,d){var k=0;if(c(b))e[d]={value:b};else if(g(b)){e[d]={};!v.keys&&b.length> -B.length&&"string"===typeof b[0]&&(e[d]["hc-key"]=b[0],++k);for(var m=0;mr&&.99h&&(h=r=1,l=Math.round(l),p=Math.round(p)), -z=this.transformGroup,k.renderer.globalAnimation?(t=z.attr("translateX"),u=z.attr("translateY"),w=z.attr("scaleX"),H=z.attr("scaleY"),z.attr({animator:0}).animate({animator:1},{step:function(a,b){z.attr({translateX:t+(l-t)*b.pos,translateY:u+(p-u)*b.pos,scaleX:w+(r-w)*b.pos,scaleY:H+(h-H)*b.pos})}})):z.attr({translateX:l,translateY:p,scaleX:r,scaleY:h}));m||a.group.element.setAttribute("stroke-width",a.options[a.pointAttrToOptions&&a.pointAttrToOptions["stroke-width"]||"borderWidth"]/(r||1));this.drawMapDataLabels()}, -drawMapDataLabels:function(){d.prototype.drawDataLabels.call(this);this.dataLabelsGroup&&this.dataLabelsGroup.clip(this.chart.clipRect)},render:function(){var a=this,b=d.prototype.render;a.chart.renderer.isVML&&3E3=this.minPxSize/2?(g.marker=a.extend(g.marker,{radius:m,width:2*m,height:2*m}),g.dlBox={x:g.plotX-m,y:g.plotY-m,width:2*m,height:2*m}):g.shapeArgs=g.plotY=g.dlBox=void 0},alignDataLabel:d.column.prototype.alignDataLabel,buildKDTree:n,applyZones:n},{haloPath:function(a){return g.prototype.haloPath.call(this, -0===a?0:(this.marker?this.marker.radius||0:0)+a)},ttBelow:!1});l.prototype.beforePadding=function(){var a=this,b=this.len,d=this.chart,g=0,e=b,l=this.isXAxis,n=l?"xData":"yData",w=this.min,C={},I=Math.min(d.plotWidth,d.plotHeight),E=Number.MAX_VALUE,F=-Number.MAX_VALUE,y=this.max-w,D=b/y,G=[];c(this.series,function(b){var e=b.options;!b.bubblePadding||!b.visible&&d.options.chart.ignoreHiddenSeries||(a.allowZoomOutside=!0,G.push(b),l&&(c(["minSize","maxSize"],function(a){var b=e[a],d=/%$/.test(b), -b=t(b);C[a]=d?I*b/100:b}),b.minPxSize=C.minSize,b.maxPxSize=Math.max(C.maxSize,C.minSize),b=b.zData,b.length&&(E=u(e.zMin,Math.min(E,Math.max(f(b),!1===e.displayNegative?e.zThreshold:-Number.MAX_VALUE))),F=u(e.zMax,Math.max(F,h(b))))))});c(G,function(b){var d=b[n],c=d.length,k;l&&b.getRadii(E,F,b.minPxSize,b.maxPxSize);if(0e,g=b[d][1]>e,c!==g&&m<(b[d][0]-b[a][0])*(e-b[a][1])/(b[d][1]-b[a][1])+b[a][0]&&(f=!f);return f}var f=a.Chart,l=a.each,c=a.extend,p=a.format,n=a.merge,u=a.win,t=a.wrap;f.prototype.transformFromLatLon=function(c,b){if(void 0=== -u.proj4)return a.error(21),{x:0,y:null};c=u.proj4(b.crs,[c.lon,c.lat]);var d=b.cosAngle||b.rotation&&Math.cos(b.rotation),k=b.sinAngle||b.rotation&&Math.sin(b.rotation);c=b.rotation?[c[0]*d+c[1]*k,-c[0]*k+c[1]*d]:c;return{x:((c[0]-(b.xoffset||0))*(b.scale||1)+(b.xpan||0))*(b.jsonres||1)+(b.jsonmarginX||0),y:(((b.yoffset||0)-c[1])*(b.scale||1)+(b.ypan||0))*(b.jsonres||1)-(b.jsonmarginY||0)}};f.prototype.transformToLatLon=function(c,b){if(void 0===u.proj4)a.error(21);else{c={x:((c.x-(b.jsonmarginX|| -0))/(b.jsonres||1)-(b.xpan||0))/(b.scale||1)+(b.xoffset||0),y:((-c.y-(b.jsonmarginY||0))/(b.jsonres||1)+(b.ypan||0))/(b.scale||1)+(b.yoffset||0)};var d=b.cosAngle||b.rotation&&Math.cos(b.rotation),k=b.sinAngle||b.rotation&&Math.sin(b.rotation);b=u.proj4(b.crs,"WGS84",b.rotation?{x:c.x*d+c.y*-k,y:c.x*k+c.y*d}:c);return{lat:b.y,lon:b.x}}};f.prototype.fromPointToLatLon=function(c){var b=this.mapTransforms,d;if(b){for(d in b)if(b.hasOwnProperty(d)&&b[d].hitZone&&h({x:c.x,y:-c.y},b[d].hitZone.coordinates[0]))return this.transformToLatLon(c, -b[d]);return this.transformToLatLon(c,b["default"])}a.error(22)};f.prototype.fromLatLonToPoint=function(c){var b=this.mapTransforms,d,k;if(!b)return a.error(22),{x:0,y:null};for(d in b)if(b.hasOwnProperty(d)&&b[d].hitZone&&(k=this.transformFromLatLon(c,b[d]),h({x:k.x,y:-k.y},b[d].hitZone.coordinates[0])))return k;return this.transformFromLatLon(c,b["default"])};a.geojson=function(a,b,d){var k=[],f=[],g=function(a){var b,d=a.length;f.push("M");for(b=0;b [:loader, :jspdf] - sh "mkdir -p lib/daru/view/adapters/js/googlecharts_js/" + sh "mkdir -p lib/assets/javascripts/googlecharts_js/" # FIXME: Updating jsapi is causing error when we run GoogleCharts in IRuby notebook. # refer: https://developers.google.com/chart/interactive/docs/basic_load_libs#update-library-loader-code # refer this issue: https://github.com/SciRuby/daru-view/issues/99 @@ -29,7 +29,7 @@ namespace :googlecharts do task :jspdf do say "Grabbing jspdf.min.js from the cloudfare..." do - sh "curl -# https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js -L --compressed -o lib/daru/view/adapters/js/googlecharts_js/jspdf.min.js" + sh "curl -# https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js -L --compressed -o lib/assets/javascripts/googlecharts_js/jspdf.min.js" end end end