@carbon/charts 1.15.5 → 1.15.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,5 +82,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
82
82
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">
83
83
  <polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>
84
84
  <path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>
85
- </svg>`}addEventListeners(){const t=this;this.parent.selectAll("circle.node").on("mouseover",function(n,r){const i=I(this);i.classed("hovered",!0);const s=t.model.getHierarchyLevel(),a=s>2&&!i.classed("focal"),o=b(t.model.getOptions(),"canvasZoom","enabled");let l=!1;if(!a){let c=[],u=[],d=null;if(r.children){r.depth>1&&o&&(l=!0,i.classed("clickable",!0)),c=r.children.map(p=>{if(p!==null)return typeof p.data.value=="number"?{label:p.data.name,value:p.data.value}:{label:p.data.name,labelIcon:o&&s<=2?t.getZoomIcon():null,value:p.value}});const f=t.model.getOptions();u=[{label:yt(f,"locale.translations.total")||yt(f,"tooltip.totalLabel")||"Total",value:r.value,bold:!0}],t.highlightChildren(r.children)}else d=r.value;const h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:h,label:r.data.name,labelIcon:l&&o&&s<=2?t.getZoomIcon():null,value:d},...c,...u]})}t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("mouseout",function(n,r){const i=I(this);i.classed("hovered",!1),r.children&&t.unhighlightChildren(r.children),t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})}).on("click",function(n,r){const i=I(this),s=i.classed("non-focal"),a=b(t.model.getOptions(),"canvasZoom","enabled");if(a&&t.model.getHierarchyLevel()>2){const o=t.parent.selectAll("circle.node");I(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(o,qr)}else if(r.depth===2&&r.children&&!s&&a){const o=t.parent.selectAll("circle.node");I(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=r,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(r,o,qr),n.stopPropagation()}t.services.events.dispatchEvent(T.CirclePack.CIRCLE_CLICK,{event:n,element:i,datum:r})})}destroy(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()}}function iN(e,t){const n=pi(this._current,e);return r=>(this._current=n(r),t(this._current))}class Nv extends gt{constructor(){super(...arguments),this.type="pie",this.renderType=et.SVG,this.isRendering=!1,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.slice").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i.data[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.slice").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getInnerRadius(){return Lt.innerRadius}render(t=!0){const n=this,r=this.getComponentContainer(),i=this.getOptions(),{groupMapsTo:s}=i.data,{valueMapsTo:a}=i.pie;this.isRendering=!0;const o=this.model.getDisplayData().filter(M=>M[a]>0),l=this.computeRadius();this.arc=Bi().innerRadius(this.getInnerRadius()).outerRadius(l),this.hoverArc=Bi().innerRadius(this.getInnerRadius()).outerRadius(l+Lt.hoverArc.outerRadiusOffset);const u=dT().value(M=>M[a]).sort(b(i,"pie","sortFunction")).padAngle(Lt.padAngle)(o),h=R.appendOrSelect(r,"g.slices").attr("role",ut.GROUP).attr("data-name","slices").selectAll("path.slice").data(u,M=>M.data[s]);h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("slice",!0).attr("opacity",0).merge(h).attr("class",M=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:M.data[s],originalClassName:"slice"})).style("fill",M=>n.model.getFillColor(M.data[s],null,M.data)).attr("d",this.arc).transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"pie_slice_enter_update",animate:t})).attr("opacity",1).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",M=>`${M[a]}, ${Zc(M.data[a],o,a)+"%"}`).attrTween("d",function(M){return iN.bind(this)(M,n.arc)}).on("end",()=>{n.isRendering=!1});const{code:g,number:m}=b(i,"locale"),v=i.pie.labels.enabled,E=v?u.filter(M=>M.data[a]>0):[],x=R.appendOrSelect(r,"g.labels").attr("role",ut.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(E,M=>M.data[s]);x.exit().attr("opacity",0).remove();const S=x.enter().append("text").classed("pie-label",!0),_=[];S.merge(x).style("text-anchor","middle").text(M=>i.pie.labels.formatter?i.pie.labels.formatter({...M,percentageValue:Zc(M.data[a],o,a,!0)}):m(Zc(M.data[a],o,a),g)+"%").datum(function(M){const w=l+7,U=(M.endAngle-M.startAngle)/2+M.startAngle,$=U/Math.PI*180,N=this.getComputedTextLength();return M.textOffsetX=N/2,M.textOffsetY=$>90&&$<270?10:0,M.xPosition=(M.textOffsetX+w)*Math.sin(U),M.yPosition=(M.textOffsetY+w)*-Math.cos(U),M}).attr("transform",function(M,w){const U=E.length,$=(M.endAngle-M.startAngle)*(180/Math.PI);if(w>=U-2&&$<Lt.callout.minSliceDegree){let N,F;return M.index===U-1?(N=M.xPosition+Lt.callout.offsetX+Lt.callout.textMargin+M.textOffsetX,F=M.yPosition-Lt.callout.offsetY,M.direction=ts.RIGHT,_.push(M)):(N=M.xPosition-Lt.callout.offsetX-M.textOffsetX-Lt.callout.textMargin,F=M.yPosition-Lt.callout.offsetY,M.direction=ts.LEFT,_.push(M)),`translate(${N}, ${F})`}return`translate(${M.xPosition}, ${M.yPosition})`}),this.renderCallouts(_);const C=b(i,"donut")?"donut":"pie",L=b(i,C,"alignment"),{width:B}=R.getSVGElementSize(this.getParent(),{useAttrs:!0}),D=v?Lt.xOffset:0,O=v?Lt.yOffset:0;let H=l+D;L===Ht.CENTER?H=B/2:L===Ht.RIGHT&&(H=B-l-Lt.xOffset);let P=l+O;_.length>0&&(P+=Lt.yOffsetCallout),r.attr("x",H+7).attr("y",P),this.addEventListeners()}renderCallouts(t){const n=R.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",ut.GROUP).attr("data-name","callouts"),r=n.selectAll("g.callout").data(t);r.exit().remove();const i=r.enter().append("g").classed("callout",!0).attr("role",ut.GROUP).attr("aria-roledescription","label callout");i.merge(r).datum(function(o){const{xPosition:l,yPosition:c,direction:u}=o;return u===ts.RIGHT?(o.startPos={x:l,y:c+o.textOffsetY},o.endPos={x:l+Lt.callout.offsetX,y:c-Lt.callout.offsetY+o.textOffsetY},o.intersectPointX=o.endPos.x-Lt.callout.horizontalLineLength):(o.startPos={x:l,y:c+o.textOffsetY},o.endPos={x:l-Lt.callout.offsetX,y:c-Lt.callout.offsetY+o.textOffsetY},o.intersectPointX=o.endPos.x+Lt.callout.horizontalLineLength),o}),i.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum(function(){return I(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",o=>o.startPos.x).attr("y1",o=>o.startPos.y).attr("x2",o=>o.intersectPointX).attr("y2",o=>o.endPos.y),i.append("line").classed("horizontal-line",!0).merge(n.selectAll("line.horizontal-line")).datum(function(){return I(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",o=>o.intersectPointX).attr("y1",o=>o.endPos.y).attr("x2",o=>o.endPos.x).attr("y2",o=>o.endPos.y)}addEventListeners(){const t=this;this.parent.selectAll("path.slice").on("mouseover",function(n,r){const i=I(this);t.isRendering||i.classed("hovered",!0).transition("pie_slice_mouseover").call(o=>t.services.transitions.setupTransition({transition:o,name:"pie_slice_mouseover"})).attr("d",t.hoverArc),t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEOVER,{event:n,element:I(this),datum:r});const{groupMapsTo:s}=t.getOptions().data,{valueMapsTo:a}=t.getOptions().pie;t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{label:r.data[s],value:r.data[a]}]})}).on("mousemove",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Pie.SLICE_CLICK,{event:n,element:I(this),datum:r})}).on("mouseout",function(n,r){const i=I(this);mL(()=>{t.isRendering||i.classed("hovered",!1).transition("pie_slice_mouseout").call(s=>t.services.transitions.setupTransition({transition:s,name:"pie_slice_mouseout"})).attr("d",t.arc)},100),t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}computeRadius(){const{width:t,height:n}=R.getSVGElementSize(this.parent,{useAttrs:!0}),r=this.getOptions(),i=Math.min(t,n)/2;return r.pie.labels.enabled?i+Lt.radiusOffset:i}}class sN extends Nv{constructor(){super(...arguments),this.type="donut",this.renderType=et.SVG}render(t=!0){super.render(t);const n=this;if(this.model.isDataEmpty()){this.getComponentContainer().select("g.center").remove();return}const r=R.appendOrSelect(this.getComponentContainer(),"g.center"),i=this.getOptions(),s=this.computeRadius(),a=b(i,"donut","center","label");R.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",()=>a===null||a===""?"central":"initial").style("font-size",()=>i.donut.center.numberFontSize(s)).transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"donut-figure-enter-update",animate:t})).tween("text",function(){return n.centerNumberTween(I(this))}),a!==null&&a!==""&&R.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",()=>i.donut.center.titleFontSize(s)).attr("y",i.donut.center.titleYPosition(s)).text(a)}getInnerRadius(){return this.computeRadius()*(3/4)}centerNumberTween(t){const n=this.getOptions();let r=b(n,"donut","center","number");r===null&&(r=this.model.getDisplayData().reduce((o,l)=>o+l[n.pie.valueMapsTo],0));const i=parseInt(t.text().replace(/[, ]+/g,""),10)||0;let s;i%1===0&&r%1===0?s=kh:s=ve;const a=s(i,r);return o=>{const{numberFormatter:l}=n.donut.center;if(l)t.text(l(a(o)));else{const{code:c,number:u}=b(n,"locale");t.text(u(Math.floor(a(o)),c))}}}}const $v="4,10 8,6 12,10",Fv="12,6 8,10 4,6";class aN extends gt{constructor(){super(...arguments),this.type="gauge",this.renderType=et.SVG}getValue(){var r;return((r=this.model.getData().find(i=>i.group==="value"))==null?void 0:r.value)??null}getValueRatio(){return ag(this.getValue(),0,100)/100}getDelta(){var r;return((r=this.model.getData().find(i=>i.group==="delta"))==null?void 0:r.value)??null}getArcRatio(){const t=this.getOptions();return b(t,"gauge","type")===ar.FULL?1:.5}getArcSize(){return this.getArcRatio()*Math.PI*2}getStartAngle(){const t=this.getArcSize();return t===2*Math.PI?0:-t/2}getArrow(t){const n=this.getOptions();switch(b(n,"gauge","deltaArrow","direction")){case Wa.UP:return $v;case Wa.DOWN:return Fv;default:return t>0?$v:Fv}}render(t=!0){const n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.getOptions(),i=this.getValue(),s=this.getValueRatio(),a=this.getArcSize(),o=this.getStartAngle(),l=s*a,c=o+l,u=o+a,d=this.computeRadius(),h=this.getInnerRadius();this.backgroundArc=Bi().innerRadius(h).outerRadius(d).startAngle(c).endAngle(u),this.arc=Bi().innerRadius(h).outerRadius(d).startAngle(o).endAngle(c),R.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);const f=n.selectAll("path.arc-foreground").data([i]);f.enter().append("path").merge(f).attr("class",this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",()=>b(this.getOptions(),"color","scale","value")).attr("d",this.arc).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",E=>E),this.drawValueNumber(),this.drawDelta(),f.exit().remove();const g=b(r,"gauge","alignment"),{width:m}=R.getSVGElementSize(this.getParent(),{useAttrs:!0});let v=d;g===Ht.CENTER?v=m/2:g===Ht.RIGHT&&(v=m-d),n.attr("x",v).attr("y",d),this.addEventListeners()}drawValueNumber(){const t=this.getComponentContainer(),n=this.getOptions(),r=b(n,"gauge","type"),i=this.getValue(),s=this.getDelta(),a=this.computeRadius(),o=b(n,"gauge","valueFontSize"),l=b(n,"gauge","deltaFontSize"),c=b(n,"gauge","numberSpacing"),u=b(n,"gauge","showPercentageSymbol");let d=0;r===ar.FULL&&!s?d=l(a):r===ar.SEMI&&s&&(d=-(l(a)+c));const h=R.appendOrSelect(t,"g.gauge-numbers").attr("transform",`translate(0, ${d})`),f=o(a),p=R.appendOrSelect(h,"g.gauge-value-number"),{code:g,number:m}=b(n,"locale"),v=b(n,"gauge","numberFormatter"),E=p.selectAll("text.gauge-value-number").data([i]);E.enter().append("text").attr("class","gauge-value-number").merge(E).style("font-size",`${f}px`).attr("text-anchor","middle").text(B=>{let D;return B!=null?D=Number(B.toFixed(2))%1!==0?B.toFixed(2):B.toFixed():D=0,v?v(D):m(Number(D),g)});const{width:y}=R.getSVGElementSize(R.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}),x=f/2,S=u?"%":"",_=R.appendOrSelect(p,"text.gauge-value-symbol").style("font-size",`${x}px`).attr("x",y/2).text(S),{width:C,height:L}=R.getSVGElementSize(_,{useBBox:!0});_.attr("y",`-${L/2}px`),p.attr("transform",`translate(-${C/2}, 0)`)}drawDelta(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=this.getDelta(),{code:s,number:a}=b(r,"locale");if(i){const o=this.computeRadius(),l=i?b(r,"gauge","deltaFontSize"):()=>0,c=i?b(r,"gauge","numberFormatter"):()=>null,u=b(r,"gauge","deltaArrow","size"),d=b(r,"gauge","numberSpacing"),h=b(r,"gauge","showPercentageSymbol"),f=R.appendOrSelect(n,"g.gauge-numbers"),p=R.appendOrSelect(f,"g.gauge-delta").attr("transform",`translate(0, ${l(o)+d})`),g=R.appendOrSelect(p,"text.gauge-delta-number"),m=h?"%":"";g.data(i===null?[]:[i]),g.enter().append("text").classed("gauge-delta-number",!0).merge(g).attr("text-anchor","middle").style("font-size",`${l(o)}px`).text(x=>{let S;return x!=null?S=Number(x.toFixed(2))%1!==0?x.toFixed(2):x.toFixed():S=0,c?`${c(S)}${m}`:`${a(Number(S),s)}${m}`});const{width:v}=R.getSVGElementSize(R.appendOrSelect(n,".gauge-delta-number"),{useBBox:!0}),E=b(r,"gauge","deltaArrow","enabled"),y=p.selectAll("svg.gauge-delta-arrow").data(i!==null&&E?[i]:[]);y.enter().append("svg").merge(y).attr("class","gauge-delta-arrow").attr("x",-u(o)-v/2).attr("y",-u(o)/2-l(o)*.35).attr("width",u(o)).attr("height",u(o)).attr("viewBox","0 0 16 16").each(function(){const x=I(this);R.appendOrSelect(x,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const S=b(r,"gauge","status");R.appendOrSelect(x,"polygon.gauge-delta-arrow").attr("class",S!==null?`gauge-delta-arrow status--${S}`:"").attr("points",t.getArrow(i))}),y.exit().remove(),g.exit().remove()}else{const o=n.select("g.gauge-delta");o.empty()||o.remove()}}getInnerRadius(){const t=this.computeRadius(),n=b(this.getOptions(),"gauge","arcWidth");return t-n}addEventListeners(){const t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",function(n,r){t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEOVER,{event:n,element:I(this),datum:r})}).on("mousemove",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEMOVE,{event:n,element:i,datum:r})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Gauge.ARC_CLICK,{event:n,element:I(this),datum:r})}).on("mouseout",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEOUT,{event:n,element:i,datum:r})})}computeRadius(){const t=this.getOptions(),n=b(t,"gauge","type"),{width:r,height:i}=R.getSVGElementSize(this.parent,{useAttrs:!0});return n===ar.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)}}class Uv extends qu{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=et.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.model.getDisplayData(this.configs.groups),r=this.getOptions(),{groupMapsTo:i}=r.data;this.setGroupScale();const s=this.getComponentContainer({withinChartClip:!0}),a=Ji(n.map(h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return h[f]&&typeof h[f].toString=="function"?h[f].toString():h[f]})),o=s.selectAll("g.bars").data(a,h=>h);o.exit().attr("opacity",0).remove();const c=o.enter().append("g").classed("bars",!0).attr("role",ut.GROUP).attr("data-name","bars").merge(o);c.transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bar-group-update-enter",animate:t})).attr("transform",h=>{const p=this.services.cartesianScales.getDomainValue(h)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===Bt.VERTICAL?`translate(${p}, 0)`:`translate(0, ${p})`});const u=c.selectAll("path.bar").data(h=>this.getDataCorrespondingToLabel(h),h=>h[i]);u.exit().attr("opacity",0).remove(),u.enter().append("path").attr("opacity",0).merge(u).classed("bar",!0).transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bar-update-enter",animate:t})).attr("class",h=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:h[i],originalClassName:"bar"})).style("fill",h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getFillColor(h[i],h[f],h)}).attr("d",h=>{const f=this.groupScale(h[i]),p=this.getBarWidth(),g=f,m=f+p,v=this.services.cartesianScales.getRangeAxisPosition({datum:h}),E=this.services.cartesianScales.getDomainLowerBound(v),y=this.services.cartesianScales.getValueThroughAxisPosition(v,E),x=this.services.cartesianScales.getRangeValue(h),S=this.services.cartesianScales.getDomainValue(h)-p/2,_=S+p;if(!this.isOutsideZoomedDomain(S,_))return ie({x0:g,x1:m,y0:y,y1:x},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",h=>h.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=I(this);i.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:n,element:I(this),datum:r})}).on("mouseout",function(n,r){const i=I(this);i.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(t){return this.model.getDisplayData(this.configs.groups).filter(r=>{const i=this.services.cartesianScales.getDomainIdentifier(r);return r[i].toString()===t})}getGroupWidth(){const t=this.model.getGroupedData(this.configs.groups),n=this.getTotalGroupPadding();return this.getBarWidth()*t.length+n}getDomainScaleStep(){const t=this.services.cartesianScales.getDomainScale(),n=this.model.getGroupedData(this.configs.groups);let r=this.defaultStepFactor;if(typeof t.step=="function")r=t.step();else if(n.length>0){const i=n.find(s=>{var a;return((a=s.data)==null?void 0:a.length)>1});if(i){const s=this.services.cartesianScales.getDomainIdentifier(i.data[0]);r=Math.abs(t(i.data[1][s])-t(i.data[0][s]))}}return r}getTotalGroupPadding(){const t=this.model.getGroupedData(this.configs.groups);return t.length===1?0:Math.min(5,5*(this.getDomainScaleStep()/this.defaultStepFactor))*(t.length-1)}getBarWidth(){const t=this.getOptions(),n=b(t,"bars","width"),r=b(t,"bars","maxWidth");if(n!==null&&(r===null||n<=r))return n;const s=this.model.getGroupedData(this.configs.groups).length,a=this.getTotalGroupPadding();return Math.min(r,(this.getDomainScaleStep()-a)/s)}setGroupScale(){const t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=ki().domain(t).rangeRound([0,this.getGroupWidth()])}}class oN extends gt{constructor(){super(...arguments),this.type="heatmap",this.renderType=et.SVG,this.matrix={},this.xBandwidth=0,this.yBandwidth=0,this.translationUnits={x:0,y:0},this.handleAxisOnHover=t=>{const{detail:n}=t,{datum:r}=n,i=this.model.getUniqueRanges(),s=this.model.getUniqueDomain(),a=this.services.cartesianScales.getDomainLabel(),o=this.services.cartesianScales.getRangeLabel(),l=this.services.cartesianScales.getMainXScale(),c=this.services.cartesianScales.getMainYScale();let u="",d=null,h=null,f=null;this.matrix[r]!==void 0?(u=a,i.forEach(p=>{if(typeof this.matrix[r][p].value=="number"){const g=this.matrix[r][p].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})):(u=o,s.forEach(p=>{if(typeof this.matrix[p][r].value=="number"){const g=this.matrix[p][r].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})),l(r)!==void 0?this.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${l(r)}, ${Cn(c.range())})`):c(r)!==void 0&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${Cn(l.range())},${c(r)})`),this.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n.event,hoveredElement:I(t.detail.element),items:[{label:u,value:r,bold:!0},{label:"Min",value:h!==null?h:"-"},{label:"Max",value:f!==null?f:"-"},{label:"Average",value:d!==null?d/s.length:"-"}]})},this.handleAxisMouseOut=t=>{this.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),this.services.events.dispatchEvent(T.Tooltip.HIDE,{event:t})}}init(){const t=this.services.events;t.addEventListener(T.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(T.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(T.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(T.Axis.LABEL_BLUR,this.handleAxisMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0});n.lower();const{cartesianScales:r}=this.services;if(this.matrix=this.model.getMatrix(),n.html(""),b(this.getOptions(),"data","loading"))return;const i=r.getMainXScale(),s=r.getMainYScale(),a=r.getDomainIdentifier(),o=r.getRangeIdentifier(),l=this.model.getUniqueDomain(),c=this.model.getUniqueRanges(),u=this.model.getMatrixAsArray(),d=i.range(),h=s.range();this.xBandwidth=Math.abs((d[1]-d[0])/l.length),this.yBandwidth=Math.abs((h[1]-h[0])/c.length);const f=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",f).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);const p=n.selectAll().data(u).enter().append("g").attr("class",g=>`heat-${g.index}`).classed("cell",!0).attr("transform",g=>`translate(${i(g[a])}, ${s(g[o])})`).append("rect").attr("class",g=>this.model.getColorClassName({value:g.value,originalClassName:`heat-${g.index}`})).classed("heat",!0).classed("null-state",g=>g.index===-1||g.value===null).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",g=>{const m=this.services.cartesianScales.getDomainIdentifier(g);return g.index===-1||g.value===null?`url(#${f})`:this.model.getFillColor(Number(g.value),g[m],g)}).attr("aria-label",g=>g.value);this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(h[1]-h[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(d[1]-d[0]),this.yBandwidth),this.determineDividerStatus()&&(p.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}createOuterBox(t,n,r){const i=R.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);R.appendOrSelect(i,"line.top").attr("x1",-1).attr("x2",n+1),R.appendOrSelect(i,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",r+1),R.appendOrSelect(i,"line.down").attr("x1",-1).attr("x2",n+1).attr("y1",r).attr("y2",r),R.appendOrSelect(i,"line.right").attr("x1",n).attr("x2",n).attr("y1",-1).attr("y2",r+1)}determineDividerStatus(){const t=b(this.getOptions(),"heatmap","divider","state");return t!==Yr.OFF&&(t===Yr.AUTO&&Zg.minCellDividerDimension<=this.xBandwidth&&Zg.minCellDividerDimension<=this.yBandwidth||t===Yr.ON)}addEventListener(){const t=this,{cartesianScales:n}=this.services,r=this.getOptions(),i=yt(r,"locale.translations.total")||yt(r,"tooltip.totalLabel")||"Total",s=n.getDomainIdentifier(),a=n.getRangeIdentifier(),o=n.getDomainLabel(),l=n.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",function(c,u){const d=I(this),h=d.select("rect.heat");if(!h.classed("null-state")){const p=ss(d.attr("transform"));t.parent.select("g.cell-highlight").attr("transform",`translate(${p.x+t.translationUnits.x}, ${p.y+t.translationUnits.y})`).classed("highlighter-hidden",!1),t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEOVER,{event:c,element:h,datum:u}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:c,items:[{label:o,value:u[s]},{label:l,value:u[a]},{label:i,value:u.value,color:h.style("fill")}]})}}).on("mousemove",function(c,u){t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEMOVE,{event:c,element:I(this),datum:u}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:c})}).on("click",function(c,u){t.services.events.dispatchEvent(T.Heatmap.HEATMAP_CLICK,{event:c,element:I(this),datum:u})}).on("mouseout",function(c,u){const h=I(this).select("rect.heat"),f=h.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),f||(t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEOUT,{event:c,element:h,datum:u}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{event:c,hoveredElement:h}))})}destroy(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)}}class lN extends gt{constructor(){super(...arguments),this.type="histogram",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-bar"})).attr("opacity",s=>s[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer(),r=this.model.getOptions(),{groupIdentifier:i}=r,{groupMapsTo:s}=r.data,a=this.model.getBinnedStackedData(),o=this.services.cartesianScales.getMainXScale(),l=n.selectAll("g.bars").data(a,u=>yt(u,`0.${s}`));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",ut.GROUP);const c=n.selectAll("g.bars").selectAll("path.bar").data(u=>u);c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(i,(u,d)=>d).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"histogram-bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:u[s],originalClassName:"bar"})).style("fill",u=>this.model.getFillColor(u[s],null,u)).attr("d",u=>{const d=yt(u,"data");if(!d)return;const h=o(d.x1)-o(d.x0)-1,f=this.services.cartesianScales.getDomainValue(d.x0),p=f+h,g=this.services.cartesianScales.getRangeValue(u[0]);let m=this.services.cartesianScales.getRangeValue(u[1]);return Math.abs(m-g)>0&&Math.abs(m-g)>r.bars.dividerSize&&(this.services.cartesianScales.getOrientation()===Bt.VERTICAL?m+=1:m-=1),ie({x0:f,x1:p,y0:g,y1:m},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>b(u,"data",u[s])),this.addEventListeners()}addEventListeners(){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,{code:r,number:i}=b(t,"locale"),s=this;this.parent.selectAll("path.bar").on("mouseover",function(a,o){const l=I(this);l.classed("hovered",!0);const c=i(parseFloat(yt(o,"data.x0")),r),u=i(parseFloat(yt(o,"data.x1")),r),d=s.services.cartesianScales.getRangeAxisPosition(),h=s.services.cartesianScales.getScaleLabel(d);s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:l,items:[{label:yt(t,"bins.rangeLabel")||"Range",value:`${c} – ${u}`},{label:t.tooltip.groupLabel||"Group",value:o[n],class:s.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:o[n]})},{label:h,value:yt(o,`data.${o[n]}`)}]})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){I(this).classed("hovered",!1),s.services.events.dispatchEvent(T.Tooltip.HIDE)})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class cN extends sn{constructor(){super(...arguments),this.type="lollipop",this.renderType=et.SVG,this.handleScatterOnHover=t=>{const n=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").attr("stroke-width",s=>s[i]!==n.datum[i]?xn.weight.unselected:xn.weight.selected)},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",xn.weight.unselected)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").transition("legend-hover-line").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-line"})).attr("opacity",s=>s[i]!==n.datum().name?xn.opacity.unselected:xn.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("line.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",xn.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({withinChartClip:!0}),r=this.model.getOptions(),{groupMapsTo:i}=r.data,{cartesianScales:s}=this.services,a=s.getMainXScale(),o=s.getMainYScale(),l=s.getDomainIdentifier(),c=v=>s.getDomainValue(v),u=v=>s.getRangeValue(v),d=s.getOrientation(),[h,f]=Sn(c,u,d),p=n.selectAll("line.line").data(this.getScatterData(),v=>`${v[i]}-${v[l]}`);p.exit().attr("opacity",0).remove();const m=p.enter().append("line").attr("opacity",0).merge(p).classed("line",!0).attr("class",v=>this.model.getColorClassName({classNameTypes:[at.STROKE],dataGroupName:v[i],originalClassName:"line"})).transition().call(v=>this.services.transitions.setupTransition({transition:v,name:"lollipop-line-update-enter",animate:t})).style("stroke",v=>this.model.getFillColor(v[i],v[l],v)).attr("opacity",1);d===Bt.HORIZONTAL?m.attr("y1",f).attr("y2",f).attr("x1",a.range()[0]).attr("x2",v=>h(v)-r.points.radius):m.attr("x1",h).attr("x2",h).attr("y1",o.range()[0]).attr("y2",v=>f(v)+r.points.radius),this.addScatterPointEventListeners()}addScatterPointEventListeners(){this.services.events.addEventListener(T.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(T.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}destroy(){const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(T.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(T.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}}class uN extends gt{constructor(){super(...arguments),this.type="meter",this.renderType=et.SVG}getStackedBounds(t,n){let r=0;return t.map((s,a)=>a!==0?(r+=n(s.value),{...s,width:Math.abs(n(s.value)-jt.dividerWidth),x:r-n(s.value)}):(r=n(s.value),{...s,width:Math.abs(n(s.value)-jt.dividerWidth),x:0}))}render(t=!0){const n=this,r=this.getComponentContainer(),i=this.getOptions(),s=b(i,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:l}=R.getSVGElementSize(r,{useAttrs:!0}),{groupMapsTo:c}=i.data;let u;if(b(i,"meter","proportional")===null)u=100;else{const y=b(i,"meter","proportional","total");u=y||this.model.getMaximumDomain(this.model.getDisplayData())}const d=Fe().domain([0,u]).range([0,l]),h=this.getStackedBounds(a,d),f=b(i,"meter","height");R.appendOrSelect(r,"rect.container").attr("x",0).attr("y",0).attr("width",l).attr("height",f||(s?jt.height.proportional:jt.height.default)),R.appendOrSelect(r,"line.rangeIndicator").attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",f||(s?jt.height.proportional:jt.height.default));const p=r.selectAll("rect.value").data(h),g=o!=null&&!n.model.isUserProvidedColorScaleValid()&&!s?`value status--${o}`:"value";p.enter().append("rect").classed("value",!0).merge(p).attr("x",y=>y.x).attr("y",0).attr("height",()=>f||(s?jt.height.proportional:jt.height.default)).attr("class",y=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:y[c],originalClassName:g})).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"meter-bar-update",animate:t})).attr("width",y=>y.value>u?d(u):y.width).style("fill",y=>n.model.getFillColor(y[c],null,y)).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",y=>y.value),p.exit().remove();const m=b(i,"meter","peak");let v=m;m!==null&&(m>u?v=u:m<a[0].value&&(v=a[0].value>u?u:a[0].value));const E=r.selectAll("line.peak").data(v==null?[]:[v]);E.enter().append("line").classed("peak",!0).merge(E).attr("y1",0).attr("y2",()=>f||(s?jt.height.proportional:jt.height.default)).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"peak-line-update",animate:t})).attr("x1",y=>d(y)).attr("x2",y=>d(y)).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",y=>y),E.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=b(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",function(s,a){const o=I(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEOVER,{event:s,element:o,datum:a}),i&&(o.classed("hovered",!0),r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:a[n],value:a.value}]}))}).on("mousemove",function(s,a){const o=I(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEMOVE,{event:s,element:o,datum:a}),i&&r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){r.services.events.dispatchEvent(T.Meter.METER_CLICK,{event:s,element:I(this),datum:a})}).on("mouseout",function(s,a){const o=I(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEOUT,{event:s,element:o,datum:a}),i&&(o.classed("hovered",!1),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o}))})}destroy(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)}}function Bv(e){const t=hN(Hv(e),360);return Nn(t,[0,10])||Nn(t,[350,0])?{textAnchor:Je.START,dominantBaseline:tn.MIDDLE}:Nn(t,[10,80])?{textAnchor:Je.START,dominantBaseline:tn.HANGING}:Nn(t,[80,100])?{textAnchor:Je.MIDDLE,dominantBaseline:tn.HANGING}:Nn(t,[100,170])?{textAnchor:Je.END,dominantBaseline:tn.HANGING}:Nn(t,[170,190])?{textAnchor:Je.END,dominantBaseline:tn.MIDDLE}:Nn(t,[190,260])?{textAnchor:Je.END,dominantBaseline:tn.BASELINE}:Nn(t,[260,280])?{textAnchor:Je.MIDDLE,dominantBaseline:tn.BASELINE}:{textAnchor:Je.START,dominantBaseline:tn.BASELINE}}function hN(e,t){return(e%t+t)%t}function Nn(e,[t,n]){return e>=t&&e<=n}function Hv(e){return e*(180/Math.PI)}function Ft(e,t,n={x:0,y:0}){const r=t*Math.cos(e)+n.x,i=t*Math.sin(e)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}function dN(e,t){return t*Math.sin(e-Math.PI/2)}class fN extends gt{constructor(){super(...arguments),this.type="radar",this.renderType=et.SVG,this.getLabelDimensions=t=>{const n=R.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),r=R.appendOrSelect(n,"text").text(t),{width:i,height:s}=R.getSVGElementSize(r.node(),{useBBox:!0});return n.remove(),{width:i,height:s}},this.normalizeFlatData=t=>{const n=this.getOptions(),{angle:r,value:i}=b(n,"radar","axes"),s=b(n,"data","groupMapsTo"),a=_L(this.uniqueKeys.map(o=>this.uniqueGroups.map(l=>({[r]:o,[s]:l,[i]:null}))));return lt(a,t)},this.normalizeGroupedData=t=>{const n=this.getOptions(),{angle:r,value:i}=b(n,"radar","axes"),s=b(n,"data","groupMapsTo");return t.map(({name:a,data:o})=>{const l=this.uniqueKeys.map(c=>({[s]:a,[r]:c,[i]:null}));return{name:a,data:lt(l,o)}})},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g.blobs path").transition("legend-hover-blob").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-blob"})).style("fill-opacity",r=>r.name!==n.datum().name?or.opacity.unselected:or.opacity.selected).style("stroke-opacity",r=>r.name!==n.datum().name?or.opacity.unselected:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})).style("fill-opacity",or.opacity.selected).style("stroke-opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer(),{width:r,height:i}=R.getSVGElementSize(n,{useAttrs:!0}),s=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),l=b(o,"data","groupMapsTo"),c=b(o,"radar","axes","value"),{angle:u,value:d}=b(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:f,yTicksNumber:p,minRange:g,xAxisRectHeight:m}=or;this.uniqueKeys=Array.from(new Set(s.map(A=>A[u]))),this.uniqueGroups=Array.from(new Set(s.map(A=>A[l]))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(a);const E=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+f),S=(Math.min(r,i)-E)/2;if(S<=0)return;const _=ki().domain(this.fullDataNormalized.map(A=>A[u])).range([0,2*Math.PI].map(A=>A-Math.PI/2)),C=Cn(this.fullDataNormalized.map(A=>A[d])),L=Fe().domain([C>=0?0:C,Bn(this.fullDataNormalized.map(A=>A[d]))]).range([g,S]).nice(p),B=L.ticks(p),D=(A,V,z)=>this.model.getFillColor(A,V,z),O=gT().angle(A=>_(A[u])+Math.PI/2).radius(A=>L(A[d])).curve(Zf),H=this.uniqueKeys.map(A=>{const V=this.getLabelDimensions(A).width,z=dN(_(A),S);return V+z}),M={x:Bn(H)+h,y:i/2},U=R.appendOrSelect(n,"g.y-axes").attr("role",ut.GROUP).selectAll("path").data(B,A=>A),$=A=>this.uniqueKeys.map(V=>({[u]:V,[d]:A}));U.join(A=>A.append("path").attr("opacity",0).attr("transform",`translate(${M.x}, ${M.y})`).attr("fill","none").call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_axes_enter",animate:t})).attr("opacity",1).attr("d",z=>O($(z)))),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_axes_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",z=>O($(z)))),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_axes_exit",animate:t})).attr("d",z=>O($(z))).attr("opacity",0).remove())),R.appendOrSelect(n,"g.x-axes").attr("role",ut.GROUP).selectAll("line").data(this.uniqueKeys,A=>A).join(A=>A.append("line").attr("opacity",0).attr("class",V=>`x-axis-${Hr(V)}`).attr("stroke-dasharray","0").attr("x1",V=>Ft(_(V),0,M).x).attr("y1",V=>Ft(_(V),0,M).y).attr("x2",V=>Ft(_(V),0,M).x).attr("y2",V=>Ft(_(V),0,M).y).call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_axes_enter",animate:t})).attr("opacity",1).attr("x1",z=>Ft(_(z),L.range()[0],M).x).attr("y1",z=>Ft(_(z),L.range()[0],M).y).attr("x2",z=>Ft(_(z),L.range()[1],M).x).attr("y2",z=>Ft(_(z),L.range()[1],M).y)),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_axes_update",animate:t})).attr("opacity",1).attr("x1",z=>Ft(_(z),L.range()[0],M).x).attr("y1",z=>Ft(_(z),L.range()[0],M).y).attr("x2",z=>Ft(_(z),L.range()[1],M).x).attr("y2",z=>Ft(_(z),L.range()[1],M).y)),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_axes_exit",animate:t})).attr("opacity",0).remove())),R.appendOrSelect(n,"g.x-labels").attr("role",ut.GROUP).selectAll("text").data(this.uniqueKeys).join(A=>A.append("text").text(V=>V).attr("opacity",0).attr("x",V=>Ft(_(V),L.range()[1]+h,M).x).attr("y",V=>Ft(_(V),L.range()[1]+h,M).y).style("text-anchor",V=>Bv(_(V)).textAnchor).style("dominant-baseline",V=>Bv(_(V)).dominantBaseline).call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_labels_enter",animate:t})).attr("opacity",1)),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_labels_update",animate:t})).attr("opacity",1).attr("x",z=>Ft(_(z),L.range()[1]+h,M).x).attr("y",z=>Ft(_(z),L.range()[1]+h,M).y).end().finally(()=>{const z=b(o,"radar","alignment"),St=this.getAlignmentXOffset(z,n,this.getParent());n.attr("x",St)})),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_labels_exit",animate:t})).attr("opacity",0).remove())),R.appendOrSelect(n,"g.blobs").attr("role",ut.GROUP).selectAll("path").data(this.groupedDataNormalized,A=>A.name).join(A=>A.append("path").attr("class",V=>this.model.getColorClassName({classNameTypes:[at.FILL,at.STROKE],dataGroupName:V.name,originalClassName:"blob"})).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-label",V=>V.name).attr("opacity",0).attr("transform",t?()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`:`translate(${M.x}, ${M.y})`).style("fill",V=>D(V.name,null,V.data)).style("fill-opacity",or.opacity.selected).style("stroke",V=>D(V.name,null,V.data)).call(V=>{const z=V.transition().call(St=>this.services.transitions.setupTransition({transition:St,name:"radar_blobs_enter",animate:t}));t&&z.delay(()=>Math.random()*30).attr("transform",`translate(${M.x}, ${M.y})`),z.attr("opacity",1).attr("d",St=>O(St.data))}),A=>(A.attr("class",V=>this.model.getColorClassName({classNameTypes:[at.FILL,at.STROKE],dataGroupName:V.name,originalClassName:"blob"})).style("fill",V=>D(V.name,null,V.data)).style("stroke",V=>D(V.name,null,V.data)),A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_blobs_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",z=>O(z.data))),A),A=>A.call(V=>{const z=V.transition().call(St=>this.services.transitions.setupTransition({transition:St,name:"radar_blobs_exit",animate:t}));t&&z.delay(()=>Math.random()*30).attr("transform",()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`),z.attr("opacity",0).remove()})),R.appendOrSelect(n,"g.dots").attr("role",ut.GROUP).selectAll("circle").data(this.fullDataNormalized.filter(A=>b(A,d)!==null)).join(A=>A.append("circle").attr("role",ut.GRAPHICS_SYMBOL).attr("aria-label",V=>V[c]),A=>A,A=>A.remove()).attr("class",A=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:A[l],originalClassName:Hr(A[u])})).attr("cx",A=>Ft(_(A[u]),L(A[d]),M).x).attr("cy",A=>Ft(_(A[u]),L(A[d]),M).y).attr("r",0).attr("opacity",0).style("fill",A=>D(A[l])),R.appendOrSelect(n,"g.x-axes-rect").attr("role",ut.GROUP).selectAll("rect").data(this.uniqueKeys).join(A=>A.append("rect"),A=>A,A=>A.remove()).attr("x",M.x).attr("y",M.y-m/2).attr("width",L.range()[1]).attr("height",m).style("fill","red").style("fill-opacity",0).attr("transform",A=>`rotate(${Hv(_(A))}, ${M.x}, ${M.y})`);const{code:vt,number:q}=b(o,"locale");R.appendOrSelect(n,"g.y-labels").attr("role",ut.GROUP).selectAll("text").data(ke(B)).join(A=>A.append("text").attr("opacity",0).text(V=>q(V,vt)).attr("x",V=>Ft(-Math.PI/2,L(V),M).x+f).attr("y",V=>Ft(-Math.PI/2,L(V),M).y).style("text-anchor","start").style("dominant-baseline","middle").call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_labels_enter",animate:t})).attr("opacity",1)),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_labels_update",animate:t})).text(z=>z).attr("opacity",1).attr("x",z=>Ft(-Math.PI/2,L(z),M).x+f).attr("y",z=>Ft(-Math.PI/2,L(z),M).y)),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_labels_exit",animate:t})).attr("opacity",0).remove())),this.addEventListeners()}getAlignmentXOffset(t,n,r){const i=R.getSVGElementSize(n,{useBBox:!0}),{width:s}=R.getSVGElementSize(r,{useAttrs:!0});let a=0;return t===Ht.CENTER?a=Math.floor((s-i.width)/2):t===Ht.RIGHT&&(a=s-i.width),a}destroy(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}addEventListeners(){const t=this,{axes:{angle:n}}=b(this.getOptions(),"radar");this.parent.selectAll(".x-axes-rect > rect").on("mouseover",function(r,i){const s=I(this);t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEOVER,{event:r,element:s,datum:i});const a=t.parent.select(`.x-axes .x-axis-${Hr(i)}`),o=t.parent.selectAll(`.dots circle.${Hr(i)}`),l=t.model.getActiveDataGroupNames(),c=t.getOptions(),{groupMapsTo:u}=c.data,d=b(c,"radar","axes","value");a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",f=>l.indexOf(f[u])!==-1?1:0).attr("r",or.dotsRadius);const h=t.fullDataNormalized.filter(f=>f[n]===i&&l.indexOf(f[u])!==-1);t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:r,hoveredElement:s,items:h.filter(f=>typeof f[d]=="number").map(f=>({label:f[u],value:f[d],color:t.model.getFillColor(f[u],null,f),class:t.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:f[u]})}))})}).on("mousemove",function(r,i){const s=I(this);t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEMOVE,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(T.Radar.X_AXIS_CLICK,{event:r,element:I(this),datum:i})}).on("mouseout",function(r,i){const s=I(this),a=t.parent.select(`.x-axes .x-axis-${Hr(i)}`),o=t.parent.selectAll(`.dots circle.${Hr(i)}`);a.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEOUT,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.HIDE)})}}class Gv extends qu{constructor(){super(...arguments),this.type="simple-bar",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-simple-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getComponentContainer({withinChartClip:!0}),s=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),o=i.selectAll("path.bar").data(s,c=>c[r]);o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:c[r],originalClassName:"bar"})).style("fill",c=>{const u=this.services.cartesianScales.getDomainIdentifier(c);return this.model.getFillColor(c[r],c[u],c)}).attr("d",c=>{const u=this.services.cartesianScales.getRangeIdentifier(),d=this.getBarWidth(),h=c[u],f=this.services.cartesianScales.getDomainValue(c)-d/2,p=f+d;let g,m;if(Array.isArray(h)&&h.length===2)g=this.services.cartesianScales.getRangeValue(h[0]),m=this.services.cartesianScales.getRangeValue(h[1]);else{const y=this.services.cartesianScales.getRangeScale().domain()[0];g=this.services.cartesianScales.getRangeValue(Math.max(0,y)),m=this.services.cartesianScales.getRangeValue(c)}const v=Math.abs(m-g);if(v!==0&&v<2&&(h>0&&a===Bt.VERTICAL||h<0&&a===Bt.HORIZONTAL?m=g-2:m=g+2),!this.isOutsideZoomedDomain(f,p))return ie({x0:f,x1:p,y0:g,y1:m},a)}).attr("opacity",1).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=I(this);i.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:n,element:I(this),datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:n,element:I(this),datum:r})}).on("mouseout",function(n,r){const i=I(this);i.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class pN extends oe{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const n=b(this.getOptions(),"data","loading"),r=!b(this.getOptions(),"grid","x","enabled")&&!b(this.getOptions(),"grid","y","enabled")&&!b(this.getOptions(),"axes","bottom","visible")&&!b(this.getOptions(),"axes","left","visible");n&&!r?super.renderGridSkeleton(n):n&&r?this.renderSparklineSkeleton(n):this.removeSkeleton()}renderSparklineSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")}drawSparkline(t){const n=this.backdrop.attr("width"),r=[100],i=R.appendOrSelect(this.backdrop,"g.y.skeleton"),s=i.selectAll("line").data(r);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",a=>a).attr("y2",a=>a),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const t=this.parent;this.backdrop=R.appendOrSelect(t,"svg.chart-skeleton.DAII"),R.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class Vv extends gt{constructor(){super(...arguments),this.type="area-stacked",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.area").transition("legend-hover-area").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-area"})).attr("opacity",s=>b(s,0,i)!==n.datum().name?bn.opacity.unselected:bn.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",bn.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0}),r=this,i=this.getOptions(),{groupMapsTo:s}=i.data,a=Object.keys(i.axes).some(p=>i.axes[p].percentage),o=this.model.getStackedData({percentage:a,groups:this.configs.groups}),l=b(o,0,0),c=this.services.cartesianScales.getDomainAxisPosition({datum:l}),u=this.services.cartesianScales.getRangeAxisPosition({datum:l}),d=this.services.cartesianScales.getScaleByPosition(u),h=n.selectAll("path.area").data(o,p=>b(p,0,s));this.areaGenerator=Zl().x(p=>this.services.cartesianScales.getValueThroughAxisPosition(c,p.data.sharedStackKey)).y0(p=>d(p[0])).y1(p=>d(p[1])).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(o,p=>b(p,0,s)).attr("class","area").attr("class",p=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:b(p,0,s),originalClassName:"area"})).style("fill",p=>r.model.getFillColor(b(p,0,s),null,p)).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",p=>b(p,0,s)).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"area-update-enter",animate:t})).attr("opacity",bn.opacity.selected).attr("d",this.areaGenerator)}}class zv extends qu{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.model.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),a=this.model.getActiveDataGroupNames(),o=n.selectAll("g.bars").data(s,c=>b(c,0,i));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",ut.GROUP).attr("data-name","bars");const l=n.selectAll("g.bars").selectAll("path.bar").data(c=>c,c=>c.data.sharedStackKey);l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:c[i],originalClassName:"bar"})).style("fill",c=>this.model.getFillColor(c[i],c.data.sharedStackKey,c.data)).attr("d",c=>{const u=c.data.sharedStackKey,d=this.getBarWidth(),h=this.services.cartesianScales.getDomainValue(u)-d/2,f=h+d,p=this.services.cartesianScales.getRangeValue(c[0]);let g=this.services.cartesianScales.getRangeValue(c[1]);if(!this.isOutsideZoomedDomain(h,f)){if(Math.abs(g-p)>0&&Math.abs(g-p)>r.bars.dividerSize){const m=c[0]<0&&c[1]<=0;m&&a.length>1?this.services.cartesianScales.getOrientation()===Bt.VERTICAL?g+=c[1]===0?2:1:g-=1:m||(this.services.cartesianScales.getOrientation()===Bt.VERTICAL?g+=1:g-=1)}return ie({x0:h,x1:f,y0:p,y1:g},this.services.cartesianScales.getOrientation())}}).attr("opacity",1).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c[1]-c[0]),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this;this.parent.selectAll("path.bar").on("mouseover",function(i,s){const a=I(this);a.classed("hovered",!0),r.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:i,element:a,datum:s});let l=r.model.getDisplayData(r.configs.groups).find(c=>{const u=r.services.cartesianScales.getDomainIdentifier(c),d=r.services.cartesianScales.getRangeIdentifier(c);return c[d]===s.data[s[n]]&&c[u].toString()===s.data.sharedStackKey&&c[n]===s[n]});if(l===void 0){const c=r.services.cartesianScales.getDomainIdentifier(),u=r.services.cartesianScales.getRangeIdentifier();l={[c]:s.data.sharedStackKey,[u]:s.data[s[n]],[n]:s[n]}}r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:i,hoveredElement:a,data:[l]})}).on("mousemove",function(i,s){const a=I(this);r.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:i,element:a,datum:s}),r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:i})}).on("click",function(i,s){r.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:i,element:I(this),datum:s})}).on("mouseout",function(i,s){const a=I(this);a.classed("hovered",!1),r.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:i,element:a,datum:s}),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:a})})}getBarWidth(){const t=this.getOptions();if(b(t,"bars","width"))return t.bars.width;const n=this.services.cartesianScales.getMainXScale(),r=R.getSVGElementSize(this.parent,{useAttrs:!0}).width,i=this.model.getStackKeys().length,s=b(t,"bars","spacingFactor");return n.step?Math.min(t.bars.maxWidth,n.step()/2):Math.min(t.bars.maxWidth,r*s/i)}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class Wv extends sn{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=et.SVG}render(t){if(!b(this.getOptions(),"points","enabled"))return;const r=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:s}=i.data,a=Object.keys(i.axes).some(f=>i.axes[f].percentage),o=this.model.getStackedData({groups:this.configs.groups,percentage:a}),l=r.selectAll("g.dots").data(o,f=>b(f,0,s));l.exit().attr("opacity",0).remove();const u=l.enter().append("g").classed("dots",!0).attr("role",ut.GROUP).merge(l).selectAll("circle.dot").data(f=>f);u.exit().attr("opacity",0).remove();const h=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u).datum(f=>{const p=f[s],g=this.services.cartesianScales.getDomainIdentifier(f),m=this.services.cartesianScales.getRangeIdentifier(f);return{[s]:p,[g]:f.data.sharedStackKey,[m]:f[1]}});this.styleCircles(h,t),this.addEventListeners()}getTooltipData(t,n){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=Object.keys(r.axes).some(l=>r.axes[l].percentage),a=this.model.getStackedData({groups:this.configs.groups,percentage:s}),o=[];return a.forEach((l,c)=>{l.forEach((u,d)=>{const h=u[i],f=u.data.sharedStackKey;let p=u.data[h];const g=u[1],m=this.services.cartesianScales.getDomainIdentifier(u),v=this.services.cartesianScales.getRangeIdentifier(u);p!=null&&t===this.services.cartesianScales.getDomainValue(f)&&n===this.services.cartesianScales.getRangeValue(g)&&(s&&(p=this.model.getStackedData({groups:this.configs.groups})[c][d].data[h]),p!==null&&o.push({[i]:h,[m]:f,[v]:p}))})}),this.model.getDisplayData(this.configs.groups).filter(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l),u=this.services.cartesianScales.getRangeIdentifier(l);return o.find(d=>d[i]==l[i]&&d[c]==l[c]&&d[u]==l[u])!==void 0})}}const ni=6;class gN extends gt{constructor(){super(...arguments),this.type="tree",this.renderType=et.SVG}getLongestLabel(t){let n="";return t.forEach(r=>{const i=r.children?this.getLongestLabel(r.children):"";(i.length>n.length||r.name.length>n.length)&&(n=i.length>r.name.length?i:r.name)}),n}getMockLabelWidth(t,n){const r=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(n),{width:i}=R.getSVGElementSize(r.node(),{useBBox:!0});return r.remove(),i}render(t=!0){const n=this.getComponentContainer();n.html("");const{width:r,height:i}=R.getSVGElementSize(this.parent,{useAttrs:!0});if(r<1||i<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=b(s,"tree","rootTitle")||"Tree",l=this.getMockLabelWidth(n,o),c=this.getLongestLabel(a),u=this.getMockLabelWidth(n,c),d={top:0,right:0,bottom:0,left:l>0?l+ni:30-ni},h=Li({name:o,children:a}),f=10,p=r/6,g=_=>{const C=h.descendants().reverse(),L=h.links();let B=h,D=h;h.eachBefore(N=>{N.x<B.x&&(B=N),N.x>D.x&&(D=N)});const O=D.x-B.x,H=n.transition().call(N=>this.services.transitions.setupTransition({transition:N,name:"tree-update-viewbox",animate:!0})).attr("viewBox",[-d.left,B.x,r,O].join(" ")),P=S.selectAll("g").data(C,N=>N.id),M=this,w=P.enter().append("g").attr("transform",()=>`translate(${_.y0},${_.x0})`).attr("class",N=>N.depth!==0&&N.children&&N.children.length>0?"clickable":null).on("mouseover",function(N,F){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOVER,{event:N,element:I(this),datum:F})}).on("click",function(N,F){F.depth!==0&&(F.children=F.children?null:F._children,g(F)),M.services.events.dispatchEvent(T.Tree.NODE_CLICK,{event:N,element:I(this),datum:F})}).on("mouseout",function(N,F){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOUT,{event:N,element:I(this),datum:F})});w.append("circle").attr("r",2.5).attr("class",N=>N._children?"parent":"child").attr("stroke-width",10),w.append("text").attr("dy","0.31em").attr("x",N=>N._children?-ni:ni).attr("text-anchor",N=>N._children?"end":"start").text(N=>N.data.name).clone(!0).attr("class","text-stroke").lower(),P.merge(w).transition(H).attr("transform",N=>`translate(${N.y},${N.x})`).attr("fill-opacity",1).attr("stroke-opacity",1),P.exit().transition(H).remove().attr("transform",()=>`translate(${_.y},${_.x})`).attr("fill-opacity",0).attr("stroke-opacity",0);const U=x.selectAll("path").data(L,N=>N.target.id),$=U.enter().append("path").attr("d",()=>{const N={x:_.x0,y:_.y0};return y({source:N,target:N})});U.merge($).transition(H).attr("d",y),U.exit().transition(H).remove().attr("d",()=>{const N={x:_.x,y:_.y};return y({source:N,target:N})}),h.eachBefore(N=>{N.x0=N.x,N.y0=N.y})},m=h.descendants(),v=m[m.length-1].depth,E=b(s,"tree","type")===za.DENDROGRAM?Nx().size([i,r-u-v*ni-l]):S_().nodeSize([f,p]).size([i,r-u-v*ni-l]),y=xT().x(_=>_.y).y(_=>_.x);h.x0=p/2,h.y0=0,h.descendants().forEach((_,C)=>{_.id=C,_._children=_.children}),E(h),n.attr("viewBox",[-d.left,-d.top,r,f]).style("user-select","none");const x=n.append("g").attr("class","links"),S=n.append("g").attr("class","nodes");g(h)}}var mN="#000000",vN="#ffffff",yN="#fcf4d6",EN="#fddc69",bN="#f1c21b",xN="#d2a106",_N="#b28600",SN="#8e6a00",TN="#684e00",ON="#483700",wN="#302400",MN="#1c1500",AN={10:yN,20:EN,30:bN,40:xN,50:_N,60:SN,70:TN,80:ON,90:wN,100:MN},CN="#fff2e8",DN="#ffd9be",LN="#ffb784",RN="#ff832b",IN="#eb6200",kN="#ba4e00",PN="#8a3800",NN="#5e2900",$N="#3e1a00",FN="#231000",UN={10:CN,20:DN,30:LN,40:RN,50:IN,60:kN,70:PN,80:NN,90:$N,100:FN},BN="#fff1f1",HN="#ffd7d9",GN="#ffb3b8",VN="#ff8389",zN="#fa4d56",WN="#da1e28",YN="#a2191f",qN="#750e13",XN="#520408",jN="#2d0709",ZN={10:BN,20:HN,30:GN,40:VN,50:zN,60:WN,70:YN,80:qN,90:XN,100:jN},KN="#fff0f7",QN="#ffd6e8",JN="#ffafd2",t$="#ff7eb6",e$="#ee5396",n$="#d02670",r$="#9f1853",i$="#740937",s$="#510224",a$="#2a0a18",o$={10:KN,20:QN,30:JN,40:t$,50:e$,60:n$,70:r$,80:i$,90:s$,100:a$},l$="#f6f2ff",c$="#e8daff",u$="#d4bbff",h$="#be95ff",d$="#a56eff",f$="#8a3ffc",p$="#6929c4",g$="#491d8b",m$="#31135e",v$="#1c0f30",y$={10:l$,20:c$,30:u$,40:h$,50:d$,60:f$,70:p$,80:g$,90:m$,100:v$},E$="#edf5ff",b$="#d0e2ff",x$="#a6c8ff",_$="#78a9ff",S$="#4589ff",T$="#0f62fe",O$="#0043ce",w$="#002d9c",M$="#001d6c",A$="#001141",C$={10:E$,20:b$,30:x$,40:_$,50:S$,60:T$,70:O$,80:w$,90:M$,100:A$},D$="#e5f6ff",L$="#bae6ff",R$="#82cfff",I$="#33b1ff",k$="#1192e8",P$="#0072c3",N$="#00539a",$$="#003a6d",F$="#012749",U$="#061727",B$={10:D$,20:L$,30:R$,40:I$,50:k$,60:P$,70:N$,80:$$,90:F$,100:U$},H$="#d9fbfb",G$="#9ef0f0",V$="#3ddbd9",z$="#08bdba",W$="#009d9a",Y$="#007d79",q$="#005d5d",X$="#004144",j$="#022b30",Z$="#081a1c",K$={10:H$,20:G$,30:V$,40:z$,50:W$,60:Y$,70:q$,80:X$,90:j$,100:Z$},Q$="#defbe6",J$="#a7f0ba",tF="#6fdc8c",eF="#42be65",nF="#24a148",rF="#198038",iF="#0e6027",sF="#044317",aF="#022d0d",oF="#071908",lF={10:Q$,20:J$,30:tF,40:eF,50:nF,60:rF,70:iF,80:sF,90:aF,100:oF},cF="#f2f4f8",uF="#dde1e6",hF="#c1c7cd",dF="#a2a9b0",fF="#878d96",pF="#697077",gF="#4d5358",mF="#343a3f",vF="#21272a",yF="#121619",EF={10:cF,20:uF,30:hF,40:dF,50:fF,60:pF,70:gF,80:mF,90:vF,100:yF},bF="#f4f4f4",xF="#e0e0e0",_F="#c6c6c6",SF="#a8a8a8",TF="#8d8d8d",OF="#6f6f6f",wF="#525252",MF="#393939",AF="#262626",CF="#161616",DF={10:bF,20:xF,30:_F,40:SF,50:TF,60:OF,70:wF,80:MF,90:AF,100:CF},LF="#f7f3f2",RF="#e5e0df",IF="#cac5c4",kF="#ada8a8",PF="#8f8b8b",NF="#726e6e",$F="#565151",FF="#3c3838",UF="#272525",BF="#171414",HF={10:LF,20:RF,30:IF,40:kF,50:PF,60:NF,70:$F,80:FF,90:UF,100:BF},Yv={black:{100:mN},blue:C$,coolGray:EF,cyan:B$,gray:DF,green:lF,magenta:o$,orange:UN,purple:y$,red:ZN,teal:K$,warmGray:HF,white:{0:vN},yellow:AN};const GF=e=>{if(!e)return null;for(const t of Object.keys(Yv)){const n=Yv[t];for(const r of Object.keys(n))if(n[+r]===e)return r}return null},qv=function(){const e=I(this.parentNode).select("rect.leaf"),t=getComputedStyle(e.node(),null).getPropertyValue("fill"),n=on(t);let r;if(n&&(r=GF(n?n.hex():null)),r==null){const i=Bo(n).l;r=Math.abs(i*100-100)}return r>50?"white":"black"};let VF=0;class zF extends gt{constructor(){super(...arguments),this.type="treemap",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-treemap"})).attr("opacity",r=>r.parent.data.name===n.datum().name?1:.3)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})).attr("opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer();this.model.getData();const r=this.model.getDisplayData(),i=this.model.getOptions(),s=b(window,"location"),{width:a,height:o}=R.getSVGElementSize(n,{useAttrs:!0}),l=Li({name:i.title||"Treemap",children:r}).sum(g=>g.value).sort((g,m)=>m.value-g.value),c=A_().size([a,o]).paddingInner(1).paddingOuter(0).round(!0)(l),u=n.selectAll("g[data-name='leaf']").data(c.leaves(),g=>g.data.name);u.exit().attr("opacity",0).remove();const h=u.enter().append("g").attr("data-name","leaf").attr("data-uid",()=>VF++).merge(u);h.attr("data-name","leaf").transition().call(g=>this.services.transitions.setupTransition({transition:g,name:"treemap-group-update",animate:t})).attr("transform",g=>`translate(${g.x0},${g.y0})`);const f=h.selectAll("rect.leaf").data(g=>[g]);f.exit().attr("width",0).attr("height",0).remove(),f.enter().append("rect").classed("leaf",!0).merge(f).attr("width",0).attr("height",0).attr("id",function(){const g=I(this.parentNode).attr("data-uid");return`${i.style.prefix}-leaf-${g}`}).attr("class",g=>{for(;g.depth>1;)g=g.parent;return this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:g.data.name,originalClassName:"leaf"})}).transition().call(g=>this.services.transitions.setupTransition({transition:g,name:"treemap-leaf-update-enter",animate:t})).attr("width",g=>g.x1-g.x0).attr("height",g=>g.y1-g.y0).style("fill",g=>{for(;g.depth>1;)g=g.parent;return this.model.getFillColor(g.data.name,null,g.data)}),h.selectAll("clipPath").data(g=>g.data.showLabel!==!0?[]:[1],g=>g).join(g=>g.append("clipPath").attr("id",function(){const m=I(this.parentNode).attr("data-uid");return`${i.style.prefix}-clip-${m}`}).append("use").attr("xlink:href",function(){const m=I(this.parentNode.parentNode).attr("data-uid"),v=`${i.style.prefix}-leaf-${m}`;return new URL(`#${v}`,s)+""}),g=>null,g=>g.remove()),h.selectAll("text").data(g=>{if(g.data.showLabel!==!0)return[];let m=g;for(;m.depth>1;)m=m.parent;const v=Bo(this.model.getFillColor(m.data.name));return[{text:g.data.name,color:v.l<.5?"white":"black"}]},g=>g).join(g=>{const m=g.append("text").text(v=>v.text).style("fill",qv).attr("x",7).attr("y",18);return s&&m.attr("clip-path",function(){const v=I(this.parentNode).attr("data-uid"),E=`${i.style.prefix}-clip-${v}`;return`url(${new URL(`#${E}`,s)+""})`}),m},g=>g.text(m=>m.text).style("fill",qv),g=>g.remove()),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("rect.leaf").on("mouseover",function(n,r){const i=I(this);let s=getComputedStyle(this,null).getPropertyValue("fill"),a=r;for(;a.depth>1;)a=a.parent;i.transition("graph_element_mouseover_fill_update").call(o=>t.services.transitions.setupTransition({transition:o,name:"graph_element_mouseover_fill_update"})).style("fill",o=>{const l=t.model.getFillColor(o.parent.data.name,null,o.data);return l&&(s=l),on(s).darker(.7).toString()}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:s,label:a.data.name,bold:!0},{label:r.data.name,value:r.data.value}]}),t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Treemap.LEAF_CLICK,{event:n,element:I(this),datum:r})}).on("mouseout",function(n,r){const i=I(this);i.classed("hovered",!1);let s=r;for(;s.depth>1;)s=s.parent;i.transition().call(a=>t.services.transitions.setupTransition({transition:a,name:"graph_element_mouseout_fill_update"})).style("fill",a=>t.model.getFillColor(a.parent.data.name,null,a.data)),t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}}var WF={value:function(){}};function Xv(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Eo(n)}function Eo(e){this._=e}function YF(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Eo.prototype=Xv.prototype={constructor:Eo,on:function(e,t){var n=this._,r=YF(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=qF(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=jv(n[i],e.name,t);else if(t==null)for(i in n)n[i]=jv(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Eo(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function qF(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function jv(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=WF,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}const XF=T2(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Xv},Symbol.toStringTag,{value:"Module"}))).dispatch,Xu=Math.PI/180,jF={archimedean:Kv,rectangular:aU},Es=64,bo=2048;var ZF=function(){var e=[256,256],t=KF,n=QF,r=JF,i=Zv,s=Zv,a=tU,o=eU,l=Kv,c=[],u=1/0,d=XF("word","end"),h=null,f=Math.random,p={},g=lU;p.canvas=function(E){return arguments.length?(g=$n(E),p):g},p.start=function(){var E=m(g()),y=oU((e[0]>>5)*e[1]),x=null,S=c.length,_=-1,C=[],L=c.map(function(D,O){return D.text=t.call(this,D,O),D.font=n.call(this,D,O),D.style=i.call(this,D,O),D.weight=s.call(this,D,O),D.rotate=a.call(this,D,O),D.size=~~r.call(this,D,O),D.padding=o.call(this,D,O),D}).sort(function(D,O){return O.size-D.size});return h&&clearInterval(h),h=setInterval(B,0),B(),p;function B(){for(var D=Date.now();Date.now()-D<u&&++_<S&&h;){var O=L[_];O.x=e[0]*(f()+.5)>>1,O.y=e[1]*(f()+.5)>>1,nU(E,O,L,_),O.hasText&&v(y,O,x)&&(C.push(O),d.call("word",p,O),x?iU(x,O):x=[{x:O.x+O.x0,y:O.y+O.y0},{x:O.x+O.x1,y:O.y+O.y1}],O.x-=e[0]>>1,O.y-=e[1]>>1)}_>=S&&(p.stop(),d.call("end",p,C,x))}},p.stop=function(){h&&(clearInterval(h),h=null);for(const E of c)delete E.sprite;return p};function m(E){const y=E.getContext("2d",{willReadFrequently:!0});E.width=E.height=1;const x=Math.sqrt(y.getImageData(0,0,1,1).data.length>>2);return E.width=(Es<<5)/x,E.height=bo/x,y.fillStyle=y.strokeStyle="red",{context:y,ratio:x}}function v(E,y,x){e[0],e[1];for(var S=y.x,_=y.y,C=Math.sqrt(e[0]*e[0]+e[1]*e[1]),L=l(e),B=f()<.5?1:-1,D=-B,O,H,P;(O=L(D+=B))&&(H=~~O[0],P=~~O[1],!(Math.min(Math.abs(H),Math.abs(P))>=C));)if(y.x=S+H,y.y=_+P,!(y.x+y.x0<0||y.y+y.y0<0||y.x+y.x1>e[0]||y.y+y.y1>e[1])&&(!x||sU(y,x))&&!rU(y,E,e[0])){for(var M=y.sprite,w=y.width>>5,U=e[0]>>5,$=y.x-(w<<4),N=$&127,F=32-N,Y=y.y1-y.y0,Z=(y.y+y.y0)*U+($>>5),K,dt=0;dt<Y;dt++){K=0;for(var it=0;it<=w;it++)E[Z+it]|=K<<F|(it<w?(K=M[dt*w+it])>>>N:0);Z+=U}return!0}return!1}return p.timeInterval=function(E){return arguments.length?(u=E??1/0,p):u},p.words=function(E){return arguments.length?(c=E,p):c},p.size=function(E){return arguments.length?(e=[+E[0],+E[1]],p):e},p.font=function(E){return arguments.length?(n=$n(E),p):n},p.fontStyle=function(E){return arguments.length?(i=$n(E),p):i},p.fontWeight=function(E){return arguments.length?(s=$n(E),p):s},p.rotate=function(E){return arguments.length?(a=$n(E),p):a},p.text=function(E){return arguments.length?(t=$n(E),p):t},p.spiral=function(E){return arguments.length?(l=jF[E]||E,p):l},p.fontSize=function(E){return arguments.length?(r=$n(E),p):r},p.padding=function(E){return arguments.length?(o=$n(E),p):o},p.random=function(E){return arguments.length?(f=E,p):f},p.on=function(){var E=d.on.apply(d,arguments);return E===d?p:E},p};function KF(e){return e.text}function QF(){return"serif"}function Zv(){return"normal"}function JF(e){return Math.sqrt(e.value)}function tU(){return(~~(random()*6)-3)*30}function eU(){return 1}function nU(e,t,n,r){if(!t.sprite){var i=e.context,s=e.ratio;i.clearRect(0,0,(Es<<5)/s,bo/s);var a=0,o=0,l=0,c=n.length;for(--r;++r<c;){t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/s)+"px "+t.font;const O=i.measureText(t.text),H=-Math.floor(O.width/2);let P=(O.width+1)*s,M=t.size<<1;if(t.rotate){var u=Math.sin(t.rotate*Xu),d=Math.cos(t.rotate*Xu),h=P*d,f=P*u,p=M*d,g=M*u;P=Math.max(Math.abs(h+g),Math.abs(h-g))+31>>5<<5,M=~~Math.max(Math.abs(f+p),Math.abs(f-p))}else P=P+31>>5<<5;if(M>l&&(l=M),a+P>=Es<<5&&(a=0,o+=l,l=0),o+M>=bo)break;i.translate((a+(P>>1))/s,(o+(M>>1))/s),t.rotate&&i.rotate(t.rotate*Xu),i.fillText(t.text,H,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,H,0)),i.restore(),t.width=P,t.height=M,t.xoff=a,t.yoff=o,t.x1=P>>1,t.y1=M>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,a+=P}for(var m=i.getImageData(0,0,(Es<<5)/s,bo/s).data,v=[];--r>=0;)if(t=n[r],!!t.hasText){for(var E=t.width,y=E>>5,x=t.y1-t.y0,S=0;S<x*y;S++)v[S]=0;if(a=t.xoff,a==null)return;o=t.yoff;for(var _=0,C=-1,L=0;L<x;L++){for(var S=0;S<E;S++){var B=y*L+(S>>5),D=m[(o+L)*(Es<<5)+(a+S)<<2]?1<<31-S%32:0;v[B]|=D,_|=D}_?C=L:(t.y0++,x--,L--,o++)}t.y1=t.y0+C,t.sprite=v.slice(0,(t.y1-t.y0)*y)}}}function rU(e,t,n){n>>=5;for(var r=e.sprite,i=e.width>>5,s=e.x-(i<<4),a=s&127,o=32-a,l=e.y1-e.y0,c=(e.y+e.y0)*n+(s>>5),u,d=0;d<l;d++){u=0;for(var h=0;h<=i;h++)if((u<<o|(h<i?(u=r[d*i+h])>>>a:0))&t[c+h])return!0;c+=n}return!1}function iU(e,t){var n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function sU(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function Kv(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function aU(e){var t=4,n=t*e[0]/e[1],r=0,i=0;return function(s){var a=s<0?-1:1;switch(Math.sqrt(1+4*a*s)-a&3){case 0:r+=n;break;case 1:i+=t;break;case 2:r-=n;break;default:i-=t;break}return[r,i]}}function oU(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function lU(){return document.createElement("canvas")}function $n(e){return typeof e=="function"?e:function(){return e}}const cU=S2(ZF);class uU extends gt{constructor(){super(...arguments),this.type="wordcloud",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("text.word").transition("legend-hover-wordcloud").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-wordcloud"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this,r=this.getComponentContainer().attr("width","100%").attr("height","100%"),i=this.model.getDisplayData(),s=this.getFontSizeScale(i),a=this.getOptions(),{fontSizeMapsTo:o,wordMapsTo:l}=a.wordCloud,{groupMapsTo:c}=a.data,{width:u,height:d}=R.getSVGElementSize(r,{useAttrs:!0});if(u===0||d===0)return;const h=cU().size([u,d]).words(i.map(function(p){const g=p[o];if(typeof p[o]!="number")throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return{[c]:p[c],text:p[l],size:g,value:g}})).padding(5).rotate(0).fontSize(p=>s(p.size)).on("end",f);h.start();function f(p){const g=R.appendOrSelect(r,"g.words");g.attr("transform",`translate(${h.size()[0]/2}, ${h.size()[1]/2})`);const m=g.selectAll("text").data(p,E=>`${E[c]}-${E.text}`);m.exit().attr("opacity",0).remove(),m.enter().append("text").attr("opacity",0).merge(m).style("font-size",E=>`${E.size}px`).text(function(E){return E.text}).attr("class",E=>n.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:E[c],originalClassName:`word ${E.size>32?"light":""}`})).style("fill",E=>n.model.getFillColor(E[c],E.text,E)).attr("text-anchor","middle").transition().call(E=>n.services.transitions.setupTransition({transition:E,name:"wordcloud-text-update-enter",animate:t})).attr("transform",E=>`translate(${E.x}, ${E.y})`).attr("opacity",1)}this.addEventListeners()}getFontSizeScale(t){const n=this.getOptions(),{fontSizeMapsTo:r}=n.wordCloud,i=t.map(l=>l[r]).filter(l=>l),s=R.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,o=a?ke(i):[1,1];return Fe().domain(o).range(a?n.wordCloud.fontSizeRange(s,t):[4,4])}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=Va(s=>{const a=r.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call(o=>r.services.transitions.setupTransition({transition:o,name:"wordcloud-word-mouse-highlight"}));s===null?a.attr("opacity",1):a.attr("opacity",function(){return s===this?1:.3})},6);this.parent.selectAll("text.word").on("mouseover",function(s,a){const o=this;i(o),r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEOVER,{event:s,element:I(this),datum:a}),r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:t.tooltip.wordLabel,value:a.text},{label:t.tooltip.valueLabel,value:a.value},{label:yt(t,"locale.translations.group")||yt(t,"tooltip.groupLabel")||"Group",value:a[n],class:r.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:a[n]})}]})}).on("mousemove",function(s,a){const o=I(this);r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEMOVE,{element:o,datum:a}),r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){r.services.events.dispatchEvent(T.WordCloud.WORD_CLICK,{event:s,element:I(this),datum:a})}).on("mouseout",function(s,a){const o=I(this);i(null),r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEOUT,{event:s,element:o,datum:a}),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o})})}}class hU extends gt{constructor(){super(...arguments),this.type="geo",this.renderType=et.SVG}render(){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:r}=R.getSVGElementSize(t,{useAttrs:!0});if(n<1||r<1)return;const i=this.getProjection(),s=b(this.getOptions(),"geoData"),a=this.model.getCombinedData(),o={},l={};Object.keys(a).forEach(v=>{typeof a[v].value=="number"?o[v]=a[v]:l[v]=a[v]});const c=JP(s,Object.values(l)),u=ZP(s,{type:"GeometryCollection",geometries:Object.values(o)}),d=i.fitSize([n,r],u),h=lx().projection(d);R.appendOrSelect(t,"g.geo").selectAll("path").data(u.features).join("path").attr("d",h);const p=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),g=R.appendOrSelect(t,"defs");R.appendOrSelect(g,"pattern").attr("id",p).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",Hi()([[0,0],[0,10]]));const m=R.appendOrSelect(t,"g.missing-data");R.appendOrSelect(m,"path").datum(c).attr("d",h).style("fill",`url(#${p})`)}getProjection(){let t=null;switch(b(this.getOptions(),"thematic","projection")){case en.geoEqualEarth:t=Mx();break;case en.geoAlbers:t=bx();break;case en.geoConicEqualArea:t=Zd();break;case en.geoConicEquidistant:t=Ox();break;case en.geoEquirectangular:t=Sx();break;case en.geoMercator:t=xx();break;case en.geoNaturalEarth1:t=Ax();break;default:throw new Error("Projection is not supported.")}return t}}class dU extends hU{constructor(){super(...arguments),this.type="choropleth"}render(t=!0){super.render();const n=this.model.getCombinedData();this.getComponentContainer({withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",s=>this.model.getColorClassName({value:n[s.properties.NAME].value,originalClassName:"border"})),this.addCountryAreaEventListener()}addCountryAreaEventListener(){const t=this,n=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",function(r,i){const s=I(this);t.services.events.dispatchEvent(Vr.CHOROPLETH_MOUSEOVER,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Gr.SHOW,{event:r,hoveredElement:s,items:[{label:i.properties.NAME,value:n[i.properties.NAME].value}]})}).on("mousemove",function(r,i){t.services.events.dispatchEvent(Vr.CHOROPLETH_MOUSEMOVE,{event:r,element:I(this),datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Gr.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(Vr.CHOROPLETH_CLICK,{event:r,element:I(this),datum:n[i.properties.NAME]})}).on("mouseout",function(r,i){const s=I(this);t.services.events.dispatchEvent(Vr.CHOROPLETH_MOUSEOUT,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Gr.HIDE,{event:r,hoveredElement:s})})}}class fU extends Ye{constructor(t,n){super(t,n),this.model=new YP(this.services),this.model.setOptions(Pt(Ct.choroplethChart,n.options)),this.init(t,n)}getChartComponents(t,n){const r=this.model.getOptions(),i=b(r,"toolbar","enabled"),s=!!this.model.getOptions().title,a={id:"title",components:[new ms(this.model,this.services)],growth:ct.STRETCH},o={id:"toolbar",components:[new Kr(this.model,this.services)],growth:ct.PREFERRED},l={id:"header",components:[new ae(this.model,this.services,[a,...i?[o]:[]],{direction:At.ROW,alignItems:sr.CENTER})],growth:ct.PREFERRED},c={id:"legend",components:[new Pv(this.model,this.services,{chartType:"choropleth"})],growth:ct.PREFERRED,renderType:et.SVG},u={id:"graph-frame",components:t,growth:ct.STRETCH,renderType:et.SVG},d=b(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=At.COLUMN_REVERSE,f={id:"spacer",components:[new wn(this.model,this.services,{size:15})],growth:ct.PREFERRED},p={id:"full-frame",components:[new ae(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:ct.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new wn(this.model,this.services,i?{size:15}:void 0)],growth:ct.PREFERRED};g.push(m)}return g.push(p),[new Iu(this.model,this.services),new po(this.model,this.services),new ae(this.model,this.services,g,{direction:At.COLUMN})]}getComponents(){const t=[new dU(this.model,this.services)];return this.getChartComponents(t)}}class pU extends nn{constructor(t){super(t),this.parentNode=!1,this.set({depth:2},{skipUpdate:!0})}setData(t){super.setData(t),this.setDataGroups(),t.length===1&&(this.parentNode=!0),this.setZoom()}setOptions(t){const n=this.getOptions(),r=lt({},t,this.getZoomOptions(t));Kc(n,r);const i=this.getHierarchyLevel(),s=b(n,"circlePack","hierarchyLevel");this.set({options:lt(n,r),depth:s&&s<4?s:i})}getZoomOptions(t){if(!this.getDisplayData())return{};const n=this.getDisplayData(),r=t||this.getOptions(),i=n.length===1&&b(n,0,"children")?b(n,0,"children"):n;let s=this.getHierarchyLevel();return i.some(a=>{if(a.children&&a.children.some(o=>o.children))return s=3,!1}),b(r,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:Vt.ZOOM,name:"Click to zoom"}]}}:null}setZoom(t){this.setOptions(this.getZoomOptions(t))}updateHierarchyLevel(t){this.set({depth:t})}getHierarchyLevel(){return this.get("depth")}hasParentNode(){return this.parentNode}setDataGroups(){const t=this.getData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=t.map(s=>{const a=s[r];return this.setChildrenDataGroup(s,a)});this.set({data:i},{skipUpdate:!0})}setChildrenDataGroup(t,n){return t.children?{...t,dataGroupName:n,children:t.children.map(r=>this.setChildrenDataGroup(r,n))}:{...t,dataGroupName:n}}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Child","Parent","Value"],s=[];return t.forEach(a=>{let o=a.value?a.value:0;a.children&&(o+=this.getChildrenDatums(a.children,a.name,s,0)),s.push(["&ndash;",a.name,n(o,r)])}),super.formatTable({headers:i,cells:s})}getChildrenDatums(t,n,r=[],i=0){const s=n,{number:a,code:o}=b(this.getOptions(),"locale");return t.forEach(l=>{const c=l.name;let u=0;if(l.children)l.children.length>0&&(typeof l.value=="number"&&(i+=l.value),u+=this.getChildrenDatums(l.children,c,r,u),r.push([c,s,a(u,o)]),i+=u);else{let d=0;typeof l.value=="number"&&(d=l.value,i+=l.value),r.push([l.name,s,a(d,o)])}}),i}}class gU extends Ye{constructor(t,n){super(t,n),this.model=new pU(this.services),this.model.setOptions(Pt(Ct.circlePackChart,n.options)),this.init(t,n)}getComponents(){const t=[new rN(this.model,this.services)];return this.getChartComponents(t)}}const Qv={[Ee.LINE]:[ti,sn],[Ee.SCATTER]:[sn],[Ee.AREA]:[Cv,ti,sn],[Ee.STACKED_AREA]:[Vv,ti,Wv,yo],[Ee.SIMPLE_BAR]:[Gv],[Ee.GROUPED_BAR]:[Uv,ei],[Ee.STACKED_BAR]:[zv,yo]};class mU extends de{constructor(t,n){super(t,n);const r=Pt(Ct.comboChart,n.options);n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),r.comboChartTypes=[{type:Ee.LINE,correspondingDatasets:[]}]),this.model.setOptions(r),this.init(t,n)}getGraphComponents(){const{comboChartTypes:t}=this.model.getOptions();let n=0;const r=t.map(i=>{const s=i.type;let a;if(typeof i.type=="string"){if(!Object.keys(Qv).includes(i.type))return console.error(`Invalid chart type "${i.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`),null;let o=!1;const l=`${UA(i.type)}Chart`;return a=lt({},Ct[l],this.model.getOptions(),i.options),i.type===Ee.STACKED_AREA&&(o=!0),Qv[i.type].map(c=>new c(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a,stacked:o}))}else return a=lt({},this.model.getOptions(),i.options),new s(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a})}).filter(i=>i!==null);return Ip(r)}getComponents(){const{comboChartTypes:t}=this.model.getOptions(),n=t.some(s=>s.type===Ee.STACKED_BAR||s.type===Ee.STACKED_AREA),r=[new fe(this.model,this.services),new Te(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.GRID}),...n?[]:[new Pn(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(r)}}class vU extends nn{constructor(t){super(t)}getTabularData(t){const n=super.getTabularData(t);return t!==n&&n.forEach(r=>{r.key&&r.key!==r.group&&(r.group=r.key)}),n}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{valueMapsTo:i}=n.pie,{number:s,code:a}=b(n,"locale"),o=["Group","Value"],l=[...t.map(c=>[c[r],c[i]===null?"&ndash;":s(c[i],a)])];return super.formatTable({headers:o,cells:l})}sanitize(t){return this.getTabularData(t).sort((r,i)=>i.value-r.value)}}class Jv extends Ye{constructor(t,n,r=!1){super(t,n),this.model=new vU(this.services),!r&&(this.model.setOptions(Pt(Ct.pieChart,n.options)),this.init(t,n))}getComponents(){const t=[new Nv(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.PIE})];return this.getChartComponents(t)}}class yU extends Jv{constructor(t,n){super(t,n,!0),this.model.setOptions(Pt(Ct.donutChart,n.options)),this.init(t,n)}getComponents(){const t=[new sN(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.DONUT})];return this.getChartComponents(t)}}class EU extends nn{constructor(t){super(t)}getDataGroups(){return super.getDataGroups().filter(t=>t.name!=="delta")}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{number:i,code:s}=b(this.getOptions(),"locale"),a=["Group","Value"],o=[...t.map(l=>[l[r],l.value===null?"&ndash;":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}}class bU extends Ye{constructor(t,n){super(t,n),this.model=new EU(this.services),this.model.setOptions(Pt(Ct.gaugeChart,n.options)),this.init(t,n)}getComponents(){const t=[new aN(this.model,this.services)];return this.getChartComponents(t)}}class xU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.groupedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Uv(this.model,this.services),new ei(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class _U extends hr{constructor(t){super(t),this.axisFlavor=is.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=b(this.getOptions(),"axes");if(b(n,"left","scaleType")&&b(n,"left","scaleType")!==J.LABELS||b(n,"right","scaleType")&&b(n,"right","scaleType")!==J.LABELS||b(n,"top","scaleType")&&b(n,"top","scaleType")!==J.LABELS||b(n,"bottom","scaleType")&&b(n,"bottom","scaleType")!==J.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=ke(this.getDisplayData(),r=>r.value),n=Fe().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}getFillColor(t){return this._colorScale(t)}getUniqueDomain(){if(He(this._domains)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getDomainIdentifier(),i=n.getMainXAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._domains=Array.from(new Set(t.map(a=>a[r])))}return this._domains}getUniqueRanges(){if(He(this._ranges)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getRangeIdentifier(),i=n.getMainYAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._ranges=Array.from(new Set(t.map(a=>a[r])))}return this._ranges}getMatrix(){if(He(this._matrix)){const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s={};n.forEach(a=>{s[a]={value:null,index:-1}}),t.forEach(a=>{this._matrix[a]=En(s)}),this.getDisplayData().forEach((a,o)=>{this._matrix[a[r]][a[i]]={value:a.value,index:o}})}return this._matrix}setData(t){const n=this.sanitize(En(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){He(this._matrix)&&this.getMatrix();const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s=[];return t.forEach(a=>{n.forEach(o=>{const l={value:this._matrix[a][o].value,index:this._matrix[a][o].index};l[r]=a,l[i]=o,s.push(l)})}),s}getTabularDataArray(){const t=this.getDisplayData(),{primaryDomain:n,primaryRange:r}=this.assignRangeAndDomains(),{number:i,code:s}=b(this.getOptions(),"locale"),a=[n.label,r.label,"Value"],o=[...t.map(l=>[l[n.identifier]===null?"&ndash;":l[n.identifier],l[r.identifier]===null?"&ndash;":l[r.identifier],l.value===null?"&ndash;":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=b(t,"color","gradient","colors"),r=!He(n);let i=b(t,"color","pairing","option");const s=this.getValueDomain(),a=s[0]<0&&s[1]>0?"diverge":"mono";(i<1&&i>4&&a==="mono"||i<1&&i>2&&a==="diverge")&&(i=1);const o=r?n:[];if(!r){const c=a==="diverge"?17:11;for(let u=1;u<c+1;u++)o.push(`fill-${a}-${i}-${u}`)}this._colorScale=Nl().domain(s).range(o);const l=b(this.getOptions(),"color");this._colorScale=Iv(this.getDisplayData(),l)}}class SU extends de{constructor(t,n){super(t,n),this.model=new _U(this.services),this.model.setOptions(Pt(Ct.heatmapChart,n.options)),this.init(t,n)}getAxisChartComponents(t,n){const r=this.model.getOptions(),i=b(r,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const s=!!this.model.getOptions().title,a={id:"title",components:[new ms(this.model,this.services)],growth:ct.STRETCH},o={id:"toolbar",components:[new Kr(this.model,this.services)],growth:ct.PREFERRED},l={id:"header",components:[new ae(this.model,this.services,[a,...i?[o]:[]],{direction:At.ROW,alignItems:sr.CENTER})],growth:ct.PREFERRED},c={id:"legend",components:[new Pv(this.model,this.services,{chartType:"heatmap"})],growth:ct.PREFERRED,renderType:et.SVG},u={id:"graph-frame",components:t,growth:ct.STRETCH,renderType:et.SVG},d=b(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=At.COLUMN_REVERSE,f={id:"spacer",components:[new wn(this.model,this.services,{size:15})],growth:ct.PREFERRED},p={id:"full-frame",components:[new ae(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:ct.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new wn(this.model,this.services,i?{size:15}:void 0)],growth:ct.PREFERRED};g.push(m)}return g.push(p),[new bv(this.model,this.services),new po(this.model,this.services),new ae(this.model,this.services,g,{direction:At.COLUMN})]}getComponents(){const t=[new fe(this.model,this.services),new oN(this.model,this.services)];return this.getAxisChartComponents(t)}}class TU extends hr{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,{number:r,code:i}=b(this.getOptions(),"locale"),s=this.getBinnedStackedData(),a=[yt(t,"bins.rangeLabel")||"Range",...s.map(l=>yt(l,`0.${n}`))],o=[...yt(s,0).map((l,c)=>[`${r(Number(yt(l,"data.x0")),i)} – ${r(Number(yt(l,"data.x1")),i)}`,...s.map(u=>r(yt(u[c],`data.${yt(u[c],n)}`),i))])];return super.formatTable({headers:a,cells:o})}}class OU extends de{constructor(t,n){super(t,n),this.model=new TU(this.services),this.model.setOptions(Pt(Ct.histogramChart,n.options)),this.init(t,n),this.update()}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new eN(this.model,this.services),new lN(this.model,this.services)];return this.getAxisChartComponents(t)}}class wU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.lineChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Pn(this.model,this.services),new ti(this.model,this.services),new sn(this.model,this.services,{handleThresholds:!0}),new pN(this.model,this.services),new ei(this.model,this.services)];return this.getAxisChartComponents(t)}}class MU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.lollipopChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Pn(this.model,this.services),new cN(this.model,this.services),new sn(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class AU extends nn{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((r,i)=>r+i.value,0)}getFillColor(t){const n=this.getOptions(),r=b(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=b(this.getDisplayData()),r=(n==null?void 0:n.reduce((a,o)=>a+o.value,0))??0,i=b(t,"meter","proportional")?r:r>100?100:r,s=b(t,"meter","status","ranges");if(s){const a=s.filter(o=>o.range[0]<=i&&i<=o.range[1]);if(a.length>0)return a[0].status}return null}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getStatus(),s=b(n,"meter","proportional"),{number:a,code:o}=b(this.getOptions(),"locale");let l=[],c=[],u;if(s===null){u=100;const d=t[0];l=["Group","Value",...i?["Status"]:[]],c=[[d[r],d.value===null?"&ndash;":a(d.value,o),...i?[i]:[]]]}else{const d=b(s,"total");u=d||this.getMaximumDomain(t),l=["Group","Value","Percentage of total"],c=[...t.map(h=>{let f;h.value!==null&&h.value!==void 0?f=Number(h.value):f=0;let p=Number((h.value/u*100).toFixed(2));return[h[r],h.value===null?"&ndash;":a(f,o),a(p,o)+" %"]})]}return super.formatTable({headers:l,cells:c})}}class CU extends Ye{constructor(t,n){var i;super(t,n),this.model=new AU(this.services);const r=(i=n.options.meter)!=null&&i.proportional?lt(En(Ct.proportionalMeterChart),n.options):lt(En(Ct.meterChart),n.options);this.model.setOptions(r),this.init(t,n)}getComponents(){const n=[...b(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new nN(this.model,this.services)],growth:ct.STRETCH,renderType:et.SVG},{id:"spacer",components:[new wn(this.model,this.services,{size:8})],growth:ct.STRETCH}]:[],{id:"meter-graph",components:[new uN(this.model,this.services)],growth:ct.STRETCH,renderType:et.SVG}],r=[new ae(this.model,this.services,n,{direction:At.COLUMN})];return this.getChartComponents(r,{graphFrameRenderType:et.HTML})}}class DU extends hr{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=b(t,"radar","axes"),{number:s,code:a}=b(t,"locale"),o=b(n,"0","data").map(u=>u[r]),l=["Group",...o],c=[...n.map(u=>[u.name,...o.map((d,h)=>b(u,"data",h,i)!==null?s(b(u,"data",h,i),a):"&ndash;")])];return super.formatTable({headers:l,cells:c})}}class LU extends Ye{constructor(t,n){super(t,n),this.model=new DU(this.services),this.model.setOptions(Pt(Ct.radarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fN(this.model,this.services)];return this.getChartComponents(t)}}class RU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.scatterChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Pn(this.model,this.services),new sn(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class IU extends nn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=["Child","Parent"],r=[];return t.forEach(i=>{this.getChildrenDatums(i,r),r.push([i.name,"&ndash;"])}),super.formatTable({headers:n,cells:r})}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,t.name])})}}class kU extends Ye{constructor(t,n){super(t,n),this.model=new IU(this.services),this.model.setOptions(Pt(Ct.treeChart,n.options)),this.init(t,n)}getComponents(){const t=[new gN(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class PU extends nn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Child","Group","Value"],s=[];return t.forEach(a=>{Array.isArray(a.children)?a.children.forEach(o=>{s.push([o.name,a.name,o.value===null?"&ndash;":n(o.value,r)])}):b(a.name)!==null&&b(a.value)&&s.push(["–",a.name,n(a.value,r)])}),super.formatTable({headers:i,cells:s})}}class NU extends Ye{constructor(t,n){super(t,n),this.model=new PU(this.services),this.model.setOptions(Pt(Ct.treemapChart,n.options)),this.init(t,n)}getComponents(){const t=[new zF(this.model,this.services)];return this.getChartComponents(t)}}class $U extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.simpleBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Gv(this.model,this.services),new ei(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class FU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.stackedAreaChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new yo(this.model,this.services),new Vv(this.model,this.services),new ti(this.model,this.services,{stacked:!0}),new Wv(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new oe(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class UU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.stackedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new yo(this.model,this.services),new zv(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ}),new ei(this.model,this.services)];return this.getAxisChartComponents(t)}}class BU extends nn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:r,wordMapsTo:i}=n.wordCloud,{groupMapsTo:s}=n.data,{code:a,number:o}=b(n,"locale"),l=[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],c=[...t.map(u=>[u[i],u[s],o(u[r],a)])];return super.formatTable({headers:l,cells:c})}}class HU extends Ye{constructor(t,n){super(t,n),this.model=new BU(this.services),this.model.setOptions(Pt(Ct.wordCloudChart,n.options)),this.init(t,n)}getComponents(){const t=[new uU(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.PIE})];return this.getChartComponents(t)}}W.Alignments=Ht,W.AlluvialChart=fP,W.AreaChart=$P,W.AreaEvent=$c,W.ArrowDirections=Wa,W.AxisEvent=Nc,W.AxisFlavor=is,W.AxisPositions=G,W.AxisTitleOrientations=Ya,W.BarEvent=Hc,W.BoxplotChart=BP,W.BoxplotEvent=Gc,W.BubbleChart=GP,W.BulletChart=WP,W.CalloutDirections=ts,W.CanvasZoomEvent=Pc,W.CartesianOrientations=Bt,W.ChartEvent=Dc,W.ChartTheme=jc,W.ChartTypes=Ee,W.CirclePackChart=gU,W.ColorClassNameTypes=at,W.ColorLegendType=rs,W.ComboChart=mU,W.DividerStatus=Yr,W.DominantBaseline=tn,W.DonutChart=yU,W.ExperimentalChoroplethChart=fU,W.GaugeChart=bU,W.GaugeEvent=Bc,W.GaugeTypes=ar,W.GroupedBarChart=xU,W.HeatmapChart=SU,W.HistogramChart=OU,W.LayoutAlignItems=sr,W.LayoutDirection=At,W.LayoutGrowth=ct,W.LegendItemType=Vt,W.LegendOrientations=Wr,W.LegendPositions=zr,W.LineChart=wU,W.LineEvent=zc,W.LollipopChart=MU,W.MeterChart=CU,W.ModalEvent=Lc,W.ModelEvent=Rc,W.PieChart=Jv,W.PieEvent=Uc,W.Projection=en,W.RadarChart=LU,W.RadarEvent=Wc,W.RenderTypes=et,W.ScaleTypes=J,W.ScatterChart=RU,W.ScatterEvent=Vc,W.SimpleBarChart=$U,W.Skeletons=Gt,W.StackedAreaChart=FU,W.StackedBarChart=UU,W.Statuses=es,W.TextAnchor=Je,W.ThresholdEvent=Xc,W.TickRotations=ns,W.ToolbarControlTypes=_t,W.TooltipEvent=Gr,W.TreeChart=kU,W.TreeEvent=Yc,W.TreeTypes=za,W.TreemapChart=NU,W.TreemapEvent=qc,W.TruncationTypes=De,W.WordCloudChart=HU,W.WordCloudEvent=Fc,W.ZoomBarTypes=Ge,W.ZoomDomainEvent=kc,W.ZoombarEvent=Ic,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});
85
+ </svg>`}addEventListeners(){const t=this;this.parent.selectAll("circle.node").on("mouseover",function(n,r){const i=I(this);i.classed("hovered",!0);const s=t.model.getHierarchyLevel(),a=s>2&&!i.classed("focal"),o=b(t.model.getOptions(),"canvasZoom","enabled");let l=!1;if(!a){let c=[],u=[],d=null;if(r.children){r.depth>1&&o&&(l=!0,i.classed("clickable",!0)),c=r.children.map(p=>{if(p!==null)return typeof p.data.value=="number"?{label:p.data.name,value:p.data.value}:{label:p.data.name,labelIcon:o&&s<=2?t.getZoomIcon():null,value:p.value}});const f=t.model.getOptions();u=[{label:yt(f,"locale.translations.total")||yt(f,"tooltip.totalLabel")||"Total",value:r.value,bold:!0}],t.highlightChildren(r.children)}else d=r.value;const h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:h,label:r.data.name,labelIcon:l&&o&&s<=2?t.getZoomIcon():null,value:d},...c,...u]})}t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("mouseout",function(n,r){const i=I(this);i.classed("hovered",!1),r.children&&t.unhighlightChildren(r.children),t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})}).on("click",function(n,r){const i=I(this),s=i.classed("non-focal"),a=b(t.model.getOptions(),"canvasZoom","enabled");if(a&&t.model.getHierarchyLevel()>2){const o=t.parent.selectAll("circle.node");I(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(o,qr)}else if(r.depth===2&&r.children&&!s&&a){const o=t.parent.selectAll("circle.node");I(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=r,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(r,o,qr),n.stopPropagation()}t.services.events.dispatchEvent(T.CirclePack.CIRCLE_CLICK,{event:n,element:i,datum:r})})}destroy(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()}}function iN(e,t){const n=pi(this._current,e);return r=>(this._current=n(r),t(this._current))}class Nv extends gt{constructor(){super(...arguments),this.type="pie",this.renderType=et.SVG,this.isRendering=!1,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.slice").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i.data[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.slice").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getInnerRadius(){return Lt.innerRadius}render(t=!0){const n=this,r=this.getComponentContainer(),i=this.getOptions(),{groupMapsTo:s}=i.data,{valueMapsTo:a}=i.pie;this.isRendering=!0;const o=this.model.getDisplayData().filter(M=>M[a]>0),l=this.computeRadius();this.arc=Bi().innerRadius(this.getInnerRadius()).outerRadius(l),this.hoverArc=Bi().innerRadius(this.getInnerRadius()).outerRadius(l+Lt.hoverArc.outerRadiusOffset);const u=dT().value(M=>M[a]).sort(b(i,"pie","sortFunction")).padAngle(Lt.padAngle)(o),h=R.appendOrSelect(r,"g.slices").attr("role",ut.GROUP).attr("data-name","slices").selectAll("path.slice").data(u,M=>M.data[s]);h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("slice",!0).attr("opacity",0).merge(h).attr("class",M=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:M.data[s],originalClassName:"slice"})).style("fill",M=>n.model.getFillColor(M.data[s],null,M.data)).attr("d",this.arc).transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"pie_slice_enter_update",animate:t})).attr("opacity",1).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",M=>`${M[a]}, ${Zc(M.data[a],o,a)+"%"}`).attrTween("d",function(M){return iN.bind(this)(M,n.arc)}).on("end",()=>{n.isRendering=!1});const{code:g,number:m}=b(i,"locale"),v=i.pie.labels.enabled,E=v?u.filter(M=>M.data[a]>0):[],x=R.appendOrSelect(r,"g.labels").attr("role",ut.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(E,M=>M.data[s]);x.exit().attr("opacity",0).remove();const S=x.enter().append("text").classed("pie-label",!0),_=[];S.merge(x).style("text-anchor","middle").text(M=>i.pie.labels.formatter?i.pie.labels.formatter({...M,percentageValue:Zc(M.data[a],o,a,!0)}):m(Zc(M.data[a],o,a),g)+"%").datum(function(M){const w=l+7,U=(M.endAngle-M.startAngle)/2+M.startAngle,$=U/Math.PI*180,N=this.getComputedTextLength();return M.textOffsetX=N/2,M.textOffsetY=$>90&&$<270?10:0,M.xPosition=(M.textOffsetX+w)*Math.sin(U),M.yPosition=(M.textOffsetY+w)*-Math.cos(U),M}).attr("transform",function(M,w){const U=E.length,$=(M.endAngle-M.startAngle)*(180/Math.PI);if(w>=U-2&&$<Lt.callout.minSliceDegree){let N,F;return M.index===U-1?(N=M.xPosition+Lt.callout.offsetX+Lt.callout.textMargin+M.textOffsetX,F=M.yPosition-Lt.callout.offsetY,M.direction=ts.RIGHT,_.push(M)):(N=M.xPosition-Lt.callout.offsetX-M.textOffsetX-Lt.callout.textMargin,F=M.yPosition-Lt.callout.offsetY,M.direction=ts.LEFT,_.push(M)),`translate(${N}, ${F})`}return`translate(${M.xPosition}, ${M.yPosition})`}),this.renderCallouts(_);const C=b(i,"donut")?"donut":"pie",L=b(i,C,"alignment"),{width:B}=R.getSVGElementSize(this.getParent(),{useAttrs:!0}),D=v?Lt.xOffset:0,O=v?Lt.yOffset:0;let H=l+D;L===Ht.CENTER?H=B/2:L===Ht.RIGHT&&(H=B-l-Lt.xOffset);let P=l+O;_.length>0&&(P+=Lt.yOffsetCallout),r.attr("x",H+7).attr("y",P),this.addEventListeners()}renderCallouts(t){const n=R.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",ut.GROUP).attr("data-name","callouts"),r=n.selectAll("g.callout").data(t);r.exit().remove();const i=r.enter().append("g").classed("callout",!0).attr("role",ut.GROUP).attr("aria-roledescription","label callout");i.merge(r).datum(function(o){const{xPosition:l,yPosition:c,direction:u}=o;return u===ts.RIGHT?(o.startPos={x:l,y:c+o.textOffsetY},o.endPos={x:l+Lt.callout.offsetX,y:c-Lt.callout.offsetY+o.textOffsetY},o.intersectPointX=o.endPos.x-Lt.callout.horizontalLineLength):(o.startPos={x:l,y:c+o.textOffsetY},o.endPos={x:l-Lt.callout.offsetX,y:c-Lt.callout.offsetY+o.textOffsetY},o.intersectPointX=o.endPos.x+Lt.callout.horizontalLineLength),o}),i.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum(function(){return I(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",o=>o.startPos.x).attr("y1",o=>o.startPos.y).attr("x2",o=>o.intersectPointX).attr("y2",o=>o.endPos.y),i.append("line").classed("horizontal-line",!0).merge(n.selectAll("line.horizontal-line")).datum(function(){return I(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",o=>o.intersectPointX).attr("y1",o=>o.endPos.y).attr("x2",o=>o.endPos.x).attr("y2",o=>o.endPos.y)}addEventListeners(){const t=this;this.parent.selectAll("path.slice").on("mouseover",function(n,r){const i=I(this);t.isRendering||i.classed("hovered",!0).transition("pie_slice_mouseover").call(o=>t.services.transitions.setupTransition({transition:o,name:"pie_slice_mouseover"})).attr("d",t.hoverArc),t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEOVER,{event:n,element:I(this),datum:r});const{groupMapsTo:s}=t.getOptions().data,{valueMapsTo:a}=t.getOptions().pie;t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{label:r.data[s],value:r.data[a]}]})}).on("mousemove",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Pie.SLICE_CLICK,{event:n,element:I(this),datum:r})}).on("mouseout",function(n,r){const i=I(this);mL(()=>{t.isRendering||i.classed("hovered",!1).transition("pie_slice_mouseout").call(s=>t.services.transitions.setupTransition({transition:s,name:"pie_slice_mouseout"})).attr("d",t.arc)},100),t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}computeRadius(){const{width:t,height:n}=R.getSVGElementSize(this.parent,{useAttrs:!0}),r=this.getOptions(),i=Math.min(t,n)/2;return r.pie.labels.enabled?i+Lt.radiusOffset:i}}class sN extends Nv{constructor(){super(...arguments),this.type="donut",this.renderType=et.SVG}render(t=!0){super.render(t);const n=this;if(this.model.isDataEmpty()){this.getComponentContainer().select("g.center").remove();return}const r=R.appendOrSelect(this.getComponentContainer(),"g.center"),i=this.getOptions(),s=this.computeRadius(),a=b(i,"donut","center","label");R.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",()=>a===null||a===""?"central":"initial").style("font-size",()=>i.donut.center.numberFontSize(s)).transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"donut-figure-enter-update",animate:t})).tween("text",function(){return n.centerNumberTween(I(this))}),a!==null&&a!==""&&R.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",()=>i.donut.center.titleFontSize(s)).attr("y",i.donut.center.titleYPosition(s)).text(a)}getInnerRadius(){return this.computeRadius()*(3/4)}centerNumberTween(t){const n=this.getOptions();let r=b(n,"donut","center","number");r===null&&(r=this.model.getDisplayData().reduce((o,l)=>o+l[n.pie.valueMapsTo],0));const i=parseInt(t.text().replace(/[, ]+/g,""),10)||0;let s;i%1===0&&r%1===0?s=kh:s=ve;const a=s(i,r);return o=>{const{numberFormatter:l}=n.donut.center;if(l)t.text(l(a(o)));else{const{code:c,number:u}=b(n,"locale");t.text(u(Math.floor(a(o)),c))}}}}const $v="4,10 8,6 12,10",Fv="12,6 8,10 4,6";class aN extends gt{constructor(){super(...arguments),this.type="gauge",this.renderType=et.SVG}getValue(){var r;return((r=this.model.getData().find(i=>i.group==="value"))==null?void 0:r.value)??null}getValueRatio(){return ag(this.getValue(),0,100)/100}getDelta(){var r;return((r=this.model.getData().find(i=>i.group==="delta"))==null?void 0:r.value)??null}getArcRatio(){const t=this.getOptions();return b(t,"gauge","type")===ar.FULL?1:.5}getArcSize(){return this.getArcRatio()*Math.PI*2}getStartAngle(){const t=this.getArcSize();return t===2*Math.PI?0:-t/2}getArrow(t){const n=this.getOptions();switch(b(n,"gauge","deltaArrow","direction")){case Wa.UP:return $v;case Wa.DOWN:return Fv;default:return t>0?$v:Fv}}render(t=!0){const n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.getOptions(),i=this.getValue(),s=this.getValueRatio(),a=this.getArcSize(),o=this.getStartAngle(),l=s*a,c=o+l,u=o+a,d=this.computeRadius(),h=this.getInnerRadius();this.backgroundArc=Bi().innerRadius(h).outerRadius(d).startAngle(c).endAngle(u),this.arc=Bi().innerRadius(h).outerRadius(d).startAngle(o).endAngle(c),R.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);const f=n.selectAll("path.arc-foreground").data([i]);f.enter().append("path").merge(f).attr("class",this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",()=>b(this.getOptions(),"color","scale","value")).attr("d",this.arc).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",E=>E),this.drawValueNumber(),this.drawDelta(),f.exit().remove();const g=b(r,"gauge","alignment"),{width:m}=R.getSVGElementSize(this.getParent(),{useAttrs:!0});let v=d;g===Ht.CENTER?v=m/2:g===Ht.RIGHT&&(v=m-d),n.attr("x",v).attr("y",d),this.addEventListeners()}drawValueNumber(){const t=this.getComponentContainer(),n=this.getOptions(),r=b(n,"gauge","type"),i=this.getValue(),s=this.getDelta(),a=this.computeRadius(),o=b(n,"gauge","valueFontSize"),l=b(n,"gauge","deltaFontSize"),c=b(n,"gauge","numberSpacing"),u=b(n,"gauge","showPercentageSymbol");let d=0;r===ar.FULL&&!s?d=l(a):r===ar.SEMI&&s&&(d=-(l(a)+c));const h=R.appendOrSelect(t,"g.gauge-numbers").attr("transform",`translate(0, ${d})`),f=o(a),p=R.appendOrSelect(h,"g.gauge-value-number"),{code:g,number:m}=b(n,"locale"),v=b(n,"gauge","numberFormatter"),E=p.selectAll("text.gauge-value-number").data([i]);E.enter().append("text").attr("class","gauge-value-number").merge(E).style("font-size",`${f}px`).attr("text-anchor","middle").text(B=>{let D;return B!=null?D=Number(B.toFixed(2))%1!==0?B.toFixed(2):B.toFixed():D=0,v?v(D):m(Number(D),g)});const{width:y}=R.getSVGElementSize(R.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}),x=f/2,S=u?"%":"",_=R.appendOrSelect(p,"text.gauge-value-symbol").style("font-size",`${x}px`).attr("x",y/2).text(S),{width:C,height:L}=R.getSVGElementSize(_,{useBBox:!0});_.attr("y",`-${L/2}px`),p.attr("transform",`translate(-${C/2}, 0)`)}drawDelta(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=this.getDelta(),{code:s,number:a}=b(r,"locale");if(i){const o=this.computeRadius(),l=i?b(r,"gauge","deltaFontSize"):()=>0,c=i?b(r,"gauge","numberFormatter"):()=>null,u=b(r,"gauge","deltaArrow","size"),d=b(r,"gauge","numberSpacing"),h=b(r,"gauge","showPercentageSymbol"),f=R.appendOrSelect(n,"g.gauge-numbers"),p=R.appendOrSelect(f,"g.gauge-delta").attr("transform",`translate(0, ${l(o)+d})`),g=R.appendOrSelect(p,"text.gauge-delta-number"),m=h?"%":"";g.data(i===null?[]:[i]),g.enter().append("text").classed("gauge-delta-number",!0).merge(g).attr("text-anchor","middle").style("font-size",`${l(o)}px`).text(x=>{let S;return x!=null?S=Number(x.toFixed(2))%1!==0?x.toFixed(2):x.toFixed():S=0,c?`${c(S)}${m}`:`${a(Number(S),s)}${m}`});const{width:v}=R.getSVGElementSize(R.appendOrSelect(n,".gauge-delta-number"),{useBBox:!0}),E=b(r,"gauge","deltaArrow","enabled"),y=p.selectAll("svg.gauge-delta-arrow").data(i!==null&&E?[i]:[]);y.enter().append("svg").merge(y).attr("class","gauge-delta-arrow").attr("x",-u(o)-v/2).attr("y",-u(o)/2-l(o)*.35).attr("width",u(o)).attr("height",u(o)).attr("viewBox","0 0 16 16").each(function(){const x=I(this);R.appendOrSelect(x,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const S=b(r,"gauge","status");R.appendOrSelect(x,"polygon.gauge-delta-arrow").attr("class",S!==null?`gauge-delta-arrow status--${S}`:"").attr("points",t.getArrow(i))}),y.exit().remove(),g.exit().remove()}else{const o=n.select("g.gauge-delta");o.empty()||o.remove()}}getInnerRadius(){const t=this.computeRadius(),n=b(this.getOptions(),"gauge","arcWidth");return t-n}addEventListeners(){const t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",function(n,r){t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEOVER,{event:n,element:I(this),datum:r})}).on("mousemove",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEMOVE,{event:n,element:i,datum:r})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Gauge.ARC_CLICK,{event:n,element:I(this),datum:r})}).on("mouseout",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEOUT,{event:n,element:i,datum:r})})}computeRadius(){const t=this.getOptions(),n=b(t,"gauge","type"),{width:r,height:i}=R.getSVGElementSize(this.parent,{useAttrs:!0});return n===ar.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)}}class Uv extends qu{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=et.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.model.getDisplayData(this.configs.groups),r=this.getOptions(),{groupMapsTo:i}=r.data;this.setGroupScale();const s=this.getComponentContainer({withinChartClip:!0}),a=Ji(n.map(h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return h[f]&&typeof h[f].toString=="function"?h[f].toString():h[f]})),o=s.selectAll("g.bars").data(a,h=>h);o.exit().attr("opacity",0).remove();const c=o.enter().append("g").classed("bars",!0).attr("role",ut.GROUP).attr("data-name","bars").merge(o);c.transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bar-group-update-enter",animate:t})).attr("transform",h=>{const p=this.services.cartesianScales.getDomainValue(h)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===Bt.VERTICAL?`translate(${p}, 0)`:`translate(0, ${p})`});const u=c.selectAll("path.bar").data(h=>this.getDataCorrespondingToLabel(h),h=>h[i]);u.exit().attr("opacity",0).remove(),u.enter().append("path").attr("opacity",0).merge(u).classed("bar",!0).transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bar-update-enter",animate:t})).attr("class",h=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:h[i],originalClassName:"bar"})).style("fill",h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getFillColor(h[i],h[f],h)}).attr("d",h=>{const f=this.groupScale(h[i]),p=this.getBarWidth(),g=f,m=f+p,v=this.services.cartesianScales.getRangeAxisPosition({datum:h}),E=this.services.cartesianScales.getDomainLowerBound(v),y=this.services.cartesianScales.getValueThroughAxisPosition(v,E),x=this.services.cartesianScales.getRangeValue(h),S=this.services.cartesianScales.getDomainValue(h)-p/2,_=S+p;if(!this.isOutsideZoomedDomain(S,_))return ie({x0:g,x1:m,y0:y,y1:x},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",h=>h.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=I(this);i.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:n,element:I(this),datum:r})}).on("mouseout",function(n,r){const i=I(this);i.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(t){return this.model.getDisplayData(this.configs.groups).filter(r=>{const i=this.services.cartesianScales.getDomainIdentifier(r);return r[i].toString()===t})}getGroupWidth(){const t=this.model.getGroupedData(this.configs.groups),n=this.getTotalGroupPadding();return this.getBarWidth()*t.length+n}getDomainScaleStep(){const t=this.services.cartesianScales.getDomainScale(),n=this.model.getGroupedData(this.configs.groups);let r=this.defaultStepFactor;if(typeof t.step=="function")r=t.step();else if(n.length>0){const i=n.find(s=>{var a;return((a=s.data)==null?void 0:a.length)>1});if(i){const s=this.services.cartesianScales.getDomainIdentifier(i.data[0]);r=Math.abs(t(i.data[1][s])-t(i.data[0][s]))}}return r}getTotalGroupPadding(){const t=this.model.getGroupedData(this.configs.groups);return t.length===1?0:Math.min(5,5*(this.getDomainScaleStep()/this.defaultStepFactor))*(t.length-1)}getBarWidth(){const t=this.getOptions(),n=b(t,"bars","width"),r=b(t,"bars","maxWidth");if(n!==null&&(r===null||n<=r))return n;const s=this.model.getGroupedData(this.configs.groups).length,a=this.getTotalGroupPadding();return Math.min(r,(this.getDomainScaleStep()-a)/s)}setGroupScale(){const t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=ki().domain(t).rangeRound([0,this.getGroupWidth()])}}class oN extends gt{constructor(){super(...arguments),this.type="heatmap",this.renderType=et.SVG,this.matrix={},this.xBandwidth=0,this.yBandwidth=0,this.translationUnits={x:0,y:0},this.handleAxisOnHover=t=>{const{detail:n}=t,{datum:r}=n,i=this.model.getUniqueRanges(),s=this.model.getUniqueDomain(),a=this.services.cartesianScales.getDomainLabel(),o=this.services.cartesianScales.getRangeLabel(),l=this.services.cartesianScales.getMainXScale(),c=this.services.cartesianScales.getMainYScale();let u="",d=null,h=null,f=null;this.matrix[r]!==void 0?(u=a,i.forEach(p=>{if(typeof this.matrix[r][p].value=="number"){const g=this.matrix[r][p].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})):(u=o,s.forEach(p=>{if(typeof this.matrix[p][r].value=="number"){const g=this.matrix[p][r].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})),l(r)!==void 0?this.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${l(r)}, ${Cn(c.range())})`):c(r)!==void 0&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${Cn(l.range())},${c(r)})`),this.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n.event,hoveredElement:I(t.detail.element),items:[{label:u,value:r,bold:!0},{label:"Min",value:h!==null?h:"-"},{label:"Max",value:f!==null?f:"-"},{label:"Average",value:d!==null?d/s.length:"-"}]})},this.handleAxisMouseOut=t=>{this.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),this.services.events.dispatchEvent(T.Tooltip.HIDE,{event:t})}}init(){const t=this.services.events;t.addEventListener(T.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(T.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(T.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(T.Axis.LABEL_BLUR,this.handleAxisMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0});n.lower();const{cartesianScales:r}=this.services;if(this.matrix=this.model.getMatrix(),n.html(""),b(this.getOptions(),"data","loading"))return;const i=r.getMainXScale(),s=r.getMainYScale(),a=r.getDomainIdentifier(),o=r.getRangeIdentifier(),l=this.model.getUniqueDomain(),c=this.model.getUniqueRanges(),u=this.model.getMatrixAsArray(),d=i.range(),h=s.range();this.xBandwidth=Math.abs((d[1]-d[0])/l.length),this.yBandwidth=Math.abs((h[1]-h[0])/c.length);const f=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",f).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);const p=n.selectAll().data(u).enter().append("g").attr("class",g=>`heat-${g.index}`).classed("cell",!0).attr("transform",g=>`translate(${i(g[a])}, ${s(g[o])})`).append("rect").attr("class",g=>this.model.getColorClassName({value:g.value,originalClassName:`heat-${g.index}`})).classed("heat",!0).classed("null-state",g=>g.index===-1||g.value===null).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",g=>{const m=this.services.cartesianScales.getDomainIdentifier(g);return g.index===-1||g.value===null?`url(#${f})`:this.model.getFillColor(Number(g.value),g[m],g)}).attr("aria-label",g=>g.value);this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(h[1]-h[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(d[1]-d[0]),this.yBandwidth),this.determineDividerStatus()&&(p.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}createOuterBox(t,n,r){const i=R.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);R.appendOrSelect(i,"line.top").attr("x1",-1).attr("x2",n+1),R.appendOrSelect(i,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",r+1),R.appendOrSelect(i,"line.down").attr("x1",-1).attr("x2",n+1).attr("y1",r).attr("y2",r),R.appendOrSelect(i,"line.right").attr("x1",n).attr("x2",n).attr("y1",-1).attr("y2",r+1)}determineDividerStatus(){const t=b(this.getOptions(),"heatmap","divider","state");return t!==Yr.OFF&&(t===Yr.AUTO&&Zg.minCellDividerDimension<=this.xBandwidth&&Zg.minCellDividerDimension<=this.yBandwidth||t===Yr.ON)}addEventListener(){const t=this,{cartesianScales:n}=this.services,r=this.getOptions(),i=yt(r,"locale.translations.total")||yt(r,"tooltip.totalLabel")||"Total",s=n.getDomainIdentifier(),a=n.getRangeIdentifier(),o=n.getDomainLabel(),l=n.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",function(c,u){const d=I(this),h=d.select("rect.heat");if(!h.classed("null-state")){const p=ss(d.attr("transform"));t.parent.select("g.cell-highlight").attr("transform",`translate(${p.x+t.translationUnits.x}, ${p.y+t.translationUnits.y})`).classed("highlighter-hidden",!1),t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEOVER,{event:c,element:h,datum:u}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:c,items:[{label:o,value:u[s]},{label:l,value:u[a]},{label:i,value:u.value,color:h.style("fill")}]})}}).on("mousemove",function(c,u){t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEMOVE,{event:c,element:I(this),datum:u}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:c})}).on("click",function(c,u){t.services.events.dispatchEvent(T.Heatmap.HEATMAP_CLICK,{event:c,element:I(this),datum:u})}).on("mouseout",function(c,u){const h=I(this).select("rect.heat"),f=h.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),f||(t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEOUT,{event:c,element:h,datum:u}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{event:c,hoveredElement:h}))})}destroy(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)}}class lN extends gt{constructor(){super(...arguments),this.type="histogram",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-bar"})).attr("opacity",s=>s[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer(),r=this.model.getOptions(),{groupIdentifier:i}=r,{groupMapsTo:s}=r.data,a=this.model.getBinnedStackedData(),o=this.services.cartesianScales.getMainXScale(),l=n.selectAll("g.bars").data(a,u=>yt(u,`0.${s}`));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",ut.GROUP);const c=n.selectAll("g.bars").selectAll("path.bar").data(u=>u);c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(i,(u,d)=>d).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"histogram-bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:u[s],originalClassName:"bar"})).style("fill",u=>this.model.getFillColor(u[s],null,u)).attr("d",u=>{const d=yt(u,"data");if(!d)return;const h=o(d.x1)-o(d.x0)-1,f=this.services.cartesianScales.getDomainValue(d.x0),p=f+h,g=this.services.cartesianScales.getRangeValue(u[0]);let m=this.services.cartesianScales.getRangeValue(u[1]);return Math.abs(m-g)>0&&Math.abs(m-g)>r.bars.dividerSize&&(this.services.cartesianScales.getOrientation()===Bt.VERTICAL?m+=1:m-=1),ie({x0:f,x1:p,y0:g,y1:m},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>b(u,"data",u[s])),this.addEventListeners()}addEventListeners(){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,{code:r,number:i}=b(t,"locale"),s=this;this.parent.selectAll("path.bar").on("mouseover",function(a,o){const l=I(this);l.classed("hovered",!0);const c=i(parseFloat(yt(o,"data.x0")),r),u=i(parseFloat(yt(o,"data.x1")),r),d=s.services.cartesianScales.getRangeAxisPosition(),h=s.services.cartesianScales.getScaleLabel(d);s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:l,items:[{label:yt(t,"bins.rangeLabel")||"Range",value:`${c} – ${u}`},{label:t.tooltip.groupLabel||"Group",value:o[n],class:s.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:o[n]})},{label:h,value:yt(o,`data.${o[n]}`)}]})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){I(this).classed("hovered",!1),s.services.events.dispatchEvent(T.Tooltip.HIDE)})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class cN extends sn{constructor(){super(...arguments),this.type="lollipop",this.renderType=et.SVG,this.handleScatterOnHover=t=>{const n=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").attr("stroke-width",s=>s[i]!==n.datum[i]?xn.weight.unselected:xn.weight.selected)},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",xn.weight.unselected)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").transition("legend-hover-line").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-line"})).attr("opacity",s=>s[i]!==n.datum().name?xn.opacity.unselected:xn.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("line.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",xn.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({withinChartClip:!0}),r=this.model.getOptions(),{groupMapsTo:i}=r.data,{cartesianScales:s}=this.services,a=s.getMainXScale(),o=s.getMainYScale(),l=s.getDomainIdentifier(),c=v=>s.getDomainValue(v),u=v=>s.getRangeValue(v),d=s.getOrientation(),[h,f]=Sn(c,u,d),p=n.selectAll("line.line").data(this.getScatterData(),v=>`${v[i]}-${v[l]}`);p.exit().attr("opacity",0).remove();const m=p.enter().append("line").attr("opacity",0).merge(p).classed("line",!0).attr("class",v=>this.model.getColorClassName({classNameTypes:[at.STROKE],dataGroupName:v[i],originalClassName:"line"})).transition().call(v=>this.services.transitions.setupTransition({transition:v,name:"lollipop-line-update-enter",animate:t})).style("stroke",v=>this.model.getFillColor(v[i],v[l],v)).attr("opacity",1);d===Bt.HORIZONTAL?m.attr("y1",f).attr("y2",f).attr("x1",a.range()[0]).attr("x2",v=>h(v)-r.points.radius):m.attr("x1",h).attr("x2",h).attr("y1",o.range()[0]).attr("y2",v=>f(v)+r.points.radius),this.addScatterPointEventListeners()}addScatterPointEventListeners(){this.services.events.addEventListener(T.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(T.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}destroy(){const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(T.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(T.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}}class uN extends gt{constructor(){super(...arguments),this.type="meter",this.renderType=et.SVG}getStackedBounds(t,n){let r=0;return t.map((s,a)=>a!==0?(r+=n(s.value),{...s,width:Math.abs(n(s.value)-jt.dividerWidth),x:r-n(s.value)}):(r=n(s.value),{...s,width:Math.abs(n(s.value)-jt.dividerWidth),x:0}))}render(t=!0){const n=this,r=this.getComponentContainer(),i=this.getOptions(),s=b(i,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:l}=R.getSVGElementSize(r,{useAttrs:!0}),{groupMapsTo:c}=i.data;let u;if(b(i,"meter","proportional")===null)u=100;else{const y=b(i,"meter","proportional","total");u=y||this.model.getMaximumDomain(this.model.getDisplayData())}const d=Fe().domain([0,u]).range([0,l]),h=this.getStackedBounds(a,d),f=b(i,"meter","height");R.appendOrSelect(r,"rect.container").attr("x",0).attr("y",0).attr("width",l).attr("height",f||(s?jt.height.proportional:jt.height.default)),R.appendOrSelect(r,"line.rangeIndicator").attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",f||(s?jt.height.proportional:jt.height.default));const p=r.selectAll("rect.value").data(h),g=o!=null&&!n.model.isUserProvidedColorScaleValid()&&!s?`value status--${o}`:"value";p.enter().append("rect").classed("value",!0).merge(p).attr("x",y=>y.x).attr("y",0).attr("height",()=>f||(s?jt.height.proportional:jt.height.default)).attr("class",y=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:y[c],originalClassName:g})).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"meter-bar-update",animate:t})).attr("width",y=>y.value>u?d(u):Math.max(y.width,2)).style("fill",y=>n.model.getFillColor(y[c],null,y)).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",y=>y.value),p.exit().remove();const m=b(i,"meter","peak");let v=m;m!==null&&(m>u?v=u:m<a[0].value&&(v=a[0].value>u?u:a[0].value));const E=r.selectAll("line.peak").data(v==null?[]:[v]);E.enter().append("line").classed("peak",!0).merge(E).attr("y1",0).attr("y2",()=>f||(s?jt.height.proportional:jt.height.default)).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"peak-line-update",animate:t})).attr("x1",y=>d(y)).attr("x2",y=>d(y)).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",y=>y),E.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=b(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",function(s,a){const o=I(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEOVER,{event:s,element:o,datum:a}),i&&(o.classed("hovered",!0),r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:a[n],value:a.value}]}))}).on("mousemove",function(s,a){const o=I(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEMOVE,{event:s,element:o,datum:a}),i&&r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){r.services.events.dispatchEvent(T.Meter.METER_CLICK,{event:s,element:I(this),datum:a})}).on("mouseout",function(s,a){const o=I(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEOUT,{event:s,element:o,datum:a}),i&&(o.classed("hovered",!1),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o}))})}destroy(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)}}function Bv(e){const t=hN(Hv(e),360);return Nn(t,[0,10])||Nn(t,[350,0])?{textAnchor:Je.START,dominantBaseline:tn.MIDDLE}:Nn(t,[10,80])?{textAnchor:Je.START,dominantBaseline:tn.HANGING}:Nn(t,[80,100])?{textAnchor:Je.MIDDLE,dominantBaseline:tn.HANGING}:Nn(t,[100,170])?{textAnchor:Je.END,dominantBaseline:tn.HANGING}:Nn(t,[170,190])?{textAnchor:Je.END,dominantBaseline:tn.MIDDLE}:Nn(t,[190,260])?{textAnchor:Je.END,dominantBaseline:tn.BASELINE}:Nn(t,[260,280])?{textAnchor:Je.MIDDLE,dominantBaseline:tn.BASELINE}:{textAnchor:Je.START,dominantBaseline:tn.BASELINE}}function hN(e,t){return(e%t+t)%t}function Nn(e,[t,n]){return e>=t&&e<=n}function Hv(e){return e*(180/Math.PI)}function Ft(e,t,n={x:0,y:0}){const r=t*Math.cos(e)+n.x,i=t*Math.sin(e)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}function dN(e,t){return t*Math.sin(e-Math.PI/2)}class fN extends gt{constructor(){super(...arguments),this.type="radar",this.renderType=et.SVG,this.getLabelDimensions=t=>{const n=R.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),r=R.appendOrSelect(n,"text").text(t),{width:i,height:s}=R.getSVGElementSize(r.node(),{useBBox:!0});return n.remove(),{width:i,height:s}},this.normalizeFlatData=t=>{const n=this.getOptions(),{angle:r,value:i}=b(n,"radar","axes"),s=b(n,"data","groupMapsTo"),a=_L(this.uniqueKeys.map(o=>this.uniqueGroups.map(l=>({[r]:o,[s]:l,[i]:null}))));return lt(a,t)},this.normalizeGroupedData=t=>{const n=this.getOptions(),{angle:r,value:i}=b(n,"radar","axes"),s=b(n,"data","groupMapsTo");return t.map(({name:a,data:o})=>{const l=this.uniqueKeys.map(c=>({[s]:a,[r]:c,[i]:null}));return{name:a,data:lt(l,o)}})},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g.blobs path").transition("legend-hover-blob").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-blob"})).style("fill-opacity",r=>r.name!==n.datum().name?or.opacity.unselected:or.opacity.selected).style("stroke-opacity",r=>r.name!==n.datum().name?or.opacity.unselected:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})).style("fill-opacity",or.opacity.selected).style("stroke-opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer(),{width:r,height:i}=R.getSVGElementSize(n,{useAttrs:!0}),s=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),l=b(o,"data","groupMapsTo"),c=b(o,"radar","axes","value"),{angle:u,value:d}=b(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:f,yTicksNumber:p,minRange:g,xAxisRectHeight:m}=or;this.uniqueKeys=Array.from(new Set(s.map(A=>A[u]))),this.uniqueGroups=Array.from(new Set(s.map(A=>A[l]))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(a);const E=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+f),S=(Math.min(r,i)-E)/2;if(S<=0)return;const _=ki().domain(this.fullDataNormalized.map(A=>A[u])).range([0,2*Math.PI].map(A=>A-Math.PI/2)),C=Cn(this.fullDataNormalized.map(A=>A[d])),L=Fe().domain([C>=0?0:C,Bn(this.fullDataNormalized.map(A=>A[d]))]).range([g,S]).nice(p),B=L.ticks(p),D=(A,V,z)=>this.model.getFillColor(A,V,z),O=gT().angle(A=>_(A[u])+Math.PI/2).radius(A=>L(A[d])).curve(Zf),H=this.uniqueKeys.map(A=>{const V=this.getLabelDimensions(A).width,z=dN(_(A),S);return V+z}),M={x:Bn(H)+h,y:i/2},U=R.appendOrSelect(n,"g.y-axes").attr("role",ut.GROUP).selectAll("path").data(B,A=>A),$=A=>this.uniqueKeys.map(V=>({[u]:V,[d]:A}));U.join(A=>A.append("path").attr("opacity",0).attr("transform",`translate(${M.x}, ${M.y})`).attr("fill","none").call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_axes_enter",animate:t})).attr("opacity",1).attr("d",z=>O($(z)))),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_axes_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",z=>O($(z)))),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_axes_exit",animate:t})).attr("d",z=>O($(z))).attr("opacity",0).remove())),R.appendOrSelect(n,"g.x-axes").attr("role",ut.GROUP).selectAll("line").data(this.uniqueKeys,A=>A).join(A=>A.append("line").attr("opacity",0).attr("class",V=>`x-axis-${Hr(V)}`).attr("stroke-dasharray","0").attr("x1",V=>Ft(_(V),0,M).x).attr("y1",V=>Ft(_(V),0,M).y).attr("x2",V=>Ft(_(V),0,M).x).attr("y2",V=>Ft(_(V),0,M).y).call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_axes_enter",animate:t})).attr("opacity",1).attr("x1",z=>Ft(_(z),L.range()[0],M).x).attr("y1",z=>Ft(_(z),L.range()[0],M).y).attr("x2",z=>Ft(_(z),L.range()[1],M).x).attr("y2",z=>Ft(_(z),L.range()[1],M).y)),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_axes_update",animate:t})).attr("opacity",1).attr("x1",z=>Ft(_(z),L.range()[0],M).x).attr("y1",z=>Ft(_(z),L.range()[0],M).y).attr("x2",z=>Ft(_(z),L.range()[1],M).x).attr("y2",z=>Ft(_(z),L.range()[1],M).y)),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_axes_exit",animate:t})).attr("opacity",0).remove())),R.appendOrSelect(n,"g.x-labels").attr("role",ut.GROUP).selectAll("text").data(this.uniqueKeys).join(A=>A.append("text").text(V=>V).attr("opacity",0).attr("x",V=>Ft(_(V),L.range()[1]+h,M).x).attr("y",V=>Ft(_(V),L.range()[1]+h,M).y).style("text-anchor",V=>Bv(_(V)).textAnchor).style("dominant-baseline",V=>Bv(_(V)).dominantBaseline).call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_labels_enter",animate:t})).attr("opacity",1)),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_labels_update",animate:t})).attr("opacity",1).attr("x",z=>Ft(_(z),L.range()[1]+h,M).x).attr("y",z=>Ft(_(z),L.range()[1]+h,M).y).end().finally(()=>{const z=b(o,"radar","alignment"),St=this.getAlignmentXOffset(z,n,this.getParent());n.attr("x",St)})),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_x_labels_exit",animate:t})).attr("opacity",0).remove())),R.appendOrSelect(n,"g.blobs").attr("role",ut.GROUP).selectAll("path").data(this.groupedDataNormalized,A=>A.name).join(A=>A.append("path").attr("class",V=>this.model.getColorClassName({classNameTypes:[at.FILL,at.STROKE],dataGroupName:V.name,originalClassName:"blob"})).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-label",V=>V.name).attr("opacity",0).attr("transform",t?()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`:`translate(${M.x}, ${M.y})`).style("fill",V=>D(V.name,null,V.data)).style("fill-opacity",or.opacity.selected).style("stroke",V=>D(V.name,null,V.data)).call(V=>{const z=V.transition().call(St=>this.services.transitions.setupTransition({transition:St,name:"radar_blobs_enter",animate:t}));t&&z.delay(()=>Math.random()*30).attr("transform",`translate(${M.x}, ${M.y})`),z.attr("opacity",1).attr("d",St=>O(St.data))}),A=>(A.attr("class",V=>this.model.getColorClassName({classNameTypes:[at.FILL,at.STROKE],dataGroupName:V.name,originalClassName:"blob"})).style("fill",V=>D(V.name,null,V.data)).style("stroke",V=>D(V.name,null,V.data)),A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_blobs_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",z=>O(z.data))),A),A=>A.call(V=>{const z=V.transition().call(St=>this.services.transitions.setupTransition({transition:St,name:"radar_blobs_exit",animate:t}));t&&z.delay(()=>Math.random()*30).attr("transform",()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`),z.attr("opacity",0).remove()})),R.appendOrSelect(n,"g.dots").attr("role",ut.GROUP).selectAll("circle").data(this.fullDataNormalized.filter(A=>b(A,d)!==null)).join(A=>A.append("circle").attr("role",ut.GRAPHICS_SYMBOL).attr("aria-label",V=>V[c]),A=>A,A=>A.remove()).attr("class",A=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:A[l],originalClassName:Hr(A[u])})).attr("cx",A=>Ft(_(A[u]),L(A[d]),M).x).attr("cy",A=>Ft(_(A[u]),L(A[d]),M).y).attr("r",0).attr("opacity",0).style("fill",A=>D(A[l])),R.appendOrSelect(n,"g.x-axes-rect").attr("role",ut.GROUP).selectAll("rect").data(this.uniqueKeys).join(A=>A.append("rect"),A=>A,A=>A.remove()).attr("x",M.x).attr("y",M.y-m/2).attr("width",L.range()[1]).attr("height",m).style("fill","red").style("fill-opacity",0).attr("transform",A=>`rotate(${Hv(_(A))}, ${M.x}, ${M.y})`);const{code:vt,number:q}=b(o,"locale");R.appendOrSelect(n,"g.y-labels").attr("role",ut.GROUP).selectAll("text").data(ke(B)).join(A=>A.append("text").attr("opacity",0).text(V=>q(V,vt)).attr("x",V=>Ft(-Math.PI/2,L(V),M).x+f).attr("y",V=>Ft(-Math.PI/2,L(V),M).y).style("text-anchor","start").style("dominant-baseline","middle").call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_labels_enter",animate:t})).attr("opacity",1)),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_labels_update",animate:t})).text(z=>z).attr("opacity",1).attr("x",z=>Ft(-Math.PI/2,L(z),M).x+f).attr("y",z=>Ft(-Math.PI/2,L(z),M).y)),A=>A.call(V=>V.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"radar_y_labels_exit",animate:t})).attr("opacity",0).remove())),this.addEventListeners()}getAlignmentXOffset(t,n,r){const i=R.getSVGElementSize(n,{useBBox:!0}),{width:s}=R.getSVGElementSize(r,{useAttrs:!0});let a=0;return t===Ht.CENTER?a=Math.floor((s-i.width)/2):t===Ht.RIGHT&&(a=s-i.width),a}destroy(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}addEventListeners(){const t=this,{axes:{angle:n}}=b(this.getOptions(),"radar");this.parent.selectAll(".x-axes-rect > rect").on("mouseover",function(r,i){const s=I(this);t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEOVER,{event:r,element:s,datum:i});const a=t.parent.select(`.x-axes .x-axis-${Hr(i)}`),o=t.parent.selectAll(`.dots circle.${Hr(i)}`),l=t.model.getActiveDataGroupNames(),c=t.getOptions(),{groupMapsTo:u}=c.data,d=b(c,"radar","axes","value");a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",f=>l.indexOf(f[u])!==-1?1:0).attr("r",or.dotsRadius);const h=t.fullDataNormalized.filter(f=>f[n]===i&&l.indexOf(f[u])!==-1);t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:r,hoveredElement:s,items:h.filter(f=>typeof f[d]=="number").map(f=>({label:f[u],value:f[d],color:t.model.getFillColor(f[u],null,f),class:t.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:f[u]})}))})}).on("mousemove",function(r,i){const s=I(this);t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEMOVE,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(T.Radar.X_AXIS_CLICK,{event:r,element:I(this),datum:i})}).on("mouseout",function(r,i){const s=I(this),a=t.parent.select(`.x-axes .x-axis-${Hr(i)}`),o=t.parent.selectAll(`.dots circle.${Hr(i)}`);a.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEOUT,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.HIDE)})}}class Gv extends qu{constructor(){super(...arguments),this.type="simple-bar",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-simple-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getComponentContainer({withinChartClip:!0}),s=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),o=i.selectAll("path.bar").data(s,c=>c[r]);o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:c[r],originalClassName:"bar"})).style("fill",c=>{const u=this.services.cartesianScales.getDomainIdentifier(c);return this.model.getFillColor(c[r],c[u],c)}).attr("d",c=>{const u=this.services.cartesianScales.getRangeIdentifier(),d=this.getBarWidth(),h=c[u],f=this.services.cartesianScales.getDomainValue(c)-d/2,p=f+d;let g,m;if(Array.isArray(h)&&h.length===2)g=this.services.cartesianScales.getRangeValue(h[0]),m=this.services.cartesianScales.getRangeValue(h[1]);else{const y=this.services.cartesianScales.getRangeScale().domain()[0];g=this.services.cartesianScales.getRangeValue(Math.max(0,y)),m=this.services.cartesianScales.getRangeValue(c)}const v=Math.abs(m-g);if(v!==0&&v<2&&(h>0&&a===Bt.VERTICAL||h<0&&a===Bt.HORIZONTAL?m=g-2:m=g+2),!this.isOutsideZoomedDomain(f,p))return ie({x0:f,x1:p,y0:g,y1:m},a)}).attr("opacity",1).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=I(this);i.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:n,element:I(this),datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:n,element:I(this),datum:r})}).on("mouseout",function(n,r){const i=I(this);i.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class pN extends oe{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const n=b(this.getOptions(),"data","loading"),r=!b(this.getOptions(),"grid","x","enabled")&&!b(this.getOptions(),"grid","y","enabled")&&!b(this.getOptions(),"axes","bottom","visible")&&!b(this.getOptions(),"axes","left","visible");n&&!r?super.renderGridSkeleton(n):n&&r?this.renderSparklineSkeleton(n):this.removeSkeleton()}renderSparklineSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")}drawSparkline(t){const n=this.backdrop.attr("width"),r=[100],i=R.appendOrSelect(this.backdrop,"g.y.skeleton"),s=i.selectAll("line").data(r);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",a=>a).attr("y2",a=>a),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const t=this.parent;this.backdrop=R.appendOrSelect(t,"svg.chart-skeleton.DAII"),R.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class Vv extends gt{constructor(){super(...arguments),this.type="area-stacked",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.area").transition("legend-hover-area").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-area"})).attr("opacity",s=>b(s,0,i)!==n.datum().name?bn.opacity.unselected:bn.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",bn.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0}),r=this,i=this.getOptions(),{groupMapsTo:s}=i.data,a=Object.keys(i.axes).some(p=>i.axes[p].percentage),o=this.model.getStackedData({percentage:a,groups:this.configs.groups}),l=b(o,0,0),c=this.services.cartesianScales.getDomainAxisPosition({datum:l}),u=this.services.cartesianScales.getRangeAxisPosition({datum:l}),d=this.services.cartesianScales.getScaleByPosition(u),h=n.selectAll("path.area").data(o,p=>b(p,0,s));this.areaGenerator=Zl().x(p=>this.services.cartesianScales.getValueThroughAxisPosition(c,p.data.sharedStackKey)).y0(p=>d(p[0])).y1(p=>d(p[1])).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(o,p=>b(p,0,s)).attr("class","area").attr("class",p=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:b(p,0,s),originalClassName:"area"})).style("fill",p=>r.model.getFillColor(b(p,0,s),null,p)).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",p=>b(p,0,s)).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"area-update-enter",animate:t})).attr("opacity",bn.opacity.selected).attr("d",this.areaGenerator)}}class zv extends qu{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.model.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),a=this.model.getActiveDataGroupNames(),o=n.selectAll("g.bars").data(s,c=>b(c,0,i));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",ut.GROUP).attr("data-name","bars");const l=n.selectAll("g.bars").selectAll("path.bar").data(c=>c,c=>c.data.sharedStackKey);l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:c[i],originalClassName:"bar"})).style("fill",c=>this.model.getFillColor(c[i],c.data.sharedStackKey,c.data)).attr("d",c=>{const u=c.data.sharedStackKey,d=this.getBarWidth(),h=this.services.cartesianScales.getDomainValue(u)-d/2,f=h+d,p=this.services.cartesianScales.getRangeValue(c[0]);let g=this.services.cartesianScales.getRangeValue(c[1]);if(!this.isOutsideZoomedDomain(h,f)){if(Math.abs(g-p)>0&&Math.abs(g-p)>r.bars.dividerSize){const m=c[0]<0&&c[1]<=0;m&&a.length>1?this.services.cartesianScales.getOrientation()===Bt.VERTICAL?g+=c[1]===0?2:1:g-=1:m||(this.services.cartesianScales.getOrientation()===Bt.VERTICAL?g+=1:g-=1)}return ie({x0:h,x1:f,y0:p,y1:g},this.services.cartesianScales.getOrientation())}}).attr("opacity",1).attr("role",ut.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c[1]-c[0]),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this;this.parent.selectAll("path.bar").on("mouseover",function(i,s){const a=I(this);a.classed("hovered",!0),r.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:i,element:a,datum:s});let l=r.model.getDisplayData(r.configs.groups).find(c=>{const u=r.services.cartesianScales.getDomainIdentifier(c),d=r.services.cartesianScales.getRangeIdentifier(c);return c[d]===s.data[s[n]]&&c[u].toString()===s.data.sharedStackKey&&c[n]===s[n]});if(l===void 0){const c=r.services.cartesianScales.getDomainIdentifier(),u=r.services.cartesianScales.getRangeIdentifier();l={[c]:s.data.sharedStackKey,[u]:s.data[s[n]],[n]:s[n]}}r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:i,hoveredElement:a,data:[l]})}).on("mousemove",function(i,s){const a=I(this);r.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:i,element:a,datum:s}),r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:i})}).on("click",function(i,s){r.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:i,element:I(this),datum:s})}).on("mouseout",function(i,s){const a=I(this);a.classed("hovered",!1),r.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:i,element:a,datum:s}),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:a})})}getBarWidth(){const t=this.getOptions();if(b(t,"bars","width"))return t.bars.width;const n=this.services.cartesianScales.getMainXScale(),r=R.getSVGElementSize(this.parent,{useAttrs:!0}).width,i=this.model.getStackKeys().length,s=b(t,"bars","spacingFactor");return n.step?Math.min(t.bars.maxWidth,n.step()/2):Math.min(t.bars.maxWidth,r*s/i)}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class Wv extends sn{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=et.SVG}render(t){if(!b(this.getOptions(),"points","enabled"))return;const r=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:s}=i.data,a=Object.keys(i.axes).some(f=>i.axes[f].percentage),o=this.model.getStackedData({groups:this.configs.groups,percentage:a}),l=r.selectAll("g.dots").data(o,f=>b(f,0,s));l.exit().attr("opacity",0).remove();const u=l.enter().append("g").classed("dots",!0).attr("role",ut.GROUP).merge(l).selectAll("circle.dot").data(f=>f);u.exit().attr("opacity",0).remove();const h=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u).datum(f=>{const p=f[s],g=this.services.cartesianScales.getDomainIdentifier(f),m=this.services.cartesianScales.getRangeIdentifier(f);return{[s]:p,[g]:f.data.sharedStackKey,[m]:f[1]}});this.styleCircles(h,t),this.addEventListeners()}getTooltipData(t,n){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=Object.keys(r.axes).some(l=>r.axes[l].percentage),a=this.model.getStackedData({groups:this.configs.groups,percentage:s}),o=[];return a.forEach((l,c)=>{l.forEach((u,d)=>{const h=u[i],f=u.data.sharedStackKey;let p=u.data[h];const g=u[1],m=this.services.cartesianScales.getDomainIdentifier(u),v=this.services.cartesianScales.getRangeIdentifier(u);p!=null&&t===this.services.cartesianScales.getDomainValue(f)&&n===this.services.cartesianScales.getRangeValue(g)&&(s&&(p=this.model.getStackedData({groups:this.configs.groups})[c][d].data[h]),p!==null&&o.push({[i]:h,[m]:f,[v]:p}))})}),this.model.getDisplayData(this.configs.groups).filter(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l),u=this.services.cartesianScales.getRangeIdentifier(l);return o.find(d=>d[i]==l[i]&&d[c]==l[c]&&d[u]==l[u])!==void 0})}}const ni=6;class gN extends gt{constructor(){super(...arguments),this.type="tree",this.renderType=et.SVG}getLongestLabel(t){let n="";return t.forEach(r=>{const i=r.children?this.getLongestLabel(r.children):"";(i.length>n.length||r.name.length>n.length)&&(n=i.length>r.name.length?i:r.name)}),n}getMockLabelWidth(t,n){const r=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(n),{width:i}=R.getSVGElementSize(r.node(),{useBBox:!0});return r.remove(),i}render(t=!0){const n=this.getComponentContainer();n.html("");const{width:r,height:i}=R.getSVGElementSize(this.parent,{useAttrs:!0});if(r<1||i<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=b(s,"tree","rootTitle")||"Tree",l=this.getMockLabelWidth(n,o),c=this.getLongestLabel(a),u=this.getMockLabelWidth(n,c),d={top:0,right:0,bottom:0,left:l>0?l+ni:30-ni},h=Li({name:o,children:a}),f=10,p=r/6,g=_=>{const C=h.descendants().reverse(),L=h.links();let B=h,D=h;h.eachBefore(N=>{N.x<B.x&&(B=N),N.x>D.x&&(D=N)});const O=D.x-B.x,H=n.transition().call(N=>this.services.transitions.setupTransition({transition:N,name:"tree-update-viewbox",animate:!0})).attr("viewBox",[-d.left,B.x,r,O].join(" ")),P=S.selectAll("g").data(C,N=>N.id),M=this,w=P.enter().append("g").attr("transform",()=>`translate(${_.y0},${_.x0})`).attr("class",N=>N.depth!==0&&N.children&&N.children.length>0?"clickable":null).on("mouseover",function(N,F){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOVER,{event:N,element:I(this),datum:F})}).on("click",function(N,F){F.depth!==0&&(F.children=F.children?null:F._children,g(F)),M.services.events.dispatchEvent(T.Tree.NODE_CLICK,{event:N,element:I(this),datum:F})}).on("mouseout",function(N,F){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOUT,{event:N,element:I(this),datum:F})});w.append("circle").attr("r",2.5).attr("class",N=>N._children?"parent":"child").attr("stroke-width",10),w.append("text").attr("dy","0.31em").attr("x",N=>N._children?-ni:ni).attr("text-anchor",N=>N._children?"end":"start").text(N=>N.data.name).clone(!0).attr("class","text-stroke").lower(),P.merge(w).transition(H).attr("transform",N=>`translate(${N.y},${N.x})`).attr("fill-opacity",1).attr("stroke-opacity",1),P.exit().transition(H).remove().attr("transform",()=>`translate(${_.y},${_.x})`).attr("fill-opacity",0).attr("stroke-opacity",0);const U=x.selectAll("path").data(L,N=>N.target.id),$=U.enter().append("path").attr("d",()=>{const N={x:_.x0,y:_.y0};return y({source:N,target:N})});U.merge($).transition(H).attr("d",y),U.exit().transition(H).remove().attr("d",()=>{const N={x:_.x,y:_.y};return y({source:N,target:N})}),h.eachBefore(N=>{N.x0=N.x,N.y0=N.y})},m=h.descendants(),v=m[m.length-1].depth,E=b(s,"tree","type")===za.DENDROGRAM?Nx().size([i,r-u-v*ni-l]):S_().nodeSize([f,p]).size([i,r-u-v*ni-l]),y=xT().x(_=>_.y).y(_=>_.x);h.x0=p/2,h.y0=0,h.descendants().forEach((_,C)=>{_.id=C,_._children=_.children}),E(h),n.attr("viewBox",[-d.left,-d.top,r,f]).style("user-select","none");const x=n.append("g").attr("class","links"),S=n.append("g").attr("class","nodes");g(h)}}var mN="#000000",vN="#ffffff",yN="#fcf4d6",EN="#fddc69",bN="#f1c21b",xN="#d2a106",_N="#b28600",SN="#8e6a00",TN="#684e00",ON="#483700",wN="#302400",MN="#1c1500",AN={10:yN,20:EN,30:bN,40:xN,50:_N,60:SN,70:TN,80:ON,90:wN,100:MN},CN="#fff2e8",DN="#ffd9be",LN="#ffb784",RN="#ff832b",IN="#eb6200",kN="#ba4e00",PN="#8a3800",NN="#5e2900",$N="#3e1a00",FN="#231000",UN={10:CN,20:DN,30:LN,40:RN,50:IN,60:kN,70:PN,80:NN,90:$N,100:FN},BN="#fff1f1",HN="#ffd7d9",GN="#ffb3b8",VN="#ff8389",zN="#fa4d56",WN="#da1e28",YN="#a2191f",qN="#750e13",XN="#520408",jN="#2d0709",ZN={10:BN,20:HN,30:GN,40:VN,50:zN,60:WN,70:YN,80:qN,90:XN,100:jN},KN="#fff0f7",QN="#ffd6e8",JN="#ffafd2",t$="#ff7eb6",e$="#ee5396",n$="#d02670",r$="#9f1853",i$="#740937",s$="#510224",a$="#2a0a18",o$={10:KN,20:QN,30:JN,40:t$,50:e$,60:n$,70:r$,80:i$,90:s$,100:a$},l$="#f6f2ff",c$="#e8daff",u$="#d4bbff",h$="#be95ff",d$="#a56eff",f$="#8a3ffc",p$="#6929c4",g$="#491d8b",m$="#31135e",v$="#1c0f30",y$={10:l$,20:c$,30:u$,40:h$,50:d$,60:f$,70:p$,80:g$,90:m$,100:v$},E$="#edf5ff",b$="#d0e2ff",x$="#a6c8ff",_$="#78a9ff",S$="#4589ff",T$="#0f62fe",O$="#0043ce",w$="#002d9c",M$="#001d6c",A$="#001141",C$={10:E$,20:b$,30:x$,40:_$,50:S$,60:T$,70:O$,80:w$,90:M$,100:A$},D$="#e5f6ff",L$="#bae6ff",R$="#82cfff",I$="#33b1ff",k$="#1192e8",P$="#0072c3",N$="#00539a",$$="#003a6d",F$="#012749",U$="#061727",B$={10:D$,20:L$,30:R$,40:I$,50:k$,60:P$,70:N$,80:$$,90:F$,100:U$},H$="#d9fbfb",G$="#9ef0f0",V$="#3ddbd9",z$="#08bdba",W$="#009d9a",Y$="#007d79",q$="#005d5d",X$="#004144",j$="#022b30",Z$="#081a1c",K$={10:H$,20:G$,30:V$,40:z$,50:W$,60:Y$,70:q$,80:X$,90:j$,100:Z$},Q$="#defbe6",J$="#a7f0ba",tF="#6fdc8c",eF="#42be65",nF="#24a148",rF="#198038",iF="#0e6027",sF="#044317",aF="#022d0d",oF="#071908",lF={10:Q$,20:J$,30:tF,40:eF,50:nF,60:rF,70:iF,80:sF,90:aF,100:oF},cF="#f2f4f8",uF="#dde1e6",hF="#c1c7cd",dF="#a2a9b0",fF="#878d96",pF="#697077",gF="#4d5358",mF="#343a3f",vF="#21272a",yF="#121619",EF={10:cF,20:uF,30:hF,40:dF,50:fF,60:pF,70:gF,80:mF,90:vF,100:yF},bF="#f4f4f4",xF="#e0e0e0",_F="#c6c6c6",SF="#a8a8a8",TF="#8d8d8d",OF="#6f6f6f",wF="#525252",MF="#393939",AF="#262626",CF="#161616",DF={10:bF,20:xF,30:_F,40:SF,50:TF,60:OF,70:wF,80:MF,90:AF,100:CF},LF="#f7f3f2",RF="#e5e0df",IF="#cac5c4",kF="#ada8a8",PF="#8f8b8b",NF="#726e6e",$F="#565151",FF="#3c3838",UF="#272525",BF="#171414",HF={10:LF,20:RF,30:IF,40:kF,50:PF,60:NF,70:$F,80:FF,90:UF,100:BF},Yv={black:{100:mN},blue:C$,coolGray:EF,cyan:B$,gray:DF,green:lF,magenta:o$,orange:UN,purple:y$,red:ZN,teal:K$,warmGray:HF,white:{0:vN},yellow:AN};const GF=e=>{if(!e)return null;for(const t of Object.keys(Yv)){const n=Yv[t];for(const r of Object.keys(n))if(n[+r]===e)return r}return null},qv=function(){const e=I(this.parentNode).select("rect.leaf"),t=getComputedStyle(e.node(),null).getPropertyValue("fill"),n=on(t);let r;if(n&&(r=GF(n?n.hex():null)),r==null){const i=Bo(n).l;r=Math.abs(i*100-100)}return r>50?"white":"black"};let VF=0;class zF extends gt{constructor(){super(...arguments),this.type="treemap",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-treemap"})).attr("opacity",r=>r.parent.data.name===n.datum().name?1:.3)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})).attr("opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer();this.model.getData();const r=this.model.getDisplayData(),i=this.model.getOptions(),s=b(window,"location"),{width:a,height:o}=R.getSVGElementSize(n,{useAttrs:!0}),l=Li({name:i.title||"Treemap",children:r}).sum(g=>g.value).sort((g,m)=>m.value-g.value),c=A_().size([a,o]).paddingInner(1).paddingOuter(0).round(!0)(l),u=n.selectAll("g[data-name='leaf']").data(c.leaves(),g=>g.data.name);u.exit().attr("opacity",0).remove();const h=u.enter().append("g").attr("data-name","leaf").attr("data-uid",()=>VF++).merge(u);h.attr("data-name","leaf").transition().call(g=>this.services.transitions.setupTransition({transition:g,name:"treemap-group-update",animate:t})).attr("transform",g=>`translate(${g.x0},${g.y0})`);const f=h.selectAll("rect.leaf").data(g=>[g]);f.exit().attr("width",0).attr("height",0).remove(),f.enter().append("rect").classed("leaf",!0).merge(f).attr("width",0).attr("height",0).attr("id",function(){const g=I(this.parentNode).attr("data-uid");return`${i.style.prefix}-leaf-${g}`}).attr("class",g=>{for(;g.depth>1;)g=g.parent;return this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:g.data.name,originalClassName:"leaf"})}).transition().call(g=>this.services.transitions.setupTransition({transition:g,name:"treemap-leaf-update-enter",animate:t})).attr("width",g=>g.x1-g.x0).attr("height",g=>g.y1-g.y0).style("fill",g=>{for(;g.depth>1;)g=g.parent;return this.model.getFillColor(g.data.name,null,g.data)}),h.selectAll("clipPath").data(g=>g.data.showLabel!==!0?[]:[1],g=>g).join(g=>g.append("clipPath").attr("id",function(){const m=I(this.parentNode).attr("data-uid");return`${i.style.prefix}-clip-${m}`}).append("use").attr("xlink:href",function(){const m=I(this.parentNode.parentNode).attr("data-uid"),v=`${i.style.prefix}-leaf-${m}`;return new URL(`#${v}`,s)+""}),g=>null,g=>g.remove()),h.selectAll("text").data(g=>{if(g.data.showLabel!==!0)return[];let m=g;for(;m.depth>1;)m=m.parent;const v=Bo(this.model.getFillColor(m.data.name));return[{text:g.data.name,color:v.l<.5?"white":"black"}]},g=>g).join(g=>{const m=g.append("text").text(v=>v.text).style("fill",qv).attr("x",7).attr("y",18);return s&&m.attr("clip-path",function(){const v=I(this.parentNode).attr("data-uid"),E=`${i.style.prefix}-clip-${v}`;return`url(${new URL(`#${E}`,s)+""})`}),m},g=>g.text(m=>m.text).style("fill",qv),g=>g.remove()),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("rect.leaf").on("mouseover",function(n,r){const i=I(this);let s=getComputedStyle(this,null).getPropertyValue("fill"),a=r;for(;a.depth>1;)a=a.parent;i.transition("graph_element_mouseover_fill_update").call(o=>t.services.transitions.setupTransition({transition:o,name:"graph_element_mouseover_fill_update"})).style("fill",o=>{const l=t.model.getFillColor(o.parent.data.name,null,o.data);return l&&(s=l),on(s).darker(.7).toString()}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:s,label:a.data.name,bold:!0},{label:r.data.name,value:r.data.value}]}),t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=I(this);t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Treemap.LEAF_CLICK,{event:n,element:I(this),datum:r})}).on("mouseout",function(n,r){const i=I(this);i.classed("hovered",!1);let s=r;for(;s.depth>1;)s=s.parent;i.transition().call(a=>t.services.transitions.setupTransition({transition:a,name:"graph_element_mouseout_fill_update"})).style("fill",a=>t.model.getFillColor(a.parent.data.name,null,a.data)),t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}}var WF={value:function(){}};function Xv(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Eo(n)}function Eo(e){this._=e}function YF(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Eo.prototype=Xv.prototype={constructor:Eo,on:function(e,t){var n=this._,r=YF(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=qF(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=jv(n[i],e.name,t);else if(t==null)for(i in n)n[i]=jv(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Eo(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function qF(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function jv(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=WF,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}const XF=T2(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Xv},Symbol.toStringTag,{value:"Module"}))).dispatch,Xu=Math.PI/180,jF={archimedean:Kv,rectangular:aU},Es=64,bo=2048;var ZF=function(){var e=[256,256],t=KF,n=QF,r=JF,i=Zv,s=Zv,a=tU,o=eU,l=Kv,c=[],u=1/0,d=XF("word","end"),h=null,f=Math.random,p={},g=lU;p.canvas=function(E){return arguments.length?(g=$n(E),p):g},p.start=function(){var E=m(g()),y=oU((e[0]>>5)*e[1]),x=null,S=c.length,_=-1,C=[],L=c.map(function(D,O){return D.text=t.call(this,D,O),D.font=n.call(this,D,O),D.style=i.call(this,D,O),D.weight=s.call(this,D,O),D.rotate=a.call(this,D,O),D.size=~~r.call(this,D,O),D.padding=o.call(this,D,O),D}).sort(function(D,O){return O.size-D.size});return h&&clearInterval(h),h=setInterval(B,0),B(),p;function B(){for(var D=Date.now();Date.now()-D<u&&++_<S&&h;){var O=L[_];O.x=e[0]*(f()+.5)>>1,O.y=e[1]*(f()+.5)>>1,nU(E,O,L,_),O.hasText&&v(y,O,x)&&(C.push(O),d.call("word",p,O),x?iU(x,O):x=[{x:O.x+O.x0,y:O.y+O.y0},{x:O.x+O.x1,y:O.y+O.y1}],O.x-=e[0]>>1,O.y-=e[1]>>1)}_>=S&&(p.stop(),d.call("end",p,C,x))}},p.stop=function(){h&&(clearInterval(h),h=null);for(const E of c)delete E.sprite;return p};function m(E){const y=E.getContext("2d",{willReadFrequently:!0});E.width=E.height=1;const x=Math.sqrt(y.getImageData(0,0,1,1).data.length>>2);return E.width=(Es<<5)/x,E.height=bo/x,y.fillStyle=y.strokeStyle="red",{context:y,ratio:x}}function v(E,y,x){e[0],e[1];for(var S=y.x,_=y.y,C=Math.sqrt(e[0]*e[0]+e[1]*e[1]),L=l(e),B=f()<.5?1:-1,D=-B,O,H,P;(O=L(D+=B))&&(H=~~O[0],P=~~O[1],!(Math.min(Math.abs(H),Math.abs(P))>=C));)if(y.x=S+H,y.y=_+P,!(y.x+y.x0<0||y.y+y.y0<0||y.x+y.x1>e[0]||y.y+y.y1>e[1])&&(!x||sU(y,x))&&!rU(y,E,e[0])){for(var M=y.sprite,w=y.width>>5,U=e[0]>>5,$=y.x-(w<<4),N=$&127,F=32-N,Y=y.y1-y.y0,Z=(y.y+y.y0)*U+($>>5),K,dt=0;dt<Y;dt++){K=0;for(var it=0;it<=w;it++)E[Z+it]|=K<<F|(it<w?(K=M[dt*w+it])>>>N:0);Z+=U}return!0}return!1}return p.timeInterval=function(E){return arguments.length?(u=E??1/0,p):u},p.words=function(E){return arguments.length?(c=E,p):c},p.size=function(E){return arguments.length?(e=[+E[0],+E[1]],p):e},p.font=function(E){return arguments.length?(n=$n(E),p):n},p.fontStyle=function(E){return arguments.length?(i=$n(E),p):i},p.fontWeight=function(E){return arguments.length?(s=$n(E),p):s},p.rotate=function(E){return arguments.length?(a=$n(E),p):a},p.text=function(E){return arguments.length?(t=$n(E),p):t},p.spiral=function(E){return arguments.length?(l=jF[E]||E,p):l},p.fontSize=function(E){return arguments.length?(r=$n(E),p):r},p.padding=function(E){return arguments.length?(o=$n(E),p):o},p.random=function(E){return arguments.length?(f=E,p):f},p.on=function(){var E=d.on.apply(d,arguments);return E===d?p:E},p};function KF(e){return e.text}function QF(){return"serif"}function Zv(){return"normal"}function JF(e){return Math.sqrt(e.value)}function tU(){return(~~(random()*6)-3)*30}function eU(){return 1}function nU(e,t,n,r){if(!t.sprite){var i=e.context,s=e.ratio;i.clearRect(0,0,(Es<<5)/s,bo/s);var a=0,o=0,l=0,c=n.length;for(--r;++r<c;){t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/s)+"px "+t.font;const O=i.measureText(t.text),H=-Math.floor(O.width/2);let P=(O.width+1)*s,M=t.size<<1;if(t.rotate){var u=Math.sin(t.rotate*Xu),d=Math.cos(t.rotate*Xu),h=P*d,f=P*u,p=M*d,g=M*u;P=Math.max(Math.abs(h+g),Math.abs(h-g))+31>>5<<5,M=~~Math.max(Math.abs(f+p),Math.abs(f-p))}else P=P+31>>5<<5;if(M>l&&(l=M),a+P>=Es<<5&&(a=0,o+=l,l=0),o+M>=bo)break;i.translate((a+(P>>1))/s,(o+(M>>1))/s),t.rotate&&i.rotate(t.rotate*Xu),i.fillText(t.text,H,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,H,0)),i.restore(),t.width=P,t.height=M,t.xoff=a,t.yoff=o,t.x1=P>>1,t.y1=M>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,a+=P}for(var m=i.getImageData(0,0,(Es<<5)/s,bo/s).data,v=[];--r>=0;)if(t=n[r],!!t.hasText){for(var E=t.width,y=E>>5,x=t.y1-t.y0,S=0;S<x*y;S++)v[S]=0;if(a=t.xoff,a==null)return;o=t.yoff;for(var _=0,C=-1,L=0;L<x;L++){for(var S=0;S<E;S++){var B=y*L+(S>>5),D=m[(o+L)*(Es<<5)+(a+S)<<2]?1<<31-S%32:0;v[B]|=D,_|=D}_?C=L:(t.y0++,x--,L--,o++)}t.y1=t.y0+C,t.sprite=v.slice(0,(t.y1-t.y0)*y)}}}function rU(e,t,n){n>>=5;for(var r=e.sprite,i=e.width>>5,s=e.x-(i<<4),a=s&127,o=32-a,l=e.y1-e.y0,c=(e.y+e.y0)*n+(s>>5),u,d=0;d<l;d++){u=0;for(var h=0;h<=i;h++)if((u<<o|(h<i?(u=r[d*i+h])>>>a:0))&t[c+h])return!0;c+=n}return!1}function iU(e,t){var n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function sU(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function Kv(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function aU(e){var t=4,n=t*e[0]/e[1],r=0,i=0;return function(s){var a=s<0?-1:1;switch(Math.sqrt(1+4*a*s)-a&3){case 0:r+=n;break;case 1:i+=t;break;case 2:r-=n;break;default:i-=t;break}return[r,i]}}function oU(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function lU(){return document.createElement("canvas")}function $n(e){return typeof e=="function"?e:function(){return e}}const cU=S2(ZF);class uU extends gt{constructor(){super(...arguments),this.type="wordcloud",this.renderType=et.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("text.word").transition("legend-hover-wordcloud").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-wordcloud"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this,r=this.getComponentContainer().attr("width","100%").attr("height","100%"),i=this.model.getDisplayData(),s=this.getFontSizeScale(i),a=this.getOptions(),{fontSizeMapsTo:o,wordMapsTo:l}=a.wordCloud,{groupMapsTo:c}=a.data,{width:u,height:d}=R.getSVGElementSize(r,{useAttrs:!0});if(u===0||d===0)return;const h=cU().size([u,d]).words(i.map(function(p){const g=p[o];if(typeof p[o]!="number")throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return{[c]:p[c],text:p[l],size:g,value:g}})).padding(5).rotate(0).fontSize(p=>s(p.size)).on("end",f);h.start();function f(p){const g=R.appendOrSelect(r,"g.words");g.attr("transform",`translate(${h.size()[0]/2}, ${h.size()[1]/2})`);const m=g.selectAll("text").data(p,E=>`${E[c]}-${E.text}`);m.exit().attr("opacity",0).remove(),m.enter().append("text").attr("opacity",0).merge(m).style("font-size",E=>`${E.size}px`).text(function(E){return E.text}).attr("class",E=>n.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:E[c],originalClassName:`word ${E.size>32?"light":""}`})).style("fill",E=>n.model.getFillColor(E[c],E.text,E)).attr("text-anchor","middle").transition().call(E=>n.services.transitions.setupTransition({transition:E,name:"wordcloud-text-update-enter",animate:t})).attr("transform",E=>`translate(${E.x}, ${E.y})`).attr("opacity",1)}this.addEventListeners()}getFontSizeScale(t){const n=this.getOptions(),{fontSizeMapsTo:r}=n.wordCloud,i=t.map(l=>l[r]).filter(l=>l),s=R.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,o=a?ke(i):[1,1];return Fe().domain(o).range(a?n.wordCloud.fontSizeRange(s,t):[4,4])}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=Va(s=>{const a=r.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call(o=>r.services.transitions.setupTransition({transition:o,name:"wordcloud-word-mouse-highlight"}));s===null?a.attr("opacity",1):a.attr("opacity",function(){return s===this?1:.3})},6);this.parent.selectAll("text.word").on("mouseover",function(s,a){const o=this;i(o),r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEOVER,{event:s,element:I(this),datum:a}),r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:t.tooltip.wordLabel,value:a.text},{label:t.tooltip.valueLabel,value:a.value},{label:yt(t,"locale.translations.group")||yt(t,"tooltip.groupLabel")||"Group",value:a[n],class:r.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:a[n]})}]})}).on("mousemove",function(s,a){const o=I(this);r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEMOVE,{element:o,datum:a}),r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){r.services.events.dispatchEvent(T.WordCloud.WORD_CLICK,{event:s,element:I(this),datum:a})}).on("mouseout",function(s,a){const o=I(this);i(null),r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEOUT,{event:s,element:o,datum:a}),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o})})}}class hU extends gt{constructor(){super(...arguments),this.type="geo",this.renderType=et.SVG}render(){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:r}=R.getSVGElementSize(t,{useAttrs:!0});if(n<1||r<1)return;const i=this.getProjection(),s=b(this.getOptions(),"geoData"),a=this.model.getCombinedData(),o={},l={};Object.keys(a).forEach(v=>{typeof a[v].value=="number"?o[v]=a[v]:l[v]=a[v]});const c=JP(s,Object.values(l)),u=ZP(s,{type:"GeometryCollection",geometries:Object.values(o)}),d=i.fitSize([n,r],u),h=lx().projection(d);R.appendOrSelect(t,"g.geo").selectAll("path").data(u.features).join("path").attr("d",h);const p=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),g=R.appendOrSelect(t,"defs");R.appendOrSelect(g,"pattern").attr("id",p).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",Hi()([[0,0],[0,10]]));const m=R.appendOrSelect(t,"g.missing-data");R.appendOrSelect(m,"path").datum(c).attr("d",h).style("fill",`url(#${p})`)}getProjection(){let t=null;switch(b(this.getOptions(),"thematic","projection")){case en.geoEqualEarth:t=Mx();break;case en.geoAlbers:t=bx();break;case en.geoConicEqualArea:t=Zd();break;case en.geoConicEquidistant:t=Ox();break;case en.geoEquirectangular:t=Sx();break;case en.geoMercator:t=xx();break;case en.geoNaturalEarth1:t=Ax();break;default:throw new Error("Projection is not supported.")}return t}}class dU extends hU{constructor(){super(...arguments),this.type="choropleth"}render(t=!0){super.render();const n=this.model.getCombinedData();this.getComponentContainer({withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",s=>this.model.getColorClassName({value:n[s.properties.NAME].value,originalClassName:"border"})),this.addCountryAreaEventListener()}addCountryAreaEventListener(){const t=this,n=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",function(r,i){const s=I(this);t.services.events.dispatchEvent(Vr.CHOROPLETH_MOUSEOVER,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Gr.SHOW,{event:r,hoveredElement:s,items:[{label:i.properties.NAME,value:n[i.properties.NAME].value}]})}).on("mousemove",function(r,i){t.services.events.dispatchEvent(Vr.CHOROPLETH_MOUSEMOVE,{event:r,element:I(this),datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Gr.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(Vr.CHOROPLETH_CLICK,{event:r,element:I(this),datum:n[i.properties.NAME]})}).on("mouseout",function(r,i){const s=I(this);t.services.events.dispatchEvent(Vr.CHOROPLETH_MOUSEOUT,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Gr.HIDE,{event:r,hoveredElement:s})})}}class fU extends Ye{constructor(t,n){super(t,n),this.model=new YP(this.services),this.model.setOptions(Pt(Ct.choroplethChart,n.options)),this.init(t,n)}getChartComponents(t,n){const r=this.model.getOptions(),i=b(r,"toolbar","enabled"),s=!!this.model.getOptions().title,a={id:"title",components:[new ms(this.model,this.services)],growth:ct.STRETCH},o={id:"toolbar",components:[new Kr(this.model,this.services)],growth:ct.PREFERRED},l={id:"header",components:[new ae(this.model,this.services,[a,...i?[o]:[]],{direction:At.ROW,alignItems:sr.CENTER})],growth:ct.PREFERRED},c={id:"legend",components:[new Pv(this.model,this.services,{chartType:"choropleth"})],growth:ct.PREFERRED,renderType:et.SVG},u={id:"graph-frame",components:t,growth:ct.STRETCH,renderType:et.SVG},d=b(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=At.COLUMN_REVERSE,f={id:"spacer",components:[new wn(this.model,this.services,{size:15})],growth:ct.PREFERRED},p={id:"full-frame",components:[new ae(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:ct.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new wn(this.model,this.services,i?{size:15}:void 0)],growth:ct.PREFERRED};g.push(m)}return g.push(p),[new Iu(this.model,this.services),new po(this.model,this.services),new ae(this.model,this.services,g,{direction:At.COLUMN})]}getComponents(){const t=[new dU(this.model,this.services)];return this.getChartComponents(t)}}class pU extends nn{constructor(t){super(t),this.parentNode=!1,this.set({depth:2},{skipUpdate:!0})}setData(t){super.setData(t),this.setDataGroups(),t.length===1&&(this.parentNode=!0),this.setZoom()}setOptions(t){const n=this.getOptions(),r=lt({},t,this.getZoomOptions(t));Kc(n,r);const i=this.getHierarchyLevel(),s=b(n,"circlePack","hierarchyLevel");this.set({options:lt(n,r),depth:s&&s<4?s:i})}getZoomOptions(t){if(!this.getDisplayData())return{};const n=this.getDisplayData(),r=t||this.getOptions(),i=n.length===1&&b(n,0,"children")?b(n,0,"children"):n;let s=this.getHierarchyLevel();return i.some(a=>{if(a.children&&a.children.some(o=>o.children))return s=3,!1}),b(r,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:Vt.ZOOM,name:"Click to zoom"}]}}:null}setZoom(t){this.setOptions(this.getZoomOptions(t))}updateHierarchyLevel(t){this.set({depth:t})}getHierarchyLevel(){return this.get("depth")}hasParentNode(){return this.parentNode}setDataGroups(){const t=this.getData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=t.map(s=>{const a=s[r];return this.setChildrenDataGroup(s,a)});this.set({data:i},{skipUpdate:!0})}setChildrenDataGroup(t,n){return t.children?{...t,dataGroupName:n,children:t.children.map(r=>this.setChildrenDataGroup(r,n))}:{...t,dataGroupName:n}}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Child","Parent","Value"],s=[];return t.forEach(a=>{let o=a.value?a.value:0;a.children&&(o+=this.getChildrenDatums(a.children,a.name,s,0)),s.push(["&ndash;",a.name,n(o,r)])}),super.formatTable({headers:i,cells:s})}getChildrenDatums(t,n,r=[],i=0){const s=n,{number:a,code:o}=b(this.getOptions(),"locale");return t.forEach(l=>{const c=l.name;let u=0;if(l.children)l.children.length>0&&(typeof l.value=="number"&&(i+=l.value),u+=this.getChildrenDatums(l.children,c,r,u),r.push([c,s,a(u,o)]),i+=u);else{let d=0;typeof l.value=="number"&&(d=l.value,i+=l.value),r.push([l.name,s,a(d,o)])}}),i}}class gU extends Ye{constructor(t,n){super(t,n),this.model=new pU(this.services),this.model.setOptions(Pt(Ct.circlePackChart,n.options)),this.init(t,n)}getComponents(){const t=[new rN(this.model,this.services)];return this.getChartComponents(t)}}const Qv={[Ee.LINE]:[ti,sn],[Ee.SCATTER]:[sn],[Ee.AREA]:[Cv,ti,sn],[Ee.STACKED_AREA]:[Vv,ti,Wv,yo],[Ee.SIMPLE_BAR]:[Gv],[Ee.GROUPED_BAR]:[Uv,ei],[Ee.STACKED_BAR]:[zv,yo]};class mU extends de{constructor(t,n){super(t,n);const r=Pt(Ct.comboChart,n.options);n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),r.comboChartTypes=[{type:Ee.LINE,correspondingDatasets:[]}]),this.model.setOptions(r),this.init(t,n)}getGraphComponents(){const{comboChartTypes:t}=this.model.getOptions();let n=0;const r=t.map(i=>{const s=i.type;let a;if(typeof i.type=="string"){if(!Object.keys(Qv).includes(i.type))return console.error(`Invalid chart type "${i.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`),null;let o=!1;const l=`${UA(i.type)}Chart`;return a=lt({},Ct[l],this.model.getOptions(),i.options),i.type===Ee.STACKED_AREA&&(o=!0),Qv[i.type].map(c=>new c(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a,stacked:o}))}else return a=lt({},this.model.getOptions(),i.options),new s(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a})}).filter(i=>i!==null);return Ip(r)}getComponents(){const{comboChartTypes:t}=this.model.getOptions(),n=t.some(s=>s.type===Ee.STACKED_BAR||s.type===Ee.STACKED_AREA),r=[new fe(this.model,this.services),new Te(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.GRID}),...n?[]:[new Pn(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(r)}}class vU extends nn{constructor(t){super(t)}getTabularData(t){const n=super.getTabularData(t);return t!==n&&n.forEach(r=>{r.key&&r.key!==r.group&&(r.group=r.key)}),n}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{valueMapsTo:i}=n.pie,{number:s,code:a}=b(n,"locale"),o=["Group","Value"],l=[...t.map(c=>[c[r],c[i]===null?"&ndash;":s(c[i],a)])];return super.formatTable({headers:o,cells:l})}sanitize(t){return this.getTabularData(t).sort((r,i)=>i.value-r.value)}}class Jv extends Ye{constructor(t,n,r=!1){super(t,n),this.model=new vU(this.services),!r&&(this.model.setOptions(Pt(Ct.pieChart,n.options)),this.init(t,n))}getComponents(){const t=[new Nv(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.PIE})];return this.getChartComponents(t)}}class yU extends Jv{constructor(t,n){super(t,n,!0),this.model.setOptions(Pt(Ct.donutChart,n.options)),this.init(t,n)}getComponents(){const t=[new sN(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.DONUT})];return this.getChartComponents(t)}}class EU extends nn{constructor(t){super(t)}getDataGroups(){return super.getDataGroups().filter(t=>t.name!=="delta")}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{number:i,code:s}=b(this.getOptions(),"locale"),a=["Group","Value"],o=[...t.map(l=>[l[r],l.value===null?"&ndash;":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}}class bU extends Ye{constructor(t,n){super(t,n),this.model=new EU(this.services),this.model.setOptions(Pt(Ct.gaugeChart,n.options)),this.init(t,n)}getComponents(){const t=[new aN(this.model,this.services)];return this.getChartComponents(t)}}class xU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.groupedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Uv(this.model,this.services),new ei(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class _U extends hr{constructor(t){super(t),this.axisFlavor=is.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=b(this.getOptions(),"axes");if(b(n,"left","scaleType")&&b(n,"left","scaleType")!==J.LABELS||b(n,"right","scaleType")&&b(n,"right","scaleType")!==J.LABELS||b(n,"top","scaleType")&&b(n,"top","scaleType")!==J.LABELS||b(n,"bottom","scaleType")&&b(n,"bottom","scaleType")!==J.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=ke(this.getDisplayData(),r=>r.value),n=Fe().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}getFillColor(t){return this._colorScale(t)}getUniqueDomain(){if(He(this._domains)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getDomainIdentifier(),i=n.getMainXAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._domains=Array.from(new Set(t.map(a=>a[r])))}return this._domains}getUniqueRanges(){if(He(this._ranges)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getRangeIdentifier(),i=n.getMainYAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._ranges=Array.from(new Set(t.map(a=>a[r])))}return this._ranges}getMatrix(){if(He(this._matrix)){const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s={};n.forEach(a=>{s[a]={value:null,index:-1}}),t.forEach(a=>{this._matrix[a]=En(s)}),this.getDisplayData().forEach((a,o)=>{this._matrix[a[r]][a[i]]={value:a.value,index:o}})}return this._matrix}setData(t){const n=this.sanitize(En(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){He(this._matrix)&&this.getMatrix();const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s=[];return t.forEach(a=>{n.forEach(o=>{const l={value:this._matrix[a][o].value,index:this._matrix[a][o].index};l[r]=a,l[i]=o,s.push(l)})}),s}getTabularDataArray(){const t=this.getDisplayData(),{primaryDomain:n,primaryRange:r}=this.assignRangeAndDomains(),{number:i,code:s}=b(this.getOptions(),"locale"),a=[n.label,r.label,"Value"],o=[...t.map(l=>[l[n.identifier]===null?"&ndash;":l[n.identifier],l[r.identifier]===null?"&ndash;":l[r.identifier],l.value===null?"&ndash;":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=b(t,"color","gradient","colors"),r=!He(n);let i=b(t,"color","pairing","option");const s=this.getValueDomain(),a=s[0]<0&&s[1]>0?"diverge":"mono";(i<1&&i>4&&a==="mono"||i<1&&i>2&&a==="diverge")&&(i=1);const o=r?n:[];if(!r){const c=a==="diverge"?17:11;for(let u=1;u<c+1;u++)o.push(`fill-${a}-${i}-${u}`)}this._colorScale=Nl().domain(s).range(o);const l=b(this.getOptions(),"color");this._colorScale=Iv(this.getDisplayData(),l)}}class SU extends de{constructor(t,n){super(t,n),this.model=new _U(this.services),this.model.setOptions(Pt(Ct.heatmapChart,n.options)),this.init(t,n)}getAxisChartComponents(t,n){const r=this.model.getOptions(),i=b(r,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const s=!!this.model.getOptions().title,a={id:"title",components:[new ms(this.model,this.services)],growth:ct.STRETCH},o={id:"toolbar",components:[new Kr(this.model,this.services)],growth:ct.PREFERRED},l={id:"header",components:[new ae(this.model,this.services,[a,...i?[o]:[]],{direction:At.ROW,alignItems:sr.CENTER})],growth:ct.PREFERRED},c={id:"legend",components:[new Pv(this.model,this.services,{chartType:"heatmap"})],growth:ct.PREFERRED,renderType:et.SVG},u={id:"graph-frame",components:t,growth:ct.STRETCH,renderType:et.SVG},d=b(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=At.COLUMN_REVERSE,f={id:"spacer",components:[new wn(this.model,this.services,{size:15})],growth:ct.PREFERRED},p={id:"full-frame",components:[new ae(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:ct.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new wn(this.model,this.services,i?{size:15}:void 0)],growth:ct.PREFERRED};g.push(m)}return g.push(p),[new bv(this.model,this.services),new po(this.model,this.services),new ae(this.model,this.services,g,{direction:At.COLUMN})]}getComponents(){const t=[new fe(this.model,this.services),new oN(this.model,this.services)];return this.getAxisChartComponents(t)}}class TU extends hr{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,{number:r,code:i}=b(this.getOptions(),"locale"),s=this.getBinnedStackedData(),a=[yt(t,"bins.rangeLabel")||"Range",...s.map(l=>yt(l,`0.${n}`))],o=[...yt(s,0).map((l,c)=>[`${r(Number(yt(l,"data.x0")),i)} – ${r(Number(yt(l,"data.x1")),i)}`,...s.map(u=>r(yt(u[c],`data.${yt(u[c],n)}`),i))])];return super.formatTable({headers:a,cells:o})}}class OU extends de{constructor(t,n){super(t,n),this.model=new TU(this.services),this.model.setOptions(Pt(Ct.histogramChart,n.options)),this.init(t,n),this.update()}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new eN(this.model,this.services),new lN(this.model,this.services)];return this.getAxisChartComponents(t)}}class wU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.lineChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Pn(this.model,this.services),new ti(this.model,this.services),new sn(this.model,this.services,{handleThresholds:!0}),new pN(this.model,this.services),new ei(this.model,this.services)];return this.getAxisChartComponents(t)}}class MU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.lollipopChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Pn(this.model,this.services),new cN(this.model,this.services),new sn(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class AU extends nn{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((r,i)=>r+i.value,0)}getFillColor(t){const n=this.getOptions(),r=b(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=b(this.getDisplayData()),r=(n==null?void 0:n.reduce((a,o)=>a+o.value,0))??0,i=b(t,"meter","proportional")?r:r>100?100:r,s=b(t,"meter","status","ranges");if(s){const a=s.filter(o=>o.range[0]<=i&&i<=o.range[1]);if(a.length>0)return a[0].status}return null}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getStatus(),s=b(n,"meter","proportional"),{number:a,code:o}=b(this.getOptions(),"locale");let l=[],c=[],u;if(s===null){u=100;const d=t[0];l=["Group","Value",...i?["Status"]:[]],c=[[d[r],d.value===null?"&ndash;":a(d.value,o),...i?[i]:[]]]}else{const d=b(s,"total");u=d||this.getMaximumDomain(t),l=["Group","Value","Percentage of total"],c=[...t.map(h=>{let f;h.value!==null&&h.value!==void 0?f=Number(h.value):f=0;let p=Number((h.value/u*100).toFixed(2));return[h[r],h.value===null?"&ndash;":a(f,o),a(p,o)+" %"]})]}return super.formatTable({headers:l,cells:c})}}class CU extends Ye{constructor(t,n){var i;super(t,n),this.model=new AU(this.services);const r=(i=n.options.meter)!=null&&i.proportional?lt(En(Ct.proportionalMeterChart),n.options):lt(En(Ct.meterChart),n.options);this.model.setOptions(r),this.init(t,n)}getComponents(){const n=[...b(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new nN(this.model,this.services)],growth:ct.STRETCH,renderType:et.SVG},{id:"spacer",components:[new wn(this.model,this.services,{size:8})],growth:ct.STRETCH}]:[],{id:"meter-graph",components:[new uN(this.model,this.services)],growth:ct.STRETCH,renderType:et.SVG}],r=[new ae(this.model,this.services,n,{direction:At.COLUMN})];return this.getChartComponents(r,{graphFrameRenderType:et.HTML})}}class DU extends hr{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=b(t,"radar","axes"),{number:s,code:a}=b(t,"locale"),o=b(n,"0","data").map(u=>u[r]),l=["Group",...o],c=[...n.map(u=>[u.name,...o.map((d,h)=>b(u,"data",h,i)!==null?s(b(u,"data",h,i),a):"&ndash;")])];return super.formatTable({headers:l,cells:c})}}class LU extends Ye{constructor(t,n){super(t,n),this.model=new DU(this.services),this.model.setOptions(Pt(Ct.radarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fN(this.model,this.services)];return this.getChartComponents(t)}}class RU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.scatterChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Pn(this.model,this.services),new sn(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class IU extends nn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=["Child","Parent"],r=[];return t.forEach(i=>{this.getChildrenDatums(i,r),r.push([i.name,"&ndash;"])}),super.formatTable({headers:n,cells:r})}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,t.name])})}}class kU extends Ye{constructor(t,n){super(t,n),this.model=new IU(this.services),this.model.setOptions(Pt(Ct.treeChart,n.options)),this.init(t,n)}getComponents(){const t=[new gN(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class PU extends nn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Child","Group","Value"],s=[];return t.forEach(a=>{Array.isArray(a.children)?a.children.forEach(o=>{s.push([o.name,a.name,o.value===null?"&ndash;":n(o.value,r)])}):b(a.name)!==null&&b(a.value)&&s.push(["–",a.name,n(a.value,r)])}),super.formatTable({headers:i,cells:s})}}class NU extends Ye{constructor(t,n){super(t,n),this.model=new PU(this.services),this.model.setOptions(Pt(Ct.treemapChart,n.options)),this.init(t,n)}getComponents(){const t=[new zF(this.model,this.services)];return this.getChartComponents(t)}}class $U extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.simpleBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Gv(this.model,this.services),new ei(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class FU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.stackedAreaChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new yo(this.model,this.services),new Vv(this.model,this.services),new ti(this.model,this.services,{stacked:!0}),new Wv(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new oe(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class UU extends de{constructor(t,n){super(t,n),this.model.setOptions(Pt(Ct.stackedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new yo(this.model,this.services),new zv(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ}),new ei(this.model,this.services)];return this.getAxisChartComponents(t)}}class BU extends nn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:r,wordMapsTo:i}=n.wordCloud,{groupMapsTo:s}=n.data,{code:a,number:o}=b(n,"locale"),l=[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],c=[...t.map(u=>[u[i],u[s],o(u[r],a)])];return super.formatTable({headers:l,cells:c})}}class HU extends Ye{constructor(t,n){super(t,n),this.model=new BU(this.services),this.model.setOptions(Pt(Ct.wordCloudChart,n.options)),this.init(t,n)}getComponents(){const t=[new uU(this.model,this.services),new oe(this.model,this.services,{skeleton:Gt.PIE})];return this.getChartComponents(t)}}W.Alignments=Ht,W.AlluvialChart=fP,W.AreaChart=$P,W.AreaEvent=$c,W.ArrowDirections=Wa,W.AxisEvent=Nc,W.AxisFlavor=is,W.AxisPositions=G,W.AxisTitleOrientations=Ya,W.BarEvent=Hc,W.BoxplotChart=BP,W.BoxplotEvent=Gc,W.BubbleChart=GP,W.BulletChart=WP,W.CalloutDirections=ts,W.CanvasZoomEvent=Pc,W.CartesianOrientations=Bt,W.ChartEvent=Dc,W.ChartTheme=jc,W.ChartTypes=Ee,W.CirclePackChart=gU,W.ColorClassNameTypes=at,W.ColorLegendType=rs,W.ComboChart=mU,W.DividerStatus=Yr,W.DominantBaseline=tn,W.DonutChart=yU,W.ExperimentalChoroplethChart=fU,W.GaugeChart=bU,W.GaugeEvent=Bc,W.GaugeTypes=ar,W.GroupedBarChart=xU,W.HeatmapChart=SU,W.HistogramChart=OU,W.LayoutAlignItems=sr,W.LayoutDirection=At,W.LayoutGrowth=ct,W.LegendItemType=Vt,W.LegendOrientations=Wr,W.LegendPositions=zr,W.LineChart=wU,W.LineEvent=zc,W.LollipopChart=MU,W.MeterChart=CU,W.ModalEvent=Lc,W.ModelEvent=Rc,W.PieChart=Jv,W.PieEvent=Uc,W.Projection=en,W.RadarChart=LU,W.RadarEvent=Wc,W.RenderTypes=et,W.ScaleTypes=J,W.ScatterChart=RU,W.ScatterEvent=Vc,W.SimpleBarChart=$U,W.Skeletons=Gt,W.StackedAreaChart=FU,W.StackedBarChart=UU,W.Statuses=es,W.TextAnchor=Je,W.ThresholdEvent=Xc,W.TickRotations=ns,W.ToolbarControlTypes=_t,W.TooltipEvent=Gr,W.TreeChart=kU,W.TreeEvent=Yc,W.TreeTypes=za,W.TreemapChart=NU,W.TreemapEvent=qc,W.TruncationTypes=De,W.WordCloudChart=HU,W.WordCloudEvent=Fc,W.ZoomBarTypes=Ge,W.ZoomDomainEvent=kc,W.ZoombarEvent=Ic,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});
86
86
  //# sourceMappingURL=bundle.umd.js.map