/*
 Highstock JS v7.2.1 (2019-10-31)

 (c) 2009-2018 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(R,K){"object"===typeof module&&module.exports?(K["default"]=K,module.exports=R.document?K(R):K):"function"===typeof define&&define.amd?define("highcharts/highstock",function(){return K(R)}):(R.Highcharts&&R.Highcharts.error(16,!0),R.Highcharts=K(R))})("undefined"!==typeof window?window:this,function(R){function K(c,g,I,G){c.hasOwnProperty(g)||(c[g]=G.apply(null,I))}var D={};K(D,"parts/Globals.js",[],function(){var c="undefined"!==typeof R?R:"undefined"!==typeof window?window:{},g=c.document,
I=c.navigator&&c.navigator.userAgent||"",G=g&&g.createElementNS&&!!g.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,H=/(edge|msie|trident)/i.test(I)&&!c.opera,y=-1!==I.indexOf("Firefox"),w=-1!==I.indexOf("Chrome"),x=y&&4>parseInt(I.split("Firefox/")[1],10);return{product:"Highcharts",version:"7.2.1",deg2rad:2*Math.PI/360,doc:g,hasBidiBug:x,hasTouch:!!c.TouchEvent,isMS:H,isWebKit:-1!==I.indexOf("AppleWebKit"),isFirefox:y,isChrome:w,isSafari:!w&&-1!==I.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(I),
SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:G,win:c,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}});K(D,"parts/Utilities.js",[D["parts/Globals.js"]],function(c){function g(b,a){return parseInt(b,a||10)}function I(b){return"string"===typeof b}function G(b){b=Object.prototype.toString.call(b);return"[object Array]"===b||"[object Array Iterator]"===b}function H(b,a){return!!b&&"object"===typeof b&&(!a||
!G(b))}function y(b){return H(b)&&"number"===typeof b.nodeType}function w(b){var a=b&&b.constructor;return!(!H(b,!0)||y(b)||!a||!a.name||"Object"===a.name)}function x(b){return"number"===typeof b&&!isNaN(b)&&Infinity>b&&-Infinity<b}function E(b){return"undefined"!==typeof b&&null!==b}function F(b,a,e){var d;I(a)?E(e)?b.setAttribute(a,e):b&&b.getAttribute&&((d=b.getAttribute(a))||"class"!==a||(d=b.getAttribute(a+"Name"))):p(a,function(a,d){b.setAttribute(d,a)});return d}function t(b,a){var d;b||(b=
{});for(d in a)b[d]=a[d];return b}function m(){for(var b=arguments,a=b.length,e=0;e<a;e++){var k=b[e];if("undefined"!==typeof k&&null!==k)return k}}function p(b,a,e){for(var d in b)Object.hasOwnProperty.call(b,d)&&a.call(e||b[d],b[d],d,b)}c.timers=[];var q=c.charts,h=c.doc,a=c.win;c.error=function(b,d,e,k){var C=x(b),h=C?"Highcharts error #"+b+": www.highcharts.com/errors/"+b+"/":b.toString(),r=function(){if(d)throw Error(h);a.console&&console.log(h)};if("undefined"!==typeof k){var n="";C&&(h+="?");
c.objectEach(k,function(b,a){n+="\n"+a+": "+b;C&&(h+=encodeURI(a)+"="+encodeURI(b))});h+=n}e?c.fireEvent(e,"displayError",{code:b,message:h,params:k},r):r()};c.Fx=function(b,a,e){this.options=a;this.elem=b;this.prop=e};c.Fx.prototype={dSetter:function(){var b=this.paths[0],a=this.paths[1],e=[],k=this.now,C=b.length;if(1===k)e=this.toD;else if(C===a.length&&1>k)for(;C--;){var h=parseFloat(b[C]);e[C]=isNaN(h)||"A"===a[C-4]||"A"===a[C-5]?a[C]:k*parseFloat(""+(a[C]-h))+h}else e=a;this.elem.attr("d",e,
null,!0)},update:function(){var b=this.elem,a=this.prop,e=this.now,k=this.options.step;if(this[a+"Setter"])this[a+"Setter"]();else b.attr?b.element&&b.attr(a,e,null,!0):b.style[a]=e+this.unit;k&&k.call(b,e,this)},run:function(b,d,e){var k=this,C=k.options,h=function(b){return h.stopped?!1:k.step(b)},r=a.requestAnimationFrame||function(b){setTimeout(b,13)},n=function(){for(var b=0;b<c.timers.length;b++)c.timers[b]()||c.timers.splice(b--,1);c.timers.length&&r(n)};b!==d||this.elem["forceAnimate:"+this.prop]?
(this.startTime=+new Date,this.start=b,this.end=d,this.unit=e,this.now=this.start,this.pos=0,h.elem=this.elem,h.prop=this.prop,h()&&1===c.timers.push(h)&&r(n)):(delete C.curAnim[this.prop],C.complete&&0===Object.keys(C.curAnim).length&&C.complete.call(this.elem))},step:function(b){var a=+new Date,e=this.options,k=this.elem,h=e.complete,c=e.duration,r=e.curAnim;if(k.attr&&!k.element)b=!1;else if(b||a>=c+this.startTime){this.now=this.end;this.pos=1;this.update();var n=r[this.prop]=!0;p(r,function(b){!0!==
b&&(n=!1)});n&&h&&h.call(k);b=!1}else this.pos=e.easing((a-this.startTime)/c),this.now=this.start+(this.end-this.start)*this.pos,this.update(),b=!0;return b},initPath:function(b,a,e){function d(b){for(B=b.length;B--;){var a="M"===b[B]||"L"===b[B];var l=/[a-zA-Z]/.test(b[B+3]);a&&l&&b.splice(B+1,0,b[B+1],b[B+2],b[B+1],b[B+2])}}function h(b,a){for(;b.length<m;){b[0]=a[m-b.length];var f=b.slice(0,l);[].splice.apply(b,[0,0].concat(f));A&&(f=b.slice(b.length-l),[].splice.apply(b,[b.length,0].concat(f)),
B--)}b[0]="M"}function c(b,a){for(var d=(m-b.length)/l;0<d&&d--;)v=b.slice().splice(b.length/u-l,l*u),v[0]=a[m-l-d*l],f&&(v[l-6]=v[l-2],v[l-5]=v[l-1]),[].splice.apply(b,[b.length/u,0].concat(v)),A&&d--}a=a||"";var r=b.startX,n=b.endX,f=-1<a.indexOf("C"),l=f?7:3,v,B;a=a.split(" ");e=e.slice();var A=b.isArea,u=A?2:1;f&&(d(a),d(e));if(r&&n){for(B=0;B<r.length;B++)if(r[B]===n[0]){var J=B;break}else if(r[0]===n[n.length-r.length+B]){J=B;var L=!0;break}else if(r[r.length-1]===n[n.length-r.length+B]){J=
r.length-B;break}"undefined"===typeof J&&(a=[])}if(a.length&&x(J)){var m=e.length+J*u*l;L?(h(a,e),c(e,a)):(h(e,a),c(a,e))}return[a,e]},fillSetter:function(){c.Fx.prototype.strokeSetter.apply(this,arguments)},strokeSetter:function(){this.elem.attr(this.prop,c.color(this.start).tweenTo(c.color(this.end),this.pos),null,!0)}};c.merge=function(){var b,a=arguments,e={},k=function(b,a){"object"!==typeof b&&(b={});p(a,function(d,f){!H(d,!0)||w(d)||y(d)?b[f]=a[f]:b[f]=k(b[f]||{},d)});return b};!0===a[0]&&
(e=a[1],a=Array.prototype.slice.call(a,2));var h=a.length;for(b=0;b<h;b++)e=k(e,a[b]);return e};c.clearTimeout=function(b){E(b)&&clearTimeout(b)};c.css=function(b,a){c.isMS&&!c.svg&&a&&"undefined"!==typeof a.opacity&&(a.filter="alpha(opacity="+100*a.opacity+")");t(b.style,a)};c.createElement=function(b,a,e,k,C){b=h.createElement(b);var d=c.css;a&&t(b,a);C&&d(b,{padding:"0",border:"none",margin:"0"});e&&d(b,e);k&&k.appendChild(b);return b};c.extendClass=function(b,a){var d=function(){};d.prototype=
new b;t(d.prototype,a);return d};c.pad=function(b,a,e){return Array((a||2)+1-String(b).replace("-","").length).join(e||"0")+b};c.relativeLength=function(b,a,e){return/%$/.test(b)?a*parseFloat(b)/100+(e||0):parseFloat(b)};c.wrap=function(b,a,e){var d=b[a];b[a]=function(){var b=Array.prototype.slice.call(arguments),a=arguments,k=this;k.proceed=function(){d.apply(k,arguments.length?arguments:a)};b.unshift(d);b=e.apply(this,b);k.proceed=null;return b}};c.datePropsToTimestamps=function(b){p(b,function(a,
e){H(a)&&"function"===typeof a.getTime?b[e]=a.getTime():(H(a)||G(a))&&c.datePropsToTimestamps(a)})};c.formatSingle=function(b,a,e){var d=/\.([0-9])/,h=c.defaultOptions.lang;/f$/.test(b)?(e=(e=b.match(d))?e[1]:-1,null!==a&&(a=c.numberFormat(a,e,h.decimalPoint,-1<b.indexOf(",")?h.thousandsSep:""))):a=(e||c.time).dateFormat(b,a);return a};c.format=function(b,a,e){for(var d="{",h=!1,m,r,n,f,l=[],v;b;){d=b.indexOf(d);if(-1===d)break;m=b.slice(0,d);if(h){m=m.split(":");r=m.shift().split(".");f=r.length;
v=a;for(n=0;n<f;n++)v&&(v=v[r[n]]);m.length&&(v=c.formatSingle(m.join(":"),v,e));l.push(v)}else l.push(m);b=b.slice(d+1);d=(h=!h)?"}":"{"}l.push(b);return l.join("")};c.getMagnitude=function(b){return Math.pow(10,Math.floor(Math.log(b)/Math.LN10))};c.normalizeTickInterval=function(b,a,e,k,h){var d=b;e=m(e,1);var r=b/e;a||(a=h?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===k&&(1===e?a=a.filter(function(b){return 0===b%1}):.1>=e&&(a=[1/e])));for(k=0;k<a.length&&!(d=a[k],h&&d*e>=b||!h&&r<=(a[k]+
(a[k+1]||a[k]))/2);k++);return d=c.correctFloat(d*e,-Math.round(Math.log(.001)/Math.LN10))};c.stableSort=function(b,a){var d=b.length,k,h;for(h=0;h<d;h++)b[h].safeI=h;b.sort(function(b,d){k=a(b,d);return 0===k?b.safeI-d.safeI:k});for(h=0;h<d;h++)delete b[h].safeI};c.correctFloat=function(b,a){return parseFloat(b.toPrecision(a||14))};c.animObject=function(b){return H(b)?c.merge(b):{duration:b?500:0}};c.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};
c.numberFormat=function(b,a,e,k){b=+b||0;a=+a;var d=c.defaultOptions.lang,h=(b.toString().split(".")[1]||"").split("e")[0].length,r=b.toString().split("e");if(-1===a)a=Math.min(h,20);else if(!x(a))a=2;else if(a&&r[1]&&0>r[1]){var n=a+ +r[1];0<=n?(r[0]=(+r[0]).toExponential(n).split("e")[0],a=n):(r[0]=r[0].split(".")[0]||0,b=20>a?(r[0]*Math.pow(10,r[1])).toFixed(a):0,r[1]=0)}var f=(Math.abs(r[1]?r[0]:b)+Math.pow(10,-Math.max(a,h)-1)).toFixed(a);h=String(g(f));n=3<h.length?h.length%3:0;e=m(e,d.decimalPoint);
k=m(k,d.thousandsSep);b=(0>b?"-":"")+(n?h.substr(0,n)+k:"");b+=h.substr(n).replace(/(\d{3})(?=\d)/g,"$1"+k);a&&(b+=e+f.slice(-a));r[1]&&0!==+b&&(b+="e"+r[1]);return b};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};c.getStyle=function(b,d,e){if("width"===d)return d=Math.min(b.offsetWidth,b.scrollWidth),e=b.getBoundingClientRect&&b.getBoundingClientRect().width,e<d&&e>=d-1&&(d=Math.floor(e)),Math.max(0,d-c.getStyle(b,"padding-left")-c.getStyle(b,"padding-right"));if("height"===d)return Math.max(0,
Math.min(b.offsetHeight,b.scrollHeight)-c.getStyle(b,"padding-top")-c.getStyle(b,"padding-bottom"));a.getComputedStyle||c.error(27,!0);if(b=a.getComputedStyle(b,void 0))b=b.getPropertyValue(d),m(e,"opacity"!==d)&&(b=g(b));return b};c.inArray=function(a,d,e){return d.indexOf(a,e)};c.find=Array.prototype.find?function(a,d){return a.find(d)}:function(a,d){var b,k=a.length;for(b=0;b<k;b++)if(d(a[b],b))return a[b]};c.keys=Object.keys;c.offset=function(b){var d=h.documentElement;b=b.parentElement||b.parentNode?
b.getBoundingClientRect():{top:0,left:0};return{top:b.top+(a.pageYOffset||d.scrollTop)-(d.clientTop||0),left:b.left+(a.pageXOffset||d.scrollLeft)-(d.clientLeft||0)}};c.stop=function(a,d){for(var b=c.timers.length;b--;)c.timers[b].elem!==a||d&&d!==c.timers[b].prop||(c.timers[b].stopped=!0)};p({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(a,d){c[d]=function(b){return Array.prototype[a].apply(b,[].slice.call(arguments,1))}});c.addEvent=function(a,d,e,k){void 0===k&&(k=
{});var b=a.addEventListener||c.addEventListenerPolyfill;var h="function"===typeof a&&a.prototype?a.prototype.protoEvents=a.prototype.protoEvents||{}:a.hcEvents=a.hcEvents||{};c.Point&&a instanceof c.Point&&a.series&&a.series.chart&&(a.series.chart.runTrackerClick=!0);b&&b.call(a,d,e,!1);h[d]||(h[d]=[]);h[d].push({fn:e,order:"number"===typeof k.order?k.order:Infinity});h[d].sort(function(a,b){return a.order-b.order});return function(){c.removeEvent(a,d,e)}};c.removeEvent=function(a,d,e){function b(b,
d){var f=a.removeEventListener||c.removeEventListenerPolyfill;f&&f.call(a,b,d,!1)}function h(e){var k;if(a.nodeName){if(d){var f={};f[d]=!0}else f=e;p(f,function(a,f){if(e[f])for(k=e[f].length;k--;)b(f,e[f][k].fn)})}}var m;["protoEvents","hcEvents"].forEach(function(k,n){var f=(n=n?a:a.prototype)&&n[k];f&&(d?(m=f[d]||[],e?(f[d]=m.filter(function(a){return e!==a.fn}),b(d,e)):(h(f),f[d]=[])):(h(f),n[k]={}))})};c.fireEvent=function(a,d,e,k){var b;e=e||{};if(h.createEvent&&(a.dispatchEvent||a.fireEvent)){var c=
h.createEvent("Events");c.initEvent(d,!0,!0);t(c,e);a.dispatchEvent?a.dispatchEvent(c):a.fireEvent(d,c)}else e.target||t(e,{preventDefault:function(){e.defaultPrevented=!0},target:a,type:d}),function(d,k){void 0===d&&(d=[]);void 0===k&&(k=[]);var f=0,l=0,n=d.length+k.length;for(b=0;b<n;b++)!1===(d[f]?k[l]?d[f].order<=k[l].order?d[f++]:k[l++]:d[f++]:k[l++]).fn.call(a,e)&&e.preventDefault()}(a.protoEvents&&a.protoEvents[d],a.hcEvents&&a.hcEvents[d]);k&&!e.defaultPrevented&&k.call(a,e)};c.animate=function(a,
d,e){var b,h="",m,r;if(!H(e)){var n=arguments;e={duration:n[2],easing:n[3],complete:n[4]}}x(e.duration)||(e.duration=400);e.easing="function"===typeof e.easing?e.easing:Math[e.easing]||Math.easeInOutSine;e.curAnim=c.merge(d);p(d,function(f,l){c.stop(a,l);r=new c.Fx(a,e,l);m=null;"d"===l?(r.paths=r.initPath(a,a.d,d.d),r.toD=d.d,b=0,m=1):a.attr?b=a.attr(l):(b=parseFloat(c.getStyle(a,l))||0,"opacity"!==l&&(h="px"));m||(m=f);m&&m.match&&m.match("px")&&(m=m.replace(/px/g,""));r.run(b,m,h)})};c.seriesType=
function(a,d,e,k,h){var b=c.getOptions(),r=c.seriesTypes;b.plotOptions[a]=c.merge(b.plotOptions[d],e);r[a]=c.extendClass(r[d]||function(){},k);r[a].prototype.type=a;h&&(r[a].prototype.pointClass=c.extendClass(c.Point,h));return r[a]};c.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),d=0;return function(){return"highcharts-"+a+"-"+d++}}();c.isFunction=function(a){return"function"===typeof a};a.jQuery&&(a.jQuery.fn.highcharts=function(){var a=[].slice.call(arguments);if(this[0])return a[0]?
(new (c[I(a[0])?a.shift():"Chart"])(this[0],a[0],a[1]),this):q[F(this[0],"data-highcharts-chart")]});return{arrayMax:function(a){for(var b=a.length,e=a[0];b--;)a[b]>e&&(e=a[b]);return e},arrayMin:function(a){for(var b=a.length,e=a[0];b--;)a[b]<e&&(e=a[b]);return e},attr:F,defined:E,destroyObjectProperties:function(a,d){p(a,function(b,k){b&&b!==d&&b.destroy&&b.destroy();delete a[k]})},discardElement:function(a){var b=c.garbageBin;b||(b=c.createElement("div"));a&&b.appendChild(a);b.innerHTML=""},erase:function(a,
d){for(var b=a.length;b--;)if(a[b]===d){a.splice(b,1);break}},extend:t,isArray:G,isClass:w,isDOMElement:y,isNumber:x,isObject:H,isString:I,objectEach:p,pick:m,pInt:g,setAnimation:function(a,d){d.renderer.globalAnimation=m(a,d.options.chart.animation,!0)},splat:function(a){return G(a)?a:[a]},syncTimeout:function(a,d,e){if(0<d)return setTimeout(a,d,e);a.call(0,e);return-1}}});K(D,"parts/Color.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.isNumber,G=g.pInt,H=c.merge;c.Color=
function(g){if(!(this instanceof c.Color))return new c.Color(g);this.init(g)};c.Color.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(c){return[G(c[1]),G(c[2]),G(c[3]),parseFloat(c[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(c){return[G(c[1]),G(c[2]),G(c[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(g){var w,x;if((this.input=g=this.names[g&&
g.toLowerCase?g.toLowerCase():""]||g)&&g.stops)this.stops=g.stops.map(function(g){return new c.Color(g[1])});else{if(g&&g.charAt&&"#"===g.charAt()){var E=g.length;g=parseInt(g.substr(1),16);7===E?w=[(g&16711680)>>16,(g&65280)>>8,g&255,1]:4===E&&(w=[(g&3840)>>4|(g&3840)>>8,(g&240)>>4|g&240,(g&15)<<4|g&15,1])}if(!w)for(x=this.parsers.length;x--&&!w;){var y=this.parsers[x];(E=y.regex.exec(g))&&(w=y.parse(E))}}this.rgba=w||[]},get:function(c){var g=this.input,x=this.rgba;if(this.stops){var E=H(g);E.stops=
[].concat(E.stops);this.stops.forEach(function(g,t){E.stops[t]=[E.stops[t][0],g.get(c)]})}else E=x&&I(x[0])?"rgb"===c||!c&&1===x[3]?"rgb("+x[0]+","+x[1]+","+x[2]+")":"a"===c?x[3]:"rgba("+x.join(",")+")":g;return E},brighten:function(c){var g,x=this.rgba;if(this.stops)this.stops.forEach(function(g){g.brighten(c)});else if(I(c)&&0!==c)for(g=0;3>g;g++)x[g]+=G(255*c),0>x[g]&&(x[g]=0),255<x[g]&&(x[g]=255);return this},setOpacity:function(c){this.rgba[3]=c;return this},tweenTo:function(c,g){var x=this.rgba,
w=c.rgba;w.length&&x&&x.length?(c=1!==w[3]||1!==x[3],g=(c?"rgba(":"rgb(")+Math.round(w[0]+(x[0]-w[0])*(1-g))+","+Math.round(w[1]+(x[1]-w[1])*(1-g))+","+Math.round(w[2]+(x[2]-w[2])*(1-g))+(c?","+(w[3]+(x[3]-w[3])*(1-g)):"")+")"):g=c.input||"none";return g}};c.color=function(g){return new c.Color(g)}});K(D,"parts/SvgRenderer.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.attr,G=g.defined,H=g.destroyObjectProperties,y=g.erase,w=g.extend,x=g.isArray,E=g.isNumber,F=g.isObject,
t=g.isString,m=g.objectEach,p=g.pick,q=g.pInt,h=g.splat,a=c.addEvent,b=c.animate,d=c.charts,e=c.color,k=c.css,C=c.createElement,z=c.deg2rad,r=c.doc,n=c.hasTouch,f=c.isFirefox,l=c.isMS,v=c.isWebKit,B=c.merge,A=c.noop,u=c.removeEvent,J=c.stop,L=c.svg,U=c.SVG_NS,Q=c.symbolSizes,P=c.win;var M=c.SVGElement=function(){return this};w(M.prototype,{opacity:1,SVG_NS:U,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "),
init:function(a,b){this.element="span"===b?C(b):r.createElementNS(this.SVG_NS,b);this.renderer=a;c.fireEvent(this,"afterInit")},animate:function(a,f,l){var u=c.animObject(p(f,this.renderer.globalAnimation,!0));p(r.hidden,r.msHidden,r.webkitHidden,!1)&&(u.duration=0);0!==u.duration?(l&&(u.complete=l),b(this,a,u)):(this.attr(a,void 0,l),m(a,function(a,b){u.step&&u.step.call(this,a,{prop:b,pos:1})},this));return this},complexColor:function(a,b,f){var l=this.renderer,u,A,d,k,N,e,n,v,h,O,r,J=[],C;c.fireEvent(this.renderer,
"complexColor",{args:arguments},function(){a.radialGradient?A="radialGradient":a.linearGradient&&(A="linearGradient");A&&(d=a[A],N=l.gradients,n=a.stops,O=f.radialReference,x(d)&&(a[A]=d={x1:d[0],y1:d[1],x2:d[2],y2:d[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===A&&O&&!G(d.gradientUnits)&&(k=d,d=B(d,l.getRadialAttr(O,k),{gradientUnits:"userSpaceOnUse"})),m(d,function(a,b){"id"!==b&&J.push(b,a)}),m(n,function(a){J.push(a)}),J=J.join(","),N[J]?r=N[J].attr("id"):(d.id=r=c.uniqueKey(),N[J]=e=
l.createElement(A).attr(d).add(l.defs),e.radAttr=k,e.stops=[],n.forEach(function(a){0===a[1].indexOf("rgba")?(u=c.color(a[1]),v=u.get("rgb"),h=u.get("a")):(v=a[1],h=1);a=l.createElement("stop").attr({offset:a[0],"stop-color":v,"stop-opacity":h}).add(e);e.stops.push(a)})),C="url("+l.url+"#"+r+")",f.setAttribute(b,C),f.gradient=J,a.toString=function(){return C})})},applyTextOutline:function(a){var b=this.element,f;-1!==a.indexOf("contrast")&&(a=a.replace(/contrast/g,this.renderer.getContrast(b.style.fill)));
a=a.split(" ");var l=a[a.length-1];if((f=a[0])&&"none"!==f&&c.svg){this.fakeTS=!0;a=[].slice.call(b.getElementsByTagName("tspan"));this.ySetter=this.xSetter;f=f.replace(/(^[\d\.]+)(.*?)$/g,function(a,b,f){return 2*b+f});this.removeTextOutline(a);var u=b.firstChild;a.forEach(function(a,A){0===A&&(a.setAttribute("x",b.getAttribute("x")),A=b.getAttribute("y"),a.setAttribute("y",A||0),null===A&&b.setAttribute("y",0));a=a.cloneNode(1);I(a,{"class":"highcharts-text-outline",fill:l,stroke:l,"stroke-width":f,
"stroke-linejoin":"round"});b.insertBefore(a,u)})}},removeTextOutline:function(a){for(var b=a.length,f;b--;)f=a[b],"highcharts-text-outline"===f.getAttribute("class")&&y(a,this.element.removeChild(f))},symbolCustomAttribs:"x y width height r start end innerR anchorX anchorY rounded".split(" "),attr:function(a,b,f,l){var u=this.element,A,d=this,k,e,N=this.symbolCustomAttribs;if("string"===typeof a&&void 0!==b){var n=a;a={};a[n]=b}"string"===typeof a?d=(this[a+"Getter"]||this._defaultGetter).call(this,
a,u):(m(a,function(b,f){k=!1;l||J(this,f);this.symbolName&&-1!==c.inArray(f,N)&&(A||(this.symbolAttr(a),A=!0),k=!0);!this.rotation||"x"!==f&&"y"!==f||(this.doTransform=!0);k||(e=this[f+"Setter"]||this._defaultSetter,e.call(this,b,f,u),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(f)&&this.updateShadows(f,b,e))},this),this.afterSetters());f&&f.call(this);return d},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(a,
b,f){for(var l=this.shadows,u=l.length;u--;)f.call(l[u],"height"===a?Math.max(b-(l[u].cutHeight||0),0):"d"===a?this.d:b,a,l[u])},addClass:function(a,b){var f=b?"":this.attr("class")||"";a=(a||"").split(/ /g).reduce(function(a,b){-1===f.indexOf(b)&&a.push(b);return a},f?[f]:[]).join(" ");a!==f&&this.attr("class",a);return this},hasClass:function(a){return-1!==(this.attr("class")||"").split(" ").indexOf(a)},removeClass:function(a){return this.attr("class",(this.attr("class")||"").replace(t(a)?new RegExp(" ?"+
a+" ?"):a,""))},symbolAttr:function(a){var b=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(f){b[f]=p(a[f],b[f])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,b){b=b||a.strokeWidth||0;var f=Math.round(b)%2/2;a.x=Math.floor(a.x||this.x||0)+f;a.y=Math.floor(a.y||this.y||0)+f;a.width=Math.floor((a.width||this.width||
0)-2*f);a.height=Math.floor((a.height||this.height||0)-2*f);G(a.strokeWidth)&&(a.strokeWidth=b);return a},css:function(a){var b=this.styles,f={},l=this.element,u="",A=!b,d=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);b&&m(a,function(a,l){a!==b[l]&&(f[l]=a,A=!0)});if(A){b&&(a=w(b,f));if(a)if(null===a.width||"auto"===a.width)delete this.textWidth;else if("text"===l.nodeName.toLowerCase()&&a.width)var e=this.textWidth=q(a.width);this.styles=a;e&&!L&&this.renderer.forExport&&delete a.width;
if(l.namespaceURI===this.SVG_NS){var n=function(a,b){return"-"+b.toLowerCase()};m(a,function(a,b){-1===d.indexOf(b)&&(u+=b.replace(/([A-Z])/g,n)+":"+a+";")});u&&I(l,"style",u)}else k(l,a);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline))}return this},getStyle:function(a){return P.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){if(!this.renderer.styledMode)return this["stroke-width"]||
0;var a=this.getStyle("stroke-width");if(a.indexOf("px")===a.length-2)a=q(a);else{var b=r.createElementNS(U,"rect");I(b,{width:a,"stroke-width":0});this.element.parentNode.appendChild(b);a=b.getBBox().width;b.parentNode.removeChild(b)}return a},on:function(a,b){var f=this,l=f.element;n&&"click"===a?(l.ontouchstart=function(a){f.touchEventFired=Date.now();a.preventDefault();b.call(l,a)},l.onclick=function(a){(-1===P.navigator.userAgent.indexOf("Android")||1100<Date.now()-(f.touchEventFired||0))&&b.call(l,
a)}):l["on"+a]=b;return this},setRadialReference:function(a){var b=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;b&&b.radAttr&&b.animate(this.renderer.getRadialAttr(a,b.radAttr));return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,f=this.scaleX,l=this.scaleY,u=this.inverted,A=this.rotation,d=
this.matrix,k=this.element;u&&(a+=this.width,b+=this.height);a=["translate("+a+","+b+")"];G(d)&&a.push("matrix("+d.join(",")+")");u?a.push("rotate(90) scale(-1,1)"):A&&a.push("rotate("+A+" "+p(this.rotationOriginX,k.getAttribute("x"),0)+" "+p(this.rotationOriginY,k.getAttribute("y")||0)+")");(G(f)||G(l))&&a.push("scale("+p(f,1)+" "+p(l,1)+")");a.length&&k.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,f){var l,
u={};var A=this.renderer;var d=A.alignedObjects;var k,e;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!f||t(f))this.alignTo=l=f||"renderer",y(d,this),d.push(this),f=null}else a=this.alignOptions,b=this.alignByTranslate,l=this.alignTo;f=p(f,A[l],A);l=a.align;A=a.verticalAlign;d=(f.x||0)+(a.x||0);var n=(f.y||0)+(a.y||0);"right"===l?k=1:"center"===l&&(k=2);k&&(d+=(f.width-(a.width||0))/k);u[b?"translateX":"x"]=Math.round(d);"bottom"===A?e=1:"middle"===A&&(e=2);e&&(n+=(f.height-(a.height||0))/
e);u[b?"translateY":"y"]=Math.round(n);this[this.placed?"animate":"attr"](u);this.placed=!0;this.alignAttr=u;return this},getBBox:function(a,b){var f,l=this.renderer,u=this.element,A=this.styles,d=this.textStr,k,e=l.cache,n=l.cacheKeys,N=u.namespaceURI===this.SVG_NS;b=p(b,this.rotation,0);var v=l.styledMode?u&&M.prototype.getStyle.call(u,"font-size"):A&&A.fontSize;if(G(d)){var B=d.toString();-1===B.indexOf("<")&&(B=B.replace(/[0-9]/g,"0"));B+=["",b,v,this.textWidth,A&&A.textOverflow].join()}B&&!a&&
(f=e[B]);if(!f){if(N||l.forExport){try{(k=this.fakeTS&&function(a){[].forEach.call(u.querySelectorAll(".highcharts-text-outline"),function(b){b.style.display=a})})&&k("none"),f=u.getBBox?w({},u.getBBox()):{width:u.offsetWidth,height:u.offsetHeight},k&&k("")}catch(Y){""}if(!f||0>f.width)f={width:0,height:0}}else f=this.htmlGetBBox();l.isSVG&&(a=f.width,l=f.height,N&&(f.height=l={"11px,17":14,"13px,20":16}[A&&A.fontSize+","+Math.round(l)]||l),b&&(A=b*z,f.width=Math.abs(l*Math.sin(A))+Math.abs(a*Math.cos(A)),
f.height=Math.abs(l*Math.cos(A))+Math.abs(a*Math.sin(A))));if(B&&0<f.height){for(;250<n.length;)delete e[n.shift()];e[B]||n.push(B);e[B]=f}}return f},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(a){a?this.attr({y:-9999}):this.attr({visibility:"hidden"});return this},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||150,complete:function(){b.attr({y:-9999})}})},add:function(a){var b=this.renderer,f=this.element;a&&(this.parentGroup=a);this.parentInverted=
a&&a.inverted;void 0!==this.textStr&&b.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)var l=this.zIndexSetter();l||(a?a.element:b.box).appendChild(f);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},f=a.renderer,l=f.isSVG&&"SPAN"===b.nodeName&&a.parentGroup,u=b.ownerSVGElement,A=a.clipPath;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;J(a);A&&u&&([].forEach.call(u.querySelectorAll("[clip-path],[CLIP-PATH]"),
function(a){-1<a.getAttribute("clip-path").indexOf(A.element.id)&&a.removeAttribute("clip-path")}),a.clipPath=A.destroy());if(a.stops){for(u=0;u<a.stops.length;u++)a.stops[u]=a.stops[u].destroy();a.stops=null}a.safeRemoveChild(b);for(f.styledMode||a.destroyShadows();l&&l.div&&0===l.div.childNodes.length;)b=l.parentGroup,a.safeRemoveChild(l.div),delete l.div,l=b;a.alignTo&&y(f.alignedObjects,a);m(a,function(b,f){a[f]&&a[f].parentGroup===a&&a[f].destroy&&a[f].destroy();delete a[f]})},shadow:function(a,
b,f){var l=[],u,A=this.element;if(!a)this.destroyShadows();else if(!this.shadows){var d=p(a.width,3);var k=(a.opacity||.15)/d;var e=this.parentInverted?"(-1,-1)":"("+p(a.offsetX,1)+", "+p(a.offsetY,1)+")";for(u=1;u<=d;u++){var n=A.cloneNode(0);var v=2*d+1-2*u;I(n,{stroke:a.color||"#000000","stroke-opacity":k*u,"stroke-width":v,transform:"translate"+e,fill:"none"});n.setAttribute("class",(n.getAttribute("class")||"")+" highcharts-shadow");f&&(I(n,"height",Math.max(I(n,"height")-v,0)),n.cutHeight=v);
b?b.element.appendChild(n):A.parentNode&&A.parentNode.insertBefore(n,A);l.push(n)}this.shadows=l}return this},destroyShadows:function(){(this.shadows||[]).forEach(function(a){this.safeRemoveChild(a)},this);this.shadows=void 0},xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=p(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},
dSetter:function(a,b,f){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[b]!==a&&(f.setAttribute(b,a),this[b]=a)},dashstyleSetter:function(a){var b,f=this["stroke-width"];"inherit"===f&&(f=1);if(a=a&&a.toLowerCase()){a=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(b=a.length;b--;)a[b]=q(a[b])*
f;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){var b={left:"start",center:"middle",right:"end"};b[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",b[a]))},opacitySetter:function(a,b,f){this[b]=a;f.setAttribute(b,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=r.createElementNS(this.SVG_NS,"title"),this.element.appendChild(b));b.firstChild&&b.removeChild(b.firstChild);b.appendChild(r.createTextNode(String(p(a,
"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this))},setTextPath:function(a,b){var f=this.element,l={textAnchor:"text-anchor"},u=!1,d=this.textPathWrapper,k=!d;b=B(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},b);var e=b.attributes;if(a&&b&&b.enabled){this.options&&this.options.padding&&(e.dx=-this.options.padding);
d||(this.textPathWrapper=d=this.renderer.createElement("textPath"),u=!0);var n=d.element;(b=a.element.getAttribute("id"))||a.element.setAttribute("id",b=c.uniqueKey());if(k)for(a=f.getElementsByTagName("tspan");a.length;)a[0].setAttribute("y",0),n.appendChild(a[0]);u&&d.add({element:this.text?this.text.element:f});n.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+b);G(e.dy)&&(n.parentNode.setAttribute("dy",e.dy),delete e.dy);G(e.dx)&&(n.parentNode.setAttribute("dx",e.dx),
delete e.dx);m(e,function(a,b){n.setAttribute(l[b]||b,a)});f.removeAttribute("transform");this.removeTextOutline.call(d,[].slice.call(f.getElementsByTagName("tspan")));this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=this.updateTransform=A}else d&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(f,a));return this},destroyTextPath:function(a,b){var f;b.element.setAttribute("id","");for(f=this.textPathWrapper.element.childNodes;f.length;)a.firstChild.appendChild(f[0]);
a.firstChild.removeChild(this.textPathWrapper.element);delete b.textPathWrapper},fillSetter:function(a,b,f){"string"===typeof a?f.setAttribute(b,a):a&&this.complexColor(a,b,f)},visibilitySetter:function(a,b,f){"inherit"===a?f.removeAttribute(b):this[b]!==a&&f.setAttribute(b,a);this[b]=a},zIndexSetter:function(a,b){var f=this.renderer,l=this.parentGroup,u=(l||f).element||f.box,A=this.element,d=!1;f=u===f.box;var k=this.added;var e;G(a)?(A.setAttribute("data-z-index",a),a=+a,this[b]===a&&(k=!1)):G(this[b])&&
A.removeAttribute("data-z-index");this[b]=a;if(k){(a=this.zIndex)&&l&&(l.handleZ=!0);b=u.childNodes;for(e=b.length-1;0<=e&&!d;e--){l=b[e];k=l.getAttribute("data-z-index");var n=!G(k);if(l!==A)if(0>a&&n&&!f&&!e)u.insertBefore(A,b[e]),d=!0;else if(q(k)<=a||n&&(!G(a)||0<=a))u.insertBefore(A,b[e+1]||null),d=!0}d||(u.insertBefore(A,b[f?3:0]||null),d=!0)}return d},_defaultSetter:function(a,b,f){f.setAttribute(b,a)}});M.prototype.yGetter=M.prototype.xGetter;M.prototype.translateXSetter=M.prototype.translateYSetter=
M.prototype.rotationSetter=M.prototype.verticalAlignSetter=M.prototype.rotationOriginXSetter=M.prototype.rotationOriginYSetter=M.prototype.scaleXSetter=M.prototype.scaleYSetter=M.prototype.matrixSetter=function(a,b){this[b]=a;this.doTransform=!0};M.prototype["stroke-widthSetter"]=M.prototype.strokeSetter=function(a,b,f){this[b]=a;this.stroke&&this["stroke-width"]?(M.prototype.fillSetter.call(this,this.stroke,"stroke",f),f.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===
b&&0===a&&this.hasStroke?(f.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(f.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};g=c.SVGRenderer=function(){this.init.apply(this,arguments)};w(g.prototype,{Element:M,SVG_NS:U,init:function(b,l,u,A,d,e,n){var B=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});n||B.css(this.getStyle(A));A=B.element;b.appendChild(A);I(b,"dir","ltr");-1===b.innerHTML.indexOf("xmlns")&&
I(A,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=A;this.boxWrapper=B;this.alignedObjects=[];this.url=(f||v)&&r.getElementsByTagName("base").length?P.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(r.createTextNode("Created with Highcharts 7.2.1"));this.defs=this.createElement("defs").add();this.allowHTML=e;this.forExport=d;this.styledMode=n;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=
0;this.setSize(l,u,!1);var h;f&&b.getBoundingClientRect&&(l=function(){k(b,{left:0,top:0});h=b.getBoundingClientRect();k(b,{left:Math.ceil(h.left)-h.left+"px",top:Math.ceil(h.top)-h.top+"px"})},l(),this.unSubPixelFix=a(P,"resize",l))},definition:function(a){function b(a,l){var u;h(a).forEach(function(a){var A=f.createElement(a.tagName),d={};m(a,function(a,b){"tagName"!==b&&"children"!==b&&"textContent"!==b&&(d[b]=a)});A.attr(d);A.add(l||f.defs);a.textContent&&A.element.appendChild(r.createTextNode(a.textContent));
b(a.children||[],A);u=A});return u}var f=this;return b(a)},getStyle:function(a){return this.style=w({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();H(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&
this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var b=new this.Element;b.init(this,a);return b},draw:A,getRadialAttr:function(a,b){return{cx:a[0]-a[2]/2+b.cx*a[2],cy:a[1]-a[2]/2+b.cy*a[2],r:b.r*a[2]}},truncate:function(a,b,f,l,u,A,d){var e=this,k=a.rotation,n,v=l?1:0,B=(f||l).length,h=B,c=[],J=function(a){b.firstChild&&b.removeChild(b.firstChild);a&&b.appendChild(r.createTextNode(a))},C=function(A,k){k=k||A;if(void 0===c[k])if(b.getSubStringLength)try{c[k]=u+b.getSubStringLength(0,
l?k+1:k)}catch(fa){""}else e.getSpanWidth&&(J(d(f||l,A)),c[k]=u+e.getSpanWidth(a,b));return c[k]},m;a.rotation=0;var L=C(b.textContent.length);if(m=u+L>A){for(;v<=B;)h=Math.ceil((v+B)/2),l&&(n=d(l,h)),L=C(h,n&&n.length-1),v===B?v=B+1:L>A?B=h-1:v=h;0===B?J(""):f&&B===f.length-1||J(n||d(f||l,h))}l&&l.splice(0,h);a.actualWidth=L;a.rotation=k;return m},escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},buildText:function(a){var b=a.element,f=this,l=f.forExport,u=p(a.textStr,"").toString(),
A=-1!==u.indexOf("<"),d=b.childNodes,e,n=I(b,"x"),v=a.styles,B=a.textWidth,h=v&&v.lineHeight,c=v&&v.textOutline,J=v&&"ellipsis"===v.textOverflow,C=v&&"nowrap"===v.whiteSpace,N=v&&v.fontSize,z,g=d.length;v=B&&!a.added&&this.box;var t=function(a){var l;f.styledMode||(l=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:N||f.style.fontSize||12);return h?q(h):f.fontMetrics(l,a.getAttribute("style")?a:b).h},Q=function(a,b){m(f.escapes,function(f,l){b&&-1!==b.indexOf(f)||(a=a.toString().replace(new RegExp(f,
"g"),l))});return a},P=function(a,b){var f=a.indexOf("<");a=a.substring(f,a.indexOf(">")-f);f=a.indexOf(b+"=");if(-1!==f&&(f=f+b.length+1,b=a.charAt(f),'"'===b||"'"===b))return a=a.substring(f+1),a.substring(0,a.indexOf(b))},x=/<br.*?>/g;var M=[u,J,C,h,c,N,B].join();if(M!==a.textCache){for(a.textCache=M;g--;)b.removeChild(d[g]);A||c||J||B||-1!==u.indexOf(" ")&&(!C||x.test(u))?(v&&v.appendChild(b),A?(u=f.styledMode?u.replace(/<(b|strong)>/g,'<span class="highcharts-strong">').replace(/<(i|em)>/g,'<span class="highcharts-emphasized">'):
u.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">'),u=u.replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(x)):u=[u],u=u.filter(function(a){return""!==a}),u.forEach(function(u,A){var d=0,v=0;u=u.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");var h=u.split("|||");h.forEach(function(u){if(""!==u||1===h.length){var c={},m=r.createElementNS(f.SVG_NS,"tspan"),p,O;(p=P(u,"class"))&&
I(m,"class",p);if(p=P(u,"style"))p=p.replace(/(;| |^)color([ :])/,"$1fill$2"),I(m,"style",p);(O=P(u,"href"))&&!l&&(I(m,"onclick",'location.href="'+O+'"'),I(m,"class","highcharts-anchor"),f.styledMode||k(m,{cursor:"pointer"}));u=Q(u.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==u){m.appendChild(r.createTextNode(u));d?c.dx=0:A&&null!==n&&(c.x=n);I(m,c);b.appendChild(m);!d&&z&&(!L&&l&&k(m,{display:"block"}),I(m,"dy",t(m)));if(B){var q=u.replace(/([^\^])-/g,"$1- ").split(" ");c=!C&&(1<h.length||
A||1<q.length);O=0;var g=t(m);if(J)e=f.truncate(a,m,u,void 0,0,Math.max(0,B-parseInt(N||12,10)),function(a,b){return a.substring(0,b)+"\u2026"});else if(c)for(;q.length;)q.length&&!C&&0<O&&(m=r.createElementNS(U,"tspan"),I(m,{dy:g,x:n}),p&&I(m,"style",p),m.appendChild(r.createTextNode(q.join(" ").replace(/- /g,"-"))),b.appendChild(m)),f.truncate(a,m,null,q,0===O?v:0,B,function(a,b){return q.slice(0,b).join(" ").replace(/- /g,"-")}),v=a.actualWidth,O++}d++}}});z=z||b.childNodes.length}),J&&e&&a.attr("title",
Q(a.textStr,["&lt;","&gt;"])),v&&v.removeChild(b),c&&a.applyTextOutline&&a.applyTextOutline(c)):b.appendChild(r.createTextNode(Q(u)))}},getContrast:function(a){a=e(a).rgba;a[0]*=1;a[1]*=1.2;a[2]*=.5;return 459<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(b,f,u,A,d,k,e,n,v,h){var c=this.label(b,f,u,v,null,null,h,null,"button"),r=0,J=this.styledMode;c.attr(B({padding:8,r:2},d));if(!J){d=B({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},
d);var m=d.style;delete d.style;k=B(d,{fill:"#e6e6e6"},k);var C=k.style;delete k.style;e=B(d,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},e);var L=e.style;delete e.style;n=B(d,{style:{color:"#cccccc"}},n);var N=n.style;delete n.style}a(c.element,l?"mouseover":"mouseenter",function(){3!==r&&c.setState(1)});a(c.element,l?"mouseout":"mouseleave",function(){3!==r&&c.setState(r)});c.setState=function(a){1!==a&&(c.state=r=a);c.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+
["normal","hover","pressed","disabled"][a||0]);J||c.attr([d,k,e,n][a||0]).css([m,C,L,N][a||0])};J||c.attr(d).css(w({cursor:"default"},m));return c.on("click",function(a){3!==r&&A.call(c,a)})},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-b%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+b%2/2);return a},path:function(a){var b=this.styledMode?{}:{fill:"none"};x(a)?b.d=a:F(a)&&w(b,a);return this.createElement("path").attr(b)},circle:function(a,b,f){a=F(a)?a:void 0===a?{}:{x:a,y:b,r:f};
b=this.createElement("circle");b.xSetter=b.ySetter=function(a,b,f){f.setAttribute("c"+b,a)};return b.attr(a)},arc:function(a,b,f,l,u,A){F(a)?(l=a,b=l.y,f=l.r,a=l.x):l={innerR:l,start:u,end:A};a=this.symbol("arc",a,b,f,f,l);a.r=f;return a},rect:function(a,b,f,l,u,A){u=F(a)?a.r:u;var d=this.createElement("rect");a=F(a)?a:void 0===a?{}:{x:a,y:b,width:Math.max(f,0),height:Math.max(l,0)};this.styledMode||(void 0!==A&&(a.strokeWidth=A,a=d.crisp(a)),a.fill="none");u&&(a.r=u);d.rSetter=function(a,b,f){d.r=
a;I(f,{rx:a,ry:a})};d.rGetter=function(){return d.r};return d.attr(a)},setSize:function(a,b,f){var l=this.alignedObjects,u=l.length;this.width=a;this.height=b;for(this.boxWrapper.animate({width:a,height:b},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:p(f,!0)?void 0:0});u--;)l[u].align()},g:function(a){var b=this.createElement("g");return a?b.attr({"class":"highcharts-"+a}):b},image:function(b,f,l,u,A,d){var k={preserveAspectRatio:"none"},e=function(a,
b){a.setAttributeNS?a.setAttributeNS("http://www.w3.org/1999/xlink","href",b):a.setAttribute("hc-svg-href",b)},n=function(a){e(v.element,b);d.call(v,a)};1<arguments.length&&w(k,{x:f,y:l,width:u,height:A});var v=this.createElement("image").attr(k);d?(e(v.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),k=new P.Image,a(k,"load",n),k.src=b,k.complete&&n({})):e(v.element,b);return v},symbol:function(a,b,f,l,u,A){var e=this,n=/^url\((.*?)\)$/,v=n.test(a),B=!v&&(this.symbols[a]?
a:"circle"),h=B&&this.symbols[B],c=G(b)&&h&&h.call(this.symbols,Math.round(b),Math.round(f),l,u,A);if(h){var J=this.path(c);e.styledMode||J.attr("fill","none");w(J,{symbolName:B,x:b,y:f,width:l,height:u});A&&w(J,A)}else if(v){var m=a.match(n)[1];J=this.image(m);J.imgwidth=p(Q[m]&&Q[m].width,A&&A.width);J.imgheight=p(Q[m]&&Q[m].height,A&&A.height);var L=function(){J.attr({width:J.width,height:J.height})};["width","height"].forEach(function(a){J[a+"Setter"]=function(a,b){var f={},l=this["img"+b],u=
"width"===b?"translateX":"translateY";this[b]=a;G(l)&&(A&&"within"===A.backgroundSize&&this.width&&this.height&&(l=Math.round(l*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(b,l),this.alignByTranslate||(f[u]=((this[b]||0)-l)/2,this.attr(f)))}});G(b)&&J.attr({x:b,y:f});J.isImg=!0;G(J.imgwidth)&&G(J.imgheight)?L():(J.attr({width:0,height:0}),C("img",{onload:function(){var a=d[e.chartIndex];0===this.width&&(k(this,{position:"absolute",top:"-999em"}),
r.body.appendChild(this));Q[m]={width:this.width,height:this.height};J.imgwidth=this.width;J.imgheight=this.height;J.element&&L();this.parentNode&&this.parentNode.removeChild(this);e.imgCount--;if(!e.imgCount&&a&&a.onload)a.onload()},src:m}),this.imgCount++)}return J},symbols:{circle:function(a,b,f,l){return this.arc(a+f/2,b+l/2,f/2,l/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},square:function(a,b,f,l){return["M",a,b,"L",a+f,b,a+f,b+l,a,b+l,"Z"]},triangle:function(a,b,f,l){return["M",a+f/2,b,"L",
a+f,b+l,a,b+l,"Z"]},"triangle-down":function(a,b,f,l){return["M",a,b,"L",a+f,b,a+f/2,b+l,"Z"]},diamond:function(a,b,f,l){return["M",a+f/2,b,"L",a+f,b+l/2,a+f/2,b+l,a,b+l/2,"Z"]},arc:function(a,b,f,l,u){var A=u.start,d=u.r||f,k=u.r||l||f,e=u.end-.001;f=u.innerR;l=p(u.open,.001>Math.abs(u.end-u.start-2*Math.PI));var n=Math.cos(A),v=Math.sin(A),B=Math.cos(e);e=Math.sin(e);A=.001>u.end-A-Math.PI?0:1;u=["M",a+d*n,b+k*v,"A",d,k,0,A,p(u.clockwise,1),a+d*B,b+k*e];G(f)&&u.push(l?"M":"L",a+f*B,b+f*e,"A",f,
f,0,A,0,a+f*n,b+f*v);u.push(l?"":"Z");return u},callout:function(a,b,f,l,u){var A=Math.min(u&&u.r||0,f,l),d=A+6,e=u&&u.anchorX;u=u&&u.anchorY;var k=["M",a+A,b,"L",a+f-A,b,"C",a+f,b,a+f,b,a+f,b+A,"L",a+f,b+l-A,"C",a+f,b+l,a+f,b+l,a+f-A,b+l,"L",a+A,b+l,"C",a,b+l,a,b+l,a,b+l-A,"L",a,b+A,"C",a,b,a,b,a+A,b];e&&e>f?u>b+d&&u<b+l-d?k.splice(13,3,"L",a+f,u-6,a+f+6,u,a+f,u+6,a+f,b+l-A):k.splice(13,3,"L",a+f,l/2,e,u,a+f,l/2,a+f,b+l-A):e&&0>e?u>b+d&&u<b+l-d?k.splice(33,3,"L",a,u+6,a-6,u,a,u-6,a,b+A):k.splice(33,
3,"L",a,l/2,e,u,a,l/2,a,b+A):u&&u>l&&e>a+d&&e<a+f-d?k.splice(23,3,"L",e+6,b+l,e,b+l+6,e-6,b+l,a+A,b+l):u&&0>u&&e>a+d&&e<a+f-d&&k.splice(3,3,"L",e-6,b,e,b-6,e+6,b,f-A,b);return k}},clipRect:function(a,b,f,l){var u=c.uniqueKey()+"-",A=this.createElement("clipPath").attr({id:u}).add(this.defs);a=this.rect(a,b,f,l,0).add(A);a.id=u;a.clipPath=A;a.count=0;return a},text:function(a,b,f,l){var u={};if(l&&(this.allowHTML||!this.forExport))return this.html(a,b,f);u.x=Math.round(b||0);f&&(u.y=Math.round(f));
G(a)&&(u.text=a);a=this.createElement("text").attr(u);l||(a.xSetter=function(a,b,f){var l=f.getElementsByTagName("tspan"),u=f.getAttribute(b),A;for(A=0;A<l.length;A++){var d=l[A];d.getAttribute(b)===u&&d.setAttribute(b,a)}f.setAttribute(b,a)});return a},fontMetrics:function(a,b){a=!this.styledMode&&/px/.test(a)||!P.getComputedStyle?a||b&&b.style&&b.style.fontSize||this.style&&this.style.fontSize:b&&M.prototype.getStyle.call(b,"font-size");a=/px/.test(a)?q(a):12;b=24>a?a+3:Math.round(1.2*a);return{h:b,
b:Math.round(.8*b),f:a}},rotCorr:function(a,b,f){var l=a;b&&f&&(l=Math.max(l*Math.cos(b*z),4));return{x:-a/3*Math.sin(b*z),y:l}},label:function(a,b,f,l,A,d,e,k,n){var v=this,h=v.styledMode,c=v.g("button"!==n&&"label"),J=c.text=v.text("",0,0,e).attr({zIndex:1}),r,m,C=0,L=3,p=0,z,U,q,g,N,O={},t,Q,P=/^url\((.*?)\)$/.test(l),x=h||P,da=function(){return h?r.strokeWidth()%2/2:(t?parseInt(t,10):0)%2/2};n&&c.addClass("highcharts-"+n);var y=function(){var a=J.element.style,b={};m=(void 0===z||void 0===U||
N)&&G(J.textStr)&&J.getBBox();c.width=(z||m.width||0)+2*L+p;c.height=(U||m.height||0)+2*L;Q=L+Math.min(v.fontMetrics(a&&a.fontSize,J).b,m?m.height:Infinity);x&&(r||(c.box=r=v.symbols[l]||P?v.symbol(l):v.rect(),r.addClass(("button"===n?"":"highcharts-label-box")+(n?" highcharts-"+n+"-box":"")),r.add(c),a=da(),b.x=a,b.y=(k?-Q:0)+a),b.width=Math.round(c.width),b.height=Math.round(c.height),r.attr(w(b,O)),O={})};var S=function(){var a=p+L;var b=k?0:Q;G(z)&&m&&("center"===N||"right"===N)&&(a+={center:.5,
right:1}[N]*(z-m.width));if(a!==J.x||b!==J.y)J.attr("x",a),J.hasBoxWidthChanged&&(m=J.getBBox(!0),y()),void 0!==b&&J.attr("y",b);J.x=a;J.y=b};var F=function(a,b){r?r.attr(a,b):O[a]=b};c.onAdd=function(){J.add(c);c.attr({text:a||0===a?a:"",x:b,y:f});r&&G(A)&&c.attr({anchorX:A,anchorY:d})};c.widthSetter=function(a){z=E(a)?a:null};c.heightSetter=function(a){U=a};c["text-alignSetter"]=function(a){N=a};c.paddingSetter=function(a){G(a)&&a!==L&&(L=c.padding=a,S())};c.paddingLeftSetter=function(a){G(a)&&
a!==p&&(p=a,S())};c.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==C&&(C=a,m&&c.attr({x:q}))};c.textSetter=function(a){void 0!==a&&J.attr({text:a});y();S()};c["stroke-widthSetter"]=function(a,b){a&&(x=!0);t=this["stroke-width"]=a;F(b,a)};h?c.rSetter=function(a,b){F(b,a)}:c.strokeSetter=c.fillSetter=c.rSetter=function(a,b){"r"!==b&&("fill"===b&&a&&(x=!0),c[b]=a);F(b,a)};c.anchorXSetter=function(a,b){A=c.anchorX=a;F(b,Math.round(a)-da()-q)};c.anchorYSetter=function(a,b){d=c.anchorY=a;F(b,
a-g)};c.xSetter=function(a){c.x=a;C&&(a-=C*((z||m.width)+2*L),c["forceAnimate:x"]=!0);q=Math.round(a);c.attr("translateX",q)};c.ySetter=function(a){g=c.y=Math.round(a);c.attr("translateY",g)};var H=c.css;e={css:function(a){if(a){var b={};a=B(a);c.textProps.forEach(function(f){void 0!==a[f]&&(b[f]=a[f],delete a[f])});J.css(b);"width"in b&&y();"fontSize"in b&&(y(),S())}return H.call(c,a)},getBBox:function(){return{width:m.width+2*L,height:m.height+2*L,x:m.x-L,y:m.y-L}},destroy:function(){u(c.element,
"mouseenter");u(c.element,"mouseleave");J&&(J=J.destroy());r&&(r=r.destroy());M.prototype.destroy.call(c);c=v=y=S=F=null}};h||(e.shadow=function(a){a&&(y(),r&&r.shadow(a));return c});return w(c,e)}});c.Renderer=g});K(D,"parts/Html.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.attr,G=g.defined,H=g.extend,y=g.pick,w=g.pInt,x=c.createElement,E=c.css,F=c.isFirefox,t=c.isMS,m=c.isWebKit,p=c.SVGElement;g=c.SVGRenderer;var q=c.win;H(p.prototype,{htmlCss:function(c){var a="SPAN"===
this.element.tagName&&c&&"width"in c,b=y(a&&c.width,void 0);if(a){delete c.width;this.textWidth=b;var d=!0}c&&"ellipsis"===c.textOverflow&&(c.whiteSpace="nowrap",c.overflow="hidden");this.styles=H(this.styles,c);E(this.element,c);d&&this.htmlUpdateTransform();return this},htmlGetBBox:function(){var c=this.element;return{x:c.offsetLeft,y:c.offsetTop,width:c.offsetWidth,height:c.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var c=this.renderer,a=this.element,b=this.translateX||0,d=this.translateY||
0,e=this.x||0,k=this.y||0,m=this.textAlign||"left",p={left:0,center:.5,right:1}[m],r=this.styles,n=r&&r.whiteSpace;E(a,{marginLeft:b,marginTop:d});!c.styledMode&&this.shadows&&this.shadows.forEach(function(a){E(a,{marginLeft:b+1,marginTop:d+1})});this.inverted&&[].forEach.call(a.childNodes,function(b){c.invertChild(b,a)});if("SPAN"===a.tagName){r=this.rotation;var f=this.textWidth&&w(this.textWidth),l=[r,m,a.innerHTML,this.textWidth,this.textAlign].join(),v;(v=f!==this.oldTextWidth)&&!(v=f>this.oldTextWidth)&&
((v=this.textPxLength)||(E(a,{width:"",whiteSpace:n||"nowrap"}),v=a.offsetWidth),v=v>f);v&&(/[ \-]/.test(a.textContent||a.innerText)||"ellipsis"===a.style.textOverflow)?(E(a,{width:f+"px",display:"block",whiteSpace:n||"normal"}),this.oldTextWidth=f,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1;l!==this.cTT&&(n=c.fontMetrics(a.style.fontSize,a).b,!G(r)||r===(this.oldRotation||0)&&m===this.oldAlign||this.setSpanRotation(r,p,n),this.getSpanCorrection(!G(r)&&this.textPxLength||a.offsetWidth,
n,p,r,m));E(a,{left:e+(this.xCorr||0)+"px",top:k+(this.yCorr||0)+"px"});this.cTT=l;this.oldRotation=r;this.oldAlign=m}}else this.alignOnAdd=!0},setSpanRotation:function(c,a,b){var d={},e=this.renderer.getTransformKey();d[e]=d.transform="rotate("+c+"deg)";d[e+(F?"Origin":"-origin")]=d.transformOrigin=100*a+"% "+b+"px";E(this.element,d)},getSpanCorrection:function(c,a,b){this.xCorr=-c*b;this.yCorr=-a}});H(g.prototype,{getTransformKey:function(){return t&&!/Edge/.test(q.navigator.userAgent)?"-ms-transform":
m?"-webkit-transform":F?"MozTransform":q.opera?"-o-transform":""},html:function(c,a,b){var d=this.createElement("span"),e=d.element,k=d.renderer,h=k.isSVG,m=function(a,b){["opacity","visibility"].forEach(function(f){a[f+"Setter"]=function(l,d,e){var A=a.div?a.div.style:b;p.prototype[f+"Setter"].call(this,l,d,e);A&&(A[d]=l)}});a.addedSetters=!0};d.textSetter=function(a){a!==e.innerHTML&&(delete this.bBox,delete this.oldTextWidth);this.textStr=a;e.innerHTML=y(a,"");d.doTransform=!0};h&&m(d,d.element.style);
d.xSetter=d.ySetter=d.alignSetter=d.rotationSetter=function(a,b){"align"===b&&(b="textAlign");d[b]=a;d.doTransform=!0};d.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};d.attr({text:c,x:Math.round(a),y:Math.round(b)}).css({position:"absolute"});k.styledMode||d.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});e.style.whiteSpace="nowrap";d.css=d.htmlCss;h&&(d.add=function(a){var b=k.box.parentNode,f=[];if(this.parentGroup=a){var l=a.div;
if(!l){for(;a;)f.push(a),a=a.parentGroup;f.reverse().forEach(function(a){function e(b,f){a[f]=b;"translateX"===f?u.left=b+"px":u.top=b+"px";a.doTransform=!0}var A=I(a.element,"class");l=a.div=a.div||x("div",A?{className:A}:void 0,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},l||b);var u=l.style;H(a,{classSetter:function(a){return function(b){this.element.setAttribute("class",b);a.className=
b}}(l),on:function(){f[0].div&&d.on.apply({element:f[0].div},arguments);return a},translateXSetter:e,translateYSetter:e});a.addedSetters||m(a)})}}else l=b;l.appendChild(e);d.added=!0;d.alignOnAdd&&d.htmlUpdateTransform();return d});return d}})});K(D,"parts/Time.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.extend,H=g.isObject,y=g.objectEach,w=g.pick,x=g.splat,E=c.merge,F=c.timeUnits,t=c.win;c.Time=function(c){this.update(c,!1)};c.Time.prototype={defaultOptions:{Date:void 0,
getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},update:function(c){var m=w(c&&c.useUTC,!0),q=this;this.options=c=E(!0,this.options||{},c);this.Date=c.Date||t.Date||Date;this.timezoneOffset=(this.useUTC=m)&&c.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=!(m&&!c.getTimezoneOffset&&!c.timezone))||this.timezoneOffset?(this.get=function(c,a){var b=a.getTime(),d=b-q.getTimezoneOffset(a);a.setTime(d);c=a["getUTC"+c]();a.setTime(b);return c},
this.set=function(c,a,b){if("Milliseconds"===c||"Seconds"===c||"Minutes"===c&&0===a.getTimezoneOffset()%60)a["set"+c](b);else{var d=q.getTimezoneOffset(a);d=a.getTime()-d;a.setTime(d);a["setUTC"+c](b);c=q.getTimezoneOffset(a);d=a.getTime()+c;a.setTime(d)}}):m?(this.get=function(c,a){return a["getUTC"+c]()},this.set=function(c,a,b){return a["setUTC"+c](b)}):(this.get=function(c,a){return a["get"+c]()},this.set=function(c,a,b){return a["set"+c](b)})},makeTime:function(m,p,q,h,a,b){if(this.useUTC){var d=
this.Date.UTC.apply(0,arguments);var e=this.getTimezoneOffset(d);d+=e;var k=this.getTimezoneOffset(d);e!==k?d+=k-e:e-36E5!==this.getTimezoneOffset(d-36E5)||c.isSafari||(d-=36E5)}else d=(new this.Date(m,p,w(q,1),w(h,0),w(a,0),w(b,0))).getTime();return d},timezoneOffsetFunction:function(){var m=this,p=this.options,q=t.moment;if(!this.useUTC)return function(c){return 6E4*(new Date(c)).getTimezoneOffset()};if(p.timezone){if(q)return function(c){return 6E4*-q.tz(c,p.timezone).utcOffset()};c.error(25)}return this.useUTC&&
p.getTimezoneOffset?function(c){return 6E4*p.getTimezoneOffset(c)}:function(){return 6E4*(m.timezoneOffset||0)}},dateFormat:function(m,p,q){if(!I(p)||isNaN(p))return c.defaultOptions.lang.invalidDate||"";m=w(m,"%Y-%m-%d %H:%M:%S");var h=this,a=new this.Date(p),b=this.get("Hours",a),d=this.get("Day",a),e=this.get("Date",a),k=this.get("Month",a),C=this.get("FullYear",a),z=c.defaultOptions.lang,r=z.weekdays,n=z.shortWeekdays,f=c.pad;a=G({a:n?n[d]:r[d].substr(0,3),A:r[d],d:f(e),e:f(e,2," "),w:d,b:z.shortMonths[k],
B:z.months[k],m:f(k+1),o:k+1,y:C.toString().substr(2,2),Y:C,H:f(b),k:b,I:f(b%12||12),l:b%12||12,M:f(h.get("Minutes",a)),p:12>b?"AM":"PM",P:12>b?"am":"pm",S:f(a.getSeconds()),L:f(Math.floor(p%1E3),3)},c.dateFormats);y(a,function(a,b){for(;-1!==m.indexOf("%"+b);)m=m.replace("%"+b,"function"===typeof a?a.call(h,p):a)});return q?m.substr(0,1).toUpperCase()+m.substr(1):m},resolveDTLFormat:function(c){return H(c,!0)?c:(c=x(c),{main:c[0],from:c[1],to:c[2]})},getTimeTicks:function(c,p,q,h){var a=this,b=[],
d={};var e=new a.Date(p);var k=c.unitRange,m=c.count||1,z;h=w(h,1);if(I(p)){a.set("Milliseconds",e,k>=F.second?0:m*Math.floor(a.get("Milliseconds",e)/m));k>=F.second&&a.set("Seconds",e,k>=F.minute?0:m*Math.floor(a.get("Seconds",e)/m));k>=F.minute&&a.set("Minutes",e,k>=F.hour?0:m*Math.floor(a.get("Minutes",e)/m));k>=F.hour&&a.set("Hours",e,k>=F.day?0:m*Math.floor(a.get("Hours",e)/m));k>=F.day&&a.set("Date",e,k>=F.month?1:Math.max(1,m*Math.floor(a.get("Date",e)/m)));if(k>=F.month){a.set("Month",e,k>=
F.year?0:m*Math.floor(a.get("Month",e)/m));var r=a.get("FullYear",e)}k>=F.year&&a.set("FullYear",e,r-r%m);k===F.week&&(r=a.get("Day",e),a.set("Date",e,a.get("Date",e)-r+h+(r<h?-7:0)));r=a.get("FullYear",e);h=a.get("Month",e);var n=a.get("Date",e),f=a.get("Hours",e);p=e.getTime();a.variableTimezone&&(z=q-p>4*F.month||a.getTimezoneOffset(p)!==a.getTimezoneOffset(q));p=e.getTime();for(e=1;p<q;)b.push(p),p=k===F.year?a.makeTime(r+e*m,0):k===F.month?a.makeTime(r,h+e*m):!z||k!==F.day&&k!==F.week?z&&k===
F.hour&&1<m?a.makeTime(r,h,n,f+e*m):p+k*m:a.makeTime(r,h,n+e*m*(k===F.day?1:7)),e++;b.push(p);k<=F.hour&&1E4>b.length&&b.forEach(function(b){0===b%18E5&&"000000000"===a.dateFormat("%H%M%S%L",b)&&(d[b]="day")})}b.info=G(c,{higherRanks:d,totalRange:k*m});return b}}});K(D,"parts/Options.js",[D["parts/Globals.js"]],function(c){var g=c.color,I=c.merge;c.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square",
"triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:c.Time.prototype.defaultOptions,chart:{styledMode:!1,
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,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},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:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",
x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:c.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:c.isTouchDevice?
25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:g("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",
fontSize:"9px"},text:"Highcharts.com"}};c.setOptions=function(g){c.defaultOptions=I(!0,c.defaultOptions,g);(g.time||g.global)&&c.time.update(I(c.defaultOptions.global,c.defaultOptions.time,g.global,g.time));return c.defaultOptions};c.getOptions=function(){return c.defaultOptions};c.defaultPlotOptions=c.defaultOptions.plotOptions;c.time=new c.Time(I(c.defaultOptions.global,c.defaultOptions.time));c.dateFormat=function(g,H,y){return c.time.dateFormat(g,H,y)};""});K(D,"parts/Tick.js",[D["parts/Globals.js"],
D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.destroyObjectProperties,H=g.extend,y=g.isNumber,w=g.pick,x=c.correctFloat,E=c.fireEvent,F=c.merge,t=c.deg2rad;c.Tick=function(c,p,q,h,a){this.axis=c;this.pos=p;this.type=q||"";this.isNewLabel=this.isNew=!0;this.parameters=a||{};this.tickmarkOffset=this.parameters.tickmarkOffset;this.options=this.parameters.options;q||h||this.addLabel()};c.Tick.prototype={addLabel:function(){var c=this,p=c.axis,q=p.options,h=p.chart,a=p.categories,b=p.names,
d=c.pos,e=w(c.options&&c.options.labels,q.labels),k=p.tickPositions,C=d===k[0],z=d===k[k.length-1];a=this.parameters.category||(a?w(a[d],b[d],d):d);var r=c.label;k=k.info;var n,f;if(p.isDatetimeAxis&&k){var l=h.time.resolveDTLFormat(q.dateTimeLabelFormats[!q.grid&&k.higherRanks[d]||k.unitName]);var v=l.main}c.isFirst=C;c.isLast=z;c.formatCtx={axis:p,chart:h,isFirst:C,isLast:z,dateTimeLabelFormat:v,tickPositionInfo:k,value:p.isLog?x(p.lin2log(a)):a,pos:d};q=p.labelFormatter.call(c.formatCtx,this.formatCtx);
if(f=l&&l.list)c.shortenLabel=function(){for(n=0;n<f.length;n++)if(r.attr({text:p.labelFormatter.call(H(c.formatCtx,{dateTimeLabelFormat:f[n]}))}),r.getBBox().width<p.getSlotWidth(c)-2*w(e.padding,5))return;r.attr({text:""})};if(I(r))r&&r.textStr!==q&&(!r.textWidth||e.style&&e.style.width||r.styles.width||r.css({width:null}),r.attr({text:q}),r.textPxLength=r.getBBox().width);else{if(c.label=r=I(q)&&e.enabled?h.renderer.text(q,0,0,e.useHTML).add(p.labelGroup):null)h.styledMode||r.css(F(e.style)),r.textPxLength=
r.getBBox().width;c.rotation=0}},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(c){var m=this.axis,q=m.options.labels,h=c.x,a=m.chart.chartWidth,b=m.chart.spacing,d=w(m.labelLeft,Math.min(m.pos,b[3]));b=w(m.labelRight,Math.max(m.isRadial?0:m.pos+m.len,a-b[1]));var e=this.label,k=this.rotation,C={left:0,center:.5,right:1}[m.labelAlign||e.attr("align")],z=e.getBBox().width,r=m.getSlotWidth(this),n=r,f=1,l,v={};if(k||"justify"!==
w(q.overflow,"justify"))0>k&&h-C*z<d?l=Math.round(h/Math.cos(k*t)-d):0<k&&h+C*z>b&&(l=Math.round((a-h)/Math.cos(k*t)));else if(a=h+(1-C)*z,h-C*z<d?n=c.x+n*(1-C)-d:a>b&&(n=b-c.x+n*C,f=-1),n=Math.min(r,n),n<r&&"center"===m.labelAlign&&(c.x+=f*(r-n-C*(r-Math.min(z,n)))),z>n||m.autoRotation&&(e.styles||{}).width)l=n;l&&(this.shortenLabel?this.shortenLabel():(v.width=Math.floor(l),(q.style||{}).textOverflow||(v.textOverflow="ellipsis"),e.css(v)))},getPosition:function(m,p,q,h){var a=this.axis,b=a.chart,
d=h&&b.oldChartHeight||b.chartHeight;m={x:m?c.correctFloat(a.translate(p+q,null,null,h)+a.transB):a.left+a.offset+(a.opposite?(h&&b.oldChartWidth||b.chartWidth)-a.right-a.left:0),y:m?d-a.bottom+a.offset-(a.opposite?a.height:0):c.correctFloat(d-a.translate(p+q,null,null,h)-a.transB)};m.y=Math.max(Math.min(m.y,1E5),-1E5);E(this,"afterGetPosition",{pos:m});return m},getLabelPosition:function(c,p,q,h,a,b,d,e){var k=this.axis,m=k.transA,z=k.isLinked&&k.linkedParent?k.linkedParent.reversed:k.reversed,r=
k.staggerLines,n=k.tickRotCorr||{x:0,y:0},f=a.y,l=h||k.reserveSpaceDefault?0:-k.labelOffset*("center"===k.labelAlign?.5:1),v={};I(f)||(f=0===k.side?q.rotation?-8:-q.getBBox().height:2===k.side?n.y+8:Math.cos(q.rotation*t)*(n.y-q.getBBox(!1,0).height/2));c=c+a.x+l+n.x-(b&&h?b*m*(z?-1:1):0);p=p+f-(b&&!h?b*m*(z?1:-1):0);r&&(q=d/(e||1)%r,k.opposite&&(q=r-q-1),p+=k.labelOffset/r*q);v.x=c;v.y=Math.round(p);E(this,"afterGetLabelPosition",{pos:v,tickmarkOffset:b,index:d});return v},getMarkPath:function(c,
p,q,h,a,b){return b.crispLine(["M",c,p,"L",c+(a?0:-q),p+(a?q:0)],h)},renderGridLine:function(c,p,q){var h=this.axis,a=h.options,b=this.gridLine,d={},e=this.pos,k=this.type,m=w(this.tickmarkOffset,h.tickmarkOffset),z=h.chart.renderer,r=k?k+"Grid":"grid",n=a[r+"LineWidth"],f=a[r+"LineColor"];a=a[r+"LineDashStyle"];b||(h.chart.styledMode||(d.stroke=f,d["stroke-width"]=n,a&&(d.dashstyle=a)),k||(d.zIndex=1),c&&(p=0),this.gridLine=b=z.path().attr(d).addClass("highcharts-"+(k?k+"-":"")+"grid-line").add(h.gridGroup));
if(b&&(q=h.getPlotLinePath({value:e+m,lineWidth:b.strokeWidth()*q,force:"pass",old:c})))b[c||this.isNew?"attr":"animate"]({d:q,opacity:p})},renderMark:function(c,p,q){var h=this.axis,a=h.options,b=h.chart.renderer,d=this.type,e=d?d+"Tick":"tick",k=h.tickSize(e),m=this.mark,z=!m,r=c.x;c=c.y;var n=w(a[e+"Width"],!d&&h.isXAxis?1:0);a=a[e+"Color"];k&&(h.opposite&&(k[0]=-k[0]),z&&(this.mark=m=b.path().addClass("highcharts-"+(d?d+"-":"")+"tick").add(h.axisGroup),h.chart.styledMode||m.attr({stroke:a,"stroke-width":n})),
m[z?"attr":"animate"]({d:this.getMarkPath(r,c,k[0],m.strokeWidth()*q,h.horiz,b),opacity:p}))},renderLabel:function(c,p,q,h){var a=this.axis,b=a.horiz,d=a.options,e=this.label,k=d.labels,m=k.step;a=w(this.tickmarkOffset,a.tickmarkOffset);var z=!0,r=c.x;c=c.y;e&&y(r)&&(e.xy=c=this.getLabelPosition(r,c,e,b,k,a,h,m),this.isFirst&&!this.isLast&&!w(d.showFirstLabel,1)||this.isLast&&!this.isFirst&&!w(d.showLastLabel,1)?z=!1:!b||k.step||k.rotation||p||0===q||this.handleOverflow(c),m&&h%m&&(z=!1),z&&y(c.y)?
(c.opacity=q,e[this.isNewLabel?"attr":"animate"](c),this.isNewLabel=!1):(e.attr("y",-9999),this.isNewLabel=!0))},render:function(m,p,q){var h=this.axis,a=h.horiz,b=this.pos,d=w(this.tickmarkOffset,h.tickmarkOffset);b=this.getPosition(a,b,d,p);d=b.x;var e=b.y;h=a&&d===h.pos+h.len||!a&&e===h.pos?-1:1;q=w(q,1);this.isActive=!0;this.renderGridLine(p,q,h);this.renderMark(b,q,h);this.renderLabel(b,p,q,m);this.isNew=!1;c.fireEvent(this,"afterRender")},destroy:function(){G(this,this.axis)}}});K(D,"parts/Axis.js",
[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.arrayMax,G=g.arrayMin,H=g.defined,y=g.destroyObjectProperties,w=g.extend,x=g.isArray,E=g.isNumber,F=g.isString,t=g.objectEach,m=g.pick,p=g.splat,q=g.syncTimeout,h=c.addEvent,a=c.animObject,b=c.color,d=c.correctFloat,e=c.defaultOptions,k=c.deg2rad,C=c.fireEvent,z=c.format,r=c.getMagnitude,n=c.merge,f=c.normalizeTickInterval,l=c.removeEvent,v=c.seriesTypes,B=c.Tick;g=function(){this.init.apply(this,arguments)};w(g.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",
range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,labels:{enabled:!0,indentation:10,x:0,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,showEmpty:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",
style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){return c.numberFormat(this.total,-1)},style:{color:"#000000",
fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},init:function(a,b){var f=b.isX,l=this;l.chart=a;l.horiz=a.inverted&&!l.isZAxis?!f:f;l.isXAxis=f;l.coll=l.coll||(f?"xAxis":
"yAxis");C(this,"init",{userOptions:b});l.opposite=b.opposite;l.side=b.side||(l.horiz?l.opposite?0:2:l.opposite?1:3);l.setOptions(b);var u=this.options,A=u.type;l.labelFormatter=u.labels.formatter||l.defaultLabelFormatter;l.userOptions=b;l.minPixelPadding=0;l.reversed=u.reversed;l.visible=!1!==u.visible;l.zoomEnabled=!1!==u.zoomEnabled;l.hasNames="category"===A||!0===u.categories;l.categories=u.categories||l.hasNames;l.names||(l.names=[],l.names.keys={});l.plotLinesAndBandsGroups={};l.isLog="logarithmic"===
A;l.isDatetimeAxis="datetime"===A;l.positiveValuesOnly=l.isLog&&!l.allowNegativeLog;l.isLinked=H(u.linkedTo);l.ticks={};l.labelEdge=[];l.minorTicks={};l.plotLinesAndBands=[];l.alternateBands={};l.len=0;l.minRange=l.userMinRange=u.minRange||u.maxZoom;l.range=u.range;l.offset=u.offset||0;l.stacks={};l.oldStacks={};l.stacksTouched=0;l.max=null;l.min=null;l.crosshair=m(u.crosshair,p(a.options.tooltip.crosshairs)[f?0:1],!1);b=l.options.events;-1===a.axes.indexOf(l)&&(f?a.axes.splice(a.xAxis.length,0,l):
a.axes.push(l),a[l.coll].push(l));l.series=l.series||[];a.inverted&&!l.isZAxis&&f&&void 0===l.reversed&&(l.reversed=!0);t(b,function(a,b){c.isFunction(a)&&h(l,b,a)});l.lin2log=u.linearToLogConverter||l.lin2log;l.isLog&&(l.val2lin=l.log2lin,l.lin2val=l.lin2log);C(this,"afterInit")},setOptions:function(a){this.options=n(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],
n(e[this.coll],a));C(this,"afterSetOptions",{userOptions:a})},defaultLabelFormatter:function(){var a=this.axis,b=this.value,f=a.chart.time,l=a.categories,d=this.dateTimeLabelFormat,k=e.lang,n=k.numericSymbols;k=k.numericSymbolMagnitude||1E3;var v=n&&n.length,B=a.options.labels.format;a=a.isLog?Math.abs(b):a.tickInterval;if(B)var h=z(B,this,f);else if(l)h=b;else if(d)h=f.dateFormat(d,b);else if(v&&1E3<=a)for(;v--&&void 0===h;)f=Math.pow(k,v+1),a>=f&&0===10*b%f&&null!==n[v]&&0!==b&&(h=c.numberFormat(b/
f,-1)+n[v]);void 0===h&&(h=1E4<=Math.abs(b)?c.numberFormat(b,-1):c.numberFormat(b,-1,void 0,""));return h},getSeriesExtremes:function(){var a=this,b=a.chart,f;C(this,"getSeriesExtremes",null,function(){a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();a.series.forEach(function(l){if(l.visible||!b.options.chart.ignoreHiddenSeries){var u=l.options,A=u.threshold;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=A&&(A=null);if(a.isXAxis){if(u=
l.xData,u.length){f=l.getXExtremes(u);var d=f.min;var e=f.max;E(d)||d instanceof Date||(u=u.filter(E),f=l.getXExtremes(u),d=f.min,e=f.max);u.length&&(a.dataMin=Math.min(m(a.dataMin,d),d),a.dataMax=Math.max(m(a.dataMax,e),e))}}else if(l.getExtremes(),e=l.dataMax,d=l.dataMin,H(d)&&H(e)&&(a.dataMin=Math.min(m(a.dataMin,d),d),a.dataMax=Math.max(m(a.dataMax,e),e)),H(A)&&(a.threshold=A),!u.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})});C(this,"afterGetSeriesExtremes")},translate:function(a,
b,f,l,d,e){var u=this.linkedParent||this,A=1,k=0,n=l?u.oldTransA:u.transA;l=l?u.oldMin:u.min;var c=u.minPixelPadding;d=(u.isOrdinal||u.isBroken||u.isLog&&d)&&u.lin2val;n||(n=u.transA);f&&(A*=-1,k=u.len);u.reversed&&(A*=-1,k-=A*(u.sector||u.len));b?(a=(a*A+k-c)/n+l,d&&(a=u.lin2val(a))):(d&&(a=u.val2lin(a)),a=E(l)?A*(a-l)*n+k+A*c+(E(e)?n*e:0):void 0);return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),
!0,!this.horiz,null,!0)},getPlotLinePath:function(a){var b=this,f=b.chart,l=b.left,d=b.top,A=a.old,e=a.value,k=a.translatedValue,n=a.lineWidth,c=a.force,v,B,h,r,z=A&&f.oldChartHeight||f.chartHeight,p=A&&f.oldChartWidth||f.chartWidth,q,g=b.transB,t=function(a,b,f){if("pass"!==c&&a<b||a>f)c?a=Math.min(Math.max(b,a),f):q=!0;return a};a={value:e,lineWidth:n,old:A,force:c,acrossPanes:a.acrossPanes,translatedValue:k};C(this,"getPlotLinePath",a,function(a){k=m(k,b.translate(e,null,null,A));k=Math.min(Math.max(-1E5,
k),1E5);v=h=Math.round(k+g);B=r=Math.round(z-k-g);E(k)?b.horiz?(B=d,r=z-b.bottom,v=h=t(v,l,l+b.width)):(v=l,h=p-b.right,B=r=t(B,d,d+b.height)):(q=!0,c=!1);a.path=q&&!c?null:f.renderer.crispLine(["M",v,B,"L",h,r],n||1)});return a.path},getLinearTickPositions:function(a,b,f){var l=d(Math.floor(b/a)*a);f=d(Math.ceil(f/a)*a);var u=[],A;d(l+a)===l&&(A=20);if(this.single)return[b];for(b=l;b<=f;){u.push(b);b=d(b+a,A);if(b===e)break;var e=b}return u},getMinorTickInterval:function(){var a=this.options;return!0===
a.minorTicks?m(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval},getMinorTickPositions:function(){var a=this,b=a.options,f=a.tickPositions,l=a.minorTickInterval,d=[],e=a.pointRangePadding||0,k=a.min-e;e=a.max+e;var n=e-k;if(n&&n/l<a.len/3)if(a.isLog)this.paddedTicks.forEach(function(b,f,u){f&&d.push.apply(d,a.getLogTickPositions(l,u[f-1],u[f],!0))});else if(a.isDatetimeAxis&&"auto"===this.getMinorTickInterval())d=d.concat(a.getTimeTicks(a.normalizeTimeTickInterval(l),k,e,b.startOfWeek));
else for(b=k+(f[0]-k)%l;b<=e&&b!==d[0];b+=l)d.push(b);0!==d.length&&a.trimTicks(d);return d},adjustForMinRange:function(){var a=this.options,b=this.min,f=this.max,l,d,e,k,n;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(H(a.min)||H(a.max)?this.minRange=null:(this.series.forEach(function(a){k=a.xData;for(d=n=a.xIncrement?1:k.length-1;0<d;d--)if(e=k[d]-k[d-1],void 0===l||e<l)l=e}),this.minRange=Math.min(5*l,this.dataMax-this.dataMin)));if(f-b<this.minRange){var c=this.dataMax-this.dataMin>=this.minRange;
var v=this.minRange;var B=(v-f+b)/2;B=[b-B,m(a.min,b-B)];c&&(B[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin);b=I(B);f=[b+v,m(a.max,b+v)];c&&(f[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax);f=G(f);f-b<v&&(B[0]=f-v,B[1]=m(a.min,f-v),b=I(B))}this.min=b;this.max=f},getClosest:function(){var a;this.categories?a=1:this.series.forEach(function(b){var f=b.closestPointRange,l=b.visible||!b.chart.options.chart.ignoreHiddenSeries;!b.noSharedTooltip&&H(f)&&l&&(a=H(a)?Math.min(a,f):f)});return a},
nameToX:function(a){var b=x(this.categories),f=b?this.categories:this.names,l=a.options.x;a.series.requireSorting=!1;H(l)||(l=!1===this.options.uniqueNames?a.series.autoIncrement():b?f.indexOf(a.name):m(f.keys[a.name],-1));if(-1===l){if(!b)var d=f.length}else d=l;void 0!==d&&(this.names[d]=a.name,this.names.keys[a.name]=d);return d},updateNames:function(){var a=this,b=this.names;0<b.length&&(Object.keys(b.keys).forEach(function(a){delete b.keys[a]}),b.length=0,this.minRange=this.userMinRange,(this.series||
[]).forEach(function(b){b.xIncrement=null;if(!b.points||b.isDirtyData)a.max=Math.max(a.max,b.xData.length-1),b.processData(),b.generatePoints();b.data.forEach(function(f,l){if(f&&f.options&&void 0!==f.name){var u=a.nameToX(f);void 0!==u&&u!==f.x&&(f.x=u,b.xData[l]=u)}})}))},setAxisTranslation:function(a){var b=this,f=b.max-b.min,l=b.axisPointRange||0,d=0,e=0,k=b.linkedParent,A=!!b.categories,n=b.transA,c=b.isXAxis;if(c||A||l){var B=b.getClosest();k?(d=k.minPointOffset,e=k.pointRangePadding):b.series.forEach(function(a){var f=
A?1:c?m(a.options.pointRange,B,0):b.axisPointRange||0,u=a.options.pointPlacement;l=Math.max(l,f);if(!b.single||A)a=v.xrange&&a instanceof v.xrange?!c:c,d=Math.max(d,a&&F(u)?0:f/2),e=Math.max(e,a&&"on"===u?0:f)});k=b.ordinalSlope&&B?b.ordinalSlope/B:1;b.minPointOffset=d*=k;b.pointRangePadding=e*=k;b.pointRange=Math.min(l,b.single&&A?1:f);c&&(b.closestPointRange=B)}a&&(b.oldTransA=n);b.translationSlope=b.transA=n=b.staticScale||b.len/(f+e||1);b.transB=b.horiz?b.left:b.bottom;b.minPixelPadding=n*d;C(this,
"afterSetAxisTranslation")},minFromRange:function(){return this.max-this.range},setTickInterval:function(a){var b=this,l=b.chart,e=b.options,k=b.isLog,A=b.isDatetimeAxis,n=b.isXAxis,v=b.isLinked,B=e.maxPadding,h=e.minPadding,z=e.tickInterval,p=e.tickPixelInterval,q=b.categories,g=E(b.threshold)?b.threshold:null,t=b.softThreshold;A||q||v||this.getTickAmount();var x=m(b.userMin,e.min);var w=m(b.userMax,e.max);if(v){b.linkedParent=l[b.coll][e.linkedTo];var y=b.linkedParent.getExtremes();b.min=m(y.min,
y.dataMin);b.max=m(y.max,y.dataMax);e.type!==b.linkedParent.options.type&&c.error(11,1,l)}else{if(!t&&H(g))if(b.dataMin>=g)y=g,h=0;else if(b.dataMax<=g){var F=g;B=0}b.min=m(x,y,b.dataMin);b.max=m(w,F,b.dataMax)}k&&(b.positiveValuesOnly&&!a&&0>=Math.min(b.min,m(b.dataMin,b.min))&&c.error(10,1,l),b.min=d(b.log2lin(b.min),16),b.max=d(b.log2lin(b.max),16));b.range&&H(b.max)&&(b.userMin=b.min=x=Math.max(b.dataMin,b.minFromRange()),b.userMax=w=b.max,b.range=null);C(b,"foundExtremes");b.beforePadding&&b.beforePadding();
b.adjustForMinRange();!(q||b.axisPointRange||b.usePercentage||v)&&H(b.min)&&H(b.max)&&(l=b.max-b.min)&&(!H(x)&&h&&(b.min-=l*h),!H(w)&&B&&(b.max+=l*B));E(e.softMin)&&!E(b.userMin)&&e.softMin<b.min&&(b.min=x=e.softMin);E(e.softMax)&&!E(b.userMax)&&e.softMax>b.max&&(b.max=w=e.softMax);E(e.floor)&&(b.min=Math.min(Math.max(b.min,e.floor),Number.MAX_VALUE));E(e.ceiling)&&(b.max=Math.max(Math.min(b.max,e.ceiling),m(b.userMax,-Number.MAX_VALUE)));t&&H(b.dataMin)&&(g=g||0,!H(x)&&b.min<g&&b.dataMin>=g?b.min=
b.options.minRange?Math.min(g,b.max-b.minRange):g:!H(w)&&b.max>g&&b.dataMax<=g&&(b.max=b.options.minRange?Math.max(g,b.min+b.minRange):g));b.tickInterval=b.min===b.max||void 0===b.min||void 0===b.max?1:v&&!z&&p===b.linkedParent.options.tickPixelInterval?z=b.linkedParent.tickInterval:m(z,this.tickAmount?(b.max-b.min)/Math.max(this.tickAmount-1,1):void 0,q?1:(b.max-b.min)*p/Math.max(b.len,p));n&&!a&&b.series.forEach(function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);
b.beforeSetTickPositions&&b.beforeSetTickPositions();b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval));b.pointRange&&!z&&(b.tickInterval=Math.max(b.pointRange,b.tickInterval));a=m(e.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);!z&&b.tickInterval<a&&(b.tickInterval=a);A||k||z||(b.tickInterval=f(b.tickInterval,null,r(b.tickInterval),m(e.allowDecimals,!(.5<b.tickInterval&&5>b.tickInterval&&1E3<b.max&&9999>b.max)),!!this.tickAmount));this.tickAmount||(b.tickInterval=
b.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,b=a.tickPositions;var f=this.getMinorTickInterval();var l=a.tickPositioner,d=a.startOnTick,e=a.endOnTick;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===f&&this.tickInterval?this.tickInterval/5:f;this.single=this.min===this.max&&H(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=
f=b&&b.slice();!f&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(f=[this.min,this.max],c.error(19,!1,this.chart)):f=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),f.length>this.len&&(f=[f[0],
f.pop()],f[0]===f[1]&&(f.length=1)),this.tickPositions=f,l&&(l=l.apply(this,[this.min,this.max])))&&(this.tickPositions=f=l);this.paddedTicks=f.slice(0);this.trimTicks(f,d,e);this.isLinked||(this.single&&2>f.length&&!this.categories&&(this.min-=.5,this.max+=.5),b||l||this.adjustTickAmount());C(this,"afterSetTickPositions")},trimTicks:function(a,b,f){var l=a[0],d=a[a.length-1],e=this.minPointOffset||0;C(this,"trimTicks");if(!this.isLinked){if(b&&-Infinity!==l)this.min=l;else for(;this.min-e>a[0];)a.shift();
if(f)this.max=d;else for(;this.max+e<a[a.length-1];)a.pop();0===a.length&&H(l)&&!this.options.tickPositions&&a.push((d+l)/2)}},alignToOthers:function(){var a={},b,f=this.options;!1===this.chart.options.chart.alignTicks||!1===f.alignTicks||!1===f.startOnTick||!1===f.endOnTick||this.isLog||this.chart[this.coll].forEach(function(f){var l=f.options;l=[f.horiz?l.left:l.top,l.width,l.height,l.pane].join();f.series.length&&(a[l]?b=!0:a[l]=1)});return b},getTickAmount:function(){var a=this.options,b=a.tickAmount,
f=a.tickPixelInterval;!H(a.tickInterval)&&this.len<f&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(b=2);!b&&this.alignToOthers()&&(b=Math.ceil(this.len/f)+1);4>b&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.options,b=this.tickInterval,f=this.tickPositions,l=this.tickAmount,e=this.finalTickAmt,k=f&&f.length,n=m(this.threshold,this.softThreshold?0:null),c;if(this.hasData()){if(k<l){for(c=this.min;f.length<l;)f.length%2||c===n?f.push(d(f[f.length-
1]+b)):f.unshift(d(f[0]-b));this.transA*=(k-1)/(l-1);this.min=a.startOnTick?f[0]:Math.min(this.min,f[0]);this.max=a.endOnTick?f[f.length-1]:Math.max(this.max,f[f.length-1])}else k>l&&(this.tickInterval*=2,this.setTickPositions());if(H(e)){for(b=a=f.length;b--;)(3===e&&1===b%2||2>=e&&0<b&&b<a-1)&&f.splice(b,1);this.finalTickAmt=void 0}}},setScale:function(){var a=this.series.some(function(a){return a.isDirtyData||a.isDirty||a.xAxis&&a.xAxis.isDirty}),b;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=
this.len;this.setAxisSize();(b=this.len!==this.oldAxisLength)||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=b||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks();C(this,"afterSetScale")},setExtremes:function(a,
b,f,l,d){var e=this,k=e.chart;f=m(f,!0);e.series.forEach(function(a){delete a.kdTree});d=w(d,{min:a,max:b});C(e,"setExtremes",d,function(){e.userMin=a;e.userMax=b;e.eventArgs=d;f&&k.redraw(l)})},zoom:function(a,b){var f=this.dataMin,l=this.dataMax,d=this.options,e=Math.min(f,m(d.min,f)),k=Math.max(l,m(d.max,l));a={newMin:a,newMax:b};C(this,"zoom",a,function(a){var b=a.newMin,d=a.newMax;if(b!==this.min||d!==this.max)this.allowZoomOutside||(H(f)&&(b<e&&(b=e),b>k&&(b=k)),H(l)&&(d<e&&(d=e),d>k&&(d=k))),
this.displayBtn=void 0!==b||void 0!==d,this.setExtremes(b,d,!1,void 0,{trigger:"zoom"});a.zoomed=!0});return a.zoomed},setAxisSize:function(){var a=this.chart,b=this.options,f=b.offsets||[0,0,0,0],l=this.horiz,d=this.width=Math.round(c.relativeLength(m(b.width,a.plotWidth-f[3]+f[1]),a.plotWidth)),e=this.height=Math.round(c.relativeLength(m(b.height,a.plotHeight-f[0]+f[2]),a.plotHeight)),k=this.top=Math.round(c.relativeLength(m(b.top,a.plotTop+f[0]),a.plotHeight,a.plotTop));b=this.left=Math.round(c.relativeLength(m(b.left,
a.plotLeft+f[3]),a.plotWidth,a.plotLeft));this.bottom=a.chartHeight-e-k;this.right=a.chartWidth-d-b;this.len=Math.max(l?d:e,0);this.pos=l?b:k},getExtremes:function(){var a=this.isLog;return{min:a?d(this.lin2log(this.min)):this.min,max:a?d(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,f=b?this.lin2log(this.min):this.min;b=b?this.lin2log(this.max):this.max;null===a||-Infinity===a?a=f:Infinity===
a?a=b:f>a?a=f:b<a&&(a=b);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){var b=(m(a,0)-90*this.side+720)%360;a={align:"center"};C(this,"autoLabelAlign",a,function(a){15<b&&165>b?a.align="right":195<b&&345>b&&(a.align="left")});return a.align},tickSize:function(a){var b=this.options,f=b[a+"Length"],l=m(b[a+"Width"],"tick"===a&&this.isXAxis&&!this.categories?1:0);if(l&&f){"inside"===b[a+"Position"]&&(f=-f);var d=[f,l]}a={tickSize:d};C(this,"afterTickSize",a);return a.tickSize},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,b=this.horiz,f=this.tickInterval,l=f,e=this.len/(((this.categories?1:0)+this.max-this.min)/f),n,c=a.rotation,v=this.labelMetrics(),B,h=Number.MAX_VALUE,r,C=this.max-this.min,z=function(a){var b=a/(e||1);b=1<b?Math.ceil(b):1;b*f>C&&Infinity!==a&&Infinity!==e&&C&&(b=Math.ceil(C/
f));return d(b*f)};b?(r=!a.staggerLines&&!a.step&&(H(c)?[c]:e<m(a.autoRotationLimit,80)&&a.autoRotation))&&r.forEach(function(a){if(a===c||a&&-90<=a&&90>=a){B=z(Math.abs(v.h/Math.sin(k*a)));var b=B+Math.abs(a/360);b<h&&(h=b,n=a,l=B)}}):a.step||(l=z(v.h));this.autoRotation=r;this.labelRotation=m(n,c);return l},getSlotWidth:function(a){var b=this.chart,f=this.horiz,l=this.options.labels,d=Math.max(this.tickPositions.length-(this.categories?0:1),1),e=b.margin[3];return a&&a.slotWidth||f&&2>(l.step||
0)&&!l.rotation&&(this.staggerLines||1)*this.len/d||!f&&(l.style&&parseInt(l.style.width,10)||e&&e-b.spacing[3]||.33*b.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,f=this.tickPositions,l=this.ticks,d=this.options.labels,e=d&&d.style||{},k=this.horiz,n=this.getSlotWidth(),c=Math.max(1,Math.round(n-2*(d.padding||5))),v={},B=this.labelMetrics(),h=d.style&&d.style.textOverflow,r=0;F(d.rotation)||(v.rotation=d.rotation||0);f.forEach(function(a){(a=l[a])&&a.label&&a.label.textPxLength>
r&&(r=a.label.textPxLength)});this.maxLabelLength=r;if(this.autoRotation)r>c&&r>B.h?v.rotation=this.labelRotation:this.labelRotation=0;else if(n){var m=c;if(!h){var C="clip";for(c=f.length;!k&&c--;){var z=f[c];if(z=l[z].label)z.styles&&"ellipsis"===z.styles.textOverflow?z.css({textOverflow:"clip"}):z.textPxLength>n&&z.css({width:n+"px"}),z.getBBox().height>this.len/f.length-(B.h-B.f)&&(z.specificTextOverflow="ellipsis")}}}v.rotation&&(m=r>.5*a.chartHeight?.33*a.chartHeight:r,h||(C="ellipsis"));if(this.labelAlign=
d.align||this.autoLabelAlign(this.labelRotation))v.align=this.labelAlign;f.forEach(function(a){var b=(a=l[a])&&a.label,f=e.width,d={};b&&(b.attr(v),a.shortenLabel?a.shortenLabel():m&&!f&&"nowrap"!==e.whiteSpace&&(m<b.textPxLength||"SPAN"===b.element.tagName)?(d.width=m,h||(d.textOverflow=b.specificTextOverflow||C),b.css(d)):b.styles&&b.styles.width&&!d.width&&!f&&b.css({width:null}),delete b.specificTextOverflow,a.rotation=v.rotation)},this);this.tickRotCorr=b.rotCorr(B.b,this.labelRotation||0,0!==
this.side)},hasData:function(){return this.series.some(function(a){return a.hasData()})||this.options.showEmpty&&H(this.min)&&H(this.max)},addTitle:function(a){var b=this.chart.renderer,f=this.horiz,l=this.opposite,d=this.options.title,e,k=this.chart.styledMode;this.axisTitle||((e=d.textAlign)||(e=(f?{low:"left",middle:"center",high:"right"}:{low:l?"right":"left",middle:"center",high:l?"left":"right"})[d.align]),this.axisTitle=b.text(d.text,0,0,d.useHTML).attr({zIndex:7,rotation:d.rotation||0,align:e}).addClass("highcharts-axis-title"),
k||this.axisTitle.css(n(d.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0);k||d.style.width||this.isRadial||this.axisTitle.css({width:this.len});this.axisTitle[a?"show":"hide"](a)},generateTick:function(a){var b=this.ticks;b[a]?b[a].addLabel():b[a]=new B(this,a)},getOffset:function(){var a=this,b=a.chart,f=b.renderer,l=a.options,d=a.tickPositions,e=a.ticks,k=a.horiz,n=a.side,c=b.inverted&&!a.isZAxis?[1,0,3,2][n]:n,v,B=0,h=0,r=l.title,z=l.labels,p=0,g=b.axisOffset;b=b.clipOffset;
var q=[-1,1,1,-1][n],x=l.className,w=a.axisParent;var E=a.hasData();a.showAxis=v=E||m(l.showEmpty,!0);a.staggerLines=a.horiz&&z.staggerLines;a.axisGroup||(a.gridGroup=f.g("grid").attr({zIndex:l.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(x||"")).add(w),a.axisGroup=f.g("axis").attr({zIndex:l.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(x||"")).add(w),a.labelGroup=f.g("axis-labels").attr({zIndex:z.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+
"-labels "+(x||"")).add(w));E||a.isLinked?(d.forEach(function(b,f){a.generateTick(b,f)}),a.renderUnsquish(),a.reserveSpaceDefault=0===n||2===n||{1:"left",3:"right"}[n]===a.labelAlign,m(z.reserveSpace,"center"===a.labelAlign?!0:null,a.reserveSpaceDefault)&&d.forEach(function(a){p=Math.max(e[a].getLabelSize(),p)}),a.staggerLines&&(p*=a.staggerLines),a.labelOffset=p*(a.opposite?-1:1)):t(e,function(a,b){a.destroy();delete e[b]});if(r&&r.text&&!1!==r.enabled&&(a.addTitle(v),v&&!1!==r.reserveSpace)){a.titleOffset=
B=a.axisTitle.getBBox()[k?"height":"width"];var y=r.offset;h=H(y)?0:m(r.margin,k?5:10)}a.renderLine();a.offset=q*m(l.offset,g[n]?g[n]+(l.margin||0):0);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};f=0===n?-a.labelMetrics().h:2===n?a.tickRotCorr.y:0;h=Math.abs(p)+h;p&&(h=h-f+q*(k?m(z.y,a.tickRotCorr.y+8*q):z.x));a.axisTitleMargin=m(y,h);a.getMaxLabelDimensions&&(a.maxLabelDimensions=a.getMaxLabelDimensions(e,d));k=this.tickSize("tick");g[n]=Math.max(g[n],a.axisTitleMargin+B+q*a.offset,h,d&&d.length&&k?k[0]+
q*a.offset:0);l=l.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);b[c]=Math.max(b[c],l);C(this,"afterGetOffset")},getLinePath:function(a){var b=this.chart,f=this.opposite,l=this.offset,d=this.horiz,e=this.left+(f?this.width:0)+l;l=b.chartHeight-this.bottom-(f?this.height:0)+l;f&&(a*=-1);return b.renderer.crispLine(["M",d?this.left:e,d?l:this.top,"L",d?b.chartWidth-this.right:e,d?l:b.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),
this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var a=this.horiz,b=this.left,f=this.top,l=this.len,d=this.options.title,e=a?b:f,k=this.opposite,n=this.offset,c=d.x||0,v=d.y||0,B=this.axisTitle,h=this.chart.renderer.fontMetrics(d.style&&d.style.fontSize,B);B=Math.max(B.getBBox(null,0).height-h.h-1,0);l={low:e+(a?0:l),middle:e+l/2,high:e+(a?l:0)}[d.align];b=(a?f+this.height:b)+(a?1:-1)*(k?-1:1)*this.axisTitleMargin+
[-B,B,h.f,-B][this.side];a={x:a?l+c:b+(k?this.width:0)+n+c,y:a?b+v-(k?this.height:0)+n:l+v};C(this,"afterGetTitlePosition",{titlePosition:a});return a},renderMinorTick:function(a){var b=this.chart.hasRendered&&E(this.oldMin),f=this.minorTicks;f[a]||(f[a]=new B(this,a,"minor"));b&&f[a].isNew&&f[a].render(null,!0);f[a].render(null,!1,1)},renderTick:function(a,b){var f=this.isLinked,l=this.ticks,d=this.chart.hasRendered&&E(this.oldMin);if(!f||a>=this.min&&a<=this.max)l[a]||(l[a]=new B(this,a)),d&&l[a].isNew&&
l[a].render(b,!0,-1),l[a].render(b)},render:function(){var b=this,f=b.chart,l=b.options,d=b.isLog,e=b.isLinked,k=b.tickPositions,n=b.axisTitle,v=b.ticks,h=b.minorTicks,r=b.alternateBands,m=l.stackLabels,z=l.alternateGridColor,p=b.tickmarkOffset,g=b.axisLine,x=b.showAxis,w=a(f.renderer.globalAnimation),y,F;b.labelEdge.length=0;b.overlap=!1;[v,h,r].forEach(function(a){t(a,function(a){a.isActive=!1})});if(b.hasData()||e)b.minorTickInterval&&!b.categories&&b.getMinorTickPositions().forEach(function(a){b.renderMinorTick(a)}),
k.length&&(k.forEach(function(a,f){b.renderTick(a,f)}),p&&(0===b.min||b.single)&&(v[-1]||(v[-1]=new B(b,-1,null,!0)),v[-1].render(-1))),z&&k.forEach(function(a,l){F=void 0!==k[l+1]?k[l+1]+p:b.max-p;0===l%2&&a<b.max&&F<=b.max+(f.polar?-p:p)&&(r[a]||(r[a]=new c.PlotLineOrBand(b)),y=a+p,r[a].options={from:d?b.lin2log(y):y,to:d?b.lin2log(F):F,color:z},r[a].render(),r[a].isActive=!0)}),b._addedPlotLB||((l.plotLines||[]).concat(l.plotBands||[]).forEach(function(a){b.addPlotBandOrLine(a)}),b._addedPlotLB=
!0);[v,h,r].forEach(function(a){var b,l=[],d=w.duration;t(a,function(a,b){a.isActive||(a.render(b,!1,0),a.isActive=!1,l.push(b))});q(function(){for(b=l.length;b--;)a[l[b]]&&!a[l[b]].isActive&&(a[l[b]].destroy(),delete a[l[b]])},a!==r&&f.hasRendered&&d?d:0)});g&&(g[g.isPlaced?"animate":"attr"]({d:this.getLinePath(g.strokeWidth())}),g.isPlaced=!0,g[x?"show":"hide"](x));n&&x&&(l=b.getTitlePosition(),E(l.y)?(n[n.isNew?"attr":"animate"](l),n.isNew=!1):(n.attr("y",-9999),n.isNew=!0));m&&m.enabled&&b.renderStackTotals();
b.isDirty=!1;C(this,"afterRender")},redraw:function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(a){a.render()}));this.series.forEach(function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var b=this,f=b.stacks,d=b.plotLinesAndBands,e;C(this,"destroy",{keepEvents:a});a||l(b);t(f,function(a,b){y(a);f[b]=null});[b.ticks,b.minorTicks,b.alternateBands].forEach(function(a){y(a)});if(d)for(a=d.length;a--;)d[a].destroy();
"stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(a){b[a]&&(b[a]=b[a].destroy())});for(e in b.plotLinesAndBandsGroups)b.plotLinesAndBandsGroups[e]=b.plotLinesAndBandsGroups[e].destroy();t(b,function(a,f){-1===b.keepProps.indexOf(f)&&delete b[f]})},drawCrosshair:function(a,f){var l,d=this.crosshair,e=m(d.snap,!0),k,n=this.cross;C(this,"drawCrosshair",{e:a,point:f});a||(a=this.cross&&this.cross.e);if(this.crosshair&&!1!==(H(f)||!e)){e?H(f)&&
(k=m("colorAxis"!==this.coll?f.crosshairPos:null,this.isXAxis?f.plotX:this.len-f.plotY)):k=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos);H(k)&&(l=this.getPlotLinePath({value:f&&(this.isXAxis?f.x:m(f.stackY,f.y)),translatedValue:k})||null);if(!H(l)){this.hideCrosshair();return}e=this.categories&&!this.isRadial;n||(this.cross=n=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(e?"category ":"thin ")+d.className).attr({zIndex:m(d.zIndex,2)}).add(),this.chart.styledMode||
(n.attr({stroke:d.color||(e?b("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":m(d.width,1)}).css({"pointer-events":"none"}),d.dashStyle&&n.attr({dashstyle:d.dashStyle})));n.show().attr({d:l});e&&!d.width&&n.attr({"stroke-width":this.transA});this.cross.e=a}else this.hideCrosshair();C(this,"afterDrawCrosshair",{e:a,point:f})},hideCrosshair:function(){this.cross&&this.cross.hide();C(this,"afterHideCrosshair")}});return c.Axis=g});K(D,"parts/DateTimeAxis.js",[D["parts/Globals.js"]],function(c){var g=
c.Axis,I=c.getMagnitude,G=c.normalizeTickInterval,H=c.timeUnits;g.prototype.getTimeTicks=function(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)};g.prototype.normalizeTimeTickInterval=function(c,g){var x=g||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];g=x[x.length-1];var w=H[g[0]],y=g[1],t;for(t=0;t<x.length&&!(g=x[t],w=H[g[0]],
y=g[1],x[t+1]&&c<=(w*y[y.length-1]+H[x[t+1][0]])/2);t++);w===H.year&&c<5*w&&(y=[1,2,5]);c=G(c/w,y,"year"===g[0]?Math.max(I(c/w),1):1);return{unitRange:w,count:c,unitName:g[0]}}});K(D,"parts/LogarithmicAxis.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.pick;g=c.Axis;var G=c.getMagnitude,H=c.normalizeTickInterval;g.prototype.getLogTickPositions=function(c,g,x,E){var w=this.options,t=this.len,m=[];E||(this._minorAutoInterval=null);if(.5<=c)c=Math.round(c),m=this.getLinearTickPositions(c,
g,x);else if(.08<=c){t=Math.floor(g);var p,q;for(w=.3<c?[1,2,4]:.15<c?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];t<x+1&&!q;t++){var h=w.length;for(p=0;p<h&&!q;p++){var a=this.log2lin(this.lin2log(t)*w[p]);a>g&&(!E||b<=x)&&void 0!==b&&m.push(b);b>x&&(q=!0);var b=a}}}else g=this.lin2log(g),x=this.lin2log(x),c=E?this.getMinorTickInterval():w.tickInterval,c=I("auto"===c?null:c,this._minorAutoInterval,w.tickPixelInterval/(E?5:1)*(x-g)/((E?t/this.tickPositions.length:t)||1)),c=H(c,null,G(c)),m=this.getLinearTickPositions(c,
g,x).map(this.log2lin),E||(this._minorAutoInterval=c/5);E||(this.tickInterval=c);return m};g.prototype.log2lin=function(c){return Math.log(c)/Math.LN10};g.prototype.lin2log=function(c){return Math.pow(10,c)}});K(D,"parts/PlotLineOrBand.js",[D["parts/Globals.js"],D["parts/Axis.js"],D["parts/Utilities.js"]],function(c,g,I){var G=I.arrayMax,H=I.arrayMin,y=I.defined,w=I.destroyObjectProperties,x=I.erase,E=I.extend,F=I.objectEach,t=I.pick,m=c.merge;c.PlotLineOrBand=function(c,m){this.axis=c;m&&(this.options=
m,this.id=m.id)};c.PlotLineOrBand.prototype={render:function(){c.fireEvent(this,"render");var p=this,g=p.axis,h=g.horiz,a=p.options,b=a.label,d=p.label,e=a.to,k=a.from,C=a.value,z=y(k)&&y(e),r=y(C),n=p.svgElem,f=!n,l=[],v=a.color,B=t(a.zIndex,0),A=a.events;l={"class":"highcharts-plot-"+(z?"band ":"line ")+(a.className||"")};var u={},J=g.chart.renderer,L=z?"bands":"lines";g.isLog&&(k=g.log2lin(k),e=g.log2lin(e),C=g.log2lin(C));g.chart.styledMode||(r?(l.stroke=v||"#999999",l["stroke-width"]=t(a.width,
1),a.dashStyle&&(l.dashstyle=a.dashStyle)):z&&(l.fill=v||"#e6ebf5",a.borderWidth&&(l.stroke=a.borderColor,l["stroke-width"]=a.borderWidth)));u.zIndex=B;L+="-"+B;(v=g.plotLinesAndBandsGroups[L])||(g.plotLinesAndBandsGroups[L]=v=J.g("plot-"+L).attr(u).add());f&&(p.svgElem=n=J.path().attr(l).add(v));if(r)l=g.getPlotLinePath({value:C,lineWidth:n.strokeWidth(),acrossPanes:a.acrossPanes});else if(z)l=g.getPlotBandPath(k,e,a);else return;(f||!n.d)&&l&&l.length?(n.attr({d:l}),A&&F(A,function(a,b){n.on(b,
function(a){A[b].apply(p,[a])})})):n&&(l?(n.show(!0),n.animate({d:l})):n.d&&(n.hide(),d&&(p.label=d=d.destroy())));b&&(y(b.text)||y(b.formatter))&&l&&l.length&&0<g.width&&0<g.height&&!l.isFlat?(b=m({align:h&&z&&"center",x:h?!z&&4:10,verticalAlign:!h&&z&&"middle",y:h?z?16:10:z?6:-4,rotation:h&&!z&&90},b),this.renderLabel(b,l,z,B)):d&&d.hide();return p},renderLabel:function(c,m,h,a){var b=this.label,d=this.axis.chart.renderer;b||(b={align:c.textAlign||c.align,rotation:c.rotation,"class":"highcharts-plot-"+
(h?"band":"line")+"-label "+(c.className||"")},b.zIndex=a,a=this.getLabelText(c),this.label=b=d.text(a,0,0,c.useHTML).attr(b).add(),this.axis.chart.styledMode||b.css(c.style));d=m.xBounds||[m[1],m[4],h?m[6]:m[1]];m=m.yBounds||[m[2],m[5],h?m[7]:m[2]];h=H(d);a=H(m);b.align(c,!1,{x:h,y:a,width:G(d)-h,height:G(m)-a});b.show(!0)},getLabelText:function(c){return y(c.formatter)?c.formatter.call(this):c.text},destroy:function(){x(this.axis.plotLinesAndBands,this);delete this.axis;w(this)}};E(g.prototype,
{getPlotBandPath:function(c,m){var h=this.getPlotLinePath({value:m,force:!0,acrossPanes:this.options.acrossPanes}),a=this.getPlotLinePath({value:c,force:!0,acrossPanes:this.options.acrossPanes}),b=[],d=this.horiz,e=1;c=c<this.min&&m<this.min||c>this.max&&m>this.max;if(a&&h){if(c){var k=a.toString()===h.toString();e=0}for(c=0;c<a.length;c+=6)d&&h[c+1]===a[c+1]?(h[c+1]+=e,h[c+4]+=e):d||h[c+2]!==a[c+2]||(h[c+2]+=e,h[c+5]+=e),b.push("M",a[c+1],a[c+2],"L",a[c+4],a[c+5],h[c+4],h[c+5],h[c+1],h[c+2],"z"),
b.isFlat=k}return b},addPlotBand:function(c){return this.addPlotBandOrLine(c,"plotBands")},addPlotLine:function(c){return this.addPlotBandOrLine(c,"plotLines")},addPlotBandOrLine:function(m,g){var h=(new c.PlotLineOrBand(this,m)).render(),a=this.userOptions;if(h){if(g){var b=a[g]||[];b.push(m);a[g]=b}this.plotLinesAndBands.push(h)}return h},removePlotBandOrLine:function(c){for(var m=this.plotLinesAndBands,h=this.options,a=this.userOptions,b=m.length;b--;)m[b].id===c&&m[b].destroy();[h.plotLines||
[],a.plotLines||[],h.plotBands||[],a.plotBands||[]].forEach(function(a){for(b=a.length;b--;)a[b].id===c&&x(a,a[b])})},removePlotBand:function(c){this.removePlotBandOrLine(c)},removePlotLine:function(c){this.removePlotBandOrLine(c)}})});K(D,"parts/Tooltip.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.discardElement,H=g.extend,y=g.isNumber,w=g.isString,x=g.pick,E=g.splat,F=g.syncTimeout;"";var t=c.doc,m=c.format,p=c.merge,q=c.timeUnits;c.Tooltip=function(){this.init.apply(this,
arguments)};c.Tooltip.prototype={init:function(c,a){this.chart=c;this.options=a;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=a.split&&!c.inverted;this.shared=a.shared||this.split;this.outside=x(a.outside,!(!c.scrollablePixelsX&&!c.scrollablePixelsY))},cleanSplit:function(c){this.chart.series.forEach(function(a){var b=a&&a.tt;b&&(!b.isActive||c?a.tt=b.destroy():b.isActive=!1)})},applyFilter:function(){var c=this.chart;c.renderer.definition({tagName:"filter",id:"drop-shadow-"+c.index,
opacity:.5,children:[{tagName:"feGaussianBlur","in":"SourceAlpha",stdDeviation:1},{tagName:"feOffset",dx:1,dy:1},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",type:"linear",slope:.3}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode","in":"SourceGraphic"}]}]});c.renderer.definition({tagName:"style",textContent:".highcharts-tooltip-"+c.index+"{filter:url(#drop-shadow-"+c.index+")}"})},getLabel:function(){var h=this,a=this.chart.renderer,b=this.chart.styledMode,
d=this.options,e="tooltip"+(I(d.className)?" "+d.className:""),k;if(!this.label){this.outside&&(this.container=k=c.doc.createElement("div"),k.className="highcharts-tooltip-container",c.css(k,{position:"absolute",top:"1px",pointerEvents:d.style&&d.style.pointerEvents,zIndex:3}),c.doc.body.appendChild(k),this.renderer=a=new c.Renderer(k,0,0,{},void 0,void 0,a.styledMode));this.split?this.label=a.g(e):(this.label=a.label("",0,0,d.shape||"callout",null,null,d.useHTML,null,e).attr({padding:d.padding,r:d.borderRadius}),
b||this.label.attr({fill:d.backgroundColor,"stroke-width":d.borderWidth}).css(d.style).shadow(d.shadow));b&&(this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index));if(h.outside&&!h.split){var m={x:this.label.xSetter,y:this.label.ySetter};this.label.xSetter=function(a,b){m[b].call(this.label,h.distance);k.style.left=a+"px"};this.label.ySetter=function(a,b){m[b].call(this.label,h.distance);k.style.top=a+"px"}}this.label.attr({zIndex:8}).add()}return this.label},update:function(c){this.destroy();
p(!0,this.chart.options.tooltip.userOptions,c);this.init(this.chart,p(!0,this.options,c))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());this.renderer&&(this.renderer=this.renderer.destroy(),G(this.container));c.clearTimeout(this.hideTimer);c.clearTimeout(this.tooltipTimeout)},move:function(h,a,b,d){var e=this,k=e.now,m=!1!==e.options.animation&&!e.isHidden&&(1<Math.abs(h-k.x)||1<Math.abs(a-k.y)),z=
e.followPointer||1<e.len;H(k,{x:m?(2*k.x+h)/3:h,y:m?(k.y+a)/2:a,anchorX:z?void 0:m?(2*k.anchorX+b)/3:b,anchorY:z?void 0:m?(k.anchorY+d)/2:d});e.getLabel().attr(k);m&&(c.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(h,a,b,d)},32))},hide:function(h){var a=this;c.clearTimeout(this.hideTimer);h=x(h,this.options.hideDelay,500);this.isHidden||(this.hideTimer=F(function(){a.getLabel()[h?"fadeOut":"hide"]();a.isHidden=!0},h))},getAnchor:function(c,a){var b=this.chart,
d=b.pointer,e=b.inverted,k=b.plotTop,h=b.plotLeft,m=0,r=0,n,f;c=E(c);this.followPointer&&a?(void 0===a.chartX&&(a=d.normalize(a)),c=[a.chartX-b.plotLeft,a.chartY-k]):c[0].tooltipPos?c=c[0].tooltipPos:(c.forEach(function(a){n=a.series.yAxis;f=a.series.xAxis;m+=a.plotX+(!e&&f?f.left-h:0);r+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&n?n.top-k:0)}),m/=c.length,r/=c.length,c=[e?b.plotWidth-r:m,this.shared&&!e&&1<c.length&&a?a.chartY-k:e?b.plotHeight-m:r]);return c.map(Math.round)},getPosition:function(c,
a,b){var d=this.chart,e=this.distance,k={},h=d.inverted&&b.h||0,m,r=this.outside,n=r?t.documentElement.clientWidth-2*e:d.chartWidth,f=r?Math.max(t.body.scrollHeight,t.documentElement.scrollHeight,t.body.offsetHeight,t.documentElement.offsetHeight,t.documentElement.clientHeight):d.chartHeight,l=d.pointer.getChartPosition(),v=d.containerScaling,B=function(a){return v?a*v.scaleX:a},A=function(a){return v?a*v.scaleY:a},u=function(k){var v="x"===k;return[k,v?n:f,v?c:a].concat(r?[v?B(c):A(a),v?l.left-e+
B(b.plotX+d.plotLeft):l.top-e+A(b.plotY+d.plotTop),0,v?n:f]:[v?c:a,v?b.plotX+d.plotLeft:b.plotY+d.plotTop,v?d.plotLeft:d.plotTop,v?d.plotLeft+d.plotWidth:d.plotTop+d.plotHeight])},g=u("y"),p=u("x"),q=!this.followPointer&&x(b.ttBelow,!d.inverted===!!b.negative),w=function(a,b,f,l,d,c,n){var v="y"===a?A(e):B(e),u=(f-l)/2,r=l<d-e,m=d+e+l<b,C=d-v-f+u;d=d+v-u;if(q&&m)k[a]=d;else if(!q&&r)k[a]=C;else if(r)k[a]=Math.min(n-l,0>C-h?C:C-h);else if(m)k[a]=Math.max(c,d+h+f>b?d:d+h);else return!1},E=function(a,
b,f,l,d){var c;d<e||d>b-e?c=!1:k[a]=d<f/2?1:d>b-l/2?b-l-2:d-f/2;return c},M=function(a){var b=g;g=p;p=b;m=a},N=function(){!1!==w.apply(0,g)?!1!==E.apply(0,p)||m||(M(!0),N()):m?k.x=k.y=0:(M(!0),N())};(d.inverted||1<this.len)&&M();N();return k},defaultFormatter:function(c){var a=this.points||E(this);var b=[c.tooltipFooterHeaderFormatter(a[0])];b=b.concat(c.bodyFormatter(a));b.push(c.tooltipFooterHeaderFormatter(a[0],!0));return b},refresh:function(h,a){var b=this.chart,d=this.options,e=h,k={},m=[],
z=d.formatter||this.defaultFormatter;k=this.shared;var r=b.styledMode;if(d.enabled){c.clearTimeout(this.hideTimer);this.followPointer=E(e)[0].series.tooltipOptions.followPointer;var n=this.getAnchor(e,a);a=n[0];var f=n[1];!k||e.series&&e.series.noSharedTooltip?k=e.getLabelConfig():(b.pointer.applyInactiveState(e),e.forEach(function(a){a.setState("hover");m.push(a.getLabelConfig())}),k={x:e[0].category,y:e[0].y},k.points=m,e=e[0]);this.len=m.length;b=z.call(k,this);z=e.series;this.distance=x(z.tooltipOptions.distance,
16);!1===b?this.hide():(this.split?this.renderSplit(b,E(h)):(h=this.getLabel(),d.style.width&&!r||h.css({width:this.chart.spacingBox.width}),h.attr({text:b&&b.join?b.join(""):b}),h.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+x(e.colorIndex,z.colorIndex)),r||h.attr({stroke:d.borderColor||e.color||z.color||"#666666"}),this.updatePosition({plotX:a,plotY:f,negative:e.negative,ttBelow:e.ttBelow,h:n[2]||0})),this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=
!1);c.fireEvent(this,"refresh")}},renderSplit:function(h,a){var b=this,d=[],e=this.chart,k=e.renderer,m=!0,z=this.options,r=0,n,f=this.getLabel(),l=e.plotTop;w(h)&&(h=[!1,h]);h.slice(0,a.length+1).forEach(function(c,v){if(!1!==c&&""!==c){v=a[v-1]||{isHeader:!0,plotX:a[0].plotX,plotY:e.plotHeight};var B=v.series||b,u=B.tt,h=v.series||{},A="highcharts-color-"+x(v.colorIndex,h.colorIndex,"none");u||(u={padding:z.padding,r:z.borderRadius},e.styledMode||(u.fill=z.backgroundColor,u["stroke-width"]=z.borderWidth),
B.tt=u=k.label(null,null,null,(v.isHeader?z.headerShape:z.shape)||"callout",null,null,z.useHTML).addClass(v.isHeader?"highcharts-tooltip-header ":"highcharts-tooltip-box "+A).attr(u).add(f));u.isActive=!0;u.attr({text:c});e.styledMode||u.css(z.style).shadow(z.shadow).attr({stroke:z.borderColor||v.color||h.color||"#333333"});c=u.getBBox();A=c.width+u.strokeWidth();v.isHeader?(r=c.height,e.xAxis[0].opposite&&(n=!0,l-=r),c=Math.max(0,Math.min(v.plotX+e.plotLeft-A/2,e.chartWidth+(e.scrollablePixelsX?
e.scrollablePixelsX-e.marginRight:0)-A))):c=v.plotX+e.plotLeft-x(z.distance,16)-A;0>c&&(m=!1);v.isHeader?h=n?-r:e.plotHeight+r:(h=h.yAxis,h=h.pos-l+Math.max(0,Math.min(v.plotY||0,h.len)));d.push({target:h,rank:v.isHeader?1:0,size:B.tt.getBBox().height+1,point:v,x:c,tt:u})}});this.cleanSplit();z.positioner&&d.forEach(function(a){var f=z.positioner.call(b,a.tt.getBBox().width,a.size,a.point);a.x=f.x;a.align=0;a.target=f.y;a.rank=x(f.rank,a.rank)});c.distribute(d,e.plotHeight+r);d.forEach(function(a){var f=
a.point,d=f.series,c=d&&d.yAxis;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:m||f.isHeader||z.positioner?a.x:f.plotX+e.plotLeft+b.distance,y:a.pos+l,anchorX:f.isHeader?f.plotX+e.plotLeft:f.plotX+d.xAxis.pos,anchorY:f.isHeader?e.plotTop+e.plotHeight/2:c.pos+Math.max(0,Math.min(f.plotY,c.len))})});var v=b.container;h=b.renderer;if(b.outside&&v&&h){var B=e.pointer.getChartPosition();v.style.left=B.left+"px";v.style.top=B.top+"px";v=f.getBBox();h.setSize(v.width+v.x,v.height+v.y,!1)}},updatePosition:function(h){var a=
this.chart,b=a.pointer,d=this.getLabel(),e=h.plotX+a.plotLeft,k=h.plotY+a.plotTop;b=b.getChartPosition();h=(this.options.positioner||this.getPosition).call(this,d.width,d.height,h);if(this.outside){var m=(this.options.borderWidth||0)+2*this.distance;this.renderer.setSize(d.width+m,d.height+m,!1);if(a=a.containerScaling)c.css(this.container,{transform:"scale("+a.scaleX+", "+a.scaleY+")"}),e*=a.scaleX,k*=a.scaleY;e+=b.left-h.x;k+=b.top-h.y}this.move(Math.round(h.x),Math.round(h.y||0),e,k)},getDateFormat:function(c,
a,b,d){var e=this.chart.time,k=e.dateFormat("%m-%d %H:%M:%S.%L",a),h={millisecond:15,second:12,minute:9,hour:6,day:3},m="millisecond";for(r in q){if(c===q.week&&+e.dateFormat("%w",a)===b&&"00:00:00.000"===k.substr(6)){var r="week";break}if(q[r]>c){r=m;break}if(h[r]&&k.substr(h[r])!=="01-01 00:00:00.000".substr(h[r]))break;"week"!==r&&(m=r)}if(r)var n=e.resolveDTLFormat(d[r]).main;return n},getXDateFormat:function(c,a,b){a=a.dateTimeLabelFormats;var d=b&&b.closestPointRange;return(d?this.getDateFormat(d,
c.x,b.options.startOfWeek,a):a.day)||a.year},tooltipFooterHeaderFormatter:function(h,a){var b=a?"footer":"header",d=h.series,e=d.tooltipOptions,k=e.xDateFormat,C=d.xAxis,z=C&&"datetime"===C.options.type&&y(h.key),r=e[b+"Format"];a={isFooter:a,labelConfig:h};c.fireEvent(this,"headerFormatter",a,function(a){z&&!k&&(k=this.getXDateFormat(h,e,C));z&&k&&(h.point&&h.point.tooltipDateKeys||["key"]).forEach(function(a){r=r.replace("{point."+a+"}","{point."+a+":"+k+"}")});d.chart.styledMode&&(r=this.styledModeFormat(r));
a.text=m(r,{point:h,series:d},this.chart.time)});return a.text},bodyFormatter:function(c){return c.map(function(a){var b=a.series.tooltipOptions;return(b[(a.point.formatPrefix||"point")+"Formatter"]||a.point.tooltipFormatter).call(a.point,b[(a.point.formatPrefix||"point")+"Format"]||"")})},styledModeFormat:function(c){return c.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')}}});K(D,"parts/Pointer.js",
[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.attr,G=g.defined,H=g.extend,y=g.isNumber,w=g.isObject,x=g.objectEach,E=g.pick,F=g.splat,t=c.addEvent,m=c.charts,p=c.color,q=c.css,h=c.find,a=c.fireEvent,b=c.offset,d=c.Tooltip;c.Pointer=function(a,b){this.init(a,b)};c.Pointer.prototype={init:function(a,b){this.options=b;this.chart=a;this.runChartClick=b.chart.events&&!!b.chart.events.click;this.pinchDown=[];this.lastValidTouch={};d&&(a.tooltip=new d(a,b.tooltip),this.followTouchMove=
E(b.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,d=b.options.chart,e=d.zoomType||"";b=b.inverted;/touch/.test(a.type)&&(e=E(d.pinchType,e));this.zoomX=a=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=a&&!b||e&&b;this.zoomVert=e&&!b||a&&b;this.hasZoom=a||e},getChartPosition:function(){return this.chartPosition||(this.chartPosition=b(this.chart.container))},normalize:function(a,b){var d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:
a;b||(b=this.getChartPosition());var e=d.pageX-b.left;b=d.pageY-b.top;if(d=this.chart.containerScaling)e/=d.scaleX,b/=d.scaleY;return H(a,{chartX:Math.round(e),chartY:Math.round(b)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};this.chart.axes.forEach(function(d){b[d.isXAxis?"xAxis":"yAxis"].push({axis:d,value:d.toValue(a[d.horiz?"chartX":"chartY"])})});return b},findNearestKDPoint:function(a,b,d){var e;a.forEach(function(a){var c=!(a.noSharedTooltip&&b)&&0>a.options.findNearestPointBy.indexOf("y");
a=a.searchPoint(d,c);if((c=w(a,!0))&&!(c=!w(e,!0))){c=e.distX-a.distX;var f=e.dist-a.dist,l=(a.series.group&&a.series.group.zIndex)-(e.series.group&&e.series.group.zIndex);c=0<(0!==c&&b?c:0!==f?f:0!==l?l:e.series.index>a.series.index?-1:1)}c&&(e=a)});return e},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,b){var d=a.series,e=d.xAxis;d=d.yAxis;var c=E(a.clientX,a.plotX),k=a.shapeArgs;if(e&&d)return b?{chartX:e.len+
e.pos-c,chartY:d.len+d.pos-a.plotY}:{chartX:c+e.pos,chartY:a.plotY+d.pos};if(k&&k.x&&k.y)return{chartX:k.x,chartY:k.y}},getHoverData:function(a,b,d,c,m,n){var f,l=[];c=!(!c||!a);var e=b&&!b.stickyTracking?[b]:d.filter(function(a){return a.visible&&!(!m&&a.directTouch)&&E(a.options.enableMouseTracking,!0)&&a.stickyTracking});b=(f=c||!n?a:this.findNearestKDPoint(e,m,n))&&f.series;f&&(m&&!b.noSharedTooltip?(e=d.filter(function(a){return a.visible&&!(!m&&a.directTouch)&&E(a.options.enableMouseTracking,
!0)&&!a.noSharedTooltip}),e.forEach(function(a){var b=h(a.points,function(a){return a.x===f.x&&!a.isNull});w(b)&&(a.chart.isBoosting&&(b=a.getPoint(b)),l.push(b))})):l.push(f));return{hoverPoint:f,hoverSeries:b,hoverPoints:l}},runPointActions:function(a,b){var d=this.chart,e=d.tooltip&&d.tooltip.options.enabled?d.tooltip:void 0,k=e?e.shared:!1,n=b||d.hoverPoint,f=n&&n.series||d.hoverSeries;f=this.getHoverData(n,f,d.series,(!a||"touchmove"!==a.type)&&(!!b||f&&f.directTouch&&this.isDirectTouch),k,a);
n=f.hoverPoint;var l=f.hoverPoints;b=(f=f.hoverSeries)&&f.tooltipOptions.followPointer;k=k&&f&&!f.noSharedTooltip;if(n&&(n!==d.hoverPoint||e&&e.isHidden)){(d.hoverPoints||[]).forEach(function(a){-1===l.indexOf(a)&&a.setState()});if(d.hoverSeries!==f)f.onMouseOver();this.applyInactiveState(l);(l||[]).forEach(function(a){a.setState("hover")});d.hoverPoint&&d.hoverPoint.firePointEvent("mouseOut");if(!n.series)return;n.firePointEvent("mouseOver");d.hoverPoints=l;d.hoverPoint=n;e&&e.refresh(k?l:n,a)}else b&&
e&&!e.isHidden&&(n=e.getAnchor([{}],a),e.updatePosition({plotX:n[0],plotY:n[1]}));this.unDocMouseMove||(this.unDocMouseMove=t(d.container.ownerDocument,"mousemove",function(a){var b=m[c.hoverChartIndex];if(b)b.pointer.onDocumentMouseMove(a)}));d.axes.forEach(function(b){var f=E(b.crosshair.snap,!0),d=f?c.find(l,function(a){return a.series[b.coll]===b}):void 0;d||!f?b.drawCrosshair(a,d):b.hideCrosshair()})},applyInactiveState:function(a){var b=[],d;(a||[]).forEach(function(a){d=a.series;b.push(d);
d.linkedParent&&b.push(d.linkedParent);d.linkedSeries&&(b=b.concat(d.linkedSeries));d.navigatorSeries&&b.push(d.navigatorSeries)});this.chart.series.forEach(function(a){-1===b.indexOf(a)?a.setState("inactive",!0):a.options.inactiveOtherPoints&&a.setAllPointsToState("inactive")})},reset:function(a,b){var d=this.chart,c=d.hoverSeries,e=d.hoverPoint,k=d.hoverPoints,f=d.tooltip,l=f&&f.shared?k:e;a&&l&&F(l).forEach(function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)f&&l&&F(l).length&&(f.refresh(l),
f.shared&&k?k.forEach(function(a){a.setState(a.state,!0);a.series.isCartesian&&(a.series.xAxis.crosshair&&a.series.xAxis.drawCrosshair(null,a),a.series.yAxis.crosshair&&a.series.yAxis.drawCrosshair(null,a))}):e&&(e.setState(e.state,!0),d.axes.forEach(function(a){a.crosshair&&a.drawCrosshair(null,e)})));else{if(e)e.onMouseOut();k&&k.forEach(function(a){a.setState()});if(c)c.onMouseOut();f&&f.hide(b);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());d.axes.forEach(function(a){a.hideCrosshair()});
this.hoverX=d.hoverPoints=d.hoverPoint=null}},scaleGroups:function(a,b){var d=this.chart,e;d.series.forEach(function(c){e=a||c.getPlotBox();c.xAxis&&c.xAxis.zoomEnabled&&c.group&&(c.group.attr(e),c.markerGroup&&(c.markerGroup.attr(e),c.markerGroup.clip(b?d.clipRect:null)),c.dataLabelsGroup&&c.dataLabelsGroup.attr(e))});d.clipRect.attr(b||d.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},
drag:function(a){var b=this.chart,d=b.options.chart,c=a.chartX,e=a.chartY,n=this.zoomHor,f=this.zoomVert,l=b.plotLeft,v=b.plotTop,B=b.plotWidth,h=b.plotHeight,u=this.selectionMarker,m=this.mouseDownX,g=this.mouseDownY,q=d.panKey&&a[d.panKey+"Key"];if(!u||!u.touch)if(c<l?c=l:c>l+B&&(c=l+B),e<v?e=v:e>v+h&&(e=v+h),this.hasDragged=Math.sqrt(Math.pow(m-c,2)+Math.pow(g-e,2)),10<this.hasDragged){var t=b.isInsidePlot(m-l,g-v);b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&t&&!q&&!u&&(this.selectionMarker=
u=b.renderer.rect(l,v,n?1:B,f?1:h,0).attr({"class":"highcharts-selection-marker",zIndex:7}).add(),b.styledMode||u.attr({fill:d.selectionMarkerFill||p("#335cad").setOpacity(.25).get()}));u&&n&&(c-=m,u.attr({width:Math.abs(c),x:(0<c?0:c)+m}));u&&f&&(c=e-g,u.attr({height:Math.abs(c),y:(0<c?0:c)+g}));t&&!u&&d.panning&&b.pan(a,d.panning)}},drop:function(b){var d=this,c=this.chart,e=this.hasPinched;if(this.selectionMarker){var h={originalEvent:b,xAxis:[],yAxis:[]},n=this.selectionMarker,f=n.attr?n.attr("x"):
n.x,l=n.attr?n.attr("y"):n.y,v=n.attr?n.attr("width"):n.width,B=n.attr?n.attr("height"):n.height,m;if(this.hasDragged||e)c.axes.forEach(function(a){if(a.zoomEnabled&&G(a.min)&&(e||d[{xAxis:"zoomX",yAxis:"zoomY"}[a.coll]])){var c=a.horiz,k="touchend"===b.type?a.minPixelPadding:0,n=a.toValue((c?f:l)+k);c=a.toValue((c?f+v:l+B)-k);h[a.coll].push({axis:a,min:Math.min(n,c),max:Math.max(n,c)});m=!0}}),m&&a(c,"selection",h,function(a){c.zoom(H(a,e?{animation:!1}:null))});y(c.index)&&(this.selectionMarker=
this.selectionMarker.destroy());e&&this.scaleGroups()}c&&y(c.index)&&(q(c.container,{cursor:c._cursor}),c.cancelClick=10<this.hasDragged,c.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a);2!==a.button&&(this.zoomOption(a),a.preventDefault&&a.preventDefault(),this.dragStart(a))},onDocumentMouseUp:function(a){m[c.hoverChartIndex]&&m[c.hoverChartIndex].pointer.drop(a)},onDocumentMouseMove:function(a){var b=this.chart,d=this.chartPosition;
a=this.normalize(a,d);!d||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(a){var b=m[c.hoverChartIndex];b&&(a.relatedTarget||a.toElement)&&(b.pointer.reset(),b.pointer.chartPosition=void 0)},onContainerMouseMove:function(a){var b=this.chart;G(c.hoverChartIndex)&&m[c.hoverChartIndex]&&m[c.hoverChartIndex].mouseIsDown||(c.hoverChartIndex=b.index);a=this.normalize(a);a.preventDefault||(a.returnValue=!1);
"mousedown"===b.mouseIsDown&&this.drag(a);!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||b.openMenu||this.runPointActions(a)},inClass:function(a,b){for(var d;a;){if(d=I(a,"class")){if(-1!==d.indexOf(b))return!0;if(-1!==d.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;this.isDirectTouch=!1;if(!(!b||!a||b.stickyTracking||this.inClass(a,"highcharts-tooltip")||
this.inClass(a,"highcharts-series-"+b.index)&&this.inClass(a,"highcharts-tracker")))b.onMouseOut()},onContainerClick:function(b){var d=this.chart,c=d.hoverPoint,e=d.plotLeft,h=d.plotTop;b=this.normalize(b);d.cancelClick||(c&&this.inClass(b.target,"highcharts-tracker")?(a(c.series,"click",H(b,{point:c})),d.hoverPoint&&c.firePointEvent("click",b)):(H(b,this.getCoordinates(b)),d.isInsidePlot(b.chartX-e,b.chartY-h)&&a(d,"click",b)))},setDOMEvents:function(){var a=this,b=a.chart.container,d=b.ownerDocument;
b.onmousedown=function(b){a.onContainerMouseDown(b)};b.onmousemove=function(b){a.onContainerMouseMove(b)};b.onclick=function(b){a.onContainerClick(b)};this.unbindContainerMouseLeave=t(b,"mouseleave",a.onContainerMouseLeave);c.unbindDocumentMouseUp||(c.unbindDocumentMouseUp=t(d,"mouseup",a.onDocumentMouseUp));c.hasTouch&&(t(b,"touchstart",function(b){a.onContainerTouchStart(b)}),t(b,"touchmove",function(b){a.onContainerTouchMove(b)}),c.unbindDocumentTouchEnd||(c.unbindDocumentTouchEnd=t(d,"touchend",
a.onDocumentTouchEnd)))},destroy:function(){var a=this;a.unDocMouseMove&&a.unDocMouseMove();this.unbindContainerMouseLeave();c.chartCount||(c.unbindDocumentMouseUp&&(c.unbindDocumentMouseUp=c.unbindDocumentMouseUp()),c.unbindDocumentTouchEnd&&(c.unbindDocumentTouchEnd=c.unbindDocumentTouchEnd()));clearInterval(a.tooltipTimeout);x(a,function(b,d){a[d]=null})}}});K(D,"parts/TouchPointer.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.extend,G=g.pick,H=c.charts,y=c.noop;I(c.Pointer.prototype,
{pinchTranslate:function(c,g,E,y,t,m){this.zoomHor&&this.pinchTranslateDirection(!0,c,g,E,y,t,m);this.zoomVert&&this.pinchTranslateDirection(!1,c,g,E,y,t,m)},pinchTranslateDirection:function(c,g,E,y,t,m,p,q){var h=this.chart,a=c?"x":"y",b=c?"X":"Y",d="chart"+b,e=c?"width":"height",k=h["plot"+(c?"Left":"Top")],C,z,r=q||1,n=h.inverted,f=h.bounds[c?"h":"v"],l=1===g.length,v=g[0][d],B=E[0][d],A=!l&&g[1][d],u=!l&&E[1][d];E=function(){!l&&20<Math.abs(v-A)&&(r=q||Math.abs(B-u)/Math.abs(v-A));z=(k-B)/r+v;
C=h["plot"+(c?"Width":"Height")]/r};E();g=z;if(g<f.min){g=f.min;var J=!0}else g+C>f.max&&(g=f.max-C,J=!0);J?(B-=.8*(B-p[a][0]),l||(u-=.8*(u-p[a][1])),E()):p[a]=[B,u];n||(m[a]=z-k,m[e]=C);m=n?1/r:r;t[e]=C;t[a]=g;y[n?c?"scaleY":"scaleX":"scale"+b]=r;y["translate"+b]=m*k+(B-m*v)},pinch:function(c){var g=this,w=g.chart,F=g.pinchDown,t=c.touches,m=t.length,p=g.lastValidTouch,q=g.hasZoom,h=g.selectionMarker,a={},b=1===m&&(g.inClass(c.target,"highcharts-tracker")&&w.runTrackerClick||g.runChartClick),d={};
1<m&&(g.initiated=!0);q&&g.initiated&&!b&&c.preventDefault();[].map.call(t,function(a){return g.normalize(a)});"touchstart"===c.type?([].forEach.call(t,function(a,b){F[b]={chartX:a.chartX,chartY:a.chartY}}),p.x=[F[0].chartX,F[1]&&F[1].chartX],p.y=[F[0].chartY,F[1]&&F[1].chartY],w.axes.forEach(function(a){if(a.zoomEnabled){var b=w.bounds[a.horiz?"h":"v"],d=a.minPixelPadding,c=a.toPixels(Math.min(G(a.options.min,a.dataMin),a.dataMin)),e=a.toPixels(Math.max(G(a.options.max,a.dataMax),a.dataMax)),n=Math.max(c,
e);b.min=Math.min(a.pos,Math.min(c,e)-d);b.max=Math.max(a.pos+a.len,n+d)}}),g.res=!0):g.followTouchMove&&1===m?this.runPointActions(g.normalize(c)):F.length&&(h||(g.selectionMarker=h=I({destroy:y,touch:!0},w.plotBox)),g.pinchTranslate(F,t,a,h,d,p),g.hasPinched=q,g.scaleGroups(a,d),g.res&&(g.res=!1,this.reset(!1,0)))},touch:function(g,x){var w=this.chart,y;if(w.index!==c.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});c.hoverChartIndex=w.index;if(1===g.touches.length)if(g=this.normalize(g),
(y=w.isInsidePlot(g.chartX-w.plotLeft,g.chartY-w.plotTop))&&!w.openMenu){x&&this.runPointActions(g);if("touchmove"===g.type){x=this.pinchDown;var t=x[0]?4<=Math.sqrt(Math.pow(x[0].chartX-g.chartX,2)+Math.pow(x[0].chartY-g.chartY,2)):!1}G(t,!0)&&this.pinch(g)}else x&&this.reset();else 2===g.touches.length&&this.pinch(g)},onContainerTouchStart:function(c){this.zoomOption(c);this.touch(c,!0)},onContainerTouchMove:function(c){this.touch(c)},onDocumentTouchEnd:function(g){H[c.hoverChartIndex]&&H[c.hoverChartIndex].pointer.drop(g)}})});
K(D,"parts/MSPointer.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.extend,G=g.objectEach,H=c.addEvent,y=c.charts,w=c.css,x=c.doc,E=c.noop;g=c.Pointer;var F=c.removeEvent,t=c.win,m=c.wrap;if(!c.hasTouch&&(t.PointerEvent||t.MSPointerEvent)){var p={},q=!!t.PointerEvent,h=function(){var a=[];a.item=function(a){return this[a]};G(p,function(b){a.push({pageX:b.pageX,pageY:b.pageY,target:b.target})});return a},a=function(a,d,e,k){"touch"!==a.pointerType&&a.pointerType!==a.MSPOINTER_TYPE_TOUCH||
!y[c.hoverChartIndex]||(k(a),k=y[c.hoverChartIndex].pointer,k[d]({type:e,target:a.currentTarget,preventDefault:E,touches:h()}))};I(g.prototype,{onContainerPointerDown:function(b){a(b,"onContainerTouchStart","touchstart",function(a){p[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(b){a(b,"onContainerTouchMove","touchmove",function(a){p[a.pointerId]={pageX:a.pageX,pageY:a.pageY};p[a.pointerId].target||(p[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(b){a(b,
"onDocumentTouchEnd","touchend",function(a){delete p[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,q?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,q?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(x,q?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});m(g.prototype,"init",function(a,d,c){a.call(this,d,c);this.hasZoom&&w(d.container,{"-ms-touch-action":"none","touch-action":"none"})});m(g.prototype,"setDOMEvents",function(a){a.apply(this);
(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(H)});m(g.prototype,"destroy",function(a){this.batchMSEvents(F);a.call(this)})}});K(D,"parts/Legend.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.discardElement,H=g.isNumber,y=g.pick,w=g.setAnimation,x=c.addEvent,E=c.css,F=c.fireEvent;g=c.isFirefox;var t=c.marginNames,m=c.merge,p=c.stableSort,q=c.win,h=c.wrap;c.Legend=function(a,b){this.init(a,b)};c.Legend.prototype={init:function(a,b){this.chart=a;this.setOptions(b);
b.enabled&&(this.render(),x(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=x(this.chart,"render",function(){this.legend.proximatePositions();this.legend.positionItems()}):this.unchartrender&&this.unchartrender())},setOptions:function(a){var b=y(a.padding,8);this.options=a;this.chart.styledMode||(this.itemStyle=a.itemStyle,this.itemHiddenStyle=m(this.itemStyle,a.itemHiddenStyle));this.itemMarginTop=a.itemMarginTop||0;this.itemMarginBottom=a.itemMarginBottom||
0;this.padding=b;this.initialItemY=b-5;this.symbolWidth=y(a.symbolWidth,16);this.pages=[];this.proximate="proximate"===a.layout&&!this.chart.inverted},update:function(a,b){var d=this.chart;this.setOptions(m(!0,this.options,a));this.destroy();d.isDirtyLegend=d.isDirtyBox=!0;y(b,!0)&&d.redraw();F(this,"afterUpdate")},colorizeItem:function(a,b){a.legendGroup[b?"removeClass":"addClass"]("highcharts-legend-item-hidden");if(!this.chart.styledMode){var d=this.options,c=a.legendItem,k=a.legendLine,h=a.legendSymbol,
m=this.itemHiddenStyle.color;d=b?d.itemStyle.color:m;var r=b?a.color||m:m,n=a.options&&a.options.marker,f={fill:r};c&&c.css({fill:d,color:d});k&&k.attr({stroke:r});h&&(n&&h.isMarker&&(f=a.pointAttribs(),b||(f.stroke=f.fill=m)),h.attr(f))}F(this,"afterColorizeItem",{item:a,visible:b})},positionItems:function(){this.allItems.forEach(this.positionItem,this);this.chart.isResizing||this.positionCheckboxes()},positionItem:function(a){var b=this.options,d=b.symbolPadding;b=!b.rtl;var c=a._legendItemPos,
k=c[0];c=c[1];var h=a.checkbox;if((a=a.legendGroup)&&a.element)a[I(a.translateY)?"animate":"attr"]({translateX:b?k:this.legendWidth-k-2*d-4,translateY:c});h&&(h.x=k,h.y=c)},destroyItem:function(a){var b=a.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach(function(b){a[b]&&(a[b]=a[b].destroy())});b&&G(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}this.getAllItems().forEach(function(b){["legendItem","legendGroup"].forEach(a,b)});"clipRect up down pager nav box title group".split(" ").forEach(a,
this);this.display=null},positionCheckboxes:function(){var a=this.group&&this.group.alignAttr,b=this.clipHeight||this.legendHeight,d=this.titleHeight;if(a){var c=a.translateY;this.allItems.forEach(function(e){var k=e.checkbox;if(k){var h=c+d+k.y+(this.scrollOffset||0)+3;E(k,{left:a.translateX+e.checkboxOffset+k.x-20+"px",top:h+"px",display:this.proximate||h>c-6&&h<c+b-6?"":"none"})}},this)}},renderTitle:function(){var a=this.options,b=this.padding,d=a.title,c=0;d.text&&(this.title||(this.title=this.chart.renderer.label(d.text,
b-3,b-4,null,null,null,a.useHTML,null,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(d.style),this.title.add(this.group)),d.width||this.title.css({width:this.maxLegendWidth+"px"}),a=this.title.getBBox(),c=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:c}));this.titleHeight=c},setText:function(a){var b=this.options;a.legendItem.attr({text:b.labelFormat?c.format(b.labelFormat,a,this.chart.time):b.labelFormatter.call(a)})},renderItem:function(a){var b=this.chart,
d=b.renderer,c=this.options,k=this.symbolWidth,h=c.symbolPadding,g=this.itemStyle,r=this.itemHiddenStyle,n="horizontal"===c.layout?y(c.itemDistance,20):0,f=!c.rtl,l=a.legendItem,v=!a.series,B=!v&&a.series.drawLegendSymbol?a.series:a,A=B.options;A=this.createCheckboxForItem&&A&&A.showCheckbox;n=k+h+n+(A?20:0);var u=c.useHTML,p=a.options.className;l||(a.legendGroup=d.g("legend-item").addClass("highcharts-"+B.type+"-series highcharts-color-"+a.colorIndex+(p?" "+p:"")+(v?" highcharts-series-"+a.index:
"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=l=d.text("",f?k+h:-h,this.baseline||0,u),b.styledMode||l.css(m(a.visible?g:r)),l.attr({align:f?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(this.fontMetrics=d.fontMetrics(b.styledMode?12:g.fontSize,l),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,l.attr("y",this.baseline)),this.symbolHeight=c.symbolHeight||this.fontMetrics.f,B.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,l,u));A&&!a.checkbox&&this.createCheckboxForItem(a);
this.colorizeItem(a,a.visible);!b.styledMode&&g.width||l.css({width:(c.itemWidth||this.widthOption||b.spacingBox.width)-n});this.setText(a);b=l.getBBox();a.itemWidth=a.checkboxOffset=c.itemWidth||a.legendItemWidth||b.width+n;this.maxItemWidth=Math.max(this.maxItemWidth,a.itemWidth);this.totalItemWidth+=a.itemWidth;this.itemHeight=a.itemHeight=Math.round(a.legendItemHeight||b.height||this.symbolHeight)},layoutItem:function(a){var b=this.options,d=this.padding,c="horizontal"===b.layout,k=a.itemHeight,
h=this.itemMarginBottom,m=this.itemMarginTop,r=c?y(b.itemDistance,20):0,n=this.maxLegendWidth;b=b.alignColumns&&this.totalItemWidth>n?this.maxItemWidth:a.itemWidth;c&&this.itemX-d+b>n&&(this.itemX=d,this.lastLineHeight&&(this.itemY+=m+this.lastLineHeight+h),this.lastLineHeight=0);this.lastItemY=m+this.itemY+h;this.lastLineHeight=Math.max(k,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];c?this.itemX+=b:(this.itemY+=m+k+h,this.lastLineHeight=k);this.offsetWidth=this.widthOption||Math.max((c?
this.itemX-d-(a.checkbox?0:r):b)+d,this.offsetWidth)},getAllItems:function(){var a=[];this.chart.series.forEach(function(b){var d=b&&b.options;b&&y(d.showInLegend,I(d.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===d.legendType?b.data:b)))});F(this,"afterGetAllItems",{allItems:a});return a},getAlignment:function(){var a=this.options;return this.proximate?a.align.charAt(0)+"tv":a.floating?"":a.align.charAt(0)+a.verticalAlign.charAt(0)+a.layout.charAt(0)},adjustMargins:function(a,b){var d=
this.chart,c=this.options,k=this.getAlignment();k&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(e,h){e.test(k)&&!I(a[h])&&(d[t[h]]=Math.max(d[t[h]],d.legend[(h+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][h]*c[h%2?"x":"y"]+y(c.margin,12)+b[h]+(d.titleOffset[h]||0)))})},proximatePositions:function(){var a=this.chart,b=[],d="left"===this.options.align;this.allItems.forEach(function(e){var k=d;if(e.yAxis&&e.points){e.xAxis.options.reversed&&(k=!k);var h=c.find(k?e.points:
e.points.slice(0).reverse(),function(a){return H(a.plotY)});k=this.itemMarginTop+e.legendItem.getBBox().height+this.itemMarginBottom;var m=e.yAxis.top-a.plotTop;e.visible?(h=h?h.plotY:e.yAxis.height,h+=m-.3*k):h=m+e.yAxis.height;b.push({target:h,size:k,item:e})}},this);c.distribute(b,a.plotHeight);b.forEach(function(b){b.item._legendItemPos[1]=a.plotTop-a.spacing[0]+b.pos})},render:function(){var a=this.chart,b=a.renderer,d=this.group,e,k=this.box,h=this.options,g=this.padding;this.itemX=g;this.itemY=
this.initialItemY;this.lastItemY=this.offsetWidth=0;this.widthOption=c.relativeLength(h.width,a.spacingBox.width-g);var r=a.spacingBox.width-2*g-h.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(r/=2);this.maxLegendWidth=this.widthOption||r;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();r=this.getAllItems();p(r,function(a,b){return(a.options&&a.options.legendIndex||
0)-(b.options&&b.options.legendIndex||0)});h.reversed&&r.reverse();this.allItems=r;this.display=e=!!r.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;r.forEach(this.renderItem,this);r.forEach(this.layoutItem,this);r=(this.widthOption||this.offsetWidth)+g;var n=this.lastItemY+this.lastLineHeight+this.titleHeight;n=this.handleOverflow(n);n+=g;k||(this.box=k=b.rect().addClass("highcharts-legend-box").attr({r:h.borderRadius}).add(d),k.isNew=!0);a.styledMode||k.attr({stroke:h.borderColor,
"stroke-width":h.borderWidth||0,fill:h.backgroundColor||"none"}).shadow(h.shadow);0<r&&0<n&&(k[k.isNew?"attr":"animate"](k.crisp.call({},{x:0,y:0,width:r,height:n},k.strokeWidth())),k.isNew=!1);k[e?"show":"hide"]();a.styledMode&&"none"===d.getStyle("display")&&(r=n=0);this.legendWidth=r;this.legendHeight=n;e&&(b=a.spacingBox,k=b.y,/(lth|ct|rth)/.test(this.getAlignment())&&0<a.titleOffset[0]?k+=a.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<a.titleOffset[2]&&(k-=a.titleOffset[2]),k!==
b.y&&(b=m(b,{y:k})),d.align(m(h,{width:r,height:n,verticalAlign:this.proximate?"top":h.verticalAlign}),!0,b));this.proximate||this.positionItems();F(this,"afterRender")},handleOverflow:function(a){var b=this,d=this.chart,c=d.renderer,k=this.options,h=k.y,m=this.padding;h=d.spacingBox.height+("top"===k.verticalAlign?-h:h)-m;var r=k.maxHeight,n,f=this.clipRect,l=k.navigation,v=y(l.animation,!0),B=l.arrowSize||12,A=this.nav,u=this.pages,g,p=this.allItems,q=function(a){"number"===typeof a?f.attr({height:a}):
f&&(b.clipRect=f.destroy(),b.contentGroup.clip());b.contentGroup.div&&(b.contentGroup.div.style.clip=a?"rect("+m+"px,9999px,"+(m+a)+"px,0)":"auto")},t=function(a){b[a]=c.circle(0,0,1.3*B).translate(B/2,B/2).add(A);d.styledMode||b[a].attr("fill","rgba(0,0,0,0.0001)");return b[a]};"horizontal"!==k.layout||"middle"===k.verticalAlign||k.floating||(h/=2);r&&(h=Math.min(h,r));u.length=0;a>h&&!1!==l.enabled?(this.clipHeight=n=Math.max(h-20-this.titleHeight-m,0),this.currentPage=y(this.currentPage,1),this.fullHeight=
a,p.forEach(function(a,b){var f=a._legendItemPos[1],l=Math.round(a.legendItem.getBBox().height),d=u.length;if(!d||f-u[d-1]>n&&(g||f)!==u[d-1])u.push(g||f),d++;a.pageIx=d-1;g&&(p[b-1].pageIx=d-1);b===p.length-1&&f+l-u[d-1]>n&&f!==g&&(u.push(f),a.pageIx=d);f!==g&&(g=f)}),f||(f=b.clipRect=c.clipRect(0,m,9999,0),b.contentGroup.clip(f)),q(n),A||(this.nav=A=c.g().attr({zIndex:1}).add(this.group),this.up=c.symbol("triangle",0,0,B,B).add(A),t("upTracker").on("click",function(){b.scroll(-1,v)}),this.pager=
c.text("",15,10).addClass("highcharts-legend-navigation"),d.styledMode||this.pager.css(l.style),this.pager.add(A),this.down=c.symbol("triangle-down",0,0,B,B).add(A),t("downTracker").on("click",function(){b.scroll(1,v)})),b.scroll(0),a=h):A&&(q(),this.nav=A.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,b){var d=this.pages,c=d.length,k=this.currentPage+a;a=this.clipHeight;var h=this.options.navigation,m=this.pager,r=this.padding;k>c&&(k=c);0<k&&(void 0!==
b&&w(b,this.chart),this.nav.attr({translateX:r,translateY:a+this.padding+7+this.titleHeight,visibility:"visible"}),[this.up,this.upTracker].forEach(function(a){a.attr({"class":1===k?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),m.attr({text:k+"/"+c}),[this.down,this.downTracker].forEach(function(a){a.attr({x:18+this.pager.getBBox().width,"class":k===c?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),this.chart.styledMode||(this.up.attr({fill:1===k?h.inactiveColor:
h.activeColor}),this.upTracker.css({cursor:1===k?"default":"pointer"}),this.down.attr({fill:k===c?h.inactiveColor:h.activeColor}),this.downTracker.css({cursor:k===c?"default":"pointer"})),this.scrollOffset=-d[k-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=k,this.positionCheckboxes())}};c.LegendSymbolMixin={drawRectangle:function(a,b){var d=a.symbolHeight,c=a.options.squareSymbol;b.legendSymbol=this.chart.renderer.rect(c?(a.symbolWidth-d)/2:0,a.baseline-
d+1,c?d:a.symbolWidth,d,y(a.options.symbolRadius,d/2)).addClass("highcharts-point").attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var b=this.options,d=b.marker,c=a.symbolWidth,k=a.symbolHeight,h=k/2,g=this.chart.renderer,r=this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);var n={};this.chart.styledMode||(n={"stroke-width":b.lineWidth||0},b.dashStyle&&(n.dashstyle=b.dashStyle));this.legendLine=g.path(["M",0,a,"L",c,a]).addClass("highcharts-graph").attr(n).add(r);d&&!1!==
d.enabled&&c&&(b=Math.min(y(d.radius,h),h),0===this.symbol.indexOf("url")&&(d=m(d,{width:k,height:k}),b=0),this.legendSymbol=d=g.symbol(this.symbol,c/2-b,a-b,2*b,2*b,d).addClass("highcharts-point").add(r),d.isMarker=!0)}};(/Trident\/7\.0/.test(q.navigator&&q.navigator.userAgent)||g)&&h(c.Legend.prototype,"positionItem",function(a,b){var d=this,c=function(){b._legendItemPos&&a.call(d,b)};c();d.bubbleLegend||setTimeout(c)})});K(D,"parts/Chart.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,
g){var I=g.attr,G=g.defined,H=g.discardElement,y=g.erase,w=g.extend,x=g.isArray,E=g.isNumber,F=g.isObject,t=g.isString,m=g.objectEach,p=g.pick,q=g.pInt,h=g.setAnimation,a=g.splat,b=g.syncTimeout,d=c.addEvent,e=c.animate,k=c.animObject,C=c.doc,z=c.Axis,r=c.createElement,n=c.defaultOptions,f=c.charts,l=c.css,v=c.find,B=c.fireEvent,A=c.Legend,u=c.marginNames,J=c.merge,L=c.Pointer,U=c.removeEvent,Q=c.seriesTypes,P=c.win,M=c.Chart=function(){this.getArgs.apply(this,arguments)};c.chart=function(a,b,f){return new M(a,
b,f)};w(M.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(t(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(a,b){var l,e=a.series,k=a.plotOptions||{};B(this,"init",{args:arguments},function(){a.series=null;l=J(n,a);m(l.plotOptions,function(a,b){F(a)&&(a.tooltip=k[b]&&J(k[b].tooltip)||void 0)});l.tooltip.userOptions=a.chart&&a.chart.forExport&&a.tooltip.userOptions||a.tooltip;l.series=a.series=e;this.userOptions=a;var v=l.chart,h=v.events;
this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.labelCollectors=[];this.callback=b;this.isResizing=0;this.options=l;this.axes=[];this.series=[];this.time=a.time&&Object.keys(a.time).length?new c.Time(a.time):c.time;this.styledMode=v.styledMode;this.hasCartesianSeries=v.showAxes;var u=this;u.index=f.length;f.push(u);c.chartCount++;h&&m(h,function(a,b){c.isFunction(a)&&d(u,b,a)});u.xAxis=[];u.yAxis=[];u.pointCount=u.colorCounter=u.symbolCounter=0;B(u,"afterInit");u.firstRender()})},initSeries:function(a){var b=
this.options.chart;b=a.type||b.type||b.defaultSeriesType;var f=Q[b];f||c.error(17,!0,this,{missingModuleFor:b});b=new f;b.init(this,a);return b},orderSeries:function(a){var b=this.series;for(a=a||0;a<b.length;a++)b[a]&&(b[a].index=a,b[a].name=b[a].getName())},isInsidePlot:function(a,b,f){var l=f?b:a;a=f?a:b;return 0<=l&&l<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(a){B(this,"beforeRedraw");var b=this.axes,f=this.series,l=this.pointer,d=this.legend,c=this.userOptions.legend,e=this.isDirtyLegend,
k=this.hasCartesianSeries,n=this.isDirtyBox,v=this.renderer,u=v.isHidden(),m=[];this.setResponsive&&this.setResponsive(!1);h(a,this);u&&this.temporaryDisplay();this.layOutTitles();for(a=f.length;a--;){var A=f[a];if(A.options.stacking){var r=!0;if(A.isDirty){var g=!0;break}}}if(g)for(a=f.length;a--;)A=f[a],A.options.stacking&&(A.isDirty=!0);f.forEach(function(a){a.isDirty&&("point"===a.options.legendType?(a.updateTotals&&a.updateTotals(),e=!0):c&&(c.labelFormatter||c.labelFormat)&&(e=!0));a.isDirtyData&&
B(a,"updatedData")});e&&d&&d.options.enabled&&(d.render(),this.isDirtyLegend=!1);r&&this.getStacks();k&&b.forEach(function(a){a.updateNames();a.setScale()});this.getMargins();k&&(b.forEach(function(a){a.isDirty&&(n=!0)}),b.forEach(function(a){var b=a.min+","+a.max;a.extKey!==b&&(a.extKey=b,m.push(function(){B(a,"afterSetExtremes",w(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(n||r)&&a.redraw()}));n&&this.drawChartBox();B(this,"predraw");f.forEach(function(a){(n||a.isDirty)&&a.visible&&a.redraw();
a.isDirtyData=!1});l&&l.reset(!0);v.draw();B(this,"redraw");B(this,"render");u&&this.temporaryDisplay(!0);m.forEach(function(a){a.call()})},get:function(a){function b(b){return b.id===a||b.options&&b.options.id===a}var f=this.series,l;var d=v(this.axes,b)||v(this.series,b);for(l=0;!d&&l<f.length;l++)d=v(f[l].points||[],b);return d},getAxes:function(){var b=this,f=this.options,l=f.xAxis=a(f.xAxis||{});f=f.yAxis=a(f.yAxis||{});B(this,"getAxes");l.forEach(function(a,b){a.index=b;a.isX=!0});f.forEach(function(a,
b){a.index=b});l.concat(f).forEach(function(a){new z(b,a)});B(this,"afterGetAxes")},getSelectedPoints:function(){var a=[];this.series.forEach(function(b){a=a.concat((b[b.hasGroupedData?"points":"data"]||[]).filter(function(a){return p(a.selectedStaging,a.selected)}))});return a},getSelectedSeries:function(){return this.series.filter(function(a){return a.selected})},setTitle:function(a,b,f){this.applyDescription("title",a);this.applyDescription("subtitle",b);this.applyDescription("caption",void 0);
this.layOutTitles(f)},applyDescription:function(a,b){var f=this,l="title"===a?{color:"#333333",fontSize:this.options.isStock?"16px":"18px"}:{color:"#666666"};l=this.options[a]=J(!this.styledMode&&{style:l},this.options[a],b);var d=this[a];d&&b&&(this[a]=d=d.destroy());l&&!d&&(d=this.renderer.text(l.text,0,0,l.useHTML).attr({align:l.align,"class":"highcharts-"+a,zIndex:l.zIndex||4}).add(),d.update=function(b){f[{title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"}[a]](b)},this.styledMode||
d.css(l.style),this[a]=d)},layOutTitles:function(a){var b=[0,0,0],f=this.renderer,l=this.spacingBox;["title","subtitle","caption"].forEach(function(a){var d=this[a],c=this.options[a],e=c.verticalAlign||"top";a="title"===a?-3:"top"===e?b[0]+2:0;if(d){if(!this.styledMode)var k=c.style.fontSize;k=f.fontMetrics(k,d).b;d.css({width:(c.width||l.width+(c.widthAdjust||0))+"px"});var n=Math.round(d.getBBox(c.useHTML).height);d.align(w({y:"bottom"===e?k:a+k,height:n},c),!1,"spacingBox");c.floating||("top"===
e?b[0]=Math.ceil(b[0]+n):"bottom"===e&&(b[2]=Math.ceil(b[2]+n)))}},this);b[0]&&"top"===(this.options.title.verticalAlign||"top")&&(b[0]+=this.options.title.margin);b[2]&&"bottom"===this.options.caption.verticalAlign&&(b[2]+=this.options.caption.margin);var d=!this.titleOffset||this.titleOffset.join(",")!==b.join(",");this.titleOffset=b;B(this,"afterLayOutTitles");!this.isDirtyBox&&d&&(this.isDirtyBox=this.isDirtyLegend=d,this.hasRendered&&p(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var a=
this.options.chart,b=a.width;a=a.height;var f=this.renderTo;G(b)||(this.containerWidth=c.getStyle(f,"width"));G(a)||(this.containerHeight=c.getStyle(f,"height"));this.chartWidth=Math.max(0,b||this.containerWidth||600);this.chartHeight=Math.max(0,c.relativeLength(a,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},temporaryDisplay:function(a){var b=this.renderTo;if(a)for(;b&&b.style;)b.hcOrigStyle&&(c.css(b,b.hcOrigStyle),delete b.hcOrigStyle),b.hcOrigDetached&&(C.body.removeChild(b),
b.hcOrigDetached=!1),b=b.parentNode;else for(;b&&b.style;){C.body.contains(b)||b.parentNode||(b.hcOrigDetached=!0,C.body.appendChild(b));if("none"===c.getStyle(b,"display",!1)||b.hcOricDetached)b.hcOrigStyle={display:b.style.display,height:b.style.height,overflow:b.style.overflow},a={display:"block",overflow:"hidden"},b!==this.renderTo&&(a.height=0),c.css(b,a),b.offsetWidth||b.style.setProperty("display","block","important");b=b.parentNode;if(b===C.body)break}},setClassName:function(a){this.container.className=
"highcharts-container "+(a||"")},getContainer:function(){var a=this.options,b=a.chart;var d=this.renderTo;var e=c.uniqueKey(),k,n;d||(this.renderTo=d=b.renderTo);t(d)&&(this.renderTo=d=C.getElementById(d));d||c.error(13,!0,this);var v=q(I(d,"data-highcharts-chart"));E(v)&&f[v]&&f[v].hasRendered&&f[v].destroy();I(d,"data-highcharts-chart",this.index);d.innerHTML="";b.skipClone||d.offsetWidth||this.temporaryDisplay();this.getChartSize();v=this.chartWidth;var h=this.chartHeight;l(d,{overflow:"hidden"});
this.styledMode||(k=w({position:"relative",overflow:"hidden",width:v+"px",height:h+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},b.style));this.container=d=r("div",{id:e},k,d);this._cursor=d.style.cursor;this.renderer=new (c[b.renderer]||c.Renderer)(d,v,h,null,b.forExport,a.exporting&&a.exporting.allowHTML,this.styledMode);this.setClassName(b.className);if(this.styledMode)for(n in a.defs)this.renderer.definition(a.defs[n]);else this.renderer.setStyle(b.style);
this.renderer.chartIndex=this.index;B(this,"afterGetContainer")},getMargins:function(a){var b=this.spacing,f=this.margin,l=this.titleOffset;this.resetMargins();l[0]&&!G(f[0])&&(this.plotTop=Math.max(this.plotTop,l[0]+b[0]));l[2]&&!G(f[2])&&(this.marginBottom=Math.max(this.marginBottom,l[2]+b[2]));this.legend&&this.legend.display&&this.legend.adjustMargins(f,b);B(this,"getMargins");a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],f=a.colorAxis,l=a.margin,d=function(a){a.forEach(function(a){a.visible&&
a.getOffset()})};a.hasCartesianSeries?d(a.axes):f&&f.length&&d(f);u.forEach(function(f,d){G(l[d])||(a[f]+=b[d])});a.setChartSize()},reflow:function(a){var f=this,l=f.options.chart,d=f.renderTo,e=G(l.width)&&G(l.height),k=l.width||c.getStyle(d,"width");l=l.height||c.getStyle(d,"height");d=a?a.target:P;if(!e&&!f.isPrinting&&k&&l&&(d===P||d===C)){if(k!==f.containerWidth||l!==f.containerHeight)c.clearTimeout(f.reflowTimeout),f.reflowTimeout=b(function(){f.container&&f.setSize(void 0,void 0,!1)},a?100:
0);f.containerWidth=k;f.containerHeight=l}},setReflow:function(a){var b=this;!1===a||this.unbindReflow?!1===a&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=d(P,"resize",function(a){b.options&&b.reflow(a)}),d(this,"destroy",this.unbindReflow))},setSize:function(a,f,d){var c=this,n=c.renderer;c.isResizing+=1;h(d,c);c.oldChartHeight=c.chartHeight;c.oldChartWidth=c.chartWidth;void 0!==a&&(c.options.chart.width=a);void 0!==f&&(c.options.chart.height=f);c.getChartSize();
if(!c.styledMode){var v=n.globalAnimation;(v?e:l)(c.container,{width:c.chartWidth+"px",height:c.chartHeight+"px"},v)}c.setChartSize(!0);n.setSize(c.chartWidth,c.chartHeight,d);c.axes.forEach(function(a){a.isDirty=!0;a.setScale()});c.isDirtyLegend=!0;c.isDirtyBox=!0;c.layOutTitles();c.getMargins();c.redraw(d);c.oldChartHeight=null;B(c,"resize");b(function(){c&&B(c,"endResize",null,function(){--c.isResizing})},k(v).duration||0)},setChartSize:function(a){var b=this.inverted,f=this.renderer,l=this.chartWidth,
d=this.chartHeight,c=this.options.chart,e=this.spacing,k=this.clipOffset,n,v,h,u;this.plotLeft=n=Math.round(this.plotLeft);this.plotTop=v=Math.round(this.plotTop);this.plotWidth=h=Math.max(0,Math.round(l-n-this.marginRight));this.plotHeight=u=Math.max(0,Math.round(d-v-this.marginBottom));this.plotSizeX=b?u:h;this.plotSizeY=b?h:u;this.plotBorderWidth=c.plotBorderWidth||0;this.spacingBox=f.spacingBox={x:e[3],y:e[0],width:l-e[3]-e[1],height:d-e[0]-e[2]};this.plotBox=f.plotBox={x:n,y:v,width:h,height:u};
l=2*Math.floor(this.plotBorderWidth/2);b=Math.ceil(Math.max(l,k[3])/2);f=Math.ceil(Math.max(l,k[0])/2);this.clipBox={x:b,y:f,width:Math.floor(this.plotSizeX-Math.max(l,k[1])/2-b),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(l,k[2])/2-f))};a||this.axes.forEach(function(a){a.setAxisSize();a.setAxisTranslation()});B(this,"afterSetChartSize",{skipAxes:a})},resetMargins:function(){B(this,"resetMargins");var a=this,b=a.options.chart;["margin","spacing"].forEach(function(f){var l=b[f],d=F(l)?l:[l,
l,l,l];["Top","Right","Bottom","Left"].forEach(function(l,c){a[f][c]=p(b[f+l],d[c])})});u.forEach(function(b,f){a[b]=p(a.margin[f],a.spacing[f])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,f=this.chartWidth,l=this.chartHeight,d=this.chartBackground,c=this.plotBackground,e=this.plotBorder,k=this.styledMode,n=this.plotBGImage,v=a.backgroundColor,h=a.plotBackgroundColor,u=a.plotBackgroundImage,m,A=this.plotLeft,r=this.plotTop,g=this.plotWidth,
p=this.plotHeight,J=this.plotBox,q=this.clipRect,z=this.clipBox,C="animate";d||(this.chartBackground=d=b.rect().addClass("highcharts-background").add(),C="attr");if(k)var t=m=d.strokeWidth();else{t=a.borderWidth||0;m=t+(a.shadow?8:0);v={fill:v||"none"};if(t||d["stroke-width"])v.stroke=a.borderColor,v["stroke-width"]=t;d.attr(v).shadow(a.shadow)}d[C]({x:m/2,y:m/2,width:f-m-t%2,height:l-m-t%2,r:a.borderRadius});C="animate";c||(C="attr",this.plotBackground=c=b.rect().addClass("highcharts-plot-background").add());
c[C](J);k||(c.attr({fill:h||"none"}).shadow(a.plotShadow),u&&(n?n.animate(J):this.plotBGImage=b.image(u,A,r,g,p).add()));q?q.animate({width:z.width,height:z.height}):this.clipRect=b.clipRect(z);C="animate";e||(C="attr",this.plotBorder=e=b.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());k||e.attr({stroke:a.plotBorderColor,"stroke-width":a.plotBorderWidth||0,fill:"none"});e[C](e.crisp({x:A,y:r,width:g,height:p},-e.strokeWidth()));this.isDirtyBox=!1;B(this,"afterDrawChartBox")},propFromSeries:function(){var a=
this,b=a.options.chart,f,l=a.options.series,d,c;["inverted","angular","polar"].forEach(function(e){f=Q[b.type||b.defaultSeriesType];c=b[e]||f&&f.prototype[e];for(d=l&&l.length;!c&&d--;)(f=Q[l[d].type])&&f.prototype[e]&&(c=!0);a[e]=c})},linkSeries:function(){var a=this,b=a.series;b.forEach(function(a){a.linkedSeries.length=0});b.forEach(function(b){var f=b.options.linkedTo;t(f)&&(f=":previous"===f?a.series[b.index-1]:a.get(f))&&f.linkedParent!==b&&(f.linkedSeries.push(b),b.linkedParent=f,b.visible=
p(b.options.visible,f.options.visible,b.visible))});B(this,"afterLinkSeries")},renderSeries:function(){this.series.forEach(function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&b.items.forEach(function(f){var l=w(b.style,f.style),d=q(l.left)+a.plotLeft,c=q(l.top)+a.plotTop+12;delete l.left;delete l.top;a.renderer.text(f.html,d,c).attr({zIndex:2}).css(l).add()})},render:function(){var a=this.axes,b=this.colorAxis,f=this.renderer,l=this.options,d=0,c=
function(a){a.forEach(function(a){a.visible&&a.render()})};this.setTitle();this.legend=new A(this,l.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();l=this.plotWidth;a.some(function(a){if(a.horiz&&a.visible&&a.options.labels.enabled&&a.series.length)return d=21,!0});var e=this.plotHeight=Math.max(this.plotHeight-d,0);a.forEach(function(a){a.setScale()});this.getAxisMargins();var k=1.1<l/this.plotWidth;var n=1.05<e/this.plotHeight;if(k||n)a.forEach(function(a){(a.horiz&&
k||!a.horiz&&n)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries?c(a):b&&b.length&&c(b);this.seriesGroup||(this.seriesGroup=f.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.updateContainerScaling();this.hasRendered=!0},addCredits:function(a){var b=this;a=J(!0,this.options.credits,a);a.enabled&&!this.credits&&(this.credits=this.renderer.text(a.text+(this.mapCredits||
""),0,0).addClass("highcharts-credits").on("click",function(){a.href&&(P.location.href=a.href)}).attr({align:a.position.align,zIndex:8}),b.styledMode||this.credits.css(a.style),this.credits.add().align(a.position),this.credits.update=function(a){b.credits=b.credits.destroy();b.addCredits(a)})},updateContainerScaling:function(){var a=this.container;if(a.offsetWidth&&a.offsetHeight&&a.getBoundingClientRect){var b=a.getBoundingClientRect(),f=b.width/a.offsetWidth;a=b.height/a.offsetHeight;1!==f||1!==
a?this.containerScaling={scaleX:f,scaleY:a}:delete this.containerScaling}},destroy:function(){var a=this,b=a.axes,l=a.series,d=a.container,e,k=d&&d.parentNode;B(a,"destroy");a.renderer.forExport?y(f,a):f[a.index]=void 0;c.chartCount--;a.renderTo.removeAttribute("data-highcharts-chart");U(a);for(e=b.length;e--;)b[e]=b[e].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(e=l.length;e--;)l[e]=l[e].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(b){var f=
a[b];f&&f.destroy&&(a[b]=f.destroy())});d&&(d.innerHTML="",U(d),k&&H(d));m(a,function(b,f){delete a[f]})},firstRender:function(){var a=this,b=a.options;if(!a.isReadyToRender||a.isReadyToRender()){a.getContainer();a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();(x(b.series)?b.series:[]).forEach(function(b){a.initSeries(b)});a.linkSeries();B(a,"beforeRender");L&&(a.pointer=new L(a,b));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.temporaryDisplay(!0)}},onload:function(){this.callbacks.concat([this.callback]).forEach(function(a){a&&
void 0!==this.index&&a.apply(this,[this])},this);B(this,"load");B(this,"render");G(this.index)&&this.setReflow(this.options.chart.reflow);this.onload=null}})});K(D,"parts/ScrollablePlotArea.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.pick,G=c.addEvent;g=c.Chart;"";G(g,"afterSetChartSize",function(g){var y=this.options.chart.scrollablePlotArea,w=y&&y.minWidth;y=y&&y.minHeight;if(!this.renderer.forExport){if(w){if(this.scrollablePixelsX=w=Math.max(0,w-this.chartWidth)){this.plotWidth+=
w;this.inverted?(this.clipBox.height+=w,this.plotBox.height+=w):(this.clipBox.width+=w,this.plotBox.width+=w);var x={1:{name:"right",value:w}}}}else y&&(this.scrollablePixelsY=w=Math.max(0,y-this.chartHeight))&&(this.plotHeight+=w,this.inverted?(this.clipBox.width+=w,this.plotBox.width+=w):(this.clipBox.height+=w,this.plotBox.height+=w),x={2:{name:"bottom",value:w}});x&&!g.skipAxes&&this.axes.forEach(function(g){x[g.side]?g.getPlotLinePath=function(){var w=x[g.side].name,t=this[w];this[w]=t-x[g.side].value;
var m=c.Axis.prototype.getPlotLinePath.apply(this,arguments);this[w]=t;return m}:(g.setAxisSize(),g.setAxisTranslation())})}});G(g,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()});g.prototype.setUpScrolling=function(){var g={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(g.overflowX="auto");this.scrollablePixelsY&&(g.overflowY="auto");
this.scrollingContainer=c.createElement("div",{className:"highcharts-scrolling"},g,this.renderTo);this.innerContainer=c.createElement("div",{className:"highcharts-inner-container"},null,this.scrollingContainer);this.innerContainer.appendChild(this.container);this.setUpScrolling=null};g.prototype.moveFixedElements=function(){var c=this.container,g=this.fixedRenderer,w=".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "),
x;this.scrollablePixelsX&&!this.inverted?x=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted?x=".highcharts-xaxis":this.scrollablePixelsY&&!this.inverted?x=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(x=".highcharts-yaxis");w.push(x,x+"-labels");w.forEach(function(x){[].forEach.call(c.querySelectorAll(x),function(c){(c.namespaceURI===g.SVG_NS?g.box:g.box.parentNode).appendChild(c);c.style.pointerEvents="auto"})})};g.prototype.applyFixed=function(){var g,y=!this.fixedDiv,w=this.options.chart.scrollablePlotArea;
y?(this.fixedDiv=c.createElement("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:2},null,!0),this.renderTo.insertBefore(this.fixedDiv,this.renderTo.firstChild),this.renderTo.style.overflow="visible",this.fixedRenderer=g=new c.Renderer(this.fixedDiv,this.chartWidth,this.chartHeight),this.scrollableMask=g.path().attr({fill:c.color(this.options.chart.backgroundColor||"#fff").setOpacity(I(w.opacity,.85)).get(),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),
this.moveFixedElements(),G(this,"afterShowResetZoom",this.moveFixedElements),G(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight);g=this.chartWidth+(this.scrollablePixelsX||0);var x=this.chartHeight+(this.scrollablePixelsY||0);c.stop(this.container);this.container.style.width=g+"px";this.container.style.height=x+"px";this.renderer.boxWrapper.attr({width:g,height:x,viewBox:[0,0,g,x].join(" ")});this.chartBackground.attr({width:g,height:x});
this.scrollablePixelsY&&(this.scrollingContainer.style.height=this.chartHeight+"px");y&&(w.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*w.scrollPositionX),w.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*w.scrollPositionY));x=this.axisOffset;y=this.plotTop-x[0]-1;w=this.plotLeft-x[3]-1;g=this.plotTop+this.plotHeight+x[2]+1;x=this.plotLeft+this.plotWidth+x[1]+1;var E=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),F=this.plotTop+this.plotHeight-
(this.scrollablePixelsY||0);y=this.scrollablePixelsX?["M",0,y,"L",this.plotLeft-1,y,"L",this.plotLeft-1,g,"L",0,g,"Z","M",E,y,"L",this.chartWidth,y,"L",this.chartWidth,g,"L",E,g,"Z"]:this.scrollablePixelsY?["M",w,0,"L",w,this.plotTop-1,"L",x,this.plotTop-1,"L",x,0,"Z","M",w,F,"L",w,this.chartHeight,"L",x,this.chartHeight,"L",x,F,"Z"]:["M",0,0];"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:y})}});K(D,"parts/Point.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=
g.defined,G=g.erase,H=g.extend,y=g.isArray,w=g.isNumber,x=g.isObject,E=g.pick,F,t=c.fireEvent,m=c.format,p=c.uniqueKey,q=c.removeEvent;c.Point=F=function(){};c.Point.prototype={init:function(c,a,b){this.series=c;this.applyOptions(a,b);this.id=I(this.id)?this.id:p();this.resolveColor();c.chart.pointCount++;t(this,"afterInit");return this},resolveColor:function(){var c=this.series;var a=c.chart.options.chart.colorCount;var b=c.chart.styledMode;b||this.options.color||(this.color=c.color);c.options.colorByPoint?
(b||(a=c.options.colors||c.chart.options.colors,this.color=this.color||a[c.colorCounter],a=a.length),b=c.colorCounter,c.colorCounter++,c.colorCounter===a&&(c.colorCounter=0)):b=c.colorIndex;this.colorIndex=E(this.colorIndex,b)},applyOptions:function(c,a){var b=this.series,d=b.options.pointValKey||b.pointValKey;c=F.prototype.optionsToObject.call(this,c);H(this,c);this.options=this.options?H(this.options,c):c;c.group&&delete this.group;c.dataLabels&&delete this.dataLabels;d&&(this.y=this[d]);this.formatPrefix=
(this.isNull=E(this.isValid&&!this.isValid(),null===this.x||!w(this.y)))?"null":"point";this.selected&&(this.state="select");"name"in this&&void 0===a&&b.xAxis&&b.xAxis.hasNames&&(this.x=b.xAxis.nameToX(this));void 0===this.x&&b&&(this.x=void 0===a?b.autoIncrement(this):a);return this},setNestedProperty:function(c,a,b){b.split(".").reduce(function(b,c,k,h){b[c]=h.length-1===k?a:x(b[c],!0)?b[c]:{};return b[c]},c);return c},optionsToObject:function(h){var a={},b=this.series,d=b.options.keys,e=d||b.pointArrayMap||
["y"],k=e.length,m=0,g=0;if(w(h)||null===h)a[e[0]]=h;else if(y(h))for(!d&&h.length>k&&(b=typeof h[0],"string"===b?a.name=h[0]:"number"===b&&(a.x=h[0]),m++);g<k;)d&&void 0===h[m]||(0<e[g].indexOf(".")?c.Point.prototype.setNestedProperty(a,h[m],e[g]):a[e[g]]=h[m]),m++,g++;else"object"===typeof h&&(a=h,h.dataLabels&&(b._hasPointLabels=!0),h.marker&&(b._hasPointMarkers=!0));return a},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":
"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var c=this.series,a=c.zones;c=c.zoneAxis||"y";var b=0,d;for(d=a[b];this[c]>=d.value;)d=a[++b];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=d&&d.color&&!this.options.color?d.color:this.nonZonedColor;return d},
hasNewShapeType:function(){return this.graphic&&this.graphic.element.nodeName!==this.shapeType},destroy:function(){var c=this.series.chart,a=c.hoverPoints,b;c.pointCount--;a&&(this.setState(),G(a,this),a.length||(c.hoverPoints=null));if(this===c.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel||this.dataLabels)q(this),this.destroyElements();this.legendItem&&c.legend.destroyItem(this);for(b in this)this[b]=null},destroyElements:function(c){var a=this,b=[],d;c=c||{graphic:1,dataLabel:1};
c.graphic&&b.push("graphic","shadowGroup");c.dataLabel&&b.push("dataLabel","dataLabelUpper","connector");for(d=b.length;d--;){var e=b[d];a[e]&&(a[e]=a[e].destroy())}["dataLabel","connector"].forEach(function(b){var d=b+"s";c[b]&&a[d]&&(a[d].forEach(function(a){a.element&&a.destroy()}),delete a[d])})},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(c){var a=this.series,b=a.tooltipOptions,d=E(b.valueDecimals,""),e=b.valuePrefix||"",k=b.valueSuffix||"";a.chart.styledMode&&(c=a.chart.tooltip.styledModeFormat(c));(a.pointArrayMap||["y"]).forEach(function(a){a="{point."+a;if(e||k)c=c.replace(RegExp(a+"}","g"),e+a+"}"+k);c=c.replace(RegExp(a+"}","g"),a+":,."+d+"f}")});return m(c,{point:this,series:this.series},a.chart.time)},firePointEvent:function(c,a,b){var d=this,e=this.series.options;(e.point.events[c]||
d.options&&d.options.events&&d.options.events[c])&&this.importEvents();"click"===c&&e.allowPointSelect&&(b=function(a){d.select&&d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});t(this,c,a,b)},visible:!0}});K(D,"parts/Series.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.arrayMax,G=g.arrayMin,H=g.defined,y=g.erase,w=g.extend,x=g.isArray,E=g.isNumber,F=g.isString,t=g.objectEach,m=g.pick,p=g.splat,q=g.syncTimeout,h=c.addEvent,a=c.animObject,b=c.correctFloat,d=c.defaultOptions,
e=c.defaultPlotOptions,k=c.fireEvent,C=c.merge,z=c.removeEvent,r=c.SVGElement,n=c.win;c.Series=c.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",enabledThreshold:2,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===
this.y?"":c.numberFormat(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{axisTypes:["xAxis","yAxis"],
coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,isCartesian:!0,parallelArrays:["x","y"],pointClass:c.Point,requireSorting:!0,sorted:!0,init:function(a,b){k(this,"init",{options:b});var f=this,l=a.series,d;this.eventOptions=this.eventOptions||{};f.chart=a;f.options=b=f.setOptions(b);f.linkedSeries=[];f.bindAxes();w(f,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});var e=b.events;t(e,function(a,b){c.isFunction(a)&&f.eventOptions[b]!==a&&(c.isFunction(f.eventOptions[b])&&
z(f,b,f.eventOptions[b]),f.eventOptions[b]=a,h(f,b,a))});if(e&&e.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;f.getColor();f.getSymbol();f.parallelArrays.forEach(function(a){f[a+"Data"]||(f[a+"Data"]=[])});f.points||f.data||f.setData(b.data,!1);f.isCartesian&&(a.hasCartesianSeries=!0);l.length&&(d=l[l.length-1]);f._i=m(d&&d._i,-1)+1;a.orderSeries(this.insert(l));k(this,"afterInit")},insert:function(a){var b=this.options.index,f;if(E(b)){for(f=a.length;f--;)if(b>=
m(a[f].options.index,a[f]._i)){a.splice(f+1,0,this);break}-1===f&&a.unshift(this);f+=1}else a.push(this);return m(f,a.length-1)},bindAxes:function(){var a=this,b=a.options,d=a.chart,e;k(this,"bindAxes",null,function(){(a.axisTypes||[]).forEach(function(f){d[f].forEach(function(l){e=l.options;if(b[f]===e.index||void 0!==b[f]&&b[f]===e.id||void 0===b[f]&&0===e.index)a.insert(l.series),a[f]=l,l.isDirty=!0});a[f]||a.optionalAxis===f||c.error(18,!0,d)})})},updateParallelArrays:function(a,b){var f=a.series,
l=arguments,c=E(b)?function(l){var c="y"===l&&f.toYData?f.toYData(a):a[l];f[l+"Data"][b]=c}:function(a){Array.prototype[b].apply(f[a+"Data"],Array.prototype.slice.call(l,2))};f.parallelArrays.forEach(c)},hasData:function(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&0<this.yData.length},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,d=a.pointIntervalUnit,e=this.chart.time;b=m(b,a.pointStart,0);this.pointInterval=c=m(this.pointInterval,
a.pointInterval,1);d&&(a=new e.Date(b),"day"===d?e.set("Date",a,e.get("Date",a)+c):"month"===d?e.set("Month",a,e.get("Month",a)+c):"year"===d&&e.set("FullYear",a,e.get("FullYear",a)+c),c=a.getTime()-b);this.xIncrement=b+c;return b},setOptions:function(a){var b=this.chart,f=b.options,c=f.plotOptions,e=b.userOptions||{};a=C(a);b=b.styledMode;var n={plotOptions:c,userOptions:a};k(this,"setOptions",n);var h=n.plotOptions[this.type],r=e.plotOptions||{};this.userOptions=n.userOptions;e=C(h,c.series,e.plotOptions&&
e.plotOptions[this.type],a);this.tooltipOptions=C(d.tooltip,d.plotOptions.series&&d.plotOptions.series.tooltip,d.plotOptions[this.type].tooltip,f.tooltip.userOptions,c.series&&c.series.tooltip,c[this.type].tooltip,a.tooltip);this.stickyTracking=m(a.stickyTracking,r[this.type]&&r[this.type].stickyTracking,r.series&&r.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:e.stickyTracking);null===h.marker&&delete e.marker;this.zoneAxis=e.zoneAxis;f=this.zones=(e.zones||[]).slice();
!e.negativeColor&&!e.negativeFillColor||e.zones||(c={value:e[this.zoneAxis+"Threshold"]||e.threshold||0,className:"highcharts-negative"},b||(c.color=e.negativeColor,c.fillColor=e.negativeFillColor),f.push(c));f.length&&H(f[f.length-1].value)&&f.push(b?{}:{color:this.color,fillColor:this.fillColor});k(this,"afterSetOptions",{options:e});return e},getName:function(){return m(this.options.name,"Series "+(this.index+1))},getCyclic:function(a,b,c){var f=this.chart,l=this.userOptions,d=a+"Index",e=a+"Counter",
k=c?c.length:m(f.options.chart[a+"Count"],f[a+"Count"]);if(!b){var n=m(l[d],l["_"+d]);H(n)||(f.series.length||(f[e]=0),l["_"+d]=n=f[e]%k,f[e]+=1);c&&(b=c[n])}void 0!==n&&(this[d]=n);this[a]=b},getColor:function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||e[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},findPointIndex:function(a,
b){var f=a.id;a=a.x;var l=this.points,c;if(f){var d=(f=this.chart.get(f))&&f.index;void 0!==d&&(c=!0)}void 0===d&&E(a)&&(d=this.xData.indexOf(a,b));-1!==d&&void 0!==d&&this.cropped&&(d=d>=this.cropStart?d-this.cropStart:d);!c&&l[d]&&l[d].touched&&(d=void 0);return d},drawLegendSymbol:c.LegendSymbolMixin.drawLineMarker,updateData:function(a){var b=this.options,f=this.points,c=[],d,e,n,k=this.requireSorting,m=a.length===f.length,h=!0;this.xIncrement=null;a.forEach(function(a,l){var e=H(a)&&this.pointClass.prototype.optionsToObject.call({series:this},
a)||{};var v=e.x;if(e.id||E(v))if(v=this.findPointIndex(e,n),-1===v||void 0===v?c.push(a):f[v]&&a!==b.data[v]?(f[v].update(a,!1,null,!1),f[v].touched=!0,k&&(n=v+1)):f[v]&&(f[v].touched=!0),!m||l!==v||this.hasDerivedData)d=!0},this);if(d)for(a=f.length;a--;)(e=f[a])&&!e.touched&&e.remove(!1);else m?a.forEach(function(a,b){f[b].update&&a!==f[b].y&&f[b].update(a,!1,null,!1)}):h=!1;f.forEach(function(a){a&&(a.touched=!1)});if(!h)return!1;c.forEach(function(a){this.addPoint(a,!1,null,null,!1)},this);return!0},
setData:function(a,b,d,e){var f=this,l=f.points,n=l&&l.length||0,k,v=f.options,B=f.chart,h=null,r=f.xAxis;h=v.turboThreshold;var g=this.xData,p=this.yData,q=(k=f.pointArrayMap)&&k.length,t=v.keys,z=0,C=1,w;a=a||[];k=a.length;b=m(b,!0);!1!==e&&k&&n&&!f.cropped&&!f.hasGroupedData&&f.visible&&!f.isSeriesBoosting&&(w=this.updateData(a));if(!w){f.xIncrement=null;f.colorCounter=0;this.parallelArrays.forEach(function(a){f[a+"Data"].length=0});if(h&&k>h)if(h=f.getFirstValidPoint(a),E(h))for(d=0;d<k;d++)g[d]=
this.autoIncrement(),p[d]=a[d];else if(x(h))if(q)for(d=0;d<k;d++)e=a[d],g[d]=e[0],p[d]=e.slice(1,q+1);else for(t&&(z=t.indexOf("x"),C=t.indexOf("y"),z=0<=z?z:0,C=0<=C?C:1),d=0;d<k;d++)e=a[d],g[d]=e[z],p[d]=e[C];else c.error(12,!1,B);else for(d=0;d<k;d++)void 0!==a[d]&&(e={series:f},f.pointClass.prototype.applyOptions.apply(e,[a[d]]),f.updateParallelArrays(e,d));p&&F(p[0])&&c.error(14,!0,B);f.data=[];f.options.data=f.userOptions.data=a;for(d=n;d--;)l[d]&&l[d].destroy&&l[d].destroy();r&&(r.minRange=
r.userMinRange);f.isDirty=B.isDirtyBox=!0;f.isDirtyData=!!l;d=!1}"point"===v.legendType&&(this.processData(),this.generatePoints());b&&B.redraw(d)},processData:function(a){var b=this.xData,f=this.yData,d=b.length;var e=0;var k=this.xAxis,n=this.options;var h=n.cropThreshold;var m=this.getExtremesFromAll||n.getExtremesFromAll,r=this.isCartesian;n=k&&k.val2lin;var g=k&&k.isLog,p=this.requireSorting;if(r&&!this.isDirty&&!k.isDirty&&!this.yAxis.isDirty&&!a)return!1;if(k){a=k.getExtremes();var q=a.min;
var t=a.max}if(r&&this.sorted&&!m&&(!h||d>h||this.forceCrop))if(b[d-1]<q||b[0]>t)b=[],f=[];else if(this.yData&&(b[0]<q||b[d-1]>t)){e=this.cropData(this.xData,this.yData,q,t);b=e.xData;f=e.yData;e=e.start;var z=!0}for(h=b.length||1;--h;)if(d=g?n(b[h])-n(b[h-1]):b[h]-b[h-1],0<d&&(void 0===C||d<C))var C=d;else 0>d&&p&&(c.error(15,!1,this.chart),p=!1);this.cropped=z;this.cropStart=e;this.processedXData=b;this.processedYData=f;this.closestPointRange=this.basePointRange=C},cropData:function(a,b,d,c,e){var f=
a.length,l=0,k=f,n;e=m(e,this.cropShoulder);for(n=0;n<f;n++)if(a[n]>=d){l=Math.max(0,n-e);break}for(d=n;d<f;d++)if(a[d]>c){k=d+e;break}return{xData:a.slice(l,k),yData:b.slice(l,k),start:l,end:k}},generatePoints:function(){var a=this.options,b=a.data,d=this.data,c,e=this.processedXData,n=this.processedYData,h=this.pointClass,m=e.length,r=this.cropStart||0,g=this.hasGroupedData;a=a.keys;var q=[],t;d||g||(d=[],d.length=b.length,d=this.data=d);a&&g&&(this.options.keys=!1);for(t=0;t<m;t++){var z=r+t;if(g){var C=
(new h).init(this,[e[t]].concat(p(n[t])));C.dataGroup=this.groupMap[t];C.dataGroup.options&&(C.options=C.dataGroup.options,w(C,C.dataGroup.options),delete C.dataLabels)}else(C=d[z])||void 0===b[z]||(d[z]=C=(new h).init(this,b[z],e[t]));C&&(C.index=z,q[t]=C)}this.options.keys=a;if(d&&(m!==(c=d.length)||g))for(t=0;t<c;t++)t!==r||g||(t+=m),d[t]&&(d[t].destroyElements(),d[t].plotX=void 0);this.data=d;this.points=q;k(this,"afterGeneratePoints")},getXExtremes:function(a){return{min:G(a),max:I(a)}},getExtremes:function(a){var b=
this.xAxis,f=this.yAxis,d=this.processedXData||this.xData,c=[],e=0,n=0;var h=0;var m=this.requireSorting?this.cropShoulder:0,r=f?f.positiveValuesOnly:!1,g;a=a||this.stackedYData||this.processedYData||[];f=a.length;b&&(h=b.getExtremes(),n=h.min,h=h.max);for(g=0;g<f;g++){var p=d[g];var t=a[g];var q=(E(t)||x(t))&&(t.length||0<t||!r);p=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!b||(d[g+m]||p)>=n&&(d[g-m]||p)<=h;if(q&&p)if(q=t.length)for(;q--;)E(t[q])&&(c[e++]=t[q]);else c[e++]=
t}this.dataMin=G(c);this.dataMax=I(c);k(this,"afterGetExtremes")},getFirstValidPoint:function(a){for(var b=null,f=a.length,d=0;null===b&&d<f;)b=a[d],d++;return b},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,d=a.stacking,c=this.xAxis,e=c.categories,n=this.yAxis,h=this.points,r=h.length,g=!!this.modifyValue,p,t=this.pointPlacementToXValue(),q=E(t),C=a.threshold,z=a.startFromThreshold?C:0,w,y=this.zoneAxis||"y",F=Number.MAX_VALUE;for(p=0;p<r;p++){var G=
h[p],I=G.x;var D=G.y;var T=G.low,K=d&&n.stacks[(this.negStacks&&D<(z?0:C)?"-":"")+this.stackKey];n.positiveValuesOnly&&null!==D&&0>=D&&(G.isNull=!0);G.plotX=w=b(Math.min(Math.max(-1E5,c.translate(I,0,0,0,1,t,"flags"===this.type)),1E5));if(d&&this.visible&&K&&K[I]){var Z=this.getStackIndicator(Z,I,this.index);if(!G.isNull){var aa=K[I];var V=aa.points[Z.key]}}x(V)&&(T=V[0],D=V[1],T===z&&Z.key===K[I].base&&(T=m(E(C)&&C,n.min)),n.positiveValuesOnly&&0>=T&&(T=null),G.total=G.stackTotal=aa.total,G.percentage=
aa.total&&G.y/aa.total*100,G.stackY=D,this.irregularWidths||aa.setOffset(this.pointXOffset||0,this.barW||0));G.yBottom=H(T)?Math.min(Math.max(-1E5,n.translate(T,0,1,0,1)),1E5):null;g&&(D=this.modifyValue(D,G));G.plotY=D="number"===typeof D&&Infinity!==D?Math.min(Math.max(-1E5,n.translate(D,0,1,0,1)),1E5):void 0;G.isInside=void 0!==D&&0<=D&&D<=n.len&&0<=w&&w<=c.len;G.clientX=q?b(c.translate(I,0,0,0,1,t)):w;G.negative=G[y]<(a[y+"Threshold"]||C||0);G.category=e&&void 0!==e[G.x]?e[G.x]:G.x;if(!G.isNull){void 0!==
W&&(F=Math.min(F,Math.abs(w-W)));var W=w}G.zone=this.zones.length&&G.getZone()}this.closestPointRangePx=F;k(this,"afterTranslate")},getValidPoints:function(a,b,d){var f=this.chart;return(a||this.points||[]).filter(function(a){return b&&!f.isInsidePlot(a.plotX,a.plotY,f.inverted)?!1:d||!a.isNull})},getClipBox:function(a,b){var f=this.options,d=this.chart,l=d.inverted,c=this.xAxis,e=c&&this.yAxis;a&&!1===f.clip&&e?a=l?{y:-d.chartWidth+e.len+e.pos,height:d.chartWidth,width:d.chartHeight,x:-d.chartHeight+
c.len+c.pos}:{y:-e.pos,height:d.chartHeight,width:d.chartWidth,x:-c.pos}:(a=this.clipBox||d.clipBox,b&&(a.width=d.plotSizeX,a.x=0));return b?{width:a.width,x:a.x}:a},setClip:function(a){var b=this.chart,f=this.options,d=b.renderer,c=b.inverted,e=this.clipBox,n=this.getClipBox(a),k=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,n.height,f.xAxis,f.yAxis].join(),h=b[k],m=b[k+"m"];h||(a&&(n.width=0,c&&(n.x=b.plotSizeX+(!1!==f.clip?0:b.plotTop)),b[k+"m"]=m=d.clipRect(c?b.plotSizeX+99:-99,
c?-b.plotLeft:-b.plotTop,99,c?b.chartWidth:b.chartHeight)),b[k]=h=d.clipRect(n),h.count={length:0});a&&!h.count[this.index]&&(h.count[this.index]=!0,h.count.length+=1);if(!1!==f.clip||a)this.group.clip(a||e?h:b.clipRect),this.markerGroup.clip(m),this.sharedClipKey=k;a||(h.count[this.index]&&(delete h.count[this.index],--h.count.length),0===h.count.length&&k&&b[k]&&(e||(b[k]=b[k].destroy()),b[k+"m"]&&(b[k+"m"]=b[k+"m"].destroy())))},animate:function(b){var f=this.chart,d=a(this.options.animation);
if(b)this.setClip(d);else{var c=this.sharedClipKey;b=f[c];var e=this.getClipBox(d,!0);b&&b.animate(e,d);f[c+"m"]&&f[c+"m"].animate({width:e.width+99,x:e.x-(f.inverted?0:99)},d);this.animate=null}},afterAnimate:function(){this.setClip();k(this,"afterAnimate");this.finishedAnimating=!0},drawPoints:function(){var a=this.points,b=this.chart,d,c=this.options.marker,e=this[this.specialGroup]||this.markerGroup;var n=this.xAxis;var k=m(c.enabled,!n||n.isRadial?!0:null,this.closestPointRangePx>=c.enabledThreshold*
c.radius);if(!1!==c.enabled||this._hasPointMarkers)for(n=0;n<a.length;n++){var h=a[n];var r=(d=h.graphic)?"animate":"attr";var g=h.marker||{};var p=!!h.marker;var t=k&&void 0===g.enabled||g.enabled;var q=!1!==h.isInside;if(t&&!h.isNull){var C=m(g.symbol,this.symbol);t=this.markerAttribs(h,h.selected&&"select");d?d[q?"show":"hide"](q).animate(t):q&&(0<t.width||h.hasImage)&&(h.graphic=d=b.renderer.symbol(C,t.x,t.y,t.width,t.height,p?g:c).add(e));if(d&&!b.styledMode)d[r](this.pointAttribs(h,h.selected&&
"select"));d&&d.addClass(h.getClassName(),!0)}else d&&(h.graphic=d.destroy())}},markerAttribs:function(a,b){var f=this.options.marker,d=a.marker||{},c=d.symbol||f.symbol,l=m(d.radius,f.radius);b&&(f=f.states[b],b=d.states&&d.states[b],l=m(b&&b.radius,f&&f.radius,l+(f&&f.radiusPlus||0)));a.hasImage=c&&0===c.indexOf("url");a.hasImage&&(l=0);a={x:Math.floor(a.plotX)-l,y:a.plotY-l};l&&(a.width=a.height=2*l);return a},pointAttribs:function(a,b){var f=this.options.marker,d=a&&a.options,c=d&&d.marker||{},
l=this.color,e=d&&d.color,n=a&&a.color;d=m(c.lineWidth,f.lineWidth);var k=a&&a.zone&&a.zone.color;a=1;l=e||k||n||l;e=c.fillColor||f.fillColor||l;l=c.lineColor||f.lineColor||l;b=b||"normal";f=f.states[b];b=c.states&&c.states[b]||{};d=m(b.lineWidth,f.lineWidth,d+m(b.lineWidthPlus,f.lineWidthPlus,0));e=b.fillColor||f.fillColor||e;l=b.lineColor||f.lineColor||l;a=m(b.opacity,f.opacity,a);return{stroke:l,"stroke-width":d,fill:e,opacity:a}},destroy:function(a){var b=this,f=b.chart,d=/AppleWebKit\/533/.test(n.navigator.userAgent),
e,h,m=b.data||[],g,p;k(b,"destroy");a||z(b);(b.axisTypes||[]).forEach(function(a){(p=b[a])&&p.series&&(y(p.series,b),p.isDirty=p.forceRedraw=!0)});b.legendItem&&b.chart.legend.destroyItem(b);for(h=m.length;h--;)(g=m[h])&&g.destroy&&g.destroy();b.points=null;c.clearTimeout(b.animationTimeout);t(b,function(a,b){a instanceof r&&!a.survive&&(e=d&&"group"===b?"hide":"destroy",a[e]())});f.hoverSeries===b&&(f.hoverSeries=null);y(f.series,b);f.orderSeries();t(b,function(f,d){a&&"hcEvents"===d||delete b[d]})},
getGraphPath:function(a,b,d){var f=this,c=f.options,l=c.step,e,n=[],k=[],h;a=a||f.points;(e=a.reversed)&&a.reverse();(l={right:1,center:2}[l]||l&&3)&&e&&(l=4-l);!c.connectNulls||b||d||(a=this.getValidPoints(a));a.forEach(function(e,m){var B=e.plotX,v=e.plotY,r=a[m-1];(e.leftCliff||r&&r.rightCliff)&&!d&&(h=!0);e.isNull&&!H(b)&&0<m?h=!c.connectNulls:e.isNull&&!b?h=!0:(0===m||h?m=["M",e.plotX,e.plotY]:f.getPointSpline?m=f.getPointSpline(a,e,m):l?(m=1===l?["L",r.plotX,v]:2===l?["L",(r.plotX+B)/2,r.plotY,
"L",(r.plotX+B)/2,v]:["L",B,r.plotY],m.push("L",B,v)):m=["L",B,v],k.push(e.x),l&&(k.push(e.x),2===l&&k.push(e.x)),n.push.apply(n,m),h=!1)});n.xMap=k;return f.graphPath=n},drawGraph:function(){var a=this,b=this.options,d=(this.gappedPath||this.getGraphPath).call(this),c=this.chart.styledMode,e=[["graph","highcharts-graph"]];c||e[0].push(b.lineColor||this.color||"#cccccc",b.dashStyle);e=a.getZonesGraphs(e);e.forEach(function(f,l){var e=f[0],n=a[e],k=n?"animate":"attr";n?(n.endX=a.preventGraphAnimation?
null:d.xMap,n.animate({d:d})):d.length&&(a[e]=n=a.chart.renderer.path(d).addClass(f[1]).attr({zIndex:1}).add(a.group));n&&!c&&(e={stroke:f[2],"stroke-width":b.lineWidth,fill:a.fillGraph&&a.color||"none"},f[3]?e.dashstyle=f[3]:"square"!==b.linecap&&(e["stroke-linecap"]=e["stroke-linejoin"]="round"),n[k](e).shadow(2>l&&b.shadow));n&&(n.startX=d.xMap,n.isArea=d.isArea)})},getZonesGraphs:function(a){this.zones.forEach(function(b,f){f=["zone-graph-"+f,"highcharts-graph highcharts-zone-graph-"+f+" "+(b.className||
"")];this.chart.styledMode||f.push(b.color||this.color,b.dashStyle||this.options.dashStyle);a.push(f)},this);return a},applyZones:function(){var a=this,b=this.chart,d=b.renderer,c=this.zones,e,n,k=this.clips||[],h,r=this.graph,g=this.area,p=Math.max(b.chartWidth,b.chartHeight),t=this[(this.zoneAxis||"y")+"Axis"],q=b.inverted,C,z,x,w=!1;if(c.length&&(r||g)&&t&&void 0!==t.min){var E=t.reversed;var y=t.horiz;r&&!this.showLine&&r.hide();g&&g.hide();var F=t.getExtremes();c.forEach(function(f,c){e=E?y?
b.plotWidth:0:y?0:t.toPixels(F.min)||0;e=Math.min(Math.max(m(n,e),0),p);n=Math.min(Math.max(Math.round(t.toPixels(m(f.value,F.max),!0)||0),0),p);w&&(e=n=t.toPixels(F.max));C=Math.abs(e-n);z=Math.min(e,n);x=Math.max(e,n);t.isXAxis?(h={x:q?x:z,y:0,width:C,height:p},y||(h.x=b.plotHeight-h.x)):(h={x:0,y:q?x:z,width:p,height:C},y&&(h.y=b.plotWidth-h.y));q&&d.isVML&&(h=t.isXAxis?{x:0,y:E?z:x,height:h.width,width:b.chartWidth}:{x:h.y-b.plotLeft-b.spacingBox.x,y:0,width:h.height,height:b.chartHeight});k[c]?
k[c].animate(h):k[c]=d.clipRect(h);r&&a["zone-graph-"+c].clip(k[c]);g&&a["zone-area-"+c].clip(k[c]);w=f.value>F.max;a.resetZones&&0===n&&(n=void 0)});this.clips=k}else a.visible&&(r&&r.show(!0),g&&g.show(!0))},invertGroups:function(a){function b(){["group","markerGroup"].forEach(function(b){f[b]&&(d.renderer.isVML&&f[b].attr({width:f.yAxis.len,height:f.xAxis.len}),f[b].width=f.yAxis.len,f[b].height=f.xAxis.len,f[b].invert(a))})}var f=this,d=f.chart;if(f.xAxis){var c=h(d,"resize",b);h(f,"destroy",
c);b(a);f.invertGroups=b}},plotGroup:function(a,b,d,c,e){var f=this[a],l=!f;l&&(this[a]=f=this.chart.renderer.g().attr({zIndex:c||.1}).add(e));f.addClass("highcharts-"+b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(H(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(f.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0);f.attr({visibility:d})[l?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){var a=this.chart,
b=this.xAxis,d=this.yAxis;a.inverted&&(b=d,d=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:d?d.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var b=this,d=b.chart,c=b.options,e=!!b.animate&&d.renderer.isSVG&&a(c.animation).duration,n=b.visible?"inherit":"hidden",h=c.zIndex,m=b.hasRendered,r=d.seriesGroup,g=d.inverted;k(this,"render");var p=b.plotGroup("group","series",n,h,r);b.markerGroup=b.plotGroup("markerGroup","markers",n,h,r);e&&b.animate(!0);p.inverted=b.isCartesian||b.invertable?
g:!1;b.drawGraph&&(b.drawGraph(),b.applyZones());b.visible&&b.drawPoints();b.drawDataLabels&&b.drawDataLabels();b.redrawPoints&&b.redrawPoints();b.drawTracker&&!1!==b.options.enableMouseTracking&&b.drawTracker();b.invertGroups(g);!1===c.clip||b.sharedClipKey||m||p.clip(d.clipRect);e&&b.animate();m||(b.animationTimeout=q(function(){b.afterAnimate()},e||0));b.isDirty=!1;b.hasRendered=!0;k(b,"afterRender")},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,d=this.group,c=this.xAxis,
e=this.yAxis;d&&(a.inverted&&d.attr({width:a.plotWidth,height:a.plotHeight}),d.animate({translateX:m(c&&c.left,a.plotLeft),translateY:m(e&&e.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var f=this.xAxis,d=this.yAxis,c=this.chart.inverted;return this.searchKDTree({clientX:c?f.len-a.chartY+f.pos:a.chartX-f.pos,plotY:c?d.len-a.chartX+d.pos:a.chartY-d.pos},b,a)},buildKDTree:function(a){function b(a,d,c){var l;if(l=a&&
a.length){var e=f.kdAxisArray[d%c];a.sort(function(a,b){return a[e]-b[e]});l=Math.floor(l/2);return{point:a[l],left:b(a.slice(0,l),d+1,c),right:b(a.slice(l+1),d+1,c)}}}this.buildingKdTree=!0;var f=this,d=-1<f.options.findNearestPointBy.indexOf("y")?2:1;delete f.kdTree;q(function(){f.kdTree=b(f.getValidPoints(null,!f.directTouch),d,d);f.buildingKdTree=!1},f.options.kdNow||a&&"touchstart"===a.type?0:1)},searchKDTree:function(a,b,d){function f(a,b,d,k){var h=b.point,m=c.kdAxisArray[d%k],r=h;var B=H(a[l])&&
H(h[l])?Math.pow(a[l]-h[l],2):null;var g=H(a[e])&&H(h[e])?Math.pow(a[e]-h[e],2):null;g=(B||0)+(g||0);h.dist=H(g)?Math.sqrt(g):Number.MAX_VALUE;h.distX=H(B)?Math.sqrt(B):Number.MAX_VALUE;m=a[m]-h[m];g=0>m?"left":"right";B=0>m?"right":"left";b[g]&&(g=f(a,b[g],d+1,k),r=g[n]<r[n]?g:h);b[B]&&Math.sqrt(m*m)<r[n]&&(a=f(a,b[B],d+1,k),r=a[n]<r[n]?a:r);return r}var c=this,l=this.kdAxisArray[0],e=this.kdAxisArray[1],n=b?"distX":"dist";b=-1<c.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||
this.buildKDTree(d);if(this.kdTree)return f(a,this.kdTree,b,b)},pointPlacementToXValue:function(){var a=this.xAxis,b=this.options.pointPlacement;"between"===b&&(b=a.reversed?-.5:.5);E(b)&&(b*=m(this.options.pointRange||a.pointRange));return b}});""});K(D,"parts/Stacking.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.destroyObjectProperties,H=g.objectEach,y=g.pick;g=c.Axis;var w=c.Chart,x=c.correctFloat,E=c.format,F=c.Series;c.StackItem=function(c,m,g,q,h){var a=
c.chart.inverted;this.axis=c;this.isNegative=g;this.options=m=m||{};this.x=q;this.total=null;this.points={};this.stack=h;this.rightCliff=this.leftCliff=0;this.alignOptions={align:m.align||(a?g?"left":"right":"center"),verticalAlign:m.verticalAlign||(a?"middle":g?"bottom":"top"),y:m.y,x:m.x};this.textAlign=m.textAlign||(a?g?"right":"left":"center")};c.StackItem.prototype={destroy:function(){G(this,this.axis)},render:function(c){var m=this.axis.chart,g=this.options,t=g.format;t=t?E(t,this,m.time):g.formatter.call(this);
this.label?this.label.attr({text:t,visibility:"hidden"}):(this.label=m.renderer.label(t,null,null,g.shape,null,null,g.useHTML,!1,"stack-labels"),t={text:t,align:this.textAlign,rotation:g.rotation,padding:y(g.padding,0),visibility:"hidden"},this.label.attr(t),m.styledMode||this.label.css(g.style),this.label.added||this.label.add(c));this.label.labelrank=m.plotHeight},setOffset:function(c,m,g,q,h){var a=this.axis,b=a.chart;q=a.translate(a.usePercentage?100:q?q:this.total,0,0,0,1);g=a.translate(g?g:
0);g=I(q)&&Math.abs(q-g);c=y(h,b.xAxis[0].translate(this.x))+c;a=I(q)&&this.getStackBox(b,this,c,q,m,g,a);m=this.label;c=this.isNegative;h="justify"===y(this.options.overflow,"justify");if(m&&a){g=m.getBBox();var d=b.inverted?c?g.width:0:g.width/2,e=b.inverted?g.height/2:c?-4:g.height+4;this.alignOptions.x=y(this.options.x,0);m.align(this.alignOptions,null,a);q=m.alignAttr;m.show();q.y-=e;h&&(q.x-=d,F.prototype.justifyDataLabel.call(this.axis,m,this.alignOptions,q,g,a),q.x+=d);q.x=m.alignAttr.x;m.attr({x:q.x,
y:q.y});y(!h&&this.options.crop,!0)&&((b=b.isInsidePlot(m.x+(b.inverted?0:-g.width/2),m.y)&&b.isInsidePlot(m.x+(b.inverted?c?-g.width:g.width:g.width/2),m.y+g.height))||m.hide())}},getStackBox:function(c,m,g,q,h,a,b){var d=m.axis.reversed,e=c.inverted;c=b.height+b.pos-(e?c.plotLeft:c.plotTop);m=m.isNegative&&!d||!m.isNegative&&d;return{x:e?m?q:q-a:g,y:e?c-g-h:m?c-q-a:c-q,width:e?a:h,height:e?h:a}}};w.prototype.getStacks=function(){var c=this,m=c.inverted;c.yAxis.forEach(function(c){c.stacks&&c.hasVisibleSeries&&
(c.oldStacks=c.stacks)});c.series.forEach(function(g){var p=g.xAxis&&g.xAxis.options||{};!g.options.stacking||!0!==g.visible&&!1!==c.options.chart.ignoreHiddenSeries||(g.stackKey=[g.type,y(g.options.stack,""),m?p.top:p.left,m?p.height:p.width].join())})};g.prototype.buildStacks=function(){var c=this.series,m=y(this.options.reversedStacks,!0),g=c.length,q;if(!this.isXAxis){this.usePercentage=!1;for(q=g;q--;)c[m?q:g-q-1].setStackedPoints();for(q=0;q<g;q++)c[q].modifyStacks()}};g.prototype.renderStackTotals=
function(){var c=this.chart,m=c.renderer,g=this.stacks,q=this.stackTotalGroup;q||(this.stackTotalGroup=q=m.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());q.translate(c.plotLeft,c.plotTop);H(g,function(c){H(c,function(a){a.render(q)})})};g.prototype.resetStacks=function(){var c=this,m=c.stacks;c.isXAxis||H(m,function(m){H(m,function(g,h){g.touched<c.stacksTouched?(g.destroy(),delete m[h]):(g.total=null,g.cumulative=null)})})};g.prototype.cleanStacks=function(){if(!this.isXAxis){if(this.oldStacks)var c=
this.stacks=this.oldStacks;H(c,function(c){H(c,function(c){c.cumulative=c.total})})}};F.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var g=this.processedXData,m=this.processedYData,p=[],q=m.length,h=this.options,a=h.threshold,b=y(h.startFromThreshold&&a,0),d=h.stack;h=h.stacking;var e=this.stackKey,k="-"+e,C=this.negStacks,z=this.yAxis,r=z.stacks,n=z.oldStacks,f,l;z.stacksTouched+=1;for(l=0;l<q;l++){var v=g[l];
var B=m[l];var A=this.getStackIndicator(A,v,this.index);var u=A.key;var J=(f=C&&B<(b?0:a))?k:e;r[J]||(r[J]={});r[J][v]||(n[J]&&n[J][v]?(r[J][v]=n[J][v],r[J][v].total=null):r[J][v]=new c.StackItem(z,z.options.stackLabels,f,v,d));J=r[J][v];null!==B?(J.points[u]=J.points[this.index]=[y(J.cumulative,b)],I(J.cumulative)||(J.base=u),J.touched=z.stacksTouched,0<A.index&&!1===this.singleStacks&&(J.points[u][0]=J.points[this.index+","+v+",0"][0])):J.points[u]=J.points[this.index]=null;"percent"===h?(f=f?e:
k,C&&r[f]&&r[f][v]?(f=r[f][v],J.total=f.total=Math.max(f.total,J.total)+Math.abs(B)||0):J.total=x(J.total+(Math.abs(B)||0))):J.total=x(J.total+(B||0));J.cumulative=y(J.cumulative,b)+(B||0);null!==B&&(J.points[u].push(J.cumulative),p[l]=J.cumulative)}"percent"===h&&(z.usePercentage=!0);this.stackedYData=p;z.oldStacks={}}};F.prototype.modifyStacks=function(){var c=this,m=c.stackKey,g=c.yAxis.stacks,q=c.processedXData,h,a=c.options.stacking;c[a+"Stacker"]&&[m,"-"+m].forEach(function(b){for(var d=q.length,
e,k;d--;)if(e=q[d],h=c.getStackIndicator(h,e,c.index,b),k=(e=g[b]&&g[b][e])&&e.points[h.key])c[a+"Stacker"](k,e,d)})};F.prototype.percentStacker=function(c,m,g){m=m.total?100/m.total:0;c[0]=x(c[0]*m);c[1]=x(c[1]*m);this.stackedYData[g]=c[1]};F.prototype.getStackIndicator=function(c,m,g,q){!I(c)||c.x!==m||q&&c.key!==q?c={x:m,index:0,key:q}:c.index++;c.key=[g,m,c.index].join();return c}});K(D,"parts/Dynamics.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.erase,
H=g.extend,y=g.isArray,w=g.isNumber,x=g.isObject,E=g.isString,F=g.objectEach,t=g.pick,m=g.setAnimation,p=g.splat,q=c.addEvent,h=c.animate,a=c.Axis;g=c.Chart;var b=c.createElement,d=c.css,e=c.fireEvent,k=c.merge,C=c.Point,z=c.Series,r=c.seriesTypes;c.cleanRecursively=function(a,b){var f={};F(a,function(d,l){if(x(a[l],!0)&&!a.nodeType&&b[l])d=c.cleanRecursively(a[l],b[l]),Object.keys(d).length&&(f[l]=d);else if(x(a[l])||a[l]!==b[l])f[l]=a[l]});return f};H(g.prototype,{addSeries:function(a,b,c){var f,
d=this;a&&(b=t(b,!0),e(d,"addSeries",{options:a},function(){f=d.initSeries(a);d.isDirtyLegend=!0;d.linkSeries();e(d,"afterAddSeries",{series:f});b&&d.redraw(c)}));return f},addAxis:function(a,b,d,c){return this.createAxis(b?"xAxis":"yAxis",{axis:a,redraw:d,animation:c})},addColorAxis:function(a,b,d){return this.createAxis("colorAxis",{axis:a,redraw:b,animation:d})},createAxis:function(b,f){var d=this.options,e="colorAxis"===b,n=f.redraw,h=f.animation;f=k(f.axis,{index:this[b].length,isX:"xAxis"===
b});var m=e?new c.ColorAxis(this,f):new a(this,f);d[b]=p(d[b]||{});d[b].push(f);e&&(this.isDirtyLegend=!0,this.axes.forEach(function(a){a.series=[]}),this.series.forEach(function(a){a.bindAxes();a.isDirtyData=!0}));t(n,!0)&&this.redraw(h);return m},showLoading:function(a){var f=this,c=f.options,e=f.loadingDiv,k=c.loading,n=function(){e&&d(e,{left:f.plotLeft+"px",top:f.plotTop+"px",width:f.plotWidth+"px",height:f.plotHeight+"px"})};e||(f.loadingDiv=e=b("div",{className:"highcharts-loading highcharts-loading-hidden"},
null,f.container),f.loadingSpan=b("span",{className:"highcharts-loading-inner"},null,e),q(f,"redraw",n));e.className="highcharts-loading";f.loadingSpan.innerHTML=t(a,c.lang.loading,"");f.styledMode||(d(e,H(k.style,{zIndex:10})),d(f.loadingSpan,k.labelStyle),f.loadingShown||(d(e,{opacity:0,display:""}),h(e,{opacity:k.style.opacity||.5},{duration:k.showDuration||0})));f.loadingShown=!0;n()},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&(b.className="highcharts-loading highcharts-loading-hidden",
this.styledMode||h(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){d(b,{display:"none"})}}));this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" "),
collectionsWithUpdate:"xAxis yAxis zAxis colorAxis series pane".split(" "),update:function(a,b,d,h){var f=this,l={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},n,m,g,r=a.isResponsiveOptions,v=[];e(f,"update",{options:a});r||f.setResponsive(!1,!0);a=c.cleanRecursively(a,f.options);k(!0,f.userOptions,a);if(n=a.chart){k(!0,f.options.chart,n);"className"in n&&f.setClassName(n.className);"reflow"in n&&f.setReflow(n.reflow);if("inverted"in n||"polar"in n||"type"in n){f.propFromSeries();
var C=!0}"alignTicks"in n&&(C=!0);F(n,function(a,b){-1!==f.propsRequireUpdateSeries.indexOf("chart."+b)&&(m=!0);-1!==f.propsRequireDirtyBox.indexOf(b)&&(f.isDirtyBox=!0);r||-1===f.propsRequireReflow.indexOf(b)||(g=!0)});!f.styledMode&&"style"in n&&f.renderer.setStyle(n.style)}!f.styledMode&&a.colors&&(this.options.colors=a.colors);a.plotOptions&&k(!0,this.options.plotOptions,a.plotOptions);a.time&&this.time===c.time&&(this.time=new c.Time(a.time));F(a,function(a,b){if(f[b]&&"function"===typeof f[b].update)f[b].update(a,
!1);else if("function"===typeof f[l[b]])f[l[b]](a);"chart"!==b&&-1!==f.propsRequireUpdateSeries.indexOf(b)&&(m=!0)});this.collectionsWithUpdate.forEach(function(b){if(a[b]){if("series"===b){var c=[];f[b].forEach(function(a,b){a.options.isInternal||c.push(t(a.options.index,b))})}p(a[b]).forEach(function(a,l){(l=I(a.id)&&f.get(a.id)||f[b][c?c[l]:l])&&l.coll===b&&(l.update(a,!1),d&&(l.touched=!0));!l&&d&&f.collectionsWithInit[b]&&(f.collectionsWithInit[b][0].apply(f,[a].concat(f.collectionsWithInit[b][1]||
[]).concat([!1])).touched=!0)});d&&f[b].forEach(function(a){a.touched||a.options.isInternal?delete a.touched:v.push(a)})}});v.forEach(function(a){a.remove&&a.remove(!1)});C&&f.axes.forEach(function(a){a.update({},!1)});m&&f.series.forEach(function(a){a.update({},!1)});a.loading&&k(!0,f.options.loading,a.loading);C=n&&n.width;n=n&&n.height;E(n)&&(n=c.relativeLength(n,C||f.chartWidth));g||w(C)&&C!==f.chartWidth||w(n)&&n!==f.chartHeight?f.setSize(C,n,h):t(b,!0)&&f.redraw(h);e(f,"afterUpdate",{options:a,
redraw:b,animation:h})},setSubtitle:function(a,b){this.applyDescription("subtitle",a);this.layOutTitles(b)},setCaption:function(a,b){this.applyDescription("caption",a);this.layOutTitles(b)}});g.prototype.collectionsWithInit={xAxis:[g.prototype.addAxis,[!0]],yAxis:[g.prototype.addAxis,[!1]],colorAxis:[g.prototype.addColorAxis,[!1]],series:[g.prototype.addSeries]};H(C.prototype,{update:function(a,b,d,c){function f(){l.applyOptions(a);null===l.y&&k&&(l.graphic=k.destroy());x(a,!0)&&(k&&k.element&&a&&
a.marker&&void 0!==a.marker.symbol&&(l.graphic=k.destroy()),a&&a.dataLabels&&l.dataLabel&&(l.dataLabel=l.dataLabel.destroy()),l.connector&&(l.connector=l.connector.destroy()));n=l.index;e.updateParallelArrays(l,n);m.data[n]=x(m.data[n],!0)||x(a,!0)?l.options:t(a,m.data[n]);e.isDirty=e.isDirtyData=!0;!e.fixedBox&&e.hasCartesianSeries&&(h.isDirtyBox=!0);"point"===m.legendType&&(h.isDirtyLegend=!0);b&&h.redraw(d)}var l=this,e=l.series,k=l.graphic,n,h=e.chart,m=e.options;b=t(b,!0);!1===c?f():l.firePointEvent("update",
{options:a},f)},remove:function(a,b){this.series.removePoint(this.series.data.indexOf(this),a,b)}});H(z.prototype,{addPoint:function(a,b,d,c,k){var f=this.options,l=this.data,n=this.chart,h=this.xAxis;h=h&&h.hasNames&&h.names;var m=f.data,g=this.xData,r;b=t(b,!0);var B={series:this};this.pointClass.prototype.applyOptions.apply(B,[a]);var v=B.x;var p=g.length;if(this.requireSorting&&v<g[p-1])for(r=!0;p&&g[p-1]>v;)p--;this.updateParallelArrays(B,"splice",p,0,0);this.updateParallelArrays(B,p);h&&B.name&&
(h[v]=B.name);m.splice(p,0,a);r&&(this.data.splice(p,0,null),this.processData());"point"===f.legendType&&this.generatePoints();d&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(B,"shift"),m.shift()));!1!==k&&e(this,"addPoint",{point:B});this.isDirtyData=this.isDirty=!0;b&&n.redraw(c)},removePoint:function(a,b,d){var f=this,c=f.data,l=c[a],e=f.points,k=f.chart,n=function(){e&&e.length===c.length&&e.splice(a,1);c.splice(a,1);f.options.data.splice(a,1);f.updateParallelArrays(l||
{series:f},"splice",a,1);l&&l.destroy();f.isDirty=!0;f.isDirtyData=!0;b&&k.redraw()};m(d,k);b=t(b,!0);l?l.firePointEvent("remove",null,n):n()},remove:function(a,b,d,c){function f(){l.destroy(c);l.remove=null;k.isDirtyLegend=k.isDirtyBox=!0;k.linkSeries();t(a,!0)&&k.redraw(b)}var l=this,k=l.chart;!1!==d?e(l,"remove",null,f):f()},update:function(a,b){a=c.cleanRecursively(a,this.userOptions);e(this,"update",{options:a});var f=this,d=f.chart,n=f.userOptions,h=f.initialType||f.type,m=a.type||n.type||d.options.chart.type,
g=!(this.hasDerivedData||a.dataGrouping||m&&m!==this.type||void 0!==a.pointStart||a.pointInterval||a.pointIntervalUnit||a.keys),p=r[h].prototype,C,q=["group","markerGroup","dataLabelsGroup","transformGroup"],z=["eventOptions","navigatorSeries","baseSeries"],x=f.finishedAnimating&&{animation:!1},w={};g&&(z.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","_hasPointMarkers","_hasPointLabels","mapMap","mapData","minY","maxY","minX","maxX"),!1!==a.visible&&z.push("area",
"graph"),f.parallelArrays.forEach(function(a){z.push(a+"Data")}),a.data&&this.setData(a.data,!1));a=k(n,x,{index:void 0===n.index?f.index:n.index,pointStart:t(n.pointStart,f.xData[0])},!g&&{data:f.options.data},a);g&&a.data&&(a.data=f.options.data);z=q.concat(z);z.forEach(function(a){z[a]=f[a];delete f[a]});f.remove(!1,null,!1,!0);for(C in p)f[C]=void 0;r[m||h]?H(f,r[m||h].prototype):c.error(17,!0,d,{missingModuleFor:m||h});z.forEach(function(a){f[a]=z[a]});f.init(d,a);if(g&&this.points){var E=f.options;
!1===E.visible?(w.graphic=1,w.dataLabel=1):f._hasPointLabels||(m=E.marker,p=E.dataLabels,m&&(!1===m.enabled||"symbol"in m)&&(w.graphic=1),p&&!1===p.enabled&&(w.dataLabel=1));this.points.forEach(function(a){a&&a.series&&(a.resolveColor(),Object.keys(w).length&&a.destroyElements(w),!1===E.showInLegend&&a.legendItem&&d.legend.destroyItem(a))},this)}a.zIndex!==n.zIndex&&q.forEach(function(b){f[b]&&f[b].attr({zIndex:a.zIndex})});f.initialType=h;d.linkSeries();e(this,"afterUpdate");t(b,!0)&&d.redraw(g?
void 0:!1)},setName:function(a){this.name=this.options.name=this.userOptions.name=a;this.chart.isDirtyLegend=!0}});H(a.prototype,{update:function(a,b){var f=this.chart,d=a&&a.events||{};a=k(this.userOptions,a);f.options[this.coll].indexOf&&(f.options[this.coll][f.options[this.coll].indexOf(this.userOptions)]=a);F(f.options[this.coll].events,function(a,b){"undefined"===typeof d[b]&&(d[b]=void 0)});this.destroy(!0);this.init(f,H(a,{events:d}));f.isDirtyBox=!0;t(b,!0)&&f.redraw()},remove:function(a){for(var b=
this.chart,d=this.coll,c=this.series,e=c.length;e--;)c[e]&&c[e].remove(!1);G(b.axes,this);G(b[d],this);y(b.options[d])?b.options[d].splice(this.options.index,1):delete b.options[d];b[d].forEach(function(a,b){a.options.index=a.userOptions.index=b});this.destroy();b.isDirtyBox=!0;t(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})});K(D,"parts/AreaSeries.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=
g.objectEach,G=g.pick,H=c.color,y=c.Series;g=c.seriesType;g("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(c){var g=[],w=[],y=this.xAxis,t=this.yAxis,m=t.stacks[this.stackKey],p={},q=this.index,h=t.series,a=h.length,b=G(t.options.reversedStacks,!0)?1:-1,d;c=c||this.points;if(this.options.stacking){for(d=0;d<c.length;d++)c[d].leftNull=c[d].rightNull=void 0,p[c[d].x]=c[d];I(m,function(a,b){null!==a.total&&w.push(b)});w.sort(function(a,b){return a-b});var e=h.map(function(a){return a.visible});
w.forEach(function(c,h){var k=0,r,n;if(p[c]&&!p[c].isNull)g.push(p[c]),[-1,1].forEach(function(f){var l=1===f?"rightNull":"leftNull",k=0,g=m[w[h+f]];if(g)for(d=q;0<=d&&d<a;)r=g.points[d],r||(d===q?p[c][l]=!0:e[d]&&(n=m[c].points[d])&&(k-=n[1]-n[0])),d+=b;p[c][1===f?"rightCliff":"leftCliff"]=k});else{for(d=q;0<=d&&d<a;){if(r=m[c].points[d]){k=r[1];break}d+=b}k=t.translate(k,0,1,0,1);g.push({isNull:!0,plotX:y.translate(c,0,0,0,1),x:c,plotY:k,yBottom:k})}})}return g},getGraphPath:function(c){var g=y.prototype.getGraphPath,
w=this.options,F=w.stacking,t=this.yAxis,m,p=[],q=[],h=this.index,a=t.stacks[this.stackKey],b=w.threshold,d=Math.round(t.getThreshold(w.threshold));w=G(w.connectNulls,"percent"===F);var e=function(e,k,f){var l=c[e];e=F&&a[l.x].points[h];var n=l[f+"Null"]||0;f=l[f+"Cliff"]||0;l=!0;if(f||n){var m=(n?e[0]:e[1])+f;var g=e[0]+f;l=!!n}else!F&&c[k]&&c[k].isNull&&(m=g=b);void 0!==m&&(q.push({plotX:C,plotY:null===m?d:t.getThreshold(m),isNull:l,isCliff:!0}),p.push({plotX:C,plotY:null===g?d:t.getThreshold(g),
doCurve:!1}))};c=c||this.points;F&&(c=this.getStackPoints(c));for(m=0;m<c.length;m++){F||(c[m].leftCliff=c[m].rightCliff=c[m].leftNull=c[m].rightNull=void 0);var k=c[m].isNull;var C=G(c[m].rectPlotX,c[m].plotX);var z=G(c[m].yBottom,d);if(!k||w)w||e(m,m-1,"left"),k&&!F&&w||(q.push(c[m]),p.push({x:m,plotX:C,plotY:z})),w||e(m,m+1,"right")}m=g.call(this,q,!0,!0);p.reversed=!0;k=g.call(this,p,!0,!0);k.length&&(k[0]="L");k=m.concat(k);g=g.call(this,q,!1,w);k.xMap=m.xMap;this.areaPath=k;return g},drawGraph:function(){this.areaPath=
[];y.prototype.drawGraph.apply(this);var c=this,g=this.areaPath,E=this.options,F=[["area","highcharts-area",this.color,E.fillColor]];this.zones.forEach(function(g,m){F.push(["zone-area-"+m,"highcharts-area highcharts-zone-area-"+m+" "+g.className,g.color||c.color,g.fillColor||E.fillColor])});F.forEach(function(t){var m=t[0],p=c[m],q=p?"animate":"attr",h={};p?(p.endX=c.preventGraphAnimation?null:g.xMap,p.animate({d:g})):(h.zIndex=0,p=c[m]=c.chart.renderer.path(g).addClass(t[1]).add(c.group),p.isArea=
!0);c.chart.styledMode||(h.fill=G(t[3],H(t[2]).setOpacity(G(E.fillOpacity,.75)).get()));p[q](h);p.startX=g.xMap;p.shiftUnit=E.step?2:1})},drawLegendSymbol:c.LegendSymbolMixin.drawRectangle});""});K(D,"parts/SplineSeries.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.pick;c=c.seriesType;c("spline","line",{},{getPointSpline:function(c,g,y){var w=g.plotX,x=g.plotY,E=c[y-1];y=c[y+1];if(E&&!E.isNull&&!1!==E.doCurve&&!g.isCliff&&y&&!y.isNull&&!1!==y.doCurve&&!g.isCliff){c=E.plotY;
var F=y.plotX;y=y.plotY;var t=0;var m=(1.5*w+E.plotX)/2.5;var p=(1.5*x+c)/2.5;F=(1.5*w+F)/2.5;var q=(1.5*x+y)/2.5;F!==m&&(t=(q-p)*(F-w)/(F-m)+x-q);p+=t;q+=t;p>c&&p>x?(p=Math.max(c,x),q=2*x-p):p<c&&p<x&&(p=Math.min(c,x),q=2*x-p);q>y&&q>x?(q=Math.max(y,x),p=2*x-q):q<y&&q<x&&(q=Math.min(y,x),p=2*x-q);g.rightContX=F;g.rightContY=q}g=["C",I(E.rightContX,E.plotX),I(E.rightContY,E.plotY),I(m,w),I(p,x),w,x];E.rightContX=E.rightContY=null;return g}});""});K(D,"parts/AreaSplineSeries.js",[D["parts/Globals.js"]],
function(c){var g=c.seriesTypes.area.prototype,I=c.seriesType;I("areaspline","spline",c.defaultPlotOptions.area,{getStackPoints:g.getStackPoints,getGraphPath:g.getGraphPath,drawGraph:g.drawGraph,drawLegendSymbol:c.LegendSymbolMixin.drawRectangle});""});K(D,"parts/ColumnSeries.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.extend,H=g.isNumber,y=g.pick,w=c.animObject,x=c.color,E=c.merge,F=c.Series;g=c.seriesType;var t=c.svg;g("column","line",{borderRadius:0,crisp:!0,
groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){F.prototype.init.apply(this,arguments);var c=this,g=c.chart;
g.hasRendered&&g.series.forEach(function(m){m.type===c.type&&(m.isDirty=!0)})},getColumnMetrics:function(){var c=this,g=c.options,q=c.xAxis,h=c.yAxis,a=q.options.reversedStacks;a=q.reversed&&!a||!q.reversed&&a;var b,d={},e=0;!1===g.grouping?e=1:c.chart.series.forEach(function(a){var k=a.yAxis,f=a.options;if(a.type===c.type&&(a.visible||!c.chart.options.chart.ignoreHiddenSeries)&&h.len===k.len&&h.pos===k.pos){if(f.stacking){b=a.stackKey;void 0===d[b]&&(d[b]=e++);var l=d[b]}else!1!==f.grouping&&(l=
e++);a.columnIndex=l}});var k=Math.min(Math.abs(q.transA)*(q.ordinalSlope||g.pointRange||q.closestPointRange||q.tickInterval||1),q.len),C=k*g.groupPadding,z=(k-2*C)/(e||1);g=Math.min(g.maxPointWidth||q.len,y(g.pointWidth,z*(1-2*g.pointPadding)));c.columnMetrics={width:g,offset:(z-g)/2+(C+((c.columnIndex||0)+(a?1:0))*z-k/2)*(a?-1:1)};return c.columnMetrics},crispCol:function(c,g,q,h){var a=this.chart,b=this.borderWidth,d=-(b%2?.5:0);b=b%2?.5:1;a.inverted&&a.renderer.isVML&&(b+=1);this.options.crisp&&
(q=Math.round(c+q)+d,c=Math.round(c)+d,q-=c);h=Math.round(g+h)+b;d=.5>=Math.abs(g)&&.5<h;g=Math.round(g)+b;h-=g;d&&h&&(--g,h+=1);return{x:c,y:g,width:q,height:h}},translate:function(){var c=this,g=c.chart,q=c.options,h=c.dense=2>c.closestPointRange*c.xAxis.transA;h=c.borderWidth=y(q.borderWidth,h?0:1);var a=c.yAxis,b=q.threshold,d=c.translatedThreshold=a.getThreshold(b),e=y(q.minPointLength,5),k=c.getColumnMetrics(),C=k.width,z=c.barW=Math.max(C,1+2*h),r=c.pointXOffset=k.offset,n=c.dataMin,f=c.dataMax;
g.inverted&&(d-=.5);q.pointPadding&&(z=Math.ceil(z));F.prototype.translate.apply(c);c.points.forEach(function(l){var k=y(l.yBottom,d),h=999+Math.abs(k),m=C;h=Math.min(Math.max(-h,l.plotY),a.len+h);var u=l.plotX+r,p=z,q=Math.min(h,k),t=Math.max(h,k)-q;if(e&&Math.abs(t)<e){t=e;var x=!a.reversed&&!l.negative||a.reversed&&l.negative;l.y===b&&c.dataMax<=b&&a.min<b&&n!==f&&(x=!x);q=Math.abs(q-d)>e?k-e:d-(x?e:0)}I(l.options.pointWidth)&&(m=p=Math.ceil(l.options.pointWidth),u-=Math.round((m-C)/2));l.barX=
u;l.pointWidth=m;l.tooltipPos=g.inverted?[a.len+a.pos-g.plotLeft-h,c.xAxis.len-u-p/2,t]:[u+p/2,h+a.pos-g.plotTop,t];l.shapeType=c.pointClass.prototype.shapeType||"rect";l.shapeArgs=c.crispCol.apply(c,l.isNull?[u,d,p,0]:[u,q,p,t])})},getSymbol:c.noop,drawLegendSymbol:c.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(c,g){var m=this.options,h=this.pointAttrToOptions||{};var a=h.stroke||"borderColor";
var b=h["stroke-width"]||"borderWidth",d=c&&c.color||this.color,e=c&&c[a]||m[a]||this.color||d,k=c&&c[b]||m[b]||this[b]||0;h=c&&c.options.dashStyle||m.dashStyle;var p=y(m.opacity,1);if(c&&this.zones.length){var z=c.getZone();d=c.options.color||z&&(z.color||c.nonZonedColor)||this.color;z&&(e=z.borderColor||e,h=z.dashStyle||h,k=z.borderWidth||k)}g&&(c=E(m.states[g],c.options.states&&c.options.states[g]||{}),g=c.brightness,d=c.color||void 0!==g&&x(d).brighten(c.brightness).get()||d,e=c[a]||e,k=c[b]||
k,h=c.dashStyle||h,p=y(c.opacity,p));a={fill:d,stroke:e,"stroke-width":k,opacity:p};h&&(a.dashstyle=h);return a},drawPoints:function(){var c=this,g=this.chart,q=c.options,h=g.renderer,a=q.animationLimit||250,b;c.points.forEach(function(d){var e=d.graphic,k=e&&g.pointCount<a?"animate":"attr";if(H(d.plotY)&&null!==d.y){b=d.shapeArgs;e&&d.hasNewShapeType()&&(e=e.destroy());if(e)e[k](E(b));else d.graphic=e=h[d.shapeType](b).add(d.group||c.group);if(q.borderRadius)e[k]({r:q.borderRadius});g.styledMode||
e[k](c.pointAttribs(d,d.selected&&"select")).shadow(!1!==d.allowShadow&&q.shadow,null,q.stacking&&!q.borderRadius);e.addClass(d.getClassName(),!0)}else e&&(d.graphic=e.destroy())})},animate:function(c){var g=this,m=this.yAxis,h=g.options,a=this.chart.inverted,b={},d=a?"translateX":"translateY";if(t)if(c)b.scaleY=.001,c=Math.min(m.pos+m.len,Math.max(m.pos,m.toPixels(h.threshold))),a?b.translateX=c-m.len:b.translateY=c,g.clipBox&&g.setClip(),g.group.attr(b);else{var e=g.group.attr(d);g.group.animate({scaleY:1},
G(w(g.options.animation),{step:function(a,c){b[d]=e+c.pos*(m.pos-e);g.group.attr(b)}}));g.animate=null}},remove:function(){var c=this,g=c.chart;g.hasRendered&&g.series.forEach(function(g){g.type===c.type&&(g.isDirty=!0)});F.prototype.remove.apply(c,arguments)}});""});K(D,"parts/BarSeries.js",[D["parts/Globals.js"]],function(c){c=c.seriesType;c("bar","column",null,{inverted:!0});""});K(D,"parts/ScatterSeries.js",[D["parts/Globals.js"]],function(c){var g=c.Series,I=c.seriesType;I("scatter","line",{lineWidth:0,
findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&g.prototype.drawGraph.call(this)},applyJitter:function(){var c=this,g=this.options.jitter,
y=this.points.length;g&&this.points.forEach(function(w,x){["x","y"].forEach(function(E,F){var t="plot"+E.toUpperCase();if(g[E]&&!w.isNull){var m=c[E+"Axis"];var p=g[E]*m.transA;if(m&&!m.isLog){var q=Math.max(0,w[t]-p);m=Math.min(m.len,w[t]+p);F=1E4*Math.sin(x+F*y);w[t]=q+(m-q)*(F-Math.floor(F));"x"===E&&(w.clientX=w.plotX)}}})})}});c.addEvent(g,"afterTranslate",function(){this.applyJitter&&this.applyJitter()});""});K(D,"mixins/centered-series.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,
g){var I=g.isNumber,G=g.pick,H=c.deg2rad,y=c.relativeLength;c.CenteredSeriesMixin={getCenter:function(){var c=this.options,g=this.chart,E=2*(c.slicedOffset||0),F=g.plotWidth-2*E;g=g.plotHeight-2*E;var t=c.center;t=[G(t[0],"50%"),G(t[1],"50%"),c.size||"100%",c.innerSize||0];var m=Math.min(F,g),p;for(p=0;4>p;++p){var q=t[p];c=2>p||2===p&&/%$/.test(q);t[p]=y(q,[F,g,m,t[2]][p])+(c?E:0)}t[3]>t[2]&&(t[3]=t[2]);return t},getStartAndEndRadians:function(c,g){c=I(c)?c:0;g=I(g)&&g>c&&360>g-c?g:c+360;return{start:H*
(c+-90),end:H*(g+-90)}}}});K(D,"parts/PieSeries.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.defined,G=g.isNumber,H=g.pick,y=g.setAnimation,w=c.addEvent;g=c.CenteredSeriesMixin;var x=g.getStartAndEndRadians,E=c.merge,F=c.noop,t=c.Point,m=c.Series,p=c.seriesType,q=c.fireEvent;p("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},
softConnector:!0,x:0,connectorShape:"fixedOffset",crookDistance:"70%"},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:c.seriesTypes.column.prototype.pointAttribs,
animate:function(c){var a=this,b=a.points,d=a.startAngleRad;c||(b.forEach(function(b){var c=b.graphic,e=b.shapeArgs;c&&(c.attr({r:b.startR||a.center[3]/2,start:d,end:d}),c.animate({r:e.r,start:e.start,end:e.end},a.options.animation))}),a.animate=null)},hasData:function(){return!!this.processedXData.length},updateTotals:function(){var c,a=0,b=this.points,d=b.length,e=this.options.ignoreHiddenPoint;for(c=0;c<d;c++){var k=b[c];a+=e&&!k.visible?0:k.isNull?0:k.y}this.total=a;for(c=0;c<d;c++)k=b[c],k.percentage=
0<a&&(k.visible||!e)?k.y/a*100:0,k.total=a},generatePoints:function(){m.prototype.generatePoints.call(this);this.updateTotals()},getX:function(c,a,b){var d=this.center,e=this.radii?this.radii[b.index]:d[2]/2;return d[0]+(a?-1:1)*Math.cos(Math.asin(Math.max(Math.min((c-d[1])/(e+b.labelDistance),1),-1)))*(e+b.labelDistance)+(0<b.labelDistance?(a?-1:1)*this.options.dataLabels.padding:0)},translate:function(h){this.generatePoints();var a=0,b=this.options,d=b.slicedOffset,e=d+(b.borderWidth||0),k=x(b.startAngle,
b.endAngle),g=this.startAngleRad=k.start;k=(this.endAngleRad=k.end)-g;var m=this.points,r=b.dataLabels.distance;b=b.ignoreHiddenPoint;var n,f=m.length;h||(this.center=h=this.getCenter());for(n=0;n<f;n++){var l=m[n];var v=g+a*k;if(!b||l.visible)a+=l.percentage/100;var B=g+a*k;l.shapeType="arc";l.shapeArgs={x:h[0],y:h[1],r:h[2]/2,innerR:h[3]/2,start:Math.round(1E3*v)/1E3,end:Math.round(1E3*B)/1E3};l.labelDistance=H(l.options.dataLabels&&l.options.dataLabels.distance,r);l.labelDistance=c.relativeLength(l.labelDistance,
l.shapeArgs.r);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,l.labelDistance);B=(B+v)/2;B>1.5*Math.PI?B-=2*Math.PI:B<-Math.PI/2&&(B+=2*Math.PI);l.slicedTranslation={translateX:Math.round(Math.cos(B)*d),translateY:Math.round(Math.sin(B)*d)};var A=Math.cos(B)*h[2]/2;var u=Math.sin(B)*h[2]/2;l.tooltipPos=[h[0]+.7*A,h[1]+.7*u];l.half=B<-Math.PI/2||B>Math.PI/2?1:0;l.angle=B;v=Math.min(e,l.labelDistance/5);l.labelPosition={natural:{x:h[0]+A+Math.cos(B)*l.labelDistance,y:h[1]+u+Math.sin(B)*l.labelDistance},
"final":{},alignment:0>l.labelDistance?"center":l.half?"right":"left",connectorPosition:{breakAt:{x:h[0]+A+Math.cos(B)*v,y:h[1]+u+Math.sin(B)*v},touchingSliceAt:{x:h[0]+A,y:h[1]+u}}}}q(this,"afterTranslate")},drawEmpty:function(){var c=this.options;if(0===this.total){var a=this.center[0];var b=this.center[1];this.graph||(this.graph=this.chart.renderer.circle(a,b,0).addClass("highcharts-graph").add(this.group));this.graph.animate({"stroke-width":c.borderWidth,cx:a,cy:b,r:this.center[2]/2,fill:c.fillColor||
"none",stroke:c.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())},redrawPoints:function(){var c=this,a=c.chart,b=a.renderer,d,e,k,g,m=c.options.shadow;this.drawEmpty();!m||c.shadowGroup||a.styledMode||(c.shadowGroup=b.g("shadow").attr({zIndex:-1}).add(c.group));c.points.forEach(function(h){var n={};e=h.graphic;if(!h.isNull&&e){g=h.shapeArgs;d=h.getTranslate();if(!a.styledMode){var f=h.shadowGroup;m&&!f&&(f=h.shadowGroup=b.g("shadow").add(c.shadowGroup));f&&f.attr(d);k=c.pointAttribs(h,
h.selected&&"select")}h.delayedRendering?(e.setRadialReference(c.center).attr(g).attr(d),a.styledMode||e.attr(k).attr({"stroke-linejoin":"round"}).shadow(m,f),h.delayedRendering=!1):(e.setRadialReference(c.center),a.styledMode||E(!0,n,k),E(!0,n,g,d),e.animate(n));e.attr({visibility:h.visible?"inherit":"hidden"});e.addClass(h.getClassName())}else e&&(h.graphic=e.destroy())})},drawPoints:function(){var c=this.chart.renderer;this.points.forEach(function(a){a.graphic||(a.graphic=c[a.shapeType](a.shapeArgs).add(a.series.group),
a.delayedRendering=!0)})},searchPoint:F,sortByAngle:function(c,a){c.sort(function(b,c){return void 0!==b.angle&&(c.angle-b.angle)*a})},drawLegendSymbol:c.LegendSymbolMixin.drawRectangle,getCenter:g.getCenter,getSymbol:F,drawGraph:null},{init:function(){t.prototype.init.apply(this,arguments);var c=this;c.name=H(c.name,"Slice");var a=function(a){c.slice("select"===a.type)};w(c,"select",a);w(c,"unselect",a);return c},isValid:function(){return G(this.y)&&0<=this.y},setVisible:function(c,a){var b=this,
d=b.series,e=d.chart,k=d.options.ignoreHiddenPoint;a=H(a,k);c!==b.visible&&(b.visible=b.options.visible=c=void 0===c?!b.visible:c,d.options.data[d.data.indexOf(b)]=b.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(a){if(b[a])b[a][c?"show":"hide"](!0)}),b.legendItem&&e.legend.colorizeItem(b,c),c||"hover"!==b.state||b.setState(""),k&&(d.isDirty=!0),a&&e.redraw())},slice:function(c,a,b){var d=this.series;y(b,d.chart);H(a,!0);this.sliced=this.options.sliced=I(c)?c:!this.sliced;
d.options.data[d.data.indexOf(this)]=this.options;this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(c){var a=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(a.x,a.y,a.r+c,a.r+c,{innerR:a.r-1,start:a.start,end:a.end})},connectorShapes:{fixedOffset:function(c,a,b){var d=a.breakAt;a=a.touchingSliceAt;
return["M",c.x,c.y].concat(b.softConnector?["C",c.x+("left"===c.alignment?-5:5),c.y,2*d.x-a.x,2*d.y-a.y,d.x,d.y]:["L",d.x,d.y]).concat(["L",a.x,a.y])},straight:function(c,a){a=a.touchingSliceAt;return["M",c.x,c.y,"L",a.x,a.y]},crookedLine:function(g,a,b){a=a.touchingSliceAt;var d=this.series,e=d.center[0],k=d.chart.plotWidth,h=d.chart.plotLeft;d=g.alignment;var m=this.shapeArgs.r;b=c.relativeLength(b.crookDistance,1);b="left"===d?e+m+(k+h-e-m)*(1-b):h+(e-m)*b;e=["L",b,g.y];if("left"===d?b>g.x||b<
a.x:b<g.x||b>a.x)e=[];return["M",g.x,g.y].concat(e).concat(["L",a.x,a.y])}},getConnectorPath:function(){var c=this.labelPosition,a=this.series.options.dataLabels,b=a.connectorShape,d=this.connectorShapes;d[b]&&(b=d[b]);return b.call(this,{x:c.final.x,y:c.final.y,alignment:c.alignment},c.connectorPosition,a)}});""});K(D,"parts/DataLabels.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var I=g.arrayMax,G=g.defined,H=g.extend,y=g.isArray,w=g.objectEach,x=g.pick,E=g.splat,F=c.format,
t=c.merge;g=c.noop;var m=c.relativeLength,p=c.Series,q=c.seriesTypes,h=c.stableSort;c.distribute=function(a,b,d){function e(a,b){return a.target-b.target}var k,g=!0,m=a,r=[];var n=0;var f=m.reducedLen||b;for(k=a.length;k--;)n+=a[k].size;if(n>f){h(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(n=k=0;n<=f;)n+=a[k].size,k++;r=a.splice(k-1,a.length)}h(a,e);for(a=a.map(function(a){return{size:a.size,targets:[a.target],align:x(a.align,.5)}});g;){for(k=a.length;k--;)g=a[k],n=(Math.min.apply(0,g.targets)+
Math.max.apply(0,g.targets))/2,g.pos=Math.min(Math.max(0,n-g.size*g.align),b-g.size);k=a.length;for(g=!1;k--;)0<k&&a[k-1].pos+a[k-1].size>a[k].pos&&(a[k-1].size+=a[k].size,a[k-1].targets=a[k-1].targets.concat(a[k].targets),a[k-1].align=.5,a[k-1].pos+a[k-1].size>b&&(a[k-1].pos=b-a[k-1].size),a.splice(k,1),g=!0)}m.push.apply(m,r);k=0;a.some(function(a){var f=0;if(a.targets.some(function(){m[k].pos=a.pos+f;if(Math.abs(m[k].pos-m[k].target)>d)return m.slice(0,k+1).forEach(function(a){delete a.pos}),m.reducedLen=
(m.reducedLen||b)-.1*b,m.reducedLen>.1*b&&c.distribute(m,b,d),!0;f+=m[k].size;k++}))return!0});h(m,e)};p.prototype.drawDataLabels=function(){function a(a,b){var c=b.filter;return c?(b=c.operator,a=a[c.property],c=c.value,">"===b&&a>c||"<"===b&&a<c||">="===b&&a>=c||"<="===b&&a<=c||"=="===b&&a==c||"==="===b&&a===c?!0:!1):!0}function b(a,b){var c=[],f;if(y(a)&&!y(b))c=a.map(function(a){return t(a,b)});else if(y(b)&&!y(a))c=b.map(function(b){return t(a,b)});else if(y(a)||y(b))for(f=Math.max(a.length,
b.length);f--;)c[f]=t(a[f],b[f]);else c=t(a,b);return c}var d=this,e=d.chart,k=d.options,g=k.dataLabels,h=d.points,m,n=d.hasRendered||0,f=c.animObject(k.animation).duration,l=Math.min(f,200),v=!e.renderer.forExport&&x(g.defer,0<l),B=e.renderer;g=b(b(e.options.plotOptions&&e.options.plotOptions.series&&e.options.plotOptions.series.dataLabels,e.options.plotOptions&&e.options.plotOptions[d.type]&&e.options.plotOptions[d.type].dataLabels),g);c.fireEvent(this,"drawDataLabels");if(y(g)||g.enabled||d._hasPointLabels){var A=
d.plotGroup("dataLabelsGroup","data-labels",v&&!n?"hidden":"inherit",g.zIndex||6);v&&(A.attr({opacity:+n}),n||setTimeout(function(){var a=d.dataLabelsGroup;a&&(d.visible&&A.show(!0),a[k.animation?"animate":"attr"]({opacity:1},{duration:l}))},f-l));h.forEach(function(c){m=E(b(g,c.dlOptions||c.options&&c.options.dataLabels));m.forEach(function(b,f){var l=b.enabled&&(!c.isNull||c.dataLabelOnNull)&&a(c,b),n=c.dataLabels?c.dataLabels[f]:c.dataLabel,g=c.connectors?c.connectors[f]:c.connector,h=x(b.distance,
c.labelDistance),m=!n;if(l){var r=c.getLabelConfig();var v=x(b[c.formatPrefix+"Format"],b.format);r=G(v)?F(v,r,e.time):(b[c.formatPrefix+"Formatter"]||b.formatter).call(r,b);v=b.style;var u=b.rotation;e.styledMode||(v.color=x(b.color,v.color,d.color,"#000000"),"contrast"===v.color&&(c.contrastColor=B.getContrast(c.color||d.color),v.color=!G(h)&&b.inside||0>h||k.stacking?c.contrastColor:"#000000"),k.cursor&&(v.cursor=k.cursor));var p={r:b.borderRadius||0,rotation:u,padding:b.padding,zIndex:1};e.styledMode||
(p.fill=b.backgroundColor,p.stroke=b.borderColor,p["stroke-width"]=b.borderWidth);w(p,function(a,b){void 0===a&&delete p[b]})}!n||l&&G(r)?l&&G(r)&&(n?p.text=r:(c.dataLabels=c.dataLabels||[],n=c.dataLabels[f]=u?B.text(r,0,-9999).addClass("highcharts-data-label"):B.label(r,0,-9999,b.shape,null,null,b.useHTML,null,"data-label"),f||(c.dataLabel=n),n.addClass(" highcharts-data-label-color-"+c.colorIndex+" "+(b.className||"")+(b.useHTML?" highcharts-tracker":""))),n.options=b,n.attr(p),e.styledMode||n.css(v).shadow(b.shadow),
n.added||n.add(A),b.textPath&&!b.useHTML&&n.setTextPath(c.getDataLabelPath&&c.getDataLabelPath(n)||c.graphic,b.textPath),d.alignDataLabel(c,n,b,null,m)):(c.dataLabel=c.dataLabel&&c.dataLabel.destroy(),c.dataLabels&&(1===c.dataLabels.length?delete c.dataLabels:delete c.dataLabels[f]),f||delete c.dataLabel,g&&(c.connector=c.connector.destroy(),c.connectors&&(1===c.connectors.length?delete c.connectors:delete c.connectors[f])))})})}c.fireEvent(this,"afterDrawDataLabels")};p.prototype.alignDataLabel=
function(a,b,c,e,k){var d=this.chart,g=this.isCartesian&&d.inverted,h=x(a.dlBox&&a.dlBox.centerX,a.plotX,-9999),n=x(a.plotY,-9999),f=b.getBBox(),l=c.rotation,m=c.align,B=this.visible&&(a.series.forceDL||d.isInsidePlot(h,Math.round(n),g)||e&&d.isInsidePlot(h,g?e.x+1:e.y+e.height-1,g)),A="justify"===x(c.overflow,"justify");if(B){var u=d.renderer.fontMetrics(d.styledMode?void 0:c.style.fontSize,b).b;e=H({x:g?this.yAxis.len-n:h,y:Math.round(g?this.xAxis.len-h:n),width:0,height:0},e);H(c,{width:f.width,
height:f.height});l?(A=!1,h=d.renderer.rotCorr(u,l),h={x:e.x+c.x+e.width/2+h.x,y:e.y+c.y+{top:0,middle:.5,bottom:1}[c.verticalAlign]*e.height},b[k?"attr":"animate"](h).attr({align:m}),n=(l+720)%360,n=180<n&&360>n,"left"===m?h.y-=n?f.height:0:"center"===m?(h.x-=f.width/2,h.y-=f.height/2):"right"===m&&(h.x-=f.width,h.y-=n?0:f.height),b.placed=!0,b.alignAttr=h):(b.align(c,null,e),h=b.alignAttr);A&&0<=e.height?this.justifyDataLabel(b,c,h,f,e,k):x(c.crop,!0)&&(B=d.isInsidePlot(h.x,h.y)&&d.isInsidePlot(h.x+
f.width,h.y+f.height));if(c.shape&&!l)b[k?"attr":"animate"]({anchorX:g?d.plotWidth-a.plotY:a.plotX,anchorY:g?d.plotHeight-a.plotX:a.plotY})}B||(b.hide(!0),b.placed=!1)};p.prototype.justifyDataLabel=function(a,b,c,e,k,g){var d=this.chart,h=b.align,n=b.verticalAlign,f=a.box?0:a.padding||0;var l=c.x+f;if(0>l){"right"===h?(b.align="left",b.inside=!0):b.x=-l;var m=!0}l=c.x+e.width-f;l>d.plotWidth&&("left"===h?(b.align="right",b.inside=!0):b.x=d.plotWidth-l,m=!0);l=c.y+f;0>l&&("bottom"===n?(b.verticalAlign=
"top",b.inside=!0):b.y=-l,m=!0);l=c.y+e.height-f;l>d.plotHeight&&("top"===n?(b.verticalAlign="bottom",b.inside=!0):b.y=d.plotHeight-l,m=!0);m&&(a.placed=!g,a.align(b,null,k));return m};q.pie&&(q.pie.prototype.dataLabelPositioners={radialDistributionY:function(a){return a.top+a.distributeBox.pos},radialDistributionX:function(a,b,c,e){return a.getX(c<b.top+2||c>b.bottom-2?e:c,b.half,b)},justify:function(a,b,c){return c[0]+(a.half?-1:1)*(b+a.labelDistance)},alignToPlotEdges:function(a,b,c,e){a=a.getBBox().width;
return b?a+e:c-a-e},alignToConnectors:function(a,b,c,e){var d=0,g;a.forEach(function(a){g=a.dataLabel.getBBox().width;g>d&&(d=g)});return b?d+e:c-d-e}},q.pie.prototype.drawDataLabels=function(){var a=this,b=a.data,d,e=a.chart,k=a.options.dataLabels,g=k.connectorPadding,h,m=e.plotWidth,n=e.plotHeight,f=e.plotLeft,l=Math.round(e.chartWidth/3),v,B=a.center,A=B[2]/2,u=B[1],q,w,E,y,F=[[],[]],H,D,O,K,S=[0,0,0,0],ca=a.dataLabelPositioners,X;a.visible&&(k.enabled||a._hasPointLabels)&&(b.forEach(function(a){a.dataLabel&&
a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),p.prototype.drawDataLabels.apply(a),b.forEach(function(a){a.dataLabel&&(a.visible?(F[a.half].push(a),a.dataLabel._pos=null,!G(k.style.width)&&!G(a.options.dataLabels&&a.options.dataLabels.style&&a.options.dataLabels.style.width)&&a.dataLabel.getBBox().width>l&&(a.dataLabel.css({width:.7*l}),a.dataLabel.shortened=!0)):(a.dataLabel=a.dataLabel.destroy(),a.dataLabels&&
1===a.dataLabels.length&&delete a.dataLabels))}),F.forEach(function(b,l){var h=b.length,r=[],v;if(h){a.sortByAngle(b,l-.5);if(0<a.maxLabelDistance){var p=Math.max(0,u-A-a.maxLabelDistance);var t=Math.min(u+A+a.maxLabelDistance,e.plotHeight);b.forEach(function(a){0<a.labelDistance&&a.dataLabel&&(a.top=Math.max(0,u-A-a.labelDistance),a.bottom=Math.min(u+A+a.labelDistance,e.plotHeight),v=a.dataLabel.getBBox().height||21,a.distributeBox={target:a.labelPosition.natural.y-a.top+v/2,size:v,rank:a.y},r.push(a.distributeBox))});
p=t+v-p;c.distribute(r,p,p/5)}for(K=0;K<h;K++){d=b[K];E=d.labelPosition;q=d.dataLabel;O=!1===d.visible?"hidden":"inherit";D=p=E.natural.y;r&&G(d.distributeBox)&&(void 0===d.distributeBox.pos?O="hidden":(y=d.distributeBox.size,D=ca.radialDistributionY(d)));delete d.positionIndex;if(k.justify)H=ca.justify(d,A,B);else switch(k.alignTo){case "connectors":H=ca.alignToConnectors(b,l,m,f);break;case "plotEdges":H=ca.alignToPlotEdges(q,l,m,f);break;default:H=ca.radialDistributionX(a,d,D,p)}q._attr={visibility:O,
align:E.alignment};q._pos={x:H+k.x+({left:g,right:-g}[E.alignment]||0),y:D+k.y-10};E.final.x=H;E.final.y=D;x(k.crop,!0)&&(w=q.getBBox().width,p=null,H-w<g&&1===l?(p=Math.round(w-H+g),S[3]=Math.max(p,S[3])):H+w>m-g&&0===l&&(p=Math.round(H+w-m+g),S[1]=Math.max(p,S[1])),0>D-y/2?S[0]=Math.max(Math.round(-D+y/2),S[0]):D+y/2>n&&(S[2]=Math.max(Math.round(D+y/2-n),S[2])),q.sideOverflow=p)}}}),0===I(S)||this.verifyDataLabelOverflow(S))&&(this.placeDataLabels(),this.points.forEach(function(b){X=t(k,b.options.dataLabels);
if(h=x(X.connectorWidth,1)){var c;v=b.connector;if((q=b.dataLabel)&&q._pos&&b.visible&&0<b.labelDistance){O=q._attr.visibility;if(c=!v)b.connector=v=e.renderer.path().addClass("highcharts-data-label-connector  highcharts-color-"+b.colorIndex+(b.className?" "+b.className:"")).add(a.dataLabelsGroup),e.styledMode||v.attr({"stroke-width":h,stroke:X.connectorColor||b.color||"#666666"});v[c?"attr":"animate"]({d:b.getConnectorPath()});v.attr("visibility",O)}else v&&(b.connector=v.destroy())}}))},q.pie.prototype.placeDataLabels=
function(){this.points.forEach(function(a){var b=a.dataLabel,c;b&&a.visible&&((c=b._pos)?(b.sideOverflow&&(b._attr.width=Math.max(b.getBBox().width-b.sideOverflow,0),b.css({width:b._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),b.shortened=!0),b.attr(b._attr),b[b.moved?"animate":"attr"](c),b.moved=!0):b&&b.attr({y:-9999}));delete a.distributeBox},this)},q.pie.prototype.alignDataLabel=g,q.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,
c=this.options,e=c.center,k=c.minSize||80,g=null!==c.size;if(!g){if(null!==e[0])var h=Math.max(b[2]-Math.max(a[1],a[3]),k);else h=Math.max(b[2]-a[1]-a[3],k),b[0]+=(a[3]-a[1])/2;null!==e[1]?h=Math.max(Math.min(h,b[2]-Math.max(a[0],a[2])),k):(h=Math.max(Math.min(h,b[2]-a[0]-a[2]),k),b[1]+=(a[0]-a[2])/2);h<b[2]?(b[2]=h,b[3]=Math.min(m(c.innerSize||0,h),h),this.translate(b),this.drawDataLabels&&this.drawDataLabels()):g=!0}return g});q.column&&(q.column.prototype.alignDataLabel=function(a,b,c,e,k){var d=
this.chart.inverted,g=a.series,h=a.dlBox||a.shapeArgs,n=x(a.below,a.plotY>x(this.translatedThreshold,g.yAxis.len)),f=x(c.inside,!!this.options.stacking);h&&(e=t(h),0>e.y&&(e.height+=e.y,e.y=0),h=e.y+e.height-g.yAxis.len,0<h&&(e.height-=h),d&&(e={x:g.yAxis.len-e.y-e.height,y:g.xAxis.len-e.x-e.width,width:e.height,height:e.width}),f||(d?(e.x+=n?0:e.width,e.width=0):(e.y+=n?e.height:0,e.height=0)));c.align=x(c.align,!d||f?"center":n?"right":"left");c.verticalAlign=x(c.verticalAlign,d||f?"middle":n?"top":
"bottom");p.prototype.alignDataLabel.call(this,a,b,c,e,k);c.inside&&a.contrastColor&&b.css({color:a.contrastColor})})});K(D,"modules/overlapping-datalabels.src.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var D=g.isArray,G=g.objectEach,H=g.pick;g=c.Chart;var y=c.addEvent,w=c.fireEvent;y(g,"render",function(){var c=[];(this.labelCollectors||[]).forEach(function(g){c=c.concat(g())});(this.yAxis||[]).forEach(function(g){g.options.stackLabels&&!g.options.stackLabels.allowOverlap&&
G(g.stacks,function(g){G(g,function(g){c.push(g.label)})})});(this.series||[]).forEach(function(g){var x=g.options.dataLabels;g.visible&&(!1!==x.enabled||g._hasPointLabels)&&g.points.forEach(function(g){g.visible&&(D(g.dataLabels)?g.dataLabels:g.dataLabel?[g.dataLabel]:[]).forEach(function(m){var p=m.options;m.labelrank=H(p.labelrank,g.labelrank,g.shapeArgs&&g.shapeArgs.height);p.allowOverlap||c.push(m)})})});this.hideOverlappingLabels(c)});g.prototype.hideOverlappingLabels=function(c){var g=this,
x=c.length,t=g.renderer,m,p,q;var h=function(a){var b=a.box?0:a.padding||0;var c=0;if(a&&(!a.alignAttr||a.placed)){var d=a.attr("x");var g=a.attr("y");d="number"===typeof d&&"number"===typeof g?{x:d,y:g}:a.alignAttr;g=a.parentGroup;a.width||(c=a.getBBox(),a.width=c.width,a.height=c.height,c=t.fontMetrics(null,a.element).h);return{x:d.x+(g.translateX||0)+b,y:d.y+(g.translateY||0)+b-c,width:a.width-2*b,height:a.height-2*b}}};for(p=0;p<x;p++)if(m=c[p])m.oldOpacity=m.opacity,m.newOpacity=1,m.absoluteBox=
h(m);c.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(p=0;p<x;p++){var a=(h=c[p])&&h.absoluteBox;for(m=p+1;m<x;++m){var b=(q=c[m])&&q.absoluteBox;!a||!b||h===q||0===h.newOpacity||0===q.newOpacity||b.x>a.x+a.width||b.x+b.width<a.x||b.y>a.y+a.height||b.y+b.height<a.y||((h.labelrank<q.labelrank?h:q).newOpacity=0)}}c.forEach(function(a){var b;if(a){var c=a.newOpacity;a.oldOpacity!==c&&(a.alignAttr&&a.placed?(c?a.show(!0):b=function(){a.hide(!0);a.placed=!1},a.alignAttr.opacity=c,a[a.isOld?
"animate":"attr"](a.alignAttr,null,b),w(g,"afterHideOverlappingLabels")):a.attr({opacity:c}));a.isOld=!0}})}});K(D,"parts/Interaction.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var D=g.defined,G=g.extend,H=g.isArray,y=g.isObject,w=g.objectEach,x=g.pick,E=c.addEvent;g=c.Chart;var F=c.createElement,t=c.css,m=c.defaultOptions,p=c.defaultPlotOptions,q=c.fireEvent,h=c.hasTouch,a=c.Legend,b=c.merge,d=c.Point,e=c.Series,k=c.seriesTypes,C=c.svg;var z=c.TrackerMixin={drawTrackerPoint:function(){var a=
this,b=a.chart,c=b.pointer,d=function(a){var b=c.getPointFromEvent(a);void 0!==b&&(c.isDirectTouch=!0,b.onMouseOver(a))},e;a.points.forEach(function(a){e=H(a.dataLabels)?a.dataLabels:a.dataLabel?[a.dataLabel]:[];a.graphic&&(a.graphic.element.point=a);e.forEach(function(b){b.div?b.div.point=a:b.element.point=a})});a._hasTracking||(a.trackerGroups.forEach(function(f){if(a[f]){a[f].addClass("highcharts-tracker").on("mouseover",d).on("mouseout",function(a){c.onTrackerMouseOut(a)});if(h)a[f].on("touchstart",
d);!b.styledMode&&a.options.cursor&&a[f].css(t).css({cursor:a.options.cursor})}}),a._hasTracking=!0);q(this,"afterDrawTracker")},drawTrackerGraph:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,k=a.chart,g=k.pointer,m=k.renderer,p=k.options.tooltip.snap,t=a.tracker,z,x=function(){if(k.hoverSeries!==a)a.onMouseOver()},w="rgba(192,192,192,"+(C?.0001:.002)+")";if(e&&!c)for(z=e+1;z--;)"M"===d[z]&&d.splice(z+1,0,d[z+1]-p,d[z+2],"L"),(z&&"M"===d[z]||z===
e)&&d.splice(z,0,"L",d[z-2]+p,d[z-1]);t?t.attr({d:d}):a.graph&&(a.tracker=m.path(d).attr({visibility:a.visible?"visible":"hidden",zIndex:2}).addClass(c?"highcharts-tracker-area":"highcharts-tracker-line").add(a.group),k.styledMode||a.tracker.attr({"stroke-linejoin":"round",stroke:w,fill:c?w:"none","stroke-width":a.graph.strokeWidth()+(c?0:2*p)}),[a.tracker,a.markerGroup].forEach(function(a){a.addClass("highcharts-tracker").on("mouseover",x).on("mouseout",function(a){g.onTrackerMouseOut(a)});b.cursor&&
!k.styledMode&&a.css({cursor:b.cursor});if(h)a.on("touchstart",x)}));q(this,"afterDrawTracker")}};k.column&&(k.column.prototype.drawTracker=z.drawTrackerPoint);k.pie&&(k.pie.prototype.drawTracker=z.drawTrackerPoint);k.scatter&&(k.scatter.prototype.drawTracker=z.drawTrackerPoint);G(a.prototype,{setItemEvents:function(a,c,f){var l=this,e=l.chart.renderer.boxWrapper,k=a instanceof d,n="highcharts-legend-"+(k?"point":"series")+"-active",g=l.chart.styledMode;(f?c:a.legendGroup).on("mouseover",function(){a.visible&&
l.allItems.forEach(function(b){a!==b&&b.setState("inactive",!k)});a.setState("hover");a.visible&&e.addClass(n);g||c.css(l.options.itemHoverStyle)}).on("mouseout",function(){l.chart.styledMode||c.css(b(a.visible?l.itemStyle:l.itemHiddenStyle));l.allItems.forEach(function(b){a!==b&&b.setState("",!k)});e.removeClass(n);a.setState()}).on("click",function(b){var c=function(){a.setVisible&&a.setVisible();l.allItems.forEach(function(b){a!==b&&b.setState(a.visible?"inactive":"",!k)})};e.removeClass(n);b=
{browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):q(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=F("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);E(a.checkbox,"click",function(b){q(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});G(g.prototype,{showResetZoom:function(){function a(){b.zoomOut()}
var b=this,c=m.lang,d=b.options.chart.resetZoomButton,e=d.theme,k=e.states,g="chart"===d.relativeTo||"spaceBox"===d.relativeTo?null:"plotBox";q(this,"beforeShowResetZoom",null,function(){b.resetZoomButton=b.renderer.button(c.resetZoom,null,null,a,e,k&&k.hover).attr({align:d.position.align,title:c.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(d.position,!1,g)});q(this,"afterShowResetZoom")},zoomOut:function(){q(this,"selection",{resetSelection:!0},this.zoom)},zoom:function(a){var b=
this,c,d=b.pointer,e=!1,k=b.inverted?d.mouseDownX:d.mouseDownY;!a||a.resetSelection?(b.axes.forEach(function(a){c=a.zoom()}),d.initiated=!1):a.xAxis.concat(a.yAxis).forEach(function(a){var f=a.axis,l=b.inverted?f.left:f.top,n=b.inverted?l+f.width:l+f.height,g=f.isXAxis,h=!1;if(!g&&k>=l&&k<=n||g||!D(k))h=!0;d[g?"zoomX":"zoomY"]&&h&&(c=f.zoom(a.min,a.max),f.displayBtn&&(e=!0))});var g=b.resetZoomButton;e&&!g?b.showResetZoom():!e&&y(g)&&(b.resetZoomButton=g.destroy());c&&b.redraw(x(b.options.chart.animation,
a&&a.animation,100>b.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,e;q(this,"pan",{originalEvent:a},function(){d&&d.forEach(function(a){a.setState()});("xy"===b?[1,0]:[1]).forEach(function(b){b=c[b?"xAxis":"yAxis"][0];var f=b.horiz,d=a[f?"chartX":"chartY"];f=f?"mouseDownX":"mouseDownY";var l=c[f],k=(b.pointRange||0)/2,n=b.reversed&&!c.inverted||!b.reversed&&c.inverted?-1:1,g=b.getExtremes(),h=b.toValue(l-d,!0)+k*n;n=b.toValue(l+b.len-d,!0)-k*n;var m=n<h;l=m?n:h;h=m?h:n;n=Math.min(g.dataMin,
k?g.min:b.toValue(b.toPixels(g.min)-b.minPixelPadding));k=Math.max(g.dataMax,k?g.max:b.toValue(b.toPixels(g.max)+b.minPixelPadding));m=n-l;0<m&&(h+=m,l=n);m=h-k;0<m&&(h=k,l-=m);b.series.length&&l!==g.min&&h!==g.max&&(b.setExtremes(l,h,!1,!1,{trigger:"pan"}),e=!0);c[f]=d});e&&c.redraw(!1);t(c.container,{cursor:"move"})})}});G(d.prototype,{select:function(a,b){var c=this,d=c.series,e=d.chart;this.selectedStaging=a=x(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=
c.options.selected=a;d.options.data[d.data.indexOf(c)]=c.options;c.setState(a&&"select");b||e.getSelectedPoints().forEach(function(a){var b=a.series;a.selected&&a!==c&&(a.selected=a.options.selected=!1,b.options.data[b.data.indexOf(a)]=a.options,a.setState(e.hoverPoints&&b.options.inactiveOtherPoints?"inactive":""),a.firePointEvent("unselect"))})});delete this.selectedStaging},onMouseOver:function(a){var b=this.series.chart,c=b.pointer;a=a?c.normalize(a):c.getChartCoordinatesFromPoint(this,b.inverted);
c.runPointActions(a,this)},onMouseOut:function(){var a=this.series.chart;this.firePointEvent("mouseOut");this.series.options.inactiveOtherPoints||(a.hoverPoints||[]).forEach(function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var a=this,d=b(a.series.options.point,a.options).events;a.events=d;w(d,function(b,d){c.isFunction(b)&&E(a,d,b)});this.hasImportedEvents=!0}},setState:function(a,b){var c=this.series,d=this.state,e=c.options.states[a||
"normal"]||{},k=p[c.type].marker&&c.options.marker,n=k&&!1===k.enabled,g=k&&k.states&&k.states[a||"normal"]||{},h=!1===g.enabled,m=c.stateMarkerGraphic,r=this.marker||{},t=c.chart,z=c.halo,C,w=k&&c.markerAttribs;a=a||"";if(!(a===this.state&&!b||this.selected&&"select"!==a||!1===e.enabled||a&&(h||n&&!1===g.enabled)||a&&r.states&&r.states[a]&&!1===r.states[a].enabled)){this.state=a;w&&(C=c.markerAttribs(this,a));if(this.graphic){d&&this.graphic.removeClass("highcharts-point-"+d);a&&this.graphic.addClass("highcharts-point-"+
a);if(!t.styledMode){var y=c.pointAttribs(this,a);var E=x(t.options.chart.animation,e.animation);c.options.inactiveOtherPoints&&((this.dataLabels||[]).forEach(function(a){a&&a.animate({opacity:y.opacity},E)}),this.connector&&this.connector.animate({opacity:y.opacity},E));this.graphic.animate(y,E)}C&&this.graphic.animate(C,x(t.options.chart.animation,g.animation,k.animation));m&&m.hide()}else{if(a&&g){d=r.symbol||c.symbol;m&&m.currentSymbol!==d&&(m=m.destroy());if(C)if(m)m[b?"animate":"attr"]({x:C.x,
y:C.y});else d&&(c.stateMarkerGraphic=m=t.renderer.symbol(d,C.x,C.y,C.width,C.height).add(c.markerGroup),m.currentSymbol=d);!t.styledMode&&m&&m.attr(c.pointAttribs(this,a))}m&&(m[a&&this.isInside?"show":"hide"](),m.element.point=this)}a=e.halo;e=(m=this.graphic||m)&&m.visibility||"inherit";a&&a.size&&m&&"hidden"!==e?(z||(c.halo=z=t.renderer.path().add(m.parentGroup)),z.show()[b?"animate":"attr"]({d:this.haloPath(a.size)}),z.attr({"class":"highcharts-halo highcharts-color-"+x(this.colorIndex,c.colorIndex)+
(this.className?" "+this.className:""),visibility:e,zIndex:-1}),z.point=this,t.styledMode||z.attr(G({fill:this.color||c.color,"fill-opacity":a.opacity},a.attributes))):z&&z.point&&z.point.haloPath&&z.animate({d:z.point.haloPath(0)},null,z.hide);q(this,"afterSetState")}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-a,this.plotY-a,2*a,2*a)}});G(e.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&
q(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&q(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();b.series.forEach(function(a){a.setState("",!0)})},setState:function(a,b){var c=this,d=c.options,e=c.graph,k=d.inactiveOtherPoints,g=d.states,n=d.lineWidth,h=d.opacity,m=x(g[a||"normal"]&&g[a||"normal"].animation,
c.chart.options.chart.animation);d=0;a=a||"";if(c.state!==a&&([c.group,c.markerGroup,c.dataLabelsGroup].forEach(function(b){b&&(c.state&&b.removeClass("highcharts-series-"+c.state),a&&b.addClass("highcharts-series-"+a))}),c.state=a,!c.chart.styledMode)){if(g[a]&&!1===g[a].enabled)return;a&&(n=g[a].lineWidth||n+(g[a].lineWidthPlus||0),h=x(g[a].opacity,h));if(e&&!e.dashstyle)for(g={"stroke-width":n},e.animate(g,m);c["zone-graph-"+d];)c["zone-graph-"+d].attr(g),d+=1;k||[c.group,c.markerGroup,c.dataLabelsGroup,
c.labelBySeries].forEach(function(a){a&&a.animate({opacity:h},m)})}b&&k&&c.points&&c.setAllPointsToState(a)},setAllPointsToState:function(a){this.points.forEach(function(b){b.setState&&b.setState(a)})},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,k=d.options.chart.ignoreHiddenSeries,g=c.visible;var n=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!g:a)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(function(a){if(c[a])c[a][n]()});if(d.hoverSeries===
c||(d.hoverPoint&&d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&d.series.forEach(function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});c.linkedSeries.forEach(function(b){b.setVisible(a,!1)});k&&(d.isDirtyBox=!0);q(c,n);!1!==b&&d.redraw()},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=this.options.selected=void 0===a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);
q(this,a?"select":"unselect")},drawTracker:z.drawTrackerGraph})});K(D,"parts/Responsive.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var D=g.isArray,G=g.isObject,H=g.objectEach,y=g.pick,w=g.splat;g=c.Chart;g.prototype.setResponsive=function(g,w){var x=this.options.responsive,t=[],m=this.currentResponsive;!w&&x&&x.rules&&x.rules.forEach(function(g){void 0===g._id&&(g._id=c.uniqueKey());this.matchResponsiveRule(g,t)},this);w=c.merge.apply(0,t.map(function(g){return c.find(x.rules,
function(c){return c._id===g}).chartOptions}));w.isResponsiveOptions=!0;t=t.toString()||void 0;t!==(m&&m.ruleIds)&&(m&&this.update(m.undoOptions,g,!0),t?(m=this.currentOptions(w),m.isResponsiveOptions=!0,this.currentResponsive={ruleIds:t,mergedOptions:w,undoOptions:m},this.update(w,g,!0)):this.currentResponsive=void 0)};g.prototype.matchResponsiveRule=function(c,g){var w=c.condition;(w.callback||function(){return this.chartWidth<=y(w.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=y(w.maxHeight,Number.MAX_VALUE)&&
this.chartWidth>=y(w.minWidth,0)&&this.chartHeight>=y(w.minHeight,0)}).call(this)&&g.push(c._id)};g.prototype.currentOptions=function(c){function g(c,p,q,h){var a;H(c,function(b,c){if(!h&&-1<x.collectionsWithUpdate.indexOf(c))for(b=w(b),q[c]=[],a=0;a<b.length;a++)p[c][a]&&(q[c][a]={},g(b[a],p[c][a],q[c][a],h+1));else G(b)?(q[c]=D(b)?[]:{},g(b,p[c]||{},q[c],h+1)):q[c]=void 0===p[c]?null:p[c]})}var x=this,t={};g(c,this.options,t,0);return t}});K(D,"masters/highcharts.src.js",[D["parts/Globals.js"],
D["parts/Utilities.js"]],function(c,g){var D=g.extend;D(c,{arrayMax:g.arrayMax,arrayMin:g.arrayMin,attr:g.attr,defined:g.defined,erase:g.erase,extend:g.extend,isArray:g.isArray,isClass:g.isClass,isDOMElement:g.isDOMElement,isNumber:g.isNumber,isObject:g.isObject,isString:g.isString,objectEach:g.objectEach,pick:g.pick,pInt:g.pInt,setAnimation:g.setAnimation,splat:g.splat,syncTimeout:g.syncTimeout});return c});K(D,"parts/Scrollbar.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){function D(a,
b,c){this.init(a,b,c)}var G=g.defined,H=g.destroyObjectProperties,y=g.pick,w=c.addEvent;g=c.Axis;var x=c.correctFloat,E=c.defaultOptions,F=c.fireEvent,t=c.hasTouch,m=c.merge,p=c.removeEvent,q,h={height:c.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",
trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};E.scrollbar=m(!0,h,E.scrollbar);c.swapXY=q=function(a,b){var c=a.length;if(b)for(b=0;b<c;b+=3){var e=a[b+1];a[b+1]=a[b+2];a[b+2]=e}return a};D.prototype={init:function(a,b,c){this.scrollbarButtons=[];this.renderer=a;this.userOptions=b;this.options=m(h,b);this.chart=c;this.size=y(this.options.size,this.options.height);b.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,b=this.options,
c=this.size,e=this.chart.styledMode,k;this.group=k=a.g("scrollbar").attr({zIndex:b.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:b.trackBorderRadius||0,height:c,width:c}).add(k);e||this.track.attr({fill:b.trackBackgroundColor,stroke:b.trackBorderColor,"stroke-width":b.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(k);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:c,
width:c,r:b.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(q(["M",-3,c/4,"L",-3,2*c/3,"M",0,c/4,"L",0,2*c/3,"M",3,c/4,"L",3,2*c/3],b.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);e||(this.scrollbar.attr({fill:b.barBackgroundColor,stroke:b.barBorderColor,"stroke-width":b.barBorderWidth}),this.scrollbarRifles.attr({stroke:b.rifleColor,"stroke-width":1}));this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%
2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)},position:function(a,b,c,e){var d=this.options.vertical,g=0,h=this.rendered?"animate":"attr";this.x=a;this.y=b+this.trackBorderWidth;this.width=c;this.xOffset=this.height=e;this.yOffset=g;d?(this.width=this.yOffset=c=g=this.size,this.xOffset=b=0,this.barWidth=e-2*c,this.x=a+=this.options.margin):(this.height=this.xOffset=e=b=this.size,this.barWidth=c-2*e,this.y+=this.options.margin);this.group[h]({translateX:a,
translateY:this.y});this.track[h]({width:c,height:e});this.scrollbarButtons[1][h]({translateX:d?0:c-b,translateY:d?e-g:0})},drawScrollbarButton:function(a){var b=this.renderer,c=this.scrollbarButtons,e=this.options,k=this.size;var g=b.g().add(this.group);c.push(g);g=b.rect().addClass("highcharts-scrollbar-button").add(g);this.chart.styledMode||g.attr({stroke:e.buttonBorderColor,"stroke-width":e.buttonBorderWidth,fill:e.buttonBackgroundColor});g.attr(g.crisp({x:-.5,y:-.5,width:k+1,height:k+1,r:e.buttonBorderRadius},
g.strokeWidth()));g=b.path(q(["M",k/2+(a?-1:1),k/2-3,"L",k/2+(a?-1:1),k/2+3,"L",k/2+(a?2:-2),k/2],e.vertical)).addClass("highcharts-scrollbar-arrow").add(c[a]);this.chart.styledMode||g.attr({fill:e.buttonArrowColor})},setRange:function(a,b){var c=this.options,e=c.vertical,k=c.minWidth,g=this.barWidth,h,m=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(G(g)){a=Math.max(a,0);var n=Math.ceil(g*a);this.calculatedWidth=h=x(g*Math.min(b,1)-n);h<
k&&(n=(g-k+h)*a,h=k);k=Math.floor(n+this.xOffset+this.yOffset);g=h/2-.5;this.from=a;this.to=b;e?(this.scrollbarGroup[m]({translateY:k}),this.scrollbar[m]({height:h}),this.scrollbarRifles[m]({translateY:g}),this.scrollbarTop=k,this.scrollbarLeft=0):(this.scrollbarGroup[m]({translateX:k}),this.scrollbar[m]({width:h}),this.scrollbarRifles[m]({translateX:g}),this.scrollbarLeft=k,this.scrollbarTop=0);12>=h?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),e=a.options.vertical?"chartY":"chartX",k=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][e]||(c=a.cursorToScrollbarPosition(c)[e],e=a[e],e=c-e,a.hasDragged=!0,a.updatePosition(k[0]+e,k[1]+e),a.hasDragged&&F(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&F(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=x(a.to-a.from)*a.options.step;a.updatePosition(x(a.from-c),x(a.to-c));F(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);F(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.trackClick=function(b){var c=a.chart.pointer.normalize(b),e=a.to-a.from,k=a.y+a.scrollbarTop,g=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>k||!a.options.vertical&&c.chartX>g?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-e,a.to-e);F(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){1<b&&(a=x(1-x(b-a)),b=1);0>a&&(b=x(b-a),a=0);this.from=a;this.to=b},update:function(a){this.destroy();this.init(this.chart.renderer,m(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,c=this.scrollbarGroup.element,e=this.mouseDownHandler,
k=this.mouseMoveHandler,g=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",e],[c.ownerDocument,"mousemove",k],[c.ownerDocument,"mouseup",g]];t&&a.push([c,"touchstart",e],[c.ownerDocument,"touchmove",k],[c.ownerDocument,"touchend",g]);a.forEach(function(a){w.apply(null,a)});this._events=a},removeEvents:function(){this._events.forEach(function(a){p.apply(null,a)});this._events.length=
0},destroy:function(){var a=this.chart.scroller;this.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,H(a.scrollbarButtons))}};c.Scrollbar||(w(g,"afterInit",function(){var a=this;a.options&&a.options.scrollbar&&a.options.scrollbar.enabled&&(a.options.scrollbar.vertical=!a.horiz,a.options.startOnTick=a.options.endOnTick=!1,a.scrollbar=new D(a.chart.renderer,
a.options.scrollbar,a.chart),w(a.scrollbar,"changed",function(b){var d=Math.min(y(a.options.min,a.min),a.min,a.dataMin),e=Math.max(y(a.options.max,a.max),a.max,a.dataMax)-d;if(a.horiz&&!a.reversed||!a.horiz&&a.reversed){var k=d+e*this.to;d+=e*this.from}else k=d+e*(1-this.from),d+=e*(1-this.to);y(this.options.liveRedraw,c.svg&&!c.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===b.DOMType||!G(b.DOMType)?a.setExtremes(d,k,!0,"mousemove"!==b.DOMType,b):this.setRange(this.from,this.to)}))}),w(g,"afterRender",
function(){var a=Math.min(y(this.options.min,this.min),this.min,y(this.dataMin,this.min)),b=Math.max(y(this.options.max,this.max),this.max,y(this.dataMax,this.max)),c=this.scrollbar,e=this.axisTitleMargin+(this.titleOffset||0),k=this.chart.scrollbarsOffsets,g=this.options.margin||0;c&&(this.horiz?(this.opposite||(k[1]+=e),c.position(this.left,this.top+this.height+2+k[1]-(this.opposite?g:0),this.width,this.height),this.opposite||(k[1]+=g),e=1):(this.opposite&&(k[0]+=e),c.position(this.left+this.width+
2+k[0]-(this.opposite?0:g),this.top,this.width,this.height),this.opposite&&(k[0]+=g),e=0),k[e]+=c.size+c.options.margin,isNaN(a)||isNaN(b)||!G(this.min)||!G(this.max)||this.min===this.max?c.setRange(0,1):(k=(this.min-a)/(b-a),a=(this.max-a)/(b-a),this.horiz&&!this.reversed||!this.horiz&&this.reversed?c.setRange(k,a):c.setRange(1-a,1-k)))}),w(g,"afterGetOffset",function(){var a=this.horiz?2:1,b=this.scrollbar;b&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[a]+=b.size+b.options.margin)}),
c.Scrollbar=D)});K(D,"parts/Navigator.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){function D(a){this.init(a)}var G=g.defined,H=g.destroyObjectProperties,y=g.erase,w=g.extend,x=g.isArray,E=g.isNumber,F=g.pick,t=g.splat,m=c.addEvent,p=c.Axis;g=c.Chart;var q=c.color,h=c.defaultOptions,a=c.hasTouch,b=c.isTouchDevice,d=c.merge,e=c.removeEvent,k=c.Scrollbar,C=c.Series,z=function(a){for(var b=[],c=1;c<arguments.length;c++)b[c-1]=arguments[c];b=[].filter.call(b,E);if(b.length)return Math[a].apply(0,
b)};var r=void 0===c.seriesTypes.areaspline?"line":"areaspline";w(h,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:q("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:r,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:[["millisecond",[1,
2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",
style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});c.Renderer.prototype.symbols["navigator-handle"]=function(a,b,c,d,e){a=e.width/2;b=Math.round(a/3)+.5;e=e.height;return["M",-a-1,.5,"L",a,.5,"L",a,e+.5,"L",-a-1,e+.5,"L",-a-1,.5,"M",-b,4,"L",-b,e-3,"M",b-1,4,"L",b-1,e-3]};p.prototype.toFixedRange=function(a,
b,d,e){var f=this.chart&&this.chart.fixedRange,l=(this.pointRange||0)/2;a=F(d,this.translate(a,!0,!this.horiz));b=F(e,this.translate(b,!0,!this.horiz));var k=f&&(b-a)/f;G(d)||(a=c.correctFloat(a+l));G(e)||(b=c.correctFloat(b-l));.7<k&&1.3>k&&(e?a=b-f:b=a+f);E(a)&&E(b)||(a=b=void 0);return{min:a,max:b}};D.prototype={drawHandle:function(a,b,c,d){var f=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-f)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-f/2-1)})},drawOutline:function(a,b,c,d){var f=this.navigatorOptions.maskInside,l=this.outline.strokeWidth(),e=l/2;l=l%2/2;var k=this.outlineHeight,g=this.scrollbarHeight,n=this.size,h=this.left-g,m=this.top;c?(h-=e,c=m+b+l,b=m+a+l,a=["M",h+k,m-g-l,"L",h+k,c,"L",h,c,"L",h,b,"L",h+k,b,"L",h+k,m+n+g].concat(f?["M",h+k,c-e,"L",h+k,b+e]:[])):(a+=h+g-l,b+=h+g-l,m+=e,a=["M",h,m,"L",a,m,"L",a,m+k,"L",b,m+
k,"L",b,m,"L",h+n+2*g,m].concat(f?["M",a-e,m,"L",b+e,m]:[]));this.outline[d]({d:a})},drawMasks:function(a,b,c,d){var f=this.left,l=this.top,e=this.height;if(c){var k=[f,f,f];var g=[l,l+a,l+b];var n=[e,e,e];var h=[a,b-a,this.size-b]}else k=[f,f+a,f+b],g=[l,l,l],n=[a,b-a,this.size-b],h=[e,e,e];this.shades.forEach(function(a,b){a[d]({x:k[b],y:g[b],width:n[b],height:h[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,d=a.chart,e=d.renderer,k,g={cursor:d.inverted?"ns-resize":
"ew-resize"};a.navigatorGroup=k=e.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();[!c,c,!c].forEach(function(c,f){a.shades[f]=e.rect().addClass("highcharts-navigator-mask"+(1===f?"-inside":"-outside")).add(k);d.styledMode||a.shades[f].attr({fill:c?b.maskFill:"rgba(0,0,0,0)"}).css(1===f&&g)});a.outline=e.path().addClass("highcharts-navigator-outline").add(k);d.styledMode||a.outline.attr({"stroke-width":b.outlineWidth,stroke:b.outlineColor});b.handles.enabled&&[0,1].forEach(function(c){b.handles.inverted=
d.inverted;a.handles[c]=e.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(k);if(!d.styledMode){var f=b.handles;a.handles[c].attr({fill:f.backgroundColor,stroke:f.borderColor,"stroke-width":f.lineWidth}).css(g)}})},update:function(a){(this.series||[]).forEach(function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries});this.destroy();
d(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,b,d,e){var f=this.chart,l=this.scrollbarHeight,k,g=this.xAxis,h=g.pointRange||0;var n=g.fake?f.xAxis[0]:g;var m=this.navigatorEnabled,r,v=this.rendered;var p=f.inverted;var q=f.xAxis[0].minRange,t=f.xAxis[0].options.maxRange;if(!this.hasDragged||G(d)){a=c.correctFloat(a-h/2);b=c.correctFloat(b+h/2);if(!E(a)||!E(b))if(v)d=0,e=F(g.width,n.width);else return;this.left=F(g.left,f.plotLeft+l+(p?f.plotWidth:0));this.size=
r=k=F(g.len,(p?f.plotHeight:f.plotWidth)-2*l);f=p?l:k+2*l;d=F(d,g.toPixels(a,!0));e=F(e,g.toPixels(b,!0));E(d)&&Infinity!==Math.abs(d)||(d=0,e=f);a=g.toValue(d,!0);b=g.toValue(e,!0);var z=Math.abs(c.correctFloat(b-a));c.correctFloat(z-h)<q?this.grabbedLeft?d=g.toPixels(b-q-h,!0):this.grabbedRight&&(e=g.toPixels(a+q+h,!0)):G(t)&&c.correctFloat(z-h)>t&&(this.grabbedLeft?d=g.toPixels(b-t-h,!0):this.grabbedRight&&(e=g.toPixels(a+t+h,!0)));this.zoomedMax=Math.min(Math.max(d,e,0),r);this.zoomedMin=Math.min(Math.max(this.fixedWidth?
this.zoomedMax-this.fixedWidth:Math.min(d,e),0),r);this.range=this.zoomedMax-this.zoomedMin;r=Math.round(this.zoomedMax);d=Math.round(this.zoomedMin);m&&(this.navigatorGroup.attr({visibility:"visible"}),v=v&&!this.hasDragged?"animate":"attr",this.drawMasks(d,r,p,v),this.drawOutline(d,r,p,v),this.navigatorOptions.handles.enabled&&(this.drawHandle(d,0,p,v),this.drawHandle(r,1,p,v)));this.scrollbar&&(p?(p=this.top-l,n=this.left-l+(m||!n.opposite?0:(n.titleOffset||0)+n.axisTitleMargin),l=k+2*l):(p=this.top+
(m?this.height:-l),n=this.left-l),this.scrollbar.position(n,p,f,l),this.scrollbar.setRange(this.zoomedMin/(k||1),this.zoomedMax/(k||1)));this.rendered=!0}},addMouseEvents:function(){var b=this,c=b.chart,d=c.container,e=[],k,g;b.mouseMoveHandler=k=function(a){b.onMouseMove(a)};b.mouseUpHandler=g=function(a){b.onMouseUp(a)};e=b.getPartsEvents("mousedown");e.push(m(c.renderTo,"mousemove",k),m(d.ownerDocument,"mouseup",g));a&&(e.push(m(c.renderTo,"touchmove",k),m(d.ownerDocument,"touchend",g)),e.concat(b.getPartsEvents("touchstart")));
b.eventsToUnbind=e;b.series&&b.series[0]&&e.push(m(b.series[0].xAxis,"foundExtremes",function(){c.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,c=[];["shades","handles"].forEach(function(d){b[d].forEach(function(f,l){c.push(m(f.element,a,function(a){b[d+"Mousedown"](a,l)}))})});return c},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var c=this.chart,d=this.xAxis,f=this.zoomedMin,e=this.left,k=this.size,g=this.range,h=a.chartX;c.inverted&&(h=a.chartY,
e=this.top);if(1===b)this.grabbedCenter=h,this.fixedWidth=g,this.dragOffset=h-f;else{a=h-e-g/2;if(0===b)a=Math.max(0,a);else if(2===b&&a+g>=k)if(a=k-g,this.reversedExtremes){a-=g;var n=this.getUnionExtremes().dataMin}else var m=this.getUnionExtremes().dataMax;a!==f&&(this.fixedWidth=g,b=d.toFixedRange(a,a+g,n,m),G(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],d=this.reversedExtremes;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=d?c.min:c.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=d?c.max:c.min);a.fixedRange=null},onMouseMove:function(a){var d=this,e=d.chart,k=d.left,g=d.navigatorSize,h=d.range,m=d.dragOffset,n=e.inverted;a.touches&&0===a.touches[0].pageX||(a=e.pointer.normalize(a),e=a.chartX,n&&(k=d.top,e=a.chartY),d.grabbedLeft?(d.hasDragged=!0,d.render(0,0,e-k,d.otherHandlePos)):
d.grabbedRight?(d.hasDragged=!0,d.render(0,0,d.otherHandlePos,e-k)):d.grabbedCenter&&(d.hasDragged=!0,e<m?e=m:e>g+m-h&&(e=g+m-h),d.render(0,0,e-m,e-m+h)),d.hasDragged&&d.scrollbar&&F(d.scrollbar.options.liveRedraw,c.svg&&!b&&!this.chart.isBoosting)&&(a.DOMType=a.type,setTimeout(function(){d.onMouseUp(a)},0)))},onMouseUp:function(a){var b=this.chart,c=this.xAxis,d=this.scrollbar,e=a.DOMEvent||a;if(this.hasDragged&&(!d||!d.hasDragged)||"scrollbar"===a.trigger){d=this.getUnionExtremes();if(this.zoomedMin===
this.otherHandlePos)var k=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var g=this.fixedExtreme;this.zoomedMax===this.size&&(g=this.reversedExtremes?d.dataMin:d.dataMax);0===this.zoomedMin&&(k=this.reversedExtremes?d.dataMax:d.dataMin);c=c.toFixedRange(this.zoomedMin,this.zoomedMax,k,g);G(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:e})}"mousemove"!==a.DOMType&&"touchmove"!==
a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&a.forEach(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,g=b.scrollbar,h=g.enabled;b=e?c.height:0;var n=h?g.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=n;this.scrollbarEnabled=h;this.navigatorEnabled=e;this.navigatorOptions=c;this.scrollbarOptions=g;this.outlineHeight=b+n;this.opposite=F(c.opposite,!(e||!a.inverted));var r=this;e=r.baseSeries;g=a.xAxis.length;
h=a.yAxis.length;var q=e&&e[0]&&e[0].xAxis||a.xAxis[0]||{options:{}};a.isDirtyBox=!0;r.navigatorEnabled?(r.xAxis=new p(a,d({breaks:q.options.breaks,ordinal:q.options.ordinal},c.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:g,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[n,0,-n,0],width:b}:{offsets:[0,-n,0,n],height:b})),r.yAxis=new p(a,d(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,
offset:0,index:h,isInternal:!0,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),e||c.series.data?r.updateNavigatorSeries(!1):0===a.series.length&&(r.unbindRedraw=m(a,"beforeRedraw",function(){0<a.series.length&&!r.series&&(r.setBaseSeries(),r.unbindRedraw())})),r.reversedExtremes=a.inverted&&!r.xAxis.reversed||!a.inverted&&r.xAxis.reversed,r.renderElements(),r.addMouseEvents()):r.xAxis={translate:function(b,c){var d=a.xAxis[0],f=d.getExtremes(),e=d.len-2*n,l=z("min",d.options.min,f.dataMin);d=z("max",
d.options.max,f.dataMax)-l;return c?b*d/e+l:e*(b-l)/d},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:p.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=r.scrollbar=new k(a.renderer,d(a.options.scrollbar,{margin:r.navigatorEnabled?0:10,vertical:a.inverted}),a),m(r.scrollbar,"changed",function(b){var c=r.size,d=c*this.to;c*=this.from;r.hasDragged=r.scrollbar.hasDragged;r.render(0,0,c,d);(a.options.scrollbar.liveRedraw||
"mousemove"!==b.DOMType&&"touchmove"!==b.DOMType)&&setTimeout(function(){r.onMouseUp(b)})}));r.addBaseSeriesEvents();r.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],c=this.xAxis,d=c.options,e=b.options,k;a&&null===b.dataMin||(k={dataMin:F(d&&d.min,z("min",e.min,b.dataMin,c.dataMin,c.min)),dataMax:F(d&&d.max,z("max",e.max,b.dataMax,c.dataMax,c.max))});return k},setBaseSeries:function(a,b){var d=this.chart,f=this.baseSeries=[];a=a||d.options&&d.options.navigator.baseSeries||
(d.series.length?c.find(d.series,function(a){return!a.options.isInternal}).index:0);(d.series||[]).forEach(function(b,c){b.options.isInternal||!b.options.showInNavigator&&(c!==a&&b.options.id!==a||!1===b.options.showInNavigator)||f.push(b)});this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(!0,b)},updateNavigatorSeries:function(a,b){var c=this,f=c.chart,k=c.baseSeries,g,m,n=c.navigatorOptions.series,r,p={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",
yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,states:{inactive:{opacity:1}}},q=c.series=(c.series||[]).filter(function(a){var b=a.baseSeries;return 0>k.indexOf(b)?(b&&(e(b,"updatedData",c.updatedDataHandler),delete b.navigatorSeries),a.chart&&a.destroy(),!1):!0});k&&k.length&&k.forEach(function(a){var e=a.navigatorSeries,l=w({color:a.color,visible:a.visible},x(n)?h.navigator.series:n);e&&!1===c.navigatorOptions.adaptToUpdatedData||(p.name="Navigator "+k.length,g=a.options||{},
r=g.navigatorOptions||{},m=d(g,p,l,r),m.pointRange=F(l.pointRange,r.pointRange,h.plotOptions[m.type||"line"].pointRange),l=r.data||l.data,c.hasNavigatorData=c.hasNavigatorData||!!l,m.data=l||g.data&&g.data.slice(0),e&&e.options?e.update(m,b):(a.navigatorSeries=f.initSeries(m),a.navigatorSeries.baseSeries=a,q.push(a.navigatorSeries)))});if(n.data&&(!k||!k.length)||x(n))c.hasNavigatorData=!1,n=t(n),n.forEach(function(a,b){p.name="Navigator "+(q.length+1);m=d(h.navigator.series,{color:f.series[b]&&!f.series[b].options.isInternal&&
f.series[b].color||f.options.colors[b]||f.options.colors[0]},p,a);m.data=a.data;m.data&&(c.hasNavigatorData=!0,q.push(f.initSeries(m)))});a&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&m(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);b.forEach(function(b){m(b,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});m(b,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)});!1!==
this.navigatorOptions.adaptToUpdatedData&&b.xAxis&&m(b,"updatedData",this.updatedDataHandler);m(b,"remove",function(){this.navigatorSeries&&(y(a.series,this.navigatorSeries),G(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},getBaseSeriesMin:function(a){return this.baseSeries.reduce(function(a,b){return Math.min(a,b.xData?b.xData[0]:a)},a)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;"undefined"!==typeof 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;var e=a.stickToMin,k=a.stickToMax,g=F(this.options.overscroll,0),h=a.series&&a.series[0],m=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(e){var r=c;var p=r+b}k&&(p=d+g,e||(r=Math.max(p-b,a.getBaseSeriesMin(h&&h.xData?h.xData[0]:-Number.MAX_VALUE))));m&&(e||k)&&E(r)&&
(this.min=this.userMin=r,this.max=this.userMax=p)}a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries,c=a.getBaseSeriesMin(this.xData[0]);a.stickToMax=a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=E(this.xAxis.min)&&this.xAxis.min<=c&&(!this.chart.fixedRange||!a.stickToMax);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){this.eventsToUnbind||
(this.eventsToUnbind=[]);this.eventsToUnbind.push(m(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)}),m(this.chart,"getMargins",function(){var a=this.navigator,b=a.opposite?"plotTop":"marginBottom";this.inverted&&(b=a.opposite?"marginRight":"plotLeft");this[b]=(this[b]||0)+(a.navigatorEnabled||!this.inverted?a.outlineHeight:0)+a.navigatorOptions.margin}))},destroy:function(){this.removeEvents();
this.xAxis&&(y(this.chart.xAxis,this.xAxis),y(this.chart.axes,this.xAxis));this.yAxis&&(y(this.chart.yAxis,this.yAxis),y(this.chart.axes,this.yAxis));(this.series||[]).forEach(function(a){a.destroy&&a.destroy()});"series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);[this.handles].forEach(function(a){H(a)},this)}};c.Navigator||(c.Navigator=D,
m(p,"zoom",function(a){var c=this.chart.options,d=c.chart.zoomType,e=c.chart.pinchType,k=c.navigator;c=c.rangeSelector;this.isXAxis&&(k&&k.enabled||c&&c.enabled)&&("y"===d?a.zoomed=!1:(!b&&"xy"===d||b&&"xy"===e)&&this.options.range&&(d=this.previousZoom,G(a.newMin)?this.previousZoom=[this.min,this.max]:d&&(a.newMin=d[0],a.newMax=d[1],delete this.previousZoom)));void 0!==a.zoomed&&a.preventDefault()}),m(g,"beforeShowResetZoom",function(){var a=this.options,c=a.navigator,d=a.rangeSelector;if((c&&c.enabled||
d&&d.enabled)&&(!b&&"x"===a.chart.zoomType||b&&"x"===a.chart.pinchType))return!1}),m(g,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new D(this)}),m(g,"afterSetChartSize",function(){var a=this.legend,b=this.navigator;if(b){var c=a&&a.options;var d=b.xAxis;var e=b.yAxis;var k=b.scrollbarHeight;this.inverted?(b.left=b.opposite?this.chartWidth-k-b.height:this.spacing[3]+k,b.top=this.plotTop+k):(b.left=this.plotLeft+k,b.top=b.navigatorOptions.top||
this.chartHeight-b.height-k-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(c&&"bottom"===c.verticalAlign&&c.enabled&&!c.floating?a.legendHeight+F(c.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0));d&&e&&(this.inverted?d.options.left=e.options.left=b.left:d.options.top=e.options.top=b.top,d.setAxisSize(),e.setAxisSize())}}),m(g,"update",function(a){var b=a.options.navigator||{},c=a.options.scrollbar||{};this.navigator||this.scroller||!b.enabled&&
!c.enabled||(d(!0,this.options.navigator,b),d(!0,this.options.scrollbar,c),delete a.options.navigator,delete a.options.scrollbar)}),m(g,"afterUpdate",function(a){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new D(this),F(a.redraw,!0)&&this.redraw(a.animation))}),m(g,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),m(C,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&
this.chart.navigator.setBaseSeries(null,!1)}),g.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(D,"parts/OrdinalAxis.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var D=g.defined,G=g.extend,H=g.pick;g=c.addEvent;var y=c.Axis,w=c.Chart,x=c.css,E=c.noop,F=c.timeUnits;g(c.Series,"updatedData",function(){var c=this.xAxis;c&&c.options.ordinal&&delete c.ordinalIndex});y.prototype.getTimeTicks=function(c,
g,p,q,h,a,b){var d=0,e,k,m={},t=[],r=-Number.MAX_VALUE,n=this.options.tickPixelInterval,f=this.chart.time,l=[];if(!this.options.ordinal&&!this.options.breaks||!h||3>h.length||void 0===g)return f.getTimeTicks.apply(f,arguments);var v=h.length;for(e=0;e<v;e++){var B=e&&h[e-1]>p;h[e]<g&&(d=e);if(e===v-1||h[e+1]-h[e]>5*a||B){if(h[e]>r){for(k=f.getTimeTicks(c,h[d],h[e],q);k.length&&k[0]<=r;)k.shift();k.length&&(r=k[k.length-1]);l.push(t.length);t=t.concat(k)}d=e+1}if(B)break}k=k.info;if(b&&k.unitRange<=
F.hour){e=t.length-1;for(d=1;d<e;d++)if(f.dateFormat("%d",t[d])!==f.dateFormat("%d",t[d-1])){m[t[d]]="day";var A=!0}A&&(m[t[0]]="day");k.higherRanks=m}k.segmentStarts=l;t.info=k;if(b&&D(n)){d=l=t.length;A=[];var u;for(f=[];d--;)e=this.translate(t[d]),u&&(f[d]=u-e),A[d]=u=e;f.sort();f=f[Math.floor(f.length/2)];f<.6*n&&(f=null);d=t[l-1]>p?l-1:l;for(u=void 0;d--;)e=A[d],l=Math.abs(u-e),u&&l<.8*n&&(null===f||l<.8*f)?(m[t[d]]&&!m[t[d+1]]?(l=d+1,u=e):l=d,t.splice(l,1)):u=e}return t};G(y.prototype,{beforeSetTickPositions:function(){var c=
[],g,p=!1,q=this.getExtremes(),h=q.min,a=q.max,b,d=this.isXAxis&&!!this.options.breaks;q=this.options.ordinal;var e=Number.MAX_VALUE,k=this.chart.options.chart.ignoreHiddenSeries,C;if(q||d){this.series.forEach(function(a,b){g=[];if(!(k&&!1===a.visible||!1===a.takeOrdinalPosition&&!d)&&(c=c.concat(a.processedXData),z=c.length,c.sort(function(a,b){return a-b}),e=Math.min(e,H(a.closestPointRange,e)),z)){for(b=0;b<z-1;)c[b]!==c[b+1]&&g.push(c[b+1]),b++;g[0]!==c[0]&&g.unshift(c[0]);c=g}a.isSeriesBoosting&&
(C=!0)});C&&(c.length=0);var z=c.length;if(2<z){var r=c[1]-c[0];for(b=z-1;b--&&!p;)c[b+1]-c[b]!==r&&(p=!0);!this.options.keepOrdinalPadding&&(c[0]-h>r||a-c[c.length-1]>r)&&(p=!0)}else this.options.overscroll&&(2===z?e=c[1]-c[0]:1===z?(e=this.options.overscroll,c=[c[0],c[0]+e]):e=this.overscrollPointsRange);p?(this.options.overscroll&&(this.overscrollPointsRange=e,c=c.concat(this.getOverscrollPositions())),this.ordinalPositions=c,r=this.ordinal2lin(Math.max(h,c[0]),!0),b=Math.max(this.ordinal2lin(Math.min(a,
c[c.length-1]),!0),1),this.ordinalSlope=a=(a-h)/(b-r),this.ordinalOffset=h-r*a):(this.overscrollPointsRange=H(this.closestPointRange,this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=q&&p;this.groupIntervalFactor=null},val2lin:function(c,g){var m=this.ordinalPositions;if(m){var q=m.length,h;for(h=q;h--;)if(m[h]===c){var a=h;break}for(h=q-1;h--;)if(c>m[h]||0===h){c=(c-m[h])/(m[h+1]-m[h]);a=h+c;break}g=g?a:this.ordinalSlope*(a||0)+this.ordinalOffset}else g=
c;return g},lin2val:function(c,g){var m=this.ordinalPositions;if(m){var q=this.ordinalSlope,h=this.ordinalOffset,a=m.length-1;if(g)if(0>c)c=m[0];else if(c>a)c=m[a];else{a=Math.floor(c);var b=c-a}else for(;a--;)if(g=q*a+h,c>=g){q=q*(a+1)+h;b=(c-g)/(q-g);break}return void 0!==b&&void 0!==m[a]?m[a]+(b?b*(m[a+1]-m[a]):0):c}return c},getExtendedPositions:function(){var c=this,g=c.chart,p=c.series[0].currentDataGrouping,q=c.ordinalIndex,h=p?p.count+p.unitName:"raw",a=c.options.overscroll,b=c.getExtremes(),
d;q||(q=c.ordinalIndex={});if(!q[h]){var e={series:[],chart:g,getExtremes:function(){return{min:b.dataMin,max:b.dataMax+a}},options:{ordinal:!0},val2lin:y.prototype.val2lin,ordinal2lin:y.prototype.ordinal2lin};c.series.forEach(function(a){d={xAxis:e,xData:a.xData.slice(),chart:g,destroyGroupedData:E};d.xData=d.xData.concat(c.getOverscrollPositions());d.options={dataGrouping:p?{enabled:!0,forced:!0,approximation:"open",units:[[p.unitName,[p.count]]]}:{enabled:!1}};a.processData.apply(d);e.series.push(d)});
c.beforeSetTickPositions.apply(e);q[h]=e.ordinalPositions}return q[h]},getOverscrollPositions:function(){var c=this.options.overscroll,g=this.overscrollPointsRange,p=[],q=this.dataMax;if(D(g))for(p.push(q);q<=this.dataMax+c;)q+=g,p.push(q);return p},getGroupIntervalFactor:function(c,g,p){p=p.processedXData;var m=p.length,h=[];var a=this.groupIntervalFactor;if(!a){for(a=0;a<m-1;a++)h[a]=p[a+1]-p[a];h.sort(function(a,c){return a-c});h=h[Math.floor(m/2)];c=Math.max(c,p[0]);g=Math.min(g,p[m-1]);this.groupIntervalFactor=
a=m*h/(g-c)}return a},postProcessTickInterval:function(c){var g=this.ordinalSlope;return g?this.options.breaks?this.closestPointRange||c:c/(g/this.closestPointRange):c}});y.prototype.ordinal2lin=y.prototype.val2lin;g(w,"pan",function(c){var g=this.xAxis[0],p=g.options.overscroll,q=c.originalEvent.chartX,h=!1;if(g.options.ordinal&&g.series.length){var a=this.mouseDownX,b=g.getExtremes(),d=b.dataMax,e=b.min,k=b.max,t=this.hoverPoints,z=g.closestPointRange||g.overscrollPointsRange;a=(a-q)/(g.translationSlope*
(g.ordinalSlope||z));var r={ordinalPositions:g.getExtendedPositions()};z=g.lin2val;var n=g.val2lin;if(!r.ordinalPositions)h=!0;else if(1<Math.abs(a)){t&&t.forEach(function(a){a.setState()});if(0>a){t=r;var f=g.ordinalPositions?g:r}else t=g.ordinalPositions?g:r,f=r;r=f.ordinalPositions;d>r[r.length-1]&&r.push(d);this.fixedRange=k-e;a=g.toFixedRange(null,null,z.apply(t,[n.apply(t,[e,!0])+a,!0]),z.apply(f,[n.apply(f,[k,!0])+a,!0]));a.min>=Math.min(b.dataMin,e)&&a.max<=Math.max(d,k)+p&&g.setExtremes(a.min,
a.max,!0,!1,{trigger:"pan"});this.mouseDownX=q;x(this.container,{cursor:"move"})}}else h=!0;h?p&&(g.max=g.dataMax+p):c.preventDefault()});g(y,"foundExtremes",function(){this.isXAxis&&D(this.options.overscroll)&&this.max===this.dataMax&&(!this.chart.mouseIsDown||this.isInternal)&&(!this.eventArgs||this.eventArgs&&"navigator"!==this.eventArgs.trigger)&&(this.max+=this.options.overscroll,!this.isInternal&&D(this.userMin)&&(this.min+=this.options.overscroll))});g(y,"afterSetScale",function(){this.horiz&&
!this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)})});K(D,"modules/broken-axis.src.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var D=g.extend,G=g.isArray,H=g.pick;g=c.addEvent;var y=c.find,w=c.fireEvent,x=c.Axis,E=c.Series,F=function(c,g){return y(g,function(g){return g.from<c&&c<g.to})};D(x.prototype,{isInBreak:function(c,g){var m=c.repeat||Infinity,q=c.from,h=c.to-c.from;g=g>=q?(g-q)%m:m-(q-g)%m;return c.inclusive?
g<=h:g<h&&0!==g},isInAnyBreak:function(c,g){var m=this.options.breaks,q=m&&m.length,h;if(q){for(;q--;)if(this.isInBreak(m[q],c)){var a=!0;h||(h=H(m[q].showPoints,!this.isXAxis))}var b=a&&g?a&&!h:a}return b}});g(x,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});g(x,"afterSetTickPositions",function(){if(this.isBroken){var c=this.tickPositions,g=this.tickPositions.info,p=[],q;for(q=0;q<c.length;q++)this.isInAnyBreak(c[q])||p.push(c[q]);this.tickPositions=
p;this.tickPositions.info=g}});g(x,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)});x.prototype.setBreaks=function(c,g){function m(a){var b=a,c;for(c=0;c<h.breakArray.length;c++){var g=h.breakArray[c];if(g.to<=a)b-=g.len;else if(g.from>=a)break;else if(h.isInBreak(g,a)){b-=a-g.from;break}}return b}function q(a){var b;for(b=0;b<h.breakArray.length;b++){var c=h.breakArray[b];if(c.from>=a)break;else c.to<a?a+=c.len:h.isInBreak(c,a)&&(a+=c.len)}return a}var h=this,a=G(c)&&!!c.length;
h.isDirty=h.isBroken!==a;h.isBroken=a;h.options.breaks=h.userOptions.breaks=c;h.forceRedraw=!0;a||h.val2lin!==m||(delete h.val2lin,delete h.lin2val);a&&(h.userOptions.ordinal=!1,h.val2lin=m,h.lin2val=q,h.setExtremes=function(a,c,e,g,h){if(this.isBroken){for(var b,d=this.options.breaks;b=F(a,d);)a=b.to;for(;b=F(c,d);)c=b.from;c<a&&(c=a)}x.prototype.setExtremes.call(this,a,c,e,g,h)},h.setAxisTranslation=function(a){x.prototype.setAxisTranslation.call(this,a);this.unitLength=null;if(this.isBroken){a=
h.options.breaks;var b=[],c=[],g=0,m,p=h.userMin||h.min,r=h.userMax||h.max,n=H(h.pointRangePadding,0),f;a.forEach(function(a){m=a.repeat||Infinity;h.isInBreak(a,p)&&(p+=a.to%m-p%m);h.isInBreak(a,r)&&(r-=r%m-a.from%m)});a.forEach(function(a){v=a.from;for(m=a.repeat||Infinity;v-m>p;)v-=m;for(;v<p;)v+=m;for(f=v;f<r;f+=m)b.push({value:f,move:"in"}),b.push({value:f+(a.to-a.from),move:"out",size:a.breakSize})});b.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===b.move?0:1):a.value-
b.value});var l=0;var v=p;b.forEach(function(a){l+="in"===a.move?1:-1;1===l&&"in"===a.move&&(v=a.value);0===l&&(c.push({from:v,to:a.value,len:a.value-v-(a.size||0)}),g+=a.value-v-(a.size||0))});h.breakArray=c;h.unitLength=r-p-g+n;w(h,"afterBreaks");h.staticScale?h.transA=h.staticScale:h.unitLength&&(h.transA*=(r-h.min+n)/h.unitLength);n&&(h.minPixelPadding=h.transA*h.minPointOffset);h.min=p;h.max=r}});H(g,!0)&&this.chart.redraw()};g(E,"afterGeneratePoints",function(){var c=this.xAxis,g=this.yAxis,
p=this.points,q=p.length,h=this.options.connectNulls;if(c&&g&&(c.options.breaks||g.options.breaks))for(;q--;){var a=p[q];var b=null===a.y&&!1===h;b||!c.isInAnyBreak(a.x,!0)&&!g.isInAnyBreak(a.y,!0)||(p.splice(q,1),this.data[q]&&this.data[q].destroyElements())}});g(E,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,H(this.pointArrayMap,["y"]))});c.Series.prototype.drawBreaks=function(c,g){var m=this,q=m.points,h,a,b,d;c&&g.forEach(function(e){h=c.breakArray||[];
a=c.isXAxis?c.min:H(m.options.threshold,c.min);q.forEach(function(g){d=H(g["stack"+e.toUpperCase()],g[e]);h.forEach(function(e){b=!1;if(a<e.from&&d>e.to||a>e.from&&d<e.from)b="pointBreak";else if(a<e.from&&d>e.from&&d<e.to||a>e.from&&d>e.to&&d<e.from)b="pointInBreak";b&&w(c,b,{point:g,brk:e})})})})};c.Series.prototype.gappedPath=function(){var g=this.currentDataGrouping,m=g&&g.gapSize;g=this.options.gapSize;var p=this.points.slice(),q=p.length-1,h=this.yAxis;if(g&&0<q)for("value"!==this.options.gapUnit&&
(g*=this.basePointRange),m&&m>g&&m>=this.basePointRange&&(g=m);q--;)p[q+1].x-p[q].x>g&&(m=(p[q].x+p[q+1].x)/2,p.splice(q+1,0,{isNull:!0,x:m}),this.options.stacking&&(m=h.stacks[this.stackKey][m]=new c.StackItem(h,h.options.stackLabels,!1,m,this.stack),m.total=0));return this.getGraphPath(p)}});K(D,"masters/modules/broken-axis.src.js",[],function(){});K(D,"parts/DataGrouping.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var D=g.arrayMax,G=g.arrayMin,H=g.defined,y=g.extend,w=g.isNumber,
x=g.pick;g=c.addEvent;var E=c.Axis,F=c.correctFloat,t=c.defaultPlotOptions,m=c.format,p=c.merge,q=c.Point,h=c.Series,a=c.Tooltip,b=c.approximations={sum:function(a){var b=a.length;if(!b&&a.hasNulls)var c=null;else if(b)for(c=0;b--;)c+=a[b];return c},average:function(a){var c=a.length;a=b.sum(a);w(a)&&c&&(a=F(a/c));return a},averages:function(){var a=[];[].forEach.call(arguments,function(c){a.push(b.average(c))});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?D(a):a.hasNulls?null:void 0},low:function(a){return a.length?G(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,c,d,f){a=b.open(a);c=b.high(c);d=b.low(d);f=b.close(f);if(w(a)||w(c)||w(d)||w(f))return[a,c,d,f]},range:function(a,c){a=b.low(a);c=b.high(c);if(w(a)||w(c))return[a,c];if(null===a&&null===c)return null}},d=function(a,c,d,f){var e=this,g=e.data,l=e.options&&e.options.data,k=[],h=[],m=
[],n=a.length,r=!!c,q=[],v=e.pointArrayMap,B=v&&v.length,z=["x"].concat(v||["y"]),t=0,A=0,C;f="function"===typeof f?f:b[f]?b[f]:b[e.getDGApproximation&&e.getDGApproximation()||"average"];B?v.forEach(function(){q.push([])}):q.push([]);var x=B||1;for(C=0;C<=n&&!(a[C]>=d[0]);C++);for(C;C<=n;C++){for(;void 0!==d[t+1]&&a[C]>=d[t+1]||C===n;){var y=d[t];e.dataGroupInfo={start:e.cropStart+A,length:q[0].length};var E=f.apply(e,q);e.pointClass&&!H(e.dataGroupInfo.options)&&(e.dataGroupInfo.options=p(e.pointClass.prototype.optionsToObject.call({series:e},
e.options.data[e.cropStart+A])),z.forEach(function(a){delete e.dataGroupInfo.options[a]}));void 0!==E&&(k.push(y),h.push(E),m.push(e.dataGroupInfo));A=C;for(y=0;y<x;y++)q[y].length=0,q[y].hasNulls=!1;t+=1;if(C===n)break}if(C===n)break;if(v)for(y=e.cropStart+C,E=g&&g[y]||e.pointClass.prototype.applyOptions.apply({series:e},[l[y]]),y=0;y<B;y++){var F=E[v[y]];w(F)?q[y].push(F):null===F&&(q[y].hasNulls=!0)}else y=r?c[C]:null,w(y)?q[0].push(y):null===y&&(q[0].hasNulls=!0)}return{groupedXData:k,groupedYData:h,
groupMap:m}},e={approximations:b,groupData:d},k=h.prototype,C=k.processData,z=k.generatePoints,r={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"]}},n={line:{},spline:{},area:{},areaspline:{},arearange:{},column:{groupPixelWidth:10},columnrange:{groupPixelWidth:10},candlestick:{groupPixelWidth:10},ohlc:{groupPixelWidth:5}},f=c.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]];k.getDGApproximation=function(){return c.seriesTypes.arearange&&
this instanceof c.seriesTypes.arearange?"range":c.seriesTypes.ohlc&&this instanceof c.seriesTypes.ohlc?"ohlc":c.seriesTypes.column&&this instanceof c.seriesTypes.column?"sum":"average"};k.groupData=d;k.processData=function(){var a=this.chart,b=this.options.dataGrouping,c=!1!==this.allowDG&&b&&x(b.enabled,a.options.isStock),d=this.visible||!a.options.chart.ignoreHiddenSeries,e,g=this.currentDataGrouping,h=!1;this.forceCrop=c;this.groupPixelWidth=null;this.hasProcessed=!0;c&&!this.requireSorting&&(this.requireSorting=
h=!0);c=!1===C.apply(this,arguments)||!c;h&&(this.requireSorting=!1);if(!c){this.destroyGroupedData();c=b.groupAll?this.xData:this.processedXData;var m=b.groupAll?this.yData:this.processedYData,n=a.plotSizeX;a=this.xAxis;var r=a.options.ordinal,p=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();if(p){this.isDirty=e=!0;this.points=null;h=a.getExtremes();var q=h.min;h=h.max;r=r&&a.getGroupIntervalFactor(q,h,this)||1;p=p*(h-q)/n*r;n=a.getTimeTicks(a.normalizeTimeTickInterval(p,b.units||
f),Math.min(q,c[0]),Math.max(h,c[c.length-1]),a.options.startOfWeek,c,this.closestPointRange);m=k.groupData.apply(this,[c,m,n,b.approximation]);c=m.groupedXData;r=m.groupedYData;var z=0;if(b.smoothed&&c.length){var t=c.length-1;for(c[t]=Math.min(c[t],h);t--&&0<t;)c[t]+=p/2;c[0]=Math.max(c[0],q)}for(t=1;t<n.length;t++)n.info.segmentStarts&&-1!==n.info.segmentStarts.indexOf(t)||(z=Math.max(n[t]-n[t-1],z));q=n.info;q.gapSize=z;this.closestPointRange=n.info.totalRange;this.groupMap=m.groupMap;if(H(c[0])&&
c[0]<a.min&&d){if(!H(a.options.min)&&a.min<=a.dataMin||a.min===a.dataMin)a.min=Math.min(c[0],a.min);a.dataMin=c[0]}b.groupAll&&(b=this.cropData(c,r,a.min,a.max,1),c=b.xData,r=b.yData);this.processedXData=c;this.processedYData=r}else this.groupMap=null;this.hasGroupedData=e;this.currentDataGrouping=q;this.preventGraphAnimation=(g&&g.totalRange)!==(q&&q.totalRange)}};k.destroyGroupedData=function(){this.groupedData&&(this.groupedData.forEach(function(a,b){a&&(this.groupedData[b]=a.destroy?a.destroy():
null)},this),this.groupedData.length=0)};k.generatePoints=function(){z.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};g(q,"update",function(){if(this.dataGroup)return c.error(24,!1,this.series.chart),!1});g(a,"headerFormatter",function(a){var b=this.chart.time,c=a.labelConfig,d=c.series,f=d.tooltipOptions,e=d.options.dataGrouping,g=f.xDateFormat,k=d.xAxis,l=f[(a.isFooter?"footer":"header")+"Format"];if(k&&"datetime"===k.options.type&&e&&w(c.key)){var h=
d.currentDataGrouping;e=e.dateTimeLabelFormats||r.dateTimeLabelFormats;if(h)if(f=e[h.unitName],1===h.count)g=f[0];else{g=f[1];var n=f[2]}else!g&&e&&(g=this.getXDateFormat(c,f,k));g=b.dateFormat(g,c.key);n&&(g+=b.dateFormat(n,c.key+h.totalRange-1));d.chart.styledMode&&(l=this.styledModeFormat(l));a.text=m(l,{point:y(c.point,{key:g}),series:d},b);a.preventDefault()}});g(h,"destroy",k.destroyGroupedData);g(h,"afterSetOptions",function(a){a=a.options;var b=this.type,c=this.chart.options.plotOptions,d=
t[b].dataGrouping,f=this.useCommonDataGrouping&&r;if(n[b]||f)d||(d=p(r,n[b])),a.dataGrouping=p(f,d,c.series&&c.series.dataGrouping,c[b].dataGrouping,this.userOptions.dataGrouping)});g(E,"afterSetScale",function(){this.series.forEach(function(a){a.hasProcessed=!1})});E.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,c,d=0,f=!1,e;for(c=b;c--;)(e=a[c].options.dataGrouping)&&(d=Math.max(d,x(e.groupPixelWidth,r.groupPixelWidth)));for(c=b;c--;)(e=a[c].options.dataGrouping)&&a[c].hasProcessed&&
(b=(a[c].processedXData||a[c].data).length,a[c].groupPixelWidth||b>this.chart.plotSizeX/d||b&&e.forced)&&(f=!0);return f?d:0};E.prototype.setDataGrouping=function(a,b){var c;b=x(b,!0);a||(a={forced:!1,units:null});if(this instanceof E)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else this.chart.options.series.forEach(function(b){b.dataGrouping=a},!1);this.ordinalSlope=null;b&&this.chart.redraw()};c.dataGrouping=e;"";return e});K(D,"parts/OHLCSeries.js",[D["parts/Globals.js"]],
function(c){var g=c.Point,D=c.seriesType,G=c.seriesTypes;D("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Open: {point.open}<br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(c){return[c.open,c.high,c.low,c.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color",
"stroke-width":"lineWidth"},init:function(){G.column.prototype.init.apply(this,arguments);this.options.stacking=!1},pointAttribs:function(c,g){g=G.column.prototype.pointAttribs.call(this,c,g);var w=this.options;delete g.fill;!c.options.color&&w.upColor&&c.open<c.close&&(g.stroke=w.upColor);return g},translate:function(){var c=this,g=c.yAxis,w=!!c.modifyValue,x=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];G.column.prototype.translate.apply(c);c.points.forEach(function(y){[y.open,y.high,
y.low,y.close,y.low].forEach(function(E,t){null!==E&&(w&&(E=c.modifyValue(E)),y[x[t]]=g.toPixels(E,!0))});y.tooltipPos[1]=y.plotHigh+g.pos-c.chart.plotTop})},drawPoints:function(){var c=this,g=c.chart;c.points.forEach(function(w){var x=w.graphic,y=!x;if(void 0!==w.plotY){x||(w.graphic=x=g.renderer.path().add(c.group));g.styledMode||x.attr(c.pointAttribs(w,w.selected&&"select"));var F=x.strokeWidth()%2/2;var t=Math.round(w.plotX)-F;var m=Math.round(w.shapeArgs.width/2);var p=["M",t,Math.round(w.yBottom),
"L",t,Math.round(w.plotHigh)];if(null!==w.open){var q=Math.round(w.plotOpen)+F;p.push("M",t,q,"L",t-m,q)}null!==w.close&&(q=Math.round(w.plotClose)+F,p.push("M",t,q,"L",t+m,q));x[y?"attr":"animate"]({d:p}).addClass(w.getClassName(),!0)}})},animate:null},{getClassName:function(){return g.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}});""});K(D,"parts/CandlestickSeries.js",[D["parts/Globals.js"]],function(c){var g=c.defaultPlotOptions,D=c.merge,
G=c.seriesType,H=c.seriesTypes;G("candlestick","ohlc",D(g.column,{states:{hover:{lineWidth:2}},tooltip:g.ohlc.tooltip,threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0}),{pointAttribs:function(c,g){var w=H.column.prototype.pointAttribs.call(this,c,g),y=this.options,F=c.open<c.close,t=y.lineColor||this.color;w["stroke-width"]=y.lineWidth;w.fill=c.options.color||(F?y.upColor||this.color:this.color);w.stroke=c.options.lineColor||(F?y.upLineColor||t:t);g&&(c=y.states[g],
w.fill=c.color||w.fill,w.stroke=c.lineColor||w.stroke,w["stroke-width"]=c.lineWidth||w["stroke-width"]);return w},drawPoints:function(){var c=this,g=c.chart,x=c.yAxis.reversed;c.points.forEach(function(w){var y=w.graphic,t=!y;if(void 0!==w.plotY){y||(w.graphic=y=g.renderer.path().add(c.group));c.chart.styledMode||y.attr(c.pointAttribs(w,w.selected&&"select")).shadow(c.options.shadow);var m=y.strokeWidth()%2/2;var p=Math.round(w.plotX)-m;var q=w.plotOpen;var h=w.plotClose;var a=Math.min(q,h);q=Math.max(q,
h);var b=Math.round(w.shapeArgs.width/2);h=x?q!==w.yBottom:Math.round(a)!==Math.round(w.plotHigh);var d=x?Math.round(a)!==Math.round(w.plotHigh):q!==w.yBottom;a=Math.round(a)+m;q=Math.round(q)+m;m=[];m.push("M",p-b,q,"L",p-b,a,"L",p+b,a,"L",p+b,q,"Z","M",p,a,"L",p,h?Math.round(x?w.yBottom:w.plotHigh):a,"M",p,q,"L",p,d?Math.round(x?w.plotHigh:w.yBottom):q);y[t?"attr":"animate"]({d:m}).addClass(w.getClassName(),!0)}})}});""});K(D,"mixins/on-series.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],
function(c,g){var D=g.defined,G=c.seriesTypes,H=c.stableSort;return{getPlotBox:function(){return c.Series.prototype.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)},translate:function(){G.column.prototype.translate.apply(this);var c=this,g=c.options,x=c.chart,E=c.points,F=E.length-1,t,m=g.onSeries;m=m&&x.get(m);g=g.onKey||"y";var p=m&&m.options.step,q=m&&m.points,h=q&&q.length,a=x.inverted,b=c.xAxis,d=c.yAxis,e=0,k;if(m&&m.visible&&h){e=(m.pointXOffset||0)+(m.barW||
0)/2;x=m.currentDataGrouping;var C=q[h-1].x+(x?x.totalRange:0);H(E,function(a,b){return a.x-b.x});for(g="plot"+g[0].toUpperCase()+g.substr(1);h--&&E[F];){var z=q[h];x=E[F];x.y=z.y;if(z.x<=x.x&&void 0!==z[g]){if(x.x<=C&&(x.plotY=z[g],z.x<x.x&&!p&&(k=q[h+1])&&void 0!==k[g])){var r=(x.x-z.x)/(k.x-z.x);x.plotY+=r*(k[g]-z[g]);x.y+=r*(k.y-z.y)}F--;h++;if(0>F)break}}}E.forEach(function(g,f){g.plotX+=e;if(void 0===g.plotY||a)0<=g.plotX&&g.plotX<=b.len?a?(g.plotY=b.translate(g.x,0,1,0,1),g.plotX=D(g.y)?d.translate(g.y,
0,0,0,1):0):g.plotY=(b.opposite?0:c.yAxis.len)+b.offset:g.shapeArgs={};if((t=E[f-1])&&t.plotX===g.plotX){void 0===t.stackIndex&&(t.stackIndex=0);var k=t.stackIndex+1}g.stackIndex=k});this.onSeries=m}}});K(D,"parts/FlagsSeries.js",[D["parts/Globals.js"],D["parts/Utilities.js"],D["mixins/on-series.js"]],function(c,g,D){function G(a){h[a+"pin"]=function(b,c,e,g,m){var d=m&&m.anchorX;m=m&&m.anchorY;"circle"===a&&g>e&&(b-=Math.round((g-e)/2),e=g);var k=h[a](b,c,e,g);d&&m&&(k.push("M","circle"===a?b+e/
2:k[1]+k[4]/2,c>m?c:c+g,"L",d,m),k=k.concat(h.circle(d-1,m-1,2,2)));return k}}var H=g.defined,y=g.isNumber,w=g.objectEach,x=c.addEvent,E=c.merge;g=c.noop;var F=c.Renderer,t=c.Series,m=c.seriesType,p=c.TrackerMixin,q=c.VMLRenderer,h=c.SVGRenderer.prototype.symbols;m("flags","column",{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}<br/>"},threshold:null,y:-30,fillColor:"#ffffff",lineWidth:1,states:{hover:{lineColor:"#000000",fillColor:"#ccd6eb"}},
style:{fontSize:"11px",fontWeight:"bold"}},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:t.prototype.init,pointAttribs:function(a,b){var c=this.options,e=a&&a.color||this.color,g=c.lineColor,h=a&&a.lineWidth;a=a&&a.fillColor||c.fillColor;b&&(a=c.states[b].fillColor,g=c.states[b].lineColor,h=c.states[b].lineWidth);return{fill:a||e,stroke:g||e,"stroke-width":h||c.lineWidth||0}},translate:D.translate,getPlotBox:D.getPlotBox,drawPoints:function(){var a=
this.points,b=this.chart,d=b.renderer,e=b.inverted,g=this.options,h=g.y,m,r=this.yAxis,n={},f=[];for(m=a.length;m--;){var l=a[m];var p=(e?l.plotY:l.plotX)>this.xAxis.len;var q=l.plotX;var t=l.stackIndex;var u=l.options.shape||g.shape;var x=l.plotY;void 0!==x&&(x=l.plotY+h-(void 0!==t&&t*g.stackDistance));l.anchorX=t?void 0:l.plotX;var y=t?void 0:l.plotY;var F="flag"!==u;t=l.graphic;void 0!==x&&0<=q&&!p?(t||(t=l.graphic=d.label("",null,null,u,null,null,g.useHTML),b.styledMode||t.attr(this.pointAttribs(l)).css(E(g.style,
l.style)),t.attr({align:F?"center":"left",width:g.width,height:g.height,"text-align":g.textAlign}).addClass("highcharts-point").add(this.markerGroup),l.graphic.div&&(l.graphic.div.point=l),b.styledMode||t.shadow(g.shadow),t.isNew=!0),0<q&&(q-=t.strokeWidth()%2),u={y:x,anchorY:y},g.allowOverlapX&&(u.x=q,u.anchorX=l.anchorX),t.attr({text:l.options.title||g.title||"A"})[t.isNew?"attr":"animate"](u),g.allowOverlapX||(n[l.plotX]?n[l.plotX].size=Math.max(n[l.plotX].size,t.width):n[l.plotX]={align:F?.5:
0,size:t.width,target:q,anchorX:q}),l.tooltipPos=[q,x+r.pos-b.plotTop]):t&&(l.graphic=t.destroy())}g.allowOverlapX||(w(n,function(a){a.plotX=a.anchorX;f.push(a)}),c.distribute(f,e?r.len:this.xAxis.len,100),a.forEach(function(a){var b=a.graphic&&n[a.plotX];b&&(a.graphic[a.graphic.isNew?"attr":"animate"]({x:b.pos+b.align*b.size,anchorX:a.anchorX}),H(b.pos)?a.graphic.isNew=!1:(a.graphic.attr({x:-9999,anchorX:-9999}),a.graphic.isNew=!0))}));g.useHTML&&c.wrap(this.markerGroup,"on",function(a){return c.SVGElement.prototype.on.apply(a.apply(this,
[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var a=this.points;p.drawTrackerPoint.apply(this);a.forEach(function(b){var c=b.graphic;c&&x(c.element,"mouseover",function(){0<b.stackIndex&&!b.raised&&(b._y=c.y,c.attr({y:b._y-8}),b.raised=!0);a.forEach(function(a){a!==b&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:function(a){a?this.setClip():this.animate=null},setClip:function(){t.prototype.setClip.apply(this,arguments);!1!==this.options.clip&&
this.sharedClipKey&&this.markerGroup.clip(this.chart[this.sharedClipKey])},buildKDTree:g,invertGroups:g},{isValid:function(){return y(this.y)||void 0===this.y}});h.flag=function(a,b,c,e,g){var d=g&&g.anchorX||a;g=g&&g.anchorY||b;return h.circle(d-1,g-1,2,2).concat(["M",d,g,"L",a,b+e,a,b,a+c,b,a+c,b+e,a,b+e,"Z"])};G("circle");G("square");F===q&&["circlepin","flag","squarepin"].forEach(function(a){q.prototype.symbols[a]=h[a]});""});K(D,"parts/RangeSelector.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],
function(c,g){function D(a){this.init(a)}var G=g.defined,H=g.destroyObjectProperties,y=g.discardElement,w=g.extend,x=g.isNumber,E=g.objectEach,F=g.pick,t=g.pInt,m=g.splat,p=c.addEvent,q=c.Axis;g=c.Chart;var h=c.css,a=c.createElement,b=c.defaultOptions,d=c.fireEvent,e=c.merge;w(b,{rangeSelector:{verticalAlign:"top",buttonTheme:{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},labelStyle:{color:"#666666"}}});
b.lang=e(b.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});D.prototype={clickButton:function(a,b){var c=this.chart,d=this.buttonOptions[a],e=c.xAxis[0],f=c.scroller&&c.scroller.getUnionExtremes()||e||{},g=f.dataMin,k=f.dataMax,h=e&&Math.round(Math.min(e.max,F(k,e.max))),t=d.type;f=d._range;var u,w=d.dataGrouping;if(null!==g&&null!==k){c.fixedRange=f;w&&(this.forcedDataGrouping=!0,q.prototype.setDataGrouping.call(e||{chart:this.chart},w,!1),this.frozenStates=d.preserveDataGrouping);
if("month"===t||"year"===t)if(e){t={range:d,max:h,chart:c,dataMin:g,dataMax:k};var C=e.minFromRange.call(t);x(t.newMax)&&(h=t.newMax)}else f=d;else if(f)C=Math.max(h-f,g),h=Math.min(C+f,k);else if("ytd"===t)if(e)void 0===k&&(g=Number.MAX_VALUE,k=Number.MIN_VALUE,c.series.forEach(function(a){a=a.xData;g=Math.min(a[0],g);k=Math.max(a[a.length-1],k)}),b=!1),h=this.getYTDExtremes(k,g,c.time.useUTC),C=u=h.min,h=h.max;else{this.deferredYTDClick=a;return}else"all"===t&&e&&(C=g,h=k);C+=d._offsetMin;h+=d._offsetMax;
this.setSelected(a);if(e)e.setExtremes(C,h,F(b,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:d});else{var y=m(c.options.xAxis)[0];var E=y.range;y.range=f;var D=y.min;y.min=u;p(c,"load",function(){y.range=E;y.min=D})}}},setSelected:function(a){this.selected=this.options.selected=a},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(a){var b=
this,c=a.options.rangeSelector,e=c.buttons||[].concat(b.defaultButtons),g=c.selected,f=function(){var a=b.minInput,c=b.maxInput;a&&a.blur&&d(a,"blur");c&&c.blur&&d(c,"blur")};b.chart=a;b.options=c;b.buttons=[];b.buttonOptions=e;this.unMouseDown=p(a.container,"mousedown",f);this.unResize=p(a,"resize",f);e.forEach(b.computeButtonRange);void 0!==g&&e[g]&&this.clickButton(g,!1);p(a,"load",function(){a.xAxis&&a.xAxis[0]&&p(a.xAxis[0],"setExtremes",function(c){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==
c.trigger&&"updatedData"!==c.trigger&&b.forcedDataGrouping&&!b.frozenStates&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this,b=this.chart,c=b.xAxis[0],d=Math.round(c.max-c.min),e=!c.hasVisibleSeries,f=b.scroller&&b.scroller.getUnionExtremes()||c,g=f.dataMin,h=f.dataMax;b=a.getYTDExtremes(h,g,b.time.useUTC);var m=b.min,p=b.max,q=a.selected,t=x(q),w=a.options.allButtonsEnabled,y=a.buttons;a.buttonOptions.forEach(function(b,f){var k=b._range,l=b.type,n=b.count||1,r=y[f],v=0,
u=b._offsetMax-b._offsetMin;b=f===q;var z=k>h-g,B=k<c.minRange,x=!1,C=!1;k=k===d;("month"===l||"year"===l)&&d+36E5>=864E5*{month:28,year:365}[l]*n-u&&d-36E5<=864E5*{month:31,year:366}[l]*n+u?k=!0:"ytd"===l?(k=p-m+u===d,x=!b):"all"===l&&(k=c.max-c.min>=h-g,C=!b&&t&&k);l=!w&&(z||B||C||e);n=b&&k||k&&!t&&!x||b&&a.frozenStates;l?v=3:n&&(t=!0,v=2);r.state!==v&&(r.setState(v),0===v&&q===f&&a.setSelected(null))})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,
hour:36E5,day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c;a._offsetMin=F(a.offsetMin,0);a._offsetMax=F(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,d=this.chart.time,e=this[a+"Input"];G(b)&&(e.previousValue=e.HCTime,e.HCTime=b);e.value=d.dateFormat(c.inputEditDateFormat||"%Y-%m-%d",e.HCTime);this[a+"DateBox"].attr({text:d.dateFormat(c.inputDateFormat||"%b %e, %Y",
e.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];h(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){h(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(d){function g(){var a=A.value,b=(l.inputDateParser||Date.parse)(a),c=m.xAxis[0],d=m.scroller&&m.scroller.xAxis?m.scroller.xAxis:c,f=d.dataMin;d=d.dataMax;b!==A.previousValue&&
(A.previousValue=b,x(b)||(b=a.split("-"),b=Date.UTC(t(b[0]),t(b[1])-1,t(b[2]))),x(b)&&(m.time.useUTC||(b+=6E4*(new Date).getTimezoneOffset()),q?b>k.maxInput.HCTime?b=void 0:b<f&&(b=f):b<k.minInput.HCTime?b=void 0:b>d&&(b=d),void 0!==b&&c.setExtremes(q?b:c.min,q?c.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}var k=this,m=k.chart,n=m.renderer.style||{},f=m.renderer,l=m.options.rangeSelector,p=k.div,q="min"===d,A,u,y=this.inputGroup;this[d+"Label"]=u=f.label(b.lang[q?"rangeSelectorFrom":"rangeSelectorTo"],
this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(y);y.offset+=u.width+5;this[d+"DateBox"]=f=f.label("",y.offset).addClass("highcharts-range-input").attr({padding:2,width:l.inputBoxWidth||90,height:l.inputBoxHeight||17,"text-align":"center"}).on("click",function(){k.showInput(d);k[d+"Input"].focus()});m.styledMode||f.attr({stroke:l.inputBoxBorderColor||"#cccccc","stroke-width":1});f.add(y);y.offset+=f.width+(q?10:0);this[d+"Input"]=A=a("input",{name:d,className:"highcharts-range-selector",
type:"text"},{top:m.plotTop+"px"},p);m.styledMode||(u.css(e(n,l.labelStyle)),f.css(e({color:"#333333"},n,l.inputStyle)),h(A,w({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:n.fontSize,fontFamily:n.fontFamily,top:"-9999em"},l.inputStyle)));A.onfocus=function(){k.showInput(d)};A.onblur=function(){A===c.doc.activeElement&&g();k.hideInput(d);A.blur()};A.onchange=g;A.onkeypress=function(a){13===a.keyCode&&g()}},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,e=new d.Date(a),f=d.get("FullYear",e);c=c?d.Date.UTC(f,0,1):+new d.Date(f,0,1);b=Math.max(b||0,c);e=e.getTime();return{max:Math.min(a||e,e),min:b}},render:function(c,d){var e=this,g=e.chart,k=g.renderer,f=g.container,l=g.options,h=l.exporting&&!1!==l.exporting.enabled&&l.navigation&&l.navigation.buttonOptions,m=b.lang,p=
e.div,q=l.rangeSelector,t=F(l.chart.style&&l.chart.style.zIndex,0)+1;l=q.floating;var w=e.buttons;p=e.inputGroup;var x=q.buttonTheme,y=q.buttonPosition,C=q.inputPosition,E=q.inputEnabled,D=x&&x.states,G=g.plotLeft,H=e.buttonGroup;var I=e.rendered;var K=e.options.verticalAlign,X=g.legend,R=X&&X.options,T=y.y,ba=C.y,Z=I||!1,aa=Z?"animate":"attr",V=0,W=0,Y;if(!1!==q.enabled){I||(e.group=I=k.g("range-selector-group").attr({zIndex:7}).add(),e.buttonGroup=H=k.g("range-selector-buttons").add(I),e.zoomText=
k.text(m.rangeSelectorZoom,0,15).add(H),g.styledMode||(e.zoomText.css(q.labelStyle),x["stroke-width"]=F(x["stroke-width"],0)),e.buttonOptions.forEach(function(a,b){w[b]=k.button(a.text,0,0,function(c){var d=a.events&&a.events.click,f;d&&(f=d.call(a,c));!1!==f&&e.clickButton(b);e.isActive=!0},x,D&&D.hover,D&&D.select,D&&D.disabled).attr({"text-align":"center"}).add(H)}),!1!==E&&(e.div=p=a("div",null,{position:"relative",height:0,zIndex:t}),f.parentNode.insertBefore(p,f),e.inputGroup=p=k.g("input-group").add(I),
p.offset=0,e.drawInput("min"),e.drawInput("max")));e.zoomText[aa]({x:F(G+y.x,G)});var ea=F(G+y.x,G)+e.zoomText.getBBox().width+5;e.buttonOptions.forEach(function(a,b){w[b][aa]({x:ea});ea+=w[b].width+F(q.buttonSpacing,5)});G=g.plotLeft-g.spacing[3];e.updateButtonStates();h&&this.titleCollision(g)&&"top"===K&&"right"===y.align&&y.y+H.getBBox().height-12<(h.y||0)+h.height&&(V=-40);"left"===y.align?Y=y.x-g.spacing[3]:"right"===y.align&&(Y=y.x+V-g.spacing[1]);H.align({y:y.y,width:H.getBBox().width,align:y.align,
x:Y},!0,g.spacingBox);e.group.placed=Z;e.buttonGroup.placed=Z;!1!==E&&(V=h&&this.titleCollision(g)&&"top"===K&&"right"===C.align&&C.y-p.getBBox().height-12<(h.y||0)+h.height+g.spacing[0]?-40:0,"left"===C.align?Y=G:"right"===C.align&&(Y=-Math.max(g.axisOffset[1],-V)),p.align({y:C.y,width:p.getBBox().width,align:C.align,x:C.x+Y-2},!0,g.spacingBox),f=p.alignAttr.translateX+p.alignOptions.x-V+p.getBBox().x+2,h=p.alignOptions.width,m=H.alignAttr.translateX+H.getBBox().x,Y=H.getBBox().width+20,(C.align===
y.align||m+Y>f&&f+h>m&&T<ba+p.getBBox().height)&&p.attr({translateX:p.alignAttr.translateX+(g.axisOffset[1]>=-V?0:-V),translateY:p.alignAttr.translateY+H.getBBox().height+10}),e.setInputValue("min",c),e.setInputValue("max",d),e.inputGroup.placed=Z);e.group.align({verticalAlign:K},!0,g.spacingBox);c=e.group.getBBox().height+20;d=e.group.alignAttr.translateY;"bottom"===K&&(X=R&&"bottom"===R.verticalAlign&&R.enabled&&!R.floating?X.legendHeight+F(R.margin,10):0,c=c+X-20,W=d-c-(l?0:q.y)-(g.titleOffset?
g.titleOffset[2]:0)-10);if("top"===K)l&&(W=0),g.titleOffset&&g.titleOffset[0]&&(W=g.titleOffset[0]),W+=g.margin[0]-g.spacing[0]||0;else if("middle"===K)if(ba===T)W=0>ba?d+void 0:d;else if(ba||T)W=0>ba||0>T?W-Math.min(ba,T):d-c+NaN;e.group.translate(q.x,q.y+Math.floor(W));!1!==E&&(e.minInput.style.marginTop=e.group.translateY+"px",e.maxInput.style.marginTop=e.group.translateY+"px");e.rendered=!0}},getHeight:function(){var a=this.options,b=this.group,c=a.y,d=a.buttonPosition.y,e=a.inputPosition.y;if(a.height)return a.height;
a=b?b.getBBox(!0).height+13+c:0;b=Math.min(e,d);if(0>e&&0>d||0<e&&0<d)a+=Math.abs(b);return a},titleCollision:function(a){return!(a.options.title.text||a.options.subtitle.text)},update:function(a){var b=this.chart;e(!0,b.options.rangeSelector,a);this.destroy();this.init(b);b.rangeSelector.render()},destroy:function(){var a=this,b=a.minInput,c=a.maxInput;a.unMouseDown();a.unResize();H(a.buttons);b&&(b.onfocus=b.onblur=b.onchange=null);c&&(c.onfocus=c.onblur=c.onchange=null);E(a,function(b,c){b&&"chart"!==
c&&(b.destroy?b.destroy():b.nodeType&&y(this[c]));b!==D.prototype[c]&&(a[c]=null)},this)}};q.prototype.minFromRange=function(){var a=this.range,b={month:"Month",year:"FullYear"}[a.type],c=this.max,d=this.chart.time,e=function(a,c){var f=new d.Date(a),e=d.get(b,f);d.set(b,f,e+c);e===d.get(b,f)&&d.set("Date",f,0);return f.getTime()-a};if(x(a)){var f=c-a;var g=a}else f=c+e(c,-a.count),this.chart&&(this.chart.fixedRange=c-f);var h=F(this.dataMin,Number.MIN_VALUE);x(f)||(f=h);f<=h&&(f=h,void 0===g&&(g=
e(f,a.count)),this.newMax=Math.min(f+g,this.dataMax));x(c)||(f=void 0);return f};c.RangeSelector||(p(g,"afterGetContainer",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new D(this))}),p(g,"beforeRender",function(){var a=this.axes,b=this.rangeSelector;b&&(x(b.deferredYTDClick)&&(b.clickButton(b.deferredYTDClick),delete b.deferredYTDClick),a.forEach(function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),b.render(),a=b.options.verticalAlign,b.options.floating||("bottom"===
a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0)))}),p(g,"update",function(a){var b=a.options.rangeSelector;a=this.rangeSelector;var c=this.extraBottomMargin,d=this.extraTopMargin;b&&b.enabled&&!G(a)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new D(this));this.extraTopMargin=this.extraBottomMargin=!1;a&&(a.render(),b=b&&b.verticalAlign||a.options&&a.options.verticalAlign,a.options.floating||("bottom"===b?this.extraBottomMargin=!0:"middle"!==b&&(this.extraTopMargin=
!0)),this.extraBottomMargin!==c||this.extraTopMargin!==d)&&(this.isDirtyBox=!0)}),p(g,"render",function(){var a=this.rangeSelector;a&&!a.options.floating&&(a.render(),a=a.options.verticalAlign,"bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0))}),p(g,"getMargins",function(){var a=this.rangeSelector;a&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))}),g.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();
x(c.min)&&d.render(c.min,c.max)}var c,d=a.rangeSelector;if(d){var e=p(a.xAxis[0],"afterSetExtremes",function(a){d.render(a.min,a.max)});var f=p(a,"redraw",b);b()}p(a,"destroy",function(){d&&(f(),e())})}),c.RangeSelector=D)});K(D,"parts/StockChart.js",[D["parts/Globals.js"],D["parts/Utilities.js"]],function(c,g){var D=g.arrayMax,G=g.arrayMin,H=g.defined,y=g.extend,w=g.isNumber,x=g.isString,E=g.pick,F=g.splat;g=c.addEvent;var t=c.Axis,m=c.Chart,p=c.format,q=c.merge,h=c.Point,a=c.Renderer,b=c.Series,
d=c.SVGRenderer,e=c.VMLRenderer,k=b.prototype,C=k.init,z=k.processData,r=h.prototype.tooltipFormatter;c.StockChart=c.stockChart=function(a,b,d){var f=x(a)||a.nodeName,e=arguments[f?1:0],g=e,l=e.series,h=c.getOptions(),k,n=E(e.navigator&&e.navigator.enabled,h.navigator.enabled,!0),p=n?{startOnTick:!1,endOnTick:!1}:null;e.xAxis=F(e.xAxis||{}).map(function(a,b){return q({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},h.xAxis,h.xAxis&&
h.xAxis[b],a,{type:"datetime",categories:null},p)});e.yAxis=F(e.yAxis||{}).map(function(a,b){k=E(a.opposite,!0);return q({labels:{y:-2},opposite:k,showLastLabel:!(!a.categories&&"category"!==a.type),title:{text:null}},h.yAxis,h.yAxis&&h.yAxis[b],a)});e.series=null;e=q({chart:{panning:!0,pinchType:"x"},navigator:{enabled:n},scrollbar:{enabled:E(h.scrollbar.enabled,!0)},rangeSelector:{enabled:E(h.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:E(h.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1}},
e,{isStock:!0});e.series=g.series=l;return f?new m(a,e,d):new m(e,b)};g(b,"setOptions",function(a){function b(a){return c.seriesTypes[a]&&d instanceof c.seriesTypes[a]}var d=this,e;this.chart.options.isStock&&(b("column")||b("columnrange")?e={borderWidth:0,shadow:!1}:!b("line")||b("scatter")||b("sma")||(e={marker:{enabled:!1,radius:2}}),e&&(a.plotOptions[this.type]=q(a.plotOptions[this.type],e)))});g(t,"autoLabelAlign",function(a){var b=this.chart,c=this.options;b=b._labelPanes=b._labelPanes||{};
var d=this.options.labels;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,a.align="right",a.preventDefault()))});g(t,"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]});g(t,"getPlotLinePath",function(a){function b(a){var b="xAxis"===a?"yAxis":"xAxis";a=d.options[b];return w(a)?[g[b][a]]:
x(a)?[g.get(a)]:e.map(function(a){return a[b]})}var d=this,e=this.isLinked&&!this.series?this.linkedParent.series:this.series,g=d.chart,h=g.renderer,k=d.left,m=d.top,n,p,q,r,t=[],y=[],z=a.translatedValue,C=a.value,D=a.force;if(g.options.isStock&&!1!==a.acrossPanes&&"xAxis"===d.coll||"yAxis"===d.coll){a.preventDefault();y=b(d.coll);var F=d.isXAxis?g.yAxis:g.xAxis;F.forEach(function(a){if(H(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis";b=H(a.options[b])?g[b][a.options[b]]:
g[b][0];d===b&&y.push(a)}});var G=y.length?[]:[d.isXAxis?g.yAxis[0]:g.xAxis[0]];y.forEach(function(a){-1!==G.indexOf(a)||c.find(G,function(b){return b.pos===a.pos&&b.len===a.len})||G.push(a)});var I=E(z,d.translate(C,null,null,a.old));w(I)&&(d.horiz?G.forEach(function(a){var b;p=a.pos;r=p+a.len;n=q=Math.round(I+d.transB);"pass"!==D&&(n<k||n>k+d.width)&&(D?n=q=Math.min(Math.max(k,n),k+d.width):b=!0);b||t.push("M",n,p,"L",q,r)}):G.forEach(function(a){var b;n=a.pos;q=n+a.len;p=r=Math.round(m+d.height-
I);"pass"!==D&&(p<m||p>m+d.height)&&(D?p=r=Math.min(Math.max(m,p),d.top+d.height):b=!0);b||t.push("M",n,p,"L",q,r)}));a.path=0<t.length?h.crispPolyLine(t,a.lineWidth||1):null}});d.prototype.crispPolyLine=function(a,b){var c;for(c=0;c<a.length;c+=6)a[c+1]===a[c+4]&&(a[c+1]=a[c+4]=Math.round(a[c+1])-b%2/2),a[c+2]===a[c+5]&&(a[c+2]=a[c+5]=Math.round(a[c+2])+b%2/2);return a};a===e&&(e.prototype.crispPolyLine=d.prototype.crispPolyLine);g(t,"afterHideCrosshair",function(){this.crossLabel&&(this.crossLabel=
this.crossLabel.hide())});g(t,"afterDrawCrosshair",function(a){var b,c;if(H(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){var d=this.chart,e=this.options.crosshair.label,g=this.horiz,h=this.opposite,k=this.left,m=this.top,n=this.crossLabel,q=e.format,r="",t="inside"===this.options.tickPosition,w=!1!==this.crosshair.snap,x=0,z=a.e||this.cross&&this.cross.e,C=a.point;var D=this.lin2log;if(this.isLog){a=D(this.min);var F=D(this.max)}else a=this.min,F=this.max;D=g?"center":h?"right"===
this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";n||(n=this.crossLabel=d.renderer.label(null,null,null,e.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:e.align||D,padding:E(e.padding,8),r:E(e.borderRadius,3),zIndex:2}).add(this.labelGroup),d.styledMode||n.attr({fill:e.backgroundColor||this.series[0]&&this.series[0].color||"#666666",stroke:e.borderColor||"","stroke-width":e.borderWidth||0}).css(y({color:"#ffffff",
fontWeight:"normal",fontSize:"11px",textAlign:"center"},e.style)));g?(D=w?C.plotX+k:z.chartX,m+=h?0:this.height):(D=h?this.width+k:0,m=w?C.plotY+m:z.chartY);q||e.formatter||(this.isDatetimeAxis&&(r="%b %d, %Y"),q="{value"+(r?":"+r:"")+"}");r=w?C[this.isXAxis?"x":"y"]:this.toValue(g?z.chartX:z.chartY);n.attr({text:q?p(q,{value:r},d.time):e.formatter.call(this,r),x:D,y:m,visibility:r<a||r>F?"hidden":"visible"});e=n.getBBox();if(g){if(t&&!h||!t&&h)m=n.y-e.height}else m=n.y-e.height/2;g?(b=k-e.x,c=k+
this.width-e.x):(b="left"===this.labelAlign?k:0,c="right"===this.labelAlign?k+this.width:d.chartWidth);n.translateX<b&&(x=b-n.translateX);n.translateX+e.width>=c&&(x=-(n.translateX+e.width-c));n.attr({x:D+x,y:m,anchorX:g?D:this.opposite?0:d.chartWidth,anchorY:g?this.opposite?d.chartHeight:0:m+e.height/2})}});k.init=function(){C.apply(this,arguments);this.setCompare(this.options.compare)};k.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,c){var d=this.compareValue;return void 0!==
b&&void 0!==d?(b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b):0}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};k.processData=function(a){var b,c=-1,d=!0===this.options.compareStart?0:1;z.apply(this,arguments);if(this.xAxis&&this.processedYData){var e=this.processedXData;var g=this.processedYData;var h=g.length;this.pointArrayMap&&(c=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y"));for(b=0;b<h-d;b++){var k=
g[b]&&-1<c?g[b][c]:g[b];if(w(k)&&e[b+d]>=this.xAxis.min&&0!==k){this.compareValue=k;break}}}};g(b,"afterGetExtremes",function(){if(this.modifyValue){var a=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)];this.dataMin=G(a);this.dataMax=D(a)}});t.prototype.setCompare=function(a,b){this.isXAxis||(this.series.forEach(function(b){b.setCompare(a)}),E(b,!0)&&this.chart.redraw())};h.prototype.tooltipFormatter=function(a){a=a.replace("{point.change}",(0<this.change?"+":"")+c.numberFormat(this.change,
E(this.series.tooltipOptions.changeDecimals,2)));return r.apply(this,[a])};g(b,"render",function(){var a=this.chart;if(!(a.is3d&&a.is3d()||a.polar)&&this.xAxis&&!this.xAxis.isRadial){var b=this.yAxis.len;if(this.xAxis.axisLine){var c=a.plotTop+a.plotHeight-this.yAxis.pos-this.yAxis.len,d=Math.floor(this.xAxis.axisLine.strokeWidth()/2);0<=c&&(b-=Math.max(d-c,0))}!this.clipBox&&this.animate?(this.clipBox=q(a.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=b):a[this.sharedClipKey]&&(a[this.sharedClipKey].animate({width:this.xAxis.len,
height:b}),a[this.sharedClipKey+"m"]&&a[this.sharedClipKey+"m"].animate({width:this.xAxis.len}))}});g(m,"update",function(a){a=a.options;"scrollbar"in a&&this.navigator&&(q(!0,this.options.scrollbar,a.scrollbar),this.navigator.update({},!1),delete a.scrollbar)})});K(D,"masters/modules/stock.src.js",[],function(){});K(D,"masters/highstock.src.js",[D["masters/highcharts.src.js"]],function(c){c.product="Highstock";return c});D["masters/highstock.src.js"]._modules=D;return D["masters/highstock.src.js"]});
//# sourceMappingURL=highstock.js.map