2 lines
132 KiB
JavaScript
2 lines
132 KiB
JavaScript
import{aC as Mt,Q as X,b as D,W as V,V as ot,a3 as Qt,v as ht,aD as te,d as gt,q as dt,m as w,aE as Ct,x as f,aF as It,aj as Y,r as Xt,i as ee,aG as j,aH as ie,a6 as se,aI as ae,al as At,ak as jt,aq as pt,aJ as Vt,as as z,at as G,aK as q,$ as oe,am as ne,ao as Yt,a9 as Ot,J as lt,a as tt,ac as et,az as Gt,y as St,aL as Ft,aM as re,h as le,ax as he}from"./Theme-f4ff95b9.js";import{s as Lt}from"./ColorSet-5a1c78ed.js";import{l as S}from"./DefaultTheme-4ab4ae6c.js";import{U as Et,D as Nt,_ as zt,g as mt,B as Wt,V as Ut,k as R,I as de}from"./Tick-575a0288.js";import{o as ce,n as Rt}from"./Button-036bc211.js";import{dh as it}from"./index-b5c8f851.js";function Bt(y){return typeof y=="object"&&"length"in y?y:Array.from(y)}function Ht(y){this._context=y}function Zt(y){return new Ht(y)}function $t(y){return y[0]}function qt(y){return y[1]}function Kt(y,t){var e=R(!0),i=null,s=Zt,a=null,n=Ut(r);function r(o){var l,c,h,d=(o=Bt(o)).length,u=!1;for(i==null&&(a=s(h=n())),l=0;l<=d;++l)!(l<d&&e(c=o[l],l,o))===u&&((u=!u)?a.lineStart():a.lineEnd()),u&&a.point(+y(c,l,o),+t(c,l,o));if(h)return a=null,h+""||null}return y=typeof y=="function"?y:y===void 0?$t:R(y),t=typeof t=="function"?t:t===void 0?qt:R(t),r.x=function(o){return arguments.length?(y=typeof o=="function"?o:R(+o),r):y},r.y=function(o){return arguments.length?(t=typeof o=="function"?o:R(+o),r):t},r.defined=function(o){return arguments.length?(e=typeof o=="function"?o:R(!!o),r):e},r.curve=function(o){return arguments.length?(s=o,i!=null&&(a=s(i)),r):s},r.context=function(o){return arguments.length?(o==null?i=a=null:a=s(i=o),r):i},r}function ue(y,t,e){var i=null,s=R(!0),a=null,n=Zt,r=null,o=Ut(l);function l(h){var d,u,g,m,p,_=(h=Bt(h)).length,x=!1,b=new Array(_),v=new Array(_);for(a==null&&(r=n(p=o())),d=0;d<=_;++d){if(!(d<_&&s(m=h[d],d,h))===x)if(x=!x)u=d,r.areaStart(),r.lineStart();else{for(r.lineEnd(),r.lineStart(),g=d-1;g>=u;--g)r.point(b[g],v[g]);r.lineEnd(),r.areaEnd()}x&&(b[d]=+y(m,d,h),v[d]=+t(m,d,h),r.point(i?+i(m,d,h):b[d],e?+e(m,d,h):v[d]))}if(p)return r=null,p+""||null}function c(){return Kt().defined(s).curve(n).context(a)}return y=typeof y=="function"?y:y===void 0?$t:R(+y),t=typeof t=="function"?t:R(t===void 0?0:+t),e=typeof e=="function"?e:e===void 0?qt:R(+e),l.x=function(h){return arguments.length?(y=typeof h=="function"?h:R(+h),i=null,l):y},l.x0=function(h){return arguments.length?(y=typeof h=="function"?h:R(+h),l):y},l.x1=function(h){return arguments.length?(i=h==null?null:typeof h=="function"?h:R(+h),l):i},l.y=function(h){return arguments.length?(t=typeof h=="function"?h:R(+h),e=null,l):t},l.y0=function(h){return arguments.length?(t=typeof h=="function"?h:R(+h),l):t},l.y1=function(h){return arguments.length?(e=h==null?null:typeof h=="function"?h:R(+h),l):e},l.lineX0=l.lineY0=function(){return c().x(y).y(t)},l.lineY1=function(){return c().x(y).y(e)},l.lineX1=function(){return c().x(i).y(t)},l.defined=function(h){return arguments.length?(s=typeof h=="function"?h:R(!!h),l):s},l.curve=function(h){return arguments.length?(n=h,a!=null&&(r=n(a)),l):n},l.context=function(h){return arguments.length?(h==null?a=r=null:r=n(a=h),l):a},l}Ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(y,t){switch(y=+y,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(y,t):this._context.moveTo(y,t);break;case 1:this._point=2;default:this._context.lineTo(y,t)}}};class ge extends ne{setupDefaultRules(){super.setupDefaultRules();const t=this._root.interfaceColors,e=this._root.language,i=this.rule.bind(this);i("XYChart").setAll({colors:Lt.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("XYChart",["scrollbar","chart"]).setAll({paddingBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,colors:Lt.new(this._root,{saturation:0})});{const o=i("Graphics",["scrollbar","overlay"]);o.setAll({fillOpacity:.5}),S(o,"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,cornerRadiusTR: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:D,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:D}),i("AxisLabel",["x","inside","opposite"]).setAll({centerY:0}),i("AxisLabel",["x","opposite"]).setAll({centerY:D}),i("AxisLabel",["y"]).setAll({centerX:D}),i("AxisLabel",["y","inside"]).setAll({centerX:0}),i("AxisLabel",["y","inside","opposite"]).setAll({centerX:D}),i("AxisLabel",["y","opposite"]).setAll({centerX:0}),i("AxisLabel",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","x"]).setAll({opacity:.5}),i("XYCursor").setAll({behavior:"none",layer:30,exportable:!1,snapToSeriesBy:"xy",moveThreshold:1});{const o=i("Grid",["cursor","x"]);o.setAll({strokeOpacity:.8,strokeDasharray:[2,2],ariaLabel:e.translate("Use left and right arrows to move selection")}),S(o,"stroke",t,"alternativeBackground")}{const o=i("Grid",["cursor","y"]);o.setAll({strokeOpacity:.8,strokeDasharray:[2,2],ariaLabel:e.translate("Use up and down arrows to move selection")}),S(o,"stroke",t,"alternativeBackground")}{const o=i("Graphics",["cursor","selection"]);o.setAll({fillOpacity:.15}),S(o,"fill",t,"alternativeBackground")}i("Axis").setAll({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:Yt,centerY:Yt,paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5}),i("Container",["axis","header"]).setAll({layer:30}),i("Rectangle",["axis","header","background"]).setAll({crisp:!0});{const o=i("AxisRenderer");o.setAll({crisp:!0,strokeOpacity:0}),S(o,"stroke",t,"grid")}i("AxisRendererX").setAll({minGridDistance:120,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,width:D}),i("AxisRendererY").setAll({minGridDistance:40,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,height:D});{const o=i("Rectangle",["axis","thumb"]);o.setAll({fillOpacity:0}),S(o,"fill",t,"alternativeBackground"),o.states.create("hover",{fillOpacity:.1})}i("Rectangle",["axis","thumb","x"]).setAll({cursorOverStyle:"ew-resize"}),i("Rectangle",["axis","thumb","y"]).setAll({cursorOverStyle:"ns-resize"});{const o=i("Grid");o.setAll({location:0,strokeOpacity:.15,crisp:!0}),S(o,"stroke",t,"grid")}i("Grid",["base"]).setAll({strokeOpacity:.3});{const o=i("Graphics",["axis","fill"]);o.setAll({visible:!1,isMeasured:!1,position:"absolute",fillOpacity:.05}),S(o,"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});{const o=i("AxisTick");o.setAll({location:.5,multiLocation:0,strokeOpacity:1,isMeasured:!1,position:"absolute",visible:!1}),S(o,"stroke",t,"grid")}i("CategoryAxis").setAll({startLocation:0,endLocation:1,fillRule:(o,l)=>{const c=o.get("axisFill");c&&(f(l)&&l%2!=0?c.setPrivate("visible",!1):c.setPrivate("visible",!0))}});const 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}],a={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")},n={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")},r={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:Ot(s),dateFormats:lt(a),periodChangeDateFormats:lt(n)}),i("DateAxis").setAll({maxZoomFactor:null,strictMinMax:!0,startLocation:0,endLocation:1,markUnitChange:!0,groupData:!1,groupCount:500,gridIntervals:Ot(s),dateFormats:lt(a),periodChangeDateFormats:lt(n),tooltipDateFormats:r,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:o=>{const l=o.get("axisFill");if(l){const c=o.component,h=o.get("value"),d=o.get("endValue"),u=c.intervalDuration(),g=c.getPrivate("baseInterval"),m=c.getPrivate("gridInterval",g);let p=c.getPrivate("min",0);if(p=de(new Date(p),m.timeUnit,m.count,this._root.locale.firstDayOfWeek,this._root.utc,void 0,this._root.timezone).getTime(),h!=null&&d!=null){const _=Math.round(Math.round((h-p)/u))/2;_==Math.round(_)?l.setPrivate("visible",!0):l.setPrivate("visible",!1)}}}}),i("GaplessDateAxis").setAll({fillRule:o=>{const l=o.get("axisFill");if(l){const c=o.get("index");let h=!1;f(c)&&c%2!=0||(h=!0),l.setPrivate("visible",h)}}}),i("ValueAxis").setAll({baseValue:0,logarithmic:!1,strictMinMax:!1,autoZoom:!0,fillRule:o=>{const l=o.get("axisFill");if(l){const c=o.component,h=o.get("value"),d=c.getPrivate("step");f(h)&&f(d)&&(j(h/d/2,5)==Math.round(h/d/2)?l.setPrivate("visible",!1):l.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:tt(70),height:tt(70),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,cornerRadiusTL: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:(o,l)=>{const c=l.parent;if(c){const h=c.height(),d=c.width();o.moveTo(0,h/2),o.lineTo(d,h/2)}}});{const o=i("Graphics",["line","series","legend","marker","stroke"]).states.create("disabled",{});S(o,"stroke",t,"disabled")}i("Graphics",["line","series","legend","marker","fill"]).setAll({draw:(o,l)=>{const c=l.parent;if(c){const h=c.height(),d=c.width();o.moveTo(0,0),o.lineTo(d,0),o.lineTo(d,h),o.lineTo(0,h),o.lineTo(0,0)}}});{const o=i("Graphics",["line","series","legend","marker","fill"]).states.create("disabled",{});S(o,"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:tt(50),height:tt(50),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("OHLC").setAll({width:tt(80),height:tt(80)}),i("CandlestickSeries").setAll({lowValueXGrouped:"low",lowValueYGrouped:"low",highValueXGrouped:"high",highValueYGrouped:"high",openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close"});{const o=i("Rectangle",["column","autocolor"]).states.create("riseFromOpen",{});S(o,"fill",t,"positive"),S(o,"stroke",t,"positive")}{const o=i("Rectangle",["column","autocolor"]).states.create("dropFromOpen",{});S(o,"fill",t,"negative"),S(o,"stroke",t,"negative")}i("Rectangle",["column","autocolor","pro"]).states.create("riseFromOpen",{fillOpacity:0}),i("Rectangle",["column","autocolor","pro"]).states.create("dropFromOpen",{fillOpacity:1});{const o=i("Rectangle",["column","autocolor","pro"]).states.create("riseFromPrevious",{});S(o,"fill",t,"positive"),S(o,"stroke",t,"positive")}{const o=i("Rectangle",["column","autocolor","pro"]).states.create("dropFromPrevious",{});S(o,"fill",t,"negative"),S(o,"stroke",t,"negative")}}}class bt extends Et{constructor(){super(...arguments),Object.defineProperty(this,"xAxes",{enumerable:!0,configurable:!0,writable:!0,value:new Mt}),Object.defineProperty(this,"yAxes",{enumerable:!0,configurable:!0,writable:!0,value:new Mt}),Object.defineProperty(this,"topAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(X.new(this._root,{width:D,layout:this._root.verticalLayout}))}),Object.defineProperty(this,"yAxesAndPlotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(X.new(this._root,{width:D,height:D,layout:this._root.horizontalLayout}))}),Object.defineProperty(this,"bottomAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(X.new(this._root,{width:D,layout:this._root.verticalLayout}))}),Object.defineProperty(this,"leftAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(X.new(this._root,{height:D,layout:this._root.horizontalLayout}))}),Object.defineProperty(this,"plotsContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(X.new(this._root,{width:D,height:D,maskContent:!1}))}),Object.defineProperty(this,"plotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotsContainer.children.push(X.new(this._root,{width:D,height:D}))}),Object.defineProperty(this,"topPlotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotsContainer.children.push(X.new(this._root,{width:D,height:D}))}),Object.defineProperty(this,"gridContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotContainer.children.push(X.new(this._root,{width:D,height:D,isMeasured:!1}))}),Object.defineProperty(this,"topGridContainer",{enumerable:!0,configurable:!0,writable:!0,value:X.new(this._root,{width:D,height:D,isMeasured:!1})}),Object.defineProperty(this,"rightAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(X.new(this._root,{height:D,layout:this._root.horizontalLayout}))}),Object.defineProperty(this,"axisHeadersContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotContainer.children.push(X.new(this._root,{}))}),Object.defineProperty(this,"zoomOutButton",{enumerable:!0,configurable:!0,writable:!0,value:this.topPlotContainer.children.push(ce.new(this._root,{themeTags:["zoom"],icon:V.new(this._root,{themeTags:["button","icon"]})}))}),Object.defineProperty(this,"_movePoint",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0}}),Object.defineProperty(this,"_wheelDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_otherCharts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_movePoints",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_downStartX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downEndX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downStartY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downEndY",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this._defaultThemes.push(ge.new(this._root)),super._afterNew(),this._disposers.push(this.xAxes),this._disposers.push(this.yAxes);const t=this._root;let e=this._root.verticalLayout;const i=this.zoomOutButton;i.events.on("click",()=>{this.zoomOut()}),i.hide(0),i.states.lookup("default").set("opacity",1),this.chartContainer.set("layout",e);const s=this.plotContainer;s.children.push(this.seriesContainer),this._disposers.push(this._processAxis(this.xAxes,this.bottomAxesContainer)),this._disposers.push(this._processAxis(this.yAxes,this.leftAxesContainer)),s.children.push(this.topGridContainer),s.children.push(this.bulletsContainer),s.set("interactive",!0),s.set("interactiveChildren",!1),s.set("background",ot.new(t,{themeTags:["xy","background"],fill:Qt.fromHex(0),fillOpacity:0})),this._disposers.push(s.events.on("pointerdown",a=>{this._handlePlotDown(a)})),this._disposers.push(s.events.on("globalpointerup",a=>{this._handlePlotUp(a)})),this._disposers.push(s.events.on("globalpointermove",a=>{this._handlePlotMove(a)})),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);const e=t.get("xAxis");e&&(ht(e.series,t),e.markDirtyExtremes());const i=t.get("yAxis");i&&(ht(i.series,t),i.markDirtyExtremes());const s=this.get("cursor");if(s){const a=s.get("snapToSeries");a&&ht(a,t)}super._removeSeries(t)}handleWheel(t){const e=this.get("wheelX"),i=this.get("wheelY"),s=this.plotContainer,a=t.originalEvent;if(!te(a,this))return;a.preventDefault();const n=s.toLocal(t.point),r=this.get("wheelStep",.2),o=a.deltaY/100,l=a.deltaX/100,c=this.get("wheelZoomPositionX"),h=this.get("wheelZoomPositionY");e!=="zoomX"&&e!=="zoomXY"||l==0||this.xAxes.each(d=>{if(d.get("zoomX")){let u=d.get("start"),g=d.get("end"),m=d.fixPosition(n.x/s.width());c!=null&&(m=c);let p=u-r*(g-u)*l*m,_=g+r*(g-u)*l*(1-m);1/(_-p)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)&&this._handleWheelAnimation(d.zoom(p,_))}}),i!=="zoomX"&&i!=="zoomXY"||o==0||this.xAxes.each(d=>{if(d.get("zoomX")){let u=d.get("start"),g=d.get("end"),m=d.fixPosition(n.x/s.width());c!=null&&(m=c);let p=u-r*(g-u)*o*m,_=g+r*(g-u)*o*(1-m);1/(_-p)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)&&this._handleWheelAnimation(d.zoom(p,_))}}),e!=="zoomY"&&e!=="zoomXY"||l==0||this.yAxes.each(d=>{if(d.get("zoomY")){let u=d.get("start"),g=d.get("end"),m=d.fixPosition(n.y/s.height());h!=null&&(m=h);let p=u-r*(g-u)*l*m,_=g+r*(g-u)*l*(1-m);1/(_-p)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)&&this._handleWheelAnimation(d.zoom(p,_))}}),i!=="zoomY"&&i!=="zoomXY"||o==0||this.yAxes.each(d=>{if(d.get("zoomY")){let u=d.get("start"),g=d.get("end"),m=d.fixPosition(n.y/s.height());h!=null&&(m=h);let p=u-r*(g-u)*o*m,_=g+r*(g-u)*o*(1-m);1/(_-p)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)&&this._handleWheelAnimation(d.zoom(p,_))}}),e!=="panX"&&e!=="panXY"||l==0||this.xAxes.each(d=>{if(d.get("panX")){let u=d.get("start"),g=d.get("end"),m=this._getWheelSign(d)*r*(g-u)*l,p=u+m,_=g+m,x=this._fixWheel(p,_);p=x[0],_=x[1],this._handleWheelAnimation(d.zoom(p,_))}}),i!=="panX"&&i!=="panXY"||o==0||this.xAxes.each(d=>{if(d.get("panX")){let u=d.get("start"),g=d.get("end"),m=this._getWheelSign(d)*r*(g-u)*o,p=u+m,_=g+m,x=this._fixWheel(p,_);p=x[0],_=x[1],this._handleWheelAnimation(d.zoom(p,_))}}),e!=="panY"&&e!=="panXY"||l==0||this.yAxes.each(d=>{if(d.get("panY")){let u=d.get("start"),g=d.get("end"),m=this._getWheelSign(d)*r*(g-u)*l,p=u+m,_=g+m,x=this._fixWheel(p,_);p=x[0],_=x[1],this._handleWheelAnimation(d.zoom(p,_))}}),i!=="panY"&&i!=="panXY"||o==0||this.yAxes.each(d=>{if(d.get("panY")){let u=d.get("start"),g=d.get("end"),m=this._getWheelSign(d)*r*(g-u)*o,p=u-m,_=g-m,x=this._fixWheel(p,_);p=x[0],_=x[1],this._handleWheelAnimation(d.zoom(p,_))}})}_handleSetWheel(){const t=this.get("wheelX"),e=this.get("wheelY"),i=this.plotContainer;t!=="none"||e!=="none"?(this._wheelDp=i.events.on("wheel",s=>{const a=s.originalEvent;(t!=="none"&&Math.abs(a.deltaX)!=0||e!=="none"&&Math.abs(a.deltaY)!=0)&&this.handleWheel(s)}),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){const i=e-t;return t<0&&(e=(t=0)+i),e>1&&(t=(e=1)-i),[t,e]}_handlePlotDown(t){const e=t.originalEvent;if(e.button==2)return;const i=this.plotContainer;let s=i.toLocal(t.point);if((this.get("pinchZoomX")||this.get("pinchZoomY"))&&e.pointerId&>(i._downPoints).length>0){const a=this.xAxes.getIndex(0),n=this.yAxes.getIndex(0);a&&(this._downStartX=a.get("start",0),this._downEndX=a.get("end",1)),n&&(this._downStartY=n.get("start",0),this._downEndY=n.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};const a=this.get("panX"),n=this.get("panY");a&&this.xAxes.each(o=>{o._panStart=o.get("start"),o._panEnd=o.get("end")}),n&&this.yAxes.each(o=>{o._panStart=o.get("start"),o._panEnd=o.get("end")});const r="panstarted";this.events.isEnabled(r)&&this.events.dispatch(r,{type:r,target:this,originalEvent:t.originalEvent})}}_handleWheelAnimation(t){t?t.events.on("stopped",()=>{this._dispatchWheelAnimation()}):this._dispatchWheelAnimation()}_dispatchWheelAnimation(){const t="wheelended";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}_handlePlotUp(t){const e=this._downPoint;if(e&&(this.get("panX")||this.get("panY"))){let i=this.plotContainer.toLocal(t.point);if(i.x==e.x&&i.y==e.y){const a="pancancelled";this.events.isEnabled(a)&&this.events.dispatch(a,{type:a,target:this,originalEvent:t.originalEvent})}const s="panended";this.events.isEnabled(s)&&this.events.dispatch(s,{type:s,target:this,originalEvent:t.originalEvent})}this._downPoint=void 0,this.xAxes.each(i=>{i._isPanning=!1}),this.yAxes.each(i=>{i._isPanning=!1})}_handlePlotMove(t){const e=this.plotContainer;if(this.get("pinchZoomX")||this.get("pinchZoomY")){const s=t.pointerId;if(s&&(this._movePoints[s]=t.point,gt(e._downPoints).length>1))return void this._handlePinch()}let i=this._downPoint;if(i){i=e.toLocal(this._root.documentPointToRoot(i));let s=e.toLocal(t.point);const a=this.get("panX"),n=this.get("panY");if(a){let r=this.get("scrollbarX");r&&r.events.disableType("rangechanged"),this.xAxes.each(o=>{if(o.get("panX")){o._isPanning=!0;let l=o._panStart,c=o._panEnd,h=(c-l)*(i.x-s.x)/e.width();o.get("renderer").get("inversed")&&(h*=-1);let d=l+h,u=c+h;u-d<1+2*o.get("maxDeviation",1)&&(o.set("start",d),o.set("end",u))}}),r&&r.events.enableType("rangechanged")}if(n){let r=this.get("scrollbarY");r&&r.events.disableType("rangechanged"),this.yAxes.each(o=>{if(o.get("panY")){o._isPanning=!0;let l=o._panStart,c=o._panEnd,h=(c-l)*(i.y-s.y)/e.height();o.get("renderer").get("inversed")&&(h*=-1);let d=l-h,u=c-h;u-d<1+2*o.get("maxDeviation",1)&&(o.set("start",d),o.set("end",u))}}),r&&r.events.enableType("rangechanged")}}}_handlePinch(){const t=this.plotContainer;let e=0,i=[],s=[];if(dt(t._downPoints,(a,n)=>{i[e]=n;let r=this._movePoints[a];r&&(s[e]=r),e++}),i.length>1&&s.length>1){const a=t.width(),n=t.height();let r=i[0],o=i[1],l=s[0],c=s[1];if(r&&o&&l&&c){if(l=t.toLocal(l),c=t.toLocal(c),r=t.toLocal(r),o=t.toLocal(o),this.get("pinchZoomX")){const h=this._downStartX,d=this._downEndX;if(h!=null&&d!=null){r.x>o.x&&([r,o]=[o,r],[l,c]=[c,l]);let u=h+r.x/a*(d-h),g=h+o.x/a*(d-h),m=h+l.x/a*(d-h),p=h+c.x/a*(d-h),_=Math.max(.001,g-u)/Math.max(.001,p-m),x=h*_+u-m*_,b=d*_+g-p*_;this.xAxes.each(v=>{let P=v.fixPosition(x),A=v.fixPosition(b);v.zoom(P,A,0)})}}if(this.get("pinchZoomY")){const h=this._downStartY,d=this._downEndY;if(h!=null&&d!=null){r.y<o.y&&([r,o]=[o,r],[l,c]=[c,l]);let u=h+(1-r.y/n)*(d-h),g=h+(1-o.y/n)*(d-h),m=h+(1-l.y/n)*(d-h),p=h+(1-c.y/n)*(d-h),_=Math.max(.001,g-u)/Math.max(.001,p-m),x=h*_+u-m*_,b=d*_+g-p*_;this.yAxes.each(v=>{let P=v.fixPosition(x),A=v.fixPosition(b);v.zoom(P,A,0)})}}}}}_handleCursorPosition(){const t=this.get("cursor");if(t){const e=t.getPrivate("point");let i=t.get("snapToSeries");if(t._downPoint&&(i=void 0),i&&e){const s=t.get("snapToSeriesBy"),a=[];w(i,o=>{if(!o.isHidden()&&!o.isHiding())if(s!="x!"&&s!="y!"){const l=o.startIndex(),c=o.endIndex();for(let h=l;h<c;h++){const d=o.dataItems[h];d&&!d.isHidden()&&a.push(d)}}else{const l=o.get("tooltipDataItem");l&&a.push(l)}});let n,r=1/0;if(w(a,o=>{const l=o.get("point");if(l){let c=0;c=s=="x"||s=="x!"?Math.abs(e.x-l.x):s=="y"||s=="y!"?Math.abs(e.y-l.y):Math.hypot(e.x-l.x,e.y-l.y),c<r&&(r=c,n=o)}}),w(i,o=>{const l=o.get("tooltip");l&&l._setDataItem(void 0)}),n){let o=n.component;o.showDataItemTooltip(n);const l=n.get("point");l&&t.handleMove(o.toGlobal({x:l.x-o.x(),y:l.y-o.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")){const 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")){const t=this._prevSettings.scrollbarX,e=this.get("scrollbarX");e!==t&&(this._disposeProperty("scrollbarX"),t&&t.dispose(),e&&(e.parent||this.topAxesContainer.children.push(e),this._pushPropertyDisposer("scrollbarX",e.events.on("rangechanged",i=>{this._handleScrollbar(this.xAxes,i.start,i.end,i.grip)})),e.setPrivate("positionTextFunction",i=>{const s=this.xAxes.getIndex(0);return s&&s.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarX=e)}if(this.isDirty("scrollbarY")){const t=this._prevSettings.scrollbarY,e=this.get("scrollbarY");e!==t&&(this._disposeProperty("scrollbarY"),t&&t.dispose(),e&&(e.parent||this.rightAxesContainer.children.push(e),this._pushPropertyDisposer("scrollbarY",e.events.on("rangechanged",i=>{this._handleScrollbar(this.yAxes,i.start,i.end,i.grip)})),e.setPrivate("positionTextFunction",i=>{const s=this.yAxes.getIndex(0);return s&&s.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarY=e)}this._handleZoomOut()}_processSeries(t){super._processSeries(t);const e=t.get("xAxis"),i=t.get("yAxis");Ct(e.series,t),Ct(i.series,t),t._posXDp=t.addDisposer(e.events.on("positionchanged",()=>{t._fixPosition()})),t._posXDp=t.addDisposer(i.events.on("positionchanged",()=>{t._fixPosition()})),t.get("baseAxis")||(i.isType("CategoryAxis")||i.isType("DateAxis")?t.set("baseAxis",i):t.set("baseAxis",e)),t.get("stacked")&&(t._markDirtyKey("stacked"),w(t.dataItems,s=>{s.set("stackToItemY",void 0),s.set("stackToItemX",void 0)})),t._markDirtyAxes(),i.markDirtyExtremes(),e.markDirtyExtremes(),this._colorize(t)}_colorize(t){const e=this.get("colors");if(e&&t.get("fill")==null){const i=e.next();t._setSoft("stroke",i),t._setSoft("fill",i)}}_handleCursorSelectEnd(){const 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))),n=Math.min(1,Math.max(0,t.getPrivate("positionY",.5)));this.xAxes.each(r=>{if(e==="zoomX"||e==="zoomXY"){let o=r.toAxisPosition(i),l=r.toAxisPosition(a);r.zoom(o,l)}r.setPrivate("updateScrollbar",!0)}),this.yAxes.each(r=>{if(e==="zoomY"||e==="zoomXY"){let o=r.toAxisPosition(s),l=r.toAxisPosition(n);r.zoom(o,l)}r.setPrivate("updateScrollbar",!0)})}_handleScrollbar(t,e,i,s){t.each(a=>{let n=a.fixPosition(e),r=a.fixPosition(i),o=a.zoom(n,r,void 0,s);const l="updateScrollbar";a.setPrivateRaw(l,!1),o?o.events.on("stopped",()=>{a.setPrivateRaw(l,!0)}):a.setPrivateRaw(l,!0)})}_processAxis(t,e){return t.events.onAll(i=>{if(i.type==="clear")w(i.oldValues,s=>{this._removeAxis(s)});else if(i.type==="push")e.children.push(i.newValue),i.newValue.processChart(this);else if(i.type==="setIndex")e.children.setIndex(i.index,i.newValue),i.newValue.processChart(this);else if(i.type==="insertIndex")e.children.insertIndex(i.index,i.newValue),i.newValue.processChart(this);else if(i.type==="removeIndex")this._removeAxis(i.oldValue);else{if(i.type!=="moveIndex")throw new Error("Unknown IListEvent type");e.children.moveValue(i.value,i.newIndex),i.value.processChart(this)}})}_removeAxis(t){if(!t.isDisposed()){const e=t.parent;e&&e.children.removeValue(t);const i=t.gridContainer,s=i.parent;s&&s.children.removeValue(i);const a=t.topGridContainer,n=a.parent;n&&n.children.removeValue(a)}}_updateChartLayout(){const t=this.leftAxesContainer.width(),e=this.rightAxesContainer.width(),i=this.bottomAxesContainer;i.set("paddingLeft",t),i.set("paddingRight",e);const 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]),this.xAxes.indexOf(t)!=-1){if(e||t.getPrivate("updateScrollbar")){let a=this.get("scrollbarX");!a||a.getPrivate("isBusy")&&!e||(a.setRaw("start",i),a.setRaw("end",s),a.updateGrips())}}else if(this.yAxes.indexOf(t)!=-1&&(e||t.getPrivate("updateScrollbar"))){let a=this.get("scrollbarY");!a||a.getPrivate("isBusy")&&!e||(a.setRaw("start",i),a.setRaw("end",s),a.updateGrips())}this._handleZoomOut()}_handleZoomOut(){let t=this.zoomOutButton;if(t&&t.parent){let e=!1;this.xAxes.each(i=>{i.get("start")==0&&i.get("end")==1||(e=!0)}),this.yAxes.each(i=>{i.get("start")==0&&i.get("end")==1||(e=!0)}),e?t.isHidden()&&t.show():t.hide()}}inPlot(t){const 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 a=i.length-1;a>=0;a--){const n=i[a];if(n!=this){const r=n.plotContainer,o=this._root.rootPointToDocument(s),l=n._root.documentPointToRoot(o),c=r.toLocal(l);if(c.x>=-.1&&c.y>=-.1&&c.x<=r.width()+.1&&c.y<=r.height()+.1)return!0}}return!1}arrangeTooltips(){const t=this.plotContainer,e=t.width(),i=t.height(),s=this.height();let a=t._display.toGlobal({x:0,y:0}),n=t._display.toGlobal({x:e,y:i});const r=[];let o,l,c=0,h=1/0,d=this._movePoint,u=this.get("maxTooltipDistance"),g=this.get("maxTooltipDistanceBy","xy");f(u)&&this.series.each(p=>{if(!p.isHidden()){const _=p.get("tooltip");if(_){let x=_.get("pointTo");if(x){let b=Math.hypot(d.x-x.x,d.y-x.y);g=="x"?b=Math.abs(d.x-x.x):g=="y"&&(b=Math.abs(d.y-x.y)),b<h&&(h=b,o=p,l=x)}}}});const m=[];if(this.series.each(p=>{const _=p.get("tooltip");if(_){let x=!1,b=_.get("pointTo");if(b){if(u>=0){let v=_.get("pointTo");if(v&&p!=o){let P=Math.hypot(l.x-v.x,l.y-v.y);g=="x"?P=Math.abs(l.x-v.x):g=="y"&&(P=Math.abs(l.y-v.y)),P>u&&(x=!0)}}else u==-1&&p!=o&&(x=!0);this.inPlot(this._tooltipToLocal(b))&&_.dataItem?x||(c+=b.y):x=!0,x||p.isHidden()||p.isHiding()?_.hide(0):(_.show(),r.push(_),m.push(p))}}}),this.setPrivate("tooltipSeries",m),this.get("arrangeTooltips")){const p=this._root.tooltipContainer,_=r.length;if(c/_>i/2+a.y){r.sort((b,v)=>It(v.get("pointTo").y,b.get("pointTo").y));let x=n.y;if(w(r,b=>{let v=b.height(),P=b.get("centerY");P instanceof et&&(v*=P.value),v+=b.get("marginBottom",0),b.set("bounds",{left:a.x,top:a.y,right:n.x,bottom:x}),b.setPrivate("customData",{left:a.x,top:a.y,right:n.x,bottom:x}),x=Math.min(x-v,b._fy-v),b.parent==p&&p.children.moveValue(b,0)}),x<0){r.reverse();let b=x;w(r,v=>{let P=v.get("bounds");if(P){let A=P.top-x,F=P.bottom-x;A<b&&(A=b,F=A+v.height()),v.set("bounds",{left:P.left,top:A,right:P.right,bottom:F}),b=P.bottom-x+v.get("marginBottom",0)}})}}else{r.reverse(),r.sort((b,v)=>It(b.get("pointTo").y,v.get("pointTo").y));let x=0;if(w(r,b=>{let v=b.height(),P=b.get("centerY");P instanceof et&&(v*=P.value),v+=b.get("marginBottom",0),b.set("bounds",{left:a.x,top:x,right:n.x,bottom:Math.max(a.y+s,x+v)}),b.parent==p&&p.children.moveValue(b,0),x=Math.max(x+v,b._fy+v)}),x>s){r.reverse();let b=s;w(r,v=>{let P=v.get("bounds");if(P){let A=P.top-(s-x),F=P.bottom-(s-x);F>b&&(F=b,A=F-v.height()),v.set("bounds",{left:P.left,top:A,right:P.right,bottom:F}),b=F-v.height()-v.get("marginBottom",0)}})}}}}_tooltipToLocal(t){return this.plotContainer.toLocal(t)}zoomOut(){this.xAxes.each(t=>{t.setPrivate("updateScrollbar",!0),t.zoom(0,1)}),this.yAxes.each(t=>{t.setPrivate("updateScrollbar",!0),t.zoom(0,1)})}}Object.defineProperty(bt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYChart"}),Object.defineProperty(bt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Et.classNames.concat([bt.className])});class st extends V{_beforeChanged(){super._beforeChanged(),(this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}}Object.defineProperty(st,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Grid"}),Object.defineProperty(st,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:V.classNames.concat([st.className])});class ft extends X{constructor(){super(...arguments),Object.defineProperty(this,"lineX",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(st.new(this._root,{themeTags:["x"]}))}),Object.defineProperty(this,"lineY",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(st.new(this._root,{themeTags:["y"]}))}),Object.defineProperty(this,"selection",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(V.new(this._root,{themeTags:["selection","cursor"],layer:30}))}),Object.defineProperty(this,"_movePoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_lastPoint",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0}}),Object.defineProperty(this,"_tooltipX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_tooltipY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_toX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_toY",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["xy","cursor"]),super._afterNew(),this.setAll({width:D,height:D,isMeasured:!0,position:"absolute"}),this.states.create("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",t=>this._handleLineFocus(t.target))),this._disposers.push(this.lineX.events.on("blur",t=>this._handleLineBlur(t.target))),this._disposers.push(this.lineY.events.on("focus",t=>this._handleLineFocus(t.target))),this._disposers.push(this.lineY.events.on("blur",t=>this._handleLineBlur(t.target))),Xt("keyboardevents")&&this._disposers.push(ee(document,"keydown",t=>{this._handleLineMove(t.keyCode)}))}_setUpTouch(){const t=this.chart;t&&(t.plotContainer._display.cancelTouch=this.get("behavior")!="none")}_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){let e="",i=0,s=.1;const a=this.chart;this._root.focused(this.lineX)?(a&&a.xAxes.length&&(s=a.xAxes.getIndex(0).getCellWidthPosition()),i=this.getPrivate("positionX",0),e="positionX",t==37?i-=s:t==39&&(i+=s)):this._root.focused(this.lineY)&&(a&&a.yAxes.length&&(s=a.yAxes.getIndex(0).getCellWidthPosition()),i=this.getPrivate("positionY",0),e="positionY",t==38?i-=s:t==40&&(i+=s)),i<0?i=0:i>1&&(i=1),e!=""&&this.set(e,i)}_handleLineFocus(t){this.setAll({positionX:this.getPrivate("positionX"),positionY:this.getPrivate("positionY"),alwaysShow:!0})}_handleLineBlur(t){this.setAll({positionX:void 0,positionY:void 0,alwaysShow:!1})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("xAxis")){this._tooltipX=!1;const t=this.get("xAxis");if(t){const e=t.get("tooltip");e&&(this._tooltipX=!0,this._disposers.push(e.on("pointTo",()=>{this._updateXLine(e)})))}}if(this.isDirty("yAxis")){this._tooltipY=!1;const t=this.get("yAxis");if(t){const e=t.get("tooltip");e&&(this._tooltipY=!0,this._disposers.push(e.on("pointTo",()=>{this._updateYLine(e)})))}}}_handleSyncWith(){const t=this.chart;if(t){const e=this.get("syncWith"),i=[];e&&w(e,s=>{const a=s.chart;a&&i.push(a)}),t._otherCharts=i}}_updateChildren(){if(super._updateChildren(),this._handleSyncWith(),this.isDirty("positionX")||this.isDirty("positionY")){const t=this.get("positionX"),e=this.get("positionY");t==null&&e==null?this.hide(0):(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0))),this.handleMove())}}_updateXLine(t){let e=j(this._display.toLocal(t.get("pointTo",{x:0,y:0})).x,2);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=j(this._display.toLocal(t.get("pointTo",{x:0,y:0})).y,2);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();const e=t.plotContainer;this.events.on("boundschanged",()=>{this._disposers.push(this.setTimeout(()=>{this.updateCursor()},50))}),Xt("touchevents")&&(this._disposers.push(e.events.on("click",s=>{ie(s.originalEvent)&&this._handleMove(s)})),this._setUpTouch()),this._disposers.push(e.events.on("pointerdown",s=>{this._handleCursorDown(s)})),this._disposers.push(e.events.on("globalpointerup",s=>{this._handleCursorUp(s),s.native||this.isHidden()||this._handleMove(s)})),this._disposers.push(e.events.on("globalpointermove",s=>{(this.get("syncWith")||gt(e._downPoints).length!=0||s.native||!this.isHidden())&&this._handleMove(s)}));const i=this.parent;i&&i.children.moveValue(this.selection)}_inPlot(t){const e=this.chart;return!!e&&e.inPlot(t)}_handleCursorDown(t){if(t.originalEvent.button==2)return;const e=t.point;let i=this._display.toLocal(e);const s=this.chart;if(this.selection.set("draw",()=>{}),s&&this._inPlot(i)){if(this._downPoint=i,this.get("behavior")!="none"){this.selection.show();const r="selectstarted";this.events.isEnabled(r)&&this.events.dispatch(r,{type:r,target:this,originalEvent:t.originalEvent})}let a=this._getPosition(i).x,n=this._getPosition(i).y;this.setPrivate("downPositionX",a),this.setPrivate("downPositionY",n)}}_handleCursorUp(t){if(this._downPoint){const e=this.get("behavior","none");if(e!="none"){e.charAt(0)==="z"&&this.selection.hide();const i=t.point;let s=this._display.toLocal(i);const a=this._downPoint,n=this.get("moveThreshold",1);if(s&&a){let r=!1;if(e!=="zoomX"&&e!=="zoomXY"&&e!=="selectX"&&e!=="selectXY"||Math.abs(s.x-a.x)>n&&(r=!0),e!=="zoomY"&&e!=="zoomXY"&&e!=="selectY"&&e!=="selectXY"||Math.abs(s.y-a.y)>n&&(r=!0),r){const o="selectended";this.events.isEnabled(o)&&this.events.dispatch(o,{type:o,target:this,originalEvent:t.originalEvent})}else{const o="selectcancelled";this.events.isEnabled(o)&&this.events.dispatch(o,{type:o,target:this,originalEvent:t.originalEvent})}}}}this._downPoint=void 0}_handleMove(t){if(this.getPrivate("visible")){const e=this.chart;if(e&>(e.plotContainer._downPoints).length>1)return void this.set("forceHidden",!0);this.set("forceHidden",!1);const i=t.point,s=this._lastPoint;if(Math.round(s.x)===Math.round(i.x)&&Math.round(s.y)===Math.round(i.y))return;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);const s=this.get("alwaysShow");if(!t)return void this.hide(0);this._movePoint=t;let a=this._display.toLocal(t),n=this.chart;if(n&&(this._inPlot(a)||this._downPoint)){n._movePoint=t,this.isHidden()&&(this.show(),this.get("behavior","").charAt(0)=="z"&&this.selection.set("draw",()=>{}));let r=a.x,o=a.y,l=this._getPosition(a);this.setPrivate("point",a);let c=this.get("snapToSeries");this._downPoint&&(c=void 0);let h=this.get("positionX"),d=l.x;f(h)&&(d=h);let u=this.get("positionY"),g=l.y;f(u)&&(g=u),this.setPrivate("positionX",d),this.setPrivate("positionY",g);const m=this._getPoint(d,g);if(r=m.x,o=m.y,n.xAxes.each(p=>{p._handleCursorPosition(d,c),s&&p.handleCursorShow()}),n.yAxes.each(p=>{p._handleCursorPosition(g,c),s&&p.handleCursorShow()}),!e){n._handleCursorPosition();const p="cursormoved";this.events.isEnabled(p)&&this.events.dispatch(p,{type:p,target:this,point:t,originalEvent:i})}this._updateLines(r,o),n.arrangeTooltips()}else if(!this._downPoint&&!s){this.hide(0);const r="cursorhidden";this.events.isEnabled(r)&&this.events.dispatch(r,{type:r,target:this})}this._downPoint&&this.get("behavior")!="none"&&this._updateSelection(a)}_getPoint(t,e){return{x:this.width()*t,y:this.height()*e}}_updateLines(t,e){this._tooltipX||this.lineX.set("x",t),this._tooltipY||this.lineY.set("y",e),this._drawLines()}_updateSelection(t){const 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",n=>{const r=this._downPoint;r&&(i==="zoomXY"||i==="selectXY"?(n.moveTo(r.x,r.y),n.lineTo(r.x,t.y),n.lineTo(t.x,t.y),n.lineTo(t.x,r.y),n.lineTo(r.x,r.y)):i==="zoomX"||i==="selectX"?(n.moveTo(r.x,0),n.lineTo(r.x,a),n.lineTo(t.x,a),n.lineTo(t.x,0),n.lineTo(r.x,0)):i!=="zoomY"&&i!=="selectY"||(n.moveTo(0,r.y),n.lineTo(s,r.y),n.lineTo(s,t.y),n.lineTo(0,t.y),n.lineTo(0,r.y)))})}_onHide(){if(this.isHidden()){let t=this.chart;t&&(t.xAxes.each(e=>{e.handleCursorHide()}),t.yAxes.each(e=>{e.handleCursorHide()}),t.series.each(e=>{e.handleCursorHide()}))}super._onHide()}_onShow(){if(!this.isHidden()){let t=this.chart;t&&(t.xAxes.each(e=>{e.handleCursorShow()}),t.yAxes.each(e=>{e.handleCursorShow()}))}super._onShow()}_dispose(){super._dispose(),this.selection.dispose()}}function pe(y,t){return y==null?t:t==null?y:t<y?t:y}function me(y,t){return y==null?t:t==null?y:t>y?t:y}Object.defineProperty(ft,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYCursor"}),Object.defineProperty(ft,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:X.classNames.concat([ft.className])});class B extends Nt{constructor(){super(...arguments),Object.defineProperty(this,"_xField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_xOpenField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yOpenField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_xLowField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_xHighField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yLowField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_yHighField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_axesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_stackDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_selectionProcessed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataSets",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_mainContainerMask",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_x",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_y",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"mainContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(X.new(this._root,{}))}),Object.defineProperty(this,"axisRanges",{enumerable:!0,configurable:!0,writable:!0,value:new Gt}),Object.defineProperty(this,"_skipped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_couldStackTo",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_reallyStackedTo",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_stackedSeries",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_aLocationX0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_aLocationX1",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_aLocationY0",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_aLocationY1",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_showBullets",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"valueXFields",{enumerable:!0,configurable:!0,writable:!0,value:["valueX","openValueX","lowValueX","highValueX"]}),Object.defineProperty(this,"valueYFields",{enumerable:!0,configurable:!0,writable:!0,value:["valueY","openValueY","lowValueY","highValueY"]}),Object.defineProperty(this,"_valueXFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueYFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueXShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueYShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"__valueXShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"__valueYShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_emptyDataItem",{enumerable:!0,configurable:!0,writable:!0,value:new mt(this,void 0,{})}),Object.defineProperty(this,"_dataSetId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipFieldX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipFieldY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_posXDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_posYDp",{enumerable:!0,configurable:!0,writable:!0,value: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"),super._afterNew(),this.set("maskContent",!0),this._disposers.push(this.axisRanges.events.onAll(t=>{if(t.type==="clear")w(t.oldValues,e=>{this._removeAxisRange(e)});else if(t.type==="push")this._processAxisRange(t.newValue);else if(t.type==="setIndex")this._processAxisRange(t.newValue);else if(t.type==="insertIndex")this._processAxisRange(t.newValue);else if(t.type==="removeIndex")this._removeAxisRange(t.oldValue);else{if(t.type!=="moveIndex")throw new Error("Unknown IStreamEvent type");this._processAxisRange(t.value)}})),this.states.create("hidden",{opacity:1,visible:!1}),this._makeFieldNames()}_processAxisRange(t){const e=X.new(this._root,{});t.container=e,this.children.push(e),t.series=this;const i=t.axisDataItem;i.setRaw("isRange",!0);const s=i.component;if(s){s._processAxisRange(i,["range","series"]);const a=i.get("bullet");if(a){const r=a.get("sprite");r&&r.setPrivate("visible",!1)}const n=i.get("axisFill");n&&e.set("mask",n),s._seriesAxisRanges.push(i)}}_removeAxisRange(t){const e=t.axisDataItem,i=e.component;i.disposeDataItem(e),ht(i._seriesAxisRanges,e);const s=t.container;s&&s.dispose()}_updateFields(){super._updateFields(),this._valueXFields=[],this._valueYFields=[],this._valueXShowFields=[],this._valueYShowFields=[],this.__valueXShowFields=[],this.__valueYShowFields=[],this.valueXFields&&w(this.valueXFields,t=>{if(this.get(t+"Field")){this._valueXFields.push(t);let e=this.get(t+"Show");this.__valueXShowFields.push(e),e.indexOf("Working")!=-1?this._valueXShowFields.push(e.split("Working")[0]):this._valueXShowFields.push(e)}}),this.valueYFields&&w(this.valueYFields,t=>{if(this.get(t+"Field")){this._valueYFields.push(t);let e=this.get(t+"Show");this.__valueYShowFields.push(e),e.indexOf("Working")!=-1?this._valueYShowFields.push(e.split("Working")[0]):this._valueYShowFields.push(e)}})}_dispose(){super._dispose();const t=this.chart;t&&t.series.removeValue(this),St(this.get("xAxis").series,this),St(this.get("yAxis").series,this)}_min(t,e){let i=pe(this.getPrivate(t),e);this.setPrivate(t,i)}_max(t,e){let i=me(this.getPrivate(t),e);this.setPrivate(t,i)}_shouldMakeBullet(t){const e=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis");if(!e.inited||!i.inited)return!1;const a=this.get("minBulletDistance",0);if(a>0){let n=this.startIndex(),r=this.endIndex()-n;if(e==s){if(e.get("renderer").axisLength()/r<a/5)return!1}else if(i==s&&i.get("renderer").axisLength()/r<a/5)return!1}return t.get(this._xField)!=null&&t.get(this._yField)!=null}_makeFieldNames(){const t=this.get("xAxis"),e=this.get("yAxis"),i=t.getPrivate("name"),s=Ft(i),a=e.getPrivate("name"),n=Ft(a),r=t.get("renderer").getPrivate("letter"),o=e.get("renderer").getPrivate("letter"),l="open",c="low",h="high",d="Show";t.className==="ValueAxis"?(this._xField=this.get(i+r+d),this._xOpenField=this.get(l+s+r+d),this._xLowField=this.get(c+s+r+d),this._xHighField=this.get(h+s+r+d)):(this._xField=i+r,this._xOpenField=l+s+r,this._xLowField=c+s+r,this._xHighField=h+s+r),e.className==="ValueAxis"?(this._yField=this.get(a+o+d),this._yOpenField=this.get(l+n+o+d),this._yLowField=this.get(c+n+o+d),this._yHighField=this.get(h+n+o+d)):(this._yField=a+o,this._yOpenField=l+n+o,this._yLowField=c+n+o,this._yHighField=h+n+o)}_fixVC(){const t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis"),s=this.states.lookup("hidden"),a=this.get("sequencedInterpolation");if(s){let n=0;a&&(n=.999999999999),t===i?s.set("vcy",n):(e===i||s.set("vcy",n),s.set("vcx",n))}}_handleMaskBullets(){this.isDirty("maskBullets")&&this.bulletsContainer.set("maskContent",this.get("maskBullets"))}_fixPosition(){const t=this.get("xAxis"),e=this.get("yAxis");this.set("x",t.x()-pt(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0)),this.set("y",e.y()-pt(e.get("centerY",0),e.height())-e.parent.get("paddingTop",0)),this.bulletsContainer.set("y",this.y()),this.bulletsContainer.set("x",this.x())}_prepareChildren(){super._prepareChildren(),(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.set("width",this.get("xAxis").width()),this.set("height",this.get("yAxis").height()),this._handleMaskBullets();const t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis");let s;switch(this.get("tooltipPositionX")){case"open":s=this._xOpenField;break;case"low":s=this._xLowField;break;case"high":s=this._xHighField;break;default:s=this._xField}this._tooltipFieldX=s;let a;switch(this.get("tooltipPositionY")){case"open":a=this._yOpenField;break;case"low":a=this._yLowField;break;case"high":a=this._yHighField;break;default:a=this._yField}this._tooltipFieldY=a,this.isDirty("baseAxis")&&this._fixVC(),this._fixPosition();const n=this.get("stacked");if(this.isDirty("stacked")&&(n?this._valuesDirty&&!this._dataProcessed||this._stack():this._unstack()),this._valuesDirty&&!this._dataProcessed&&(this._dataProcessed=!0,n&&this._stack(),w(this.dataItems,r=>{w(this._valueXShowFields,o=>{let l=r.get(o);l!=null&&(n&&(l+=this.getStackedXValue(r,o)),this._min("minX",l),this._max("maxX",l))}),w(this._valueYShowFields,o=>{let l=r.get(o);l!=null&&(n&&(l+=this.getStackedYValue(r,o)),this._min("minY",l),this._max("maxY",l))}),t.processSeriesDataItem(r,this._valueXFields),e.processSeriesDataItem(r,this._valueYFields)}),t._seriesValuesDirty=!0,e._seriesValuesDirty=!0,this.get("ignoreMinMax")||((this.isPrivateDirty("minX")||this.isPrivateDirty("maxX"))&&t.markDirtyExtremes(),(this.isPrivateDirty("minY")||this.isPrivateDirty("maxY"))&&e.markDirtyExtremes()),this._markStakedDirtyStack(),this.get("tooltipDataItem")||this.updateLegendValue(void 0)),(this.isDirty("vcx")||this.isDirty("vcy"))&&this._markStakedDirtyStack(),this._dataGrouped||(t._groupSeriesData(this),e._groupSeriesData(this),this._dataGrouped=!0),this._valuesDirty||this.isPrivateDirty("startIndex")||this.isPrivateDirty("endIndex")||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty){let r=this.startIndex(),o=this.endIndex(),l=this.get("minBulletDistance",0);if(l>0&&i&&(i.get("renderer").axisLength()/(o-r)>l?this._showBullets=!0:this._showBullets=!1),(this._psi!=r||this._pei!=o||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty||this._valuesDirty)&&!this._selectionProcessed){this._selectionProcessed=!0;const c=this.get("vcx",1),h=this.get("vcy",1),d=this.get("stacked",!1),u=this.getPrivate("outOfSelection");if(i===t||!i)if(e._calculateTotals(),this.setPrivateRaw("selectionMinY",void 0),this.setPrivateRaw("selectionMaxY",void 0),u)e.markDirtySelectionExtremes();else for(let g=r;g<o;g++)this.processYSelectionDataItem(this.dataItems[g],h,d);if(i===e||!i)if(t._calculateTotals(),this.setPrivateRaw("selectionMinX",void 0),this.setPrivateRaw("selectionMaxX",void 0),u)e.markDirtySelectionExtremes();else for(let g=r;g<o;g++)this.processXSelectionDataItem(this.dataItems[g],c,d);if((i===t||!i)&&this.get("valueYShow")!=="valueYWorking"){const g=this.getPrivate("selectionMinY");g!=null&&(this.setPrivateRaw("minY",g),e.markDirtyExtremes());const m=this.getPrivate("selectionMaxY");m!=null&&(this.setPrivateRaw("maxY",m),e.markDirtyExtremes())}if((i===e||!i)&&this.get("valueXShow")!=="valueXWorking"){const g=this.getPrivate("selectionMinX");g!=null&&(this.setPrivateRaw("minX",g),e.markDirtyExtremes());const m=this.getPrivate("selectionMaxX");m!=null&&(this.setPrivateRaw("maxX",m),t.markDirtyExtremes())}(this.isPrivateDirty("selectionMinX")||this.isPrivateDirty("selectionMaxX"))&&t.markDirtySelectionExtremes(),(this.isPrivateDirty("selectionMinY")||this.isPrivateDirty("selectionMaxY"))&&e.markDirtySelectionExtremes()}}}_makeRangeMask(){if(this.axisRanges.length>0){let t=this._mainContainerMask;t==null&&(t=this.children.push(V.new(this._root,{})),this._mainContainerMask=t,t.set("draw",(e,i)=>{const s=this.parent;if(s){const a=this._root.container.width(),n=this._root.container.height();e.moveTo(-a,-n),e.lineTo(-a,2*n),e.lineTo(2*a,2*n),e.lineTo(2*a,-n),e.lineTo(-a,-n),this.axisRanges.each(r=>{const o=r.axisDataItem.get("axisFill");if(s&&o){let l=o.get("draw");l&&l(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(){const t=this.chart;if(t){const e=t.series.indexOf(this);if(this._couldStackTo=[],e>0){let i;for(let s=e-1;s>=0&&(i=t.series.getIndex(s),i.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(){dt(this._reallyStackedTo,(t,e)=>{delete e._stackedSeries[this.uid]}),this._reallyStackedTo={},w(this.dataItems,t=>{t.setRaw("stackToItemY",void 0),t.setRaw("stackToItemX",void 0)})}_stackDataItems(){const t=this.get("baseAxis"),e=this.get("xAxis"),i=this.get("yAxis");let s,a;t===e?(s="valueY",a="stackToItemY"):t===i&&(s="valueX",a="stackToItemX");let n=this._couldStackTo.length,r=0;const o=this.get("stackToNegative");this._reallyStackedTo={},w(this.dataItems,l=>{for(let c=0;c<n;c++){let h=this._couldStackTo[c],d=h.dataItems[r],u=l.get(s);if(d){let g=d.get(s);if(o){if(!f(u))break;if(f(g)){if(u>=0&&g>=0){l.setRaw(a,d),this._reallyStackedTo[h.uid]=h,h._stackedSeries[this.uid]=this;break}if(u<0&&g<0){l.setRaw(a,d),this._reallyStackedTo[h.uid]=h,h._stackedSeries[this.uid]=this;break}}}else if(f(u)&&f(g)){l.setRaw(a,d),this._reallyStackedTo[h.uid]=h,h._stackedSeries[this.uid]=this;break}}}r++})}processXSelectionDataItem(t,e,i){w(this.__valueXShowFields,s=>{let a=t.get(s);a!=null&&(i&&(a+=this.getStackedXValueWorking(t,s)),this._min("selectionMinX",a),this._max("selectionMaxX",a*e))})}processYSelectionDataItem(t,e,i){w(this.__valueYShowFields,s=>{let a=t.get(s);a!=null&&(i&&(a+=this.getStackedYValueWorking(t,s)),this._min("selectionMinY",a),this._max("selectionMaxY",a*e))})}getStackedYValueWorking(t,e){const i=t.get("stackToItemY");if(i){const s=i.component;return i.get(e,0)*s.get("vcy",1)+this.getStackedYValueWorking(i,e)}return 0}getStackedXValueWorking(t,e){const i=t.get("stackToItemX");if(i){const s=i.component;return i.get(e,0)*s.get("vcx",1)+this.getStackedXValueWorking(i,e)}return 0}getStackedYValue(t,e){const i=t.get("stackToItemY");return i?i.get(e,0)+this.getStackedYValue(i,e):0}getStackedXValue(t,e){const 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)),n=this.get("xAxis"),r=this.get("yAxis");const o=n.getDataItemPositionX(i,this._xField,s,this.get("vcx",1)),l=r.getDataItemPositionY(i,this._yField,a,this.get("vcy",1));let c=this.getPoint(o,l),h=i.get("left",c.x),d=i.get("right",c.x),u=i.get("top",c.y),g=i.get("bottom",c.y);if(this._shouldShowBullet(o,l)){t.getPrivate("hidden")?e.setPrivate("visible",!1):e.setPrivate("visible",!0);let m=d-h,p=g-u;e.isType("Label")&&(e.setPrivate("maxWidth",Math.abs(m)),e.setPrivate("maxHeight",Math.abs(p)));let _=h+m*s,x=g-p*a;e.set("x",_),e.set("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;const e="datasetchanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,id:t})}}resetGrouping(){dt(this._dataSets,(t,e)=>{e!=this._mainDataItems&&w(e,i=>{this.disposeDataItem(i)})}),this._dataSets={},this._dataItems=this.mainDataItems}_handleDataSetChange(){this.bullets.length>0&&w(this._dataItems,t=>{let e=t.bullets;e&&w(e,i=>{if(i){let s=i.get("sprite");s&&s.setPrivate("visible",!1)}})}),this._selectionProcessed=!1}show(t){const e=Object.create(null,{show:{get:()=>super.show}});return it(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(e.show.call(this,t).then(()=>{this._isShowing=!1;let s=this.get("xAxis"),a=this.get("yAxis"),n=this.get("baseAxis");a!==n&&a.markDirtySelectionExtremes(),s!==n&&s.markDirtySelectionExtremes()})),i.push(this.bulletsContainer.show(t)),i.push(this._sequencedShowHide(!0,t)),yield Promise.all(i)})}hide(t){const e=Object.create(null,{hide:{get:()=>super.hide}});return it(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){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return it(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)];f(e)||(e=this.get("stateAnimationDuration",0));const a=this.get("stateAnimationEasing");w(this._valueFields,n=>{s.push(t.animate({key:n+"Working",to:t.get(n),duration:e,easing:a}).waitForStop())}),yield Promise.all(s)})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return it(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)],a=this.states.create("hidden",{});f(e)||(e=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));const n=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),r=this.get("xAxis"),o=this.get("yAxis"),l=this.get("baseAxis"),c=this.get("stacked");if(l!==r&&l||w(this._valueYFields,h=>{let d=o.getPrivate("min"),u=o.baseValue();f(d)&&d>u&&(u=d),c&&(u=0),t.get(h)!=null&&s.push(t.animate({key:h+"Working",to:u,duration:e,easing:n}).waitForStop())}),l===o||!l){let h=r.getPrivate("min"),d=r.baseValue();f(h)&&h>d&&(d=h),c&&(d=0),w(this._valueXFields,u=>{t.get(u)!=null&&s.push(t.animate({key:u+"Working",to:d,duration:e,easing:n}).waitForStop())})}yield Promise.all(s)})}_markDirtyStack(){this._stackDirty=!0,this.markDirty(),this._markStakedDirtyStack()}_markStakedDirtyStack(){const t=this._stackedSeries;t&&dt(t,(e,i)=>{i._stackDirty||i._markDirtyStack()})}_afterChanged(){super._afterChanged(),this._skipped&&(this._markDirtyAxes(),this._skipped=!1)}showDataItemTooltip(t){this.updateLegendMarker(t),this.updateLegendValue(t);const e=this.get("tooltip");if(e){if(this.isHidden())this.hideTooltip();else if(e._setDataItem(t),t){let i=this.get("locationX",0),s=this.get("locationY",1),a=t.get("locationX",i),n=t.get("locationY",s);const r=this.get("xAxis"),o=this.get("yAxis"),l=this.get("vcx",1),c=this.get("vcy",1),h=r.getDataItemPositionX(t,this._tooltipFieldX,this._aLocationX0+(this._aLocationX1-this._aLocationX0)*a,l),d=o.getDataItemPositionY(t,this._tooltipFieldY,this._aLocationY0+(this._aLocationY1-this._aLocationY0)*n,c),u=this.getPoint(h,d);let g=!0;if(w(this._valueFields,m=>{t.get(m)==null&&(g=!1)}),g){const m=this.chart;m&&m.inPlot(u)?(e.label.text.markDirtyText(),e.set("tooltipTarget",this._getTooltipTarget(t)),e.set("pointTo",this._display.toGlobal({x:u.x,y:u.y}))):e._setDataItem(void 0)}else e._setDataItem(void 0)}}}hideTooltip(){const t=this.get("tooltip");return t&&t.set("tooltipTarget",this),super.hideTooltip()}_getTooltipTarget(t){if(this.get("seriesTooltipTarget")=="bullet"){const e=t.bullets;if(e&&e.length>0){const i=e[0].get("sprite");if(i)return i}}return this}updateLegendValue(t){const e=this.get("legendDataItem");if(e){const i=e.get("label");if(i){let a="";t?(i._setDataItem(t),a=this.get("legendLabelText",i.get("text",this.get("name","")))):(i._setDataItem(this._emptyDataItem),a=this.get("legendRangeLabelText",this.get("legendLabelText",i.get("text",this.get("name",""))))),i.set("text",a)}const s=e.get("valueLabel");if(s){let a="";t?(s._setDataItem(t),a=this.get("legendValueText",s.get("text",""))):(s._setDataItem(this._emptyDataItem),a=this.get("legendRangeValueText",s.get("text",""))),s.set("text",a)}}}_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+="}",t}getPoint(t,e){let i=this.get("xAxis").get("renderer").positionToCoordinate(t),s=this.get("yAxis").get("renderer").positionToCoordinate(e),a=999999999;return s<-a&&(s=-a),s>a&&(s=a),i<-a&&(i=-a),i>a&&(i=a),{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}}Object.defineProperty(B,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYSeries"}),Object.defineProperty(B,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Nt.classNames.concat([B.className])});class H extends zt{constructor(){super(...arguments),Object.defineProperty(this,"_series",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_isPanning",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"labelsContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(X.new(this._root,{}))}),Object.defineProperty(this,"gridContainer",{enumerable:!0,configurable:!0,writable:!0,value:X.new(this._root,{width:D,height:D})}),Object.defineProperty(this,"topGridContainer",{enumerable:!0,configurable:!0,writable:!0,value:X.new(this._root,{width:D,height:D})}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(X.new(this._root,{isMeasured:!1,width:D,height:D,position:"absolute"}))}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rangesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_panStart",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_panEnd",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_sAnimation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_eAnimation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_skipSync",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"axisRanges",{enumerable:!0,configurable:!0,writable:!0,value:new Gt}),Object.defineProperty(this,"_seriesAxisRanges",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"ghostLabel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cursorPosition",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"_snapToSeries",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_seriesValuesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"axisHeader",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(X.new(this._root,{themeTags:["axis","header"],position:"absolute",background:ot.new(this._root,{themeTags:["header","background"],fill:this._root.interfaceColors.get("background")})}))}),Object.defineProperty(this,"_bullets",{enumerable:!0,configurable:!0,writable:!0,value:{}})}_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.axisRanges.events.onAll(e=>{if(e.type==="clear")w(e.oldValues,i=>{this.disposeDataItem(i)});else if(e.type==="push")this._processAxisRange(e.newValue,["range"]);else if(e.type==="setIndex")this._processAxisRange(e.newValue,["range"]);else if(e.type==="insertIndex")this._processAxisRange(e.newValue,["range"]);else if(e.type==="removeIndex")this.disposeDataItem(e.oldValue);else{if(e.type!=="moveIndex")throw new Error("Unknown IStreamEvent type");this._processAxisRange(e.value,["range"])}}));const t=this.get("renderer");t&&(t.axis=this,t.processAxis()),this.children.push(t),this.ghostLabel=t.makeLabel(new mt(this,void 0,{}),[]),this.ghostLabel.adapters.disable("text"),this.ghostLabel.setAll({opacity:0,tooltipText:void 0,tooltipHTML:void 0,interactive:!1}),this.ghostLabel.events.disable()}_updateFinals(t,e){}zoom(t,e,i,s){if(this._updateFinals(t,e),this.get("start")!==t||this.get("end")!=e){let a=this._sAnimation,n=this._eAnimation,r=this.get("maxDeviation",.5)*Math.min(1,e-t);t<-r&&(t=-r),e>1+r&&(e=1+r),t>e&&([t,e]=[e,t]),f(i)||(i=this.get("interpolationDuration",0)),s||(s="end");let o=this.getPrivate("maxZoomFactor",this.get("maxZoomFactor",100)),l=o;e===1&&t!==0&&(s=t<this.get("start")?"start":"end"),t===0&&e!==1&&(s=e>this.get("end")?"end":"start");let c=this.get("minZoomCount"),h=this.get("maxZoomCount");f(c)&&(o=l/c);let d=1;if(f(h)&&(d=l/h),s==="start"?(h>0&&1/(e-t)<d&&(e=t+1/d),1/(e-t)>o&&(e=t+1/o),e>1&&e-t<1/o&&(t=e-1/o)):(h>0&&1/(e-t)<d&&(t=e-1/d),1/(e-t)>o&&(t=e-1/o),t<0&&e-t<1/o&&(e=t+1/o)),1/(e-t)>o&&(e=t+1/o),1/(e-t)>o&&(t=e-1/o),h!=null&&c!=null&&t==this.get("start")&&e==this.get("end")){const u=this.chart;u&&u._handleAxisSelection(this,!0)}if((a&&a.playing&&a.to==t||this.get("start")==t)&&(n&&n.playing&&n.to==e||this.get("end")==e))return;if(i>0){let u,g,m=this.get("interpolationEasing");if(this.get("start")!=t&&(u=this.animate({key:"start",to:t,duration:i,easing:m})),this.get("end")!=e&&(g=this.animate({key:"end",to:e,duration:i,easing:m})),this._sAnimation=u,this._eAnimation=g,u)return u;if(g)return g}else this.set("start",t),this.set("end",e),this._root.events.once("frameended",()=>{this._markDirtyKey("start"),this._root._markDirty()})}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);const i=t.get("above"),s=this.topGridContainer,a=t.get("grid");i&&a&&s.children.moveValue(a);const n=t.get("axisFill");i&&n&&s.children.moveValue(n)}_prepareDataItem(t,e){}markDirtyExtremes(){}markDirtySelectionExtremes(){}_calculateTotals(){}_updateAxisRanges(){this._bullets={},this.axisRanges.each(t=>{this._prepareDataItem(t)}),w(this._seriesAxisRanges,t=>{this._prepareDataItem(t)})}_prepareChildren(){if(super._prepareChildren(),this.get("fixAxisSize")?this.ghostLabel.set("visible",!0):this.ghostLabel.set("visible",!1),this.isDirty("start")||this.isDirty("end")){this.chart._updateCursor();let e=this.get("start",0),i=this.get("end",1),s=this.get("maxDeviation",.5)*Math.min(1,i-e);if(e<-s){let a=e+s;e=-s,this.setRaw("start",e),this.isDirty("end")&&this.setRaw("end",i-a)}if(i>1+s){let a=i-1-s;i=1+s,this.setRaw("end",i),this.isDirty("start")&&this.setRaw("start",e-a)}}const t=this.get("renderer");if(t._start=this.get("start"),t._end=this.get("end"),t._inversed=t.get("inversed",!1),t._axisLength=t.axisLength()/(t._end-t._start),t._updateLC(),this.isDirty("tooltip")){const e=this.get("tooltip");if(e){const i=t.get("themeTags");e.addTag("axis"),e.addTag(this.className.toLowerCase()),e._applyThemes(),i&&(e.set("themeTags",Y(e.get("themeTags"),i)),e.label._applyThemes())}}}_updateTooltipBounds(){const 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._toggleDataItem(t,!1),super.hideDataItem(t)}showDataItem(t){return this._toggleDataItem(t,!0),super.showDataItem(t)}_toggleDataItem(t,e){const i=t.get("label");i&&i.setPrivate("visible",e);const s=t.get("grid");s&&s.setPrivate("visible",e);const a=t.get("tick");a&&a.setPrivate("visible",e);const n=t.get("axisFill");n&&n.setPrivate("visible",e);const r=t.get("bullet");if(r){const o=r.get("sprite");o&&o.setPrivate("visible",e)}}_createAssets(t,e){const i=this.get("renderer");t.get("label")||i.makeLabel(t,e),t.get("grid")||i.makeGrid(t,e),t.get("tick")||i.makeTick(t,e),t.get("axisFill")||i.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;const s=e.get("sprite");s&&(s._setDataItem(t),t.setRaw("bullet",e),s.parent||this.bulletsContainer.children.push(s))}}_afterChanged(){super._afterChanged();const t=this.chart;t&&(t._updateChartLayout(),t.axisHeadersContainer.markDirtySize()),this.get("renderer")._updatePositions()}disposeDataItem(t){super.disposeDataItem(t);const e=this.get("renderer"),i=t.get("label");i&&(e.labels.removeValue(i),i.dispose());const s=t.get("tick");s&&(e.ticks.removeValue(s),s.dispose());const a=t.get("grid");a&&(e.grid.removeValue(a),a.dispose());const n=t.get("axisFill");n&&(e.axisFills.removeValue(n),n.dispose());const r=t.get("bullet");r&&r.dispose()}_updateGhost(){this.setPrivate("cellWidth",this.getCellWidthPosition()*this.get("renderer").axisLength());const t=this.ghostLabel;if(!t.isHidden()){const s=t.localBounds(),a=s.right-s.left;let n=t.get("text");w(this.dataItems,r=>{const o=r.get("label");if(o&&!o.isHidden()){const l=o.localBounds();l.right-l.left>a&&(n=o.text._getText())}}),t.set("text",n)}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(){const t=this._snapToSeries;let e=this._cursorPosition;const i=this.get("tooltip"),s=this.get("renderer");f(e)&&(w(this.series,a=>{if(a.get("baseAxis")===this){const n=this.getSeriesItem(a,e,this.get("tooltipLocation"));a.setRaw("tooltipDataItem",n),t&&t.indexOf(a)!=-1?(a.updateLegendMarker(n),a.updateLegendValue(n)):a.showDataItemTooltip(n)}}),i&&(s.updateTooltipBounds(i),this.get("snapTooltip")&&(e=this.roundAxisPosition(e,this.get("tooltipLocation",.5))),q(e)?i.hide(0):(this.setPrivateRaw("tooltipPosition",e),this._updateTooltipText(i,e),s.positionTooltip(i,e),e<this.get("start")||e>this.get("end")?i.hide(0):i.show(0))))}_updateTooltipText(t,e){t.label.set("text",this.getTooltipText(e))}roundAxisPosition(t,e){return t}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){const 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)}_groupSeriesData(t){}getCellWidthPosition(){return .05}}Object.defineProperty(H,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Axis"}),Object.defineProperty(H,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:zt.classNames.concat([H.className])});class vt extends H{constructor(){super(...arguments),Object.defineProperty(this,"_dirtyExtremes",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dirtySelectionExtremes",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_deltaMinMax",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_minReal",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_maxReal",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_baseValue",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_syncDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_minLogAdjusted",{enumerable:!0,configurable:!0,writable:!0,value:1})}markDirtyExtremes(){this._dirtyExtremes=!0,this.markDirty()}markDirtySelectionExtremes(){this._dirtySelectionExtremes=!0,this.markDirty()}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["axis"]),this.setPrivateRaw("name","value"),this.addTag("value"),super._afterNew()}_prepareChildren(){if(super._prepareChildren(),this.isDirty("syncWithAxis")){this._prevSettings.syncWithAxis&&this._syncDp&&this._syncDp.dispose();let t=this.get("syncWithAxis");t&&(this._syncDp=new se([t.onPrivate("selectionMinFinal",()=>{this._dirtySelectionExtremes=!0}),t.onPrivate("selectionMaxFinal",()=>{this._dirtySelectionExtremes=!0})]))}(this._sizeDirty||this._dirtyExtremes||this._valuesDirty||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("min")||this.isDirty("max")||this.isDirty("extraMin")||this.isDirty("extraMax")||this.isDirty("logarithmic")||this.isDirty("treatZeroAs")||this.isDirty("baseValue")||this.isDirty("strictMinMax")||this.isDirty("strictMinMaxSelection")||this.isDirty("maxPrecision")||this.isDirty("numberFormat"))&&(this._getMinMax(),this.ghostLabel.set("text",""),this._dirtyExtremes=!1),this._dirtySelectionExtremes&&!this._isPanning&&this.get("autoZoom",!0)&&(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"))&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges()),this._baseValue=this.baseValue()}_groupData(){}_formatText(t){const e=this.get("numberFormat"),i=this.getNumberFormatter();let s="";return s=e?i.format(t,e):i.format(t,void 0,this.getPrivate("stepDecimalPlaces")),s}_prepareAxisItems(){const t=this.getPrivate("min"),e=this.getPrivate("max");if(f(t)&&f(e)){const i=this.get("logarithmic"),s=this.getPrivate("step"),a=this.getPrivate("selectionMin"),n=this.getPrivate("selectionMax")+s;let r=a-s,o=0,l=1,c=t;if(i){if(r=this._minLogAdjusted,r<a)for(;r<a;)r+=s;c=r,c<=0&&(c=1,s<1&&(c=s)),l=Math.log(n-s)*Math.LOG10E-Math.log(c)*Math.LOG10E,l>2&&(r=Math.pow(10,Math.log(c)*Math.LOG10E-5))}let h=-1/0;for(;r<n;){let d;this.dataItems.length<o+1?(d=new mt(this,void 0,{}),this._dataItems.push(d),this.processDataItem(d)):d=this.dataItems[o],this._createAssets(d,[]),d.isHidden()&&d.show(),d.setRaw("value",r);const u=d.get("label");if(u&&u.set("text",this._formatText(r)),this._prepareDataItem(d),i&&l>2?r=Math.pow(10,Math.log(c)*Math.LOG10E+o-5):r+=s,h==r)break;let g=Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E));if(g<1){let m=Math.round(Math.abs(Math.log(Math.abs(g))*Math.LOG10E))+2;r=j(r,m)}o++,h=r}for(let d=o;d<this.dataItems.length;d++)this.dataItems[d].hide();w(this.series,d=>{d.inited&&d._markDirtyAxes()}),this._updateGhost()}}_prepareDataItem(t,e){let i=this.get("renderer"),s=t.get("value"),a=t.get("endValue"),n=this.valueToPosition(s),r=n,o=this.valueToPosition(s+this.getPrivate("step"));f(a)&&(r=this.valueToPosition(a),o=r),t.get("isRange")&&a==null&&(o=n),i.updateLabel(t.get("label"),n,r,e);const l=t.get("grid");if(i.updateGrid(l,n,r),l&&(s==this.get("baseValue",0)?(l.addTag("base"),l._applyThemes()):l.hasTag("base")&&(l.removeTag("base"),l._applyThemes())),i.updateTick(t.get("tick"),n,r,e),i.updateFill(t.get("axisFill"),n,o),this._processBullet(t),i.updateBullet(t.get("bullet"),n,r),!t.get("isRange")){const c=this.get("fillRule");c&&c(t)}}_handleRangeChange(){let t=this.positionToValue(this.get("start",0)),e=this.positionToValue(this.get("end",1));const i=this.get("renderer").gridCount();let s=this._adjustMinMax(t,e,i,!0),a=ae(s.step);this.setPrivateRaw("stepDecimalPlaces",a),t=j(t,a),e=j(e,a),s=this._adjustMinMax(t,e,i,!0);let n=s.step;t=s.min,e=s.max,this.getPrivate("selectionMin")===t&&this.getPrivate("selectionMax")===e&&this.getPrivate("step")===n||(this.setPrivateRaw("selectionMin",t),this.setPrivateRaw("selectionMax",e),this.setPrivateRaw("step",n))}positionToValue(t){const 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){const e=this.getPrivate("min"),i=this.getPrivate("max");if(this.get("logarithmic")){if(t<=0){let s=this.get("treatZeroAs");f(s)&&(t=s)}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){const e=this.getPrivate("minFinal"),i=this.getPrivate("maxFinal");if(this.get("logarithmic")){if(t<=0){let s=this.get("treatZeroAs");f(s)&&(t=s)}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;const s=this.valueToPosition(t);return this._settings.renderer.positionToCoordinate(s)}getY(t,e,i){t=i+(t-i)*e;const 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 t.get("stackToItemX")?a=a*s+t.component.getStackedXValueWorking(t,e):a=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 t.get("stackToItemY")?a=a*s+t.component.getStackedYValueWorking(t,e):a=this._baseValue+(a-this._baseValue)*s,this.valueToPosition(a)}basePosition(){return this.valueToPosition(this.baseValue())}baseValue(){const 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));let 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 n=i+"Working";if(i)for(let r=e;r<a;r++){let o=0,l=0;w(this.series,c=>{if(!c.get("excludeFromTotal")){let h=c.dataItems[r];if(h){let d=h.get(n)*c.get(s);q(d)||(o+=d,l+=Math.abs(d))}}}),w(this.series,c=>{if(!c.get("excludeFromTotal")){let h=c.dataItems[r];if(h){let d=h.get(n)*c.get(s);q(d)||(h.set(i+"Total",l),h.set(i+"Sum",o),h.set(i+"TotalPercent",d/l*100))}}})}}}}}_getSelectionMinMax(){const t=this.getPrivate("minFinal"),e=this.getPrivate("maxFinal"),i=this.get("min"),s=this.get("max");let a=this.get("extraMin",0),n=this.get("extraMax",0);this.get("logarithmic")&&(this.get("extraMin")==null&&(a=.1),this.get("extraMax")==null&&(n=.2));const r=this.get("renderer").gridCount(),o=this.get("strictMinMaxSelection"),l=this.get("strictMinMax");if(f(t)&&f(e)){let c=e,h=t;if(w(this.series,b=>{if(!b.get("ignoreMinMax")){let v,P;const A=b.getPrivate("outOfSelection");b.get("xAxis")===this?A||(v=b.getPrivate("selectionMinX",b.getPrivate("minX")),P=b.getPrivate("selectionMaxX",b.getPrivate("maxX"))):b.get("yAxis")===this&&(A||(v=b.getPrivate("selectionMinY",b.getPrivate("minY")),P=b.getPrivate("selectionMaxY",b.getPrivate("maxY")))),b.isHidden()||b.isShowing()||(f(v)&&(c=Math.min(c,v)),f(P)&&(h=Math.max(h,P)))}}),this.axisRanges.each(b=>{if(b.get("affectsMinMax")){let v=b.get("value");v!=null&&(c=Math.min(c,v),h=Math.max(h,v)),v=b.get("endValue"),v!=null&&(c=Math.min(c,v),h=Math.max(h,v))}}),c>h&&([c,h]=[h,c]),f(i)?c=l?i:t:l&&f(this._minReal)&&(c=this._minReal),f(s)?h=l?s:e:l&&f(this._maxReal)&&(h=this._maxReal),c===h){c-=this._deltaMinMax,h+=this._deltaMinMax;let b=this._adjustMinMax(c,h,r,l);c=b.min,h=b.max}let d=c,u=h;c-=(h-c)*a,h+=(h-c)*n;let g=this._adjustMinMax(c,h,r);c=g.min,h=g.max,c=At(c,t,e),h=At(h,t,e),g=this._adjustMinMax(c,h,r,!0),l||(c=g.min,h=g.max);const m=this.get("syncWithAxis");m&&(g=this._syncAxes(c,h,g.step,m.getPrivate("selectionMinFinal",m.getPrivate("minFinal",0)),m.getPrivate("selectionMaxFinal",m.getPrivate("maxFinal",1)),m.getPrivate("selectionStepFinal",m.getPrivate("step",1))),c=g.min,h=g.max),l&&(f(i)&&(c=Math.max(c,i)),f(s)&&(h=Math.min(h,s))),o&&(c=d-(h-c)*a,h=u+(h-c)*n),this.get("logarithmic")&&(c<=0&&(c=d*(1-Math.min(a,.99))),c<t&&(c=t),h>e&&(h=e));let p=Math.min(20,Math.ceil(Math.log(this.getPrivate("maxZoomFactor",100)+1)/Math.LN10)+2),_=j(this.valueToFinalPosition(c),p),x=j(this.valueToFinalPosition(h),p);this.setPrivateRaw("selectionMinFinal",c),this.setPrivateRaw("selectionMaxFinal",h),this.setPrivateRaw("selectionStepFinal",g.step),this.zoom(_,x)}}_getMinMax(){let t=this.get("min"),e=this.get("max"),i=1/0,s=-1/0,a=this.get("extraMin",0),n=this.get("extraMax",0);this.get("logarithmic")&&(this.get("extraMin")==null&&(a=.1),this.get("extraMax")==null&&(n=.2));let r=1/0;if(w(this.series,b=>{if(!b.get("ignoreMinMax")){let v,P;if(b.get("xAxis")===this?(v=b.getPrivate("minX"),P=b.getPrivate("maxX")):b.get("yAxis")===this&&(v=b.getPrivate("minY"),P=b.getPrivate("maxY")),f(v)&&f(P)){i=Math.min(i,v),s=Math.max(s,P);let A=P-v;A<=0&&(A=Math.abs(P/100)),A<r&&(r=A)}}}),this.axisRanges.each(b=>{if(b.get("affectsMinMax")){let v=b.get("value");v!=null&&(i=Math.min(i,v),s=Math.max(s,v)),v=b.get("endValue"),v!=null&&(i=Math.min(i,v),s=Math.max(s,v))}}),this.get("logarithmic")){let b=this.get("treatZeroAs");f(b)&&i<=0&&(i=b)}if(i===0&&s===0&&(s=.9,i=-.9),f(t)&&(i=t),f(e)&&(s=e),i===1/0||s===-1/0)return this.setPrivate("minFinal",void 0),void this.setPrivate("maxFinal",void 0);const o=i,l=s;let c=this.adapters.fold("min",i),h=this.adapters.fold("max",s);f(c)&&(i=c),f(h)&&(s=h),i=this._fixMin(i),s=this._fixMax(s),s-i<=1/Math.pow(10,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)*n,this.get("logarithmic")&&(i<0&&o>=0&&(i=0),s>0&&l<=0&&(s=0)),this._minReal=i,this._maxReal=s;let d=this.get("strictMinMax"),u=this.get("strictMinMaxSelection",!1);u&&(d=u);let g=d;f(e)&&(g=!0);let m=this.get("renderer").gridCount(),p=this._adjustMinMax(i,s,m,g);i=p.min,s=p.max,p=this._adjustMinMax(i,s,m,!0),i=p.min,s=p.max,d&&(i=f(t)?t:this._minReal,s=f(e)?e:this._maxReal,s-i<=1e-8&&(i-=this._deltaMinMax,s+=this._deltaMinMax),i-=(s-i)*a,s+=(s-i)*n),c=this.adapters.fold("min",i),h=this.adapters.fold("max",s),f(c)&&(i=c),f(h)&&(s=h),r==1/0&&(r=s-i);let _=Math.round(Math.abs(Math.log(Math.abs(s-i))*Math.LOG10E))+5;i=j(i,_),s=j(s,_);const x=this.get("syncWithAxis");if(x&&(p=this._syncAxes(i,s,p.step,x.getPrivate("minFinal",x.getPrivate("min",0)),x.getPrivate("maxFinal",x.getPrivate("max",1)),x.getPrivate("step",1)),i=p.min,s=p.max),this.setPrivateRaw("maxZoomFactor",Math.max(1,Math.ceil((s-i)/r*this.get("maxZoomFactor",100)))),this._fixZoomFactor(),this.get("logarithmic")&&(this._minLogAdjusted=i,i=this._minReal,s=this._maxReal,i<=0&&(i=o*(1-Math.min(a,.99)))),f(i)&&f(s)&&(this.getPrivate("minFinal")!==i||this.getPrivate("maxFinal")!==s)){this.setPrivate("minFinal",i),this.setPrivate("maxFinal",s),this._saveMinMax(i,s);const b=this.get("interpolationDuration",0),v=this.get("interpolationEasing");this.animatePrivate({key:"min",to:i,duration:b,easing:v}),this.animatePrivate({key:"max",to:s,duration:b,easing:v})}}_fixZoomFactor(){}_getDelta(t){let e=Math.log(Math.abs(t))*Math.LOG10E,i=Math.pow(10,Math.floor(e));i/=10,this._deltaMinMax=i}_saveMinMax(t,e){}_adjustMinMax(t,e,i,s){i<=1&&(i=1),i=Math.round(i);let a=t,n=e,r=e-t;r===0&&(r=Math.abs(e));let o=Math.log(Math.abs(r))*Math.LOG10E,l=Math.pow(10,Math.floor(o));l/=10;let c=l;s&&(c=0),s?(t=Math.floor(t/l)*l,e=Math.ceil(e/l)*l):(t=Math.ceil(t/l)*l-c,e=Math.floor(e/l)*l+c),t<0&&a>=0&&(t=0),e>0&&n<=0&&(e=0),o=Math.log(Math.abs(r))*Math.LOG10E,l=Math.pow(10,Math.floor(o)),l/=100;let h=Math.ceil(r/i/l)*l,d=Math.pow(10,Math.floor(Math.log(Math.abs(h))*Math.LOG10E)),u=Math.ceil(h/d);u>5?u=10:u<=5&&u>2&&(u=5),h=Math.ceil(h/(d*u))*d*u;let g=this.get("maxPrecision");if(f(g)){let x=re(h,g);g<Number.MAX_VALUE&&h!==x&&(h=x)}let m=0;d<1&&(m=Math.round(Math.abs(Math.log(Math.abs(d))*Math.LOG10E))+1,h=j(h,m));let p,_=Math.floor(t/h);return t=j(h*_,m),p=s?Math.floor(e/h):Math.ceil(e/h),p===_&&p++,(e=j(h*p,m))<n&&(e+=h),t>a&&(t-=h),h=this.fixSmallStep(h),{min:t,max:e,step:h}}getTooltipText(t,e){const i=this.get("tooltipNumberFormat",this.get("numberFormat")),s=this.getNumberFormatter(),a=this.get("extraTooltipPrecision",0),n=this.getPrivate("stepDecimalPlaces",0)+a,r=j(this.positionToValue(t),n);return i?s.format(r,i):s.format(r,void 0,n)}getSeriesItem(t,e){let i,s,a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),n=this.positionToValue(e);if(w(t.dataItems,(r,o)=>{const l=Math.abs(r.get(a)-n);(i===void 0||l<s)&&(i=o,s=l)}),i!=null)return t.dataItems[i]}zoomToValues(t,e,i){const s=this.getPrivate("minFinal",0),a=this.getPrivate("maxFinal",0);this.getPrivate("min")!=null&&this.getPrivate("max")!=null&&this.zoom((t-s)/(a-s),(e-s)/(a-s),i)}_syncAxes(t,e,i,s,a,n){if(this.get("syncWithAxis")){let r=Math.round(a-s)/n,o=Math.round((e-t)/i),l=this.get("renderer").gridCount();if(f(r)&&f(o)){let c=!1,h=0,d=.01*(e-t),u=t,g=e,m=i;for(;c!=1;)if(c=this._checkSync(u,g,m,r),h++,h>500&&(c=!0),c)t=u,e=g,i=m;else{h/3==Math.round(h/3)?(u=t-d*h,t>=0&&u<0&&(u=0)):(g=e+d*h,g<=0&&g>0&&(g=0));let p=this._adjustMinMax(u,g,l,!0);u=p.min,g=p.max,m=p.step}}}return{min:t,max:e,step:i}}_checkSync(t,e,i,s){let a=(e-t)/i;for(let n=1;n<s;n++)if(j(a/n,1)==s||a*n==s)return!0;return!1}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return f(t)&&f(e)?this.getPrivate("step",1)/(t-e):.05}}Object.defineProperty(vt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ValueAxis"}),Object.defineProperty(vt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:H.classNames.concat([vt.className])});class ct extends jt{constructor(){super(...arguments),Object.defineProperty(this,"_tickPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]})}}Object.defineProperty(ct,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisLabel"}),Object.defineProperty(ct,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:jt.classNames.concat([ct.className])});class ut extends Wt{constructor(){super(...arguments),Object.defineProperty(this,"_tickPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]})}}Object.defineProperty(ut,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisTick"}),Object.defineProperty(ut,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Wt.classNames.concat([ut.className])});class Z extends V{constructor(){super(...arguments),Object.defineProperty(this,"_axisLength",{enumerable:!0,configurable:!0,writable:!0,value:100}),Object.defineProperty(this,"_start",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_end",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_inversed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_minSize",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_lc",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_ls",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_thumbDownPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downStart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downEnd",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ticks",{enumerable:!0,configurable:!0,writable:!0,value:new z(G.new({}),()=>ut._new(this._root,{themeTags:Y(this.ticks.template.get("themeTags",[]),this.get("themeTags",[]))},[this.ticks.template]))}),Object.defineProperty(this,"grid",{enumerable:!0,configurable:!0,writable:!0,value:new z(G.new({}),()=>st._new(this._root,{themeTags:Y(this.grid.template.get("themeTags",[]),this.get("themeTags",[]))},[this.grid.template]))}),Object.defineProperty(this,"axisFills",{enumerable:!0,configurable:!0,writable:!0,value:new z(G.new({}),()=>V._new(this._root,{themeTags:Y(this.axisFills.template.get("themeTags",["axis","fill"]),this.get("themeTags",[]))},[this.axisFills.template]))}),Object.defineProperty(this,"labels",{enumerable:!0,configurable:!0,writable:!0,value:new z(G.new({}),()=>ct._new(this._root,{themeTags:Y(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template]))}),Object.defineProperty(this,"axis",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}makeTick(t,e){const i=this.ticks.make();return i._setDataItem(t),t.setRaw("tick",i),i.set("themeTags",Y(i.get("themeTags"),e)),this.axis.labelsContainer.children.push(i),this.ticks.push(i),i}makeGrid(t,e){const i=this.grid.make();return i._setDataItem(t),t.setRaw("grid",i),i.set("themeTags",Y(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),this.grid.push(i),i}makeAxisFill(t,e){const i=this.axisFills.make();return i._setDataItem(t),i.set("themeTags",Y(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),t.setRaw("axisFill",i),this.axisFills.push(i),i}makeLabel(t,e){const i=this.labels.make();return i.set("themeTags",Y(i.get("themeTags"),e)),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.set("isMeasured",!1);const t=this.thumb;t&&(this._disposers.push(t.events.on("pointerdown",e=>{this._handleThumbDown(e)})),this._disposers.push(t.events.on("globalpointerup",e=>{this._handleThumbUp(e)})),this._disposers.push(t.events.on("globalpointermove",e=>{this._handleThumbMove(e)})))}_changed(){if(super._changed(),this.isDirty("pan")){const t=this.thumb;if(t){const e=this.axis.labelsContainer,i=this.get("pan");i=="zoom"?e.children.push(t):i=="none"&&e.children.removeValue(t)}}}_handleThumbDown(t){this._thumbDownPoint=this.toLocal(t.point);const e=this.axis;this._downStart=e.get("start"),this._downEnd=e.get("end")}_handleThumbUp(t){this._thumbDownPoint=void 0}_handleThumbMove(t){const e=this._thumbDownPoint;if(e){const i=this.toLocal(t.point),s=this._downStart,a=this._downEnd,n=this._getPan(i,e)*Math.min(1,a-s)/2;this.axis.zoom(s-n,a+n,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){const e=this._start||0,i=this._end||1;return t*=i-e,t=this.get("inversed")?i-t:e+t}toGlobalPosition(t){const 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;const n=a.get("start",0),r=a.get("end",1);e<n+(r-n)*(i-1e-4)||e>n+(r-n)*(s+1e-4)?t.setPrivate("visible",!1):t.setPrivate("visible",!0)}_positionTooltip(t,e){const i=this.chart;i&&(i.inPlot(e)?t.set("pointTo",this._display.toGlobal(e)):t.hide())}processAxis(){}}Object.defineProperty(Z,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRenderer"}),Object.defineProperty(Z,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:V.classNames.concat([Z.className])});class yt extends Z{constructor(){super(...arguments),Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:ot.new(this._root,{width:D,isMeasured:!1,themeTags:["axis","x","thumb"]})})}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["renderer","x"]),super._afterNew(),this.setPrivateRaw("letter","X");const t=this.grid.template;t.set("height",D),t.set("width",0),t.set("draw",(e,i)=>{e.moveTo(0,0),e.lineTo(0,i.height())}),this.set("draw",(e,i)=>{e.moveTo(0,0),e.lineTo(i.width(),0)})}_changed(){super._changed();const t=this.axis;t.ghostLabel.setPrivate("visible",!this.get("inside")),t.ghostLabel.set("x",-1e3);const e="opposite",i="inside";if(this.isDirty(e)||this.isDirty(i)){const s=this.chart,a=t.children;if(this.get(i)?t.addTag(i):t.removeTag(i),s){if(this.get(e)){const n=s.topAxesContainer.children;n.indexOf(t)==-1&&n.insertIndex(0,t),t.addTag(e),a.moveValue(this)}else{const n=s.bottomAxesContainer.children;n.indexOf(t)==-1&&n.moveValue(t),t.removeTag(e),a.moveValue(this,0)}t.ghostLabel._applyThemes(),this.labels.each(n=>{n._applyThemes()}),this.root._markDirtyRedraw()}t.markDirtySize()}this.thumb.setPrivate("height",t.labelsContainer.height())}_getPan(t,e){return(e.x-t.x)/this.width()}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t=(t-=this._ls)*(i-e)/this._lc,t=this.get("inversed")?i-t:e+t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t-=e,t=t/(i-e)*this._lc,t+=this._ls}_updateLC(){const t=this.axis,e=t.parent;if(e){const i=e.innerWidth();this._lc=this.axisLength()/i,this._ls=(t.x()-e.get("paddingLeft",0))/i}}_updatePositions(){const t=this.axis,e=t.x()-pt(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0);t.gridContainer.set("x",e),t.topGridContainer.set("x",e),t.bulletsContainer.set("y",this.y());const i=t.chart;if(i){const s=i.plotContainer,a=t.axisHeader;let n=t.get("marginLeft",0),r=t.x()-n;const o=t.parent;o&&(r-=o.get("paddingLeft",0)),a.children.length>0?(n=t.axisHeader.width(),t.set("marginLeft",n+1)):a.set("width",n),a.setAll({x:r,y:-1,height:s.height()+2})}}processAxis(){super.processAxis();const t=this.axis;t.set("width",D);const e=this._root.verticalLayout;t.set("layout",e),t.labelsContainer.set("width",D),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){f(e)||(e=0);let a=.5;a=f(s)&&s>1?t.get("multiLocation",a):t.get("location",a),f(i)&&i!=e&&(e+=(i-e)*a),t.set("x",this.positionToCoordinate(e));let n=t.get("length",0);const r=t.get("inside",this.get("inside",!1));this.get("opposite")?(t.set("y",D),r||(n*=-1)):(t.set("y",0),r&&(n*=-1)),t.set("draw",o=>{o.moveTo(0,0),o.lineTo(0,n)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateLabel(t,e,i,s){if(t){let a=.5;a=f(s)&&s>1?t.get("multiLocation",a):t.get("location",a),f(e)||(e=0);const n=t.get("inside",this.get("inside",!1));this.get("opposite")?n?(t.set("position","absolute"),t.set("y",0)):(t.set("position","relative"),t.set("y",D)):n?(t.set("y",0),t.set("position","absolute")):(t.set("y",void 0),t.set("position","relative")),f(i)&&i!=e&&(e+=(i-e)*a),t.set("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateGrid(t,e,i){if(t){f(e)||(e=0);let s=t.get("location",.5);f(i)&&i!=e&&(e+=(i-e)*s),t.set("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateBullet(t,e,i){if(t){const s=t.get("sprite");if(s){f(e)||(e=0);let a=t.get("location",.5);f(i)&&i!=e&&(e+=(i-e)*a);let n=this.axis.roundAxisPosition(e,a),r=this.axis._bullets[n],o=-1;if(this.get("opposite")&&(o=1),t.get("stacked"))if(r){let l=r.get("sprite");l&&s.set("y",l.y()+l.height()*o)}else s.set("y",0);this.axis._bullets[n]=t,s.set("x",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){f(e)||(e=0),f(i)||(i=1);let s=this.positionToCoordinate(e),a=this.positionToCoordinate(i);this.fillDrawMethod(t,s,a)}}fillDrawMethod(t,e,i){t.set("draw",s=>{const a=this.axis.gridContainer.height(),n=this.width();i<e&&([i,e]=[e,i]),e>n||i<0||(s.moveTo(e,0),s.lineTo(i,0),s.lineTo(i,a),s.lineTo(e,a),s.lineTo(e,0))})}positionTooltip(t,e){this._positionTooltip(t,{x:this.positionToCoordinate(e),y:0})}updateTooltipBounds(t){const e=this.get("inside"),i=1e5;let s=this._display.toGlobal({x:0,y:0}),a=s.x,n=0,r=this.axisLength(),o=i,l="up";this.get("opposite")?e?(l="up",n=s.y,o=i):(l="down",n=s.y-i,o=i):e?(l="down",n=s.y-i,o=i):(l="up",n=s.y,o=i);const c={left:a,right:a+r,top:n,bottom:n+o},h=t.get("bounds");Vt(c,h)||(t.set("bounds",c),t.set("pointerOrientation",l))}}Object.defineProperty(yt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRendererX"}),Object.defineProperty(yt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Z.classNames.concat([yt.className])});class Pt extends Z{constructor(){super(...arguments),Object.defineProperty(this,"_downY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:ot.new(this._root,{height:D,isMeasured:!1,themeTags:["axis","y","thumb"]})})}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["renderer","y"]),this._settings.opposite&&this._settings.themeTags.push("opposite"),super._afterNew(),this.setPrivateRaw("letter","Y");const t=this.grid.template;t.set("width",D),t.set("height",0),t.set("draw",(e,i)=>{e.moveTo(0,0),e.lineTo(i.width(),0)}),this.set("draw",(e,i)=>{e.moveTo(0,0),e.lineTo(0,i.height())})}_getPan(t,e){return(t.y-e.y)/this.height()}_changed(){super._changed();const t=this.axis;t.ghostLabel.setPrivate("visible",!this.get("inside")),t.ghostLabel.set("y",-1e3);const e=this.thumb,i="opposite",s="inside",a=this.chart;if(this.isDirty(i)||this.isDirty(s)){const r=t.children;if(this.get(s)?t.addTag(s):t.removeTag(s),a){if(this.get(i)){const o=a.rightAxesContainer.children;o.indexOf(t)==-1&&o.moveValue(t,0),t.addTag(i),r.moveValue(this,0)}else{const o=a.leftAxesContainer.children;o.indexOf(t)==-1&&o.moveValue(t),t.removeTag(i),r.moveValue(this)}t.ghostLabel._applyThemes(),this.labels.each(o=>{o._applyThemes()}),this.root._markDirtyRedraw()}t.markDirtySize()}const n=t.labelsContainer.width();a&&(this.get(i)?e.set("centerX",0):e.set("centerX",n)),e.setPrivate("width",n)}processAxis(){super.processAxis();const t=this.axis;t.get("height")==null&&t.set("height",D);const e=this._root.horizontalLayout;t.set("layout",e),t.labelsContainer.set("height",D),t.axisHeader.set("layout",e)}_updatePositions(){const t=this.axis,e=t.y()-pt(t.get("centerY",0),t.height());t.gridContainer.set("y",e),t.topGridContainer.set("y",e),t.bulletsContainer.set("x",this.x());const i=t.chart;if(i){const s=i.plotContainer,a=t.axisHeader;let n=t.get("marginTop",0);a.children.length>0?(n=t.axisHeader.height(),t.set("marginTop",n+1)):a.set("height",n),a.setAll({y:t.y()-n,x:-1,width:s.width()+2})}}axisLength(){return this.axis.innerHeight()}positionToPoint(t){return{x:0,y:this.positionToCoordinate(t)}}updateLabel(t,e,i,s){if(t){f(e)||(e=0);let a=.5;a=f(s)&&s>1?t.get("multiLocation",a):t.get("location",a);const n=this.get("opposite"),r=t.get("inside",this.get("inside",!1));n?(t.set("x",0),r?t.set("position","absolute"):t.set("position","relative")):r?(t.set("x",0),t.set("position","absolute")):(t.set("x",void 0),t.set("position","relative")),f(i)&&i!=e&&(e+=(i-e)*a),t.set("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateGrid(t,e,i){if(t){f(e)||(e=0);let s=t.get("location",.5);f(i)&&i!=e&&(e+=(i-e)*s),t.set("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateTick(t,e,i,s){if(t){f(e)||(e=0);let a=.5;a=f(s)&&s>1?t.get("multiLocation",a):t.get("location",a),f(i)&&i!=e&&(e+=(i-e)*a),t.set("y",this.positionToCoordinate(e));let n=t.get("length",0);const r=t.get("inside",this.get("inside",!1));this.get("opposite")?(t.set("x",0),r&&(n*=-1)):r||(n*=-1),t.set("draw",o=>{o.moveTo(0,0),o.lineTo(n,0)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateBullet(t,e,i){if(t){const s=t.get("sprite");if(s){f(e)||(e=0);let a=t.get("location",.5);f(i)&&i!=e&&(e+=(i-e)*a);let n=this.axis.roundAxisPosition(e,a),r=this.axis._bullets[n],o=1;if(this.get("opposite")&&(o=-1),t.get("stacked"))if(r){let l=r.get("sprite");l&&s.set("x",l.x()+l.width()*o)}else s.set("x",0);this.axis._bullets[n]=t,s.set("y",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){f(e)||(e=0),f(i)||(i=1);let s=this.positionToCoordinate(e),a=this.positionToCoordinate(i);this.fillDrawMethod(t,s,a)}}fillDrawMethod(t,e,i){t.set("draw",s=>{const a=this.axis.gridContainer.width(),n=this.height();i<e&&([i,e]=[e,i]),e>n||i<0||(s.moveTo(0,e),s.lineTo(a,e),s.lineTo(a,i),s.lineTo(0,i),s.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){const e=this.get("inside"),i=1e5;let s=this._display.toGlobal({x:0,y:0}),a=s.y,n=0,r=this.axisLength(),o=i,l="right";this.get("opposite")?e?(l="right",n=s.x-i,o=i):(l="left",n=s.x,o=i):e?(l="left",n=s.x,o=i):(l="right",n=s.x-i,o=i);const c={left:n,right:n+o,top:a,bottom:a+r},h=t.get("bounds");Vt(c,h)||(t.set("bounds",c),t.set("pointerOrientation",l))}_updateLC(){const t=this.axis,e=t.parent;if(e){const i=e.innerHeight();this._lc=this.axisLength()/i,this._ls=t.y()/i}}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t=(t-=this._ls)*(i-e)/this._lc,t=this.get("inversed")?e+t:i-t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t-=e:t=i-t,t=t/(i-e)*this._lc,t+=this._ls}fixPosition(t){return this.get("inversed")?t:1-t}}Object.defineProperty(Pt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRendererY"}),Object.defineProperty(Pt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Z.classNames.concat([Pt.className])});class wt extends B{constructor(){super(...arguments),Object.defineProperty(this,"_endIndex",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeGenerator",{enumerable:!0,configurable:!0,writable:!0,value:Kt()}),Object.defineProperty(this,"_fillGenerator",{enumerable:!0,configurable:!0,writable:!0,value:ue()}),Object.defineProperty(this,"_legendStroke",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_legendFill",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"strokes",{enumerable:!0,configurable:!0,writable:!0,value:new z(G.new({}),()=>V._new(this._root,{themeTags:Y(this.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template]))}),Object.defineProperty(this,"fills",{enumerable:!0,configurable:!0,writable:!0,value:new z(G.new({}),()=>V._new(this._root,{themeTags:Y(this.strokes.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template]))}),Object.defineProperty(this,"_fillTemplate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeTemplate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_previousPoint",{enumerable:!0,configurable:!0,writable:!0,value:[0,0,0,0]}),Object.defineProperty(this,"_dindex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_sindex",{enumerable:!0,configurable:!0,writable:!0,value: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){const e=this.mainContainer.children.push(t.make());return t.push(e),e}makeFill(t){const 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")){const i=this.get("stroke");this.strokes.template.set("stroke",i);const s=this._legendStroke;s&&s.states.lookup("default").set("stroke",i)}if(this.isDirty("fill")){const i=this.get("fill");this.fills.template.set("fill",i);const s=this._legendFill;s&&s.states.lookup("default").set("fill",i)}if(this.isDirty("curveFactory")){const i=this.get("curveFactory");i&&(this._strokeGenerator.curve(i),this._fillGenerator.curve(i))}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")){this.fills.each(c=>{c.setPrivate("visible",!1)}),this.strokes.each(c=>{c.setPrivate("visible",!1)}),this.axisRanges.each(c=>{let h=c.fills;h&&h.each(u=>{u.setPrivate("visible",!1)});let d=c.strokes;d&&d.each(u=>{u.setPrivate("visible",!1)})});let i=this.startIndex(),s=this.strokes.template.get("templateField"),a=this.fills.template.get("templateField"),n=!0,r=!0;s&&(n=!1),a&&(r=!1);for(let c=i-1;c>=0;c--){let h=this.dataItems[c],d=!0,u=h.dataContext;if(s&&u[s]&&(n=!0),a&&u[a]&&(r=!0),w(this._valueFields,g=>{f(h.get(g))||(d=!1)}),d&&n&&r){i=c;break}}let o=this.dataItems.length,l=this.endIndex();if(l<o){l++;for(let c=l;c<o;c++){let h=this.dataItems[c],d=!0;if(w(this._valueFields,u=>{f(h.get(u))||(d=!1)}),d){l=c+1;break}}}if(i>0&&i--,this._endIndex=l,this._clearGraphics(),this._sindex=0,this._dindex=i,this.dataItems.length==1)this._startSegment(0);else for(;this._dindex<l-1;)this._startSegment(this._dindex),this._sindex++}}else this._skipped=!0;super._updateChildren()}_clearGraphics(){this.strokes.clear(),this.fills.clear()}_startSegment(t){let e=this._endIndex,i=e;const s=this.get("autoGapCount"),a=this.get("connect"),n=this.makeFill(this.fills),r=this._fillTemplate,o=this.fills.template;r&&r!=o&&(n.template=r),n.setPrivate("visible",!0);const l=this.makeStroke(this.strokes),c=this._strokeTemplate;c&&c!=this.strokes.template&&(l.template=c),l.setPrivate("visible",!0);let h=this.get("xAxis"),d=this.get("yAxis"),u=this.get("baseAxis"),g=this.get("vcx",1),m=this.get("vcy",1),p=this._xField,_=this._yField,x=this._xOpenField,b=this._yOpenField;const v=this.get("openValueXField"),P=this.get("openValueYField");v||(x=this._xField),P||(b=this._yField);const A=this.get("stacked"),F=h.basePosition(),I=d.basePosition();let E;E=u===d?this._yField:this._xField;const T=[];let M=[];T.push(M);const W=this.strokes.template.get("templateField"),U=this.fills.template.get("templateField");let K=this.get("locationX",.5),J=this.get("locationY",.5),nt=this.get("openLocationX",K),O=this.get("openLocationY",J);const L=this.get("minDistance",0);let k,kt=this.fills.template.get("visible");this.axisRanges.length>0&&(kt=!0);let Tt=!1;(A||v||P)&&(Tt=!0);const _t={points:M,segments:T,stacked:A,getOpen:Tt,basePosX:F,basePosY:I,fillVisible:kt,xField:p,yField:_,xOpenField:x,yOpenField:b,vcx:g,vcy:m,baseAxis:u,xAxis:h,yAxis:d,locationX:K,locationY:J,openLocationX:nt,openLocationY:O,minDistance:L};for(k=t;k<i;k++){this._dindex=k;const N=this._dataItems[k];let Q=N.get(p),xt=N.get(_);if(Q==null||xt==null?a||(M=[],T.push(M),_t.points=M):this._getPoints(N,_t),W){let C=N.dataContext[W];if(C){if(C instanceof G||(C=G.new(C)),this._strokeTemplate=C,k>t){i=k;break}l.template=C}}if(U){let C=N.dataContext[U];if(C){if(C instanceof G||(C=G.new(C)),this._fillTemplate=C,k>t){i=k;break}n.template=C}}if(!a){let C=this.dataItems[k+1];C&&u.shouldGap(N,C,s,E)&&(M=[],T.push(M),_t.points=M)}}n.setRaw("userData",[t,k]),l.setRaw("userData",[t,k]),k===e&&this._endLine(M,T[0][0]),l&&this._drawStroke(l,T),n&&this._drawFill(n,T),this.axisRanges.each(N=>{const Q=N.container,xt=N.fills,C=this.makeFill(xt);Q&&Q.children.push(C),C.setPrivate("visible",!0),this._drawFill(C,T);const Jt=N.strokes,rt=this.makeStroke(Jt);Q&&Q.children.push(rt),rt.setPrivate("visible",!0),this._drawStroke(rt,T),C.setRaw("userData",[t,k]),rt.setRaw("userData",[t,k])})}_getPoints(t,e){let i=e.points,s=t.get("locationX",e.locationX),a=t.get("locationY",e.locationY),n=e.xAxis.getDataItemPositionX(t,e.xField,s,e.vcx),r=e.yAxis.getDataItemPositionY(t,e.yField,a,e.vcy);if(this._shouldInclude(n)){const o=this.getPoint(n,r),l=[o.x,o.y];if(o.x+=this._x,o.y+=this._y,t.set("point",o),e.fillVisible){let c=n,h=r;if(e.baseAxis===e.xAxis?h=e.basePosY:e.baseAxis===e.yAxis&&(c=e.basePosX),e.getOpen){let u=t.get(e.xOpenField),g=t.get(e.yOpenField);if(u!=null&&g!=null){let m=t.get("openLocationX",e.openLocationX),p=t.get("openLocationY",e.openLocationY);if(e.stacked){let _=t.get("stackToItemX"),x=t.get("stackToItemY");_?(c=e.xAxis.getDataItemPositionX(_,e.xField,m,_.component.get("vcx")),q(c)&&(c=e.basePosX)):c=e.yAxis===e.baseAxis?e.basePosX:e.xAxis.getDataItemPositionX(t,e.xOpenField,m,e.vcx),x?(h=e.yAxis.getDataItemPositionY(x,e.yField,p,x.component.get("vcy")),q(h)&&(h=e.basePosY)):h=e.xAxis===e.baseAxis?e.basePosY:e.yAxis.getDataItemPositionY(t,e.yOpenField,p,e.vcy)}else c=e.xAxis.getDataItemPositionX(t,e.xOpenField,m,e.vcx),h=e.yAxis.getDataItemPositionY(t,e.yOpenField,p,e.vcy)}}let d=this.getPoint(c,h);l[2]=d.x,l[3]=d.y}if(e.minDistance>0){const c=l[0],h=l[1],d=l[2],u=l[3],g=this._previousPoint,m=g[0],p=g[1],_=g[2],x=g[3];(Math.hypot(c-m,h-p)>e.minDistance||d&&u&&Math.hypot(d-_,u-x)>e.minDistance)&&(i.push(l),this._previousPoint=l)}else i.push(l)}}_endLine(t,e){}_drawStroke(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",i=>{w(e,s=>{this._strokeGenerator.context(i),this._strokeGenerator(s)})})}_drawFill(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",i=>{w(e,s=>{this._fillGenerator.context(i),this._fillGenerator(s)})})}_processAxisRange(t){super._processAxisRange(t),t.fills=new z(G.new({}),()=>V._new(this._root,{themeTags:Y(t.fills.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template,t.fills.template])),t.strokes=new z(G.new({}),()=>V._new(this._root,{themeTags:Y(t.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template,t.strokes.template]))}createLegendMarker(t){const e=this.get("legendDataItem");if(e){const i=e.get("marker"),s=e.get("markerRectangle");s&&s.setPrivate("visible",!1),i.set("background",ot.new(i._root,{fillOpacity:0,fill:oe(0)}));const a=i.children.push(V._new(i._root,{themeTags:["line","series","legend","marker","stroke"],interactive:!1},[this.strokes.template]));this._legendStroke=a;const n=i.children.push(V._new(i._root,{themeTags:["line","series","legend","marker","fill"]},[this.fills.template]));this._legendFill=n;const r=this._root.interfaceColors.get("disabled");if(a.states.create("disabled",{fill:r,stroke:r}),n.states.create("disabled",{fill:r,stroke:r}),this.bullets.length>0){const o=this.bullets.getIndex(0);if(o){const l=o(i._root,this,new mt(this,{legend:!0},{}));if(l){const c=l.get("sprite");c instanceof V&&c.states.create("disabled",{fill:r,stroke:r}),c&&(c.set("tooltipText",void 0),c.set("tooltipHTML",void 0),i.children.push(c),c.setAll({x:i.width()/2,y:i.height()/2}))}}}}}}Object.defineProperty(wt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"LineSeries"}),Object.defineProperty(wt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:B.classNames.concat([wt.className])});class $ extends B{constructor(){super(...arguments),Object.defineProperty(this,"_ph",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_pw",{enumerable:!0,configurable:!0,writable:!0,value:0})}_makeGraphics(t,e){return this.makeColumn(e,t)}_makeFieldNames(){super._makeFieldNames();const t=this.get("xAxis"),e=this.get("yAxis"),i="CategoryAxis",s="ValueAxis";t.isType(i)&&(this.get("openCategoryXField")||(this._xOpenField=this._xField)),t.isType(s)&&(this.get("openValueXField")||(this._xOpenField=this._xField)),e.isType(i)&&(this.get("openCategoryYField")||(this._yOpenField=this._yField)),e.isType(s)&&(this.get("openValueYField")||(this._yOpenField=this._yField))}_prepareChildren(){super._prepareChildren();const t=this.get("xAxis"),e=this.get("yAxis"),i=this.dataItems.length,s=Math.max(0,this.startIndex()-2),a=Math.min(this.endIndex()+2,i-1);if(t.inited&&e.inited)for(let n=s;n<=a;n++){let r=this.dataItems[n];this._createGraphics(r)}}_updateChildren(){const t=this.chart;t&&(this._ph=t.plotContainer.height(),this._pw=t.plotContainer.width());const e=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis"),a=this.columns.template;this.isDirty("fill")&&a.get("fill")==null&&a.set("fill",this.get("fill")),this.isDirty("stroke")&&a.get("stroke")==null&&a.set("stroke",this.get("stroke"));let n=0,r=0,o=0;w(s.series,_=>{if(_ instanceof $){const x=_.get("stacked");x&&o==0&&r++,!x&&_.get("clustered")&&r++}_===this&&(n=r-1),o++}),this.get("clustered")||(n=0,r=1),r===0&&(r=1,n=0);const l=e.get("renderer"),c=i.get("renderer"),h="cellStartLocation",d="cellEndLocation",u=l.get(h,0),g=l.get(d,1),m=c.get(h,0),p=c.get(d,1);if(this._aLocationX0=u+n/r*(g-u),this._aLocationX1=u+(n+1)/r*(g-u),this._aLocationY0=m+n/r*(p-m),this._aLocationY1=m+(n+1)/r*(p-m),e.inited&&i.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty){const _=this.dataItems.length;let x=Math.max(0,this.startIndex()-2),b=Math.min(this.endIndex()+2,_-1);for(let P=0;P<x;P++)this._toggleColumn(this.dataItems[P],!1);let v=this.dataItems[x];for(let P=x;P<=b;P++){let A=this.dataItems[P];if(A.get("valueX")!=null&&A.get("valueY")!=null){if(v=A,P>0&&x>0)for(let F=P-1;F>=0;F--){let I=this.dataItems[F];if(I.get("valueX")!=null&&I.get("valueY")!=null){v=I;break}}break}this._toggleColumn(A,!1)}for(let P=x;P<=b;P++){let A=this.dataItems[P];this._updateGraphics(A,v),A.get("valueX")!=null&&A.get("valueY")!=null&&(v=A)}for(let P=b+1;P<_;P++)this._toggleColumn(this.dataItems[P],!1)}}else this._skipped=!0;this.updateLegendMarker(this.get("tooltipDataItem")),super._updateChildren()}_createGraphics(t){let e=t.get("graphics");if(!e){e=this._makeGraphics(this.columns,t),t.set("graphics",e),e._setDataItem(t);const i=t.get("legendDataItem");if(i){const s=i.get("markerRectangle");s&&s.setAll({fill:e.get("fill"),stroke:e.get("stroke")})}this.axisRanges.each(s=>{const a=s.container,n=t.get("rangeGraphics",[]);t.set("rangeGraphics",n);const r=this._makeGraphics(s.columns,t);n.push(r),r.setPrivate("list",s.columns),a.children.push(r)})}}_updateGraphics(t,e){let i=t.get("graphics");const s=this._xField,a=this._yField,n=t.get(s),r=t.get(a);if(n!=null&&r!=null){const o=this._xOpenField,l=this._yOpenField,c=this.get("locationX",t.get("locationX",.5)),h=this.get("locationY",t.get("locationY",.5)),d=this.get("openLocationX",t.get("openLocationX",c)),u=this.get("openLocationY",t.get("openLocationY",h)),g=i.get("width"),m=i.get("height"),p=this.get("stacked"),_=this.get("xAxis"),x=this.get("yAxis"),b=this.get("baseAxis"),v=_.get("start"),P=_.get("end"),A=x.get("start"),F=x.get("end");let I,E,T,M,W=this.get("vcy",1),U=this.get("vcx",1),K=!1,J=!1;if(x.isType("CategoryAxis")&&_.isType("CategoryAxis")){let O=this._aLocationX0+d-.5,L=this._aLocationX1+c-.5;if(g instanceof et){let k=(L-O)*(1-g.value)/2;O+=k,L-=k}if(I=_.getDataItemPositionX(t,o,O,U),E=_.getDataItemPositionX(t,s,L,U),O=this._aLocationY0+u-.5,L=this._aLocationY1+h-.5,m instanceof et){let k=(L-O)*(1-m.value)/2;O+=k,L-=k}T=x.getDataItemPositionY(t,l,O,W),M=x.getDataItemPositionY(t,a,L,W),t.setRaw("point",{x:I+(E-I)/2,y:T+(M-T)/2})}else if(_===b){let O=this._aLocationX0+d-.5,L=this._aLocationX1+c-.5;if(g instanceof et){let k=(L-O)*(1-g.value)/2;O+=k,L-=k}if(I=_.getDataItemPositionX(t,o,O,U),E=_.getDataItemPositionX(t,s,L,U),T=x.getDataItemPositionY(t,a,h,W),this._yOpenField!==this._yField)M=x.getDataItemPositionY(t,l,u,W);else if(p){let k=t.get("stackToItemY");M=k?x.getDataItemPositionY(k,a,u,k.component.get("vcy")):x.basePosition()}else M=x.basePosition();t.setRaw("point",{x:I+(E-I)/2,y:T}),J=!0}else if(x===b){let O=this._aLocationY0+u-.5,L=this._aLocationY1+h-.5;if(m instanceof et){let k=(L-O)*(1-m.value)/2;O+=k,L-=k}if(T=x.getDataItemPositionY(t,l,O,W),M=x.getDataItemPositionY(t,a,L,W),E=_.getDataItemPositionX(t,s,c,U),this._xOpenField!==this._xField)I=_.getDataItemPositionX(t,o,d,U);else if(p){let k=t.get("stackToItemX");I=k?_.getDataItemPositionX(k,s,d,k.component.get("vcx")):_.basePosition()}else I=_.basePosition();K=!0,t.setRaw("point",{x:E,y:T+(M-T)/2})}this._updateSeriesGraphics(t,i,I,E,T,M,K,J),I<v&&E<v||I>P&&E>P||T<A&&M<=A||T>=F&&M>F||q(I)||q(T)?this._toggleColumn(t,!1):this._toggleColumn(t,!0);let nt=t.get("rangeGraphics");nt&&w(nt,O=>{this._updateSeriesGraphics(t,O,I,E,T,M,K,J)}),this._applyGraphicsStates(t,e)}}_updateSeriesGraphics(t,e,i,s,a,n,r,o){const l=e.get("width"),c=e.get("height"),h=e.get("maxWidth"),d=e.get("maxHeight"),u=this.getPoint(i,a),g=this.getPoint(s,n),m=t.get("point");if(m){const p=this.getPoint(m.x,m.y);m.x=p.x+this._x,m.y=p.y+this._y}if(i=u.x,s=g.x,a=u.y,n=g.y,f(l)){const p=(s-i-l)/2;i+=p,s-=p}if(f(h)&&h<Math.abs(s-i)){const p=(s-i-h)/2;i+=p,s-=p}if(f(c)){const p=(n-a-c)/2;a+=p,n-=p}if(f(d)&&d<Math.abs(n-a)){const p=(n-a-d)/2;a+=p,n-=p}this.get("adjustBulletPosition")&&(r&&(s=Math.min(Math.max(0,s),this._pw),i=Math.min(Math.max(0,i),this._pw)),o&&(a=Math.min(Math.max(0,a),this._ph),n=Math.min(Math.max(0,n),this._ph))),t.setRaw("left",i),t.setRaw("right",s),t.setRaw("top",a),t.setRaw("bottom",n),e.setPrivate("width",s-i),e.setPrivate("height",n-a),e.set("x",i),e.set("y",n-(n-a))}_handleDataSetChange(){super._handleDataSetChange(),w(this._dataItems,t=>{this._toggleColumn(t,!1)})}_applyGraphicsStates(t,e){const i=t.get("graphics"),s=i.states.lookup("dropFromOpen"),a=i.states.lookup("riseFromOpen"),n=i.states.lookup("dropFromPrevious"),r=i.states.lookup("riseFromPrevious");if(s||n||a||r){const o=this.get("xAxis"),l=this.get("yAxis"),c=this.get("baseAxis");let h,d,u;c===o&&l.isType("ValueAxis")?(h=t.get(this._yOpenField),d=t.get(this._yField),u=e.get(this._yField)):c===l&&o.isType("ValueAxis")&&(h=t.get(this._xOpenField),d=t.get(this._xField),u=e.get(this._xField)),f(h)&&f(d)&&(d<h?s&&s.apply():a&&a.apply(),f(u)&&(d<u?n&&n.apply():r&&r.apply()))}}disposeDataItem(t){super.disposeDataItem(t);const e=t.get("graphics");e&&(this.columns.removeValue(e),e.dispose());const i=t.get("rangeGraphics");i&&w(i,s=>{const a=s.getPrivate("list");a&&a.removeValue(s),s.dispose()})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return it(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)],a=t.get("graphics");a&&s.push(a.hide(e));const n=t.get("rangeGraphics");n&&w(n,r=>{s.push(r.hide(e))}),yield Promise.all(s)})}_toggleColumn(t,e){const i=t.get("graphics");i&&i.setPrivate("visible",e);const s=t.get("rangeGraphics");s&&w(s,n=>{n.setPrivate("visible",e)});const a=t.bullets;a&&w(a,n=>{n.setPrivate("hidden",!e)})}showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return it(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)],a=t.get("graphics");a&&s.push(a.show(e));const n=t.get("rangeGraphics");n&&w(n,r=>{s.push(r.show(e))}),yield Promise.all(s)})}updateLegendMarker(t){let e=this.get("legendDataItem");if(this.get("useLastColorForLegendMarker")&&!t){const i=this.dataItems[this.endIndex()-1];i&&(t=i)}if(e){let i=this.columns.template;if(t){let a=t.get("graphics");a&&(i=a)}const s=e.get("markerRectangle");s&&(e.get("itemContainer").get("disabled")||w(he,a=>{s.set(a,i.get(a,this.get(a)))}))}}_getTooltipTarget(t){return this.get("seriesTooltipTarget")=="bullet"?super._getTooltipTarget(t):t.get("graphics")||this}}Object.defineProperty($,"className",{enumerable:!0,configurable:!0,writable:!0,value:"BaseColumnSeries"}),Object.defineProperty($,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:B.classNames.concat([$.className])});class at extends H{constructor(){super(...arguments),Object.defineProperty(this,"_frequency",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"_itemMap",{enumerable:!0,configurable:!0,writable:!0,value:{}})}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["axis"]),this.fields.push("category"),this.setPrivateRaw("name","category"),this.addTag("category"),super._afterNew()}_prepareChildren(){super._prepareChildren();const t=this.dataItems.length;let e=0;this._valuesDirty&&(this._itemMap={},w(this.dataItems,i=>{i.setRaw("index",e),this._itemMap[i.get("category")]=i,e++}),this.setPrivateRaw("maxZoomFactor",t)),this.setPrivateRaw("startIndex",Math.max(Math.round(this.get("start",0)*t),0)),this.setPrivateRaw("endIndex",Math.min(Math.round(this.get("end",1)*t),t)),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("endIndex")||this.isPrivateDirty("startIndex")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&this.dataItems.length>0&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges())}_handleRangeChange(){w(this.series,t=>{let e=this.dataItems[this.startIndex()].get("category"),i=this.dataItems[this.endIndex()-1].get("category"),s=t.get("baseAxis"),a=t.get("xAxis"),n=t.get("yAxis");if(a instanceof at&&n instanceof at)t._markDirtyAxes();else if(s===this){let r,o,l=n;if(a===s?(t.get("categoryXField")&&(r="categoryX"),t.get("openCategoryXField")&&(o="openCategoryX")):n===s&&(t.get("categoryYField")&&(r="categoryY"),t.get("openCategoryYField")&&(o="openCategoryY"),l=a),l.className=="ValueAxis"&&(r||o)){let c,h;for(let m=0,p=t.dataItems.length;m<p;m++){let _=t.dataItems[m];if(r&&_.get(r)===e){c=_;break}if(o&&_.get(o)===e){c=_;break}}for(let m=t.dataItems.length-1;m>=0;m--){let p=t.dataItems[m];if(r&&p.get(r)===i){h=p;break}if(o&&p.get(o)===i){h=p;break}}let d=0,u=t.dataItems.length;c&&(d=t.dataItems.indexOf(c)),h&&(u=t.dataItems.indexOf(h)+1),t.setPrivate("startIndex",d),t.setPrivate("endIndex",u);let g=!1;for(let m=d;m<u;m++){const p=t.dataItems[m];if(w(t.__valueXShowFields,_=>{p.get(_)!=null&&(g=!0)}),w(t.__valueYShowFields,_=>{p.get(_)!=null&&(g=!0)}),g)break}t.setPrivate("outOfSelection",!g)}t._markDirtyAxes()}})}_prepareAxisItems(){const t=this.get("renderer"),e=this.dataItems.length;let i=this.startIndex();i>0&&i--;let s=this.endIndex();s<e&&s++;let a=t.axisLength()/Math.max(t.get("minGridDistance"),1/Number.MAX_SAFE_INTEGER),n=Math.max(1,Math.min(e,Math.ceil((s-i)/a)));i=Math.floor(i/n)*n,this._frequency=n;for(let o=0;o<e;o++)this.dataItems[o].hide();let r=this.dataItems[i].get("index",0);for(let o=i;o<s;o+=n){let l=this.dataItems[o];this._createAssets(l,[]),l.isHidden()&&l.show(),this._prepareDataItem(l,r,n),r++}this._updateGhost()}_prepareDataItem(t,e,i){let s=this.get("renderer"),a=t.get("categoryLocation",0),n=t.get("endCategoryLocation",1),r=t.get("index");f(r)||(r=this.categoryToIndex(t.get("category")));let o,l=this.indexToPosition(r,a),c=t.get("endCategory");c?(o=this.categoryToIndex(c),f(o)||(o=r)):o=r;let h,d,u=this.indexToPosition(o,n);h=t.get("isRange")?o:r+this._frequency-1,d=this.indexToPosition(h,n),s.updateLabel(t.get("label"),l,u,i),s.updateGrid(t.get("grid"),l,u),s.updateTick(t.get("tick"),l,u,i),s.updateFill(t.get("axisFill"),l,d),this._processBullet(t),s.updateBullet(t.get("bullet"),l,u);const g=this.get("fillRule");g&&g(t,e)}startIndex(){let t=this.dataItems.length;return Math.min(Math.max(this.getPrivate("startIndex",0),0),t-1)}endIndex(){let t=this.dataItems.length;return Math.max(1,Math.min(this.getPrivate("endIndex",t),t))}baseValue(){}basePosition(){return 0}getX(t){let e=this._itemMap[t];return e?this._settings.renderer.positionToCoordinate(this.indexToPosition(e.get("index",0))):NaN}getY(t){let e=this._itemMap[t];return e?this._settings.renderer.positionToCoordinate(this.indexToPosition(e.get("index",0))):NaN}getDataItemPositionX(t,e,i,s){const a=t.get(e),n=this._itemMap[a];return n?this.indexToPosition(n.get("index",0),i):NaN}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionY(t,e,i,s){const a=t.get(e),n=this._itemMap[a];return n?this.indexToPosition(n.get("index",0),i):NaN}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}indexToPosition(t,e){f(e)||(e=.5);let i=this.dataItems.length,s=this.get("startLocation",0);i-=s,i-=1-this.get("endLocation",1);let a=(t+e-s)/i,n=this.dataItems[t];return n&&(a+=n.get("deltaPosition",0)),a}categoryToIndex(t){let e=this._itemMap[t];return e?e.get("index"):NaN}dataItemToPosition(t){return this.indexToPosition(t.get("index"))}roundAxisPosition(t,e){return t+=(.5-e)/this.dataItems.length,this.indexToPosition(this.axisPositionToIndex(t),e)}axisPositionToIndex(t){let e=this.dataItems.length;return At(Math.floor(t*e),0,e-1)}getTooltipText(t,e){const i=this.dataItems[this.axisPositionToIndex(t)];if(i){const s=i.get("label");if(s)return le(s,this.get("tooltipText",""))}}_updateTooltipText(t,e){t._setDataItem(this.dataItems[this.axisPositionToIndex(e)]),t.label.text.markDirtyText()}getSeriesItem(t,e){if(this.dataItems.length>0){let i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),s=this.axisPositionToIndex(e),a=t.dataItems[s],n=this.dataItems[s],r=n.get("category");if(a&&n&&a.get(i)===r)return a;for(let o=0,l=t.dataItems.length;o<l;o++){let c=t.dataItems[o];if(c.get(i)===r)return c}}}zoomToIndexes(t,e,i){let s=this.dataItems.length;this.zoom(t/s,e/s,i)}zoomToCategories(t,e,i){this.zoomToIndexes(this.categoryToIndex(t),this.categoryToIndex(e)+1,i)}getCellWidthPosition(){return this._frequency/this.dataItems.length/(this.get("end",1)-this.get("start",0))}}Object.defineProperty(at,"className",{enumerable:!0,configurable:!0,writable:!0,value:"CategoryAxis"}),Object.defineProperty(at,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:H.classNames.concat([at.className])});class Dt extends ${constructor(){super(...arguments),Object.defineProperty(this,"columns",{enumerable:!0,configurable:!0,writable:!0,value:new z(G.new({}),()=>Rt._new(this._root,{position:"absolute",themeTags:Y(this.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template]))})}makeColumn(t,e){const i=this.mainContainer.children.push(e.make());return i._setDataItem(t),e.push(i),i}_processAxisRange(t){super._processAxisRange(t),t.columns=new z(G.new({}),()=>Rt._new(this._root,{position:"absolute",themeTags:Y(t.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template,t.columns.template]))}}Object.defineProperty(Dt,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ColumnSeries"}),Object.defineProperty(Dt,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:$.classNames.concat([Dt.className])});export{yt as AxisRendererXAm5,Pt as AxisRendererYAm5,at as CategoryAxisAm5,Dt as ColumnSeriesAm5,wt as LineSeriesAm5,vt as ValueAxisAm5,bt as XYChartAm5,ft as XYCursorAm5};
|