!/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/navigator
 * @requires highcharts
 *
 * Standalone navigator module
 *
 * (c) 2009-2026 Highsoft AS
 * Author: Mateusz Bernacik
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i(t._Highcharts,t._Highcharts.Chart,t._Highcharts.Axis,t._Highcharts.SeriesRegistry,t._Highcharts.SVGRenderer):"function"==typeof define&&define.amd?define("highcharts/modules/navigator",["highcharts/highcharts"],function(t){return i(t,t.Chart,t.Axis,t.SeriesRegistry,t.SVGRenderer)}):"object"==typeof exports?exports["highcharts/modules/navigator"]=i(t._Highcharts,t._Highcharts.Chart,t._Highcharts.Axis,t._Highcharts.SeriesRegistry,t._Highcharts.SVGRenderer):t.Highcharts=i(t.Highcharts,t.Highcharts.Chart,t.Highcharts.Axis,t.Highcharts.SeriesRegistry,t.Highcharts.SVGRenderer)}("u"<typeof window?this:window,function(t,i,e,s,r){return function(){"use strict";var a,o,n={512:function(t){t.exports=s},532:function(t){t.exports=e},540:function(t){t.exports=r},944:function(i){i.exports=t},960:function(t){t.exports=i}},h={};function d(t){var i=h[t];if(void 0!==i)return i.exports;var e=h[t]={exports:{}};return n[t](e,e.exports,d),e.exports}d.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return d.d(i,{a:i}),i},d.d=function(t,i){for(var e in i)d.o(i,e)&&!d.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},d.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)};var l={};d.d(l,{default:function(){return ts}});var c=d(944),u=d.n(c),p=d(960),g=d.n(p),v=d(532),f=d.n(v),x=u().isTouchDevice,m=[];function b(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function y(){var t,i,e,s,r=this.legend,a=this.navigator;if(a){i=r&&r.options,e=a.xAxis,s=a.yAxis;var o=a.scrollbarHeight,n=a.scrollButtonSize;this.inverted?(a.left=a.opposite?this.chartWidth-o-a.height:this.spacing[3]+o,a.top=this.plotTop+n):(a.left=(0,c.pick)(e.left,this.plotLeft+n),a.top=a.navigatorOptions.top||this.chartHeight-a.height-o-((null==(t=this.scrollbar)?void 0:t.options.margin)||0)-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(i&&"bottom"===i.verticalAlign&&"proximate"!==i.layout&&i.enabled&&!i.floating?r.legendHeight+(0,c.pick)(i.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),e&&s&&(this.inverted?e.options.left=s.options.left=a.left:e.options.top=s.options.top=a.top,e.setAxisSize(),s.setAxisSize())}}function M(t){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new a(this),(0,c.pick)(t.redraw,!0)&&this.redraw(t.animation))}function E(){var t=this.options;(t.navigator.enabled||t.scrollbar.enabled)&&(this.scroller=this.navigator=new a(this))}function A(){var t=this.options,i=t.navigator,e=t.rangeSelector;if((i&&i.enabled||e&&e.enabled)&&(!x&&"x"===this.zooming.type||x&&"x"===this.zooming.pinchType))return!1}function k(t){var i=t.navigator;if(i&&t.xAxis[0]){var e=t.xAxis[0].getExtremes();i.render(e.min,e.max)}}function w(t){var i=t.options.navigator||{},e=t.options.scrollbar||{};!this.navigator&&!this.scroller&&(i.enabled||e.enabled)&&((0,c.merge)(!0,this.options.navigator,i),(0,c.merge)(!0,this.options.scrollbar,e),delete t.options.navigator,delete t.options.scrollbar)}var O=function(t,i){if((0,c.pushUnique)(m,t)){var e=t.prototype;a=i,e.callbacks.push(k),(0,c.addEvent)(t,"afterAddSeries",b),(0,c.addEvent)(t,"afterSetChartSize",y),(0,c.addEvent)(t,"afterUpdate",M),(0,c.addEvent)(t,"beforeRender",E),(0,c.addEvent)(t,"beforeShowResetZoom",A),(0,c.addEvent)(t,"update",w)}},S=u().isTouchDevice;function z(){this.navigatorAxis||(this.navigatorAxis=new D(this))}function T(t){var i,e=this.chart,s=e.options,r=s.navigator,a=this.navigatorAxis,o=e.zooming.pinchType,n=s.rangeSelector,h=e.zooming.type;if(this.isXAxis&&((null==r?void 0:r.enabled)||(null==n?void 0:n.enabled))){if("y"===h&&"zoom"===t.trigger)i=!1;else if(("zoom"===t.trigger&&"xy"===h||S&&"xy"===o)&&this.options.range){var d=a.previousZoom;(0,c.defined)(t.min)?a.previousZoom=[this.min,this.max]:d&&(t.min=d[0],t.max=d[1],a.previousZoom=void 0)}}void 0!==i&&t.preventDefault()}var D=function(){function t(t){this.axis=t}return t.compose=function(t){t.keepProps.includes("navigatorAxis")||(t.keepProps.push("navigatorAxis"),(0,c.addEvent)(t,"init",z),(0,c.addEvent)(t,"setExtremes",T))},t.prototype.destroy=function(){this.axis=void 0},t.prototype.toFixedRange=function(t,i,e,s){var r=this.axis,a=(r.pointRange||0)/2,o=(0,c.pick)(e,r.translate(t,!0,!r.horiz)),n=(0,c.pick)(s,r.translate(i,!0,!r.horiz));return(0,c.defined)(e)||(o=(0,c.correctFloat)(o+a)),(0,c.defined)(s)||(n=(0,c.correctFloat)(n-a)),(0,c.isNumber)(o)&&(0,c.isNumber)(n)||(o=n=void 0),{min:o,max:n}},t}(),R=d(512),B={height:40,margin:22,maskInside:!0,handles:{width:7,borderRadius:0,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"var(--highcharts-neutral-color-5)",borderColor:"var(--highcharts-neutral-color-40)"},maskFill:"color-mix(var(--highcharts-highlight-color-60) 30%, transparent)",outlineColor:"var(--highcharts-neutral-color-40)",outlineWidth:1,series:{type:void 0===d.n(R)().seriesTypes.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:"var(--highcharts-neutral-color-10)",id:"navigator-x-axis",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"var(--highcharts-neutral-color-100)",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}},P=function(t,i,e){if(e||2==arguments.length)for(var s,r=0,a=i.length;r<a;r++)!s&&r in i||(s||(s=Array.prototype.slice.call(i,0,r)),s[r]=i[r]);return t.concat(s||Array.prototype.slice.call(i))},C={"navigator-handle":function(t,i,e,s,r){void 0===r&&(r={});var a,o,n,h,d,l=r.width?r.width/2:e,u=(0,c.relativeLength)(r.borderRadius||0,Math.min(2*l,s));return P([["M",-1.5,(s=r.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=-l-1,o=.5,n=2*l+1,h=s,(d={r:u},d.r)?function(t,i,e,s,r){var a=(null==r?void 0:r.r)||0;return[["M",t+a,i],["L",t+e-a,i],["A",a,a,0,0,1,t+e,i+a],["L",t+e,i+s-a],["A",a,a,0,0,1,t+e-a,i+s],["L",t+a,i+s],["A",a,a,0,0,1,t,i+s-a],["L",t,i+a],["A",a,a,0,0,1,t+a,i],["Z"]]}(a,.5,n,h,d):[["M",a,.5],["L",a+n,.5],["L",a+n,.5+h],["L",a,.5+h],["Z"]]),!0)}},H=d(540),L=d.n(H),W=u().defaultOptions,N=u().composed,U={setFixedRange:function(t){var i=this.xAxis[0];(0,c.defined)(i.dataMax)&&(0,c.defined)(i.dataMin)&&t?this.fixedRange=Math.min(t,i.dataMax-i.dataMin):this.fixedRange=t}}.setFixedRange;function I(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}var F=function(t,i,e){D.compose(i),(0,c.pushUnique)(N,"Navigator")&&(t.prototype.setFixedRange=U,(0,c.extend)(L().prototype.symbols,C),(0,c.extend)(W,{navigator:B}),(0,c.addEvent)(e,"afterUpdate",I))},X=u().composed;!function(t){var i;function e(t){var i,e,s,r,a,o,n,h,d=(0,c.pick)(null==(i=t.options)?void 0:i.min,t.min),l=(0,c.pick)(null==(e=t.options)?void 0:e.max,t.max);return{axisMin:d,axisMax:l,scrollMin:(0,c.defined)(t.dataMin)?Math.min(d,null!=(s=t.min)?s:1/0,t.dataMin,null!=(r=t.threshold)?r:1/0):d,scrollMax:null!=(o=null==(a=t.treeGrid)?void 0:a.adjustedMax)?o:(0,c.defined)(t.dataMax)?Math.max(l,null!=(n=t.max)?n:-1/0,t.dataMax,null!=(h=t.threshold)?h:-1/0):l}}function s(){var t=this.scrollbar,i=t&&!t.options.opposite,e=this.horiz?2:i?3:1;t&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[e]+=t.size+(t.options.margin||0))}function r(){var t,s,r=this;(null==(s=null==(t=r.options)?void 0:t.scrollbar)?void 0:s.enabled)&&(r.options.scrollbar.vertical=!r.horiz,r.options.startOnTick=r.options.endOnTick=!1,r.scrollbar=new i(r.chart.renderer,r.options.scrollbar,r.chart),(0,c.addEvent)(r.scrollbar,"changed",function(t){var i,s,a=e(r),o=a.axisMin,n=a.axisMax,h=a.scrollMin,d=a.scrollMax,l=r.toPixels(h),u=r.toPixels(d)-l;if((0,c.defined)(o)&&(0,c.defined)(n))if(r.horiz&&!r.reversed||!r.horiz&&r.reversed?(i=Math.min(d,r.toValue(l+u*this.to)),s=Math.max(h,r.toValue(l+u*this.from))):(i=Math.min(d,r.toValue(l+u*(1-this.from))),s=Math.max(h,r.toValue(l+u*(1-this.to)))),this.shouldUpdateExtremes(t.DOMType)){var p="mousemove"!==t.DOMType&&"touchmove"!==t.DOMType&&void 0;r.setExtremes((0,c.correctFloat)(s),(0,c.correctFloat)(i),!0,p,t)}else this.setRange(this.from,this.to)}))}function a(){var t,i,s,r=e(this),a=r.scrollMin,o=r.scrollMax,n=this.scrollbar,h=(this.axisTitleMargin||0)+(this.titleOffset||0),d=this.chart.scrollbarsOffsets,l=this.options.margin||0;if(n&&d){if(this.horiz)this.opposite||(d[1]+=h),n.position(this.left,this.top+this.height+2+d[1]-(this.opposite?l:0),this.width,this.height),this.opposite||(d[1]+=l),t=1;else{this.opposite&&(d[0]+=h);var u=void 0;u=n.options.opposite?this.left+this.width+2+d[0]-(this.opposite?0:l):this.opposite?0:l,n.position(u,this.top,this.width,this.height),this.opposite&&(d[0]+=l),t=0}if(d[t]+=n.size+(n.options.margin||0),isNaN(a)||isNaN(o)||!(0,c.defined)(this.min)||!(0,c.defined)(this.max)||(0,c.defined)(this.dataMin)&&this.dataMin===this.dataMax)n.setRange(0,1);else if(this.min===this.max){var p=this.pointRange/(this.dataMax+1);i=p*this.min,s=p*(this.max+1),n.setRange(i,s)}else i=(this.toPixels(this.min)-this.toPixels(a))/(this.toPixels(o)-this.toPixels(a)),s=(this.toPixels(this.max)-this.toPixels(a))/(this.toPixels(o)-this.toPixels(a)),this.horiz&&!this.reversed||!this.horiz&&this.reversed?n.setRange(i,s):n.setRange(1-s,1-i)}}t.compose=function(t,e){(0,c.pushUnique)(X,"Axis.Scrollbar")&&(i=e,(0,c.addEvent)(t,"afterGetOffset",s),(0,c.addEvent)(t,"afterInit",r),(0,c.addEvent)(t,"afterRender",a))}}(o||(o={}));var G=o,Y={height:10,barBorderRadius:5,buttonBorderRadius:0,buttonsEnabled:!1,liveRedraw:void 0,margin:void 0,minWidth:6,opposite:!0,step:.2,zIndex:3,barBackgroundColor:"var(--highcharts-neutral-color-20)",barBorderWidth:0,barBorderColor:"var(--highcharts-neutral-color-20)",buttonArrowColor:"var(--highcharts-neutral-color-80)",buttonBackgroundColor:"var(--highcharts-neutral-color-10)",buttonBorderColor:"var(--highcharts-neutral-color-20)",buttonBorderWidth:1,rifleColor:"none",trackBackgroundColor:"rgba(255, 255, 255, 0.001)",trackBorderColor:"var(--highcharts-neutral-color-20)",trackBorderRadius:5,trackBorderWidth:1},_=u().defaultOptions,V=u().composed,j=function(){function t(t,i,e){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,i,e)}return t.compose=function(i){G.compose(i,t),(0,c.pushUnique)(V,"Scrollbar")&&(0,c.extend)(_,{scrollbar:Y})},t.swapXY=function(t,i){return i&&t.forEach(function(t){for(var i,e=t.length,s=0;s<e;s+=2)"number"==typeof(i=t[s+1])&&(t[s+1]=t[s+2],t[s+2]=i)}),t},t.prototype.addEvents=function(){var t=this.options.inverted?[1,0]:[0,1],i=this.scrollbarButtons,e=this.scrollbarGroup.element,s=this.track.element,r=this.mouseDownHandler.bind(this),a=this.mouseMoveHandler.bind(this),o=this.mouseUpHandler.bind(this),n=[[i[t[0]].element,"click",this.buttonToMinClick.bind(this)],[i[t[1]].element,"click",this.buttonToMaxClick.bind(this)],[s,"click",this.trackClick.bind(this)],[e,"mousedown",r],[e.ownerDocument,"mousemove",a],[e.ownerDocument,"mouseup",o],[e,"touchstart",r],[e.ownerDocument,"touchmove",a],[e.ownerDocument,"touchend",o]];n.forEach(function(t){c.addEvent.apply(null,t)}),this._events=n},t.prototype.buttonToMaxClick=function(t){var i=(this.to-this.from)*(0,c.pick)(this.options.step,.2);this.updatePosition(this.from+i,this.to+i),(0,c.fireEvent)(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})},t.prototype.buttonToMinClick=function(t){var i=(0,c.correctFloat)(this.to-this.from)*(0,c.pick)(this.options.step,.2);this.updatePosition((0,c.correctFloat)(this.from-i),(0,c.correctFloat)(this.to-i)),(0,c.fireEvent)(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})},t.prototype.cursorToScrollbarPosition=function(t){var i=this.options,e=i.minWidth>this.calculatedWidth?i.minWidth:0;return{chartX:(t.chartX-this.x-this.xOffset)/(this.barWidth-e),chartY:(t.chartY-this.y-this.yOffset)/(this.barWidth-e)}},t.prototype.destroy=function(){var t=this,i=t.chart.scroller;t.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(i){t[i]&&t[i].destroy&&(t[i]=t[i].destroy())}),i&&t===i.scrollbar&&(i.scrollbar=null,(0,c.destroyObjectProperties)(i.scrollbarButtons))},t.prototype.drawScrollbarButton=function(i){var e=this.renderer,s=this.scrollbarButtons,r=this.options,a=this.size,o=e.g().add(this.group);if(s.push(o),r.buttonsEnabled){var n=e.rect().addClass("highcharts-scrollbar-button").add(o);this.chart.styledMode||n.attr({stroke:r.buttonBorderColor,"stroke-width":r.buttonBorderWidth,fill:r.buttonBackgroundColor}),n.attr(n.crisp({x:-.5,y:-.5,width:a,height:a,r:r.buttonBorderRadius},n.strokeWidth()));var h=e.path(t.swapXY([["M",a/2+(i?-1:1),a/2-3],["L",a/2+(i?-1:1),a/2+3],["L",a/2+(i?2:-2),a/2]],r.vertical)).addClass("highcharts-scrollbar-arrow").add(s[i]);this.chart.styledMode||h.attr({fill:r.buttonArrowColor})}},t.prototype.init=function(t,i,e){this.scrollbarButtons=[],this.renderer=t,this.userOptions=i,this.options=(0,c.merge)(Y,_.scrollbar,i),this.options.margin=(0,c.pick)(this.options.margin,10),this.chart=e,this.size=(0,c.pick)(this.options.size,this.options.height),i.enabled&&(this.render(),this.addEvents())},t.prototype.mouseDownHandler=function(t){var i,e=(null==(i=this.chart.pointer)?void 0:i.normalize(t))||t,s=this.cursorToScrollbarPosition(e);this.chartX=s.chartX,this.chartY=s.chartY,this.initPositions=[this.from,this.to],this.grabbedCenter=!0},t.prototype.mouseMoveHandler=function(t){var i,e,s=(null==(i=this.chart.pointer)?void 0:i.normalize(t))||t,r=this.options.vertical?"chartY":"chartX",a=this.initPositions||[];this.grabbedCenter&&(!t.touches||0!==t.touches[0][r])&&(e=this.cursorToScrollbarPosition(s)[r]-this[r],this.hasDragged=!0,this.updatePosition(a[0]+e,a[1]+e),this.hasDragged&&(0,c.fireEvent)(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}))},t.prototype.mouseUpHandler=function(t){this.hasDragged&&(0,c.fireEvent)(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}),this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null},t.prototype.position=function(t,i,e,s){var r=this.options,a=r.buttonsEnabled,o=r.margin,n=void 0===o?0:o,h=r.vertical,d=this.rendered?"animate":"attr",l=s,c=0;this.group.show(),this.x=t,this.y=i+this.trackBorderWidth,this.width=e,this.height=s,this.xOffset=l,this.yOffset=c,h?(this.width=this.yOffset=e=c=this.size,this.xOffset=l=0,this.yOffset=c=a?this.size:0,this.barWidth=s-(a?2*e:0),this.x=t+=n):(this.height=s=this.size,this.xOffset=l=a?this.size:0,this.barWidth=e-(a?2*s:0),this.y=this.y+n),this.group[d]({translateX:t,translateY:this.y}),this.track[d]({width:e,height:s}),this.scrollbarButtons[1][d]({translateX:h?0:e-l,translateY:h?s-c:0})},t.prototype.removeEvents=function(){this._events.forEach(function(t){c.removeEvent.apply(null,t)}),this._events.length=0},t.prototype.render=function(){var i=this.renderer,e=this.options,s=this.size,r=this.chart.styledMode,a=i.g("scrollbar").attr({zIndex:e.zIndex}).hide().add();this.group=a,this.track=i.rect().addClass("highcharts-scrollbar-track").attr({r:e.trackBorderRadius||0,height:s,width:s}).add(a),r||this.track.attr({fill:e.trackBackgroundColor,stroke:e.trackBorderColor,"stroke-width":e.trackBorderWidth});var o=this.trackBorderWidth=this.track.strokeWidth();this.track.attr({x:-(0,c.crisp)(0,o),y:-(0,c.crisp)(0,o)}),this.scrollbarGroup=i.g().add(a),this.scrollbar=i.rect().addClass("highcharts-scrollbar-thumb").attr({height:s-o,width:s-o,r:e.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=i.path(t.swapXY([["M",-3,s/4],["L",-3,2*s/3],["M",0,s/4],["L",0,2*s/3],["M",3,s/4],["L",3,2*s/3]],e.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),r||(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(-(0,c.crisp)(0,this.scrollbarStrokeWidth),-(0,c.crisp)(0,this.scrollbarStrokeWidth)),this.drawScrollbarButton(0),this.drawScrollbarButton(1)},t.prototype.setRange=function(t,i){var e,s,r=this.options,a=r.vertical,o=r.minWidth,n=this.barWidth,h=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if((0,c.defined)(n)){var d=n*Math.min(i,1);e=Math.ceil(n*(t=Math.max(t,0))),this.calculatedWidth=s=(0,c.correctFloat)(d-e),s<o&&(e=(n-o+s)*t,s=o);var l=Math.floor(e+this.xOffset+this.yOffset),u=s/2-.5;this.from=t,this.to=i,a?(this.scrollbarGroup[h]({translateY:l}),this.scrollbar[h]({height:s}),this.scrollbarRifles[h]({translateY:u}),this.scrollbarTop=l,this.scrollbarLeft=0):(this.scrollbarGroup[h]({translateX:l}),this.scrollbar[h]({width:s}),this.scrollbarRifles[h]({translateX:u}),this.scrollbarLeft=l,this.scrollbarTop=0),s<=12?this.scrollbarRifles.hide():this.scrollbarRifles.show(),!1===r.showFull&&(t<=0&&i>=1?this.group.hide():this.group.show()),this.rendered=!0}},t.prototype.shouldUpdateExtremes=function(t){return(0,c.pick)(this.options.liveRedraw,u().svg&&!u().isTouchDevice&&!this.chart.boosted)||"mouseup"===t||"touchend"===t||!(0,c.defined)(t)},t.prototype.trackClick=function(t){var i,e=(null==(i=this.chart.pointer)?void 0:i.normalize(t))||t,s=this.to-this.from,r=this.y+this.scrollbarTop,a=this.x+this.scrollbarLeft;this.options.vertical&&e.chartY>r||!this.options.vertical&&e.chartX>a?this.updatePosition(this.from+s,this.to+s):this.updatePosition(this.from-s,this.to-s),(0,c.fireEvent)(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})},t.prototype.update=function(t){this.destroy(),this.init(this.chart.renderer,(0,c.merge)(!0,this.options,t),this.chart)},t.prototype.updatePosition=function(t,i){i>1&&(t=(0,c.correctFloat)(1-(0,c.correctFloat)(i-t)),i=1),t<0&&(i=(0,c.correctFloat)(i-t),t=0),this.from=t,this.to=i},t.defaultOptions=Y,t}(),Z=function(){return(Z=Object.assign||function(t){for(var i,e=1,s=arguments.length;e<s;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)},q=function(t,i,e){if(e||2==arguments.length)for(var s,r=0,a=i.length;r<a;r++)!s&&r in i||(s||(s=Array.prototype.slice.call(i,0,r)),s[r]=i[r]);return t.concat(s||Array.prototype.slice.call(i))},J=u().defaultOptions,K=u().isTouchDevice;function Q(t){for(var i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];var s=[].filter.call(i,c.isNumber);if(s.length)return Math[t].apply(0,s)}var $=function(){function t(t){this.isDirty=!1,this.scrollbarHeight=0,this.init(t)}return t.compose=function(i,e,s){O(i,t),F(i,e,s)},t.prototype.drawHandle=function(t,i,e,s){var r=this.navigatorOptions.handles.height;this.handles[i][s](e?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(t,10)+.5-r)}:{translateX:Math.round(this.left+parseInt(t,10)),translateY:Math.round(this.top+this.height/2-r/2-1)})},t.prototype.drawOutline=function(t,i,e,s){var r,a,o=this.navigatorOptions.maskInside,n=this.outline.strokeWidth(),h=n/2,d=n%2/2,l=this.scrollButtonSize,c=this.size,u=this.top,p=this.height,g=u-h,v=u+p,f=this.left;e?(r=u+i+d,i=u+t+d,a=[["M",f+p,u-l-d],["L",f+p,r],["L",f,r],["M",f,i],["L",f+p,i],["L",f+p,u+c+l]],o&&a.push(["M",f+p,r-h],["L",f+p,i+h])):(f-=l,t+=f+l-d,i+=f+l-d,a=[["M",f,g],["L",t,g],["L",t,v],["M",i,v],["L",i,g],["L",f+c+2*l,g]],o&&a.push(["M",t-h,g],["L",i+h,g])),this.outline[s]({d:a})},t.prototype.drawMasks=function(t,i,e,s){var r,a,o,n,h=this.left,d=this.top,l=this.height;e?(o=[h,h,h],n=[d,d+t,d+i],a=[l,l,l],r=[t,i-t,this.size-i]):(o=[h,h+t,h+i],n=[d,d,d],a=[t,i-t,this.size-i],r=[l,l,l]),this.shades.forEach(function(t,i){t[s]({x:o[i],y:n[i],width:a[i],height:r[i]})})},t.prototype.renderElements=function(){var t,i,e,s=this,r=s.navigatorOptions,a=r.maskInside,o=s.chart,n=o.inverted,h=o.renderer,d={cursor:n?"ns-resize":"ew-resize"},l=null!=(t=s.navigatorGroup)?t:s.navigatorGroup=h.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();if([!a,a,!a].forEach(function(t,i){var e,a=null!=(e=s.shades[i])?e:s.shades[i]=h.rect().addClass("highcharts-navigator-mask"+(1===i?"-inside":"-outside")).add(l);o.styledMode||(a.attr({fill:t?r.maskFill:"rgba(0,0,0,0)"}),1===i&&a.css(d))}),s.outline||(s.outline=h.path().addClass("highcharts-navigator-outline").add(l)),o.styledMode||s.outline.attr({"stroke-width":r.outlineWidth,stroke:r.outlineColor}),null==(i=r.handles)?void 0:i.enabled){var c=!1,u=r.handles,p=u.height,g=u.width;[0,1].forEach(function(t){var i,e,r=u.symbols[t];(c=c||(null==(i=s.handles[t])?void 0:i.symbolName)!==r)&&(null==(e=s.handles[t])||e.destroy(),s.handles[t]=h.symbol(r,-g/2-1,0,g,p,u),s.handles[t].attr({zIndex:7-t}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][t]).add(l)),o.inverted&&s.handles[t].attr({rotation:90,rotationOriginX:Math.floor(-g/2),rotationOriginY:(p+g)/2}),o.styledMode||s.handles[t].attr({fill:u.backgroundColor,stroke:u.borderColor,"stroke-width":u.lineWidth,width:u.width,height:u.height,x:-g/2-1,y:0}).css(d)}),c&&(null==(e=s.partsEventsToUnbind)||e.forEach(function(t){t()}),s.partsEventsToUnbind=q(q([],s.getPartsEvents("mousedown"),!0),s.getPartsEvents("touchstart"),!0))}},t.prototype.update=function(t,i){var e,s,r,a,o=this;void 0===i&&(i=!1);var n=this.chart,h=n.options.chart.inverted!==(null==(r=n.scrollbar)?void 0:r.options.vertical);if((0,c.merge)(!0,n.options.navigator,t),this.navigatorOptions=n.options.navigator||{},this.setOpposite(),(0,c.defined)(t.enabled)||h)return this.destroy(),this.navigatorEnabled=t.enabled||this.navigatorEnabled,this.init(n);if(this.navigatorEnabled&&(this.isDirty=!0,!1===t.adaptToUpdatedData&&this.baseSeries.forEach(function(t){(0,c.removeEvent)(t,"updatedData",o.updatedDataHandler)},this),t.adaptToUpdatedData&&this.baseSeries.forEach(function(t){t.eventsToUnbind.push((0,c.addEvent)(t,"updatedData",o.updatedDataHandler))},this),(t.series||t.baseSeries)&&this.setBaseSeries(void 0,!1),t.height||t.xAxis||t.yAxis)){this.height=null!=(a=t.height)?a:this.height;var d=this.getXAxisOffsets();this.xAxis.update(Z(Z({},t.xAxis),((e={offsets:d})[n.inverted?"width":"height"]=this.height,e[n.inverted?"height":"width"]=void 0,e)),!1),this.yAxis.update(Z(Z({},t.yAxis),((s={})[n.inverted?"width":"height"]=this.height,s)),!1)}i&&n.redraw()},t.prototype.render=function(t,i,e,s){var r,a,o,n,h,d,l=this.chart,u=this.xAxis,p=u.pointRange||0,g=u.navigatorAxis.fake?l.xAxis[0]:u,v=this.navigatorEnabled,f=this.rendered,x=l.inverted,m=l.xAxis[0].minRange,b=l.xAxis[0].options.maxRange,y=this.scrollButtonSize,M=this.scrollbarHeight;if(!this.hasDragged||(0,c.defined)(e)){if(this.isDirty&&this.renderElements(),t=(0,c.correctFloat)(t-p/2),i=(0,c.correctFloat)(i+p/2),!(0,c.isNumber)(t)||!(0,c.isNumber)(i))if(!f)return;else e=0,s=(0,c.pick)(u.width,g.width);this.left=(0,c.pick)(u.left,l.plotLeft+y+(x?l.plotWidth:0));var E=this.size=h=(0,c.pick)(u.len,(x?l.plotHeight:l.plotWidth)-2*y);a=x?M:h+2*y,e=(0,c.pick)(e,u.toPixels(t,!0)),s=(0,c.pick)(s,u.toPixels(i,!0)),(0,c.isNumber)(e)&&Math.abs(e)!==1/0||(e=0,s=a);var A=u.toValue(e,!0),k=u.toValue(s,!0),w=Math.abs((0,c.correctFloat)(k-A));(0,c.defined)(m)&&w<m?this.grabbedLeft?e=u.toPixels(k-m-p,!0):this.grabbedRight&&(s=u.toPixels(A+m+p,!0)):(0,c.defined)(b)&&(0,c.correctFloat)(w-p)>b&&(this.grabbedLeft?e=u.toPixels(k-b-p,!0):this.grabbedRight&&(s=u.toPixels(A+b+p,!0))),this.zoomedMax=(0,c.clamp)(Math.max(e,s),0,E),this.zoomedMin=(0,c.clamp)(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(e,s),0,E),this.range=this.zoomedMax-this.zoomedMin,E=Math.round(this.zoomedMax);var O=Math.round(this.zoomedMin);v&&(this.navigatorGroup.attr({visibility:"inherit"}),d=f&&!this.hasDragged?"animate":"attr",this.drawMasks(O,E,x,d),this.drawOutline(O,E,x,d),(null==(r=this.navigatorOptions.handles)?void 0:r.enabled)&&(this.drawHandle(O,0,x,d),this.drawHandle(E,1,x,d))),this.scrollbar&&(x?(n=this.top-y,o=this.left-M+(v||!g.opposite?0:(g.titleOffset||0)+g.axisTitleMargin),M=h+2*y):(n=this.top+(v?this.height:-M),o=this.left-y),this.scrollbar.position(o,n,a,M),this.scrollbar.setRange(this.zoomedMin/(h||1),this.zoomedMax/(h||1))),this.rendered=!0,this.isDirty=!1,(0,c.fireEvent)(this,"afterRender")}},t.prototype.addMouseEvents=function(){var t,i,e=this,s=e.chart,r=s.container,a=[];e.mouseMoveHandler=t=function(t){e.onMouseMove(t)},e.mouseUpHandler=i=function(t){e.onMouseUp(t)},a.push((0,c.addEvent)(s.renderTo,"mousemove",t),(0,c.addEvent)(r.ownerDocument,"mouseup",i),(0,c.addEvent)(s.renderTo,"touchmove",t),(0,c.addEvent)(r.ownerDocument,"touchend",i)),e.eventsToUnbind=a,e.series&&e.series[0]&&a.push((0,c.addEvent)(e.series[0].xAxis,"foundExtremes",function(){var t;null==(t=s.navigator)||t.modifyNavigatorAxisExtremes()}))},t.prototype.getPartsEvents=function(t){var i=this,e=[];return["shades","handles"].forEach(function(s){i[s].forEach(function(r,a){e.push((0,c.addEvent)(r.element,t,function(t){i[""+s+"Mousedown"](t,a)}))})}),e},t.prototype.shadesMousedown=function(t,i){t=(null==(e=this.chart.pointer)?void 0:e.normalize(t))||t;var e,s,r,a,o,n,h,d=this.chart,l=this.xAxis,u=this.zoomedMin,p=this.size,g=this.range,v=this.left,f=t.chartX;d.inverted&&(f=t.chartY,v=this.top),1===i?(this.grabbedCenter=f,this.fixedWidth=g,this.dragOffset=f-u):(h=f-v-g/2,0===i?h=Math.max(0,h):2===i&&h+g>=p&&(h=p-g,this.reversedExtremes?(h-=g,o=null==(s=this.getUnionExtremes())?void 0:s.dataMin):a=null==(r=this.getUnionExtremes())?void 0:r.dataMax),h!==u&&(this.fixedWidth=g,n=l.navigatorAxis.toFixedRange(h,h+g,o,a),(0,c.defined)(n.min)&&(0,c.fireEvent)(this,"setRange",{min:Math.min(n.min,n.max),max:Math.max(n.min,n.max),redraw:!0,eventArguments:{trigger:"navigator"}})))},t.prototype.handlesMousedown=function(t,i){t=(null==(e=this.chart.pointer)?void 0:e.normalize(t))||t;var e,s=this.chart,r=s.xAxis[0],a=this.reversedExtremes;0===i?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=a?r.min:r.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=a?r.max:r.min),s.setFixedRange(void 0)},t.prototype.onMouseMove=function(t){var i,e,s,r=this,a=r.chart,o=r.navigatorSize,n=r.range,h=r.dragOffset,d=a.inverted,l=r.left;(!t.touches||0!==t.touches[0].pageX)&&(s=(t=(null==(i=a.pointer)?void 0:i.normalize(t))||t).chartX,d&&(l=r.top,s=t.chartY),r.grabbedLeft?(r.hasDragged=!0,r.render(0,0,s-l,r.otherHandlePos)):r.grabbedRight?(r.hasDragged=!0,r.render(0,0,r.otherHandlePos,s-l)):r.grabbedCenter&&h&&(r.hasDragged=!0,s<h?s=h:s>o+h-n&&(s=o+h-n),r.render(0,0,s-h,s-h+n)),r.hasDragged&&(0,c.pick)(null==(e=r.scrollbarOptions)?void 0:e.liveRedraw,!K&&!this.chart.boosted)&&(t.DOMType=t.type,setTimeout(function(){r.onMouseUp(t)},0)))},t.prototype.onMouseUp=function(t){var i,e,s,r,a,o,n,h=this.chart,d=this.xAxis,l=this.scrollbar,u=t.DOMEvent||t,p=h.inverted,g=this.rendered&&!this.hasDragged?"animate":"attr";(this.hasDragged&&(!l||!l.hasDragged)||"scrollbar"===t.trigger)&&(r=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?a=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(o=this.fixedExtreme),this.zoomedMax===this.size&&(o=this.reversedExtremes?r.dataMin:r.dataMax),0===this.zoomedMin&&(a=this.reversedExtremes?r.dataMax:r.dataMin),n=d.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,a,o),(0,c.defined)(n.min)&&(0,c.fireEvent)(this,"setRange",{min:Math.min(n.min,n.max),max:Math.max(n.min,n.max),redraw:!0,animation:!this.hasDragged&&null,eventArguments:{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:u}})),"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&&(0,c.isNumber)(this.zoomedMin)&&(0,c.isNumber)(this.zoomedMax)&&(s=Math.round(this.zoomedMin),e=Math.round(this.zoomedMax),this.shades&&this.drawMasks(s,e,p,g),this.outline&&this.drawOutline(s,e,p,g),(null==(i=this.navigatorOptions.handles)?void 0:i.enabled)&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(s,0,p,g),this.drawHandle(e,1,p,g)))},t.prototype.removeEvents=function(){var t;null==(t=this.eventsToUnbind)||t.forEach(function(t){t()}),this.eventsToUnbind=void 0,this.removeBaseSeriesEvents()},t.prototype.removeBaseSeriesEvents=function(){var t=this.baseSeries||[];this.navigatorEnabled&&t[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&t.forEach(function(t){(0,c.removeEvent)(t,"updatedData",this.updatedDataHandler)},this),t[0].xAxis&&(0,c.removeEvent)(t[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},t.prototype.getXAxisOffsets=function(){return this.chart.inverted?[this.scrollButtonSize,0,-this.scrollButtonSize,0]:[0,-this.scrollButtonSize,0,this.scrollButtonSize]},t.prototype.init=function(t){var i,e,s,r,a=t.options,o=a.navigator||{},n=o.enabled,h=a.scrollbar||{},d=h.enabled,l=n&&o.height||0,u=d&&h.height||0,p=h.buttonsEnabled&&u||0;this.handles=[],this.shades=[],this.chart=t,this.setBaseSeries(),this.height=l,this.scrollbarHeight=u,this.scrollButtonSize=p,this.scrollbarEnabled=d,this.navigatorEnabled=!!n,this.navigatorOptions=o,this.scrollbarOptions=h,this.setOpposite();var g=this,v=g.baseSeries,x=t.xAxis.length,m=t.yAxis.length,b=v&&v[0]&&v[0].xAxis||t.xAxis[0]||{options:{}};if(t.isDirtyBox=!0,g.navigatorEnabled){var y=this.getXAxisOffsets();g.xAxis=new(f())(t,(0,c.merge)({breaks:b.options.breaks,ordinal:b.options.ordinal,overscroll:b.options.overscroll},o.xAxis,{type:"datetime",yAxis:null==(i=o.yAxis)?void 0:i.id,index:x,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:b.options.ordinal?0:b.options.minPadding,maxPadding:b.options.ordinal?0:b.options.maxPadding,zoomEnabled:!1},t.inverted?{offsets:y,width:l}:{offsets:y,height:l}),"xAxis"),g.yAxis=new(f())(t,(0,c.merge)(o.yAxis,{alignTicks:!1,offset:0,index:m,isInternal:!0,reversed:(0,c.pick)(o.yAxis&&o.yAxis.reversed,t.yAxis[0]&&t.yAxis[0].reversed,!1),zoomEnabled:!1},t.inverted?{width:l}:{height:l}),"yAxis"),g.xAxis.clippable=!1,g.yAxis.clippable=!1,v||(null==(e=o.series)?void 0:e.data)||(null==(s=o.series)?void 0:s.dataTable)?g.updateNavigatorSeries(!1):0===t.series.length&&(g.unbindRedraw=(0,c.addEvent)(t,"beforeRedraw",function(){var i;t.series.length>0&&!g.series&&(g.setBaseSeries(),null==(i=g.unbindRedraw)||i.call(g))})),g.reversedExtremes=t.inverted&&!g.xAxis.reversed||!t.inverted&&g.xAxis.reversed,g.renderElements(),g.addMouseEvents()}else g.xAxis={chart:t,navigatorAxis:{fake:!0},translate:function(i,e){var s=t.xAxis[0],r=s.getExtremes(),a=s.len-2*p,o=Q("min",s.options.min,r.dataMin),n=Q("max",s.options.max,r.dataMax)-o;return e?i*n/a+o:a*(i-o)/n},toPixels:function(t){return this.translate(t)},toValue:function(t){return this.translate(t,!0)}},g.xAxis.navigatorAxis.axis=g.xAxis,g.xAxis.navigatorAxis.toFixedRange=D.prototype.toFixedRange.bind(g.xAxis.navigatorAxis);if(null==(r=t.options.scrollbar)?void 0:r.enabled){var M=(0,c.merge)(t.options.scrollbar,{vertical:t.inverted});(0,c.isNumber)(M.margin)||(M.margin=t.inverted?-3:3),t.scrollbar=g.scrollbar=new j(t.renderer,M,t),(0,c.addEvent)(g.scrollbar,"changed",function(t){var i,e=g.size,s=e*this.to,r=e*this.from;g.hasDragged=null==(i=g.scrollbar)?void 0:i.hasDragged,g.render(0,0,r,s),this.shouldUpdateExtremes(t.DOMType)&&setTimeout(function(){g.onMouseUp(t)})})}g.addBaseSeriesEvents(),g.addChartEvents()},t.prototype.setOpposite=function(){var t=this.navigatorOptions,i=this.navigatorEnabled,e=this.chart;this.opposite=(0,c.pick)(t.opposite,!!(!i&&e.inverted))},t.prototype.getUnionExtremes=function(t){var i,e=this.chart.xAxis[0],s=this.chart.time,r=this.xAxis,a=r.options,o=e.options;return t&&null===e.dataMin||(i={dataMin:(0,c.pick)(s.parse(null==a?void 0:a.min),Q("min",s.parse(o.min),e.dataMin,r.dataMin,r.min)),dataMax:(0,c.pick)(s.parse(null==a?void 0:a.max),Q("max",s.parse(o.max),e.dataMax,r.dataMax,r.max))}),i},t.prototype.setBaseSeries=function(t,i){var e,s=this.chart,r=this.baseSeries=[];t=t||(null==(e=s.options.navigator)?void 0:e.baseSeries)||(s.series.length?(0,c.find)(s.series,function(t){return!t.options.isInternal}).index:0),(s.series||[]).forEach(function(i,e){!i.options.isInternal&&(i.options.showInNavigator||(e===t||i.options.id===t)&&!1!==i.options.showInNavigator)&&r.push(i)}),this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,i)},t.prototype.updateNavigatorSeries=function(t,i){var e,s,r,a,o,n=this,h=n.chart,d=n.baseSeries,l={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:null==(e=this.navigatorOptions.xAxis)?void 0:e.id,yAxis:null==(s=this.navigatorOptions.yAxis)?void 0:s.id,showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},u=n.series=(n.series||[]).filter(function(t){var i=t.baseSeries;return!(i&&0>d.indexOf(i))||(i&&((0,c.removeEvent)(i,"updatedData",n.updatedDataHandler),delete i.navigatorSeries),t.chart&&t.destroy(),!1)}),p=n.navigatorOptions.series;if(d&&d.length&&d.forEach(function(t){var e,s,g=t.navigatorSeries,v=(0,c.extend)({color:t.color,visible:t.visible},(0,c.isArray)(p)?J.navigator.series:p);if(!g||!1!==n.navigatorOptions.adaptToUpdatedData){l.name="Navigator "+d.length,o=(r=t.options||{}).navigatorOptions||{},v.dataLabels=(0,c.splat)(v.dataLabels),(a=(0,c.merge)(r,l,v,o)).pointRange=(0,c.pick)(v.pointRange,o.pointRange,null==(e=J.plotOptions[a.type||"line"])?void 0:e.pointRange);var f=o.data||v.data,x=o.dataTable||v.dataTable;n.hasNavigatorData=n.hasNavigatorData||!!f||!!x,a.data=f||(null==(s=r.data)?void 0:s.slice(0)),a.dataTable=x||r.dataTable,g&&g.options?g.update(a,i):(t.navigatorSeries=h.initSeries(a),(0,c.fireEvent)(t.navigatorSeries,"afterUpdate"),t.navigatorSeries.baseSeries=t,u.push(t.navigatorSeries))}}),((null==p?void 0:p.data)||(null==p?void 0:p.dataTable))&&!(d&&d.length)||(0,c.isArray)(p)){var g=h.options.colors||[];n.hasNavigatorData=!1,(p=(0,c.splat)(p)).forEach(function(t,i){var e;l.name="Navigator "+(u.length+1),(a=(0,c.merge)(null==(e=J.navigator)?void 0:e.series,{color:h.series[i]&&!h.series[i].options.isInternal&&h.series[i].color||g[i]||g[0]},l,t)).data=t.data,a.dataTable=t.dataTable,(a.data||a.dataTable)&&(n.hasNavigatorData=!0,u.push(h.initSeries(a)))})}t&&this.addBaseSeriesEvents()},t.prototype.addBaseSeriesEvents=function(){var t=this,i=this,e=i.baseSeries||[];e[0]&&e[0].xAxis&&e[0].eventsToUnbind.push((0,c.addEvent)(e[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes)),e.forEach(function(s){s.eventsToUnbind.push((0,c.addEvent)(s,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)})),s.eventsToUnbind.push((0,c.addEvent)(s,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)})),!1!==t.navigatorOptions.adaptToUpdatedData&&s.xAxis&&s.eventsToUnbind.push((0,c.addEvent)(s,"updatedData",t.updatedDataHandler)),s.eventsToUnbind.push((0,c.addEvent)(s,"remove",function(){e&&(0,c.erase)(e,s),this.navigatorSeries&&i.series&&((0,c.erase)(i.series,this.navigatorSeries),(0,c.defined)(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))})},t.prototype.getBaseSeriesMin=function(t){return this.baseSeries.reduce(function(t,i){var e;return Math.min(t,null!=(e=i.getColumn("x")[0])?e:t)},t)},t.prototype.modifyNavigatorAxisExtremes=function(){var t=this.xAxis;if(void 0!==t.getExtremes){var i=this.getUnionExtremes(!0);i&&(i.dataMin!==t.min||i.dataMax!==t.max)&&(t.min=i.dataMin,t.max=i.dataMax)}},t.prototype.modifyBaseAxisExtremes=function(){var t,i,e,s=this.chart.navigator,r=this.getExtremes(),a=r.min,o=r.max,n=r.dataMin,h=r.dataMax,d=o-a,l=null==s?void 0:s.stickToMin,u=null==s?void 0:s.stickToMax,p=(0,c.pick)(null==(t=this.ordinal)?void 0:t.convertOverscroll(this.options.overscroll),0),g=s.series&&s.series[0],v=!!this.setExtremes;!(this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger)&&(l&&(i=(e=n)+d),u&&(i=h+p,l||(e=Math.max(n,i-d,s.getBaseSeriesMin(g&&g.xData?g.xData[0]:-Number.MAX_VALUE)))),v&&(l||u)&&(0,c.isNumber)(e)&&(this.min=this.userMin=e,this.max=this.userMax=i)),s.stickToMin=s.stickToMax=null},t.prototype.updatedDataHandler=function(){var t=this.chart.navigator,i=this.navigatorSeries,e=t.reversedExtremes?0===Math.round(t.zoomedMin):Math.round(t.zoomedMax)>=Math.round(t.size);t.stickToMax=(0,c.pick)(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,e),t.stickToMin=t.shouldStickToMin(this,t),i&&!t.hasNavigatorData&&(i.options.pointStart=this.getColumn("x")[0],i.setData(this.options.data||this.options.dataTable,!1,void 0,!1))},t.prototype.shouldStickToMin=function(t,i){var e=i.getBaseSeriesMin(t.getColumn("x")[0]),s=t.xAxis,r=s.max,a=s.min,o=s.options.range;return!!((0,c.isNumber)(r)&&(0,c.isNumber)(a))&&(o&&r-e>0?r-e<o:a<=e)},t.prototype.addChartEvents=function(){this.eventsToUnbind||(this.eventsToUnbind=[]),this.eventsToUnbind.push((0,c.addEvent)(this.chart,"redraw",function(){var t=this.navigator,i=t&&(t.baseSeries&&t.baseSeries[0]&&t.baseSeries[0].xAxis||this.xAxis[0]);i&&t.render(i.min,i.max)}),(0,c.addEvent)(this.chart,"getMargins",function(){var t,i=this.navigator,e=i.opposite?"plotTop":"marginBottom";this.inverted&&(e=i.opposite?"marginRight":"plotLeft"),this[e]=(this[e]||0)+(i.navigatorEnabled||!this.inverted?i.height+((null==(t=this.scrollbar)?void 0:t.options.margin)||0)+i.scrollbarHeight:0)+(i.navigatorOptions.margin||0)}),(0,c.addEvent)(this,"setRange",function(t){this.chart.xAxis[0].setExtremes(t.min,t.max,t.redraw,t.animation,t.eventArguments)}))},t.prototype.destroy=function(){var t=this;this.removeEvents(),this.xAxis&&((0,c.erase)(this.chart.xAxis,this.xAxis),(0,c.erase)(this.chart.axes,this.xAxis)),this.yAxis&&((0,c.erase)(this.chart.yAxis,this.yAxis),(0,c.erase)(this.chart.axes,this.yAxis)),(this.series||[]).forEach(function(t){t.destroy&&t.destroy()}),["series","xAxis","yAxis","shades","outline","scrollbarTrack","scrollbarRifles","scrollbarGroup","scrollbar","navigatorGroup","rendered"].forEach(function(i){t[i]&&t[i].destroy&&t[i].destroy(),t[i]=null}),[this.handles].forEach(function(t){(0,c.destroyObjectProperties)(t)}),this.baseSeries.forEach(function(t){t.navigatorSeries=void 0}),this.navigatorEnabled=!1},t}(),tt={chart:{height:70,margin:[0,5,0,5]},exporting:{enabled:!1},legend:{enabled:!1},navigator:{enabled:!1},plotOptions:{series:{states:{hover:{enabled:!1}},marker:{enabled:!1}}},scrollbar:{enabled:!1},title:{text:""},tooltip:{enabled:!1},xAxis:{visible:!1},yAxis:{height:0,visible:!1}},ti=function(){function t(t,i){this.boundAxes=[],this.userOptions=i,this.chartOptions=(0,c.merge)(u().getOptions(),tt,i.chart,{navigator:i}),this.chartOptions.chart&&i.height&&(this.chartOptions.chart.height=i.height);var e=new(g())(t,this.chartOptions);e.options=(0,c.merge)(e.options,{navigator:{enabled:!0},scrollbar:{enabled:!0}}),this.chartOptions.navigator&&this.chartOptions.scrollbar&&(this.chartOptions.navigator.enabled=!0,this.chartOptions.scrollbar.enabled=!0),this.navigator=new $(e),e.navigator=this.navigator,this.initNavigator()}return t.navigator=function(i,e){var s=new t(i,e);return u().navigators?u().navigators.push(s):u().navigators=[s],s},t.prototype.bind=function(t,i){var e=this;void 0===i&&(i=!0);var s=this,r=t instanceof g()?t.xAxis[0]:t;if(r instanceof f()){var a=this.navigator.xAxis,o=a.min,n=a.max,h=[];if(i){var d=(0,c.addEvent)(r,"setExtremes",function(t){("pan"===t.trigger||"zoom"===t.trigger||"mousewheel"===t.trigger||"rangeSelectorButton"===t.trigger||"rangeSelectorInput"===t.trigger)&&s.setRange(t.min,t.max,!0,"pan"!==t.trigger&&"mousewheel"!==t.trigger,{trigger:r})});h.push(d)}var l=(0,c.addEvent)(this.navigator,"setRange",function(t){r.setExtremes(t.min,t.max,t.redraw,t.animation)});h.push(l);var u=this.boundAxes.filter(function(t){return t.axis===r})[0];u||(u={axis:r,callbacks:[]},this.boundAxes.push(u)),u.callbacks=h,r.series.forEach(function(t){t.options.showInNavigator&&s.addSeries(t.options)}),r.setExtremes(o,n),(0,c.addEvent)(r,"destroy",function(t){t.keepEvents||e.unbind(r)})}},t.prototype.unbind=function(t){if(!t){this.boundAxes.forEach(function(t){t.callbacks.forEach(function(t){return t()})}),this.boundAxes.length=0;return}for(var i=t instanceof f()?t:t.xAxis[0],e=this.boundAxes.length-1;e>=0;e--)this.boundAxes[e].axis===i&&(this.boundAxes[e].callbacks.forEach(function(t){return t()}),this.boundAxes.splice(e,1))},t.prototype.destroy=function(){this.boundAxes.forEach(function(t){t.callbacks.forEach(function(t){return t()})}),this.boundAxes.length=0,this.navigator.destroy(),this.navigator.chart.destroy()},t.prototype.update=function(t,i){this.chartOptions=(0,c.merge)(this.chartOptions,t.height&&{chart:{height:t.height}},t.chart,{navigator:t}),this.navigator.chart.update(this.chartOptions,i)},t.prototype.redraw=function(){this.navigator.chart.redraw()},t.prototype.addSeries=function(t){this.navigator.chart.addSeries((0,c.merge)(t,{showInNavigator:(0,c.pick)(t.showInNavigator,!0)})),this.navigator.setBaseSeries()},t.prototype.initNavigator=function(){var t,i=this.navigator;i.top=1,i.xAxis.setScale(),i.yAxis.setScale(),i.xAxis.render(),i.yAxis.render(),null==(t=i.series)||t.forEach(function(t){t.translate(),t.render(),t.redraw()});var e=this.getInitialExtremes(),s=e.min,r=e.max;i.chart.xAxis[0].userMin=s,i.chart.xAxis[0].userMax=r,i.render(s,r)},t.prototype.getRange=function(){var t=this.navigator.chart.xAxis[0].getExtremes(),i=t.min,e=t.max,s=this.navigator.xAxis.getExtremes(),r=s.userMin,a=s.userMax,o=s.min,n=s.max;return{min:(0,c.pick)(i,o),max:(0,c.pick)(e,n),dataMin:o,dataMax:n,userMin:r,userMax:a}},t.prototype.setRange=function(t,i,e,s,r){(0,c.fireEvent)(this.navigator,"setRange",{min:t,max:i,redraw:e,animation:s,eventArguments:(0,c.merge)(r,{trigger:"navigator"})})},t.prototype.getInitialExtremes=function(){var t=this.navigator.xAxis.getExtremes();return{min:t.min,max:t.max}},t}(),te=u();te.StandaloneNavigator=te.StandaloneNavigator||ti,te.navigator=te.StandaloneNavigator.navigator,F(te.Chart,te.Axis,te.Series);var ts=u();return l.default}()});