1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3466],{83078:function(t,e,i){var s=i(85576),a=i(95763);class o extends s.SerialChart{_afterNew(){this._defaultThemes.push(a.PercentDefaultTheme.new(this._root)),super._afterNew(),this.chartContainer.children.push(this.seriesContainer),this.seriesContainer.children.push(this.bulletsContainer)}_processSeries(t){super._processSeries(t),this.seriesContainer.children.moveValue(this.bulletsContainer,this.seriesContainer.children.length-1)}}o.className="PercentChart",o.classNames=s.SerialChart.classNames.concat([o.className]),e.PercentChart=o},95763:function(t,e,i){var s=i(51364),a=i(16755),o=i(31459),l=i(9561);class r extends s.Theme{setupDefaultRules(){super.setupDefaultRules();let t=this._root.interfaceColors,e=this.rule.bind(this);e("PercentSeries").setAll({legendLabelText:"{category}",legendValueText:"{valuePercentTotal.formatNumber('0.00p')}",colors:o.ColorSet.new(this._root,{}),width:a.p100,height:a.p100}),e("PieChart").setAll({radius:a.percent(80),startAngle:-90,endAngle:270}),e("PieSeries").setAll({alignLabels:!0,startAngle:-90,endAngle:270}),e("PieSeries").states.create("hidden",{endAngle:-90,opacity:0}),e("Slice",["pie"]).setAll({position:"absolute",isMeasured:!1,x:0,y:0,toggleKey:"active",tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}",strokeWidth:1,strokeOpacity:1,role:"figure",lineJoin:"round"}),e("Slice",["pie"]).states.create("active",{shiftRadius:20,scale:1}),e("Slice",["pie"]).states.create("hoverActive",{scale:1.04}),e("Slice",["pie"]).states.create("hover",{scale:1.04}),e("RadialLabel",["pie"]).setAll({textType:"aligned",radius:10,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",paddingTop:5,paddingBottom:5,populateText:!0}),e("Tick",["pie"]).setAll({location:1}),e("SlicedChart").setAll({paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10}),e("FunnelSeries").setAll({startLocation:0,endLocation:1,orientation:"vertical",alignLabels:!0,sequencedInterpolation:!0}),e("FunnelSlice").setAll({interactive:!0,expandDistance:0}),e("FunnelSlice").states.create("hover",{expandDistance:.15}),e("Label",["funnel"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:a.p50}),e("Label",["funnel","horizontal"]).setAll({centerX:0,centerY:a.p50,rotation:-90}),e("Label",["funnel","vertical"]).setAll({centerY:a.p50,centerX:0}),e("Tick",["funnel"]).setAll({location:1}),e("FunnelSlice",["funnel","link"]).setAll({fillOpacity:.5,strokeOpacity:0,expandDistance:-.1}),e("FunnelSlice",["funnel","link","vertical"]).setAll({height:10}),e("FunnelSlice",["funnel","link","horizontal"]).setAll({width:10}),e("PyramidSeries").setAll({valueIs:"area"}),e("FunnelSlice",["pyramid","link"]).setAll({fillOpacity:.5}),e("FunnelSlice",["pyramid","link","vertical"]).setAll({height:0}),e("FunnelSlice",["pyramid","link","horizontal"]).setAll({width:0}),e("FunnelSlice",["pyramid"]).setAll({interactive:!0,expandDistance:0}),e("FunnelSlice",["pyramid"]).states.create("hover",{expandDistance:.15}),e("Label",["pyramid"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:a.p50}),e("Label",["pyramid","horizontal"]).setAll({centerX:0,centerY:a.p50,rotation:-90}),e("Label",["pyramid","vertical"]).setAll({centerY:a.p50,centerX:0}),e("Tick",["pyramid"]).setAll({location:1}),e("FunnelSlice",["pictorial"]).setAll({interactive:!0,tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}"}),e("Label",["pictorial"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:a.p50}),e("Label",["pictorial","horizontal"]).setAll({centerX:0,centerY:a.p50,rotation:-90}),e("Label",["pictorial","vertical"]).setAll({centerY:a.p50,centerX:0}),e("FunnelSlice",["pictorial","link"]).setAll({fillOpacity:.5,width:0,height:0}),e("Tick",["pictorial"]).setAll({location:.5});{let i=e("Graphics",["pictorial","background"]);i.setAll({fillOpacity:.2}),l.setColor(i,"fill",t,"alternativeBackground")}}}e.PercentDefaultTheme=r},78386:function(t,e,i){var s=i(63884),a=i(50153),o=i(31284),l=i(56340),r=i(73226),n=i(229);class h extends a.Series{constructor(){super(...arguments),this.slice
1sContainer=this.children.push(o.Container.new(this._root,{position:"absolute",isMeasured:!1})),this.labelsContainer=this.children.push(o.Container.new(this._root,{position:"absolute",isMeasured:!1})),this.ticksContainer=this.children.push(o.Container.new(this._root,{position:"absolute",isMeasured:!1})),this._lLabels=[],this._rLabels=[],this._hLabels=[],this.slices=this.addDisposer(this._makeSlices()),this.labels=this.addDisposer(this._makeLabels()),this.ticks=this.addDisposer(this._makeTicks())}_applyThemes(t=!1){let e=this.get("colors");return e&&e.reset(),super._applyThemes(t)}makeSlice(t){let e=this.slicesContainer.children.push(this.slices.make());return e.on("fill",()=>{this.updateLegendMarker(t)}),e.on("fillPattern",()=>{this.updateLegendMarker(t)}),e.on("stroke",()=>{this.updateLegendMarker(t)}),e._setDataItem(t),this._linkSprite(e,t),t.set("slice",e),this.slices.push(e),e}makeLabel(t){let e=this.labelsContainer.children.push(this.labels.make());return e._setDataItem(t),t.set("label",e),this.labels.push(e),e}_shouldMakeBullet(t){return null!=t.get("value")}makeTick(t){let e=this.ticksContainer.children.push(this.ticks.make());return e._setDataItem(t),t.set("tick",e),this.ticks.push(e),e}_afterNew(){this.fields.push("category","fill"),super._afterNew()}_placeBulletsContainer(){this.children.moveValue(this.bulletsContainer)}_onDataClear(){let t=this.get("colors");t&&t.reset();let e=this.get("patterns");e&&e.reset()}_prepareChildren(){if(super._prepareChildren(),this._lLabels=[],this._rLabels=[],this._hLabels=[],this._valuesDirty){let t=0,e=0,i=0,s=1/0,a=0;r.each(this._dataItems,i=>{let s=i.get("valueWorking",0);t+=s,e+=Math.abs(s)}),r.each(this._dataItems,t=>{let o=t.get("valueWorking",0);o>i&&(i=o),o<s&&(s=o),a++;let l=o/e;0==e&&(l=0),t.setRaw("valuePercentTotal",100*l)}),this.setPrivateRaw("valueLow",s),this.setPrivateRaw("valueHigh",i),this.setPrivateRaw("valueSum",t),this.setPrivateRaw("valueAverage",t/a),this.setPrivateRaw("valueAbsoluteSum",e)}}show(t){let e=Object.create(null,{show:{get:()=>super.show}});return s.__awaiter(this,void 0,void 0,function*(){let i=[];i.push(e.show.call(this,t)),i.push(this._sequencedShowHide(!0,t)),yield Promise.all(i)})}hide(t){let e=Object.create(null,{hide:{get:()=>super.hide}});return s.__awaiter(this,void 0,void 0,function*(){let i=[];i.push(e.hide.call(this,t)),i.push(this._sequencedShowHide(!1,t)),yield Promise.all(i)})}_updateChildren(){super._updateChildren(),this._valuesDirty&&r.each(this._dataItems,t=>{t.get("label").text.markDirtyText()}),(this.isDirty("legendLabelText")||this.isDirty("legendValueText"))&&r.each(this._dataItems,t=>{this.updateLegendValue(t)}),this._arrange()}_arrange(){this._arrangeDown(this._lLabels),this._arrangeUp(this._lLabels),this._arrangeDown(this._rLabels),this._arrangeUp(this._rLabels),this._arrangeLeft(this._hLabels),this._arrangeRight(this._hLabels),r.each(this.dataItems,t=>{this._updateTick(t)})}_afterChanged(){super._afterChanged(),this._arrange()}processDataItem(t){if(super.processDataItem(t),null==t.get("fill")){let e=this.get("colors");e&&t.setRaw("fill",e.next())}if(null==t.get("fillPattern")){let e=this.get("patterns");e&&t.setRaw("fillPattern",e.next())}}showDataItem(t,e){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return s.__awaiter(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,t,e)];n.isNumber(e)||(e=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing"),o=t.get("value"),l=t.animate({key:"valueWorking",to:o,duration:e,easing:a});l&&s.push(l.waitForStop());let r=t.get("tick");r&&s.push(r.show(e));let h=t.get("label");h&&s.push(h.show(e));let d=t.get("slice");d&&s.push(d.show(e)),d.get("active")&&d.states.applyAnimate("active"),yield Promise.all(s)})}hideDataItem(t,e){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return s.__awaiter(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,t,e)],a=this.states.create("hidden",{});n.isNumber(e)||(e=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let o=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),l=t.animate({key:"valueWorking",to:0,duration:e,easing:o});l&&s.push(l.waitForStop());let r=t.get("tick");r&&s.push(r.hide(e));let h=t.get("label");h&&s.push(h.hide(e));let d=t.get("slice");d.hideTooltip(),d&&s.push(d.hide(e)),yield Promise.all(s)})}disposeDataItem(t){super.disposeDataItem(t);let e=t.get("label");e&&(this.labels.removeValue(e),e.dispose());let i=t.get("tick");i&&(this.ticks.removeValue(i),i.dispose());let s=t.get("slice");
1s&&(this.slices.removeValue(s),s.dispose())}hoverDataItem(t){let e=t.get("slice");e&&!e.isHidden()&&e.hover()}unhoverDataItem(t){let e=t.get("slice");e&&e.unhover()}updateLegendMarker(t){if(t){let e=t.get("slice");if(e){let i=t.get("legendDataItem");if(i){let t=i.get("markerRectangle");r.each(l.visualSettings,i=>{null!=e.get(i)&&t.set(i,e.get(i))})}}}}_arrangeDown(t){if(t){let e=this._getNextDown();t.sort((t,e)=>t.y>e.y?1:t.y<e.y?-1:0),r.each(t,t=>{let i=t.label.adjustedLocalBounds(),s=i.top;t.y+s<e&&(t.y=e-s),t.label.set("y",t.y),e=t.y+i.bottom})}}_getNextUp(){return this.labelsContainer.maxHeight()}_getNextDown(){return 0}_arrangeUp(t){if(t){let e=this._getNextUp();t.sort((t,e)=>t.y<e.y?1:t.y>e.y?-1:0),r.each(t,t=>{let i=t.label.adjustedLocalBounds(),s=i.bottom;t.y+s>e&&(t.y=e-s),t.label.set("y",t.y),e=t.y+i.top})}}_arrangeRight(t){if(t){let e=0;t.sort((t,e)=>t.y>e.y?1:t.y<e.y?-1:0),r.each(t,t=>{let i=t.label.adjustedLocalBounds(),s=i.left;t.y+s<e&&(t.y=e-s),t.label._setC("x",t.y),e=t.y+i.right})}}_arrangeLeft(t){if(t){let e=this.labelsContainer.maxWidth();t.sort((t,e)=>t.y<e.y?1:t.y>e.y?-1:0),r.each(t,t=>{let i=t.label.adjustedLocalBounds(),s=i.right;t.y+s>e&&(t.y=e-s),t.label._setC("x",t.y),e=t.y+i.left})}}_updateSize(){super._updateSize(),this.markDirty()}_updateTick(t){}_dispose(){super._dispose();let t=this.chart;t&&t.series.removeValue(this)}}h.className="PercentSeries",h.classNames=a.Series.classNames.concat([h.className]),e.PercentSeries=h},86373:function(t,e,i){var s=i(16755),a=i(83078),o=i(45140),l=i(11433);class r extends a.PercentChart{constructor(){super(...arguments),this._maxRadius=1}_afterNew(){super._afterNew(),this.seriesContainer.setAll({x:s.p50,y:s.p50})}_processSeries(t){super._processSeries(t),this.series.each(t=>{t._markDirtyKey("innerRadius")})}_prepareChildren(){super._prepareChildren();let t=this.chartContainer,e=t.innerWidth(),i=t.innerHeight(),a=this.get("startAngle",0),r=this.get("endAngle",0),n=this.get("innerRadius"),h=l.getArcBounds(0,0,a,r,1),d=e/(h.right-h.left),g=i/(h.bottom-h.top),u={left:0,right:0,top:0,bottom:0};if(n instanceof s.Percent){let t=n.value,s=Math.min(d,g);t=Math.max(s*t,s-Math.min(i,e))/s,u=l.getArcBounds(0,0,a,r,t),this.setPrivateRaw("irModifyer",t/n.value)}h=l.mergeBounds([h,u]);let c=this._maxRadius;this._maxRadius=Math.min(d,g);let p=o.relativeToValue(this.get("radius",0),this._maxRadius);this.seriesContainer.setAll({dy:-p*(h.bottom+h.top)/2,dx:-p*(h.right+h.left)/2}),(this.isDirty("startAngle")||this.isDirty("endAngle")||c!=this._maxRadius)&&this.series.each(t=>{t._markDirtyKey("startAngle")}),(this.isDirty("innerRadius")||this.isDirty("radius"))&&this.series.each(t=>{t._markDirtyKey("innerRadius")})}radius(t){let e=o.relativeToValue(this.get("radius",0),this._maxRadius),i=o.relativeToValue(this.get("innerRadius",0),e);if(t){let s=this.series.indexOf(t),a=this.series.length,l=t.get("radius");return null!=l?i+o.relativeToValue(l,e-i):i+(e-i)/a*(s+1)}return e}innerRadius(t){let e=this.radius(),i=o.relativeToValue(this.get("innerRadius",0),e);if(i<0&&(i=e+i),t){let s=this.series.indexOf(t),a=this.series.length,l=t.get("innerRadius");return null!=l?i+o.relativeToValue(l,e-i):i+(e-i)/a*s}return i}_updateSize(){super._updateSize(),this.markDirtyKey("radius")}}r.className="PieChart",r.classNames=a.PercentChart.classNames.concat([r.className]),e.PieChart=r},91009:function(t,e,i){var s=i(78386),a=i(20856),o=i(88937),l=i(32590),r=i(73225),n=i(99446),h=i(16755),d=i(73226),g=i(11433),u=i(45140);class c extends s.PercentSeries{_makeSlices(){return new n.ListTemplate(a.Template.new({}),()=>o.Slice._new(this._root,{themeTags:u.mergeTags(this.slices.template.get("themeTags",[]),["pie","series"])},[this.slices.template]))}_makeLabels(){return new n.ListTemplate(a.Template.new({}),()=>r.RadialLabel._new(this._root,{themeTags:u.mergeTags(this.labels.template.get("themeTags",[]),["pie","series"])},[this.labels.template]))}_makeTicks(){return new n.ListTemplate(a.Template.new({}),()=>l.Tick._new(this._root,{themeTags:u.mergeTags(this.ticks.template.get("themeTags",[]),["pie","series"])},[this.ticks.template]))}processDataItem(t){super.processDataItem(t);let e=this.makeSlice(t);e.on("scale",()=>{this._updateTick(t)}),e.on("shiftRadius",()=>{this._updateTick(t)}),e.events.on("positionchanged",()=>{this._updateTick(t)});let i=this.makeLabel(t);i.events.on("positionchanged",()=>{this._updateTick(t)}),this.makeTick(t),e.events.on("positionchanged",()=>{i.markDirty()})}_getNextUp(){let t=this.chart;return t?t._maxRadius:this.labelsContainer.maxHeight()/2}_getNextDown(){let t=this.chart;return t?-t._maxRadius:-this.labelsContainer.maxHeight()/2}_prepareChildren(){super._prepareChildren();let t=this.chart;if(t){if(this.isDirty("alignLabels")){let t=this.labels.template;if(this.get("alignLabels"))t._setC("textType","aligned");else{let e=t.get("textType");null!=e&&"aligned"!=e||t._setC("textType","adjusted")}}
1if(this._valuesDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")||this.isDirty("alignLabels")){this.markDirtyBounds();let e=this.get("startAngle",t.get("startAngle",-90)),i=this.get("endAngle",t.get("endAngle",270))-e,s=e,a=t.radius(this);this.setPrivateRaw("radius",a);let o=t.innerRadius(this)*t.getPrivate("irModifyer",1);o<0&&(o=a+o),d.each(this._dataItems,t=>{this.updateLegendValue(t);let e=i*t.get("valuePercentTotal")/100,l=t.get("slice");if(l){l.set("radius",a),l.set("innerRadius",o),l.set("startAngle",s),l.set("arc",e);let i=t.get("fill");l._setDefault("fill",i),l._setDefault("stroke",i);let r=t.get("fillPattern");l._setDefault("fillPattern",r)}let r=g.normalizeAngle(s+e/2),n=t.get("label");if(n&&(n.setPrivate("radius",a),n.setPrivate("innerRadius",o),n.set("labelAngle",r),"aligned"==n.get("textType"))){let t=a+n.get("radius",0),e=a*g.sin(r);r>90&&r<=270?(n.isHidden()||n.isHiding()||this._lLabels.push({label:n,y:e}),t*=-1,t-=this.labelsContainer.get("paddingLeft",0),n.set("centerX",h.p100),n.setPrivateRaw("left",!0)):(n.isHidden()||n.isHiding()||this._rLabels.push({label:n,y:e}),t+=this.labelsContainer.get("paddingRight",0),n.set("centerX",0),n.setPrivateRaw("left",!1)),n.set("x",t),n.set("y",a*g.sin(r))}s+=e,this._updateTick(t)})}}}_updateTick(t){let e=t.get("tick"),i=t.get("label"),s=t.get("slice"),a=e.get("location",1);if(e&&i&&s){let t=(s.get("shiftRadius",0)+s.get("radius",0))*s.get("scale",1)*a,o=i.get("labelAngle",0),l=g.cos(o),r=g.sin(o),n=this.labelsContainer,h=n.get("paddingLeft",0),d=n.get("paddingRight",0),u=0,c=0;u=i.x(),c=i.y();let p=[];if(0!=u||0!=c){if("circular"==i.get("textType")){let t=i.radius()-i.get("paddingBottom",0),e=i.get("labelAngle",0);u=t*g.cos(e),c=t*g.sin(e)}let e=-d;i.getPrivate("left")&&(e=h),p=[{x:s.x()+t*l,y:s.y()+t*r},{x:u+e,y:c},{x:u,y:c}]}e.set("points",p)}}_positionBullet(t){let e=t.get("sprite");if(e){let i=e.dataItem.get("slice");if(i){let s=i.get("innerRadius",0),a=i.get("radius",0),o=i.get("startAngle",0)+i.get("arc",0)*t.get("locationX",.5),l=s+(a-s)*t.get("locationY",.5);e.setAll({x:g.cos(o)*l,y:g.sin(o)*l})}}}}c.className="PieSeries",c.classNames=s.PercentSeries.classNames.concat([c.className]),e.PieSeries=c},19705:function(t,e,i){var s=i(59513),a=i(31284),o=i(54320),l=i(85576),r=i(99446),n=i(16755),h=i(57828),d=i(56340),g=i(73226),u=i(229),c=i(78256),p=i(16644),m=i(45140),_=i(11433);class x extends l.SerialChart{constructor(){super(...arguments),this.xAxes=new r.ListAutoDispose,this.yAxes=new r.ListAutoDispose,this.topAxesContainer=this.chartContainer.children.push(a.Container.new(this._root,{width:n.p100,layout:this._root.verticalLayout})._markC("width","layout")),this.yAxesAndPlotContainer=this.chartContainer.children.push(a.Container.new(this._root,{width:n.p100,height:n.p100,layout:this._root.horizontalLayout})._markC("width","height","layout")),this.bottomAxesContainer=this.chartContainer.children.push(a.Container.new(this._root,{width:n.p100,layout:this._root.verticalLayout})._markC("width","layout")),this.leftAxesContainer=this.yAxesAndPlotContainer.children.push(a.Container.new(this._root,{height:n.p100,layout:this._root.horizontalLayout})._markC("height","layout")),this.plotsContainer=this.yAxesAndPlotContainer.children.push(a.Container.new(this._root,{width:n.p100,height:n.p100,maskContent:!1})._markC("width","height","maskContent")),this.plotContainer=this.plotsContainer.children.push(a.Container.new(this._root,{width:n.p100,height:n.p100})._markC("width","height")),this.topPlotContainer=this.plotsContainer.children.push(a.Container.new(this._root,{width:n.p100,height:n.p100})._markC("width","height")),this.gridContainer=this.plotContainer.children.push(a.Container.new(this._root,{width:n.p100,height:n.p100,isMeasured:!1})._markC("width","height","isMeasured")),this.topGridContainer=a.Container.new(this._root,{width:n.p100,height:n.p100,isMeasured:!1})._markC("width","height","isMeasured"),this.rightAxesContainer=this.yAxesAndPlotContainer.children.push(a.Container.new(this._root,{height:n.p100,layout:this._root.horizontalLayout})._markC("height","layout")),this.axisHeadersContainer=this.plotContainer.children.push(a.Container.new(this._root,{})),this.zoomOutButton=this.topPlotContainer.children.push(h.Button.new(this._root,{themeTags:["zoom"],icon:d.Graphics.new(this._root,{themeTags:["button","icon"]})})),this._movePoint={x:0,y:0},this._movePoints={}}_afterNew(){this._defaultThemes.push(s.XYChartDefaultTheme.new(this._root)),super._afterNew(),this._disposers.push(this.xAxes),this._disposers.push(this.yAxes);let t=this._root,e=this._root.verticalLayout,i=this.zoomOutButton;i.events.on("click",()=>{this.zoomOut()}),i.hide(0),i.states.lookup("default")._setC("opacity",1),this.chartContainer.set("layout",e);let a=this.plotContainer;a.children.push(this.seriesContainer),this._disposers.push(this._processAxis(this.xAxes,this.bottomAxesContainer)),this._disposers.push(this._processAxis(this.yAxes,this.leftAxesContainer)),a.children.push(this.topGridContainer),a.children.push(this.bulletsContainer),a._setC("interactive",!0),a._setC("interactiveChildren",!1),a._setC("background",o.Rectangle.new(t,{themeTags:["plotbackground","xy","background"]}
1)._markC("themeTags")),this._disposers.push(a.events.on("pointerdown",t=>{this._handlePlotDown(t)})),this._disposers.push(a.events.on("globalpointerup",t=>{this._handlePlotUp(t)})),this._disposers.push(a.events.on("globalpointermove",t=>{this._handlePlotMove(t)})),this._maskGrid(),this._setUpTouch()}_beforeChanged(){super._beforeChanged(),(this.isDirty("pinchZoomX")||this.isDirty("pinchZoomY")||this.get("panX")||this.get("panY"))&&this._setUpTouch()}_setUpTouch(){this.plotContainer._display.cancelTouch||(this.plotContainer._display.cancelTouch=!!(this.get("pinchZoomX")||this.get("pinchZoomY")||this.get("panX")||this.get("panY")))}_maskGrid(){this.gridContainer.set("maskContent",!0),this.topGridContainer.set("maskContent",!0)}_removeSeries(t){t._unstack(),t._posXDp&&t._posXDp.dispose(),t._posYDp&&t._posYDp.dispose(),t.set("baseAxis",void 0);let e=t.get("xAxis");e&&(g.remove(e.series,t),e.markDirtyExtremes());let i=t.get("yAxis");i&&(g.remove(i.series,t),i.markDirtyExtremes());let s=this.get("cursor");if(s){let e=s.get("snapToSeries");e&&g.remove(e,t)}super._removeSeries(t)}_applyThemes(t=!1){let e=this.get("colors");e&&e.reset();let i=super._applyThemes(t);return this.series.each(t=>{this._colorize(t)}),i}handleWheel(t){let e=this.get("wheelX"),i=this.get("wheelY"),s=this.plotContainer,a=t.originalEvent,o=!1;if(!m.isLocalEvent(a,this))return;o=!0;let l=s.toLocal(t.point),r=this.get("wheelStep",.2),n=a.deltaY/100,h=a.deltaX/100,d=this.get("wheelZoomPositionX"),g=this.get("wheelZoomPositionY");"zoomX"!==e&&"zoomXY"!==e||0==h||this.xAxes.each(t=>{if(t.get("zoomX")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(l.x/s.width());null!=d&&(a=d);let n=t.get("maxDeviation",0),g=Math.min(1+n,Math.max(-n,e-r*(i-e)*h*a)),u=Math.max(-n,Math.min(1+n,i+r*(i-e)*h*(1-a)));g==e&&u==i&&(o=!1),1/(u-g)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(g,u)):o=!1}}),"zoomX"!==i&&"zoomXY"!==i||0==n||this.xAxes.each(t=>{if(t.get("zoomX")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(l.x/s.width());null!=d&&(a=d);let h=t.get("maxDeviation",0),g=Math.min(1+h,Math.max(-h,e-r*(i-e)*n*a)),u=Math.max(-h,Math.min(1+h,i+r*(i-e)*n*(1-a)));g==e&&u==i&&(o=!1),1/(u-g)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(g,u)):o=!1}}),"zoomY"!==e&&"zoomXY"!==e||0==h||this.yAxes.each(t=>{if(t.get("zoomY")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(l.y/s.height());null!=g&&(a=g);let n=t.get("maxDeviation",0),d=Math.min(1+n,Math.max(-n,e-r*(i-e)*h*a)),u=Math.max(-n,Math.min(1+n,i+r*(i-e)*h*(1-a)));d==e&&u==i&&(o=!1),1/(u-d)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(d,u)):o=!1}}),"zoomY"!==i&&"zoomXY"!==i||0==n||this.yAxes.each(t=>{if(t.get("zoomY")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(l.y/s.height());null!=g&&(a=g);let h=t.get("maxDeviation",0),d=Math.min(1+h,Math.max(-h,e-r*(i-e)*n*a)),u=Math.max(-h,Math.min(1+h,i+r*(i-e)*n*(1-a)));d==e&&u==i&&(o=!1),1/(u-d)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(d,u)):o=!1}}),"panX"!==e&&"panXY"!==e||0==h||this.xAxes.each(t=>{if(t.get("panX")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*h,a=e+s,l=i+s,n=this._fixWheel(a,l);a=n[0],l=n[1],a==e&&l==i&&(o=!1),this._handleWheelAnimation(t.zoom(a,l))}}),"panX"!==i&&"panXY"!==i||0==n||this.xAxes.each(t=>{if(t.get("panX")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*n,a=e+s,l=i+s,h=this._fixWheel(a,l);a=h[0],l=h[1],a==e&&l==i&&(o=!1),this._handleWheelAnimation(t.zoom(a,l))}}),"panY"!==e&&"panXY"!==e||0==h||this.yAxes.each(t=>{if(t.get("panY")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*h,a=e+s,l=i+s,n=this._fixWheel(a,l);a=n[0],l=n[1],a==e&&l==i&&(o=!1),this._handleWheelAnimation(t.zoom(a,l))}}),"panY"!==i&&"panXY"!==i||0==n||this.yAxes.each(t=>{if(t.get("panY")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*n,a=e-s,l=i-s,h=this._fixWheel(a,l);a=h[0],l=h[1],a==e&&l==i&&(o=!1),this._handleWheelAnimation(t.zoom(a,l))}}),o&&a.preventDefault()}_handleSetWheel(){let t=this.get("wheelX"),e=this.get("wheelY"),i=this.plotContainer;"none"!==t||"none"!==e?(this._wheelDp=i.events.on("wheel",i=>{let s=i.originalEvent;("none"!==t&&0!=Math.abs(s.deltaX)||"none"!==e&&0!=Math.abs(s.deltaY))&&this.handleWheel(i)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_getWheelSign(t){let e=1;return t.get("renderer").get("inversed")&&(e=-1),e}_fixWheel(t,e){let i=e-t;return t<0&&(e=(t=0)+i),e>1&&(t=(e=1)-i),[t,e]}_handlePlotDown(t){let e=t.originalEvent;if(2==e.button)return;let i=this.plotContainer,s=i.toLocal(t.point);if((this.get("pinchZoomX")||this.get("pinchZoomY"))&&e.pointerId&&p.keys(i._downPoints).length>0){let t=this.xAxes.getIndex(0),e=this.yAxes.getIndex(0);t&&(this._downStartX=t.get("start",0),this._downEndX=t.get("end",1)),e&&(this._downStartY=e.get("start",0),this._downEndY=e.get("end",1))}if((this.get("panX")||this.get("panY"))&&s.x>=0&&s.y>=0&&s.x<=i.width()&&s.y<=this.height()){this._downPoint={x:e.clientX,y:e.clientY};let i=this.get("panX"),s=this.get("panY");i&&this.xAxes.each(t=>{t._panStart=t.get("start"),t._panEnd=t.get("end")}),s&&this.yAxes.each(t=>{t._panStart=t.get("start"),t._panEnd=t.get("end")});let a="panstarted";this.events.isEnabled(a)&&this.events.dispatch(a,{type:a,target:this,originalEvent:t.originalEvent})}}_handleWheelAnimation(t){t?t.events.on("stopped",()=>{this._dispatchWheelAnimation()}):this._dispatchWheelAnimation()}_dispatchWheelAnimation(){let t="wheelended";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}_handlePlotUp(t){let e=this._downPoint;if(e&&(this.get("panX")||this.get("panY"))){if(t.originalEvent.clientX==e.x&&t.originalEvent.clientY==e.y){let e="pancancelled";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent})}let i="panended";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,originalEvent:t.originalEvent})}this._downPoint=void 0,this.xAxes.each(t=>{t._isPanning=!1}),this.yAxes.each(t=>{t._isPanning=!1})}_handlePlotMove(t){let e=this.plotContainer;if(this.get("pinchZoomX")||this.get("pinchZoomY")){let i=t.originalEvent.pointerId;if(i&&(this._movePoints[i]=t.point,p.keys(e._downPoints).length>1))return void this._handlePinch()}let i=this._downPoint;
1if(i){i=e.toLocal(this._root.documentPointToRoot(i));let s=e.toLocal(t.point),a=this.get("panX"),o=this.get("panY");if(a){let t=this.get("scrollbarX");t&&t.events.disableType("rangechanged"),this.xAxes.each(t=>{if(t.get("panX")){t._isPanning=!0;let a=t._panStart,o=t._panEnd,l=(o-a)*(i.x-s.x)/e.width();t.get("renderer").get("inversed")&&(l*=-1);let r=a+l,n=o+l;n-r<1+2*t.get("maxDeviation",1)&&(t.set("start",r),t.set("end",n))}}),t&&t.events.enableType("rangechanged")}if(o){let t=this.get("scrollbarY");t&&t.events.disableType("rangechanged"),this.yAxes.each(t=>{if(t.get("panY")){t._isPanning=!0;let a=t._panStart,o=t._panEnd,l=(o-a)*(i.y-s.y)/e.height();t.get("renderer").get("inversed")&&(l*=-1);let r=a-l,n=o-l;n-r<1+2*t.get("maxDeviation",1)&&(t.set("start",r),t.set("end",n))}}),t&&t.events.enableType("rangechanged")}}}_handlePinch(){let t=this.plotContainer,e=0,i=[],s=[];if(p.each(t._downPoints,(t,a)=>{i[e]=a;let o=this._movePoints[t];o&&(s[e]=o),e++}),i.length>1&&s.length>1){let e=t.width(),a=t.height(),o=i[0],l=i[1],r=s[0],n=s[1];if(o&&l&&r&&n){if(r=t.toLocal(r),n=t.toLocal(n),o=t.toLocal(o),l=t.toLocal(l),this.get("pinchZoomX")){let t=this._downStartX,i=this._downEndX;if(null!=t&&null!=i){o.x>l.x&&([o,l]=[l,o],[r,n]=[n,r]);let s=t+o.x/e*(i-t),a=t+l.x/e*(i-t),h=t+r.x/e*(i-t),d=t+n.x/e*(i-t),g=Math.max(.001,a-s)/Math.max(.001,d-h),u=t*g+s-h*g,c=i*g+a-d*g;this.xAxes.each(t=>{let e=t.fixPosition(u),i=t.fixPosition(c);t.zoom(e,i,0)})}}if(this.get("pinchZoomY")){let t=this._downStartY,e=this._downEndY;if(null!=t&&null!=e){o.y<l.y&&([o,l]=[l,o],[r,n]=[n,r]);let i=t+(1-o.y/a)*(e-t),s=t+(1-l.y/a)*(e-t),h=t+(1-r.y/a)*(e-t),d=t+(1-n.y/a)*(e-t),g=Math.max(.001,s-i)/Math.max(.001,d-h),u=t*g+i-h*g,c=e*g+s-d*g;this.yAxes.each(t=>{let e=t.fixPosition(u),i=t.fixPosition(c);t.zoom(e,i,0)})}}}}}_handleCursorPosition(){let t=this.get("cursor");if(t){let e=t.getPrivate("point"),i=t.get("snapToSeries");if(t._downPoint&&(i=void 0),i&&e){let s=t.get("snapToSeriesBy"),a=[];g.each(i,t=>{if(!t.isHidden()&&!t.isHiding()){if("x!"!=s&&"y!"!=s){let e=t.startIndex(),i=t.endIndex();for(let s=e;s<i;s++){let e=t.dataItems[s];e&&!e.isHidden()&&a.push(e)}}else{let e=t.get("tooltipDataItem");e&&a.push(e)}}});let o,l=1/0;if(g.each(a,t=>{let i=t.get("point");if(i){let a=0;(a="x"==s||"x!"==s?Math.abs(e.x-i.x):"y"==s||"y!"==s?Math.abs(e.y-i.y):Math.hypot(e.x-i.x,e.y-i.y))<l&&(l=a,o=t)}}),g.each(i,t=>{let e=t.get("tooltip");e&&e._setDataItem(void 0)}),o){let e=o.component;e.showDataItemTooltip(o),e.setRaw("tooltipDataItem",o);let i=o.get("point");i&&t.handleMove(e.toGlobal({x:i.x-e.x(),y:i.y-e.y()}),!0)}}}}_updateCursor(){let t=this.get("cursor");t&&t.updateCursor()}_addCursor(t){this.plotContainer.children.push(t)}_prepareChildren(){if(super._prepareChildren(),this.series.each(t=>{this._colorize(t)}),(this.isDirty("wheelX")||this.isDirty("wheelY"))&&this._handleSetWheel(),this.isDirty("cursor")){let t=this._prevSettings.cursor,e=this.get("cursor");e!==t&&(this._disposeProperty("cursor"),t&&t.dispose(),e&&(e._setChart(this),this._addCursor(e),this._pushPropertyDisposer("cursor",e.events.on("selectended",()=>{this._handleCursorSelectEnd()}))),this._prevSettings.cursor=e)}if(this.isDirty("scrollbarX")){let t=this._prevSettings.scrollbarX,e=this.get("scrollbarX");e!==t&&(this._disposeProperty("scrollbarX"),t&&t.dispose(),e&&(this._placeScrollbar("scrollbarX",e,this.topAxesContainer,this.bottomAxesContainer),this._pushPropertyDisposer("scrollbarX",e.events.on("rangechanged",t=>{this._handleScrollbar(this.xAxes,t.start,t.end,t.grip)})),this._pushPropertyDisposer("scrollbarX",e.events.on("released",()=>{this.xAxes.each(t=>{t.get("zoomable")&&this._handleAxisSelection(t)})})),e.setPrivate("positionTextFunction",t=>{let e=this.xAxes.getIndex(0);return e&&e.getTooltipText(t,!1)||""})),this._prevSettings.scrollbarX=e)}if(this.isDirty("scrollbarY")){let t=this._prevSettings.scrollbarY,e=this.get("scrollbarY");e!==t&&(this._disposeProperty("scrollbarY"),t&&t.dispose(),e&&(this._placeScrollbar("scrollbarY",e,this.rightAxesContainer,this.leftAxesContainer,!0),this._pushPropertyDisposer("scrollbarY",e.events.on("rangechanged",t=>{this._handleScrollbar(this.yAxes,t.start,t.end,t.grip)})),this._pushPropertyDisposer("scrollbarY",e.events.on("released",()=>{this.yAxes.each(t=>{t.get("zoomable")&&this._handleAxisSelection(t)})})),e.setPrivate("positionTextFunction",t=>{let e=this.yAxes.getIndex(0);return e&&e.getTooltipText(t,!1)||""})),this._prevSettings.scrollbarY=e)}this._handleZoomOut()}_placeScrollbar(t,e,i,s,a){let o=()=>{let t=e.get("opposite"),o=t?s:i,l=o.children,r=t&&a?0:l.length-1;e.parent==o&&l.indexOf(e)==r||(e.removePrivate("x"),e.removePrivate("y"),t&&a?l.moveValue(e,0):l.moveValue(e),o.markDirtyBounds(),this._root.events.once("frameended",()=>{this.isDisposed()||this._updateChartLayout()}))};e.parent||o(),this._pushPropertyDisposer(t,e.on("opposite",()=>{let t=e.parent;t!=i&&t!=s||o()}))}_processSeries(t){super._processSeries(t);let e=t.get("xAxis"),i=t.get("yAxis");g.move(e.series,t),g.move(i.series,t),t._posXDp=t.addDisposer(e.events.on("positionchanged",()=>{t._fixPosition()})),t._posYDp=t.addDisposer(i.events.on("positionchanged",()=>{t._fixPosition()}
1)),t.get("baseAxis")||(i.isType("CategoryAxis")||i.isType("DateAxis")?t._setC("baseAxis",i):t._setC("baseAxis",e)),t.get("stacked")&&(t._markDirtyKey("stacked"),g.each(t.dataItems,t=>{t.set("stackToItemY",void 0),t.set("stackToItemX",void 0)})),t._markDirtyAxes(),i.markDirtyExtremes(),e.markDirtyExtremes(),e._seriesAdded=!0,i._seriesAdded=!0,this._colorize(t)}_colorize(t){let e=this.get("colors");if(e&&null==t.get("fill")){let i=e.next();t._setSoft("stroke",i),t._setSoft("fill",i)}let i=this.get("patterns");if(i&&null==t.get("fillPattern")){let e=i.next();t._setSoft("fillPattern",e)}let s=this.get("strokeWidths"),a=this.get("strokeDasharrays");if(s||a){let e=t.strokes;if(e&&e.template){let i=this.series.indexOf(t);s&&s.length>0&&e.template._setC("strokeWidth",s[i%s.length]),a&&a.length>0&&e.template._setC("strokeDasharray",a[i%a.length])}}}_handleCursorSelectEnd(){let t=this.get("cursor"),e=t.get("behavior"),i=t.getPrivate("downPositionX",0),s=t.getPrivate("downPositionY",0),a=Math.min(1,Math.max(0,t.getPrivate("positionX",.5))),o=Math.min(1,Math.max(0,t.getPrivate("positionY",.5)));this.xAxes.each(t=>{if("zoomX"===e||"zoomXY"===e){let e=t.toAxisPosition(i),s=t.toAxisPosition(a);t.zoom(e,s)}t.setPrivate("updateScrollbar",!0)}),this.yAxes.each(t=>{if("zoomY"===e||"zoomXY"===e){let e=t.toAxisPosition(s),i=t.toAxisPosition(o);t.zoom(e,i)}t.setPrivate("updateScrollbar",!0)})}_handleScrollbar(t,e,i,s){t.each(t=>{let a=t.fixPosition(e),o=t.fixPosition(i),l=t.zoom(a,o,void 0,s),r="updateScrollbar";t.setPrivateRaw(r,!1),l?l.events.on("stopped",()=>{t.setPrivateRaw(r,!0)}):t.setPrivateRaw(r,!0)})}_processAxis(t,e){return t.events.onAll(t=>{if("clear"===t.type)g.each(t.oldValues,t=>{this._removeAxis(t)});else if("push"===t.type)e.children.push(t.newValue),t.newValue.processChart(this);else if("setIndex"===t.type)e.children.setIndex(t.index,t.newValue),t.newValue.processChart(this);else if("insertIndex"===t.type)e.children.insertIndex(t.index,t.newValue),t.newValue.processChart(this);else if("removeIndex"===t.type)this._removeAxis(t.oldValue);else{if("moveIndex"!==t.type)throw Error("Unknown IListEvent type");e.children.moveValue(t.value,t.newIndex),t.value.processChart(this)}})}_removeAxis(t){if(!t.isDisposed()){let e=t.parent;e&&e.children.removeValue(t);let i=t.gridContainer,s=i.parent;s&&s.children.removeValue(i);let a=t.topGridContainer,o=a.parent;o&&o.children.removeValue(a)}}_updateChartLayout(){let t=this.leftAxesContainer.width(),e=this.rightAxesContainer.width(),i=this.bottomAxesContainer;i.set("paddingLeft",t),i.set("paddingRight",e);let s=this.topAxesContainer;s.set("paddingLeft",t),s.set("paddingRight",e)}processAxis(t){this.get("cursor")&&(this.addDisposer(t.on("start",()=>{this._updateCursor()})),this.addDisposer(t.on("end",()=>{this._updateCursor()})))}_handleAxisSelection(t,e){let i=t.fixPosition(t.get("start",0)),s=t.fixPosition(t.get("end",1));if(i>s&&([i,s]=[s,i]),-1!=this.xAxes.indexOf(t)){if(e||t.getPrivate("updateScrollbar")){let t=this.get("scrollbarX");!t||t.getPrivate("isBusy")&&!e||(t._setCRaw("start",i),t._setCRaw("end",s),t.updateGrips())}}else if(-1!=this.yAxes.indexOf(t)&&(e||t.getPrivate("updateScrollbar"))){let t=this.get("scrollbarY");!t||t.getPrivate("isBusy")&&!e||(t._setCRaw("start",i),t._setCRaw("end",s),t.updateGrips())}this._handleZoomOut()}_handleZoomOut(){let t=this.zoomOutButton;if(t&&t.parent){let e=!1;this.xAxes.each(t=>{t.get("zoomOut",!0)&&!t._isSynced()&&(0==_.round(t.get("start",0),5)&&1==_.round(t.get("end",1),5)||(e=!0))}),this.yAxes.each(t=>{t.get("zoomOut",!0)&&!t._isSynced()&&(0==_.round(t.get("start",0),5)&&1==_.round(t.get("end",1),5)||(e=!0))}),e?t.isHidden()&&t.show():t.hide()}}inPlot(t){let e=this.plotContainer,i=this.getPrivate("otherCharts",this._otherCharts),s=e.toGlobal(t);if(t.x>=-.5&&t.y>=-.5&&t.x<=e.width()+.5&&t.y<=e.height()+.5)return!0;if(i)for(let t=i.length-1;t>=0;t--){let e=i[t];if(e!=this){let t=e.plotContainer,i=this._root.rootPointToDocument(s),a=e._root.documentPointToRoot(i),o=t.toLocal(a);if(o.x>=-.1&&o.y>=-.1&&o.x<=t.width()+.1&&o.y<=t.height()+.1)return!0}}return!1}arrangeTooltips(){let t=this.plotContainer,e=t.width(),i=t.height(),s=this.height(),a=this._root.tooltipContainer.get("layerMargin");a&&a.bottom>s&&(s=a.bottom);let o=t._display.toGlobal({x:0,y:0}),l=t._display.toGlobal({x:e,y:i}),r=[],h,d,p=0,m=1/0,_=this._movePoint,x=this.get("maxTooltipDistance"),v=this.get("maxTooltipDistanceBy","xy");u.isNumber(x)&&this.series.each(t=>{if(!t.isHidden()){let e=t.get("tooltip");if(e){let i=e.get("pointTo");if(i){let e=Math.hypot(_.x-i.x,_.y-i.y);
1"x"==v?e=Math.abs(_.x-i.x):"y"==v&&(e=Math.abs(_.y-i.y)),e<m&&(m=e,h=t,d=i)}}}});let y=[];if(this.series.each(t=>{let e=t.get("tooltip");if(e&&!e.get("forceHidden")){let i=!1,s=e.get("pointTo");if(s){if(x>=0){let s=e.get("pointTo");if(s&&d&&t!=h){let t=Math.hypot(d.x-s.x,d.y-s.y);"x"==v?t=Math.abs(d.x-s.x):"y"==v&&(t=Math.abs(d.y-s.y)),t>x&&(i=!0)}}else -1==x&&t!=h&&(i=!0);this.inPlot(this._tooltipToLocal(s))&&e.dataItem?i||(p+=s.y):i=!0,i||t.isHidden()||t.isHiding()?e.hide(0):(e.show(),r.push(e),y.push(t))}}}),this.setPrivate("tooltipSeries",y),this.get("arrangeTooltips")){let t=0,e=0,a=this._root.tooltipContainer,h=r.length;if(p/h>i/2+o.y){r.sort((t,e)=>c.compareNumber(e.get("pointTo").y,t.get("pointTo").y));let i=l.y;if(g.each(r,s=>{let r=s.height();e++,t+=r;let h=s.get("centerY");h instanceof n.Percent&&(r*=h.value),r+=s.get("marginBottom",0),s.set("bounds",{left:o.x,top:o.y,right:l.x,bottom:i}),s.setPrivate("customData",{left:o.x,top:o.y,right:l.x,bottom:i}),i=Math.min(i-r,s._fy-r),s.parent==a&&a.children.moveValue(s,0)}),i<0){r.reverse();let t=i;g.each(r,s=>{e++;let a=s.get("bounds");if(a){let e=a.top-i,o=a.bottom-i;e<t&&(o=(e=t)+s.height()),s.set("bounds",{left:a.left,top:e,right:a.right,bottom:o}),t=a.bottom-i+s.get("marginBottom",0)}})}}else{r.reverse(),r.sort((t,e)=>c.compareNumber(t.get("pointTo").y,e.get("pointTo").y));let i=0;if(g.each(r,r=>{e++;let h=r.height();t+=h;let d=r.get("centerY");d instanceof n.Percent&&(h*=d.value),h+=r.get("marginBottom",0),r.set("bounds",{left:o.x,top:i,right:l.x,bottom:Math.max(o.y+s,i+h)}),r.parent==a&&a.children.moveValue(r,0),i=Math.max(i+h,r._fy+h)}),i>s){r.reverse();let t=s;g.each(r,a=>{e++;let o=a.get("bounds");if(o){let e=o.top-(s-i),l=o.bottom-(s-i);l>t&&(e=(l=t)-a.height()),a.set("bounds",{left:o.left,top:e,right:o.right,bottom:l}),t=l-a.height()-a.get("marginBottom",0)}})}}0==t&&e>0&&this._disposers.push(this.root.events.once("frameended",()=>{this.arrangeTooltips()}))}}_tooltipToLocal(t){return this.plotContainer.toLocal(t)}zoomOut(){this.xAxes.each(t=>{t.get("zoomOut",!0)&&!t._isSynced()&&(t.setPrivate("updateScrollbar",!0),t.zoom(0,1))}),this.yAxes.each(t=>{t.get("zoomOut",!0)&&!t._isSynced()&&(t.setPrivate("updateScrollbar",!0),t.zoom(0,1))})}_dispose(){super._dispose();let t=this.get("cursor");t&&t.dispose()}}x.className="XYChart",x.classNames=l.SerialChart.classNames.concat([x.className]),e.XYChart=x},59513:function(t,e,i){var s=i(51364),a=i(16755),o=i(7474),l=i(31459),r=i(9561),n=i(23798),h=i(229),d=i(11433),g=i(16644),u=i(73226);class c extends s.Theme{setupDefaultRules(){super.setupDefaultRules();let t=this._root.interfaceColors,e=this._root.language,i=this.rule.bind(this);i("XYChart").setAll({colors:l.ColorSet.new(this._root,{}),paddingLeft:20,paddingRight:20,paddingTop:16,paddingBottom:16,panX:!1,panY:!1,wheelStep:.25,arrangeTooltips:!0,pinchZoomX:!1,pinchZoomY:!1}),i("XYSeries").setAll({legendLabelText:"{name}"}),i("Rectangle",["plotbackground","xy","background"]).setAll({fill:o.Color.fromHex(0),fillOpacity:0}),i("XYChart",["scrollbar","chart"]).setAll({paddingBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,colors:l.ColorSet.new(this._root,{saturation:0})._markC("saturation")});{let e=i("Graphics",["scrollbar","overlay"]);e.setAll({fillOpacity:.5}),r.setColor(e,"fill",t,"background")}i("RoundedRectangle",["xy","scrollbar","thumb"]).setAll({cornerRadiusTR:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusBL:0,fillOpacity:0,focusable:!0}),i("RoundedRectangle",["xy","scrollbar","thumb"]).states.create("hover",{fillOpacity:.4}),i("RoundedRectangle",["xy","scrollbar","chart","background"]).setAll({cornerRadiusTL:0,cornerRadiusBL:0,
1cornerRadiusTR:0,cornerRadiusBR:0}),i("RoundedRectangle",["xy","scrollbar","chart","background","resize","button"]).setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),i("AxisRendererX",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0}),i("AxisRendererY",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0,minGridDistance:5}),i("AxisLabel",["xy","scrollbar","x"]).setAll({opacity:.5,centerY:a.p100,minPosition:.01,maxPosition:.99,fontSize:"0.8em"}),i("AxisLabel",["category"]).setAll({text:"{category}",populateText:!0}),i("AxisLabel",["x"]).setAll({centerY:0}),i("AxisLabel",["x","inside"]).setAll({centerY:a.p100}),i("AxisLabel",["x","inside","opposite"]).setAll({centerY:0}),i("AxisLabel",["x","opposite"]).setAll({centerY:a.p100}),i("AxisLabel",["y"]).setAll({centerX:a.p100}),i("AxisLabel",["y","inside"]).setAll({centerX:0}),i("AxisLabel",["y","inside","opposite"]).setAll({centerX:a.p100}),i("AxisLabel",["y","opposite"]).setAll({centerX:0}),i("AxisLabel",["minor"]).setAll({fontSize:"0.6em"}),i("AxisLabel",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","x"]).setAll({opacity:.5}
1),i("XYCursor").setAll({behavior:"none",layer:30,exportable:!1,snapToSeriesBy:"xy",moveThreshold:1});{let s=i("Grid",["cursor","x"]);s.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:e.translate("Use left and right arrows to move selection")}),r.setColor(s,"stroke",t,"alternativeBackground")}{let s=i("Grid",["cursor","y"]);s.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:e.translate("Use up and down arrows to move selection")}),r.setColor(s,"stroke",t,"alternativeBackground")}{let e=i("Graphics",["cursor","selection"]);e.setAll({fillOpacity:.15}),r.setColor(e,"fill",t,"alternativeBackground")}i("Axis").setAll({zoomOut:!0,start:0,end:1,minZoomCount:1,maxZoomCount:1/0,maxZoomFactor:1e3,maxDeviation:.1,snapTooltip:!0,tooltipLocation:.5,panX:!0,panY:!0,zoomX:!0,zoomY:!0,fixAxisSize:!0}),i("AxisLabel").setAll({location:.5,multiLocation:0,centerX:a.p50,centerY:a.p50,paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5}),i("Container",["axis","header"]).setAll({layer:30}),i("Rectangle",["axis","header","background"]).setAll({crisp:!0});{let e=i("AxisRenderer");e.setAll({crisp:!0,strokeOpacity:0}),r.setColor(e,"stroke",t,"grid")}i("AxisRendererX").setAll({minGridDistance:120,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,width:a.p100}),i("AxisRendererY").setAll({minGridDistance:40,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,height:a.p100});{let e=i("Rectangle",["axis","thumb","zoomgrip"]);e.setAll({fillOpacity:0}),r.setColor(e,"fill",t,"alternativeBackground"),e.states.create("hover",{fillOpacity:.1})}i("Rectangle",["axis","thumb","x","zoomgrip"]).setAll({cursorOverStyle:"ew-resize"}),i("Rectangle",["axis","thumb","y","zoomgrip"]).setAll({cursorOverStyle:"ns-resize"});{let e=i("Grid");e.setAll({location:0,strokeOpacity:.15,crisp:!0}),r.setColor(e,"stroke",t,"grid")}{let e=i("Grid",["minor"]);e.setAll({location:0,strokeOpacity:.07,crisp:!0}),r.setColor(e,"stroke",t,"grid")}i("Grid",["base"]).setAll({strokeOpacity:.3});{let e=i("Graphics",["axis","fill"]);e.setAll({visible:!1,isMeasured:!1,position:"absolute",fillOpacity:.05}),r.setColor(e,"fill",t,"alternativeBackground")}i("Graphics",["axis","fill","range"]).setAll({isMeasured:!0}),i("Graphics",["series","fill","range"]).setAll({visible:!1,isMeasured:!0}),i("Grid",["series","range"]).setAll({visible:!1}),i("AxisTick",["series","range"]).setAll({visible:!1}),i("AxisLabel",["series","range"]).setAll({visible:!1});{let e=i("AxisTick");e.setAll({location:.5,multiLocation:0,strokeOpacity:1,isMeasured:!1,position:"absolute",visible:!1}),r.setColor(e,"stroke",t,"grid")}i("CategoryAxis").setAll({startLocation:0,endLocation:1,fillRule:(t,e)=>{let i=t.get("axisFill");i&&(h.isNumber(e)&&e%2!=0?i.setPrivate("visible",!1):i.setPrivate("visible",!0))}});let s=[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:5},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:50},{timeUnit:"millisecond",count:100},{timeUnit:"millisecond",count:500},{timeUnit:"second",count:1},{timeUnit:"second",count:5},{timeUnit:"second",count:10},{timeUnit:"second",count:30},{timeUnit:"minute",count:1},{timeUnit:"minute",count:5},{timeUnit:"minute",count:10},{timeUnit:"minute",count:15},{timeUnit:"minute",count:30},{timeUnit:"hour",count:1},{timeUnit:"hour",count:3},{timeUnit:"hour",count:6},{timeUnit:"hour",count:12},{timeUnit:"day",count:1},{timeUnit:"day",count:2},{timeUnit:"day",count:3},{timeUnit:"day",count:4},{timeUnit:"day",count:5},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"month",count:2},{timeUnit:"month",count:3},{timeUnit:"month",count:6},{timeUnit:"year",count:1},{timeUnit:"year",count:2},{timeUnit:"year",count:5},{timeUnit:"year",count:10},{timeUnit:"year",count:50},{timeUnit:"year",count:100},{timeUnit:"year",count:200},{timeUnit:"year",count:500},{timeUnit:"year",count:1e3},{timeUnit:"year",count:2e3},{timeUnit:"year",count:5e3},{timeUnit:"year",count:1e4},{timeUnit:"year",count:1e5}],c={millisecond:e.translate("_date_millisecond"),second:e.translate("_date_second"),minute:e.translate("_date_minute"),hour:e.translate("_date_hour"),day:e.translate("_date_day"),week:e.translate("_date_day"),month:e.translate("_date_month"),year:e.translate("_date_year")},p={millisecond:e.translate("_date_millisecond"),second:e.translate("_date_second"),minute:e.translate("_date_minute"),hour:e.translate("_date_day"),day:e.translate("_date_day"),week:e.translate("_date_day"),month:e.translate("_date_month")+" "+e.translate("_date_year"),year:e.translate("_date_year")},m={millisecond:e.translate("_date_millisecond_full"),second:e.translate("_date_second_full"),minute:e.translate("_date_minute_full"),hour:e.translate("_date_hour_full"),day:e.translate("_date_day_full"),week:e.translate("_date_week_full"),month:e.translate("_date_month_full"),year:e.translate("_date_year")};i("CategoryDateAxis").setAll({markUnitChange:!0,gridIntervals:u.copy(s),dateFormats:g.copy(c),periodChangeDateFormats:g.copy(p)}),i("DateAxis").setAll({maxZoomFactor:null,strictMinMax:!0,startLocation:0,endLocation:1,markUnitChange:!0,groupData:!1,groupCount:500,skipFirstMinor:!0,weekLabelLocation:0,gridIntervals:u.copy(s),dateFormats:g.copy(c),periodChangeDateFormats:g.copy(p),tooltipDateFormats:m,groupIntervals:[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:100},{timeUnit:"second",count:1},{timeUnit:"second",count:10},{timeUnit:"minute",count:1},{timeUnit:"minute",count:10},{timeUnit:"hour",count:1},{timeUnit:"day",count:1},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"year",count:1}],fillRule:t=>{let e=t.get("axisFill");
1if(e){let i=t.component,s=t.get("value"),a=t.get("endValue"),o=i.intervalDuration(),l=i.getPrivate("baseInterval"),r=i.getPrivate("gridInterval",l),h=i.getPrivate("min",0);if(h=n.round(new Date(h),r.timeUnit,r.count,this._root.locale.firstDayOfWeek,this._root.utc,void 0,this._root.timezone).getTime(),null!=s&&null!=a){let t=Math.round(Math.round((s-h)/o))/2;t==Math.round(t)?e.setPrivate("visible",!0):e.setPrivate("visible",!1)}}}}),i("GaplessDateAxis").setAll({fillRule:t=>{let e=t.get("axisFill");if(e){let i=t.get("index"),s=!1;h.isNumber(i)&&i%2!=0||(s=!0),e.setPrivate("visible",s)}}}),i("ValueAxis").setAll({baseValue:0,logarithmic:!1,strictMinMax:!1,autoZoom:!0,fillRule:t=>{let e=t.get("axisFill");if(e){let i=t.component,s=t.get("value"),a=i.getPrivate("step");h.isNumber(s)&&h.isNumber(a)&&(d.round(s/a/2,5)==Math.round(s/a/2)?e.setPrivate("visible",!1):e.setPrivate("visible",!0))}}}),i("DurationAxis").setAll({baseUnit:"second"}),i("XYSeries").setAll({maskBullets:!0,stackToNegative:!0,locationX:.5,locationY:.5,snapTooltip:!1,openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close",seriesTooltipTarget:"series"}),i("BaseColumnSeries").setAll({adjustBulletPosition:!0}),i("ColumnSeries").setAll({clustered:!0}),i("RoundedRectangle",["series","column"]).setAll({position:"absolute",isMeasured:!1,width:a.percent(70),height:a.percent(70),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,
1cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("LineSeries").setAll({connect:!0,autoGapCount:1.1,stackToNegative:!1}),i("Graphics",["series","stroke"]).setAll({position:"absolute",strokeWidth:1,strokeOpacity:1,isMeasured:!1}),i("Graphics",["series","fill"]).setAll({visible:!1,fillOpacity:0,position:"absolute",strokeWidth:0,strokeOpacity:0,isMeasured:!1}),i("Graphics",["line","series","legend","marker","stroke"]).setAll({draw:(t,e)=>{let i=e.parent;if(i){let e=i.height(),s=i.width();t.moveTo(0,e/2),t.lineTo(s,e/2)}}});{let e=i("Graphics",["line","series","legend","marker","stroke"]).states.create("disabled",{});r.setColor(e,"stroke",t,"disabled")}i("Graphics",["line","series","legend","marker","fill"]).setAll({draw:(t,e)=>{let i=e.parent;if(i){let e=i.height(),s=i.width();t.moveTo(0,0),t.lineTo(s,0),t.lineTo(s,e),t.lineTo(0,e),t.lineTo(0,0)}}});{let e=i("Graphics",["line","series","legend","marker","fill"]).states.create("disabled",{});r.setColor(e,"stroke",t,"disabled")}i("SmoothedXYLineSeries").setAll({tension:.5}),i("SmoothedXLineSeries").setAll({tension:.5}),i("SmoothedYLineSeries").setAll({tension:.5}),i("Candlestick").setAll({position:"absolute",isMeasured:!1,width:a.percent(50),height:a.percent(50),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,
1cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("OHLC").setAll({width:a.percent(80),height:a.percent(80)}),i("CandlestickSeries").setAll({lowValueXGrouped:"low",lowValueYGrouped:"low",highValueXGrouped:"high",highValueYGrouped:"high",openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close"});{let e=i("Rectangle",["column","autocolor"]).states.create("riseFromOpen",{});r.setColor(e,"fill",t,"positive"),r.setColor(e,"stroke",t,"positive")}{let e=i("Rectangle",["column","autocolor"]).states.create("dropFromOpen",{});r.setColor(e,"fill",t,"negative"),r.setColor(e,"stroke",t,"negative")}i("Rectangle",["column","autocolor","pro"]).states.create("riseFromOpen",{fillOpacity:0}),i("Rectangle",["column","autocolor","pro"]).states.create("dropFromOpen",{fillOpacity:1});{let e=i("Rectangle",["column","autocolor","pro"]).states.create("riseFromPrevious",{});r.setColor(e,"fill",t,"positive"),r.setColor(e,"stroke",t,"positive")}{let e=i("Rectangle",["column","autocolor","pro"]).states.create("dropFromPrevious",{});r.setColor(e,"fill",t,"negative"),r.setColor(e,"stroke",t,"negative")}i("RoundedRectangle",["rangegrip"]).setAll({strokeOpacity:0,fillOpacity:0,strokeWidth:1,width:12,height:12});{let e=i("Graphics",["rangegrip","button","icon"]);e.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:t=>{t.moveTo(0,.5),t.lineTo(0,12.5),t.moveTo(2,.5),t.lineTo(2,12.5),t.moveTo(4,.5),t.lineTo(4,12.5)}}),r.setColor(e,"stroke",t,"secondaryButtonText")}i("Button",["rangegrip"]).setAll({draggable:!0,paddingTop:0,paddingBottom:0}),i("Button",["rangegrip","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize",centerX:a.p50}),i("Button",["rangegrip","horizontal"]).setAll({cursorOverStyle:"ew-resize",centerX:a.p50}),i("Button",["rangegrip","vertical","left"]).setAll({centerY:a.p100}),i("Button",["rangegrip","vertical","right"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","top"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","bottom"]).setAll({centerY:a.p100})}}e.XYChartDefaultTheme=c},67751:function(t,e,i){var s=i(31284),a=i(16755),o=i(56340),l=i(26801),r=i(229),n=i(45140),h=i(11433),d=i(73226),g=i(16644);
1class u extends s.Container{constructor(){super(...arguments),this._alwaysShow=!1,this.lineX=this.children.push(l.Grid.new(this._root,{themeTags:["x"]})),this.lineY=this.children.push(l.Grid.new(this._root,{themeTags:["y"]})),this.selection=this.children.push(o.Graphics.new(this._root,{themeTags:["selection","cursor"],layer:30})._markC("themeTags","layer")),this._lastPoint={x:0,y:0},this._lastPoint2={x:0,y:0},this._tooltipX=!1,this._tooltipY=!1}_afterNew(){this._settings.themeTags=n.mergeTags(this._settings.themeTags,["xy","cursor"]),super._afterNew(),this._setCAll({width:a.p100,height:a.p100,isMeasured:!0,position:"absolute"}),this.states._createC("hidden",{visible:!0,opacity:0}),this._drawLines(),this.setPrivateRaw("visible",!1),this._disposers.push(this.setTimeout(()=>{this.setPrivate("visible",!0)},500)),this._disposers.push(this.lineX.events.on("positionchanged",()=>{this._handleXLine()})),this._disposers.push(this.lineY.events.on("positionchanged",()=>{this._handleYLine()})),this._disposers.push(this.lineX.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineX.events.on("blur",()=>this._handleLineBlur())),this._disposers.push(this.lineY.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineY.events.on("blur",()=>this._handleLineBlur())),n.supports("keyboardevents")&&this._disposers.push(n.addEventListener(document,"keydown",t=>{this._handleLineMove(n.getEventKey(t),t.ctrlKey)}))}_setUpTouch(){let t=this.chart;t&&(t.plotContainer._display.cancelTouch="none"!=this.get("behavior"))}_handleXLine(){let t=this.lineX.x(),e=!0;(t<0||t>this.width())&&(e=!1),this.lineX.setPrivate("visible",e)}_handleYLine(){let t=this.lineY.y(),e=!0;(t<0||t>this.height())&&(e=!1),this.lineY.setPrivate("visible",e)}_handleLineMove(t,e){let i,s="",a=this.chart;if(a&&a.xAxes.length){this._root.focused(this.lineX)?(s="positionX",i=a.xAxes.getIndex(0)):this._root.focused(this.lineY)&&(i=a.yAxes.getIndex(0),s="positionY");let o=1;if(e&&(o=5),i){let e,a=i.get("renderer").get("inversed",!1);"ArrowRight"==t||"ArrowDown"==t?e=1:"ArrowLeft"==t||"ArrowUp"==t?e=-1:"Tab"==t&&(e=0),null!=e&&(a&&(e*=-1),this.set(s,i.nextPosition(e*o)))}}}_handleLineFocus(){this._alwaysShow=this.get("alwaysShow",!1),this.setAll({positionX:this.getPrivate("positionX",0),positionY:this.getPrivate("positionY",0),alwaysShow:!0}),this._handleLineMove("Tab")}_handleLineBlur(){(this.lineX.isFocus()||this.lineY.isFocus())&&this.setAll({positionX:void 0,positionY:void 0,alwaysShow:this._alwaysShow})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("xAxis")){this._tooltipX=!1;let t=this.get("xAxis");if(t){let e=t.get("tooltip");e&&(this._tooltipX=!0,this._disposers.push(e.on("pointTo",()=>{this._updateXLine(e)})))}}if(this.isDirty("yAxis")){this._tooltipY=!1;let t=this.get("yAxis");if(t){let e=t.get("tooltip");e&&(this._tooltipY=!0,this._disposers.push(e.on("pointTo",()=>{this._updateYLine(e)})))}}}_handleSyncWith(){let t=this.chart;if(t){let e=this.get("syncWith"),i=[];e&&d.each(e,t=>{let e=t.chart;e&&i.push(e)}),t._otherCharts=i}}_updateChildren(){if(super._updateChildren(),this._handleSyncWith(),this.isDirty("positionX")||this.isDirty("positionY")){let t=this.get("positionX"),e=this.get("positionY");null==t&&null==e?this.hide(0):(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0))),this.handleMove())}}_updateXLine(t){let e=h.round(this._display.toLocal(t.get("pointTo",{x:0,y:0})).x,3);this._toX!=e&&(this.lineX.animate({key:"x",to:e,duration:t.get("animationDuration",0),easing:t.get("animationEasing")}),this._toX=e)}_updateYLine(t){let e=h.round(this._display.toLocal(t.get("pointTo",{x:0,y:0})).y,3);this._toY!=e&&(this.lineY.animate({key:"y",to:e,duration:t.get("animationDuration",0),easing:t.get("animationEasing")}),this._toY=e)}_drawLines(){this.lineX.set("draw",t=>{t.moveTo(0,0),t.lineTo(0,this.height())}),this.lineY.set("draw",t=>{t.moveTo(0,0),t.lineTo(this.width(),0)})}updateCursor(){this.get("alwaysShow")&&(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0)))),this.handleMove()}_setChart(t){this.chart=t,this._handleSyncWith();let e=t.plotContainer;this.events.on("boundschanged",()=>{this._boundsTimeout&&this._boundsTimeout.dispose(),this._boundsTimeout=this.setTimeout(()=>
1{this.updateCursor()},50),this._disposers.push(this._boundsTimeout)}),n.supports("touchevents")&&(this._disposers.push(e.events.on("click",t=>{n.isTouchEvent(t.originalEvent)&&this._handleMove(t)})),this._setUpTouch()),this._disposers.push(e.events.on("pointerdown",t=>{this._handleCursorDown(t)})),this._disposers.push(e.events.on("globalpointerdown",t=>{this._handleCursorDownGlobal(t)})),this._disposers.push(e.events.on("globalpointerup",t=>{this._handleCursorUp(t),t.native||this.isHidden()||this._handleMove(t)})),this._disposers.push(e.events.on("globalpointermove",t=>{(this.get("syncWith")||0!=g.keys(e._downPoints).length||this._downPoint||t.native||!this.isHidden())&&(this._handleMove(t),Math.hypot(this._lastPoint2.x-t.point.x,this._lastPoint2.y-t.point.y)>1&&(this._handleLineBlur(),this._lastPoint2=t.point))}));let i=this.parent;i&&i.children.moveValue(this.selection)}_inPlot(t){let e=this.chart;return!!e&&e.inPlot(t)}_handleCursorDown(t){if(2==t.originalEvent.button)return;let e=t.point,i=this._display.toLocal(e),s=this.chart;this.selection.set("draw",()=>{}),s&&this._inPlot(i)&&this._startSelection(i,t)}_handleCursorDownGlobal(t){let e=this.get("clickTolerance",0);if(e<=0||"none"==this.get("behavior","none")||2==t.originalEvent.button||!this.chart)return;let i=this._display.toLocal(t.point);if(this._inPlot(i))return;let s=this.width(),a=this.height(),o=Math.max(0,-i.x,i.x-s),l=Math.max(0,-i.y,i.y-a);o>e||l>e||(i.x=h.fitToRange(i.x,0,s),i.y=h.fitToRange(i.y,0,a),this.selection.set("draw",()=>{}),this._startSelection(i,t))}_startSelection(t,e){if(this._downPoint=t,"none"!=this.get("behavior")){this.selection.show();let t="selectstarted";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this,originalEvent:e.originalEvent})}let i=this._getPosition(t).x,s=this._getPosition(t).y;this.setPrivate("downPositionX",i),this.setPrivate("downPositionY",s)}_handleCursorUp(t){if(this._downPoint){let e=this.get("behavior","none");if("none"!=e){"z"===e.charAt(0)&&this.selection.hide();let i=t.point,s=this._display.toLocal(i);s.x=h.fitToRange(s.x,0,this.width()),s.y=h.fitToRange(s.y,0,this.height());let a=this._downPoint,o=this.get("moveThreshold",1);if(s&&a){let i=!1;if("zoomX"!==e&&"zoomXY"!==e&&"selectX"!==e&&"selectXY"!==e||Math.abs(s.x-a.x)>o&&(i=!0),"zoomY"!==e&&"zoomXY"!==e&&"selectY"!==e&&"selectXY"!==e||Math.abs(s.y-a.y)>o&&(i=!0),i){let e="selectended";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent})}else{let e="selectcancelled";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent})}}}}this._downPoint=void 0}_handleMove(t){if(this.getPrivate("visible")){let e=this.chart;if(e&&g.keys(e.plotContainer._downPoints).length>1)return void this._setC("forceHidden",!0);this._setC("forceHidden",!1);let i=t.point,s=this._lastPoint;(Math.round(s.x)!==Math.round(i.x)||Math.round(s.y)!==Math.round(i.y))&&(this._lastPoint=i,this.setPrivate("lastPoint",i),this.handleMove({x:i.x,y:i.y},!1,t.originalEvent))}}_getPosition(t){return{x:t.x/this.width(),y:t.y/this.height()}}handleMove(t,e,i){t||(t=this._movePoint);let s=this.get("alwaysShow");if(!t)return void this.hide(0);this._movePoint=t;let a=this._display.toLocal(t),o=this.chart;if(o&&(this._inPlot(a)||this._downPoint)){o._movePoint=t,this.isHidden()&&(this.show(),"z"==this.get("behavior","").charAt(0)&&this.selection.set("draw",()=>{}));let l=a.x,n=a.y,h=this._getPosition(a);this.setPrivate("point",a);let d=this.get("snapToSeries");this._downPoint&&(d=void 0);let g=this.get("positionX"),u=h.x;r.isNumber(g)&&(u=g);let c=this.get("positionY"),p=h.y;r.isNumber(c)&&(p=c),this.setPrivate("positionX",u),this.setPrivate("positionY",p);let m=this._getPoint(u,p);if(l=m.x,n=m.y,o.xAxes.each(t=>{t._handleCursorPosition(u,d),s&&t.handleCursorShow()}),o.yAxes.each(t=>{t._handleCursorPosition(p,d),s&&t.handleCursorShow()}),!e){o._handleCursorPosition();let e="cursormoved";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,point:t,originalEvent:i})}this._updateLines(l,n),o.arrangeTooltips()}else if(!this._downPoint&&!s){this.hide(0);let t="cursorhidden";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}this._downPoint&&"none"!=this.get("behavior")&&this._updateSelection(a)}_getPoint(t,e){return{x:this.width()*t,y:this.height()*e}}_updateLines(t,e){this._tooltipX||this.lineX._setC("x",t),this._tooltipY||this.lineY._setC("y",e),this._drawLines()}_updateSelection(t){let e=this.selection,i=this.get("behavior"),s=this.width(),a=this.height();t.x<0&&(t.x=0),t.x>s&&(t.x=s),t.y<0&&(t.y=0),t.y>a&&(t.y=a),e.set("draw",e=>{let o=this._downPoint;o&&("zoomXY"===i||"selectXY"===i?(e.moveTo(o.x,o.y),e.lineTo(o.x,t.y),e.lineTo(t.x,t.y),e.lineTo(t.x,o.y),e.lineTo(o.x,o.y)):"zoomX"===i||"selectX"===i?(e.moveTo(o.x,0),e.lineTo(o.x,a),e.lineTo(t.x,a),e.lineTo(t.x,0),e.lineTo(o.x,0)):"zoomY"!==i&&"selectY"!==i||(e.moveTo(0,o.y),e.lineTo(s,o.y),e.lineTo(s,t.y),e.lineTo(0,t.y),e.lineTo(0,o.y)))})}
1_onHide(){if(this.isHidden()){let t=this.chart;t&&(t.xAxes.each(t=>{t.handleCursorHide()}),t.yAxes.each(t=>{t.handleCursorHide()}),t.series.each(t=>{t.handleCursorHide()}))}super._onHide()}_onShow(){if(!this.isHidden()){let t=this.chart;t&&(t.xAxes.each(t=>{t.handleCursorShow()}),t.yAxes.each(t=>{t.handleCursorShow()}))}super._onShow()}_dispose(){super._dispose(),this.selection.dispose()}}u.className="XYCursor",u.classNames=s.Container.classNames.concat([u.className]),e.XYCursor=u},40472:function(t,e,i){var s=i(72049),a=i(31284),o=i(16755),l=i(99446),r=i(54320),n=i(73226),h=i(229),d=i(45140);class g extends s.Component{constructor(){super(...arguments),this._series=[],this._isPanning=!1,this.minorDataItems=[],this.labelsContainer=this.children.push(a.Container.new(this._root,{})),this.gridContainer=a.Container.new(this._root,{width:o.p100,height:o.p100}),this.topGridContainer=a.Container.new(this._root,{width:o.p100,height:o.p100}),this.bulletsContainer=this.children.push(a.Container.new(this._root,{isMeasured:!1,width:o.p100,height:o.p100,position:"absolute"})),this._rangesDirty=!1,this._panStart=0,this._panEnd=1,this._skipSync=!1,this.axisRanges=new l.List,this._seriesAxisRanges=[],this._cursorPosition=-1,this._seriesValuesDirty=!1,this._seriesAdded=!1,this.axisHeader=this.children.push(a.Container.new(this._root,{themeTags:["axis","header"],position:"absolute",background:r.Rectangle.new(this._root,{themeTags:["header","background"],fill:this._root.interfaceColors.get("background")})})),this._bullets={}}_isSynced(){return!1}_dispose(){this.gridContainer.dispose(),this.topGridContainer.dispose(),this.bulletsContainer.dispose(),this.labelsContainer.dispose(),this.axisHeader.dispose(),super._dispose()}_afterNew(){super._afterNew(),this.setPrivate("updateScrollbar",!0),this._disposers.push(this.axisHeader.children.events.onAll(()=>{this.markDirty()})),this._disposers.push(this.axisRanges.events.onAll(t=>{if("clear"===t.type)n.each(t.oldValues,t=>{t.dispose()});else if("push"===t.type)this._processAxisRange(t.newValue,["range"]);else if("setIndex"===t.type)this._processAxisRange(t.newValue,["range"]);else if("insertIndex"===t.type)this._processAxisRange(t.newValue,["range"]);else if("removeIndex"===t.type)this.disposeDataItem(t.oldValue);else{if("moveIndex"!==t.type)throw Error("Unknown IStreamEvent type");this._processAxisRange(t.value,["range"])}}));let t=this.get("renderer");t&&(t.axis=this,t.processAxis()),this.children.push(t),this._createGhostLabel()}_createGhostLabel(){let t=this.get("renderer").makeLabel(new s.DataItem(this,void 0,{}),[]);t.adapters.disable("text"),t.setAll({opacity:0,tooltipText:void 0,tooltipHTML:void 0,interactive:!1}),t.events.disable(),this.ghostLabel=t}_updateFinals(t,e){}zoom(t,e,i,s){if(this.get("zoomable",!0)){if(this._updateFinals(t,e),this.get("start")!==t||this.get("end")!=e){let a=this._sAnimation,o=this._eAnimation;if(t>e&&([t,e]=[e,t]),!this._isSynced()){let i=this.get("maxDeviation",.5)*Math.min(1,e-t);t<-i&&(t=-i),e>1+i&&(e=1+i)}let l=this.getPrivate("maxZoomFactor",this.get("maxZoomFactor",100)),r=l;h.isNumber(i)||(i=this.get("interpolationDuration",0)),s||(s="end"),1===e&&0!==t&&(s=t<this.get("start",0)?"start":"end"),0===t&&1!==e&&(s=e>this.get("end",1)?"end":"start");let n=this.get("minZoomCount",0),d=this.dataItems;d&&d.length<n&&(n=d.length);let g=this.get("maxZoomCount",1/0);h.isNumber(n)&&(l=r/n);let u=1;if(h.isNumber(g)&&(u=r/g),t>e&&([t,e]=[e,t]),"start"===s?(g>0&&1/(e-t)<u&&(e=t+1/u),1/(e-t)>l&&(e=t+1/l),e>1&&e-t<1/l&&(t=e-1/l)):(g>0&&1/(e-t)<u&&(t=e-1/u),1/(e-t)>l&&(t=e-1/l),t<0&&e-t<1/l&&(e=t+1/l)),1/(e-t)>l&&(e=t+1/l),1/(e-t)>l&&(t=e-1/l),null!=g&&null!=n&&t==this.get("start")&&e==this.get("end")){let t=this.chart;t&&t._handleAxisSelection(this,!0)}if((!a||!a.playing||a.to!=t)&&this.get("start")!=t||(!o||!o.playing||o.to!=e)&&this.get("end")!=e){if(i>0){let s,a,o=this.get("interpolationEasing");if(this.get("start")!=t&&(s=this.animate({key:"start",to:t,duration:i,easing:o})),this.get("end")!=e&&(a=this.animate({key:"end",to:e,duration:i,easing:o})),this._sAnimation=s,this._eAnimation=a,s)return s;if(a)return a}else this._setC("start",t),this._setC("end",e),this.root.events.once("frameended",()=>{this.markDirtyKey("start")})}}else this._sAnimation&&this._sAnimation.stop(),this._eAnimation&&this._eAnimation.stop()}}get series(){return this._series}_processAxisRange(t,e){t.setRaw("isRange",!0),this._createAssets(t,e),this._rangesDirty=!0,this._prepareDataItem(t);let i=t.get("above"),s=this.topGridContainer,a=t.get("grid");i&&a&&s.children.moveValue(a);let o=t.get("axisFill");i&&o&&s.children.moveValue(o)}_prepareDataItem(t,e){}markDirtyExtremes(){}markDirtySelectionExtremes(){}_calculateTotals(){}_updateAxisRanges(){this._bullets={},this.axisRanges.each(t=>{this._prepareDataItem(t)}),n.each(this._seriesAxisRanges,t=>{this._prepareDataItem(t)})}_prepareChildren(){super._prepareChildren();let t=this.ghostLabel;if(t&&(this.get("fixAxisSize")?t.set("visible",!0):t.set("visible",!1)),this.isDirty("start")||this.isDirty("end")){let t=this.chart;
1t&&t._updateCursor();let e=this.get("start",0),i=this.get("end",1);if(!this._isSynced()){let t=this.get("maxDeviation",.5)*Math.min(1,i-e);if(e<-t){let s=e+t;e=-t,this.setRaw("start",e),this.isDirty("end")&&this.setRaw("end",i-s)}if(i>1+t){let s=i-1-t;i=1+t,this.setRaw("end",i),this.isDirty("start")&&this.setRaw("start",e-s)}}}let e=this.get("renderer");if(e._start=this.get("start"),e._end=this.get("end"),e._inversed=e.get("inversed",!1),e._axisLength=e.axisLength()/(e._end-e._start),e._updateLC(),this.isDirty("tooltip")){let t=this.get("tooltip");if(t){let i=e.get("themeTags");t.addTag("axis"),t.addTag(this.className.toLowerCase()),t._applyThemes(),i&&(t.set("themeTags",d.mergeTags(t.get("themeTags"),i)),t.label._applyThemes())}}}_updateTooltipBounds(){let t=this.get("tooltip");t&&this.get("renderer").updateTooltipBounds(t)}_updateBounds(){super._updateBounds(),this._updateTooltipBounds()}processChart(t){this.chart=t,this.get("renderer").chart=t,t.gridContainer.children.push(this.gridContainer),t.topGridContainer.children.push(this.topGridContainer),t.axisHeadersContainer.children.push(this.axisHeader),this.on("start",()=>{t._handleAxisSelection(this)}),this.on("end",()=>{t._handleAxisSelection(this)}),t.plotContainer.onPrivate("width",()=>{this.markDirtySize()}),t.plotContainer.onPrivate("height",()=>{this.markDirtySize()}),t.processAxis(this)}hideDataItem(t){return this._toggleFHDataItem(t,!0),super.hideDataItem(t)}showDataItem(t){return this._toggleFHDataItem(t,!1),super.showDataItem(t)}_toggleFHDataItem(t,e){let i="forceHidden",s=t.get("label");s&&s._setC(i,e);let a=t.get("grid");a&&a._setC(i,e);let o=t.get("tick");o&&o._setC(i,e);let l=t.get("axisFill");l&&l._setC(i,e);let r=t.get("bullet");if(r){let t=r.get("sprite");t&&t._setC(i,e)}}_toggleDataItem(t,e){let i=t.get("label"),s="visible";i&&i.setPrivate(s,e);let a=t.get("grid");a&&a.setPrivate(s,e);let o=t.get("tick");o&&o.setPrivate(s,e);let l=t.get("axisFill");l&&l.setPrivate(s,e);let r=t.get("bullet");if(r){let t=r.get("sprite");t&&t.setPrivate(s,e)}}_createAssets(t,e,i){var s,a,o;let l=this.get("renderer"),r="minor",n=t.get("label");if(n){let a=n.get("themeTags"),o=!1;i?-1==(null==a?void 0:a.indexOf(r))&&(o=!0):-1!=(null==a?void 0:a.indexOf(r))&&(o=!0),o&&(null===(s=n.parent)||void 0===s||s.children.removeValue(n),l.makeLabel(t,e),n.dispose(),l.labels.removeValue(n))}else l.makeLabel(t,e);let h=t.get("grid");if(h){let s=h.get("themeTags"),o=!1;i?-1==(null==s?void 0:s.indexOf(r))&&(o=!0):-1!=(null==s?void 0:s.indexOf(r))&&(o=!0),o&&(null===(a=h.parent)||void 0===a||a.children.removeValue(h),l.makeGrid(t,e),h.dispose(),l.grid.removeValue(h))}else l.makeGrid(t,e);let d=t.get("tick");if(d){let s=!1,a=d.get("themeTags");i?-1==(null==a?void 0:a.indexOf(r))&&(s=!0):-1!=(null==a?void 0:a.indexOf(r))&&(s=!0),s&&(null===(o=d.parent)||void 0===o||o.children.removeValue(d),l.makeTick(t,e),d.dispose(),l.ticks.removeValue(d))}else l.makeTick(t,e);i||t.get("axisFill")?i&&!t.get("axisFill")&&this.get("minorAxisFillsEnabled")&&l.makeAxisFill(t,e):l.makeAxisFill(t,e),this._processBullet(t)}_processBullet(t){let e=t.get("bullet"),i=this.get("bullet");if(e||!i||t.get("isRange")||(e=i(this._root,this,t)),e){e.axis=this;let i=e.get("sprite");i&&(i._setDataItem(t),t.setRaw("bullet",e),i.parent||this.bulletsContainer.children.push(i))}}_afterChanged(){super._afterChanged();let t=this.chart;t&&(t._updateChartLayout(),t.axisHeadersContainer.markDirtySize()),this.get("renderer")._updatePositions(),this._seriesAdded=!1}disposeDataItem(t){super.disposeDataItem(t);let e=this.get("renderer"),i=t.get("label");i&&(e.labels.removeValue(i),i.dispose());let s=t.get("tick");s&&(e.ticks.removeValue(s),s.dispose());let a=t.get("grid");a&&(e.grid.removeValue(a),a.dispose());let o=t.get("axisFill");o&&(e.axisFills.removeValue(o),o.dispose());let l=t.get("bullet");l&&l.dispose()}_updateGhost(){this.setPrivate("cellWidth",this.getCellWidthPosition()*this.get("renderer").axisLength());let t=this.ghostLabel;if(t){if(!t.isHidden()){let e=t.localBounds(),i=Math.ceil(e.right-e.left),s=t.get("text");n.each(this.dataItems,t=>{let e=t.get("label");if(e&&!e.isHidden()){let t=e.localBounds();
1Math.ceil(t.right-t.left)>i&&(s=e.text._getText())}}),t.set("text",s)}let e=this.get("start",0),i=this.get("end",1);this.get("renderer").updateLabel(t,e+.5*(i-e))}}_handleCursorPosition(t,e){t=this.get("renderer").toAxisPosition(t),this._cursorPosition=t,this._snapToSeries=e,this.updateTooltip()}updateTooltip(){let t=this._snapToSeries,e=this._cursorPosition,i=this.get("tooltip"),s=this.get("renderer");h.isNumber(e)&&(n.each(this.series,i=>{if(i.get("baseAxis")===this){let s=this.getSeriesItem(i,e,this.get("tooltipLocation"));t&&-1!=t.indexOf(i)?(i.updateLegendMarker(s),i.updateLegendValue(s),i._settings.tooltipDataItem=s):(i.showDataItemTooltip(s),i.setRaw("tooltipDataItem",s))}}),this.get("snapTooltip")&&(e=this.roundAxisPosition(e,this.get("tooltipLocation",.5))),this.setPrivateRaw("tooltipPosition",e),i&&(s.updateTooltipBounds(i),h.isNaN(e)?i.hide(0):(this._updateTooltipText(i,e),s.positionTooltip(i,e),e<this.get("start",0)||e>this.get("end",1)?i.hide(0):i.show(0))))}_updateTooltipText(t,e){t.label.set("text",this.getTooltipText(e))}roundAxisPosition(t,e){return t}_handleSeriesRemoved(){}handleCursorShow(){let t=this.get("tooltip");t&&t.show()}handleCursorHide(){let t=this.get("tooltip");t&&t.hide()}processSeriesDataItem(t,e){}_clearDirty(){super._clearDirty(),this._sizeDirty=!1,this._rangesDirty=!1}coordinateToPosition(t){let e=this.get("renderer");return e.toAxisPosition(t/e.axisLength())}toAxisPosition(t){return this.get("renderer").toAxisPosition(t)}toGlobalPosition(t){return this.get("renderer").toGlobalPosition(t)}fixPosition(t){return this.get("renderer").fixPosition(t)}shouldGap(t,e,i,s){return!1}createAxisRange(t){return this.axisRanges.push(t)}
1_groupSeriesData(t){}getCellWidthPosition(){return .05}}g.className="Axis",g.classNames=s.Component.classNames.concat([g.className]),e.Axis=g},10514:function(t,e,i){var s=i(50006);class a extends s.Label{constructor(){super(...arguments),this._tickPoints=[]}}a.className="AxisLabel",a.classNames=s.Label.classNames.concat([a.className]),e.AxisLabel=a},83918:function(t,e,i){var s=i(56340),a=i(20856),o=i(99446),l=i(9740),r=i(26801),n=i(10514),h=i(45140);class d extends s.Graphics{constructor(){super(...arguments),this._axisLength=100,this._start=0,this._end=1,this._inversed=!1,this._minSize=0,this._lc=1,this._ls=0,this.ticks=this.addDisposer(new o.ListTemplate(a.Template.new({}),()=>l.AxisTick._new(this._root,{themeTags:h.mergeTags(this.ticks.template.get("themeTags",[]),this.get("themeTags",[]))},[this.ticks.template]))),this.grid=this.addDisposer(new o.ListTemplate(a.Template.new({}),()=>r.Grid._new(this._root,{themeTags:h.mergeTags(this.grid.template.get("themeTags",[]),this.get("themeTags",[]))},[this.grid.template]))),this.axisFills=this.addDisposer(new o.ListTemplate(a.Template.new({}),()=>s.Graphics._new(this._root,{themeTags:h.mergeTags(this.axisFills.template.get("themeTags",["axis","fill"]),this.get("themeTags",[]))},[this.axisFills.template]))),this.labels=this.addDisposer(new o.ListTemplate(a.Template.new({}),()=>n.AxisLabel._new(this._root,{themeTags:h.mergeTags(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template])))}makeTick(t,e){let i=this.ticks.make();return i._setDataItem(t),t.setRaw("tick",i),i.set("themeTags",h.mergeTags(i.get("themeTags"),e)),this.axis.labelsContainer.children.push(i),this.ticks.push(i),i}makeGrid(t,e){let i=this.grid.make();return i._setDataItem(t),t.setRaw("grid",i),i.set("themeTags",h.mergeTags(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),this.grid.push(i),i}makeAxisFill(t,e){let i=this.axisFills.make();return i._setDataItem(t),i.set("themeTags",h.mergeTags(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),t.setRaw("axisFill",i),this.axisFills.push(i),i}makeLabel(t,e){let i=this.labels.make();return i.set("themeTags",h.mergeTags(i.get("themeTags"),e)),t.get("isRange")?this.axis.labelsContainer.children.push(i):this.axis.labelsContainer.children.moveValue(i,0),i._setDataItem(t),t.setRaw("label",i),this.labels.push(i),i}axisLength(){return 0}gridCount(){return this.axisLength()/this.get("minGridDistance",50)}_updatePositions(){}_afterNew(){super._afterNew(),this._setC("isMeasured",!1);let t=this.thumb;t&&(this._disposers.push(t.events.on("pointerdown",t=>{this._handleThumbDown(t)})),this._disposers.push(t.events.on("globalpointerup",t=>{this._handleThumbUp(t)})),this._disposers.push(t.events.on("globalpointermove",t=>{this._handleThumbMove(t)})))}_beforeChanged(){super._beforeChanged(),this.isDirty("minGridDistance")&&this.root.events.once("frameended",()=>{this.axis.markDirtySize()})}_changed(){if(super._changed(),this.isDirty("pan")){let t=this.thumb;if(t){let e=this.axis.labelsContainer,i=this.get("pan");"zoom"==i?e.children.push(t):"none"==i&&e.children.removeValue(t)}}}_handleThumbDown(t){this._thumbDownPoint=this.toLocal(t.point);let e=this.axis;this._downStart=e.get("start"),this._downEnd=e.get("end")}_handleThumbUp(t){this._thumbDownPoint=void 0}_handleThumbMove(t){let e=this._thumbDownPoint;if(e){let i=this.toLocal(t.point),s=this._downStart,a=this._downEnd,o=this._getPan(i,e)*Math.min(1,a-s)/2*this.get("panSensitivity",1);this.axis.zoom(s-o,a+o,0)}}_getPan(t,e){return 0}positionToCoordinate(t){return this._inversed?(this._end-t)*this._axisLength:(t-this._start)*this._axisLength}updateTooltipBounds(t){}_updateSize(){this.markDirty(),this._clear=!0}toAxisPosition(t){let e=this._start||0,i=this._end||1;return t*=i-e,this.get("inversed")?i-t:e+t}toGlobalPosition(t){let e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t-=e,t/(i-e)}fixPosition(t){return this.get("inversed")?1-t:t}_updateLC(){}toggleVisibility(t,e,i,s){let a=this.axis,o=a.get("start",0),l=a.get("end",1);e<o+(l-o)*(i-1e-4)||e>o+(l-o)*(s+1e-4)?t.setPrivate("visible",!1):t.setPrivate("visible",!0)}_positionTooltip(t,e){let i=this.chart;i&&(t.set("pointTo",this._display.toGlobal(e)),i.inPlot(e)||t.hide())}processAxis(){}}
1d.className="AxisRenderer",d.classNames=s.Graphics.classNames.concat([d.className]),e.AxisRenderer=d},96811:function(t,e,i){var s=i(83918),a=i(16755),o=i(54320),l=i(229),r=i(45140);class n extends s.AxisRenderer{constructor(){super(...arguments),this.thumb=o.Rectangle.new(this._root,{width:a.p100,isMeasured:!1,themeTags:["axis","x","thumb","zoomgrip"]})._markC("width","isMeasured","themeTags")}_afterNew(){this._settings.themeTags=r.mergeTags(this._settings.themeTags,["renderer","x"]),super._afterNew(),this.setPrivateRaw("letter","X");let t=this.grid.template;t._setC("height",a.p100),t._setC("width",0),t._setC("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(0,e.height())}),this.set("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(e.width(),0)})}_changed(){var t;super._changed();let e=this.axis,i=e.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i._setC("x",-1e3));let s="opposite",a="inside";if(this.isDirty(s)||this.isDirty(a)){let i=this.chart,o=e.children;if(this.get(a)?e.addTag(a):e.removeTag(a),i){if(this.get(s)){let t=i.topAxesContainer.children;-1==t.indexOf(e)&&t.insertIndex(0,e),e.addTag(s),o.moveValue(this)}else{let t=i.bottomAxesContainer.children;-1==t.indexOf(e)&&t.moveValue(e),e.removeTag(s),o.moveValue(this,0)}null===(t=e.ghostLabel)||void 0===t||t._applyThemes(),this.labels.each(t=>{t._applyThemes()}),this.root._markDirtyRedraw()}e.markDirtySize()}this.thumb.setPrivate("height",e.labelsContainer.height())}_getPan(t,e){return(e.x-t.x)/this.width()}toAxisPosition(t){let e=this._start||0,i=this._end||1;return t=(t-=this._ls)*(i-e)/this._lc,this.get("inversed")?i-t:e+t}toGlobalPosition(t){let e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t-=e,(t=t/(i-e)*this._lc)+this._ls}_updateLC(){let t=this.axis,e=t.parent;if(e){let i=e.innerWidth();this._lc=this.axisLength()/i,this._ls=(t.x()-e.get("paddingLeft",0))/i}}_updatePositions(){let t=this.axis,e=t.x()-r.relativeToValue(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0);t.gridContainer._setC("x",e),t.topGridContainer._setC("x",e),t.bulletsContainer._setC("y",this.y());let i=t.chart;if(i){let e=i.plotContainer,s=t.axisHeader,a=t.get("marginLeft",0),o=t.x()-a,l=t.parent;l&&(o-=l.get("paddingLeft",0)),s.children.length>0?(s.isComputedSetting("width")&&s.remove("width"),a=t.axisHeader.width(),t._setC("marginLeft",a+1)):s._setC("width",a),s.setAll({x:o,y:-1,height:e.height()+2})}}processAxis(){super.processAxis();let t=this.axis;null==t.get("width")&&t._setC("width",a.p100);let e=this._root.verticalLayout;t._setC("layout",e),t.labelsContainer.set("width",a.p100),t.axisHeader.setAll({layout:e})}axisLength(){return this.axis.width()}positionToPoint(t){return{x:this.positionToCoordinate(t),y:0}}updateTick(t,e,i,s){if(t){l.isNumber(e)||(e=0);let o=.5;o=l.isNumber(s)&&s>1?t.get("multiLocation",o):t.get("location",o),l.isNumber(i)&&i!=e&&(e+=(i-e)*o),t._setC("x",this.positionToCoordinate(e));let r=t.get("length",0),n=t.get("inside",this.get("inside",!1));this.get("opposite")?(t._setC("y",a.p100),n||(r*=-1)):(t._setC("y",0),n&&(r*=-1)),t.set("draw",t=>{t.moveTo(0,0),t.lineTo(0,r)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateLabel(t,e,i,s){if(t){let o=.5;o=l.isNumber(s)&&s>1?t.get("multiLocation",o):t.get("location",o),l.isNumber(e)||(e=0);let r=t.get("inside",this.get("inside",!1));this.get("opposite")?r?(t._setC("position","absolute"),t._setC("y",0)):(t._setC("position","relative"),t._setC("y",a.p100)):r?(t._setC("y",0),t._setC("position","absolute")):(t._setC("y",void 0),t._setC("position","relative")),l.isNumber(i)&&i!=e&&(e+=(i-e)*o),t._setC("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateGrid(t,e,i){if(t){l.isNumber(e)||(e=0);let s=t.get("location",.5);l.isNumber(i)&&i!=e&&(e+=(i-e)*s),t._setC("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateBullet(t,e,i){if(t){let s=t.get("sprite");if(s){l.isNumber(e)||(e=0);let a=t.get("location",.5);l.isNumber(i)&&i!=e&&(e+=(i-e)*a);let o=this.axis.roundAxisPosition(e,a),r=this.axis._bullets[o],n=-1;if(this.get("opposite")&&(n=1),t.get("stacked")){if(r){let t=r.get("sprite");t&&s._setC("y",t.y()+t.height()*n)}else s._setC("y",0)}this.axis._bullets[o]=t,s._setC("x",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){l.isNumber(e)||(e=0),l.isNumber(i)||(i=1);let s=this.positionToCoordinate(e),a=this.positionToCoordinate(i);this.fillDrawMethod(t,s,a)}}fillDrawMethod(t,e,i){t.set("draw",t=>{let s=this.axis.gridContainer.height(),a=this.width();i<e&&([i,e]=[e,i]),e>a||i<0||(t.moveTo(e,0),t.lineTo(i,0),t.lineTo(i,s),t.lineTo(e,s),t.lineTo(e,0))})}positionTooltip(t,e){this._positionTooltip(t,{x:this.positionToCoordinate(e),y:0})}updateTooltipBounds(t){let e=this.get("inside"),i=this._display.toGlobal({x:0,y:0}),s=i.x,a=0,o=this.axisLength(),l="up";this.get("opposite")?e?(l="up",a=i.y):(l="down",a=i.y-1e5):e?(l="down",a=i.y-1e5):(l="up",a=i.y);let n={left:s,right:s+o,top:a,bottom:a+1e5},h=t.get("bounds");r.sameBounds(n,h)||(t.set("bounds",n),t._setC("pointerOrientation",l))}}n.className="AxisRendererX",n.classNames=s.AxisRenderer.classNames.c
1oncat([n.className]),e.AxisRendererX=n},51028:function(t,e,i){var s=i(83918),a=i(16755),o=i(54320),l=i(229),r=i(45140);class n extends s.AxisRenderer{constructor(){super(...arguments),this.thumb=o.Rectangle.new(this._root,{height:a.p100,isMeasured:!1,themeTags:["axis","y","thumb","zoomgrip"]})._markC("height","isMeasured","themeTags")}_afterNew(){this._settings.themeTags=r.mergeTags(this._settings.themeTags,["renderer","y"]),this._settings.opposite&&this._settings.themeTags.push("opposite"),super._afterNew(),this.setPrivateRaw("letter","Y");let t=this.grid.template;t._setC("width",a.p100),t._setC("height",0),t._setC("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(e.width(),0)}),this.set("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(0,e.height())})}_getPan(t,e){return(t.y-e.y)/this.height()}_changed(){var t;super._changed();let e=this.axis,i=e.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i._setC("y",-1e3));let s=this.thumb,a="opposite",o="inside",l=this.chart;if(this.isDirty(a)||this.isDirty(o)){let i=e.children;if(this.get(o)?e.addTag(o):e.removeTag(o),l){if(this.get(a)){let t=l.rightAxesContainer.children;-1==t.indexOf(e)&&t.moveValue(e,0),e.addTag(a),i.moveValue(this,0)}else{let t=l.leftAxesContainer.children;-1==t.indexOf(e)&&t.moveValue(e),e.removeTag(a),i.moveValue(this)}null===(t=e.ghostLabel)||void 0===t||t._applyThemes(),this.labels.each(t=>{t._applyThemes()}),this.root._markDirtyRedraw()}e.markDirtySize()}let r=e.labelsContainer.width();l&&(this.get(a)?s._setC("centerX",0):s._setC("centerX",r)),s.setPrivate("width",r)}processAxis(){super.processAxis();let t=this.axis;null==t.get("height")&&t._setC("height",a.p100);let e=this._root.horizontalLayout;t._setC("layout",e),t.labelsContainer.set("height",a.p100),t.axisHeader.set("layout",e)}_updatePositions(){let t=this.axis,e=t.y()-r.relativeToValue(t.get("centerY",0),t.height());t.gridContainer._setC("y",e),t.topGridContainer._setC("y",e),t.bulletsContainer._setC("x",this.x());let i=t.chart;if(i){let e=i.plotContainer,s=t.axisHeader,a=t.get("marginTop",0);s.children.length>0?(s.isComputedSetting("height")&&s.remove("height"),a=t.axisHeader.height(),t._setC("marginTop",a+1)):s._setC("height",a),s.setAll({y:t.y()-a,x:-1,width:e.width()+2})}}axisLength(){return this.axis.innerHeight()}positionToPoint(t){return{x:0,y:this.positionToCoordinate(t)}}updateLabel(t,e,i,s){if(t){l.isNumber(e)||(e=0);let a=.5;a=l.isNumber(s)&&s>1?t.get("multiLocation",a):t.get("location",a);let o=this.get("opposite"),r=t.get("inside",this.get("inside",!1));o?(t._setC("x",0),r?t._setC("position","absolute"):t._setC("position","relative")):r?(t._setC("x",0),t._setC("position","absolute")):(t._setC("x",void 0),t._setC("position","relative")),l.isNumber(i)&&i!=e&&(e+=(i-e)*a),t._setC("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateGrid(t,e,i){if(t){l.isNumber(e)||(e=0);let s=t.get("location",.5);l.isNumber(i)&&i!=e&&(e+=(i-e)*s),t._setC("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateTick(t,e,i,s){if(t){l.isNumber(e)||(e=0);let a=.5;a=l.isNumber(s)&&s>1?t.get("multiLocation",a):t.get("location",a),l.isNumber(i)&&i!=e&&(e+=(i-e)*a),t._setC("y",this.positionToCoordinate(e));let o=t.get("length",0),r=t.get("inside",this.get("inside",!1));this.get("opposite")?(t._setC("x",0),r&&(o*=-1)):r||(o*=-1),t.set("draw",t=>{t.moveTo(0,0),t.lineTo(o,0)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateBullet(t,e,i){if(t){let s=t.get("sprite");if(s){l.isNumber(e)||(e=0);let a=t.get("location",.5);l.isNumber(i)&&i!=e&&(e+=(i-e)*a);let o=this.axis.roundAxisPosition(e,a),r=this.axis._bullets[o],n=1;if(this.get("opposite")&&(n=-1),t.get("stacked")){if(r){let t=r.get("sprite");t&&s._setC("x",t.x()+t.width()*n)}else s._setC("x",0)}this.axis._bullets[o]=t,s._setC("y",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){l.isNumber(e)||(e=0),l.isNumber(i)||(i=1);let s=this.positionToCoordinate(e),a=this.positionToCoordinate(i);this.fillDrawMethod(t,s,a)}}fillDrawMethod(t,e,i){t.set("draw",t=>{let s=this.axis.gridContainer.width(),a=this.height();i<e&&([i,e]=[e,i]),e>a||i<0||(t.moveTo(0,e),t.lineTo(s,e),t.lineTo(s,i),t.lineTo(0,i),t.lineTo(0,e))})}positionToCoordinate(t){return this._inversed?(t-this._start)*this._axisLength:(this._end-t)*this._axisLength}positionTooltip(t,e){this._positionTooltip(t,{x:0,y:this.positionToCoordinate(e)})}updateTooltipBounds(t){let e=this.get("inside"),i=this._display.toGlobal({x:0,y:0}),s=i.y,a=0,o=this.axisLength(),l="right";this.get("opposite")?e?(l="right",a=i.x-1e5):(l="left",a=i.x):e?(l="left",a=i.x):(l="right",a=i.x-1e5);let n={left:a,right:a+1e5,top:s,bottom:s+o},h=t.get("bounds");r.sameBounds(n,h)||(t.set("bounds",n),t._setC("pointerOrientation",l))}_updateLC(){let t=this.axis,e=t.parent;
1if(e){let i=e.innerHeight();this._lc=this.axisLength()/i,this._ls=t.y()/i}}toAxisPosition(t){let e=this._start||0,i=this._end||1;return t=(t-=this._ls)*(i-e)/this._lc,this.get("inversed")?e+t:i-t}toGlobalPosition(t){let e=this._start||0,i=this._end||1;return this.get("inversed")?t-=e:t=i-t,(t=t/(i-e)*this._lc)+this._ls}fixPosition(t){return this.get("inversed")?t:1-t}}n.className="AxisRendererY",n.classNames=s.AxisRenderer.classNames.concat([n.className]),e.AxisRendererY=n},9740:function(t,e,i){var s=i(32590);class a extends s.Tick{constructor(){super(...arguments),this._tickPoints=[]}}a.className="AxisTick",a.classNames=s.Tick.classNames.concat([a.className]),e.AxisTick=a},74837:function(t,e,i){var s=i(72049),a=i(22682),o=i(229),l=i(11433),r=i(78256),n=i(73226),h=i(16644),d=i(45140),g=i(23798);class u extends a.ValueAxis{constructor(){super(...arguments),this._dataGrouped=!1,this._seriesDataGrouped=!1,this._groupingCalculated=!1,this._intervalDuration=1,this._baseDuration=1,this._intervalMax={},this._intervalMin={}}_afterNew(){this._settings.themeTags=d.mergeTags(this._settings.themeTags,["axis"]),super._afterNew(),this.addTag("date"),this._setBaseInterval(this.get("baseInterval")),this.on("baseInterval",()=>{this._setBaseInterval(this.get("baseInterval"))})}_setBaseInterval(t){this.setPrivateRaw("baseInterval",t),this._baseDuration=g.getIntervalDuration(t)}_prepareChildren(){(this.isDirty("startLocation")||this.isDirty("endLocation"))&&(this._dirtyExtremes=!0),(this.isDirty("markUnitChange")||this.isDirty("skipFirstMinor")||this.isDirty("weekLabelLocation"))&&(this._sizeDirty=!0),super._prepareChildren()}_fixZoomFactor(){let t=this.get("maxZoomFactor");null!=t&&t!=1/0?this.setPrivateRaw("maxZoomFactor",t):this.setPrivateRaw("maxZoomFactor",Math.round((this.getPrivate("max",0)-this.getPrivate("min",0))/this.baseMainDuration()))}_groupData(){let t=this.getPrivate("min"),e=this.getPrivate("max");if(o.isNumber(t)&&o.isNumber(e)){this._fixZoomFactor();let t=this.getPrivate("groupInterval");if(t?this._setBaseInterval(t):this._setBaseInterval(this.get("baseInterval")),this.isDirty("groupInterval")){let t=this.get("groupInterval");t&&(this.setRaw("groupIntervals",[t]),this._handleRangeChange())}if(this.isDirty("groupData")&&!this._dataGrouped){if(this.get("groupData"))n.each(this.series,t=>
1{this._groupSeriesData(t)}),this._handleRangeChange();else{let t=this.get("baseInterval"),e=t.timeUnit+t.count;n.each(this.series,t=>{t.setDataSet(e),t.resetGrouping()}),this._setBaseInterval(t),this.setPrivateRaw("groupInterval",void 0),this.markDirtyExtremes()}this._dataGrouped=!0}}}_groupSeriesData(t){if(this.get("groupData")&&!t.get("groupDataDisabled")){let e,i=this.get("groupIntervals");if(!i)return;this._dataGrouped=!0,this._seriesDataGrouped=!0;let a=[],l=this.baseMainDuration();n.each(i,t=>{g.getIntervalDuration(t)>l&&a.push(t)}),h.each(t._dataSets,(e,i)=>{i!=t._mainDataItems&&n.each(i,t=>{t.dispose()})}),t._dataSets={};let r=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),d=t.get("baseAxis");t.get("xAxis")===d?e=t._valueYFields:t.get("yAxis")===d&&(e=t._valueXFields);let u=t._mainDataItems,c=this.get("baseInterval"),p=c.timeUnit+c.count;t._dataSets[p]=u;let m=t.get("groupDataCallback"),_=t.get("groupDataWithOriginals",!1);m&&(_=!0),n.each(a,i=>{let a,l=-1/0,d=i.timeUnit+i.count;t._dataSets[d]=[];let c={},p={},x={},v={};n.each(e,e=>{c[e]=0,p[e]=0,x[e]=t.get(e+"Grouped"),v[e]=e+"Working"});let y,f,b=g.getDuration(i.timeUnit);u[0]&&(y=u[0].get(r)),n.each(u,u=>{let D,P=u.get(r),w=g.roun(P,i.timeUnit,i.count,this._root,y);if(l<w-b/24)D=h.copy(u.dataContext),(a=new s.DataItem(t,D,t._makeDataItem(D))).setRaw(r,w),t._dataSets[d].push(a),n.each(e,t=>{let e=u.get(t);o.isNumber(e)?(a.setRaw(t,e),a.setRaw(v[t],e),p[t]=1,c[t]=e):(c[t]=0,p[t]=0)}),_&&a.set("originals",[u]),m&&f&&m(f,i),f=a;else{let t=!1;if(n.each(e,e=>{let i=x[e],s=u.get(e);if(null!=s){t=!0;let o=a.get(e);switch(i){case"close":a.setRaw(e,s);break;case"sum":a.setRaw(e,o+s);break;case"open":break;case"low":s<o&&a.setRaw(e,s);break;case"high":s>o&&a.setRaw(e,s);break;case"average":p[e]++,c[e]+=s;let l=c[e]/p[e];a.setRaw(e,l);break;case"extreme":Math.abs(s)>Math.abs(o)&&a.setRaw(e,s)}a.setRaw(v[e],a.get(e))}}),t){let t=h.copy(u.dataContext);t[r]=w,a.dataContext=t}_&&a.get("originals").push(u)}l=w}),m&&f&&m(f,i)}),t._dataSetId&&t._dataSets[t._dataSetId]?t.setDataSet(t._dataSetId):t.setDataSet(p),this.markDirtySize(),this._seriesAdded&&this._root.events.once("frameended",()=>{this.markDirtySize()})}}_clearDirty(){super._clearDirty(),this._groupingCalculated=!1,this._dataGrouped=!1}getGroupInterval(t){let e=this.get("baseInterval"),i=g.chooseInterval(0,t,this.get("groupCount",1/0),this.get("groupIntervals"));return g.getIntervalDuration(i)<g.getIntervalDuration(e)&&(i=Object.assign({},e)),i}getIntervalMax(t){return this._intervalMax[t.timeUnit+t.count]}getIntervalMin(t){return this._intervalMin[t.timeUnit+t.count]}_handleRangeChange(){super._handleRangeChange();let t=Math.round(this.getPrivate("selectionMin")),e=Math.round(this.getPrivate("selectionMax"));if(o.isNumber(t)&&o.isNumber(e)){if(0==this.get("endLocation")&&(e+=1),this.get("groupData")&&!this._groupingCalculated){this._groupingCalculated=!0;let i=this.get("groupInterval"),s=this.getPrivate("groupInterval"),a=e-t+(this.get("startLocation",0)+(1-this.get("endLocation",1))*this._baseDuration);if(s){let t=g.getIntervalDuration(s);a=Math.ceil(a/t)*t}if(i||(i=this.getGroupInterval(a)),i&&(!s||s.timeUnit!==i.timeUnit||s.count!==i.count||this._seriesDataGrouped)){this._seriesDataGrouped=!1,this.setPrivateRaw("groupInterval",i),this._setBaseInterval(i);let t=i.timeUnit+i.count;n.each(this.series,e=>{e.get("baseAxis")===this&&e.setDataSet(t)}),this.markDirtyExtremes(),this._root.events.once("frameended",()=>{this._root.events.once("frameended",()=>{let t="groupintervalchanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})})})}}n.each(this.series,i=>{if(i.get("baseAxis")===this){let s,a,o=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),l=n.getFirstSortedIndex(i.dataItems,e=>r.compare(e.get(o),t)).index;l>0&&(l-=1),e+=this._baseDuration*(1-this.get("endLocation",1));let h=n.getSortedIndex(i.dataItems,t=>r.compare(t.get(o),e)).index,d=h;d>1&&d--;let g=i.dataItems[l],u=i.dataItems[d];g&&(a=g.get(o)),u&&(s=u.get(o));let c=!1;null!=s&&null!=a&&(s<t||a>e)&&(c=!0),i.setPrivate("outOfSelection",c),i.setPrivate("startIndex",l);let p=i._adjustStartIndex(l);i.getPrivate("adjustedStartIndex")!==p&&(i.setPrivate("adjustedStartIndex",p),this.root.events.once("frameended",()=>{i._markDirtyPrivateKey("adjustedStartIndex")})),i.setPrivate("endIndex",h)}})}}_adjustMinMax(t,e,i,s){return{min:t,max:e,step:(e-t)/i}}intervalDuration(){return this._intervalDuration}_saveMinMax(t,e){let i=this.getPrivate("groupInterval");i||(i=this.get("baseInterval"));let s=i.timeUnit+i.count;this._intervalMin[s]=t,this._intervalMax[s]=e}_getM(t){return"day"==t||"month"==t||"year"==t?1.05:1.01}_getMinorInterval(t){var e;let i,s=t.count,a=t.timeUnit;return s>1&&(10==s||15==s?s=5:12==s?s=2:6==s?s=1:30==s?s=10:s<10&&(s=1),i={timeUnit:a,count:s}),"week"==a&&(i="week"!=(null===(e=this.getPrivate("baseInterval"))||void 0===e?void 0:e.timeUnit)?{timeUnit:"day",count:1}:{timeUnit:"week",count:1}),"year"==a&&1==s&&this.getPrivate("selectionMax",0)-this.getPrivate("selectionMin",0)<1264896e5&&(i={timeUnit:"month",count:1}),i}_prepareAxisItems(){let t=this.getPrivate("min"),e=this.getPrivate("max");if(o.isNumber(t)&&o.isNumber(e)){let e=this._root,i=Math.round(this.getPrivate("selectionMin")),a=Math.round(this.getPrivate("selectionMax")),l=this.get("renderer"),r=this.getPrivate("baseInterval"),h=i,d=0,u=this.get("gridIntervals"),c=g.chooseInterval(0,a-i,l.gridCount(),u);g.getIntervalDuration(c)<this._baseDuration&&(c=Object.assign({},r));let p=g.getIntervalDuration(c);this._intervalDuration=p;let m=g.getNextUnit(c.timeUnit),_=e.utc,x=e.timezone,v,y=(h=g.roun(i-p,c.timeUnit,c.count,e,t))-p,f=this.get("dateFormats");this.setPrivateRaw("gridInterval",c);let b=l.get("minorLabelsEnabled"),D=l.get("minorGridEnabled",b),P,w=0;D&&(P=this._getMinorInterval(c),w=g.getIntervalDuration(P));let k=0;for(;h<a+p;){let t;this.dataItems.length<d+1?(t=new s.DataItem(this,void 0,{}),this._dataItems.push(t),this.processDataItem(t)):t=this.dataItems[d],this._createAssets(t,[]),this._toggleDataItem(t,!0),t.setRaw("value",h),t.setRaw("labelEndValue",void 0);let i=h+g.getDuration(c.timeUnit,c.count*this._getM(c.timeUnit));i=g.roun(i,c.timeUnit,1,e),t.setRaw("endValue",i);let a=new Date(h);v=f[c.timeUnit],m&&this.get("markUnitChange")&&o.isNumber(y)&&"year"!=c.timeUnit&&g.checkChange(h,y,m,_,x)&&(v=this.get("periodChangeDateFormats")[c.timeUnit]);let r=t.get("label");r&&r.set("text",e.dateFormatter.format(a,v));let n=c.count;if("week"==c.timeUnit?null==r||r.set("location",this.get("weekLabelLocation",0)):null==r||r.set("location",l.labels.template.get("location")),D){n=1;let i=c.timeUnit;"week"==i&&this.get("skipFirstMinor")&&(i="day");let s=h+g.getDuration(i,this._getM(i));s=g.roun(s,i,1,e),t.setRaw("labelEndValue",s)}if(this._prepareDataItem(t,n),y=h,h=i,P){let t=P.timeUnit,i=P.count,a=this._getM(t);this.get("skipFirstMinor")||(y-=w*a);let o,l=g.roun(y+w*a,t,i,e,y),r=this.get("minorDateFormats",this.get("dateFormats"));for(;l<h-.01*w;){let n;this.minorDataItems.length<k+1?(n=new s.DataItem(this,void 0,{}),this.minorDataItems.push(n),this.processDataItem(n)):n=this.minorDataItems[k],this._createAssets(n,["minor"],!0),this._toggleDataItem(n,!0),n.setRaw("value",l);let h=l+g.getDuration(t,i*a);h=g.roun(h,t,1,e),n.setRaw("endValue",h);let d=new Date(l);v=r[t];let u=n.get("label");if(u&&b&&u.set("text",e.dateFormatter.format(d,v)),this._prepareDataItem(n,1),u&&!b&&u.setPrivate("visible",!1),l==o)break;if(!n.get("isRange")){let t=this.get("fillRule");t&&t(n)}o=l,l=h,k++}}if(h==y)break;d++}for(let t=d;t<this.dataItems.length;t++)this._toggleDataItem(this.dataItems[t],!1);for(let t=k;t<this.minorDataItems.length;t++)this._toggleDataItem(this.minorDataItems[t],!1);n.each(this.series,t=>{t.inited&&t._markDirtyAxes()})}this._updateGhost()}_updateFinals(t,e){this.setPrivateRaw("selectionMinFinal",this.positionToValue(t)),this.setPrivateRaw("selectionMaxFinal",this.positionToValue(e))}_getDelta(){this._deltaMinMax=this._baseDuration/2}_fixMin(t){let e=this.getPrivate("baseInterval"),i=e.timeUnit,s=g.roun(t,i,e.count,this._root),a=s+g.getDuration(i,e.count*this._getM(i));return s+((a=g.roun(a,i,1,this._root))-s)*this.get("startLocation",0)}_fixMax(t){let e=this.getPrivate("baseInterval"),i=e.timeUnit,s=g.roun(t,i,e.count,this._root),a=s+g.getDuration(i,e.count*this._getM(i));return s+((a=g.roun(a,i,1,this._root))-s)*this.get("endLocation",1)}_updateDates(t,e){}_handleSeriesRemoved(){this.setPrivate("baseInterval",this.get("baseInterval")),this.setPrivate("min",void 0),this.setPrivate("minFinal",void 0)}baseDuration(){return this._baseDuration}baseMainDuration(){return g.getIntervalDuration(this.get("baseInterval"))}
1processSeriesDataItem(t,e){let i=this.getPrivate("baseInterval");t.open||(t.open={}),t.close||(t.close={}),n.each(e,e=>{let s=t.get(e);if(o.isNumber(s)){let a=t.open[e],o=t.close[e];if(s>=a&&s<=o);else{let l=i.timeUnit,r=i.count;o=(a=g.roun(s,l,r,this._root))+g.getDuration(l,r*this._getM(l)),o=g.roun(o,l,1,this._root),t.open[e]=a,t.close[e]=o}this._updateDates(a,t.component)}})}_handleSizeDirty(){}getDataItemPositionX(t,e,i,s,a){let o,l,r;return a?r=t.get(e):(t.open&&t.close?(o=t.open[e],l=t.close[e]):l=o=t.get(e),r=o+(l-o)*i,r=this._baseValue+(r-this._baseValue)*s),this.valueToPosition(r)}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionY(t,e,i,s,a){let o,l,r;return a?r=t.get(e):(t.open&&t.close?(o=t.open[e],l=t.close[e]):l=o=t.get(e),r=o+(l-o)*i,r=this._baseValue+(r-this._baseValue)*s),this.valueToPosition(r)}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}roundAxisPosition(t,e){let i=this.positionToValue(t);i-=(e-.5)*this._baseDuration;let s=this.getPrivate("baseInterval");if(!o.isNaN(i)){let t=this._root.locale.firstDayOfWeek,a=s.timeUnit,o=this._root.utc,l=this._root.timezone,r=s.count;i=g.roun(i,a,r,this._root,this.getPrivate("min",0));let n=g.getDateIntervalDuration(s,new Date(i),t,o,l);return l&&(i=g.roun(i+.05*this._baseDuration,a,r,this._root,this.getPrivate("min",0)),n=g.getDateIntervalDuration(s,new Date(i+n*e),t,o,l)),this.valueToPosition(i+n*e)}return NaN}getTooltipText(t,e){if(null!=this.getPrivate("min")){let i=this.get("tooltipDateFormats")[this.getPrivate("baseInterval").timeUnit],s=this.positionToValue(t);if(o.isNumber(s)){let t=new Date(s),a=this.getPrivate("baseInterval"),o=g.getDateIntervalDuration(a,t,this._root.locale.firstDayOfWeek,this._root.utc,this._root.timezone);return!1!==e&&(t=new Date(s+this.get("tooltipIntervalOffset",-this.get("tooltipLocation",.5))*o)),this._root.dateFormatter.format(t,this.get("tooltipDateFormat",i))}}return""}getSeriesItem(t,e,i,s){let a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),o=this.positionToValue(e);null==i&&(i=.5),o-=(i-.5)*this._baseDuration;let l=n.getSortedIndex(t.dataItems,t=>{let e=0;return t.open&&(e=t.open[a]),r.compare(e,o)});if(s||t.get("snapTooltip")){let e=t.dataItems[l.index-1],i=t.dataItems[l.index];if(e&&i&&e.open&&i.close){let t=e.open[a],s=i.close[a];if(Math.abs(o-t)>Math.abs(o-s))return i}if(e)return e;if(i)return i}else{let e=t.dataItems[l.index-1];if(e&&e.open&&e.close){let t=e.open[a],i=e.close[a];if(o>=t&&o<=i)return e}}}shouldGap(t,e,i,s){let a=t.get(s);return e.get(s)-a>this._baseDuration*i}zoomToDates(t,e,i){this.zoomToValues(t.getTime(),e.getTime(),i)}zoomToValues(t,e,i){let s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",0));if(null!=this.getPrivate("min")&&null!=this.getPrivate("max")){if(this.get("groupData")){let s=this.getGroupInterval(e-t),a=this.get("baseInterval"),o=this.getIntervalMin(a),l=this.getIntervalMax(a)-1;l=g.roun(l,s.timeUnit,s.count,this.root)+this._getM(s.timeUnit)*g.getIntervalDuration(s),l=g.roun(l,s.timeUnit,s.count,this.root);let r=g.roun(o,s.timeUnit,s.count,this.root),n=g.roun(l,s.timeUnit,s.count,this.root);this.zoom((t-r)/(n-r),(e-r)/(n-r),i)}else this.zoom((t-s)/(a-s),(e-s)/(a-s),i)}}positionToDate(t){return new Date(this.positionToValue(t))}dateToPosition(t){return this.valueToPosition(t.getTime())}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return o.isNumber(t)&&o.isNumber(e)?this._intervalDuration/(t-e):.05}nextPosition(t){null==t&&(t=1);let e=this.get("tooltipLocation",.5)*this._baseDuration;"Y"==this.get("renderer").getPrivate("letter")&&(t*=-1);let i=this.positionToValue(this.getPrivate("tooltipPosition",0)),s=this.getPrivate("baseInterval"),a=this._nextTime(i,t,s),o=this.getPrivate("selectionMin",0),r=this.getPrivate("selectionMax",0),n=g.roun(o,s.timeUnit,s.count,this._root),h=g.roun(r,s.timeUnit,s.count,this._root);return a+=e,a=l.fitToRange(a,n+e,h-e),this.toGlobalPosition(this.valueToPosition(a))}_nextTime(t,e,i){return g.roun(t+e*this._baseDuration,i.timeUnit,i.count,this._root)}}
1u.className="DateAxis",u.classNames=a.ValueAxis.classNames.concat([u.className]),e.DateAxis=u},26801:function(t,e,i){var s=i(56340);class a extends s.Graphics{_beforeChanged(){super._beforeChanged(),(this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}}a.className="Grid",a.classNames=s.Graphics.classNames.concat([a.className]),e.Grid=a},22682:function(t,e,i){var s=i(72049),a=i(40472),o=i(37847),l=i(229),r=i(73226),n=i(11433),h=i(45140);class d extends a.Axis{constructor(){super(...arguments),this._dirtyExtremes=!1,this._dirtySelectionExtremes=!1,this._dseHandled=!1,this._deltaMinMax=1,this._baseValue=0,this._minLogAdjusted=1}markDirtyExtremes(){this._dirtyExtremes=!0,this.markDirty()}markDirtySelectionExtremes(){this._dirtySelectionExtremes=!0,this.markDirty()}_isSynced(){return null!=this.get("syncWithAxis")}_afterNew(){this._settings.themeTags=h.mergeTags(this._settings.themeTags,["axis"]),this.setPrivateRaw("name","value"),this.addTag("value"),super._afterNew()}_prepareChildren(){var t;if(super._prepareChildren(),this.isDirty("syncWithAxis")){this._prevSettings.syncWithAxis&&this._syncDp&&this._syncDp.dispose();let t=this.get("syncWithAxis");if(t){let e=()=>{this.get("autoZoom",!0)?this.markDirtySelectionExtremes():this.markDirtyExtremes()};this._syncDp=new o.MultiDisposer([t.onPrivate("selectionMinFinal",e),t.onPrivate("selectionMaxFinal",e),t.onPrivate("selectionStepFinal",e),t.onPrivate("minFinal",e),t.onPrivate("maxFinal",e),t.onPrivate("step",e)])}}this.isDirty("syncZeros")&&(this._dirtyExtremes=!0,this._dirtySelectionExtremes=!0);let e=!1;(this.isDirty("min")||this.isDirty("max")||this.isDirty("maxPrecision")||this.isDirty("numberFormat"))&&(e=!0,null===(t=this.ghostLabel)||void 0===t||t.set("text",""));let i=this.getPrivate("selectionStepFinal");if((this._sizeDirty||this._dirtyExtremes||this._valuesDirty||e||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("extraMin")||this.isDirty("extraMax")||this.isDirty("logarithmic")||this.isDirty("treatZeroAs")||this.isDirty("baseValue")||this.isDirty("strictMinMax")||this.isDirty("strictMinMaxSelection"))&&(this._getMinMax(),this._dirtyExtremes=!1),this._handleSizeDirty(),this._dirtySelectionExtremes&&!this._isPanning&&this.get("autoZoom",!0)){let t=this.chart,e=!1;if(t){let i=this.get("renderer").getPrivate("letter");"Y"==i?t.xAxes.each(t=>{"ValueAxis"!=t.className&&(e=!0)}):"X"==i&&t.yAxes.each(t=>{"ValueAxis"!=t.className&&(e=!0)})}e&&this._getSelectionMinMax(),this._dirtySelectionExtremes=!1}this._groupData(),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("min")||this.isPrivateDirty("selectionMax")||this.isPrivateDirty("selectionMin")||this.isPrivateDirty("max")||this.isPrivateDirty("step")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("logarithmic")||i!==this.getPrivate("selectionStepFinal"))&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges()),this._baseValue=this.baseValue()}_handleSizeDirty(){this._sizeDirty&&!this._dseHandled&&(this._dirtySelectionExtremes=!0,this._dseHandled=!0,this.getPrivate("selectionMinFinal")==this.getPrivate("selectionMin")&&this.getPrivate("selectionMaxFinal")==this.getPrivate("selectionMax")||(this._dirtySelectionExtremes=!1))}_clearDirty(){super._clearDirty(),this._dseHandled=!1}_groupData(){}_cleanLogValue(t){if(!(t>0))return t;let e=10-Math.floor(Math.log(t)*Math.LOG10E);return e>280?t:n.round(t,e)}_formatText(t){let e=this.get("numberFormat"),i=this.getNumberFormatter(),s="";if(e)s=i.format(t,e);else{let e=0;this.get("logarithmic")&&l.isNumber(t)&&0!=t&&(e=Math.min(h.decimalPlaces(t),20)),s=e>5?i.format(t,"#,###."+Array(e+1).join("#")):i.format(t,void 0,this.getPrivate("stepDecimalPlaces"))}return s}_prepareAxisItems(){let t=this.getPrivate("min"),e=this.getPrivate("max");if(l.isNumber(t)&&l.isNumber(e)){let e=this.get("logarithmic"),i=this.getPrivate("step"),a=this.getPrivate("selectionMin"),o=this.getPrivate("selectionMax")+i,h=this.get("renderer").gridCount(),d=a-i,g=1,u=t,c=1,p=0;if(e){if((d=this._minLogAdjusted)<a)for(;d<a;)d+=i;if((u=d)<=0){let t=this._minRealLog;l.isNumber(t)||(t=1),u=Math.pow(10,Math.log(t)*Math.LOG10E),i<1&&(u=l.isNumber(this._minRealLog)?this._minRealLog:1e-50)}(g=Math.log(o-i)*Math.LOG10E-Math.log(u)*Math.LOG10E)>2&&(d=Math.pow(10,p=Math.floor(Math.log(u)*Math.LOG10E/(c=Math.max(1,Math.min(Math.ceil(g/Math.max(1,h)),Math.floor(g)))))*c))}let m=this.get("renderer"),_=m.get("minorLabelsEnabled"),x=m.get("minorGridEnabled",_),v=Math.round(i/Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E))),y=2;n.round(v/5,10)%1==0&&(y=5),n.round(v/10,10)%1==0&&(y=10);let f=i/y,b=0,D=0,P=-1/0;for(;d<o;){let t;this.dataItems.length<b+1?(t=new s.DataItem(this,void 0,{}),this._dataItems.push(t),this.processDataItem(t)):t=this.dataItems[b],this._createAssets(t,[]),this._toggleDataItem(t,!0);let a=e?this._cleanLogValue(d):d;t.setRaw("value",a);let o=t.get("label");o&&o.set("text",this._formatText(a)),this._prepareDataItem(t);let l=d;if(e&&g>2?l=Math.pow(10,p+(b+1)*c):l+=i,x){let t=d+f;
1for(e&&(g>2&&(f=this._adjustMinMax(d,l,10).step),t=d+f);t<l-1e-11*i;){let i;this.minorDataItems.length<D+1?(i=new s.DataItem(this,void 0,{}),this.minorDataItems.push(i),this.processDataItem(i)):i=this.minorDataItems[D],this._createAssets(i,["minor"],!0),this._toggleDataItem(i,!0);let a=e?this._cleanLogValue(t):t;i.setRaw("value",a);let o=i.get("label");o&&_&&o.set("text",this._formatText(a)),this._prepareDataItem(i),o&&!_&&o.setPrivate("visible",!1),t+=f,D++}}if(P==(d=l))break;let r=Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E));if(r<1&&!e){let t=Math.round(Math.abs(Math.log(Math.abs(r))*Math.LOG10E))+2;d=n.round(d,t)}b++,e&&g<=2&&d-i<i&&(d=i),P=d}for(let t=b;t<this.dataItems.length;t++)this._toggleDataItem(this.dataItems[t],!1);for(let t=D;t<this.minorDataItems.length;t++)this._toggleDataItem(this.minorDataItems[t],!1);r.each(this.series,t=>{t.inited&&t._markDirtyAxes()}),this._updateGhost()}}_prepareDataItem(t,e){let i=this.get("renderer"),s=t.get("value"),a=t.get("endValue"),o=this.valueToPosition(s),r=o,n=this.valueToPosition(s+this.getPrivate("step"));l.isNumber(a)&&(n=r=this.valueToPosition(a)),t.get("isRange")&&null==a&&(n=o);let h=r,d=t.get("labelEndValue");null!=d&&(h=this.valueToPosition(d)),i.updateLabel(t.get("label"),o,h,e);let g=t.get("grid");if(i.updateGrid(g,o,r),g&&(s==this.get("baseValue",0)?(g.addTag("base"),g._applyThemes()):g.hasTag("base")&&(g.removeTag("base"),g._applyThemes())),i.updateTick(t.get("tick"),o,h,e),i.updateFill(t.get("axisFill"),o,n),this._processBullet(t),i.updateBullet(t.get("bullet"),o,r),!t.get("isRange")){let e=this.get("fillRule");e&&e(t)}}_handleRangeChange(){let t,e=this.positionToValue(this.get("start",0)),i=this.positionToValue(this.get("end",1));if(this._isSynced()){e=this.getPrivate("selectionMinFinal",e),i=this.getPrivate("selectionMaxFinal",i);let s=this.getPrivate("selectionStepFinal");t=l.isNumber(s)&&s>0&&s<1/0?s:this._adjustMinMax(e,i,this.get("renderer").gridCount(),!0).step;let a=h.decimalPlaces(t);this.setPrivateRaw("stepDecimalPlaces",a)}else{let s=this.get("renderer").gridCount(),a=this._adjustMinMax(e,i,s,!0),o=h.decimalPlaces(a.step);this.setPrivateRaw("stepDecimalPlaces",o),e=n.round(e,o),i=n.round(i,o),t=(a=this._adjustMinMax(e,i,s,!0)).step,e=a.min,i=a.max}this.getPrivate("selectionMin")===e&&this.getPrivate("selectionMax")===i&&this.getPrivate("step")===t||(this.setPrivateRaw("selectionMin",e),this.setPrivateRaw("selectionMax",i),this.setPrivateRaw("step",t))}positionToValue(t){let e=this.getPrivate("min"),i=this.getPrivate("max");return this.get("logarithmic")?Math.pow(Math.E,(t*(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)+Math.log(e)*Math.LOG10E)/Math.LOG10E):t*(i-e)+e}valueToPosition(t){let e=this.getPrivate("min"),i=this.getPrivate("max");if(this.get("logarithmic")){if(t<=0){let e=this.get("treatZeroAs");l.isNumber(e)&&(t=e)}return(Math.log(t)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)}return(t-e)/(i-e)}valueToFinalPosition(t){let e=this.getPrivate("minFinal"),i=this.getPrivate("maxFinal");if(this.get("logarithmic")){if(t<=0){let e=this.get("treatZeroAs");l.isNumber(e)&&(t=e)}return(Math.log(t)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)}return(t-e)/(i-e)}getX(t,e,i){t=i+(t-i)*e;let s=this.valueToPosition(t);return this._settings.renderer.positionToCoordinate(s)}getY(t,e,i){t=i+(t-i)*e;let s=this.valueToPosition(t);return this._settings.renderer.positionToCoordinate(s)}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionX(t,e,i,s){let a=t.get(e);return a=t.get("stackToItemX")?a*s+t.component.getStackedXValueWorking(t,e):this._baseValue+(a-this._baseValue)*s,this.valueToPosition(a)}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}getDataItemPositionY(t,e,i,s){let a=t.get(e);return a=t.get("stackToItemY")?a*s+t.component.getStackedYValueWorking(t,e):this._baseValue+(a-this._baseValue)*s,this.valueToPosition(a)}basePosition(){return this.valueToPosition(this.baseValue())}baseValue(){let t=Math.min(this.getPrivate("minFinal",-1/0),this.getPrivate("selectionMin",-1/0)),e=Math.max(this.getPrivate("maxFinal",1/0),this.getPrivate("selectionMax",1/0)),i=this.get("baseValue",0);return i<t&&(i=t),i>e&&(i=e),i}cellEndValue(t){return t}fixSmallStep(t){return 1+t===1?(t*=2,this.fixSmallStep(t)):t}_fixMin(t){return t}_fixMax(t){return t}_calculateTotals(){if(this.get("calculateTotals")){let t=this.series[0];if(t){let e=t.startIndex();if(t.dataItems.length>0){e>0&&e--;let i,s,a=t.endIndex();a<t.dataItems.length&&a++,t.get("yAxis")==this?(i="valueY",s="vcy"):t.get("xAxis")==this&&(i="valueX",s="vcx");let o=i+"Working";if(i){let t=this.series.length,r=[],n=[];for(let e=0;e<t;e++){let t=this.series[e];t.get("excludeFromTotal")||(r.push(t),n.push(t.get(s)))}let h=r.length,d=i+"Total",g=i+"Sum",u=i+"TotalPercent";for(let t=e;t<a;t++){let e=0,i=0;for(let s=0;s<h;s++){let a=r[s].dataItems[t];if(a){let t=a.get(o)*n[s];l.isNaN(t)||(e+=t,i+=Math.abs(t))}}for(let s=0;s<h;s++){let a=r[s].dataItems[t];if(a){let t=a.get(o)*n[s];l.isNaN(t)||(a.set(d,i),a.set(g,e),a.set(u,0==i?0:t/i*100))}}}}}}}}_getSelectionMinMax(){let t=this.getPrivate("minFinal"),e=this.getPrivate("maxFinal"),i=this.get("min"),s=this.get("max"),a=this.get("extraMin",0),o=this.get("extraMax",0);this.get("logarithmic")&&(null==this.get("extraMin")&&(a=.1),null==this.get("extraMax")&&(o=.2));let h=this.get("renderer").gridCount(),d=this.get("strictMinMaxSelection"),g=this.get("strictMinMax");if(l.isNumber(t)&&l.isNumber(e)){let u=e,c=t;if(r.each(this.series,t=>{if(!t.get("ignoreMinMax")){let e,i;let s=t.getPrivate("outOfSelection");if(t.get("xAxis")===this){if(!s){let s=t.getPrivate("minX"),a=t.getPrivate("maxX");0==t.startIndex()&&t.endIndex()==t.dataItems.length||(s=void 0,a=void 0),e=t.getPrivate("selectionMinX",s),i=t.getPrivate("selectionMaxX",a)}}else if(t.get("yAxis")===this&&!s){let s=t.getPrivate("minY"),a=t.getPrivate("maxY");0==t.startIndex()&&t.endIndex()==t.dataItems.length||(s=void 0,a=void 0),e=t.getPrivate("selectionMinY",s),i=t.getPrivate("selectionMaxY",a)}t.isHidden()||t.isShowing()||(l.isNumber(e)&&(u=Math.min(u,e)),l.isNumber(i)&&(c=Math.max(c,i)))}}),this.axisRanges.each(t=>{if(t.get("affectsMinMax")){let e=t.get("value");null!=e&&(u=Math.min(u,e),c=Math.max(c,e)),null!=(e=t.get("endValue"))&&(u=Math.min(u,e),c=Math.max(c,e))}}),u>c&&([u,c]=[c,u]),l.isNumber(i)?u=g?i:t:g&&l.isNumber(this._minReal)&&(u=this._minReal),l.isNumber(s)?c=g?s:e:g&&l.isNumber(this._maxReal)&&(c=this._maxReal),u===c){let e=u;if(u-=this._deltaMinMax,c+=this._deltaMinMax,u<t){let i=e-t;0==i&&(i=this._deltaMinMax),u=e-i,c=e+i,g=!0}let i=this._adjustMinMax(u,c,h,g);u=i.min,c=i.max}let p=u,m=c,_=c-u;u-=_*a,c+=_*o;let x=this._adjustMinMax(u,c,h);u=x.min,c=x.max,u=n.fitToRange(u,t,e),c=n.fitToRange(c,t,e),x=this._adjustMinMax(u,c,h,!0),g||(u=x.min,c=x.max);let v=this.get("syncWithAxis");if(v&&(u=(x=this._syncAxes(u,c,x.step,v.getPrivate("selectionMinFinal",v.getPrivate("minFinal",0)),v.getPrivate("selectionMaxFinal",v.getPrivate("maxFinal",1)),v.getPrivate("selectionStepFinal",v.getPrivate("step",1)))).min,c=x.max),g&&!v&&(l.isNumber(i)&&(u=Math.max(u,i)),l.isNumber(s)&&(c=Math.min(c,s))),d&&!v&&(u=p-(m-p)*a,c=m+(m-p)*o),g&&!v){u=l.isNumber(i)?i:p,(c=l.isNumber(s)?s:m)-u<=1e-8&&(u-=this._deltaMinMax,c+=this._deltaMinMax);let t=c-u;u-=t*a,c+=t*o}this.get("logarithmic")&&(u<=0&&(u=p*(1-Math.min(a,.99))),u<t&&(u=t),c>e&&(c=e));let y=Math.min(20,Math.ceil(Math.log(this.getPrivate("maxZoomFactor",100)+1)/Math.LN10)+2),f=n.round(this.valueToFinalPosition(u),y),b=n.round(this.valueToFinalPosition(c),y);this.setPrivateRaw("selectionMinFinal",u),this.setPrivateRaw("selectionMaxFinal",c),this.setPrivateRaw("selectionStepFinal",x.step),this.zoom(f,b)}}_getMinMax(){let t=this.get("min"),e=this.get("max"),i=1/0,s=-1/0,a=this.get("extraMin",0),o=this.get("extraMax",0);this.get("logarithmic")&&(this.get("strictMinMax")||(null==this.get("extraMin")&&(a=.1),null==this.get("extraMax")&&(o=.2)));let h=1/0;
1if(r.each(this.series,t=>{if(!t.get("ignoreMinMax")){let e,a;if(t.get("xAxis")===this?(e=t.getPrivate("minX"),a=t.getPrivate("maxX")):t.get("yAxis")===this&&(e=t.getPrivate("minY"),a=t.getPrivate("maxY")),l.isNumber(e)&&l.isNumber(a)){i=Math.min(i,e),s=Math.max(s,a);let t=a-e;t<=0&&(t=Math.abs(a/100)),t<h&&(h=t)}}}),this.axisRanges.each(t=>{if(t.get("affectsMinMax")){let e=t.get("value");null!=e&&(i=Math.min(i,e),s=Math.max(s,e)),null!=(e=t.get("endValue"))&&(i=Math.min(i,e),s=Math.max(s,e))}}),this.get("logarithmic")){let t=this.get("treatZeroAs");l.isNumber(t)&&i<=0&&(i=t)}if(0===i&&0===s&&(s=.9,i=-.9),l.isNumber(t)&&(i=t),l.isNumber(e)&&(s=e),i===1/0||s===-1/0)return this.setPrivate("minFinal",void 0),void this.setPrivate("maxFinal",void 0);i>s&&([i,s]=[s,i]);let d=i,g=s,u=this.adapters.fold("min",i),c=this.adapters.fold("max",s);this._minRealLog=i,l.isNumber(u)&&(i=u),l.isNumber(c)&&(s=c),i=this._fixMin(i),(s=this._fixMax(s))-i<=1e-15&&(s-i!=0?this._deltaMinMax=(s-i)/2:this._getDelta(s),i-=this._deltaMinMax,s+=this._deltaMinMax),i-=(s-i)*a,s+=(s-i)*o,this.get("logarithmic")&&(i<0&&d>=0&&(i=0),s>0&&g<=0&&(s=0)),this._minReal=i,this._maxReal=s;let p=this.get("strictMinMax"),m=this.get("strictMinMaxSelection",!1);m&&(p=m);let _=p;l.isNumber(e)&&(_=!0);let x=this.get("renderer").gridCount(),v=this._adjustMinMax(i,s,x,_);if(i=v.min,s=v.max,i=(v=this._adjustMinMax(i,s,x,!0)).min,s=v.max,p){i=l.isNumber(t)?t:this._minReal,(s=l.isNumber(e)?e:this._maxReal)-i<=1e-8&&(i-=this._deltaMinMax,s+=this._deltaMinMax);let r=s-i;i-=r*a,s+=r*o}u=this.adapters.fold("min",i),c=this.adapters.fold("max",s),l.isNumber(u)&&(i=u),l.isNumber(c)&&(s=c),h==1/0&&(h=s-i);let y=Math.round(Math.abs(Math.log(Math.abs(s-i))*Math.LOG10E))+5;i=n.round(i,y),s=n.round(s,y);let f=this.get("syncWithAxis");if(f&&(i=(v=this._syncAxes(i,s,v.step,f.getPrivate("minFinal",f.getPrivate("min",0)),f.getPrivate("maxFinal",f.getPrivate("max",1)),f.getPrivate("step",1))).min,s=v.max,this.get("autoZoom",!0)||(this.setPrivateRaw("selectionMinFinal",i),this.setPrivateRaw("selectionMaxFinal",s),this.setPrivateRaw("selectionStepFinal",v.step))),this.setPrivateRaw("maxZoomFactor",Math.max(1,Math.ceil((s-i)/h*this.get("maxZoomFactor",100)))),this._fixZoomFactor(),this.get("logarithmic")&&(this._minLogAdjusted=i,i=this._minReal,s=this._maxReal,i<=0&&(i=d*(1-Math.min(a,.99)))),l.isNumber(i)&&l.isNumber(s)&&(this.getPrivate("minFinal")!==i||this.getPrivate("maxFinal")!==s)){this.setPrivate("minFinal",i),this.setPrivate("maxFinal",s),this._saveMinMax(i,s);let t=this.get("interpolationDuration",0),e=this.get("interpolationEasing");this.animatePrivate({key:"min",to:i,duration:t,easing:e}),this.animatePrivate({key:"max",to:s,duration:t,easing:e})}}_fixZoomFactor(){}_getDelta(t){let e=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E));e/=10,this._deltaMinMax=e}_saveMinMax(t,e){}_adjustMinMax(t,e,i,s){i<=1&&(i=1),i=Math.round(i);let a=t,o=e,r=e-t;0===r&&(r=Math.abs(e));let h=Math.log(Math.abs(r))*Math.LOG10E,d=Math.pow(10,Math.floor(h)),g=d/=10;s&&(g=0),s?(t=Math.floor(t/d)*d,e=Math.ceil(e/d)*d):(t=Math.ceil(t/d)*d-g,e=Math.floor(e/d)*d+g),t<0&&a>=0&&(t=0),e>0&&o<=0&&(e=0),d=Math.pow(10,Math.floor(h=Math.log(Math.abs(r))*Math.LOG10E))/100;let u=Math.ceil(r/i/d)*d,c=Math.pow(10,Math.floor(Math.log(Math.abs(u))*Math.LOG10E)),p=Math.ceil(u/c);p>5?p=10:p<=5&&p>2&&(p=5),u=Math.ceil(u/(c*p))*c*p;let m=this.get("maxPrecision");if(l.isNumber(m)){let t=n.ceil(u,m);m<Number.MAX_VALUE&&u!==t&&0==(u=t)&&(u=1)}let _=0;c<1&&(_=Math.round(Math.abs(Math.log(Math.abs(c))*Math.LOG10E))+1,u=n.round(u,_));let x,v=Math.floor(t/u);return t=n.round(u*v,_),(x=s?Math.floor(e/u):Math.ceil(e/u))===v&&x++,(e=n.round(u*x,_))<o&&(e+=u),t>a&&(t-=u),u=this.fixSmallStep(u),{min:t,max:e,step:u}}getTooltipText(t,e){let i=this.get("tooltipNumberFormat",this.get("numberFormat")),s=this.getNumberFormatter(),a=this.get("extraTooltipPrecision",0),o=this.getPrivate("stepDecimalPlaces",0)+a,l=n.round(this.positionToValue(t),o);return i?s.format(l,i):s.format(l,void 0,o)}getSeriesItem(t,e){let i,s,a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),o=this.positionToValue(e);if(r.each(t.dataItems,(t,e)=>{let l=Math.abs(t.get(a)-o);(void 0===i||l<s)&&(i=e,s=l)}),null!=i)return t.dataItems[i]}zoomToValues(t,e,i){let s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",1));null!=this.getPrivate("min")&&null!=this.getPrivate("max")&&this.zoom((t-s)/(a-s),(e-s)/(a-s),i)}_syncAxes(t,e,i,s,a,o){if(this.get("syncWithAxis")){let r=Math.round((a-s)/o);if(l.isNumber(r)&&r>0&&r<1/0){if(this.get("syncZeros")&&s<=0&&a>=0){let a=Math.round((0-s)/o),l=r-a;if(!(t<0&&0==a||e>0&&0==l)){let s=0;a>0&&t<0&&(s=Math.abs(t)/a),l>0&&e>0&&(s=Math.max(s,e/l)),0==s&&(s=(e-t)/r),s>0&&s<1/0&&(t=-(i=this._niceStep(s))*a,e=i*l)}}else{let s=(e-t)/r;if(s>0&&s<1/0){i=this._niceStep(s);let a=Math.floor(t/i)*i,o=a+i*r;o<e&&(o=(a=Math.ceil(e/i)*i-i*r)+i*r),t>=0&&a<0&&(a=0,o=i*r),e<=0&&o>0&&(o=0,a=-i*r),t=a,e=o}}}}return{min:t,max:e,step:i}}_niceStep(t){if(!l.isNumber(t)||t<=0||t==1/0)return 1;let e=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E)),i=t/e,s=(i=i<=1?1:i<=2?2:i<=5?5:10)*e;s>0&&s<1/0||(s=t);let a=this.get("maxPrecision");if(l.isNumber(a)){let t=n.ceil(s,a);a<Number.MAX_VALUE&&s!==t&&0==(s=t)&&(s=1)}return s}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return l.isNumber(t)&&l.isNumber(e)?this.getPrivate("step",1)/(t-e):.05}nextPosition(t){null==t&&(t=1),"Y"==this.get("renderer").getPrivate("letter")&&(t*=-1);let e=this.positionToValue(this.getPrivate("tooltipPosition",0));return e+=this.getPrivate("step",1)*t,e=n.fitToRange(e,this.getPrivate("selectionMin",0),this.getPrivate("selectionMax",1)),this.toGlobalPosition(this.valueToPosition(e))}}
1d.className="ValueAxis",d.classNames=a.Axis.classNames.concat([d.className]),e.ValueAxis=d},62929:function(t,e,i){var s=i(90741),a=i(56340),o=i(20856),l=i(99446),r=i(7474),n=i(72049),h=i(54320),d=i(229),g=i(73226),u=i(45140),c=i(85112),p=i(75390);class m extends s.XYSeries{constructor(){super(...arguments),this._strokeGenerator=c.default(),this._fillGenerator=p.default(),this.strokes=this.addDisposer(new l.ListTemplate(o.Template.new({}),()=>a.Graphics._new(this._root,{themeTags:u.mergeTags(this.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template]))),this.fills=this.addDisposer(new l.ListTemplate(o.Template.new({}),()=>a.Graphics._new(this._root,{themeTags:u.mergeTags(this.strokes.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template]))),this._previousPoint=[0,0,0,0],this._dindex=0,this._sindex=0}_afterNew(){this._fillGenerator.y0(function(t){return t[3]}),this._fillGenerator.x0(function(t){return t[2]}),this._fillGenerator.y1(function(t){return t[1]}),this._fillGenerator.x1(function(t){return t[0]}),super._afterNew()}makeStroke(t){let e=this.mainContainer.children.push(t.make());return t.push(e),e}makeFill(t){let e=this.mainContainer.children.push(t.make());return t.push(e),e}_updateChildren(){this._strokeTemplate=void 0,this._fillTemplate=void 0;let t=this.get("xAxis"),e=this.get("yAxis");if(this.isDirty("stroke")){let t=this.get("stroke");this.strokes.template._setC("stroke",t);let e=this._legendStroke;e&&e.states.lookup("default")._setC("stroke",t)}if(this.isDirty("fill")){let t=this.get("fill");this.fills.template._setC("fill",t);let e=this._legendFill;e&&e.states.lookup("default")._setC("fill",t)}if(this.isDirty("fillPattern")){let t=this.get("fillPattern");this.fills.template._setC("fillPattern",t);let e=this._legendFill;e&&e.states.lookup("default")._setC("fillPattern",t)}if(this.isDirty("curveFactory")){let t=this.get("curveFactory");t&&(this._strokeGenerator.curve(t),this._fillGenerator.curve(t))}if(t.inited&&e.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty||this.isDirty("connect")||this.isDirty("curveFactory")){let t=this.dataItems;this.fills.each(t=>{t.setPrivate("visible",!1)}),this.strokes.each(t=>{t.setPrivate("visible",!1)}),this.axisRanges.each(t=>{let e=t.fills;e&&e.each(t=>{t.setPrivate("visible",!1)});let i=t.strokes;i&&i.each(t=>{t.setPrivate("visible",!1)})});let e=this.startIndex(),i=this.strokes.template.get("templateField"),s=this.fills.template.get("templateField"),a=!0,o=!0;i&&(a=!1),s&&(o=!1);for(let l=e-1;l>=0;l--){let r=t[l],n=!0,h=r.dataContext;i&&h[i]&&(a=!0),s&&h[s]&&(o=!0);for(let t=0,e=this._valueFields.length;t<e;t++)if(!d.isNumber(r.get(this._valueFields[t]))){n=!1;break}if(n&&a&&o){e=l;break}}let l=t.length,r=this.endIndex();if(r<l){r++;for(let e=r;e<l;e++){let i=t[e],s=!0;for(let t=0,e=this._valueFields.length;t<e;t++)if(!d.isNumber(i.get(this._valueFields[t]))){s=!1;break}if(s){r=e+1;break}}}if(e>0&&e--,this._endIndex=r,this._clearGraphics(),this._sindex=0,this._dindex=e,1==l)this._startSegment(0);else for(;this._dindex<r-1;)this._startSegment(this._dindex),this._sindex++}}else this._skipped=!0;super._updateChildren()}_clearGraphics(){this.strokes.clear(),this.fills.clear(),this.axisRanges.each(t=>{t.fills.clear(),t.strokes.clear()})}_startSegment(t){let e;let i=this.dataItems,s=this._endIndex,a=s,l=this.get("autoGapCount"),r=this.get("connect"),n=this.makeFill(this.fills),h=this._fillTemplate,d=this.fills.template;h&&h!=d&&(n.template=h),n.setPrivate("visible",!0);let g=this.makeStroke(this.strokes),u=this._strokeTemplate;u&&u!=this.strokes.template&&(g.template=u),g.setPrivate("visible",!0);let c=this.get("xAxis"),p=this.get("yAxis"),m=this.get("baseAxis"),_=this.get("vcx",1),x=this.get("vcy",1),v=this._xField,y=this._yField,f=this._xOpenField,b=this._yOpenField,D=this.get("openValueXField"),P=this.get("openValueYField");D||(f=this._xField),P||(b=this._yField);let w=this.get("stacked"),k=c.basePosition(),A=p.basePosition();e=m===p?this._yField:this._xField;let T=[],C=[];T.push(C);let M=this.strokes.template.get("templateField"),S=this.fills.template.get("templateField"),I=this.get("locationX",.5),L=this.get("locationY",.5),R=this.get("openLocationX",I),F=this.get("openLocationY",L),Y=this.get("minDistance",0),X,N=this.fills.template.get("visible");this.axisRanges.length>0&&(N=!0);let V=!1;(w||D||P)&&(V=!0);let G={points:C,segments:T,stacked:w,getOpen:V,basePosX:k,basePosY:A,fillVisible:N,xField:v,yField:y,xOpenField:f,yOpenField:b,vcx:_,vcy:x,baseAxis:m,xAxis:c,yAxis:p,locationX:I,locationY:L,openLocationX:R,openLocationY:F,minDistance:Y},E=this._strokeTemplate,O=this._fillTemplate;
1for(X=t;X<a;X++){this._dindex=X;let s=i[X],h=s.get(v),d=s.get(y);if(null==h||null==d?r||(C=[],T.push(C),G.points=C):this._getPoints(s,G),M){let e=s.dataContext[M];if(e){if(e instanceof o.Template||(e=o.Template.new(e)),this._strokeTemplate=e,X>t){a=X;break}E=e,g.template=e}}if(S){let e=s.dataContext[S];if(e){if(e instanceof o.Template||(e=o.Template.new(e)),this._fillTemplate=e,X>t){a=X;break}O=e,n.template=e}}if(!r){let t=i[X+1];t&&m.shouldGap(s,t,l,e)&&(C=[],T.push(C),G.points=C)}}n.setRaw("userData",[t,X]),g.setRaw("userData",[t,X]),X===s&&this._endLine(C,T[0][0]),g&&this._drawStroke(g,T),n&&this._drawFill(n,T),this.axisRanges.each(e=>{let i=e.container,s=e.fills,a=this.makeFill(s);i&&i.children.push(a),a.setPrivate("visible",!0),this._drawFill(a,T);let o=e.strokes,l=this.makeStroke(o);i&&i.children.push(l),E&&E!=this.strokes.template&&(l.template=E),O&&O!=this.fills.template&&(a.template=O),l.setPrivate("visible",!0),this._drawStroke(l,T),a.setRaw("userData",[t,X]),l.setRaw("userData",[t,X])})}_getPoints(t,e){let i=e.points,s=t.get("locationX",e.locationX),a=t.get("locationY",e.locationY),o=this.get("exactLocationX",!1),l=this.get("exactLocationY",!1),r=e.xAxis.getDataItemPositionX(t,e.xField,s,e.vcx,o),n=e.yAxis.getDataItemPositionY(t,e.yField,a,e.vcy,l);if(this._shouldInclude(r)){let s=this.getPoint(r,n),a=[s.x,s.y];if(s.x+=this._x,s.y+=this._y,t.set("point",s),e.fillVisible){let i=r,s=n;if(e.baseAxis===e.xAxis?s=e.basePosY:e.baseAxis===e.yAxis&&(i=e.basePosX),e.getOpen){let a=t.get(e.xOpenField),r=t.get(e.yOpenField);if(null!=a&&null!=r){let a=t.get("openLocationX",e.openLocationX),r=t.get("openLocationY",e.openLocationY);if(e.stacked){let n=t.get("stackToItemX"),h=t.get("stackToItemY");n?(i=e.xAxis.getDataItemPositionX(n,e.xField,a,n.component.get("vcx"),o),d.isNaN(i)&&(i=e.basePosX)):i=e.yAxis===e.baseAxis?e.basePosX:e.xAxis.getDataItemPositionX(t,e.xOpenField,a,e.vcx,o),h?(s=e.yAxis.getDataItemPositionY(h,e.yField,r,h.component.get("vcy"),l),d.isNaN(s)&&(s=e.basePosY)):s=e.xAxis===e.baseAxis?e.basePosY:e.yAxis.getDataItemPositionY(t,e.yOpenField,r,e.vcy,l)}else i=e.xAxis.getDataItemPositionX(t,e.xOpenField,a,e.vcx,o),s=e.yAxis.getDataItemPositionY(t,e.yOpenField,r,e.vcy,l)}}let h=this.getPoint(i,s);a[2]=h.x,a[3]=h.y}if(e.minDistance>0){let t=a[0],s=a[1],o=a[2],l=a[3],r=this._previousPoint,n=r[0],h=r[1],d=r[2],g=r[3];(Math.hypot(t-n,s-h)>e.minDistance||o&&l&&Math.hypot(o-d,l-g)>e.minDistance)&&(i.push(a),this._previousPoint=a)}else i.push(a)}}_endLine(t,e){}_drawStroke(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",t=>{g.each(e,e=>{this._strokeGenerator.context(t),this._strokeGenerator(e)})})}_drawFill(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",t=>{g.each(e,e=>{this._fillGenerator.context(t),this._fillGenerator(e)})})}_processAxisRange(t){super._processAxisRange(t),t.fills=new l.ListTemplate(o.Template.new({}),()=>a.Graphics._new(this._root,{themeTags:u.mergeTags(t.fills.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template,t.fills.template])),t.strokes=new l.ListTemplate(o.Template.new({}),()=>a.Graphics._new(this._root,{themeTags:u.mergeTags(t.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template,t.strokes.template]))}createLegendMarker(t){let e=this.get("legendDataItem");if(e){let t=e.get("marker"),i=e.get("markerRectangle");i&&i.setPrivate("visible",!1),t.set("background",h.Rectangle.new(t._root,{fillOpacity:0,fill:r.color(0)}));let s=t.children.push(a.Graphics._new(t._root,{themeTags:["line","series","legend","marker","stroke"],interactive:!1},[this.strokes.template]));this._legendStroke=s;let o=t.children.push(a.Graphics._new(t._root,{themeTags:["line","series","legend","marker","fill"]},[this.fills.template]));this._legendFill=o;let l=this._root.interfaceColors.get("disabled");if(s.states._createC("disabled",{fill:l,stroke:l}),o.states._createC("disabled",{fill:l,stroke:l}),this.bullets.length>0){let e=this.bullets.getIndex(0);if(e){let i=e(t._root,this,new n.DataItem(this,{legend:!0},{}));if(i){let e=i.get("sprite");e instanceof a.Graphics&&e.states._createC("disabled",{fill:l,stroke:l}),e&&(this._applyBulletDefaultPaint(e),e.setAll({tooltipText:void 0,tooltipHTML:void 0,focusable:void 0,focusableGroup:void 0,ariaLabel:void 0}),t.children.push(e),e.setAll({x:t.width()/2,y:t.height()/2}),t.events.on("boundschanged",()=>{e.setAll({x:t.width()/2,y:t.height()/2})}))}}}}}}
1m.className="LineSeries",m.classNames=s.XYSeries.classNames.concat([m.className]),e.LineSeries=m},90741:function(t,e,i){var s=i(63884),a=i(72049),o=i(50153),l=i(99446),r=i(31284),n=i(56340),h=i(229),d=i(16644),g=i(73226),u=i(45140);function c(t,e){return null==t?e:null==e?t:e<t?e:t}function p(t,e){return null==t?e:null==e||t>e?t:e}class m extends o.Series{constructor(){super(...arguments),this._axesDirty=!1,this._stackDirty=!1,this._selectionProcessed=!1,this._dataSets={},this._x=0,this._y=0,this._bullets={},this.mainContainer=this.children.push(r.Container.new(this._root,{})),this.axisRanges=new l.List,this._skipped=!1,this._couldStackTo=[],this._reallyStackedTo={},this._stackedSeries={},this._aLocationX0=0,this._aLocationX1=1,this._aLocationY0=0,this._aLocationY1=1,this._showBullets=!0,this.valueXFields=["valueX","openValueX","lowValueX","highValueX"],this.valueYFields=["valueY","openValueY","lowValueY","highValueY"],this._emptyDataItem=new a.DataItem(this,void 0,{})}_afterNew(){this.fields.push("categoryX","categoryY","openCategoryX","openCategoryY"),this.valueFields.push("valueX","valueY","openValueX","openValueY","lowValueX","lowValueY","highValueX","highValueY"),this._setRawDefault("vcx",1),this._setRawDefault("vcy",1),this._setRawDefault("valueXShow","valueXWorking"),this._setRawDefault("valueYShow","valueYWorking"),this._setRawDefault("openValueXShow","openValueXWorking"),this._setRawDefault("openValueYShow","openValueYWorking"),this._setRawDefault("lowValueXShow","lowValueXWorking"),this._setRawDefault("lowValueYShow","lowValueYWorking"),this._setRawDefault("highValueXShow","highValueXWorking"),this._setRawDefault("highValueYShow","highValueYWorking"),this._setRawDefault("lowValueXGrouped","low"),this._setRawDefault("lowValueYGrouped","low"),this._setRawDefault("highValueXGrouped","high"),this._setRawDefault("highValueYGrouped","high");let t=this.get("xAxis");t&&(this._xRenderer=t.get("renderer"));let e=this.get("yAxis");e&&(this._yRenderer=e.get("renderer")),super._afterNew(),this._setC("maskContent",!0),this._disposers.push(this.on("xAxis",()=>{this._switchAxis("xAxis")})),this._disposers.push(this.on("yAxis",()=>{this._switchAxis("yAxis")})),this._disposers.push(this.axisRanges.events.onAll(t=>{if("clear"===t.type)g.each(t.oldValues,t=>{this._removeAxisRange(t)});else if("push"===t.type)this._processAxisRange(t.newValue);else if("setIndex"===t.type)this._processAxisRange(t.newValue);else if("insertIndex"===t.type)this._processAxisRange(t.newValue);else if("removeIndex"===t.type)this._removeAxisRange(t.oldValue);else{if("moveIndex"!==t.type)throw Error("Unknown IStreamEvent type");this._processAxisRange(t.value)}})),this.states._createC("hidden",{opacity:1,visible:!1}),this.onPrivate("startIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this.onPrivate("endIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this._makeFieldNames();let i=()=>{this._updateFields(),this._makeFieldNames(),this.markDirtyValues()};g.each([...this.valueXFields,...this.valueYFields],t=>{this.on(t+"Field",i)})}_processAxisRange(t){let e=r.Container.new(this._root,{});t.container=e,this.children.push(e),t.series=this;let i=t.axisDataItem;i.setRaw("isRange",!0);let s=i.component;if(s){s._processAxisRange(i,["range","series"]);let t=i.get("bullet");if(t){let e=t.get("sprite");e&&e.setPrivate("visible",!1)}let a=i.get("axisFill");a&&e._setC("mask",a),s._seriesAxisRanges.push(i)}}_onDataClear(){super._onDataClear(),d.each(this._dataSets,(t,e)=>{g.each(e,t=>{t.dispose()}),e.length=0})}_removeAxisRange(t){let e=t.axisDataItem,i=e.component;e.dispose(),g.remove(i._seriesAxisRanges,e);let s=t.container;s&&s.dispose()}_updateFields(){super._updateFields(),this._valueXFields=[],this._valueYFields=[],this._valueXShowFields=[],this._valueYShowFields=[],this.__valueXShowFields=[],this.__valueYShowFields=[],this.valueXFields&&g.each(this.valueXFields,t=>{if(this.get(t+"Field")){this._valueXFields.push(t);let e=this.get(t+"Show");this.__valueXShowFields.push(e),-1!=e.indexOf("Working")?this._valueXShowFields.push(e.split("Working")[0]):this._valueXShowFields.push(e)}}),this.valueYFields&&g.each(this.valueYFields,t=>{if(this.get(t+"Field")){this._valueYFields.push(t);let e=this.get(t+"Show");this.__valueYShowFields.push(e),-1!=e.indexOf("Working")?this._valueYShowFields.push(e.split("Working")[0]):this._valueYShowFields.push(e)}})}_dispose(){super._dispose(),this._bullets={};let t=this.chart;t&&t.series.removeValue(this);let e=this.get("xAxis");e&&g.removeFirst(e.series,this);let i=this.get("yAxis");i&&g.removeFirst(i.series,this)}_min(t,e){let i=c(this.getPrivate(t),e);this.setPrivate(t,i)}_max(t,e){let i=p(this.getPrivate(t),e);this.setPrivate(t,i)}_shouldMakeBullet(t){let e=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis");if(!e.inited||!i.inited)return!1;let a=this.get("minBulletDistance",0);if(a>0){let t=this.startIndex(),o=this.endIndex()-t;if(e==s){if(this._xRenderer.axisLength()/o<a/5)return!1}else if(i==s&&this._yRenderer.axisLength()/o<a/5)return!1}return null!=t.get(this._xField)&&null!=t.get(this._yField)}_makeFieldNames(){let t=this.get("xAxis"),e=this.get("yAxis"),i=t.getPrivate("name"),s=u.capitalizeFirst(i),a=e.getPrivate("name"),o=u.capitalizeFirst(a),l=t.get("renderer").getPrivate("letter"),r=e.get("renderer").getPrivate("letter"),n="open",h="high",d="Show";"ValueAxis"===t.className?(this._xField=this.get(i+l+d),this._xOpenField=this.get(n+s+l+d),this._xLowField=this.get("low"+s+l+d),this._xHighField=this.get(h+s+l+d)):(this._xField=i+l,this._xOpenField=n+s+l,this._xLowField="low"+s+l,this._xHighField=h+s+l),"ValueAxis"===e.className?(this._yField=this.get(a+r+d),this._yOpenField=this.get(n+o+r+d),this._yLowField=this.get("low"+o+r+d),this._yHighField=this.get(h+o+r+d)):(this._yField=a+r,this._yOpenField=n+o+r,this._yLowField="low"+o+r,this._yHighField=h+o+r)}_fixVC(){let t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis"),s=this.states.lookup("hidden"),a=this.get("sequencedInterpolation");if(s){let o=0;a&&(o=.999999999999),t===i?s._setC("vcy",o):(e===i||s._setC("vcy",o),s._setC("vcx",o))}}_handleMaskBullets(){this.isDirty("maskBullets")&&this.bulletsContainer.set("maskContent",this.get("maskBullets"))}_fixPosition(){let t=this.get("xAxis"),e=this.get("yAxis");this._setC("x",t.x()-u.relativeToValue(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0)),this._setC("y",e.y()-u.relativeToValue(e.get("centerY",0),e.height())-e.parent.get("paddingTop",0)),this.bulletsContainer.set("y",this.y()),this.bulletsContainer.set("x",this.x())}_switchAxis(t){let e=this._prevSettings[t],i=this.get(t);if(e&&i&&e!==i){g.remove(e.series,this);let s="xAxis"==t?this._posXDp:this._posYDp;if(s&&s.dispose(),e.markDirtyExtremes(),this.get("baseAxis")===e){if(this._computedProperties.baseAxis){let t=this.get("xAxis"),e=this.get("yAxis");
1if(t&&e){let i=e.isType("CategoryAxis")||e.isType("DateAxis");this._setC("baseAxis",i?e:t)}else this._setC("baseAxis",i)}else this.set("baseAxis",i)}g.move(i.series,this);let a=this.addDisposer(i.events.on("positionchanged",()=>{this._fixPosition()}));"xAxis"==t?this._posXDp=a:this._posYDp=a,i.markDirtyExtremes(),i._seriesAdded=!0,this._markDirtyAxes()}}_prepareChildren(){let t,e;super._prepareChildren(),this._xRenderer=this.get("xAxis").get("renderer"),this._yRenderer=this.get("yAxis").get("renderer"),this._bullets={},(this.isDirty("valueYShow")||this.isDirty("valueXShow")||this.isDirty("openValueYShow")||this.isDirty("openValueXShow")||this.isDirty("lowValueYShow")||this.isDirty("lowValueXShow")||this.isDirty("highValueYShow")||this.isDirty("highValueXShow"))&&(this._updateFields(),this._makeFieldNames(),this._valuesDirty=!0),(this.isDirty("xAxis")||this.isDirty("yAxis"))&&(this._valuesDirty=!0),(this.isDirty("locationX")||this.isDirty("locationY")||this.isDirty("openLocationX")||this.isDirty("openLocationY")||this.isDirty("exactLocationX")||this.isDirty("exactLocationY"))&&(this._valuesDirty=!0),this._setC("width",this.get("xAxis").width()),this._setC("height",this.get("yAxis").height()),this._handleMaskBullets();let i=this.get("xAxis"),s=this.get("yAxis"),a=this.get("baseAxis");switch(this.get("tooltipPositionX")){case"open":t=this._xOpenField;break;case"low":t=this._xLowField;break;case"high":t=this._xHighField;break;default:t=this._xField}switch(this._tooltipFieldX=t,this.get("tooltipPositionY")){case"open":e=this._yOpenField;break;case"low":e=this._yLowField;break;case"high":e=this._yHighField;break;default:e=this._yField}this._tooltipFieldY=e,this.isDirty("baseAxis")&&this._fixVC(),this._fixPosition();let o=this.get("stacked");if((this.isDirty("stacked")||this.isDirty("stackToNegative")&&o)&&(o?this._valuesDirty&&!this._dataProcessed||(this._valuesDirty=!0,this._stack()):(this._valuesDirty=!0,this._unstack())),this._valuesDirty&&!this._dataProcessed){let t,e,a,l;this._dataProcessed=!0,o&&this._stack(),g.each(this.dataItems,r=>{g.each(this._valueXShowFields,i=>{let s=r.get(i);null!=s&&(o&&(s+=this.getStackedXValue(r,i)),t=c(t,s),e=p(e,s))}),g.each(this._valueYShowFields,t=>{let e=r.get(t);null!=e&&(o&&(e+=this.getStackedYValue(r,t)),a=c(a,e),l=p(l,e))}),i.processSeriesDataItem(r,this._valueXFields),s.processSeriesDataItem(r,this._valueYFields)}),this._min("minX",t),this._max("maxX",e),this._min("minY",a),this._max("maxY",l),i._seriesValuesDirty=!0,s._seriesValuesDirty=!0,this.get("ignoreMinMax")||((this.isPrivateDirty("minX")||this.isPrivateDirty("maxX"))&&i.markDirtyExtremes(),(this.isPrivateDirty("minY")||this.isPrivateDirty("maxY"))&&s.markDirtyExtremes()),this._markStakedDirtyStack(),this.get("tooltipDataItem")||this.updateLegendValue(void 0)}if((this.isDirty("vcx")||this.isDirty("vcy"))&&this._markStakedDirtyStack(),this._dataGrouped||(i._groupSeriesD
1ata(this),s._groupSeriesData(this),this._dataGrouped=!0),this._valuesDirty||this.isPrivateDirty("startIndex")||this.isPrivateDirty("adjustedStartIndex")||this.isPrivateDirty("endIndex")||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty||this._sizeDirty||this.isDirty("minBulletDistance")){let t=this.startIndex(),e=this.endIndex(),o=this.get("minBulletDistance",0);if(o>0&&a&&(a.get("renderer").axisLength()/(e-t)>o?this._showBullets=!0:this._showBullets=!1),(this._psi!=t||this._pei!=e||this.isDirty("vcx")||this.isDirty("vcy")||this.isPrivateDirty("adjustedStartIndex")||this._stackDirty||this._valuesDirty)&&!this._selectionProcessed){this._selectionProcessed=!0;let o=this.get("vcx",1),l=this.get("vcy",1),r=this.get("stacked",!1),n=this.getPrivate("outOfSelection");if(a===i||!a){if(s._calculateTotals(),this.setPrivateRaw("selectionMinY",void 0),this.setPrivateRaw("selectionMaxY",void 0),n)s.markDirtySelectionExtremes();else for(let i=t;i<e;i++)this.processYSelectionDataItem(this.dataItems[i],l,r)}if(a===s||!a){if(i._calculateTotals(),this.setPrivateRaw("selectionMinX",void 0),this.setPrivateRaw("selectionMaxX",void 0),n)i.markDirtySelectionExtremes();else for(let i=t;i<e;i++)this.processXSelectionDataItem(this.dataItems[i],o,r)}if((a===i||!a)&&("valueYWorking"!==this.get("valueYShow")||this.get("useSelectionExtremes"))){let t=this.getPrivate("selectionMinY");null!=t&&(this.setPrivateRaw("minY",t),s.markDirtyExtremes());let e=this.getPrivate("selectionMaxY");null!=e&&(this.setPrivateRaw("maxY",e),s.markDirtyExtremes())}if((a===s||!a)&&("valueXWorking"!==this.get("valueXShow")||this.get("useSelectionExtremes"))){let t=this.getPrivate("selectionMinX");null!=t&&(this.setPrivateRaw("minX",t),i.markDirtyExtremes());let e=this.getPrivate("selectionMaxX");null!=e&&(this.setPrivateRaw("maxX",e),i.markDirtyExtremes())}(this.isPrivateDirty("selectionMinX")||this.isPrivateDirty("selectionMaxX"))&&i.markDirtySelectionExtremes(),(this.isPrivateDirty("selectionMinY")||this.isPrivateDirty("selectionMaxY"))&&s.markDirtySelectionExtremes()}}}_postUpdateData(){let t=this.get("xAxis"),e=this.get("yAxis");t._seriesValuesDirty=!0,e._seriesValuesDirty=!0,g.each(this.dataItems,i=>{i.open=void 0,i.close=void 0,t.processSeriesDataItem(i,this._valueXFields),e.processSeriesDataItem(i,this._valueYFields)})}_makeRangeMask(){if(this.axisRanges.length>0){let t=this._mainContainerMask;null==t&&(t=this.children.push(n.Graphics.new(this._root,{})),this._mainContainerMask=t,t.set("draw",(e,i)=>{let s=this.parent;if(s){let t=this._root.container.width(),a=this._root.container.height();e.moveTo(-t,-a),e.lineTo(-t,2*a),e.lineTo(2*t,2*a),e.lineTo(2*t,-a),e.lineTo(-t,-a),this.axisRanges.each(t=>{let a=t.axisDataItem.get("axisFill");if(s&&a){let t=a.get("draw");t&&t(e,i)}})}this.mainContainer._display.mask=t._display})),t.markDirty(),t._markDirtyKey("fill")}else this.mainContainer._display.mask=null}_updateChildren(){super._updateChildren(),this._x=this.x(),this._y=this.y(),this._makeRangeMask()}_stack(){let t=this.chart;if(t){let e=t.series.indexOf(this);if(this._couldStackTo=[],e>0){let i;for(let s=e-1;s>=0&&((i=t.series.getIndex(s)).get("xAxis")!==this.get("xAxis")||i.get("yAxis")!==this.get("yAxis")||i.className!==this.className||(this._couldStackTo.push(i),i.get("stacked")));s--);}this._stackDataItems()}}_unstack(){d.each(this._reallyStackedTo,(t,e)=>{delete e._stackedSeries[this.uid]}),this._reallyStackedTo={},g.each(this.dataItems,t=>{t.setRaw("stackToItemY",void 0),t.setRaw("stackToItemX",void 0)})}_handleRemoved(){let t=this.get("xAxis");t&&t._handleSeriesRemoved();let e=this.get("yAxis");e&&e._handleSeriesRemoved()}_stackDataItems(){let t,e;let i=this.get("baseAxis"),s=this.get("xAxis"),a=this.get("yAxis");i===s?(t="valueY",e="stackToItemY"):i===a&&(t="valueX",e="stackToItemX");let o=this._couldStackTo.length,l=0,r=this.get("stackToNegative");this._reallyStackedTo={},g.each(this.dataItems,i=>{for(let s=0;s<o;s++){let a=this._couldStackTo[s],n=a.dataItems[l],d=i.get(t);if(n){let l=n.get(t);if(r){if(!h.isNumber(d))break;if(h.isNumber(l)&&(s==o-1&&i.setRaw(e,void 0),d>=0&&l>=0||d<0&&l<0)){i.setRaw(e,n),this._reallyStackedTo[a.uid]=a,a._stackedSeries[this.uid]=this;break}}else if(h.isNumber(d)&&h.isNumber(l)){i.setRaw(e,n),this._reallyStackedTo[a.uid]=a,a._stackedSeries[this.uid]=this;break}}}l++})}processXSelectionDataItem(t,e,i){g.each(this.__valueXShowFields,s=>{let a=t.get(s);null!=a&&(i&&(a+=this.getStackedXValueWorking(t,s)),this._min("selectionMinX",a),this._max("selectionMaxX",a*e))})}processYSelectionDataItem(t,e,i){g.each(this.__valueYShowFields,s=>{let a=t.get(s);null!=a&&(i&&(a+=this.getStackedYValueWorking(t,s)),this._min("selectionMinY",a),this._max("selectionMaxY",a*e))})}getStackedYValueWorking(t,e){let i=t.get("stackToItemY");
1if(i){let t=i.component;return i.get(e,0)*t.get("vcy",1)+this.getStackedYValueWorking(i,e)}return 0}getStackedXValueWorking(t,e){let i=t.get("stackToItemX");if(i){let t=i.component;return i.get(e,0)*t.get("vcx",1)+this.getStackedXValueWorking(i,e)}return 0}getStackedYValue(t,e){let i=t.get("stackToItemY");return i?i.get(e,0)+this.getStackedYValue(i,e):0}getStackedXValue(t,e){let i=t.get("stackToItemX");return i?i.get(e,0)+this.getStackedXValue(i,e):0}createLegendMarker(t){this.updateLegendMarker()}_markDirtyAxes(){this._axesDirty=!0,this.markDirty()}_markDataSetDirty(){this._afterDataChange(),this._valuesDirty=!0,this._dataProcessed=!1,this._aggregatesCalculated=!1,this.markDirty()}_clearDirty(){super._clearDirty(),this._axesDirty=!1,this._selectionProcessed=!1,this._stackDirty=!1,this._dataProcessed=!1}_positionBullet(t){let e=t.get("sprite");if(e){let i=e.dataItem,s=t.get("locationX",i.get("locationX",.5)),a=t.get("locationY",i.get("locationY",.5)),o=this.get("xAxis"),l=this.get("yAxis"),r=this.get("exactLocationX",!1),n=this.get("exactLocationY",!1),h=o.getDataItemPositionX(i,this._xField,s,this.get("vcx",1),r),d=l.getDataItemPositionY(i,this._yField,a,this.get("vcy",1),n),g=this.getPoint(h,d),u=i.get("left",g.x),c=i.get("right",g.x),p=i.get("top",g.y),m=i.get("bottom",g.y),_=0,x=0,v=c-u,y=m-p;if(this._shouldShowBullet(h,d)){e.setPrivate("visible",!t.getPrivate("hidden"));let o=t.get("field"),l=this.get("baseAxis"),c=this.get("xAxis"),p=this.get("yAxis");if(null!=o){let t;l==c?("value"==o?t=this._yField:"open"==o?t=this._yOpenField:"high"==o?t=this._yHighField:"low"==o&&(t=this._yLowField),t&&(d=p.getDataItemPositionY(i,t,0,this.get("vcy",1),n),x=(g=this._yRenderer.positionToPoint(d)).y,_=u+v*s)):("value"==o?t=this._xField:"open"==o?t=this._xOpenField:"high"==o?t=this._xHighField:"low"==o&&(t=this._xLowField),t&&(h=c.getDataItemPositionX(i,t,0,this.get("vcx",1),r),_=(g=this._xRenderer.positionToPoint(h)).x,x=m-y*a))}else _=u+v*s,x=m-y*a;let f=t.get("stacked");if(f){let t=this.chart;if(l==c){let i=this._bullets[h+"_"+d];if(i){let s=i.bounds(),a=e.localBounds(),o=x;x=s.top,"down"==f?x=s.bottom-a.top:"auto"==f?t&&(o<t.plotContainer.height()/2?x=s.bottom-a.top:x+=a.bottom):x+=a.bottom}this._bullets[h+"_"+d]=e}else{let i=this._bullets[h+"_"+d];if(i){let s=i.bounds(),a=e.localBounds(),o=_;_=s.right,"down"==f?_=s.left-a.right:"auto"==f?t&&(o<t.plotContainer.width()/2?_=s.left-a.right:_-=a.left):_-=a.left}this._bullets[h+"_"+d]=e}}e.isType("Label")&&(e.setPrivate("maxWidth",Math.abs(v)),e.setPrivate("maxHeight",Math.abs(y))),e.setAll({x:_,y:x})}else e.setPrivate("visible",!1)}}_shouldShowBullet(t,e){return this._showBullets}setDataSet(t){if(this._dataSets[t]){this._handleDataSetChange(),this._dataItems=this._dataSets[t],this._markDataSetDirty(),this._dataSetId=t;let e="datasetchanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,id:t})}}resetGrouping(){d.each(this._dataSets,(t,e)=>{e!=this._mainDataItems&&g.each(e,t=>{t.dispose()})}),this._dataSets={},this._dataItems=this.mainDataItems}_handleDataSetChange(){g.each(this._dataItems,t=>{let e=t.bullets;e&&g.each(e,t=>{if(t){let e=t.get("sprite");e&&e.setPrivate("visible",!1)}})}),this._selectionProcessed=!1}show(t){let e=Object.create(null,{show:{get:()=>super.show}});return s.__awaiter(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(e.show.call(this,t).then(()=>{this._isShowing=!1;let t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis");e!==i&&e.markDirtySelectionExtremes(),t!==i&&t.markDirtySelectionExtremes()})),i.push(this.bulletsContainer.show(t)),i.push(this._sequencedShowHide(!0,t)),yield Promise.all(i)})}hide(t){let e=Object.create(null,{hide:{get:()=>super.hide}});return s.__awaiter(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(e.hide.call(this,t).then(()=>{this._isHiding=!1})),i.push(this.bulletsContainer.hide(t)),i.push(this._sequencedShowHide(!1,t)),yield Promise.all(i)})}showDataItem(t,e){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return s.__awaiter(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,t,e)];h.isNumber(e)||(e=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing");g.each(this._valueFields,i=>{s.push(t.animate({key:i+"Working",to:t.get(i),duration:e,easing:a}).waitForStop())}),yield Promise.all(s)})}hideDataItem(t,e){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return s.__awaiter(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,t,e)],a=this.states.lookup("hidden");a||(a=this.states.create("hidden",{})),h.isNumber(e)||(e=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let o=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),l=this.get("xAxis"),r=this.get("yAxis"),n=this.get("baseAxis"),d=this.get("stacked");if(n!==l&&n||g.each(this._valueYFields,i=>{let a=r.getPrivate("min"),l=r.baseValue();h.isNumber(a)&&a>l&&(l=a),d&&(l=0),null!=t.get(i)&&s.push(t.animate({key:i+"Working",to:l,duration:e,easing:o}).waitForStop())}),n===r||!n){let i=l.getPrivate("min"),a=l.baseValue();h.isNumber(i)&&i>a&&(a=i),d&&(a=0),g.each(this._valueXFields,i=>{null!=t.get(i)&&s.push(t.animate({key:i+"Working",to:a,duration:e,easing:o}).waitForStop())})}yield Promise.all(s)})}_markDirtyStack(){this._stackDirty=!0,this.markDirty(),this._markStakedDirtyStack()}_markStakedDirtyStack(){let t=this._stackedSeries;t&&d.each(t,(t,e)=>{e._stackDirty||e._markDirtyStack()})}_afterChanged(){super._afterChanged(),this._skipped&&(this._markDirtyAxes(),this._skipped=!1)}showDataItemTooltip(t){this.getPrivate("doNotUpdateLegend")||(this.updateLegendMarker(t),this.updateLegendValue(t));let e=this.get("tooltip"),i=this.get("exactLocationX",!1),s=this.get("exactLocationY",!1);if(e){if(!this.isHidden()&&this.get("visible")){if(e._setDataItem(t),t){let a=this.get("locationX",0),o=this.get("locationY",1),l=t.get("locationX",a),r=t.get("locationY",o),n=this.get("xAxis"),h=this.get("yAxis"),d=this.get("vcx",1),u=this.get("vcy",1),c=n.getDataItemPositionX(t,this._tooltipFieldX,this._aLocationX0+(this._aLocationX1-this._aLocationX0)*l,d,i),p=h.getDataItemPositionY(t,this._tooltipFieldY,this._aLocationY0+(this._aLocationY1-this._aLocationY0)*r,u,s),m=this.getPoint(c,p),_=!0;if(g.each(this._valueFields,e=>{null==t.get(e)&&(_=!1)}),_){let i=this.chart;i&&i.inPlot(m)?(e.label.text.markDirtyText(),e.set("tooltipTarget",this._getTooltipTarget(t)),e.set("pointTo",this._display.toGlobal({x:m.x,y:m.
1y}))):e._setDataItem(void 0)}else e._setDataItem(void 0)}}else this.hideTooltip()}}hideTooltip(){let t=this.get("tooltip");return t&&t.set("tooltipTarget",this),super.hideTooltip()}_getTooltipTarget(t){if("bullet"==this.get("seriesTooltipTarget")){let e=t.bullets;if(e&&e.length>0){let t=e[0].get("sprite");if(t)return t}}return this}updateLegendValue(t){let e=this.get("legendDataItem");if(e){let i=e.get("label");if(i){let e="";t?(i._setDataItem(t),e=this.get("legendLabelText",i.get("text",this.get("name","")))):(i._setDataItem(this._emptyDataItem),e=this.get("legendRangeLabelText",this.get("legendLabelText",i.get("text",this.get("name",""))))),i.set("text",e)}let s=e.get("valueLabel");if(s){let e="";t?(s._setDataItem(t),e=this.get("legendValueText",s.get("text",""))):(s._setDataItem(this._emptyDataItem),e=this.get("legendRangeValueText",s.get("text",""))),s.set("text",e)}}}_getItemReaderLabel(){let t="X: {"+this._xField;return this.get("xAxis").isType("DateAxis")&&(t+=".formatDate()"),t+="}; Y: {"+this._yField,this.get("yAxis").isType("DateAxis")&&(t+=".formatDate()"),t+="}"}getPoint(t,e){let i=this._xRenderer.positionToCoordinate(t),s=this._yRenderer.positionToCoordinate(e);return s<-999999999?s=-999999999:s>999999999&&(s=999999999),i<-999999999?i=-999999999:i>999999999&&(i=999999999),{x:i,y:s}}_shouldInclude(t){return!0}handleCursorHide(){this.hideTooltip(),this.updateLegendValue(void 0),this.updateLegendMarker(void 0)}_afterDataChange(){super._afterDataChange(),this.get("xAxis")._markDirtyKey("start"),this.get("yAxis")._markDirtyKey("start"),this.resetExtremes()}resetExtremes(){this.setPrivate("selectionMinX",void 0),this.setPrivate("selectionMaxX",void 0),this.setPrivate("selectionMinY",void 0),this.setPrivate("selectionMaxY",void 0),this.setPrivate("minX",void 0),this.setPrivate("minY",void 0),this.setPrivate("maxX",void 0),this.setPrivate("maxY",void 0)}createAxisRange(t){return this.axisRanges.push({axisDataItem:t})}get mainDataItems(){return this._mainDataItems}_adjustStartIndex(t){let e=this.get("xAxis");if(this.get("baseAxis")==e&&e.isType("DateAxis")){let i=e.baseDuration(),s=e.getPrivate("selectionMin",e.getPrivate("min",0)),a=i*this.get("locationX",.5),o=-1/0;for(;o<s;){let e=this.dataItems[t];if(!e)break;{let i=e.open;if(!((o=(i?i.valueX:e.get("valueX",0))+a)<s))break;t++}}}return t}}m.className="XYSeries",m.classNames=o.Series.classNames.concat([m.className]),e.XYSeries=m}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.