/*
 Highstock JS v5.0.3 (2016-11-18)

 (c) 2009-2016 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(N,a){"object"===typeof module&&module.exports?module.exports=N.document?a(N):a:N.Highcharts=a(N)})("undefined"!==typeof window?window:this,function(N){N=function(){var a=window,D=a.document,B=a.navigator&&a.navigator.userAgent||"",G=D&&D.createElementNS&&!!D.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,H=/(edge|msie|trident)/i.test(B)&&!window.opera,p=!G,l=/Firefox/.test(B),r=l&&4>parseInt(B.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highstock",
version:"5.0.3",deg2rad:2*Math.PI/360,doc:D,hasBidiBug:r,hasTouch:D&&void 0!==D.documentElement.ontouchstart,isMS:H,isWebKit:/AppleWebKit/.test(B),isFirefox:l,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(B),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:G,vml:p,win:a,charts:[],marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){}}}();(function(a){var D=[],B=a.charts,G=a.doc,H=a.win;a.error=function(a,l){a="Highcharts error #"+
a+": www.highcharts.com/errors/"+a;if(l)throw Error(a);H.console&&console.log(a)};a.Fx=function(a,l,r){this.options=l;this.elem=a;this.prop=r};a.Fx.prototype={dSetter:function(){var a=this.paths[0],l=this.paths[1],r=[],w=this.now,t=a.length,k;if(1===w)r=this.toD;else if(t===l.length&&1>w)for(;t--;)k=parseFloat(a[t]),r[t]=isNaN(k)?a[t]:w*parseFloat(l[t]-k)+k;else r=l;this.elem.attr("d",r)},update:function(){var a=this.elem,l=this.prop,r=this.now,w=this.options.step;if(this[l+"Setter"])this[l+"Setter"]();
else a.attr?a.element&&a.attr(l,r):a.style[l]=r+this.unit;w&&w.call(a,r,this)},run:function(a,l,r){var p=this,t=function(a){return t.stopped?!1:p.step(a)},k;this.startTime=+new Date;this.start=a;this.end=l;this.unit=r;this.now=this.start;this.pos=0;t.elem=this.elem;t()&&1===D.push(t)&&(t.timerId=setInterval(function(){for(k=0;k<D.length;k++)D[k]()||D.splice(k--,1);D.length||clearInterval(t.timerId)},13))},step:function(a){var l=+new Date,p,w=this.options;p=this.elem;var t=w.complete,k=w.duration,
m=w.curAnim,e;if(p.attr&&!p.element)p=!1;else if(a||l>=k+this.startTime){this.now=this.end;this.pos=1;this.update();a=m[this.prop]=!0;for(e in m)!0!==m[e]&&(a=!1);a&&t&&t.call(p);p=!1}else this.pos=w.easing((l-this.startTime)/k),this.now=this.start+(this.end-this.start)*this.pos,this.update(),p=!0;return p},initPath:function(p,l,r){function w(a){for(b=a.length;b--;)"M"!==a[b]&&"L"!==a[b]||a.splice(b+1,0,a[b+1],a[b+2],a[b+1],a[b+2])}function t(a,c){for(;a.length<f;){a[0]=c[f-a.length];var d=a.slice(0,
C);[].splice.apply(a,[0,0].concat(d));q&&(d=a.slice(a.length-C),[].splice.apply(a,[a.length,0].concat(d)),b--)}a[0]="M"}function k(a,c){for(var b=(f-a.length)/C;0<b&&b--;)d=a.slice().splice(a.length/E-C,C*E),d[0]=c[f-C-b*C],h&&(d[C-6]=d[C-2],d[C-5]=d[C-1]),[].splice.apply(a,[a.length/E,0].concat(d)),q&&b--}l=l||"";var m,e=p.startX,g=p.endX,h=-1<l.indexOf("C"),C=h?7:3,f,d,b;l=l.split(" ");r=r.slice();var q=p.isArea,E=q?2:1,c;h&&(w(l),w(r));if(e&&g){for(b=0;b<e.length;b++)if(e[b]===g[0]){m=b;break}else if(e[0]===
g[g.length-e.length+b]){m=b;c=!0;break}void 0===m&&(l=[])}l.length&&a.isNumber(m)&&(f=r.length+m*E*C,c?(t(l,r),k(r,l)):(t(r,l),k(l,r)));return[l,r]}};a.extend=function(a,l){var p;a||(a={});for(p in l)a[p]=l[p];return a};a.merge=function(){var p,l=arguments,r,w={},t=function(k,m){var e,g;"object"!==typeof k&&(k={});for(g in m)m.hasOwnProperty(g)&&(e=m[g],a.isObject(e,!0)&&"renderTo"!==g&&"number"!==typeof e.nodeType?k[g]=t(k[g]||{},e):k[g]=m[g]);return k};!0===l[0]&&(w=l[1],l=Array.prototype.slice.call(l,
2));r=l.length;for(p=0;p<r;p++)w=t(w,l[p]);return w};a.pInt=function(a,l){return parseInt(a,l||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(p,l){return p&&"object"===typeof p&&(!l||!a.isArray(p))};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=function(a,l){for(var p=a.length;p--;)if(a[p]===l){a.splice(p,1);break}};a.defined=function(a){return void 0!==
a&&null!==a};a.attr=function(p,l,r){var w,t;if(a.isString(l))a.defined(r)?p.setAttribute(l,r):p&&p.getAttribute&&(t=p.getAttribute(l));else if(a.defined(l)&&a.isObject(l))for(w in l)p.setAttribute(w,l[w]);return t};a.splat=function(p){return a.isArray(p)?p:[p]};a.syncTimeout=function(a,l,r){if(l)return setTimeout(a,l,r);a.call(0,r)};a.pick=function(){var a=arguments,l,r,w=a.length;for(l=0;l<w;l++)if(r=a[l],void 0!==r&&null!==r)return r};a.css=function(p,l){a.isMS&&!a.svg&&l&&void 0!==l.opacity&&(l.filter=
"alpha(opacity\x3d"+100*l.opacity+")");a.extend(p.style,l)};a.createElement=function(p,l,r,w,t){p=G.createElement(p);var k=a.css;l&&a.extend(p,l);t&&k(p,{padding:0,border:"none",margin:0});r&&k(p,r);w&&w.appendChild(p);return p};a.extendClass=function(p,l){var r=function(){};r.prototype=new p;a.extend(r.prototype,l);return r};a.pad=function(a,l,r){return Array((l||2)+1-String(a).length).join(r||0)+a};a.relativeLength=function(a,l){return/%$/.test(a)?l*parseFloat(a)/100:parseFloat(a)};a.wrap=function(a,
l,r){var p=a[l];a[l]=function(){var a=Array.prototype.slice.call(arguments),k=arguments,m=this;m.proceed=function(){p.apply(m,arguments.length?arguments:k)};a.unshift(p);a=r.apply(this,a);m.proceed=null;return a}};a.getTZOffset=function(p){var l=a.Date;return 6E4*(l.hcGetTimezoneOffset&&l.hcGetTimezoneOffset(p)||l.hcTimezoneOffset||0)};a.dateFormat=function(p,l,r){if(!a.defined(l)||isNaN(l))return a.defaultOptions.lang.invalidDate||"";p=a.pick(p,"%Y-%m-%d %H:%M:%S");var w=a.Date,t=new w(l-a.getTZOffset(l)),
k,m=t[w.hcGetHours](),e=t[w.hcGetDay](),g=t[w.hcGetDate](),h=t[w.hcGetMonth](),C=t[w.hcGetFullYear](),f=a.defaultOptions.lang,d=f.weekdays,b=f.shortWeekdays,q=a.pad,w=a.extend({a:b?b[e]:d[e].substr(0,3),A:d[e],d:q(g),e:q(g,2," "),w:e,b:f.shortMonths[h],B:f.months[h],m:q(h+1),y:C.toString().substr(2,2),Y:C,H:q(m),k:m,I:q(m%12||12),l:m%12||12,M:q(t[w.hcGetMinutes]()),p:12>m?"AM":"PM",P:12>m?"am":"pm",S:q(t.getSeconds()),L:q(Math.round(l%1E3),3)},a.dateFormats);for(k in w)for(;-1!==p.indexOf("%"+k);)p=
p.replace("%"+k,"function"===typeof w[k]?w[k](l):w[k]);return r?p.substr(0,1).toUpperCase()+p.substr(1):p};a.formatSingle=function(p,l){var r=/\.([0-9])/,w=a.defaultOptions.lang;/f$/.test(p)?(r=(r=p.match(r))?r[1]:-1,null!==l&&(l=a.numberFormat(l,r,w.decimalPoint,-1<p.indexOf(",")?w.thousandsSep:""))):l=a.dateFormat(p,l);return l};a.format=function(p,l){for(var r="{",w=!1,t,k,m,e,g=[],h;p;){r=p.indexOf(r);if(-1===r)break;t=p.slice(0,r);if(w){t=t.split(":");k=t.shift().split(".");e=k.length;h=l;for(m=
0;m<e;m++)h=h[k[m]];t.length&&(h=a.formatSingle(t.join(":"),h));g.push(h)}else g.push(t);p=p.slice(r+1);r=(w=!w)?"}":"{"}g.push(p);return g.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(p,l,r,w,t){var k,m=p;r=a.pick(r,1);k=p/r;l||(l=t?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===w&&(1===r?l=a.grep(l,function(a){return 0===a%1}):.1>=r&&(l=[1/r])));for(w=0;w<l.length&&!(m=l[w],t&&m*r>=p||!t&&k<=(l[w]+(l[w+1]||l[w]))/
2);w++);return m*r};a.stableSort=function(a,l){var r=a.length,p,t;for(t=0;t<r;t++)a[t].safeI=t;a.sort(function(a,m){p=l(a,m);return 0===p?a.safeI-m.safeI:p});for(t=0;t<r;t++)delete a[t].safeI};a.arrayMin=function(a){for(var l=a.length,r=a[0];l--;)a[l]<r&&(r=a[l]);return r};a.arrayMax=function(a){for(var l=a.length,r=a[0];l--;)a[l]>r&&(r=a[l]);return r};a.destroyObjectProperties=function(a,l){for(var r in a)a[r]&&a[r]!==l&&a[r].destroy&&a[r].destroy(),delete a[r]};a.discardElement=function(p){var l=
a.garbageBin;l||(l=a.createElement("div"));p&&l.appendChild(p);l.innerHTML=""};a.correctFloat=function(a,l){return parseFloat(a.toPrecision(l||14))};a.setAnimation=function(p,l){l.renderer.globalAnimation=a.pick(p,l.options.chart.animation,!0)};a.animObject=function(p){return a.isObject(p)?a.merge(p):{duration:p?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(p,l,r,w){p=+p||0;l=+l;var t=a.defaultOptions.lang,
k=(p.toString().split(".")[1]||"").length,m,e,g=Math.abs(p);-1===l?l=Math.min(k,20):a.isNumber(l)||(l=2);m=String(a.pInt(g.toFixed(l)));e=3<m.length?m.length%3:0;r=a.pick(r,t.decimalPoint);w=a.pick(w,t.thousandsSep);p=(0>p?"-":"")+(e?m.substr(0,e)+w:"");p+=m.substr(e).replace(/(\d{3})(?=\d)/g,"$1"+w);l&&(w=Math.abs(g-m+Math.pow(10,-Math.max(l,k)-1)),p+=r+w.toFixed(l).slice(2));return p};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(p,l){return"width"===l?Math.min(p.offsetWidth,
p.scrollWidth)-a.getStyle(p,"padding-left")-a.getStyle(p,"padding-right"):"height"===l?Math.min(p.offsetHeight,p.scrollHeight)-a.getStyle(p,"padding-top")-a.getStyle(p,"padding-bottom"):(p=H.getComputedStyle(p,void 0))&&a.pInt(p.getPropertyValue(l))};a.inArray=function(a,l){return l.indexOf?l.indexOf(a):[].indexOf.call(l,a)};a.grep=function(a,l){return[].filter.call(a,l)};a.map=function(a,l){for(var r=[],p=0,t=a.length;p<t;p++)r[p]=l.call(a[p],a[p],p,a);return r};a.offset=function(a){var l=G.documentElement;
a=a.getBoundingClientRect();return{top:a.top+(H.pageYOffset||l.scrollTop)-(l.clientTop||0),left:a.left+(H.pageXOffset||l.scrollLeft)-(l.clientLeft||0)}};a.stop=function(a){for(var l=D.length;l--;)D[l].elem===a&&(D[l].stopped=!0)};a.each=function(a,l,r){return Array.prototype.forEach.call(a,l,r)};a.addEvent=function(p,l,r){function w(a){a.target=a.srcElement||H;r.call(p,a)}var t=p.hcEvents=p.hcEvents||{};p.addEventListener?p.addEventListener(l,r,!1):p.attachEvent&&(p.hcEventsIE||(p.hcEventsIE={}),
p.hcEventsIE[r.toString()]=w,p.attachEvent("on"+l,w));t[l]||(t[l]=[]);t[l].push(r);return function(){a.removeEvent(p,l,r)}};a.removeEvent=function(p,l,r){function w(a,e){p.removeEventListener?p.removeEventListener(a,e,!1):p.attachEvent&&(e=p.hcEventsIE[e.toString()],p.detachEvent("on"+a,e))}function t(){var a,e;if(p.nodeName)for(e in l?(a={},a[l]=!0):a=m,a)if(m[e])for(a=m[e].length;a--;)w(e,m[e][a])}var k,m=p.hcEvents,e;m&&(l?(k=m[l]||[],r?(e=a.inArray(r,k),-1<e&&(k.splice(e,1),m[l]=k),w(l,r)):(t(),
m[l]=[])):(t(),p.hcEvents={}))};a.fireEvent=function(p,l,r,w){var t;t=p.hcEvents;var k,m;r=r||{};if(G.createEvent&&(p.dispatchEvent||p.fireEvent))t=G.createEvent("Events"),t.initEvent(l,!0,!0),a.extend(t,r),p.dispatchEvent?p.dispatchEvent(t):p.fireEvent(l,t);else if(t)for(t=t[l]||[],k=t.length,r.target||a.extend(r,{preventDefault:function(){r.defaultPrevented=!0},target:p,type:l}),l=0;l<k;l++)(m=t[l])&&!1===m.call(p,r)&&r.preventDefault();w&&!r.defaultPrevented&&w(r)};a.animate=function(p,l,r){var w,
t="",k,m,e;a.isObject(r)||(w=arguments,r={duration:w[2],easing:w[3],complete:w[4]});a.isNumber(r.duration)||(r.duration=400);r.easing="function"===typeof r.easing?r.easing:Math[r.easing]||Math.easeInOutSine;r.curAnim=a.merge(l);for(e in l)m=new a.Fx(p,r,e),k=null,"d"===e?(m.paths=m.initPath(p,p.d,l.d),m.toD=l.d,w=0,k=1):p.attr?w=p.attr(e):(w=parseFloat(a.getStyle(p,e))||0,"opacity"!==e&&(t="px")),k||(k=l[e]),k.match&&k.match("px")&&(k=k.replace(/px/g,"")),m.run(w,k,t)};a.seriesType=function(p,l,r,
w,t){var k=a.getOptions(),m=a.seriesTypes;k.plotOptions[p]=a.merge(k.plotOptions[l],r);m[p]=a.extendClass(m[l]||function(){},w);m[p].prototype.type=p;t&&(m[p].prototype.pointClass=a.extendClass(a.Point,t));return m[p]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),l=0;return function(){return"highcharts-"+a+"-"+l++}}();H.jQuery&&(H.jQuery.fn.highcharts=function(){var p=[].slice.call(arguments);if(this[0])return p[0]?(new (a[a.isString(p[0])?p.shift():"Chart"])(this[0],p[0],
p[1]),this):B[a.attr(this[0],"data-highcharts-chart")]});G&&!G.defaultView&&(a.getStyle=function(p,l){var r={width:"clientWidth",height:"clientHeight"}[l];if(p.style[l])return a.pInt(p.style[l]);"opacity"===l&&(l="filter");if(r)return p.style.zoom=1,Math.max(p[r]-2*a.getStyle(p,"padding"),0);p=p.currentStyle[l.replace(/\-(\w)/g,function(a,l){return l.toUpperCase()})];"filter"===l&&(p=p.replace(/alpha\(opacity=([0-9]+)\)/,function(a,l){return l/100}));return""===p?1:a.pInt(p)});Array.prototype.forEach||
(a.each=function(a,l,r){for(var p=0,t=a.length;p<t;p++)if(!1===l.call(r,a[p],p,a))return p});Array.prototype.indexOf||(a.inArray=function(a,l){var r,p=0;if(l)for(r=l.length;p<r;p++)if(l[p]===a)return p;return-1});Array.prototype.filter||(a.grep=function(a,l){for(var r=[],p=0,t=a.length;p<t;p++)l(a[p],p)&&r.push(a[p]);return r})})(N);(function(a){var D=a.each,B=a.isNumber,G=a.map,H=a.merge,p=a.pInt;a.Color=function(l){if(!(this instanceof a.Color))return new a.Color(l);this.init(l)};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[p(a[1]),p(a[2]),p(a[3]),parseFloat(a[4],10)]}},{regex:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(a){return[p(a[1],16),p(a[2],16),p(a[3],16),1]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(a){return[p(a[1]),p(a[2]),p(a[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(l){var r,p,t,
k;if((this.input=l=this.names[l]||l)&&l.stops)this.stops=G(l.stops,function(m){return new a.Color(m[1])});else for(t=this.parsers.length;t--&&!p;)k=this.parsers[t],(r=k.regex.exec(l))&&(p=k.parse(r));this.rgba=p||[]},get:function(a){var l=this.input,p=this.rgba,t;this.stops?(t=H(l),t.stops=[].concat(t.stops),D(this.stops,function(k,m){t.stops[m]=[t.stops[m][0],k.get(a)]})):t=p&&B(p[0])?"rgb"===a||!a&&1===p[3]?"rgb("+p[0]+","+p[1]+","+p[2]+")":"a"===a?p[3]:"rgba("+p.join(",")+")":l;return t},brighten:function(a){var l,
w=this.rgba;if(this.stops)D(this.stops,function(t){t.brighten(a)});else if(B(a)&&0!==a)for(l=0;3>l;l++)w[l]+=p(255*a),0>w[l]&&(w[l]=0),255<w[l]&&(w[l]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this}};a.color=function(l){return new a.Color(l)}})(N);(function(a){var D,B,G=a.addEvent,H=a.animate,p=a.attr,l=a.charts,r=a.color,w=a.css,t=a.createElement,k=a.defined,m=a.deg2rad,e=a.destroyObjectProperties,g=a.doc,h=a.each,C=a.extend,f=a.erase,d=a.grep,b=a.hasTouch,q=a.isArray,E=a.isFirefox,
c=a.isMS,F=a.isObject,n=a.isString,A=a.isWebKit,x=a.merge,J=a.noop,y=a.pick,u=a.pInt,I=a.removeEvent,M=a.stop,v=a.svg,K=a.SVG_NS,O=a.symbolSizes,R=a.win;D=a.SVGElement=function(){return this};D.prototype={opacity:1,SVG_NS:K,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textDecoration textOverflow textOutline".split(" "),init:function(a,c){this.element="span"===c?t(c):g.createElementNS(this.SVG_NS,c);this.renderer=a},animate:function(a,c,v){c=y(c,this.renderer.globalAnimation,
!0);M(this);c?(v&&(c.complete=v),H(this,a,c)):this.attr(a,null,v);return this},colorGradient:function(z,c,v){var L=this.renderer,b,d,n,f,K,e,u,y,g,F,I,A=[],P;z.linearGradient?d="linearGradient":z.radialGradient&&(d="radialGradient");if(d){n=z[d];K=L.gradients;u=z.stops;F=v.radialReference;q(n)&&(z[d]=n={x1:n[0],y1:n[1],x2:n[2],y2:n[3],gradientUnits:"userSpaceOnUse"});"radialGradient"===d&&F&&!k(n.gradientUnits)&&(f=n,n=x(n,L.getRadialAttr(F,f),{gradientUnits:"userSpaceOnUse"}));for(I in n)"id"!==
I&&A.push(I,n[I]);for(I in u)A.push(u[I]);A=A.join(",");K[A]?F=K[A].attr("id"):(n.id=F=a.uniqueKey(),K[A]=e=L.createElement(d).attr(n).add(L.defs),e.radAttr=f,e.stops=[],h(u,function(z){0===z[1].indexOf("rgba")?(b=a.color(z[1]),y=b.get("rgb"),g=b.get("a")):(y=z[1],g=1);z=L.createElement("stop").attr({offset:z[0],"stop-color":y,"stop-opacity":g}).add(e);e.stops.push(z)}));P="url("+L.url+"#"+F+")";v.setAttribute(c,P);v.gradient=A;z.toString=function(){return P}}},applyTextOutline:function(a){var z=
this.element,c,v,b;-1!==a.indexOf("contrast")&&(a=a.replace(/contrast/g,this.renderer.getContrast(z.style.fill)));this.fakeTS=!0;this.ySetter=this.xSetter;c=[].slice.call(z.getElementsByTagName("tspan"));a=a.split(" ");v=a[a.length-1];(b=a[0])&&"none"!==b&&(b=b.replace(/(^[\d\.]+)(.*?)$/g,function(a,z,c){return 2*z+c}),h(c,function(a){"highcharts-text-outline"===a.getAttribute("class")&&f(c,z.removeChild(a))}),this.realBox=z.getBBox(),h(c,function(a,c){0===c&&(a.setAttribute("x",z.getAttribute("x")),
c=z.getAttribute("y"),a.setAttribute("y",c||0),null===c&&z.setAttribute("y",0));a=a.cloneNode(1);p(a,{"class":"highcharts-text-outline",fill:v,stroke:v,"stroke-width":b,"stroke-linejoin":"round"});z.insertBefore(a,z.firstChild)}))},attr:function(a,c,v){var z,L=this.element,b,d=this,n;"string"===typeof a&&void 0!==c&&(z=a,a={},a[z]=c);if("string"===typeof a)d=(this[a+"Getter"]||this._defaultGetter).call(this,a,L);else{for(z in a)c=a[z],n=!1,this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(z)&&
(b||(this.symbolAttr(a),b=!0),n=!0),!this.rotation||"x"!==z&&"y"!==z||(this.doTransform=!0),n||(n=this[z+"Setter"]||this._defaultSetter,n.call(this,c,z,L),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(z)&&this.updateShadows(z,c,n));this.doTransform&&(this.updateTransform(),this.doTransform=!1)}v&&v();return d},updateShadows:function(a,c,v){for(var z=this.shadows,L=z.length;L--;)v.call(z[L],"height"===a?Math.max(c-(z[L].cutHeight||0),0):"d"===a?this.d:c,a,z[L])},addClass:function(a,
c){var z=this.attr("class")||"";-1===z.indexOf(a)&&(c||(a=(z+(z?" ":"")+a).replace("  "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==p(this.element,"class").indexOf(a)},removeClass:function(a){p(this.element,"class",(p(this.element,"class")||"").replace(a,""));return this},symbolAttr:function(a){var z=this;h("x y r start end width height innerR anchorX anchorY".split(" "),function(c){z[c]=y(a[c],z[c])});z.attr({d:z.renderer.symbols[z.symbolName](z.x,z.y,z.width,z.height,
z)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,c){var z,v={},L;c=c||a.strokeWidth||0;L=Math.round(c)%2/2;a.x=Math.floor(a.x||this.x||0)+L;a.y=Math.floor(a.y||this.y||0)+L;a.width=Math.floor((a.width||this.width||0)-2*L);a.height=Math.floor((a.height||this.height||0)-2*L);k(a.strokeWidth)&&(a.strokeWidth=c);for(z in a)this[z]!==a[z]&&(this[z]=v[z]=a[z]);return v},css:function(a){var z=this.styles,b={},n=this.element,d,f,e="";d=
!z;a&&a.color&&(a.fill=a.color);if(z)for(f in a)a[f]!==z[f]&&(b[f]=a[f],d=!0);if(d){d=this.textWidth=a&&a.width&&"text"===n.nodeName.toLowerCase()&&u(a.width)||this.textWidth;z&&(a=C(z,b));this.styles=a;d&&!v&&this.renderer.forExport&&delete a.width;if(c&&!v)w(this.element,a);else{z=function(a,z){return"-"+z.toLowerCase()};for(f in a)e+=f.replace(/([A-Z])/g,z)+":"+a[f]+";";p(n,"style",e)}this.added&&(d&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline))}return this},
strokeWidth:function(){return this["stroke-width"]||0},on:function(a,c){var z=this,v=z.element;b&&"click"===a?(v.ontouchstart=function(a){z.touchEventFired=Date.now();a.preventDefault();c.call(v,a)},v.onclick=function(a){(-1===R.navigator.userAgent.indexOf("Android")||1100<Date.now()-(z.touchEventFired||0))&&c.call(v,a)}):v["on"+a]=c;return this},setRadialReference:function(a){var z=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;z&&z.radAttr&&z.animate(this.renderer.getRadialAttr(a,
z.radAttr));return this},translate:function(a,c){return this.attr({translateX:a,translateY:c})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,c=this.translateY||0,v=this.scaleX,b=this.scaleY,d=this.inverted,n=this.rotation,f=this.element;d&&(a+=this.attr("width"),c+=this.attr("height"));a=["translate("+a+","+c+")"];d?a.push("rotate(90) scale(-1,1)"):n&&a.push("rotate("+n+" "+(f.getAttribute("x")||0)+" "+(f.getAttribute("y")||
0)+")");(k(v)||k(b))&&a.push("scale("+y(v,1)+" "+y(b,1)+")");a.length&&f.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,c,v){var z,b,d,L,e={};b=this.renderer;d=b.alignedObjects;var K,q;if(a){if(this.alignOptions=a,this.alignByTranslate=c,!v||n(v))this.alignTo=z=v||"renderer",f(d,this),d.push(this),v=null}else a=this.alignOptions,c=this.alignByTranslate,z=this.alignTo;v=y(v,b[z],b);z=a.align;b=a.verticalAlign;d=
(v.x||0)+(a.x||0);L=(v.y||0)+(a.y||0);"right"===z?K=1:"center"===z&&(K=2);K&&(d+=(v.width-(a.width||0))/K);e[c?"translateX":"x"]=Math.round(d);"bottom"===b?q=1:"middle"===b&&(q=2);q&&(L+=(v.height-(a.height||0))/q);e[c?"translateY":"y"]=Math.round(L);this[this.placed?"animate":"attr"](e);this.placed=!0;this.alignAttr=e;return this},getBBox:function(a,v){var z,b=this.renderer,d,n=this.element,L=this.styles,f,e=this.textStr,K,q=b.cache,u=b.cacheKeys,g;v=y(v,this.rotation);d=v*m;f=L&&L.fontSize;void 0!==
e&&(g=e.toString(),-1===g.indexOf("\x3c")&&(g=g.replace(/[0-9]/g,"0")),g+=["",v||0,f,n.style.width,n.style["text-overflow"]].join());g&&!a&&(z=q[g]);if(!z){if(n.namespaceURI===this.SVG_NS||b.forExport){try{(K=this.fakeTS&&function(a){h(n.querySelectorAll(".highcharts-text-outline"),function(z){z.style.display=a})})&&K("none"),z=n.getBBox?C({},n.getBBox()):{width:n.offsetWidth,height:n.offsetHeight},K&&K("")}catch(U){}if(!z||0>z.width)z={width:0,height:0}}else z=this.htmlGetBBox();b.isSVG&&(a=z.width,
b=z.height,c&&L&&"11px"===L.fontSize&&"16.9"===b.toPrecision(3)&&(z.height=b=14),v&&(z.width=Math.abs(b*Math.sin(d))+Math.abs(a*Math.cos(d)),z.height=Math.abs(b*Math.cos(d))+Math.abs(a*Math.sin(d))));if(g&&0<z.height){for(;250<u.length;)delete q[u.shift()];q[g]||u.push(g);q[g]=z}}return z},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var z=this;z.animate({opacity:0},{duration:a||150,complete:function(){z.attr({y:-9999})}})},
add:function(a){var z=this.renderer,c=this.element,v;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&z.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)v=this.zIndexSetter();v||(a?a.element:z.box).appendChild(c);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var z=a.parentNode;z&&z.removeChild(a)},destroy:function(){var a=this.element||{},c=this.renderer.isSVG&&"SPAN"===a.nodeName&&this.parentGroup,v,b;a.onclick=a.onmouseout=a.onmouseover=
a.onmousemove=a.point=null;M(this);this.clipPath&&(this.clipPath=this.clipPath.destroy());if(this.stops){for(b=0;b<this.stops.length;b++)this.stops[b]=this.stops[b].destroy();this.stops=null}this.safeRemoveChild(a);for(this.destroyShadows();c&&c.div&&0===c.div.childNodes.length;)a=c.parentGroup,this.safeRemoveChild(c.div),delete c.div,c=a;this.alignTo&&f(this.renderer.alignedObjects,this);for(v in this)delete this[v];return null},shadow:function(a,c,v){var z=[],b,d,n=this.element,f,L,e,K;if(!a)this.destroyShadows();
else if(!this.shadows){L=y(a.width,3);e=(a.opacity||.15)/L;K=this.parentInverted?"(-1,-1)":"("+y(a.offsetX,1)+", "+y(a.offsetY,1)+")";for(b=1;b<=L;b++)d=n.cloneNode(0),f=2*L+1-2*b,p(d,{isShadow:"true",stroke:a.color||"#000000","stroke-opacity":e*b,"stroke-width":f,transform:"translate"+K,fill:"none"}),v&&(p(d,"height",Math.max(p(d,"height")-f,0)),d.cutHeight=f),c?c.element.appendChild(d):n.parentNode.insertBefore(d,n),z.push(d);this.shadows=z}return this},destroyShadows:function(){h(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=y(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,c,v){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");v.setAttribute(c,a);this[c]=a},dashstyleSetter:function(a){var c,z=this["stroke-width"];
"inherit"===z&&(z=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(c=a.length;c--;)a[c]=u(a[c])*z;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,c,v){this[c]=a;v.setAttribute(c,a)},titleSetter:function(a){var c=this.element.getElementsByTagName("title")[0];c||(c=g.createElementNS(this.SVG_NS,"title"),this.element.appendChild(c));c.firstChild&&c.removeChild(c.firstChild);c.appendChild(g.createTextNode(String(y(a),"").replace(/<[^>]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,c,v){"string"===typeof a?v.setAttribute(c,
a):a&&this.colorGradient(a,c,v)},visibilitySetter:function(a,c,v){"inherit"===a?v.removeAttribute(c):v.setAttribute(c,a)},zIndexSetter:function(a,c){var v=this.renderer,z=this.parentGroup,b=(z||v).element||v.box,d,n=this.element,f;d=this.added;var e;k(a)&&(n.zIndex=a,a=+a,this[c]===a&&(d=!1),this[c]=a);if(d){(a=this.zIndex)&&z&&(z.handleZ=!0);c=b.childNodes;for(e=0;e<c.length&&!f;e++)z=c[e],d=z.zIndex,z!==n&&(u(d)>a||!k(a)&&k(d)||0>a&&!k(d)&&b!==v.box)&&(b.insertBefore(n,z),f=!0);f||b.appendChild(n)}return f},
_defaultSetter:function(a,c,v){v.setAttribute(c,a)}};D.prototype.yGetter=D.prototype.xGetter;D.prototype.translateXSetter=D.prototype.translateYSetter=D.prototype.rotationSetter=D.prototype.verticalAlignSetter=D.prototype.scaleXSetter=D.prototype.scaleYSetter=function(a,c){this[c]=a;this.doTransform=!0};D.prototype["stroke-widthSetter"]=D.prototype.strokeSetter=function(a,c,v){this[c]=a;this.stroke&&this["stroke-width"]?(D.prototype.fillSetter.call(this,this.stroke,"stroke",v),v.setAttribute("stroke-width",
this["stroke-width"]),this.hasStroke=!0):"stroke-width"===c&&0===a&&this.hasStroke&&(v.removeAttribute("stroke"),this.hasStroke=!1)};B=a.SVGRenderer=function(){this.init.apply(this,arguments)};B.prototype={Element:D,SVG_NS:K,init:function(a,c,v,b,d,n){var z;b=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}).css(this.getStyle(b));z=b.element;a.appendChild(z);-1===a.innerHTML.indexOf("xmlns")&&p(z,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=z;this.boxWrapper=b;this.alignedObjects=
[];this.url=(E||A)&&g.getElementsByTagName("base").length?R.location.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(g.createTextNode("Created with Highstock 5.0.3"));this.defs=this.createElement("defs").add();this.allowHTML=n;this.forExport=d;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(c,v,!1);var f;E&&a.getBoundingClientRect&&(c=function(){w(a,{left:0,top:0});f=a.getBoundingClientRect();
w(a,{left:Math.ceil(f.left)-f.left+"px",top:Math.ceil(f.top)-f.top+"px"})},c(),this.unSubPixelFix=G(R,"resize",c))},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();e(this.gradients||{});this.gradients=
null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var c=new this.Element;c.init(this,a);return c},draw:J,getRadialAttr:function(a,c){return{cx:a[0]-a[2]/2+c.cx*a[2],cy:a[1]-a[2]/2+c.cy*a[2],r:c.r*a[2]}},buildText:function(a){for(var c=a.element,z=this,b=z.forExport,n=y(a.textStr,"").toString(),f=-1!==n.indexOf("\x3c"),e=c.childNodes,q,F,x,A,I=p(c,"x"),m=a.styles,k=a.textWidth,C=m&&m.lineHeight,M=m&&m.textOutline,J=m&&
"ellipsis"===m.textOverflow,E=e.length,O=k&&!a.added&&this.box,t=function(a){var v;v=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:m&&m.fontSize||z.style.fontSize||12;return C?u(C):z.fontMetrics(v,a.getAttribute("style")?a:c).h};E--;)c.removeChild(e[E]);f||M||J||k||-1!==n.indexOf(" ")?(q=/<.*class="([^"]+)".*>/,F=/<.*style="([^"]+)".*>/,x=/<.*href="(http[^"]+)".*>/,O&&O.appendChild(c),n=f?n.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):[n],n=d(n,function(a){return""!==a}),h(n,function(d,n){var f,e=0;d=d.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");f=d.split("|||");h(f,function(d){if(""!==d||1===f.length){var u={},y=g.createElementNS(z.SVG_NS,"tspan"),L,h;q.test(d)&&(L=d.match(q)[1],p(y,"class",L));F.test(d)&&(h=d.match(F)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),p(y,"style",h));x.test(d)&&!b&&(p(y,
"onclick",'location.href\x3d"'+d.match(x)[1]+'"'),w(y,{cursor:"pointer"}));d=(d.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"\x3c").replace(/&gt;/g,"\x3e");if(" "!==d){y.appendChild(g.createTextNode(d));e?u.dx=0:n&&null!==I&&(u.x=I);p(y,u);c.appendChild(y);!e&&n&&(!v&&b&&w(y,{display:"block"}),p(y,"dy",t(y)));if(k){u=d.replace(/([^\^])-/g,"$1- ").split(" ");L="nowrap"===m.whiteSpace;for(var C=1<f.length||n||1<u.length&&!L,M,P,E=[],O=t(y),R=a.rotation,l=d,Q=l.length;(C||J)&&(u.length||E.length);)a.rotation=
0,M=a.getBBox(!0),P=M.width,!v&&z.forExport&&(P=z.measureSpanWidth(y.firstChild.data,a.styles)),M=P>k,void 0===A&&(A=M),J&&A?(Q/=2,""===l||!M&&.5>Q?u=[]:(l=d.substring(0,l.length+(M?-1:1)*Math.ceil(Q)),u=[l+(3<k?"\u2026":"")],y.removeChild(y.firstChild))):M&&1!==u.length?(y.removeChild(y.firstChild),E.unshift(u.pop())):(u=E,E=[],u.length&&!L&&(y=g.createElementNS(K,"tspan"),p(y,{dy:O,x:I}),h&&p(y,"style",h),c.appendChild(y)),P>k&&(k=P)),u.length&&y.appendChild(g.createTextNode(u.join(" ").replace(/- /g,
"-")));a.rotation=R}e++}}})}),A&&a.attr("title",a.textStr),O&&O.removeChild(c),M&&a.applyTextOutline&&a.applyTextOutline(M)):c.appendChild(g.createTextNode(n.replace(/&lt;/g,"\x3c").replace(/&gt;/g,"\x3e")))},getContrast:function(a){a=r(a).rgba;return 510<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,v,b,d,n,f,e,K,q){var z=this.label(a,v,b,q,null,null,null,null,"button"),u=0;z.attr(x({padding:8,r:2},n));var y,g,L,F;n=x({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",
cursor:"pointer",fontWeight:"normal"}},n);y=n.style;delete n.style;f=x(n,{fill:"#e6e6e6"},f);g=f.style;delete f.style;e=x(n,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},e);L=e.style;delete e.style;K=x(n,{style:{color:"#cccccc"}},K);F=K.style;delete K.style;G(z.element,c?"mouseover":"mouseenter",function(){3!==u&&z.setState(1)});G(z.element,c?"mouseout":"mouseleave",function(){3!==u&&z.setState(u)});z.setState=function(a){1!==a&&(z.state=u=a);z.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+
["normal","hover","pressed","disabled"][a||0]);z.attr([n,f,e,K][a||0]).css([y,g,L,F][a||0])};z.attr(n).css(C({cursor:"default"},y));return z.on("click",function(a){3!==u&&d.call(z,a)})},crispLine:function(a,c){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-c%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+c%2/2);return a},path:function(a){var c={fill:"none"};q(a)?c.d=a:F(a)&&C(c,a);return this.createElement("path").attr(c)},circle:function(a,c,v){a=F(a)?a:{x:a,y:c,r:v};c=this.createElement("circle");c.xSetter=
c.ySetter=function(a,c,v){v.setAttribute("c"+c,a)};return c.attr(a)},arc:function(a,c,v,b,d,n){F(a)&&(c=a.y,v=a.r,b=a.innerR,d=a.start,n=a.end,a=a.x);a=this.symbol("arc",a||0,c||0,v||0,v||0,{innerR:b||0,start:d||0,end:n||0});a.r=v;return a},rect:function(a,c,v,b,d,n){d=F(a)?a.r:d;var z=this.createElement("rect");a=F(a)?a:void 0===a?{}:{x:a,y:c,width:Math.max(v,0),height:Math.max(b,0)};void 0!==n&&(a.strokeWidth=n,a=z.crisp(a));a.fill="none";d&&(a.r=d);z.rSetter=function(a,c,v){p(v,{rx:a,ry:a})};return z.attr(a)},
setSize:function(a,c,v){var b=this.alignedObjects,d=b.length;this.width=a;this.height=c;for(this.boxWrapper.animate({width:a,height:c},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:y(v,!0)?void 0:0});d--;)b[d].align()},g:function(a){var c=this.createElement("g");return a?c.attr({"class":"highcharts-"+a}):c},image:function(a,c,v,b,d){var n={preserveAspectRatio:"none"};1<arguments.length&&C(n,{x:c,y:v,width:b,height:d});n=this.createElement("image").attr(n);
n.element.setAttributeNS?n.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):n.element.setAttribute("hc-svg-href",a);return n},symbol:function(a,c,v,b,d,n){var z=this,f,e=this.symbols[a],K=k(c)&&e&&e(Math.round(c),Math.round(v),b,d,n),q=/^url\((.*?)\)$/,u,F;e?(f=this.path(K),f.attr("fill","none"),C(f,{symbolName:a,x:c,y:v,width:b,height:d}),n&&C(f,n)):q.test(a)&&(u=a.match(q)[1],f=this.image(u),f.imgwidth=y(O[u]&&O[u].width,n&&n.width),f.imgheight=y(O[u]&&O[u].height,n&&n.height),F=
function(){f.attr({width:f.width,height:f.height})},h(["width","height"],function(a){f[a+"Setter"]=function(a,c){var v={},b=this["img"+c],d="width"===c?"translateX":"translateY";this[c]=a;k(b)&&(this.element&&this.element.setAttribute(c,b),this.alignByTranslate||(v[d]=((this[c]||0)-b)/2,this.attr(v)))}}),k(c)&&f.attr({x:c,y:v}),f.isImg=!0,k(f.imgwidth)&&k(f.imgheight)?F():(f.attr({width:0,height:0}),t("img",{onload:function(){var a=l[z.chartIndex];0===this.width&&(w(this,{position:"absolute",top:"-999em"}),
g.body.appendChild(this));O[u]={width:this.width,height:this.height};f.imgwidth=this.width;f.imgheight=this.height;f.element&&F();this.parentNode&&this.parentNode.removeChild(this);z.imgCount--;if(!z.imgCount&&a&&a.onload)a.onload()},src:u}),this.imgCount++));return f},symbols:{circle:function(a,c,v,b){var d=.166*v;return["M",a+v/2,c,"C",a+v+d,c,a+v+d,c+b,a+v/2,c+b,"C",a-d,c+b,a-d,c,a+v/2,c,"Z"]},square:function(a,c,v,b){return["M",a,c,"L",a+v,c,a+v,c+b,a,c+b,"Z"]},triangle:function(a,c,v,b){return["M",
a+v/2,c,"L",a+v,c+b,a,c+b,"Z"]},"triangle-down":function(a,c,v,b){return["M",a,c,"L",a+v,c,a+v/2,c+b,"Z"]},diamond:function(a,c,v,b){return["M",a+v/2,c,"L",a+v,c+b/2,a+v/2,c+b,a,c+b/2,"Z"]},arc:function(a,c,v,b,d){var n=d.start;v=d.r||v||b;var f=d.end-.001;b=d.innerR;var e=d.open,z=Math.cos(n),K=Math.sin(n),q=Math.cos(f),f=Math.sin(f);d=d.end-n<Math.PI?0:1;return["M",a+v*z,c+v*K,"A",v,v,0,d,1,a+v*q,c+v*f,e?"M":"L",a+b*q,c+b*f,"A",b,b,0,d,0,a+b*z,c+b*K,e?"":"Z"]},callout:function(a,c,v,b,d){var n=
Math.min(d&&d.r||0,v,b),f=n+6,e=d&&d.anchorX;d=d&&d.anchorY;var K;K=["M",a+n,c,"L",a+v-n,c,"C",a+v,c,a+v,c,a+v,c+n,"L",a+v,c+b-n,"C",a+v,c+b,a+v,c+b,a+v-n,c+b,"L",a+n,c+b,"C",a,c+b,a,c+b,a,c+b-n,"L",a,c+n,"C",a,c,a,c,a+n,c];e&&e>v?d>c+f&&d<c+b-f?K.splice(13,3,"L",a+v,d-6,a+v+6,d,a+v,d+6,a+v,c+b-n):K.splice(13,3,"L",a+v,b/2,e,d,a+v,b/2,a+v,c+b-n):e&&0>e?d>c+f&&d<c+b-f?K.splice(33,3,"L",a,d+6,a-6,d,a,d-6,a,c+n):K.splice(33,3,"L",a,b/2,e,d,a,b/2,a,c+n):d&&d>b&&e>a+f&&e<a+v-f?K.splice(23,3,"L",e+6,c+
b,e,c+b+6,e-6,c+b,a+n,c+b):d&&0>d&&e>a+f&&e<a+v-f&&K.splice(3,3,"L",e-6,c,e,c-6,e+6,c,v-n,c);return K}},clipRect:function(c,v,b,d){var n=a.uniqueKey(),f=this.createElement("clipPath").attr({id:n}).add(this.defs);c=this.rect(c,v,b,d,0).add(f);c.id=n;c.clipPath=f;c.count=0;return c},text:function(a,c,b,d){var n=!v&&this.forExport,f={};if(d&&(this.allowHTML||!this.forExport))return this.html(a,c,b);f.x=Math.round(c||0);b&&(f.y=Math.round(b));if(a||0===a)f.text=a;a=this.createElement("text").attr(f);
n&&a.css({position:"absolute"});d||(a.xSetter=function(a,c,v){var b=v.getElementsByTagName("tspan"),d,n=v.getAttribute(c),f;for(f=0;f<b.length;f++)d=b[f],d.getAttribute(c)===n&&d.setAttribute(c,a);v.setAttribute(c,a)});return a},fontMetrics:function(a,c){a=a||c&&c.style&&c.style.fontSize||this.style&&this.style.fontSize;a=/px/.test(a)?u(a):/em/.test(a)?parseFloat(a)*(c?this.fontMetrics(null,c.parentNode).f:16):12;c=24>a?a+3:Math.round(1.2*a);return{h:c,b:Math.round(.8*c),f:a}},rotCorr:function(a,
c,v){var b=a;c&&v&&(b=Math.max(b*Math.cos(c*m),4));return{x:-a/3*Math.sin(c*m),y:b}},label:function(a,c,v,b,d,n,f,e,K){var q=this,u=q.g("button"!==K&&"label"),y=u.text=q.text("",0,0,f).attr({zIndex:1}),g,F,z=0,A=3,L=0,m,M,J,E,O,t={},l,R,r=/^url\((.*?)\)$/.test(b),p=r,P,w,Q,S;K&&u.addClass("highcharts-"+K);p=r;P=function(){return(l||0)%2/2};w=function(){var a=y.element.style,c={};F=(void 0===m||void 0===M||O)&&k(y.textStr)&&y.getBBox();u.width=(m||F.width||0)+2*A+L;u.height=(M||F.height||0)+2*A;R=
A+q.fontMetrics(a&&a.fontSize,y).b;p&&(g||(u.box=g=q.symbols[b]||r?q.symbol(b):q.rect(),g.addClass(("button"===K?"":"highcharts-label-box")+(K?" highcharts-"+K+"-box":"")),g.add(u),a=P(),c.x=a,c.y=(e?-R:0)+a),c.width=Math.round(u.width),c.height=Math.round(u.height),g.attr(C(c,t)),t={})};Q=function(){var a=L+A,c;c=e?0:R;k(m)&&F&&("center"===O||"right"===O)&&(a+={center:.5,right:1}[O]*(m-F.width));if(a!==y.x||c!==y.y)y.attr("x",a),void 0!==c&&y.attr("y",c);y.x=a;y.y=c};S=function(a,c){g?g.attr(a,c):
t[a]=c};u.onAdd=function(){y.add(u);u.attr({text:a||0===a?a:"",x:c,y:v});g&&k(d)&&u.attr({anchorX:d,anchorY:n})};u.widthSetter=function(a){m=a};u.heightSetter=function(a){M=a};u["text-alignSetter"]=function(a){O=a};u.paddingSetter=function(a){k(a)&&a!==A&&(A=u.padding=a,Q())};u.paddingLeftSetter=function(a){k(a)&&a!==L&&(L=a,Q())};u.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==z&&(z=a,F&&u.attr({x:J}))};u.textSetter=function(a){void 0!==a&&y.textSetter(a);w();Q()};u["stroke-widthSetter"]=
function(a,c){a&&(p=!0);l=this["stroke-width"]=a;S(c,a)};u.strokeSetter=u.fillSetter=u.rSetter=function(a,c){"fill"===c&&a&&(p=!0);S(c,a)};u.anchorXSetter=function(a,c){d=a;S(c,Math.round(a)-P()-J)};u.anchorYSetter=function(a,c){n=a;S(c,a-E)};u.xSetter=function(a){u.x=a;z&&(a-=z*((m||F.width)+2*A));J=Math.round(a);u.attr("translateX",J)};u.ySetter=function(a){E=u.y=Math.round(a);u.attr("translateY",E)};var T=u.css;return C(u,{css:function(a){if(a){var c={};a=x(a);h(u.textProps,function(v){void 0!==
a[v]&&(c[v]=a[v],delete a[v])});y.css(c)}return T.call(u,a)},getBBox:function(){return{width:F.width+2*A,height:F.height+2*A,x:F.x-A,y:F.y-A}},shadow:function(a){a&&(w(),g&&g.shadow(a));return u},destroy:function(){I(u.element,"mouseenter");I(u.element,"mouseleave");y&&(y=y.destroy());g&&(g=g.destroy());D.prototype.destroy.call(u);u=q=w=Q=S=null}})}};a.Renderer=B})(N);(function(a){var D=a.attr,B=a.createElement,G=a.css,H=a.defined,p=a.each,l=a.extend,r=a.isFirefox,w=a.isMS,t=a.isWebKit,k=a.pInt,m=
a.SVGRenderer,e=a.win,g=a.wrap;l(a.SVGElement.prototype,{htmlCss:function(a){var e=this.element;if(e=a&&"SPAN"===e.tagName&&a.width)delete a.width,this.textWidth=e,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=l(this.styles,a);G(this.element,a);return this},htmlGetBBox:function(){var a=this.element;"text"===a.nodeName&&(a.style.position="absolute");return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=
this.renderer,e=this.element,f=this.translateX||0,d=this.translateY||0,b=this.x||0,q=this.y||0,g=this.textAlign||"left",c={left:0,center:.5,right:1}[g],F=this.styles;G(e,{marginLeft:f,marginTop:d});this.shadows&&p(this.shadows,function(a){G(a,{marginLeft:f+1,marginTop:d+1})});this.inverted&&p(e.childNodes,function(c){a.invertChild(c,e)});if("SPAN"===e.tagName){var n=this.rotation,A=k(this.textWidth),x=F&&F.whiteSpace,m=[n,g,e.innerHTML,this.textWidth,this.textAlign].join();m!==this.cTT&&(F=a.fontMetrics(e.style.fontSize).b,
H(n)&&this.setSpanRotation(n,c,F),G(e,{width:"",whiteSpace:x||"nowrap"}),e.offsetWidth>A&&/[ \-]/.test(e.textContent||e.innerText)&&G(e,{width:A+"px",display:"block",whiteSpace:x||"normal"}),this.getSpanCorrection(e.offsetWidth,F,c,n,g));G(e,{left:b+(this.xCorr||0)+"px",top:q+(this.yCorr||0)+"px"});t&&(F=e.offsetHeight);this.cTT=m}}else this.alignOnAdd=!0},setSpanRotation:function(a,g,f){var d={},b=w?"-ms-transform":t?"-webkit-transform":r?"MozTransform":e.opera?"-o-transform":"";d[b]=d.transform=
"rotate("+a+"deg)";d[b+(r?"Origin":"-origin")]=d.transformOrigin=100*g+"% "+f+"px";G(this.element,d)},getSpanCorrection:function(a,e,f){this.xCorr=-a*f;this.yCorr=-e}});l(m.prototype,{html:function(a,e,f){var d=this.createElement("span"),b=d.element,q=d.renderer,h=q.isSVG,c=function(a,c){p(["opacity","visibility"],function(b){g(a,b+"Setter",function(a,b,d,n){a.call(this,b,d,n);c[d]=b})})};d.textSetter=function(a){a!==b.innerHTML&&delete this.bBox;b.innerHTML=this.textStr=a;d.htmlUpdateTransform()};
h&&c(d,d.element.style);d.xSetter=d.ySetter=d.alignSetter=d.rotationSetter=function(a,c){"align"===c&&(c="textAlign");d[c]=a;d.htmlUpdateTransform()};d.attr({text:a,x:Math.round(e),y:Math.round(f)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"});b.style.whiteSpace="nowrap";d.css=d.htmlCss;h&&(d.add=function(a){var n,f=q.box.parentNode,e=[];if(this.parentGroup=a){if(n=a.div,!n){for(;a;)e.push(a),a=a.parentGroup;p(e.reverse(),function(a){var b,d=D(a.element,
"class");d&&(d={className:d});n=a.div=a.div||B("div",d,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},n||f);b=n.style;l(a,{translateXSetter:function(c,d){b.left=c+"px";a[d]=c;a.doTransform=!0},translateYSetter:function(c,d){b.top=c+"px";a[d]=c;a.doTransform=!0}});c(a,b)})}}else n=f;n.appendChild(b);d.added=!0;d.alignOnAdd&&d.htmlUpdateTransform();return d});return d}})})(N);(function(a){var D,
B,G=a.createElement,H=a.css,p=a.defined,l=a.deg2rad,r=a.discardElement,w=a.doc,t=a.each,k=a.erase,m=a.extend;D=a.extendClass;var e=a.isArray,g=a.isNumber,h=a.isObject,C=a.merge;B=a.noop;var f=a.pick,d=a.pInt,b=a.SVGElement,q=a.SVGRenderer,E=a.win;a.svg||(B={docMode8:w&&8===w.documentMode,init:function(a,b){var c=["\x3c",b,' filled\x3d"f" stroked\x3d"f"'],d=["position: ","absolute",";"],f="div"===b;("shape"===b||f)&&d.push("left:0;top:0;width:1px;height:1px;");d.push("visibility: ",f?"hidden":"visible");
c.push(' style\x3d"',d.join(""),'"/\x3e');b&&(c=f||"span"===b||"img"===b?c.join(""):a.prepVML(c),this.element=G(c));this.renderer=a},add:function(a){var c=this.renderer,b=this.element,d=c.box,f=a&&a.inverted,d=a?a.element||a:d;a&&(this.parentGroup=a);f&&c.invertChild(b,d);d.appendChild(b);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();if(this.onAdd)this.onAdd();this.className&&this.attr("class",this.className);return this},updateTransform:b.prototype.htmlUpdateTransform,
setSpanRotation:function(){var a=this.rotation,b=Math.cos(a*l),d=Math.sin(a*l);H(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11\x3d",b,", M12\x3d",-d,", M21\x3d",d,", M22\x3d",b,", sizingMethod\x3d'auto expand')"].join(""):"none"})},getSpanCorrection:function(a,b,d,e,q){var c=e?Math.cos(e*l):1,n=e?Math.sin(e*l):0,u=f(this.elemHeight,this.element.offsetHeight),g;this.xCorr=0>c&&-a;this.yCorr=0>n&&-u;g=0>c*n;this.xCorr+=n*b*(g?1-d:d);this.yCorr-=c*b*(e?g?d:1-d:1);q&&"left"!==
q&&(this.xCorr-=a*d*(0>c?-1:1),e&&(this.yCorr-=u*d*(0>n?-1:1)),H(this.element,{textAlign:q}))},pathToVML:function(a){for(var c=a.length,b=[];c--;)g(a[c])?b[c]=Math.round(10*a[c])-5:"Z"===a[c]?b[c]="x":(b[c]=a[c],!a.isArc||"wa"!==a[c]&&"at"!==a[c]||(b[c+5]===b[c+7]&&(b[c+7]+=a[c+7]>a[c+5]?1:-1),b[c+6]===b[c+8]&&(b[c+8]+=a[c+8]>a[c+6]?1:-1)));return b.join(" ")||"x"},clip:function(a){var c=this,b;a?(b=a.members,k(b,c),b.push(c),c.destroyClip=function(){k(b,c)},a=a.getCSS(c)):(c.destroyClip&&c.destroyClip(),
a={clip:c.docMode8?"inherit":"rect(auto)"});return c.css(a)},css:b.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&r(a)},destroy:function(){this.destroyClip&&this.destroyClip();return b.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=E.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var c;a=a.split(/[ ,]/);c=a.length;if(9===c||11===c)a[c-4]=a[c-2]=d(a[c-2])-10*b;return a.join(" ")},shadow:function(a,b,e){var c=[],n,q=this.element,
g=this.renderer,u,I=q.style,F,v=q.path,K,h,m,z;v&&"string"!==typeof v.value&&(v="x");h=v;if(a){m=f(a.width,3);z=(a.opacity||.15)/m;for(n=1;3>=n;n++)K=2*m+1-2*n,e&&(h=this.cutOffPath(v.value,K+.5)),F=['\x3cshape isShadow\x3d"true" strokeweight\x3d"',K,'" filled\x3d"false" path\x3d"',h,'" coordsize\x3d"10 10" style\x3d"',q.style.cssText,'" /\x3e'],u=G(g.prepVML(F),null,{left:d(I.left)+f(a.offsetX,1),top:d(I.top)+f(a.offsetY,1)}),e&&(u.cutOff=K+1),F=['\x3cstroke color\x3d"',a.color||"#000000",'" opacity\x3d"',
z*n,'"/\x3e'],G(g.prepVML(F),null,null,u),b?b.element.appendChild(u):q.parentNode.insertBefore(u,q),c.push(u);this.shadows=c}return this},updateShadows:B,setAttr:function(a,b){this.docMode8?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){(this.added?this.element:this).className=a},dashstyleSetter:function(a,b,d){(d.getElementsByTagName("stroke")[0]||G(this.renderer.prepVML(["\x3cstroke/\x3e"]),null,null,d))[b]=a||"solid";this[b]=a},dSetter:function(a,b,d){var c=this.shadows;
a=a||[];this.d=a.join&&a.join(" ");d.path=a=this.pathToVML(a);if(c)for(d=c.length;d--;)c[d].path=c[d].cutOff?this.cutOffPath(a,c[d].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,d){var c=d.nodeName;"SPAN"===c?d.style.color=a:"IMG"!==c&&(d.filled="none"!==a,this.setAttr("fillcolor",this.renderer.color(a,d,b,this)))},"fill-opacitySetter":function(a,b,d){G(this.renderer.prepVML(["\x3c",b.split("-")[0],' opacity\x3d"',a,'"/\x3e']),null,null,d)},opacitySetter:B,rotationSetter:function(a,b,d){d=
d.style;this[b]=d[b]=a;d.left=-Math.round(Math.sin(a*l)+1)+"px";d.top=Math.round(Math.cos(a*l))+"px"},strokeSetter:function(a,b,d){this.setAttr("strokecolor",this.renderer.color(a,d,b,this))},"stroke-widthSetter":function(a,b,d){d.stroked=!!a;this[b]=a;g(a)&&(a+="px");this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,d){"inherit"===a&&(a="visible");this.shadows&&t(this.shadows,function(c){c.style[b]=a});"DIV"===d.nodeName&&(a="hidden"===a?"-999em":
0,this.docMode8||(d.style[b]=a?"visible":"hidden"),b="top");d.style[b]=a},xSetter:function(a,b,d){this[b]=a;"x"===b?b="left":"y"===b&&(b="top");this.updateClipping?(this[b]=a,this.updateClipping()):d.style[b]=a},zIndexSetter:function(a,b,d){d.style[b]=a}},B["stroke-opacitySetter"]=B["fill-opacitySetter"],a.VMLElement=B=D(b,B),B.prototype.ySetter=B.prototype.widthSetter=B.prototype.heightSetter=B.prototype.xSetter,B={Element:B,isIE8:-1<E.navigator.userAgent.indexOf("MSIE 8.0"),init:function(a,b,d){var c,
f;this.alignedObjects=[];c=this.createElement("div").css({position:"relative"});f=c.element;a.appendChild(c.element);this.isVML=!0;this.box=f;this.boxWrapper=c;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(b,d,!1);if(!w.namespaces.hcv){w.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{w.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(J){w.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},
isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,d,f){var c=this.createElement(),e=h(a);return m(c,{members:[],count:0,left:(e?a.x:a)+1,top:(e?a.y:b)+1,width:(e?a.width:d)-1,height:(e?a.height:f)-1,getCSS:function(a){var c=a.element,b=c.nodeName,d=a.inverted,v=this.top-("shape"===b?c.offsetTop:0),f=this.left,c=f+this.width,e=v+this.height,v={clip:"rect("+Math.round(d?f:v)+"px,"+Math.round(d?e:c)+"px,"+Math.round(d?c:e)+"px,"+Math.round(d?v:f)+"px)"};!d&&a.docMode8&&"DIV"===b&&
m(v,{width:c+"px",height:e+"px"});return v},updateClipping:function(){t(c.members,function(a){a.element&&a.css(c.getCSS(a))})}})},color:function(c,b,d,f){var e=this,n,q=/^rgba/,u,g,h="none";c&&c.linearGradient?g="gradient":c&&c.radialGradient&&(g="pattern");if(g){var v,K,A=c.linearGradient||c.radialGradient,F,z,m,k,E,C="";c=c.stops;var l,r=[],p=function(){u=['\x3cfill colors\x3d"'+r.join(",")+'" opacity\x3d"',m,'" o:opacity2\x3d"',z,'" type\x3d"',g,'" ',C,'focus\x3d"100%" method\x3d"any" /\x3e'];
G(e.prepVML(u),null,null,b)};F=c[0];l=c[c.length-1];0<F[0]&&c.unshift([0,F[1]]);1>l[0]&&c.push([1,l[1]]);t(c,function(c,b){q.test(c[1])?(n=a.color(c[1]),v=n.get("rgb"),K=n.get("a")):(v=c[1],K=1);r.push(100*c[0]+"% "+v);b?(m=K,k=v):(z=K,E=v)});if("fill"===d)if("gradient"===g)d=A.x1||A[0]||0,c=A.y1||A[1]||0,F=A.x2||A[2]||0,A=A.y2||A[3]||0,C='angle\x3d"'+(90-180*Math.atan((A-c)/(F-d))/Math.PI)+'"',p();else{var h=A.r,w=2*h,B=2*h,D=A.cx,H=A.cy,V=b.radialReference,U,h=function(){V&&(U=f.getBBox(),D+=(V[0]-
U.x)/U.width-.5,H+=(V[1]-U.y)/U.height-.5,w*=V[2]/U.width,B*=V[2]/U.height);C='src\x3d"'+a.getOptions().global.VMLRadialGradientURL+'" size\x3d"'+w+","+B+'" origin\x3d"0.5,0.5" position\x3d"'+D+","+H+'" color2\x3d"'+E+'" ';p()};f.added?h():f.onAdd=h;h=k}else h=v}else q.test(c)&&"IMG"!==b.tagName?(n=a.color(c),f[d+"-opacitySetter"](n.get("a"),d,b),h=n.get("rgb")):(h=b.getElementsByTagName(d),h.length&&(h[0].opacity=1,h[0].type="solid"),h=c);return h},prepVML:function(a){var c=this.isIE8;a=a.join("");
c?(a=a.replace("/\x3e",' xmlns\x3d"urn:schemas-microsoft-com:vml" /\x3e'),a=-1===a.indexOf('style\x3d"')?a.replace("/\x3e",' style\x3d"display:inline-block;behavior:url(#default#VML);" /\x3e'):a.replace('style\x3d"','style\x3d"display:inline-block;behavior:url(#default#VML);')):a=a.replace("\x3c","\x3chcv:");return a},text:q.prototype.html,path:function(a){var c={coordsize:"10 10"};e(a)?c.d=a:h(a)&&m(c,a);return this.createElement("shape").attr(c)},circle:function(a,b,d){var c=this.symbol("circle");
h(a)&&(d=a.r,b=a.y,a=a.x);c.isCircle=!0;c.r=d;return c.attr({x:a,y:b})},g:function(a){var c;a&&(c={className:"highcharts-"+a,"class":"highcharts-"+a});return this.createElement("div").attr(c)},image:function(a,b,d,f,e){var c=this.createElement("img").attr({src:a});1<arguments.length&&c.attr({x:b,y:d,width:f,height:e});return c},createElement:function(a){return"rect"===a?this.symbol(a):q.prototype.createElement.call(this,a)},invertChild:function(a,b){var c=this;b=b.style;var f="IMG"===a.tagName&&a.style;
H(a,{flip:"x",left:d(b.width)-(f?d(f.top):1),top:d(b.height)-(f?d(f.left):1),rotation:-90});t(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,d,f,e){var c=e.start,q=e.end,u=e.r||d||f;d=e.innerR;f=Math.cos(c);var n=Math.sin(c),g=Math.cos(q),v=Math.sin(q);if(0===q-c)return["x"];c=["wa",a-u,b-u,a+u,b+u,a+u*f,b+u*n,a+u*g,b+u*v];e.open&&!d&&c.push("e","M",a,b);c.push("at",a-d,b-d,a+d,b+d,a+d*g,b+d*v,a+d*f,b+d*n,"x","e");c.isArc=!0;return c},circle:function(a,b,d,f,e){e&&p(e.r)&&
(d=f=2*e.r);e&&e.isCircle&&(a-=d/2,b-=f/2);return["wa",a,b,a+d,b+f,a+d,b+f/2,a+d,b+f/2,"e"]},rect:function(a,b,d,f,e){return q.prototype.symbols[p(e)&&e.r?"callout":"square"].call(0,a,b,d,f,e)}}},a.VMLRenderer=D=function(){this.init.apply(this,arguments)},D.prototype=C(q.prototype,B),a.Renderer=D);q.prototype.measureSpanWidth=function(a,b){var c=w.createElement("span");a=w.createTextNode(a);c.appendChild(a);H(c,b);this.box.appendChild(c);b=c.offsetWidth;r(c);return b}})(N);(function(a){function D(){var p=
a.defaultOptions.global,t,k=p.useUTC,m=k?"getUTC":"get",e=k?"setUTC":"set";a.Date=t=p.Date||r.Date;t.hcTimezoneOffset=k&&p.timezoneOffset;t.hcGetTimezoneOffset=k&&p.getTimezoneOffset;t.hcMakeTime=function(a,e,m,f,d,b){var q;k?(q=t.UTC.apply(0,arguments),q+=H(q)):q=(new t(a,e,l(m,1),l(f,0),l(d,0),l(b,0))).getTime();return q};G("Minutes Hours Day Date Month FullYear".split(" "),function(a){t["hcGet"+a]=m+a});G("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "),function(a){t["hcSet"+
a]=e+a})}var B=a.color,G=a.each,H=a.getTZOffset,p=a.merge,l=a.pick,r=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,VMLRadialGradientURL:"http://code.highcharts.com/5.0.3/gfx/vml-radial-gradient.png"},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,style:{color:"#333333",fontSize:"18px"},widthAdjust:-44},subtitle:{text:"",align:"center",style:{color:"#666666"},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"},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:B("#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(l){a.defaultOptions=p(!0,a.defaultOptions,l);D();return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;D()})(N);(function(a){var D=a.arrayMax,B=a.arrayMin,G=a.defined,
H=a.destroyObjectProperties,p=a.each,l=a.erase,r=a.merge,w=a.pick;a.PlotLineOrBand=function(a,k){this.axis=a;k&&(this.options=k,this.id=k.id)};a.PlotLineOrBand.prototype={render:function(){var a=this,k=a.axis,m=k.horiz,e=a.options,g=e.label,h=a.label,C=e.to,f=e.from,d=e.value,b=G(f)&&G(C),q=G(d),E=a.svgElem,c=!E,F=[],n,A=e.color,x=w(e.zIndex,0),l=e.events,F={"class":"highcharts-plot-"+(b?"band ":"line ")+(e.className||"")},y={},u=k.chart.renderer,I=b?"bands":"lines",M=k.log2lin;k.isLog&&(f=M(f),C=
M(C),d=M(d));q?(F={stroke:A,"stroke-width":e.width},e.dashStyle&&(F.dashstyle=e.dashStyle)):b&&(A&&(F.fill=A),e.borderWidth&&(F.stroke=e.borderColor,F["stroke-width"]=e.borderWidth));y.zIndex=x;I+="-"+x;(A=k[I])||(k[I]=A=u.g("plot-"+I).attr(y).add());c&&(a.svgElem=E=u.path().attr(F).add(A));if(q)F=k.getPlotLinePath(d,E.strokeWidth());else if(b)F=k.getPlotBandPath(f,C,e);else return;if(c&&F&&F.length){if(E.attr({d:F}),l)for(n in e=function(c){E.on(c,function(b){l[c].apply(a,[b])})},l)e(n)}else E&&
(F?(E.show(),E.animate({d:F})):(E.hide(),h&&(a.label=h=h.destroy())));g&&G(g.text)&&F&&F.length&&0<k.width&&0<k.height&&!F.flat?(g=r({align:m&&b&&"center",x:m?!b&&4:10,verticalAlign:!m&&b&&"middle",y:m?b?16:10:b?6:-4,rotation:m&&!b&&90},g),this.renderLabel(g,F,b,x)):h&&h.hide();return a},renderLabel:function(a,k,m,e){var g=this.label,h=this.axis.chart.renderer;g||(g={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+(m?"band":"line")+"-label "+(a.className||"")},g.zIndex=e,
this.label=g=h.text(a.text,0,0,a.useHTML).attr(g).add(),g.css(a.style));e=[k[1],k[4],m?k[6]:k[1]];k=[k[2],k[5],m?k[7]:k[2]];m=B(e);h=B(k);g.align(a,!1,{x:m,y:h,width:D(e)-m,height:D(k)-h});g.show()},destroy:function(){l(this.axis.plotLinesAndBands,this);delete this.axis;H(this)}};a.AxisPlotLineOrBandExtension={getPlotBandPath:function(a,k){k=this.getPlotLinePath(k,null,null,!0);(a=this.getPlotLinePath(a,null,null,!0))&&k?(a.flat=a.toString()===k.toString(),a.push(k[4],k[5],k[1],k[2],"z")):a=null;
return a},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(l,k){var m=(new a.PlotLineOrBand(this,l)).render(),e=this.userOptions;m&&(k&&(e[k]=e[k]||[],e[k].push(l)),this.plotLinesAndBands.push(m));return m},removePlotBandOrLine:function(a){for(var k=this.plotLinesAndBands,m=this.options,e=this.userOptions,g=k.length;g--;)k[g].id===a&&k[g].destroy();p([m.plotLines||[],e.plotLines||
[],m.plotBands||[],e.plotBands||[]],function(e){for(g=e.length;g--;)e[g].id===a&&l(e,e[g])})}}})(N);(function(a){var D=a.correctFloat,B=a.defined,G=a.destroyObjectProperties,H=a.isNumber,p=a.merge,l=a.pick,r=a.stop,w=a.deg2rad;a.Tick=function(a,k,m,e){this.axis=a;this.pos=k;this.type=m||"";this.isNew=!0;m||e||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,k=a.options,m=a.chart,e=a.categories,g=a.names,h=this.pos,C=k.labels,f=a.tickPositions,d=h===f[0],b=h===f[f.length-1],g=
e?l(e[h],g[h],h):h,e=this.label,f=f.info,q;a.isDatetimeAxis&&f&&(q=k.dateTimeLabelFormats[f.higherRanks[h]||f.unitName]);this.isFirst=d;this.isLast=b;k=a.labelFormatter.call({axis:a,chart:m,isFirst:d,isLast:b,dateTimeLabelFormat:q,value:a.isLog?D(a.lin2log(g)):g});B(e)?e&&e.attr({text:k}):(this.labelLength=(this.label=e=B(k)&&C.enabled?m.renderer.text(k,0,0,C.useHTML).css(p(C.style)).add(a.labelGroup):null)&&e.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?
"height":"width"]:0},handleOverflow:function(a){var k=this.axis,m=a.x,e=k.chart.chartWidth,g=k.chart.spacing,h=l(k.labelLeft,Math.min(k.pos,g[3])),g=l(k.labelRight,Math.max(k.pos+k.len,e-g[1])),C=this.label,f=this.rotation,d={left:0,center:.5,right:1}[k.labelAlign],b=C.getBBox().width,q=k.getSlotWidth(),E=q,c=1,F,n={};if(f)0>f&&m-d*b<h?F=Math.round(m/Math.cos(f*w)-h):0<f&&m+d*b>g&&(F=Math.round((e-m)/Math.cos(f*w)));else if(e=m+(1-d)*b,m-d*b<h?E=a.x+E*(1-d)-h:e>g&&(E=g-a.x+E*d,c=-1),E=Math.min(q,
E),E<q&&"center"===k.labelAlign&&(a.x+=c*(q-E-d*(q-Math.min(b,E)))),b>E||k.autoRotation&&(C.styles||{}).width)F=E;F&&(n.width=F,(k.options.labels.style||{}).textOverflow||(n.textOverflow="ellipsis"),C.css(n))},getPosition:function(a,k,m,e){var g=this.axis,h=g.chart,l=e&&h.oldChartHeight||h.chartHeight;return{x:a?g.translate(k+m,null,null,e)+g.transB:g.left+g.offset+(g.opposite?(e&&h.oldChartWidth||h.chartWidth)-g.right-g.left:0),y:a?l-g.bottom+g.offset-(g.opposite?g.height:0):l-g.translate(k+m,null,
null,e)-g.transB}},getLabelPosition:function(a,k,m,e,g,h,l,f){var d=this.axis,b=d.transA,q=d.reversed,E=d.staggerLines,c=d.tickRotCorr||{x:0,y:0},F=g.y;B(F)||(F=0===d.side?m.rotation?-8:-m.getBBox().height:2===d.side?c.y+8:Math.cos(m.rotation*w)*(c.y-m.getBBox(!1,0).height/2));a=a+g.x+c.x-(h&&e?h*b*(q?-1:1):0);k=k+F-(h&&!e?h*b*(q?1:-1):0);E&&(m=l/(f||1)%E,d.opposite&&(m=E-m-1),k+=d.labelOffset/E*m);return{x:a,y:Math.round(k)}},getMarkPath:function(a,k,m,e,g,h){return h.crispLine(["M",a,k,"L",a+(g?
0:-m),k+(g?m:0)],e)},render:function(a,k,m){var e=this.axis,g=e.options,h=e.chart.renderer,C=e.horiz,f=this.type,d=this.label,b=this.pos,q=g.labels,E=this.gridLine,c=f?f+"Tick":"tick",F=e.tickSize(c),n=this.mark,A=!n,x=q.step,p={},y=!0,u=e.tickmarkOffset,I=this.getPosition(C,b,u,k),M=I.x,I=I.y,v=C&&M===e.pos+e.len||!C&&I===e.pos?-1:1,K=f?f+"Grid":"grid",O=g[K+"LineWidth"],R=g[K+"LineColor"],z=g[K+"LineDashStyle"],K=l(g[c+"Width"],!f&&e.isXAxis?1:0),c=g[c+"Color"];m=l(m,1);this.isActive=!0;E||(p.stroke=
R,p["stroke-width"]=O,z&&(p.dashstyle=z),f||(p.zIndex=1),k&&(p.opacity=0),this.gridLine=E=h.path().attr(p).addClass("highcharts-"+(f?f+"-":"")+"grid-line").add(e.gridGroup));if(!k&&E&&(b=e.getPlotLinePath(b+u,E.strokeWidth()*v,k,!0)))E[this.isNew?"attr":"animate"]({d:b,opacity:m});F&&(e.opposite&&(F[0]=-F[0]),A&&(this.mark=n=h.path().addClass("highcharts-"+(f?f+"-":"")+"tick").add(e.axisGroup),n.attr({stroke:c,"stroke-width":K})),n[A?"attr":"animate"]({d:this.getMarkPath(M,I,F[0],n.strokeWidth()*
v,C,h),opacity:m}));d&&H(M)&&(d.xy=I=this.getLabelPosition(M,I,d,C,q,u,a,x),this.isFirst&&!this.isLast&&!l(g.showFirstLabel,1)||this.isLast&&!this.isFirst&&!l(g.showLastLabel,1)?y=!1:!C||e.isRadial||q.step||q.rotation||k||0===m||this.handleOverflow(I),x&&a%x&&(y=!1),y&&H(I.y)?(I.opacity=m,d[this.isNew?"attr":"animate"](I)):(r(d),d.attr("y",-9999)),this.isNew=!1)},destroy:function(){G(this,this.axis)}}})(N);(function(a){var D=a.addEvent,B=a.animObject,G=a.arrayMax,H=a.arrayMin,p=a.AxisPlotLineOrBandExtension,
l=a.color,r=a.correctFloat,w=a.defaultOptions,t=a.defined,k=a.deg2rad,m=a.destroyObjectProperties,e=a.each,g=a.error,h=a.extend,C=a.fireEvent,f=a.format,d=a.getMagnitude,b=a.grep,q=a.inArray,E=a.isArray,c=a.isNumber,F=a.isString,n=a.merge,A=a.normalizeTickInterval,x=a.pick,J=a.PlotLineOrBand,y=a.removeEvent,u=a.splat,I=a.syncTimeout,M=a.Tick;a.Axis=function(){this.init.apply(this,arguments)};a.Axis.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",
hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,style:{color:"#666666",cursor:"default",fontSize:"11px"},x:0},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",
lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return a.numberFormat(this.total,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},
title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,c){var b=c.isX;this.chart=a;this.horiz=a.inverted?!b:b;this.isXAxis=b;this.coll=this.coll||(b?"xAxis":"yAxis");this.opposite=c.opposite;this.side=c.side||(this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(c);var d=this.options,v=d.type;this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter;
this.userOptions=c;this.minPixelPadding=0;this.reversed=d.reversed;this.visible=!1!==d.visible;this.zoomEnabled=!1!==d.zoomEnabled;this.hasNames="category"===v||!0===d.categories;this.categories=d.categories||this.hasNames;this.names=this.names||[];this.isLog="logarithmic"===v;this.isDatetimeAxis="datetime"===v;this.isLinked=t(d.linkedTo);this.ticks={};this.labelEdge=[];this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;
this.range=d.range;this.offset=d.offset||0;this.stacks={};this.oldStacks={};this.stacksTouched=0;this.min=this.max=null;this.crosshair=x(d.crosshair,u(a.options.tooltip.crosshairs)[b?0:1],!1);var f;c=this.options.events;-1===q(this,a.axes)&&(b?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this));this.series=this.series||[];a.inverted&&b&&void 0===this.reversed&&(this.reversed=!0);this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(f in c)D(this,f,c[f]);
this.isLog&&(this.val2lin=this.log2lin,this.lin2val=this.lin2log)},setOptions:function(a){this.options=n(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],n(w[this.coll],a))},defaultLabelFormatter:function(){var c=this.axis,b=this.value,d=c.categories,e=this.dateTimeLabelFormat,q=w.lang,u=q.numericSymbols,q=q.numericSymbolMagnitude||1E3,n=u&&u.length,g,y=c.options.labels.format,
c=c.isLog?b:c.tickInterval;if(y)g=f(y,this);else if(d)g=b;else if(e)g=a.dateFormat(e,b);else if(n&&1E3<=c)for(;n--&&void 0===g;)d=Math.pow(q,n+1),c>=d&&0===10*b%d&&null!==u[n]&&0!==b&&(g=a.numberFormat(b/d,-1)+u[n]);void 0===g&&(g=1E4<=Math.abs(b)?a.numberFormat(b,-1):a.numberFormat(b,-1,void 0,""));return g},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();e(a.series,function(v){if(v.visible||
!d.options.chart.ignoreHiddenSeries){var f=v.options,e=f.threshold,q;a.hasVisibleSeries=!0;a.isLog&&0>=e&&(e=null);if(a.isXAxis)f=v.xData,f.length&&(v=H(f),c(v)||v instanceof Date||(f=b(f,function(a){return c(a)}),v=H(f)),a.dataMin=Math.min(x(a.dataMin,f[0]),v),a.dataMax=Math.max(x(a.dataMax,f[0]),G(f)));else if(v.getExtremes(),q=v.dataMax,v=v.dataMin,t(v)&&t(q)&&(a.dataMin=Math.min(x(a.dataMin,v),v),a.dataMax=Math.max(x(a.dataMax,q),q)),t(e)&&(a.threshold=e),!f.softThreshold||a.isLog)a.softThreshold=
!1}})},translate:function(a,b,d,f,e,q){var v=this.linkedParent||this,u=1,n=0,g=f?v.oldTransA:v.transA;f=f?v.oldMin:v.min;var K=v.minPixelPadding;e=(v.isOrdinal||v.isBroken||v.isLog&&e)&&v.lin2val;g||(g=v.transA);d&&(u*=-1,n=v.len);v.reversed&&(u*=-1,n-=u*(v.sector||v.len));b?(a=(a*u+n-K)/g+f,e&&(a=v.lin2val(a))):(e&&(a=v.val2lin(a)),a=u*(a-f)*g+n+u*K+(c(q)?g*q:0));return a},toPixels:function(a,c){return this.translate(a,!1,!this.horiz,null,!0)+(c?0:this.pos)},toValue:function(a,c){return this.translate(a-
(c?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,d,f,e){var v=this.chart,q=this.left,u=this.top,n,g,K=d&&v.oldChartHeight||v.chartHeight,y=d&&v.oldChartWidth||v.chartWidth,z;n=this.transB;var h=function(a,c,b){if(a<c||a>b)f?a=Math.min(Math.max(c,a),b):z=!0;return a};e=x(e,this.translate(a,null,null,d));a=d=Math.round(e+n);n=g=Math.round(K-e-n);c(e)?this.horiz?(n=u,g=K-this.bottom,a=d=h(a,q,q+this.width)):(a=q,d=y-this.right,n=g=h(n,u,u+this.height)):z=!0;return z&&!f?null:v.renderer.crispLine(["M",
a,n,"L",d,g],b||1)},getLinearTickPositions:function(a,b,d){var v,f=r(Math.floor(b/a)*a),e=r(Math.ceil(d/a)*a),q=[];if(b===d&&c(b))return[b];for(b=f;b<=e;){q.push(b);b=r(b+a);if(b===v)break;v=b}return q},getMinorTickPositions:function(){var a=this.options,c=this.tickPositions,b=this.minorTickInterval,d=[],f,e=this.pointRangePadding||0;f=this.min-e;var e=this.max+e,q=e-f;if(q&&q/b<this.len/3)if(this.isLog)for(e=c.length,f=1;f<e;f++)d=d.concat(this.getLogTickPositions(b,c[f-1],c[f],!0));else if(this.isDatetimeAxis&&
"auto"===a.minorTickInterval)d=d.concat(this.getTimeTicks(this.normalizeTimeTickInterval(b),f,e,a.startOfWeek));else for(c=f+(c[0]-f)%b;c<=e&&c!==d[0];c+=b)d.push(c);0!==d.length&&this.trimTicks(d,a.startOnTick,a.endOnTick);return d},adjustForMinRange:function(){var a=this.options,c=this.min,b=this.max,d,f=this.dataMax-this.dataMin>=this.minRange,q,u,n,g,y,h;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(t(a.min)||t(a.max)?this.minRange=null:(e(this.series,function(a){g=a.xData;for(u=y=a.xIncrement?
1:g.length-1;0<u;u--)if(n=g[u]-g[u-1],void 0===q||n<q)q=n}),this.minRange=Math.min(5*q,this.dataMax-this.dataMin)));b-c<this.minRange&&(h=this.minRange,d=(h-b+c)/2,d=[c-d,x(a.min,c-d)],f&&(d[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),c=G(d),b=[c+h,x(a.max,c+h)],f&&(b[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),b=H(b),b-c<h&&(d[0]=b-h,d[1]=x(a.min,b-h),c=G(d)));this.min=c;this.max=b},getClosest:function(){var a;this.categories?a=1:e(this.series,function(c){var b=c.closestPointRange,
d=c.visible||!c.chart.options.chart.ignoreHiddenSeries;!c.noSharedTooltip&&t(b)&&d&&(a=t(a)?Math.min(a,b):b)});return a},nameToX:function(a){var c=E(this.categories),b=c?this.categories:this.names,d=a.options.x,v;a.series.requireSorting=!1;t(d)||(d=!1===this.options.uniqueNames?a.series.autoIncrement():q(a.name,b));-1===d?c||(v=b.length):v=d;this.names[v]=a.name;return v},updateNames:function(){var a=this;0<this.names.length&&(this.names.length=0,this.minRange=void 0,e(this.series||[],function(c){c.xIncrement=
null;if(!c.points||c.isDirtyData)c.processData(),c.generatePoints();e(c.points,function(b,d){var v;b.options&&void 0===b.options.x&&(v=a.nameToX(b),v!==b.x&&(b.x=v,c.xData[d]=v))})}))},setAxisTranslation:function(a){var c=this,b=c.max-c.min,d=c.axisPointRange||0,v,f=0,q=0,u=c.linkedParent,n=!!c.categories,g=c.transA,y=c.isXAxis;if(y||n||d)u?(f=u.minPointOffset,q=u.pointRangePadding):(v=c.getClosest(),e(c.series,function(a){var b=n?1:y?x(a.options.pointRange,v,0):c.axisPointRange||0;a=a.options.pointPlacement;
d=Math.max(d,b);c.single||(f=Math.max(f,F(a)?0:b/2),q=Math.max(q,"on"===a?0:b))})),u=c.ordinalSlope&&v?c.ordinalSlope/v:1,c.minPointOffset=f*=u,c.pointRangePadding=q*=u,c.pointRange=Math.min(d,b),y&&(c.closestPointRange=v);a&&(c.oldTransA=g);c.translationSlope=c.transA=g=c.len/(b+q||1);c.transB=c.horiz?c.left:c.bottom;c.minPixelPadding=g*f},minFromRange:function(){return this.max-this.range},setTickInterval:function(a){var b=this,v=b.chart,f=b.options,q=b.isLog,u=b.log2lin,n=b.isDatetimeAxis,y=b.isXAxis,
h=b.isLinked,I=f.maxPadding,m=f.minPadding,k=f.tickInterval,F=f.tickPixelInterval,l=b.categories,E=b.threshold,M=b.softThreshold,p,J,w,B;n||l||h||this.getTickAmount();w=x(b.userMin,f.min);B=x(b.userMax,f.max);h?(b.linkedParent=v[b.coll][f.linkedTo],v=b.linkedParent.getExtremes(),b.min=x(v.min,v.dataMin),b.max=x(v.max,v.dataMax),f.type!==b.linkedParent.options.type&&g(11,1)):(!M&&t(E)&&(b.dataMin>=E?(p=E,m=0):b.dataMax<=E&&(J=E,I=0)),b.min=x(w,p,b.dataMin),b.max=x(B,J,b.dataMax));q&&(!a&&0>=Math.min(b.min,
x(b.dataMin,b.min))&&g(10,1),b.min=r(u(b.min),15),b.max=r(u(b.max),15));b.range&&t(b.max)&&(b.userMin=b.min=w=Math.max(b.min,b.minFromRange()),b.userMax=B=b.max,b.range=null);C(b,"foundExtremes");b.beforePadding&&b.beforePadding();b.adjustForMinRange();!(l||b.axisPointRange||b.usePercentage||h)&&t(b.min)&&t(b.max)&&(u=b.max-b.min)&&(!t(w)&&m&&(b.min-=u*m),!t(B)&&I&&(b.max+=u*I));c(f.floor)?b.min=Math.max(b.min,f.floor):c(f.softMin)&&(b.min=Math.min(b.min,f.softMin));c(f.ceiling)?b.max=Math.min(b.max,
f.ceiling):c(f.softMax)&&(b.max=Math.max(b.max,f.softMax));M&&t(b.dataMin)&&(E=E||0,!t(w)&&b.min<E&&b.dataMin>=E?b.min=E:!t(B)&&b.max>E&&b.dataMax<=E&&(b.max=E));b.tickInterval=b.min===b.max||void 0===b.min||void 0===b.max?1:h&&!k&&F===b.linkedParent.options.tickPixelInterval?k=b.linkedParent.tickInterval:x(k,this.tickAmount?(b.max-b.min)/Math.max(this.tickAmount-1,1):void 0,l?1:(b.max-b.min)*F/Math.max(b.len,F));y&&!a&&e(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);
b.beforeSetTickPositions&&b.beforeSetTickPositions();b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval));b.pointRange&&!k&&(b.tickInterval=Math.max(b.pointRange,b.tickInterval));a=x(f.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);!k&&b.tickInterval<a&&(b.tickInterval=a);n||q||k||(b.tickInterval=A(b.tickInterval,null,d(b.tickInterval),x(f.allowDecimals,!(.5<b.tickInterval&&5>b.tickInterval&&1E3<b.max&&9999>b.max)),!!this.tickAmount));this.tickAmount||(b.tickInterval=
b.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,b,c=a.tickPositions,d=a.tickPositioner,f=a.startOnTick,e=a.endOnTick,q;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===a.minorTickInterval&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.tickPositions=b=c&&c.slice();!b&&(b=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),b.length>this.len&&(b=[b[0],b.pop()]),this.tickPositions=b,d&&(d=d.apply(this,[this.min,this.max])))&&(this.tickPositions=b=d);this.isLinked||(this.trimTicks(b,f,e),this.min===this.max&&t(this.min)&&!this.tickAmount&&(q=!0,this.min-=.5,this.max+=.5),this.single=q,c||d||this.adjustTickAmount())},
trimTicks:function(a,b,c){var d=a[0],f=a[a.length-1],v=this.minPointOffset||0;if(b)this.min=d;else for(;this.min-v>a[0];)a.shift();if(c)this.max=f;else for(;this.max+v<a[a.length-1];)a.pop();0===a.length&&t(d)&&a.push((f+d)/2)},alignToOthers:function(){var a={},b,c=this.options;!1!==this.chart.options.chart.alignTicks&&!1!==c.alignTicks&&e(this.chart[this.coll],function(c){var d=c.options,d=[c.horiz?d.left:d.top,d.width,d.height,d.pane].join();c.series.length&&(a[d]?b=!0:a[d]=1)});return b},getTickAmount:function(){var a=
this.options,b=a.tickAmount,c=a.tickPixelInterval;!t(a.tickInterval)&&this.len<c&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(b=2);!b&&this.alignToOthers()&&(b=Math.ceil(this.len/c)+1);4>b&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,c=this.tickAmount,d=this.finalTickAmt,f=b&&b.length;if(f<c){for(;b.length<c;)b.push(r(b[b.length-1]+a));this.transA*=(f-1)/(c-1);this.max=b[b.length-1]}else f>c&&(this.tickInterval*=
2,this.setTickPositions());if(t(d)){for(a=c=b.length;a--;)(3===d&&1===a%2||2>=d&&0<a&&a<c-1)&&b.splice(a,1);this.finalTickAmt=void 0}},setScale:function(){var a,b;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();b=this.len!==this.oldAxisLength;e(this.series,function(b){if(b.isDirtyData||b.isDirty||b.xAxis.isDirty)a=!0});b||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&
this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=b||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,b,c,d,f){var v=this,q=v.chart;c=x(c,!0);e(v.series,function(a){delete a.kdTree});f=h(f,{min:a,max:b});C(v,"setExtremes",f,function(){v.userMin=a;v.userMax=b;v.eventArgs=f;c&&q.redraw(d)})},zoom:function(a,b){var c=this.dataMin,
d=this.dataMax,f=this.options,v=Math.min(c,x(f.min,c)),f=Math.max(d,x(f.max,d));if(a!==this.min||b!==this.max)this.allowZoomOutside||(t(c)&&a<=v&&(a=v),t(d)&&b>=f&&(b=f)),this.displayBtn=void 0!==a||void 0!==b,this.setExtremes(a,b,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=this.horiz,f=x(b.width,a.plotWidth-c+(b.offsetRight||0)),e=x(b.height,a.plotHeight),q=x(b.top,a.plotTop),b=x(b.left,a.plotLeft+c),c=/%$/;c.test(e)&&(e=Math.round(parseFloat(e)/
100*a.plotHeight));c.test(q)&&(q=Math.round(parseFloat(q)/100*a.plotHeight+a.plotTop));this.left=b;this.top=q;this.width=f;this.height=e;this.bottom=a.chartHeight-e-q;this.right=a.chartWidth-f-b;this.len=Math.max(d?f:e,0);this.pos=d?b:q},getExtremes:function(){var a=this.isLog,b=this.lin2log;return{min:a?r(b(this.min)):this.min,max:a?r(b(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=this.lin2log,
d=b?c(this.min):this.min,b=b?c(this.max):this.max;null===a?a=d:d>a?a=d:b<a&&(a=b);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){a=(x(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var b=this.options,c=b[a+"Length"],d=x(b[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(d&&c)return"inside"===b[a+"Position"]&&(c=-c),[c,d]},labelMetrics:function(){return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,
this.ticks[0]&&this.ticks[0].label)},unsquish:function(){var a=this.options.labels,b=this.horiz,c=this.tickInterval,d=c,f=this.len/(((this.categories?1:0)+this.max-this.min)/c),q,u=a.rotation,n=this.labelMetrics(),g,y=Number.MAX_VALUE,h,I=function(a){a/=f||1;a=1<a?Math.ceil(a):1;return a*c};b?(h=!a.staggerLines&&!a.step&&(t(u)?[u]:f<x(a.autoRotationLimit,80)&&a.autoRotation))&&e(h,function(a){var b;if(a===u||a&&-90<=a&&90>=a)g=I(Math.abs(n.h/Math.sin(k*a))),b=g+Math.abs(a/360),b<y&&(y=b,q=a,d=g)}):
a.step||(d=I(n.h));this.autoRotation=h;this.labelRotation=x(q,u);return d},getSlotWidth:function(){var a=this.chart,b=this.horiz,c=this.options.labels,d=Math.max(this.tickPositions.length-(this.categories?0:1),1),f=a.margin[3];return b&&2>(c.step||0)&&!c.rotation&&(this.staggerLines||1)*a.plotWidth/d||!b&&(f&&f-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,c=this.tickPositions,d=this.ticks,f=this.options.labels,q=this.horiz,u=this.getSlotWidth(),g=Math.max(1,
Math.round(u-2*(f.padding||5))),y={},h=this.labelMetrics(),I=f.style&&f.style.textOverflow,A,x=0,m,k;F(f.rotation)||(y.rotation=f.rotation||0);e(c,function(a){(a=d[a])&&a.labelLength>x&&(x=a.labelLength)});this.maxLabelLength=x;if(this.autoRotation)x>g&&x>h.h?y.rotation=this.labelRotation:this.labelRotation=0;else if(u&&(A={width:g+"px"},!I))for(A.textOverflow="clip",m=c.length;!q&&m--;)if(k=c[m],g=d[k].label)g.styles&&"ellipsis"===g.styles.textOverflow?g.css({textOverflow:"clip"}):d[k].labelLength>
u&&g.css({width:u+"px"}),g.getBBox().height>this.len/c.length-(h.h-h.f)&&(g.specCss={textOverflow:"ellipsis"});y.rotation&&(A={width:(x>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},I||(A.textOverflow="ellipsis"));if(this.labelAlign=f.align||this.autoLabelAlign(this.labelRotation))y.align=this.labelAlign;e(c,function(a){var b=(a=d[a])&&a.label;b&&(b.attr(y),A&&b.css(n(A,b.specCss)),delete b.specCss,a.rotation=y.rotation)});this.tickRotCorr=b.rotCorr(h.b,this.labelRotation||0,0!==this.side)},
hasData:function(){return this.hasVisibleSeries||t(this.min)&&t(this.max)&&!!this.tickPositions},getOffset:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,f=a.tickPositions,q=a.ticks,u=a.horiz,n=a.side,g=b.inverted?[1,0,3,2][n]:n,y,h,I=0,A,m=0,k=d.title,F=d.labels,E=0,l=a.opposite,C=b.axisOffset,b=b.clipOffset,p=[-1,1,1,-1][n],r,J=d.className,w=a.axisParent,B=this.tickSize("tick");y=a.hasData();a.showAxis=h=y||x(d.showEmpty,!0);a.staggerLines=a.horiz&&F.staggerLines;a.axisGroup||(a.gridGroup=
c.g("grid").attr({zIndex:d.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(J||"")).add(w),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(J||"")).add(w),a.labelGroup=c.g("axis-labels").attr({zIndex:F.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(J||"")).add(w));if(y||a.isLinked)e(f,function(b){q[b]?q[b].addLabel():q[b]=new M(a,b)}),a.renderUnsquish(),!1===F.reserveSpace||0!==n&&2!==n&&{1:"left",3:"right"}[n]!==
a.labelAlign&&"center"!==a.labelAlign||e(f,function(a){E=Math.max(q[a].getLabelSize(),E)}),a.staggerLines&&(E*=a.staggerLines,a.labelOffset=E*(a.opposite?-1:1));else for(r in q)q[r].destroy(),delete q[r];k&&k.text&&!1!==k.enabled&&(a.axisTitle||((r=k.textAlign)||(r=(u?{low:"left",middle:"center",high:"right"}:{low:l?"right":"left",middle:"center",high:l?"left":"right"})[k.align]),a.axisTitle=c.text(k.text,0,0,k.useHTML).attr({zIndex:7,rotation:k.rotation||0,align:r}).addClass("highcharts-axis-title").css(k.style).add(a.axisGroup),
a.axisTitle.isNew=!0),h&&(I=a.axisTitle.getBBox()[u?"height":"width"],A=k.offset,m=t(A)?0:x(k.margin,u?5:10)),a.axisTitle[h?"show":"hide"](!0));a.renderLine();a.offset=p*x(d.offset,C[n]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};c=0===n?-a.labelMetrics().h:2===n?a.tickRotCorr.y:0;m=Math.abs(E)+m;E&&(m=m-c+p*(u?x(F.y,a.tickRotCorr.y+8*p):F.x));a.axisTitleMargin=x(A,m);C[n]=Math.max(C[n],a.axisTitleMargin+I+p*a.offset,m,y&&f.length&&B?B[0]:0);d=d.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);b[g]=
Math.max(b[g],d)},getLinePath:function(a){var b=this.chart,c=this.opposite,d=this.offset,f=this.horiz,e=this.left+(c?this.width:0)+d,d=b.chartHeight-this.bottom-(c?this.height:0)+d;c&&(a*=-1);return b.renderer.crispLine(["M",f?this.left:e,f?d:this.top,"L",f?b.chartWidth-this.right:e,f?d:b.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,b=this.left,c=this.top,d=this.len,f=this.options.title,e=a?b:c,q=this.opposite,u=this.offset,n=f.x||0,g=f.y||0,y=this.chart.renderer.fontMetrics(f.style&&f.style.fontSize,this.axisTitle).f,d={low:e+(a?0:d),middle:e+d/2,high:e+(a?d:0)}[f.align],b=(a?c+this.height:b)+(a?1:-1)*(q?-1:1)*this.axisTitleMargin+(2===this.side?y:0);return{x:a?d+n:b+(q?this.width:0)+u+n,y:a?b+g-(q?this.height:0)+u:d+g}},render:function(){var a=
this,b=a.chart,d=b.renderer,f=a.options,q=a.isLog,u=a.lin2log,n=a.isLinked,g=a.tickPositions,y=a.axisTitle,h=a.ticks,A=a.minorTicks,x=a.alternateBands,m=f.stackLabels,k=f.alternateGridColor,F=a.tickmarkOffset,E=a.axisLine,l=b.hasRendered&&c(a.oldMin),C=a.showAxis,p=B(d.globalAnimation),r,t;a.labelEdge.length=0;a.overlap=!1;e([h,A,x],function(a){for(var b in a)a[b].isActive=!1});if(a.hasData()||n)a.minorTickInterval&&!a.categories&&e(a.getMinorTickPositions(),function(b){A[b]||(A[b]=new M(a,b,"minor"));
l&&A[b].isNew&&A[b].render(null,!0);A[b].render(null,!1,1)}),g.length&&(e(g,function(b,c){if(!n||b>=a.min&&b<=a.max)h[b]||(h[b]=new M(a,b)),l&&h[b].isNew&&h[b].render(c,!0,.1),h[b].render(c)}),F&&(0===a.min||a.single)&&(h[-1]||(h[-1]=new M(a,-1,null,!0)),h[-1].render(-1))),k&&e(g,function(c,d){t=void 0!==g[d+1]?g[d+1]+F:a.max-F;0===d%2&&c<a.max&&t<=a.max+(b.polar?-F:F)&&(x[c]||(x[c]=new J(a)),r=c+F,x[c].options={from:q?u(r):r,to:q?u(t):t,color:k},x[c].render(),x[c].isActive=!0)}),a._addedPlotLB||
(e((f.plotLines||[]).concat(f.plotBands||[]),function(b){a.addPlotBandOrLine(b)}),a._addedPlotLB=!0);e([h,A,x],function(a){var c,d,f=[],e=p.duration;for(c in a)a[c].isActive||(a[c].render(c,!1,0),a[c].isActive=!1,f.push(c));I(function(){for(d=f.length;d--;)a[f[d]]&&!a[f[d]].isActive&&(a[f[d]].destroy(),delete a[f[d]])},a!==x&&b.hasRendered&&e?e:0)});E&&(E[E.isPlaced?"animate":"attr"]({d:this.getLinePath(E.strokeWidth())}),E.isPlaced=!0,E[C?"show":"hide"](!0));y&&C&&(y[y.isNew?"attr":"animate"](a.getTitlePosition()),
y.isNew=!1);m&&m.enabled&&a.renderStackTotals();a.isDirty=!1},redraw:function(){this.visible&&(this.render(),e(this.plotLinesAndBands,function(a){a.render()}));e(this.series,function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var b=this,c=b.stacks,d,f=b.plotLinesAndBands,u;a||y(b);for(d in c)m(c[d]),c[d]=null;e([b.ticks,b.minorTicks,b.alternateBands],function(a){m(a)});if(f)for(a=f.length;a--;)f[a].destroy();e("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),
function(a){b[a]&&(b[a]=b[a].destroy())});for(u in b)b.hasOwnProperty(u)&&-1===q(u,b.keepProps)&&delete b[u]},drawCrosshair:function(a,b){var c,d=this.crosshair,f=x(d.snap,!0),e,q=this.cross;a||(a=this.cross&&this.cross.e);this.crosshair&&!1!==(t(b)||!f)?(f?t(b)&&(e=this.isXAxis?b.plotX:this.len-b.plotY):e=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos),t(e)&&(c=this.getPlotLinePath(b&&(this.isXAxis?b.x:x(b.stackY,b.y)),null,null,null,e)||null),t(c)?(b=this.categories&&!this.isRadial,
q||(this.cross=q=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(b?"category ":"thin ")+d.className).attr({zIndex:x(d.zIndex,2)}).add(),q.attr({stroke:d.color||(b?l("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":x(d.width,1)}),d.dashStyle&&q.attr({dashstyle:d.dashStyle})),q.show().attr({d:c}),b&&!d.width&&q.attr({"stroke-width":this.transA}),this.cross.e=a):this.hideCrosshair()):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}};
h(a.Axis.prototype,p)})(N);(function(a){var D=a.Axis,B=a.Date,G=a.dateFormat,H=a.defaultOptions,p=a.defined,l=a.each,r=a.extend,w=a.getMagnitude,t=a.getTZOffset,k=a.normalizeTickInterval,m=a.pick,e=a.timeUnits;D.prototype.getTimeTicks=function(a,h,k,f){var d=[],b={},q=H.global.useUTC,g,c=new B(h-t(h)),F=B.hcMakeTime,n=a.unitRange,A=a.count,x;if(p(h)){c[B.hcSetMilliseconds](n>=e.second?0:A*Math.floor(c.getMilliseconds()/A));if(n>=e.second)c[B.hcSetSeconds](n>=e.minute?0:A*Math.floor(c.getSeconds()/
A));if(n>=e.minute)c[B.hcSetMinutes](n>=e.hour?0:A*Math.floor(c[B.hcGetMinutes]()/A));if(n>=e.hour)c[B.hcSetHours](n>=e.day?0:A*Math.floor(c[B.hcGetHours]()/A));if(n>=e.day)c[B.hcSetDate](n>=e.month?1:A*Math.floor(c[B.hcGetDate]()/A));n>=e.month&&(c[B.hcSetMonth](n>=e.year?0:A*Math.floor(c[B.hcGetMonth]()/A)),g=c[B.hcGetFullYear]());if(n>=e.year)c[B.hcSetFullYear](g-g%A);if(n===e.week)c[B.hcSetDate](c[B.hcGetDate]()-c[B.hcGetDay]()+m(f,1));g=c[B.hcGetFullYear]();f=c[B.hcGetMonth]();var C=c[B.hcGetDate](),
y=c[B.hcGetHours]();if(B.hcTimezoneOffset||B.hcGetTimezoneOffset)x=(!q||!!B.hcGetTimezoneOffset)&&(k-h>4*e.month||t(h)!==t(k)),c=c.getTime(),c=new B(c+t(c));q=c.getTime();for(h=1;q<k;)d.push(q),q=n===e.year?F(g+h*A,0):n===e.month?F(g,f+h*A):!x||n!==e.day&&n!==e.week?x&&n===e.hour?F(g,f,C,y+h*A):q+n*A:F(g,f,C+h*A*(n===e.day?1:7)),h++;d.push(q);n<=e.hour&&l(d,function(a){"000000000"===G("%H%M%S%L",a)&&(b[a]="day")})}d.info=r(a,{higherRanks:b,totalRange:n*A});return d};D.prototype.normalizeTimeTickInterval=
function(a,h){var g=h||[["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]];h=g[g.length-1];var f=e[h[0]],d=h[1],b;for(b=0;b<g.length&&!(h=g[b],f=e[h[0]],d=h[1],g[b+1]&&a<=(f*d[d.length-1]+e[g[b+1][0]])/2);b++);f===e.year&&a<5*f&&(d=[1,2,5]);a=k(a/f,d,"year"===h[0]?Math.max(w(a/f),1):1);return{unitRange:f,count:a,unitName:h[0]}}})(N);(function(a){var D=a.Axis,
B=a.getMagnitude,G=a.map,H=a.normalizeTickInterval,p=a.pick;D.prototype.getLogTickPositions=function(a,r,w,t){var k=this.options,m=this.len,e=this.lin2log,g=this.log2lin,h=[];t||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),h=this.getLinearTickPositions(a,r,w);else if(.08<=a)for(var m=Math.floor(r),l,f,d,b,q,k=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];m<w+1&&!q;m++)for(f=k.length,l=0;l<f&&!q;l++)d=g(e(m)*k[l]),d>r&&(!t||b<=w)&&void 0!==b&&h.push(b),b>w&&(q=!0),b=d;else r=e(r),w=
e(w),a=k[t?"minorTickInterval":"tickInterval"],a=p("auto"===a?null:a,this._minorAutoInterval,k.tickPixelInterval/(t?5:1)*(w-r)/((t?m/this.tickPositions.length:m)||1)),a=H(a,null,B(a)),h=G(this.getLinearTickPositions(a,r,w),g),t||(this._minorAutoInterval=a/5);t||(this.tickInterval=a);return h};D.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};D.prototype.lin2log=function(a){return Math.pow(10,a)}})(N);(function(a){var D=a.dateFormat,B=a.each,G=a.extend,H=a.format,p=a.isNumber,l=a.map,r=
a.merge,w=a.pick,t=a.splat,k=a.stop,m=a.syncTimeout,e=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)};a.Tooltip.prototype={init:function(a,e){this.chart=a;this.options=e;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=e.split&&!a.inverted;this.shared=e.shared||this.split},cleanSplit:function(a){B(this.chart.series,function(e){var g=e&&e.tt;g&&(!g.isActive||a?e.tt=g.destroy():g.isActive=!1)})},getLabel:function(){var a=this.chart.renderer,e=this.options;this.label||
(this.split?this.label=a.g("tooltip"):(this.label=a.label("",0,0,e.shape||"callout",null,null,e.useHTML,null,"tooltip").attr({padding:e.padding,r:e.borderRadius}),this.label.attr({fill:e.backgroundColor,"stroke-width":e.borderWidth}).css(e.style).shadow(e.shadow)),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();this.init(this.chart,r(!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,e,m,f){var d=this,b=d.now,q=!1!==d.options.animation&&!d.isHidden&&(1<Math.abs(a-b.x)||1<Math.abs(e-b.y)),g=d.followPointer||1<d.len;G(b,{x:q?(2*b.x+a)/3:a,y:q?(b.y+e)/2:e,anchorX:g?void 0:q?(2*b.anchorX+m)/3:m,anchorY:g?void 0:q?(b.anchorY+f)/2:f});d.getLabel().attr(b);q&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){d&&d.move(a,e,m,f)},32))},hide:function(a){var e=
this;clearTimeout(this.hideTimer);a=w(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=m(function(){e.getLabel()[a?"fadeOut":"hide"]();e.isHidden=!0},a))},getAnchor:function(a,e){var g,f=this.chart,d=f.inverted,b=f.plotTop,q=f.plotLeft,h=0,c=0,m,n;a=t(a);g=a[0].tooltipPos;this.followPointer&&e&&(void 0===e.chartX&&(e=f.pointer.normalize(e)),g=[e.chartX-f.plotLeft,e.chartY-b]);g||(B(a,function(a){m=a.series.yAxis;n=a.series.xAxis;h+=a.plotX+(!d&&n?n.left-q:0);c+=(a.plotLow?(a.plotLow+a.plotHigh)/
2:a.plotY)+(!d&&m?m.top-b:0)}),h/=a.length,c/=a.length,g=[d?f.plotWidth-c:h,this.shared&&!d&&1<a.length&&e?e.chartY-b:d?f.plotHeight-h:c]);return l(g,Math.round)},getPosition:function(a,e,m){var f=this.chart,d=this.distance,b={},q=m.h||0,g,c=["y",f.chartHeight,e,m.plotY+f.plotTop,f.plotTop,f.plotTop+f.plotHeight],h=["x",f.chartWidth,a,m.plotX+f.plotLeft,f.plotLeft,f.plotLeft+f.plotWidth],n=!this.followPointer&&w(m.ttBelow,!f.inverted===!!m.negative),A=function(a,c,f,e,g,y){var u=f<e-d,v=e+d+f<c,h=
e-d-f;e+=d;if(n&&v)b[a]=e;else if(!n&&u)b[a]=h;else if(u)b[a]=Math.min(y-f,0>h-q?h:h-q);else if(v)b[a]=Math.max(g,e+q+f>c?e:e+q);else return!1},x=function(a,c,f,e){var q;e<d||e>c-d?q=!1:b[a]=e<f/2?1:e>c-f/2?c-f-2:e-f/2;return q},k=function(a){var b=c;c=h;h=b;g=a},y=function(){!1!==A.apply(0,c)?!1!==x.apply(0,h)||g||(k(!0),y()):g?b.x=b.y=0:(k(!0),y())};(f.inverted||1<this.len)&&k();y();return b},defaultFormatter:function(a){var e=this.points||t(this),g;g=[a.tooltipFooterHeaderFormatter(e[0])];g=g.concat(a.bodyFormatter(e));
g.push(a.tooltipFooterHeaderFormatter(e[0],!0));return g},refresh:function(a,e){var g=this.chart,f,d=this.options,b,q,h={},c=[];f=d.formatter||this.defaultFormatter;var h=g.hoverPoints,m=this.shared;clearTimeout(this.hideTimer);this.followPointer=t(a)[0].series.tooltipOptions.followPointer;q=this.getAnchor(a,e);e=q[0];b=q[1];!m||a.series&&a.series.noSharedTooltip?h=a.getLabelConfig():(g.hoverPoints=a,h&&B(h,function(a){a.setState()}),B(a,function(a){a.setState("hover");c.push(a.getLabelConfig())}),
h={x:a[0].category,y:a[0].y},h.points=c,this.len=c.length,a=a[0]);h=f.call(h,this);m=a.series;this.distance=w(m.tooltipOptions.distance,16);!1===h?this.hide():(f=this.getLabel(),this.isHidden&&(k(f),f.attr({opacity:1}).show()),this.split?this.renderSplit(h,g.hoverPoints):(f.attr({text:h&&h.join?h.join(""):h}),f.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+w(a.colorIndex,m.colorIndex)),f.attr({stroke:d.borderColor||a.color||m.color||"#666666"}),this.updatePosition({plotX:e,plotY:b,
negative:a.negative,ttBelow:a.ttBelow,h:q[2]||0})),this.isHidden=!1)},renderSplit:function(e,h){var g=this,f=[],d=this.chart,b=d.renderer,q=!0,m=this.options,c,k=this.getLabel();B(e.slice(0,e.length-1),function(a,e){e=h[e-1]||{isHeader:!0,plotX:h[0].plotX};var n=e.series||g,A=n.tt,y=e.series||{},u="highcharts-color-"+w(e.colorIndex,y.colorIndex,"none");A||(n.tt=A=b.label(null,null,null,"callout").addClass("highcharts-tooltip-box "+u).attr({padding:m.padding,r:m.borderRadius,fill:m.backgroundColor,
stroke:e.color||y.color||"#333333","stroke-width":m.borderWidth}).add(k));A.isActive=!0;A.attr({text:a});A.css(m.style);a=A.getBBox();y=a.width+A.strokeWidth();e.isHeader?(c=a.height,y=Math.max(0,Math.min(e.plotX+d.plotLeft-y/2,d.chartWidth-y))):y=e.plotX+d.plotLeft-w(m.distance,16)-y;0>y&&(q=!1);a=(e.series&&e.series.yAxis&&e.series.yAxis.pos)+(e.plotY||0);a-=d.plotTop;f.push({target:e.isHeader?d.plotHeight+c:a,rank:e.isHeader?1:0,size:n.tt.getBBox().height+1,point:e,x:y,tt:A})});this.cleanSplit();
a.distribute(f,d.plotHeight+c);B(f,function(a){var b=a.point;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:q||b.isHeader?a.x:b.plotX+d.plotLeft+w(m.distance,16),y:a.pos+d.plotTop,anchorX:b.plotX+d.plotLeft,anchorY:b.isHeader?a.pos+d.plotTop-15:b.plotY+d.plotTop})})},updatePosition:function(a){var e=this.chart,g=this.getLabel(),g=(this.options.positioner||this.getPosition).call(this,g.width,g.height,a);this.move(Math.round(g.x),Math.round(g.y||0),a.plotX+e.plotLeft,a.plotY+e.plotTop)},
getXDateFormat:function(a,h,m){var f;h=h.dateTimeLabelFormats;var d=m&&m.closestPointRange,b,q={millisecond:15,second:12,minute:9,hour:6,day:3},g,c="millisecond";if(d){g=D("%m-%d %H:%M:%S.%L",a.x);for(b in e){if(d===e.week&&+D("%w",a.x)===m.options.startOfWeek&&"00:00:00.000"===g.substr(6)){b="week";break}if(e[b]>d){b=c;break}if(q[b]&&g.substr(q[b])!=="01-01 00:00:00.000".substr(q[b]))break;"week"!==b&&(c=b)}b&&(f=h[b])}else f=h.day;return f||h.year},tooltipFooterHeaderFormatter:function(a,e){var g=
e?"footer":"header";e=a.series;var f=e.tooltipOptions,d=f.xDateFormat,b=e.xAxis,q=b&&"datetime"===b.options.type&&p(a.key),g=f[g+"Format"];q&&!d&&(d=this.getXDateFormat(a,f,b));q&&d&&(g=g.replace("{point.key}","{point.key:"+d+"}"));return H(g,{point:a,series:e})},bodyFormatter:function(a){return l(a,function(a){var e=a.series.tooltipOptions;return(e.pointFormatter||a.point.tooltipFormatter).call(a.point,e.pointFormat)})}}})(N);(function(a){var D=a.addEvent,B=a.attr,G=a.charts,H=a.color,p=a.css,l=
a.defined,r=a.doc,w=a.each,t=a.extend,k=a.fireEvent,m=a.offset,e=a.pick,g=a.removeEvent,h=a.splat,C=a.Tooltip,f=a.win;a.Pointer=function(a,b){this.init(a,b)};a.Pointer.prototype={init:function(a,b){this.options=b;this.chart=a;this.runChartClick=b.chart.events&&!!b.chart.events.click;this.pinchDown=[];this.lastValidTouch={};C&&b.tooltip.enabled&&(a.tooltip=new C(a,b.tooltip),this.followTouchMove=e(b.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,d=b.options.chart,
f=d.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(f=e(d.pinchType,f));this.zoomX=a=/x/.test(f);this.zoomY=f=/y/.test(f);this.zoomHor=a&&!b||f&&b;this.zoomVert=f&&!b||a&&b;this.hasZoom=a||f},normalize:function(a,b){var d,e;a=a||f.event;a.target||(a.target=a.srcElement);e=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;b||(this.chartPosition=b=m(this.chart.container));void 0===e.pageX?(d=Math.max(a.x,a.clientX-b.left),b=a.y):(d=e.pageX-b.left,b=e.pageY-b.top);return t(a,{chartX:Math.round(d),
chartY:Math.round(b)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};w(this.chart.axes,function(d){b[d.isXAxis?"xAxis":"yAxis"].push({axis:d,value:d.toValue(a[d.horiz?"chartX":"chartY"])})});return b},runPointActions:function(d){var b=this.chart,f=b.series,g=b.tooltip,c=g?g.shared:!1,h=!0,n=b.hoverPoint,m=b.hoverSeries,x,k,y,u=[],I;if(!c&&!m)for(x=0;x<f.length;x++)if(f[x].directTouch||!f[x].options.stickyTracking)f=[];m&&(c?m.noSharedTooltip:m.directTouch)&&n?u=[n]:(c||!m||m.options.stickyTracking||
(f=[m]),w(f,function(a){k=a.noSharedTooltip&&c;y=!c&&a.directTouch;a.visible&&!k&&!y&&e(a.options.enableMouseTracking,!0)&&(I=a.searchPoint(d,!k&&1===a.kdDimensions))&&I.series&&u.push(I)}),u.sort(function(a,b){var d=a.distX-b.distX,f=a.dist-b.dist,e=b.series.group.zIndex-a.series.group.zIndex;return 0!==d&&c?d:0!==f?f:0!==e?e:a.series.index>b.series.index?-1:1}));if(c)for(x=u.length;x--;)(u[x].x!==u[0].x||u[x].series.noSharedTooltip)&&u.splice(x,1);if(u[0]&&(u[0]!==this.prevKDPoint||g&&g.isHidden)){if(c&&
!u[0].series.noSharedTooltip){for(x=0;x<u.length;x++)u[x].onMouseOver(d,u[x]!==(m&&m.directTouch&&n||u[0]));u.length&&g&&g.refresh(u.sort(function(a,b){return a.series.index-b.series.index}),d)}else if(g&&g.refresh(u[0],d),!m||!m.directTouch)u[0].onMouseOver(d);this.prevKDPoint=u[0];h=!1}h&&(f=m&&m.tooltipOptions.followPointer,g&&f&&!g.isHidden&&(f=g.getAnchor([{}],d),g.updatePosition({plotX:f[0],plotY:f[1]})));this.unDocMouseMove||(this.unDocMouseMove=D(r,"mousemove",function(b){if(G[a.hoverChartIndex])G[a.hoverChartIndex].pointer.onDocumentMouseMove(b)}));
w(c?u:[e(n,u[0])],function(a){w(b.axes,function(b){(!a||a.series&&a.series[b.coll]===b)&&b.drawCrosshair(d,a)})})},reset:function(a,b){var d=this.chart,f=d.hoverSeries,c=d.hoverPoint,e=d.hoverPoints,g=d.tooltip,m=g&&g.shared?e:c;a&&m&&w(h(m),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)g&&m&&(g.refresh(m),c&&(c.setState(c.state,!0),w(d.axes,function(a){a.crosshair&&a.drawCrosshair(null,c)})));else{if(c)c.onMouseOut();e&&w(e,function(a){a.setState()});if(f)f.onMouseOut();g&&g.hide(b);
this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());w(d.axes,function(a){a.hideCrosshair()});this.hoverX=this.prevKDPoint=d.hoverPoints=d.hoverPoint=null}},scaleGroups:function(a,b){var d=this.chart,f;w(d.series,function(c){f=a||c.getPlotBox();c.xAxis&&c.xAxis.zoomEnabled&&c.group&&(c.group.attr(f),c.markerGroup&&(c.markerGroup.attr(f),c.markerGroup.clip(b?d.clipRect:null)),c.dataLabelsGroup&&c.dataLabelsGroup.attr(f))});d.clipRect.attr(b||d.clipBox)},dragStart:function(a){var b=this.chart;
b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,d=b.options.chart,f=a.chartX,c=a.chartY,e=this.zoomHor,g=this.zoomVert,h=b.plotLeft,m=b.plotTop,k=b.plotWidth,y=b.plotHeight,u,I=this.selectionMarker,l=this.mouseDownX,v=this.mouseDownY,p=d.panKey&&a[d.panKey+"Key"];I&&I.touch||(f<h?f=h:f>h+k&&(f=h+k),c<m?c=m:c>m+y&&(c=m+y),this.hasDragged=Math.sqrt(Math.pow(l-f,2)+Math.pow(v-c,2)),10<this.hasDragged&&
(u=b.isInsidePlot(l-h,v-m),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&u&&!p&&!I&&(this.selectionMarker=I=b.renderer.rect(h,m,e?1:k,g?1:y,0).attr({fill:d.selectionMarkerFill||H("#335cad").setOpacity(.25).get(),"class":"highcharts-selection-marker",zIndex:7}).add()),I&&e&&(f-=l,I.attr({width:Math.abs(f),x:(0<f?0:f)+l})),I&&g&&(f=c-v,I.attr({height:Math.abs(f),y:(0<f?0:f)+v})),u&&!I&&d.panning&&b.pan(a,d.panning)))},drop:function(a){var b=this,d=this.chart,f=this.hasPinched;if(this.selectionMarker){var c=
{originalEvent:a,xAxis:[],yAxis:[]},e=this.selectionMarker,g=e.attr?e.attr("x"):e.x,h=e.attr?e.attr("y"):e.y,m=e.attr?e.attr("width"):e.width,r=e.attr?e.attr("height"):e.height,y;if(this.hasDragged||f)w(d.axes,function(d){if(d.zoomEnabled&&l(d.min)&&(f||b[{xAxis:"zoomX",yAxis:"zoomY"}[d.coll]])){var e=d.horiz,u="touchend"===a.type?d.minPixelPadding:0,q=d.toValue((e?g:h)+u),e=d.toValue((e?g+m:h+r)-u);c[d.coll].push({axis:d,min:Math.min(q,e),max:Math.max(q,e)});y=!0}}),y&&k(d,"selection",c,function(a){d.zoom(t(a,
f?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();f&&this.scaleGroups()}d&&(p(d.container,{cursor:d._cursor}),d.cancelClick=10<this.hasDragged,d.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(d){G[a.hoverChartIndex]&&G[a.hoverChartIndex].pointer.drop(d)},onDocumentMouseMove:function(a){var b=this.chart,
d=this.chartPosition;a=this.normalize(a,d);!d||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(d){var b=G[a.hoverChartIndex];b&&(d.relatedTarget||d.toElement)&&(b.pointer.reset(),b.pointer.chartPosition=null)},onContainerMouseMove:function(d){var b=this.chart;l(a.hoverChartIndex)&&G[a.hoverChartIndex]&&G[a.hoverChartIndex].mouseIsDown||(a.hoverChartIndex=b.index);d=this.normalize(d);d.returnValue=!1;
"mousedown"===b.mouseIsDown&&this.drag(d);!this.inClass(d.target,"highcharts-tracker")&&!b.isInsidePlot(d.chartX-b.plotLeft,d.chartY-b.plotTop)||b.openMenu||this.runPointActions(d)},inClass:function(a,b){for(var d;a;){if(d=B(a,"class")){if(-1!==d.indexOf(b))return!0;if(-1!==d.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;if(!(!b||!a||b.options.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,d=b.hoverPoint,f=b.plotLeft,c=b.plotTop;a=this.normalize(a);b.cancelClick||(d&&this.inClass(a.target,"highcharts-tracker")?(k(d.series,"click",t(a,{point:d})),b.hoverPoint&&d.firePointEvent("click",a)):(t(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-f,a.chartY-c)&&k(b,"click",a)))},setDOMEvents:function(){var d=this,b=d.chart.container;b.onmousedown=
function(a){d.onContainerMouseDown(a)};b.onmousemove=function(a){d.onContainerMouseMove(a)};b.onclick=function(a){d.onContainerClick(a)};D(b,"mouseleave",d.onContainerMouseLeave);1===a.chartCount&&D(r,"mouseup",d.onDocumentMouseUp);a.hasTouch&&(b.ontouchstart=function(a){d.onContainerTouchStart(a)},b.ontouchmove=function(a){d.onContainerTouchMove(a)},1===a.chartCount&&D(r,"touchend",d.onDocumentTouchEnd))},destroy:function(){var d;g(this.chart.container,"mouseleave",this.onContainerMouseLeave);a.chartCount||
(g(r,"mouseup",this.onDocumentMouseUp),g(r,"touchend",this.onDocumentTouchEnd));clearInterval(this.tooltipTimeout);for(d in this)this[d]=null}}})(N);(function(a){var D=a.charts,B=a.each,G=a.extend,H=a.map,p=a.noop,l=a.pick;G(a.Pointer.prototype,{pinchTranslate:function(a,l,p,k,m,e){this.zoomHor&&this.pinchTranslateDirection(!0,a,l,p,k,m,e);this.zoomVert&&this.pinchTranslateDirection(!1,a,l,p,k,m,e)},pinchTranslateDirection:function(a,l,p,k,m,e,g,h){var r=this.chart,f=a?"x":"y",d=a?"X":"Y",b="chart"+
d,q=a?"width":"height",E=r["plot"+(a?"Left":"Top")],c,F,n=h||1,A=r.inverted,x=r.bounds[a?"h":"v"],J=1===l.length,y=l[0][b],u=p[0][b],I=!J&&l[1][b],M=!J&&p[1][b],v;p=function(){!J&&20<Math.abs(y-I)&&(n=h||Math.abs(u-M)/Math.abs(y-I));F=(E-u)/n+y;c=r["plot"+(a?"Width":"Height")]/n};p();l=F;l<x.min?(l=x.min,v=!0):l+c>x.max&&(l=x.max-c,v=!0);v?(u-=.8*(u-g[f][0]),J||(M-=.8*(M-g[f][1])),p()):g[f]=[u,M];A||(e[f]=F-E,e[q]=c);e=A?1/n:n;m[q]=c;m[f]=l;k[A?a?"scaleY":"scaleX":"scale"+d]=n;k["translate"+d]=e*
E+(u-e*y)},pinch:function(a){var r=this,t=r.chart,k=r.pinchDown,m=a.touches,e=m.length,g=r.lastValidTouch,h=r.hasZoom,C=r.selectionMarker,f={},d=1===e&&(r.inClass(a.target,"highcharts-tracker")&&t.runTrackerClick||r.runChartClick),b={};1<e&&(r.initiated=!0);h&&r.initiated&&!d&&a.preventDefault();H(m,function(a){return r.normalize(a)});"touchstart"===a.type?(B(m,function(a,b){k[b]={chartX:a.chartX,chartY:a.chartY}}),g.x=[k[0].chartX,k[1]&&k[1].chartX],g.y=[k[0].chartY,k[1]&&k[1].chartY],B(t.axes,function(a){if(a.zoomEnabled){var b=
t.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,d=a.toPixels(l(a.options.min,a.dataMin)),f=a.toPixels(l(a.options.max,a.dataMax)),e=Math.max(d,f);b.min=Math.min(a.pos,Math.min(d,f)-c);b.max=Math.max(a.pos+a.len,e+c)}}),r.res=!0):r.followTouchMove&&1===e?this.runPointActions(r.normalize(a)):k.length&&(C||(r.selectionMarker=C=G({destroy:p,touch:!0},t.plotBox)),r.pinchTranslate(k,m,f,C,b,g),r.hasPinched=h,r.scaleGroups(f,b),r.res&&(r.res=!1,this.reset(!1,0)))},touch:function(p,w){var r=this.chart,k,m;
a.hoverChartIndex=r.index;1===p.touches.length?(p=this.normalize(p),(m=r.isInsidePlot(p.chartX-r.plotLeft,p.chartY-r.plotTop))&&!r.openMenu?(w&&this.runPointActions(p),"touchmove"===p.type&&(w=this.pinchDown,k=w[0]?4<=Math.sqrt(Math.pow(w[0].chartX-p.chartX,2)+Math.pow(w[0].chartY-p.chartY,2)):!1),l(k,!0)&&this.pinch(p)):w&&this.reset()):2===p.touches.length&&this.pinch(p)},onContainerTouchStart:function(a){this.zoomOption(a);this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(l){D[a.hoverChartIndex]&&
D[a.hoverChartIndex].pointer.drop(l)}})})(N);(function(a){var D=a.addEvent,B=a.charts,G=a.css,H=a.doc,p=a.extend,l=a.noop,r=a.Pointer,w=a.removeEvent,t=a.win,k=a.wrap;if(t.PointerEvent||t.MSPointerEvent){var m={},e=!!t.PointerEvent,g=function(){var a,f=[];f.item=function(a){return this[a]};for(a in m)m.hasOwnProperty(a)&&f.push({pageX:m[a].pageX,pageY:m[a].pageY,target:m[a].target});return f},h=function(e,f,d,b){"touch"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_TOUCH||!B[a.hoverChartIndex]||
(b(e),b=B[a.hoverChartIndex].pointer,b[f]({type:d,target:e.currentTarget,preventDefault:l,touches:g()}))};p(r.prototype,{onContainerPointerDown:function(a){h(a,"onContainerTouchStart","touchstart",function(a){m[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){h(a,"onContainerTouchMove","touchmove",function(a){m[a.pointerId]={pageX:a.pageX,pageY:a.pageY};m[a.pointerId].target||(m[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){h(a,
"onDocumentTouchEnd","touchend",function(a){delete m[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,e?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,e?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(H,e?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});k(r.prototype,"init",function(a,f,d){a.call(this,f,d);this.hasZoom&&G(f.container,{"-ms-touch-action":"none","touch-action":"none"})});k(r.prototype,"setDOMEvents",function(a){a.apply(this);
(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(D)});k(r.prototype,"destroy",function(a){this.batchMSEvents(w);a.call(this)})}})(N);(function(a){var D,B=a.addEvent,G=a.css,H=a.discardElement,p=a.defined,l=a.each,r=a.extend,w=a.isFirefox,t=a.marginNames,k=a.merge,m=a.pick,e=a.setAnimation,g=a.stableSort,h=a.win,C=a.wrap;D=a.Legend=function(a,d){this.init(a,d)};D.prototype={init:function(a,d){this.chart=a;this.setOptions(d);d.enabled&&(this.render(),B(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},
setOptions:function(a){var d=m(a.padding,8);this.options=a;this.itemStyle=a.itemStyle;this.itemHiddenStyle=k(this.itemStyle,a.itemHiddenStyle);this.itemMarginTop=a.itemMarginTop||0;this.initialItemX=this.padding=d;this.initialItemY=d-5;this.itemHeight=this.maxItemWidth=0;this.symbolWidth=m(a.symbolWidth,16);this.pages=[]},update:function(a,d){var b=this.chart;this.setOptions(k(!0,this.options,a));this.destroy();b.isDirtyLegend=b.isDirtyBox=!0;m(d,!0)&&b.redraw()},colorizeItem:function(a,d){a.legendGroup[d?
"removeClass":"addClass"]("highcharts-legend-item-hidden");var b=this.options,e=a.legendItem,f=a.legendLine,c=a.legendSymbol,g=this.itemHiddenStyle.color,b=d?b.itemStyle.color:g,n=d?a.color||g:g,h=a.options&&a.options.marker,m={fill:n},k;e&&e.css({fill:b,color:b});f&&f.attr({stroke:n});if(c){if(h&&c.isMarker&&(m=a.pointAttribs(),!d))for(k in m)m[k]=g;c.attr(m)}},positionItem:function(a){var d=this.options,b=d.symbolPadding,d=!d.rtl,e=a._legendItemPos,f=e[0],e=e[1],c=a.checkbox;(a=a.legendGroup)&&
a.element&&a.translate(d?f:this.legendWidth-f-2*b-4,e);c&&(c.x=f,c.y=e)},destroyItem:function(a){var d=a.checkbox;l(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});d&&H(a.checkbox)},destroy:function(){var a=this.group,d=this.box;d&&(this.box=d.destroy());l(this.getAllItems(),function(a){l(["legendItem","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())})});a&&(this.group=a.destroy());this.display=null},positionCheckboxes:function(a){var d=this.group&&
this.group.alignAttr,b,e=this.clipHeight||this.legendHeight,f=this.titleHeight;d&&(b=d.translateY,l(this.allItems,function(c){var g=c.checkbox,n;g&&(n=b+f+g.y+(a||0)+3,G(g,{left:d.translateX+c.checkboxOffset+g.x-20+"px",top:n+"px",display:n>b-6&&n<b+e-6?"":"none"}))}))},renderTitle:function(){var a=this.padding,d=this.options.title,b=0;d.text&&(this.title||(this.title=this.chart.renderer.label(d.text,a-3,a-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(d.style).add(this.group)),a=
this.title.getBBox(),b=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:b}));this.titleHeight=b},setText:function(e){var d=this.options;e.legendItem.attr({text:d.labelFormat?a.format(d.labelFormat,e):d.labelFormatter.call(e)})},renderItem:function(a){var d=this.chart,b=d.renderer,e=this.options,f="horizontal"===e.layout,c=this.symbolWidth,g=e.symbolPadding,n=this.itemStyle,h=this.itemHiddenStyle,x=this.padding,l=f?m(e.itemDistance,20):0,y=!e.rtl,u=e.width,I=e.itemMarginBottom||
0,p=this.itemMarginTop,v=this.initialItemX,r=a.legendItem,t=!a.series,C=!t&&a.series.drawLegendSymbol?a.series:a,z=C.options,z=this.createCheckboxForItem&&z&&z.showCheckbox,L=e.useHTML;r||(a.legendGroup=b.g("legend-item").addClass("highcharts-"+C.type+"-series highcharts-color-"+a.colorIndex+(a.options.className?" "+a.options.className:"")+(t?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=r=b.text("",y?c+g:-g,this.baseline||0,L).css(k(a.visible?n:h)).attr({align:y?
"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(n=n.fontSize,this.fontMetrics=b.fontMetrics(n,r),this.baseline=this.fontMetrics.f+3+p,r.attr("y",this.baseline)),C.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,r,L),z&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);this.setText(a);b=r.getBBox();c=a.checkboxOffset=e.itemWidth||a.legendItemWidth||c+g+b.width+l+(z?20:0);this.itemHeight=g=Math.round(a.legendItemHeight||b.height);f&&this.itemX-v+c>(u||d.chartWidth-
2*x-v-e.x)&&(this.itemX=v,this.itemY+=p+this.lastLineHeight+I,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,c);this.lastItemY=p+this.itemY+I;this.lastLineHeight=Math.max(g,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];f?this.itemX+=c:(this.itemY+=p+g+I,this.lastLineHeight=g);this.offsetWidth=u||Math.max((f?this.itemX-v-l:c)+x,this.offsetWidth)},getAllItems:function(){var a=[];l(this.chart.series,function(d){var b=d&&d.options;d&&m(b.showInLegend,p(b.linkedTo)?
!1:void 0,!0)&&(a=a.concat(d.legendItems||("point"===b.legendType?d.data:d)))});return a},adjustMargins:function(a,d){var b=this.chart,e=this.options,f=e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0);e.floating||l([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(c,g){c.test(f)&&!p(a[g])&&(b[t[g]]=Math.max(b[t[g]],b.legend[(g+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][g]*e[g%2?"x":"y"]+m(e.margin,12)+d[g]))})},render:function(){var a=this,d=a.chart,b=d.renderer,
e=a.group,h,c,m,n,k=a.box,x=a.options,p=a.padding;a.itemX=a.initialItemX;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;e||(a.group=e=b.g("legend").attr({zIndex:7}).add(),a.contentGroup=b.g().attr({zIndex:1}).add(e),a.scrollGroup=b.g().add(a.contentGroup));a.renderTitle();h=a.getAllItems();g(h,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});x.reversed&&h.reverse();a.allItems=h;a.display=c=!!h.length;a.lastLineHeight=0;l(h,function(b){a.renderItem(b)});
m=(x.width||a.offsetWidth)+p;n=a.lastItemY+a.lastLineHeight+a.titleHeight;n=a.handleOverflow(n);n+=p;k||(a.box=k=b.rect().addClass("highcharts-legend-box").attr({r:x.borderRadius}).add(e),k.isNew=!0);k.attr({stroke:x.borderColor,"stroke-width":x.borderWidth||0,fill:x.backgroundColor||"none"}).shadow(x.shadow);0<m&&0<n&&(k[k.isNew?"attr":"animate"](k.crisp({x:0,y:0,width:m,height:n},k.strokeWidth())),k.isNew=!1);k[c?"show":"hide"]();a.legendWidth=m;a.legendHeight=n;l(h,function(b){a.positionItem(b)});
c&&e.align(r({width:m,height:n},x),!0,"spacingBox");d.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var d=this,b=this.chart,e=b.renderer,f=this.options,c=f.y,b=b.spacingBox.height+("top"===f.verticalAlign?-c:c)-this.padding,c=f.maxHeight,g,n=this.clipRect,h=f.navigation,k=m(h.animation,!0),p=h.arrowSize||12,y=this.nav,u=this.pages,I=this.padding,r,v=this.allItems,t=function(a){a?n.attr({height:a}):n&&(d.clipRect=n.destroy(),d.contentGroup.clip());d.contentGroup.div&&(d.contentGroup.div.style.clip=
a?"rect("+I+"px,9999px,"+(I+a)+"px,0)":"auto")};"horizontal"!==f.layout||"middle"===f.verticalAlign||f.floating||(b/=2);c&&(b=Math.min(b,c));u.length=0;a>b&&!1!==h.enabled?(this.clipHeight=g=Math.max(b-20-this.titleHeight-I,0),this.currentPage=m(this.currentPage,1),this.fullHeight=a,l(v,function(a,b){var c=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var d=u.length;if(!d||c-u[d-1]>g&&(r||c)!==u[d-1])u.push(r||c),d++;b===v.length-1&&c+a-u[d-1]>g&&u.push(c);c!==r&&(r=c)}),n||(n=d.clipRect=
e.clipRect(0,I,9999,0),d.contentGroup.clip(n)),t(g),y||(this.nav=y=e.g().attr({zIndex:1}).add(this.group),this.up=e.symbol("triangle",0,0,p,p).on("click",function(){d.scroll(-1,k)}).add(y),this.pager=e.text("",15,10).addClass("highcharts-legend-navigation").css(h.style).add(y),this.down=e.symbol("triangle-down",0,0,p,p).on("click",function(){d.scroll(1,k)}).add(y)),d.scroll(0),a=b):y&&(t(),y.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,d){var b=this.pages,
f=b.length;a=this.currentPage+a;var g=this.clipHeight,c=this.options.navigation,h=this.pager,n=this.padding;a>f&&(a=f);0<a&&(void 0!==d&&e(d,this.chart),this.nav.attr({translateX:n,translateY:g+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===a?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),h.attr({text:a+"/"+f}),this.down.attr({x:18+this.pager.getBBox().width,"class":a===f?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),this.up.attr({fill:1===
a?c.inactiveColor:c.activeColor}).css({cursor:1===a?"default":"pointer"}),this.down.attr({fill:a===f?c.inactiveColor:c.activeColor}).css({cursor:a===f?"default":"pointer"}),d=-b[a-1]+this.initialItemY,this.scrollGroup.animate({translateY:d}),this.currentPage=a,this.positionCheckboxes(d))}};a.LegendSymbolMixin={drawRectangle:function(a,d){var b=a.options,e=b.symbolHeight||a.fontMetrics.f,b=b.squareSymbol;d.legendSymbol=this.chart.renderer.rect(b?(a.symbolWidth-e)/2:0,a.baseline-e+1,b?e:a.symbolWidth,
e,m(a.options.symbolRadius,e/2)).addClass("highcharts-point").attr({zIndex:3}).add(d.legendGroup)},drawLineMarker:function(a){var d=this.options,b=d.marker,e=a.symbolWidth,f=this.chart.renderer,c=this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);var g;g={"stroke-width":d.lineWidth||0};d.dashStyle&&(g.dashstyle=d.dashStyle);this.legendLine=f.path(["M",0,a,"L",e,a]).addClass("highcharts-graph").attr(g).add(c);b&&!1!==b.enabled&&(d=0===this.symbol.indexOf("url")?0:b.radius,this.legendSymbol=
b=f.symbol(this.symbol,e/2-d,a-d,2*d,2*d,b).addClass("highcharts-point").add(c),b.isMarker=!0)}};(/Trident\/7\.0/.test(h.navigator.userAgent)||w)&&C(D.prototype,"positionItem",function(a,d){var b=this,e=function(){d._legendItemPos&&a.call(b,d)};e();setTimeout(e)})})(N);(function(a){var D=a.addEvent,B=a.animate,G=a.animObject,H=a.attr,p=a.doc,l=a.Axis,r=a.createElement,w=a.defaultOptions,t=a.discardElement,k=a.charts,m=a.css,e=a.defined,g=a.each,h=a.error,C=a.extend,f=a.fireEvent,d=a.getStyle,b=a.grep,
q=a.isNumber,E=a.isObject,c=a.isString,F=a.Legend,n=a.marginNames,A=a.merge,x=a.Pointer,J=a.pick,y=a.pInt,u=a.removeEvent,I=a.seriesTypes,M=a.splat,v=a.svg,K=a.syncTimeout,O=a.win,R=a.Renderer,z=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,b,c){return new z(a,b,c)};z.prototype={callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(c(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(b,c){var d,e=b.series;b.series=null;d=A(w,b);
d.series=b.series=e;this.userOptions=b;this.respRules=[];b=d.chart;e=b.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.callback=c;this.isResizing=0;this.options=d;this.axes=[];this.series=[];this.hasCartesianSeries=b.showAxes;var f;this.index=k.length;k.push(this);a.chartCount++;if(e)for(f in e)D(this,f,e[f]);this.xAxis=[];this.yAxis=[];this.pointCount=this.colorCounter=this.symbolCounter=0;this.firstRender()},initSeries:function(a){var b=this.options.chart;(b=I[a.type||b.type||
b.defaultSeriesType])||h(17,!0);b=new b;b.init(this,a);return b},isInsidePlot:function(a,b,c){var d=c?b:a;a=c?a:b;return 0<=d&&d<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(b){var c=this.axes,d=this.series,e=this.pointer,u=this.legend,n=this.isDirtyLegend,y,v,q=this.hasCartesianSeries,h=this.isDirtyBox,m=d.length,I=m,k=this.renderer,x=k.isHidden(),A=[];a.setAnimation(b,this);x&&this.cloneRenderTo();for(this.layOutTitles();I--;)if(b=d[I],b.options.stacking&&(y=!0,b.isDirty)){v=!0;break}if(v)for(I=
m;I--;)b=d[I],b.options.stacking&&(b.isDirty=!0);g(d,function(a){a.isDirty&&"point"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),n=!0);a.isDirtyData&&f(a,"updatedData")});n&&u.options.enabled&&(u.render(),this.isDirtyLegend=!1);y&&this.getStacks();q&&g(c,function(a){a.updateNames();a.setScale()});this.getMargins();q&&(g(c,function(a){a.isDirty&&(h=!0)}),g(c,function(a){var b=a.min+","+a.max;a.extKey!==b&&(a.extKey=b,A.push(function(){f(a,"afterSetExtremes",C(a.eventArgs,a.getExtremes()));
delete a.eventArgs}));(h||y)&&a.redraw()}));h&&this.drawChartBox();g(d,function(a){(h||a.isDirty)&&a.visible&&a.redraw()});e&&e.reset(!0);k.draw();f(this,"redraw");x&&this.cloneRenderTo(!0);g(A,function(a){a.call()})},get:function(a){var b=this.axes,c=this.series,d,e;for(d=0;d<b.length;d++)if(b[d].options.id===a)return b[d];for(d=0;d<c.length;d++)if(c[d].options.id===a)return c[d];for(d=0;d<c.length;d++)for(e=c[d].points||[],b=0;b<e.length;b++)if(e[b].id===a)return e[b];return null},getAxes:function(){var a=
this,b=this.options,c=b.xAxis=M(b.xAxis||{}),b=b.yAxis=M(b.yAxis||{});g(c,function(a,b){a.index=b;a.isX=!0});g(b,function(a,b){a.index=b});c=c.concat(b);g(c,function(b){new l(a,b)})},getSelectedPoints:function(){var a=[];g(this.series,function(c){a=a.concat(b(c.points||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return b(this.series,function(a){return a.selected})},setTitle:function(a,b,c){var d=this,e=d.options,f;f=e.title=A(e.title,a);e=e.subtitle=A(e.subtitle,b);
g([["title",a,f],["subtitle",b,e]],function(a,b){var c=a[0],e=d[c],f=a[1];a=a[2];e&&f&&(d[c]=e=e.destroy());a&&a.text&&!e&&(d[c]=d.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+c,zIndex:a.zIndex||4}).add(),d[c].update=function(a){d.setTitle(!b&&a,b&&a)},d[c].css(a.style))});d.layOutTitles(c)},layOutTitles:function(a){var b=0,c,d=this.renderer,e=this.spacingBox;g(["title","subtitle"],function(a){var c=this[a],f=this.options[a],g;c&&(g=f.style.fontSize,g=d.fontMetrics(g,
c).b,c.css({width:(f.width||e.width+f.widthAdjust)+"px"}).align(C({y:b+g+("title"===a?-3:2)},f),!1,"spacingBox"),f.floating||f.verticalAlign||(b=Math.ceil(b+c.getBBox().height)))},this);c=this.titleOffset!==b;this.titleOffset=b;!this.isDirtyBox&&c&&(this.isDirtyBox=c,this.hasRendered&&J(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var a=this.options.chart,b=a.width,a=a.height,c=this.renderToClone||this.renderTo;e(b)||(this.containerWidth=d(c,"width"));e(a)||(this.containerHeight=
d(c,"height"));this.chartWidth=Math.max(0,b||this.containerWidth||600);this.chartHeight=Math.max(0,J(a,19<this.containerHeight?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;if(a){if(b){for(;b.childNodes.length;)this.renderTo.appendChild(b.firstChild);t(b);delete this.renderToClone}}else c&&c.parentNode===this.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),m(b,{position:"absolute",top:"-9999px",display:"block"}),
b.style.setProperty&&b.style.setProperty("display","block","important"),p.body.appendChild(b),c&&b.appendChild(c)},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var b,d=this.options,e=d.chart,f,g;b=this.renderTo;var u=a.uniqueKey(),n;b||(this.renderTo=b=e.renderTo);c(b)&&(this.renderTo=b=p.getElementById(b));b||h(13,!0);f=y(H(b,"data-highcharts-chart"));q(f)&&k[f]&&k[f].hasRendered&&k[f].destroy();H(b,"data-highcharts-chart",this.index);
b.innerHTML="";e.skipClone||b.offsetWidth||this.cloneRenderTo();this.getChartSize();f=this.chartWidth;g=this.chartHeight;n=C({position:"relative",overflow:"hidden",width:f+"px",height:g+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},e.style);this.container=b=r("div",{id:u},n,this.renderToClone||b);this._cursor=b.style.cursor;this.renderer=new (a[e.renderer]||R)(b,f,g,null,e.forExport,d.exporting&&d.exporting.allowHTML);this.setClassName(e.className);
this.renderer.setStyle(e.style);this.renderer.chartIndex=this.index},getMargins:function(a){var b=this.spacing,c=this.margin,d=this.titleOffset;this.resetMargins();d&&!e(c[0])&&(this.plotTop=Math.max(this.plotTop,d+this.options.title.margin+b[0]));this.legend.display&&this.legend.adjustMargins(c,b);this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=
[0,0,0,0],c=a.margin;a.hasCartesianSeries&&g(a.axes,function(a){a.visible&&a.getOffset()});g(n,function(d,f){e(c[f])||(a[d]+=b[f])});a.setChartSize()},reflow:function(a){var b=this,c=b.options.chart,f=b.renderTo,g=e(c.width),u=c.width||d(f,"width"),c=c.height||d(f,"height"),f=a?a.target:O;if(!g&&!b.isPrinting&&u&&c&&(f===O||f===p)){if(u!==b.containerWidth||c!==b.containerHeight)clearTimeout(b.reflowTimeout),b.reflowTimeout=K(function(){b.container&&b.setSize(void 0,void 0,!1)},a?100:0);b.containerWidth=
u;b.containerHeight=c}},initReflow:function(){var a=this,b;b=D(O,"resize",function(b){a.reflow(b)});D(a,"destroy",b)},setSize:function(b,c,d){var e=this,u=e.renderer;e.isResizing+=1;a.setAnimation(d,e);e.oldChartHeight=e.chartHeight;e.oldChartWidth=e.chartWidth;void 0!==b&&(e.options.chart.width=b);void 0!==c&&(e.options.chart.height=c);e.getChartSize();b=u.globalAnimation;(b?B:m)(e.container,{width:e.chartWidth+"px",height:e.chartHeight+"px"},b);e.setChartSize(!0);u.setSize(e.chartWidth,e.chartHeight,
d);g(e.axes,function(a){a.isDirty=!0;a.setScale()});e.isDirtyLegend=!0;e.isDirtyBox=!0;e.layOutTitles();e.getMargins();e.setResponsive&&e.setResponsive(!1);e.redraw(d);e.oldChartHeight=null;f(e,"resize");K(function(){e&&f(e,"endResize",null,function(){--e.isResizing})},G(b).duration)},setChartSize:function(a){var b=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,f=this.options.chart,u=this.spacing,n=this.clipOffset,y,v,q,h;this.plotLeft=y=Math.round(this.plotLeft);this.plotTop=
v=Math.round(this.plotTop);this.plotWidth=q=Math.max(0,Math.round(d-y-this.marginRight));this.plotHeight=h=Math.max(0,Math.round(e-v-this.marginBottom));this.plotSizeX=b?h:q;this.plotSizeY=b?q:h;this.plotBorderWidth=f.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:u[3],y:u[0],width:d-u[3]-u[1],height:e-u[0]-u[2]};this.plotBox=c.plotBox={x:y,y:v,width:q,height:h};d=2*Math.floor(this.plotBorderWidth/2);b=Math.ceil(Math.max(d,n[3])/2);c=Math.ceil(Math.max(d,n[0])/2);this.clipBox={x:b,y:c,width:Math.floor(this.plotSizeX-
Math.max(d,n[1])/2-b),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(d,n[2])/2-c))};a||g(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this,b=a.options.chart;g(["margin","spacing"],function(c){var d=b[c],e=E(d)?d:[d,d,d,d];g(["Top","Right","Bottom","Left"],function(d,f){a[c][f]=J(b[c+d],e[f])})});g(n,function(b,c){a[b]=J(a.margin[c],a.spacing[c])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,
b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g=this.plotBorder,u,n=this.plotBGImage,y=a.backgroundColor,v=a.plotBackgroundColor,q=a.plotBackgroundImage,h,m=this.plotLeft,I=this.plotTop,k=this.plotWidth,x=this.plotHeight,A=this.plotBox,l=this.clipRect,z=this.clipBox,p="animate";e||(this.chartBackground=e=b.rect().addClass("highcharts-background").add(),p="attr");u=a.borderWidth||0;h=u+(a.shadow?8:0);y={fill:y||"none"};if(u||e["stroke-width"])y.stroke=
a.borderColor,y["stroke-width"]=u;e.attr(y).shadow(a.shadow);e[p]({x:h/2,y:h/2,width:c-h-u%2,height:d-h-u%2,r:a.borderRadius});p="animate";f||(p="attr",this.plotBackground=f=b.rect().addClass("highcharts-plot-background").add());f[p](A);f.attr({fill:v||"none"}).shadow(a.plotShadow);q&&(n?n.animate(A):this.plotBGImage=b.image(q,m,I,k,x).add());l?l.animate({width:z.width,height:z.height}):this.clipRect=b.clipRect(z);p="animate";g||(p="attr",this.plotBorder=g=b.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());
g.attr({stroke:a.plotBorderColor,"stroke-width":a.plotBorderWidth||0,fill:"none"});g[p](g.crisp({x:m,y:I,width:k,height:x},-g.strokeWidth()));this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,f;g(["inverted","angular","polar"],function(g){c=I[b.type||b.defaultSeriesType];f=b[g]||c&&c.prototype[g];for(e=d&&d.length;!f&&e--;)(c=I[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},linkSeries:function(){var a=this,b=a.series;g(b,function(a){a.linkedSeries.length=
0});g(b,function(b){var d=b.options.linkedTo;c(d)&&(d=":previous"===d?a.series[b.index-1]:a.get(d))&&d.linkedParent!==b&&(d.linkedSeries.push(b),b.linkedParent=d,b.visible=J(b.options.visible,d.options.visible,b.visible))})},renderSeries:function(){g(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&g(b.items,function(c){var d=C(b.style,c.style),e=y(d.left)+a.plotLeft,f=y(d.top)+a.plotTop+12;delete d.left;delete d.top;a.renderer.text(c.html,
e,f).attr({zIndex:2}).css(d).add()})},render:function(){var a=this.axes,b=this.renderer,c=this.options,d,e,f;this.setTitle();this.legend=new F(this,c.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();c=this.plotWidth;d=this.plotHeight-=21;g(a,function(a){a.setScale()});this.getAxisMargins();e=1.1<c/this.plotWidth;f=1.05<d/this.plotHeight;if(e||f)g(a,function(a){(a.horiz&&e||!a.horiz&&f)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&
g(a,function(a){a.visible&&a.render()});this.seriesGroup||(this.seriesGroup=b.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0},addCredits:function(a){var b=this;a=A(!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&&(O.location.href=a.href)}).attr({align:a.position.align,
zIndex:8}).css(a.style).add().align(a.position),this.credits.update=function(a){b.credits=b.credits.destroy();b.addCredits(a)})},destroy:function(){var b=this,c=b.axes,d=b.series,e=b.container,n,y=e&&e.parentNode;f(b,"destroy");k[b.index]=void 0;a.chartCount--;b.renderTo.removeAttribute("data-highcharts-chart");u(b);for(n=c.length;n--;)c[n]=c[n].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(n=d.length;n--;)d[n]=d[n].destroy();g("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),
function(a){var c=b[a];c&&c.destroy&&(b[a]=c.destroy())});e&&(e.innerHTML="",u(e),y&&t(e));for(n in b)delete b[n]},isReadyToRender:function(){var a=this;return v||O!=O.top||"complete"===p.readyState?!0:(p.attachEvent("onreadystatechange",function(){p.detachEvent("onreadystatechange",a.firstRender);"complete"===p.readyState&&a.firstRender()}),!1)},firstRender:function(){var a=this,b=a.options;if(a.isReadyToRender()){a.getContainer();f(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();
a.getAxes();g(b.series||[],function(b){a.initSeries(b)});a.linkSeries();f(a,"beforeRender");x&&(a.pointer=new x(a,b));a.render();a.renderer.draw();if(!a.renderer.imgCount&&a.onload)a.onload();a.cloneRenderTo(!0)}},onload:function(){g([this.callback].concat(this.callbacks),function(a){a&&void 0!==this.index&&a.apply(this,[this])},this);f(this,"load");!1!==this.options.chart.reflow&&this.initReflow();this.onload=null}}})(N);(function(a){var D,B=a.each,G=a.extend,H=a.erase,p=a.fireEvent,l=a.format,r=
a.isArray,w=a.isNumber,t=a.pick,k=a.removeEvent;D=a.Point=function(){};D.prototype={init:function(a,e,g){this.series=a;this.color=a.color;this.applyOptions(e,g);a.options.colorByPoint?(e=a.options.colors||a.chart.options.colors,this.color=this.color||e[a.colorCounter],e=e.length,g=a.colorCounter,a.colorCounter++,a.colorCounter===e&&(a.colorCounter=0)):g=a.colorIndex;this.colorIndex=t(this.colorIndex,g);a.chart.pointCount++;return this},applyOptions:function(a,e){var g=this.series,h=g.options.pointValKey||
g.pointValKey;a=D.prototype.optionsToObject.call(this,a);G(this,a);this.options=this.options?G(this.options,a):a;a.group&&delete this.group;h&&(this.y=this[h]);this.isNull=t(this.isValid&&!this.isValid(),null===this.x||!w(this.y,!0));this.selected&&(this.state="select");"name"in this&&void 0===e&&g.xAxis&&g.xAxis.hasNames&&(this.x=g.xAxis.nameToX(this));void 0===this.x&&g&&(this.x=void 0===e?g.autoIncrement(this):e);return this},optionsToObject:function(a){var e={},g=this.series,h=g.options.keys,
m=h||g.pointArrayMap||["y"],f=m.length,d=0,b=0;if(w(a)||null===a)e[m[0]]=a;else if(r(a))for(!h&&a.length>f&&(g=typeof a[0],"string"===g?e.name=a[0]:"number"===g&&(e.x=a[0]),d++);b<f;)h&&void 0===a[d]||(e[m[b]]=a[d]),d++,b++;else"object"===typeof a&&(e=a,a.dataLabels&&(g._hasPointLabels=!0),a.marker&&(g._hasPointMarkers=!0));return e},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:"")},getZone:function(){var a=this.series,e=a.zones,a=a.zoneAxis||"y",g=0,h;for(h=e[g];this[a]>=h.value;)h=e[++g];h&&h.color&&!this.options.color&&(this.color=h.color);return h},destroy:function(){var a=this.series.chart,e=a.hoverPoints,g;a.pointCount--;e&&(this.setState(),H(e,this),e.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)k(this),
this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(g in this)this[g]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],e,g=6;g--;)e=a[g],this[e]&&(this[e]=this[e].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var e=this.series,g=
e.tooltipOptions,h=t(g.valueDecimals,""),k=g.valuePrefix||"",f=g.valueSuffix||"";B(e.pointArrayMap||["y"],function(d){d="{point."+d;if(k||f)a=a.replace(d+"}",k+d+"}"+f);a=a.replace(d+"}",d+":,."+h+"f}")});return l(a,{point:this,series:this.series})},firePointEvent:function(a,e,g){var h=this,k=this.series.options;(k.point.events[a]||h.options&&h.options.events&&h.options.events[a])&&this.importEvents();"click"===a&&k.allowPointSelect&&(g=function(a){h.select&&h.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});
p(this,a,e,g)},visible:!0}})(N);(function(a){var D=a.addEvent,B=a.animObject,G=a.arrayMax,H=a.arrayMin,p=a.correctFloat,l=a.Date,r=a.defaultOptions,w=a.defaultPlotOptions,t=a.defined,k=a.each,m=a.erase,e=a.error,g=a.extend,h=a.fireEvent,C=a.grep,f=a.isArray,d=a.isNumber,b=a.isString,q=a.merge,E=a.pick,c=a.removeEvent,F=a.splat,n=a.stableSort,A=a.SVGElement,x=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:{lineWidthPlus:1,
marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3},{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,b){var c=this,d,e,f=a.series,u,y=function(a,b){return E(a.options.index,a._i)-E(b.options.index,b._i)};c.chart=a;c.options=b=c.setOptions(b);c.linkedSeries=[];c.bindAxes();g(c,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===
b.selected});e=b.events;for(d in e)D(c,d,e[d]);if(e&&e.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;c.getColor();c.getSymbol();k(c.parallelArrays,function(a){c[a+"Data"]=[]});c.setData(b.data,!1);c.isCartesian&&(a.hasCartesianSeries=!0);f.length&&(u=f[f.length-1]);c._i=E(u&&u._i,-1)+1;f.push(c);n(f,y);this.yAxis&&n(this.yAxis.series,y);k(f,function(a,b){a.index=b;a.name=a.name||"Series "+(b+1)})},bindAxes:function(){var a=this,b=a.options,c=a.chart,
d;k(a.axisTypes||[],function(f){k(c[f],function(c){d=c.options;if(b[f]===d.index||void 0!==b[f]&&b[f]===d.id||void 0===b[f]&&0===d.index)c.series.push(a),a[f]=c,c.isDirty=!0});a[f]||a.optionalAxis===f||e(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,e=arguments,f=d(b)?function(d){var e="y"===d&&c.toYData?c.toYData(a):a[d];c[d+"Data"][b]=e}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(e,2))};k(c.parallelArrays,f)},autoIncrement:function(){var a=this.options,
b=this.xIncrement,c,d=a.pointIntervalUnit,b=E(b,a.pointStart,0);this.pointInterval=c=E(this.pointInterval,a.pointInterval,1);d&&(a=new l(b),"day"===d?a=+a[l.hcSetDate](a[l.hcGetDate]()+c):"month"===d?a=+a[l.hcSetMonth](a[l.hcGetMonth]()+c):"year"===d&&(a=+a[l.hcSetFullYear](a[l.hcGetFullYear]()+c)),c=a-b);this.xIncrement=b+c;return b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},d=b.plotOptions||{},e=c[this.type];this.userOptions=a;c=q(e,c.series,a);this.tooltipOptions=
q(r.tooltip,r.plotOptions[this.type].tooltip,b.tooltip,d.series&&d.series.tooltip,d[this.type]&&d[this.type].tooltip,a.tooltip);null===e.marker&&delete c.marker;this.zoneAxis=c.zoneAxis;a=this.zones=(c.zones||[]).slice();!c.negativeColor&&!c.negativeFillColor||c.zones||a.push({value:c[this.zoneAxis+"Threshold"]||c.threshold||0,className:"highcharts-negative",color:c.negativeColor,fillColor:c.negativeFillColor});a.length&&t(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});
return c},getCyclic:function(a,b,c){var d,e=this.userOptions,f=a+"Index",g=a+"Counter",u=c?c.length:E(this.chart.options.chart[a+"Count"],this.chart[a+"Count"]);b||(d=E(e[f],e["_"+f]),t(d)||(e["_"+f]=d=this.chart[g]%u,this.chart[g]+=1),c&&(b=c[d]));void 0!==d&&(this[f]=d);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||w[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(a,c,g,n){var u=this,q=u.points,h=q&&q.length||0,y,m=u.options,x=u.chart,A=null,I=u.xAxis,l=m.turboThreshold,p=this.xData,r=this.yData,F=(y=u.pointArrayMap)&&y.length;a=a||[];y=a.length;c=E(c,!0);if(!1!==n&&y&&h===y&&!u.cropped&&!u.hasGroupedData&&u.visible)k(a,function(a,b){q[b].update&&a!==m.data[b]&&q[b].update(a,!1,null,!1)});else{u.xIncrement=null;u.colorCounter=0;k(this.parallelArrays,function(a){u[a+
"Data"].length=0});if(l&&y>l){for(g=0;null===A&&g<y;)A=a[g],g++;if(d(A))for(g=0;g<y;g++)p[g]=this.autoIncrement(),r[g]=a[g];else if(f(A))if(F)for(g=0;g<y;g++)A=a[g],p[g]=A[0],r[g]=A.slice(1,F+1);else for(g=0;g<y;g++)A=a[g],p[g]=A[0],r[g]=A[1];else e(12)}else for(g=0;g<y;g++)void 0!==a[g]&&(A={series:u},u.pointClass.prototype.applyOptions.apply(A,[a[g]]),u.updateParallelArrays(A,g));b(r[0])&&e(14,!0);u.data=[];u.options.data=u.userOptions.data=a;for(g=h;g--;)q[g]&&q[g].destroy&&q[g].destroy();I&&(I.minRange=
I.userMinRange);u.isDirty=x.isDirtyBox=!0;u.isDirtyData=!!q;g=!1}"point"===m.legendType&&(this.processData(),this.generatePoints());c&&x.redraw(g)},processData:function(a){var b=this.xData,c=this.yData,d=b.length,f;f=0;var g,n,q=this.xAxis,h,y=this.options;h=y.cropThreshold;var k=this.getExtremesFromAll||y.getExtremesFromAll,m=this.isCartesian,y=q&&q.val2lin,x=q&&q.isLog,A,l;if(m&&!this.isDirty&&!q.isDirty&&!this.yAxis.isDirty&&!a)return!1;q&&(a=q.getExtremes(),A=a.min,l=a.max);if(m&&this.sorted&&
!k&&(!h||d>h||this.forceCrop))if(b[d-1]<A||b[0]>l)b=[],c=[];else if(b[0]<A||b[d-1]>l)f=this.cropData(this.xData,this.yData,A,l),b=f.xData,c=f.yData,f=f.start,g=!0;for(h=b.length||1;--h;)d=x?y(b[h])-y(b[h-1]):b[h]-b[h-1],0<d&&(void 0===n||d<n)?n=d:0>d&&this.requireSorting&&e(15);this.cropped=g;this.cropStart=f;this.processedXData=b;this.processedYData=c;this.closestPointRange=n},cropData:function(a,b,c,d){var e=a.length,f=0,g=e,n=E(this.cropShoulder,1),u;for(u=0;u<e;u++)if(a[u]>=c){f=Math.max(0,u-
n);break}for(c=u;c<e;c++)if(a[c]>d){g=c+n;break}return{xData:a.slice(f,g),yData:b.slice(f,g),start:f,end:g}},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,e=this.processedYData,f=this.pointClass,g=d.length,n=this.cropStart||0,q,h=this.hasGroupedData,k,m=[],x;b||h||(b=[],b.length=a.length,b=this.data=b);for(x=0;x<g;x++)q=n+x,h?(k=(new f).init(this,[d[x]].concat(F(e[x]))),k.dataGroup=this.groupMap[x]):(k=b[q])||void 0===a[q]||(b[q]=k=(new f).init(this,a[q],d[x])),
k.index=q,m[x]=k;if(b&&(g!==(c=b.length)||h))for(x=0;x<c;x++)x!==n||h||(x+=g),b[x]&&(b[x].destroyElements(),b[x].plotX=void 0);this.data=b;this.points=m},getExtremes:function(a){var b=this.yAxis,c=this.processedXData,e,g=[],n=0;e=this.xAxis.getExtremes();var q=e.min,h=e.max,y,k,m,x;a=a||this.stackedYData||this.processedYData||[];e=a.length;for(x=0;x<e;x++)if(k=c[x],m=a[x],y=(d(m,!0)||f(m))&&(!b.isLog||m.length||0<m),k=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(c[x+1]||
k)>=q&&(c[x-1]||k)<=h,y&&k)if(y=m.length)for(;y--;)null!==m[y]&&(g[n++]=m[y]);else g[n++]=m;this.dataMin=H(g);this.dataMax=G(g)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,c=this.xAxis,e=c.categories,f=this.yAxis,g=this.points,n=g.length,q=!!this.modifyValue,h=a.pointPlacement,k="between"===h||d(h),m=a.threshold,x=a.startFromThreshold?m:0,A,l,r,F,J=Number.MAX_VALUE;"between"===h&&(h=.5);d(h)&&(h*=E(a.pointRange||c.pointRange));
for(a=0;a<n;a++){var C=g[a],w=C.x,B=C.y;l=C.low;var D=b&&f.stacks[(this.negStacks&&B<(x?0:m)?"-":"")+this.stackKey],G;f.isLog&&null!==B&&0>=B&&(C.isNull=!0);C.plotX=A=p(Math.min(Math.max(-1E5,c.translate(w,0,0,0,1,h,"flags"===this.type)),1E5));b&&this.visible&&!C.isNull&&D&&D[w]&&(F=this.getStackIndicator(F,w,this.index),G=D[w],B=G.points[F.key],l=B[0],B=B[1],l===x&&F.key===D[w].base&&(l=E(m,f.min)),f.isLog&&0>=l&&(l=null),C.total=C.stackTotal=G.total,C.percentage=G.total&&C.y/G.total*100,C.stackY=
B,G.setOffset(this.pointXOffset||0,this.barW||0));C.yBottom=t(l)?f.translate(l,0,1,0,1):null;q&&(B=this.modifyValue(B,C));C.plotY=l="number"===typeof B&&Infinity!==B?Math.min(Math.max(-1E5,f.translate(B,0,1,0,1)),1E5):void 0;C.isInside=void 0!==l&&0<=l&&l<=f.len&&0<=A&&A<=c.len;C.clientX=k?p(c.translate(w,0,0,0,1,h)):A;C.negative=C.y<(m||0);C.category=e&&void 0!==e[C.x]?e[C.x]:C.x;C.isNull||(void 0!==r&&(J=Math.min(J,Math.abs(A-r))),r=A)}this.closestPointRangePx=J},getValidPoints:function(a,b){var c=
this.chart;return C(a||this.points||[],function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,d=b.renderer,e=b.inverted,f=this.clipBox,g=f||b.clipBox,n=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,g.height,c.xAxis,c.yAxis].join(),q=b[n],h=b[n+"m"];q||(a&&(g.width=0,b[n+"m"]=h=d.clipRect(-99,e?-b.plotLeft:-b.plotTop,99,e?b.chartWidth:b.chartHeight)),b[n]=q=d.clipRect(g),q.count={length:0});a&&!q.count[this.index]&&
(q.count[this.index]=!0,q.count.length+=1);!1!==c.clip&&(this.group.clip(a||f?q:b.clipRect),this.markerGroup.clip(h),this.sharedClipKey=n);a||(q.count[this.index]&&(delete q.count[this.index],--q.count.length),0===q.count.length&&n&&b[n]&&(f||(b[n]=b[n].destroy()),b[n+"m"]&&(b[n+"m"]=b[n+"m"].destroy())))},animate:function(a){var b=this.chart,c=B(this.options.animation),d;a?this.setClip(c):(d=this.sharedClipKey,(a=b[d])&&a.animate({width:b.plotSizeX},c),b[d+"m"]&&b[d+"m"].animate({width:b.plotSizeX+
99},c),this.animate=null)},afterAnimate:function(){this.setClip();h(this,"afterAnimate")},drawPoints:function(){var a=this.points,b=this.chart,c,e,f,g,n=this.options.marker,q,h,k,m,x=this.markerGroup,A=E(n.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>2*n.radius);if(!1!==n.enabled||this._hasPointMarkers)for(e=a.length;e--;)f=a[e],c=f.plotY,g=f.graphic,q=f.marker||{},h=!!f.marker,k=A&&void 0===q.enabled||q.enabled,m=f.isInside,k&&d(c)&&null!==f.y?(c=E(q.symbol,this.symbol),f.hasImage=
0===c.indexOf("url"),k=this.markerAttribs(f,f.selected&&"select"),g?g[m?"show":"hide"](!0).animate(k):m&&(0<k.width||f.hasImage)&&(f.graphic=g=b.renderer.symbol(c,k.x,k.y,k.width,k.height,h?q:n).add(x)),g&&g.attr(this.pointAttribs(f,f.selected&&"select")),g&&g.addClass(f.getClassName(),!0)):g&&(f.graphic=g.destroy())},markerAttribs:function(a,b){var c=this.options.marker,d=a&&a.options,e=d&&d.marker||{},d=E(e.radius,c.radius);b&&(c=c.states[b],b=e.states&&e.states[b],d=E(b&&b.radius,c&&c.radius,d+
(c&&c.radiusPlus||0)));a.hasImage&&(d=0);a={x:Math.floor(a.plotX)-d,y:a.plotY-d};d&&(a.width=a.height=2*d);return a},pointAttribs:function(a,b){var c=this.options.marker,d=a&&a.options,e=d&&d.marker||{},f=this.color,g=d&&d.color,n=a&&a.color,d=E(e.lineWidth,c.lineWidth),q;a&&this.zones.length&&(a=a.getZone())&&a.color&&(q=a.color);f=g||q||n||f;q=e.fillColor||c.fillColor||f;f=e.lineColor||c.lineColor||f;b&&(c=c.states[b],b=e.states&&e.states[b]||{},d=E(b.lineWidth,c.lineWidth,d+E(b.lineWidthPlus,c.lineWidthPlus,
0)),q=b.fillColor||c.fillColor||q,f=b.lineColor||c.lineColor||f);return{stroke:f,"stroke-width":d,fill:q}},destroy:function(){var a=this,b=a.chart,d=/AppleWebKit\/533/.test(J.navigator.userAgent),e,f=a.data||[],g,n,q;h(a,"destroy");c(a);k(a.axisTypes||[],function(b){(q=a[b])&&q.series&&(m(q.series,a),q.isDirty=q.forceRedraw=!0)});a.legendItem&&a.chart.legend.destroyItem(a);for(e=f.length;e--;)(g=f[e])&&g.destroy&&g.destroy();a.points=null;clearTimeout(a.animationTimeout);for(n in a)a[n]instanceof
A&&!a[n].survive&&(e=d&&"group"===n?"hide":"destroy",a[n][e]());b.hoverSeries===a&&(b.hoverSeries=null);m(b.series,a);for(n in a)delete a[n]},getGraphPath:function(a,b,c){var d=this,e=d.options,f=e.step,g,n=[],q=[],h;a=a||d.points;(g=a.reversed)&&a.reverse();(f={right:1,center:2}[f]||f&&3)&&g&&(f=4-f);!e.connectNulls||b||c||(a=this.getValidPoints(a));k(a,function(g,u){var k=g.plotX,m=g.plotY,x=a[u-1];(g.leftCliff||x&&x.rightCliff)&&!c&&(h=!0);g.isNull&&!t(b)&&0<u?h=!e.connectNulls:g.isNull&&!b?h=
!0:(0===u||h?u=["M",g.plotX,g.plotY]:d.getPointSpline?u=d.getPointSpline(a,g,u):f?(u=1===f?["L",x.plotX,m]:2===f?["L",(x.plotX+k)/2,x.plotY,"L",(x.plotX+k)/2,m]:["L",k,x.plotY],u.push("L",k,m)):u=["L",k,m],q.push(g.x),f&&q.push(g.x),n.push.apply(n,u),h=!1)});n.xMap=q;return d.graphPath=n},drawGraph:function(){var a=this,b=this.options,c=(this.gappedPath||this.getGraphPath).call(this),d=[["graph","highcharts-graph",b.lineColor||this.color,b.dashStyle]];k(this.zones,function(c,e){d.push(["zone-graph-"+
e,"highcharts-graph highcharts-zone-graph-"+e+" "+(c.className||""),c.color||a.color,c.dashStyle||b.dashStyle])});k(d,function(d,e){var f=d[0],g=a[f];g?(g.endX=c.xMap,g.animate({d:c})):c.length&&(a[f]=a.chart.renderer.path(c).addClass(d[1]).attr({zIndex:1}).add(a.group),g={stroke:d[2],"stroke-width":b.lineWidth,fill:a.fillGraph&&a.color||"none"},d[3]?g.dashstyle=d[3]:"square"!==b.linecap&&(g["stroke-linecap"]=g["stroke-linejoin"]="round"),g=a[f].attr(g).shadow(2>e&&b.shadow));g&&(g.startX=c.xMap,
g.isArea=c.isArea)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,d=this.zones,e,f,g=this.clips||[],n,q=this.graph,h=this.area,m=Math.max(b.chartWidth,b.chartHeight),x=this[(this.zoneAxis||"y")+"Axis"],A,l,p=b.inverted,r,F,C,t,J=!1;d.length&&(q||h)&&x&&void 0!==x.min&&(l=x.reversed,r=x.horiz,q&&q.hide(),h&&h.hide(),A=x.getExtremes(),k(d,function(d,u){e=l?r?b.plotWidth:0:r?0:x.toPixels(A.min);e=Math.min(Math.max(E(f,e),0),m);f=Math.min(Math.max(Math.round(x.toPixels(E(d.value,A.max),
!0)),0),m);J&&(e=f=x.toPixels(A.max));F=Math.abs(e-f);C=Math.min(e,f);t=Math.max(e,f);x.isXAxis?(n={x:p?t:C,y:0,width:F,height:m},r||(n.x=b.plotHeight-n.x)):(n={x:0,y:p?t:C,width:m,height:F},r&&(n.y=b.plotWidth-n.y));p&&c.isVML&&(n=x.isXAxis?{x:0,y:l?C:t,height:n.width,width:b.chartWidth}:{x:n.y-b.plotLeft-b.spacingBox.x,y:0,width:n.height,height:b.chartHeight});g[u]?g[u].animate(n):(g[u]=c.clipRect(n),q&&a["zone-graph-"+u].clip(g[u]),h&&a["zone-area-"+u].clip(g[u]));J=d.value>A.max}),this.clips=
g)},invertGroups:function(a){function b(){var b={width:c.yAxis.len,height:c.xAxis.len};k(["group","markerGroup"],function(d){c[d]&&c[d].attr(b).invert(a)})}var c=this,d;c.xAxis&&(d=D(c.chart,"resize",b),D(c,"destroy",d),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,d,e){var f=this[a],g=!f;g&&(this[a]=f=this.chart.renderer.g(b).attr({zIndex:d||.1}).add(e),f.addClass("highcharts-series-"+this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||
"")));f.attr({visibility:c})[g?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,d=a.options,e=!!a.animate&&b.renderer.isSVG&&B(d.animation).duration,f=a.visible?"inherit":"hidden",g=d.zIndex,n=a.hasRendered,q=b.seriesGroup,h=b.inverted;c=a.plotGroup("group","series",f,g,q);a.markerGroup=
a.plotGroup("markerGroup","markers",f,g,q);e&&a.animate(!0);c.inverted=a.isCartesian?h:!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(h);!1===d.clip||a.sharedClipKey||n||c.clip(b.clipRect);e&&a.animate();n||(a.animationTimeout=x(function(){a.afterAnimate()},e));a.isDirty=a.isDirtyData=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty||
this.isDirtyData,c=this.group,d=this.xAxis,e=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:E(d&&d.left,a.plotLeft),translateY:E(e&&e.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdDimensions:1,kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,d=this.yAxis,e=this.chart.inverted;return this.searchKDTree({clientX:e?c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:e?d.len-a.chartX+d.pos:a.chartY-d.pos},b)},
buildKDTree:function(){function a(c,d,e){var f,g;if(g=c&&c.length)return f=b.kdAxisArray[d%e],c.sort(function(a,b){return a[f]-b[f]}),g=Math.floor(g/2),{point:c[g],left:a(c.slice(0,g),d+1,e),right:a(c.slice(g+1),d+1,e)}}var b=this,c=b.kdDimensions;delete b.kdTree;x(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),c,c)},b.options.kdNow?0:1)},searchKDTree:function(a,b){function c(a,b,n,q){var h=b.point,u=d.kdAxisArray[n%q],k,m,x=h;m=t(a[e])&&t(h[e])?Math.pow(a[e]-h[e],2):null;k=t(a[f])&&
t(h[f])?Math.pow(a[f]-h[f],2):null;k=(m||0)+(k||0);h.dist=t(k)?Math.sqrt(k):Number.MAX_VALUE;h.distX=t(m)?Math.sqrt(m):Number.MAX_VALUE;u=a[u]-h[u];k=0>u?"left":"right";m=0>u?"right":"left";b[k]&&(k=c(a,b[k],n+1,q),x=k[g]<x[g]?k:h);b[m]&&Math.sqrt(u*u)<x[g]&&(a=c(a,b[m],n+1,q),x=a[g]<x[g]?a:x);return x}var d=this,e=this.kdAxisArray[0],f=this.kdAxisArray[1],g=b?"distX":"dist";this.kdTree||this.buildKDTree();if(this.kdTree)return c(a,this.kdTree,this.kdDimensions,this.kdDimensions)}})})(N);(function(a){function D(a,
m,e,g,h){var k=a.chart.inverted;this.axis=a;this.isNegative=e;this.options=m;this.x=g;this.total=null;this.points={};this.stack=h;this.rightCliff=this.leftCliff=0;this.alignOptions={align:m.align||(k?e?"left":"right":"center"),verticalAlign:m.verticalAlign||(k?"middle":e?"bottom":"top"),y:t(m.y,k?4:e?14:-6),x:t(m.x,k?e?-6:6:0)};this.textAlign=m.textAlign||(k?e?"right":"left":"center")}var B=a.Axis,G=a.Chart,H=a.correctFloat,p=a.defined,l=a.destroyObjectProperties,r=a.each,w=a.format,t=a.pick;a=a.Series;
D.prototype={destroy:function(){l(this,this.axis)},render:function(a){var k=this.options,e=k.format,e=e?w(e,this):k.formatter.call(this);this.label?this.label.attr({text:e,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(e,null,null,k.useHTML).css(k.style).attr({align:this.textAlign,rotation:k.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,m){var e=this.axis,g=e.chart,h=g.inverted,k=e.reversed,k=this.isNegative&&!k||!this.isNegative&&k,f=e.translate(e.usePercentage?100:
this.total,0,0,0,1),e=e.translate(0),e=Math.abs(f-e);a=g.xAxis[0].translate(this.x)+a;var d=g.plotHeight,h={x:h?k?f:f-e:a,y:h?d-a-m:k?d-f-e:d-f,width:h?e:m,height:h?m:e};if(m=this.label)m.align(this.alignOptions,null,h),h=m.alignAttr,m[!1===this.options.crop||g.isInsidePlot(h.x,h.y)?"show":"hide"](!0)}};G.prototype.getStacks=function(){var a=this;r(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});r(a.series,function(k){!k.options.stacking||!0!==k.visible&&!1!==a.options.chart.ignoreHiddenSeries||
(k.stackKey=k.type+t(k.options.stack,""))})};B.prototype.buildStacks=function(){var a=this.series,m,e=t(this.options.reversedStacks,!0),g=a.length,h;if(!this.isXAxis){this.usePercentage=!1;for(h=g;h--;)a[e?h:g-h-1].setStackedPoints();for(h=g;h--;)m=a[e?h:g-h-1],m.setStackCliffs&&m.setStackCliffs();if(this.usePercentage)for(h=0;h<g;h++)a[h].setPercentStacks()}};B.prototype.renderStackTotals=function(){var a=this.chart,m=a.renderer,e=this.stacks,g,h,l=this.stackTotalGroup;l||(this.stackTotalGroup=l=
m.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());l.translate(a.plotLeft,a.plotTop);for(g in e)for(h in a=e[g],a)a[h].render(l)};B.prototype.resetStacks=function(){var a=this.stacks,m,e;if(!this.isXAxis)for(m in a)for(e in a[m])a[m][e].touched<this.stacksTouched?(a[m][e].destroy(),delete a[m][e]):(a[m][e].total=null,a[m][e].cum=0)};B.prototype.cleanStacks=function(){var a,m,e;if(!this.isXAxis)for(m in this.oldStacks&&(a=this.stacks=this.oldStacks),a)for(e in a[m])a[m][e].cum=a[m][e].total};
a.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var a=this.processedXData,m=this.processedYData,e=[],g=m.length,h=this.options,l=h.threshold,f=h.startFromThreshold?l:0,d=h.stack,h=h.stacking,b=this.stackKey,q="-"+b,r=this.negStacks,c=this.yAxis,F=c.stacks,n=c.oldStacks,A,x,J,y,u,I,w;c.stacksTouched+=1;for(u=0;u<g;u++)I=a[u],w=m[u],A=this.getStackIndicator(A,I,this.index),y=A.key,J=(x=r&&w<(f?0:l))?q:b,F[J]||(F[J]=
{}),F[J][I]||(n[J]&&n[J][I]?(F[J][I]=n[J][I],F[J][I].total=null):F[J][I]=new D(c,c.options.stackLabels,x,I,d)),J=F[J][I],null!==w&&(J.points[y]=J.points[this.index]=[t(J.cum,f)],p(J.cum)||(J.base=y),J.touched=c.stacksTouched,0<A.index&&!1===this.singleStacks&&(J.points[y][0]=J.points[this.index+","+I+",0"][0])),"percent"===h?(x=x?b:q,r&&F[x]&&F[x][I]?(x=F[x][I],J.total=x.total=Math.max(x.total,J.total)+Math.abs(w)||0):J.total=H(J.total+(Math.abs(w)||0))):J.total=H(J.total+(w||0)),J.cum=t(J.cum,f)+
(w||0),null!==w&&(J.points[y].push(J.cum),e[u]=J.cum);"percent"===h&&(c.usePercentage=!0);this.stackedYData=e;c.oldStacks={}}};a.prototype.setPercentStacks=function(){var a=this,m=a.stackKey,e=a.yAxis.stacks,g=a.processedXData,h;r([m,"-"+m],function(k){for(var f=g.length,d,b;f--;)if(d=g[f],h=a.getStackIndicator(h,d,a.index,k),d=(b=e[k]&&e[k][d])&&b.points[h.key])b=b.total?100/b.total:0,d[0]=H(d[0]*b),d[1]=H(d[1]*b),a.stackedYData[f]=d[1]})};a.prototype.getStackIndicator=function(a,m,e,g){!p(a)||a.x!==
m||g&&a.key!==g?a={x:m,index:0,key:g}:a.index++;a.key=[e,m,a.index].join();return a}})(N);(function(a){var D=a.addEvent,B=a.animate,G=a.Axis,H=a.createElement,p=a.css,l=a.defined,r=a.each,w=a.erase,t=a.extend,k=a.fireEvent,m=a.inArray,e=a.isNumber,g=a.isObject,h=a.merge,C=a.pick,f=a.Point,d=a.Series,b=a.seriesTypes,q=a.setAnimation,E=a.splat;t(a.Chart.prototype,{addSeries:function(a,b,d){var c,e=this;a&&(b=C(b,!0),k(e,"addSeries",{options:a},function(){c=e.initSeries(a);e.isDirtyLegend=!0;e.linkSeries();
b&&e.redraw(d)}));return c},addAxis:function(a,b,d,e){var c=b?"xAxis":"yAxis",f=this.options;a=h(a,{index:this[c].length,isX:b});new G(this,a);f[c]=E(f[c]||{});f[c].push(a);C(d,!0)&&this.redraw(e)},showLoading:function(a){var b=this,c=b.options,d=b.loadingDiv,e=c.loading,f=function(){d&&p(d,{left:b.plotLeft+"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};d||(b.loadingDiv=d=H("div",{className:"highcharts-loading highcharts-loading-hidden"},null,b.container),b.loadingSpan=
H("span",{className:"highcharts-loading-inner"},null,d),D(b,"redraw",f));d.className="highcharts-loading";b.loadingSpan.innerHTML=a||c.lang.loading;p(d,t(e.style,{zIndex:10}));p(b.loadingSpan,e.labelStyle);b.loadingShown||(p(d,{opacity:0,display:""}),B(d,{opacity:e.style.opacity||.5},{duration:e.showDuration||0}));b.loadingShown=!0;f()},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&(b.className="highcharts-loading highcharts-loading-hidden",B(b,{opacity:0},{duration:a.loading.hideDuration||
100,complete:function(){p(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".split(" "),update:function(a,b){var c,
d={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},f=a.chart,g,q;if(f){h(!0,this.options.chart,f);"className"in f&&this.setClassName(f.className);if("inverted"in f||"polar"in f)this.propFromSeries(),g=!0;for(c in f)f.hasOwnProperty(c)&&(-1!==m("chart."+c,this.propsRequireUpdateSeries)&&(q=!0),-1!==m(c,this.propsRequireDirtyBox)&&(this.isDirtyBox=!0));"style"in f&&this.renderer.setStyle(f.style)}for(c in a){if(this[c]&&"function"===typeof this[c].update)this[c].update(a[c],!1);else if("function"===
typeof this[d[c]])this[d[c]](a[c]);"chart"!==c&&-1!==m(c,this.propsRequireUpdateSeries)&&(q=!0)}a.colors&&(this.options.colors=a.colors);a.plotOptions&&h(!0,this.options.plotOptions,a.plotOptions);r(["xAxis","yAxis","series"],function(b){a[b]&&r(E(a[b]),function(a){var c=l(a.id)&&this.get(a.id)||this[b][0];c&&c.coll===b&&c.update(a,!1)},this)},this);g&&r(this.axes,function(a){a.update({},!1)});q&&r(this.series,function(a){a.update({},!1)});a.loading&&h(!0,this.options.loading,a.loading);c=f&&f.width;
f=f&&f.height;e(c)&&c!==this.chartWidth||e(f)&&f!==this.chartHeight?this.setSize(c,f):C(b,!0)&&this.redraw()},setSubtitle:function(a){this.setTitle(void 0,a)}});t(f.prototype,{update:function(a,b,d,e){function c(){f.applyOptions(a);null===f.y&&q&&(f.graphic=q.destroy());g(a,!0)&&(q&&q.element&&a&&a.marker&&a.marker.symbol&&(f.graphic=q.destroy()),a&&a.dataLabels&&f.dataLabel&&(f.dataLabel=f.dataLabel.destroy()));h=f.index;n.updateParallelArrays(f,h);k.data[h]=g(k.data[h],!0)?f.options:a;n.isDirty=
n.isDirtyData=!0;!n.fixedBox&&n.hasCartesianSeries&&(m.isDirtyBox=!0);"point"===k.legendType&&(m.isDirtyLegend=!0);b&&m.redraw(d)}var f=this,n=f.series,q=f.graphic,h,m=n.chart,k=n.options;b=C(b,!0);!1===e?c():f.firePointEvent("update",{options:a},c)},remove:function(a,b){this.series.removePoint(m(this,this.series.data),a,b)}});t(d.prototype,{addPoint:function(a,b,d,e){var c=this.options,f=this.data,g=this.chart,n=this.xAxis&&this.xAxis.names,q=c.data,h,m,k=this.xData,l,A;b=C(b,!0);h={series:this};
this.pointClass.prototype.applyOptions.apply(h,[a]);A=h.x;l=k.length;if(this.requireSorting&&A<k[l-1])for(m=!0;l&&k[l-1]>A;)l--;this.updateParallelArrays(h,"splice",l,0,0);this.updateParallelArrays(h,l);n&&h.name&&(n[A]=h.name);q.splice(l,0,a);m&&(this.data.splice(l,0,null),this.processData());"point"===c.legendType&&this.generatePoints();d&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),this.updateParallelArrays(h,"shift"),q.shift()));this.isDirtyData=this.isDirty=!0;b&&g.redraw(e)},removePoint:function(a,
b,d){var c=this,e=c.data,f=e[a],g=c.points,n=c.chart,h=function(){g&&g.length===e.length&&g.splice(a,1);e.splice(a,1);c.options.data.splice(a,1);c.updateParallelArrays(f||{series:c},"splice",a,1);f&&f.destroy();c.isDirty=!0;c.isDirtyData=!0;b&&n.redraw()};q(d,n);b=C(b,!0);f?f.firePointEvent("remove",null,h):h()},remove:function(a,b,d){function c(){e.destroy();f.isDirtyLegend=f.isDirtyBox=!0;f.linkSeries();C(a,!0)&&f.redraw(b)}var e=this,f=e.chart;!1!==d?k(e,"remove",null,c):c()},update:function(a,
d){var c=this,e=this.chart,f=this.userOptions,g=this.type,q=a.type||f.type||e.options.chart.type,u=b[g].prototype,m=["group","markerGroup","dataLabelsGroup"],k;if(q&&q!==g||void 0!==a.zIndex)m.length=0;r(m,function(a){m[a]=c[a];delete c[a]});a=h(f,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},a);this.remove(!1,null,!1);for(k in u)this[k]=void 0;t(this,b[q||g].prototype);r(m,function(a){c[a]=m[a]});this.init(e,a);e.linkSeries();C(d,!0)&&e.redraw(!1)}});t(G.prototype,
{update:function(a,b){var c=this.chart;a=c.options[this.coll][this.options.index]=h(this.userOptions,a);this.destroy(!0);this.init(c,t(a,{events:void 0}));c.isDirtyBox=!0;C(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,d=this.series,e=d.length;e--;)d[e]&&d[e].remove(!1);w(b.axes,this);w(b[c],this);b.options[c].splice(this.options.index,1);r(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;C(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},
b)},setCategories:function(a,b){this.update({categories:a},b)}})})(N);(function(a){var D=a.color,B=a.each,G=a.map,H=a.pick,p=a.Series,l=a.seriesType;l("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var a=[],l=[],p=this.xAxis,k=this.yAxis,m=k.stacks[this.stackKey],e={},g=this.points,h=this.index,C=k.series,f=C.length,d,b=H(k.options.reversedStacks,!0)?1:-1,q,E;if(this.options.stacking){for(q=0;q<g.length;q++)e[g[q].x]=g[q];for(E in m)null!==m[E].total&&l.push(E);
l.sort(function(a,b){return a-b});d=G(C,function(){return this.visible});B(l,function(c,g){var n=0,A,x;if(e[c]&&!e[c].isNull)a.push(e[c]),B([-1,1],function(a){var n=1===a?"rightNull":"leftNull",u=0,k=m[l[g+a]];if(k)for(q=h;0<=q&&q<f;)A=k.points[q],A||(q===h?e[c][n]=!0:d[q]&&(x=m[c].points[q])&&(u-=x[1]-x[0])),q+=b;e[c][1===a?"rightCliff":"leftCliff"]=u});else{for(q=h;0<=q&&q<f;){if(A=m[c].points[q]){n=A[1];break}q+=b}n=k.toPixels(n,!0);a.push({isNull:!0,plotX:p.toPixels(c,!0),plotY:n,yBottom:n})}})}return a},
getGraphPath:function(a){var l=p.prototype.getGraphPath,r=this.options,k=r.stacking,m=this.yAxis,e,g,h=[],C=[],f=this.index,d,b=m.stacks[this.stackKey],q=r.threshold,E=m.getThreshold(r.threshold),c,r=r.connectNulls||"percent"===k,F=function(c,e,g){var n=a[c];c=k&&b[n.x].points[f];var l=n[g+"Null"]||0;g=n[g+"Cliff"]||0;var u,x,n=!0;g||l?(u=(l?c[0]:c[1])+g,x=c[0]+g,n=!!l):!k&&a[e]&&a[e].isNull&&(u=x=q);void 0!==u&&(C.push({plotX:d,plotY:null===u?E:m.getThreshold(u),isNull:n}),h.push({plotX:d,plotY:null===
x?E:m.getThreshold(x),doCurve:!1}))};a=a||this.points;k&&(a=this.getStackPoints());for(e=0;e<a.length;e++)if(g=a[e].isNull,d=H(a[e].rectPlotX,a[e].plotX),c=H(a[e].yBottom,E),!g||r)r||F(e,e-1,"left"),g&&!k&&r||(C.push(a[e]),h.push({x:e,plotX:d,plotY:c})),r||F(e,e+1,"right");e=l.call(this,C,!0,!0);h.reversed=!0;g=l.call(this,h,!0,!0);g.length&&(g[0]="L");g=e.concat(g);l=l.call(this,C,!1,r);g.xMap=e.xMap;this.areaPath=g;return l},drawGraph:function(){this.areaPath=[];p.prototype.drawGraph.apply(this);
var a=this,l=this.areaPath,t=this.options,k=[["area","highcharts-area",this.color,t.fillColor]];B(this.zones,function(m,e){k.push(["zone-area-"+e,"highcharts-area highcharts-zone-area-"+e+" "+m.className,m.color||a.color,m.fillColor||t.fillColor])});B(k,function(m){var e=m[0],g=a[e];g?(g.endX=l.xMap,g.animate({d:l})):(g=a[e]=a.chart.renderer.path(l).addClass(m[1]).attr({fill:H(m[3],D(m[2]).setOpacity(H(t.fillOpacity,.75)).get()),zIndex:0}).add(a.group),g.isArea=!0);g.startX=l.xMap;g.shiftUnit=t.step?
2:1})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(N);(function(a){var D=a.pick;a=a.seriesType;a("spline","line",{},{getPointSpline:function(a,G,H){var p=G.plotX,l=G.plotY,r=a[H-1];H=a[H+1];var w,t,k,m;if(r&&!r.isNull&&!1!==r.doCurve&&H&&!H.isNull&&!1!==H.doCurve){a=r.plotY;k=H.plotX;H=H.plotY;var e=0;w=(1.5*p+r.plotX)/2.5;t=(1.5*l+a)/2.5;k=(1.5*p+k)/2.5;m=(1.5*l+H)/2.5;k!==w&&(e=(m-t)*(k-p)/(k-w)+l-m);t+=e;m+=e;t>a&&t>l?(t=Math.max(a,l),m=2*l-t):t<a&&t<l&&(t=Math.min(a,l),m=2*l-t);m>H&&
m>l?(m=Math.max(H,l),t=2*l-m):m<H&&m<l&&(m=Math.min(H,l),t=2*l-m);G.rightContX=k;G.rightContY=m}G=["C",D(r.rightContX,r.plotX),D(r.rightContY,r.plotY),D(w,p),D(t,l),p,l];r.rightContX=r.rightContY=null;return G}})})(N);(function(a){var D=a.seriesTypes.area.prototype,B=a.seriesType;B("areaspline","spline",a.defaultPlotOptions.area,{getStackPoints:D.getStackPoints,getGraphPath:D.getGraphPath,setStackCliffs:D.setStackCliffs,drawGraph:D.drawGraph,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(N);
(function(a){var D=a.animObject,B=a.color,G=a.each,H=a.extend,p=a.isNumber,l=a.merge,r=a.pick,w=a.Series,t=a.seriesType,k=a.stop,m=a.svg;t("column","line",{borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1,shadow:!1},select:{color:"#cccccc",borderColor:"#000000",shadow:!1}},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(){w.prototype.init.apply(this,arguments);var a=this,g=a.chart;g.hasRendered&&G(g.series,function(e){e.type===a.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var a=this,g=a.options,h=a.xAxis,m=a.yAxis,f=h.reversed,d,b={},q=0;!1===g.grouping?q=1:G(a.chart.series,function(c){var e=c.options,f=c.yAxis,g;c.type===a.type&&c.visible&&m.len===f.len&&m.pos===f.pos&&(e.stacking?(d=
c.stackKey,void 0===b[d]&&(b[d]=q++),g=b[d]):!1!==e.grouping&&(g=q++),c.columnIndex=g)});var k=Math.min(Math.abs(h.transA)*(h.ordinalSlope||g.pointRange||h.closestPointRange||h.tickInterval||1),h.len),c=k*g.groupPadding,l=(k-2*c)/q,g=Math.min(g.maxPointWidth||h.len,r(g.pointWidth,l*(1-2*g.pointPadding)));a.columnMetrics={width:g,offset:(l-g)/2+(c+((a.columnIndex||0)+(f?1:0))*l-k/2)*(f?-1:1)};return a.columnMetrics},crispCol:function(a,g,h,k){var e=this.chart,d=this.borderWidth,b=-(d%2?.5:0),d=d%2?
.5:1;e.inverted&&e.renderer.isVML&&(d+=1);h=Math.round(a+h)+b;a=Math.round(a)+b;k=Math.round(g+k)+d;b=.5>=Math.abs(g)&&.5<k;g=Math.round(g)+d;k-=g;b&&k&&(--g,k+=1);return{x:a,y:g,width:h-a,height:k}},translate:function(){var a=this,g=a.chart,h=a.options,k=a.dense=2>a.closestPointRange*a.xAxis.transA,k=a.borderWidth=r(h.borderWidth,k?0:1),f=a.yAxis,d=a.translatedThreshold=f.getThreshold(h.threshold),b=r(h.minPointLength,5),q=a.getColumnMetrics(),m=q.width,c=a.barW=Math.max(m,1+2*k),l=a.pointXOffset=
q.offset;g.inverted&&(d-=.5);h.pointPadding&&(c=Math.ceil(c));w.prototype.translate.apply(a);G(a.points,function(e){var n=r(e.yBottom,d),q=999+Math.abs(n),q=Math.min(Math.max(-q,e.plotY),f.len+q),h=e.plotX+l,k=c,u=Math.min(q,n),p,t=Math.max(q,n)-u;Math.abs(t)<b&&b&&(t=b,p=!f.reversed&&!e.negative||f.reversed&&e.negative,u=Math.abs(u-d)>b?n-b:d-(p?b:0));e.barX=h;e.pointWidth=m;e.tooltipPos=g.inverted?[f.len+f.pos-g.plotLeft-q,a.xAxis.len-h-k/2,t]:[h+k/2,q+f.pos-g.plotTop,t];e.shapeType="rect";e.shapeArgs=
a.crispCol.apply(a,e.isNull?[e.plotX,f.len/2,0,0]:[h,u,k,t])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(a,g){var e=this.options,k=this.pointAttrToOptions||{},f=k.stroke||"borderColor",d=k["stroke-width"]||"borderWidth",b=a&&a.color||this.color,q=a[f]||e[f]||this.color||b,k=e.dashStyle,m;a&&this.zones.length&&(b=(b=a.getZone())&&b.color||a.options.color||
this.color);g&&(g=e.states[g],m=g.brightness,b=g.color||void 0!==m&&B(b).brighten(g.brightness).get()||b,q=g[f]||q,k=g.dashStyle||k);a={fill:b,stroke:q,"stroke-width":a[d]||e[d]||this[d]||0};e.borderRadius&&(a.r=e.borderRadius);k&&(a.dashstyle=k);return a},drawPoints:function(){var a=this,g=this.chart,h=a.options,m=g.renderer,f=h.animationLimit||250,d;G(a.points,function(b){var e=b.graphic;p(b.plotY)&&null!==b.y?(d=b.shapeArgs,e?(k(e),e[g.pointCount<f?"animate":"attr"](l(d))):b.graphic=e=m[b.shapeType](d).attr({"class":b.getClassName()}).add(b.group||
a.group),e.attr(a.pointAttribs(b,b.selected&&"select")).shadow(h.shadow,null,h.stacking&&!h.borderRadius)):e&&(b.graphic=e.destroy())})},animate:function(a){var e=this,h=this.yAxis,k=e.options,f=this.chart.inverted,d={};m&&(a?(d.scaleY=.001,a=Math.min(h.pos+h.len,Math.max(h.pos,h.toPixels(k.threshold))),f?d.translateX=a-h.len:d.translateY=a,e.group.attr(d)):(d[f?"translateX":"translateY"]=h.pos,e.group.animate(d,H(D(e.options.animation),{step:function(a,d){e.group.attr({scaleY:Math.max(.001,d.pos)})}})),
e.animate=null))},remove:function(){var a=this,g=a.chart;g.hasRendered&&G(g.series,function(e){e.type===a.type&&(e.isDirty=!0)});w.prototype.remove.apply(a,arguments)}})})(N);(function(a){a=a.seriesType;a("bar","column",null,{inverted:!0})})(N);(function(a){var D=a.Series;a=a.seriesType;a("scatter","line",{lineWidth:0,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,kdDimensions:2,drawGraph:function(){this.options.lineWidth&&D.prototype.drawGraph.call(this)}})})(N);(function(a){var D=a.pick,B=a.relativeLength;a.CenteredSeriesMixin={getCenter:function(){var a=this.options,H=this.chart,p=2*(a.slicedOffset||0),l=H.plotWidth-2*p,H=H.plotHeight-
2*p,r=a.center,r=[D(r[0],"50%"),D(r[1],"50%"),a.size||"100%",a.innerSize||0],w=Math.min(l,H),t,k;for(t=0;4>t;++t)k=r[t],a=2>t||2===t&&/%$/.test(k),r[t]=B(k,[l,H,w,r[2]][t])+(a?p:0);r[3]>r[2]&&(r[3]=r[2]);return r}}})(N);(function(a){var D=a.addEvent,B=a.defined,G=a.each,H=a.extend,p=a.inArray,l=a.noop,r=a.pick,w=a.Point,t=a.Series,k=a.seriesType,m=a.setAnimation;k("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return null===this.y?
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 e=this,h=e.points,k=e.startAngleRad;a||(G(h,function(a){var d=
a.graphic,b=a.shapeArgs;d&&(d.attr({r:a.startR||e.center[3]/2,start:k,end:k}),d.animate({r:b.r,start:b.start,end:b.end},e.options.animation))}),e.animate=null)},updateTotals:function(){var a,g=0,h=this.points,k=h.length,f,d=this.options.ignoreHiddenPoint;for(a=0;a<k;a++)f=h[a],0>f.y&&(f.y=null),g+=d&&!f.visible?0:f.y;this.total=g;for(a=0;a<k;a++)f=h[a],f.percentage=0<g&&(f.visible||!d)?f.y/g*100:0,f.total=g},generatePoints:function(){t.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();
var e=0,h=this.options,k=h.slicedOffset,f=k+(h.borderWidth||0),d,b,q,m=h.startAngle||0,c=this.startAngleRad=Math.PI/180*(m-90),m=(this.endAngleRad=Math.PI/180*(r(h.endAngle,m+360)-90))-c,l=this.points,n=h.dataLabels.distance,h=h.ignoreHiddenPoint,p,x=l.length,t;a||(this.center=a=this.getCenter());this.getX=function(b,c){q=Math.asin(Math.min((b-a[1])/(a[2]/2+n),1));return a[0]+(c?-1:1)*Math.cos(q)*(a[2]/2+n)};for(p=0;p<x;p++){t=l[p];d=c+e*m;if(!h||t.visible)e+=t.percentage/100;b=c+e*m;t.shapeType=
"arc";t.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:Math.round(1E3*d)/1E3,end:Math.round(1E3*b)/1E3};q=(b+d)/2;q>1.5*Math.PI?q-=2*Math.PI:q<-Math.PI/2&&(q+=2*Math.PI);t.slicedTranslation={translateX:Math.round(Math.cos(q)*k),translateY:Math.round(Math.sin(q)*k)};d=Math.cos(q)*a[2]/2;b=Math.sin(q)*a[2]/2;t.tooltipPos=[a[0]+.7*d,a[1]+.7*b];t.half=q<-Math.PI/2||q>Math.PI/2?1:0;t.angle=q;f=Math.min(f,n/5);t.labelPos=[a[0]+d+Math.cos(q)*n,a[1]+b+Math.sin(q)*n,a[0]+d+Math.cos(q)*f,a[1]+b+Math.sin(q)*
f,a[0]+d,a[1]+b,0>n?"center":t.half?"right":"left",q]}},drawGraph:null,drawPoints:function(){var a=this,g=a.chart.renderer,h,k,f,d,b=a.options.shadow;b&&!a.shadowGroup&&(a.shadowGroup=g.g("shadow").add(a.group));G(a.points,function(e){if(null!==e.y){k=e.graphic;d=e.shapeArgs;h=e.sliced?e.slicedTranslation:{};var q=e.shadowGroup;b&&!q&&(q=e.shadowGroup=g.g("shadow").add(a.shadowGroup));q&&q.attr(h);f=a.pointAttribs(e,e.selected&&"select");k?k.setRadialReference(a.center).attr(f).animate(H(d,h)):(e.graphic=
k=g[e.shapeType](d).addClass(e.getClassName()).setRadialReference(a.center).attr(h).add(a.group),e.visible||k.attr({visibility:"hidden"}),k.attr(f).attr({"stroke-linejoin":"round"}).shadow(b,q))}})},searchPoint:l,sortByAngle:function(a,g){a.sort(function(a,e){return void 0!==a.angle&&(e.angle-a.angle)*g})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:l},{init:function(){w.prototype.init.apply(this,arguments);var a=this,g;a.name=r(a.name,"Slice");
g=function(e){a.slice("select"===e.type)};D(a,"select",g);D(a,"unselect",g);return a},setVisible:function(a,g){var e=this,k=e.series,f=k.chart,d=k.options.ignoreHiddenPoint;g=r(g,d);a!==e.visible&&(e.visible=e.options.visible=a=void 0===a?!e.visible:a,k.options.data[p(e,k.data)]=e.options,G(["graphic","dataLabel","connector","shadowGroup"],function(b){if(e[b])e[b][a?"show":"hide"](!0)}),e.legendItem&&f.legend.colorizeItem(e,a),a||"hover"!==e.state||e.setState(""),d&&(k.isDirty=!0),g&&f.redraw())},
slice:function(a,g,h){var e=this.series;m(h,e.chart);r(g,!0);this.sliced=this.options.sliced=a=B(a)?a:!this.sliced;e.options.data[p(this,e.data)]=this.options;a=a?this.slicedTranslation:{translateX:0,translateY:0};this.graphic.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)},haloPath:function(a){var e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+a,e.r+a,{innerR:this.shapeArgs.r,start:e.start,end:e.end})}})})(N);(function(a){var D=
a.addEvent,B=a.arrayMax,G=a.defined,H=a.each,p=a.extend,l=a.format,r=a.map,w=a.merge,t=a.noop,k=a.pick,m=a.relativeLength,e=a.Series,g=a.seriesTypes,h=a.stableSort,C=a.stop;a.distribute=function(a,d){function b(a,b){return a.target-b.target}var e,f=!0,c=a,g=[],n;n=0;for(e=a.length;e--;)n+=a[e].size;if(n>d){h(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(n=e=0;n<=d;)n+=a[e].size,e++;g=a.splice(e-1,a.length)}h(a,b);for(a=r(a,function(a){return{size:a.size,targets:[a.target]}});f;){for(e=a.length;e--;)f=
a[e],n=(Math.min.apply(0,f.targets)+Math.max.apply(0,f.targets))/2,f.pos=Math.min(Math.max(0,n-f.size/2),d-f.size);e=a.length;for(f=!1;e--;)0<e&&a[e-1].pos+a[e-1].size>a[e].pos&&(a[e-1].size+=a[e].size,a[e-1].targets=a[e-1].targets.concat(a[e].targets),a[e-1].pos+a[e-1].size>d&&(a[e-1].pos=d-a[e-1].size),a.splice(e,1),f=!0)}e=0;H(a,function(a){var b=0;H(a.targets,function(){c[e].pos=a.pos+b;b+=c[e].size;e++})});c.push.apply(c,g);h(c,b)};e.prototype.drawDataLabels=function(){var a=this,d=a.options,
b=d.dataLabels,e=a.points,g,c,h=a.hasRendered||0,n,m,x=k(b.defer,!0),r=a.chart.renderer;if(b.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(b),m=a.plotGroup("dataLabelsGroup","data-labels",x&&!h?"hidden":"visible",b.zIndex||6),x&&(m.attr({opacity:+h}),h||D(a,"afterAnimate",function(){a.visible&&m.show(!0);m[d.animation?"animate":"attr"]({opacity:1},{duration:200})})),c=b,H(e,function(e){var f,q=e.dataLabel,h,x,A=e.connector,y=!0,t,z={};g=e.dlOptions||e.options&&e.options.dataLabels;
f=k(g&&g.enabled,c.enabled)&&null!==e.y;if(q&&!f)e.dataLabel=q.destroy();else if(f){b=w(c,g);t=b.style;f=b.rotation;h=e.getLabelConfig();n=b.format?l(b.format,h):b.formatter.call(h,b);t.color=k(b.color,t.color,a.color,"#000000");if(q)G(n)?(q.attr({text:n}),y=!1):(e.dataLabel=q=q.destroy(),A&&(e.connector=A.destroy()));else if(G(n)){q={fill:b.backgroundColor,stroke:b.borderColor,"stroke-width":b.borderWidth,r:b.borderRadius||0,rotation:f,padding:b.padding,zIndex:1};"contrast"===t.color&&(z.color=b.inside||
0>b.distance||d.stacking?r.getContrast(e.color||a.color):"#000000");d.cursor&&(z.cursor=d.cursor);for(x in q)void 0===q[x]&&delete q[x];q=e.dataLabel=r[f?"text":"label"](n,0,-9999,b.shape,null,null,b.useHTML,null,"data-label").attr(q);q.addClass("highcharts-data-label-color-"+e.colorIndex+" "+(b.className||""));q.css(p(t,z));q.add(m);q.shadow(b.shadow)}q&&a.alignDataLabel(e,q,b,null,y)}})};e.prototype.alignDataLabel=function(a,d,b,e,g){var c=this.chart,f=c.inverted,n=k(a.plotX,-9999),q=k(a.plotY,
-9999),h=d.getBBox(),m,l=b.rotation,u=b.align,r=this.visible&&(a.series.forceDL||c.isInsidePlot(n,Math.round(q),f)||e&&c.isInsidePlot(n,f?e.x+1:e.y+e.height-1,f)),t="justify"===k(b.overflow,"justify");r&&(m=b.style.fontSize,m=c.renderer.fontMetrics(m,d).b,e=p({x:f?c.plotWidth-q:n,y:Math.round(f?c.plotHeight-n:q),width:0,height:0},e),p(b,{width:h.width,height:h.height}),l?(t=!1,f=c.renderer.rotCorr(m,l),f={x:e.x+b.x+e.width/2+f.x,y:e.y+b.y+{top:0,middle:.5,bottom:1}[b.verticalAlign]*e.height},d[g?
"attr":"animate"](f).attr({align:u}),n=(l+720)%360,n=180<n&&360>n,"left"===u?f.y-=n?h.height:0:"center"===u?(f.x-=h.width/2,f.y-=h.height/2):"right"===u&&(f.x-=h.width,f.y-=n?0:h.height)):(d.align(b,null,e),f=d.alignAttr),t?this.justifyDataLabel(d,b,f,h,e,g):k(b.crop,!0)&&(r=c.isInsidePlot(f.x,f.y)&&c.isInsidePlot(f.x+h.width,f.y+h.height)),b.shape&&!l&&d.attr({anchorX:a.plotX,anchorY:a.plotY}));r||(C(d),d.attr({y:-9999}),d.placed=!1)};e.prototype.justifyDataLabel=function(a,d,b,e,g,c){var f=this.chart,
n=d.align,h=d.verticalAlign,q,k,m=a.box?0:a.padding||0;q=b.x+m;0>q&&("right"===n?d.align="left":d.x=-q,k=!0);q=b.x+e.width-m;q>f.plotWidth&&("left"===n?d.align="right":d.x=f.plotWidth-q,k=!0);q=b.y+m;0>q&&("bottom"===h?d.verticalAlign="top":d.y=-q,k=!0);q=b.y+e.height-m;q>f.plotHeight&&("top"===h?d.verticalAlign="bottom":d.y=f.plotHeight-q,k=!0);k&&(a.placed=!c,a.align(d,null,g))};g.pie&&(g.pie.prototype.drawDataLabels=function(){var f=this,d=f.data,b,g=f.chart,h=f.options.dataLabels,c=k(h.connectorPadding,
10),m=k(h.connectorWidth,1),n=g.plotWidth,l=g.plotHeight,x,p=h.distance,y=f.center,u=y[2]/2,t=y[1],w=0<p,v,C,D,G,z=[[],[]],L,P,S,Q,T=[0,0,0,0];f.visible&&(h.enabled||f._hasPointLabels)&&(e.prototype.drawDataLabels.apply(f),H(d,function(a){a.dataLabel&&a.visible&&(z[a.half].push(a),a.dataLabel._pos=null)}),H(z,function(d,e){var q,k,m=d.length,x,A,z;if(m)for(f.sortByAngle(d,e-.5),0<p&&(q=Math.max(0,t-u-p),k=Math.min(t+u+p,g.plotHeight),x=r(d,function(a){if(a.dataLabel)return z=a.dataLabel.getBBox().height||
21,{target:a.labelPos[1]-q+z/2,size:z,rank:a.y}}),a.distribute(x,k+z-q)),Q=0;Q<m;Q++)b=d[Q],D=b.labelPos,v=b.dataLabel,S=!1===b.visible?"hidden":"inherit",A=D[1],x?void 0===x[Q].pos?S="hidden":(G=x[Q].size,P=q+x[Q].pos):P=A,L=h.justify?y[0]+(e?-1:1)*(u+p):f.getX(P<q+2||P>k-2?A:P,e),v._attr={visibility:S,align:D[6]},v._pos={x:L+h.x+({left:c,right:-c}[D[6]]||0),y:P+h.y-10},D.x=L,D.y=P,null===f.options.size&&(C=v.width,L-C<c?T[3]=Math.max(Math.round(C-L+c),T[3]):L+C>n-c&&(T[1]=Math.max(Math.round(L+
C-n+c),T[1])),0>P-G/2?T[0]=Math.max(Math.round(-P+G/2),T[0]):P+G/2>l&&(T[2]=Math.max(Math.round(P+G/2-l),T[2])))}),0===B(T)||this.verifyDataLabelOverflow(T))&&(this.placeDataLabels(),w&&m&&H(this.points,function(a){var b;x=a.connector;if((v=a.dataLabel)&&v._pos&&a.visible){S=v._attr.visibility;if(b=!x)a.connector=x=g.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex).add(f.dataLabelsGroup),x.attr({"stroke-width":m,stroke:h.connectorColor||a.color||"#666666"});
x[b?"attr":"animate"]({d:f.connectorPath(a.labelPos)});x.attr("visibility",S)}else x&&(a.connector=x.destroy())}))},g.pie.prototype.connectorPath=function(a){var d=a.x,b=a.y;return k(this.options.dataLabels.softConnector,!0)?["M",d+("left"===a[6]?5:-5),b,"C",d,b,2*a[2]-a[4],2*a[3]-a[5],a[2],a[3],"L",a[4],a[5]]:["M",d+("left"===a[6]?5:-5),b,"L",a[2],a[3],"L",a[4],a[5]]},g.pie.prototype.placeDataLabels=function(){H(this.points,function(a){var d=a.dataLabel;d&&a.visible&&((a=d._pos)?(d.attr(d._attr),
d[d.moved?"animate":"attr"](a),d.moved=!0):d&&d.attr({y:-9999}))})},g.pie.prototype.alignDataLabel=t,g.pie.prototype.verifyDataLabelOverflow=function(a){var d=this.center,b=this.options,e=b.center,f=b.minSize||80,c,g;null!==e[0]?c=Math.max(d[2]-Math.max(a[1],a[3]),f):(c=Math.max(d[2]-a[1]-a[3],f),d[0]+=(a[3]-a[1])/2);null!==e[1]?c=Math.max(Math.min(c,d[2]-Math.max(a[0],a[2])),f):(c=Math.max(Math.min(c,d[2]-a[0]-a[2]),f),d[1]+=(a[0]-a[2])/2);c<d[2]?(d[2]=c,d[3]=Math.min(m(b.innerSize||0,c),c),this.translate(d),
this.drawDataLabels&&this.drawDataLabels()):g=!0;return g});g.column&&(g.column.prototype.alignDataLabel=function(a,d,b,g,h){var c=this.chart.inverted,f=a.series,n=a.dlBox||a.shapeArgs,q=k(a.below,a.plotY>k(this.translatedThreshold,f.yAxis.len)),m=k(b.inside,!!this.options.stacking);n&&(g=w(n),0>g.y&&(g.height+=g.y,g.y=0),n=g.y+g.height-f.yAxis.len,0<n&&(g.height-=n),c&&(g={x:f.yAxis.len-g.y-g.height,y:f.xAxis.len-g.x-g.width,width:g.height,height:g.width}),m||(c?(g.x+=q?0:g.width,g.width=0):(g.y+=
q?g.height:0,g.height=0)));b.align=k(b.align,!c||m?"center":q?"right":"left");b.verticalAlign=k(b.verticalAlign,c||m?"middle":q?"top":"bottom");e.prototype.alignDataLabel.call(this,a,d,b,g,h)})})(N);(function(a){var D=a.Chart,B=a.each,G=a.pick,H=a.addEvent;D.prototype.callbacks.push(function(a){function l(){var l=[];B(a.series,function(a){var p=a.options.dataLabels,k=a.dataLabelCollections||["dataLabel"];(p.enabled||a._hasPointLabels)&&!p.allowOverlap&&a.visible&&B(k,function(k){B(a.points,function(a){a[k]&&
(a[k].labelrank=G(a.labelrank,a.shapeArgs&&a.shapeArgs.height),l.push(a[k]))})})});a.hideOverlappingLabels(l)}l();H(a,"redraw",l)});D.prototype.hideOverlappingLabels=function(a){var l=a.length,p,w,t,k,m,e,g,h,C,f=function(a,b,e,f,c,g,n,h){return!(c>a+e||c+n<a||g>b+f||g+h<b)};for(w=0;w<l;w++)if(p=a[w])p.oldOpacity=p.opacity,p.newOpacity=1;a.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(w=0;w<l;w++)for(t=a[w],p=w+1;p<l;++p)if(k=a[p],t&&k&&t.placed&&k.placed&&0!==t.newOpacity&&0!==
k.newOpacity&&(m=t.alignAttr,e=k.alignAttr,g=t.parentGroup,h=k.parentGroup,C=2*(t.box?0:t.padding),m=f(m.x+g.translateX,m.y+g.translateY,t.width-C,t.height-C,e.x+h.translateX,e.y+h.translateY,k.width-C,k.height-C)))(t.labelrank<k.labelrank?t:k).newOpacity=0;B(a,function(a){var b,d;a&&(d=a.newOpacity,a.oldOpacity!==d&&a.placed&&(d?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=d,a[a.isOld?"animate":"attr"](a.alignAttr,null,b)),a.isOld=!0)})}})(N);(function(a){var D=a.addEvent,B=a.Chart,G=a.createElement,
H=a.css,p=a.defaultOptions,l=a.defaultPlotOptions,r=a.each,w=a.extend,t=a.fireEvent,k=a.hasTouch,m=a.inArray,e=a.isObject,g=a.Legend,h=a.merge,C=a.pick,f=a.Point,d=a.Series,b=a.seriesTypes,q=a.svg,E;E=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,d=b.pointer,e=function(a){for(var c=a.target,d;c&&!d;)d=c.point,c=c.parentNode;if(void 0!==d&&d!==b.hoverPoint)d.onMouseOver(a)};r(a.points,function(a){a.graphic&&(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.element.point=a)});
a._hasTracking||(r(a.trackerGroups,function(b){if(a[b]){a[b].addClass("highcharts-tracker").on("mouseover",e).on("mouseout",function(a){d.onTrackerMouseOut(a)});if(k)a[b].on("touchstart",e);a.options.cursor&&a[b].css(H).css({cursor:a.options.cursor})}}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,b=a.options,d=b.trackByArea,e=[].concat(d?a.areaPath:a.graphPath),f=e.length,g=a.chart,h=g.pointer,m=g.renderer,l=g.options.tooltip.snap,p=a.tracker,v,t=function(){if(g.hoverSeries!==a)a.onMouseOver()},
w="rgba(192,192,192,"+(q?.0001:.002)+")";if(f&&!d)for(v=f+1;v--;)"M"===e[v]&&e.splice(v+1,0,e[v+1]-l,e[v+2],"L"),(v&&"M"===e[v]||v===f)&&e.splice(v,0,"L",e[v-2]+l,e[v-1]);p?p.attr({d:e}):a.graph&&(a.tracker=m.path(e).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:w,fill:d?w:"none","stroke-width":a.graph.strokeWidth()+(d?0:2*l),zIndex:2}).add(a.group),r([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",t).on("mouseout",function(a){h.onTrackerMouseOut(a)});
b.cursor&&a.css({cursor:b.cursor});if(k)a.on("touchstart",t)}))}};b.column&&(b.column.prototype.drawTracker=E.drawTrackerPoint);b.pie&&(b.pie.prototype.drawTracker=E.drawTrackerPoint);b.scatter&&(b.scatter.prototype.drawTracker=E.drawTrackerPoint);w(g.prototype,{setItemEvents:function(a,b,d){var c=this,e=c.chart,f="highcharts-legend-"+(a.series?"point":"series")+"-active";(d?b:a.legendGroup).on("mouseover",function(){a.setState("hover");e.seriesGroup.addClass(f);b.css(c.options.itemHoverStyle)}).on("mouseout",
function(){b.css(a.visible?c.itemStyle:c.itemHiddenStyle);e.seriesGroup.removeClass(f);a.setState()}).on("click",function(b){var c=function(){a.setVisible&&a.setVisible()};b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):t(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=G("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);D(a.checkbox,"click",function(b){t(a.series||a,"checkboxClick",
{checked:b.target.checked,item:a},function(){a.select()})})}});p.legend.itemStyle.cursor="pointer";w(B.prototype,{showResetZoom:function(){var a=this,b=p.lang,d=a.options.chart.resetZoomButton,e=d.theme,f=e.states,g="chart"===d.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},e,f&&f.hover).attr({align:d.position.align,title:b.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(d.position,!1,g)},zoomOut:function(){var a=this;
t(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,c=this.pointer,d=!1,f;!a||a.resetSelection?r(this.axes,function(a){b=a.zoom()}):r(a.xAxis.concat(a.yAxis),function(a){var e=a.axis;c[e.isXAxis?"zoomX":"zoomY"]&&(b=e.zoom(a.min,a.max),e.displayBtn&&(d=!0))});f=this.resetZoomButton;d&&!f?this.showResetZoom():!d&&e(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,d=c.hoverPoints,
e;d&&r(d,function(a){a.setState()});r("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,f=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",g=c[d],n=(b.pointRange||0)/2,h=b.getExtremes(),q=b.toValue(g-f,!0)+n,n=b.toValue(g+b.len-f,!0)-n,g=g>f;b.series.length&&(g||q>Math.min(h.dataMin,h.min))&&(!g||n<Math.max(h.dataMax,h.max))&&(b.setExtremes(q,n,!1,!1,{trigger:"pan"}),e=!0);c[d]=f});e&&c.redraw(!1);H(c.container,{cursor:"move"})}});w(f.prototype,{select:function(a,b){var c=
this,d=c.series,e=d.chart;a=C(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=c.options.selected=a;d.options.data[m(c,d.data)]=c.options;c.setState(a&&"select");b||r(e.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=a.options.selected=!1,d.options.data[m(a,d.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},onMouseOver:function(a,b){var c=this.series,d=c.chart,e=d.tooltip,f=d.hoverPoint;if(this.series){if(!b){if(f&&f!==this)f.onMouseOut();
if(d.hoverSeries!==c)c.onMouseOver();d.hoverPoint=this}!e||e.shared&&!c.noSharedTooltip?e||this.setState("hover"):(this.setState("hover"),e.refresh(this,a));this.firePointEvent("mouseOver")}},onMouseOut:function(){var a=this.series.chart,b=a.hoverPoints;this.firePointEvent("mouseOut");b&&-1!==m(this,b)||(this.setState(),a.hoverPoint=null)},importEvents:function(){if(!this.hasImportedEvents){var a=h(this.series.options.point,this.options).events,b;this.events=a;for(b in a)D(this,b,a[b]);this.hasImportedEvents=
!0}},setState:function(b,d){var c=Math.floor(this.plotX),e=this.plotY,f=this.series,g=f.options.states[b]||{},h=l[f.type].marker&&f.options.marker,q=h&&!1===h.enabled,k=h&&h.states&&h.states[b]||{},m=!1===k.enabled,p=f.stateMarkerGraphic,r=this.marker||{},t=f.chart,E=f.halo,z,F=h&&f.markerAttribs;b=b||"";if(!(b===this.state&&!d||this.selected&&"select"!==b||!1===g.enabled||b&&(m||q&&!1===k.enabled)||b&&r.states&&r.states[b]&&!1===r.states[b].enabled)){F&&(z=f.markerAttribs(this,b));if(this.graphic)this.state&&
this.graphic.removeClass("highcharts-point-"+this.state),b&&this.graphic.addClass("highcharts-point-"+b),this.graphic.attr(f.pointAttribs(this,b)),z&&this.graphic.animate(z,C(t.options.chart.animation,k.animation,h.animation)),p&&p.hide();else{if(b&&k){h=r.symbol||f.symbol;p&&p.currentSymbol!==h&&(p=p.destroy());if(p)p[d?"animate":"attr"]({x:z.x,y:z.y});else h&&(f.stateMarkerGraphic=p=t.renderer.symbol(h,z.x,z.y,z.width,z.height).add(f.markerGroup),p.currentSymbol=h);p&&p.attr(f.pointAttribs(this,
b))}p&&(p[b&&t.isInsidePlot(c,e,t.inverted)?"show":"hide"](),p.element.point=this)}(c=g.halo)&&c.size?(E||(f.halo=E=t.renderer.path().add(F?f.markerGroup:f.group)),a.stop(E),E[d?"animate":"attr"]({d:this.haloPath(c.size)}),E.attr({"class":"highcharts-halo highcharts-color-"+C(this.colorIndex,f.colorIndex)}),E.attr(w({fill:this.color||f.color,"fill-opacity":c.opacity,zIndex:-1},c.attributes))):E&&E.animate({d:this.haloPath(0)});this.state=b}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-
a,this.plotY-a,2*a,2*a)}});w(d.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&t(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,d=b.tooltip,e=b.hoverPoint;b.hoverSeries=null;if(e)e.onMouseOut();this&&a.events.mouseOut&&t(this,"mouseOut");!d||a.stickyTracking||d.shared&&!this.noSharedTooltip||d.hide();this.setState()},setState:function(a){var b=this,c=
b.options,d=b.graph,e=c.states,f=c.lineWidth,c=0;a=a||"";if(b.state!==a&&(r([b.group,b.markerGroup],function(c){c&&(b.state&&c.removeClass("highcharts-series-"+b.state),a&&c.addClass("highcharts-series-"+a))}),b.state=a,!e[a]||!1!==e[a].enabled)&&(a&&(f=e[a].lineWidth||f+(e[a].lineWidthPlus||0)),d&&!d.dashstyle))for(e={"stroke-width":f},d.attr(e);b["zone-graph-"+c];)b["zone-graph-"+c].attr(e),c+=1},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,f,g=d.options.chart.ignoreHiddenSeries,
h=c.visible;f=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!h:a)?"show":"hide";r(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][f]()});if(d.hoverSeries===c||(d.hoverPoint&&d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&r(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});r(c.linkedSeries,function(b){b.setVisible(a,!1)});g&&(d.isDirtyBox=!0);!1!==b&&d.redraw();t(c,f)},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);t(this,a?"select":"unselect")},drawTracker:E.drawTrackerGraph})})(N);(function(a){var D=a.Chart,B=a.each,G=a.inArray,H=a.isObject,p=a.pick,l=a.splat;D.prototype.setResponsive=function(a){var l=this.options.responsive;l&&l.rules&&B(l.rules,function(l){this.matchResponsiveRule(l,a)},this)};D.prototype.matchResponsiveRule=function(l,w){var r=this.respRules,k=l.condition,
m;m=k.callback||function(){return this.chartWidth<=p(k.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=p(k.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=p(k.minWidth,0)&&this.chartHeight>=p(k.minHeight,0)};void 0===l._id&&(l._id=a.uniqueKey());m=m.call(this);!r[l._id]&&m?l.chartOptions&&(r[l._id]=this.currentOptions(l.chartOptions),this.update(l.chartOptions,w)):r[l._id]&&!m&&(this.update(r[l._id],w),delete r[l._id])};D.prototype.currentOptions=function(a){function p(a,m,e){var g,h;for(g in a)if(-1<
G(g,["series","xAxis","yAxis"]))for(a[g]=l(a[g]),e[g]=[],h=0;h<a[g].length;h++)e[g][h]={},p(a[g][h],m[g][h],e[g][h]);else H(a[g])?(e[g]={},p(a[g],m[g]||{},e[g])):e[g]=m[g]||null}var r={};p(a,this.options,r);return r}})(N);(function(a){var D=a.addEvent,B=a.Axis,G=a.Chart,H=a.css,p=a.dateFormat,l=a.defined,r=a.each,w=a.extend,t=a.noop,k=a.Series,m=a.timeUnits;a=a.wrap;a(k.prototype,"init",function(a){var e;a.apply(this,Array.prototype.slice.call(arguments,1));(e=this.xAxis)&&e.options.ordinal&&D(this,
"updatedData",function(){delete e.ordinalIndex})});a(B.prototype,"getTimeTicks",function(a,g,h,k,f,d,b,q){var e=0,c,r,n={},t,x,w,y=[],u=-Number.MAX_VALUE,C=this.options.tickPixelInterval;if(!this.options.ordinal&&!this.options.breaks||!d||3>d.length||void 0===h)return a.call(this,g,h,k,f);x=d.length;for(c=0;c<x;c++){w=c&&d[c-1]>k;d[c]<h&&(e=c);if(c===x-1||d[c+1]-d[c]>5*b||w){if(d[c]>u){for(r=a.call(this,g,d[e],d[c],f);r.length&&r[0]<=u;)r.shift();r.length&&(u=r[r.length-1]);y=y.concat(r)}e=c+1}if(w)break}a=
r.info;if(q&&a.unitRange<=m.hour){c=y.length-1;for(e=1;e<c;e++)p("%d",y[e])!==p("%d",y[e-1])&&(n[y[e]]="day",t=!0);t&&(n[y[0]]="day");a.higherRanks=n}y.info=a;if(q&&l(C)){q=a=y.length;c=[];var M;for(t=[];q--;)e=this.translate(y[q]),M&&(t[q]=M-e),c[q]=M=e;t.sort();t=t[Math.floor(t.length/2)];t<.6*C&&(t=null);q=y[a-1]>k?a-1:a;for(M=void 0;q--;)e=c[q],k=M-e,M&&k<.8*C&&(null===t||k<.8*t)?(n[y[q]]&&!n[y[q+1]]?(k=q+1,M=e):k=q,y.splice(k,1)):M=e}return y});w(B.prototype,{beforeSetTickPositions:function(){var a,
g=[],h=!1,k,f=this.getExtremes(),d=f.min,b=f.max,q,m=this.isXAxis&&!!this.options.breaks,f=this.options.ordinal,c=this.chart.options.chart.ignoreHiddenSeries;if(f||m){r(this.series,function(b,d){if(!(c&&!1===b.visible||!1===b.takeOrdinalPosition&&!m)&&(g=g.concat(b.processedXData),a=g.length,g.sort(function(a,b){return a-b}),a))for(d=a-1;d--;)g[d]===g[d+1]&&g.splice(d,1)});a=g.length;if(2<a){k=g[1]-g[0];for(q=a-1;q--&&!h;)g[q+1]-g[q]!==k&&(h=!0);!this.options.keepOrdinalPadding&&(g[0]-d>k||b-g[g.length-
1]>k)&&(h=!0)}h?(this.ordinalPositions=g,k=this.val2lin(Math.max(d,g[0]),!0),q=Math.max(this.val2lin(Math.min(b,g[g.length-1]),!0),1),this.ordinalSlope=b=(b-d)/(q-k),this.ordinalOffset=d-k*b):this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0}this.isOrdinal=f&&h;this.groupIntervalFactor=null},val2lin:function(a,g){var e=this.ordinalPositions;if(e){var k=e.length,f,d;for(f=k;f--;)if(e[f]===a){d=f;break}for(f=k-1;f--;)if(a>e[f]||0===f){a=(a-e[f])/(e[f+1]-e[f]);d=f+a;break}g=g?d:this.ordinalSlope*
(d||0)+this.ordinalOffset}else g=a;return g},lin2val:function(a,g){var e=this.ordinalPositions;if(e){var k=this.ordinalSlope,f=this.ordinalOffset,d=e.length-1,b;if(g)0>a?a=e[0]:a>d?a=e[d]:(d=Math.floor(a),b=a-d);else for(;d--;)if(g=k*d+f,a>=g){k=k*(d+1)+f;b=(a-g)/(k-g);break}return void 0!==b&&void 0!==e[d]?e[d]+(b?b*(e[d+1]-e[d]):0):a}return a},getExtendedPositions:function(){var a=this.chart,g=this.series[0].currentDataGrouping,h=this.ordinalIndex,k=g?g.count+g.unitName:"raw",f=this.getExtremes(),
d,b;h||(h=this.ordinalIndex={});h[k]||(d={series:[],chart:a,getExtremes:function(){return{min:f.dataMin,max:f.dataMax}},options:{ordinal:!0},val2lin:B.prototype.val2lin},r(this.series,function(e){b={xAxis:d,xData:e.xData,chart:a,destroyGroupedData:t};b.options={dataGrouping:g?{enabled:!0,forced:!0,approximation:"open",units:[[g.unitName,[g.count]]]}:{enabled:!1}};e.processData.apply(b);d.series.push(b)}),this.beforeSetTickPositions.apply(d),h[k]=d.ordinalPositions);return h[k]},getGroupIntervalFactor:function(a,
g,h){var e;h=h.processedXData;var f=h.length,d=[];e=this.groupIntervalFactor;if(!e){for(e=0;e<f-1;e++)d[e]=h[e+1]-h[e];d.sort(function(a,d){return a-d});d=d[Math.floor(f/2)];a=Math.max(a,h[0]);g=Math.min(g,h[f-1]);this.groupIntervalFactor=e=f*d/(g-a)}return e},postProcessTickInterval:function(a){var e=this.ordinalSlope;return e?this.options.breaks?this.closestPointRange:a/(e/this.closestPointRange):a}});a(G.prototype,"pan",function(a,g){var e=this.xAxis[0],k=g.chartX,f=!1;if(e.options.ordinal&&e.series.length){var d=
this.mouseDownX,b=e.getExtremes(),q=b.dataMax,m=b.min,c=b.max,l=this.hoverPoints,n=e.closestPointRange,d=(d-k)/(e.translationSlope*(e.ordinalSlope||n)),p={ordinalPositions:e.getExtendedPositions()},n=e.lin2val,x=e.val2lin,t;p.ordinalPositions?1<Math.abs(d)&&(l&&r(l,function(a){a.setState()}),0>d?(l=p,t=e.ordinalPositions?e:p):(l=e.ordinalPositions?e:p,t=p),p=t.ordinalPositions,q>p[p.length-1]&&p.push(q),this.fixedRange=c-m,d=e.toFixedRange(null,null,n.apply(l,[x.apply(l,[m,!0])+d,!0]),n.apply(t,[x.apply(t,
[c,!0])+d,!0])),d.min>=Math.min(b.dataMin,m)&&d.max<=Math.max(q,c)&&e.setExtremes(d.min,d.max,!0,!1,{trigger:"pan"}),this.mouseDownX=k,H(this.container,{cursor:"move"})):f=!0}else f=!0;f&&a.apply(this,Array.prototype.slice.call(arguments,1))});k.prototype.gappedPath=function(){var a=this.options.gapSize,g=this.points.slice(),h=g.length-1;if(a&&0<h)for(;h--;)g[h+1].x-g[h].x>this.closestPointRange*a&&g.splice(h+1,0,{isNull:!0});return this.getGraphPath(g)}})(N);(function(a){function D(){return Array.prototype.slice.call(arguments,
1)}function B(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,G(this.pointArrayMap,["y"]))}var G=a.pick,H=a.wrap,p=a.each,l=a.extend,r=a.fireEvent,w=a.Axis,t=a.Series;l(w.prototype,{isInBreak:function(a,m){var e=a.repeat||Infinity,g=a.from,h=a.to-a.from;m=m>=g?(m-g)%e:e-(g-m)%e;return a.inclusive?m<=h:m<h&&0!==m},isInAnyBreak:function(a,m){var e=this.options.breaks,g=e&&e.length,h,k,f;if(g){for(;g--;)this.isInBreak(e[g],a)&&(h=!0,k||(k=G(e[g].showPoints,this.isXAxis?
!1:!0)));f=h&&m?h&&!k:h}return f}});H(w.prototype,"setTickPositions",function(a){a.apply(this,Array.prototype.slice.call(arguments,1));if(this.options.breaks){var k=this.tickPositions,e=this.tickPositions.info,g=[],h;for(h=0;h<k.length;h++)this.isInAnyBreak(k[h])||g.push(k[h]);this.tickPositions=g;this.tickPositions.info=e}});H(w.prototype,"init",function(a,m,e){e.breaks&&e.breaks.length&&(e.ordinal=!1);a.call(this,m,e);if(this.options.breaks){var g=this;g.isBroken=!0;this.val2lin=function(a){var e=
a,f,d;for(d=0;d<g.breakArray.length;d++)if(f=g.breakArray[d],f.to<=a)e-=f.len;else if(f.from>=a)break;else if(g.isInBreak(f,a)){e-=a-f.from;break}return e};this.lin2val=function(a){var e,f;for(f=0;f<g.breakArray.length&&!(e=g.breakArray[f],e.from>=a);f++)e.to<a?a+=e.len:g.isInBreak(e,a)&&(a+=e.len);return a};this.setExtremes=function(a,e,f,d,b){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(e);)e-=this.closestPointRange;w.prototype.setExtremes.call(this,a,e,f,d,b)};this.setAxisTranslation=
function(a){w.prototype.setAxisTranslation.call(this,a);var e=g.options.breaks;a=[];var f=[],d=0,b,k,h=g.userMin||g.min,c=g.userMax||g.max,m,n;for(n in e)k=e[n],b=k.repeat||Infinity,g.isInBreak(k,h)&&(h+=k.to%b-h%b),g.isInBreak(k,c)&&(c-=c%b-k.from%b);for(n in e){k=e[n];m=k.from;for(b=k.repeat||Infinity;m-b>h;)m-=b;for(;m<h;)m+=b;for(;m<c;m+=b)a.push({value:m,move:"in"}),a.push({value:m+(k.to-k.from),move:"out",size:k.breakSize})}a.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===
b.move?0:1):a.value-b.value});e=0;m=h;for(n in a)k=a[n],e+="in"===k.move?1:-1,1===e&&"in"===k.move&&(m=k.value),0===e&&(f.push({from:m,to:k.value,len:k.value-m-(k.size||0)}),d+=k.value-m-(k.size||0));g.breakArray=f;r(g,"afterBreaks");g.transA*=(c-g.min)/(c-h-d);g.min=h;g.max=c}}});H(t.prototype,"generatePoints",function(a){a.apply(this,D(arguments));var k=this.xAxis,e=this.yAxis,g=this.points,h,l=g.length,f=this.options.connectNulls,d;if(k&&e&&(k.options.breaks||e.options.breaks))for(;l--;)h=g[l],
d=null===h.y&&!1===f,d||!k.isInAnyBreak(h.x,!0)&&!e.isInAnyBreak(h.y,!0)||(g.splice(l,1),this.data[l]&&this.data[l].destroyElements())});a.Series.prototype.drawBreaks=function(a,m){var e=this,g=e.points,k,l,f,d;p(m,function(b){k=a.breakArray||[];l=a.isXAxis?a.min:G(e.options.threshold,a.min);p(g,function(e){d=G(e["stack"+b.toUpperCase()],e[b]);p(k,function(b){f=!1;if(l<b.from&&d>b.to||l>b.from&&d<b.from)f="pointBreak";else if(l<b.from&&d>b.from&&d<b.to||l>b.from&&d>b.to&&d<b.from)f="pointInBreak";
f&&r(a,f,{point:e,brk:b})})})})};H(a.seriesTypes.column.prototype,"drawPoints",B);H(a.Series.prototype,"drawPoints",B)})(N);(function(a){var D=a.arrayMax,B=a.arrayMin,G=a.Axis,H=a.defaultPlotOptions,p=a.defined,l=a.each,r=a.error,w=a.extend,t=a.format,k=a.isNumber,m=a.merge,e=a.pick,g=a.Point,h=a.Tooltip,C=a.wrap,f=a.Series.prototype,d=f.processData,b=f.generatePoints,q=f.destroy,E={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"]}},c={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}},F=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]],n={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=n.sum(a);k(a)&&b&&(a/=b);return a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?D(a):a.hasNulls?null:void 0},low:function(a){return a.length?B(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,b,c,d){a=n.open(a);b=n.high(b);c=n.low(c);d=n.close(d);if(k(a)||k(b)||k(c)||k(d))return[a,b,c,d]},range:function(a,b){a=n.low(a);b=n.high(b);if(k(a)||k(b))return[a,b]}};f.groupData=function(a,
b,c,d){var e=this.data,f=this.options.data,g=[],h=[],m=[],q=a.length,l,p,r=!!b,t=[[],[],[],[]];d="function"===typeof d?d:n[d];var x=this.pointArrayMap,y=x&&x.length,A,w=0;for(A=p=0;A<=q&&!(a[A]>=c[0]);A++);for(A;A<=q;A++){for(;(void 0!==c[w+1]&&a[A]>=c[w+1]||A===q)&&(l=c[w],this.dataGroupInfo={start:p,length:t[0].length},p=d.apply(this,t),void 0!==p&&(g.push(l),h.push(p),m.push(this.dataGroupInfo)),p=A,t[0]=[],t[1]=[],t[2]=[],t[3]=[],w+=1,A!==q););if(A===q)break;if(x){l=this.cropStart+A;l=e&&e[l]||
this.pointClass.prototype.applyOptions.apply({series:this},[f[l]]);var E,C;for(E=0;E<y;E++)C=l[x[E]],k(C)?t[E].push(C):null===C&&(t[E].hasNulls=!0)}else l=r?b[A]:null,k(l)?t[0].push(l):null===l&&(t[0].hasNulls=!0)}return[g,h,m]};f.processData=function(){var a=this.chart,b=this.options.dataGrouping,c=!1!==this.allowDG&&b&&e(b.enabled,a.options._stock),g=this.visible||!a.options.chart.ignoreHiddenSeries,k;this.forceCrop=c;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==d.apply(this,arguments)&&
c&&g){this.destroyGroupedData();var h=this.processedXData,n=this.processedYData,m=a.plotSizeX,a=this.xAxis,q=a.options.ordinal,l=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();if(l){this.isDirty=k=!0;g=a.getExtremes();c=g.min;g=g.max;q=q&&a.getGroupIntervalFactor(c,g,this)||1;m=l*(g-c)/m*q;l=a.getTimeTicks(a.normalizeTimeTickInterval(m,b.units||F),Math.min(c,h[0]),Math.max(g,h[h.length-1]),a.options.startOfWeek,h,this.closestPointRange);h=f.groupData.apply(this,[h,n,l,b.approximation]);
n=h[0];q=h[1];if(b.smoothed){b=n.length-1;for(n[b]=Math.min(n[b],g);b--&&0<b;)n[b]+=m/2;n[0]=Math.max(n[0],c)}this.currentDataGrouping=l.info;this.closestPointRange=l.info.totalRange;this.groupMap=h[2];p(n[0])&&n[0]<a.dataMin&&(a.min===a.dataMin&&(a.min=n[0]),a.dataMin=n[0]);this.processedXData=n;this.processedYData=q}else this.currentDataGrouping=this.groupMap=null;this.hasGroupedData=k}};f.destroyGroupedData=function(){var a=this.groupedData;l(a||[],function(b,c){b&&(a[c]=b.destroy?b.destroy():
null)});this.groupedData=null};f.generatePoints=function(){b.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};C(g.prototype,"update",function(a){this.dataGroup?r(24):a.apply(this,[].slice.call(arguments,1))});C(h.prototype,"tooltipFooterHeaderFormatter",function(b,c,d){var e=c.series,f=e.tooltipOptions,g=e.options.dataGrouping,h=f.xDateFormat,n,m=e.xAxis,q=a.dateFormat;return m&&"datetime"===m.options.type&&g&&k(c.key)?(b=e.currentDataGrouping,g=g.dateTimeLabelFormats,
b?(m=g[b.unitName],1===b.count?h=m[0]:(h=m[1],n=m[2])):!h&&g&&(h=this.getXDateFormat(c,f,m)),h=q(h,c.key),n&&(h+=q(n,c.key+b.totalRange-1)),t(f[(d?"footer":"header")+"Format"],{point:w(c.point,{key:h}),series:e})):b.call(this,c,d)});f.destroy=function(){for(var a=this.groupedData||[],b=a.length;b--;)a[b]&&a[b].destroy();q.apply(this)};C(f,"setOptions",function(a,b){a=a.call(this,b);var d=this.type,e=this.chart.options.plotOptions,f=H[d].dataGrouping;c[d]&&(f||(f=m(E,c[d])),a.dataGrouping=m(f,e.series&&
e.series.dataGrouping,e[d].dataGrouping,b.dataGrouping));this.chart.options._stock&&(this.requireSorting=!0);return a});C(G.prototype,"setScale",function(a){a.call(this);l(this.series,function(a){a.hasProcessed=!1})});G.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,c,d=0,e=!1,f;for(c=b;c--;)(f=a[c].options.dataGrouping)&&(d=Math.max(d,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/d||b&&f.forced)&&(e=!0);return e?d:0};G.prototype.setDataGrouping=function(a,b){var c;b=e(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 l(this.chart.options.series,function(b){b.dataGrouping=a},!1);b&&this.chart.redraw()}})(N);(function(a){var D=a.each,B=a.Point,G=a.seriesType,H=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}}},{pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"high",pointAttribs:function(a,l){l=H.column.prototype.pointAttribs.call(this,a,l);var p=this.options;delete l.fill;l["stroke-width"]=p.lineWidth;l.stroke=a.options.color||(a.open<a.close?p.upColor||this.color:this.color);return l},translate:function(){var a=this,l=a.yAxis,r=!!a.modifyValue,w=["plotOpen","yBottom","plotClose"];H.column.prototype.translate.apply(a);
D(a.points,function(p){D([p.open,p.low,p.close],function(k,m){null!==k&&(r&&(k=a.modifyValue(k)),p[w[m]]=l.toPixels(k,!0))})})},drawPoints:function(){var a=this,l=a.chart;D(a.points,function(p){var r,t,k,m,e=p.graphic,g,h=!e;void 0!==p.plotY&&(e||(p.graphic=e=l.renderer.path().add(a.group)),e.attr(a.pointAttribs(p,p.selected&&"select")),t=e.strokeWidth()%2/2,g=Math.round(p.plotX)-t,k=Math.round(p.shapeArgs.width/2),m=["M",g,Math.round(p.yBottom),"L",g,Math.round(p.plotY)],null!==p.open&&(r=Math.round(p.plotOpen)+
t,m.push("M",g,r,"L",g-k,r)),null!==p.close&&(r=Math.round(p.plotClose)+t,m.push("M",g,r,"L",g+k,r)),e[h?"attr":"animate"]({d:m}).addClass(p.getClassName(),!0))})},animate:null},{getClassName:function(){return B.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(N);(function(a){var D=a.defaultPlotOptions,B=a.each,G=a.merge,H=a.seriesType,p=a.seriesTypes;H("candlestick","ohlc",G(D.column,{states:{hover:{lineWidth:2}},tooltip:D.ohlc.tooltip,
threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff"}),{pointAttribs:function(a,r){var l=p.column.prototype.pointAttribs.call(this,a,r),t=this.options,k=a.open<a.close,m=t.lineColor||this.color;l["stroke-width"]=t.lineWidth;l.fill=a.options.color||(k?t.upColor||this.color:this.color);l.stroke=a.lineColor||(k?t.upLineColor||m:m);r&&(a=t.states[r],l.fill=a.color||l.fill,l.stroke=a.stroke||l.stroke);return l},drawPoints:function(){var a=this,p=a.chart;B(a.points,function(l){var r=l.graphic,
k,m,e,g,h,w,f,d=!r;void 0!==l.plotY&&(r||(l.graphic=r=p.renderer.path().add(a.group)),r.attr(a.pointAttribs(l,l.selected&&"select")).shadow(a.options.shadow),h=r.strokeWidth()%2/2,w=Math.round(l.plotX)-h,k=l.plotOpen,m=l.plotClose,e=Math.min(k,m),k=Math.max(k,m),f=Math.round(l.shapeArgs.width/2),m=Math.round(e)!==Math.round(l.plotY),g=k!==l.yBottom,e=Math.round(e)+h,k=Math.round(k)+h,h=[],h.push("M",w-f,k,"L",w-f,e,"L",w+f,e,"L",w+f,k,"Z","M",w,e,"L",w,m?Math.round(l.plotY):e,"M",w,k,"L",w,g?Math.round(l.yBottom):
k),r[d?"attr":"animate"]({d:h}).addClass(l.getClassName(),!0))})}})})(N);(function(a){var D=a.addEvent,B=a.each,G=a.merge,H=a.noop,p=a.Renderer,l=a.seriesType,r=a.seriesTypes,w=a.TrackerMixin,t=a.VMLRenderer,k=a.SVGRenderer.prototype.symbols;l("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,e){var g=this.options,k=a&&a.color||this.color,m=g.lineColor;a=a&&a.lineWidth;var f=g.fillColor;e&&(f=g.states[e].fillColor,m=g.states[e].lineColor,a=g.states[e].lineWidth);return{fill:f||k,stroke:m||k,"stroke-width":a||g.lineWidth||0}},translate:function(){r.column.prototype.translate.apply(this);var a=this.options,e=this.chart,
g=this.points,k=g.length-1,l,f,d=a.onSeries;l=d&&e.get(d);var a=a.onKey||"y",d=l&&l.options.step,b=l&&l.points,q=b&&b.length,p=this.xAxis,c=p.getExtremes(),t=0,n,w,x;if(l&&l.visible&&q)for(t=(l.pointXOffset||0)+(l.barW||0)/2,l=l.currentDataGrouping,w=b[q-1].x+(l?l.totalRange:0),g.sort(function(a,b){return a.x-b.x}),a="plot"+a[0].toUpperCase()+a.substr(1);q--&&g[k]&&!(l=g[k],n=b[q],n.x<=l.x&&void 0!==n[a]&&(l.x<=w&&(l.plotY=n[a],n.x<l.x&&!d&&(x=b[q+1])&&void 0!==x[a]&&(l.plotY+=(l.x-n.x)/(x.x-n.x)*
(x[a]-n[a]))),k--,q++,0>k)););B(g,function(a,b){var d;void 0===a.plotY&&(a.x>=c.min&&a.x<=c.max?a.plotY=e.chartHeight-p.bottom-(p.opposite?p.height:0)+p.offset-e.plotTop:a.shapeArgs={});a.plotX+=t;(f=g[b-1])&&f.plotX===a.plotX&&(void 0===f.stackIndex&&(f.stackIndex=0),d=f.stackIndex+1);a.stackIndex=d})},drawPoints:function(){var a=this.points,e=this.chart,g=e.renderer,k,l,f=this.options,d=f.y,b,q,p,c,r,n,t,x=this.yAxis;for(q=a.length;q--;)p=a[q],t=p.plotX>this.xAxis.len,k=p.plotX,c=p.stackIndex,b=
p.options.shape||f.shape,l=p.plotY,void 0!==l&&(l=p.plotY+d-(void 0!==c&&c*f.stackDistance)),r=c?void 0:p.plotX,n=c?void 0:p.plotY,c=p.graphic,void 0!==l&&0<=k&&!t?(c||(c=p.graphic=g.label("",null,null,b,null,null,f.useHTML).attr(this.pointAttribs(p)).css(G(f.style,p.style)).attr({align:"flag"===b?"left":"center",width:f.width,height:f.height,"text-align":f.textAlign}).addClass("highcharts-point").add(this.markerGroup),c.shadow(f.shadow)),0<k&&(k-=c.strokeWidth()%2),c.attr({text:p.options.title||
f.title||"A",x:k,y:l,anchorX:r,anchorY:n}),p.tooltipPos=e.inverted?[x.len+x.pos-e.plotLeft-l,this.xAxis.len-k]:[k,l]):c&&(p.graphic=c.destroy())},drawTracker:function(){var a=this.points;w.drawTrackerPoint.apply(this);B(a,function(e){var g=e.graphic;g&&D(g.element,"mouseover",function(){0<e.stackIndex&&!e.raised&&(e._y=g.y,g.attr({y:e._y-8}),e.raised=!0);B(a,function(a){a!==e&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:H,buildKDTree:H,setClip:H});k.flag=function(a,
e,g,k,l){return["M",l&&l.anchorX||a,l&&l.anchorY||e,"L",a,e+k,a,e,a+g,e,a+g,e+k,a,e+k,"Z"]};B(["circle","square"],function(a){k[a+"pin"]=function(e,g,h,l,f){var d=f&&f.anchorX;f=f&&f.anchorY;"circle"===a&&l>h&&(e-=Math.round((l-h)/2),h=l);e=k[a](e,g,h,l);d&&f&&e.push("M",d,g>f?g:g+l,"L",d,f);return e}});p===t&&B(["flag","circlepin","squarepin"],function(a){t.prototype.symbols[a]=k[a]})})(N);(function(a){function D(a,d,e){this.init(a,d,e)}var B=a.addEvent,G=a.Axis,H=a.correctFloat,p=a.defaultOptions,
l=a.defined,r=a.destroyObjectProperties,w=a.doc,t=a.each,k=a.fireEvent,m=a.hasTouch,e=a.isTouchDevice,g=a.merge,h=a.pick,C=a.removeEvent,f=a.wrap,d={height:e?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!e,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};p.scrollbar=g(!0,d,p.scrollbar);D.prototype={init:function(a,e,f){this.scrollbarButtons=[];this.renderer=a;this.userOptions=e;this.options=g(d,e);this.chart=f;this.size=h(this.options.size,this.options.height);e.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,d=this.options,e=this.size,c;this.group=c=a.g("scrollbar").attr({zIndex:d.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,
r:d.trackBorderRadius||0,height:e,width:e}).add(c);this.track.attr({fill:d.trackBackgroundColor,stroke:d.trackBorderColor,"stroke-width":d.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(c);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:e,width:e,r:d.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(this.swapXY(["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],d.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);this.scrollbar.attr({fill:d.barBackgroundColor,stroke:d.barBorderColor,"stroke-width":d.barBorderWidth});this.scrollbarRifles.attr({stroke:d.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,
d,e,c){var b=this.options.vertical,f=0,g=this.rendered?"animate":"attr";this.x=a;this.y=d+this.trackBorderWidth;this.width=e;this.xOffset=this.height=c;this.yOffset=f;b?(this.width=this.yOffset=e=f=this.size,this.xOffset=d=0,this.barWidth=c-2*e,this.x=a+=this.options.margin):(this.height=this.xOffset=c=d=this.size,this.barWidth=e-2*c,this.y+=this.options.margin);this.group[g]({translateX:a,translateY:this.y});this.track[g]({width:e,height:c});this.scrollbarButtons[1].attr({translateX:b?0:e-d,translateY:b?
c-f:0})},drawScrollbarButton:function(a){var b=this.renderer,d=this.scrollbarButtons,c=this.options,e=this.size,f;f=b.g().add(this.group);d.push(f);f=b.rect().addClass("highcharts-scrollbar-button").add(f);f.attr({stroke:c.buttonBorderColor,"stroke-width":c.buttonBorderWidth,fill:c.buttonBackgroundColor});f.attr(f.crisp({x:-.5,y:-.5,width:e+1,height:e+1,r:c.buttonBorderRadius},f.strokeWidth()));f=b.path(this.swapXY(["M",e/2+(a?-1:1),e/2-3,"L",e/2+(a?-1:1),e/2+3,"L",e/2+(a?2:-2),e/2],c.vertical)).addClass("highcharts-scrollbar-arrow").add(d[a]);
f.attr({fill:c.buttonArrowColor})},swapXY:function(a,d){var b=a.length,c;if(d)for(d=0;d<b;d+=3)c=a[d+1],a[d+1]=a[d+2],a[d+2]=c;return a},setRange:function(a,d){var b=this.options,c=b.vertical,e=b.minWidth,f=this.barWidth,g,k,h=this.rendered&&!this.hasDragged?"animate":"attr";l(f)&&(a=Math.max(a,0),g=f*a,this.calculatedWidth=k=H(f*Math.min(d,1)-g),k<e&&(g=(f-e+k)*a,k=e),e=Math.floor(g+this.xOffset+this.yOffset),f=k/2-.5,this.from=a,this.to=d,c?(this.scrollbarGroup[h]({translateY:e}),this.scrollbar[h]({height:k}),
this.scrollbarRifles[h]({translateY:f}),this.scrollbarTop=e,this.scrollbarLeft=0):(this.scrollbarGroup[h]({translateX:e}),this.scrollbar[h]({width:k}),this.scrollbarRifles[h]({translateX:f}),this.scrollbarLeft=e,this.scrollbarTop=0),12>=k?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===b.showFull&&(0>=a&&1<=d?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=this;a.mouseMoveHandler=function(b){var d=a.chart.pointer.normalize(b),c=a.options.vertical?
"chartY":"chartX",e=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][c]||(d=a.cursorToScrollbarPosition(d)[c],c=a[c],c=d-c,a.hasDragged=!0,a.updatePosition(e[0]+c,e[1]+c),a.hasDragged&&k(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&k(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=function(b){b=a.chart.pointer.normalize(b);
b=a.cursorToScrollbarPosition(b);a.chartX=b.chartX;a.chartY=b.chartY;a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(b){var d=H(a.to-a.from)*a.options.step;a.updatePosition(H(a.from-d),H(a.to-d));k(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.buttonToMaxClick=function(b){var d=(a.to-a.from)*a.options.step;a.updatePosition(a.from+d,a.to+d);k(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.trackClick=function(b){var d=a.chart.pointer.normalize(b),
c=a.to-a.from,e=a.y+a.scrollbarTop,f=a.x+a.scrollbarLeft;a.options.vertical&&d.chartY>e||!a.options.vertical&&d.chartX>f?a.updatePosition(a.from+c,a.to+c):a.updatePosition(a.from-c,a.to-c);k(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,
d){1<d&&(a=H(1-H(d-a)),d=1);0>a&&(d=H(d-a),a=0);this.from=a;this.to=d},update:function(a){this.destroy();this.init(this.chart.renderer,g(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],d=this.scrollbarButtons,e=this.scrollbarGroup.element,c=this.mouseDownHandler,f=this.mouseMoveHandler,g=this.mouseUpHandler,a=[[d[a[0]].element,"click",this.buttonToMinClick],[d[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[e,
"mousedown",c],[w,"mousemove",f],[w,"mouseup",g]];m&&a.push([e,"touchstart",c],[w,"touchmove",f],[w,"touchend",g]);t(a,function(a){B.apply(null,a)});this._events=a},removeEvents:function(){t(this._events,function(a){C.apply(null,a)});this._events=void 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&&(a.scrollbar=null,r(a.scrollbarButtons))}};
f(G.prototype,"init",function(a){var b=this;a.apply(b,[].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 D(b.chart.renderer,b.options.scrollbar,b.chart),B(b.scrollbar,"changed",function(a){var c=Math.min(h(b.options.min,b.min),b.min,b.dataMin),d=Math.max(h(b.options.max,b.max),b.max,b.dataMax)-c,e;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(e=c+d*this.to,c+=d*this.from):(e=
c+d*(1-this.from),c+=d*(1-this.to));b.setExtremes(c,e,!0,!1,a)}))});f(G.prototype,"render",function(a){var b=Math.min(h(this.options.min,this.min),this.min,this.dataMin),d=Math.max(h(this.options.max,this.max),this.max,this.dataMax),c=this.scrollbar,e;a.apply(this,[].slice.call(arguments,1));c&&(this.horiz?c.position(this.left,this.top+this.height+this.offset+2+(this.opposite?0:this.axisTitleMargin),this.width,this.height):c.position(this.left+this.width+2+this.offset+(this.opposite?this.axisTitleMargin:
0),this.top,this.width,this.height),isNaN(b)||isNaN(d)||!l(this.min)||!l(this.max)?c.setRange(0,0):(e=(this.min-b)/(d-b),b=(this.max-b)/(d-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?c.setRange(e,b):c.setRange(1-b,1-e)))});f(G.prototype,"getOffset",function(a){var b=this.horiz?2:1,d=this.scrollbar;a.apply(this,[].slice.call(arguments,1));d&&(this.chart.axisOffset[b]+=d.size+d.options.margin)});f(G.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());
a.apply(this,[].slice.call(arguments,1))});a.Scrollbar=D})(N);(function(a){function D(a){this.init(a)}var B=a.addEvent,G=a.Axis,H=a.Chart,p=a.color,l=a.defaultOptions,r=a.defined,w=a.destroyObjectProperties,t=a.doc,k=a.each,m=a.erase,e=a.error,g=a.extend,h=a.grep,C=a.hasTouch,f=a.isNumber,d=a.isObject,b=a.isTouchDevice,q=a.merge,E=a.pick,c=a.removeEvent,F=a.Scrollbar,n=a.Series,A=a.seriesTypes,x=a.wrap,J=[].concat(a.defaultDataGroupingUnits),y=function(a){var b=h(arguments,f);if(b.length)return Math[a].apply(0,
b)};J[4]=["day",[1,2,3,4]];J[5]=["week",[1,2,3]];A=void 0===A.areaspline?"line":"areaspline";g(l,{navigator:{height:40,margin:25,maskInside:!0,handles:{backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:p("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:A,color:"#335cad",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,shadow:!1,threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});
D.prototype={drawHandle:function(a,b){var c=this.chart.renderer,d=this.handles;this.rendered||(d[b]=c.path(["M",-4.5,.5,"L",3.5,.5,3.5,15.5,-4.5,15.5,-4.5,.5,"M",-1.5,4,"L",-1.5,12,"M",.5,4,"L",.5,12]).attr({zIndex:10-b}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][b]).add(),c=this.navigatorOptions.handles,d[b].attr({fill:c.backgroundColor,stroke:c.borderColor,"stroke-width":1}).css({cursor:"ew-resize"}));d[b][this.rendered&&!this.hasDragged?"animate":"attr"]({translateX:Math.round(this.scrollerLeft+
this.scrollbarHeight+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-8)})},update:function(a){this.destroy();q(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,b,c,d){var e=this.chart,g=e.renderer,k,h,l,n;n=this.scrollbarHeight;var m=this.xAxis,p=this.navigatorOptions,u=p.maskInside,q=this.height,v=this.top,t=this.navigatorEnabled,x=this.outlineHeight,y;y=this.rendered;if(f(a)&&f(b)&&(!this.hasDragged||r(c))&&(this.navigatorLeft=k=E(m.left,e.plotLeft+
n),this.navigatorWidth=h=E(m.len,e.plotWidth-2*n),this.scrollerLeft=l=k-n,this.scrollerWidth=n=n=h+2*n,c=E(c,m.translate(a)),d=E(d,m.translate(b)),f(c)&&Infinity!==Math.abs(c)||(c=0,d=n),!(m.translate(d,!0)-m.translate(c,!0)<e.xAxis[0].minRange))){this.zoomedMax=Math.min(Math.max(c,d,0),h);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(c,d),0),h);this.range=this.zoomedMax-this.zoomedMin;b=Math.round(this.zoomedMax);a=Math.round(this.zoomedMin);!y&&t&&(this.navigatorGroup=
c=g.g("navigator").attr({zIndex:3}).add(),this.leftShade=g.rect().addClass("highcharts-navigator-mask"+(u?"-inside":"")).attr({fill:p.maskFill}).css(u&&{cursor:"ew-resize"}).add(c),u||(this.rightShade=g.rect().addClass("highcharts-navigator-mask").attr({fill:p.maskFill}).add(c)),this.outline=g.path().addClass("highcharts-navigator-outline").attr({"stroke-width":p.outlineWidth,stroke:p.outlineColor}).add(c));if(t){g=y&&!this.hasDragged?"animate":"attr";u=this.outline.strokeWidth();u/=2;y=v+u;this.leftShade[g](p.maskInside?
{x:k+a,y:v,width:b-a,height:q}:{x:k,y:v,width:a,height:q});if(this.rightShade)this.rightShade[g]({x:k+b,y:v,width:h-b,height:q});this.outline[g]({d:["M",l,y,"L",k+a-u,y,k+a-u,y+x,"L",k+b-u,y+x,"L",k+b-u,y,l+n,y].concat(p.maskInside?["M",k+a+u,y,"L",k+b-u,y]:[])});this.drawHandle(a+u,0);this.drawHandle(b+u,1)}this.scrollbar&&(this.scrollbar.hasDragged=this.hasDragged,this.scrollbar.position(this.scrollerLeft,this.top+(t?this.height:-this.scrollbarHeight),this.scrollerWidth,this.scrollbarHeight),this.scrollbar.setRange(a/
h,b/h));this.rendered=!0}},addEvents:function(){var a=this.chart,b=a.container,c=this.mouseDownHandler,d=this.mouseMoveHandler,e=this.mouseUpHandler,f;f=[[b,"mousedown",c],[b,"mousemove",d],[t,"mouseup",e]];C&&f.push([b,"touchstart",c],[b,"touchmove",d],[t,"touchend",e]);k(f,function(a){B.apply(null,a)});this._events=f;this.series&&this.series[0]&&B(this.series[0].xAxis,"foundExtremes",function(){a.scroller.modifyNavigatorAxisExtremes()});B(a,"redraw",function(){var a=this.scroller,b=a&&(a.baseSeries&&
a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,b.max)})},removeEvents:function(){this._events&&(k(this._events,function(a){c.apply(null,a)}),this._events=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&!1!==this.navigatorOptions.adaptToUpdatedData&&(k(a,function(a){c(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&c(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},
init:function(a){var c=a.options,d=c.navigator,e=d.enabled,c=c.scrollbar,f=c.enabled,g=e?d.height:0,k=f?c.height:0;this.handles=[];this.scrollbarButtons=[];this.elementsToDestroy=[];this.chart=a;this.setBaseSeries();this.height=g;this.scrollbarHeight=k;this.scrollbarEnabled=f;this.navigatorEnabled=e;this.navigatorOptions=d;this.scrollbarOptions=c;this.outlineHeight=g+k;var h=this,l,n,e=h.baseSeries;h.mouseDownHandler=function(c){c=a.pointer.normalize(c);var d=h.zoomedMin,e=h.zoomedMax,f=h.top,k=h.scrollerLeft,
m=h.scrollerWidth,p=h.navigatorLeft,q=h.navigatorWidth,u=h.scrollbarPad||0,v=h.range,r=c.chartX,t=c.chartY;c=a.xAxis[0];var x,y=b?10:7;t>f&&t<f+g&&(Math.abs(r-d-p)<y?(h.grabbedLeft=!0,h.otherHandlePos=e,h.fixedExtreme=c.max,a.fixedRange=null):Math.abs(r-e-p)<y?(h.grabbedRight=!0,h.otherHandlePos=d,h.fixedExtreme=c.min,a.fixedRange=null):r>p+d-u&&r<p+e+u?(h.grabbedCenter=r,h.fixedWidth=v,n=r-d):r>k&&r<k+m&&(e=r-p-v/2,0>e?e=0:e+v>=q&&(e=q-v,x=h.getUnionExtremes().dataMax),e!==d&&(h.fixedWidth=v,d=l.toFixedRange(e,
e+v,null,x),c.setExtremes(d.min,d.max,!0,null,{trigger:"navigator"}))))};h.mouseMoveHandler=function(b){var c=h.scrollbarHeight,d=h.navigatorLeft,e=h.navigatorWidth,f=h.scrollerLeft,g=h.scrollerWidth,k=h.range,l;b.touches&&0===b.touches[0].pageX||(b=a.pointer.normalize(b),l=b.chartX,l<d?l=d:l>f+g-c&&(l=f+g-c),h.grabbedLeft?(h.hasDragged=!0,h.render(0,0,l-d,h.otherHandlePos)):h.grabbedRight?(h.hasDragged=!0,h.render(0,0,h.otherHandlePos,l-d)):h.grabbedCenter&&(h.hasDragged=!0,l<n?l=n:l>e+n-k&&(l=e+
n-k),h.render(0,0,l-n,l-n+k)),h.hasDragged&&h.scrollbar&&h.scrollbar.options.liveRedraw&&(b.DOMType=b.type,setTimeout(function(){h.mouseUpHandler(b)},0)))};h.mouseUpHandler=function(b){var c,d,e=b.DOMEvent||b;if(h.hasDragged||"scrollbar"===b.trigger)h.zoomedMin===h.otherHandlePos?c=h.fixedExtreme:h.zoomedMax===h.otherHandlePos&&(d=h.fixedExtreme),h.zoomedMax===h.navigatorWidth&&(d=h.getUnionExtremes().dataMax),c=l.toFixedRange(h.zoomedMin,h.zoomedMax,c,d),r(c.min)&&a.xAxis[0].setExtremes(c.min,c.max,
!0,h.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:e});"mousemove"!==b.DOMType&&(h.grabbedLeft=h.grabbedRight=h.grabbedCenter=h.fixedWidth=h.fixedExtreme=h.otherHandlePos=h.hasDragged=n=null)};var c=a.xAxis.length,f=a.yAxis.length,m=e&&e[0]&&e[0].xAxis||a.xAxis[0];a.extraBottomMargin=h.outlineHeight+d.margin;a.isDirtyBox=!0;h.navigatorEnabled?(h.xAxis=l=new G(a,q({breaks:m.options.breaks,ordinal:m.options.ordinal},d.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",
isX:!0,type:"datetime",index:c,height:g,offset:0,offsetLeft:k,offsetRight:-k,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1})),h.yAxis=new G(a,q(d.yAxis,{id:"navigator-y-axis",alignTicks:!1,height:g,offset:0,index:f,zoomEnabled:!1})),e||d.series.data?h.addBaseSeries():0===a.series.length&&x(a,"redraw",function(b,c){0<a.series.length&&!h.series&&(h.setBaseSeries(),a.redraw=b);b.call(a,c)})):h.xAxis=l={translate:function(b,c){var d=a.xAxis[0],e=d.getExtremes(),
f=a.plotWidth-2*k,g=y("min",d.options.min,e.dataMin),d=y("max",d.options.max,e.dataMax)-g;return c?b*d/f+g:f*(b-g)/d},toFixedRange:G.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=h.scrollbar=new F(a.renderer,q(a.options.scrollbar,{margin:h.navigatorEnabled?0:10}),a),B(h.scrollbar,"changed",function(b){var c=h.navigatorWidth,d=c*this.to,c=c*this.from;h.hasDragged=h.scrollbar.hasDragged;h.render(0,0,c,d);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType)&&setTimeout(function(){h.mouseUpHandler(b)})}));
h.addBaseSeriesEvents();h.addEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],c=this.xAxis,d=c.options,e=b.options,f;a&&null===b.dataMin||(f={dataMin:E(d&&d.min,y("min",e.min,b.dataMin,c.dataMin,c.min)),dataMax:E(d&&d.max,y("max",e.max,b.dataMax,c.dataMax,c.max))});return f},setBaseSeries:function(a){var b=this.chart,c=this.baseSeries=[];a=a||b.options&&b.options.navigator.baseSeries||0;this.series&&(this.removeBaseSeriesEvents(),k(this.series,function(a){a.destroy()}));k(b.series||
[],function(b,d){(b.options.showInNavigator||(d===a||b.options.id===a)&&!1!==b.options.showInNavigator)&&c.push(b)});this.xAxis&&!this.xAxis.fake&&this.addBaseSeries()},addBaseSeries:function(){var a=this,b=a.chart,c=a.series=[],d=a.baseSeries,e,f,g=a.navigatorOptions.series,h,l={enableMouseTracking:!1,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,visible:!0};d?k(d,function(d,k){l.name="Navigator "+(k+1);e=d.options||{};h=e.navigatorOptions||
{};f=q(e,l,g,h);k=h.data||g.data;a.hasNavigatorData=a.hasNavigatorData||!!k;f.data=k||e.data&&e.data.slice(0);d.navigatorSeries=b.initSeries(f);c.push(d.navigatorSeries)}):(f=q(g,l),f.data=g.data,a.hasNavigatorData=!!f.data,c.push(b.initSeries(f)));this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&B(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);!1!==this.navigatorOptions.adaptToUpdatedData&&k(b,function(b){b.xAxis&&(B(b,"updatedData",
this.updatedDataHandler),b.userOptions.events=g(b.userOptions.event,{updatedData:this.updatedDataHandler}));B(b,"remove",function(){this.navigatorSeries&&(m(a.series,this.navigatorSeries),this.navigatorSeries.remove(),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.scroller,b=this.getExtremes(),
c=b.dataMin,d=b.dataMax,b=b.max-b.min,e=a.stickToMin,g=a.stickToMax,h,k,l=a.series&&a.series[0],n=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(e&&(k=c,h=k+b),g&&(h=d,e||(k=Math.max(h-b,l&&l.xData?l.xData[0]:-Number.MAX_VALUE))),n&&(e||g)&&f(k)&&(this.min=this.userMin=k,this.max=this.userMax=h));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.scroller,b=this.navigatorSeries;a.stickToMin=f(this.xAxis.min)&&this.xAxis.min<=this.xData[0];
a.stickToMax=Math.round(a.zoomedMax)>=Math.round(a.navigatorWidth);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},destroy:function(){this.removeEvents();this.xAxis&&(m(this.chart.xAxis,this.xAxis),m(this.chart.axes,this.xAxis));this.yAxis&&(m(this.chart.yAxis,this.yAxis),m(this.chart.axes,this.yAxis));k(this.series||[],function(a){a.destroy&&a.destroy()});k("series xAxis yAxis leftShade rightShade outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" "),
function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);k([this.handles,this.elementsToDestroy],function(a){w(a)},this)}};a.Navigator=D;x(G.prototype,"zoom",function(a,b,c){var d=this.chart,e=d.options,f=e.chart.zoomType,g=e.navigator,e=e.rangeSelector,h;this.isXAxis&&(g&&g.enabled||e&&e.enabled)&&("x"===f?d.resetZoomButton="blocked":"y"===f?h=!1:"xy"===f&&(d=this.previousZoom,r(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)});x(H.prototype,"init",function(a,b,c){B(this,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new D(this)});a.call(this,b,c)});x(H.prototype,"getMargins",function(a){var b=this.legend,c=b.options,d=this.scroller,e,f;a.apply(this,[].slice.call(arguments,1));d&&(e=d.xAxis,f=d.yAxis,d.top=d.navigatorOptions.top||this.chartHeight-d.height-d.scrollbarHeight-this.spacing[2]-("bottom"===c.verticalAlign&&c.enabled&&
!c.floating?b.legendHeight+E(c.margin,10):0),e&&f&&(e.options.top=f.options.top=d.top,e.setAxisSize(),f.setAxisSize()))});x(n.prototype,"addPoint",function(a,b,c,f,g){var h=this.options.turboThreshold;h&&this.xData.length>h&&d(b,!0)&&this.chart.scroller&&e(20,!0);a.call(this,b,c,f,g)});x(H.prototype,"addSeries",function(a,b,c,d){a=a.call(this,b,!1,d);this.scroller&&this.scroller.setBaseSeries();E(c,!0)&&this.redraw();return a});x(n.prototype,"update",function(a,b,c){a.call(this,b,!1);this.chart.scroller&&
this.chart.scroller.setBaseSeries();E(c,!0)&&this.chart.redraw()})})(N);(function(a){function D(a){this.init(a)}var B=a.addEvent,G=a.Axis,H=a.Chart,p=a.css,l=a.createElement,r=a.dateFormat,w=a.defaultOptions,t=w.global.useUTC,k=a.defined,m=a.destroyObjectProperties,e=a.discardElement,g=a.each,h=a.extend,C=a.fireEvent,f=a.Date,d=a.isNumber,b=a.merge,q=a.pick,E=a.pInt,c=a.splat,F=a.wrap;h(w,{rangeSelector:{buttonTheme:{"stroke-width":0,width:28,height:18,padding:2,zIndex:7},height:35,inputPosition:{align:"right"},
labelStyle:{color:"#666666"}}});w.lang=b(w.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});D.prototype={clickButton:function(a,b){var e=this,f=e.chart,h=e.buttonOptions[a],k=f.xAxis[0],l=f.scroller&&f.scroller.getUnionExtremes()||k||{},n=l.dataMin,m=l.dataMax,p,r=k&&Math.round(Math.min(k.max,q(m,k.max))),w=h.type,z,l=h._range,A,C,D,E=h.dataGrouping;if(null!==n&&null!==m){f.fixedRange=l;E&&(this.forcedDataGrouping=!0,G.prototype.setDataGrouping.call(k||{chart:this.chart},
E,!1));if("month"===w||"year"===w)k?(w={range:h,max:r,dataMin:n,dataMax:m},p=k.minFromRange.call(w),d(w.newMax)&&(r=w.newMax)):l=h;else if(l)p=Math.max(r-l,n),r=Math.min(p+l,m);else if("ytd"===w)if(k)void 0===m&&(n=Number.MAX_VALUE,m=Number.MIN_VALUE,g(f.series,function(a){a=a.xData;n=Math.min(a[0],n);m=Math.max(a[a.length-1],m)}),b=!1),r=e.getYTDExtremes(m,n,t),p=A=r.min,r=r.max;else{B(f,"beforeRender",function(){e.clickButton(a)});return}else"all"===w&&k&&(p=n,r=m);e.setSelected(a);k?k.setExtremes(p,
r,q(b,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:h}):(z=c(f.options.xAxis)[0],D=z.range,z.range=l,C=z.min,z.min=A,B(f,"load",function(){z.range=D;z.min=C}))}},setSelected:function(a){this.selected=this.options.selected=a},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(a){var b=this,c=a.options.rangeSelector,d=c.buttons||
[].concat(b.defaultButtons),e=c.selected,f=function(){var a=b.minInput,c=b.maxInput;a&&a.blur&&C(a,"blur");c&&c.blur&&C(c,"blur")};b.chart=a;b.options=c;b.buttons=[];a.extraTopMargin=c.height;b.buttonOptions=d;this.unMouseDown=B(a.container,"mousedown",f);this.unResize=B(a,"resize",f);g(d,b.computeButtonRange);void 0!==e&&d[e]&&this.clickButton(e,!1);B(a,"load",function(){B(a.xAxis[0],"setExtremes",function(c){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==c.trigger&&"updatedData"!==c.trigger&&
b.forcedDataGrouping&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this.chart,b=a.xAxis[0],c=Math.round(b.max-b.min),e=!b.hasVisibleSeries,a=a.scroller&&a.scroller.getUnionExtremes()||b,f=a.dataMin,h=a.dataMax,a=this.getYTDExtremes(h,f,t),k=a.min,l=a.max,m=this.selected,p=d(m),q=this.options.allButtonsEnabled,r=this.buttons;g(this.buttonOptions,function(a,d){var g=a._range,n=a.type,u=a.count||1;a=r[d];var t=0;d=d===m;var v=g>h-f,x=g<b.minRange,y=!1,w=!1,g=g===c;("month"===
n||"year"===n)&&c>=864E5*{month:28,year:365}[n]*u&&c<=864E5*{month:31,year:366}[n]*u?g=!0:"ytd"===n?(g=l-k===c,y=!d):"all"===n&&(g=b.max-b.min>=h-f,w=!d&&p&&g);n=!q&&(v||x||w||e);g=d&&g||g&&!p&&!y;n?t=3:g&&(p=!0,t=2);a.state!==t&&a.setState(t)})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c},setInputValue:function(a,b){var c=
this.chart.options.rangeSelector,d=this[a+"Input"];k(b)&&(d.previousValue=d.HCTime,d.HCTime=b);d.value=r(c.inputEditDateFormat||"%Y-%m-%d",d.HCTime);this[a+"DateBox"].attr({text:r(c.inputDateFormat||"%b %e, %Y",d.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];p(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){p(this[a+"Input"],{border:0,width:"1px",height:"1px"});
this.setInputValue(a)},drawInput:function(a){function c(){var a=r.value,b=(m.inputDateParser||Date.parse)(a),c=f.xAxis[0],g=f.scroller&&f.scroller.xAxis?f.scroller.xAxis:c,h=g.dataMin,g=g.dataMax;b!==r.previousValue&&(r.previousValue=b,d(b)||(b=a.split("-"),b=Date.UTC(E(b[0]),E(b[1])-1,E(b[2]))),d(b)&&(t||(b+=6E4*(new Date).getTimezoneOffset()),q?b>e.maxInput.HCTime?b=void 0:b<h&&(b=h):b<e.minInput.HCTime?b=void 0:b>g&&(b=g),void 0!==b&&c.setExtremes(q?b:c.min,q?c.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}
var e=this,f=e.chart,g=f.renderer.style||{},k=f.renderer,m=f.options.rangeSelector,n=e.div,q="min"===a,r,B,C=this.inputGroup;this[a+"Label"]=B=k.label(w.lang[q?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(C);C.offset+=B.width+5;this[a+"DateBox"]=k=k.label("",C.offset).addClass("highcharts-range-input").attr({padding:2,width:m.inputBoxWidth||90,height:m.inputBoxHeight||17,stroke:m.inputBoxBorderColor||"#cccccc","stroke-width":1,
"text-align":"center"}).on("click",function(){e.showInput(a);e[a+"Input"].focus()}).add(C);C.offset+=k.width+(q?10:0);this[a+"Input"]=r=l("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:f.plotTop+"px"},n);B.css(b(g,m.labelStyle));k.css(b({color:"#333333"},g,m.inputStyle));p(r,h({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:g.fontSize,fontFamily:g.fontFamily,left:"-9em"},m.inputStyle));r.onfocus=function(){e.showInput(a)};r.onblur=
function(){e.hideInput(a)};r.onchange=c;r.onkeypress=function(a){13===a.keyCode&&c()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a=q((b.buttonPosition||{}).y,a.plotTop-a.axisOffset[0]-b.height);return{buttonTop:a,inputTop:a-10}},getYTDExtremes:function(a,b,c){var d=new f(a),e=d[f.hcGetFullYear]();c=c?f.UTC(e,0,1):+new f(e,0,1);b=Math.max(b||0,c);d=d.getTime();return{max:Math.min(a||d,d),min:b}},render:function(a,b){var c=this,d=c.chart,e=d.renderer,f=d.container,m=d.options,
n=m.exporting&&!1!==m.exporting.enabled&&m.navigation&&m.navigation.buttonOptions,p=m.rangeSelector,r=c.buttons,m=w.lang,t=c.div,t=c.inputGroup,A=p.buttonTheme,z=p.buttonPosition||{},B=p.inputEnabled,C=A&&A.states,D=d.plotLeft,E,G=this.getPosition(),F=c.group,H=c.rendered;!1!==p.enabled&&(H||(c.group=F=e.g("range-selector-buttons").add(),c.zoomText=e.text(m.rangeSelectorZoom,q(z.x,D),15).css(p.labelStyle).add(F),E=q(z.x,D)+c.zoomText.getBBox().width+5,g(c.buttonOptions,function(a,b){r[b]=e.button(a.text,
E,0,function(){c.clickButton(b);c.isActive=!0},A,C&&C.hover,C&&C.select,C&&C.disabled).attr({"text-align":"center"}).add(F);E+=r[b].width+q(p.buttonSpacing,5)}),!1!==B&&(c.div=t=l("div",null,{position:"relative",height:0,zIndex:1}),f.parentNode.insertBefore(t,f),c.inputGroup=t=e.g("input-group").add(),t.offset=0,c.drawInput("min"),c.drawInput("max"))),c.updateButtonStates(),F[H?"animate":"attr"]({translateY:G.buttonTop}),!1!==B&&(t.align(h({y:G.inputTop,width:t.offset,x:n&&G.inputTop<(n.y||0)+n.height-
d.spacing[0]?-40:0},p.inputPosition),!0,d.spacingBox),k(B)||(d=F.getBBox(),t[t.alignAttr.translateX<d.x+d.width+10?"hide":"show"]()),c.setInputValue("min",a),c.setInputValue("max",b)),c.rendered=!0)},update:function(a){var c=this.chart;b(!0,c.options.rangeSelector,a);this.destroy();this.init(c)},destroy:function(){var a=this.minInput,b=this.maxInput,c;this.unMouseDown();this.unResize();m(this.buttons);a&&(a.onfocus=a.onblur=a.onchange=null);b&&(b.onfocus=b.onblur=b.onchange=null);for(c in this)this[c]&&
"chart"!==c&&(this[c].destroy?this[c].destroy():this[c].nodeType&&e(this[c])),this[c]!==D.prototype[c]&&(this[c]=null)}};G.prototype.toFixedRange=function(a,b,c,e){var f=this.chart&&this.chart.fixedRange;a=q(c,this.translate(a,!0));b=q(e,this.translate(b,!0));c=f&&(b-a)/f;.7<c&&1.3>c&&(e?a=b-f:b=a+f);d(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,f,g,h=function(a,c){var d=new Date(a);d["set"+b](d["get"+
b]()+c);return d.getTime()-a};d(a)?(c=e-a,g=a):(c=e+h(e,-a.count),this.chart&&(this.chart.fixedRange=e-c));f=q(this.dataMin,Number.MIN_VALUE);d(c)||(c=f);c<=f&&(c=f,void 0===g&&(g=h(c,a.count)),this.newMax=Math.min(c+g,this.dataMax));d(e)||(c=void 0);return c};F(H.prototype,"init",function(a,b,c){B(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new D(this))});a.call(this,b,c)});a.RangeSelector=D})(N);(function(a){var D=a.addEvent,B=a.isNumber;a.Chart.prototype.callbacks.push(function(a){function G(){p=
a.xAxis[0].getExtremes();B(p.min)&&r.render(p.min,p.max)}var p,l=a.scroller,r=a.rangeSelector,w,t;l&&(p=a.xAxis[0].getExtremes(),l.render(p.min,p.max));r&&(t=D(a.xAxis[0],"afterSetExtremes",function(a){r.render(a.min,a.max)}),w=D(a,"redraw",G),G());D(a,"destroy",function(){r&&(w(),t())})})})(N);(function(a){var D=a.arrayMax,B=a.arrayMin,G=a.Axis,H=a.Chart,p=a.defined,l=a.each,r=a.extend,w=a.format,t=a.inArray,k=a.isNumber,m=a.isString,e=a.map,g=a.merge,h=a.pick,C=a.Point,f=a.Renderer,d=a.Series,b=
a.splat,q=a.stop,E=a.SVGRenderer,c=a.VMLRenderer,F=a.wrap,n=d.prototype,A=n.init,x=n.processData,J=C.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(c,d,f){var k=m(c)||c.nodeName,l=arguments[k?1:0],n=l.series,p=a.getOptions(),q,r=h(l.navigator&&l.navigator.enabled,!0)?{startOnTick:!1,endOnTick:!1}:null,t={marker:{enabled:!1,radius:2}},u={shadow:!1,borderWidth:0};l.xAxis=e(b(l.xAxis||{}),function(a){return g({minPadding:0,maxPadding:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},
showLastLabel:!0},p.xAxis,a,{type:"datetime",categories:null},r)});l.yAxis=e(b(l.yAxis||{}),function(a){q=h(a.opposite,!0);return g({labels:{y:-2},opposite:q,showLastLabel:!1,title:{text:null}},p.yAxis,a)});l.series=null;l=g({chart:{panning:!0,pinchType:"x"},navigator:{enabled:!0},scrollbar:{enabled:!0},rangeSelector:{enabled:!0},title:{text:null,style:{fontSize:"16px"}},tooltip:{shared:!0,crosshairs:!0},legend:{enabled:!1},plotOptions:{line:t,spline:t,area:t,areaspline:t,arearange:t,areasplinerange:t,
column:u,columnrange:u,candlestick:u,ohlc:u}},l,{_stock:!0,chart:{inverted:!1}});l.series=n;return k?new H(c,l,f):new H(l,d)};F(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._stock&&"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]=1,"right"):a.call(this,[].slice.call(arguments,1))});F(G.prototype,"getPlotLinePath",function(a,
b,c,d,f,g){var n=this,q=this.isLinked&&!this.series?this.linkedParent.series:this.series,r=n.chart,u=r.renderer,v=n.left,w=n.top,y,x,A,B,C=[],D=[],E,F;if("colorAxis"===n.coll)return a.apply(this,[].slice.call(arguments,1));D=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=n.options[b];return k(a)?[r[b][a]]:m(a)?[r.get(a)]:e(q,function(a){return a[b]})}(n.coll);l(n.isXAxis?r.yAxis:r.xAxis,function(a){if(p(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=p(a.options[b])?
r[b][a.options[b]]:r[b][0];n===b&&D.push(a)}});E=D.length?[]:[n.isXAxis?r.yAxis[0]:r.xAxis[0]];l(D,function(a){-1===t(a,E)&&E.push(a)});F=h(g,n.translate(b,null,null,d));k(F)&&(n.horiz?l(E,function(a){var b;x=a.pos;B=x+a.len;y=A=Math.round(F+n.transB);if(y<v||y>v+n.width)f?y=A=Math.min(Math.max(v,y),v+n.width):b=!0;b||C.push("M",y,x,"L",A,B)}):l(E,function(a){var b;y=a.pos;A=y+a.len;x=B=Math.round(w+n.height-F);if(x<w||x>w+n.height)f?x=B=Math.min(Math.max(w,x),n.top+n.height):b=!0;b||C.push("M",y,
x,"L",A,B)}));return 0<C.length?u.crispPolyLine(C,c||1):null});G.prototype.getPlotBandPath=function(a,b){b=this.getPlotLinePath(b,null,null,!0);a=this.getPlotLinePath(a,null,null,!0);var c=[],d;if(a&&b&&a.toString()!==b.toString())for(d=0;d<a.length;d+=6)c.push("M",a[d+1],a[d+2],"L",a[d+4],a[d+5],b[d+4],b[d+5],b[d+1],b[d+2],"z");else c=null;return c};E.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};f===c&&(c.prototype.crispPolyLine=E.prototype.crispPolyLine);F(G.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});F(G.prototype,"drawCrosshair",function(a,b,c){var d,e;a.call(this,b,c);if(p(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){a=this.chart;var f=this.options.crosshair.label,g=this.horiz;d=this.opposite;e=this.left;var k=this.top,l=this.crossLabel,m,n=f.format,
q="",t="inside"===this.options.tickPosition,u=!1!==this.crosshair.snap,x=0;b||(b=this.cross&&this.cross.e);m=g?"center":d?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";l||(l=this.crossLabel=a.renderer.label(null,null,null,f.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:f.align||m,padding:h(f.padding,8),r:h(f.borderRadius,3),zIndex:2}).add(this.labelGroup),l.attr({fill:f.backgroundColor||
this.series[0]&&this.series[0].color||"#666666",stroke:f.borderColor||"","stroke-width":f.borderWidth||0}).css(r({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},f.style)));g?(m=u?c.plotX+e:b.chartX,k+=d?0:this.height):(m=d?this.width+e:0,k=u?c.plotY+k:b.chartY);n||f.formatter||(this.isDatetimeAxis&&(q="%b %d, %Y"),n="{value"+(q?":"+q:"")+"}");b=u?c[this.isXAxis?"x":"y"]:this.toValue(g?b.chartX:b.chartY);l.attr({text:n?w(n,{value:b}):f.formatter.call(this,b),x:m,y:k,visibility:"visible"});
b=l.getBBox();if(g){if(t&&!d||!t&&d)k=l.y-b.height}else k=l.y-b.height/2;g?(d=e-b.x,e=e+this.width-b.x):(d="left"===this.labelAlign?e:0,e="right"===this.labelAlign?e+this.width:a.chartWidth);l.translateX<d&&(x=d-l.translateX);l.translateX+b.width>=e&&(x=-(l.translateX+b.width-e));l.attr({x:m+x,y:k,anchorX:g?m:this.opposite?0:a.chartWidth,anchorY:g?this.opposite?a.chartHeight:0:k+b.height/2})}});n.init=function(){A.apply(this,arguments);this.setCompare(this.options.compare)};n.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=b/d*100-100,c&&(c.change=b),b}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};n.processData=function(){var a,b=-1,c,d,e,f;x.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,e=d.length,this.pointArrayMap&&(b=t("close",this.pointArrayMap),-1===b&&(b=t(this.pointValKey||"y",this.pointArrayMap))),a=0;a<
e-1;a++)if(f=-1<b?d[a][b]:d[a],k(f)&&c[a+1]>=this.xAxis.min&&0!==f){this.compareValue=f;break}};F(n,"getExtremes",function(a){var b;a.apply(this,[].slice.call(arguments,1));this.modifyValue&&(b=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)],this.dataMin=B(b),this.dataMax=D(b))});G.prototype.setCompare=function(a,b){this.isXAxis||(l(this.series,function(b){b.setCompare(a)}),h(b,!0)&&this.chart.redraw())};C.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",(0<this.change?
"+":"")+a.numberFormat(this.change,h(this.series.tooltipOptions.changeDecimals,2)));return J.apply(this,[b])};F(d.prototype,"render",function(a){this.chart.options._stock&&this.xAxis&&(!this.clipBox&&this.animate?(this.clipBox=g(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len):this.chart[this.sharedClipKey]?(q(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)})})(N);return N});
