let t,e;/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/stock
 * @requires highcharts
 *
 * Highcharts Stock as a plugin for Highcharts
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Torstein Hønsi
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */import*as i from"../highcharts.js";import"./broken-axis.js";import"./datagrouping.js";import"./mouse-wheel-zoom.js";var s,o,n,r,a,l={};l.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return l.d(e,{a:e}),e},l.d=(t,e)=>{for(var i in e)l.o(e,i)&&!l.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},l.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let h=i.default;var d=l.n(h);let p=i.default.Point;var c=l.n(p);let u=i.default.Series;var g=l.n(u);let{doc:f,win:m}=d();function x(t,e,i,s={}){let o="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let n=o.hcEvents;d().Point&&t instanceof d().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let r=t.addEventListener;r&&r.call(t,e,i,!!d().supportsPassiveEvents&&{passive:void 0===s.passive?-1!==e.indexOf("touch"):s.passive,capture:!1}),n[e]||(n[e]=[]);let a={fn:i,order:"number"==typeof s.order?s.order:1/0};return n[e].push(a),n[e].sort((t,e)=>t.order-e.order),function(){X(t,e,i)}}function b(t,e,i){return t>e?t<i?t:i:e}function v(t,e){return t>1e14?t:parseFloat(t.toPrecision(e||14))}function y(t,e,i,s,o){let n=f.createElement(t);return e&&O(n,e),o&&A(n,{padding:"0",border:"none",margin:"0"}),i&&A(n,i),s&&s.appendChild(n),n}function M(t,e=0,i){let s=e%2/2,o=i?-1:1;return(Math.round(t*o-s)+s)*o}function A(t,e){O(t.style,e)}function w(t){return null!=t}function k(t,e,i){I(t,function(s,o){s!==e&&s?.destroy&&s.destroy(),(s?.destroy||!i)&&delete t[o]})}function S(t,e){let i=t.length;for(;i--;)if(t[i]===e){t.splice(i,1);break}}function O(t,e){let i;for(i in t||(t={}),e)t[i]=e[i];return t}function E(t,e,i,s){if(i=i||{},f?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==d())){let s=f.createEvent("Events");s.initEvent(e,!0,!0),i=O(s,i),t.dispatchEvent?t.dispatchEvent(i):t.fireEvent(e,i)}else if(t.hcEvents){i.target||O(i,{preventDefault:function(){i.defaultPrevented=!0},target:t,type:e});let s=[],o=t,n=!1;for(;o.hcEvents;)Object.hasOwnProperty.call(o,"hcEvents")&&o.hcEvents[e]&&(s.length&&(n=!0),s.unshift.apply(s,o.hcEvents[e])),o=Object.getPrototypeOf(o);n&&s.sort((t,e)=>t.order-e.order),s.forEach(e=>{!1===e.fn.call(t,i,t)&&i.preventDefault()})}s&&!i.defaultPrevented&&s.call(t,i)}let C=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){let i,s=t.length;for(i=0;i<s;i++)if(e(t[i],i))return t[i]};function T(t){return R(t)&&"number"==typeof t.nodeType}function B(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function D(t){return"string"==typeof t}function P(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function R(t,e){return!!t&&"object"==typeof t&&(!e||!P(t))}function z(t,...e){let i,s=[t,...e],o={},n=function(t,e){return"object"!=typeof t&&(t={}),I(e,function(i,s){if("__proto__"!==s&&"constructor"!==s){let o;!R(i,!0)||(o=i?.constructor,R(i,!0)&&!T(i)&&o?.name&&"Object"!==o.name)||T(i)?t[s]=e[s]:t[s]=n(t[s]||{},i)}}),t};!0===t&&(o=s[1],s=Array.prototype.slice.call(s,2));let r=s.length;for(i=0;i<r;i++)o=n(o,s[i]);return o}function I(t,e,i){for(let s in t)Object.hasOwnProperty.call(t,s)&&e.call(i||t[s],t[s],s,t)}function L(){let t=arguments,e=t.length;for(let i=0;i<e;i++){let e=t[i];if(null!=e)return e}}function W(t,e){return 0>t.indexOf(e)&&!!t.push(e)}function X(t,e,i){function s(e,i){let s=t.removeEventListener;s&&s.call(t,e,i,!1)}function o(i){let o,n;t.nodeName&&(e?(o={})[e]=!0:o=i,I(o,function(t,e){if(i[e])for(n=i[e].length;n--;)s(e,i[e][n].fn)}))}let n="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(n,"hcEvents")){let t=n.hcEvents;if(e){let n=t[e]||[];i?(t[e]=n.filter(function(t){return i!==t.fn}),s(e,i)):(o(t),t[e]=[])}else o(t),delete n.hcEvents}}function G(t){return P(t)?t:[t]}let{tooltipFormatter:Y}=c().prototype;!function(t){function e(t,e,i){!this.isXAxis&&(this.series.forEach(function(i){"compare"===t&&"boolean"!=typeof e?i.setCompare(e,!1):"cumulative"!==t||D(e)||i.setCumulative(e,!1)}),L(i,!0)&&this.chart.redraw())}function i(t){let e=this,{numberFormatter:i}=e.series.chart,s=function(s){t=t.replace("{point."+s+"}",(e[s]>0&&"change"===s?"+":"")+i(e[s],L(e.series.tooltipOptions.changeDecimals,2)))};return w(e.change)&&s("change"),w(e.cumulativeSum)&&s("cumulativeSum"),Y.apply(this,[t])}function s(){let t,e=this.options.linkedTo,i=this.chart;if(e){let t=":previous"===e?i.series[this.index-1]:i.get(e);t instanceof g()&&(this.options.compare=L(this.userOptions.compare,t.options.compare))}let s=this.options.compare;("percent"===s||"value"===s||this.options.cumulative)&&(t=new d(this),"percent"===s||"value"===s?t.initCompare(s):t.initCumulative()),this.dataModify=t}function o(t){let e=t.dataExtremes,i=e.activeYData;if(this.dataModify&&e){let t;this.options.compare?t=[this.dataModify.modifyValue(e.dataMin),this.dataModify.modifyValue(e.dataMax)]:this.options.cumulative&&P(i)&&i.length>=2&&(t=d.getCumulativeExtremes(i)),t&&(e.dataMin=function(t){let e=t.length,i=t[0];for(;e--;)t[e]<i&&(i=t[e]);return i}(t),e.dataMax=function(t){let e=t.length,i=t[0];for(;e--;)t[e]>i&&(i=t[e]);return i}(t))}}function n(t,e){this.options.compare=this.userOptions.compare=t,this.update({},L(e,!0)),this.dataModify&&("value"===t||"percent"===t)?this.dataModify.initCompare(t):this.points.forEach(t=>{delete t.change})}function r(){let t=this.getColumn(this.pointArrayMap&&(this.options.pointValKey||this.pointValKey)||"y",!0);if(this.xAxis&&t.length&&this.dataModify){let e=this.getColumn("x",!0),i=this.dataTable.rowCount,s=+(!0!==this.options.compareStart);for(let o=0;o<i-s;o++){let i=t[o];if(B(i)&&0!==i&&e[o+s]>=(this.xAxis.min||0)){this.dataModify.compareValue=i;break}}}}function a(t,e){this.setModifier("compare",t,e)}function l(t,e){t=L(t,!1),this.options.cumulative=this.userOptions.cumulative=t,this.update({},L(e,!0)),this.dataModify?this.dataModify.initCumulative():this.points.forEach(t=>{delete t.cumulativeSum})}function h(t,e){this.setModifier("cumulative",t,e)}t.compose=function(t,d,p){let c=d.prototype,u=p.prototype,g=t.prototype;return g.setCompare||(g.setCompare=n,g.setCumulative=l,x(t,"afterInit",s),x(t,"afterGetExtremes",o),x(t,"afterProcessData",r)),c.setCompare||(c.setCompare=a,c.setModifier=e,c.setCumulative=h,u.tooltipFormatter=i),t};class d{constructor(t){this.series=t}modifyValue(){return 0}static getCumulativeExtremes(t){let e=1/0,i=-1/0;return t.reduce((t,s)=>{let o=t+s;return e=Math.min(e,o,t),i=Math.max(i,o,t),o}),[e,i]}initCompare(t){this.modifyValue=function(e,i){null===e&&(e=0);let s=this.compareValue;if(void 0!==e&&void 0!==s){if("value"===t?e-=s:e=e/Math.abs(s)*100-100*(100!==this.series.options.compareBase),void 0!==i){let t=this.series.points[i];t&&(t.change=e)}return e}return 0}}initCumulative(){this.modifyValue=function(t,e){if(null===t&&(t=0),void 0!==t&&void 0!==e){let i=e>0?this.series.points[e-1]:null;i&&i.cumulativeSum&&(t=v(i.cumulativeSum+t));let s=this.series.points[e],o=s.series.options.cumulativeStart,n=s.x<=this.series.xAxis.max&&s.x>=this.series.xAxis.min;return s&&(!o||n?s.cumulativeSum=t:s.cumulativeSum=void 0),t}return 0}}}t.Additions=d}(s||(s={}));let U=s,H=i.default.Axis;var N=l.n(H);let{isTouchDevice:F}=d(),V=[];function _(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function j(){let t,e,i,s=this.legend,o=this.navigator;if(o){t=s&&s.options,e=o.xAxis,i=o.yAxis;let{scrollbarHeight:n,scrollButtonSize:r}=o;this.inverted?(o.left=o.opposite?this.chartWidth-n-o.height:this.spacing[3]+n,o.top=this.plotTop+r):(o.left=L(e.left,this.plotLeft+r),o.top=o.navigatorOptions.top||this.chartHeight-o.height-n-(this.scrollbar?.options.margin||0)-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(t&&"bottom"===t.verticalAlign&&"proximate"!==t.layout&&t.enabled&&!t.floating?s.legendHeight+L(t.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),e&&i&&(this.inverted?e.options.left=i.options.left=o.left:e.options.top=i.options.top=o.top,e.setAxisSize(),i.setAxisSize())}}function K(e){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new t(this),L(e.redraw,!0)&&this.redraw(e.animation))}function Z(){let e=this.options;(e.navigator.enabled||e.scrollbar.enabled)&&(this.scroller=this.navigator=new t(this))}function q(){let t=this.options,e=t.navigator,i=t.rangeSelector;if((e&&e.enabled||i&&i.enabled)&&(!F&&"x"===this.zooming.type||F&&"x"===this.zooming.pinchType))return!1}function $(t){let e=t.navigator;if(e&&t.xAxis[0]){let i=t.xAxis[0].getExtremes();e.render(i.min,i.max)}}function J(t){let e=t.options.navigator||{},i=t.options.scrollbar||{};!this.navigator&&!this.scroller&&(e.enabled||i.enabled)&&(z(!0,this.options.navigator,e),z(!0,this.options.scrollbar,i),delete t.options.navigator,delete t.options.scrollbar)}let Q=function(e,i){if(W(V,e)){let s=e.prototype;t=i,s.callbacks.push($),x(e,"afterAddSeries",_),x(e,"afterSetChartSize",j),x(e,"afterUpdate",K),x(e,"beforeRender",Z),x(e,"beforeShowResetZoom",q),x(e,"update",J)}},{isTouchDevice:tt}=d();function te(){this.navigatorAxis||(this.navigatorAxis=new ts(this))}function ti(t){let e,i=this.chart,s=i.options,o=s.navigator,n=this.navigatorAxis,r=i.zooming.pinchType,a=s.rangeSelector,l=i.zooming.type;if(this.isXAxis&&(o?.enabled||a?.enabled)){if("y"===l&&"zoom"===t.trigger)e=!1;else if(("zoom"===t.trigger&&"xy"===l||tt&&"xy"===r)&&this.options.range){let e=n.previousZoom;w(t.min)?n.previousZoom=[this.min,this.max]:e&&(t.min=e[0],t.max=e[1],n.previousZoom=void 0)}}void 0!==e&&t.preventDefault()}class ts{static compose(t){t.keepProps.includes("navigatorAxis")||(t.keepProps.push("navigatorAxis"),x(t,"init",te),x(t,"setExtremes",ti))}constructor(t){this.axis=t}destroy(){this.axis=void 0}toFixedRange(t,e,i,s){let o=this.axis,n=(o.pointRange||0)/2,r=L(i,o.translate(t,!0,!o.horiz)),a=L(s,o.translate(e,!0,!o.horiz));return w(i)||(r=v(r+n)),w(s)||(a=v(a-n)),B(r)&&B(a)||(r=a=void 0),{min:r,max:a}}}let to=i.default.Color;var tn=l.n(to);let tr=i.default.SeriesRegistry;var ta=l.n(tr);let{parse:tl}=tn(),{seriesTypes:th}=ta(),td={height:40,margin:22,maskInside:!0,handles:{width:7,borderRadius:0,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:tl("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series:{type:void 0===th.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:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",id:"navigator-x-axis",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,id:"navigator-y-axis",maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:void 0},tickLength:0,tickWidth:0}},tp={"navigator-handle":function(t,e,i,s,o={}){var n,r,a,l,h,d;let p=o.width?o.width/2:i,c=(n=o.borderRadius||0,r=Math.min(2*p,s),/%$/.test(n)?r*parseFloat(n)/100+0:parseFloat(n));return[["M",-1.5,(s=o.height||s)/2-3.5],["L",-1.5,s/2+4.5],["M",.5,s/2-3.5],["L",.5,s/2+4.5],...(a=-p-1,l=2*p+1,h=s,d={r:c},d?.r?function(t,e,i,s,o){let n=o?.r||0;return[["M",t+n,e],["L",t+i-n,e],["A",n,n,0,0,1,t+i,e+n],["L",t+i,e+s-n],["A",n,n,0,0,1,t+i-n,e+s],["L",t+n,e+s],["A",n,n,0,0,1,t,e+s-n],["L",t,e+n],["A",n,n,0,0,1,t+n,e],["Z"]]}(a,.5,l,h,d):[["M",a,.5],["L",a+l,.5],["L",a+l,.5+h],["L",a,.5+h],["Z"]])]}},tc=i.default.RendererRegistry;var tu=l.n(tc);let tg={setFixedRange:function(t){let e=this.xAxis[0];w(e.dataMax)&&w(e.dataMin)&&t?this.fixedRange=Math.min(t,e.dataMax-e.dataMin):this.fixedRange=t}},{defaultOptions:tf}=d(),{composed:tm}=d(),{getRendererType:tx}=tu(),{setFixedRange:tb}=tg;function tv(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}let ty=function(t,e,i){ts.compose(e),W(tm,"Navigator")&&(t.prototype.setFixedRange=tb,O(tx().prototype.symbols,tp),O(tf,{navigator:td}),x(i,"afterUpdate",tv))},{composed:tM}=d();!function(t){let e;function i(t){let e=L(t.options?.min,t.min),i=L(t.options?.max,t.max);return{axisMin:e,axisMax:i,scrollMin:w(t.dataMin)?Math.min(e,t.min??1/0,t.dataMin,t.threshold??1/0):e,scrollMax:t.treeGrid?.adjustedMax??(w(t.dataMax)?Math.max(i,t.max??-1/0,t.dataMax,t.threshold??-1/0):i)}}function s(){let t=this.scrollbar,e=t&&!t.options.opposite,i=this.horiz?2:e?3:1;t&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[i]+=t.size+(t.options.margin||0))}function o(){let t=this;t.options?.scrollbar?.enabled&&(t.options.scrollbar.vertical=!t.horiz,t.options.startOnTick=t.options.endOnTick=!1,t.scrollbar=new e(t.chart.renderer,t.options.scrollbar,t.chart),x(t.scrollbar,"changed",function(e){let s,o,{axisMin:n,axisMax:r,scrollMin:a,scrollMax:l}=i(t),h=t.toPixels(a),d=t.toPixels(l)-h;if(w(n)&&w(r))if(t.horiz&&!t.reversed||!t.horiz&&t.reversed?(s=Math.min(l,t.toValue(h+d*this.to)),o=Math.max(a,t.toValue(h+d*this.from))):(s=Math.min(l,t.toValue(h+d*(1-this.from))),o=Math.max(a,t.toValue(h+d*(1-this.to)))),this.shouldUpdateExtremes(e.DOMType)){let i="mousemove"!==e.DOMType&&"touchmove"!==e.DOMType&&void 0;t.setExtremes(v(o),v(s),!0,i,e)}else this.setRange(this.from,this.to)}))}function n(){let t,e,s,{scrollMin:o,scrollMax:n}=i(this),r=this.scrollbar,a=(this.axisTitleMargin||0)+(this.titleOffset||0),l=this.chart.scrollbarsOffsets,h=this.options.margin||0;if(r&&l){if(this.horiz)this.opposite||(l[1]+=a),r.position(this.left,this.top+this.height+2+l[1]-(this.opposite?h:0),this.width,this.height),this.opposite||(l[1]+=h),t=1;else{let e;this.opposite&&(l[0]+=a),e=r.options.opposite?this.left+this.width+2+l[0]-(this.opposite?0:h):this.opposite?0:h,r.position(e,this.top,this.width,this.height),this.opposite&&(l[0]+=h),t=0}if(l[t]+=r.size+(r.options.margin||0),isNaN(o)||isNaN(n)||!w(this.min)||!w(this.max)||w(this.dataMin)&&this.dataMin===this.dataMax)r.setRange(0,1);else if(this.min===this.max){let t=this.pointRange/(this.dataMax+1);e=t*this.min,s=t*(this.max+1),r.setRange(e,s)}else e=(this.toPixels(this.min)-this.toPixels(o))/(this.toPixels(n)-this.toPixels(o)),s=(this.toPixels(this.max)-this.toPixels(o))/(this.toPixels(n)-this.toPixels(o)),this.horiz&&!this.reversed||!this.horiz&&this.reversed?r.setRange(e,s):r.setRange(1-s,1-e)}}t.compose=function(t,i){W(tM,"Axis.Scrollbar")&&(e=i,x(t,"afterGetOffset",s),x(t,"afterInit",o),x(t,"afterRender",n))}}(o||(o={}));let tA=o,tw={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},{defaultOptions:tk}=d(),{composed:tS}=d();class tO{static compose(t){tA.compose(t,tO),W(tS,"Scrollbar")&&O(tk,{scrollbar:tw})}static swapXY(t,e){return e&&t.forEach(t=>{let e,i=t.length;for(let s=0;s<i;s+=2)"number"==typeof(e=t[s+1])&&(t[s+1]=t[s+2],t[s+2]=e)}),t}constructor(t,e,i){this._events=[],this.chartX=0,this.chartY=0,this.from=0,this.scrollbarButtons=[],this.scrollbarLeft=0,this.scrollbarStrokeWidth=1,this.scrollbarTop=0,this.size=0,this.to=0,this.trackBorderWidth=1,this.x=0,this.y=0,this.init(t,e,i)}addEvents(){let t=this.options.inverted?[1,0]:[0,1],e=this.scrollbarButtons,i=this.scrollbarGroup.element,s=this.track.element,o=this.mouseDownHandler.bind(this),n=this.mouseMoveHandler.bind(this),r=this.mouseUpHandler.bind(this),a=[[e[t[0]].element,"click",this.buttonToMinClick.bind(this)],[e[t[1]].element,"click",this.buttonToMaxClick.bind(this)],[s,"click",this.trackClick.bind(this)],[i,"mousedown",o],[i.ownerDocument,"mousemove",n],[i.ownerDocument,"mouseup",r],[i,"touchstart",o],[i.ownerDocument,"touchmove",n],[i.ownerDocument,"touchend",r]];a.forEach(function(t){x.apply(null,t)}),this._events=a}buttonToMaxClick(t){let e=(this.to-this.from)*L(this.options.step,.2);this.updatePosition(this.from+e,this.to+e),E(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}buttonToMinClick(t){let e=v(this.to-this.from)*L(this.options.step,.2);this.updatePosition(v(this.from-e),v(this.to-e)),E(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}cursorToScrollbarPosition(t){let e=this.options,i=e.minWidth>this.calculatedWidth?e.minWidth:0;return{chartX:(t.chartX-this.x-this.xOffset)/(this.barWidth-i),chartY:(t.chartY-this.y-this.yOffset)/(this.barWidth-i)}}destroy(){let t=this,e=t.chart.scroller;t.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(e){t[e]&&t[e].destroy&&(t[e]=t[e].destroy())}),e&&t===e.scrollbar&&(e.scrollbar=null,k(e.scrollbarButtons))}drawScrollbarButton(t){let e=this.renderer,i=this.scrollbarButtons,s=this.options,o=this.size,n=e.g().add(this.group);if(i.push(n),s.buttonsEnabled){let r=e.rect().addClass("highcharts-scrollbar-button").add(n);this.chart.styledMode||r.attr({stroke:s.buttonBorderColor,"stroke-width":s.buttonBorderWidth,fill:s.buttonBackgroundColor}),r.attr(r.crisp({x:-.5,y:-.5,width:o,height:o,r:s.buttonBorderRadius},r.strokeWidth()));let a=e.path(tO.swapXY([["M",o/2+(t?-1:1),o/2-3],["L",o/2+(t?-1:1),o/2+3],["L",o/2+(t?2:-2),o/2]],s.vertical)).addClass("highcharts-scrollbar-arrow").add(i[t]);this.chart.styledMode||a.attr({fill:s.buttonArrowColor})}}init(t,e,i){this.scrollbarButtons=[],this.renderer=t,this.userOptions=e,this.options=z(tw,tk.scrollbar,e),this.options.margin=L(this.options.margin,10),this.chart=i,this.size=L(this.options.size,this.options.height),e.enabled&&(this.render(),this.addEvents())}mouseDownHandler(t){let e=this.chart.pointer?.normalize(t)||t,i=this.cursorToScrollbarPosition(e);this.chartX=i.chartX,this.chartY=i.chartY,this.initPositions=[this.from,this.to],this.grabbedCenter=!0}mouseMoveHandler(t){let e,i=this.chart.pointer?.normalize(t)||t,s=this.options.vertical?"chartY":"chartX",o=this.initPositions||[];this.grabbedCenter&&(!t.touches||0!==t.touches[0][s])&&(e=this.cursorToScrollbarPosition(i)[s]-this[s],this.hasDragged=!0,this.updatePosition(o[0]+e,o[1]+e),this.hasDragged&&E(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}))}mouseUpHandler(t){this.hasDragged&&E(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}),this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null}position(t,e,i,s){let{buttonsEnabled:o,margin:n=0,vertical:r}=this.options,a=this.rendered?"animate":"attr",l=s,h=0;this.group.show(),this.x=t,this.y=e+this.trackBorderWidth,this.width=i,this.height=s,this.xOffset=l,this.yOffset=h,r?(this.width=this.yOffset=i=h=this.size,this.xOffset=l=0,this.yOffset=h=o?this.size:0,this.barWidth=s-(o?2*i:0),this.x=t+=n):(this.height=s=this.size,this.xOffset=l=o?this.size:0,this.barWidth=i-(o?2*s:0),this.y=this.y+n),this.group[a]({translateX:t,translateY:this.y}),this.track[a]({width:i,height:s}),this.scrollbarButtons[1][a]({translateX:r?0:i-l,translateY:r?s-h:0})}removeEvents(){this._events.forEach(function(t){X.apply(null,t)}),this._events.length=0}render(){let t=this.renderer,e=this.options,i=this.size,s=this.chart.styledMode,o=t.g("scrollbar").attr({zIndex:e.zIndex}).hide().add();this.group=o,this.track=t.rect().addClass("highcharts-scrollbar-track").attr({r:e.trackBorderRadius||0,height:i,width:i}).add(o),s||this.track.attr({fill:e.trackBackgroundColor,stroke:e.trackBorderColor,"stroke-width":e.trackBorderWidth});let n=this.trackBorderWidth=this.track.strokeWidth();this.track.attr({x:-M(0,n),y:-M(0,n)}),this.scrollbarGroup=t.g().add(o),this.scrollbar=t.rect().addClass("highcharts-scrollbar-thumb").attr({height:i-n,width:i-n,r:e.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=t.path(tO.swapXY([["M",-3,i/4],["L",-3,2*i/3],["M",0,i/4],["L",0,2*i/3],["M",3,i/4],["L",3,2*i/3]],e.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),s||(this.scrollbar.attr({fill:e.barBackgroundColor,stroke:e.barBorderColor,"stroke-width":e.barBorderWidth}),this.scrollbarRifles.attr({stroke:e.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-M(0,this.scrollbarStrokeWidth),-M(0,this.scrollbarStrokeWidth)),this.drawScrollbarButton(0),this.drawScrollbarButton(1)}setRange(t,e){let i,s,o=this.options,n=o.vertical,r=o.minWidth,a=this.barWidth,l=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(!w(a))return;let h=a*Math.min(e,1);i=Math.ceil(a*(t=Math.max(t,0))),this.calculatedWidth=s=v(h-i),s<r&&(i=(a-r+s)*t,s=r);let d=Math.floor(i+this.xOffset+this.yOffset),p=s/2-.5;this.from=t,this.to=e,n?(this.scrollbarGroup[l]({translateY:d}),this.scrollbar[l]({height:s}),this.scrollbarRifles[l]({translateY:p}),this.scrollbarTop=d,this.scrollbarLeft=0):(this.scrollbarGroup[l]({translateX:d}),this.scrollbar[l]({width:s}),this.scrollbarRifles[l]({translateX:p}),this.scrollbarLeft=d,this.scrollbarTop=0),s<=12?this.scrollbarRifles.hide():this.scrollbarRifles.show(),!1===o.showFull&&(t<=0&&e>=1?this.group.hide():this.group.show()),this.rendered=!0}shouldUpdateExtremes(t){return L(this.options.liveRedraw,d().svg&&!d().isTouchDevice&&!this.chart.boosted)||"mouseup"===t||"touchend"===t||!w(t)}trackClick(t){let e=this.chart.pointer?.normalize(t)||t,i=this.to-this.from,s=this.y+this.scrollbarTop,o=this.x+this.scrollbarLeft;this.options.vertical&&e.chartY>s||!this.options.vertical&&e.chartX>o?this.updatePosition(this.from+i,this.to+i):this.updatePosition(this.from-i,this.to-i),E(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}update(t){this.destroy(),this.init(this.chart.renderer,z(!0,this.options,t),this.chart)}updatePosition(t,e){e>1&&(t=v(1-v(e-t)),e=1),t<0&&(e=v(e-t),t=0),this.from=t,this.to=e}}tO.defaultOptions=tw;let{defaultOptions:tE}=d(),{isTouchDevice:tC}=d();function tT(t,...e){let i=[].filter.call(e,B);if(i.length)return Math[t].apply(0,i)}class tB{static compose(t,e,i){Q(t,tB),ty(t,e,i)}constructor(t){this.isDirty=!1,this.scrollbarHeight=0,this.init(t)}drawHandle(t,e,i,s){let o=this.navigatorOptions.handles.height;this.handles[e][s](i?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(t,10)+.5-o)}:{translateX:Math.round(this.left+parseInt(t,10)),translateY:Math.round(this.top+this.height/2-o/2-1)})}drawOutline(t,e,i,s){let o=this.navigatorOptions.maskInside,n=this.outline.strokeWidth(),r=n/2,a=n%2/2,l=this.scrollButtonSize,h=this.size,d=this.top,p=this.height,c=d-r,u=d+p,g=this.left,f,m;i?(f=d+e+a,e=d+t+a,m=[["M",g+p,d-l-a],["L",g+p,f],["L",g,f],["M",g,e],["L",g+p,e],["L",g+p,d+h+l]],o&&m.push(["M",g+p,f-r],["L",g+p,e+r])):(g-=l,t+=g+l-a,e+=g+l-a,m=[["M",g,c],["L",t,c],["L",t,u],["M",e,u],["L",e,c],["L",g+h+2*l,c]],o&&m.push(["M",t-r,c],["L",e+r,c])),this.outline[s]({d:m})}drawMasks(t,e,i,s){let o,n,r,a,l=this.left,h=this.top,d=this.height;i?(r=[l,l,l],a=[h,h+t,h+e],n=[d,d,d],o=[t,e-t,this.size-e]):(r=[l,l+t,l+e],a=[h,h,h],n=[t,e-t,this.size-e],o=[d,d,d]),this.shades.forEach((t,e)=>{t[s]({x:r[e],y:a[e],width:n[e],height:o[e]})})}renderElements(){let t=this,e=t.navigatorOptions,i=e.maskInside,s=t.chart,o=s.inverted,n=s.renderer,r={cursor:o?"ns-resize":"ew-resize"},a=t.navigatorGroup??(t.navigatorGroup=n.g("navigator").attr({zIndex:8,visibility:"hidden"}).add());if([!i,i,!i].forEach((i,o)=>{let l=t.shades[o]??(t.shades[o]=n.rect().addClass("highcharts-navigator-mask"+(1===o?"-inside":"-outside")).add(a));s.styledMode||(l.attr({fill:i?e.maskFill:"rgba(0,0,0,0)"}),1===o&&l.css(r))}),t.outline||(t.outline=n.path().addClass("highcharts-navigator-outline").add(a)),s.styledMode||t.outline.attr({"stroke-width":e.outlineWidth,stroke:e.outlineColor}),e.handles?.enabled){let i=!1,o=e.handles,{height:l,width:h}=o;[0,1].forEach(e=>{let d=o.symbols[e];(i=i||t.handles[e]?.symbolName!==d)&&(t.handles[e]?.destroy(),t.handles[e]=n.symbol(d,-h/2-1,0,h,l,o),t.handles[e].attr({zIndex:7-e}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][e]).add(a)),s.inverted&&t.handles[e].attr({rotation:90,rotationOriginX:Math.floor(-h/2),rotationOriginY:(l+h)/2}),s.styledMode||t.handles[e].attr({fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.lineWidth,width:o.width,height:o.height,x:-h/2-1,y:0}).css(r)}),i&&(t.partsEventsToUnbind?.forEach(t=>{t()}),t.partsEventsToUnbind=[...t.getPartsEvents("mousedown"),...t.getPartsEvents("touchstart")])}}update(t,e=!1){let i=this.chart,s=i.options.chart.inverted!==i.scrollbar?.options.vertical;if(z(!0,i.options.navigator,t),this.navigatorOptions=i.options.navigator||{},this.setOpposite(),w(t.enabled)||s)return this.destroy(),this.navigatorEnabled=t.enabled||this.navigatorEnabled,this.init(i);if(this.navigatorEnabled&&(this.isDirty=!0,!1===t.adaptToUpdatedData&&this.baseSeries.forEach(t=>{X(t,"updatedData",this.updatedDataHandler)},this),t.adaptToUpdatedData&&this.baseSeries.forEach(t=>{t.eventsToUnbind.push(x(t,"updatedData",this.updatedDataHandler))},this),(t.series||t.baseSeries)&&this.setBaseSeries(void 0,!1),t.height||t.xAxis||t.yAxis)){this.height=t.height??this.height;let e=this.getXAxisOffsets();this.xAxis.update({...t.xAxis,offsets:e,[i.inverted?"width":"height"]:this.height,[i.inverted?"height":"width"]:void 0},!1),this.yAxis.update({...t.yAxis,[i.inverted?"width":"height"]:this.height},!1)}e&&i.redraw()}render(t,e,i,s){let o=this.chart,n=this.xAxis,r=n.pointRange||0,a=n.navigatorAxis.fake?o.xAxis[0]:n,l=this.navigatorEnabled,h=this.rendered,d=o.inverted,p=o.xAxis[0].minRange,c=o.xAxis[0].options.maxRange,u=this.scrollButtonSize,g,f,m,x=this.scrollbarHeight,y,M;if(this.hasDragged&&!w(i))return;if(this.isDirty&&this.renderElements(),t=v(t-r/2),e=v(e+r/2),!B(t)||!B(e))if(!h)return;else i=0,s=L(n.width,a.width);this.left=L(n.left,o.plotLeft+u+(d?o.plotWidth:0));let A=this.size=y=L(n.len,(d?o.plotHeight:o.plotWidth)-2*u);g=d?x:y+2*u,i=L(i,n.toPixels(t,!0)),s=L(s,n.toPixels(e,!0)),B(i)&&Math.abs(i)!==1/0||(i=0,s=g);let k=n.toValue(i,!0),S=n.toValue(s,!0),O=Math.abs(v(S-k));w(p)&&O<p?this.grabbedLeft?i=n.toPixels(S-p-r,!0):this.grabbedRight&&(s=n.toPixels(k+p+r,!0)):w(c)&&v(O-r)>c&&(this.grabbedLeft?i=n.toPixels(S-c-r,!0):this.grabbedRight&&(s=n.toPixels(k+c+r,!0))),this.zoomedMax=b(Math.max(i,s),0,A),this.zoomedMin=b(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(i,s),0,A),this.range=this.zoomedMax-this.zoomedMin,A=Math.round(this.zoomedMax);let C=Math.round(this.zoomedMin);l&&(this.navigatorGroup.attr({visibility:"inherit"}),M=h&&!this.hasDragged?"animate":"attr",this.drawMasks(C,A,d,M),this.drawOutline(C,A,d,M),this.navigatorOptions.handles?.enabled&&(this.drawHandle(C,0,d,M),this.drawHandle(A,1,d,M))),this.scrollbar&&(d?(m=this.top-u,f=this.left-x+(l||!a.opposite?0:(a.titleOffset||0)+a.axisTitleMargin),x=y+2*u):(m=this.top+(l?this.height:-x),f=this.left-u),this.scrollbar.position(f,m,g,x),this.scrollbar.setRange(this.zoomedMin/(y||1),this.zoomedMax/(y||1))),this.rendered=!0,this.isDirty=!1,E(this,"afterRender")}addMouseEvents(){let t,e,i=this,s=i.chart,o=s.container,n=[];i.mouseMoveHandler=t=function(t){i.onMouseMove(t)},i.mouseUpHandler=e=function(t){i.onMouseUp(t)},n.push(x(s.renderTo,"mousemove",t),x(o.ownerDocument,"mouseup",e),x(s.renderTo,"touchmove",t),x(o.ownerDocument,"touchend",e)),i.eventsToUnbind=n,i.series&&i.series[0]&&n.push(x(i.series[0].xAxis,"foundExtremes",function(){s.navigator?.modifyNavigatorAxisExtremes()}))}getPartsEvents(t){let e=this,i=[];return["shades","handles"].forEach(s=>{e[s].forEach(function(o,n){i.push(x(o.element,t,function(t){e[`${s}Mousedown`](t,n)}))})}),i}shadesMousedown(t,e){t=this.chart.pointer?.normalize(t)||t;let i=this.chart,s=this.xAxis,o=this.zoomedMin,n=this.size,r=this.range,a=this.left,l=t.chartX,h,d,p,c;i.inverted&&(l=t.chartY,a=this.top),1===e?(this.grabbedCenter=l,this.fixedWidth=r,this.dragOffset=l-o):(c=l-a-r/2,0===e?c=Math.max(0,c):2===e&&c+r>=n&&(c=n-r,this.reversedExtremes?(c-=r,d=this.getUnionExtremes()?.dataMin):h=this.getUnionExtremes()?.dataMax),c!==o&&(this.fixedWidth=r,w((p=s.navigatorAxis.toFixedRange(c,c+r,d,h)).min)&&E(this,"setRange",{min:Math.min(p.min,p.max),max:Math.max(p.min,p.max),redraw:!0,eventArguments:{trigger:"navigator"}})))}handlesMousedown(t,e){t=this.chart.pointer?.normalize(t)||t;let i=this.chart,s=i.xAxis[0],o=this.reversedExtremes;0===e?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=o?s.min:s.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=o?s.max:s.min),i.setFixedRange(void 0)}onMouseMove(t){let e=this,i=e.chart,s=e.navigatorSize,o=e.range,n=e.dragOffset,r=i.inverted,a=e.left,l;(!t.touches||0!==t.touches[0].pageX)&&(l=(t=i.pointer?.normalize(t)||t).chartX,r&&(a=e.top,l=t.chartY),e.grabbedLeft?(e.hasDragged=!0,e.render(0,0,l-a,e.otherHandlePos)):e.grabbedRight?(e.hasDragged=!0,e.render(0,0,e.otherHandlePos,l-a)):e.grabbedCenter&&n&&(e.hasDragged=!0,l<n?l=n:l>s+n-o&&(l=s+n-o),e.render(0,0,l-n,l-n+o)),e.hasDragged&&L(e.scrollbarOptions?.liveRedraw,!tC&&!this.chart.boosted)&&(t.DOMType=t.type,setTimeout(function(){e.onMouseUp(t)},0)))}onMouseUp(t){let e,i,s,o,n,r,a=this.chart,l=this.xAxis,h=this.scrollbar,d=t.DOMEvent||t,p=a.inverted,c=this.rendered&&!this.hasDragged?"animate":"attr";(this.hasDragged&&(!h||!h.hasDragged)||"scrollbar"===t.trigger)&&(s=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?o=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(n=this.fixedExtreme),this.zoomedMax===this.size&&(n=this.reversedExtremes?s.dataMin:s.dataMax),0===this.zoomedMin&&(o=this.reversedExtremes?s.dataMax:s.dataMin),w((r=l.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,o,n)).min)&&E(this,"setRange",{min:Math.min(r.min,r.max),max:Math.max(r.min,r.max),redraw:!0,animation:!this.hasDragged&&null,eventArguments:{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:d}})),"mousemove"!==t.DOMType&&"touchmove"!==t.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null),this.navigatorEnabled&&B(this.zoomedMin)&&B(this.zoomedMax)&&(i=Math.round(this.zoomedMin),e=Math.round(this.zoomedMax),this.shades&&this.drawMasks(i,e,p,c),this.outline&&this.drawOutline(i,e,p,c),this.navigatorOptions.handles?.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(i,0,p,c),this.drawHandle(e,1,p,c)))}removeEvents(){this.eventsToUnbind?.forEach(t=>{t()}),this.eventsToUnbind=void 0,this.removeBaseSeriesEvents()}removeBaseSeriesEvents(){let t=this.baseSeries||[];this.navigatorEnabled&&t[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&t.forEach(function(t){X(t,"updatedData",this.updatedDataHandler)},this),t[0].xAxis&&X(t[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))}getXAxisOffsets(){return this.chart.inverted?[this.scrollButtonSize,0,-this.scrollButtonSize,0]:[0,-this.scrollButtonSize,0,this.scrollButtonSize]}init(t){let e=t.options,i=e.navigator||{},s=i.enabled,o=e.scrollbar||{},n=o.enabled,r=s&&i.height||0,a=n&&o.height||0,l=o.buttonsEnabled&&a||0;this.handles=[],this.shades=[],this.chart=t,this.setBaseSeries(),this.height=r,this.scrollbarHeight=a,this.scrollButtonSize=l,this.scrollbarEnabled=n,this.navigatorEnabled=!!s,this.navigatorOptions=i,this.scrollbarOptions=o,this.setOpposite();let h=this,d=h.baseSeries,p=t.xAxis.length,c=t.yAxis.length,u=d&&d[0]&&d[0].xAxis||t.xAxis[0]||{options:{}};if(t.isDirtyBox=!0,h.navigatorEnabled){let e=this.getXAxisOffsets();h.xAxis=new(N())(t,z({breaks:u.options.breaks,ordinal:u.options.ordinal,overscroll:u.options.overscroll},i.xAxis,{type:"datetime",yAxis:i.yAxis?.id,index:p,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:u.options.ordinal?0:u.options.minPadding,maxPadding:u.options.ordinal?0:u.options.maxPadding,zoomEnabled:!1},t.inverted?{offsets:e,width:r}:{offsets:e,height:r}),"xAxis"),h.yAxis=new(N())(t,z(i.yAxis,{alignTicks:!1,offset:0,index:c,isInternal:!0,reversed:L(i.yAxis&&i.yAxis.reversed,t.yAxis[0]&&t.yAxis[0].reversed,!1),zoomEnabled:!1},t.inverted?{width:r}:{height:r}),"yAxis"),d||i.series?.data?h.updateNavigatorSeries(!1):0===t.series.length&&(h.unbindRedraw=x(t,"beforeRedraw",function(){t.series.length>0&&!h.series&&(h.setBaseSeries(),h.unbindRedraw?.())})),h.reversedExtremes=t.inverted&&!h.xAxis.reversed||!t.inverted&&h.xAxis.reversed,h.renderElements(),h.addMouseEvents()}else h.xAxis={chart:t,navigatorAxis:{fake:!0},translate:function(e,i){let s=t.xAxis[0],o=s.getExtremes(),n=s.len-2*l,r=tT("min",s.options.min,o.dataMin),a=tT("max",s.options.max,o.dataMax)-r;return i?e*a/n+r:n*(e-r)/a},toPixels:function(t){return this.translate(t)},toValue:function(t){return this.translate(t,!0)}},h.xAxis.navigatorAxis.axis=h.xAxis,h.xAxis.navigatorAxis.toFixedRange=ts.prototype.toFixedRange.bind(h.xAxis.navigatorAxis);if(t.options.scrollbar?.enabled){let e=z(t.options.scrollbar,{vertical:t.inverted});B(e.margin)||(e.margin=t.inverted?-3:3),t.scrollbar=h.scrollbar=new tO(t.renderer,e,t),x(h.scrollbar,"changed",function(t){let e=h.size,i=e*this.to,s=e*this.from;h.hasDragged=h.scrollbar?.hasDragged,h.render(0,0,s,i),this.shouldUpdateExtremes(t.DOMType)&&setTimeout(function(){h.onMouseUp(t)})})}h.addBaseSeriesEvents(),h.addChartEvents()}setOpposite(){let t=this.navigatorOptions,e=this.navigatorEnabled,i=this.chart;this.opposite=L(t.opposite,!!(!e&&i.inverted))}getUnionExtremes(t){let e,i=this.chart.xAxis[0],s=this.chart.time,o=this.xAxis,n=o.options,r=i.options;return t&&null===i.dataMin||(e={dataMin:L(s.parse(n?.min),tT("min",s.parse(r.min),i.dataMin,o.dataMin,o.min)),dataMax:L(s.parse(n?.max),tT("max",s.parse(r.max),i.dataMax,o.dataMax,o.max))}),e}setBaseSeries(t,e){let i=this.chart,s=this.baseSeries=[];t=t||i.options.navigator?.baseSeries||(i.series.length?C(i.series,t=>!t.options.isInternal).index:0),(i.series||[]).forEach((e,i)=>{!e.options.isInternal&&(e.options.showInNavigator||(i===t||e.options.id===t)&&!1!==e.options.showInNavigator)&&s.push(e)}),this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,e)}updateNavigatorSeries(t,e){let i=this,s=i.chart,o=i.baseSeries,n={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:this.navigatorOptions.xAxis?.id,yAxis:this.navigatorOptions.yAxis?.id,showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},r=i.series=(i.series||[]).filter(t=>{let e=t.baseSeries;return!(e&&0>o.indexOf(e))||(e&&(X(e,"updatedData",i.updatedDataHandler),delete e.navigatorSeries),t.chart&&t.destroy(),!1)}),a,l,h=i.navigatorOptions.series,d;o&&o.length&&o.forEach(t=>{let p=t.navigatorSeries,c=O({color:t.color,visible:t.visible},P(h)?tE.navigator.series:h);if(p&&!1===i.navigatorOptions.adaptToUpdatedData)return;n.name="Navigator "+o.length,d=(a=t.options||{}).navigatorOptions||{},c.dataLabels=G(c.dataLabels),(l=z(a,n,c,d)).pointRange=L(c.pointRange,d.pointRange,tE.plotOptions[l.type||"line"]?.pointRange);let u=d.data||c.data;i.hasNavigatorData=i.hasNavigatorData||!!u,l.data=u||a.data?.slice(0),p&&p.options?p.update(l,e):(t.navigatorSeries=s.initSeries(l),s.setSortedData(),t.navigatorSeries.baseSeries=t,r.push(t.navigatorSeries))}),(h?.data&&!(o&&o.length)||P(h))&&(i.hasNavigatorData=!1,(h=G(h)).forEach((t,e)=>{n.name="Navigator "+(r.length+1),(l=z(tE.navigator?.series,{color:s.series[e]&&!s.series[e].options.isInternal&&s.series[e].color||s.options.colors?.[e]||s.options.colors?.[0]},n,t)).data=t.data,l.data&&(i.hasNavigatorData=!0,r.push(s.initSeries(l)))})),t&&this.addBaseSeriesEvents()}addBaseSeriesEvents(){let t=this,e=t.baseSeries||[];e[0]&&e[0].xAxis&&e[0].eventsToUnbind.push(x(e[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes)),e.forEach(i=>{i.eventsToUnbind.push(x(i,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)})),i.eventsToUnbind.push(x(i,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)})),!1!==this.navigatorOptions.adaptToUpdatedData&&i.xAxis&&i.eventsToUnbind.push(x(i,"updatedData",this.updatedDataHandler)),i.eventsToUnbind.push(x(i,"remove",function(){e&&S(e,i),this.navigatorSeries&&t.series&&(S(t.series,this.navigatorSeries),w(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))})}getBaseSeriesMin(t){return this.baseSeries.reduce(function(t,e){return Math.min(t,e.getColumn("x")[0]??t)},t)}modifyNavigatorAxisExtremes(){let t=this.xAxis;if(void 0!==t.getExtremes){let e=this.getUnionExtremes(!0);e&&(e.dataMin!==t.min||e.dataMax!==t.max)&&(t.min=e.dataMin,t.max=e.dataMax)}}modifyBaseAxisExtremes(){let t,e,i=this.chart.navigator,s=this.getExtremes(),o=s.min,n=s.max,r=s.dataMin,a=s.dataMax,l=n-o,h=i?.stickToMin,d=i?.stickToMax,p=L(this.ordinal?.convertOverscroll(this.options.overscroll),0),c=i.series&&i.series[0],u=!!this.setExtremes;!(this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger)&&(h&&(t=(e=r)+l),d&&(t=a+p,h||(e=Math.max(r,t-l,i.getBaseSeriesMin(c&&c.xData?c.xData[0]:-Number.MAX_VALUE)))),u&&(h||d)&&B(e)&&(this.min=this.userMin=e,this.max=this.userMax=t)),i.stickToMin=i.stickToMax=null}updatedDataHandler(){let t=this.chart.navigator,e=this.navigatorSeries,i=t.reversedExtremes?0===Math.round(t.zoomedMin):Math.round(t.zoomedMax)>=Math.round(t.size);t.stickToMax=L(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,i),t.stickToMin=t.shouldStickToMin(this,t),e&&!t.hasNavigatorData&&(e.options.pointStart=this.getColumn("x")[0],e.setData(this.options.data,!1,void 0,!1))}shouldStickToMin(t,e){let i=e.getBaseSeriesMin(t.getColumn("x")[0]),s=t.xAxis,o=s.max,n=s.min,r=s.options.range;return!!(B(o)&&B(n))&&(r&&o-i>0?o-i<r:n<=i)}addChartEvents(){this.eventsToUnbind||(this.eventsToUnbind=[]),this.eventsToUnbind.push(x(this.chart,"redraw",function(){let t=this.navigator,e=t&&(t.baseSeries&&t.baseSeries[0]&&t.baseSeries[0].xAxis||this.xAxis[0]);e&&t.render(e.min,e.max)}),x(this.chart,"getMargins",function(){let t=this.navigator,e=t.opposite?"plotTop":"marginBottom";this.inverted&&(e=t.opposite?"marginRight":"plotLeft"),this[e]=(this[e]||0)+(t.navigatorEnabled||!this.inverted?t.height+(this.scrollbar?.options.margin||0)+t.scrollbarHeight:0)+(t.navigatorOptions.margin||0)}),x(this,"setRange",function(t){this.chart.xAxis[0].setExtremes(t.min,t.max,t.redraw,t.animation,t.eventArguments)}))}destroy(){this.removeEvents(),this.xAxis&&(S(this.chart.xAxis,this.xAxis),S(this.chart.axes,this.xAxis)),this.yAxis&&(S(this.chart.yAxis,this.yAxis),S(this.chart.axes,this.yAxis)),(this.series||[]).forEach(t=>{t.destroy&&t.destroy()}),["series","xAxis","yAxis","shades","outline","scrollbarTrack","scrollbarRifles","scrollbarGroup","scrollbar","navigatorGroup","rendered"].forEach(t=>{this[t]&&this[t].destroy&&this[t].destroy(),this[t]=null}),[this.handles].forEach(t=>{k(t)}),this.baseSeries.forEach(t=>{t.navigatorSeries=void 0}),this.navigatorEnabled=!1}}let{setLength:tD,splice:tP}={convertToNumber:function(t,e){switch(typeof t){case"boolean":return+!!t;case"number":return isNaN(t)&&!e?null:t;default:return isNaN(t=parseFloat(`${t??""}`))&&!e?null:t}},setLength:function(t,e,i){return Array.isArray(t)?(t.length=e,t):t[i?"subarray":"slice"](0,e)},splice:function(t,e,i,s,o=[]){if(Array.isArray(t))return Array.isArray(o)||(o=Array.from(o)),{removed:t.splice(e,i,...o),array:t};let n=Object.getPrototypeOf(t).constructor,r=t[s?"subarray":"slice"](e,e+i),a=new n(t.length-i+o.length);return a.set(t.subarray(0,e),0),a.set(o,e),a.set(t.subarray(e+i),e+o.length),{removed:r,array:a}}},tR=class{constructor(t={}){this.autoId=!t.id,this.columns={},this.id=t.id||(0,h.uniqueKey)(),this.rowCount=0,this.versionTag=(0,h.uniqueKey)();let e=0;I(t.columns||{},(t,i)=>{this.columns[i]=t.slice(),e=Math.max(e,t.length)}),this.applyRowCount(e)}applyRowCount(t){this.rowCount=t,I(this.columns,(e,i)=>{e.length!==t&&(this.columns[i]=tD(e,t))})}deleteRows(t,e=1){if(e>0&&t<this.rowCount){let i=0;I(this.columns,(s,o)=>{this.columns[o]=tP(s,t,e).array,i=s.length}),this.rowCount=i}E(this,"afterDeleteRows",{rowIndex:t,rowCount:e}),this.versionTag=(0,h.uniqueKey)()}getColumn(t,e){return this.columns[t]}getColumns(t,e){return(t||Object.keys(this.columns)).reduce((t,e)=>(t[e]=this.columns[e],t),{})}getRow(t,e){return(e||Object.keys(this.columns)).map(e=>this.columns[e]?.[t])}setColumn(t,e=[],i=0,s){this.setColumns({[t]:e},i,s)}setColumns(t,e,i){let s=this.rowCount;I(t,(t,e)=>{this.columns[e]=t.slice(),s=t.length}),this.applyRowCount(s),i?.silent||(E(this,"afterSetColumns"),this.versionTag=(0,h.uniqueKey)())}setRow(t,e=this.rowCount,i,s){let{columns:o}=this,n=i?this.rowCount+1:e+1,r=Object.keys(t);if(s?.addColumns!==!1)for(let t=0,e=r.length;t<e;t++){let e=r[t];o[e]||(o[e]=[])}I(o,(r,a)=>{r||s?.addColumns===!1||(r=Array(n)),r&&(i?r=tP(r,e,0,!0,[t[a]??null]).array:r[e]=t[a]??null,o[a]=r)}),n>this.rowCount&&this.applyRowCount(n),s?.silent||(E(this,"afterSetRows"),this.versionTag=(0,h.uniqueKey)())}getModified(){return this.modified||this}};!function(t){function e(t,i,s,o,n=[],r=0,a){let l={},d=this.options.tickPixelInterval,p=this.chart.time,c=[],u,g,f,m,x,b=0,v=[],y=-Number.MAX_VALUE;if(!this.options.ordinal&&!this.options.breaks||!n||n.length<3||void 0===i)return p.getTimeTicks.apply(p,arguments);let M=n.length;for(u=0;u<M;u++){if(x=u&&n[u-1]>s,n[u]<i&&(b=u),u===M-1||n[u+1]-n[u]>5*r||x){if(n[u]>y){for(g=p.getTimeTicks(t,n[b],n[u],o);g.length&&g[0]<=y;)g.shift();g.length&&(y=g[g.length-1]),c.push(v.length),v=v.concat(g)}b=u+1}if(x)break}if(g){if(m=g.info,a&&m.unitRange<=h.timeUnits.hour){for(b=1,u=v.length-1;b<u;b++)p.dateFormat("%d",v[b])!==p.dateFormat("%d",v[b-1])&&(l[v[b]]="day",f=!0);f&&(l[v[0]]="day"),m.higherRanks=l}m.segmentStarts=c,v.info=m}else(0,h.error)(12,!1,this.chart);if(a&&w(d)){let t=v.length,e=[],i=[],o,n,r,a,h,p=t;for(;p--;)n=this.translate(v[p]),r&&(i[p]=r-n),e[p]=r=n;for(i.sort((t,e)=>t-e),(a=i[Math.floor(i.length/2)])<.6*d&&(a=null),p=v[t-1]>s?t-1:t,r=void 0;p--;)h=Math.abs(r-(n=e[p])),r&&h<.8*d&&(null===a||h<.8*a)?(l[v[p]]&&!l[v[p+1]]?(o=p+1,r=n):o=p,v.splice(o,1)):r=n}return v}function i(t){let e=this.ordinal.positions;if(!e)return t;let i=e.length-1,s;return(t<0?t=e[0]:t>i?t=e[i]:(i=Math.floor(t),s=t-i),void 0!==s&&void 0!==e[i])?e[i]+(s?s*(e[i+1]-e[i]):0):t}function s(t){let e=this.ordinal,i=this.old?this.old.min:this.min,s=this.old?this.old.transA:this.transA,o=e.getExtendedPositions();if(o?.length){let n=v((t-i)*s+this.minPixelPadding),r=v(e.getIndexOfPoint(n,o)),a=v(r%1);if(r>=0&&r<=o.length-1){let t=o[Math.floor(r)],e=o[Math.ceil(r)];return o[Math.floor(r)]+a*(e-t)}}return t}function o(e,i){let s=t.Additions.findIndexOf(e,i,!0);if(e[s]===i)return s;let o=(i-e[s])/(e[s+1]-e[s]);return s+o}function n(){this.ordinal||(this.ordinal=new t.Additions(this))}function r(){let{eventArgs:t,options:e}=this;if(this.isXAxis&&w(e.overscroll)&&0!==e.overscroll&&B(this.max)&&B(this.min)&&(this.options.ordinal&&!this.ordinal.originalOrdinalRange&&this.ordinal.getExtendedPositions(!1),this.isFullRange=w(this.dataMin)&&w(this.dataMax)&&this.max-this.min==this.dataMax-this.dataMin,this.max===this.dataMax&&(t?.trigger!=="pan"||this.isInternal)&&t?.trigger!=="navigator")){let i=this.ordinal.convertOverscroll(e.overscroll);this.max+=i,!this.isInternal&&w(this.userMin)&&t?.trigger!=="mousewheel"&&(this.min+=i)}}function a(){this.horiz&&!this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)}function l(){this.ordinal&&(this.ordinal.beforeSetTickPositions(),this.tickInterval=this.ordinal.postProcessTickInterval(this.tickInterval))}function p(t){let e=this.xAxis[0],i=e.ordinal.convertOverscroll(e.options.overscroll),s=t.originalEvent.chartX,o=this.options.chart.panning,n=!1;if(o?.type!=="y"&&e.options.ordinal&&e.series.length&&(!t.touches||t.touches.length<=1)){let o,r,a=this.mouseDownX,l=e.getExtremes(),h=l.dataMin,d=l.dataMax,p=l.min,c=l.max,u=this.hoverPoints,g=e.closestPointRange||e.ordinal?.overscrollPointsRange,f=Math.round((a-s)/(e.translationSlope*(e.ordinal.slope||g))),m=e.ordinal.getExtendedPositions(),x={ordinal:{positions:m,extendedOrdinalPositions:m}},b=e.index2val,v=e.val2lin;if(p<=h&&f<=0||c>=d+i&&f>=0)return void t.preventDefault();x.ordinal.positions?Math.abs(f)>1&&(u&&u.forEach(function(t){t.setState()}),r=x.ordinal.positions,i&&(r=x.ordinal.positions=r.concat(e.ordinal.getOverscrollPositions())),d>r[r.length-1]&&r.push(d),this.setFixedRange(c-p),(o=e.navigatorAxis.toFixedRange(void 0,void 0,b.apply(x,[v.apply(x,[p,!0])+f]),b.apply(x,[v.apply(x,[c,!0])+f]))).min>=Math.min(r[0],p)&&o.max<=Math.max(r[r.length-1],c)+i&&e.setExtremes(o.min,o.max,!0,!1,{trigger:"pan"}),this.mouseDownX=s,A(this.container,{cursor:"move"})):n=!0}else n=!0;n||o&&/y/.test(o.type)?i&&B(e.dataMax)&&(e.max=e.dataMax+i):t.preventDefault()}function c(){let t=this.xAxis;t?.options.ordinal&&(delete t.ordinal.index,delete t.ordinal.originalOrdinalRange)}function u(t,e){let i,s=this.ordinal,n=s.positions,r=s.slope,a;if(!n)return t;let l=n.length;if(n[0]<=t&&n[l-1]>=t)i=o(n,t);else{if(a=s.getExtendedPositions?.(),!a?.length)return t;let l=a.length;r||(r=(a[l-1]-a[0])/l);let h=o(a,n[0]);if(t>=a[0]&&t<=a[l-1])i=o(a,t)-h;else{if(!e)return t;i=t<a[0]?-h-(a[0]-t)/r:(t-a[l-1])/r+l-h}}return e?i:r*(i||0)+s.offset}t.compose=function(t,o,h){let d=t.prototype;return d.ordinal2lin||(d.getTimeTicks=e,d.index2val=i,d.lin2val=s,d.val2lin=u,d.ordinal2lin=d.val2lin,x(t,"afterInit",n),x(t,"foundExtremes",r),x(t,"afterSetScale",a),x(t,"initialAxisTranslation",l),x(h,"pan",p),x(h,"touchpan",p),x(o,"updatedData",c)),t},t.Additions=class{constructor(t){this.index={},this.axis=t}beforeSetTickPositions(){let t=this.axis,e=t.ordinal,i=t.getExtremes(),s=i.min,o=i.max,n=t.brokenAxis?.hasBreaks,r=t.options.ordinal,a=t.options.overscroll&&t.ordinal.convertOverscroll(t.options.overscroll)||0,l,h,d,p,c,u,g,f=[],m=Number.MAX_VALUE,x=!1,b=!1,v=!1;if(r||n){let i=0;if(t.series.forEach(function(t,e){let s=t.getColumn("x",!0);if(h=[],e>0&&"highcharts-navigator-series"!==t.options.id&&s.length>1&&(b=i!==s[1]-s[0]),i=s[1]-s[0],t.boosted&&(v=t.boosted),t.reserveSpace()&&(!1!==t.takeOrdinalPosition||n)&&(l=(f=f.concat(s)).length,f.sort(function(t,e){return t-e}),m=Math.min(m,L(t.closestPointRange,m)),l)){for(e=0;e<l-1;)f[e]!==f[e+1]&&h.push(f[e+1]),e++;h[0]!==f[0]&&h.unshift(f[0]),f=h}}),t.ordinal.originalOrdinalRange||(t.ordinal.originalOrdinalRange=(f.length-1)*m),b&&v&&(f.pop(),f.shift()),(l=f.length)>2){for(d=f[1]-f[0],g=l-1;g--&&!x;)f[g+1]-f[g]!==d&&(x=!0);!t.options.keepOrdinalPadding&&(f[0]-s>d||o-a-f[l-1]>d)&&(x=!0)}else t.options.overscroll&&(2===l?m=f[1]-f[0]:1===l?(m=a,f=[f[0],f[0]+m]):m=e.overscrollPointsRange);x||t.forceOrdinal?(t.options.overscroll&&(e.overscrollPointsRange=m,f=f.concat(e.getOverscrollPositions())),e.positions=f,p=t.ordinal2lin(Math.max(s,f[0]),!0),c=Math.max(t.ordinal2lin(Math.min(o,f[f.length-1]),!0),1),e.slope=u=(o-s)/(c-p),e.offset=s-p*u):(e.overscrollPointsRange=L(t.closestPointRange,e.overscrollPointsRange),e.positions=t.ordinal.slope=e.offset=void 0)}t.isOrdinal=r&&x,e.groupIntervalFactor=null}static findIndexOf(t,e,i){let s=0,o=t.length-1,n;for(;s<o;)t[n=Math.ceil((s+o)/2)]<=e?s=n:o=n-1;return t[s]===e||i?s:-1}getExtendedPositions(t=!0){let e=this,i=e.axis,s=i.constructor.prototype,o=i.chart,n=i.series.reduce((t,e)=>{let i=e.currentDataGrouping;return t+(i?i.count+i.unitName:"raw")},""),r=t?i.ordinal.convertOverscroll(i.options.overscroll):0,a=i.getExtremes(),l,h,p=e.index;return p||(p=e.index={}),!p[n]&&((l={series:[],chart:o,forceOrdinal:!1,getExtremes:function(){return{min:a.dataMin,max:a.dataMax+r}},applyGrouping:s.applyGrouping,getGroupPixelWidth:s.getGroupPixelWidth,getTimeTicks:s.getTimeTicks,options:{ordinal:!0},ordinal:{getGroupIntervalFactor:this.getGroupIntervalFactor},ordinal2lin:s.ordinal2lin,getIndexOfPoint:s.getIndexOfPoint,val2lin:s.val2lin}).ordinal.axis=l,i.series.forEach(i=>{if(!1===i.takeOrdinalPosition)return;h={xAxis:l,chart:o,groupPixelWidth:i.groupPixelWidth,destroyGroupedData:d().noop,getColumn:i.getColumn,applyGrouping:i.applyGrouping,getProcessedData:i.getProcessedData,reserveSpace:i.reserveSpace,visible:i.visible};let s=i.getColumn("x").concat(t?e.getOverscrollPositions():[]);h.dataTable=new tR({columns:{x:s}}),h.options={...i.options,dataGrouping:i.currentDataGrouping?{firstAnchor:i.options.dataGrouping?.firstAnchor,anchor:i.options.dataGrouping?.anchor,lastAnchor:i.options.dataGrouping?.firstAnchor,enabled:!0,forced:!0,approximation:"open",units:[[i.currentDataGrouping.unitName,[i.currentDataGrouping.count]]]}:{enabled:!1}},l.series.push(h),i.processData.apply(h)}),l.applyGrouping({hasExtremesChanged:!0}),h?.closestPointRange!==h?.basePointRange&&h.currentDataGrouping&&(l.forceOrdinal=!0),i.ordinal.beforeSetTickPositions.apply({axis:l}),!i.ordinal.originalOrdinalRange&&l.ordinal.originalOrdinalRange&&(i.ordinal.originalOrdinalRange=l.ordinal.originalOrdinalRange),l.ordinal.positions&&(p[n]=l.ordinal.positions)),p[n]}getGroupIntervalFactor(t,e,i){let s=i.getColumn("x",!0),o=s.length,n=[],r,a,l=this.groupIntervalFactor;if(!l){for(a=0;a<o-1;a++)n[a]=s[a+1]-s[a];n.sort(function(t,e){return t-e}),r=n[Math.floor(o/2)],t=Math.max(t,s[0]),e=Math.min(e,s[o-1]),this.groupIntervalFactor=l=o*r/(e-t)}return l}getIndexOfPoint(t,e){let i=this.axis,s=i.min,n=i.minPixelPadding;return o(e,s)+v((t-n)/(i.translationSlope*(this.slope||i.closestPointRange||this.overscrollPointsRange)))}getOverscrollPositions(){let t=this.axis,e=this.convertOverscroll(t.options.overscroll),i=this.overscrollPointsRange,s=[],o=t.dataMax;if(w(i))for(;o<t.dataMax+e;)s.push(o+=i);return s}postProcessTickInterval(t){let e=this.axis,i=this.slope,s=e.closestPointRange;return i&&s?e.options.breaks?s||t:t/(i/s):t}convertOverscroll(t=0){let e=this,i=e.axis,s=function(t){return L(e.originalOrdinalRange,w(i.dataMax)&&w(i.dataMin)?i.dataMax-i.dataMin:0)*t};if(D(t)){let e=parseInt(t,10);if(!1===i.isFullRange&&B(i.min)&&B(i.max)&&(this.originalOrdinalRange=i.max-i.min),/%$/.test(t))return s(e/100);if(/px/.test(t)){let t=Math.min(e,.9*i.len)/i.len;return s(t/(i.isFullRange?1-t:1))}return 0}return t}}}(n||(n={}));let tz=n,tI={rangeSelectorZoom:"Zoom",rangeSelectorFrom:"",rangeSelectorTo:"→",rangeSelector:{allText:"All",allTitle:"View all",monthText:"{count}m",monthTitle:"View {count} {#eq count 1}month{else}months{/eq}",yearText:"{count}y",yearTitle:"View {count} {#eq count 1}year{else}years{/eq}",ytdText:"YTD",ytdTitle:"View year to date"}},tL={allButtonsEnabled:!1,buttons:[{type:"month",count:1},{type:"month",count:3},{type:"month",count:6},{type:"ytd"},{type:"year",count:1},{type:"all"}],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:"%[ebY]",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"}},{defaultOptions:tW}=d(),{composed:tX}=d(),tG=[];function tY(){let t,e,i=this.range,s=i.type,o=this.max,n=this.chart.time,r=function(t,e){let i=n.toParts(t),o=i.slice();"year"===s?o[0]+=e:o[1]+=e;let r=n.makeTime.apply(n,o),a=n.toParts(r);return"month"===s&&i[1]===a[1]&&1===Math.abs(e)&&(o[0]=i[0],o[1]=i[1],o[2]=0),(r=n.makeTime.apply(n,o))-t};B(i)?(t=o-i,e=i):i&&(t=o+r(o,-(i.count||1)),this.chart&&this.chart.setFixedRange(o-t));let a=L(this.dataMin,5e-324);return B(t)||(t=a),t<=a&&(t=a,void 0===e&&(e=r(t,i.count)),this.newMax=Math.min(t+e,L(this.dataMax,Number.MAX_VALUE))),B(o)?!B(i)&&i&&i._offsetMin&&(t+=i._offsetMin):t=void 0,t}function tU(){this.rangeSelector?.redrawElements()}function tH(){this.options.rangeSelector&&this.options.rangeSelector.enabled&&(this.rangeSelector=new e(this))}function tN(){let t=this.rangeSelector;if(t){B(t.deferredYTDClick)&&(t.clickButton(t.deferredYTDClick),delete t.deferredYTDClick);let e=t.options.verticalAlign;t.options.floating||("bottom"===e?this.extraBottomMargin=!0:"top"===e&&(this.extraTopMargin=!0))}}function tF(){let t,e=this.rangeSelector;if(!e)return;let i=this.xAxis[0].getExtremes(),s=this.legend,o=e&&e.options.verticalAlign;B(i.min)&&e.render(i.min,i.max),s?.display&&"top"===o&&o===s.options.verticalAlign&&(t=z(this.spacingBox),"vertical"===s.options.layout?t.y=this.plotTop:t.y+=e.getHeight(),s.group.placed=!1,s.align(t))}function tV(){for(let t=0,e=tG.length;t<e;++t){let e=tG[t];if(e[0]===this){e[1].forEach(t=>t()),tG.splice(t,1);return}}}function t_(){let t=this.rangeSelector;if(t?.options?.enabled){let{min:e,max:i}=this.xAxis[0].getExtremes();B(e)&&t.inputGroup&&t.inputGroup.getBBox().width<20&&t.render(e,i);let s=t.getHeight(),o=t.options.verticalAlign;t.options.floating||("bottom"===o?this.marginBottom+=s:"middle"!==o&&(this.plotTop+=s))}}function tj(t){let i=t.options.rangeSelector,s=this.extraBottomMargin,o=this.extraTopMargin,n=this.rangeSelector;if(i&&i.enabled&&!w(n)&&this.options.rangeSelector&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=n=new e(this)),this.extraBottomMargin=!1,this.extraTopMargin=!1,n){let t=i&&i.verticalAlign||n.options&&n.options.verticalAlign;n.options.floating||("bottom"===t?this.extraBottomMargin=!0:"middle"!==t&&(this.extraTopMargin=!0)),(this.extraBottomMargin!==s||this.extraTopMargin!==o)&&(this.isDirtyBox=!0)}}let tK=function(t,i,s){if(e=s,W(tX,"RangeSelector")){let e=i.prototype;t.prototype.minFromRange=tY,x(i,"afterGetContainer",tH),x(i,"beforeRender",tN),x(i,"destroy",tV),x(i,"getMargins",t_),x(i,"redraw",tF),x(i,"update",tj),x(i,"beforeRedraw",tU),e.callbacks.push(tF),O(tW,{rangeSelector:tL}),O(tW.lang,tI)}},tZ=i.default.SVGElement;var tq=l.n(tZ);let t$=i.default.Templating;var tJ=l.n(t$);let{defaultOptions:tQ}=d(),{format:t0}=tJ();function t1(t){let e=e=>RegExp(`%[[a-zA-Z]*${e}`).test(t);if(D(t)?-1!==t.indexOf("%L"):t.fractionalSecondDigits)return"text";let i=D(t)?["a","A","d","e","w","b","B","m","o","y","Y"].some(e):t.dateStyle||t.day||t.month||t.year,s=D(t)?["H","k","I","l","M","S"].some(e):t.timeStyle||t.hour||t.minute||t.second;return i&&s?"datetime-local":i?"date":s?"time":"text"}class t2{static compose(t,e){tK(t,e,t2)}constructor(t){this.isDirty=!1,this.buttonOptions=[],this.initialButtonGroupWidth=0,this.maxButtonWidth=()=>{let t=0;return this.buttons.forEach(e=>{let i=e.getBBox();i.width>t&&(t=i.width)}),t},this.init(t)}clickButton(t,e){let i=this.chart,s=this.buttonOptions[t],o=i.xAxis[0],n=i.scroller&&i.scroller.getUnionExtremes()||o||{},r=s.type,a=s.dataGrouping,l=n.dataMin,h=n.dataMax,d,p=B(o?.max)?Math.round(Math.min(o.max,h??o.max)):void 0,c,u=s._range,g,f,m,b=!0;if(null!==l&&null!==h){if(this.setSelected(t),a&&(this.forcedDataGrouping=!0,N().prototype.setDataGrouping.call(o||{chart:this.chart},a,!1),this.frozenStates=s.preserveDataGrouping),"month"===r||"year"===r)o?(f={range:s,max:p,chart:i,dataMin:l,dataMax:h},d=o.minFromRange.call(f),B(f.newMax)&&(p=f.newMax),b=!1):u=s;else if(u)B(p)&&(p=Math.min((d=Math.max(p-u,l))+u,h),b=!1);else if("ytd"===r)if(o)!o.hasData()||B(h)&&B(l)||(l=Number.MAX_VALUE,h=-Number.MAX_VALUE,i.series.forEach(t=>{let e=t.getColumn("x");e.length&&(l=Math.min(e[0],l),h=Math.max(e[e.length-1],h))}),e=!1),B(h)&&B(l)&&(d=g=(m=this.getYTDExtremes(h,l)).min,p=m.max);else{this.deferredYTDClick=t;return}else"all"===r&&o&&(i.navigator&&i.navigator.baseSeries[0]&&(i.navigator.baseSeries[0].xAxis.options.range=void 0),d=l,p=h);if(b&&s._offsetMin&&w(d)&&(d+=s._offsetMin),s._offsetMax&&w(p)&&(p+=s._offsetMax),this.dropdown&&(this.dropdown.selectedIndex=t+1),o)(B(d)||B(p))&&(o.setExtremes(d,p,L(e,!0),void 0,{trigger:"rangeSelectorButton",rangeSelectorButton:s}),i.setFixedRange(s._range));else{c=G(i.options.xAxis||{})[0];let t=x(i,"afterCreateAxes",function(){let t=i.xAxis[0];t.range=t.options.range=u,t.min=t.options.min=g});x(i,"load",function(){let e=i.xAxis[0];i.setFixedRange(s._range),e.options.range=c.range,e.options.min=c.min,t()})}E(this,"afterBtnClick")}}setSelected(t){this.selected=this.options.selected=t}init(t){let e=this,i=t.options.rangeSelector,s=t.options.lang,o=i.buttons,n=i.selected,r=function(){let t=e.minInput,i=e.maxInput;t&&t.blur&&E(t,"blur"),i&&i.blur&&E(i,"blur")};e.chart=t,e.options=i,e.buttons=[],e.buttonOptions=o.map(t=>(t.type&&s.rangeSelector&&(t.text??(t.text=s.rangeSelector[`${t.type}Text`]),t.title??(t.title=s.rangeSelector[`${t.type}Title`])),t.text=t0(t.text,{count:t.count||1}),t.title=t0(t.title,{count:t.count||1}),t)),this.eventsToUnbind=[],this.eventsToUnbind.push(x(t.container,"mousedown",r)),this.eventsToUnbind.push(x(t,"resize",r)),o.forEach(e.computeButtonRange),void 0!==n&&o[n]&&this.clickButton(n,!1),this.eventsToUnbind.push(x(t,"load",function(){t.xAxis&&t.xAxis[0]&&x(t.xAxis[0],"setExtremes",function(i){B(this.max)&&B(this.min)&&this.max-this.min!==t.fixedRange&&"rangeSelectorButton"!==i.trigger&&"updatedData"!==i.trigger&&e.forcedDataGrouping&&!e.frozenStates&&this.setDataGrouping(!1,!1)})})),this.createElements()}updateButtonStates(){let t=this,e=this.chart,i=this.dropdown,s=this.dropdownLabel,o=e.xAxis[0],n=Math.round(o.max-o.min),r=!o.hasVisibleSeries,a=24*36e5,l=e.scroller&&e.scroller.getUnionExtremes()||o,h=l.dataMin,d=l.dataMax,p=t.getYTDExtremes(d,h),c=p.min,u=p.max,g=t.selected,f=t.options.allButtonsEnabled,m=Array(t.buttonOptions.length).fill(0),x=B(g),b=t.buttons,v=!1,y=null;t.buttonOptions.forEach((e,i)=>{let s=e._range,l=e.type,p=e.count||1,b=e._offsetMax-e._offsetMin,M=i===g,A=s>d-h,w=s<o.minRange,k=!1,S=s===n;if(M&&A&&(v=!0),o.isOrdinal&&o.ordinal?.positions&&s&&n<s){let t=o.ordinal.positions;t[t.length-1]-t[0]>s&&(S=!0)}else("month"===l||"year"===l)&&n+36e5>=({month:28,year:365})[l]*a*p-b&&n-36e5<=({month:31,year:366})[l]*a*p+b?S=!0:"ytd"===l?(S=u-c+b===n,k=!M):"all"===l&&(S=o.max-o.min>=d-h);let O=!f&&!(v&&"all"===l)&&(A||w||r),E=v&&"all"===l||!k&&S||M&&t.frozenStates;O?m[i]=3:E&&(!x||i===g)&&(y=i)}),null!==y?(m[y]=2,t.setSelected(y),this.dropdown&&(this.dropdown.selectedIndex=y+1)):(t.setSelected(),this.dropdown&&(this.dropdown.selectedIndex=-1),s&&(s.setState(0),s.attr({text:(tQ.lang.rangeSelectorZoom||"")+" ▾"})));for(let e=0;e<m.length;e++){let o=m[e],n=b[e];if(n.state!==o&&(n.setState(o),i)){i.options[e+1].disabled=3===o,2===o&&(s&&(s.setState(2),s.attr({text:t.buttonOptions[e].text+" ▾"})),i.selectedIndex=e+1);let n=s.getBBox();A(i,{width:`${n.width}px`,height:`${n.height}px`})}}}computeButtonRange(t){let e=t.type,i=t.count||1,s={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5};s[e]?t._range=s[e]*i:("month"===e||"year"===e)&&(t._range=24*({month:30,year:365})[e]*36e5*i),t._offsetMin=L(t.offsetMin,0),t._offsetMax=L(t.offsetMax,0),t._range+=t._offsetMax-t._offsetMin}getInputValue(t){let e="min"===t?this.minInput:this.maxInput,i=this.chart.options.rangeSelector,s=this.chart.time;return e?("text"===e.type&&i.inputDateParser||this.defaultInputDateParser)(e.value,"UTC"===s.timezone,s):0}setInputValue(t,e){let i=this.options,s=this.chart.time,o="min"===t?this.minInput:this.maxInput,n="min"===t?this.minDateBox:this.maxDateBox;if(o){o.setAttribute("type",t1(i.inputDateFormat||"%e %b %Y"));let t=o.getAttribute("data-hc-time"),r=w(t)?Number(t):void 0;if(w(e)){let t=r;w(t)&&o.setAttribute("data-hc-time-previous",t),o.setAttribute("data-hc-time",e),r=e}o.value=s.dateFormat(this.inputTypeFormats[o.type]||i.inputEditDateFormat,r),n&&n.attr({text:s.dateFormat(i.inputDateFormat,r)})}}setInputExtremes(t,e,i){let s="min"===t?this.minInput:this.maxInput;if(s){let t=this.inputTypeFormats[s.type],o=this.chart.time;if(t){let n=o.dateFormat(t,e);s.min!==n&&(s.min=n);let r=o.dateFormat(t,i);s.max!==r&&(s.max=r)}}}showInput(t){let e="min"===t?this.minDateBox:this.maxDateBox,i="min"===t?this.minInput:this.maxInput;if(i&&e&&this.inputGroup){let t="text"===i.type,{translateX:s=0,translateY:o=0}=this.inputGroup,{x:n=0,width:r=0,height:a=0}=e,{inputBoxWidth:l}=this.options;A(i,{width:t?r+(l?-2:20)+"px":"auto",height:a-2+"px",border:"2px solid silver"}),t&&l?A(i,{left:s+n+"px",top:o+"px"}):A(i,{left:Math.min(Math.round(n+s-(i.offsetWidth-r)/2),this.chart.chartWidth-i.offsetWidth)+"px",top:o-(i.offsetHeight-a)/2+"px"})}}hideInput(t){let e="min"===t?this.minInput:this.maxInput;e&&A(e,{top:"-9999em",border:0,width:"1px",height:"1px"})}defaultInputDateParser(t,e,i){return i?.parse(t)||0}drawInput(t){let{chart:e,div:i,inputGroup:s}=this,o=this,n=e.renderer.style||{},r=e.renderer,a=e.options.rangeSelector,l=tQ.lang,h="min"===t;function p(t){let{maxInput:i,minInput:s}=o,n=e.xAxis[0],r=e.scroller?.getUnionExtremes()||n,a=r.dataMin,l=r.dataMax,d=e.xAxis[0].getExtremes()[t],p=o.getInputValue(t);B(p)&&p!==d&&(h&&i&&B(a)?p>Number(i.getAttribute("data-hc-time"))?p=void 0:p<a&&(p=a):s&&B(l)&&(p<Number(s.getAttribute("data-hc-time"))?p=void 0:p>l&&(p=l)),void 0!==p&&n.setExtremes(h?p:n.min,h?n.max:p,void 0,void 0,{trigger:"rangeSelectorInput"}))}let c=l[h?"rangeSelectorFrom":"rangeSelectorTo"]||"",u=r.label(c,0).addClass("highcharts-range-label").attr({padding:2*!!c,height:c?a.inputBoxHeight:0}).add(s),g=r.label("",0).addClass("highcharts-range-input").attr({padding:2,width:a.inputBoxWidth,height:a.inputBoxHeight,"text-align":"center"}).on("click",function(){o.showInput(t),o[t+"Input"].focus()});e.styledMode||g.attr({stroke:a.inputBoxBorderColor,"stroke-width":1}),g.add(s);let f=y("input",{name:t,className:"highcharts-range-selector"},void 0,i);f.setAttribute("type",t1(a.inputDateFormat||"%e %b %Y")),e.styledMode||(u.css(z(n,a.labelStyle)),g.css(z({color:"#333333"},n,a.inputStyle)),A(f,O({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:n.fontSize,fontFamily:n.fontFamily,top:"-9999em"},a.inputStyle))),f.onfocus=()=>{o.showInput(t)},f.onblur=()=>{f===d().doc.activeElement&&p(t),o.hideInput(t),o.setInputValue(t),f.blur()};let m=!1;return f.onchange=()=>{m||(p(t),o.hideInput(t),f.blur())},f.onkeypress=e=>{13===e.keyCode&&p(t)},f.onkeydown=e=>{m=!0,("ArrowUp"===e.key||"ArrowDown"===e.key||"Tab"===e.key)&&p(t)},f.onkeyup=()=>{m=!1},{dateBox:g,input:f,label:u}}getPosition(){let t=this.chart,e=t.options.rangeSelector,i="top"===e.verticalAlign?t.plotTop-t.axisOffset[0]:0;return{buttonTop:i+e.buttonPosition.y,inputTop:i+e.inputPosition.y-10}}getYTDExtremes(t,e){let i=this.chart.time,s=i.toParts(t)[0];return{max:t,min:Math.max(e,i.makeTime(s,0))}}createElements(){let t=this.chart,e=t.renderer,i=t.container,s=t.options,o=s.rangeSelector,n=o.inputEnabled,r=L(s.chart.style?.zIndex,0)+1;!1!==o.enabled&&(this.group=e.g("range-selector-group").attr({zIndex:7}).add(),this.div=y("div",void 0,{position:"relative",height:0,zIndex:r}),this.buttonOptions.length&&this.renderButtons(),i.parentNode&&i.parentNode.insertBefore(this.div,i),n&&this.createInputs())}createInputs(){this.inputGroup=this.chart.renderer.g("input-group").add(this.group);let t=this.drawInput("min");this.minDateBox=t.dateBox,this.minLabel=t.label,this.minInput=t.input;let e=this.drawInput("max");this.maxDateBox=e.dateBox,this.maxLabel=e.label,this.maxInput=e.input}render(t,e){if(!1===this.options.enabled)return;let i=this.chart,s=i.options.rangeSelector;if(s.inputEnabled){this.inputGroup||this.createInputs(),this.setInputValue("min",t),this.setInputValue("max",e),this.chart.styledMode||(this.maxLabel?.css(s.labelStyle),this.minLabel?.css(s.labelStyle));let o=i.scroller&&i.scroller.getUnionExtremes()||i.xAxis[0]||{};if(w(o.dataMin)&&w(o.dataMax)){let t=i.xAxis[0].minRange||0;this.setInputExtremes("min",o.dataMin,Math.min(o.dataMax,this.getInputValue("max"))-t),this.setInputExtremes("max",Math.max(o.dataMin,this.getInputValue("min"))+t,o.dataMax)}if(this.inputGroup){let t=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(e=>{if(e){let{width:i}=e.getBBox();i&&(e.attr({x:t}),t+=i+s.inputSpacing)}})}}else this.inputGroup&&(this.inputGroup.destroy(),delete this.inputGroup);!this.chart.styledMode&&this.zoomText&&this.zoomText.css(s.labelStyle),this.alignElements(),this.updateButtonStates()}renderButtons(){var t;let{chart:e,options:i}=this,s=tQ.lang,o=e.renderer,n=z(i.buttonTheme),r=n&&n.states;delete n.width,delete n.states,this.buttonGroup=o.g("range-selector-buttons").add(this.group);let a=this.dropdown=y("select",void 0,{position:"absolute",padding:0,border:0,cursor:"pointer",opacity:1e-4},this.div),l=e.userOptions.rangeSelector?.buttonTheme;this.dropdownLabel=o.button("",0,0,()=>{},z(n,{"stroke-width":L(n["stroke-width"],0),width:"auto",paddingLeft:L(i.buttonTheme.paddingLeft,l?.padding,8),paddingRight:L(i.buttonTheme.paddingRight,l?.padding,8)}),r&&r.hover,r&&r.select,r&&r.disabled).hide().add(this.group),x(a,"touchstart",()=>{a.style.fontSize="16px"});let h=d().isMS?"mouseover":"mouseenter",p=d().isMS?"mouseout":"mouseleave";x(a,h,()=>{E(this.dropdownLabel.element,h)}),x(a,p,()=>{E(this.dropdownLabel.element,p)}),x(a,"change",()=>{E(this.buttons[a.selectedIndex-1].element,"click")}),this.zoomText=o.label(s.rangeSelectorZoom||"",0).attr({padding:i.buttonTheme.padding,height:i.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup),this.chart.styledMode||(this.zoomText.css(i.labelStyle),(t=i.buttonTheme)["stroke-width"]??(t["stroke-width"]=0)),y("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,a),this.createButtons()}createButtons(){let{options:t}=this,e=z(t.buttonTheme),i=e&&e.states,s=e.width||28;delete e.width,delete e.states,this.buttonOptions.forEach((t,e)=>{this.createButton(t,e,s,i)})}createButton(t,e,i,s){let{dropdown:o,buttons:n,chart:r,options:a}=this,l=r.renderer,h=z(a.buttonTheme);o?.add(y("option",{textContent:t.title||t.text}),e+2),n[e]=l.button(t.text??"",0,0,i=>{let s,o=t.events&&t.events.click;o&&(s=o.call(t,i)),!1!==s&&this.clickButton(e),this.isActive=!0},h,s&&s.hover,s&&s.select,s&&s.disabled).attr({"text-align":"center",width:i}).add(this.buttonGroup),t.title&&n[e].attr("title",t.title)}alignElements(){let{buttonGroup:t,buttons:e,chart:i,group:s,inputGroup:o,options:n,zoomText:r}=this,a=i.options,l=a.exporting&&!1!==a.exporting.enabled&&a.navigation&&a.navigation.buttonOptions,{buttonPosition:h,inputPosition:d,verticalAlign:p}=n,c=(t,e,s)=>l&&this.titleCollision(i)&&"top"===p&&s&&e.y-t.getBBox().height-12<(l.y||0)+(l.height||0)+i.spacing[0]?-40:0,u=i.plotLeft;if(s&&h&&d){let a=h.x-i.spacing[3];if(t){if(this.positionButtons(),!this.initialButtonGroupWidth){let t=0;r&&(t+=r.getBBox().width+5),e.forEach((i,s)=>{t+=i.width||0,s!==e.length-1&&(t+=n.buttonSpacing)}),this.initialButtonGroupWidth=t}u-=i.spacing[3];let o=c(t,h,"right"===h.align||"right"===d.align);this.alignButtonGroup(o),this.buttonGroup?.translateY&&this.dropdownLabel.attr({y:this.buttonGroup.translateY}),s.placed=t.placed=i.hasLoaded}let l=0;n.inputEnabled&&o&&(l=c(o,d,"right"===h.align||"right"===d.align),"left"===d.align?a=u:"right"===d.align&&(a=-Math.max(i.axisOffset[1],-l)),o.align({y:d.y,width:o.getBBox().width,align:d.align,x:d.x+a-2},!0,i.spacingBox),o.placed=i.hasLoaded),this.handleCollision(l),s.align({verticalAlign:p},!0,i.spacingBox);let g=s.alignAttr.translateY,f=s.getBBox().height+20,m=0;if("bottom"===p){let t=i.legend&&i.legend.options;m=g-(f=f+(t&&"bottom"===t.verticalAlign&&t.enabled&&!t.floating?i.legend.legendHeight+L(t.margin,10):0)-20)-(n.floating?0:n.y)-(i.titleOffset?i.titleOffset[2]:0)-10}"top"===p?(n.floating&&(m=0),i.titleOffset&&i.titleOffset[0]&&(m=i.titleOffset[0]),m+=i.margin[0]-i.spacing[0]||0):"middle"===p&&(d.y===h.y?m=g:(d.y||h.y)&&(d.y<0||h.y<0?m-=Math.min(d.y,h.y):m=g-f)),s.translate(n.x,n.y+Math.floor(m));let{minInput:x,maxInput:b,dropdown:v}=this;n.inputEnabled&&x&&b&&(x.style.marginTop=s.translateY+"px",b.style.marginTop=s.translateY+"px"),v&&(v.style.marginTop=s.translateY+"px")}}redrawElements(){let t=this.chart,{inputBoxHeight:e,inputBoxBorderColor:i}=this.options;if(this.maxDateBox?.attr({height:e}),this.minDateBox?.attr({height:e}),t.styledMode||(this.maxDateBox?.attr({stroke:i}),this.minDateBox?.attr({stroke:i})),this.isDirty){this.isDirty=!1,this.isCollapsed=void 0;let t=this.options.buttons??[],e=Math.min(t.length,this.buttonOptions.length),{dropdown:i,options:s}=this,o=z(s.buttonTheme),n=o&&o.states,r=o.width||28;if(t.length<this.buttonOptions.length)for(let e=this.buttonOptions.length-1;e>=t.length;e--){let t=this.buttons.pop();t?.destroy(),this.dropdown?.options.remove(e+1)}for(let s=e-1;s>=0;s--){let e=t[s];this.buttons[s].destroy(),i?.options.remove(s+1),this.createButton(e,s,r,n),this.computeButtonRange(e)}if(t.length>this.buttonOptions.length)for(let e=this.buttonOptions.length;e<t.length;e++)this.createButton(t[e],e,r,n),this.computeButtonRange(t[e]);this.buttonOptions=this.options.buttons??[],w(this.options.selected)&&this.buttons.length&&this.clickButton(this.options.selected,!1)}}alignButtonGroup(t,e){let{chart:i,options:s,buttonGroup:o,dropdown:n,dropdownLabel:r}=this,{buttonPosition:a}=s,l=i.plotLeft-i.spacing[3],h=a.x-i.spacing[3],d=i.plotLeft;"right"===a.align?(h+=t-l,this.hasVisibleDropdown&&(d=i.chartWidth+t-this.maxButtonWidth()-20)):"center"===a.align&&(h-=l/2,this.hasVisibleDropdown&&(d=i.chartWidth/2-this.maxButtonWidth())),n&&A(n,{left:d+"px",top:o?.translateY+"px"}),r?.attr({x:d}),o&&o.align({y:a.y,width:L(e,this.initialButtonGroupWidth),align:a.align,x:h},!0,i.spacingBox)}positionButtons(){let{buttons:t,chart:e,options:i,zoomText:s}=this,o=e.hasLoaded?"animate":"attr",{buttonPosition:n}=i,r=e.plotLeft,a=r;s&&"hidden"!==s.visibility&&(s[o]({x:L(r+n.x,r)}),a+=n.x+s.getBBox().width+5);for(let e=0,s=this.buttonOptions.length;e<s;++e)"hidden"!==t[e].visibility?(t[e][o]({x:a}),a+=(t[e].width||0)+i.buttonSpacing):t[e][o]({x:r})}handleCollision(t){let{chart:e,buttonGroup:i,inputGroup:s,initialButtonGroupWidth:o}=this,{buttonPosition:n,dropdown:r,inputPosition:a}=this.options,l=()=>{s&&i&&s.attr({translateX:s.alignAttr.translateX+(e.axisOffset[1]>=-t?0:-t),translateY:s.alignAttr.translateY+i.getBBox().height+10})};s&&i?a.align===n.align?(l(),o>e.plotWidth+t-20?this.collapseButtons():this.expandButtons()):o-t+s.getBBox().width>e.plotWidth?"responsive"===r||"always"===r?this.collapseButtons():l():this.expandButtons():i&&"responsive"===r&&(o>e.plotWidth?this.collapseButtons():this.expandButtons()),i&&("always"===r&&this.collapseButtons(),"never"===r&&this.expandButtons()),this.alignButtonGroup(t)}collapseButtons(){let{buttons:t,zoomText:e}=this;!0!==this.isCollapsed&&(this.isCollapsed=!0,e.hide(),t.forEach(t=>void t.hide()),this.showDropdown())}expandButtons(){let{buttons:t,zoomText:e}=this;!1!==this.isCollapsed&&(this.isCollapsed=!1,this.hideDropdown(),e.show(),t.forEach(t=>void t.show()),this.positionButtons())}showDropdown(){let{buttonGroup:t,dropdownLabel:e,dropdown:i}=this;t&&i&&(e.show(),A(i,{visibility:"inherit"}),this.hasVisibleDropdown=!0)}hideDropdown(){let{dropdown:t}=this;t&&(this.dropdownLabel.hide(),A(t,{visibility:"hidden"}),this.hasVisibleDropdown=!1)}getHeight(){let t=this.options,e=this.group,i=t.inputPosition,s=t.buttonPosition,o=t.y,n=s.y,r=i.y,a=0;if(t.height)return t.height;this.alignElements(),a=e?e.getBBox(!0).height+13+o:0;let l=Math.min(r,n);return(r<0&&n<0||r>0&&n>0)&&(a+=Math.abs(l)),a}titleCollision(t){return!(t.options.title.text||t.options.subtitle.text)}update(t,e=!0){let i=this.chart;if(z(!0,this.options,t),this.options.selected&&this.options.selected>=this.options.buttons.length&&(this.options.selected=void 0,i.options.rangeSelector.selected=void 0),w(t.enabled))return this.destroy(),this.init(i);this.isDirty=!!t.buttons||!!t.buttonTheme,e&&this.render()}destroy(){let t=this,e=t.minInput,i=t.maxInput;t.eventsToUnbind&&(t.eventsToUnbind.forEach(t=>t()),t.eventsToUnbind=void 0),k(t.buttons),e&&(e.onfocus=e.onblur=e.onchange=null),i&&(i.onfocus=i.onblur=i.onchange=null),I(t,function(e,i){if(e&&"chart"!==i){if(e instanceof tq())e.destroy();else e instanceof window.HTMLElement&&e?.parentElement?.removeChild(e);delete t[i]}e!==t2.prototype[i]&&(t[i]=null)},this),this.buttons=[]}}O(t2.prototype,{inputTypeFormats:{"datetime-local":"%Y-%m-%dT%H:%M:%S",date:"%Y-%m-%d",time:"%H:%M:%S"}});let t3=i.default.Chart;var t5=l.n(t3);let{format:t6}=tJ(),{getOptions:t9}=d(),{setFixedRange:t4}=tg;function t8(t,e,i){return"xAxis"===t?{minPadding:0,maxPadding:0,overscroll:0,ordinal:!0}:"yAxis"===t?{labels:{y:-2},opposite:i.opposite??e.opposite??!0,showLastLabel:!!(e.categories||"category"===e.type),title:{text:void 0}}:{}}function t7(t,e){if("xAxis"===t){let t=L(e.navigator?.enabled,td.enabled,!0),i={type:"datetime",categories:void 0};return t&&(i.startOnTick=!1,i.endOnTick=!1),i}return{}}class et extends t5(){init(t,e){let i=t9(),s=t.xAxis,o=t.yAxis,n=L(t.navigator?.enabled,td.enabled,!0);t.xAxis=t.yAxis=void 0;let r=z({chart:{panning:{enabled:!0,type:"x"},zooming:{pinchType:"x",mouseWheel:{type:"x"}}},navigator:{enabled:n},scrollbar:{enabled:L(tw.enabled,!0)},rangeSelector:{enabled:L(tL.enabled,!0)},title:{text:null},tooltip:{split:L(i.tooltip?.split,!0),crosshairs:!0},legend:{enabled:!1}},t,{isStock:!0});t.xAxis=s,t.yAxis=o,r.xAxis=G(t.xAxis||{}).map(e=>z(t8("xAxis",e,i.xAxis),e,t7("xAxis",t))),r.yAxis=G(t.yAxis||{}).map(t=>z(t8("yAxis",t,i.yAxis),t)),super.init(r,e)}createAxis(t,e){return e.axis=z(t8(t,e.axis,t9()[t]),e.axis,t7(t,this.userOptions)),super.createAxis(t,e)}}x(t5(),"update",function(t){let e=t.options;"scrollbar"in e&&this.navigator&&(z(!0,this.options.scrollbar,e.scrollbar),this.navigator.update({enabled:!!this.navigator.navigatorEnabled}),delete e.scrollbar)}),function(t){function e(t){if(!(this.crosshair?.label?.enabled&&this.cross&&B(this.min)&&B(this.max)))return;let e=this.chart,i=this.logarithmic,s=this.crosshair.label,o=this.horiz,n=this.opposite,r=this.left,a=this.top,l=this.width,h="inside"===this.options.tickPosition,d=!1!==this.crosshair.snap,p=t.e||this.cross?.e,c=t.point,u=this.crossLabel,g,f,m=s.format,x="",b,v=0,y=this.min,M=this.max;i&&(y=i.lin2log(this.min),M=i.lin2log(this.max));let A=o?"center":n?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";!u&&(u=this.crossLabel=e.renderer.label("",0,void 0,s.shape||"callout").addClass("highcharts-crosshair-label highcharts-color-"+(c?.series?c.series.colorIndex:this.series[0]&&this.series[0].colorIndex)).attr({align:s.align||A,padding:L(s.padding,8),r:L(s.borderRadius,3),zIndex:2}).add(this.labelGroup),e.styledMode||u.attr({fill:s.backgroundColor||c?.series?.color||"#666666",stroke:s.borderColor||"","stroke-width":s.borderWidth||0}).css(O({color:"#ffffff",fontWeight:"normal",fontSize:"0.7em",textAlign:"center"},s.style||{}))),o?(g=d?(c.plotX||0)+r:p.chartX,f=a+(n?0:this.height)):(g=r+this.offset+(n?l:0),f=d?(c.plotY||0)+a:p.chartY),m||s.formatter||(this.dateTime&&(x="%b %d, %Y"),m="{value"+(x?":"+x:"")+"}");let w=d?this.isXAxis?c.x:c.y:this.toValue(o?p.chartX:p.chartY),k=c?.series?c.series.isPointInside(c):B(w)&&w>y&&w<M,S="";m?S=t6(m,{value:w},e):s.formatter&&B(w)&&(S=s.formatter.call(this,w,this)),u.attr({text:S,x:g,y:f,visibility:k?"inherit":"hidden"});let E=u.getBBox();!B(u.x)||o||n||(g=u.x-E.width/2),B(u.y)&&(o?(h&&!n||!h&&n)&&(f=u.y-E.height):f=u.y-E.height/2),b=o?{left:r,right:r+this.width}:{left:"left"===this.labelAlign?r:0,right:"right"===this.labelAlign?r+this.width:e.chartWidth};let C=u.translateX||0;C<b.left&&(v=b.left-C),C+E.width>=b.right&&(v=-(C+E.width-b.right)),u.attr({x:Math.max(0,g+v),y:Math.max(0,f),anchorX:o?g:this.opposite?0:e.chartWidth,anchorY:o?this.opposite?e.chartHeight:0:f+E.height/2})}function i(){this.crossLabel&&(this.crossLabel=this.crossLabel.hide())}function s(t){let e=this.chart,i=this.options,s=e._labelPanes=e._labelPanes||{},o=i.labels;if(e.options.isStock&&"yAxis"===this.coll){let e=i.top+","+i.height;!s[e]&&o.enabled&&(15===o.distance&&1===this.side&&(o.distance=0),void 0===o.align&&(o.align="right"),s[e]=this,t.align="right",t.preventDefault())}}function o(){let t=this.chart,e=this.options&&this.options.top+","+this.options.height;e&&t._labelPanes&&t._labelPanes[e]===this&&delete t._labelPanes[e]}function n(t){let e=this.isLinked&&!this.series&&this.linkedParent?this.linkedParent.series:this.series,{chart:i,horiz:s}=this,o=i.renderer,n=[],{acrossPanes:r=!0,force:a,translatedValue:l,value:h}=t,d=(this.isXAxis?i.yAxis:i.xAxis)||[];function p(t,e,i){n.push(["M",s?t:e,s?e:t],["L",s?t:i,s?i:t])}let c=[],u,g;if(i.options.isStock&&("xAxis"===this.coll||"yAxis"===this.coll)){let f,m;for(let s of(t.preventDefault(),f="xAxis"===this.coll?"yAxis":"xAxis",m=this.options[f],c=r&&!this.options.isInternal?d.filter(t=>!t.options.isInternal):B(m)?[i[f][m]]:D(m)?[i.get(m)]:e.map(t=>t[f]),d))if(!s.options.isInternal){let t=s.isXAxis?"yAxis":"xAxis";this===(w(s.options[t])&&i[t][s.options[t]])&&c.push(s)}for(let t of(u=c.length?[]:[this.isXAxis?i.yAxis[0]:i.xAxis[0]],c))-1!==u.indexOf(t)||C(u,e=>e.pos===t.pos&&e.len===t.len)||u.push(t);if(B(g=L(l,this.translate(h||0,void 0,void 0,t.old)))){let t,e=s?g+this.pos:this.pos+this.len-g;if("pass"!==a&&(e<this.pos||e>this.pos+this.len)&&(a?e=b(e,this.pos,this.pos+this.len):t=!0),!t){let t=s?"top":"left",i=s?"height":"width";if(!r&&(this.options[t]||this.options[i]))p(e,this[t],this[t]+this[i]);else for(let t of u)p(e,t.pos,t.pos+t.len)}}t.path=n.length>0?o.crispPolyLine(n,t.lineWidth||1):void 0}}function r(t){if(this.chart.options.isStock){let e;this.is("column")||this.is("columnrange")?e={borderWidth:0,shadow:!1}:this.is("scatter")||this.is("sma")||(e={marker:{enabled:!1,radius:2}}),e&&(t.plotOptions[this.type]=z(t.plotOptions[this.type],e))}}function a(){let t=this.chart,e=this.options.dataGrouping;return!1!==this.allowDG&&e&&L(e.enabled,t.options.isStock)}function l(t,e){for(let i=0;i<t.length;i+=2){let s=t[i],o=t[i+1];w(s[1])&&s[1]===o[1]&&(s[1]=o[1]=M(s[1],e)),w(s[2])&&s[2]===o[2]&&(s[2]=o[2]=M(s[2],e))}return t}t.compose=function(t,h,d,p){let c=d.prototype;c.forceCropping||(x(h,"afterDrawCrosshair",e),x(h,"afterHideCrosshair",i),x(h,"autoLabelAlign",s),x(h,"destroy",o),x(h,"getPlotLinePath",n),t.prototype.setFixedRange=t4,c.forceCropping=a,x(d,"setOptions",r),p.prototype.crispPolyLine=l)},t.stockChart=function(e,i,s){return new t(e,i,s)}}(et||(et={}));let ee=et,{column:{prototype:{pointClass:ei}}}=ta().seriesTypes,{column:es}=ta().seriesTypes,{defaultOptions:eo}=d();class en extends es{extendStem(t,e,i){let s=t[0],o=t[1];"number"==typeof s[2]&&(s[2]=Math.max(i+e,s[2])),"number"==typeof o[2]&&(o[2]=Math.min(i-e,o[2]))}getPointPath(t,e){let i=e.strokeWidth(),s=t.series,o=M(t.plotX||0,i),n=Math.round(t.shapeArgs.width/2),r=[["M",o,Math.round(t.yBottom)],["L",o,Math.round(t.plotHigh)]];if(null!==t.close){let e=M(t.plotClose,i);r.push(["M",o,e],["L",o+n,e]),s.extendStem(r,i/2,e)}return r}drawSinglePoint(t){let e=t.series,i=e.chart,s,o=t.graphic;void 0!==t.plotY&&(o||(t.graphic=o=i.renderer.path().add(e.group)),i.styledMode||o.attr(e.pointAttribs(t,t.selected&&"select")),s=e.getPointPath(t,o),o[!o?"attr":"animate"]({d:s}).addClass(t.getClassName(),!0))}drawPoints(){this.points.forEach(this.drawSinglePoint)}init(){super.init.apply(this,arguments),this.options.stacking=void 0}pointAttribs(t,e){let i=super.pointAttribs.call(this,t,e);return delete i.fill,i}toYData(t){return[t.high,t.low,t.close]}translate(){let t=this,e=t.yAxis,i=this.pointArrayMap&&this.pointArrayMap.slice()||[],s=i.map(t=>`plot${t.charAt(0).toUpperCase()+t.slice(1)}`);s.push("yBottom"),i.push("low"),super.translate.apply(t),t.points.forEach(function(o){i.forEach(function(i,n){let r=o[i];null!==r&&(t.dataModify&&(r=t.dataModify.modifyValue(r)),o[s[n]]=e.toPixels(r,!0))}),o.tooltipPos[1]=o.plotHigh+e.pos-t.chart.plotTop})}}en.defaultOptions=z(es.defaultOptions,{lineWidth:1,tooltip:{pointFormat:'<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>{series.chart.options.lang.stockHigh}: {point.high}<br/>{series.chart.options.lang.stockLow}: {point.low}<br/>{series.chart.options.lang.stockClose}: {point.close}<br/>'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0}),O(en.prototype,{pointClass:class extends ei{},animate:null,directTouch:!1,keysAffectYAxis:["low","high"],pointArrayMap:["high","low","close"],pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointValKey:"close"}),O(eo.lang,{stockOpen:"Open",stockHigh:"High",stockLow:"Low",stockClose:"Close"}),ta().registerSeriesType("hlc",en);let{seriesTypes:{hlc:er}}=ta();class ea extends er.prototype.pointClass{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.series.is("heikinashi")||this.resolveUpColor()}getZone(){let t=super.getZone();return this.resolveUpColor(),t}applyOptions(){return super.applyOptions.apply(this,arguments),this.resolveColor&&this.resolveColor(),this}}let{composed:el}=d(),{hlc:eh}=ta().seriesTypes;function ed(t){let e=t.options,i=e.dataGrouping;i&&e.useOhlcData&&"highcharts-navigator-series"!==e.id&&(i.approximation="ohlc")}function ep(t){let e=t.options;e.useOhlcData&&"highcharts-navigator-series"!==e.id&&O(this,{pointValKey:ec.prototype.pointValKey,pointArrayMap:ec.prototype.pointArrayMap,toYData:ec.prototype.toYData})}class ec extends eh{static compose(t){W(el,"OHLCSeries")&&(x(t,"afterSetOptions",ed),x(t,"init",ep))}getPointPath(t,e){let i=super.getPointPath(t,e),s=e.strokeWidth(),o=M(t.plotX||0,s),n=Math.round(t.shapeArgs.width/2);if(null!==t.open){let e=M(t.plotOpen,s);i.push(["M",o,e],["L",o-n,e]),super.extendStem(i,s/2,e)}return i}pointAttribs(t,e){let i=super.pointAttribs.call(this,t,e),s=this.options;return delete i.fill,!t.options.color&&s.upColor&&t.open<t.close&&(i.stroke=s.upColor),i}toYData(t){return[t.open,t.high,t.low,t.close]}}ec.defaultOptions=z(eh.defaultOptions,{tooltip:{pointFormat:'<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>{series.chart.options.lang.stockOpen}: {point.open}<br/>{series.chart.options.lang.stockHigh}: {point.high}<br/>{series.chart.options.lang.stockLow}: {point.low}<br/>{series.chart.options.lang.stockClose}: {point.close}<br/>'}}),O(ec.prototype,{pointClass:ea,pointArrayMap:["open","high","low","close"]}),ta().registerSeriesType("ohlc",ec);let{column:eu,ohlc:eg}=ta().seriesTypes;class ef extends eg{pointAttribs(t,e){let i=eu.prototype.pointAttribs.call(this,t,e),s=this.options,o=t.open<t.close,n=s.lineColor||this.color,r=t.color||this.color;if(i["stroke-width"]=s.lineWidth,i.fill=t.options.color||o&&s.upColor||r,i.stroke=t.options.lineColor||o&&s.upLineColor||n,e){let t=s.states[e];i.fill=t.color||i.fill,i.stroke=t.lineColor||i.stroke,i["stroke-width"]=t.lineWidth||i["stroke-width"]}return i}drawPoints(){let t=this.points,e=this.chart,i=this.yAxis.reversed;for(let s of t){let t=s.graphic,o,n,r,a,l,h,d,p,c,u=!t;if(void 0!==s.plotY){t||(s.graphic=t=e.renderer.path().add(this.group)),this.chart.styledMode||t.attr(this.pointAttribs(s,s.selected&&"select")).shadow(this.options.shadow);let g=t.strokeWidth();d=M(s.plotX||0,g),r=Math.min(o=s.plotOpen,n=s.plotClose),a=Math.max(o,n),c=Math.round(s.shapeArgs.width/2),l=i?a!==s.yBottom:Math.round(r)!==Math.round(s.plotHigh||0),h=i?Math.round(r)!==Math.round(s.plotHigh||0):a!==s.yBottom,r=M(r,g),a=M(a,g),(p=[]).push(["M",d-c,a],["L",d-c,r],["L",d+c,r],["L",d+c,a],["Z"],["M",d,r],["L",d,l?Math.round(i?s.yBottom:s.plotHigh):r],["M",d,a],["L",d,h?Math.round(i?s.plotHigh:s.yBottom):a]),t[u?"attr":"animate"]({d:p}).addClass(s.getClassName(),!0)}}}}ef.defaultOptions=z(eg.defaultOptions,{tooltip:eg.defaultOptions.tooltip},{states:{hover:{lineWidth:2}},threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0}),ta().registerSeriesType("candlestick",ef);let{column:{prototype:{pointClass:em}}}=ta().seriesTypes,ex=class extends em{constructor(){super(...arguments),this.ttBelow=!1}isValid(){return B(this.y)||void 0===this.y}hasNewShapeType(){let t=this.options.shape||this.series.options.shape;return this.graphic&&t&&t!==this.graphic.symbolKey}};!function(t){let e=[];function i(t,e,i,s,o){let n=o&&o.anchorX||t,r=o&&o.anchorY||e,a=this.circle(n-1,r-1,2,2);return a.push(["M",n,r],["L",t,e+s],["L",t,e],["L",t+i,e],["L",t+i,e+s],["L",t,e+s],["Z"]),a}function s(t,e){t[e+"pin"]=function(i,s,o,n,r){let a,l=r&&r.anchorX,h=r&&r.anchorY;if("circle"===e&&n>o&&(i-=Math.round((n-o)/2),o=n),a=t[e](i,s,o,n,r),l&&h){let r=l;if("circle"===e)r=i+o/2;else{let t=a[0],e=a[1];"M"===t[0]&&"L"===e[0]&&(r=(t[1]+e[1])/2)}let d=s>h?s:s+n;a.push(["M",r,d],["L",l,h]),a=a.concat(t.circle(l-1,h-1,2,2))}return a}}t.compose=function(t){if(-1===e.indexOf(t)){e.push(t);let o=t.prototype.symbols;o.flag=i,s(o,"circle"),s(o,"square")}let o=tu().getRendererType();e.indexOf(o)&&e.push(o)}}(r||(r={}));let eb=r,ev=i.default.Series.types.column;var ey=l.n(ev);let{composed:eM}=d(),{prototype:eA}=ey(),{prototype:ew}=g();var ek=a||(a={});function eS(t){return ew.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this,t)}function eO(){eA.translate.apply(this);let t=this,e=t.options,i=t.chart,s=t.points,o=e.onSeries,n=o&&i.get(o),r=n&&n.options.step,a=n&&n.points,l=i.inverted,h=t.xAxis,d=t.yAxis,p=s.length-1,c,u,g=e.onKey||"y",f=a&&a.length,m=0,x,b,v,y,M;if(n&&n.visible&&f){for(m=(n.pointXOffset||0)+(n.barW||0)/2,y=n.currentDataGrouping,b=a[f-1].x+(y?y.totalRange:0),!function(t,e){let i,s,o=t.length;for(s=0;s<o;s++)t[s].safeI=s;for(t.sort(function(t,s){return 0===(i=e(t,s))?t.safeI-s.safeI:i}),s=0;s<o;s++)delete t[s].safeI}(s,(t,e)=>t.x-e.x),g="plot"+g[0].toUpperCase()+g.substr(1);f--&&s[p];)if(x=a[f],(c=s[p]).y=x.y,x.x<=c.x&&void 0!==x[g]){if(c.x<=b&&(c.plotY=x[g],x.x<c.x&&!r&&(v=a[f+1]))&&void 0!==v[g])if(w(c.plotX)&&n.is("spline")){let t=[x.plotX||0,x.plotY||0],e=[v.plotX||0,v.plotY||0],i=x.controlPoints?.high||t,s=v.controlPoints?.low||e,o=(o,n)=>Math.pow(1-o,3)*t[n]+3*(1-o)*(1-o)*o*i[n]+3*(1-o)*o*o*s[n]+o*o*o*e[n],n=0,r=1,a;for(let t=0;t<100;t++){let t=(n+r)/2,e=o(t,0);if(null===e)break;if(.25>Math.abs(e-c.plotX)){a=t;break}e<c.plotX?n=t:r=t}w(a)&&(c.plotY=o(a,1),c.y=d.toValue(c.plotY,!0))}else M=(c.x-x.x)/(v.x-x.x),c.plotY+=M*(v[g]-x[g]),c.y+=M*(v.y-x.y);if(p--,f++,p<0)break}}s.forEach((e,i)=>{let o;e.plotX+=m,(void 0===e.plotY||l)&&(e.plotX>=0&&e.plotX<=h.len?l?(e.plotY=h.translate(e.x,0,1,0,1),e.plotX=w(e.y)?d.translate(e.y,0,0,0,1):0):e.plotY=(h.opposite?0:t.yAxis.len)+h.offset:e.shapeArgs={}),(u=s[i-1])&&u.plotX===e.plotX&&(void 0===u.stackIndex&&(u.stackIndex=0),o=u.stackIndex+1),e.stackIndex=o}),this.onSeries=n}ek.compose=function(t){if(W(eM,"OnSeries")){let e=t.prototype;e.getPlotBox=eS,e.translate=eO}return t},ek.getPlotBox=eS,ek.translate=eO;let eE=a,{noop:eC}=d(),{distribute:eT}=d(),{series:eB,seriesTypes:{column:eD}}=ta();class eP extends eD{animate(t){t&&this.setClip()}drawPoints(){var t,e;let i,s,o,n,r,a,l,h,d,p,c,u,g=this.points,f=this.chart,m=f.renderer,x=f.inverted,b=this.options,v=b.y,y=this.yAxis,M={},A=[],k=B(b.borderRadius)?b.borderRadius:0;for(n=g.length;n--;)r=g[n],p=(x?r.plotY:r.plotX)>this.xAxis.len,i=r.plotX,l=r.stackIndex,o=r.options.shape||b.shape,void 0!==(s=r.plotY)&&(s=r.plotY+v-(void 0!==l&&l*b.stackDistance)),r.anchorX=l?void 0:r.plotX,h=l?void 0:r.plotY,c="flag"!==o,a=r.graphic,void 0!==s&&i>=0&&!p?(a&&r.hasNewShapeType()&&(a=a.destroy()),a||(a=r.graphic=m.label("",0,void 0,o,void 0,void 0,b.useHTML).addClass(r.getClassName()).add(this.markerGroup),r.graphic.div&&(r.graphic.div.point=r),a.isNew=!0),a.attr({align:c?"center":"left",width:b.width,height:b.height,"text-align":b.textAlign,r:k}),f.styledMode||a.attr(this.pointAttribs(r)).css(z(b.style,r.style)).shadow(b.shadow),i>0&&(i-=a.strokeWidth()%2),d={y:s,anchorY:h},b.allowOverlapX&&(d.x=i,d.anchorX=r.anchorX),a.attr({text:r.options.title??b.title??"A"})[a.isNew?"attr":"animate"](d),b.allowOverlapX||(M[r.plotX]?M[r.plotX].size=Math.max(M[r.plotX].size,a.width||0):M[r.plotX]={align:.5*!!c,size:a.width||0,target:i,anchorX:i}),r.tooltipPos=[i,s+y.pos-f.plotTop]):a&&(r.graphic=a.destroy());if(!b.allowOverlapX){let t=100;for(let e of(I(M,function(e){e.plotX=e.anchorX,A.push(e),t=Math.max(e.size,t)}),eT(A,x?y.len:this.xAxis.len,t),g)){let t=e.plotX,i=e.graphic,s=i&&M[t];s&&i&&(w(s.pos)?i[i.isNew?"attr":"animate"]({x:s.pos+(s.align||0)*s.size,anchorX:e.anchorX}).show().isNew=!1:i.hide().isNew=!0)}}b.useHTML&&this.markerGroup&&(t=this.markerGroup,e=function(t){return tq().prototype.on.apply(t.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))},u=t.on,t.on=function(){let t=arguments,i=this;return e.apply(this,[function(){return u.apply(i,arguments.length?arguments:t)}].concat([].slice.call(arguments)))})}drawTracker(){let t=this.points;for(let e of(super.drawTracker(),t)){let i=e.graphic;i&&(e.unbindMouseOver&&e.unbindMouseOver(),e.unbindMouseOver=x(i.element,"mouseover",function(){for(let s of(e.stackIndex>0&&!e.raised&&(e._y=i.y,i.attr({y:e._y-8}),e.raised=!0),t))s!==e&&s.raised&&s.graphic&&(s.graphic.attr({y:s._y}),s.raised=!1)}))}}pointAttribs(t,e){let i=this.options,s=t&&t.color||this.color,o=i.lineColor,n=t&&t.lineWidth,r=t&&t.fillColor||i.fillColor;return e&&(r=i.states[e].fillColor,o=i.states[e].lineColor,n=i.states[e].lineWidth),{fill:r||s,stroke:o||s,"stroke-width":n||i.lineWidth||0}}setClip(){eB.prototype.setClip.apply(this,arguments),!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup&&this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey])}}eP.compose=eb.compose,eP.defaultOptions=z(eD.defaultOptions,{borderRadius:0,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:{color:"#000000",fontSize:"0.7em",fontWeight:"bold"}}),eE.compose(eP),O(eP.prototype,{allowDG:!1,forceCrop:!0,invertible:!1,noSharedTooltip:!0,pointClass:ex,sorted:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],buildKDTree:eC,init:eB.prototype.init}),ta().registerSeriesType("flags",eP);let eR=d();eR.Navigator=eR.Navigator||tB,eR.OrdinalAxis=eR.OrdinalAxis||tz,eR.RangeSelector=eR.RangeSelector||t2,eR.Scrollbar=eR.Scrollbar||tO,eR.stockChart=eR.stockChart||ee.stockChart,eR.StockChart=eR.StockChart||eR.stockChart,O(eR.StockChart,ee),U.compose(eR.Series,eR.Axis,eR.Point),eP.compose(eR.Renderer),ec.compose(eR.Series),eR.Navigator.compose(eR.Chart,eR.Axis,eR.Series),eR.OrdinalAxis.compose(eR.Axis,eR.Series,eR.Chart),eR.RangeSelector.compose(eR.Axis,eR.Chart),eR.Scrollbar.compose(eR.Axis),eR.StockChart.compose(eR.Chart,eR.Axis,eR.Series,eR.SVGRenderer);let ez=d();export{ez as default};