vue-data-ui 3.28.8 → 3.28.9

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.
Files changed (144) hide show
  1. package/dist/{PackageVersion-Bczw6rsP.js → PackageVersion-D6_O7PmZ.js} +1 -1
  2. package/dist/UserOptions-B9EyfU9n.js +1 -0
  3. package/dist/{XyAnalysisOptions-U4UJx51x.js → XyAnalysisOptions-djGOJdKc.js} +1 -1
  4. package/dist/components/vue-ui-3d-bar.js +1 -1
  5. package/dist/components/vue-ui-age-pyramid.js +1 -1
  6. package/dist/components/vue-ui-bullet.js +1 -1
  7. package/dist/components/vue-ui-bump.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dag.js +1 -1
  15. package/dist/components/vue-ui-dashboard.js +1 -1
  16. package/dist/components/vue-ui-digits.js +1 -1
  17. package/dist/components/vue-ui-donut-evolution.js +1 -1
  18. package/dist/components/vue-ui-donut.js +1 -1
  19. package/dist/components/vue-ui-dumbbell.js +1 -1
  20. package/dist/components/vue-ui-flow.js +1 -1
  21. package/dist/components/vue-ui-funnel.js +1 -1
  22. package/dist/components/vue-ui-galaxy.js +1 -1
  23. package/dist/components/vue-ui-gauge.js +1 -1
  24. package/dist/components/vue-ui-geo.js +1 -1
  25. package/dist/components/vue-ui-gizmo.js +1 -1
  26. package/dist/components/vue-ui-graph.js +1 -1
  27. package/dist/components/vue-ui-heatmap.js +1 -1
  28. package/dist/components/vue-ui-hill.js +1 -1
  29. package/dist/components/vue-ui-history-plot.js +1 -1
  30. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  31. package/dist/components/vue-ui-kpi.js +1 -1
  32. package/dist/components/vue-ui-molecule.js +1 -1
  33. package/dist/components/vue-ui-mood-radar.js +1 -1
  34. package/dist/components/vue-ui-nested-donuts.js +1 -1
  35. package/dist/components/vue-ui-onion.js +1 -1
  36. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  37. package/dist/components/vue-ui-quadrant.js +1 -1
  38. package/dist/components/vue-ui-quick-chart.js +1 -1
  39. package/dist/components/vue-ui-radar.js +1 -1
  40. package/dist/components/vue-ui-relation-circle.js +1 -1
  41. package/dist/components/vue-ui-ridgeline.js +1 -1
  42. package/dist/components/vue-ui-rings.js +1 -1
  43. package/dist/components/vue-ui-scatter.js +1 -1
  44. package/dist/components/vue-ui-skeleton.js +1 -1
  45. package/dist/components/vue-ui-spark-trend.js +1 -1
  46. package/dist/components/vue-ui-sparkbar.js +1 -1
  47. package/dist/components/vue-ui-sparkgauge.js +1 -1
  48. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  49. package/dist/components/vue-ui-sparkline.js +1 -1
  50. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  51. package/dist/components/vue-ui-stackbar.js +1 -1
  52. package/dist/components/vue-ui-stackline.js +1 -1
  53. package/dist/components/vue-ui-strip-plot.js +1 -1
  54. package/dist/components/vue-ui-table-heatmap.js +1 -1
  55. package/dist/components/vue-ui-table-sparkline.js +1 -1
  56. package/dist/components/vue-ui-table.js +1 -1
  57. package/dist/components/vue-ui-thermometer.js +1 -1
  58. package/dist/components/vue-ui-timer.js +1 -1
  59. package/dist/components/vue-ui-tiremarks.js +1 -1
  60. package/dist/components/vue-ui-treemap.js +1 -1
  61. package/dist/components/vue-ui-vertical-bar.js +1 -1
  62. package/dist/components/vue-ui-waffle.js +1 -1
  63. package/dist/components/vue-ui-wheel.js +1 -1
  64. package/dist/components/vue-ui-word-cloud.js +1 -1
  65. package/dist/components/vue-ui-world.js +1 -1
  66. package/dist/components/vue-ui-xy-canvas.js +1 -1
  67. package/dist/components/vue-ui-xy.js +1 -1
  68. package/dist/package-BEq7yyhf.js +1 -0
  69. package/dist/{render-common-DY4sNXDz.js → render-common-BbY81Ao2.js} +1 -1
  70. package/dist/ssr/vue-ui-donut.js +1 -1
  71. package/dist/ssr/vue-ui-xy.js +1 -1
  72. package/dist/ssr.js +1 -1
  73. package/dist/style.css +1 -1
  74. package/dist/vue-data-ui-BwiGr37w.js +1 -0
  75. package/dist/vue-data-ui.js +1 -1
  76. package/dist/{vue-ui-3d-bar-DmRrbXjK.js → vue-ui-3d-bar-C2igj6OX.js} +1 -1
  77. package/dist/{vue-ui-age-pyramid-CJJIp5gY.js → vue-ui-age-pyramid-DOG_ZOgO.js} +1 -1
  78. package/dist/{vue-ui-bullet-Br7H7FSM.js → vue-ui-bullet-HUKP90GR.js} +1 -1
  79. package/dist/{vue-ui-bump-DCDHNvWE.js → vue-ui-bump-BuHuxEzm.js} +1 -1
  80. package/dist/{vue-ui-candlestick-C_swW8gM.js → vue-ui-candlestick-CZkyowA5.js} +1 -1
  81. package/dist/{vue-ui-carousel-table-BP_yVdDm.js → vue-ui-carousel-table-B73USTMi.js} +1 -1
  82. package/dist/{vue-ui-chestnut-CIGNqBsT.js → vue-ui-chestnut-VdMHjsWk.js} +1 -1
  83. package/dist/{vue-ui-chord-DZRFBkRJ.js → vue-ui-chord-DfWjMAuo.js} +1 -1
  84. package/dist/{vue-ui-circle-pack-CtdPeMsY.js → vue-ui-circle-pack-ByV3SOkF.js} +1 -1
  85. package/dist/{vue-ui-cursor-DRQc_V2R.js → vue-ui-cursor-D3E3f7Lc.js} +1 -1
  86. package/dist/{vue-ui-dag-Cj0CcntI.js → vue-ui-dag-DlllVyCV.js} +1 -1
  87. package/dist/{vue-ui-dashboard-HyzHqAtX.js → vue-ui-dashboard-C9aGsEAi.js} +1 -1
  88. package/dist/{vue-ui-digits-CfdB0vaP.js → vue-ui-digits-p2met3a2.js} +1 -1
  89. package/dist/{vue-ui-donut-Cv-bYyBN.js → vue-ui-donut-BlQXnf7O.js} +1 -1
  90. package/dist/{vue-ui-donut-Dy4j7B9b.js → vue-ui-donut-CZbBq7bs.js} +1 -1
  91. package/dist/{vue-ui-donut-evolution-DL112anx.js → vue-ui-donut-evolution-Csq1sqhK.js} +1 -1
  92. package/dist/{vue-ui-dumbbell-owG24VsQ.js → vue-ui-dumbbell-ChLfyyGq.js} +1 -1
  93. package/dist/{vue-ui-flow-BMNIydqI.js → vue-ui-flow-DfEHi_Cq.js} +1 -1
  94. package/dist/{vue-ui-funnel-BsVS3vuI.js → vue-ui-funnel-QCG-rmsx.js} +1 -1
  95. package/dist/{vue-ui-galaxy-B8HgdBjc.js → vue-ui-galaxy-DFTeXUse.js} +1 -1
  96. package/dist/{vue-ui-gauge-B1A_NFY6.js → vue-ui-gauge-XTx--A-H.js} +1 -1
  97. package/dist/{vue-ui-geo-_TG4jaV9.js → vue-ui-geo-BXB5xFcV.js} +1 -1
  98. package/dist/{vue-ui-gizmo-D0QjzIGt.js → vue-ui-gizmo-COJHVo7O.js} +1 -1
  99. package/dist/{vue-ui-graph-DScVnTzu.js → vue-ui-graph-BqnyGn9p.js} +1 -1
  100. package/dist/{vue-ui-heatmap-BbQseEbM.js → vue-ui-heatmap-CPq3bcnS.js} +1 -1
  101. package/dist/{vue-ui-hill-D3V84h_t.js → vue-ui-hill-DKm3PjHT.js} +1 -1
  102. package/dist/{vue-ui-history-plot-Bx4WYG6U.js → vue-ui-history-plot-B5OPsHZ1.js} +1 -1
  103. package/dist/{vue-ui-horizontal-bar-Do0HJy4f.js → vue-ui-horizontal-bar-C8SymyhN.js} +1 -1
  104. package/dist/{vue-ui-kpi-CF7pAl08.js → vue-ui-kpi-D1Ps7D_O.js} +1 -1
  105. package/dist/{vue-ui-molecule-bAMGCA2Y.js → vue-ui-molecule-f-GNAQ0p.js} +1 -1
  106. package/dist/{vue-ui-mood-radar-CFpgxjuR.js → vue-ui-mood-radar-kp-jOb4S.js} +1 -1
  107. package/dist/{vue-ui-nested-donuts-CWY26iKX.js → vue-ui-nested-donuts-DCCSKIGa.js} +1 -1
  108. package/dist/{vue-ui-onion-DsBUqL_c.js → vue-ui-onion-KqzGj1z_.js} +1 -1
  109. package/dist/{vue-ui-parallel-coordinate-plot-BF3gO85b.js → vue-ui-parallel-coordinate-plot-dn_41Wv5.js} +1 -1
  110. package/dist/{vue-ui-quadrant-BkNG2LGm.js → vue-ui-quadrant-CP8n4v5B.js} +1 -1
  111. package/dist/{vue-ui-quick-chart-CYxvgVpD.js → vue-ui-quick-chart-D8PbGpSw.js} +1 -1
  112. package/dist/{vue-ui-radar-0H8CiLmc.js → vue-ui-radar-ybR3N44-.js} +1 -1
  113. package/dist/{vue-ui-relation-circle-B0BM4xf8.js → vue-ui-relation-circle-B0PwfFpT.js} +1 -1
  114. package/dist/{vue-ui-ridgeline-D-fDuE3y.js → vue-ui-ridgeline-BnslUzA-.js} +1 -1
  115. package/dist/{vue-ui-rings-UtlBiaZZ.js → vue-ui-rings-B-cOW0Dw.js} +1 -1
  116. package/dist/{vue-ui-scatter-CduaARRt.js → vue-ui-scatter-BX5cTC01.js} +1 -1
  117. package/dist/{vue-ui-skeleton-an0peDis.js → vue-ui-skeleton-98OnGJ2N.js} +1 -1
  118. package/dist/{vue-ui-spark-trend-DCP7blHB.js → vue-ui-spark-trend-C4uYyXEy.js} +1 -1
  119. package/dist/{vue-ui-sparkbar-DT3sDgda.js → vue-ui-sparkbar-BcZyqPB9.js} +1 -1
  120. package/dist/{vue-ui-sparkgauge-AQt2L5dI.js → vue-ui-sparkgauge-dBZzMqn5.js} +1 -1
  121. package/dist/{vue-ui-sparkhistogram-a_jc2Dv2.js → vue-ui-sparkhistogram-DcbAY6vr.js} +1 -1
  122. package/dist/{vue-ui-sparkline-D2-KcHAU.js → vue-ui-sparkline-BizzsAR5.js} +1 -1
  123. package/dist/{vue-ui-sparkstackbar-CBI4S5cu.js → vue-ui-sparkstackbar-xlg048YB.js} +1 -1
  124. package/dist/{vue-ui-stackbar-DS_31-a3.js → vue-ui-stackbar-2AX-m3Pb.js} +1 -1
  125. package/dist/{vue-ui-stackline-CuxohB0U.js → vue-ui-stackline-GKaZJh8y.js} +1 -1
  126. package/dist/{vue-ui-strip-plot-bYGhsPA5.js → vue-ui-strip-plot-BhxIrd67.js} +1 -1
  127. package/dist/{vue-ui-table-lzolsJ_n.js → vue-ui-table-D9FJBxrk.js} +1 -1
  128. package/dist/{vue-ui-table-heatmap-D6gpmHg8.js → vue-ui-table-heatmap-SGJGI5Wq.js} +1 -1
  129. package/dist/{vue-ui-table-sparkline-By319cB8.js → vue-ui-table-sparkline-B6ynMUGE.js} +1 -1
  130. package/dist/{vue-ui-thermometer-B3Uv3aWc.js → vue-ui-thermometer-SE_c51TO.js} +1 -1
  131. package/dist/{vue-ui-timer-C6Pevf4N.js → vue-ui-timer-B1JNZk6j.js} +1 -1
  132. package/dist/{vue-ui-tiremarks-DeNdCFVD.js → vue-ui-tiremarks-Cr8EG4T5.js} +1 -1
  133. package/dist/{vue-ui-treemap-Ck9_llHA.js → vue-ui-treemap-DKJVe7v7.js} +1 -1
  134. package/dist/{vue-ui-waffle-BW2SacnV.js → vue-ui-waffle-DSq3l2sE.js} +1 -1
  135. package/dist/{vue-ui-wheel-BXDhx5bf.js → vue-ui-wheel-CcYOzS05.js} +1 -1
  136. package/dist/{vue-ui-word-cloud-DKPtoruY.js → vue-ui-word-cloud-gogYiwIU.js} +1 -1
  137. package/dist/{vue-ui-world-D9vpDbN7.js → vue-ui-world-C2zGhq_U.js} +1 -1
  138. package/dist/{vue-ui-xy-Df5gIADT.js → vue-ui-xy-B2lrTGG4.js} +1 -1
  139. package/dist/{vue-ui-xy-CMckdUft.js → vue-ui-xy-CpS-ASnd.js} +3 -3
  140. package/dist/{vue-ui-xy-canvas-CBrKi3nN.js → vue-ui-xy-canvas-CXBsRU35.js} +1 -1
  141. package/package.json +1 -1
  142. package/dist/UserOptions-DW84OKKr.js +0 -1
  143. package/dist/package-CNWVs68D.js +0 -1
  144. package/dist/vue-data-ui-BWqplouA.js +0 -1
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Ht as ee,X as te,at as ne,i as o,in as re,r as ie,rn as ae,t as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./img-D4RQwASc.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./userOptionsSlots-DYuo-E5m.js";import{t as xe}from"./usePrinter-DVf3YcG5.js";import{c as Se}from"./canvas-lib-22VpOI4_.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./A11yDataTable-DWNlWXzs.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Oe}from"./vue_ui_relation_circle-Dkv-cSB6.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as ke,createTextVNode as Ae,createVNode as je,defineAsyncComponent as Me,guardReactiveProps as p,mergeProps as Ne,normalizeClass as Pe,normalizeProps as m,normalizeStyle as h,onBeforeUnmount as Fe,onMounted as Ie,openBlock as g,ref as _,renderList as v,renderSlot as y,shallowRef as Le,toDisplayString as b,toRefs as Re,unref as x,useCssVars as ze,watch as Be,withCtx as Ve}from"vue";var He=/* @__PURE__ */ e({default:()=>lt}),Ue=[`id`],We=[`id`],Ge={style:{position:`relative`}},Ke=[`xmlns`,`viewBox`,`aria-describedby`],qe=[`width`,`height`],Je=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Ye={key:1},Xe=[`stroke`,`d`,`stroke-width`],Ze={style:{"pointer-events":`none`}},Qe=[`cx`,`cy`,`fill`,`r`,`stroke`],$e=[`x`,`y`,`fill`,`font-size`],et={key:2},tt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],nt={style:{"pointer-events":`none`}},rt=[`cx`,`cy`,`fill`,`r`,`stroke`],it=[`x`,`y`,`fill`,`font-size`],at=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],ot=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],st={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},ct={key:5,class:`vue-data-ui-watermark`},lt=/*#__PURE__*/ me({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:me,emit:He}){ze(e=>({v6d4223c7:Pt.value,v2ed90bb4:Nt.value,v384e5f88:Ft.value}));let lt=Me(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ut=Me(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),dt=Me(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),{vue_ui_relation_circle:ft}=i(),S=e,pt=He,mt=c(()=>!!S.dataset&&Object.keys(S.dataset).length),C=_(te()),ht=_(0),w=_(null),gt=_(null),_t=_(null),vt=_(null),yt=_(0),T=_(null),E=_(!1),D=_(Et()),O=c(()=>D.value.userOptions),k=c(()=>D.value.style.weightLabels),A=c(()=>D.value.style);fe({config:()=>D.value,dataset:()=>S.dataset,component:`VueUiRelationCircle`,rules:[pe.noHint]});let j=c(()=>D.value.userOptions.useCursorPointer),bt=c(()=>re({defaultConfig:{userOptions:{show:!1},customPalette:Array(7).fill(`#CACACA`),style:{backgroundColor:`#99999930`,labels:{color:`#6A6A6A`},circle:{stroke:`#6A6A6A`},plot:{color:`#6A6A6A`,useSerieColor:!0},links:{maxWidth:2}}},userConfig:D.value.skeletonConfig??{}})),{loading:xt,FINAL_DATASET:St,manualLoading:Ct}=ue({...Re(S),FINAL_CONFIG:D,prepareConfig:Et,skeletonDataset:S.config?.skeletonDataset??[{id:`A`,label:`_`,relations:[`B`,`C`,`D`,`E`,`F`,`G`]},{id:`B`,label:`_`,relations:[`A`]},{id:`C`,label:`_`,relations:[`A`]},{id:`D`,label:`_`,relations:[`A`]},{id:`E`,label:`_`,relations:[`A`]},{id:`F`,label:`_`,relations:[`A`]},{id:`G`,label:`_`,relations:[`A`]}],skeletonConfig:re({defaultConfig:D.value,userConfig:bt.value})}),{userOptionsVisible:M,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=Te({config:D.value}),{svgRef:N}=Ee({config:A.value.title});function Et(){return he(S.config,ft,Oe)}Be(()=>S.config,e=>{D.value=Et(),M.value=!D.value.userOptions.showOnChartHover,V.value=A.value.size,H.value=k.value.size,U.value=A.value.plot.radius,W.value=A.value.labels.fontSize,G.value.height=A.value.size,G.value.width=A.value.size,Lt(),yt.value+=1},{deep:!0}),Be(()=>S.dataset,e=>{Array.isArray(e)&&e.length>0&&(Ct.value=!1)},{deep:!0});let{isPrinting:P,isImaging:F,generatePdf:Dt,generateImage:Ot}=xe({elementId:`relation_circle_${C.value}`,fileName:A.value.title.text||`vue-ui-relation-circle`,options:D.value.userOptions.print}),kt=c(()=>D.value.userOptions.show&&!A.value.title.text),At=c(()=>se(D.value.customPalette)),I=_([]),L=_([]),R=_({}),z=_([]),jt=_(0),B=c(()=>St.value.slice(0,A.value.limit).map(e=>{let t=Array.isArray(e.relations)?e.relations:[];return{...e,weights:Array.isArray(e.weights)?e.weights:Array(t.length).fill(1),relations:t}}));Be(B,()=>{I.value=[],L.value=[],Bt(),Ht()});let V=_(A.value.size),H=_(k.value.size),U=_(A.value.plot.radius),W=_(A.value.labels.fontSize),G=_({height:A.value.size,width:A.value.size}),K=c({get(){return V.value*A.value.circle.radiusProportion},set(e){return e}}),Mt=c(()=>A.value.links.curved),Nt=c(()=>`${A.value.animation.speedMs}ms`),Pt=c(()=>K.value*2),Ft=c(()=>K.value*4),q=Le(null),J=Le(null);Ie(()=>{Lt(),document.getElementById(`relation_circle_${C.value}`).addEventListener(`click`,zt)});let It=c(()=>D.value.debug);function Lt(){if(le(S.dataset)?(ne({componentName:`VueUiRelationCircle`,type:`dataset`,debug:It.value}),Ct.value=!0):It.value&&S.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{ne({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),le(S.dataset)||(Ct.value=D.value.loading),D.value.responsive){let e=Se(()=>{let{width:e,height:t}=Ce({chart:w.value,title:A.value.title.text?gt.value:null,source:_t.value,noTitle:vt.value});requestAnimationFrame(()=>{V.value=Math.min(e,t),G.value.width=Math.max(.1,e),G.value.height=Math.max(.1,t-12),K.value=V.value*A.value.circle.radiusProportion,I.value=[],L.value=[],Bt(),Ht(),Rt(),D.value.responsiveProportionalSizing?(H.value=ae({relator:V.value,adjuster:A.value.size,source:k.value.size,threshold:6,fallback:6}),U.value=ae({relator:V.value,adjuster:A.value.size,source:A.value.plot.radius,threshold:1,fallback:1}),W.value=ae({relator:V.value,adjuster:A.value.size,source:A.value.labels.fontSize,threshold:6,fallback:6})):(H.value=k.value.size,U.value=A.value.plot.radius,W.value=A.value.labels.fontSize)})});q.value&&(J.value&&q.value.unobserve(J.value),q.value.disconnect()),q.value=new ResizeObserver(e),J.value=w.value.parentNode,q.value.observe(J.value)}else I.value=[],L.value=[],Bt(),Ht();Rt()}Fe(()=>{document.getElementById(`relation_circle_${C.value}`)?.removeEventListener(`click`,zt),q.value&&(J.value&&q.value.unobserve(J.value),q.value.disconnect())});let{autoSizeLabels:Rt}=De({svgRef:N,fontSize:A.value.labels.fontSize,minFontSize:A.value.labels.minFontSize,sizeRef:W,labelClass:`.vue-ui-relation-circle-legend`});function zt(e){let t=e.target;t&&Array.from(t.classList).includes(`vue-ui-user-options`)||t&&Array.from(t.classList).includes(`vue-ui-user-options-summary`)||t&&Array.from(t.classList).includes(`vue-data-ui-button`)||t&&Array.from(t.classList).includes(`vue-ui-relation-circle-legend`)||(R.value={},z.value=[])}function Bt(){let e=6.28319/B.value.length,t=360/B.value.length,n=0,r=0;B.value.forEach((i,a)=>{let te=i.weights.reduce((e,t)=>e+t,0),ne=K.value*Math.cos(n)+G.value.width/2,o=K.value*Math.sin(n)+G.value.height/2+A.value.circle.offsetY;I.value.push({x:ne,y:o,...i,color:i.color?i.color:At.value[a]?At.value[a]:ee[a],regAngle:r,totalWeight:te}),n+=e,r+=t})}function Vt(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ht(){L.value=[],I.value.forEach(e=>{I.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);L.value.push({weight:t.weights[r]?t.weights[r]:0,relationId:`${e.id}_${t.id}`,x1:e.x,y1:e.y,x2:t.x,y2:t.y,colorSource:e.color,colorTarget:t.color,midPointLine:Vt({x:e.x,y:e.y},{x:t.x,y:t.y}),midPointBezier:Ut({x1:e.x,x2:t.x,y1:e.y,y2:t.y}),...e})})})}function Ut(e){let t={x:e.x1,y:e.y1},n={x:e.x2,y:e.y2},r={x:e.x1,y:e.y1},i={x:G.value.width/2,y:G.value.height/2+A.value.circle.offsetY},a=.5;return{x:.5**3*t.x+3*.5**2*a*r.x+1.5*a**2*i.x+a**3*n.x,y:.5**3*t.y+3*.5**2*a*r.y+1.5*a**2*i.y+a**3*n.y}}let Wt=c(()=>Math.max(...L.value.map(e=>e.weight)));function Gt(e){return Object.hasOwn(R.value,`x`)?z.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function Y(e){return e.colorSource}function Kt(e){return Object.hasOwn(R.value,`x`)?z.value.includes(e.id)&&e.relationId===`${e.id}_${R.value.id}`||e.relationId===`${R.value.id}_${e.id}`?`opacity:1;stroke-width:${tn(e)}`:`opacity: 0`:`opacity: 1`}function X(e){return Object.hasOwn(R.value,`x`)?!!(z.value.includes(e.id)&&e.relationId===`${e.id}_${R.value.id}`||e.relationId===`${R.value.id}_${e.id}`):!1}function qt(e){return e.regAngle>90&&e.regAngle<270?`end`:`start`}function Jt(e){return e.regAngle>90&&e.regAngle<270?e.x-5:e.x+5}function Yt(e){return Object.hasOwn(R.value,`x`)?R.value.id===e.id||z.value.includes(e.id)?`opacity:1`:`opacity:0.2`:`opacity:1`}function Xt(e){return e.regAngle>90&&e.regAngle<270?`rotate(${e.regAngle+180},${e.x},${e.y})`:`rotate(${e.regAngle},${e.x},${e.y})`}let Z=_(null);function Zt(e,t){Z.value=t,T.value=t,D.value.events.datapointEnter&&D.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Qt(e,t){Z.value=null,E.value||(T.value=null),D.value.events.datapointLeave&&D.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function $t(e,t){e&&(D.value.events.datapointClick&&D.value.events.datapointClick({datapoint:e,seriesIndex:t}),jt.value=360-e.regAngle,R.value.id&&e.id===R.value.id?(R.value={},z.value=[]):(R.value=e,z.value=[...e.relations]))}function en(e,t){T.value=t,$t(e,t)}function tn(e){let t=e.weight/Wt.value*A.value.links.maxWidth;return Math.max(.3,t)}let Q=_(!1);function nn(e){Q.value=e,ht.value+=1}let $=_(!1);function rn(){$.value=!$.value}async function an({scale:e=2}={}){if(!w.value)return;let{width:t,height:n}=w.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ge({domElement:w.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:A.value.title.text,width:t,height:n,aspectRatio:r}}let on=c(()=>A.value.backgroundColor),sn=c(()=>A.value.title),{isCallbackImaging:cn,isCallbackSvg:ln,generateSvg:un,onGenerateImage:dn}=ve({svg:N,title:sn,legend:null,legendItems:null,backgroundColor:on,getSvgCallback:()=>D.value.userOptions.callbacks.svg,generateImage:Ot});async function fn(){pt(`copyAlt`,{config:D.value,dataset:B.value}),D.value.userOptions.callbacks.altCopy?await Promise.resolve(D.value.userOptions.callbacks.altCopy({config:D.value,dataset:B.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function pn(){E.value=!0,I.value.length&&T.value===null&&(T.value=0)}function mn(){E.value=!1,T.value=null}function hn(e){if(!N.value||$.value||document.activeElement!==N.value||!I.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){T.value=null,R.value={},z.value=[];return}if(r){if(T.value===null)return;let e=I.value[T.value];if(!e)return;$t(e,T.value);return}let a=T.value;a===null||a<0||a>=I.value.length?a=n?0:I.value.length-1:n?(a+=1,a>=I.value.length&&(a=0)):t&&(--a,a<0&&(a=I.value.length-1)),T.value=a,Z.value=a;let ee=I.value[a];ee&&D.value.events.datapointEnter&&D.value.events.datapointEnter({datapoint:ee,seriesIndex:a})}let gn=c(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:B.value.map(e=>{let t=e.relations.map(e=>B.value.find(t=>t.id===e)?.label||e).join(`, `),n=(e.weights||[]).reduce((e,t)=>e+Number(t||0),0);return[e.id,e.label,n,e.relations.length,t]})}));return me({getImage:an,generatePdf:Dt,generateSvg:un,generateImage:Ot,toggleAnnotator:rn,toggleFullscreen:nn,copyAlt:fn}),(e,i)=>(g(),d(`div`,{ref_key:`relationCircleChart`,ref:w,class:`vue-data-ui-component vue-ui-relation-circle`,style:h(`width:100%;background:${A.value.backgroundColor};text-align:center;${D.value.responsive?`height: 100%`:``}`),id:`relation_circle_${C.value}`,onMouseenter:i[0]||=()=>x(wt)(!0),onMouseleave:i[1]||=()=>x(wt)(!1)},[f(`div`,{id:`chart-instructions-${C.value}`,class:`sr-only`},[f(`p`,null,b(D.value.a11y.translations.keyboardNavigation),1)],8,We),gn.value?.rows?.length?(g(),l(we,{key:0,uid:C.value,head:gn.value.headers,body:gn.value.rows,notice:D.value.a11y.translations.tableAvailable,caption:D.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):u(``,!0),O.value.buttons.annotator?(g(),l(x(lt),Ne({key:1},x(n)(O.value.annotator),{svgRef:x(N),backgroundColor:A.value.backgroundColor,color:A.value.color,active:$.value,isCursorPointer:j.value,palette:O.value.annotatorPalette,onClose:rn}),ke({_:2},[v(x(r),n=>({name:n,fn:Ve(r=>[y(e.$slots,n,m(p(x(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),kt.value?(g(),d(`div`,{key:2,ref_key:`noTitle`,ref:vt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):u(``,!0),A.value.title.text?(g(),d(`div`,{key:3,ref_key:`chartTitle`,ref:gt,style:`width:100%;background:transparent`},[(g(),l(_e,{key:`title_${yt.value}`,config:{title:{cy:`relation-div-title`,...A.value.title},subtitle:{cy:`relation-div-subtitle`,...A.value.title.subtitle}}},null,8,[`config`]))],512)):u(``,!0),O.value.show&&mt.value&&(x(Tt)||x(M))?(g(),l(x(ut),{ref:`details`,key:`user_options_${ht.value}`,backgroundColor:A.value.backgroundColor,color:A.value.color,isPrinting:x(P),isImaging:x(F),uid:C.value,hasPdf:O.value.buttons.pdf,hasImg:O.value.buttons.img,hasSvg:O.value.buttons.svg,hasFullscreen:O.value.buttons.fullscreen,hasAltCopy:O.value.buttons.altCopy,hasXls:!1,isFullscreen:Q.value,titles:{...O.value.buttonTitles},chartElement:w.value,position:O.value.position,hasAnnotator:O.value.buttons.annotator,isAnnotation:$.value,callbacks:O.value.callbacks,printScale:O.value.print.scale,isCursorPointer:j.value,onToggleFullscreen:nn,onGeneratePdf:x(Dt),onGenerateImage:x(dn),onGenerateSvg:x(un),onToggleAnnotator:rn,onCopyAlt:fn,style:h({visibility:x(Tt)?x(M)?`visible`:`hidden`:`visible`})},ke({_:2},[v(x(ye)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ve(n=>[y(e.$slots,t,m(p(x(be)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):u(``,!0),f(`div`,Ge,[(g(),d(`svg`,{ref_key:`svgRef`,ref:N,xmlns:x(oe),class:Pe([{"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value},`relation-circle`]),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${C.value}`,tabindex:`0`,onFocus:pn,onBlur:mn,onKeydown:hn},[je(x(dt)),y(e.$slots,`svg-underlayer`,{svg:{...G.value,isPrintingImg:x(P)||x(F)||x(cn),isPrintingSvg:x(ln)}},void 0,!0),e.$slots[`chart-background`]?(g(),d(`foreignObject`,{key:0,x:0,y:0,width:G.value.width<=0?10:G.value.width,height:G.value.height<=0?10:G.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,qe)):u(``,!0),f(`circle`,{cx:(G.value.width<=0?1e-4:G.value.width)/2,cy:(G.value.height<=0?1e-4:G.value.height)/2+A.value.circle.offsetY,r:K.value<=0?1e-4:K.value,stroke:A.value.circle.stroke,"stroke-width":A.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,Je),Mt.value?(g(),d(`g`,Ye,[(g(!0),d(s,null,v(L.value,(e,t)=>(g(),d(`path`,{key:`relation_${t}`,style:h(Kt(e)),stroke:Y(e),class:Pe([`relation`,{"vue-ui-relation-circle-selected":R.value.hasOwnProperty(`id`)&&z.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${G.value.width/2},${G.value.height/2+A.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":tn(e),"stroke-linecap":`round`},null,14,Xe))),128)),(g(!0),d(s,null,v(L.value,(t,n)=>(g(),d(`g`,Ze,[X(t)?y(e.$slots,`dataLabel`,Ne({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:Y(t),weight:t.weight,fontSize:H.value}),void 0,!0,0):u(``,!0),X(t)&&!e.$slots.dataLabel?(g(),d(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:Y(t),r:H.value,stroke:A.value.backgroundColor,"stroke-width":`1`},null,8,Qe)):u(``,!0),X(t)&&!e.$slots.dataLabel?(g(),d(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+H.value/3,fill:x(ie)(Y(t)),"text-anchor":`middle`,"font-size":H.value},b(x(o)(k.value.formatter,t.weight,x(a)({p:k.value.prefix,v:t.weight,s:k.value.suffix,r:k.value.rounding}),{...t})),9,$e)):u(``,!0)]))),256))])):(g(),d(`g`,et,[(g(!0),d(s,null,v(L.value,(e,t)=>(g(),d(`line`,{key:`relation_${t}`,stroke:Y(e),"stroke-width":tn(e),style:h(Kt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:Pe({"vue-ui-relation-circle-selected":R.value.hasOwnProperty(`id`)&&z.value.includes(e.id)}),"stroke-linecap":`round`},null,14,tt))),128)),(g(!0),d(s,null,v(L.value,(t,n)=>(g(),d(`g`,nt,[X(t)?y(e.$slots,`dataLabel`,Ne({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:Y(t),weight:t.weight,fontSize:H.value}),void 0,!0,0):u(``,!0),X(t)&&!e.$slots.dataLabel&&k.value.show?(g(),d(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:Y(t),r:H.value,stroke:A.value.backgroundColor,"stroke-width":`1`},null,8,rt)):u(``,!0),X(t)&&!e.$slots.dataLabel&&k.value.show?(g(),d(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+H.value/3,fill:x(ie)(Y(t)),"text-anchor":`middle`,"font-size":H.value},b(x(o)(k.value.formatter,t.weight,x(a)({p:k.value.prefix,v:t.weight,s:k.value.suffix,r:k.value.rounding}),{...t})),9,it)):u(``,!0)]))),256))])),(g(!0),d(s,null,v(I.value,(e,t)=>(g(),d(`text`,{key:`plot_text_${t}`,"text-anchor":qt(e),transform:Xt(e),x:Jt(e),y:e.y+5,class:`vue-ui-relation-circle-legend`,"transform-origin":`start`,"font-weight":R.value.id===e.id?`900`:`400`,style:h(`font-family:${A.value.fontFamily};${Yt(e)};cursor:${j.value?`pointer`:`default`}`),"font-size":W.value,fill:A.value.labels.color,"text-decoration":t===Z.value||t===T.value?`underline`:void 0,onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},[x(xt)?(g(),d(s,{key:0},[Ae(`--------`)],64)):(g(),d(s,{key:1},[Ae(b(e.label)+` (`+b(x(o)(k.value.formatter,e.totalWeight,x(a)({p:k.value.prefix,v:e.totalWeight,s:k.value.suffix,r:k.value.rounding}),{...e}))+`) `,1)],64))],44,at))),128)),(g(!0),d(s,null,v(I.value,(e,t)=>(g(),d(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:h(`${Gt(e)}; transition: r 0.2s ease-in-out; cursor:${j.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:A.value.plot.useSerieColor?e.color:A.value.plot.color,stroke:A.value.backgroundColor,"stroke-width":`1`,r:U.value*(t===Z.value||t===T.value?2:1),onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},null,44,ot))),128)),y(e.$slots,`svg`,{svg:{...G.value,isPrintingImg:x(P)||x(F)||x(cn),isPrintingSvg:x(ln)}},void 0,!0)],42,Ke)),e.$slots.hint?(g(),d(`div`,st,[y(e.$slots,`hint`,m(p({hint:D.value.a11y.translations.keyboardNavigation,isVisible:E.value})),void 0,!0)])):u(``,!0)]),e.$slots.watermark?(g(),d(`div`,ct,[y(e.$slots,`watermark`,m(p({isPrinting:x(P)||x(F)||x(cn)||x(ln)})),void 0,!0)])):u(``,!0),e.$slots.source?(g(),d(`div`,{key:6,ref_key:`source`,ref:_t,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),y(e.$slots,`skeleton`,{},()=>[x(xt)?(g(),l(de,{key:0})):u(``,!0)],!0)],44,Ue))}},[[`__scopeId`,`data-v-28e8ae2b`]]);export{He as n,lt as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Ht as ee,X as te,at as ne,i as o,in as re,r as ie,rn as ae,t as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./img-D4RQwASc.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./userOptionsSlots-DYuo-E5m.js";import{t as xe}from"./usePrinter-DVf3YcG5.js";import{c as Se}from"./canvas-lib-22VpOI4_.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./A11yDataTable-DWNlWXzs.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Oe}from"./vue_ui_relation_circle-Dkv-cSB6.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as ke,createTextVNode as Ae,createVNode as je,defineAsyncComponent as Me,guardReactiveProps as p,mergeProps as Ne,normalizeClass as Pe,normalizeProps as m,normalizeStyle as h,onBeforeUnmount as Fe,onMounted as Ie,openBlock as g,ref as _,renderList as v,renderSlot as y,shallowRef as Le,toDisplayString as b,toRefs as Re,unref as x,useCssVars as ze,watch as Be,withCtx as Ve}from"vue";var He=/* @__PURE__ */ e({default:()=>lt}),Ue=[`id`],We=[`id`],Ge={style:{position:`relative`}},Ke=[`xmlns`,`viewBox`,`aria-describedby`],qe=[`width`,`height`],Je=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Ye={key:1},Xe=[`stroke`,`d`,`stroke-width`],Ze={style:{"pointer-events":`none`}},Qe=[`cx`,`cy`,`fill`,`r`,`stroke`],$e=[`x`,`y`,`fill`,`font-size`],et={key:2},tt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],nt={style:{"pointer-events":`none`}},rt=[`cx`,`cy`,`fill`,`r`,`stroke`],it=[`x`,`y`,`fill`,`font-size`],at=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],ot=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],st={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},ct={key:5,class:`vue-data-ui-watermark`},lt=/*#__PURE__*/ me({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:me,emit:He}){ze(e=>({v6d4223c7:Pt.value,v2ed90bb4:Nt.value,v384e5f88:Ft.value}));let lt=Me(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ut=Me(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),dt=Me(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),{vue_ui_relation_circle:ft}=i(),S=e,pt=He,mt=c(()=>!!S.dataset&&Object.keys(S.dataset).length),C=_(te()),ht=_(0),w=_(null),gt=_(null),_t=_(null),vt=_(null),yt=_(0),T=_(null),E=_(!1),D=_(Et()),O=c(()=>D.value.userOptions),k=c(()=>D.value.style.weightLabels),A=c(()=>D.value.style);fe({config:()=>D.value,dataset:()=>S.dataset,component:`VueUiRelationCircle`,rules:[pe.noHint]});let j=c(()=>D.value.userOptions.useCursorPointer),bt=c(()=>re({defaultConfig:{userOptions:{show:!1},customPalette:Array(7).fill(`#CACACA`),style:{backgroundColor:`#99999930`,labels:{color:`#6A6A6A`},circle:{stroke:`#6A6A6A`},plot:{color:`#6A6A6A`,useSerieColor:!0},links:{maxWidth:2}}},userConfig:D.value.skeletonConfig??{}})),{loading:xt,FINAL_DATASET:St,manualLoading:Ct}=ue({...Re(S),FINAL_CONFIG:D,prepareConfig:Et,skeletonDataset:S.config?.skeletonDataset??[{id:`A`,label:`_`,relations:[`B`,`C`,`D`,`E`,`F`,`G`]},{id:`B`,label:`_`,relations:[`A`]},{id:`C`,label:`_`,relations:[`A`]},{id:`D`,label:`_`,relations:[`A`]},{id:`E`,label:`_`,relations:[`A`]},{id:`F`,label:`_`,relations:[`A`]},{id:`G`,label:`_`,relations:[`A`]}],skeletonConfig:re({defaultConfig:D.value,userConfig:bt.value})}),{userOptionsVisible:M,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=Te({config:D.value}),{svgRef:N}=Ee({config:A.value.title});function Et(){return he(S.config,ft,Oe)}Be(()=>S.config,e=>{D.value=Et(),M.value=!D.value.userOptions.showOnChartHover,V.value=A.value.size,H.value=k.value.size,U.value=A.value.plot.radius,W.value=A.value.labels.fontSize,G.value.height=A.value.size,G.value.width=A.value.size,Lt(),yt.value+=1},{deep:!0}),Be(()=>S.dataset,e=>{Array.isArray(e)&&e.length>0&&(Ct.value=!1)},{deep:!0});let{isPrinting:P,isImaging:F,generatePdf:Dt,generateImage:Ot}=xe({elementId:`relation_circle_${C.value}`,fileName:A.value.title.text||`vue-ui-relation-circle`,options:D.value.userOptions.print}),kt=c(()=>D.value.userOptions.show&&!A.value.title.text),At=c(()=>se(D.value.customPalette)),I=_([]),L=_([]),R=_({}),z=_([]),jt=_(0),B=c(()=>St.value.slice(0,A.value.limit).map(e=>{let t=Array.isArray(e.relations)?e.relations:[];return{...e,weights:Array.isArray(e.weights)?e.weights:Array(t.length).fill(1),relations:t}}));Be(B,()=>{I.value=[],L.value=[],Bt(),Ht()});let V=_(A.value.size),H=_(k.value.size),U=_(A.value.plot.radius),W=_(A.value.labels.fontSize),G=_({height:A.value.size,width:A.value.size}),K=c({get(){return V.value*A.value.circle.radiusProportion},set(e){return e}}),Mt=c(()=>A.value.links.curved),Nt=c(()=>`${A.value.animation.speedMs}ms`),Pt=c(()=>K.value*2),Ft=c(()=>K.value*4),q=Le(null),J=Le(null);Ie(()=>{Lt(),document.getElementById(`relation_circle_${C.value}`).addEventListener(`click`,zt)});let It=c(()=>D.value.debug);function Lt(){if(le(S.dataset)?(ne({componentName:`VueUiRelationCircle`,type:`dataset`,debug:It.value}),Ct.value=!0):It.value&&S.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{ne({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),le(S.dataset)||(Ct.value=D.value.loading),D.value.responsive){let e=Se(()=>{let{width:e,height:t}=Ce({chart:w.value,title:A.value.title.text?gt.value:null,source:_t.value,noTitle:vt.value});requestAnimationFrame(()=>{V.value=Math.min(e,t),G.value.width=Math.max(.1,e),G.value.height=Math.max(.1,t-12),K.value=V.value*A.value.circle.radiusProportion,I.value=[],L.value=[],Bt(),Ht(),Rt(),D.value.responsiveProportionalSizing?(H.value=ae({relator:V.value,adjuster:A.value.size,source:k.value.size,threshold:6,fallback:6}),U.value=ae({relator:V.value,adjuster:A.value.size,source:A.value.plot.radius,threshold:1,fallback:1}),W.value=ae({relator:V.value,adjuster:A.value.size,source:A.value.labels.fontSize,threshold:6,fallback:6})):(H.value=k.value.size,U.value=A.value.plot.radius,W.value=A.value.labels.fontSize)})});q.value&&(J.value&&q.value.unobserve(J.value),q.value.disconnect()),q.value=new ResizeObserver(e),J.value=w.value.parentNode,q.value.observe(J.value)}else I.value=[],L.value=[],Bt(),Ht();Rt()}Fe(()=>{document.getElementById(`relation_circle_${C.value}`)?.removeEventListener(`click`,zt),q.value&&(J.value&&q.value.unobserve(J.value),q.value.disconnect())});let{autoSizeLabels:Rt}=De({svgRef:N,fontSize:A.value.labels.fontSize,minFontSize:A.value.labels.minFontSize,sizeRef:W,labelClass:`.vue-ui-relation-circle-legend`});function zt(e){let t=e.target;t&&Array.from(t.classList).includes(`vue-ui-user-options`)||t&&Array.from(t.classList).includes(`vue-ui-user-options-summary`)||t&&Array.from(t.classList).includes(`vue-data-ui-button`)||t&&Array.from(t.classList).includes(`vue-ui-relation-circle-legend`)||(R.value={},z.value=[])}function Bt(){let e=6.28319/B.value.length,t=360/B.value.length,n=0,r=0;B.value.forEach((i,a)=>{let te=i.weights.reduce((e,t)=>e+t,0),ne=K.value*Math.cos(n)+G.value.width/2,o=K.value*Math.sin(n)+G.value.height/2+A.value.circle.offsetY;I.value.push({x:ne,y:o,...i,color:i.color?i.color:At.value[a]?At.value[a]:ee[a],regAngle:r,totalWeight:te}),n+=e,r+=t})}function Vt(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ht(){L.value=[],I.value.forEach(e=>{I.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);L.value.push({weight:t.weights[r]?t.weights[r]:0,relationId:`${e.id}_${t.id}`,x1:e.x,y1:e.y,x2:t.x,y2:t.y,colorSource:e.color,colorTarget:t.color,midPointLine:Vt({x:e.x,y:e.y},{x:t.x,y:t.y}),midPointBezier:Ut({x1:e.x,x2:t.x,y1:e.y,y2:t.y}),...e})})})}function Ut(e){let t={x:e.x1,y:e.y1},n={x:e.x2,y:e.y2},r={x:e.x1,y:e.y1},i={x:G.value.width/2,y:G.value.height/2+A.value.circle.offsetY},a=.5;return{x:.5**3*t.x+3*.5**2*a*r.x+1.5*a**2*i.x+a**3*n.x,y:.5**3*t.y+3*.5**2*a*r.y+1.5*a**2*i.y+a**3*n.y}}let Wt=c(()=>Math.max(...L.value.map(e=>e.weight)));function Gt(e){return Object.hasOwn(R.value,`x`)?z.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function Y(e){return e.colorSource}function Kt(e){return Object.hasOwn(R.value,`x`)?z.value.includes(e.id)&&e.relationId===`${e.id}_${R.value.id}`||e.relationId===`${R.value.id}_${e.id}`?`opacity:1;stroke-width:${tn(e)}`:`opacity: 0`:`opacity: 1`}function X(e){return Object.hasOwn(R.value,`x`)?!!(z.value.includes(e.id)&&e.relationId===`${e.id}_${R.value.id}`||e.relationId===`${R.value.id}_${e.id}`):!1}function qt(e){return e.regAngle>90&&e.regAngle<270?`end`:`start`}function Jt(e){return e.regAngle>90&&e.regAngle<270?e.x-5:e.x+5}function Yt(e){return Object.hasOwn(R.value,`x`)?R.value.id===e.id||z.value.includes(e.id)?`opacity:1`:`opacity:0.2`:`opacity:1`}function Xt(e){return e.regAngle>90&&e.regAngle<270?`rotate(${e.regAngle+180},${e.x},${e.y})`:`rotate(${e.regAngle},${e.x},${e.y})`}let Z=_(null);function Zt(e,t){Z.value=t,T.value=t,D.value.events.datapointEnter&&D.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Qt(e,t){Z.value=null,E.value||(T.value=null),D.value.events.datapointLeave&&D.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function $t(e,t){e&&(D.value.events.datapointClick&&D.value.events.datapointClick({datapoint:e,seriesIndex:t}),jt.value=360-e.regAngle,R.value.id&&e.id===R.value.id?(R.value={},z.value=[]):(R.value=e,z.value=[...e.relations]))}function en(e,t){T.value=t,$t(e,t)}function tn(e){let t=e.weight/Wt.value*A.value.links.maxWidth;return Math.max(.3,t)}let Q=_(!1);function nn(e){Q.value=e,ht.value+=1}let $=_(!1);function rn(){$.value=!$.value}async function an({scale:e=2}={}){if(!w.value)return;let{width:t,height:n}=w.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ge({domElement:w.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:A.value.title.text,width:t,height:n,aspectRatio:r}}let on=c(()=>A.value.backgroundColor),sn=c(()=>A.value.title),{isCallbackImaging:cn,isCallbackSvg:ln,generateSvg:un,onGenerateImage:dn}=ve({svg:N,title:sn,legend:null,legendItems:null,backgroundColor:on,getSvgCallback:()=>D.value.userOptions.callbacks.svg,generateImage:Ot});async function fn(){pt(`copyAlt`,{config:D.value,dataset:B.value}),D.value.userOptions.callbacks.altCopy?await Promise.resolve(D.value.userOptions.callbacks.altCopy({config:D.value,dataset:B.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function pn(){E.value=!0,I.value.length&&T.value===null&&(T.value=0)}function mn(){E.value=!1,T.value=null}function hn(e){if(!N.value||$.value||document.activeElement!==N.value||!I.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){T.value=null,R.value={},z.value=[];return}if(r){if(T.value===null)return;let e=I.value[T.value];if(!e)return;$t(e,T.value);return}let a=T.value;a===null||a<0||a>=I.value.length?a=n?0:I.value.length-1:n?(a+=1,a>=I.value.length&&(a=0)):t&&(--a,a<0&&(a=I.value.length-1)),T.value=a,Z.value=a;let ee=I.value[a];ee&&D.value.events.datapointEnter&&D.value.events.datapointEnter({datapoint:ee,seriesIndex:a})}let gn=c(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:B.value.map(e=>{let t=e.relations.map(e=>B.value.find(t=>t.id===e)?.label||e).join(`, `),n=(e.weights||[]).reduce((e,t)=>e+Number(t||0),0);return[e.id,e.label,n,e.relations.length,t]})}));return me({getImage:an,generatePdf:Dt,generateSvg:un,generateImage:Ot,toggleAnnotator:rn,toggleFullscreen:nn,copyAlt:fn}),(e,i)=>(g(),d(`div`,{ref_key:`relationCircleChart`,ref:w,class:`vue-data-ui-component vue-ui-relation-circle`,style:h(`width:100%;background:${A.value.backgroundColor};text-align:center;${D.value.responsive?`height: 100%`:``}`),id:`relation_circle_${C.value}`,onMouseenter:i[0]||=()=>x(wt)(!0),onMouseleave:i[1]||=()=>x(wt)(!1)},[f(`div`,{id:`chart-instructions-${C.value}`,class:`sr-only`},[f(`p`,null,b(D.value.a11y.translations.keyboardNavigation),1)],8,We),gn.value?.rows?.length?(g(),l(we,{key:0,uid:C.value,head:gn.value.headers,body:gn.value.rows,notice:D.value.a11y.translations.tableAvailable,caption:D.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):u(``,!0),O.value.buttons.annotator?(g(),l(x(lt),Ne({key:1},x(n)(O.value.annotator),{svgRef:x(N),backgroundColor:A.value.backgroundColor,color:A.value.color,active:$.value,isCursorPointer:j.value,palette:O.value.annotatorPalette,onClose:rn}),ke({_:2},[v(x(r),n=>({name:n,fn:Ve(r=>[y(e.$slots,n,m(p(x(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),kt.value?(g(),d(`div`,{key:2,ref_key:`noTitle`,ref:vt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):u(``,!0),A.value.title.text?(g(),d(`div`,{key:3,ref_key:`chartTitle`,ref:gt,style:`width:100%;background:transparent`},[(g(),l(_e,{key:`title_${yt.value}`,config:{title:{cy:`relation-div-title`,...A.value.title},subtitle:{cy:`relation-div-subtitle`,...A.value.title.subtitle}}},null,8,[`config`]))],512)):u(``,!0),O.value.show&&mt.value&&(x(Tt)||x(M))?(g(),l(x(ut),{ref:`details`,key:`user_options_${ht.value}`,backgroundColor:A.value.backgroundColor,color:A.value.color,isPrinting:x(P),isImaging:x(F),uid:C.value,hasPdf:O.value.buttons.pdf,hasImg:O.value.buttons.img,hasSvg:O.value.buttons.svg,hasFullscreen:O.value.buttons.fullscreen,hasAltCopy:O.value.buttons.altCopy,hasXls:!1,isFullscreen:Q.value,titles:{...O.value.buttonTitles},chartElement:w.value,position:O.value.position,hasAnnotator:O.value.buttons.annotator,isAnnotation:$.value,callbacks:O.value.callbacks,printScale:O.value.print.scale,isCursorPointer:j.value,onToggleFullscreen:nn,onGeneratePdf:x(Dt),onGenerateImage:x(dn),onGenerateSvg:x(un),onToggleAnnotator:rn,onCopyAlt:fn,style:h({visibility:x(Tt)?x(M)?`visible`:`hidden`:`visible`})},ke({_:2},[v(x(ye)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ve(n=>[y(e.$slots,t,m(p(x(be)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):u(``,!0),f(`div`,Ge,[(g(),d(`svg`,{ref_key:`svgRef`,ref:N,xmlns:x(oe),class:Pe([{"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value},`relation-circle`]),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${C.value}`,tabindex:`0`,onFocus:pn,onBlur:mn,onKeydown:hn},[je(x(dt)),y(e.$slots,`svg-underlayer`,{svg:{...G.value,isPrintingImg:x(P)||x(F)||x(cn),isPrintingSvg:x(ln)}},void 0,!0),e.$slots[`chart-background`]?(g(),d(`foreignObject`,{key:0,x:0,y:0,width:G.value.width<=0?10:G.value.width,height:G.value.height<=0?10:G.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,qe)):u(``,!0),f(`circle`,{cx:(G.value.width<=0?1e-4:G.value.width)/2,cy:(G.value.height<=0?1e-4:G.value.height)/2+A.value.circle.offsetY,r:K.value<=0?1e-4:K.value,stroke:A.value.circle.stroke,"stroke-width":A.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,Je),Mt.value?(g(),d(`g`,Ye,[(g(!0),d(s,null,v(L.value,(e,t)=>(g(),d(`path`,{key:`relation_${t}`,style:h(Kt(e)),stroke:Y(e),class:Pe([`relation`,{"vue-ui-relation-circle-selected":R.value.hasOwnProperty(`id`)&&z.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${G.value.width/2},${G.value.height/2+A.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":tn(e),"stroke-linecap":`round`},null,14,Xe))),128)),(g(!0),d(s,null,v(L.value,(t,n)=>(g(),d(`g`,Ze,[X(t)?y(e.$slots,`dataLabel`,Ne({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:Y(t),weight:t.weight,fontSize:H.value}),void 0,!0,0):u(``,!0),X(t)&&!e.$slots.dataLabel?(g(),d(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:Y(t),r:H.value,stroke:A.value.backgroundColor,"stroke-width":`1`},null,8,Qe)):u(``,!0),X(t)&&!e.$slots.dataLabel?(g(),d(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+H.value/3,fill:x(ie)(Y(t)),"text-anchor":`middle`,"font-size":H.value},b(x(o)(k.value.formatter,t.weight,x(a)({p:k.value.prefix,v:t.weight,s:k.value.suffix,r:k.value.rounding}),{...t})),9,$e)):u(``,!0)]))),256))])):(g(),d(`g`,et,[(g(!0),d(s,null,v(L.value,(e,t)=>(g(),d(`line`,{key:`relation_${t}`,stroke:Y(e),"stroke-width":tn(e),style:h(Kt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:Pe({"vue-ui-relation-circle-selected":R.value.hasOwnProperty(`id`)&&z.value.includes(e.id)}),"stroke-linecap":`round`},null,14,tt))),128)),(g(!0),d(s,null,v(L.value,(t,n)=>(g(),d(`g`,nt,[X(t)?y(e.$slots,`dataLabel`,Ne({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:Y(t),weight:t.weight,fontSize:H.value}),void 0,!0,0):u(``,!0),X(t)&&!e.$slots.dataLabel&&k.value.show?(g(),d(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:Y(t),r:H.value,stroke:A.value.backgroundColor,"stroke-width":`1`},null,8,rt)):u(``,!0),X(t)&&!e.$slots.dataLabel&&k.value.show?(g(),d(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+H.value/3,fill:x(ie)(Y(t)),"text-anchor":`middle`,"font-size":H.value},b(x(o)(k.value.formatter,t.weight,x(a)({p:k.value.prefix,v:t.weight,s:k.value.suffix,r:k.value.rounding}),{...t})),9,it)):u(``,!0)]))),256))])),(g(!0),d(s,null,v(I.value,(e,t)=>(g(),d(`text`,{key:`plot_text_${t}`,"text-anchor":qt(e),transform:Xt(e),x:Jt(e),y:e.y+5,class:`vue-ui-relation-circle-legend`,"transform-origin":`start`,"font-weight":R.value.id===e.id?`900`:`400`,style:h(`font-family:${A.value.fontFamily};${Yt(e)};cursor:${j.value?`pointer`:`default`}`),"font-size":W.value,fill:A.value.labels.color,"text-decoration":t===Z.value||t===T.value?`underline`:void 0,onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},[x(xt)?(g(),d(s,{key:0},[Ae(`--------`)],64)):(g(),d(s,{key:1},[Ae(b(e.label)+` (`+b(x(o)(k.value.formatter,e.totalWeight,x(a)({p:k.value.prefix,v:e.totalWeight,s:k.value.suffix,r:k.value.rounding}),{...e}))+`) `,1)],64))],44,at))),128)),(g(!0),d(s,null,v(I.value,(e,t)=>(g(),d(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:h(`${Gt(e)}; transition: r 0.2s ease-in-out; cursor:${j.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:A.value.plot.useSerieColor?e.color:A.value.plot.color,stroke:A.value.backgroundColor,"stroke-width":`1`,r:U.value*(t===Z.value||t===T.value?2:1),onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},null,44,ot))),128)),y(e.$slots,`svg`,{svg:{...G.value,isPrintingImg:x(P)||x(F)||x(cn),isPrintingSvg:x(ln)}},void 0,!0)],42,Ke)),e.$slots.hint?(g(),d(`div`,st,[y(e.$slots,`hint`,m(p({hint:D.value.a11y.translations.keyboardNavigation,isVisible:E.value})),void 0,!0)])):u(``,!0)]),e.$slots.watermark?(g(),d(`div`,ct,[y(e.$slots,`watermark`,m(p({isPrinting:x(P)||x(F)||x(cn)||x(ln)})),void 0,!0)])):u(``,!0),e.$slots.source?(g(),d(`div`,{key:6,ref_key:`source`,ref:_t,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),y(e.$slots,`skeleton`,{},()=>[x(xt)?(g(),l(de,{key:0})):u(``,!0)],!0)],44,Ue))}},[[`__scopeId`,`data-v-28e8ae2b`]]);export{He as n,lt as t};
@@ -1,2 +1,2 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Ht as s,J as c,N as ee,P as te,S as ne,U as re,X as ie,Xt as ae,at as oe,i as l,in as se,nt as ce,r as le,t as ue,tt as de,w as fe,xt as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as xe}from"./resolveChartConfig-CIhClE5R.js";import{t as Se}from"./chartImage-DPGnEuYM.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{n as Te,t as Ee}from"./tableIntegration-CNoJ1CIY.js";import{n as De,t as Oe}from"./userOptionsSlots-DYuo-E5m.js";import{t as ke}from"./useTimeLabels-Das5O74F.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{t as je}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Me}from"./Shape-CRe8woTu.js";import{c as Ne}from"./canvas-lib-22VpOI4_.js";import{t as Pe}from"./useResponsive-CENUxfEL.js";import{t as Fe}from"./DefGrad-DKMq1REY.js";import{t as Ie}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Le}from"./A11yDataTable-DWNlWXzs.js";import{t as Re}from"./useUserOptionState-CXlFnwPv.js";import{t as ze}from"./useChartAccessibility-DOMuYJfm.js";import{t as Be}from"./Legend-DM0ClX3D.js";import{t as Ve}from"./vue_ui_ridgeline-Di26JtQu.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as He,createTextVNode as Ue,createVNode as We,defineAsyncComponent as g,guardReactiveProps as Ge,mergeProps as Ke,nextTick as qe,normalizeClass as Je,normalizeProps as Ye,normalizeStyle as _,onBeforeUnmount as Xe,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as Ze,shallowRef as Qe,toDisplayString as S,toRefs as $e,unref as C,watch as et,watchEffect as tt,withCtx as w}from"vue";var nt=/* @__PURE__ */ e({default:()=>Tt}),rt=[`id`],it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st={key:0},ct=[`fill`,`d`],lt=[`stroke`,`stroke-width`,`d`],ut=[`fill`,`d`],dt=[`stroke`,`stroke-dasharray`,`stroke-width`,`d`],ft=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],pt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],mt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`text-decoration`,`onMouseenter`,`onClick`],ht={key:0},gt=[`font-size`,`fill`,`stroke`,`font-weight`,`transform`,`text-anchor`],_t=[`font-size`,`fill`,`font-weight`,`transform`,`text-anchor`,`innerHTML`],vt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],bt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],xt=[`x`,`y`,`stroke`,`text-anchor`,`font-size`,`fill`],St={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ct={key:5,class:`vue-data-ui-watermark`},wt=[`onClick`],Tt=/*#__PURE__*/ be({__name:`vue-ui-ridgeline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`selectX`,`copyAlt`],setup(e,{expose:be,emit:nt}){let Tt=g(()=>import(`./vue-ui-xy-CMckdUft.js`).then(e=>e.n)),Et=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Dt=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ot=g(()=>import(`./DataTable-Dof6yhO7.js`)),kt=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),At=g(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),jt=g(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),Mt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_ridgeline:Nt}=i(),T=e,Pt=d({get(){return Array.isArray(B.value)&&B.value.length>0},set(e){return e}}),Ft=nt,E=y(null),It=y(null),Lt=y(null),D=Qe(null),O=Qe(null),Rt=y(null),zt=y(null),Bt=y(0),Vt=y(0),Ht=y(0),k=y(ie()),Ut=y(0),Wt=y(0),Gt=y(512),A=y(null),Kt=y(null),qt=y(null),Jt=y(0),Yt=y(null),Xt=y(null),Zt=y(null),j=y(null),Qt=y(!1);function $t(){return xe(T.config,Nt,Ve)}let M=y($t()),N=d(()=>M.value.userOptions),P=d(()=>M.value.style.chart.areas),F=d(()=>M.value.style.chart.selector),I=d(()=>M.value.style.chart.xAxis.labels),L=d(()=>M.value.style.chart.yAxis.labels),R=d(()=>M.value.style.chart);ve({config:()=>M.value,dataset:()=>T.dataset,component:`VueUiRidgeline`,rules:[ye.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.some(e=>e.datapoints.some(e=>e.values.length>200)),message:[`👀 Some series contain > 200 data points, which can affect performance. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values.`,``,`▶️ Filter the time range by adding date inputs in your UI.`]},{test:e=>e.length<6&&e.length>0,message:[`👀 The number of series < 6. Consider:`,``,`▶️ Using VueUiXy instead`]}]});let z=d(()=>M.value.userOptions.useCursorPointer),en=d(()=>se({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,areas:{maxPoint:{show:!1},opacity:.9,stroke:{useSerieColor:!0}},legend:{backgroundColor:`transparent`},padding:{right:-24,left:0},xAxis:{labels:{values:[]}},yAxis:{labels:{fontSize:0}},zeroLine:{show:!1}}}},userConfig:M.value.skeletonConfig??{}})),{loading:tn,FINAL_DATASET:B,manualLoading:nn}=ge({...$e(T),FINAL_CONFIG:M,prepareConfig:$t,skeletonDataset:T.config?.skeletonDataset??[{name:`_`,datapoints:[{name:`__`,color:`#999999`,values:[28.639,32.04,41.134,44.525,21.151,2.436,.218,.024,.002,0,0,0]},{name:`_`,color:`#CACACA`,values:[13.253,15.621,23.36,33.698,29.935,10.874,2.364,.561,.107,.02,.006,.004]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[10.851,13.195,21.617,36.556,42.292,21.006,3.398,.223,.013,.001,0,0]},{name:`_`,color:`#CACACA`,values:[3.171,4.115,8.108,18.248,31.641,29.063,12.031,2.742,.504,.102,.032,.021]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[1.731,2.334,5.125,13.626,29.911,38.524,24.168,7.646,1.575,.317,.097,.063]},{name:`_`,color:`#CACACA`,values:[.25,.367,1.026,3.944,13.635,28.891,30.149,15.419,4.714,1.246,.442,.299]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[.034,.054,.194,1.065,5.747,20.735,38.306,32.899,15.318,5.566,2.422,1.76]},{name:`_`,color:`#CACACA`,values:[.001,.002,.009,.095,1.124,8.342,27.115,35.08,21.449,9.093,4.243,3.143]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,.001,.004,.051,.567,3.322,14.215,44.783,40.351,20.377,9.866,7.378]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,.001,.11,4.136,27.498,43.24,29.807,17.345,13.678]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,0,0,0,.025,.598,3.886,10.645,54.479,45.953,30.814,24.55]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,0,0,.007,1.655,26.63,52.017,45.192,39.651]}]}],skeletonConfig:se({defaultConfig:M.value,userConfig:en.value})}),V=y(Math.min(P.value.height,P.value.rowHeight)),{userOptionsVisible:rn,setUserOptionsVisibility:an,keepUserOptionState:on}=Re({config:M.value}),{svgRef:H}=ze({config:R.value.title}),sn=d(()=>M.value.debug);function cn(){let e=B.value||[];if(!Array.isArray(e)||e.length===0)oe({componentName:`VueUiRidgeline`,type:`dataset`,debug:sn.value}),nn.value=!0;else if(e.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`datapoints`]}).forEach(e=>{Pt.value=!1,oe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:e,index:t,debug:sn.value})}),Array.isArray(e.datapoints)&&e.datapoints.length&&e.datapoints.forEach((e,n)=>{me({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Pt.value=!1,oe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:`datapoint.${e}`,index:`${t}-${n}`,debug:sn.value})})})}),Wt.value=e.length,V.value=Math.min(P.value.height,P.value.rowHeight),he(T.dataset)||(nn.value=M.value.loading),M.value.responsive){let t=Ne(()=>{let{width:t,height:n}=Pe({chart:E.value,title:R.value.title.text?It.value:null,legend:R.value.legend.show?Lt.value:null,source:Rt.value,noTitle:zt.value,padding:R.value.padding});requestAnimationFrame(()=>{Gt.value=t,V.value=e.length?n/e.length:0,Jt.value=n-12})});D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect()),D.value=new ResizeObserver(t),O.value=E.value?.parentNode||null,O.value&&D.value.observe(O.value)}}Xe(()=>{D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect())});let{isPrinting:ln,isImaging:un,generatePdf:dn,generateImage:fn}=Ae({elementId:`vue-ui-ridgeline_${k.value}`,fileName:R.value.title.text||`vue-ui-ridgeline`,options:M.value.userOptions.print}),pn=d(()=>M.value.userOptions.show&&!R.value.title.text),mn=d(()=>fe(M.value.customPalette)),U=y({showTable:M.value.table.show});et(()=>B.value,async e=>{Array.isArray(e)&&e.length&&(rn.value=!M.value.userOptions.showOnChartHover,await qe(),cn(),Bt.value+=1,Ht.value+=1,U.value.showTable=M.value.table.show)},{deep:!0,immediate:!0}),et(()=>T.dataset,e=>{Array.isArray(e)&&e.length>0&&(nn.value=!1)},{deep:!0}),et(()=>tn.value,async e=>{e||(await qe(),cn())},{immediate:!0}),et(()=>T.config,()=>{M.value=$t(B.value||null),rn.value=!M.value.userOptions.showOnChartHover,V.value=Math.min(P.value.height,P.value.rowHeight),U.value.showTable=M.value.table.show,Bt.value+=1,Ht.value+=1},{deep:!0});let hn=d(()=>P.value.height/P.value.rowHeight);function gn(){X.value.length?X.value=[]:Z.value.forEach(e=>{X.value.push(e.id)}),Ft(`selectLegend`,Y.value)}function _n(e){X.value.includes(e)?X.value=X.value.filter(t=>t!==e):X.value.push(e),Ft(`selectLegend`,Y.value)}function vn(e){return Z.value.length?Z.value.find(t=>t.name===e)||(sn.value&&console.warn(`VueUiRidgeline - Series name not found "${e}"`),null):(sn.value&&console.warn(`VueUiRidgeline - There are no series to show.`),null)}function yn(e){let t=vn(e);t!==null&&X.value.includes(t.id)&&_n(t.id)}function bn(e){let t=vn(e);t!==null&&(X.value.includes(t.id)||_n(t.id))}let W=d(()=>Pt.value?(B.value||[]).map(e=>({...e,labelLen:Pn(e.name,L.value.fontSize),uid:ie(),datapoints:e.datapoints.map((e,t)=>{let n=e.color?ne(e.color):mn.value[t]||s[t]||s[t%s.length],r=ae(e.name);return{...e,color:n,id:r}})})):[]),xn=d(()=>R.value.padding.top+V.value*(B.value||[]).length+V.value*hn.value+R.value.padding.bottom),G=d(()=>{let e=R.value.padding;return{width:Gt.value,height:xn.value,padding:e}}),Sn=d(()=>G.value.width),Cn=d(()=>G.value.height),wn=y(0),Tn=Ne(e=>{wn.value=e},100);tt(e=>{let t=Yt.value;if(!t)return;let n=new ResizeObserver(e=>{Tn(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Xe(()=>{wn.value=0});let K=d(()=>({fullHeight:G.value.height+wn.value,top:G.value.padding.top,left:G.value.padding.left,right:G.value.width-G.value.padding.right,bottom:G.value.height-R.value.padding.bottom,width:G.value.width-(G.value.padding.left+G.value.padding.right)})),En=d(()=>Math.max(...W.value.flatMap(e=>e.datapoints.map(e=>e.values.length)))),q=y([]),Dn=0;tt(()=>{let e=++Dn;(async()=>{let t=await ke({values:I.value.values,maxDatapoints:En.value,formatter:I.value.datetimeFormatter,start:0,end:I.value.values.length});e===Dn&&(q.value=t)})()});let J=d(()=>{let e=Math.max(...W.value.map(e=>e.labelLen)),t=G.value.padding.left+e+16+L.value.offsetX,n=(K.value.width-t)/En.value,r=[];for(let e=0;e<En.value;e+=1)r.push({selectorX:t+n*e,x:t+n*e-n/2,y:K.value.top,label:I.value.values[e]?q.value[e]?.text??``:``,index:e,width:n,height:xn.value});return r});function On(e){return W.value.map(t=>t.datapoints.map(t=>({dp:t,selected:t.values[e.index]})))}function kn(e){A.value=e;let t=On(e);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:e.index})}function An(e){A.value=null;let t=On(e);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:t,seriesIndex:e.index})}function jn(e){let t=On(e);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:e.index}),Ft(`selectX`,t)}function Mn(e,t){return e.length*t/2+t}function Nn(e,t,n){return e+Mn(t,n)>K.value.right}function Pn(e,t,n=`sans-serif`){let r=document.createElement(`canvas`).getContext(`2d`);return r.font=`${typeof t==`number`?`${t}px`:t} ${n}`,r.measureText(e).width}let Y=d(()=>{V.value;let e=Math.max(...W.value.map(e=>e.labelLen)),t=Math.max(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),n=Math.min(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),r=G.value.padding.left+e+16+L.value.offsetX,i=(K.value.width-r)/En.value,a=Math.abs(Math.min(n,0)),o=t+a;function s(e){return isNaN(e/o)?0:e/o}return W.value.map((e,t)=>{let n=V.value*hn.value*(1-s(a)),o=K.value.top+V.value*t,c=K.value.top+o+n;return{...e,label:{x:r-L.value.fontSize,y:(L.value.centered?c-n/2:c)+L.value.offsetY},datapoints:e.datapoints.map(e=>{let t=e.values.map((t,n)=>{let ee=isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0;return{x:r+i*n,y:K.value.top+o+V.value*hn.value*(1-s(ee+a)),value:t,isMaxPoint:t===Math.max(...e.values),zero:c}}),n=`${ee(t,c,!1,!1)}`,ne=`M ${r},${c} ${re(t)} ${t.at(-1).x},${c}`,ae=`M ${r},${c} ${t.at(-1).x},${c}`,oe=`M ${te(t)}`,l=`M ${re(t)}`,se=pe(P.value.smooth?oe:l);return{...e,uid:ie(),plots:t,smoothPath:n,straightPath:ne,zeroPath:ae,pathLength:se,smoothPathRidge:oe,straightPathRidge:l}}).filter(e=>!X.value.includes(e.id))}})}),X=y([]);function Fn(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{e.datapoints.forEach((e,n)=>{let r=ae(e.name);t.has(r)||t.set(r,{id:r,name:e.name,color:e.color,shape:`circle`,segregate:()=>_n(r),isSegregated:X.value.includes(r),opacity:X.value.includes(r)?.5:1})})}),Array.from(t.values())}let Z=d(()=>Fn(W.value)),In=d(()=>({cy:`donut-div-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),Q=y(!1);function Ln(e){Q.value=e,Ut.value+=1}let Rn=y({}),zn=y([]);function Bn(e){Ft(`selectDatapoint`,e),R.value.dialog.show&&(zn.value=e.datapoints.map(e=>({name:e.name,color:e.color,type:`line`,useArea:!0,smooth:P.value.smooth,series:e.values})),Kt.value=e,Rn.value=de({...R.value.dialog.xyChart,responsive:!0,chart:{...R.value.dialog.xyChart.chart,grid:{...R.value.dialog.xyChart.chart.grid,labels:{...R.value.dialog.xyChart.chart.grid.labels,xAxisLabels:{...R.value.dialog.xyChart.chart.grid.labels.xAxisLabels,values:I.value.values,autoRotate:{enable:!0,angle:R.value.dialog.xyChart.chart.grid.labels.xAxisLabels.autoRotate.angle},datetimeFormatter:I.value.datetimeFormatter}}},tooltip:{...R.value.dialog.xyChart.chart.tooltip,showTimeLabel:I.value.values.length>0},userOptions:{...R.value.dialog.xyChart.chart.userOptions,buttons:{...R.value.dialog.xyChart.chart.userOptions.buttons,altCopy:M.value.userOptions.buttons.altCopy},callbacks:{...R.value.dialog.xyChart.chart.userOptions.callbacks,altCopy:()=>{}},useCursorPointer:M.value.userOptions.useCursorPointer}}}),qt.value&&qt.value.open())}let Vn=y(null);function Hn(e){Vn.value=e}function Un(){Vn.value=null}let Wn=y(!1);function Gn(){Wn.value=!Wn.value}function Kn(){U.value.showTable=!U.value.showTable}let qn=d(()=>({body:Y.value.flatMap(e=>e.datapoints.flatMap(t=>({...t,rowName:`${e.name}: ${t.name}`}))).map(e=>[{name:e.rowName,color:e.color},...e.values])})),$=d(()=>{let e=[M.value.table.columnNames.series,...q.value.map(e=>e.text)],t={th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint};return{colNames:[M.value.table.columnNames.series,...q.value.map(e=>e.text)],head:e,body:qn.value.body,config:t}});function Jn(e=null){qe(()=>{let t=[[M.value.table.columnNames.series,...q.map(e=>[e.text])],...qn.value.body.map((e,t)=>[e[0].name,...e.slice(1)])],n=[[R.value.title.text],[R.value.title.subtitle.text]].concat(t),r=o(n);e?e(r):ce({csvContent:r,title:R.value.title.text||`vue-ui-ridgeline`})})}function Yn(){return Y.value}let Xn=Se(E,()=>R.value.title.text),Zn=d(()=>({min:0,max:En.value}));je({timeLabelsEls:Yt,timeLabels:q,slicer:Zn,configRef:M,rotationPath:[`style`,`chart`,`xAxis`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`xAxis`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Sn,height:Cn,targetClass:`.vue-ui-ridgeline-x-axis-label`,angle:I.value.autoRotate.angle});let Qn=d(()=>Ee({config:M,style:R,mutableConfig:U,dialog:Mt,accordion:Dt,isFullscreen:Q,parent:E,maxWidth:800,isCursorPointer:z}));et(()=>U.value.showTable,e=>Te(e,M,Xt));function $n(){U.value.showTable=!1,Zt.value&&Zt.value.setTableIconState(!1)}let er=d(()=>R.value.backgroundColor),tr=d(()=>({...R.value.legend,position:`bottom`})),nr=d(()=>R.value.title),{isCallbackImaging:rr,isCallbackSvg:ir,generateSvg:ar,onGenerateImage:or}=we({svg:H,title:nr,legend:tr,legendItems:Z,backgroundColor:er,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:fn});function sr(e){cr(`xy-zoom`,e.dataset,e.config)}async function cr(e=`main-chart`,t=null,n=null){Ft(`copyAlt`,{source:e,config:e===`main-chart`?M.value:Rn.value,dataset:e===`main-chart`?Y.value:zn.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({source:e,config:e===`main-chart`?M.value:Rn.value,dataset:e===`main-chart`?Y.value:zn.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function lr(){j.value=null,Qt.value=!0}function ur(){mr(),Qt.value=!1}function dr(e){if(!H.value||Wn.value||document.activeElement!==H.value||!Y.value.length)return;let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){mr();return}if(a){if(j.value!==null){let e=Y.value[j.value];e&&Bn(e);return}A.value&&jn(A.value);return}if(t||n){let e=j.value;e=e===null?n?0:Y.value.length-1:fr(e+(n?1:-1)),j.value=e,Vn.value=e;return}if(!J.value.length)return;let s=A.value?.index??null;s=s===null?i?0:J.value.length-1:pr(s+(i?1:-1));let c=J.value[s];c&&kn(c)}function fr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function pr(e){let t=J.value.length;return t?(e%t+t)%t:null}function mr(){j.value=null,Vn.value=null,A.value?An(A.value):A.value=null}let hr=d(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,...e.slice(1)]),caption:M.value.a11y.translations.tableCaption,notice:M.value.a11y.translations.tableAvailable}));return be({getData:Yn,getImage:Xn,generateImage:fn,generateSvg:ar,generatePdf:dn,generateCsv:Jn,hideSeries:bn,showSeries:yn,toggleAnnotator:Gn,toggleTable:Kn,toggleFullscreen:Ln,copyAlt:cr}),(e,i)=>(v(),m(`div`,{ref_key:`ridgelineChart`,ref:E,class:Je(`vue-data-ui-component vue-ui-ridgeline ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),id:`vue-ui-ridgeline_${k.value}`,style:_({fontFamily:M.value.style.fontFamily,width:`100%`,textAlign:`center`,background:R.value.backgroundColor,height:M.value.responsive?`100%`:void 0}),onMouseenter:i[3]||=()=>C(an)(!0),onMouseleave:i[4]||=()=>C(an)(!1)},[h(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[h(`p`,null,S(M.value.a11y.translations.keyboardNavigation),1)],8,it),hr.value.body.length?(v(),f(Le,{key:0,uid:k.value,head:hr.value.head,body:hr.value.body,caption:hr.value.caption,notice:hr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),N.value.buttons.annotator&&C(H)?(v(),f(C(kt),Ke({key:1},C(n)(N.value.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Wn.value,svgRef:C(H),isCursorPointer:z.value,onClose:Gn}),He({_:2},[b(C(r),n=>({name:n,fn:w(r=>[x(e.$slots,n,Ye(Ge(C(t)(n,r))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`])):p(``,!0),x(e.$slots,`userConfig`,{},void 0,!0),pn.value?(v(),m(`div`,{key:2,ref_key:`noTitle`,ref:zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),R.value.title.text?(v(),m(`div`,{key:3,ref_key:`chartTitle`,ref:It,style:`width:100%;background:transparent;padding-bottom:24px`},[(v(),f(Ce,{key:`title_${Bt.value}`,config:{title:{cy:`ridgeline-div-title`,...R.value.title},subtitle:{cy:`ridgeline-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),N.value.show&&Pt.value&&(C(on)||C(rn))?(v(),f(C(At),{ref_key:`userOptionsRef`,ref:Zt,key:`user_option_${Ut.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:C(ln),isImaging:C(un),uid:k.value,hasTooltip:!1,callbacks:N.value.callbacks,hasPdf:N.value.buttons.pdf,hasImg:N.value.buttons.img,hasSvg:N.value.buttons.svg,hasXls:N.value.buttons.csv,hasTable:N.value.buttons.table,hasLabel:!1,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:Q.value,printScale:N.value.print.scale,chartElement:E.value,position:N.value.position,isTooltip:!1,titles:{...N.value.buttonTitles},hasAnnotator:N.value.buttons.annotator,isAnnotation:Wn.value,tableDialog:M.value.table.useDialog,style:_({visibility:C(on)?C(rn)?`visible`:`hidden`:`visible`}),isCursorPointer:z.value,onToggleFullscreen:Ln,onGeneratePdf:C(dn),onGenerateCsv:Jn,onGenerateImage:C(or),onGenerateSvg:C(ar),onToggleTable:Kn,onToggleAnnotator:Gn,onCopyAlt:cr},He({_:2},[b(C(De)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:w(n=>[x(e.$slots,t,Ye(Ge(C(Oe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.callbacks.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.printScale.chartElement.position.titles.hasAnnotator.isAnnotation.tableDialog.style.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg`.split(`.`))):p(``,!0),h(`div`,at,[(v(),m(`svg`,{ref_key:`svgRef`,ref:H,xmlns:C(ue),"aria-describedby":`chart-instructions-${k.value}`,class:Je({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${K.value.fullHeight<=0?10:K.value.fullHeight}`,style:_(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color};${M.value.responsive?`height: ${Jt.value}px; width: 100%;`:``}`),tabindex:`0`,onFocus:lr,onBlur:ur,onKeydown:dr},[We(C(jt)),x(e.$slots,`svg-underlayer`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:C(ln)||C(un)||C(rr),isPrintingSvg:C(ir),data:Y.value}},void 0,!0),h(`defs`,null,[(v(!0),m(u,null,b(Z.value,(e,t)=>(v(),f(Fe,{t:`linear`,id:`gradient-${e.id}-${k.value}`,key:`gradient-${e.id}-${k.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128)),(v(!0),m(u,null,b(Y.value,(e,t)=>(v(),m(u,null,[(v(!0),m(u,null,b(e.datapoints,(e,t)=>(v(),f(Fe,{t:`linear`,key:`grad${e.id}`,id:`gradient-single-${k.value}-${e.uid}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128))],64))),256))]),(v(!0),m(u,null,b(Y.value,(t,n)=>(v(),m(`g`,{key:`ds-${n}`},[(v(!0),m(u,null,b(t.datapoints,(t,r)=>(v(),m(`g`,{key:t.id},[e.$slots.pattern?(v(),m(`g`,st,[h(`defs`,null,[x(e.$slots,`pattern`,Ke({ref_for:!0},{datapointIndex:n,seriesIndex:r,patternId:`pattern_${k.value}_${t.uid}`}),void 0,!0)])])):p(``,!0),h(`path`,{fill:e.$slots.pattern?`url(#pattern_${k.value}_${t.uid})`:R.value.backgroundColor,stroke:`none`,"stroke-linecap":`round`,d:P.value.smooth?t.smoothPath:t.straightPath,style:_({opacity:P.value.opacity})},null,12,ct),h(`path`,{fill:`none`,stroke:P.value.stroke.useSerieColor?t.color:P.value.stroke.color,"stroke-width":P.value.strokeWidth,d:P.value.smooth?t.smoothPathRidge:t.straightPathRidge,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,lt),h(`path`,{fill:P.value.useGradient?P.value.useCommonColor?`url(#gradient-${t.id}-${k.value})`:`url(#gradient-single-${k.value}-${t.uid})`:t.color,stroke:`none`,d:P.value.smooth?t.smoothPath:t.straightPath,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,ut),R.value.zeroLine.show?(v(),m(`path`,{key:1,stroke:R.value.zeroLine.useSerieColor?t.color:R.value.zeroLine.stroke,"stroke-dasharray":R.value.zeroLine.strokeDasharray,"stroke-width":R.value.zeroLine.strokeWidth,d:t.zeroPath,"stroke-linecap":`round`},null,8,dt)):p(``,!0),P.value.maxPoint.show&&t.plots.length>1?(v(!0),m(u,{key:2},b(t.plots,e=>(v(),m(u,null,[e.isMaxPoint?(v(),m(`line`,{key:0,x1:e.x,y1:e.y,x2:e.x,y2:e.zero,stroke:P.value.maxPoint.adaptStrokeToBackground?C(le)(t.color):P.value.maxPoint.stroke,"stroke-width":P.value.maxPoint.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":P.value.maxPoint.strokeDasharray},null,8,ft)):p(``,!0)],64))),256)):p(``,!0),t.plots.length===1?(v(),m(`circle`,{key:3,cx:t.plots[0].x,cy:t.plots[0].y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?t.color:F.value.dot.fill,style:{pointerEvents:`none`}},null,8,pt)):p(``,!0)]))),128)),h(`text`,{x:t.label.x,y:t.label.y,"text-anchor":`end`,"font-size":L.value.fontSize,"font-weight":L.value.bold?`bold`:`normal`,fill:L.value.color,style:_({cursor:R.value.dialog.show&&z.value?`pointer`:`default`}),"text-decoration":R.value.dialog.show&&(Vn.value===n||Kt.value&&t.uid===Kt.value.uid||j.value===n)?`underline`:``,"dominant-baseline":`middle`,onMouseenter:e=>Hn(n),onMouseleave:Un,onClick:e=>Bn(t)},S(t.name),45,mt)]))),128)),I.value.values.length?(v(),m(`g`,{key:0,ref_key:`timeLabelsEls`,ref:Yt},[(v(!0),m(u,null,b(J.value,(t,n)=>x(e.$slots,`time-label`,Ke({ref_for:!0},{show:t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&A.value&&A.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0,fontSize:I.value.fontSize,content:t.label,textAnchor:I.value.rotation>0?`start`:I.value.rotation<0?`end`:`middle`,fill:I.value.color,transform:`translate(${t.selectorX}, ${K.value.top+t.height+I.value.offsetY}), rotate(${I.value.rotation})`,x:t.selectorX,y:K.value.bottom+I.value.offsetY}),()=>[t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&A.value&&A.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0?(v(),m(`g`,ht,[String(t.label).includes(`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Ht as s,J as c,N as ee,P as te,S as ne,U as re,X as ie,Xt as ae,at as oe,i as l,in as se,nt as ce,r as le,t as ue,tt as de,w as fe,xt as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as xe}from"./resolveChartConfig-CIhClE5R.js";import{t as Se}from"./chartImage-DPGnEuYM.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{n as Te,t as Ee}from"./tableIntegration-CNoJ1CIY.js";import{n as De,t as Oe}from"./userOptionsSlots-DYuo-E5m.js";import{t as ke}from"./useTimeLabels-Das5O74F.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{t as je}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Me}from"./Shape-CRe8woTu.js";import{c as Ne}from"./canvas-lib-22VpOI4_.js";import{t as Pe}from"./useResponsive-CENUxfEL.js";import{t as Fe}from"./DefGrad-DKMq1REY.js";import{t as Ie}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Le}from"./A11yDataTable-DWNlWXzs.js";import{t as Re}from"./useUserOptionState-CXlFnwPv.js";import{t as ze}from"./useChartAccessibility-DOMuYJfm.js";import{t as Be}from"./Legend-DM0ClX3D.js";import{t as Ve}from"./vue_ui_ridgeline-Di26JtQu.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as He,createTextVNode as Ue,createVNode as We,defineAsyncComponent as g,guardReactiveProps as Ge,mergeProps as Ke,nextTick as qe,normalizeClass as Je,normalizeProps as Ye,normalizeStyle as _,onBeforeUnmount as Xe,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as Ze,shallowRef as Qe,toDisplayString as S,toRefs as $e,unref as C,watch as et,watchEffect as tt,withCtx as w}from"vue";var nt=/* @__PURE__ */ e({default:()=>Tt}),rt=[`id`],it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st={key:0},ct=[`fill`,`d`],lt=[`stroke`,`stroke-width`,`d`],ut=[`fill`,`d`],dt=[`stroke`,`stroke-dasharray`,`stroke-width`,`d`],ft=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],pt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],mt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`text-decoration`,`onMouseenter`,`onClick`],ht={key:0},gt=[`font-size`,`fill`,`stroke`,`font-weight`,`transform`,`text-anchor`],_t=[`font-size`,`fill`,`font-weight`,`transform`,`text-anchor`,`innerHTML`],vt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],bt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],xt=[`x`,`y`,`stroke`,`text-anchor`,`font-size`,`fill`],St={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ct={key:5,class:`vue-data-ui-watermark`},wt=[`onClick`],Tt=/*#__PURE__*/ be({__name:`vue-ui-ridgeline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`selectX`,`copyAlt`],setup(e,{expose:be,emit:nt}){let Tt=g(()=>import(`./vue-ui-xy-CpS-ASnd.js`).then(e=>e.n)),Et=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Dt=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ot=g(()=>import(`./DataTable-Dof6yhO7.js`)),kt=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),At=g(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),jt=g(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Mt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_ridgeline:Nt}=i(),T=e,Pt=d({get(){return Array.isArray(B.value)&&B.value.length>0},set(e){return e}}),Ft=nt,E=y(null),It=y(null),Lt=y(null),D=Qe(null),O=Qe(null),Rt=y(null),zt=y(null),Bt=y(0),Vt=y(0),Ht=y(0),k=y(ie()),Ut=y(0),Wt=y(0),Gt=y(512),A=y(null),Kt=y(null),qt=y(null),Jt=y(0),Yt=y(null),Xt=y(null),Zt=y(null),j=y(null),Qt=y(!1);function $t(){return xe(T.config,Nt,Ve)}let M=y($t()),N=d(()=>M.value.userOptions),P=d(()=>M.value.style.chart.areas),F=d(()=>M.value.style.chart.selector),I=d(()=>M.value.style.chart.xAxis.labels),L=d(()=>M.value.style.chart.yAxis.labels),R=d(()=>M.value.style.chart);ve({config:()=>M.value,dataset:()=>T.dataset,component:`VueUiRidgeline`,rules:[ye.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.some(e=>e.datapoints.some(e=>e.values.length>200)),message:[`👀 Some series contain > 200 data points, which can affect performance. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values.`,``,`▶️ Filter the time range by adding date inputs in your UI.`]},{test:e=>e.length<6&&e.length>0,message:[`👀 The number of series < 6. Consider:`,``,`▶️ Using VueUiXy instead`]}]});let z=d(()=>M.value.userOptions.useCursorPointer),en=d(()=>se({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,areas:{maxPoint:{show:!1},opacity:.9,stroke:{useSerieColor:!0}},legend:{backgroundColor:`transparent`},padding:{right:-24,left:0},xAxis:{labels:{values:[]}},yAxis:{labels:{fontSize:0}},zeroLine:{show:!1}}}},userConfig:M.value.skeletonConfig??{}})),{loading:tn,FINAL_DATASET:B,manualLoading:nn}=ge({...$e(T),FINAL_CONFIG:M,prepareConfig:$t,skeletonDataset:T.config?.skeletonDataset??[{name:`_`,datapoints:[{name:`__`,color:`#999999`,values:[28.639,32.04,41.134,44.525,21.151,2.436,.218,.024,.002,0,0,0]},{name:`_`,color:`#CACACA`,values:[13.253,15.621,23.36,33.698,29.935,10.874,2.364,.561,.107,.02,.006,.004]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[10.851,13.195,21.617,36.556,42.292,21.006,3.398,.223,.013,.001,0,0]},{name:`_`,color:`#CACACA`,values:[3.171,4.115,8.108,18.248,31.641,29.063,12.031,2.742,.504,.102,.032,.021]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[1.731,2.334,5.125,13.626,29.911,38.524,24.168,7.646,1.575,.317,.097,.063]},{name:`_`,color:`#CACACA`,values:[.25,.367,1.026,3.944,13.635,28.891,30.149,15.419,4.714,1.246,.442,.299]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[.034,.054,.194,1.065,5.747,20.735,38.306,32.899,15.318,5.566,2.422,1.76]},{name:`_`,color:`#CACACA`,values:[.001,.002,.009,.095,1.124,8.342,27.115,35.08,21.449,9.093,4.243,3.143]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,.001,.004,.051,.567,3.322,14.215,44.783,40.351,20.377,9.866,7.378]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,.001,.11,4.136,27.498,43.24,29.807,17.345,13.678]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,0,0,0,.025,.598,3.886,10.645,54.479,45.953,30.814,24.55]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,0,0,.007,1.655,26.63,52.017,45.192,39.651]}]}],skeletonConfig:se({defaultConfig:M.value,userConfig:en.value})}),V=y(Math.min(P.value.height,P.value.rowHeight)),{userOptionsVisible:rn,setUserOptionsVisibility:an,keepUserOptionState:on}=Re({config:M.value}),{svgRef:H}=ze({config:R.value.title}),sn=d(()=>M.value.debug);function cn(){let e=B.value||[];if(!Array.isArray(e)||e.length===0)oe({componentName:`VueUiRidgeline`,type:`dataset`,debug:sn.value}),nn.value=!0;else if(e.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`datapoints`]}).forEach(e=>{Pt.value=!1,oe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:e,index:t,debug:sn.value})}),Array.isArray(e.datapoints)&&e.datapoints.length&&e.datapoints.forEach((e,n)=>{me({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Pt.value=!1,oe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:`datapoint.${e}`,index:`${t}-${n}`,debug:sn.value})})})}),Wt.value=e.length,V.value=Math.min(P.value.height,P.value.rowHeight),he(T.dataset)||(nn.value=M.value.loading),M.value.responsive){let t=Ne(()=>{let{width:t,height:n}=Pe({chart:E.value,title:R.value.title.text?It.value:null,legend:R.value.legend.show?Lt.value:null,source:Rt.value,noTitle:zt.value,padding:R.value.padding});requestAnimationFrame(()=>{Gt.value=t,V.value=e.length?n/e.length:0,Jt.value=n-12})});D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect()),D.value=new ResizeObserver(t),O.value=E.value?.parentNode||null,O.value&&D.value.observe(O.value)}}Xe(()=>{D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect())});let{isPrinting:ln,isImaging:un,generatePdf:dn,generateImage:fn}=Ae({elementId:`vue-ui-ridgeline_${k.value}`,fileName:R.value.title.text||`vue-ui-ridgeline`,options:M.value.userOptions.print}),pn=d(()=>M.value.userOptions.show&&!R.value.title.text),mn=d(()=>fe(M.value.customPalette)),U=y({showTable:M.value.table.show});et(()=>B.value,async e=>{Array.isArray(e)&&e.length&&(rn.value=!M.value.userOptions.showOnChartHover,await qe(),cn(),Bt.value+=1,Ht.value+=1,U.value.showTable=M.value.table.show)},{deep:!0,immediate:!0}),et(()=>T.dataset,e=>{Array.isArray(e)&&e.length>0&&(nn.value=!1)},{deep:!0}),et(()=>tn.value,async e=>{e||(await qe(),cn())},{immediate:!0}),et(()=>T.config,()=>{M.value=$t(B.value||null),rn.value=!M.value.userOptions.showOnChartHover,V.value=Math.min(P.value.height,P.value.rowHeight),U.value.showTable=M.value.table.show,Bt.value+=1,Ht.value+=1},{deep:!0});let hn=d(()=>P.value.height/P.value.rowHeight);function gn(){X.value.length?X.value=[]:Z.value.forEach(e=>{X.value.push(e.id)}),Ft(`selectLegend`,Y.value)}function _n(e){X.value.includes(e)?X.value=X.value.filter(t=>t!==e):X.value.push(e),Ft(`selectLegend`,Y.value)}function vn(e){return Z.value.length?Z.value.find(t=>t.name===e)||(sn.value&&console.warn(`VueUiRidgeline - Series name not found "${e}"`),null):(sn.value&&console.warn(`VueUiRidgeline - There are no series to show.`),null)}function yn(e){let t=vn(e);t!==null&&X.value.includes(t.id)&&_n(t.id)}function bn(e){let t=vn(e);t!==null&&(X.value.includes(t.id)||_n(t.id))}let W=d(()=>Pt.value?(B.value||[]).map(e=>({...e,labelLen:Pn(e.name,L.value.fontSize),uid:ie(),datapoints:e.datapoints.map((e,t)=>{let n=e.color?ne(e.color):mn.value[t]||s[t]||s[t%s.length],r=ae(e.name);return{...e,color:n,id:r}})})):[]),xn=d(()=>R.value.padding.top+V.value*(B.value||[]).length+V.value*hn.value+R.value.padding.bottom),G=d(()=>{let e=R.value.padding;return{width:Gt.value,height:xn.value,padding:e}}),Sn=d(()=>G.value.width),Cn=d(()=>G.value.height),wn=y(0),Tn=Ne(e=>{wn.value=e},100);tt(e=>{let t=Yt.value;if(!t)return;let n=new ResizeObserver(e=>{Tn(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Xe(()=>{wn.value=0});let K=d(()=>({fullHeight:G.value.height+wn.value,top:G.value.padding.top,left:G.value.padding.left,right:G.value.width-G.value.padding.right,bottom:G.value.height-R.value.padding.bottom,width:G.value.width-(G.value.padding.left+G.value.padding.right)})),En=d(()=>Math.max(...W.value.flatMap(e=>e.datapoints.map(e=>e.values.length)))),q=y([]),Dn=0;tt(()=>{let e=++Dn;(async()=>{let t=await ke({values:I.value.values,maxDatapoints:En.value,formatter:I.value.datetimeFormatter,start:0,end:I.value.values.length});e===Dn&&(q.value=t)})()});let J=d(()=>{let e=Math.max(...W.value.map(e=>e.labelLen)),t=G.value.padding.left+e+16+L.value.offsetX,n=(K.value.width-t)/En.value,r=[];for(let e=0;e<En.value;e+=1)r.push({selectorX:t+n*e,x:t+n*e-n/2,y:K.value.top,label:I.value.values[e]?q.value[e]?.text??``:``,index:e,width:n,height:xn.value});return r});function On(e){return W.value.map(t=>t.datapoints.map(t=>({dp:t,selected:t.values[e.index]})))}function kn(e){A.value=e;let t=On(e);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:e.index})}function An(e){A.value=null;let t=On(e);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:t,seriesIndex:e.index})}function jn(e){let t=On(e);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:e.index}),Ft(`selectX`,t)}function Mn(e,t){return e.length*t/2+t}function Nn(e,t,n){return e+Mn(t,n)>K.value.right}function Pn(e,t,n=`sans-serif`){let r=document.createElement(`canvas`).getContext(`2d`);return r.font=`${typeof t==`number`?`${t}px`:t} ${n}`,r.measureText(e).width}let Y=d(()=>{V.value;let e=Math.max(...W.value.map(e=>e.labelLen)),t=Math.max(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),n=Math.min(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),r=G.value.padding.left+e+16+L.value.offsetX,i=(K.value.width-r)/En.value,a=Math.abs(Math.min(n,0)),o=t+a;function s(e){return isNaN(e/o)?0:e/o}return W.value.map((e,t)=>{let n=V.value*hn.value*(1-s(a)),o=K.value.top+V.value*t,c=K.value.top+o+n;return{...e,label:{x:r-L.value.fontSize,y:(L.value.centered?c-n/2:c)+L.value.offsetY},datapoints:e.datapoints.map(e=>{let t=e.values.map((t,n)=>{let ee=isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0;return{x:r+i*n,y:K.value.top+o+V.value*hn.value*(1-s(ee+a)),value:t,isMaxPoint:t===Math.max(...e.values),zero:c}}),n=`${ee(t,c,!1,!1)}`,ne=`M ${r},${c} ${re(t)} ${t.at(-1).x},${c}`,ae=`M ${r},${c} ${t.at(-1).x},${c}`,oe=`M ${te(t)}`,l=`M ${re(t)}`,se=pe(P.value.smooth?oe:l);return{...e,uid:ie(),plots:t,smoothPath:n,straightPath:ne,zeroPath:ae,pathLength:se,smoothPathRidge:oe,straightPathRidge:l}}).filter(e=>!X.value.includes(e.id))}})}),X=y([]);function Fn(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{e.datapoints.forEach((e,n)=>{let r=ae(e.name);t.has(r)||t.set(r,{id:r,name:e.name,color:e.color,shape:`circle`,segregate:()=>_n(r),isSegregated:X.value.includes(r),opacity:X.value.includes(r)?.5:1})})}),Array.from(t.values())}let Z=d(()=>Fn(W.value)),In=d(()=>({cy:`donut-div-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),Q=y(!1);function Ln(e){Q.value=e,Ut.value+=1}let Rn=y({}),zn=y([]);function Bn(e){Ft(`selectDatapoint`,e),R.value.dialog.show&&(zn.value=e.datapoints.map(e=>({name:e.name,color:e.color,type:`line`,useArea:!0,smooth:P.value.smooth,series:e.values})),Kt.value=e,Rn.value=de({...R.value.dialog.xyChart,responsive:!0,chart:{...R.value.dialog.xyChart.chart,grid:{...R.value.dialog.xyChart.chart.grid,labels:{...R.value.dialog.xyChart.chart.grid.labels,xAxisLabels:{...R.value.dialog.xyChart.chart.grid.labels.xAxisLabels,values:I.value.values,autoRotate:{enable:!0,angle:R.value.dialog.xyChart.chart.grid.labels.xAxisLabels.autoRotate.angle},datetimeFormatter:I.value.datetimeFormatter}}},tooltip:{...R.value.dialog.xyChart.chart.tooltip,showTimeLabel:I.value.values.length>0},userOptions:{...R.value.dialog.xyChart.chart.userOptions,buttons:{...R.value.dialog.xyChart.chart.userOptions.buttons,altCopy:M.value.userOptions.buttons.altCopy},callbacks:{...R.value.dialog.xyChart.chart.userOptions.callbacks,altCopy:()=>{}},useCursorPointer:M.value.userOptions.useCursorPointer}}}),qt.value&&qt.value.open())}let Vn=y(null);function Hn(e){Vn.value=e}function Un(){Vn.value=null}let Wn=y(!1);function Gn(){Wn.value=!Wn.value}function Kn(){U.value.showTable=!U.value.showTable}let qn=d(()=>({body:Y.value.flatMap(e=>e.datapoints.flatMap(t=>({...t,rowName:`${e.name}: ${t.name}`}))).map(e=>[{name:e.rowName,color:e.color},...e.values])})),$=d(()=>{let e=[M.value.table.columnNames.series,...q.value.map(e=>e.text)],t={th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint};return{colNames:[M.value.table.columnNames.series,...q.value.map(e=>e.text)],head:e,body:qn.value.body,config:t}});function Jn(e=null){qe(()=>{let t=[[M.value.table.columnNames.series,...q.map(e=>[e.text])],...qn.value.body.map((e,t)=>[e[0].name,...e.slice(1)])],n=[[R.value.title.text],[R.value.title.subtitle.text]].concat(t),r=o(n);e?e(r):ce({csvContent:r,title:R.value.title.text||`vue-ui-ridgeline`})})}function Yn(){return Y.value}let Xn=Se(E,()=>R.value.title.text),Zn=d(()=>({min:0,max:En.value}));je({timeLabelsEls:Yt,timeLabels:q,slicer:Zn,configRef:M,rotationPath:[`style`,`chart`,`xAxis`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`xAxis`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Sn,height:Cn,targetClass:`.vue-ui-ridgeline-x-axis-label`,angle:I.value.autoRotate.angle});let Qn=d(()=>Ee({config:M,style:R,mutableConfig:U,dialog:Mt,accordion:Dt,isFullscreen:Q,parent:E,maxWidth:800,isCursorPointer:z}));et(()=>U.value.showTable,e=>Te(e,M,Xt));function $n(){U.value.showTable=!1,Zt.value&&Zt.value.setTableIconState(!1)}let er=d(()=>R.value.backgroundColor),tr=d(()=>({...R.value.legend,position:`bottom`})),nr=d(()=>R.value.title),{isCallbackImaging:rr,isCallbackSvg:ir,generateSvg:ar,onGenerateImage:or}=we({svg:H,title:nr,legend:tr,legendItems:Z,backgroundColor:er,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:fn});function sr(e){cr(`xy-zoom`,e.dataset,e.config)}async function cr(e=`main-chart`,t=null,n=null){Ft(`copyAlt`,{source:e,config:e===`main-chart`?M.value:Rn.value,dataset:e===`main-chart`?Y.value:zn.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({source:e,config:e===`main-chart`?M.value:Rn.value,dataset:e===`main-chart`?Y.value:zn.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function lr(){j.value=null,Qt.value=!0}function ur(){mr(),Qt.value=!1}function dr(e){if(!H.value||Wn.value||document.activeElement!==H.value||!Y.value.length)return;let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){mr();return}if(a){if(j.value!==null){let e=Y.value[j.value];e&&Bn(e);return}A.value&&jn(A.value);return}if(t||n){let e=j.value;e=e===null?n?0:Y.value.length-1:fr(e+(n?1:-1)),j.value=e,Vn.value=e;return}if(!J.value.length)return;let s=A.value?.index??null;s=s===null?i?0:J.value.length-1:pr(s+(i?1:-1));let c=J.value[s];c&&kn(c)}function fr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function pr(e){let t=J.value.length;return t?(e%t+t)%t:null}function mr(){j.value=null,Vn.value=null,A.value?An(A.value):A.value=null}let hr=d(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,...e.slice(1)]),caption:M.value.a11y.translations.tableCaption,notice:M.value.a11y.translations.tableAvailable}));return be({getData:Yn,getImage:Xn,generateImage:fn,generateSvg:ar,generatePdf:dn,generateCsv:Jn,hideSeries:bn,showSeries:yn,toggleAnnotator:Gn,toggleTable:Kn,toggleFullscreen:Ln,copyAlt:cr}),(e,i)=>(v(),m(`div`,{ref_key:`ridgelineChart`,ref:E,class:Je(`vue-data-ui-component vue-ui-ridgeline ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),id:`vue-ui-ridgeline_${k.value}`,style:_({fontFamily:M.value.style.fontFamily,width:`100%`,textAlign:`center`,background:R.value.backgroundColor,height:M.value.responsive?`100%`:void 0}),onMouseenter:i[3]||=()=>C(an)(!0),onMouseleave:i[4]||=()=>C(an)(!1)},[h(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[h(`p`,null,S(M.value.a11y.translations.keyboardNavigation),1)],8,it),hr.value.body.length?(v(),f(Le,{key:0,uid:k.value,head:hr.value.head,body:hr.value.body,caption:hr.value.caption,notice:hr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),N.value.buttons.annotator&&C(H)?(v(),f(C(kt),Ke({key:1},C(n)(N.value.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Wn.value,svgRef:C(H),isCursorPointer:z.value,onClose:Gn}),He({_:2},[b(C(r),n=>({name:n,fn:w(r=>[x(e.$slots,n,Ye(Ge(C(t)(n,r))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`])):p(``,!0),x(e.$slots,`userConfig`,{},void 0,!0),pn.value?(v(),m(`div`,{key:2,ref_key:`noTitle`,ref:zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),R.value.title.text?(v(),m(`div`,{key:3,ref_key:`chartTitle`,ref:It,style:`width:100%;background:transparent;padding-bottom:24px`},[(v(),f(Ce,{key:`title_${Bt.value}`,config:{title:{cy:`ridgeline-div-title`,...R.value.title},subtitle:{cy:`ridgeline-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),N.value.show&&Pt.value&&(C(on)||C(rn))?(v(),f(C(At),{ref_key:`userOptionsRef`,ref:Zt,key:`user_option_${Ut.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:C(ln),isImaging:C(un),uid:k.value,hasTooltip:!1,callbacks:N.value.callbacks,hasPdf:N.value.buttons.pdf,hasImg:N.value.buttons.img,hasSvg:N.value.buttons.svg,hasXls:N.value.buttons.csv,hasTable:N.value.buttons.table,hasLabel:!1,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:Q.value,printScale:N.value.print.scale,chartElement:E.value,position:N.value.position,isTooltip:!1,titles:{...N.value.buttonTitles},hasAnnotator:N.value.buttons.annotator,isAnnotation:Wn.value,tableDialog:M.value.table.useDialog,style:_({visibility:C(on)?C(rn)?`visible`:`hidden`:`visible`}),isCursorPointer:z.value,onToggleFullscreen:Ln,onGeneratePdf:C(dn),onGenerateCsv:Jn,onGenerateImage:C(or),onGenerateSvg:C(ar),onToggleTable:Kn,onToggleAnnotator:Gn,onCopyAlt:cr},He({_:2},[b(C(De)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:w(n=>[x(e.$slots,t,Ye(Ge(C(Oe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.callbacks.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.printScale.chartElement.position.titles.hasAnnotator.isAnnotation.tableDialog.style.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg`.split(`.`))):p(``,!0),h(`div`,at,[(v(),m(`svg`,{ref_key:`svgRef`,ref:H,xmlns:C(ue),"aria-describedby":`chart-instructions-${k.value}`,class:Je({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${K.value.fullHeight<=0?10:K.value.fullHeight}`,style:_(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color};${M.value.responsive?`height: ${Jt.value}px; width: 100%;`:``}`),tabindex:`0`,onFocus:lr,onBlur:ur,onKeydown:dr},[We(C(jt)),x(e.$slots,`svg-underlayer`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:C(ln)||C(un)||C(rr),isPrintingSvg:C(ir),data:Y.value}},void 0,!0),h(`defs`,null,[(v(!0),m(u,null,b(Z.value,(e,t)=>(v(),f(Fe,{t:`linear`,id:`gradient-${e.id}-${k.value}`,key:`gradient-${e.id}-${k.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128)),(v(!0),m(u,null,b(Y.value,(e,t)=>(v(),m(u,null,[(v(!0),m(u,null,b(e.datapoints,(e,t)=>(v(),f(Fe,{t:`linear`,key:`grad${e.id}`,id:`gradient-single-${k.value}-${e.uid}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128))],64))),256))]),(v(!0),m(u,null,b(Y.value,(t,n)=>(v(),m(`g`,{key:`ds-${n}`},[(v(!0),m(u,null,b(t.datapoints,(t,r)=>(v(),m(`g`,{key:t.id},[e.$slots.pattern?(v(),m(`g`,st,[h(`defs`,null,[x(e.$slots,`pattern`,Ke({ref_for:!0},{datapointIndex:n,seriesIndex:r,patternId:`pattern_${k.value}_${t.uid}`}),void 0,!0)])])):p(``,!0),h(`path`,{fill:e.$slots.pattern?`url(#pattern_${k.value}_${t.uid})`:R.value.backgroundColor,stroke:`none`,"stroke-linecap":`round`,d:P.value.smooth?t.smoothPath:t.straightPath,style:_({opacity:P.value.opacity})},null,12,ct),h(`path`,{fill:`none`,stroke:P.value.stroke.useSerieColor?t.color:P.value.stroke.color,"stroke-width":P.value.strokeWidth,d:P.value.smooth?t.smoothPathRidge:t.straightPathRidge,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,lt),h(`path`,{fill:P.value.useGradient?P.value.useCommonColor?`url(#gradient-${t.id}-${k.value})`:`url(#gradient-single-${k.value}-${t.uid})`:t.color,stroke:`none`,d:P.value.smooth?t.smoothPath:t.straightPath,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,ut),R.value.zeroLine.show?(v(),m(`path`,{key:1,stroke:R.value.zeroLine.useSerieColor?t.color:R.value.zeroLine.stroke,"stroke-dasharray":R.value.zeroLine.strokeDasharray,"stroke-width":R.value.zeroLine.strokeWidth,d:t.zeroPath,"stroke-linecap":`round`},null,8,dt)):p(``,!0),P.value.maxPoint.show&&t.plots.length>1?(v(!0),m(u,{key:2},b(t.plots,e=>(v(),m(u,null,[e.isMaxPoint?(v(),m(`line`,{key:0,x1:e.x,y1:e.y,x2:e.x,y2:e.zero,stroke:P.value.maxPoint.adaptStrokeToBackground?C(le)(t.color):P.value.maxPoint.stroke,"stroke-width":P.value.maxPoint.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":P.value.maxPoint.strokeDasharray},null,8,ft)):p(``,!0)],64))),256)):p(``,!0),t.plots.length===1?(v(),m(`circle`,{key:3,cx:t.plots[0].x,cy:t.plots[0].y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?t.color:F.value.dot.fill,style:{pointerEvents:`none`}},null,8,pt)):p(``,!0)]))),128)),h(`text`,{x:t.label.x,y:t.label.y,"text-anchor":`end`,"font-size":L.value.fontSize,"font-weight":L.value.bold?`bold`:`normal`,fill:L.value.color,style:_({cursor:R.value.dialog.show&&z.value?`pointer`:`default`}),"text-decoration":R.value.dialog.show&&(Vn.value===n||Kt.value&&t.uid===Kt.value.uid||j.value===n)?`underline`:``,"dominant-baseline":`middle`,onMouseenter:e=>Hn(n),onMouseleave:Un,onClick:e=>Bn(t)},S(t.name),45,mt)]))),128)),I.value.values.length?(v(),m(`g`,{key:0,ref_key:`timeLabelsEls`,ref:Yt},[(v(!0),m(u,null,b(J.value,(t,n)=>x(e.$slots,`time-label`,Ke({ref_for:!0},{show:t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&A.value&&A.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0,fontSize:I.value.fontSize,content:t.label,textAnchor:I.value.rotation>0?`start`:I.value.rotation<0?`end`:`middle`,fill:I.value.color,transform:`translate(${t.selectorX}, ${K.value.top+t.height+I.value.offsetY}), rotate(${I.value.rotation})`,x:t.selectorX,y:K.value.bottom+I.value.offsetY}),()=>[t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&A.value&&A.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0?(v(),m(`g`,ht,[String(t.label).includes(`
2
2
  `)?(v(),m(`text`,{key:1,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:_({opacity:A.value?A.value.index===n?1:.2:1}),innerHTML:C(c)({content:String(t.label),fontSize:R.value.xAxis.labels.fontSize,fill:R.value.xAxis.labels.color,stroke:R.value.backgroundColor,x:0,y:0})},null,12,_t)):(v(),m(`text`,{key:0,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,stroke:R.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:_({opacity:A.value?A.value.index===n?1:.2:1})},S(t.label),13,gt))])):p(``,!0)],!0)),256))],512)):p(``,!0),h(`g`,null,[(v(!0),m(u,null,b(J.value,(e,t)=>(v(),m(`rect`,{x:e.x,y:e.y,width:e.width<0?.1:e.width,height:e.height<0?.1:e.height,fill:`transparent`,onMouseenter:t=>kn(e),onMouseleave:t=>An(e),onClick:()=>jn(e)},null,40,vt))),256)),F.value.show&&A.value?(v(),m(`line`,{key:0,x1:A.value.selectorX,x2:A.value.selectorX,y1:A.value.y,y2:A.value.y+A.value.height-V.value/2,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray,"stroke-linecap":`round`,style:{pointerEvents:`none`}},null,8,yt)):p(``,!0),A.value||F.value.labels.showLast?(v(!0),m(u,{key:1},b(Y.value,e=>(v(),m(u,null,[(v(!0),m(u,null,b(e.datapoints,e=>(v(),m(u,null,[(v(!0),m(u,null,b(e.plots,(t,n)=>(v(),m(u,null,[A.value&&A.value.index===n||!A.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(v(),m(`circle`,{key:0,cx:t.x,cy:t.y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?e.color:R.value.selector.dot.fill,style:{pointerEvents:`none`}},null,8,bt)):p(``,!0),A.value&&A.value.index===n||!A.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(v(),m(`text`,{key:1,x:Nn(t.x,C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?t.x-R.value.selector.labels.fontSize/2:t.x+R.value.selector.labels.fontSize/2,y:t.y,"dominant-baseline":`middle`,stroke:R.value.backgroundColor,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`,"paint-order":`stroke fill`,"text-anchor":Nn(t.x,C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?`end`:`start`,"font-size":F.value.labels.fontSize,fill:F.value.labels.color,style:{pointerEvents:`none`}},S(C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:R.value.xAxis.labels.prefix,v:t.value,s:R.value.xAxis.labels.suffix,r:R.value.selector.labels.rounding}))),9,xt)):p(``,!0)],64))),256))],64))),256))],64))),256)):p(``,!0)]),x(e.$slots,`svg`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:C(ln)||C(un)||C(rr),isPrintingSvg:C(ir),data:Y.value}},void 0,!0)],46,ot)),e.$slots.hint?(v(),m(`div`,St,[x(e.$slots,`hint`,Ye(Ge({hint:M.value.a11y.translations.keyboardNavigation,isVisible:Qt.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(v(),m(`div`,Ct,[x(e.$slots,`watermark`,Ye(Ge({isPrinting:C(ln)||C(un)||C(rr)||C(ir)})),void 0,!0)])):p(``,!0),h(`div`,{ref_key:`chartLegend`,ref:Lt},[x(e.$slots,`legend`,{legend:Z.value},()=>[R.value.legend.show?(v(),f(Be,{key:`legend_${Ht.value}`,legendSet:Z.value,config:In.value,isCursorPointer:z.value,onClickMarker:i[0]||=({legend:e})=>_n(e.id)},He({item:w(({legend:e})=>[C(tn)?p(``,!0):(v(),m(`div`,{key:0,style:_(`opacity:${X.value.includes(e.id)?.5:1}`),onClick:t=>e.segregate()},S(e.name),13,wt))]),legendToggle:w(()=>[Z.value.length>2&&R.value.legend.selectAllToggle.show&&!C(tn)?(v(),f(Ie,{key:0,backgroundColor:R.value.legend.selectAllToggle.backgroundColor,color:R.value.legend.selectAllToggle.color,fontSize:R.value.legend.fontSize,checked:X.value.length>0,isCursorPointer:z.value,onToggle:gn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:w(({legend:e,index:t})=>[We(Me,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${k.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512),e.$slots.source?(v(),m(`div`,{key:6,ref_key:`source`,ref:Rt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Pt.value&&N.value.buttons.table?(v(),f(Ze(Qn.value.component),Ke({key:7},Qn.value.props,{ref_key:`tableUnit`,ref:Xt,onClose:$n}),He({content:w(()=>[(v(),f(C(Ot),{key:`table_${Vt.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:M.value.table.useDialog?``:Qn.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:z.value,onClose:$n},{th:w(({th:e})=>[h(`div`,null,S(e),1)]),td:w(({td:e})=>[Ue(S(e.name?e.name:C(l)(F.value.labels.formatter,e,C(a)({p:R.value.xAxis.labels.prefix,v:e,s:R.value.xAxis.labels.suffix,r:M.value.table.td.roundingValue}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:w(()=>[Ue(S(Qn.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:w(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Jn(N.value.callbacks.csv),style:_({cursor:z.value?`pointer`:`default`})},[We(C(Et),{name:`fileCsv`,stroke:Qn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),R.value.dialog.show?(v(),f(C(Mt),{key:8,ref_key:`dialog`,ref:qt,onClose:i[2]||=e=>Kt.value=null,backgroundColor:R.value.dialog.backgroundColor,color:R.value.dialog.color,headerBg:R.value.dialog.header.backgroundColor,headerColor:R.value.dialog.header.color,isFullscreen:Q.value,fullscreenParent:E.value,isCursorPointer:z.value,withPadding:``},{title:w(()=>[Ue(S(Kt.value.name),1)]),content:w(()=>[Kt.value?(v(),f(C(Tt),{key:0,config:Rn.value,dataset:zn.value,onCopyAlt:sr},null,8,[`config`,`dataset`])):p(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`,`isCursorPointer`])):p(``,!0),x(e.$slots,`skeleton`,{},()=>[C(tn)?(v(),f(_e,{key:0})):p(``,!0)],!0)],46,rt))}},[[`__scopeId`,`data-v-394193d9`]]);export{nt as n,Tt as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as ee,Dt as te,Ht as o,J as ne,Jt as re,Kt as ie,S as ae,X as oe,Yt as se,Zt as ce,at as le,b as ue,i as de,in as fe,nn as pe,nt as me,pt as he,t as ge,w as _e,yt as ve,zt as ye}from"./lib-rPeBMZrn.js";import{n as be,t as xe}from"./BaseScanner-8NdoBs7B.js";import{n as Se,t as Ce}from"./useHints-C-TwxM0Y.js";import{t as we}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Te}from"./useNestedProp-DnGoh-XS.js";import{t as Ee}from"./useThemeCheck-BKNRbGeC.js";import{t as De}from"./chartImage-DPGnEuYM.js";import{n as Oe}from"./Title-BliHuXfT.js";import{t as ke}from"./useChartExport-BZts4KFb.js";import{n as Ae,t as je}from"./tableIntegration-CNoJ1CIY.js";import{n as Me,t as Ne}from"./userOptionsSlots-DYuo-E5m.js";import{t as Pe}from"./usePrinter-DVf3YcG5.js";import{t as Fe}from"./useTransitions-ChGGrtrv.js";import{t as Ie}from"./Shape-CRe8woTu.js";import{c as Le}from"./canvas-lib-22VpOI4_.js";import{t as Re}from"./useResponsive-CENUxfEL.js";import{t as ze}from"./DefGrad-DKMq1REY.js";import{t as Be}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ve}from"./A11yDataTable-DWNlWXzs.js";import{t as He}from"./useUserOptionState-CXlFnwPv.js";import{t as Ue}from"./useChartAccessibility-DOMuYJfm.js";import{t as We}from"./labelUtils-CdtU-yB_.js";import{t as Ge}from"./Legend-DM0ClX3D.js";import{t as Ke}from"./vue_ui_rings-BcDDXHpQ.js";import{Fragment as qe,Teleport as Je,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as Ye,createTextVNode as Xe,createVNode as Ze,defineAsyncComponent as f,guardReactiveProps as p,mergeProps as Qe,nextTick as $e,normalizeClass as m,normalizeProps as h,normalizeStyle as g,onBeforeUnmount as et,onMounted as tt,openBlock as _,ref as v,renderList as nt,renderSlot as y,resolveDynamicComponent as rt,shallowRef as it,toDisplayString as at,toRefs as ot,unref as b,useSlots as st,watch as ct,withCtx as x}from"vue";var lt=/* @__PURE__ */ e({default:()=>At}),ut=[`id`],dt=[`id`],ft=[`id`],pt={style:{position:`relative`}},mt=[`xmlns`,`viewBox`,`aria-describedby`],ht=[`width`,`height`],gt={key:1},_t=[`stroke`,`cx`,`cy`,`r`,`fill`],vt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],yt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],bt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],xt=[`x`,`y`,`width`,`height`,`fill`,`rx`],St=[`cx`,`cy`,`r`,`fill`,`stroke`],Ct=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`,`onMouseenter`,`onMouseleave`,`onClick`,`innerHTML`],wt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Tt={key:5,class:`vue-data-ui-watermark`},Et=[`id`],Dt=[`onClick`],Ot={key:0},kt={key:1},At=/*#__PURE__*/ we({__name:`vue-ui-rings`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:we,emit:lt}){let At=f(()=>import(`./Tooltip-C1q0Qoh7.js`)),jt=f(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Mt=f(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Nt=f(()=>import(`./DataTable-Dof6yhO7.js`)),Pt=f(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Ft=f(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),It=f(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),Lt=f(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_rings:Rt}=i(),{isThemeValid:zt,warnInvalidTheme:Bt}=Ee(),Vt=st(),S=e,C=v(!1),Ht=s(()=>!!S.dataset&&S.dataset.length),w=v(oe()),T=v(!1),Ut=v(``),E=v(null),Wt=v(0),D=v(null),Gt=v(null),Kt=v(null),qt=v(null),Jt=v(null),Yt=v(0),Xt=v(0),Zt=v(0),Qt=v(!1),$t=v(!1),en=v(null),tn=v(null),O=v(null),nn=v({x:0,y:0}),k=v(`pointer`),rn=v(!1),A=v(dn()),j=s(()=>A.value.userOptions),M=s(()=>A.value.style.chart.layout.rings),N=s(()=>A.value.style.chart.layout.labels),P=s(()=>A.value.style.chart.tooltip),F=s(()=>A.value.style.chart);Se({config:()=>A.value,dataset:()=>S.dataset,component:`VueUiRings`,rules:[Ce.singleSeries,Ce.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let{transitionEnabled:I}=Fe({config:()=>A.value.transitions,dataset:()=>S.dataset}),L=s(()=>A.value.userOptions.useCursorPointer),an=s(()=>fe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{rings:{stroke:`#6A6A6A`,gradient:{underlayerColor:`#FFFFFF`}},labels:{dataLabels:{show:!1}}},legend:{backgroundColor:`transparent`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:R,FINAL_DATASET:on,manualLoading:sn}=be({...ot(S),FINAL_CONFIG:A,prepareConfig:dn,skeletonDataset:S.config?.skeletonDataset??[{name:`_`,values:[13],color:`#808080`},{name:`_`,values:[8],color:`#969696`},{name:`_`,values:[5],color:`#ADADAD`},{name:`_`,values:[3],color:`#C4C4C4`},{name:`_`,values:[2],color:`#DBDBDB`}],skeletonConfig:fe({defaultConfig:A.value,userConfig:an.value})}),{userOptionsVisible:cn,setUserOptionsVisibility:ln,keepUserOptionState:un}=He({config:A.value}),{svgRef:z}=Ue({config:F.value.title});function dn(){let e=Te({userConfig:S.config,defaultConfig:Rt}),t=e.theme;if(!t)return e;if(!zt.value(e))return Bt(e),e;let n=Te({userConfig:Ke[t]||S.config,defaultConfig:e});return{...Te({userConfig:S.config,defaultConfig:n}),customPalette:e.customPalette.length?e.customPalette:pe[e.theme]||o}}let fn=ce(S.config);ct(()=>S.config,(e,t)=>{let n=ce(e),r=n!==fn;fn=n;let i=dn();r?(R.value||(A.value=i),cn.value=!A.value.userOptions.showOnChartHover,hn(),Yt.value+=1,Xt.value+=1,Zt.value+=1,U.value.showTable=A.value.table.show,U.value.showTooltip=P.value.show,U.value.showLabels=N.value.dataLabels.show,W.value.width=F.value.size,W.value.height=F.value.size):(A.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0});let pn=s(()=>{let{markers:e}=N.value.dataLabels,t=Y.value/2,n=U.value.showLabels?e.position===`left`?t:-t:0,r=U.value.showLabels?W.value.width/2-t:0,i=e.position===`left`?r:-r;return{x:A.value.responsive?i:n/F.value.size*W.value.width,y:0/F.value.size*W.value.height}}),B=s(()=>({x:W.value.width/2+pn.value.x,y:W.value.height/2+pn.value.y}));ct(()=>S.dataset,e=>{Array.isArray(e)&&e.length>0&&(sn.value=!1)},{deep:!0});let V=it(null),H=it(null);tt(()=>{$t.value=!0,hn()});let mn=s(()=>A.value.debug);function hn(){if(ye(S.dataset)?(le({componentName:`VueUiRings`,type:`dataset`,debug:mn.value}),sn.value=!0):S.dataset.forEach((e,t)=>{e.values.length||(le({componentName:`VueUiRings`,type:`dataset`,debug:mn.value}),sn.value=!0),ve({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{le({componentName:`VueUiRings`,type:`datasetSerieAttribute`,property:e,index:t,debug:mn.value})})}),ye(S.dataset)||(sn.value=A.value.loading),A.value.responsive){let e=Le(()=>{Qt.value=!0;let{width:e,height:t}=Re({chart:D.value,title:F.value.title.text?Gt.value:null,legend:F.value.legend.show?Kt.value:null,source:qt.value,noTitle:Jt.value});requestAnimationFrame(()=>{W.value.width=e,W.value.height=t-12,Qt.value=!1})});V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(e),H.value=D.value.parentNode,V.value.observe(H.value)}setTimeout(()=>{C.value=!0},600)}et(()=>{V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:gn,isImaging:_n,generatePdf:vn,generateImage:yn}=Pe({elementId:`rings_${w.value}`,fileName:F.value.title.text||`vue-ui-rings`,options:A.value.userOptions.print}),bn=s(()=>A.value.userOptions.show&&!F.value.title.text),xn=s(()=>_e(A.value.customPalette)),U=v({showTable:A.value.table.show,showTooltip:P.value.show,showLabels:N.value.dataLabels.show});ct(A,()=>{U.value={showTable:A.value.table.show,showTooltip:P.value.show,showLabels:N.value.dataLabels.show}},{immediate:!0});let W=v({height:F.value.size,width:F.value.size}),Sn=s(()=>Math.min(W.value.height,W.value.width)),Cn=lt,G=v([]);function wn(){G.value.length?G.value=[]:Mn.value.forEach(e=>{G.value.push(e.uid)}),Tn()}function Tn(){Cn(`selectLegend`,J.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function En(e){if(G.value.includes(e))G.value=G.value.filter(t=>t!==e);else{if(G.value.length===K.value.length-1)return;G.value.push(e)}Tn()}function Dn(e){return K.value.length?K.value.find(t=>t.name===e)||(mn.value&&console.warn(`VueUiRings - Series name not found "${e}"`),null):(mn.value&&console.warn(`VueUiRings - There are no series to show.`),null)}function On(e){let t=Dn(e);t!==null&&G.value.includes(t.uid)&&En(t.uid)}function kn(e){let t=Dn(e);t!==null&&(G.value.includes(t.uid)||En(t.uid))}let An=s(()=>Math.max(...K.value.filter(e=>!G.value.includes(e.uid)).map(({value:e})=>e)));function jn(e){return e/An.value}let K=s(()=>on.value.map(({values:e,name:t,color:n=null},r)=>{let i=ie(e).reduce((e,t)=>e+t,0);return{name:t,color:n||ae(n)||xn.value[r]||o[r]||o[r%o.length],value:i,proportion:i/on.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0),uid:oe(),absoluteIndex:r}})),Mn=s(()=>K.value.map((e,t)=>{let n=de(N.value.dataLabels.formatter,e.value,a({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,index:t}),r=isNaN(e.value/q.value)?`-`:a({v:e.value/q.value*100,s:`%`,r:F.value.legend.roundingPercentage}),i=Ln({showVal:F.value.legend.showValue,showPercentage:F.value.legend.showPercentage,val:n,percentage:G.value.includes(e.uid)?`-%`:r});return{...e,shape:`circle`,opacity:G.value.includes(e.uid)?.5:1,segregate:()=>En(e.uid),isSegregated:G.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${i}`}}).toSorted((e,t)=>t.value-e.value)),Nn=s(()=>({cy:`rings-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``})),q=s(()=>K.value.filter(e=>!G.value.includes(e.uid)).map(({value:e})=>e).reduce((e,t)=>e+t,0)),J=s(()=>K.value.filter(e=>!G.value.includes(e.uid)).map(({name:e,value:t,color:n=null,uid:r,absoluteIndex:i},a)=>({absoluteIndex:i,uid:r,name:e,color:n||ae(n)||xn.value[a]||o[a]||o[a%o.length],value:t,proportion:jn(t),percentage:t/q.value*100,strokeWidth:M.value.strokeWidth*jn(t)})).toSorted((e,t)=>t.value-e.value));function Pn(){return J.value.map(({name:e,color:t,value:n,absoluteValues:r,percentage:i})=>({name:e,color:t,value:n,absoluteValues:r,percentage:i}))}let Y=s(()=>Sn.value-M.value.strokeWidth*2);function Fn(e,t){A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function In(e,t){E.value=null,T.value=!1,O.value=null,k.value=`pointer`,A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Ln({val:e,percentage:t,showVal:n,showPercentage:r}){let i=N.value.dataLabels;return We({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Rn(e){let t=N.value.dataLabels,n=de(t.formatter,e.value,a({p:t.prefix,v:e.value,s:t.suffix,r:t.roundingValue})),r=a({v:e.percentage,s:`%`,r:t.roundingPercentage});return`${e.name}\n${Ln({val:n,percentage:r,showVal:t.showValue,showPercentage:t.showPercentage})}`}function zn(e){return ue(Y.value*e.proportion/2*.9<=0?1e-4:Y.value*e.proportion/2*.9)}function Bn(e,t){return t===0?B.value.y:B.value.y+Y.value*J.value[0].proportion/2-Y.value*e.proportion/2-2*(t+1)}function X(e,t){let n=N.value.dataLabels.markers.position===`left`?-(Y.value/2):Y.value/2;return{x:B.value.x+n,y:Bn(e,t)-zn(e)}}let Vn=v(null);function Hn(e,t,n=`pointer`){if(A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:t}),G.value.length===S.dataset.length)return;Vn.value={datapoint:e,seriesIndex:t,series:J.value,config:A.value},E.value=t,O.value=t,k.value=n;let r=J.value[t],i=P.value.customFormat;if(te(i)&&he(()=>i({seriesIndex:t,datapoint:e,series:J.value,config:A.value})))Ut.value=i({seriesIndex:t,datapoint:e,series:J.value,config:A.value});else{let n=``;n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${r.color}" />${Vt.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${w.value}_${e.absoluteIndex})" />`:``}</svg>`,n+=`<b>${Ln({showVal:P.value.showValue,showPercentage:P.value.showPercentage,val:`<span>${de(N.value.dataLabels.formatter,r.value,a({p:N.value.dataLabels.prefix,v:r.value,s:N.value.dataLabels.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</span>`,percentage:a({v:r.value/q.value*100,s:`%`,r:P.value.roundingPercentage})})}</b></div>`,Ut.value=n}T.value=!0}let Z=s(()=>({head:J.value.map(e=>({name:e.name,color:e.color})),body:J.value.map(e=>e.value)})),Q=s(()=>{let e=[`__SUM__`,a({p:N.value.dataLabels.prefix,v:q.value,s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),`100%`],t=Z.value.head.map((e,t)=>[{color:e.color,name:e.name},a({p:N.value.dataLabels.prefix,v:Z.value.body[t],s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),isNaN(Z.value.body[t]/q.value)?`-`:(Z.value.body[t]/q.value*100).toFixed(A.value.table.td.roundingPercentage)+`%`]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name:e)),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:[A.value.table.columnNames.series,A.value.table.columnNames.value,A.value.table.columnNames.percentage]}});function Un(e=null){$e(()=>{let t=Z.value.head.map((e,t)=>[[e.name],[Z.value.body[t]],[isNaN(Z.value.body[t]/q.value)?`-`:Z.value.body[t]/q.value*100]]),n=[[F.value.title.text],[F.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=ee(n);e?e(r):me({csvContent:r,title:F.value.title.text||`vue-ui-rings`})})}let $=v(!1);function Wn(e){$.value=e,Wt.value+=1}function Gn(){U.value.showTable=!U.value.showTable}function Kn(){U.value.showTooltip=!U.value.showTooltip}function qn(){U.value.showLabels=!U.value.showLabels}let Jn=v(!1);function Yn(){Jn.value=!Jn.value}let Xn=De(D,()=>F.value.title.text),Zn=s(()=>je({config:A,style:F,mutableConfig:U,dialog:Lt,accordion:Mt,isFullscreen:$,parent:D,maxWidth:800,isCursorPointer:L}));ct(()=>U.value.showTable,e=>Ae(e,A,en));function Qn(){U.value.showTable=!1,tn.value&&tn.value.setTableIconState(!1)}let $n=s(()=>Mn.value.map(e=>({...e,name:e.display}))),er=s(()=>F.value.backgroundColor),tr=s(()=>F.value.legend),nr=s(()=>F.value.title),{isCallbackImaging:rr,isCallbackSvg:ir,generateSvg:ar,onGenerateImage:or}=ke({svg:z,title:nr,legend:tr,legendItems:$n,backgroundColor:er,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:yn});async function sr(){Cn(`copyAlt`,{config:A.value,dataset:J.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function cr(){O.value=null,rn.value=!0}function lr(){O.value=null,k.value=`pointer`,T.value=!1,E.value=null,rn.value=!1}function ur(e){if(!z.value||Jn.value||document.activeElement!==z.value||!J.value.length||G.value.length===S.dataset.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){O.value=null,k.value=`pointer`,T.value=!1,E.value=null;return}if(r){if(O.value===null)return;let e=J.value[O.value];if(!e)return;Fn(e,O.value);return}let a=O.value;a===null||a<0||a>=J.value.length?a=n?0:J.value.length-1:n?(a+=1,a>=J.value.length&&(a=0)):t&&(--a,a<0&&(a=J.value.length-1));let ee=J.value[a];ee&&(dr(a),Hn(ee,a,`keyboard`))}function dr(e){if(!Number.isFinite(e)||!z.value)return;let t=J.value[e];if(!t)return;let n=X(t,e),r=z.value.getBoundingClientRect();nn.value={x:r.left+n.x/W.value.width*r.width,y:r.top+n.y/W.value.height*r.height}}let fr=s(()=>({headers:Q.value?.colNames??[],rows:Q.value?.a11yBody??[]}));return we({getData:Pn,getImage:Xn,generatePdf:vn,generateCsv:Un,generateImage:yn,generateSvg:ar,hideSeries:kn,showSeries:On,toggleTable:Gn,toggleTooltip:Kn,toggleAnnotator:Yn,toggleFullscreen:Wn,toggleLabels:qn,copyAlt:sr}),(e,i)=>(_(),u(`div`,{ref_key:`ringsChart`,ref:D,class:m(`vue-data-ui-component vue-ui-rings ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:g(`font-family:${A.value.style.fontFamily};text-align:center;width:100%;background:${F.value.backgroundColor};${A.value.responsive?`height: 100%`:``}`),id:`rings_${w.value}`,onMouseleave:i[2]||=e=>{E.value=null,T.value=!1,b(ln)(!1)},onMouseenter:i[3]||=()=>b(ln)(!0)},[d(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[d(`p`,null,at(A.value.a11y.translations.keyboardNavigation),1)],8,dt),fr.value?.rows?.length?(_(),c(Ve,{key:0,uid:w.value,head:fr.value.headers,body:fr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):l(``,!0),j.value.buttons.annotator?(_(),c(b(Pt),Qe({key:1},b(n)(j.value.annotator),{svgRef:b(z),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Jn.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Yn}),Ye({_:2},[nt(b(r),n=>({name:n,fn:x(r=>[y(e.$slots,n,h(p(b(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):l(``,!0),bn.value?(_(),u(`div`,{key:2,ref_key:`noTitle`,ref:Jt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):l(``,!0),F.value.title.text?(_(),u(`div`,{key:3,ref_key:`chartTitle`,ref:Gt,style:`width:100%;background:transparent`},[(_(),c(Oe,{key:`title_${Yt.value}`,config:{title:{cy:`rings-div-title`,...F.value.title},subtitle:{cy:`rings-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):l(``,!0),d(`div`,{id:`legend-top-${w.value}`},null,8,ft),j.value.show&&Ht.value&&(b(un)||b(cn))?(_(),c(b(Ft),{ref_key:`userOptionsRef`,ref:tn,key:`user_options_${Wt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:b(gn),isImaging:b(_n),uid:w.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,hasPdf:j.value.buttons.pdf,hasXls:j.value.buttons.csv,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasTable:j.value.buttons.table,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,hasLabel:j.value.buttons.labels,isTooltip:U.value.showTooltip,isFullscreen:$.value,titles:{...j.value.buttonTitles},chartElement:D.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:Jn.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Wn,onGeneratePdf:b(vn),onGenerateCsv:Un,onGenerateImage:b(or),onGenerateSvg:b(ar),onToggleTable:Gn,onToggleTooltip:Kn,onToggleAnnotator:Yn,onToggleLabels:qn,onCopyAlt:sr,style:g({visibility:b(un)?b(cn)?`visible`:`hidden`:`visible`})},Ye({_:2},[nt(b(Me)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:x(n=>[y(e.$slots,t,h(p(b(Ne)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.hasLabel.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):l(``,!0),d(`div`,pt,[(_(),u(`svg`,{ref_key:`svgRef`,ref:z,xmlns:b(ge),class:m({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,resizing:Qt.value||b(R),"vue-data-ui-no-transition":!b(I)}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:g(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),"aria-describedby":`chart-instructions-${w.value}`,tabindex:`0`,onFocus:cr,onBlur:lr,onKeydown:ur},[Ze(b(It)),y(e.$slots,`svg-underlayer`,{svg:{...W.value,isPrintingImg:b(gn)||b(_n)||b(rr),isPrintingSvg:b(ir)}},void 0,!0),e.$slots[`chart-background`]?(_(),u(`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`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,ht)):l(``,!0),d(`defs`,null,[(_(!0),u(qe,null,nt(J.value,(e,t)=>(_(),c(ze,{t:`radial`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,id:`gradient_${w.value}_${t}`,key:`gradient_${w.value}_${t}`,stops:[[`0%`,b(re)(b(se)(e.color,.05),100-M.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(_(),u(`g`,gt,[(_(!0),u(qe,null,nt(J.value,t=>(_(),u(`defs`,null,[y(e.$slots,`pattern`,Qe({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${w.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):l(``,!0),(_(!0),u(qe,null,nt(J.value,(t,n)=>(_(),u(`g`,{key:`r_${t.uid}`},[d(`circle`,{class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-opacity":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:M.value.gradient.underlayerColor},null,14,_t),d(`circle`,{class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:M.value.gradient.show?`url(#gradient_${w.value}_${n})`:t.color},null,14,vt),e.$slots.pattern?(_(),u(`circle`,{key:0,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:`url(#pattern_${w.value}_${t.absoluteIndex})`},null,14,yt)):l(``,!0),d(`circle`,{stroke:`none`,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:`transparent`,onMouseenter:e=>Hn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n)},null,40,bt),U.value.showLabels?(_(),u(qe,{key:1},[d(`rect`,{x:N.value.dataLabels.markers.position===`left`?X(t,n).x:B.value.x,y:X(t,n).y-N.value.dataLabels.markers.strokeWidth/2,width:Math.abs(B.value.x-X(t,n).x),height:N.value.dataLabels.markers.strokeWidth,fill:N.value.dataLabels.markers.stroke,rx:N.value.dataLabels.markers.strokeWidth,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n})},null,10,xt),d(`circle`,{cx:X(t,n).x,cy:X(t,n).y,r:N.value.dataLabels.markers.radius,fill:t.color,stroke:F.value.backgroundColor,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n})},null,10,St),d(`text`,{"text-anchor":N.value.dataLabels.markers.position===`left`?`end`:`start`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,"font-weight":N.value.dataLabels.bold?`bold`:`normal`,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),transform:`translate(${X(t,n).x+(N.value.dataLabels.markers.position===`left`?-N.value.dataLabels.offsetX-14:N.value.dataLabels.offsetX)+6}, ${X(t,n).y+N.value.dataLabels.fontSize/3})`,onMouseenter:e=>Hn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n),innerHTML:b(ne)({content:Rn(t),fontSize:N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,x:0,y:0,translateY:!0})},null,42,Ct)],64)):l(``,!0)]))),128)),y(e.$slots,`svg`,{svg:{...W.value,isPrintingImg:b(gn)||b(_n)||b(rr),isPrintingSvg:b(ir)}},void 0,!0)],46,mt)),e.$slots.hint?(_(),u(`div`,wt,[y(e.$slots,`hint`,h(p({hint:A.value.a11y.translations.keyboardNavigation,isVisible:rn.value})),void 0,!0)])):l(``,!0)]),e.$slots.watermark?(_(),u(`div`,Tt,[y(e.$slots,`watermark`,h(p({isPrinting:b(gn)||b(_n)||b(rr)||b(ir)})),void 0,!0)])):l(``,!0),d(`div`,{id:`legend-bottom-${w.value}`},null,8,Et),$t.value&&(F.value.legend.show||e.$slots.legend)?(_(),c(Je,{key:6,to:F.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[d(`div`,{ref_key:`chartLegend`,ref:Kt},[y(e.$slots,`legend`,{legend:Mn.value},()=>[F.value.legend.show?(_(),c(Ge,{key:`legend_${Zt.value}`,legendSet:Mn.value,config:Nn.value,isCursorPointer:L.value,onClickMarker:i[0]||=({legend:e})=>En(e.uid)},Ye({item:x(({legend:e,index:t})=>[b(R)?l(``,!0):(_(),u(`div`,{key:0,onClick:t=>En(e.uid),style:g(`opacity:${G.value.includes(e.uid)?.5:1}`)},at(e.display),13,Dt))]),legendToggle:x(()=>[Mn.value.length>2&&F.value.legend.selectAllToggle.show&&!b(R)?(_(),c(Be,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:G.value.length>0,isCursorPointer:L.value,onToggle:wn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):l(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:x(({legend:e,index:t})=>[Ze(Ie,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${w.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):l(``,!0)],!0)],512)],8,[`to`])):l(``,!0),e.$slots.source?(_(),u(`div`,{key:7,ref_key:`source`,ref:qt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0),Ze(b(At),{teleportTo:P.value.teleportTo,show:U.value.showTooltip&&T.value&&G.value.length<S.dataset.length,backgroundColor:P.value.backgroundColor,color:P.value.color,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,fontSize:P.value.fontSize,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:D.value,content:Ut.value,isFullscreen:$.value,isCustom:P.value.customFormat&&typeof P.value.customFormat==`function`,smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:k.value===`keyboard`,a11yPosition:nn.value},{"tooltip-before":x(()=>[y(e.$slots,`tooltip-before`,h(p({...Vn.value})),void 0,!0)]),tooltip:x(()=>[y(e.$slots,`tooltip`,h(p({...Vn.value})),void 0,!0)]),"tooltip-after":x(()=>[y(e.$slots,`tooltip-after`,h(p({...Vn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Ht.value&&j.value.buttons.table?(_(),c(rt(Zn.value.component),Qe({key:8},Zn.value.props,{ref_key:`tableUnit`,ref:en,onClose:Qn}),Ye({content:x(()=>[(_(),c(b(Nt),{key:`table_${Xt.value}`,colNames:Q.value.colNames,head:Q.value.head,body:Q.value.body,config:Q.value.config,title:A.value.table.useDialog?``:Zn.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:Qn},{th:x(({th:e})=>[e===`__SUM__`?(_(),u(`div`,Ot,[Ze(b(jt),{name:`sigma`,stroke:Q.value.config.th.color,size:16},null,8,[`stroke`])])):(_(),u(`div`,kt,at(e),1))]),td:x(({td:e})=>[Xe(at(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[A.value.table.useDialog?{name:`title`,fn:x(()=>[Xe(at(Zn.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:x(()=>[d(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Un(j.value.callbacks.csv),style:g({cursor:L.value?`pointer`:`default`})},[Ze(b(jt),{name:`fileCsv`,stroke:Zn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):l(``,!0),y(e.$slots,`skeleton`,{},()=>[b(R)?(_(),c(xe,{key:0})):l(``,!0)],!0)],46,ut))}},[[`__scopeId`,`data-v-83abb35d`]]);export{lt as n,At as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as ee,Dt as te,Ht as o,J as ne,Jt as re,Kt as ie,S as ae,X as oe,Yt as se,Zt as ce,at as le,b as ue,i as de,in as fe,nn as pe,nt as me,pt as he,t as ge,w as _e,yt as ve,zt as ye}from"./lib-rPeBMZrn.js";import{n as be,t as xe}from"./BaseScanner-8NdoBs7B.js";import{n as Se,t as Ce}from"./useHints-C-TwxM0Y.js";import{t as we}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Te}from"./useNestedProp-DnGoh-XS.js";import{t as Ee}from"./useThemeCheck-BKNRbGeC.js";import{t as De}from"./chartImage-DPGnEuYM.js";import{n as Oe}from"./Title-BliHuXfT.js";import{t as ke}from"./useChartExport-BZts4KFb.js";import{n as Ae,t as je}from"./tableIntegration-CNoJ1CIY.js";import{n as Me,t as Ne}from"./userOptionsSlots-DYuo-E5m.js";import{t as Pe}from"./usePrinter-DVf3YcG5.js";import{t as Fe}from"./useTransitions-ChGGrtrv.js";import{t as Ie}from"./Shape-CRe8woTu.js";import{c as Le}from"./canvas-lib-22VpOI4_.js";import{t as Re}from"./useResponsive-CENUxfEL.js";import{t as ze}from"./DefGrad-DKMq1REY.js";import{t as Be}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ve}from"./A11yDataTable-DWNlWXzs.js";import{t as He}from"./useUserOptionState-CXlFnwPv.js";import{t as Ue}from"./useChartAccessibility-DOMuYJfm.js";import{t as We}from"./labelUtils-CdtU-yB_.js";import{t as Ge}from"./Legend-DM0ClX3D.js";import{t as Ke}from"./vue_ui_rings-BcDDXHpQ.js";import{Fragment as qe,Teleport as Je,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as Ye,createTextVNode as Xe,createVNode as Ze,defineAsyncComponent as f,guardReactiveProps as p,mergeProps as Qe,nextTick as $e,normalizeClass as m,normalizeProps as h,normalizeStyle as g,onBeforeUnmount as et,onMounted as tt,openBlock as _,ref as v,renderList as nt,renderSlot as y,resolveDynamicComponent as rt,shallowRef as it,toDisplayString as at,toRefs as ot,unref as b,useSlots as st,watch as ct,withCtx as x}from"vue";var lt=/* @__PURE__ */ e({default:()=>At}),ut=[`id`],dt=[`id`],ft=[`id`],pt={style:{position:`relative`}},mt=[`xmlns`,`viewBox`,`aria-describedby`],ht=[`width`,`height`],gt={key:1},_t=[`stroke`,`cx`,`cy`,`r`,`fill`],vt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],yt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],bt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],xt=[`x`,`y`,`width`,`height`,`fill`,`rx`],St=[`cx`,`cy`,`r`,`fill`,`stroke`],Ct=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`,`onMouseenter`,`onMouseleave`,`onClick`,`innerHTML`],wt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Tt={key:5,class:`vue-data-ui-watermark`},Et=[`id`],Dt=[`onClick`],Ot={key:0},kt={key:1},At=/*#__PURE__*/ we({__name:`vue-ui-rings`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:we,emit:lt}){let At=f(()=>import(`./Tooltip-C1q0Qoh7.js`)),jt=f(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Mt=f(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Nt=f(()=>import(`./DataTable-Dof6yhO7.js`)),Pt=f(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Ft=f(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),It=f(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Lt=f(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_rings:Rt}=i(),{isThemeValid:zt,warnInvalidTheme:Bt}=Ee(),Vt=st(),S=e,C=v(!1),Ht=s(()=>!!S.dataset&&S.dataset.length),w=v(oe()),T=v(!1),Ut=v(``),E=v(null),Wt=v(0),D=v(null),Gt=v(null),Kt=v(null),qt=v(null),Jt=v(null),Yt=v(0),Xt=v(0),Zt=v(0),Qt=v(!1),$t=v(!1),en=v(null),tn=v(null),O=v(null),nn=v({x:0,y:0}),k=v(`pointer`),rn=v(!1),A=v(dn()),j=s(()=>A.value.userOptions),M=s(()=>A.value.style.chart.layout.rings),N=s(()=>A.value.style.chart.layout.labels),P=s(()=>A.value.style.chart.tooltip),F=s(()=>A.value.style.chart);Se({config:()=>A.value,dataset:()=>S.dataset,component:`VueUiRings`,rules:[Ce.singleSeries,Ce.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let{transitionEnabled:I}=Fe({config:()=>A.value.transitions,dataset:()=>S.dataset}),L=s(()=>A.value.userOptions.useCursorPointer),an=s(()=>fe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{rings:{stroke:`#6A6A6A`,gradient:{underlayerColor:`#FFFFFF`}},labels:{dataLabels:{show:!1}}},legend:{backgroundColor:`transparent`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:R,FINAL_DATASET:on,manualLoading:sn}=be({...ot(S),FINAL_CONFIG:A,prepareConfig:dn,skeletonDataset:S.config?.skeletonDataset??[{name:`_`,values:[13],color:`#808080`},{name:`_`,values:[8],color:`#969696`},{name:`_`,values:[5],color:`#ADADAD`},{name:`_`,values:[3],color:`#C4C4C4`},{name:`_`,values:[2],color:`#DBDBDB`}],skeletonConfig:fe({defaultConfig:A.value,userConfig:an.value})}),{userOptionsVisible:cn,setUserOptionsVisibility:ln,keepUserOptionState:un}=He({config:A.value}),{svgRef:z}=Ue({config:F.value.title});function dn(){let e=Te({userConfig:S.config,defaultConfig:Rt}),t=e.theme;if(!t)return e;if(!zt.value(e))return Bt(e),e;let n=Te({userConfig:Ke[t]||S.config,defaultConfig:e});return{...Te({userConfig:S.config,defaultConfig:n}),customPalette:e.customPalette.length?e.customPalette:pe[e.theme]||o}}let fn=ce(S.config);ct(()=>S.config,(e,t)=>{let n=ce(e),r=n!==fn;fn=n;let i=dn();r?(R.value||(A.value=i),cn.value=!A.value.userOptions.showOnChartHover,hn(),Yt.value+=1,Xt.value+=1,Zt.value+=1,U.value.showTable=A.value.table.show,U.value.showTooltip=P.value.show,U.value.showLabels=N.value.dataLabels.show,W.value.width=F.value.size,W.value.height=F.value.size):(A.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0});let pn=s(()=>{let{markers:e}=N.value.dataLabels,t=Y.value/2,n=U.value.showLabels?e.position===`left`?t:-t:0,r=U.value.showLabels?W.value.width/2-t:0,i=e.position===`left`?r:-r;return{x:A.value.responsive?i:n/F.value.size*W.value.width,y:0/F.value.size*W.value.height}}),B=s(()=>({x:W.value.width/2+pn.value.x,y:W.value.height/2+pn.value.y}));ct(()=>S.dataset,e=>{Array.isArray(e)&&e.length>0&&(sn.value=!1)},{deep:!0});let V=it(null),H=it(null);tt(()=>{$t.value=!0,hn()});let mn=s(()=>A.value.debug);function hn(){if(ye(S.dataset)?(le({componentName:`VueUiRings`,type:`dataset`,debug:mn.value}),sn.value=!0):S.dataset.forEach((e,t)=>{e.values.length||(le({componentName:`VueUiRings`,type:`dataset`,debug:mn.value}),sn.value=!0),ve({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{le({componentName:`VueUiRings`,type:`datasetSerieAttribute`,property:e,index:t,debug:mn.value})})}),ye(S.dataset)||(sn.value=A.value.loading),A.value.responsive){let e=Le(()=>{Qt.value=!0;let{width:e,height:t}=Re({chart:D.value,title:F.value.title.text?Gt.value:null,legend:F.value.legend.show?Kt.value:null,source:qt.value,noTitle:Jt.value});requestAnimationFrame(()=>{W.value.width=e,W.value.height=t-12,Qt.value=!1})});V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(e),H.value=D.value.parentNode,V.value.observe(H.value)}setTimeout(()=>{C.value=!0},600)}et(()=>{V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:gn,isImaging:_n,generatePdf:vn,generateImage:yn}=Pe({elementId:`rings_${w.value}`,fileName:F.value.title.text||`vue-ui-rings`,options:A.value.userOptions.print}),bn=s(()=>A.value.userOptions.show&&!F.value.title.text),xn=s(()=>_e(A.value.customPalette)),U=v({showTable:A.value.table.show,showTooltip:P.value.show,showLabels:N.value.dataLabels.show});ct(A,()=>{U.value={showTable:A.value.table.show,showTooltip:P.value.show,showLabels:N.value.dataLabels.show}},{immediate:!0});let W=v({height:F.value.size,width:F.value.size}),Sn=s(()=>Math.min(W.value.height,W.value.width)),Cn=lt,G=v([]);function wn(){G.value.length?G.value=[]:Mn.value.forEach(e=>{G.value.push(e.uid)}),Tn()}function Tn(){Cn(`selectLegend`,J.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function En(e){if(G.value.includes(e))G.value=G.value.filter(t=>t!==e);else{if(G.value.length===K.value.length-1)return;G.value.push(e)}Tn()}function Dn(e){return K.value.length?K.value.find(t=>t.name===e)||(mn.value&&console.warn(`VueUiRings - Series name not found "${e}"`),null):(mn.value&&console.warn(`VueUiRings - There are no series to show.`),null)}function On(e){let t=Dn(e);t!==null&&G.value.includes(t.uid)&&En(t.uid)}function kn(e){let t=Dn(e);t!==null&&(G.value.includes(t.uid)||En(t.uid))}let An=s(()=>Math.max(...K.value.filter(e=>!G.value.includes(e.uid)).map(({value:e})=>e)));function jn(e){return e/An.value}let K=s(()=>on.value.map(({values:e,name:t,color:n=null},r)=>{let i=ie(e).reduce((e,t)=>e+t,0);return{name:t,color:n||ae(n)||xn.value[r]||o[r]||o[r%o.length],value:i,proportion:i/on.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0),uid:oe(),absoluteIndex:r}})),Mn=s(()=>K.value.map((e,t)=>{let n=de(N.value.dataLabels.formatter,e.value,a({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,index:t}),r=isNaN(e.value/q.value)?`-`:a({v:e.value/q.value*100,s:`%`,r:F.value.legend.roundingPercentage}),i=Ln({showVal:F.value.legend.showValue,showPercentage:F.value.legend.showPercentage,val:n,percentage:G.value.includes(e.uid)?`-%`:r});return{...e,shape:`circle`,opacity:G.value.includes(e.uid)?.5:1,segregate:()=>En(e.uid),isSegregated:G.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${i}`}}).toSorted((e,t)=>t.value-e.value)),Nn=s(()=>({cy:`rings-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``})),q=s(()=>K.value.filter(e=>!G.value.includes(e.uid)).map(({value:e})=>e).reduce((e,t)=>e+t,0)),J=s(()=>K.value.filter(e=>!G.value.includes(e.uid)).map(({name:e,value:t,color:n=null,uid:r,absoluteIndex:i},a)=>({absoluteIndex:i,uid:r,name:e,color:n||ae(n)||xn.value[a]||o[a]||o[a%o.length],value:t,proportion:jn(t),percentage:t/q.value*100,strokeWidth:M.value.strokeWidth*jn(t)})).toSorted((e,t)=>t.value-e.value));function Pn(){return J.value.map(({name:e,color:t,value:n,absoluteValues:r,percentage:i})=>({name:e,color:t,value:n,absoluteValues:r,percentage:i}))}let Y=s(()=>Sn.value-M.value.strokeWidth*2);function Fn(e,t){A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function In(e,t){E.value=null,T.value=!1,O.value=null,k.value=`pointer`,A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Ln({val:e,percentage:t,showVal:n,showPercentage:r}){let i=N.value.dataLabels;return We({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Rn(e){let t=N.value.dataLabels,n=de(t.formatter,e.value,a({p:t.prefix,v:e.value,s:t.suffix,r:t.roundingValue})),r=a({v:e.percentage,s:`%`,r:t.roundingPercentage});return`${e.name}\n${Ln({val:n,percentage:r,showVal:t.showValue,showPercentage:t.showPercentage})}`}function zn(e){return ue(Y.value*e.proportion/2*.9<=0?1e-4:Y.value*e.proportion/2*.9)}function Bn(e,t){return t===0?B.value.y:B.value.y+Y.value*J.value[0].proportion/2-Y.value*e.proportion/2-2*(t+1)}function X(e,t){let n=N.value.dataLabels.markers.position===`left`?-(Y.value/2):Y.value/2;return{x:B.value.x+n,y:Bn(e,t)-zn(e)}}let Vn=v(null);function Hn(e,t,n=`pointer`){if(A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:t}),G.value.length===S.dataset.length)return;Vn.value={datapoint:e,seriesIndex:t,series:J.value,config:A.value},E.value=t,O.value=t,k.value=n;let r=J.value[t],i=P.value.customFormat;if(te(i)&&he(()=>i({seriesIndex:t,datapoint:e,series:J.value,config:A.value})))Ut.value=i({seriesIndex:t,datapoint:e,series:J.value,config:A.value});else{let n=``;n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${r.color}" />${Vt.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${w.value}_${e.absoluteIndex})" />`:``}</svg>`,n+=`<b>${Ln({showVal:P.value.showValue,showPercentage:P.value.showPercentage,val:`<span>${de(N.value.dataLabels.formatter,r.value,a({p:N.value.dataLabels.prefix,v:r.value,s:N.value.dataLabels.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</span>`,percentage:a({v:r.value/q.value*100,s:`%`,r:P.value.roundingPercentage})})}</b></div>`,Ut.value=n}T.value=!0}let Z=s(()=>({head:J.value.map(e=>({name:e.name,color:e.color})),body:J.value.map(e=>e.value)})),Q=s(()=>{let e=[`__SUM__`,a({p:N.value.dataLabels.prefix,v:q.value,s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),`100%`],t=Z.value.head.map((e,t)=>[{color:e.color,name:e.name},a({p:N.value.dataLabels.prefix,v:Z.value.body[t],s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),isNaN(Z.value.body[t]/q.value)?`-`:(Z.value.body[t]/q.value*100).toFixed(A.value.table.td.roundingPercentage)+`%`]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name:e)),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:[A.value.table.columnNames.series,A.value.table.columnNames.value,A.value.table.columnNames.percentage]}});function Un(e=null){$e(()=>{let t=Z.value.head.map((e,t)=>[[e.name],[Z.value.body[t]],[isNaN(Z.value.body[t]/q.value)?`-`:Z.value.body[t]/q.value*100]]),n=[[F.value.title.text],[F.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=ee(n);e?e(r):me({csvContent:r,title:F.value.title.text||`vue-ui-rings`})})}let $=v(!1);function Wn(e){$.value=e,Wt.value+=1}function Gn(){U.value.showTable=!U.value.showTable}function Kn(){U.value.showTooltip=!U.value.showTooltip}function qn(){U.value.showLabels=!U.value.showLabels}let Jn=v(!1);function Yn(){Jn.value=!Jn.value}let Xn=De(D,()=>F.value.title.text),Zn=s(()=>je({config:A,style:F,mutableConfig:U,dialog:Lt,accordion:Mt,isFullscreen:$,parent:D,maxWidth:800,isCursorPointer:L}));ct(()=>U.value.showTable,e=>Ae(e,A,en));function Qn(){U.value.showTable=!1,tn.value&&tn.value.setTableIconState(!1)}let $n=s(()=>Mn.value.map(e=>({...e,name:e.display}))),er=s(()=>F.value.backgroundColor),tr=s(()=>F.value.legend),nr=s(()=>F.value.title),{isCallbackImaging:rr,isCallbackSvg:ir,generateSvg:ar,onGenerateImage:or}=ke({svg:z,title:nr,legend:tr,legendItems:$n,backgroundColor:er,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:yn});async function sr(){Cn(`copyAlt`,{config:A.value,dataset:J.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function cr(){O.value=null,rn.value=!0}function lr(){O.value=null,k.value=`pointer`,T.value=!1,E.value=null,rn.value=!1}function ur(e){if(!z.value||Jn.value||document.activeElement!==z.value||!J.value.length||G.value.length===S.dataset.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){O.value=null,k.value=`pointer`,T.value=!1,E.value=null;return}if(r){if(O.value===null)return;let e=J.value[O.value];if(!e)return;Fn(e,O.value);return}let a=O.value;a===null||a<0||a>=J.value.length?a=n?0:J.value.length-1:n?(a+=1,a>=J.value.length&&(a=0)):t&&(--a,a<0&&(a=J.value.length-1));let ee=J.value[a];ee&&(dr(a),Hn(ee,a,`keyboard`))}function dr(e){if(!Number.isFinite(e)||!z.value)return;let t=J.value[e];if(!t)return;let n=X(t,e),r=z.value.getBoundingClientRect();nn.value={x:r.left+n.x/W.value.width*r.width,y:r.top+n.y/W.value.height*r.height}}let fr=s(()=>({headers:Q.value?.colNames??[],rows:Q.value?.a11yBody??[]}));return we({getData:Pn,getImage:Xn,generatePdf:vn,generateCsv:Un,generateImage:yn,generateSvg:ar,hideSeries:kn,showSeries:On,toggleTable:Gn,toggleTooltip:Kn,toggleAnnotator:Yn,toggleFullscreen:Wn,toggleLabels:qn,copyAlt:sr}),(e,i)=>(_(),u(`div`,{ref_key:`ringsChart`,ref:D,class:m(`vue-data-ui-component vue-ui-rings ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:g(`font-family:${A.value.style.fontFamily};text-align:center;width:100%;background:${F.value.backgroundColor};${A.value.responsive?`height: 100%`:``}`),id:`rings_${w.value}`,onMouseleave:i[2]||=e=>{E.value=null,T.value=!1,b(ln)(!1)},onMouseenter:i[3]||=()=>b(ln)(!0)},[d(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[d(`p`,null,at(A.value.a11y.translations.keyboardNavigation),1)],8,dt),fr.value?.rows?.length?(_(),c(Ve,{key:0,uid:w.value,head:fr.value.headers,body:fr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):l(``,!0),j.value.buttons.annotator?(_(),c(b(Pt),Qe({key:1},b(n)(j.value.annotator),{svgRef:b(z),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Jn.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Yn}),Ye({_:2},[nt(b(r),n=>({name:n,fn:x(r=>[y(e.$slots,n,h(p(b(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):l(``,!0),bn.value?(_(),u(`div`,{key:2,ref_key:`noTitle`,ref:Jt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):l(``,!0),F.value.title.text?(_(),u(`div`,{key:3,ref_key:`chartTitle`,ref:Gt,style:`width:100%;background:transparent`},[(_(),c(Oe,{key:`title_${Yt.value}`,config:{title:{cy:`rings-div-title`,...F.value.title},subtitle:{cy:`rings-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):l(``,!0),d(`div`,{id:`legend-top-${w.value}`},null,8,ft),j.value.show&&Ht.value&&(b(un)||b(cn))?(_(),c(b(Ft),{ref_key:`userOptionsRef`,ref:tn,key:`user_options_${Wt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:b(gn),isImaging:b(_n),uid:w.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,hasPdf:j.value.buttons.pdf,hasXls:j.value.buttons.csv,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasTable:j.value.buttons.table,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,hasLabel:j.value.buttons.labels,isTooltip:U.value.showTooltip,isFullscreen:$.value,titles:{...j.value.buttonTitles},chartElement:D.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:Jn.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Wn,onGeneratePdf:b(vn),onGenerateCsv:Un,onGenerateImage:b(or),onGenerateSvg:b(ar),onToggleTable:Gn,onToggleTooltip:Kn,onToggleAnnotator:Yn,onToggleLabels:qn,onCopyAlt:sr,style:g({visibility:b(un)?b(cn)?`visible`:`hidden`:`visible`})},Ye({_:2},[nt(b(Me)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:x(n=>[y(e.$slots,t,h(p(b(Ne)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.hasLabel.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):l(``,!0),d(`div`,pt,[(_(),u(`svg`,{ref_key:`svgRef`,ref:z,xmlns:b(ge),class:m({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,resizing:Qt.value||b(R),"vue-data-ui-no-transition":!b(I)}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:g(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),"aria-describedby":`chart-instructions-${w.value}`,tabindex:`0`,onFocus:cr,onBlur:lr,onKeydown:ur},[Ze(b(It)),y(e.$slots,`svg-underlayer`,{svg:{...W.value,isPrintingImg:b(gn)||b(_n)||b(rr),isPrintingSvg:b(ir)}},void 0,!0),e.$slots[`chart-background`]?(_(),u(`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`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,ht)):l(``,!0),d(`defs`,null,[(_(!0),u(qe,null,nt(J.value,(e,t)=>(_(),c(ze,{t:`radial`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,id:`gradient_${w.value}_${t}`,key:`gradient_${w.value}_${t}`,stops:[[`0%`,b(re)(b(se)(e.color,.05),100-M.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(_(),u(`g`,gt,[(_(!0),u(qe,null,nt(J.value,t=>(_(),u(`defs`,null,[y(e.$slots,`pattern`,Qe({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${w.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):l(``,!0),(_(!0),u(qe,null,nt(J.value,(t,n)=>(_(),u(`g`,{key:`r_${t.uid}`},[d(`circle`,{class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-opacity":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:M.value.gradient.underlayerColor},null,14,_t),d(`circle`,{class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:M.value.gradient.show?`url(#gradient_${w.value}_${n})`:t.color},null,14,vt),e.$slots.pattern?(_(),u(`circle`,{key:0,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:`url(#pattern_${w.value}_${t.absoluteIndex})`},null,14,yt)):l(``,!0),d(`circle`,{stroke:`none`,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:`transparent`,onMouseenter:e=>Hn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n)},null,40,bt),U.value.showLabels?(_(),u(qe,{key:1},[d(`rect`,{x:N.value.dataLabels.markers.position===`left`?X(t,n).x:B.value.x,y:X(t,n).y-N.value.dataLabels.markers.strokeWidth/2,width:Math.abs(B.value.x-X(t,n).x),height:N.value.dataLabels.markers.strokeWidth,fill:N.value.dataLabels.markers.stroke,rx:N.value.dataLabels.markers.strokeWidth,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n})},null,10,xt),d(`circle`,{cx:X(t,n).x,cy:X(t,n).y,r:N.value.dataLabels.markers.radius,fill:t.color,stroke:F.value.backgroundColor,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n})},null,10,St),d(`text`,{"text-anchor":N.value.dataLabels.markers.position===`left`?`end`:`start`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,"font-weight":N.value.dataLabels.bold?`bold`:`normal`,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),transform:`translate(${X(t,n).x+(N.value.dataLabels.markers.position===`left`?-N.value.dataLabels.offsetX-14:N.value.dataLabels.offsetX)+6}, ${X(t,n).y+N.value.dataLabels.fontSize/3})`,onMouseenter:e=>Hn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n),innerHTML:b(ne)({content:Rn(t),fontSize:N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,x:0,y:0,translateY:!0})},null,42,Ct)],64)):l(``,!0)]))),128)),y(e.$slots,`svg`,{svg:{...W.value,isPrintingImg:b(gn)||b(_n)||b(rr),isPrintingSvg:b(ir)}},void 0,!0)],46,mt)),e.$slots.hint?(_(),u(`div`,wt,[y(e.$slots,`hint`,h(p({hint:A.value.a11y.translations.keyboardNavigation,isVisible:rn.value})),void 0,!0)])):l(``,!0)]),e.$slots.watermark?(_(),u(`div`,Tt,[y(e.$slots,`watermark`,h(p({isPrinting:b(gn)||b(_n)||b(rr)||b(ir)})),void 0,!0)])):l(``,!0),d(`div`,{id:`legend-bottom-${w.value}`},null,8,Et),$t.value&&(F.value.legend.show||e.$slots.legend)?(_(),c(Je,{key:6,to:F.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[d(`div`,{ref_key:`chartLegend`,ref:Kt},[y(e.$slots,`legend`,{legend:Mn.value},()=>[F.value.legend.show?(_(),c(Ge,{key:`legend_${Zt.value}`,legendSet:Mn.value,config:Nn.value,isCursorPointer:L.value,onClickMarker:i[0]||=({legend:e})=>En(e.uid)},Ye({item:x(({legend:e,index:t})=>[b(R)?l(``,!0):(_(),u(`div`,{key:0,onClick:t=>En(e.uid),style:g(`opacity:${G.value.includes(e.uid)?.5:1}`)},at(e.display),13,Dt))]),legendToggle:x(()=>[Mn.value.length>2&&F.value.legend.selectAllToggle.show&&!b(R)?(_(),c(Be,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:G.value.length>0,isCursorPointer:L.value,onToggle:wn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):l(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:x(({legend:e,index:t})=>[Ze(Ie,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${w.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):l(``,!0)],!0)],512)],8,[`to`])):l(``,!0),e.$slots.source?(_(),u(`div`,{key:7,ref_key:`source`,ref:qt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0),Ze(b(At),{teleportTo:P.value.teleportTo,show:U.value.showTooltip&&T.value&&G.value.length<S.dataset.length,backgroundColor:P.value.backgroundColor,color:P.value.color,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,fontSize:P.value.fontSize,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:D.value,content:Ut.value,isFullscreen:$.value,isCustom:P.value.customFormat&&typeof P.value.customFormat==`function`,smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:k.value===`keyboard`,a11yPosition:nn.value},{"tooltip-before":x(()=>[y(e.$slots,`tooltip-before`,h(p({...Vn.value})),void 0,!0)]),tooltip:x(()=>[y(e.$slots,`tooltip`,h(p({...Vn.value})),void 0,!0)]),"tooltip-after":x(()=>[y(e.$slots,`tooltip-after`,h(p({...Vn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Ht.value&&j.value.buttons.table?(_(),c(rt(Zn.value.component),Qe({key:8},Zn.value.props,{ref_key:`tableUnit`,ref:en,onClose:Qn}),Ye({content:x(()=>[(_(),c(b(Nt),{key:`table_${Xt.value}`,colNames:Q.value.colNames,head:Q.value.head,body:Q.value.body,config:Q.value.config,title:A.value.table.useDialog?``:Zn.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:Qn},{th:x(({th:e})=>[e===`__SUM__`?(_(),u(`div`,Ot,[Ze(b(jt),{name:`sigma`,stroke:Q.value.config.th.color,size:16},null,8,[`stroke`])])):(_(),u(`div`,kt,at(e),1))]),td:x(({td:e})=>[Xe(at(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[A.value.table.useDialog?{name:`title`,fn:x(()=>[Xe(at(Zn.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:x(()=>[d(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Un(j.value.callbacks.csv),style:g({cursor:L.value?`pointer`:`default`})},[Ze(b(jt),{name:`fileCsv`,stroke:Zn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):l(``,!0),y(e.$slots,`skeleton`,{},()=>[b(R)?(_(),c(xe,{key:0})):l(``,!0)],!0)],46,ut))}},[[`__scopeId`,`data-v-83abb35d`]]);export{lt as n,At as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Ct as o,D as s,Dt as c,F as l,Ht as u,Jt as d,P as f,Qt as p,S as ee,X as te,_ as ne,at as m,b as h,i as g,in as re,jt as ie,nt as ae,pt as oe,t as se,tn as ce,v as le,w as ue,yt as de,zt as fe}from"./lib-rPeBMZrn.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{n as he,t as ge}from"./useHints-C-TwxM0Y.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ve}from"./resolveChartConfig-CIhClE5R.js";import{t as ye}from"./img-D4RQwASc.js";import{n as be}from"./Title-BliHuXfT.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{n as Se,t as Ce}from"./tableIntegration-CNoJ1CIY.js";import{n as we,t as Te}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ee}from"./usePrinter-DVf3YcG5.js";import{t as De}from"./useTransitions-ChGGrtrv.js";import{t as Oe}from"./useSvgLabelLayout-42Kats14.js";import{t as ke}from"./Shape-CRe8woTu.js";import{t as Ae}from"./useResponsive-CENUxfEL.js";import{t as je}from"./DefGrad-DKMq1REY.js";import{t as Me}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ne}from"./A11yDataTable-DWNlWXzs.js";import{t as Pe}from"./useUserOptionState-CXlFnwPv.js";import{t as Fe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ie}from"./Legend-DM0ClX3D.js";import{t as Le}from"./vue_ui_scatter-C50uFYQL.js";import{Fragment as _,Teleport as Re,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as ze,createTextVNode as Be,createVNode as Ve,defineAsyncComponent as He,guardReactiveProps as Ue,mergeProps as We,nextTick as Ge,normalizeClass as Ke,normalizeProps as qe,normalizeStyle as Je,onBeforeUnmount as Ye,onMounted as Xe,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as Ze,shallowRef as Qe,toDisplayString as D,toRefs as $e,unref as O,watch as et,withCtx as k}from"vue";var tt=/* @__PURE__ */ e({default:()=>Tn}),nt=[`id`],rt=[`id`],it={key:0,class:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`},at=[`id`],ot={style:{position:`relative`}},st=[`xmlns`,`aria-describedby`,`viewBox`],ct=[`width`,`height`],lt={key:1},ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ft={key:2},pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],mt=[`opacity`],ht=[`stroke`,`stroke-width`,`d`],gt=[`transform`,`font-size`,`fill`,`stroke`],_t={key:4},vt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],yt=[`opacity`],bt=[`d`,`stroke`,`stroke-width`],xt=[`transform`,`font-size`,`fill`,`stroke`],St={key:6},Ct=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],wt=[`x`,`y`,`width`,`height`,`onMouseenter`],Tt={key:2,style:{"pointer-events":`none`}},Et=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Dt=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Ot=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],kt=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`],At=[`x`,`y`,`width`,`height`,`onMouseenter`],jt={key:2,style:{"pointer-events":`none`}},Mt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Nt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Ft={key:0,style:{"pointer-events":`none`}},It=[`d`,`stroke`,`stroke-width`],Lt=[`d`,`stroke`,`stroke-width`],Rt=[`d`,`stroke`,`stroke-width`],zt=[`d`,`stroke`,`stroke-width`],Bt={key:7},Vt=[`points`,`fill`,`stroke-width`,`stroke-dasharray`,`stroke`],Ht={key:0,class:`vue-ui-scatter-datapoint`},Ut=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseover`,`onMouseleave`,`onClick`],Wt={key:1},Gt=[`transform`,`font-size`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],Kt=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-opacity`],qt={key:0,style:{"pointer-events":`none`}},Jt=[`x`,`y`,`width`,`height`],Yt={key:0,style:{"pointer-events":`none !important`}},Xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Zt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Qt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],$t=[`x`,`y`,`font-size`,`fill`,`font-weight`],en=[`x`,`y`,`font-size`,`fill`],tn=[`x`,`y`,`font-size`,`fill`],nn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],rn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],an=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],on=[`id`,`transform`,`font-size`,`font-weight`,`fill`],sn=[`font-size`,`fill`,`transform`],cn=[`transform`,`font-size`,`fill`],ln=[`x`,`y`,`font-size`,`fill`],un=[`x`,`y`,`font-size`,`fill`],dn=[`font-size`,`font-weight`,`fill`,`x`,`y`],fn=[`id`],pn=[`x`,`y`,`width`,`height`],mn={key:14,style:{pointerEvents:`none`}},hn=[`x1`,`x2`,`y1`,`y2`,`stroke-dasharray`,`stroke`,`stroke-width`,`clip-path`],gn=[`x`,`y`,`fill`,`font-size`,`font-weight`],_n={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vn={key:6,class:`vue-data-ui-watermark`},yn=[`id`],bn=[`onClick`],xn={key:0,style:{width:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`}},Sn={viewBox:`0 0 20 20`,height:`20`,width:`20`,style:{overflow:`hidden`,background:`transparent`}},Cn={key:0},wn=[`innerHTML`],Tn=/*#__PURE__*/ _e({__name:`vue-ui-scatter`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`,`selectLegend`],setup(e,{expose:_e,emit:tt}){let Tn=He(()=>import(`./Tooltip-C1q0Qoh7.js`)),En=He(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Dn=He(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),On=He(()=>import(`./DataTable-Dof6yhO7.js`)),kn=He(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),An=He(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),jn=He(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),Mn=He(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_scatter:Nn}=i(),A=e,Pn=tt,Fn=v(()=>!!A.dataset&&A.dataset.length),j=w(te()),In=w(!1),Ln=w(``),Rn=w(0),zn=w(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=w(null),Wn=w(0),Gn=w(0),Kn=w(0),M=w([]),qn=w(!1),Jn=w(null),Yn=w(null),Xn=w(null),Zn=w(null),Qn=w(null),$n=w(null),er=w(null),tr=w(null),nr=w(null),rr=w(null),ir=w(null),ar=w({x:0,y:0}),or=w(`pointer`),sr=w(!1),cr=w(null),N=w(xr()),P=v(()=>N.value.userOptions),F=v(()=>N.value.style.layout.dataLabels.xAxis),I=v(()=>N.value.style.layout.dataLabels.yAxis),L=v(()=>N.value.style.layout.marginalBars),R=v(()=>N.value.style.layout.plots),z=v(()=>N.value.style.tooltip),B=v(()=>N.value.style);he({config:()=>N.value,dataset:()=>A.dataset,component:`VueUiScatter`,rules:[ge.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series (clusters) is > 6. Consider:`,``,``,`▶️ Using filters to let users choose a maximum number of series (clusters) to display.`]}]});let{transitionEnabled:lr}=De({config:()=>N.value.transitions,dataset:()=>A.dataset}),ur=v(()=>N.value.userOptions.useCursorPointer),dr=v(()=>c(N.value.events?.datapointClick));function fr(e=100,t=.8,n={}){let{meanX:r=0,sdX:i=1,meanY:a=0,sdY:o=1,seed:s}=n,c=(s??Math.floor(Math.random()*2**31))>>>0,l=()=>(c=c*1664525+1013904223>>>0,c/2**32),u=()=>{let e=0,t=0;for(;e===0;)e=l();for(;t===0;)t=l();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)},d=e/2,f=Array.from({length:d},u),p=Array.from({length:d},u),ee=e=>e.reduce((e,t)=>e+t,0)/e.length,te=ee(f),ne=ee(p);for(let e=0;e<d;e+=1)f[e]-=te,p[e]-=ne;let m=(e,t)=>e.reduce((e,n,r)=>e+n*t[r],0),h=e=>m(e,e),g=m(p,f)/h(f),re=p.map((e,t)=>e-g*f[t]),ie=h(f)/d,ae=h(re)/d,oe=Math.sqrt((1-t*t)*ie/ae),se=f.map((e,n)=>t*e+oe*re[n]),ce=f.concat(f.map(e=>-e)),le=se.concat(se.map(e=>-e)),ue=e=>Math.sqrt(h(e)/e.length),de=(e,t,n)=>{let r=ue(e);return e.map(e=>n+(r?e/r*t:0))},fe=de(ce,i,r),pe=de(le,o,a);for(let e=fe.length-1;e>0;--e){let t=Math.floor(l()*(e+1));[fe[e],fe[t]]=[fe[t],fe[e]],[pe[e],pe[t]]=[pe[t],pe[e]]}return fe.map((e,t)=>({x:e,y:pe[t]}))}let pr=v(()=>re({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{backgroundColor:`#99999930`,layout:{axis:{stroke:`#6A6A6A`},correlation:{label:{show:!1}},dataLabels:{xAxis:{show:!1},yAxis:{show:!1}},marginalBars:{fill:`#99999960`},padding:{top:12,right:12,bottom:12,left:12},plots:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}},userConfig:N.value.skeletonConfig??{}})),{loading:mr,FINAL_DATASET:hr,manualLoading:gr}=pe({...$e(A),FINAL_CONFIG:N,prepareConfig:xr,skeletonDataset:A.config?.skeletonDataset??[{name:``,color:`#999999`,values:fr(100,.5,{seed:42})}],skeletonConfig:re({defaultConfig:N.value,userConfig:pr.value})}),{userOptionsVisible:_r,setUserOptionsVisibility:vr,keepUserOptionState:yr}=Pe({config:N.value}),{svgRef:br}=Fe({config:B.value.title});function xr(){return ve(A.config,Nn,Le)}let Sr=p(A.config);et(()=>A.config,(e,t)=>{let n=p(e),r=n!==Sr;Sr=n;let i=xr();r?(mr.value||(N.value=i),_r.value=!N.value.userOptions.showOnChartHover,Or(),Wn.value+=1,Gn.value+=1,Kn.value+=1,V.value.showTable=N.value.table.show,V.value.showTooltip=z.value.show,Dr.value&&N.value.usePerformanceMode&&console.warn(`VueUiScatter : You are using performance mode
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Ct as o,D as s,Dt as c,F as l,Ht as u,Jt as d,P as f,Qt as p,S as ee,X as te,_ as ne,at as m,b as h,i as g,in as re,jt as ie,nt as ae,pt as oe,t as se,tn as ce,v as le,w as ue,yt as de,zt as fe}from"./lib-rPeBMZrn.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{n as he,t as ge}from"./useHints-C-TwxM0Y.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ve}from"./resolveChartConfig-CIhClE5R.js";import{t as ye}from"./img-D4RQwASc.js";import{n as be}from"./Title-BliHuXfT.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{n as Se,t as Ce}from"./tableIntegration-CNoJ1CIY.js";import{n as we,t as Te}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ee}from"./usePrinter-DVf3YcG5.js";import{t as De}from"./useTransitions-ChGGrtrv.js";import{t as Oe}from"./useSvgLabelLayout-42Kats14.js";import{t as ke}from"./Shape-CRe8woTu.js";import{t as Ae}from"./useResponsive-CENUxfEL.js";import{t as je}from"./DefGrad-DKMq1REY.js";import{t as Me}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ne}from"./A11yDataTable-DWNlWXzs.js";import{t as Pe}from"./useUserOptionState-CXlFnwPv.js";import{t as Fe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ie}from"./Legend-DM0ClX3D.js";import{t as Le}from"./vue_ui_scatter-C50uFYQL.js";import{Fragment as _,Teleport as Re,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as ze,createTextVNode as Be,createVNode as Ve,defineAsyncComponent as He,guardReactiveProps as Ue,mergeProps as We,nextTick as Ge,normalizeClass as Ke,normalizeProps as qe,normalizeStyle as Je,onBeforeUnmount as Ye,onMounted as Xe,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as Ze,shallowRef as Qe,toDisplayString as D,toRefs as $e,unref as O,watch as et,withCtx as k}from"vue";var tt=/* @__PURE__ */ e({default:()=>Tn}),nt=[`id`],rt=[`id`],it={key:0,class:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`},at=[`id`],ot={style:{position:`relative`}},st=[`xmlns`,`aria-describedby`,`viewBox`],ct=[`width`,`height`],lt={key:1},ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ft={key:2},pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],mt=[`opacity`],ht=[`stroke`,`stroke-width`,`d`],gt=[`transform`,`font-size`,`fill`,`stroke`],_t={key:4},vt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],yt=[`opacity`],bt=[`d`,`stroke`,`stroke-width`],xt=[`transform`,`font-size`,`fill`,`stroke`],St={key:6},Ct=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],wt=[`x`,`y`,`width`,`height`,`onMouseenter`],Tt={key:2,style:{"pointer-events":`none`}},Et=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Dt=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Ot=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],kt=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`],At=[`x`,`y`,`width`,`height`,`onMouseenter`],jt={key:2,style:{"pointer-events":`none`}},Mt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Nt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Ft={key:0,style:{"pointer-events":`none`}},It=[`d`,`stroke`,`stroke-width`],Lt=[`d`,`stroke`,`stroke-width`],Rt=[`d`,`stroke`,`stroke-width`],zt=[`d`,`stroke`,`stroke-width`],Bt={key:7},Vt=[`points`,`fill`,`stroke-width`,`stroke-dasharray`,`stroke`],Ht={key:0,class:`vue-ui-scatter-datapoint`},Ut=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseover`,`onMouseleave`,`onClick`],Wt={key:1},Gt=[`transform`,`font-size`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],Kt=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-opacity`],qt={key:0,style:{"pointer-events":`none`}},Jt=[`x`,`y`,`width`,`height`],Yt={key:0,style:{"pointer-events":`none !important`}},Xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Zt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Qt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],$t=[`x`,`y`,`font-size`,`fill`,`font-weight`],en=[`x`,`y`,`font-size`,`fill`],tn=[`x`,`y`,`font-size`,`fill`],nn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],rn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],an=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],on=[`id`,`transform`,`font-size`,`font-weight`,`fill`],sn=[`font-size`,`fill`,`transform`],cn=[`transform`,`font-size`,`fill`],ln=[`x`,`y`,`font-size`,`fill`],un=[`x`,`y`,`font-size`,`fill`],dn=[`font-size`,`font-weight`,`fill`,`x`,`y`],fn=[`id`],pn=[`x`,`y`,`width`,`height`],mn={key:14,style:{pointerEvents:`none`}},hn=[`x1`,`x2`,`y1`,`y2`,`stroke-dasharray`,`stroke`,`stroke-width`,`clip-path`],gn=[`x`,`y`,`fill`,`font-size`,`font-weight`],_n={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vn={key:6,class:`vue-data-ui-watermark`},yn=[`id`],bn=[`onClick`],xn={key:0,style:{width:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`}},Sn={viewBox:`0 0 20 20`,height:`20`,width:`20`,style:{overflow:`hidden`,background:`transparent`}},Cn={key:0},wn=[`innerHTML`],Tn=/*#__PURE__*/ _e({__name:`vue-ui-scatter`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`,`selectLegend`],setup(e,{expose:_e,emit:tt}){let Tn=He(()=>import(`./Tooltip-C1q0Qoh7.js`)),En=He(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Dn=He(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),On=He(()=>import(`./DataTable-Dof6yhO7.js`)),kn=He(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),An=He(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),jn=He(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Mn=He(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_scatter:Nn}=i(),A=e,Pn=tt,Fn=v(()=>!!A.dataset&&A.dataset.length),j=w(te()),In=w(!1),Ln=w(``),Rn=w(0),zn=w(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=w(null),Wn=w(0),Gn=w(0),Kn=w(0),M=w([]),qn=w(!1),Jn=w(null),Yn=w(null),Xn=w(null),Zn=w(null),Qn=w(null),$n=w(null),er=w(null),tr=w(null),nr=w(null),rr=w(null),ir=w(null),ar=w({x:0,y:0}),or=w(`pointer`),sr=w(!1),cr=w(null),N=w(xr()),P=v(()=>N.value.userOptions),F=v(()=>N.value.style.layout.dataLabels.xAxis),I=v(()=>N.value.style.layout.dataLabels.yAxis),L=v(()=>N.value.style.layout.marginalBars),R=v(()=>N.value.style.layout.plots),z=v(()=>N.value.style.tooltip),B=v(()=>N.value.style);he({config:()=>N.value,dataset:()=>A.dataset,component:`VueUiScatter`,rules:[ge.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series (clusters) is > 6. Consider:`,``,``,`▶️ Using filters to let users choose a maximum number of series (clusters) to display.`]}]});let{transitionEnabled:lr}=De({config:()=>N.value.transitions,dataset:()=>A.dataset}),ur=v(()=>N.value.userOptions.useCursorPointer),dr=v(()=>c(N.value.events?.datapointClick));function fr(e=100,t=.8,n={}){let{meanX:r=0,sdX:i=1,meanY:a=0,sdY:o=1,seed:s}=n,c=(s??Math.floor(Math.random()*2**31))>>>0,l=()=>(c=c*1664525+1013904223>>>0,c/2**32),u=()=>{let e=0,t=0;for(;e===0;)e=l();for(;t===0;)t=l();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)},d=e/2,f=Array.from({length:d},u),p=Array.from({length:d},u),ee=e=>e.reduce((e,t)=>e+t,0)/e.length,te=ee(f),ne=ee(p);for(let e=0;e<d;e+=1)f[e]-=te,p[e]-=ne;let m=(e,t)=>e.reduce((e,n,r)=>e+n*t[r],0),h=e=>m(e,e),g=m(p,f)/h(f),re=p.map((e,t)=>e-g*f[t]),ie=h(f)/d,ae=h(re)/d,oe=Math.sqrt((1-t*t)*ie/ae),se=f.map((e,n)=>t*e+oe*re[n]),ce=f.concat(f.map(e=>-e)),le=se.concat(se.map(e=>-e)),ue=e=>Math.sqrt(h(e)/e.length),de=(e,t,n)=>{let r=ue(e);return e.map(e=>n+(r?e/r*t:0))},fe=de(ce,i,r),pe=de(le,o,a);for(let e=fe.length-1;e>0;--e){let t=Math.floor(l()*(e+1));[fe[e],fe[t]]=[fe[t],fe[e]],[pe[e],pe[t]]=[pe[t],pe[e]]}return fe.map((e,t)=>({x:e,y:pe[t]}))}let pr=v(()=>re({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{backgroundColor:`#99999930`,layout:{axis:{stroke:`#6A6A6A`},correlation:{label:{show:!1}},dataLabels:{xAxis:{show:!1},yAxis:{show:!1}},marginalBars:{fill:`#99999960`},padding:{top:12,right:12,bottom:12,left:12},plots:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}},userConfig:N.value.skeletonConfig??{}})),{loading:mr,FINAL_DATASET:hr,manualLoading:gr}=pe({...$e(A),FINAL_CONFIG:N,prepareConfig:xr,skeletonDataset:A.config?.skeletonDataset??[{name:``,color:`#999999`,values:fr(100,.5,{seed:42})}],skeletonConfig:re({defaultConfig:N.value,userConfig:pr.value})}),{userOptionsVisible:_r,setUserOptionsVisibility:vr,keepUserOptionState:yr}=Pe({config:N.value}),{svgRef:br}=Fe({config:B.value.title});function xr(){return ve(A.config,Nn,Le)}let Sr=p(A.config);et(()=>A.config,(e,t)=>{let n=p(e),r=n!==Sr;Sr=n;let i=xr();r?(mr.value||(N.value=i),_r.value=!N.value.userOptions.showOnChartHover,Or(),Wn.value+=1,Gn.value+=1,Kn.value+=1,V.value.showTable=N.value.table.show,V.value.showTooltip=z.value.show,Dr.value&&N.value.usePerformanceMode&&console.warn(`VueUiScatter : You are using performance mode
2
2
 
3
3
  - downsampling is disabled in this mode, all plots are rendered
4
4
 
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{B as n,Jt as r,M as i,X as ee,t as a}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as re}from"./useNestedProp-DnGoh-XS.js";import{t as ie}from"./DefGrad-DKMq1REY.js";import{n as s}from"./PackageVersion-Bczw6rsP.js";import{Fragment as c,computed as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createStaticVNode as p,createVNode as m,normalizeClass as ae,normalizeStyle as h,openBlock as g,ref as _,renderList as v,unref as y}from"vue";var b=/* @__PURE__ */ e({default:()=>G}),oe=[`id`],se=[`xmlns`],ce={transform:`translate(300, 300)`},le=[`d`,`fill`,`stroke`],ue=[`xmlns`],x=[`fill`,`stroke`],S=[`fill`,`stroke`],C=[`fill`,`stroke`],w=[`fill`,`stroke`],T=[`fill`,`stroke`],E=[`xmlns`],D=[`stroke`],O=[`stroke`],k=[`stroke`],A=[`fill`,`stroke`],j=[`fill`],M=[`fill`,`stroke`],N=[`fill`],P=[`fill`,`stroke`],F=[`fill`],I=[`fill`,`stroke`],L=[`fill`],R=[`fill`,`stroke`],z=[`fill`],B=[`fill`,`stroke`],V=[`fill`],H=[`xmlns`],U=[`stroke`],de=[`stroke`],fe=[`stroke`],pe=[`stroke`],me=[`stroke`],he=[`stroke`],ge=[`stroke`],_e=[`stroke`],ve=[`stroke`],ye=[`xmlns`],be=[`stroke`,`fill`],xe=[`xmlns`],Se=[`stroke`,`fill`],Ce=[`xmlns`],we=[`fill`],Te=[`fill`],Ee=[`fill`],De=[`fill`],Oe=[`xmlns`],ke=[`stroke`],Ae=[`fill`],je=[`stroke`,`fill`],Me=[`stroke`,`fill`],Ne=[`fill`],Pe=[`stroke`,`fill`],Fe=[`stroke`,`fill`],Ie=[`fill`],Le=[`stroke`,`fill`],Re=[`stroke`,`fill`],ze=[`fill`],Be=[`stroke`,`fill`],Ve=[`stroke`,`fill`],He=[`fill`],Ue=[`stroke`,`fill`],We=[`stroke`,`fill`],Ge=[`xmlns`],Ke=[`stroke`],qe=[`stroke`],Je=[`stroke`,`fill`],Ye=[`stroke`,`fill`],Xe=[`stroke`,`fill`],Ze=[`stroke`,`fill`],Qe=[`stroke`,`fill`],$e=[`stroke`,`fill`],et=[`stroke`,`fill`],tt=[`stroke`,`fill`],nt=[`stroke`,`fill`],rt=[`stroke`,`fill`],it=[`stroke`,`fill`],at=[`stroke`,`fill`],ot=[`stroke`,`fill`],st=[`stroke`,`fill`],ct=[`stroke`,`fill`],lt=[`stroke`,`fill`],ut=[`stroke`,`fill`],dt=[`stroke`,`fill`],ft=[`stroke`,`fill`],pt=[`stroke`,`fill`],mt=[`stroke`,`fill`],ht=[`stroke`,`fill`],gt=[`stroke`,`fill`],_t=[`xmlns`],vt=[`stroke`],yt=[`xmlns`],bt=[`stroke`],xt=[`xmlns`],St=[`stroke`],Ct=[`xmlns`],wt=[`fill`],Tt=[`fill`],Et=[`fill`],Dt=[`fill`],Ot=[`fill`],kt=[`fill`],At=[`fill`],jt=[`fill`],Mt=[`fill`],Nt=[`fill`],Pt=[`fill`],Ft=[`fill`],It=[`xmlns`],Lt=[`stroke`],Rt=[`stroke`],zt=[`stroke`],Bt=[`stroke`],Vt=[`stroke`],Ht=[`stroke`],Ut=[`xmlns`],Wt=[`stroke`],Gt=[`stroke`],Kt=[`stroke`],qt=[`stroke`],Jt=[`stroke`],Yt=[`stroke`],Xt=[`stroke`],Zt=[`stroke`],Qt=[`stroke`],$t=[`xmlns`],en=[`stroke`],tn=[`xmlns`],nn=[`stroke`],rn=[`stroke`],an=[`stroke`],on=[`stroke`],sn=[`stroke`],cn=[`stroke`],ln=[`stroke`],un=[`stroke`],dn=[`stroke`],fn=[`xmlns`],pn=[`x1`,`x2`,`stroke`],mn=[`xmlns`],hn=[`x`,`y`,`width`,`height`,`fill`],gn=[`y`,`width`,`height`,`fill`],_n=[`xmlns`],vn=[`fill`],yn=[`fill`],bn=[`fill`],xn=[`xmlns`],Sn=[`x1`,`x2`,`y1`,`y2`,`stroke`],Cn=[`stroke`],wn=[`fill`],Tn=[`xmlns`],En=[`fill`],Dn=[`fill`],On=[`x1`,`y1`,`x2`,`y2`,`stroke-width`,`stroke`],kn=[`xmlns`],An={key:0},jn=[`stroke`,`stroke-width`],Mn=[`stroke`,`stroke-width`],Nn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Pn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Fn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],In=[`x`,`y`,`height`,`width`,`fill`],Ln=[`xmlns`,`viewBox`],Rn=[`x`,`y`,`stroke`,`fill`],zn=[`xmlns`],Bn=[`d`,`stroke`],Vn=[`cx`,`cy`,`r`,`fill`,`stroke`],Hn=[`cx`,`cy`,`r`,`fill`,`stroke`],Un=[`x`,`y`,`width`,`fill`],Wn=[`cx`,`cy`,`fill`],Gn=[`cx`,`cy`,`fill`],Kn=[`stroke`],qn=[`xmlns`],Jn=[`stroke`,`stroke-width`],Yn=[`stroke`,`stroke-width`],Xn=[`stroke`,`stroke-width`],Zn=[`fill`],Qn=[`fill`],$n=[`fill`],er=[`fill`],tr=[`fill`],nr=[`fill`],rr=[`xmlns`],ir={key:0},ar=[`stroke`,`stroke-width`],or=[`stroke`,`stroke-width`],sr=[`stroke`,`stroke-width`],cr={key:1},lr=[`r`,`fill`],ur=[`r`,`fill`],dr=[`xmlns`],fr={key:0},pr=[`stroke`,`stroke-width`],mr=[`stroke`,`stroke-width`],hr=[`fill`,`rx`,`x`,`y`,`width`,`height`],gr=[`xmlns`],_r=[`stroke-width`,`stroke`],vr=[`stroke-width`,`stroke`],yr=[`stroke-width`,`stroke`],br=[`xmlns`],xr=[`stroke`],Sr=[`stroke`],Cr=[`stroke`],wr=[`stroke`],Tr=[`fill`],Er=[`stroke`],Dr=[`xmlns`],Or=[`stroke`,`stroke-width`],kr=[`stroke`,`stroke-width`],Ar=[`fill`,`r`],jr=[`fill`,`r`],Mr=[`fill`,`r`],Nr=[`fill`,`r`],Pr=[`fill`,`r`],Fr=[`fill`,`r`],Ir=[`fill`,`r`],Lr=[`fill`,`r`],Rr=[`fill`,`r`],zr=[`xmlns`],Br=[`d`,`stroke`,`stroke-width`],Vr=[`d`,`stroke`,`stroke-width`],Hr=[`d`,`stroke`,`stroke-width`],Ur=[`d`,`stroke`,`stroke-width`],Wr=[`stroke`,`stroke-width`],Gr=[`stroke`,`stroke-width`],Kr=[`stroke`,`stroke-width`],qr=[`fill`],Jr=[`fill`],Yr=[`xmlns`],Xr=[`x`,`y`,`fill`],Zr=[`x`,`y`,`fill`],Qr=[`x`,`y`,`fill`],$r=[`xmlns`],ei=[`fill`],ti=[`fill`],ni=[`y1`,`y2`,`stroke`,`stroke-width`],ri=[`x1`,`x2`,`stroke`,`stroke-width`],ii=[`xmlns`,`stroke`],ai=[`fill`],oi=[`xmlns`,`stroke`],si=[`xmlns`,`stroke`],ci=[`fill`],li=[`xmlns`,`stroke`],ui=[`xmlns`,`stroke`],di=[`fill`],fi=[`xmlns`,`stroke`],pi=[`xmlns`,`stroke`],mi=[`fill`],hi=[`xmlns`,`stroke`],W=[`xmlns`,`stroke`],gi=[`fill`],_i=[`xmlns`,`stroke`],vi=[`xmlns`],yi=[`points`,`fill`,`stroke`,`stroke-width`],bi=[`xmlns`],xi={key:0},Si=[`stroke`,`stroke-width`],Ci=[`y`,`width`,`fill`,`rx`],G=/*#__PURE__*/ o({__name:`vue-ui-skeleton`,props:{config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_skeleton:o}=t(),b=e,G=_(`vue-ui-skeleton-${ee()}`),K=l(()=>re({userConfig:b.config,defaultConfig:o})),q=l(()=>K.value.style);te({config:()=>K.value,dataset:()=>[],component:`VueUiSkeleton`,rules:[ne.noHint]});let wi=l(()=>K.value.style.animated),J=l(()=>K.value.type),Ti=_([60,50,55,36,40,25,26,12]),Ei=l(()=>i({plot:{x:50,y:50},radius:40,sides:6}).path),Di=l(()=>i({plot:{x:50,y:50},radius:30,sides:6}).path),Oi=l(()=>i({plot:{x:50,y:50},radius:20,sides:6}).path),ki=l(()=>i({plot:{x:50,y:50},radius:10,sides:6}).path),Y=_([{root:{x:70,y:77,r:44,opacity:100},bars:[{x:200,y:37,opacity:100,width:240},{x:200,y:118,opacity:100,width:180},{x:200,y:253,opacity:100,width:80}]},{root:{x:70,y:177,r:32,opacity:70},bars:[{x:200,y:145,opacity:70,width:160},{x:200,y:172,opacity:70,width:140},{x:200,y:199,opacity:70,width:120}]},{root:{x:70,y:257,r:24,opacity:40},bars:[{x:200,y:64,opacity:40,width:220},{x:200,y:91,opacity:40,width:200},{x:200,y:226,opacity:40,width:100}]}]),X=_([{y:200,height:100,bar:50},{y:180,height:100,bar:40},{y:150,height:100,bar:30},{y:120,height:80,bar:50},{y:110,height:60,bar:30},{y:80,height:80,bar:10},{y:50,height:80,bar:40},{y:24,height:40,bar:24},{y:44,height:20,bar:13},{y:32,height:45,bar:19}]),Z=_([[3,2.5],[4,3.1],[8,6],[9.5,6.5],[12,11],[16,15],[18,18.2],[25,24],[24,26],[32,32],[33,32],[32,31],[38,37],[37,38],[42,41],[40,41],[44,45],[38,35],[31,32]]),Q=_([{x:40,y:30},{x:45,y:28},{x:50,y:25},{x:55,y:20},{x:60,y:27},{x:65,y:14},{x:70,y:23},{x:75,y:16},{x:80,y:25},{x:85,y:10},{x:90,y:18},{x:95,y:7},{x:100,y:12},{x:105,y:10},{x:110,y:20},{x:115,y:7},{x:120,y:14},{x:125,y:10},{x:130,y:19},{x:135,y:3},{x:140,y:10},{x:145,y:2},{x:150,y:1}]);function $(e,t=1){let n=29.85;return{x:200+160*Math.cos(n+e*Math.PI/180)*t,y:200+160*Math.sin(n+e*Math.PI/180)*t}}let Ai=l(()=>{let e=[];for(let t=0;t<100;t+=1)e.push({x1:$(360/100*t).x,y1:$(360/100*t).y,x2:$(360/100*t,.9).x,y2:$(360/100*t,.9).y,color:K.value.style.wheel.color});return e}),ji=_([`M1.74 203.99A204 204 0 01-131.29-156.13l15.44 18.36A180 180 0 001.53 179.99Z`,`M-123.33-162.5A204 204 0 01-10.2-203.75L-9-179.78a180 180 0 00-99.82 36.4Z`,`M0-180A180 180 0 01175.19 41.33l23.36 5.51A204 204 0 000-204Z`,`M172.91 50.03A180 180 0 0110.53 179.69l1.4 23.96A204 204 0 00195.96 56.7Z`,`M-166.87-67.49a180 180 0 0151.02-70.28Q0 0 119.83-134.32a180 180 0 0152.13 81.13Q0 0-166.87-67.49Z`,`M-29.99-177.48a180 180 0 0110.73-1.49Q0 0 112.89 140.2A180 180 0 0153.63 171.83Q0 0-29.99-177.48Z`,`M179.71 10.29a180 180 0 01-4.52 31.04Q0 0-40.87-175.3a180 180 0 0110.88-2.18Q0 0 179.71 10.29Z`,`M-19.26-178.97Q0 0-166.87-67.49a180 180 0 00-12.14 86.36Q0 0-9-179.78a180 180 0 00-10.26.81Z`,`M-108.82-143.38Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Z`,`M0-180a180 180 0 01119.83 45.68Q0 0 0-180a180 180 0 01119.83 45.68Q0 0 0-180Z`,`M-148.85 101.22Q0 0-179.01 18.87a180 180 0 0030.16 82.35Q0 0-179.01 18.87a180 180 0 0030.16 82.35Z`,`M1.53 179.99Q0 0 31.73 177.18a180 180 0 0021.9-5.35Q0 0-148.85 101.22A180 180 0 001.53 179.99Z`,`M31.73 177.18a180 180 0 01-21.2 2.51Q0 0 171.96-53.19a180 180 0 017.75 63.48Q0 0 31.73 177.18Z`,`M172.91 50.03Q0 0 112.89 140.2a180 180 0 0060.02-90.17Q0 0 112.89 140.2a180 180 0 0060.02-90.17Z`]);return(e,t)=>(g(),d(`div`,{id:G.value,class:ae({"vue-data-ui-component":!0,"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":wi.value}),style:h(`background:${q.value.backgroundColor};color:${q.value.color};display:flex;align-items:center;justify-content:center;`)},[J.value===`chord`?(g(),d(`svg`,{key:0,xmlns:y(a),width:`100%`,viewBox:`0 0 600 600`,style:h({background:q.value.backgroundColor})},[m(s),f(`g`,ce,[(g(!0),d(c,null,v(ji.value,(e,t)=>(g(),d(`path`,{key:e,d:e,fill:q.value.chord.color,stroke:q.value.backgroundColor,"stroke-width":`2`,style:h({opacity:t>3?.6:1})},null,12,le))),128))])],12,se)):u(``,!0),J.value===`ridgeline`?(g(),d(`svg`,{key:1,xmlns:y(a),width:`100%`,viewBox:`20 0 512 200`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`defs`,null,[m(ie,{t:`linear`,id:`ridgeline-gradient-${G.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,q.value.ridgeline.color,1],[`30%`,q.value.ridgeline.color,.7],[`70%`,q.value.ridgeline.color,.3],[`100%`,q.value.ridgeline.color,.1]]},null,8,[`id`,`stops`])]),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 60c6.18-.6 12.36-1.11 18.55-1.79 6.18-.68 12.37-2.38 18.55-2.4 6.19-.01 12.37 0 18.56-.01 6.18-.02 12.37-5.3 18.55-5.3 6.19 0 12.37 4.95 18.56 4.95 6.18 0 12.37-2.78 18.55-2.78 6.19 0 12.37 1.02 18.56 1.92 6.18.9 12.37 4.58 18.55 4.58s12.37-6.71 18.55-6.71c6.19 0 12.37.89 18.56.89 6.18 0 12.37-4.48 18.55-4.48 6.19 0 12.37 4.79 18.56 4.79 6.18 0 12.37-26.07 18.55-26.07 6.19 0 12.37 9.31 18.56 13.85 6.18 4.54 12.37 13.39 18.55 13.39 6.19 0 12.37-36.14 18.56-36.14 6.18 0 12.36 38.45 18.55 38.45 6.18 0 12.37-11.46 18.55-16.94 6.19-5.48 12.37-15.97 18.56-15.97 6.18 0 12.37 16.4 18.55 16.4 6.19 0 12.37-.12 18.56-.35 6.18-.22 12.37-38.08 18.55-38.08 6.19 0 12.37 24.07 18.56 36.1V60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,x),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 90c6.18-.22 12.36-.35 18.55-.67 6.18-.32 12.37-1.65 18.55-1.65 6.19 0 12.37 1.66 18.56 1.66 6.18 0 12.37-8.76 18.55-8.76 6.19 0 12.37 4.15 18.56 4.15 6.18 0 12.37-8.44 18.55-8.44 6.19 0 12.37 10.87 18.56 10.87 6.18 0 12.37-9.21 18.55-12.16 6.18-2.96 12.37-6.97 18.55-6.97 6.19 0 12.37 9.59 18.56 12.77 6.18 3.18 12.37 7.6 18.55 7.6 6.19 0 12.37-24.44 18.56-24.44 6.18 0 12.37 16.97 18.55 16.97 6.19 0 12.37-20.62 18.56-20.62 6.18 0 12.37 20.37 18.55 20.37 6.19 0 12.37-13.13 18.56-13.13 6.18 0 12.36 13.51 18.55 13.51 6.18 0 12.37-26.41 18.55-26.41 6.19 0 12.37.49 18.56 1.26 6.18.78 12.37 13.82 18.55 13.82 6.19 0 12.37-5.3 18.56-8.3 6.18-3 12.37-9.81 18.55-9.81 6.19 0 12.37 19.82 18.56 29.72V90`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,S),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 120c6.18-.34 12.36-.55 18.55-1.01 6.18-.46 12.37-1.17 18.55-2.15 6.19-.99 12.37-3.7 18.56-4.69 6.18-.98 12.37-2.15 18.55-2.15 6.19 0 12.37.52 18.56 1.2 6.18.68 12.37 6.67 18.55 6.67 6.19 0 12.37-12.15 18.56-12.15 6.18 0 12.37 4.6 18.55 4.6S227.5 99.7 233.68 98.99c6.19-.71 12.37-1.18 18.56-1.18 6.18 0 12.37 17.75 18.55 18.22 6.19.48 12.37.74 18.56.74 6.18 0 12.37-17.09 18.55-17.09 6.19 0 12.37 12.68 18.56 12.68 6.18 0 12.37-.33 18.55-.67 6.19-.34 12.37-.79 18.56-2.06 6.18-1.26 12.36-25.45 18.55-25.45 6.18 0 12.37 10.35 18.55 10.35 6.19 0 12.37-21.07 18.56-21.07 6.18 0 12.37 33.27 18.55 33.27 6.19 0 12.37-26.97 18.56-26.97 6.18 0 12.37 26.97 18.55 27.36 6.19.4 12.37.41 18.56.61V120`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,C),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 150c6.18-.52 12.36-1.57 18.55-1.57 6.18 0 12.37 1.36 18.55 1.36 6.19 0 12.37-1.75 18.56-3.18 6.18-1.43 12.37-6.62 18.55-6.62 6.19 0 12.37 9.98 18.56 9.98 6.18 0 12.37-4.94 18.55-5.64 6.19-.71 12.37-.52 18.56-1.31 6.18-.78 12.37-12.43 18.55-12.43s12.37 18.52 18.55 18.52c6.19 0 12.37-2.49 18.56-2.49 6.18 0 12.37 3.02 18.55 3.02 6.19 0 12.37-29.39 18.56-29.39 6.18 0 12.37 5.56 18.55 8.36 6.19 2.81 12.37 5.14 18.56 8.47 6.18 3.34 12.37 12.25 18.55 12.25 6.19 0 12.37-4.3 18.56-8.78 6.18-4.48 12.36-28.77 18.55-28.77 6.18 0 12.37 1.29 18.55 3.02 6.19 1.72 12.37 18.36 18.56 18.36 6.18 0 12.37-7.68 18.55-12.92 6.19-5.24 12.37-18.51 18.56-20.1 6.18-1.58 12.37-2.7 18.55-2.7 6.19 0 12.37 34.69 18.56 52.04V150`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,w),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 180c6.18-.6 12.36-1.07 18.55-1.81 6.18-.74 12.37-2.86 18.55-2.86 6.19 0 12.37 2.14 18.56 2.14 6.18 0 12.37-7.08 18.55-7.08 6.19 0 12.37 1.08 18.56 2.03 6.18.95 12.37 4.75 18.55 4.75 6.19 0 12.37-2.45 18.56-4.62 6.18-2.17 12.37-10.99 18.55-10.99s12.37 9.58 18.55 9.58c6.19 0 12.37-.25 18.56-.69 6.18-.43 12.37-13.6 18.55-13.6 6.19 0 12.37 17.23 18.56 17.23 6.18 0 12.37-2.5 18.55-5.19 6.19-2.68 12.37-15.45 18.56-18 6.18-2.55 12.37-4.86 18.55-4.86 6.19 0 12.37 18.61 18.56 18.61 6.18 0 12.36-24.22 18.55-26.66 6.18-2.45 12.37-4.25 18.55-4.25 6.19 0 12.37 7.92 18.56 7.92 6.18 0 12.37-1.95 18.55-1.95 6.19 0 12.37 29.69 18.56 29.69 6.18 0 12.37-2.55 18.55-6.14 6.19-3.58 12.37-28.83 18.56-43.25v60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,T)],12,ue)):u(``,!0),J.value===`historyPlot`?(g(),d(`svg`,{key:2,xmlns:y(a),width:`100%`,viewBox:`0 0 612 512`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`12`,x2:`12`,y1:`12`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,D),f(`line`,{x1:`12`,x2:`600`,y1:`500`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,O),f(`path`,{d:`M 80,100 300,200 400,150 560,230 360,420 230,320`,fill:`none`,stroke:q.value.historyPlot.color,"stroke-width":`3`},null,8,k),f(`circle`,{cx:`80`,cy:`100`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,A),f(`text`,{x:`80`,y:`108`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 1 `,8,j),f(`circle`,{cx:`300`,cy:`200`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,M),f(`text`,{x:`300`,y:`208`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 2 `,8,N),f(`circle`,{cx:`400`,cy:`150`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,P),f(`text`,{x:`400`,y:`158`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 3 `,8,F),f(`circle`,{cx:`560`,cy:`230`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,I),f(`text`,{x:`560`,y:`238`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 4 `,8,L),f(`circle`,{cx:`360`,cy:`420`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,R),f(`text`,{x:`360`,y:`428`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 5 `,8,z),f(`circle`,{cx:`230`,cy:`320`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,B),f(`text`,{x:`230`,y:`328`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 6 `,8,V)],12,E)):u(``,!0),J.value===`circlePack`?(g(),d(`svg`,{key:3,xmlns:y(a),width:`100%`,viewBox:`0 0 100 100`,style:h(`background:${q.value.backgroundColor}`)},[f(`circle`,{cx:50,cy:50,r:20,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,U),f(`circle`,{cx:80,cy:50,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,de),f(`circle`,{cx:28,cy:30,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,fe),f(`circle`,{cx:25,cy:76,r:16,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,pe),f(`circle`,{cx:60,cy:78.5,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,me),f(`circle`,{cx:64,cy:20,r:13,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,he),f(`circle`,{cx:72,cy:37,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ge),f(`circle`,{cx:25,cy:45,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,_e),f(`circle`,{cx:70,cy:66,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ve)],12,H)):u(``,!0),J.value===`flow`?(g(),d(`svg`,{key:4,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 8l23 4L52 9 75 8v4H52L28 21 5 29ZM5 34l23 1L52 24l23-3v6L52 30 28 44l24-5 23 2v6L52 45 28 52H5Z`,stroke:q.value.flow.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.flow.color},null,8,be)],12,ye)):u(``,!0),J.value===`parallelCoordinatePlot`?(g(),d(`svg`,{key:5,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 10a1 1 0 000 2 1 1 0 000-2m23 5a1 1 0 000 2 1 1 0 000-2M52 8a1 1 0 000 2 1 1 0 000-2m23 3a1 1 0 000 2 1 1 0 000-2M6 11l21 5m2 0L51 9m2 0 21 3M5 50a1 1 0 000-2 1 1 0 000 2M28 39a1 1 0 000 2 1 1 0 000-2m24 6a1 1 0 000 2 1 1 0 000-2m23 0a1 1 0 000 2 1 1 0 000-2M6 49l21-9m2 0 22 6m2 0H74M5 25a1 1 0 000 2 1 1 0 000-2m23 6a1 1 0 000 2 1 1 0 000-2m24-8a1 1 0 000 2 1 1 0 000-2m23-2a1 1 0 000 2 1 1 0 000-2M6 26l21 6m2 0 22-8m2 0 21-2`,stroke:q.value.parallelCoordinatePlot.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.parallelCoordinatePlot.color},null,8,Se)],12,xe)):u(``,!0),J.value===`bullet`?(g(),d(`svg`,{key:6,xmlns:y(a),width:`100%`,viewBox:`0 0 600 96`,style:h(`background:${q.value.backgroundColor}`)},[f(`rect`,{fill:q.value.bullet.color,x:24,y:12,width:300,height:72,style:{opacity:`0.8`}},null,8,we),f(`rect`,{fill:q.value.bullet.color,x:324,y:12,width:150,height:72,style:{opacity:`0.6`}},null,8,Te),f(`rect`,{fill:q.value.bullet.color,x:474,y:12,width:102,height:72,style:{opacity:`0.3`}},null,8,Ee),f(`rect`,{fill:q.value.bullet.color,x:24,y:36,width:490,height:24,style:{opacity:`1`}},null,8,De)],12,Ce)):u(``,!0),J.value===`dumbbell`?(g(),d(`svg`,{key:7,xmlns:y(a),width:`100%`,viewBox:`0 0 100 55`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`3`,x2:`3`,y1:`3`,y2:`67`,stroke:q.value.dumbbell.color,"stroke-width":.5,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,ke),f(`path`,{d:`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{B as n,Jt as r,M as i,X as ee,t as a}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as re}from"./useNestedProp-DnGoh-XS.js";import{t as ie}from"./DefGrad-DKMq1REY.js";import{n as s}from"./PackageVersion-D6_O7PmZ.js";import{Fragment as c,computed as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createStaticVNode as p,createVNode as m,normalizeClass as ae,normalizeStyle as h,openBlock as g,ref as _,renderList as v,unref as y}from"vue";var b=/* @__PURE__ */ e({default:()=>G}),oe=[`id`],se=[`xmlns`],ce={transform:`translate(300, 300)`},le=[`d`,`fill`,`stroke`],ue=[`xmlns`],x=[`fill`,`stroke`],S=[`fill`,`stroke`],C=[`fill`,`stroke`],w=[`fill`,`stroke`],T=[`fill`,`stroke`],E=[`xmlns`],D=[`stroke`],O=[`stroke`],k=[`stroke`],A=[`fill`,`stroke`],j=[`fill`],M=[`fill`,`stroke`],N=[`fill`],P=[`fill`,`stroke`],F=[`fill`],I=[`fill`,`stroke`],L=[`fill`],R=[`fill`,`stroke`],z=[`fill`],B=[`fill`,`stroke`],V=[`fill`],H=[`xmlns`],U=[`stroke`],de=[`stroke`],fe=[`stroke`],pe=[`stroke`],me=[`stroke`],he=[`stroke`],ge=[`stroke`],_e=[`stroke`],ve=[`stroke`],ye=[`xmlns`],be=[`stroke`,`fill`],xe=[`xmlns`],Se=[`stroke`,`fill`],Ce=[`xmlns`],we=[`fill`],Te=[`fill`],Ee=[`fill`],De=[`fill`],Oe=[`xmlns`],ke=[`stroke`],Ae=[`fill`],je=[`stroke`,`fill`],Me=[`stroke`,`fill`],Ne=[`fill`],Pe=[`stroke`,`fill`],Fe=[`stroke`,`fill`],Ie=[`fill`],Le=[`stroke`,`fill`],Re=[`stroke`,`fill`],ze=[`fill`],Be=[`stroke`,`fill`],Ve=[`stroke`,`fill`],He=[`fill`],Ue=[`stroke`,`fill`],We=[`stroke`,`fill`],Ge=[`xmlns`],Ke=[`stroke`],qe=[`stroke`],Je=[`stroke`,`fill`],Ye=[`stroke`,`fill`],Xe=[`stroke`,`fill`],Ze=[`stroke`,`fill`],Qe=[`stroke`,`fill`],$e=[`stroke`,`fill`],et=[`stroke`,`fill`],tt=[`stroke`,`fill`],nt=[`stroke`,`fill`],rt=[`stroke`,`fill`],it=[`stroke`,`fill`],at=[`stroke`,`fill`],ot=[`stroke`,`fill`],st=[`stroke`,`fill`],ct=[`stroke`,`fill`],lt=[`stroke`,`fill`],ut=[`stroke`,`fill`],dt=[`stroke`,`fill`],ft=[`stroke`,`fill`],pt=[`stroke`,`fill`],mt=[`stroke`,`fill`],ht=[`stroke`,`fill`],gt=[`stroke`,`fill`],_t=[`xmlns`],vt=[`stroke`],yt=[`xmlns`],bt=[`stroke`],xt=[`xmlns`],St=[`stroke`],Ct=[`xmlns`],wt=[`fill`],Tt=[`fill`],Et=[`fill`],Dt=[`fill`],Ot=[`fill`],kt=[`fill`],At=[`fill`],jt=[`fill`],Mt=[`fill`],Nt=[`fill`],Pt=[`fill`],Ft=[`fill`],It=[`xmlns`],Lt=[`stroke`],Rt=[`stroke`],zt=[`stroke`],Bt=[`stroke`],Vt=[`stroke`],Ht=[`stroke`],Ut=[`xmlns`],Wt=[`stroke`],Gt=[`stroke`],Kt=[`stroke`],qt=[`stroke`],Jt=[`stroke`],Yt=[`stroke`],Xt=[`stroke`],Zt=[`stroke`],Qt=[`stroke`],$t=[`xmlns`],en=[`stroke`],tn=[`xmlns`],nn=[`stroke`],rn=[`stroke`],an=[`stroke`],on=[`stroke`],sn=[`stroke`],cn=[`stroke`],ln=[`stroke`],un=[`stroke`],dn=[`stroke`],fn=[`xmlns`],pn=[`x1`,`x2`,`stroke`],mn=[`xmlns`],hn=[`x`,`y`,`width`,`height`,`fill`],gn=[`y`,`width`,`height`,`fill`],_n=[`xmlns`],vn=[`fill`],yn=[`fill`],bn=[`fill`],xn=[`xmlns`],Sn=[`x1`,`x2`,`y1`,`y2`,`stroke`],Cn=[`stroke`],wn=[`fill`],Tn=[`xmlns`],En=[`fill`],Dn=[`fill`],On=[`x1`,`y1`,`x2`,`y2`,`stroke-width`,`stroke`],kn=[`xmlns`],An={key:0},jn=[`stroke`,`stroke-width`],Mn=[`stroke`,`stroke-width`],Nn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Pn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Fn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],In=[`x`,`y`,`height`,`width`,`fill`],Ln=[`xmlns`,`viewBox`],Rn=[`x`,`y`,`stroke`,`fill`],zn=[`xmlns`],Bn=[`d`,`stroke`],Vn=[`cx`,`cy`,`r`,`fill`,`stroke`],Hn=[`cx`,`cy`,`r`,`fill`,`stroke`],Un=[`x`,`y`,`width`,`fill`],Wn=[`cx`,`cy`,`fill`],Gn=[`cx`,`cy`,`fill`],Kn=[`stroke`],qn=[`xmlns`],Jn=[`stroke`,`stroke-width`],Yn=[`stroke`,`stroke-width`],Xn=[`stroke`,`stroke-width`],Zn=[`fill`],Qn=[`fill`],$n=[`fill`],er=[`fill`],tr=[`fill`],nr=[`fill`],rr=[`xmlns`],ir={key:0},ar=[`stroke`,`stroke-width`],or=[`stroke`,`stroke-width`],sr=[`stroke`,`stroke-width`],cr={key:1},lr=[`r`,`fill`],ur=[`r`,`fill`],dr=[`xmlns`],fr={key:0},pr=[`stroke`,`stroke-width`],mr=[`stroke`,`stroke-width`],hr=[`fill`,`rx`,`x`,`y`,`width`,`height`],gr=[`xmlns`],_r=[`stroke-width`,`stroke`],vr=[`stroke-width`,`stroke`],yr=[`stroke-width`,`stroke`],br=[`xmlns`],xr=[`stroke`],Sr=[`stroke`],Cr=[`stroke`],wr=[`stroke`],Tr=[`fill`],Er=[`stroke`],Dr=[`xmlns`],Or=[`stroke`,`stroke-width`],kr=[`stroke`,`stroke-width`],Ar=[`fill`,`r`],jr=[`fill`,`r`],Mr=[`fill`,`r`],Nr=[`fill`,`r`],Pr=[`fill`,`r`],Fr=[`fill`,`r`],Ir=[`fill`,`r`],Lr=[`fill`,`r`],Rr=[`fill`,`r`],zr=[`xmlns`],Br=[`d`,`stroke`,`stroke-width`],Vr=[`d`,`stroke`,`stroke-width`],Hr=[`d`,`stroke`,`stroke-width`],Ur=[`d`,`stroke`,`stroke-width`],Wr=[`stroke`,`stroke-width`],Gr=[`stroke`,`stroke-width`],Kr=[`stroke`,`stroke-width`],qr=[`fill`],Jr=[`fill`],Yr=[`xmlns`],Xr=[`x`,`y`,`fill`],Zr=[`x`,`y`,`fill`],Qr=[`x`,`y`,`fill`],$r=[`xmlns`],ei=[`fill`],ti=[`fill`],ni=[`y1`,`y2`,`stroke`,`stroke-width`],ri=[`x1`,`x2`,`stroke`,`stroke-width`],ii=[`xmlns`,`stroke`],ai=[`fill`],oi=[`xmlns`,`stroke`],si=[`xmlns`,`stroke`],ci=[`fill`],li=[`xmlns`,`stroke`],ui=[`xmlns`,`stroke`],di=[`fill`],fi=[`xmlns`,`stroke`],pi=[`xmlns`,`stroke`],mi=[`fill`],hi=[`xmlns`,`stroke`],W=[`xmlns`,`stroke`],gi=[`fill`],_i=[`xmlns`,`stroke`],vi=[`xmlns`],yi=[`points`,`fill`,`stroke`,`stroke-width`],bi=[`xmlns`],xi={key:0},Si=[`stroke`,`stroke-width`],Ci=[`y`,`width`,`fill`,`rx`],G=/*#__PURE__*/ o({__name:`vue-ui-skeleton`,props:{config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_skeleton:o}=t(),b=e,G=_(`vue-ui-skeleton-${ee()}`),K=l(()=>re({userConfig:b.config,defaultConfig:o})),q=l(()=>K.value.style);te({config:()=>K.value,dataset:()=>[],component:`VueUiSkeleton`,rules:[ne.noHint]});let wi=l(()=>K.value.style.animated),J=l(()=>K.value.type),Ti=_([60,50,55,36,40,25,26,12]),Ei=l(()=>i({plot:{x:50,y:50},radius:40,sides:6}).path),Di=l(()=>i({plot:{x:50,y:50},radius:30,sides:6}).path),Oi=l(()=>i({plot:{x:50,y:50},radius:20,sides:6}).path),ki=l(()=>i({plot:{x:50,y:50},radius:10,sides:6}).path),Y=_([{root:{x:70,y:77,r:44,opacity:100},bars:[{x:200,y:37,opacity:100,width:240},{x:200,y:118,opacity:100,width:180},{x:200,y:253,opacity:100,width:80}]},{root:{x:70,y:177,r:32,opacity:70},bars:[{x:200,y:145,opacity:70,width:160},{x:200,y:172,opacity:70,width:140},{x:200,y:199,opacity:70,width:120}]},{root:{x:70,y:257,r:24,opacity:40},bars:[{x:200,y:64,opacity:40,width:220},{x:200,y:91,opacity:40,width:200},{x:200,y:226,opacity:40,width:100}]}]),X=_([{y:200,height:100,bar:50},{y:180,height:100,bar:40},{y:150,height:100,bar:30},{y:120,height:80,bar:50},{y:110,height:60,bar:30},{y:80,height:80,bar:10},{y:50,height:80,bar:40},{y:24,height:40,bar:24},{y:44,height:20,bar:13},{y:32,height:45,bar:19}]),Z=_([[3,2.5],[4,3.1],[8,6],[9.5,6.5],[12,11],[16,15],[18,18.2],[25,24],[24,26],[32,32],[33,32],[32,31],[38,37],[37,38],[42,41],[40,41],[44,45],[38,35],[31,32]]),Q=_([{x:40,y:30},{x:45,y:28},{x:50,y:25},{x:55,y:20},{x:60,y:27},{x:65,y:14},{x:70,y:23},{x:75,y:16},{x:80,y:25},{x:85,y:10},{x:90,y:18},{x:95,y:7},{x:100,y:12},{x:105,y:10},{x:110,y:20},{x:115,y:7},{x:120,y:14},{x:125,y:10},{x:130,y:19},{x:135,y:3},{x:140,y:10},{x:145,y:2},{x:150,y:1}]);function $(e,t=1){let n=29.85;return{x:200+160*Math.cos(n+e*Math.PI/180)*t,y:200+160*Math.sin(n+e*Math.PI/180)*t}}let Ai=l(()=>{let e=[];for(let t=0;t<100;t+=1)e.push({x1:$(360/100*t).x,y1:$(360/100*t).y,x2:$(360/100*t,.9).x,y2:$(360/100*t,.9).y,color:K.value.style.wheel.color});return e}),ji=_([`M1.74 203.99A204 204 0 01-131.29-156.13l15.44 18.36A180 180 0 001.53 179.99Z`,`M-123.33-162.5A204 204 0 01-10.2-203.75L-9-179.78a180 180 0 00-99.82 36.4Z`,`M0-180A180 180 0 01175.19 41.33l23.36 5.51A204 204 0 000-204Z`,`M172.91 50.03A180 180 0 0110.53 179.69l1.4 23.96A204 204 0 00195.96 56.7Z`,`M-166.87-67.49a180 180 0 0151.02-70.28Q0 0 119.83-134.32a180 180 0 0152.13 81.13Q0 0-166.87-67.49Z`,`M-29.99-177.48a180 180 0 0110.73-1.49Q0 0 112.89 140.2A180 180 0 0153.63 171.83Q0 0-29.99-177.48Z`,`M179.71 10.29a180 180 0 01-4.52 31.04Q0 0-40.87-175.3a180 180 0 0110.88-2.18Q0 0 179.71 10.29Z`,`M-19.26-178.97Q0 0-166.87-67.49a180 180 0 00-12.14 86.36Q0 0-9-179.78a180 180 0 00-10.26.81Z`,`M-108.82-143.38Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Z`,`M0-180a180 180 0 01119.83 45.68Q0 0 0-180a180 180 0 01119.83 45.68Q0 0 0-180Z`,`M-148.85 101.22Q0 0-179.01 18.87a180 180 0 0030.16 82.35Q0 0-179.01 18.87a180 180 0 0030.16 82.35Z`,`M1.53 179.99Q0 0 31.73 177.18a180 180 0 0021.9-5.35Q0 0-148.85 101.22A180 180 0 001.53 179.99Z`,`M31.73 177.18a180 180 0 01-21.2 2.51Q0 0 171.96-53.19a180 180 0 017.75 63.48Q0 0 31.73 177.18Z`,`M172.91 50.03Q0 0 112.89 140.2a180 180 0 0060.02-90.17Q0 0 112.89 140.2a180 180 0 0060.02-90.17Z`]);return(e,t)=>(g(),d(`div`,{id:G.value,class:ae({"vue-data-ui-component":!0,"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":wi.value}),style:h(`background:${q.value.backgroundColor};color:${q.value.color};display:flex;align-items:center;justify-content:center;`)},[J.value===`chord`?(g(),d(`svg`,{key:0,xmlns:y(a),width:`100%`,viewBox:`0 0 600 600`,style:h({background:q.value.backgroundColor})},[m(s),f(`g`,ce,[(g(!0),d(c,null,v(ji.value,(e,t)=>(g(),d(`path`,{key:e,d:e,fill:q.value.chord.color,stroke:q.value.backgroundColor,"stroke-width":`2`,style:h({opacity:t>3?.6:1})},null,12,le))),128))])],12,se)):u(``,!0),J.value===`ridgeline`?(g(),d(`svg`,{key:1,xmlns:y(a),width:`100%`,viewBox:`20 0 512 200`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`defs`,null,[m(ie,{t:`linear`,id:`ridgeline-gradient-${G.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,q.value.ridgeline.color,1],[`30%`,q.value.ridgeline.color,.7],[`70%`,q.value.ridgeline.color,.3],[`100%`,q.value.ridgeline.color,.1]]},null,8,[`id`,`stops`])]),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 60c6.18-.6 12.36-1.11 18.55-1.79 6.18-.68 12.37-2.38 18.55-2.4 6.19-.01 12.37 0 18.56-.01 6.18-.02 12.37-5.3 18.55-5.3 6.19 0 12.37 4.95 18.56 4.95 6.18 0 12.37-2.78 18.55-2.78 6.19 0 12.37 1.02 18.56 1.92 6.18.9 12.37 4.58 18.55 4.58s12.37-6.71 18.55-6.71c6.19 0 12.37.89 18.56.89 6.18 0 12.37-4.48 18.55-4.48 6.19 0 12.37 4.79 18.56 4.79 6.18 0 12.37-26.07 18.55-26.07 6.19 0 12.37 9.31 18.56 13.85 6.18 4.54 12.37 13.39 18.55 13.39 6.19 0 12.37-36.14 18.56-36.14 6.18 0 12.36 38.45 18.55 38.45 6.18 0 12.37-11.46 18.55-16.94 6.19-5.48 12.37-15.97 18.56-15.97 6.18 0 12.37 16.4 18.55 16.4 6.19 0 12.37-.12 18.56-.35 6.18-.22 12.37-38.08 18.55-38.08 6.19 0 12.37 24.07 18.56 36.1V60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,x),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 90c6.18-.22 12.36-.35 18.55-.67 6.18-.32 12.37-1.65 18.55-1.65 6.19 0 12.37 1.66 18.56 1.66 6.18 0 12.37-8.76 18.55-8.76 6.19 0 12.37 4.15 18.56 4.15 6.18 0 12.37-8.44 18.55-8.44 6.19 0 12.37 10.87 18.56 10.87 6.18 0 12.37-9.21 18.55-12.16 6.18-2.96 12.37-6.97 18.55-6.97 6.19 0 12.37 9.59 18.56 12.77 6.18 3.18 12.37 7.6 18.55 7.6 6.19 0 12.37-24.44 18.56-24.44 6.18 0 12.37 16.97 18.55 16.97 6.19 0 12.37-20.62 18.56-20.62 6.18 0 12.37 20.37 18.55 20.37 6.19 0 12.37-13.13 18.56-13.13 6.18 0 12.36 13.51 18.55 13.51 6.18 0 12.37-26.41 18.55-26.41 6.19 0 12.37.49 18.56 1.26 6.18.78 12.37 13.82 18.55 13.82 6.19 0 12.37-5.3 18.56-8.3 6.18-3 12.37-9.81 18.55-9.81 6.19 0 12.37 19.82 18.56 29.72V90`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,S),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 120c6.18-.34 12.36-.55 18.55-1.01 6.18-.46 12.37-1.17 18.55-2.15 6.19-.99 12.37-3.7 18.56-4.69 6.18-.98 12.37-2.15 18.55-2.15 6.19 0 12.37.52 18.56 1.2 6.18.68 12.37 6.67 18.55 6.67 6.19 0 12.37-12.15 18.56-12.15 6.18 0 12.37 4.6 18.55 4.6S227.5 99.7 233.68 98.99c6.19-.71 12.37-1.18 18.56-1.18 6.18 0 12.37 17.75 18.55 18.22 6.19.48 12.37.74 18.56.74 6.18 0 12.37-17.09 18.55-17.09 6.19 0 12.37 12.68 18.56 12.68 6.18 0 12.37-.33 18.55-.67 6.19-.34 12.37-.79 18.56-2.06 6.18-1.26 12.36-25.45 18.55-25.45 6.18 0 12.37 10.35 18.55 10.35 6.19 0 12.37-21.07 18.56-21.07 6.18 0 12.37 33.27 18.55 33.27 6.19 0 12.37-26.97 18.56-26.97 6.18 0 12.37 26.97 18.55 27.36 6.19.4 12.37.41 18.56.61V120`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,C),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 150c6.18-.52 12.36-1.57 18.55-1.57 6.18 0 12.37 1.36 18.55 1.36 6.19 0 12.37-1.75 18.56-3.18 6.18-1.43 12.37-6.62 18.55-6.62 6.19 0 12.37 9.98 18.56 9.98 6.18 0 12.37-4.94 18.55-5.64 6.19-.71 12.37-.52 18.56-1.31 6.18-.78 12.37-12.43 18.55-12.43s12.37 18.52 18.55 18.52c6.19 0 12.37-2.49 18.56-2.49 6.18 0 12.37 3.02 18.55 3.02 6.19 0 12.37-29.39 18.56-29.39 6.18 0 12.37 5.56 18.55 8.36 6.19 2.81 12.37 5.14 18.56 8.47 6.18 3.34 12.37 12.25 18.55 12.25 6.19 0 12.37-4.3 18.56-8.78 6.18-4.48 12.36-28.77 18.55-28.77 6.18 0 12.37 1.29 18.55 3.02 6.19 1.72 12.37 18.36 18.56 18.36 6.18 0 12.37-7.68 18.55-12.92 6.19-5.24 12.37-18.51 18.56-20.1 6.18-1.58 12.37-2.7 18.55-2.7 6.19 0 12.37 34.69 18.56 52.04V150`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,w),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 180c6.18-.6 12.36-1.07 18.55-1.81 6.18-.74 12.37-2.86 18.55-2.86 6.19 0 12.37 2.14 18.56 2.14 6.18 0 12.37-7.08 18.55-7.08 6.19 0 12.37 1.08 18.56 2.03 6.18.95 12.37 4.75 18.55 4.75 6.19 0 12.37-2.45 18.56-4.62 6.18-2.17 12.37-10.99 18.55-10.99s12.37 9.58 18.55 9.58c6.19 0 12.37-.25 18.56-.69 6.18-.43 12.37-13.6 18.55-13.6 6.19 0 12.37 17.23 18.56 17.23 6.18 0 12.37-2.5 18.55-5.19 6.19-2.68 12.37-15.45 18.56-18 6.18-2.55 12.37-4.86 18.55-4.86 6.19 0 12.37 18.61 18.56 18.61 6.18 0 12.36-24.22 18.55-26.66 6.18-2.45 12.37-4.25 18.55-4.25 6.19 0 12.37 7.92 18.56 7.92 6.18 0 12.37-1.95 18.55-1.95 6.19 0 12.37 29.69 18.56 29.69 6.18 0 12.37-2.55 18.55-6.14 6.19-3.58 12.37-28.83 18.56-43.25v60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,T)],12,ue)):u(``,!0),J.value===`historyPlot`?(g(),d(`svg`,{key:2,xmlns:y(a),width:`100%`,viewBox:`0 0 612 512`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`12`,x2:`12`,y1:`12`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,D),f(`line`,{x1:`12`,x2:`600`,y1:`500`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,O),f(`path`,{d:`M 80,100 300,200 400,150 560,230 360,420 230,320`,fill:`none`,stroke:q.value.historyPlot.color,"stroke-width":`3`},null,8,k),f(`circle`,{cx:`80`,cy:`100`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,A),f(`text`,{x:`80`,y:`108`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 1 `,8,j),f(`circle`,{cx:`300`,cy:`200`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,M),f(`text`,{x:`300`,y:`208`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 2 `,8,N),f(`circle`,{cx:`400`,cy:`150`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,P),f(`text`,{x:`400`,y:`158`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 3 `,8,F),f(`circle`,{cx:`560`,cy:`230`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,I),f(`text`,{x:`560`,y:`238`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 4 `,8,L),f(`circle`,{cx:`360`,cy:`420`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,R),f(`text`,{x:`360`,y:`428`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 5 `,8,z),f(`circle`,{cx:`230`,cy:`320`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,B),f(`text`,{x:`230`,y:`328`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 6 `,8,V)],12,E)):u(``,!0),J.value===`circlePack`?(g(),d(`svg`,{key:3,xmlns:y(a),width:`100%`,viewBox:`0 0 100 100`,style:h(`background:${q.value.backgroundColor}`)},[f(`circle`,{cx:50,cy:50,r:20,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,U),f(`circle`,{cx:80,cy:50,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,de),f(`circle`,{cx:28,cy:30,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,fe),f(`circle`,{cx:25,cy:76,r:16,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,pe),f(`circle`,{cx:60,cy:78.5,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,me),f(`circle`,{cx:64,cy:20,r:13,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,he),f(`circle`,{cx:72,cy:37,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ge),f(`circle`,{cx:25,cy:45,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,_e),f(`circle`,{cx:70,cy:66,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ve)],12,H)):u(``,!0),J.value===`flow`?(g(),d(`svg`,{key:4,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 8l23 4L52 9 75 8v4H52L28 21 5 29ZM5 34l23 1L52 24l23-3v6L52 30 28 44l24-5 23 2v6L52 45 28 52H5Z`,stroke:q.value.flow.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.flow.color},null,8,be)],12,ye)):u(``,!0),J.value===`parallelCoordinatePlot`?(g(),d(`svg`,{key:5,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 10a1 1 0 000 2 1 1 0 000-2m23 5a1 1 0 000 2 1 1 0 000-2M52 8a1 1 0 000 2 1 1 0 000-2m23 3a1 1 0 000 2 1 1 0 000-2M6 11l21 5m2 0L51 9m2 0 21 3M5 50a1 1 0 000-2 1 1 0 000 2M28 39a1 1 0 000 2 1 1 0 000-2m24 6a1 1 0 000 2 1 1 0 000-2m23 0a1 1 0 000 2 1 1 0 000-2M6 49l21-9m2 0 22 6m2 0H74M5 25a1 1 0 000 2 1 1 0 000-2m23 6a1 1 0 000 2 1 1 0 000-2m24-8a1 1 0 000 2 1 1 0 000-2m23-2a1 1 0 000 2 1 1 0 000-2M6 26l21 6m2 0 22-8m2 0 21-2`,stroke:q.value.parallelCoordinatePlot.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.parallelCoordinatePlot.color},null,8,Se)],12,xe)):u(``,!0),J.value===`bullet`?(g(),d(`svg`,{key:6,xmlns:y(a),width:`100%`,viewBox:`0 0 600 96`,style:h(`background:${q.value.backgroundColor}`)},[f(`rect`,{fill:q.value.bullet.color,x:24,y:12,width:300,height:72,style:{opacity:`0.8`}},null,8,we),f(`rect`,{fill:q.value.bullet.color,x:324,y:12,width:150,height:72,style:{opacity:`0.6`}},null,8,Te),f(`rect`,{fill:q.value.bullet.color,x:474,y:12,width:102,height:72,style:{opacity:`0.3`}},null,8,Ee),f(`rect`,{fill:q.value.bullet.color,x:24,y:36,width:490,height:24,style:{opacity:`1`}},null,8,De)],12,Ce)):u(``,!0),J.value===`dumbbell`?(g(),d(`svg`,{key:7,xmlns:y(a),width:`100%`,viewBox:`0 0 100 55`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`3`,x2:`3`,y1:`3`,y2:`67`,stroke:q.value.dumbbell.color,"stroke-width":.5,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,ke),f(`path`,{d:`
2
2
  M 30,11
3
3
  C 39,10 39,10
4
4
  45,11