/*
 Highstock JS v11.1.0 (2023-06-05)

 Highcharts Stock as a plugin for Highcharts

 (c) 2010-2021 Torstein Honsi

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