/*
 Highstock JS v6.0.3 (2017-11-14)

 (c) 2009-2016 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(Q,L){"object"===typeof module&&module.exports?module.exports=Q.document?L(Q):L:Q.Highcharts=L(Q)})("undefined"!==typeof window?window:this,function(Q){var L=function(){var a="undefined"===typeof Q?window:Q,F=a.document,E=a.navigator&&a.navigator.userAgent||"",G=F&&F.createElementNS&&!!F.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,r=/(edge|msie|trident)/i.test(E)&&!a.opera,h=/Firefox/.test(E),p=h&&4>parseInt(E.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,
!0):{product:"Highstock",version:"6.0.3",deg2rad:2*Math.PI/360,doc:F,hasBidiBug:p,hasTouch:F&&void 0!==F.documentElement.ontouchstart,isMS:r,isWebKit:/AppleWebKit/.test(E),isFirefox:h,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(E),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:G,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){a.timers=[];var F=a.charts,E=a.doc,G=a.win;a.error=function(r,
h){r=a.isNumber(r)?"Highcharts error #"+r+": www.highcharts.com/errors/"+r:r;if(h)throw Error(r);G.console&&console.log(r)};a.Fx=function(a,h,p){this.options=h;this.elem=a;this.prop=p};a.Fx.prototype={dSetter:function(){var a=this.paths[0],h=this.paths[1],p=[],x=this.now,t=a.length,q;if(1===x)p=this.toD;else if(t===h.length&&1>x)for(;t--;)q=parseFloat(a[t]),p[t]=isNaN(q)?h[t]:x*parseFloat(h[t]-q)+q;else p=h;this.elem.attr("d",p,null,!0)},update:function(){var a=this.elem,h=this.prop,p=this.now,x=
this.options.step;if(this[h+"Setter"])this[h+"Setter"]();else a.attr?a.element&&a.attr(h,p,null,!0):a.style[h]=p+this.unit;x&&x.call(a,p,this)},run:function(r,h,p){var x=this,t=x.options,q=function(a){return q.stopped?!1:x.step(a)},z=G.requestAnimationFrame||function(a){setTimeout(a,13)},k=function(){a.timers=a.grep(a.timers,function(a){return a()});a.timers.length&&z(k)};r===h?(delete t.curAnim[this.prop],t.complete&&0===a.keys(t.curAnim).length&&t.complete()):(this.startTime=+new Date,this.start=
r,this.end=h,this.unit=p,this.now=this.start,this.pos=0,q.elem=this.elem,q.prop=this.prop,q()&&1===a.timers.push(q)&&z(k))},step:function(r){var h=+new Date,p,x=this.options,t=this.elem,q=x.complete,z=x.duration,k=x.curAnim;t.attr&&!t.element?r=!1:r||h>=z+this.startTime?(this.now=this.end,this.pos=1,this.update(),p=k[this.prop]=!0,a.objectEach(k,function(a){!0!==a&&(p=!1)}),p&&q&&q.call(t),r=!1):(this.pos=x.easing((h-this.startTime)/z),this.now=this.start+(this.end-this.start)*this.pos,this.update(),
r=!0);return r},initPath:function(r,h,p){function x(a){var b,c;for(w=a.length;w--;)b="M"===a[w]||"L"===a[w],c=/[a-zA-Z]/.test(a[w+3]),b&&c&&a.splice(w+1,0,a[w+1],a[w+2],a[w+1],a[w+2])}function t(a,b){for(;a.length<c;){a[0]=b[c-a.length];var g=a.slice(0,e);[].splice.apply(a,[0,0].concat(g));l&&(g=a.slice(a.length-e),[].splice.apply(a,[a.length,0].concat(g)),w--)}a[0]="M"}function q(a,w){for(var g=(c-a.length)/e;0<g&&g--;)b=a.slice().splice(a.length/D-e,e*D),b[0]=w[c-e-g*e],f&&(b[e-6]=b[e-2],b[e-5]=
b[e-1]),[].splice.apply(a,[a.length/D,0].concat(b)),l&&g--}h=h||"";var z,k=r.startX,m=r.endX,f=-1<h.indexOf("C"),e=f?7:3,c,b,w;h=h.split(" ");p=p.slice();var l=r.isArea,D=l?2:1,H;f&&(x(h),x(p));if(k&&m){for(w=0;w<k.length;w++)if(k[w]===m[0]){z=w;break}else if(k[0]===m[m.length-k.length+w]){z=w;H=!0;break}void 0===z&&(h=[])}h.length&&a.isNumber(z)&&(c=p.length+z*D*e,H?(t(h,p),q(p,h)):(t(p,h),q(h,p)));return[h,p]}};a.Fx.prototype.fillSetter=a.Fx.prototype.strokeSetter=function(){this.elem.attr(this.prop,
a.color(this.start).tweenTo(a.color(this.end),this.pos),null,!0)};a.extend=function(a,h){var p;a||(a={});for(p in h)a[p]=h[p];return a};a.merge=function(){var r,h=arguments,p,x={},t=function(q,p){"object"!==typeof q&&(q={});a.objectEach(p,function(k,m){!a.isObject(k,!0)||a.isClass(k)||a.isDOMElement(k)?q[m]=p[m]:q[m]=t(q[m]||{},k)});return q};!0===h[0]&&(x=h[1],h=Array.prototype.slice.call(h,2));p=h.length;for(r=0;r<p;r++)x=t(x,h[r]);return x};a.pInt=function(a,h){return parseInt(a,h||10)};a.isString=
function(a){return"string"===typeof a};a.isArray=function(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a};a.isObject=function(r,h){return!!r&&"object"===typeof r&&(!h||!a.isArray(r))};a.isDOMElement=function(r){return a.isObject(r)&&"number"===typeof r.nodeType};a.isClass=function(r){var h=r&&r.constructor;return!(!a.isObject(r,!0)||a.isDOMElement(r)||!h||!h.name||"Object"===h.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=
function(a,h){for(var p=a.length;p--;)if(a[p]===h){a.splice(p,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(r,h,p){var x;a.isString(h)?a.defined(p)?r.setAttribute(h,p):r&&r.getAttribute&&(x=r.getAttribute(h)):a.defined(h)&&a.isObject(h)&&a.objectEach(h,function(a,q){r.setAttribute(q,a)});return x};a.splat=function(r){return a.isArray(r)?r:[r]};a.syncTimeout=function(a,h,p){if(h)return setTimeout(a,h,p);a.call(0,p)};a.pick=function(){var a=arguments,h,p,x=a.length;for(h=
0;h<x;h++)if(p=a[h],void 0!==p&&null!==p)return p};a.css=function(r,h){a.isMS&&!a.svg&&h&&void 0!==h.opacity&&(h.filter="alpha(opacity\x3d"+100*h.opacity+")");a.extend(r.style,h)};a.createElement=function(r,h,p,x,t){r=E.createElement(r);var q=a.css;h&&a.extend(r,h);t&&q(r,{padding:0,border:"none",margin:0});p&&q(r,p);x&&x.appendChild(r);return r};a.extendClass=function(r,h){var p=function(){};p.prototype=new r;a.extend(p.prototype,h);return p};a.pad=function(a,h,p){return Array((h||2)+1-String(a).length).join(p||
0)+a};a.relativeLength=function(a,h,p){return/%$/.test(a)?h*parseFloat(a)/100+(p||0):parseFloat(a)};a.wrap=function(a,h,p){var x=a[h];a[h]=function(){var a=Array.prototype.slice.call(arguments),q=arguments,z=this;z.proceed=function(){x.apply(z,arguments.length?arguments:q)};a.unshift(x);a=p.apply(this,a);z.proceed=null;return a}};a.getTZOffset=function(r){var h=a.Date;return 6E4*(h.hcGetTimezoneOffset&&h.hcGetTimezoneOffset(r)||h.hcTimezoneOffset||0)};a.dateFormat=function(r,h,p){if(!a.defined(h)||
isNaN(h))return a.defaultOptions.lang.invalidDate||"";r=a.pick(r,"%Y-%m-%d %H:%M:%S");var x=a.Date,t=new x(h-a.getTZOffset(h)),q=t[x.hcGetHours](),z=t[x.hcGetDay](),k=t[x.hcGetDate](),m=t[x.hcGetMonth](),f=t[x.hcGetFullYear](),e=a.defaultOptions.lang,c=e.weekdays,b=e.shortWeekdays,w=a.pad,x=a.extend({a:b?b[z]:c[z].substr(0,3),A:c[z],d:w(k),e:w(k,2," "),w:z,b:e.shortMonths[m],B:e.months[m],m:w(m+1),y:f.toString().substr(2,2),Y:f,H:w(q),k:q,I:w(q%12||12),l:q%12||12,M:w(t[x.hcGetMinutes]()),p:12>q?"AM":
"PM",P:12>q?"am":"pm",S:w(t.getSeconds()),L:w(Math.round(h%1E3),3)},a.dateFormats);a.objectEach(x,function(a,b){for(;-1!==r.indexOf("%"+b);)r=r.replace("%"+b,"function"===typeof a?a(h):a)});return p?r.substr(0,1).toUpperCase()+r.substr(1):r};a.formatSingle=function(r,h){var p=/\.([0-9])/,x=a.defaultOptions.lang;/f$/.test(r)?(p=(p=r.match(p))?p[1]:-1,null!==h&&(h=a.numberFormat(h,p,x.decimalPoint,-1<r.indexOf(",")?x.thousandsSep:""))):h=a.dateFormat(r,h);return h};a.format=function(r,h){for(var p=
"{",x=!1,t,q,z,k,m=[],f;r;){p=r.indexOf(p);if(-1===p)break;t=r.slice(0,p);if(x){t=t.split(":");q=t.shift().split(".");k=q.length;f=h;for(z=0;z<k;z++)f&&(f=f[q[z]]);t.length&&(f=a.formatSingle(t.join(":"),f));m.push(f)}else m.push(t);r=r.slice(p+1);p=(x=!x)?"}":"{"}m.push(r);return m.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(r,h,p,x,t){var q,z=r;p=a.pick(p,1);q=r/p;h||(h=t?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],
!1===x&&(1===p?h=a.grep(h,function(a){return 0===a%1}):.1>=p&&(h=[1/p])));for(x=0;x<h.length&&!(z=h[x],t&&z*p>=r||!t&&q<=(h[x]+(h[x+1]||h[x]))/2);x++);return z=a.correctFloat(z*p,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,h){var p=a.length,x,t;for(t=0;t<p;t++)a[t].safeI=t;a.sort(function(a,t){x=h(a,t);return 0===x?a.safeI-t.safeI:x});for(t=0;t<p;t++)delete a[t].safeI};a.arrayMin=function(a){for(var h=a.length,p=a[0];h--;)a[h]<p&&(p=a[h]);return p};a.arrayMax=function(a){for(var h=
a.length,p=a[0];h--;)a[h]>p&&(p=a[h]);return p};a.destroyObjectProperties=function(r,h){a.objectEach(r,function(a,x){a&&a!==h&&a.destroy&&a.destroy();delete r[x]})};a.discardElement=function(r){var h=a.garbageBin;h||(h=a.createElement("div"));r&&h.appendChild(r);h.innerHTML=""};a.correctFloat=function(a,h){return parseFloat(a.toPrecision(h||14))};a.setAnimation=function(r,h){h.renderer.globalAnimation=a.pick(r,h.options.chart.animation,!0)};a.animObject=function(r){return a.isObject(r)?a.merge(r):
{duration:r?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(r,h,p,x){r=+r||0;h=+h;var t=a.defaultOptions.lang,q=(r.toString().split(".")[1]||"").split("e")[0].length,z,k,m=r.toString().split("e");-1===h?h=Math.min(q,20):a.isNumber(h)||(h=2);k=(Math.abs(m[1]?m[0]:r)+Math.pow(10,-Math.max(h,q)-1)).toFixed(h);q=String(a.pInt(k));z=3<q.length?q.length%3:0;p=a.pick(p,t.decimalPoint);x=a.pick(x,t.thousandsSep);
r=(0>r?"-":"")+(z?q.substr(0,z)+x:"");r+=q.substr(z).replace(/(\d{3})(?=\d)/g,"$1"+x);h&&(r+=p+k.slice(-h));m[1]&&(r+="e"+m[1]);return r};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(r,h,p){if("width"===h)return Math.min(r.offsetWidth,r.scrollWidth)-a.getStyle(r,"padding-left")-a.getStyle(r,"padding-right");if("height"===h)return Math.min(r.offsetHeight,r.scrollHeight)-a.getStyle(r,"padding-top")-a.getStyle(r,"padding-bottom");G.getComputedStyle||a.error(27,
!0);if(r=G.getComputedStyle(r,void 0))r=r.getPropertyValue(h),a.pick(p,"opacity"!==h)&&(r=a.pInt(r));return r};a.inArray=function(r,h){return(a.indexOfPolyfill||Array.prototype.indexOf).call(h,r)};a.grep=function(r,h){return(a.filterPolyfill||Array.prototype.filter).call(r,h)};a.find=Array.prototype.find?function(a,h){return a.find(h)}:function(a,h){var p,x=a.length;for(p=0;p<x;p++)if(h(a[p],p))return a[p]};a.map=function(a,h){for(var p=[],x=0,t=a.length;x<t;x++)p[x]=h.call(a[x],a[x],x,a);return p};
a.keys=function(r){return(a.keysPolyfill||Object.keys).call(void 0,r)};a.reduce=function(r,h,p){return(a.reducePolyfill||Array.prototype.reduce).call(r,h,p)};a.offset=function(a){var h=E.documentElement;a=a.parentElement?a.getBoundingClientRect():{top:0,left:0};return{top:a.top+(G.pageYOffset||h.scrollTop)-(h.clientTop||0),left:a.left+(G.pageXOffset||h.scrollLeft)-(h.clientLeft||0)}};a.stop=function(r,h){for(var p=a.timers.length;p--;)a.timers[p].elem!==r||h&&h!==a.timers[p].prop||(a.timers[p].stopped=
!0)};a.each=function(r,h,p){return(a.forEachPolyfill||Array.prototype.forEach).call(r,h,p)};a.objectEach=function(a,h,p){for(var x in a)a.hasOwnProperty(x)&&h.call(p,a[x],x,a)};a.addEvent=function(r,h,p){var x,t,q=r.addEventListener||a.addEventListenerPolyfill;r.hcEvents&&!r.hasOwnProperty("hcEvents")&&(t={},a.objectEach(r.hcEvents,function(a,k){t[k]=a.slice(0)}),r.hcEvents=t);x=r.hcEvents=r.hcEvents||{};q&&q.call(r,h,p,!1);x[h]||(x[h]=[]);x[h].push(p);return function(){a.removeEvent(r,h,p)}};a.removeEvent=
function(r,h,p){function x(k,f){var e=r.removeEventListener||a.removeEventListenerPolyfill;e&&e.call(r,k,f,!1)}function t(){var k,f;r.nodeName&&(h?(k={},k[h]=!0):k=z,a.objectEach(k,function(a,c){if(z[c])for(f=z[c].length;f--;)x(c,z[c][f])}))}var q,z=r.hcEvents,k;z&&(h?(q=z[h]||[],p?(k=a.inArray(p,q),-1<k&&(q.splice(k,1),z[h]=q),x(h,p)):(t(),z[h]=[])):(t(),r.hcEvents={}))};a.fireEvent=function(r,h,p,x){var t;t=r.hcEvents;var q,z;p=p||{};if(E.createEvent&&(r.dispatchEvent||r.fireEvent))t=E.createEvent("Events"),
t.initEvent(h,!0,!0),a.extend(t,p),r.dispatchEvent?r.dispatchEvent(t):r.fireEvent(h,t);else if(t)for(t=t[h]||[],q=t.length,p.target||a.extend(p,{preventDefault:function(){p.defaultPrevented=!0},target:r,type:h}),h=0;h<q;h++)(z=t[h])&&!1===z.call(r,p)&&p.preventDefault();x&&!p.defaultPrevented&&x(p)};a.animate=function(r,h,p){var x,t="",q,z,k;a.isObject(p)||(k=arguments,p={duration:k[2],easing:k[3],complete:k[4]});a.isNumber(p.duration)||(p.duration=400);p.easing="function"===typeof p.easing?p.easing:
Math[p.easing]||Math.easeInOutSine;p.curAnim=a.merge(h);a.objectEach(h,function(k,f){a.stop(r,f);z=new a.Fx(r,p,f);q=null;"d"===f?(z.paths=z.initPath(r,r.d,h.d),z.toD=h.d,x=0,q=1):r.attr?x=r.attr(f):(x=parseFloat(a.getStyle(r,f))||0,"opacity"!==f&&(t="px"));q||(q=k);q&&q.match&&q.match("px")&&(q=q.replace(/px/g,""));z.run(x,q,t)})};a.seriesType=function(r,h,p,x,t){var q=a.getOptions(),z=a.seriesTypes;q.plotOptions[r]=a.merge(q.plotOptions[h],p);z[r]=a.extendClass(z[h]||function(){},x);z[r].prototype.type=
r;t&&(z[r].prototype.pointClass=a.extendClass(a.Point,t));return z[r]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),h=0;return function(){return"highcharts-"+a+"-"+h++}}();G.jQuery&&(G.jQuery.fn.highcharts=function(){var r=[].slice.call(arguments);if(this[0])return r[0]?(new (a[a.isString(r[0])?r.shift():"Chart"])(this[0],r[0],r[1]),this):F[a.attr(this[0],"data-highcharts-chart")]})})(L);(function(a){var F=a.each,E=a.isNumber,G=a.map,r=a.merge,h=a.pInt;a.Color=function(p){if(!(this instanceof
a.Color))return new a.Color(p);this.init(p)};a.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(a){return[h(a[1]),h(a[2]),h(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(a){return[h(a[1]),h(a[2]),h(a[3]),1]}}],names:{none:"rgba(255,255,255,0)",white:"#ffffff",black:"#000000"},init:function(p){var h,t,q,z;if((this.input=p=this.names[p&&
p.toLowerCase?p.toLowerCase():""]||p)&&p.stops)this.stops=G(p.stops,function(k){return new a.Color(k[1])});else if(p&&p.charAt&&"#"===p.charAt()&&(h=p.length,p=parseInt(p.substr(1),16),7===h?t=[(p&16711680)>>16,(p&65280)>>8,p&255,1]:4===h&&(t=[(p&3840)>>4|(p&3840)>>8,(p&240)>>4|p&240,(p&15)<<4|p&15,1])),!t)for(q=this.parsers.length;q--&&!t;)z=this.parsers[q],(h=z.regex.exec(p))&&(t=z.parse(h));this.rgba=t||[]},get:function(a){var p=this.input,t=this.rgba,q;this.stops?(q=r(p),q.stops=[].concat(q.stops),
F(this.stops,function(t,k){q.stops[k]=[q.stops[k][0],t.get(a)]})):q=t&&E(t[0])?"rgb"===a||!a&&1===t[3]?"rgb("+t[0]+","+t[1]+","+t[2]+")":"a"===a?t[3]:"rgba("+t.join(",")+")":p;return q},brighten:function(a){var p,t=this.rgba;if(this.stops)F(this.stops,function(t){t.brighten(a)});else if(E(a)&&0!==a)for(p=0;3>p;p++)t[p]+=h(255*a),0>t[p]&&(t[p]=0),255<t[p]&&(t[p]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,h){var t=this.rgba,q=a.rgba;q.length&&t&&t.length?
(a=1!==q[3]||1!==t[3],h=(a?"rgba(":"rgb(")+Math.round(q[0]+(t[0]-q[0])*(1-h))+","+Math.round(q[1]+(t[1]-q[1])*(1-h))+","+Math.round(q[2]+(t[2]-q[2])*(1-h))+(a?","+(q[3]+(t[3]-q[3])*(1-h)):"")+")"):h=a.input||"none";return h}};a.color=function(h){return new a.Color(h)}})(L);(function(a){var F,E,G=a.addEvent,r=a.animate,h=a.attr,p=a.charts,x=a.color,t=a.css,q=a.createElement,z=a.defined,k=a.deg2rad,m=a.destroyObjectProperties,f=a.doc,e=a.each,c=a.extend,b=a.erase,w=a.grep,l=a.hasTouch,D=a.inArray,H=
a.isArray,C=a.isFirefox,K=a.isMS,g=a.isObject,y=a.isString,J=a.isWebKit,A=a.merge,d=a.noop,v=a.objectEach,B=a.pick,u=a.pInt,n=a.removeEvent,P=a.stop,M=a.svg,O=a.SVG_NS,N=a.symbolSizes,R=a.win;F=a.SVGElement=function(){return this};c(F.prototype,{opacity:1,SVG_NS:O,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline".split(" "),init:function(a,d){this.element="span"===d?q(d):f.createElementNS(this.SVG_NS,d);this.renderer=
a},animate:function(I,d,u){d=a.animObject(B(d,this.renderer.globalAnimation,!0));0!==d.duration?(u&&(d.complete=u),r(this,I,d)):(this.attr(I,null,u),d.step&&d.step.call(this));return this},colorGradient:function(I,d,u){var n=this.renderer,b,c,g,l,w,M,S,f,D,y,B=[],k;I.radialGradient?c="radialGradient":I.linearGradient&&(c="linearGradient");c&&(g=I[c],w=n.gradients,S=I.stops,y=u.radialReference,H(g)&&(I[c]=g={x1:g[0],y1:g[1],x2:g[2],y2:g[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===c&&y&&
!z(g.gradientUnits)&&(l=g,g=A(g,n.getRadialAttr(y,l),{gradientUnits:"userSpaceOnUse"})),v(g,function(a,I){"id"!==I&&B.push(I,a)}),v(S,function(a){B.push(a)}),B=B.join(","),w[B]?y=w[B].attr("id"):(g.id=y=a.uniqueKey(),w[B]=M=n.createElement(c).attr(g).add(n.defs),M.radAttr=l,M.stops=[],e(S,function(I){0===I[1].indexOf("rgba")?(b=a.color(I[1]),f=b.get("rgb"),D=b.get("a")):(f=I[1],D=1);I=n.createElement("stop").attr({offset:I[0],"stop-color":f,"stop-opacity":D}).add(M);M.stops.push(I)})),k="url("+n.url+
"#"+y+")",u.setAttribute(d,k),u.gradient=B,I.toString=function(){return k})},applyTextOutline:function(I){var d=this.element,u,n,c,g,v;-1!==I.indexOf("contrast")&&(I=I.replace(/contrast/g,this.renderer.getContrast(d.style.fill)));I=I.split(" ");n=I[I.length-1];if((c=I[0])&&"none"!==c&&a.svg){this.fakeTS=!0;I=[].slice.call(d.getElementsByTagName("tspan"));this.ySetter=this.xSetter;c=c.replace(/(^[\d\.]+)(.*?)$/g,function(a,I,d){return 2*I+d});for(v=I.length;v--;)u=I[v],"highcharts-text-outline"===
u.getAttribute("class")&&b(I,d.removeChild(u));g=d.firstChild;e(I,function(a,I){0===I&&(a.setAttribute("x",d.getAttribute("x")),I=d.getAttribute("y"),a.setAttribute("y",I||0),null===I&&d.setAttribute("y",0));a=a.cloneNode(1);h(a,{"class":"highcharts-text-outline",fill:n,stroke:n,"stroke-width":c,"stroke-linejoin":"round"});d.insertBefore(a,g)})}},attr:function(a,d,u,n){var I,b=this.element,c,g=this,e,l;"string"===typeof a&&void 0!==d&&(I=a,a={},a[I]=d);"string"===typeof a?g=(this[a+"Getter"]||this._defaultGetter).call(this,
a,b):(v(a,function(I,d){e=!1;n||P(this,d);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(d)&&(c||(this.symbolAttr(a),c=!0),e=!0);!this.rotation||"x"!==d&&"y"!==d||(this.doTransform=!0);e||(l=this[d+"Setter"]||this._defaultSetter,l.call(this,I,d,b),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(d)&&this.updateShadows(d,I,l))},this),this.afterSetters());u&&u();return g},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=
!1)},updateShadows:function(a,d,u){for(var I=this.shadows,n=I.length;n--;)u.call(I[n],"height"===a?Math.max(d-(I[n].cutHeight||0),0):"d"===a?this.d:d,a,I[n])},addClass:function(a,d){var I=this.attr("class")||"";-1===I.indexOf(a)&&(d||(a=(I+(I?" ":"")+a).replace("  "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==D(a,(this.attr("class")||"").split(" "))},removeClass:function(a){return this.attr("class",(this.attr("class")||"").replace(a,""))},symbolAttr:function(a){var d=
this;e("x y r start end width height innerR anchorX anchorY".split(" "),function(I){d[I]=B(a[I],d[I])});d.attr({d:d.renderer.symbols[d.symbolName](d.x,d.y,d.width,d.height,d)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,d){var I=this,u={},n;d=d||a.strokeWidth||0;n=Math.round(d)%2/2;a.x=Math.floor(a.x||I.x||0)+n;a.y=Math.floor(a.y||I.y||0)+n;a.width=Math.floor((a.width||I.width||0)-2*n);a.height=Math.floor((a.height||I.height||0)-
2*n);z(a.strokeWidth)&&(a.strokeWidth=d);v(a,function(a,d){I[d]!==a&&(I[d]=u[d]=a)});return u},css:function(a){var d=this.styles,n={},I=this.element,b,g="",e,l=!d,A=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);d&&v(a,function(a,u){a!==d[u]&&(n[u]=a,l=!0)});l&&(d&&(a=c(d,n)),b=this.textWidth=a&&a.width&&"auto"!==a.width&&"text"===I.nodeName.toLowerCase()&&u(a.width),this.styles=a,b&&!M&&this.renderer.forExport&&delete a.width,K&&!M?t(this.element,a):(e=function(a,d){return"-"+
d.toLowerCase()},v(a,function(a,d){-1===D(d,A)&&(g+=d.replace(/([A-Z])/g,e)+":"+a+";")}),g&&h(I,"style",g)),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},strokeWidth:function(){return this["stroke-width"]||0},on:function(a,d){var u=this,n=u.element;l&&"click"===a?(n.ontouchstart=function(a){u.touchEventFired=Date.now();a.preventDefault();d.call(n,a)},n.onclick=function(a){(-1===R.navigator.userAgent.indexOf("Android")||
1100<Date.now()-(u.touchEventFired||0))&&d.call(n,a)}):n["on"+a]=d;return this},setRadialReference:function(a){var d=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;d&&d.radAttr&&d.animate(this.renderer.getRadialAttr(a,d.radAttr));return this},translate:function(a,d){return this.attr({translateX:a,translateY:d})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,d=this.translateY||0,u=this.scaleX,
n=this.scaleY,b=this.inverted,c=this.rotation,g=this.matrix,v=this.element;b&&(a+=this.width,d+=this.height);a=["translate("+a+","+d+")"];z(g)&&a.push("matrix("+g.join(",")+")");b?a.push("rotate(90) scale(-1,1)"):c&&a.push("rotate("+c+" "+B(this.rotationOriginX,v.getAttribute("x"),0)+" "+B(this.rotationOriginY,v.getAttribute("y")||0)+")");(z(u)||z(n))&&a.push("scale("+B(u,1)+" "+B(n,1)+")");a.length&&v.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);
return this},align:function(a,d,u){var n,I,c,g,v={};I=this.renderer;c=I.alignedObjects;var e,l;if(a){if(this.alignOptions=a,this.alignByTranslate=d,!u||y(u))this.alignTo=n=u||"renderer",b(c,this),c.push(this),u=null}else a=this.alignOptions,d=this.alignByTranslate,n=this.alignTo;u=B(u,I[n],I);n=a.align;I=a.verticalAlign;c=(u.x||0)+(a.x||0);g=(u.y||0)+(a.y||0);"right"===n?e=1:"center"===n&&(e=2);e&&(c+=(u.width-(a.width||0))/e);v[d?"translateX":"x"]=Math.round(c);"bottom"===I?l=1:"middle"===I&&(l=
2);l&&(g+=(u.height-(a.height||0))/l);v[d?"translateY":"y"]=Math.round(g);this[this.placed?"animate":"attr"](v);this.placed=!0;this.alignAttr=v;return this},getBBox:function(a,d){var u,n=this.renderer,b,I=this.element,g=this.styles,v,l=this.textStr,A,w=n.cache,M=n.cacheKeys,f;d=B(d,this.rotation);b=d*k;v=g&&g.fontSize;z(l)&&(f=l.toString(),-1===f.indexOf("\x3c")&&(f=f.replace(/[0-9]/g,"0")),f+=["",d||0,v,g&&g.width,g&&g.textOverflow].join());f&&!a&&(u=w[f]);if(!u){if(I.namespaceURI===this.SVG_NS||
n.forExport){try{(A=this.fakeTS&&function(a){e(I.querySelectorAll(".highcharts-text-outline"),function(d){d.style.display=a})})&&A("none"),u=I.getBBox?c({},I.getBBox()):{width:I.offsetWidth,height:I.offsetHeight},A&&A("")}catch(T){}if(!u||0>u.width)u={width:0,height:0}}else u=this.htmlGetBBox();n.isSVG&&(a=u.width,n=u.height,g&&"11px"===g.fontSize&&17===Math.round(n)&&(u.height=n=14),d&&(u.width=Math.abs(n*Math.sin(b))+Math.abs(a*Math.cos(b)),u.height=Math.abs(n*Math.cos(b))+Math.abs(a*Math.sin(b))));
if(f&&0<u.height){for(;250<M.length;)delete w[M.shift()];w[f]||M.push(f);w[f]=u}}return u},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var d=this;d.animate({opacity:0},{duration:a||150,complete:function(){d.attr({y:-9999})}})},add:function(a){var d=this.renderer,u=this.element,n;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&d.buildText(this);this.added=!0;if(!a||
a.handleZ||this.zIndex)n=this.zIndexSetter();n||(a?a.element:d.box).appendChild(u);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var d=a.parentNode;d&&d.removeChild(a)},destroy:function(){var a=this,d=a.element||{},u=a.renderer.isSVG&&"SPAN"===d.nodeName&&a.parentGroup,n=d.ownerSVGElement;d.onclick=d.onmouseout=d.onmouseover=d.onmousemove=d.point=null;P(a);a.clipPath&&n&&(e(n.querySelectorAll("[clip-path],[CLIP-PATH]"),function(d){d.getAttribute("clip-path").match(RegExp('[("]#'+
a.clipPath.element.id+'[)"]'))&&d.removeAttribute("clip-path")}),a.clipPath=a.clipPath.destroy());if(a.stops){for(n=0;n<a.stops.length;n++)a.stops[n]=a.stops[n].destroy();a.stops=null}a.safeRemoveChild(d);for(a.destroyShadows();u&&u.div&&0===u.div.childNodes.length;)d=u.parentGroup,a.safeRemoveChild(u.div),delete u.div,u=d;a.alignTo&&b(a.renderer.alignedObjects,a);v(a,function(d,u){delete a[u]});return null},shadow:function(a,d,u){var n=[],b,c,g=this.element,v,I,e,l;if(!a)this.destroyShadows();else if(!this.shadows){I=
B(a.width,3);e=(a.opacity||.15)/I;l=this.parentInverted?"(-1,-1)":"("+B(a.offsetX,1)+", "+B(a.offsetY,1)+")";for(b=1;b<=I;b++)c=g.cloneNode(0),v=2*I+1-2*b,h(c,{isShadow:"true",stroke:a.color||"#000000","stroke-opacity":e*b,"stroke-width":v,transform:"translate"+l,fill:"none"}),u&&(h(c,"height",Math.max(h(c,"height")-v,0)),c.cutHeight=v),d?d.element.appendChild(c):g.parentNode&&g.parentNode.insertBefore(c,g),n.push(c);this.shadows=n}return this},destroyShadows:function(){e(this.shadows||[],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=B(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,d,u){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[d]!==a&&(u.setAttribute(d,a),this[d]=a)},dashstyleSetter:function(a){var d,n=this["stroke-width"];"inherit"===n&&(n=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(d=a.length;d--;)a[d]=u(a[d])*n;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,
d,u){this[d]=a;u.setAttribute(d,a)},titleSetter:function(a){var d=this.element.getElementsByTagName("title")[0];d||(d=f.createElementNS(this.SVG_NS,"title"),this.element.appendChild(d));d.firstChild&&d.removeChild(d.firstChild);d.appendChild(f.createTextNode(String(B(a),"").replace(/<[^>]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,d,u){"string"===typeof a?u.setAttribute(d,a):a&&this.colorGradient(a,
d,u)},visibilitySetter:function(a,d,u){"inherit"===a?u.removeAttribute(d):this[d]!==a&&u.setAttribute(d,a);this[d]=a},zIndexSetter:function(a,d){var n=this.renderer,b=this.parentGroup,c=(b||n).element||n.box,g,v=this.element,e,l,n=c===n.box;g=this.added;var A;z(a)&&(v.zIndex=a,a=+a,this[d]===a&&(g=!1),this[d]=a);if(g){(a=this.zIndex)&&b&&(b.handleZ=!0);d=c.childNodes;for(A=d.length-1;0<=A&&!e;A--)if(b=d[A],g=b.zIndex,l=!z(g),b!==v)if(0>a&&l&&!n&&!A)c.insertBefore(v,d[A]),e=!0;else if(u(g)<=a||l&&
(!z(a)||0<=a))c.insertBefore(v,d[A+1]||null),e=!0;e||(c.insertBefore(v,d[n?3:0]||null),e=!0)}return e},_defaultSetter:function(a,d,u){u.setAttribute(d,a)}});F.prototype.yGetter=F.prototype.xGetter;F.prototype.translateXSetter=F.prototype.translateYSetter=F.prototype.rotationSetter=F.prototype.verticalAlignSetter=F.prototype.rotationOriginXSetter=F.prototype.rotationOriginYSetter=F.prototype.scaleXSetter=F.prototype.scaleYSetter=F.prototype.matrixSetter=function(a,d){this[d]=a;this.doTransform=!0};
F.prototype["stroke-widthSetter"]=F.prototype.strokeSetter=function(a,d,u){this[d]=a;this.stroke&&this["stroke-width"]?(F.prototype.fillSetter.call(this,this.stroke,"stroke",u),u.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===d&&0===a&&this.hasStroke&&(u.removeAttribute("stroke"),this.hasStroke=!1)};E=a.SVGRenderer=function(){this.init.apply(this,arguments)};c(E.prototype,{Element:F,SVG_NS:O,init:function(a,d,u,n,b,c){var g;n=this.createElement("svg").attr({version:"1.1",
"class":"highcharts-root"}).css(this.getStyle(n));g=n.element;a.appendChild(g);h(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&h(g,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=g;this.boxWrapper=n;this.alignedObjects=[];this.url=(C||J)&&f.getElementsByTagName("base").length?R.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(f.createTextNode("Created with Highstock 6.0.3"));this.defs=
this.createElement("defs").add();this.allowHTML=c;this.forExport=b;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(d,u,!1);var v;C&&a.getBoundingClientRect&&(d=function(){t(a,{left:0,top:0});v=a.getBoundingClientRect();t(a,{left:Math.ceil(v.left)-v.left+"px",top:Math.ceil(v.top)-v.top+"px"})},d(),this.unSubPixelFix=G(R,"resize",d))},getStyle:function(a){return this.style=c({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();m(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var d=new this.Element;d.init(this,a);return d},draw:d,getRadialAttr:function(a,d){return{cx:a[0]-a[2]/2+d.cx*a[2],cy:a[1]-
a[2]/2+d.cy*a[2],r:d.r*a[2]}},getSpanWidth:function(a,d){var u=a.getBBox(!0).width;!M&&this.forExport&&(u=this.measureSpanWidth(d.firstChild.data,a.styles));return u},applyEllipsis:function(a,d,u,n){var b=a.rotation,c=u,g,v=0,e=u.length,l=function(a){d.removeChild(d.firstChild);a&&d.appendChild(f.createTextNode(a))},A;a.rotation=0;c=this.getSpanWidth(a,d);if(A=c>n){for(;v<=e;)g=Math.ceil((v+e)/2),c=u.substring(0,g)+"\u2026",l(c),c=this.getSpanWidth(a,d),v===e?v=e+1:c>n?e=g-1:v=g;0===e&&l("")}a.rotation=
b;return A},escapes:{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;","'":"\x26#39;",'"':"\x26quot"},buildText:function(a){var d=a.element,n=this,b=n.forExport,c=B(a.textStr,"").toString(),g=-1!==c.indexOf("\x3c"),l=d.childNodes,A,I,y,D,k=h(d,"x"),m=a.styles,C=a.textWidth,N=m&&m.lineHeight,P=m&&m.textOutline,H=m&&"ellipsis"===m.textOverflow,J=m&&"nowrap"===m.whiteSpace,q=m&&m.fontSize,R,p,z=l.length,m=C&&!a.added&&this.box,K=function(a){var b;b=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:
q||n.style.fontSize||12;return N?u(N):n.fontMetrics(b,a.getAttribute("style")?a:d).h},x=function(a){v(n.escapes,function(d,u){a=a.replace(new RegExp(d,"g"),u)});return a};R=[c,H,J,N,P,q,C].join();if(R!==a.textCache){for(a.textCache=R;z--;)d.removeChild(l[z]);g||P||H||C||-1!==c.indexOf(" ")?(A=/<.*class="([^"]+)".*>/,I=/<.*style="([^"]+)".*>/,y=/<.*href="([^"]+)".*>/,m&&m.appendChild(d),c=g?c.replace(/<(b|strong)>/g,'\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g,'\x3cspan style\x3d"font-style:italic"\x3e').replace(/<a/g,
"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g):[c],c=w(c,function(a){return""!==a}),e(c,function(u,c){var g,v=0;u=u.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");g=u.split("|||");e(g,function(u){if(""!==u||1===g.length){var e={},l=f.createElementNS(n.SVG_NS,"tspan"),w,B;A.test(u)&&(w=u.match(A)[1],h(l,"class",w));I.test(u)&&(B=u.match(I)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),h(l,"style",B));y.test(u)&&!b&&(h(l,
"onclick",'location.href\x3d"'+u.match(y)[1]+'"'),h(l,"class","highcharts-anchor"),t(l,{cursor:"pointer"}));u=x(u.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==u){l.appendChild(f.createTextNode(u));v?e.dx=0:c&&null!==k&&(e.x=k);h(l,e);d.appendChild(l);!v&&p&&(!M&&b&&t(l,{display:"block"}),h(l,"dy",K(l)));if(C){e=u.replace(/([^\^])-/g,"$1- ").split(" ");w=1<g.length||c||1<e.length&&!J;var m=[],N,P=K(l),S=a.rotation;for(H&&(D=n.applyEllipsis(a,l,u,C));!H&&w&&(e.length||m.length);)a.rotation=0,
N=n.getSpanWidth(a,l),u=N>C,void 0===D&&(D=u),u&&1!==e.length?(l.removeChild(l.firstChild),m.unshift(e.pop())):(e=m,m=[],e.length&&!J&&(l=f.createElementNS(O,"tspan"),h(l,{dy:P,x:k}),B&&h(l,"style",B),d.appendChild(l)),N>C&&(C=N)),e.length&&l.appendChild(f.createTextNode(e.join(" ").replace(/- /g,"-")));a.rotation=S}v++}}});p=p||d.childNodes.length}),D&&a.attr("title",a.textStr),m&&m.removeChild(d),P&&a.applyTextOutline&&a.applyTextOutline(P)):d.appendChild(f.createTextNode(x(c)))}},getContrast:function(a){a=
x(a).rgba;return 510<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,d,u,n,b,g,v,e,l){var w=this.label(a,d,u,l,null,null,null,null,"button"),M=0;w.attr(A({padding:8,r:2},b));var f,I,B,D;b=A({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},b);f=b.style;delete b.style;g=A(b,{fill:"#e6e6e6"},g);I=g.style;delete g.style;v=A(b,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},v);B=v.style;delete v.style;e=A(b,{style:{color:"#cccccc"}},
e);D=e.style;delete e.style;G(w.element,K?"mouseover":"mouseenter",function(){3!==M&&w.setState(1)});G(w.element,K?"mouseout":"mouseleave",function(){3!==M&&w.setState(M)});w.setState=function(a){1!==a&&(w.state=M=a);w.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0]);w.attr([b,g,v,e][a||0]).css([f,I,B,D][a||0])};w.attr(b).css(c({cursor:"default"},f));return w.on("click",function(a){3!==M&&n.call(w,a)})},crispLine:function(a,
d){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-d%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+d%2/2);return a},path:function(a){var d={fill:"none"};H(a)?d.d=a:g(a)&&c(d,a);return this.createElement("path").attr(d)},circle:function(a,d,u){a=g(a)?a:{x:a,y:d,r:u};d=this.createElement("circle");d.xSetter=d.ySetter=function(a,d,u){u.setAttribute("c"+d,a)};return d.attr(a)},arc:function(a,d,u,n,b,c){g(a)?(n=a,d=n.y,u=n.r,a=n.x):n={innerR:n,start:b,end:c};a=this.symbol("arc",a,d,u,u,n);a.r=u;return a},rect:function(a,
d,u,n,b,c){b=g(a)?a.r:b;var v=this.createElement("rect");a=g(a)?a:void 0===a?{}:{x:a,y:d,width:Math.max(u,0),height:Math.max(n,0)};void 0!==c&&(a.strokeWidth=c,a=v.crisp(a));a.fill="none";b&&(a.r=b);v.rSetter=function(a,d,u){h(u,{rx:a,ry:a})};return v.attr(a)},setSize:function(a,d,u){var n=this.alignedObjects,b=n.length;this.width=a;this.height=d;for(this.boxWrapper.animate({width:a,height:d},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:B(u,!0)?
void 0:0});b--;)n[b].align()},g:function(a){var d=this.createElement("g");return a?d.attr({"class":"highcharts-"+a}):d},image:function(a,d,u,n,b){var g={preserveAspectRatio:"none"};1<arguments.length&&c(g,{x:d,y:u,width:n,height:b});g=this.createElement("image").attr(g);g.element.setAttributeNS?g.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):g.element.setAttribute("hc-svg-href",a);return g},symbol:function(a,d,u,n,b,g){var v=this,l,A=/^url\((.*?)\)$/,w=A.test(a),M=!w&&(this.symbols[a]?
a:"circle"),D=M&&this.symbols[M],y=z(d)&&D&&D.call(this.symbols,Math.round(d),Math.round(u),n,b,g),k,m;D?(l=this.path(y),l.attr("fill","none"),c(l,{symbolName:M,x:d,y:u,width:n,height:b}),g&&c(l,g)):w&&(k=a.match(A)[1],l=this.image(k),l.imgwidth=B(N[k]&&N[k].width,g&&g.width),l.imgheight=B(N[k]&&N[k].height,g&&g.height),m=function(){l.attr({width:l.width,height:l.height})},e(["width","height"],function(a){l[a+"Setter"]=function(a,d){var u={},n=this["img"+d],b="width"===d?"translateX":"translateY";
this[d]=a;z(n)&&(this.element&&this.element.setAttribute(d,n),this.alignByTranslate||(u[b]=((this[d]||0)-n)/2,this.attr(u)))}}),z(d)&&l.attr({x:d,y:u}),l.isImg=!0,z(l.imgwidth)&&z(l.imgheight)?m():(l.attr({width:0,height:0}),q("img",{onload:function(){var a=p[v.chartIndex];0===this.width&&(t(this,{position:"absolute",top:"-999em"}),f.body.appendChild(this));N[k]={width:this.width,height:this.height};l.imgwidth=this.width;l.imgheight=this.height;l.element&&m();this.parentNode&&this.parentNode.removeChild(this);
v.imgCount--;if(!v.imgCount&&a&&a.onload)a.onload()},src:k}),this.imgCount++));return l},symbols:{circle:function(a,d,u,n){return this.arc(a+u/2,d+n/2,u/2,n/2,{start:0,end:2*Math.PI,open:!1})},square:function(a,d,u,n){return["M",a,d,"L",a+u,d,a+u,d+n,a,d+n,"Z"]},triangle:function(a,d,u,n){return["M",a+u/2,d,"L",a+u,d+n,a,d+n,"Z"]},"triangle-down":function(a,d,u,n){return["M",a,d,"L",a+u,d,a+u/2,d+n,"Z"]},diamond:function(a,d,u,n){return["M",a+u/2,d,"L",a+u,d+n/2,a+u/2,d+n,a,d+n/2,"Z"]},arc:function(a,
d,u,n,b){var g=b.start,c=b.r||u,v=b.r||n||u,l=b.end-.001;u=b.innerR;n=B(b.open,.001>Math.abs(b.end-b.start-2*Math.PI));var e=Math.cos(g),A=Math.sin(g),w=Math.cos(l),l=Math.sin(l);b=.001>b.end-g-Math.PI?0:1;c=["M",a+c*e,d+v*A,"A",c,v,0,b,1,a+c*w,d+v*l];z(u)&&c.push(n?"M":"L",a+u*w,d+u*l,"A",u,u,0,b,0,a+u*e,d+u*A);c.push(n?"":"Z");return c},callout:function(a,d,u,n,b){var g=Math.min(b&&b.r||0,u,n),c=g+6,v=b&&b.anchorX;b=b&&b.anchorY;var l;l=["M",a+g,d,"L",a+u-g,d,"C",a+u,d,a+u,d,a+u,d+g,"L",a+u,d+n-
g,"C",a+u,d+n,a+u,d+n,a+u-g,d+n,"L",a+g,d+n,"C",a,d+n,a,d+n,a,d+n-g,"L",a,d+g,"C",a,d,a,d,a+g,d];v&&v>u?b>d+c&&b<d+n-c?l.splice(13,3,"L",a+u,b-6,a+u+6,b,a+u,b+6,a+u,d+n-g):l.splice(13,3,"L",a+u,n/2,v,b,a+u,n/2,a+u,d+n-g):v&&0>v?b>d+c&&b<d+n-c?l.splice(33,3,"L",a,b+6,a-6,b,a,b-6,a,d+g):l.splice(33,3,"L",a,n/2,v,b,a,n/2,a,d+g):b&&b>n&&v>a+c&&v<a+u-c?l.splice(23,3,"L",v+6,d+n,v,d+n+6,v-6,d+n,a+g,d+n):b&&0>b&&v>a+c&&v<a+u-c&&l.splice(3,3,"L",v-6,d,v,d-6,v+6,d,u-g,d);return l}},clipRect:function(d,u,n,
b){var g=a.uniqueKey(),c=this.createElement("clipPath").attr({id:g}).add(this.defs);d=this.rect(d,u,n,b,0).add(c);d.id=g;d.clipPath=c;d.count=0;return d},text:function(a,d,u,n){var b={};if(n&&(this.allowHTML||!this.forExport))return this.html(a,d,u);b.x=Math.round(d||0);u&&(b.y=Math.round(u));if(a||0===a)b.text=a;a=this.createElement("text").attr(b);n||(a.xSetter=function(a,d,u){var n=u.getElementsByTagName("tspan"),b,g=u.getAttribute(d),c;for(c=0;c<n.length;c++)b=n[c],b.getAttribute(d)===g&&b.setAttribute(d,
a);u.setAttribute(d,a)});return a},fontMetrics:function(a,d){a=a||d&&d.style&&d.style.fontSize||this.style&&this.style.fontSize;a=/px/.test(a)?u(a):/em/.test(a)?parseFloat(a)*(d?this.fontMetrics(null,d.parentNode).f:16):12;d=24>a?a+3:Math.round(1.2*a);return{h:d,b:Math.round(.8*d),f:a}},rotCorr:function(a,d,u){var n=a;d&&u&&(n=Math.max(n*Math.cos(d*k),4));return{x:-a/3*Math.sin(d*k),y:n}},label:function(d,u,b,g,v,l,w,M,f){var D=this,B=D.g("button"!==f&&"label"),k=B.text=D.text("",0,0,w).attr({zIndex:1}),
y,m,C=0,N=3,P=0,H,t,I,J,O,q={},R,h,p=/^url\((.*?)\)$/.test(g),K=p,x,S,r,W;f&&B.addClass("highcharts-"+f);K=p;x=function(){return(R||0)%2/2};S=function(){var a=k.element.style,d={};m=(void 0===H||void 0===t||O)&&z(k.textStr)&&k.getBBox();B.width=(H||m.width||0)+2*N+P;B.height=(t||m.height||0)+2*N;h=N+D.fontMetrics(a&&a.fontSize,k).b;K&&(y||(B.box=y=D.symbols[g]||p?D.symbol(g):D.rect(),y.addClass(("button"===f?"":"highcharts-label-box")+(f?" highcharts-"+f+"-box":"")),y.add(B),a=x(),d.x=a,d.y=(M?-h:
0)+a),d.width=Math.round(B.width),d.height=Math.round(B.height),y.attr(c(d,q)),q={})};r=function(){var a=P+N,d;d=M?0:h;z(H)&&m&&("center"===O||"right"===O)&&(a+={center:.5,right:1}[O]*(H-m.width));if(a!==k.x||d!==k.y)k.attr("x",a),void 0!==d&&k.attr("y",d);k.x=a;k.y=d};W=function(a,d){y?y.attr(a,d):q[a]=d};B.onAdd=function(){k.add(B);B.attr({text:d||0===d?d:"",x:u,y:b});y&&z(v)&&B.attr({anchorX:v,anchorY:l})};B.widthSetter=function(d){H=a.isNumber(d)?d:null};B.heightSetter=function(a){t=a};B["text-alignSetter"]=
function(a){O=a};B.paddingSetter=function(a){z(a)&&a!==N&&(N=B.padding=a,r())};B.paddingLeftSetter=function(a){z(a)&&a!==P&&(P=a,r())};B.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==C&&(C=a,m&&B.attr({x:I}))};B.textSetter=function(a){void 0!==a&&k.textSetter(a);S();r()};B["stroke-widthSetter"]=function(a,d){a&&(K=!0);R=this["stroke-width"]=a;W(d,a)};B.strokeSetter=B.fillSetter=B.rSetter=function(a,d){"r"!==d&&("fill"===d&&a&&(K=!0),B[d]=a);W(d,a)};B.anchorXSetter=function(a,d){v=B.anchorX=
a;W(d,Math.round(a)-x()-I)};B.anchorYSetter=function(a,d){l=B.anchorY=a;W(d,a-J)};B.xSetter=function(a){B.x=a;C&&(a-=C*((H||m.width)+2*N));I=Math.round(a);B.attr("translateX",I)};B.ySetter=function(a){J=B.y=Math.round(a);B.attr("translateY",J)};var aa=B.css;return c(B,{css:function(a){if(a){var d={};a=A(a);e(B.textProps,function(u){void 0!==a[u]&&(d[u]=a[u],delete a[u])});k.css(d)}return aa.call(B,a)},getBBox:function(){return{width:m.width+2*N,height:m.height+2*N,x:m.x-N,y:m.y-N}},shadow:function(a){a&&
(S(),y&&y.shadow(a));return B},destroy:function(){n(B.element,"mouseenter");n(B.element,"mouseleave");k&&(k=k.destroy());y&&(y=y.destroy());F.prototype.destroy.call(B);B=D=S=r=W=null}})}});a.Renderer=E})(L);(function(a){var F=a.attr,E=a.createElement,G=a.css,r=a.defined,h=a.each,p=a.extend,x=a.isFirefox,t=a.isMS,q=a.isWebKit,z=a.pick,k=a.pInt,m=a.SVGRenderer,f=a.win,e=a.wrap;p(a.SVGElement.prototype,{htmlCss:function(a){var b=this.element;if(b=a&&"SPAN"===b.tagName&&a.width)delete a.width,this.textWidth=
b,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=p(this.styles,a);G(this.element,a);return this},htmlGetBBox:function(){var a=this.element;return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,e=this.translateX||0,l=this.translateY||0,f=this.x||0,m=this.y||0,C=this.textAlign||"left",t={left:0,center:.5,right:1}[C],g=this.styles;
G(b,{marginLeft:e,marginTop:l});this.shadows&&h(this.shadows,function(a){G(a,{marginLeft:e+1,marginTop:l+1})});this.inverted&&h(b.childNodes,function(d){a.invertChild(d,b)});if("SPAN"===b.tagName){var y=this.rotation,J=k(this.textWidth),A=g&&g.whiteSpace,d=[y,C,b.innerHTML,this.textWidth,this.textAlign].join();d!==this.cTT&&(g=a.fontMetrics(b.style.fontSize).b,r(y)&&this.setSpanRotation(y,t,g),G(b,{width:"",whiteSpace:A||"nowrap"}),b.offsetWidth>J&&/[ \-]/.test(b.textContent||b.innerText)&&G(b,{width:J+
"px",display:"block",whiteSpace:A||"normal"}),this.getSpanCorrection(b.offsetWidth,g,t,y,C));G(b,{left:f+(this.xCorr||0)+"px",top:m+(this.yCorr||0)+"px"});q&&(g=b.offsetHeight);this.cTT=d}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,e){var c={},w=this.renderer.getTransformKey();c[w]=c.transform="rotate("+a+"deg)";c[w+(x?"Origin":"-origin")]=c.transformOrigin=100*b+"% "+e+"px";G(this.element,c)},getSpanCorrection:function(a,b,e){this.xCorr=-a*e;this.yCorr=-b}});p(m.prototype,{getTransformKey:function(){return t&&
!/Edge/.test(f.navigator.userAgent)?"-ms-transform":q?"-webkit-transform":x?"MozTransform":f.opera?"-o-transform":""},html:function(a,b,w){var c=this.createElement("span"),f=c.element,k=c.renderer,m=k.isSVG,q=function(a,b){h(["opacity","visibility"],function(g){e(a,g+"Setter",function(a,d,g,c){a.call(this,d,g,c);b[g]=d})})};c.textSetter=function(a){a!==f.innerHTML&&delete this.bBox;this.textStr=a;f.innerHTML=z(a,"");c.htmlUpdateTransform()};m&&q(c,c.element.style);c.xSetter=c.ySetter=c.alignSetter=
c.rotationSetter=function(a,b){"align"===b&&(b="textAlign");c[b]=a;c.htmlUpdateTransform()};c.attr({text:a,x:Math.round(b),y:Math.round(w)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"});f.style.whiteSpace="nowrap";c.css=c.htmlCss;m&&(c.add=function(a){var b,g=k.box.parentNode,e=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)e.push(a),a=a.parentGroup;h(e.reverse(),function(a){function d(d,u){a[u]=d;t?l[k.getTransformKey()]="translate("+(a.x||a.translateX)+
"px,"+(a.y||a.translateY)+"px)":"translateX"===u?l.left=d+"px":l.top=d+"px";a.doTransform=!0}var l,u=F(a.element,"class");u&&(u={className:u});b=a.div=a.div||E("div",u,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},b||g);l=b.style;p(a,{classSetter:function(a){this.element.setAttribute("class",a);b.className=a},on:function(){e[0].div&&c.on.apply({element:e[0].div},arguments);return a},translateXSetter:d,
translateYSetter:d});q(a,l)})}}else b=g;b.appendChild(f);c.added=!0;c.alignOnAdd&&c.htmlUpdateTransform();return c});return c}})})(L);(function(a){function F(){var t=a.defaultOptions.global,q=x.moment;if(t.timezone){if(q)return function(a){return-q.tz(a,t.timezone).utcOffset()};a.error(25)}return t.useUTC&&t.getTimezoneOffset}function E(){var t=a.defaultOptions.global,q,h=t.useUTC,k=h?"getUTC":"get",m=h?"setUTC":"set",f="Minutes Hours Day Date Month FullYear".split(" "),e=f.concat(["Milliseconds",
"Seconds"]);a.Date=q=t.Date||x.Date;q.hcTimezoneOffset=h&&t.timezoneOffset;q.hcGetTimezoneOffset=F();q.hcMakeTime=function(a,b,e,l,f,k){var c;h?(c=q.UTC.apply(0,arguments),c+=r(c)):c=(new q(a,b,p(e,1),p(l,0),p(f,0),p(k,0))).getTime();return c};for(t=0;t<f.length;t++)q["hcGet"+f[t]]=k+f[t];for(t=0;t<e.length;t++)q["hcSet"+e[t]]=m+e[t]}var G=a.color,r=a.getTZOffset,h=a.merge,p=a.pick,x=a.win;a.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:{useUTC:!0},chart:{borderRadius:0,
defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:20},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},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},
borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",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:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,backgroundColor:G("#f7f7f7").setOpacity(.85).get(),borderWidth:1,headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',
pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e',shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};a.setOptions=function(t){a.defaultOptions=h(!0,a.defaultOptions,t);E();
return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;E()})(L);(function(a){var F=a.correctFloat,E=a.defined,G=a.destroyObjectProperties,r=a.isNumber,h=a.merge,p=a.pick,x=a.deg2rad;a.Tick=function(a,q,h,k){this.axis=a;this.pos=q;this.type=h||"";this.isNewLabel=this.isNew=!0;h||k||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,q=a.options,z=a.chart,k=a.categories,m=a.names,f=this.pos,e=q.labels,c=a.tickPositions,
b=f===c[0],w=f===c[c.length-1],m=k?p(k[f],m[f],f):f,k=this.label,c=c.info,l;a.isDatetimeAxis&&c&&(l=q.dateTimeLabelFormats[c.higherRanks[f]||c.unitName]);this.isFirst=b;this.isLast=w;q=a.labelFormatter.call({axis:a,chart:z,isFirst:b,isLast:w,dateTimeLabelFormat:l,value:a.isLog?F(a.lin2log(m)):m,pos:f});E(k)?k&&k.attr({text:q}):(this.labelLength=(this.label=k=E(q)&&e.enabled?z.renderer.text(q,0,0,e.useHTML).css(h(e.style)).add(a.labelGroup):null)&&k.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?
this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var t=this.axis,h=a.x,k=t.chart.chartWidth,m=t.chart.spacing,f=p(t.labelLeft,Math.min(t.pos,m[3])),m=p(t.labelRight,Math.max(t.pos+t.len,k-m[1])),e=this.label,c=this.rotation,b={left:0,center:.5,right:1}[t.labelAlign],w=e.getBBox().width,l=t.getSlotWidth(),D=l,H=1,C,K={};if(c)0>c&&h-b*w<f?C=Math.round(h/Math.cos(c*x)-f):0<c&&h+b*w>m&&(C=Math.round((k-h)/Math.cos(c*x)));else if(k=h+(1-b)*w,h-b*w<f?D=a.x+D*(1-b)-f:
k>m&&(D=m-a.x+D*b,H=-1),D=Math.min(l,D),D<l&&"center"===t.labelAlign&&(a.x+=H*(l-D-b*(l-Math.min(w,D)))),w>D||t.autoRotation&&(e.styles||{}).width)C=D;C&&(K.width=C,(t.options.labels.style||{}).textOverflow||(K.textOverflow="ellipsis"),e.css(K))},getPosition:function(a,h,p,k){var m=this.axis,f=m.chart,e=k&&f.oldChartHeight||f.chartHeight;return{x:a?m.translate(h+p,null,null,k)+m.transB:m.left+m.offset+(m.opposite?(k&&f.oldChartWidth||f.chartWidth)-m.right-m.left:0),y:a?e-m.bottom+m.offset-(m.opposite?
m.height:0):e-m.translate(h+p,null,null,k)-m.transB}},getLabelPosition:function(a,h,p,k,m,f,e,c){var b=this.axis,w=b.transA,l=b.reversed,D=b.staggerLines,H=b.tickRotCorr||{x:0,y:0},C=m.y;E(C)||(C=0===b.side?p.rotation?-8:-p.getBBox().height:2===b.side?H.y+8:Math.cos(p.rotation*x)*(H.y-p.getBBox(!1,0).height/2));a=a+m.x+H.x-(f&&k?f*w*(l?-1:1):0);h=h+C-(f&&!k?f*w*(l?1:-1):0);D&&(p=e/(c||1)%D,b.opposite&&(p=D-p-1),h+=b.labelOffset/D*p);return{x:a,y:Math.round(h)}},getMarkPath:function(a,h,p,k,m,f){return f.crispLine(["M",
a,h,"L",a+(m?0:-p),h+(m?p:0)],k)},renderGridLine:function(a,h,p){var k=this.axis,m=k.options,f=this.gridLine,e={},c=this.pos,b=this.type,w=k.tickmarkOffset,l=k.chart.renderer,D=b?b+"Grid":"grid",H=m[D+"LineWidth"],C=m[D+"LineColor"],m=m[D+"LineDashStyle"];f||(e.stroke=C,e["stroke-width"]=H,m&&(e.dashstyle=m),b||(e.zIndex=1),a&&(e.opacity=0),this.gridLine=f=l.path().attr(e).addClass("highcharts-"+(b?b+"-":"")+"grid-line").add(k.gridGroup));if(!a&&f&&(a=k.getPlotLinePath(c+w,f.strokeWidth()*p,a,!0)))f[this.isNew?
"attr":"animate"]({d:a,opacity:h})},renderMark:function(a,h,z){var k=this.axis,m=k.options,f=k.chart.renderer,e=this.type,c=e?e+"Tick":"tick",b=k.tickSize(c),w=this.mark,l=!w,D=a.x;a=a.y;var H=p(m[c+"Width"],!e&&k.isXAxis?1:0),m=m[c+"Color"];b&&(k.opposite&&(b[0]=-b[0]),l&&(this.mark=w=f.path().addClass("highcharts-"+(e?e+"-":"")+"tick").add(k.axisGroup),w.attr({stroke:m,"stroke-width":H})),w[l?"attr":"animate"]({d:this.getMarkPath(D,a,b[0],w.strokeWidth()*z,k.horiz,f),opacity:h}))},renderLabel:function(a,
h,z,k){var m=this.axis,f=m.horiz,e=m.options,c=this.label,b=e.labels,w=b.step,l=m.tickmarkOffset,D=!0,H=a.x;a=a.y;c&&r(H)&&(c.xy=a=this.getLabelPosition(H,a,c,f,b,l,k,w),this.isFirst&&!this.isLast&&!p(e.showFirstLabel,1)||this.isLast&&!this.isFirst&&!p(e.showLastLabel,1)?D=!1:!f||m.isRadial||b.step||b.rotation||h||0===z||this.handleOverflow(a),w&&k%w&&(D=!1),D&&r(a.y)?(a.opacity=z,c[this.isNewLabel?"attr":"animate"](a),this.isNewLabel=!1):(c.attr("y",-9999),this.isNewLabel=!0))},render:function(a,
h,z){var k=this.axis,m=k.horiz,f=this.getPosition(m,this.pos,k.tickmarkOffset,h),e=f.x,c=f.y,k=m&&e===k.pos+k.len||!m&&c===k.pos?-1:1;z=p(z,1);this.isActive=!0;this.renderGridLine(h,z,k);this.renderMark(f,z,k);this.renderLabel(f,h,z,a);this.isNew=!1},destroy:function(){G(this,this.axis)}}})(L);var Z=function(a){var F=a.addEvent,E=a.animObject,G=a.arrayMax,r=a.arrayMin,h=a.color,p=a.correctFloat,x=a.defaultOptions,t=a.defined,q=a.deg2rad,z=a.destroyObjectProperties,k=a.each,m=a.extend,f=a.fireEvent,
e=a.format,c=a.getMagnitude,b=a.grep,w=a.inArray,l=a.isArray,D=a.isNumber,H=a.isString,C=a.merge,K=a.normalizeTickInterval,g=a.objectEach,y=a.pick,J=a.removeEvent,A=a.splat,d=a.syncTimeout,v=a.Tick,B=function(){this.init.apply(this,arguments)};a.extend(B.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,style:{color:"#666666",cursor:"default",
fontSize:"11px"},x:0},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},
maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return a.numberFormat(this.total,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],
x:0},title:{rotation:0}},init:function(a,d){var u=d.isX,n=this;n.chart=a;n.horiz=a.inverted&&!n.isZAxis?!u:u;n.isXAxis=u;n.coll=n.coll||(u?"xAxis":"yAxis");n.opposite=d.opposite;n.side=d.side||(n.horiz?n.opposite?0:2:n.opposite?1:3);n.setOptions(d);var b=this.options,c=b.type;n.labelFormatter=b.labels.formatter||n.defaultLabelFormatter;n.userOptions=d;n.minPixelPadding=0;n.reversed=b.reversed;n.visible=!1!==b.visible;n.zoomEnabled=!1!==b.zoomEnabled;n.hasNames="category"===c||!0===b.categories;n.categories=
b.categories||n.hasNames;n.names=n.names||[];n.plotLinesAndBandsGroups={};n.isLog="logarithmic"===c;n.isDatetimeAxis="datetime"===c;n.positiveValuesOnly=n.isLog&&!n.allowNegativeLog;n.isLinked=t(b.linkedTo);n.ticks={};n.labelEdge=[];n.minorTicks={};n.plotLinesAndBands=[];n.alternateBands={};n.len=0;n.minRange=n.userMinRange=b.minRange||b.maxZoom;n.range=b.range;n.offset=b.offset||0;n.stacks={};n.oldStacks={};n.stacksTouched=0;n.max=null;n.min=null;n.crosshair=y(b.crosshair,A(a.options.tooltip.crosshairs)[u?
0:1],!1);d=n.options.events;-1===w(n,a.axes)&&(u?a.axes.splice(a.xAxis.length,0,n):a.axes.push(n),a[n.coll].push(n));n.series=n.series||[];a.inverted&&!n.isZAxis&&u&&void 0===n.reversed&&(n.reversed=!0);g(d,function(a,d){F(n,d,a)});n.lin2log=b.linearToLogConverter||n.lin2log;n.isLog&&(n.val2lin=n.log2lin,n.lin2val=n.lin2log)},setOptions:function(a){this.options=C(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,
this.defaultLeftAxisOptions][this.side],C(x[this.coll],a))},defaultLabelFormatter:function(){var d=this.axis,n=this.value,b=d.categories,c=this.dateTimeLabelFormat,g=x.lang,v=g.numericSymbols,g=g.numericSymbolMagnitude||1E3,l=v&&v.length,A,w=d.options.labels.format,d=d.isLog?Math.abs(n):d.tickInterval;if(w)A=e(w,this);else if(b)A=n;else if(c)A=a.dateFormat(c,n);else if(l&&1E3<=d)for(;l--&&void 0===A;)b=Math.pow(g,l+1),d>=b&&0===10*n%b&&null!==v[l]&&0!==n&&(A=a.numberFormat(n/b,-1)+v[l]);void 0===
A&&(A=1E4<=Math.abs(n)?a.numberFormat(n,-1):a.numberFormat(n,-1,void 0,""));return A},getSeriesExtremes:function(){var a=this,d=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();k(a.series,function(n){if(n.visible||!d.options.chart.ignoreHiddenSeries){var u=n.options,c=u.threshold,g;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=c&&(c=null);if(a.isXAxis)u=n.xData,u.length&&(n=r(u),g=G(u),D(n)||n instanceof Date||(u=b(u,D),
n=r(u)),a.dataMin=Math.min(y(a.dataMin,u[0],n),n),a.dataMax=Math.max(y(a.dataMax,u[0],g),g));else if(n.getExtremes(),g=n.dataMax,n=n.dataMin,t(n)&&t(g)&&(a.dataMin=Math.min(y(a.dataMin,n),n),a.dataMax=Math.max(y(a.dataMax,g),g)),t(c)&&(a.threshold=c),!u.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,d,b,c,g,v){var n=this.linkedParent||this,u=1,e=0,l=c?n.oldTransA:n.transA;c=c?n.oldMin:n.min;var A=n.minPixelPadding;g=(n.isOrdinal||n.isBroken||n.isLog&&g)&&n.lin2val;
l||(l=n.transA);b&&(u*=-1,e=n.len);n.reversed&&(u*=-1,e-=u*(n.sector||n.len));d?(a=(a*u+e-A)/l+c,g&&(a=n.lin2val(a))):(g&&(a=n.val2lin(a)),a=D(c)?u*(a-c)*l+e+u*A+(D(v)?l*v:0):void 0);return a},toPixels:function(a,d){return this.translate(a,!1,!this.horiz,null,!0)+(d?0:this.pos)},toValue:function(a,d){return this.translate(a-(d?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,d,b,c,g){var n=this.chart,u=this.left,v=this.top,e,l,A=b&&n.oldChartHeight||n.chartHeight,w=b&&n.oldChartWidth||
n.chartWidth,f;e=this.transB;var B=function(a,d,n){if(a<d||a>n)c?a=Math.min(Math.max(d,a),n):f=!0;return a};g=y(g,this.translate(a,null,null,b));a=b=Math.round(g+e);e=l=Math.round(A-g-e);D(g)?this.horiz?(e=v,l=A-this.bottom,a=b=B(a,u,u+this.width)):(a=u,b=w-this.right,e=l=B(e,v,v+this.height)):(f=!0,c=!1);return f&&!c?null:n.renderer.crispLine(["M",a,e,"L",b,l],d||1)},getLinearTickPositions:function(a,d,b){var n,u=p(Math.floor(d/a)*a);b=p(Math.ceil(b/a)*a);var c=[],g;p(u+a)===u&&(g=20);if(this.single)return[d];
for(d=u;d<=b;){c.push(d);d=p(d+a,g);if(d===n)break;n=d}return c},getMinorTickInterval:function(){var a=this.options;return!0===a.minorTicks?y(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval},getMinorTickPositions:function(){var a=this,d=a.options,b=a.tickPositions,c=a.minorTickInterval,g=[],v=a.pointRangePadding||0,e=a.min-v,v=a.max+v,l=v-e;if(l&&l/c<a.len/3)if(a.isLog)k(this.paddedTicks,function(d,n,u){n&&g.push.apply(g,a.getLogTickPositions(c,u[n-1],u[n],!0))});else if(a.isDatetimeAxis&&
"auto"===this.getMinorTickInterval())g=g.concat(a.getTimeTicks(a.normalizeTimeTickInterval(c),e,v,d.startOfWeek));else for(d=e+(b[0]-e)%c;d<=v&&d!==g[0];d+=c)g.push(d);0!==g.length&&a.trimTicks(g);return g},adjustForMinRange:function(){var a=this.options,d=this.min,b=this.max,c,g,v,e,l,A,w,f;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(t(a.min)||t(a.max)?this.minRange=null:(k(this.series,function(a){A=a.xData;for(e=w=a.xIncrement?1:A.length-1;0<e;e--)if(l=A[e]-A[e-1],void 0===v||l<v)v=l}),
this.minRange=Math.min(5*v,this.dataMax-this.dataMin)));b-d<this.minRange&&(g=this.dataMax-this.dataMin>=this.minRange,f=this.minRange,c=(f-b+d)/2,c=[d-c,y(a.min,d-c)],g&&(c[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),d=G(c),b=[d+f,y(a.max,d+f)],g&&(b[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),b=r(b),b-d<f&&(c[0]=b-f,c[1]=y(a.min,b-f),d=G(c)));this.min=d;this.max=b},getClosest:function(){var a;this.categories?a=1:k(this.series,function(d){var n=d.closestPointRange,b=d.visible||
!d.chart.options.chart.ignoreHiddenSeries;!d.noSharedTooltip&&t(n)&&b&&(a=t(a)?Math.min(a,n):n)});return a},nameToX:function(a){var d=l(this.categories),b=d?this.categories:this.names,u=a.options.x,c;a.series.requireSorting=!1;t(u)||(u=!1===this.options.uniqueNames?a.series.autoIncrement():w(a.name,b));-1===u?d||(c=b.length):c=u;void 0!==c&&(this.names[c]=a.name);return c},updateNames:function(){var a=this;0<this.names.length&&(this.names.length=0,this.minRange=this.userMinRange,k(this.series||[],
function(d){d.xIncrement=null;if(!d.points||d.isDirtyData)d.processData(),d.generatePoints();k(d.points,function(n,b){var u;n.options&&(u=a.nameToX(n),void 0!==u&&u!==n.x&&(n.x=u,d.xData[b]=u))})}))},setAxisTranslation:function(a){var d=this,b=d.max-d.min,u=d.axisPointRange||0,c,g=0,v=0,e=d.linkedParent,l=!!d.categories,A=d.transA,w=d.isXAxis;if(w||l||u)c=d.getClosest(),e?(g=e.minPointOffset,v=e.pointRangePadding):k(d.series,function(a){var n=l?1:w?y(a.options.pointRange,c,0):d.axisPointRange||0;
a=a.options.pointPlacement;u=Math.max(u,n);d.single||(g=Math.max(g,H(a)?0:n/2),v=Math.max(v,"on"===a?0:n))}),e=d.ordinalSlope&&c?d.ordinalSlope/c:1,d.minPointOffset=g*=e,d.pointRangePadding=v*=e,d.pointRange=Math.min(u,b),w&&(d.closestPointRange=c);a&&(d.oldTransA=A);d.translationSlope=d.transA=A=d.options.staticScale||d.len/(b+v||1);d.transB=d.horiz?d.left:d.bottom;d.minPixelPadding=A*g},minFromRange:function(){return this.max-this.range},setTickInterval:function(d){var n=this,b=n.chart,u=n.options,
g=n.isLog,v=n.log2lin,e=n.isDatetimeAxis,l=n.isXAxis,A=n.isLinked,w=u.maxPadding,B=u.minPadding,m=u.tickInterval,C=u.tickPixelInterval,H=n.categories,h=n.threshold,J=n.softThreshold,q,z,x,r;e||H||A||this.getTickAmount();x=y(n.userMin,u.min);r=y(n.userMax,u.max);A?(n.linkedParent=b[n.coll][u.linkedTo],b=n.linkedParent.getExtremes(),n.min=y(b.min,b.dataMin),n.max=y(b.max,b.dataMax),u.type!==n.linkedParent.options.type&&a.error(11,1)):(!J&&t(h)&&(n.dataMin>=h?(q=h,B=0):n.dataMax<=h&&(z=h,w=0)),n.min=
y(x,q,n.dataMin),n.max=y(r,z,n.dataMax));g&&(n.positiveValuesOnly&&!d&&0>=Math.min(n.min,y(n.dataMin,n.min))&&a.error(10,1),n.min=p(v(n.min),15),n.max=p(v(n.max),15));n.range&&t(n.max)&&(n.userMin=n.min=x=Math.max(n.dataMin,n.minFromRange()),n.userMax=r=n.max,n.range=null);f(n,"foundExtremes");n.beforePadding&&n.beforePadding();n.adjustForMinRange();!(H||n.axisPointRange||n.usePercentage||A)&&t(n.min)&&t(n.max)&&(v=n.max-n.min)&&(!t(x)&&B&&(n.min-=v*B),!t(r)&&w&&(n.max+=v*w));D(u.softMin)&&(n.min=
Math.min(n.min,u.softMin));D(u.softMax)&&(n.max=Math.max(n.max,u.softMax));D(u.floor)&&(n.min=Math.max(n.min,u.floor));D(u.ceiling)&&(n.max=Math.min(n.max,u.ceiling));J&&t(n.dataMin)&&(h=h||0,!t(x)&&n.min<h&&n.dataMin>=h?n.min=h:!t(r)&&n.max>h&&n.dataMax<=h&&(n.max=h));n.tickInterval=n.min===n.max||void 0===n.min||void 0===n.max?1:A&&!m&&C===n.linkedParent.options.tickPixelInterval?m=n.linkedParent.tickInterval:y(m,this.tickAmount?(n.max-n.min)/Math.max(this.tickAmount-1,1):void 0,H?1:(n.max-n.min)*
C/Math.max(n.len,C));l&&!d&&k(n.series,function(a){a.processData(n.min!==n.oldMin||n.max!==n.oldMax)});n.setAxisTranslation(!0);n.beforeSetTickPositions&&n.beforeSetTickPositions();n.postProcessTickInterval&&(n.tickInterval=n.postProcessTickInterval(n.tickInterval));n.pointRange&&!m&&(n.tickInterval=Math.max(n.pointRange,n.tickInterval));d=y(u.minTickInterval,n.isDatetimeAxis&&n.closestPointRange);!m&&n.tickInterval<d&&(n.tickInterval=d);e||g||m||(n.tickInterval=K(n.tickInterval,null,c(n.tickInterval),
y(u.allowDecimals,!(.5<n.tickInterval&&5>n.tickInterval&&1E3<n.max&&9999>n.max)),!!this.tickAmount));this.tickAmount||(n.tickInterval=n.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,d,b=a.tickPositions;d=this.getMinorTickInterval();var c=a.tickPositioner,g=a.startOnTick,v=a.endOnTick;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===d&&this.tickInterval?this.tickInterval/5:d;this.single=
this.min===this.max&&t(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=d=b&&b.slice();!d&&(d=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),d.length>this.len&&(d=[d[0],d.pop()],
d[0]===d[1]&&(d.length=1)),this.tickPositions=d,c&&(c=c.apply(this,[this.min,this.max])))&&(this.tickPositions=d=c);this.paddedTicks=d.slice(0);this.trimTicks(d,g,v);this.isLinked||(this.single&&2>d.length&&(this.min-=.5,this.max+=.5),b||c||this.adjustTickAmount())},trimTicks:function(a,d,b){var n=a[0],u=a[a.length-1],c=this.minPointOffset||0;if(!this.isLinked){if(d&&-Infinity!==n)this.min=n;else for(;this.min-c>a[0];)a.shift();if(b)this.max=u;else for(;this.max+c<a[a.length-1];)a.pop();0===a.length&&
t(n)&&a.push((u+n)/2)}},alignToOthers:function(){var a={},d,b=this.options;!1===this.chart.options.chart.alignTicks||!1===b.alignTicks||this.isLog||k(this.chart[this.coll],function(b){var n=b.options,n=[b.horiz?n.left:n.top,n.width,n.height,n.pane].join();b.series.length&&(a[n]?d=!0:a[n]=1)});return d},getTickAmount:function(){var a=this.options,d=a.tickAmount,b=a.tickPixelInterval;!t(a.tickInterval)&&this.len<b&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(d=2);!d&&this.alignToOthers()&&
(d=Math.ceil(this.len/b)+1);4>d&&(this.finalTickAmt=d,d=5);this.tickAmount=d},adjustTickAmount:function(){var a=this.tickInterval,d=this.tickPositions,b=this.tickAmount,c=this.finalTickAmt,g=d&&d.length;if(g<b){for(;d.length<b;)d.push(p(d[d.length-1]+a));this.transA*=(g-1)/(b-1);this.max=d[d.length-1]}else g>b&&(this.tickInterval*=2,this.setTickPositions());if(t(c)){for(a=b=d.length;a--;)(3===c&&1===a%2||2>=c&&0<a&&a<b-1)&&d.splice(a,1);this.finalTickAmt=void 0}},setScale:function(){var a,d;this.oldMin=
this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();d=this.len!==this.oldAxisLength;k(this.series,function(d){if(d.isDirtyData||d.isDirty||d.xAxis.isDirty)a=!0});d||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=
d||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,d,b,c,g){var n=this,u=n.chart;b=y(b,!0);k(n.series,function(a){delete a.kdTree});g=m(g,{min:a,max:d});f(n,"setExtremes",g,function(){n.userMin=a;n.userMax=d;n.eventArgs=g;b&&u.redraw(c)})},zoom:function(a,d){var b=this.dataMin,n=this.dataMax,u=this.options,c=Math.min(b,y(u.min,b)),u=Math.max(n,y(u.max,n));if(a!==this.min||d!==this.max)this.allowZoomOutside||(t(b)&&(a<c&&(a=c),a>u&&(a=u)),
t(n)&&(d<c&&(d=c),d>u&&(d=u))),this.displayBtn=void 0!==a||void 0!==d,this.setExtremes(a,d,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var d=this.chart,b=this.options,c=b.offsets||[0,0,0,0],g=this.horiz,v=this.width=Math.round(a.relativeLength(y(b.width,d.plotWidth-c[3]+c[1]),d.plotWidth)),e=this.height=Math.round(a.relativeLength(y(b.height,d.plotHeight-c[0]+c[2]),d.plotHeight)),l=this.top=Math.round(a.relativeLength(y(b.top,d.plotTop+c[0]),d.plotHeight,d.plotTop)),b=this.left=Math.round(a.relativeLength(y(b.left,
d.plotLeft+c[3]),d.plotWidth,d.plotLeft));this.bottom=d.chartHeight-e-l;this.right=d.chartWidth-v-b;this.len=Math.max(g?v:e,0);this.pos=g?b:l},getExtremes:function(){var a=this.isLog,d=this.lin2log;return{min:a?p(d(this.min)):this.min,max:a?p(d(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var d=this.isLog,b=this.lin2log,c=d?b(this.min):this.min,d=d?b(this.max):this.max;null===a?a=c:c>a?a=c:d<a&&(a=d);return this.translate(a,
0,1,0,1)},autoLabelAlign:function(a){a=(y(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var d=this.options,b=d[a+"Length"],c=y(d[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(c&&b)return"inside"===d[a+"Position"]&&(b=-b),[b,c]},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,d=this.horiz,b=this.tickInterval,c=b,g=this.len/(((this.categories?1:0)+this.max-this.min)/b),v,e=a.rotation,l=this.labelMetrics(),A,w=Number.MAX_VALUE,f,B=function(a){a/=g||1;a=1<a?Math.ceil(a):1;return a*b};d?(f=!a.staggerLines&&!a.step&&(t(e)?[e]:g<y(a.autoRotationLimit,80)&&a.autoRotation))&&k(f,function(a){var d;if(a===e||a&&-90<=a&&90>=a)A=B(Math.abs(l.h/Math.sin(q*a))),d=A+Math.abs(a/360),d<w&&(w=d,v=a,c=A)}):a.step||(c=B(l.h));this.autoRotation=f;this.labelRotation=y(v,
e);return c},getSlotWidth:function(){var a=this.chart,d=this.horiz,b=this.options.labels,c=Math.max(this.tickPositions.length-(this.categories?0:1),1),g=a.margin[3];return d&&2>(b.step||0)&&!b.rotation&&(this.staggerLines||1)*this.len/c||!d&&(b.style&&parseInt(b.style.width,10)||g&&g-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,d=a.renderer,b=this.tickPositions,c=this.ticks,g=this.options.labels,v=this.horiz,e=this.getSlotWidth(),l=Math.max(1,Math.round(e-2*(g.padding||
5))),A={},w=this.labelMetrics(),f=g.style&&g.style.textOverflow,B,m=0,D,y;H(g.rotation)||(A.rotation=g.rotation||0);k(b,function(a){(a=c[a])&&a.labelLength>m&&(m=a.labelLength)});this.maxLabelLength=m;if(this.autoRotation)m>l&&m>w.h?A.rotation=this.labelRotation:this.labelRotation=0;else if(e&&(B={width:l+"px"},!f))for(B.textOverflow="clip",D=b.length;!v&&D--;)if(y=b[D],l=c[y].label)l.styles&&"ellipsis"===l.styles.textOverflow?l.css({textOverflow:"clip"}):c[y].labelLength>e&&l.css({width:e+"px"}),
l.getBBox().height>this.len/b.length-(w.h-w.f)&&(l.specCss={textOverflow:"ellipsis"});A.rotation&&(B={width:(m>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},f||(B.textOverflow="ellipsis"));if(this.labelAlign=g.align||this.autoLabelAlign(this.labelRotation))A.align=this.labelAlign;k(b,function(a){var d=(a=c[a])&&a.label;d&&(d.attr(A),B&&d.css(C(B,d.specCss)),delete d.specCss,a.rotation=A.rotation)});this.tickRotCorr=d.rotCorr(w.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||
t(this.min)&&t(this.max)&&this.tickPositions&&0<this.tickPositions.length},addTitle:function(a){var d=this.chart.renderer,b=this.horiz,c=this.opposite,g=this.options.title,u;this.axisTitle||((u=g.textAlign)||(u=(b?{low:"left",middle:"center",high:"right"}:{low:c?"right":"left",middle:"center",high:c?"left":"right"})[g.align]),this.axisTitle=d.text(g.text,0,0,g.useHTML).attr({zIndex:7,rotation:g.rotation||0,align:u}).addClass("highcharts-axis-title").css(g.style).add(this.axisGroup),this.axisTitle.isNew=
!0);g.style.width||this.isRadial||this.axisTitle.css({width:this.len});this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var d=this.ticks;d[a]?d[a].addLabel():d[a]=new v(this,a)},getOffset:function(){var a=this,d=a.chart,b=d.renderer,c=a.options,v=a.tickPositions,e=a.ticks,l=a.horiz,A=a.side,w=d.inverted&&!a.isZAxis?[1,0,3,2][A]:A,f,B,m=0,D,C=0,H=c.title,h=c.labels,J=0,p=d.axisOffset,d=d.clipOffset,q=[-1,1,1,-1][A],K=c.className,z=a.axisParent,x=this.tickSize("tick");f=a.hasData();a.showAxis=
B=f||y(c.showEmpty,!0);a.staggerLines=a.horiz&&h.staggerLines;a.axisGroup||(a.gridGroup=b.g("grid").attr({zIndex:c.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(K||"")).add(z),a.axisGroup=b.g("axis").attr({zIndex:c.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(K||"")).add(z),a.labelGroup=b.g("axis-labels").attr({zIndex:h.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(K||"")).add(z));f||a.isLinked?(k(v,function(d,b){a.generateTick(d,
b)}),a.renderUnsquish(),!1===h.reserveSpace||0!==A&&2!==A&&{1:"left",3:"right"}[A]!==a.labelAlign&&"center"!==a.labelAlign||k(v,function(a){J=Math.max(e[a].getLabelSize(),J)}),a.staggerLines&&(J*=a.staggerLines,a.labelOffset=J*(a.opposite?-1:1))):g(e,function(a,d){a.destroy();delete e[d]});H&&H.text&&!1!==H.enabled&&(a.addTitle(B),B&&!1!==H.reserveSpace&&(a.titleOffset=m=a.axisTitle.getBBox()[l?"height":"width"],D=H.offset,C=t(D)?0:y(H.margin,l?5:10)));a.renderLine();a.offset=q*y(c.offset,p[A]);a.tickRotCorr=
a.tickRotCorr||{x:0,y:0};b=0===A?-a.labelMetrics().h:2===A?a.tickRotCorr.y:0;C=Math.abs(J)+C;J&&(C=C-b+q*(l?y(h.y,a.tickRotCorr.y+8*q):h.x));a.axisTitleMargin=y(D,C);p[A]=Math.max(p[A],a.axisTitleMargin+m+q*a.offset,C,f&&v.length&&x?x[0]+q*a.offset:0);c=c.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);d[w]=Math.max(d[w],c)},getLinePath:function(a){var d=this.chart,b=this.opposite,c=this.offset,g=this.horiz,v=this.left+(b?this.width:0)+c,c=d.chartHeight-this.bottom-(b?this.height:0)+c;b&&(a*=-1);
return d.renderer.crispLine(["M",g?this.left:v,g?c:this.top,"L",g?d.chartWidth-this.right:v,g?c:d.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var a=this.horiz,d=this.left,b=this.top,c=this.len,g=this.options.title,v=a?d:b,e=this.opposite,l=this.offset,A=g.x||
0,w=g.y||0,f=this.axisTitle,B=this.chart.renderer.fontMetrics(g.style&&g.style.fontSize,f),f=Math.max(f.getBBox(null,0).height-B.h-1,0),c={low:v+(a?0:c),middle:v+c/2,high:v+(a?c:0)}[g.align],d=(a?b+this.height:d)+(a?1:-1)*(e?-1:1)*this.axisTitleMargin+[-f,f,B.f,-f][this.side];return{x:a?c+A:d+(e?this.width:0)+l+A,y:a?d+w-(e?this.height:0)+l:c+w}},renderMinorTick:function(a){var d=this.chart.hasRendered&&D(this.oldMin),b=this.minorTicks;b[a]||(b[a]=new v(this,a,"minor"));d&&b[a].isNew&&b[a].render(null,
!0);b[a].render(null,!1,1)},renderTick:function(a,d){var b=this.isLinked,c=this.ticks,g=this.chart.hasRendered&&D(this.oldMin);if(!b||a>=this.min&&a<=this.max)c[a]||(c[a]=new v(this,a)),g&&c[a].isNew&&c[a].render(d,!0,.1),c[a].render(d)},render:function(){var b=this,c=b.chart,e=b.options,l=b.isLog,A=b.lin2log,w=b.isLinked,f=b.tickPositions,B=b.axisTitle,m=b.ticks,y=b.minorTicks,C=b.alternateBands,H=e.stackLabels,h=e.alternateGridColor,J=b.tickmarkOffset,p=b.axisLine,t=b.showAxis,q=E(c.renderer.globalAnimation),
K,z;b.labelEdge.length=0;b.overlap=!1;k([m,y,C],function(a){g(a,function(a){a.isActive=!1})});if(b.hasData()||w)b.minorTickInterval&&!b.categories&&k(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),f.length&&(k(f,function(a,d){b.renderTick(a,d)}),J&&(0===b.min||b.single)&&(m[-1]||(m[-1]=new v(b,-1,null,!0)),m[-1].render(-1))),h&&k(f,function(d,g){z=void 0!==f[g+1]?f[g+1]+J:b.max-J;0===g%2&&d<b.max&&z<=b.max+(c.polar?-J:J)&&(C[d]||(C[d]=new a.PlotLineOrBand(b)),K=d+J,C[d].options={from:l?
A(K):K,to:l?A(z):z,color:h},C[d].render(),C[d].isActive=!0)}),b._addedPlotLB||(k((e.plotLines||[]).concat(e.plotBands||[]),function(a){b.addPlotBandOrLine(a)}),b._addedPlotLB=!0);k([m,y,C],function(a){var b,n=[],v=q.duration;g(a,function(a,d){a.isActive||(a.render(d,!1,0),a.isActive=!1,n.push(d))});d(function(){for(b=n.length;b--;)a[n[b]]&&!a[n[b]].isActive&&(a[n[b]].destroy(),delete a[n[b]])},a!==C&&c.hasRendered&&v?v:0)});p&&(p[p.isPlaced?"animate":"attr"]({d:this.getLinePath(p.strokeWidth())}),
p.isPlaced=!0,p[t?"show":"hide"](!0));B&&t&&(e=b.getTitlePosition(),D(e.y)?(B[B.isNew?"attr":"animate"](e),B.isNew=!1):(B.attr("y",-9999),B.isNew=!0));H&&H.enabled&&b.renderStackTotals();b.isDirty=!1},redraw:function(){this.visible&&(this.render(),k(this.plotLinesAndBands,function(a){a.render()}));k(this.series,function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var d=this,b=d.stacks,c=d.plotLinesAndBands,v;a||J(d);g(b,function(a,d){z(a);
b[d]=null});k([d.ticks,d.minorTicks,d.alternateBands],function(a){z(a)});if(c)for(a=c.length;a--;)c[a].destroy();k("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),function(a){d[a]&&(d[a]=d[a].destroy())});for(v in d.plotLinesAndBandsGroups)d.plotLinesAndBandsGroups[v]=d.plotLinesAndBandsGroups[v].destroy();g(d,function(a,b){-1===w(b,d.keepProps)&&delete d[b]})},drawCrosshair:function(a,d){var b,c=this.crosshair,g=y(c.snap,!0),n,v=this.cross;a||(a=this.cross&&this.cross.e);
this.crosshair&&!1!==(t(d)||!g)?(g?t(d)&&(n=this.isXAxis?d.plotX:this.len-d.plotY):n=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos),t(n)&&(b=this.getPlotLinePath(d&&(this.isXAxis?d.x:y(d.stackY,d.y)),null,null,null,n)||null),t(b)?(d=this.categories&&!this.isRadial,v||(this.cross=v=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(d?"category ":"thin ")+c.className).attr({zIndex:y(c.zIndex,2)}).add(),v.attr({stroke:c.color||(d?h("#ccd6eb").setOpacity(.25).get():
"#cccccc"),"stroke-width":y(c.width,1)}).css({"pointer-events":"none"}),c.dashStyle&&v.attr({dashstyle:c.dashStyle})),v.show().attr({d:b}),d&&!c.width&&v.attr({"stroke-width":this.transA}),this.cross.e=a):this.hideCrosshair()):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}});return a.Axis=B}(L);(function(a){var F=a.Axis,E=a.Date,G=a.dateFormat,r=a.defaultOptions,h=a.defined,p=a.each,x=a.extend,t=a.getMagnitude,q=a.getTZOffset,z=a.normalizeTickInterval,k=a.pick,m=a.timeUnits;
F.prototype.getTimeTicks=function(a,e,c,b){var w=[],l={},f=r.global.useUTC,H,C=new E(e-Math.max(q(e),q(c))),t=E.hcMakeTime,g=a.unitRange,y=a.count,J,A;if(h(e)){C[E.hcSetMilliseconds](g>=m.second?0:y*Math.floor(C.getMilliseconds()/y));if(g>=m.second)C[E.hcSetSeconds](g>=m.minute?0:y*Math.floor(C.getSeconds()/y));if(g>=m.minute)C[E.hcSetMinutes](g>=m.hour?0:y*Math.floor(C[E.hcGetMinutes]()/y));if(g>=m.hour)C[E.hcSetHours](g>=m.day?0:y*Math.floor(C[E.hcGetHours]()/y));if(g>=m.day)C[E.hcSetDate](g>=m.month?
1:y*Math.floor(C[E.hcGetDate]()/y));g>=m.month&&(C[E.hcSetMonth](g>=m.year?0:y*Math.floor(C[E.hcGetMonth]()/y)),H=C[E.hcGetFullYear]());if(g>=m.year)C[E.hcSetFullYear](H-H%y);if(g===m.week)C[E.hcSetDate](C[E.hcGetDate]()-C[E.hcGetDay]()+k(b,1));H=C[E.hcGetFullYear]();b=C[E.hcGetMonth]();var d=C[E.hcGetDate](),v=C[E.hcGetHours]();if(E.hcTimezoneOffset||E.hcGetTimezoneOffset)A=(!f||!!E.hcGetTimezoneOffset)&&(c-e>4*m.month||q(e)!==q(c)),C=C.getTime(),J=q(C),C=new E(C+J);f=C.getTime();for(e=1;f<c;)w.push(f),
f=g===m.year?t(H+e*y,0):g===m.month?t(H,b+e*y):!A||g!==m.day&&g!==m.week?A&&g===m.hour?t(H,b,d,v+e*y,0,0,J)-J:f+g*y:t(H,b,d+e*y*(g===m.day?1:7)),e++;w.push(f);g<=m.hour&&1E4>w.length&&p(w,function(a){0===a%18E5&&"000000000"===G("%H%M%S%L",a)&&(l[a]="day")})}w.info=x(a,{higherRanks:l,totalRange:g*y});return w};F.prototype.normalizeTimeTickInterval=function(a,e){var c=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],
["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];e=c[c.length-1];var b=m[e[0]],w=e[1],l;for(l=0;l<c.length&&!(e=c[l],b=m[e[0]],w=e[1],c[l+1]&&a<=(b*w[w.length-1]+m[c[l+1][0]])/2);l++);b===m.year&&a<5*b&&(w=[1,2,5]);a=z(a/b,w,"year"===e[0]?Math.max(t(a/b),1):1);return{unitRange:b,count:a,unitName:e[0]}}})(L);(function(a){var F=a.Axis,E=a.getMagnitude,G=a.map,r=a.normalizeTickInterval,h=a.pick;F.prototype.getLogTickPositions=function(a,x,t,q){var p=this.options,k=this.len,m=this.lin2log,
f=this.log2lin,e=[];q||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),e=this.getLinearTickPositions(a,x,t);else if(.08<=a)for(var k=Math.floor(x),c,b,w,l,D,p=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];k<t+1&&!D;k++)for(b=p.length,c=0;c<b&&!D;c++)w=f(m(k)*p[c]),w>x&&(!q||l<=t)&&void 0!==l&&e.push(l),l>t&&(D=!0),l=w;else x=m(x),t=m(t),a=q?this.getMinorTickInterval():p.tickInterval,a=h("auto"===a?null:a,this._minorAutoInterval,p.tickPixelInterval/(q?5:1)*(t-x)/((q?k/this.tickPositions.length:
k)||1)),a=r(a,null,E(a)),e=G(this.getLinearTickPositions(a,x,t),f),q||(this._minorAutoInterval=a/5);q||(this.tickInterval=a);return e};F.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};F.prototype.lin2log=function(a){return Math.pow(10,a)}})(L);(function(a,F){var E=a.arrayMax,G=a.arrayMin,r=a.defined,h=a.destroyObjectProperties,p=a.each,x=a.erase,t=a.merge,q=a.pick;a.PlotLineOrBand=function(a,k){this.axis=a;k&&(this.options=k,this.id=k.id)};a.PlotLineOrBand.prototype={render:function(){var h=
this,k=h.axis,m=k.horiz,f=h.options,e=f.label,c=h.label,b=f.to,w=f.from,l=f.value,D=r(w)&&r(b),H=r(l),C=h.svgElem,p=!C,g=[],y=f.color,J=q(f.zIndex,0),A=f.events,g={"class":"highcharts-plot-"+(D?"band ":"line ")+(f.className||"")},d={},v=k.chart.renderer,B=D?"bands":"lines",u=k.log2lin;k.isLog&&(w=u(w),b=u(b),l=u(l));H?(g={stroke:y,"stroke-width":f.width},f.dashStyle&&(g.dashstyle=f.dashStyle)):D&&(y&&(g.fill=y),f.borderWidth&&(g.stroke=f.borderColor,g["stroke-width"]=f.borderWidth));d.zIndex=J;B+=
"-"+J;(y=k.plotLinesAndBandsGroups[B])||(k.plotLinesAndBandsGroups[B]=y=v.g("plot-"+B).attr(d).add());p&&(h.svgElem=C=v.path().attr(g).add(y));if(H)g=k.getPlotLinePath(l,C.strokeWidth());else if(D)g=k.getPlotBandPath(w,b,f);else return;p&&g&&g.length?(C.attr({d:g}),A&&a.objectEach(A,function(a,d){C.on(d,function(a){A[d].apply(h,[a])})})):C&&(g?(C.show(),C.animate({d:g})):(C.hide(),c&&(h.label=c=c.destroy())));e&&r(e.text)&&g&&g.length&&0<k.width&&0<k.height&&!g.flat?(e=t({align:m&&D&&"center",x:m?
!D&&4:10,verticalAlign:!m&&D&&"middle",y:m?D?16:10:D?6:-4,rotation:m&&!D&&90},e),this.renderLabel(e,g,D,J)):c&&c.hide();return h},renderLabel:function(a,k,m,f){var e=this.label,c=this.axis.chart.renderer;e||(e={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+(m?"band":"line")+"-label "+(a.className||"")},e.zIndex=f,this.label=e=c.text(a.text,0,0,a.useHTML).attr(e).add(),e.css(a.style));f=k.xBounds||[k[1],k[4],m?k[6]:k[1]];k=k.yBounds||[k[2],k[5],m?k[7]:k[2]];m=G(f);c=G(k);
e.align(a,!1,{x:m,y:c,width:E(f)-m,height:E(k)-c});e.show()},destroy:function(){x(this.axis.plotLinesAndBands,this);delete this.axis;h(this)}};a.extend(F.prototype,{getPlotBandPath:function(a,k){var m=this.getPlotLinePath(k,null,null,!0),f=this.getPlotLinePath(a,null,null,!0),e=[],c=this.horiz,b=1,w;a=a<this.min&&k<this.min||a>this.max&&k>this.max;if(f&&m)for(a&&(w=f.toString()===m.toString(),b=0),a=0;a<f.length;a+=6)c&&m[a+1]===f[a+1]?(m[a+1]+=b,m[a+4]+=b):c||m[a+2]!==f[a+2]||(m[a+2]+=b,m[a+5]+=
b),e.push("M",f[a+1],f[a+2],"L",f[a+4],f[a+5],m[a+4],m[a+5],m[a+1],m[a+2],"z"),e.flat=w;return e},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(h,k){var m=(new a.PlotLineOrBand(this,h)).render(),f=this.userOptions;m&&(k&&(f[k]=f[k]||[],f[k].push(h)),this.plotLinesAndBands.push(m));return m},removePlotBandOrLine:function(a){for(var k=this.plotLinesAndBands,m=this.options,f=this.userOptions,
e=k.length;e--;)k[e].id===a&&k[e].destroy();p([m.plotLines||[],f.plotLines||[],m.plotBands||[],f.plotBands||[]],function(c){for(e=c.length;e--;)c[e].id===a&&x(c,c[e])})},removePlotBand:function(a){this.removePlotBandOrLine(a)},removePlotLine:function(a){this.removePlotBandOrLine(a)}})})(L,Z);(function(a){var F=a.dateFormat,E=a.each,G=a.extend,r=a.format,h=a.isNumber,p=a.map,x=a.merge,t=a.pick,q=a.splat,z=a.syncTimeout,k=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)};a.Tooltip.prototype=
{init:function(a,f){this.chart=a;this.options=f;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=f.split&&!a.inverted;this.shared=f.shared||this.split},cleanSplit:function(a){E(this.chart.series,function(f){var e=f&&f.tt;e&&(!e.isActive||a?f.tt=e.destroy():e.isActive=!1)})},getLabel:function(){var a=this.chart.renderer,f=this.options;this.label||(this.split?this.label=a.g("tooltip"):(this.label=a.label("",0,0,f.shape||"callout",null,null,f.useHTML,null,"tooltip").attr({padding:f.padding,
r:f.borderRadius}),this.label.attr({fill:f.backgroundColor,"stroke-width":f.borderWidth}).css(f.style).shadow(f.shadow)),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();x(!0,this.chart.options.tooltip.userOptions,a);this.init(this.chart,x(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},
move:function(a,f,e,c){var b=this,w=b.now,l=!1!==b.options.animation&&!b.isHidden&&(1<Math.abs(a-w.x)||1<Math.abs(f-w.y)),k=b.followPointer||1<b.len;G(w,{x:l?(2*w.x+a)/3:a,y:l?(w.y+f)/2:f,anchorX:k?void 0:l?(2*w.anchorX+e)/3:e,anchorY:k?void 0:l?(w.anchorY+c)/2:c});b.getLabel().attr(w);l&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){b&&b.move(a,f,e,c)},32))},hide:function(a){var f=this;clearTimeout(this.hideTimer);a=t(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=
z(function(){f.getLabel()[a?"fadeOut":"hide"]();f.isHidden=!0},a))},getAnchor:function(a,f){var e,c=this.chart,b=c.inverted,w=c.plotTop,l=c.plotLeft,k=0,m=0,C,h;a=q(a);e=a[0].tooltipPos;this.followPointer&&f&&(void 0===f.chartX&&(f=c.pointer.normalize(f)),e=[f.chartX-c.plotLeft,f.chartY-w]);e||(E(a,function(a){C=a.series.yAxis;h=a.series.xAxis;k+=a.plotX+(!b&&h?h.left-l:0);m+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!b&&C?C.top-w:0)}),k/=a.length,m/=a.length,e=[b?c.plotWidth-m:k,this.shared&&
!b&&1<a.length&&f?f.chartY-w:b?c.plotHeight-k:m]);return p(e,Math.round)},getPosition:function(a,f,e){var c=this.chart,b=this.distance,w={},l=c.inverted&&e.h||0,k,m=["y",c.chartHeight,f,e.plotY+c.plotTop,c.plotTop,c.plotTop+c.plotHeight],C=["x",c.chartWidth,a,e.plotX+c.plotLeft,c.plotLeft,c.plotLeft+c.plotWidth],h=!this.followPointer&&t(e.ttBelow,!c.inverted===!!e.negative),g=function(a,c,g,e,n,A){var d=g<e-b,v=e+b+g<c,u=e-b-g;e+=b;if(h&&v)w[a]=e;else if(!h&&d)w[a]=u;else if(d)w[a]=Math.min(A-g,0>
u-l?u:u-l);else if(v)w[a]=Math.max(n,e+l+g>c?e:e+l);else return!1},y=function(a,c,g,e){var d;e<b||e>c-b?d=!1:w[a]=e<g/2?1:e>c-g/2?c-g-2:e-g/2;return d},J=function(a){var d=m;m=C;C=d;k=a},A=function(){!1!==g.apply(0,m)?!1!==y.apply(0,C)||k||(J(!0),A()):k?w.x=w.y=0:(J(!0),A())};(c.inverted||1<this.len)&&J();A();return w},defaultFormatter:function(a){var f=this.points||q(this),e;e=[a.tooltipFooterHeaderFormatter(f[0])];e=e.concat(a.bodyFormatter(f));e.push(a.tooltipFooterHeaderFormatter(f[0],!0));return e},
refresh:function(a,f){var e,c=this.options,b,w=a,l,k={},m=[];e=c.formatter||this.defaultFormatter;var k=this.shared,C;c.enabled&&(clearTimeout(this.hideTimer),this.followPointer=q(w)[0].series.tooltipOptions.followPointer,l=this.getAnchor(w,f),f=l[0],b=l[1],!k||w.series&&w.series.noSharedTooltip?k=w.getLabelConfig():(E(w,function(a){a.setState("hover");m.push(a.getLabelConfig())}),k={x:w[0].category,y:w[0].y},k.points=m,w=w[0]),this.len=m.length,k=e.call(k,this),C=w.series,this.distance=t(C.tooltipOptions.distance,
16),!1===k?this.hide():(e=this.getLabel(),this.isHidden&&e.attr({opacity:1}).show(),this.split?this.renderSplit(k,q(a)):(c.style.width||e.css({width:this.chart.spacingBox.width}),e.attr({text:k&&k.join?k.join(""):k}),e.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+t(w.colorIndex,C.colorIndex)),e.attr({stroke:c.borderColor||w.color||C.color||"#666666"}),this.updatePosition({plotX:f,plotY:b,negative:w.negative,ttBelow:w.ttBelow,h:l[2]||0})),this.isHidden=!1))},renderSplit:function(k,
f){var e=this,c=[],b=this.chart,w=b.renderer,l=!0,m=this.options,h=0,C=this.getLabel();a.isString(k)&&(k=[!1,k]);E(k.slice(0,f.length+1),function(a,g){if(!1!==a){g=f[g-1]||{isHeader:!0,plotX:f[0].plotX};var k=g.series||e,D=k.tt,A=g.series||{},d="highcharts-color-"+t(g.colorIndex,A.colorIndex,"none");D||(k.tt=D=w.label(null,null,null,"callout",null,null,m.useHTML).addClass("highcharts-tooltip-box "+d).attr({padding:m.padding,r:m.borderRadius,fill:m.backgroundColor,stroke:m.borderColor||g.color||A.color||
"#333333","stroke-width":m.borderWidth}).add(C));D.isActive=!0;D.attr({text:a});D.css(m.style).shadow(m.shadow);a=D.getBBox();A=a.width+D.strokeWidth();g.isHeader?(h=a.height,A=Math.max(0,Math.min(g.plotX+b.plotLeft-A/2,b.chartWidth-A))):A=g.plotX+b.plotLeft-t(m.distance,16)-A;0>A&&(l=!1);a=(g.series&&g.series.yAxis&&g.series.yAxis.pos)+(g.plotY||0);a-=b.plotTop;c.push({target:g.isHeader?b.plotHeight+h:a,rank:g.isHeader?1:0,size:k.tt.getBBox().height+1,point:g,x:A,tt:D})}});this.cleanSplit();a.distribute(c,
b.plotHeight+h);E(c,function(a){var c=a.point,e=c.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:l||c.isHeader?a.x:c.plotX+b.plotLeft+t(m.distance,16),y:a.pos+b.plotTop,anchorX:c.isHeader?c.plotX+b.plotLeft:c.plotX+e.xAxis.pos,anchorY:c.isHeader?a.pos+b.plotTop-15:c.plotY+e.yAxis.pos})})},updatePosition:function(a){var f=this.chart,e=this.getLabel(),e=(this.options.positioner||this.getPosition).call(this,e.width,e.height,a);this.move(Math.round(e.x),Math.round(e.y||0),a.plotX+f.plotLeft,
a.plotY+f.plotTop)},getDateFormat:function(a,f,e,c){var b=F("%m-%d %H:%M:%S.%L",f),w,l,m={millisecond:15,second:12,minute:9,hour:6,day:3},h="millisecond";for(l in k){if(a===k.week&&+F("%w",f)===e&&"00:00:00.000"===b.substr(6)){l="week";break}if(k[l]>a){l=h;break}if(m[l]&&b.substr(m[l])!=="01-01 00:00:00.000".substr(m[l]))break;"week"!==l&&(h=l)}l&&(w=c[l]);return w},getXDateFormat:function(a,f,e){f=f.dateTimeLabelFormats;var c=e&&e.closestPointRange;return(c?this.getDateFormat(c,a.x,e.options.startOfWeek,
f):f.day)||f.year},tooltipFooterHeaderFormatter:function(a,f){f=f?"footer":"header";var e=a.series,c=e.tooltipOptions,b=c.xDateFormat,w=e.xAxis,l=w&&"datetime"===w.options.type&&h(a.key),k=c[f+"Format"];l&&!b&&(b=this.getXDateFormat(a,c,w));l&&b&&E(a.point&&a.point.tooltipDateKeys||["key"],function(a){k=k.replace("{point."+a+"}","{point."+a+":"+b+"}")});return r(k,{point:a,series:e})},bodyFormatter:function(a){return p(a,function(a){var e=a.series.tooltipOptions;return(e[(a.point.formatPrefix||"point")+
"Formatter"]||a.point.tooltipFormatter).call(a.point,e[(a.point.formatPrefix||"point")+"Format"])})}}})(L);(function(a){var F=a.addEvent,E=a.attr,G=a.charts,r=a.color,h=a.css,p=a.defined,x=a.each,t=a.extend,q=a.find,z=a.fireEvent,k=a.isObject,m=a.offset,f=a.pick,e=a.splat,c=a.Tooltip;a.Pointer=function(a,c){this.init(a,c)};a.Pointer.prototype={init:function(a,e){this.options=e;this.chart=a;this.runChartClick=e.chart.events&&!!e.chart.events.click;this.pinchDown=[];this.lastValidTouch={};c&&(a.tooltip=
new c(a,e.tooltip),this.followTouchMove=f(e.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,c=b.options.chart,e=c.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(e=f(c.pinchType,e));this.zoomX=a=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=a&&!b||e&&b;this.zoomVert=e&&!b||a&&b;this.hasZoom=a||e},normalize:function(a,c){var b;b=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;c||(this.chartPosition=c=m(this.chart.container));return t(a,
{chartX:Math.round(b.pageX-c.left),chartY:Math.round(b.pageY-c.top)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};x(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},findNearestKDPoint:function(a,c,e){var b;x(a,function(a){var l=!(a.noSharedTooltip&&c)&&0>a.options.findNearestPointBy.indexOf("y");a=a.searchPoint(e,l);if((l=k(a,!0))&&!(l=!k(b,!0)))var l=b.distX-a.distX,f=b.dist-a.dist,g=(a.series.group&&a.series.group.zIndex)-
(b.series.group&&b.series.group.zIndex),l=0<(0!==l&&c?l:0!==f?f:0!==g?g:b.series.index>a.series.index?-1:1);l&&(b=a)});return b},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,c){var b=a.series,e=b.xAxis,b=b.yAxis,k=f(a.clientX,a.plotX);if(e&&b)return c?{chartX:e.len+e.pos-k,chartY:b.len+b.pos-a.plotY}:{chartX:k+e.pos,chartY:a.plotY+b.pos}},getHoverData:function(b,c,e,m,h,C,t){var g,l=[],w=t&&t.isBoosting;m=!(!m||
!b);t=c&&!c.stickyTracking?[c]:a.grep(e,function(a){return a.visible&&!(!h&&a.directTouch)&&f(a.options.enableMouseTracking,!0)&&a.stickyTracking});c=(g=m?b:this.findNearestKDPoint(t,h,C))&&g.series;g&&(h&&!c.noSharedTooltip?(t=a.grep(e,function(a){return a.visible&&!(!h&&a.directTouch)&&f(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),x(t,function(a){var d=q(a.points,function(a){return a.x===g.x&&!a.isNull});k(d)&&(w&&(d=a.getPoint(d)),l.push(d))})):l.push(g));return{hoverPoint:g,hoverSeries:c,
hoverPoints:l}},runPointActions:function(b,c){var e=this.chart,k=e.tooltip&&e.tooltip.options.enabled?e.tooltip:void 0,w=k?k.shared:!1,m=c||e.hoverPoint,h=m&&m.series||e.hoverSeries,h=this.getHoverData(m,h,e.series,!!c||h&&h.directTouch&&this.isDirectTouch,w,b,{isBoosting:e.isBoosting}),g,m=h.hoverPoint;g=h.hoverPoints;c=(h=h.hoverSeries)&&h.tooltipOptions.followPointer;w=w&&h&&!h.noSharedTooltip;if(m&&(m!==e.hoverPoint||k&&k.isHidden)){x(e.hoverPoints||[],function(b){-1===a.inArray(b,g)&&b.setState()});
x(g||[],function(a){a.setState("hover")});if(e.hoverSeries!==h)h.onMouseOver();e.hoverPoint&&e.hoverPoint.firePointEvent("mouseOut");if(!m.series)return;m.firePointEvent("mouseOver");e.hoverPoints=g;e.hoverPoint=m;k&&k.refresh(w?g:m,b)}else c&&k&&!k.isHidden&&(m=k.getAnchor([{}],b),k.updatePosition({plotX:m[0],plotY:m[1]}));this.unDocMouseMove||(this.unDocMouseMove=F(e.container.ownerDocument,"mousemove",function(b){var c=G[a.hoverChartIndex];if(c)c.pointer.onDocumentMouseMove(b)}));x(e.axes,function(c){var e=
f(c.crosshair.snap,!0),l=e?a.find(g,function(a){return a.series[c.coll]===c}):void 0;l||!e?c.drawCrosshair(b,l):c.hideCrosshair()})},reset:function(a,c){var b=this.chart,f=b.hoverSeries,k=b.hoverPoint,w=b.hoverPoints,m=b.tooltip,g=m&&m.shared?w:k;a&&g&&x(e(g),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)m&&g&&(m.refresh(g),k&&(k.setState(k.state,!0),x(b.axes,function(a){a.crosshair&&a.drawCrosshair(null,k)})));else{if(k)k.onMouseOut();w&&x(w,function(a){a.setState()});if(f)f.onMouseOut();
m&&m.hide(c);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());x(b.axes,function(a){a.hideCrosshair()});this.hoverX=b.hoverPoints=b.hoverPoint=null}},scaleGroups:function(a,c){var b=this.chart,e;x(b.series,function(l){e=a||l.getPlotBox();l.xAxis&&l.xAxis.zoomEnabled&&l.group&&(l.group.attr(e),l.markerGroup&&(l.markerGroup.attr(e),l.markerGroup.clip(c?b.clipRect:null)),l.dataLabelsGroup&&l.dataLabelsGroup.attr(e))});b.clipRect.attr(c||b.clipBox)},dragStart:function(a){var b=this.chart;
b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,c=b.options.chart,e=a.chartX,k=a.chartY,f=this.zoomHor,m=this.zoomVert,g=b.plotLeft,y=b.plotTop,h=b.plotWidth,A=b.plotHeight,d,v=this.selectionMarker,B=this.mouseDownX,u=this.mouseDownY,n=c.panKey&&a[c.panKey+"Key"];v&&v.touch||(e<g?e=g:e>g+h&&(e=g+h),k<y?k=y:k>y+A&&(k=y+A),this.hasDragged=Math.sqrt(Math.pow(B-e,2)+Math.pow(u-k,2)),10<this.hasDragged&&
(d=b.isInsidePlot(B-g,u-y),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&d&&!n&&!v&&(this.selectionMarker=v=b.renderer.rect(g,y,f?1:h,m?1:A,0).attr({fill:c.selectionMarkerFill||r("#335cad").setOpacity(.25).get(),"class":"highcharts-selection-marker",zIndex:7}).add()),v&&f&&(e-=B,v.attr({width:Math.abs(e),x:(0<e?0:e)+B})),v&&m&&(e=k-u,v.attr({height:Math.abs(e),y:(0<e?0:e)+u})),d&&!v&&c.panning&&b.pan(a,c.panning)))},drop:function(a){var b=this,c=this.chart,e=this.hasPinched;if(this.selectionMarker){var k=
{originalEvent:a,xAxis:[],yAxis:[]},f=this.selectionMarker,m=f.attr?f.attr("x"):f.x,g=f.attr?f.attr("y"):f.y,y=f.attr?f.attr("width"):f.width,J=f.attr?f.attr("height"):f.height,A;if(this.hasDragged||e)x(c.axes,function(d){if(d.zoomEnabled&&p(d.min)&&(e||b[{xAxis:"zoomX",yAxis:"zoomY"}[d.coll]])){var c=d.horiz,l="touchend"===a.type?d.minPixelPadding:0,u=d.toValue((c?m:g)+l),c=d.toValue((c?m+y:g+J)-l);k[d.coll].push({axis:d,min:Math.min(u,c),max:Math.max(u,c)});A=!0}}),A&&z(c,"selection",k,function(a){c.zoom(t(a,
e?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();e&&this.scaleGroups()}c&&(h(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);this.zoomOption(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(b){G[a.hoverChartIndex]&&G[a.hoverChartIndex].pointer.drop(b)},onDocumentMouseMove:function(a){var b=this.chart,
c=this.chartPosition;a=this.normalize(a,c);!c||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(b){var c=G[a.hoverChartIndex];c&&(b.relatedTarget||b.toElement)&&(c.pointer.reset(),c.pointer.chartPosition=null)},onContainerMouseMove:function(b){var c=this.chart;p(a.hoverChartIndex)&&G[a.hoverChartIndex]&&G[a.hoverChartIndex].mouseIsDown||(a.hoverChartIndex=c.index);b=this.normalize(b);b.returnValue=!1;
"mousedown"===c.mouseIsDown&&this.drag(b);!this.inClass(b.target,"highcharts-tracker")&&!c.isInsidePlot(b.chartX-c.plotLeft,b.chartY-c.plotTop)||c.openMenu||this.runPointActions(b)},inClass:function(a,c){for(var b;a;){if(b=E(a,"class")){if(-1!==b.indexOf(c))return!0;if(-1!==b.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(a){var b=this.chart,c=b.hoverPoint,e=b.plotLeft,f=b.plotTop;a=this.normalize(a);b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(z(c.series,"click",t(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(t(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-e,a.chartY-f)&&z(b,"click",a)))},setDOMEvents:function(){var b=this,c=b.chart.container,e=c.ownerDocument;
c.onmousedown=function(a){b.onContainerMouseDown(a)};c.onmousemove=function(a){b.onContainerMouseMove(a)};c.onclick=function(a){b.onContainerClick(a)};this.unbindContainerMouseLeave=F(c,"mouseleave",b.onContainerMouseLeave);a.unbindDocumentMouseUp||(a.unbindDocumentMouseUp=F(e,"mouseup",b.onDocumentMouseUp));a.hasTouch&&(c.ontouchstart=function(a){b.onContainerTouchStart(a)},c.ontouchmove=function(a){b.onContainerTouchMove(a)},a.unbindDocumentTouchEnd||(a.unbindDocumentTouchEnd=F(e,"touchend",b.onDocumentTouchEnd)))},
destroy:function(){var b=this;b.unDocMouseMove&&b.unDocMouseMove();this.unbindContainerMouseLeave();a.chartCount||(a.unbindDocumentMouseUp&&(a.unbindDocumentMouseUp=a.unbindDocumentMouseUp()),a.unbindDocumentTouchEnd&&(a.unbindDocumentTouchEnd=a.unbindDocumentTouchEnd()));clearInterval(b.tooltipTimeout);a.objectEach(b,function(a,c){b[c]=null})}}})(L);(function(a){var F=a.charts,E=a.each,G=a.extend,r=a.map,h=a.noop,p=a.pick;G(a.Pointer.prototype,{pinchTranslate:function(a,h,p,r,k,m){this.zoomHor&&
this.pinchTranslateDirection(!0,a,h,p,r,k,m);this.zoomVert&&this.pinchTranslateDirection(!1,a,h,p,r,k,m)},pinchTranslateDirection:function(a,h,p,r,k,m,f,e){var c=this.chart,b=a?"x":"y",w=a?"X":"Y",l="chart"+w,D=a?"width":"height",t=c["plot"+(a?"Left":"Top")],C,q,g=e||1,y=c.inverted,J=c.bounds[a?"h":"v"],A=1===h.length,d=h[0][l],v=p[0][l],B=!A&&h[1][l],u=!A&&p[1][l],n;p=function(){!A&&20<Math.abs(d-B)&&(g=e||Math.abs(v-u)/Math.abs(d-B));q=(t-v)/g+d;C=c["plot"+(a?"Width":"Height")]/g};p();h=q;h<J.min?
(h=J.min,n=!0):h+C>J.max&&(h=J.max-C,n=!0);n?(v-=.8*(v-f[b][0]),A||(u-=.8*(u-f[b][1])),p()):f[b]=[v,u];y||(m[b]=q-t,m[D]=C);m=y?1/g:g;k[D]=C;k[b]=h;r[y?a?"scaleY":"scaleX":"scale"+w]=g;r["translate"+w]=m*t+(v-m*d)},pinch:function(a){var t=this,q=t.chart,x=t.pinchDown,k=a.touches,m=k.length,f=t.lastValidTouch,e=t.hasZoom,c=t.selectionMarker,b={},w=1===m&&(t.inClass(a.target,"highcharts-tracker")&&q.runTrackerClick||t.runChartClick),l={};1<m&&(t.initiated=!0);e&&t.initiated&&!w&&a.preventDefault();
r(k,function(a){return t.normalize(a)});"touchstart"===a.type?(E(k,function(a,b){x[b]={chartX:a.chartX,chartY:a.chartY}}),f.x=[x[0].chartX,x[1]&&x[1].chartX],f.y=[x[0].chartY,x[1]&&x[1].chartY],E(q.axes,function(a){if(a.zoomEnabled){var b=q.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,e=a.toPixels(p(a.options.min,a.dataMin)),g=a.toPixels(p(a.options.max,a.dataMax)),l=Math.max(e,g);b.min=Math.min(a.pos,Math.min(e,g)-c);b.max=Math.max(a.pos+a.len,l+c)}}),t.res=!0):t.followTouchMove&&1===m?this.runPointActions(t.normalize(a)):
x.length&&(c||(t.selectionMarker=c=G({destroy:h,touch:!0},q.plotBox)),t.pinchTranslate(x,k,b,c,l,f),t.hasPinched=e,t.scaleGroups(b,l),t.res&&(t.res=!1,this.reset(!1,0)))},touch:function(h,t){var q=this.chart,r,k;if(q.index!==a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});a.hoverChartIndex=q.index;1===h.touches.length?(h=this.normalize(h),(k=q.isInsidePlot(h.chartX-q.plotLeft,h.chartY-q.plotTop))&&!q.openMenu?(t&&this.runPointActions(h),"touchmove"===h.type&&(t=this.pinchDown,r=t[0]?
4<=Math.sqrt(Math.pow(t[0].chartX-h.chartX,2)+Math.pow(t[0].chartY-h.chartY,2)):!1),p(r,!0)&&this.pinch(h)):t&&this.reset()):2===h.touches.length&&this.pinch(h)},onContainerTouchStart:function(a){this.zoomOption(a);this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(h){F[a.hoverChartIndex]&&F[a.hoverChartIndex].pointer.drop(h)}})})(L);(function(a){var F=a.addEvent,E=a.charts,G=a.css,r=a.doc,h=a.extend,p=a.noop,x=a.Pointer,t=a.removeEvent,q=a.win,z=a.wrap;
if(!a.hasTouch&&(q.PointerEvent||q.MSPointerEvent)){var k={},m=!!q.PointerEvent,f=function(){var c=[];c.item=function(a){return this[a]};a.objectEach(k,function(a){c.push({pageX:a.pageX,pageY:a.pageY,target:a.target})});return c},e=function(c,b,e,l){"touch"!==c.pointerType&&c.pointerType!==c.MSPOINTER_TYPE_TOUCH||!E[a.hoverChartIndex]||(l(c),l=E[a.hoverChartIndex].pointer,l[b]({type:e,target:c.currentTarget,preventDefault:p,touches:f()}))};h(x.prototype,{onContainerPointerDown:function(a){e(a,"onContainerTouchStart",
"touchstart",function(a){k[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){e(a,"onContainerTouchMove","touchmove",function(a){k[a.pointerId]={pageX:a.pageX,pageY:a.pageY};k[a.pointerId].target||(k[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){e(a,"onDocumentTouchEnd","touchend",function(a){delete k[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,m?"pointerdown":"MSPointerDown",this.onContainerPointerDown);
a(this.chart.container,m?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(r,m?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});z(x.prototype,"init",function(a,b,e){a.call(this,b,e);this.hasZoom&&G(b.container,{"-ms-touch-action":"none","touch-action":"none"})});z(x.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(F)});z(x.prototype,"destroy",function(a){this.batchMSEvents(t);a.call(this)})}})(L);(function(a){var F=a.addEvent,
E=a.css,G=a.discardElement,r=a.defined,h=a.each,p=a.isFirefox,x=a.marginNames,t=a.merge,q=a.pick,z=a.setAnimation,k=a.stableSort,m=a.win,f=a.wrap;a.Legend=function(a,c){this.init(a,c)};a.Legend.prototype={init:function(a,c){this.chart=a;this.setOptions(c);c.enabled&&(this.render(),F(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},setOptions:function(a){var c=q(a.padding,8);this.options=a;this.itemStyle=a.itemStyle;this.itemHiddenStyle=t(this.itemStyle,a.itemHiddenStyle);this.itemMarginTop=
a.itemMarginTop||0;this.padding=c;this.initialItemY=c-5;this.itemHeight=this.maxItemWidth=0;this.symbolWidth=q(a.symbolWidth,16);this.pages=[]},update:function(a,c){var b=this.chart;this.setOptions(t(!0,this.options,a));this.destroy();b.isDirtyLegend=b.isDirtyBox=!0;q(c,!0)&&b.redraw()},colorizeItem:function(a,c){a.legendGroup[c?"removeClass":"addClass"]("highcharts-legend-item-hidden");var b=this.options,e=a.legendItem,l=a.legendLine,f=a.legendSymbol,k=this.itemHiddenStyle.color,b=c?b.itemStyle.color:
k,m=c?a.color||k:k,h=a.options&&a.options.marker,g={fill:m};e&&e.css({fill:b,color:b});l&&l.attr({stroke:m});f&&(h&&f.isMarker&&(g=a.pointAttribs(),c||(g.stroke=g.fill=k)),f.attr(g))},positionItem:function(a){var c=this.options,b=c.symbolPadding,c=!c.rtl,e=a._legendItemPos,l=e[0],e=e[1],f=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(c?l:this.legendWidth-l-2*b-4,e);f&&(f.x=l,f.y=e)},destroyItem:function(a){var c=a.checkbox;h(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&
(a[b]=a[b].destroy())});c&&G(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}h(this.getAllItems(),function(c){h(["legendItem","legendGroup"],a,c)});h("clipRect up down pager nav box title group".split(" "),a,this);this.display=null},positionCheckboxes:function(){var a=this.group&&this.group.alignAttr,c,b=this.clipHeight||this.legendHeight,f=this.titleHeight;a&&(c=a.translateY,h(this.allItems,function(e){var l=e.checkbox,k;l&&(k=c+f+l.y+(this.scrollOffset||0)+3,E(l,
{left:a.translateX+e.checkboxOffset+l.x-20+"px",top:k+"px",display:k>c-6&&k<c+b-6?"":"none"}))},this))},renderTitle:function(){var a=this.options,c=this.padding,b=a.title,f=0;b.text&&(this.title||(this.title=this.chart.renderer.label(b.text,c-3,c-4,null,null,null,a.useHTML,null,"legend-title").attr({zIndex:1}).css(b.style).add(this.group)),a=this.title.getBBox(),f=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:f}));this.titleHeight=f},setText:function(e){var c=this.options;e.legendItem.attr({text:c.labelFormat?
a.format(c.labelFormat,e):c.labelFormatter.call(e)})},renderItem:function(a){var c=this.chart,b=c.renderer,e=this.options,l="horizontal"===e.layout,f=this.symbolWidth,k=e.symbolPadding,m=this.itemStyle,h=this.itemHiddenStyle,g=this.padding,y=l?q(e.itemDistance,20):0,p=!e.rtl,A=e.width,d=e.itemMarginBottom||0,v=this.itemMarginTop,B=a.legendItem,u=!a.series,n=!u&&a.series.drawLegendSymbol?a.series:a,r=n.options,M=this.createCheckboxForItem&&r&&r.showCheckbox,r=f+k+y+(M?20:0),x=e.useHTML,N=a.options.className;
B||(a.legendGroup=b.g("legend-item").addClass("highcharts-"+n.type+"-series highcharts-color-"+a.colorIndex+(N?" "+N:"")+(u?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=B=b.text("",p?f+k:-k,this.baseline||0,x).css(t(a.visible?m:h)).attr({align:p?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(f=m.fontSize,this.fontMetrics=b.fontMetrics(f,B),this.baseline=this.fontMetrics.f+3+v,B.attr("y",this.baseline)),this.symbolHeight=e.symbolHeight||this.fontMetrics.f,
n.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,B,x),M&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);m.width||B.css({width:(e.itemWidth||e.width||c.spacingBox.width)-r});this.setText(a);b=B.getBBox();m=a.checkboxOffset=e.itemWidth||a.legendItemWidth||b.width+r;this.itemHeight=b=Math.round(a.legendItemHeight||b.height||this.symbolHeight);l&&this.itemX-g+m>(A||c.spacingBox.width-2*g-e.x)&&(this.itemX=g,this.itemY+=v+this.lastLineHeight+d,this.lastLineHeight=0);this.maxItemWidth=
Math.max(this.maxItemWidth,m);this.lastItemY=v+this.itemY+d;this.lastLineHeight=Math.max(b,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];l?this.itemX+=m:(this.itemY+=v+b+d,this.lastLineHeight=b);this.offsetWidth=A||Math.max((l?this.itemX-g-(a.checkbox?0:y):m)+g,this.offsetWidth)},getAllItems:function(){var a=[];h(this.chart.series,function(c){var b=c&&c.options;c&&q(b.showInLegend,r(b.linkedTo)?!1:void 0,!0)&&(a=a.concat(c.legendItems||("point"===b.legendType?c.data:c)))});return a},
adjustMargins:function(a,c){var b=this.chart,e=this.options,l=e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0);e.floating||h([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(f,k){f.test(l)&&!r(a[k])&&(b[x[k]]=Math.max(b[x[k]],b.legend[(k+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][k]*e[k%2?"x":"y"]+q(e.margin,12)+c[k]))})},render:function(){var a=this,c=a.chart,b=c.renderer,f=a.group,l,m,p,C,q=a.box,g=a.options,y=a.padding;a.itemX=y;a.itemY=a.initialItemY;a.offsetWidth=
0;a.lastItemY=0;f||(a.group=f=b.g("legend").attr({zIndex:7}).add(),a.contentGroup=b.g().attr({zIndex:1}).add(f),a.scrollGroup=b.g().add(a.contentGroup));a.renderTitle();l=a.getAllItems();k(l,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});g.reversed&&l.reverse();a.allItems=l;a.display=m=!!l.length;a.lastLineHeight=0;h(l,function(b){a.renderItem(b)});p=(g.width||a.offsetWidth)+y;C=a.lastItemY+a.lastLineHeight+a.titleHeight;C=a.handleOverflow(C);C+=
y;q||(a.box=q=b.rect().addClass("highcharts-legend-box").attr({r:g.borderRadius}).add(f),q.isNew=!0);q.attr({stroke:g.borderColor,"stroke-width":g.borderWidth||0,fill:g.backgroundColor||"none"}).shadow(g.shadow);0<p&&0<C&&(q[q.isNew?"attr":"animate"](q.crisp.call({},{x:0,y:0,width:p,height:C},q.strokeWidth())),q.isNew=!1);q[m?"show":"hide"]();a.legendWidth=p;a.legendHeight=C;h(l,function(b){a.positionItem(b)});m&&f.align(t(g,{width:p,height:C}),!0,"spacingBox");c.isResizing||this.positionCheckboxes()},
handleOverflow:function(a){var c=this,b=this.chart,e=b.renderer,l=this.options,f=l.y,k=this.padding,b=b.spacingBox.height+("top"===l.verticalAlign?-f:f)-k,f=l.maxHeight,m,p=this.clipRect,g=l.navigation,y=q(g.animation,!0),t=g.arrowSize||12,A=this.nav,d=this.pages,v,B=this.allItems,u=function(a){"number"===typeof a?p.attr({height:a}):p&&(c.clipRect=p.destroy(),c.contentGroup.clip());c.contentGroup.div&&(c.contentGroup.div.style.clip=a?"rect("+k+"px,9999px,"+(k+a)+"px,0)":"auto")};"horizontal"!==l.layout||
"middle"===l.verticalAlign||l.floating||(b/=2);f&&(b=Math.min(b,f));d.length=0;a>b&&!1!==g.enabled?(this.clipHeight=m=Math.max(b-20-this.titleHeight-k,0),this.currentPage=q(this.currentPage,1),this.fullHeight=a,h(B,function(a,b){var c=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var g=d.length;if(!g||c-d[g-1]>m&&(v||c)!==d[g-1])d.push(v||c),g++;b===B.length-1&&c+a-d[g-1]>m&&d.push(c);c!==v&&(v=c)}),p||(p=c.clipRect=e.clipRect(0,k,9999,0),c.contentGroup.clip(p)),u(m),A||(this.nav=
A=e.g().attr({zIndex:1}).add(this.group),this.up=e.symbol("triangle",0,0,t,t).on("click",function(){c.scroll(-1,y)}).add(A),this.pager=e.text("",15,10).addClass("highcharts-legend-navigation").css(g.style).add(A),this.down=e.symbol("triangle-down",0,0,t,t).on("click",function(){c.scroll(1,y)}).add(A)),c.scroll(0),a=b):A&&(u(),this.nav=A.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,c){var b=this.pages,e=b.length;a=this.currentPage+a;var l=this.clipHeight,
f=this.options.navigation,k=this.pager,m=this.padding;a>e&&(a=e);0<a&&(void 0!==c&&z(c,this.chart),this.nav.attr({translateX:m,translateY:l+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===a?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),k.attr({text:a+"/"+e}),this.down.attr({x:18+this.pager.getBBox().width,"class":a===e?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),this.up.attr({fill:1===a?f.inactiveColor:f.activeColor}).css({cursor:1===
a?"default":"pointer"}),this.down.attr({fill:a===e?f.inactiveColor:f.activeColor}).css({cursor:a===e?"default":"pointer"}),this.scrollOffset=-b[a-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=a,this.positionCheckboxes())}};a.LegendSymbolMixin={drawRectangle:function(a,c){var b=a.symbolHeight,e=a.options.squareSymbol;c.legendSymbol=this.chart.renderer.rect(e?(a.symbolWidth-b)/2:0,a.baseline-b+1,e?b:a.symbolWidth,b,q(a.options.symbolRadius,b/2)).addClass("highcharts-point").attr({zIndex:3}).add(c.legendGroup)},
drawLineMarker:function(a){var c=this.options,b=c.marker,e=a.symbolWidth,l=a.symbolHeight,f=l/2,k=this.chart.renderer,m=this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);var h;h={"stroke-width":c.lineWidth||0};c.dashStyle&&(h.dashstyle=c.dashStyle);this.legendLine=k.path(["M",0,a,"L",e,a]).addClass("highcharts-graph").attr(h).add(m);b&&!1!==b.enabled&&(c=Math.min(q(b.radius,f),f),0===this.symbol.indexOf("url")&&(b=t(b,{width:l,height:l}),c=0),this.legendSymbol=b=k.symbol(this.symbol,e/
2-c,a-c,2*c,2*c,b).addClass("highcharts-point").add(m),b.isMarker=!0)}};(/Trident\/7\.0/.test(m.navigator.userAgent)||p)&&f(a.Legend.prototype,"positionItem",function(a,c){var b=this,e=function(){c._legendItemPos&&a.call(b,c)};e();setTimeout(e)})})(L);(function(a){var F=a.addEvent,E=a.animate,G=a.animObject,r=a.attr,h=a.doc,p=a.Axis,x=a.createElement,t=a.defaultOptions,q=a.discardElement,z=a.charts,k=a.css,m=a.defined,f=a.each,e=a.extend,c=a.find,b=a.fireEvent,w=a.grep,l=a.isNumber,D=a.isObject,H=
a.isString,C=a.Legend,K=a.marginNames,g=a.merge,y=a.objectEach,J=a.Pointer,A=a.pick,d=a.pInt,v=a.removeEvent,B=a.seriesTypes,u=a.splat,n=a.svg,P=a.syncTimeout,M=a.win,O=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,d,b){return new O(a,d,b)};e(O.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(H(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(d,b){var c,n,v=d.series,e=d.plotOptions||{};d.series=null;c=g(t,d);for(n in c.plotOptions)c.plotOptions[n].tooltip=
e[n]&&g(e[n].tooltip)||void 0;c.tooltip.userOptions=d.chart&&d.chart.forExport&&d.tooltip.userOptions||d.tooltip;c.series=d.series=v;this.userOptions=d;d=c.chart;n=d.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.labelCollectors=[];this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.hasCartesianSeries=d.showAxes;var l=this;l.index=z.length;z.push(l);a.chartCount++;n&&y(n,function(a,d){F(l,d,a)});l.xAxis=[];l.yAxis=[];l.pointCount=l.colorCounter=l.symbolCounter=
0;l.firstRender()},initSeries:function(d){var b=this.options.chart;(b=B[d.type||b.type||b.defaultSeriesType])||a.error(17,!0);b=new b;b.init(this,d);return b},orderSeries:function(a){var d=this.series;for(a=a||0;a<d.length;a++)d[a]&&(d[a].index=a,d[a].name=d[a].name||"Series "+(d[a].index+1))},isInsidePlot:function(a,d,b){var c=b?d:a;a=b?a:d;return 0<=c&&c<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(d){var c=this.axes,g=this.series,n=this.pointer,v=this.legend,l=this.isDirtyLegend,
A,u,k=this.hasCartesianSeries,B=this.isDirtyBox,m,h=this.renderer,y=h.isHidden(),w=[];this.setResponsive&&this.setResponsive(!1);a.setAnimation(d,this);y&&this.temporaryDisplay();this.layOutTitles();for(d=g.length;d--;)if(m=g[d],m.options.stacking&&(A=!0,m.isDirty)){u=!0;break}if(u)for(d=g.length;d--;)m=g[d],m.options.stacking&&(m.isDirty=!0);f(g,function(a){a.isDirty&&"point"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),l=!0);a.isDirtyData&&b(a,"updatedData")});l&&v.options.enabled&&
(v.render(),this.isDirtyLegend=!1);A&&this.getStacks();k&&f(c,function(a){a.updateNames();a.setScale()});this.getMargins();k&&(f(c,function(a){a.isDirty&&(B=!0)}),f(c,function(a){var d=a.min+","+a.max;a.extKey!==d&&(a.extKey=d,w.push(function(){b(a,"afterSetExtremes",e(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(B||A)&&a.redraw()}));B&&this.drawChartBox();b(this,"predraw");f(g,function(a){(B||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});n&&n.reset(!0);h.draw();b(this,"redraw");b(this,
"render");y&&this.temporaryDisplay(!0);f(w,function(a){a.call()})},get:function(a){function d(d){return d.id===a||d.options&&d.options.id===a}var b,g=this.series,n;b=c(this.axes,d)||c(this.series,d);for(n=0;!b&&n<g.length;n++)b=c(g[n].points||[],d);return b},getAxes:function(){var a=this,d=this.options,b=d.xAxis=u(d.xAxis||{}),d=d.yAxis=u(d.yAxis||{});f(b,function(a,d){a.index=d;a.isX=!0});f(d,function(a,d){a.index=d});b=b.concat(d);f(b,function(d){new p(a,d)})},getSelectedPoints:function(){var a=
[];f(this.series,function(d){a=a.concat(w(d.data||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return w(this.series,function(a){return a.selected})},setTitle:function(a,d,b){var c=this,n=c.options,v;v=n.title=g({style:{color:"#333333",fontSize:n.isStock?"16px":"18px"}},n.title,a);n=n.subtitle=g({style:{color:"#666666"}},n.subtitle,d);f([["title",a,v],["subtitle",d,n]],function(a,d){var b=a[0],g=c[b],n=a[1];a=a[2];g&&n&&(c[b]=g=g.destroy());a&&!g&&(c[b]=c.renderer.text(a.text,
0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+b,zIndex:a.zIndex||4}).add(),c[b].update=function(a){c.setTitle(!d&&a,d&&a)},c[b].css(a.style))});c.layOutTitles(b)},layOutTitles:function(a){var d=0,b,c=this.renderer,g=this.spacingBox;f(["title","subtitle"],function(a){var b=this[a],n=this.options[a];a="title"===a?-3:n.verticalAlign?0:d+2;var v;b&&(v=n.style.fontSize,v=c.fontMetrics(v,b).b,b.css({width:(n.width||g.width+n.widthAdjust)+"px"}).align(e({y:a+v},n),!1,"spacingBox"),n.floating||
n.verticalAlign||(d=Math.ceil(d+b.getBBox(n.useHTML).height)))},this);b=this.titleOffset!==d;this.titleOffset=d;!this.isDirtyBox&&b&&(this.isDirtyBox=b,this.hasRendered&&A(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var d=this.options.chart,b=d.width,d=d.height,c=this.renderTo;m(b)||(this.containerWidth=a.getStyle(c,"width"));m(d)||(this.containerHeight=a.getStyle(c,"height"));this.chartWidth=Math.max(0,b||this.containerWidth||600);this.chartHeight=Math.max(0,a.relativeLength(d,
this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},temporaryDisplay:function(d){var b=this.renderTo;if(d)for(;b&&b.style;)b.hcOrigStyle&&(a.css(b,b.hcOrigStyle),delete b.hcOrigStyle),b.hcOrigDetached&&(h.body.removeChild(b),b.hcOrigDetached=!1),b=b.parentNode;else for(;b&&b.style;){h.body.contains(b)||b.parentNode||(b.hcOrigDetached=!0,h.body.appendChild(b));if("none"===a.getStyle(b,"display",!1)||b.hcOricDetached)b.hcOrigStyle={display:b.style.display,height:b.style.height,overflow:b.style.overflow},
d={display:"block",overflow:"hidden"},b!==this.renderTo&&(d.height=0),a.css(b,d),b.offsetWidth||b.style.setProperty("display","block","important");b=b.parentNode;if(b===h.body)break}},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var b,c=this.options,g=c.chart,n,v;b=this.renderTo;var A=a.uniqueKey(),u;b||(this.renderTo=b=g.renderTo);H(b)&&(this.renderTo=b=h.getElementById(b));b||a.error(13,!0);n=d(r(b,"data-highcharts-chart"));l(n)&&z[n]&&
z[n].hasRendered&&z[n].destroy();r(b,"data-highcharts-chart",this.index);b.innerHTML="";g.skipClone||b.offsetWidth||this.temporaryDisplay();this.getChartSize();n=this.chartWidth;v=this.chartHeight;u=e({position:"relative",overflow:"hidden",width:n+"px",height:v+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},g.style);this.container=b=x("div",{id:A},u,b);this._cursor=b.style.cursor;this.renderer=new (a[g.renderer]||a.Renderer)(b,n,v,null,g.forExport,
c.exporting&&c.exporting.allowHTML);this.setClassName(g.className);this.renderer.setStyle(g.style);this.renderer.chartIndex=this.index},getMargins:function(a){var d=this.spacing,b=this.margin,c=this.titleOffset;this.resetMargins();c&&!m(b[0])&&(this.plotTop=Math.max(this.plotTop,c+this.options.title.margin+d[0]));this.legend&&this.legend.display&&this.legend.adjustMargins(b,d);this.extraMargin&&(this[this.extraMargin.type]=(this[this.extraMargin.type]||0)+this.extraMargin.value);this.adjustPlotArea&&
this.adjustPlotArea();a||this.getAxisMargins()},getAxisMargins:function(){var a=this,d=a.axisOffset=[0,0,0,0],b=a.margin;a.hasCartesianSeries&&f(a.axes,function(a){a.visible&&a.getOffset()});f(K,function(c,g){m(b[g])||(a[c]+=d[g])});a.setChartSize()},reflow:function(d){var b=this,c=b.options.chart,g=b.renderTo,n=m(c.width)&&m(c.height),v=c.width||a.getStyle(g,"width"),c=c.height||a.getStyle(g,"height"),g=d?d.target:M;if(!n&&!b.isPrinting&&v&&c&&(g===M||g===h)){if(v!==b.containerWidth||c!==b.containerHeight)clearTimeout(b.reflowTimeout),
b.reflowTimeout=P(function(){b.container&&b.setSize(void 0,void 0,!1)},d?100:0);b.containerWidth=v;b.containerHeight=c}},initReflow:function(){var a=this,d;d=F(M,"resize",function(d){a.reflow(d)});F(a,"destroy",d)},setSize:function(d,c,g){var n=this,v=n.renderer;n.isResizing+=1;a.setAnimation(g,n);n.oldChartHeight=n.chartHeight;n.oldChartWidth=n.chartWidth;void 0!==d&&(n.options.chart.width=d);void 0!==c&&(n.options.chart.height=c);n.getChartSize();d=v.globalAnimation;(d?E:k)(n.container,{width:n.chartWidth+
"px",height:n.chartHeight+"px"},d);n.setChartSize(!0);v.setSize(n.chartWidth,n.chartHeight,g);f(n.axes,function(a){a.isDirty=!0;a.setScale()});n.isDirtyLegend=!0;n.isDirtyBox=!0;n.layOutTitles();n.getMargins();n.redraw(g);n.oldChartHeight=null;b(n,"resize");P(function(){n&&b(n,"endResize",null,function(){--n.isResizing})},G(d).duration)},setChartSize:function(a){var d=this.inverted,b=this.renderer,c=this.chartWidth,g=this.chartHeight,n=this.options.chart,v=this.spacing,e=this.clipOffset,l,A,u,k;this.plotLeft=
l=Math.round(this.plotLeft);this.plotTop=A=Math.round(this.plotTop);this.plotWidth=u=Math.max(0,Math.round(c-l-this.marginRight));this.plotHeight=k=Math.max(0,Math.round(g-A-this.marginBottom));this.plotSizeX=d?k:u;this.plotSizeY=d?u:k;this.plotBorderWidth=n.plotBorderWidth||0;this.spacingBox=b.spacingBox={x:v[3],y:v[0],width:c-v[3]-v[1],height:g-v[0]-v[2]};this.plotBox=b.plotBox={x:l,y:A,width:u,height:k};c=2*Math.floor(this.plotBorderWidth/2);d=Math.ceil(Math.max(c,e[3])/2);b=Math.ceil(Math.max(c,
e[0])/2);this.clipBox={x:d,y:b,width:Math.floor(this.plotSizeX-Math.max(c,e[1])/2-d),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(c,e[2])/2-b))};a||f(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this,d=a.options.chart;f(["margin","spacing"],function(b){var c=d[b],g=D(c)?c:[c,c,c,c];f(["Top","Right","Bottom","Left"],function(c,n){a[b][n]=A(d[b+c],g[n])})});f(K,function(d,b){a[d]=A(a.margin[b],a.spacing[b])});a.axisOffset=[0,0,0,0];a.clipOffset=
[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,d=this.renderer,b=this.chartWidth,c=this.chartHeight,g=this.chartBackground,n=this.plotBackground,v=this.plotBorder,e,l=this.plotBGImage,A=a.backgroundColor,u=a.plotBackgroundColor,f=a.plotBackgroundImage,k,B=this.plotLeft,m=this.plotTop,h=this.plotWidth,y=this.plotHeight,w=this.plotBox,C=this.clipRect,p=this.clipBox,t="animate";g||(this.chartBackground=g=d.rect().addClass("highcharts-background").add(),t="attr");e=a.borderWidth||0;k=e+(a.shadow?
8:0);A={fill:A||"none"};if(e||g["stroke-width"])A.stroke=a.borderColor,A["stroke-width"]=e;g.attr(A).shadow(a.shadow);g[t]({x:k/2,y:k/2,width:b-k-e%2,height:c-k-e%2,r:a.borderRadius});t="animate";n||(t="attr",this.plotBackground=n=d.rect().addClass("highcharts-plot-background").add());n[t](w);n.attr({fill:u||"none"}).shadow(a.plotShadow);f&&(l?l.animate(w):this.plotBGImage=d.image(f,B,m,h,y).add());C?C.animate({width:p.width,height:p.height}):this.clipRect=d.clipRect(p);t="animate";v||(t="attr",this.plotBorder=
v=d.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());v.attr({stroke:a.plotBorderColor,"stroke-width":a.plotBorderWidth||0,fill:"none"});v[t](v.crisp({x:B,y:m,width:h,height:y},-v.strokeWidth()));this.isDirtyBox=!1},propFromSeries:function(){var a=this,d=a.options.chart,b,c=a.options.series,g,n;f(["inverted","angular","polar"],function(v){b=B[d.type||d.defaultSeriesType];n=d[v]||b&&b.prototype[v];for(g=c&&c.length;!n&&g--;)(b=B[c[g].type])&&b.prototype[v]&&(n=!0);a[v]=n})},linkSeries:function(){var a=
this,d=a.series;f(d,function(a){a.linkedSeries.length=0});f(d,function(d){var b=d.options.linkedTo;H(b)&&(b=":previous"===b?a.series[d.index-1]:a.get(b))&&b.linkedParent!==d&&(b.linkedSeries.push(d),d.linkedParent=b,d.visible=A(d.options.visible,b.options.visible,d.visible))})},renderSeries:function(){f(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&f(b.items,function(c){var g=e(b.style,c.style),n=d(g.left)+a.plotLeft,v=d(g.top)+
a.plotTop+12;delete g.left;delete g.top;a.renderer.text(c.html,n,v).attr({zIndex:2}).css(g).add()})},render:function(){var a=this.axes,d=this.renderer,b=this.options,c,g,n;this.setTitle();this.legend=new C(this,b.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();b=this.plotWidth;c=this.plotHeight=Math.max(this.plotHeight-21,0);f(a,function(a){a.setScale()});this.getAxisMargins();g=1.1<b/this.plotWidth;n=1.05<c/this.plotHeight;if(g||n)f(a,function(a){(a.horiz&&g||!a.horiz&&
n)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&f(a,function(a){a.visible&&a.render()});this.seriesGroup||(this.seriesGroup=d.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0},addCredits:function(a){var d=this;a=g(!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&&(M.location.href=a.href)}).attr({align:a.position.align,zIndex:8}).css(a.style).add().align(a.position),this.credits.update=function(a){d.credits=d.credits.destroy();d.addCredits(a)})},destroy:function(){var d=this,c=d.axes,g=d.series,n=d.container,e,l=n&&n.parentNode;b(d,"destroy");d.renderer.forExport?a.erase(z,d):z[d.index]=void 0;a.chartCount--;d.renderTo.removeAttribute("data-highcharts-chart");v(d);for(e=c.length;e--;)c[e]=c[e].destroy();this.scroller&&this.scroller.destroy&&
this.scroller.destroy();for(e=g.length;e--;)g[e]=g[e].destroy();f("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),function(a){var b=d[a];b&&b.destroy&&(d[a]=b.destroy())});n&&(n.innerHTML="",v(n),l&&q(n));y(d,function(a,b){delete d[b]})},isReadyToRender:function(){var a=this;return n||M!=M.top||"complete"===h.readyState?!0:(h.attachEvent("onreadystatechange",function(){h.detachEvent("onreadystatechange",
a.firstRender);"complete"===h.readyState&&a.firstRender()}),!1)},firstRender:function(){var a=this,d=a.options;if(a.isReadyToRender()){a.getContainer();b(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();f(d.series||[],function(d){a.initSeries(d)});a.linkSeries();b(a,"beforeRender");J&&(a.pointer=new J(a,d));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.temporaryDisplay(!0)}},onload:function(){f([this.callback].concat(this.callbacks),function(a){a&&void 0!==this.index&&
a.apply(this,[this])},this);b(this,"load");b(this,"render");m(this.index)&&!1!==this.options.chart.reflow&&this.initReflow();this.onload=null}})})(L);(function(a){var F,E=a.each,G=a.extend,r=a.erase,h=a.fireEvent,p=a.format,x=a.isArray,t=a.isNumber,q=a.pick,z=a.removeEvent;a.Point=F=function(){};a.Point.prototype={init:function(a,m,f){this.series=a;this.color=a.color;this.applyOptions(m,f);a.options.colorByPoint?(m=a.options.colors||a.chart.options.colors,this.color=this.color||m[a.colorCounter],
m=m.length,f=a.colorCounter,a.colorCounter++,a.colorCounter===m&&(a.colorCounter=0)):f=a.colorIndex;this.colorIndex=q(this.colorIndex,f);a.chart.pointCount++;return this},applyOptions:function(a,m){var f=this.series,e=f.options.pointValKey||f.pointValKey;a=F.prototype.optionsToObject.call(this,a);G(this,a);this.options=this.options?G(this.options,a):a;a.group&&delete this.group;e&&(this.y=this[e]);this.isNull=q(this.isValid&&!this.isValid(),null===this.x||!t(this.y,!0));this.selected&&(this.state=
"select");"name"in this&&void 0===m&&f.xAxis&&f.xAxis.hasNames&&(this.x=f.xAxis.nameToX(this));void 0===this.x&&f&&(this.x=void 0===m?f.autoIncrement(this):m);return this},optionsToObject:function(a){var k={},f=this.series,e=f.options.keys,c=e||f.pointArrayMap||["y"],b=c.length,h=0,l=0;if(t(a)||null===a)k[c[0]]=a;else if(x(a))for(!e&&a.length>b&&(f=typeof a[0],"string"===f?k.name=a[0]:"number"===f&&(k.x=a[0]),h++);l<b;)e&&void 0===a[h]||(k[c[l]]=a[h]),h++,l++;else"object"===typeof a&&(k=a,a.dataLabels&&
(f._hasPointLabels=!0),a.marker&&(f._hasPointMarkers=!0));return k},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 a=this.series,
m=a.zones,a=a.zoneAxis||"y",f=0,e;for(e=m[f];this[a]>=e.value;)e=m[++f];e&&e.color&&!this.options.color&&(this.color=e.color);return e},destroy:function(){var a=this.series.chart,m=a.hoverPoints,f;a.pointCount--;m&&(this.setState(),r(m,this),m.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)z(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(f in this)this[f]=null},destroyElements:function(){for(var a=["graphic","dataLabel",
"dataLabelUpper","connector","shadowGroup"],m,f=6;f--;)m=a[f],this[m]&&(this[m]=this[m].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var k=this.series,f=k.tooltipOptions,e=q(f.valueDecimals,""),c=f.valuePrefix||"",b=f.valueSuffix||"";E(k.pointArrayMap||["y"],function(f){f="{point."+
f;if(c||b)a=a.replace(f+"}",c+f+"}"+b);a=a.replace(f+"}",f+":,."+e+"f}")});return p(a,{point:this,series:this.series})},firePointEvent:function(a,m,f){var e=this,c=this.series.options;(c.point.events[a]||e.options&&e.options.events&&e.options.events[a])&&this.importEvents();"click"===a&&c.allowPointSelect&&(f=function(a){e.select&&e.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});h(this,a,m,f)},visible:!0}})(L);(function(a){var F=a.addEvent,E=a.animObject,G=a.arrayMax,r=a.arrayMin,h=a.correctFloat,
p=a.Date,x=a.defaultOptions,t=a.defaultPlotOptions,q=a.defined,z=a.each,k=a.erase,m=a.extend,f=a.fireEvent,e=a.grep,c=a.isArray,b=a.isNumber,w=a.isString,l=a.merge,D=a.objectEach,H=a.pick,C=a.removeEvent,K=a.splat,g=a.SVGElement,y=a.syncTimeout,J=a.win;a.Series=a.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",
lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},
{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,d){var b=this,c,g=a.series,n;b.chart=a;b.options=d=b.setOptions(d);b.linkedSeries=[];b.bindAxes();m(b,{name:d.name,state:"",visible:!1!==d.visible,selected:!0===d.selected});c=d.events;D(c,function(a,d){F(b,d,a)});if(c&&c.click||d.point&&d.point.events&&d.point.events.click||d.allowPointSelect)a.runTrackerClick=!0;b.getColor();
b.getSymbol();z(b.parallelArrays,function(a){b[a+"Data"]=[]});b.setData(d.data,!1);b.isCartesian&&(a.hasCartesianSeries=!0);g.length&&(n=g[g.length-1]);b._i=H(n&&n._i,-1)+1;a.orderSeries(this.insert(g))},insert:function(a){var d=this.options.index,c;if(b(d)){for(c=a.length;c--;)if(d>=H(a[c].options.index,a[c]._i)){a.splice(c+1,0,this);break}-1===c&&a.unshift(this);c+=1}else a.push(this);return H(c,a.length-1)},bindAxes:function(){var b=this,d=b.options,c=b.chart,g;z(b.axisTypes||[],function(v){z(c[v],
function(a){g=a.options;if(d[v]===g.index||void 0!==d[v]&&d[v]===g.id||void 0===d[v]&&0===g.index)b.insert(a.series),b[v]=a,a.isDirty=!0});b[v]||b.optionalAxis===v||a.error(18,!0)})},updateParallelArrays:function(a,d){var c=a.series,g=arguments,e=b(d)?function(b){var g="y"===b&&c.toYData?c.toYData(a):a[b];c[b+"Data"][d]=g}:function(a){Array.prototype[d].apply(c[a+"Data"],Array.prototype.slice.call(g,2))};z(c.parallelArrays,e)},autoIncrement:function(){var a=this.options,d=this.xIncrement,b,c=a.pointIntervalUnit,
d=H(d,a.pointStart,0);this.pointInterval=b=H(this.pointInterval,a.pointInterval,1);c&&(a=new p(d),"day"===c?a=+a[p.hcSetDate](a[p.hcGetDate]()+b):"month"===c?a=+a[p.hcSetMonth](a[p.hcGetMonth]()+b):"year"===c&&(a=+a[p.hcSetFullYear](a[p.hcGetFullYear]()+b)),b=a-d);this.xIncrement=d+b;return d},setOptions:function(a){var d=this.chart,b=d.options,c=b.plotOptions,g=(d.userOptions||{}).plotOptions||{},n=c[this.type];this.userOptions=a;d=l(n,c.series,a);this.tooltipOptions=l(x.tooltip,x.plotOptions.series&&
x.plotOptions.series.tooltip,x.plotOptions[this.type].tooltip,b.tooltip.userOptions,c.series&&c.series.tooltip,c[this.type].tooltip,a.tooltip);this.stickyTracking=H(a.stickyTracking,g[this.type]&&g[this.type].stickyTracking,g.series&&g.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:d.stickyTracking);null===n.marker&&delete d.marker;this.zoneAxis=d.zoneAxis;a=this.zones=(d.zones||[]).slice();!d.negativeColor&&!d.negativeFillColor||d.zones||a.push({value:d[this.zoneAxis+
"Threshold"]||d.threshold||0,className:"highcharts-negative",color:d.negativeColor,fillColor:d.negativeFillColor});a.length&&q(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});return d},getCyclic:function(a,d,b){var c,g=this.chart,n=this.userOptions,e=a+"Index",v=a+"Counter",l=b?b.length:H(g.options.chart[a+"Count"],g[a+"Count"]);d||(c=H(n[e],n["_"+e]),q(c)||(g.series.length||(g[v]=0),n["_"+e]=c=g[v]%l,g[v]+=1),b&&(d=b[c]));void 0!==c&&(this[e]=c);this[a]=d},getColor:function(){this.options.colorByPoint?
this.options.color=null:this.getCyclic("color",this.options.color||t[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,setData:function(g,d,e,l){var v=this,n=v.points,f=n&&n.length||0,A,k=v.options,m=v.chart,B=null,h=v.xAxis,y=k.turboThreshold,C=this.xData,p=this.yData,t=(A=v.pointArrayMap)&&A.length;g=g||[];A=g.length;d=H(d,!0);if(!1!==l&&A&&f===A&&!v.cropped&&
!v.hasGroupedData&&v.visible)z(g,function(a,d){n[d].update&&a!==k.data[d]&&n[d].update(a,!1,null,!1)});else{v.xIncrement=null;v.colorCounter=0;z(this.parallelArrays,function(a){v[a+"Data"].length=0});if(y&&A>y){for(e=0;null===B&&e<A;)B=g[e],e++;if(b(B))for(e=0;e<A;e++)C[e]=this.autoIncrement(),p[e]=g[e];else if(c(B))if(t)for(e=0;e<A;e++)B=g[e],C[e]=B[0],p[e]=B.slice(1,t+1);else for(e=0;e<A;e++)B=g[e],C[e]=B[0],p[e]=B[1];else a.error(12)}else for(e=0;e<A;e++)void 0!==g[e]&&(B={series:v},v.pointClass.prototype.applyOptions.apply(B,
[g[e]]),v.updateParallelArrays(B,e));p&&w(p[0])&&a.error(14,!0);v.data=[];v.options.data=v.userOptions.data=g;for(e=f;e--;)n[e]&&n[e].destroy&&n[e].destroy();h&&(h.minRange=h.userMinRange);v.isDirty=m.isDirtyBox=!0;v.isDirtyData=!!n;e=!1}"point"===k.legendType&&(this.processData(),this.generatePoints());d&&m.redraw(e)},processData:function(b){var d=this.xData,c=this.yData,g=d.length,e;e=0;var n,l,f=this.xAxis,A,k=this.options;A=k.cropThreshold;var m=this.getExtremesFromAll||k.getExtremesFromAll,h=
this.isCartesian,k=f&&f.val2lin,y=f&&f.isLog,w=this.requireSorting,C,p;if(h&&!this.isDirty&&!f.isDirty&&!this.yAxis.isDirty&&!b)return!1;f&&(b=f.getExtremes(),C=b.min,p=b.max);if(h&&this.sorted&&!m&&(!A||g>A||this.forceCrop))if(d[g-1]<C||d[0]>p)d=[],c=[];else if(d[0]<C||d[g-1]>p)e=this.cropData(this.xData,this.yData,C,p),d=e.xData,c=e.yData,e=e.start,n=!0;for(A=d.length||1;--A;)g=y?k(d[A])-k(d[A-1]):d[A]-d[A-1],0<g&&(void 0===l||g<l)?l=g:0>g&&w&&(a.error(15),w=!1);this.cropped=n;this.cropStart=e;
this.processedXData=d;this.processedYData=c;this.closestPointRange=l},cropData:function(a,d,b,c){var g=a.length,n=0,e=g,v=H(this.cropShoulder,1),l;for(l=0;l<g;l++)if(a[l]>=b){n=Math.max(0,l-v);break}for(b=l;b<g;b++)if(a[b]>c){e=b+v;break}return{xData:a.slice(n,e),yData:d.slice(n,e),start:n,end:e}},generatePoints:function(){var a=this.options,d=a.data,b=this.data,c,g=this.processedXData,n=this.processedYData,e=this.pointClass,l=g.length,f=this.cropStart||0,k,m=this.hasGroupedData,a=a.keys,h,y=[],w;
b||m||(b=[],b.length=d.length,b=this.data=b);a&&m&&(this.options.keys=!1);for(w=0;w<l;w++)k=f+w,m?(h=(new e).init(this,[g[w]].concat(K(n[w]))),h.dataGroup=this.groupMap[w]):(h=b[k])||void 0===d[k]||(b[k]=h=(new e).init(this,d[k],g[w])),h&&(h.index=k,y[w]=h);this.options.keys=a;if(b&&(l!==(c=b.length)||m))for(w=0;w<c;w++)w!==f||m||(w+=l),b[w]&&(b[w].destroyElements(),b[w].plotX=void 0);this.data=b;this.points=y},getExtremes:function(a){var d=this.yAxis,g=this.processedXData,e,l=[],n=0;e=this.xAxis.getExtremes();
var f=e.min,k=e.max,A,m,h,y;a=a||this.stackedYData||this.processedYData||[];e=a.length;for(y=0;y<e;y++)if(m=g[y],h=a[y],A=(b(h,!0)||c(h))&&(!d.positiveValuesOnly||h.length||0<h),m=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(g[y+1]||m)>=f&&(g[y-1]||m)<=k,A&&m)if(A=h.length)for(;A--;)null!==h[A]&&(l[n++]=h[A]);else l[n++]=h;this.dataMin=r(l);this.dataMax=G(l)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,d=a.stacking,
c=this.xAxis,g=c.categories,e=this.yAxis,n=this.points,l=n.length,f=!!this.modifyValue,k=a.pointPlacement,m="between"===k||b(k),y=a.threshold,w=a.startFromThreshold?y:0,C,p,t,D,J=Number.MAX_VALUE;"between"===k&&(k=.5);b(k)&&(k*=H(a.pointRange||c.pointRange));for(a=0;a<l;a++){var r=n[a],x=r.x,K=r.y;p=r.low;var z=d&&e.stacks[(this.negStacks&&K<(w?0:y)?"-":"")+this.stackKey],E;e.positiveValuesOnly&&null!==K&&0>=K&&(r.isNull=!0);r.plotX=C=h(Math.min(Math.max(-1E5,c.translate(x,0,0,0,1,k,"flags"===this.type)),
1E5));d&&this.visible&&!r.isNull&&z&&z[x]&&(D=this.getStackIndicator(D,x,this.index),E=z[x],K=E.points[D.key],p=K[0],K=K[1],p===w&&D.key===z[x].base&&(p=H(y,e.min)),e.positiveValuesOnly&&0>=p&&(p=null),r.total=r.stackTotal=E.total,r.percentage=E.total&&r.y/E.total*100,r.stackY=K,E.setOffset(this.pointXOffset||0,this.barW||0));r.yBottom=q(p)?e.translate(p,0,1,0,1):null;f&&(K=this.modifyValue(K,r));r.plotY=p="number"===typeof K&&Infinity!==K?Math.min(Math.max(-1E5,e.translate(K,0,1,0,1)),1E5):void 0;
r.isInside=void 0!==p&&0<=p&&p<=e.len&&0<=C&&C<=c.len;r.clientX=m?h(c.translate(x,0,0,0,1,k)):C;r.negative=r.y<(y||0);r.category=g&&void 0!==g[r.x]?g[r.x]:r.x;r.isNull||(void 0!==t&&(J=Math.min(J,Math.abs(C-t))),t=C);r.zone=this.zones.length&&r.getZone()}this.closestPointRangePx=J},getValidPoints:function(a,d){var b=this.chart;return e(a||this.points||[],function(a){return d&&!b.isInsidePlot(a.plotX,a.plotY,b.inverted)?!1:!a.isNull})},setClip:function(a){var d=this.chart,b=this.options,c=d.renderer,
g=d.inverted,n=this.clipBox,e=n||d.clipBox,l=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,e.height,b.xAxis,b.yAxis].join(),f=d[l],k=d[l+"m"];f||(a&&(e.width=0,g&&(e.x=d.plotSizeX),d[l+"m"]=k=c.clipRect(g?d.plotSizeX+99:-99,g?-d.plotLeft:-d.plotTop,99,g?d.chartWidth:d.chartHeight)),d[l]=f=c.clipRect(e),f.count={length:0});a&&!f.count[this.index]&&(f.count[this.index]=!0,f.count.length+=1);!1!==b.clip&&(this.group.clip(a||n?f:d.clipRect),this.markerGroup.clip(k),this.sharedClipKey=l);
a||(f.count[this.index]&&(delete f.count[this.index],--f.count.length),0===f.count.length&&l&&d[l]&&(n||(d[l]=d[l].destroy()),d[l+"m"]&&(d[l+"m"]=d[l+"m"].destroy())))},animate:function(a){var d=this.chart,b=E(this.options.animation),c;a?this.setClip(b):(c=this.sharedClipKey,(a=d[c])&&a.animate({width:d.plotSizeX,x:0},b),d[c+"m"]&&d[c+"m"].animate({width:d.plotSizeX+99,x:0},b),this.animate=null)},afterAnimate:function(){this.setClip();f(this,"afterAnimate");this.finishedAnimating=!0},drawPoints:function(){var a=
this.points,d=this.chart,b,c,g,n,e=this.options.marker,l,f,k,m=this[this.specialGroup]||this.markerGroup,h,y=H(e.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=2*e.radius);if(!1!==e.enabled||this._hasPointMarkers)for(b=0;b<a.length;b++)c=a[b],n=c.graphic,l=c.marker||{},f=!!c.marker,g=y&&void 0===l.enabled||l.enabled,k=c.isInside,g&&!c.isNull?(g=H(l.symbol,this.symbol),c.hasImage=0===g.indexOf("url"),h=this.markerAttribs(c,c.selected&&"select"),n?n[k?"show":"hide"](!0).animate(h):k&&
(0<h.width||c.hasImage)&&(c.graphic=n=d.renderer.symbol(g,h.x,h.y,h.width,h.height,f?l:e).add(m)),n&&n.attr(this.pointAttribs(c,c.selected&&"select")),n&&n.addClass(c.getClassName(),!0)):n&&(c.graphic=n.destroy())},markerAttribs:function(a,d){var b=this.options.marker,c=a.marker||{},g=H(c.radius,b.radius);d&&(b=b.states[d],d=c.states&&c.states[d],g=H(d&&d.radius,b&&b.radius,g+(b&&b.radiusPlus||0)));a.hasImage&&(g=0);a={x:Math.floor(a.plotX)-g,y:a.plotY-g};g&&(a.width=a.height=2*g);return a},pointAttribs:function(a,
d){var b=this.options.marker,c=a&&a.options,g=c&&c.marker||{},n=this.color,e=c&&c.color,l=a&&a.color,c=H(g.lineWidth,b.lineWidth);a=a&&a.zone&&a.zone.color;n=e||a||l||n;a=g.fillColor||b.fillColor||n;n=g.lineColor||b.lineColor||n;d&&(b=b.states[d],d=g.states&&g.states[d]||{},c=H(d.lineWidth,b.lineWidth,c+H(d.lineWidthPlus,b.lineWidthPlus,0)),a=d.fillColor||b.fillColor||a,n=d.lineColor||b.lineColor||n);return{stroke:n,"stroke-width":c,fill:a}},destroy:function(){var a=this,d=a.chart,b=/AppleWebKit\/533/.test(J.navigator.userAgent),
c,e,n=a.data||[],l,m;f(a,"destroy");C(a);z(a.axisTypes||[],function(d){(m=a[d])&&m.series&&(k(m.series,a),m.isDirty=m.forceRedraw=!0)});a.legendItem&&a.chart.legend.destroyItem(a);for(e=n.length;e--;)(l=n[e])&&l.destroy&&l.destroy();a.points=null;clearTimeout(a.animationTimeout);D(a,function(a,d){a instanceof g&&!a.survive&&(c=b&&"group"===d?"hide":"destroy",a[c]())});d.hoverSeries===a&&(d.hoverSeries=null);k(d.series,a);d.orderSeries();D(a,function(d,b){delete a[b]})},getGraphPath:function(a,d,b){var c=
this,g=c.options,e=g.step,l,v=[],f=[],k;a=a||c.points;(l=a.reversed)&&a.reverse();(e={right:1,center:2}[e]||e&&3)&&l&&(e=4-e);!g.connectNulls||d||b||(a=this.getValidPoints(a));z(a,function(n,l){var m=n.plotX,u=n.plotY,A=a[l-1];(n.leftCliff||A&&A.rightCliff)&&!b&&(k=!0);n.isNull&&!q(d)&&0<l?k=!g.connectNulls:n.isNull&&!d?k=!0:(0===l||k?l=["M",n.plotX,n.plotY]:c.getPointSpline?l=c.getPointSpline(a,n,l):e?(l=1===e?["L",A.plotX,u]:2===e?["L",(A.plotX+m)/2,A.plotY,"L",(A.plotX+m)/2,u]:["L",m,A.plotY],
l.push("L",m,u)):l=["L",m,u],f.push(n.x),e&&f.push(n.x),v.push.apply(v,l),k=!1)});v.xMap=f;return c.graphPath=v},drawGraph:function(){var a=this,d=this.options,b=(this.gappedPath||this.getGraphPath).call(this),c=[["graph","highcharts-graph",d.lineColor||this.color,d.dashStyle]];z(this.zones,function(b,g){c.push(["zone-graph-"+g,"highcharts-graph highcharts-zone-graph-"+g+" "+(b.className||""),b.color||a.color,b.dashStyle||d.dashStyle])});z(c,function(c,g){var e=c[0],n=a[e];n?(n.endX=a.preventGraphAnimation?
null:b.xMap,n.animate({d:b})):b.length&&(a[e]=a.chart.renderer.path(b).addClass(c[1]).attr({zIndex:1}).add(a.group),n={stroke:c[2],"stroke-width":d.lineWidth,fill:a.fillGraph&&a.color||"none"},c[3]?n.dashstyle=c[3]:"square"!==d.linecap&&(n["stroke-linecap"]=n["stroke-linejoin"]="round"),n=a[e].attr(n).shadow(2>g&&d.shadow));n&&(n.startX=b.xMap,n.isArea=b.isArea)})},applyZones:function(){var a=this,d=this.chart,b=d.renderer,c=this.zones,g,e,l=this.clips||[],f,k=this.graph,m=this.area,h=Math.max(d.chartWidth,
d.chartHeight),y=this[(this.zoneAxis||"y")+"Axis"],w,C,p=d.inverted,t,D,q,J,r=!1;c.length&&(k||m)&&y&&void 0!==y.min&&(C=y.reversed,t=y.horiz,k&&k.hide(),m&&m.hide(),w=y.getExtremes(),z(c,function(c,n){g=C?t?d.plotWidth:0:t?0:y.toPixels(w.min);g=Math.min(Math.max(H(e,g),0),h);e=Math.min(Math.max(Math.round(y.toPixels(H(c.value,w.max),!0)),0),h);r&&(g=e=y.toPixels(w.max));D=Math.abs(g-e);q=Math.min(g,e);J=Math.max(g,e);y.isXAxis?(f={x:p?J:q,y:0,width:D,height:h},t||(f.x=d.plotHeight-f.x)):(f={x:0,
y:p?J:q,width:h,height:D},t&&(f.y=d.plotWidth-f.y));p&&b.isVML&&(f=y.isXAxis?{x:0,y:C?q:J,height:f.width,width:d.chartWidth}:{x:f.y-d.plotLeft-d.spacingBox.x,y:0,width:f.height,height:d.chartHeight});l[n]?l[n].animate(f):(l[n]=b.clipRect(f),k&&a["zone-graph-"+n].clip(l[n]),m&&a["zone-area-"+n].clip(l[n]));r=c.value>w.max}),this.clips=l)},invertGroups:function(a){function d(){z(["group","markerGroup"],function(d){b[d]&&(c.renderer.isVML&&b[d].attr({width:b.yAxis.len,height:b.xAxis.len}),b[d].width=
b.yAxis.len,b[d].height=b.xAxis.len,b[d].invert(a))})}var b=this,c=b.chart,g;b.xAxis&&(g=F(c,"resize",d),F(b,"destroy",g),d(a),b.invertGroups=d)},plotGroup:function(a,d,b,c,g){var e=this[a],l=!e;l&&(this[a]=e=this.chart.renderer.g().attr({zIndex:c||.1}).add(g));e.addClass("highcharts-"+d+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(q(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(e.hasClass("highcharts-tracker")?" highcharts-tracker":
""),!0);e.attr({visibility:b})[l?"attr":"animate"](this.getPlotBox());return e},getPlotBox:function(){var a=this.chart,d=this.xAxis,b=this.yAxis;a.inverted&&(d=b,b=this.xAxis);return{translateX:d?d.left:a.plotLeft,translateY:b?b.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,d=a.chart,b,c=a.options,g=!!a.animate&&d.renderer.isSVG&&E(c.animation).duration,e=a.visible?"inherit":"hidden",l=c.zIndex,f=a.hasRendered,k=d.seriesGroup,m=d.inverted;b=a.plotGroup("group","series",e,l,k);a.markerGroup=
a.plotGroup("markerGroup","markers",e,l,k);g&&a.animate(!0);b.inverted=a.isCartesian?m:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(m);!1===c.clip||a.sharedClipKey||f||b.clip(d.clipRect);g&&a.animate();f||(a.animationTimeout=y(function(){a.afterAnimate()},g));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,d=this.isDirty||this.isDirtyData,
b=this.group,c=this.xAxis,g=this.yAxis;b&&(a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight}),b.animate({translateX:H(c&&c.left,a.plotLeft),translateY:H(g&&g.top,a.plotTop)}));this.translate();this.render();d&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,d){var b=this.xAxis,c=this.yAxis,g=this.chart.inverted;return this.searchKDTree({clientX:g?b.len-a.chartY+b.pos:a.chartX-b.pos,plotY:g?c.len-a.chartX+c.pos:a.chartY-c.pos},d)},buildKDTree:function(){function a(b,
c,g){var e,n;if(n=b&&b.length)return e=d.kdAxisArray[c%g],b.sort(function(a,d){return a[e]-d[e]}),n=Math.floor(n/2),{point:b[n],left:a(b.slice(0,n),c+1,g),right:a(b.slice(n+1),c+1,g)}}this.buildingKdTree=!0;var d=this,b=-1<d.options.findNearestPointBy.indexOf("y")?2:1;delete d.kdTree;y(function(){d.kdTree=a(d.getValidPoints(null,!d.directTouch),b,b);d.buildingKdTree=!1},d.options.kdNow?0:1)},searchKDTree:function(a,d){function b(a,d,n,f){var v=d.point,k=c.kdAxisArray[n%f],m,h,y=v;h=q(a[g])&&q(v[g])?
Math.pow(a[g]-v[g],2):null;m=q(a[e])&&q(v[e])?Math.pow(a[e]-v[e],2):null;m=(h||0)+(m||0);v.dist=q(m)?Math.sqrt(m):Number.MAX_VALUE;v.distX=q(h)?Math.sqrt(h):Number.MAX_VALUE;k=a[k]-v[k];m=0>k?"left":"right";h=0>k?"right":"left";d[m]&&(m=b(a,d[m],n+1,f),y=m[l]<y[l]?m:v);d[h]&&Math.sqrt(k*k)<y[l]&&(a=b(a,d[h],n+1,f),y=a[l]<y[l]?a:y);return y}var c=this,g=this.kdAxisArray[0],e=this.kdAxisArray[1],l=d?"distX":"dist";d=-1<c.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||
this.buildKDTree();if(this.kdTree)return b(a,this.kdTree,d,d)}})})(L);(function(a){var F=a.Axis,E=a.Chart,G=a.correctFloat,r=a.defined,h=a.destroyObjectProperties,p=a.each,x=a.format,t=a.objectEach,q=a.pick,z=a.Series;a.StackItem=function(a,m,f,e,c){var b=a.chart.inverted;this.axis=a;this.isNegative=f;this.options=m;this.x=e;this.total=null;this.points={};this.stack=c;this.rightCliff=this.leftCliff=0;this.alignOptions={align:m.align||(b?f?"left":"right":"center"),verticalAlign:m.verticalAlign||(b?
"middle":f?"bottom":"top"),y:q(m.y,b?4:f?14:-6),x:q(m.x,b?f?-6:6:0)};this.textAlign=m.textAlign||(b?f?"right":"left":"center")};a.StackItem.prototype={destroy:function(){h(this,this.axis)},render:function(a){var k=this.options,f=k.format,f=f?x(f,this):k.formatter.call(this);this.label?this.label.attr({text:f,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(f,null,null,k.useHTML).css(k.style).attr({align:this.textAlign,rotation:k.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,
m){var f=this.axis,e=f.chart,c=f.translate(f.usePercentage?100:this.total,0,0,0,1),f=f.translate(0),f=Math.abs(c-f);a=e.xAxis[0].translate(this.x)+a;c=this.getStackBox(e,this,a,c,m,f);if(m=this.label)m.align(this.alignOptions,null,c),c=m.alignAttr,m[!1===this.options.crop||e.isInsidePlot(c.x,c.y)?"show":"hide"](!0)},getStackBox:function(a,m,f,e,c,b){var k=m.axis.reversed,l=a.inverted;a=a.plotHeight;m=m.isNegative&&!k||!m.isNegative&&k;return{x:l?m?e:e-b:f,y:l?a-f-c:m?a-e-b:a-e,width:l?b:c,height:l?
c:b}}};E.prototype.getStacks=function(){var a=this;p(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});p(a.series,function(k){!k.options.stacking||!0!==k.visible&&!1!==a.options.chart.ignoreHiddenSeries||(k.stackKey=k.type+q(k.options.stack,""))})};F.prototype.buildStacks=function(){var a=this.series,m=q(this.options.reversedStacks,!0),f=a.length,e;if(!this.isXAxis){this.usePercentage=!1;for(e=f;e--;)a[m?e:f-e-1].setStackedPoints();for(e=0;e<f;e++)a[e].modifyStacks()}};F.prototype.renderStackTotals=
function(){var a=this.chart,m=a.renderer,f=this.stacks,e=this.stackTotalGroup;e||(this.stackTotalGroup=e=m.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());e.translate(a.plotLeft,a.plotTop);t(f,function(a){t(a,function(a){a.render(e)})})};F.prototype.resetStacks=function(){var a=this,m=a.stacks;a.isXAxis||t(m,function(f){t(f,function(e,c){e.touched<a.stacksTouched?(e.destroy(),delete f[c]):(e.total=null,e.cum=null)})})};F.prototype.cleanStacks=function(){var a;this.isXAxis||(this.oldStacks&&
(a=this.stacks=this.oldStacks),t(a,function(a){t(a,function(a){a.cum=a.total})}))};z.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var k=this.processedXData,m=this.processedYData,f=[],e=m.length,c=this.options,b=c.threshold,h=c.startFromThreshold?b:0,l=c.stack,c=c.stacking,p=this.stackKey,t="-"+p,C=this.negStacks,x=this.yAxis,g=x.stacks,y=x.oldStacks,J,A,d,v,B,u,n;x.stacksTouched+=1;for(B=0;B<e;B++)u=k[B],n=m[B],
J=this.getStackIndicator(J,u,this.index),v=J.key,d=(A=C&&n<(h?0:b))?t:p,g[d]||(g[d]={}),g[d][u]||(y[d]&&y[d][u]?(g[d][u]=y[d][u],g[d][u].total=null):g[d][u]=new a.StackItem(x,x.options.stackLabels,A,u,l)),d=g[d][u],null!==n&&(d.points[v]=d.points[this.index]=[q(d.cum,h)],r(d.cum)||(d.base=v),d.touched=x.stacksTouched,0<J.index&&!1===this.singleStacks&&(d.points[v][0]=d.points[this.index+","+u+",0"][0])),"percent"===c?(A=A?p:t,C&&g[A]&&g[A][u]?(A=g[A][u],d.total=A.total=Math.max(A.total,d.total)+Math.abs(n)||
0):d.total=G(d.total+(Math.abs(n)||0))):d.total=G(d.total+(n||0)),d.cum=q(d.cum,h)+(n||0),null!==n&&(d.points[v].push(d.cum),f[B]=d.cum);"percent"===c&&(x.usePercentage=!0);this.stackedYData=f;x.oldStacks={}}};z.prototype.modifyStacks=function(){var a=this,m=a.stackKey,f=a.yAxis.stacks,e=a.processedXData,c,b=a.options.stacking;a[b+"Stacker"]&&p([m,"-"+m],function(k){for(var l=e.length,m,h;l--;)if(m=e[l],c=a.getStackIndicator(c,m,a.index,k),h=(m=f[k]&&f[k][m])&&m.points[c.key])a[b+"Stacker"](h,m,l)})};
z.prototype.percentStacker=function(a,m,f){m=m.total?100/m.total:0;a[0]=G(a[0]*m);a[1]=G(a[1]*m);this.stackedYData[f]=a[1]};z.prototype.getStackIndicator=function(a,m,f,e){!r(a)||a.x!==m||e&&a.key!==e?a={x:m,index:0,key:e}:a.index++;a.key=[f,m,a.index].join();return a}})(L);(function(a){var F=a.addEvent,E=a.animate,G=a.Axis,r=a.createElement,h=a.css,p=a.defined,x=a.each,t=a.erase,q=a.extend,z=a.fireEvent,k=a.inArray,m=a.isNumber,f=a.isObject,e=a.isArray,c=a.merge,b=a.objectEach,w=a.pick,l=a.Point,
D=a.Series,H=a.seriesTypes,C=a.setAnimation,K=a.splat;q(a.Chart.prototype,{addSeries:function(a,b,c){var g,d=this;a&&(b=w(b,!0),z(d,"addSeries",{options:a},function(){g=d.initSeries(a);d.isDirtyLegend=!0;d.linkSeries();b&&d.redraw(c)}));return g},addAxis:function(a,b,e,l){var d=b?"xAxis":"yAxis",g=this.options;a=c(a,{index:this[d].length,isX:b});b=new G(this,a);g[d]=K(g[d]||{});g[d].push(a);w(e,!0)&&this.redraw(l);return b},showLoading:function(a){var b=this,c=b.options,g=b.loadingDiv,d=c.loading,
e=function(){g&&h(g,{left:b.plotLeft+"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};g||(b.loadingDiv=g=r("div",{className:"highcharts-loading highcharts-loading-hidden"},null,b.container),b.loadingSpan=r("span",{className:"highcharts-loading-inner"},null,g),F(b,"redraw",e));g.className="highcharts-loading";b.loadingSpan.innerHTML=a||c.lang.loading;h(g,q(d.style,{zIndex:10}));h(b.loadingSpan,d.labelStyle);b.loadingShown||(h(g,{opacity:0,display:""}),E(g,{opacity:d.style.opacity||
.5},{duration:d.showDuration||0}));b.loadingShown=!0;e()},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&(b.className="highcharts-loading highcharts-loading-hidden",E(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){h(b,{display:"none"})}}));this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions tooltip".split(" "),update:function(a,e,l){var g=this,d={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},f=a.chart,h,u,n=[];if(f){c(!0,g.options.chart,f);"className"in f&&g.setClassName(f.className);if("inverted"in f||"polar"in f)g.propFromSeries(),h=!0;"alignTicks"in f&&(h=!0);b(f,function(a,d){-1!==k("chart."+d,g.propsRequireUpdateSeries)&&(u=!0);-1!==k(d,g.propsRequireDirtyBox)&&
(g.isDirtyBox=!0)});"style"in f&&g.renderer.setStyle(f.style)}a.colors&&(this.options.colors=a.colors);a.plotOptions&&c(!0,this.options.plotOptions,a.plotOptions);b(a,function(a,b){if(g[b]&&"function"===typeof g[b].update)g[b].update(a,!1);else if("function"===typeof g[d[b]])g[d[b]](a);"chart"!==b&&-1!==k(b,g.propsRequireUpdateSeries)&&(u=!0)});x("xAxis yAxis zAxis series colorAxis pane".split(" "),function(d){a[d]&&(x(K(a[d]),function(a,b){(b=p(a.id)&&g.get(a.id)||g[d][b])&&b.coll===d&&(b.update(a,
!1),l&&(b.touched=!0));if(!b&&l)if("series"===d)g.addSeries(a,!1).touched=!0;else if("xAxis"===d||"yAxis"===d)g.addAxis(a,"xAxis"===d,!1).touched=!0}),l&&x(g[d],function(a){a.touched?delete a.touched:n.push(a)}))});x(n,function(a){a.remove(!1)});h&&x(g.axes,function(a){a.update({},!1)});u&&x(g.series,function(a){a.update({},!1)});a.loading&&c(!0,g.options.loading,a.loading);h=f&&f.width;f=f&&f.height;m(h)&&h!==g.chartWidth||m(f)&&f!==g.chartHeight?g.setSize(h,f):w(e,!0)&&g.redraw()},setSubtitle:function(a){this.setTitle(void 0,
a)}});q(l.prototype,{update:function(a,b,c,e){function d(){g.applyOptions(a);null===g.y&&k&&(g.graphic=k.destroy());f(a,!0)&&(k&&k.element&&a&&a.marker&&void 0!==a.marker.symbol&&(g.graphic=k.destroy()),a&&a.dataLabels&&g.dataLabel&&(g.dataLabel=g.dataLabel.destroy()),g.connector&&(g.connector=g.connector.destroy()));n=g.index;l.updateParallelArrays(g,n);h.data[n]=f(h.data[n],!0)||f(a,!0)?g.options:a;l.isDirty=l.isDirtyData=!0;!l.fixedBox&&l.hasCartesianSeries&&(m.isDirtyBox=!0);"point"===h.legendType&&
(m.isDirtyLegend=!0);b&&m.redraw(c)}var g=this,l=g.series,k=g.graphic,n,m=l.chart,h=l.options;b=w(b,!0);!1===e?d():g.firePointEvent("update",{options:a},d)},remove:function(a,b){this.series.removePoint(k(this,this.series.data),a,b)}});q(D.prototype,{addPoint:function(a,b,c,e){var d=this.options,g=this.data,l=this.chart,f=this.xAxis,f=f&&f.hasNames&&f.names,n=d.data,k,m,h=this.xData,y,A;b=w(b,!0);k={series:this};this.pointClass.prototype.applyOptions.apply(k,[a]);A=k.x;y=h.length;if(this.requireSorting&&
A<h[y-1])for(m=!0;y&&h[y-1]>A;)y--;this.updateParallelArrays(k,"splice",y,0,0);this.updateParallelArrays(k,y);f&&k.name&&(f[A]=k.name);n.splice(y,0,a);m&&(this.data.splice(y,0,null),this.processData());"point"===d.legendType&&this.generatePoints();c&&(g[0]&&g[0].remove?g[0].remove(!1):(g.shift(),this.updateParallelArrays(k,"shift"),n.shift()));this.isDirtyData=this.isDirty=!0;b&&l.redraw(e)},removePoint:function(a,b,c){var g=this,d=g.data,e=d[a],l=g.points,f=g.chart,n=function(){l&&l.length===d.length&&
l.splice(a,1);d.splice(a,1);g.options.data.splice(a,1);g.updateParallelArrays(e||{series:g},"splice",a,1);e&&e.destroy();g.isDirty=!0;g.isDirtyData=!0;b&&f.redraw()};C(c,f);b=w(b,!0);e?e.firePointEvent("remove",null,n):n()},remove:function(a,b,c){function g(){d.destroy();e.isDirtyLegend=e.isDirtyBox=!0;e.linkSeries();w(a,!0)&&e.redraw(b)}var d=this,e=d.chart;!1!==c?z(d,"remove",null,g):g()},update:function(a,b){var g=this,e=g.chart,d=g.userOptions,l=g.oldType||g.type,f=a.type||d.type||e.options.chart.type,
k=H[l].prototype,n,m=["group","markerGroup","dataLabelsGroup"],h=["navigatorSeries","baseSeries"],y=g.finishedAnimating&&{animation:!1};if(Object.keys&&"data"===Object.keys(a).toString())return this.setData(a.data,b);if(f&&f!==l||void 0!==a.zIndex)m.length=0;h=m.concat(h);x(h,function(a){h[a]=g[a];delete g[a]});a=c(d,y,{index:g.index,pointStart:g.xData[0]},{data:g.options.data},a);g.remove(!1,null,!1);for(n in k)g[n]=void 0;q(g,H[f||l].prototype);x(h,function(a){g[a]=h[a]});g.init(e,a);g.oldType=
l;e.linkSeries();w(b,!0)&&e.redraw(!1)}});q(G.prototype,{update:function(a,b){var g=this.chart;a=g.options[this.coll][this.options.index]=c(this.userOptions,a);this.destroy(!0);this.init(g,q(a,{events:void 0}));g.isDirtyBox=!0;w(b,!0)&&g.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,g=this.series,d=g.length;d--;)g[d]&&g[d].remove(!1);t(b.axes,this);t(b[c],this);e(b.options[c])?b.options[c].splice(this.options.index,1):delete b.options[c];x(b[c],function(a,d){a.options.index=d});this.destroy();
b.isDirtyBox=!0;w(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(L);(function(a){var F=a.color,E=a.each,G=a.map,r=a.pick,h=a.Series,p=a.seriesType;p("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(h){var p=[],q=[],x=this.xAxis,k=this.yAxis,m=k.stacks[this.stackKey],f={},e=this.index,c=k.series,b=c.length,w,l=r(k.options.reversedStacks,!0)?1:-1,D;h=h||this.points;if(this.options.stacking){for(D=
0;D<h.length;D++)h[D].leftNull=h[D].rightNull=null,f[h[D].x]=h[D];a.objectEach(m,function(a,b){null!==a.total&&q.push(b)});q.sort(function(a,b){return a-b});w=G(c,function(){return this.visible});E(q,function(a,c){var h=0,g,y;if(f[a]&&!f[a].isNull)p.push(f[a]),E([-1,1],function(k){var h=1===k?"rightNull":"leftNull",d=0,v=m[q[c+k]];if(v)for(D=e;0<=D&&D<b;)g=v.points[D],g||(D===e?f[a][h]=!0:w[D]&&(y=m[a].points[D])&&(d-=y[1]-y[0])),D+=l;f[a][1===k?"rightCliff":"leftCliff"]=d});else{for(D=e;0<=D&&D<
b;){if(g=m[a].points[D]){h=g[1];break}D+=l}h=k.translate(h,0,1,0,1);p.push({isNull:!0,plotX:x.translate(a,0,0,0,1),x:a,plotY:h,yBottom:h})}})}return p},getGraphPath:function(a){var p=h.prototype.getGraphPath,q=this.options,x=q.stacking,k=this.yAxis,m,f,e=[],c=[],b=this.index,w,l=k.stacks[this.stackKey],D=q.threshold,H=k.getThreshold(q.threshold),C,q=q.connectNulls||"percent"===x,K=function(g,f,m){var h=a[g];g=x&&l[h.x].points[b];var d=h[m+"Null"]||0;m=h[m+"Cliff"]||0;var v,y,h=!0;m||d?(v=(d?g[0]:
g[1])+m,y=g[0]+m,h=!!d):!x&&a[f]&&a[f].isNull&&(v=y=D);void 0!==v&&(c.push({plotX:w,plotY:null===v?H:k.getThreshold(v),isNull:h,isCliff:!0}),e.push({plotX:w,plotY:null===y?H:k.getThreshold(y),doCurve:!1}))};a=a||this.points;x&&(a=this.getStackPoints(a));for(m=0;m<a.length;m++)if(f=a[m].isNull,w=r(a[m].rectPlotX,a[m].plotX),C=r(a[m].yBottom,H),!f||q)q||K(m,m-1,"left"),f&&!x&&q||(c.push(a[m]),e.push({x:m,plotX:w,plotY:C})),q||K(m,m+1,"right");m=p.call(this,c,!0,!0);e.reversed=!0;f=p.call(this,e,!0,
!0);f.length&&(f[0]="L");f=m.concat(f);p=p.call(this,c,!1,q);f.xMap=m.xMap;this.areaPath=f;return p},drawGraph:function(){this.areaPath=[];h.prototype.drawGraph.apply(this);var a=this,p=this.areaPath,q=this.options,z=[["area","highcharts-area",this.color,q.fillColor]];E(this.zones,function(k,m){z.push(["zone-area-"+m,"highcharts-area highcharts-zone-area-"+m+" "+k.className,k.color||a.color,k.fillColor||q.fillColor])});E(z,function(k){var m=k[0],f=a[m];f?(f.endX=a.preventGraphAnimation?null:p.xMap,
f.animate({d:p})):(f=a[m]=a.chart.renderer.path(p).addClass(k[1]).attr({fill:r(k[3],F(k[2]).setOpacity(r(q.fillOpacity,.75)).get()),zIndex:0}).add(a.group),f.isArea=!0);f.startX=p.xMap;f.shiftUnit=q.step?2:1})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(L);(function(a){var F=a.pick;a=a.seriesType;a("spline","line",{},{getPointSpline:function(a,G,r){var h=G.plotX,p=G.plotY,x=a[r-1];r=a[r+1];var t,q,z,k;if(x&&!x.isNull&&!1!==x.doCurve&&!G.isCliff&&r&&!r.isNull&&!1!==r.doCurve&&!G.isCliff){a=
x.plotY;z=r.plotX;r=r.plotY;var m=0;t=(1.5*h+x.plotX)/2.5;q=(1.5*p+a)/2.5;z=(1.5*h+z)/2.5;k=(1.5*p+r)/2.5;z!==t&&(m=(k-q)*(z-h)/(z-t)+p-k);q+=m;k+=m;q>a&&q>p?(q=Math.max(a,p),k=2*p-q):q<a&&q<p&&(q=Math.min(a,p),k=2*p-q);k>r&&k>p?(k=Math.max(r,p),q=2*p-k):k<r&&k<p&&(k=Math.min(r,p),q=2*p-k);G.rightContX=z;G.rightContY=k}G=["C",F(x.rightContX,x.plotX),F(x.rightContY,x.plotY),F(t,h),F(q,p),h,p];x.rightContX=x.rightContY=null;return G}})})(L);(function(a){var F=a.seriesTypes.area.prototype,E=a.seriesType;
E("areaspline","spline",a.defaultPlotOptions.area,{getStackPoints:F.getStackPoints,getGraphPath:F.getGraphPath,drawGraph:F.drawGraph,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(L);(function(a){var F=a.animObject,E=a.color,G=a.each,r=a.extend,h=a.isNumber,p=a.merge,x=a.pick,t=a.Series,q=a.seriesType,z=a.svg;q("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(){t.prototype.init.apply(this,arguments);var a=this,m=a.chart;m.hasRendered&&G(m.series,function(f){f.type===a.type&&(f.isDirty=!0)})},getColumnMetrics:function(){var a=this,m=a.options,f=a.xAxis,e=a.yAxis,c=f.reversed,
b,h={},l=0;!1===m.grouping?l=1:G(a.chart.series,function(c){var g=c.options,f=c.yAxis,k;c.type!==a.type||!c.visible&&a.chart.options.chart.ignoreHiddenSeries||e.len!==f.len||e.pos!==f.pos||(g.stacking?(b=c.stackKey,void 0===h[b]&&(h[b]=l++),k=h[b]):!1!==g.grouping&&(k=l++),c.columnIndex=k)});var p=Math.min(Math.abs(f.transA)*(f.ordinalSlope||m.pointRange||f.closestPointRange||f.tickInterval||1),f.len),t=p*m.groupPadding,C=(p-2*t)/(l||1),m=Math.min(m.maxPointWidth||f.len,x(m.pointWidth,C*(1-2*m.pointPadding)));
a.columnMetrics={width:m,offset:(C-m)/2+(t+((a.columnIndex||0)+(c?1:0))*C-p/2)*(c?-1:1)};return a.columnMetrics},crispCol:function(a,m,f,e){var c=this.chart,b=this.borderWidth,k=-(b%2?.5:0),b=b%2?.5:1;c.inverted&&c.renderer.isVML&&(b+=1);this.options.crisp&&(f=Math.round(a+f)+k,a=Math.round(a)+k,f-=a);e=Math.round(m+e)+b;k=.5>=Math.abs(m)&&.5<e;m=Math.round(m)+b;e-=m;k&&e&&(--m,e+=1);return{x:a,y:m,width:f,height:e}},translate:function(){var a=this,m=a.chart,f=a.options,e=a.dense=2>a.closestPointRange*
a.xAxis.transA,e=a.borderWidth=x(f.borderWidth,e?0:1),c=a.yAxis,b=f.threshold,h=a.translatedThreshold=c.getThreshold(b),l=x(f.minPointLength,5),p=a.getColumnMetrics(),q=p.width,C=a.barW=Math.max(q,1+2*e),r=a.pointXOffset=p.offset;m.inverted&&(h-=.5);f.pointPadding&&(C=Math.ceil(C));t.prototype.translate.apply(a);G(a.points,function(g){var e=x(g.yBottom,h),f=999+Math.abs(e),f=Math.min(Math.max(-f,g.plotY),c.len+f),k=g.plotX+r,d=C,v=Math.min(f,e),w,u=Math.max(f,e)-v;l&&Math.abs(u)<l&&(u=l,w=!c.reversed&&
!g.negative||c.reversed&&g.negative,g.y===b&&a.dataMax<=b&&c.min<b&&(w=!w),v=Math.abs(v-h)>l?e-l:h-(w?l:0));g.barX=k;g.pointWidth=q;g.tooltipPos=m.inverted?[c.len+c.pos-m.plotLeft-f,a.xAxis.len-k-d/2,u]:[k+d/2,f+c.pos-m.plotTop,u];g.shapeType="rect";g.shapeArgs=a.crispCol.apply(a,g.isNull?[k,h,d,0]:[k,v,d,u])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(a,
m){var f=this.options,e,c=this.pointAttrToOptions||{};e=c.stroke||"borderColor";var b=c["stroke-width"]||"borderWidth",h=a&&a.color||this.color,l=a&&a[e]||f[e]||this.color||h,k=a&&a[b]||f[b]||this[b]||0,c=f.dashStyle;a&&this.zones.length&&(h=a.getZone(),h=a.options.color||h&&h.color||this.color);m&&(a=p(f.states[m],a.options.states&&a.options.states[m]||{}),m=a.brightness,h=a.color||void 0!==m&&E(h).brighten(a.brightness).get()||h,l=a[e]||l,k=a[b]||k,c=a.dashStyle||c);e={fill:h,stroke:l,"stroke-width":k};
c&&(e.dashstyle=c);return e},drawPoints:function(){var a=this,m=this.chart,f=a.options,e=m.renderer,c=f.animationLimit||250,b;G(a.points,function(k){var l=k.graphic;if(h(k.plotY)&&null!==k.y){b=k.shapeArgs;if(l)l[m.pointCount<c?"animate":"attr"](p(b));else k.graphic=l=e[k.shapeType](b).add(k.group||a.group);f.borderRadius&&l.attr({r:f.borderRadius});l.attr(a.pointAttribs(k,k.selected&&"select")).shadow(f.shadow,null,f.stacking&&!f.borderRadius);l.addClass(k.getClassName(),!0)}else l&&(k.graphic=l.destroy())})},
animate:function(a){var m=this,f=this.yAxis,e=m.options,c=this.chart.inverted,b={},h=c?"translateX":"translateY",l;z&&(a?(b.scaleY=.001,a=Math.min(f.pos+f.len,Math.max(f.pos,f.toPixels(e.threshold))),c?b.translateX=a-f.len:b.translateY=a,m.group.attr(b)):(l=m.group.attr(h),m.group.animate({scaleY:1},r(F(m.options.animation),{step:function(a,c){b[h]=l+c.pos*(f.pos-l);m.group.attr(b)}})),m.animate=null))},remove:function(){var a=this,h=a.chart;h.hasRendered&&G(h.series,function(f){f.type===a.type&&
(f.isDirty=!0)});t.prototype.remove.apply(a,arguments)}})})(L);(function(a){a=a.seriesType;a("bar","column",null,{inverted:!0})})(L);(function(a){var F=a.Series;a=a.seriesType;a("scatter","line",{lineWidth:0,findNearestPointBy:"xy",marker:{enabled:!0},tooltip:{headerFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cspan style\x3d"font-size: 0.85em"\x3e {series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e"}},
{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&F.prototype.drawGraph.call(this)}})})(L);(function(a){var F=a.deg2rad,E=a.isNumber,G=a.pick,r=a.relativeLength;a.CenteredSeriesMixin={getCenter:function(){var a=this.options,p=this.chart,x=2*(a.slicedOffset||0),t=p.plotWidth-2*x,p=p.plotHeight-2*x,q=a.center,q=[G(q[0],"50%"),G(q[1],"50%"),a.size||"100%",a.innerSize||0],z=Math.min(t,
p),k,m;for(k=0;4>k;++k)m=q[k],a=2>k||2===k&&/%$/.test(m),q[k]=r(m,[t,p,z,q[2]][k])+(a?x:0);q[3]>q[2]&&(q[3]=q[2]);return q},getStartAndEndRadians:function(a,p){a=E(a)?a:0;p=E(p)&&p>a&&360>p-a?p:a+360;return{start:F*(a+-90),end:F*(p+-90)}}}})(L);(function(a){var F=a.addEvent,E=a.CenteredSeriesMixin,G=a.defined,r=a.each,h=a.extend,p=E.getStartAndEndRadians,x=a.inArray,t=a.noop,q=a.pick,z=a.Point,k=a.Series,m=a.seriesType,f=a.setAnimation;m("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,
enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1,shadow:!1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var c=
this,b=c.points,e=c.startAngleRad;a||(r(b,function(a){var b=a.graphic,l=a.shapeArgs;b&&(b.attr({r:a.startR||c.center[3]/2,start:e,end:e}),b.animate({r:l.r,start:l.start,end:l.end},c.options.animation))}),c.animate=null)},updateTotals:function(){var a,c=0,b=this.points,f=b.length,l,m=this.options.ignoreHiddenPoint;for(a=0;a<f;a++)l=b[a],c+=m&&!l.visible?0:l.isNull?0:l.y;this.total=c;for(a=0;a<f;a++)l=b[a],l.percentage=0<c&&(l.visible||!m)?l.y/c*100:0,l.total=c},generatePoints:function(){k.prototype.generatePoints.call(this);
this.updateTotals()},translate:function(a){this.generatePoints();var c=0,b=this.options,e=b.slicedOffset,l=e+(b.borderWidth||0),f,m,h,k=p(b.startAngle,b.endAngle),g=this.startAngleRad=k.start,k=(this.endAngleRad=k.end)-g,y=this.points,t,A=b.dataLabels.distance,b=b.ignoreHiddenPoint,d,v=y.length,B;a||(this.center=a=this.getCenter());this.getX=function(d,b,c){h=Math.asin(Math.min((d-a[1])/(a[2]/2+c.labelDistance),1));return a[0]+(b?-1:1)*Math.cos(h)*(a[2]/2+c.labelDistance)};for(d=0;d<v;d++){B=y[d];
B.labelDistance=q(B.options.dataLabels&&B.options.dataLabels.distance,A);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,B.labelDistance);f=g+c*k;if(!b||B.visible)c+=B.percentage/100;m=g+c*k;B.shapeType="arc";B.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:Math.round(1E3*f)/1E3,end:Math.round(1E3*m)/1E3};h=(m+f)/2;h>1.5*Math.PI?h-=2*Math.PI:h<-Math.PI/2&&(h+=2*Math.PI);B.slicedTranslation={translateX:Math.round(Math.cos(h)*e),translateY:Math.round(Math.sin(h)*e)};m=Math.cos(h)*a[2]/
2;t=Math.sin(h)*a[2]/2;B.tooltipPos=[a[0]+.7*m,a[1]+.7*t];B.half=h<-Math.PI/2||h>Math.PI/2?1:0;B.angle=h;f=Math.min(l,B.labelDistance/5);B.labelPos=[a[0]+m+Math.cos(h)*B.labelDistance,a[1]+t+Math.sin(h)*B.labelDistance,a[0]+m+Math.cos(h)*f,a[1]+t+Math.sin(h)*f,a[0]+m,a[1]+t,0>B.labelDistance?"center":B.half?"right":"left",h]}},drawGraph:null,drawPoints:function(){var a=this,c=a.chart.renderer,b,f,l,m,k=a.options.shadow;k&&!a.shadowGroup&&(a.shadowGroup=c.g("shadow").add(a.group));r(a.points,function(e){f=
e.graphic;if(e.isNull)f&&(e.graphic=f.destroy());else{m=e.shapeArgs;b=e.getTranslate();var p=e.shadowGroup;k&&!p&&(p=e.shadowGroup=c.g("shadow").add(a.shadowGroup));p&&p.attr(b);l=a.pointAttribs(e,e.selected&&"select");f?f.setRadialReference(a.center).attr(l).animate(h(m,b)):(e.graphic=f=c[e.shapeType](m).setRadialReference(a.center).attr(b).add(a.group),e.visible||f.attr({visibility:"hidden"}),f.attr(l).attr({"stroke-linejoin":"round"}).shadow(k,p));f.addClass(e.getClassName())}})},searchPoint:t,
sortByAngle:function(a,c){a.sort(function(a,e){return void 0!==a.angle&&(e.angle-a.angle)*c})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:E.getCenter,getSymbol:t},{init:function(){z.prototype.init.apply(this,arguments);var a=this,c;a.name=q(a.name,"Slice");c=function(b){a.slice("select"===b.type)};F(a,"select",c);F(a,"unselect",c);return a},isValid:function(){return a.isNumber(this.y,!0)&&0<=this.y},setVisible:function(a,c){var b=this,e=b.series,l=e.chart,f=e.options.ignoreHiddenPoint;
c=q(c,f);a!==b.visible&&(b.visible=b.options.visible=a=void 0===a?!b.visible:a,e.options.data[x(b,e.data)]=b.options,r(["graphic","dataLabel","connector","shadowGroup"],function(c){if(b[c])b[c][a?"show":"hide"](!0)}),b.legendItem&&l.legend.colorizeItem(b,a),a||"hover"!==b.state||b.setState(""),f&&(e.isDirty=!0),c&&l.redraw())},slice:function(a,c,b){var e=this.series;f(b,e.chart);q(c,!0);this.sliced=this.options.sliced=G(a)?a:!this.sliced;e.options.data[x(this,e.data)]=this.options;this.graphic.animate(this.getTranslate());
this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var c=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.x,c.y,c.r+a,c.r+a,{innerR:this.shapeArgs.r,start:c.start,end:c.end})}})})(L);(function(a){var F=a.addEvent,E=a.arrayMax,G=a.defined,r=a.each,h=a.extend,p=a.format,x=a.map,t=a.merge,q=a.noop,z=a.pick,k=a.relativeLength,m=a.Series,
f=a.seriesTypes,e=a.stableSort;a.distribute=function(a,b){function c(a,b){return a.target-b.target}var l,f=!0,m=a,h=[],k;k=0;for(l=a.length;l--;)k+=a[l].size;if(k>b){e(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(k=l=0;k<=b;)k+=a[l].size,l++;h=a.splice(l-1,a.length)}e(a,c);for(a=x(a,function(a){return{size:a.size,targets:[a.target],align:z(a.align,.5)}});f;){for(l=a.length;l--;)f=a[l],k=(Math.min.apply(0,f.targets)+Math.max.apply(0,f.targets))/2,f.pos=Math.min(Math.max(0,k-f.size*f.align),
b-f.size);l=a.length;for(f=!1;l--;)0<l&&a[l-1].pos+a[l-1].size>a[l].pos&&(a[l-1].size+=a[l].size,a[l-1].targets=a[l-1].targets.concat(a[l].targets),a[l-1].align=.5,a[l-1].pos+a[l-1].size>b&&(a[l-1].pos=b-a[l-1].size),a.splice(l,1),f=!0)}l=0;r(a,function(a){var b=0;r(a.targets,function(){m[l].pos=a.pos+b;b+=m[l].size;l++})});m.push.apply(m,h);e(m,c)};m.prototype.drawDataLabels=function(){function c(a,b){var d=b.filter;return d?(b=d.operator,a=a[d.property],d=d.value,"\x3e"===b&&a>d||"\x3c"===b&&a<
d||"\x3e\x3d"===b&&a>=d||"\x3c\x3d"===b&&a<=d||"\x3d\x3d"===b&&a==d||"\x3d\x3d\x3d"===b&&a===d?!0:!1):!0}var b=this,e=b.options,l=e.dataLabels,f=b.points,m,h,k=b.hasRendered||0,g,y,q=z(l.defer,!!e.animation),A=b.chart.renderer;if(l.enabled||b._hasPointLabels)b.dlProcessOptions&&b.dlProcessOptions(l),y=b.plotGroup("dataLabelsGroup","data-labels",q&&!k?"hidden":"visible",l.zIndex||6),q&&(y.attr({opacity:+k}),k||F(b,"afterAnimate",function(){b.visible&&y.show(!0);y[e.animation?"animate":"attr"]({opacity:1},
{duration:200})})),h=l,r(f,function(d){var f,k=d.dataLabel,u,n,C=d.connector,w=!k,q;m=d.dlOptions||d.options&&d.options.dataLabels;(f=z(m&&m.enabled,h.enabled)&&!d.isNull)&&(f=!0===c(d,m||l));f&&(l=t(h,m),u=d.getLabelConfig(),q=l[d.formatPrefix+"Format"]||l.format,g=G(q)?p(q,u):(l[d.formatPrefix+"Formatter"]||l.formatter).call(u,l),q=l.style,u=l.rotation,q.color=z(l.color,q.color,b.color,"#000000"),"contrast"===q.color&&(d.contrastColor=A.getContrast(d.color||b.color),q.color=l.inside||0>z(d.labelDistance,
l.distance)||e.stacking?d.contrastColor:"#000000"),e.cursor&&(q.cursor=e.cursor),n={fill:l.backgroundColor,stroke:l.borderColor,"stroke-width":l.borderWidth,r:l.borderRadius||0,rotation:u,padding:l.padding,zIndex:1},a.objectEach(n,function(a,d){void 0===a&&delete n[d]}));!k||f&&G(g)?f&&G(g)&&(k?n.text=g:(k=d.dataLabel=A[u?"text":"label"](g,0,-9999,l.shape,null,null,l.useHTML,null,"data-label"),k.addClass("highcharts-data-label-color-"+d.colorIndex+" "+(l.className||"")+(l.useHTML?"highcharts-tracker":
""))),k.attr(n),k.css(q).shadow(l.shadow),k.added||k.add(y),b.alignDataLabel(d,k,l,null,w)):(d.dataLabel=k=k.destroy(),C&&(d.connector=C.destroy()))})};m.prototype.alignDataLabel=function(a,b,e,l,f){var c=this.chart,m=c.inverted,k=z(a.dlBox&&a.dlBox.centerX,a.plotX,-9999),g=z(a.plotY,-9999),y=b.getBBox(),p,A=e.rotation,d=e.align,v=this.visible&&(a.series.forceDL||c.isInsidePlot(k,Math.round(g),m)||l&&c.isInsidePlot(k,m?l.x+1:l.y+l.height-1,m)),B="justify"===z(e.overflow,"justify");if(v&&(p=e.style.fontSize,
p=c.renderer.fontMetrics(p,b).b,l=h({x:m?this.yAxis.len-g:k,y:Math.round(m?this.xAxis.len-k:g),width:0,height:0},l),h(e,{width:y.width,height:y.height}),A?(B=!1,k=c.renderer.rotCorr(p,A),k={x:l.x+e.x+l.width/2+k.x,y:l.y+e.y+{top:0,middle:.5,bottom:1}[e.verticalAlign]*l.height},b[f?"attr":"animate"](k).attr({align:d}),g=(A+720)%360,g=180<g&&360>g,"left"===d?k.y-=g?y.height:0:"center"===d?(k.x-=y.width/2,k.y-=y.height/2):"right"===d&&(k.x-=y.width,k.y-=g?0:y.height)):(b.align(e,null,l),k=b.alignAttr),
B?a.isLabelJustified=this.justifyDataLabel(b,e,k,y,l,f):z(e.crop,!0)&&(v=c.isInsidePlot(k.x,k.y)&&c.isInsidePlot(k.x+y.width,k.y+y.height)),e.shape&&!A))b[f?"attr":"animate"]({anchorX:m?c.plotWidth-a.plotY:a.plotX,anchorY:m?c.plotHeight-a.plotX:a.plotY});v||(b.attr({y:-9999}),b.placed=!1)};m.prototype.justifyDataLabel=function(a,b,e,f,k,m){var c=this.chart,l=b.align,g=b.verticalAlign,h,p,A=a.box?0:a.padding||0;h=e.x+A;0>h&&("right"===l?b.align="left":b.x=-h,p=!0);h=e.x+f.width-A;h>c.plotWidth&&("left"===
l?b.align="right":b.x=c.plotWidth-h,p=!0);h=e.y+A;0>h&&("bottom"===g?b.verticalAlign="top":b.y=-h,p=!0);h=e.y+f.height-A;h>c.plotHeight&&("top"===g?b.verticalAlign="bottom":b.y=c.plotHeight-h,p=!0);p&&(a.placed=!m,a.align(b,null,k));return p};f.pie&&(f.pie.prototype.drawDataLabels=function(){var c=this,b=c.data,e,f=c.chart,k=c.options.dataLabels,h=z(k.connectorPadding,10),p=z(k.connectorWidth,1),t=f.plotWidth,g=f.plotHeight,y,q=c.center,A=q[2]/2,d=q[1],v,B,u,n,x=[[],[]],M,O,N,F,I=[0,0,0,0];c.visible&&
(k.enabled||c._hasPointLabels)&&(r(b,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),m.prototype.drawDataLabels.apply(c),r(b,function(a){a.dataLabel&&a.visible&&(x[a.half].push(a),a.dataLabel._pos=null)}),r(x,function(b,l){var m,p,y=b.length,C=[],w;if(y)for(c.sortByAngle(b,l-.5),0<c.maxLabelDistance&&(m=Math.max(0,d-A-c.maxLabelDistance),p=Math.min(d+A+c.maxLabelDistance,f.plotHeight),
r(b,function(a){0<a.labelDistance&&a.dataLabel&&(a.top=Math.max(0,d-A-a.labelDistance),a.bottom=Math.min(d+A+a.labelDistance,f.plotHeight),w=a.dataLabel.getBBox().height||21,a.positionsIndex=C.push({target:a.labelPos[1]-a.top+w/2,size:w,rank:a.y})-1)}),a.distribute(C,p+w-m)),F=0;F<y;F++)e=b[F],p=e.positionsIndex,u=e.labelPos,v=e.dataLabel,N=!1===e.visible?"hidden":"inherit",O=m=u[1],C&&G(C[p])&&(void 0===C[p].pos?N="hidden":(n=C[p].size,O=e.top+C[p].pos)),delete e.positionIndex,M=k.justify?q[0]+(l?
-1:1)*(A+e.labelDistance):c.getX(O<e.top+2||O>e.bottom-2?m:O,l,e),v._attr={visibility:N,align:u[6]},v._pos={x:M+k.x+({left:h,right:-h}[u[6]]||0),y:O+k.y-10},u.x=M,u.y=O,z(k.crop,!0)&&(B=v.getBBox().width,m=null,M-B<h?(m=Math.round(B-M+h),I[3]=Math.max(m,I[3])):M+B>t-h&&(m=Math.round(M+B-t+h),I[1]=Math.max(m,I[1])),0>O-n/2?I[0]=Math.max(Math.round(-O+n/2),I[0]):O+n/2>g&&(I[2]=Math.max(Math.round(O+n/2-g),I[2])),v.sideOverflow=m)}),0===E(I)||this.verifyDataLabelOverflow(I))&&(this.placeDataLabels(),
p&&r(this.points,function(a){var d;y=a.connector;if((v=a.dataLabel)&&v._pos&&a.visible&&0<a.labelDistance){N=v._attr.visibility;if(d=!y)a.connector=y=f.renderer.path().addClass("highcharts-data-label-connector  highcharts-color-"+a.colorIndex).add(c.dataLabelsGroup),y.attr({"stroke-width":p,stroke:k.connectorColor||a.color||"#666666"});y[d?"attr":"animate"]({d:c.connectorPath(a.labelPos)});y.attr("visibility",N)}else y&&(a.connector=y.destroy())}))},f.pie.prototype.connectorPath=function(a){var b=
a.x,c=a.y;return z(this.options.dataLabels.softConnector,!0)?["M",b+("left"===a[6]?5:-5),c,"C",b,c,2*a[2]-a[4],2*a[3]-a[5],a[2],a[3],"L",a[4],a[5]]:["M",b+("left"===a[6]?5:-5),c,"L",a[2],a[3],"L",a[4],a[5]]},f.pie.prototype.placeDataLabels=function(){r(this.points,function(a){var b=a.dataLabel;b&&a.visible&&((a=b._pos)?(b.sideOverflow&&(b._attr.width=b.getBBox().width-b.sideOverflow,b.css({width:b._attr.width+"px",textOverflow:"ellipsis"}),b.shortened=!0),b.attr(b._attr),b[b.moved?"animate":"attr"](a),
b.moved=!0):b&&b.attr({y:-9999}))},this)},f.pie.prototype.alignDataLabel=q,f.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,e=c.center,f=c.minSize||80,m,h=null!==c.size;h||(null!==e[0]?m=Math.max(b[2]-Math.max(a[1],a[3]),f):(m=Math.max(b[2]-a[1]-a[3],f),b[0]+=(a[3]-a[1])/2),null!==e[1]?m=Math.max(Math.min(m,b[2]-Math.max(a[0],a[2])),f):(m=Math.max(Math.min(m,b[2]-a[0]-a[2]),f),b[1]+=(a[0]-a[2])/2),m<b[2]?(b[2]=m,b[3]=Math.min(k(c.innerSize||0,m),m),this.translate(b),
this.drawDataLabels&&this.drawDataLabels()):h=!0);return h});f.column&&(f.column.prototype.alignDataLabel=function(a,b,e,f,k){var c=this.chart.inverted,l=a.series,h=a.dlBox||a.shapeArgs,g=z(a.below,a.plotY>z(this.translatedThreshold,l.yAxis.len)),p=z(e.inside,!!this.options.stacking);h&&(f=t(h),0>f.y&&(f.height+=f.y,f.y=0),h=f.y+f.height-l.yAxis.len,0<h&&(f.height-=h),c&&(f={x:l.yAxis.len-f.y-f.height,y:l.xAxis.len-f.x-f.width,width:f.height,height:f.width}),p||(c?(f.x+=g?0:f.width,f.width=0):(f.y+=
g?f.height:0,f.height=0)));e.align=z(e.align,!c||p?"center":g?"right":"left");e.verticalAlign=z(e.verticalAlign,c||p?"middle":g?"top":"bottom");m.prototype.alignDataLabel.call(this,a,b,e,f,k);a.isLabelJustified&&a.contrastColor&&a.dataLabel.css({color:a.contrastColor})})})(L);(function(a){var F=a.Chart,E=a.each,G=a.objectEach,r=a.pick;a=a.addEvent;a(F.prototype,"render",function(){var a=[];E(this.labelCollectors||[],function(h){a=a.concat(h())});E(this.yAxis||[],function(h){h.options.stackLabels&&
!h.options.stackLabels.allowOverlap&&G(h.stacks,function(h){G(h,function(h){a.push(h.label)})})});E(this.series||[],function(h){var p=h.options.dataLabels,t=h.dataLabelCollections||["dataLabel"];(p.enabled||h._hasPointLabels)&&!p.allowOverlap&&h.visible&&E(t,function(p){E(h.points,function(h){h[p]&&(h[p].labelrank=r(h.labelrank,h.shapeArgs&&h.shapeArgs.height),a.push(h[p]))})})});this.hideOverlappingLabels(a)});F.prototype.hideOverlappingLabels=function(a){var h=a.length,r,t,q,z,k,m,f,e,c,b=function(a,
b,c,e,f,k,g,h){return!(f>a+c||f+g<a||k>b+e||k+h<b)};for(t=0;t<h;t++)if(r=a[t])r.oldOpacity=r.opacity,r.newOpacity=1,r.width||(q=r.getBBox(),r.width=q.width,r.height=q.height);a.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(t=0;t<h;t++)for(q=a[t],r=t+1;r<h;++r)if(z=a[r],q&&z&&q!==z&&q.placed&&z.placed&&0!==q.newOpacity&&0!==z.newOpacity&&(k=q.alignAttr,m=z.alignAttr,f=q.parentGroup,e=z.parentGroup,c=2*(q.box?0:q.padding||0),k=b(k.x+f.translateX,k.y+f.translateY,q.width-c,q.height-
c,m.x+e.translateX,m.y+e.translateY,z.width-c,z.height-c)))(q.labelrank<z.labelrank?q:z).newOpacity=0;E(a,function(a){var b,c;a&&(c=a.newOpacity,a.oldOpacity!==c&&a.placed&&(c?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=c,a[a.isOld?"animate":"attr"](a.alignAttr,null,b)),a.isOld=!0)})}})(L);(function(a){var F=a.addEvent,E=a.Chart,G=a.createElement,r=a.css,h=a.defaultOptions,p=a.defaultPlotOptions,x=a.each,t=a.extend,q=a.fireEvent,z=a.hasTouch,k=a.inArray,m=a.isObject,f=a.Legend,e=a.merge,
c=a.pick,b=a.Point,w=a.Series,l=a.seriesTypes,D=a.svg,H;H=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart.pointer,c=function(a){var c=b.getPointFromEvent(a);void 0!==c&&(b.isDirectTouch=!0,c.onMouseOver(a))};x(a.points,function(a){a.graphic&&(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.div?a.dataLabel.div.point=a:a.dataLabel.element.point=a)});a._hasTracking||(x(a.trackerGroups,function(g){if(a[g]){a[g].addClass("highcharts-tracker").on("mouseover",c).on("mouseout",function(a){b.onTrackerMouseOut(a)});
if(z)a[g].on("touchstart",c);a.options.cursor&&a[g].css(r).css({cursor:a.options.cursor})}}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,b=a.options,c=b.trackByArea,e=[].concat(c?a.areaPath:a.graphPath),f=e.length,l=a.chart,d=l.pointer,k=l.renderer,h=l.options.tooltip.snap,m=a.tracker,n,p=function(){if(l.hoverSeries!==a)a.onMouseOver()},t="rgba(192,192,192,"+(D?.0001:.002)+")";if(f&&!c)for(n=f+1;n--;)"M"===e[n]&&e.splice(n+1,0,e[n+1]-h,e[n+2],"L"),(n&&"M"===e[n]||n===f)&&e.splice(n,
0,"L",e[n-2]+h,e[n-1]);m?m.attr({d:e}):a.graph&&(a.tracker=k.path(e).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:t,fill:c?t:"none","stroke-width":a.graph.strokeWidth()+(c?0:2*h),zIndex:2}).add(a.group),x([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",p).on("mouseout",function(a){d.onTrackerMouseOut(a)});b.cursor&&a.css({cursor:b.cursor});if(z)a.on("touchstart",p)}))}};l.column&&(l.column.prototype.drawTracker=H.drawTrackerPoint);
l.pie&&(l.pie.prototype.drawTracker=H.drawTrackerPoint);l.scatter&&(l.scatter.prototype.drawTracker=H.drawTrackerPoint);t(f.prototype,{setItemEvents:function(a,b,c){var g=this,f=g.chart.renderer.boxWrapper,l="highcharts-legend-"+(a.series?"point":"series")+"-active";(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover");f.addClass(l);b.css(g.options.itemHoverStyle)}).on("mouseout",function(){b.css(e(a.visible?g.itemStyle:g.itemHiddenStyle));f.removeClass(l);a.setState()}).on("click",function(d){var b=
function(){a.setVisible&&a.setVisible()};d={browserEvent:d};a.firePointEvent?a.firePointEvent("legendItemClick",d,b):q(a,"legendItemClick",d,b)})},createCheckboxForItem:function(a){a.checkbox=G("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);F(a.checkbox,"click",function(b){q(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});h.legend.itemStyle.cursor="pointer";t(E.prototype,{showResetZoom:function(){var a=
this,b=h.lang,c=a.options.chart.resetZoomButton,e=c.theme,f=e.states,l="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},e,f&&f.hover).attr({align:c.position.align,title:b.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(c.position,!1,l)},zoomOut:function(){var a=this;q(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,g=this.pointer,e=!1,f;!a||a.resetSelection?(x(this.axes,function(a){b=
a.zoom()}),g.initiated=!1):x(a.xAxis.concat(a.yAxis),function(a){var d=a.axis;g[d.isXAxis?"zoomX":"zoomY"]&&(b=d.zoom(a.min,a.max),d.displayBtn&&(e=!0))});f=this.resetZoomButton;e&&!f?this.showResetZoom():!e&&m(f)&&(this.resetZoomButton=f.destroy());b&&this.redraw(c(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,e=c.hoverPoints,f;e&&x(e,function(a){a.setState()});x("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,g=a[d?"chartX":
"chartY"],d=d?"mouseDownX":"mouseDownY",e=c[d],l=(b.pointRange||0)/2,n=b.getExtremes(),k=b.toValue(e-g,!0)+l,l=b.toValue(e+b.len-g,!0)-l,h=l<k,e=h?l:k,k=h?k:l,l=Math.min(n.dataMin,b.toValue(b.toPixels(n.min)-b.minPixelPadding)),h=Math.max(n.dataMax,b.toValue(b.toPixels(n.max)+b.minPixelPadding)),m;m=l-e;0<m&&(k+=m,e=l);m=k-h;0<m&&(k=h,e-=m);b.series.length&&e!==n.min&&k!==n.max&&(b.setExtremes(e,k,!1,!1,{trigger:"pan"}),f=!0);c[d]=g});f&&c.redraw(!1);r(c.container,{cursor:"move"})}});t(b.prototype,
{select:function(a,b){var g=this,e=g.series,f=e.chart;a=c(a,!g.selected);g.firePointEvent(a?"select":"unselect",{accumulate:b},function(){g.selected=g.options.selected=a;e.options.data[k(g,e.data)]=g.options;g.setState(a&&"select");b||x(f.getSelectedPoints(),function(a){a.selected&&a!==g&&(a.selected=a.options.selected=!1,e.options.data[k(a,e.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},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");x(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var b=this,c=e(b.series.options.point,b.options).events;b.events=c;a.objectEach(c,function(a,c){F(b,c,a)});this.hasImportedEvents=!0}},setState:function(a,b){var g=Math.floor(this.plotX),e=this.plotY,f=this.series,l=f.options.states[a]||{},d=p[f.type].marker&&
f.options.marker,k=d&&!1===d.enabled,h=d&&d.states&&d.states[a]||{},m=!1===h.enabled,n=f.stateMarkerGraphic,q=this.marker||{},w=f.chart,r=f.halo,C,D=d&&f.markerAttribs;a=a||"";if(!(a===this.state&&!b||this.selected&&"select"!==a||!1===l.enabled||a&&(m||k&&!1===h.enabled)||a&&q.states&&q.states[a]&&!1===q.states[a].enabled)){D&&(C=f.markerAttribs(this,a));if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+this.state),a&&this.graphic.addClass("highcharts-point-"+a),this.graphic.animate(f.pointAttribs(this,
a),c(w.options.chart.animation,l.animation)),C&&this.graphic.animate(C,c(w.options.chart.animation,h.animation,d.animation)),n&&n.hide();else{if(a&&h){d=q.symbol||f.symbol;n&&n.currentSymbol!==d&&(n=n.destroy());if(n)n[b?"animate":"attr"]({x:C.x,y:C.y});else d&&(f.stateMarkerGraphic=n=w.renderer.symbol(d,C.x,C.y,C.width,C.height).add(f.markerGroup),n.currentSymbol=d);n&&n.attr(f.pointAttribs(this,a))}n&&(n[a&&w.isInsidePlot(g,e,w.inverted)?"show":"hide"](),n.element.point=this)}(g=l.halo)&&g.size?
(r||(f.halo=r=w.renderer.path().add((this.graphic||n).parentGroup)),r[b?"animate":"attr"]({d:this.haloPath(g.size)}),r.attr({"class":"highcharts-halo highcharts-color-"+c(this.colorIndex,f.colorIndex)}),r.point=this,r.attr(t({fill:this.color||f.color,"fill-opacity":g.opacity,zIndex:-1},g.attributes))):r&&r.point&&r.point.haloPath&&r.animate({d:r.point.haloPath(0)});this.state=a}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-a,this.plotY-a,2*a,2*a)}});
t(w.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,e=b.hoverPoint;b.hoverSeries=null;if(e)e.onMouseOut();this&&a.events.mouseOut&&q(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=this,g=b.options,e=b.graph,f=g.states,
l=g.lineWidth,g=0;a=a||"";if(b.state!==a&&(x([b.group,b.markerGroup,b.dataLabelsGroup],function(d){d&&(b.state&&d.removeClass("highcharts-series-"+b.state),a&&d.addClass("highcharts-series-"+a))}),b.state=a,!f[a]||!1!==f[a].enabled)&&(a&&(l=f[a].lineWidth||l+(f[a].lineWidthPlus||0)),e&&!e.dashstyle))for(l={"stroke-width":l},e.animate(l,c(b.chart.options.chart.animation,f[a]&&f[a].animation));b["zone-graph-"+g];)b["zone-graph-"+g].attr(l),g+=1},setVisible:function(a,b){var c=this,e=c.chart,f=c.legendItem,
l,d=e.options.chart.ignoreHiddenSeries,k=c.visible;l=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!k:a)?"show":"hide";x(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][l]()});if(e.hoverSeries===c||(e.hoverPoint&&e.hoverPoint.series)===c)c.onMouseOut();f&&e.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&x(e.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});x(c.linkedSeries,function(d){d.setVisible(a,!1)});d&&(e.isDirtyBox=
!0);!1!==b&&e.redraw();q(c,l)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=void 0===a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);q(this,a?"select":"unselect")},drawTracker:H.drawTrackerGraph})})(L);(function(a){var F=a.Chart,E=a.each,G=a.inArray,r=a.isArray,h=a.isObject,p=a.pick,x=a.splat;F.prototype.setResponsive=function(h){var p=this.options.responsive,t=[],k=this.currentResponsive;p&&p.rules&&E(p.rules,function(f){void 0===
f._id&&(f._id=a.uniqueKey());this.matchResponsiveRule(f,t,h)},this);var m=a.merge.apply(0,a.map(t,function(f){return a.find(p.rules,function(a){return a._id===f}).chartOptions})),t=t.toString()||void 0;t!==(k&&k.ruleIds)&&(k&&this.update(k.undoOptions,h),t?(this.currentResponsive={ruleIds:t,mergedOptions:m,undoOptions:this.currentOptions(m)},this.update(m,h)):this.currentResponsive=void 0)};F.prototype.matchResponsiveRule=function(a,h){var t=a.condition;(t.callback||function(){return this.chartWidth<=
p(t.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=p(t.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=p(t.minWidth,0)&&this.chartHeight>=p(t.minHeight,0)}).call(this)&&h.push(a._id)};F.prototype.currentOptions=function(p){function t(k,m,f,e){var c;a.objectEach(k,function(a,k){if(!e&&-1<G(k,["series","xAxis","yAxis"]))for(a=x(a),f[k]=[],c=0;c<a.length;c++)m[k][c]&&(f[k][c]={},t(a[c],m[k][c],f[k][c],e+1));else h(a)?(f[k]=r(a)?[]:{},t(a,m[k]||{},f[k],e+1)):f[k]=m[k]||null})}var z={};t(p,this.options,z,
0);return z}})(L);(function(a){var F=a.addEvent,E=a.Axis,G=a.Chart,r=a.css,h=a.dateFormat,p=a.defined,x=a.each,t=a.extend,q=a.noop,z=a.pick,k=a.timeUnits,m=a.wrap;m(a.Series.prototype,"init",function(a){var e;a.apply(this,Array.prototype.slice.call(arguments,1));(e=this.xAxis)&&e.options.ordinal&&F(this,"updatedData",function(){delete e.ordinalIndex})});m(E.prototype,"getTimeTicks",function(a,e,c,b,m,l,t,q){var f=0,r,g,y={},w,A,d,v=[],B=-Number.MAX_VALUE,u=this.options.tickPixelInterval;if(!this.options.ordinal&&
!this.options.breaks||!l||3>l.length||void 0===c)return a.call(this,e,c,b,m);A=l.length;for(r=0;r<A;r++){d=r&&l[r-1]>b;l[r]<c&&(f=r);if(r===A-1||l[r+1]-l[r]>5*t||d){if(l[r]>B){for(g=a.call(this,e,l[f],l[r],m);g.length&&g[0]<=B;)g.shift();g.length&&(B=g[g.length-1]);v=v.concat(g)}f=r+1}if(d)break}a=g.info;if(q&&a.unitRange<=k.hour){r=v.length-1;for(f=1;f<r;f++)h("%d",v[f])!==h("%d",v[f-1])&&(y[v[f]]="day",w=!0);w&&(y[v[0]]="day");a.higherRanks=y}v.info=a;if(q&&p(u)){q=a=v.length;r=[];var n;for(w=[];q--;)f=
this.translate(v[q]),n&&(w[q]=n-f),r[q]=n=f;w.sort();w=w[Math.floor(w.length/2)];w<.6*u&&(w=null);q=v[a-1]>b?a-1:a;for(n=void 0;q--;)f=r[q],b=Math.abs(n-f),n&&b<.8*u&&(null===w||b<.8*w)?(y[v[q]]&&!y[v[q+1]]?(b=q+1,n=f):b=q,v.splice(b,1)):n=f}return v});t(E.prototype,{beforeSetTickPositions:function(){var a,e=[],c=!1,b,k=this.getExtremes(),l=k.min,h=k.max,m,t=this.isXAxis&&!!this.options.breaks,k=this.options.ordinal,q=Number.MAX_VALUE,g=this.chart.options.chart.ignoreHiddenSeries;b="highcharts-navigator-xaxis"===
this.options.className;!this.options.overscroll||this.max!==this.dataMax||this.chart.mouseIsDown&&!b||this.eventArgs&&(!this.eventArgs||"navigator"===this.eventArgs.trigger)||(this.max+=this.options.overscroll,!b&&p(this.userMin)&&(this.min+=this.options.overscroll));if(k||t){x(this.series,function(b,c){if(!(g&&!1===b.visible||!1===b.takeOrdinalPosition&&!t)&&(e=e.concat(b.processedXData),a=e.length,e.sort(function(a,d){return a-d}),q=Math.min(q,z(b.closestPointRange,q)),a))for(c=a-1;c--;)e[c]===
e[c+1]&&e.splice(c,1)});a=e.length;if(2<a){b=e[1]-e[0];for(m=a-1;m--&&!c;)e[m+1]-e[m]!==b&&(c=!0);!this.options.keepOrdinalPadding&&(e[0]-l>b||h-e[e.length-1]>b)&&(c=!0)}else this.options.overscroll&&(2===a?q=e[1]-e[0]:1===a?(q=this.options.overscroll,e=[e[0],e[0]+q]):q=this.overscrollPointsRange);c?(this.options.overscroll&&(this.overscrollPointsRange=q,e=e.concat(this.getOverscrollPositions())),this.ordinalPositions=e,b=this.ordinal2lin(Math.max(l,e[0]),!0),m=Math.max(this.ordinal2lin(Math.min(h,
e[e.length-1]),!0),1),this.ordinalSlope=h=(h-l)/(m-b),this.ordinalOffset=l-b*h):(this.overscrollPointsRange=z(this.closestPointRange,this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=k&&c;this.groupIntervalFactor=null},val2lin:function(a,e){var c=this.ordinalPositions;if(c){var b=c.length,f,l;for(f=b;f--;)if(c[f]===a){l=f;break}for(f=b-1;f--;)if(a>c[f]||0===f){a=(a-c[f])/(c[f+1]-c[f]);l=f+a;break}e=e?l:this.ordinalSlope*(l||0)+this.ordinalOffset}else e=
a;return e},lin2val:function(a,e){var c=this.ordinalPositions;if(c){var b=this.ordinalSlope,f=this.ordinalOffset,l=c.length-1,k;if(e)0>a?a=c[0]:a>l?a=c[l]:(l=Math.floor(a),k=a-l);else for(;l--;)if(e=b*l+f,a>=e){b=b*(l+1)+f;k=(a-e)/(b-e);break}return void 0!==k&&void 0!==c[l]?c[l]+(k?k*(c[l+1]-c[l]):0):a}return a},getExtendedPositions:function(){var a=this,e=a.chart,c=a.series[0].currentDataGrouping,b=a.ordinalIndex,k=c?c.count+c.unitName:"raw",l=a.options.overscroll,h=a.getExtremes(),m,p;b||(b=a.ordinalIndex=
{});b[k]||(m={series:[],chart:e,getExtremes:function(){return{min:h.dataMin,max:h.dataMax+l}},options:{ordinal:!0},val2lin:E.prototype.val2lin,ordinal2lin:E.prototype.ordinal2lin},x(a.series,function(b){p={xAxis:m,xData:b.xData.slice(),chart:e,destroyGroupedData:q};p.xData=p.xData.concat(a.getOverscrollPositions());p.options={dataGrouping:c?{enabled:!0,forced:!0,approximation:"open",units:[[c.unitName,[c.count]]]}:{enabled:!1}};b.processData.apply(p);m.series.push(p)}),a.beforeSetTickPositions.apply(m),
b[k]=m.ordinalPositions);return b[k]},getOverscrollPositions:function(){var f=this.options.overscroll,e=this.overscrollPointsRange,c=[],b=this.dataMax;if(a.defined(e))for(c.push(b);b<=this.dataMax+f;)b+=e,c.push(b);return c},getGroupIntervalFactor:function(a,e,c){var b;c=c.processedXData;var f=c.length,l=[];b=this.groupIntervalFactor;if(!b){for(b=0;b<f-1;b++)l[b]=c[b+1]-c[b];l.sort(function(a,b){return a-b});l=l[Math.floor(f/2)];a=Math.max(a,c[0]);e=Math.min(e,c[f-1]);this.groupIntervalFactor=b=f*
l/(e-a)}return b},postProcessTickInterval:function(a){var e=this.ordinalSlope;return e?this.options.breaks?this.closestPointRange||a:a/(e/this.closestPointRange):a}});E.prototype.ordinal2lin=E.prototype.val2lin;m(G.prototype,"pan",function(a,e){var c=this.xAxis[0],b=c.options.overscroll,f=e.chartX,l=!1;if(c.options.ordinal&&c.series.length){var k=this.mouseDownX,h=c.getExtremes(),m=h.dataMax,p=h.min,g=h.max,t=this.hoverPoints,q=c.closestPointRange||c.overscrollPointsRange,k=(k-f)/(c.translationSlope*
(c.ordinalSlope||q)),A={ordinalPositions:c.getExtendedPositions()},q=c.lin2val,d=c.val2lin,v;A.ordinalPositions?1<Math.abs(k)&&(t&&x(t,function(a){a.setState()}),0>k?(t=A,v=c.ordinalPositions?c:A):(t=c.ordinalPositions?c:A,v=A),A=v.ordinalPositions,m>A[A.length-1]&&A.push(m),this.fixedRange=g-p,k=c.toFixedRange(null,null,q.apply(t,[d.apply(t,[p,!0])+k,!0]),q.apply(v,[d.apply(v,[g,!0])+k,!0])),k.min>=Math.min(h.dataMin,p)&&k.max<=Math.max(m,g)+b&&c.setExtremes(k.min,k.max,!0,!1,{trigger:"pan"}),this.mouseDownX=
f,r(this.container,{cursor:"move"})):l=!0}else l=!0;l&&(b&&(c.max=c.dataMax+b),a.apply(this,Array.prototype.slice.call(arguments,1)))})})(L);(function(a){function F(){return Array.prototype.slice.call(arguments,1)}function E(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,G(this.pointArrayMap,["y"]))}var G=a.pick,r=a.wrap,h=a.each,p=a.extend,x=a.isArray,t=a.fireEvent,q=a.Axis,z=a.Series;p(q.prototype,{isInBreak:function(a,h){var f=a.repeat||Infinity,e=a.from,c=a.to-a.from;
h=h>=e?(h-e)%f:f-(e-h)%f;return a.inclusive?h<=c:h<c&&0!==h},isInAnyBreak:function(a,h){var f=this.options.breaks,e=f&&f.length,c,b,k;if(e){for(;e--;)this.isInBreak(f[e],a)&&(c=!0,b||(b=G(f[e].showPoints,this.isXAxis?!1:!0)));k=c&&h?c&&!b:c}return k}});r(q.prototype,"setTickPositions",function(a){a.apply(this,Array.prototype.slice.call(arguments,1));if(this.options.breaks){var k=this.tickPositions,f=this.tickPositions.info,e=[],c;for(c=0;c<k.length;c++)this.isInAnyBreak(k[c])||e.push(k[c]);this.tickPositions=
e;this.tickPositions.info=f}});r(q.prototype,"init",function(a,m,f){var e=this;f.breaks&&f.breaks.length&&(f.ordinal=!1);a.call(this,m,f);a=this.options.breaks;e.isBroken=x(a)&&!!a.length;e.isBroken&&(e.val2lin=function(a){var b=a,c,f;for(f=0;f<e.breakArray.length;f++)if(c=e.breakArray[f],c.to<=a)b-=c.len;else if(c.from>=a)break;else if(e.isInBreak(c,a)){b-=a-c.from;break}return b},e.lin2val=function(a){var b,c;for(c=0;c<e.breakArray.length&&!(b=e.breakArray[c],b.from>=a);c++)b.to<a?a+=b.len:e.isInBreak(b,
a)&&(a+=b.len);return a},e.setExtremes=function(a,b,e,f,k){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(b);)b-=this.closestPointRange;q.prototype.setExtremes.call(this,a,b,e,f,k)},e.setAxisTranslation=function(a){q.prototype.setAxisTranslation.call(this,a);a=e.options.breaks;var b=[],c=[],f=0,k,m,p=e.userMin||e.min,r=e.userMax||e.max,g=G(e.pointRangePadding,0),y,x;h(a,function(a){m=a.repeat||Infinity;e.isInBreak(a,p)&&(p+=a.to%m-p%m);e.isInBreak(a,r)&&(r-=r%m-a.from%
m)});h(a,function(a){y=a.from;for(m=a.repeat||Infinity;y-m>p;)y-=m;for(;y<p;)y+=m;for(x=y;x<r;x+=m)b.push({value:x,move:"in"}),b.push({value:x+(a.to-a.from),move:"out",size:a.breakSize})});b.sort(function(a,d){return a.value===d.value?("in"===a.move?0:1)-("in"===d.move?0:1):a.value-d.value});k=0;y=p;h(b,function(a){k+="in"===a.move?1:-1;1===k&&"in"===a.move&&(y=a.value);0===k&&(c.push({from:y,to:a.value,len:a.value-y-(a.size||0)}),f+=a.value-y-(a.size||0))});e.breakArray=c;e.unitLength=r-p-f+g;t(e,
"afterBreaks");e.options.staticScale?e.transA=e.options.staticScale:e.unitLength&&(e.transA*=(r-e.min+g)/e.unitLength);g&&(e.minPixelPadding=e.transA*e.minPointOffset);e.min=p;e.max=r})});r(z.prototype,"generatePoints",function(a){a.apply(this,F(arguments));var k=this.xAxis,f=this.yAxis,e=this.points,c,b=e.length,h=this.options.connectNulls,l;if(k&&f&&(k.options.breaks||f.options.breaks))for(;b--;)c=e[b],l=null===c.y&&!1===h,l||!k.isInAnyBreak(c.x,!0)&&!f.isInAnyBreak(c.y,!0)||(e.splice(b,1),this.data[b]&&
this.data[b].destroyElements())});a.Series.prototype.drawBreaks=function(a,m){var f=this,e=f.points,c,b,k,l;a&&h(m,function(m){c=a.breakArray||[];b=a.isXAxis?a.min:G(f.options.threshold,a.min);h(e,function(e){l=G(e["stack"+m.toUpperCase()],e[m]);h(c,function(c){k=!1;if(b<c.from&&l>c.to||b>c.from&&l<c.from)k="pointBreak";else if(b<c.from&&l>c.from&&l<c.to||b>c.from&&l>c.to&&l<c.from)k="pointInBreak";k&&t(a,k,{point:e,brk:c})})})})};a.Series.prototype.gappedPath=function(){var k=this.options.gapSize,
h=this.points.slice(),f=h.length-1,e=this.yAxis,c;if(k&&0<f)for("value"!==this.options.gapUnit&&(k*=this.closestPointRange);f--;)h[f+1].x-h[f].x>k&&(c=(h[f].x+h[f+1].x)/2,h.splice(f+1,0,{isNull:!0,x:c}),this.options.stacking&&(c=e.stacks[this.stackKey][c]=new a.StackItem(e,e.options.stackLabels,!1,c,this.stack),c.total=0));return this.getGraphPath(h)};r(a.seriesTypes.column.prototype,"drawPoints",E);r(a.Series.prototype,"drawPoints",E)})(L);(function(a){var F=a.arrayMax,E=a.arrayMin,G=a.Axis,r=a.defaultPlotOptions,
h=a.defined,p=a.each,x=a.extend,t=a.format,q=a.isNumber,z=a.merge,k=a.pick,m=a.Point,f=a.Tooltip,e=a.wrap,c=a.Series.prototype,b=c.processData,w=c.generatePoints,l=c.destroy,D={approximation:"average",groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y",
"%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},H={line:{},spline:{},area:{},areaspline:{},column:{approximation:"sum",groupPixelWidth:10},arearange:{approximation:"range"},areasplinerange:{approximation:"range"},columnrange:{approximation:"range",groupPixelWidth:10},candlestick:{approximation:"ohlc",groupPixelWidth:10},ohlc:{approximation:"ohlc",groupPixelWidth:5}},C=a.defaultDataGroupingUnits=[["millisecond",
[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]],K=a.approximations={sum:function(a){var b=a.length,c;if(!b&&a.hasNulls)c=null;else if(b)for(c=0;b--;)c+=a[b];return c},average:function(a){var b=a.length;a=K.sum(a);q(a)&&b&&(a/=b);return a},averages:function(){var a=[];p(arguments,function(b){a.push(K.average(b))});return void 0===a[0]?void 0:a},open:function(a){return a.length?
a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?F(a):a.hasNulls?null:void 0},low:function(a){return a.length?E(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,b,c,e){a=K.open(a);b=K.high(b);c=K.low(c);e=K.close(e);if(q(a)||q(b)||q(c)||q(e))return[a,b,c,e]},range:function(a,b){a=K.low(a);b=K.high(b);if(q(a)||q(b))return[a,b];if(null===a&&null===b)return null}};c.groupData=function(a,b,c,e){var d=this.data,g=this.options.data,
f=[],l=[],n=[],k=a.length,h,m,t=!!b,r=[];e="function"===typeof e?e:K[e]||H[this.type]&&K[H[this.type].approximation]||K[D.approximation];var y=this.pointArrayMap,A=y&&y.length,w=0;m=0;var x,z;A?p(y,function(){r.push([])}):r.push([]);x=A||1;for(z=0;z<=k&&!(a[z]>=c[0]);z++);for(z;z<=k;z++){for(;void 0!==c[w+1]&&a[z]>=c[w+1]||z===k;){h=c[w];this.dataGroupInfo={start:m,length:r[0].length};m=e.apply(this,r);void 0!==m&&(f.push(h),l.push(m),n.push(this.dataGroupInfo));m=z;for(h=0;h<x;h++)r[h].length=0,
r[h].hasNulls=!1;w+=1;if(z===k)break}if(z===k)break;if(y){h=this.cropStart+z;var C=d&&d[h]||this.pointClass.prototype.applyOptions.apply({series:this},[g[h]]),J;for(h=0;h<A;h++)J=C[y[h]],q(J)?r[h].push(J):null===J&&(r[h].hasNulls=!0)}else h=t?b[z]:null,q(h)?r[0].push(h):null===h&&(r[0].hasNulls=!0)}return[f,l,n]};c.processData=function(){var a=this.chart,e=this.options.dataGrouping,f=!1!==this.allowDG&&e&&k(e.enabled,a.options.isStock),l=this.visible||!a.options.chart.ignoreHiddenSeries,d,m=this.currentDataGrouping,
p;this.forceCrop=f;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==b.apply(this,arguments)&&f){this.destroyGroupedData();var u=this.processedXData,n=this.processedYData,t=a.plotSizeX,a=this.xAxis,q=a.options.ordinal,r=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();if(r){this.isDirty=d=!0;this.points=null;f=a.getExtremes();p=f.min;f=f.max;q=q&&a.getGroupIntervalFactor(p,f,this)||1;r=r*(f-p)/t*q;t=a.getTimeTicks(a.normalizeTimeTickInterval(r,e.units||C),Math.min(p,u[0]),Math.max(f,
u[u.length-1]),a.options.startOfWeek,u,this.closestPointRange);u=c.groupData.apply(this,[u,n,t,e.approximation]);n=u[0];q=u[1];if(e.smoothed&&n.length){e=n.length-1;for(n[e]=Math.min(n[e],f);e--&&0<e;)n[e]+=r/2;n[0]=Math.max(n[0],p)}p=t.info;this.closestPointRange=t.info.totalRange;this.groupMap=u[2];h(n[0])&&n[0]<a.dataMin&&l&&(a.min===a.dataMin&&(a.min=n[0]),a.dataMin=n[0]);this.processedXData=n;this.processedYData=q}else this.groupMap=null;this.hasGroupedData=d;this.currentDataGrouping=p;this.preventGraphAnimation=
(m&&m.totalRange)!==(p&&p.totalRange)}};c.destroyGroupedData=function(){var a=this.groupedData;p(a||[],function(b,c){b&&(a[c]=b.destroy?b.destroy():null)});this.groupedData=null};c.generatePoints=function(){w.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};e(m.prototype,"update",function(b){this.dataGroup?a.error(24):b.apply(this,[].slice.call(arguments,1))});e(f.prototype,"tooltipFooterHeaderFormatter",function(b,c,e){var g=c.series,d=g.tooltipOptions,
f=g.options.dataGrouping,l=d.xDateFormat,h,n=g.xAxis,k=a.dateFormat;return n&&"datetime"===n.options.type&&f&&q(c.key)?(b=g.currentDataGrouping,f=f.dateTimeLabelFormats,b?(n=f[b.unitName],1===b.count?l=n[0]:(l=n[1],h=n[2])):!l&&f&&(l=this.getXDateFormat(c,d,n)),l=k(l,c.key),h&&(l+=k(h,c.key+b.totalRange-1)),t(d[(e?"footer":"header")+"Format"],{point:x(c.point,{key:l}),series:g})):b.call(this,c,e)});c.destroy=function(){for(var a=this.groupedData||[],b=a.length;b--;)a[b]&&a[b].destroy();l.apply(this)};
e(c,"setOptions",function(a,b){a=a.call(this,b);var c=this.type,e=this.chart.options.plotOptions,d=r[c].dataGrouping;H[c]&&(d||(d=z(D,H[c])),a.dataGrouping=z(d,e.series&&e.series.dataGrouping,e[c].dataGrouping,b.dataGrouping));this.chart.options.isStock&&(this.requireSorting=!0);return a});e(G.prototype,"setScale",function(a){a.call(this);p(this.series,function(a){a.hasProcessed=!1})});G.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,c,e=0,d=!1,f;for(c=b;c--;)(f=a[c].options.dataGrouping)&&
(e=Math.max(e,f.groupPixelWidth));for(c=b;c--;)(f=a[c].options.dataGrouping)&&a[c].hasProcessed&&(b=(a[c].processedXData||a[c].data).length,a[c].groupPixelWidth||b>this.chart.plotSizeX/e||b&&f.forced)&&(d=!0);return d?e:0};G.prototype.setDataGrouping=function(a,b){var c;b=k(b,!0);a||(a={forced:!1,units:null});if(this instanceof G)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else p(this.chart.options.series,function(b){b.dataGrouping=a},!1);b&&this.chart.redraw()}})(L);
(function(a){var F=a.each,E=a.Point,G=a.seriesType,r=a.seriesTypes;G("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cb\x3e {series.name}\x3c/b\x3e\x3cbr/\x3eOpen: {point.open}\x3cbr/\x3eHigh: {point.high}\x3cbr/\x3eLow: {point.low}\x3cbr/\x3eClose: {point.close}\x3cbr/\x3e'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,
a.high,a.low,a.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointAttribs:function(a,p){p=r.column.prototype.pointAttribs.call(this,a,p);var h=this.options;delete p.fill;!a.options.color&&h.upColor&&a.open<a.close&&(p.stroke=h.upColor);return p},translate:function(){var a=this,p=a.yAxis,x=!!a.modifyValue,t=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];r.column.prototype.translate.apply(a);F(a.points,function(h){F([h.open,h.high,h.low,h.close,
h.low],function(q,k){null!==q&&(x&&(q=a.modifyValue(q)),h[t[k]]=p.toPixels(q,!0))});h.tooltipPos[1]=h.plotHigh+p.pos-a.chart.plotTop})},drawPoints:function(){var a=this,p=a.chart;F(a.points,function(h){var t,q,r,k,m=h.graphic,f,e=!m;void 0!==h.plotY&&(m||(h.graphic=m=p.renderer.path().add(a.group)),m.attr(a.pointAttribs(h,h.selected&&"select")),q=m.strokeWidth()%2/2,f=Math.round(h.plotX)-q,r=Math.round(h.shapeArgs.width/2),k=["M",f,Math.round(h.yBottom),"L",f,Math.round(h.plotHigh)],null!==h.open&&
(t=Math.round(h.plotOpen)+q,k.push("M",f,t,"L",f-r,t)),null!==h.close&&(t=Math.round(h.plotClose)+q,k.push("M",f,t,"L",f+r,t)),m[e?"attr":"animate"]({d:k}).addClass(h.getClassName(),!0))})},animate:null},{getClassName:function(){return E.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(L);(function(a){var F=a.defaultPlotOptions,E=a.each,G=a.merge,r=a.seriesType,h=a.seriesTypes;r("candlestick","ohlc",G(F.column,{states:{hover:{lineWidth:2}},
tooltip:F.ohlc.tooltip,threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0}),{pointAttribs:function(a,r){var p=h.column.prototype.pointAttribs.call(this,a,r),q=this.options,x=a.open<a.close,k=q.lineColor||this.color;p["stroke-width"]=q.lineWidth;p.fill=a.options.color||(x?q.upColor||this.color:this.color);p.stroke=a.lineColor||(x?q.upLineColor||k:k);r&&(a=q.states[r],p.fill=a.color||p.fill,p.stroke=a.lineColor||p.stroke,p["stroke-width"]=a.lineWidth||p["stroke-width"]);
return p},drawPoints:function(){var a=this,h=a.chart;E(a.points,function(p){var t=p.graphic,r,k,m,f,e,c,b,w=!t;void 0!==p.plotY&&(t||(p.graphic=t=h.renderer.path().add(a.group)),t.attr(a.pointAttribs(p,p.selected&&"select")).shadow(a.options.shadow),e=t.strokeWidth()%2/2,c=Math.round(p.plotX)-e,r=p.plotOpen,k=p.plotClose,m=Math.min(r,k),r=Math.max(r,k),b=Math.round(p.shapeArgs.width/2),k=Math.round(m)!==Math.round(p.plotHigh),f=r!==p.yBottom,m=Math.round(m)+e,r=Math.round(r)+e,e=[],e.push("M",c-b,
r,"L",c-b,m,"L",c+b,m,"L",c+b,r,"Z","M",c,m,"L",c,k?Math.round(p.plotHigh):m,"M",c,r,"L",c,f?Math.round(p.yBottom):r),t[w?"attr":"animate"]({d:e}).addClass(p.getClassName(),!0))})}})})(L);Z=function(a){var F=a.each,E=a.seriesTypes,G=a.stableSort;return{translate:function(){E.column.prototype.translate.apply(this);var a=this.options,h=this.chart,p=this.points,x=p.length-1,t,q,z=a.onSeries;t=z&&h.get(z);var a=a.onKey||"y",z=t&&t.options.step,k=t&&t.points,m=k&&k.length,f=this.xAxis,e=this.yAxis,c=f.getExtremes(),
b=0,w,l,D;if(t&&t.visible&&m)for(b=(t.pointXOffset||0)+(t.barW||0)/2,t=t.currentDataGrouping,l=k[m-1].x+(t?t.totalRange:0),G(p,function(a,b){return a.x-b.x}),a="plot"+a[0].toUpperCase()+a.substr(1);m--&&p[x]&&!(t=p[x],w=k[m],w.x<=t.x&&void 0!==w[a]&&(t.x<=l&&(t.plotY=w[a],w.x<t.x&&!z&&(D=k[m+1])&&void 0!==D[a]&&(t.plotY+=(t.x-w.x)/(D.x-w.x)*(D[a]-w[a]))),x--,m++,0>x)););F(p,function(a,l){var k;void 0===a.plotY&&(a.x>=c.min&&a.x<=c.max?a.plotY=h.chartHeight-f.bottom-(f.opposite?f.height:0)+f.offset-
e.top:a.shapeArgs={});a.plotX+=b;(q=p[l-1])&&q.plotX===a.plotX&&(void 0===q.stackIndex&&(q.stackIndex=0),k=q.stackIndex+1);a.stackIndex=k})}}}(L);(function(a,F){var E=a.addEvent,G=a.each,r=a.merge,h=a.noop,p=a.Renderer,x=a.seriesType,t=a.TrackerMixin,q=a.VMLRenderer,z=a.SVGRenderer.prototype.symbols;x("flags","column",{pointRange:0,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}\x3cbr/\x3e"},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:a.Series.prototype.init,pointAttribs:function(a,h){var f=this.options,e=a&&a.color||this.color,c=f.lineColor,b=a&&a.lineWidth;a=a&&a.fillColor||f.fillColor;h&&(a=f.states[h].fillColor,c=f.states[h].lineColor,b=f.states[h].lineWidth);return{fill:a||e,stroke:c||e,"stroke-width":b||f.lineWidth||0}},translate:F.translate,drawPoints:function(){var h=
this.points,m=this.chart,f=m.renderer,e,c,b=this.options,p=b.y,l,t,q,x,z,g,y=this.yAxis,J={},A=[];for(t=h.length;t--;)q=h[t],g=q.plotX>this.xAxis.len,e=q.plotX,x=q.stackIndex,l=q.options.shape||b.shape,c=q.plotY,void 0!==c&&(c=q.plotY+p-(void 0!==x&&x*b.stackDistance)),q.anchorX=x?void 0:q.plotX,z=x?void 0:q.plotY,x=q.graphic,void 0!==c&&0<=e&&!g?(x||(x=q.graphic=f.label("",null,null,l,null,null,b.useHTML).attr(this.pointAttribs(q)).css(r(b.style,q.style)).attr({align:"flag"===l?"left":"center",width:b.width,
height:b.height,"text-align":b.textAlign}).addClass("highcharts-point").add(this.markerGroup),q.graphic.div&&(q.graphic.div.point=q),x.shadow(b.shadow),x.isNew=!0),0<e&&(e-=x.strokeWidth()%2),x.attr({text:q.options.title||b.title||"A"})[x.isNew?"attr":"animate"]({y:c,anchorY:z}),J[q.plotX]?J[q.plotX].size=Math.max(J[q.plotX].size,x.width):J[q.plotX]={align:0,size:x.width,target:e,anchorX:e},q.tooltipPos=m.inverted?[y.len+y.pos-m.plotLeft-c,this.xAxis.len-e]:[e,c+y.pos-m.plotTop]):x&&(q.graphic=x.destroy());
a.objectEach(J,function(a){a.plotX=a.anchorX;A.push(a)});a.distribute(A,this.xAxis.len);G(h,function(a){var b=a.graphic&&J[a.plotX];b&&(a.graphic[a.graphic.isNew?"attr":"animate"]({x:b.pos,anchorX:a.anchorX}),a.graphic.isNew=!1)});b.useHTML&&a.wrap(this.markerGroup,"on",function(b){return a.SVGElement.prototype.on.apply(b.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var a=this.points;t.drawTrackerPoint.apply(this);G(a,function(h){var f=h.graphic;f&&
E(f.element,"mouseover",function(){0<h.stackIndex&&!h.raised&&(h._y=f.y,f.attr({y:h._y-8}),h.raised=!0);G(a,function(a){a!==h&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:h,buildKDTree:h,setClip:h});z.flag=function(a,h,f,e,c){var b=c&&c.anchorX||a;c=c&&c.anchorY||h;return z.circle(b-1,c-1,2,2).concat(["M",b,c,"L",a,h+e,a,h,a+f,h,a+f,h+e,a,h+e,"Z"])};G(["circle","square"],function(a){z[a+"pin"]=function(h,f,e,c,b){var k=b&&b.anchorX;b=b&&b.anchorY;"circle"===a&&c>e&&
(h-=Math.round((c-e)/2),e=c);h=z[a](h,f,e,c);k&&b&&(h.push("M","circle"===a?h[1]-h[4]:h[1]+h[4]/2,f>b?f:f+c,"L",k,b),h=h.concat(z.circle(k-1,b-1,2,2)));return h}});p===q&&G(["flag","circlepin","squarepin"],function(a){q.prototype.symbols[a]=z[a]})})(L,Z);(function(a){function F(a,b,c){this.init(a,b,c)}var E=a.addEvent,G=a.Axis,r=a.correctFloat,h=a.defaultOptions,p=a.defined,x=a.destroyObjectProperties,t=a.each,q=a.fireEvent,z=a.hasTouch,k=a.isTouchDevice,m=a.merge,f=a.pick,e=a.removeEvent,c=a.wrap,
b,w={height:k?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!k,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};h.scrollbar=m(!0,w,h.scrollbar);a.swapXY=b=function(a,b){var c=a.length,e;if(b)for(b=0;b<c;b+=3)e=a[b+1],a[b+
1]=a[b+2],a[b+2]=e;return a};F.prototype={init:function(a,b,c){this.scrollbarButtons=[];this.renderer=a;this.userOptions=b;this.options=m(w,b);this.chart=c;this.size=f(this.options.size,this.options.height);b.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,c=this.options,e=this.size,f;this.group=f=a.g("scrollbar").attr({zIndex:c.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:c.trackBorderRadius||
0,height:e,width:e}).add(f);this.track.attr({fill:c.trackBackgroundColor,stroke:c.trackBorderColor,"stroke-width":c.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(f);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:e,width:e,r:c.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(b(["M",-3,e/4,"L",-3,2*e/3,"M",0,e/4,"L",0,2*e/3,"M",3,e/4,"L",3,2*e/3],c.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);
this.scrollbar.attr({fill:c.barBackgroundColor,stroke:c.barBorderColor,"stroke-width":c.barBorderWidth});this.scrollbarRifles.attr({stroke:c.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 f=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;f?(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:f?0:c-b,translateY:f?e-g:0})},drawScrollbarButton:function(a){var c=this.renderer,e=this.scrollbarButtons,f=this.options,h=this.size,
g;g=c.g().add(this.group);e.push(g);g=c.rect().addClass("highcharts-scrollbar-button").add(g);g.attr({stroke:f.buttonBorderColor,"stroke-width":f.buttonBorderWidth,fill:f.buttonBackgroundColor});g.attr(g.crisp({x:-.5,y:-.5,width:h+1,height:h+1,r:f.buttonBorderRadius},g.strokeWidth()));g=c.path(b(["M",h/2+(a?-1:1),h/2-3,"L",h/2+(a?-1:1),h/2+3,"L",h/2+(a?2:-2),h/2],f.vertical)).addClass("highcharts-scrollbar-arrow").add(e[a]);g.attr({fill:f.buttonArrowColor})},setRange:function(a,b){var c=this.options,
e=c.vertical,f=c.minWidth,g=this.barWidth,h,l,k=this.rendered&&!this.hasDragged?"animate":"attr";p(g)&&(a=Math.max(a,0),h=Math.ceil(g*a),this.calculatedWidth=l=r(g*Math.min(b,1)-h),l<f&&(h=(g-f+l)*a,l=f),f=Math.floor(h+this.xOffset+this.yOffset),g=l/2-.5,this.from=a,this.to=b,e?(this.scrollbarGroup[k]({translateY:f}),this.scrollbar[k]({height:l}),this.scrollbarRifles[k]({translateY:g}),this.scrollbarTop=f,this.scrollbarLeft=0):(this.scrollbarGroup[k]({translateX:f}),this.scrollbar[k]({width:l}),this.scrollbarRifles[k]({translateX:g}),
this.scrollbarLeft=f,this.scrollbarTop=0),12>=l?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===c.showFull&&(0>=a&&1<=b?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=this;a.mouseMoveHandler=function(b){var c=a.chart.pointer.normalize(b),e=a.options.vertical?"chartY":"chartX",f=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(f[0]+e,f[1]+e),a.hasDragged&&
q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=function(b){b=a.chart.pointer.normalize(b);b=a.cursorToScrollbarPosition(b);a.chartX=b.chartX;a.chartY=b.chartY;a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(b){var c=r(a.to-a.from)*a.options.step;
a.updatePosition(r(a.from-c),r(a.to-c));q(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);q(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,f=a.y+a.scrollbarTop,g=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>f||!a.options.vertical&&c.chartX>g?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-
e,a.to-e);q(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=r(1-r(b-a)),b=1);0>a&&(b=r(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,f=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",f],[c.ownerDocument,"mouseup",g]];z&&a.push([c,"touchstart",e],[c.ownerDocument,"touchmove",f],[c.ownerDocument,"touchend",g]);t(a,function(a){E.apply(null,
a)});this._events=a},removeEvents:function(){t(this._events,function(a){e.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();t(["track","scrollbarRifles","scrollbar","scrollbarGroup","group"],function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,x(a.scrollbarButtons))}};c(G.prototype,"init",function(a){var b=this;a.apply(b,Array.prototype.slice.call(arguments,1));b.options.scrollbar&&b.options.scrollbar.enabled&&
(b.options.scrollbar.vertical=!b.horiz,b.options.startOnTick=b.options.endOnTick=!1,b.scrollbar=new F(b.chart.renderer,b.options.scrollbar,b.chart),E(b.scrollbar,"changed",function(a){var c=Math.min(f(b.options.min,b.min),b.min,b.dataMin),e=Math.max(f(b.options.max,b.max),b.max,b.dataMax)-c,g;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(g=c+e*this.to,c+=e*this.from):(g=c+e*(1-this.from),c+=e*(1-this.to));b.setExtremes(c,g,!0,!1,a)}))});c(G.prototype,"render",function(a){var b=Math.min(f(this.options.min,
this.min),this.min,f(this.dataMin,this.min)),c=Math.max(f(this.options.max,this.max),this.max,f(this.dataMax,this.max)),e=this.scrollbar,h=this.titleOffset||0;a.apply(this,Array.prototype.slice.call(arguments,1));if(e){this.horiz?(e.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:h+this.axisTitleMargin+this.offset),this.width,this.height),h=1):(e.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?h+this.axisTitleMargin+this.offset:
0),this.top,this.width,this.height),h=0);if(!this.opposite&&!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[h]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(b)||isNaN(c)||!p(this.min)||!p(this.max)?e.setRange(0,0):(h=(this.min-b)/(c-b),b=(this.max-b)/(c-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?e.setRange(h,b):e.setRange(1-b,1-h))}});c(G.prototype,"getOffset",function(a){var b=this.horiz?2:1,c=this.scrollbar;a.apply(this,Array.prototype.slice.call(arguments,
1));c&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[b]+=c.size+c.options.margin)});c(G.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());a.apply(this,Array.prototype.slice.call(arguments,1))});a.Scrollbar=F})(L);(function(a){function F(a){this.init(a)}var E=a.addEvent,G=a.Axis,r=a.Chart,h=a.color,p=a.defaultOptions,x=a.defined,t=a.destroyObjectProperties,q=a.each,z=a.erase,k=a.error,m=a.extend,f=a.grep,e=a.hasTouch,c=a.isArray,b=a.isNumber,w=a.isObject,
l=a.merge,D=a.pick,H=a.removeEvent,C=a.Scrollbar,K=a.Series,g=a.seriesTypes,y=a.wrap,J=[].concat(a.defaultDataGroupingUnits),A=function(a){var d=f(arguments,b);if(d.length)return Math[a].apply(0,d)};J[4]=["day",[1,2,3,4]];J[5]=["week",[1,2,3]];g=void 0===g.areaspline?"line":"areaspline";m(p,{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:h("#6685c2").setOpacity(.3).get(),
outlineColor:"#cccccc",outlineWidth:1,series:{type:g,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:J},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,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}}});a.Renderer.prototype.symbols["navigator-handle"]=function(a,b,c,e,g){a=g.width/2;b=Math.round(a/3)+.5;g=g.height;return["M",-a-1,.5,"L",a,.5,"L",a,g+.5,"L",-a-1,g+.5,"L",-a-1,.5,"M",-b,4,"L",-b,g-3,"M",b-1,4,"L",b-1,g-3]};F.prototype={drawHandle:function(a,
b,c,e){var d=this.navigatorOptions.handles.height;this.handles[b][e](c?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(a,10)+.5-d)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-d/2-1)})},drawOutline:function(a,b,c,e){var d=this.navigatorOptions.maskInside,g=this.outline.strokeWidth(),f=g/2,g=g%2/2,h=this.outlineHeight,k=this.scrollbarHeight,l=this.size,m=this.left-k,v=this.top;c?(m-=f,c=v+b+g,b=v+a+g,a=["M",m+
h,v-k-g,"L",m+h,c,"L",m,c,"L",m,b,"L",m+h,b,"L",m+h,v+l+k].concat(d?["M",m+h,c-f,"L",m+h,b+f]:[])):(a+=m+k-g,b+=m+k-g,v+=f,a=["M",m,v,"L",a,v,"L",a,v+h,"L",b,v+h,"L",b,v,"L",m+l+2*k,v].concat(d?["M",a-f,v,"L",b+f,v]:[]));this.outline[e]({d:a})},drawMasks:function(a,b,c,e){var d=this.left,g=this.top,f=this.height,h,k,l,m;c?(l=[d,d,d],m=[g,g+a,g+b],k=[f,f,f],h=[a,b-a,this.size-b]):(l=[d,d+a,d+b],m=[g,g,g],k=[a,b-a,this.size-b],h=[f,f,f]);q(this.shades,function(a,b){a[e]({x:l[b],y:m[b],width:k[b],height:h[b]})})},
renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,e=a.chart,g=e.inverted,f=e.renderer,h;a.navigatorGroup=h=f.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();var k={cursor:g?"ns-resize":"ew-resize"};q([!c,c,!c],function(d,c){a.shades[c]=f.rect().addClass("highcharts-navigator-mask"+(1===c?"-inside":"-outside")).attr({fill:d?b.maskFill:"rgba(0,0,0,0)"}).css(1===c&&k).add(h)});a.outline=f.path().addClass("highcharts-navigator-outline").attr({"stroke-width":b.outlineWidth,
stroke:b.outlineColor}).add(h);b.handles.enabled&&q([0,1],function(d){b.handles.inverted=e.inverted;a.handles[d]=f.symbol(b.handles.symbols[d],-b.handles.width/2-1,0,b.handles.width,b.handles.height,b.handles);a.handles[d].attr({zIndex:7-d}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][d]).add(h);var c=b.handles;a.handles[d].attr({fill:c.backgroundColor,stroke:c.borderColor,"stroke-width":c.lineWidth}).css(k)})},update:function(a){q(this.series||[],function(a){a.baseSeries&&
delete a.baseSeries.navigatorSeries});this.destroy();l(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(d,c,e,g){var f=this.chart,h,k,l=this.scrollbarHeight,m,v=this.xAxis;h=v.fake?f.xAxis[0]:v;var p=this.navigatorEnabled,u,q=this.rendered;k=f.inverted;var t,r=f.xAxis[0].minRange,B=f.xAxis[0].options.maxRange;if(!this.hasDragged||x(e)){if(!b(d)||!b(c))if(q)e=0,g=D(v.width,h.width);else return;this.left=D(v.left,f.plotLeft+l+(k?f.plotWidth:0));this.size=u=m=D(v.len,
(k?f.plotHeight:f.plotWidth)-2*l);f=k?l:m+2*l;e=D(e,v.toPixels(d,!0));g=D(g,v.toPixels(c,!0));b(e)&&Infinity!==Math.abs(e)||(e=0,g=f);d=v.toValue(e,!0);c=v.toValue(g,!0);t=Math.abs(a.correctFloat(c-d));t<r?this.grabbedLeft?e=v.toPixels(c-r,!0):this.grabbedRight&&(g=v.toPixels(d+r,!0)):x(B)&&t>B&&(this.grabbedLeft?e=v.toPixels(c-B,!0):this.grabbedRight&&(g=v.toPixels(d+B,!0)));this.zoomedMax=Math.min(Math.max(e,g,0),u);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:
Math.min(e,g),0),u);this.range=this.zoomedMax-this.zoomedMin;u=Math.round(this.zoomedMax);e=Math.round(this.zoomedMin);p&&(this.navigatorGroup.attr({visibility:"visible"}),q=q&&!this.hasDragged?"animate":"attr",this.drawMasks(e,u,k,q),this.drawOutline(e,u,k,q),this.navigatorOptions.handles.enabled&&(this.drawHandle(e,0,k,q),this.drawHandle(u,1,k,q)));this.scrollbar&&(k?(k=this.top-l,h=this.left-l+(p||!h.opposite?0:(h.titleOffset||0)+h.axisTitleMargin),l=m+2*l):(k=this.top+(p?this.height:-l),h=this.left-
l),this.scrollbar.position(h,k,f,l),this.scrollbar.setRange(this.zoomedMin/m,this.zoomedMax/m));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,c=b.container,g=[],f,h;a.mouseMoveHandler=f=function(b){a.onMouseMove(b)};a.mouseUpHandler=h=function(b){a.onMouseUp(b)};g=a.getPartsEvents("mousedown");g.push(E(c,"mousemove",f),E(c.ownerDocument,"mouseup",h));e&&(g.push(E(c,"touchmove",f),E(c.ownerDocument,"touchend",h)),g.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=g;a.series&&
a.series[0]&&g.push(E(a.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,d=[];q(["shades","handles"],function(c){q(b[c],function(e,g){d.push(E(e.element,a,function(a){b[c+"Mousedown"](a,g)}))})});return d},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var d=this.chart,c=this.xAxis,e=this.zoomedMin,g=this.left,f=this.size,h=this.range,k=a.chartX,l;d.inverted&&(k=a.chartY,g=this.top);1===b?(this.grabbedCenter=
k,this.fixedWidth=h,this.dragOffset=k-e):(a=k-g-h/2,0===b?a=Math.max(0,a):2===b&&a+h>=f&&(a=f-h,l=this.getUnionExtremes().dataMax),a!==e&&(this.fixedWidth=h,b=c.toFixedRange(a,a+h,null,l),d.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 d=a.xAxis[0],c=a.inverted&&!d.reversed||!a.inverted&&d.reversed;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=
c?d.min:d.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=c?d.max:d.min);a.fixedRange=null},onMouseMove:function(a){var b=this,d=b.chart,c=b.left,e=b.navigatorSize,g=b.range,f=b.dragOffset,h=d.inverted;a.touches&&0===a.touches[0].pageX||(a=d.pointer.normalize(a),d=a.chartX,h&&(c=b.top,d=a.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,d-c,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,d-c)):b.grabbedCenter&&(b.hasDragged=!0,d<
f?d=f:d>e+f-g&&(d=e+f-g),b.render(0,0,d-f,d-f+g)),b.hasDragged&&b.scrollbar&&b.scrollbar.options.liveRedraw&&(a.DOMType=a.type,setTimeout(function(){b.onMouseUp(a)},0)))},onMouseUp:function(a){var b=this.chart,d=this.xAxis,c=this.scrollbar,e,g,f=a.DOMEvent||a;(!this.hasDragged||c&&c.hasDragged)&&"scrollbar"!==a.trigger||(this.zoomedMin===this.otherHandlePos?e=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(g=this.fixedExtreme),this.zoomedMax===this.size&&(g=this.getUnionExtremes().dataMax),
d=d.toFixedRange(this.zoomedMin,this.zoomedMax,e,g),x(d.min)&&b.xAxis[0].setExtremes(Math.min(d.min,d.max),Math.max(d.min,d.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:f}));"mousemove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(q(this.eventsToUnbind,function(a){a()}),this.eventsToUnbind=void 0);
this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&q(a,function(a){H(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&H(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,d=b.navigator,c=d.enabled,e=b.scrollbar,g=e.enabled,b=c?d.height:0,f=g?e.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=
f;this.scrollbarEnabled=g;this.navigatorEnabled=c;this.navigatorOptions=d;this.scrollbarOptions=e;this.outlineHeight=b+f;this.opposite=D(d.opposite,!c&&a.inverted);var h=this,e=h.baseSeries,g=a.xAxis.length,k=a.yAxis.length,m=e&&e[0]&&e[0].xAxis||a.xAxis[0];a.extraMargin={type:h.opposite?"plotTop":"marginBottom",value:(c||!a.inverted?h.outlineHeight:0)+d.margin};a.inverted&&(a.extraMargin.type=h.opposite?"marginRight":"plotLeft");a.isDirtyBox=!0;h.navigatorEnabled?(h.xAxis=new G(a,l({breaks:m.options.breaks,
ordinal:m.options.ordinal},d.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:g,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[f,0,-f,0],width:b}:{offsets:[0,-f,0,f],height:b})),h.yAxis=new G(a,l(d.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:k,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),e||d.series.data?h.updateNavigatorSeries():0===a.series.length&&y(a,"redraw",function(b,
d){0<a.series.length&&!h.series&&(h.setBaseSeries(),a.redraw=b);b.call(a,d)}),h.renderElements(),h.addMouseEvents()):h.xAxis={translate:function(b,d){var c=a.xAxis[0],e=c.getExtremes(),g=c.len-2*f,h=A("min",c.options.min,e.dataMin),c=A("max",c.options.max,e.dataMax)-h;return d?b*c/g+h:g*(b-h)/c},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:G.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=h.scrollbar=new C(a.renderer,
l(a.options.scrollbar,{margin:h.navigatorEnabled?0:10,vertical:a.inverted}),a),E(h.scrollbar,"changed",function(b){var d=h.size,c=d*this.to,d=d*this.from;h.hasDragged=h.scrollbar.hasDragged;h.render(0,0,d,c);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType)&&setTimeout(function(){h.onMouseUp(b)})}));h.addBaseSeriesEvents();h.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],d=this.xAxis,c=d.options,e=b.options,g;a&&null===b.dataMin||(g={dataMin:D(c&&c.min,A("min",e.min,
b.dataMin,d.dataMin,d.min)),dataMax:D(c&&c.max,A("max",e.max,b.dataMax,d.dataMax,d.max))});return g},setBaseSeries:function(a,b){var d=this.chart,c=this.baseSeries=[];a=a||d.options&&d.options.navigator.baseSeries||0;q(d.series||[],function(b,d){b.options.isInternal||!b.options.showInNavigator&&(d!==a&&b.options.id!==a||!1===b.options.showInNavigator)||c.push(b)});this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(b)},updateNavigatorSeries:function(b){var d=this,e=d.chart,g=d.baseSeries,f,h,
k=d.navigatorOptions.series,t,r={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,visible:!0},y=d.series=a.grep(d.series||[],function(b){var c=b.baseSeries;return 0>a.inArray(c,g)?(c&&(H(c,"updatedData",d.updatedDataHandler),delete c.navigatorSeries),b.destroy(),!1):!0});g&&g.length&&q(g,function(a){var n=a.navigatorSeries,v=m({color:a.color},c(k)?p.navigator.series:k);n&&!1===d.navigatorOptions.adaptToUpdatedData||
(r.name="Navigator "+g.length,f=a.options||{},t=f.navigatorOptions||{},h=l(f,r,v,t),v=t.data||v.data,d.hasNavigatorData=d.hasNavigatorData||!!v,h.data=v||f.data&&f.data.slice(0),n&&n.options?n.update(h,b):(a.navigatorSeries=e.initSeries(h),a.navigatorSeries.baseSeries=a,y.push(a.navigatorSeries)))});if(k.data&&(!g||!g.length)||c(k))d.hasNavigatorData=!1,k=a.splat(k),q(k,function(a,b){r.name="Navigator "+(y.length+1);h=l(p.navigator.series,{color:e.series[b]&&!e.series[b].options.isInternal&&e.series[b].color||
e.options.colors[b]||e.options.colors[0]},r,a);h.data=a.data;h.data&&(d.hasNavigatorData=!0,y.push(e.initSeries(h)))});this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&E(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);q(b,function(b){E(b,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});E(b,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)});!1!==this.navigatorOptions.adaptToUpdatedData&&
b.xAxis&&E(b,"updatedData",this.updatedDataHandler);E(b,"remove",function(){this.navigatorSeries&&(z(a.series,this.navigatorSeries),this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;a.getExtremes&&(!(b=this.getUnionExtremes(!0))||b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,c=this.getExtremes(),e=c.dataMin,g=c.dataMax,c=c.max-c.min,
f=a.stickToMin,h=a.stickToMax,k=this.options.overscroll,l,m,p=a.series&&a.series[0],q=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(f&&(m=e,l=m+c),h&&(l=g+k,f||(m=Math.max(l-c,p&&p.xData?p.xData[0]:-Number.MAX_VALUE))),q&&(f||h)&&b(m)&&(this.min=this.userMin=m,this.max=this.userMax=l));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,c=this.navigatorSeries;a.stickToMax=Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=
b(this.xAxis.min)&&this.xAxis.min<=this.xData[0]&&(!this.chart.fixedRange||!a.stickToMax);c&&!a.hasNavigatorData&&(c.options.pointStart=this.xData[0],c.setData(this.options.data,!1,null,!1))},addChartEvents:function(){E(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,b.max)})},destroy:function(){this.removeEvents();this.xAxis&&(z(this.chart.xAxis,this.xAxis),z(this.chart.axes,this.xAxis));
this.yAxis&&(z(this.chart.yAxis,this.yAxis),z(this.chart.axes,this.yAxis));q(this.series||[],function(a){a.destroy&&a.destroy()});q("series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" "),function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);q([this.handles],function(a){t(a)},this)}};a.Navigator=F;y(G.prototype,"zoom",function(a,b,c){var d=this.chart,e=d.options,g=e.chart.zoomType,f=e.navigator,e=e.rangeSelector,
h;this.isXAxis&&(f&&f.enabled||e&&e.enabled)&&("x"===g?d.resetZoomButton="blocked":"y"===g?h=!1:"xy"===g&&this.options.range&&(d=this.previousZoom,x(b)?this.previousZoom=[this.min,this.max]:d&&(b=d[0],c=d[1],delete this.previousZoom)));return void 0!==h?h:a.call(this,b,c)});y(r.prototype,"init",function(a,b,c){E(this,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new F(this)});a.call(this,b,c)});y(r.prototype,"setChartSize",function(a){var b=
this.legend,d=this.navigator,c,e,g,f;a.apply(this,[].slice.call(arguments,1));d&&(e=b&&b.options,g=d.xAxis,f=d.yAxis,c=d.scrollbarHeight,this.inverted?(d.left=d.opposite?this.chartWidth-c-d.height:this.spacing[3]+c,d.top=this.plotTop+c):(d.left=this.plotLeft+c,d.top=d.navigatorOptions.top||this.chartHeight-d.height-c-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(e&&"bottom"===e.verticalAlign&&e.enabled&&!e.floating?b.legendHeight+D(e.margin,10):0)),
g&&f&&(this.inverted?g.options.left=f.options.left=d.left:g.options.top=f.options.top=d.top,g.setAxisSize(),f.setAxisSize()))});y(K.prototype,"addPoint",function(a,b,c,e,g){var d=this.options.turboThreshold;d&&this.xData.length>d&&w(b,!0)&&this.chart.navigator&&k(20,!0);a.call(this,b,c,e,g)});y(r.prototype,"addSeries",function(a,b,c,e){a=a.call(this,b,!1,e);this.navigator&&this.navigator.setBaseSeries(null,!1);D(c,!0)&&this.redraw();return a});y(K.prototype,"update",function(a,b,c){a.call(this,b,
!1);this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1);D(c,!0)&&this.chart.redraw()});r.prototype.callbacks.push(function(a){var b=a.navigator;b&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))})})(L);(function(a){function F(a){this.init(a)}var E=a.addEvent,G=a.Axis,r=a.Chart,h=a.css,p=a.createElement,x=a.dateFormat,t=a.defaultOptions,q=t.global.useUTC,z=a.defined,k=a.destroyObjectProperties,m=a.discardElement,f=a.each,e=a.extend,c=a.fireEvent,b=a.Date,
w=a.isNumber,l=a.merge,D=a.pick,H=a.pInt,C=a.splat,K=a.wrap;e(t,{rangeSelector:{verticalAlign:"top",buttonTheme:{"stroke-width":0,width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0},labelStyle:{color:"#666666"}}});t.lang=l(t.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});F.prototype={clickButton:function(a,b){var c=this,e=c.chart,d=c.buttonOptions[a],g=e.xAxis[0],h=e.scroller&&
e.scroller.getUnionExtremes()||g||{},k=h.dataMin,n=h.dataMax,l,m=g&&Math.round(Math.min(g.max,D(n,g.max))),p=d.type,t,h=d._range,r,y,x,z=d.dataGrouping;if(null!==k&&null!==n){e.fixedRange=h;z&&(this.forcedDataGrouping=!0,G.prototype.setDataGrouping.call(g||{chart:this.chart},z,!1));if("month"===p||"year"===p)g?(p={range:d,max:m,dataMin:k,dataMax:n},l=g.minFromRange.call(p),w(p.newMax)&&(m=p.newMax)):h=d;else if(h)l=Math.max(m-h,k),m=Math.min(l+h,n);else if("ytd"===p)if(g)void 0===n&&(k=Number.MAX_VALUE,
n=Number.MIN_VALUE,f(e.series,function(a){a=a.xData;k=Math.min(a[0],k);n=Math.max(a[a.length-1],n)}),b=!1),m=c.getYTDExtremes(n,k,q),l=r=m.min,m=m.max;else{E(e,"beforeRender",function(){c.clickButton(a)});return}else"all"===p&&g&&(l=k,m=n);l+=d._offsetMin;m+=d._offsetMax;c.setSelected(a);g?g.setExtremes(l,m,D(b,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:d}):(t=C(e.options.xAxis)[0],x=t.range,t.range=h,y=t.min,t.min=r,E(e,"load",function(){t.range=x;t.min=y}))}},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,e=a.options.rangeSelector,g=e.buttons||[].concat(b.defaultButtons),d=e.selected,h=function(){var a=b.minInput,d=b.maxInput;a&&a.blur&&c(a,"blur");d&&d.blur&&c(d,"blur")};b.chart=a;b.options=e;b.buttons=[];a.extraTopMargin=e.height;b.buttonOptions=g;this.unMouseDown=
E(a.container,"mousedown",h);this.unResize=E(a,"resize",h);f(g,b.computeButtonRange);void 0!==d&&g[d]&&this.clickButton(d,!1);E(a,"load",function(){a.xAxis&&a.xAxis[0]&&E(a.xAxis[0],"setExtremes",function(d){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==d.trigger&&"updatedData"!==d.trigger&&b.forcedDataGrouping&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this.chart,b=a.xAxis[0],c=Math.round(b.max-b.min),e=!b.hasVisibleSeries,a=a.scroller&&a.scroller.getUnionExtremes()||
b,d=a.dataMin,h=a.dataMax,a=this.getYTDExtremes(h,d,q),k=a.min,l=a.max,n=this.selected,m=w(n),p=this.options.allButtonsEnabled,t=this.buttons;f(this.buttonOptions,function(a,g){var f=a._range,q=a.type,v=a.count||1,r=t[g],u=0;a=a._offsetMax-a._offsetMin;g=g===n;var y=f>h-d,A=f<b.minRange,w=!1,x=!1,f=f===c;("month"===q||"year"===q)&&c>=864E5*{month:28,year:365}[q]*v+a&&c<=864E5*{month:31,year:366}[q]*v+a?f=!0:"ytd"===q?(f=l-k+a===c,w=!g):"all"===q&&(f=b.max-b.min>=h-d,x=!g&&m&&f);q=!p&&(y||A||x||e);
v=g&&f||f&&!m&&!w;q?u=3:v&&(m=!0,u=2);r.state!==u&&r.setState(u)})},computeButtonRange:function(a){var b=a.type,c=a.count||1,e={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(e[b])a._range=e[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c;a._offsetMin=D(a.offsetMin,0);a._offsetMax=D(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,e=this[a+"Input"];z(b)&&(e.previousValue=e.HCTime,
e.HCTime=b);e.value=x(c.inputEditDateFormat||"%Y-%m-%d",e.HCTime);this[a+"DateBox"].attr({text:x(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(a){function b(){var a=r.value,b=(k.inputDateParser||
Date.parse)(a),d=f.xAxis[0],e=f.scroller&&f.scroller.xAxis?f.scroller.xAxis:d,g=e.dataMin,e=e.dataMax;b!==r.previousValue&&(r.previousValue=b,w(b)||(b=a.split("-"),b=Date.UTC(H(b[0]),H(b[1])-1,H(b[2]))),w(b)&&(q||(b+=6E4*(new Date).getTimezoneOffset()),n?b>c.maxInput.HCTime?b=void 0:b<g&&(b=g):b<c.minInput.HCTime?b=void 0:b>e&&(b=e),void 0!==b&&d.setExtremes(n?b:d.min,n?d.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}var c=this,f=c.chart,d=f.renderer.style||{},g=f.renderer,k=f.options.rangeSelector,
m=c.div,n="min"===a,r,x,z=this.inputGroup;this[a+"Label"]=x=g.label(t.lang[n?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(z);z.offset+=x.width+5;this[a+"DateBox"]=g=g.label("",z.offset).addClass("highcharts-range-input").attr({padding:2,width:k.inputBoxWidth||90,height:k.inputBoxHeight||17,stroke:k.inputBoxBorderColor||"#cccccc","stroke-width":1,"text-align":"center"}).on("click",function(){c.showInput(a);c[a+"Input"].focus()}).add(z);
z.offset+=g.width+(n?10:0);this[a+"Input"]=r=p("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:f.plotTop+"px"},m);x.css(l(d,k.labelStyle));g.css(l({color:"#333333"},d,k.inputStyle));h(r,e({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:d.fontSize,fontFamily:d.fontFamily,top:"-9999em"},k.inputStyle));r.onfocus=function(){c.showInput(a)};r.onblur=function(){c.hideInput(a)};r.onchange=b;r.onkeypress=function(a){13===a.keyCode&&b()}},
getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a="top"===b.verticalAlign?a.plotTop-a.axisOffset[0]:0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}},getYTDExtremes:function(a,c,e){var f=new b(a),d=f[b.hcGetFullYear]();e=e?b.UTC(d,0,1):+new b(d,0,1);c=Math.max(c||0,e);f=f.getTime();return{max:Math.min(a||f,f),min:c}},render:function(a,b){var c=this,e=c.chart,d=e.renderer,g=e.container,h=e.options,k=h.exporting&&!1!==h.exporting.enabled&&h.navigation&&h.navigation.buttonOptions,
n=t.lang,l=c.div,m=h.rangeSelector,h=m.floating,q=c.buttons,l=c.inputGroup,r=m.buttonTheme,w=m.buttonPosition,x=m.inputPosition,y=m.inputEnabled,z=r&&r.states,C=e.plotLeft,E,F=c.buttonGroup,G;G=c.rendered;var H=c.options.verticalAlign,K=e.legend,L=K&&K.options,Y=w.y,X=x.y,Q=G||!1,T=0,U=0,V;if(!1!==m.enabled){G||(c.group=G=d.g("range-selector-group").attr({zIndex:7}).add(),c.buttonGroup=F=d.g("range-selector-buttons").add(G),c.zoomText=d.text(n.rangeSelectorZoom,D(C+w.x,C),15).css(m.labelStyle).add(F),
E=D(C+w.x,C)+c.zoomText.getBBox().width+5,f(c.buttonOptions,function(a,b){q[b]=d.button(a.text,E,0,function(){var d=a.events&&a.events.click,e;d&&(e=d.call(a));!1!==e&&c.clickButton(b);c.isActive=!0},r,z&&z.hover,z&&z.select,z&&z.disabled).attr({"text-align":"center"}).add(F);E+=q[b].width+D(m.buttonSpacing,5)}),!1!==y&&(c.div=l=p("div",null,{position:"relative",height:0,zIndex:1}),g.parentNode.insertBefore(l,g),c.inputGroup=l=d.g("input-group").add(G),l.offset=0,c.drawInput("min"),c.drawInput("max")));
C=e.plotLeft-e.spacing[3];c.updateButtonStates();k&&this.titleCollision(e)&&"top"===H&&"right"===w.align&&w.y+F.getBBox().height-12<(k.y||0)+k.height&&(T=-40);"left"===w.align?V=w.x-e.spacing[3]:"right"===w.align&&(V=w.x+T-e.spacing[1]);F.align({y:w.y,width:F.getBBox().width,align:w.align,x:V},!0,e.spacingBox);c.group.placed=Q;c.buttonGroup.placed=Q;!1!==y&&(T=k&&this.titleCollision(e)&&"top"===H&&"right"===x.align&&x.y-l.getBBox().height-12<(k.y||0)+k.height+e.spacing[0]?-40:0,"left"===x.align?V=
C:"right"===x.align&&(V=-Math.max(e.axisOffset[1],-T)),l.align({y:x.y,width:l.getBBox().width,align:x.align,x:x.x+V-2},!0,e.spacingBox),g=l.alignAttr.translateX+l.alignOptions.x-T+l.getBBox().x+2,k=l.alignOptions.width,n=F.alignAttr.translateX+F.getBBox().x,V=F.getBBox().width+20,(x.align===w.align||n+V>g&&g+k>n&&Y<X+l.getBBox().height)&&l.attr({translateX:l.alignAttr.translateX+(e.axisOffset[1]>=-T?0:-T),translateY:l.alignAttr.translateY+F.getBBox().height+10}),c.setInputValue("min",a),c.setInputValue("max",
b),c.inputGroup.placed=Q);c.group.align({verticalAlign:H},!0,e.spacingBox);a=c.group.getBBox().height+20;b=c.group.alignAttr.translateY;"bottom"===H&&(K=L&&"bottom"===L.verticalAlign&&L.enabled&&!L.floating?K.legendHeight+D(L.margin,10):0,a=a+K-20,U=b-a-(h?0:m.y)-10);if("top"===H)h&&(U=0),e.titleOffset&&(U=e.titleOffset+e.options.title.margin),U+=e.margin[0]-e.spacing[0]||0;else if("middle"===H)if(X===Y)U=0>X?b+void 0:b;else if(X||Y)U=0>X||0>Y?U-Math.min(X,Y):b-a+NaN;c.group.translate(m.x,m.y+Math.floor(U));
!1!==y&&(c.minInput.style.marginTop=c.group.translateY+"px",c.maxInput.style.marginTop=c.group.translateY+"px");c.rendered=!0}},getHeight:function(){var a=this.options,b=this.group,c=a.y,e=a.buttonPosition.y,a=a.inputPosition.y,b=b?b.getBBox(!0).height+13+c:0,c=Math.min(a,e);if(0>a&&0>e||0<a&&0<e)b+=Math.abs(c);return b},titleCollision:function(a){return!(a.options.title.text||a.options.subtitle.text)},update:function(a){var b=this.chart;l(!0,b.options.rangeSelector,a);this.destroy();this.init(b);
b.rangeSelector.render()},destroy:function(){var b=this,c=b.minInput,e=b.maxInput;b.unMouseDown();b.unResize();k(b.buttons);c&&(c.onfocus=c.onblur=c.onchange=null);e&&(e.onfocus=e.onblur=e.onchange=null);a.objectEach(b,function(a,c){a&&"chart"!==c&&(a.destroy?a.destroy():a.nodeType&&m(this[c]));a!==F.prototype[c]&&(b[c]=null)},this)}};G.prototype.toFixedRange=function(a,b,c,e){var d=this.chart&&this.chart.fixedRange;a=D(c,this.translate(a,!0,!this.horiz));b=D(e,this.translate(b,!0,!this.horiz));c=
d&&(b-a)/d;.7<c&&1.3>c&&(e?a=b-d:b=a+d);w(a)||(a=b=void 0);return{min:a,max:b}};G.prototype.minFromRange=function(){var a=this.range,b={month:"Month",year:"FullYear"}[a.type],c,e=this.max,d,f,h=function(a,c){var d=new Date(a),e=d["get"+b]();d["set"+b](e+c);e===d["get"+b]()&&d.setDate(0);return d.getTime()-a};w(a)?(c=e-a,f=a):(c=e+h(e,-a.count),this.chart&&(this.chart.fixedRange=e-c));d=D(this.dataMin,Number.MIN_VALUE);w(c)||(c=d);c<=d&&(c=d,void 0===f&&(f=h(c,a.count)),this.newMax=Math.min(c+f,this.dataMax));
w(e)||(c=void 0);return c};K(r.prototype,"init",function(a,b,c){E(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new F(this))});a.call(this,b,c)});K(r.prototype,"render",function(a,b,c){var e=this.axes,d=this.rangeSelector;d&&(f(e,function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),d.render(),e=d.options.verticalAlign,d.options.floating||("bottom"===e?this.extraBottomMargin=!0:"middle"!==e&&(this.extraTopMargin=!0)));a.call(this,b,c)});K(r.prototype,"update",
function(b,c,e,f){var d=this.rangeSelector,g;this.extraTopMargin=this.extraBottomMargin=!1;d&&(d.render(),g=c.rangeSelector&&c.rangeSelector.verticalAlign||d.options&&d.options.verticalAlign,d.options.floating||("bottom"===g?this.extraBottomMargin=!0:"middle"!==g&&(this.extraTopMargin=!0)));b.call(this,a.merge(!0,c,{chart:{marginBottom:D(c.chart&&c.chart.marginBottom,this.margin.bottom),spacingBottom:D(c.chart&&c.chart.spacingBottom,this.spacing.bottom)}}),e,f)});K(r.prototype,"redraw",function(a,
b,c){var e=this.rangeSelector;e&&!e.options.floating&&(e.render(),e=e.options.verticalAlign,"bottom"===e?this.extraBottomMargin=!0:"middle"!==e&&(this.extraTopMargin=!0));a.call(this,b,c)});r.prototype.adjustPlotArea=function(){var a=this.rangeSelector;this.rangeSelector&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))};r.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();w(c.min)&&e.render(c.min,c.max)}var c,e=a.rangeSelector,
d,f;e&&(f=E(a.xAxis[0],"afterSetExtremes",function(a){e.render(a.min,a.max)}),d=E(a,"redraw",b),b());E(a,"destroy",function(){e&&(d(),f())})});a.RangeSelector=F})(L);(function(a){var F=a.arrayMax,E=a.arrayMin,G=a.Axis,r=a.Chart,h=a.defined,p=a.each,x=a.extend,t=a.format,q=a.grep,z=a.inArray,k=a.isNumber,m=a.isString,f=a.map,e=a.merge,c=a.pick,b=a.Point,w=a.Renderer,l=a.Series,D=a.splat,H=a.SVGRenderer,C=a.VMLRenderer,K=a.wrap,g=l.prototype,y=g.init,J=g.processData,A=b.prototype.tooltipFormatter;a.StockChart=
a.stockChart=function(b,g,h){var d=m(b)||b.nodeName,k=arguments[d?1:0],l=k.series,p=a.getOptions(),q,t=c(k.navigator&&k.navigator.enabled,p.navigator.enabled,!0),v=t?{startOnTick:!1,endOnTick:!1}:null,w={marker:{enabled:!1,radius:2}},x={shadow:!1,borderWidth:0};k.xAxis=f(D(k.xAxis||{}),function(a){return e({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},p.xAxis,a,{type:"datetime",categories:null},v)});k.yAxis=f(D(k.yAxis||{}),function(a){q=
c(a.opposite,!0);return e({labels:{y:-2},opposite:q,showLastLabel:!1,title:{text:null}},p.yAxis,a)});k.series=null;k=e({chart:{panning:!0,pinchType:"x"},navigator:{enabled:t},scrollbar:{enabled:c(p.scrollbar.enabled,!0)},rangeSelector:{enabled:c(p.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:!0,crosshairs:!0},legend:{enabled:!1},plotOptions:{line:w,spline:w,area:w,areaspline:w,arearange:w,areasplinerange:w,column:x,columnrange:x,candlestick:x,ohlc:x}},k,{isStock:!0});k.series=l;return d?
new r(b,k,h):new r(k,g)};K(G.prototype,"autoLabelAlign",function(a){var b=this.chart,c=this.options,b=b._labelPanes=b._labelPanes||{},d=this.options.labels;return this.chart.options.isStock&&"yAxis"===this.coll&&(c=c.top+","+c.height,!b[c]&&d.enabled)?(15===d.x&&(d.x=0),void 0===d.align&&(d.align="right"),b[c]=this,"right"):a.apply(this,[].slice.call(arguments,1))});K(G.prototype,"destroy",function(a){var b=this.chart,c=this.options&&this.options.top+","+this.options.height;c&&b._labelPanes&&b._labelPanes[c]===
this&&delete b._labelPanes[c];return a.apply(this,Array.prototype.slice.call(arguments,1))});K(G.prototype,"getPlotLinePath",function(b,e,g,l,n,q){var d=this,t=this.isLinked&&!this.series?this.linkedParent.series:this.series,r=d.chart,u=r.renderer,v=d.left,w=d.top,x,y,A,B,C=[],D=[],E,F;if("xAxis"!==d.coll&&"yAxis"!==d.coll)return b.apply(this,[].slice.call(arguments,1));D=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=d.options[b];return k(a)?[r[b][a]]:m(a)?[r.get(a)]:f(t,function(a){return a[b]})}(d.coll);
p(d.isXAxis?r.yAxis:r.xAxis,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])?r[b][a.options[b]]:r[b][0];d===b&&D.push(a)}});E=D.length?[]:[d.isXAxis?r.yAxis[0]:r.xAxis[0]];p(D,function(b){-1!==z(b,E)||a.find(E,function(a){return a.pos===b.pos&&a.len&&b.len})||E.push(b)});F=c(q,d.translate(e,null,null,l));k(F)&&(d.horiz?p(E,function(a){var b;y=a.pos;B=y+a.len;x=A=Math.round(F+d.transB);if(x<v||x>v+d.width)n?x=A=Math.min(Math.max(v,
x),v+d.width):b=!0;b||C.push("M",x,y,"L",A,B)}):p(E,function(a){var b;x=a.pos;A=x+a.len;y=B=Math.round(w+d.height-F);if(y<w||y>w+d.height)n?y=B=Math.min(Math.max(w,y),d.top+d.height):b=!0;b||C.push("M",x,y,"L",A,B)}));return 0<C.length?u.crispPolyLine(C,g||1):null});H.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};w===C&&(C.prototype.crispPolyLine=H.prototype.crispPolyLine);
K(G.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});K(G.prototype,"drawCrosshair",function(a,b,e){var d,f;a.call(this,b,e);if(h(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){a=this.chart;var g=this.options.crosshair.label,k=this.horiz;d=this.opposite;f=this.left;var l=this.top,m=this.crossLabel,p,q=g.format,r="",v="inside"===this.options.tickPosition,w=!1!==this.crosshair.snap,y=0;b||(b=this.cross&&this.cross.e);
p=k?"center":d?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";m||(m=this.crossLabel=a.renderer.label(null,null,null,g.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:g.align||p,padding:c(g.padding,8),r:c(g.borderRadius,3),zIndex:2}).add(this.labelGroup),m.attr({fill:g.backgroundColor||this.series[0]&&this.series[0].color||"#666666",stroke:g.borderColor||"","stroke-width":g.borderWidth||
0}).css(x({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},g.style)));k?(p=w?e.plotX+f:b.chartX,l+=d?0:this.height):(p=d?this.width+f:0,l=w?e.plotY+l:b.chartY);q||g.formatter||(this.isDatetimeAxis&&(r="%b %d, %Y"),q="{value"+(r?":"+r:"")+"}");b=w?e[this.isXAxis?"x":"y"]:this.toValue(k?b.chartX:b.chartY);m.attr({text:q?t(q,{value:b}):g.formatter.call(this,b),x:p,y:l,visibility:"visible"});b=m.getBBox();if(k){if(v&&!d||!v&&d)l=m.y-b.height}else l=m.y-b.height/2;k?(d=f-b.x,f=
f+this.width-b.x):(d="left"===this.labelAlign?f:0,f="right"===this.labelAlign?f+this.width:a.chartWidth);m.translateX<d&&(y=d-m.translateX);m.translateX+b.width>=f&&(y=-(m.translateX+b.width-f));m.attr({x:p+y,y:l,anchorX:k?p:this.opposite?0:a.chartWidth,anchorY:k?this.opposite?a.chartHeight:0:l+b.height/2})}});g.init=function(){y.apply(this,arguments);this.setCompare(this.options.compare)};g.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,c){var d=this.compareValue;if(void 0!==
b&&void 0!==d)return b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};g.processData=function(){var a,b=-1,c,e,f=!0===this.options.compareStart?0:1,g,h;J.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,e=this.processedYData,g=e.length,this.pointArrayMap&&(b=z("close",this.pointArrayMap),-1===b&&(b=z(this.pointValKey||"y",this.pointArrayMap))),a=0;a<g-f;a++)if(h=
e[a]&&-1<b?e[a][b]:e[a],k(h)&&c[a+f]>=this.xAxis.min&&0!==h){this.compareValue=h;break}};K(g,"getExtremes",function(a){var b;a.apply(this,[].slice.call(arguments,1));this.modifyValue&&(b=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)],this.dataMin=E(b),this.dataMax=F(b))});G.prototype.setCompare=function(a,b){this.isXAxis||(p(this.series,function(b){b.setCompare(a)}),c(b,!0)&&this.chart.redraw())};b.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",(0<this.change?
"+":"")+a.numberFormat(this.change,c(this.series.tooltipOptions.changeDecimals,2)));return A.apply(this,[b])};K(l.prototype,"render",function(a){this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(!this.clipBox&&this.animate?(this.clipBox=e(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len):this.chart[this.sharedClipKey]?this.chart[this.sharedClipKey].attr({width:this.xAxis.len,height:this.yAxis.len}):this.clipBox&&(this.clipBox.width=
this.xAxis.len,this.clipBox.height=this.yAxis.len));a.call(this)});K(r.prototype,"getSelectedPoints",function(a){var b=a.call(this);p(this.series,function(a){a.hasGroupedData&&(b=b.concat(q(a.points||[],function(a){return a.selected})))});return b});K(r.prototype,"update",function(a,b){"scrollbar"in b&&this.navigator&&(e(!0,this.options.scrollbar,b.scrollbar),this.navigator.update({},!1),delete b.scrollbar);return a.apply(this,Array.prototype.slice.call(arguments,1))})})(L);return L});
