@arcgis/map-components 5.1.0-next.36 → 5.1.0-next.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/5C33IP7B.js +2 -0
- package/dist/cdn/ANRWXBWL.js +2 -0
- package/dist/cdn/BE4GRNQV.js +2 -0
- package/dist/cdn/GPGC63RW.js +2 -0
- package/dist/cdn/{5RTPMSZH.js → HIQZMFIH.js} +2 -2
- package/dist/cdn/{HHJN3Q6G.js → HKNVYHER.js} +1 -1
- package/dist/cdn/IPIYZVAJ.js +2 -0
- package/dist/cdn/IULGMTSK.js +2 -0
- package/dist/cdn/{YC5JACID.js → JJTM5KZ2.js} +1 -1
- package/dist/cdn/JWJHIBYW.js +2 -0
- package/dist/cdn/{4JCY4NHX.js → NBBZRGXH.js} +1 -1
- package/dist/cdn/OGE4JCW6.js +2 -0
- package/dist/cdn/PILEMW25.js +2 -0
- package/dist/cdn/QEDQOBD7.js +4 -0
- package/dist/cdn/{D27YXH3W.js → T34SPRV3.js} +1 -1
- package/dist/cdn/WG4E5DBM.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/cdn/2AYGSNEO.js +0 -2
- package/dist/cdn/63N5ERFL.js +0 -2
- package/dist/cdn/6RKD6GFP.js +0 -2
- package/dist/cdn/CCKYOWZO.js +0 -2
- package/dist/cdn/HEAH7MYD.js +0 -2
- package/dist/cdn/PZC5TBXA.js +0 -2
- package/dist/cdn/R7BJHEHH.js +0 -2
- package/dist/cdn/S4NUCPRQ.js +0 -4
- package/dist/cdn/XW72RT5D.js +0 -2
- package/dist/cdn/Y6IN6NEC.js +0 -2
- package/dist/cdn/ZJ36DBTH.js +0 -2
- /package/dist/cdn/{JPDYVHUZ.js → 2HJ7EGEB.js} +0 -0
- /package/dist/cdn/{D3X7R3GD.js → 3LKCMCHN.js} +0 -0
- /package/dist/cdn/{FHSXSYA6.js → 4S2JKX63.js} +0 -0
- /package/dist/cdn/{LEC4CIVO.js → 5VWD7SPW.js} +0 -0
- /package/dist/cdn/{WL4J6REN.js → 6PWTVRJ6.js} +0 -0
- /package/dist/cdn/{DZG4EA6U.js → 6TB2XH3T.js} +0 -0
- /package/dist/cdn/{NCTWDKYG.js → 6W3OENEK.js} +0 -0
- /package/dist/cdn/{4NBXFFTY.js → 6ZCH5OTT.js} +0 -0
- /package/dist/cdn/{WG5RPCHL.js → 7C22TPME.js} +0 -0
- /package/dist/cdn/{6QPD32WT.js → BEDLAEXK.js} +0 -0
- /package/dist/cdn/{ELF2SE5K.js → BILSW27K.js} +0 -0
- /package/dist/cdn/{FYVM32GJ.js → BLSJEYOH.js} +0 -0
- /package/dist/cdn/{BFHBS4MR.js → BUILQQ6S.js} +0 -0
- /package/dist/cdn/{V2D4QTRR.js → BVFH7ZG4.js} +0 -0
- /package/dist/cdn/{GVW4OIR5.js → E6GYGJ2B.js} +0 -0
- /package/dist/cdn/{KNFAPO3C.js → EG3W3ADI.js} +0 -0
- /package/dist/cdn/{SPXZXKMH.js → FVTX4GNH.js} +0 -0
- /package/dist/cdn/{YGJ7NPDT.js → FWV2SQE2.js} +0 -0
- /package/dist/cdn/{HEBLEJCT.js → GPESYF4D.js} +0 -0
- /package/dist/cdn/{47T624VO.js → GT5SWKXT.js} +0 -0
- /package/dist/cdn/{JMZA4GQB.js → H4WIQKA4.js} +0 -0
- /package/dist/cdn/{5IPPKC3M.js → HX6XVMJE.js} +0 -0
- /package/dist/cdn/{RJTABGPK.js → MR5AEEII.js} +0 -0
- /package/dist/cdn/{6JUTQDKC.js → O5S54F3U.js} +0 -0
- /package/dist/cdn/{J3F5FPMC.js → OIJPQ63Z.js} +0 -0
- /package/dist/cdn/{43UMYTXQ.js → PWPTFBHS.js} +0 -0
- /package/dist/cdn/{7LEGS7EX.js → QSOU6NQA.js} +0 -0
- /package/dist/cdn/{PDCUZMSB.js → QY7A4VMP.js} +0 -0
- /package/dist/cdn/{3NF4UU3S.js → SPSJMCAO.js} +0 -0
- /package/dist/cdn/{DYC6OHKG.js → T3ZFKRCS.js} +0 -0
- /package/dist/cdn/{IDITPQDC.js → TKVE7ETK.js} +0 -0
- /package/dist/cdn/{B3I4OKDQ.js → ULYGZ4D2.js} +0 -0
- /package/dist/cdn/{WBZEEY5N.js → UX5YG5TO.js} +0 -0
- /package/dist/cdn/{AQG5RIV3.js → VIEEGP7G.js} +0 -0
- /package/dist/cdn/{2SQUOXWG.js → WRS3F55Q.js} +0 -0
- /package/dist/cdn/{UYDFCELQ.js → WTUUS552.js} +0 -0
- /package/dist/cdn/{XJQRAKJ6.js → YGVSJT3E.js} +0 -0
- /package/dist/cdn/{TRPYDMNK.js → YJPCWIX2.js} +0 -0
- /package/dist/cdn/{FRWY77LH.js → ZLOQIB7A.js} +0 -0
- /package/dist/cdn/{3GVHNIXM.js → ZX5YTFYB.js} +0 -0
- /package/dist/cdn/{H6LWU2FC.js → ZYZA5VUV.js} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{E as g,d as l,ha as f,i as R,k as m}from"./IPIYZVAJ.js";import{a as o}from"./GPGC63RW.js";import{g as u}from"./PILEMW25.js";var n=class extends g{constructor(){super(...arguments),this.ix=0,this.iy=0,this._generator=f()}_getTooltipPoint(){let s=this.get("tooltipX"),t=this.get("tooltipY"),r=0,a=0;u(s)&&(r=s),u(t)&&(a=t);let e=this.get("radius",0),i=this.get("innerRadius",0),d=this.get("dRadius",0),h=this.get("dInnerRadius",0);return e+=d,i+=h,i<0&&(i=e+i),s instanceof o&&(r=this.ix*(i+(e-i)*s.value)),t instanceof o&&(a=this.iy*(i+(e-i)*t.value)),this.get("arc")>=360&&i==0&&(r=0,a=0),{x:r,y:a}}_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("arc")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("dRadius")||this.isDirty("dInnerRadius")||this.isDirty("cornerRadius")||this.isDirty("shiftRadius"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let s=this.get("startAngle",0),t=this.get("arc",0),r=this._generator;t<0&&(s=s+t,t=t*-1),t>.1&&r.cornerRadius(this.get("cornerRadius",0)),r.context(this._display);let a=this.get("radius",0),e=this.get("innerRadius",0),i=this.get("dRadius",0),d=this.get("dInnerRadius",0);a+=i,e+=d,e<0&&(e=a+e),r({innerRadius:e,outerRadius:a,startAngle:(s+90)*l,endAngle:(s+t+90)*l});let h=s+t/2;this.ix=m(h),this.iy=R(h);let c=this.get("shiftRadius",0);this.setRaw("dx",this.ix*c),this.setRaw("dy",this.iy*c),this.markDirtyPosition()}}};n.className="Slice";n.classNames=g.classNames.concat([n.className]);export{n as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as vt}from"./5C33IP7B.js";import{D as ft,E as q,M as at,O as _t,P as xt,c as M,da as ct,ga as bt,i as T,j as v,k as D,l as mt,m as ht,n as dt,na as ut,o as et,oa as lt,pa as kt}from"./IPIYZVAJ.js";import{N as R,a as z,u as w}from"./JWJHIBYW.js";import{a as gt,b as tt,d as A,e as _}from"./GPGC63RW.js";import{V as W,W as yt,g as Y,o as k}from"./PILEMW25.js";import"./3TTFCHAA.js";var st=class extends yt{setupDefaultRules(){super.setupDefaultRules();let e=this._root.interfaceColors,t=this.rule.bind(this);t("PercentSeries").setAll({legendLabelText:"{category}",legendValueText:"{valuePercentTotal.formatNumber('0.00p')}",colors:kt.new(this._root,{}),width:A,height:A}),t("PieChart").setAll({radius:tt(80),startAngle:-90,endAngle:270}),t("PieSeries").setAll({alignLabels:!0,startAngle:-90,endAngle:270}),t("PieSeries").states.create("hidden",{endAngle:-90,opacity:0}),t("Slice",["pie"]).setAll({position:"absolute",isMeasured:!1,x:0,y:0,toggleKey:"active",tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}",strokeWidth:1,strokeOpacity:1,role:"figure",lineJoin:"round"}),t("Slice",["pie"]).states.create("active",{shiftRadius:20,scale:1}),t("Slice",["pie"]).states.create("hoverActive",{scale:1.04}),t("Slice",["pie"]).states.create("hover",{scale:1.04}),t("RadialLabel",["pie"]).setAll({textType:"aligned",radius:10,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",paddingTop:5,paddingBottom:5,populateText:!0}),t("Tick",["pie"]).setAll({location:1}),t("SlicedChart").setAll({paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10}),t("FunnelSeries").setAll({startLocation:0,endLocation:1,orientation:"vertical",alignLabels:!0,sequencedInterpolation:!0}),t("FunnelSlice").setAll({interactive:!0,expandDistance:0}),t("FunnelSlice").states.create("hover",{expandDistance:.15}),t("Label",["funnel"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:_}),t("Label",["funnel","horizontal"]).setAll({centerX:0,centerY:_,rotation:-90}),t("Label",["funnel","vertical"]).setAll({centerY:_,centerX:0}),t("Tick",["funnel"]).setAll({location:1}),t("FunnelSlice",["funnel","link"]).setAll({fillOpacity:.5,strokeOpacity:0,expandDistance:-.1}),t("FunnelSlice",["funnel","link","vertical"]).setAll({height:10}),t("FunnelSlice",["funnel","link","horizontal"]).setAll({width:10}),t("PyramidSeries").setAll({valueIs:"area"}),t("FunnelSlice",["pyramid","link"]).setAll({fillOpacity:.5}),t("FunnelSlice",["pyramid","link","vertical"]).setAll({height:0}),t("FunnelSlice",["pyramid","link","horizontal"]).setAll({width:0}),t("FunnelSlice",["pyramid"]).setAll({interactive:!0,expandDistance:0}),t("FunnelSlice",["pyramid"]).states.create("hover",{expandDistance:.15}),t("Label",["pyramid"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:_}),t("Label",["pyramid","horizontal"]).setAll({centerX:0,centerY:_,rotation:-90}),t("Label",["pyramid","vertical"]).setAll({centerY:_,centerX:0}),t("Tick",["pyramid"]).setAll({location:1}),t("FunnelSlice",["pictorial"]).setAll({interactive:!0,tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}"}),t("Label",["pictorial"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:_}),t("Label",["pictorial","horizontal"]).setAll({centerX:0,centerY:_,rotation:-90}),t("Label",["pictorial","vertical"]).setAll({centerY:_,centerX:0}),t("FunnelSlice",["pictorial","link"]).setAll({fillOpacity:.5,width:0,height:0}),t("Tick",["pictorial"]).setAll({location:.5});{let s=t("Graphics",["pictorial","background"]);s.setAll({fillOpacity:.2}),xt(s,"fill",e,"alternativeBackground")}}};var C=class extends ut{_afterNew(){this._defaultThemes.push(st.new(this._root)),super._afterNew(),this.chartContainer.children.push(this.seriesContainer),this.seriesContainer.children.push(this.bulletsContainer)}_processSeries(e){super._processSeries(e),this.seriesContainer.children.moveValue(this.bulletsContainer,this.seriesContainer.children.length-1)}};C.className="PercentChart";C.classNames=ut.classNames.concat([C.className]);var L=class extends ct{constructor(){super(...arguments),this.slicesContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this.labelsContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this.ticksContainer=this.children.push(at.new(this._root,{position:"absolute",isMeasured:!1})),this._lLabels=[],this._rLabels=[],this._hLabels=[],this.slices=this.addDisposer(this._makeSlices()),this.labels=this.addDisposer(this._makeLabels()),this.ticks=this.addDisposer(this._makeTicks())}_applyThemes(e=!1){let t=this.get("colors");return t&&t.reset(),super._applyThemes(e)}makeSlice(e){let t=this.slicesContainer.children.push(this.slices.make());return t.on("fill",()=>{this.updateLegendMarker(e)}),t.on("fillPattern",()=>{this.updateLegendMarker(e)}),t.on("stroke",()=>{this.updateLegendMarker(e)}),t._setDataItem(e),e.set("slice",t),this.slices.push(t),t}makeLabel(e){let t=this.labelsContainer.children.push(this.labels.make());return t._setDataItem(e),e.set("label",t),this.labels.push(t),t}_shouldMakeBullet(e){return e.get("value")!=null}makeTick(e){let t=this.ticksContainer.children.push(this.ticks.make());return t._setDataItem(e),e.set("tick",t),this.ticks.push(t),t}_afterNew(){this.fields.push("category","fill"),super._afterNew()}_onDataClear(){let e=this.get("colors");e&&e.reset();let t=this.get("patterns");t&&t.reset()}_prepareChildren(){if(super._prepareChildren(),this._lLabels=[],this._rLabels=[],this._hLabels=[],this._valuesDirty){let e=0,t=0,s=0,i=1/0,a=0;k(this._dataItems,l=>{let r=l.get("valueWorking",0);e+=r,t+=Math.abs(r)}),k(this._dataItems,l=>{let r=l.get("valueWorking",0);r>s&&(s=r),r<i&&(i=r),a++;let n=r/t;t==0&&(n=0),l.setRaw("valuePercentTotal",n*100)}),this.setPrivateRaw("valueLow",i),this.setPrivateRaw("valueHigh",s),this.setPrivateRaw("valueSum",e),this.setPrivateRaw("valueAverage",e/a),this.setPrivateRaw("valueAbsoluteSum",t)}}show(e){let t=Object.create(null,{show:{get:()=>super.show}});return z(this,void 0,void 0,function*(){let s=[];s.push(t.show.call(this,e)),s.push(this._sequencedShowHide(!0,e)),yield Promise.all(s)})}hide(e){let t=Object.create(null,{hide:{get:()=>super.hide}});return z(this,void 0,void 0,function*(){let s=[];s.push(t.hide.call(this,e)),s.push(this._sequencedShowHide(!1,e)),yield Promise.all(s)})}_updateChildren(){super._updateChildren(),this._valuesDirty&&k(this._dataItems,e=>{e.get("label").text.markDirtyText()}),(this.isDirty("legendLabelText")||this.isDirty("legendValueText"))&&k(this._dataItems,e=>{this.updateLegendValue(e)}),this._arrange()}_arrange(){this._arrangeDown(this._lLabels),this._arrangeUp(this._lLabels),this._arrangeDown(this._rLabels),this._arrangeUp(this._rLabels),this._arrangeLeft(this._hLabels),this._arrangeRight(this._hLabels),k(this.dataItems,e=>{this._updateTick(e)})}_afterChanged(){super._afterChanged(),this._arrange()}processDataItem(e){if(super.processDataItem(e),e.get("fill")==null){let t=this.get("colors");t&&e.setRaw("fill",t.next())}if(e.get("fillPattern")==null){let t=this.get("patterns");t&&e.setRaw("fillPattern",t.next())}}showDataItem(e,t){let s=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return z(this,void 0,void 0,function*(){let i=[s.showDataItem.call(this,e,t)];Y(t)||(t=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing"),l=e.get("value"),r=e.animate({key:"valueWorking",to:l,duration:t,easing:a});r&&i.push(r.waitForStop());let n=e.get("tick");n&&i.push(n.show(t));let c=e.get("label");c&&i.push(c.show(t));let o=e.get("slice");o&&i.push(o.show(t)),o.get("active")&&o.states.applyAnimate("active"),yield Promise.all(i)})}hideDataItem(e,t){let s=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return z(this,void 0,void 0,function*(){let i=[s.hideDataItem.call(this,e,t)],a=this.states.create("hidden",{});Y(t)||(t=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let l=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),r=e.animate({key:"valueWorking",to:0,duration:t,easing:l});r&&i.push(r.waitForStop());let n=e.get("tick");n&&i.push(n.hide(t));let c=e.get("label");c&&i.push(c.hide(t));let o=e.get("slice");o.hideTooltip(),o&&i.push(o.hide(t)),yield Promise.all(i)})}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("label");t&&(this.labels.removeValue(t),t.dispose());let s=e.get("tick");s&&(this.ticks.removeValue(s),s.dispose());let i=e.get("slice");i&&(this.slices.removeValue(i),i.dispose())}hoverDataItem(e){let t=e.get("slice");t&&!t.isHidden()&&t.hover()}unhoverDataItem(e){let t=e.get("slice");t&&t.unhover()}updateLegendMarker(e){if(e){let t=e.get("slice");if(t){let s=e.get("legendDataItem");if(s){let i=s.get("markerRectangle");k(ft,a=>{t.get(a)!=null&&i.set(a,t.get(a))})}}}}_arrangeDown(e){if(e){let t=this._getNextDown();e.sort((s,i)=>s.y>i.y?1:s.y<i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.top;s.y+a<t&&(s.y=t-a),s.label.set("y",s.y),t=s.y+i.bottom})}}_getNextUp(){return this.labelsContainer.maxHeight()}_getNextDown(){return 0}_arrangeUp(e){if(e){let t=this._getNextUp();e.sort((s,i)=>s.y<i.y?1:s.y>i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.bottom;s.y+a>t&&(s.y=t-a),s.label.set("y",s.y),t=s.y+i.top})}}_arrangeRight(e){if(e){let t=0;e.sort((s,i)=>s.y>i.y?1:s.y<i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.left;s.y+a<t&&(s.y=t-a),s.label.set("x",s.y),t=s.y+i.right})}}_arrangeLeft(e){if(e){let t=this.labelsContainer.maxWidth();e.sort((s,i)=>s.y<i.y?1:s.y>i.y?-1:0),k(e,s=>{let i=s.label.adjustedLocalBounds(),a=i.right;s.y+a>t&&(s.y=t-a),s.label.set("x",s.y),t=s.y+i.left})}}_updateSize(){super._updateSize(),this.markDirty()}_updateTick(e){}_dispose(){super._dispose();let e=this.chart;e&&e.series.removeValue(this)}};L.className="PercentSeries";L.classNames=ct.classNames.concat([L.className]);var G=class extends C{constructor(){super(...arguments),this._maxRadius=1}_afterNew(){super._afterNew(),this.seriesContainer.setAll({x:_,y:_})}_prepareChildren(){super._prepareChildren();let e=this.chartContainer,t=e.innerWidth(),s=e.innerHeight(),i=this.get("startAngle",0),a=this.get("endAngle",0),l=this.get("innerRadius"),r=ht(0,0,i,a,1),n=t/(r.right-r.left),c=s/(r.bottom-r.top),o={left:0,right:0,top:0,bottom:0};if(l instanceof gt){let p=l.value,g=Math.min(n,c);p=Math.max(g*p,g-Math.min(s,t))/g,o=ht(0,0,i,a,p),this.setPrivateRaw("irModifyer",p/l.value)}r=dt([r,o]);let m=this._maxRadius;this._maxRadius=Math.min(n,c);let h=w(this.get("radius",0),this._maxRadius);this.seriesContainer.setAll({dy:-h*(r.bottom+r.top)/2,dx:-h*(r.right+r.left)/2}),(this.isDirty("startAngle")||this.isDirty("endAngle")||m!=this._maxRadius)&&this.series.each(p=>{p._markDirtyKey("startAngle")}),(this.isDirty("innerRadius")||this.isDirty("radius"))&&this.series.each(p=>{p._markDirtyKey("innerRadius")})}radius(e){let t=w(this.get("radius",0),this._maxRadius),s=w(this.get("innerRadius",0),t);if(e){let i=this.series.indexOf(e),a=this.series.length,l=e.get("radius");return l!=null?s+w(l,t-s):s+(t-s)/a*(i+1)}return t}innerRadius(e){let t=this.radius(),s=w(this.get("innerRadius",0),t);if(s<0&&(s=t+s),e){let i=this.series.indexOf(e),a=this.series.length,l=e.get("innerRadius");return l!=null?s+w(l,t-s):s+(t-s)/a*i}return s}_updateSize(){super._updateSize(),this.markDirtyKey("radius")}};G.className="PieChart";G.classNames=C.classNames.concat([G.className]);var U=class extends L{_makeSlices(){return new M(W.new({}),()=>vt._new(this._root,{themeTags:R(this.slices.template.get("themeTags",[]),["pie","series"])},[this.slices.template]))}_makeLabels(){return new M(W.new({}),()=>bt._new(this._root,{themeTags:R(this.labels.template.get("themeTags",[]),["pie","series"])},[this.labels.template]))}_makeTicks(){return new M(W.new({}),()=>lt._new(this._root,{themeTags:R(this.ticks.template.get("themeTags",[]),["pie","series"])},[this.ticks.template]))}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t.on("scale",()=>{this._updateTick(e)}),t.on("shiftRadius",()=>{this._updateTick(e)}),t.events.on("positionchanged",()=>{this._updateTick(e)});let s=this.makeLabel(e);s.events.on("positionchanged",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{s.markDirty()})}_getNextUp(){let e=this.chart;return e?e._maxRadius:this.labelsContainer.maxHeight()/2}_getNextDown(){let e=this.chart;return e?-e._maxRadius:-this.labelsContainer.maxHeight()/2}_prepareChildren(){super._prepareChildren();let e=this.chart;if(e){if(this.isDirty("alignLabels")){let t=this.labels.template;if(this.get("alignLabels"))t.set("textType","aligned");else{let s=t.get("textType");(s==null||s=="aligned")&&t.set("textType","adjusted")}}if(this._valuesDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")||this.isDirty("alignLabels")){this.markDirtyBounds();let t=this.get("startAngle",e.get("startAngle",-90)),i=this.get("endAngle",e.get("endAngle",270))-t,a=t,l=e.radius(this);this.setPrivateRaw("radius",l);let r=e.innerRadius(this)*e.getPrivate("irModifyer",1);r<0&&(r=l+r),k(this._dataItems,n=>{this.updateLegendValue(n);let c=i*n.get("valuePercentTotal")/100,o=n.get("slice");if(o){o.set("radius",l),o.set("innerRadius",r),o.set("startAngle",a),o.set("arc",c);let p=n.get("fill");o._setDefault("fill",p),o._setDefault("stroke",p);let g=n.get("fillPattern");o._setDefault("fillPattern",g)}let m=mt(a+c/2),h=n.get("label");if(h&&(h.setPrivate("radius",l),h.setPrivate("innerRadius",r),h.set("labelAngle",m),h.get("textType")=="aligned")){let p=l+h.get("radius",0),g=l*T(m);m>90&&m<=270?(!h.isHidden()&&!h.isHiding()&&this._lLabels.push({label:h,y:g}),p*=-1,p-=this.labelsContainer.get("paddingLeft",0),h.set("centerX",A),h.setPrivateRaw("left",!0)):(!h.isHidden()&&!h.isHiding()&&this._rLabels.push({label:h,y:g}),p+=this.labelsContainer.get("paddingRight",0),h.set("centerX",0),h.setPrivateRaw("left",!1)),h.set("x",p),h.set("y",l*T(m))}a+=c,this._updateTick(n)})}}}_updateTick(e){let t=e.get("tick"),s=e.get("label"),i=e.get("slice"),a=t.get("location",1);if(t&&s&&i){let l=(i.get("shiftRadius",0)+i.get("radius",0))*i.get("scale",1)*a,r=s.get("labelAngle",0),n=D(r),c=T(r),o=this.labelsContainer,m=o.get("paddingLeft",0),h=o.get("paddingRight",0),p=0,g=0;p=s.x(),g=s.y();let u=[];if(p!=0||g!=0){if(s.get("textType")=="circular"){let y=s.radius()-s.get("paddingBottom",0),x=s.get("labelAngle",0);p=y*D(x),g=y*T(x)}let d=-h;s.getPrivate("left")&&(d=m),u=[{x:i.x()+l*n,y:i.y()+l*c},{x:p+d,y:g},{x:p,y:g}]}t.set("points",u)}}_positionBullet(e){let t=e.get("sprite");if(t){let i=t.dataItem.get("slice");if(i){let a=i.get("innerRadius",0),l=i.get("radius",0),r=i.get("startAngle",0),n=i.get("arc",0),c=e.get("locationX",.5),o=e.get("locationY",.5),m=r+n*c,h=a+(l-a)*o;t.setAll({x:D(m)*h,y:T(m)*h})}}}};U.className="PieSeries";U.classNames=L.classNames.concat([U.className]);var V=class extends q{constructor(){super(...arguments),this._projectionDirty=!1,this._tlx=0,this._tly=0,this._trx=0,this._try=0,this._blx=0,this._bly=0,this._brx=0,this._bry=0,this._cprx=0,this._cplx=0,this._cpry=0,this._cply=0}_afterNew(){super._afterNew(),this.set("draw",e=>{let t=this.width(),s=this.height(),i=Math.min(t,s)/2,a=w(this.get("cornerRadiusTL",0),i),l=w(this.get("cornerRadiusTR",0),i),r=w(this.get("cornerRadiusBR",0),i),n=w(this.get("cornerRadiusBL",0),i),c=this._trx,o=this._try,m=this._tlx,h=this._tly,p=this._brx,g=this._bry,u=this._blx,d=this._bly;o==h&&(o=o-.01),g==d&&(g=g-.01);let y=et({x:m,y:h},{x:c,y:o}),x=et({x:c,y:o},{x:p,y:g}),b=et({x:p,y:g},{x:u,y:d}),f=et({x:u,y:d},{x:m,y:h});this.get("orientation")=="horizontal"?(a=Math.min(a,Math.abs(h-o)/2),l=Math.min(l,Math.abs(h-o)/2),r=Math.min(r,Math.abs(d-g)/2),n=Math.min(n,Math.abs(d-g)/2)):(a=Math.min(a,Math.abs(m-c)/2),l=Math.min(l,Math.abs(m-c)/2),r=Math.min(r,Math.abs(u-p)/2),n=Math.min(n,Math.abs(u-p)/2));let $=m-a*v((y-f)/2)*D(f),P=h-a*v((y-f)/2)*T(f),F=m-a*v((f-y)/2)*D(y),Z=h-a*v((f-y)/2)*T(y),N=c-l*v((x-y)/2)*D(y),nt=o-l*v((x-y)/2)*T(y),B=c-l*v((y-x)/2)*D(x),O=o-l*v((y-x)/2)*T(x),J=p-r*v((b-x)/2)*D(x),j=g-r*v((b-x)/2)*T(x),Q=p-r*v((x-b)/2)*D(b),I=g-r*v((x-b)/2)*T(b),pt=u-n*v((f-b)/2)*D(b),it=d-n*v((f-b)/2)*T(b),ot=u-n*v((b-f)/2)*D(f),Dt=d-n*v((b-f)/2)*T(f);e.moveTo(F,Z),e.lineTo(N,nt),e.arcTo(c,o,B,O,l),e.quadraticCurveTo(this._cprx,this._cpry,J,j),e.arcTo(p,g,Q,I,r),e.lineTo(pt,it),e.arcTo(u,d,ot,Dt,n),e.quadraticCurveTo(this._cplx,this._cply,$,P),e.arcTo(m,h,F,Z,a)})}getPoint(e,t){let s=this.width(),i=this.height(),a=this.get("topWidth",0),l=this.get("bottomWidth",0);if(this.get("orientation")=="vertical"){let r=-a/2,n=a/2,c=l/2,o=-l/2,m=r+(o-r)*t,h=n+(c-n)*t;return{x:m+(h-m)*e,y:i*t}}else{let r=-a/2,n=a/2,c=l/2,o=-l/2,m=r+(o-r)*e,h=n+(c-n)*e;return{x:s*e,y:m+(h-m)*t}}}_changed(){if(this.isDirty("topWidth")||this.isDirty("bottomWidth")||this.isDirty("expandDistance")||this.isDirty("orientation")||this.isDirty("width")||this.isDirty("height")){let e=this.width(),t=this.height(),s=this.get("topWidth",0),i=this.get("bottomWidth",0);this._clear=!0;let a=this.get("expandDistance",0);this.get("orientation")=="vertical"?(this._tlx=-s/2,this._tly=0,this._trx=s/2,this._try=0,this._brx=i/2,this._bry=t,this._blx=-i/2,this._bly=t,this._cprx=this._trx+(this._brx-this._trx)/2+a*t,this._cpry=this._try+.5*t,this._cplx=this._tlx+(this._blx-this._tlx)/2-a*t,this._cply=this._tly+.5*t):(this._tly=s/2,this._tlx=0,this._try=-s/2,this._trx=0,this._bry=-i/2,this._brx=e,this._bly=i/2,this._blx=e,this._cpry=this._try+(this._bry-this._try)/2-a*e,this._cprx=this._trx+.5*e,this._cply=this._tly+(this._bly-this._tly)/2+a*e,this._cplx=this._tlx+.5*e)}super._changed()}};V.className="FunnelSlice";V.classNames=q.classNames.concat([V.className]);var H=class extends L{constructor(){super(...arguments),this._tag="funnel",this.links=this.addDisposer(this._makeLinks()),this._total=0,this._count=0,this._nextCoord=0,this._opposite=!1}_makeSlices(){return new M(W.new({}),()=>V._new(this._root,{themeTags:R(this.slices.template.get("themeTags",[]),[this._tag,"series","slice",this.get("orientation")])},[this.slices.template]))}_makeLabels(){return new M(W.new({}),()=>_t._new(this._root,{themeTags:R(this.labels.template.get("themeTags",[]),[this._tag,"series","label",this.get("orientation")])},[this.labels.template]))}_makeTicks(){return new M(W.new({}),()=>lt._new(this._root,{themeTags:R(this.ticks.template.get("themeTags",[]),[this._tag,"series","tick",this.get("orientation")])},[this.ticks.template]))}_makeLinks(){return new M(W.new({}),()=>V._new(this._root,{themeTags:R(this.links.template.get("themeTags",[]),[this._tag,"series","link",this.get("orientation")])},[this.links.template]))}makeLink(e){let t=this.slicesContainer.children.push(this.links.make());return t._setDataItem(e),e.set("link",t),this.links.push(t),t}_afterNew(){super._afterNew();let e=this.slicesContainer;e.setAll({isMeasured:!0,position:"relative",width:tt(100),height:tt(100)}),e.onPrivate("width",()=>{this.markDirtySize()}),e.onPrivate("height",()=>{this.markDirtySize()}),this.get("orientation")=="vertical"?this.set("layout",this._root.horizontalLayout):this.set("layout",this._root.verticalLayout)}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t._setDataItem(e),e.set("slice",t),this.makeLink(e);let s=this.makeLabel(e);s.on("x",()=>{this._updateTick(e)}),s.on("y",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{s.markDirty()}),t.events.on("boundschanged",()=>{let i=t.dataItem;i&&this._updateTick(i)})}_updateChildren(){this._opposite=!1,this.children.indexOf(this.labelsContainer)==0&&(this._opposite=!0);let e=0,t=0;if(k(this.dataItems,s=>{let i=s.get("value");Y(i)&&(t++,i>0?e+=Math.abs(s.get("valueWorking",i)/i):this.get("ignoreZeroValues",!1)||s.isHidden()?t--:e+=1)}),this._total=1/t*e,this._count=t,this.isDirty("alignLabels")&&this._fixLayout(),this._total>0&&(this._valuesDirty||this._sizeDirty)){let s=this.slicesContainer,i;this.get("orientation")=="vertical"?i=s.innerHeight():i=s.innerWidth(),this._nextCoord=this.get("startLocation",0)*i,this.markDirtyBounds();let a=0;k(this._dataItems,l=>{this.updateLegendValue(l),l.set("index",a),a++;let r=l.get("slice"),n=l.get("tick"),c=l.get("label"),o=l.get("link"),m=l.get("fill"),h=l.get("fillPattern");r._setDefault("fill",m),r._setDefault("stroke",m),r._setDefault("fillPattern",h),o._setDefault("fill",m),o._setDefault("stroke",m);let p=l.get("value");Y(p)&&(p==0&&this.get("ignoreZeroValues")?(r.setPrivate("visible",!1),n.setPrivate("visible",!1),c.setPrivate("visible",!1)):(r.setPrivate("visible",!0),n.setPrivate("visible",!0),c.setPrivate("visible",!0),this.decorateSlice(l),this.isLast(l)?o.setPrivate("visible",!1):l.isHidden()||o.setPrivate("visible",!0)))})}super._updateChildren()}_fixLayout(){let e=this.get("orientation"),t=this.labelsContainer,s=this.labels.template;this.get("alignLabels")?(t.set("position","relative"),t.setAll({isMeasured:!0}),e=="vertical"?(this.set("layout",this._root.horizontalLayout),s.setAll({centerX:A,x:A})):(this.set("layout",this._root.verticalLayout),s.setAll({centerX:0,x:0}))):(t.setAll({isMeasured:!1,position:"absolute"}),e=="vertical"?(t.setAll({x:_}),s.setAll({centerX:_,x:0})):(t.setAll({y:_}),s.setAll({centerX:_,y:0}))),this.markDirtySize()}getNextValue(e){let t=e.get("index"),s=e.get("valueWorking",0);if(t<this.dataItems.length-1){let i=this.dataItems[t+1];if(s=i.get("valueWorking",0),i.isHidden()||i.get("value")==0&&this.get("ignoreZeroValues"))return this.getNextValue(i)}return s}isLast(e){let t=e.get("index");if(t==this.dataItems.length-1)return!0;for(let s=t+1;s<this.dataItems.length;s++)if(!this.dataItems[s].isHidden())return!1;return!0}decorateSlice(e){let t=this.get("orientation"),s=e.get("slice"),i=e.get("label"),a=e.get("link"),l=this.slicesContainer,r=l.innerWidth(),n=l.innerHeight(),c=r;t=="horizontal"&&(c=n);let o=this.getNextValue(e),m=e.get("value",0),h=Math.abs(e.get("valueWorking",m)),p=this.get("bottomRatio",0),g=this.getPrivate("valueHigh",0),u=1;m!=0?u=h/Math.abs(m):e.isHidden()&&(u=1e-6),this._nextCoord==1/0&&(this._nextCoord=0);let d=h/g*c,y=(h-(h-o)*p)/g*c;s.setAll({topWidth:d,bottomWidth:y,orientation:t}),a.setAll({topWidth:y,bottomWidth:(h-(h-o))/g*c,orientation:t});let x=this.get("startLocation",0),b=this.get("endLocation",1);if(t=="vertical"){let f=a.height()*u;n=n*(b-x)+f,s.set("y",this._nextCoord);let $=Math.min(1e5,Math.max(0,n/this._count*u/this._total-f));s.setAll({height:$,x:r/2});let P=this._nextCoord+$/2;i.set("y",P),this._nextCoord+=$+f,a.setAll({y:this._nextCoord-f,x:r/2})}else{let f=a.width()*u;r=r*(b-x)+f,s.set("x",this._nextCoord);let $=Math.min(1e5,Math.max(0,r/this._count*u/this._total-f));s.setAll({width:$,y:n/2});let P=this._nextCoord+$/2;i.set("x",P),this._nextCoord+=$+f,a.setAll({x:this._nextCoord-f,y:n/2})}}hideDataItem(e,t){let s=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return z(this,void 0,void 0,function*(){return e.get("link").hide(t),s.hideDataItem.call(this,e,t)})}showDataItem(e,t){let s=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return z(this,void 0,void 0,function*(){return e.get("link").show(t),s.showDataItem.call(this,e,t)})}_updateTick(e){if(this.get("alignLabels")){let t=e.get("tick"),s=e.get("label"),i=e.get("slice");if(t&&i&&s){let a=this.labelsContainer,l=this.slicesContainer,r=t.get("location",.5),n=a.width(),c=a.height(),o=a.get("paddingLeft",0),m=a.get("paddingRight",0),h=a.get("paddingTop",0),p=a.get("paddingBottom",0),g={x:0,y:0},u={x:0,y:0},d={x:0,y:0};this._opposite&&(r=1-r),this.get("orientation")=="vertical"?(g=i.getPoint(r,.5),g.x+=i.x()+l.x(),g.y+=i.y()+l.y(),this._opposite?(u.x=n,u.y=s.y(),d.x=n-o,d.y=u.y):(u.x=l.x()+l.width(),u.y=s.y(),d.x=u.x+n-s.width()-m,d.y=u.y)):(g=i.getPoint(.5,r),g.x+=i.x()+l.x(),g.y+=i.y()+l.y(),this._opposite?(u.y=c,u.x=s.x(),d.y=c-h,d.x=u.x):(u.y=l.y()+l.height(),u.x=s.x(),d.y=u.y+c-s.height()-p,d.x=u.x)),t.set("points",[g,u,d])}}}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("link");t&&(this.links.removeValue(t),t.dispose())}_positionBullet(e){let t=e.get("sprite");if(t){let i=t.dataItem.get("slice");if(i){let a=i.width(),l=i.height(),r=e.get("locationX",.5),n=e.get("locationY",.5),c=0,o=0;this.get("orientation")=="horizontal"?o=l/2:c=a/2,t.setAll({x:i.x()+a*r-c,y:i.y()-o+l*n})}}}};H.className="FunnelSeries";H.classNames=L.classNames.concat([H.className]);var X=class extends H{constructor(){super(...arguments),this._tag="pyramid"}_prepareChildren(){super._prepareChildren(),this._nextSize=void 0}decorateSlice(e){let t=this.get("orientation"),s=this.slicesContainer,i=e.get("slice"),a=e.get("label"),l=e.get("link"),r=this.get("valueIs","area"),n=this.getPrivate("valueAbsoluteSum",0);if(n==0)return;let c=this.get("startLocation",0),o=this.get("endLocation",1),m=this.get("topWidth",0),h=this.get("bottomWidth",A),p=Math.abs(e.get("valueWorking",0)),g=e.get("value",0),u,d,y=s.innerHeight(),x=s.innerWidth(),b=l.width(),f=l.height();t=="horizontal"&&([x,y]=[y,x],[b,f]=[f,b]);let $=x/2,P=1;g!=0?P=p/Math.abs(g):e.isHidden()&&(P=1e-6),f*=P,y=y*(o-c)-f*(this._count*this._total-1);let F=w(m,x);Y(this._nextSize)||(this._nextSize=F);let Z=w(h,x),N=this._nextSize,nt=Math.atan2(y,F-Z),B=Math.tan(Math.PI/2-nt);if(B==0&&(B=1e-8),r=="area"){let it=(F+Z)/2*y*p/n,ot=Math.abs(N*N-2*it*B);u=(N-Math.sqrt(ot))/B,u>0?d=(2*it-u*N)/u:d=N}else u=y*p/n,d=N-u*B;let O=this._nextCoord+u/2,J=$,j=this._nextCoord,Q=$,I=j+u;t=="vertical"?(a.set("y",O),a.get("opacity")>0&&this._rLabels.push({label:a,y:O}),i.set("height",u)):(a.set("x",O),a.get("opacity")>0&&this._hLabels.push({label:a,y:O}),[J,j]=[j,J],[Q,I]=[I,Q],i.set("width",u)),i.setAll({orientation:t,bottomWidth:d,topWidth:N,x:J,y:j}),l.setAll({orientation:t,x:Q,y:I,topWidth:d,bottomWidth:d}),this._nextSize=d,this._nextCoord+=u+f}};X.className="PyramidSeries";X.classNames=H.classNames.concat([X.className]);var K=class extends X{constructor(){super(...arguments),this._tag="pictorial",this.seriesMask=q.new(this._root,{position:"absolute",x:_,y:_,centerX:_,centerY:_}),this.seriesGraphics=this.slicesContainer.children.push(q.new(this._root,{themeTags:["pictorial","background"],position:"absolute",x:_,y:_,centerX:_,centerY:_}))}_afterNew(){super._afterNew(),this.set("topWidth",A),this.set("bottomWidth",A),this.set("valueIs","height"),this.slicesContainer.set("mask",this.seriesMask)}_updateScale(){let e=this.slicesContainer,t=e.innerWidth(),s=e.innerHeight(),i=this.seriesMask,a=this.seriesGraphics,l=i.get("scale",1),r=i.localBounds(),n=r.right-r.left,c=r.bottom-r.top;this.get("orientation")=="horizontal"?l=t/n:l=s/c,l!=1/0&&l!=NaN&&(i.set("scale",l),i.set("x",t/2),i.set("y",s/2),a.set("scale",l),a.set("x",t/2),a.set("y",s/2))}_prepareChildren(){if(super._prepareChildren(),this.isDirty("svgPath")){let e=this.get("svgPath");this.seriesMask.set("svgPath",e),this.seriesGraphics.set("svgPath",e)}this._updateScale()}};K.className="PictorialStackedSeries";K.classNames=X.classNames.concat([K.className]);var E=class extends C{_afterNew(){super._afterNew(),this.seriesContainer.setAll({isMeasured:!0,layout:this._root.horizontalLayout})}};E.className="SlicedChart";E.classNames=C.classNames.concat([E.className]);export{st as DefaultTheme,H as FunnelSeries,V as FunnelSlice,C as PercentChart,L as PercentSeries,K as PictorialStackedSeries,G as PieChart,U as PieSeries,X as PyramidSeries,E as SlicedChart};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as Et,b as Qe,c as Pe,d as Ae}from"./WG4E5DBM.js";import{$ as ti,D as ve,E,F as pt,L as Ke,M as U,O as be,P as B,T as K,U as De,V as Ot,W as Q,X as j,Y as de,Z as Ut,_ as R,a as ue,aa as Ft,b as _e,ba as ei,c as H,da as we,f as G,g as Ze,ga as Te,h as ot,ia as ii,ja as si,ka as Me,la as ai,na as ke,oa as Ie,p as qe,pa as Ce,y as ye}from"./IPIYZVAJ.js";import{M as xe,N as Y,O as ce,Q as He,R as je,a as kt,d as Oe,f as pe,k as Ue,o as ze,q as Be,u as Lt,v as We}from"./JWJHIBYW.js";import{a as It,b as Yt,d as $,e as ne}from"./GPGC63RW.js";import{A as mt,B as Ge,E as Gt,H as Ct,I as vt,O as Ee,S as ft,U as re,V as z,W as Je,a as at,g as v,o as T,r as Rt,s as me,t as Vt,v as fe,w as Ve}from"./PILEMW25.js";import"./3TTFCHAA.js";var le=class extends Je{setupDefaultRules(){super.setupDefaultRules();let t=this._root.interfaceColors,e=this._root.language,i=this.rule.bind(this);i("XYChart").setAll({colors:Ce.new(this._root,{}),paddingLeft:20,paddingRight:20,paddingTop:16,paddingBottom:16,panX:!1,panY:!1,wheelStep:.25,arrangeTooltips:!0,pinchZoomX:!1,pinchZoomY:!1}),i("XYSeries").setAll({legendLabelText:"{name}"}),i("Rectangle",["plotbackground","xy","background"]).setAll({fill:je.fromHex(0),fillOpacity:0}),i("XYChart",["scrollbar","chart"]).setAll({paddingBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,colors:Ce.new(this._root,{saturation:0})});{let n=i("Graphics",["scrollbar","overlay"]);n.setAll({fillOpacity:.5}),B(n,"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:$,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:$}),i("AxisLabel",["x","inside","opposite"]).setAll({centerY:0}),i("AxisLabel",["x","opposite"]).setAll({centerY:$}),i("AxisLabel",["y"]).setAll({centerX:$}),i("AxisLabel",["y","inside"]).setAll({centerX:0}),i("AxisLabel",["y","inside","opposite"]).setAll({centerX:$}),i("AxisLabel",["y","opposite"]).setAll({centerX:0}),i("AxisLabel",["minor"]).setAll({fontSize:"0.6em"}),i("AxisLabel",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","x"]).setAll({opacity:.5}),i("XYCursor").setAll({behavior:"none",layer:30,exportable:!1,snapToSeriesBy:"xy",moveThreshold:1});{let n=i("Grid",["cursor","x"]);n.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:e.translate("Use left and right arrows to move selection")}),B(n,"stroke",t,"alternativeBackground")}{let n=i("Grid",["cursor","y"]);n.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:e.translate("Use up and down arrows to move selection")}),B(n,"stroke",t,"alternativeBackground")}{let n=i("Graphics",["cursor","selection"]);n.setAll({fillOpacity:.15}),B(n,"fill",t,"alternativeBackground")}i("Axis").setAll({zoomOut:!0,start:0,end:1,minZoomCount:1,maxZoomCount:1/0,maxZoomFactor:1e3,maxDeviation:.1,snapTooltip:!0,tooltipLocation:.5,panX:!0,panY:!0,zoomX:!0,zoomY:!0,fixAxisSize:!0}),i("AxisLabel").setAll({location:.5,multiLocation:0,centerX:ne,centerY:ne,paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5}),i("Container",["axis","header"]).setAll({layer:30}),i("Rectangle",["axis","header","background"]).setAll({crisp:!0});{let n=i("AxisRenderer");n.setAll({crisp:!0,strokeOpacity:0}),B(n,"stroke",t,"grid")}i("AxisRendererX").setAll({minGridDistance:120,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,width:$}),i("AxisRendererY").setAll({minGridDistance:40,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,height:$});{let n=i("Rectangle",["axis","thumb","zoomgrip"]);n.setAll({fillOpacity:0}),B(n,"fill",t,"alternativeBackground"),n.states.create("hover",{fillOpacity:.1})}i("Rectangle",["axis","thumb","x","zoomgrip"]).setAll({cursorOverStyle:"ew-resize"}),i("Rectangle",["axis","thumb","y","zoomgrip"]).setAll({cursorOverStyle:"ns-resize"});{let n=i("Grid");n.setAll({location:0,strokeOpacity:.15,crisp:!0}),B(n,"stroke",t,"grid")}{let n=i("Grid",["minor"]);n.setAll({location:0,strokeOpacity:.07,crisp:!0}),B(n,"stroke",t,"grid")}i("Grid",["base"]).setAll({strokeOpacity:.3});{let n=i("Graphics",["axis","fill"]);n.setAll({visible:!1,isMeasured:!1,position:"absolute",fillOpacity:.05}),B(n,"fill",t,"alternativeBackground")}i("Graphics",["axis","fill","range"]).setAll({isMeasured:!0}),i("Graphics",["series","fill","range"]).setAll({visible:!1,isMeasured:!0}),i("Grid",["series","range"]).setAll({visible:!1}),i("AxisTick",["series","range"]).setAll({visible:!1}),i("AxisLabel",["series","range"]).setAll({visible:!1});{let n=i("AxisTick");n.setAll({location:.5,multiLocation:0,strokeOpacity:1,isMeasured:!1,position:"absolute",visible:!1}),B(n,"stroke",t,"grid")}i("CategoryAxis").setAll({startLocation:0,endLocation:1,fillRule:(n,l)=>{let c=n.get("axisFill");c&&(!v(l)||l%2==0?c.setPrivate("visible",!0):c.setPrivate("visible",!1))}});let s=[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:5},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:50},{timeUnit:"millisecond",count:100},{timeUnit:"millisecond",count:500},{timeUnit:"second",count:1},{timeUnit:"second",count:5},{timeUnit:"second",count:10},{timeUnit:"second",count:30},{timeUnit:"minute",count:1},{timeUnit:"minute",count:5},{timeUnit:"minute",count:10},{timeUnit:"minute",count:15},{timeUnit:"minute",count:30},{timeUnit:"hour",count:1},{timeUnit:"hour",count:3},{timeUnit:"hour",count:6},{timeUnit:"hour",count:12},{timeUnit:"day",count:1},{timeUnit:"day",count:2},{timeUnit:"day",count:3},{timeUnit:"day",count:4},{timeUnit:"day",count:5},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"month",count:2},{timeUnit:"month",count:3},{timeUnit:"month",count:6},{timeUnit:"year",count:1},{timeUnit:"year",count:2},{timeUnit:"year",count:5},{timeUnit:"year",count:10},{timeUnit:"year",count:50},{timeUnit:"year",count:100},{timeUnit:"year",count:200},{timeUnit:"year",count:500},{timeUnit:"year",count:1e3},{timeUnit:"year",count:2e3},{timeUnit:"year",count:5e3},{timeUnit:"year",count:1e4},{timeUnit:"year",count:1e5}],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")},o={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:fe(s),dateFormats:Ct(a),periodChangeDateFormats:Ct(o)}),i("DateAxis").setAll({maxZoomFactor:null,strictMinMax:!0,startLocation:0,endLocation:1,markUnitChange:!0,groupData:!1,groupCount:500,skipFirstMinor:!0,weekLabelLocation:0,gridIntervals:fe(s),dateFormats:Ct(a),periodChangeDateFormats:Ct(o),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:n=>{let l=n.get("axisFill");if(l){let c=n.component,h=n.get("value"),u=n.get("endValue"),d=c.intervalDuration(),f=c.getPrivate("baseInterval"),m=c.getPrivate("gridInterval",f),g=c.getPrivate("min",0);if(g=ti(new Date(g),m.timeUnit,m.count,this._root.locale.firstDayOfWeek,this._root.utc,void 0,this._root.timezone).getTime(),h!=null&&u!=null){let p=Math.round(Math.round((h-g)/d))/2;p==Math.round(p)?l.setPrivate("visible",!0):l.setPrivate("visible",!1)}}}}),i("GaplessDateAxis").setAll({fillRule:n=>{let l=n.get("axisFill");if(l){let c=n.get("index"),h=!1;(!v(c)||c%2==0)&&(h=!0),l.setPrivate("visible",h)}}}),i("ValueAxis").setAll({baseValue:0,logarithmic:!1,strictMinMax:!1,autoZoom:!0,fillRule:n=>{let l=n.get("axisFill");if(l){let c=n.component,h=n.get("value"),u=c.getPrivate("step");v(h)&&v(u)&&(G(h/u/2,5)==Math.round(h/u/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:Yt(70),height:Yt(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:(n,l)=>{let c=l.parent;if(c){let h=c.height(),u=c.width();n.moveTo(0,h/2),n.lineTo(u,h/2)}}});{let n=i("Graphics",["line","series","legend","marker","stroke"]).states.create("disabled",{});B(n,"stroke",t,"disabled")}i("Graphics",["line","series","legend","marker","fill"]).setAll({draw:(n,l)=>{let c=l.parent;if(c){let h=c.height(),u=c.width();n.moveTo(0,0),n.lineTo(u,0),n.lineTo(u,h),n.lineTo(0,h),n.lineTo(0,0)}}});{let n=i("Graphics",["line","series","legend","marker","fill"]).states.create("disabled",{});B(n,"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:Yt(50),height:Yt(50),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("OHLC").setAll({width:Yt(80),height:Yt(80)}),i("CandlestickSeries").setAll({lowValueXGrouped:"low",lowValueYGrouped:"low",highValueXGrouped:"high",highValueYGrouped:"high",openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close"});{let n=i("Rectangle",["column","autocolor"]).states.create("riseFromOpen",{});B(n,"fill",t,"positive"),B(n,"stroke",t,"positive")}{let n=i("Rectangle",["column","autocolor"]).states.create("dropFromOpen",{});B(n,"fill",t,"negative"),B(n,"stroke",t,"negative")}i("Rectangle",["column","autocolor","pro"]).states.create("riseFromOpen",{fillOpacity:0}),i("Rectangle",["column","autocolor","pro"]).states.create("dropFromOpen",{fillOpacity:1});{let n=i("Rectangle",["column","autocolor","pro"]).states.create("riseFromPrevious",{});B(n,"fill",t,"positive"),B(n,"stroke",t,"positive")}{let n=i("Rectangle",["column","autocolor","pro"]).states.create("dropFromPrevious",{});B(n,"fill",t,"negative"),B(n,"stroke",t,"negative")}i("RoundedRectangle",["rangegrip"]).setAll({strokeOpacity:0,fillOpacity:0,strokeWidth:1,width:12,height:12});{let n=i("Graphics",["rangegrip","button","icon"]);n.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:l=>{l.moveTo(0,.5),l.lineTo(0,12.5),l.moveTo(2,.5),l.lineTo(2,12.5),l.moveTo(4,.5),l.lineTo(4,12.5)}}),B(n,"stroke",t,"secondaryButtonText")}i("Button",["rangegrip"]).setAll({draggable:!0,paddingTop:0,paddingBottom:0}),i("Button",["rangegrip","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize",centerX:ne}),i("Button",["rangegrip","horizontal"]).setAll({cursorOverStyle:"ew-resize",centerX:ne}),i("Button",["rangegrip","vertical","left"]).setAll({centerY:$}),i("Button",["rangegrip","vertical","right"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","top"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","bottom"]).setAll({centerY:$})}};var $t=class extends ke{constructor(){super(...arguments),this.xAxes=new _e,this.yAxes=new _e,this.topAxesContainer=this.chartContainer.children.push(U.new(this._root,{width:$,layout:this._root.verticalLayout})),this.yAxesAndPlotContainer=this.chartContainer.children.push(U.new(this._root,{width:$,height:$,layout:this._root.horizontalLayout})),this.bottomAxesContainer=this.chartContainer.children.push(U.new(this._root,{width:$,layout:this._root.verticalLayout})),this.leftAxesContainer=this.yAxesAndPlotContainer.children.push(U.new(this._root,{height:$,layout:this._root.horizontalLayout})),this.plotsContainer=this.yAxesAndPlotContainer.children.push(U.new(this._root,{width:$,height:$,maskContent:!1})),this.plotContainer=this.plotsContainer.children.push(U.new(this._root,{width:$,height:$})),this.topPlotContainer=this.plotsContainer.children.push(U.new(this._root,{width:$,height:$})),this.gridContainer=this.plotContainer.children.push(U.new(this._root,{width:$,height:$,isMeasured:!1})),this.topGridContainer=U.new(this._root,{width:$,height:$,isMeasured:!1}),this.rightAxesContainer=this.yAxesAndPlotContainer.children.push(U.new(this._root,{height:$,layout:this._root.horizontalLayout})),this.axisHeadersContainer=this.plotContainer.children.push(U.new(this._root,{})),this.zoomOutButton=this.topPlotContainer.children.push(Qe.new(this._root,{themeTags:["zoom"],icon:E.new(this._root,{themeTags:["button","icon"]})})),this._movePoint={x:0,y:0},this._movePoints={}}_afterNew(){this._defaultThemes.push(le.new(this._root)),super._afterNew(),this._disposers.push(this.xAxes),this._disposers.push(this.yAxes);let t=this._root,e=this._root.verticalLayout,i=this.zoomOutButton;i.events.on("click",()=>{this.zoomOut()}),i.hide(0),i.states.lookup("default").set("opacity",1),this.chartContainer.set("layout",e);let 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",pt.new(t,{themeTags:["plotbackground","xy","background"]})),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);let e=t.get("xAxis");e&&(Rt(e.series,t),e.markDirtyExtremes());let i=t.get("yAxis");i&&(Rt(i.series,t),i.markDirtyExtremes());let s=this.get("cursor");if(s){let a=s.get("snapToSeries");a&&Rt(a,t)}super._removeSeries(t)}_applyThemes(t=!1){let e=this.get("colors");return e&&e.reset(),super._applyThemes(t)}handleWheel(t){let e=this.get("wheelX"),i=this.get("wheelY"),s=this.plotContainer,a=t.originalEvent,o=!1;if(ze(a,this))o=!0;else return;let r=s.toLocal(t.point),n=this.get("wheelStep",.2),l=a.deltaY/100,c=a.deltaX/100,h=this.get("wheelZoomPositionX"),u=this.get("wheelZoomPositionY");(e==="zoomX"||e==="zoomXY")&&c!=0&&this.xAxes.each(d=>{if(d.get("zoomX")){let f=d.get("start"),m=d.get("end"),g=d.fixPosition(r.x/s.width());h!=null&&(g=h);let p=d.get("maxDeviation",0),_=Math.min(1+p,Math.max(-p,f-n*(m-f)*c*g)),x=Math.max(-p,Math.min(1+p,m+n*(m-f)*c*(1-g)));_==f&&x==m&&(o=!1),1/(x-_)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(_,x)):o=!1}}),(i==="zoomX"||i==="zoomXY")&&l!=0&&this.xAxes.each(d=>{if(d.get("zoomX")){let f=d.get("start"),m=d.get("end"),g=d.fixPosition(r.x/s.width());h!=null&&(g=h);let p=d.get("maxDeviation",0),_=Math.min(1+p,Math.max(-p,f-n*(m-f)*l*g)),x=Math.max(-p,Math.min(1+p,m+n*(m-f)*l*(1-g)));_==f&&x==m&&(o=!1),1/(x-_)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(_,x)):o=!1}}),(e==="zoomY"||e==="zoomXY")&&c!=0&&this.yAxes.each(d=>{if(d.get("zoomY")){let f=d.get("start"),m=d.get("end"),g=d.fixPosition(r.y/s.height());u!=null&&(g=u);let p=d.get("maxDeviation",0),_=Math.min(1+p,Math.max(-p,f-n*(m-f)*c*g)),x=Math.max(-p,Math.min(1+p,m+n*(m-f)*c*(1-g)));_==f&&x==m&&(o=!1),1/(x-_)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(_,x)):o=!1}}),(i==="zoomY"||i==="zoomXY")&&l!=0&&this.yAxes.each(d=>{if(d.get("zoomY")){let f=d.get("start"),m=d.get("end"),g=d.fixPosition(r.y/s.height());u!=null&&(g=u);let p=d.get("maxDeviation",0),_=Math.min(1+p,Math.max(-p,f-n*(m-f)*l*g)),x=Math.max(-p,Math.min(1+p,m+n*(m-f)*l*(1-g)));_==f&&x==m&&(o=!1),1/(x-_)<d.getPrivate("maxZoomFactor",1/0)/d.get("minZoomCount",1)?this._handleWheelAnimation(d.zoom(_,x)):o=!1}}),(e==="panX"||e==="panXY")&&c!=0&&this.xAxes.each(d=>{if(d.get("panX")){let f=d.get("start"),m=d.get("end"),g=this._getWheelSign(d)*n*(m-f)*c,p=f+g,_=m+g,x=this._fixWheel(p,_);p=x[0],_=x[1],p==f&&_==m&&(o=!1),this._handleWheelAnimation(d.zoom(p,_))}}),(i==="panX"||i==="panXY")&&l!=0&&this.xAxes.each(d=>{if(d.get("panX")){let f=d.get("start"),m=d.get("end"),g=this._getWheelSign(d)*n*(m-f)*l,p=f+g,_=m+g,x=this._fixWheel(p,_);p=x[0],_=x[1],p==f&&_==m&&(o=!1),this._handleWheelAnimation(d.zoom(p,_))}}),(e==="panY"||e==="panXY")&&c!=0&&this.yAxes.each(d=>{if(d.get("panY")){let f=d.get("start"),m=d.get("end"),g=this._getWheelSign(d)*n*(m-f)*c,p=f+g,_=m+g,x=this._fixWheel(p,_);p=x[0],_=x[1],p==f&&_==m&&(o=!1),this._handleWheelAnimation(d.zoom(p,_))}}),(i==="panY"||i==="panXY")&&l!=0&&this.yAxes.each(d=>{if(d.get("panY")){let f=d.get("start"),m=d.get("end"),g=this._getWheelSign(d)*n*(m-f)*l,p=f-g,_=m-g,x=this._fixWheel(p,_);p=x[0],_=x[1],p==f&&_==m&&(o=!1),this._handleWheelAnimation(d.zoom(p,_))}}),o&&a.preventDefault()}_handleSetWheel(){let t=this.get("wheelX"),e=this.get("wheelY"),i=this.plotContainer;t!=="none"||e!=="none"?(this._wheelDp=i.events.on("wheel",s=>{let 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){let i=e-t;return t<0&&(t=0,e=t+i),e>1&&(e=1,t=e-i),[t,e]}_handlePlotDown(t){let e=t.originalEvent;if(e.button==2)return;let i=this.plotContainer,s=i.toLocal(t.point);if((this.get("pinchZoomX")||this.get("pinchZoomY"))&&e.pointerId&&Gt(i._downPoints).length>0){let o=this.xAxes.getIndex(0),r=this.yAxes.getIndex(0);o&&(this._downStartX=o.get("start",0),this._downEndX=o.get("end",1)),r&&(this._downStartY=r.get("start",0),this._downEndY=r.get("end",1))}if((this.get("panX")||this.get("panY"))&&s.x>=0&&s.y>=0&&s.x<=i.width()&&s.y<=this.height()){this._downPoint={x:e.clientX,y:e.clientY};let a=this.get("panX"),o=this.get("panY");a&&this.xAxes.each(n=>{n._panStart=n.get("start"),n._panEnd=n.get("end")}),o&&this.yAxes.each(n=>{n._panStart=n.get("start"),n._panEnd=n.get("end")});let 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(){let t="wheelended";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}_handlePlotUp(t){let e=this._downPoint;if(e&&(this.get("panX")||this.get("panY"))){if(t.originalEvent.clientX==e.x&&t.originalEvent.clientY==e.y){let s="pancancelled";this.events.isEnabled(s)&&this.events.dispatch(s,{type:s,target:this,originalEvent:t.originalEvent})}let i="panended";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,originalEvent:t.originalEvent})}this._downPoint=void 0,this.xAxes.each(i=>{i._isPanning=!1}),this.yAxes.each(i=>{i._isPanning=!1})}_handlePlotMove(t){let e=this.plotContainer;if(this.get("pinchZoomX")||this.get("pinchZoomY")){let a=t.originalEvent.pointerId;if(a&&(this._movePoints[a]=t.point,Gt(e._downPoints).length>1)){this._handlePinch();return}}let i=this._downPoint;if(i){i=e.toLocal(this._root.documentPointToRoot(i));let s=e.toLocal(t.point),a=this.get("panX"),o=this.get("panY");if(a){let r=this.get("scrollbarX");r&&r.events.disableType("rangechanged"),this.xAxes.each(n=>{if(n.get("panX")){n._isPanning=!0;let l=n._panStart,c=n._panEnd,u=(c-l)*(i.x-s.x)/e.width();n.get("renderer").get("inversed")&&(u*=-1);let d=l+u,f=c+u;f-d<1+n.get("maxDeviation",1)*2&&(n.set("start",d),n.set("end",f))}}),r&&r.events.enableType("rangechanged")}if(o){let r=this.get("scrollbarY");r&&r.events.disableType("rangechanged"),this.yAxes.each(n=>{if(n.get("panY")){n._isPanning=!0;let l=n._panStart,c=n._panEnd,u=(c-l)*(i.y-s.y)/e.height();n.get("renderer").get("inversed")&&(u*=-1);let d=l-u,f=c-u;f-d<1+n.get("maxDeviation",1)*2&&(n.set("start",d),n.set("end",f))}}),r&&r.events.enableType("rangechanged")}}}_handlePinch(){let t=this.plotContainer,e=0,i=[],s=[];if(vt(t._downPoints,(a,o)=>{i[e]=o;let r=this._movePoints[a];r&&(s[e]=r),e++}),i.length>1&&s.length>1){let a=t.width(),o=t.height(),r=i[0],n=i[1],l=s[0],c=s[1];if(r&&n&&l&&c){if(l=t.toLocal(l),c=t.toLocal(c),r=t.toLocal(r),n=t.toLocal(n),this.get("pinchZoomX")){let h=this._downStartX,u=this._downEndX;if(h!=null&&u!=null){r.x>n.x&&([r,n]=[n,r],[l,c]=[c,l]);let d=h+r.x/a*(u-h),f=h+n.x/a*(u-h),m=h+l.x/a*(u-h),g=h+c.x/a*(u-h),p=Math.max(.001,f-d),_=Math.max(.001,g-m),x=p/_,y=h*x+d-m*x,b=u*x+f-g*x;this.xAxes.each(w=>{let M=w.fixPosition(y),D=w.fixPosition(b);w.zoom(M,D,0)})}}if(this.get("pinchZoomY")){let h=this._downStartY,u=this._downEndY;if(h!=null&&u!=null){r.y<n.y&&([r,n]=[n,r],[l,c]=[c,l]);let d=h+(1-r.y/o)*(u-h),f=h+(1-n.y/o)*(u-h),m=h+(1-l.y/o)*(u-h),g=h+(1-c.y/o)*(u-h),p=Math.max(.001,f-d),_=Math.max(.001,g-m),x=p/_,y=h*x+d-m*x,b=u*x+f-g*x;this.yAxes.each(w=>{let M=w.fixPosition(y),D=w.fixPosition(b);w.zoom(M,D,0)})}}}}}_handleCursorPosition(){let t=this.get("cursor");if(t){let e=t.getPrivate("point"),i=t.get("snapToSeries");if(t._downPoint&&(i=void 0),i&&e){let s=t.get("snapToSeriesBy"),a=[];T(i,n=>{if(!n.isHidden()&&!n.isHiding())if(s!="x!"&&s!="y!"){let l=n.startIndex(),c=n.endIndex();for(let h=l;h<c;h++){let u=n.dataItems[h];u&&!u.isHidden()&&a.push(u)}}else{let l=n.get("tooltipDataItem");l&&a.push(l)}});let o=1/0,r;if(T(a,n=>{let l=n.get("point");if(l){let c=0;s=="x"||s=="x!"?c=Math.abs(e.x-l.x):s=="y"||s=="y!"?c=Math.abs(e.y-l.y):c=Math.hypot(e.x-l.x,e.y-l.y),c<o&&(o=c,r=n)}}),T(i,n=>{let l=n.get("tooltip");l&&l._setDataItem(void 0)}),r){let n=r.component;n.showDataItemTooltip(r),n.setRaw("tooltipDataItem",r);let l=r.get("point");l&&t.handleMove(n.toGlobal({x:l.x-n.x(),y:l.y-n.y()}),!0)}}}}_updateCursor(){let t=this.get("cursor");t&&t.updateCursor()}_addCursor(t){this.plotContainer.children.push(t)}_prepareChildren(){if(super._prepareChildren(),this.series.each(t=>{this._colorize(t)}),(this.isDirty("wheelX")||this.isDirty("wheelY"))&&this._handleSetWheel(),this.isDirty("cursor")){let t=this._prevSettings.cursor,e=this.get("cursor");e!==t&&(this._disposeProperty("cursor"),t&&t.dispose(),e&&(e._setChart(this),this._addCursor(e),this._pushPropertyDisposer("cursor",e.events.on("selectended",()=>{this._handleCursorSelectEnd()}))),this._prevSettings.cursor=e)}if(this.isDirty("scrollbarX")){let t=this._prevSettings.scrollbarX,e=this.get("scrollbarX");e!==t&&(this._disposeProperty("scrollbarX"),t&&t.dispose(),e&&(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)})),this._pushPropertyDisposer("scrollbarX",e.events.on("released",()=>{this.xAxes.each(i=>{i.get("zoomable")&&this._handleAxisSelection(i)})})),e.setPrivate("positionTextFunction",i=>{let s=this.xAxes.getIndex(0);return s&&s.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarX=e)}if(this.isDirty("scrollbarY")){let t=this._prevSettings.scrollbarY,e=this.get("scrollbarY");e!==t&&(this._disposeProperty("scrollbarY"),t&&t.dispose(),e&&(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)})),this._pushPropertyDisposer("scrollbarY",e.events.on("released",()=>{this.yAxes.each(i=>{i.get("zoomable")&&this._handleAxisSelection(i)})})),e.setPrivate("positionTextFunction",i=>{let s=this.yAxes.getIndex(0);return s&&s.getTooltipText(i,!1)||""})),this._prevSettings.scrollbarY=e)}this._handleZoomOut()}_processSeries(t){super._processSeries(t);let e=t.get("xAxis"),i=t.get("yAxis");Vt(e.series,t),Vt(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"),T(t.dataItems,s=>{s.set("stackToItemY",void 0),s.set("stackToItemX",void 0)})),t._markDirtyAxes(),i.markDirtyExtremes(),e.markDirtyExtremes(),e._seriesAdded=!0,i._seriesAdded=!0,this._colorize(t)}_colorize(t){let e=this.get("colors");if(e&&t.get("fill")==null){let s=e.next();t._setSoft("stroke",s),t._setSoft("fill",s)}let i=this.get("patterns");if(i&&t.get("fillPattern")==null){let s=i.next();t._setSoft("fillPattern",s)}}_handleCursorSelectEnd(){let t=this.get("cursor"),e=t.get("behavior"),i=t.getPrivate("downPositionX",0),s=t.getPrivate("downPositionY",0),a=Math.min(1,Math.max(0,t.getPrivate("positionX",.5))),o=Math.min(1,Math.max(0,t.getPrivate("positionY",.5)));this.xAxes.each(r=>{if(e==="zoomX"||e==="zoomXY"){let n=r.toAxisPosition(i),l=r.toAxisPosition(a);r.zoom(n,l)}r.setPrivate("updateScrollbar",!0)}),this.yAxes.each(r=>{if(e==="zoomY"||e==="zoomXY"){let n=r.toAxisPosition(s),l=r.toAxisPosition(o);r.zoom(n,l)}r.setPrivate("updateScrollbar",!0)})}_handleScrollbar(t,e,i,s){t.each(a=>{let o=a.fixPosition(e),r=a.fixPosition(i),n=a.zoom(o,r,void 0,s),l="updateScrollbar";a.setPrivateRaw(l,!1),n?n.events.on("stopped",()=>{a.setPrivateRaw(l,!0)}):a.setPrivateRaw(l,!0)})}_processAxis(t,e){return t.events.onAll(i=>{if(i.type==="clear")T(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")e.children.moveValue(i.value,i.newIndex),i.value.processChart(this);else throw new Error("Unknown IListEvent type")})}_removeAxis(t){if(!t.isDisposed()){let e=t.parent;e&&e.children.removeValue(t);let i=t.gridContainer,s=i.parent;s&&s.children.removeValue(i);let a=t.topGridContainer,o=a.parent;o&&o.children.removeValue(a)}}_updateChartLayout(){let t=this.leftAxesContainer.width(),e=this.rightAxesContainer.width(),i=this.bottomAxesContainer;i.set("paddingLeft",t),i.set("paddingRight",e);let s=this.topAxesContainer;s.set("paddingLeft",t),s.set("paddingRight",e)}processAxis(t){var e=this.get("cursor");e&&(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("zoomOut",!0)&&(G(i.get("start",0),5)!=0||G(i.get("end",1),5)!=1)&&(e=!0)}),this.yAxes.each(i=>{i.get("zoomOut",!0)&&(G(i.get("start",0),5)!=0||G(i.get("end",1),5)!=1)&&(e=!0)}),e?t.isHidden()&&t.show():t.hide()}}inPlot(t){let e=this.plotContainer,i=this.getPrivate("otherCharts",this._otherCharts),s=e.toGlobal(t);if(t.x>=-.5&&t.y>=-.5&&t.x<=e.width()+.5&&t.y<=e.height()+.5)return!0;if(i)for(let a=i.length-1;a>=0;a--){let o=i[a];if(o!=this){let r=o.plotContainer,n=this._root.rootPointToDocument(s),l=o._root.documentPointToRoot(n),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(){let t=this.plotContainer,e=t.width(),i=t.height(),s=this.height(),a=this._root.tooltipContainer.get("layerMargin");a&&a.bottom>s&&(s=a.bottom);let o=t._display.toGlobal({x:0,y:0}),r=t._display.toGlobal({x:e,y:i}),n=[],l=0,c=1/0,h=this._movePoint,u=this.get("maxTooltipDistance"),d=this.get("maxTooltipDistanceBy","xy"),f,m;v(u)&&this.series.each(p=>{if(!p.isHidden()){let _=p.get("tooltip");if(_){let x=_.get("pointTo");if(x){let y=Math.hypot(h.x-x.x,h.y-x.y);d=="x"?y=Math.abs(h.x-x.x):d=="y"&&(y=Math.abs(h.y-x.y)),y<c&&(c=y,f=p,m=x)}}}});let g=[];if(this.series.each(p=>{let _=p.get("tooltip");if(_&&!_.get("forceHidden")){let x=!1,y=_.get("pointTo");if(y){if(u>=0){let b=_.get("pointTo");if(b&&m&&p!=f){let w=Math.hypot(m.x-b.x,m.y-b.y);d=="x"?w=Math.abs(m.x-b.x):d=="y"&&(w=Math.abs(m.y-b.y)),w>u&&(x=!0)}}else u==-1&&p!=f&&(x=!0);!this.inPlot(this._tooltipToLocal(y))||!_.dataItem?x=!0:x||(l+=y.y),x||p.isHidden()||p.isHiding()?_.hide(0):(_.show(),n.push(_),g.push(p))}}}),this.setPrivate("tooltipSeries",g),this.get("arrangeTooltips")){let p=0,_=0,x=this._root.tooltipContainer,y=n.length;if(l/y>i/2+o.y){n.sort((M,D)=>re(D.get("pointTo").y,M.get("pointTo").y));let w=r.y;if(T(n,M=>{let D=M.height();_++,p+=D;let P=M.get("centerY");P instanceof It&&(D*=P.value),D+=M.get("marginBottom",0),M.set("bounds",{left:o.x,top:o.y,right:r.x,bottom:w}),M.setPrivate("customData",{left:o.x,top:o.y,right:r.x,bottom:w}),w=Math.min(w-D,M._fy-D),M.parent==x&&x.children.moveValue(M,0)}),w<0){n.reverse();let M=w;T(n,D=>{_++;let P=D.get("bounds");if(P){let k=P.top-w,I=P.bottom-w;k<M&&(k=M,I=k+D.height()),D.set("bounds",{left:P.left,top:k,right:P.right,bottom:I}),M=P.bottom-w+D.get("marginBottom",0)}})}}else{n.reverse(),n.sort((M,D)=>re(M.get("pointTo").y,D.get("pointTo").y));let w=0;if(T(n,M=>{_++;let D=M.height();p+=D;let P=M.get("centerY");P instanceof It&&(D*=P.value),D+=M.get("marginBottom",0),M.set("bounds",{left:o.x,top:w,right:r.x,bottom:Math.max(o.y+s,w+D)}),M.parent==x&&x.children.moveValue(M,0),w=Math.max(w+D,M._fy+D)}),w>s){n.reverse();let M=s;T(n,D=>{_++;let P=D.get("bounds");if(P){let k=P.top-(s-w),I=P.bottom-(s-w);I>M&&(I=M,k=I-D.height()),D.set("bounds",{left:P.left,top:k,right:P.right,bottom:I}),M=I-D.height()-D.get("marginBottom",0)}})}}p==0&&_>0&&this._disposers.push(this.root.events.once("frameended",()=>{this.arrangeTooltips()}))}}_tooltipToLocal(t){return this.plotContainer.toLocal(t)}zoomOut(){this.xAxes.each(t=>{t.get("zoomOut",!0)&&(t.setPrivate("updateScrollbar",!0),t.zoom(0,1))}),this.yAxes.each(t=>{t.get("zoomOut",!0)&&(t.setPrivate("updateScrollbar",!0),t.zoom(0,1))})}_dispose(){super._dispose();let t=this.get("cursor");t&&t.dispose()}};$t.className="XYChart";$t.classNames=ke.classNames.concat([$t.className]);var zt=class extends Ae{constructor(){super(...arguments),this.chart=this.children.push($t.new(this._root,{themeTags:["chart"],interactive:!1,interactiveChildren:!1,panX:!1,panY:!1,wheelX:"none",wheelY:"none"})),this.overlay=this.children.push(E.new(this._root,{themeTags:["overlay"],interactive:!1}))}_afterNew(){this._addOrientationClass(),this._settings.themeTags=Y(this._settings.themeTags,["scrollbar","xy","chart",this._settings.orientation]);let t=this.children;t.moveValue(this.thumb),t.moveValue(this.startGrip),t.moveValue(this.endGrip),this.thumb.set("opacity",0),this.thumb.states.create("hover",{opacity:.2});let e=this.chart.plotContainer;e.set("interactive",!1),e.remove("background"),e.children.removeValue(this.chart.zoomOutButton),super._afterNew()}_updateThumb(){super._updateThumb(),this.overlay.set("draw",t=>{let e=this.startGrip,i=this.endGrip,s=e.x(),a=e.y(),o=i.x(),r=i.y(),n=this.height(),l=this.width();s>o&&([s,o]=[o,s]),a>r&&([a,r]=[r,a]),this.get("orientation")==="horizontal"?(t.moveTo(0,0),t.lineTo(s,0),t.lineTo(s,n),t.lineTo(0,n),t.lineTo(0,0),t.moveTo(o,0),t.lineTo(l,0),t.lineTo(l,n),t.lineTo(o,n),t.lineTo(o,0)):(t.moveTo(0,0),t.lineTo(0,a),t.lineTo(l,a),t.lineTo(l,0),t.lineTo(0,0),t.moveTo(0,r),t.lineTo(0,n),t.lineTo(l,n),t.lineTo(l,r),t.lineTo(0,r))})}};zt.className="XYChartScrollbar";zt.classNames=Ae.classNames.concat([zt.className]);var gt=class extends E{_beforeChanged(){super._beforeChanged(),(this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}};gt.className="Grid";gt.classNames=E.classNames.concat([gt.className]);var Bt=class extends U{constructor(){super(...arguments),this._alwaysShow=!1,this.lineX=this.children.push(gt.new(this._root,{themeTags:["x"]})),this.lineY=this.children.push(gt.new(this._root,{themeTags:["y"]})),this.selection=this.children.push(E.new(this._root,{themeTags:["selection","cursor"],layer:30})),this._lastPoint={x:0,y:0},this._lastPoint2={x:0,y:0},this._tooltipX=!1,this._tooltipY=!1}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["xy","cursor"]),super._afterNew(),this.setAll({width:$,height:$,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",()=>this._handleLineFocus())),this._disposers.push(this.lineX.events.on("blur",()=>this._handleLineBlur())),this._disposers.push(this.lineY.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineY.events.on("blur",()=>this._handleLineBlur())),pe("keyboardevents")&&this._disposers.push(Oe(document,"keydown",t=>{this._handleLineMove(Be(t),t.ctrlKey)}))}_setUpTouch(){let 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,e){let i="",s=this.chart,a;if(s&&s.xAxes.length){this._root.focused(this.lineX)?(i="positionX",a=s.xAxes.getIndex(0)):this._root.focused(this.lineY)&&(a=s.yAxes.getIndex(0),i="positionY");let o=1;if(e&&(o=5),a){let r=a.get("renderer").get("inversed",!1),n;t=="ArrowRight"||t=="ArrowDown"?n=1:t=="ArrowLeft"||t=="ArrowUp"?n=-1:t=="Tab"&&(n=0),n!=null&&(r&&(n*=-1),this.set(i,a.nextPosition(n*o)))}}}_handleLineFocus(){this._alwaysShow=this.get("alwaysShow",!1),this.setAll({positionX:this.getPrivate("positionX",0),positionY:this.getPrivate("positionY",0),alwaysShow:!0}),this._handleLineMove("Tab")}_handleLineBlur(){(this.lineX.isFocus()||this.lineY.isFocus())&&this.setAll({positionX:void 0,positionY:void 0,alwaysShow:this._alwaysShow})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("xAxis")){this._tooltipX=!1;let t=this.get("xAxis");if(t){let e=t.get("tooltip");e&&(this._tooltipX=!0,this._disposers.push(e.on("pointTo",()=>{this._updateXLine(e)})))}}if(this.isDirty("yAxis")){this._tooltipY=!1;let t=this.get("yAxis");if(t){let e=t.get("tooltip");e&&(this._tooltipY=!0,this._disposers.push(e.on("pointTo",()=>{this._updateYLine(e)})))}}}_handleSyncWith(){let t=this.chart;if(t){let e=this.get("syncWith"),i=[];e&&T(e,s=>{let a=s.chart;a&&i.push(a)}),t._otherCharts=i}}_updateChildren(){if(super._updateChildren(),this._handleSyncWith(),this.isDirty("positionX")||this.isDirty("positionY")){let 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=G(this._display.toLocal(t.get("pointTo",{x:0,y:0})).x,3);this._toX!=e&&(this.lineX.animate({key:"x",to:e,duration:t.get("animationDuration",0),easing:t.get("animationEasing")}),this._toX=e)}_updateYLine(t){let e=G(this._display.toLocal(t.get("pointTo",{x:0,y:0})).y,3);this._toY!=e&&(this.lineY.animate({key:"y",to:e,duration:t.get("animationDuration",0),easing:t.get("animationEasing")}),this._toY=e)}_drawLines(){this.lineX.set("draw",t=>{t.moveTo(0,0),t.lineTo(0,this.height())}),this.lineY.set("draw",t=>{t.moveTo(0,0),t.lineTo(this.width(),0)})}updateCursor(){this.get("alwaysShow")&&(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0)))),this.handleMove()}_setChart(t){this.chart=t,this._handleSyncWith();let e=t.plotContainer;this.events.on("boundschanged",()=>{this._disposers.push(this.setTimeout(()=>{this.updateCursor()},50))}),pe("touchevents")&&(this._disposers.push(e.events.on("click",s=>{Ue(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),Math.hypot(this._lastPoint2.x-s.point.x,this._lastPoint2.y-s.point.y)>1&&(this._handleLineBlur(),this._lastPoint2=s.point))}));let i=this.parent;i&&i.children.moveValue(this.selection)}_inPlot(t){let e=this.chart;return e?e.inPlot(t):!1}_handleCursorDown(t){if(t.originalEvent.button==2)return;let e=t.point,i=this._display.toLocal(e),s=this.chart;if(this.selection.set("draw",()=>{}),s&&this._inPlot(i)){if(this._downPoint=i,this.get("behavior")!="none"){this.selection.show();let r="selectstarted";this.events.isEnabled(r)&&this.events.dispatch(r,{type:r,target:this,originalEvent:t.originalEvent})}let a=this._getPosition(i).x,o=this._getPosition(i).y;this.setPrivate("downPositionX",a),this.setPrivate("downPositionY",o)}}_handleCursorUp(t){if(this._downPoint){let e=this.get("behavior","none");if(e!="none"){e.charAt(0)==="z"&&this.selection.hide();let i=t.point,s=this._display.toLocal(i),a=this._downPoint,o=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)>o&&(r=!0),(e==="zoomY"||e==="zoomXY"||e==="selectY"||e==="selectXY")&&Math.abs(s.y-a.y)>o&&(r=!0),r){let n="selectended";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this,originalEvent:t.originalEvent})}else{let n="selectcancelled";this.events.isEnabled(n)&&this.events.dispatch(n,{type:n,target:this,originalEvent:t.originalEvent})}}}}this._downPoint=void 0}_handleMove(t){if(this.getPrivate("visible")){let e=this.chart;if(e&&Gt(e.plotContainer._downPoints).length>1){this.set("forceHidden",!0);return}else this.set("forceHidden",!1);let 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);let s=this.get("alwaysShow");if(!t){this.hide(0);return}this._movePoint=t;let a=this._display.toLocal(t),o=this.chart;if(o&&(this._inPlot(a)||this._downPoint)){o._movePoint=t,this.isHidden()&&(this.show(),this.get("behavior","").charAt(0)=="z"&&this.selection.set("draw",()=>{}));let r=a.x,n=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"),u=l.x;v(h)&&(u=h);let d=this.get("positionY"),f=l.y;v(d)&&(f=d),this.setPrivate("positionX",u),this.setPrivate("positionY",f);let m=this._getPoint(u,f);if(r=m.x,n=m.y,o.xAxes.each(g=>{g._handleCursorPosition(u,c),s&&g.handleCursorShow()}),o.yAxes.each(g=>{g._handleCursorPosition(f,c),s&&g.handleCursorShow()}),!e){o._handleCursorPosition();let g="cursormoved";this.events.isEnabled(g)&&this.events.dispatch(g,{type:g,target:this,point:t,originalEvent:i})}this._updateLines(r,n),o.arrangeTooltips()}else if(!this._downPoint&&!s){this.hide(0);let 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){let e=this.selection,i=this.get("behavior"),s=this.width(),a=this.height();t.x<0&&(t.x=0),t.x>s&&(t.x=s),t.y<0&&(t.y=0),t.y>a&&(t.y=a),e.set("draw",o=>{let r=this._downPoint;r&&(i==="zoomXY"||i==="selectXY"?(o.moveTo(r.x,r.y),o.lineTo(r.x,t.y),o.lineTo(t.x,t.y),o.lineTo(t.x,r.y),o.lineTo(r.x,r.y)):i==="zoomX"||i==="selectX"?(o.moveTo(r.x,0),o.lineTo(r.x,a),o.lineTo(t.x,a),o.lineTo(t.x,0),o.lineTo(r.x,0)):(i==="zoomY"||i==="selectY")&&(o.moveTo(0,r.y),o.lineTo(s,r.y),o.lineTo(s,t.y),o.lineTo(0,t.y),o.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()}};Bt.className="XYCursor";Bt.classNames=U.classNames.concat([Bt.className]);function Se(A,t){return A==null?t:t==null?A:t<A?t:A}function Xe(A,t){return A==null?t:t==null||A>t?A:t}var lt=class extends we{constructor(){super(...arguments),this._axesDirty=!1,this._stackDirty=!1,this._selectionProcessed=!1,this._dataSets={},this._x=0,this._y=0,this._bullets={},this.mainContainer=this.children.push(U.new(this._root,{})),this.axisRanges=new ue,this._skipped=!1,this._couldStackTo=[],this._reallyStackedTo={},this._stackedSeries={},this._aLocationX0=0,this._aLocationX1=1,this._aLocationY0=0,this._aLocationY1=1,this._showBullets=!0,this.valueXFields=["valueX","openValueX","lowValueX","highValueX"],this.valueYFields=["valueY","openValueY","lowValueY","highValueY"],this._emptyDataItem=new K(this,void 0,{})}_afterNew(){this.fields.push("categoryX","categoryY","openCategoryX","openCategoryY"),this.valueFields.push("valueX","valueY","openValueX","openValueY","lowValueX","lowValueY","highValueX","highValueY"),this._setRawDefault("vcx",1),this._setRawDefault("vcy",1),this._setRawDefault("valueXShow","valueXWorking"),this._setRawDefault("valueYShow","valueYWorking"),this._setRawDefault("openValueXShow","openValueXWorking"),this._setRawDefault("openValueYShow","openValueYWorking"),this._setRawDefault("lowValueXShow","lowValueXWorking"),this._setRawDefault("lowValueYShow","lowValueYWorking"),this._setRawDefault("highValueXShow","highValueXWorking"),this._setRawDefault("highValueYShow","highValueYWorking"),this._setRawDefault("lowValueXGrouped","low"),this._setRawDefault("lowValueYGrouped","low"),this._setRawDefault("highValueXGrouped","high"),this._setRawDefault("highValueYGrouped","high");let t=this.get("xAxis");t&&(this._xRenderer=t.get("renderer"));let e=this.get("yAxis");e&&(this._yRenderer=e.get("renderer")),super._afterNew(),this.set("maskContent",!0),this._disposers.push(this.axisRanges.events.onAll(i=>{if(i.type==="clear")T(i.oldValues,s=>{this._removeAxisRange(s)});else if(i.type==="push")this._processAxisRange(i.newValue);else if(i.type==="setIndex")this._processAxisRange(i.newValue);else if(i.type==="insertIndex")this._processAxisRange(i.newValue);else if(i.type==="removeIndex")this._removeAxisRange(i.oldValue);else if(i.type==="moveIndex")this._processAxisRange(i.value);else throw new Error("Unknown IStreamEvent type")})),this.states.create("hidden",{opacity:1,visible:!1}),this.onPrivate("startIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this.onPrivate("endIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this._makeFieldNames()}_processAxisRange(t){let e=U.new(this._root,{});t.container=e,this.children.push(e),t.series=this;let i=t.axisDataItem;i.setRaw("isRange",!0);let s=i.component;if(s){s._processAxisRange(i,["range","series"]);let a=i.get("bullet");if(a){let r=a.get("sprite");r&&r.setPrivate("visible",!1)}let o=i.get("axisFill");o&&e.set("mask",o),s._seriesAxisRanges.push(i)}}_onDataClear(){super._onDataClear(),vt(this._dataSets,(t,e)=>{T(e,i=>{i.dispose()}),e.length=0})}_removeAxisRange(t){let e=t.axisDataItem,i=e.component;e.dispose(),Rt(i._seriesAxisRanges,e);let s=t.container;s&&s.dispose()}_updateFields(){super._updateFields(),this._valueXFields=[],this._valueYFields=[],this._valueXShowFields=[],this._valueYShowFields=[],this.__valueXShowFields=[],this.__valueYShowFields=[],this.valueXFields&&T(this.valueXFields,t=>{if(this.get(t+"Field")){this._valueXFields.push(t);let i=this.get(t+"Show");this.__valueXShowFields.push(i),i.indexOf("Working")!=-1?this._valueXShowFields.push(i.split("Working")[0]):this._valueXShowFields.push(i)}}),this.valueYFields&&T(this.valueYFields,t=>{if(this.get(t+"Field")){this._valueYFields.push(t);let i=this.get(t+"Show");this.__valueYShowFields.push(i),i.indexOf("Working")!=-1?this._valueYShowFields.push(i.split("Working")[0]):this._valueYShowFields.push(i)}})}_dispose(){super._dispose(),this._bullets={};let t=this.chart;t&&t.series.removeValue(this),me(this.get("xAxis").series,this),me(this.get("yAxis").series,this)}_min(t,e){let i=Se(this.getPrivate(t),e);this.setPrivate(t,i)}_max(t,e){let i=Xe(this.getPrivate(t),e);this.setPrivate(t,i)}_shouldMakeBullet(t){let e=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis");if(!e.inited||!i.inited)return!1;let a=this.get("minBulletDistance",0);if(a>0){let o=this.startIndex(),n=this.endIndex()-o;if(e==s){if(this._xRenderer.axisLength()/n<a/5)return!1}else if(i==s&&this._yRenderer.axisLength()/n<a/5)return!1}return t.get(this._xField)!=null&&t.get(this._yField)!=null}_makeFieldNames(){let t=this.get("xAxis"),e=this.get("yAxis"),i=t.getPrivate("name"),s=xe(i),a=e.getPrivate("name"),o=xe(a),r=t.get("renderer").getPrivate("letter"),n=e.get("renderer").getPrivate("letter"),l="open",c="low",h="high",u="Show";t.className==="ValueAxis"?(this._xField=this.get(i+r+u),this._xOpenField=this.get(l+s+r+u),this._xLowField=this.get(c+s+r+u),this._xHighField=this.get(h+s+r+u)):(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+n+u),this._yOpenField=this.get(l+o+n+u),this._yLowField=this.get(c+o+n+u),this._yHighField=this.get(h+o+n+u)):(this._yField=a+n,this._yOpenField=l+o+n,this._yLowField=c+o+n,this._yHighField=h+o+n)}_fixVC(){let t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis"),s=this.states.lookup("hidden"),a=this.get("sequencedInterpolation");if(s){let o=0;a&&(o=.999999999999),t===i?s.set("vcy",o):(e===i||s.set("vcy",o),s.set("vcx",o))}}_handleMaskBullets(){this.isDirty("maskBullets")&&this.bulletsContainer.set("maskContent",this.get("maskBullets"))}_fixPosition(){let t=this.get("xAxis"),e=this.get("yAxis");this.set("x",t.x()-Lt(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0)),this.set("y",e.y()-Lt(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._xRenderer=this.get("xAxis").get("renderer"),this._yRenderer=this.get("yAxis").get("renderer"),this._bullets={},(this.isDirty("valueYShow")||this.isDirty("valueXShow")||this.isDirty("openValueYShow")||this.isDirty("openValueXShow")||this.isDirty("lowValueYShow")||this.isDirty("lowValueXShow")||this.isDirty("highValueYShow")||this.isDirty("highValueXShow"))&&(this._updateFields(),this._makeFieldNames(),this._valuesDirty=!0),(this.isDirty("xAxis")||this.isDirty("yAxis"))&&(this._valuesDirty=!0),this.set("width",this.get("xAxis").width()),this.set("height",this.get("yAxis").height()),this._handleMaskBullets();let t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis"),s=this.get("tooltipPositionX"),a;switch(s){case"open":a=this._xOpenField;break;case"low":a=this._xLowField;break;case"high":a=this._xHighField;break;default:a=this._xField}this._tooltipFieldX=a;let o=this.get("tooltipPositionY"),r;switch(o){case"open":r=this._yOpenField;break;case"low":r=this._yLowField;break;case"high":r=this._yHighField;break;default:r=this._yField}this._tooltipFieldY=r,this.isDirty("baseAxis")&&this._fixVC(),this._fixPosition();let 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();let l,c,h,u;T(this.dataItems,d=>{T(this._valueXShowFields,f=>{let m=d.get(f);m!=null&&(n&&(m+=this.getStackedXValue(d,f)),l=Se(l,m),c=Xe(c,m))}),T(this._valueYShowFields,f=>{let m=d.get(f);m!=null&&(n&&(m+=this.getStackedYValue(d,f)),h=Se(h,m),u=Xe(u,m))}),t.processSeriesDataItem(d,this._valueXFields),e.processSeriesDataItem(d,this._valueYFields)}),this._min("minX",l),this._max("maxX",c),this._min("minY",h),this._max("maxY",u),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)}if((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("adjustedStartIndex")||this.isPrivateDirty("endIndex")||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty||this._sizeDirty){let l=this.startIndex(),c=this.endIndex(),h=this.get("minBulletDistance",0);if(h>0&&i&&(i.get("renderer").axisLength()/(c-l)>h?this._showBullets=!0:this._showBullets=!1),(this._psi!=l||this._pei!=c||this.isDirty("vcx")||this.isDirty("vcy")||this.isPrivateDirty("adjustedStartIndex")||this._stackDirty||this._valuesDirty)&&!this._selectionProcessed){this._selectionProcessed=!0;let u=this.get("vcx",1),d=this.get("vcy",1),f=this.get("stacked",!1),m=this.getPrivate("outOfSelection");if(i===t||!i)if(e._calculateTotals(),this.setPrivateRaw("selectionMinY",void 0),this.setPrivateRaw("selectionMaxY",void 0),m)e.markDirtySelectionExtremes();else for(let g=l;g<c;g++)this.processYSelectionDataItem(this.dataItems[g],d,f);if(i===e||!i)if(t._calculateTotals(),this.setPrivateRaw("selectionMinX",void 0),this.setPrivateRaw("selectionMaxX",void 0),m)e.markDirtySelectionExtremes();else for(let g=l;g<c;g++)this.processXSelectionDataItem(this.dataItems[g],u,f);if((i===t||!i)&&(this.get("valueYShow")!=="valueYWorking"||this.get("useSelectionExtremes"))){let g=this.getPrivate("selectionMinY");g!=null&&(this.setPrivateRaw("minY",g),e.markDirtyExtremes());let p=this.getPrivate("selectionMaxY");p!=null&&(this.setPrivateRaw("maxY",p),e.markDirtyExtremes())}if((i===e||!i)&&(this.get("valueXShow")!=="valueXWorking"||this.get("useSelectionExtremes"))){let g=this.getPrivate("selectionMinX");g!=null&&(this.setPrivateRaw("minX",g),e.markDirtyExtremes());let p=this.getPrivate("selectionMaxX");p!=null&&(this.setPrivateRaw("maxX",p),t.markDirtyExtremes())}(this.isPrivateDirty("selectionMinX")||this.isPrivateDirty("selectionMaxX"))&&t.markDirtySelectionExtremes(),(this.isPrivateDirty("selectionMinY")||this.isPrivateDirty("selectionMaxY"))&&e.markDirtySelectionExtremes()}}}_postUpdateData(){let t=this.get("xAxis"),e=this.get("yAxis");t._seriesValuesDirty=!0,e._seriesValuesDirty=!0,T(this.dataItems,i=>{i.open=void 0,i.close=void 0,t.processSeriesDataItem(i,this._valueXFields),e.processSeriesDataItem(i,this._valueYFields)})}_makeRangeMask(){if(this.axisRanges.length>0){let t=this._mainContainerMask;t==null&&(t=this.children.push(E.new(this._root,{})),this._mainContainerMask=t,t.set("draw",(e,i)=>{let s=this.parent;if(s){let a=this._root.container.width(),o=this._root.container.height();e.moveTo(-a,-o),e.lineTo(-a,o*2),e.lineTo(a*2,o*2),e.lineTo(a*2,-o),e.lineTo(-a,-o),this.axisRanges.each(r=>{let n=r.axisDataItem.get("axisFill");if(s&&n){let l=n.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(){let t=this.chart;if(t){let e=t.series.indexOf(this);if(this._couldStackTo=[],e>0){let i;for(let s=e-1;s>=0&&(i=t.series.getIndex(s),!(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(){vt(this._reallyStackedTo,(t,e)=>{delete e._stackedSeries[this.uid]}),this._reallyStackedTo={},T(this.dataItems,t=>{t.setRaw("stackToItemY",void 0),t.setRaw("stackToItemX",void 0)})}_handleRemoved(){let t=this.get("xAxis");t&&t._handleSeriesRemoved();let e=this.get("yAxis");e&&e._handleSeriesRemoved()}_stackDataItems(){let t=this.get("baseAxis"),e=this.get("xAxis"),i=this.get("yAxis"),s,a;t===e?(s="valueY",a="stackToItemY"):t===i&&(s="valueX",a="stackToItemX");let o=this._couldStackTo.length,r=0,n=this.get("stackToNegative");this._reallyStackedTo={},T(this.dataItems,l=>{for(let c=0;c<o;c++){let h=this._couldStackTo[c],u=h.dataItems[r],d=l.get(s);if(u){let f=u.get(s);if(n)if(v(d)){if(v(f)){if(c==o-1&&l.setRaw(a,void 0),d>=0&&f>=0){l.setRaw(a,u),this._reallyStackedTo[h.uid]=h,h._stackedSeries[this.uid]=this;break}if(d<0&&f<0){l.setRaw(a,u),this._reallyStackedTo[h.uid]=h,h._stackedSeries[this.uid]=this;break}}}else break;else if(v(d)&&v(f)){l.setRaw(a,u),this._reallyStackedTo[h.uid]=h,h._stackedSeries[this.uid]=this;break}}}r++})}processXSelectionDataItem(t,e,i){T(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){T(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){let i=t.get("stackToItemY");if(i){let s=i.component;return i.get(e,0)*s.get("vcy",1)+this.getStackedYValueWorking(i,e)}return 0}getStackedXValueWorking(t,e){let i=t.get("stackToItemX");if(i){let s=i.component;return i.get(e,0)*s.get("vcx",1)+this.getStackedXValueWorking(i,e)}return 0}getStackedYValue(t,e){let i=t.get("stackToItemY");return i?i.get(e,0)+this.getStackedYValue(i,e):0}getStackedXValue(t,e){let i=t.get("stackToItemX");return i?i.get(e,0)+this.getStackedXValue(i,e):0}createLegendMarker(t){this.updateLegendMarker()}_markDirtyAxes(){this._axesDirty=!0,this.markDirty()}_markDataSetDirty(){this._afterDataChange(),this._valuesDirty=!0,this._dataProcessed=!1,this._aggregatesCalculated=!1,this.markDirty()}_clearDirty(){super._clearDirty(),this._axesDirty=!1,this._selectionProcessed=!1,this._stackDirty=!1,this._dataProcessed=!1}_positionBullet(t){let e=t.get("sprite");if(e){let i=e.dataItem,s=t.get("locationX",i.get("locationX",.5)),a=t.get("locationY",i.get("locationY",.5)),o=this.get("xAxis"),r=this.get("yAxis"),n=this.get("exactLocationX",!1),l=this.get("exactLocationY",!1),c=o.getDataItemPositionX(i,this._xField,s,this.get("vcx",1),n),h=r.getDataItemPositionY(i,this._yField,a,this.get("vcy",1),l),u=this.getPoint(c,h),d=i.get("left",u.x),f=i.get("right",u.x),m=i.get("top",u.y),g=i.get("bottom",u.y),p=0,_=0,x=f-d,y=g-m;if(this._shouldShowBullet(c,h)){e.setPrivate("visible",!t.getPrivate("hidden"));let b=t.get("field"),w=this.get("baseAxis"),M=this.get("xAxis"),D=this.get("yAxis");if(b!=null){let k;w==M?(b=="value"?k=this._yField:b=="open"?k=this._yOpenField:b=="high"?k=this._yHighField:b=="low"&&(k=this._yLowField),k&&(h=D.getDataItemPositionY(i,k,0,this.get("vcy",1),l),u=this._yRenderer.positionToPoint(h),_=u.y,p=d+x*s)):(b=="value"?k=this._xField:b=="open"?k=this._xOpenField:b=="high"?k=this._xHighField:b=="low"&&(k=this._xLowField),k&&(c=M.getDataItemPositionX(i,k,0,this.get("vcx",1),n),u=this._xRenderer.positionToPoint(c),p=u.x,_=g-y*a))}else p=d+x*s,_=g-y*a;let P=t.get("stacked");if(P){let k=this.chart;if(w==M){let I=this._bullets[c+"_"+h];if(I){let C=I.bounds(),X=e.localBounds(),S=_;_=C.top,P=="down"?_=C.bottom-X.top:P=="auto"?k&&(S<k.plotContainer.height()/2?_=C.bottom-X.top:_+=X.bottom):_+=X.bottom}this._bullets[c+"_"+h]=e}else{let I=this._bullets[c+"_"+h];if(I){let C=I.bounds(),X=e.localBounds(),S=p;p=C.right,P=="down"?p=C.left-X.right:P=="auto"?k&&(S<k.plotContainer.width()/2?p=C.left-X.right:p-=X.left):p-=X.left}this._bullets[c+"_"+h]=e}}e.isType("Label")&&(e.setPrivate("maxWidth",Math.abs(x)),e.setPrivate("maxHeight",Math.abs(y))),e.setAll({x:p,y:_})}else e.setPrivate("visible",!1)}}_shouldShowBullet(t,e){return this._showBullets}setDataSet(t){if(this._dataSets[t]){this._handleDataSetChange(),this._dataItems=this._dataSets[t],this._markDataSetDirty(),this._dataSetId=t;let e="datasetchanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,id:t})}}resetGrouping(){vt(this._dataSets,(t,e)=>{e!=this._mainDataItems&&T(e,i=>{i.dispose()})}),this._dataSets={},this._dataItems=this.mainDataItems}_handleDataSetChange(){T(this._dataItems,t=>{let e=t.bullets;e&&T(e,i=>{if(i){let s=i.get("sprite");s&&s.setPrivate("visible",!1)}})}),this._selectionProcessed=!1}show(t){let e=Object.create(null,{show:{get:()=>super.show}});return kt(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"),o=this.get("baseAxis");a!==o&&a.markDirtySelectionExtremes(),s!==o&&s.markDirtySelectionExtremes()})),i.push(this.bulletsContainer.show(t)),i.push(this._sequencedShowHide(!0,t)),yield Promise.all(i)})}hide(t){let e=Object.create(null,{hide:{get:()=>super.hide}});return kt(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(e.hide.call(this,t).then(()=>{this._isHiding=!1})),i.push(this.bulletsContainer.hide(t)),i.push(this._sequencedShowHide(!1,t)),yield Promise.all(i)})}showDataItem(t,e){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return kt(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,t,e)];v(e)||(e=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing");T(this._valueFields,o=>{s.push(t.animate({key:o+"Working",to:t.get(o),duration:e,easing:a}).waitForStop())}),yield Promise.all(s)})}hideDataItem(t,e){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return kt(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,t,e)],a=this.states.lookup("hidden");a||(a=this.states.create("hidden",{})),v(e)||(e=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let o=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),r=this.get("xAxis"),n=this.get("yAxis"),l=this.get("baseAxis"),c=this.get("stacked");if((l===r||!l)&&T(this._valueYFields,h=>{let u=n.getPrivate("min"),d=n.baseValue();v(u)&&u>d&&(d=u),c&&(d=0),t.get(h)!=null&&s.push(t.animate({key:h+"Working",to:d,duration:e,easing:o}).waitForStop())}),l===n||!l){let h=r.getPrivate("min"),u=r.baseValue();v(h)&&h>u&&(u=h),c&&(u=0),T(this._valueXFields,d=>{t.get(d)!=null&&s.push(t.animate({key:d+"Working",to:u,duration:e,easing:o}).waitForStop())})}yield Promise.all(s)})}_markDirtyStack(){this._stackDirty=!0,this.markDirty(),this._markStakedDirtyStack()}_markStakedDirtyStack(){let t=this._stackedSeries;t&&vt(t,(e,i)=>{i._stackDirty||i._markDirtyStack()})}_afterChanged(){super._afterChanged(),this._skipped&&(this._markDirtyAxes(),this._skipped=!1)}showDataItemTooltip(t){this.getPrivate("doNotUpdateLegend")||(this.updateLegendMarker(t),this.updateLegendValue(t));let e=this.get("tooltip"),i=this.get("exactLocationX",!1),s=this.get("exactLocationY",!1);if(e)if(!this.isHidden()&&this.get("visible")){if(e._setDataItem(t),t){let a=this.get("locationX",0),o=this.get("locationY",1),r=t.get("locationX",a),n=t.get("locationY",o),l=this.get("xAxis"),c=this.get("yAxis"),h=this.get("vcx",1),u=this.get("vcy",1),d=l.getDataItemPositionX(t,this._tooltipFieldX,this._aLocationX0+(this._aLocationX1-this._aLocationX0)*r,h,i),f=c.getDataItemPositionY(t,this._tooltipFieldY,this._aLocationY0+(this._aLocationY1-this._aLocationY0)*n,u,s),m=this.getPoint(d,f),g=!0;if(T(this._valueFields,p=>{t.get(p)==null&&(g=!1)}),g){let p=this.chart;p&&p.inPlot(m)?(e.label.text.markDirtyText(),e.set("tooltipTarget",this._getTooltipTarget(t)),e.set("pointTo",this._display.toGlobal({x:m.x,y:m.y}))):e._setDataItem(void 0)}else e._setDataItem(void 0)}}else this.hideTooltip()}hideTooltip(){let t=this.get("tooltip");return t&&t.set("tooltipTarget",this),super.hideTooltip()}_getTooltipTarget(t){if(this.get("seriesTooltipTarget")=="bullet"){let e=t.bullets;if(e&&e.length>0){let s=e[0].get("sprite");if(s)return s}}return this}updateLegendValue(t){let e=this.get("legendDataItem");if(e){let 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)}let 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._xRenderer.positionToCoordinate(t),s=this._yRenderer.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}_adjustStartIndex(t){let e=this.get("xAxis");if(this.get("baseAxis")==e&&e.isType("DateAxis")){let s=e.baseDuration(),a=e.getPrivate("selectionMin",e.getPrivate("min",0)),o=s*this.get("locationX",.5),r=-1/0;for(;r<a;){let n=this.dataItems[t];if(n){let l=n.open;if(l?r=l.valueX:r=n.get("valueX",0),r+=o,r<a)t++;else break}else break}}return t}};lt.className="XYSeries";lt.classNames=we.classNames.concat([lt.className]);var bt=class A extends lt{constructor(){super(...arguments),this._ph=0,this._pw=0,this._columnsUpdated=!1}_makeGraphics(t,e){return this.makeColumn(e,t)}_makeFieldNames(){super._makeFieldNames();let 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();let 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 o=s;o<=a;o++){let r=this.dataItems[o];this._createGraphics(r)}}_updateChildren(){let t=this.chart;t&&(this._ph=t.plotContainer.height(),this._pw=t.plotContainer.width());let 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("fillPattern")&&a.get("fillPattern")==null&&a.set("fillPattern",this.get("fillPattern")),this.isDirty("stroke")&&a.get("stroke")==null&&a.set("stroke",this.get("stroke"));let o=0,r=0,n=0;s&&T(s.series,m=>{if(m instanceof A){let g=m.get("stacked");g&&n==0&&r++,!g&&m.get("clustered")&&r++}m===this&&(o=r-1),n++}),this.get("clustered")||(o=0,r=1),r===0&&(r=1,o=0);let l="cellStartLocation",c="cellEndLocation",h=this._xRenderer.get(l,0),u=this._xRenderer.get(c,1),d=this._yRenderer.get(l,0),f=this._yRenderer.get(c,1);if(this._aLocationX0=h+o/r*(u-h),this._aLocationX1=h+(o+1)/r*(u-h),this._aLocationY0=d+o/r*(f-d),this._aLocationY1=d+(o+1)/r*(f-d),e.inited&&i.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty){let m=this.dataItems.length,g=Math.max(0,this.startIndex()-2),p=Math.min(this.endIndex()+2,m-1);for(let y=0;y<g;y++)this._toggleColumn(this.dataItems[y],!1);let _=this.dataItems[g];for(let y=g;y<=p;y++){let b=this.dataItems[y];if(b.get("valueX")!=null&&b.get("valueY")!=null){if(_=b,y>0&&g>0)for(let w=y-1;w>=0;w--){let M=this.dataItems[w];if(M.get("valueX")!=null&&M.get("valueY")!=null){_=M;break}}break}else this._toggleColumn(b,!1)}this._beforeColumnsDraw();let x=0;i.isType("CategoryAxis")&&e.isType("CategoryAxis")?x=2:e===s?x=0:i===s&&(x=1);for(let y=g;y<=p;y++){let b=this.dataItems[y];this._updateGraphics(b,_,x),b.get("valueX")!=null&&b.get("valueY")!=null&&(_=b)}this._afterColumnsDraw();for(let y=p+1;y<m;y++)this._toggleColumn(this.dataItems[y],!1);this._columnsUpdated=!0}}else this._skipped=!0;this.getPrivate("doNotUpdateLegend")||this.updateLegendMarker(this.get("tooltipDataItem")),super._updateChildren()}_afterChanged(){super._afterChanged(),this._columnsUpdated=!1}_beforeColumnsDraw(){}_afterColumnsDraw(){}_createGraphics(t){let e=t.get("graphics");if(!e){e=this._makeGraphics(this.columns,t),t.set("graphics",e),e._setDataItem(t);let i=t.get("legendDataItem");if(i){let a=i.get("markerRectangle");if(a){let o=a.states.lookup("default");T(ve,r=>{let n=e.get(r,this.get(r));a.set(r,n),o.set(r,n)})}}let s=t.get("rangeGraphics");s&&T(s,a=>{a.dispose()}),s=[],t.setRaw("rangeGraphics",s),this.axisRanges.each(a=>{let o=a.container,r=this._makeGraphics(a.columns,t);s&&s.push(r),r.setPrivate("list",a.columns),o.children.push(r)})}}createAxisRange(t){return T(this.dataItems,e=>{let i=e.get("graphics");i&&(i.dispose(),e.set("graphics",void 0))}),super.createAxisRange(t)}_updateGraphics(t,e,i){let s=t.get("graphics"),a=this._xField,o=this._yField,r=t.get(a),n=t.get(o),l=this.get("exactLocationX",!1);if(r!=null&&n!=null){let c=this._xOpenField,h=this._yOpenField,u=this.get("locationX",t.get("locationX",.5)),d=this.get("locationY",t.get("locationY",.5)),f=this.get("openLocationX",t.get("openLocationX",u)),m=this.get("openLocationY",t.get("openLocationY",d)),g=s.get("width"),p=s.get("height"),_=this.get("stacked"),x=this.get("xAxis"),y=this.get("yAxis"),b=x.get("start"),w=x.get("end"),M=y.get("start"),D=y.get("end"),P,k,I,C,X=this.get("vcy",1),S=this.get("vcx",1),tt=!1,V=!1;if(i==0){let F=this._aLocationX0+f-.5,N=this._aLocationX1+u-.5;if(g instanceof It){let L=(N-F)*(1-g.value)/2;F+=L,N-=L}if(P=x.getDataItemPositionX(t,c,F,S,l),k=x.getDataItemPositionX(t,a,N,S,l),I=y.getDataItemPositionY(t,o,d,X),this._yOpenField!==this._yField)C=y.getDataItemPositionY(t,h,m,X);else if(_){let L=t.get("stackToItemY");L?C=y.getDataItemPositionY(L,o,m,L.component.get("vcy")):C=y.basePosition()}else C=y.basePosition();t.setRaw("point",{x:P+(k-P)/2,y:I}),V=!0}else if(i==1){let F=this._aLocationY0+m-.5,N=this._aLocationY1+d-.5;if(p instanceof It){let L=(N-F)*(1-p.value)/2;F+=L,N-=L}if(I=y.getDataItemPositionY(t,h,F,X),C=y.getDataItemPositionY(t,o,N,X),k=x.getDataItemPositionX(t,a,u,S,l),this._xOpenField!==this._xField)P=x.getDataItemPositionX(t,c,f,S,l);else if(_){let L=t.get("stackToItemX");L?P=x.getDataItemPositionX(L,a,f,L.component.get("vcx"),l):P=x.basePosition()}else P=x.basePosition();tt=!0,t.setRaw("point",{x:k,y:I+(C-I)/2})}else if(i==2){let F=this._aLocationX0+f-.5,N=this._aLocationX1+u-.5;if(g instanceof It){let L=(N-F)*(1-g.value)/2;F+=L,N-=L}if(P=x.getDataItemPositionX(t,c,F,S),k=x.getDataItemPositionX(t,a,N,S),F=this._aLocationY0+m-.5,N=this._aLocationY1+d-.5,p instanceof It){let L=(N-F)*(1-p.value)/2;F+=L,N-=L}I=y.getDataItemPositionY(t,h,F,X),C=y.getDataItemPositionY(t,o,N,X),t.setRaw("point",{x:P+(k-P)/2,y:I+(C-I)/2})}this._applyGraphicsStates(t,e),this._updateSeriesGraphics(t,s,P,k,I,C,tt,V),P<b&&k<b||P>w&&k>w||I<M&&C<=M||I>=D&&C>D||at(P)||at(I)?this._toggleColumn(t,!1):this._toggleColumn(t,!0);let q=t.get("rangeGraphics");q&&T(q,F=>{this._updateSeriesGraphics(t,F,P,k,I,C,tt,V)})}else this._toggleColumn(t,!1)}_updateSeriesGraphics(t,e,i,s,a,o,r,n){let l=e.get("width"),c=e.get("height"),h=e.get("maxWidth"),u=e.get("maxHeight"),d=this.getPoint(i,a),f=this.getPoint(s,o),m=t.get("point");if(m){let g=this.getPoint(m.x,m.y);m.x=g.x+this._x,m.y=g.y+this._y}if(i=d.x,s=f.x,a=d.y,o=f.y,v(l)){let g=(s-i-l)/2;i+=g,s-=g}if(v(h)&&h<Math.abs(s-i)){let g=(s-i-h)/2;i+=g,s-=g}if(v(c)){let g=(o-a-c)/2;a+=g,o-=g}if(v(u)&&u<Math.abs(o-a)){let g=(o-a-u)/2;a+=g,o-=g}this.get("adjustBulletPosition")&&(r&&(s=Math.min(Math.max(0,s),this._pw),i=Math.min(Math.max(0,i),this._pw)),n&&(a=Math.min(Math.max(0,a),this._ph),o=Math.min(Math.max(0,o),this._ph))),t.setRaw("left",i),t.setRaw("right",s),t.setRaw("top",a),t.setRaw("bottom",o),e.setPrivate("width",s-i),e.setPrivate("height",o-a),e.set("x",i),e.set("y",o-(o-a))}_handleDataSetChange(){super._handleDataSetChange(),T(this._dataItems,t=>{this._toggleColumn(t,!1)})}_applyGraphicsStates(t,e){let i=t.get("graphics"),s=i.states.lookup("dropFromOpen"),a=i.states.lookup("riseFromOpen"),o=i.states.lookup("dropFromPrevious"),r=i.states.lookup("riseFromPrevious");if(s||o||a||r){let n=this.get("xAxis"),l=this.get("yAxis"),c=this.get("baseAxis"),h,u,d;c===n&&l.isType("ValueAxis")?(h=t.get(this._yOpenField),u=t.get(this._yField),d=e.get(this._yField)):c===l&&n.isType("ValueAxis")&&(h=t.get(this._xOpenField),u=t.get(this._xField),d=e.get(this._xField)),v(h)&&v(u)&&(u<h?s&&s.apply():a&&a.apply(),v(d)&&(u<d?o&&o.apply():r&&r.apply()))}}disposeDataItem(t){super.disposeDataItem(t);let e=t.get("graphics");e&&(this.columns.removeValue(e),e.dispose());let i=t.get("rangeGraphics");i&&T(i,s=>{let a=s.getPrivate("list");a&&a.removeValue(s),s.dispose()})}hideDataItem(t,e){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return kt(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,t,e)],a=t.get("graphics");a&&s.push(a.hide(e));let o=t.get("rangeGraphics");o&&T(o,r=>{s.push(r.hide(e))}),yield Promise.all(s)})}_toggleColumn(t,e){let i=t.get("graphics");i&&i.setPrivate("visible",e);let s=t.get("rangeGraphics");s&&T(s,o=>{o.setPrivate("visible",e)});let a=t.bullets;a&&T(a,o=>{o.setPrivate("hidden",!e)})}showDataItem(t,e){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return kt(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,t,e)],a=t.get("graphics");a&&s.push(a.show(e));let o=t.get("rangeGraphics");o&&T(o,r=>{s.push(r.show(e))}),yield Promise.all(s)})}updateLegendMarker(t){let e=this.get("legendDataItem");if(this.get("useLastColorForLegendMarker")&&!t){let 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)}let s=e.get("markerRectangle");if(s&&!e.get("itemContainer").get("disabled")){let a=s.states.lookup("default");T(ve,o=>{let r=i.get(o,this.get(o));s.set(o,r),a.set(o,r)})}}}_getTooltipTarget(t){if(this.get("seriesTooltipTarget")=="bullet")return super._getTooltipTarget(t);let e=t.get("graphics");return e||this}};bt.className="BaseColumnSeries";bt.classNames=lt.classNames.concat([bt.className]);var ht=class extends De{constructor(){super(...arguments),this._series=[],this._isPanning=!1,this.minorDataItems=[],this.labelsContainer=this.children.push(U.new(this._root,{})),this.gridContainer=U.new(this._root,{width:$,height:$}),this.topGridContainer=U.new(this._root,{width:$,height:$}),this.bulletsContainer=this.children.push(U.new(this._root,{isMeasured:!1,width:$,height:$,position:"absolute"})),this._rangesDirty=!1,this._panStart=0,this._panEnd=1,this._skipSync=!1,this.axisRanges=new ue,this._seriesAxisRanges=[],this._cursorPosition=-1,this._seriesValuesDirty=!1,this._seriesAdded=!1,this.axisHeader=this.children.push(U.new(this._root,{themeTags:["axis","header"],position:"absolute",background:pt.new(this._root,{themeTags:["header","background"],fill:this._root.interfaceColors.get("background")})})),this._bullets={}}_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")T(e.oldValues,i=>{i.dispose()});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")this._processAxisRange(e.value,["range"]);else throw new Error("Unknown IStreamEvent type")}));let t=this.get("renderer");t&&(t.axis=this,t.processAxis()),this.children.push(t),this._createGhostLabel()}_createGhostLabel(){let e=this.get("renderer").makeLabel(new K(this,void 0,{}),[]);e.adapters.disable("text"),e.setAll({opacity:0,tooltipText:void 0,tooltipHTML:void 0,interactive:!1}),e.events.disable(),this.ghostLabel=e}_updateFinals(t,e){}zoom(t,e,i,s){if(this.get("zoomable",!0))if(this._updateFinals(t,e),this.get("start")!==t||this.get("end")!=e){let a=this._sAnimation,o=this._eAnimation;t>e&&([t,e]=[e,t]);let r=this.get("maxDeviation",.5)*Math.min(1,e-t);t<-r&&(t=-r),e>1+r&&(e=1+r);let n=this.getPrivate("maxZoomFactor",this.get("maxZoomFactor",100)),l=n;v(i)||(i=this.get("interpolationDuration",0)),s||(s="end"),e===1&&t!==0&&(t<this.get("start",0)?s="start":s="end"),t===0&&e!==1&&(e>this.get("end",1)?s="end":s="start");let c=this.get("minZoomCount",0),h=this.dataItems;h&&h.length<c&&(c=h.length);let u=this.get("maxZoomCount",1/0);v(c)&&(n=l/c);let d=1;if(v(u)&&(d=l/u),t>e&&([t,e]=[e,t]),s==="start"?(u>0&&1/(e-t)<d&&(e=t+1/d),1/(e-t)>n&&(e=t+1/n),e>1&&e-t<1/n&&(t=e-1/n)):(u>0&&1/(e-t)<d&&(t=e-1/d),1/(e-t)>n&&(t=e-1/n),t<0&&e-t<1/n&&(e=t+1/n)),1/(e-t)>n&&(e=t+1/n),1/(e-t)>n&&(t=e-1/n),u!=null&&c!=null&&t==this.get("start")&&e==this.get("end")){let f=this.chart;f&&f._handleAxisSelection(this,!0)}if((a&&a.playing&&a.to==t||this.get("start")==t)&&(o&&o.playing&&o.to==e||this.get("end")==e))return;if(i>0){let f=this.get("interpolationEasing"),m,g;if(this.get("start")!=t&&(m=this.animate({key:"start",to:t,duration:i,easing:f})),this.get("end")!=e&&(g=this.animate({key:"end",to:e,duration:i,easing:f})),this._sAnimation=m,this._eAnimation=g,m)return m;if(g)return g}else this.set("start",t),this.set("end",e),this.root.events.once("frameended",()=>{this.markDirtyKey("start")})}else this._sAnimation&&this._sAnimation.stop(),this._eAnimation&&this._eAnimation.stop()}get series(){return this._series}_processAxisRange(t,e){t.setRaw("isRange",!0),this._createAssets(t,e),this._rangesDirty=!0,this._prepareDataItem(t);let i=t.get("above"),s=this.topGridContainer,a=t.get("grid");i&&a&&s.children.moveValue(a);let o=t.get("axisFill");i&&o&&s.children.moveValue(o)}_prepareDataItem(t,e){}markDirtyExtremes(){}markDirtySelectionExtremes(){}_calculateTotals(){}_updateAxisRanges(){this._bullets={},this.axisRanges.each(t=>{this._prepareDataItem(t)}),T(this._seriesAxisRanges,t=>{this._prepareDataItem(t)})}_prepareChildren(){super._prepareChildren();let t=this.ghostLabel;if(t&&(this.get("fixAxisSize")?t.set("visible",!0):t.set("visible",!1)),this.isDirty("start")||this.isDirty("end")){let i=this.chart;i&&i._updateCursor();let s=this.get("start",0),a=this.get("end",1),o=this.get("maxDeviation",.5)*Math.min(1,a-s);if(s<-o){let r=s+o;s=-o,this.setRaw("start",s),this.isDirty("end")&&this.setRaw("end",a-r)}if(a>1+o){let r=a-1-o;a=1+o,this.setRaw("end",a),this.isDirty("start")&&this.setRaw("start",s-r)}}let e=this.get("renderer");if(e._start=this.get("start"),e._end=this.get("end"),e._inversed=e.get("inversed",!1),e._axisLength=e.axisLength()/(e._end-e._start),e._updateLC(),this.isDirty("tooltip")){let i=this.get("tooltip");if(i){let s=e.get("themeTags");i.addTag("axis"),i.addTag(this.className.toLowerCase()),i._applyThemes(),s&&(i.set("themeTags",Y(i.get("themeTags"),s)),i.label._applyThemes())}}}_updateTooltipBounds(){let t=this.get("tooltip");t&&this.get("renderer").updateTooltipBounds(t)}_updateBounds(){super._updateBounds(),this._updateTooltipBounds()}processChart(t){this.chart=t;let e=this.get("renderer");e.chart=t,t.gridContainer.children.push(this.gridContainer),t.topGridContainer.children.push(this.topGridContainer),t.axisHeadersContainer.children.push(this.axisHeader),this.on("start",()=>{t._handleAxisSelection(this)}),this.on("end",()=>{t._handleAxisSelection(this)}),t.plotContainer.onPrivate("width",()=>{this.markDirtySize()}),t.plotContainer.onPrivate("height",()=>{this.markDirtySize()}),t.processAxis(this)}hideDataItem(t){return this._toggleFHDataItem(t,!0),super.hideDataItem(t)}showDataItem(t){return this._toggleFHDataItem(t,!1),super.showDataItem(t)}_toggleFHDataItem(t,e){let i="forceHidden",s=t.get("label");s&&s.set(i,e);let a=t.get("grid");a&&a.set(i,e);let o=t.get("tick");o&&o.set(i,e);let r=t.get("axisFill");r&&r.set(i,e);let n=t.get("bullet");if(n){let l=n.get("sprite");l&&l.set(i,e)}}_toggleDataItem(t,e){let i=t.get("label"),s="visible";i&&i.setPrivate(s,e);let a=t.get("grid");a&&a.setPrivate(s,e);let o=t.get("tick");o&&o.setPrivate(s,e);let r=t.get("axisFill");r&&r.setPrivate(s,e);let n=t.get("bullet");if(n){let l=n.get("sprite");l&&l.setPrivate(s,e)}}_createAssets(t,e,i){var s,a,o;let r=this.get("renderer"),n="minor",l=t.get("label");if(!l)r.makeLabel(t,e);else{let u=l.get("themeTags"),d=!1;i?u?.indexOf(n)==-1&&(d=!0):u?.indexOf(n)!=-1&&(d=!0),d&&((s=l.parent)===null||s===void 0||s.children.removeValue(l),r.makeLabel(t,e),l.dispose(),r.labels.removeValue(l))}let c=t.get("grid");if(!c)r.makeGrid(t,e);else{let u=c.get("themeTags"),d=!1;i?u?.indexOf(n)==-1&&(d=!0):u?.indexOf(n)!=-1&&(d=!0),d&&((a=c.parent)===null||a===void 0||a.children.removeValue(c),r.makeGrid(t,e),c.dispose(),r.grid.removeValue(c))}let h=t.get("tick");if(!h)r.makeTick(t,e);else{let u=!1,d=h.get("themeTags");i?d?.indexOf(n)==-1&&(u=!0):d?.indexOf(n)!=-1&&(u=!0),u&&((o=h.parent)===null||o===void 0||o.children.removeValue(h),r.makeTick(t,e),h.dispose(),r.ticks.removeValue(h))}(!i&&!t.get("axisFill")||i&&!t.get("axisFill")&&this.get("minorAxisFillsEnabled"))&&r.makeAxisFill(t,e),this._processBullet(t)}_processBullet(t){let e=t.get("bullet"),i=this.get("bullet");if(!e&&i&&!t.get("isRange")&&(e=i(this._root,this,t)),e){e.axis=this;let s=e.get("sprite");s&&(s._setDataItem(t),t.setRaw("bullet",e),s.parent||this.bulletsContainer.children.push(s))}}_afterChanged(){super._afterChanged();let t=this.chart;t&&(t._updateChartLayout(),t.axisHeadersContainer.markDirtySize()),this.get("renderer")._updatePositions(),this._seriesAdded=!1}disposeDataItem(t){super.disposeDataItem(t);let e=this.get("renderer"),i=t.get("label");i&&(e.labels.removeValue(i),i.dispose());let s=t.get("tick");s&&(e.ticks.removeValue(s),s.dispose());let a=t.get("grid");a&&(e.grid.removeValue(a),a.dispose());let o=t.get("axisFill");o&&(e.axisFills.removeValue(o),o.dispose());let r=t.get("bullet");r&&r.dispose()}_updateGhost(){this.setPrivate("cellWidth",this.getCellWidthPosition()*this.get("renderer").axisLength());let t=this.ghostLabel;if(t){if(!t.isHidden()){let s=t.localBounds(),a=Math.ceil(s.right-s.left),o=t.get("text");T(this.dataItems,r=>{let n=r.get("label");if(n&&!n.isHidden()){let l=n.localBounds();Math.ceil(l.right-l.left)>a&&(o=n.text._getText())}}),t.set("text",o)}let e=this.get("start",0),i=this.get("end",1);this.get("renderer").updateLabel(t,e+(i-e)*.5)}}_handleCursorPosition(t,e){t=this.get("renderer").toAxisPosition(t),this._cursorPosition=t,this._snapToSeries=e,this.updateTooltip()}updateTooltip(){let t=this._snapToSeries,e=this._cursorPosition,i=this.get("tooltip"),s=this.get("renderer");v(e)&&(T(this.series,a=>{if(a.get("baseAxis")===this){let o=this.getSeriesItem(a,e,this.get("tooltipLocation"));t&&t.indexOf(a)!=-1?(a.updateLegendMarker(o),a.updateLegendValue(o),a._settings.tooltipDataItem=o):(a.showDataItemTooltip(o),a.setRaw("tooltipDataItem",o))}}),this.get("snapTooltip")&&(e=this.roundAxisPosition(e,this.get("tooltipLocation",.5))),this.setPrivateRaw("tooltipPosition",e),i&&(s.updateTooltipBounds(i),at(e)?i.hide(0):(this._updateTooltipText(i,e),s.positionTooltip(i,e),e<this.get("start",0)||e>this.get("end",1)?i.hide(0):i.show(0))))}_updateTooltipText(t,e){t.label.set("text",this.getTooltipText(e))}roundAxisPosition(t,e){return t}_handleSeriesRemoved(){}handleCursorShow(){let t=this.get("tooltip");t&&t.show()}handleCursorHide(){let t=this.get("tooltip");t&&t.hide()}processSeriesDataItem(t,e){}_clearDirty(){super._clearDirty(),this._sizeDirty=!1,this._rangesDirty=!1}coordinateToPosition(t){let e=this.get("renderer");return e.toAxisPosition(t/e.axisLength())}toAxisPosition(t){return this.get("renderer").toAxisPosition(t)}toGlobalPosition(t){return this.get("renderer").toGlobalPosition(t)}fixPosition(t){return this.get("renderer").fixPosition(t)}shouldGap(t,e,i,s){return!1}createAxisRange(t){return this.axisRanges.push(t)}_groupSeriesData(t){}getCellWidthPosition(){return .05}};ht.className="Axis";ht.classNames=De.classNames.concat([ht.className]);var et=class extends ht{constructor(){super(...arguments),this._dirtyExtremes=!1,this._dirtySelectionExtremes=!1,this._dseHandled=!1,this._deltaMinMax=1,this._baseValue=0,this._minLogAdjusted=1}markDirtyExtremes(){this._dirtyExtremes=!0,this.markDirty()}markDirtySelectionExtremes(){this._dirtySelectionExtremes=!0,this.markDirty()}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["axis"]),this.setPrivateRaw("name","value"),this.addTag("value"),super._afterNew()}_prepareChildren(){var t;if(super._prepareChildren(),this.isDirty("syncWithAxis")){this._prevSettings.syncWithAxis&&this._syncDp&&this._syncDp.dispose();let s=this.get("syncWithAxis");s&&(this._syncDp=new Ee([s.onPrivate("selectionMinFinal",()=>{this._dirtySelectionExtremes=!0}),s.onPrivate("selectionMaxFinal",()=>{this._dirtySelectionExtremes=!0})]))}let e=!1;if((this.isDirty("min")||this.isDirty("max")||this.isDirty("maxPrecision")||this.isDirty("numberFormat"))&&(e=!0,(t=this.ghostLabel)===null||t===void 0||t.set("text","")),(this._sizeDirty||this._dirtyExtremes||this._valuesDirty||e||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("extraMin")||this.isDirty("extraMax")||this.isDirty("logarithmic")||this.isDirty("treatZeroAs")||this.isDirty("baseValue")||this.isDirty("strictMinMax")||this.isDirty("strictMinMaxSelection"))&&(this._getMinMax(),this._dirtyExtremes=!1),this._handleSizeDirty(),this._dirtySelectionExtremes&&!this._isPanning&&this.get("autoZoom",!0)){let i=this.chart,s=!1;if(i){let a=this.get("renderer").getPrivate("letter");a=="Y"?i.xAxes.each(o=>{o.className!="ValueAxis"&&(s=!0)}):a=="X"&&i.yAxes.each(o=>{o.className!="ValueAxis"&&(s=!0)})}s&&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()}_handleSizeDirty(){this._sizeDirty&&!this._dseHandled&&(this._dirtySelectionExtremes=!0,this._dseHandled=!0,(this.getPrivate("selectionMinFinal")!=this.getPrivate("selectionMin")||this.getPrivate("selectionMaxFinal")!=this.getPrivate("selectionMax"))&&(this._dirtySelectionExtremes=!1))}_clearDirty(){super._clearDirty(),this._dseHandled=!1}_groupData(){}_formatText(t){let e=this.get("numberFormat"),i=this.getNumberFormatter(),s="";return e?s=i.format(t,e):s=i.format(t,void 0,this.getPrivate("stepDecimalPlaces")),s}_prepareAxisItems(){let t=this.getPrivate("min"),e=this.getPrivate("max");if(v(t)&&v(e)){let i=this.get("logarithmic"),s=this.getPrivate("step"),a=this.getPrivate("selectionMin"),o=this.getPrivate("selectionMax")+s,r=a-s,n=1,l=t;if(i){if(r=this._minLogAdjusted,r<a)for(;r<a;)r+=s;if(l=r,l<=0){let b=this._minRealLog;v(b)||(b=1),l=Math.pow(10,Math.log(b)*Math.LOG10E),s<1&&(v(this._minRealLog)?l=this._minRealLog:l=Math.pow(10,-50))}n=Math.log(o-s)*Math.LOG10E-Math.log(l)*Math.LOG10E,n>2&&(r=Math.pow(10,Math.log(l)*Math.LOG10E-50))}let c=this.get("renderer"),h=c.get("minorLabelsEnabled"),u=c.get("minorGridEnabled",h),d=Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E)),f=Math.round(s/d),m=2;G(f/5,10)%1==0&&(m=5),G(f/10,10)%1==0&&(m=10);let g=s/m,p=0,_=0,x=-1/0,y=this.get("renderer").gridCount();for(;r<o;){let b;this.dataItems.length<p+1?(b=new K(this,void 0,{}),this._dataItems.push(b),this.processDataItem(b)):b=this.dataItems[p],this._createAssets(b,[]),this._toggleDataItem(b,!0),b.setRaw("value",r);let w=b.get("label");w&&w.set("text",this._formatText(r)),this._prepareDataItem(b);let M=r;if(!i)M+=s;else if(n>2){let P=Math.max(1,y),k=Math.max(1,Math.ceil(n/P)),I=Math.log(l)*Math.LOG10E+(p+1)*k-50;M=Math.pow(10,I)}else M+=s;if(u){let P=r+g;for(i&&(n>2&&(g=this._adjustMinMax(r,M,10).step),P=r+g);P<M-s*1e-11;){let k;this.minorDataItems.length<_+1?(k=new K(this,void 0,{}),this.minorDataItems.push(k),this.processDataItem(k)):k=this.minorDataItems[_],this._createAssets(k,["minor"],!0),this._toggleDataItem(k,!0),k.setRaw("value",P);let I=k.get("label");I&&(h?I.set("text",this._formatText(P)):I.setPrivate("visible",!1)),this._prepareDataItem(k),P+=g,_++}}if(r=M,x==r)break;let D=Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E));if(D<1&&!i){let P=Math.round(Math.abs(Math.log(Math.abs(D))*Math.LOG10E))+2;r=G(r,P)}p++,i&&n<=2&&r-s<s&&(r=s),x=r}for(let b=p;b<this.dataItems.length;b++)this._toggleDataItem(this.dataItems[b],!1);for(let b=_;b<this.minorDataItems.length;b++)this._toggleDataItem(this.minorDataItems[b],!1);T(this.series,b=>{b.inited&&b._markDirtyAxes()}),this._updateGhost()}}_prepareDataItem(t,e){let i=this.get("renderer"),s=t.get("value"),a=t.get("endValue"),o=this.valueToPosition(s),r=o,n=this.valueToPosition(s+this.getPrivate("step"));v(a)&&(r=this.valueToPosition(a),n=r),t.get("isRange")&&a==null&&(n=o);let l=r,c=t.get("labelEndValue");c!=null&&(l=this.valueToPosition(c)),i.updateLabel(t.get("label"),o,l,e);let h=t.get("grid");if(i.updateGrid(h,o,r),h&&(s==this.get("baseValue",0)?(h.addTag("base"),h._applyThemes()):h.hasTag("base")&&(h.removeTag("base"),h._applyThemes())),i.updateTick(t.get("tick"),o,l,e),i.updateFill(t.get("axisFill"),o,n),this._processBullet(t),i.updateBullet(t.get("bullet"),o,r),!t.get("isRange")){let u=this.get("fillRule");u&&u(t)}}_handleRangeChange(){let t=this.positionToValue(this.get("start",0)),e=this.positionToValue(this.get("end",1)),i=this.get("renderer").gridCount(),s=this._adjustMinMax(t,e,i,!0),a=We(s.step);this.setPrivateRaw("stepDecimalPlaces",a),t=G(t,a),e=G(e,a),s=this._adjustMinMax(t,e,i,!0);let o=s.step;t=s.min,e=s.max,(this.getPrivate("selectionMin")!==t||this.getPrivate("selectionMax")!==e||this.getPrivate("step")!==o)&&(this.setPrivateRaw("selectionMin",t),this.setPrivateRaw("selectionMax",e),this.setPrivateRaw("step",o))}positionToValue(t){let e=this.getPrivate("min"),i=this.getPrivate("max");return this.get("logarithmic")?Math.pow(Math.E,(t*(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)+Math.log(e)*Math.LOG10E)/Math.LOG10E):t*(i-e)+e}valueToPosition(t){let e=this.getPrivate("min"),i=this.getPrivate("max");if(this.get("logarithmic")){if(t<=0){let s=this.get("treatZeroAs");v(s)&&(t=s)}return(Math.log(t)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)}else return(t-e)/(i-e)}valueToFinalPosition(t){let e=this.getPrivate("minFinal"),i=this.getPrivate("maxFinal");if(this.get("logarithmic")){if(t<=0){let s=this.get("treatZeroAs");v(s)&&(t=s)}return(Math.log(t)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)}else return(t-e)/(i-e)}getX(t,e,i){t=i+(t-i)*e;let s=this.valueToPosition(t);return this._settings.renderer.positionToCoordinate(s)}getY(t,e,i){t=i+(t-i)*e;let s=this.valueToPosition(t);return this._settings.renderer.positionToCoordinate(s)}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionX(t,e,i,s){let a=t.get(e);if(t.get("stackToItemX")){let r=t.component;a=a*s+r.getStackedXValueWorking(t,e)}else a=this._baseValue+(a-this._baseValue)*s;return 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);if(t.get("stackToItemY")){let r=t.component;a=a*s+r.getStackedYValueWorking(t,e)}else a=this._baseValue+(a-this._baseValue)*s;return this.valueToPosition(a)}basePosition(){return this.valueToPosition(this.baseValue())}baseValue(){let t=Math.min(this.getPrivate("minFinal",-1/0),this.getPrivate("selectionMin",-1/0)),e=Math.max(this.getPrivate("maxFinal",1/0),this.getPrivate("selectionMax",1/0)),i=this.get("baseValue",0);return i<t&&(i=t),i>e&&(i=e),i}cellEndValue(t){return t}fixSmallStep(t){return 1+t===1?(t*=2,this.fixSmallStep(t)):t}_fixMin(t){return t}_fixMax(t){return t}_calculateTotals(){if(this.get("calculateTotals")){let t=this.series[0];if(t){let e=t.startIndex();if(t.dataItems.length>0){e>0&&e--;let i=t.endIndex();i<t.dataItems.length&&i++;let s,a;t.get("yAxis")==this?(s="valueY",a="vcy"):t.get("xAxis")==this&&(s="valueX",a="vcx");let o=s+"Working";if(s)for(let r=e;r<i;r++){let n=0,l=0;T(this.series,c=>{if(!c.get("excludeFromTotal")){let h=c.dataItems[r];if(h){let u=h.get(o)*c.get(a);at(u)||(n+=u,l+=Math.abs(u))}}}),T(this.series,c=>{if(!c.get("excludeFromTotal")){let h=c.dataItems[r];if(h){let u=h.get(o)*c.get(a);if(!at(u)){h.set(s+"Total",l),h.set(s+"Sum",n);let d=u/l*100;l==0&&(d=0),h.set(s+"TotalPercent",d)}}}})}}}}}_getSelectionMinMax(){let t=this.getPrivate("minFinal"),e=this.getPrivate("maxFinal"),i=this.get("min"),s=this.get("max"),a=this.get("extraMin",0),o=this.get("extraMax",0);this.get("logarithmic")&&(this.get("extraMin")==null&&(a=.1),this.get("extraMax")==null&&(o=.2));let r=this.get("renderer").gridCount(),n=this.get("strictMinMaxSelection"),l=this.get("strictMinMax");if(v(t)&&v(e)){let c=e,h=t;if(T(this.series,y=>{if(!y.get("ignoreMinMax")){let b,w,M=y.getPrivate("outOfSelection");if(y.get("xAxis")===this){if(!M){let D=y.getPrivate("minX"),P=y.getPrivate("maxX");(y.startIndex()!=0||y.endIndex()!=y.dataItems.length)&&(D=void 0,P=void 0),b=y.getPrivate("selectionMinX",D),w=y.getPrivate("selectionMaxX",P)}}else if(y.get("yAxis")===this&&!M){let D=y.getPrivate("minY"),P=y.getPrivate("maxY");(y.startIndex()!=0||y.endIndex()!=y.dataItems.length)&&(D=void 0,P=void 0),b=y.getPrivate("selectionMinY",D),w=y.getPrivate("selectionMaxY",P)}!y.isHidden()&&!y.isShowing()&&(v(b)&&(c=Math.min(c,b)),v(w)&&(h=Math.max(h,w)))}}),this.axisRanges.each(y=>{if(y.get("affectsMinMax")){let b=y.get("value");b!=null&&(c=Math.min(c,b),h=Math.max(h,b)),b=y.get("endValue"),b!=null&&(c=Math.min(c,b),h=Math.max(h,b))}}),c>h&&([c,h]=[h,c]),v(i)?l?c=i:c=t:l&&v(this._minReal)&&(c=this._minReal),v(s)?l?h=s:h=e:l&&v(this._maxReal)&&(h=this._maxReal),c===h){let y=c;if(c-=this._deltaMinMax,h+=this._deltaMinMax,c<t){let w=y-t;w==0&&(w=this._deltaMinMax),c=y-w,h=y+w,l=!0}let b=this._adjustMinMax(c,h,r,l);c=b.min,h=b.max}let u=c,d=h,f=h-c;c-=f*a,h+=f*o;let m=this._adjustMinMax(c,h,r);c=m.min,h=m.max,c=ot(c,t,e),h=ot(h,t,e),m=this._adjustMinMax(c,h,r,!0),l||(c=m.min,h=m.max);let g=this.get("syncWithAxis");if(g&&(m=this._syncAxes(c,h,m.step,g.getPrivate("selectionMinFinal",g.getPrivate("minFinal",0)),g.getPrivate("selectionMaxFinal",g.getPrivate("maxFinal",1)),g.getPrivate("selectionStepFinal",g.getPrivate("step",1))),m.min<t&&(m.min=t),m.max>e&&(m.max=e),c=m.min,h=m.max),l&&(v(i)&&(c=Math.max(c,i)),v(s)&&(h=Math.min(h,s))),n&&(c=u-(d-u)*a,h=d+(d-u)*o),l){v(i)?c=i:c=u,v(s)?h=s:h=d,h-c<=1e-8&&(c-=this._deltaMinMax,h+=this._deltaMinMax);let y=h-c;c-=y*a,h+=y*o}this.get("logarithmic")&&(c<=0&&(c=u*(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),_=G(this.valueToFinalPosition(c),p),x=G(this.valueToFinalPosition(h),p);this.setPrivateRaw("selectionMinFinal",c),this.setPrivateRaw("selectionMaxFinal",h),this.setPrivateRaw("selectionStepFinal",m.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),o=this.get("extraMax",0);this.get("logarithmic")&&(this.get("strictMinMax")||(this.get("extraMin")==null&&(a=.1),this.get("extraMax")==null&&(o=.2)));let r=1/0;if(T(this.series,x=>{if(!x.get("ignoreMinMax")){let y,b;if(x.get("xAxis")===this?(y=x.getPrivate("minX"),b=x.getPrivate("maxX")):x.get("yAxis")===this&&(y=x.getPrivate("minY"),b=x.getPrivate("maxY")),v(y)&&v(b)){i=Math.min(i,y),s=Math.max(s,b);let w=b-y;w<=0&&(w=Math.abs(b/100)),w<r&&(r=w)}}}),this.axisRanges.each(x=>{if(x.get("affectsMinMax")){let y=x.get("value");y!=null&&(i=Math.min(i,y),s=Math.max(s,y)),y=x.get("endValue"),y!=null&&(i=Math.min(i,y),s=Math.max(s,y))}}),this.get("logarithmic")){let x=this.get("treatZeroAs");v(x)&&i<=0&&(i=x),i<=0&&new Error("Logarithmic value axis can not have values <= 0.")}if(i===0&&s===0&&(s=.9,i=-.9),v(t)&&(i=t),v(e)&&(s=e),i===1/0||s===-1/0){this.setPrivate("minFinal",void 0),this.setPrivate("maxFinal",void 0);return}i>s&&([i,s]=[s,i]);let n=i,l=s,c=this.adapters.fold("min",i),h=this.adapters.fold("max",s);this._minRealLog=i,v(c)&&(i=c),v(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)*o,this.get("logarithmic")&&(i<0&&n>=0&&(i=0),s>0&&l<=0&&(s=0)),this._minReal=i,this._maxReal=s;let u=this.get("strictMinMax"),d=this.get("strictMinMaxSelection",!1);d&&(u=d);let f=u;v(e)&&(f=!0);let m=this.get("renderer").gridCount(),g=this._adjustMinMax(i,s,m,f);if(i=g.min,s=g.max,g=this._adjustMinMax(i,s,m,!0),i=g.min,s=g.max,u){v(t)?i=t:i=this._minReal,v(e)?s=e:s=this._maxReal,s-i<=1e-8&&(i-=this._deltaMinMax,s+=this._deltaMinMax);let x=s-i;i-=x*a,s+=x*o}c=this.adapters.fold("min",i),h=this.adapters.fold("max",s),v(c)&&(i=c),v(h)&&(s=h),r==1/0&&(r=s-i);let p=Math.round(Math.abs(Math.log(Math.abs(s-i))*Math.LOG10E))+5;i=G(i,p),s=G(s,p);let _=this.get("syncWithAxis");if(_&&(g=this._syncAxes(i,s,g.step,_.getPrivate("minFinal",_.getPrivate("min",0)),_.getPrivate("maxFinal",_.getPrivate("max",1)),_.getPrivate("step",1)),i=g.min,s=g.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=n*(1-Math.min(a,.99)))),v(i)&&v(s)&&(this.getPrivate("minFinal")!==i||this.getPrivate("maxFinal")!==s)){this.setPrivate("minFinal",i),this.setPrivate("maxFinal",s),this._saveMinMax(i,s);let x=this.get("interpolationDuration",0),y=this.get("interpolationEasing");this.animatePrivate({key:"min",to:i,duration:x,easing:y}),this.animatePrivate({key:"max",to:s,duration:x,easing:y})}}_fixZoomFactor(){}_getDelta(t){let e=Math.log(Math.abs(t))*Math.LOG10E,i=Math.pow(10,Math.floor(e));i=i/10,this._deltaMinMax=i}_saveMinMax(t,e){}_adjustMinMax(t,e,i,s){i<=1&&(i=1),i=Math.round(i);let a=t,o=e,r=e-t;r===0&&(r=Math.abs(e));let n=Math.log(Math.abs(r))*Math.LOG10E,l=Math.pow(10,Math.floor(n));l=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&&o<=0&&(e=0),n=Math.log(Math.abs(r))*Math.LOG10E,l=Math.pow(10,Math.floor(n)),l=l/100;let h=Math.ceil(r/i/l)*l,u=Math.pow(10,Math.floor(Math.log(Math.abs(h))*Math.LOG10E)),d=Math.ceil(h/u);d>5?d=10:d<=5&&d>2&&(d=5),h=Math.ceil(h/(u*d))*u*d;let f=this.get("maxPrecision");if(v(f)){let _=Ze(h,f);f<Number.MAX_VALUE&&h!==_&&(h=_,h==0&&(h=1))}let m=0;u<1&&(m=Math.round(Math.abs(Math.log(Math.abs(u))*Math.LOG10E))+1,h=G(h,m));let g=Math.floor(t/h);t=G(h*g,m);let p;return s?p=Math.floor(e/h):p=Math.ceil(e/h),p===g&&p++,e=G(h*p,m),e<o&&(e=e+h),t>a&&(t=t-h),h=this.fixSmallStep(h),{min:t,max:e,step:h}}getTooltipText(t,e){let i=this.get("tooltipNumberFormat",this.get("numberFormat")),s=this.getNumberFormatter(),a=this.get("extraTooltipPrecision",0),o=this.getPrivate("stepDecimalPlaces",0)+a,r=G(this.positionToValue(t),o);return i?s.format(r,i):s.format(r,void 0,o)}getSeriesItem(t,e){let i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),s=this.positionToValue(e),a,o;if(T(t.dataItems,(r,n)=>{let l=Math.abs(r.get(i)-s);(a===void 0||l<o)&&(a=n,o=l)}),a!=null)return t.dataItems[a]}zoomToValues(t,e,i){let s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",1));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,o){if(this.get("syncWithAxis")){let n=Math.round(a-s)/o,l=Math.round((e-t)/i),c=this.get("renderer").gridCount();if(v(n)&&v(l)){let h=!1,u=0,d=(e-t)*.01,f=t,m=e,g=i;for(;h!=!0;)if(h=this._checkSync(f,m,g,n),u++,u>500&&(h=!0),h)t=f,e=m,i=g;else{u/3==Math.round(u/3)?(f=t-d*u,t>=0&&f<0&&(f=0)):(m=e+d*u,m<=0&&m>0&&(m=0));let p=this._adjustMinMax(f,m,c,!0);f=p.min,m=p.max,g=p.step}}}return{min:t,max:e,step:i}}_checkSync(t,e,i,s){let a=(e-t)/i;for(let o=1;o<s;o++)if(G(a/o,1)==s||a*o==s)return!0;return!1}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return v(t)&&v(e)?this.getPrivate("step",1)/(t-e):.05}nextPosition(t){t==null&&(t=1),this.get("renderer").getPrivate("letter")=="Y"&&(t*=-1);let e=this.positionToValue(this.getPrivate("tooltipPosition",0));return e+=this.getPrivate("step",1)*t,e=ot(e,this.getPrivate("selectionMin",0),this.getPrivate("selectionMax",1)),this.toGlobalPosition(this.valueToPosition(e))}};et.className="ValueAxis";et.classNames=ht.classNames.concat([et.className]);var Dt=class A extends ht{constructor(){super(...arguments),this._frequency=1,this._itemMap={}}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["axis"]),this.fields.push("category","id","cellSize"),this.setPrivateRaw("name","category"),this.addTag("category"),super._afterNew()}_afterDataChange(){super._afterDataChange();let t=this.dataItems.length;t>0&&this.setPrivateRaw("maxZoomFactor",t),this.setPrivateRaw("startIndex",Math.min(this.getPrivate("startIndex",0),t)),this.setPrivateRaw("endIndex",Math.min(this.getPrivate("endIndex",t),1))}_prepareChildren(){super._prepareChildren();let t=this.dataItems.length,e=0;this._valuesDirty&&(this._itemMap={},T(this.dataItems,o=>{o.setRaw("index",e),this._itemMap[o.get("category")]=o,e++}),this.setPrivateRaw("maxZoomFactor",t));let i=this.get("start",0),s=this.get("end",1),a=this._getIndices(i,s);this.setPrivateRaw("startIndex",a.startIndex),this.setPrivateRaw("endIndex",a.endIndex),(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())}adjustZoom(){let t=this.dataItems.length;if(t>1){let e=this.get("maxZoomCount",this.dataItems.length),i=this.get("minZoomCount",1),s=0,a=this.getPrivate("startIndex",0),o=this.getPrivate("endIndex",0),r=this._sAnimation,n=this._eAnimation,l=this.get("start",0),c=!1;r&&!r.stopped&&(l=Number(r.to),c=!0);let h=this.get("end",1);if(n&&!n.stopped&&(h=Number(n.to),c=!0),c){let u=this._getIndices(l,h);a=u.startIndex,o=u.endIndex}for(let u=a;u<o;u++){let d=this.dataItems[u];s+=d.get("finalCellSize",1)}if(s<=i){let u=0;for(let d=a;d<t;d++){let f=this.dataItems[d];if(u+=f.get("finalCellSize",1),o=d+1,u>=i)break}if(u<i)for(let d=a-1;d>=0;d--){let f=this.dataItems[d];if(u+=f.get("finalCellSize",1),a=d,u>=i)break}this.zoomToIndexes(a,o)}else if(s>=e){let u=s;for(let d=o-1;d>=a;d--){let f=this.dataItems[d];if(u-=f.get("finalCellSize",1),u<=e){o=d+1;break}}this.zoomToIndexes(a,o)}}}_handleRangeChange(){T(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"),o=t.get("yAxis");if(a instanceof A&&o instanceof A)t._markDirtyAxes();else if(s===this){let r,n,l=o;if(a===s?(t.get("categoryXField")&&(r="categoryX"),t.get("openCategoryXField")&&(n="openCategoryX")):o===s&&(t.get("categoryYField")&&(r="categoryY"),t.get("openCategoryYField")&&(n="openCategoryY"),l=a),l instanceof et&&(r||n)){let u=function(g,p,_,x,y,b){let w,M=p.categoryToIndex(y);for(;!w&&M>=0&&M<p.dataItems.length;){let D=p.dataItems[M].get("category");if(b=="previous")for(let P=g.dataItems.length-1;P>=0;P--){let k=g.dataItems[P];if(_&&k.get(_)===D){w=k;break}if(x&&k.get(x)===D){w=k;break}}else for(let P=0,k=g.dataItems.length;P<k;P++){let I=g.dataItems[P];if(_&&I.get(_)===D){w=I;break}if(x&&I.get(x)===D){w=I;break}}w||(M+=b==="previous"?-1:1)}return w},c,h;c=u(t,this,r,n,e,"next"),h=u(t,this,r,n,i,"previous");let d=0,f=t.dataItems.length;c&&(d=t.dataItems.indexOf(c)),h&&(f=t.dataItems.indexOf(h)+1),t.setPrivate("startIndex",d),t.setPrivate("endIndex",f);let m=!1;for(let g=d;g<f;g++){let p=t.dataItems[g];if(T(t.__valueXShowFields,_=>{p.get(_)!=null&&(m=!0)}),T(t.__valueYShowFields,_=>{p.get(_)!=null&&(m=!0)}),m)break}t.setPrivate("outOfSelection",!m)}t._markDirtyAxes()}})}_prepareAxisItems(){var t;let e=this.get("renderer"),i=this.dataItems.length,s=this.startIndex();s>0&&s--;let a=this.endIndex();a<i&&a++;let o=e.get("minorLabelsEnabled"),r=e.get("minorGridEnabled",o),n=e.axisLength()/Math.max(e.get("minGridDistance"),1),l=Math.max(1,Math.min(i,Math.ceil((a-s)/n)));s=Math.floor(s/l)*l,this._frequency=l;for(let h=0;h<i;h++)this._toggleDataItem(this.dataItems[h],!1);let c=this.dataItems[s].get("index",0);for(let h=s;h<a;h=h+l){let u=this.dataItems[h];this._createAssets(u,[]),this._toggleDataItem(u,!0);let d=l;r&&(d=1),this._prepareDataItem(u,c,d),c++}if(e.get("minorGridEnabled"))for(let h=s;h<a;h++){let u=this.dataItems[h];h%l!=0&&(this._createAssets(u,["minor"],!0),this._toggleDataItem(u,!0),this._prepareDataItem(u,0,1),o||(t=u.get("label"))===null||t===void 0||t.setPrivate("visible",!1))}this._updateGhost()}_prepareDataItem(t,e,i){let s=this.get("renderer"),a=t.get("categoryLocation",0),o=t.get("endCategoryLocation",1),r=t.get("index");v(r)||(r=this.categoryToIndex(t.get("category")));let n=this.indexToPosition(r,a),l=t.get("endCategory"),c;l?(c=this.categoryToIndex(l),v(c)||(c=r)):c=r;let h=this.indexToPosition(c,o),u,d;if(t.get("isRange")){if(u=c,!v(r)){this._toggleDataItem(t,!1);return}}else u=r+this._frequency-1;d=this.indexToPosition(u,o),s.updateLabel(t.get("label"),n,h,i),s.updateGrid(t.get("grid"),n,h),s.updateTick(t.get("tick"),n,h,i),s.updateFill(t.get("axisFill"),n,d),this._processBullet(t),s.updateBullet(t.get("bullet"),n,h);let f=this.get("fillRule");f&&f(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){let a=t.get(e),o=this._itemMap[a];return o?this.indexToPosition(o.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){let a=t.get(e),o=this._itemMap[a];return o?this.indexToPosition(o.get("index",0),i):NaN}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}indexToPosition(t,e,i){let s=this.dataItems.length,a=0;if(s==0||(t>=s&&(t=s-1,e=1),v(e)||(e=.5),!v(t)))return 0;let o=this.get("startLocation",0),r=this.get("endLocation",1);if(!this.get("cellSizeField"))s-=o,s-=1-r,a=(t+e-o)/s;else{let n=i?"finalCellSize":"cellSize",l=this.dataItems,c=0;T(this.dataItems,d=>{c+=d.get(n,1)}),c-=o*l[0].get(n,1),c-=(1-r)*l[l.length-1].get(n,1);let h=0;for(let d=0;d<t;d++)h+=l[d].get(n,1);let u=l[t].get(n,1);a=(h+e*u-o*l[0].get(n,1))/c}if(!i){let n=this.dataItems[t];n&&(a+=n.get("deltaPosition",0))}return a}categoryToPosition(t){let e=this._itemMap[t];return e?this.indexToPosition(e.get("index")):NaN}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;if(e===0)return 0;if(this.get("cellSizeField")){let i=0,s=[];T(this.dataItems,l=>{let c=l.get("cellSize",1);s.push(c),i+=c});let a=this.get("startLocation",0),o=this.get("endLocation",1);i-=a,i-=1-o;let r=t*i+a,n=0;for(let l=0;l<e;l++){let c=s[l];if(r<n+c)return l;n+=c}return e-1}else return ot(Math.floor(t*e),0,e-1)}getTooltipText(t,e){let i=this.dataItems[this.axisPositionToIndex(t)];if(i){let s=i.get("label");if(s)return Ke(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],o=this.dataItems[s],r=o.get("category");if(a&&o&&a.get(i)===r)return a;for(let n=0,l=t.dataItems.length;n<l;n++){let c=t.dataItems[n];if(c.get(i)===r)return c}}}_getIndices(t,e){let i=this.dataItems.length,s=0,a=i,o="cellSize";if(this.get("cellSizeField")){let r=0,n=this.dataItems;if(n.length==0)return{startIndex:0,endIndex:0};T(n,c=>{r+=c.get(o,1)}),r-=this.get("startLocation",0)*n[0].get(o,1),r-=(1-this.get("endLocation",1))*n[n.length-1].get(o,1);let l=0;for(let c=0;c<i;c++)if(l+=this.dataItems[c].get(o,1),Math.round(l)>Math.round(t*r)){s=c;break}for(let c=s+1;c<i;c++)if(l+=this.dataItems[c].get(o,1),Math.round(l)>=Math.round(e*r)){a=c+1;break}s=Math.max(s,0),a=Math.min(a,i)}else s=Math.max(Math.round(this.get("start",0)*i),0),a=Math.min(Math.round(this.get("end",1)*i),i);return{startIndex:s,endIndex:a}}zoomToIndexes(t,e,i){let s=this.dataItems.length;this.get("cellSizeField")?(t=Math.min(Math.max(t,0),s),e=Math.max(Math.min(e,s),1),this.setPrivateRaw("startIndex",t),this.setPrivateRaw("endIndex",e),this.zoom(this.indexToPosition(t,0,!0),this.indexToPosition(e,0,!0),i)):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))}nextPosition(t){t==null&&(t=1),this.get("renderer").getPrivate("letter")=="Y"&&(t*=-1);let e=this.getPrivate("tooltipPosition",0),i=ot(this.axisPositionToIndex(e)+t,0,this.dataItems.length-1);return this.toGlobalPosition(this.indexToPosition(i))}};Dt.className="CategoryAxis";Dt.classNames=ht.classNames.concat([Dt.className]);var Wt=class extends Dt{constructor(){super(...arguments),this._frequency=1,this._itemMap={}}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["axis"]),this.fields.push("category"),super._afterNew()}_prepareAxisItems(){this.setPrivateRaw("baseInterval",this.get("baseInterval"));let t=this.get("renderer"),e=this.dataItems.length,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),o=Math.min(e,Math.ceil((s-i)/a));i=Math.floor(i/o)*o,this._frequency=o;for(let y=0;y<e;y++)this._toggleDataItem(this.dataItems[y],!1);let r=Number(this.dataItems[i].get("category")),n=Number(this.dataItems[s-1].get("category")),l=n-r;s-i<a&&(l=n-r-((n-r)/this.baseDuration()-(s-i))*this.baseDuration());let c=Ft(0,l,a,this.get("gridIntervals")),h=Ot(c.timeUnit),u=this.getPrivate("baseInterval");j(c)<this.baseDuration()&&(c=Object.assign({},u));let d=this.get("dateFormats"),f=-1/0,m=-1/0,g=-1/0,p,_=[],x=!1;for(let y=i;y<s;y++){let b=this.dataItems[y],w=b.get("index"),M=!1,D=Number(b.get("category")),P=new Date(D),k=ei(P,c.timeUnit);p=d[c.timeUnit];let I=!1;c.timeUnit!="year"&&c.timeUnit!="week"&&h&&this.get("markUnitChange")&&v(f)&&Ut(D,f,h,this._root.utc)&&(p=this.get("periodChangeDateFormats")[c.timeUnit],w-o*.5<m&&_.pop(),_.push({format:p,dataItem:b}),x=!0,I=!0,m=w,g=k);let C=!1;c.timeUnit==="day"||c.timeUnit==="week"?w-m>=o&&(C=!0):k%c.count===0&&k!=g&&(C=!0),!I&&C&&(w-o*.7<m&&x&&(M=!0),M||(_.push({format:p,dataItem:b}),m=w,g=k),x=!1),f=D}if(_.length>0){let y=_[0].dataItem.get("index",0);T(_,b=>{let w=b.dataItem,M=b.format;this._createAssets(w,[]),this._toggleDataItem(w,!0);let D=Number(w.get("category")),P=new Date(D),k=w.get("label");k&&k.set("text",this._root.dateFormatter.format(P,M)),y++,this._prepareDataItem(w,y,o)})}}baseDuration(){return j(this.getPrivate("baseInterval"))}getTooltipText(t,e){let i=this.dataItems[this.axisPositionToIndex(t)];if(i){let s=this.get("dateFormats")[this.getPrivate("baseInterval").timeUnit];return this._root.dateFormatter.format(new Date(i.get("category",0)),this.get("tooltipDateFormat",s))}}_updateTooltipText(t,e){t.label.set("text",this.getTooltipText(e))}};Wt.className="CategoryDateAxis";Wt.classNames=Dt.classNames.concat([Wt.className]);var Pt=class extends et{constructor(){super(...arguments),this._dataGrouped=!1,this._seriesDataGrouped=!1,this._groupingCalculated=!1,this._intervalDuration=1,this._baseDuration=1,this._intervalMax={},this._intervalMin={}}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["axis"]),super._afterNew(),this.addTag("date"),this._setBaseInterval(this.get("baseInterval")),this.on("baseInterval",()=>{this._setBaseInterval(this.get("baseInterval"))})}_setBaseInterval(t){this.setPrivateRaw("baseInterval",t),this._baseDuration=j(t)}_fixZoomFactor(){let t=this.get("maxZoomFactor");t!=null&&t!=1/0?this.setPrivateRaw("maxZoomFactor",t):this.setPrivateRaw("maxZoomFactor",Math.round((this.getPrivate("max",0)-this.getPrivate("min",0))/this.baseMainDuration()))}_groupData(){let t=this.getPrivate("min"),e=this.getPrivate("max");if(v(t)&&v(e)){this._fixZoomFactor();let i=this.getPrivate("groupInterval");if(i?this._setBaseInterval(i):this._setBaseInterval(this.get("baseInterval")),this.isDirty("groupInterval")){let s=this.get("groupInterval");s&&(this.setRaw("groupIntervals",[s]),this._handleRangeChange())}if(this.isDirty("groupData")&&!this._dataGrouped){if(this.get("groupData"))T(this.series,s=>{this._groupSeriesData(s)}),this._handleRangeChange();else{let s=this.get("baseInterval"),a=s.timeUnit+s.count;T(this.series,o=>{o.setDataSet(a),o.resetGrouping()}),this._setBaseInterval(s),this.setPrivateRaw("groupInterval",void 0),this.markDirtyExtremes()}this._dataGrouped=!0}}}_groupSeriesData(t){if(this.get("groupData")&&!t.get("groupDataDisabled")){this._dataGrouped=!0,this._seriesDataGrouped=!0;let e=[],i=this.baseMainDuration(),s=this.get("groupIntervals");T(s,d=>{j(d)>i&&e.push(d)}),t._dataSets={};let a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),o,r=t.get("baseAxis");t.get("xAxis")===r?o=t._valueYFields:t.get("yAxis")===r&&(o=t._valueXFields);let n=t._mainDataItems,l=this.get("baseInterval"),c=l.timeUnit+l.count;t._dataSets[c]=n;let h=t.get("groupDataCallback"),u=t.get("groupDataWithOriginals",!1);h&&(u=!0),T(e,d=>{let f=-1/0,m=d.timeUnit+d.count;t._dataSets[m]=[];let g,p={},_={},x={},y={};T(o,P=>{p[P]=0,_[P]=0,x[P]=t.get(P+"Grouped"),y[P]=P+"Working"});let b=Q(d.timeUnit),w=n[0],M;w&&(M=n[0].get(a));let D;T(n,P=>{let k=P.get(a),I=R(k,d.timeUnit,d.count,this._root,M),C;if(f<I-b/24)C=Ct(P.dataContext),g=new K(t,C,t._makeDataItem(C)),g.setRaw(a,I),t._dataSets[m].push(g),T(o,X=>{let S=P.get(X);v(S)?(g.setRaw(X,S),g.setRaw(y[X],S),_[X]=1,p[X]=S):(p[X]=0,_[X]=0)}),u&&g.set("originals",[P]),h&&D&&h(D,d),D=g;else{let X=!1;if(T(o,S=>{let tt=x[S],V=P.get(S);if(V!=null){X=!0;let q=g.get(S);switch(tt){case"close":g.setRaw(S,V);break;case"sum":g.setRaw(S,q+V);break;case"open":break;case"low":V<q&&g.setRaw(S,V);break;case"high":V>q&&g.setRaw(S,V);break;case"average":_[S]++,p[S]+=V;let F=p[S]/_[S];g.setRaw(S,F);break;case"extreme":Math.abs(V)>Math.abs(q)&&g.setRaw(S,V);break}g.setRaw(y[S],g.get(S))}}),X){let S=Ct(P.dataContext);S[a]=I,g.dataContext=S}u&&g.get("originals").push(P)}f=I}),h&&D&&h(D,d)}),t._dataSetId&&t.setDataSet(t._dataSetId),this.markDirtySize(),this._seriesAdded&&this._root.events.once("frameended",()=>{this.markDirtySize()})}}_clearDirty(){super._clearDirty(),this._groupingCalculated=!1,this._dataGrouped=!1}getGroupInterval(t){let e=this.get("baseInterval"),i=Ft(0,t,this.get("groupCount",1/0),this.get("groupIntervals"));return j(i)<j(e)&&(i=Object.assign({},e)),i}getIntervalMax(t){return this._intervalMax[t.timeUnit+t.count]}getIntervalMin(t){return this._intervalMin[t.timeUnit+t.count]}_handleRangeChange(){super._handleRangeChange();let t=Math.round(this.getPrivate("selectionMin")),e=Math.round(this.getPrivate("selectionMax"));if(v(t)&&v(e)){if(this.get("endLocation")==0&&(e+=1),this.get("groupData")&&!this._groupingCalculated){this._groupingCalculated=!0;let i=this.get("groupInterval"),s=this.getPrivate("groupInterval"),a=e-t+(this.get("startLocation",0)+(1-this.get("endLocation",1))*this._baseDuration);if(s){let o=j(s);a=Math.ceil(a/o)*o}if(i||(i=this.getGroupInterval(a)),i&&(!s||s.timeUnit!==i.timeUnit||s.count!==i.count||this._seriesDataGrouped)){this._seriesDataGrouped=!1,this.setPrivateRaw("groupInterval",i),this._setBaseInterval(i);let o=i.timeUnit+i.count;T(this.series,r=>{r.get("baseAxis")===this&&r.setDataSet(o)}),this.markDirtyExtremes(),this._root.events.once("frameended",()=>{this._root.events.once("frameended",()=>{let r="groupintervalchanged";this.events.isEnabled(r)&&this.events.dispatch(r,{type:r,target:this})})})}}T(this.series,i=>{if(i.get("baseAxis")===this){let s=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),o=Ge(i.dataItems,g=>ft(g.get(s),t)).index;o>0&&(o-=1),e+=this._baseDuration*(1-this.get("endLocation",1));let n=mt(i.dataItems,g=>ft(g.get(s),e)).index,l=n;l>1&&l--;let c=i.dataItems[o],h=i.dataItems[l],u,d;c&&(d=c.get(s)),h&&(u=h.get(s));let f=!1;u!=null&&d!=null&&(u<t||d>e)&&(f=!0),i.setPrivate("outOfSelection",f),i.setPrivate("startIndex",o);let m=i._adjustStartIndex(o);i.getPrivate("adjustedStartIndex")!==m&&(i.setPrivate("adjustedStartIndex",m),this.root.events.once("frameended",()=>{i._markDirtyPrivateKey("adjustedStartIndex")})),i.setPrivate("endIndex",n)}})}}_adjustMinMax(t,e,i,s){return{min:t,max:e,step:(e-t)/i}}intervalDuration(){return this._intervalDuration}_saveMinMax(t,e){let i=this.getPrivate("groupInterval");i||(i=this.get("baseInterval"));let s=i.timeUnit+i.count;this._intervalMin[s]=t,this._intervalMax[s]=e}_getM(t){return t=="day"||t=="month"||t=="year"?1.05:1.01}_getMinorInterval(t){var e;let i,s=t.count,a=t.timeUnit;return s>1&&(s==10||s==15?s=5:s==12?s=2:s==6?s=1:s==30?s=10:s<10&&(s=1),i={timeUnit:a,count:s}),a=="week"&&(((e=this.getPrivate("baseInterval"))===null||e===void 0?void 0:e.timeUnit)!="week"?i={timeUnit:"day",count:1}:i={timeUnit:"week",count:1}),a=="year"&&s==1&&this.getPrivate("selectionMax",0)-this.getPrivate("selectionMin",0)<4*366*24*60*60*1e3&&(i={timeUnit:"month",count:1}),i}_prepareAxisItems(){let t=this.getPrivate("min"),e=this.getPrivate("max");if(v(t)&&v(e)){let i=this._root,s=Math.round(this.getPrivate("selectionMin")),a=Math.round(this.getPrivate("selectionMax")),o=this.get("renderer"),r=this.getPrivate("baseInterval"),n=s,l=0,c=this.get("gridIntervals"),h=Ft(0,a-s,o.gridCount(),c);j(h)<this._baseDuration&&(h=Object.assign({},r));let u=j(h);this._intervalDuration=u;let d=Ot(h.timeUnit),f=i.utc,m=i.timezone;n=R(s-u,h.timeUnit,h.count,i,t);let g=n-u,p,_=this.get("dateFormats");this.setPrivateRaw("gridInterval",h);let x=o.get("minorLabelsEnabled"),y=o.get("minorGridEnabled",x),b,w=0;y&&(b=this._getMinorInterval(h),w=j(b));let M=0;for(;n<a+u;){let D;this.dataItems.length<l+1?(D=new K(this,void 0,{}),this._dataItems.push(D),this.processDataItem(D)):D=this.dataItems[l],this._createAssets(D,[]),this._toggleDataItem(D,!0),D.setRaw("value",n),D.setRaw("labelEndValue",void 0);let P=n+Q(h.timeUnit,h.count*this._getM(h.timeUnit));P=R(P,h.timeUnit,1,i),D.setRaw("endValue",P);let k=new Date(n);p=_[h.timeUnit],d&&this.get("markUnitChange")&&v(g)&&h.timeUnit!="year"&&Ut(n,g,d,f,m)&&(p=this.get("periodChangeDateFormats")[h.timeUnit]);let I=D.get("label");I&&I.set("text",i.dateFormatter.format(k,p));let C=h.count;if(h.timeUnit=="week"?I?.set("location",this.get("weekLabelLocation",0)):I?.set("location",o.labels.template.get("location")),y){C=1;let X=h.timeUnit;X=="week"&&this.get("skipFirstMinor")&&(X="day");let S=n+Q(X,this._getM(X));S=R(S,X,1,i),D.setRaw("labelEndValue",S)}if(this._prepareDataItem(D,C),g=n,n=P,b){let X=b.timeUnit,S=b.count,tt=this._getM(X);this.get("skipFirstMinor")||(g-=w*tt);let V=R(g+w*tt,X,S,i,g),q,F=this.get("minorDateFormats",this.get("dateFormats"));for(;V<n-.01*w;){let N;this.minorDataItems.length<M+1?(N=new K(this,void 0,{}),this.minorDataItems.push(N),this.processDataItem(N)):N=this.minorDataItems[M],this._createAssets(N,["minor"],!0),this._toggleDataItem(N,!0),N.setRaw("value",V);let L=V+Q(X,S*tt);L=R(L,X,1,i),N.setRaw("endValue",L);let xt=new Date(V);p=F[X];let _t=N.get("label");if(_t&&(x?_t.set("text",i.dateFormatter.format(xt,p)):_t.setPrivate("visible",!1)),this._prepareDataItem(N,1),V==q)break;if(!N.get("isRange")){let it=this.get("fillRule");it&&it(N)}q=V,V=L,M++}}if(n==g)break;l++}for(let D=l;D<this.dataItems.length;D++)this._toggleDataItem(this.dataItems[D],!1);for(let D=M;D<this.minorDataItems.length;D++)this._toggleDataItem(this.minorDataItems[D],!1);T(this.series,D=>{D.inited&&D._markDirtyAxes()})}this._updateGhost()}_updateFinals(t,e){this.setPrivateRaw("selectionMinFinal",this.positionToValue(t)),this.setPrivateRaw("selectionMaxFinal",this.positionToValue(e))}_getDelta(){this._deltaMinMax=this._baseDuration/2}_fixMin(t){let e=this.getPrivate("baseInterval"),i=e.timeUnit,s=R(t,i,e.count,this._root),a=s+Q(i,e.count*this._getM(i));return a=R(a,i,1,this._root),s+(a-s)*this.get("startLocation",0)}_fixMax(t){let e=this.getPrivate("baseInterval"),i=e.timeUnit,s=R(t,i,e.count,this._root),a=s+Q(i,e.count*this._getM(i));return a=R(a,i,1,this._root),s+(a-s)*this.get("endLocation",1)}_updateDates(t,e){}_handleSeriesRemoved(){this.setPrivate("baseInterval",this.get("baseInterval")),this.setPrivate("min",void 0),this.setPrivate("minFinal",void 0)}baseDuration(){return this._baseDuration}baseMainDuration(){return j(this.get("baseInterval"))}processSeriesDataItem(t,e){let i=this.getPrivate("baseInterval");t.open||(t.open={}),t.close||(t.close={}),T(e,s=>{let a=t.get(s);if(v(a)){let o=t.open[s],r=t.close[s];if(!(a>=o&&a<=r)){let n=i.timeUnit,l=i.count;o=R(a,n,l,this._root),r=o+Q(n,l*this._getM(n)),r=R(r,n,1,this._root),t.open[s]=o,t.close[s]=r}this._updateDates(o,t.component)}})}_handleSizeDirty(){}getDataItemPositionX(t,e,i,s,a){let o,r,n;return a?n=t.get(e):(t.open&&t.close?(o=t.open[e],r=t.close[e]):(o=t.get(e),r=o),n=o+(r-o)*i,n=this._baseValue+(n-this._baseValue)*s),this.valueToPosition(n)}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionY(t,e,i,s,a){let o,r,n;return a?n=t.get(e):(t.open&&t.close?(o=t.open[e],r=t.close[e]):(o=t.get(e),r=o),n=o+(r-o)*i,n=this._baseValue+(n-this._baseValue)*s),this.valueToPosition(n)}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}roundAxisPosition(t,e){let i=this.positionToValue(t);i=i-(e-.5)*this._baseDuration;let s=this.getPrivate("baseInterval");if(!at(i)){let a=this._root.locale.firstDayOfWeek,o=s.timeUnit,r=this._root.utc,n=this._root.timezone,l=s.count;i=R(i,o,l,this._root,this.getPrivate("min",0));let c=de(s,new Date(i),a,r,n);return n&&(i=R(i+this._baseDuration*.05,o,l,this._root,this.getPrivate("min",0)),c=de(s,new Date(i+c*e),a,r,n)),this.valueToPosition(i+c*e)}return NaN}getTooltipText(t,e){if(this.getPrivate("min")!=null){let i=this.get("tooltipDateFormats")[this.getPrivate("baseInterval").timeUnit],s=this.positionToValue(t);if(v(s)){let a=new Date(s),o=this.getPrivate("baseInterval"),r=de(o,a,this._root.locale.firstDayOfWeek,this._root.utc,this._root.timezone);return e!==!1&&(a=new Date(s+this.get("tooltipIntervalOffset",-this.get("tooltipLocation",.5))*r)),this._root.dateFormatter.format(a,this.get("tooltipDateFormat",i))}}return""}getSeriesItem(t,e,i,s){let a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),o=this.positionToValue(e);i==null&&(i=.5),o=o-(i-.5)*this._baseDuration;let r=mt(t.dataItems,n=>{let l=0;return n.open&&(l=n.open[a]),ft(l,o)});if(s||t.get("snapTooltip")){let n=t.dataItems[r.index-1],l=t.dataItems[r.index];if(n&&l&&n.open&&l.close){let c=n.open[a],h=l.close[a];if(Math.abs(o-c)>Math.abs(o-h))return l}if(n)return n;if(l)return l}else{let n=t.dataItems[r.index-1];if(n&&n.open&&n.close){let l=n.open[a],c=n.close[a];if(o>=l&&o<=c)return n}}}shouldGap(t,e,i,s){let a=t.get(s);return e.get(s)-a>this._baseDuration*i}zoomToDates(t,e,i){this.zoomToValues(t.getTime(),e.getTime(),i)}zoomToValues(t,e,i){let s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",0));if(this.getPrivate("min")!=null&&this.getPrivate("max")!=null)if(this.get("groupData")){let o=this.getGroupInterval(e-t),r=this.get("baseInterval"),n=this.getIntervalMin(r),l=this.getIntervalMax(r)-1;l=R(l,o.timeUnit,o.count,this.root),l+=this._getM(o.timeUnit)*j(o),l=R(l,o.timeUnit,o.count,this.root);let c=R(n,o.timeUnit,o.count,this.root),h=R(l,o.timeUnit,o.count,this.root),u=(t-c)/(h-c),d=(e-c)/(h-c);this.zoom(u,d,i)}else this.zoom((t-s)/(a-s),(e-s)/(a-s),i)}positionToDate(t){return new Date(this.positionToValue(t))}dateToPosition(t){return this.valueToPosition(t.getTime())}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return v(t)&&v(e)?this._intervalDuration/(t-e):.05}nextPosition(t){t==null&&(t=1);let e=this.get("tooltipLocation",.5)*this._baseDuration;this.get("renderer").getPrivate("letter")=="Y"&&(t*=-1);let i=this.positionToValue(this.getPrivate("tooltipPosition",0)),s=this.getPrivate("baseInterval"),a=this._nextTime(i,t,s),o=this.getPrivate("selectionMin",0),r=this.getPrivate("selectionMax",0),n=R(o,s.timeUnit,s.count,this._root),l=R(r,s.timeUnit,s.count,this._root);return a+=e,a=ot(a,n+e,l-e),this.toGlobalPosition(this.valueToPosition(a))}_nextTime(t,e,i){return R(t+e*this._baseDuration,i.timeUnit,i.count,this._root)}};Pt.className="DateAxis";Pt.classNames=et.classNames.concat([Pt.className]);var Ht=class extends Pt{constructor(){super(...arguments),this._frequency=1,this._m=0,this._dates=[]}_afterNew(){this.valueFields.push("date"),this.addTag("gapless"),super._afterNew()}_getDates(){return this._customDates?this._customDates:this._dates}_updateDates(t,e){if(!e.get("ignoreMinMax")){let i=this._getDates(),s=mt(i,a=>ft(a,t));s.found||Ve(i,s.index,t)}}_updateAllDates(){if(!this._customDates){let t=new Set;T(this.series,l=>{if(l.get("ignoreMinMax"))return;let c="valueX";l.get("yAxis")==this&&(c="valueY"),T(l.dataItems,h=>{let u=h.get(c);v(u)&&h.open&&t.add(h.open[c])})}),this._dates=Array.from(t).sort((l,c)=>l-c);let e=this._dates,i=this.get("extraMax",0),s=this.get("extraMin",0),a=e.length,o=this.getPrivate("baseInterval"),r=o.count,n=o.timeUnit;if(i>0){let l=a*i,c=e[a-1];if(v(c))for(let h=a-1;h<a+l;h++)c+=Q(n,r*this._getM(n)),c=R(c,n,r,this._root),e.push(c)}if(s>0){let l=a*s,c=e[0];if(v(c)){let h=[];for(let u=0;u<l;u++)c-=Q(n,r),c=R(c,n,r,this._root),h.push(c);h.reverse(),e.unshift(...h)}}}}valueToPosition(t){let e=this._getDates(),i=this.get("startLocation",0),s=this.get("endLocation",1),a=e.length-i-(1-s),o=mt(e,n=>ft(n,t)),r=o.index;if(o.found)return(r-i)/a;{r>0&&(r-=1);let n=e[r],l=e[r+1];if(l){let h=l;Math.abs(h-t)<Math.abs(n-t)&&(n=h,r++)}let c=t-n;return(r-i)/a+c/this._baseDuration/a}}valueToIndex(t){let e=this._getDates(),i=mt(e,a=>ft(a,t)),s=i.index;return i.found||s>0&&(s-=1),s}positionToValue(t){let e=this.get("startLocation",0),i=this.get("endLocation",1),s=this._getDates(),a=Math.round(s.length-e-(1-i)),o=t*a,r=Math.floor(o);return r<0&&(r=0),r>a-1&&(r=a-1),s[r]+(o-r+e)*this._baseDuration}_fixZoomFactor(){this.setPrivateRaw("maxZoomFactor",this._getDates().length-this.get("startLocation",0)-(1-this.get("endLocation",1)))}zoomToDates(t,e,i){let s=this._getDates(),a=s.length,o=mt(s,l=>ft(l,t.getTime())),r=s[Math.min(o.index,a-1)];o=mt(s,l=>ft(l,e.getTime()));let n=s[o.index];o.index>=a&&(n=s[a-1]+this._baseDuration),this.zoomToValues(r,n,i)}zoomToValues(t,e,i){let s=this.getPrivate("min",0),a=this.getPrivate("max",0);t=ot(t,s,a),e=ot(e,s,a),this.zoom(this.valueToPosition(t),this.valueToPosition(e),i)}_prepareAxisItems(){let t=this.getPrivate("selectionMin",0),e=this.getPrivate("selectionMax",0);if(v(t)&&v(e)){this._seriesValuesDirty&&(this._seriesValuesDirty=!1,this._updateAllDates());let i=this._root,s=i.utc,a=i.timezone,o=this._getDates(),r=this.get("renderer"),n=o.length,l=this._baseDuration,c=this.valueToIndex(t);c>0&&c--;let h=this.valueToIndex(e);h<n-1&&h++;let u=r.axisLength()/Math.max(r.get("minGridDistance"),1/Number.MAX_SAFE_INTEGER),d=Math.min(n,Math.ceil((h-c)/u));d=Math.max(1,d),c=Math.floor(c/d)*d,this._frequency=d,T(this.dataItems,C=>{this._toggleDataItem(C,!1)}),T(this.minorDataItems,C=>{this._toggleDataItem(C,!1)});let f=e-t-((e-t)/l-(h-c))*l,m=Ft(0,f,u,this.get("gridIntervals")),g=this.getPrivate("baseInterval"),p=j(m);p<l&&(m=Object.assign({},g),p=j(m)),this.setPrivateRaw("gridInterval",m),this._intervalDuration=p;let _=m.timeUnit,x=this.get("dateFormats"),y=Date.now();o[0]&&(y=o[0]);let b=R(this.getPrivate("selectionMin",0),_,m.count,i,y),w=r.get("minorLabelsEnabled"),M=r.get("minorGridEnabled",w),D,P=0,k;M&&(D=this._getMinorInterval(m),P=j(D));let I=this._getIndexes(b,this.getPrivate("selectionMax",b)+p,m,this.getPrivate("min",b));if(I.length>0){let C=0;this._m=0;let X=b-p*10,S=Ot(_);if(D){let V=o[I[0]];this._addMinorGrid(V-p,V,P,D)}let tt=r.axisLength()/r.gridCount()*.5;T(I,V=>{var q;let F;this.dataItems.length<C+1?(F=new K(this,void 0,{}),this._dataItems.push(F),this.processDataItem(F)):F=this.dataItems[C];let N=o[V],L=new Date(N),xt=N;C<I.length-1?xt=o[I[C+1]]:xt+=p,F.setRaw("value",N),F.setRaw("endValue",xt),F.setRaw("index",C),F.setRaw("labelEndValue",void 0);let _t=x[_];S&&this.get("markUnitChange")&&v(X)&&_!="year"&&Ut(N,X,S,s,a)&&(_t=this.get("periodChangeDateFormats")[_]),this._createAssets(F,[]);let it=F.get("label");it&&it.set("text",i.dateFormatter.format(L,_t)),this._toggleDataItem(F,!0);let Mt=m.count;if(_=="week"&&F.setRaw("labelEndValue",N),M){let st=m.timeUnit;if(st=="week"&&(st="day"),Mt>1||m.timeUnit=="week"){let W=R(N,st,1,i)+Q(st,this._getM(st)),dt=this.valueToIndex(W);if(W=o[dt],W==N){let yt=o[dt+1];yt?W=yt:W+=P}F.setRaw("labelEndValue",W)}Mt=1}if(this._prepareDataItem(F,Mt),it&&k&&r.getPrivate("letter")=="X"){let st=k.get("label");if(st){let W=it.x(),dt=st.x();if(W-dt<tt){let yt=this._pickWorse(k,F,m);yt&&((q=yt.get("label"))===null||q===void 0||q.setPrivate("visible",!1))}}}D&&this._addMinorGrid(N,xt,P,D),C++,it&&it.getPrivate("visible")&&(k=F),X=N})}T(this.series,C=>{C.inited&&C._markDirtyAxes()})}this._updateGhost()}_pickWorse(t,e,i){let s=i.timeUnit,a=t.get("value",0),o=e.get("value",0);return s=="hour"&&new Date(a).getDate()!=new Date(o).getDate()?t:e}_addMinorGrid(t,e,i,s){let a=this.get("minorDateFormats",this.get("dateFormats")),o=s.timeUnit,r=t+Q(o,this._getM(o));r=R(r,o,1,this._root);let n=e-i*.5,l=this._getIndexes(r,n,s,r),c=this._getDates();T(l,h=>{let u;this.minorDataItems.length<this._m+1?(u=new K(this,void 0,{}),this.minorDataItems.push(u),this.processDataItem(u)):u=this.minorDataItems[this._m],r=c[h],u.setRaw("value",r),u.setRaw("endValue",r+i),u.setRaw("index",h),this._createAssets(u,["minor"],!0);let d=u.get("label");if(d)if(this.get("renderer").get("minorLabelsEnabled")){let f=new Date(r),m=a[o];d.set("text",this._root.dateFormatter.format(f,m))}else d.setPrivate("visible",!1);this._toggleDataItem(u,!0),this._prepareDataItem(u,1),this._m++})}_getIndexes(t,e,i,s){let a=[],o=i.timeUnit,r=i.count,n=this._getM(o),l=this.getPrivate("baseInterval"),c=this._root,h=this._getDates(),u=r-1,d=-1/0,f=Q(o,n),m=Q(o,r*n),g=t;for(o=="day"&&(t=s);t<=e;){t=R(t,o,r,c);let p=this.valueToIndex(t),_=h[p];if(o=="day"&&l.timeUnit=="day")this._hasDate(t)&&u++,u==r&&(t>=g-m*2&&Vt(a,p),u=0),t+=f,t=R(t,o,1,c);else{if(_<t){for(let x=p,y=h.length;x<y;x++)if(_=h[x],_>=t){p=x;break}}Vt(a,p),t+=m,t=R(t,o,r,c)}if(t==d&&(t+=m+f,t=R(t,o,r,c)),t==d)break;d=t}return a}_hasDate(t){return mt(this._getDates(),i=>re(i,t)).found}_nextTime(t,e,i){let s=ot(this.valueToIndex(t)+e,0,this._dates.length-1);return this._dates[s]}};Ht.className="GaplessDateAxis";Ht.classNames=Pt.classNames.concat([Ht.className]);var jt=class extends et{constructor(){super(...arguments),this._dataGrouped=!1,this._groupingCalculated=!1,this._intervalDuration=1}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["axis"]),super._afterNew()}_adjustMinMax(t,e,i,s){let a,o=this.getDurationFormatter(),r=this.get("baseUnit");if(this.setRaw("maxPrecision",0),r=="millisecond"||r=="second"||r=="minute"||r=="hour"){i<=1&&(i=1),i=Math.round(i);let n=e-t;n===0&&(n=Math.abs(e));let l=n/i,c=[60,30,20,15,10,2,1],h=1;r=="hour"&&(c=[24,12,6,4,2,1]);for(let p of c)if(n/p>i){h=p;break}let u=Math.ceil((e-t)/h/i),d=Math.log(Math.abs(u))*Math.LOG10E,f=Math.pow(10,Math.floor(d))/10,m=u/f;u=qe(c,m)*f,l=h*u,t=Math.floor(t/l)*l,e=Math.ceil(e/l)*l,a={min:t,max:e,step:l}}else a=super._adjustMinMax(t,e,i,s);return this.setPrivateRaw("durationFormat",o.getFormat(a.step,a.max,r)),a}_formatText(t){return this.getDurationFormatter().format(t,this.getPrivate("durationFormat"),this.get("baseUnit"))}getTooltipText(t,e){let i=this.getDurationFormatter(),s=this.get("extraTooltipPrecision",0),a=this.getPrivate("stepDecimalPlaces",0)+s,o=G(this.positionToValue(t),a);return i.format(o,this.getPrivate("durationFormat"),this.get("baseUnit"))}};jt.className="DurationAxis";jt.classNames=et.classNames.concat([jt.className]);var Zt=class extends ye{_beforeChanged(){super._beforeChanged();let t=this.get("sprite");if(this.isDirty("sprite")&&t&&(t.setAll({position:"absolute",role:"figure"}),this._disposers.push(t)),this.isDirty("location")){let e=t.dataItem;this.axis&&t&&e&&this.axis._prepareDataItem(e)}}_dispose(){let t=this.axis;t&&vt(t._bullets,(e,i)=>{i.uid==this.uid&&delete t._bullets[e]}),super._dispose()}};Zt.className="AxisBullet";Zt.classNames=ye.classNames.concat([Zt.className]);var St=class extends be{constructor(){super(...arguments),this._tickPoints=[]}};St.className="AxisLabel";St.classNames=be.classNames.concat([St.className]);var qt=class extends Te{constructor(){super(...arguments),this._tickPoints=[]}};qt.className="AxisLabelRadial";qt.classNames=Te.classNames.concat([qt.className]);var Xt=class extends Ie{constructor(){super(...arguments),this._tickPoints=[]}};Xt.className="AxisTick";Xt.classNames=Ie.classNames.concat([Xt.className]);var Kt=class extends Pe{constructor(){super(...arguments),this._tickPoints=[]}};Kt.className="EditableAxisLabel";Kt.classNames=Pe.classNames.concat([Kt.className]);var ct=class extends E{constructor(){super(...arguments),this._axisLength=100,this._start=0,this._end=1,this._inversed=!1,this._minSize=0,this._lc=1,this._ls=0,this.ticks=this.addDisposer(new H(z.new({}),()=>Xt._new(this._root,{themeTags:Y(this.ticks.template.get("themeTags",[]),this.get("themeTags",[]))},[this.ticks.template]))),this.grid=this.addDisposer(new H(z.new({}),()=>gt._new(this._root,{themeTags:Y(this.grid.template.get("themeTags",[]),this.get("themeTags",[]))},[this.grid.template]))),this.axisFills=this.addDisposer(new H(z.new({}),()=>E._new(this._root,{themeTags:Y(this.axisFills.template.get("themeTags",["axis","fill"]),this.get("themeTags",[]))},[this.axisFills.template]))),this.labels=this.addDisposer(new H(z.new({}),()=>St._new(this._root,{themeTags:Y(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template])))}makeTick(t,e){let i=this.ticks.make();return i._setDataItem(t),t.setRaw("tick",i),i.set("themeTags",Y(i.get("themeTags"),e)),this.axis.labelsContainer.children.push(i),this.ticks.push(i),i}makeGrid(t,e){let i=this.grid.make();return i._setDataItem(t),t.setRaw("grid",i),i.set("themeTags",Y(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),this.grid.push(i),i}makeAxisFill(t,e){let i=this.axisFills.make();return i._setDataItem(t),i.set("themeTags",Y(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),t.setRaw("axisFill",i),this.axisFills.push(i),i}makeLabel(t,e){let i=this.labels.make();return i.set("themeTags",Y(i.get("themeTags"),e)),t.get("isRange")?this.axis.labelsContainer.children.push(i):this.axis.labelsContainer.children.moveValue(i,0),i._setDataItem(t),t.setRaw("label",i),this.labels.push(i),i}axisLength(){return 0}gridCount(){return this.axisLength()/this.get("minGridDistance",50)}_updatePositions(){}_afterNew(){super._afterNew(),this.set("isMeasured",!1);let 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)})))}_beforeChanged(){super._beforeChanged(),this.isDirty("minGridDistance")&&this.root.events.once("frameended",()=>{this.axis.markDirtySize()})}_changed(){if(super._changed(),this.isDirty("pan")){let t=this.thumb;if(t){let e=this.axis.labelsContainer,i=this.get("pan");i=="zoom"?e.children.push(t):i=="none"&&e.children.removeValue(t)}}}_handleThumbDown(t){this._thumbDownPoint=this.toLocal(t.point);let e=this.axis;this._downStart=e.get("start"),this._downEnd=e.get("end")}_handleThumbUp(t){this._thumbDownPoint=void 0}_handleThumbMove(t){let e=this._thumbDownPoint;if(e){let i=this.toLocal(t.point),s=this._downStart,a=this._downEnd,o=this._getPan(i,e)*Math.min(1,a-s)/2*this.get("panSensitivity",1);this.axis.zoom(s-o,a+o,0)}}_getPan(t,e){return 0}positionToCoordinate(t){return this._inversed?(this._end-t)*this._axisLength:(t-this._start)*this._axisLength}updateTooltipBounds(t){}_updateSize(){this.markDirty(),this._clear=!0}toAxisPosition(t){let e=this._start||0,i=this._end||1;return t=t*(i-e),this.get("inversed")?t=i-t:t=e+t,t}toGlobalPosition(t){let e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t=t-e,t=t/(i-e),t}fixPosition(t){return this.get("inversed")?1-t:t}_updateLC(){}toggleVisibility(t,e,i,s){let a=this.axis,o=a.get("start",0),r=a.get("end",1),n=o+(r-o)*(i-1e-4),l=o+(r-o)*(s+1e-4);e<n||e>l?t.setPrivate("visible",!1):t.setPrivate("visible",!0)}_positionTooltip(t,e){let i=this.chart;i&&(t.set("pointTo",this._display.toGlobal(e)),i.inPlot(e)||t.hide())}processAxis(){}};ct.className="AxisRenderer";ct.classNames=E.classNames.concat([ct.className]);var Jt=class extends ct{constructor(){super(...arguments),this.thumb=pt.new(this._root,{width:$,isMeasured:!1,themeTags:["axis","x","thumb","zoomgrip"]})}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["renderer","x"]),super._afterNew(),this.setPrivateRaw("letter","X");let t=this.grid.template;t.set("height",$),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(){var t;super._changed();let e=this.axis,i=e.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("x",-1e3));let s="opposite",a="inside";if(this.isDirty(s)||this.isDirty(a)){let o=this.chart,r=e.children;if(this.get(a)?e.addTag(a):e.removeTag(a),o){if(this.get(s)){let n=o.topAxesContainer.children;n.indexOf(e)==-1&&n.insertIndex(0,e),e.addTag(s),r.moveValue(this)}else{let n=o.bottomAxesContainer.children;n.indexOf(e)==-1&&n.moveValue(e),e.removeTag(s),r.moveValue(this,0)}(t=e.ghostLabel)===null||t===void 0||t._applyThemes(),this.labels.each(n=>{n._applyThemes()}),this.root._markDirtyRedraw()}e.markDirtySize()}this.thumb.setPrivate("height",e.labelsContainer.height())}_getPan(t,e){return(e.x-t.x)/this.width()}toAxisPosition(t){let e=this._start||0,i=this._end||1;return t-=this._ls,t=t*(i-e)/this._lc,this.get("inversed")?t=i-t:t=e+t,t}toGlobalPosition(t){let e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t=t-e,t=t/(i-e)*this._lc,t+=this._ls,t}_updateLC(){let t=this.axis,e=t.parent;if(e){let i=e.innerWidth();this._lc=this.axisLength()/i,this._ls=(t.x()-e.get("paddingLeft",0))/i}}_updatePositions(){let t=this.axis,e=t.x()-Lt(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());let i=t.chart;if(i){let s=i.plotContainer,a=t.axisHeader,o=t.get("marginLeft",0),r=t.x()-o,n=t.parent;n&&(r-=n.get("paddingLeft",0)),a.children.length>0?(o=t.axisHeader.width(),t.set("marginLeft",o+1)):a.set("width",o),a.setAll({x:r,y:-1,height:s.height()+2})}}processAxis(){super.processAxis();let t=this.axis;t.get("width")==null&&t.set("width",$);let e=this._root.verticalLayout;t.set("layout",e),t.labelsContainer.set("width",$),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){v(e)||(e=0);let a=.5;v(s)&&s>1?a=t.get("multiLocation",a):a=t.get("location",a),v(i)&&i!=e&&(e=e+(i-e)*a),t.set("x",this.positionToCoordinate(e));let o=t.get("length",0),r=t.get("inside",this.get("inside",!1));this.get("opposite")?(t.set("y",$),r||(o*=-1)):(t.set("y",0),r&&(o*=-1)),t.set("draw",n=>{n.moveTo(0,0),n.lineTo(0,o)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateLabel(t,e,i,s){if(t){let a=.5;v(s)&&s>1?a=t.get("multiLocation",a):a=t.get("location",a),v(e)||(e=0);let o=t.get("inside",this.get("inside",!1));this.get("opposite")?o?(t.set("position","absolute"),t.set("y",0)):(t.set("position","relative"),t.set("y",$)):o?(t.set("y",0),t.set("position","absolute")):(t.set("y",void 0),t.set("position","relative")),v(i)&&i!=e&&(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){v(e)||(e=0);let s=t.get("location",.5);v(i)&&i!=e&&(e=e+(i-e)*s),t.set("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateBullet(t,e,i){if(t){let s=t.get("sprite");if(s){v(e)||(e=0);let a=t.get("location",.5);v(i)&&i!=e&&(e=e+(i-e)*a);let o=this.axis.roundAxisPosition(e,a),r=this.axis._bullets[o],n=-1;if(this.get("opposite")&&(n=1),t.get("stacked"))if(r){let l=r.get("sprite");l&&s.set("y",l.y()+l.height()*n)}else s.set("y",0);this.axis._bullets[o]=t,s.set("x",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){v(e)||(e=0),v(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=>{let a=this.axis.gridContainer.height(),o=this.width();i<e&&([i,e]=[e,i]),!(e>o||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){let e=this.get("inside"),i=1e5,s=this._display.toGlobal({x:0,y:0}),a=s.x,o=0,r=this.axisLength(),n=i,l="up";this.get("opposite")?e?(l="up",o=s.y,n=i):(l="down",o=s.y-i,n=i):e?(l="down",o=s.y-i,n=i):(l="up",o=s.y,n=i);let c={left:a,right:a+r,top:o,bottom:o+n},h=t.get("bounds");ce(c,h)||(t.set("bounds",c),t.set("pointerOrientation",l))}};Jt.className="AxisRendererX";Jt.classNames=ct.classNames.concat([Jt.className]);var Qt=class extends ct{constructor(){super(...arguments),this.thumb=pt.new(this._root,{height:$,isMeasured:!1,themeTags:["axis","y","thumb","zoomgrip"]})}_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["renderer","y"]),this._settings.opposite&&this._settings.themeTags.push("opposite"),super._afterNew(),this.setPrivateRaw("letter","Y");let t=this.grid.template;t.set("width",$),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(){var t;super._changed();let e=this.axis,i=e.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("y",-1e3));let s=this.thumb,a="opposite",o="inside",r=this.chart;if(this.isDirty(a)||this.isDirty(o)){let l=e.children;if(this.get(o)?e.addTag(o):e.removeTag(o),r){if(this.get(a)){let c=r.rightAxesContainer.children;c.indexOf(e)==-1&&c.moveValue(e,0),e.addTag(a),l.moveValue(this,0)}else{let c=r.leftAxesContainer.children;c.indexOf(e)==-1&&c.moveValue(e),e.removeTag(a),l.moveValue(this)}(t=e.ghostLabel)===null||t===void 0||t._applyThemes(),this.labels.each(c=>{c._applyThemes()}),this.root._markDirtyRedraw()}e.markDirtySize()}let n=e.labelsContainer.width();r&&(this.get(a)?s.set("centerX",0):s.set("centerX",n)),s.setPrivate("width",n)}processAxis(){super.processAxis();let t=this.axis;t.get("height")==null&&t.set("height",$);let e=this._root.horizontalLayout;t.set("layout",e),t.labelsContainer.set("height",$),t.axisHeader.set("layout",e)}_updatePositions(){let t=this.axis,e=t.y()-Lt(t.get("centerY",0),t.height());t.gridContainer.set("y",e),t.topGridContainer.set("y",e),t.bulletsContainer.set("x",this.x());let i=t.chart;if(i){let s=i.plotContainer,a=t.axisHeader,o=t.get("marginTop",0);a.children.length>0?(o=t.axisHeader.height(),t.set("marginTop",o+1)):a.set("height",o),a.setAll({y:t.y()-o,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){v(e)||(e=0);let a=.5;v(s)&&s>1?a=t.get("multiLocation",a):a=t.get("location",a);let o=this.get("opposite"),r=t.get("inside",this.get("inside",!1));o?(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")),v(i)&&i!=e&&(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){v(e)||(e=0);let s=t.get("location",.5);v(i)&&i!=e&&(e=e+(i-e)*s),t.set("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateTick(t,e,i,s){if(t){v(e)||(e=0);let a=.5;v(s)&&s>1?a=t.get("multiLocation",a):a=t.get("location",a),v(i)&&i!=e&&(e=e+(i-e)*a),t.set("y",this.positionToCoordinate(e));let o=t.get("length",0),r=t.get("inside",this.get("inside",!1));this.get("opposite")?(t.set("x",0),r&&(o*=-1)):r||(o*=-1),t.set("draw",n=>{n.moveTo(0,0),n.lineTo(o,0)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateBullet(t,e,i){if(t){let s=t.get("sprite");if(s){v(e)||(e=0);let a=t.get("location",.5);v(i)&&i!=e&&(e=e+(i-e)*a);let o=this.axis.roundAxisPosition(e,a),r=this.axis._bullets[o],n=1;if(this.get("opposite")&&(n=-1),t.get("stacked"))if(r){let l=r.get("sprite");l&&s.set("x",l.x()+l.width()*n)}else s.set("x",0);this.axis._bullets[o]=t,s.set("y",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){v(e)||(e=0),v(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=>{let a=this.axis.gridContainer.width(),o=this.height();i<e&&([i,e]=[e,i]),!(e>o||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){let e=this.get("inside"),i=1e5,s=this._display.toGlobal({x:0,y:0}),a=s.y,o=0,r=this.axisLength(),n=i,l="right";this.get("opposite")?e?(l="right",o=s.x-i,n=i):(l="left",o=s.x,n=i):e?(l="left",o=s.x,n=i):(l="right",o=s.x-i,n=i);let c={left:o,right:o+n,top:a,bottom:a+r},h=t.get("bounds");ce(c,h)||(t.set("bounds",c),t.set("pointerOrientation",l))}_updateLC(){let t=this.axis,e=t.parent;if(e){let i=e.innerHeight();this._lc=this.axisLength()/i,this._ls=t.y()/i}}toAxisPosition(t){let e=this._start||0,i=this._end||1;return t-=this._ls,t=t*(i-e)/this._lc,this.get("inversed")?t=e+t:t=i-t,t}toGlobalPosition(t){let e=this._start||0,i=this._end||1;return this.get("inversed")?t=t-e:t=i-t,t=t/(i-e)*this._lc,t+=this._ls,t}fixPosition(t){return this.get("inversed")?t:1-t}};Qt.className="AxisRendererY";Qt.classNames=ct.classNames.concat([Qt.className]);var ut=class extends Et{_beforeChanged(){super._beforeChanged(),(this.isDirty("lowX0")||this.isDirty("lowY0")||this.isDirty("lowX1")||this.isDirty("lowY1")||this.isDirty("highX0")||this.isDirty("highX1")||this.isDirty("highY0")||this.isDirty("highY1"))&&(this._clear=!0)}_draw(){super._draw();let t=this._display;t.moveTo(this.get("lowX0",0),this.get("lowY0",0)),t.lineTo(this.get("lowX1",0),this.get("lowY1",0)),t.moveTo(this.get("highX0",0),this.get("highY0",0)),t.lineTo(this.get("highX1",0),this.get("highY1",0))}};ut.className="Candlestick";ut.classNames=Et.classNames.concat([ut.className]);var wt=class extends bt{constructor(){super(...arguments),this.allColumns=this.children.push(E.new(this._root,{})),this.allColumnsData=[],this.columns=this.addDisposer(new H(z.new({}),()=>Et._new(this._root,{position:"absolute",themeTags:Y(this.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template])))}makeColumn(t,e){let i=e.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(t),e.push(i),i}_processAxisRange(t){super._processAxisRange(t),t.columns=new H(z.new({}),()=>Et._new(this._root,{position:"absolute",themeTags:Y(t.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template,t.columns.template]))}_beforeColumnsDraw(){this.allColumnsData=[]}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",t=>{t.clear(),T(this.allColumnsData,e=>{let i=e.width,s=e.height,a=e.x,o=e.y,r=e.stroke,n=e.fill,l=e.strokeWidth,c=e.strokeOpacity,h=e.fillOpacity;t.beginFill(n,h),t.beginPath(),t.lineStyle(l,r,c),t.drawRect(a,o,i,s),t.endStroke(),t.endFill()})})}_updateChildren(){this.isDirty("turboMode")&&(this.markDirtyValues(),this.get("turboMode")||this.allColumns.set("draw",void 0)),super._updateChildren()}_updateSeriesGraphics(t,e,i,s,a,o,r,n){if(this.get("turboMode")){e.virtualParent=this.chart,e.parent&&(this.mainContainer.children.removeValue(e),e._parent=void 0);let l=e.get("stroke"),c=e.get("fillOpacity",1),h=e.get("strokeOpacity",1),u=e.get("strokeWidth",1),d=e.get("fill"),f=this.getPoint(i,a),m=this.getPoint(s,o),g=t.get("point");if(g){let p=this.getPoint(g.x,g.y);g.x=p.x+this._x,g.y=p.y+this._y}i=f.x,s=m.x,a=f.y,o=m.y,t.setRaw("left",i),t.setRaw("right",s),t.setRaw("top",a),t.setRaw("bottom",o),this.allColumnsData.push({width:s-i,height:o-a,x:i,y:a,stroke:l,fill:d,strokeWidth:u,strokeOpacity:h,fillOpacity:c})}else e.parent||this.mainContainer.children.push(e),super._updateSeriesGraphics(t,e,i,s,a,o,r,n)}};wt.className="ColumnSeries";wt.classNames=bt.classNames.concat([wt.className]);var Tt=class extends wt{constructor(){super(...arguments),this.columns=this.addDisposer(new H(z.new({themeTags:["autocolor"]}),()=>ut._new(this._root,{themeTags:Y(this.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template])))}makeColumn(t,e){let i=e.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(t),e.push(i),i}_updateGraphics(t,e,i){super._updateGraphics(t,e,i);let s=this.getRaw("xAxis"),a=this.getRaw("yAxis"),o=this.get("vcy",1),r=this.get("vcx",1),n,l,c,h,u,d,f,m,g=this.get("locationX",t.get("locationX",.5)),p=this.get("locationY",t.get("locationY",.5)),_=this.get("openLocationX",t.get("openLocationX",g)),x=this.get("openLocationY",t.get("openLocationY",p)),y;if(i==0){let b=a.getDataItemPositionY(t,this._yOpenField,1,o),w=a.getDataItemPositionY(t,this._yField,1,o);h=a.getDataItemPositionY(t,this._yLowField,1,o),m=a.getDataItemPositionY(t,this._yHighField,1,o),f=Math.max(b,w),c=Math.min(b,w);let M=this._aLocationX0+_-.5,D=this._aLocationX1+g-.5;n=s.getDataItemPositionX(t,this._xField,M+(D-M)/2,r),l=n,u=n,d=n,y="vertical"}else{let b=s.getDataItemPositionX(t,this._xOpenField,1,r),w=s.getDataItemPositionX(t,this._xField,1,r);l=s.getDataItemPositionX(t,this._xLowField,1,r),d=s.getDataItemPositionX(t,this._xHighField,1,r),u=Math.max(b,w),n=Math.min(b,w);let M=this._aLocationY0+x-.5,D=this._aLocationY1+p-.5;c=a.getDataItemPositionY(t,this._yField,M+(D-M)/2,o),h=c,f=c,m=c,y="horizontal"}this._updateCandleGraphics(t,n,l,c,h,u,d,f,m,y)}_updateCandleGraphics(t,e,i,s,a,o,r,n,l,c){let h=t.get("graphics");if(h){let u=this.getPoint(e,s),d=this.getPoint(i,a),f=this.getPoint(o,n),m=this.getPoint(r,l);if(this.get("turboMode")){let g=this.allColumnsData[this.allColumnsData.length-1];g.lowX0=u.x,g.lowY0=u.y,g.lowX1=d.x,g.lowY1=d.y,g.highX0=f.x,g.highY0=f.y,g.highX1=m.x,g.highY1=m.y}else{let g=h.x(),p=h.y();h.set("lowX0",u.x-g),h.set("lowY0",u.y-p),h.set("lowX1",d.x-g),h.set("lowY1",d.y-p),h.set("highX0",f.x-g),h.set("highY0",f.y-p),h.set("highX1",m.x-g),h.set("highY1",m.y-p),h.set("orientation",c);let _=t.get("rangeGraphics");_&&T(_,x=>{x.set("lowX0",u.x-g),x.set("lowY0",u.y-p),x.set("lowX1",d.x-g),x.set("lowY1",d.y-p),x.set("highX0",f.x-g),x.set("highY0",f.y-p),x.set("highX1",m.x-g),x.set("highY1",m.y-p),x.set("orientation",c)})}}}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",t=>{t.clear(),T(this.allColumnsData,e=>{let i=e.width,s=e.height,a=e.x,o=e.y,r=e.stroke,n=e.fill,l=e.strokeWidth,c=e.strokeOpacity,h=e.fillOpacity,u=e.lowX0,d=e.lowY0,f=e.lowX1,m=e.lowY1,g=e.highX0,p=e.highY0,_=e.highX1,x=e.highY1;t.beginFill(n,h),t.beginPath(),t.lineStyle(l,r,c),t.drawRect(a,o,i,s),t.moveTo(u,d),t.lineTo(f,m),t.moveTo(g,p),t.lineTo(_,x),t.endStroke(),t.endFill()})})}_processAxisRange(t){super._processAxisRange(t),t.columns=new H(z.new({}),()=>ut._new(this._root,{themeTags:Y(t.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template,t.columns.template]))}};Tt.className="CandlestickSeries";Tt.classNames=wt.classNames.concat([Tt.className]);var At=class extends ut{_draw(){let t=this._display;t.moveTo(this.get("lowX1",0),this.get("lowY1",0)),t.lineTo(this.get("highX1",0),this.get("highY1",0));let e=this.width(),i=this.height();if(this.get("orientation")=="vertical"){let s=i,a=0;t.moveTo(0,s),t.lineTo(e/2,s),t.moveTo(e/2,a),t.lineTo(e,a)}else{let s=0,a=e;t.moveTo(s,0),t.lineTo(s,i/2),t.moveTo(a,i/2),t.lineTo(a,i)}}};At.className="OHLC";At.classNames=ut.classNames.concat([At.className]);var te=class extends Tt{constructor(){super(...arguments),this.columns=this.addDisposer(new H(z.new({themeTags:["autocolor"]}),()=>At._new(this._root,{themeTags:Y(this.columns.template.get("themeTags",[]),["ohlc","series","column"])},[this.columns.template])))}makeColumn(t,e){let i=this.mainContainer.children.push(e.make());return i._setDataItem(t),e.push(i),i}_processAxisRange(t){super._processAxisRange(t),t.columns=new H(z.new({}),()=>At._new(this._root,{themeTags:Y(t.columns.template.get("themeTags",[]),["ohlc","series","column"])},[this.columns.template,t.columns.template]))}};te.className="OHLCSeries";te.classNames=Tt.classNames.concat([te.className]);var Z=class extends lt{constructor(){super(...arguments),this._strokeGenerator=ii(),this._fillGenerator=si(),this.strokes=this.addDisposer(new H(z.new({}),()=>E._new(this._root,{themeTags:Y(this.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template]))),this.fills=this.addDisposer(new H(z.new({}),()=>E._new(this._root,{themeTags:Y(this.strokes.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template]))),this._previousPoint=[0,0,0,0],this._dindex=0,this._sindex=0}_afterNew(){this._fillGenerator.y0(function(t){return t[3]}),this._fillGenerator.x0(function(t){return t[2]}),this._fillGenerator.y1(function(t){return t[1]}),this._fillGenerator.x1(function(t){return t[0]}),super._afterNew()}makeStroke(t){let e=this.mainContainer.children.push(t.make());return t.push(e),e}makeFill(t){let e=this.mainContainer.children.push(t.make());return t.push(e),e}_updateChildren(){this._strokeTemplate=void 0,this._fillTemplate=void 0;let t=this.get("xAxis"),e=this.get("yAxis");if(this.isDirty("stroke")){let i=this.get("stroke");this.strokes.template.set("stroke",i);let s=this._legendStroke;s&&s.states.lookup("default").set("stroke",i)}if(this.isDirty("fill")){let i=this.get("fill");this.fills.template.set("fill",i);let s=this._legendFill;s&&s.states.lookup("default").set("fill",i)}if(this.isDirty("fillPattern")){let i=this.get("fillPattern");this.fills.template.set("fillPattern",i);let s=this._legendFill;s&&s.states.lookup("default").set("fillPattern",i)}if(this.isDirty("curveFactory")){let 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")){let i=this.dataItems;this.fills.each(h=>{h.setPrivate("visible",!1)}),this.strokes.each(h=>{h.setPrivate("visible",!1)}),this.axisRanges.each(h=>{let u=h.fills;u&&u.each(f=>{f.setPrivate("visible",!1)});let d=h.strokes;d&&d.each(f=>{f.setPrivate("visible",!1)})});let s=this.startIndex(),a=this.strokes.template.get("templateField"),o=this.fills.template.get("templateField"),r=!0,n=!0;a&&(r=!1),o&&(n=!1);for(let h=s-1;h>=0;h--){let u=i[h],d=!0,f=u.dataContext;a&&f[a]&&(r=!0),o&&f[o]&&(n=!0);for(let m=0,g=this._valueFields.length;m<g;m++)if(!v(u.get(this._valueFields[m]))){d=!1;break}if(d&&r&&n){s=h;break}}let l=i.length,c=this.endIndex();if(c<l){c++;for(let h=c;h<l;h++){let u=i[h],d=!0;for(let f=0,m=this._valueFields.length;f<m;f++)if(!v(u.get(this._valueFields[f]))){d=!1;break}if(d){c=h+1;break}}}if(s>0&&s--,this._endIndex=c,this._clearGraphics(),this._sindex=0,this._dindex=s,l==1)this._startSegment(0);else for(;this._dindex<c-1;)this._startSegment(this._dindex),this._sindex++}}else this._skipped=!0;super._updateChildren()}_clearGraphics(){this.strokes.clear(),this.fills.clear(),this.axisRanges.each(t=>{t.fills.clear(),t.strokes.clear()})}_startSegment(t){let e=this.dataItems,i=this._endIndex,s=i,a=this.get("autoGapCount"),o=this.get("connect"),r=this.makeFill(this.fills),n=this._fillTemplate,l=this.fills.template;n&&n!=l&&(r.template=n),r.setPrivate("visible",!0);let c=this.makeStroke(this.strokes),h=this._strokeTemplate;h&&h!=this.strokes.template&&(c.template=h),c.setPrivate("visible",!0);let u=this.get("xAxis"),d=this.get("yAxis"),f=this.get("baseAxis"),m=this.get("vcx",1),g=this.get("vcy",1),p=this._xField,_=this._yField,x=this._xOpenField,y=this._yOpenField,b=this.get("openValueXField"),w=this.get("openValueYField");b||(x=this._xField),w||(y=this._yField);let M=this.get("stacked"),D=u.basePosition(),P=d.basePosition(),k;f===d?k=this._yField:k=this._xField;let I=[],C=[];I.push(C);let X=this.strokes.template.get("templateField"),S=this.fills.template.get("templateField"),tt=this.get("locationX",.5),V=this.get("locationY",.5),q=this.get("openLocationX",tt),F=this.get("openLocationY",V),N=this.get("minDistance",0),L,xt=this.fills.template.get("visible");this.axisRanges.length>0&&(xt=!0);let _t=!1;(M||b||w)&&(_t=!0);let it={points:C,segments:I,stacked:M,getOpen:_t,basePosX:D,basePosY:P,fillVisible:xt,xField:p,yField:_,xOpenField:x,yOpenField:y,vcx:m,vcy:g,baseAxis:f,xAxis:u,yAxis:d,locationX:tt,locationY:V,openLocationX:q,openLocationY:F,minDistance:N},Mt=this._strokeTemplate,st=this._fillTemplate;for(L=t;L<s;L++){this._dindex=L;let W=e[L],dt=W.get(p),yt=W.get(_);if(dt==null||yt==null?o||(C=[],I.push(C),it.points=C):this._getPoints(W,it),X){let O=W.dataContext[X];if(O)if(O instanceof z||(O=z.new(O)),this._strokeTemplate=O,L>t){s=L;break}else Mt=O,c.template=O}if(S){let O=W.dataContext[S];if(O)if(O instanceof z||(O=z.new(O)),this._fillTemplate=O,L>t){s=L;break}else st=O,r.template=O}if(!o){let O=e[L+1];O&&f.shouldGap(W,O,a,k)&&(C=[],I.push(C),it.points=C)}}r.setRaw("userData",[t,L]),c.setRaw("userData",[t,L]),L===i&&this._endLine(C,I[0][0]),c&&this._drawStroke(c,I),r&&this._drawFill(r,I),this.axisRanges.each(W=>{let dt=W.container,yt=W.fills,O=this.makeFill(yt);dt&&dt.children.push(O),O.setPrivate("visible",!0),this._drawFill(O,I);let di=W.strokes,oe=this.makeStroke(di);dt&&dt.children.push(oe),Mt&&Mt!=this.strokes.template&&(oe.template=Mt),st&&st!=this.fills.template&&(O.template=st),oe.setPrivate("visible",!0),this._drawStroke(oe,I),O.setRaw("userData",[t,L]),oe.setRaw("userData",[t,L])})}_getPoints(t,e){let i=e.points,s=t.get("locationX",e.locationX),a=t.get("locationY",e.locationY),o=this.get("exactLocationX",!1),r=this.get("exactLocationY",!1),n=e.xAxis.getDataItemPositionX(t,e.xField,s,e.vcx,o),l=e.yAxis.getDataItemPositionY(t,e.yField,a,e.vcy,r);if(this._shouldInclude(n)){let c=this.getPoint(n,l),h=[c.x,c.y];if(c.x+=this._x,c.y+=this._y,t.set("point",c),e.fillVisible){let u=n,d=l;if(e.baseAxis===e.xAxis?d=e.basePosY:e.baseAxis===e.yAxis&&(u=e.basePosX),e.getOpen){let m=t.get(e.xOpenField),g=t.get(e.yOpenField);if(m!=null&&g!=null){let p=t.get("openLocationX",e.openLocationX),_=t.get("openLocationY",e.openLocationY);if(e.stacked){let x=t.get("stackToItemX"),y=t.get("stackToItemY");x?(u=e.xAxis.getDataItemPositionX(x,e.xField,p,x.component.get("vcx"),o),at(u)&&(u=e.basePosX)):e.yAxis===e.baseAxis?u=e.basePosX:u=e.xAxis.getDataItemPositionX(t,e.xOpenField,p,e.vcx,o),y?(d=e.yAxis.getDataItemPositionY(y,e.yField,_,y.component.get("vcy"),r),at(d)&&(d=e.basePosY)):e.xAxis===e.baseAxis?d=e.basePosY:d=e.yAxis.getDataItemPositionY(t,e.yOpenField,_,e.vcy,r)}else u=e.xAxis.getDataItemPositionX(t,e.xOpenField,p,e.vcx,o),d=e.yAxis.getDataItemPositionY(t,e.yOpenField,_,e.vcy,r)}}let f=this.getPoint(u,d);h[2]=f.x,h[3]=f.y}if(e.minDistance>0){let u=h[0],d=h[1],f=h[2],m=h[3],g=this._previousPoint,p=g[0],_=g[1],x=g[2],y=g[3];(Math.hypot(u-p,d-_)>e.minDistance||f&&m&&Math.hypot(f-x,m-y)>e.minDistance)&&(i.push(h),this._previousPoint=h)}else i.push(h)}}_endLine(t,e){}_drawStroke(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",i=>{T(e,s=>{this._strokeGenerator.context(i),this._strokeGenerator(s)})})}_drawFill(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",i=>{T(e,s=>{this._fillGenerator.context(i),this._fillGenerator(s)})})}_processAxisRange(t){super._processAxisRange(t),t.fills=new H(z.new({}),()=>E._new(this._root,{themeTags:Y(t.fills.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template,t.fills.template])),t.strokes=new H(z.new({}),()=>E._new(this._root,{themeTags:Y(t.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template,t.strokes.template]))}createLegendMarker(t){let e=this.get("legendDataItem");if(e){let i=e.get("marker"),s=e.get("markerRectangle");s&&s.setPrivate("visible",!1),i.set("background",pt.new(i._root,{fillOpacity:0,fill:He(0)}));let a=i.children.push(E._new(i._root,{themeTags:["line","series","legend","marker","stroke"],interactive:!1},[this.strokes.template]));this._legendStroke=a;let o=i.children.push(E._new(i._root,{themeTags:["line","series","legend","marker","fill"]},[this.fills.template]));this._legendFill=o;let r=this._root.interfaceColors.get("disabled");if(a.states.create("disabled",{fill:r,stroke:r}),o.states.create("disabled",{fill:r,stroke:r}),this.bullets.length>0){let n=this.bullets.getIndex(0);if(n){let l=n(i._root,this,new K(this,{legend:!0},{}));if(l){let c=l.get("sprite");c instanceof E&&c.states.create("disabled",{fill:r,stroke:r}),c&&(c.setAll({tooltipText:void 0,tooltipHTML:void 0,focusable:void 0,focusableGroup:void 0,ariaLabel:void 0}),i.children.push(c),c.setAll({x:i.width()/2,y:i.height()/2}),i.events.on("boundschanged",()=>{c.setAll({x:i.width()/2,y:i.height()/2})}))}}}}}};Z.className="LineSeries";Z.classNames=lt.classNames.concat([Z.className]);var Le=class{constructor(t,e){this._line=0,this._point=0,this._x0=0,this._x1=0,this._y0=0,this._y1=0,this._t0=0,this._tension=0,this._context=t,this._tension=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0}lineEnd(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ye(this,this._t0,li(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,e){[t,e]=[e,t];let i=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ye(this,li(this,i=ri(this,t,e)),i);break;default:Ye(this,this._t0,i=ri(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=i}}};function ge(A){function t(e){return new Le(e,A)}return t.tension=function(e){return ge(+e)},t}function ni(A){return A<0?-1:1}function ri(A,t,e){let i=A._x1-A._x0,s=t-A._x1,a=(A._y1-A._y0)/(i||s<0&&-0),o=(e-A._y1)/(s||i<0&&-0),r=(a*s+o*i)/(i+s);return(ni(a)+ni(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(r))||0}function li(A,t){let e=A._x1-A._x0;return e?(3*(A._y1-A._y0)/e-t)/2:t}function Ye(A,t,e){let i=A._x0,s=A._y0,a=A._x1,o=A._y1,r=(a-i)/1.5*(1-A._tension);A._context.bezierCurveTo(s+r*t,i+r,o-r*e,a-r,o,a)}var ee=class extends Z{_afterNew(){this._setDefault("curveFactory",ge(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",ge(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}};ee.className="SmoothedYLineSeries";ee.classNames=Z.classNames.concat([ee.className]);var Ne=class{constructor(t,e){this._line=0,this._point=0,this._x0=0,this._x1=0,this._y0=0,this._y1=0,this._t0=0,this._tension=0,this._context=t,this._tension=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0}lineEnd(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Fe(this,this._t0,ui(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,e){let i=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Fe(this,ui(this,i=ci(this,t,e)),i);break;default:Fe(this,this._t0,i=ci(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=i}}};function Re(A){function t(e){return new Ne(e,A)}return t}function hi(A){return A<0?-1:1}function ci(A,t,e){let i=A._x1-A._x0,s=t-A._x1,a=(A._y1-A._y0)/(i||s<0&&-0),o=(e-A._y1)/(s||i<0&&-0),r=(a*s+o*i)/(i+s);return(hi(a)+hi(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(r))||0}function ui(A,t){let e=A._x1-A._x0;return e?(3*(A._y1-A._y0)/e-t)/2:t}function Fe(A,t,e){let i=A._x0,s=A._y0,a=A._x1,o=A._y1,r=(a-i)/1.5*(1-A._tension);A._context.bezierCurveTo(i+r,s+r*t,a-r,o-r*e,a,o)}var ie=class extends Z{_afterNew(){this._setDefault("curveFactory",Re(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",Re(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}};ie.className="SmoothedXLineSeries";ie.classNames=Z.classNames.concat([ie.className]);var se=class extends Z{_afterNew(){this._setDefault("curveFactory",Me.tension(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",Me.tension(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}};se.className="SmoothedXYLineSeries";se.classNames=Z.classNames.concat([se.className]);var ae=class extends Z{_afterNew(){this._setDefault("curveFactory",ai),super._afterNew()}_getPoints(t,e){let i=e.points,s=this.get("stepWidth",$).value/2,a=t.get("locationX",e.locationX),o=t.get("locationY",e.locationY),r=a,n=o;e.baseAxis===e.xAxis?(a-=s,r+=s):e.baseAxis===e.yAxis&&(o-=s,n+=s);let l=e.xAxis.getDataItemPositionX(t,e.xField,a,e.vcx),c=e.yAxis.getDataItemPositionY(t,e.yField,o,e.vcy),h=e.xAxis.getDataItemPositionX(t,e.xField,r,e.vcx),u=e.yAxis.getDataItemPositionY(t,e.yField,n,e.vcy);if(this._shouldInclude(l)){let d=this.getPoint(l,c),f=[d.x,d.y],m=this.getPoint(h,u),g=[m.x,m.y];if(e.fillVisible){let p=l,_=c,x=h,y=u;if(e.baseAxis===e.xAxis?(_=e.basePosY,y=e.basePosY):e.baseAxis===e.yAxis&&(p=e.basePosX,x=e.basePosX),e.getOpen){let M=t.get(e.xOpenField),D=t.get(e.yOpenField);if(M!=null&&D!=null)if(a=t.get("openLocationX",e.openLocationX),o=t.get("openLocationY",e.openLocationY),r=a,n=o,e.baseAxis===e.xAxis?(a-=s,r+=s):e.baseAxis===e.yAxis&&(o-=s,n+=s),e.stacked){let P=t.get("stackToItemX"),k=t.get("stackToItemY");P?(p=e.xAxis.getDataItemPositionX(P,e.xField,a,P.component.get("vcx")),x=e.xAxis.getDataItemPositionX(P,e.xField,r,P.component.get("vcx"))):e.yAxis===e.baseAxis?(p=e.basePosX,x=e.basePosX):e.baseAxis===e.yAxis&&(p=e.xAxis.getDataItemPositionX(t,e.xOpenField,a,e.vcx),x=e.xAxis.getDataItemPositionX(t,e.xOpenField,r,e.vcx)),k?(_=e.yAxis.getDataItemPositionY(k,e.yField,o,k.component.get("vcy")),y=e.yAxis.getDataItemPositionY(k,e.yField,n,k.component.get("vcy"))):e.xAxis===e.baseAxis?(_=e.basePosY,y=e.basePosY):e.baseAxis===e.yAxis&&(_=e.yAxis.getDataItemPositionY(t,e.yOpenField,o,e.vcy),y=e.yAxis.getDataItemPositionY(t,e.yOpenField,n,e.vcy))}else p=e.xAxis.getDataItemPositionX(t,e.xOpenField,a,e.vcx),_=e.yAxis.getDataItemPositionY(t,e.yOpenField,o,e.vcy),x=e.xAxis.getDataItemPositionX(t,e.xOpenField,r,e.vcx),y=e.yAxis.getDataItemPositionY(t,e.yOpenField,n,e.vcy)}let b=this.getPoint(p,_),w=this.getPoint(x,y);f[2]=b.x,f[3]=b.y,g[2]=w.x,g[3]=w.y}i.push(f),i.push(g),t.set("point",{x:f[0]+(g[0]-f[0])/2,y:f[1]+(g[1]-f[1])/2})}this.get("noRisers")&&(e.points=[],e.segments.push(i))}};ae.className="StepLineSeries";ae.classNames=Z.classNames.concat([ae.className]);export{ht as Axis,Zt as AxisBullet,St as AxisLabel,qt as AxisLabelRadial,ct as AxisRenderer,Jt as AxisRendererX,Qt as AxisRendererY,Xt as AxisTick,bt as BaseColumnSeries,ut as Candlestick,Tt as CandlestickSeries,Dt as CategoryAxis,Wt as CategoryDateAxis,wt as ColumnSeries,Pt as DateAxis,le as DefaultTheme,jt as DurationAxis,Kt as EditableAxisLabel,Ht as GaplessDateAxis,gt as Grid,Z as LineSeries,At as OHLC,te as OHLCSeries,ie as SmoothedXLineSeries,se as SmoothedXYLineSeries,ee as SmoothedYLineSeries,ae as StepLineSeries,et as ValueAxis,$t as XYChart,zt as XYChartScrollbar,Bt as XYCursor,lt as XYSeries};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
var n=class e{constructor(t){this._value=t}get value(){return this._value/100}get percent(){return this._value}toString(){return""+this._value+"%"}interpolate(t,r){return t+this.value*(r-t)}static normalize(t,r,u){return t instanceof e?t:r===u?new e(0):new e(Math.min(Math.max((t-r)*(1/(u-r)),0),1)*100)}};function o(e){return new n(e)}var s=o(0),a=o(100),i=o(50);function c(e){return e instanceof n}export{n as a,o as b,s as c,a as d,i as e,c as f};
|