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