/*
 Highcharts JS v5.0.7 (2017-01-17)
 Highstock as a plugin for Highcharts

 (c) 2017 Torstein Honsi

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