/*
 Highcharts JS v6.0.7 (2018-02-16)
 Highstock as a plugin for Highcharts

 (c) 2017 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(G){"object"===typeof module&&module.exports?module.exports=G:G(Highcharts)})(function(G){(function(a){var C=a.defined,y=a.each,z=a.extend,u=a.merge,B=a.pick,t=a.timeUnits,D=a.win;a.Time=function(a){this.update(a,!1)};a.Time.prototype={defaultOptions:{},update:function(r){var n=B(r&&r.useUTC,!0),t=this;this.options=r=u(!0,this.options||{},r);this.Date=r.Date||D.Date;this.timezoneOffset=(this.useUTC=n)&&r.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=
!(n&&!r.getTimezoneOffset&&!r.timezone))||this.timezoneOffset?(this.get=function(a,b){var d=b.getTime(),f=d-t.getTimezoneOffset(b);b.setTime(f);a=b["getUTC"+a]();b.setTime(d);return a},this.set=function(v,b,d){var f;if(-1!==a.inArray(v,["Milliseconds","Seconds","Minutes"]))b["set"+v](d);else f=t.getTimezoneOffset(b),f=b.getTime()-f,b.setTime(f),b["setUTC"+v](d),v=t.getTimezoneOffset(b),f=b.getTime()+v,b.setTime(f)}):n?(this.get=function(a,b){return b["getUTC"+a]()},this.set=function(a,b,d){return b["setUTC"+
a](d)}):(this.get=function(a,b){return b["get"+a]()},this.set=function(a,b,d){return b["set"+a](d)})},makeTime:function(r,n,t,v,b,d){var f,h,g;this.useUTC?(f=this.Date.UTC.apply(0,arguments),h=this.getTimezoneOffset(f),f+=h,g=this.getTimezoneOffset(f),h!==g?f+=g-h:h-36E5!==this.getTimezoneOffset(f-36E5)||a.isSafari||(f-=36E5)):f=(new this.Date(r,n,B(t,1),B(v,0),B(b,0),B(d,0))).getTime();return f},timezoneOffsetFunction:function(){var r=this,n=this.options,t=D.moment;if(!this.useUTC)return function(a){return 6E4*
(new Date(a)).getTimezoneOffset()};if(n.timezone){if(t)return function(a){return 6E4*-t.tz(a,n.timezone).utcOffset()};a.error(25)}return this.useUTC&&n.getTimezoneOffset?function(a){return 6E4*n.getTimezoneOffset(a)}:function(){return 6E4*(r.timezoneOffset||0)}},dateFormat:function(r,n,t){if(!a.defined(n)||isNaN(n))return a.defaultOptions.lang.invalidDate||"";r=a.pick(r,"%Y-%m-%d %H:%M:%S");var v=this,b=new this.Date(n),d=this.get("Hours",b),f=this.get("Day",b),h=this.get("Date",b),g=this.get("Month",
b),m=this.get("FullYear",b),l=a.defaultOptions.lang,q=l.weekdays,c=l.shortWeekdays,e=a.pad,b=a.extend({a:c?c[f]:q[f].substr(0,3),A:q[f],d:e(h),e:e(h,2," "),w:f,b:l.shortMonths[g],B:l.months[g],m:e(g+1),y:m.toString().substr(2,2),Y:m,H:e(d),k:d,I:e(d%12||12),l:d%12||12,M:e(v.get("Minutes",b)),p:12>d?"AM":"PM",P:12>d?"am":"pm",S:e(b.getSeconds()),L:e(Math.round(n%1E3),3)},a.dateFormats);a.objectEach(b,function(k,c){for(;-1!==r.indexOf("%"+c);)r=r.replace("%"+c,"function"===typeof k?k.call(v,n):k)});
return t?r.substr(0,1).toUpperCase()+r.substr(1):r},getTimeTicks:function(a,n,u,v){var b=this,d=[],f={},h,g=new b.Date(n),m=a.unitRange,l=a.count||1,q;if(C(n)){b.set("Milliseconds",g,m>=t.second?0:l*Math.floor(b.get("Milliseconds",g)/l));m>=t.second&&b.set("Seconds",g,m>=t.minute?0:l*Math.floor(b.get("Seconds",g)/l));m>=t.minute&&b.set("Minutes",g,m>=t.hour?0:l*Math.floor(b.get("Minutes",g)/l));m>=t.hour&&b.set("Hours",g,m>=t.day?0:l*Math.floor(b.get("Hours",g)/l));m>=t.day&&b.set("Date",g,m>=t.month?
1:l*Math.floor(b.get("Date",g)/l));m>=t.month&&(b.set("Month",g,m>=t.year?0:l*Math.floor(b.get("Month",g)/l)),h=b.get("FullYear",g));m>=t.year&&b.set("FullYear",g,h-h%l);m===t.week&&b.set("Date",g,b.get("Date",g)-b.get("Day",g)+B(v,1));h=b.get("FullYear",g);v=b.get("Month",g);var c=b.get("Date",g),e=b.get("Hours",g);n=g.getTime();b.variableTimezone&&(q=u-n>4*t.month||b.getTimezoneOffset(n)!==b.getTimezoneOffset(u));g=g.getTime();for(n=1;g<u;)d.push(g),g=m===t.year?b.makeTime(h+n*l,0):m===t.month?
b.makeTime(h,v+n*l):!q||m!==t.day&&m!==t.week?q&&m===t.hour&&1<l?b.makeTime(h,v,c,e+n*l):g+m*l:b.makeTime(h,v,c+n*l*(m===t.day?1:7)),n++;d.push(g);m<=t.hour&&1E4>d.length&&y(d,function(k){0===k%18E5&&"000000000"===b.dateFormat("%H%M%S%L",k)&&(f[k]="day")})}d.info=z(a,{higherRanks:f,totalRange:m*l});return d}}})(G);(function(a){var C=a.addEvent,y=a.Axis,z=a.Chart,u=a.css,B=a.defined,t=a.each,D=a.extend,r=a.noop,n=a.pick,E=a.timeUnits,v=a.wrap;v(a.Series.prototype,"init",function(b){var a;b.apply(this,
Array.prototype.slice.call(arguments,1));(a=this.xAxis)&&a.options.ordinal&&C(this,"updatedData",function(){delete a.ordinalIndex})});v(y.prototype,"getTimeTicks",function(a,d,f,h,g,m,l,q){var c=0,e,k,A={},b,F,L,p=[],w=-Number.MAX_VALUE,x=this.options.tickPixelInterval,H=this.chart.time;if(!this.options.ordinal&&!this.options.breaks||!m||3>m.length||void 0===f)return a.call(this,d,f,h,g);F=m.length;for(e=0;e<F;e++){L=e&&m[e-1]>h;m[e]<f&&(c=e);if(e===F-1||m[e+1]-m[e]>5*l||L){if(m[e]>w){for(k=a.call(this,
d,m[c],m[e],g);k.length&&k[0]<=w;)k.shift();k.length&&(w=k[k.length-1]);p=p.concat(k)}c=e+1}if(L)break}a=k.info;if(q&&a.unitRange<=E.hour){e=p.length-1;for(c=1;c<e;c++)H.dateFormat("%d",p[c])!==H.dateFormat("%d",p[c-1])&&(A[p[c]]="day",b=!0);b&&(A[p[0]]="day");a.higherRanks=A}p.info=a;if(q&&B(x)){q=H=p.length;e=[];var J;for(b=[];q--;)c=this.translate(p[q]),J&&(b[q]=J-c),e[q]=J=c;b.sort();b=b[Math.floor(b.length/2)];b<.6*x&&(b=null);q=p[H-1]>h?H-1:H;for(J=void 0;q--;)c=e[q],h=Math.abs(J-c),J&&h<.8*
x&&(null===b||h<.8*b)?(A[p[q]]&&!A[p[q+1]]?(h=q+1,J=c):h=q,p.splice(h,1)):J=c}return p});D(y.prototype,{beforeSetTickPositions:function(){var a,d=[],f=!1,h,g=this.getExtremes(),m=g.min,l=g.max,q,c=this.isXAxis&&!!this.options.breaks,g=this.options.ordinal,e=Number.MAX_VALUE,k=this.chart.options.chart.ignoreHiddenSeries;h="highcharts-navigator-xaxis"===this.options.className;!this.options.overscroll||this.max!==this.dataMax||this.chart.mouseIsDown&&!h||this.eventArgs&&(!this.eventArgs||"navigator"===
this.eventArgs.trigger)||(this.max+=this.options.overscroll,!h&&B(this.userMin)&&(this.min+=this.options.overscroll));if(g||c){t(this.series,function(l,b){if(!(k&&!1===l.visible||!1===l.takeOrdinalPosition&&!c)&&(d=d.concat(l.processedXData),a=d.length,d.sort(function(k,c){return k-c}),e=Math.min(e,n(l.closestPointRange,e)),a))for(b=a-1;b--;)d[b]===d[b+1]&&d.splice(b,1)});a=d.length;if(2<a){h=d[1]-d[0];for(q=a-1;q--&&!f;)d[q+1]-d[q]!==h&&(f=!0);!this.options.keepOrdinalPadding&&(d[0]-m>h||l-d[d.length-
1]>h)&&(f=!0)}else this.options.overscroll&&(2===a?e=d[1]-d[0]:1===a?(e=this.options.overscroll,d=[d[0],d[0]+e]):e=this.overscrollPointsRange);f?(this.options.overscroll&&(this.overscrollPointsRange=e,d=d.concat(this.getOverscrollPositions())),this.ordinalPositions=d,h=this.ordinal2lin(Math.max(m,d[0]),!0),q=Math.max(this.ordinal2lin(Math.min(l,d[d.length-1]),!0),1),this.ordinalSlope=l=(l-m)/(q-h),this.ordinalOffset=m-h*l):(this.overscrollPointsRange=n(this.closestPointRange,this.overscrollPointsRange),
this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=g&&f;this.groupIntervalFactor=null},val2lin:function(a,d){var b=this.ordinalPositions;if(b){var h=b.length,g,m;for(g=h;g--;)if(b[g]===a){m=g;break}for(g=h-1;g--;)if(a>b[g]||0===g){a=(a-b[g])/(b[g+1]-b[g]);m=g+a;break}d=d?m:this.ordinalSlope*(m||0)+this.ordinalOffset}else d=a;return d},lin2val:function(a,d){var b=this.ordinalPositions;if(b){var h=this.ordinalSlope,g=this.ordinalOffset,m=b.length-1,l;if(d)0>a?a=b[0]:a>
m?a=b[m]:(m=Math.floor(a),l=a-m);else for(;m--;)if(d=h*m+g,a>=d){h=h*(m+1)+g;l=(a-d)/(h-d);break}return void 0!==l&&void 0!==b[m]?b[m]+(l?l*(b[m+1]-b[m]):0):a}return a},getExtendedPositions:function(){var a=this,d=a.chart,f=a.series[0].currentDataGrouping,h=a.ordinalIndex,g=f?f.count+f.unitName:"raw",m=a.options.overscroll,l=a.getExtremes(),q,c;h||(h=a.ordinalIndex={});h[g]||(q={series:[],chart:d,getExtremes:function(){return{min:l.dataMin,max:l.dataMax+m}},options:{ordinal:!0},val2lin:y.prototype.val2lin,
ordinal2lin:y.prototype.ordinal2lin},t(a.series,function(e){c={xAxis:q,xData:e.xData.slice(),chart:d,destroyGroupedData:r};c.xData=c.xData.concat(a.getOverscrollPositions());c.options={dataGrouping:f?{enabled:!0,forced:!0,approximation:"open",units:[[f.unitName,[f.count]]]}:{enabled:!1}};e.processData.apply(c);q.series.push(c)}),a.beforeSetTickPositions.apply(q),h[g]=q.ordinalPositions);return h[g]},getOverscrollPositions:function(){var b=this.options.overscroll,d=this.overscrollPointsRange,f=[],
h=this.dataMax;if(a.defined(d))for(f.push(h);h<=this.dataMax+b;)h+=d,f.push(h);return f},getGroupIntervalFactor:function(a,d,f){var b;f=f.processedXData;var g=f.length,m=[];b=this.groupIntervalFactor;if(!b){for(b=0;b<g-1;b++)m[b]=f[b+1]-f[b];m.sort(function(a,b){return a-b});m=m[Math.floor(g/2)];a=Math.max(a,f[0]);d=Math.min(d,f[g-1]);this.groupIntervalFactor=b=g*m/(d-a)}return b},postProcessTickInterval:function(a){var b=this.ordinalSlope;return b?this.options.breaks?this.closestPointRange||a:a/
(b/this.closestPointRange):a}});y.prototype.ordinal2lin=y.prototype.val2lin;v(z.prototype,"pan",function(a,d){var b=this.xAxis[0],h=b.options.overscroll,g=d.chartX,m=!1;if(b.options.ordinal&&b.series.length){var l=this.mouseDownX,q=b.getExtremes(),c=q.dataMax,e=q.min,k=q.max,A=this.hoverPoints,I=b.closestPointRange||b.overscrollPointsRange,l=(l-g)/(b.translationSlope*(b.ordinalSlope||I)),F={ordinalPositions:b.getExtendedPositions()},I=b.lin2val,L=b.val2lin,p;F.ordinalPositions?1<Math.abs(l)&&(A&&
t(A,function(p){p.setState()}),0>l?(A=F,p=b.ordinalPositions?b:F):(A=b.ordinalPositions?b:F,p=F),F=p.ordinalPositions,c>F[F.length-1]&&F.push(c),this.fixedRange=k-e,l=b.toFixedRange(null,null,I.apply(A,[L.apply(A,[e,!0])+l,!0]),I.apply(p,[L.apply(p,[k,!0])+l,!0])),l.min>=Math.min(q.dataMin,e)&&l.max<=Math.max(c,k)+h&&b.setExtremes(l.min,l.max,!0,!1,{trigger:"pan"}),this.mouseDownX=g,u(this.container,{cursor:"move"})):m=!0}else m=!0;m&&(h&&(b.max=b.dataMax+h),a.apply(this,Array.prototype.slice.call(arguments,
1)))})})(G);(function(a){function C(){return Array.prototype.slice.call(arguments,1)}function y(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,z(this.pointArrayMap,["y"]))}var z=a.pick,u=a.wrap,B=a.each,t=a.extend,D=a.isArray,r=a.fireEvent,n=a.Axis,E=a.Series;t(n.prototype,{isInBreak:function(a,b){var d=a.repeat||Infinity,f=a.from,h=a.to-a.from;b=b>=f?(b-f)%d:d-(f-b)%d;return a.inclusive?b<=h:b<h&&0!==b},isInAnyBreak:function(a,b){var d=this.options.breaks,f=d&&d.length,
h,g,m;if(f){for(;f--;)this.isInBreak(d[f],a)&&(h=!0,g||(g=z(d[f].showPoints,this.isXAxis?!1:!0)));m=h&&b?h&&!g:h}return m}});u(n.prototype,"setTickPositions",function(a){a.apply(this,Array.prototype.slice.call(arguments,1));if(this.options.breaks){var b=this.tickPositions,d=this.tickPositions.info,f=[],h;for(h=0;h<b.length;h++)this.isInAnyBreak(b[h])||f.push(b[h]);this.tickPositions=f;this.tickPositions.info=d}});u(n.prototype,"init",function(a,b,d){var f=this;d.breaks&&d.breaks.length&&(d.ordinal=
!1);a.call(this,b,d);a=this.options.breaks;f.isBroken=D(a)&&!!a.length;f.isBroken&&(f.val2lin=function(a){var b=a,d,l;for(l=0;l<f.breakArray.length;l++)if(d=f.breakArray[l],d.to<=a)b-=d.len;else if(d.from>=a)break;else if(f.isInBreak(d,a)){b-=a-d.from;break}return b},f.lin2val=function(a){var b,d;for(d=0;d<f.breakArray.length&&!(b=f.breakArray[d],b.from>=a);d++)b.to<a?a+=b.len:f.isInBreak(b,a)&&(a+=b.len);return a},f.setExtremes=function(a,b,d,l,q){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;
for(;this.isInAnyBreak(b);)b-=this.closestPointRange;n.prototype.setExtremes.call(this,a,b,d,l,q)},f.setAxisTranslation=function(a){n.prototype.setAxisTranslation.call(this,a);a=f.options.breaks;var b=[],d=[],l=0,q,c,e=f.userMin||f.min,k=f.userMax||f.max,A=z(f.pointRangePadding,0),h,F;B(a,function(a){c=a.repeat||Infinity;f.isInBreak(a,e)&&(e+=a.to%c-e%c);f.isInBreak(a,k)&&(k-=k%c-a.from%c)});B(a,function(a){h=a.from;for(c=a.repeat||Infinity;h-c>e;)h-=c;for(;h<e;)h+=c;for(F=h;F<k;F+=c)b.push({value:F,
move:"in"}),b.push({value:F+(a.to-a.from),move:"out",size:a.breakSize})});b.sort(function(a,p){return a.value===p.value?("in"===a.move?0:1)-("in"===p.move?0:1):a.value-p.value});q=0;h=e;B(b,function(a){q+="in"===a.move?1:-1;1===q&&"in"===a.move&&(h=a.value);0===q&&(d.push({from:h,to:a.value,len:a.value-h-(a.size||0)}),l+=a.value-h-(a.size||0))});f.breakArray=d;f.unitLength=k-e-l+A;r(f,"afterBreaks");f.options.staticScale?f.transA=f.options.staticScale:f.unitLength&&(f.transA*=(k-f.min+A)/f.unitLength);
A&&(f.minPixelPadding=f.transA*f.minPointOffset);f.min=e;f.max=k})});u(E.prototype,"generatePoints",function(a){a.apply(this,C(arguments));var b=this.xAxis,d=this.yAxis,f=this.points,h,g=f.length,m=this.options.connectNulls,l;if(b&&d&&(b.options.breaks||d.options.breaks))for(;g--;)h=f[g],l=null===h.y&&!1===m,l||!b.isInAnyBreak(h.x,!0)&&!d.isInAnyBreak(h.y,!0)||(f.splice(g,1),this.data[g]&&this.data[g].destroyElements())});a.Series.prototype.drawBreaks=function(a,b){var d=this,f=d.points,h,g,m,l;a&&
B(b,function(b){h=a.breakArray||[];g=a.isXAxis?a.min:z(d.options.threshold,a.min);B(f,function(c){l=z(c["stack"+b.toUpperCase()],c[b]);B(h,function(b){m=!1;if(g<b.from&&l>b.to||g>b.from&&l<b.from)m="pointBreak";else if(g<b.from&&l>b.from&&l<b.to||g>b.from&&l>b.to&&l<b.from)m="pointInBreak";m&&r(a,m,{point:c,brk:b})})})})};a.Series.prototype.gappedPath=function(){var n=this.currentDataGrouping,b=n&&n.totalRange,n=this.options.gapSize,d=this.points.slice(),f=d.length-1,h=this.yAxis;if(n&&0<f)for("value"!==
this.options.gapUnit&&(n*=this.closestPointRange),b&&b>n&&(n=b);f--;)d[f+1].x-d[f].x>n&&(b=(d[f].x+d[f+1].x)/2,d.splice(f+1,0,{isNull:!0,x:b}),this.options.stacking&&(b=h.stacks[this.stackKey][b]=new a.StackItem(h,h.options.stackLabels,!1,b,this.stack),b.total=0));return this.getGraphPath(d)};u(a.seriesTypes.column.prototype,"drawPoints",y);u(a.Series.prototype,"drawPoints",y)})(G);(function(a){var C=a.arrayMax,y=a.arrayMin,z=a.Axis,u=a.defaultPlotOptions,B=a.defined,t=a.each,D=a.extend,r=a.format,
n=a.isNumber,E=a.merge,v=a.pick,b=a.Point,d=a.Tooltip,f=a.wrap,h=a.Series.prototype,g=h.processData,m=h.generatePoints,l={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"]}},q={line:{},spline:{},area:{},areaspline:{},column:{approximation:"sum",groupPixelWidth:10},arearange:{approximation:"range"},areasplinerange:{approximation:"range"},columnrange:{approximation:"range",groupPixelWidth:10},candlestick:{approximation:"ohlc",groupPixelWidth:10},ohlc:{approximation:"ohlc",groupPixelWidth:5}},c=a.defaultDataGroupingUnits=[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,
10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]],e=a.approximations={sum:function(a){var k=a.length,b;if(!k&&a.hasNulls)b=null;else if(k)for(b=0;k--;)b+=a[k];return b},average:function(a){var k=a.length;a=e.sum(a);n(a)&&k&&(a/=k);return a},averages:function(){var a=[];t(arguments,function(k){a.push(e.average(k))});return void 0===a[0]?void 0:a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?
C(a):a.hasNulls?null:void 0},low:function(a){return a.length?y(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,l){a=e.open(a);b=e.high(b);c=e.low(c);l=e.close(l);if(n(a)||n(b)||n(c)||n(l))return[a,b,c,l]},range:function(a,b){a=e.low(a);b=e.high(b);if(n(a)||n(b))return[a,b];if(null===a&&null===b)return null}};h.groupData=function(a,b,c,d){var k=this.data,p=this.options.data,w=[],x=[],A=[],J=a.length,f,K,h=!!b,g=[];d="function"===
typeof d?d:e[d]||q[this.type]&&e[q[this.type].approximation]||e[l.approximation];var I=this.pointArrayMap,m=I&&I.length,F=0;K=0;var r,v;m?t(I,function(){g.push([])}):g.push([]);r=m||1;for(v=0;v<=J&&!(a[v]>=c[0]);v++);for(v;v<=J;v++){for(;void 0!==c[F+1]&&a[v]>=c[F+1]||v===J;){f=c[F];this.dataGroupInfo={start:K,length:g[0].length};K=d.apply(this,g);void 0!==K&&(w.push(f),x.push(K),A.push(this.dataGroupInfo));K=v;for(f=0;f<r;f++)g[f].length=0,g[f].hasNulls=!1;F+=1;if(v===J)break}if(v===J)break;if(I){f=
this.cropStart+v;var u=k&&k[f]||this.pointClass.prototype.applyOptions.apply({series:this},[p[f]]),B;for(f=0;f<m;f++)B=u[I[f]],n(B)?g[f].push(B):null===B&&(g[f].hasNulls=!0)}else f=h?b[v]:null,n(f)?g[0].push(f):null===f&&(g[0].hasNulls=!0)}return[w,x,A]};h.processData=function(){var a=this.chart,b=this.options.dataGrouping,e=!1!==this.allowDG&&b&&v(b.enabled,a.options.isStock),l=this.visible||!a.options.chart.ignoreHiddenSeries,d,p=this.currentDataGrouping,w;this.forceCrop=e;this.groupPixelWidth=
null;this.hasProcessed=!0;if(!1!==g.apply(this,arguments)&&e){this.destroyGroupedData();var x=this.processedXData,q=this.processedYData,f=a.plotSizeX,a=this.xAxis,m=a.options.ordinal,K=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();if(K){this.isDirty=d=!0;this.points=null;e=a.getExtremes();w=e.min;e=e.max;m=m&&a.getGroupIntervalFactor(w,e,this)||1;K=K*(e-w)/f*m;f=a.getTimeTicks(a.normalizeTimeTickInterval(K,b.units||c),Math.min(w,x[0]),Math.max(e,x[x.length-1]),a.options.startOfWeek,
x,this.closestPointRange);x=h.groupData.apply(this,[x,q,f,b.approximation]);q=x[0];m=x[1];if(b.smoothed&&q.length){b=q.length-1;for(q[b]=Math.min(q[b],e);b--&&0<b;)q[b]+=K/2;q[0]=Math.max(q[0],w)}w=f.info;this.closestPointRange=f.info.totalRange;this.groupMap=x[2];B(q[0])&&q[0]<a.dataMin&&l&&(a.min===a.dataMin&&(a.min=q[0]),a.dataMin=q[0]);this.processedXData=q;this.processedYData=m}else this.groupMap=null;this.hasGroupedData=d;this.currentDataGrouping=w;this.preventGraphAnimation=(p&&p.totalRange)!==
(w&&w.totalRange)}};h.destroyGroupedData=function(){var a=this.groupedData;t(a||[],function(b,c){b&&(a[c]=b.destroy?b.destroy():null)});this.groupedData=null};h.generatePoints=function(){m.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};a.addEvent(b.prototype,"update",function(){if(this.dataGroup)return a.error(24),!1});f(d.prototype,"tooltipFooterHeaderFormatter",function(a,b,c){var e=this.chart.time,k=b.series,p=k.tooltipOptions,w=k.options.dataGrouping,
l=p.xDateFormat,q,d=k.xAxis;return d&&"datetime"===d.options.type&&w&&n(b.key)?(a=k.currentDataGrouping,w=w.dateTimeLabelFormats,a?(d=w[a.unitName],1===a.count?l=d[0]:(l=d[1],q=d[2])):!l&&w&&(l=this.getXDateFormat(b,p,d)),l=e.dateFormat(l,b.key),q&&(l+=e.dateFormat(q,b.key+a.totalRange-1)),r(p[(c?"footer":"header")+"Format"],{point:D(b.point,{key:l}),series:k},e)):a.call(this,b,c)});a.addEvent(h,"destroy",h.destroyGroupedData);f(h,"setOptions",function(a,b){a=a.call(this,b);var c=this.type,e=this.chart.options.plotOptions,
k=u[c].dataGrouping;q[c]&&(k||(k=E(l,q[c])),a.dataGrouping=E(k,e.series&&e.series.dataGrouping,e[c].dataGrouping,b.dataGrouping));this.chart.options.isStock&&(this.requireSorting=!0);return a});a.addEvent(z.prototype,"afterSetScale",function(){t(this.series,function(a){a.hasProcessed=!1})});z.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,c,e=0,l=!1,p;for(c=b;c--;)(p=a[c].options.dataGrouping)&&(e=Math.max(e,p.groupPixelWidth));for(c=b;c--;)(p=a[c].options.dataGrouping)&&a[c].hasProcessed&&
(b=(a[c].processedXData||a[c].data).length,a[c].groupPixelWidth||b>this.chart.plotSizeX/e||b&&p.forced)&&(l=!0);return l?e:0};z.prototype.setDataGrouping=function(a,b){var c;b=v(b,!0);a||(a={forced:!1,units:null});if(this instanceof z)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else t(this.chart.options.series,function(b){b.dataGrouping=a},!1);b&&this.chart.redraw()}})(G);(function(a){var C=a.each,y=a.Point,z=a.seriesType,u=a.seriesTypes;z("ohlc","column",{lineWidth:1,
tooltip:{pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cb\x3e {series.name}\x3c/b\x3e\x3cbr/\x3eOpen: {point.open}\x3cbr/\x3eHigh: {point.high}\x3cbr/\x3eLow: {point.low}\x3cbr/\x3eClose: {point.close}\x3cbr/\x3e'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},
pointAttribs:function(a,t){t=u.column.prototype.pointAttribs.call(this,a,t);var D=this.options;delete t.fill;!a.options.color&&D.upColor&&a.open<a.close&&(t.stroke=D.upColor);return t},translate:function(){var a=this,t=a.yAxis,D=!!a.modifyValue,r=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];u.column.prototype.translate.apply(a);C(a.points,function(n){C([n.open,n.high,n.low,n.close,n.low],function(u,v){null!==u&&(D&&(u=a.modifyValue(u)),n[r[v]]=t.toPixels(u,!0))});n.tooltipPos[1]=n.plotHigh+
t.pos-a.chart.plotTop})},drawPoints:function(){var a=this,t=a.chart;C(a.points,function(u){var r,n,y,v,b=u.graphic,d,f=!b;void 0!==u.plotY&&(b||(u.graphic=b=t.renderer.path().add(a.group)),b.attr(a.pointAttribs(u,u.selected&&"select")),n=b.strokeWidth()%2/2,d=Math.round(u.plotX)-n,y=Math.round(u.shapeArgs.width/2),v=["M",d,Math.round(u.yBottom),"L",d,Math.round(u.plotHigh)],null!==u.open&&(r=Math.round(u.plotOpen)+n,v.push("M",d,r,"L",d-y,r)),null!==u.close&&(r=Math.round(u.plotClose)+n,v.push("M",
d,r,"L",d+y,r)),b[f?"attr":"animate"]({d:v}).addClass(u.getClassName(),!0))})},animate:null},{getClassName:function(){return y.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(G);(function(a){var C=a.defaultPlotOptions,y=a.each,z=a.merge,u=a.seriesType,B=a.seriesTypes;u("candlestick","ohlc",z(C.column,{states:{hover:{lineWidth:2}},tooltip:C.ohlc.tooltip,threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0}),
{pointAttribs:function(a,u){var r=B.column.prototype.pointAttribs.call(this,a,u),n=this.options,t=a.open<a.close,v=n.lineColor||this.color;r["stroke-width"]=n.lineWidth;r.fill=a.options.color||(t?n.upColor||this.color:this.color);r.stroke=a.lineColor||(t?n.upLineColor||v:v);u&&(a=n.states[u],r.fill=a.color||r.fill,r.stroke=a.lineColor||r.stroke,r["stroke-width"]=a.lineWidth||r["stroke-width"]);return r},drawPoints:function(){var a=this,u=a.chart;y(a.points,function(r){var n=r.graphic,t,v,b,d,f,h,
g,m=!n;void 0!==r.plotY&&(n||(r.graphic=n=u.renderer.path().add(a.group)),n.attr(a.pointAttribs(r,r.selected&&"select")).shadow(a.options.shadow),f=n.strokeWidth()%2/2,h=Math.round(r.plotX)-f,t=r.plotOpen,v=r.plotClose,b=Math.min(t,v),t=Math.max(t,v),g=Math.round(r.shapeArgs.width/2),v=Math.round(b)!==Math.round(r.plotHigh),d=t!==r.yBottom,b=Math.round(b)+f,t=Math.round(t)+f,f=[],f.push("M",h-g,t,"L",h-g,b,"L",h+g,b,"L",h+g,t,"Z","M",h,b,"L",h,v?Math.round(r.plotHigh):b,"M",h,t,"L",h,d?Math.round(r.yBottom):
t),n[m?"attr":"animate"]({d:f}).addClass(r.getClassName(),!0))})}})})(G);var X=function(a){var C=a.each,y=a.seriesTypes,z=a.stableSort;return{getPlotBox:function(){return a.Series.prototype.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)},translate:function(){y.column.prototype.translate.apply(this);var a=this.options,B=this.chart,t=this.points,D=t.length-1,r,n,E=a.onSeries;r=E&&B.get(E);var a=a.onKey||"y",E=r&&r.options.step,v=r&&r.points,b=v&&v.length,d=this.xAxis,
f=this.yAxis,h=0,g,m,l,q;if(r&&r.visible&&b)for(h=(r.pointXOffset||0)+(r.barW||0)/2,r=r.currentDataGrouping,m=v[b-1].x+(r?r.totalRange:0),z(t,function(a,b){return a.x-b.x}),a="plot"+a[0].toUpperCase()+a.substr(1);b--&&t[D]&&!(g=v[b],r=t[D],r.y=g.y,g.x<=r.x&&void 0!==g[a]&&(r.x<=m&&(r.plotY=g[a],g.x<r.x&&!E&&(l=v[b+1])&&void 0!==l[a]&&(q=(r.x-g.x)/(l.x-g.x),r.plotY+=q*(l[a]-g[a]),r.y+=q*(l.y-g.y))),D--,b++,0>D)););C(t,function(a,b){var c;a.plotX+=h;void 0===a.plotY&&(0<=a.plotX&&a.plotX<=d.len?a.plotY=
B.chartHeight-d.bottom-(d.opposite?d.height:0)+d.offset-f.top:a.shapeArgs={});(n=t[b-1])&&n.plotX===a.plotX&&(void 0===n.stackIndex&&(n.stackIndex=0),c=n.stackIndex+1);a.stackIndex=c})}}}(G);(function(a,C){function y(a){v[a+"pin"]=function(b,f,h,g,m){var l=m&&m.anchorX;m=m&&m.anchorY;"circle"===a&&g>h&&(b-=Math.round((g-h)/2),h=g);b=v[a](b,f,h,g);l&&m&&(b.push("M","circle"===a?b[1]-b[4]:b[1]+b[4]/2,f>m?f:f+g,"L",l,m),b=b.concat(v.circle(l-1,m-1,2,2)));return b}}var z=a.addEvent,u=a.each,B=a.merge,
t=a.noop,D=a.Renderer,r=a.seriesType,n=a.TrackerMixin,E=a.VMLRenderer,v=a.SVGRenderer.prototype.symbols;r("flags","column",{pointRange:0,allowOverlapX:!1,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,d){var b=this.options,h=a&&a.color||this.color,g=b.lineColor,m=a&&a.lineWidth;a=a&&a.fillColor||b.fillColor;d&&(a=b.states[d].fillColor,g=b.states[d].lineColor,m=b.states[d].lineWidth);return{fill:a||h,stroke:g||h,"stroke-width":m||b.lineWidth||0}},translate:C.translate,getPlotBox:C.getPlotBox,drawPoints:function(){var b=this.points,d=this.chart,f=d.renderer,h,g,m=this.options,l=m.y,q,c,e,k,A,n,r=this.yAxis,t={},p=[];for(c=b.length;c--;)e=b[c],
n=e.plotX>this.xAxis.len,h=e.plotX,k=e.stackIndex,q=e.options.shape||m.shape,g=e.plotY,void 0!==g&&(g=e.plotY+l-(void 0!==k&&k*m.stackDistance)),e.anchorX=k?void 0:e.plotX,A=k?void 0:e.plotY,k=e.graphic,void 0!==g&&0<=h&&!n?(k||(k=e.graphic=f.label("",null,null,q,null,null,m.useHTML).attr(this.pointAttribs(e)).css(B(m.style,e.style)).attr({align:"flag"===q?"left":"center",width:m.width,height:m.height,"text-align":m.textAlign}).addClass("highcharts-point").add(this.markerGroup),e.graphic.div&&(e.graphic.div.point=
e),k.shadow(m.shadow),k.isNew=!0),0<h&&(h-=k.strokeWidth()%2),q={y:g,anchorY:A},m.allowOverlapX&&(q.x=h,q.anchorX=e.anchorX),k.attr({text:e.options.title||m.title||"A"})[k.isNew?"attr":"animate"](q),m.allowOverlapX||(t[e.plotX]?t[e.plotX].size=Math.max(t[e.plotX].size,k.width):t[e.plotX]={align:0,size:k.width,target:h,anchorX:h}),e.tooltipPos=d.inverted?[r.len+r.pos-d.plotLeft-g,this.xAxis.len-h]:[h,g+r.pos-d.plotTop]):k&&(e.graphic=k.destroy());m.allowOverlapX||(a.objectEach(t,function(a){a.plotX=
a.anchorX;p.push(a)}),a.distribute(p,this.xAxis.len),u(b,function(a){var b=a.graphic&&t[a.plotX];b&&(a.graphic[a.graphic.isNew?"attr":"animate"]({x:b.pos,anchorX:a.anchorX}),a.graphic.isNew=!1)}));m.useHTML&&a.wrap(this.markerGroup,"on",function(b){return a.SVGElement.prototype.on.apply(b.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var a=this.points;n.drawTrackerPoint.apply(this);u(a,function(b){var d=b.graphic;d&&z(d.element,"mouseover",function(){0<
b.stackIndex&&!b.raised&&(b._y=d.y,d.attr({y:b._y-8}),b.raised=!0);u(a,function(a){a!==b&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:t,buildKDTree:t,setClip:t});v.flag=function(a,d,f,h,g){var b=g&&g.anchorX||a;g=g&&g.anchorY||d;return v.circle(b-1,g-1,2,2).concat(["M",b,g,"L",a,d+h,a,d,a+f,d,a+f,d+h,a,d+h,"Z"])};y("circle");y("square");D===E&&u(["flag","circlepin","squarepin"],function(a){E.prototype.symbols[a]=v[a]})})(G,X);(function(a){function C(a,b,c){this.init(a,
b,c)}var y=a.addEvent,z=a.Axis,u=a.correctFloat,B=a.defaultOptions,t=a.defined,D=a.destroyObjectProperties,r=a.each,n=a.fireEvent,E=a.hasTouch,v=a.isTouchDevice,b=a.merge,d=a.pick,f=a.removeEvent,h=a.wrap,g,m={height:v?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!v,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};B.scrollbar=b(!0,m,B.scrollbar);a.swapXY=g=function(a,b){var c=a.length,e;if(b)for(b=0;b<c;b+=3)e=a[b+1],a[b+1]=a[b+2],a[b+2]=e;return a};C.prototype={init:function(a,q,c){this.scrollbarButtons=[];this.renderer=a;this.userOptions=q;this.options=b(m,q);this.chart=c;this.size=d(this.options.size,this.options.height);q.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=
this.renderer,b=this.options,c=this.size,e;this.group=e=a.g("scrollbar").attr({zIndex:b.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:b.trackBorderRadius||0,height:c,width:c}).add(e);this.track.attr({fill:b.trackBackgroundColor,stroke:b.trackBorderColor,"stroke-width":b.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(e);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:c,
width:c,r:b.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(g(["M",-3,c/4,"L",-3,2*c/3,"M",0,c/4,"L",0,2*c/3,"M",3,c/4,"L",3,2*c/3],b.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);this.scrollbar.attr({fill:b.barBackgroundColor,stroke:b.barBorderColor,"stroke-width":b.barBorderWidth});this.scrollbarRifles.attr({stroke:b.rifleColor,"stroke-width":1});this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%
2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)},position:function(a,b,c,e){var k=this.options.vertical,l=0,d=this.rendered?"animate":"attr";this.x=a;this.y=b+this.trackBorderWidth;this.width=c;this.xOffset=this.height=e;this.yOffset=l;k?(this.width=this.yOffset=c=l=this.size,this.xOffset=b=0,this.barWidth=e-2*c,this.x=a+=this.options.margin):(this.height=this.xOffset=e=b=this.size,this.barWidth=c-2*e,this.y+=this.options.margin);this.group[d]({translateX:a,
translateY:this.y});this.track[d]({width:c,height:e});this.scrollbarButtons[1][d]({translateX:k?0:c-b,translateY:k?e-l:0})},drawScrollbarButton:function(a){var b=this.renderer,c=this.scrollbarButtons,e=this.options,k=this.size,l;l=b.g().add(this.group);c.push(l);l=b.rect().addClass("highcharts-scrollbar-button").add(l);l.attr({stroke:e.buttonBorderColor,"stroke-width":e.buttonBorderWidth,fill:e.buttonBackgroundColor});l.attr(l.crisp({x:-.5,y:-.5,width:k+1,height:k+1,r:e.buttonBorderRadius},l.strokeWidth()));
l=b.path(g(["M",k/2+(a?-1:1),k/2-3,"L",k/2+(a?-1:1),k/2+3,"L",k/2+(a?2:-2),k/2],e.vertical)).addClass("highcharts-scrollbar-arrow").add(c[a]);l.attr({fill:e.buttonArrowColor})},setRange:function(a,b){var c=this.options,e=c.vertical,l=c.minWidth,d=this.barWidth,f,q,g=this.rendered&&!this.hasDragged?"animate":"attr";t(d)&&(a=Math.max(a,0),f=Math.ceil(d*a),this.calculatedWidth=q=u(d*Math.min(b,1)-f),q<l&&(f=(d-l+q)*a,q=l),l=Math.floor(f+this.xOffset+this.yOffset),d=q/2-.5,this.from=a,this.to=b,e?(this.scrollbarGroup[g]({translateY:l}),
this.scrollbar[g]({height:q}),this.scrollbarRifles[g]({translateY:d}),this.scrollbarTop=l,this.scrollbarLeft=0):(this.scrollbarGroup[g]({translateX:l}),this.scrollbar[g]({width:q}),this.scrollbarRifles[g]({translateX:d}),this.scrollbarLeft=l,this.scrollbarTop=0),12>=q?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===c.showFull&&(0>=a&&1<=b?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=this;a.mouseMoveHandler=function(b){var c=a.chart.pointer.normalize(b),
e=a.options.vertical?"chartY":"chartX",k=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][e]||(c=a.cursorToScrollbarPosition(c)[e],e=a[e],e=c-e,a.hasDragged=!0,a.updatePosition(k[0]+e,k[1]+e),a.hasDragged&&n(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&n(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=
function(b){b=a.chart.pointer.normalize(b);b=a.cursorToScrollbarPosition(b);a.chartX=b.chartX;a.chartY=b.chartY;a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(b){var c=u(a.to-a.from)*a.options.step;a.updatePosition(u(a.from-c),u(a.to-c));n(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.buttonToMaxClick=function(b){var c=(a.to-a.from)*a.options.step;a.updatePosition(a.from+c,a.to+c);n(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};
a.trackClick=function(b){var c=a.chart.pointer.normalize(b),e=a.to-a.from,k=a.y+a.scrollbarTop,d=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>k||!a.options.vertical&&c.chartX>d?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-e,a.to-e);n(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})}},cursorToScrollbarPosition:function(a){var b=this.options,b=b.minWidth>this.calculatedWidth?b.minWidth:0;return{chartX:(a.chartX-this.x-this.xOffset)/(this.barWidth-b),chartY:(a.chartY-
this.y-this.yOffset)/(this.barWidth-b)}},updatePosition:function(a,b){1<b&&(a=u(1-u(b-a)),b=1);0>a&&(b=u(b-a),a=0);this.from=a;this.to=b},update:function(a){this.destroy();this.init(this.chart.renderer,b(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,c=this.scrollbarGroup.element,e=this.mouseDownHandler,k=this.mouseMoveHandler,d=this.mouseUpHandler,a=[[b[a[0]].element,"click",this.buttonToMinClick],[b[a[1]].element,"click",this.buttonToMaxClick],
[this.track.element,"click",this.trackClick],[c,"mousedown",e],[c.ownerDocument,"mousemove",k],[c.ownerDocument,"mouseup",d]];E&&a.push([c,"touchstart",e],[c.ownerDocument,"touchmove",k],[c.ownerDocument,"touchend",d]);r(a,function(a){y.apply(null,a)});this._events=a},removeEvents:function(){r(this._events,function(a){f.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();r(["track","scrollbarRifles","scrollbar","scrollbarGroup","group"],function(a){this[a]&&
this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,D(a.scrollbarButtons))}};h(z.prototype,"init",function(a){var b=this;a.apply(b,Array.prototype.slice.call(arguments,1));b.options.scrollbar&&b.options.scrollbar.enabled&&(b.options.scrollbar.vertical=!b.horiz,b.options.startOnTick=b.options.endOnTick=!1,b.scrollbar=new C(b.chart.renderer,b.options.scrollbar,b.chart),y(b.scrollbar,"changed",function(a){var c=Math.min(d(b.options.min,b.min),b.min,b.dataMin),
k=Math.max(d(b.options.max,b.max),b.max,b.dataMax)-c,f;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(f=c+k*this.to,c+=k*this.from):(f=c+k*(1-this.from),c+=k*(1-this.to));b.setExtremes(c,f,!0,!1,a)}))});h(z.prototype,"render",function(a){var b=Math.min(d(this.options.min,this.min),this.min,d(this.dataMin,this.min)),c=Math.max(d(this.options.max,this.max),this.max,d(this.dataMax,this.max)),e=this.scrollbar,k=this.titleOffset||0;a.apply(this,Array.prototype.slice.call(arguments,1));if(e){this.horiz?(e.position(this.left,
this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:k+this.axisTitleMargin+this.offset),this.width,this.height),k=1):(e.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?k+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),k=0);if(!this.opposite&&!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[k]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(b)||isNaN(c)||!t(this.min)||!t(this.max)?e.setRange(0,0):(k=
(this.min-b)/(c-b),b=(this.max-b)/(c-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?e.setRange(k,b):e.setRange(1-b,1-k))}});h(z.prototype,"getOffset",function(a){var b=this.horiz?2:1,c=this.scrollbar;a.apply(this,Array.prototype.slice.call(arguments,1));c&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[b]+=c.size+c.options.margin)});h(z.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());a.apply(this,Array.prototype.slice.call(arguments,
1))});a.Scrollbar=C})(G);(function(a){function C(a){this.init(a)}var y=a.addEvent,z=a.Axis,u=a.Chart,B=a.color,t=a.defaultOptions,D=a.defined,r=a.destroyObjectProperties,n=a.each,E=a.erase,v=a.error,b=a.extend,d=a.grep,f=a.hasTouch,h=a.isArray,g=a.isNumber,m=a.isObject,l=a.merge,q=a.pick,c=a.removeEvent,e=a.Scrollbar,k=a.Series,A=a.seriesTypes,I=a.wrap,F=[].concat(a.defaultDataGroupingUnits),L=function(a){var b=d(arguments,g);if(b.length)return Math[a].apply(0,b)};F[4]=["day",[1,2,3,4]];F[5]=["week",
[1,2,3]];A=void 0===A.areaspline?"line":"areaspline";b(t,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:B("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:A,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:F},dataLabels:{enabled:!1,zIndex:2},
id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,
title:{text:null},tickLength:0,tickWidth:0}}});a.Renderer.prototype.symbols["navigator-handle"]=function(a,b,c,e,k){a=k.width/2;b=Math.round(a/3)+.5;k=k.height;return["M",-a-1,.5,"L",a,.5,"L",a,k+.5,"L",-a-1,k+.5,"L",-a-1,.5,"M",-b,4,"L",-b,k-3,"M",b-1,4,"L",b-1,k-3]};C.prototype={drawHandle:function(a,b,c,e){var p=this.navigatorOptions.handles.height;this.handles[b][e](c?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(a,10)+.5-p)}:{translateX:Math.round(this.left+
parseInt(a,10)),translateY:Math.round(this.top+this.height/2-p/2-1)})},drawOutline:function(a,b,c,e){var p=this.navigatorOptions.maskInside,w=this.outline.strokeWidth(),k=w/2,w=w%2/2,x=this.outlineHeight,d=this.scrollbarHeight,f=this.size,g=this.left-d,h=this.top;c?(g-=k,c=h+b+w,b=h+a+w,a=["M",g+x,h-d-w,"L",g+x,c,"L",g,c,"L",g,b,"L",g+x,b,"L",g+x,h+f+d].concat(p?["M",g+x,c-k,"L",g+x,b+k]:[])):(a+=g+d-w,b+=g+d-w,h+=k,a=["M",g,h,"L",a,h,"L",a,h+x,"L",b,h+x,"L",b,h,"L",g+f+2*d,h].concat(p?["M",a-k,h,
"L",b+k,h]:[]));this.outline[e]({d:a})},drawMasks:function(a,b,c,e){var p=this.left,w=this.top,k=this.height,x,d,f,g;c?(f=[p,p,p],g=[w,w+a,w+b],d=[k,k,k],x=[a,b-a,this.size-b]):(f=[p,p+a,p+b],g=[w,w,w],d=[a,b-a,this.size-b],x=[k,k,k]);n(this.shades,function(a,b){a[e]({x:f[b],y:g[b],width:d[b],height:x[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,e=a.chart,k=e.inverted,d=e.renderer,f;a.navigatorGroup=f=d.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();
var g={cursor:k?"ns-resize":"ew-resize"};n([!c,c,!c],function(c,p){a.shades[p]=d.rect().addClass("highcharts-navigator-mask"+(1===p?"-inside":"-outside")).attr({fill:c?b.maskFill:"rgba(0,0,0,0)"}).css(1===p&&g).add(f)});a.outline=d.path().addClass("highcharts-navigator-outline").attr({"stroke-width":b.outlineWidth,stroke:b.outlineColor}).add(f);b.handles.enabled&&n([0,1],function(c){b.handles.inverted=e.inverted;a.handles[c]=d.symbol(b.handles.symbols[c],-b.handles.width/2-1,0,b.handles.width,b.handles.height,
b.handles);a.handles[c].attr({zIndex:7-c}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][c]).add(f);var p=b.handles;a.handles[c].attr({fill:p.backgroundColor,stroke:p.borderColor,"stroke-width":p.lineWidth}).css(g)})},update:function(a){n(this.series||[],function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries});this.destroy();l(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(b,c,e,k){var p=this.chart,w,d,x=this.scrollbarHeight,
f,h=this.xAxis;w=h.fake?p.xAxis[0]:h;var l=this.navigatorEnabled,H,m=this.rendered;d=p.inverted;var A,n=p.xAxis[0].minRange,r=p.xAxis[0].options.maxRange;if(!this.hasDragged||D(e)){if(!g(b)||!g(c))if(m)e=0,k=q(h.width,w.width);else return;this.left=q(h.left,p.plotLeft+x+(d?p.plotWidth:0));this.size=H=f=q(h.len,(d?p.plotHeight:p.plotWidth)-2*x);p=d?x:f+2*x;e=q(e,h.toPixels(b,!0));k=q(k,h.toPixels(c,!0));g(e)&&Infinity!==Math.abs(e)||(e=0,k=p);b=h.toValue(e,!0);c=h.toValue(k,!0);A=Math.abs(a.correctFloat(c-
b));A<n?this.grabbedLeft?e=h.toPixels(c-n,!0):this.grabbedRight&&(k=h.toPixels(b+n,!0)):D(r)&&A>r&&(this.grabbedLeft?e=h.toPixels(c-r,!0):this.grabbedRight&&(k=h.toPixels(b+r,!0)));this.zoomedMax=Math.min(Math.max(e,k,0),H);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(e,k),0),H);this.range=this.zoomedMax-this.zoomedMin;H=Math.round(this.zoomedMax);e=Math.round(this.zoomedMin);l&&(this.navigatorGroup.attr({visibility:"visible"}),m=m&&!this.hasDragged?"animate":
"attr",this.drawMasks(e,H,d,m),this.drawOutline(e,H,d,m),this.navigatorOptions.handles.enabled&&(this.drawHandle(e,0,d,m),this.drawHandle(H,1,d,m)));this.scrollbar&&(d?(d=this.top-x,w=this.left-x+(l||!w.opposite?0:(w.titleOffset||0)+w.axisTitleMargin),x=f+2*x):(d=this.top+(l?this.height:-x),w=this.left-x),this.scrollbar.position(w,d,p,x),this.scrollbar.setRange(this.zoomedMin/f,this.zoomedMax/f));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,c=b.container,e=[],k,d;a.mouseMoveHandler=
k=function(b){a.onMouseMove(b)};a.mouseUpHandler=d=function(b){a.onMouseUp(b)};e=a.getPartsEvents("mousedown");e.push(y(c,"mousemove",k),y(c.ownerDocument,"mouseup",d));f&&(e.push(y(c,"touchmove",k),y(c.ownerDocument,"touchend",d)),e.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=e;a.series&&a.series[0]&&e.push(y(a.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,c=[];n(["shades","handles"],function(p){n(b[p],
function(e,k){c.push(y(e.element,a,function(a){b[p+"Mousedown"](a,k)}))})});return c},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var c=this.chart,e=this.xAxis,p=this.zoomedMin,k=this.left,d=this.size,w=this.range,f=a.chartX,g,h;c.inverted&&(f=a.chartY,k=this.top);1===b?(this.grabbedCenter=f,this.fixedWidth=w,this.dragOffset=f-p):(a=f-k-w/2,0===b?a=Math.max(0,a):2===b&&a+w>=d&&(a=d-w,e.reversed?(a-=w,h=this.getUnionExtremes().dataMin):g=this.getUnionExtremes().dataMax),a!==p&&
(this.fixedWidth=w,b=e.toFixedRange(a,a+w,h,g),D(b.min)&&c.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(a,b){this.chart.pointer.normalize(a);a=this.chart;var c=a.xAxis[0],e=a.inverted&&!c.reversed||!a.inverted&&c.reversed;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=e?c.min:c.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=e?c.max:c.min);a.fixedRange=null},
onMouseMove:function(a){var b=this,c=b.chart,e=b.left,p=b.navigatorSize,k=b.range,d=b.dragOffset,f=c.inverted;a.touches&&0===a.touches[0].pageX||(a=c.pointer.normalize(a),c=a.chartX,f&&(e=b.top,c=a.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,c-e,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,c-e)):b.grabbedCenter&&(b.hasDragged=!0,c<d?c=d:c>p+d-k&&(c=p+d-k),b.render(0,0,c-d,c-d+k)),b.hasDragged&&b.scrollbar&&b.scrollbar.options.liveRedraw&&(a.DOMType=a.type,
setTimeout(function(){b.onMouseUp(a)},0)))},onMouseUp:function(a){var b=this.chart,c=this.xAxis,e=c&&c.reversed,k=this.scrollbar,p,d,f=a.DOMEvent||a;(!this.hasDragged||k&&k.hasDragged)&&"scrollbar"!==a.trigger||(k=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?p=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(d=this.fixedExtreme),this.zoomedMax===this.size&&(d=e?k.dataMin:k.dataMax),0===this.zoomedMin&&(p=e?k.dataMax:k.dataMin),c=c.toFixedRange(this.zoomedMin,this.zoomedMax,
p,d),D(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),Math.max(c.min,c.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:f}));"mousemove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(n(this.eventsToUnbind,function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=
this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&n(a,function(a){c(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&c(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,c=b.navigator,k=c.enabled,d=b.scrollbar,p=d.enabled,b=k?c.height:0,f=p?d.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=f;this.scrollbarEnabled=p;this.navigatorEnabled=k;this.navigatorOptions=
c;this.scrollbarOptions=d;this.outlineHeight=b+f;this.opposite=q(c.opposite,!k&&a.inverted);var g=this,d=g.baseSeries,p=a.xAxis.length,h=a.yAxis.length,m=d&&d[0]&&d[0].xAxis||a.xAxis[0];a.extraMargin={type:g.opposite?"plotTop":"marginBottom",value:(k||!a.inverted?g.outlineHeight:0)+c.margin};a.inverted&&(a.extraMargin.type=g.opposite?"marginRight":"plotLeft");a.isDirtyBox=!0;g.navigatorEnabled?(g.xAxis=new z(a,l({breaks:m.options.breaks,ordinal:m.options.ordinal},c.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",
isX:!0,type:"datetime",index:p,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[f,0,-f,0],width:b}:{offsets:[0,-f,0,f],height:b})),g.yAxis=new z(a,l(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:h,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),d||c.series.data?g.updateNavigatorSeries():0===a.series.length&&I(a,"redraw",function(b,c){0<a.series.length&&!g.series&&(g.setBaseSeries(),a.redraw=b);b.call(a,c)}),g.renderElements(),
g.addMouseEvents()):g.xAxis={translate:function(b,c){var e=a.xAxis[0],k=e.getExtremes(),d=e.len-2*f,p=L("min",e.options.min,k.dataMin),e=L("max",e.options.max,k.dataMax)-p;return c?b*e/d+p:d*(b-p)/e},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:z.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=g.scrollbar=new e(a.renderer,l(a.options.scrollbar,{margin:g.navigatorEnabled?0:10,vertical:a.inverted}),a),y(g.scrollbar,
"changed",function(b){var c=g.size,e=c*this.to,c=c*this.from;g.hasDragged=g.scrollbar.hasDragged;g.render(0,0,c,e);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType&&"touchmove"!==b.DOMType)&&setTimeout(function(){g.onMouseUp(b)})}));g.addBaseSeriesEvents();g.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],c=this.xAxis,e=c.options,k=b.options,d;a&&null===b.dataMin||(d={dataMin:q(e&&e.min,L("min",k.min,b.dataMin,c.dataMin,c.min)),dataMax:q(e&&e.max,L("max",k.max,b.dataMax,
c.dataMax,c.max))});return d},setBaseSeries:function(a,b){var c=this.chart,e=this.baseSeries=[];a=a||c.options&&c.options.navigator.baseSeries||0;n(c.series||[],function(b,c){b.options.isInternal||!b.options.showInNavigator&&(c!==a&&b.options.id!==a||!1===b.options.showInNavigator)||e.push(b)});this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(b)},updateNavigatorSeries:function(e){var k=this,d=k.chart,p=k.baseSeries,f,g,m=k.navigatorOptions.series,A,q={enableMouseTracking:!1,index:null,linkedTo:null,
group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,visible:!0},r=k.series=a.grep(k.series||[],function(b){var e=b.baseSeries;return 0>a.inArray(e,p)?(e&&(c(e,"updatedData",k.updatedDataHandler),delete e.navigatorSeries),b.destroy(),!1):!0});p&&p.length&&n(p,function(a){var c=a.navigatorSeries,w=b({color:a.color},h(m)?t.navigator.series:m);c&&!1===k.navigatorOptions.adaptToUpdatedData||(q.name="Navigator "+p.length,f=a.options||{},A=
f.navigatorOptions||{},g=l(f,q,w,A),w=A.data||w.data,k.hasNavigatorData=k.hasNavigatorData||!!w,g.data=w||f.data&&f.data.slice(0),c&&c.options?c.update(g,e):(a.navigatorSeries=d.initSeries(g),a.navigatorSeries.baseSeries=a,r.push(a.navigatorSeries)))});if(m.data&&(!p||!p.length)||h(m))k.hasNavigatorData=!1,m=a.splat(m),n(m,function(a,b){q.name="Navigator "+(r.length+1);g=l(t.navigator.series,{color:d.series[b]&&!d.series[b].options.isInternal&&d.series[b].color||d.options.colors[b]||d.options.colors[0]},
q,a);g.data=a.data;g.data&&(k.hasNavigatorData=!0,r.push(d.initSeries(g)))});this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&y(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);n(b,function(b){y(b,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});y(b,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)});!1!==this.navigatorOptions.adaptToUpdatedData&&b.xAxis&&y(b,"updatedData",
this.updatedDataHandler);y(b,"remove",function(){this.navigatorSeries&&(E(a.series,this.navigatorSeries),this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;a.getExtremes&&(!(b=this.getUnionExtremes(!0))||b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,b=this.getExtremes(),c=b.dataMin,e=b.dataMax,b=b.max-b.min,k=a.stickToMin,d=a.stickToMax,
f=this.options.overscroll,h,m,l=a.series&&a.series[0],A=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(k&&(m=c,h=m+b),d&&(h=e+f,k||(m=Math.max(h-b,l&&l.xData?l.xData[0]:-Number.MAX_VALUE))),A&&(k||d)&&g(m)&&(this.min=this.userMin=m,this.max=this.userMax=h));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries;a.stickToMax=a.xAxis.reversed?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);
a.stickToMin=g(this.xAxis.min)&&this.xAxis.min<=this.xData[0]&&(!this.chart.fixedRange||!a.stickToMax);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){y(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,b.max)})},destroy:function(){this.removeEvents();this.xAxis&&(E(this.chart.xAxis,this.xAxis),E(this.chart.axes,
this.xAxis));this.yAxis&&(E(this.chart.yAxis,this.yAxis),E(this.chart.axes,this.yAxis));n(this.series||[],function(a){a.destroy&&a.destroy()});n("series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" "),function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);n([this.handles],function(a){r(a)},this)}};a.Navigator=C;I(z.prototype,"zoom",function(a,b,c){var e=this.chart,k=e.options,d=k.chart.zoomType,f=k.navigator,
k=k.rangeSelector,g;this.isXAxis&&(f&&f.enabled||k&&k.enabled)&&("x"===d?e.resetZoomButton="blocked":"y"===d?g=!1:"xy"===d&&this.options.range&&(e=this.previousZoom,D(b)?this.previousZoom=[this.min,this.max]:e&&(b=e[0],c=e[1],delete this.previousZoom)));return void 0!==g?g:a.call(this,b,c)});I(u.prototype,"init",function(a,b,c){y(this,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new C(this)});a.call(this,b,c)});I(u.prototype,
"setChartSize",function(a){var b=this.legend,c=this.navigator,e,k,d,f;a.apply(this,[].slice.call(arguments,1));c&&(k=b&&b.options,d=c.xAxis,f=c.yAxis,e=c.scrollbarHeight,this.inverted?(c.left=c.opposite?this.chartWidth-e-c.height:this.spacing[3]+e,c.top=this.plotTop+e):(c.left=this.plotLeft+e,c.top=c.navigatorOptions.top||this.chartHeight-c.height-e-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(k&&"bottom"===k.verticalAlign&&k.enabled&&!k.floating?
b.legendHeight+q(k.margin,10):0)),d&&f&&(this.inverted?d.options.left=f.options.left=c.left:d.options.top=f.options.top=c.top,d.setAxisSize(),f.setAxisSize()))});I(k.prototype,"addPoint",function(a,b,c,e,k){var d=this.options.turboThreshold;d&&this.xData.length>d&&m(b,!0)&&this.chart.navigator&&v(20,!0);a.call(this,b,c,e,k)});I(u.prototype,"addSeries",function(a,b,c,e){a=a.call(this,b,!1,e);this.navigator&&this.navigator.setBaseSeries(null,!1);q(c,!0)&&this.redraw();return a});I(k.prototype,"update",
function(a,b,c){a.call(this,b,!1);this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1);q(c,!0)&&this.chart.redraw()});u.prototype.callbacks.push(function(a){var b=a.navigator;b&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))})})(G);(function(a){function C(a){this.init(a)}var y=a.addEvent,z=a.Axis,u=a.Chart,B=a.css,t=a.createElement,D=a.defaultOptions,r=a.defined,n=a.destroyObjectProperties,E=a.discardElement,v=a.each,b=a.extend,d=a.fireEvent,f=a.isNumber,
h=a.merge,g=a.pick,m=a.pInt,l=a.splat,q=a.wrap;b(D,{rangeSelector:{verticalAlign:"top",buttonTheme:{"stroke-width":0,width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0},labelStyle:{color:"#666666"}}});D.lang=h(D.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});C.prototype={clickButton:function(a,b){var c=this,e=c.chart,d=c.buttonOptions[a],h=e.xAxis[0],m=e.scroller&&e.scroller.getUnionExtremes()||
h||{},p=m.dataMin,w=m.dataMax,x,n=h&&Math.round(Math.min(h.max,g(w,h.max))),q=d.type,r,m=d._range,t,u,W,B=d.dataGrouping;if(null!==p&&null!==w){e.fixedRange=m;B&&(this.forcedDataGrouping=!0,z.prototype.setDataGrouping.call(h||{chart:this.chart},B,!1));if("month"===q||"year"===q)h?(q={range:d,max:n,chart:e,dataMin:p,dataMax:w},x=h.minFromRange.call(q),f(q.newMax)&&(n=q.newMax)):m=d;else if(m)x=Math.max(n-m,p),n=Math.min(x+m,w);else if("ytd"===q)if(h)void 0===w&&(p=Number.MAX_VALUE,w=Number.MIN_VALUE,
v(e.series,function(a){a=a.xData;p=Math.min(a[0],p);w=Math.max(a[a.length-1],w)}),b=!1),n=c.getYTDExtremes(w,p,e.time.useUTC),x=t=n.min,n=n.max;else{y(e,"beforeRender",function(){c.clickButton(a)});return}else"all"===q&&h&&(x=p,n=w);x+=d._offsetMin;n+=d._offsetMax;c.setSelected(a);h?h.setExtremes(x,n,g(b,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:d}):(r=l(e.options.xAxis)[0],W=r.range,r.range=m,u=r.min,r.min=t,y(e,"load",function(){r.range=W;r.min=u}))}},setSelected:function(a){this.selected=
this.options.selected=a},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(a){var b=this,c=a.options.rangeSelector,f=c.buttons||[].concat(b.defaultButtons),g=c.selected,h=function(){var a=b.minInput,c=b.maxInput;a&&a.blur&&d(a,"blur");c&&c.blur&&d(c,"blur")};b.chart=a;b.options=c;b.buttons=[];a.extraTopMargin=c.height;b.buttonOptions=f;this.unMouseDown=
y(a.container,"mousedown",h);this.unResize=y(a,"resize",h);v(f,b.computeButtonRange);void 0!==g&&f[g]&&this.clickButton(g,!1);y(a,"load",function(){a.xAxis&&a.xAxis[0]&&y(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],k=Math.round(b.max-b.min),d=!b.hasVisibleSeries,g=a.scroller&&a.scroller.getUnionExtremes()||
b,h=g.dataMin,m=g.dataMax,a=this.getYTDExtremes(m,h,a.time.useUTC),p=a.min,l=a.max,n=this.selected,q=f(n),r=this.options.allButtonsEnabled,t=this.buttons;v(this.buttonOptions,function(a,c){var e=a._range,f=a.type,g=a.count||1,w=t[c],A=0;a=a._offsetMax-a._offsetMin;c=c===n;var x=e>m-h,K=e<b.minRange,v=!1,u=!1,e=e===k;("month"===f||"year"===f)&&k+36E5>=864E5*{month:28,year:365}[f]*g-a&&k-36E5<=864E5*{month:31,year:366}[f]*g+a?e=!0:"ytd"===f?(e=l-p+a===k,v=!c):"all"===f&&(e=b.max-b.min>=m-h,u=!c&&q&&
e);f=!r&&(x||K||u||d);g=c&&e||e&&!q&&!v;f?A=3:g&&(q=!0,A=2);w.state!==A&&w.setState(A)})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c;a._offsetMin=g(a.offsetMin,0);a._offsetMax=g(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,e=this.chart.time,d=this[a+
"Input"];r(b)&&(d.previousValue=d.HCTime,d.HCTime=b);d.value=e.dateFormat(c.inputEditDateFormat||"%Y-%m-%d",d.HCTime);this[a+"DateBox"].attr({text:e.dateFormat(c.inputDateFormat||"%b %e, %Y",d.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];B(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){B(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},
drawInput:function(a){function c(){var a=x.value,b=(q.inputDateParser||Date.parse)(a),c=g.xAxis[0],e=g.scroller&&g.scroller.xAxis?g.scroller.xAxis:c,k=e.dataMin,e=e.dataMax;b!==x.previousValue&&(x.previousValue=b,f(b)||(b=a.split("-"),b=Date.UTC(m(b[0]),m(b[1])-1,m(b[2]))),f(b)&&(g.time.useUTC||(b+=6E4*(new Date).getTimezoneOffset()),w?b>d.maxInput.HCTime?b=void 0:b<k&&(b=k):b<d.minInput.HCTime?b=void 0:b>e&&(b=e),void 0!==b&&c.setExtremes(w?b:c.min,w?c.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}
var d=this,g=d.chart,l=g.renderer.style||{},n=g.renderer,q=g.options.rangeSelector,p=d.div,w="min"===a,x,r,v=this.inputGroup;this[a+"Label"]=r=n.label(D.lang[w?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(v);v.offset+=r.width+5;this[a+"DateBox"]=n=n.label("",v.offset).addClass("highcharts-range-input").attr({padding:2,width:q.inputBoxWidth||90,height:q.inputBoxHeight||17,stroke:q.inputBoxBorderColor||"#cccccc","stroke-width":1,
"text-align":"center"}).on("click",function(){d.showInput(a);d[a+"Input"].focus()}).add(v);v.offset+=n.width+(w?10:0);this[a+"Input"]=x=t("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:g.plotTop+"px"},p);r.css(h(l,q.labelStyle));n.css(h({color:"#333333"},l,q.inputStyle));B(x,b({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:l.fontSize,fontFamily:l.fontFamily,top:"-9999em"},q.inputStyle));x.onfocus=function(){d.showInput(a)};x.onblur=
function(){d.hideInput(a)};x.onchange=c;x.onkeypress=function(a){13===a.keyCode&&c()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a="top"===b.verticalAlign?a.plotTop-a.axisOffset[0]:0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}},getYTDExtremes:function(a,b,d){var c=this.chart.time,e=new c.Date(a),k=c.get("FullYear",e);d=d?c.Date.UTC(k,0,1):+new c.Date(k,0,1);b=Math.max(b||0,d);e=e.getTime();return{max:Math.min(a||e,e),min:b}},render:function(a,b){var c=
this,e=c.chart,d=e.renderer,f=e.container,h=e.options,p=h.exporting&&!1!==h.exporting.enabled&&h.navigation&&h.navigation.buttonOptions,m=D.lang,l=c.div,n=h.rangeSelector,h=n.floating,q=c.buttons,l=c.inputGroup,r=n.buttonTheme,u=n.buttonPosition,y=n.inputPosition,B=n.inputEnabled,z=r&&r.states,C=e.plotLeft,E,M=c.buttonGroup,Q;Q=c.rendered;var R=c.options.verticalAlign,G=e.legend,T=G&&G.options,U=u.y,S=y.y,V=Q||!1,P=0,N=0,O;if(!1!==n.enabled){Q||(c.group=Q=d.g("range-selector-group").attr({zIndex:7}).add(),
c.buttonGroup=M=d.g("range-selector-buttons").add(Q),c.zoomText=d.text(m.rangeSelectorZoom,g(C+u.x,C),15).css(n.labelStyle).add(M),E=g(C+u.x,C)+c.zoomText.getBBox().width+5,v(c.buttonOptions,function(a,b){q[b]=d.button(a.text,E,0,function(){var e=a.events&&a.events.click,d;e&&(d=e.call(a));!1!==d&&c.clickButton(b);c.isActive=!0},r,z&&z.hover,z&&z.select,z&&z.disabled).attr({"text-align":"center"}).add(M);E+=q[b].width+g(n.buttonSpacing,5)}),!1!==B&&(c.div=l=t("div",null,{position:"relative",height:0,
zIndex:1}),f.parentNode.insertBefore(l,f),c.inputGroup=l=d.g("input-group").add(Q),l.offset=0,c.drawInput("min"),c.drawInput("max")));C=e.plotLeft-e.spacing[3];c.updateButtonStates();p&&this.titleCollision(e)&&"top"===R&&"right"===u.align&&u.y+M.getBBox().height-12<(p.y||0)+p.height&&(P=-40);"left"===u.align?O=u.x-e.spacing[3]:"right"===u.align&&(O=u.x+P-e.spacing[1]);M.align({y:u.y,width:M.getBBox().width,align:u.align,x:O},!0,e.spacingBox);c.group.placed=V;c.buttonGroup.placed=V;!1!==B&&(P=p&&this.titleCollision(e)&&
"top"===R&&"right"===y.align&&y.y-l.getBBox().height-12<(p.y||0)+p.height+e.spacing[0]?-40:0,"left"===y.align?O=C:"right"===y.align&&(O=-Math.max(e.axisOffset[1],-P)),l.align({y:y.y,width:l.getBBox().width,align:y.align,x:y.x+O-2},!0,e.spacingBox),f=l.alignAttr.translateX+l.alignOptions.x-P+l.getBBox().x+2,p=l.alignOptions.width,m=M.alignAttr.translateX+M.getBBox().x,O=M.getBBox().width+20,(y.align===u.align||m+O>f&&f+p>m&&U<S+l.getBBox().height)&&l.attr({translateX:l.alignAttr.translateX+(e.axisOffset[1]>=
-P?0:-P),translateY:l.alignAttr.translateY+M.getBBox().height+10}),c.setInputValue("min",a),c.setInputValue("max",b),c.inputGroup.placed=V);c.group.align({verticalAlign:R},!0,e.spacingBox);a=c.group.getBBox().height+20;b=c.group.alignAttr.translateY;"bottom"===R&&(G=T&&"bottom"===T.verticalAlign&&T.enabled&&!T.floating?G.legendHeight+g(T.margin,10):0,a=a+G-20,N=b-a-(h?0:n.y)-10);if("top"===R)h&&(N=0),e.titleOffset&&(N=e.titleOffset+e.options.title.margin),N+=e.margin[0]-e.spacing[0]||0;else if("middle"===
R)if(S===U)N=0>S?b+void 0:b;else if(S||U)N=0>S||0>U?N-Math.min(S,U):b-a+NaN;c.group.translate(n.x,n.y+Math.floor(N));!1!==B&&(c.minInput.style.marginTop=c.group.translateY+"px",c.maxInput.style.marginTop=c.group.translateY+"px");c.rendered=!0}},getHeight:function(){var a=this.options,b=this.group,d=a.y,f=a.buttonPosition.y,a=a.inputPosition.y,b=b?b.getBBox(!0).height+13+d:0,d=Math.min(a,f);if(0>a&&0>f||0<a&&0<f)b+=Math.abs(d);return b},titleCollision:function(a){return!(a.options.title.text||a.options.subtitle.text)},
update:function(a){var b=this.chart;h(!0,b.options.rangeSelector,a);this.destroy();this.init(b);b.rangeSelector.render()},destroy:function(){var b=this,e=b.minInput,d=b.maxInput;b.unMouseDown();b.unResize();n(b.buttons);e&&(e.onfocus=e.onblur=e.onchange=null);d&&(d.onfocus=d.onblur=d.onchange=null);a.objectEach(b,function(a,c){a&&"chart"!==c&&(a.destroy?a.destroy():a.nodeType&&E(this[c]));a!==C.prototype[c]&&(b[c]=null)},this)}};z.prototype.toFixedRange=function(a,b,d,h){var c=this.chart&&this.chart.fixedRange;
a=g(d,this.translate(a,!0,!this.horiz));b=g(h,this.translate(b,!0,!this.horiz));d=c&&(b-a)/c;.7<d&&1.3>d&&(h?a=b-c:b=a+c);f(a)&&f(b)||(a=b=void 0);return{min:a,max:b}};z.prototype.minFromRange=function(){var a=this.range,b={month:"Month",year:"FullYear"}[a.type],d,h=this.max,l,m,n=function(a,c){var d=new Date(a),e=d["get"+b]();d["set"+b](e+c);e===d["get"+b]()&&d.setDate(0);return d.getTime()-a};f(a)?(d=h-a,m=a):(d=h+n(h,-a.count),this.chart&&(this.chart.fixedRange=h-d));l=g(this.dataMin,Number.MIN_VALUE);
f(d)||(d=l);d<=l&&(d=l,void 0===m&&(m=n(d,a.count)),this.newMax=Math.min(d+m,this.dataMax));f(h)||(d=void 0);return d};q(u.prototype,"init",function(a,b,d){y(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new C(this))});a.call(this,b,d)});q(u.prototype,"render",function(a,b,d){var c=this.axes,e=this.rangeSelector;e&&(v(c,function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),e.render(),c=e.options.verticalAlign,e.options.floating||("bottom"===c?this.extraBottomMargin=
!0:"middle"!==c&&(this.extraTopMargin=!0)));a.call(this,b,d)});q(u.prototype,"update",function(b,d,f,h){var c=this.rangeSelector,e;this.extraTopMargin=this.extraBottomMargin=!1;c&&(c.render(),e=d.rangeSelector&&d.rangeSelector.verticalAlign||c.options&&c.options.verticalAlign,c.options.floating||("bottom"===e?this.extraBottomMargin=!0:"middle"!==e&&(this.extraTopMargin=!0)));b.call(this,a.merge(!0,d,{chart:{marginBottom:g(d.chart&&d.chart.marginBottom,this.margin.bottom),spacingBottom:g(d.chart&&
d.chart.spacingBottom,this.spacing.bottom)}}),f,h)});q(u.prototype,"redraw",function(a,b,d){var c=this.rangeSelector;c&&!c.options.floating&&(c.render(),c=c.options.verticalAlign,"bottom"===c?this.extraBottomMargin=!0:"middle"!==c&&(this.extraTopMargin=!0));a.call(this,b,d)});u.prototype.adjustPlotArea=function(){var a=this.rangeSelector;this.rangeSelector&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))};u.prototype.callbacks.push(function(a){function b(){c=
a.xAxis[0].getExtremes();f(c.min)&&d.render(c.min,c.max)}var c,d=a.rangeSelector,g,h;d&&(h=y(a.xAxis[0],"afterSetExtremes",function(a){d.render(a.min,a.max)}),g=y(a,"redraw",b),b());y(a,"destroy",function(){d&&(g(),h())})});a.RangeSelector=C})(G);(function(a){var C=a.arrayMax,y=a.arrayMin,z=a.Axis,u=a.Chart,B=a.defined,t=a.each,D=a.extend,r=a.format,n=a.grep,E=a.inArray,v=a.isNumber,b=a.isString,d=a.map,f=a.merge,h=a.pick,g=a.Point,m=a.Renderer,l=a.Series,q=a.splat,c=a.SVGRenderer,e=a.VMLRenderer,
k=a.wrap,A=l.prototype,G=A.init,F=A.processData,L=g.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(c,e,g){var k=b(c)||c.nodeName,l=arguments[k?1:0],m=l.series,p=a.getOptions(),n,w=h(l.navigator&&l.navigator.enabled,p.navigator.enabled,!0),r=w?{startOnTick:!1,endOnTick:!1}:null,t={marker:{enabled:!1,radius:2}},x={shadow:!1,borderWidth:0};l.xAxis=d(q(l.xAxis||{}),function(a,b){return f({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},
p.xAxis,p.xAxis&&p.xAxis[b],a,{type:"datetime",categories:null},r)});l.yAxis=d(q(l.yAxis||{}),function(a,b){n=h(a.opposite,!0);return f({labels:{y:-2},opposite:n,showLastLabel:!(!a.categories&&"category"!==a.type),title:{text:null}},p.yAxis,p.yAxis&&p.yAxis[b],a)});l.series=null;l=f({chart:{panning:!0,pinchType:"x"},navigator:{enabled:w},scrollbar:{enabled:h(p.scrollbar.enabled,!0)},rangeSelector:{enabled:h(p.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:h(p.tooltip.split,!0),crosshairs:!0},
legend:{enabled:!1},plotOptions:{line:t,spline:t,area:t,areaspline:t,arearange:t,areasplinerange:t,column:x,columnrange:x,candlestick:x,ohlc:x}},l,{isStock:!0});l.series=m;return k?new u(c,l,g):new u(l,e)};k(z.prototype,"autoLabelAlign",function(a){var b=this.chart,c=this.options,b=b._labelPanes=b._labelPanes||{},d=this.options.labels;return this.chart.options.isStock&&"yAxis"===this.coll&&(c=c.top+","+c.height,!b[c]&&d.enabled)?(15===d.x&&(d.x=0),void 0===d.align&&(d.align="right"),b[c]=this,"right"):
a.apply(this,[].slice.call(arguments,1))});k(z.prototype,"destroy",function(a){var b=this.chart,c=this.options&&this.options.top+","+this.options.height;c&&b._labelPanes&&b._labelPanes[c]===this&&delete b._labelPanes[c];return a.apply(this,Array.prototype.slice.call(arguments,1))});k(z.prototype,"getPlotLinePath",function(c,e,f,g,k,l){var p=this,m=this.isLinked&&!this.series?this.linkedParent.series:this.series,n=p.chart,q=n.renderer,w=p.left,r=p.top,u,x,y,z,A=[],C=[],H,D;if("xAxis"!==p.coll&&"yAxis"!==
p.coll)return c.apply(this,[].slice.call(arguments,1));C=function(a){var c="xAxis"===a?"yAxis":"xAxis";a=p.options[c];return v(a)?[n[c][a]]:b(a)?[n.get(a)]:d(m,function(a){return a[c]})}(p.coll);t(p.isXAxis?n.yAxis:n.xAxis,function(a){if(B(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=B(a.options[b])?n[b][a.options[b]]:n[b][0];p===b&&C.push(a)}});H=C.length?[]:[p.isXAxis?n.yAxis[0]:n.xAxis[0]];t(C,function(b){-1!==E(b,H)||a.find(H,function(a){return a.pos===
b.pos&&a.len&&b.len})||H.push(b)});D=h(l,p.translate(e,null,null,g));v(D)&&(p.horiz?t(H,function(a){var b;x=a.pos;z=x+a.len;u=y=Math.round(D+p.transB);if(u<w||u>w+p.width)k?u=y=Math.min(Math.max(w,u),w+p.width):b=!0;b||A.push("M",u,x,"L",y,z)}):t(H,function(a){var b;u=a.pos;y=u+a.len;x=z=Math.round(r+p.height-D);if(x<r||x>r+p.height)k?x=z=Math.min(Math.max(r,x),p.top+p.height):b=!0;b||A.push("M",u,x,"L",y,z)}));return 0<A.length?q.crispPolyLine(A,f||1):null});c.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};m===e&&(e.prototype.crispPolyLine=c.prototype.crispPolyLine);k(z.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});k(z.prototype,"drawCrosshair",function(a,b,c){var d,e;a.call(this,b,c);if(B(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,p=f.format,n="",q="inside"===this.options.tickPosition,t=!1!==this.crosshair.snap,w=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(D({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},f.style)));g?(m=t?c.plotX+e:b.chartX,k+=d?0:this.height):(m=d?this.width+e:0,k=t?c.plotY+k:b.chartY);p||f.formatter||(this.isDatetimeAxis&&(n="%b %d, %Y"),p="{value"+(n?":"+n:"")+"}");b=t?c[this.isXAxis?"x":"y"]:this.toValue(g?
b.chartX:b.chartY);l.attr({text:p?r(p,{value:b},a.time):f.formatter.call(this,b),x:m,y:k,visibility:b<this.min||b>this.max?"hidden":"visible"});b=l.getBBox();if(g){if(q&&!d||!q&&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&&(w=d-l.translateX);l.translateX+b.width>=e&&(w=-(l.translateX+b.width-e));l.attr({x:m+w,y:k,anchorX:g?m:this.opposite?0:a.chartWidth,anchorY:g?this.opposite?
a.chartHeight:0:k+b.height/2})}});A.init=function(){G.apply(this,arguments);this.setCompare(this.options.compare)};A.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,c){var d=this.compareValue;if(void 0!==b&&void 0!==d)return b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};A.processData=function(){var a,b=-1,c,d,e=!0===this.options.compareStart?0:1,f,g;F.apply(this,
arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,f=d.length,this.pointArrayMap&&(b=E("close",this.pointArrayMap),-1===b&&(b=E(this.pointValKey||"y",this.pointArrayMap))),a=0;a<f-e;a++)if(g=d[a]&&-1<b?d[a][b]:d[a],v(g)&&c[a+e]>=this.xAxis.min&&0!==g){this.compareValue=g;break}};k(A,"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=y(b),
this.dataMax=C(b))});z.prototype.setCompare=function(a,b){this.isXAxis||(t(this.series,function(b){b.setCompare(a)}),h(b,!0)&&this.chart.redraw())};g.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",(0<this.change?"+":"")+a.numberFormat(this.change,h(this.series.tooltipOptions.changeDecimals,2)));return L.apply(this,[b])};k(l.prototype,"render",function(a){this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(!this.clipBox&&this.animate?(this.clipBox=
f(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len):this.chart[this.sharedClipKey]?this.chart[this.sharedClipKey].attr({width:this.xAxis.len,height:this.yAxis.len}):this.clipBox&&(this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len));a.call(this)});k(u.prototype,"getSelectedPoints",function(a){var b=a.call(this);t(this.series,function(a){a.hasGroupedData&&(b=b.concat(n(a.points||[],function(a){return a.selected})))});return b});k(u.prototype,
"update",function(a,b){"scrollbar"in b&&this.navigator&&(f(!0,this.options.scrollbar,b.scrollbar),this.navigator.update({},!1),delete b.scrollbar);return a.apply(this,Array.prototype.slice.call(arguments,1))})})(G)});
