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