/*
 Highcharts JS v5.0.11 (2017-05-04)
 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 E=a.addEvent,k=a.Axis,t=a.Chart,z=a.css,F=a.dateFormat,H=a.defined,I=a.each,w=a.extend,h=a.noop,q=a.timeUnits,G=a.wrap;G(a.Series.prototype,"init",function(a){var b;a.apply(this,Array.prototype.slice.call(arguments,1));(b=this.xAxis)&&b.options.ordinal&&E(this,"updatedData",function(){delete b.ordinalIndex})});G(k.prototype,"getTimeTicks",function(a,b,d,u,A,l,h,g){var r=0,e,x,c={},f,
m,B,n=[],v=-Number.MAX_VALUE,y=this.options.tickPixelInterval;if(!this.options.ordinal&&!this.options.breaks||!l||3>l.length||void 0===d)return a.call(this,b,d,u,A);m=l.length;for(e=0;e<m;e++){B=e&&l[e-1]>u;l[e]<d&&(r=e);if(e===m-1||l[e+1]-l[e]>5*h||B){if(l[e]>v){for(x=a.call(this,b,l[r],l[e],A);x.length&&x[0]<=v;)x.shift();x.length&&(v=x[x.length-1]);n=n.concat(x)}r=e+1}if(B)break}a=x.info;if(g&&a.unitRange<=q.hour){e=n.length-1;for(r=1;r<e;r++)F("%d",n[r])!==F("%d",n[r-1])&&(c[n[r]]="day",f=!0);
f&&(c[n[0]]="day");a.higherRanks=c}n.info=a;if(g&&H(y)){g=a=n.length;e=[];var D;for(f=[];g--;)r=this.translate(n[g]),D&&(f[g]=D-r),e[g]=D=r;f.sort();f=f[Math.floor(f.length/2)];f<.6*y&&(f=null);g=n[a-1]>u?a-1:a;for(D=void 0;g--;)r=e[g],u=Math.abs(D-r),D&&u<.8*y&&(null===f||u<.8*f)?(c[n[g]]&&!c[n[g+1]]?(u=g+1,D=r):u=g,n.splice(u,1)):D=r}return n});w(k.prototype,{beforeSetTickPositions:function(){var a,b=[],d=!1,u,A=this.getExtremes(),l=A.min,h=A.max,g,r=this.isXAxis&&!!this.options.breaks,A=this.options.ordinal,
C=this.chart.options.chart.ignoreHiddenSeries;if(A||r){I(this.series,function(g,c){if(!(C&&!1===g.visible||!1===g.takeOrdinalPosition&&!r)&&(b=b.concat(g.processedXData),a=b.length,b.sort(function(f,c){return f-c}),a))for(c=a-1;c--;)b[c]===b[c+1]&&b.splice(c,1)});a=b.length;if(2<a){u=b[1]-b[0];for(g=a-1;g--&&!d;)b[g+1]-b[g]!==u&&(d=!0);!this.options.keepOrdinalPadding&&(b[0]-l>u||h-b[b.length-1]>u)&&(d=!0)}d?(this.ordinalPositions=b,u=this.ordinal2lin(Math.max(l,b[0]),!0),g=Math.max(this.ordinal2lin(Math.min(h,
b[b.length-1]),!0),1),this.ordinalSlope=h=(h-l)/(g-u),this.ordinalOffset=l-u*h):this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0}this.isOrdinal=A&&d;this.groupIntervalFactor=null},val2lin:function(a,b){var d=this.ordinalPositions;if(d){var u=d.length,e,l;for(e=u;e--;)if(d[e]===a){l=e;break}for(e=u-1;e--;)if(a>d[e]||0===e){a=(a-d[e])/(d[e+1]-d[e]);l=e+a;break}b=b?l:this.ordinalSlope*(l||0)+this.ordinalOffset}else b=a;return b},lin2val:function(a,b){var d=this.ordinalPositions;if(d){var e=
this.ordinalSlope,h=this.ordinalOffset,l=d.length-1,p;if(b)0>a?a=d[0]:a>l?a=d[l]:(l=Math.floor(a),p=a-l);else for(;l--;)if(b=e*l+h,a>=b){e=e*(l+1)+h;p=(a-b)/(e-b);break}return void 0!==p&&void 0!==d[l]?d[l]+(p?p*(d[l+1]-d[l]):0):a}return a},getExtendedPositions:function(){var a=this.chart,b=this.series[0].currentDataGrouping,d=this.ordinalIndex,u=b?b.count+b.unitName:"raw",A=this.getExtremes(),l,p;d||(d=this.ordinalIndex={});d[u]||(l={series:[],chart:a,getExtremes:function(){return{min:A.dataMin,
max:A.dataMax}},options:{ordinal:!0},val2lin:k.prototype.val2lin,ordinal2lin:k.prototype.ordinal2lin},I(this.series,function(g){p={xAxis:l,xData:g.xData,chart:a,destroyGroupedData:h};p.options={dataGrouping:b?{enabled:!0,forced:!0,approximation:"open",units:[[b.unitName,[b.count]]]}:{enabled:!1}};g.processData.apply(p);l.series.push(p)}),this.beforeSetTickPositions.apply(l),d[u]=l.ordinalPositions);return d[u]},getGroupIntervalFactor:function(a,b,d){var e;d=d.processedXData;var h=d.length,l=[];e=
this.groupIntervalFactor;if(!e){for(e=0;e<h-1;e++)l[e]=d[e+1]-d[e];l.sort(function(a,g){return a-g});l=l[Math.floor(h/2)];a=Math.max(a,d[0]);b=Math.min(b,d[h-1]);this.groupIntervalFactor=e=h*l/(b-a)}return e},postProcessTickInterval:function(a){var b=this.ordinalSlope;return b?this.options.breaks?this.closestPointRange:a/(b/this.closestPointRange):a}});k.prototype.ordinal2lin=k.prototype.val2lin;G(t.prototype,"pan",function(a,b){var d=this.xAxis[0],e=b.chartX,h=!1;if(d.options.ordinal&&d.series.length){var l=
this.mouseDownX,p=d.getExtremes(),g=p.dataMax,r=p.min,C=p.max,x=this.hoverPoints,c=d.closestPointRange,l=(l-e)/(d.translationSlope*(d.ordinalSlope||c)),f={ordinalPositions:d.getExtendedPositions()},c=d.lin2val,m=d.val2lin,B;f.ordinalPositions?1<Math.abs(l)&&(x&&I(x,function(n){n.setState()}),0>l?(x=f,B=d.ordinalPositions?d:f):(x=d.ordinalPositions?d:f,B=f),f=B.ordinalPositions,g>f[f.length-1]&&f.push(g),this.fixedRange=C-r,l=d.toFixedRange(null,null,c.apply(x,[m.apply(x,[r,!0])+l,!0]),c.apply(B,[m.apply(B,
[C,!0])+l,!0])),l.min>=Math.min(p.dataMin,r)&&l.max<=Math.max(g,C)&&d.setExtremes(l.min,l.max,!0,!1,{trigger:"pan"}),this.mouseDownX=e,z(this.container,{cursor:"move"})):h=!0}else h=!0;h&&a.apply(this,Array.prototype.slice.call(arguments,1))})})(K);(function(a){function E(){return Array.prototype.slice.call(arguments,1)}function k(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,t(this.pointArrayMap,["y"]))}var t=a.pick,z=a.wrap,F=a.each,H=a.extend,I=a.isArray,w=a.fireEvent,
h=a.Axis,q=a.Series;H(h.prototype,{isInBreak:function(a,e){var b=a.repeat||Infinity,d=a.from,h=a.to-a.from;e=e>=d?(e-d)%b:b-(d-e)%b;return a.inclusive?e<=h:e<h&&0!==e},isInAnyBreak:function(a,e){var b=this.options.breaks,d=b&&b.length,h,A,l;if(d){for(;d--;)this.isInBreak(b[d],a)&&(h=!0,A||(A=t(b[d].showPoints,this.isXAxis?!1:!0)));l=h&&e?h&&!A:h}return l}});z(h.prototype,"setTickPositions",function(a){a.apply(this,Array.prototype.slice.call(arguments,1));if(this.options.breaks){var e=this.tickPositions,
b=this.tickPositions.info,d=[],h;for(h=0;h<e.length;h++)this.isInAnyBreak(e[h])||d.push(e[h]);this.tickPositions=d;this.tickPositions.info=b}});z(h.prototype,"init",function(a,e,b){var d=this;b.breaks&&b.breaks.length&&(b.ordinal=!1);a.call(this,e,b);a=this.options.breaks;d.isBroken=I(a)&&!!a.length;d.isBroken&&(d.val2lin=function(a){var b=a,e,h;for(h=0;h<d.breakArray.length;h++)if(e=d.breakArray[h],e.to<=a)b-=e.len;else if(e.from>=a)break;else if(d.isInBreak(e,a)){b-=a-e.from;break}return b},d.lin2val=
function(a){var b,e;for(e=0;e<d.breakArray.length&&!(b=d.breakArray[e],b.from>=a);e++)b.to<a?a+=b.len:d.isInBreak(b,a)&&(a+=b.len);return a},d.setExtremes=function(a,b,d,e,g){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(b);)b-=this.closestPointRange;h.prototype.setExtremes.call(this,a,b,d,e,g)},d.setAxisTranslation=function(a){h.prototype.setAxisTranslation.call(this,a);a=d.options.breaks;var b=[],e=[],p=0,g,r,C=d.userMin||d.min,x=d.userMax||d.max,c=t(d.pointRangePadding,
0),f,m;F(a,function(f){r=f.repeat||Infinity;d.isInBreak(f,C)&&(C+=f.to%r-C%r);d.isInBreak(f,x)&&(x-=x%r-f.from%r)});F(a,function(c){f=c.from;for(r=c.repeat||Infinity;f-r>C;)f-=r;for(;f<C;)f+=r;for(m=f;m<x;m+=r)b.push({value:m,move:"in"}),b.push({value:m+(c.to-c.from),move:"out",size:c.breakSize})});b.sort(function(f,n){return f.value===n.value?("in"===f.move?0:1)-("in"===n.move?0:1):f.value-n.value});g=0;f=C;F(b,function(c){g+="in"===c.move?1:-1;1===g&&"in"===c.move&&(f=c.value);0===g&&(e.push({from:f,
to:c.value,len:c.value-f-(c.size||0)}),p+=c.value-f-(c.size||0))});d.breakArray=e;d.unitLength=x-C-p+c;w(d,"afterBreaks");d.options.staticScale?d.transA=d.options.staticScale:d.unitLength&&(d.transA*=(x-d.min+c)/d.unitLength);c&&(d.minPixelPadding=d.transA*d.minPointOffset);d.min=C;d.max=x})});z(q.prototype,"generatePoints",function(a){a.apply(this,E(arguments));var e=this.xAxis,b=this.yAxis,d=this.points,h,q=d.length,l=this.options.connectNulls,p;if(e&&b&&(e.options.breaks||b.options.breaks))for(;q--;)h=
d[q],p=null===h.y&&!1===l,p||!e.isInAnyBreak(h.x,!0)&&!b.isInAnyBreak(h.y,!0)||(d.splice(q,1),this.data[q]&&this.data[q].destroyElements())});a.Series.prototype.drawBreaks=function(a,e){var b=this,d=b.points,h,q,l,p;a&&F(e,function(g){h=a.breakArray||[];q=a.isXAxis?a.min:t(b.options.threshold,a.min);F(d,function(b){p=t(b["stack"+g.toUpperCase()],b[g]);F(h,function(g){l=!1;if(q<g.from&&p>g.to||q>g.from&&p<g.from)l="pointBreak";else if(q<g.from&&p>g.from&&p<g.to||q>g.from&&p>g.to&&p<g.from)l="pointInBreak";
l&&w(a,l,{point:b,brk:g})})})})};a.Series.prototype.gappedPath=function(){var a=this.options.gapSize,e=this.points.slice(),b=e.length-1;if(a&&0<b)for(;b--;)e[b+1].x-e[b].x>this.closestPointRange*a&&e.splice(b+1,0,{isNull:!0});return this.getGraphPath(e)};z(a.seriesTypes.column.prototype,"drawPoints",k);z(a.Series.prototype,"drawPoints",k)})(K);(function(a){var E=a.arrayMax,k=a.arrayMin,t=a.Axis,z=a.defaultPlotOptions,F=a.defined,H=a.each,I=a.extend,w=a.format,h=a.isNumber,q=a.merge,G=a.pick,e=a.Point,
b=a.Tooltip,d=a.wrap,u=a.Series.prototype,A=u.processData,l=u.generatePoints,p=u.destroy,g={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"]}},r={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]],x={sum:function(c){var f=c.length,a;if(!f&&c.hasNulls)a=null;else if(f)for(a=0;f--;)a+=c[f];return a},average:function(c){var f=c.length;c=x.sum(c);h(c)&&f&&(c/=f);return c},averages:function(){var c=[];H(arguments,function(f){c.push(x.average(f))});return c},open:function(c){return c.length?c[0]:c.hasNulls?null:void 0},high:function(c){return c.length?E(c):c.hasNulls?null:void 0},low:function(c){return c.length?
k(c):c.hasNulls?null:void 0},close:function(c){return c.length?c[c.length-1]:c.hasNulls?null:void 0},ohlc:function(c,f,a,g){c=x.open(c);f=x.high(f);a=x.low(a);g=x.close(g);if(h(c)||h(f)||h(a)||h(g))return[c,f,a,g]},range:function(c,f){c=x.low(c);f=x.high(f);if(h(c)||h(f))return[c,f]}};u.groupData=function(c,f,a,b){var n=this.data,v=this.options.data,m=[],d=[],B=[],e=c.length,J,M,l=!!f,C=[];b="function"===typeof b?b:x[b]||r[this.type]&&x[r[this.type].approximation]||x[g.approximation];var L=this.pointArrayMap,
q=L&&L.length,p=0;M=0;var u,k;q?H(L,function(){C.push([])}):C.push([]);u=q||1;for(k=0;k<=e&&!(c[k]>=a[0]);k++);for(k;k<=e;k++){for(;void 0!==a[p+1]&&c[k]>=a[p+1]||k===e;){J=a[p];this.dataGroupInfo={start:M,length:C[0].length};M=b.apply(this,C);void 0!==M&&(m.push(J),d.push(M),B.push(this.dataGroupInfo));M=k;for(J=0;J<u;J++)C[J].length=0,C[J].hasNulls=!1;p+=1;if(k===e)break}if(k===e)break;if(L){J=this.cropStart+k;var G=n&&n[J]||this.pointClass.prototype.applyOptions.apply({series:this},[v[J]]),w;for(J=
0;J<q;J++)w=G[L[J]],h(w)?C[J].push(w):null===w&&(C[J].hasNulls=!0)}else J=l?f[k]:null,h(J)?C[0].push(J):null===J&&(C[0].hasNulls=!0)}return[m,d,B]};u.processData=function(){var c=this.chart,f=this.options.dataGrouping,a=!1!==this.allowDG&&f&&G(f.enabled,c.options.isStock),g=this.visible||!c.options.chart.ignoreHiddenSeries,n;this.forceCrop=a;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==A.apply(this,arguments)&&a){this.destroyGroupedData();var v=this.processedXData,y=this.processedYData,
b=c.plotSizeX,c=this.xAxis,d=c.options.ordinal,r=this.groupPixelWidth=c.getGroupPixelWidth&&c.getGroupPixelWidth();if(r){this.isDirty=n=!0;var e=c.getExtremes(),a=e.min,e=e.max,d=d&&c.getGroupIntervalFactor(a,e,this)||1,b=r*(e-a)/b*d,r=c.getTimeTicks(c.normalizeTimeTickInterval(b,f.units||C),Math.min(a,v[0]),Math.max(e,v[v.length-1]),c.options.startOfWeek,v,this.closestPointRange),v=u.groupData.apply(this,[v,y,r,f.approximation]),y=v[0],d=v[1];if(f.smoothed){f=y.length-1;for(y[f]=Math.min(y[f],e);f--&&
0<f;)y[f]+=b/2;y[0]=Math.max(y[0],a)}this.currentDataGrouping=r.info;this.closestPointRange=r.info.totalRange;this.groupMap=v[2];F(y[0])&&y[0]<c.dataMin&&g&&(c.min===c.dataMin&&(c.min=y[0]),c.dataMin=y[0]);this.processedXData=y;this.processedYData=d}else this.currentDataGrouping=this.groupMap=null;this.hasGroupedData=n}};u.destroyGroupedData=function(){var c=this.groupedData;H(c||[],function(f,a){f&&(c[a]=f.destroy?f.destroy():null)});this.groupedData=null};u.generatePoints=function(){l.apply(this);
this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};d(e.prototype,"update",function(c){this.dataGroup?a.error(24):c.apply(this,[].slice.call(arguments,1))});d(b.prototype,"tooltipFooterHeaderFormatter",function(c,f,g){var m=f.series,n=m.tooltipOptions,v=m.options.dataGrouping,y=n.xDateFormat,b,d=m.xAxis,r=a.dateFormat;return d&&"datetime"===d.options.type&&v&&h(f.key)?(c=m.currentDataGrouping,v=v.dateTimeLabelFormats,c?(d=v[c.unitName],1===c.count?y=d[0]:(y=d[1],b=d[2])):
!y&&v&&(y=this.getXDateFormat(f,n,d)),y=r(y,f.key),b&&(y+=r(b,f.key+c.totalRange-1)),w(n[(g?"footer":"header")+"Format"],{point:I(f.point,{key:y}),series:m})):c.call(this,f,g)});u.destroy=function(){for(var c=this.groupedData||[],f=c.length;f--;)c[f]&&c[f].destroy();p.apply(this)};d(u,"setOptions",function(c,f){c=c.call(this,f);var a=this.type,b=this.chart.options.plotOptions,n=z[a].dataGrouping;r[a]&&(n||(n=q(g,r[a])),c.dataGrouping=q(n,b.series&&b.series.dataGrouping,b[a].dataGrouping,f.dataGrouping));
this.chart.options.isStock&&(this.requireSorting=!0);return c});d(t.prototype,"setScale",function(c){c.call(this);H(this.series,function(c){c.hasProcessed=!1})});t.prototype.getGroupPixelWidth=function(){var c=this.series,a=c.length,g,b=0,n=!1,v;for(g=a;g--;)(v=c[g].options.dataGrouping)&&(b=Math.max(b,v.groupPixelWidth));for(g=a;g--;)(v=c[g].options.dataGrouping)&&c[g].hasProcessed&&(a=(c[g].processedXData||c[g].data).length,c[g].groupPixelWidth||a>this.chart.plotSizeX/b||a&&v.forced)&&(n=!0);return n?
b:0};t.prototype.setDataGrouping=function(a,f){var c;f=G(f,!0);a||(a={forced:!1,units:null});if(this instanceof t)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else H(this.chart.options.series,function(c){c.dataGrouping=a},!1);f&&this.chart.redraw()}})(K);(function(a){var E=a.each,k=a.Point,t=a.seriesType,z=a.seriesTypes;t("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\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},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"close",translate:function(){var a=this,k=a.yAxis,t=!!a.modifyValue,w=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];z.column.prototype.translate.apply(a);E(a.points,function(h){E([h.open,h.high,h.low,h.close,h.low],function(q,G){null!==q&&(t&&(q=a.modifyValue(q)),h[w[G]]=k.toPixels(q,!0))});h.tooltipPos[1]=h.plotHigh+k.pos-a.chart.plotTop})},drawPoints:function(){var a=
this,k=a.chart;E(a.points,function(t){var w,h,q,G,e=t.graphic,b,d=!e;void 0!==t.plotY&&(e||(t.graphic=e=k.renderer.path().add(a.group)),h=e.strokeWidth()%2/2,b=Math.round(t.plotX)-h,q=Math.round(t.shapeArgs.width/2),G=["M",b,Math.round(t.yBottom),"L",b,Math.round(t.plotHigh)],null!==t.open&&(w=Math.round(t.plotOpen)+h,G.push("M",b,w,"L",b-q,w)),null!==t.close&&(w=Math.round(t.plotClose)+h,G.push("M",b,w,"L",b+q,w)),e[d?"attr":"animate"]({d:G}).addClass(t.getClassName(),!0))})},animate:null},{getClassName:function(){return k.prototype.getClassName.call(this)+
(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(K);(function(a){var E=a.defaultPlotOptions,k=a.each,t=a.merge;a=a.seriesType;a("candlestick","ohlc",t(E.column,{states:{hover:{lineWidth:2}},tooltip:E.ohlc.tooltip,threshold:null}),{drawPoints:function(){var a=this,t=a.chart;k(a.points,function(k){var z=k.graphic,w,h,q,G,e,b,d,u=!z;void 0!==k.plotY&&(z||(k.graphic=z=t.renderer.path().add(a.group)),e=z.strokeWidth()%2/2,b=Math.round(k.plotX)-e,w=k.plotOpen,h=k.plotClose,q=
Math.min(w,h),w=Math.max(w,h),d=Math.round(k.shapeArgs.width/2),h=Math.round(q)!==Math.round(k.plotHigh),G=w!==k.yBottom,q=Math.round(q)+e,w=Math.round(w)+e,e=[],e.push("M",b-d,w,"L",b-d,q,"L",b+d,q,"L",b+d,w,"Z","M",b,q,"L",b,h?Math.round(k.plotHigh):q,"M",b,w,"L",b,G?Math.round(k.yBottom):w),z[u?"attr":"animate"]({d:e}).addClass(k.getClassName(),!0))})}})})(K);(function(a){var E=a.addEvent,k=a.each,t=a.noop,z=a.seriesType,F=a.seriesTypes,H=a.TrackerMixin,I=a.SVGRenderer.prototype.symbols,w=a.stableSort;
z("flags","column",{pointRange:0,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}\x3cbr/\x3e"},threshold:null,y:-30},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:a.Series.prototype.init,translate:function(){F.column.prototype.translate.apply(this);var a=this.options,q=this.chart,t=this.points,e=t.length-1,b,d,u=a.onSeries;b=u&&q.get(u);var a=a.onKey||"y",u=b&&b.options.step,A=b&&b.points,l=A&&A.length,
p=this.xAxis,g=this.yAxis,r=p.getExtremes(),C=0,x,c,f;if(b&&b.visible&&l)for(C=(b.pointXOffset||0)+(b.barW||0)/2,b=b.currentDataGrouping,c=A[l-1].x+(b?b.totalRange:0),w(t,function(a,c){return a.x-c.x}),a="plot"+a[0].toUpperCase()+a.substr(1);l--&&t[e]&&!(b=t[e],x=A[l],x.x<=b.x&&void 0!==x[a]&&(b.x<=c&&(b.plotY=x[a],x.x<b.x&&!u&&(f=A[l+1])&&void 0!==f[a]&&(b.plotY+=(b.x-x.x)/(f.x-x.x)*(f[a]-x[a]))),e--,l++,0>e)););k(t,function(a,c){var n;void 0===a.plotY&&(a.x>=r.min&&a.x<=r.max?a.plotY=q.chartHeight-
p.bottom-(p.opposite?p.height:0)+p.offset-g.top:a.shapeArgs={});a.plotX+=C;(d=t[c-1])&&d.plotX===a.plotX&&(void 0===d.stackIndex&&(d.stackIndex=0),n=d.stackIndex+1);a.stackIndex=n})},drawPoints:function(){var h=this.points,q=this.chart,k=q.renderer,e,b,d=this.options,t=d.y,w,l,p,g,r,C,x,c=this.yAxis;for(l=h.length;l--;)p=h[l],x=p.plotX>this.xAxis.len,e=p.plotX,g=p.stackIndex,w=p.options.shape||d.shape,b=p.plotY,void 0!==b&&(b=p.plotY+t-(void 0!==g&&g*d.stackDistance)),r=g?void 0:p.plotX,C=g?void 0:
p.plotY,g=p.graphic,void 0!==b&&0<=e&&!x?(g||(g=p.graphic=k.label("",null,null,w,null,null,d.useHTML).attr({align:"flag"===w?"left":"center",width:d.width,height:d.height,"text-align":d.textAlign}).addClass("highcharts-point").add(this.markerGroup),p.graphic.div&&(p.graphic.div.point=p)),0<e&&(e-=g.strokeWidth()%2),g.attr({text:p.options.title||d.title||"A",x:e,y:b,anchorX:r,anchorY:C}),p.tooltipPos=q.inverted?[c.len+c.pos-q.plotLeft-b,this.xAxis.len-e]:[e,b+c.pos-q.plotTop]):g&&(p.graphic=g.destroy());
d.useHTML&&a.wrap(this.markerGroup,"on",function(c){return a.SVGElement.prototype.on.apply(c.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var a=this.points;H.drawTrackerPoint.apply(this);k(a,function(h){var q=h.graphic;q&&E(q.element,"mouseover",function(){0<h.stackIndex&&!h.raised&&(h._y=q.y,q.attr({y:h._y-8}),h.raised=!0);k(a,function(a){a!==h&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:t,buildKDTree:t,setClip:t});I.flag=
function(a,q,k,e,b){return["M",b&&b.anchorX||a,b&&b.anchorY||q,"L",a,q+e,a,q,a+k,q,a+k,q+e,a,q+e,"Z"]};k(["circle","square"],function(a){I[a+"pin"]=function(h,k,e,b,d){var q=d&&d.anchorX;d=d&&d.anchorY;"circle"===a&&b>e&&(h-=Math.round((b-e)/2),e=b);h=I[a](h,k,e,b);q&&d&&h.push("M",q,k>d?k:k+b,"L",q,d);return h}})})(K);(function(a){function E(a,b,d){this.init(a,b,d)}var k=a.addEvent,t=a.Axis,z=a.correctFloat,F=a.defaultOptions,H=a.defined,I=a.destroyObjectProperties,w=a.doc,h=a.each,q=a.fireEvent,
G=a.hasTouch,e=a.isTouchDevice,b=a.merge,d=a.pick,u=a.removeEvent,A=a.wrap,l,p={height:e?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!e,margin:10,minWidth:6,step:.2,zIndex:3};F.scrollbar=b(!0,p,F.scrollbar);a.swapXY=l=function(a,b){var g=a.length,d;if(b)for(b=0;b<g;b+=3)d=a[b+1],a[b+1]=a[b+2],a[b+2]=d;return a};E.prototype={init:function(a,r,e){this.scrollbarButtons=[];this.renderer=a;this.userOptions=r;this.options=b(p,r);this.chart=e;this.size=d(this.options.size,this.options.height);
r.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,b=this.options,d=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:d,width:d}).add(e);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:d,
width:d,r:b.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(l(["M",-3,d/4,"L",-3,2*d/3,"M",0,d/4,"L",0,2*d/3,"M",3,d/4,"L",3,2*d/3],b.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);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,d,e){var c=this.options.vertical,f=0,g=
this.rendered?"animate":"attr";this.x=a;this.y=b+this.trackBorderWidth;this.width=d;this.xOffset=this.height=e;this.yOffset=f;c?(this.width=this.yOffset=d=f=this.size,this.xOffset=b=0,this.barWidth=e-2*d,this.x=a+=this.options.margin):(this.height=this.xOffset=e=b=this.size,this.barWidth=d-2*e,this.y+=this.options.margin);this.group[g]({translateX:a,translateY:this.y});this.track[g]({width:d,height:e});this.scrollbarButtons[1][g]({translateX:c?0:d-b,translateY:c?e-f:0})},drawScrollbarButton:function(a){var g=
this.renderer,b=this.scrollbarButtons,d=this.options,c=this.size,f;f=g.g().add(this.group);b.push(f);f=g.rect().addClass("highcharts-scrollbar-button").add(f);f.attr(f.crisp({x:-.5,y:-.5,width:c+1,height:c+1,r:d.buttonBorderRadius},f.strokeWidth()));g.path(l(["M",c/2+(a?-1:1),c/2-3,"L",c/2+(a?-1:1),c/2+3,"L",c/2+(a?2:-2),c/2],d.vertical)).addClass("highcharts-scrollbar-arrow").add(b[a])},setRange:function(a,b){var g=this.options,d=g.vertical,c=g.minWidth,f=this.barWidth,m,e,n=this.rendered&&!this.hasDragged?
"animate":"attr";H(f)&&(a=Math.max(a,0),m=Math.ceil(f*a),this.calculatedWidth=e=z(f*Math.min(b,1)-m),e<c&&(m=(f-c+e)*a,e=c),c=Math.floor(m+this.xOffset+this.yOffset),f=e/2-.5,this.from=a,this.to=b,d?(this.scrollbarGroup[n]({translateY:c}),this.scrollbar[n]({height:e}),this.scrollbarRifles[n]({translateY:f}),this.scrollbarTop=c,this.scrollbarLeft=0):(this.scrollbarGroup[n]({translateX:c}),this.scrollbar[n]({width:e}),this.scrollbarRifles[n]({translateX:f}),this.scrollbarLeft=c,this.scrollbarTop=0),
12>=e?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===g.showFull&&(0>=a&&1<=b?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=this;a.mouseMoveHandler=function(b){var d=a.chart.pointer.normalize(b),e=a.options.vertical?"chartY":"chartX",c=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][e]||(d=a.cursorToScrollbarPosition(d)[e],e=a[e],e=d-e,a.hasDragged=!0,a.updatePosition(c[0]+e,c[1]+e),a.hasDragged&&q(a,"changed",{from:a.from,to:a.to,
trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=function(b){b=a.chart.pointer.normalize(b);b=a.cursorToScrollbarPosition(b);a.chartX=b.chartX;a.chartY=b.chartY;a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(b){var d=z(a.to-a.from)*a.options.step;a.updatePosition(z(a.from-
d),z(a.to-d));q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.buttonToMaxClick=function(b){var d=(a.to-a.from)*a.options.step;a.updatePosition(a.from+d,a.to+d);q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.trackClick=function(b){var d=a.chart.pointer.normalize(b),e=a.to-a.from,c=a.y+a.scrollbarTop,f=a.x+a.scrollbarLeft;a.options.vertical&&d.chartY>c||!a.options.vertical&&d.chartX>f?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-e,a.to-e);
q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})}},cursorToScrollbarPosition:function(a){var b=this.options,b=b.minWidth>this.calculatedWidth?b.minWidth:0;return{chartX:(a.chartX-this.x-this.xOffset)/(this.barWidth-b),chartY:(a.chartY-this.y-this.yOffset)/(this.barWidth-b)}},updatePosition:function(a,b){1<b&&(a=z(1-z(b-a)),b=1);0>a&&(b=z(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,d=this.scrollbarGroup.element,e=this.mouseDownHandler,c=this.mouseMoveHandler,f=this.mouseUpHandler,a=[[b[a[0]].element,"click",this.buttonToMinClick],[b[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[d,"mousedown",e],[w,"mousemove",c],[w,"mouseup",f]];G&&a.push([d,"touchstart",e],[w,"touchmove",c],[w,"touchend",f]);h(a,function(a){k.apply(null,a)});this._events=a},removeEvents:function(){h(this._events,
function(a){u.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();h(["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,I(a.scrollbarButtons))}};A(t.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 E(b.chart.renderer,b.options.scrollbar,b.chart),k(b.scrollbar,"changed",function(a){var e=Math.min(d(b.options.min,b.min),b.min,b.dataMin),c=Math.max(d(b.options.max,b.max),b.max,b.dataMax)-e,f;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(f=e+c*this.to,e+=c*this.from):(f=e+c*(1-this.from),e+=c*(1-this.to));b.setExtremes(e,f,!0,!1,a)}))});A(t.prototype,"render",function(a){var b=Math.min(d(this.options.min,this.min),this.min,this.dataMin),
e=Math.max(d(this.options.max,this.max),this.max,this.dataMax),g=this.scrollbar,c=this.titleOffset||0;a.apply(this,Array.prototype.slice.call(arguments,1));if(g){this.horiz?(g.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:c+this.axisTitleMargin+this.offset),this.width,this.height),c=1):(g.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?c+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),c=0);if(!this.opposite&&
!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[c]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(b)||isNaN(e)||!H(this.min)||!H(this.max)?g.setRange(0,0):(c=(this.min-b)/(e-b),b=(this.max-b)/(e-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?g.setRange(c,b):g.setRange(1-b,1-c))}});A(t.prototype,"getOffset",function(a){var b=this.horiz?2:1,d=this.scrollbar;a.apply(this,Array.prototype.slice.call(arguments,1));d&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[b]+=
d.size+d.options.margin)});A(t.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());a.apply(this,Array.prototype.slice.call(arguments,1))});a.Scrollbar=E})(K);(function(a){function E(a){this.init(a)}var k=a.addEvent,t=a.Axis,z=a.Chart,F=a.defaultOptions,H=a.defined,I=a.destroyObjectProperties,w=a.doc,h=a.each,q=a.erase,G=a.error,e=a.extend,b=a.grep,d=a.hasTouch,u=a.isNumber,A=a.isObject,l=a.merge,p=a.pick,g=a.removeEvent,r=a.Scrollbar,C=a.Series,x=a.seriesTypes,
c=a.wrap,f=a.swapXY,m=[].concat(a.defaultDataGroupingUnits),B=function(a){var n=b(arguments,u);if(n.length)return Math[a].apply(0,n)};m[4]=["day",[1,2,3,4]];m[5]=["week",[1,2,3]];e(F,{navigator:{height:40,margin:25,maskInside:!0,series:{type:void 0===x.areaspline?"line":"areaspline",compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:m},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,
marker:{enabled:!1},pointRange:0,shadow:!1,threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,tickPixelInterval:200,labels:{align:"left",x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});E.prototype={drawHandle:function(a,b,c,f){this.handles[b][f](c?{translateX:Math.round(this.left+this.height/2-8),translateY:Math.round(this.top+
parseInt(a,10)+.5)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-8)})},getHandlePath:function(a){return f(["M",-4.5,.5,"L",3.5,.5,"L",3.5,15.5,"L",-4.5,15.5,"L",-4.5,.5,"M",-1.5,4,"L",-1.5,12,"M",.5,4,"L",.5,12],a)},drawOutline:function(a,b,c,f){var n=this.navigatorOptions.maskInside,d=this.outline.strokeWidth(),v=d/2,d=d%2/2,e=this.outlineHeight,m=this.scrollbarHeight,y=this.size,D=this.left-m,g=this.top;c?(D-=v,c=g+b+d,b=g+a+d,a=["M",D+e,g-m-d,"L",
D+e,c,"L",D,c,"L",D,b,"L",D+e,b,"L",D+e,g+y+m].concat(n?["M",D+e,c-v,"L",D+e,b+v]:[])):(a+=D+m-d,b+=D+m-d,g+=v,a=["M",D,g,"L",a,g,"L",a,g+e,"L",b,g+e,"L",b,g,"L",D+y+2*m,g].concat(n?["M",a-v,g,"L",b+v,g]:[]));this.outline[f]({d:a})},drawMasks:function(a,b,c,f){var n=this.left,d=this.top,v=this.height,e,m,y,D;c?(y=[n,n,n],D=[d,d+a,d+b],m=[v,v,v],e=[a,b-a,this.size-b]):(y=[n,n+a,n+b],D=[d,d,d],m=[a,b-a,this.size-b],e=[v,v,v]);h(this.shades,function(a,b){a[f]({x:y[b],y:D[b],width:m[b],height:e[b]})})},
renderElements:function(){var a=this,b=a.navigatorOptions.maskInside,c=a.chart,f=c.inverted,d=c.renderer,e;a.navigatorGroup=e=d.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();h([!b,b,!b],function(b,n){a.shades[n]=d.rect().addClass("highcharts-navigator-mask"+(1===n?"-inside":"-outside")).add(e)});a.outline=d.path().addClass("highcharts-navigator-outline").add(e);h([0,1],function(b){a.handles[b]=d.path(a.getHandlePath(f)).attr({zIndex:7-b}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+
["left","right"][b]).add(e)})},update:function(a){this.destroy();l(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,b,c,f){var n=this.chart,d,e,v=this.scrollbarHeight,m,y=this.xAxis;d=y.fake?n.xAxis[0]:y;var g=this.navigatorEnabled,D,B=this.rendered;e=n.inverted;var h=n.xAxis[0].minRange;if(!this.hasDragged||H(c)){if(!u(a)||!u(b))if(B)c=0,f=y.width;else return;this.left=p(y.left,n.plotLeft+v+(e?n.plotWidth:0));this.size=D=m=p(y.len,(e?n.plotHeight:n.plotWidth)-
2*v);n=e?v:m+2*v;c=p(c,y.toPixels(a,!0));f=p(f,y.toPixels(b,!0));u(c)&&Infinity!==Math.abs(c)||(c=0,f=n);a=y.toValue(c,!0);b=y.toValue(f,!0);if(Math.abs(b-a)<h)if(this.grabbedLeft)c=y.toPixels(b-h,!0);else if(this.grabbedRight)f=y.toPixels(a+h,!0);else return;this.zoomedMax=Math.min(Math.max(c,f,0),D);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(c,f),0),D);this.range=this.zoomedMax-this.zoomedMin;D=Math.round(this.zoomedMax);c=Math.round(this.zoomedMin);
g&&(this.navigatorGroup.attr({visibility:"visible"}),B=B&&!this.hasDragged?"animate":"attr",this.drawMasks(c,D,e,B),this.drawOutline(c,D,e,B),this.drawHandle(c,0,e,B),this.drawHandle(D,1,e,B));this.scrollbar&&(e?(e=this.top-v,d=this.left-v+(g?0:(d.titleOffset||0)+d.axisTitleMargin),v=m+2*v):(e=this.top+(g?this.height:-v),d=this.left-v),this.scrollbar.position(d,e,n,v),this.scrollbar.setRange(this.zoomedMin/m,this.zoomedMax/m));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,c=b.container,
f=[],e,m;a.mouseMoveHandler=e=function(b){a.onMouseMove(b)};a.mouseUpHandler=m=function(b){a.onMouseUp(b)};f=a.getPartsEvents("mousedown");f.push(k(c,"mousemove",e),k(w,"mouseup",m));d&&(f.push(k(c,"touchmove",e),k(w,"touchend",m)),f.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=f;a.series&&a.series[0]&&f.push(k(a.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,c=[];h(["shades","handles"],function(n){h(b[n],
function(f,d){c.push(k(f.element,a,function(a){b[n+"Mousedown"](a,d)}))})});return c},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var c=this.chart,f=this.xAxis,n=this.zoomedMin,d=this.left,e=this.size,v=this.range,m=a.chartX,g;c.inverted&&(m=a.chartY,d=this.top);1===b?(this.grabbedCenter=m,this.fixedWidth=v,this.dragOffset=m-n):(a=m-d-v/2,0===b?a=Math.max(0,a):2===b&&a+v>=e&&(a=e-v,g=this.getUnionExtremes().dataMax),a!==n&&(this.fixedWidth=v,b=f.toFixedRange(a,a+v,null,g),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],f=a.inverted&&!c.reversed||!a.inverted&&c.reversed;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=f?c.min:c.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=f?c.max:c.min);a.fixedRange=null},onMouseMove:function(a){var b=this,c=b.chart,f=b.left,n=b.navigatorSize,d=b.range,e=b.dragOffset,
m=c.inverted;a.touches&&0===a.touches[0].pageX||(a=c.pointer.normalize(a),c=a.chartX,m&&(f=b.top,c=a.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,c-f,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,c-f)):b.grabbedCenter&&(b.hasDragged=!0,c<e?c=e:c>n+e-d&&(c=n+e-d),b.render(0,0,c-e,c-e+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,c=this.xAxis,
f=this.scrollbar,n,d,e=a.DOMEvent||a;(!this.hasDragged||f&&f.hasDragged)&&"scrollbar"!==a.trigger||(this.zoomedMin===this.otherHandlePos?n=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(d=this.fixedExtreme),this.zoomedMax===this.size&&(d=this.getUnionExtremes().dataMax),c=c.toFixedRange(this.zoomedMin,this.zoomedMax,n,d),H(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),Math.max(c.min,c.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:e}));"mousemove"!==
a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(h(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&&(h(a,function(a){g(a,"updatedData",this.updatedDataHandler)},
this),a[0].xAxis&&g(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,f=b.navigator,d=f.enabled,e=b.scrollbar,n=e.enabled,b=d?f.height:0,m=n?e.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=m;this.scrollbarEnabled=n;this.navigatorEnabled=d;this.navigatorOptions=f;this.scrollbarOptions=e;this.outlineHeight=b+m;this.opposite=p(f.opposite,!d&&a.inverted);var g=this,e=g.baseSeries,n=a.xAxis.length,h=
a.yAxis.length,q=e&&e[0]&&e[0].xAxis||a.xAxis[0];a.extraMargin={type:g.opposite?"plotTop":"marginBottom",value:(d||!a.inverted?g.outlineHeight:0)+f.margin};a.inverted&&(a.extraMargin.type=g.opposite?"marginRight":"plotLeft");a.isDirtyBox=!0;g.navigatorEnabled?(g.xAxis=new t(a,l({breaks:q.options.breaks,ordinal:q.options.ordinal},f.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:n,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,
zoomEnabled:!1},a.inverted?{offsets:[m,0,-m,0],width:b}:{offsets:[0,-m,0,m],height:b})),g.yAxis=new t(a,l(f.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:h,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),e||f.series.data?g.addBaseSeries():0===a.series.length&&c(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 f=a.xAxis[0],d=f.getExtremes(),e=f.len-2*m,n=B("min",
f.options.min,d.dataMin),f=B("max",f.options.max,d.dataMax)-n;return c?b*f/e+n:e*(b-n)/f},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:t.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=g.scrollbar=new r(a.renderer,l(a.options.scrollbar,{margin:g.navigatorEnabled?0:10,vertical:a.inverted}),a),k(g.scrollbar,"changed",function(b){var c=g.size,f=c*this.to,c=c*this.from;g.hasDragged=g.scrollbar.hasDragged;g.render(0,
0,c,f);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType)&&setTimeout(function(){g.onMouseUp(b)})}));g.addBaseSeriesEvents();g.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],c=this.xAxis,f=c.options,d=b.options,e;a&&null===b.dataMin||(e={dataMin:p(f&&f.min,B("min",d.min,b.dataMin,c.dataMin,c.min)),dataMax:p(f&&f.max,B("max",d.max,b.dataMax,c.dataMax,c.max))});return e},setBaseSeries:function(a){var b=this.chart,c;a=a||b.options&&b.options.navigator.baseSeries||0;this.series&&
(this.removeBaseSeriesEvents(),h(this.series,function(a){a.destroy()}));c=this.baseSeries=[];h(b.series||[],function(b,f){(b.options.showInNavigator||(f===a||b.options.id===a)&&!1!==b.options.showInNavigator)&&c.push(b)});this.xAxis&&!this.xAxis.fake&&this.addBaseSeries()},addBaseSeries:function(){var a=this,b=a.chart,c=a.series=[],f=a.baseSeries,d,e,m=a.navigatorOptions.series,g,B={enableMouseTracking:!1,index:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,
stacking:!1,isInternal:!0,visible:!0};f?h(f,function(f,n){B.name="Navigator "+(n+1);d=f.options||{};g=d.navigatorOptions||{};e=l(d,B,m,g);n=g.data||m.data;a.hasNavigatorData=a.hasNavigatorData||!!n;e.data=n||d.data&&d.data.slice(0);f.navigatorSeries=b.initSeries(e);c.push(f.navigatorSeries)}):(e=l(m,B),e.data=m.data,a.hasNavigatorData=!!e.data,c.push(b.initSeries(e)));this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&k(b[0].xAxis,"foundExtremes",
this.modifyBaseAxisExtremes);!1!==this.navigatorOptions.adaptToUpdatedData&&h(b,function(b){b.xAxis&&k(b,"updatedData",this.updatedDataHandler);k(b,"remove",function(){this.navigatorSeries&&(q(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,f=b.dataMax,b=b.max-b.min,d=a.stickToMin,e=a.stickToMax,m,g,B=a.series&&a.series[0],h=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(d&&(g=c,m=g+b),e&&(m=f,d||(g=Math.max(m-b,B&&B.xData?B.xData[0]:-Number.MAX_VALUE))),h&&(d||e)&&u(g)&&(this.min=this.userMin=g,this.max=this.userMax=m));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries;a.stickToMin=
u(this.xAxis.min)&&this.xAxis.min<=this.xData[0];a.stickToMax=Math.round(a.zoomedMax)>=Math.round(a.size);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){k(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&&(q(this.chart.xAxis,this.xAxis),q(this.chart.axes,
this.xAxis));this.yAxis&&(q(this.chart.yAxis,this.yAxis),q(this.chart.axes,this.yAxis));h(this.series||[],function(a){a.destroy&&a.destroy()});h("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);h([this.handles],function(a){I(a)},this)}};a.Navigator=E;c(t.prototype,"zoom",function(a,b,c){var f=this.chart,d=f.options,e=d.chart.zoomType,m=d.navigator,
d=d.rangeSelector,n;this.isXAxis&&(m&&m.enabled||d&&d.enabled)&&("x"===e?f.resetZoomButton="blocked":"y"===e?n=!1:"xy"===e&&(f=this.previousZoom,H(b)?this.previousZoom=[this.min,this.max]:f&&(b=f[0],c=f[1],delete this.previousZoom)));return void 0!==n?n:a.call(this,b,c)});c(z.prototype,"init",function(a,b,c){k(this,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new E(this)});a.call(this,b,c)});c(z.prototype,"setChartSize",function(a){var b=
this.legend,c=this.navigator,f,d,e,m;a.apply(this,[].slice.call(arguments,1));c&&(d=b.options,e=c.xAxis,m=c.yAxis,f=c.scrollbarHeight,this.inverted?(c.left=c.opposite?this.chartWidth-f-c.height:this.spacing[3]+f,c.top=this.plotTop+f):(c.left=this.plotLeft+f,c.top=c.navigatorOptions.top||this.chartHeight-c.height-f-this.spacing[2]-("bottom"===d.verticalAlign&&d.enabled&&!d.floating?b.legendHeight+p(d.margin,10):0)),e&&m&&(this.inverted?e.options.left=m.options.left=c.left:e.options.top=m.options.top=
c.top,e.setAxisSize(),m.setAxisSize()))});c(C.prototype,"addPoint",function(a,b,c,f,d){var e=this.options.turboThreshold;e&&this.xData.length>e&&A(b,!0)&&this.chart.navigator&&G(20,!0);a.call(this,b,c,f,d)});c(z.prototype,"addSeries",function(a,b,c,f){a=a.call(this,b,!1,f);this.navigator&&this.navigator.setBaseSeries();p(c,!0)&&this.redraw();return a});c(C.prototype,"update",function(a,b,c){a.call(this,b,!1);this.chart.navigator&&this.chart.navigator.setBaseSeries();p(c,!0)&&this.chart.redraw()});
z.prototype.callbacks.push(function(a){var b=a.navigator;b&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))})})(K);(function(a){function E(a){this.init(a)}var k=a.addEvent,t=a.Axis,z=a.Chart,F=a.css,H=a.createElement,I=a.dateFormat,w=a.defaultOptions,h=w.global.useUTC,q=a.defined,G=a.destroyObjectProperties,e=a.discardElement,b=a.each,d=a.extend,u=a.fireEvent,A=a.Date,l=a.isNumber,p=a.merge,g=a.pick,r=a.pInt,C=a.splat,x=a.wrap;d(w,{rangeSelector:{buttonTheme:{"stroke-width":0,width:28,height:18,
padding:2,zIndex:7},height:35,inputPosition:{align:"right"}}});w.lang=p(w.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});E.prototype={clickButton:function(a,f){var c=this,d=c.chart,e=c.buttonOptions[a],v=d.xAxis[0],y=d.scroller&&d.scroller.getUnionExtremes()||v||{},D=y.dataMin,q=y.dataMax,p,r=v&&Math.round(Math.min(v.max,g(q,v.max))),u=e.type,w,y=e._range,x,L,z,A=e.dataGrouping;if(null!==D&&null!==q){d.fixedRange=y;A&&(this.forcedDataGrouping=!0,t.prototype.setDataGrouping.call(v||
{chart:this.chart},A,!1));if("month"===u||"year"===u)v?(u={range:e,max:r,dataMin:D,dataMax:q},p=v.minFromRange.call(u),l(u.newMax)&&(r=u.newMax)):y=e;else if(y)p=Math.max(r-y,D),r=Math.min(p+y,q);else if("ytd"===u)if(v)void 0===q&&(D=Number.MAX_VALUE,q=Number.MIN_VALUE,b(d.series,function(a){a=a.xData;D=Math.min(a[0],D);q=Math.max(a[a.length-1],q)}),f=!1),r=c.getYTDExtremes(q,D,h),p=x=r.min,r=r.max;else{k(d,"beforeRender",function(){c.clickButton(a)});return}else"all"===u&&v&&(p=D,r=q);c.setSelected(a);
v?v.setExtremes(p,r,g(f,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:e}):(w=C(d.options.xAxis)[0],z=w.range,w.range=y,L=w.min,w.min=x,k(d,"load",function(){w.range=z;w.min=L}))}},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 c=this,d=a.options.rangeSelector,
e=d.buttons||[].concat(c.defaultButtons),g=d.selected,h=function(){var a=c.minInput,b=c.maxInput;a&&a.blur&&u(a,"blur");b&&b.blur&&u(b,"blur")};c.chart=a;c.options=d;c.buttons=[];a.extraTopMargin=d.height;c.buttonOptions=e;this.unMouseDown=k(a.container,"mousedown",h);this.unResize=k(a,"resize",h);b(e,c.computeButtonRange);void 0!==g&&e[g]&&this.clickButton(g,!1);k(a,"load",function(){k(a.xAxis[0],"setExtremes",function(b){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==b.trigger&&"updatedData"!==
b.trigger&&c.forcedDataGrouping&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this.chart,f=a.xAxis[0],d=Math.round(f.max-f.min),e=!f.hasVisibleSeries,a=a.scroller&&a.scroller.getUnionExtremes()||f,g=a.dataMin,v=a.dataMax,a=this.getYTDExtremes(v,g,h),q=a.min,k=a.max,p=this.selected,r=l(p),u=this.options.allButtonsEnabled,t=this.buttons;b(this.buttonOptions,function(a,b){var c=a._range,m=a.type,n=a.count||1;a=t[b];var h=0;b=b===p;var B=c>v-g,l=c<f.minRange,y=!1,D=!1,c=c===d;
("month"===m||"year"===m)&&d>=864E5*{month:28,year:365}[m]*n&&d<=864E5*{month:31,year:366}[m]*n?c=!0:"ytd"===m?(c=k-q===d,y=!b):"all"===m&&(c=f.max-f.min>=v-g,D=!b&&r&&c);m=!u&&(B||l||D||e);c=b&&c||c&&!r&&!y;m?h=3:c&&(r=!0,h=2);a.state!==h&&a.setState(h)})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c},setInputValue:function(a,
b){var c=this.chart.options.rangeSelector,f=this[a+"Input"];q(b)&&(f.previousValue=f.HCTime,f.HCTime=b);f.value=I(c.inputEditDateFormat||"%Y-%m-%d",f.HCTime);this[a+"DateBox"].attr({text:I(c.inputDateFormat||"%b %e, %Y",f.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];F(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){F(this[a+"Input"],{border:0,width:"1px",height:"1px"});
this.setInputValue(a)},drawInput:function(a){function b(){var a=p.value,b=(g.inputDateParser||Date.parse)(a),f=d.xAxis[0],e=d.scroller&&d.scroller.xAxis?d.scroller.xAxis:f,m=e.dataMin,e=e.dataMax;b!==p.previousValue&&(p.previousValue=b,l(b)||(b=a.split("-"),b=Date.UTC(r(b[0]),r(b[1])-1,r(b[2]))),l(b)&&(h||(b+=6E4*(new Date).getTimezoneOffset()),k?b>c.maxInput.HCTime?b=void 0:b<m&&(b=m):b<c.minInput.HCTime?b=void 0:b>e&&(b=e),void 0!==b&&f.setExtremes(k?b:f.min,k?f.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}
var c=this,d=c.chart,e=d.renderer,g=d.options.rangeSelector,q=c.div,k="min"===a,p,u,t=this.inputGroup;this[a+"Label"]=u=e.label(w.lang[k?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(t);t.offset+=u.width+5;this[a+"DateBox"]=e=e.label("",t.offset).addClass("highcharts-range-input").attr({padding:2,width:g.inputBoxWidth||90,height:g.inputBoxHeight||17,stroke:g.inputBoxBorderColor||"#cccccc","stroke-width":1,"text-align":"center"}).on("click",
function(){c.showInput(a);c[a+"Input"].focus()}).add(t);t.offset+=e.width+(k?10:0);this[a+"Input"]=p=H("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:d.plotTop+"px"},q);p.onfocus=function(){c.showInput(a)};p.onblur=function(){c.hideInput(a)};p.onchange=b;p.onkeypress=function(a){13===a.keyCode&&b()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a=g((b.buttonPosition||{}).y,a.plotTop-a.axisOffset[0]-b.height);return{buttonTop:a,inputTop:a-10}},getYTDExtremes:function(a,
b,d){var c=new A(a),f=c[A.hcGetFullYear]();d=d?A.UTC(f,0,1):+new A(f,0,1);b=Math.max(b||0,d);c=c.getTime();return{max:Math.min(a||c,c),min:b}},render:function(a,f){var c=this,e=c.chart,n=e.renderer,h=e.container,l=e.options,k=l.exporting&&!1!==l.exporting.enabled&&l.navigation&&l.navigation.buttonOptions,p=l.rangeSelector,r=c.buttons,l=w.lang,t=c.div,t=c.inputGroup,u=p.buttonTheme,x=p.buttonPosition||{},z=p.inputEnabled,A=u&&u.states,C=e.plotLeft,E,G=this.getPosition(),F=c.group,I=c.rendered;!1!==
p.enabled&&(I||(c.group=F=n.g("range-selector-buttons").add(),c.zoomText=n.text(l.rangeSelectorZoom,g(x.x,C),15).css(p.labelStyle).add(F),E=g(x.x,C)+c.zoomText.getBBox().width+5,b(c.buttonOptions,function(a,b){r[b]=n.button(a.text,E,0,function(){c.clickButton(b);c.isActive=!0},u,A&&A.hover,A&&A.select,A&&A.disabled).attr({"text-align":"center"}).add(F);E+=r[b].width+g(p.buttonSpacing,5)}),!1!==z&&(c.div=t=H("div",null,{position:"relative",height:0,zIndex:1}),h.parentNode.insertBefore(t,h),c.inputGroup=
t=n.g("input-group").add(),t.offset=0,c.drawInput("min"),c.drawInput("max"))),c.updateButtonStates(),F[I?"animate":"attr"]({translateY:G.buttonTop}),!1!==z&&(t.align(d({y:G.inputTop,width:t.offset,x:k&&G.inputTop<(k.y||0)+k.height-e.spacing[0]?-40:0},p.inputPosition),!0,e.spacingBox),q(z)||(e=F.getBBox(),t[t.alignAttr.translateX<e.x+e.width+10?"hide":"show"]()),c.setInputValue("min",a),c.setInputValue("max",f)),c.rendered=!0)},update:function(a){var b=this.chart;p(!0,b.options.rangeSelector,a);this.destroy();
this.init(b)},destroy:function(){var b=this,f=b.minInput,d=b.maxInput;b.unMouseDown();b.unResize();G(b.buttons);f&&(f.onfocus=f.onblur=f.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!==E.prototype[c]&&(b[c]=null)},this)}};t.prototype.toFixedRange=function(a,b,d,e){var c=this.chart&&this.chart.fixedRange;a=g(d,this.translate(a,!0,!this.horiz));b=g(e,this.translate(b,!0,!this.horiz));d=c&&(b-a)/c;
.7<d&&1.3>d&&(e?a=b-c:b=a+c);l(a)||(a=b=void 0);return{min:a,max:b}};t.prototype.minFromRange=function(){var a=this.range,b={month:"Month",year:"FullYear"}[a.type],d,e=this.max,n,h,p=function(a,c){var d=new Date(a),f=d["get"+b]();d["set"+b](f+c);f===d["get"+b]()&&d.setDate(0);return d.getTime()-a};l(a)?(d=e-a,h=a):(d=e+p(e,-a.count),this.chart&&(this.chart.fixedRange=e-d));n=g(this.dataMin,Number.MIN_VALUE);l(d)||(d=n);d<=n&&(d=n,void 0===h&&(h=p(d,a.count)),this.newMax=Math.min(d+h,this.dataMax));
l(e)||(d=void 0);return d};x(z.prototype,"init",function(a,b,d){k(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new E(this))});a.call(this,b,d)});z.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();l(c.min)&&d.render(c.min,c.max)}var c,d=a.rangeSelector,e,g;d&&(g=k(a.xAxis[0],"afterSetExtremes",function(a){d.render(a.min,a.max)}),e=k(a,"redraw",b),b());k(a,"destroy",function(){d&&(e(),g())})});a.RangeSelector=E})(K);(function(a){var E=a.arrayMax,
k=a.arrayMin,t=a.Axis,z=a.Chart,F=a.defined,H=a.each,I=a.format,w=a.grep,h=a.inArray,q=a.isNumber,G=a.isString,e=a.map,b=a.merge,d=a.pick,u=a.Point,A=a.Series,l=a.splat,p=a.SVGRenderer,g=a.wrap,r=A.prototype,C=r.init,x=r.processData,c=u.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(c,g,h){var f=G(c)||c.nodeName,m=arguments[f?1:0],p=m.series,k=a.getOptions(),q,r=d(m.navigator&&m.navigator.enabled,k.navigator.enabled,!0),t=r?{startOnTick:!1,endOnTick:!1}:null,B={marker:{enabled:!1,radius:2}},
u={shadow:!1,borderWidth:0};m.xAxis=e(l(m.xAxis||{}),function(a){return b({minPadding:0,maxPadding:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},k.xAxis,a,{type:"datetime",categories:null},t)});m.yAxis=e(l(m.yAxis||{}),function(a){q=d(a.opposite,!0);return b({labels:{y:-2},opposite:q,showLastLabel:!1,title:{text:null}},k.yAxis,a)});m.series=null;m=b({chart:{panning:!0,pinchType:"x"},navigator:{enabled:r},scrollbar:{enabled:d(k.scrollbar.enabled,!0)},rangeSelector:{enabled:d(k.rangeSelector.enabled,
!0)},title:{text:null},tooltip:{shared:!0,crosshairs:!0},legend:{enabled:!1},plotOptions:{line:B,spline:B,area:B,areaspline:B,arearange:B,areasplinerange:B,column:u,columnrange:u,candlestick:u,ohlc:u}},m,{isStock:!0});m.series=p;return f?new z(c,m,h):new z(m,g)};g(t.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.call(this,[].slice.call(arguments,1))});g(t.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.call(this,Array.prototype.slice.call(arguments,1))});g(t.prototype,"getPlotLinePath",function(b,c,g,n,l,p){var f=this,m=this.isLinked&&!this.series?this.linkedParent.series:this.series,k=f.chart,r=k.renderer,t=
f.left,v=f.top,u,B,y,w,x=[],A=[],z,C;if("colorAxis"===f.coll)return b.apply(this,[].slice.call(arguments,1));A=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=f.options[b];return q(a)?[k[b][a]]:G(a)?[k.get(a)]:e(m,function(a){return a[b]})}(f.coll);H(f.isXAxis?k.yAxis:k.xAxis,function(a){if(F(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=F(a.options[b])?k[b][a.options[b]]:k[b][0];f===b&&A.push(a)}});z=A.length?[]:[f.isXAxis?k.yAxis[0]:k.xAxis[0]];H(A,function(b){-1!==
h(b,z)||a.find(z,function(a){return a.pos===b.pos&&a.len&&b.len})||z.push(b)});C=d(p,f.translate(c,null,null,n));q(C)&&(f.horiz?H(z,function(a){var b;B=a.pos;w=B+a.len;u=y=Math.round(C+f.transB);if(u<t||u>t+f.width)l?u=y=Math.min(Math.max(t,u),t+f.width):b=!0;b||x.push("M",u,B,"L",y,w)}):H(z,function(a){var b;u=a.pos;y=u+a.len;B=w=Math.round(v+f.height-C);if(B<v||B>v+f.height)l?B=w=Math.min(Math.max(v,B),f.top+f.height):b=!0;b||x.push("M",u,B,"L",y,w)}));return 0<x.length?r.crispPolyLine(x,g||1):
null});t.prototype.getPlotBandPath=function(a,b){b=this.getPlotLinePath(b,null,null,!0);a=this.getPlotLinePath(a,null,null,!0);var c=[],d;if(a&&b)if(a.toString()===b.toString())c=a,c.flat=!0;else for(d=0;d<a.length;d+=6)c.push("M",a[d+1],a[d+2],"L",a[d+4],a[d+5],b[d+4],b[d+5],b[d+1],b[d+2],"z");else c=null;return c};p.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};g(t.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});g(t.prototype,"drawCrosshair",function(a,b,c){var e,f;a.call(this,b,c);if(F(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){a=this.chart;var g=this.options.crosshair.label,h=this.horiz;e=this.opposite;f=this.left;var m=this.top,k=this.crossLabel,l,p=g.format,q="",t="inside"===this.options.tickPosition,r=!1!==this.crosshair.snap,u=0;b||(b=this.cross&&
this.cross.e);l=h?"center":e?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";k||(k=this.crossLabel=a.renderer.label(null,null,null,g.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:g.align||l,padding:d(g.padding,8),r:d(g.borderRadius,3),zIndex:2}).add(this.labelGroup));h?(l=r?c.plotX+f:b.chartX,m+=e?0:this.height):(l=e?this.width+f:0,m=r?c.plotY+m:b.chartY);p||g.formatter||(this.isDatetimeAxis&&
(q="%b %d, %Y"),p="{value"+(q?":"+q:"")+"}");b=r?c[this.isXAxis?"x":"y"]:this.toValue(h?b.chartX:b.chartY);k.attr({text:p?I(p,{value:b}):g.formatter.call(this,b),x:l,y:m,visibility:"visible"});b=k.getBBox();if(h){if(t&&!e||!t&&e)m=k.y-b.height}else m=k.y-b.height/2;h?(e=f-b.x,f=f+this.width-b.x):(e="left"===this.labelAlign?f:0,f="right"===this.labelAlign?f+this.width:a.chartWidth);k.translateX<e&&(u=e-k.translateX);k.translateX+b.width>=f&&(u=-(k.translateX+b.width-f));k.attr({x:l+u,y:m,anchorX:h?
l:this.opposite?0:a.chartWidth,anchorY:h?this.opposite?a.chartHeight:0:m+b.height/2})}});r.init=function(){C.apply(this,arguments);this.setCompare(this.options.compare)};r.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)};r.processData=function(){var a,b=
-1,c,d,e,g;x.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,e=d.length,this.pointArrayMap&&(b=h("close",this.pointArrayMap),-1===b&&(b=h(this.pointValKey||"y",this.pointArrayMap))),a=0;a<e-1;a++)if(g=d[a]&&-1<b?d[a][b]:d[a],q(g)&&c[a+1]>=this.xAxis.min&&0!==g){this.compareValue=g;break}};g(r,"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=k(b),this.dataMax=E(b))});t.prototype.setCompare=function(a,b){this.isXAxis||(H(this.series,function(b){b.setCompare(a)}),d(b,!0)&&this.chart.redraw())};u.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",(0<this.change?"+":"")+a.numberFormat(this.change,d(this.series.tooltipOptions.changeDecimals,2)));return c.apply(this,[b])};g(A.prototype,"render",function(a){this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(!this.clipBox&&this.animate?
(this.clipBox=b(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)});g(z.prototype,"getSelectedPoints",function(a){var b=a.call(this);H(this.series,function(a){a.hasGroupedData&&(b=b.concat(w(a.points||[],function(a){return a.selected})))});return b});
g(z.prototype,"update",function(a,c){"scrollbar"in c&&this.navigator&&(b(!0,this.options.scrollbar,c.scrollbar),this.navigator.update({},!1),delete c.scrollbar);return a.apply(this,Array.prototype.slice.call(arguments,1))})})(K)});
