@carbon/charts 1.23.11 → 1.23.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/{choropleth-i0nOtDVK.mjs → choropleth-CnQNALge.mjs} +7 -6
- package/dist/choropleth-CnQNALge.mjs.map +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/styles.css +4 -1
- package/dist/styles.css.map +1 -1
- package/dist/styles.min.css +1 -1
- package/dist/styles.min.css.map +1 -1
- package/dist/umd/bundle.umd.cjs +2 -2
- package/dist/umd/bundle.umd.cjs.map +1 -1
- package/dist/umd/bundle.umd.js +2 -2
- package/package.json +2 -2
- package/scss/components/_legend.scss +6 -1
- package/styles.css +4 -1
- package/styles.min.css +1 -1
- package/dist/choropleth-i0nOtDVK.mjs.map +0 -1
package/dist/umd/bundle.umd.cjs
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<div class="${fe}--${s}-modal-footer-spacer"></div>
|
|
50
50
|
<button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${i}</button>
|
|
51
51
|
</div>
|
|
52
|
-
</div>`}render(t=!1){const n=this.model.getOptions();if(!this.isEventListenerAdded){const r=I(this.services.domUtils.getHolder()),i=y(n,"style","prefix");this.modal=k.appendOrSelect(r,`div.${fe}--${i}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class ys extends mt{constructor(){super(...arguments),this.type="title",this.renderType=at.HTML}render(t=!1){const n=this.getComponentContainer(),r=y(this.getOptions(),"title"),i=n.selectAll("p.title").data([r]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html(s=>ln(s)),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const s=this;i.on("mouseover",function(a){s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:i,content:i.text()})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){s.services.events.dispatchEvent(T.Tooltip.HIDE)})}i.exit().remove()}truncateTitle(t,n){if(n<=0)return;const r=t.text();if(t.node().getComputedTextLength()>n){t.append("tspan").text("...");const i=k.appendOrSelect(t,"tspan").node().getComputedTextLength(),s=t.text(),a=this.getSubstringIndex(t.node(),0,s.length-1,n-i);t.html(s.substring(0,a-1)).append("tspan").text("...");const o=this;t.on("mouseover",function(l){o.services.events.dispatchEvent(T.Tooltip.SHOW,{event:l,hoveredElement:t,content:r})}).on("mousemove",function(l){o.services.events.dispatchEvent(T.Tooltip.MOVE,{event:l})}).on("mouseout",function(){o.services.events.dispatchEvent(T.Tooltip.HIDE)})}}getMaxTitleWidth(){return k.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,n,r,i){const s=Math.floor((r+n)/2);return t.getSubStringLength(0,s)>i?this.getSubstringIndex(t,n,s,i):t.getSubStringLength(0,s)<i?t.getSubStringLength(0,s+1)>i?s:this.getSubstringIndex(t,s,r,i):s}}var ft=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(ft||{});class gu extends mt{constructor(){super(...arguments),this.type="legend",this.renderType=at.HTML}render(t=!1){const n=this.getOptions(),r=y(n,"legend"),i=y(r,"alignment"),s=y(n,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=Pt.items.status,l=a.some(x=>x.status===o),c=y(r,"order"),u=this.getComponentContainer().classed("center-aligned",i===Gt.CENTER).classed("right-aligned",i===Gt.RIGHT).classed(s,!0).classed("has-deactivated-items",l).attr("role",ft.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");c&&(a=this.sortDataGroups(a,c));const d=u.selectAll("div.legend-item").data(a,x=>x.name),h=d.enter().append("div").attr("class","legend-item");h.merge(u.selectAll("div.legend-item")).classed("active",function(x){return x.status===Pt.items.status.ACTIVE});const f=y(this.getOptions(),"legend","clickable");u.classed("clickable",f&&a.length>1);const p=Pt.checkbox.radius,g=h.append("div").classed("checkbox",!0),m=g.merge(d.select("div.checkbox")).attr("role",ft.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(x,E)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${E}-title`)).attr("aria-checked",({status:x})=>x===Pt.items.status.ACTIVE).attr("width",p*2).attr("height",p*2).attr("class",x=>this.model.getColorClassName({classNameTypes:[lt.BACKGROUND],dataGroupName:x.name,originalClassName:"checkbox"})).style("background",x=>x.status===Pt.items.status.ACTIVE?this.model.getFillColor(x.name)||this.model.getStrokeColor(x.name):null).classed("active",function(x){return x.status===Pt.items.status.ACTIVE});g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(d.select("p"));const v=y(n,"legend","additionalItems");if(v&&a.length){const x=this,E=u.selectAll("div.additional-item").data(v);E.exit().remove();const b=E.enter().append("div").merge(E).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(C,D)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+D}-title`));b.selectAll("*").remove();let S,_=1;b.append("svg").classed("icon",!0).each(function(C){const D=I(this);!S||S!=C.type?(S=C.type,_=1):_++,x.addAdditionalItem(D,C,_)}),b.append("p").merge(b.select("p")),this.truncateLegendText()}d.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,n){if(t.sort((r,i)=>n.indexOf(r.name)-n.indexOf(i.name)),n.length<t.length){const r=t.length-n.length;return t.slice(r).concat(t.slice(0,r))}return t}addAdditionalItem(t,n,r){const{width:i,height:s}=Pt.area;if(n.type===zt.RADIUS?t.style("width",`${s}px`).style("height",`${s}px`):t.style("width",`${i}px`).style("height",`${s}px`),n.type===zt.RADIUS){const{iconData:a,fill:o,stroke:l}=Pt.radius;t.attr("fill","none").selectAll("circle").data(a).enter().append("circle").classed("radius",!0).attr("role",ft.IMG).attr("aria-label","radius").attr("cx",u=>u.cx).attr("cy",u=>u.cy).attr("r",u=>u.r).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l)}else if(n.type===zt.LINE){const a=Pt.line;t.select("line.line").empty()&&t.append("line").classed(`line-${r}`,!0).attr("role",ft.IMG).attr("aria-label","line").attr("x1",0).attr("y1",a.yPosition).attr("x2",i).attr("y2",a.yPosition).style("stroke",n.stroke?n.stroke:a.stroke).style("stroke-width",a.strokeWidth)}else if(n.type===zt.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${r}`,!0).attr("role",ft.IMG).attr("aria-label","area").attr("width",i).attr("height",s).style("fill",r>3&&!n.fill?Pt.area.fill:n.fill).style("stroke",n.stroke);else if(n.type===zt.SIZE){const{iconData:a,fill:o,stroke:l}=Pt.size;t.attr("fill","none").attr("role",ft.IMG).attr("aria-label","size").selectAll("rect").data(a).enter().append("rect").classed("size",!0).attr("width",u=>u.width).attr("height",u=>u.height).attr("y",()=>0).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l).style("stroke-width",1)}else if(n.type===zt.QUARTILE){const{iconData:a}=Pt.quartile;t.selectAll("rect").attr("role",ft.IMG).attr("aria-label","quartile").data(a).enter().append("rect").attr("class",(l,c)=>`quartile-${c===0?"wrapper":"line"}`).attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height)}else if(n.type===zt.ZOOM){const{iconData:a,color:o}=y(Pt,"zoom"),l=t.attr("role",ft.IMG).attr("aria-label","zoom").selectAll("g.icon").data(a).enter();l.append("g").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>n.color?n.color:o),l.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>n.color?n.color:o)}}truncateLegendText(){const t=this.getComponentContainer(),n=y(this.getOptions(),"legend","truncation"),r=y(n,"type"),i=y(n,"threshold"),s=y(n,"numCharacter"),a=t.selectAll("div.legend-item p");a.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),r!==Re.NONE?a.html(function(o){const l=ln(o.name);return l.length>i&&l.length!==s?os(l,r,s):l}):a.html(o=>ln(o.name))}addEventListeners(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=y(r,"legend"),s=y(i,"truncation");n.selectAll("div.legend-item").on("mouseover",function(a){t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:I(this)});const o=I(this);o.select("div.checkbox").classed("hovered",!0);const l=o.datum();l.name.length>s.threshold&&s.numCharacter<l.name.length&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})}).on("mousemove",function(a){I(this).datum().name.length>s.threshold&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("click",function(){t.services.events.dispatchEvent(T.Legend.ITEM_CLICK,{clickedElement:I(this)});const o=I(this).datum();t.model.toggleDataLabel(o.name)}).on("mouseout",function(){const a=I(this);a.select("div.checkbox").classed("hovered",!1),a.datum().name.length>s.threshold&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.HIDE),t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:a})}),n.selectAll("div.legend-item div.checkbox").on("keyup",function(a){a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:I(this)})}),n.selectAll("div.legend-item div.checkbox").on("keydown",function(a,o){a.key&&a.key===" "?(a.preventDefault(),t.model.toggleDataLabel(o.name)):a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:I(this)})}),n.selectAll("g.additional-item").on("mouseover",function(a){const o=I(this),l=o.datum();l.name.length>s.threshold&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})})}}class $m extends mt{constructor(t,n,r){super(t,n,r),this.type="chart-clip",this.renderType=at.SVG,this.chartClipId="chart-clip-id-"+Math.floor(Math.random()*99999999999),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:n}=this.services;if(!n)throw new Error("Service cartesianScales was undefined");const r=n.getMainXScale(),i=n.getMainYScale(),[s,a]=r.range(),[o,l]=i.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=k.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const c=k.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-s>0&&c.attr("x",s).attr("y",l).attr("width",a-s).attr("height",o-l),this.chartClipPath.merge(c).lower()}}class nk extends $m{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(Math.random()*99999999999)}createClipPath(){const t=this.parent,{width:n,height:r}=k.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=k.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=k.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()}}var ti,Bt;(function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"})(Bt||(Bt={}));var Fm=(ti={},ti[Bt.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},ti[Bt.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},ti[Bt.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti[Bt.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti),Um=typeof window<"u"?window:{innerHeight:0,innerWidth:0},co=function(){function e(t){t===void 0&&(t={}),this.positions=Fm,this.positions=Object.assign({},Fm,t)}return e.prototype.getRelativeOffset=function(t){for(var n={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&getComputedStyle(t.offsetParent).position==="static";)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;return n},e.prototype.getAbsoluteOffset=function(t){for(var n=t,r={top:0,left:0};n.offsetParent;){var i=getComputedStyle(n.offsetParent);i.position==="static"&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(r.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(r.left+=parseInt(i.marginLeft,10))),n=n.offsetParent}var s=t.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:s.top-a.top+r.top,left:s.left-a.left+r.left}},e.prototype.findRelative=function(t,n,r){var i=this.getRelativeOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findAbsolute=function(t,n,r){var i=this.getAbsoluteOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findPosition=function(t,n,r,i){i===void 0&&(i=this.getAbsoluteOffset.bind(this));var s=i(t),a=t.getBoundingClientRect();return this.calculatePosition(s,a,n,r)},e.prototype.findPositionAt=function(t,n,r){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},n,r)},e.prototype.getPlacementBox=function(t,n){var r=t.offsetHeight+n.top,i=t.offsetWidth+n.left;return{top:n.top,bottom:r,left:n.left,right:i}},e.prototype.addOffset=function(t,n,r){return n===void 0&&(n=0),r===void 0&&(r=0),Object.assign({},t,{top:t.top+n,left:t.left+r})},e.prototype.setElement=function(t,n){t.style.top=n.top+"px",t.style.left=n.left+"px"},e.prototype.findBestPlacement=function(t,n,r,i,s){var a=this;i===void 0&&(i=this.defaultContainerFunction.bind(this)),s===void 0&&(s=this.findPosition.bind(this));var o=r.map(function(l){var c=s(t,n,l),u=a.getPlacementBox(n,c),d=0,h=0,f=i();u.top<f.top?d=f.top-u.top:u.bottom>f.height&&(d=u.bottom-f.height),u.left<f.left?h=f.left-u.left:u.right>f.width&&(h=u.right-f.width),d&&!h?h=1:h&&!d&&(d=1);var p=n.offsetHeight*n.offsetWidth,g=d*h,m=p-g,v=m/p;return{placement:l,weight:v}});return o.sort(function(l,c){return c.weight-l.weight}),o[0].placement},e.prototype.findBestPlacementAt=function(t,n,r,i){var s=this;i===void 0&&(i=this.defaultContainerFunction.bind(this));var a=function(o,l,c){return s.findPositionAt(t,l,c)};return this.findBestPlacement(null,n,r,i,a)},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Um.innerHeight,width:Um.innerWidth}},e.prototype.calculatePosition=function(t,n,r,i){return this.positions[i]?this.positions[i](t,r,n):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new co;class mu extends mt{constructor(t,n,r){super(t,n,r),this.type="tooltip",this.renderType=at.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new co,this.handleShowTooltip=i=>{const s=i.detail.data||i.detail.items,a=I(i.detail.event.target).datum();let o;const l=this.formatItems(this.getItems(i));i.detail.content?o=`<div class="title-tooltip"><p>${oo(i.detail.content)}</p></div>`:o=oo(this.getTooltipHTML(l));const c=k.appendOrSelect(this.tooltip,"div.content-box");if(y(this.getOptions(),"tooltip","customHTML"))if(i.detail.content){const u=`<div class="title-tooltip"><p>${oo(i.detail.content)}</p></div>`;c.html(u)}else c.html(`<div class="title-tooltip"><p>${oo(this.model.getOptions().tooltip.customHTML(s,o,a))}</p></div>`);else c.html(o);c.selectAll(".datapoint-tooltip").each(function(u,d){const h=l[d];l[d]&&l[d].color&&I(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",h.color)}),this.positionTooltip(i),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=i.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(T.Tooltip.MOVE,t=>{this.lastTriggeredEventType!==T.Toolbar.SHOW_TOOLTIP&&this.tooltip.classed("hidden")===!1&&this.positionTooltip(t)}),this.services.events.addEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(T.Tooltip.MOVE,null),this.services.events.removeEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const n=this.getOptions(),r=y(n,"tooltip","truncation","type"),i=y(n,"tooltip","truncation","threshold"),s=y(n,"tooltip","truncation","numCharacter");return r!==Re.NONE?t.map(a=>{const o=a.labelIcon?12:0;return a.value=this.valueFormatter(a.value,a.label),a.label&&a.label.length+o>i&&(a.label=os(a.label,r,s)),a.value&&a.value.length>i&&(a.value=os(a.value,r,s)),a}):t.map(a=>(a.value=this.valueFormatter(a.value,a.label),a))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(n=>`<li>
|
|
52
|
+
</div>`}render(t=!1){const n=this.model.getOptions();if(!this.isEventListenerAdded){const r=I(this.services.domUtils.getHolder()),i=y(n,"style","prefix");this.modal=k.appendOrSelect(r,`div.${fe}--${i}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class ys extends mt{constructor(){super(...arguments),this.type="title",this.renderType=at.HTML}render(t=!1){const n=this.getComponentContainer(),r=y(this.getOptions(),"title"),i=n.selectAll("p.title").data([r]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html(s=>ln(s)),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const s=this;i.on("mouseover",function(a){s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:i,content:i.text()})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){s.services.events.dispatchEvent(T.Tooltip.HIDE)})}i.exit().remove()}truncateTitle(t,n){if(n<=0)return;const r=t.text();if(t.node().getComputedTextLength()>n){t.append("tspan").text("...");const i=k.appendOrSelect(t,"tspan").node().getComputedTextLength(),s=t.text(),a=this.getSubstringIndex(t.node(),0,s.length-1,n-i);t.html(s.substring(0,a-1)).append("tspan").text("...");const o=this;t.on("mouseover",function(l){o.services.events.dispatchEvent(T.Tooltip.SHOW,{event:l,hoveredElement:t,content:r})}).on("mousemove",function(l){o.services.events.dispatchEvent(T.Tooltip.MOVE,{event:l})}).on("mouseout",function(){o.services.events.dispatchEvent(T.Tooltip.HIDE)})}}getMaxTitleWidth(){return k.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,n,r,i){const s=Math.floor((r+n)/2);return t.getSubStringLength(0,s)>i?this.getSubstringIndex(t,n,s,i):t.getSubStringLength(0,s)<i?t.getSubStringLength(0,s+1)>i?s:this.getSubstringIndex(t,s,r,i):s}}var ft=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(ft||{});class gu extends mt{constructor(){super(...arguments),this.type="legend",this.renderType=at.HTML}render(t=!1){const n=this.getOptions(),r=y(n,"legend"),i=y(r,"alignment"),s=y(n,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=Pt.items.status,l=a.some(x=>x.status===o),c=y(r,"order"),u=this.getComponentContainer().classed("center-aligned",i===Gt.CENTER).classed("right-aligned",i===Gt.RIGHT).classed(s||"horizontal",!0).classed("has-deactivated-items",l).attr("role",ft.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");c&&(a=this.sortDataGroups(a,c));const d=u.selectAll("div.legend-item").data(a,x=>x.name),h=d.enter().append("div").attr("class","legend-item");h.merge(u.selectAll("div.legend-item")).classed("active",function(x){return x.status===Pt.items.status.ACTIVE});const f=y(this.getOptions(),"legend","clickable");u.classed("clickable",f&&a.length>1);const p=Pt.checkbox.radius,g=h.append("div").classed("checkbox",!0),m=g.merge(d.select("div.checkbox")).attr("role",ft.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(x,E)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${E}-title`)).attr("aria-checked",({status:x})=>x===Pt.items.status.ACTIVE).attr("width",p*2).attr("height",p*2).attr("class",x=>this.model.getColorClassName({classNameTypes:[lt.BACKGROUND],dataGroupName:x.name,originalClassName:"checkbox"})).style("background",x=>x.status===Pt.items.status.ACTIVE?this.model.getFillColor(x.name)||this.model.getStrokeColor(x.name):null).classed("active",function(x){return x.status===Pt.items.status.ACTIVE});g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(d.select("p"));const v=y(n,"legend","additionalItems");if(v&&a.length){const x=this,E=u.selectAll("div.additional-item").data(v);E.exit().remove();const b=E.enter().append("div").merge(E).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(C,D)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+D}-title`));b.selectAll("*").remove();let S,_=1;b.append("svg").classed("icon",!0).each(function(C){const D=I(this);!S||S!=C.type?(S=C.type,_=1):_++,x.addAdditionalItem(D,C,_)}),b.append("p").merge(b.select("p")),this.truncateLegendText()}d.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,n){if(t.sort((r,i)=>n.indexOf(r.name)-n.indexOf(i.name)),n.length<t.length){const r=t.length-n.length;return t.slice(r).concat(t.slice(0,r))}return t}addAdditionalItem(t,n,r){const{width:i,height:s}=Pt.area;if(n.type===zt.RADIUS?t.style("width",`${s}px`).style("height",`${s}px`):t.style("width",`${i}px`).style("height",`${s}px`),n.type===zt.RADIUS){const{iconData:a,fill:o,stroke:l}=Pt.radius;t.attr("fill","none").selectAll("circle").data(a).enter().append("circle").classed("radius",!0).attr("role",ft.IMG).attr("aria-label","radius").attr("cx",u=>u.cx).attr("cy",u=>u.cy).attr("r",u=>u.r).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l)}else if(n.type===zt.LINE){const a=Pt.line;t.select("line.line").empty()&&t.append("line").classed(`line-${r}`,!0).attr("role",ft.IMG).attr("aria-label","line").attr("x1",0).attr("y1",a.yPosition).attr("x2",i).attr("y2",a.yPosition).style("stroke",n.stroke?n.stroke:a.stroke).style("stroke-width",a.strokeWidth)}else if(n.type===zt.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${r}`,!0).attr("role",ft.IMG).attr("aria-label","area").attr("width",i).attr("height",s).style("fill",r>3&&!n.fill?Pt.area.fill:n.fill).style("stroke",n.stroke);else if(n.type===zt.SIZE){const{iconData:a,fill:o,stroke:l}=Pt.size;t.attr("fill","none").attr("role",ft.IMG).attr("aria-label","size").selectAll("rect").data(a).enter().append("rect").classed("size",!0).attr("width",u=>u.width).attr("height",u=>u.height).attr("y",()=>0).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l).style("stroke-width",1)}else if(n.type===zt.QUARTILE){const{iconData:a}=Pt.quartile;t.selectAll("rect").attr("role",ft.IMG).attr("aria-label","quartile").data(a).enter().append("rect").attr("class",(l,c)=>`quartile-${c===0?"wrapper":"line"}`).attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height)}else if(n.type===zt.ZOOM){const{iconData:a,color:o}=y(Pt,"zoom"),l=t.attr("role",ft.IMG).attr("aria-label","zoom").selectAll("g.icon").data(a).enter();l.append("g").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>n.color?n.color:o),l.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>n.color?n.color:o)}}truncateLegendText(){const t=this.getComponentContainer(),n=y(this.getOptions(),"legend","truncation"),r=y(n,"type"),i=y(n,"threshold"),s=y(n,"numCharacter"),a=t.selectAll("div.legend-item p");a.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),r!==Re.NONE?a.html(function(o){const l=ln(o.name);return l.length>i&&l.length!==s?os(l,r,s):l}):a.html(o=>ln(o.name))}addEventListeners(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=y(r,"legend"),s=y(i,"truncation");n.selectAll("div.legend-item").on("mouseover",function(a){t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:I(this)});const o=I(this);o.select("div.checkbox").classed("hovered",!0);const l=o.datum();l.name.length>s.threshold&&s.numCharacter<l.name.length&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})}).on("mousemove",function(a){I(this).datum().name.length>s.threshold&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("click",function(){t.services.events.dispatchEvent(T.Legend.ITEM_CLICK,{clickedElement:I(this)});const o=I(this).datum();t.model.toggleDataLabel(o.name)}).on("mouseout",function(){const a=I(this);a.select("div.checkbox").classed("hovered",!1),a.datum().name.length>s.threshold&&s.type!==Re.NONE&&t.services.events.dispatchEvent(T.Tooltip.HIDE),t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:a})}),n.selectAll("div.legend-item div.checkbox").on("keyup",function(a){a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:I(this)})}),n.selectAll("div.legend-item div.checkbox").on("keydown",function(a,o){a.key&&a.key===" "?(a.preventDefault(),t.model.toggleDataLabel(o.name)):a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:I(this)})}),n.selectAll("g.additional-item").on("mouseover",function(a){const o=I(this),l=o.datum();l.name.length>s.threshold&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})})}}class $m extends mt{constructor(t,n,r){super(t,n,r),this.type="chart-clip",this.renderType=at.SVG,this.chartClipId="chart-clip-id-"+Math.floor(Math.random()*99999999999),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:n}=this.services;if(!n)throw new Error("Service cartesianScales was undefined");const r=n.getMainXScale(),i=n.getMainYScale(),[s,a]=r.range(),[o,l]=i.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=k.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const c=k.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-s>0&&c.attr("x",s).attr("y",l).attr("width",a-s).attr("height",o-l),this.chartClipPath.merge(c).lower()}}class nk extends $m{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(Math.random()*99999999999)}createClipPath(){const t=this.parent,{width:n,height:r}=k.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=k.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=k.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()}}var ti,Bt;(function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"})(Bt||(Bt={}));var Fm=(ti={},ti[Bt.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},ti[Bt.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},ti[Bt.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti[Bt.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti),Um=typeof window<"u"?window:{innerHeight:0,innerWidth:0},co=function(){function e(t){t===void 0&&(t={}),this.positions=Fm,this.positions=Object.assign({},Fm,t)}return e.prototype.getRelativeOffset=function(t){for(var n={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&getComputedStyle(t.offsetParent).position==="static";)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;return n},e.prototype.getAbsoluteOffset=function(t){for(var n=t,r={top:0,left:0};n.offsetParent;){var i=getComputedStyle(n.offsetParent);i.position==="static"&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(r.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(r.left+=parseInt(i.marginLeft,10))),n=n.offsetParent}var s=t.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:s.top-a.top+r.top,left:s.left-a.left+r.left}},e.prototype.findRelative=function(t,n,r){var i=this.getRelativeOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findAbsolute=function(t,n,r){var i=this.getAbsoluteOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findPosition=function(t,n,r,i){i===void 0&&(i=this.getAbsoluteOffset.bind(this));var s=i(t),a=t.getBoundingClientRect();return this.calculatePosition(s,a,n,r)},e.prototype.findPositionAt=function(t,n,r){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},n,r)},e.prototype.getPlacementBox=function(t,n){var r=t.offsetHeight+n.top,i=t.offsetWidth+n.left;return{top:n.top,bottom:r,left:n.left,right:i}},e.prototype.addOffset=function(t,n,r){return n===void 0&&(n=0),r===void 0&&(r=0),Object.assign({},t,{top:t.top+n,left:t.left+r})},e.prototype.setElement=function(t,n){t.style.top=n.top+"px",t.style.left=n.left+"px"},e.prototype.findBestPlacement=function(t,n,r,i,s){var a=this;i===void 0&&(i=this.defaultContainerFunction.bind(this)),s===void 0&&(s=this.findPosition.bind(this));var o=r.map(function(l){var c=s(t,n,l),u=a.getPlacementBox(n,c),d=0,h=0,f=i();u.top<f.top?d=f.top-u.top:u.bottom>f.height&&(d=u.bottom-f.height),u.left<f.left?h=f.left-u.left:u.right>f.width&&(h=u.right-f.width),d&&!h?h=1:h&&!d&&(d=1);var p=n.offsetHeight*n.offsetWidth,g=d*h,m=p-g,v=m/p;return{placement:l,weight:v}});return o.sort(function(l,c){return c.weight-l.weight}),o[0].placement},e.prototype.findBestPlacementAt=function(t,n,r,i){var s=this;i===void 0&&(i=this.defaultContainerFunction.bind(this));var a=function(o,l,c){return s.findPositionAt(t,l,c)};return this.findBestPlacement(null,n,r,i,a)},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Um.innerHeight,width:Um.innerWidth}},e.prototype.calculatePosition=function(t,n,r,i){return this.positions[i]?this.positions[i](t,r,n):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new co;class mu extends mt{constructor(t,n,r){super(t,n,r),this.type="tooltip",this.renderType=at.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new co,this.handleShowTooltip=i=>{const s=i.detail.data||i.detail.items,a=I(i.detail.event.target).datum();let o;const l=this.formatItems(this.getItems(i));i.detail.content?o=`<div class="title-tooltip"><p>${oo(i.detail.content)}</p></div>`:o=oo(this.getTooltipHTML(l));const c=k.appendOrSelect(this.tooltip,"div.content-box");if(y(this.getOptions(),"tooltip","customHTML"))if(i.detail.content){const u=`<div class="title-tooltip"><p>${oo(i.detail.content)}</p></div>`;c.html(u)}else c.html(`<div class="title-tooltip"><p>${oo(this.model.getOptions().tooltip.customHTML(s,o,a))}</p></div>`);else c.html(o);c.selectAll(".datapoint-tooltip").each(function(u,d){const h=l[d];l[d]&&l[d].color&&I(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",h.color)}),this.positionTooltip(i),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=i.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(T.Tooltip.MOVE,t=>{this.lastTriggeredEventType!==T.Toolbar.SHOW_TOOLTIP&&this.tooltip.classed("hidden")===!1&&this.positionTooltip(t)}),this.services.events.addEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(T.Tooltip.MOVE,null),this.services.events.removeEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const n=this.getOptions(),r=y(n,"tooltip","truncation","type"),i=y(n,"tooltip","truncation","threshold"),s=y(n,"tooltip","truncation","numCharacter");return r!==Re.NONE?t.map(a=>{const o=a.labelIcon?12:0;return a.value=this.valueFormatter(a.value,a.label),a.label&&a.label.length+o>i&&(a.label=os(a.label,r,s)),a.value&&a.value.length>i&&(a.value=os(a.value,r,s)),a}):t.map(a=>(a.value=this.valueFormatter(a.value,a.label),a))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(n=>`<li>
|
|
53
53
|
<div class="datapoint-tooltip${n.bold?" bold":""}">
|
|
54
54
|
${n.class||n.color?`<div class="tooltip-color ${n.class}"></div>`:""}
|
|
55
55
|
<div class="label">
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">
|
|
71
71
|
<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"/>
|
|
72
72
|
<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"/>
|
|
73
|
-
</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=y(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=y(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,Zr)}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,Zr),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 E2(e,t){const n=gi(this._current,e);return r=>(this._current=n(r),t(this._current))}class dv extends mt{constructor(){super(...arguments),this.type="pie",this.renderType=at.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({ariaLabel:"pie graph"}),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=H_().value(M=>M[a]).sort(y(i,"pie","sortFunction")).padAngle(Lt.padAngle)(o),h=k.appendOrSelect(r,"g.slices").attr("role",ft.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:[lt.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",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",M=>`${M[a]}, ${Zc(M.data[a],o,a)+"%"}`).attrTween("d",function(M){return E2.bind(this)(M,n.arc)}).on("end",()=>{n.isRendering=!1});const{code:g,number:m}=y(i,"locale"),v=i.pie.labels.enabled,x=v?u.filter(M=>M.data[a]>0):[],b=k.appendOrSelect(r,"g.labels").attr("role",ft.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(x,M=>M.data[s]);b.exit().attr("opacity",0).remove();const S=b.enter().append("text").classed("pie-label",!0),_=[];S.merge(b).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 O=l+7,$=(M.endAngle-M.startAngle)/2+M.startAngle,F=$/Math.PI*180,L=this.getComputedTextLength();return M.textOffsetX=L/2,M.textOffsetY=F>90&&F<270?10:0,M.xPosition=(M.textOffsetX+O)*Math.sin($),M.yPosition=(M.textOffsetY+O)*-Math.cos($),M}).attr("transform",function(M,O){const $=x.length,F=(M.endAngle-M.startAngle)*(180/Math.PI);if(O>=$-2&&F<Lt.callout.minSliceDegree){let L,U;return M.index===$-1?(L=M.xPosition+Lt.callout.offsetX+Lt.callout.textMargin+M.textOffsetX,U=M.yPosition-Lt.callout.offsetY,M.direction=es.RIGHT,_.push(M)):(L=M.xPosition-Lt.callout.offsetX-M.textOffsetX-Lt.callout.textMargin,U=M.yPosition-Lt.callout.offsetY,M.direction=es.LEFT,_.push(M)),`translate(${L}, ${U})`}return`translate(${M.xPosition}, ${M.yPosition})`}),this.renderCallouts(_);const C=y(i,"donut")?"donut":"pie",D=y(i,C,"alignment"),{width:B}=k.getSVGElementSize(this.getParent(),{useAttrs:!0}),P=v?Lt.xOffset:0,w=v?Lt.yOffset:0;let H=l+P;D===Gt.CENTER?H=B/2:D===Gt.RIGHT&&(H=B-l-Lt.xOffset);let N=l+w;_.length>0&&(N+=Lt.yOffsetCallout),r.attr("x",H+7).attr("y",N),this.addEventListeners()}renderCallouts(t){const n=k.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",ft.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",ft.GROUP).attr("aria-roledescription","label callout");i.merge(r).datum(function(o){const{xPosition:l,yPosition:c,direction:u}=o;return u===es.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);$D(()=>{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}=k.getSVGElementSize(this.parent,{useAttrs:!0}),r=this.getOptions(),i=Math.min(t,n)/2;return r.pie.labels.enabled?i+Lt.radiusOffset:i}}class x2 extends dv{constructor(){super(...arguments),this.type="donut",this.renderType=at.SVG}render(t=!0){super.render(t);const n=this;if(this.model.isDataEmpty()){this.getComponentContainer({ariaLabel:"donut graph"}).select("g.center").remove();return}const r=k.appendOrSelect(this.getComponentContainer({ariaLabel:"donut graph"}),"g.center"),i=this.getOptions(),s=this.computeRadius(),a=y(i,"donut","center","label");k.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!==""&&k.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=y(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=mh:s=Ee;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}=y(n,"locale");t.text(u(Math.floor(a(o)),c))}}}}const fv="4,10 8,6 12,10",pv="12,6 8,10 4,6";class b2 extends mt{constructor(){super(...arguments),this.type="gauge",this.renderType=at.SVG}getValue(){var r;return((r=this.model.getData().find(i=>i.group==="value"))==null?void 0:r.value)??null}getValueRatio(){return Bp(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 y(t,"gauge","type")===cr.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(y(n,"gauge","deltaArrow","direction")){case qa.UP:return fv;case qa.DOWN:return pv;default:return t>0?fv:pv}}render(t=!0){const n=this.getComponentContainer({ariaLabel:"gauge graph"}).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),k.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:[lt.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",()=>y(this.getOptions(),"color","scale","value")).attr("d",this.arc).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",x=>x),this.drawValueNumber(),this.drawDelta(),f.exit().remove();const g=y(r,"gauge","alignment"),{width:m}=k.getSVGElementSize(this.getParent(),{useAttrs:!0});let v=d;g===Gt.CENTER?v=m/2:g===Gt.RIGHT&&(v=m-d),n.attr("x",v).attr("y",d),this.addEventListeners()}drawValueNumber(){const t=this.getComponentContainer(),n=this.getOptions(),r=y(n,"gauge","type"),i=this.getValue(),s=this.getDelta(),a=this.computeRadius(),o=y(n,"gauge","valueFontSize"),l=y(n,"gauge","deltaFontSize"),c=y(n,"gauge","numberSpacing"),u=y(n,"gauge","showPercentageSymbol");let d=0;r===cr.FULL&&!s?d=l(a):r===cr.SEMI&&s&&(d=-(l(a)+c));const h=k.appendOrSelect(t,"g.gauge-numbers").attr("transform",`translate(0, ${d})`),f=o(a),p=k.appendOrSelect(h,"g.gauge-value-number"),{code:g,number:m}=y(n,"locale"),v=y(n,"gauge","numberFormatter"),x=p.selectAll("text.gauge-value-number").data([i]);x.enter().append("text").attr("class","gauge-value-number").merge(x).style("font-size",`${f}px`).attr("text-anchor","middle").text(B=>{let P;return B!=null?P=Number(B.toFixed(2))%1!==0?B.toFixed(2):B.toFixed():P=0,v?v(P):m(Number(P),g)});const{width:E}=k.getSVGElementSize(k.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}),b=f/2,S=u?"%":"",_=k.appendOrSelect(p,"text.gauge-value-symbol").style("font-size",`${b}px`).attr("x",E/2).text(S),{width:C,height:D}=k.getSVGElementSize(_,{useBBox:!0});_.attr("y",`-${D/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}=y(r,"locale");if(i){const o=this.computeRadius(),l=i?y(r,"gauge","deltaFontSize"):()=>0,c=i?y(r,"gauge","numberFormatter"):()=>null,u=y(r,"gauge","deltaArrow","size"),d=y(r,"gauge","numberSpacing"),h=y(r,"gauge","showPercentageSymbol"),f=k.appendOrSelect(n,"g.gauge-numbers"),p=k.appendOrSelect(f,"g.gauge-delta").attr("transform",`translate(0, ${l(o)+d})`),g=k.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(b=>{let S;return b!=null?S=Number(b.toFixed(2))%1!==0?b.toFixed(2):b.toFixed():S=0,c?`${c(S)}${m}`:`${a(Number(S),s)}${m}`});const{width:v}=k.getSVGElementSize(k.appendOrSelect(n,".gauge-delta-number"),{useBBox:!0}),x=y(r,"gauge","deltaArrow","enabled"),E=p.selectAll("svg.gauge-delta-arrow").data(i!==null&&x?[i]:[]);E.enter().append("svg").merge(E).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 b=I(this);k.appendOrSelect(b,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const S=y(r,"gauge","status");k.appendOrSelect(b,"polygon.gauge-delta-arrow").attr("class",S!==null?`gauge-delta-arrow status--${S}`:"").attr("points",t.getArrow(i))}),E.exit().remove(),g.exit().remove()}else{const o=n.select("g.gauge-delta");o.empty()||o.remove()}}getInnerRadius(){const t=this.computeRadius(),n=y(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=y(t,"gauge","type"),{width:r,height:i}=k.getSVGElementSize(this.parent,{useAttrs:!0});return n===cr.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)}}class gv extends Cu{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=at.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({ariaLabel:"grouped bar graphs",withinChartClip:!0}),a=ts(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",ft.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()===Ht.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:[lt.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}),x=this.services.cartesianScales.getDomainLowerBound(v),E=this.services.cartesianScales.getValueThroughAxisPosition(v,x),b=this.services.cartesianScales.getRangeValue(h),S=this.services.cartesianScales.getDomainValue(h)-p/2,_=S+p;if(!this.isOutsideZoomedDomain(S,_))return se({x0:g,x1:m,y0:E,y1:b},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ft.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=y(t,"bars","width"),r=y(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 S2 extends mt{constructor(){super(...arguments),this.type="heatmap",this.renderType=at.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)}, ${Pn(c.range())})`):c(r)!==void 0&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${Pn(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({ariaLabel:"heatmap",withinChartClip:!0});n.lower();const{cartesianScales:r}=this.services;if(this.matrix=this.model.getMatrix(),n.html(""),y(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=k.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);k.appendOrSelect(i,"line.top").attr("x1",-1).attr("x2",n+1),k.appendOrSelect(i,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",r+1),k.appendOrSelect(i,"line.down").attr("x1",-1).attr("x2",n+1).attr("y1",r).attr("y2",r),k.appendOrSelect(i,"line.right").attr("x1",n).attr("x2",n).attr("y1",-1).attr("y2",r+1)}determineDividerStatus(){const t=y(this.getOptions(),"heatmap","divider","state");return t!==Xr.OFF&&(t===Xr.AUTO&&Rg.minCellDividerDimension<=this.xBandwidth&&Rg.minCellDividerDimension<=this.yBandwidth||t===Xr.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=as(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 _2 extends mt{constructor(){super(...arguments),this.type="histogram",this.renderType=at.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({ariaLabel:"histogram bars"}),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",ft.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:[lt.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()===Ht.VERTICAL?m+=1:m-=1),se({x0:f,x1:p,y0:g,y1:m},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>y(u,"data",u[s])),this.addEventListeners()}addEventListeners(){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,{code:r,number:i}=y(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:[lt.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 T2 extends cn{constructor(){super(...arguments),this.type="lollipop",this.renderType=at.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]?On.weight.unselected:On.weight.selected)},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",On.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?On.opacity.unselected:On.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",On.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({ariaLabel:"lines",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]=Mn(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:[lt.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===Ht.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 O2 extends mt{constructor(){super(...arguments),this.type="meter",this.renderType=at.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({ariaLabel:"meter lines"}),i=this.getOptions(),s=y(i,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:l}=k.getSVGElementSize(r,{useAttrs:!0}),{groupMapsTo:c}=i.data;let u;if(y(i,"meter","proportional")===null)u=100;else{const E=y(i,"meter","proportional","total");u=E||this.model.getMaximumDomain(this.model.getDisplayData())}const d=Ge().domain([0,u]).range([0,l]),h=this.getStackedBounds(a,d),f=y(i,"meter","height");k.appendOrSelect(r,"rect.container").attr("x",0).attr("y",0).attr("width",l).attr("height",f||(s?jt.height.proportional:jt.height.default)),k.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",E=>E.x).attr("y",0).attr("height",()=>f||(s?jt.height.proportional:jt.height.default)).attr("class",E=>this.model.getColorClassName({classNameTypes:[lt.FILL],dataGroupName:E[c],originalClassName:g})).transition().call(E=>this.services.transitions.setupTransition({transition:E,name:"meter-bar-update",animate:t})).attr("width",E=>E.value>u?d(u):Math.max(E.width,2)).style("fill",E=>n.model.getFillColor(E[c],null,E)).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",E=>E.value),p.exit().remove();const m=y(i,"meter","peak");let v=m;m!==null&&(m>u?v=u:m<0&&(v=0));const x=r.selectAll("line.peak").data(v==null?[]:[v]);x.enter().append("line").classed("peak",!0).merge(x).attr("y1",0).attr("y2",()=>f||(s?jt.height.proportional:jt.height.default)).transition().call(E=>this.services.transitions.setupTransition({transition:E,name:"peak-line-update",animate:t})).attr("x1",E=>d(E)).attr("x2",E=>d(E)).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",E=>E),x.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=y(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 mv(e){const t=w2(vv(e),360);return Gn(t,[0,10])||Gn(t,[350,0])?{textAnchor:rn.START,dominantBaseline:sn.MIDDLE}:Gn(t,[10,80])?{textAnchor:rn.START,dominantBaseline:sn.HANGING}:Gn(t,[80,100])?{textAnchor:rn.MIDDLE,dominantBaseline:sn.HANGING}:Gn(t,[100,170])?{textAnchor:rn.END,dominantBaseline:sn.HANGING}:Gn(t,[170,190])?{textAnchor:rn.END,dominantBaseline:sn.MIDDLE}:Gn(t,[190,260])?{textAnchor:rn.END,dominantBaseline:sn.BASELINE}:Gn(t,[260,280])?{textAnchor:rn.MIDDLE,dominantBaseline:sn.BASELINE}:{textAnchor:rn.START,dominantBaseline:sn.BASELINE}}function w2(e,t){return(e%t+t)%t}function Gn(e,[t,n]){return e>=t&&e<=n}function vv(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 M2(e,t){return t*Math.sin(e-Math.PI/2)}class C2 extends mt{constructor(){super(...arguments),this.type="radar",this.renderType=at.SVG,this.getLabelDimensions=t=>{const n=k.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),r=k.appendOrSelect(n,"text").text(t),{width:i,height:s}=k.getSVGElementSize(r.node(),{useBBox:!0});return n.remove(),{width:i,height:s}},this.normalizeFlatData=t=>{const n=this.getOptions(),{angle:r,value:i}=y(n,"radar","axes"),s=y(n,"data","groupMapsTo"),a=HD(this.uniqueKeys.map(o=>this.uniqueGroups.map(l=>({[r]:o,[s]:l,[i]:null}))));return ct(a,t)},this.normalizeGroupedData=t=>{const n=this.getOptions(),{angle:r,value:i}=y(n,"radar","axes"),s=y(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:ct(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?ur.opacity.unselected:ur.opacity.selected).style("stroke-opacity",r=>r.name!==n.datum().name?ur.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",ur.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({ariaLabel:"radar graph"}),{width:r,height:i}=k.getSVGElementSize(n,{useAttrs:!0}),s=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),l=y(o,"data","groupMapsTo"),c=y(o,"radar","axes","value"),{angle:u,value:d}=y(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:f,yTicksNumber:p,minRange:g,xAxisRectHeight:m}=ur;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 x=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+f),S=(Math.min(r,i)-x)/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=Pn(this.fullDataNormalized.map(A=>A[d])),D=Ge().domain([C>=0?0:C,zn(this.fullDataNormalized.map(A=>A[d]))]).range([g,S]).nice(p),B=D.ticks(p),P=(A,G,V)=>this.model.getFillColor(A,G,V),w=z_().angle(A=>_(A[u])+Math.PI/2).radius(A=>D(A[d])).curve(Lf),H=this.uniqueKeys.map(A=>{const G=this.getLabelDimensions(A).width,V=M2(_(A),S);return G+V}),M={x:zn(H)+h,y:i/2},$=k.appendOrSelect(n,"g.y-axes").attr("role",ft.GROUP).selectAll("path").data(B,A=>A),F=A=>this.uniqueKeys.map(G=>({[u]:G,[d]:A}));$.join(A=>A.append("path").attr("opacity",0).attr("transform",`translate(${M.x}, ${M.y})`).attr("fill","none").call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_enter",animate:t})).attr("opacity",1).attr("d",V=>w(F(V)))),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",V=>w(F(V)))),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_exit",animate:t})).attr("d",V=>w(F(V))).attr("opacity",0).remove())),k.appendOrSelect(n,"g.x-axes").attr("role",ft.GROUP).selectAll("line").data(this.uniqueKeys,A=>A).join(A=>A.append("line").attr("opacity",0).attr("class",G=>`x-axis-${Vr(G)}`).attr("stroke-dasharray","0").attr("x1",G=>Ft(_(G),0,M).x).attr("y1",G=>Ft(_(G),0,M).y).attr("x2",G=>Ft(_(G),0,M).x).attr("y2",G=>Ft(_(G),0,M).y).call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_enter",animate:t})).attr("opacity",1).attr("x1",V=>Ft(_(V),D.range()[0],M).x).attr("y1",V=>Ft(_(V),D.range()[0],M).y).attr("x2",V=>Ft(_(V),D.range()[1],M).x).attr("y2",V=>Ft(_(V),D.range()[1],M).y)),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_update",animate:t})).attr("opacity",1).attr("x1",V=>Ft(_(V),D.range()[0],M).x).attr("y1",V=>Ft(_(V),D.range()[0],M).y).attr("x2",V=>Ft(_(V),D.range()[1],M).x).attr("y2",V=>Ft(_(V),D.range()[1],M).y)),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_exit",animate:t})).attr("opacity",0).remove())),k.appendOrSelect(n,"g.x-labels").attr("role",ft.GROUP).selectAll("text").data(this.uniqueKeys).join(A=>A.append("text").text(G=>G).attr("opacity",0).attr("x",G=>Ft(_(G),D.range()[1]+h,M).x).attr("y",G=>Ft(_(G),D.range()[1]+h,M).y).style("text-anchor",G=>mv(_(G)).textAnchor).style("dominant-baseline",G=>mv(_(G)).dominantBaseline).call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_enter",animate:t})).attr("opacity",1)),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_update",animate:t})).attr("opacity",1).attr("x",V=>Ft(_(V),D.range()[1]+h,M).x).attr("y",V=>Ft(_(V),D.range()[1]+h,M).y).end().finally(()=>{const V=y(o,"radar","alignment"),xt=this.getAlignmentXOffset(V,n,this.getParent());n.attr("x",xt)})),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_exit",animate:t})).attr("opacity",0).remove())),k.appendOrSelect(n,"g.blobs").attr("role",ft.GROUP).selectAll("path").data(this.groupedDataNormalized,A=>A.name).join(A=>A.append("path").attr("class",G=>this.model.getColorClassName({classNameTypes:[lt.FILL,lt.STROKE],dataGroupName:G.name,originalClassName:"blob"})).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-label",G=>G.name).attr("opacity",0).attr("transform",t?()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`:`translate(${M.x}, ${M.y})`).style("fill",G=>P(G.name,null,G.data)).style("fill-opacity",ur.opacity.selected).style("stroke",G=>P(G.name,null,G.data)).call(G=>{const V=G.transition().call(xt=>this.services.transitions.setupTransition({transition:xt,name:"radar_blobs_enter",animate:t}));t&&V.delay(()=>Math.random()*30).attr("transform",`translate(${M.x}, ${M.y})`),V.attr("opacity",1).attr("d",xt=>w(xt.data))}),A=>(A.attr("class",G=>this.model.getColorClassName({classNameTypes:[lt.FILL,lt.STROKE],dataGroupName:G.name,originalClassName:"blob"})).style("fill",G=>P(G.name,null,G.data)).style("stroke",G=>P(G.name,null,G.data)),A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_blobs_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",V=>w(V.data))),A),A=>A.call(G=>{const V=G.transition().call(xt=>this.services.transitions.setupTransition({transition:xt,name:"radar_blobs_exit",animate:t}));t&&V.delay(()=>Math.random()*30).attr("transform",()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`),V.attr("opacity",0).remove()})),k.appendOrSelect(n,"g.dots").attr("role",ft.GROUP).selectAll("circle").data(this.fullDataNormalized.filter(A=>y(A,d)!==null)).join(A=>A.append("circle").attr("role",ft.GRAPHICS_SYMBOL).attr("aria-label",G=>G[c]),A=>A,A=>A.remove()).attr("class",A=>this.model.getColorClassName({classNameTypes:[lt.FILL],dataGroupName:A[l],originalClassName:Vr(A[u])})).attr("cx",A=>Ft(_(A[u]),D(A[d]),M).x).attr("cy",A=>Ft(_(A[u]),D(A[d]),M).y).attr("r",0).attr("opacity",0).style("fill",A=>P(A[l])),k.appendOrSelect(n,"g.x-axes-rect").attr("role",ft.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",D.range()[1]).attr("height",m).style("fill","red").style("fill-opacity",0).attr("transform",A=>`rotate(${vv(_(A))}, ${M.x}, ${M.y})`);const{code:ht,number:W}=y(o,"locale");k.appendOrSelect(n,"g.y-labels").attr("role",ft.GROUP).selectAll("text").data(Fe(B)).join(A=>A.append("text").attr("opacity",0).text(G=>W(G,ht)).attr("x",G=>Ft(-Math.PI/2,D(G),M).x+f).attr("y",G=>Ft(-Math.PI/2,D(G),M).y).style("text-anchor","start").style("dominant-baseline","middle").call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_enter",animate:t})).attr("opacity",1)),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_update",animate:t})).text(V=>V).attr("opacity",1).attr("x",V=>Ft(-Math.PI/2,D(V),M).x+f).attr("y",V=>Ft(-Math.PI/2,D(V),M).y)),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_exit",animate:t})).attr("opacity",0).remove())),this.addEventListeners()}getAlignmentXOffset(t,n,r){const i=k.getSVGElementSize(n,{useBBox:!0}),{width:s}=k.getSVGElementSize(r,{useAttrs:!0});let a=0;return t===Gt.CENTER?a=Math.floor((s-i.width)/2):t===Gt.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}}=y(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-${Vr(i)}`),o=t.parent.selectAll(`.dots circle.${Vr(i)}`),l=t.model.getActiveDataGroupNames(),c=t.getOptions(),{groupMapsTo:u}=c.data,d=y(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",ur.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:[lt.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-${Vr(i)}`),o=t.parent.selectAll(`.dots circle.${Vr(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 yv extends Cu{constructor(){super(...arguments),this.type="simple-bar",this.renderType=at.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({ariaLabel:"bar graphs",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:[lt.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 E=this.services.cartesianScales.getRangeScale().domain()[0];g=this.services.cartesianScales.getRangeValue(Math.max(0,E)),m=this.services.cartesianScales.getRangeValue(c)}const v=Math.abs(m-g);if(v!==0&&v<2&&(h>0&&a===Ht.VERTICAL||h<0&&a===Ht.HORIZONTAL?m=g-2:m=g+2),!this.isOutsideZoomedDomain(f,p))return se({x0:f,x1:p,y0:g,y1:m},a)}).attr("opacity",1).attr("role",ft.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 A2 extends ue{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const n=y(this.getOptions(),"data","loading"),r=!y(this.getOptions(),"grid","x","enabled")&&!y(this.getOptions(),"grid","y","enabled")&&!y(this.getOptions(),"axes","bottom","visible")&&!y(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=k.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=k.appendOrSelect(t,"svg.chart-skeleton.DAII").attr("role","presentation"),k.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class Ev extends mt{constructor(){super(...arguments),this.type="area-stacked",this.renderType=at.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=>y(s,0,i)!==n.datum().name?Tn.opacity.unselected:Tn.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",Tn.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({ariaLabel:"stacked area graphs",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=y(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=>y(p,0,s));this.areaGenerator=Yl().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=>y(p,0,s)).attr("class","area").attr("class",p=>this.model.getColorClassName({classNameTypes:[lt.FILL],dataGroupName:y(p,0,s),originalClassName:"area"})).style("fill",p=>r.model.getFillColor(y(p,0,s),null,p)).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",p=>y(p,0,s)).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"area-update-enter",animate:t})).attr("opacity",Tn.opacity.selected).attr("d",this.areaGenerator)}}class xv extends Cu{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=at.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({ariaLabel:"stacked bar graphs",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=>y(c,0,i));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",ft.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:[lt.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()===Ht.VERTICAL?g+=c[1]===0?2:1:g-=1:m||(this.services.cartesianScales.getOrientation()===Ht.VERTICAL?g+=1:g-=1)}return se({x0:h,x1:f,y0:p,y1:g},this.services.cartesianScales.getOrientation())}}).attr("opacity",1).attr("role",ft.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(y(t,"bars","width"))return t.bars.width;const n=this.services.cartesianScales.getMainXScale(),r=k.getSVGElementSize(this.parent,{useAttrs:!0}).width,i=this.model.getStackKeys().length,s=y(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 bv extends cn{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=at.SVG}render(t){if(!y(this.getOptions(),"points","enabled"))return;const r=this.getComponentContainer({ariaLabel:"scatter points",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=>y(f,0,s));l.exit().attr("opacity",0).remove();const u=l.enter().append("g").classed("dots",!0).attr("role",ft.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 bs=6;class D2 extends mt{constructor(){super(...arguments),this.type="tree",this.renderType=at.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}=k.getSVGElementSize(r.node(),{useBBox:!0});return r.remove(),i}render(t=!0){const n=this.getComponentContainer({ariaLabel:"tree diagram"});n.html("");const{width:r,height:i}=k.getSVGElementSize(this.parent,{useAttrs:!0});if(r<1||i<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=y(s,"tree","rootTitle")||"Tree",l=this.getMockLabelWidth(n,o),c=this.getLongestLabel(a),u=this.getMockLabelWidth(n,c),d={left:l>0?l+bs:30-bs},h=Li({name:o,children:a}),f=10,p=r/6,g=_=>{const C=h.descendants().reverse(),D=h.links();let B=h,P=h;h.eachBefore(L=>{L.x<B.x&&(B=L),L.x>P.x&&(P=L)});const w=P.x-B.x,H=n.transition().call(L=>this.services.transitions.setupTransition({transition:L,name:"tree-update-viewbox",animate:!0})).attr("viewBox",[-d.left,B.x,r,w].join(" ")),N=S.selectAll("g").data(C,L=>L.id),M=this,O=N.enter().append("g").attr("transform",()=>`translate(${_.y0},${_.x0})`).attr("class",L=>L.depth!==0&&L.children&&L.children.length>0?"clickable":null).on("mouseover",function(L,U){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOVER,{event:L,element:I(this),datum:U})}).on("click",function(L,U){U.depth!==0&&(U.children=U.children?null:U._children,g(U)),M.services.events.dispatchEvent(T.Tree.NODE_CLICK,{event:L,element:I(this),datum:U})}).on("mouseout",function(L,U){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOUT,{event:L,element:I(this),datum:U})});O.append("circle").attr("r",2.5).attr("class",L=>L._children?"parent":"child").attr("stroke-width",10),O.append("text").attr("dy","0.31em").attr("x",L=>L._children?-6:bs).attr("text-anchor",L=>L._children?"end":"start").text(L=>L.data.name).clone(!0).attr("class","text-stroke").lower(),N.merge(O).transition(H).attr("transform",L=>`translate(${L.y},${L.x})`).attr("fill-opacity",1).attr("stroke-opacity",1),N.exit().transition(H).remove().attr("transform",()=>`translate(${_.y},${_.x})`).attr("fill-opacity",0).attr("stroke-opacity",0);const $=b.selectAll("path").data(D,L=>L.target.id),F=$.enter().append("path").attr("d",()=>{const L={x:_.x0,y:_.y0};return E({source:L,target:L})});$.merge(F).transition(H).attr("d",E),$.exit().transition(H).remove().attr("d",()=>{const L={x:_.x,y:_.y};return E({source:L,target:L})}),h.eachBefore(L=>{L.x0=L.x,L.y0=L.y})},m=h.descendants(),v=m[m.length-1].depth,x=y(s,"tree","type")===Ya.DENDROGRAM?hb().size([i,r-u-v*bs-l]):Qb().nodeSize([f,p]).size([i,r-u-v*bs-l]),E=j_().x(_=>_.y).y(_=>_.x);h.x0=p/2,h.y0=0,h.descendants().forEach((_,C)=>{_.id=C,_._children=_.children}),x(h),n.attr("viewBox",[-d.left,-0,r,f]).style("user-select","none");const b=n.append("g").attr("class","links"),S=n.append("g").attr("class","nodes");g(h)}}var L2="#000000",R2="#ffffff",I2="#fcf4d6",k2="#fddc69",P2="#f1c21b",N2="#d2a106",$2="#b28600",F2="#8e6a00",U2="#684e00",B2="#483700",H2="#302400",G2="#1c1500",V2={10:I2,20:k2,30:P2,40:N2,50:$2,60:F2,70:U2,80:B2,90:H2,100:G2},z2="#fff2e8",W2="#ffd9be",Y2="#ffb784",q2="#ff832b",X2="#eb6200",Z2="#ba4e00",j2="#8a3800",K2="#5e2900",Q2="#3e1a00",J2="#231000",tP={10:z2,20:W2,30:Y2,40:q2,50:X2,60:Z2,70:j2,80:K2,90:Q2,100:J2},eP="#fff1f1",nP="#ffd7d9",rP="#ffb3b8",iP="#ff8389",sP="#fa4d56",aP="#da1e28",oP="#a2191f",lP="#750e13",cP="#520408",uP="#2d0709",hP={10:eP,20:nP,30:rP,40:iP,50:sP,60:aP,70:oP,80:lP,90:cP,100:uP},dP="#fff0f7",fP="#ffd6e8",pP="#ffafd2",gP="#ff7eb6",mP="#ee5396",vP="#d02670",yP="#9f1853",EP="#740937",xP="#510224",bP="#2a0a18",SP={10:dP,20:fP,30:pP,40:gP,50:mP,60:vP,70:yP,80:EP,90:xP,100:bP},_P="#f6f2ff",TP="#e8daff",OP="#d4bbff",wP="#be95ff",MP="#a56eff",CP="#8a3ffc",AP="#6929c4",DP="#491d8b",LP="#31135e",RP="#1c0f30",IP={10:_P,20:TP,30:OP,40:wP,50:MP,60:CP,70:AP,80:DP,90:LP,100:RP},kP="#edf5ff",PP="#d0e2ff",NP="#a6c8ff",$P="#78a9ff",FP="#4589ff",UP="#0f62fe",BP="#0043ce",HP="#002d9c",GP="#001d6c",VP="#001141",zP={10:kP,20:PP,30:NP,40:$P,50:FP,60:UP,70:BP,80:HP,90:GP,100:VP},WP="#e5f6ff",YP="#bae6ff",qP="#82cfff",XP="#33b1ff",ZP="#1192e8",jP="#0072c3",KP="#00539a",QP="#003a6d",JP="#012749",tN="#061727",eN={10:WP,20:YP,30:qP,40:XP,50:ZP,60:jP,70:KP,80:QP,90:JP,100:tN},nN="#d9fbfb",rN="#9ef0f0",iN="#3ddbd9",sN="#08bdba",aN="#009d9a",oN="#007d79",lN="#005d5d",cN="#004144",uN="#022b30",hN="#081a1c",dN={10:nN,20:rN,30:iN,40:sN,50:aN,60:oN,70:lN,80:cN,90:uN,100:hN},fN="#defbe6",pN="#a7f0ba",gN="#6fdc8c",mN="#42be65",vN="#24a148",yN="#198038",EN="#0e6027",xN="#044317",bN="#022d0d",SN="#071908",_N={10:fN,20:pN,30:gN,40:mN,50:vN,60:yN,70:EN,80:xN,90:bN,100:SN},TN="#f2f4f8",ON="#dde1e6",wN="#c1c7cd",MN="#a2a9b0",CN="#878d96",AN="#697077",DN="#4d5358",LN="#343a3f",RN="#21272a",IN="#121619",kN={10:TN,20:ON,30:wN,40:MN,50:CN,60:AN,70:DN,80:LN,90:RN,100:IN},PN="#f4f4f4",NN="#e0e0e0",$N="#c6c6c6",FN="#a8a8a8",UN="#8d8d8d",BN="#6f6f6f",HN="#525252",GN="#393939",VN="#262626",zN="#161616",WN={10:PN,20:NN,30:$N,40:FN,50:UN,60:BN,70:HN,80:GN,90:VN,100:zN},YN="#f7f3f2",qN="#e5e0df",XN="#cac5c4",ZN="#ada8a8",jN="#8f8b8b",KN="#726e6e",QN="#565151",JN="#3c3838",t$="#272525",e$="#171414",n$={10:YN,20:qN,30:XN,40:ZN,50:jN,60:KN,70:QN,80:JN,90:t$,100:e$},Sv={black:{100:L2},blue:zP,coolGray:kN,cyan:eN,gray:WN,green:_N,magenta:SP,orange:tP,purple:IP,red:hP,teal:dN,warmGray:n$,white:{0:R2},yellow:V2};const r$=e=>{if(!e)return null;for(const t of Object.keys(Sv)){const n=Sv[t];for(const r of Object.keys(n))if(n[+r]===e)return r}return null},_v=function(e){const t=I(this.parentNode).select("rect.leaf"),n=e.backgroundColor??getComputedStyle(t.node(),null).getPropertyValue("fill"),r=hn(n);let i;if(r&&(i=r$(r?r.hex():null)),i==null){const s=dh(r).l;i=Math.abs(s*100-100)}return i>50?"white":"black"};let i$=0;class s$ extends mt{constructor(){super(...arguments),this.type="treemap",this.renderType=at.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({ariaLabel:"treemap"});this.model.getData();const r=this.model.getDisplayData(),i=this.model.getOptions(),s=y(window,"location"),{width:a,height:o}=k.getSVGElementSize(n,{useAttrs:!0}),l=Li({name:i.title||"Treemap",children:r}).sum(g=>g.value).sort((g,m)=>m.value-g.value),c=rS().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",()=>i$++).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:[lt.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;return[{text:g.data.name,backgroundColor:this.model.getFillColor(m.data.name)}]},g=>g).join(g=>{const m=g.append("text").text(v=>v.text).style("fill",_v).attr("x",7).attr("y",18);return s&&m.attr("clip-path",function(){const v=I(this.parentNode).attr("data-uid"),x=`${i.style.prefix}-clip-${v}`;return`url(${new URL(`#${x}`,s)+""})`}),m},g=>g.text(m=>m.text).style("fill",_v),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),hn(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})})}}function a$(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o$(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var l$={value:function(){}};function Tv(){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 po(n)}function po(e){this._=e}function c$(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}})}po.prototype=Tv.prototype={constructor:po,on:function(e,t){var n=this._,r=c$(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=u$(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]=Ov(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Ov(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 po(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 u$(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Ov(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=l$,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}const h$=o$(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Tv},Symbol.toStringTag,{value:"Module"})));var Au,wv;function d$(){if(wv)return Au;wv=1;const e=h$.dispatch,t=Math.PI/180,n={archimedean:g,rectangular:m},r=64,i=2048;Au=function(){var b=[256,256],S=s,_=a,C=l,D=o,B=o,P=c,w=u,H=g,N=[],M=1/0,O=e("word","end"),$=null,F=Math.random,L={},U=x;L.canvas=function(Y){return arguments.length?(U=E(Y),L):U},L.start=function(){var Y=tt(U()),Q=v((b[0]>>5)*b[1]),ut=null,et=N.length,K=-1,nt=[],ht=N.map(function(j,J){return j.text=S.call(this,j,J),j.font=_.call(this,j,J),j.style=D.call(this,j,J),j.weight=B.call(this,j,J),j.rotate=P.call(this,j,J),j.size=~~C.call(this,j,J),j.padding=w.call(this,j,J),j}).sort(function(j,J){return J.size-j.size});return $&&clearInterval($),$=setInterval(W,0),W(),L;function W(){for(var j=Date.now();Date.now()-j<M&&++K<et&&$;){var J=ht[K];J.x=b[0]*(F()+.5)>>1,J.y=b[1]*(F()+.5)>>1,d(Y,J,ht,K),J.hasText&&X(Q,J,ut)&&(nt.push(J),O.call("word",L,J),ut?f(ut,J):ut=[{x:J.x+J.x0,y:J.y+J.y0},{x:J.x+J.x1,y:J.y+J.y1}],J.x-=b[0]>>1,J.y-=b[1]>>1)}K>=et&&(L.stop(),O.call("end",L,nt,ut))}},L.stop=function(){$&&(clearInterval($),$=null);for(const Y of N)delete Y.sprite;return L};function tt(Y){const Q=Y.getContext("2d",{willReadFrequently:!0});Y.width=Y.height=1;const ut=Math.sqrt(Q.getImageData(0,0,1,1).data.length>>2);return Y.width=(r<<5)/ut,Y.height=i/ut,Q.fillStyle=Q.strokeStyle="red",{context:Q,ratio:ut}}function X(Y,Q,ut){b[0],b[1];for(var et=Q.x,K=Q.y,nt=Math.sqrt(b[0]*b[0]+b[1]*b[1]),ht=H(b),W=F()<.5?1:-1,j=-W,J,A,G;(J=ht(j+=W))&&(A=~~J[0],G=~~J[1],!(Math.min(Math.abs(A),Math.abs(G))>=nt));)if(Q.x=et+A,Q.y=K+G,!(Q.x+Q.x0<0||Q.y+Q.y0<0||Q.x+Q.x1>b[0]||Q.y+Q.y1>b[1])&&(!ut||p(Q,ut))&&!h(Q,Y,b[0])){for(var V=Q.sprite,xt=Q.width>>5,Ut=b[0]>>5,st=Q.x-(xt<<4),_t=st&127,Ne=32-_t,Oe=Q.y1-Q.y0,Ss=(Q.y+Q.y0)*Ut+(st>>5),_s,mr=0;mr<Oe;mr++){_s=0;for(var je=0;je<=xt;je++)Y[Ss+je]|=_s<<Ne|(je<xt?(_s=V[mr*xt+je])>>>_t:0);Ss+=Ut}return!0}return!1}return L.timeInterval=function(Y){return arguments.length?(M=Y??1/0,L):M},L.words=function(Y){return arguments.length?(N=Y,L):N},L.size=function(Y){return arguments.length?(b=[+Y[0],+Y[1]],L):b},L.font=function(Y){return arguments.length?(_=E(Y),L):_},L.fontStyle=function(Y){return arguments.length?(D=E(Y),L):D},L.fontWeight=function(Y){return arguments.length?(B=E(Y),L):B},L.rotate=function(Y){return arguments.length?(P=E(Y),L):P},L.text=function(Y){return arguments.length?(S=E(Y),L):S},L.spiral=function(Y){return arguments.length?(H=n[Y]||Y,L):H},L.fontSize=function(Y){return arguments.length?(C=E(Y),L):C},L.padding=function(Y){return arguments.length?(w=E(Y),L):w},L.random=function(Y){return arguments.length?(F=Y,L):F},L.on=function(){var Y=O.on.apply(O,arguments);return Y===O?L:Y},L};function s(b){return b.text}function a(){return"serif"}function o(){return"normal"}function l(b){return Math.sqrt(b.value)}function c(){return(~~(random()*6)-3)*30}function u(){return 1}function d(b,S,_,C){if(!S.sprite){var D=b.context,B=b.ratio;D.clearRect(0,0,(r<<5)/B,i/B);var P=0,w=0,H=0,N=_.length;for(--C;++C<N;){S=_[C],D.save(),D.font=S.style+" "+S.weight+" "+~~((S.size+1)/B)+"px "+S.font;const J=D.measureText(S.text),A=-Math.floor(J.width/2);let G=(J.width+1)*B,V=S.size<<1;if(S.rotate){var M=Math.sin(S.rotate*t),O=Math.cos(S.rotate*t),$=G*O,F=G*M,L=V*O,U=V*M;G=Math.max(Math.abs($+U),Math.abs($-U))+31>>5<<5,V=~~Math.max(Math.abs(F+L),Math.abs(F-L))}else G=G+31>>5<<5;if(V>H&&(H=V),P+G>=r<<5&&(P=0,w+=H,H=0),w+V>=i)break;D.translate((P+(G>>1))/B,(w+(V>>1))/B),S.rotate&&D.rotate(S.rotate*t),D.fillText(S.text,A,0),S.padding&&(D.lineWidth=2*S.padding,D.strokeText(S.text,A,0)),D.restore(),S.width=G,S.height=V,S.xoff=P,S.yoff=w,S.x1=G>>1,S.y1=V>>1,S.x0=-S.x1,S.y0=-S.y1,S.hasText=!0,P+=G}for(var tt=D.getImageData(0,0,(r<<5)/B,i/B).data,X=[];--C>=0;)if(S=_[C],!!S.hasText){for(var Y=S.width,Q=Y>>5,ut=S.y1-S.y0,et=0;et<ut*Q;et++)X[et]=0;if(P=S.xoff,P==null)return;w=S.yoff;for(var K=0,nt=-1,ht=0;ht<ut;ht++){for(var et=0;et<Y;et++){var W=Q*ht+(et>>5),j=tt[(w+ht)*(r<<5)+(P+et)<<2]?1<<31-et%32:0;X[W]|=j,K|=j}K?nt=ht:(S.y0++,ut--,ht--,w++)}S.y1=S.y0+nt,S.sprite=X.slice(0,(S.y1-S.y0)*Q)}}}function h(b,S,_){_>>=5;for(var C=b.sprite,D=b.width>>5,B=b.x-(D<<4),P=B&127,w=32-P,H=b.y1-b.y0,N=(b.y+b.y0)*_+(B>>5),M,O=0;O<H;O++){M=0;for(var $=0;$<=D;$++)if((M<<w|($<D?(M=C[O*D+$])>>>P:0))&S[N+$])return!0;N+=_}return!1}function f(b,S){var _=b[0],C=b[1];S.x+S.x0<_.x&&(_.x=S.x+S.x0),S.y+S.y0<_.y&&(_.y=S.y+S.y0),S.x+S.x1>C.x&&(C.x=S.x+S.x1),S.y+S.y1>C.y&&(C.y=S.y+S.y1)}function p(b,S){return b.x+b.x1>S[0].x&&b.x+b.x0<S[1].x&&b.y+b.y1>S[0].y&&b.y+b.y0<S[1].y}function g(b){var S=b[0]/b[1];return function(_){return[S*(_*=.1)*Math.cos(_),_*Math.sin(_)]}}function m(b){var S=4,_=S*b[0]/b[1],C=0,D=0;return function(B){var P=B<0?-1:1;switch(Math.sqrt(1+4*P*B)-P&3){case 0:C+=_;break;case 1:D+=S;break;case 2:C-=_;break;default:D-=S;break}return[C,D]}}function v(b){for(var S=[],_=-1;++_<b;)S[_]=0;return S}function x(){return document.createElement("canvas")}function E(b){return typeof b=="function"?b:function(){return b}}return Au}var f$=d$();const p$=a$(f$);class g$ extends mt{constructor(){super(...arguments),this.type="wordcloud",this.renderType=at.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({ariaLabel:"word cloud"}).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}=k.getSVGElementSize(r,{useAttrs:!0});if(u===0||d===0)return;const h=p$().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=k.appendOrSelect(r,"g.words");g.attr("transform",`translate(${h.size()[0]/2}, ${h.size()[1]/2})`);const m=g.selectAll("text").data(p,x=>`${x[c]}-${x.text}`);m.exit().attr("opacity",0).remove(),m.enter().append("text").attr("opacity",0).merge(m).style("font-size",x=>`${x.size}px`).text(function(x){return x.text}).attr("class",x=>n.model.getColorClassName({classNameTypes:[lt.FILL],dataGroupName:x[c],originalClassName:`word ${x.size>32?"light":""}`})).style("fill",x=>n.model.getFillColor(x[c],x.text,x)).attr("text-anchor","middle").transition().call(x=>n.services.transitions.setupTransition({transition:x,name:"wordcloud-text-update-enter",animate:t})).attr("transform",x=>`translate(${x.x}, ${x.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=k.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,o=a?Fe(i):[1,1];return Ge().domain(o).range(a?n.wordCloud.fontSizeRange(s,t):[4,4])}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=Wa(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:[lt.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 m$ extends mt{constructor(){super(...arguments),this.type="geo",this.renderType=at.SVG}render(){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:r}=k.getSVGElementSize(t,{useAttrs:!0});if(n<1||r<1)return;const i=this.getProjection(),s=y(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=p2(s,Object.values(l)),u=h2(s,{type:"GeometryCollection",geometries:Object.values(o)}),d=i.fitSize([n,r],u),h=$x().projection(d);k.appendOrSelect(t,"g.geo").selectAll("path").data(u.features).join("path").attr("d",h);const p=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),g=k.appendOrSelect(t,"defs");k.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=k.appendOrSelect(t,"g.missing-data");k.appendOrSelect(m,"path").datum(c).attr("d",h).style("fill",`url(#${p})`)}getProjection(){let t=null;switch(y(this.getOptions(),"thematic","projection")){case an.geoEqualEarth:t=nb();break;case an.geoAlbers:t=Zx();break;case an.geoConicEqualArea:t=Ld();break;case an.geoConicEquidistant:t=tb();break;case an.geoEquirectangular:t=Qx();break;case an.geoMercator:t=jx();break;case an.geoNaturalEarth1:t=rb();break;default:throw new Error("Projection is not supported.")}return t}}class v$ extends m${constructor(){super(...arguments),this.type="choropleth"}render(t=!0){super.render();const n=this.model.getCombinedData(),r=this.getComponentContainer({ariaLabel:"map",withinChartClip:!0}),i=y(this.getOptions(),"color"),s=y(i,"gradient","colors");r.select("g.geo").selectAll("path").classed("border",!0).attr("class",o=>this.model.getColorClassName({value:n[o.properties.NAME].value,originalClassName:"border"})).attr("style",o=>s?`fill: ${this.model.getColorClassName({value:n[o.properties.NAME].value})}`:null),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(Wr.CHOROPLETH_MOUSEOVER,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(zr.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(Wr.CHOROPLETH_MOUSEMOVE,{event:r,element:I(this),datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(zr.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(Wr.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(Wr.CHOROPLETH_MOUSEOUT,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(zr.HIDE,{event:r,hoveredElement:s})})}}class Mv extends Ze{constructor(t,n){super(t,n),this.model=new o2(this.services),this.model.setOptions(It(At.choroplethChart,n.options)),this.init(t,n)}getChartComponents(t,n){const r=this.model.getOptions(),i=y(r,"toolbar","enabled"),s=!!this.model.getOptions().title,a={id:"title",components:[new ys(this.model,this.services)],growth:dt.STRETCH},o={id:"toolbar",components:[new Jr(this.model,this.services)],growth:dt.PREFERRED},l={id:"header",components:[new ce(this.model,this.services,[a,...i?[o]:[]],{direction:Ct.ROW,alignItems:lr.CENTER})],growth:dt.PREFERRED},c={id:"legend",components:[new hv(this.model,this.services,{chartType:"choropleth"})],growth:dt.PREFERRED,renderType:at.SVG},u={id:"graph-frame",components:t,growth:dt.STRETCH,renderType:at.SVG},d=y(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=Ct.COLUMN_REVERSE,f={id:"spacer",components:[new Ln(this.model,this.services,{size:15})],growth:dt.PREFERRED},p={id:"full-frame",components:[new ce(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:dt.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new Ln(this.model,this.services,i?{size:15}:void 0)],growth:dt.PREFERRED};g.push(m)}return g.push(p),[new mu(this.model,this.services),new lo(this.model,this.services),new ce(this.model,this.services,g,{direction:Ct.COLUMN})]}getComponents(){const t=[new v$(this.model,this.services)];return this.getChartComponents(t)}}class y$ extends on{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=ct({},t,this.getZoomOptions(t));jc(n,r);const i=this.getHierarchyLevel(),s=y(n,"circlePack","depth");this.set({options:ct(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&&y(n,0,"children")?y(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}),y(r,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:zt.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}=y(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(["–",a.name,n(o,r)])}),super.formatTable({headers:i,cells:s})}getChildrenDatums(t,n,r=[],i=0){const s=n,{number:a,code:o}=y(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 E$ extends Ze{constructor(t,n){super(t,n),this.model=new y$(this.services),this.model.setOptions(It(At.circlePackChart,n.options)),this.init(t,n)}getComponents(){const t=[new y2(this.model,this.services)];return this.getChartComponents(t)}}const Cv={[be.LINE]:[ei,cn],[be.SCATTER]:[cn],[be.AREA]:[sv,ei,cn],[be.STACKED_AREA]:[Ev,ei,bv,fo],[be.SIMPLE_BAR]:[yv],[be.GROUPED_BAR]:[gv,ni],[be.STACKED_BAR]:[xv,fo]};class x$ extends ge{constructor(t,n){super(t,n);const r=It(At.comboChart,n.options);n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),r.comboChartTypes=[{type:be.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(Cv).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=`${oC(i.type)}Chart`;return a=ct({},At[l],this.model.getOptions(),i.options),i.type===be.STACKED_AREA&&(o=!0),Cv[i.type].map(c=>new c(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a,stacked:o}))}else return a=ct({},this.model.getOptions(),i.options),new s(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a})}).filter(i=>i!==null);return fc(r)}getComponents(){const{comboChartTypes:t}=this.model.getOptions(),n=t.some(s=>s.type===be.STACKED_BAR||s.type===be.STACKED_AREA),r=[new me(this.model,this.services),new Te(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.GRID}),...n?[]:[new Hn(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(r)}}class b$ extends on{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}=y(n,"locale"),o=["Group","Value"],l=[...t.map(c=>[c[r],c[i]===null?"–":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 Av extends Ze{constructor(t,n,r=!1){super(t,n),this.model=new b$(this.services),!r&&(this.model.setOptions(It(At.pieChart,n.options)),this.init(t,n))}getComponents(){const t=[new dv(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.PIE})];return this.getChartComponents(t)}}class S$ extends Av{constructor(t,n){super(t,n,!0),this.model.setOptions(It(At.donutChart,n.options)),this.init(t,n)}getComponents(){const t=[new x2(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.DONUT})];return this.getChartComponents(t)}}class _$ extends on{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}=y(this.getOptions(),"locale"),a=["Group","Value"],o=[...t.map(l=>[l[r],l.value===null?"–":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}}class T$ extends Ze{constructor(t,n){super(t,n),this.model=new _$(this.services),this.model.setOptions(It(At.gaugeChart,n.options)),this.init(t,n)}getComponents(){const t=[new b2(this.model,this.services)];return this.getChartComponents(t)}}class O$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.groupedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new gv(this.model,this.services),new ni(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class w$ extends pr{constructor(t){super(t),this.axisFlavor=ss.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=y(this.getOptions(),"axes");if(y(n,"left","scaleType")&&y(n,"left","scaleType")!==rt.LABELS||y(n,"right","scaleType")&&y(n,"right","scaleType")!==rt.LABELS||y(n,"top","scaleType")&&y(n,"top","scaleType")!==rt.LABELS||y(n,"bottom","scaleType")&&y(n,"bottom","scaleType")!==rt.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=Fe(this.getDisplayData(),r=>r.value),n=Ge().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(We(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(We(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(We(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]=_n(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(_n(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){We(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}=y(this.getOptions(),"locale"),a=[n.label,r.label,"Value"],o=[...t.map(l=>[l[n.identifier]===null?"–":l[n.identifier],l[r.identifier]===null?"–":l[r.identifier],l.value===null?"–":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=y(t,"color","gradient","colors"),r=!We(n);let i=y(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=Rl().domain(s).range(o);const l=y(this.getOptions(),"color");this._colorScale=cv(this.getDisplayData(),l)}}class M$ extends ge{constructor(t,n){super(t,n),this.model=new w$(this.services),this.model.setOptions(It(At.heatmapChart,n.options)),this.init(t,n)}getAxisChartComponents(t,n){const r=this.model.getOptions(),i=y(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 ys(this.model,this.services)],growth:dt.STRETCH},o={id:"toolbar",components:[new Jr(this.model,this.services)],growth:dt.PREFERRED},l={id:"header",components:[new ce(this.model,this.services,[a,...i?[o]:[]],{direction:Ct.ROW,alignItems:lr.CENTER})],growth:dt.PREFERRED},c={id:"legend",components:[new hv(this.model,this.services,{chartType:"heatmap"})],growth:dt.PREFERRED,renderType:at.SVG},u={id:"graph-frame",components:t,growth:dt.STRETCH,renderType:at.SVG},d=y(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=Ct.COLUMN_REVERSE,f={id:"spacer",components:[new Ln(this.model,this.services,{size:15})],growth:dt.PREFERRED},p={id:"full-frame",components:[new ce(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:dt.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new Ln(this.model,this.services,i?{size:15}:void 0)],growth:dt.PREFERRED};g.push(m)}return g.push(p),[new Xm(this.model,this.services),new lo(this.model,this.services),new ce(this.model,this.services,g,{direction:Ct.COLUMN})]}getComponents(){const t=[new me(this.model,this.services),new S2(this.model,this.services)];return this.getAxisChartComponents(t)}}class C$ extends pr{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,{number:r,code:i}=y(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 A$ extends ge{constructor(t,n){super(t,n),this.model=new C$(this.services),this.model.setOptions(It(At.histogramChart,n.options)),this.init(t,n),this.update()}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new m2(this.model,this.services),new _2(this.model,this.services)];return this.getAxisChartComponents(t)}}class D$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.lineChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new ei(this.model,this.services),new cn(this.model,this.services,{handleThresholds:!0}),new A2(this.model,this.services),new ni(this.model,this.services)];return this.getAxisChartComponents(t)}}class L$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.lollipopChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new T2(this.model,this.services),new cn(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.GRID})];return this.getAxisChartComponents(t)}}class R$ extends on{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((r,i)=>r+i.value,0)}getFillColor(t){const n=this.getOptions(),r=y(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=y(this.getDisplayData()),r=(n==null?void 0:n.reduce((a,o)=>a+o.value,0))??0,i=y(t,"meter","proportional")?r:r>100?100:r,s=y(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=y(n,"meter","proportional"),{number:a,code:o}=y(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?"–":a(d.value,o),...i?[i]:[]]]}else{const d=y(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;const p=Number((h.value/u*100).toFixed(2));return[h[r],h.value===null?"–":a(f,o),a(p,o)+" %"]})]}return super.formatTable({headers:l,cells:c})}}class I$ extends Ze{constructor(t,n){var i;super(t,n),this.model=new R$(this.services);const r=(i=n.options.meter)!=null&&i.proportional?ct(_n(At.proportionalMeterChart),n.options):ct(_n(At.meterChart),n.options);this.model.setOptions(r),this.init(t,n)}getComponents(){const n=[...y(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new v2(this.model,this.services)],growth:dt.STRETCH,renderType:at.SVG},{id:"spacer",components:[new Ln(this.model,this.services,{size:8})],growth:dt.STRETCH}]:[],{id:"meter-graph",components:[new O2(this.model,this.services)],growth:dt.STRETCH,renderType:at.SVG}],r=[new ce(this.model,this.services,n,{direction:Ct.COLUMN})];return this.getChartComponents(r,{graphFrameRenderType:at.HTML})}}class k$ extends pr{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=y(t,"radar","axes"),{number:s,code:a}=y(t,"locale"),o=y(n,"0","data").map(u=>u[r]),l=["Group",...o],c=[...n.map(u=>[u.name,...o.map((d,h)=>y(u,"data",h,i)!==null?s(y(u,"data",h,i),a):"–")])];return super.formatTable({headers:l,cells:c})}}class P$ extends Ze{constructor(t,n){super(t,n),this.model=new k$(this.services),this.model.setOptions(It(At.radarChart,n.options)),this.init(t,n)}getComponents(){const t=[new C2(this.model,this.services)];return this.getChartComponents(t)}}class N$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.scatterChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new cn(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.GRID})];return this.getAxisChartComponents(t)}}class $$ extends on{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,"–"])}),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 F$ extends Ze{constructor(t,n){super(t,n),this.model=new $$(this.services),this.model.setOptions(It(At.treeChart,n.options)),this.init(t,n)}getComponents(){const t=[new D2(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class U$ extends on{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=y(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?"–":n(o.value,r)])}):y(a.name)!==null&&y(a.value)&&s.push(["–",a.name,n(a.value,r)])}),super.formatTable({headers:i,cells:s})}}class B$ extends Ze{constructor(t,n){super(t,n),this.model=new U$(this.services),this.model.setOptions(It(At.treemapChart,n.options)),this.init(t,n)}getComponents(){const t=[new s$(this.model,this.services)];return this.getChartComponents(t)}}class H$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.simpleBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new yv(this.model,this.services),new ni(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class G$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.stackedAreaChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new fo(this.model,this.services),new Ev(this.model,this.services),new ei(this.model,this.services,{stacked:!0}),new bv(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new ue(this.model,this.services,{skeleton:Vt.GRID})];return this.getAxisChartComponents(t)}}class V$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.stackedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new fo(this.model,this.services),new xv(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.VERT_OR_HORIZ}),new ni(this.model,this.services)];return this.getAxisChartComponents(t)}}class z$ extends on{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}=y(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 W$ extends Ze{constructor(t,n){super(t,n),this.model=new z$(this.services),this.model.setOptions(It(At.wordCloudChart,n.options)),this.init(t,n)}getComponents(){const t=[new g$(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.PIE})];return this.getChartComponents(t)}}q.Alignments=Gt,q.AlluvialChart=Ck,q.AreaChart=Qk,q.AreaEvent=Nc,q.ArrowDirections=qa,q.AxisEvent=Pc,q.AxisFlavor=ss,q.AxisPositions=z,q.AxisTitleOrientations=Xa,q.BarEvent=Bc,q.BoxplotChart=e2,q.BoxplotEvent=Hc,q.BubbleChart=r2,q.BulletChart=a2,q.CalloutDirections=es,q.CanvasZoomEvent=kc,q.CartesianOrientations=Ht,q.ChartEvent=Ac,q.ChartTheme=Xc,q.ChartTypes=be,q.ChoroplethChart=Mv,q.CirclePackChart=E$,q.ColorClassNameTypes=lt,q.ColorLegendType=is,q.ComboChart=x$,q.DividerStatus=Xr,q.DominantBaseline=sn,q.DonutChart=S$,q.ExperimentalChoroplethChart=Mv,q.GaugeChart=T$,q.GaugeEvent=Uc,q.GaugeTypes=cr,q.GroupedBarChart=O$,q.HeatmapChart=M$,q.HistogramChart=A$,q.LayoutAlignItems=lr,q.LayoutDirection=Ct,q.LayoutGrowth=dt,q.LegendItemType=zt,q.LegendOrientations=qr,q.LegendPositions=Yr,q.LineChart=D$,q.LineEvent=Vc,q.LollipopChart=L$,q.MeterChart=I$,q.ModalEvent=Dc,q.ModelEvent=Lc,q.PieChart=Av,q.PieEvent=Fc,q.Projection=an,q.RadarChart=P$,q.RadarEvent=zc,q.RenderTypes=at,q.ScaleTypes=rt,q.ScatterChart=N$,q.ScatterEvent=Gc,q.SimpleBarChart=H$,q.Skeletons=Vt,q.StackedAreaChart=G$,q.StackedBarChart=V$,q.Statuses=ns,q.TextAnchor=rn,q.ThresholdEvent=qc,q.TickRotations=rs,q.ToolbarControlTypes=St,q.TooltipEvent=zr,q.TreeChart=F$,q.TreeEvent=Wc,q.TreeTypes=Ya,q.TreemapChart=B$,q.TreemapEvent=Yc,q.TruncationTypes=Re,q.WordCloudChart=W$,q.WordCloudEvent=$c,q.ZoomBarTypes=Ye,q.ZoomDomainEvent=Ic,q.ZoombarEvent=Rc,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
|
|
73
|
+
</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=y(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=y(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,Zr)}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,Zr),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 E2(e,t){const n=gi(this._current,e);return r=>(this._current=n(r),t(this._current))}class dv extends mt{constructor(){super(...arguments),this.type="pie",this.renderType=at.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({ariaLabel:"pie graph"}),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=H_().value(M=>M[a]).sort(y(i,"pie","sortFunction")).padAngle(Lt.padAngle)(o),h=k.appendOrSelect(r,"g.slices").attr("role",ft.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:[lt.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",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",M=>[M[a],Zc(M.data[a],o,a)+"%",M.data[s]].filter(Boolean).join(", ")).attrTween("d",function(M){return E2.bind(this)(M,n.arc)}).on("end",()=>{n.isRendering=!1});const{code:g,number:m}=y(i,"locale"),v=i.pie.labels.enabled,x=v?u.filter(M=>M.data[a]>0):[],b=k.appendOrSelect(r,"g.labels").attr("role",ft.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(x,M=>M.data[s]);b.exit().attr("opacity",0).remove();const S=b.enter().append("text").classed("pie-label",!0),_=[];S.merge(b).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 O=l+7,$=(M.endAngle-M.startAngle)/2+M.startAngle,F=$/Math.PI*180,L=this.getComputedTextLength();return M.textOffsetX=L/2,M.textOffsetY=F>90&&F<270?10:0,M.xPosition=(M.textOffsetX+O)*Math.sin($),M.yPosition=(M.textOffsetY+O)*-Math.cos($),M}).attr("transform",function(M,O){const $=x.length,F=(M.endAngle-M.startAngle)*(180/Math.PI);if(O>=$-2&&F<Lt.callout.minSliceDegree){let L,U;return M.index===$-1?(L=M.xPosition+Lt.callout.offsetX+Lt.callout.textMargin+M.textOffsetX,U=M.yPosition-Lt.callout.offsetY,M.direction=es.RIGHT,_.push(M)):(L=M.xPosition-Lt.callout.offsetX-M.textOffsetX-Lt.callout.textMargin,U=M.yPosition-Lt.callout.offsetY,M.direction=es.LEFT,_.push(M)),`translate(${L}, ${U})`}return`translate(${M.xPosition}, ${M.yPosition})`}),this.renderCallouts(_);const C=y(i,"donut")?"donut":"pie",D=y(i,C,"alignment"),{width:B}=k.getSVGElementSize(this.getParent(),{useAttrs:!0}),P=v?Lt.xOffset:0,w=v?Lt.yOffset:0;let H=l+P;D===Gt.CENTER?H=B/2:D===Gt.RIGHT&&(H=B-l-Lt.xOffset);let N=l+w;_.length>0&&(N+=Lt.yOffsetCallout),r.attr("x",H+7).attr("y",N),this.addEventListeners()}renderCallouts(t){const n=k.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",ft.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",ft.GROUP).attr("aria-roledescription","label callout");i.merge(r).datum(function(o){const{xPosition:l,yPosition:c,direction:u}=o;return u===es.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);$D(()=>{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}=k.getSVGElementSize(this.parent,{useAttrs:!0}),r=this.getOptions(),i=Math.min(t,n)/2;return r.pie.labels.enabled?i+Lt.radiusOffset:i}}class x2 extends dv{constructor(){super(...arguments),this.type="donut",this.renderType=at.SVG}render(t=!0){super.render(t);const n=this;if(this.model.isDataEmpty()){this.getComponentContainer({ariaLabel:"donut graph"}).select("g.center").remove();return}const r=k.appendOrSelect(this.getComponentContainer({ariaLabel:"donut graph"}),"g.center"),i=this.getOptions(),s=this.computeRadius(),a=y(i,"donut","center","label");k.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!==""&&k.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=y(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=mh:s=Ee;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}=y(n,"locale");t.text(u(Math.floor(a(o)),c))}}}}const fv="4,10 8,6 12,10",pv="12,6 8,10 4,6";class b2 extends mt{constructor(){super(...arguments),this.type="gauge",this.renderType=at.SVG}getValue(){var r;return((r=this.model.getData().find(i=>i.group==="value"))==null?void 0:r.value)??null}getValueRatio(){return Bp(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 y(t,"gauge","type")===cr.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(y(n,"gauge","deltaArrow","direction")){case qa.UP:return fv;case qa.DOWN:return pv;default:return t>0?fv:pv}}render(t=!0){const n=this.getComponentContainer({ariaLabel:"gauge graph"}).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),k.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:[lt.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",()=>y(this.getOptions(),"color","scale","value")).attr("d",this.arc).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",x=>x),this.drawValueNumber(),this.drawDelta(),f.exit().remove();const g=y(r,"gauge","alignment"),{width:m}=k.getSVGElementSize(this.getParent(),{useAttrs:!0});let v=d;g===Gt.CENTER?v=m/2:g===Gt.RIGHT&&(v=m-d),n.attr("x",v).attr("y",d),this.addEventListeners()}drawValueNumber(){const t=this.getComponentContainer(),n=this.getOptions(),r=y(n,"gauge","type"),i=this.getValue(),s=this.getDelta(),a=this.computeRadius(),o=y(n,"gauge","valueFontSize"),l=y(n,"gauge","deltaFontSize"),c=y(n,"gauge","numberSpacing"),u=y(n,"gauge","showPercentageSymbol");let d=0;r===cr.FULL&&!s?d=l(a):r===cr.SEMI&&s&&(d=-(l(a)+c));const h=k.appendOrSelect(t,"g.gauge-numbers").attr("transform",`translate(0, ${d})`),f=o(a),p=k.appendOrSelect(h,"g.gauge-value-number"),{code:g,number:m}=y(n,"locale"),v=y(n,"gauge","numberFormatter"),x=p.selectAll("text.gauge-value-number").data([i]);x.enter().append("text").attr("class","gauge-value-number").merge(x).style("font-size",`${f}px`).attr("text-anchor","middle").text(B=>{let P;return B!=null?P=Number(B.toFixed(2))%1!==0?B.toFixed(2):B.toFixed():P=0,v?v(P):m(Number(P),g)});const{width:E}=k.getSVGElementSize(k.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}),b=f/2,S=u?"%":"",_=k.appendOrSelect(p,"text.gauge-value-symbol").style("font-size",`${b}px`).attr("x",E/2).text(S),{width:C,height:D}=k.getSVGElementSize(_,{useBBox:!0});_.attr("y",`-${D/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}=y(r,"locale");if(i){const o=this.computeRadius(),l=i?y(r,"gauge","deltaFontSize"):()=>0,c=i?y(r,"gauge","numberFormatter"):()=>null,u=y(r,"gauge","deltaArrow","size"),d=y(r,"gauge","numberSpacing"),h=y(r,"gauge","showPercentageSymbol"),f=k.appendOrSelect(n,"g.gauge-numbers"),p=k.appendOrSelect(f,"g.gauge-delta").attr("transform",`translate(0, ${l(o)+d})`),g=k.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(b=>{let S;return b!=null?S=Number(b.toFixed(2))%1!==0?b.toFixed(2):b.toFixed():S=0,c?`${c(S)}${m}`:`${a(Number(S),s)}${m}`});const{width:v}=k.getSVGElementSize(k.appendOrSelect(n,".gauge-delta-number"),{useBBox:!0}),x=y(r,"gauge","deltaArrow","enabled"),E=p.selectAll("svg.gauge-delta-arrow").data(i!==null&&x?[i]:[]);E.enter().append("svg").merge(E).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 b=I(this);k.appendOrSelect(b,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const S=y(r,"gauge","status");k.appendOrSelect(b,"polygon.gauge-delta-arrow").attr("class",S!==null?`gauge-delta-arrow status--${S}`:"").attr("points",t.getArrow(i))}),E.exit().remove(),g.exit().remove()}else{const o=n.select("g.gauge-delta");o.empty()||o.remove()}}getInnerRadius(){const t=this.computeRadius(),n=y(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=y(t,"gauge","type"),{width:r,height:i}=k.getSVGElementSize(this.parent,{useAttrs:!0});return n===cr.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)}}class gv extends Cu{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=at.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({ariaLabel:"grouped bar graphs",withinChartClip:!0}),a=ts(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",ft.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()===Ht.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:[lt.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}),x=this.services.cartesianScales.getDomainLowerBound(v),E=this.services.cartesianScales.getValueThroughAxisPosition(v,x),b=this.services.cartesianScales.getRangeValue(h),S=this.services.cartesianScales.getDomainValue(h)-p/2,_=S+p;if(!this.isOutsideZoomedDomain(S,_))return se({x0:g,x1:m,y0:E,y1:b},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ft.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=y(t,"bars","width"),r=y(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 S2 extends mt{constructor(){super(...arguments),this.type="heatmap",this.renderType=at.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)}, ${Pn(c.range())})`):c(r)!==void 0&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${Pn(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({ariaLabel:"heatmap",withinChartClip:!0});n.lower();const{cartesianScales:r}=this.services;if(this.matrix=this.model.getMatrix(),n.html(""),y(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=k.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);k.appendOrSelect(i,"line.top").attr("x1",-1).attr("x2",n+1),k.appendOrSelect(i,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",r+1),k.appendOrSelect(i,"line.down").attr("x1",-1).attr("x2",n+1).attr("y1",r).attr("y2",r),k.appendOrSelect(i,"line.right").attr("x1",n).attr("x2",n).attr("y1",-1).attr("y2",r+1)}determineDividerStatus(){const t=y(this.getOptions(),"heatmap","divider","state");return t!==Xr.OFF&&(t===Xr.AUTO&&Rg.minCellDividerDimension<=this.xBandwidth&&Rg.minCellDividerDimension<=this.yBandwidth||t===Xr.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=as(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 _2 extends mt{constructor(){super(...arguments),this.type="histogram",this.renderType=at.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({ariaLabel:"histogram bars"}),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",ft.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:[lt.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()===Ht.VERTICAL?m+=1:m-=1),se({x0:f,x1:p,y0:g,y1:m},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>y(u,"data",u[s])),this.addEventListeners()}addEventListeners(){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,{code:r,number:i}=y(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:[lt.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 T2 extends cn{constructor(){super(...arguments),this.type="lollipop",this.renderType=at.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]?On.weight.unselected:On.weight.selected)},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",On.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?On.opacity.unselected:On.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",On.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({ariaLabel:"lines",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]=Mn(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:[lt.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===Ht.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 O2 extends mt{constructor(){super(...arguments),this.type="meter",this.renderType=at.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({ariaLabel:"meter lines"}),i=this.getOptions(),s=y(i,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:l}=k.getSVGElementSize(r,{useAttrs:!0}),{groupMapsTo:c}=i.data;let u;if(y(i,"meter","proportional")===null)u=100;else{const E=y(i,"meter","proportional","total");u=E||this.model.getMaximumDomain(this.model.getDisplayData())}const d=Ge().domain([0,u]).range([0,l]),h=this.getStackedBounds(a,d),f=y(i,"meter","height");k.appendOrSelect(r,"rect.container").attr("x",0).attr("y",0).attr("width",l).attr("height",f||(s?jt.height.proportional:jt.height.default)),k.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",E=>E.x).attr("y",0).attr("height",()=>f||(s?jt.height.proportional:jt.height.default)).attr("class",E=>this.model.getColorClassName({classNameTypes:[lt.FILL],dataGroupName:E[c],originalClassName:g})).transition().call(E=>this.services.transitions.setupTransition({transition:E,name:"meter-bar-update",animate:t})).attr("width",E=>E.value>u?d(u):Math.max(E.width,2)).style("fill",E=>n.model.getFillColor(E[c],null,E)).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",E=>E.value),p.exit().remove();const m=y(i,"meter","peak");let v=m;m!==null&&(m>u?v=u:m<0&&(v=0));const x=r.selectAll("line.peak").data(v==null?[]:[v]);x.enter().append("line").classed("peak",!0).merge(x).attr("y1",0).attr("y2",()=>f||(s?jt.height.proportional:jt.height.default)).transition().call(E=>this.services.transitions.setupTransition({transition:E,name:"peak-line-update",animate:t})).attr("x1",E=>d(E)).attr("x2",E=>d(E)).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",E=>E),x.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=y(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 mv(e){const t=w2(vv(e),360);return Gn(t,[0,10])||Gn(t,[350,0])?{textAnchor:rn.START,dominantBaseline:sn.MIDDLE}:Gn(t,[10,80])?{textAnchor:rn.START,dominantBaseline:sn.HANGING}:Gn(t,[80,100])?{textAnchor:rn.MIDDLE,dominantBaseline:sn.HANGING}:Gn(t,[100,170])?{textAnchor:rn.END,dominantBaseline:sn.HANGING}:Gn(t,[170,190])?{textAnchor:rn.END,dominantBaseline:sn.MIDDLE}:Gn(t,[190,260])?{textAnchor:rn.END,dominantBaseline:sn.BASELINE}:Gn(t,[260,280])?{textAnchor:rn.MIDDLE,dominantBaseline:sn.BASELINE}:{textAnchor:rn.START,dominantBaseline:sn.BASELINE}}function w2(e,t){return(e%t+t)%t}function Gn(e,[t,n]){return e>=t&&e<=n}function vv(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 M2(e,t){return t*Math.sin(e-Math.PI/2)}class C2 extends mt{constructor(){super(...arguments),this.type="radar",this.renderType=at.SVG,this.getLabelDimensions=t=>{const n=k.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),r=k.appendOrSelect(n,"text").text(t),{width:i,height:s}=k.getSVGElementSize(r.node(),{useBBox:!0});return n.remove(),{width:i,height:s}},this.normalizeFlatData=t=>{const n=this.getOptions(),{angle:r,value:i}=y(n,"radar","axes"),s=y(n,"data","groupMapsTo"),a=HD(this.uniqueKeys.map(o=>this.uniqueGroups.map(l=>({[r]:o,[s]:l,[i]:null}))));return ct(a,t)},this.normalizeGroupedData=t=>{const n=this.getOptions(),{angle:r,value:i}=y(n,"radar","axes"),s=y(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:ct(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?ur.opacity.unselected:ur.opacity.selected).style("stroke-opacity",r=>r.name!==n.datum().name?ur.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",ur.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({ariaLabel:"radar graph"}),{width:r,height:i}=k.getSVGElementSize(n,{useAttrs:!0}),s=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),l=y(o,"data","groupMapsTo"),c=y(o,"radar","axes","value"),{angle:u,value:d}=y(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:f,yTicksNumber:p,minRange:g,xAxisRectHeight:m}=ur;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 x=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+f),S=(Math.min(r,i)-x)/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=Pn(this.fullDataNormalized.map(A=>A[d])),D=Ge().domain([C>=0?0:C,zn(this.fullDataNormalized.map(A=>A[d]))]).range([g,S]).nice(p),B=D.ticks(p),P=(A,G,V)=>this.model.getFillColor(A,G,V),w=z_().angle(A=>_(A[u])+Math.PI/2).radius(A=>D(A[d])).curve(Lf),H=this.uniqueKeys.map(A=>{const G=this.getLabelDimensions(A).width,V=M2(_(A),S);return G+V}),M={x:zn(H)+h,y:i/2},$=k.appendOrSelect(n,"g.y-axes").attr("role",ft.GROUP).selectAll("path").data(B,A=>A),F=A=>this.uniqueKeys.map(G=>({[u]:G,[d]:A}));$.join(A=>A.append("path").attr("opacity",0).attr("transform",`translate(${M.x}, ${M.y})`).attr("fill","none").call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_enter",animate:t})).attr("opacity",1).attr("d",V=>w(F(V)))),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",V=>w(F(V)))),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_exit",animate:t})).attr("d",V=>w(F(V))).attr("opacity",0).remove())),k.appendOrSelect(n,"g.x-axes").attr("role",ft.GROUP).selectAll("line").data(this.uniqueKeys,A=>A).join(A=>A.append("line").attr("opacity",0).attr("class",G=>`x-axis-${Vr(G)}`).attr("stroke-dasharray","0").attr("x1",G=>Ft(_(G),0,M).x).attr("y1",G=>Ft(_(G),0,M).y).attr("x2",G=>Ft(_(G),0,M).x).attr("y2",G=>Ft(_(G),0,M).y).call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_enter",animate:t})).attr("opacity",1).attr("x1",V=>Ft(_(V),D.range()[0],M).x).attr("y1",V=>Ft(_(V),D.range()[0],M).y).attr("x2",V=>Ft(_(V),D.range()[1],M).x).attr("y2",V=>Ft(_(V),D.range()[1],M).y)),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_update",animate:t})).attr("opacity",1).attr("x1",V=>Ft(_(V),D.range()[0],M).x).attr("y1",V=>Ft(_(V),D.range()[0],M).y).attr("x2",V=>Ft(_(V),D.range()[1],M).x).attr("y2",V=>Ft(_(V),D.range()[1],M).y)),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_exit",animate:t})).attr("opacity",0).remove())),k.appendOrSelect(n,"g.x-labels").attr("role",ft.GROUP).selectAll("text").data(this.uniqueKeys).join(A=>A.append("text").text(G=>G).attr("opacity",0).attr("x",G=>Ft(_(G),D.range()[1]+h,M).x).attr("y",G=>Ft(_(G),D.range()[1]+h,M).y).style("text-anchor",G=>mv(_(G)).textAnchor).style("dominant-baseline",G=>mv(_(G)).dominantBaseline).call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_enter",animate:t})).attr("opacity",1)),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_update",animate:t})).attr("opacity",1).attr("x",V=>Ft(_(V),D.range()[1]+h,M).x).attr("y",V=>Ft(_(V),D.range()[1]+h,M).y).end().finally(()=>{const V=y(o,"radar","alignment"),xt=this.getAlignmentXOffset(V,n,this.getParent());n.attr("x",xt)})),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_exit",animate:t})).attr("opacity",0).remove())),k.appendOrSelect(n,"g.blobs").attr("role",ft.GROUP).selectAll("path").data(this.groupedDataNormalized,A=>A.name).join(A=>A.append("path").attr("class",G=>this.model.getColorClassName({classNameTypes:[lt.FILL,lt.STROKE],dataGroupName:G.name,originalClassName:"blob"})).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-label",G=>G.name).attr("opacity",0).attr("transform",t?()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`:`translate(${M.x}, ${M.y})`).style("fill",G=>P(G.name,null,G.data)).style("fill-opacity",ur.opacity.selected).style("stroke",G=>P(G.name,null,G.data)).call(G=>{const V=G.transition().call(xt=>this.services.transitions.setupTransition({transition:xt,name:"radar_blobs_enter",animate:t}));t&&V.delay(()=>Math.random()*30).attr("transform",`translate(${M.x}, ${M.y})`),V.attr("opacity",1).attr("d",xt=>w(xt.data))}),A=>(A.attr("class",G=>this.model.getColorClassName({classNameTypes:[lt.FILL,lt.STROKE],dataGroupName:G.name,originalClassName:"blob"})).style("fill",G=>P(G.name,null,G.data)).style("stroke",G=>P(G.name,null,G.data)),A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_blobs_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",V=>w(V.data))),A),A=>A.call(G=>{const V=G.transition().call(xt=>this.services.transitions.setupTransition({transition:xt,name:"radar_blobs_exit",animate:t}));t&&V.delay(()=>Math.random()*30).attr("transform",()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`),V.attr("opacity",0).remove()})),k.appendOrSelect(n,"g.dots").attr("role",ft.GROUP).selectAll("circle").data(this.fullDataNormalized.filter(A=>y(A,d)!==null)).join(A=>A.append("circle").attr("role",ft.GRAPHICS_SYMBOL).attr("aria-label",G=>G[c]),A=>A,A=>A.remove()).attr("class",A=>this.model.getColorClassName({classNameTypes:[lt.FILL],dataGroupName:A[l],originalClassName:Vr(A[u])})).attr("cx",A=>Ft(_(A[u]),D(A[d]),M).x).attr("cy",A=>Ft(_(A[u]),D(A[d]),M).y).attr("r",0).attr("opacity",0).style("fill",A=>P(A[l])),k.appendOrSelect(n,"g.x-axes-rect").attr("role",ft.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",D.range()[1]).attr("height",m).style("fill","red").style("fill-opacity",0).attr("transform",A=>`rotate(${vv(_(A))}, ${M.x}, ${M.y})`);const{code:ht,number:W}=y(o,"locale");k.appendOrSelect(n,"g.y-labels").attr("role",ft.GROUP).selectAll("text").data(Fe(B)).join(A=>A.append("text").attr("opacity",0).text(G=>W(G,ht)).attr("x",G=>Ft(-Math.PI/2,D(G),M).x+f).attr("y",G=>Ft(-Math.PI/2,D(G),M).y).style("text-anchor","start").style("dominant-baseline","middle").call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_enter",animate:t})).attr("opacity",1)),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_update",animate:t})).text(V=>V).attr("opacity",1).attr("x",V=>Ft(-Math.PI/2,D(V),M).x+f).attr("y",V=>Ft(-Math.PI/2,D(V),M).y)),A=>A.call(G=>G.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_exit",animate:t})).attr("opacity",0).remove())),this.addEventListeners()}getAlignmentXOffset(t,n,r){const i=k.getSVGElementSize(n,{useBBox:!0}),{width:s}=k.getSVGElementSize(r,{useAttrs:!0});let a=0;return t===Gt.CENTER?a=Math.floor((s-i.width)/2):t===Gt.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}}=y(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-${Vr(i)}`),o=t.parent.selectAll(`.dots circle.${Vr(i)}`),l=t.model.getActiveDataGroupNames(),c=t.getOptions(),{groupMapsTo:u}=c.data,d=y(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",ur.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:[lt.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-${Vr(i)}`),o=t.parent.selectAll(`.dots circle.${Vr(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 yv extends Cu{constructor(){super(...arguments),this.type="simple-bar",this.renderType=at.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({ariaLabel:"bar graphs",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:[lt.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 E=this.services.cartesianScales.getRangeScale().domain()[0];g=this.services.cartesianScales.getRangeValue(Math.max(0,E)),m=this.services.cartesianScales.getRangeValue(c)}const v=Math.abs(m-g);if(v!==0&&v<2&&(h>0&&a===Ht.VERTICAL||h<0&&a===Ht.HORIZONTAL?m=g-2:m=g+2),!this.isOutsideZoomedDomain(f,p))return se({x0:f,x1:p,y0:g,y1:m},a)}).attr("opacity",1).attr("role",ft.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 A2 extends ue{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const n=y(this.getOptions(),"data","loading"),r=!y(this.getOptions(),"grid","x","enabled")&&!y(this.getOptions(),"grid","y","enabled")&&!y(this.getOptions(),"axes","bottom","visible")&&!y(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=k.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=k.appendOrSelect(t,"svg.chart-skeleton.DAII").attr("role","presentation"),k.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class Ev extends mt{constructor(){super(...arguments),this.type="area-stacked",this.renderType=at.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=>y(s,0,i)!==n.datum().name?Tn.opacity.unselected:Tn.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",Tn.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({ariaLabel:"stacked area graphs",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=y(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=>y(p,0,s));this.areaGenerator=Yl().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=>y(p,0,s)).attr("class","area").attr("class",p=>this.model.getColorClassName({classNameTypes:[lt.FILL],dataGroupName:y(p,0,s),originalClassName:"area"})).style("fill",p=>r.model.getFillColor(y(p,0,s),null,p)).attr("role",ft.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",p=>y(p,0,s)).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"area-update-enter",animate:t})).attr("opacity",Tn.opacity.selected).attr("d",this.areaGenerator)}}class xv extends Cu{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=at.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({ariaLabel:"stacked bar graphs",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=>y(c,0,i));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",ft.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:[lt.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()===Ht.VERTICAL?g+=c[1]===0?2:1:g-=1:m||(this.services.cartesianScales.getOrientation()===Ht.VERTICAL?g+=1:g-=1)}return se({x0:h,x1:f,y0:p,y1:g},this.services.cartesianScales.getOrientation())}}).attr("opacity",1).attr("role",ft.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(y(t,"bars","width"))return t.bars.width;const n=this.services.cartesianScales.getMainXScale(),r=k.getSVGElementSize(this.parent,{useAttrs:!0}).width,i=this.model.getStackKeys().length,s=y(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 bv extends cn{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=at.SVG}render(t){if(!y(this.getOptions(),"points","enabled"))return;const r=this.getComponentContainer({ariaLabel:"scatter points",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=>y(f,0,s));l.exit().attr("opacity",0).remove();const u=l.enter().append("g").classed("dots",!0).attr("role",ft.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 bs=6;class D2 extends mt{constructor(){super(...arguments),this.type="tree",this.renderType=at.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}=k.getSVGElementSize(r.node(),{useBBox:!0});return r.remove(),i}render(t=!0){const n=this.getComponentContainer({ariaLabel:"tree diagram"});n.html("");const{width:r,height:i}=k.getSVGElementSize(this.parent,{useAttrs:!0});if(r<1||i<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=y(s,"tree","rootTitle")||"Tree",l=this.getMockLabelWidth(n,o),c=this.getLongestLabel(a),u=this.getMockLabelWidth(n,c),d={left:l>0?l+bs:30-bs},h=Li({name:o,children:a}),f=10,p=r/6,g=_=>{const C=h.descendants().reverse(),D=h.links();let B=h,P=h;h.eachBefore(L=>{L.x<B.x&&(B=L),L.x>P.x&&(P=L)});const w=P.x-B.x,H=n.transition().call(L=>this.services.transitions.setupTransition({transition:L,name:"tree-update-viewbox",animate:!0})).attr("viewBox",[-d.left,B.x,r,w].join(" ")),N=S.selectAll("g").data(C,L=>L.id),M=this,O=N.enter().append("g").attr("transform",()=>`translate(${_.y0},${_.x0})`).attr("class",L=>L.depth!==0&&L.children&&L.children.length>0?"clickable":null).on("mouseover",function(L,U){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOVER,{event:L,element:I(this),datum:U})}).on("click",function(L,U){U.depth!==0&&(U.children=U.children?null:U._children,g(U)),M.services.events.dispatchEvent(T.Tree.NODE_CLICK,{event:L,element:I(this),datum:U})}).on("mouseout",function(L,U){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOUT,{event:L,element:I(this),datum:U})});O.append("circle").attr("r",2.5).attr("class",L=>L._children?"parent":"child").attr("stroke-width",10),O.append("text").attr("dy","0.31em").attr("x",L=>L._children?-6:bs).attr("text-anchor",L=>L._children?"end":"start").text(L=>L.data.name).clone(!0).attr("class","text-stroke").lower(),N.merge(O).transition(H).attr("transform",L=>`translate(${L.y},${L.x})`).attr("fill-opacity",1).attr("stroke-opacity",1),N.exit().transition(H).remove().attr("transform",()=>`translate(${_.y},${_.x})`).attr("fill-opacity",0).attr("stroke-opacity",0);const $=b.selectAll("path").data(D,L=>L.target.id),F=$.enter().append("path").attr("d",()=>{const L={x:_.x0,y:_.y0};return E({source:L,target:L})});$.merge(F).transition(H).attr("d",E),$.exit().transition(H).remove().attr("d",()=>{const L={x:_.x,y:_.y};return E({source:L,target:L})}),h.eachBefore(L=>{L.x0=L.x,L.y0=L.y})},m=h.descendants(),v=m[m.length-1].depth,x=y(s,"tree","type")===Ya.DENDROGRAM?hb().size([i,r-u-v*bs-l]):Qb().nodeSize([f,p]).size([i,r-u-v*bs-l]),E=j_().x(_=>_.y).y(_=>_.x);h.x0=p/2,h.y0=0,h.descendants().forEach((_,C)=>{_.id=C,_._children=_.children}),x(h),n.attr("viewBox",[-d.left,-0,r,f]).style("user-select","none");const b=n.append("g").attr("class","links"),S=n.append("g").attr("class","nodes");g(h)}}var L2="#000000",R2="#ffffff",I2="#fcf4d6",k2="#fddc69",P2="#f1c21b",N2="#d2a106",$2="#b28600",F2="#8e6a00",U2="#684e00",B2="#483700",H2="#302400",G2="#1c1500",V2={10:I2,20:k2,30:P2,40:N2,50:$2,60:F2,70:U2,80:B2,90:H2,100:G2},z2="#fff2e8",W2="#ffd9be",Y2="#ffb784",q2="#ff832b",X2="#eb6200",Z2="#ba4e00",j2="#8a3800",K2="#5e2900",Q2="#3e1a00",J2="#231000",tP={10:z2,20:W2,30:Y2,40:q2,50:X2,60:Z2,70:j2,80:K2,90:Q2,100:J2},eP="#fff1f1",nP="#ffd7d9",rP="#ffb3b8",iP="#ff8389",sP="#fa4d56",aP="#da1e28",oP="#a2191f",lP="#750e13",cP="#520408",uP="#2d0709",hP={10:eP,20:nP,30:rP,40:iP,50:sP,60:aP,70:oP,80:lP,90:cP,100:uP},dP="#fff0f7",fP="#ffd6e8",pP="#ffafd2",gP="#ff7eb6",mP="#ee5396",vP="#d02670",yP="#9f1853",EP="#740937",xP="#510224",bP="#2a0a18",SP={10:dP,20:fP,30:pP,40:gP,50:mP,60:vP,70:yP,80:EP,90:xP,100:bP},_P="#f6f2ff",TP="#e8daff",OP="#d4bbff",wP="#be95ff",MP="#a56eff",CP="#8a3ffc",AP="#6929c4",DP="#491d8b",LP="#31135e",RP="#1c0f30",IP={10:_P,20:TP,30:OP,40:wP,50:MP,60:CP,70:AP,80:DP,90:LP,100:RP},kP="#edf5ff",PP="#d0e2ff",NP="#a6c8ff",$P="#78a9ff",FP="#4589ff",UP="#0f62fe",BP="#0043ce",HP="#002d9c",GP="#001d6c",VP="#001141",zP={10:kP,20:PP,30:NP,40:$P,50:FP,60:UP,70:BP,80:HP,90:GP,100:VP},WP="#e5f6ff",YP="#bae6ff",qP="#82cfff",XP="#33b1ff",ZP="#1192e8",jP="#0072c3",KP="#00539a",QP="#003a6d",JP="#012749",tN="#061727",eN={10:WP,20:YP,30:qP,40:XP,50:ZP,60:jP,70:KP,80:QP,90:JP,100:tN},nN="#d9fbfb",rN="#9ef0f0",iN="#3ddbd9",sN="#08bdba",aN="#009d9a",oN="#007d79",lN="#005d5d",cN="#004144",uN="#022b30",hN="#081a1c",dN={10:nN,20:rN,30:iN,40:sN,50:aN,60:oN,70:lN,80:cN,90:uN,100:hN},fN="#defbe6",pN="#a7f0ba",gN="#6fdc8c",mN="#42be65",vN="#24a148",yN="#198038",EN="#0e6027",xN="#044317",bN="#022d0d",SN="#071908",_N={10:fN,20:pN,30:gN,40:mN,50:vN,60:yN,70:EN,80:xN,90:bN,100:SN},TN="#f2f4f8",ON="#dde1e6",wN="#c1c7cd",MN="#a2a9b0",CN="#878d96",AN="#697077",DN="#4d5358",LN="#343a3f",RN="#21272a",IN="#121619",kN={10:TN,20:ON,30:wN,40:MN,50:CN,60:AN,70:DN,80:LN,90:RN,100:IN},PN="#f4f4f4",NN="#e0e0e0",$N="#c6c6c6",FN="#a8a8a8",UN="#8d8d8d",BN="#6f6f6f",HN="#525252",GN="#393939",VN="#262626",zN="#161616",WN={10:PN,20:NN,30:$N,40:FN,50:UN,60:BN,70:HN,80:GN,90:VN,100:zN},YN="#f7f3f2",qN="#e5e0df",XN="#cac5c4",ZN="#ada8a8",jN="#8f8b8b",KN="#726e6e",QN="#565151",JN="#3c3838",t$="#272525",e$="#171414",n$={10:YN,20:qN,30:XN,40:ZN,50:jN,60:KN,70:QN,80:JN,90:t$,100:e$},Sv={black:{100:L2},blue:zP,coolGray:kN,cyan:eN,gray:WN,green:_N,magenta:SP,orange:tP,purple:IP,red:hP,teal:dN,warmGray:n$,white:{0:R2},yellow:V2};const r$=e=>{if(!e)return null;for(const t of Object.keys(Sv)){const n=Sv[t];for(const r of Object.keys(n))if(n[+r]===e)return r}return null},_v=function(e){const t=I(this.parentNode).select("rect.leaf"),n=e.backgroundColor??getComputedStyle(t.node(),null).getPropertyValue("fill"),r=hn(n);let i;if(r&&(i=r$(r?r.hex():null)),i==null){const s=dh(r).l;i=Math.abs(s*100-100)}return i>50?"white":"black"};let i$=0;class s$ extends mt{constructor(){super(...arguments),this.type="treemap",this.renderType=at.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({ariaLabel:"treemap"});this.model.getData();const r=this.model.getDisplayData(),i=this.model.getOptions(),s=y(window,"location"),{width:a,height:o}=k.getSVGElementSize(n,{useAttrs:!0}),l=Li({name:i.title||"Treemap",children:r}).sum(g=>g.value).sort((g,m)=>m.value-g.value),c=rS().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",()=>i$++).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:[lt.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;return[{text:g.data.name,backgroundColor:this.model.getFillColor(m.data.name)}]},g=>g).join(g=>{const m=g.append("text").text(v=>v.text).style("fill",_v).attr("x",7).attr("y",18);return s&&m.attr("clip-path",function(){const v=I(this.parentNode).attr("data-uid"),x=`${i.style.prefix}-clip-${v}`;return`url(${new URL(`#${x}`,s)+""})`}),m},g=>g.text(m=>m.text).style("fill",_v),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),hn(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})})}}function a$(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o$(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var l$={value:function(){}};function Tv(){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 po(n)}function po(e){this._=e}function c$(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}})}po.prototype=Tv.prototype={constructor:po,on:function(e,t){var n=this._,r=c$(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=u$(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]=Ov(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Ov(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 po(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 u$(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Ov(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=l$,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}const h$=o$(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Tv},Symbol.toStringTag,{value:"Module"})));var Au,wv;function d$(){if(wv)return Au;wv=1;const e=h$.dispatch,t=Math.PI/180,n={archimedean:g,rectangular:m},r=64,i=2048;Au=function(){var b=[256,256],S=s,_=a,C=l,D=o,B=o,P=c,w=u,H=g,N=[],M=1/0,O=e("word","end"),$=null,F=Math.random,L={},U=x;L.canvas=function(Y){return arguments.length?(U=E(Y),L):U},L.start=function(){var Y=tt(U()),Q=v((b[0]>>5)*b[1]),ut=null,et=N.length,K=-1,nt=[],ht=N.map(function(j,J){return j.text=S.call(this,j,J),j.font=_.call(this,j,J),j.style=D.call(this,j,J),j.weight=B.call(this,j,J),j.rotate=P.call(this,j,J),j.size=~~C.call(this,j,J),j.padding=w.call(this,j,J),j}).sort(function(j,J){return J.size-j.size});return $&&clearInterval($),$=setInterval(W,0),W(),L;function W(){for(var j=Date.now();Date.now()-j<M&&++K<et&&$;){var J=ht[K];J.x=b[0]*(F()+.5)>>1,J.y=b[1]*(F()+.5)>>1,d(Y,J,ht,K),J.hasText&&X(Q,J,ut)&&(nt.push(J),O.call("word",L,J),ut?f(ut,J):ut=[{x:J.x+J.x0,y:J.y+J.y0},{x:J.x+J.x1,y:J.y+J.y1}],J.x-=b[0]>>1,J.y-=b[1]>>1)}K>=et&&(L.stop(),O.call("end",L,nt,ut))}},L.stop=function(){$&&(clearInterval($),$=null);for(const Y of N)delete Y.sprite;return L};function tt(Y){const Q=Y.getContext("2d",{willReadFrequently:!0});Y.width=Y.height=1;const ut=Math.sqrt(Q.getImageData(0,0,1,1).data.length>>2);return Y.width=(r<<5)/ut,Y.height=i/ut,Q.fillStyle=Q.strokeStyle="red",{context:Q,ratio:ut}}function X(Y,Q,ut){b[0],b[1];for(var et=Q.x,K=Q.y,nt=Math.sqrt(b[0]*b[0]+b[1]*b[1]),ht=H(b),W=F()<.5?1:-1,j=-W,J,A,G;(J=ht(j+=W))&&(A=~~J[0],G=~~J[1],!(Math.min(Math.abs(A),Math.abs(G))>=nt));)if(Q.x=et+A,Q.y=K+G,!(Q.x+Q.x0<0||Q.y+Q.y0<0||Q.x+Q.x1>b[0]||Q.y+Q.y1>b[1])&&(!ut||p(Q,ut))&&!h(Q,Y,b[0])){for(var V=Q.sprite,xt=Q.width>>5,Ut=b[0]>>5,st=Q.x-(xt<<4),_t=st&127,Ne=32-_t,Oe=Q.y1-Q.y0,Ss=(Q.y+Q.y0)*Ut+(st>>5),_s,mr=0;mr<Oe;mr++){_s=0;for(var je=0;je<=xt;je++)Y[Ss+je]|=_s<<Ne|(je<xt?(_s=V[mr*xt+je])>>>_t:0);Ss+=Ut}return!0}return!1}return L.timeInterval=function(Y){return arguments.length?(M=Y??1/0,L):M},L.words=function(Y){return arguments.length?(N=Y,L):N},L.size=function(Y){return arguments.length?(b=[+Y[0],+Y[1]],L):b},L.font=function(Y){return arguments.length?(_=E(Y),L):_},L.fontStyle=function(Y){return arguments.length?(D=E(Y),L):D},L.fontWeight=function(Y){return arguments.length?(B=E(Y),L):B},L.rotate=function(Y){return arguments.length?(P=E(Y),L):P},L.text=function(Y){return arguments.length?(S=E(Y),L):S},L.spiral=function(Y){return arguments.length?(H=n[Y]||Y,L):H},L.fontSize=function(Y){return arguments.length?(C=E(Y),L):C},L.padding=function(Y){return arguments.length?(w=E(Y),L):w},L.random=function(Y){return arguments.length?(F=Y,L):F},L.on=function(){var Y=O.on.apply(O,arguments);return Y===O?L:Y},L};function s(b){return b.text}function a(){return"serif"}function o(){return"normal"}function l(b){return Math.sqrt(b.value)}function c(){return(~~(random()*6)-3)*30}function u(){return 1}function d(b,S,_,C){if(!S.sprite){var D=b.context,B=b.ratio;D.clearRect(0,0,(r<<5)/B,i/B);var P=0,w=0,H=0,N=_.length;for(--C;++C<N;){S=_[C],D.save(),D.font=S.style+" "+S.weight+" "+~~((S.size+1)/B)+"px "+S.font;const J=D.measureText(S.text),A=-Math.floor(J.width/2);let G=(J.width+1)*B,V=S.size<<1;if(S.rotate){var M=Math.sin(S.rotate*t),O=Math.cos(S.rotate*t),$=G*O,F=G*M,L=V*O,U=V*M;G=Math.max(Math.abs($+U),Math.abs($-U))+31>>5<<5,V=~~Math.max(Math.abs(F+L),Math.abs(F-L))}else G=G+31>>5<<5;if(V>H&&(H=V),P+G>=r<<5&&(P=0,w+=H,H=0),w+V>=i)break;D.translate((P+(G>>1))/B,(w+(V>>1))/B),S.rotate&&D.rotate(S.rotate*t),D.fillText(S.text,A,0),S.padding&&(D.lineWidth=2*S.padding,D.strokeText(S.text,A,0)),D.restore(),S.width=G,S.height=V,S.xoff=P,S.yoff=w,S.x1=G>>1,S.y1=V>>1,S.x0=-S.x1,S.y0=-S.y1,S.hasText=!0,P+=G}for(var tt=D.getImageData(0,0,(r<<5)/B,i/B).data,X=[];--C>=0;)if(S=_[C],!!S.hasText){for(var Y=S.width,Q=Y>>5,ut=S.y1-S.y0,et=0;et<ut*Q;et++)X[et]=0;if(P=S.xoff,P==null)return;w=S.yoff;for(var K=0,nt=-1,ht=0;ht<ut;ht++){for(var et=0;et<Y;et++){var W=Q*ht+(et>>5),j=tt[(w+ht)*(r<<5)+(P+et)<<2]?1<<31-et%32:0;X[W]|=j,K|=j}K?nt=ht:(S.y0++,ut--,ht--,w++)}S.y1=S.y0+nt,S.sprite=X.slice(0,(S.y1-S.y0)*Q)}}}function h(b,S,_){_>>=5;for(var C=b.sprite,D=b.width>>5,B=b.x-(D<<4),P=B&127,w=32-P,H=b.y1-b.y0,N=(b.y+b.y0)*_+(B>>5),M,O=0;O<H;O++){M=0;for(var $=0;$<=D;$++)if((M<<w|($<D?(M=C[O*D+$])>>>P:0))&S[N+$])return!0;N+=_}return!1}function f(b,S){var _=b[0],C=b[1];S.x+S.x0<_.x&&(_.x=S.x+S.x0),S.y+S.y0<_.y&&(_.y=S.y+S.y0),S.x+S.x1>C.x&&(C.x=S.x+S.x1),S.y+S.y1>C.y&&(C.y=S.y+S.y1)}function p(b,S){return b.x+b.x1>S[0].x&&b.x+b.x0<S[1].x&&b.y+b.y1>S[0].y&&b.y+b.y0<S[1].y}function g(b){var S=b[0]/b[1];return function(_){return[S*(_*=.1)*Math.cos(_),_*Math.sin(_)]}}function m(b){var S=4,_=S*b[0]/b[1],C=0,D=0;return function(B){var P=B<0?-1:1;switch(Math.sqrt(1+4*P*B)-P&3){case 0:C+=_;break;case 1:D+=S;break;case 2:C-=_;break;default:D-=S;break}return[C,D]}}function v(b){for(var S=[],_=-1;++_<b;)S[_]=0;return S}function x(){return document.createElement("canvas")}function E(b){return typeof b=="function"?b:function(){return b}}return Au}var f$=d$();const p$=a$(f$);class g$ extends mt{constructor(){super(...arguments),this.type="wordcloud",this.renderType=at.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({ariaLabel:"word cloud"}).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}=k.getSVGElementSize(r,{useAttrs:!0});if(u===0||d===0)return;const h=p$().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=k.appendOrSelect(r,"g.words");g.attr("transform",`translate(${h.size()[0]/2}, ${h.size()[1]/2})`);const m=g.selectAll("text").data(p,x=>`${x[c]}-${x.text}`);m.exit().attr("opacity",0).remove(),m.enter().append("text").attr("opacity",0).merge(m).style("font-size",x=>`${x.size}px`).text(function(x){return x.text}).attr("class",x=>n.model.getColorClassName({classNameTypes:[lt.FILL],dataGroupName:x[c],originalClassName:`word ${x.size>32?"light":""}`})).style("fill",x=>n.model.getFillColor(x[c],x.text,x)).attr("text-anchor","middle").transition().call(x=>n.services.transitions.setupTransition({transition:x,name:"wordcloud-text-update-enter",animate:t})).attr("transform",x=>`translate(${x.x}, ${x.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=k.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,o=a?Fe(i):[1,1];return Ge().domain(o).range(a?n.wordCloud.fontSizeRange(s,t):[4,4])}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=Wa(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:[lt.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 m$ extends mt{constructor(){super(...arguments),this.type="geo",this.renderType=at.SVG}render(){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:r}=k.getSVGElementSize(t,{useAttrs:!0});if(n<1||r<1)return;const i=this.getProjection(),s=y(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=p2(s,Object.values(l)),u=h2(s,{type:"GeometryCollection",geometries:Object.values(o)}),d=i.fitSize([n,r],u),h=$x().projection(d);k.appendOrSelect(t,"g.geo").selectAll("path").data(u.features).join("path").attr("d",h);const p=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),g=k.appendOrSelect(t,"defs");k.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=k.appendOrSelect(t,"g.missing-data");k.appendOrSelect(m,"path").datum(c).attr("d",h).style("fill",`url(#${p})`)}getProjection(){let t=null;switch(y(this.getOptions(),"thematic","projection")){case an.geoEqualEarth:t=nb();break;case an.geoAlbers:t=Zx();break;case an.geoConicEqualArea:t=Ld();break;case an.geoConicEquidistant:t=tb();break;case an.geoEquirectangular:t=Qx();break;case an.geoMercator:t=jx();break;case an.geoNaturalEarth1:t=rb();break;default:throw new Error("Projection is not supported.")}return t}}class v$ extends m${constructor(){super(...arguments),this.type="choropleth"}render(t=!0){super.render();const n=this.model.getCombinedData(),r=this.getComponentContainer({ariaLabel:"map",withinChartClip:!0}),i=y(this.getOptions(),"color"),s=y(i,"gradient","colors");r.select("g.geo").selectAll("path").classed("border",!0).attr("class",o=>this.model.getColorClassName({value:n[o.properties.NAME].value,originalClassName:"border"})).attr("style",o=>s?`fill: ${this.model.getColorClassName({value:n[o.properties.NAME].value})}`:null),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(Wr.CHOROPLETH_MOUSEOVER,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(zr.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(Wr.CHOROPLETH_MOUSEMOVE,{event:r,element:I(this),datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(zr.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(Wr.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(Wr.CHOROPLETH_MOUSEOUT,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(zr.HIDE,{event:r,hoveredElement:s})})}}class Mv extends Ze{constructor(t,n){super(t,n),this.model=new o2(this.services),this.model.setOptions(It(At.choroplethChart,n.options)),this.init(t,n)}getChartComponents(t,n){const r=this.model.getOptions(),i=y(r,"toolbar","enabled"),s=!!this.model.getOptions().title,a={id:"title",components:[new ys(this.model,this.services)],growth:dt.STRETCH},o={id:"toolbar",components:[new Jr(this.model,this.services)],growth:dt.PREFERRED},l={id:"header",components:[new ce(this.model,this.services,[a,...i?[o]:[]],{direction:Ct.ROW,alignItems:lr.CENTER})],growth:dt.PREFERRED},c={id:"legend",components:[new hv(this.model,this.services,{chartType:"choropleth"})],growth:dt.PREFERRED,renderType:at.SVG},u={id:"graph-frame",components:t,growth:dt.STRETCH,renderType:at.SVG},d=y(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=Ct.COLUMN_REVERSE,f={id:"spacer",components:[new Ln(this.model,this.services,{size:15})],growth:dt.PREFERRED},p={id:"full-frame",components:[new ce(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:dt.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new Ln(this.model,this.services,i?{size:15}:void 0)],growth:dt.PREFERRED};g.push(m)}return g.push(p),[new mu(this.model,this.services),new lo(this.model,this.services),new ce(this.model,this.services,g,{direction:Ct.COLUMN})]}getComponents(){const t=[new v$(this.model,this.services)];return this.getChartComponents(t)}}class y$ extends on{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=ct({},t,this.getZoomOptions(t));jc(n,r);const i=this.getHierarchyLevel(),s=y(n,"circlePack","depth");this.set({options:ct(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&&y(n,0,"children")?y(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}),y(r,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:zt.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}=y(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(["–",a.name,n(o,r)])}),super.formatTable({headers:i,cells:s})}getChildrenDatums(t,n,r=[],i=0){const s=n,{number:a,code:o}=y(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 E$ extends Ze{constructor(t,n){super(t,n),this.model=new y$(this.services),this.model.setOptions(It(At.circlePackChart,n.options)),this.init(t,n)}getComponents(){const t=[new y2(this.model,this.services)];return this.getChartComponents(t)}}const Cv={[be.LINE]:[ei,cn],[be.SCATTER]:[cn],[be.AREA]:[sv,ei,cn],[be.STACKED_AREA]:[Ev,ei,bv,fo],[be.SIMPLE_BAR]:[yv],[be.GROUPED_BAR]:[gv,ni],[be.STACKED_BAR]:[xv,fo]};class x$ extends ge{constructor(t,n){super(t,n);const r=It(At.comboChart,n.options);n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),r.comboChartTypes=[{type:be.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(Cv).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=`${oC(i.type)}Chart`;return a=ct({},At[l],this.model.getOptions(),i.options),i.type===be.STACKED_AREA&&(o=!0),Cv[i.type].map(c=>new c(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a,stacked:o}))}else return a=ct({},this.model.getOptions(),i.options),new s(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a})}).filter(i=>i!==null);return fc(r)}getComponents(){const{comboChartTypes:t}=this.model.getOptions(),n=t.some(s=>s.type===be.STACKED_BAR||s.type===be.STACKED_AREA),r=[new me(this.model,this.services),new Te(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.GRID}),...n?[]:[new Hn(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(r)}}class b$ extends on{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}=y(n,"locale"),o=["Group","Value"],l=[...t.map(c=>[c[r],c[i]===null?"–":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 Av extends Ze{constructor(t,n,r=!1){super(t,n),this.model=new b$(this.services),!r&&(this.model.setOptions(It(At.pieChart,n.options)),this.init(t,n))}getComponents(){const t=[new dv(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.PIE})];return this.getChartComponents(t)}}class S$ extends Av{constructor(t,n){super(t,n,!0),this.model.setOptions(It(At.donutChart,n.options)),this.init(t,n)}getComponents(){const t=[new x2(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.DONUT})];return this.getChartComponents(t)}}class _$ extends on{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}=y(this.getOptions(),"locale"),a=["Group","Value"],o=[...t.map(l=>[l[r],l.value===null?"–":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}}class T$ extends Ze{constructor(t,n){super(t,n),this.model=new _$(this.services),this.model.setOptions(It(At.gaugeChart,n.options)),this.init(t,n)}getComponents(){const t=[new b2(this.model,this.services)];return this.getChartComponents(t)}}class O$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.groupedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new gv(this.model,this.services),new ni(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class w$ extends pr{constructor(t){super(t),this.axisFlavor=ss.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=y(this.getOptions(),"axes");if(y(n,"left","scaleType")&&y(n,"left","scaleType")!==rt.LABELS||y(n,"right","scaleType")&&y(n,"right","scaleType")!==rt.LABELS||y(n,"top","scaleType")&&y(n,"top","scaleType")!==rt.LABELS||y(n,"bottom","scaleType")&&y(n,"bottom","scaleType")!==rt.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=Fe(this.getDisplayData(),r=>r.value),n=Ge().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(We(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(We(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(We(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]=_n(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(_n(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){We(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}=y(this.getOptions(),"locale"),a=[n.label,r.label,"Value"],o=[...t.map(l=>[l[n.identifier]===null?"–":l[n.identifier],l[r.identifier]===null?"–":l[r.identifier],l.value===null?"–":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=y(t,"color","gradient","colors"),r=!We(n);let i=y(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=Rl().domain(s).range(o);const l=y(this.getOptions(),"color");this._colorScale=cv(this.getDisplayData(),l)}}class M$ extends ge{constructor(t,n){super(t,n),this.model=new w$(this.services),this.model.setOptions(It(At.heatmapChart,n.options)),this.init(t,n)}getAxisChartComponents(t,n){const r=this.model.getOptions(),i=y(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 ys(this.model,this.services)],growth:dt.STRETCH},o={id:"toolbar",components:[new Jr(this.model,this.services)],growth:dt.PREFERRED},l={id:"header",components:[new ce(this.model,this.services,[a,...i?[o]:[]],{direction:Ct.ROW,alignItems:lr.CENTER})],growth:dt.PREFERRED},c={id:"legend",components:[new hv(this.model,this.services,{chartType:"heatmap"})],growth:dt.PREFERRED,renderType:at.SVG},u={id:"graph-frame",components:t,growth:dt.STRETCH,renderType:at.SVG},d=y(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=Ct.COLUMN_REVERSE,f={id:"spacer",components:[new Ln(this.model,this.services,{size:15})],growth:dt.PREFERRED},p={id:"full-frame",components:[new ce(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:dt.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new Ln(this.model,this.services,i?{size:15}:void 0)],growth:dt.PREFERRED};g.push(m)}return g.push(p),[new Xm(this.model,this.services),new lo(this.model,this.services),new ce(this.model,this.services,g,{direction:Ct.COLUMN})]}getComponents(){const t=[new me(this.model,this.services),new S2(this.model,this.services)];return this.getAxisChartComponents(t)}}class C$ extends pr{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,{number:r,code:i}=y(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 A$ extends ge{constructor(t,n){super(t,n),this.model=new C$(this.services),this.model.setOptions(It(At.histogramChart,n.options)),this.init(t,n),this.update()}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new m2(this.model,this.services),new _2(this.model,this.services)];return this.getAxisChartComponents(t)}}class D$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.lineChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new ei(this.model,this.services),new cn(this.model,this.services,{handleThresholds:!0}),new A2(this.model,this.services),new ni(this.model,this.services)];return this.getAxisChartComponents(t)}}class L$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.lollipopChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new T2(this.model,this.services),new cn(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.GRID})];return this.getAxisChartComponents(t)}}class R$ extends on{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((r,i)=>r+i.value,0)}getFillColor(t){const n=this.getOptions(),r=y(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=y(this.getDisplayData()),r=(n==null?void 0:n.reduce((a,o)=>a+o.value,0))??0,i=y(t,"meter","proportional")?r:r>100?100:r,s=y(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=y(n,"meter","proportional"),{number:a,code:o}=y(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?"–":a(d.value,o),...i?[i]:[]]]}else{const d=y(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;const p=Number((h.value/u*100).toFixed(2));return[h[r],h.value===null?"–":a(f,o),a(p,o)+" %"]})]}return super.formatTable({headers:l,cells:c})}}class I$ extends Ze{constructor(t,n){var i;super(t,n),this.model=new R$(this.services);const r=(i=n.options.meter)!=null&&i.proportional?ct(_n(At.proportionalMeterChart),n.options):ct(_n(At.meterChart),n.options);this.model.setOptions(r),this.init(t,n)}getComponents(){const n=[...y(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new v2(this.model,this.services)],growth:dt.STRETCH,renderType:at.SVG},{id:"spacer",components:[new Ln(this.model,this.services,{size:8})],growth:dt.STRETCH}]:[],{id:"meter-graph",components:[new O2(this.model,this.services)],growth:dt.STRETCH,renderType:at.SVG}],r=[new ce(this.model,this.services,n,{direction:Ct.COLUMN})];return this.getChartComponents(r,{graphFrameRenderType:at.HTML})}}class k$ extends pr{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=y(t,"radar","axes"),{number:s,code:a}=y(t,"locale"),o=y(n,"0","data").map(u=>u[r]),l=["Group",...o],c=[...n.map(u=>[u.name,...o.map((d,h)=>y(u,"data",h,i)!==null?s(y(u,"data",h,i),a):"–")])];return super.formatTable({headers:l,cells:c})}}class P$ extends Ze{constructor(t,n){super(t,n),this.model=new k$(this.services),this.model.setOptions(It(At.radarChart,n.options)),this.init(t,n)}getComponents(){const t=[new C2(this.model,this.services)];return this.getChartComponents(t)}}class N$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.scatterChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new cn(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.GRID})];return this.getAxisChartComponents(t)}}class $$ extends on{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,"–"])}),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 F$ extends Ze{constructor(t,n){super(t,n),this.model=new $$(this.services),this.model.setOptions(It(At.treeChart,n.options)),this.init(t,n)}getComponents(){const t=[new D2(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class U$ extends on{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=y(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?"–":n(o.value,r)])}):y(a.name)!==null&&y(a.value)&&s.push(["–",a.name,n(a.value,r)])}),super.formatTable({headers:i,cells:s})}}class B$ extends Ze{constructor(t,n){super(t,n),this.model=new U$(this.services),this.model.setOptions(It(At.treemapChart,n.options)),this.init(t,n)}getComponents(){const t=[new s$(this.model,this.services)];return this.getChartComponents(t)}}class H$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.simpleBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new yv(this.model,this.services),new ni(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class G$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.stackedAreaChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new fo(this.model,this.services),new Ev(this.model,this.services),new ei(this.model,this.services,{stacked:!0}),new bv(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new ue(this.model,this.services,{skeleton:Vt.GRID})];return this.getAxisChartComponents(t)}}class V$ extends ge{constructor(t,n){super(t,n),this.model.setOptions(It(At.stackedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new me(this.model,this.services),new Te(this.model,this.services),new fo(this.model,this.services),new xv(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.VERT_OR_HORIZ}),new ni(this.model,this.services)];return this.getAxisChartComponents(t)}}class z$ extends on{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}=y(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 W$ extends Ze{constructor(t,n){super(t,n),this.model=new z$(this.services),this.model.setOptions(It(At.wordCloudChart,n.options)),this.init(t,n)}getComponents(){const t=[new g$(this.model,this.services),new ue(this.model,this.services,{skeleton:Vt.PIE})];return this.getChartComponents(t)}}q.Alignments=Gt,q.AlluvialChart=Ck,q.AreaChart=Qk,q.AreaEvent=Nc,q.ArrowDirections=qa,q.AxisEvent=Pc,q.AxisFlavor=ss,q.AxisPositions=z,q.AxisTitleOrientations=Xa,q.BarEvent=Bc,q.BoxplotChart=e2,q.BoxplotEvent=Hc,q.BubbleChart=r2,q.BulletChart=a2,q.CalloutDirections=es,q.CanvasZoomEvent=kc,q.CartesianOrientations=Ht,q.ChartEvent=Ac,q.ChartTheme=Xc,q.ChartTypes=be,q.ChoroplethChart=Mv,q.CirclePackChart=E$,q.ColorClassNameTypes=lt,q.ColorLegendType=is,q.ComboChart=x$,q.DividerStatus=Xr,q.DominantBaseline=sn,q.DonutChart=S$,q.ExperimentalChoroplethChart=Mv,q.GaugeChart=T$,q.GaugeEvent=Uc,q.GaugeTypes=cr,q.GroupedBarChart=O$,q.HeatmapChart=M$,q.HistogramChart=A$,q.LayoutAlignItems=lr,q.LayoutDirection=Ct,q.LayoutGrowth=dt,q.LegendItemType=zt,q.LegendOrientations=qr,q.LegendPositions=Yr,q.LineChart=D$,q.LineEvent=Vc,q.LollipopChart=L$,q.MeterChart=I$,q.ModalEvent=Dc,q.ModelEvent=Lc,q.PieChart=Av,q.PieEvent=Fc,q.Projection=an,q.RadarChart=P$,q.RadarEvent=zc,q.RenderTypes=at,q.ScaleTypes=rt,q.ScatterChart=N$,q.ScatterEvent=Gc,q.SimpleBarChart=H$,q.Skeletons=Vt,q.StackedAreaChart=G$,q.StackedBarChart=V$,q.Statuses=ns,q.TextAnchor=rn,q.ThresholdEvent=qc,q.TickRotations=rs,q.ToolbarControlTypes=St,q.TooltipEvent=zr,q.TreeChart=F$,q.TreeEvent=Wc,q.TreeTypes=Ya,q.TreemapChart=B$,q.TreemapEvent=Yc,q.TruncationTypes=Re,q.WordCloudChart=W$,q.WordCloudEvent=$c,q.ZoomBarTypes=Ye,q.ZoomDomainEvent=Ic,q.ZoombarEvent=Rc,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
|
|
74
74
|
//# sourceMappingURL=bundle.umd.cjs.map
|