/*
 Highstock JS v10.2.1 (2022-08-29)

 Highcharts Stock as a plugin for Highcharts

 (c) 2010-2021 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/stock",["highcharts"],function(J){a(J);a.Highcharts=J;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function J(a,v,A,l){a.hasOwnProperty(v)||(a[v]=l.apply(null,A),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:v,module:a[v]}})))}a=a?a._modules:{};J(a,"Core/Axis/OrdinalAxis.js",
[a["Core/Axis/Axis.js"],a["Core/Globals.js"],a["Core/Series/Series.js"],a["Core/Utilities.js"]],function(a,v,A,l){var y=l.addEvent,r=l.correctFloat,D=l.css,t=l.defined,b=l.error,m=l.pick,d=l.timeUnits,C=[],k;(function(k){function E(f,e,c,p,n,h,u){void 0===n&&(n=[]);void 0===h&&(h=0);var w={},P=this.options.tickPixelInterval,Q=this.chart.time,B=[],G,z,g=0,x=[],k=-Number.MAX_VALUE;if(!this.options.ordinal&&!this.options.breaks||!n||3>n.length||"undefined"===typeof e)return Q.getTimeTicks.apply(Q,arguments);
var m=n.length;for(G=0;G<m;G++){var F=G&&n[G-1]>c;n[G]<e&&(g=G);if(G===m-1||n[G+1]-n[G]>5*h||F){if(n[G]>k){for(z=Q.getTimeTicks(f,n[g],n[G],p);z.length&&z[0]<=k;)z.shift();z.length&&(k=z[z.length-1]);B.push(x.length);x=x.concat(z)}g=G+1}if(F)break}if(z){z=z.info;if(u&&z.unitRange<=d.hour){G=x.length-1;for(g=1;g<G;g++)if(Q.dateFormat("%d",x[g])!==Q.dateFormat("%d",x[g-1])){w[x[g]]="day";var q=!0}q&&(w[x[0]]="day");z.higherRanks=w}z.segmentStarts=B;x.info=z}else b(12,!1,this.chart);if(u&&t(P)){z=x.length;
Q=[];g=[];G=void 0;for(q=z;q--;)B=this.translate(x[q]),G&&(g[q]=G-B),Q[q]=G=B;g.sort();g=g[Math.floor(g.length/2)];g<.6*P&&(g=null);q=x[z-1]>c?z-1:z;for(G=void 0;q--;)B=Q[q],z=Math.abs(G-B),G&&z<.8*P&&(null===g||z<.8*g)?(w[x[q]]&&!w[x[q+1]]?(z=q+1,G=B):z=q,x.splice(z,1)):G=B}return x}function L(f){var e=this.ordinal.positions;if(!e)return f;var c=e.length-1;if(0>f)f=e[0];else if(f>c)f=e[c];else{c=Math.floor(f);var p=f-c}return"undefined"!==typeof p&&"undefined"!==typeof e[c]?e[c]+(p?p*(e[c+1]-e[c]):
0):f}function K(f){var e=this.ordinal,c=e.positions;if(!c)return f;var p=(f-(this.old?this.old.min:this.min))*(this.old?this.old.transA:this.transA)+this.minPixelPadding;0<p&&p<this.left+this.len||(e.extendedOrdinalPositions||(e.extendedOrdinalPositions=e.getExtendedPositions()),c=e.extendedOrdinalPositions);if(c&&c.length){f=e.getIndexOfPoint(p,c);e=r(f%1);if(0<=f&&f<c.length-1)return c[Math.floor(f)]+e*(c[Math.ceil(f)]-c[Math.floor(f)]);e=c.length;p=c[0];c=c[e-1];var n=(c-p)/(e-1);return 0>f?p+
n*f:c+n*(f-e)}return f}function q(f,e){var c=k.Additions.findIndexOf(f,e,!0);return f[c]===e?c:c+(e-f[c])/(f[c+1]-f[c])}function a(){this.ordinal||(this.ordinal=new k.Additions(this))}function l(){this.isXAxis&&t(this.options.overscroll)&&this.max===this.dataMax&&(!this.chart.mouseIsDown||this.isInternal)&&(!this.eventArgs||this.eventArgs&&"navigator"!==this.eventArgs.trigger)&&(this.max+=this.options.overscroll,!this.isInternal&&t(this.userMin)&&(this.min+=this.options.overscroll))}function F(){this.horiz&&
!this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)}function M(){this.ordinal&&(this.ordinal.beforeSetTickPositions(),this.tickInterval=this.ordinal.postProcessTickInterval(this.tickInterval))}function g(f){var e=this.xAxis[0],c=e.options.overscroll,p=f.originalEvent.chartX,n=this.options.chart.panning,h=!1;if(n&&"y"!==n.type&&e.options.ordinal&&e.series.length){var u=this.mouseDownX,w=e.getExtremes(),P=w.dataMax,Q=w.min,B=w.max,G=this.hoverPoints,
z=e.closestPointRange||e.ordinal&&e.ordinal.overscrollPointsRange;u=(u-p)/(e.translationSlope*(e.ordinal.slope||z));z=e.ordinal.getExtendedPositions();z={ordinal:{positions:z,extendedOrdinalPositions:z}};var g=e.index2val,x=e.val2lin,d=void 0,q=d=void 0,k=void 0;z.ordinal.positions?1<Math.abs(u)&&(G&&G.forEach(function(h){h.setState()}),0>u?(q=z,k=e.ordinal.positions?e:z):(q=e.ordinal.positions?e:z,k=z),d=k.ordinal.positions,P>d[d.length-1]&&d.push(P),this.fixedRange=B-Q,d=e.navigatorAxis.toFixedRange(void 0,
void 0,g.apply(q,[x.apply(q,[Q,!0])+u]),g.apply(k,[x.apply(k,[B,!0])+u])),d.min>=Math.min(w.dataMin,Q)&&d.max<=Math.max(P,B)+c&&e.setExtremes(d.min,d.max,!0,!1,{trigger:"pan"}),this.mouseDownX=p,D(this.container,{cursor:"move"})):h=!0}else h=!0;h||n&&/y/.test(n.type)?c&&(e.max=e.dataMax+c):f.preventDefault()}function O(){var f=this.xAxis;f&&f.options.ordinal&&(delete f.ordinal.index,delete f.ordinal.extendedOrdinalPositions)}function x(f,e){var c=this.ordinal,p=c.positions,n=c.slope,h=c.extendedOrdinalPositions;
if(!p)return f;var u=p.length;if(p[0]<=f&&p[u-1]>=f)f=q(p,f);else{h||(h=c.getExtendedPositions&&c.getExtendedPositions(),c.extendedOrdinalPositions=h);if(!h||!h.length)return f;u=h.length;n||(n=(h[u-1]-h[0])/u);p=q(h,p[0]);f>=h[0]&&f<=h[u-1]?f=q(h,f)-p:f<h[0]?(f=h[0]-f,f=-p-f/n):(f-=h[u-1],f=f/n+u-p)}return e?f:n*(f||0)+c.offset}k.compose=function(f,e,c){if(-1===C.indexOf(f)){C.push(f);var p=f.prototype;p.getTimeTicks=E;p.index2val=L;p.lin2val=K;p.val2lin=x;p.ordinal2lin=p.val2lin;y(f,"afterInit",
a);y(f,"foundExtremes",l);y(f,"afterSetScale",F);y(f,"initialAxisTranslation",M)}-1===C.indexOf(c)&&(C.push(c),y(c,"pan",g));-1===C.indexOf(e)&&(C.push(e),y(e,"updatedData",O));return f};var I=function(){function f(e){this.index={};this.axis=e}f.prototype.beforeSetTickPositions=function(){var e=this.axis,c=e.ordinal,p=e.getExtremes(),n=p.min,h=p.max,u=e.isXAxis&&!!e.options.breaks;p=e.options.ordinal;var w=e.chart.options.chart.ignoreHiddenSeries,f,g,B=[],G=Number.MAX_VALUE,z=!1,x=!1,d=!1;if(p||u){var k=
0;e.series.forEach(function(h,c){f=[];0<c&&"highcharts-navigator-series"!==h.options.id&&(x=k!==h.processedXData[1]-h.processedXData[0]);k=h.processedXData[1]-h.processedXData[0];h.boosted&&(d=h.boosted);if(!(w&&!1===h.visible||!1===h.takeOrdinalPosition&&!u)&&(B=B.concat(h.processedXData),q=B.length,B.sort(function(h,c){return h-c}),G=Math.min(G,m(h.closestPointRange,G)),q)){for(c=0;c<q-1;)B[c]!==B[c+1]&&f.push(B[c+1]),c++;f[0]!==B[0]&&f.unshift(B[0]);B=f}});x&&d&&(B.pop(),B.shift());var q=B.length;
if(2<q){var b=B[1]-B[0];for(g=q-1;g--&&!z;)B[g+1]-B[g]!==b&&(z=!0);!e.options.keepOrdinalPadding&&(B[0]-n>b||h-B[B.length-1]>b)&&(z=!0)}else e.options.overscroll&&(2===q?G=B[1]-B[0]:1===q?(G=e.options.overscroll,B=[B[0],B[0]+G]):G=c.overscrollPointsRange);z||e.forceOrdinal?(e.options.overscroll&&(c.overscrollPointsRange=G,B=B.concat(c.getOverscrollPositions())),c.positions=B,b=e.ordinal2lin(Math.max(n,B[0]),!0),g=Math.max(e.ordinal2lin(Math.min(h,B[B.length-1]),!0),1),c.slope=h=(h-n)/(g-b),c.offset=
n-b*h):(c.overscrollPointsRange=m(e.closestPointRange,c.overscrollPointsRange),c.positions=e.ordinal.slope=c.offset=void 0)}e.isOrdinal=p&&z;c.groupIntervalFactor=null};f.findIndexOf=function(e,c,p){for(var n=0,h=e.length-1,u;n<h;)u=Math.ceil((n+h)/2),e[u]<=c?n=u:h=u-1;return e[n]===c?n:p?n:-1};f.prototype.getExtendedPositions=function(){var e=this,c=e.axis,p=c.constructor.prototype,n=c.chart,h=c.series[0].currentDataGrouping,u=h?h.count+h.unitName:"raw",w=c.options.overscroll,f=c.getExtremes(),g=
void 0,B=e.index;B||(B=e.index={});if(!B[u]){var G={series:[],chart:n,forceOrdinal:!1,getExtremes:function(){return{min:f.dataMin,max:f.dataMax+w}},getGroupPixelWidth:p.getGroupPixelWidth,getTimeTicks:p.getTimeTicks,options:{ordinal:!0},ordinal:{getGroupIntervalFactor:this.getGroupIntervalFactor},ordinal2lin:p.ordinal2lin,getIndexOfPoint:p.getIndexOfPoint,val2lin:p.val2lin};G.ordinal.axis=G;c.series.forEach(function(c){g={xAxis:G,xData:c.xData.slice(),chart:n,destroyGroupedData:v.noop,getProcessedData:A.prototype.getProcessedData,
applyGrouping:A.prototype.applyGrouping};g.xData=g.xData.concat(e.getOverscrollPositions());g.options={dataGrouping:h?{firstAnchor:"firstPoint",anchor:"middle",lastAnchor:"lastPoint",enabled:!0,forced:!0,approximation:"open",units:[[h.unitName,[h.count]]]}:{enabled:!1}};G.series.push(g);c.processData.apply(g)});g.closestPointRange!==g.basePointRange&&g.currentDataGrouping&&(G.forceOrdinal=!0);c.ordinal.beforeSetTickPositions.apply({axis:G});B[u]=G.ordinal.positions}return B[u]};f.prototype.getGroupIntervalFactor=
function(e,c,p){p=p.processedXData;var n=p.length,h=[];var u=this.groupIntervalFactor;if(!u){for(u=0;u<n-1;u++)h[u]=p[u+1]-p[u];h.sort(function(h,c){return h-c});h=h[Math.floor(n/2)];e=Math.max(e,p[0]);c=Math.min(c,p[n-1]);this.groupIntervalFactor=u=n*h/(c-e)}return u};f.prototype.getIndexOfPoint=function(e,c){var p=this.axis,n=this.positions?this.positions[0]:0,h=p.series[0].points&&p.series[0].points[0]&&p.series[0].points[0].plotX||p.minPixelPadding;1<p.series.length&&p.series.forEach(function(c){c.points&&
t(c.points[0])&&t(c.points[0].plotX)&&c.points[0].plotX<h&&(h=c.points[0].plotX)});e=(e-h)/(p.translationSlope*(this.slope||p.closestPointRange||this.overscrollPointsRange));return f.findIndexOf(c,n)+e};f.prototype.getOverscrollPositions=function(){var e=this.axis,c=e.options.overscroll,p=this.overscrollPointsRange,n=[],h=e.dataMax;if(t(p))for(;h<=e.dataMax+c;)h+=p,n.push(h);return n};f.prototype.postProcessTickInterval=function(e){var c=this.axis,p=this.slope;return p?c.options.breaks?c.closestPointRange||
e:e/(p/c.closestPointRange):e};return f}();k.Additions=I})(k||(k={}));return k});J(a,"Series/DataModifyComposition.js",[a["Core/Axis/Axis.js"],a["Core/Series/Point.js"],a["Core/Series/Series.js"],a["Core/Utilities.js"]],function(a,v,A,l){var y=v.prototype.tooltipFormatter,r=l.addEvent,D=l.arrayMax,t=l.arrayMin,b=l.correctFloat,m=l.defined,d=l.isArray,C=l.isNumber,k=l.isString,K=l.pick,E;(function(L){function a(e,c,p){this.isXAxis||(this.series.forEach(function(n){"compare"===e&&"boolean"!==typeof c?
n.setCompare(c,!1):"cumulative"!==e||k(c)||n.setCumulative(c,!1)}),K(p,!0)&&this.chart.redraw())}function q(e){var c=this,p=c.series.chart.numberFormatter,n=function(h){e=e.replace("{point."+h+"}",(0<c[h]&&"change"===h?"+":"")+p(c[h],K(c.series.tooltipOptions.changeDecimals,2)))};m(c.change)&&n("change");m(c.cumulativeSum)&&n("cumulativeSum");return y.apply(this,[e])}function E(){var e=this.options.compare;if("percent"===e||"value"===e||this.options.cumulative){var c=new f(this);"percent"===e||"value"===
e?c.initCompare(e):c.initCumulative()}this.dataModify=c}function l(e){e=e.dataExtremes;var c=e.activeYData;if(this.dataModify&&e){var p=void 0;this.options.compare?p=[this.dataModify.modifyValue(e.dataMin),this.dataModify.modifyValue(e.dataMax)]:this.options.cumulative&&d(c)&&2<=c.length&&(p=f.getCumulativeExtremes(c));p&&(e.dataMin=t(p),e.dataMax=D(p))}}function F(e,c){this.options.compare=this.userOptions.compare=e;this.update({},K(c,!0));!this.dataModify||"value"!==e&&"percent"!==e?this.points.forEach(function(c){delete c.change}):
this.dataModify.initCompare(e)}function M(){if(this.xAxis&&this.processedYData&&this.dataModify){var e=this.processedXData,c=this.processedYData,p=c.length,n=!0===this.options.compareStart?0:1,h=-1,u;this.pointArrayMap&&(h=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y"));for(u=0;u<p-n;u++){var w=c[u]&&-1<h?c[u][h]:c[u];if(C(w)&&0!==w&&e[u+n]>=(this.xAxis.min||0)){this.dataModify.compareValue=w;break}}}}function g(e,c){this.setModifier("compare",e,c)}function O(e,c){e=K(e,
!1);this.options.cumulative=this.userOptions.cumulative=e;this.update({},K(c,!0));this.dataModify?this.dataModify.initCumulative():this.points.forEach(function(c){delete c.cumulativeSum})}function x(e,c){this.setModifier("cumulative",e,c)}var I=[];L.compose=function(e,c,p){if(-1===I.indexOf(e)){I.push(e);var n=e.prototype;n.setCompare=F;n.setCumulative=O;r(e,"afterInit",E);r(e,"afterGetExtremes",l);r(e,"afterProcessData",M)}-1===I.indexOf(c)&&(I.push(c),c=c.prototype,c.setCompare=g,c.setModifier=
a,c.setCumulative=x);-1===I.indexOf(p)&&(I.push(p),p.prototype.tooltipFormatter=q);return e};var f=function(){function e(c){this.series=c}e.prototype.modifyValue=function(){return 0};e.getCumulativeExtremes=function(c){var e=Infinity,n=-Infinity;c.reduce(function(h,c){c=h+c;e=Math.min(e,c,h);n=Math.max(n,c,h);return c});return[e,n]};e.prototype.initCompare=function(c){this.modifyValue=function(e,n){null===e&&(e=0);var h=this.compareValue;return"undefined"!==typeof e&&"undefined"!==typeof h?(e="value"===
c?e-h:e/h*100-(100===this.series.options.compareBase?0:100),"undefined"!==typeof n&&(n=this.series.points[n])&&(n.change=e),e):0}};e.prototype.initCumulative=function(){this.modifyValue=function(c,e){null===c&&(c=0);if(void 0!==c&&void 0!==e){var n=0<e?this.series.points[e-1]:null;n&&n.cumulativeSum&&(c=b(n.cumulativeSum+c));if(e=this.series.points[e])e.cumulativeSum=c;return c}return 0}};return e}();L.Additions=f})(E||(E={}));"";return E});J(a,"Core/Axis/BrokenAxis.js",[a["Core/Axis/Stacking/StackItem.js"],
a["Core/Utilities.js"]],function(a,v){var A=v.addEvent,l=v.find,y=v.fireEvent,r=v.isArray,D=v.isNumber,t=v.pick,b;(function(b){function d(){"undefined"!==typeof this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)}function m(){this.brokenAxis&&this.brokenAxis.hasBreaks&&(this.options.ordinal=!1)}function k(){var d=this.brokenAxis;if(d&&d.hasBreaks){for(var q=this.tickPositions,g=this.tickPositions.info,k=[],x=0;x<q.length;x++)d.isInAnyBreak(q[x])||k.push(q[x]);this.tickPositions=k;this.tickPositions.info=
g}}function K(){this.brokenAxis||(this.brokenAxis=new N(this))}function E(){var d=this.options.connectNulls,q=this.points,g=this.xAxis,k=this.yAxis;if(this.isDirty)for(var x=q.length;x--;){var b=q[x],f=!(null===b.y&&!1===d)&&(g&&g.brokenAxis&&g.brokenAxis.isInAnyBreak(b.x,!0)||k&&k.brokenAxis&&k.brokenAxis.isInAnyBreak(b.y,!0));b.visible=f?!1:!1!==b.options.visible}}function L(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,t(this.pointArrayMap,["y"]))}function H(d,q){var g=this,k=
g.points,x,b,f,e;if(d&&d.brokenAxis&&d.brokenAxis.hasBreaks){var c=d.brokenAxis;q.forEach(function(p){x=c&&c.breakArray||[];b=d.isXAxis?d.min:t(g.options.threshold,d.min);k.forEach(function(c){e=t(c["stack"+p.toUpperCase()],c[p]);x.forEach(function(h){if(D(b)&&D(e)){f=!1;if(b<h.from&&e>h.to||b>h.from&&e<h.from)f="pointBreak";else if(b<h.from&&e>h.from&&e<h.to||b>h.from&&e>h.to&&e<h.from)f="pointInBreak";f&&y(d,f,{point:c,brk:h})}})})})}}function q(){var d=this.currentDataGrouping,q=d&&d.gapSize;d=
this.points.slice();var g=this.yAxis,b=this.options.gapSize,x=d.length-1,k;if(b&&0<x)for("value"!==this.options.gapUnit&&(b*=this.basePointRange),q&&q>b&&q>=this.basePointRange&&(b=q),k=void 0;x--;)k&&!1!==k.visible||(k=d[x+1]),q=d[x],!1!==k.visible&&!1!==q.visible&&(k.x-q.x>b&&(k=(q.x+k.x)/2,d.splice(x+1,0,{isNull:!0,x:k}),g.stacking&&this.options.stacking&&(k=g.stacking.stacks[this.stackKey][k]=new a(g,g.options.stackLabels,!1,k,this.stack),k.total=0)),k=q);return this.getGraphPath(d)}var R=[];
b.compose=function(b,a){-1===R.indexOf(b)&&(R.push(b),b.keepProps.push("brokenAxis"),A(b,"init",K),A(b,"afterInit",d),A(b,"afterSetTickPositions",k),A(b,"afterSetOptions",m));if(-1===R.indexOf(a)){R.push(a);var g=a.prototype;g.drawBreaks=H;g.gappedPath=q;A(a,"afterGeneratePoints",E);A(a,"afterRender",L)}return b};var N=function(){function d(d){this.hasBreaks=!1;this.axis=d}d.isInBreak=function(d,g){var b=d.repeat||Infinity,k=d.from,q=d.to-d.from;g=g>=k?(g-k)%b:b-(k-g)%b;return d.inclusive?g<=q:g<
q&&0!==g};d.lin2Val=function(b){var g=this.brokenAxis;g=g&&g.breakArray;if(!g||!D(b))return b;var k;for(k=0;k<g.length;k++){var q=g[k];if(q.from>=b)break;else q.to<b?b+=q.len:d.isInBreak(q,b)&&(b+=q.len)}return b};d.val2Lin=function(b){var g=this.brokenAxis;g=g&&g.breakArray;if(!g||!D(b))return b;var k=b,q;for(q=0;q<g.length;q++){var m=g[q];if(m.to<=b)k-=m.len;else if(m.from>=b)break;else if(d.isInBreak(m,b)){k-=b-m.from;break}}return k};d.prototype.findBreakAt=function(d,b){return l(b,function(b){return b.from<
d&&d<b.to})};d.prototype.isInAnyBreak=function(b,g){var q=this.axis,k=q.options.breaks||[],m=k.length,f;if(m&&D(b)){for(;m--;)if(d.isInBreak(k[m],b)){var e=!0;f||(f=t(k[m].showPoints,!q.isXAxis))}var c=e&&g?e&&!f:e}return c};d.prototype.setBreaks=function(b,k){var q=this,g=q.axis,m=r(b)&&!!b.length;g.isDirty=q.hasBreaks!==m;q.hasBreaks=m;g.options.breaks=g.userOptions.breaks=b;g.forceRedraw=!0;g.series.forEach(function(f){f.isDirty=!0});m||g.val2lin!==d.val2Lin||(delete g.val2lin,delete g.lin2val);
m&&(g.userOptions.ordinal=!1,g.lin2val=d.lin2Val,g.val2lin=d.val2Lin,g.setExtremes=function(f,e,c,p,n){if(q.hasBreaks){for(var h=this.options.breaks||[],u;u=q.findBreakAt(f,h);)f=u.to;for(;u=q.findBreakAt(e,h);)e=u.from;e<f&&(e=f)}g.constructor.prototype.setExtremes.call(this,f,e,c,p,n)},g.setAxisTranslation=function(){g.constructor.prototype.setAxisTranslation.call(this);q.unitLength=void 0;if(q.hasBreaks){var f=g.options.breaks||[],e=[],c=[],p=t(g.pointRangePadding,0),n=0,h,u=g.userMin||g.min,w=
g.userMax||g.max,b;f.forEach(function(c){h=c.repeat||Infinity;D(u)&&D(w)&&(d.isInBreak(c,u)&&(u+=c.to%h-u%h),d.isInBreak(c,w)&&(w-=w%h-c.from%h))});f.forEach(function(c){B=c.from;h=c.repeat||Infinity;if(D(u)&&D(w)){for(;B-h>u;)B-=h;for(;B<u;)B+=h;for(b=B;b<w;b+=h)e.push({value:b,move:"in"}),e.push({value:b+c.to-c.from,move:"out",size:c.breakSize})}});e.sort(function(h,c){return h.value===c.value?("in"===h.move?0:1)-("in"===c.move?0:1):h.value-c.value});var k=0;var B=u;e.forEach(function(h){k+="in"===
h.move?1:-1;1===k&&"in"===h.move&&(B=h.value);0===k&&D(B)&&(c.push({from:B,to:h.value,len:h.value-B-(h.size||0)}),n+=h.value-B-(h.size||0))});q.breakArray=c;D(u)&&D(w)&&D(g.min)&&(q.unitLength=w-u-n+p,y(g,"afterBreaks"),g.staticScale?g.transA=g.staticScale:q.unitLength&&(g.transA*=(w-g.min+p)/q.unitLength),p&&(g.minPixelPadding=g.transA*(g.minPointOffset||0)),g.min=u,g.max=w)}});t(k,!0)&&g.chart.redraw()};return d}();b.Additions=N})(b||(b={}));return b});J(a,"masters/modules/broken-axis.src.js",[a["Core/Globals.js"],
a["Core/Axis/BrokenAxis.js"]],function(a,v){v.compose(a.Axis,a.Series)});J(a,"Extensions/DataGrouping.js",[a["Core/Axis/Axis.js"],a["Core/Axis/DateTimeAxis.js"],a["Core/FormatUtilities.js"],a["Core/Globals.js"],a["Core/Series/Point.js"],a["Core/Series/Series.js"],a["Core/Tooltip.js"],a["Core/DefaultOptions.js"],a["Core/Utilities.js"]],function(a,v,A,l,y,r,D,t,b){var m=A.format,d=r.prototype;A=b.addEvent;var C=b.arrayMax,k=b.arrayMin,K=b.correctFloat,E=b.defined,L=b.error,H=b.extend,q=b.isNumber,R=
b.merge,N=b.pick,F=l.approximations={sum:function(f){var e=f.length;if(!e&&f.hasNulls)var c=null;else if(e)for(c=0;e--;)c+=f[e];return c},average:function(f){var e=f.length;f=F.sum(f);q(f)&&e&&(f=K(f/e));return f},averages:function(){var f=[];[].forEach.call(arguments,function(e){f.push(F.average(e))});return"undefined"===typeof f[0]?void 0:f},open:function(f){return f.length?f[0]:f.hasNulls?null:void 0},high:function(f){return f.length?C(f):f.hasNulls?null:void 0},low:function(f){return f.length?
k(f):f.hasNulls?null:void 0},close:function(f){return f.length?f[f.length-1]:f.hasNulls?null:void 0},hlc:function(f,e,c){f=F.high(f);e=F.low(e);c=F.close(c);if(q(f)||q(e)||q(c))return[f,e,c]},ohlc:function(f,e,c,p){f=F.open(f);e=F.high(e);c=F.low(c);p=F.close(p);if(q(f)||q(e)||q(c)||q(p))return[f,e,c,p]},range:function(f,e){f=F.low(f);e=F.high(e);if(q(f)||q(e))return[f,e];if(null===f&&null===e)return null}};b=function(f,e,c,p){var n=this,h=n.data,u=n.options&&n.options.data,w=[],g=[],d=[],b=f.length,
k=!!e,z=[],m=n.pointArrayMap,a=m&&m.length,L=["x"].concat(m||["y"]),x=this.options.dataGrouping&&this.options.dataGrouping.groupAll,K=0,H=0,C;p="function"===typeof p?p:F[p]?F[p]:F[n.getDGApproximation&&n.getDGApproximation()||"average"];a?m.forEach(function(){z.push([])}):z.push([]);var y=a||1;for(C=0;C<=b&&!(f[C]>=c[0]);C++);for(C;C<=b;C++){for(;"undefined"!==typeof c[K+1]&&f[C]>=c[K+1]||C===b;){var t=c[K];n.dataGroupInfo={start:x?H:n.cropStart+H,length:z[0].length};var l=p.apply(n,z);n.pointClass&&
!E(n.dataGroupInfo.options)&&(n.dataGroupInfo.options=R(n.pointClass.prototype.optionsToObject.call({series:n},n.options.data[n.cropStart+H])),L.forEach(function(h){delete n.dataGroupInfo.options[h]}));"undefined"!==typeof l&&(w.push(t),g.push(l),d.push(n.dataGroupInfo));H=C;for(t=0;t<y;t++)z[t].length=0,z[t].hasNulls=!1;K+=1;if(C===b)break}if(C===b)break;if(m){t=n.options.dataGrouping&&n.options.dataGrouping.groupAll?C:n.cropStart+C;l=h&&h[t]||n.pointClass.prototype.applyOptions.apply({series:n},
[u[t]]);var r=void 0;for(t=0;t<a;t++)r=l[m[t]],q(r)?z[t].push(r):null===r&&(z[t].hasNulls=!0)}else t=k?e[C]:null,q(t)?z[0].push(t):null===t&&(z[0].hasNulls=!0)}return{groupedXData:w,groupedYData:g,groupMap:d}};var M={approximations:F,groupData:b},g=d.generatePoints,O={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"]}},x={line:{},spline:{},area:{},areaspline:{},arearange:{},column:{groupPixelWidth:10},columnrange:{groupPixelWidth:10},candlestick:{groupPixelWidth:10},ohlc:{groupPixelWidth:5},hlc:{groupPixelWidth:5},heikinashi:{groupPixelWidth:10}},I=l.defaultDataGroupingUnits=[["millisecond",[1,
2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]];d.getDGApproximation=function(){return this.is("arearange")?"range":this.is("ohlc")?"ohlc":this.is("hlc")?"hlc":this.is("column")?"sum":"average"};d.groupData=b;d.applyGrouping=function(f){var e=this.chart,c=this.options.dataGrouping,p=!1!==this.allowDG&&c&&N(c.enabled,e.options.isStock),n=this.visible||!e.options.chart.ignoreHiddenSeries,
h,u=this.currentDataGrouping,w=!1;p&&!this.requireSorting&&(this.requireSorting=w=!0);f=!1===!(this.isCartesian&&!this.isDirty&&!this.xAxis.isDirty&&!this.yAxis.isDirty&&!f)||!p;w&&(this.requireSorting=!1);if(!f){this.destroyGroupedData();p=c.groupAll?this.xData:this.processedXData;var g=c.groupAll?this.yData:this.processedYData;f=e.plotSizeX;w=this.xAxis;var b=w.options.ordinal,B=this.groupPixelWidth;if(B&&p&&p.length){this.isDirty=h=!0;this.points=null;var k=w.getExtremes();var z=k.min;k=k.max;
b=b&&w.ordinal&&w.ordinal.getGroupIntervalFactor(z,k,this)||1;f=w.getTimeTicks(v.Additions.prototype.normalizeTimeTickInterval(B*(k-z)/f*b,c.units||I),Math.min(z,p[0]),Math.max(k,p[p.length-1]),w.options.startOfWeek,p,this.closestPointRange);B=d.groupData.apply(this,[p,g,f,c.approximation]);p=B.groupedXData;g=B.groupedYData;b=0;c&&c.smoothed&&p.length&&(c.firstAnchor="firstPoint",c.anchor="middle",c.lastAnchor="lastPoint",L(32,!1,e,{"dataGrouping.smoothed":"use dataGrouping.anchor"}));e=p;var m=this.options.dataGrouping;
z=this.currentDataGrouping&&this.currentDataGrouping.gapSize;if(m&&this.xData&&z&&this.groupMap){var a=e.length-1;var x=m.anchor;var K=N(m.firstAnchor,x);m=N(m.lastAnchor,x);if(x&&"start"!==x){var C=z*{middle:.5,end:1}[x];for(x=e.length-1;x--&&0<x;)e[x]+=C}if(K&&"start"!==K&&this.xData[0]>=e[0]){x=this.groupMap[0].start;C=this.groupMap[0].length;var H=void 0;q(x)&&q(C)&&(H=x+(C-1));e[0]={middle:e[0]+.5*z,end:e[0]+z,firstPoint:this.xData[0],lastPoint:H&&this.xData[H]}[K]}m&&"start"!==m&&z&&e[a]>=k-
z&&(k=this.groupMap[this.groupMap.length-1].start,e[a]={middle:e[a]+.5*z,end:e[a]+z,firstPoint:k&&this.xData[k],lastPoint:this.xData[this.xData.length-1]}[m])}for(k=1;k<f.length;k++)f.info.segmentStarts&&-1!==f.info.segmentStarts.indexOf(k)||(b=Math.max(f[k]-f[k-1],b));k=f.info;k.gapSize=b;this.closestPointRange=f.info.totalRange;this.groupMap=B.groupMap;if(n){n=p;if(E(n[0])&&q(w.min)&&q(w.dataMin)&&n[0]<w.min){if(!E(w.options.min)&&w.min<=w.dataMin||w.min===w.dataMin)w.min=Math.min(n[0],w.min);w.dataMin=
Math.min(n[0],w.dataMin)}if(E(n[n.length-1])&&q(w.max)&&q(w.dataMax)&&n[n.length-1]>w.max){if(!E(w.options.max)&&q(w.dataMax)&&w.max>=w.dataMax||w.max===w.dataMax)w.max=Math.max(n[n.length-1],w.max);w.dataMax=Math.max(n[n.length-1],w.dataMax)}}c.groupAll&&(this.allGroupedData=g,c=this.cropData(p,g,w.min,w.max,1),p=c.xData,g=c.yData,this.cropStart=c.start);this.processedXData=p;this.processedYData=g}else this.groupMap=null;this.hasGroupedData=h;this.currentDataGrouping=k;this.preventGraphAnimation=
(u&&u.totalRange)!==(k&&k.totalRange)}};d.destroyGroupedData=function(){this.groupedData&&(this.groupedData.forEach(function(f,e){f&&(this.groupedData[e]=f.destroy?f.destroy():null)},this),this.groupedData.length=0)};d.generatePoints=function(){g.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};a.prototype.applyGrouping=function(f){var e=this,c=e.series;c.forEach(function(c){c.groupPixelWidth=void 0});c.forEach(function(c){c.groupPixelWidth=e.getGroupPixelWidth&&
e.getGroupPixelWidth();c.groupPixelWidth&&(c.hasProcessed=!0);c.applyGrouping(!!f.hasExtemesChanged)})};a.prototype.getGroupPixelWidth=function(){var f=this.series,e=f.length,c,p=0,n=!1,h;for(c=e;c--;)(h=f[c].options.dataGrouping)&&(p=Math.max(p,N(h.groupPixelWidth,O.groupPixelWidth)));for(c=e;c--;)if(h=f[c].options.dataGrouping)if(e=(f[c].processedXData||f[c].data).length,f[c].groupPixelWidth||e>this.chart.plotSizeX/p||e&&h.forced)n=!0;return n?p:0};a.prototype.setDataGrouping=function(f,e){var c;
e=N(e,!0);f||(f={forced:!1,units:null});if(this instanceof a)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:f},!1);else this.chart.options.series.forEach(function(c){c.dataGrouping="boolean"===typeof f?f:R(f,c.dataGrouping)});this.ordinal&&(this.ordinal.slope=void 0);e&&this.chart.redraw()};A(a,"postProcessData",a.prototype.applyGrouping);A(y,"update",function(){if(this.dataGroup)return L(24,!1,this.series.chart),!1});A(D,"headerFormatter",function(f){var e=this.chart,c=e.time,
p=f.labelConfig,n=p.series,h=n.tooltipOptions,u=n.options.dataGrouping,w=h.xDateFormat,g=n.xAxis,b=h[f.isFooter?"footerFormat":"headerFormat"];if(g&&"datetime"===g.options.type&&u&&q(p.key)){var d=n.currentDataGrouping;u=u.dateTimeLabelFormats||O.dateTimeLabelFormats;if(d)if(h=u[d.unitName],1===d.count)w=h[0];else{w=h[1];var k=h[2]}else!w&&u&&g.dateTime&&(w=g.dateTime.getXDateFormat(p.x,h.dateTimeLabelFormats));w=c.dateFormat(w,p.key);k&&(w+=c.dateFormat(k,p.key+d.totalRange-1));n.chart.styledMode&&
(b=this.styledModeFormat(b));f.text=m(b,{point:H(p.point,{key:w}),series:n},e);f.preventDefault()}});A(r,"destroy",d.destroyGroupedData);A(r,"afterSetOptions",function(f){f=f.options;var e=this.type,c=this.chart.options.plotOptions,p=t.defaultOptions.plotOptions[e].dataGrouping,n=this.useCommonDataGrouping&&O;if(c&&(x[e]||n)){p||(p=R(O,x[e]));var h=this.chart.rangeSelector;f.dataGrouping=R(n,p,c.series&&c.series.dataGrouping,c[e].dataGrouping,this.userOptions.dataGrouping,!f.isInternal&&h&&q(h.selected)&&
h.buttonOptions[h.selected].dataGrouping)}});A(a,"afterSetScale",function(){this.series.forEach(function(f){f.hasProcessed=!1})});l.dataGrouping=M;"";"";return M});J(a,"Series/HLC/HLCPoint.js",[a["Core/Series/SeriesRegistry.js"]],function(a){var v=this&&this.__extends||function(){var a=function(l,y){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var t in l)l.hasOwnProperty(t)&&(a[t]=l[t])};return a(l,y)};return function(l,y){function r(){this.constructor=
l}a(l,y);l.prototype=null===y?Object.create(y):(r.prototype=y.prototype,new r)}}();return function(a){function l(){var l=null!==a&&a.apply(this,arguments)||this;l.close=void 0;l.high=void 0;l.low=void 0;l.options=void 0;l.plotClose=void 0;l.series=void 0;return l}v(l,a);return l}(a.seriesTypes.column.prototype.pointClass)});J(a,"Series/HLC/HLCSeries.js",[a["Series/HLC/HLCPoint.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,v,A){var l=this&&this.__extends||function(){var a=
function(b,m){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,m){b.__proto__=m}||function(b,m){for(var k in m)m.hasOwnProperty(k)&&(b[k]=m[k])};return a(b,m)};return function(b,m){function d(){this.constructor=b}a(b,m);b.prototype=null===m?Object.create(m):(d.prototype=m.prototype,new d)}}(),y=v.seriesTypes.column,r=A.extend,D=A.merge;A=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;b.yData=void 0;return b}
l(b,a);b.prototype.extendStem=function(b,d,a){var k=b[0];b=b[1];"number"===typeof k[2]&&(k[2]=Math.max(a+d,k[2]));"number"===typeof b[2]&&(b[2]=Math.min(a-d,b[2]))};b.prototype.getPointPath=function(b,d){d=d.strokeWidth();var a=b.series,k=d%2/2,m=Math.round(b.plotX)-k,E=Math.round(b.shapeArgs.width/2);var L=[["M",m,Math.round(b.yBottom)],["L",m,Math.round(b.plotHigh)]];null!==b.close&&(b=Math.round(b.plotClose)+k,L.push(["M",m,b],["L",m+E,b]),a.extendStem(L,d/2,b));return L};b.prototype.drawSinglePoint=
function(b){var d=b.series,a=d.chart,k=b.graphic,m=!k;"undefined"!==typeof b.plotY&&(k||(b.graphic=k=a.renderer.path().add(d.group)),a.styledMode||k.attr(d.pointAttribs(b,b.selected&&"select")),d=d.getPointPath(b,k),k[m?"attr":"animate"]({d:d}).addClass(b.getClassName(),!0))};b.prototype.drawPoints=function(){this.points.forEach(this.drawSinglePoint)};b.prototype.init=function(){a.prototype.init.apply(this,arguments);this.options.stacking=void 0};b.prototype.pointAttribs=function(b,d){b=a.prototype.pointAttribs.call(this,
b,d);delete b.fill;return b};b.prototype.toYData=function(b){return[b.high,b.low,b.close]};b.prototype.translate=function(){var b=this,d=b.yAxis,l=this.pointArrayMap&&this.pointArrayMap.slice()||[],k=l.map(function(b){return"plot".concat(b.charAt(0).toUpperCase()+b.slice(1))});k.push("yBottom");l.push("low");a.prototype.translate.apply(b);b.points.forEach(function(a){l.forEach(function(m,L){m=a[m];null!==m&&(b.dataModify&&(m=b.dataModify.modifyValue(m)),a[k[L]]=d.toPixels(m,!0))});a.tooltipPos[1]=
a.plotHigh+d.pos-b.chart.plotTop})};b.defaultOptions=D(y.defaultOptions,{lineWidth:1,tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0});return b}(y);r(A.prototype,{animate:null,directTouch:!1,pointArrayMap:["high","low","close"],pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointValKey:"close"});A.prototype.pointClass=
a;v.registerSeriesType("hlc",A);"";return A});J(a,"Series/OHLC/OHLCPoint.js",[a["Core/Series/SeriesRegistry.js"]],function(a){var v=this&&this.__extends||function(){var a=function(l,y){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var t in l)l.hasOwnProperty(t)&&(a[t]=l[t])};return a(l,y)};return function(l,y){function r(){this.constructor=l}a(l,y);l.prototype=null===y?Object.create(y):(r.prototype=y.prototype,new r)}}();return function(a){function l(){var l=
null!==a&&a.apply(this,arguments)||this;l.open=void 0;l.options=void 0;l.plotOpen=void 0;l.series=void 0;return l}v(l,a);l.prototype.getClassName=function(){return a.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")};l.prototype.resolveUpColor=function(){this.open<this.close&&!this.options.color&&this.series.options.upColor&&(this.color=this.series.options.upColor)};l.prototype.resolveColor=function(){a.prototype.resolveColor.call(this);this.resolveUpColor()};
l.prototype.getZone=function(){var l=a.prototype.getZone.call(this);this.resolveUpColor();return l};l.prototype.applyOptions=function(){a.prototype.applyOptions.apply(this,arguments);this.resolveColor&&this.resolveColor();return this};return l}(a.seriesTypes.hlc.prototype.pointClass)});J(a,"Series/OHLC/OHLCSeries.js",[a["Series/OHLC/OHLCPoint.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,v,A){var l=this&&this.__extends||function(){var b=function(d,k){b=Object.setPrototypeOf||
{__proto__:[]}instanceof Array&&function(b,k){b.__proto__=k}||function(b,k){for(var d in k)k.hasOwnProperty(d)&&(b[d]=k[d])};return b(d,k)};return function(d,k){function a(){this.constructor=d}b(d,k);d.prototype=null===k?Object.create(k):(a.prototype=k.prototype,new a)}}(),y=v.series,r=v.seriesTypes.hlc,D=A.addEvent,t=A.extend,b=A.merge,m=function(d){function a(){var b=null!==d&&d.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;return b}l(a,d);a.prototype.getPointPath=function(b,
a){var k=d.prototype.getPointPath.call(this,b,a);a=a.strokeWidth();var m=a%2/2,l=Math.round(b.plotX)-m,q=Math.round(b.shapeArgs.width/2);null!==b.open&&(b=Math.round(b.plotOpen)+m,k.push(["M",l,b],["L",l-q,b]),d.prototype.extendStem.call(this,k,a/2,b));return k};a.prototype.pointAttribs=function(b,a){a=d.prototype.pointAttribs.call(this,b,a);var k=this.options;delete a.fill;!b.options.color&&k.upColor&&b.open<b.close&&(a.stroke=k.upColor);return a};a.prototype.toYData=function(b){return[b.open,b.high,
b.low,b.close]};a.defaultOptions=b(r.defaultOptions,{tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Open: {point.open}<br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>'}});return a}(r);t(m.prototype,{pointArrayMap:["open","high","low","close"]});m.prototype.pointClass=a;v.registerSeriesType("ohlc",m);D(y,"init",function(b){b=b.options;b.useOhlcData&&"highcharts-navigator-series"!==b.id&&t(this,{pointValKey:m.prototype.pointValKey,
pointArrayMap:m.prototype.pointArrayMap,toYData:m.prototype.toYData})});D(y,"afterSetOptions",function(b){b=b.options;var a=b.dataGrouping;a&&b.useOhlcData&&"highcharts-navigator-series"!==b.id&&(a.approximation="ohlc")});"";return m});J(a,"Series/Candlestick/CandlestickSeries.js",[a["Core/DefaultOptions.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,v,A){var l=this&&this.__extends||function(){var b=function(a,d){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&
function(b,a){b.__proto__=a}||function(b,a){for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d])};return b(a,d)};return function(a,d){function m(){this.constructor=a}b(a,d);a.prototype=null===d?Object.create(d):(m.prototype=d.prototype,new m)}}(),y=a.defaultOptions;a=v.seriesTypes;var r=a.column,D=a.ohlc,t=A.merge;A=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.data=void 0;a.options=void 0;a.points=void 0;return a}l(a,b);a.prototype.pointAttribs=function(b,a){var d=r.prototype.pointAttribs.call(this,
b,a),m=this.options,l=b.open<b.close,L=m.lineColor||this.color,H=b.color||this.color;d["stroke-width"]=m.lineWidth;d.fill=b.options.color||(l?m.upColor||H:H);d.stroke=b.options.lineColor||(l?m.upLineColor||L:L);a&&(b=m.states[a],d.fill=b.color||d.fill,d.stroke=b.lineColor||d.stroke,d["stroke-width"]=b.lineWidth||d["stroke-width"]);return d};a.prototype.drawPoints=function(){var b=this,a=b.chart,k=b.yAxis.reversed;b.points.forEach(function(d){var m=d.graphic,l=!m;if("undefined"!==typeof d.plotY){m||
(d.graphic=m=a.renderer.path().add(b.group));b.chart.styledMode||m.attr(b.pointAttribs(d,d.selected&&"select")).shadow(b.options.shadow);var H=m.strokeWidth()%2/2;var q=Math.round(d.plotX)-H;var t=d.plotOpen;var r=d.plotClose;var F=Math.min(t,r);t=Math.max(t,r);var y=Math.round(d.shapeArgs.width/2);r=k?t!==d.yBottom:Math.round(F)!==Math.round(d.plotHigh);var g=k?Math.round(F)!==Math.round(d.plotHigh):t!==d.yBottom;F=Math.round(F)+H;t=Math.round(t)+H;H=[];H.push(["M",q-y,t],["L",q-y,F],["L",q+y,F],
["L",q+y,t],["Z"],["M",q,F],["L",q,r?Math.round(k?d.yBottom:d.plotHigh):F],["M",q,t],["L",q,g?Math.round(k?d.plotHigh:d.yBottom):t]);m[l?"attr":"animate"]({d:H}).addClass(d.getClassName(),!0)}})};a.defaultOptions=t(D.defaultOptions,y.plotOptions,{states:{hover:{lineWidth:2}},tooltip:y.plotOptions.ohlc.tooltip,threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0});return a}(D);v.registerSeriesType("candlestick",A);"";return A});J(a,"Series/Flags/FlagsPoint.js",[a["Core/Series/SeriesRegistry.js"],
a["Core/Utilities.js"]],function(a,v){var A=this&&this.__extends||function(){var a=function(l,y){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var m in b)b.hasOwnProperty(m)&&(a[m]=b[m])};return a(l,y)};return function(l,y){function t(){this.constructor=l}a(l,y);l.prototype=null===y?Object.create(y):(t.prototype=y.prototype,new t)}}(),l=v.isNumber;return function(a){function r(){var l=null!==a&&a.apply(this,arguments)||this;l.options=void 0;
l.series=void 0;l.ttBelow=!1;return l}A(r,a);r.prototype.isValid=function(){return l(this.y)||"undefined"===typeof this.y};r.prototype.hasNewShapeType=function(){var a=this.options.shape||this.series.options.shape;return this.graphic&&a&&a!==this.graphic.symbolKey};return r}(a.seriesTypes.column.prototype.pointClass)});J(a,"Series/OnSeriesComposition.js",[a["Series/Column/ColumnSeries.js"],a["Core/Series/Series.js"],a["Core/Utilities.js"]],function(a,v,A){var l=a.prototype,y=v.prototype,r=A.defined,
D=A.stableSort,t;(function(b){function a(){return y.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)}function d(){l.translate.apply(this);var b=this,a=b.options,d=b.chart,m=b.points,H=a.onSeries,q=(H=H&&d.get(H))&&H.options.step,t=H&&H.points,y=d.inverted,F=b.xAxis,v=b.yAxis;d=m.length-1;var g;a=a.onKey||"y";var C=t&&t.length,x=0,I;if(H&&H.visible&&C){x=(H.pointXOffset||0)+(H.barW||0)/2;var f=H.currentDataGrouping;var e=t[C-1].x+(f?f.totalRange:0);D(m,function(c,
h){return c.x-h.x});for(a="plot"+a[0].toUpperCase()+a.substr(1);C--&&m[d];){var c=t[C];f=m[d];f.y=c.y;if(c.x<=f.x&&"undefined"!==typeof c[a]){if(f.x<=e&&(f.plotY=c[a],c.x<f.x&&!q&&(I=t[C+1])&&"undefined"!==typeof I[a])){var p=(f.x-c.x)/(I.x-c.x);f.plotY+=p*(I[a]-c[a]);f.y+=p*(I.y-c.y)}d--;C++;if(0>d)break}}}m.forEach(function(c,h){c.plotX+=x;if("undefined"===typeof c.plotY||y)0<=c.plotX&&c.plotX<=F.len?y?(c.plotY=F.translate(c.x,0,1,0,1),c.plotX=r(c.y)?v.translate(c.y,0,0,0,1):0):c.plotY=(F.opposite?
0:b.yAxis.len)+F.offset:c.shapeArgs={};if((g=m[h-1])&&g.plotX===c.plotX){"undefined"===typeof g.stackIndex&&(g.stackIndex=0);var u=g.stackIndex+1}c.stackIndex=u});this.onSeries=H}var t=[];b.compose=function(b){if(-1===t.indexOf(b)){t.push(b);var k=b.prototype;k.getPlotBox=a;k.translate=d}return b};b.getPlotBox=a;b.translate=d})(t||(t={}));return t});J(a,"Series/Flags/FlagsSymbols.js",[a["Core/Renderer/RendererRegistry.js"],a["Core/Renderer/SVG/SVGRenderer.js"]],function(a,v){function A(a){l[a+"pin"]=
function(r,y,t,b,m){var d=m&&m.anchorX;m=m&&m.anchorY;"circle"===a&&b>t&&(r-=Math.round((b-t)/2),t=b);var C=l[a](r,y,t,b);if(d&&m){var k=d;"circle"===a?k=r+t/2:(r=C[0],t=C[1],"M"===r[0]&&"L"===t[0]&&(k=(r[1]+t[1])/2));C.push(["M",k,y>m?y:y+b],["L",d,m]);C=C.concat(l.circle(d-1,m-1,2,2))}return C}}var l=v.prototype.symbols;l.flag=function(a,r,v,t,b){var m=b&&b.anchorX||a;b=b&&b.anchorY||r;var d=l.circle(m-1,b-1,2,2);d.push(["M",m,b],["L",a,r+t],["L",a,r],["L",a+v,r],["L",a+v,r+t],["L",a,r+t],["Z"]);
return d};A("circle");A("square");a=a.getRendererType();a!==v&&(a.prototype.symbols.circlepin=l.circlepin,a.prototype.symbols.flag=l.flag,a.prototype.symbols.squarepin=l.squarepin);return l});J(a,"Series/Flags/FlagsSeries.js",[a["Series/Flags/FlagsPoint.js"],a["Core/Globals.js"],a["Series/OnSeriesComposition.js"],a["Core/Renderer/RendererUtilities.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Renderer/SVG/SVGElement.js"],a["Core/Utilities.js"]],function(a,v,A,l,y,r,D){var t=this&&this.__extends||
function(){var b=function(a,d){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d])};return b(a,d)};return function(a,d){function q(){this.constructor=a}b(a,d);a.prototype=null===d?Object.create(d):(q.prototype=d.prototype,new q)}}();v=v.noop;var b=l.distribute,m=y.series,d=y.seriesTypes.column,C=D.addEvent,k=D.defined;l=D.extend;var K=D.merge,E=D.objectEach,L=D.wrap;D=function(a){function q(){var b=null!==
a&&a.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;return b}t(q,a);q.prototype.animate=function(b){b&&this.setClip()};q.prototype.drawPoints=function(){var a=this.points,d=this.chart,q=d.renderer,m=d.inverted,g=this.options,l=g.y,x,t=this.yAxis,f={},e=[];for(x=a.length;x--;){var c=a[x];var p=(m?c.plotY:c.plotX)>this.xAxis.len;var n=c.plotX;var h=c.stackIndex;var u=c.options.shape||g.shape;var w=c.plotY;"undefined"!==typeof w&&(w=c.plotY+l-("undefined"!==typeof h&&h*g.stackDistance));
c.anchorX=h?void 0:c.plotX;var P=h?void 0:c.plotY;var Q="flag"!==u;h=c.graphic;"undefined"!==typeof w&&0<=n&&!p?(h&&c.hasNewShapeType()&&(h=h.destroy()),h||(h=c.graphic=q.label("",null,null,u,null,null,g.useHTML).addClass("highcharts-point").add(this.markerGroup),c.graphic.div&&(c.graphic.div.point=c),h.isNew=!0),h.attr({align:Q?"center":"left",width:g.width,height:g.height,"text-align":g.textAlign}),d.styledMode||h.attr(this.pointAttribs(c)).css(K(g.style,c.style)).shadow(g.shadow),0<n&&(n-=h.strokeWidth()%
2),u={y:w,anchorY:P},g.allowOverlapX&&(u.x=n,u.anchorX=c.anchorX),h.attr({text:c.options.title||g.title||"A"})[h.isNew?"attr":"animate"](u),g.allowOverlapX||(f[c.plotX]?f[c.plotX].size=Math.max(f[c.plotX].size,h.width):f[c.plotX]={align:Q?.5:0,size:h.width,target:n,anchorX:n}),c.tooltipPos=[n,w+t.pos-d.plotTop]):h&&(c.graphic=h.destroy())}if(!g.allowOverlapX){var B=100;E(f,function(h){h.plotX=h.anchorX;e.push(h);B=Math.max(h.size,B)});b(e,m?t.len:this.xAxis.len,B);a.forEach(function(h){var c=h.plotX,
u=h.graphic;(c=u&&f[c])&&u&&(k(c.pos)?u[u.isNew?"attr":"animate"]({x:c.pos+(c.align||0)*c.size,anchorX:h.anchorX}).show().isNew=!1:u.hide().isNew=!0)})}g.useHTML&&L(this.markerGroup,"on",function(h){return r.prototype.on.apply(h.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})};q.prototype.drawTracker=function(){var b=this.points;a.prototype.drawTracker.call(this);b.forEach(function(a){var d=a.graphic;d&&(a.unbindMouseOver&&a.unbindMouseOver(),a.unbindMouseOver=C(d.element,"mouseover",
function(){0<a.stackIndex&&!a.raised&&(a._y=d.y,d.attr({y:a._y-8}),a.raised=!0);b.forEach(function(b){b!==a&&b.raised&&b.graphic&&(b.graphic.attr({y:b._y}),b.raised=!1)})}))})};q.prototype.pointAttribs=function(b,a){var d=this.options,q=b&&b.color||this.color,g=d.lineColor,k=b&&b.lineWidth;b=b&&b.fillColor||d.fillColor;a&&(b=d.states[a].fillColor,g=d.states[a].lineColor,k=d.states[a].lineWidth);return{fill:b||q,stroke:g||q,"stroke-width":k||d.lineWidth||0}};q.prototype.setClip=function(){m.prototype.setClip.apply(this,
arguments);!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup&&this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey])};q.defaultOptions=K(d.defaultOptions,{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}"},threshold:null,y:-30,fillColor:"#ffffff",lineWidth:1,states:{hover:{lineColor:"#000000",fillColor:"#ccd6eb"}},style:{fontSize:"11px",fontWeight:"bold"}});return q}(d);A.compose(D);l(D.prototype,{allowDG:!1,forceCrop:!0,
invertible:!1,noSharedTooltip:!0,pointClass:a,sorted:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],buildKDTree:v,init:m.prototype.init,invertGroups:v});y.registerSeriesType("flags",D);"";"";return D});J(a,"Core/Axis/ScrollbarAxis.js",[a["Core/Utilities.js"]],function(a){var v=a.addEvent,A=a.defined,l=a.pick;return function(){function a(){}a.compose=function(r,y){if(-1===a.composed.indexOf(r))a.composed.push(r);else return r;var t=function(b){var a=l(b.options&&b.options.min,b.min),d=l(b.options&&
b.options.max,b.max);return{axisMin:a,axisMax:d,scrollMin:A(b.dataMin)?Math.min(a,b.min,b.dataMin,l(b.threshold,Infinity)):a,scrollMax:A(b.dataMax)?Math.max(d,b.max,b.dataMax,l(b.threshold,-Infinity)):d}};v(r,"afterInit",function(){var b=this;b.options&&b.options.scrollbar&&b.options.scrollbar.enabled&&(b.options.scrollbar.vertical=!b.horiz,b.options.startOnTick=b.options.endOnTick=!1,b.scrollbar=new y(b.chart.renderer,b.options.scrollbar,b.chart),v(b.scrollbar,"changed",function(a){var d=t(b),m=
d.axisMax,k=d.scrollMin,l=d.scrollMax-k;A(d.axisMin)&&A(m)&&(b.horiz&&!b.reversed||!b.horiz&&b.reversed?(d=k+l*this.to,k+=l*this.from):(d=k+l*(1-this.from),k+=l*(1-this.to)),this.shouldUpdateExtremes(a.DOMType)?b.setExtremes(k,d,!0,"mousemove"!==a.DOMType&&"touchmove"!==a.DOMType,a):this.setRange(this.from,this.to))}))});v(r,"afterRender",function(){var b=t(this),a=b.scrollMin,d=b.scrollMax;b=this.scrollbar;var l=this.axisTitleMargin+(this.titleOffset||0),k=this.chart.scrollbarsOffsets,r=this.options.margin||
0;b&&(this.horiz?(this.opposite||(k[1]+=l),b.position(this.left,this.top+this.height+2+k[1]-(this.opposite?r:0),this.width,this.height),this.opposite||(k[1]+=r),l=1):(this.opposite&&(k[0]+=l),b.position(b.options.opposite?this.left+this.width+2+k[0]-(this.opposite?0:r):this.opposite?0:r,this.top,this.width,this.height),this.opposite&&(k[0]+=r),l=0),k[l]+=b.size+b.options.margin,isNaN(a)||isNaN(d)||!A(this.min)||!A(this.max)||this.min===this.max?b.setRange(0,1):(k=(this.min-a)/(d-a),a=(this.max-a)/
(d-a),this.horiz&&!this.reversed||!this.horiz&&this.reversed?b.setRange(k,a):b.setRange(1-a,1-k)))});v(r,"afterGetOffset",function(){var b=this.scrollbar&&!this.scrollbar.options.opposite;b=this.horiz?2:b?3:1;var a=this.scrollbar;a&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[b]+=a.size+a.options.margin)});return r};a.composed=[];return a}()});J(a,"Core/ScrollbarDefaults.js",[a["Core/Globals.js"]],function(a){return{height:a.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,
liveRedraw:void 0,margin:10,minWidth:6,opposite:!0,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}});J(a,"Core/Scrollbar.js",[a["Core/DefaultOptions.js"],a["Core/Globals.js"],a["Core/Axis/ScrollbarAxis.js"],a["Core/ScrollbarDefaults.js"],a["Core/Utilities.js"]],
function(a,v,A,l,y){var r=a.defaultOptions,D=y.addEvent,t=y.correctFloat,b=y.defined,m=y.destroyObjectProperties,d=y.fireEvent,C=y.merge,k=y.pick,K=y.removeEvent;a=function(){function a(a,b,d){this._events=[];this.chart=void 0;this.from=this.chartY=this.chartX=0;this.scrollbar=this.renderer=this.options=this.group=void 0;this.scrollbarButtons=[];this.scrollbarGroup=void 0;this.scrollbarLeft=0;this.scrollbarRifles=void 0;this.scrollbarStrokeWidth=1;this.to=this.size=this.scrollbarTop=0;this.track=
void 0;this.trackBorderWidth=1;this.userOptions=void 0;this.y=this.x=0;this.init(a,b,d)}a.compose=function(b){A.compose(b,a)};a.swapXY=function(a,b){b&&a.forEach(function(a){for(var b=a.length,d,q=0;q<b;q+=2)d=a[q+1],"number"===typeof d&&(a[q+1]=a[q+2],a[q+2]=d)});return a};a.prototype.addEvents=function(){var a=this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,d=this.scrollbarGroup.element,k=this.track.element,l=this.mouseDownHandler.bind(this),m=this.mouseMoveHandler.bind(this),t=this.mouseUpHandler.bind(this);
a=[[b[a[0]].element,"click",this.buttonToMinClick.bind(this)],[b[a[1]].element,"click",this.buttonToMaxClick.bind(this)],[k,"click",this.trackClick.bind(this)],[d,"mousedown",l],[d.ownerDocument,"mousemove",m],[d.ownerDocument,"mouseup",t]];v.hasTouch&&a.push([d,"touchstart",l],[d.ownerDocument,"touchmove",m],[d.ownerDocument,"touchend",t]);a.forEach(function(a){D.apply(null,a)});this._events=a};a.prototype.buttonToMaxClick=function(a){var b=(this.to-this.from)*k(this.options.step,.2);this.updatePosition(this.from+
b,this.to+b);d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:a})};a.prototype.buttonToMinClick=function(a){var b=t(this.to-this.from)*k(this.options.step,.2);this.updatePosition(t(this.from-b),t(this.to-b));d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:a})};a.prototype.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)}};a.prototype.destroy=function(){var a=this,b=a.chart.scroller;a.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(b){a[b]&&a[b].destroy&&(a[b]=a[b].destroy())});b&&a===b.scrollbar&&(b.scrollbar=null,m(b.scrollbarButtons))};a.prototype.drawScrollbarButton=function(b){var d=this.renderer,q=this.scrollbarButtons,k=this.options,l=this.size,m=d.g().add(this.group);q.push(m);m=d.rect().addClass("highcharts-scrollbar-button").add(m);
this.chart.styledMode||m.attr({stroke:k.buttonBorderColor,"stroke-width":k.buttonBorderWidth,fill:k.buttonBackgroundColor});m.attr(m.crisp({x:-.5,y:-.5,width:l+1,height:l+1,r:k.buttonBorderRadius},m.strokeWidth()));m=d.path(a.swapXY([["M",l/2+(b?-1:1),l/2-3],["L",l/2+(b?-1:1),l/2+3],["L",l/2+(b?2:-2),l/2]],k.vertical)).addClass("highcharts-scrollbar-arrow").add(q[b]);this.chart.styledMode||m.attr({fill:k.buttonArrowColor})};a.prototype.init=function(a,b,d){this.scrollbarButtons=[];this.renderer=a;
this.userOptions=b;this.options=C(l,r.scrollbar,b);this.chart=d;this.size=k(this.options.size,this.options.height);b.enabled&&(this.render(),this.addEvents())};a.prototype.mouseDownHandler=function(a){a=this.chart.pointer.normalize(a);a=this.cursorToScrollbarPosition(a);this.chartX=a.chartX;this.chartY=a.chartY;this.initPositions=[this.from,this.to];this.grabbedCenter=!0};a.prototype.mouseMoveHandler=function(a){var b=this.chart.pointer.normalize(a),k=this.options.vertical?"chartY":"chartX",l=this.initPositions||
[];!this.grabbedCenter||a.touches&&0===a.touches[0][k]||(b=this.cursorToScrollbarPosition(b)[k],k=this[k],k=b-k,this.hasDragged=!0,this.updatePosition(l[0]+k,l[1]+k),this.hasDragged&&d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:a.type,DOMEvent:a}))};a.prototype.mouseUpHandler=function(a){this.hasDragged&&d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:a.type,DOMEvent:a});this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null};a.prototype.position=
function(a,b,d,k){var q=this.options.vertical,l=this.rendered?"animate":"attr",m=k,g=0;this.group.show();this.x=a;this.y=b+this.trackBorderWidth;this.width=d;this.height=k;this.xOffset=m;this.yOffset=g;q?(this.width=this.yOffset=d=g=this.size,this.xOffset=m=0,this.barWidth=k-2*d,this.x=a+=this.options.margin):(this.height=this.xOffset=k=m=this.size,this.barWidth=d-2*k,this.y+=this.options.margin);this.group[l]({translateX:a,translateY:this.y});this.track[l]({width:d,height:k});this.scrollbarButtons[1][l]({translateX:q?
0:d-m,translateY:q?k-g:0})};a.prototype.removeEvents=function(){this._events.forEach(function(a){K.apply(null,a)});this._events.length=0};a.prototype.render=function(){var b=this.renderer,d=this.options,k=this.size,l=this.chart.styledMode,m=b.g("scrollbar").attr({zIndex:d.zIndex}).hide().add();this.group=m;this.track=b.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:d.trackBorderRadius||0,height:k,width:k}).add(m);l||this.track.attr({fill:d.trackBackgroundColor,stroke:d.trackBorderColor,
"stroke-width":d.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=b.g().add(m);this.scrollbar=b.rect().addClass("highcharts-scrollbar-thumb").attr({height:k,width:k,r:d.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=b.path(a.swapXY([["M",-3,k/4],["L",-3,2*k/3],["M",0,k/4],["L",0,2*k/3],["M",3,k/4],["L",3,2*k/3]],d.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);l||(this.scrollbar.attr({fill:d.barBackgroundColor,
stroke:d.barBorderColor,"stroke-width":d.barBorderWidth}),this.scrollbarRifles.attr({stroke:d.rifleColor,"stroke-width":1}));this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)};a.prototype.setRange=function(a,d){var k=this.options,l=k.vertical,m=k.minWidth,r=this.barWidth,v=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?
"attr":"animate";if(b(r)){var g=r*Math.min(d,1);a=Math.max(a,0);var y=Math.ceil(r*a);this.calculatedWidth=g=t(g-y);g<m&&(y=(r-m+g)*a,g=m);m=Math.floor(y+this.xOffset+this.yOffset);r=g/2-.5;this.from=a;this.to=d;l?(this.scrollbarGroup[v]({translateY:m}),this.scrollbar[v]({height:g}),this.scrollbarRifles[v]({translateY:r}),this.scrollbarTop=m,this.scrollbarLeft=0):(this.scrollbarGroup[v]({translateX:m}),this.scrollbar[v]({width:g}),this.scrollbarRifles[v]({translateX:r}),this.scrollbarLeft=m,this.scrollbarTop=
0);12>=g?this.scrollbarRifles.hide():this.scrollbarRifles.show();!1===k.showFull&&(0>=a&&1<=d?this.group.hide():this.group.show());this.rendered=!0}};a.prototype.shouldUpdateExtremes=function(a){return k(this.options.liveRedraw,v.svg&&!v.isTouchDevice&&!this.chart.boosted)||"mouseup"===a||"touchend"===a||!b(a)};a.prototype.trackClick=function(a){var b=this.chart.pointer.normalize(a),k=this.to-this.from,l=this.y+this.scrollbarTop,m=this.x+this.scrollbarLeft;this.options.vertical&&b.chartY>l||!this.options.vertical&&
b.chartX>m?this.updatePosition(this.from+k,this.to+k):this.updatePosition(this.from-k,this.to-k);d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:a})};a.prototype.update=function(a){this.destroy();this.init(this.chart.renderer,C(!0,this.options,a),this.chart)};a.prototype.updatePosition=function(a,b){1<b&&(a=t(1-t(b-a)),b=1);0>a&&(b=t(b-a),a=0);this.from=a;this.to=b};a.defaultOptions=l;return a}();r.scrollbar=C(!0,a.defaultOptions,r.scrollbar);return a});J(a,"Core/Axis/NavigatorAxis.js",
[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,v){var A=a.isTouchDevice,l=v.addEvent,y=v.correctFloat,r=v.defined,D=v.isNumber,t=v.pick,b=function(){function a(a){this.axis=a}a.prototype.destroy=function(){this.axis=void 0};a.prototype.toFixedRange=function(a,b,k,l){var d=this.axis,m=d.chart;m=m&&m.fixedRange;var v=(d.pointRange||0)/2;a=t(k,d.translate(a,!0,!d.horiz));b=t(l,d.translate(b,!0,!d.horiz));d=m&&(b-a)/m;r(k)||(a=y(a+v));r(l)||(b=y(b-v));.7<d&&1.3>d&&(l?a=b-m:b=a+m);D(a)&&D(b)||
(a=b=void 0);return{min:a,max:b}};return a}();return function(){function a(){}a.compose=function(a){a.keepProps.push("navigatorAxis");l(a,"init",function(){this.navigatorAxis||(this.navigatorAxis=new b(this))});l(a,"zoom",function(a){var b=this.chart.options,d=b.navigator,l=this.navigatorAxis,m=b.chart.zooming.pinchType,t=b.rangeSelector;b=b.chart.zooming.type;this.isXAxis&&(d&&d.enabled||t&&t.enabled)&&("y"===b?a.zoomed=!1:(!A&&"xy"===b||A&&"xy"===m)&&this.options.range&&(d=l.previousZoom,r(a.newMin)?
l.previousZoom=[this.min,this.max]:d&&(a.newMin=d[0],a.newMax=d[1],l.previousZoom=void 0)));"undefined"!==typeof a.zoomed&&a.preventDefault()})};a.AdditionsClass=b;return a}()});J(a,"Core/Navigator.js",[a["Core/Axis/Axis.js"],a["Core/Chart/Chart.js"],a["Core/Color/Color.js"],a["Core/Globals.js"],a["Core/Axis/NavigatorAxis.js"],a["Core/DefaultOptions.js"],a["Core/Renderer/RendererRegistry.js"],a["Core/Scrollbar.js"],a["Core/Series/Series.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],
function(a,v,A,l,y,r,D,t,b,m,d){A=A.parse;var C=l.hasTouch,k=l.isTouchDevice,K=r.defaultOptions,E=d.addEvent,L=d.clamp,H=d.correctFloat,q=d.defined,J=d.destroyObjectProperties,N=d.erase,F=d.extend,M=d.find,g=d.isArray,O=d.isNumber,x=d.merge,I=d.pick,f=d.removeEvent,e=d.splat,c=function(c){for(var h=[],a=1;a<arguments.length;a++)h[a-1]=arguments[a];h=[].filter.call(h,O);if(h.length)return Math[c].apply(0,h)};r="undefined"===typeof m.seriesTypes.areaspline?"line":"areaspline";F(K,{navigator:{height:40,
margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:A("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:r,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,firstAnchor:"firstPoint",anchor:"middle",lastAnchor:"lastPoint",units:[["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,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},
yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});D.getRendererType().prototype.symbols["navigator-handle"]=function(a,h,c,b,e){a=(e&&e.width||0)/2;h=Math.round(a/3)+.5;e=e&&e.height||0;return[["M",-a-1,.5],["L",a,.5],["L",a,e+.5],["L",-a-1,e+.5],["L",-a-1,.5],["M",-h,4],["L",-h,e-3],["M",h-1,4],["L",h-1,e-3]]};var p=function(){function b(h){this.zoomedMin=
this.zoomedMax=this.yAxis=this.xAxis=this.top=this.size=this.shades=this.rendered=this.range=this.outlineHeight=this.outline=this.opposite=this.navigatorSize=this.navigatorSeries=this.navigatorOptions=this.navigatorGroup=this.navigatorEnabled=this.left=this.height=this.handles=this.chart=this.baseSeries=void 0;this.init(h)}b.prototype.drawHandle=function(h,a,c,b){var e=this.navigatorOptions.handles.height;this.handles[a][b](c?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+
parseInt(h,10)+.5-e)}:{translateX:Math.round(this.left+parseInt(h,10)),translateY:Math.round(this.top+this.height/2-e/2-1)})};b.prototype.drawOutline=function(h,a,c,b){var e=this.navigatorOptions.maskInside,u=this.outline.strokeWidth(),d=u/2,w=u%2/2;u=this.outlineHeight;var n=this.scrollbarHeight||0,p=this.size,f=this.left-n,g=this.top;c?(f-=d,c=g+a+w,a=g+h+w,w=[["M",f+u,g-n-w],["L",f+u,c],["L",f,c],["L",f,a],["L",f+u,a],["L",f+u,g+p+n]],e&&w.push(["M",f+u,c-d],["L",f+u,a+d])):(h+=f+n-w,a+=f+n-w,
g+=d,w=[["M",f,g],["L",h,g],["L",h,g+u],["L",a,g+u],["L",a,g],["L",f+p+2*n,g]],e&&w.push(["M",h-d,g],["L",a+d,g]));this.outline[b]({d:w})};b.prototype.drawMasks=function(h,a,c,b){var e=this.left,u=this.top,d=this.height;if(c){var w=[e,e,e];var n=[u,u+h,u+a];var p=[d,d,d];var f=[h,a-h,this.size-a]}else w=[e,e+h,e+a],n=[u,u,u],p=[h,a-h,this.size-a],f=[d,d,d];this.shades.forEach(function(h,a){h[b]({x:w[a],y:n[a],width:p[a],height:f[a]})})};b.prototype.renderElements=function(){var h=this,a=h.navigatorOptions,
c=a.maskInside,b=h.chart,e=b.renderer,d,n={cursor:b.inverted?"ns-resize":"ew-resize"};h.navigatorGroup=d=e.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();[!c,c,!c].forEach(function(c,u){var w=e.rect().addClass("highcharts-navigator-mask"+(1===u?"-inside":"-outside")).add(d);b.styledMode||(w.attr({fill:c?a.maskFill:"rgba(0,0,0,0)"}),1===u&&w.css(n));h.shades[u]=w});h.outline=e.path().addClass("highcharts-navigator-outline").add(d);b.styledMode||h.outline.attr({"stroke-width":a.outlineWidth,
stroke:a.outlineColor});a.handles.enabled&&[0,1].forEach(function(c){a.handles.inverted=b.inverted;h.handles[c]=e.symbol(a.handles.symbols[c],-a.handles.width/2-1,0,a.handles.width,a.handles.height,a.handles);h.handles[c].attr({zIndex:7-c}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][c]).add(d);if(!b.styledMode){var u=a.handles;h.handles[c].attr({fill:u.backgroundColor,stroke:u.borderColor,"stroke-width":u.lineWidth}).css(n)}})};b.prototype.update=function(a){(this.series||
[]).forEach(function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries});this.destroy();x(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)};b.prototype.render=function(a,c,b,e){var h=this.chart,u=this.scrollbarHeight,d,n=this.xAxis,w=n.pointRange||0;var p=n.navigatorAxis.fake?h.xAxis[0]:n;var f=this.navigatorEnabled,g,k=this.rendered;var l=h.inverted;var m=h.xAxis[0].minRange,P=h.xAxis[0].options.maxRange;if(!this.hasDragged||q(b)){a=H(a-w/2);c=H(c+w/2);if(!O(a)||!O(c))if(k)b=
0,e=I(n.width,p.width);else return;this.left=I(n.left,h.plotLeft+u+(l?h.plotWidth:0));this.size=g=d=I(n.len,(l?h.plotHeight:h.plotWidth)-2*u);h=l?u:d+2*u;b=I(b,n.toPixels(a,!0));e=I(e,n.toPixels(c,!0));O(b)&&Infinity!==Math.abs(b)||(b=0,e=h);a=n.toValue(b,!0);c=n.toValue(e,!0);var x=Math.abs(H(c-a));x<m?this.grabbedLeft?b=n.toPixels(c-m-w,!0):this.grabbedRight&&(e=n.toPixels(a+m+w,!0)):q(P)&&H(x-w)>P&&(this.grabbedLeft?b=n.toPixels(c-P-w,!0):this.grabbedRight&&(e=n.toPixels(a+P+w,!0)));this.zoomedMax=
L(Math.max(b,e),0,g);this.zoomedMin=L(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(b,e),0,g);this.range=this.zoomedMax-this.zoomedMin;g=Math.round(this.zoomedMax);b=Math.round(this.zoomedMin);f&&(this.navigatorGroup.attr({visibility:"inherit"}),k=k&&!this.hasDragged?"animate":"attr",this.drawMasks(b,g,l,k),this.drawOutline(b,g,l,k),this.navigatorOptions.handles.enabled&&(this.drawHandle(b,0,l,k),this.drawHandle(g,1,l,k)));this.scrollbar&&(l?(l=this.top-u,p=this.left-u+(f||!p.opposite?0:
(p.titleOffset||0)+p.axisTitleMargin),u=d+2*u):(l=this.top+(f?this.height:-u),p=this.left-u),this.scrollbar.position(p,l,h,u),this.scrollbar.setRange(this.zoomedMin/(d||1),this.zoomedMax/(d||1)));this.rendered=!0}};b.prototype.addMouseEvents=function(){var a=this,c=a.chart,b=c.container,e=[],d,n;a.mouseMoveHandler=d=function(c){a.onMouseMove(c)};a.mouseUpHandler=n=function(c){a.onMouseUp(c)};e=a.getPartsEvents("mousedown");e.push(E(c.renderTo,"mousemove",d),E(b.ownerDocument,"mouseup",n));C&&(e.push(E(c.renderTo,
"touchmove",d),E(b.ownerDocument,"touchend",n)),e.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=e;a.series&&a.series[0]&&e.push(E(a.series[0].xAxis,"foundExtremes",function(){c.navigator.modifyNavigatorAxisExtremes()}))};b.prototype.getPartsEvents=function(a){var c=this,h=[];["shades","handles"].forEach(function(b){c[b].forEach(function(e,u){h.push(E(e.element,a,function(a){c[b+"Mousedown"](a,u)}))})});return h};b.prototype.shadesMousedown=function(a,c){a=this.chart.pointer.normalize(a);
var b=this.chart,h=this.xAxis,e=this.zoomedMin,u=this.left,d=this.size,n=this.range,p=a.chartX;b.inverted&&(p=a.chartY,u=this.top);if(1===c)this.grabbedCenter=p,this.fixedWidth=n,this.dragOffset=p-e;else{a=p-u-n/2;if(0===c)a=Math.max(0,a);else if(2===c&&a+n>=d)if(a=d-n,this.reversedExtremes){a-=n;var f=this.getUnionExtremes().dataMin}else var g=this.getUnionExtremes().dataMax;a!==e&&(this.fixedWidth=n,c=h.navigatorAxis.toFixedRange(a,a+n,f,g),q(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),
Math.max(c.min,c.max),!0,null,{trigger:"navigator"}))}};b.prototype.handlesMousedown=function(a,c){this.chart.pointer.normalize(a);a=this.chart;var b=a.xAxis[0],h=this.reversedExtremes;0===c?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=h?b.min:b.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=h?b.max:b.min);a.fixedRange=null};b.prototype.onMouseMove=function(a){var c=this,b=c.chart,h=c.left,e=c.navigatorSize,d=c.range,n=c.dragOffset,p=b.inverted;
a.touches&&0===a.touches[0].pageX||(a=b.pointer.normalize(a),b=a.chartX,p&&(h=c.top,b=a.chartY),c.grabbedLeft?(c.hasDragged=!0,c.render(0,0,b-h,c.otherHandlePos)):c.grabbedRight?(c.hasDragged=!0,c.render(0,0,c.otherHandlePos,b-h)):c.grabbedCenter&&(c.hasDragged=!0,b<n?b=n:b>e+n-d&&(b=e+n-d),c.render(0,0,b-n,b-n+d)),c.hasDragged&&c.scrollbar&&I(c.scrollbar.options.liveRedraw,l.svg&&!k&&!this.chart.boosted)&&(a.DOMType=a.type,setTimeout(function(){c.onMouseUp(a)},0)))};b.prototype.onMouseUp=function(a){var c=
this.chart,b=this.xAxis,h=this.scrollbar,e=a.DOMEvent||a,n=c.inverted,d=this.rendered&&!this.hasDragged?"animate":"attr";if(this.hasDragged&&(!h||!h.hasDragged)||"scrollbar"===a.trigger){h=this.getUnionExtremes();if(this.zoomedMin===this.otherHandlePos)var p=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var f=this.fixedExtreme;this.zoomedMax===this.size&&(f=this.reversedExtremes?h.dataMin:h.dataMax);0===this.zoomedMin&&(p=this.reversedExtremes?h.dataMax:h.dataMin);b=b.navigatorAxis.toFixedRange(this.zoomedMin,
this.zoomedMax,p,f);q(b.min)&&c.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:e})}"mousemove"!==a.DOMType&&"touchmove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null);this.navigatorEnabled&&O(this.zoomedMin)&&O(this.zoomedMax)&&(c=Math.round(this.zoomedMin),a=Math.round(this.zoomedMax),
this.shades&&this.drawMasks(c,a,n,d),this.outline&&this.drawOutline(c,a,n,d),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(c,0,n,d),this.drawHandle(a,1,n,d)))};b.prototype.removeEvents=function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()};b.prototype.removeBaseSeriesEvents=function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&
a.forEach(function(a){f(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&f(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))};b.prototype.init=function(b){var h=b.options,e=h.navigator,n=e.enabled,d=h.scrollbar,p=d.enabled;h=n?e.height:0;var f=p?d.height:0;this.handles=[];this.shades=[];this.chart=b;this.setBaseSeries();this.height=h;this.scrollbarHeight=f;this.scrollbarEnabled=p;this.navigatorEnabled=n;this.navigatorOptions=e;this.scrollbarOptions=d;this.outlineHeight=h+f;this.opposite=
I(e.opposite,!(n||!b.inverted));var g=this;n=g.baseSeries;d=b.xAxis.length;p=b.yAxis.length;var k=n&&n[0]&&n[0].xAxis||b.xAxis[0]||{options:{}};b.isDirtyBox=!0;g.navigatorEnabled?(g.xAxis=new a(b,x({breaks:k.options.breaks,ordinal:k.options.ordinal},e.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:d,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},b.inverted?{offsets:[f,0,-f,0],width:h}:{offsets:[0,
-f,0,f],height:h})),g.yAxis=new a(b,x(e.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:p,isInternal:!0,reversed:I(e.yAxis&&e.yAxis.reversed,b.yAxis[0]&&b.yAxis[0].reversed,!1),zoomEnabled:!1},b.inverted?{width:h}:{height:h})),n||e.series.data?g.updateNavigatorSeries(!1):0===b.series.length&&(g.unbindRedraw=E(b,"beforeRedraw",function(){0<b.series.length&&!g.series&&(g.setBaseSeries(),g.unbindRedraw())})),g.reversedExtremes=b.inverted&&!g.xAxis.reversed||!b.inverted&&g.xAxis.reversed,g.renderElements(),
g.addMouseEvents()):(g.xAxis={chart:b,navigatorAxis:{fake:!0},translate:function(a,h){var e=b.xAxis[0],n=e.getExtremes(),d=e.len-2*f,u=c("min",e.options.min,n.dataMin);e=c("max",e.options.max,n.dataMax)-u;return h?a*e/d+u:d*(a-u)/e},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)}},g.xAxis.navigatorAxis.axis=g.xAxis,g.xAxis.navigatorAxis.toFixedRange=y.AdditionsClass.prototype.toFixedRange.bind(g.xAxis.navigatorAxis));b.options.scrollbar.enabled&&(b.scrollbar=
g.scrollbar=new t(b.renderer,x(b.options.scrollbar,{margin:g.navigatorEnabled?0:10,vertical:b.inverted}),b),E(g.scrollbar,"changed",function(a){var c=g.size,b=c*this.to;c*=this.from;g.hasDragged=g.scrollbar.hasDragged;g.render(0,0,c,b);this.shouldUpdateExtremes(a.DOMType)&&setTimeout(function(){g.onMouseUp(a)})}));g.addBaseSeriesEvents();g.addChartEvents()};b.prototype.getUnionExtremes=function(a){var b=this.chart.xAxis[0],h=this.xAxis,e=h.options,n=b.options,d;a&&null===b.dataMin||(d={dataMin:I(e&&
e.min,c("min",n.min,b.dataMin,h.dataMin,h.min)),dataMax:I(e&&e.max,c("max",n.max,b.dataMax,h.dataMax,h.max))});return d};b.prototype.setBaseSeries=function(a,c){var b=this.chart,h=this.baseSeries=[];a=a||b.options&&b.options.navigator.baseSeries||(b.series.length?M(b.series,function(a){return!a.options.isInternal}).index:0);(b.series||[]).forEach(function(c,b){c.options.isInternal||!c.options.showInNavigator&&(b!==a&&c.options.id!==a||!1===c.options.showInNavigator)||h.push(c)});this.xAxis&&!this.xAxis.navigatorAxis.fake&&
this.updateNavigatorSeries(!0,c)};b.prototype.updateNavigatorSeries=function(a,c){var b=this,h=b.chart,n=b.baseSeries,d,u,p=b.navigatorOptions.series,k,l={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},m=b.series=(b.series||[]).filter(function(a){var c=a.baseSeries;return 0>n.indexOf(c)?(c&&(f(c,"updatedData",b.updatedDataHandler),delete c.navigatorSeries),
a.chart&&a.destroy(),!1):!0});n&&n.length&&n.forEach(function(a){var f=a.navigatorSeries,w=F({color:a.color,visible:a.visible},g(p)?K.navigator.series:p);f&&!1===b.navigatorOptions.adaptToUpdatedData||(l.name="Navigator "+n.length,d=a.options||{},k=d.navigatorOptions||{},w.dataLabels=e(w.dataLabels),u=x(d,l,w,k),u.pointRange=I(w.pointRange,k.pointRange,K.plotOptions[u.type||"line"].pointRange),w=k.data||w.data,b.hasNavigatorData=b.hasNavigatorData||!!w,u.data=w||d.data&&d.data.slice(0),f&&f.options?
f.update(u,c):(a.navigatorSeries=h.initSeries(u),a.navigatorSeries.baseSeries=a,m.push(a.navigatorSeries)))});if(p.data&&(!n||!n.length)||g(p))b.hasNavigatorData=!1,p=e(p),p.forEach(function(a,c){l.name="Navigator "+(m.length+1);u=x(K.navigator.series,{color:h.series[c]&&!h.series[c].options.isInternal&&h.series[c].color||h.options.colors[c]||h.options.colors[0]},l,a);u.data=a.data;u.data&&(b.hasNavigatorData=!0,m.push(h.initSeries(u)))});a&&this.addBaseSeriesEvents()};b.prototype.addBaseSeriesEvents=
function(){var a=this,c=a.baseSeries||[];c[0]&&c[0].xAxis&&c[0].eventsToUnbind.push(E(c[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes));c.forEach(function(c){c.eventsToUnbind.push(E(c,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)}));c.eventsToUnbind.push(E(c,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)}));!1!==this.navigatorOptions.adaptToUpdatedData&&c.xAxis&&c.eventsToUnbind.push(E(c,"updatedData",this.updatedDataHandler));
c.eventsToUnbind.push(E(c,"remove",function(){this.navigatorSeries&&(N(a.series,this.navigatorSeries),q(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))},this)};b.prototype.getBaseSeriesMin=function(a){return this.baseSeries.reduce(function(a,c){return Math.min(a,c.xData&&c.xData.length?c.xData[0]:a)},a)};b.prototype.modifyNavigatorAxisExtremes=function(){var a=this.xAxis,c;"undefined"!==typeof a.getExtremes&&(!(c=this.getUnionExtremes(!0))||c.dataMin===
a.min&&c.dataMax===a.max||(a.min=c.dataMin,a.max=c.dataMax))};b.prototype.modifyBaseAxisExtremes=function(){var a=this.chart.navigator,c=this.getExtremes(),b=c.dataMin,e=c.dataMax;c=c.max-c.min;var n=a.stickToMin,d=a.stickToMax,p=I(this.options.overscroll,0),f=a.series&&a.series[0],g=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(n){var k=b;var l=k+c}d&&(l=e+p,n||(k=Math.max(b,l-c,a.getBaseSeriesMin(f&&f.xData?f.xData[0]:-Number.MAX_VALUE))));g&&(n||d)&&
O(k)&&(this.min=this.userMin=k,this.max=this.userMax=l)}a.stickToMin=a.stickToMax=null};b.prototype.updatedDataHandler=function(){var a=this.chart.navigator,c=this.navigatorSeries;a.stickToMax=I(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size));a.stickToMin=a.shouldStickToMin(this,a);c&&!a.hasNavigatorData&&(c.options.pointStart=this.xData[0],c.setData(this.options.data,!1,null,!1))};b.prototype.shouldStickToMin=
function(a,c){c=c.getBaseSeriesMin(a.xData[0]);var b=a.xAxis;a=b.max;var h=b.min;b=b.options.range;return O(a)&&O(h)?b&&0<a-c?a-c<b:h<=c:!1};b.prototype.addChartEvents=function(){this.eventsToUnbind||(this.eventsToUnbind=[]);this.eventsToUnbind.push(E(this.chart,"redraw",function(){var a=this.navigator,c=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||this.xAxis[0]);c&&a.render(c.min,c.max)}),E(this.chart,"getMargins",function(){var a=this.navigator,c=a.opposite?"plotTop":"marginBottom";
this.inverted&&(c=a.opposite?"marginRight":"plotLeft");this[c]=(this[c]||0)+(a.navigatorEnabled||!this.inverted?a.outlineHeight:0)+a.navigatorOptions.margin}))};b.prototype.destroy=function(){this.removeEvents();this.xAxis&&(N(this.chart.xAxis,this.xAxis),N(this.chart.axes,this.xAxis));this.yAxis&&(N(this.chart.yAxis,this.yAxis),N(this.chart.axes,this.yAxis));(this.series||[]).forEach(function(a){a.destroy&&a.destroy()});"series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(a){this[a]&&
this[a].destroy&&this[a].destroy();this[a]=null},this);[this.handles].forEach(function(a){J(a)},this)};return b}();l.Navigator||(l.Navigator=p,y.compose(a),E(v,"beforeShowResetZoom",function(){var a=this.options,c=a.navigator,b=a.rangeSelector;if((c&&c.enabled||b&&b.enabled)&&(!k&&"x"===a.chart.zooming.type||k&&"x"===a.chart.zooming.pinchType))return!1}),E(v,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new p(this)}),E(v,"afterSetChartSize",
function(){var a=this.legend,c=this.navigator;if(c){var b=a&&a.options;var e=c.xAxis;var d=c.yAxis;var p=c.scrollbarHeight;this.inverted?(c.left=c.opposite?this.chartWidth-p-c.height:this.spacing[3]+p,c.top=this.plotTop+p):(c.left=I(e.left,this.plotLeft+p),c.top=c.navigatorOptions.top||this.chartHeight-c.height-p-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(b&&"bottom"===b.verticalAlign&&"proximate"!==b.layout&&b.enabled&&!b.floating?a.legendHeight+
I(b.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0));e&&d&&(this.inverted?e.options.left=d.options.left=c.left:e.options.top=d.options.top=c.top,e.setAxisSize(),d.setAxisSize())}}),E(v,"update",function(a){var c=a.options.navigator||{},b=a.options.scrollbar||{};this.navigator||this.scroller||!c.enabled&&!b.enabled||(x(!0,this.options.navigator,c),x(!0,this.options.scrollbar,b),delete a.options.navigator,delete a.options.scrollbar)}),E(v,"afterUpdate",function(a){this.navigator||this.scroller||
!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new p(this),I(a.redraw,!0)&&this.redraw(a.animation))}),E(v,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),E(b,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}),v.prototype.callbacks.push(function(a){var c=a.navigator;c&&a.xAxis[0]&&(a=a.xAxis[0].getExtremes(),c.render(a.min,a.max))}));l.Navigator=
p;return l.Navigator});J(a,"Extensions/RangeSelector.js",[a["Core/Axis/Axis.js"],a["Core/Chart/Chart.js"],a["Core/Globals.js"],a["Core/DefaultOptions.js"],a["Core/Renderer/SVG/SVGElement.js"],a["Core/Utilities.js"]],function(a,v,A,l,y,r){function D(a){if(-1!==a.indexOf("%L"))return"text";var c="aAdewbBmoyY".split("").some(function(c){return-1!==a.indexOf("%"+c)}),b="HkIlMS".split("").some(function(c){return-1!==a.indexOf("%"+c)});return c&&b?"datetime-local":c?"date":b?"time":"text"}var t=l.defaultOptions,
b=r.addEvent,m=r.createElement,d=r.css,C=r.defined,k=r.destroyObjectProperties,K=r.discardElement,E=r.extend,L=r.find,H=r.fireEvent,q=r.isNumber,J=r.merge,N=r.objectEach,F=r.pad,M=r.pick,g=r.pInt,O=r.splat;E(t,{rangeSelector:{allButtonsEnabled:!1,buttons:void 0,buttonSpacing:5,dropdown:"responsive",enabled:void 0,verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputBoxBorderColor:"none",inputBoxHeight:17,inputBoxWidth:void 0,inputDateFormat:"%b %e, %Y",
inputDateParser:void 0,inputEditDateFormat:"%Y-%m-%d",inputEnabled:!0,inputPosition:{align:"right",x:0,y:0},inputSpacing:5,selected:void 0,buttonPosition:{align:"left",x:0,y:0},inputStyle:{color:"#335cad",cursor:"pointer"},labelStyle:{color:"#666666"}}});E(t.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"",rangeSelectorTo:"\u2192"});var x=function(){function e(a){this.buttons=void 0;this.buttonOptions=e.prototype.defaultButtons;this.initialButtonGroupWidth=0;this.options=void 0;this.chart=a;this.init(a)}
e.prototype.clickButton=function(c,e){var d=this.chart,h=this.buttonOptions[c],p=d.xAxis[0],f=d.scroller&&d.scroller.getUnionExtremes()||p||{},g=f.dataMin,k=f.dataMax,l=p&&Math.round(Math.min(p.max,M(k,p.max))),m=h.type;f=h._range;var x,t=h.dataGrouping;var r=!0;if(null!==g&&null!==k){d.fixedRange=f;this.setSelected(c);t&&(this.forcedDataGrouping=!0,a.prototype.setDataGrouping.call(p||{chart:this.chart},t,!1),this.frozenStates=h.preserveDataGrouping);if("month"===m||"year"===m)if(p){r={range:h,max:l,
chart:d,dataMin:g,dataMax:k};var v=p.minFromRange.call(r);q(r.newMax)&&(l=r.newMax);r=!1}else f=h;else if(f)v=Math.max(l-f,g),l=Math.min(v+f,k),r=!1;else if("ytd"===m)if(p){if("undefined"===typeof k||"undefined"===typeof g)g=Number.MAX_VALUE,k=Number.MIN_VALUE,d.series.forEach(function(a){if(a=a.xData)g=Math.min(a[0],g),k=Math.max(a[a.length-1],k)}),e=!1;l=this.getYTDExtremes(k,g,d.time.useUTC);v=x=l.min;l=l.max}else{this.deferredYTDClick=c;return}else"all"===m&&p&&(d.navigator&&d.navigator.baseSeries[0]&&
(d.navigator.baseSeries[0].xAxis.options.range=void 0),v=g,l=k);r&&h._offsetMin&&C(v)&&(v+=h._offsetMin);h._offsetMax&&C(l)&&(l+=h._offsetMax);this.dropdown&&(this.dropdown.selectedIndex=c+1);if(p)p.setExtremes(v,l,M(e,!0),void 0,{trigger:"rangeSelectorButton",rangeSelectorButton:h});else{var y=O(d.options.xAxis)[0];var I=y.range;y.range=f;var A=y.min;y.min=x;b(d,"load",function(){y.range=I;y.min=A})}H(this,"afterBtnClick")}};e.prototype.setSelected=function(a){this.selected=this.options.selected=
a};e.prototype.init=function(a){var c=this,e=a.options.rangeSelector,h=e.buttons||c.defaultButtons.slice(),d=e.selected,f=function(){var a=c.minInput,b=c.maxInput;a&&a.blur&&H(a,"blur");b&&b.blur&&H(b,"blur")};c.chart=a;c.options=e;c.buttons=[];c.buttonOptions=h;this.eventsToUnbind=[];this.eventsToUnbind.push(b(a.container,"mousedown",f));this.eventsToUnbind.push(b(a,"resize",f));h.forEach(c.computeButtonRange);"undefined"!==typeof d&&h[d]&&this.clickButton(d,!1);this.eventsToUnbind.push(b(a,"load",
function(){a.xAxis&&a.xAxis[0]&&b(a.xAxis[0],"setExtremes",function(b){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==b.trigger&&"updatedData"!==b.trigger&&c.forcedDataGrouping&&!c.frozenStates&&this.setDataGrouping(!1,!1)})}))};e.prototype.updateButtonStates=function(){var a=this,b=this.chart,e=this.dropdown,h=b.xAxis[0],d=Math.round(h.max-h.min),f=!h.hasVisibleSeries,g=b.scroller&&b.scroller.getUnionExtremes()||h,k=g.dataMin,l=g.dataMax;b=a.getYTDExtremes(l,k,b.time.useUTC);var m=b.min,
x=b.max,t=a.selected,r=q(t),v=a.options.allButtonsEnabled,y=a.buttons;a.buttonOptions.forEach(function(c,b){var n=c._range,p=c.type,g=c.count||1,u=y[b],w=0,q=c._offsetMax-c._offsetMin;c=b===t;var z=n>l-k,B=n<h.minRange,G=!1,P=!1;n=n===d;("month"===p||"year"===p)&&d+36E5>=864E5*{month:28,year:365}[p]*g-q&&d-36E5<=864E5*{month:31,year:366}[p]*g+q?n=!0:"ytd"===p?(n=x-m+q===d,G=!c):"all"===p&&(n=h.max-h.min>=l-k,P=!c&&r&&n);p=!v&&(z||B||P||f);g=c&&n||n&&!r&&!G||c&&a.frozenStates;p?w=3:g&&(r=!0,w=2);u.state!==
w&&(u.setState(w),e&&(e.options[b+1].disabled=p,2===w&&(e.selectedIndex=b+1)),0===w&&t===b&&a.setSelected())})};e.prototype.computeButtonRange=function(a){var c=a.type,b=a.count||1,e={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(e[c])a._range=e[c]*b;else if("month"===c||"year"===c)a._range=864E5*{month:30,year:365}[c]*b;a._offsetMin=M(a.offsetMin,0);a._offsetMax=M(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin};e.prototype.getInputValue=function(a){a="min"===a?this.minInput:
this.maxInput;var c=this.chart.options.rangeSelector,b=this.chart.time;return a?("text"===a.type&&c.inputDateParser||this.defaultInputDateParser)(a.value,b.useUTC,b):0};e.prototype.setInputValue=function(a,b){var c=this.options,e=this.chart.time,d="min"===a?this.minInput:this.maxInput;a="min"===a?this.minDateBox:this.maxDateBox;if(d){var f=d.getAttribute("data-hc-time");f=C(f)?Number(f):void 0;C(b)&&(C(f)&&d.setAttribute("data-hc-time-previous",f),d.setAttribute("data-hc-time",b),f=b);d.value=e.dateFormat(this.inputTypeFormats[d.type]||
c.inputEditDateFormat,f);a&&a.attr({text:e.dateFormat(c.inputDateFormat,f)})}};e.prototype.setInputExtremes=function(a,b,e){if(a="min"===a?this.minInput:this.maxInput){var c=this.inputTypeFormats[a.type],d=this.chart.time;c&&(b=d.dateFormat(c,b),a.min!==b&&(a.min=b),e=d.dateFormat(c,e),a.max!==e&&(a.max=e))}};e.prototype.showInput=function(a){var c="min"===a?this.minDateBox:this.maxDateBox;if((a="min"===a?this.minInput:this.maxInput)&&c&&this.inputGroup){var b="text"===a.type,e=this.inputGroup,f=
e.translateX;e=e.translateY;var g=this.options.inputBoxWidth;d(a,{width:b?c.width+(g?-2:20)+"px":"auto",height:b?c.height-2+"px":"auto",border:"2px solid silver"});b&&g?d(a,{left:f+c.x+"px",top:e+"px"}):d(a,{left:Math.min(Math.round(c.x+f-(a.offsetWidth-c.width)/2),this.chart.chartWidth-a.offsetWidth)+"px",top:e-(a.offsetHeight-c.height)/2+"px"})}};e.prototype.hideInput=function(a){(a="min"===a?this.minInput:this.maxInput)&&d(a,{top:"-9999em",border:0,width:"1px",height:"1px"})};e.prototype.defaultInputDateParser=
function(a,b,e){var c=a.split("/").join("-").split(" ").join("T");-1===c.indexOf("T")&&(c+="T00:00");if(b)c+="Z";else{var d;if(d=A.isSafari)d=c,d=!(6<d.length&&(d.lastIndexOf("-")===d.length-6||d.lastIndexOf("+")===d.length-6));d&&(d=(new Date(c)).getTimezoneOffset()/60,c+=0>=d?"+".concat(F(-d),":00"):"-".concat(F(d),":00"))}c=Date.parse(c);q(c)||(a=a.split("-"),c=Date.UTC(g(a[0]),g(a[1])-1,g(a[2])));e&&b&&q(c)&&(c+=e.getTimezoneOffset(c));return c};e.prototype.drawInput=function(a){function b(){var b=
g.getInputValue(a),e=c.xAxis[0],d=c.scroller&&c.scroller.xAxis?c.scroller.xAxis:e,h=d.dataMin;d=d.dataMax;var f=g.maxInput,n=g.minInput;b!==Number(v.getAttribute("data-hc-time-previous"))&&q(b)&&(v.setAttribute("data-hc-time-previous",b),r&&f&&q(h)?b>Number(f.getAttribute("data-hc-time"))?b=void 0:b<h&&(b=h):n&&q(d)&&(b<Number(n.getAttribute("data-hc-time"))?b=void 0:b>d&&(b=d)),"undefined"!==typeof b&&e.setExtremes(r?b:e.min,r?e.max:b,void 0,void 0,{trigger:"rangeSelectorInput"}))}var c=this.chart,
e=this.div,f=this.inputGroup,g=this,k=c.renderer.style||{},l=c.renderer,x=c.options.rangeSelector,r="min"===a,z=t.lang[r?"rangeSelectorFrom":"rangeSelectorTo"]||"";z=l.label(z,0).addClass("highcharts-range-label").attr({padding:z?2:0,height:z?x.inputBoxHeight:0}).add(f);l=l.label("",0).addClass("highcharts-range-input").attr({padding:2,width:x.inputBoxWidth,height:x.inputBoxHeight,"text-align":"center"}).on("click",function(){g.showInput(a);g[a+"Input"].focus()});c.styledMode||l.attr({stroke:x.inputBoxBorderColor,
"stroke-width":1});l.add(f);var v=m("input",{name:a,className:"highcharts-range-selector"},void 0,e);v.setAttribute("type",D(x.inputDateFormat||"%b %e, %Y"));c.styledMode||(z.css(J(k,x.labelStyle)),l.css(J({color:"#333333"},k,x.inputStyle)),d(v,E({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:k.fontSize,fontFamily:k.fontFamily,top:"-9999em"},x.inputStyle)));v.onfocus=function(){g.showInput(a)};v.onblur=function(){v===
A.doc.activeElement&&b();g.hideInput(a);g.setInputValue(a);v.blur()};var y=!1;v.onchange=function(){y||(b(),g.hideInput(a),v.blur())};v.onkeypress=function(a){13===a.keyCode&&b()};v.onkeydown=function(a){y=!0;38!==a.keyCode&&40!==a.keyCode||b()};v.onkeyup=function(){y=!1};return{dateBox:l,input:v,label:z}};e.prototype.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}};e.prototype.getYTDExtremes=function(a,b,e){var c=this.chart.time,d=new c.Date(a),f=c.get("FullYear",d);e=e?c.Date.UTC(f,0,1):+new c.Date(f,0,1);b=Math.max(b,e);d=d.getTime();return{max:Math.min(a||d,d),min:b}};e.prototype.render=function(a,b){var c=this.chart,e=c.renderer,d=c.container,f=c.options,g=f.rangeSelector,p=M(f.chart.style&&f.chart.style.zIndex,0)+1;f=g.inputEnabled;if(!1!==g.enabled){this.rendered||(this.group=e.g("range-selector-group").attr({zIndex:7}).add(),this.div=m("div",void 0,
{position:"relative",height:0,zIndex:p}),this.buttonOptions.length&&this.renderButtons(),d.parentNode&&d.parentNode.insertBefore(this.div,d),f&&(this.inputGroup=e.g("input-group").add(this.group),e=this.drawInput("min"),this.minDateBox=e.dateBox,this.minLabel=e.label,this.minInput=e.input,e=this.drawInput("max"),this.maxDateBox=e.dateBox,this.maxLabel=e.label,this.maxInput=e.input));if(f&&(this.setInputValue("min",a),this.setInputValue("max",b),a=c.scroller&&c.scroller.getUnionExtremes()||c.xAxis[0]||
{},C(a.dataMin)&&C(a.dataMax)&&(c=c.xAxis[0].minRange||0,this.setInputExtremes("min",a.dataMin,Math.min(a.dataMax,this.getInputValue("max"))-c),this.setInputExtremes("max",Math.max(a.dataMin,this.getInputValue("min"))+c,a.dataMax)),this.inputGroup)){var k=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(function(a){if(a){var b=a.getBBox().width;b&&(a.attr({x:k}),k+=b+g.inputSpacing)}})}this.alignElements();this.rendered=!0}};e.prototype.renderButtons=function(){var a=this,e=
this.buttons,d=this.options,h=t.lang,f=this.chart.renderer,g=J(d.buttonTheme),k=g&&g.states,l=g.width||28;delete g.width;delete g.states;this.buttonGroup=f.g("range-selector-buttons").add(this.group);var q=this.dropdown=m("select",void 0,{position:"absolute",width:"1px",height:"1px",padding:0,border:0,top:"-9999em",cursor:"pointer",opacity:.0001},this.div);b(q,"touchstart",function(){q.style.fontSize="16px"});[[A.isMS?"mouseover":"mouseenter"],[A.isMS?"mouseout":"mouseleave"],["change","click"]].forEach(function(c){var d=
c[0],h=c[1];b(q,d,function(){var b=e[a.currentButtonIndex()];b&&H(b.element,h||d)})});this.zoomText=f.label(h&&h.rangeSelectorZoom||"",0).attr({padding:d.buttonTheme.padding,height:d.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup);this.chart.styledMode||(this.zoomText.css(d.labelStyle),g["stroke-width"]=M(g["stroke-width"],0));m("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,q);this.buttonOptions.forEach(function(b,c){m("option",{textContent:b.title||b.text},
void 0,q);e[c]=f.button(b.text,0,0,function(e){var d=b.events&&b.events.click,h;d&&(h=d.call(b,e));!1!==h&&a.clickButton(c);a.isActive=!0},g,k&&k.hover,k&&k.select,k&&k.disabled).attr({"text-align":"center",width:l}).add(a.buttonGroup);b.title&&e[c].attr("title",b.title)})};e.prototype.alignElements=function(){var a=this,b=this.buttonGroup,e=this.buttons,d=this.chart,f=this.group,g=this.inputGroup,k=this.options,l=this.zoomText,m=d.options,q=m.exporting&&!1!==m.exporting.enabled&&m.navigation&&m.navigation.buttonOptions;
m=k.buttonPosition;var x=k.inputPosition,t=k.verticalAlign,r=function(b,c){return q&&a.titleCollision(d)&&"top"===t&&"right"===c.align&&c.y-b.getBBox().height-12<(q.y||0)+(q.height||0)+d.spacing[0]?-40:0},v=d.plotLeft;if(f&&m&&x){var y=m.x-d.spacing[3];if(b){this.positionButtons();if(!this.initialButtonGroupWidth){var I=0;l&&(I+=l.getBBox().width+5);e.forEach(function(a,b){I+=a.width;b!==e.length-1&&(I+=k.buttonSpacing)});this.initialButtonGroupWidth=I}v-=d.spacing[3];this.updateButtonStates();l=
r(b,m);this.alignButtonGroup(l);f.placed=b.placed=d.hasLoaded}b=0;g&&(b=r(g,x),"left"===x.align?y=v:"right"===x.align&&(y=-Math.max(d.axisOffset[1],-b)),g.align({y:x.y,width:g.getBBox().width,align:x.align,x:x.x+y-2},!0,d.spacingBox),g.placed=d.hasLoaded);this.handleCollision(b);f.align({verticalAlign:t},!0,d.spacingBox);g=f.alignAttr.translateY;b=f.getBBox().height+20;r=0;"bottom"===t&&(r=(r=d.legend&&d.legend.options)&&"bottom"===r.verticalAlign&&r.enabled&&!r.floating?d.legend.legendHeight+M(r.margin,
10):0,b=b+r-20,r=g-b-(k.floating?0:k.y)-(d.titleOffset?d.titleOffset[2]:0)-10);if("top"===t)k.floating&&(r=0),d.titleOffset&&d.titleOffset[0]&&(r=d.titleOffset[0]),r+=d.margin[0]-d.spacing[0]||0;else if("middle"===t)if(x.y===m.y)r=g;else if(x.y||m.y)r=0>x.y||0>m.y?r-Math.min(x.y,m.y):g-b;f.translate(k.x,k.y+Math.floor(r));m=this.minInput;x=this.maxInput;g=this.dropdown;k.inputEnabled&&m&&x&&(m.style.marginTop=f.translateY+"px",x.style.marginTop=f.translateY+"px");g&&(g.style.marginTop=f.translateY+
"px")}};e.prototype.alignButtonGroup=function(a,b){var c=this.chart,e=this.buttonGroup,d=this.options.buttonPosition,f=c.plotLeft-c.spacing[3],g=d.x-c.spacing[3];"right"===d.align?g+=a-f:"center"===d.align&&(g-=f/2);e&&e.align({y:d.y,width:M(b,this.initialButtonGroupWidth),align:d.align,x:g},!0,c.spacingBox)};e.prototype.positionButtons=function(){var a=this.buttons,b=this.chart,e=this.options,d=this.zoomText,f=b.hasLoaded?"animate":"attr",g=e.buttonPosition,k=b.plotLeft,l=k;d&&"hidden"!==d.visibility&&
(d[f]({x:M(k+g.x,k)}),l+=g.x+d.getBBox().width+5);this.buttonOptions.forEach(function(b,c){if("hidden"!==a[c].visibility)a[c][f]({x:l}),l+=a[c].width+e.buttonSpacing;else a[c][f]({x:k})})};e.prototype.handleCollision=function(a){var b=this,c=this.chart,e=this.buttonGroup,d=this.inputGroup,f=this.options,g=f.buttonPosition,k=f.dropdown,l=f.inputPosition;f=function(){var a=0;b.buttons.forEach(function(b){b=b.getBBox();b.width>a&&(a=b.width)});return a};var m=function(b){if(d&&e){var c=d.alignAttr.translateX+
d.alignOptions.x-a+d.getBBox().x+2,f=d.alignOptions.width,h=e.alignAttr.translateX+e.getBBox().x;return h+b>c&&c+f>h&&g.y<l.y+d.getBBox().height}return!1},q=function(){d&&e&&d.attr({translateX:d.alignAttr.translateX+(c.axisOffset[1]>=-a?0:-a),translateY:d.alignAttr.translateY+e.getBBox().height+10})};if(e){if("always"===k){this.collapseButtons(a);m(f())&&q();return}"never"===k&&this.expandButtons()}d&&e?l.align===g.align||m(this.initialButtonGroupWidth+20)?"responsive"===k?(this.collapseButtons(a),
m(f())&&q()):q():"responsive"===k&&this.expandButtons():e&&"responsive"===k&&(this.initialButtonGroupWidth>c.plotWidth?this.collapseButtons(a):this.expandButtons())};e.prototype.collapseButtons=function(a){var b=this.buttons,c=this.buttonOptions,e=this.chart,d=this.dropdown,f=this.options,g=this.zoomText,k=e.userOptions.rangeSelector&&e.userOptions.rangeSelector.buttonTheme||{},l=function(a){return{text:a?""+a+" \u25be":"\u25be",width:"auto",paddingLeft:M(f.buttonTheme.paddingLeft,k.padding,8),paddingRight:M(f.buttonTheme.paddingRight,
k.padding,8)}};g&&g.hide();var m=!1;c.forEach(function(a,c){c=b[c];2!==c.state?c.hide():(c.show(),c.attr(l(a.text)),m=!0)});m||(d&&(d.selectedIndex=0),b[0].show(),b[0].attr(l(this.zoomText&&this.zoomText.textStr)));c=f.buttonPosition.align;this.positionButtons();"right"!==c&&"center"!==c||this.alignButtonGroup(a,b[this.currentButtonIndex()].getBBox().width);this.showDropdown()};e.prototype.expandButtons=function(){var a=this.buttons,b=this.buttonOptions,e=this.options,d=this.zoomText;this.hideDropdown();
d&&d.show();b.forEach(function(b,c){c=a[c];c.show();c.attr({text:b.text,width:e.buttonTheme.width||28,paddingLeft:M(e.buttonTheme.paddingLeft,"unset"),paddingRight:M(e.buttonTheme.paddingRight,"unset")});2>c.state&&c.setState(0)});this.positionButtons()};e.prototype.currentButtonIndex=function(){var a=this.dropdown;return a&&0<a.selectedIndex?a.selectedIndex-1:0};e.prototype.showDropdown=function(){var a=this.buttonGroup,b=this.buttons,e=this.chart,f=this.dropdown;if(a&&f){var g=a.translateX;a=a.translateY;
b=b[this.currentButtonIndex()].getBBox();d(f,{left:e.plotLeft+g+"px",top:a+.5+"px",width:b.width+"px",height:b.height+"px"});this.hasVisibleDropdown=!0}};e.prototype.hideDropdown=function(){var a=this.dropdown;a&&(d(a,{top:"-9999em",width:"1px",height:"1px"}),this.hasVisibleDropdown=!1)};e.prototype.getHeight=function(){var a=this.options,b=this.group,e=a.y,d=a.buttonPosition.y,f=a.inputPosition.y;if(a.height)return a.height;this.alignElements();a=b?b.getBBox(!0).height+13+e:0;b=Math.min(f,d);if(0>
f&&0>d||0<f&&0<d)a+=Math.abs(b);return a};e.prototype.titleCollision=function(a){return!(a.options.title.text||a.options.subtitle.text)};e.prototype.update=function(a){var b=this.chart;J(!0,b.options.rangeSelector,a);this.destroy();this.init(b);this.render()};e.prototype.destroy=function(){var a=this,b=a.minInput,d=a.maxInput;a.eventsToUnbind&&(a.eventsToUnbind.forEach(function(a){return a()}),a.eventsToUnbind=void 0);k(a.buttons);b&&(b.onfocus=b.onblur=b.onchange=null);d&&(d.onfocus=d.onblur=d.onchange=
null);N(a,function(b,c){b&&"chart"!==c&&(b instanceof y?b.destroy():b instanceof window.HTMLElement&&K(b));b!==e.prototype[c]&&(a[c]=null)},this)};return e}();x.prototype.defaultButtons=[{type:"month",count:1,text:"1m",title:"View 1 month"},{type:"month",count:3,text:"3m",title:"View 3 months"},{type:"month",count:6,text:"6m",title:"View 6 months"},{type:"ytd",text:"YTD",title:"View year to date"},{type:"year",count:1,text:"1y",title:"View 1 year"},{type:"all",text:"All",title:"View all"}];x.prototype.inputTypeFormats=
{"datetime-local":"%Y-%m-%dT%H:%M:%S",date:"%Y-%m-%d",time:"%H:%M:%S"};a.prototype.minFromRange=function(){var a=this.range,b=a.type,d=this.max,f=this.chart.time,g=function(a,c){var e="year"===b?"FullYear":"Month",d=new f.Date(a),g=f.get(e,d);f.set(e,d,g+c);g===f.get(e,d)&&f.set("Date",d,0);return d.getTime()-a};if(q(a)){var k=d-a;var l=a}else a&&(k=d+g(d,-(a.count||1)),this.chart&&(this.chart.fixedRange=d-k));var m=M(this.dataMin,Number.MIN_VALUE);q(k)||(k=m);k<=m&&(k=m,"undefined"===typeof l&&(l=
g(k,a.count)),this.newMax=Math.min(k+l,M(this.dataMax,Number.MAX_VALUE)));q(d)?!q(a)&&a&&a._offsetMin&&(k+=a._offsetMin):k=void 0;return k};if(!A.RangeSelector){var I=[],f=function(a){function c(){d&&(e=a.xAxis[0].getExtremes(),f=a.legend,k=d&&d.options.verticalAlign,q(e.min)&&d.render(e.min,e.max),f.display&&"top"===k&&k===f.options.verticalAlign&&(g=J(a.spacingBox),g.y="vertical"===f.options.layout?a.plotTop:g.y+d.getHeight(),f.group.placed=!1,f.align(g)))}var e,d=a.rangeSelector,f,g,k;d&&(L(I,
function(b){return b[0]===a})||I.push([a,[b(a.xAxis[0],"afterSetExtremes",function(a){d&&d.render(a.min,a.max)}),b(a,"redraw",c)]]),c())};b(v,"afterGetContainer",function(){this.options.rangeSelector&&this.options.rangeSelector.enabled&&(this.rangeSelector=new x(this))});b(v,"beforeRender",function(){var a=this.axes,b=this.rangeSelector;b&&(q(b.deferredYTDClick)&&(b.clickButton(b.deferredYTDClick),delete b.deferredYTDClick),a.forEach(function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),
b.render(),a=b.options.verticalAlign,b.options.floating||("bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0)))});b(v,"update",function(a){var b=a.options.rangeSelector;a=this.rangeSelector;var d=this.extraBottomMargin,e=this.extraTopMargin;b&&b.enabled&&!C(a)&&this.options.rangeSelector&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=a=new x(this));this.extraTopMargin=this.extraBottomMargin=!1;a&&(f(this),b=b&&b.verticalAlign||a.options&&a.options.verticalAlign,
a.options.floating||("bottom"===b?this.extraBottomMargin=!0:"middle"!==b&&(this.extraTopMargin=!0)),this.extraBottomMargin!==d||this.extraTopMargin!==e)&&(this.isDirtyBox=!0)});b(v,"render",function(){var a=this.rangeSelector;a&&!a.options.floating&&(a.render(),a=a.options.verticalAlign,"bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0))});b(v,"getMargins",function(){var a=this.rangeSelector;a&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&
(this.marginBottom+=a))});v.prototype.callbacks.push(f);b(v,"destroy",function(){for(var a=0;a<I.length;a++){var b=I[a];if(b[0]===this){b[1].forEach(function(a){return a()});I.splice(a,1);break}}});A.RangeSelector=x}return x});J(a,"Core/Chart/StockChart.js",[a["Core/Animation/AnimationUtilities.js"],a["Core/Axis/Axis.js"],a["Core/Chart/Chart.js"],a["Core/FormatUtilities.js"],a["Core/DefaultOptions.js"],a["Core/Series/Series.js"],a["Core/Renderer/SVG/SVGRenderer.js"],a["Core/Utilities.js"]],function(a,
v,A,l,y,r,D,t){function b(a,b){return"xAxis"===a?{minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0}:"yAxis"===a?{labels:{y:-2},opposite:F(b.opposite,!0),showLastLabel:!(!b.categories&&"category"!==b.type),title:{text:null}}:{}}function m(a,b){if("xAxis"===a){a=k();var d={type:"datetime",categories:void 0};F(b.navigator&&b.navigator.enabled,a.navigator.enabled,!0)&&(d.startOnTick=!1,d.endOnTick=!1);return d}return{}}var d=this&&this.__extends||
function(){var a=function(b,d){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d])};return a(b,d)};return function(b,d){function g(){this.constructor=b}a(b,d);b.prototype=null===d?Object.create(d):(g.prototype=d.prototype,new g)}}(),C=l.format,k=y.getOptions;a=t.addEvent;var K=t.clamp,E=t.defined,J=t.extend,H=t.find,q=t.isNumber,R=t.isString,N=t.merge,F=t.pick,M=t.splat;t=function(a){function g(){return null!==
a&&a.apply(this,arguments)||this}d(g,a);g.prototype.init=function(d,g){var f=k(),e=d.xAxis,c=d.yAxis,l=F(d.navigator&&d.navigator.enabled,f.navigator.enabled,!0);d.xAxis=d.yAxis=void 0;l=N({chart:{panning:{enabled:!0,type:"x"},zooming:{pinchType:"x"}},navigator:{enabled:l},scrollbar:{enabled:F(f.scrollbar&&f.scrollbar.enabled,!0)},rangeSelector:{enabled:F(f.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:F(f.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1}},d,{isStock:!0});d.xAxis=
e;d.yAxis=c;l.xAxis=M(d.xAxis||{}).map(function(a,c){return N(b("xAxis",a),f.xAxis,f.xAxis&&f.xAxis[c],a,m("xAxis",d))});l.yAxis=M(d.yAxis||{}).map(function(a,c){return N(b("yAxis",a),f.yAxis,f.yAxis&&f.yAxis[c],a)});a.prototype.init.call(this,l,g)};g.prototype.createAxis=function(d,g){g.axis=N(b(d,g.axis),g.axis,m(d,this.userOptions));return a.prototype.createAxis.call(this,d,g)};return g}(A);(function(a){a.stockChart=function(b,d,g){return new a(b,d,g)}})(t||(t={}));a(r,"setOptions",function(a){var b;
this.chart.options.isStock&&(this.is("column")||this.is("columnrange")?b={borderWidth:0,shadow:!1}:this.is("scatter")||this.is("sma")||(b={marker:{enabled:!1,radius:2}}),b&&(a.plotOptions[this.type]=N(a.plotOptions[this.type],b)))});a(v,"autoLabelAlign",function(a){var b=this.chart,d=this.options;b=b._labelPanes=b._labelPanes||{};var g=this.options.labels;this.chart.options.isStock&&"yAxis"===this.coll&&(d=d.top+","+d.height,!b[d]&&g.enabled&&(15===g.x&&(g.x=0),"undefined"===typeof g.align&&(g.align=
"right"),b[d]=this,a.align="right",a.preventDefault()))});a(v,"destroy",function(){var a=this.chart,b=this.options&&this.options.top+","+this.options.height;b&&a._labelPanes&&a._labelPanes[b]===this&&delete a._labelPanes[b]});a(v,"getPlotLinePath",function(a){function b(a){var b="xAxis"===a?"yAxis":"xAxis";a=d.options[b];return q(a)?[f[b][a]]:R(a)?[f.get(a)]:g.map(function(a){return a[b]})}var d=this,g=this.isLinked&&!this.series?this.linkedParent.series:this.series,f=d.chart,e=f.renderer,c=d.left,
k=d.top,l,h,m,t,r=[],v=[],y=a.translatedValue,A=a.value,z=a.force;if(f.options.isStock&&!1!==a.acrossPanes&&"xAxis"===d.coll||"yAxis"===d.coll){a.preventDefault();v=b(d.coll);var C=d.isXAxis?f.yAxis:f.xAxis;C.forEach(function(a){if(E(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis";b=E(a.options[b])?f[b][a.options[b]]:f[b][0];d===b&&v.push(a)}});var D=v.length?[]:[d.isXAxis?f.yAxis[0]:f.xAxis[0]];v.forEach(function(a){-1!==D.indexOf(a)||H(D,function(b){return b.pos===
a.pos&&b.len===a.len})||D.push(a)});var J=F(y,d.translate(A,void 0,void 0,a.old));q(J)&&(d.horiz?D.forEach(function(a){var b;h=a.pos;t=h+a.len;l=m=Math.round(J+d.transB);"pass"!==z&&(l<c||l>c+d.width)&&(z?l=m=K(l,c,c+d.width):b=!0);b||r.push(["M",l,h],["L",m,t])}):D.forEach(function(a){var b;l=a.pos;m=l+a.len;h=t=Math.round(k+d.height-J);"pass"!==z&&(h<k||h>k+d.height)&&(z?h=t=K(h,k,k+d.height):b=!0);b||r.push(["M",l,h],["L",m,t])}));a.path=0<r.length?e.crispPolyLine(r,a.lineWidth||1):null}});D.prototype.crispPolyLine=
function(a,b){for(var d=0;d<a.length;d+=2){var g=a[d],f=a[d+1];g[1]===f[1]&&(g[1]=f[1]=Math.round(g[1])-b%2/2);g[2]===f[2]&&(g[2]=f[2]=Math.round(g[2])+b%2/2)}return a};a(v,"afterHideCrosshair",function(){this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});a(v,"afterDrawCrosshair",function(a){var b,d;if(this.crosshair&&this.crosshair.label&&this.crosshair.label.enabled&&this.cross&&q(this.min)&&q(this.max)){var g=this.chart,f=this.logarithmic,e=this.crosshair.label,c=this.horiz,k=this.opposite,
l=this.left,h=this.top,m=this.crossLabel,t=e.format,r="",v="inside"===this.options.tickPosition,y=!1!==this.crosshair.snap,A=0,z=a.e||this.cross&&this.cross.e;a=a.point;var D=this.min,E=this.max;f&&(D=f.lin2log(D),E=f.lin2log(E));f=c?"center":k?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";m||(m=this.crossLabel=g.renderer.label("",0,void 0,e.shape||"callout").addClass("highcharts-crosshair-label highcharts-color-"+(a&&a.series?a.series.colorIndex:this.series[0]&&
this.series[0].colorIndex)).attr({align:e.align||f,padding:F(e.padding,8),r:F(e.borderRadius,3),zIndex:2}).add(this.labelGroup),g.styledMode||m.attr({fill:e.backgroundColor||a&&a.series&&a.series.color||"#666666",stroke:e.borderColor||"","stroke-width":e.borderWidth||0}).css(J({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},e.style||{})));c?(f=y?(a.plotX||0)+l:z.chartX,h+=k?0:this.height):(f=k?this.width+l:0,h=y?(a.plotY||0)+h:z.chartY);t||e.formatter||(this.dateTime&&(r=
"%b %d, %Y"),t="{value"+(r?":"+r:"")+"}");r=y?this.isXAxis?a.x:a.y:this.toValue(c?z.chartX:z.chartY);y=a&&a.series?a.series.isPointInside(a):q(r)&&r>D&&r<E;z="";t?z=C(t,{value:r},g):e.formatter&&q(r)&&(z=e.formatter.call(this,r));m.attr({text:z,x:f,y:h,visibility:y?"inherit":"hidden"});e=m.getBBox();if(q(m.y))if(c){if(v&&!k||!v&&k)h=m.y-e.height}else h=m.y-e.height/2;c?(b=l-e.x,d=l+this.width-e.x):(b="left"===this.labelAlign?l:0,d="right"===this.labelAlign?l+this.width:g.chartWidth);m.translateX<
b&&(A=b-m.translateX);m.translateX+e.width>=d&&(A=-(m.translateX+e.width-d));m.attr({x:f+A,y:h,anchorX:c?f:this.opposite?0:g.chartWidth,anchorY:c?this.opposite?g.chartHeight:0:h+e.height/2})}});r.prototype.forceCropping=function(){var a=this.chart,b=this.options.dataGrouping;return!1!==this.allowDG&&b&&F(b.enabled,a.options.isStock)};a(A,"update",function(a){a=a.options;"scrollbar"in a&&this.navigator&&(N(!0,this.options.scrollbar,a.scrollbar),this.navigator.update({},!1),delete a.scrollbar)});return t});
J(a,"masters/modules/stock.src.js",[a["Core/Globals.js"],a["Core/Axis/OrdinalAxis.js"],a["Series/DataModifyComposition.js"],a["Core/Scrollbar.js"],a["Core/Chart/StockChart.js"]],function(a,v,A,l,y){a.Scrollbar=l;a.StockChart=a.stockChart=y.stockChart;l.compose(a.Axis);v.compose(a.Axis,a.Series,a.Chart);A.compose(a.Series,a.Axis,a.Point)})});
//# sourceMappingURL=stock.js.map