vue-data-ui 3.29.3 → 3.29.4

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 (192) hide show
  1. package/dist/{Arrow-CITPKnWF.js → Arrow-DhkzHBsL.js} +1 -1
  2. package/dist/{BaseDraggableDialog-DVstuNhT.js → BaseDraggableDialog-MyWIeEtr.js} +1 -1
  3. package/dist/{BaseIcon-CoY0vuL3.js → BaseIcon-CQFjKDhE.js} +1 -1
  4. package/dist/{BaseLegendToggle-VzX69MCo.js → BaseLegendToggle-CnQ_U5rI.js} +1 -1
  5. package/dist/{BaseZoomControls-D4i_j6vc.js → BaseZoomControls-OZwEB4vm.js} +1 -1
  6. package/dist/{ColorPicker-DmVnJGVv.js → ColorPicker-dbxPO2fg.js} +1 -1
  7. package/dist/{DataTable-KeuZB1JM.js → DataTable-BHW5xD9B.js} +1 -1
  8. package/dist/{HillActions-D--h5brJ.js → HillActions-KXWY_FyA.js} +1 -1
  9. package/dist/{Legend-W9YVYVX-.js → Legend-D5I3jeGD.js} +1 -1
  10. package/dist/{NonSvgPenAndPaper-B2kuh5Yb.js → NonSvgPenAndPaper-RQzq8DqO.js} +1 -1
  11. package/dist/{PackageVersion-DAF5ApGl.js → PackageVersion-B-1JX0wI.js} +1 -1
  12. package/dist/{PenAndPaper-BV5ODysA.js → PenAndPaper-B2UOwiJM.js} +1 -1
  13. package/dist/{Shape-CRe8woTu.js → Shape-DgpYvQc4.js} +1 -1
  14. package/dist/{SlicerPreview-BVgz_p4G.js → SlicerPreview-QaJuNJhX.js} +1 -1
  15. package/dist/{SparkTooltip-Ch06CV71.js → SparkTooltip-dnNSazTu.js} +1 -1
  16. package/dist/{StackChartTable-rTC6w378.js → StackChartTable-mMKxPOnc.js} +1 -1
  17. package/dist/{Title-BliHuXfT.js → Title-DlhGIAWX.js} +1 -1
  18. package/dist/{Tooltip-B432XpvC.js → Tooltip-CL3U31cL.js} +1 -1
  19. package/dist/UserOptions-B97cPcKc.js +1 -0
  20. package/dist/{XyAnalysisOptions-Cyt8w5B3.js → XyAnalysisOptions-DeJOjnC3.js} +1 -1
  21. package/dist/{chartImage-DPGnEuYM.js → chartImage-Dvrx_F7P.js} +1 -1
  22. package/dist/components/arrow.js +1 -1
  23. package/dist/components/vue-ui-3d-bar.js +1 -1
  24. package/dist/components/vue-ui-accordion.js +1 -1
  25. package/dist/components/vue-ui-age-pyramid.js +1 -1
  26. package/dist/components/vue-ui-annotator.js +1 -1
  27. package/dist/components/vue-ui-bullet.js +1 -1
  28. package/dist/components/vue-ui-bump.js +1 -1
  29. package/dist/components/vue-ui-candlestick.js +1 -1
  30. package/dist/components/vue-ui-carousel-table.js +1 -1
  31. package/dist/components/vue-ui-chestnut.js +1 -1
  32. package/dist/components/vue-ui-chord.js +1 -1
  33. package/dist/components/vue-ui-circle-pack.js +1 -1
  34. package/dist/components/vue-ui-cursor.js +1 -1
  35. package/dist/components/vue-ui-dag.js +1 -1
  36. package/dist/components/vue-ui-dashboard.js +1 -1
  37. package/dist/components/vue-ui-digits.js +1 -1
  38. package/dist/components/vue-ui-donut-evolution.js +1 -1
  39. package/dist/components/vue-ui-donut.js +1 -1
  40. package/dist/components/vue-ui-dumbbell.js +1 -1
  41. package/dist/components/vue-ui-flow.js +1 -1
  42. package/dist/components/vue-ui-funnel.js +1 -1
  43. package/dist/components/vue-ui-galaxy.js +1 -1
  44. package/dist/components/vue-ui-gauge.js +1 -1
  45. package/dist/components/vue-ui-geo.js +1 -1
  46. package/dist/components/vue-ui-gizmo.js +1 -1
  47. package/dist/components/vue-ui-graph.js +1 -1
  48. package/dist/components/vue-ui-heatmap.js +1 -1
  49. package/dist/components/vue-ui-hill.js +1 -1
  50. package/dist/components/vue-ui-history-plot.js +1 -1
  51. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  52. package/dist/components/vue-ui-icon.js +1 -1
  53. package/dist/components/vue-ui-kpi.js +1 -1
  54. package/dist/components/vue-ui-label.js +1 -1
  55. package/dist/components/vue-ui-mini-loader.js +1 -1
  56. package/dist/components/vue-ui-molecule.js +1 -1
  57. package/dist/components/vue-ui-mood-radar.js +1 -1
  58. package/dist/components/vue-ui-nested-donuts.js +1 -1
  59. package/dist/components/vue-ui-onion.js +1 -1
  60. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  61. package/dist/components/vue-ui-quadrant.js +1 -1
  62. package/dist/components/vue-ui-quick-chart.js +1 -1
  63. package/dist/components/vue-ui-radar.js +1 -1
  64. package/dist/components/vue-ui-rating.js +1 -1
  65. package/dist/components/vue-ui-relation-circle.js +1 -1
  66. package/dist/components/vue-ui-ridgeline.js +1 -1
  67. package/dist/components/vue-ui-rings.js +1 -1
  68. package/dist/components/vue-ui-scatter.js +1 -1
  69. package/dist/components/vue-ui-skeleton.js +1 -1
  70. package/dist/components/vue-ui-smiley.js +1 -1
  71. package/dist/components/vue-ui-spark-trend.js +1 -1
  72. package/dist/components/vue-ui-sparkbar.js +1 -1
  73. package/dist/components/vue-ui-sparkgauge.js +1 -1
  74. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  75. package/dist/components/vue-ui-sparkline.js +1 -1
  76. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  77. package/dist/components/vue-ui-stackbar.js +1 -1
  78. package/dist/components/vue-ui-stackline.js +1 -1
  79. package/dist/components/vue-ui-strip-plot.js +1 -1
  80. package/dist/components/vue-ui-table-heatmap.js +1 -1
  81. package/dist/components/vue-ui-table-sparkline.js +1 -1
  82. package/dist/components/vue-ui-table.js +1 -1
  83. package/dist/components/vue-ui-thermometer.js +1 -1
  84. package/dist/components/vue-ui-timer.js +1 -1
  85. package/dist/components/vue-ui-tiremarks.js +1 -1
  86. package/dist/components/vue-ui-treemap.js +1 -1
  87. package/dist/components/vue-ui-vertical-bar.js +1 -1
  88. package/dist/components/vue-ui-waffle.js +1 -1
  89. package/dist/components/vue-ui-wheel.js +1 -1
  90. package/dist/components/vue-ui-word-cloud.js +1 -1
  91. package/dist/components/vue-ui-world.js +1 -1
  92. package/dist/components/vue-ui-xy-canvas.js +1 -1
  93. package/dist/components/vue-ui-xy.js +1 -1
  94. package/dist/{dom-to-png-D56-Zgv4.js → dom-to-png-BciywWcQ.js} +1 -1
  95. package/dist/{exposedLib-BRtClmZy.js → exposedLib-BaycYTOv.js} +1 -1
  96. package/dist/{img-D4RQwASc.js → img-Dwb4XSud.js} +1 -1
  97. package/dist/{labelUtils-CdtU-yB_.js → labelUtils-D_AyGvLO.js} +1 -1
  98. package/dist/{lib-rPeBMZrn.js → lib-BaWaqwnJ.js} +7 -7
  99. package/dist/package-CfW2xYyy.js +1 -0
  100. package/dist/{pdf-CVdqBWVS.js → pdf-Bd6zav8D.js} +1 -1
  101. package/dist/{render-common-B7aQrXBR.js → render-common-CxohOkPd.js} +1 -1
  102. package/dist/{resolveChartConfig-0IvbmIE_.js → resolveChartConfig-QgMumfgd.js} +1 -1
  103. package/dist/ssr/vue-ui-donut.js +1 -1
  104. package/dist/ssr/vue-ui-xy.js +1 -1
  105. package/dist/ssr.js +1 -1
  106. package/dist/style.css +1 -1
  107. package/dist/types/vue-data-ui.d.ts +20 -0
  108. package/dist/{useConfig-B8qvYKdK.js → useConfig-B-AzS3w-.js} +1 -1
  109. package/dist/{useNestedProp-DnGoh-XS.js → useNestedProp-ri-deXpG.js} +1 -1
  110. package/dist/{useObjectBindings-CztjiAzG.js → useObjectBindings-DsvXXciT.js} +1 -1
  111. package/dist/{usePrinter-DVf3YcG5.js → usePrinter-CUD8gosC.js} +1 -1
  112. package/dist/utils.js +1 -1
  113. package/dist/vue-data-ui-orKuQ-0A.js +1 -0
  114. package/dist/vue-data-ui.js +1 -1
  115. package/dist/{vue-ui-3d-bar-D3pDUYiG.js → vue-ui-3d-bar-BxIOe5pW.js} +1 -1
  116. package/dist/{vue-ui-accordion-BpTfjWvH.js → vue-ui-accordion-B8LYfVG9.js} +1 -1
  117. package/dist/{vue-ui-age-pyramid-bJmGRZ59.js → vue-ui-age-pyramid-CsQ6Zx79.js} +1 -1
  118. package/dist/{vue-ui-annotator-C-gyszpf.js → vue-ui-annotator-xYv2xrXs.js} +1 -1
  119. package/dist/{vue-ui-bullet-5ZNUgPS7.js → vue-ui-bullet-CsaTMHaa.js} +1 -1
  120. package/dist/{vue-ui-bump-DYGbmTko.js → vue-ui-bump-BOVB5hWu.js} +1 -1
  121. package/dist/{vue-ui-candlestick-BwETH5d4.js → vue-ui-candlestick-C8W4sGST.js} +1 -1
  122. package/dist/{vue-ui-carousel-table-_V-HWzd-.js → vue-ui-carousel-table-DAMT9bn5.js} +1 -1
  123. package/dist/{vue-ui-chestnut-Cg8m6-N6.js → vue-ui-chestnut-XdPEyosT.js} +1 -1
  124. package/dist/{vue-ui-chord-CaJ-uclL.js → vue-ui-chord-CeYpAizS.js} +1 -1
  125. package/dist/{vue-ui-circle-pack-BiVPm8ii.js → vue-ui-circle-pack-Brhoqu25.js} +1 -1
  126. package/dist/{vue-ui-cursor-jkuEvFtX.js → vue-ui-cursor-CieGBz32.js} +1 -1
  127. package/dist/{vue-ui-dag-wkBDTIcz.js → vue-ui-dag-CC7fXGUn.js} +1 -1
  128. package/dist/{vue-ui-dashboard-CDekEQNH.js → vue-ui-dashboard-C7oXScoZ.js} +1 -1
  129. package/dist/{vue-ui-digits-ByjwG9Hv.js → vue-ui-digits-Cn_wqq4Y.js} +1 -1
  130. package/dist/{vue-ui-donut-BB7BW0dE.js → vue-ui-donut-BHRes5Ak.js} +1 -1
  131. package/dist/{vue-ui-donut-BV3btR0S.js → vue-ui-donut-BXlWXh2v.js} +1 -1
  132. package/dist/{vue-ui-donut-evolution-CPIVtWxh.js → vue-ui-donut-evolution-DHPd3KRv.js} +1 -1
  133. package/dist/{vue-ui-dumbbell-bTQpX8A6.js → vue-ui-dumbbell-BmqFCL_t.js} +1 -1
  134. package/dist/{vue-ui-flow-BRC3pGzL.js → vue-ui-flow-CvRa8Ija.js} +1 -1
  135. package/dist/{vue-ui-funnel-7RjzjVqE.js → vue-ui-funnel-Ds4JV24L.js} +1 -1
  136. package/dist/vue-ui-galaxy-DSHlkl9t.js +1 -0
  137. package/dist/{vue-ui-gauge-DM3p5s8H.js → vue-ui-gauge-2XPqwRR4.js} +1 -1
  138. package/dist/{vue-ui-geo-BUQL79cU.js → vue-ui-geo-IDzNLYVX.js} +1 -1
  139. package/dist/{vue-ui-gizmo-CoET_abC.js → vue-ui-gizmo-BXEnFICN.js} +1 -1
  140. package/dist/{vue-ui-graph-CCLd8bTj.js → vue-ui-graph-DdY8jDH-.js} +2 -2
  141. package/dist/{vue-ui-heatmap-BvVHrOcc.js → vue-ui-heatmap-DmgXUHFz.js} +1 -1
  142. package/dist/{vue-ui-hill-BkcY-Zbf.js → vue-ui-hill-CTuh5311.js} +1 -1
  143. package/dist/{vue-ui-history-plot-DVoOwR1y.js → vue-ui-history-plot-qpbsJ706.js} +1 -1
  144. package/dist/{vue-ui-horizontal-bar-Khi_qtla.js → vue-ui-horizontal-bar-BnIRG4Da.js} +1 -1
  145. package/dist/{vue-ui-kpi-BPL64spX.js → vue-ui-kpi-BvGMMvPY.js} +1 -1
  146. package/dist/{vue-ui-label-OvoE3A_k.js → vue-ui-label-CcVh3FeS.js} +1 -1
  147. package/dist/{vue-ui-mini-loader-DyefvJIr.js → vue-ui-mini-loader-C7rLQ7JE.js} +1 -1
  148. package/dist/{vue-ui-molecule-B7KJzavj.js → vue-ui-molecule-BLCwrefH.js} +1 -1
  149. package/dist/{vue-ui-mood-radar-6q5OUW6D.js → vue-ui-mood-radar-Bm12y-t8.js} +1 -1
  150. package/dist/{vue-ui-nested-donuts-C137tg5U.js → vue-ui-nested-donuts-BGz-1VHL.js} +1 -1
  151. package/dist/{vue-ui-onion-ClMux968.js → vue-ui-onion-C23btxVO.js} +1 -1
  152. package/dist/{vue-ui-parallel-coordinate-plot-JbfDQzwN.js → vue-ui-parallel-coordinate-plot-E17cuXGN.js} +1 -1
  153. package/dist/{vue-ui-quadrant-BPKWN3Ac.js → vue-ui-quadrant-NJPbHq0p.js} +1 -1
  154. package/dist/{vue-ui-quick-chart-BvqQnNn1.js → vue-ui-quick-chart-CI1n75li.js} +1 -1
  155. package/dist/{vue-ui-radar-DIdTBEet.js → vue-ui-radar-CD1Ge3r9.js} +1 -1
  156. package/dist/{vue-ui-rating-CFu9LjID.js → vue-ui-rating-mDoJ2Rkg.js} +1 -1
  157. package/dist/{vue-ui-relation-circle-5Noti3DC.js → vue-ui-relation-circle-CQPFqgsl.js} +1 -1
  158. package/dist/{vue-ui-ridgeline-DUrvAa8z.js → vue-ui-ridgeline-C0fxNnYy.js} +1 -1
  159. package/dist/{vue-ui-rings-B-cJIyAX.js → vue-ui-rings-D2XUhWg-.js} +1 -1
  160. package/dist/{vue-ui-scatter-DcchOWYi.js → vue-ui-scatter-DgfuFep8.js} +1 -1
  161. package/dist/{vue-ui-skeleton-DtHam8Oi.js → vue-ui-skeleton-BUMvfDJX.js} +1 -1
  162. package/dist/{vue-ui-smiley-C8ES41OS.js → vue-ui-smiley-aTCVrK-n.js} +1 -1
  163. package/dist/{vue-ui-spark-trend-m_ybZFN7.js → vue-ui-spark-trend-B1S6SaGz.js} +1 -1
  164. package/dist/{vue-ui-sparkbar-CVJo0I__.js → vue-ui-sparkbar-DtGqqvGS.js} +1 -1
  165. package/dist/{vue-ui-sparkgauge-UXQOQCQ6.js → vue-ui-sparkgauge-yEOfuIEu.js} +1 -1
  166. package/dist/{vue-ui-sparkhistogram-DVyAev-n.js → vue-ui-sparkhistogram-nM2G2AJx.js} +1 -1
  167. package/dist/{vue-ui-sparkline-DXJpSvr5.js → vue-ui-sparkline-B7ZZzccR.js} +1 -1
  168. package/dist/{vue-ui-sparkstackbar-CI7LeTy9.js → vue-ui-sparkstackbar-CTCvV0UA.js} +1 -1
  169. package/dist/{vue-ui-stackbar-BAdE_agj.js → vue-ui-stackbar-DTlq5Fmr.js} +1 -1
  170. package/dist/{vue-ui-stackline-CEcCgYrY.js → vue-ui-stackline-DgV0GCOn.js} +1 -1
  171. package/dist/{vue-ui-strip-plot-D2JTssjF.js → vue-ui-strip-plot-DlIqyn9G.js} +1 -1
  172. package/dist/{vue-ui-table-CcBJ_hPp.js → vue-ui-table-B1QawDAY.js} +1 -1
  173. package/dist/{vue-ui-table-heatmap-CwV82zwm.js → vue-ui-table-heatmap-DFjVopuI.js} +1 -1
  174. package/dist/{vue-ui-table-sparkline-D1OPXi2z.js → vue-ui-table-sparkline-D15wq2iu.js} +1 -1
  175. package/dist/{vue-ui-thermometer-D2LlLcEV.js → vue-ui-thermometer-gK8M0jyN.js} +1 -1
  176. package/dist/{vue-ui-timer-Ca8KPZNl.js → vue-ui-timer-Be4jnf30.js} +2 -2
  177. package/dist/{vue-ui-tiremarks-BsKJi3S0.js → vue-ui-tiremarks-B1PF45Fh.js} +1 -1
  178. package/dist/{vue-ui-treemap-5HkhmOD4.js → vue-ui-treemap-CProQJII.js} +1 -1
  179. package/dist/{vue-ui-waffle-2BJYwpwv.js → vue-ui-waffle-C9QBRGRd.js} +1 -1
  180. package/dist/{vue-ui-wheel-Dr-mMZrH.js → vue-ui-wheel-EBNVnATV.js} +1 -1
  181. package/dist/{vue-ui-word-cloud-CF_k1x_e.js → vue-ui-word-cloud-D_wT_OgE.js} +1 -1
  182. package/dist/{vue-ui-world-BuzOXOPx.js → vue-ui-world-CvjzqQPz.js} +1 -1
  183. package/dist/{vue-ui-xy-Cr5w4DsW.js → vue-ui-xy-B0z97XdU.js} +1 -1
  184. package/dist/{vue-ui-xy-Cwkavs_B.js → vue-ui-xy-ZTbijg4Q.js} +3 -3
  185. package/dist/{vue-ui-xy-canvas-DnWzhq9y.js → vue-ui-xy-canvas-QqaK6zlu.js} +1 -1
  186. package/dist/vue_ui_galaxy-fL8NyfDy.js +1 -0
  187. package/package.json +14 -14
  188. package/dist/UserOptions-K1N7zQRx.js +0 -1
  189. package/dist/package-Dd1ZNT5Q.js +0 -1
  190. package/dist/vue-data-ui-BmTsLaNH.js +0 -1
  191. package/dist/vue-ui-galaxy-D91dIUfs.js +0 -1
  192. package/dist/vue_ui_galaxy-iCWLHLBY.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"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s}from"./resolveChartConfig-0IvbmIE_.js";import{$ as c,Ht as ee,X as te,at as ne,i as re,in as ie,r as ae,rn as oe,t as se,w as ce,yt as le,zt as ue}from"./lib-rPeBMZrn.js";import{c as de}from"./canvas-lib-22VpOI4_.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./useConfig-B8qvYKdK.js";import{t as he}from"./useLoading-DoqqfnmS.js";import{t as ge}from"./usePrinter-DVf3YcG5.js";import{t as _e}from"./useResponsive-CENUxfEL.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{t as ye}from"./useUserOptionState-CXlFnwPv.js";import{t as be}from"./useChartAccessibility-DOMuYJfm.js";import{t as xe}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Se}from"./img-D4RQwASc.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./vue_ui_relation_circle-Bd8SWF0Z.js";import{t as Te}from"./BaseScanner-m6QR9rwD.js";import{t as Ee}from"./A11yDataTable-DWNlWXzs.js";import{t as De}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Oe,createTextVNode as ke,createVNode as Ae,defineAsyncComponent as je,guardReactiveProps as h,mergeProps as Me,normalizeClass as Ne,normalizeProps as g,normalizeStyle as _,onBeforeUnmount as Pe,onMounted as Fe,openBlock as v,ref as y,renderList as b,renderSlot as x,shallowRef as Ie,toDisplayString as S,toRefs as Le,unref as C,useCssVars as Re,watch as ze,withCtx as Be}from"vue";var Ve=/* @__PURE__ */ e({default:()=>ct}),He=[`id`],Ue=[`id`],We={style:{position:`relative`}},Ge=[`xmlns`,`viewBox`,`aria-describedby`],Ke=[`width`,`height`],qe=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Je={key:1},Ye=[`stroke`,`d`,`stroke-width`],Xe={style:{"pointer-events":`none`}},Ze=[`cx`,`cy`,`fill`,`r`,`stroke`],Qe=[`x`,`y`,`fill`,`font-size`],$e={key:2},et=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],tt={style:{"pointer-events":`none`}},nt=[`cx`,`cy`,`fill`,`r`,`stroke`],rt=[`x`,`y`,`fill`,`font-size`],it=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],at=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],ot={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},st={key:5,class:`vue-data-ui-watermark`},ct=/*#__PURE__*/ De({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:De,emit:Ve}){Re(e=>({d8b066be:Pt.value,c035b400:Nt.value,v5bed39e2:Ft.value}));let ct=je(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),lt=je(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),ut=je(()=>import(`./PackageVersion-DAF5ApGl.js`).then(e=>e.t)),{vue_ui_relation_circle:dt}=me(),w=e,ft=Ve,pt=u(()=>!!w.dataset&&Object.keys(w.dataset).length),T=y(te()),mt=y(0),E=y(null),ht=y(null),gt=y(null),_t=y(null),vt=y(0),D=y(null),O=y(!1),k=y(Et()),A=u(()=>k.value.userOptions),j=u(()=>k.value.style.weightLabels),M=u(()=>k.value.style);fe({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiRelationCircle`,rules:[pe.noHint]});let N=u(()=>k.value.userOptions.useCursorPointer),yt=u(()=>ie({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:k.value.skeletonConfig??{}})),{loading:bt,FINAL_DATASET:xt,manualLoading:St}=he({...Le(w),FINAL_CONFIG:k,prepareConfig:Et,skeletonDataset:w.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:ie({defaultConfig:k.value,userConfig:yt.value})}),{userOptionsVisible:Ct,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=ye({config:k.value}),{svgRef:P}=be({config:M.value.title});function Et(){return s(w.config,dt,we)}ze(()=>w.config,e=>{k.value=Et(),Ct.value=!k.value.userOptions.showOnChartHover,H.value=M.value.size,U.value=j.value.size,W.value=M.value.plot.radius,G.value=M.value.labels.fontSize,K.value.height=M.value.size,K.value.width=M.value.size,Lt(),vt.value+=1},{deep:!0}),ze(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(St.value=!1)},{deep:!0});let{isPrinting:F,isImaging:I,generatePdf:Dt,generateImage:Ot}=ge({elementId:`relation_circle_${T.value}`,fileName:M.value.title.text||`vue-ui-relation-circle`,options:k.value.userOptions.print}),kt=u(()=>k.value.userOptions.show&&!M.value.title.text),At=u(()=>ce(k.value.customPalette)),L=y([]),R=y([]),z=y({}),B=y([]),jt=y(0),V=u(()=>xt.value.slice(0,M.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}}));ze(V,()=>{L.value=[],R.value=[],Bt(),Ht()});let H=y(M.value.size),U=y(j.value.size),W=y(M.value.plot.radius),G=y(M.value.labels.fontSize),K=y({height:M.value.size,width:M.value.size}),q=u({get(){return H.value*M.value.circle.radiusProportion},set(e){return e}}),Mt=u(()=>M.value.links.curved),Nt=u(()=>`${M.value.animation.speedMs}ms`),Pt=u(()=>q.value*2),Ft=u(()=>q.value*4),J=Ie(null),Y=Ie(null);Fe(()=>{Lt(),document.getElementById(`relation_circle_${T.value}`).addEventListener(`click`,zt)});let It=u(()=>k.value.debug);function Lt(){if(ue(w.dataset)?(ne({componentName:`VueUiRelationCircle`,type:`dataset`,debug:It.value}),St.value=!0):It.value&&w.dataset.forEach((e,t)=>{le({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{ne({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),ue(w.dataset)||(St.value=k.value.loading),k.value.responsive){let e=de(()=>{let{width:e,height:t}=_e({chart:E.value,title:M.value.title.text?ht.value:null,source:gt.value,noTitle:_t.value});requestAnimationFrame(()=>{H.value=Math.min(e,t),K.value.width=Math.max(.1,e),K.value.height=Math.max(.1,t-12),q.value=H.value*M.value.circle.radiusProportion,L.value=[],R.value=[],Bt(),Ht(),Rt(),k.value.responsiveProportionalSizing?(U.value=oe({relator:H.value,adjuster:M.value.size,source:j.value.size,threshold:6,fallback:6}),W.value=oe({relator:H.value,adjuster:M.value.size,source:M.value.plot.radius,threshold:1,fallback:1}),G.value=oe({relator:H.value,adjuster:M.value.size,source:M.value.labels.fontSize,threshold:6,fallback:6})):(U.value=j.value.size,W.value=M.value.plot.radius,G.value=M.value.labels.fontSize)})});J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect()),J.value=new ResizeObserver(e),Y.value=E.value.parentNode,J.value.observe(Y.value)}else L.value=[],R.value=[],Bt(),Ht();Rt()}Pe(()=>{document.getElementById(`relation_circle_${T.value}`)?.removeEventListener(`click`,zt),J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect())});let{autoSizeLabels:Rt}=xe({svgRef:P,fontSize:M.value.labels.fontSize,minFontSize:M.value.labels.minFontSize,sizeRef:G,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`)||(z.value={},B.value=[])}function Bt(){let e=6.28319/V.value.length,t=360/V.value.length,n=0,r=0;V.value.forEach((i,a)=>{let o=i.weights.reduce((e,t)=>e+t,0),s=q.value*Math.cos(n)+K.value.width/2,c=q.value*Math.sin(n)+K.value.height/2+M.value.circle.offsetY;L.value.push({x:s,y:c,...i,color:i.color?i.color:At.value[a]?At.value[a]:ee[a],regAngle:r,totalWeight:o}),n+=e,r+=t})}function Vt(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ht(){R.value=[],L.value.forEach(e=>{L.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);R.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:K.value.width/2,y:K.value.height/2+M.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=u(()=>Math.max(...R.value.map(e=>e.weight)));function Gt(e){return Object.hasOwn(z.value,`x`)?B.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function X(e){return e.colorSource}function Kt(e){return Object.hasOwn(z.value,`x`)?B.value.includes(e.id)&&e.relationId===`${e.id}_${z.value.id}`||e.relationId===`${z.value.id}_${e.id}`?`opacity:1;stroke-width:${tn(e)}`:`opacity: 0`:`opacity: 1`}function Z(e){return Object.hasOwn(z.value,`x`)?!!(B.value.includes(e.id)&&e.relationId===`${e.id}_${z.value.id}`||e.relationId===`${z.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(z.value,`x`)?z.value.id===e.id||B.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 Q=y(null);function Zt(e,t){Q.value=t,D.value=t,k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Qt(e,t){Q.value=null,O.value||(D.value=null),k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function $t(e,t){e&&(k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:e,seriesIndex:t}),jt.value=360-e.regAngle,z.value.id&&e.id===z.value.id?(z.value={},B.value=[]):(z.value=e,B.value=[...e.relations]))}function en(e,t){D.value=t,$t(e,t)}function tn(e){let t=e.weight/Wt.value*M.value.links.maxWidth;return Math.max(.3,t)}let nn=y(!1);function rn(e){nn.value=e,mt.value+=1}let $=y(!1);function an(){$.value=!$.value}async function on({scale:e=2}={}){if(!E.value)return;let{width:t,height:n}=E.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await Se({domElement:E.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:M.value.title.text,width:t,height:n,aspectRatio:r}}let sn=u(()=>M.value.backgroundColor),cn=u(()=>M.value.title),{isCallbackImaging:ln,isCallbackSvg:un,generateSvg:dn,onGenerateImage:fn}=ve({svg:P,title:cn,legend:null,legendItems:null,backgroundColor:sn,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:Ot});async function pn(){ft(`copyAlt`,{config:k.value,dataset:V.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:V.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function mn(){O.value=!0,L.value.length&&D.value===null&&(D.value=0)}function hn(){O.value=!1,D.value=null}function gn(e){if(!P.value||$.value||document.activeElement!==P.value||!L.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){D.value=null,z.value={},B.value=[];return}if(r){if(D.value===null)return;let e=L.value[D.value];if(!e)return;$t(e,D.value);return}let a=D.value;a===null||a<0||a>=L.value.length?a=n?0:L.value.length-1:n?(a+=1,a>=L.value.length&&(a=0)):t&&(--a,a<0&&(a=L.value.length-1)),D.value=a,Q.value=a;let o=L.value[a];o&&k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:o,seriesIndex:a})}let _n=u(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:V.value.map(e=>{let t=e.relations.map(e=>V.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 De({getImage:on,generatePdf:Dt,generateSvg:dn,generateImage:Ot,toggleAnnotator:an,toggleFullscreen:rn,copyAlt:pn}),(e,s)=>(v(),p(`div`,{ref_key:`relationCircleChart`,ref:E,class:`vue-data-ui-component vue-ui-relation-circle`,style:_(`width:100%;background:${M.value.backgroundColor};text-align:center;${k.value.responsive?`height: 100%`:``}`),id:`relation_circle_${T.value}`,onMouseenter:s[0]||=()=>C(wt)(!0),onMouseleave:s[1]||=()=>C(wt)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Ue),k.value.a11y.includeTable&&_n.value?.rows?.length?(v(),d(Ee,{key:0,uid:T.value,head:_n.value.headers,body:_n.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),A.value.buttons.annotator?(v(),d(C(ct),Me({key:1},C(a)(A.value.annotator),{svgRef:C(P),backgroundColor:M.value.backgroundColor,color:M.value.color,active:$.value,isCursorPointer:N.value,palette:A.value.annotatorPalette,onClose:an}),Oe({_:2},[b(C(o),t=>({name:t,fn:Be(n=>[x(e.$slots,t,g(h(C(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),kt.value?(v(),p(`div`,{key:2,ref_key:`noTitle`,ref:_t,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),M.value.title.text?(v(),p(`div`,{key:3,ref_key:`chartTitle`,ref:ht,style:`width:100%;background:transparent`},[(v(),d(Ce,{key:`title_${vt.value}`,config:{title:{cy:`relation-div-title`,...M.value.title},subtitle:{cy:`relation-div-subtitle`,...M.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),A.value.show&&pt.value&&(C(Tt)||C(Ct))?(v(),d(C(lt),Me({ref:`details`,key:`user_options_${mt.value}`,backgroundColor:M.value.backgroundColor,color:M.value.color,isPrinting:C(F),isImaging:C(I),uid:T.value,hasXls:!1,isFullscreen:nn.value,chartElement:E.value},C(n)(A.value,`pdf img svg fullscreen altCopy annotator`),{isAnnotation:$.value,isCursorPointer:N.value,onToggleFullscreen:rn,onGeneratePdf:C(Dt),onGenerateImage:C(fn),onGenerateSvg:C(dn),onToggleAnnotator:an,onCopyAlt:pn,style:{visibility:C(Tt)?C(Ct)?`visible`:`hidden`:`visible`}}),Oe({_:2},[b(C(t)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Be(n=>[x(e.$slots,t,g(h(C(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),m(`div`,We,[(v(),p(`svg`,{ref_key:`svgRef`,ref:P,xmlns:C(se),class:Ne([{"vue-data-ui-fullscreen--on":nn.value,"vue-data-ui-fulscreen--off":!nn.value},`relation-circle`]),viewBox:`0 0 ${K.value.width<=0?10:K.value.width} ${K.value.height<=0?10:K.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${T.value}`,tabindex:`0`,onFocus:mn,onBlur:hn,onKeydown:gn},[Ae(C(ut)),x(e.$slots,`svg-underlayer`,{svg:{...K.value,isPrintingImg:C(F)||C(I)||C(ln),isPrintingSvg:C(un)}},void 0,!0),e.$slots[`chart-background`]?(v(),p(`foreignObject`,{key:0,x:0,y:0,width:K.value.width<=0?10:K.value.width,height:K.value.height<=0?10:K.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,Ke)):f(``,!0),m(`circle`,{cx:(K.value.width<=0?1e-4:K.value.width)/2,cy:(K.value.height<=0?1e-4:K.value.height)/2+M.value.circle.offsetY,r:q.value<=0?1e-4:q.value,stroke:M.value.circle.stroke,"stroke-width":M.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,qe),Mt.value?(v(),p(`g`,Je,[(v(!0),p(l,null,b(R.value,(e,t)=>(v(),p(`path`,{key:`relation_${t}`,style:_(Kt(e)),stroke:X(e),class:Ne([`relation`,{"vue-ui-relation-circle-selected":z.value.hasOwnProperty(`id`)&&B.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${K.value.width/2},${K.value.height/2+M.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":tn(e),"stroke-linecap":`round`},null,14,Ye))),128)),(v(!0),p(l,null,b(R.value,(t,n)=>(v(),p(`g`,Xe,[Z(t)?x(e.$slots,`dataLabel`,Me({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:X(t),weight:t.weight,fontSize:U.value}),void 0,!0,0):f(``,!0),Z(t)&&!e.$slots.dataLabel?(v(),p(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:X(t),r:U.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,Ze)):f(``,!0),Z(t)&&!e.$slots.dataLabel?(v(),p(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+U.value/3,fill:C(ae)(X(t)),"text-anchor":`middle`,"font-size":U.value},S(C(re)(j.value.formatter,t.weight,C(c)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,Qe)):f(``,!0)]))),256))])):(v(),p(`g`,$e,[(v(!0),p(l,null,b(R.value,(e,t)=>(v(),p(`line`,{key:`relation_${t}`,stroke:X(e),"stroke-width":tn(e),style:_(Kt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:Ne({"vue-ui-relation-circle-selected":z.value.hasOwnProperty(`id`)&&B.value.includes(e.id)}),"stroke-linecap":`round`},null,14,et))),128)),(v(!0),p(l,null,b(R.value,(t,n)=>(v(),p(`g`,tt,[Z(t)?x(e.$slots,`dataLabel`,Me({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:X(t),weight:t.weight,fontSize:U.value}),void 0,!0,0):f(``,!0),Z(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:X(t),r:U.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,nt)):f(``,!0),Z(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+U.value/3,fill:C(ae)(X(t)),"text-anchor":`middle`,"font-size":U.value},S(C(re)(j.value.formatter,t.weight,C(c)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,rt)):f(``,!0)]))),256))])),(v(!0),p(l,null,b(L.value,(e,t)=>(v(),p(`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":z.value.id===e.id?`900`:`400`,style:_(`font-family:${M.value.fontFamily};${Yt(e)};cursor:${N.value?`pointer`:`default`}`),"font-size":G.value,fill:M.value.labels.color,"text-decoration":t===Q.value||t===D.value?`underline`:void 0,onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},[C(bt)?(v(),p(l,{key:0},[ke(`--------`)],64)):(v(),p(l,{key:1},[ke(S(e.label)+` (`+S(C(re)(j.value.formatter,e.totalWeight,C(c)({p:j.value.prefix,v:e.totalWeight,s:j.value.suffix,r:j.value.rounding}),{...e}))+`) `,1)],64))],44,it))),128)),(v(!0),p(l,null,b(L.value,(e,t)=>(v(),p(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:_(`${Gt(e)}; transition: r 0.2s ease-in-out; cursor:${N.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:M.value.plot.useSerieColor?e.color:M.value.plot.color,stroke:M.value.backgroundColor,"stroke-width":`1`,r:W.value*(t===Q.value||t===D.value?2:1),onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},null,44,at))),128)),x(e.$slots,`svg`,{svg:{...K.value,isPrintingImg:C(F)||C(I)||C(ln),isPrintingSvg:C(un)}},void 0,!0)],42,Ge)),e.$slots.hint?(v(),p(`div`,ot,[x(e.$slots,`hint`,g(h({hint:k.value.a11y.translations.keyboardNavigation,isVisible:O.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(v(),p(`div`,st,[x(e.$slots,`watermark`,g(h({isPrinting:C(F)||C(I)||C(ln)||C(un)})),void 0,!0)])):f(``,!0),e.$slots.source?(v(),p(`div`,{key:6,ref_key:`source`,ref:gt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),x(e.$slots,`skeleton`,{},()=>[C(bt)?(v(),d(Te,{key:0})):f(``,!0)],!0)],44,He))}},[[`__scopeId`,`data-v-dfb6df3b`]]);export{Ve as n,ct as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s}from"./resolveChartConfig-QgMumfgd.js";import{$ as c,Ht as ee,X as te,at as ne,i as re,in as ie,r as ae,rn as oe,t as se,w as ce,yt as le,zt as ue}from"./lib-BaWaqwnJ.js";import{c as de}from"./canvas-lib-22VpOI4_.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./useConfig-B-AzS3w-.js";import{t as he}from"./useLoading-DoqqfnmS.js";import{t as ge}from"./usePrinter-CUD8gosC.js";import{t as _e}from"./useResponsive-CENUxfEL.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{t as ye}from"./useUserOptionState-CXlFnwPv.js";import{t as be}from"./useChartAccessibility-DOMuYJfm.js";import{t as xe}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Se}from"./img-Dwb4XSud.js";import{n as Ce}from"./Title-DlhGIAWX.js";import{t as we}from"./vue_ui_relation_circle-Bd8SWF0Z.js";import{t as Te}from"./BaseScanner-m6QR9rwD.js";import{t as Ee}from"./A11yDataTable-DWNlWXzs.js";import{t as De}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Oe,createTextVNode as ke,createVNode as Ae,defineAsyncComponent as je,guardReactiveProps as h,mergeProps as Me,normalizeClass as Ne,normalizeProps as g,normalizeStyle as _,onBeforeUnmount as Pe,onMounted as Fe,openBlock as v,ref as y,renderList as b,renderSlot as x,shallowRef as Ie,toDisplayString as S,toRefs as Le,unref as C,useCssVars as Re,watch as ze,withCtx as Be}from"vue";var Ve=/* @__PURE__ */ e({default:()=>ct}),He=[`id`],Ue=[`id`],We={style:{position:`relative`}},Ge=[`xmlns`,`viewBox`,`aria-describedby`],Ke=[`width`,`height`],qe=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Je={key:1},Ye=[`stroke`,`d`,`stroke-width`],Xe={style:{"pointer-events":`none`}},Ze=[`cx`,`cy`,`fill`,`r`,`stroke`],Qe=[`x`,`y`,`fill`,`font-size`],$e={key:2},et=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],tt={style:{"pointer-events":`none`}},nt=[`cx`,`cy`,`fill`,`r`,`stroke`],rt=[`x`,`y`,`fill`,`font-size`],it=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],at=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],ot={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},st={key:5,class:`vue-data-ui-watermark`},ct=/*#__PURE__*/ De({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:De,emit:Ve}){Re(e=>({d8b066be:Pt.value,c035b400:Nt.value,v5bed39e2:Ft.value}));let ct=je(()=>import(`./PenAndPaper-B2UOwiJM.js`).then(e=>e.t)),lt=je(()=>import(`./UserOptions-B97cPcKc.js`).then(e=>e.n)),ut=je(()=>import(`./PackageVersion-B-1JX0wI.js`).then(e=>e.t)),{vue_ui_relation_circle:dt}=me(),w=e,ft=Ve,pt=u(()=>!!w.dataset&&Object.keys(w.dataset).length),T=y(te()),mt=y(0),E=y(null),ht=y(null),gt=y(null),_t=y(null),vt=y(0),D=y(null),O=y(!1),k=y(Et()),A=u(()=>k.value.userOptions),j=u(()=>k.value.style.weightLabels),M=u(()=>k.value.style);fe({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiRelationCircle`,rules:[pe.noHint]});let N=u(()=>k.value.userOptions.useCursorPointer),yt=u(()=>ie({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:k.value.skeletonConfig??{}})),{loading:bt,FINAL_DATASET:xt,manualLoading:St}=he({...Le(w),FINAL_CONFIG:k,prepareConfig:Et,skeletonDataset:w.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:ie({defaultConfig:k.value,userConfig:yt.value})}),{userOptionsVisible:Ct,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=ye({config:k.value}),{svgRef:P}=be({config:M.value.title});function Et(){return s(w.config,dt,we)}ze(()=>w.config,e=>{k.value=Et(),Ct.value=!k.value.userOptions.showOnChartHover,H.value=M.value.size,U.value=j.value.size,W.value=M.value.plot.radius,G.value=M.value.labels.fontSize,K.value.height=M.value.size,K.value.width=M.value.size,Lt(),vt.value+=1},{deep:!0}),ze(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(St.value=!1)},{deep:!0});let{isPrinting:F,isImaging:I,generatePdf:Dt,generateImage:Ot}=ge({elementId:`relation_circle_${T.value}`,fileName:M.value.title.text||`vue-ui-relation-circle`,options:k.value.userOptions.print}),kt=u(()=>k.value.userOptions.show&&!M.value.title.text),At=u(()=>ce(k.value.customPalette)),L=y([]),R=y([]),z=y({}),B=y([]),jt=y(0),V=u(()=>xt.value.slice(0,M.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}}));ze(V,()=>{L.value=[],R.value=[],Bt(),Ht()});let H=y(M.value.size),U=y(j.value.size),W=y(M.value.plot.radius),G=y(M.value.labels.fontSize),K=y({height:M.value.size,width:M.value.size}),q=u({get(){return H.value*M.value.circle.radiusProportion},set(e){return e}}),Mt=u(()=>M.value.links.curved),Nt=u(()=>`${M.value.animation.speedMs}ms`),Pt=u(()=>q.value*2),Ft=u(()=>q.value*4),J=Ie(null),Y=Ie(null);Fe(()=>{Lt(),document.getElementById(`relation_circle_${T.value}`).addEventListener(`click`,zt)});let It=u(()=>k.value.debug);function Lt(){if(ue(w.dataset)?(ne({componentName:`VueUiRelationCircle`,type:`dataset`,debug:It.value}),St.value=!0):It.value&&w.dataset.forEach((e,t)=>{le({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{ne({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),ue(w.dataset)||(St.value=k.value.loading),k.value.responsive){let e=de(()=>{let{width:e,height:t}=_e({chart:E.value,title:M.value.title.text?ht.value:null,source:gt.value,noTitle:_t.value});requestAnimationFrame(()=>{H.value=Math.min(e,t),K.value.width=Math.max(.1,e),K.value.height=Math.max(.1,t-12),q.value=H.value*M.value.circle.radiusProportion,L.value=[],R.value=[],Bt(),Ht(),Rt(),k.value.responsiveProportionalSizing?(U.value=oe({relator:H.value,adjuster:M.value.size,source:j.value.size,threshold:6,fallback:6}),W.value=oe({relator:H.value,adjuster:M.value.size,source:M.value.plot.radius,threshold:1,fallback:1}),G.value=oe({relator:H.value,adjuster:M.value.size,source:M.value.labels.fontSize,threshold:6,fallback:6})):(U.value=j.value.size,W.value=M.value.plot.radius,G.value=M.value.labels.fontSize)})});J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect()),J.value=new ResizeObserver(e),Y.value=E.value.parentNode,J.value.observe(Y.value)}else L.value=[],R.value=[],Bt(),Ht();Rt()}Pe(()=>{document.getElementById(`relation_circle_${T.value}`)?.removeEventListener(`click`,zt),J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect())});let{autoSizeLabels:Rt}=xe({svgRef:P,fontSize:M.value.labels.fontSize,minFontSize:M.value.labels.minFontSize,sizeRef:G,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`)||(z.value={},B.value=[])}function Bt(){let e=6.28319/V.value.length,t=360/V.value.length,n=0,r=0;V.value.forEach((i,a)=>{let o=i.weights.reduce((e,t)=>e+t,0),s=q.value*Math.cos(n)+K.value.width/2,c=q.value*Math.sin(n)+K.value.height/2+M.value.circle.offsetY;L.value.push({x:s,y:c,...i,color:i.color?i.color:At.value[a]?At.value[a]:ee[a],regAngle:r,totalWeight:o}),n+=e,r+=t})}function Vt(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ht(){R.value=[],L.value.forEach(e=>{L.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);R.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:K.value.width/2,y:K.value.height/2+M.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=u(()=>Math.max(...R.value.map(e=>e.weight)));function Gt(e){return Object.hasOwn(z.value,`x`)?B.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function X(e){return e.colorSource}function Kt(e){return Object.hasOwn(z.value,`x`)?B.value.includes(e.id)&&e.relationId===`${e.id}_${z.value.id}`||e.relationId===`${z.value.id}_${e.id}`?`opacity:1;stroke-width:${tn(e)}`:`opacity: 0`:`opacity: 1`}function Z(e){return Object.hasOwn(z.value,`x`)?!!(B.value.includes(e.id)&&e.relationId===`${e.id}_${z.value.id}`||e.relationId===`${z.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(z.value,`x`)?z.value.id===e.id||B.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 Q=y(null);function Zt(e,t){Q.value=t,D.value=t,k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Qt(e,t){Q.value=null,O.value||(D.value=null),k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function $t(e,t){e&&(k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:e,seriesIndex:t}),jt.value=360-e.regAngle,z.value.id&&e.id===z.value.id?(z.value={},B.value=[]):(z.value=e,B.value=[...e.relations]))}function en(e,t){D.value=t,$t(e,t)}function tn(e){let t=e.weight/Wt.value*M.value.links.maxWidth;return Math.max(.3,t)}let nn=y(!1);function rn(e){nn.value=e,mt.value+=1}let $=y(!1);function an(){$.value=!$.value}async function on({scale:e=2}={}){if(!E.value)return;let{width:t,height:n}=E.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await Se({domElement:E.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:M.value.title.text,width:t,height:n,aspectRatio:r}}let sn=u(()=>M.value.backgroundColor),cn=u(()=>M.value.title),{isCallbackImaging:ln,isCallbackSvg:un,generateSvg:dn,onGenerateImage:fn}=ve({svg:P,title:cn,legend:null,legendItems:null,backgroundColor:sn,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:Ot});async function pn(){ft(`copyAlt`,{config:k.value,dataset:V.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:V.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function mn(){O.value=!0,L.value.length&&D.value===null&&(D.value=0)}function hn(){O.value=!1,D.value=null}function gn(e){if(!P.value||$.value||document.activeElement!==P.value||!L.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){D.value=null,z.value={},B.value=[];return}if(r){if(D.value===null)return;let e=L.value[D.value];if(!e)return;$t(e,D.value);return}let a=D.value;a===null||a<0||a>=L.value.length?a=n?0:L.value.length-1:n?(a+=1,a>=L.value.length&&(a=0)):t&&(--a,a<0&&(a=L.value.length-1)),D.value=a,Q.value=a;let o=L.value[a];o&&k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:o,seriesIndex:a})}let _n=u(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:V.value.map(e=>{let t=e.relations.map(e=>V.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 De({getImage:on,generatePdf:Dt,generateSvg:dn,generateImage:Ot,toggleAnnotator:an,toggleFullscreen:rn,copyAlt:pn}),(e,s)=>(v(),p(`div`,{ref_key:`relationCircleChart`,ref:E,class:`vue-data-ui-component vue-ui-relation-circle`,style:_(`width:100%;background:${M.value.backgroundColor};text-align:center;${k.value.responsive?`height: 100%`:``}`),id:`relation_circle_${T.value}`,onMouseenter:s[0]||=()=>C(wt)(!0),onMouseleave:s[1]||=()=>C(wt)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Ue),k.value.a11y.includeTable&&_n.value?.rows?.length?(v(),d(Ee,{key:0,uid:T.value,head:_n.value.headers,body:_n.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),A.value.buttons.annotator?(v(),d(C(ct),Me({key:1},C(a)(A.value.annotator),{svgRef:C(P),backgroundColor:M.value.backgroundColor,color:M.value.color,active:$.value,isCursorPointer:N.value,palette:A.value.annotatorPalette,onClose:an}),Oe({_:2},[b(C(o),t=>({name:t,fn:Be(n=>[x(e.$slots,t,g(h(C(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),kt.value?(v(),p(`div`,{key:2,ref_key:`noTitle`,ref:_t,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),M.value.title.text?(v(),p(`div`,{key:3,ref_key:`chartTitle`,ref:ht,style:`width:100%;background:transparent`},[(v(),d(Ce,{key:`title_${vt.value}`,config:{title:{cy:`relation-div-title`,...M.value.title},subtitle:{cy:`relation-div-subtitle`,...M.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),A.value.show&&pt.value&&(C(Tt)||C(Ct))?(v(),d(C(lt),Me({ref:`details`,key:`user_options_${mt.value}`,backgroundColor:M.value.backgroundColor,color:M.value.color,isPrinting:C(F),isImaging:C(I),uid:T.value,hasXls:!1,isFullscreen:nn.value,chartElement:E.value},C(n)(A.value,`pdf img svg fullscreen altCopy annotator`),{isAnnotation:$.value,isCursorPointer:N.value,onToggleFullscreen:rn,onGeneratePdf:C(Dt),onGenerateImage:C(fn),onGenerateSvg:C(dn),onToggleAnnotator:an,onCopyAlt:pn,style:{visibility:C(Tt)?C(Ct)?`visible`:`hidden`:`visible`}}),Oe({_:2},[b(C(t)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Be(n=>[x(e.$slots,t,g(h(C(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),m(`div`,We,[(v(),p(`svg`,{ref_key:`svgRef`,ref:P,xmlns:C(se),class:Ne([{"vue-data-ui-fullscreen--on":nn.value,"vue-data-ui-fulscreen--off":!nn.value},`relation-circle`]),viewBox:`0 0 ${K.value.width<=0?10:K.value.width} ${K.value.height<=0?10:K.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${T.value}`,tabindex:`0`,onFocus:mn,onBlur:hn,onKeydown:gn},[Ae(C(ut)),x(e.$slots,`svg-underlayer`,{svg:{...K.value,isPrintingImg:C(F)||C(I)||C(ln),isPrintingSvg:C(un)}},void 0,!0),e.$slots[`chart-background`]?(v(),p(`foreignObject`,{key:0,x:0,y:0,width:K.value.width<=0?10:K.value.width,height:K.value.height<=0?10:K.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,Ke)):f(``,!0),m(`circle`,{cx:(K.value.width<=0?1e-4:K.value.width)/2,cy:(K.value.height<=0?1e-4:K.value.height)/2+M.value.circle.offsetY,r:q.value<=0?1e-4:q.value,stroke:M.value.circle.stroke,"stroke-width":M.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,qe),Mt.value?(v(),p(`g`,Je,[(v(!0),p(l,null,b(R.value,(e,t)=>(v(),p(`path`,{key:`relation_${t}`,style:_(Kt(e)),stroke:X(e),class:Ne([`relation`,{"vue-ui-relation-circle-selected":z.value.hasOwnProperty(`id`)&&B.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${K.value.width/2},${K.value.height/2+M.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":tn(e),"stroke-linecap":`round`},null,14,Ye))),128)),(v(!0),p(l,null,b(R.value,(t,n)=>(v(),p(`g`,Xe,[Z(t)?x(e.$slots,`dataLabel`,Me({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:X(t),weight:t.weight,fontSize:U.value}),void 0,!0,0):f(``,!0),Z(t)&&!e.$slots.dataLabel?(v(),p(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:X(t),r:U.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,Ze)):f(``,!0),Z(t)&&!e.$slots.dataLabel?(v(),p(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+U.value/3,fill:C(ae)(X(t)),"text-anchor":`middle`,"font-size":U.value},S(C(re)(j.value.formatter,t.weight,C(c)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,Qe)):f(``,!0)]))),256))])):(v(),p(`g`,$e,[(v(!0),p(l,null,b(R.value,(e,t)=>(v(),p(`line`,{key:`relation_${t}`,stroke:X(e),"stroke-width":tn(e),style:_(Kt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:Ne({"vue-ui-relation-circle-selected":z.value.hasOwnProperty(`id`)&&B.value.includes(e.id)}),"stroke-linecap":`round`},null,14,et))),128)),(v(!0),p(l,null,b(R.value,(t,n)=>(v(),p(`g`,tt,[Z(t)?x(e.$slots,`dataLabel`,Me({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:X(t),weight:t.weight,fontSize:U.value}),void 0,!0,0):f(``,!0),Z(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:X(t),r:U.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,nt)):f(``,!0),Z(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+U.value/3,fill:C(ae)(X(t)),"text-anchor":`middle`,"font-size":U.value},S(C(re)(j.value.formatter,t.weight,C(c)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,rt)):f(``,!0)]))),256))])),(v(!0),p(l,null,b(L.value,(e,t)=>(v(),p(`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":z.value.id===e.id?`900`:`400`,style:_(`font-family:${M.value.fontFamily};${Yt(e)};cursor:${N.value?`pointer`:`default`}`),"font-size":G.value,fill:M.value.labels.color,"text-decoration":t===Q.value||t===D.value?`underline`:void 0,onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},[C(bt)?(v(),p(l,{key:0},[ke(`--------`)],64)):(v(),p(l,{key:1},[ke(S(e.label)+` (`+S(C(re)(j.value.formatter,e.totalWeight,C(c)({p:j.value.prefix,v:e.totalWeight,s:j.value.suffix,r:j.value.rounding}),{...e}))+`) `,1)],64))],44,it))),128)),(v(!0),p(l,null,b(L.value,(e,t)=>(v(),p(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:_(`${Gt(e)}; transition: r 0.2s ease-in-out; cursor:${N.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:M.value.plot.useSerieColor?e.color:M.value.plot.color,stroke:M.value.backgroundColor,"stroke-width":`1`,r:W.value*(t===Q.value||t===D.value?2:1),onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},null,44,at))),128)),x(e.$slots,`svg`,{svg:{...K.value,isPrintingImg:C(F)||C(I)||C(ln),isPrintingSvg:C(un)}},void 0,!0)],42,Ge)),e.$slots.hint?(v(),p(`div`,ot,[x(e.$slots,`hint`,g(h({hint:k.value.a11y.translations.keyboardNavigation,isVisible:O.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(v(),p(`div`,st,[x(e.$slots,`watermark`,g(h({isPrinting:C(F)||C(I)||C(ln)||C(un)})),void 0,!0)])):f(``,!0),e.$slots.source?(v(),p(`div`,{key:6,ref_key:`source`,ref:gt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),x(e.$slots,`skeleton`,{},()=>[C(bt)?(v(),d(Te,{key:0})):f(``,!0)],!0)],44,He))}},[[`__scopeId`,`data-v-dfb6df3b`]]);export{Ve as n,ct 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"./userOptionsSlots-CWtXN5Q6.js";import{n as ee,r as i,t as a}from"./annotationSlots-OLiW25XN.js";import{n as o,t as s}from"./tableIntegration-CNoJ1CIY.js";import{t as te}from"./chartImage-DPGnEuYM.js";import{n as ne}from"./resolveChartConfig-0IvbmIE_.js";import{$ as c,D as re,Ht as ie,J as ae,N as oe,P as se,S as ce,U as le,X as ue,Xt as de,at as fe,i as pe,in as me,nt as he,r as ge,t as _e,tt as ve,w as ye,xt as be,yt as xe,zt as Se}from"./lib-rPeBMZrn.js";import{c as Ce}from"./canvas-lib-22VpOI4_.js";import{n as we,t as Te}from"./useHints-C-TwxM0Y.js";import{t as Ee}from"./useConfig-B8qvYKdK.js";import{t as De}from"./useLoading-DoqqfnmS.js";import{t as Oe}from"./usePrinter-DVf3YcG5.js";import{t as ke}from"./useResponsive-CENUxfEL.js";import{t as Ae}from"./useTimeLabels-Das5O74F.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{t as Me}from"./useUserOptionState-CXlFnwPv.js";import{t as Ne}from"./useChartAccessibility-DOMuYJfm.js";import{t as Pe}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Fe}from"./vue_ui_ridgeline-Bea0vgUJ.js";import{t as Ie}from"./Legend-W9YVYVX-.js";import{n as Le}from"./Title-BliHuXfT.js";import{t as Re}from"./Shape-CRe8woTu.js";import{t as ze}from"./BaseScanner-m6QR9rwD.js";import{t as Be}from"./A11yDataTable-DWNlWXzs.js";import{t as Ve}from"./BaseLegendToggle-VzX69MCo.js";import{t as He}from"./DefGrad-DKMq1REY.js";import{t as Ue}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as h,guardReactiveProps as qe,mergeProps as Je,nextTick as Ye,normalizeClass as Xe,normalizeProps as Ze,normalizeStyle as g,onBeforeUnmount as Qe,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as $e,shallowRef as et,toDisplayString as x,toRefs as tt,unref as S,watch as nt,watchEffect as rt,withCtx as C}from"vue";var it=/* @__PURE__ */ e({default:()=>Dt}),at=[`id`],ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`aria-describedby`,`viewBox`],lt={key:0},ut=[`fill`,`d`],dt=[`stroke`,`stroke-width`,`d`],ft=[`fill`,`d`],pt=[`stroke`,`stroke-dasharray`,`stroke-width`,`d`],mt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],gt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`text-decoration`,`onMouseenter`,`onClick`],_t={key:0},vt=[`font-size`,`fill`,`stroke`,`font-weight`,`transform`,`text-anchor`],yt=[`font-size`,`fill`,`font-weight`,`transform`,`text-anchor`,`innerHTML`],bt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],St=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],Ct=[`x`,`y`,`stroke`,`text-anchor`,`font-size`,`fill`],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=[`onClick`],Dt=/*#__PURE__*/ Ue({__name:`vue-ui-ridgeline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`selectX`,`copyAlt`],setup(e,{expose:Ue,emit:it}){let Dt=h(()=>import(`./vue-ui-xy-Cwkavs_B.js`).then(e=>e.n)),Ot=h(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),kt=h(()=>import(`./vue-ui-accordion-BpTfjWvH.js`).then(e=>e.n)),At=h(()=>import(`./DataTable-KeuZB1JM.js`)),jt=h(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Mt=h(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Nt=h(()=>import(`./PackageVersion-DAF5ApGl.js`).then(e=>e.t)),Pt=h(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_ridgeline:Ft}=Ee(),w=e,It=u({get(){return Array.isArray(B.value)&&B.value.length>0},set(e){return e}}),Lt=it,T=v(null),Rt=v(null),zt=v(null),E=et(null),D=et(null),Bt=v(null),Vt=v(null),Ht=v(0),Ut=v(0),Wt=v(0),O=v(ue()),Gt=v(0),Kt=v(0),qt=v(512),k=v(null),A=v(null),Jt=v(null),Yt=v(0),Xt=v(null),Zt=v(null),Qt=v(null),j=v(null),$t=v(!1);function en(){return ne(w.config,Ft,Fe)}let M=v(en()),N=u(()=>M.value.userOptions),P=u(()=>M.value.style.chart.areas),F=u(()=>M.value.style.chart.selector),I=u(()=>M.value.style.chart.xAxis.labels),L=u(()=>M.value.style.chart.yAxis.labels),R=u(()=>M.value.style.chart);we({config:()=>M.value,dataset:()=>w.dataset,component:`VueUiRidgeline`,rules:[Te.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=u(()=>M.value.userOptions.useCursorPointer),tn=u(()=>me({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:nn,FINAL_DATASET:B,manualLoading:rn}=De({...tt(w),FINAL_CONFIG:M,prepareConfig:en,skeletonDataset:w.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:me({defaultConfig:M.value,userConfig:tn.value})}),V=v(Math.min(P.value.height,P.value.rowHeight)),{userOptionsVisible:an,setUserOptionsVisibility:on,keepUserOptionState:sn}=Me({config:M.value}),{svgRef:H}=Ne({config:R.value.title}),cn=u(()=>M.value.debug);function ln(){let e=B.value||[];if(!Array.isArray(e)||e.length===0)fe({componentName:`VueUiRidgeline`,type:`dataset`,debug:cn.value}),rn.value=!0;else if(e.forEach((e,t)=>{xe({datasetObject:e,requiredAttributes:[`name`,`datapoints`]}).forEach(e=>{It.value=!1,fe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:e,index:t,debug:cn.value})}),Array.isArray(e.datapoints)&&e.datapoints.length&&e.datapoints.forEach((e,n)=>{xe({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{It.value=!1,fe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:`datapoint.${e}`,index:`${t}-${n}`,debug:cn.value})})})}),Kt.value=e.length,V.value=Math.min(P.value.height,P.value.rowHeight),Se(w.dataset)||(rn.value=M.value.loading),M.value.responsive){let t=Ce(()=>{let{width:t,height:n}=ke({chart:T.value,title:R.value.title.text?Rt.value:null,legend:R.value.legend.show?zt.value:null,source:Bt.value,noTitle:Vt.value,padding:R.value.padding});requestAnimationFrame(()=>{qt.value=t,V.value=e.length?n/e.length:0,Yt.value=n-12})});E.value&&(D.value&&E.value.unobserve(D.value),E.value.disconnect()),E.value=new ResizeObserver(t),D.value=T.value?.parentNode||null,D.value&&E.value.observe(D.value)}}Qe(()=>{E.value&&(D.value&&E.value.unobserve(D.value),E.value.disconnect())});let{isPrinting:un,isImaging:dn,generatePdf:fn,generateImage:pn}=Oe({elementId:`vue-ui-ridgeline_${O.value}`,fileName:R.value.title.text||`vue-ui-ridgeline`,options:M.value.userOptions.print}),mn=u(()=>M.value.userOptions.show&&!R.value.title.text),hn=u(()=>ye(M.value.customPalette)),U=v({showTable:M.value.table.show});nt(()=>B.value,async e=>{Array.isArray(e)&&e.length&&(an.value=!M.value.userOptions.showOnChartHover,await Ye(),ln(),Ht.value+=1,Wt.value+=1,U.value.showTable=M.value.table.show)},{deep:!0,immediate:!0}),nt(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(rn.value=!1)},{deep:!0}),nt(()=>nn.value,async e=>{e||(await Ye(),ln())},{immediate:!0}),nt(()=>w.config,()=>{M.value=en(B.value||null),an.value=!M.value.userOptions.showOnChartHover,V.value=Math.min(P.value.height,P.value.rowHeight),U.value.showTable=M.value.table.show,Ht.value+=1,Wt.value+=1},{deep:!0});let gn=u(()=>P.value.height/P.value.rowHeight);function _n(){X.value.length?X.value=[]:Z.value.forEach(e=>{X.value.push(e.id)}),Lt(`selectLegend`,Y.value)}function vn(e){X.value.includes(e)?X.value=X.value.filter(t=>t!==e):X.value.push(e),Lt(`selectLegend`,Y.value)}function yn(e){return Z.value.length?Z.value.find(t=>t.name===e)||(cn.value&&console.warn(`VueUiRidgeline - Series name not found "${e}"`),null):(cn.value&&console.warn(`VueUiRidgeline - There are no series to show.`),null)}function bn(e){let t=yn(e);t!==null&&X.value.includes(t.id)&&vn(t.id)}function xn(e){let t=yn(e);t!==null&&(X.value.includes(t.id)||vn(t.id))}let W=u(()=>It.value?(B.value||[]).map(e=>({...e,labelLen:Fn(e.name,L.value.fontSize),uid:ue(),datapoints:e.datapoints.map((e,t)=>{let n=e.color?ce(e.color):hn.value[t]||ie[t]||ie[t%ie.length],r=de(e.name);return{...e,color:n,id:r}})})):[]),Sn=u(()=>R.value.padding.top+V.value*(B.value||[]).length+V.value*gn.value+R.value.padding.bottom),G=u(()=>{let e=R.value.padding;return{width:qt.value,height:Sn.value,padding:e}}),Cn=u(()=>G.value.width),wn=u(()=>G.value.height),Tn=v(0),En=Ce(e=>{Tn.value=e},100);rt(e=>{let t=Xt.value;if(!t)return;let n=new ResizeObserver(e=>{En(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Qe(()=>{Tn.value=0});let K=u(()=>({fullHeight:G.value.height+Tn.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)})),Dn=u(()=>Math.max(...W.value.flatMap(e=>e.datapoints.map(e=>e.values.length)))),q=v([]),On=0;rt(()=>{let e=++On;(async()=>{let t=await Ae({values:I.value.values,maxDatapoints:Dn.value,formatter:I.value.datetimeFormatter,start:0,end:I.value.values.length});e===On&&(q.value=t)})()});let J=u(()=>{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)/Dn.value,r=[];for(let e=0;e<Dn.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:Sn.value});return r});function kn(e){return W.value.map(t=>t.datapoints.map(t=>({dp:t,selected:t.values[e.index]})))}function An(e){k.value=e;let t=kn(e);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:e.index})}function jn(e){k.value=null;let t=kn(e);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:t,seriesIndex:e.index})}function Mn(e){let t=kn(e);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:e.index}),Lt(`selectX`,t)}function Nn(e,t){return e.length*t/2+t}function Pn(e,t,n){return e+Nn(t,n)>K.value.right}function Fn(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=u(()=>{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,ee=(K.value.width-r)/Dn.value,i=Math.abs(Math.min(n,0)),a=t+i;function o(e){return isNaN(e/a)?0:e/a}return W.value.map((e,t)=>{let n=V.value*gn.value*(1-o(i)),a=K.value.top+V.value*t,s=K.value.top+a+n;return{...e,label:{x:r-L.value.fontSize,y:(L.value.centered?s-n/2:s)+L.value.offsetY},datapoints:e.datapoints.map(e=>{let t=e.values.map((t,n)=>{let te=isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0;return{x:r+ee*n,y:K.value.top+a+V.value*gn.value*(1-o(te+i)),value:t,isMaxPoint:t===Math.max(...e.values),zero:s}}),n=`${oe(t,s,!1,!1)}`,te=`M ${r},${s} ${le(t)} ${t.at(-1).x},${s}`,ne=`M ${r},${s} ${t.at(-1).x},${s}`,c=`M ${se(t)}`,re=`M ${le(t)}`,ie=be(P.value.smooth?c:re);return{...e,uid:ue(),plots:t,smoothPath:n,straightPath:te,zeroPath:ne,pathLength:ie,smoothPathRidge:c,straightPathRidge:re}}).filter(e=>!X.value.includes(e.id))}})}),X=v([]);function In(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{e.datapoints.forEach((e,n)=>{let r=de(e.name);t.has(r)||t.set(r,{id:r,name:e.name,color:e.color,shape:`circle`,segregate:()=>vn(r),isSegregated:X.value.includes(r),opacity:X.value.includes(r)?.5:1})})}),Array.from(t.values())}let Z=u(()=>In(W.value)),Ln=u(()=>({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=v(!1);function Rn(e){Q.value=e,Gt.value+=1}let zn=v({}),Bn=v([]);function Vn(e){Lt(`selectDatapoint`,e),R.value.dialog.show&&(Bn.value=e.datapoints.map(e=>({name:e.name,color:e.color,type:`line`,useArea:!0,smooth:P.value.smooth,series:e.values})),A.value=e,zn.value=ve({...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}}}),Jt.value&&Jt.value.open())}let Hn=v(null);function Un(e){Hn.value=e}function Wn(){Hn.value=null}let Gn=v(!1);function Kn(){Gn.value=!Gn.value}function qn(){U.value.showTable=!U.value.showTable}let Jn=u(()=>({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])})),$=u(()=>{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:Jn.value.body,config:t}});function Yn(e=null){Ye(()=>{let t=[[M.value.table.columnNames.series,...q.map(e=>[e.text])],...Jn.value.body.map((e,t)=>[e[0].name,...e.slice(1)])],n=[[R.value.title.text],[R.value.title.subtitle.text]].concat(t),r=re(n);e?e(r):he({csvContent:r,title:R.value.title.text||`vue-ui-ridgeline`})})}function Xn(){return Y.value}let Zn=te(T,()=>R.value.title.text),Qn=u(()=>({min:0,max:Dn.value}));Pe({timeLabelsEls:Xt,timeLabels:q,slicer:Qn,configRef:M,rotationPath:[`style`,`chart`,`xAxis`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`xAxis`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Cn,height:wn,targetClass:`.vue-ui-ridgeline-x-axis-label`,angle:I.value.autoRotate.angle});let $n=u(()=>s({config:M,style:R,mutableConfig:U,dialog:Pt,accordion:kt,isFullscreen:Q,parent:T,maxWidth:800,isCursorPointer:z}));nt(()=>U.value.showTable,e=>o(e,M,Zt));function er(){U.value.showTable=!1,Qt.value&&Qt.value.setTableIconState(!1)}let tr=u(()=>R.value.backgroundColor),nr=u(()=>({...R.value.legend,position:`bottom`})),rr=u(()=>R.value.title),{isCallbackImaging:ir,isCallbackSvg:ar,generateSvg:or,onGenerateImage:sr}=je({svg:H,title:rr,legend:nr,legendItems:Z,backgroundColor:tr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:pn});function cr(e){lr(`xy-zoom`,e.dataset,e.config)}async function lr(e=`main-chart`,t=null,n=null){Lt(`copyAlt`,{source:e,config:e===`main-chart`?M.value:zn.value,dataset:e===`main-chart`?Y.value:Bn.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({source:e,config:e===`main-chart`?M.value:zn.value,dataset:e===`main-chart`?Y.value:Bn.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ur(){j.value=null,$t.value=!0}function dr(){hr(),$t.value=!1}function fr(e){if(!H.value||Gn.value||document.activeElement!==H.value||!Y.value.length)return;let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,ee=e.key===`ArrowRight`,i=e.key===`Enter`||e.key===` `,a=e.key===`Escape`;if(!t&&!n&&!r&&!ee&&!i&&!a)return;if(e.preventDefault(),e.stopPropagation(),a){hr();return}if(i){if(j.value!==null){let e=Y.value[j.value];e&&Vn(e);return}k.value&&Mn(k.value);return}if(t||n){let e=j.value;e=e===null?n?0:Y.value.length-1:pr(e+(n?1:-1)),j.value=e,Hn.value=e;return}if(!J.value.length)return;let o=k.value?.index??null;o=o===null?ee?0:J.value.length-1:mr(o+(ee?1:-1));let s=J.value[o];s&&An(s)}function pr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function mr(e){let t=J.value.length;return t?(e%t+t)%t:null}function hr(){j.value=null,Hn.value=null,k.value?jn(k.value):k.value=null}let gr=u(()=>({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 Ue({getData:Xn,getImage:Zn,generateImage:pn,generateSvg:or,generatePdf:fn,generateCsv:Yn,hideSeries:xn,showSeries:bn,toggleAnnotator:Kn,toggleTable:qn,toggleFullscreen:Rn,copyAlt:lr}),(e,o)=>(_(),p(`div`,{ref_key:`ridgelineChart`,ref:T,class:Xe(`vue-data-ui-component vue-ui-ridgeline ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),id:`vue-ui-ridgeline_${O.value}`,style:g({fontFamily:M.value.style.fontFamily,width:`100%`,textAlign:`center`,background:R.value.backgroundColor,height:M.value.responsive?`100%`:void 0}),onMouseenter:o[3]||=()=>S(on)(!0),onMouseleave:o[4]||=()=>S(on)(!1)},[m(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[m(`p`,null,x(M.value.a11y.translations.keyboardNavigation),1)],8,ot),M.value.a11y.includeTable&&gr.value.body.length?(_(),d(Be,{key:0,uid:O.value,head:gr.value.head,body:gr.value.body,caption:gr.value.caption,notice:gr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):f(``,!0),N.value.buttons.annotator&&S(H)?(_(),d(S(jt),Je({key:1},S(i)(N.value.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Gn.value,svgRef:S(H),isCursorPointer:z.value,onClose:Kn}),We({_:2},[y(S(a),t=>({name:t,fn:C(n=>[b(e.$slots,t,Ze(qe(S(ee)(t,n))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`])):f(``,!0),b(e.$slots,`userConfig`,{},void 0,!0),mn.value?(_(),p(`div`,{key:2,ref_key:`noTitle`,ref:Vt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),R.value.title.text?(_(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Rt,style:`width:100%;background:transparent;padding-bottom:24px`},[(_(),d(Le,{key:`title_${Ht.value}`,config:{title:{cy:`ridgeline-div-title`,...R.value.title},subtitle:{cy:`ridgeline-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),N.value.show&&It.value&&(S(sn)||S(an))?(_(),d(S(Mt),Je({ref_key:`userOptionsRef`,ref:Qt,key:`user_option_${Gt.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:S(un),isImaging:S(dn),uid:O.value,hasTooltip:!1,hasLabel:!1,isFullscreen:Q.value,chartElement:T.value},S(n)(N.value,`pdf csv img svg table fullscreen altCopy annotator`),{isTooltip:!1,isAnnotation:Gn.value,tableDialog:M.value.table.useDialog,style:{visibility:S(sn)?S(an)?`visible`:`hidden`:`visible`},isCursorPointer:z.value,onToggleFullscreen:Rn,onGeneratePdf:S(fn),onGenerateCsv:Yn,onGenerateImage:S(sr),onGenerateSvg:S(or),onToggleTable:qn,onToggleAnnotator:Kn,onCopyAlt:lr}),We({_:2},[y(S(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,Ze(qe(S(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`style`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`])):f(``,!0),m(`div`,st,[(_(),p(`svg`,{ref_key:`svgRef`,ref:H,xmlns:S(_e),"aria-describedby":`chart-instructions-${O.value}`,class:Xe({"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:g(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color};${M.value.responsive?`height: ${Yt.value}px; width: 100%;`:``}`),tabindex:`0`,onFocus:ur,onBlur:dr,onKeydown:fr},[Ke(S(Nt)),b(e.$slots,`svg-underlayer`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:S(un)||S(dn)||S(ir),isPrintingSvg:S(ar),data:Y.value}},void 0,!0),m(`defs`,null,[(_(!0),p(l,null,y(Z.value,(e,t)=>(_(),d(He,{t:`linear`,id:`gradient-${e.id}-${O.value}`,key:`gradient-${e.id}-${O.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)),(_(!0),p(l,null,y(Y.value,(e,t)=>(_(),p(l,null,[(_(!0),p(l,null,y(e.datapoints,(e,t)=>(_(),d(He,{t:`linear`,key:`grad${e.id}`,id:`gradient-single-${O.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))]),(_(!0),p(l,null,y(Y.value,(t,n)=>(_(),p(`g`,{key:`ds-${n}`},[(_(!0),p(l,null,y(t.datapoints,(t,r)=>(_(),p(`g`,{key:t.id},[e.$slots.pattern?(_(),p(`g`,lt,[m(`defs`,null,[b(e.$slots,`pattern`,Je({ref_for:!0},{datapointIndex:n,seriesIndex:r,patternId:`pattern_${O.value}_${t.uid}`}),void 0,!0)])])):f(``,!0),m(`path`,{fill:e.$slots.pattern?`url(#pattern_${O.value}_${t.uid})`:R.value.backgroundColor,stroke:`none`,"stroke-linecap":`round`,d:P.value.smooth?t.smoothPath:t.straightPath,style:g({opacity:P.value.opacity})},null,12,ut),m(`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:g({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,dt),m(`path`,{fill:P.value.useGradient?P.value.useCommonColor?`url(#gradient-${t.id}-${O.value})`:`url(#gradient-single-${O.value}-${t.uid})`:t.color,stroke:`none`,d:P.value.smooth?t.smoothPath:t.straightPath,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:g({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,ft),R.value.zeroLine.show?(_(),p(`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,pt)):f(``,!0),P.value.maxPoint.show&&t.plots.length>1?(_(!0),p(l,{key:2},y(t.plots,e=>(_(),p(l,null,[e.isMaxPoint?(_(),p(`line`,{key:0,x1:e.x,y1:e.y,x2:e.x,y2:e.zero,stroke:P.value.maxPoint.adaptStrokeToBackground?S(ge)(t.color):P.value.maxPoint.stroke,"stroke-width":P.value.maxPoint.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":P.value.maxPoint.strokeDasharray},null,8,mt)):f(``,!0)],64))),256)):f(``,!0),t.plots.length===1?(_(),p(`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,ht)):f(``,!0)]))),128)),m(`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:g({cursor:R.value.dialog.show&&z.value?`pointer`:`default`}),"text-decoration":R.value.dialog.show&&(Hn.value===n||A.value&&t.uid===A.value.uid||j.value===n)?`underline`:``,"dominant-baseline":`middle`,onMouseenter:e=>Un(n),onMouseleave:Wn,onClick:e=>Vn(t)},x(t.name),45,gt)]))),128)),I.value.values.length?(_(),p(`g`,{key:0,ref_key:`timeLabelsEls`,ref:Xt},[(_(!0),p(l,null,y(J.value,(t,n)=>b(e.$slots,`time-label`,Je({ref_for:!0},{show:t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&k.value&&k.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&&k.value&&k.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0?(_(),p(`g`,_t,[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"./userOptionsSlots-CWtXN5Q6.js";import{n as ee,r as i,t as a}from"./annotationSlots-OLiW25XN.js";import{n as o,t as s}from"./tableIntegration-CNoJ1CIY.js";import{t as te}from"./chartImage-Dvrx_F7P.js";import{n as ne}from"./resolveChartConfig-QgMumfgd.js";import{$ as c,D as re,Ht as ie,J as ae,N as oe,P as se,S as ce,U as le,X as ue,Xt as de,at as fe,i as pe,in as me,nt as he,r as ge,t as _e,tt as ve,w as ye,xt as be,yt as xe,zt as Se}from"./lib-BaWaqwnJ.js";import{c as Ce}from"./canvas-lib-22VpOI4_.js";import{n as we,t as Te}from"./useHints-C-TwxM0Y.js";import{t as Ee}from"./useConfig-B-AzS3w-.js";import{t as De}from"./useLoading-DoqqfnmS.js";import{t as Oe}from"./usePrinter-CUD8gosC.js";import{t as ke}from"./useResponsive-CENUxfEL.js";import{t as Ae}from"./useTimeLabels-Das5O74F.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{t as Me}from"./useUserOptionState-CXlFnwPv.js";import{t as Ne}from"./useChartAccessibility-DOMuYJfm.js";import{t as Pe}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Fe}from"./vue_ui_ridgeline-Bea0vgUJ.js";import{t as Ie}from"./Legend-D5I3jeGD.js";import{n as Le}from"./Title-DlhGIAWX.js";import{t as Re}from"./Shape-DgpYvQc4.js";import{t as ze}from"./BaseScanner-m6QR9rwD.js";import{t as Be}from"./A11yDataTable-DWNlWXzs.js";import{t as Ve}from"./BaseLegendToggle-CnQ_U5rI.js";import{t as He}from"./DefGrad-DKMq1REY.js";import{t as Ue}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as h,guardReactiveProps as qe,mergeProps as Je,nextTick as Ye,normalizeClass as Xe,normalizeProps as Ze,normalizeStyle as g,onBeforeUnmount as Qe,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as $e,shallowRef as et,toDisplayString as x,toRefs as tt,unref as S,watch as nt,watchEffect as rt,withCtx as C}from"vue";var it=/* @__PURE__ */ e({default:()=>Dt}),at=[`id`],ot=[`id`],st={style:{position:`relative`}},ct=[`xmlns`,`aria-describedby`,`viewBox`],lt={key:0},ut=[`fill`,`d`],dt=[`stroke`,`stroke-width`,`d`],ft=[`fill`,`d`],pt=[`stroke`,`stroke-dasharray`,`stroke-width`,`d`],mt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],gt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`text-decoration`,`onMouseenter`,`onClick`],_t={key:0},vt=[`font-size`,`fill`,`stroke`,`font-weight`,`transform`,`text-anchor`],yt=[`font-size`,`fill`,`font-weight`,`transform`,`text-anchor`,`innerHTML`],bt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],St=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],Ct=[`x`,`y`,`stroke`,`text-anchor`,`font-size`,`fill`],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=[`onClick`],Dt=/*#__PURE__*/ Ue({__name:`vue-ui-ridgeline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`selectX`,`copyAlt`],setup(e,{expose:Ue,emit:it}){let Dt=h(()=>import(`./vue-ui-xy-ZTbijg4Q.js`).then(e=>e.n)),Ot=h(()=>import(`./BaseIcon-CQFjKDhE.js`).then(e=>e.n)),kt=h(()=>import(`./vue-ui-accordion-B8LYfVG9.js`).then(e=>e.n)),At=h(()=>import(`./DataTable-BHW5xD9B.js`)),jt=h(()=>import(`./PenAndPaper-B2UOwiJM.js`).then(e=>e.t)),Mt=h(()=>import(`./UserOptions-B97cPcKc.js`).then(e=>e.n)),Nt=h(()=>import(`./PackageVersion-B-1JX0wI.js`).then(e=>e.t)),Pt=h(()=>import(`./BaseDraggableDialog-MyWIeEtr.js`).then(e=>e.n)),{vue_ui_ridgeline:Ft}=Ee(),w=e,It=u({get(){return Array.isArray(B.value)&&B.value.length>0},set(e){return e}}),Lt=it,T=v(null),Rt=v(null),zt=v(null),E=et(null),D=et(null),Bt=v(null),Vt=v(null),Ht=v(0),Ut=v(0),Wt=v(0),O=v(ue()),Gt=v(0),Kt=v(0),qt=v(512),k=v(null),A=v(null),Jt=v(null),Yt=v(0),Xt=v(null),Zt=v(null),Qt=v(null),j=v(null),$t=v(!1);function en(){return ne(w.config,Ft,Fe)}let M=v(en()),N=u(()=>M.value.userOptions),P=u(()=>M.value.style.chart.areas),F=u(()=>M.value.style.chart.selector),I=u(()=>M.value.style.chart.xAxis.labels),L=u(()=>M.value.style.chart.yAxis.labels),R=u(()=>M.value.style.chart);we({config:()=>M.value,dataset:()=>w.dataset,component:`VueUiRidgeline`,rules:[Te.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=u(()=>M.value.userOptions.useCursorPointer),tn=u(()=>me({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:nn,FINAL_DATASET:B,manualLoading:rn}=De({...tt(w),FINAL_CONFIG:M,prepareConfig:en,skeletonDataset:w.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:me({defaultConfig:M.value,userConfig:tn.value})}),V=v(Math.min(P.value.height,P.value.rowHeight)),{userOptionsVisible:an,setUserOptionsVisibility:on,keepUserOptionState:sn}=Me({config:M.value}),{svgRef:H}=Ne({config:R.value.title}),cn=u(()=>M.value.debug);function ln(){let e=B.value||[];if(!Array.isArray(e)||e.length===0)fe({componentName:`VueUiRidgeline`,type:`dataset`,debug:cn.value}),rn.value=!0;else if(e.forEach((e,t)=>{xe({datasetObject:e,requiredAttributes:[`name`,`datapoints`]}).forEach(e=>{It.value=!1,fe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:e,index:t,debug:cn.value})}),Array.isArray(e.datapoints)&&e.datapoints.length&&e.datapoints.forEach((e,n)=>{xe({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{It.value=!1,fe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:`datapoint.${e}`,index:`${t}-${n}`,debug:cn.value})})})}),Kt.value=e.length,V.value=Math.min(P.value.height,P.value.rowHeight),Se(w.dataset)||(rn.value=M.value.loading),M.value.responsive){let t=Ce(()=>{let{width:t,height:n}=ke({chart:T.value,title:R.value.title.text?Rt.value:null,legend:R.value.legend.show?zt.value:null,source:Bt.value,noTitle:Vt.value,padding:R.value.padding});requestAnimationFrame(()=>{qt.value=t,V.value=e.length?n/e.length:0,Yt.value=n-12})});E.value&&(D.value&&E.value.unobserve(D.value),E.value.disconnect()),E.value=new ResizeObserver(t),D.value=T.value?.parentNode||null,D.value&&E.value.observe(D.value)}}Qe(()=>{E.value&&(D.value&&E.value.unobserve(D.value),E.value.disconnect())});let{isPrinting:un,isImaging:dn,generatePdf:fn,generateImage:pn}=Oe({elementId:`vue-ui-ridgeline_${O.value}`,fileName:R.value.title.text||`vue-ui-ridgeline`,options:M.value.userOptions.print}),mn=u(()=>M.value.userOptions.show&&!R.value.title.text),hn=u(()=>ye(M.value.customPalette)),U=v({showTable:M.value.table.show});nt(()=>B.value,async e=>{Array.isArray(e)&&e.length&&(an.value=!M.value.userOptions.showOnChartHover,await Ye(),ln(),Ht.value+=1,Wt.value+=1,U.value.showTable=M.value.table.show)},{deep:!0,immediate:!0}),nt(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(rn.value=!1)},{deep:!0}),nt(()=>nn.value,async e=>{e||(await Ye(),ln())},{immediate:!0}),nt(()=>w.config,()=>{M.value=en(B.value||null),an.value=!M.value.userOptions.showOnChartHover,V.value=Math.min(P.value.height,P.value.rowHeight),U.value.showTable=M.value.table.show,Ht.value+=1,Wt.value+=1},{deep:!0});let gn=u(()=>P.value.height/P.value.rowHeight);function _n(){X.value.length?X.value=[]:Z.value.forEach(e=>{X.value.push(e.id)}),Lt(`selectLegend`,Y.value)}function vn(e){X.value.includes(e)?X.value=X.value.filter(t=>t!==e):X.value.push(e),Lt(`selectLegend`,Y.value)}function yn(e){return Z.value.length?Z.value.find(t=>t.name===e)||(cn.value&&console.warn(`VueUiRidgeline - Series name not found "${e}"`),null):(cn.value&&console.warn(`VueUiRidgeline - There are no series to show.`),null)}function bn(e){let t=yn(e);t!==null&&X.value.includes(t.id)&&vn(t.id)}function xn(e){let t=yn(e);t!==null&&(X.value.includes(t.id)||vn(t.id))}let W=u(()=>It.value?(B.value||[]).map(e=>({...e,labelLen:Fn(e.name,L.value.fontSize),uid:ue(),datapoints:e.datapoints.map((e,t)=>{let n=e.color?ce(e.color):hn.value[t]||ie[t]||ie[t%ie.length],r=de(e.name);return{...e,color:n,id:r}})})):[]),Sn=u(()=>R.value.padding.top+V.value*(B.value||[]).length+V.value*gn.value+R.value.padding.bottom),G=u(()=>{let e=R.value.padding;return{width:qt.value,height:Sn.value,padding:e}}),Cn=u(()=>G.value.width),wn=u(()=>G.value.height),Tn=v(0),En=Ce(e=>{Tn.value=e},100);rt(e=>{let t=Xt.value;if(!t)return;let n=new ResizeObserver(e=>{En(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Qe(()=>{Tn.value=0});let K=u(()=>({fullHeight:G.value.height+Tn.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)})),Dn=u(()=>Math.max(...W.value.flatMap(e=>e.datapoints.map(e=>e.values.length)))),q=v([]),On=0;rt(()=>{let e=++On;(async()=>{let t=await Ae({values:I.value.values,maxDatapoints:Dn.value,formatter:I.value.datetimeFormatter,start:0,end:I.value.values.length});e===On&&(q.value=t)})()});let J=u(()=>{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)/Dn.value,r=[];for(let e=0;e<Dn.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:Sn.value});return r});function kn(e){return W.value.map(t=>t.datapoints.map(t=>({dp:t,selected:t.values[e.index]})))}function An(e){k.value=e;let t=kn(e);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:e.index})}function jn(e){k.value=null;let t=kn(e);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:t,seriesIndex:e.index})}function Mn(e){let t=kn(e);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:e.index}),Lt(`selectX`,t)}function Nn(e,t){return e.length*t/2+t}function Pn(e,t,n){return e+Nn(t,n)>K.value.right}function Fn(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=u(()=>{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,ee=(K.value.width-r)/Dn.value,i=Math.abs(Math.min(n,0)),a=t+i;function o(e){return isNaN(e/a)?0:e/a}return W.value.map((e,t)=>{let n=V.value*gn.value*(1-o(i)),a=K.value.top+V.value*t,s=K.value.top+a+n;return{...e,label:{x:r-L.value.fontSize,y:(L.value.centered?s-n/2:s)+L.value.offsetY},datapoints:e.datapoints.map(e=>{let t=e.values.map((t,n)=>{let te=isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0;return{x:r+ee*n,y:K.value.top+a+V.value*gn.value*(1-o(te+i)),value:t,isMaxPoint:t===Math.max(...e.values),zero:s}}),n=`${oe(t,s,!1,!1)}`,te=`M ${r},${s} ${le(t)} ${t.at(-1).x},${s}`,ne=`M ${r},${s} ${t.at(-1).x},${s}`,c=`M ${se(t)}`,re=`M ${le(t)}`,ie=be(P.value.smooth?c:re);return{...e,uid:ue(),plots:t,smoothPath:n,straightPath:te,zeroPath:ne,pathLength:ie,smoothPathRidge:c,straightPathRidge:re}}).filter(e=>!X.value.includes(e.id))}})}),X=v([]);function In(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{e.datapoints.forEach((e,n)=>{let r=de(e.name);t.has(r)||t.set(r,{id:r,name:e.name,color:e.color,shape:`circle`,segregate:()=>vn(r),isSegregated:X.value.includes(r),opacity:X.value.includes(r)?.5:1})})}),Array.from(t.values())}let Z=u(()=>In(W.value)),Ln=u(()=>({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=v(!1);function Rn(e){Q.value=e,Gt.value+=1}let zn=v({}),Bn=v([]);function Vn(e){Lt(`selectDatapoint`,e),R.value.dialog.show&&(Bn.value=e.datapoints.map(e=>({name:e.name,color:e.color,type:`line`,useArea:!0,smooth:P.value.smooth,series:e.values})),A.value=e,zn.value=ve({...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}}}),Jt.value&&Jt.value.open())}let Hn=v(null);function Un(e){Hn.value=e}function Wn(){Hn.value=null}let Gn=v(!1);function Kn(){Gn.value=!Gn.value}function qn(){U.value.showTable=!U.value.showTable}let Jn=u(()=>({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])})),$=u(()=>{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:Jn.value.body,config:t}});function Yn(e=null){Ye(()=>{let t=[[M.value.table.columnNames.series,...q.map(e=>[e.text])],...Jn.value.body.map((e,t)=>[e[0].name,...e.slice(1)])],n=[[R.value.title.text],[R.value.title.subtitle.text]].concat(t),r=re(n);e?e(r):he({csvContent:r,title:R.value.title.text||`vue-ui-ridgeline`})})}function Xn(){return Y.value}let Zn=te(T,()=>R.value.title.text),Qn=u(()=>({min:0,max:Dn.value}));Pe({timeLabelsEls:Xt,timeLabels:q,slicer:Qn,configRef:M,rotationPath:[`style`,`chart`,`xAxis`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`xAxis`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Cn,height:wn,targetClass:`.vue-ui-ridgeline-x-axis-label`,angle:I.value.autoRotate.angle});let $n=u(()=>s({config:M,style:R,mutableConfig:U,dialog:Pt,accordion:kt,isFullscreen:Q,parent:T,maxWidth:800,isCursorPointer:z}));nt(()=>U.value.showTable,e=>o(e,M,Zt));function er(){U.value.showTable=!1,Qt.value&&Qt.value.setTableIconState(!1)}let tr=u(()=>R.value.backgroundColor),nr=u(()=>({...R.value.legend,position:`bottom`})),rr=u(()=>R.value.title),{isCallbackImaging:ir,isCallbackSvg:ar,generateSvg:or,onGenerateImage:sr}=je({svg:H,title:rr,legend:nr,legendItems:Z,backgroundColor:tr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:pn});function cr(e){lr(`xy-zoom`,e.dataset,e.config)}async function lr(e=`main-chart`,t=null,n=null){Lt(`copyAlt`,{source:e,config:e===`main-chart`?M.value:zn.value,dataset:e===`main-chart`?Y.value:Bn.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({source:e,config:e===`main-chart`?M.value:zn.value,dataset:e===`main-chart`?Y.value:Bn.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ur(){j.value=null,$t.value=!0}function dr(){hr(),$t.value=!1}function fr(e){if(!H.value||Gn.value||document.activeElement!==H.value||!Y.value.length)return;let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,ee=e.key===`ArrowRight`,i=e.key===`Enter`||e.key===` `,a=e.key===`Escape`;if(!t&&!n&&!r&&!ee&&!i&&!a)return;if(e.preventDefault(),e.stopPropagation(),a){hr();return}if(i){if(j.value!==null){let e=Y.value[j.value];e&&Vn(e);return}k.value&&Mn(k.value);return}if(t||n){let e=j.value;e=e===null?n?0:Y.value.length-1:pr(e+(n?1:-1)),j.value=e,Hn.value=e;return}if(!J.value.length)return;let o=k.value?.index??null;o=o===null?ee?0:J.value.length-1:mr(o+(ee?1:-1));let s=J.value[o];s&&An(s)}function pr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function mr(e){let t=J.value.length;return t?(e%t+t)%t:null}function hr(){j.value=null,Hn.value=null,k.value?jn(k.value):k.value=null}let gr=u(()=>({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 Ue({getData:Xn,getImage:Zn,generateImage:pn,generateSvg:or,generatePdf:fn,generateCsv:Yn,hideSeries:xn,showSeries:bn,toggleAnnotator:Kn,toggleTable:qn,toggleFullscreen:Rn,copyAlt:lr}),(e,o)=>(_(),p(`div`,{ref_key:`ridgelineChart`,ref:T,class:Xe(`vue-data-ui-component vue-ui-ridgeline ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),id:`vue-ui-ridgeline_${O.value}`,style:g({fontFamily:M.value.style.fontFamily,width:`100%`,textAlign:`center`,background:R.value.backgroundColor,height:M.value.responsive?`100%`:void 0}),onMouseenter:o[3]||=()=>S(on)(!0),onMouseleave:o[4]||=()=>S(on)(!1)},[m(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[m(`p`,null,x(M.value.a11y.translations.keyboardNavigation),1)],8,ot),M.value.a11y.includeTable&&gr.value.body.length?(_(),d(Be,{key:0,uid:O.value,head:gr.value.head,body:gr.value.body,caption:gr.value.caption,notice:gr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):f(``,!0),N.value.buttons.annotator&&S(H)?(_(),d(S(jt),Je({key:1},S(i)(N.value.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Gn.value,svgRef:S(H),isCursorPointer:z.value,onClose:Kn}),We({_:2},[y(S(a),t=>({name:t,fn:C(n=>[b(e.$slots,t,Ze(qe(S(ee)(t,n))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`])):f(``,!0),b(e.$slots,`userConfig`,{},void 0,!0),mn.value?(_(),p(`div`,{key:2,ref_key:`noTitle`,ref:Vt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),R.value.title.text?(_(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Rt,style:`width:100%;background:transparent;padding-bottom:24px`},[(_(),d(Le,{key:`title_${Ht.value}`,config:{title:{cy:`ridgeline-div-title`,...R.value.title},subtitle:{cy:`ridgeline-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),N.value.show&&It.value&&(S(sn)||S(an))?(_(),d(S(Mt),Je({ref_key:`userOptionsRef`,ref:Qt,key:`user_option_${Gt.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:S(un),isImaging:S(dn),uid:O.value,hasTooltip:!1,hasLabel:!1,isFullscreen:Q.value,chartElement:T.value},S(n)(N.value,`pdf csv img svg table fullscreen altCopy annotator`),{isTooltip:!1,isAnnotation:Gn.value,tableDialog:M.value.table.useDialog,style:{visibility:S(sn)?S(an)?`visible`:`hidden`:`visible`},isCursorPointer:z.value,onToggleFullscreen:Rn,onGeneratePdf:S(fn),onGenerateCsv:Yn,onGenerateImage:S(sr),onGenerateSvg:S(or),onToggleTable:qn,onToggleAnnotator:Kn,onCopyAlt:lr}),We({_:2},[y(S(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,Ze(qe(S(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`style`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`])):f(``,!0),m(`div`,st,[(_(),p(`svg`,{ref_key:`svgRef`,ref:H,xmlns:S(_e),"aria-describedby":`chart-instructions-${O.value}`,class:Xe({"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:g(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color};${M.value.responsive?`height: ${Yt.value}px; width: 100%;`:``}`),tabindex:`0`,onFocus:ur,onBlur:dr,onKeydown:fr},[Ke(S(Nt)),b(e.$slots,`svg-underlayer`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:S(un)||S(dn)||S(ir),isPrintingSvg:S(ar),data:Y.value}},void 0,!0),m(`defs`,null,[(_(!0),p(l,null,y(Z.value,(e,t)=>(_(),d(He,{t:`linear`,id:`gradient-${e.id}-${O.value}`,key:`gradient-${e.id}-${O.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)),(_(!0),p(l,null,y(Y.value,(e,t)=>(_(),p(l,null,[(_(!0),p(l,null,y(e.datapoints,(e,t)=>(_(),d(He,{t:`linear`,key:`grad${e.id}`,id:`gradient-single-${O.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))]),(_(!0),p(l,null,y(Y.value,(t,n)=>(_(),p(`g`,{key:`ds-${n}`},[(_(!0),p(l,null,y(t.datapoints,(t,r)=>(_(),p(`g`,{key:t.id},[e.$slots.pattern?(_(),p(`g`,lt,[m(`defs`,null,[b(e.$slots,`pattern`,Je({ref_for:!0},{datapointIndex:n,seriesIndex:r,patternId:`pattern_${O.value}_${t.uid}`}),void 0,!0)])])):f(``,!0),m(`path`,{fill:e.$slots.pattern?`url(#pattern_${O.value}_${t.uid})`:R.value.backgroundColor,stroke:`none`,"stroke-linecap":`round`,d:P.value.smooth?t.smoothPath:t.straightPath,style:g({opacity:P.value.opacity})},null,12,ut),m(`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:g({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,dt),m(`path`,{fill:P.value.useGradient?P.value.useCommonColor?`url(#gradient-${t.id}-${O.value})`:`url(#gradient-single-${O.value}-${t.uid})`:t.color,stroke:`none`,d:P.value.smooth?t.smoothPath:t.straightPath,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:g({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,ft),R.value.zeroLine.show?(_(),p(`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,pt)):f(``,!0),P.value.maxPoint.show&&t.plots.length>1?(_(!0),p(l,{key:2},y(t.plots,e=>(_(),p(l,null,[e.isMaxPoint?(_(),p(`line`,{key:0,x1:e.x,y1:e.y,x2:e.x,y2:e.zero,stroke:P.value.maxPoint.adaptStrokeToBackground?S(ge)(t.color):P.value.maxPoint.stroke,"stroke-width":P.value.maxPoint.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":P.value.maxPoint.strokeDasharray},null,8,mt)):f(``,!0)],64))),256)):f(``,!0),t.plots.length===1?(_(),p(`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,ht)):f(``,!0)]))),128)),m(`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:g({cursor:R.value.dialog.show&&z.value?`pointer`:`default`}),"text-decoration":R.value.dialog.show&&(Hn.value===n||A.value&&t.uid===A.value.uid||j.value===n)?`underline`:``,"dominant-baseline":`middle`,onMouseenter:e=>Un(n),onMouseleave:Wn,onClick:e=>Vn(t)},x(t.name),45,gt)]))),128)),I.value.values.length?(_(),p(`g`,{key:0,ref_key:`timeLabelsEls`,ref:Xt},[(_(!0),p(l,null,y(J.value,(t,n)=>b(e.$slots,`time-label`,Je({ref_for:!0},{show:t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&k.value&&k.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&&k.value&&k.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0?(_(),p(`g`,_t,[String(t.label).includes(`
2
2
  `)?(_(),p(`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:g({opacity:k.value?k.value.index===n?1:.2:1}),innerHTML:S(ae)({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,yt)):(_(),p(`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:g({opacity:k.value?k.value.index===n?1:.2:1})},x(t.label),13,vt))])):f(``,!0)],!0)),256))],512)):f(``,!0),m(`g`,null,[(_(!0),p(l,null,y(J.value,(e,t)=>(_(),p(`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=>An(e),onMouseleave:t=>jn(e),onClick:()=>Mn(e)},null,40,bt))),256)),F.value.show&&k.value?(_(),p(`line`,{key:0,x1:k.value.selectorX,x2:k.value.selectorX,y1:k.value.y,y2:k.value.y+k.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,xt)):f(``,!0),k.value||F.value.labels.showLast?(_(!0),p(l,{key:1},y(Y.value,e=>(_(),p(l,null,[(_(!0),p(l,null,y(e.datapoints,e=>(_(),p(l,null,[(_(!0),p(l,null,y(e.plots,(t,n)=>(_(),p(l,null,[k.value&&k.value.index===n||!k.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(_(),p(`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,St)):f(``,!0),k.value&&k.value.index===n||!k.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(_(),p(`text`,{key:1,x:Pn(t.x,S(pe)(R.value.selector.labels.formatter,t.value,S(c)({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":Pn(t.x,S(pe)(R.value.selector.labels.formatter,t.value,S(c)({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`}},x(S(pe)(R.value.selector.labels.formatter,t.value,S(c)({p:R.value.xAxis.labels.prefix,v:t.value,s:R.value.xAxis.labels.suffix,r:R.value.selector.labels.rounding}))),9,Ct)):f(``,!0)],64))),256))],64))),256))],64))),256)):f(``,!0)]),b(e.$slots,`svg`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:S(un)||S(dn)||S(ir),isPrintingSvg:S(ar),data:Y.value}},void 0,!0)],46,ct)),e.$slots.hint?(_(),p(`div`,wt,[b(e.$slots,`hint`,Ze(qe({hint:M.value.a11y.translations.keyboardNavigation,isVisible:$t.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(_(),p(`div`,Tt,[b(e.$slots,`watermark`,Ze(qe({isPrinting:S(un)||S(dn)||S(ir)||S(ar)})),void 0,!0)])):f(``,!0),m(`div`,{ref_key:`chartLegend`,ref:zt},[b(e.$slots,`legend`,{legend:Z.value},()=>[R.value.legend.show?(_(),d(Ie,{key:`legend_${Wt.value}`,legendSet:Z.value,config:Ln.value,isCursorPointer:z.value,onClickMarker:o[0]||=({legend:e})=>vn(e.id)},We({item:C(({legend:e})=>[S(nn)?f(``,!0):(_(),p(`div`,{key:0,style:g(`opacity:${X.value.includes(e.id)?.5:1}`),onClick:t=>e.segregate()},x(e.name),13,Et))]),legendToggle:C(()=>[Z.value.length>2&&R.value.legend.selectAllToggle.show&&!S(nn)?(_(),d(Ve,{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:_n},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):f(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:C(({legend:e,index:t})=>[Ke(Re,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${O.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):f(``,!0)],!0)],512),e.$slots.source?(_(),p(`div`,{key:6,ref_key:`source`,ref:Bt,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),It.value&&N.value.buttons.table?(_(),d($e($n.value.component),Je({key:7},$n.value.props,{ref_key:`tableUnit`,ref:Zt,onClose:er}),We({content:C(()=>[(_(),d(S(At),{key:`table_${Ut.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:M.value.table.useDialog?``:$n.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:z.value,onClose:er},{th:C(({th:e})=>[m(`div`,null,x(e),1)]),td:C(({td:e})=>[Ge(x(e.name?e.name:S(pe)(F.value.labels.formatter,e,S(c)({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:C(()=>[Ge(x($n.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:C(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:o[1]||=e=>Yn(N.value.callbacks.csv),style:g({cursor:z.value?`pointer`:`default`})},[Ke(S(Ot),{name:`fileCsv`,stroke:$n.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),R.value.dialog.show?(_(),d(S(Pt),{key:8,ref_key:`dialog`,ref:Jt,onClose:o[2]||=e=>A.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:T.value,isCursorPointer:z.value,withPadding:``},{title:C(()=>[Ge(x(A.value.name),1)]),content:C(()=>[A.value?(_(),d(S(Dt),{key:0,config:zn.value,dataset:Bn.value,onCopyAlt:cr},null,8,[`config`,`dataset`])):f(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`,`isCursorPointer`])):f(``,!0),b(e.$slots,`skeleton`,{},()=>[S(nn)?(_(),d(ze,{key:0})):f(``,!0)],!0)],46,at))}},[[`__scopeId`,`data-v-58694d85`]]);export{it as n,Dt 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"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as ee}from"./annotationSlots-OLiW25XN.js";import{n as te,t as ne}from"./tableIntegration-CNoJ1CIY.js";import{t as re}from"./chartImage-DPGnEuYM.js";import{$ as o,D as ie,Dt as ae,Ht as oe,J as se,Jt as ce,S as le,X as ue,Yt as de,at as fe,i as pe,in as me,nt as he,t as ge,w as _e,yt as ve}from"./lib-rPeBMZrn.js";import{t as ye}from"./labelUtils-CdtU-yB_.js";import{n as be,t as xe}from"./useHints-C-TwxM0Y.js";import{t as Se}from"./useConfig-B8qvYKdK.js";import{n as Ce}from"./resolveChartConfig-0IvbmIE_.js";import{t as we}from"./usePrinter-DVf3YcG5.js";import{t as Te}from"./useResponsive-CENUxfEL.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{t as De}from"./useTransitions-ChGGrtrv.js";import{t as Oe}from"./useChartAccessibility-DOMuYJfm.js";import{t as ke}from"./Shape-CRe8woTu.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./vue_ui_rings-CTMi6U5j.js";import{t as Me}from"./Legend-W9YVYVX-.js";import{t as Ne}from"./BaseScanner-m6QR9rwD.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Re,Teleport as ze,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as Be,createTextVNode as Ve,createVNode as f,defineAsyncComponent as p,guardReactiveProps as m,mergeProps as He,nextTick as Ue,normalizeClass as h,normalizeProps as g,normalizeStyle as We,onBeforeUnmount as Ge,onMounted as Ke,openBlock as _,ref as v,renderList as qe,renderSlot as y,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as Xe,unref as b,useSlots as Ze,watch as x,withCtx as S,withModifiers as Qe}from"vue";var $e=/* @__PURE__ */ e({default:()=>xt}),et=[`id`],tt=[`id`],nt=[`id`],rt={style:{position:`relative`}},it=[`xmlns`,`viewBox`,`aria-describedby`],at=[`width`,`height`],ot={key:1},st=[`onAnimationend`],ct=[`stroke`,`cx`,`cy`,`r`,`fill`],lt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],ut=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],dt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],ft=[`x`,`y`,`width`,`height`,`fill`,`rx`],pt=[`cx`,`cy`,`r`,`fill`,`stroke`],mt=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`,`onMouseenter`,`onMouseleave`,`onClick`,`innerHTML`],ht={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},gt={key:5,class:`vue-data-ui-watermark`},_t=[`id`],vt=[`onClick`],yt={key:0},bt={key:1},xt=/*#__PURE__*/ Le({__name:`vue-ui-rings`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:Le,emit:$e}){let xt=p(()=>import(`./Tooltip-B432XpvC.js`)),St=p(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ct=p(()=>import(`./vue-ui-accordion-BpTfjWvH.js`).then(e=>e.n)),wt=p(()=>import(`./DataTable-KeuZB1JM.js`)),Tt=p(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Et=p(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Dt=p(()=>import(`./PackageVersion-DAF5ApGl.js`).then(e=>e.t)),Ot=p(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_rings:kt}=Se(),At=Ze(),C=e;function jt(e){return Array.isArray(e)&&e.length>0&&Array.from(e,e=>e&&Object.keys(e).includes(`name`)&&Array.isArray(e.values)&&e.values.length>0).every(Boolean)}let Mt=s(()=>jt(C.dataset)),w=v(ue()),Nt=v(!1),Pt=v(``),T=v(null),Ft=v(0),E=v(null),It=v(null),Lt=v(null),Rt=v(null),zt=v(null),Bt=v(!1),Vt=v(!1),Ht=v(null),Ut=v(null),D=v(null),Wt=v({x:0,y:0}),Gt=v(`pointer`),Kt=v(!1),O=v(Qt());x(()=>C.config,()=>{O.value=Qt()},{deep:!0});let k=s(()=>!!C.config.loading||!Mt.value),A=s(()=>k.value?me({defaultConfig:O.value,userConfig:qt.value}):O.value),qt=s(()=>me({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:O.value.skeletonConfig??{}})),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);be({config:()=>A.value,dataset:()=>C.dataset,component:`VueUiRings`,rules:[xe.singleSeries,xe.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}=De({config:()=>A.value.transitions,dataset:()=>C.dataset}),L=s(()=>A.value.userOptions.useCursorPointer),Jt=s(()=>k.value?jt(C.config.skeletonDataset)?C.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`}]:C.dataset),Yt=v(!A.value.userOptions.showOnChartHover),Xt=s(()=>A.value.userOptions.keepStateOnChartLeave);function Zt(e=!1){A.value.userOptions.showOnChartHover&&(Yt.value=e)}x(()=>A.value.userOptions.showOnChartHover,e=>{Yt.value=!e});let{svgRef:R}=Oe({config:F.value.title});function Qt(){return Ce(C.config,kt,je)}let $t=s(()=>{let{markers:e}=N.value.dataLabels,t=Pn.value/2,n=pn.value?e.position===`left`?t:-t:0,r=pn.value?U.value.width/2-t:0,i=e.position===`left`?r:-r;return{x:A.value.responsive?i:n/F.value.size*U.value.width,y:0/F.value.size*U.value.height}}),z=s(()=>({x:U.value.width/2+$t.value.x,y:U.value.height/2+$t.value.y})),en=Ye(null),tn=Ye(null),B=null,nn=!1,V=s(()=>O.value.debug);function rn(){!Array.isArray(C.dataset)||!C.dataset.length?fe({componentName:`VueUiRings`,type:`dataset`,debug:V.value}):Array.from(C.dataset).forEach((e,t)=>{ve({datasetObject:e??{},requiredAttributes:[`name`,`values`]}).forEach(e=>{fe({componentName:`VueUiRings`,type:`datasetSerieAttribute`,property:e,index:t,debug:V.value})}),V.value&&(Array.isArray(e?.values)?e.values.length||fe({componentName:`VueUiRings`,type:`dataset`,debug:!0}):e&&Object.keys(e).includes(`values`)&&console.warn(`VueUiRings: dataset[${t}].values must be an array.`))})}x([()=>C.dataset,V],rn,{immediate:!0,deep:!0});function an(){en.value?.disconnect(),en.value=null,B!==null&&cancelAnimationFrame(B),B=null,Bt.value=!1}function on(){if(an(),tn.value=null,!A.value.responsive||!E.value?.parentNode)return;let e=new ResizeObserver(t);function t(){nn||en.value!==e||(B!==null&&cancelAnimationFrame(B),Bt.value=!0,B=requestAnimationFrame(()=>{if(nn||en.value!==e)return;B=null;let{width:t,height:n}=Te({chart:E.value,title:F.value.title.text?It.value:null,legend:F.value.legend.show?Lt.value:null,source:Rt.value,noTitle:zt.value});tn.value={width:Math.max(.1,t),height:Math.max(.1,n-12)},Bt.value=!1}))}en.value=e;for(let t of[E.value.parentNode,It.value,Lt.value,Rt.value,zt.value])t&&e.observe(t);t()}x([()=>A.value.responsive,It,Lt,Rt,zt,()=>F.value.title.text,()=>F.value.legend.show,()=>F.value.legend.position],on,{flush:`post`}),Ke(()=>{Vt.value=!0,on()}),Ge(()=>{nn=!0,an()});let{isPrinting:sn,isImaging:cn,generatePdf:ln,generateImage:un}=we({elementId:`rings_${w.value}`,fileName:F.value.title.text||`vue-ui-rings`,options:A.value.userOptions.print}),dn=s(()=>A.value.userOptions.show&&!F.value.title.text),fn=s(()=>_e(A.value.customPalette)),H=v({showTable:O.value.table.show,showTooltip:O.value.style.chart.tooltip.show,showLabels:O.value.style.chart.layout.labels.dataLabels.show});x(()=>O.value.table.show,e=>{H.value.showTable=e}),x(()=>O.value.style.chart.tooltip.show,e=>{H.value.showTooltip=e}),x(()=>O.value.style.chart.layout.labels.dataLabels.show,e=>{H.value.showLabels=e});let pn=s(()=>k.value?N.value.dataLabels.show:H.value.showLabels),U=s(()=>tn.value??{height:F.value.size,width:F.value.size}),mn=s(()=>Math.min(U.value.height,U.value.width)),hn=$e,gn=v(/* @__PURE__ */ new Set);function _n(e){gn.value.add(e)}function vn(){G.value.forEach(e=>_n(e.uid))}let W=v([]);function yn(){k.value||(vn(),W.value.length?W.value=[]:jn.value.forEach(e=>{W.value.push(e.uid)}),bn())}function bn(){hn(`selectLegend`,q.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function xn(e){if(!k.value){if(vn(),W.value.includes(e))W.value=W.value.filter(t=>t!==e);else{if(W.value.length===G.value.length-1)return;W.value.push(e)}bn()}}function Sn(e){return G.value.length?G.value.find(t=>t.name===e)||(V.value&&console.warn(`VueUiRings - Series name not found "${e}"`),null):(V.value&&console.warn(`VueUiRings - There are no series to show.`),null)}function Cn(e){let t=Sn(e);t!==null&&W.value.includes(t.uid)&&xn(t.uid)}function wn(e){let t=Sn(e);t!==null&&(W.value.includes(t.uid)||xn(t.uid))}let Tn=/* @__PURE__ */ new Map,En=s(()=>{let e=/* @__PURE__ */ new Map,t=/* @__PURE__ */ new Set,n=Jt.value.map((n,r)=>{let i=e.get(n.name)??0;e.set(n.name,i+1);let a=JSON.stringify([k.value,n.name,i]);return t.add(a),Tn.has(a)||Tn.set(a,ue()),{name:n.name,color:n.color,absoluteValues:n.values,value:n.values.reduce((e,t)=>e+(Number.isFinite(t)?t:0),0),uid:Tn.get(a),absoluteIndex:r}});for(let e of Tn.keys())e.startsWith(`[${k.value},`)&&!t.has(e)&&Tn.delete(e);let r=n.reduce((e,t)=>e+t.value,0);return n.map(e=>({...e,proportion:Dn(e.value,r)}))});function Dn(e,t){let n=e/t;return Number.isFinite(n)?n:0}let G=s(()=>En.value.map((e,t)=>({...e,color:e.color||le(e.color)||fn.value[t]||oe[t%oe.length]}))),On=s(()=>G.value.filter(e=>!W.value.includes(e.uid))),kn=s(()=>On.value.reduce((e,t)=>Math.max(e,t.value),-1/0));function An(e){return Dn(e,kn.value)}let jn=s(()=>G.value.map((e,t)=>{let n=pe(N.value.dataLabels.formatter,e.value,o({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,index:t}),r=Number.isFinite(e.value/K.value)?o({v:e.value/K.value*100,s:`%`,r:F.value.legend.roundingPercentage}):`-`,i=Ln({showVal:F.value.legend.showValue,showPercentage:F.value.legend.showPercentage,val:n,percentage:W.value.includes(e.uid)?`-%`:r});return{...e,shape:`circle`,opacity:W.value.includes(e.uid)?.5:1,segregate:()=>xn(e.uid),isSegregated:W.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${i}`}}).toSorted((e,t)=>t.value-e.value)),Mn=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`:``})),K=s(()=>On.value.reduce((e,t)=>e+t.value,0)),q=s(()=>On.value.map(e=>({...e,proportion:An(e.value),percentage:Dn(e.value,K.value)*100,strokeWidth:M.value.strokeWidth*An(e.value)})).toSorted((e,t)=>t.value-e.value));x(()=>En.value.map(e=>e.uid),e=>{k.value||(W.value=W.value.filter(t=>e.includes(t)))});function Nn(){return q.value.map(({name:e,color:t,value:n,absoluteValues:r,percentage:i})=>({name:e,color:t,value:n,absoluteValues:r,percentage:i}))}let Pn=s(()=>mn.value-M.value.strokeWidth*2);function Fn(e,t){k.value||A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function J(){Un.value=null,T.value=null,Nt.value=!1,D.value=null,Gt.value=`pointer`,Y.value=null,Pt.value=``}function In(e,t){k.value||(J(),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 ye({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Rn(e){let t=N.value.dataLabels,n=pe(t.formatter,e.value,o({p:t.prefix,v:e.value,s:t.suffix,r:t.roundingValue})),r=o({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 Math.max(1e-4,Pn.value*e.proportion/2*.9)}let Bn=s(()=>z.value.y+(q.value.length?zn(q.value[0]):0));function Vn(e){return Bn.value-zn(e)}function Hn(e,t){let n=N.value.dataLabels.markers.position===`left`?-(Pn.value/2):Pn.value/2;return{x:z.value.x+n,y:Vn(e,t)-zn(e)}}let Y=v(null),Un=v(null);function Wn(e,t,n=`pointer`,r=!0){if(k.value||!e||(r&&A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:t}),W.value.length===C.dataset.length))return;Y.value={datapoint:e,seriesIndex:t,series:q.value,config:A.value},Un.value=e.uid,T.value=t,D.value=t,Gt.value=n;let i=q.value[t],a=P.value.customFormat,ee=ae(a)?a(Y.value):null;if(typeof ee==`string`)Pt.value=ee;else{let n=``;n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${i.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="${i.color}" />${At.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>${pe(N.value.dataLabels.formatter,i.value,o({p:N.value.dataLabels.prefix,v:i.value,s:N.value.dataLabels.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</span>`,percentage:o({v:i.percentage,s:`%`,r:P.value.roundingPercentage})})}</b></div>`,Pt.value=n}Nt.value=!0}let X=s(()=>({head:q.value.map(e=>({name:e.name,color:e.color})),body:q.value.map(e=>e.value)})),Z=s(()=>{let e=[`__SUM__`,o({p:N.value.dataLabels.prefix,v:K.value,s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),`100%`],t=X.value.head.map((e,t)=>[{color:e.color,name:e.name},o({p:N.value.dataLabels.prefix,v:X.value.body[t],s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),Number.isFinite(X.value.body[t]/K.value)?(X.value.body[t]/K.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 Gn(e=null){Ue(()=>{let t=X.value.head.map((e,t)=>[[e.name],[X.value.body[t]],[Number.isFinite(X.value.body[t]/K.value)?X.value.body[t]/K.value*100:`-`]]),n=[[F.value.title.text],[F.value.title.subtitle.text],[[A.value.table.columnNames.series],[A.value.table.columnNames.value],[A.value.table.columnNames.percentage]]].concat(t),r=ie(n);e?e(r):he({csvContent:r,title:F.value.title.text||`vue-ui-rings`})})}let Q=v(!1);function Kn(e){Q.value=e,Ft.value+=1}function qn(){H.value.showTable=!H.value.showTable}function Jn(){H.value.showTooltip=!H.value.showTooltip}function Yn(){H.value.showLabels=!pn.value}let Xn=v(!1);function Zn(){Xn.value=!Xn.value}let Qn=re(E,()=>F.value.title.text),$n=s(()=>ne({config:A,style:F,mutableConfig:H,dialog:Ot,accordion:Ct,isFullscreen:Q,parent:E,maxWidth:800,isCursorPointer:L}));x([()=>H.value.showTable,Ht,()=>A.value.table.useDialog],([e])=>{Ht.value&&te(e,A,Ht)},{flush:`post`});function er(){H.value.showTable=!1,Ut.value&&Ut.value.setTableIconState(!1)}let tr=s(()=>jn.value.map(e=>({...e,name:e.display}))),nr=s(()=>F.value.backgroundColor),rr=s(()=>F.value.legend),ir=s(()=>F.value.title),{isCallbackImaging:ar,isCallbackSvg:or,generateSvg:sr,onGenerateImage:cr}=Ee({svg:R,title:ir,legend:rr,legendItems:tr,backgroundColor:nr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:un});async function lr(){hn(`copyAlt`,{config:A.value,dataset:q.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ur(){J(),Kt.value=!0}function dr(){J(),Kt.value=!1}function fr(e){if(!R.value||Xn.value||k.value||document.activeElement!==R.value||!q.value.length||W.value.length===C.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){J();return}if(r){if(D.value===null)return;let e=q.value[D.value];if(!e)return;Fn(e,D.value);return}let a=D.value;a===null||a<0||a>=q.value.length?a=n?0:q.value.length-1:n?(a+=1,a>=q.value.length&&(a=0)):t&&(--a,a<0&&(a=q.value.length-1));let ee=q.value[a];ee&&(pr(a),Wn(ee,a,`keyboard`))}function pr(e){if(!Number.isFinite(e)||!R.value)return;let t=q.value[e];if(!t)return;let n=Hn(t,e),r=R.value.getBoundingClientRect();Wt.value={x:r.left+n.x/U.value.width*r.width,y:r.top+n.y/U.value.height*r.height}}x([q,U,z,P,()=>A.value],()=>{if(Un.value===null)return;let e=q.value.findIndex(e=>e.uid===Un.value);k.value||e<0?J():(Gt.value===`keyboard`&&pr(e),Wn(q.value[e],e,Gt.value,!1))},{flush:`post`});let mr=s(()=>q.value.map(Rn)),$=s(()=>q.value.map((e,t)=>({radius:zn(e),y:Vn(e,t),marker:Hn(e,t)}))),hr=s(()=>({headers:Z.value?.colNames??[],rows:Z.value?.a11yBody??[]}));return Le({getData:Nn,getImage:Qn,generatePdf:ln,generateCsv:Gn,generateImage:un,generateSvg:sr,hideSeries:wn,showSeries:Cn,toggleTable:qn,toggleTooltip:Jn,toggleAnnotator:Zn,toggleFullscreen:Kn,toggleLabels:Yn,copyAlt:lr}),(e,te)=>(_(),u(`div`,{ref_key:`ringsChart`,ref:E,class:h(`vue-data-ui-component vue-ui-rings ${Q.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:We(`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:te[2]||=e=>{J(),Zt(!1)},onMouseenter:te[3]||=()=>Zt(!0)},[d(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[d(`p`,null,Xe(A.value.a11y.translations.keyboardNavigation),1)],8,tt),A.value.a11y.includeTable&&hr.value?.rows?.length?(_(),c(Pe,{key:0,uid:w.value,head:hr.value.headers,body:hr.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(Tt),He({key:1},b(a)(j.value.annotator),{svgRef:b(R),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Xn.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Zn}),Be({_:2},[qe(b(ee),t=>({name:t,fn:S(n=>[y(e.$slots,t,g(m(b(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):l(``,!0),dn.value?(_(),u(`div`,{key:2,ref_key:`noTitle`,ref:zt,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:It,style:`width:100%;background:transparent`},[f(Ae,{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,nt),j.value.show&&Mt.value&&(Xt.value||Yt.value)?(_(),c(b(Et),He({ref_key:`userOptionsRef`,ref:Ut,key:`user_options_${Ft.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:b(sn),isImaging:b(cn),uid:w.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,isTooltip:H.value.showTooltip,isFullscreen:Q.value,chartElement:E.value},b(n)(j.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:Xn.value,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Kn,onGeneratePdf:b(ln),onGenerateCsv:Gn,onGenerateImage:b(cr),onGenerateSvg:b(sr),onToggleTable:qn,onToggleTooltip:Jn,onToggleAnnotator:Zn,onToggleLabels:Yn,onCopyAlt:lr,style:{visibility:Xt.value?Yt.value?`visible`:`hidden`:`visible`}}),Be({_:2},[qe(b(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,g(m(b(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):l(``,!0),d(`div`,rt,[(_(),u(`svg`,{ref_key:`svgRef`,ref:R,xmlns:b(ge),class:h({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value,resizing:Bt.value||k.value,"vue-data-ui-no-transition":!b(I)}),viewBox:`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`,style:We(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),"aria-describedby":`chart-instructions-${w.value}`,tabindex:`0`,onFocus:ur,onBlur:dr,onKeydown:fr},[f(b(Dt)),y(e.$slots,`svg-underlayer`,{svg:{...U.value,isPrintingImg:b(sn)||b(cn)||b(ar),isPrintingSvg:b(or)}},void 0,!0),e.$slots[`chart-background`]?(_(),u(`foreignObject`,{key:0,x:0,y:0,width:U.value.width<=0?10:U.value.width,height:U.value.height<=0?10:U.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,at)):l(``,!0),d(`defs`,null,[(_(!0),u(Re,null,qe(q.value,(e,t)=>(_(),c(Ie,{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(ce)(b(de)(e.color,.05),100-M.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(_(),u(`g`,ot,[(_(!0),u(Re,null,qe(G.value,t=>(_(),u(`defs`,null,[y(e.$slots,`pattern`,He({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${w.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):l(``,!0),(_(!0),u(Re,null,qe(q.value,(t,n)=>(_(),u(`g`,{key:`r_${t.uid}`,onAnimationend:Qe(e=>_n(t.uid),[`self`]),class:h({"vue-rings-item-onload":A.value.useCssAnimation&&A.value.transitions.enable&&!k.value&&!gn.value.has(t.uid)}),style:We({transformOrigin:`${z.value.x}px ${Bn.value}px`,animationDelay:`${(q.value.length-1-n)*100}ms`})},[d(`circle`,{class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-opacity":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:M.value.gradient.underlayerColor},null,10,ct),d(`circle`,{class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:M.value.gradient.show?`url(#gradient_${w.value}_${n})`:t.color},null,10,lt),e.$slots.pattern?(_(),u(`circle`,{key:0,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:`url(#pattern_${w.value}_${t.absoluteIndex})`},null,10,ut)):l(``,!0),d(`circle`,{stroke:`none`,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:`transparent`,onMouseenter:e=>Wn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n)},null,40,dt),pn.value?(_(),u(Re,{key:1},[d(`rect`,{x:N.value.dataLabels.markers.position===`left`?$.value[n].marker.x:z.value.x,y:$.value[n].marker.y-N.value.dataLabels.markers.strokeWidth/2,width:Math.abs(z.value.x-$.value[n].marker.x),height:N.value.dataLabels.markers.strokeWidth,fill:N.value.dataLabels.markers.stroke,rx:N.value.dataLabels.markers.strokeWidth,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n})},null,10,ft),d(`circle`,{cx:$.value[n].marker.x,cy:$.value[n].marker.y,r:N.value.dataLabels.markers.radius,fill:t.color,stroke:F.value.backgroundColor,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n})},null,10,pt),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:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),transform:`translate(${$.value[n].marker.x+(N.value.dataLabels.markers.position===`left`?-N.value.dataLabels.offsetX-14:N.value.dataLabels.offsetX)+6}, ${$.value[n].marker.y+N.value.dataLabels.fontSize/3})`,onMouseenter:e=>Wn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n),innerHTML:b(se)({content:mr.value[n],fontSize:N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,x:0,y:0,translateY:!0})},null,42,mt)],64)):l(``,!0)],46,st))),128)),y(e.$slots,`svg`,{svg:{...U.value,isPrintingImg:b(sn)||b(cn)||b(ar),isPrintingSvg:b(or)}},void 0,!0)],46,it)),e.$slots.hint?(_(),u(`div`,ht,[y(e.$slots,`hint`,g(m({hint:A.value.a11y.translations.keyboardNavigation,isVisible:Kt.value})),void 0,!0)])):l(``,!0)]),e.$slots.watermark?(_(),u(`div`,gt,[y(e.$slots,`watermark`,g(m({isPrinting:b(sn)||b(cn)||b(ar)||b(or)})),void 0,!0)])):l(``,!0),d(`div`,{id:`legend-bottom-${w.value}`},null,8,_t),Vt.value&&(F.value.legend.show||e.$slots.legend)?(_(),c(ze,{key:6,to:F.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[d(`div`,{ref_key:`chartLegend`,ref:Lt},[y(e.$slots,`legend`,{legend:jn.value},()=>[F.value.legend.show?(_(),c(Me,{key:0,legendSet:jn.value,config:Mn.value,isCursorPointer:L.value,onClickMarker:te[0]||=({legend:e})=>xn(e.uid)},Be({item:S(({legend:e,index:t})=>[k.value?l(``,!0):(_(),u(`div`,{key:0,onClick:t=>xn(e.uid),style:We(`opacity:${W.value.includes(e.uid)?.5:1}`)},Xe(e.display),13,vt))]),legendToggle:S(()=>[jn.value.length>2&&F.value.legend.selectAllToggle.show&&!k.value?(_(),c(Fe,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:W.value.length>0,isCursorPointer:L.value,onToggle:yn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):l(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:S(({legend:e,index:t})=>[f(ke,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${w.value}_${e.absoluteIndex})`},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:Rt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0),f(b(xt),{teleportTo:P.value.teleportTo,show:H.value.showTooltip&&Nt.value&&W.value.length<C.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:E.value,content:Pt.value,isFullscreen:Q.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:Gt.value===`keyboard`,a11yPosition:Wt.value},{"tooltip-before":S(()=>[y(e.$slots,`tooltip-before`,g(m({...Y.value})),void 0,!0)]),tooltip:S(()=>[y(e.$slots,`tooltip`,g(m({...Y.value})),void 0,!0)]),"tooltip-after":S(()=>[y(e.$slots,`tooltip-after`,g(m({...Y.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`]),!k.value&&Mt.value&&j.value.buttons.table?(_(),c(Je($n.value.component),He({key:8},$n.value.props,{ref_key:`tableUnit`,ref:Ht,onClose:er}),Be({content:S(()=>[f(b(wt),{colNames:Z.value.colNames,head:Z.value.head,body:Z.value.body,config:Z.value.config,title:A.value.table.useDialog?``:$n.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:er},{th:S(({th:e})=>[e===`__SUM__`?(_(),u(`div`,yt,[f(b(St),{name:`sigma`,stroke:Z.value.config.th.color,size:16},null,8,[`stroke`])])):(_(),u(`div`,bt,Xe(e),1))]),td:S(({td:e})=>[Ve(Xe(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[A.value.table.useDialog?{name:`title`,fn:S(()=>[Ve(Xe($n.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:S(()=>[d(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:te[1]||=e=>Gn(j.value.callbacks.csv),style:We({cursor:L.value?`pointer`:`default`})},[f(b(St),{name:`fileCsv`,stroke:$n.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):l(``,!0),y(e.$slots,`skeleton`,{},()=>[k.value?(_(),c(Ne,{key:0})):l(``,!0)],!0)],46,et))}},[[`__scopeId`,`data-v-5087967c`]]);export{$e as n,xt as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as ee}from"./annotationSlots-OLiW25XN.js";import{n as te,t as ne}from"./tableIntegration-CNoJ1CIY.js";import{t as re}from"./chartImage-Dvrx_F7P.js";import{$ as o,D as ie,Dt as ae,Ht as oe,J as se,Jt as ce,S as le,X as ue,Yt as de,at as fe,i as pe,in as me,nt as he,t as ge,w as _e,yt as ve}from"./lib-BaWaqwnJ.js";import{t as ye}from"./labelUtils-D_AyGvLO.js";import{n as be,t as xe}from"./useHints-C-TwxM0Y.js";import{t as Se}from"./useConfig-B-AzS3w-.js";import{n as Ce}from"./resolveChartConfig-QgMumfgd.js";import{t as we}from"./usePrinter-CUD8gosC.js";import{t as Te}from"./useResponsive-CENUxfEL.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{t as De}from"./useTransitions-ChGGrtrv.js";import{t as Oe}from"./useChartAccessibility-DOMuYJfm.js";import{t as ke}from"./Shape-DgpYvQc4.js";import{n as Ae}from"./Title-DlhGIAWX.js";import{t as je}from"./vue_ui_rings-CTMi6U5j.js";import{t as Me}from"./Legend-D5I3jeGD.js";import{t as Ne}from"./BaseScanner-m6QR9rwD.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./BaseLegendToggle-CnQ_U5rI.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as Re,Teleport as ze,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as Be,createTextVNode as Ve,createVNode as f,defineAsyncComponent as p,guardReactiveProps as m,mergeProps as He,nextTick as Ue,normalizeClass as h,normalizeProps as g,normalizeStyle as We,onBeforeUnmount as Ge,onMounted as Ke,openBlock as _,ref as v,renderList as qe,renderSlot as y,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as Xe,unref as b,useSlots as Ze,watch as x,withCtx as S,withModifiers as Qe}from"vue";var $e=/* @__PURE__ */ e({default:()=>xt}),et=[`id`],tt=[`id`],nt=[`id`],rt={style:{position:`relative`}},it=[`xmlns`,`viewBox`,`aria-describedby`],at=[`width`,`height`],ot={key:1},st=[`onAnimationend`],ct=[`stroke`,`cx`,`cy`,`r`,`fill`],lt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],ut=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],dt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],ft=[`x`,`y`,`width`,`height`,`fill`,`rx`],pt=[`cx`,`cy`,`r`,`fill`,`stroke`],mt=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`,`onMouseenter`,`onMouseleave`,`onClick`,`innerHTML`],ht={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},gt={key:5,class:`vue-data-ui-watermark`},_t=[`id`],vt=[`onClick`],yt={key:0},bt={key:1},xt=/*#__PURE__*/ Le({__name:`vue-ui-rings`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:Le,emit:$e}){let xt=p(()=>import(`./Tooltip-CL3U31cL.js`)),St=p(()=>import(`./BaseIcon-CQFjKDhE.js`).then(e=>e.n)),Ct=p(()=>import(`./vue-ui-accordion-B8LYfVG9.js`).then(e=>e.n)),wt=p(()=>import(`./DataTable-BHW5xD9B.js`)),Tt=p(()=>import(`./PenAndPaper-B2UOwiJM.js`).then(e=>e.t)),Et=p(()=>import(`./UserOptions-B97cPcKc.js`).then(e=>e.n)),Dt=p(()=>import(`./PackageVersion-B-1JX0wI.js`).then(e=>e.t)),Ot=p(()=>import(`./BaseDraggableDialog-MyWIeEtr.js`).then(e=>e.n)),{vue_ui_rings:kt}=Se(),At=Ze(),C=e;function jt(e){return Array.isArray(e)&&e.length>0&&Array.from(e,e=>e&&Object.keys(e).includes(`name`)&&Array.isArray(e.values)&&e.values.length>0).every(Boolean)}let Mt=s(()=>jt(C.dataset)),w=v(ue()),Nt=v(!1),Pt=v(``),T=v(null),Ft=v(0),E=v(null),It=v(null),Lt=v(null),Rt=v(null),zt=v(null),Bt=v(!1),Vt=v(!1),Ht=v(null),Ut=v(null),D=v(null),Wt=v({x:0,y:0}),Gt=v(`pointer`),Kt=v(!1),O=v(Qt());x(()=>C.config,()=>{O.value=Qt()},{deep:!0});let k=s(()=>!!C.config.loading||!Mt.value),A=s(()=>k.value?me({defaultConfig:O.value,userConfig:qt.value}):O.value),qt=s(()=>me({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:O.value.skeletonConfig??{}})),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);be({config:()=>A.value,dataset:()=>C.dataset,component:`VueUiRings`,rules:[xe.singleSeries,xe.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}=De({config:()=>A.value.transitions,dataset:()=>C.dataset}),L=s(()=>A.value.userOptions.useCursorPointer),Jt=s(()=>k.value?jt(C.config.skeletonDataset)?C.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`}]:C.dataset),Yt=v(!A.value.userOptions.showOnChartHover),Xt=s(()=>A.value.userOptions.keepStateOnChartLeave);function Zt(e=!1){A.value.userOptions.showOnChartHover&&(Yt.value=e)}x(()=>A.value.userOptions.showOnChartHover,e=>{Yt.value=!e});let{svgRef:R}=Oe({config:F.value.title});function Qt(){return Ce(C.config,kt,je)}let $t=s(()=>{let{markers:e}=N.value.dataLabels,t=Pn.value/2,n=pn.value?e.position===`left`?t:-t:0,r=pn.value?U.value.width/2-t:0,i=e.position===`left`?r:-r;return{x:A.value.responsive?i:n/F.value.size*U.value.width,y:0/F.value.size*U.value.height}}),z=s(()=>({x:U.value.width/2+$t.value.x,y:U.value.height/2+$t.value.y})),en=Ye(null),tn=Ye(null),B=null,nn=!1,V=s(()=>O.value.debug);function rn(){!Array.isArray(C.dataset)||!C.dataset.length?fe({componentName:`VueUiRings`,type:`dataset`,debug:V.value}):Array.from(C.dataset).forEach((e,t)=>{ve({datasetObject:e??{},requiredAttributes:[`name`,`values`]}).forEach(e=>{fe({componentName:`VueUiRings`,type:`datasetSerieAttribute`,property:e,index:t,debug:V.value})}),V.value&&(Array.isArray(e?.values)?e.values.length||fe({componentName:`VueUiRings`,type:`dataset`,debug:!0}):e&&Object.keys(e).includes(`values`)&&console.warn(`VueUiRings: dataset[${t}].values must be an array.`))})}x([()=>C.dataset,V],rn,{immediate:!0,deep:!0});function an(){en.value?.disconnect(),en.value=null,B!==null&&cancelAnimationFrame(B),B=null,Bt.value=!1}function on(){if(an(),tn.value=null,!A.value.responsive||!E.value?.parentNode)return;let e=new ResizeObserver(t);function t(){nn||en.value!==e||(B!==null&&cancelAnimationFrame(B),Bt.value=!0,B=requestAnimationFrame(()=>{if(nn||en.value!==e)return;B=null;let{width:t,height:n}=Te({chart:E.value,title:F.value.title.text?It.value:null,legend:F.value.legend.show?Lt.value:null,source:Rt.value,noTitle:zt.value});tn.value={width:Math.max(.1,t),height:Math.max(.1,n-12)},Bt.value=!1}))}en.value=e;for(let t of[E.value.parentNode,It.value,Lt.value,Rt.value,zt.value])t&&e.observe(t);t()}x([()=>A.value.responsive,It,Lt,Rt,zt,()=>F.value.title.text,()=>F.value.legend.show,()=>F.value.legend.position],on,{flush:`post`}),Ke(()=>{Vt.value=!0,on()}),Ge(()=>{nn=!0,an()});let{isPrinting:sn,isImaging:cn,generatePdf:ln,generateImage:un}=we({elementId:`rings_${w.value}`,fileName:F.value.title.text||`vue-ui-rings`,options:A.value.userOptions.print}),dn=s(()=>A.value.userOptions.show&&!F.value.title.text),fn=s(()=>_e(A.value.customPalette)),H=v({showTable:O.value.table.show,showTooltip:O.value.style.chart.tooltip.show,showLabels:O.value.style.chart.layout.labels.dataLabels.show});x(()=>O.value.table.show,e=>{H.value.showTable=e}),x(()=>O.value.style.chart.tooltip.show,e=>{H.value.showTooltip=e}),x(()=>O.value.style.chart.layout.labels.dataLabels.show,e=>{H.value.showLabels=e});let pn=s(()=>k.value?N.value.dataLabels.show:H.value.showLabels),U=s(()=>tn.value??{height:F.value.size,width:F.value.size}),mn=s(()=>Math.min(U.value.height,U.value.width)),hn=$e,gn=v(/* @__PURE__ */ new Set);function _n(e){gn.value.add(e)}function vn(){G.value.forEach(e=>_n(e.uid))}let W=v([]);function yn(){k.value||(vn(),W.value.length?W.value=[]:jn.value.forEach(e=>{W.value.push(e.uid)}),bn())}function bn(){hn(`selectLegend`,q.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function xn(e){if(!k.value){if(vn(),W.value.includes(e))W.value=W.value.filter(t=>t!==e);else{if(W.value.length===G.value.length-1)return;W.value.push(e)}bn()}}function Sn(e){return G.value.length?G.value.find(t=>t.name===e)||(V.value&&console.warn(`VueUiRings - Series name not found "${e}"`),null):(V.value&&console.warn(`VueUiRings - There are no series to show.`),null)}function Cn(e){let t=Sn(e);t!==null&&W.value.includes(t.uid)&&xn(t.uid)}function wn(e){let t=Sn(e);t!==null&&(W.value.includes(t.uid)||xn(t.uid))}let Tn=/* @__PURE__ */ new Map,En=s(()=>{let e=/* @__PURE__ */ new Map,t=/* @__PURE__ */ new Set,n=Jt.value.map((n,r)=>{let i=e.get(n.name)??0;e.set(n.name,i+1);let a=JSON.stringify([k.value,n.name,i]);return t.add(a),Tn.has(a)||Tn.set(a,ue()),{name:n.name,color:n.color,absoluteValues:n.values,value:n.values.reduce((e,t)=>e+(Number.isFinite(t)?t:0),0),uid:Tn.get(a),absoluteIndex:r}});for(let e of Tn.keys())e.startsWith(`[${k.value},`)&&!t.has(e)&&Tn.delete(e);let r=n.reduce((e,t)=>e+t.value,0);return n.map(e=>({...e,proportion:Dn(e.value,r)}))});function Dn(e,t){let n=e/t;return Number.isFinite(n)?n:0}let G=s(()=>En.value.map((e,t)=>({...e,color:e.color||le(e.color)||fn.value[t]||oe[t%oe.length]}))),On=s(()=>G.value.filter(e=>!W.value.includes(e.uid))),kn=s(()=>On.value.reduce((e,t)=>Math.max(e,t.value),-1/0));function An(e){return Dn(e,kn.value)}let jn=s(()=>G.value.map((e,t)=>{let n=pe(N.value.dataLabels.formatter,e.value,o({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,index:t}),r=Number.isFinite(e.value/K.value)?o({v:e.value/K.value*100,s:`%`,r:F.value.legend.roundingPercentage}):`-`,i=Ln({showVal:F.value.legend.showValue,showPercentage:F.value.legend.showPercentage,val:n,percentage:W.value.includes(e.uid)?`-%`:r});return{...e,shape:`circle`,opacity:W.value.includes(e.uid)?.5:1,segregate:()=>xn(e.uid),isSegregated:W.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${i}`}}).toSorted((e,t)=>t.value-e.value)),Mn=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`:``})),K=s(()=>On.value.reduce((e,t)=>e+t.value,0)),q=s(()=>On.value.map(e=>({...e,proportion:An(e.value),percentage:Dn(e.value,K.value)*100,strokeWidth:M.value.strokeWidth*An(e.value)})).toSorted((e,t)=>t.value-e.value));x(()=>En.value.map(e=>e.uid),e=>{k.value||(W.value=W.value.filter(t=>e.includes(t)))});function Nn(){return q.value.map(({name:e,color:t,value:n,absoluteValues:r,percentage:i})=>({name:e,color:t,value:n,absoluteValues:r,percentage:i}))}let Pn=s(()=>mn.value-M.value.strokeWidth*2);function Fn(e,t){k.value||A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function J(){Un.value=null,T.value=null,Nt.value=!1,D.value=null,Gt.value=`pointer`,Y.value=null,Pt.value=``}function In(e,t){k.value||(J(),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 ye({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Rn(e){let t=N.value.dataLabels,n=pe(t.formatter,e.value,o({p:t.prefix,v:e.value,s:t.suffix,r:t.roundingValue})),r=o({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 Math.max(1e-4,Pn.value*e.proportion/2*.9)}let Bn=s(()=>z.value.y+(q.value.length?zn(q.value[0]):0));function Vn(e){return Bn.value-zn(e)}function Hn(e,t){let n=N.value.dataLabels.markers.position===`left`?-(Pn.value/2):Pn.value/2;return{x:z.value.x+n,y:Vn(e,t)-zn(e)}}let Y=v(null),Un=v(null);function Wn(e,t,n=`pointer`,r=!0){if(k.value||!e||(r&&A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:t}),W.value.length===C.dataset.length))return;Y.value={datapoint:e,seriesIndex:t,series:q.value,config:A.value},Un.value=e.uid,T.value=t,D.value=t,Gt.value=n;let i=q.value[t],a=P.value.customFormat,ee=ae(a)?a(Y.value):null;if(typeof ee==`string`)Pt.value=ee;else{let n=``;n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${i.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="${i.color}" />${At.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>${pe(N.value.dataLabels.formatter,i.value,o({p:N.value.dataLabels.prefix,v:i.value,s:N.value.dataLabels.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</span>`,percentage:o({v:i.percentage,s:`%`,r:P.value.roundingPercentage})})}</b></div>`,Pt.value=n}Nt.value=!0}let X=s(()=>({head:q.value.map(e=>({name:e.name,color:e.color})),body:q.value.map(e=>e.value)})),Z=s(()=>{let e=[`__SUM__`,o({p:N.value.dataLabels.prefix,v:K.value,s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),`100%`],t=X.value.head.map((e,t)=>[{color:e.color,name:e.name},o({p:N.value.dataLabels.prefix,v:X.value.body[t],s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),Number.isFinite(X.value.body[t]/K.value)?(X.value.body[t]/K.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 Gn(e=null){Ue(()=>{let t=X.value.head.map((e,t)=>[[e.name],[X.value.body[t]],[Number.isFinite(X.value.body[t]/K.value)?X.value.body[t]/K.value*100:`-`]]),n=[[F.value.title.text],[F.value.title.subtitle.text],[[A.value.table.columnNames.series],[A.value.table.columnNames.value],[A.value.table.columnNames.percentage]]].concat(t),r=ie(n);e?e(r):he({csvContent:r,title:F.value.title.text||`vue-ui-rings`})})}let Q=v(!1);function Kn(e){Q.value=e,Ft.value+=1}function qn(){H.value.showTable=!H.value.showTable}function Jn(){H.value.showTooltip=!H.value.showTooltip}function Yn(){H.value.showLabels=!pn.value}let Xn=v(!1);function Zn(){Xn.value=!Xn.value}let Qn=re(E,()=>F.value.title.text),$n=s(()=>ne({config:A,style:F,mutableConfig:H,dialog:Ot,accordion:Ct,isFullscreen:Q,parent:E,maxWidth:800,isCursorPointer:L}));x([()=>H.value.showTable,Ht,()=>A.value.table.useDialog],([e])=>{Ht.value&&te(e,A,Ht)},{flush:`post`});function er(){H.value.showTable=!1,Ut.value&&Ut.value.setTableIconState(!1)}let tr=s(()=>jn.value.map(e=>({...e,name:e.display}))),nr=s(()=>F.value.backgroundColor),rr=s(()=>F.value.legend),ir=s(()=>F.value.title),{isCallbackImaging:ar,isCallbackSvg:or,generateSvg:sr,onGenerateImage:cr}=Ee({svg:R,title:ir,legend:rr,legendItems:tr,backgroundColor:nr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:un});async function lr(){hn(`copyAlt`,{config:A.value,dataset:q.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ur(){J(),Kt.value=!0}function dr(){J(),Kt.value=!1}function fr(e){if(!R.value||Xn.value||k.value||document.activeElement!==R.value||!q.value.length||W.value.length===C.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){J();return}if(r){if(D.value===null)return;let e=q.value[D.value];if(!e)return;Fn(e,D.value);return}let a=D.value;a===null||a<0||a>=q.value.length?a=n?0:q.value.length-1:n?(a+=1,a>=q.value.length&&(a=0)):t&&(--a,a<0&&(a=q.value.length-1));let ee=q.value[a];ee&&(pr(a),Wn(ee,a,`keyboard`))}function pr(e){if(!Number.isFinite(e)||!R.value)return;let t=q.value[e];if(!t)return;let n=Hn(t,e),r=R.value.getBoundingClientRect();Wt.value={x:r.left+n.x/U.value.width*r.width,y:r.top+n.y/U.value.height*r.height}}x([q,U,z,P,()=>A.value],()=>{if(Un.value===null)return;let e=q.value.findIndex(e=>e.uid===Un.value);k.value||e<0?J():(Gt.value===`keyboard`&&pr(e),Wn(q.value[e],e,Gt.value,!1))},{flush:`post`});let mr=s(()=>q.value.map(Rn)),$=s(()=>q.value.map((e,t)=>({radius:zn(e),y:Vn(e,t),marker:Hn(e,t)}))),hr=s(()=>({headers:Z.value?.colNames??[],rows:Z.value?.a11yBody??[]}));return Le({getData:Nn,getImage:Qn,generatePdf:ln,generateCsv:Gn,generateImage:un,generateSvg:sr,hideSeries:wn,showSeries:Cn,toggleTable:qn,toggleTooltip:Jn,toggleAnnotator:Zn,toggleFullscreen:Kn,toggleLabels:Yn,copyAlt:lr}),(e,te)=>(_(),u(`div`,{ref_key:`ringsChart`,ref:E,class:h(`vue-data-ui-component vue-ui-rings ${Q.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:We(`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:te[2]||=e=>{J(),Zt(!1)},onMouseenter:te[3]||=()=>Zt(!0)},[d(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[d(`p`,null,Xe(A.value.a11y.translations.keyboardNavigation),1)],8,tt),A.value.a11y.includeTable&&hr.value?.rows?.length?(_(),c(Pe,{key:0,uid:w.value,head:hr.value.headers,body:hr.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(Tt),He({key:1},b(a)(j.value.annotator),{svgRef:b(R),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Xn.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Zn}),Be({_:2},[qe(b(ee),t=>({name:t,fn:S(n=>[y(e.$slots,t,g(m(b(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):l(``,!0),dn.value?(_(),u(`div`,{key:2,ref_key:`noTitle`,ref:zt,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:It,style:`width:100%;background:transparent`},[f(Ae,{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,nt),j.value.show&&Mt.value&&(Xt.value||Yt.value)?(_(),c(b(Et),He({ref_key:`userOptionsRef`,ref:Ut,key:`user_options_${Ft.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:b(sn),isImaging:b(cn),uid:w.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,isTooltip:H.value.showTooltip,isFullscreen:Q.value,chartElement:E.value},b(n)(j.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:Xn.value,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Kn,onGeneratePdf:b(ln),onGenerateCsv:Gn,onGenerateImage:b(cr),onGenerateSvg:b(sr),onToggleTable:qn,onToggleTooltip:Jn,onToggleAnnotator:Zn,onToggleLabels:Yn,onCopyAlt:lr,style:{visibility:Xt.value?Yt.value?`visible`:`hidden`:`visible`}}),Be({_:2},[qe(b(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,g(m(b(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):l(``,!0),d(`div`,rt,[(_(),u(`svg`,{ref_key:`svgRef`,ref:R,xmlns:b(ge),class:h({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value,resizing:Bt.value||k.value,"vue-data-ui-no-transition":!b(I)}),viewBox:`0 0 ${U.value.width<=0?10:U.value.width} ${U.value.height<=0?10:U.value.height}`,style:We(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),"aria-describedby":`chart-instructions-${w.value}`,tabindex:`0`,onFocus:ur,onBlur:dr,onKeydown:fr},[f(b(Dt)),y(e.$slots,`svg-underlayer`,{svg:{...U.value,isPrintingImg:b(sn)||b(cn)||b(ar),isPrintingSvg:b(or)}},void 0,!0),e.$slots[`chart-background`]?(_(),u(`foreignObject`,{key:0,x:0,y:0,width:U.value.width<=0?10:U.value.width,height:U.value.height<=0?10:U.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,at)):l(``,!0),d(`defs`,null,[(_(!0),u(Re,null,qe(q.value,(e,t)=>(_(),c(Ie,{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(ce)(b(de)(e.color,.05),100-M.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(_(),u(`g`,ot,[(_(!0),u(Re,null,qe(G.value,t=>(_(),u(`defs`,null,[y(e.$slots,`pattern`,He({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${w.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):l(``,!0),(_(!0),u(Re,null,qe(q.value,(t,n)=>(_(),u(`g`,{key:`r_${t.uid}`,onAnimationend:Qe(e=>_n(t.uid),[`self`]),class:h({"vue-rings-item-onload":A.value.useCssAnimation&&A.value.transitions.enable&&!k.value&&!gn.value.has(t.uid)}),style:We({transformOrigin:`${z.value.x}px ${Bn.value}px`,animationDelay:`${(q.value.length-1-n)*100}ms`})},[d(`circle`,{class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-opacity":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:M.value.gradient.underlayerColor},null,10,ct),d(`circle`,{class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:M.value.gradient.show?`url(#gradient_${w.value}_${n})`:t.color},null,10,lt),e.$slots.pattern?(_(),u(`circle`,{key:0,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:`url(#pattern_${w.value}_${t.absoluteIndex})`},null,10,ut)):l(``,!0),d(`circle`,{stroke:`none`,cx:z.value.x,cy:$.value[n].y,r:$.value[n].radius,fill:`transparent`,onMouseenter:e=>Wn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n)},null,40,dt),pn.value?(_(),u(Re,{key:1},[d(`rect`,{x:N.value.dataLabels.markers.position===`left`?$.value[n].marker.x:z.value.x,y:$.value[n].marker.y-N.value.dataLabels.markers.strokeWidth/2,width:Math.abs(z.value.x-$.value[n].marker.x),height:N.value.dataLabels.markers.strokeWidth,fill:N.value.dataLabels.markers.stroke,rx:N.value.dataLabels.markers.strokeWidth,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n})},null,10,ft),d(`circle`,{cx:$.value[n].marker.x,cy:$.value[n].marker.y,r:N.value.dataLabels.markers.radius,fill:t.color,stroke:F.value.backgroundColor,class:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n})},null,10,pt),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:h({"vue-data-ui-transition":b(I),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":A.value.useBlurOnHover&&T.value!==null&&T.value!==n}),transform:`translate(${$.value[n].marker.x+(N.value.dataLabels.markers.position===`left`?-N.value.dataLabels.offsetX-14:N.value.dataLabels.offsetX)+6}, ${$.value[n].marker.y+N.value.dataLabels.fontSize/3})`,onMouseenter:e=>Wn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n),innerHTML:b(se)({content:mr.value[n],fontSize:N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,x:0,y:0,translateY:!0})},null,42,mt)],64)):l(``,!0)],46,st))),128)),y(e.$slots,`svg`,{svg:{...U.value,isPrintingImg:b(sn)||b(cn)||b(ar),isPrintingSvg:b(or)}},void 0,!0)],46,it)),e.$slots.hint?(_(),u(`div`,ht,[y(e.$slots,`hint`,g(m({hint:A.value.a11y.translations.keyboardNavigation,isVisible:Kt.value})),void 0,!0)])):l(``,!0)]),e.$slots.watermark?(_(),u(`div`,gt,[y(e.$slots,`watermark`,g(m({isPrinting:b(sn)||b(cn)||b(ar)||b(or)})),void 0,!0)])):l(``,!0),d(`div`,{id:`legend-bottom-${w.value}`},null,8,_t),Vt.value&&(F.value.legend.show||e.$slots.legend)?(_(),c(ze,{key:6,to:F.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[d(`div`,{ref_key:`chartLegend`,ref:Lt},[y(e.$slots,`legend`,{legend:jn.value},()=>[F.value.legend.show?(_(),c(Me,{key:0,legendSet:jn.value,config:Mn.value,isCursorPointer:L.value,onClickMarker:te[0]||=({legend:e})=>xn(e.uid)},Be({item:S(({legend:e,index:t})=>[k.value?l(``,!0):(_(),u(`div`,{key:0,onClick:t=>xn(e.uid),style:We(`opacity:${W.value.includes(e.uid)?.5:1}`)},Xe(e.display),13,vt))]),legendToggle:S(()=>[jn.value.length>2&&F.value.legend.selectAllToggle.show&&!k.value?(_(),c(Fe,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:W.value.length>0,isCursorPointer:L.value,onToggle:yn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):l(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:S(({legend:e,index:t})=>[f(ke,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${w.value}_${e.absoluteIndex})`},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:Rt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0),f(b(xt),{teleportTo:P.value.teleportTo,show:H.value.showTooltip&&Nt.value&&W.value.length<C.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:E.value,content:Pt.value,isFullscreen:Q.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:Gt.value===`keyboard`,a11yPosition:Wt.value},{"tooltip-before":S(()=>[y(e.$slots,`tooltip-before`,g(m({...Y.value})),void 0,!0)]),tooltip:S(()=>[y(e.$slots,`tooltip`,g(m({...Y.value})),void 0,!0)]),"tooltip-after":S(()=>[y(e.$slots,`tooltip-after`,g(m({...Y.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`]),!k.value&&Mt.value&&j.value.buttons.table?(_(),c(Je($n.value.component),He({key:8},$n.value.props,{ref_key:`tableUnit`,ref:Ht,onClose:er}),Be({content:S(()=>[f(b(wt),{colNames:Z.value.colNames,head:Z.value.head,body:Z.value.body,config:Z.value.config,title:A.value.table.useDialog?``:$n.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:er},{th:S(({th:e})=>[e===`__SUM__`?(_(),u(`div`,yt,[f(b(St),{name:`sigma`,stroke:Z.value.config.th.color,size:16},null,8,[`stroke`])])):(_(),u(`div`,bt,Xe(e),1))]),td:S(({td:e})=>[Ve(Xe(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[A.value.table.useDialog?{name:`title`,fn:S(()=>[Ve(Xe($n.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:S(()=>[d(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:te[1]||=e=>Gn(j.value.callbacks.csv),style:We({cursor:L.value?`pointer`:`default`})},[f(b(St),{name:`fileCsv`,stroke:$n.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):l(``,!0),y(e.$slots,`skeleton`,{},()=>[k.value?(_(),c(Ne,{key:0})):l(``,!0)],!0)],46,et))}},[[`__scopeId`,`data-v-5087967c`]]);export{$e as n,xt 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"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{n as l}from"./resolveChartConfig-0IvbmIE_.js";import{$ as u,Ct as d,D as f,Dt as p,F as m,Ht as h,Jt as g,P as ee,Qt as te,S as ne,X as re,_ as ie,at as ae,b as oe,i as se,in as ce,jt as le,nt as ue,t as de,tn as fe,v as pe,w as me,yt as he,zt as ge}from"./lib-rPeBMZrn.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./useSvgLabelLayout-42Kats14.js";import{t as be}from"./useConfig-B8qvYKdK.js";import{t as xe}from"./useLoading-DoqqfnmS.js";import{t as Se}from"./usePrinter-DVf3YcG5.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{t as Te}from"./useTransitions-ChGGrtrv.js";import{t as Ee}from"./useUserOptionState-CXlFnwPv.js";import{t as De}from"./useChartAccessibility-DOMuYJfm.js";import{t as Oe}from"./chartImage-DPGnEuYM.js";import{t as ke}from"./Shape-CRe8woTu.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./vue_ui_scatter-7_MRCcGv.js";import{t as Me}from"./Legend-W9YVYVX-.js";import{t as Ne}from"./BaseScanner-m6QR9rwD.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./_plugin-vue_export-helper-BDNMzG2s.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:()=>vn}),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=[`data-cy`,`fill`,`stroke`,`stroke-width`,`rx`],wt=[`onMouseenter`],Tt={key:2,style:{"pointer-events":`none`}},Et=[`fill`,`fill-opacity`],Dt=[`stroke`,`stroke-dasharray`,`stroke-width`],Ot={key:0,style:{"pointer-events":`none`}},kt=[`d`,`stroke`,`stroke-width`],At=[`d`,`stroke`,`stroke-width`],jt=[`d`,`stroke`,`stroke-width`],Mt=[`d`,`stroke`,`stroke-width`],Nt={key:7},Pt=[`points`,`fill`,`stroke-width`,`stroke-dasharray`,`stroke`],Ft={key:0,class:`vue-ui-scatter-datapoint`},It=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseover`,`onMouseleave`,`onClick`],Lt={key:1},Rt=[`transform`,`font-size`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],zt=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-opacity`],Bt={key:0,style:{"pointer-events":`none`}},Vt=[`x`,`y`,`width`,`height`],Ht={key:0,style:{"pointer-events":`none !important`}},Ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Wt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Gt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],Kt=[`x`,`y`,`font-size`,`fill`,`font-weight`],qt=[`x`,`y`,`font-size`,`fill`],Jt=[`x`,`y`,`font-size`,`fill`],Yt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Xt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Zt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],Qt=[`id`,`transform`,`font-size`,`font-weight`,`fill`],$t=[`font-size`,`fill`,`transform`],en=[`transform`,`font-size`,`fill`],tn=[`x`,`y`,`font-size`,`fill`],nn=[`x`,`y`,`font-size`,`fill`],rn=[`font-size`,`font-weight`,`fill`,`x`,`y`],an=[`id`],on=[`x`,`y`,`width`,`height`],sn={key:14,style:{pointerEvents:`none`}},cn=[`x1`,`x2`,`y1`,`y2`,`stroke-dasharray`,`stroke`,`stroke-width`,`clip-path`],ln=[`x`,`y`,`fill`,`font-size`,`font-weight`],un={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},dn={key:6,class:`vue-data-ui-watermark`},fn=[`id`],pn=[`onClick`],mn={key:0,style:{width:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`}},hn={viewBox:`0 0 20 20`,height:`20`,width:`20`,style:{overflow:`hidden`,background:`transparent`}},gn={key:0},_n=[`innerHTML`],vn=/*#__PURE__*/ Le({__name:`vue-ui-scatter`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`,`selectLegend`],setup(e,{expose:Le,emit:tt}){let vn=He(()=>import(`./Tooltip-B432XpvC.js`)),yn=He(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),bn=He(()=>import(`./vue-ui-accordion-BpTfjWvH.js`).then(e=>e.n)),xn=He(()=>import(`./DataTable-KeuZB1JM.js`)),Sn=He(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Cn=He(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),wn=He(()=>import(`./PackageVersion-DAF5ApGl.js`).then(e=>e.t)),Tn=He(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_scatter:En}=be(),A=e,Dn=tt,On=v(()=>!!A.dataset&&A.dataset.length),j=w(re()),kn=w(!1),An=w(``),jn=w(0),M=w(null),Mn=w(null),Nn=w(null),Pn=w(null),Fn=w(null),In=w(0),Ln=w(0),Rn=w(0),N=w([]),zn=w(!1),Bn=w(null),Vn=w(null),Hn=w(null),Un=w(null),Wn=w(null),Gn=w(null),Kn=w(null),qn=w(null),Jn=w(null),Yn=w(null),Xn=w({x:0,y:0}),Zn=w(`pointer`),Qn=w(!1),$n=w(null),P=w(fr()),er=v(()=>P.value.userOptions),F=v(()=>P.value.style.layout.dataLabels.xAxis),I=v(()=>P.value.style.layout.dataLabels.yAxis),L=v(()=>P.value.style.layout.marginalBars),R=v(()=>P.value.style.layout.plots),z=v(()=>P.value.style.tooltip),B=v(()=>P.value.style);_e({config:()=>P.value,dataset:()=>A.dataset,component:`VueUiScatter`,rules:[ve.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:tr}=Te({config:()=>P.value.transitions,dataset:()=>A.dataset}),nr=v(()=>P.value.userOptions.useCursorPointer),rr=v(()=>p(P.value.events?.datapointClick));function ir(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),m=e=>e.reduce((e,t)=>e+t,0)/e.length,h=m(f),g=m(p);for(let e=0;e<d;e+=1)f[e]-=h,p[e]-=g;let ee=(e,t)=>e.reduce((e,n,r)=>e+n*t[r],0),te=e=>ee(e,e),ne=ee(p,f)/te(f),re=p.map((e,t)=>e-ne*f[t]),ie=te(f)/d,ae=te(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(te(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 ar=v(()=>ce({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:P.value.skeletonConfig??{}})),{loading:or,FINAL_DATASET:sr,manualLoading:cr}=xe({...$e(A),FINAL_CONFIG:P,prepareConfig:fr,skeletonDataset:A.config?.skeletonDataset??[{name:``,color:`#999999`,values:ir(100,.5,{seed:42})}],skeletonConfig:ce({defaultConfig:P.value,userConfig:ar.value})}),{userOptionsVisible:lr,setUserOptionsVisibility:ur,keepUserOptionState:dr}=Ee({config:P.value}),{svgRef:V}=De({config:B.value.title});function fr(){return l(A.config,En,je)}let pr=te(A.config);et(()=>A.config,(e,t)=>{let n=te(e),r=n!==pr;pr=n;let i=fr();r?(or.value||(P.value=i),lr.value=!P.value.userOptions.showOnChartHover,yr(),In.value+=1,Ln.value+=1,Rn.value+=1,H.value.showTable=P.value.table.show,H.value.showTooltip=z.value.show,vr.value&&P.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"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{n as l}from"./resolveChartConfig-QgMumfgd.js";import{$ as u,Ct as d,D as f,Dt as p,F as m,Ht as h,Jt as g,P as ee,Qt as te,S as ne,X as re,_ as ie,at as ae,b as oe,i as se,in as ce,jt as le,nt as ue,t as de,tn as fe,v as pe,w as me,yt as he,zt as ge}from"./lib-BaWaqwnJ.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./useSvgLabelLayout-42Kats14.js";import{t as be}from"./useConfig-B-AzS3w-.js";import{t as xe}from"./useLoading-DoqqfnmS.js";import{t as Se}from"./usePrinter-CUD8gosC.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{t as Te}from"./useTransitions-ChGGrtrv.js";import{t as Ee}from"./useUserOptionState-CXlFnwPv.js";import{t as De}from"./useChartAccessibility-DOMuYJfm.js";import{t as Oe}from"./chartImage-Dvrx_F7P.js";import{t as ke}from"./Shape-DgpYvQc4.js";import{n as Ae}from"./Title-DlhGIAWX.js";import{t as je}from"./vue_ui_scatter-7_MRCcGv.js";import{t as Me}from"./Legend-D5I3jeGD.js";import{t as Ne}from"./BaseScanner-m6QR9rwD.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./BaseLegendToggle-CnQ_U5rI.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./_plugin-vue_export-helper-BDNMzG2s.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:()=>vn}),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=[`data-cy`,`fill`,`stroke`,`stroke-width`,`rx`],wt=[`onMouseenter`],Tt={key:2,style:{"pointer-events":`none`}},Et=[`fill`,`fill-opacity`],Dt=[`stroke`,`stroke-dasharray`,`stroke-width`],Ot={key:0,style:{"pointer-events":`none`}},kt=[`d`,`stroke`,`stroke-width`],At=[`d`,`stroke`,`stroke-width`],jt=[`d`,`stroke`,`stroke-width`],Mt=[`d`,`stroke`,`stroke-width`],Nt={key:7},Pt=[`points`,`fill`,`stroke-width`,`stroke-dasharray`,`stroke`],Ft={key:0,class:`vue-ui-scatter-datapoint`},It=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseover`,`onMouseleave`,`onClick`],Lt={key:1},Rt=[`transform`,`font-size`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],zt=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-opacity`],Bt={key:0,style:{"pointer-events":`none`}},Vt=[`x`,`y`,`width`,`height`],Ht={key:0,style:{"pointer-events":`none !important`}},Ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Wt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Gt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],Kt=[`x`,`y`,`font-size`,`fill`,`font-weight`],qt=[`x`,`y`,`font-size`,`fill`],Jt=[`x`,`y`,`font-size`,`fill`],Yt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Xt=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Zt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],Qt=[`id`,`transform`,`font-size`,`font-weight`,`fill`],$t=[`font-size`,`fill`,`transform`],en=[`transform`,`font-size`,`fill`],tn=[`x`,`y`,`font-size`,`fill`],nn=[`x`,`y`,`font-size`,`fill`],rn=[`font-size`,`font-weight`,`fill`,`x`,`y`],an=[`id`],on=[`x`,`y`,`width`,`height`],sn={key:14,style:{pointerEvents:`none`}},cn=[`x1`,`x2`,`y1`,`y2`,`stroke-dasharray`,`stroke`,`stroke-width`,`clip-path`],ln=[`x`,`y`,`fill`,`font-size`,`font-weight`],un={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},dn={key:6,class:`vue-data-ui-watermark`},fn=[`id`],pn=[`onClick`],mn={key:0,style:{width:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`}},hn={viewBox:`0 0 20 20`,height:`20`,width:`20`,style:{overflow:`hidden`,background:`transparent`}},gn={key:0},_n=[`innerHTML`],vn=/*#__PURE__*/ Le({__name:`vue-ui-scatter`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`,`selectLegend`],setup(e,{expose:Le,emit:tt}){let vn=He(()=>import(`./Tooltip-CL3U31cL.js`)),yn=He(()=>import(`./BaseIcon-CQFjKDhE.js`).then(e=>e.n)),bn=He(()=>import(`./vue-ui-accordion-B8LYfVG9.js`).then(e=>e.n)),xn=He(()=>import(`./DataTable-BHW5xD9B.js`)),Sn=He(()=>import(`./PenAndPaper-B2UOwiJM.js`).then(e=>e.t)),Cn=He(()=>import(`./UserOptions-B97cPcKc.js`).then(e=>e.n)),wn=He(()=>import(`./PackageVersion-B-1JX0wI.js`).then(e=>e.t)),Tn=He(()=>import(`./BaseDraggableDialog-MyWIeEtr.js`).then(e=>e.n)),{vue_ui_scatter:En}=be(),A=e,Dn=tt,On=v(()=>!!A.dataset&&A.dataset.length),j=w(re()),kn=w(!1),An=w(``),jn=w(0),M=w(null),Mn=w(null),Nn=w(null),Pn=w(null),Fn=w(null),In=w(0),Ln=w(0),Rn=w(0),N=w([]),zn=w(!1),Bn=w(null),Vn=w(null),Hn=w(null),Un=w(null),Wn=w(null),Gn=w(null),Kn=w(null),qn=w(null),Jn=w(null),Yn=w(null),Xn=w({x:0,y:0}),Zn=w(`pointer`),Qn=w(!1),$n=w(null),P=w(fr()),er=v(()=>P.value.userOptions),F=v(()=>P.value.style.layout.dataLabels.xAxis),I=v(()=>P.value.style.layout.dataLabels.yAxis),L=v(()=>P.value.style.layout.marginalBars),R=v(()=>P.value.style.layout.plots),z=v(()=>P.value.style.tooltip),B=v(()=>P.value.style);_e({config:()=>P.value,dataset:()=>A.dataset,component:`VueUiScatter`,rules:[ve.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:tr}=Te({config:()=>P.value.transitions,dataset:()=>A.dataset}),nr=v(()=>P.value.userOptions.useCursorPointer),rr=v(()=>p(P.value.events?.datapointClick));function ir(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),m=e=>e.reduce((e,t)=>e+t,0)/e.length,h=m(f),g=m(p);for(let e=0;e<d;e+=1)f[e]-=h,p[e]-=g;let ee=(e,t)=>e.reduce((e,n,r)=>e+n*t[r],0),te=e=>ee(e,e),ne=ee(p,f)/te(f),re=p.map((e,t)=>e-ne*f[t]),ie=te(f)/d,ae=te(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(te(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 ar=v(()=>ce({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:P.value.skeletonConfig??{}})),{loading:or,FINAL_DATASET:sr,manualLoading:cr}=xe({...$e(A),FINAL_CONFIG:P,prepareConfig:fr,skeletonDataset:A.config?.skeletonDataset??[{name:``,color:`#999999`,values:ir(100,.5,{seed:42})}],skeletonConfig:ce({defaultConfig:P.value,userConfig:ar.value})}),{userOptionsVisible:lr,setUserOptionsVisibility:ur,keepUserOptionState:dr}=Ee({config:P.value}),{svgRef:V}=De({config:B.value.title});function fr(){return l(A.config,En,je)}let pr=te(A.config);et(()=>A.config,(e,t)=>{let n=te(e),r=n!==pr;pr=n;let i=fr();r?(or.value||(P.value=i),lr.value=!P.value.userOptions.showOnChartHover,yr(),In.value+=1,Ln.value+=1,Rn.value+=1,H.value.showTable=P.value.table.show,H.value.showTooltip=z.value.show,vr.value&&P.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{B as t,Jt as n,M as r,X as i,t as a}from"./lib-rPeBMZrn.js";import{t as ee}from"./useNestedProp-DnGoh-XS.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as re}from"./useConfig-B8qvYKdK.js";import{n as o}from"./PackageVersion-DAF5ApGl.js";import{t as ie}from"./DefGrad-DKMq1REY.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.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__*/ s({__name:`vue-ui-skeleton`,props:{config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_skeleton:s}=re(),b=e,G=_(`vue-ui-skeleton-${i()}`),K=l(()=>ee({userConfig:b.config,defaultConfig:s})),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(()=>r({plot:{x:50,y:50},radius:40,sides:6}).path),Di=l(()=>r({plot:{x:50,y:50},radius:30,sides:6}).path),Oi=l(()=>r({plot:{x:50,y:50},radius:20,sides:6}).path),ki=l(()=>r({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,r)=>(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(o),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(o),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(o),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(o),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(o),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(o),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{B as t,Jt as n,M as r,X as i,t as a}from"./lib-BaWaqwnJ.js";import{t as ee}from"./useNestedProp-ri-deXpG.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as re}from"./useConfig-B-AzS3w-.js";import{n as o}from"./PackageVersion-B-1JX0wI.js";import{t as ie}from"./DefGrad-DKMq1REY.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.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__*/ s({__name:`vue-ui-skeleton`,props:{config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_skeleton:s}=re(),b=e,G=_(`vue-ui-skeleton-${i()}`),K=l(()=>ee({userConfig:b.config,defaultConfig:s})),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(()=>r({plot:{x:50,y:50},radius:40,sides:6}).path),Di=l(()=>r({plot:{x:50,y:50},radius:30,sides:6}).path),Oi=l(()=>r({plot:{x:50,y:50},radius:20,sides:6}).path),ki=l(()=>r({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,r)=>(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(o),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(o),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(o),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(o),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(o),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(o),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