vue-data-ui
Version:
A user-empowering data visualization Vue 3 components library for eloquent data storytelling
2 lines (1 loc) • 22.7 kB
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./index-_gyicZFE.cjs"),ke=require("./Title-CsERtJKI.cjs"),re=require("./usePrinter-BRTNfg7r.cjs"),be=require("./DataTable-DL8_xKlk.cjs"),Ce=require("./Tooltip-C06-4zGf.cjs"),we=require("./vue-ui-skeleton-KlT3Rmkn.cjs"),Be=require("./vue-ui-accordion-8mzPx86h.cjs"),ae=require("./useNestedProp-BJQoarHp.cjs"),Pe=require("./PackageVersion-DHtx9fnE.cjs"),xe=require("./PenAndPaper-DPoMEHE6.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),$e=require("./useChartAccessibility-Cm7nkzTG.cjs"),Fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Ne=["x","y","height","width","onClick","onMouseover"],Te={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["click","hover"],setup(s,{emit:N}){const T=s,P=N;function a(r){P("click",r)}function p(r){P("hover",r)}return e.toRef(T,"dataset").value.forEach(r=>{r.nodes&&r.nodes.length>0&&r.nodes.forEach(v=>{v.ancestor=r})}),(r,v)=>{const L=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,(k,$)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:k.x,cy:k.y,r:i.circleRadius,fill:`url(#gradient_${i.color})`,stroke:s.hoveredUid&&s.hoveredUid===i.uid?s.strokeHovered:s.stroke,"stroke-width":s.hoveredUid&&s.hoveredUid===i.uid?i.circleRadius/6:i.circleRadius/12,style:{cursor:"pointer"},onClick:x=>a(i),onMouseover:x=>p(i),onMouseleave:v[0]||(v[0]=x=>p(null))},null,40,Se),r.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:k.x-i.circleRadius,y:k.y-i.circleRadius,height:i.circleRadius*2,width:i.circleRadius*2,style:{overflow:"visible"},onClick:e.withModifiers(x=>a(i),["stop"]),onMouseover:x=>p(i),onMouseleave:v[1]||(v[1]=x=>p(null))},[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Ne)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(L,{key:0,dataset:i.nodes,color:s.color,stroke:s.stroke,strokeHovered:s.strokeHovered,hoveredUid:s.hoveredUid,onClick:a,onHover:p},{node:e.withCtx(({node:k})=>[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:k}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Le=["x1","y1","x2","y2","stroke","stroke-width"],Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(s){const N=s;return e.toRef(N,"dataset").value.forEach(P=>{P.nodes&&P.nodes.length>0&&P.nodes.forEach(a=>{a.ancestor=P})}),(P,a)=>{const p=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,c=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.polygonPath&&c.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.polygonPath.coordinates,(r,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.ancestor&&c.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:r.x,y1:r.y,x2:c.ancestor.polygonPath.coordinates[0].x,y2:c.ancestor.polygonPath.coordinates[0].y,stroke:s.backgroundColor,"stroke-width":c.circleRadius/1.5},null,8,Le),e.createElementVNode("line",{x1:r.x,y1:r.y,x2:c.ancestor.polygonPath.coordinates[0].x,y2:c.ancestor.polygonPath.coordinates[0].y,stroke:s.color,"stroke-width":c.circleRadius/2},null,8,Ve)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,c=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.polygonPath&&c.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c.nodes&&c.nodes.length>0?(e.openBlock(),e.createBlock(p,{key:0,dataset:c.nodes,color:s.color,backgroundColor:s.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Oe=["x","y","fill","font-size"],Ue={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(s,{emit:N}){const T=s;return e.toRef(T,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(p=>{p.ancestor=a})}),(a,p)=>{const c=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,r=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.polygonPath&&r.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.polygonPath.coordinates,v=>(e.openBlock(),e.createElementBlock("text",{x:v.x,y:v.y+r.circleRadius*2,fill:s.color,"font-size":r.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(r.name),9,Oe))),256)),r.nodes&&r.nodes.length>0?(e.openBlock(),e.createBlock(c,{key:0,dataset:r.nodes,color:s.color,hoveredUid:s.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}};function De(s,N={x:0,y:0,width:100,height:100},T=1,P){const a=e.ref({...N}),p=e.ref(1),c=e.ref(!1),r=e.ref({x:0,y:0});let v={x:0,y:0},L=null,i=null;function k(l){var E;const d=s.value;if(!d)return{x:0,y:0};const m=d.createSVGPoint();m.x=l.clientX,m.y=l.clientY;const C=(E=d.getScreenCTM())==null?void 0:E.inverse();return C?m.matrixTransform(C):{x:0,y:0}}function $(l){c.value=!0;const d=k(l.touches?l.touches[0]:l);r.value={x:d.x,y:d.y},v={x:0,y:0}}function x(l){if(!c.value)return;const d=k(l.touches?l.touches[0]:l);let m=d.x-r.value.x,C=d.y-r.value.y;Math.abs(m)<.3&&Math.abs(C)<.3||(v.x=m*.8+v.x*.2,v.y=C*.8+v.y*.2,r.value=d,L||(L=requestAnimationFrame(q)))}function q(){a.value.x-=v.x,a.value.y-=v.y,L=null}function F(){c.value=!1}function t(l){l.preventDefault();const d=l.deltaY>0?.9:1.1;R(d,k(l))}function V(l){l.preventDefault();const d=k(l),m=1.02*(1+T/100);H(m,d)}function H(l,d){i&&cancelAnimationFrame(i);let m=p.value,C=m*l,E=0;const g=()=>{E+=.02;let U=m+(C-m)*G(E);if(E>=1){p.value=C,i=null;return}R(U/m,d),i=requestAnimationFrame(g)};g()}const G=l=>l<.5?2*l*l:-1+(4-2*l)*l;function R(l,d){const m=p.value*l,C=m/p.value,E=a.value.width/C,g=a.value.height/C,U=(d.x-a.value.x)*(1-1/C),X=(d.y-a.value.y)*(1-1/C);a.value.x+=U,a.value.y+=X,a.value.width=E,a.value.height=g,p.value=m}e.onMounted(A),e.onUnmounted(O);function A(){const l=s.value;l&&(l.addEventListener("mousedown",$),l.addEventListener("mousemove",x),l.addEventListener("mouseup",F),l.addEventListener("mouseleave",F),l.addEventListener("wheel",t,{passive:!1}),l.addEventListener("dblclick",V),l.addEventListener("touchstart",d=>{d.preventDefault(),$(d)},{passive:!1}),l.addEventListener("touchmove",d=>{d.preventDefault(),x(d)},{passive:!1}),l.addEventListener("touchend",F))}function O(){const l=s.value;l&&(l.removeEventListener("mousedown",$),l.removeEventListener("mousemove",x),l.removeEventListener("mouseup",F),l.removeEventListener("mouseleave",F),l.removeEventListener("wheel",t),l.removeEventListener("dblclick",V),l.removeEventListener("touchstart",$),l.removeEventListener("touchmove",x),l.removeEventListener("touchend",F))}return e.watchEffect(()=>(P.value?A():O(),()=>{O()})),{viewBox:a}}const Ae=["id"],ze={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Ie={key:2,style:"width:100%;background:transparent;"},Me=["xmlns","viewBox"],_e=["width","height"],qe=["id"],He=["stop-color"],Ge=["stop-color"],je={key:5,class:"vue-data-ui-watermark"},Xe={key:7,ref:"source",dir:"auto"},Ye=["innerHTML"],We={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(s,{expose:N,emit:T}){const{vue_ui_molecule:P}=y.useConfig(),a=s,p=T,c=e.computed(()=>!!a.dataset&&a.dataset.length);e.onMounted(()=>{r()});function r(){y.objectIsEmpty(a.dataset)&&y.error({componentName:"VueUiMolecule",type:"dataset"})}const v=e.ref(y.createUid()),L=e.ref(null),i=e.ref(!1),k=e.ref(""),$=e.ref(null),x=e.ref(0),q=e.ref(0),F=e.ref(0),t=e.computed({get:()=>A(),set:o=>o}),{userOptionsVisible:V,setUserOptionsVisibility:H,keepUserOptionState:G}=Ee.useUserOptionState({config:t.value}),{svgRef:R}=$e.useChartAccessibility({config:t.value.style.chart.title});function A(){const o=ae.useNestedProp({userConfig:a.config,defaultConfig:P});return o.theme?{...ae.useNestedProp({userConfig:y.themes.vue_ui_molecule[o.theme]||a.config,defaultConfig:o}),customPalette:y.themePalettes[o.theme]||y.palette}:o}e.watch(()=>a.config,o=>{t.value=A(),V.value=!t.value.userOptions.showOnChartHover,r(),q.value+=1,F.value+=1,g.value.showTable=t.value.table.show,g.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:O,isImaging:l,generatePdf:d,generateImage:m}=re.usePrinter({elementId:`cluster_${v.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule"}),C=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.computed(()=>y.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function U(o,u=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?U(o[0].nodes,u+1):u}function X(){const o=U(a.dataset);let u=100,n=u;for(let h=0;h<o;h+=1)u/=1,n+=u;return{height:n,width:n}}const w=e.ref(X());e.ref(`0 0 ${w.value.width} ${w.value.height}`);function Q(o,u={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,h=24,f=0,b=0,Z="#BBBBBB"){if(o&&o.length>0){const ge=y.createPolygonPath({plot:u,radius:n,sides:o.length,rotation:f});o.forEach((B,le)=>{const ne=ge.coordinates[le];let _;if(B.ancestor?B.ancestor.ancestor?_=B.ancestor.color||Z:(_=E.value[b]||y.palette[b]||Z,b+=1):_=Z,B.polygonPath={coordinates:[ne]},B.circleRadius=h,B.color=_,B.uid=y.createUid(),B.nodes&&B.nodes.length>0){const ye=!B.ancestor||!B.ancestor.ancestor?b:0;B.nodes=Q(B.nodes,ne,n/2.9,h/2.2,f+Math.PI*le/B.nodes.length,ye,_)}})}return o}function se(o){const u=new Set;function n(f){f.forEach(b=>{b.color&&!u.has(b.color)&&u.add(b.color),b.nodes&&b.nodes.length>0&&n(b.nodes)})}n(o);const h={};return Array.from(u).forEach((f,b)=>{h[f]=`gradient_${b}`}),h}const ie=e.computed(()=>se(S.value)),S=e.computed(()=>Q(a.dataset)),Y=e.ref(null);function ue(o){Y.value={datapoint:o,seriesIndex:-1,series:S.value,config:t.value};const u=t.value.style.chart.tooltip.customFormat;if(y.isFunction(u)&&y.functionReturnsString(()=>u({seriesIndex:-1,datapoint:o,series:S.value,config:t.value})))k.value=u({seriesIndex:-1,datapoint:o,series:S.value,config:t.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${o.color}">⬤</div><div>${o.name}</div></div>`,o.details&&(n+=`<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${o.details}</div>`),k.value=`<div style="font-family:inherit">${n}</div>`}}const J=e.ref(null),z=e.ref(null);function ce(o){J.value=o,o?(i.value=!0,ue(o),z.value=o.uid):(i.value=!1,k.value="",z.value=null)}function de(o){const u=[];function n(h){h.forEach(f=>{const b={name:f.name,details:f.details||"-",ancestor:f.ancestor&&f.ancestor.name||"-",color:f.color||""};u.push(b),f.nodes&&f.nodes.length>0&&n(f.nodes,f.name)})}return n(o),u}const ve=e.computed(()=>de(S.value)),D=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],u=ve.value.map((f,b)=>[{color:f.color,name:f.name},f.details,f.ancestor||""]),n={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},h=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor];return{head:o,body:u,config:n,colNames:h}});function K(){e.nextTick(()=>{const o=D.value.body.map((h,f)=>[[h[0].name],[h[1]],[h[2]]]),u=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...D.value.head]]].concat(o),n=y.createCsvContent(u);y.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return S.value}const I=e.ref(!1);function fe(o){I.value=o,x.value+=1}function ee(){g.value.showTable=!g.value.showTable}function te(){g.value.showDataLabels=!g.value.showDataLabels}function oe(){g.value.showTooltip=!g.value.showTooltip}const M=e.ref(!1);function W(){M.value=!M.value}const me=e.computed(()=>!M.value),{viewBox:j}=De(R,{x:0,y:0,width:w.value.width<=0?10:w.value.width,height:w.value.height<=0?10:w.value.height},t.value.style.chart.zoom.speed,me);function pe(o){p("selectNode",o)}return N({getData:he,generatePdf:d,generateCsv:K,generateImage:m,toggleTable:ee,toggleLabels:te,toggleTooltip:oe,toggleAnnotator:W}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:$,class:e.normalizeClass(`vue-ui-molecule ${I.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`cluster_${v.value}`,onMouseleave:u[1]||(u[1]=n=>{J.value=null,z.value=null,e.unref(H)(!1)}),onMouseenter:u[2]||(u[2]=()=>e.unref(H)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,svgRef:e.unref(R),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:W},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("div",ze,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ie,[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"molecule-div-title",...t.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(G)||e.unref(V))?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:L,key:`user_options_${x.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(l),uid:v.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(d),onGenerateCsv:K,onGenerateImage:e.unref(m),onToggleTable:ee,onToggleLabels:te,onToggleTooltip:oe,onToggleAnnotator:W,style:e.normalizeStyle({visibility:e.unref(G)?e.unref(V)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:h})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:h})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:h})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:h})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:h})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:h})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(y.XMLNS),viewBox:`${e.unref(j).x} ${e.unref(j).y} ${e.unref(j).width} ${e.unref(j).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":I.value,"vue-data-ui-fulscreen--off":!I.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width<=0?10:w.value.width,height:w.value.height<=0?10:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,_e)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ie.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(y.lightenHexColor)(n,.5)},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ge)],8,qe))),256))]),e.createVNode(Re,{dataset:S.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Te,{dataset:S.value,hoveredUid:z.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:pe,onHover:ce},{node:e.withCtx(({node:n})=>[e.renderSlot(o.$slots,"node",e.normalizeProps(e.guardReactiveProps({node:n})),void 0,!0)]),_:3},8,["dataset","hoveredUid","stroke","strokeHovered"]),g.value.showDataLabels?(e.openBlock(),e.createBlock(Ue,{key:1,dataset:S.value,color:t.value.style.chart.color,hoveredUid:z.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,Me)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(l)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:6,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Xe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ce._sfc_main,{show:g.value.showTooltip&&i.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:k.value,isFullscreen:I.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(Be.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(be.DataTable,{key:`table_${F.value}`,colNames:D.value.colNames,head:D.value.head,body:D.value.body,config:D.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:u[0]||(u[0]=n=>g.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ye)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ae))}},Ze=Fe._export_sfc(We,[["__scopeId","data-v-c4dc9cf3"]]);exports.default=Ze;
;