/*
 Highcharts JS v6.1.0 (2018-04-13)
 Highstock as a plugin for Highcharts

 (c) 2017 Torstein Honsi

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