/* Highstock JS v9.1.1 (2021-06-03) Highcharts Stock as a plugin for Highcharts (c) 2010-2021 Torstein Honsi License: www.highcharts.com/license */ 'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/stock",["highcharts"],function(I){a(I);a.Highcharts=I;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function I(a,v,x,r){a.hasOwnProperty(v)||(a[v]=r.apply(null,x))}a=a?a._modules:{};I(a,"Core/Axis/NavigatorAxis.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,v){var x=a.isTouchDevice,r=v.addEvent, n=v.correctFloat,H=v.defined,w=v.isNumber,D=v.pick,d=function(){function b(b){this.axis=b}b.prototype.destroy=function(){this.axis=void 0};b.prototype.toFixedRange=function(b,d,a,P){var J=this.axis,g=J.chart;g=g&&g.fixedRange;var Q=(J.pointRange||0)/2;b=D(a,J.translate(b,!0,!J.horiz));d=D(P,J.translate(d,!0,!J.horiz));J=g&&(d-b)/g;H(a)||(b=n(b+Q));H(P)||(d=n(d-Q));.7J&&(P?b=d-g:d=b+g);w(b)&&w(d)||(b=d=void 0);return{min:b,max:d}};return b}();return function(){function b(){}b.compose=function(b){b.keepProps.push("navigatorAxis"); r(b,"init",function(){this.navigatorAxis||(this.navigatorAxis=new d(this))});r(b,"zoom",function(b){var d=this.chart.options,a=d.navigator,J=this.navigatorAxis,g=d.chart.pinchType,Q=d.rangeSelector;d=d.chart.zoomType;this.isXAxis&&(a&&a.enabled||Q&&Q.enabled)&&("y"===d?b.zoomed=!1:(!x&&"xy"===d||x&&"xy"===g)&&this.options.range&&(a=J.previousZoom,H(b.newMin)?J.previousZoom=[this.min,this.max]:a&&(b.newMin=a[0],b.newMax=a[1],J.previousZoom=void 0)));"undefined"!==typeof b.zoomed&&b.preventDefault()})}; b.AdditionsClass=d;return b}()});I(a,"Core/Axis/ScrollbarAxis.js",[a["Core/Utilities.js"]],function(a){var v=a.addEvent,x=a.defined,r=a.pick;return function(){function a(){}a.compose=function(a,n){var w=function(d){var b=r(d.options&&d.options.min,d.min),a=r(d.options&&d.options.max,d.max);return{axisMin:b,axisMax:a,scrollMin:x(d.dataMin)?Math.min(b,d.min,d.dataMin,r(d.threshold,Infinity)):b,scrollMax:x(d.dataMax)?Math.max(a,d.max,d.dataMax,r(d.threshold,-Infinity)):a}};v(a,"afterInit",function(){var d= this;d.options&&d.options.scrollbar&&d.options.scrollbar.enabled&&(d.options.scrollbar.vertical=!d.horiz,d.options.startOnTick=d.options.endOnTick=!1,d.scrollbar=new n(d.chart.renderer,d.options.scrollbar,d.chart),v(d.scrollbar,"changed",function(b){var a=w(d),l=a.axisMax,A=a.scrollMin,n=a.scrollMax-A;x(a.axisMin)&&x(l)&&(d.horiz&&!d.reversed||!d.horiz&&d.reversed?(a=A+n*this.to,A+=n*this.from):(a=A+n*(1-this.from),A+=n*(1-this.to)),this.shouldUpdateExtremes(b.DOMType)?d.setExtremes(A,a,!0,"mousemove"!== b.DOMType&&"touchmove"!==b.DOMType,b):this.setRange(this.from,this.to))}))});v(a,"afterRender",function(){var d=w(this),b=d.scrollMin,a=d.scrollMax;d=this.scrollbar;var l=this.axisTitleMargin+(this.titleOffset||0),A=this.chart.scrollbarsOffsets,n=this.options.margin||0;d&&(this.horiz?(this.opposite||(A[1]+=l),d.position(this.left,this.top+this.height+2+A[1]-(this.opposite?n:0),this.width,this.height),this.opposite||(A[1]+=n),l=1):(this.opposite&&(A[0]+=l),d.position(this.left+this.width+2+A[0]-(this.opposite? 0:n),this.top,this.width,this.height),this.opposite&&(A[0]+=n),l=0),A[l]+=d.size+d.options.margin,isNaN(b)||isNaN(a)||!x(this.min)||!x(this.max)||this.min===this.max?d.setRange(0,1):(A=(this.min-b)/(a-b),b=(this.max-b)/(a-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?d.setRange(A,b):d.setRange(1-b,1-A)))});v(a,"afterGetOffset",function(){var d=this.horiz?2:1,b=this.scrollbar;b&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[d]+=b.size+b.options.margin)});return a};return a}()}); I(a,"Core/ScrollbarDefaults.js",[a["Core/Globals.js"],a["Core/Color/Palette.js"]],function(a,v){return{height:a.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:v.neutralColor20,barBorderWidth:1,barBorderColor:v.neutralColor20,buttonArrowColor:v.neutralColor80,buttonBackgroundColor:v.neutralColor10,buttonBorderColor:v.neutralColor20,buttonBorderWidth:1,rifleColor:v.neutralColor80,trackBackgroundColor:v.neutralColor5, trackBorderColor:v.neutralColor5,trackBorderWidth:1}});I(a,"Core/Scrollbar.js",[a["Core/DefaultOptions.js"],a["Core/Globals.js"],a["Core/Axis/ScrollbarAxis.js"],a["Core/ScrollbarDefaults.js"],a["Core/Utilities.js"]],function(a,v,x,r,n){var H=a.defaultOptions,w=n.addEvent,D=n.correctFloat,d=n.defined,b=n.destroyObjectProperties,F=n.fireEvent,l=n.merge,A=n.pick,P=n.removeEvent;a=function(){function a(g,a,b){this._events=[];this.chart=void 0;this.from=this.chartY=this.chartX=0;this.scrollbar=this.renderer= this.options=this.group=void 0;this.scrollbarButtons=[];this.scrollbarGroup=void 0;this.scrollbarLeft=0;this.scrollbarRifles=void 0;this.scrollbarStrokeWidth=1;this.to=this.size=this.scrollbarTop=0;this.track=void 0;this.trackBorderWidth=1;this.userOptions=void 0;this.y=this.x=0;this.init(g,a,b)}a.compose=function(g){x.compose(g,a)};a.swapXY=function(g,a){a&&g.forEach(function(g){for(var a=g.length,b,p=0;pthis.calculatedWidth?a.minWidth:0;return{chartX:(g.chartX-this.x-this.xOffset)/(this.barWidth-a),chartY:(g.chartY-this.y-this.yOffset)/(this.barWidth-a)}};a.prototype.destroy=function(){var a=this,d=a.chart.scroller;a.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(g){a[g]&&a[g].destroy&&(a[g]=a[g].destroy())});d&&a===d.scrollbar&& (d.scrollbar=null,b(d.scrollbarButtons))};a.prototype.drawScrollbarButton=function(g){var b=this.renderer,d=this.scrollbarButtons,C=this.options,h=this.size,q=b.g().add(this.group);d.push(q);q=b.rect().addClass("highcharts-scrollbar-button").add(q);this.chart.styledMode||q.attr({stroke:C.buttonBorderColor,"stroke-width":C.buttonBorderWidth,fill:C.buttonBackgroundColor});q.attr(q.crisp({x:-.5,y:-.5,width:h+1,height:h+1,r:C.buttonBorderRadius},q.strokeWidth()));q=b.path(a.swapXY([["M",h/2+(g?-1:1), h/2-3],["L",h/2+(g?-1:1),h/2+3],["L",h/2+(g?2:-2),h/2]],C.vertical)).addClass("highcharts-scrollbar-arrow").add(d[g]);this.chart.styledMode||q.attr({fill:C.buttonArrowColor})};a.prototype.init=function(a,b,d){this.scrollbarButtons=[];this.renderer=a;this.userOptions=b;this.options=l(r,H.scrollbar,b);this.chart=d;this.size=A(this.options.size,this.options.height);b.enabled&&(this.render(),this.addEvents())};a.prototype.mouseDownHandler=function(a){a=this.chart.pointer.normalize(a);a=this.cursorToScrollbarPosition(a); this.chartX=a.chartX;this.chartY=a.chartY;this.initPositions=[this.from,this.to];this.grabbedCenter=!0};a.prototype.mouseMoveHandler=function(a){var b=this.chart.pointer.normalize(a),g=this.options.vertical?"chartY":"chartX",d=this.initPositions||[];!this.grabbedCenter||a.touches&&0===a.touches[0][g]||(b=this.cursorToScrollbarPosition(b)[g],g=this[g],g=b-g,this.hasDragged=!0,this.updatePosition(d[0]+g,d[1]+g),this.hasDragged&&F(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:a.type, DOMEvent:a}))};a.prototype.mouseUpHandler=function(a){this.hasDragged&&F(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:a.type,DOMEvent:a});this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null};a.prototype.position=function(a,b,d,C){var g=this.options.vertical,p=this.rendered?"animate":"attr",E=0;this.x=a;this.y=b+this.trackBorderWidth;this.width=d;this.xOffset=this.height=C;this.yOffset=E;g?(this.width=this.yOffset=d=E=this.size,this.xOffset=b=0,this.barWidth=C- 2*d,this.x=a+=this.options.margin):(this.height=this.xOffset=C=b=this.size,this.barWidth=d-2*C,this.y+=this.options.margin);this.group[p]({translateX:a,translateY:this.y});this.track[p]({width:d,height:C});this.scrollbarButtons[1][p]({translateX:g?0:d-b,translateY:g?C-E:0})};a.prototype.removeEvents=function(){this._events.forEach(function(a){P.apply(null,a)});this._events.length=0};a.prototype.render=function(){var b=this.renderer,d=this.options,p=this.size,C=this.chart.styledMode,h=b.g("scrollbar").attr({zIndex:d.zIndex, translateY:-99999}).add();this.group=h;this.track=b.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:d.trackBorderRadius||0,height:p,width:p}).add(h);C||this.track.attr({fill:d.trackBackgroundColor,stroke:d.trackBorderColor,"stroke-width":d.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=b.g().add(h);this.scrollbar=b.rect().addClass("highcharts-scrollbar-thumb").attr({height:p,width:p,r:d.barBorderRadius|| 0}).add(this.scrollbarGroup);this.scrollbarRifles=b.path(a.swapXY([["M",-3,p/4],["L",-3,2*p/3],["M",0,p/4],["L",0,2*p/3],["M",3,p/4],["L",3,2*p/3]],d.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);C||(this.scrollbar.attr({fill:d.barBackgroundColor,stroke:d.barBorderColor,"stroke-width":d.barBorderWidth}),this.scrollbarRifles.attr({stroke:d.rifleColor,"stroke-width":1}));this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth% 2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)};a.prototype.setRange=function(a,b){var g=this.options,C=g.vertical,h=g.minWidth,q=this.barWidth,E=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(d(q)){var y=q*Math.min(b,1);a=Math.max(a,0);var G=Math.ceil(q*a);this.calculatedWidth=y=D(y-G);y=y?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0);!1===g.showFull&&(0>=a&&1<=b?this.group.hide():this.group.show());this.rendered=!0}};a.prototype.shouldUpdateExtremes=function(a){return A(this.options.liveRedraw,v.svg&&!v.isTouchDevice&& !this.chart.isBoosting)||"mouseup"===a||"touchend"===a||!d(a)};a.prototype.trackClick=function(a){var b=this.chart.pointer.normalize(a),d=this.to-this.from,g=this.y+this.scrollbarTop,h=this.x+this.scrollbarLeft;this.options.vertical&&b.chartY>g||!this.options.vertical&&b.chartX>h?this.updatePosition(this.from+d,this.to+d):this.updatePosition(this.from-d,this.to-d);F(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:a})};a.prototype.update=function(a){this.destroy();this.init(this.chart.renderer, l(!0,this.options,a),this.chart)};a.prototype.updatePosition=function(a,b){1a&&(b=D(b-a),a=0);this.from=a;this.to=b};a.defaultOptions=r;return a}();H.scrollbar=l(!0,a.defaultOptions,H.scrollbar);return a});I(a,"Core/Navigator.js",[a["Core/Axis/Axis.js"],a["Core/Chart/Chart.js"],a["Core/Color/Color.js"],a["Core/Globals.js"],a["Core/Axis/NavigatorAxis.js"],a["Core/DefaultOptions.js"],a["Core/Color/Palette.js"],a["Core/Renderer/RendererRegistry.js"],a["Core/Scrollbar.js"],a["Core/Series/Series.js"], a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,v,x,r,n,H,w,D,d,b,F,l){x=x.parse;var A=r.hasTouch,P=r.isTouchDevice,J=H.defaultOptions,g=l.addEvent,Q=l.clamp,p=l.correctFloat,C=l.defined,h=l.destroyObjectProperties,q=l.erase,E=l.extend,y=l.find,G=l.isArray,M=l.isNumber,B=l.merge,L=l.pick,t=l.removeEvent,u=l.splat,k=function(f){for(var c=[],e=1;ey&&(this.grabbedLeft?f=b.toPixels(e-y-d,!0):this.grabbedRight&& (k=b.toPixels(c+y+d,!0)));this.zoomedMax=Q(Math.max(f,k),0,t);this.zoomedMin=Q(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(f,k),0,t);this.range=this.zoomedMax-this.zoomedMin;t=Math.round(this.zoomedMax);f=Math.round(this.zoomedMin);K&&(this.navigatorGroup.attr({visibility:"visible"}),g=g&&!this.hasDragged?"animate":"attr",this.drawMasks(f,t,B,g),this.drawOutline(f,t,B,g),this.navigatorOptions.handles.enabled&&(this.drawHandle(f,0,B,g),this.drawHandle(t,1,B,g)));this.scrollbar&&(B?(B=this.top- z,u=this.left-z+(K||!u.opposite?0:(u.titleOffset||0)+u.axisTitleMargin),z=a+2*z):(B=this.top+(K?this.height:-z),u=this.left-z),this.scrollbar.position(u,B,m,z),this.scrollbar.setRange(this.zoomedMin/(a||1),this.zoomedMax/(a||1)));this.rendered=!0}};f.prototype.addMouseEvents=function(){var c=this,e=c.chart,f=e.container,k=[],m,a;c.mouseMoveHandler=m=function(e){c.onMouseMove(e)};c.mouseUpHandler=a=function(e){c.onMouseUp(e)};k=c.getPartsEvents("mousedown");k.push(g(e.renderTo,"mousemove",m),g(f.ownerDocument, "mouseup",a));A&&(k.push(g(e.renderTo,"touchmove",m),g(f.ownerDocument,"touchend",a)),k.concat(c.getPartsEvents("touchstart")));c.eventsToUnbind=k;c.series&&c.series[0]&&k.push(g(c.series[0].xAxis,"foundExtremes",function(){e.navigator.modifyNavigatorAxisExtremes()}))};f.prototype.getPartsEvents=function(c){var e=this,f=[];["shades","handles"].forEach(function(k){e[k].forEach(function(m,z){f.push(g(m.element,c,function(c){e[k+"Mousedown"](c,z)}))})});return f};f.prototype.shadesMousedown=function(c, e){c=this.chart.pointer.normalize(c);var f=this.chart,k=this.xAxis,m=this.zoomedMin,a=this.left,b=this.size,d=this.range,u=c.chartX;f.inverted&&(u=c.chartY,a=this.top);if(1===e)this.grabbedCenter=u,this.fixedWidth=d,this.dragOffset=u-m;else{c=u-a-d/2;if(0===e)c=Math.max(0,c);else if(2===e&&c+d>=b)if(c=b-d,this.reversedExtremes){c-=d;var t=this.getUnionExtremes().dataMin}else var g=this.getUnionExtremes().dataMax;c!==m&&(this.fixedWidth=d,e=k.navigatorAxis.toFixedRange(c,c+d,t,g),C(e.min)&&f.xAxis[0].setExtremes(Math.min(e.min, e.max),Math.max(e.min,e.max),!0,null,{trigger:"navigator"}))}};f.prototype.handlesMousedown=function(c,e){this.chart.pointer.normalize(c);c=this.chart;var f=c.xAxis[0],k=this.reversedExtremes;0===e?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=k?f.min:f.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=k?f.max:f.min);c.fixedRange=null};f.prototype.onMouseMove=function(c){var e=this,f=e.chart,k=e.left,m=e.navigatorSize,a=e.range,b=e.dragOffset, d=f.inverted;c.touches&&0===c.touches[0].pageX||(c=f.pointer.normalize(c),f=c.chartX,d&&(k=e.top,f=c.chartY),e.grabbedLeft?(e.hasDragged=!0,e.render(0,0,f-k,e.otherHandlePos)):e.grabbedRight?(e.hasDragged=!0,e.render(0,0,e.otherHandlePos,f-k)):e.grabbedCenter&&(e.hasDragged=!0,fm+b-a&&(f=m+b-a),e.render(0,0,f-b,f-b+a)),e.hasDragged&&e.scrollbar&&L(e.scrollbar.options.liveRedraw,r.svg&&!P&&!this.chart.isBoosting)&&(c.DOMType=c.type,setTimeout(function(){e.onMouseUp(c)},0)))};f.prototype.onMouseUp= function(c){var e=this.chart,f=this.xAxis,k=this.scrollbar,m=c.DOMEvent||c,a=e.inverted,b=this.rendered&&!this.hasDragged?"animate":"attr";if(this.hasDragged&&(!k||!k.hasDragged)||"scrollbar"===c.trigger){k=this.getUnionExtremes();if(this.zoomedMin===this.otherHandlePos)var d=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var u=this.fixedExtreme;this.zoomedMax===this.size&&(u=this.reversedExtremes?k.dataMin:k.dataMax);0===this.zoomedMin&&(d=this.reversedExtremes?k.dataMax:k.dataMin); f=f.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,d,u);C(f.min)&&e.xAxis[0].setExtremes(Math.min(f.min,f.max),Math.max(f.min,f.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:m})}"mousemove"!==c.DOMType&&"touchmove"!==c.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null);this.navigatorEnabled&&M(this.zoomedMin)&&M(this.zoomedMax)&&(e=Math.round(this.zoomedMin), c=Math.round(this.zoomedMax),this.shades&&this.drawMasks(e,c,a,b),this.outline&&this.drawOutline(e,c,a,b),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(e,0,a,b),this.drawHandle(c,1,a,b)))};f.prototype.removeEvents=function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(c){c()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()};f.prototype.removeBaseSeriesEvents=function(){var c=this.baseSeries||[];this.navigatorEnabled&& c[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&c.forEach(function(c){t(c,"updatedData",this.updatedDataHandler)},this),c[0].xAxis&&t(c[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))};f.prototype.init=function(c){var e=c.options,f=e.navigator,m=f.enabled,b=e.scrollbar,u=b.enabled;e=m?f.height:0;var t=u?b.height:0;this.handles=[];this.shades=[];this.chart=c;this.setBaseSeries();this.height=e;this.scrollbarHeight=t;this.scrollbarEnabled=u;this.navigatorEnabled=m;this.navigatorOptions= f;this.scrollbarOptions=b;this.outlineHeight=e+t;this.opposite=L(f.opposite,!(m||!c.inverted));var h=this;m=h.baseSeries;b=c.xAxis.length;u=c.yAxis.length;var y=m&&m[0]&&m[0].xAxis||c.xAxis[0]||{options:{}};c.isDirtyBox=!0;h.navigatorEnabled?(h.xAxis=new a(c,B({breaks:y.options.breaks,ordinal:y.options.ordinal},f.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:b,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1}, c.inverted?{offsets:[t,0,-t,0],width:e}:{offsets:[0,-t,0,t],height:e})),h.yAxis=new a(c,B(f.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:u,isInternal:!0,reversed:L(f.yAxis&&f.yAxis.reversed,c.yAxis[0]&&c.yAxis[0].reversed,!1),zoomEnabled:!1},c.inverted?{width:e}:{height:e})),m||f.series.data?h.updateNavigatorSeries(!1):0===c.series.length&&(h.unbindRedraw=g(c,"beforeRedraw",function(){0k.indexOf(e)?(e&&(t(e, "updatedData",f.updatedDataHandler),delete e.navigatorSeries),c.chart&&c.destroy(),!1):!0});k&&k.length&&k.forEach(function(c){var z=c.navigatorSeries,t=E({color:c.color,visible:c.visible},G(d)?J.navigator.series:d);z&&!1===f.navigatorOptions.adaptToUpdatedData||(g.name="Navigator "+k.length,a=c.options||{},h=a.navigatorOptions||{},t.dataLabels=u(t.dataLabels),b=B(a,g,t,h),b.pointRange=L(t.pointRange,h.pointRange,J.plotOptions[b.type||"line"].pointRange),t=h.data||t.data,f.hasNavigatorData=f.hasNavigatorData|| !!t,b.data=t||a.data&&a.data.slice(0),z&&z.options?z.update(b,e):(c.navigatorSeries=m.initSeries(b),c.navigatorSeries.baseSeries=c,y.push(c.navigatorSeries)))});if(d.data&&(!k||!k.length)||G(d))f.hasNavigatorData=!1,d=u(d),d.forEach(function(c,e){g.name="Navigator "+(y.length+1);b=B(J.navigator.series,{color:m.series[e]&&!m.series[e].options.isInternal&&m.series[e].color||m.options.colors[e]||m.options.colors[0]},g,c);b.data=c.data;b.data&&(f.hasNavigatorData=!0,y.push(m.initSeries(b)))});c&&this.addBaseSeriesEvents()}; f.prototype.addBaseSeriesEvents=function(){var c=this,e=c.baseSeries||[];e[0]&&e[0].xAxis&&e[0].eventsToUnbind.push(g(e[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes));e.forEach(function(e){e.eventsToUnbind.push(g(e,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)}));e.eventsToUnbind.push(g(e,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)}));!1!==this.navigatorOptions.adaptToUpdatedData&&e.xAxis&&e.eventsToUnbind.push(g(e,"updatedData", this.updatedDataHandler));e.eventsToUnbind.push(g(e,"remove",function(){this.navigatorSeries&&(q(c.series,this.navigatorSeries),C(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))},this)};f.prototype.getBaseSeriesMin=function(c){return this.baseSeries.reduce(function(c,f){return Math.min(c,f.xData?f.xData[0]:c)},c)};f.prototype.modifyNavigatorAxisExtremes=function(){var c=this.xAxis,e;"undefined"!==typeof c.getExtremes&&(!(e=this.getUnionExtremes(!0))|| e.dataMin===c.min&&e.dataMax===c.max||(c.min=e.dataMin,c.max=e.dataMax))};f.prototype.modifyBaseAxisExtremes=function(){var c=this.chart.navigator,e=this.getExtremes(),f=e.dataMin,m=e.dataMax;e=e.max-e.min;var k=c.stickToMin,a=c.stickToMax,b=L(this.options.overscroll,0),d=c.series&&c.series[0],u=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(k){var t=f;var h=t+e}a&&(h=m+b,k||(t=Math.max(f,h-e,c.getBaseSeriesMin(d&&d.xData?d.xData[0]:-Number.MAX_VALUE)))); u&&(k||a)&&M(t)&&(this.min=this.userMin=t,this.max=this.userMax=h)}c.stickToMin=c.stickToMax=null};f.prototype.updatedDataHandler=function(){var c=this.chart.navigator,e=this.navigatorSeries;c.stickToMax=c.reversedExtremes?0===Math.round(c.zoomedMin):Math.round(c.zoomedMax)>=Math.round(c.size);c.stickToMin=c.shouldStickToMin(this,c);e&&!c.hasNavigatorData&&(e.options.pointStart=this.xData[0],e.setData(this.options.data,!1,null,!1))};f.prototype.shouldStickToMin=function(c,e){e=e.getBaseSeriesMin(c.xData[0]); var f=c.xAxis;c=f.max;var m=f.min;f=f.options.range;var k=!0;M(c)&&M(m)&&(k=f&&0k||y-p[p.length-1]>k)&&(h=!0)}else a.options.overscroll&&(2===u?B=p[1]-p[0]:1===u?(B=a.options.overscroll,p=[p[0],p[0]+B]):B=d.overscrollPointsRange);h||a.forceOrdinal?(a.options.overscroll&&(d.overscrollPointsRange=B,p=p.concat(d.getOverscrollPositions())),d.positions=p,k=a.ordinal2lin(Math.max(E,p[0]),!0),G=Math.max(a.ordinal2lin(Math.min(y,p[p.length-1]),!0),1),d.slope=y=(y-E)/(G-k),d.offset=E-k*y):(d.overscrollPointsRange=b(a.closestPointRange,d.overscrollPointsRange),d.positions=a.ordinal.slope= d.offset=void 0)}a.isOrdinal=q&&h;d.groupIntervalFactor=null};a.prototype.getExtendedPositions=function(){var a=this,b=a.axis,d=b.constructor.prototype,C=b.chart,h=b.series[0].currentDataGrouping,q=a.index,E=h?h.count+h.unitName:"raw",y=b.options.overscroll,G=b.getExtremes(),l;q||(q=a.index={});if(!q[E]){var B={series:[],chart:C,forceOrdinal:!1,getExtremes:function(){return{min:G.dataMin,max:G.dataMax+y}},getGroupPixelWidth:d.getGroupPixelWidth,getTimeTicks:d.getTimeTicks,options:{ordinal:!0},ordinal:{getGroupIntervalFactor:this.getGroupIntervalFactor}, ordinal2lin:d.ordinal2lin,val2lin:d.val2lin};B.ordinal.axis=B;b.series.forEach(function(b){l={xAxis:B,xData:b.xData.slice(),chart:C,destroyGroupedData:x.noop,getProcessedData:r.prototype.getProcessedData};l.xData=l.xData.concat(a.getOverscrollPositions());l.options={dataGrouping:h?{enabled:!0,forced:!0,approximation:"open",units:[[h.unitName,[h.count]]]}:{enabled:!1}};B.series.push(l);b.processData.apply(l);l.closestPointRange!==l.basePointRange&&l.currentDataGrouping&&(B.forceOrdinal=!0)});b.ordinal.beforeSetTickPositions.apply({axis:B}); q[E]=B.ordinal.positions}return q[E]};a.prototype.getGroupIntervalFactor=function(a,b,d){d=d.processedXData;var g=d.length,h=[];var q=this.groupIntervalFactor;if(!q){for(q=0;qy.length||"undefined"===typeof b)return c.getTimeTicks.apply(c,arguments);var z=y.length;for(q=0;qg;y[q]5*l||K){if(y[q]>m){for(t=c.getTimeTicks(a,y[h],y[q],E);t.length&&t[0]<=m;)t.shift();t.length&&(m=t[t.length-1]);e.push(k.length);k=k.concat(t)}h=q+1}if(K)break}if(t){t=t.info;if(p&&t.unitRange<=F.hour){q=k.length-1;for(h=1;hg?t-1:t;for(c=void 0;h--;)q=G[h],t=Math.abs(c-q),c&&t<.8*f&&(null===e||t<.8*e)?(u[k[h]]&&!u[k[h+1]]?(t=h+1,c=q):t=h,k.splice(t,1)):c=q}return k};p.lin2val=function(a,b){var d=this.ordinal,h=d.positions;if(h){var y=d.slope,g=d.offset;d=h.length-1;var l=void 0;if(b)0>a?a=h[0]:a>d?a=h[d]: (d=Math.floor(a),l=a-d);else for(;d--;)if(b=y*d+g,a>=b){y=y*(d+1)+g;l=(a-b)/(y-b);break}return"undefined"!==typeof l&&"undefined"!==typeof h[d]?h[d]+(l?l*(h[d+1]-h[d]):0):a}return a};p.val2lin=function(a,b){var d=this.ordinal,h=d.positions;if(h){var g=h.length,l,p=void 0;for(l=g;l--;)if(h[l]===a){p=l;break}for(l=g-1;l--;)if(a>h[l]||0===l){a=(a-h[l])/(h[l+1]-h[l]);p=l+a;break}b=b?p:d.slope*(p||0)+d.offset}else b=a;return b};p.ordinal2lin=p.val2lin;H(b,"afterInit",function(){this.ordinal||(this.ordinal= new a.Composition(this))});H(b,"foundExtremes",function(){this.isXAxis&&D(this.options.overscroll)&&this.max===this.dataMax&&(!this.chart.mouseIsDown||this.isInternal)&&(!this.eventArgs||this.eventArgs&&"navigator"!==this.eventArgs.trigger)&&(this.max+=this.options.overscroll,!this.isInternal&&D(this.userMin)&&(this.min+=this.options.overscroll))});H(b,"afterSetScale",function(){this.horiz&&!this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)}); H(b,"initialAxisTranslation",function(){this.ordinal&&(this.ordinal.beforeSetTickPositions(),this.tickInterval=this.ordinal.postProcessTickInterval(this.tickInterval))});H(g,"pan",function(a){var b=this.xAxis[0],d=b.options.overscroll,g=a.originalEvent.chartX,y=this.options.chart.panning,l=!1;if(y&&"y"!==y.type&&b.options.ordinal&&b.series.length){var p=this.mouseDownX,B=b.getExtremes(),n=B.dataMax,t=B.min,u=B.max,k=void 0;k=this.hoverPoints;var m=b.closestPointRange||b.ordinal&&b.ordinal.overscrollPointsRange; p=(p-g)/(b.translationSlope*(b.ordinal.slope||m));m={ordinal:{positions:b.ordinal.getExtendedPositions()}};var f=void 0,c=void 0,e=b.lin2val,z=b.val2lin,K=void 0;m.ordinal.positions?1p?(c=m,K=b.ordinal.positions?b:m):(c=b.ordinal.positions?b:m,K=m),f=K.ordinal.positions,n>f[f.length-1]&&f.push(n),this.fixedRange=u-t,k=b.navigatorAxis.toFixedRange(null,null,e.apply(c,[z.apply(c,[t,!0])+p,!0]),e.apply(K,[z.apply(K,[u,!0])+p,!0])),k.min>=Math.min(B.dataMin, t)&&k.max<=Math.max(n,u)+d&&b.setExtremes(k.min,k.max,!0,!1,{trigger:"pan"}),this.mouseDownX=g,w(this.container,{cursor:"move"})):l=!0}else l=!0;l||y&&/y/.test(y.type)?d&&(b.max=b.dataMax+d):a.preventDefault()});H(l,"updatedData",function(){var a=this.xAxis;a&&a.options.ordinal&&delete a.ordinal.index})}})(l||(l={}));l.compose(a,v,r);return l});I(a,"Core/Axis/BrokenAxis.js",[a["Core/Axis/Axis.js"],a["Core/Series/Series.js"],a["Extensions/Stacking.js"],a["Core/Utilities.js"]],function(a,v,x,r){var n= r.addEvent,H=r.find,w=r.fireEvent,D=r.isArray,d=r.isNumber,b=r.pick,F;(function(l){function A(){"undefined"!==typeof this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)}function F(){this.brokenAxis&&this.brokenAxis.hasBreaks&&(this.options.ordinal=!1)}function r(){var a=this.brokenAxis;if(a&&a.hasBreaks){for(var b=this.tickPositions,d=this.tickPositions.info,h=[],g=0;gc.to||q>c.from&&uc.from&&uc.from&&u>c.to&&uh&&b>=this.basePointRange&&(h=b),l=void 0;g--;)l&&!1!==l.visible||(l=a[g+1]),b=a[g],!1!==l.visible&&!1!==b.visible&&(l.x-b.x>h&&(l=(b.x+l.x)/2,a.splice(g+1,0,{isNull:!0,x:l}),d.stacking&&this.options.stacking&&(l=d.stacking.stacks[this.stackKey][l]=new x(d,d.options.stackLabels,!1,l,this.stack),l.total=0)),l=b);return this.getGraphPath(a)}l.compose=function(a,b){if(-1===a.keepProps.indexOf("brokenAxis")){a.keepProps.push("brokenAxis"); var d=v.prototype;d.drawBreaks=C;d.gappedPath=h;n(a,"init",g);n(a,"afterInit",A);n(a,"afterSetTickPositions",r);n(a,"afterSetOptions",F);n(b,"afterGeneratePoints",O);n(b,"afterRender",p)}return a};var q=function(){function h(a){this.hasBreaks=!1;this.axis=a}h.isInBreak=function(a,b){var d=a.repeat||Infinity,h=a.from,g=a.to-a.from;b=b>=h?(b-h)%d:d-(h-b)%d;return a.inclusive?b<=g:b=a)break;else l.to=a)break;else if(h.isInBreak(q,a)){g-=a-q.from;break}}return g};h.prototype.findBreakAt=function(a,b){return H(b,function(b){return b.frome;)N-=c;for(;N=k[0]);D++);for(D;D<=g;D++){for(;"undefined"!==typeof k[F+1]&&a[D]>=k[F+1]||D===g;){var r=k[F];f.dataGroupInfo={start:w?B:f.cropStart+B,length:t[0].length};var x=m.apply(f,t);f.pointClass&&!J(f.dataGroupInfo.options)&&(f.dataGroupInfo.options=C(f.pointClass.prototype.optionsToObject.call({series:f},f.options.data[f.cropStart+B])),A.forEach(function(c){delete f.dataGroupInfo.options[c]}));"undefined"!==typeof x&&(d.push(r),h.push(x),u.push(f.dataGroupInfo)); B=D;for(r=0;r=a[0]){w=this.groupMap[0].start;C=this.groupMap[0].length;var x=void 0;p(w)&&p(C)&&(x=w+(C-1));a[0]={middle:a[0]+.5*A,end:a[0]+A,firstPoint:this.xData[0],lastPoint:x&&this.xData[x]}[B]}r&&"start"!==r&&A&&a[D]>=n-A&&(n=this.groupMap[this.groupMap.length-1].start,a[D]={middle:a[D]+.5*A,end:a[D]+A,firstPoint:n&&this.xData[n],lastPoint:this.xData[this.xData.length-1]}[r])}for(n=1;ne.max){if(!J(e.options.max)&&p(e.dataMax)&&e.max>=e.dataMax||e.max===e.dataMax)e.max=Math.max(m[m.length-1],e.max);e.dataMax=Math.max(m[m.length-1],e.dataMax)}}b.groupAll&&(b=this.cropData(d, l,e.min,e.max,1),d=b.xData,l=b.yData,this.cropStart=b.start);this.processedXData=d;this.processedYData=l}else this.groupMap=null;this.hasGroupedData=f;this.currentDataGrouping=n;this.preventGraphAnimation=(c&&c.totalRange)!==(n&&n.totalRange)}};F.destroyGroupedData=function(){this.groupedData&&(this.groupedData.forEach(function(a,b){a&&(this.groupedData[b]=a.destroy?a.destroy():null)},this),this.groupedData.length=0)};F.generatePoints=function(){G.apply(this);this.destroyGroupedData();this.groupedData= this.hasGroupedData?this.points:null};x(n,"update",function(){if(this.dataGroup)return g(24,!1,this.series.chart),!1});x(w,"headerFormatter",function(a){var d=this.chart,k=d.time,m=a.labelConfig,f=m.series,c=f.tooltipOptions,e=f.options.dataGrouping,h=c.xDateFormat,g=f.xAxis,l=c[(a.isFooter?"footer":"header")+"Format"];if(g&&"datetime"===g.options.type&&e&&p(m.key)){var q=f.currentDataGrouping;e=e.dateTimeLabelFormats||M.dateTimeLabelFormats;if(q)if(c=e[q.unitName],1===q.count)h=c[0];else{h=c[1]; var t=c[2]}else!h&&e&&(h=this.getXDateFormat(m,c,g));h=k.dateFormat(h,m.key);t&&(h+=k.dateFormat(t,m.key+q.totalRange-1));f.chart.styledMode&&(l=this.styledModeFormat(l));a.text=b(l,{point:O(m.point,{key:h}),series:f},d);a.preventDefault()}});x(H,"destroy",F.destroyGroupedData);x(H,"afterSetOptions",function(a){a=a.options;var b=this.type,k=this.chart.options.plotOptions,m=D.defaultOptions.plotOptions[b].dataGrouping,f=this.useCommonDataGrouping&&M;if(B[b]||f){m||(m=C(M,B[b]));var c=this.chart.rangeSelector; a.dataGrouping=C(f,m,k.series&&k.series.dataGrouping,k[b].dataGrouping,this.userOptions.dataGrouping,!a.isInternal&&c&&p(c.selected)&&c.buttonOptions[c.selected].dataGrouping)}});x(a,"afterSetScale",function(){this.series.forEach(function(a){a.hasProcessed=!1})});a.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,k,m=0,f=!1,c;for(k=b;k--;)(c=a[k].options.dataGrouping)&&(m=Math.max(m,h(c.groupPixelWidth,M.groupPixelWidth)));for(k=b;k--;)(c=a[k].options.dataGrouping)&&a[k].hasProcessed&& (b=(a[k].processedXData||a[k].data).length,a[k].groupPixelWidth||b>this.chart.plotSizeX/m||b&&c.forced)&&(f=!0);return f?m:0};a.prototype.setDataGrouping=function(b,d){var k;d=h(d,!0);b||(b={forced:!1,units:null});if(this instanceof a)for(k=this.series.length;k--;)this.series[k].update({dataGrouping:b},!1);else this.chart.options.series.forEach(function(a){a.dataGrouping=b},!1);this.ordinal&&(this.ordinal.slope=void 0);d&&this.chart.redraw()};r.dataGrouping=E;"";return E});I(a,"Series/OHLC/OHLCPoint.js", [a["Core/Series/SeriesRegistry.js"]],function(a){var v=this&&this.__extends||function(){var a=function(r,n){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var r in n)n.hasOwnProperty(r)&&(a[r]=n[r])};return a(r,n)};return function(r,n){function v(){this.constructor=r}a(r,n);r.prototype=null===n?Object.create(n):(v.prototype=n.prototype,new v)}}();return function(a){function r(){var n=null!==a&&a.apply(this,arguments)||this;n.close=void 0;n.high= void 0;n.low=void 0;n.open=void 0;n.options=void 0;n.plotClose=void 0;n.plotOpen=void 0;n.series=void 0;return n}v(r,a);r.prototype.getClassName=function(){return a.prototype.getClassName.call(this)+(this.open\u25cf {series.name}
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
'}, threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0});return d}(n);H(x.prototype,{animate:null,directTouch:!1,pointArrayMap:["open","high","low","close"],pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointValKey:"close"});x.prototype.pointClass=a;v.registerSeriesType("ohlc",x);"";return x});I(a,"Series/Candlestick/CandlestickSeries.js",[a["Core/DefaultOptions.js"],a["Core/Color/Palette.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,v,x,r){var n= this&&this.__extends||function(){var a=function(b,d){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d])};return a(b,d)};return function(b,d){function l(){this.constructor=b}a(b,d);b.prototype=null===d?Object.create(d):(l.prototype=d.prototype,new l)}}(),H=a.defaultOptions;a=x.seriesTypes;var w=a.column,D=a.ohlc,d=r.merge;r=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.data= void 0;b.options=void 0;b.points=void 0;return b}n(b,a);b.prototype.pointAttribs=function(a,b){var d=w.prototype.pointAttribs.call(this,a,b),l=this.options,g=a.openl)break}}}n.forEach(function(b,d){b.plotX+=q;if("undefined"=== typeof b.plotY||p)0<=b.plotX&&b.plotX<=C.len?p?(b.plotY=C.translate(b.x,0,1,0,1),b.plotX=H(b.y)?h.translate(b.y,0,0,0,1):0):b.plotY=(C.opposite?0:a.yAxis.len)+C.offset:b.shapeArgs={};if((v=n[d-1])&&v.plotX===b.plotX){"undefined"===typeof v.stackIndex&&(v.stackIndex=0);var g=v.stackIndex+1}b.stackIndex=g});this.onSeries=x}}});I(a,"Series/Flags/FlagsSymbols.js",[a["Core/Renderer/RendererRegistry.js"],a["Core/Renderer/SVG/SVGRenderer.js"]],function(a,v){function x(a){r[a+"pin"]=function(n,w,v,d,b){var x= b&&b.anchorX;b=b&&b.anchorY;"circle"===a&&d>v&&(n-=Math.round((d-v)/2),v=d);var l=r[a](n,w,v,d);if(x&&b){var A=x;"circle"===a?A=n+v/2:(n=l[0],v=l[1],"M"===n[0]&&"L"===v[0]&&(A=(n[1]+v[1])/2));l.push(["M",A,w>b?w:w+d],["L",x,b]);l=l.concat(r.circle(x-1,b-1,2,2))}return l}}var r=v.prototype.symbols;r.flag=function(a,v,w,x,d){var b=d&&d.anchorX||a;d=d&&d.anchorY||v;var n=r.circle(b-1,d-1,2,2);n.push(["M",b,d],["L",a,v+x],["L",a,v],["L",a+w,v],["L",a+w,v+x],["L",a,v+x],["Z"]);return n};x("circle");x("square"); a=a.getRendererType();a!==v&&(a.prototype.symbols.circlepin=r.circlepin,a.prototype.symbols.flag=r.flag,a.prototype.symbols.squarepin=r.squarepin);return r});I(a,"Series/Flags/FlagsSeries.js",[a["Series/Flags/FlagsPoint.js"],a["Core/Globals.js"],a["Mixins/OnSeries.js"],a["Core/Color/Palette.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Renderer/SVG/SVGElement.js"],a["Core/Utilities.js"]],function(a,v,x,r,n,H,w){var D=this&&this.__extends||function(){var a=function(b,d){a=Object.setPrototypeOf|| {__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d])};return a(b,d)};return function(b,d){function h(){this.constructor=b}a(b,d);b.prototype=null===d?Object.create(d):(h.prototype=d.prototype,new h)}}(),d=v.noop,b=n.series,F=n.seriesTypes.column,l=w.addEvent,A=w.defined,I=w.extend,J=w.merge,g=w.objectEach,O=w.wrap;w=function(a){function d(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0; return b}D(d,a);d.prototype.animate=function(a){a&&this.setClip()};d.prototype.drawPoints=function(){var a=this.points,b=this.chart,d=b.renderer,l=b.inverted,n=this.options,p=n.y,r,w=this.yAxis,t={},u=[];for(r=a.length;r--;){var k=a[r];var m=(l?k.plotY:k.plotX)>this.xAxis.len;var f=k.plotX;var c=k.stackIndex;var e=k.options.shape||n.shape;var z=k.plotY;"undefined"!==typeof z&&(z=k.plotY+p-("undefined"!==typeof c&&c*n.stackDistance));k.anchorX=c?void 0:k.plotX;var K=c?void 0:k.plotY;var x="flag"!== e;c=k.graphic;"undefined"!==typeof z&&0<=f&&!m?(c&&k.hasNewShapeType()&&(c=c.destroy()),c||(c=k.graphic=d.label("",null,null,e,null,null,n.useHTML).addClass("highcharts-point").add(this.markerGroup),k.graphic.div&&(k.graphic.div.point=k),c.isNew=!0),c.attr({align:x?"center":"left",width:n.width,height:n.height,"text-align":n.textAlign}),b.styledMode||c.attr(this.pointAttribs(k)).css(J(n.style,k.style)).shadow(n.shadow),0n-l,y=k=864E5*{month:28,year:365}[m]*g-w&&e-36E5<=864E5* {month:31,year:366}[m]*g+w?k=!0:"ytd"===m?(k=p-u+w===e,N=!b):"all"===m&&(k=c.max-c.min>=n-l,B=!b&&r&&k);m=!t&&(x||y||B||h);g=b&&k||k&&!r&&!N||b&&a.frozenStates;m?K=3:g&&(r=!0,K=2);z.state!==K&&(z.setState(K),d&&(d.options[f+1].disabled=m,2===K&&(d.selectedIndex=f+1)),0===K&&q===f&&a.setSelected())})};u.prototype.computeButtonRange=function(a){var b=a.type,d=a.count||1,c={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(c[b])a._range=c[b]*d;else if("month"===b||"year"===b)a._range= 864E5*{month:30,year:365}[b]*d;a._offsetMin=y(a.offsetMin,0);a._offsetMax=y(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin};u.prototype.getInputValue=function(a){a="min"===a?this.minInput:this.maxInput;var b=this.chart.options.rangeSelector,d=this.chart.time;return a?("text"===a.type&&b.inputDateParser||this.defaultInputDateParser)(a.value,d.useUTC,d):0};u.prototype.setInputValue=function(a,b){var d=this.options,c=this.chart.time,e="min"===a?this.minInput:this.maxInput;a="min"===a?this.minDateBox: this.maxDateBox;if(e){var m=e.getAttribute("data-hc-time");m=A(m)?Number(m):void 0;A(b)&&(A(m)&&e.setAttribute("data-hc-time-previous",m),e.setAttribute("data-hc-time",b),m=b);e.value=c.dateFormat(this.inputTypeFormats[e.type]||d.inputEditDateFormat,m);a&&a.attr({text:c.dateFormat(d.inputDateFormat,m)})}};u.prototype.setInputExtremes=function(a,b,d){if(a="min"===a?this.minInput:this.maxInput){var c=this.inputTypeFormats[a.type],e=this.chart.time;c&&(b=e.dateFormat(c,b),a.min!==b&&(a.min=b),d=e.dateFormat(c, d),a.max!==d&&(a.max=d))}};u.prototype.showInput=function(a){var b="min"===a?this.minDateBox:this.maxDateBox;if((a="min"===a?this.minInput:this.maxInput)&&b&&this.inputGroup){var d="text"===a.type,c=this.inputGroup,e=c.translateX;c=c.translateY;var k=this.options.inputBoxWidth;l(a,{width:d?b.width+(k?-2:20)+"px":"auto",height:d?b.height-2+"px":"auto",border:"2px solid silver"});d&&k?l(a,{left:e+b.x+"px",top:c+"px"}):l(a,{left:Math.min(Math.round(b.x+e-(a.offsetWidth-b.width)/2),this.chart.chartWidth- a.offsetWidth)+"px",top:c-(a.offsetHeight-b.height)/2+"px"})}};u.prototype.hideInput=function(a){(a="min"===a?this.minInput:this.maxInput)&&l(a,{top:"-9999em",border:0,width:"1px",height:"1px"})};u.prototype.defaultInputDateParser=function(a,b,d){var c=a.split("/").join("-").split(" ").join("T");-1===c.indexOf("T")&&(c+="T00:00");if(b)c+="Z";else{var e;if(e=x.isSafari)e=c,e=!(6=e?"+"+E(-e)+":00":"-"+E(e)+":00")}c=Date.parse(c);C(c)||(a=a.split("-"),c=Date.UTC(G(a[0]),G(a[1])-1,G(a[2])));d&&b&&C(c)&&(c+=d.getTimezoneOffset(c));return c};u.prototype.drawInput=function(a){function b(){var b=k.getInputValue(a),c=f.xAxis[0],d=f.scroller&&f.scroller.xAxis?f.scroller.xAxis:c,e=d.dataMin;d=d.dataMax;var m=k.maxInput,g=k.minInput;b!==Number(v.getAttribute("data-hc-time-previous"))&&C(b)&&(v.setAttribute("data-hc-time-previous",b),r&&m&&C(e)?b>Number(m.getAttribute("data-hc-time"))? b=void 0:bd&&(b=d)),"undefined"!==typeof b&&c.setExtremes(r?b:c.min,r?c.max:b,void 0,void 0,{trigger:"rangeSelectorInput"}))}var f=this.chart,c=this.div,e=this.inputGroup,k=this,u=f.renderer.style||{},p=f.renderer,q=f.options.rangeSelector,r="min"===a,t=d.lang[r?"rangeSelectorFrom":"rangeSelectorTo"];t=p.label(t,0).addClass("highcharts-range-label").attr({padding:t?2:0,height:t?q.inputBoxHeight:0}).add(e);p=p.label("",0).addClass("highcharts-range-input").attr({padding:2, width:q.inputBoxWidth,height:q.inputBoxHeight,"text-align":"center"}).on("click",function(){k.showInput(a);k[a+"Input"].focus()});f.styledMode||p.attr({stroke:q.inputBoxBorderColor,"stroke-width":1});p.add(e);var v=F("input",{name:a,className:"highcharts-range-selector"},void 0,c);v.setAttribute("type",D(q.inputDateFormat||"%b %e, %Y"));f.styledMode||(t.css(h(u,q.labelStyle)),p.css(h({color:n.neutralColor80},u,q.inputStyle)),l(v,g({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)", width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:u.fontSize,fontFamily:u.fontFamily,top:"-9999em"},q.inputStyle)));v.onfocus=function(){k.showInput(a)};v.onblur=function(){v===x.doc.activeElement&&b();k.hideInput(a);k.setInputValue(a);v.blur()};var w=!1;v.onchange=function(){w||(b(),k.hideInput(a),v.blur())};v.onkeypress=function(a){13===a.keyCode&&b()};v.onkeydown=function(a){w=!0;38!==a.keyCode&&40!==a.keyCode||b()};v.onkeyup=function(){w=!1};return{dateBox:p,input:v,label:t}};u.prototype.getPosition= function(){var a=this.chart,b=a.options.rangeSelector;a="top"===b.verticalAlign?a.plotTop-a.axisOffset[0]:0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}};u.prototype.getYTDExtremes=function(a,b,d){var c=this.chart.time,e=new c.Date(a),f=c.get("FullYear",e);d=d?c.Date.UTC(f,0,1):+new c.Date(f,0,1);b=Math.max(b,d);e=e.getTime();return{max:Math.min(a||e,e),min:b}};u.prototype.render=function(a,b){var d=this.chart,c=d.renderer,e=d.container,m=d.options,k=m.rangeSelector,g=y(m.chart.style&& m.chart.style.zIndex,0)+1;m=k.inputEnabled;if(!1!==k.enabled){this.rendered||(this.group=c.g("range-selector-group").attr({zIndex:7}).add(),this.div=F("div",void 0,{position:"relative",height:0,zIndex:g}),this.buttonOptions.length&&this.renderButtons(),e.parentNode&&e.parentNode.insertBefore(this.div,e),m&&(this.inputGroup=c.g("input-group").add(this.group),c=this.drawInput("min"),this.minDateBox=c.dateBox,this.minLabel=c.label,this.minInput=c.input,c=this.drawInput("max"),this.maxDateBox=c.dateBox, this.maxLabel=c.label,this.maxInput=c.input));if(m&&(this.setInputValue("min",a),this.setInputValue("max",b),a=d.scroller&&d.scroller.getUnionExtremes()||d.xAxis[0]||{},A(a.dataMin)&&A(a.dataMax)&&(d=d.xAxis[0].minRange||0,this.setInputExtremes("min",a.dataMin,Math.min(a.dataMax,this.getInputValue("max"))-d),this.setInputExtremes("max",Math.max(a.dataMin,this.getInputValue("min"))+d,a.dataMax)),this.inputGroup)){var h=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(function(a){if(a){var b= a.getBBox().width;b&&(a.attr({x:h}),h+=b+k.inputSpacing)}})}this.alignElements();this.rendered=!0}};u.prototype.renderButtons=function(){var a=this,m=this.buttons,f=this.options,c=d.lang,e=this.chart.renderer,g=h(f.buttonTheme),l=g&&g.states,n=g.width||28;delete g.width;delete g.states;this.buttonGroup=e.g("range-selector-buttons").add(this.group);var u=this.dropdown=F("select",void 0,{position:"absolute",width:"1px",height:"1px",padding:0,border:0,top:"-9999em",cursor:"pointer",opacity:.0001},this.div); b(u,"touchstart",function(){u.style.fontSize="16px"});[[x.isMS?"mouseover":"mouseenter"],[x.isMS?"mouseout":"mouseleave"],["change","click"]].forEach(function(c){var d=c[0],e=c[1];b(u,d,function(){var b=m[a.currentButtonIndex()];b&&p(b.element,e||d)})});this.zoomText=e.label(c&&c.rangeSelectorZoom||"",0).attr({padding:f.buttonTheme.padding,height:f.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup);this.chart.styledMode||(this.zoomText.css(f.labelStyle),g["stroke-width"]=y(g["stroke-width"], 0));F("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,u);this.buttonOptions.forEach(function(b,c){F("option",{textContent:b.title||b.text},void 0,u);m[c]=e.button(b.text,0,0,function(d){var e=b.events&&b.events.click,f;e&&(f=e.call(b,d));!1!==f&&a.clickButton(c);a.isActive=!0},g,l&&l.hover,l&&l.select,l&&l.disabled).attr({"text-align":"center",width:n}).add(a.buttonGroup);b.title&&m[c].attr("title",b.title)})};u.prototype.alignElements=function(){var a=this,b=this.buttonGroup,d=this.buttons, c=this.chart,e=this.group,g=this.inputGroup,h=this.options,l=this.zoomText,n=c.options,u=n.exporting&&!1!==n.exporting.enabled&&n.navigation&&n.navigation.buttonOptions;n=h.buttonPosition;var p=h.inputPosition,q=h.verticalAlign,r=function(b,d){return u&&a.titleCollision(c)&&"top"===q&&"right"===d.align&&d.y-b.getBBox().height-12<(u.y||0)+(u.height||0)+c.spacing[0]?-40:0},t=c.plotLeft;if(e&&n&&p){var v=n.x-c.spacing[3];if(b){this.positionButtons();if(!this.initialButtonGroupWidth){var w=0;l&&(w+=l.getBBox().width+ 5);d.forEach(function(a,b){w+=a.width;b!==d.length-1&&(w+=h.buttonSpacing)});this.initialButtonGroupWidth=w}t-=c.spacing[3];this.updateButtonStates();l=r(b,n);this.alignButtonGroup(l);e.placed=b.placed=c.hasLoaded}b=0;g&&(b=r(g,p),"left"===p.align?v=t:"right"===p.align&&(v=-Math.max(c.axisOffset[1],-b)),g.align({y:p.y,width:g.getBBox().width,align:p.align,x:p.x+v-2},!0,c.spacingBox),g.placed=c.hasLoaded);this.handleCollision(b);e.align({verticalAlign:q},!0,c.spacingBox);g=e.alignAttr.translateY;b= e.getBBox().height+20;r=0;"bottom"===q&&(r=(r=c.legend&&c.legend.options)&&"bottom"===r.verticalAlign&&r.enabled&&!r.floating?c.legend.legendHeight+y(r.margin,10):0,b=b+r-20,r=g-b-(h.floating?0:h.y)-(c.titleOffset?c.titleOffset[2]:0)-10);if("top"===q)h.floating&&(r=0),c.titleOffset&&c.titleOffset[0]&&(r=c.titleOffset[0]),r+=c.margin[0]-c.spacing[0]||0;else if("middle"===q)if(p.y===n.y)r=g;else if(p.y||n.y)r=0>p.y||0>n.y?r-Math.min(p.y,n.y):g-b;e.translate(h.x,h.y+Math.floor(r));n=this.minInput;p= this.maxInput;g=this.dropdown;h.inputEnabled&&n&&p&&(n.style.marginTop=e.translateY+"px",p.style.marginTop=e.translateY+"px");g&&(g.style.marginTop=e.translateY+"px")}};u.prototype.alignButtonGroup=function(a,b){var d=this.chart,c=this.buttonGroup,e=this.options.buttonPosition,m=d.plotLeft-d.spacing[3],k=e.x-d.spacing[3];"right"===e.align?k+=a-m:"center"===e.align&&(k-=m/2);c&&c.align({y:e.y,width:y(b,this.initialButtonGroupWidth),align:e.align,x:k},!0,d.spacingBox)};u.prototype.positionButtons=function(){var a= this.buttons,b=this.chart,d=this.options,c=this.zoomText,e=b.hasLoaded?"animate":"attr",g=d.buttonPosition,h=b.plotLeft,l=h;c&&"hidden"!==c.visibility&&(c[e]({x:y(h+g.x,h)}),l+=g.x+c.getBBox().width+5);this.buttonOptions.forEach(function(b,c){if("hidden"!==a[c].visibility)a[c][e]({x:l}),l+=a[c].width+d.buttonSpacing;else a[c][e]({x:h})})};u.prototype.handleCollision=function(a){var b=this,d=this.chart,c=this.buttonGroup,e=this.inputGroup,k=this.options,g=k.buttonPosition,h=k.dropdown,l=k.inputPosition; k=function(){var a=0;b.buttons.forEach(function(b){b=b.getBBox();b.width>a&&(a=b.width)});return a};var n=function(b){if(e&&c){var d=e.alignAttr.translateX+e.alignOptions.x-a+e.getBBox().x+2,f=e.alignOptions.width,m=c.alignAttr.translateX+c.getBBox().x;return m+b>d&&d+f>m&&g.y=-a?0:-a),translateY:e.alignAttr.translateY+c.getBBox().height+10})};if(c){if("always"===h){this.collapseButtons(a); n(k())&&p();return}"never"===h&&this.expandButtons()}e&&c?l.align===g.align||n(this.initialButtonGroupWidth+20)?"responsive"===h?(this.collapseButtons(a),n(k())&&p()):p():"responsive"===h&&this.expandButtons():c&&"responsive"===h&&(this.initialButtonGroupWidth>d.plotWidth?this.collapseButtons(a):this.expandButtons())};u.prototype.collapseButtons=function(a){var b=this.buttons,d=this.buttonOptions,c=this.chart,e=this.dropdown,k=this.options,g=this.zoomText,h=c.userOptions.rangeSelector&&c.userOptions.rangeSelector.buttonTheme|| {},l=function(a){return{text:a?a+" \u25be":"\u25be",width:"auto",paddingLeft:y(k.buttonTheme.paddingLeft,h.padding,8),paddingRight:y(k.buttonTheme.paddingRight,h.padding,8)}};g&&g.hide();var n=!1;d.forEach(function(a,c){c=b[c];2!==c.state?c.hide():(c.show(),c.attr(l(a.text)),n=!0)});n||(e&&(e.selectedIndex=0),b[0].show(),b[0].attr(l(this.zoomText&&this.zoomText.textStr)));d=k.buttonPosition.align;this.positionButtons();"right"!==d&&"center"!==d||this.alignButtonGroup(a,b[this.currentButtonIndex()].getBBox().width); this.showDropdown()};u.prototype.expandButtons=function(){var a=this.buttons,b=this.buttonOptions,d=this.options,c=this.zoomText;this.hideDropdown();c&&c.show();b.forEach(function(b,c){c=a[c];c.show();c.attr({text:b.text,width:d.buttonTheme.width||28,paddingLeft:y(d.buttonTheme.paddingLeft,"unset"),paddingRight:y(d.buttonTheme.paddingRight,"unset")});2>c.state&&c.setState(0)});this.positionButtons()};u.prototype.currentButtonIndex=function(){var a=this.dropdown;return a&&0e&&0>c||0h+c.width)&&(x?l=p=E(l,h,h+c.width):b=!0);b||q.push(["M",l,n],["L",p,r])}):A.forEach(function(a){var b;l=a.pos;p=l+a.len; n=r=Math.round(k+c.height-D);"pass"!==x&&(nk+c.height)&&(x?n=r=E(n,k,k+c.height):b=!0);b||q.push(["M",l,n],["L",p,r])}));a.path=0y&&q=c&&(w=-(p.translateX+m.width-c));p.attr({x:g+w,y:n,anchorX:h?g:this.opposite?0:d.chartWidth,anchorY:h?this.opposite?d.chartHeight:0:n+m.height/2})}});D.prototype.init=function(){p.apply(this,arguments);this.initCompare(this.options.compare)};D.prototype.setCompare=function(a){this.initCompare(a); this.userOptions.compare=a};D.prototype.initCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,c){var d=this.compareValue;return"undefined"!==typeof b&&"undefined"!==typeof d?(b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b):0}:null;this.chart.hasRendered&&(this.isDirty=!0)};D.prototype.processData=function(a){var b,c=-1,d=!0===this.options.compareStart?0:1;C.apply(this,arguments);if(this.xAxis&&this.processedYData){var g=this.processedXData; var m=this.processedYData;var h=m.length;this.pointArrayMap&&(c=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y"));for(b=0;b=this.xAxis.min&&0!==k){this.compareValue=k;break}}}};a(D,"afterGetExtremes",function(a){a=a.dataExtremes;if(this.modifyValue&&a){var b=[this.modifyValue(a.dataMin),this.modifyValue(a.dataMax)];a.dataMin=q(b);a.dataMax=h(b)}});v.prototype.setCompare=function(a,b){this.isXAxis||(this.series.forEach(function(b){b.setCompare(a)}), u(b,!0)&&this.chart.redraw())};w.prototype.tooltipFormatter=function(a){var b=this.series.chart.numberFormatter;a=a.replace("{point.change}",(0