@orbcharts/plugins-basic 3.0.0-alpha.61 → 3.0.0-alpha.62
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +200 -200
- package/dist/orbcharts-plugins-basic.es.js +1 -1
- package/dist/orbcharts-plugins-basic.umd.js +1 -1
- package/package.json +42 -42
- package/src/base/BaseBarStack.ts +778 -778
- package/src/base/BaseBars.ts +764 -764
- package/src/base/BaseBarsTriangle.ts +672 -672
- package/src/base/BaseDots.ts +513 -513
- package/src/base/BaseGroupAxis.ts +558 -558
- package/src/base/BaseLegend.ts +641 -641
- package/src/base/BaseLineAreas.ts +628 -628
- package/src/base/BaseLines.ts +704 -704
- package/src/base/BaseValueAxis.ts +480 -478
- package/src/base/types.ts +2 -2
- package/src/grid/defaults.ts +128 -128
- package/src/grid/gridObservables.ts +541 -541
- package/src/grid/index.ts +15 -15
- package/src/grid/plugins/BarStack.ts +43 -43
- package/src/grid/plugins/Bars.ts +44 -44
- package/src/grid/plugins/BarsPN.ts +41 -41
- package/src/grid/plugins/BarsTriangle.ts +42 -42
- package/src/grid/plugins/Dots.ts +37 -37
- package/src/grid/plugins/GridLegend.ts +59 -59
- package/src/grid/plugins/GroupAux.ts +976 -976
- package/src/grid/plugins/GroupAxis.ts +35 -35
- package/src/grid/plugins/LineAreas.ts +40 -40
- package/src/grid/plugins/Lines.ts +40 -40
- package/src/grid/plugins/ScalingArea.ts +173 -173
- package/src/grid/plugins/ValueAxis.ts +36 -36
- package/src/grid/plugins/ValueStackAxis.ts +38 -38
- package/src/grid/types.ts +123 -123
- package/src/index.ts +9 -9
- package/src/multiGrid/defaults.ts +158 -158
- package/src/multiGrid/index.ts +13 -13
- package/src/multiGrid/multiGridObservables.ts +49 -49
- package/src/multiGrid/plugins/MultiBarStack.ts +78 -78
- package/src/multiGrid/plugins/MultiBars.ts +77 -77
- package/src/multiGrid/plugins/MultiBarsTriangle.ts +77 -77
- package/src/multiGrid/plugins/MultiDots.ts +65 -65
- package/src/multiGrid/plugins/MultiGridLegend.ts +89 -89
- package/src/multiGrid/plugins/MultiGroupAxis.ts +69 -69
- package/src/multiGrid/plugins/MultiLineAreas.ts +77 -77
- package/src/multiGrid/plugins/MultiLines.ts +77 -77
- package/src/multiGrid/plugins/MultiValueAxis.ts +69 -69
- package/src/multiGrid/plugins/MultiValueStackAxis.ts +69 -69
- package/src/multiGrid/plugins/OverlappingValueAxes.ts +167 -167
- package/src/multiGrid/plugins/OverlappingValueStackAxes.ts +168 -168
- package/src/multiGrid/types.ts +72 -72
- package/src/noneData/defaults.ts +102 -102
- package/src/noneData/index.ts +3 -3
- package/src/noneData/plugins/Container.ts +10 -10
- package/src/noneData/plugins/Tooltip.ts +310 -310
- package/src/noneData/types.ts +26 -26
- package/src/series/defaults.ts +144 -144
- package/src/series/index.ts +9 -9
- package/src/series/plugins/Bubbles.ts +545 -545
- package/src/series/plugins/Pie.ts +576 -576
- package/src/series/plugins/PieEventTexts.ts +262 -262
- package/src/series/plugins/PieLabels.ts +304 -304
- package/src/series/plugins/Rose.ts +472 -472
- package/src/series/plugins/RoseLabels.ts +362 -362
- package/src/series/plugins/SeriesLegend.ts +59 -59
- package/src/series/seriesObservables.ts +145 -145
- package/src/series/seriesUtils.ts +51 -51
- package/src/series/types.ts +83 -83
- package/src/tree/defaults.ts +23 -23
- package/src/tree/index.ts +3 -3
- package/src/tree/plugins/TreeLegend.ts +59 -59
- package/src/tree/plugins/TreeMap.ts +305 -305
- package/src/tree/types.ts +23 -23
- package/src/utils/commonUtils.ts +21 -21
- package/src/utils/d3Graphics.ts +124 -124
- package/src/utils/d3Utils.ts +73 -73
- package/src/utils/observables.ts +14 -14
- package/src/utils/orbchartsUtils.ts +100 -100
- package/tsconfig.base.json +13 -13
- package/tsconfig.json +2 -2
- package/vite.config.js +22 -22
@@ -12,7 +12,7 @@
|
|
12
12
|
`})}function CR({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{Z(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(Io(r)).tween("tween",(l,c,f)=>h=>{const p=l.width*h;u.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const sx=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,layout$:y,event$:v})=>{const x=new nt,b=$n(t,"clipPath-box"),_=at(t,"path"),{seriesSelection$:M,axesSelection$:D,defsSelection$:$,graphicGSelection$:w}=ar({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p}),P=p.pipe(I(x),G(k=>-k.translate[1]/k.scale[1])),S=new dt(k=>{const E=Y({fullParams:l,valueAxisStart:P}).pipe(I(x)).subscribe(L=>{const F=MR(L.fullParams.lineCurve,L.valueAxisStart);k.next(F)});return()=>{E.unsubscribe()}}),N=f.pipe(G(k=>k.transitionDuration),tt()),R=f.pipe(G(k=>k.transitionEase),tt());Y({defsSelection:$,seriesLabels:a,axisSize:d,transitionDuration:N,transitionEase:R}).pipe(I(x),H(async k=>k)).subscribe(k=>{const L=[{id:b,width:k.axisSize.width,height:k.axisSize.height}].concat(k.seriesLabels.map(F=>({id:`orbcharts__clipPath_${F}`,width:k.axisSize.width,height:k.axisSize.height})));CR({defsSelection:k.defsSelection,clipPathData:L,transitionDuration:k.transitionDuration,transitionEase:k.transitionEase})});const A=n.pipe(G(k=>{const E=new Map;return k.flat().forEach(L=>E.set(L.id,L)),E})),C=ix({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f,gridContainerPosition$:m,layout$:y}),T=f.pipe(I(x),G(k=>k.highlightTarget),tt()),O=a.pipe(I(x),G(k=>k.map((E,L)=>$n(t,`lineargradient-${E}`)))),z=Y({graphicGSelection:w,defsSelection:$,visibleComputedLayoutData:o,linearGradientIds:O,areaPath:S,params:l}).pipe(I(x),H(async k=>k),G(k=>{let E=[];return k.graphicGSelection.each((L,F,j)=>{const Q=DR(k.visibleComputedLayoutData[F]??[]);E[F]=PR({selection:Z(j[F]),pathClassName:_,areaPath:k.areaPath,segmentData:Q,linearGradientIds:k.linearGradientIds,params:k.params}),LR({defsSelection:k.defsSelection,computedData:k.visibleComputedLayoutData,linearGradientIds:k.linearGradientIds,params:k.params})}),E}));return Y({pathSelectionArr:z,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:T,gridGroupPositionFn:C}).pipe(I(x),H(async k=>k)).subscribe(k=>{k.pathSelectionArr.forEach(E=>{E.on("mouseover",(L,F)=>{const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:U}=k.gridGroupPositionFn(L),q=k.GroupDataMap.get(U).find(V=>V.seriesLabel===j)??F[0];v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:q,gridIndex:q.gridIndex,series:k.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:k.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:L,data:k.computedData})}).on("mousemove",(L,F)=>{const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:U}=k.gridGroupPositionFn(L),q=k.GroupDataMap.get(U).find(V=>V.seriesLabel===j)??F[0];v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:q,gridIndex:q.gridIndex,series:k.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:k.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:L,data:k.computedData})}).on("mouseout",(L,F)=>{const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:U}=k.gridGroupPositionFn(L),q=k.GroupDataMap.get(U).find(V=>V.seriesLabel===j)??F[0];v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:q,gridIndex:q.gridIndex,series:k.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:k.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:L,data:k.computedData})}).on("click",(L,F)=>{const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:U}=k.gridGroupPositionFn(L),q=k.GroupDataMap.get(U).find(V=>V.seriesLabel===j)??F[0];v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:q,gridIndex:q.gridIndex,series:k.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:k.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:L,data:k.computedData})})})}),f.pipe(I(x),li(k=>k.highlightTarget==="series"),H(k=>Y({graphicGSelection:w,gridHighlight:g,DataMap:A,fullChartParams:f}).pipe(I(x),H(async E=>E)))).subscribe(k=>{const E=k.gridHighlight[0]?k.gridHighlight[0].seriesLabel:null;TR({selection:k.graphicGSelection,seriesLabel:E,fullChartParams:k.fullChartParams})}),()=>{x.next(void 0)}},ux="LineAreas",ER=se(ux,op)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=sx(ux,{selection:t,computedData$:n.computedData$,visibleComputedData$:n.visibleComputedData$,computedLayoutData$:n.computedLayoutData$,visibleComputedLayoutData$:n.visibleComputedLayoutData$,seriesLabels$:n.seriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainerPosition$:n.gridContainerPosition$,allContainerPosition$:n.gridContainerPosition$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),lx=.3;function cx({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((e>1?t/(e-1):t)-i)/n-r;return a>1?a:1}function RR(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Qf().domain(e).range([-i/2+r,i/2-r])}function kR(t,e){return t<=1?0:e/(t-1)*lx}function IR(t,e){return t<=1?e:e*(1-lx)}function NR({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:l,delayGroup:c,transitionItem:f,isSeriesSeprate:h}){const p=u/2;return t.each((g,m,y)=>{Z(y[m]).selectAll(`rect.${e}`).data(n[m]??[],v=>v.id).join(v=>v.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),v=>v,v=>v.remove()).attr("transform",(v,x)=>`translate(${(v?v.axisX:0)-p}, 0)`).attr("fill",v=>v.color).attr("y",v=>v.axisY<r[m]?v.axisY:r[m]).attr("x",v=>h?0:o(v.seriesLabel)).attr("width",u).attr("rx",l[m][0]??1).attr("ry",l[m][1]??1).transition().duration(f).ease(Io(s.transitionEase)).delay((v,x)=>v.groupIndex*c).attr("height",v=>Math.abs(v.axisYFromZero))}),t.selectAll(`rect.${e}`)}function FR({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function GR({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Eh=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:v})=>{const x=new nt,b=$n(t,"clipPath-box"),_=at(t,"rect"),{seriesSelection$:M,axesSelection$:D,defsSelection$:$,graphicGSelection$:w}=ar({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:h}),P=o.pipe(I(x),G(E=>E.map(L=>L[0]?L[0].axisY-L[0].axisYFromZero:0)),tt()),S=Y({computedData:n,visibleComputedData:i,params:l,gridAxesSize:d,isSeriesSeprate:y}).pipe(I(x),H(async E=>E),G(E=>E.params.barWidth?E.params.barWidth:E.isSeriesSeprate?cx({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:1,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding}):cx({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:E.visibleComputedData.length,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding})),tt()),N=Y({computedData:n,barWidth:S,params:l,gridGraphicReverseScale:p}).pipe(I(x),H(async E=>E),G(E=>{const L=E.barWidth/2,F=E.params.barRadius===!0?L:E.params.barRadius===!1?0:typeof E.params.barRadius=="number"?E.params.barRadius:0;return E.computedData.map((j,Q)=>{const U=E.gridGraphicReverseScale[Q]??E.gridGraphicReverseScale[0];let X=F*U[0],B=F*U[1];if(X>L){const q=L/X;X=X*q,B=B*q}return[X,B]})})),R=i.pipe(I(x),G(E=>{const L=new Set;return E.forEach(F=>{F.forEach(j=>{L.add(j.groupLabel)})}),Array.from(L)})),A=Y({seriesLabels:a,barWidth:S,params:l}).pipe(I(x),H(async E=>E),G(E=>RR(E.barWidth,E.seriesLabels,E.params))),C=c.pipe(I(x),G(E=>E.transitionDuration),tt()),T=new dt(E=>{Y({groupLabels:R,transitionDuration:C}).pipe(H(async L=>L)).subscribe(L=>{const F=kR(L.groupLabels.length,L.transitionDuration);E.next(F)})}).pipe(I(x),tt()),O=new dt(E=>{Y({groupLabels:R,transitionDuration:C}).pipe(H(async L=>L)).subscribe(L=>{const F=IR(L.groupLabels.length,L.transitionDuration);E.next(F)})}).pipe(I(x),tt());Y({defsSelection:$,gridAxesSize:d}).pipe(I(x),H(async E=>E)).subscribe(E=>{const L=[{id:b,width:E.gridAxesSize.width,height:E.gridAxesSize.height}];FR({defsSelection:E.defsSelection,clipPathData:L})});const z=c.pipe(I(x),G(E=>E.highlightTarget),tt()),k=Y({graphicGSelection:w,visibleComputedLayoutData:o,zeroYArr:P,groupLabels:R,barScale:A,params:l,chartParams:c,highlightTarget:z,barWidth:S,transformedBarRadius:N,delayGroup:T,transitionItem:O,isSeriesSeprate:y}).pipe(I(x),H(async E=>E),G(E=>NR({graphicGSelection:E.graphicGSelection,rectClassName:_,visibleComputedLayoutData:E.visibleComputedLayoutData,zeroYArr:E.zeroYArr,groupLabels:E.groupLabels,barScale:E.barScale,params:E.params,chartParams:E.chartParams,barWidth:E.barWidth,transformedBarRadius:E.transformedBarRadius,delayGroup:E.delayGroup,transitionItem:E.transitionItem,isSeriesSeprate:E.isSeriesSeprate})));return Y({barSelection:k,computedData:n,highlightTarget:z,SeriesDataMap:s,GroupDataMap:u}).pipe(I(x),H(async E=>E)).subscribe(E=>{E.barSelection.on("mouseover",(L,F)=>{L.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:L,data:E.computedData})}).on("mousemove",(L,F)=>{L.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:L,data:E.computedData})}).on("mouseout",(L,F)=>{L.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:L,data:E.computedData})}).on("click",(L,F)=>{L.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:L,data:E.computedData})})}),Y({barSelection:k,highlight:g.pipe(G(E=>E.map(L=>L.id))),fullChartParams:c}).pipe(I(x),H(async E=>E)).subscribe(E=>{GR({selection:E.barSelection,ids:E.highlight,fullChartParams:E.fullChartParams})}),()=>{x.next(void 0)}},fx="Bars",zR=se(fx,Go)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Eh(fx,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),hx="BarsPN",OR=se(hx,Go)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Eh(hx,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:Yo(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),px=.3;function UR({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function BR(t,e){return t<=1?0:e/(t-1)*px}function YR(t,e){return t<=1?e:e*(1-px)}function HR({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:l,transitionItem:c,isSeriesSeprate:f}){const h=s/2;return t.each((d,g,m)=>{Z(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),y=>y,y=>y.remove()).attr("transform",(y,v)=>`translate(${(y?y.axisX:0)-h}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(c).ease(Io(a.transitionEase)).delay((y,v)=>y.groupIndex*l).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function WR({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function VR({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const dx=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:g,gridHighlight$:m,gridContainerPosition$:y,isSeriesSeprate$:v,event$:x})=>{const b=new nt,_=$n(t,"clipPath-box"),M=at(t,"rect"),{seriesSelection$:D,axesSelection$:$,defsSelection$:w,graphicGSelection$:P}=ar({selection:e,pluginName:t,clipPathID:_,seriesLabels$:a,gridContainerPosition$:y,gridAxesTransform$:h,gridGraphicTransform$:p}),S=o.pipe(I(b),G(U=>U[0]&&U[0][0]?U[0][0].axisY-U[0][0].axisYFromZero:0),tt()),N=Y({computedData:n,params:l,axisSize:g,isSeriesSeprate:v}).pipe(I(b),H(async U=>U),G(U=>U.params.barWidth?U.params.barWidth:UR({axisWidth:U.axisSize.width,groupAmount:U.computedData[0]?U.computedData[0].length:0,barGroupPadding:U.params.barGroupPadding})),tt()),R=Y({computedData:n,barWidth:N,params:l,gridGraphicReverseScale:d}).pipe(I(b),H(async U=>U),G(U=>{const X=U.barWidth/2,B=U.params.barRadius===!0?X:U.params.barRadius===!1?0:typeof U.params.barRadius=="number"?U.params.barRadius:0;return U.computedData.map((q,V)=>{const rt=U.gridGraphicReverseScale[V]??U.gridGraphicReverseScale[0],ut=B*rt[0],W=B*rt[1];return[ut,W]})})),A=i.pipe(I(b),G(U=>{const X=new Set;return U.forEach(B=>{B.forEach(q=>{X.add(q.groupLabel)})}),Array.from(X)}),St(1)),C=f.pipe(I(b),G(U=>U.transitionDuration),tt()),T=new dt(U=>{Y({groupLabels:A,transitionDuration:C}).pipe(H(async X=>X)).subscribe(X=>{const B=BR(X.groupLabels.length,X.transitionDuration);U.next(B)})}).pipe(I(b),tt()),O=new dt(U=>{Y({groupLabels:A,transitionDuration:C}).pipe(H(async X=>X)).subscribe(X=>{const B=YR(X.groupLabels.length,X.transitionDuration);U.next(B)})}).pipe(I(b),tt()),z=Y({computedData:n,dataFormatter:c}).pipe(I(b),H(async U=>U),G(U=>{const B=U.computedData[0]?U.computedData[0].length-1:0,q=U.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0:U.dataFormatter.grid.groupAxis.scaleDomain[0],V=U.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?B:U.dataFormatter.grid.groupAxis.scaleDomain[1];return[q,V]})),k=Y({visibleComputedLayoutData:o,groupScaleDomain:z}).pipe(I(b),H(async U=>U),G(U=>{const X=U.groupScaleDomain[0],B=U.groupScaleDomain[1],V=U.visibleComputedLayoutData.map(mt=>mt.filter((ht,Yt)=>ht.groupIndex>=X&&ht.groupIndex<=B)).flat();if(V.length<=1)return 1;const rt=V.reduce((mt,ht)=>ht.value>mt.value?ht:mt,V[0]),ut=rt.groupIndex,W=V.filter(mt=>mt.groupIndex===ut).reduce((mt,ht)=>mt+ht.value,0);return rt.value/W})),E=Y({computedLayoutData:r,yRatio:k,zeroY:S}).pipe(I(b),G(U=>{let X=U.computedLayoutData[0]?U.computedLayoutData[0].map(()=>U.zeroY):[];return U.computedLayoutData.map((B,q)=>B.map((V,rt)=>{const ut=X[rt];let W=0;return V.visible&&(W=V.axisYFromZero*U.yRatio,X[rt]=X[rt]+W),{...V,_barStartY:ut,_barHeight:W}}))})),L=Y({computedLayoutData:r,zeroY:S}).pipe(I(b),G(U=>U.computedLayoutData.map((X,B)=>X.map((q,V)=>({...q,_barStartY:U.zeroY,_barHeight:q.axisYFromZero}))))),F=v.pipe(H(U=>h_(()=>U,L,E)));Y({defsSelection:w,gridAxesSize:g}).pipe(I(b),H(async U=>U)).subscribe(U=>{const X=[{id:_,width:U.gridAxesSize.width,height:U.gridAxesSize.height}];WR({defsSelection:U.defsSelection,clipPathData:X})});const j=f.pipe(I(b),G(U=>U.highlightTarget),tt()),Q=Y({graphicGSelection:P,graphicData:F,zeroY:S,groupLabels:A,params:l,chartParams:f,highlightTarget:j,barWidth:N,transformedBarRadius:R,delayGroup:T,transitionItem:O,isSeriesSeprate:v}).pipe(I(b),H(async U=>U),G(U=>HR({graphicGSelection:U.graphicGSelection,rectClassName:M,barData:U.graphicData,zeroY:U.zeroY,groupLabels:U.groupLabels,params:U.params,chartParams:U.chartParams,barWidth:U.barWidth,transformedBarRadius:U.transformedBarRadius,delayGroup:U.delayGroup,transitionItem:U.transitionItem,isSeriesSeprate:U.isSeriesSeprate})));return Y({barSelection:Q,computedData:n,highlightTarget:j,SeriesDataMap:s,GroupDataMap:u}).subscribe(U=>{U.barSelection.on("mouseover",(X,B)=>{X.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:U.highlightTarget,datum:B,gridIndex:B.gridIndex,series:U.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:U.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:X,data:U.computedData})}).on("mousemove",(X,B)=>{X.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:U.highlightTarget,datum:B,gridIndex:B.gridIndex,series:U.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:U.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:X,data:U.computedData})}).on("mouseout",(X,B)=>{X.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:U.highlightTarget,datum:B,gridIndex:B.gridIndex,series:U.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:U.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:X,data:U.computedData})}).on("click",(X,B)=>{X.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:U.highlightTarget,datum:B,gridIndex:B.gridIndex,series:U.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:U.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:X,data:U.computedData})})}),Y({barSelection:Q,highlight:m.pipe(G(U=>U.map(X=>X.id))),fullChartParams:f}).pipe(I(b),H(async U=>U)).subscribe(U=>{VR({selection:U.barSelection,ids:U.highlight,fullChartParams:U.fullChartParams})}),()=>{b.next(void 0)}},gx="BarStack",jR=se(gx,sp)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=dx(gx,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),mx=.3;function yx({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function qR(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Qf().domain(e).range([-i/2+r,i/2-r])}function XR(t,e){return t<=1?0:e/(t-1)*mx}function ZR(t,e){return t<=1?e:e*(1-mx)}function KR({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:l,barWidth:c,delayGroup:f,transitionItem:h,isSeriesSeprate:p}){const d=c/2;return t.each((m,y,v)=>{Z(v[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const _=b.append("g").classed(e,!0).attr("cursor","pointer");return _.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",M=>{const D=-d,$=o[y],w=o[y];return`M${D},${$} L${D+c/2},${w} ${D+c},${$}`}),_},b=>b,b=>b.remove()).attr("transform",b=>`translate(${p?0:s(b.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("y",b=>b.axisY<o[y]?b.axisY:o[y]).attr("x",b=>p?0:s(b.seriesLabel)).style("fill",b=>`url(#${i[b.seriesIndex]})`).attr("stroke",b=>b.color).attr("transform",b=>`translate(${b?b.axisX:0}, 0)`).transition().duration(h).ease(Io(l.transitionEase)).delay((b,_)=>b.groupIndex*f).attr("d",b=>{const _=-d,M=o[y],D=b.axisY;return`M${_},${M} L${_+c/2},${D} ${_+c},${M}`})}),t.selectAll(`path.${n}`)}function QR({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
13
13
|
<stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
|
14
14
|
<stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
|
15
|
-
`})}function JR({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function tk({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1):Z(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const bx=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:u,GroupDataMap$:l,fullParams$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:v})=>{const x=new nt,b=$n(t,"clipPath-box"),_=at(t,"pathG"),M=at(t,"path"),{seriesSelection$:D,axesSelection$:$,defsSelection$:w,graphicGSelection$:P}=ar({selection:e,pluginName:t,clipPathID:b,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p});p.pipe(I(x),G(L=>-L.translate[1]/L.scale[1]));const S=o.pipe(G(L=>L.map(F=>F[0]?F[0].axisY-F[0].axisYFromZero:0)),tt()),N=Y({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:y}).pipe(I(x),H(async L=>L),G(L=>L.params.barWidth?L.params.barWidth:L.isSeriesSeprate?yx({axisWidth:L.gridAxesSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barAmountOfGroup:1,barPadding:L.params.barPadding,barGroupPadding:L.params.barGroupPadding}):yx({axisWidth:L.gridAxesSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barAmountOfGroup:L.visibleComputedData.length,barPadding:L.params.barPadding,barGroupPadding:L.params.barGroupPadding}))),R=i.pipe(I(x),G(L=>{const F=new Set;return L.forEach(j=>{j.forEach(Q=>{F.add(Q.groupLabel)})}),Array.from(F)})),A=new dt(L=>{Y({seriesLabels:s,barWidth:N,params:c}).pipe(I(x),H(async F=>F)).subscribe(F=>{const j=qR(F.barWidth,F.seriesLabels,F.params);L.next(j)})}),C=f.pipe(I(x),G(L=>L.transitionDuration),tt()),T=new dt(L=>{Y({groupLabels:R,transitionDuration:C}).pipe(H(async F=>F)).subscribe(F=>{const j=XR(F.groupLabels.length,F.transitionDuration);L.next(j)})}).pipe(I(x),tt()),O=new dt(L=>{Y({groupLabels:R,transitionDuration:C}).pipe(H(async F=>F)).subscribe(F=>{const j=ZR(F.groupLabels.length,F.transitionDuration);L.next(j)})}).pipe(I(x),tt());Y({defsSelection:w,gridAxesSize:d}).pipe(I(x),H(async L=>L)).subscribe(L=>{const F=[{id:b,width:L.gridAxesSize.width,height:L.gridAxesSize.height}];JR({defsSelection:L.defsSelection,clipPathData:F})});const z=f.pipe(I(x),G(L=>L.highlightTarget),tt()),k=s.pipe(I(x),G(L=>L.map((F,j)=>$n(t,`lineargradient-${F}`)))),E=Y({graphicGSelection:P,defsSelection:w,computedData:n,visibleComputedLayoutData:o,linearGradientIds:k,zeroYArr:S,groupLabels:R,barScale:A,params:c,chartParams:f,barWidth:N,delayGroup:T,transitionItem:O,isSeriesSeprate:y}).pipe(I(x),H(async L=>L),G(L=>(QR({defsSelection:L.defsSelection,computedData:L.computedData,linearGradientIds:L.linearGradientIds,params:L.params}),KR({graphicGSelection:L.graphicGSelection,pathGClassName:_,pathClassName:M,visibleComputedLayoutData:L.visibleComputedLayoutData,linearGradientIds:L.linearGradientIds,zeroYArr:L.zeroYArr,groupLabels:L.groupLabels,barScale:L.barScale,params:L.params,chartParams:L.chartParams,barWidth:L.barWidth,delayGroup:L.delayGroup,transitionItem:L.transitionItem,isSeriesSeprate:L.isSeriesSeprate}))));return Y({barSelection:E,computedData:n,highlightTarget:z,SeriesDataMap:u,GroupDataMap:l}).subscribe(L=>{L.barSelection.on("mouseover",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})}).on("mousemove",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})}).on("mouseout",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})}).on("click",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})})}),Y({barSelection:E,highlight:g.pipe(G(L=>L.map(F=>F.id))),fullChartParams:f}).pipe(I(x),H(async L=>L)).subscribe(L=>{tk({selection:L.barSelection,ids:L.highlight,fullChartParams:L.fullChartParams})}),()=>{x.next(void 0)}},vx="BarsTriangle",ek=se(vx,up)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=bx(vx,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,fullDataFormatter$:r.fullDataFormatter$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function nk({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let u=0;return t.each((c,f,h)=>{Z(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(u=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,g)=>{Z(g[d]).selectAll("circle").data([p]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,v)=>d*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>Tu({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>Tu({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function rk({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1).transition("highlight").duration(200):Z(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function ik({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const xx=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const v=new nt,x=$n(t,"clipPath-box"),b=at(t,"circleG"),_=at(t,"circle"),{seriesSelection$:M,axesSelection$:D,defsSelection$:$,graphicGSelection$:w}=ar({selection:e,pluginName:t,clipPathID:x,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:h}),P=Y({computedData:n,gridGraphicReverseScale:p}).pipe(I(v),H(async A=>A),G(A=>A.computedData.map((C,T)=>A.gridGraphicReverseScale[T])));Y({defsSelection:$,gridAxesSize:d}).pipe(I(v),H(async A=>A)).subscribe(A=>{const C=[{id:x,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];ik({defsSelection:A.defsSelection,clipPathData:C})});const S=c.pipe(I(v),G(A=>A.highlightTarget),tt()),N=Y({graphicGSelection:w,visibleComputedLayoutData:o,graphicReverseScale:P,fullChartParams:c,fullParams:l}).pipe(I(v),H(async A=>A),G(A=>nk({graphicGSelection:A.graphicGSelection,circleGClassName:b,circleClassName:_,visibleComputedLayoutData:A.visibleComputedLayoutData,fullParams:A.fullParams,fullChartParams:A.fullChartParams,graphicReverseScale:A.graphicReverseScale})));Y({graphicSelection:N,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:S}).pipe(I(v),H(async A=>A)).subscribe(A=>{A.graphicSelection.on("mouseover",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:A.highlightTarget,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C,data:A.computedData})}).on("mousemove",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:A.highlightTarget,data:A.computedData,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C})}).on("mouseout",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:A.highlightTarget,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C,data:A.computedData})}).on("click",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:A.highlightTarget,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C,data:A.computedData})})});const R=l.pipe(I(v),G(A=>A.onlyShowHighlighted),tt());return Y({graphicSelection:N,highlight:g.pipe(G(A=>A.map(C=>C.id))),onlyShowHighlighted:R,fullChartParams:c}).pipe(I(v),H(async A=>A)).subscribe(A=>{rk({selection:A.graphicSelection,ids:A.highlight,onlyShowHighlighted:A.onlyShowHighlighted,fullChartParams:A.fullChartParams})}),()=>{v.next(void 0)}},_x="Dots",ok=se(_x,ap)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=xx(_x,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,event$:n.event$});return()=>{i.next(void 0),o()}}),ak={listRectWidth:14,listRectHeight:14,listRectRadius:0};function wx(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}const Lu=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=at(t,"root-position"),u=at(t,"legend-card"),l=at(t,"legend-list"),c=at(t,"legend-item"),f=new nt,h=Y({seriesLabels:n,fullChartParams:o}).pipe(I(f),H(async w=>w),G(w=>{const P=new Map;let S=0;return w.seriesLabels.forEach((N,R)=>{if(!P.has(N)){const A=wx(S,w.fullChartParams);P.set(N,A),S++}}),P})),p=n.pipe(I(f),G(w=>{const P=new Set;let S=[];return w.forEach(N=>{P.has(N)?S.push(!1):S.push(!0),P.add(N)}),S})),d=r.pipe(I(f),G(w=>w.position==="bottom"||w.position==="top"?"row":"column")),g=Y({fullParams:r,layout:i}).pipe(I(f),H(async w=>w),G(w=>{const P=w.fullParams.padding*2+w.fullParams.gap*2;return w.fullParams.position==="bottom"||w.fullParams.position==="top"?w.layout.rootWidth-P:w.layout.rootHeight-P})),y=Y({layout:i,fullParams:r}).pipe(I(f),H(async w=>w),G(w=>{let P=0,S=0;return w.fullParams.position==="bottom"?(S=w.layout.rootHeight,w.fullParams.justify==="start"?P=0:w.fullParams.justify==="center"?P=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(P=w.layout.rootWidth)):w.fullParams.position==="right"?(P=w.layout.rootWidth,w.fullParams.justify==="start"?S=0:w.fullParams.justify==="center"?S=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(S=w.layout.rootHeight)):w.fullParams.position==="top"?(S=0,w.fullParams.justify==="start"?P=0:w.fullParams.justify==="center"?P=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(P=w.layout.rootWidth)):w.fullParams.position==="left"&&(P=0,w.fullParams.justify==="start"?S=0:w.fullParams.justify==="center"?S=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(S=w.layout.rootHeight)),{x:P,y:S}})).pipe(I(f),G(w=>e.selectAll(`g.${s}`).data([w]).join(P=>P.append("g").classed(s,!0).attr("transform",S=>`translate(${S.x}, ${S.y})`),P=>P.transition().attr("transform",S=>`translate(${S.x}, ${S.y})`),P=>P.remove()))),v=r.pipe(I(f),G(w=>w.seriesList[0]?w.seriesList[0]:ak)),x=Y({visibleList:p,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:g,defaultListStyle:v,SeriesLabelColorMap:h,textSizePx:a}).pipe(I(f),H(async w=>w),G(w=>w.seriesLabels.reduce((P,S,N)=>{if(!w.visibleList[N])return P;const R=rx(S,w.textSizePx),A=w.textSizePx*1.5+R,C=w.SeriesLabelColorMap.get(S),T=P[0]&&P[0][0]?P[P.length-1][P[P.length-1].length-1]:null,{translateX:O,translateY:z,lineIndex:k,itemIndex:E}=((F,j,Q)=>{let U=0,X=0,B=0,q=0;if(F.lineDirection==="column"){let V=Q?Q.translateY+F.textSizePx+F.fullParams.gap:0;if(V+F.textSizePx>F.lineMaxSize){B=Q.lineIndex+1,q=0,X=0;const rt=j[j.length-1].reduce((ut,W)=>W.itemWidth>ut?W.itemWidth:ut,0);U=Q.translateX+rt+F.fullParams.gap}else B=Q?Q.lineIndex:0,q=Q?Q.itemIndex+1:0,X=V,U=Q?Q.translateX:0}else{let V=Q?Q.translateX+Q.itemWidth+F.fullParams.gap:0;V+A>F.lineMaxSize?(B=Q.lineIndex+1,q=0,U=0):(B=Q?Q.lineIndex:0,q=Q?Q.itemIndex+1:0,U=V),X=(F.textSizePx+F.fullParams.gap)*B}return{translateX:U,translateY:X,lineIndex:B,itemIndex:q}})(w,P,T);P[k]||(P[k]=[]);const L=w.fullParams.seriesList[E]?w.fullParams.seriesList[E]:w.defaultListStyle;return P[k].push({id:S,seriesLabel:S,seriesIndex:N,lineIndex:k,itemIndex:E,text:S,itemWidth:A,translateX:O,translateY:z,color:C,listRectWidth:L.listRectWidth,listRectHeight:L.listRectHeight,listRectRadius:L.listRectRadius}),P},[])),St(1)),b=Y({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:x,textSizePx:a}).pipe(I(f),H(async w=>w),G(w=>{const{width:P,height:S}=((N,R)=>{let A=0,C=0;if(!R.length||!R[0].length)return{width:A,height:C};const T=R[0][R[0].length-1];return N.lineDirection==="column"?(A=R.reduce((O,z)=>{const k=z.reduce((E,L)=>L.itemWidth>E?L.itemWidth:E,0);return O+k},0),A+=N.fullParams.gap*(R.length-1),C=T.translateY+N.textSizePx):(A=T.translateX+T.itemWidth,C=N.textSizePx*R.length+N.fullParams.gap*(R.length-1)),{width:A,height:C}})(w,w.lengendItems);return{direction:w.lineDirection,width:P,height:S,translateX:w.fullParams.gap,translateY:w.fullParams.gap}}),St(1)),_=Y({fullParams:r,lengendList:b}).pipe(I(f),H(async w=>w),G(w=>{const P=w.lengendList.width+w.fullParams.gap*2,S=w.lengendList.height+w.fullParams.gap*2;let N=0,R=0;return w.fullParams.position==="left"?w.fullParams.justify==="start"?(N=w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(N=w.fullParams.padding,R=-S/2):w.fullParams.justify==="end"&&(N=w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.position==="right"?w.fullParams.justify==="start"?(N=-P-w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(N=-P-w.fullParams.padding,R=-S/2):w.fullParams.justify==="end"&&(N=-P-w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.position==="top"?w.fullParams.justify==="start"?(N=w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(N=-P/2,R=w.fullParams.padding):w.fullParams.justify==="end"&&(N=-P-w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="start"?(N=w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.justify==="center"?(N=-P/2,R=-S-w.fullParams.padding):w.fullParams.justify==="end"&&(N=-P-w.fullParams.padding,R=-S-w.fullParams.padding),{width:P,height:S,translateX:N,translateY:R}})),M=Y({rootPositionSelection:y,fullParams:r,fullChartParams:o,legendCard:_}).pipe(I(f),H(async w=>w),G(w=>w.rootPositionSelection.selectAll("g").data([w.legendCard]).join(P=>P.append("g").classed(u,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.remove()).each((P,S,N)=>{Z(N[S]).selectAll("rect").data([P]).join("rect").attr("width",R=>R.width).attr("height",R=>R.height).attr("fill",Ct(w.fullParams.backgroundFill,w.fullChartParams)).attr("stroke",Ct(w.fullParams.backgroundStroke,w.fullChartParams))}))),D=Y({lengendCardSelection:M,fullParams:r,lengendList:b}).pipe(I(f),H(async w=>w),G(w=>w.lengendCardSelection.selectAll("g").data([w.lengendList]).join(P=>P.append("g").classed(l,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.remove())));return Y({lengendListSelection:D,fullParams:r,fullChartParams:o,lengendItems:x,textSizePx:a}).pipe(I(f),H(async w=>w),G(w=>{const P=w.lengendItems[0]?w.lengendItems.flat():[];return w.lengendListSelection.selectAll(`g.${c}`).data(P).join(S=>S.append("g").classed(c,!0).attr("cursor","default"),S=>S,S=>S.remove()).attr("transform",(S,N)=>`translate(${S.translateX}, ${S.translateY})`).each((S,N,R)=>{const A=w.textSizePx/2,C=-S.listRectWidth/2,T=-S.listRectHeight/2;Z(R[N]).selectAll("rect").data([S]).join("rect").attr("x",A).attr("y",A).attr("width",O=>O.listRectWidth).attr("height",O=>O.listRectHeight).attr("transform",O=>`translate(${C}, ${T})`).attr("fill",O=>O.color).attr("rx",O=>O.listRectRadius),Z(R[N]).selectAll("text").data([S]).join(O=>O.append("text").attr("dominant-baseline","hanging"),O=>O,O=>O.remove()).attr("x",w.textSizePx*1.5).attr("font-size",w.fullChartParams.styles.textSize).attr("fill",O=>w.fullParams.textColorType==="series"?wx(O.seriesIndex,w.fullChartParams):Ct(w.fullParams.textColorType,w.fullChartParams)).text(O=>O.text)})})).subscribe(),()=>{f.next(void 0)}},$x="GridLegend",sk=se($x,fp)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.SeriesDataMap$.pipe(I(i),G(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),G(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Lu($x,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Rh=6;function uk({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:l,groupScaleDomain:c,groupLabels:f,textTransform:h}){const p=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,v,x)=>{Z(x[v]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Ct(r.labelColorType,u)).text(b=>s.grid.groupAxis.label)}).attr("transform",y=>`translate(${a.width+y.tickPadding+r.labelOffset[0]}, ${-y.tickPadding-Rh-r.labelOffset[1]})`);const d=Math.floor(c[1])-Math.ceil(c[0])+1,g=Eg(l).scale(l).ticks(r.ticks==="all"||r.ticks>d?d:r.ticks).tickSize(r.tickFullLine==!0?-a.height:Rh).tickSizeOuter(0).tickFormat(y=>{const v=f[y]??"";return Lh(v,r.tickFormat)}).tickPadding(r.tickPadding),m=p.transition().duration(100).call(g);return m.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),m.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),p.selectAll("text").attr("font-size",u.styles.textSize).style("color",Ct(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Rh}`).style("transform",h),p}const Sx=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const f=new nt,h=at(t,"container"),p=at(t,"xAxisG"),d=at(t,"xAxis"),g=at(t,"groupingLabel"),m=Y({computedData:n.pipe(tt(($,w)=>$.length===w.length)),isSeriesSeprate:c}).pipe(I(f),H(async $=>$),G($=>$.isSeriesSeprate?$.computedData:[$.computedData[0]]),G(($,w)=>e.selectAll(`g.${h}`).data($,P=>P[0]?P[0].seriesIndex:w).join("g").classed(h,!0))),y=m.pipe(I(f),G(($,w)=>$.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));Y({containerSelection:m,gridContainerPosition:l}).pipe(I(f),H(async $=>$)).subscribe($=>{$.containerSelection.attr("transform",(w,P)=>{const S=$.gridContainerPosition[P]??$.gridContainerPosition[0],N=S.translate,R=S.scale;return`translate(${N[0]}, ${N[1]}) scale(${R[0]}, ${R[1]})`})}),Y({axisSelection:y,gridAxesTransform:a}).pipe(I(f),H(async $=>$)).subscribe($=>{$.axisSelection.style("transform",$.gridAxesTransform.value)});const v=Y({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(f),H(async $=>$),G($=>{const w=`translate(${$.gridAxesReverseTransform.translate[0]}px, ${$.gridAxesReverseTransform.translate[1]}px)`,P=`rotate(${$.gridAxesReverseTransform.rotate}deg) rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,S=`scale(${1/$.gridContainerPosition[0].scale[0]}, ${1/$.gridContainerPosition[0].scale[1]})`,R=`rotate(${$.fullDataFormatter.grid.groupAxis.position==="left"&&$.fullDataFormatter.grid.valueAxis.position==="top"||$.fullDataFormatter.grid.groupAxis.position==="right"&&$.fullDataFormatter.grid.valueAxis.position==="bottom"?$.fullParams.tickTextRotate+180:$.fullParams.tickTextRotate}deg)`;return`${w} ${P} ${S} ${R}`}),tt()),x=Y({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(f),H(async $=>$),G($=>{const P=$.computedData[0]?$.computedData[0].length-1:0,S=$.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[0]-$.fullDataFormatter.grid.groupAxis.scalePadding,N=$.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[1]+$.fullDataFormatter.grid.groupAxis.scalePadding;return[S,N]}),St(1)),b=Y({groupScaleDomain:x,gridAxesSize:u}).pipe(I(f),H(async $=>$),G($=>So().domain($.groupScaleDomain).range([0,$.gridAxesSize.width]))),_=n.pipe(G($=>($[0]??[]).map(w=>w.groupLabel))),M=Y({fullDataFormatter:i,fullParams:r}).pipe(I(f),H(async $=>$),G($=>{let w="middle",P="hanging";return $.fullDataFormatter.grid.groupAxis.position==="bottom"?(w=$.fullParams.tickTextRotate?"end":"middle",P="hanging"):$.fullDataFormatter.grid.groupAxis.position==="top"?(w=$.fullParams.tickTextRotate?"end":"middle",P="auto"):$.fullDataFormatter.grid.groupAxis.position==="left"?(w="end",P="middle"):$.fullDataFormatter.grid.groupAxis.position==="right"&&(w="start",P="middle"),{textAnchor:w,dominantBaseline:P}})),D=i.pipe(I(f),G($=>{let w="start",P="hanging";return $.grid.groupAxis.position==="bottom"?P="hanging":$.grid.groupAxis.position==="top"?P="auto":$.grid.groupAxis.position==="left"?w="end":$.grid.groupAxis.position==="right"&&(w="start"),$.grid.valueAxis.position==="left"?w="start":$.grid.valueAxis.position==="right"?w="end":$.grid.valueAxis.position==="bottom"?P="auto":$.grid.valueAxis.position==="top"&&(P="hanging"),{textAnchor:w,dominantBaseline:P}}));return Y({axisSelection:y,params:r,tickTextAlign:M,axisLabelAlign:D,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:b,groupScaleDomain:x,groupLabels:_,textTransform:v}).pipe(I(f),H(async $=>$)).subscribe($=>{uk({selection:$.axisSelection,xAxisClassName:d,groupingLabelClassName:g,params:$.params,tickTextAlign:$.tickTextAlign,axisLabelAlign:$.axisLabelAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,groupScale:$.groupScale,groupScaleDomain:$.groupScaleDomain,groupLabels:$.groupLabels,textTransform:$.textTransform})}),()=>{f.next(void 0)}},Ax="GroupAxis",lk=se(Ax,Fu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=Sx(Ax,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),Mx=6;function ck({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:l,textTransform:c,minAndMax:f}){const h=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,v,x)=>{Z(x[v]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Ct(r.labelColorType,u)).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const p=f[1]-f[0],d=Rg(l).scale(l).ticks(p>r.ticks?r.ticks:f[0]===0&&f[1]===0?1:Math.ceil(p)).tickFormat(y=>Lh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:Mx).tickPadding(r.tickPadding),g=h.transition().duration(100).call(d);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",u.styles.textSize).style("color",Ct(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+Mx} 0`).style("transform",c),h}const ai=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const f=new nt,h=at(t,"container"),p=at(t,"yAxisG"),d=at(t,"yAxis"),g=at(t,"text"),m=Y({computedData:n.pipe(tt((D,$)=>D.length===$.length)),isSeriesSeprate:c}).pipe(I(f),H(async D=>D),G(D=>D.isSeriesSeprate?D.computedData:[D.computedData[0]]),G((D,$)=>e.selectAll(`g.${h}`).data(D,w=>w[0]?w[0].seriesIndex:$).join("g").classed(h,!0))),y=m.pipe(I(f),G((D,$)=>D.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));Y({containerSelection:m,gridContainerPosition:l}).pipe(I(f),H(async D=>D)).subscribe(D=>{D.containerSelection.attr("transform",($,w)=>{const P=D.gridContainerPosition[w]??D.gridContainerPosition[0],S=P.translate,N=P.scale;return`translate(${S[0]}, ${S[1]}) scale(${N[0]}, ${N[1]})`})}),Y({axisSelection:y,gridAxesTransform:a}).pipe(I(f),H(async D=>D)).subscribe(D=>{D.axisSelection.style("transform",D.gridAxesTransform.value)});const v=Y({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(f),H(async D=>D),G(D=>{const $=`translate(${D.gridAxesReverseTransform.translate[0]}px, ${D.gridAxesReverseTransform.translate[1]}px)`,w=`rotate(${D.gridAxesReverseTransform.rotate}deg) rotateX(${D.gridAxesReverseTransform.rotateX}deg) rotateY(${D.gridAxesReverseTransform.rotateY}deg)`,P=`scale(${1/D.gridContainerPosition[0].scale[0]}, ${1/D.gridContainerPosition[0].scale[1]})`,N=`rotate(${D.fullDataFormatter.grid.groupAxis.position==="left"&&D.fullDataFormatter.grid.valueAxis.position==="top"||D.fullDataFormatter.grid.groupAxis.position==="right"&&D.fullDataFormatter.grid.valueAxis.position==="bottom"?D.fullParams.tickTextRotate+180:D.fullParams.tickTextRotate}deg)`;return`${$} ${w} ${P} ${N}`}),tt()),x=new dt(D=>{Y({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(f),H(async $=>$)).subscribe($=>{const P=$.computedData[0]?$.computedData[0].length-1:0,S=$.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[0]-$.fullDataFormatter.grid.groupAxis.scalePadding,N=$.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[1]+$.fullDataFormatter.grid.groupAxis.scalePadding,R=$.computedData.map((C,T)=>C.filter((O,z)=>z>=S&&z<=N)),A=bR(R.flat());D.next(A)})}),b=new dt(D=>{Y({fullDataFormatter:i,gridAxesSize:u,minAndMax:x}).pipe(I(f),H(async $=>$)).subscribe($=>{const w=tg({maxValue:$.minAndMax[1],minValue:$.minAndMax[0],axisWidth:$.gridAxesSize.height,scaleDomain:$.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:$.fullDataFormatter.grid.valueAxis.scaleRange});D.next(w)})}),_=i.pipe(I(f),G(D=>{let $="start",w="hanging";return D.grid.valueAxis.position==="left"?($="end",w="middle"):D.grid.valueAxis.position==="right"?($="start",w="middle"):D.grid.valueAxis.position==="bottom"?($="middle",w="hanging"):D.grid.valueAxis.position==="top"&&($="middle",w="auto"),{textAnchor:$,dominantBaseline:w}})),M=i.pipe(I(f),G(D=>{let $="start",w="hanging";return D.grid.groupAxis.position==="bottom"?w="auto":D.grid.groupAxis.position==="top"?w="hanging":D.grid.groupAxis.position==="left"?$="start":D.grid.groupAxis.position==="right"&&($="end"),D.grid.valueAxis.position==="left"?$="end":D.grid.valueAxis.position==="right"?$="start":D.grid.valueAxis.position==="bottom"?w="hanging":D.grid.valueAxis.position==="top"&&(w="auto"),{textAnchor:$,dominantBaseline:w}}));return Y({axisSelection:y,fullParams:r,tickTextAlign:_,axisLabelAlign:M,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:v,minAndMax:x}).pipe(I(f),H(async D=>D)).subscribe(D=>{ck({selection:D.axisSelection,yAxisClassName:d,textClassName:g,fullParams:D.fullParams,tickTextAlign:D.tickTextAlign,axisLabelAlign:D.axisLabelAlign,gridAxesSize:D.gridAxesSize,fullDataFormatter:D.fullDataFormatter,fullChartParams:D.fullChartParams,valueScale:D.valueScale,textTransform:D.textTransform,minAndMax:D.minAndMax})}),()=>{f.next(void 0)}},Dx="ValueAxis",fk=se(Dx,Gu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=ai(Dx,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),Px="ValueStackAxis",hk=se(Px,lp)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=ai(Px,{selection:t,computedData$:n.computedStackedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),Tx="ScalingArea",pk=at(Tx,"rect"),dk=se(Tx,cp)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new nt,a=e.insert("rect","g").classed(pk,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(I(o)).subscribe(l=>{a.attr("width",l.width).attr("height",l.height).attr("x",l.left).attr("y",l.top)});const u=r.computedData$.pipe(G(l=>l[0]?l[0].length-1:0),tt());return Y({initGroupAxis:r.fullDataFormatter$.pipe(G(l=>l.grid.groupAxis),b_()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(I(o),H(async l=>l)).subscribe(l=>{const f=l.groupMaxIndex,h=l.initGroupAxis.scaleDomain[0]==="auto"?0-l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[0]-l.initGroupAxis.scalePadding,p=l.initGroupAxis.scaleDomain[1]==="auto"?f+l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[1]+l.initGroupAxis.scalePadding,g=tg({maxValue:l.groupMaxIndex,minValue:0,axisWidth:l.axisSize.width,scaleDomain:[h,p],scaleRange:[0,1]}).copy(),m=ex().on("zoom",function(v){const x=v.transform,b=D=>{const $=Math.round(D);return Math.min(f,Math.max(0,$))},_=l.fullDataFormatter.grid.groupAxis.position==="bottom"||l.fullDataFormatter.grid.groupAxis.position==="top"?x.rescaleX(g).domain().map(b):x.rescaleY(g).domain().map(b);_[0]<=0&&_[1]>=f?x.k<s.k&&(x.k=s.k,x.x=s.x,x.y=s.y):_[1]-_[0]<=1&&x.k>s.k&&(x.k=s.k,x.x=s.x,x.y=s.y),s.k=x.k,s.x=x.x,s.y=x.y;const M={...l.fullDataFormatter,grid:{...l.fullDataFormatter.grid,groupAxis:{...l.fullDataFormatter.grid.groupAxis,scaleDomain:_}}};i.dataFormatter$.next(M)});e.call(m)}),()=>{o.next(void 0),a.remove()}}),Cu="GroupAux",kh=at(Cu,"label-box");function gk({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function mk({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=at(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",l=>Ct(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),a.transition().duration(50).attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),u}function yk(t){t.selectAll("line").data([]).exit().remove()}function bk({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:Lh(t,n.labelTextFormat)}]:[]}function vk({selection:t,labelData:e,fullParams:n,fullDataFormatter:r,fullChartParams:i,labelTransform:o,textSizePx:a}){const s=a+4,u=t.selectAll(`g.${kh}`).data(e),l=u.enter().append("g").classed(kh,!0).style("cursor","pointer"),c=l.merge(u);return l.attr("transform",(f,h)=>`translate(${f.x}, ${f.y})`),u.transition().duration(50).attr("transform",(f,h)=>`translate(${f.x}, ${f.y})`),u.exit().remove(),c.each((f,h,p)=>{const d=rx(f.text,a)+12;let g=-d/2,m=-2;r.grid.groupAxis.position==="bottom"?(g=n.labelRotate?-d:-d/2,m=2):r.grid.groupAxis.position==="left"?(g=-d+2,m=-s/2):r.grid.groupAxis.position==="right"?(g=-2,m=-s/2):r.grid.groupAxis.position==="top"&&(g=n.labelRotate?-d:-d/2,m=-s+2);const y=Z(p[h]).selectAll("rect").data([f]),v=y.enter().append("rect").attr("height",`${s}px`).attr("fill",_=>Ct(n.labelColorType,i)).attr("x",g).attr("y",m).attr("rx",5).attr("ry",5).style("cursor","pointer");y.merge(v).attr("width",_=>`${d}px`).style("transform",o),y.exit().remove();const x=Z(p[h]).selectAll("text").data([f]),b=x.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");x.merge(b).text(_=>_.text).style("transform",o).attr("fill",_=>Ct(n.labelTextColorType,i)).attr("font-size",i.styles.textSize).attr("x",g+6).attr("y",m),x.exit().remove()}),c}function xk(t){t.selectAll(`g.${kh}`).data([]).exit().remove()}const _k=se(Cu,Nu)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new nt;let a=!1;const s=e.insert("rect","g").classed(at(Cu,"rect"),!0).attr("opacity",0),{seriesSelection$:u,axesSelection$:l,defsSelection$:c,graphicGSelection$:f}=ar({selection:t,pluginName:Cu,clipPathID:"test",seriesLabels$:i.seriesLabels$,gridContainerPosition$:i.gridContainerPosition$,gridAxesTransform$:i.gridAxesTransform$,gridGraphicTransform$:i.gridGraphicTransform$});i.layout$.pipe(I(o)).subscribe(_=>{s.attr("width",_.rootWidth).attr("height",_.rootHeight)});const h=Y({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(I(o),H(async _=>_),G(_=>{const D=_.computedData[0]?_.computedData[0].length-1:0,$=_.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[0]-_.fullDataFormatter.grid.groupAxis.scalePadding,w=_.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?D+_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[1]+_.fullDataFormatter.grid.groupAxis.scalePadding;return[$,w]}),St(1)),p=Y({groupScaleDomain:h,gridAxesSize:i.gridAxesSize$}).pipe(I(o),H(async _=>_),G(_=>So().domain(_.groupScaleDomain).range([0,_.gridAxesSize.width]))),d=i.fullChartParams$.pipe(I(o),G(_=>_.highlightTarget),tt()),g=Ch(e,"mousemove").pipe(I(o)),m=Y({fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,gridAxesReverseTransform:i.gridAxesReverseTransform$,gridContainerPosition:i.gridContainerPosition$}).pipe(I(o),H(async _=>_),G(_=>{const M=`translate(${_.gridAxesReverseTransform.translate[0]}px, ${_.gridAxesReverseTransform.translate[1]}px)`,D=`rotate(${_.gridAxesReverseTransform.rotate}deg) rotateX(${_.gridAxesReverseTransform.rotateX}deg) rotateY(${_.gridAxesReverseTransform.rotateY}deg)`,$=`scale(${1/_.gridContainerPosition[0].scale[0]}, ${1/_.gridContainerPosition[0].scale[1]})`,P=`rotate(${_.fullDataFormatter.grid.groupAxis.position==="left"&&_.fullDataFormatter.grid.valueAxis.position==="top"||_.fullDataFormatter.grid.groupAxis.position==="right"&&_.fullDataFormatter.grid.valueAxis.position==="bottom"?_.fullParams.labelRotate+180:_.fullParams.labelRotate}deg)`;return`${M} ${D} ${$} ${P}`}),tt()),y=i.gridContainerPosition$.pipe(I(o),G(_=>_.reduce((D,$)=>$.columnIndex>D?$.columnIndex:D,0)+1),tt()),v=i.gridContainerPosition$.pipe(I(o),G(_=>_.reduce((D,$)=>$.rowIndex>D?$.rowIndex:D,0)+1),tt()),x=vR({rootSelection:e,fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$,gridContainerPosition$:i.gridContainerPosition$,layout$:i.layout$}).pipe(I(o));Y({axesSelection:l,columnAmount:y,rowAmount:v,layout:i.layout$,rootMousemove:g,gridGroupPosition:x,computedData:i.computedData$,groupScale:p,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,fullChartParams:i.fullChartParams$,highlightTarget:d,labelTransform:m,GroupDataMap:i.GroupDataMap$,textSizePx:i.textSizePx$}).subscribe(_=>{const{groupIndex:M,groupLabel:D}=_.gridGroupPosition,$=_.groupScale(M)??0,w=gk({groupLabel:D,axisX:$,axisHeight:_.gridAxesSize.height,fullParams:_.fullParams});mk({selection:_.axesSelection,pluginName:n,lineData:w,fullParams:_.fullParams,fullChartParams:_.fullChartParams});const P=bk({groupLabel:D,axisX:$,fullParams:_.fullParams});vk({selection:_.axesSelection,labelData:P,fullParams:_.fullParams,fullDataFormatter:_.fullDataFormatter,fullChartParams:_.fullChartParams,labelTransform:_.labelTransform,textSizePx:_.textSizePx}).on("mouseover",(N,R)=>{N.stopPropagation(),a=!0,r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(D)??[],groupIndex:M,groupLabel:D,event:N,data:_.computedData})}).on("mousemove",(N,R)=>{N.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(D)??[],groupIndex:M,groupLabel:D,event:N,data:_.computedData})}).on("click",(N,R)=>{N.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(D)??[],groupIndex:M,groupLabel:D,event:N,data:_.computedData})})});const b=Ch(s,"mouseout").pipe(I(o));return Y({rootRectMouseout:b,axesSelection:l}).pipe(I(o),H(async _=>_)).subscribe(_=>{setTimeout(()=>{a!=!0&&(yk(_.axesSelection),xk(_.axesSelection))})}),()=>{o.next(void 0),s.remove()}}),Lx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}],textColorType:"primary"},Ih={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]};Ih.tickFormat.toString=()=>"text => text";const Eu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},wk={...Eu},Cx={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},Ex={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},Rx={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},kx={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},Ix={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},Nx={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},Nh={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},Fx={...Nh},Gx="MultiGridLegend",$k=pe(Gx,Lx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.multiGridEachDetail$.pipe(I(i),G(l=>l.map((f,h)=>f.SeriesDataMap$.pipe(G(p=>Array.from(p.keys()))))),H(l=>Y(l)),G(l=>l.flat())),a=Y({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(I(i),H(async l=>l),G(l=>l.computedData.map((c,f)=>{const h=vl(l.fullParams.gridList[f]??{},{listRectWidth:l.fullParams.listRectWidth,listRectHeight:l.fullParams.listRectHeight,listRectRadius:l.fullParams.listRectRadius});return c.map(p=>h)}).flat())),s=Y({fullParams:n.fullParams$,seriesList:a}).pipe(I(i),H(async l=>l),G(l=>({...l.fullParams,seriesList:l.seriesList}))),u=Lu(Gx,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),Ce=t=>{const e=t.fullParams$.pipe(G(n=>n.gridIndexes),tt(),St(1));return Y({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(G(n=>n.gridIndexes==="all"?n.multiGridEachDetail:n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Fh="MultiBars",zx=at(Fh,"grid"),Sk=pe(Fh,Cx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${zx}`).data(s).join("g").attr("class",zx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=Eh(Fh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Gh="MultiBarStack",Ox=at(Gh,"grid"),Ak=pe(Gh,Ex)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Ox}`).data(s).join("g").attr("class",Ox).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=dx(Gh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),zh="MultiBarsTriangle",Ux=at(zh,"grid"),Mk=pe(zh,Rx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Ux}`).data(s).join("g").attr("class",Ux).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=bx(zh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,fullDataFormatter$:u.dataFormatter$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Oh="MultiLines",Bx=at(Oh,"grid"),Dk=pe(Oh,kx)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new nt,a=[],s=i.multiGridContainerPosition$.pipe(I(o),G(l=>l.flat()));return Ce(i).pipe(I(o)).subscribe(l=>{a.forEach(c=>c()),t.selectAll(`g.${Bx}`).data(l).join("g").attr("class",Bx).each((c,f,h)=>{const p=Z(h[f]);a[f]=ox(Oh,{selection:p,computedData$:c.computedData$,computedLayoutData$:c.computedLayoutData$,visibleComputedData$:c.visibleComputedData$,visibleComputedLayoutData$:c.visibleComputedLayoutData$,seriesLabels$:c.seriesLabels$,SeriesDataMap$:c.SeriesDataMap$,GroupDataMap$:c.GroupDataMap$,fullDataFormatter$:c.dataFormatter$,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,gridAxesTransform$:c.gridAxesTransform$,gridGraphicTransform$:c.gridGraphicTransform$,gridAxesSize$:c.gridAxesSize$,gridHighlight$:c.gridHighlight$,gridContainerPosition$:c.gridContainerPosition$,allContainerPosition$:s,layout$:i.layout$,event$:r.event$})})}),()=>{o.next(void 0),a.forEach(l=>l())}}),Uh="MultiLineAreas",Yx=at(Uh,"grid"),Pk=pe(Uh,Ix)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.multiGridContainerPosition$.pipe(I(i),G(u=>u.flat()));return Ce(r).pipe(I(i)).subscribe(u=>{o.forEach(l=>l()),t.selectAll(`g.${Yx}`).data(u).join("g").attr("class",Yx).each((l,c,f)=>{const h=Z(f[c]);o[c]=sx(Uh,{selection:h,computedData$:l.computedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedData$:l.visibleComputedData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullDataFormatter$:l.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,allContainerPosition$:a,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(u=>u())}}),Bh="MultiDots",Hx=at(Bh,"grid"),Tk=pe(Bh,Nx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Hx}`).data(s).join("g").attr("class",Hx).each((u,l,c)=>{const f=Z(c[l]);o[l]=xx(Bh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Yh="MultiGroupAxis",Wx=at(Yh,"grid"),Lk=pe(Yh,Ih)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Wx}`).data(s).join("g").attr("class",Wx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=Sx(Yh,{selection:f,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Hh="MultiValueAxis",Vx=at(Hh,"grid"),Ck=pe(Hh,Eu)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Vx}`).data(s).join("g").attr("class",Vx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=ai(Hh,{selection:f,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Wh="MultiValueStackAxis",jx=at(Wh,"grid"),Ek=pe(Wh,Eu)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${jx}`).data(s).join("g").attr("class",jx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=ai(Wh,{selection:f,computedData$:u.computedStackedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function Rk(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function qx(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:Rk(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),c=(t.width-r*(o-1))/o,f=(t.height-r*(i-1))/i,h=u*c+u*r,p=l*f+l*r,d=[h,p],g=[c/t.width,f/t.height];return{slotIndex:s,rowIndex:l,columnIndex:u,translate:d,scale:g}})}const Xx=({fullDataFormatter$:t,layout$:e})=>{const n=new nt;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,l=0,c=0,f=0,h=0;return i.position==="bottom"?o.position==="left"?(f=180,l=s):o.position==="right"?(f=180,h=180,u=a,l=s):(f=180,l=s):i.position==="top"?o.position==="left"||(o.position==="right"?(h=180,u=a):(f=180,l=s)):i.position==="left"?o.position==="bottom"?(c=-90,l=s):o.position==="top"?(c=-90,h=180):(f=180,l=s):i.position==="right"?o.position==="bottom"?(c=-90,f=180,l=s,u=a):o.position==="top"?(c=-90,f=180,h=180,u=a):(f=180,l=s):(f=180,l=s),{translate:[u,l],scale:[1,1],rotate:c,rotateX:f,rotateY:h,value:`translate(${u}px, ${l}px) rotate(${c}deg) rotateX(${f}deg) rotateY(${h}deg)`}}return new dt(i=>(Y({fullDataFormatter:t,layout:e}).pipe(I(n),H(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},Zx=({gridAxesTransform$:t})=>t.pipe(G(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),Kx=({computedData$:t,fullDataFormatter$:e,layout$:n})=>Y({computedData:t,fullDataFormatter:e,layout:n}).pipe(H(async i=>i),G(i=>{if(i.fullDataFormatter.grid.separateSeries)return qx(i.layout,i.fullDataFormatter.container,i.computedData.length);{const o=qx(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((a,s)=>o[0])}})),Vh="OverlappingValueAxes",Qx=at(Vh,"grid"),kk=pe(Vh,Nh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[1])),u=Y({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),H(async c=>c),G(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Yo(r).pipe(I(i),G(c=>({...c,fullParams$:c.fullParams$.pipe(G(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),H(c=>Ce(c)),G(c=>c.map((f,h)=>{if(h===0)return f;const p=Xx({fullDataFormatter$:u,layout$:r.layout$}),d=Zx({gridAxesTransform$:p}),g=Kx({computedData$:f.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...f,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${Qx}`).data(c).join("g").attr("class",Qx).each((f,h,p)=>{if(h>1)return;const d=Z(p[h]);o[h]=ai(Vh,{selection:d,computedData$:f.computedData$,fullParams$:r.fullParams$.pipe(G(g=>h===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),jh="OverlappingValueStackAxes",Jx=at(jh,"grid"),Ik=pe(jh,Fx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[1])),u=Y({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),H(async c=>c),G(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Yo(r).pipe(I(i),G(c=>({...c,fullParams$:c.fullParams$.pipe(G(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),H(c=>Ce(c)),G(c=>c.map((f,h)=>{if(h===0)return f;const p=Xx({fullDataFormatter$:u,layout$:r.layout$}),d=Zx({gridAxesTransform$:p}),g=Kx({computedData$:f.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...f,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${Jx}`).data(c).join("g").attr("class",Jx).each((f,h,p)=>{if(h>1)return;const d=Z(p[h]);o[h]=ai(jh,{selection:d,computedData$:h===0?f.computedStackedData$:f.computedData$,fullParams$:r.fullParams$.pipe(G(g=>h===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),t2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},qh={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null};qh.textRenderFn.toString=()=>`(eventData) => {
|
15
|
+
`})}function JR({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function tk({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1):Z(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const bx=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:u,GroupDataMap$:l,fullParams$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:v})=>{const x=new nt,b=$n(t,"clipPath-box"),_=at(t,"pathG"),M=at(t,"path"),{seriesSelection$:D,axesSelection$:$,defsSelection$:w,graphicGSelection$:P}=ar({selection:e,pluginName:t,clipPathID:b,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p});p.pipe(I(x),G(L=>-L.translate[1]/L.scale[1]));const S=o.pipe(G(L=>L.map(F=>F[0]?F[0].axisY-F[0].axisYFromZero:0)),tt()),N=Y({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:y}).pipe(I(x),H(async L=>L),G(L=>L.params.barWidth?L.params.barWidth:L.isSeriesSeprate?yx({axisWidth:L.gridAxesSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barAmountOfGroup:1,barPadding:L.params.barPadding,barGroupPadding:L.params.barGroupPadding}):yx({axisWidth:L.gridAxesSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barAmountOfGroup:L.visibleComputedData.length,barPadding:L.params.barPadding,barGroupPadding:L.params.barGroupPadding}))),R=i.pipe(I(x),G(L=>{const F=new Set;return L.forEach(j=>{j.forEach(Q=>{F.add(Q.groupLabel)})}),Array.from(F)})),A=new dt(L=>{Y({seriesLabels:s,barWidth:N,params:c}).pipe(I(x),H(async F=>F)).subscribe(F=>{const j=qR(F.barWidth,F.seriesLabels,F.params);L.next(j)})}),C=f.pipe(I(x),G(L=>L.transitionDuration),tt()),T=new dt(L=>{Y({groupLabels:R,transitionDuration:C}).pipe(H(async F=>F)).subscribe(F=>{const j=XR(F.groupLabels.length,F.transitionDuration);L.next(j)})}).pipe(I(x),tt()),O=new dt(L=>{Y({groupLabels:R,transitionDuration:C}).pipe(H(async F=>F)).subscribe(F=>{const j=ZR(F.groupLabels.length,F.transitionDuration);L.next(j)})}).pipe(I(x),tt());Y({defsSelection:w,gridAxesSize:d}).pipe(I(x),H(async L=>L)).subscribe(L=>{const F=[{id:b,width:L.gridAxesSize.width,height:L.gridAxesSize.height}];JR({defsSelection:L.defsSelection,clipPathData:F})});const z=f.pipe(I(x),G(L=>L.highlightTarget),tt()),k=s.pipe(I(x),G(L=>L.map((F,j)=>$n(t,`lineargradient-${F}`)))),E=Y({graphicGSelection:P,defsSelection:w,computedData:n,visibleComputedLayoutData:o,linearGradientIds:k,zeroYArr:S,groupLabels:R,barScale:A,params:c,chartParams:f,barWidth:N,delayGroup:T,transitionItem:O,isSeriesSeprate:y}).pipe(I(x),H(async L=>L),G(L=>(QR({defsSelection:L.defsSelection,computedData:L.computedData,linearGradientIds:L.linearGradientIds,params:L.params}),KR({graphicGSelection:L.graphicGSelection,pathGClassName:_,pathClassName:M,visibleComputedLayoutData:L.visibleComputedLayoutData,linearGradientIds:L.linearGradientIds,zeroYArr:L.zeroYArr,groupLabels:L.groupLabels,barScale:L.barScale,params:L.params,chartParams:L.chartParams,barWidth:L.barWidth,delayGroup:L.delayGroup,transitionItem:L.transitionItem,isSeriesSeprate:L.isSeriesSeprate}))));return Y({barSelection:E,computedData:n,highlightTarget:z,SeriesDataMap:u,GroupDataMap:l}).subscribe(L=>{L.barSelection.on("mouseover",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})}).on("mousemove",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})}).on("mouseout",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})}).on("click",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})})}),Y({barSelection:E,highlight:g.pipe(G(L=>L.map(F=>F.id))),fullChartParams:f}).pipe(I(x),H(async L=>L)).subscribe(L=>{tk({selection:L.barSelection,ids:L.highlight,fullChartParams:L.fullChartParams})}),()=>{x.next(void 0)}},vx="BarsTriangle",ek=se(vx,up)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=bx(vx,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,fullDataFormatter$:r.fullDataFormatter$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function nk({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let u=0;return t.each((c,f,h)=>{Z(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(u=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,g)=>{Z(g[d]).selectAll("circle").data([p]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,v)=>d*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>Tu({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>Tu({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function rk({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1).transition("highlight").duration(200):Z(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function ik({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const xx=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const v=new nt,x=$n(t,"clipPath-box"),b=at(t,"circleG"),_=at(t,"circle"),{seriesSelection$:M,axesSelection$:D,defsSelection$:$,graphicGSelection$:w}=ar({selection:e,pluginName:t,clipPathID:x,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:h}),P=Y({computedData:n,gridGraphicReverseScale:p}).pipe(I(v),H(async A=>A),G(A=>A.computedData.map((C,T)=>A.gridGraphicReverseScale[T])));Y({defsSelection:$,gridAxesSize:d}).pipe(I(v),H(async A=>A)).subscribe(A=>{const C=[{id:x,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];ik({defsSelection:A.defsSelection,clipPathData:C})});const S=c.pipe(I(v),G(A=>A.highlightTarget),tt()),N=Y({graphicGSelection:w,visibleComputedLayoutData:o,graphicReverseScale:P,fullChartParams:c,fullParams:l}).pipe(I(v),H(async A=>A),G(A=>nk({graphicGSelection:A.graphicGSelection,circleGClassName:b,circleClassName:_,visibleComputedLayoutData:A.visibleComputedLayoutData,fullParams:A.fullParams,fullChartParams:A.fullChartParams,graphicReverseScale:A.graphicReverseScale})));Y({graphicSelection:N,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:S}).pipe(I(v),H(async A=>A)).subscribe(A=>{A.graphicSelection.on("mouseover",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:A.highlightTarget,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C,data:A.computedData})}).on("mousemove",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:A.highlightTarget,data:A.computedData,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C})}).on("mouseout",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:A.highlightTarget,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C,data:A.computedData})}).on("click",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:A.highlightTarget,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C,data:A.computedData})})});const R=l.pipe(I(v),G(A=>A.onlyShowHighlighted),tt());return Y({graphicSelection:N,highlight:g.pipe(G(A=>A.map(C=>C.id))),onlyShowHighlighted:R,fullChartParams:c}).pipe(I(v),H(async A=>A)).subscribe(A=>{rk({selection:A.graphicSelection,ids:A.highlight,onlyShowHighlighted:A.onlyShowHighlighted,fullChartParams:A.fullChartParams})}),()=>{v.next(void 0)}},_x="Dots",ok=se(_x,ap)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=xx(_x,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,event$:n.event$});return()=>{i.next(void 0),o()}}),ak={listRectWidth:14,listRectHeight:14,listRectRadius:0};function wx(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}const Lu=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=at(t,"root-position"),u=at(t,"legend-card"),l=at(t,"legend-list"),c=at(t,"legend-item"),f=new nt,h=Y({seriesLabels:n,fullChartParams:o}).pipe(I(f),H(async w=>w),G(w=>{const P=new Map;let S=0;return w.seriesLabels.forEach((N,R)=>{if(!P.has(N)){const A=wx(S,w.fullChartParams);P.set(N,A),S++}}),P})),p=n.pipe(I(f),G(w=>{const P=new Set;let S=[];return w.forEach(N=>{P.has(N)?S.push(!1):S.push(!0),P.add(N)}),S})),d=r.pipe(I(f),G(w=>w.position==="bottom"||w.position==="top"?"row":"column")),g=Y({fullParams:r,layout:i}).pipe(I(f),H(async w=>w),G(w=>{const P=w.fullParams.padding*2+w.fullParams.gap*2;return w.fullParams.position==="bottom"||w.fullParams.position==="top"?w.layout.rootWidth-P:w.layout.rootHeight-P})),y=Y({layout:i,fullParams:r}).pipe(I(f),H(async w=>w),G(w=>{let P=0,S=0;return w.fullParams.position==="bottom"?(S=w.layout.rootHeight,w.fullParams.justify==="start"?P=0:w.fullParams.justify==="center"?P=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(P=w.layout.rootWidth)):w.fullParams.position==="right"?(P=w.layout.rootWidth,w.fullParams.justify==="start"?S=0:w.fullParams.justify==="center"?S=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(S=w.layout.rootHeight)):w.fullParams.position==="top"?(S=0,w.fullParams.justify==="start"?P=0:w.fullParams.justify==="center"?P=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(P=w.layout.rootWidth)):w.fullParams.position==="left"&&(P=0,w.fullParams.justify==="start"?S=0:w.fullParams.justify==="center"?S=w.layout.rootHeight/2:w.fullParams.justify==="end"&&(S=w.layout.rootHeight)),{x:P,y:S}})).pipe(I(f),G(w=>e.selectAll(`g.${s}`).data([w]).join(P=>P.append("g").classed(s,!0).attr("transform",S=>`translate(${S.x}, ${S.y})`),P=>P.transition().attr("transform",S=>`translate(${S.x}, ${S.y})`),P=>P.remove()))),v=r.pipe(I(f),G(w=>w.seriesList[0]?w.seriesList[0]:ak)),x=Y({visibleList:p,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:g,defaultListStyle:v,SeriesLabelColorMap:h,textSizePx:a}).pipe(I(f),H(async w=>w),G(w=>w.seriesLabels.reduce((P,S,N)=>{if(!w.visibleList[N])return P;const R=rx(S,w.textSizePx),A=w.textSizePx*1.5+R,C=w.SeriesLabelColorMap.get(S),T=P[0]&&P[0][0]?P[P.length-1][P[P.length-1].length-1]:null,{translateX:O,translateY:z,lineIndex:k,itemIndex:E}=((F,j,Q)=>{let U=0,X=0,B=0,q=0;if(F.lineDirection==="column"){let V=Q?Q.translateY+F.textSizePx+F.fullParams.gap:0;if(V+F.textSizePx>F.lineMaxSize){B=Q.lineIndex+1,q=0,X=0;const rt=j[j.length-1].reduce((ut,W)=>W.itemWidth>ut?W.itemWidth:ut,0);U=Q.translateX+rt+F.fullParams.gap}else B=Q?Q.lineIndex:0,q=Q?Q.itemIndex+1:0,X=V,U=Q?Q.translateX:0}else{let V=Q?Q.translateX+Q.itemWidth+F.fullParams.gap:0;V+A>F.lineMaxSize?(B=Q.lineIndex+1,q=0,U=0):(B=Q?Q.lineIndex:0,q=Q?Q.itemIndex+1:0,U=V),X=(F.textSizePx+F.fullParams.gap)*B}return{translateX:U,translateY:X,lineIndex:B,itemIndex:q}})(w,P,T);P[k]||(P[k]=[]);const L=w.fullParams.seriesList[E]?w.fullParams.seriesList[E]:w.defaultListStyle;return P[k].push({id:S,seriesLabel:S,seriesIndex:N,lineIndex:k,itemIndex:E,text:S,itemWidth:A,translateX:O,translateY:z,color:C,listRectWidth:L.listRectWidth,listRectHeight:L.listRectHeight,listRectRadius:L.listRectRadius}),P},[])),St(1)),b=Y({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:x,textSizePx:a}).pipe(I(f),H(async w=>w),G(w=>{const{width:P,height:S}=((N,R)=>{let A=0,C=0;if(!R.length||!R[0].length)return{width:A,height:C};const T=R[0][R[0].length-1];return N.lineDirection==="column"?(A=R.reduce((O,z)=>{const k=z.reduce((E,L)=>L.itemWidth>E?L.itemWidth:E,0);return O+k},0),A+=N.fullParams.gap*(R.length-1),C=T.translateY+N.textSizePx):(A=T.translateX+T.itemWidth,C=N.textSizePx*R.length+N.fullParams.gap*(R.length-1)),{width:A,height:C}})(w,w.lengendItems);return{direction:w.lineDirection,width:P,height:S,translateX:w.fullParams.gap,translateY:w.fullParams.gap}}),St(1)),_=Y({fullParams:r,lengendList:b}).pipe(I(f),H(async w=>w),G(w=>{const P=w.lengendList.width+w.fullParams.gap*2,S=w.lengendList.height+w.fullParams.gap*2;let N=0,R=0;return w.fullParams.position==="left"?w.fullParams.justify==="start"?(N=w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(N=w.fullParams.padding,R=-S/2):w.fullParams.justify==="end"&&(N=w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.position==="right"?w.fullParams.justify==="start"?(N=-P-w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(N=-P-w.fullParams.padding,R=-S/2):w.fullParams.justify==="end"&&(N=-P-w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.position==="top"?w.fullParams.justify==="start"?(N=w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(N=-P/2,R=w.fullParams.padding):w.fullParams.justify==="end"&&(N=-P-w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="start"?(N=w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.justify==="center"?(N=-P/2,R=-S-w.fullParams.padding):w.fullParams.justify==="end"&&(N=-P-w.fullParams.padding,R=-S-w.fullParams.padding),{width:P,height:S,translateX:N,translateY:R}})),M=Y({rootPositionSelection:y,fullParams:r,fullChartParams:o,legendCard:_}).pipe(I(f),H(async w=>w),G(w=>w.rootPositionSelection.selectAll("g").data([w.legendCard]).join(P=>P.append("g").classed(u,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.remove()).each((P,S,N)=>{Z(N[S]).selectAll("rect").data([P]).join("rect").attr("width",R=>R.width).attr("height",R=>R.height).attr("fill",Ct(w.fullParams.backgroundFill,w.fullChartParams)).attr("stroke",Ct(w.fullParams.backgroundStroke,w.fullChartParams))}))),D=Y({lengendCardSelection:M,fullParams:r,lengendList:b}).pipe(I(f),H(async w=>w),G(w=>w.lengendCardSelection.selectAll("g").data([w.lengendList]).join(P=>P.append("g").classed(l,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.remove())));return Y({lengendListSelection:D,fullParams:r,fullChartParams:o,lengendItems:x,textSizePx:a}).pipe(I(f),H(async w=>w),G(w=>{const P=w.lengendItems[0]?w.lengendItems.flat():[];return w.lengendListSelection.selectAll(`g.${c}`).data(P).join(S=>S.append("g").classed(c,!0).attr("cursor","default"),S=>S,S=>S.remove()).attr("transform",(S,N)=>`translate(${S.translateX}, ${S.translateY})`).each((S,N,R)=>{const A=w.textSizePx/2,C=-S.listRectWidth/2,T=-S.listRectHeight/2;Z(R[N]).selectAll("rect").data([S]).join("rect").attr("x",A).attr("y",A).attr("width",O=>O.listRectWidth).attr("height",O=>O.listRectHeight).attr("transform",O=>`translate(${C}, ${T})`).attr("fill",O=>O.color).attr("rx",O=>O.listRectRadius),Z(R[N]).selectAll("text").data([S]).join(O=>O.append("text").attr("dominant-baseline","hanging"),O=>O,O=>O.remove()).attr("x",w.textSizePx*1.5).attr("font-size",w.fullChartParams.styles.textSize).attr("fill",O=>w.fullParams.textColorType==="series"?wx(O.seriesIndex,w.fullChartParams):Ct(w.fullParams.textColorType,w.fullChartParams)).text(O=>O.text)})})).subscribe(),()=>{f.next(void 0)}},$x="GridLegend",sk=se($x,fp)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.SeriesDataMap$.pipe(I(i),G(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),G(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Lu($x,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Rh=6;function uk({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:l,groupScaleDomain:c,groupLabels:f,textTransform:h}){const p=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,v,x)=>{Z(x[v]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Ct(r.labelColorType,u)).text(b=>s.grid.groupAxis.label)}).attr("transform",y=>`translate(${a.width+y.tickPadding+r.labelOffset[0]}, ${-y.tickPadding-Rh-r.labelOffset[1]})`);const d=Math.floor(c[1])-Math.ceil(c[0])+1,g=Eg(l).scale(l).ticks(r.ticks==="all"||r.ticks>d?d:r.ticks).tickSize(r.tickFullLine==!0?-a.height:Rh).tickSizeOuter(0).tickFormat(y=>{const v=f[y]??"";return Lh(v,r.tickFormat)}).tickPadding(r.tickPadding),m=p.transition().duration(100).call(g);return m.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),m.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),p.selectAll("text").attr("font-size",u.styles.textSize).style("color",Ct(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Rh}`).style("transform",h),p}const Sx=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const f=new nt,h=at(t,"container"),p=at(t,"xAxisG"),d=at(t,"xAxis"),g=at(t,"groupingLabel"),m=Y({computedData:n.pipe(tt(($,w)=>$.length===w.length)),isSeriesSeprate:c}).pipe(I(f),H(async $=>$),G($=>$.isSeriesSeprate?$.computedData:[$.computedData[0]]),G(($,w)=>e.selectAll(`g.${h}`).data($,P=>P[0]?P[0].seriesIndex:w).join("g").classed(h,!0))),y=m.pipe(I(f),G(($,w)=>$.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));Y({containerSelection:m,gridContainerPosition:l}).pipe(I(f),H(async $=>$)).subscribe($=>{$.containerSelection.attr("transform",(w,P)=>{const S=$.gridContainerPosition[P]??$.gridContainerPosition[0],N=S.translate,R=S.scale;return`translate(${N[0]}, ${N[1]}) scale(${R[0]}, ${R[1]})`})}),Y({axisSelection:y,gridAxesTransform:a}).pipe(I(f),H(async $=>$)).subscribe($=>{$.axisSelection.style("transform",$.gridAxesTransform.value)});const v=Y({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(f),H(async $=>$),G($=>{const w=`translate(${$.gridAxesReverseTransform.translate[0]}px, ${$.gridAxesReverseTransform.translate[1]}px)`,P=`rotate(${$.gridAxesReverseTransform.rotate}deg) rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,S=`scale(${1/$.gridContainerPosition[0].scale[0]}, ${1/$.gridContainerPosition[0].scale[1]})`,R=`rotate(${$.fullDataFormatter.grid.groupAxis.position==="left"&&$.fullDataFormatter.grid.valueAxis.position==="top"||$.fullDataFormatter.grid.groupAxis.position==="right"&&$.fullDataFormatter.grid.valueAxis.position==="bottom"?$.fullParams.tickTextRotate+180:$.fullParams.tickTextRotate}deg)`;return`${w} ${P} ${S} ${R}`}),tt()),x=Y({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(f),H(async $=>$),G($=>{const P=$.computedData[0]?$.computedData[0].length-1:0,S=$.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[0]-$.fullDataFormatter.grid.groupAxis.scalePadding,N=$.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[1]+$.fullDataFormatter.grid.groupAxis.scalePadding;return[S,N]}),St(1)),b=Y({groupScaleDomain:x,gridAxesSize:u}).pipe(I(f),H(async $=>$),G($=>So().domain($.groupScaleDomain).range([0,$.gridAxesSize.width]))),_=n.pipe(G($=>($[0]??[]).map(w=>w.groupLabel))),M=Y({fullDataFormatter:i,fullParams:r}).pipe(I(f),H(async $=>$),G($=>{let w="middle",P="hanging";return $.fullDataFormatter.grid.groupAxis.position==="bottom"?(w=$.fullParams.tickTextRotate?"end":"middle",P="hanging"):$.fullDataFormatter.grid.groupAxis.position==="top"?(w=$.fullParams.tickTextRotate?"end":"middle",P="auto"):$.fullDataFormatter.grid.groupAxis.position==="left"?(w="end",P="middle"):$.fullDataFormatter.grid.groupAxis.position==="right"&&(w="start",P="middle"),{textAnchor:w,dominantBaseline:P}})),D=i.pipe(I(f),G($=>{let w="start",P="hanging";return $.grid.groupAxis.position==="bottom"?P="hanging":$.grid.groupAxis.position==="top"?P="auto":$.grid.groupAxis.position==="left"?w="end":$.grid.groupAxis.position==="right"&&(w="start"),$.grid.valueAxis.position==="left"?w="start":$.grid.valueAxis.position==="right"?w="end":$.grid.valueAxis.position==="bottom"?P="auto":$.grid.valueAxis.position==="top"&&(P="hanging"),{textAnchor:w,dominantBaseline:P}}));return Y({axisSelection:y,params:r,tickTextAlign:M,axisLabelAlign:D,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:b,groupScaleDomain:x,groupLabels:_,textTransform:v}).pipe(I(f),H(async $=>$)).subscribe($=>{uk({selection:$.axisSelection,xAxisClassName:d,groupingLabelClassName:g,params:$.params,tickTextAlign:$.tickTextAlign,axisLabelAlign:$.axisLabelAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,groupScale:$.groupScale,groupScaleDomain:$.groupScaleDomain,groupLabels:$.groupLabels,textTransform:$.textTransform})}),()=>{f.next(void 0)}},Ax="GroupAxis",lk=se(Ax,Fu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=Sx(Ax,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),Mx=6;function ck({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:l,textTransform:c,minAndMax:f}){const h=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,v,x)=>{Z(x[v]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Ct(r.labelColorType,u)).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const p=f[1]-f[0],d=Rg(l).scale(l).ticks(p>r.ticks?r.ticks:f[0]===0&&f[1]===0?1:Math.ceil(p)).tickFormat(y=>Lh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:Mx).tickPadding(r.tickPadding),g=h.transition().duration(100).call(d);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",u.styles.textSize).style("color",Ct(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+Mx} 0`).style("transform",c),h}const ai=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const f=new nt,h=at(t,"container"),p=at(t,"yAxisG"),d=at(t,"yAxis"),g=at(t,"text"),m=Y({computedData:n.pipe(tt((D,$)=>D.length===$.length)),isSeriesSeprate:c}).pipe(I(f),H(async D=>D),G(D=>D.isSeriesSeprate?D.computedData:[D.computedData[0]]),G((D,$)=>e.selectAll(`g.${h}`).data(D,w=>w[0]?w[0].seriesIndex:$).join("g").classed(h,!0))),y=m.pipe(I(f),G((D,$)=>D.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));Y({containerSelection:m,gridContainerPosition:l}).pipe(I(f),H(async D=>D)).subscribe(D=>{D.containerSelection.attr("transform",($,w)=>{const P=D.gridContainerPosition[w]??D.gridContainerPosition[0],S=P.translate,N=P.scale;return`translate(${S[0]}, ${S[1]}) scale(${N[0]}, ${N[1]})`})}),Y({axisSelection:y,gridAxesTransform:a}).pipe(I(f),H(async D=>D)).subscribe(D=>{D.axisSelection.style("transform",D.gridAxesTransform.value)});const v=Y({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(f),H(async D=>D),G(D=>{const $=`translate(${D.gridAxesReverseTransform.translate[0]}px, ${D.gridAxesReverseTransform.translate[1]}px)`,w=`rotate(${D.gridAxesReverseTransform.rotate}deg) rotateX(${D.gridAxesReverseTransform.rotateX}deg) rotateY(${D.gridAxesReverseTransform.rotateY}deg)`,P=`scale(${1/D.gridContainerPosition[0].scale[0]}, ${1/D.gridContainerPosition[0].scale[1]})`,N=`rotate(${D.fullDataFormatter.grid.groupAxis.position==="left"&&D.fullDataFormatter.grid.valueAxis.position==="top"||D.fullDataFormatter.grid.groupAxis.position==="right"&&D.fullDataFormatter.grid.valueAxis.position==="bottom"?D.fullParams.tickTextRotate+180:D.fullParams.tickTextRotate}deg)`;return`${$} ${w} ${P} ${N}`}),tt()),x=new dt(D=>{Y({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(f),H(async $=>$)).subscribe($=>{const P=$.computedData[0]?$.computedData[0].length-1:0,S=$.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[0]-$.fullDataFormatter.grid.groupAxis.scalePadding,N=$.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[1]+$.fullDataFormatter.grid.groupAxis.scalePadding,R=$.computedData.map((C,T)=>C.filter((O,z)=>z>=S&&z<=N)),A=bR(R.flat());A[0]===A[1]&&(A[0]=A[1]-1),D.next(A)})}),b=new dt(D=>{Y({fullDataFormatter:i,gridAxesSize:u,minAndMax:x}).pipe(I(f),H(async $=>$)).subscribe($=>{const w=tg({maxValue:$.minAndMax[1],minValue:$.minAndMax[0],axisWidth:$.gridAxesSize.height,scaleDomain:$.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:$.fullDataFormatter.grid.valueAxis.scaleRange});D.next(w)})}),_=i.pipe(I(f),G(D=>{let $="start",w="hanging";return D.grid.valueAxis.position==="left"?($="end",w="middle"):D.grid.valueAxis.position==="right"?($="start",w="middle"):D.grid.valueAxis.position==="bottom"?($="middle",w="hanging"):D.grid.valueAxis.position==="top"&&($="middle",w="auto"),{textAnchor:$,dominantBaseline:w}})),M=i.pipe(I(f),G(D=>{let $="start",w="hanging";return D.grid.groupAxis.position==="bottom"?w="auto":D.grid.groupAxis.position==="top"?w="hanging":D.grid.groupAxis.position==="left"?$="start":D.grid.groupAxis.position==="right"&&($="end"),D.grid.valueAxis.position==="left"?$="end":D.grid.valueAxis.position==="right"?$="start":D.grid.valueAxis.position==="bottom"?w="hanging":D.grid.valueAxis.position==="top"&&(w="auto"),{textAnchor:$,dominantBaseline:w}}));return Y({axisSelection:y,fullParams:r,tickTextAlign:_,axisLabelAlign:M,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:v,minAndMax:x}).pipe(I(f),H(async D=>D)).subscribe(D=>{ck({selection:D.axisSelection,yAxisClassName:d,textClassName:g,fullParams:D.fullParams,tickTextAlign:D.tickTextAlign,axisLabelAlign:D.axisLabelAlign,gridAxesSize:D.gridAxesSize,fullDataFormatter:D.fullDataFormatter,fullChartParams:D.fullChartParams,valueScale:D.valueScale,textTransform:D.textTransform,minAndMax:D.minAndMax})}),()=>{f.next(void 0)}},Dx="ValueAxis",fk=se(Dx,Gu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=ai(Dx,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),Px="ValueStackAxis",hk=se(Px,lp)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=ai(Px,{selection:t,computedData$:n.computedStackedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),Tx="ScalingArea",pk=at(Tx,"rect"),dk=se(Tx,cp)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new nt,a=e.insert("rect","g").classed(pk,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(I(o)).subscribe(l=>{a.attr("width",l.width).attr("height",l.height).attr("x",l.left).attr("y",l.top)});const u=r.computedData$.pipe(G(l=>l[0]?l[0].length-1:0),tt());return Y({initGroupAxis:r.fullDataFormatter$.pipe(G(l=>l.grid.groupAxis),b_()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(I(o),H(async l=>l)).subscribe(l=>{const f=l.groupMaxIndex,h=l.initGroupAxis.scaleDomain[0]==="auto"?0-l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[0]-l.initGroupAxis.scalePadding,p=l.initGroupAxis.scaleDomain[1]==="auto"?f+l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[1]+l.initGroupAxis.scalePadding,g=tg({maxValue:l.groupMaxIndex,minValue:0,axisWidth:l.axisSize.width,scaleDomain:[h,p],scaleRange:[0,1]}).copy(),m=ex().on("zoom",function(v){const x=v.transform,b=D=>{const $=Math.round(D);return Math.min(f,Math.max(0,$))},_=l.fullDataFormatter.grid.groupAxis.position==="bottom"||l.fullDataFormatter.grid.groupAxis.position==="top"?x.rescaleX(g).domain().map(b):x.rescaleY(g).domain().map(b);_[0]<=0&&_[1]>=f?x.k<s.k&&(x.k=s.k,x.x=s.x,x.y=s.y):_[1]-_[0]<=1&&x.k>s.k&&(x.k=s.k,x.x=s.x,x.y=s.y),s.k=x.k,s.x=x.x,s.y=x.y;const M={...l.fullDataFormatter,grid:{...l.fullDataFormatter.grid,groupAxis:{...l.fullDataFormatter.grid.groupAxis,scaleDomain:_}}};i.dataFormatter$.next(M)});e.call(m)}),()=>{o.next(void 0),a.remove()}}),Cu="GroupAux",kh=at(Cu,"label-box");function gk({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function mk({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=at(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",l=>Ct(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),a.transition().duration(50).attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),u}function yk(t){t.selectAll("line").data([]).exit().remove()}function bk({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:Lh(t,n.labelTextFormat)}]:[]}function vk({selection:t,labelData:e,fullParams:n,fullDataFormatter:r,fullChartParams:i,labelTransform:o,textSizePx:a}){const s=a+4,u=t.selectAll(`g.${kh}`).data(e),l=u.enter().append("g").classed(kh,!0).style("cursor","pointer"),c=l.merge(u);return l.attr("transform",(f,h)=>`translate(${f.x}, ${f.y})`),u.transition().duration(50).attr("transform",(f,h)=>`translate(${f.x}, ${f.y})`),u.exit().remove(),c.each((f,h,p)=>{const d=rx(f.text,a)+12;let g=-d/2,m=-2;r.grid.groupAxis.position==="bottom"?(g=n.labelRotate?-d:-d/2,m=2):r.grid.groupAxis.position==="left"?(g=-d+2,m=-s/2):r.grid.groupAxis.position==="right"?(g=-2,m=-s/2):r.grid.groupAxis.position==="top"&&(g=n.labelRotate?-d:-d/2,m=-s+2);const y=Z(p[h]).selectAll("rect").data([f]),v=y.enter().append("rect").attr("height",`${s}px`).attr("fill",_=>Ct(n.labelColorType,i)).attr("x",g).attr("y",m).attr("rx",5).attr("ry",5).style("cursor","pointer");y.merge(v).attr("width",_=>`${d}px`).style("transform",o),y.exit().remove();const x=Z(p[h]).selectAll("text").data([f]),b=x.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");x.merge(b).text(_=>_.text).style("transform",o).attr("fill",_=>Ct(n.labelTextColorType,i)).attr("font-size",i.styles.textSize).attr("x",g+6).attr("y",m),x.exit().remove()}),c}function xk(t){t.selectAll(`g.${kh}`).data([]).exit().remove()}const _k=se(Cu,Nu)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new nt;let a=!1;const s=e.insert("rect","g").classed(at(Cu,"rect"),!0).attr("opacity",0),{seriesSelection$:u,axesSelection$:l,defsSelection$:c,graphicGSelection$:f}=ar({selection:t,pluginName:Cu,clipPathID:"test",seriesLabels$:i.seriesLabels$,gridContainerPosition$:i.gridContainerPosition$,gridAxesTransform$:i.gridAxesTransform$,gridGraphicTransform$:i.gridGraphicTransform$});i.layout$.pipe(I(o)).subscribe(_=>{s.attr("width",_.rootWidth).attr("height",_.rootHeight)});const h=Y({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(I(o),H(async _=>_),G(_=>{const D=_.computedData[0]?_.computedData[0].length-1:0,$=_.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[0]-_.fullDataFormatter.grid.groupAxis.scalePadding,w=_.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?D+_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[1]+_.fullDataFormatter.grid.groupAxis.scalePadding;return[$,w]}),St(1)),p=Y({groupScaleDomain:h,gridAxesSize:i.gridAxesSize$}).pipe(I(o),H(async _=>_),G(_=>So().domain(_.groupScaleDomain).range([0,_.gridAxesSize.width]))),d=i.fullChartParams$.pipe(I(o),G(_=>_.highlightTarget),tt()),g=Ch(e,"mousemove").pipe(I(o)),m=Y({fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,gridAxesReverseTransform:i.gridAxesReverseTransform$,gridContainerPosition:i.gridContainerPosition$}).pipe(I(o),H(async _=>_),G(_=>{const M=`translate(${_.gridAxesReverseTransform.translate[0]}px, ${_.gridAxesReverseTransform.translate[1]}px)`,D=`rotate(${_.gridAxesReverseTransform.rotate}deg) rotateX(${_.gridAxesReverseTransform.rotateX}deg) rotateY(${_.gridAxesReverseTransform.rotateY}deg)`,$=`scale(${1/_.gridContainerPosition[0].scale[0]}, ${1/_.gridContainerPosition[0].scale[1]})`,P=`rotate(${_.fullDataFormatter.grid.groupAxis.position==="left"&&_.fullDataFormatter.grid.valueAxis.position==="top"||_.fullDataFormatter.grid.groupAxis.position==="right"&&_.fullDataFormatter.grid.valueAxis.position==="bottom"?_.fullParams.labelRotate+180:_.fullParams.labelRotate}deg)`;return`${M} ${D} ${$} ${P}`}),tt()),y=i.gridContainerPosition$.pipe(I(o),G(_=>_.reduce((D,$)=>$.columnIndex>D?$.columnIndex:D,0)+1),tt()),v=i.gridContainerPosition$.pipe(I(o),G(_=>_.reduce((D,$)=>$.rowIndex>D?$.rowIndex:D,0)+1),tt()),x=vR({rootSelection:e,fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$,gridContainerPosition$:i.gridContainerPosition$,layout$:i.layout$}).pipe(I(o));Y({axesSelection:l,columnAmount:y,rowAmount:v,layout:i.layout$,rootMousemove:g,gridGroupPosition:x,computedData:i.computedData$,groupScale:p,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,fullChartParams:i.fullChartParams$,highlightTarget:d,labelTransform:m,GroupDataMap:i.GroupDataMap$,textSizePx:i.textSizePx$}).subscribe(_=>{const{groupIndex:M,groupLabel:D}=_.gridGroupPosition,$=_.groupScale(M)??0,w=gk({groupLabel:D,axisX:$,axisHeight:_.gridAxesSize.height,fullParams:_.fullParams});mk({selection:_.axesSelection,pluginName:n,lineData:w,fullParams:_.fullParams,fullChartParams:_.fullChartParams});const P=bk({groupLabel:D,axisX:$,fullParams:_.fullParams});vk({selection:_.axesSelection,labelData:P,fullParams:_.fullParams,fullDataFormatter:_.fullDataFormatter,fullChartParams:_.fullChartParams,labelTransform:_.labelTransform,textSizePx:_.textSizePx}).on("mouseover",(N,R)=>{N.stopPropagation(),a=!0,r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(D)??[],groupIndex:M,groupLabel:D,event:N,data:_.computedData})}).on("mousemove",(N,R)=>{N.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(D)??[],groupIndex:M,groupLabel:D,event:N,data:_.computedData})}).on("click",(N,R)=>{N.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(D)??[],groupIndex:M,groupLabel:D,event:N,data:_.computedData})})});const b=Ch(s,"mouseout").pipe(I(o));return Y({rootRectMouseout:b,axesSelection:l}).pipe(I(o),H(async _=>_)).subscribe(_=>{setTimeout(()=>{a!=!0&&(yk(_.axesSelection),xk(_.axesSelection))})}),()=>{o.next(void 0),s.remove()}}),Lx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}],textColorType:"primary"},Ih={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]};Ih.tickFormat.toString=()=>"text => text";const Eu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},wk={...Eu},Cx={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},Ex={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},Rx={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},kx={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},Ix={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},Nx={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},Nh={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},Fx={...Nh},Gx="MultiGridLegend",$k=pe(Gx,Lx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.multiGridEachDetail$.pipe(I(i),G(l=>l.map((f,h)=>f.SeriesDataMap$.pipe(G(p=>Array.from(p.keys()))))),H(l=>Y(l)),G(l=>l.flat())),a=Y({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(I(i),H(async l=>l),G(l=>l.computedData.map((c,f)=>{const h=vl(l.fullParams.gridList[f]??{},{listRectWidth:l.fullParams.listRectWidth,listRectHeight:l.fullParams.listRectHeight,listRectRadius:l.fullParams.listRectRadius});return c.map(p=>h)}).flat())),s=Y({fullParams:n.fullParams$,seriesList:a}).pipe(I(i),H(async l=>l),G(l=>({...l.fullParams,seriesList:l.seriesList}))),u=Lu(Gx,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),Ce=t=>{const e=t.fullParams$.pipe(G(n=>n.gridIndexes),tt(),St(1));return Y({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(G(n=>n.gridIndexes==="all"?n.multiGridEachDetail:n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Fh="MultiBars",zx=at(Fh,"grid"),Sk=pe(Fh,Cx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${zx}`).data(s).join("g").attr("class",zx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=Eh(Fh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Gh="MultiBarStack",Ox=at(Gh,"grid"),Ak=pe(Gh,Ex)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Ox}`).data(s).join("g").attr("class",Ox).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=dx(Gh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),zh="MultiBarsTriangle",Ux=at(zh,"grid"),Mk=pe(zh,Rx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Ux}`).data(s).join("g").attr("class",Ux).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=bx(zh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,fullDataFormatter$:u.dataFormatter$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Oh="MultiLines",Bx=at(Oh,"grid"),Dk=pe(Oh,kx)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new nt,a=[],s=i.multiGridContainerPosition$.pipe(I(o),G(l=>l.flat()));return Ce(i).pipe(I(o)).subscribe(l=>{a.forEach(c=>c()),t.selectAll(`g.${Bx}`).data(l).join("g").attr("class",Bx).each((c,f,h)=>{const p=Z(h[f]);a[f]=ox(Oh,{selection:p,computedData$:c.computedData$,computedLayoutData$:c.computedLayoutData$,visibleComputedData$:c.visibleComputedData$,visibleComputedLayoutData$:c.visibleComputedLayoutData$,seriesLabels$:c.seriesLabels$,SeriesDataMap$:c.SeriesDataMap$,GroupDataMap$:c.GroupDataMap$,fullDataFormatter$:c.dataFormatter$,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,gridAxesTransform$:c.gridAxesTransform$,gridGraphicTransform$:c.gridGraphicTransform$,gridAxesSize$:c.gridAxesSize$,gridHighlight$:c.gridHighlight$,gridContainerPosition$:c.gridContainerPosition$,allContainerPosition$:s,layout$:i.layout$,event$:r.event$})})}),()=>{o.next(void 0),a.forEach(l=>l())}}),Uh="MultiLineAreas",Yx=at(Uh,"grid"),Pk=pe(Uh,Ix)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.multiGridContainerPosition$.pipe(I(i),G(u=>u.flat()));return Ce(r).pipe(I(i)).subscribe(u=>{o.forEach(l=>l()),t.selectAll(`g.${Yx}`).data(u).join("g").attr("class",Yx).each((l,c,f)=>{const h=Z(f[c]);o[c]=sx(Uh,{selection:h,computedData$:l.computedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedData$:l.visibleComputedData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullDataFormatter$:l.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,allContainerPosition$:a,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(u=>u())}}),Bh="MultiDots",Hx=at(Bh,"grid"),Tk=pe(Bh,Nx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Hx}`).data(s).join("g").attr("class",Hx).each((u,l,c)=>{const f=Z(c[l]);o[l]=xx(Bh,{selection:f,computedData$:u.computedData$,visibleComputedData$:u.visibleComputedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Yh="MultiGroupAxis",Wx=at(Yh,"grid"),Lk=pe(Yh,Ih)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Wx}`).data(s).join("g").attr("class",Wx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=Sx(Yh,{selection:f,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Hh="MultiValueAxis",Vx=at(Hh,"grid"),Ck=pe(Hh,Eu)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Vx}`).data(s).join("g").attr("class",Vx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=ai(Hh,{selection:f,computedData$:u.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Wh="MultiValueStackAxis",jx=at(Wh,"grid"),Ek=pe(Wh,Eu)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${jx}`).data(s).join("g").attr("class",jx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=ai(Wh,{selection:f,computedData$:u.computedStackedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function Rk(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function qx(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:Rk(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),c=(t.width-r*(o-1))/o,f=(t.height-r*(i-1))/i,h=u*c+u*r,p=l*f+l*r,d=[h,p],g=[c/t.width,f/t.height];return{slotIndex:s,rowIndex:l,columnIndex:u,translate:d,scale:g}})}const Xx=({fullDataFormatter$:t,layout$:e})=>{const n=new nt;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,l=0,c=0,f=0,h=0;return i.position==="bottom"?o.position==="left"?(f=180,l=s):o.position==="right"?(f=180,h=180,u=a,l=s):(f=180,l=s):i.position==="top"?o.position==="left"||(o.position==="right"?(h=180,u=a):(f=180,l=s)):i.position==="left"?o.position==="bottom"?(c=-90,l=s):o.position==="top"?(c=-90,h=180):(f=180,l=s):i.position==="right"?o.position==="bottom"?(c=-90,f=180,l=s,u=a):o.position==="top"?(c=-90,f=180,h=180,u=a):(f=180,l=s):(f=180,l=s),{translate:[u,l],scale:[1,1],rotate:c,rotateX:f,rotateY:h,value:`translate(${u}px, ${l}px) rotate(${c}deg) rotateX(${f}deg) rotateY(${h}deg)`}}return new dt(i=>(Y({fullDataFormatter:t,layout:e}).pipe(I(n),H(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},Zx=({gridAxesTransform$:t})=>t.pipe(G(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),Kx=({computedData$:t,fullDataFormatter$:e,layout$:n})=>Y({computedData:t,fullDataFormatter:e,layout:n}).pipe(H(async i=>i),G(i=>{if(i.fullDataFormatter.grid.separateSeries)return qx(i.layout,i.fullDataFormatter.container,i.computedData.length);{const o=qx(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((a,s)=>o[0])}})),Vh="OverlappingValueAxes",Qx=at(Vh,"grid"),kk=pe(Vh,Nh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[1])),u=Y({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),H(async c=>c),G(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Yo(r).pipe(I(i),G(c=>({...c,fullParams$:c.fullParams$.pipe(G(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),H(c=>Ce(c)),G(c=>c.map((f,h)=>{if(h===0)return f;const p=Xx({fullDataFormatter$:u,layout$:r.layout$}),d=Zx({gridAxesTransform$:p}),g=Kx({computedData$:f.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...f,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${Qx}`).data(c).join("g").attr("class",Qx).each((f,h,p)=>{if(h>1)return;const d=Z(p[h]);o[h]=ai(Vh,{selection:d,computedData$:f.computedData$,fullParams$:r.fullParams$.pipe(G(g=>h===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),jh="OverlappingValueStackAxes",Jx=at(jh,"grid"),Ik=pe(jh,Fx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[1])),u=Y({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),H(async c=>c),G(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Yo(r).pipe(I(i),G(c=>({...c,fullParams$:c.fullParams$.pipe(G(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),H(c=>Ce(c)),G(c=>c.map((f,h)=>{if(h===0)return f;const p=Xx({fullDataFormatter$:u,layout$:r.layout$}),d=Zx({gridAxesTransform$:p}),g=Kx({computedData$:f.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...f,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${Jx}`).data(c).join("g").attr("class",Jx).each((f,h,p)=>{if(h>1)return;const d=Z(p[h]);o[h]=ai(jh,{selection:d,computedData$:h===0?f.computedStackedData$:f.computedData$,fullParams$:r.fullParams$.pipe(G(g=>h===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),t2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},qh={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null};qh.textRenderFn.toString=()=>`(eventData) => {
|
16
16
|
if (eventData.highlightTarget === 'datum' && eventData.datum) {
|
17
17
|
return [\`\${eventData.datum.label}: \${eventData.datum.value}\`]
|
18
18
|
} else if (eventData.highlightTarget === 'series') {
|
package/package.json
CHANGED
@@ -1,42 +1,42 @@
|
|
1
|
-
{
|
2
|
-
"name": "@orbcharts/plugins-basic",
|
3
|
-
"version": "3.0.0-alpha.
|
4
|
-
"description": "plugins for OrbCharts",
|
5
|
-
"author": "Blue Planet Inc.",
|
6
|
-
"license": "Apache-2.0",
|
7
|
-
"keywords": [
|
8
|
-
"d3",
|
9
|
-
"rxjs",
|
10
|
-
"svg",
|
11
|
-
"visualization",
|
12
|
-
"infographic",
|
13
|
-
"graph",
|
14
|
-
"chart"
|
15
|
-
],
|
16
|
-
"private": false,
|
17
|
-
"publishConfig": {
|
18
|
-
"access": "public",
|
19
|
-
"registry": "https://registry.npmjs.org/"
|
20
|
-
},
|
21
|
-
"files": [
|
22
|
-
"*"
|
23
|
-
],
|
24
|
-
"module": "./dist/orbcharts-plugins-basic.es.js",
|
25
|
-
"types": "./dist/src/index.d.ts",
|
26
|
-
"scripts": {
|
27
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
28
|
-
"build": "vite build --mode production"
|
29
|
-
},
|
30
|
-
"devDependencies": {
|
31
|
-
"@types/d3": "^7.4.0",
|
32
|
-
"ts-loader": "^9.4.2",
|
33
|
-
"typescript": "^5.0.4",
|
34
|
-
"vite": "^5.3.5",
|
35
|
-
"vite-plugin-dts": "^3.7.3"
|
36
|
-
},
|
37
|
-
"dependencies": {
|
38
|
-
"@orbcharts/core": "^3.0.0-alpha.
|
39
|
-
"d3": "^7.8.5",
|
40
|
-
"rxjs": "^7.8.1"
|
41
|
-
}
|
42
|
-
}
|
1
|
+
{
|
2
|
+
"name": "@orbcharts/plugins-basic",
|
3
|
+
"version": "3.0.0-alpha.62",
|
4
|
+
"description": "plugins for OrbCharts",
|
5
|
+
"author": "Blue Planet Inc.",
|
6
|
+
"license": "Apache-2.0",
|
7
|
+
"keywords": [
|
8
|
+
"d3",
|
9
|
+
"rxjs",
|
10
|
+
"svg",
|
11
|
+
"visualization",
|
12
|
+
"infographic",
|
13
|
+
"graph",
|
14
|
+
"chart"
|
15
|
+
],
|
16
|
+
"private": false,
|
17
|
+
"publishConfig": {
|
18
|
+
"access": "public",
|
19
|
+
"registry": "https://registry.npmjs.org/"
|
20
|
+
},
|
21
|
+
"files": [
|
22
|
+
"*"
|
23
|
+
],
|
24
|
+
"module": "./dist/orbcharts-plugins-basic.es.js",
|
25
|
+
"types": "./dist/src/index.d.ts",
|
26
|
+
"scripts": {
|
27
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
28
|
+
"build": "vite build --mode production"
|
29
|
+
},
|
30
|
+
"devDependencies": {
|
31
|
+
"@types/d3": "^7.4.0",
|
32
|
+
"ts-loader": "^9.4.2",
|
33
|
+
"typescript": "^5.0.4",
|
34
|
+
"vite": "^5.3.5",
|
35
|
+
"vite-plugin-dts": "^3.7.3"
|
36
|
+
},
|
37
|
+
"dependencies": {
|
38
|
+
"@orbcharts/core": "^3.0.0-alpha.57",
|
39
|
+
"d3": "^7.8.5",
|
40
|
+
"rxjs": "^7.8.1"
|
41
|
+
}
|
42
|
+
}
|