vue-data-ui 3.22.0 → 3.22.2

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 (199) hide show
  1. package/dist/{Arrow-_pDGXl76.js → Arrow-BGhJI-qh.js} +1 -1
  2. package/dist/{BaseDraggableDialog-O8jn9Lvi.js → BaseDraggableDialog-a9xCKjW-.js} +2 -2
  3. package/dist/{BaseIcon-CWXbczu_.js → BaseIcon-DEtwcvEH.js} +1 -1
  4. package/dist/{BaseLegendToggle-CUYal8mC.js → BaseLegendToggle-B-lM0iV1.js} +1 -1
  5. package/dist/{BaseZoomControls-JwSGzoKi.js → BaseZoomControls-BjjT6vtB.js} +2 -2
  6. package/dist/{ColorPicker-CCqmzGGo.js → ColorPicker-DMLahA2S.js} +2 -2
  7. package/dist/{DataTable-G9aclxhk.js → DataTable-DJZgdnIn.js} +2 -2
  8. package/dist/{Legend-CAStwHdx.js → Legend-BVDhEEsC.js} +2 -2
  9. package/dist/{NonSvgPenAndPaper-BLy8zMox.js → NonSvgPenAndPaper-Dwq_M6Bz.js} +13 -13
  10. package/dist/{PackageVersion-DxBQctV8.js → PackageVersion-Dx81ZIAL.js} +1 -1
  11. package/dist/{PenAndPaper-z1woaB1V.js → PenAndPaper-DJIIG6dv.js} +13 -13
  12. package/dist/{Shape-BubavoqO.js → Shape-C5OvuwII.js} +1 -1
  13. package/dist/{Slicer-JCOpjPU7.js → Slicer-ClR833cP.js} +2 -2
  14. package/dist/{SlicerPreview-BA_RDgVn.js → SlicerPreview-CAhqG_ZQ.js} +12 -12
  15. package/dist/{SparkTooltip-DMFXQmFi.js → SparkTooltip-DTzo8Sah.js} +6 -6
  16. package/dist/{Title-DH6G8_cZ.js → Title-CVYf1f8m.js} +1 -1
  17. package/dist/{Tooltip-979Ytd8R.js → Tooltip-BmGCBJuU.js} +1 -1
  18. package/dist/{UserOptions-rx9hUnOy.js → UserOptions-xqbNpHi2.js} +2 -2
  19. package/dist/components/arrow.js +1 -1
  20. package/dist/components/vue-ui-3d-bar.js +1 -1
  21. package/dist/components/vue-ui-accordion.js +1 -1
  22. package/dist/components/vue-ui-age-pyramid.js +1 -1
  23. package/dist/components/vue-ui-annotator.js +1 -1
  24. package/dist/components/vue-ui-bullet.js +1 -1
  25. package/dist/components/vue-ui-bump.js +1 -1
  26. package/dist/components/vue-ui-candlestick.js +1 -1
  27. package/dist/components/vue-ui-carousel-table.js +1 -1
  28. package/dist/components/vue-ui-chestnut.js +1 -1
  29. package/dist/components/vue-ui-chord.js +1 -1
  30. package/dist/components/vue-ui-circle-pack.js +1 -1
  31. package/dist/components/vue-ui-cursor.js +1 -1
  32. package/dist/components/vue-ui-dag.js +1 -1
  33. package/dist/components/vue-ui-dashboard.js +1 -1
  34. package/dist/components/vue-ui-digits.js +1 -1
  35. package/dist/components/vue-ui-donut-evolution.js +1 -1
  36. package/dist/components/vue-ui-donut.js +1 -1
  37. package/dist/components/vue-ui-dumbbell.js +1 -1
  38. package/dist/components/vue-ui-flow.js +1 -1
  39. package/dist/components/vue-ui-funnel.js +1 -1
  40. package/dist/components/vue-ui-galaxy.js +1 -1
  41. package/dist/components/vue-ui-gauge.js +1 -1
  42. package/dist/components/vue-ui-geo.js +1 -1
  43. package/dist/components/vue-ui-gizmo.js +1 -1
  44. package/dist/components/vue-ui-heatmap.js +1 -1
  45. package/dist/components/vue-ui-history-plot.js +1 -1
  46. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  47. package/dist/components/vue-ui-icon.js +1 -1
  48. package/dist/components/vue-ui-kpi.js +1 -1
  49. package/dist/components/vue-ui-mini-loader.js +1 -1
  50. package/dist/components/vue-ui-molecule.js +1 -1
  51. package/dist/components/vue-ui-mood-radar.js +1 -1
  52. package/dist/components/vue-ui-nested-donuts.js +1 -1
  53. package/dist/components/vue-ui-onion.js +1 -1
  54. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  55. package/dist/components/vue-ui-quadrant.js +1 -1
  56. package/dist/components/vue-ui-quick-chart.js +1 -1
  57. package/dist/components/vue-ui-radar.js +1 -1
  58. package/dist/components/vue-ui-rating.js +1 -1
  59. package/dist/components/vue-ui-relation-circle.js +1 -1
  60. package/dist/components/vue-ui-ridgeline.js +1 -1
  61. package/dist/components/vue-ui-rings.js +1 -1
  62. package/dist/components/vue-ui-scatter.js +1 -1
  63. package/dist/components/vue-ui-skeleton.js +1 -1
  64. package/dist/components/vue-ui-smiley.js +1 -1
  65. package/dist/components/vue-ui-spark-trend.js +1 -1
  66. package/dist/components/vue-ui-sparkbar.js +1 -1
  67. package/dist/components/vue-ui-sparkgauge.js +1 -1
  68. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  69. package/dist/components/vue-ui-sparkline.js +1 -1
  70. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  71. package/dist/components/vue-ui-stackbar.js +1 -1
  72. package/dist/components/vue-ui-stackline.js +1 -1
  73. package/dist/components/vue-ui-strip-plot.js +1 -1
  74. package/dist/components/vue-ui-table-heatmap.js +1 -1
  75. package/dist/components/vue-ui-table-sparkline.js +1 -1
  76. package/dist/components/vue-ui-table.js +1 -1
  77. package/dist/components/vue-ui-thermometer.js +1 -1
  78. package/dist/components/vue-ui-timer.js +1 -1
  79. package/dist/components/vue-ui-tiremarks.js +1 -1
  80. package/dist/components/vue-ui-treemap.js +1 -1
  81. package/dist/components/vue-ui-vertical-bar.js +1 -1
  82. package/dist/components/vue-ui-waffle.js +1 -1
  83. package/dist/components/vue-ui-wheel.js +1 -1
  84. package/dist/components/vue-ui-word-cloud.js +1 -1
  85. package/dist/components/vue-ui-world.js +1 -1
  86. package/dist/components/vue-ui-xy-canvas.js +1 -1
  87. package/dist/components/vue-ui-xy.js +1 -1
  88. package/dist/{dom-to-png-CtV3uxDJ.js → dom-to-png-rjAIVHxa.js} +1 -1
  89. package/dist/exposedLib-CffbQxjN.js +19 -0
  90. package/dist/{img-C_RNNswI.js → img-BCAOkqfM.js} +1 -1
  91. package/dist/{labelUtils-Bycs-017.js → labelUtils-C0D1tjig.js} +1 -1
  92. package/dist/{lib-AJRHFE5U.js → lib-CXicicWN.js} +155 -126
  93. package/dist/{package-0oRlvBuX.js → package-CILLITOI.js} +1 -1
  94. package/dist/{pdf-CdX23zf1.js → pdf-ChYv2jb6.js} +1 -1
  95. package/dist/{render-common-DSiH7qj-.js → render-common-bMAFQ_qf.js} +2 -2
  96. package/dist/ssr/vue-ui-donut.js +1 -1
  97. package/dist/ssr/vue-ui-xy.js +1 -1
  98. package/dist/ssr.js +2 -2
  99. package/dist/style.css +1 -1
  100. package/dist/types/vue-data-ui.d.ts +7 -10
  101. package/dist/{useAutoSizeLabelsInsideViewbox-kjVKQz36.js → useAutoSizeLabelsInsideViewbox-B4-0yo3K.js} +1 -1
  102. package/dist/{useConfig-Br1uzq_L.js → useConfig-Bf_EBbe3.js} +4 -1
  103. package/dist/{useNestedProp-DtcXIg7n.js → useNestedProp-APyFoLCQ.js} +1 -1
  104. package/dist/{useObjectBindings-CxQ6A5pi.js → useObjectBindings-Byts-nf-.js} +1 -1
  105. package/dist/{usePrinter-6n2MzVyV.js → usePrinter-Dng0UK-G.js} +2 -2
  106. package/dist/utils.js +3 -3
  107. package/dist/{vue-data-ui-DoViN_4r.js → vue-data-ui-DD-txoS1.js} +68 -68
  108. package/dist/vue-data-ui.js +72 -72
  109. package/dist/vue-ui-3d-bar-DxfNdF2e.js +1757 -0
  110. package/dist/{vue-ui-accordion-HvsT8_RM.js → vue-ui-accordion-Di_givzQ.js} +4 -4
  111. package/dist/vue-ui-age-pyramid-CTwMfsqS.js +1238 -0
  112. package/dist/{vue-ui-annotator-7s5ly6XJ.js → vue-ui-annotator-tRkLFMQ9.js} +60 -60
  113. package/dist/{vue-ui-bullet-B-bWGz6d.js → vue-ui-bullet-9gtGJaGb.js} +23 -23
  114. package/dist/{vue-ui-bump-DM-hF-AK.js → vue-ui-bump-BJ5O8Mps.js} +400 -400
  115. package/dist/{vue-ui-candlestick-BfOvntqR.js → vue-ui-candlestick-CJ_VVYbJ.js} +50 -50
  116. package/dist/vue-ui-carousel-table-8s8BSy-K.js +455 -0
  117. package/dist/vue-ui-chestnut-D3-ck2h2.js +2010 -0
  118. package/dist/vue-ui-chord-1BitQtEw.js +1391 -0
  119. package/dist/{vue-ui-circle-pack-BBaRLELd.js → vue-ui-circle-pack-DVMhDFKU.js} +44 -44
  120. package/dist/{vue-ui-cursor-DWlKtcab.js → vue-ui-cursor-D7yh10hX.js} +61 -61
  121. package/dist/{vue-ui-dag-BAKU4jBj.js → vue-ui-dag--LFEAAf_.js} +18 -18
  122. package/dist/{vue-ui-dashboard-DE4R55nU.js → vue-ui-dashboard-COeO878g.js} +70 -70
  123. package/dist/{vue-ui-digits-B416Mj46.js → vue-ui-digits-C50FVr7C.js} +4 -4
  124. package/dist/{vue-ui-donut-BuGSF4pM.js → vue-ui-donut-BzKXqQA2.js} +160 -160
  125. package/dist/{vue-ui-donut-BugVAUHv.js → vue-ui-donut-NHjQzFO5.js} +474 -474
  126. package/dist/vue-ui-donut-evolution-lPkwit2C.js +1510 -0
  127. package/dist/vue-ui-dumbbell-hlEfvbbf.js +1530 -0
  128. package/dist/{vue-ui-flow-BoEP6hmg.js → vue-ui-flow-Bg_OSszc.js} +43 -43
  129. package/dist/vue-ui-funnel-B_bK0jJB.js +777 -0
  130. package/dist/{vue-ui-galaxy-CB5F8Q-u.js → vue-ui-galaxy-WVCUzcYc.js} +301 -301
  131. package/dist/vue-ui-gauge-Cqeko0wA.js +920 -0
  132. package/dist/{vue-ui-geo-BAy4kNv-.js → vue-ui-geo-DtzXRvmx.js} +22 -22
  133. package/dist/{vue-ui-gizmo-DjA8cqcl.js → vue-ui-gizmo-hIFd7qck.js} +4 -4
  134. package/dist/{vue-ui-heatmap-CMlxUI7Q.js → vue-ui-heatmap-yPlwc3l_.js} +95 -95
  135. package/dist/vue-ui-history-plot-BGmcDg2w.js +1554 -0
  136. package/dist/{vue-ui-horizontal-bar-XgzEVwOK.js → vue-ui-horizontal-bar-CJciNHpT.js} +264 -264
  137. package/dist/{vue-ui-kpi-B5Lu5U1S.js → vue-ui-kpi-DmSe1QGb.js} +4 -4
  138. package/dist/{vue-ui-mini-loader-CyYpLcrt.js → vue-ui-mini-loader-CqxI6DwN.js} +3 -3
  139. package/dist/{vue-ui-molecule-DzpgAmZn.js → vue-ui-molecule-w-94Uktn.js} +181 -181
  140. package/dist/{vue-ui-mood-radar-DMgYQtOw.js → vue-ui-mood-radar-B3OGWGHR.js} +29 -29
  141. package/dist/{vue-ui-nested-donuts-BHX0QqvR.js → vue-ui-nested-donuts-Dv_yE5EV.js} +211 -211
  142. package/dist/{vue-ui-onion-CYh7tdS0.js → vue-ui-onion-BQbI0Vxd.js} +34 -34
  143. package/dist/{vue-ui-parallel-coordinate-plot-BTaG92hV.js → vue-ui-parallel-coordinate-plot-ColST3Jj.js} +40 -40
  144. package/dist/vue-ui-quadrant-BB7qdXK0.js +1978 -0
  145. package/dist/{vue-ui-quick-chart-CHSUGLTx.js → vue-ui-quick-chart-CGDeo3Fx.js} +358 -358
  146. package/dist/vue-ui-radar-DqDn14DL.js +1281 -0
  147. package/dist/{vue-ui-rating-BoBLJm55.js → vue-ui-rating-ChDwpol2.js} +34 -34
  148. package/dist/vue-ui-relation-circle-BvfZqcK0.js +924 -0
  149. package/dist/{vue-ui-ridgeline-q_UhtM4M.js → vue-ui-ridgeline-Cq8z57xB.js} +219 -219
  150. package/dist/{vue-ui-rings-VOjUZu2b.js → vue-ui-rings-Ds-sgNPK.js} +36 -36
  151. package/dist/{vue-ui-scatter-DETMofE2.js → vue-ui-scatter-BgOVUzQ3.js} +75 -75
  152. package/dist/{vue-ui-skeleton-D36VILNm.js → vue-ui-skeleton-DJ5KAbfV.js} +42 -42
  153. package/dist/{vue-ui-smiley-CPbUSUTQ.js → vue-ui-smiley-fFrNX-Gl.js} +17 -17
  154. package/dist/{vue-ui-spark-trend-XpEbgNeK.js → vue-ui-spark-trend-D6OBWxmg.js} +92 -92
  155. package/dist/{vue-ui-sparkbar-Dq1hnBhL.js → vue-ui-sparkbar-CtCP8O44.js} +78 -78
  156. package/dist/{vue-ui-sparkgauge-CbAakuhB.js → vue-ui-sparkgauge-CZDkyViI.js} +38 -38
  157. package/dist/vue-ui-sparkhistogram-DgruLf33.js +560 -0
  158. package/dist/vue-ui-sparkline-CJKE7Xcl.js +1547 -0
  159. package/dist/{vue-ui-sparkstackbar-OprYrGQQ.js → vue-ui-sparkstackbar-BSV0M-2u.js} +162 -162
  160. package/dist/{vue-ui-stackbar-Bt0FKlf7.js → vue-ui-stackbar-pnlYCnTj.js} +67 -67
  161. package/dist/vue-ui-stackline-DS_MPmc1.js +2398 -0
  162. package/dist/{vue-ui-strip-plot-DdzflSOm.js → vue-ui-strip-plot-DSKOrJZX.js} +49 -49
  163. package/dist/{vue-ui-table-BZbLau0d.js → vue-ui-table-c1FPEwLM.js} +87 -87
  164. package/dist/{vue-ui-table-heatmap-DX80uRHe.js → vue-ui-table-heatmap-CMQJXnP8.js} +17 -17
  165. package/dist/vue-ui-table-sparkline-CAS9Pk60.js +712 -0
  166. package/dist/vue-ui-thermometer-w3eeJv9s.js +763 -0
  167. package/dist/{vue-ui-timer-smc39MBP.js → vue-ui-timer-CSP48eS-.js} +6 -6
  168. package/dist/{vue-ui-tiremarks-MwPUc9H4.js → vue-ui-tiremarks-DJvXj1P3.js} +19 -19
  169. package/dist/vue-ui-treemap-BaOMXTR1.js +1587 -0
  170. package/dist/vue-ui-waffle-Bo22Ph8n.js +1362 -0
  171. package/dist/{vue-ui-wheel-VQ5Sc_Kt.js → vue-ui-wheel-CbL52G-w.js} +51 -51
  172. package/dist/vue-ui-word-cloud-BqOCyp7c.js +1723 -0
  173. package/dist/{vue-ui-world-Dq9I3omC.js → vue-ui-world-BkjzCcVh.js} +445 -445
  174. package/dist/{vue-ui-xy-BRITAMZZ.js → vue-ui-xy-CVDNhnDY.js} +162 -162
  175. package/dist/{vue-ui-xy-D4D9tjiY.js → vue-ui-xy-DuwLRfr4.js} +537 -534
  176. package/dist/{vue-ui-xy-canvas-CYQF5hVa.js → vue-ui-xy-canvas-CXqGVMeQ.js} +65 -65
  177. package/package.json +2 -2
  178. package/dist/exposedLib-BJbE_A8E.js +0 -19
  179. package/dist/vue-ui-3d-bar-BUEcrSrc.js +0 -1757
  180. package/dist/vue-ui-age-pyramid-Zw5otO78.js +0 -1238
  181. package/dist/vue-ui-carousel-table-CrmVyfym.js +0 -455
  182. package/dist/vue-ui-chestnut-BQq65pNh.js +0 -2010
  183. package/dist/vue-ui-chord-BA2jFRMP.js +0 -1391
  184. package/dist/vue-ui-donut-evolution-C6fXP7QH.js +0 -1510
  185. package/dist/vue-ui-dumbbell-1K5kOirf.js +0 -1530
  186. package/dist/vue-ui-funnel-CheSqvyj.js +0 -777
  187. package/dist/vue-ui-gauge-Cjtovl1s.js +0 -920
  188. package/dist/vue-ui-history-plot-PkrNUPpp.js +0 -1554
  189. package/dist/vue-ui-quadrant-C00cEk5o.js +0 -1978
  190. package/dist/vue-ui-radar-jNxRTIur.js +0 -1281
  191. package/dist/vue-ui-relation-circle-Ne_rI2jS.js +0 -924
  192. package/dist/vue-ui-sparkhistogram-DpPjIA7n.js +0 -560
  193. package/dist/vue-ui-sparkline-DLay6Hog.js +0 -1513
  194. package/dist/vue-ui-stackline-CrUTz-k1.js +0 -2398
  195. package/dist/vue-ui-table-sparkline-C3_J575b.js +0 -707
  196. package/dist/vue-ui-thermometer-Bo32hwAO.js +0 -763
  197. package/dist/vue-ui-treemap-BNG7Zc04.js +0 -1587
  198. package/dist/vue-ui-waffle-D-9Ny9vN.js +0 -1362
  199. package/dist/vue-ui-word-cloud-BqsUdsCY.js +0 -1656
@@ -0,0 +1,1723 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { Et as t, G as n, H as r, J as i, S as a, U as o, Ut as s, Vt as c, X as l, ct as u, gt as d, kt as f, t as p, v as m, y as h } from "./lib-CXicicWN.js";
3
+ import { t as g } from "./useConfig-Bf_EBbe3.js";
4
+ import { t as _ } from "./usePrinter-Dng0UK-G.js";
5
+ import { n as v, t as y } from "./BaseScanner-DZvpgOjM.js";
6
+ import { t as ee } from "./useSvgExport-SVIsDot8.js";
7
+ import { t as te } from "./useNestedProp-APyFoLCQ.js";
8
+ import { t as b } from "./useThemeCheck-C43Tcqmk.js";
9
+ import { t as x } from "./img-BCAOkqfM.js";
10
+ import { n as S } from "./Title-CVYf1f8m.js";
11
+ import { t as C } from "./_plugin-vue_export-helper-B3ysoDQm.js";
12
+ import { r as w } from "./canvas-lib-BOP_HS11.js";
13
+ import { t as T } from "./useResponsive-BfnK0KxU.js";
14
+ import { t as ne } from "./A11yDataTable-DdRsVULz.js";
15
+ import { t as E } from "./useUserOptionState-DK-_1ddE.js";
16
+ import { t as re } from "./useChartAccessibility-DYqac8yF.js";
17
+ import { t as D } from "./usePanZoom-CYU3B4T3.js";
18
+ import { t as ie } from "./vue_ui_word_cloud-C-qIMNLu.js";
19
+ import { t as ae } from "./BaseZoomControls-BjjT6vtB.js";
20
+ import { Fragment as oe, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createSlots as se, createTextVNode as ce, createVNode as le, defineAsyncComponent as N, guardReactiveProps as P, mergeProps as ue, nextTick as de, normalizeClass as fe, normalizeProps as F, normalizeStyle as pe, onBeforeUnmount as me, onMounted as he, openBlock as I, ref as L, renderList as ge, renderSlot as R, resolveDynamicComponent as _e, shallowRef as ve, toDisplayString as ye, toRefs as be, unref as z, watch as xe, withCtx as B } from "vue";
21
+ //#region src/wordcloud.js
22
+ var Se = {
23
+ fast: {
24
+ spiralStep: 6,
25
+ fallbackSpiralStep: 2,
26
+ spiralRadiusStep: 2,
27
+ fallbackSpiralRadiusStep: 1,
28
+ primaryAttempts: 1e4,
29
+ fallbackAttempts: 25e3,
30
+ minimumVisualPadding: 2,
31
+ scaleStep: .9
32
+ },
33
+ balanced: {
34
+ spiralStep: 4,
35
+ fallbackSpiralStep: 1,
36
+ spiralRadiusStep: 1.5,
37
+ fallbackSpiralRadiusStep: 1,
38
+ primaryAttempts: 2e4,
39
+ fallbackAttempts: 5e4,
40
+ minimumVisualPadding: 3,
41
+ scaleStep: .92
42
+ },
43
+ precise: {
44
+ spiralStep: 2,
45
+ fallbackSpiralStep: 1,
46
+ spiralRadiusStep: 1,
47
+ fallbackSpiralRadiusStep: .75,
48
+ primaryAttempts: 5e4,
49
+ fallbackAttempts: 1e5,
50
+ minimumVisualPadding: 4,
51
+ scaleStep: .95
52
+ }
53
+ }, Ce = "fast";
54
+ function we(e) {
55
+ return Se[e] || Se[Ce];
56
+ }
57
+ var Te = /* @__PURE__ */ new Map();
58
+ function Ee(e) {
59
+ let t = String(e), n = Te.get(t);
60
+ if (n) return n;
61
+ let r = Math.PI / 180, i = [], a = [];
62
+ for (let t = 0; t < 360; t += e) {
63
+ let e = t * r;
64
+ i.push(Math.cos(e)), a.push(Math.sin(e));
65
+ }
66
+ let o = {
67
+ cosineArray: i,
68
+ sineArray: a
69
+ };
70
+ return Te.set(t, o), o;
71
+ }
72
+ function De({ word: e, fontSize: t, pad: n, canvas: r, ctx: i, svg: a }) {
73
+ let o = a.style && a.style.bold, s = a.style && a.style.fontFamily || "Arial, \"Noto Sans Arabic\", Tahoma, sans-serif", c = `${o ? "bold " : ""}${t}px ${s}`, l = String(e.name || ""), u = /[\u0600-\u06FF]/.test(l);
74
+ i.font = c, i.direction = u ? "rtl" : "ltr", i.textAlign = "left", i.textBaseline = "alphabetic";
75
+ let d = i.measureText(l), f = Math.ceil(Math.abs(d.actualBoundingBoxLeft || 0)), p = Math.ceil(Math.abs(d.actualBoundingBoxRight || d.width)), m = Math.ceil(d.actualBoundingBoxAscent || t), h = Math.ceil(d.actualBoundingBoxDescent || t * .25), g = Math.max(0, Math.round(n || 0)) + Math.ceil(t * (u ? .22 : .12)), _ = Math.max(1, f + p + g * 2), v = Math.max(1, m + h + g * 2);
76
+ r.width = _, r.height = v, i.font = c, i.direction = u ? "rtl" : "ltr", i.textAlign = "left", i.textBaseline = "alphabetic", i.fillStyle = "black";
77
+ let y = g + f, ee = g + m;
78
+ i.fillText(l, y, ee);
79
+ let te = i.getImageData(0, 0, _, v).data, b = [], x = [], S = _, C = v, w = 0, T = 0, ne = !1;
80
+ for (let e = 0; e < v; e += 1) {
81
+ let t = e * _ * 4, n = -1, r = !1;
82
+ for (let i = 0; i < _; i += 1) te[t + i * 4 + 3] > 1 ? (b.push([i, e]), ne = !0, i < S && (S = i), i > w && (w = i), e < C && (C = e), e > T && (T = e), r || (r = !0, n = i)) : r && (x.push([
83
+ e,
84
+ n,
85
+ i - 1
86
+ ]), r = !1, n = -1);
87
+ r && x.push([
88
+ e,
89
+ n,
90
+ _ - 1
91
+ ]);
92
+ }
93
+ return ne || (S = 0, C = 0, w = 0, T = 0), {
94
+ w: _,
95
+ h: v,
96
+ wordMask: b,
97
+ runs: x,
98
+ minX: S,
99
+ minY: C,
100
+ maxX: w,
101
+ maxY: T
102
+ };
103
+ }
104
+ function Oe(e) {
105
+ let t = [];
106
+ if (!e.length) return t;
107
+ let n = e[0][1], r = e[0][0], i = r;
108
+ for (let a = 1; a < e.length; a += 1) {
109
+ let o = e[a][0], s = e[a][1];
110
+ s === n ? o === i + 1 ? i = o : (t.push([
111
+ n,
112
+ r,
113
+ i
114
+ ]), r = o, i = o) : (t.push([
115
+ n,
116
+ r,
117
+ i
118
+ ]), n = s, r = o, i = o);
119
+ }
120
+ return t.push([
121
+ n,
122
+ r,
123
+ i
124
+ ]), t;
125
+ }
126
+ function ke(e, t) {
127
+ return 4294967295 >>> 32 - (t - e + 1) << e >>> 0;
128
+ }
129
+ function Ae(e) {
130
+ return 4294967295 << e >>> 0;
131
+ }
132
+ function je(e) {
133
+ return 4294967295 >>> 31 - e >>> 0;
134
+ }
135
+ function Me({ maskBits: e, maskRowStride: t, maskW: n, maskH: r, wx: i, wy: a, runs: o }) {
136
+ for (let s = 0; s < o.length; s += 1) {
137
+ let c = o[s][0], l = o[s][1], u = o[s][2], d = a + c;
138
+ if (d < 0 || d >= r) return !1;
139
+ let f = i + l, p = i + u;
140
+ if (f < 0 || p >= n) return !1;
141
+ let m = d * t, h = f >>> 5, g = p >>> 5, _ = f & 31, v = p & 31;
142
+ if (h === g) {
143
+ if (e[m + h] & ke(_, v)) return !1;
144
+ } else {
145
+ if (e[m + h] & Ae(_)) return !1;
146
+ for (let t = h + 1; t < g; t += 1) if (e[m + t]) return !1;
147
+ if (e[m + g] & je(v)) return !1;
148
+ }
149
+ }
150
+ return !0;
151
+ }
152
+ function Ne({ maskBits: e, maskRowStride: t, maskW: n, maskH: r, wx: i, wy: a, runs: o }) {
153
+ for (let s = 0; s < o.length; s += 1) {
154
+ let c = o[s][0], l = o[s][1], u = o[s][2], d = a + c;
155
+ if (d < 0 || d >= r) continue;
156
+ let f = i + l, p = i + u;
157
+ if (p < 0 || f >= n) continue;
158
+ let m = d * t, h = f >>> 5, g = p >>> 5, _ = f & 31, v = p & 31;
159
+ if (h === g) {
160
+ let t = ke(_, v);
161
+ e[m + h] |= t;
162
+ } else {
163
+ {
164
+ let t = Ae(_);
165
+ e[m + h] |= t;
166
+ }
167
+ for (let t = h + 1; t < g; t += 1) e[m + t] = 4294967295;
168
+ {
169
+ let t = je(v);
170
+ e[m + g] |= t;
171
+ }
172
+ }
173
+ }
174
+ }
175
+ function V({ wordMask: e, w: t, h: n, dilation: r }) {
176
+ let i = new Uint8Array(t * n), a = [];
177
+ for (let n = 0; n < e.length; n += 1) {
178
+ let r = e[n][0], o = e[n][1] * t + r;
179
+ i[o] || (i[o] = 1, a.push(o));
180
+ }
181
+ for (let e = 0; e < a.length; e += 1) {
182
+ let o = a[e], s = o / t | 0, c = o - s * t;
183
+ for (let e = -r; e <= r; e += 1) {
184
+ let a = s + e;
185
+ if (a < 0 || a >= n) continue;
186
+ let o = a * t;
187
+ for (let n = -r; n <= r; n += 1) {
188
+ if (n === 0 && e === 0) continue;
189
+ let r = c + n;
190
+ r < 0 || r >= t || (i[o + r] = 1);
191
+ }
192
+ }
193
+ }
194
+ let o = [];
195
+ for (let e = 0; e < i.length; e += 1) if (i[e]) {
196
+ let n = e / t | 0, r = e - n * t;
197
+ o.push([r, n]);
198
+ }
199
+ return o;
200
+ }
201
+ function Pe(e, t) {
202
+ let n = [];
203
+ for (let r = 0; r < t; r += 1) {
204
+ let t = e[r];
205
+ if (!t || t.length === 0) continue;
206
+ t.sort((e, t) => e[0] - t[0]);
207
+ let i = t[0][0], a = t[0][1];
208
+ for (let e = 1; e < t.length; e += 1) {
209
+ let o = t[e][0], s = t[e][1];
210
+ o <= a + 1 ? s > a && (a = s) : (n.push([
211
+ r,
212
+ i,
213
+ a
214
+ ]), i = o, a = s);
215
+ }
216
+ n.push([
217
+ r,
218
+ i,
219
+ a
220
+ ]);
221
+ }
222
+ return n;
223
+ }
224
+ function Fe({ runs: e, w: t, h: n, dilation: r }) {
225
+ if (!e.length || r <= 0) return e;
226
+ let i = Array(n);
227
+ for (let a = 0; a < e.length; a += 1) {
228
+ let o = e[a], s = o[0], c = Math.max(0, o[1] - r), l = Math.min(t - 1, o[2] + r), u = Math.max(0, s - r), d = Math.min(n - 1, s + r);
229
+ for (let e = u; e <= d; e += 1) {
230
+ let t = i[e];
231
+ t || (t = [], i[e] = t), t.push([c, l]);
232
+ }
233
+ }
234
+ return Pe(i, n);
235
+ }
236
+ function H(e, t) {
237
+ let n = e.runs, r = e.w, i = e.h, a = Math.max(1, Math.round(r * t)), o = Math.max(1, Math.round(i * t)), s = Array(o), c = a, l = o, u = 0, d = 0, f = !1;
238
+ for (let e = 0; e < n.length; e += 1) {
239
+ let r = n[e], i = r[0], a = r[1], p = r[2], m = Math.round(i * t);
240
+ if (m < 0 || m >= o) continue;
241
+ let h = Math.round(a * t), g = Math.round((p + 1) * t) - 1;
242
+ if (g < h) continue;
243
+ let _ = s[m];
244
+ _ || (_ = [], s[m] = _), _.push([h, g]), f = !0, h < c && (c = h), g > u && (u = g), m < l && (l = m), m > d && (d = m);
245
+ }
246
+ if (!f) return {
247
+ w: a,
248
+ h: o,
249
+ runs: [],
250
+ minX: 0,
251
+ minY: 0,
252
+ maxX: 0,
253
+ maxY: 0
254
+ };
255
+ let p = [];
256
+ for (let e = 0; e < o; e += 1) {
257
+ let t = s[e];
258
+ if (!t || t.length === 0) continue;
259
+ t.sort((e, t) => e[0] - t[0]);
260
+ let n = t[0][0], r = t[0][1];
261
+ for (let i = 1; i < t.length; i += 1) {
262
+ let a = t[i][0], o = t[i][1];
263
+ a <= r + 1 ? o > r && (r = o) : (p.push([
264
+ e,
265
+ n,
266
+ r
267
+ ]), n = a, r = o);
268
+ }
269
+ p.push([
270
+ e,
271
+ n,
272
+ r
273
+ ]);
274
+ }
275
+ return {
276
+ w: a,
277
+ h: o,
278
+ runs: p,
279
+ minX: c,
280
+ minY: l,
281
+ maxX: u,
282
+ maxY: d
283
+ };
284
+ }
285
+ var Ie = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map();
286
+ function Le({ word: e, fontSize: t, pad: n, svg: r }) {
287
+ let i = r.style && r.style.bold ? 1 : 0, a = n || 0;
288
+ return `${e.name}::${t}::${a}::${i}`;
289
+ }
290
+ function Re({ word: e, fontSize: t, pad: n, canvas: r, ctx: i, svg: a }) {
291
+ let o = Le({
292
+ word: e,
293
+ fontSize: t,
294
+ pad: n,
295
+ svg: a
296
+ }), s = Ie.get(o);
297
+ if (s) return {
298
+ key: o,
299
+ bitmap: s
300
+ };
301
+ let c = De({
302
+ word: e,
303
+ fontSize: t,
304
+ pad: n,
305
+ canvas: r,
306
+ ctx: i,
307
+ svg: a
308
+ });
309
+ return Ie.set(o, c), {
310
+ key: o,
311
+ bitmap: c
312
+ };
313
+ }
314
+ function ze({ bitmapKey: e, wordMask: t, w: n, h: r, dilation: i }) {
315
+ let a = `${e}::d${i}`, o = U.get(a);
316
+ if (o) return o;
317
+ let s = V({
318
+ wordMask: t,
319
+ w: n,
320
+ h: r,
321
+ dilation: i
322
+ }), c = {
323
+ wordMask: s,
324
+ runs: Oe(s)
325
+ };
326
+ return U.set(a, c), c;
327
+ }
328
+ function Be(e, t, n) {
329
+ if (!e.length) return;
330
+ let r = Infinity, i = -Infinity, a = Infinity, o = -Infinity;
331
+ for (let t = 0; t < e.length; t += 1) {
332
+ let n = e[t], s = n.x + n.minX, c = n.x + n.maxX, l = n.y + n.minY, u = n.y + n.maxY;
333
+ s < r && (r = s), c > i && (i = c), l < a && (a = l), u > o && (o = u);
334
+ }
335
+ if (!isFinite(r) || !isFinite(i) || !isFinite(a) || !isFinite(o)) return;
336
+ let s = Math.max(Math.abs(r), Math.abs(i)), c = Math.max(Math.abs(a), Math.abs(o));
337
+ if (s === 0 || c === 0) return;
338
+ let l = .9, u = t * .5 * l / s, d = n * .5 * l / c, f = Math.min(u, d);
339
+ if (!(f <= 1)) {
340
+ f > 4 && (f = 4);
341
+ for (let t = 0; t < e.length; t += 1) {
342
+ let n = e[t];
343
+ n.x *= f, n.y *= f, n.width *= f, n.height *= f, n.fontSize *= f, n.minX *= f, n.maxX *= f, n.minY *= f, n.maxY *= f;
344
+ }
345
+ }
346
+ }
347
+ function Ve() {
348
+ return typeof performance < "u" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
349
+ }
350
+ function He({ value: e, minimumValue: t, maximumValue: n, configuredMinimumFontSize: r, maximumFontSize: i }) {
351
+ if (n === t) return i;
352
+ let a = (e - t) / (n - t) * (i - r) + r;
353
+ return Math.max(r, Math.min(i, a));
354
+ }
355
+ function Ue({ bitmapHeight: e, proximity: t, strictPixelPadding: n, minimumVisualPadding: r }) {
356
+ let i = Math.max(0, Math.round(t || 0)), a = Math.ceil(e * .035) + 2;
357
+ return Math.max(i, a, n ? 3 : 0, r);
358
+ }
359
+ function We({ currentBitmap: e, strictPixelPadding: t, scaleFactor: n, baseBitmap: r, bitmapKey: i, proximity: a, minimumVisualPadding: o }) {
360
+ let s = e.runs, c = e.w, l = e.h, u = e.minX, d = e.minY, f = e.maxX, p = e.maxY;
361
+ if (!s.length) return {
362
+ runs: s,
363
+ bitmapWidth: c,
364
+ bitmapHeight: l,
365
+ bitmapMinimumX: u,
366
+ bitmapMinimumY: d,
367
+ bitmapMaximumX: f,
368
+ bitmapMaximumY: p
369
+ };
370
+ let m = Ue({
371
+ bitmapHeight: l,
372
+ proximity: a,
373
+ strictPixelPadding: t,
374
+ minimumVisualPadding: o
375
+ });
376
+ return m <= 0 ? {
377
+ runs: s,
378
+ bitmapWidth: c,
379
+ bitmapHeight: l,
380
+ bitmapMinimumX: u,
381
+ bitmapMinimumY: d,
382
+ bitmapMaximumX: f,
383
+ bitmapMaximumY: p
384
+ } : n === 1 && m === 2 && t ? {
385
+ runs: ze({
386
+ bitmapKey: i,
387
+ wordMask: r.wordMask,
388
+ w: r.w,
389
+ h: r.h,
390
+ dilation: m
391
+ }).runs,
392
+ bitmapWidth: c,
393
+ bitmapHeight: l,
394
+ bitmapMinimumX: u,
395
+ bitmapMinimumY: d,
396
+ bitmapMaximumX: f,
397
+ bitmapMaximumY: p
398
+ } : {
399
+ runs: Fe({
400
+ runs: s,
401
+ w: c,
402
+ h: l,
403
+ dilation: m
404
+ }),
405
+ bitmapWidth: c,
406
+ bitmapHeight: l,
407
+ bitmapMinimumX: u,
408
+ bitmapMinimumY: d,
409
+ bitmapMaximumX: f,
410
+ bitmapMaximumY: p
411
+ };
412
+ }
413
+ async function Ge({ baseBitmap: e, baseFontSize: t, minimumScaleFactor: n, maskBits: r, maskRowStride: i, maskWidth: a, maskHeight: o, centerX: s, centerY: c, maximumRadius: l, scaleStep: u, strictPixelPadding: d, bitmapKey: f, minimumFontSize: p, rawWord: m, cosineArray: h, sineArray: g, radiusStep: _, maximumAttempts: v, maybeYield: y, proximity: ee, minimumVisualPadding: te }) {
414
+ let b = 1;
415
+ for (; b >= n;) {
416
+ let { runs: n, bitmapWidth: x, bitmapHeight: S, bitmapMinimumX: C, bitmapMinimumY: w, bitmapMaximumX: T, bitmapMaximumY: ne } = We({
417
+ currentBitmap: b === 1 ? e : H(e, b),
418
+ strictPixelPadding: d,
419
+ scaleFactor: b,
420
+ baseBitmap: e,
421
+ bitmapKey: f,
422
+ proximity: ee,
423
+ minimumVisualPadding: te
424
+ }), E = 0, re = 0;
425
+ for (; E < l && re < v;) {
426
+ for (let e = 0; e < h.length; e += 1) {
427
+ re += 1;
428
+ let l = Math.round(s + E * h[e] - x / 2), u = Math.round(c + E * g[e] - S / 2);
429
+ if (!(l < 0 || u < 0 || l + x > a || u + S > o) && Me({
430
+ maskBits: r,
431
+ maskRowStride: i,
432
+ maskW: a,
433
+ maskH: o,
434
+ wx: l,
435
+ wy: u,
436
+ runs: n
437
+ })) {
438
+ let { __wcIndex: e, ...s } = m, c = Math.max(p, Math.round(t * b)), d = {
439
+ ...s,
440
+ x: l - a / 2,
441
+ y: u - o / 2,
442
+ fontSize: c,
443
+ width: x,
444
+ height: S,
445
+ angle: 0,
446
+ minX: C,
447
+ minY: w,
448
+ maxX: T,
449
+ maxY: ne
450
+ };
451
+ return Ne({
452
+ maskBits: r,
453
+ maskRowStride: i,
454
+ maskW: a,
455
+ maskH: o,
456
+ wx: l,
457
+ wy: u,
458
+ runs: n
459
+ }), d;
460
+ }
461
+ }
462
+ E += _, re & 1023 || await y();
463
+ }
464
+ b *= u, await y();
465
+ }
466
+ return null;
467
+ }
468
+ async function Ke({ baseBitmap: e, baseFontSize: t, minimumScaleFactor: n, maskBits: r, maskRowStride: i, maskWidth: a, maskHeight: o, centerX: s, centerY: c, maximumRadius: l, scaleStep: u, strictPixelPadding: d, bitmapKey: f, minimumFontSize: p, rawWord: m, maybeYield: h, proximity: g, qualityPreset: _, primarySpiral: v, fallbackSpiral: y }) {
469
+ return await Ge({
470
+ baseBitmap: e,
471
+ baseFontSize: t,
472
+ minimumScaleFactor: n,
473
+ maskBits: r,
474
+ maskRowStride: i,
475
+ maskWidth: a,
476
+ maskHeight: o,
477
+ centerX: s,
478
+ centerY: c,
479
+ maximumRadius: l,
480
+ scaleStep: u,
481
+ strictPixelPadding: d,
482
+ bitmapKey: f,
483
+ minimumFontSize: p,
484
+ rawWord: m,
485
+ cosineArray: v.cosineArray,
486
+ sineArray: v.sineArray,
487
+ radiusStep: _.spiralRadiusStep,
488
+ maximumAttempts: _.primaryAttempts,
489
+ maybeYield: h,
490
+ proximity: g,
491
+ minimumVisualPadding: _.minimumVisualPadding
492
+ }) || await Ge({
493
+ baseBitmap: e,
494
+ baseFontSize: t,
495
+ minimumScaleFactor: n,
496
+ maskBits: r,
497
+ maskRowStride: i,
498
+ maskWidth: a,
499
+ maskHeight: o,
500
+ centerX: s,
501
+ centerY: c,
502
+ maximumRadius: l,
503
+ scaleStep: u,
504
+ strictPixelPadding: d,
505
+ bitmapKey: f,
506
+ minimumFontSize: p,
507
+ rawWord: m,
508
+ cosineArray: y.cosineArray,
509
+ sineArray: y.sineArray,
510
+ radiusStep: _.fallbackSpiralRadiusStep,
511
+ maximumAttempts: _.fallbackAttempts,
512
+ maybeYield: h,
513
+ proximity: g,
514
+ minimumVisualPadding: _.minimumVisualPadding
515
+ });
516
+ }
517
+ async function qe({ words: e, proximity: t = 0, svg: n, strictPixelPadding: r, quality: i = Ce, onProgress: a, debugTiming: o = !1 }) {
518
+ let s = Ve(), c = s(), l = c;
519
+ async function u() {
520
+ s() - l >= 12 && (await new Promise((e) => setTimeout(e, 0)), l = s());
521
+ }
522
+ let d = n.width, f = n.height, p = Math.round(d), m = Math.round(f), h = we(i), g = Ee(h.spiralStep), _ = Ee(h.fallbackSpiralStep), v = n.minFontSize, y = Math.min(n.maxFontSize, 100), ee = e.map((e) => e.value), te = Math.min(...ee), b = Math.max(...ee);
523
+ if (p <= 0 || m <= 0) return [];
524
+ let x = p + 31 >>> 5, S = new Uint32Array(x * m), C = document.createElement("canvas"), w = C.getContext("2d", { willReadFrequently: !0 });
525
+ C.width = p, C.height = m;
526
+ let T = Math.max(p, m), ne = Math.floor(p / 2), E = Math.floor(m / 2), re = [...e.map((e, t) => ({
527
+ ...e,
528
+ __wcIndex: t,
529
+ id: e.id == null ? `${e.name}__${t}` : e.id
530
+ }))].sort((e, t) => t.value - e.value), D = [], ie = h.scaleStep;
531
+ for (let e = 0; e < re.length; e += 1) {
532
+ let i = re[e], o = D.length, s = He({
533
+ value: i.value,
534
+ minimumValue: te,
535
+ maximumValue: b,
536
+ configuredMinimumFontSize: v,
537
+ maximumFontSize: y
538
+ }), c = Re({
539
+ word: i,
540
+ fontSize: s,
541
+ pad: t,
542
+ canvas: C,
543
+ ctx: w,
544
+ svg: n
545
+ }), l = c.key, d = c.bitmap, f = d.w, ee = d.h;
546
+ if (f <= 0 || ee <= 0) {
547
+ await u();
548
+ continue;
549
+ }
550
+ let ae = await Ke({
551
+ baseBitmap: d,
552
+ baseFontSize: s,
553
+ minimumScaleFactor: Math.max(1 / s, .1),
554
+ maskBits: S,
555
+ maskRowStride: x,
556
+ maskWidth: p,
557
+ maskHeight: m,
558
+ centerX: ne,
559
+ centerY: E,
560
+ maximumRadius: T,
561
+ scaleStep: ie,
562
+ strictPixelPadding: r,
563
+ bitmapKey: l,
564
+ minimumFontSize: 1,
565
+ rawWord: i,
566
+ maybeYield: u,
567
+ proximity: t,
568
+ qualityPreset: h,
569
+ primarySpiral: g,
570
+ fallbackSpiral: _
571
+ });
572
+ if (ae && (D.push(ae), a && D.length > o)) {
573
+ let e = D[D.length - 1];
574
+ a({
575
+ word: e,
576
+ all: D
577
+ });
578
+ }
579
+ await u();
580
+ }
581
+ if (!D.length) return [];
582
+ Be(D, p, m);
583
+ let ae = s() - c;
584
+ return o && typeof console < "u" && console.log && console.log("[vue-data-ui][word-cloud] positionWordsAsync:", `${ae.toFixed(2)} ms for ${e.length} words`), D.sort((e, t) => t.fontSize - e.fontSize);
585
+ }
586
+ //#endregion
587
+ //#region src/components/vue-ui-word-cloud.vue
588
+ var Je = /* @__PURE__ */ e({ default: () => ct }), Ye = [
589
+ "id",
590
+ "data-resizing",
591
+ "data-relayout"
592
+ ], Xe = ["id"], Ze = { style: { position: "relative" } }, Qe = [
593
+ "aria-describedby",
594
+ "xmlns",
595
+ "viewBox"
596
+ ], $e = ["width", "height"], et = ["transform"], tt = ["transform"], nt = [
597
+ "data-a11y-word-index",
598
+ "x",
599
+ "y",
600
+ "width",
601
+ "height",
602
+ "aria-label",
603
+ "onMouseover",
604
+ "onMouseleave",
605
+ "onClick"
606
+ ], rt = [
607
+ "fill",
608
+ "font-weight",
609
+ "font-size",
610
+ "transform",
611
+ "stroke",
612
+ "stroke-width"
613
+ ], it = {
614
+ key: 0,
615
+ style: {
616
+ position: "absolute",
617
+ top: "100%",
618
+ left: "0",
619
+ width: "100%"
620
+ },
621
+ "data-dom-to-png-ignore": "",
622
+ "aria-hidden": "true"
623
+ }, at = {
624
+ key: 5,
625
+ class: "vue-data-ui-watermark"
626
+ }, ot = {
627
+ key: 6,
628
+ "data-dom-to-png-ignore": "",
629
+ class: "reset-wrapper"
630
+ }, st = ["innerHTML"], ct = /*#__PURE__*/ C({
631
+ __name: "vue-ui-word-cloud",
632
+ props: {
633
+ config: {
634
+ type: Object,
635
+ default() {
636
+ return {};
637
+ }
638
+ },
639
+ dataset: {
640
+ type: [Array, String],
641
+ default() {
642
+ return [];
643
+ }
644
+ }
645
+ },
646
+ emits: ["copyAlt"],
647
+ setup(e, { expose: C, emit: Se }) {
648
+ let Ce = N(() => import("./Tooltip-BmGCBJuU.js")), we = N(() => import("./BaseIcon-DEtwcvEH.js").then((e) => e.n)), Te = N(() => import("./vue-ui-accordion-Di_givzQ.js").then((e) => e.n)), Ee = N(() => import("./DataTable-DJZgdnIn.js")), De = N(() => import("./PenAndPaper-DJIIG6dv.js").then((e) => e.t)), Oe = N(() => import("./UserOptions-xqbNpHi2.js").then((e) => e.n)), ke = N(() => import("./PackageVersion-Dx81ZIAL.js").then((e) => e.t)), Ae = N(() => import("./BaseDraggableDialog-a9xCKjW-.js").then((e) => e.n)), { vue_ui_word_cloud: je } = g(), { isThemeValid: Me, warnInvalidTheme: Ne } = b(), V = e, Pe = Se, Fe = O({
649
+ get() {
650
+ return !!V.dataset && V.dataset.length;
651
+ },
652
+ set(e) {
653
+ return e;
654
+ }
655
+ }), H = L(r()), Ie = L(0), U = L(null), Le = L(null), Re = L(null), ze = L(0), Be = L(0), Ve = L(!1), He = L(null), Ue = L(null), We = L(!1), Ge = L(!1), Ke = L(null), Je = L(!1), ct = L(!1), W = L(null), lt = L({
656
+ x: 0,
657
+ y: 0
658
+ }), ut = L("pointer"), dt = L(!1), G = L(xt()), K = O(() => G.value.userOptions.useCursorPointer), ft = O(() => s({
659
+ defaultConfig: {
660
+ userOptions: { show: !1 },
661
+ table: { show: !1 },
662
+ useCssAnimation: !1,
663
+ animationDelayMs: 0,
664
+ nodeCategories: {},
665
+ nodeCategoryColors: {},
666
+ style: { chart: {
667
+ backgroundColor: "#99999930",
668
+ words: {
669
+ color: "#6A6A6A",
670
+ usePalette: !1,
671
+ selectedStroke: "#CCCCCC"
672
+ }
673
+ } }
674
+ },
675
+ userConfig: G.value.skeletonConfig ?? {}
676
+ })), { loading: pt, FINAL_DATASET: mt, manualLoading: ht } = v({
677
+ ...be(V),
678
+ FINAL_CONFIG: G,
679
+ prepareConfig: xt,
680
+ callback: () => {
681
+ Promise.resolve().then(() => {
682
+ X.value.showTable = G.value.table.show, X.value.showTooltip = G.value.style.chart.tooltip.show, X.value.showZoom = G.value.style.chart.zoom.show;
683
+ });
684
+ },
685
+ skeletonDataset: V.config?.skeletonDataset ?? [
686
+ {
687
+ name: "Lorem",
688
+ value: 6
689
+ },
690
+ {
691
+ name: "ipsum",
692
+ value: 3
693
+ },
694
+ {
695
+ name: "dolor",
696
+ value: 1
697
+ },
698
+ {
699
+ name: "sit",
700
+ value: 3
701
+ },
702
+ {
703
+ name: "amet",
704
+ value: 3
705
+ },
706
+ {
707
+ name: "consectetur",
708
+ value: 2
709
+ },
710
+ {
711
+ name: "adipiscing",
712
+ value: 1
713
+ },
714
+ {
715
+ name: "elit",
716
+ value: 2
717
+ },
718
+ {
719
+ name: "Vivamus",
720
+ value: 2
721
+ },
722
+ {
723
+ name: "pulvinar",
724
+ value: 1
725
+ },
726
+ {
727
+ name: "pretium",
728
+ value: 1
729
+ },
730
+ {
731
+ name: "venenatis",
732
+ value: 2
733
+ },
734
+ {
735
+ name: "Donec",
736
+ value: 1
737
+ },
738
+ {
739
+ name: "imperdiet",
740
+ value: 3
741
+ },
742
+ {
743
+ name: "id",
744
+ value: 1
745
+ },
746
+ {
747
+ name: "porttitor",
748
+ value: 2
749
+ },
750
+ {
751
+ name: "tristique",
752
+ value: 1
753
+ },
754
+ {
755
+ name: "Aenean",
756
+ value: 2
757
+ },
758
+ {
759
+ name: "ac",
760
+ value: 5
761
+ },
762
+ {
763
+ name: "commodo",
764
+ value: 2
765
+ },
766
+ {
767
+ name: "justo",
768
+ value: 2
769
+ },
770
+ {
771
+ name: "Vestibulum",
772
+ value: 2
773
+ },
774
+ {
775
+ name: "placerat",
776
+ value: 1
777
+ },
778
+ {
779
+ name: "molestie",
780
+ value: 1
781
+ },
782
+ {
783
+ name: "nisl",
784
+ value: 1
785
+ },
786
+ {
787
+ name: "lacinia",
788
+ value: 2
789
+ },
790
+ {
791
+ name: "nulla",
792
+ value: 1
793
+ },
794
+ {
795
+ name: "posuere",
796
+ value: 2
797
+ },
798
+ {
799
+ name: "quis",
800
+ value: 3
801
+ },
802
+ {
803
+ name: "ullamcorper",
804
+ value: 1
805
+ },
806
+ {
807
+ name: "eu",
808
+ value: 1
809
+ },
810
+ {
811
+ name: "ex",
812
+ value: 1
813
+ },
814
+ {
815
+ name: "vitae",
816
+ value: 3
817
+ },
818
+ {
819
+ name: "facilisis",
820
+ value: 1
821
+ },
822
+ {
823
+ name: "Aliquam",
824
+ value: 1
825
+ },
826
+ {
827
+ name: "erat",
828
+ value: 1
829
+ },
830
+ {
831
+ name: "volutpat",
832
+ value: 1
833
+ },
834
+ {
835
+ name: "Proin",
836
+ value: 1
837
+ },
838
+ {
839
+ name: "nunc",
840
+ value: 1
841
+ },
842
+ {
843
+ name: "felis",
844
+ value: 1
845
+ },
846
+ {
847
+ name: "gravida",
848
+ value: 3
849
+ },
850
+ {
851
+ name: "sed",
852
+ value: 1
853
+ },
854
+ {
855
+ name: "orci",
856
+ value: 1
857
+ },
858
+ {
859
+ name: "Interdum",
860
+ value: 1
861
+ },
862
+ {
863
+ name: "et",
864
+ value: 1
865
+ },
866
+ {
867
+ name: "malesuada",
868
+ value: 1
869
+ },
870
+ {
871
+ name: "fames",
872
+ value: 1
873
+ },
874
+ {
875
+ name: "ante",
876
+ value: 1
877
+ }
878
+ ],
879
+ skeletonConfig: s({
880
+ defaultConfig: G.value,
881
+ userConfig: ft.value
882
+ })
883
+ }), gt = L(_t());
884
+ function _t() {
885
+ return typeof mt.value == "string" ? o(mt.value) : mt.value.map((e, t) => ({
886
+ ...e,
887
+ value: m(e.value)
888
+ }));
889
+ }
890
+ let { userOptionsVisible: vt, setUserOptionsVisibility: yt, keepUserOptionState: bt } = E({ config: G.value }), { svgRef: q } = re({ config: G.value.style.chart.title });
891
+ function xt() {
892
+ let e = te({
893
+ userConfig: V.config,
894
+ defaultConfig: je
895
+ }), t = e.theme;
896
+ if (!t) return e;
897
+ if (!Me.value(e)) return Ne(e), e;
898
+ let n = te({
899
+ userConfig: ie[t] || V.config,
900
+ defaultConfig: e
901
+ }), r = te({
902
+ userConfig: V.config,
903
+ defaultConfig: n
904
+ });
905
+ return {
906
+ ...r,
907
+ customPalette: r.customPalette.length ? r.customPalette : c[t] || f
908
+ };
909
+ }
910
+ let St = L({
911
+ x: 0,
912
+ y: 0
913
+ });
914
+ function Ct() {
915
+ let e = {
916
+ x: 0,
917
+ y: 0,
918
+ width: Math.max(10, J.value.width),
919
+ height: Math.max(10, J.value.height)
920
+ };
921
+ Qt(e), St.value = {
922
+ x: e.x + e.width / 2,
923
+ y: e.y + e.height / 2
924
+ }, Xt();
925
+ }
926
+ let wt = w(() => {
927
+ Lt();
928
+ }, 100), Tt = L(!1);
929
+ xe(() => Tt.value, (e) => {
930
+ e === !1 && (Ge.value = !0, wt(), Ct());
931
+ }), xe(() => V.config, (e) => {
932
+ G.value = xt(), vt.value = !G.value.userOptions.showOnChartHover, At(), ze.value += 1, Be.value += 1, X.value.showTable = G.value.table.show, X.value.showTooltip = G.value.style.chart.tooltip.show, X.value.showZoom = G.value.style.chart.zoom.show;
933
+ }, { deep: !0 });
934
+ let J = L({
935
+ width: G.value.style.chart.width,
936
+ height: G.value.style.chart.height,
937
+ maxFontSize: G.value.style.chart.words.maxFontSize,
938
+ minFontSize: G.value.style.chart.words.minFontSize,
939
+ bold: G.value.style.chart.words.bold
940
+ }), Et = w(() => {
941
+ let { width: e, height: t } = T({
942
+ chart: U.value,
943
+ title: G.value.style.chart.title.text ? Le.value : null,
944
+ legend: G.value.style.chart.controls.show ? Ke.value?.$el : null,
945
+ source: Re.value
946
+ });
947
+ requestAnimationFrame(async () => {
948
+ J.value.width = Math.max(10, e), J.value.height = Math.max(10, t - 12), await de(), Tt.value = !1;
949
+ });
950
+ }, 100), Dt = () => {
951
+ Tt.value = !0, Et();
952
+ }, Y = ve(null), Ot = ve(null);
953
+ he(At);
954
+ let kt = O(() => !!G.value.debug);
955
+ function At() {
956
+ t(V.dataset) ? l({
957
+ componentName: "VueUiWordCloud",
958
+ type: "dataset",
959
+ debug: kt.value
960
+ }) : gt.value.forEach((e, t) => {
961
+ u({
962
+ datasetObject: e,
963
+ requiredAttributes: ["name", "value"]
964
+ }).forEach((e) => {
965
+ Fe.value = !1, l({
966
+ componentName: "VueUiWordCloud",
967
+ type: "datasetSerieAttribute",
968
+ property: e,
969
+ index: t,
970
+ debug: kt.value
971
+ });
972
+ });
973
+ }), t(V.dataset) || (ht.value = G.value.loading), G.value.responsive && (Y.value && (Ot.value && Y.value.unobserve(Ot.value), Y.value.disconnect()), Y.value = new ResizeObserver(Dt), Ot.value = U.value.parentNode, Y.value.observe(Ot.value)), Ct();
974
+ }
975
+ me(() => {
976
+ Y.value && (Ot.value && Y.value.unobserve(Ot.value), Y.value.disconnect());
977
+ });
978
+ let { isPrinting: jt, isImaging: Mt, generatePdf: Nt, generateImage: Pt } = _({
979
+ elementId: `wordCloud_${H.value}`,
980
+ fileName: G.value.style.chart.title.text || "vue-ui-word-cloud",
981
+ options: G.value.userOptions.print
982
+ }), X = L({
983
+ showTable: G.value.table.show,
984
+ showTooltip: G.value.style.chart.tooltip.show,
985
+ showZoom: G.value.style.chart.zoom.show
986
+ });
987
+ xe(G, () => {
988
+ X.value.showTable = G.value.table.show, X.value.showTooltip = G.value.style.chart.tooltip.show, X.value.showZoom = G.value.style.chart.zoom.show;
989
+ }, { immediate: !0 });
990
+ function Ft(e, t, n = "Arial") {
991
+ let r = document.createElement("canvas").getContext("2d");
992
+ return r.font = `${t}px ${G.value.style.chart.words.bold ? "bold" : "normal"} ${n}`, {
993
+ width: r.measureText(e).width + G.value.style.chart.words.proximity,
994
+ height: t
995
+ };
996
+ }
997
+ let Z = L([]), It = /* @__PURE__ */ new Map();
998
+ function Lt() {
999
+ let e = [...gt.value].map((e) => e.value), t = Math.max(...e), n = Math.min(...e), r = [...gt.value].map((e, r) => {
1000
+ let i = (e.value - n) / (t - n) * (J.value.maxFontSize - J.value.minFontSize) + J.value.minFontSize;
1001
+ i = isNaN(i) ? J.value.minFontSize : i;
1002
+ let a = Ft(e.name, i);
1003
+ return {
1004
+ ...e,
1005
+ id: e.id ?? `${e.name}__${r}`,
1006
+ fontSize: i,
1007
+ width: a.width,
1008
+ height: a.height,
1009
+ color: e.color ? h(e.color) : G.value.style.chart.words.usePalette ? G.value.customPalette[r] || G.value.customPalette[r % G.value.customPalette.length] || f[r] || f[r % f.length] : G.value.style.chart.words.color
1010
+ };
1011
+ });
1012
+ Z.value.length = 0, It.clear(), qe({
1013
+ debugTiming: kt.value,
1014
+ words: r,
1015
+ svg: J.value,
1016
+ proximity: G.value.style.chart.words.proximity,
1017
+ strictPixelPadding: G.value.strictPixelPadding,
1018
+ quality: G.value.quality,
1019
+ onProgress: ({ all: e }) => {
1020
+ for (let t of e) {
1021
+ let e = t.id, n = It.get(e);
1022
+ if (n === void 0) n = Z.value.length, It.set(e, n), Z.value.push({ ...t });
1023
+ else {
1024
+ let e = Z.value[n];
1025
+ e.x = t.x, e.y = t.y, e.width = t.width, e.height = t.height, e.fontSize = t.fontSize, e.minX = t.minX, e.minY = t.minY, e.maxX = t.maxX, e.maxY = t.maxY;
1026
+ }
1027
+ }
1028
+ }
1029
+ }), Z.value.sort((e, t) => t.fontSize - e.fontSize), It.clear(), Z.value.forEach((e, t) => {
1030
+ It.set(e.id, t);
1031
+ }), We.value = !0, Ge.value = !1;
1032
+ }
1033
+ let Rt = O(() => ({
1034
+ head: Z.value.map((e) => ({
1035
+ name: e.name,
1036
+ color: e.color
1037
+ })),
1038
+ body: Z.value.map((e) => e.value)
1039
+ }));
1040
+ function zt(e = null) {
1041
+ de(() => {
1042
+ let t = Rt.value.head.map((e, t) => [[e.name], [Rt.value.body[t]]]), n = a([
1043
+ [G.value.style.chart.title.text],
1044
+ [G.value.style.chart.title.subtitle.text],
1045
+ [[""], [G.value.table.columnNames.value]]
1046
+ ].concat(t));
1047
+ e ? e(n) : i({
1048
+ csvContent: n,
1049
+ title: G.value.style.chart.title.text || "vue-ui-word-cloud"
1050
+ });
1051
+ });
1052
+ }
1053
+ let Bt = O(() => {
1054
+ let e = [G.value.table.columnNames.series, G.value.table.columnNames.value], t = Rt.value.head.map((e, t) => {
1055
+ let r = n({
1056
+ p: G.value.table.td.prefix,
1057
+ v: Rt.value.body[t],
1058
+ s: G.value.table.td.suffix,
1059
+ r: G.value.table.td.roundingValue
1060
+ });
1061
+ return [{
1062
+ color: e.color,
1063
+ name: e.name
1064
+ }, r];
1065
+ }), r = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), i = {
1066
+ th: {
1067
+ backgroundColor: G.value.table.th.backgroundColor,
1068
+ color: G.value.table.th.color,
1069
+ outline: G.value.table.th.outline
1070
+ },
1071
+ td: {
1072
+ backgroundColor: G.value.table.td.backgroundColor,
1073
+ color: G.value.table.td.color,
1074
+ outline: G.value.table.td.outline
1075
+ },
1076
+ breakpoint: G.value.table.responsiveBreakpoint
1077
+ };
1078
+ return {
1079
+ colNames: [G.value.table.columnNames.series, G.value.table.columnNames.value],
1080
+ head: e,
1081
+ body: t,
1082
+ a11yBody: r,
1083
+ config: i
1084
+ };
1085
+ }), Q = L(!1);
1086
+ function Vt(e) {
1087
+ Q.value = e, Ie.value += 1;
1088
+ }
1089
+ function Ht() {
1090
+ return Z.value;
1091
+ }
1092
+ function Ut() {
1093
+ X.value.showTable = !X.value.showTable;
1094
+ }
1095
+ function Wt() {
1096
+ X.value.showTooltip = !X.value.showTooltip;
1097
+ }
1098
+ let Gt = L(!1);
1099
+ function Kt() {
1100
+ Gt.value = !Gt.value;
1101
+ }
1102
+ function qt() {
1103
+ X.value.showZoom = !X.value.showZoom;
1104
+ }
1105
+ let Jt = O(() => !Gt.value && X.value.showZoom), { viewBox: Yt, resetZoom: Xt, isZoom: Zt, setInitialViewBox: Qt, zoomByFactor: $t, scale: en } = D(q, {
1106
+ x: 0,
1107
+ y: 0,
1108
+ width: J.value.width <= 0 ? 10 : J.value.width,
1109
+ height: J.value.height <= 0 ? 10 : J.value.height
1110
+ }, 1, Jt);
1111
+ xe(() => V.dataset, () => {
1112
+ gt.value = _t(), G.value.responsive || (Lt(), Ct());
1113
+ }, { immediate: !0 });
1114
+ async function tn({ scale: e = 2 } = {}) {
1115
+ if (!U.value) return;
1116
+ let { width: t, height: n } = U.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await x({
1117
+ domElement: U.value,
1118
+ base64: !0,
1119
+ img: !0,
1120
+ scale: e
1121
+ });
1122
+ return {
1123
+ imageUri: i,
1124
+ base64: a,
1125
+ title: G.value.style.chart.title.text,
1126
+ width: t,
1127
+ height: n,
1128
+ aspectRatio: r
1129
+ };
1130
+ }
1131
+ let nn = O(() => {
1132
+ let e = G.value.table.useDialog && !G.value.table.show, t = X.value.showTable;
1133
+ return {
1134
+ component: e ? Ae : Te,
1135
+ title: `${G.value.style.chart.title.text}${G.value.style.chart.title.subtitle.text ? `: ${G.value.style.chart.title.subtitle.text}` : ""}`,
1136
+ props: e ? {
1137
+ backgroundColor: G.value.table.th.backgroundColor,
1138
+ color: G.value.table.th.color,
1139
+ headerColor: G.value.table.th.color,
1140
+ headerBg: G.value.table.th.backgroundColor,
1141
+ isFullscreen: Q.value,
1142
+ fullscreenParent: U.value,
1143
+ forcedWidth: Math.min(500, window.innerWidth * .8),
1144
+ isCursorPointer: K.value
1145
+ } : {
1146
+ hideDetails: !0,
1147
+ config: {
1148
+ open: t,
1149
+ maxHeight: 1e4,
1150
+ body: {
1151
+ backgroundColor: G.value.style.chart.backgroundColor,
1152
+ color: G.value.style.chart.color
1153
+ },
1154
+ head: {
1155
+ backgroundColor: G.value.style.chart.backgroundColor,
1156
+ color: G.value.style.chart.color
1157
+ }
1158
+ }
1159
+ }
1160
+ };
1161
+ });
1162
+ xe(() => X.value.showTable, (e) => {
1163
+ G.value.table.show || (e && G.value.table.useDialog && He.value ? He.value.open() : "close" in He.value && He.value.close());
1164
+ });
1165
+ function rn() {
1166
+ X.value.showTable = !1, Ue.value && Ue.value.setTableIconState(!1);
1167
+ }
1168
+ let an = O(() => G.value.style.chart.backgroundColor), { exportSvg: on, getSvg: sn } = ee({
1169
+ svg: q,
1170
+ title: O(() => G.value.style.chart.title),
1171
+ backgroundColor: an
1172
+ });
1173
+ async function cn({ isCb: e }) {
1174
+ ct.value = !0, await de();
1175
+ try {
1176
+ if (e) {
1177
+ let { blob: e, url: t, text: n, dataUrl: r } = await sn();
1178
+ await Promise.resolve(G.value.userOptions.callbacks.svg({
1179
+ blob: e,
1180
+ url: t,
1181
+ text: n,
1182
+ dataUrl: r
1183
+ }));
1184
+ } else await Promise.resolve(on());
1185
+ } finally {
1186
+ ct.value = !1;
1187
+ }
1188
+ }
1189
+ function ln(e) {
1190
+ if (e?.stage === "start") {
1191
+ Je.value = !0;
1192
+ return;
1193
+ }
1194
+ if (e?.stage === "end") {
1195
+ Je.value = !1;
1196
+ return;
1197
+ }
1198
+ Pt();
1199
+ }
1200
+ function un() {
1201
+ $t(1.5, !0);
1202
+ }
1203
+ function dn() {
1204
+ $t(1 / 1.5, !0);
1205
+ }
1206
+ let $ = L(null), fn = L(!1), pn = L(""), mn = L(null);
1207
+ function hn() {
1208
+ $.value = null, W.value = null, Ve.value = !1;
1209
+ }
1210
+ function gn(e, t) {
1211
+ G.value.events.datapointLeave && G.value.events.datapointLeave({
1212
+ datapoint: e,
1213
+ seriesIndex: t
1214
+ }), !(W.value === t && ut.value === "keyboard") && ($.value = null, Ve.value = !1);
1215
+ }
1216
+ function _n(e, t) {
1217
+ G.value.events.datapointClick && G.value.events.datapointClick({
1218
+ datapoint: e,
1219
+ seriesIndex: t
1220
+ });
1221
+ }
1222
+ function vn(e) {
1223
+ if (!q.value || e == null) return;
1224
+ let t = q.value.querySelector(`[data-a11y-word-index="${e}-${H.value}"]`);
1225
+ if (!t) return;
1226
+ let n = t.getBoundingClientRect();
1227
+ lt.value = {
1228
+ x: n.left + n.width / 2,
1229
+ y: n.top + n.height / 2
1230
+ };
1231
+ }
1232
+ function yn(e, t, n = "pointer") {
1233
+ if (G.value.events.datapointEnter && G.value.events.datapointEnter({
1234
+ datapoint: e,
1235
+ seriesIndex: t
1236
+ }), !X.value.showTooltip) return;
1237
+ ut.value = n, W.value = t, $.value = e.id, mn.value = {
1238
+ datapoint: e,
1239
+ config: G.value,
1240
+ seriesIndex: t
1241
+ };
1242
+ let r = G.value.style.chart.tooltip.customFormat;
1243
+ if (fn.value = !1, d(r)) try {
1244
+ let t = r({
1245
+ datapoint: e,
1246
+ config: G.value
1247
+ });
1248
+ typeof t == "string" && (pn.value = t, fn.value = !0);
1249
+ } catch {
1250
+ console.warn("Custom format cannot be applied."), fn.value = !1;
1251
+ }
1252
+ fn.value || (pn.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${`<svg viewBox="0 0 10 10" height="${G.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${e.color}"/></svg><span>${e.name}:</span><b>${(e.value || 0).toFixed(G.value.style.chart.tooltip.roundingValue)}</b>`}</div>`), n === "keyboard" && de(() => {
1253
+ vn(t);
1254
+ }), Ve.value = !0;
1255
+ }
1256
+ async function bn() {
1257
+ if (Pe("copyAlt", {
1258
+ config: G.value,
1259
+ dataset: Z.value
1260
+ }), !G.value.userOptions.callbacks.altCopy) {
1261
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1262
+ return;
1263
+ }
1264
+ await Promise.resolve(G.value.userOptions.callbacks.altCopy({
1265
+ config: G.value,
1266
+ dataset: Z.value
1267
+ }));
1268
+ }
1269
+ function xn() {
1270
+ W.value = null, dt.value = !0;
1271
+ }
1272
+ function Sn() {
1273
+ hn(), dt.value = !1;
1274
+ }
1275
+ function Cn(e) {
1276
+ if (!q.value || Gt.value || document.activeElement !== q.value || !Z.value.length) return;
1277
+ let t = e.key === "ArrowLeft" || e.key === "ArrowUp", n = e.key === "ArrowRight" || e.key === "ArrowDown", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1278
+ if (!t && !n && !r && !i) return;
1279
+ if (e.preventDefault(), e.stopPropagation(), i) {
1280
+ hn();
1281
+ return;
1282
+ }
1283
+ if (r) {
1284
+ if (W.value === null) return;
1285
+ let e = Z.value[W.value];
1286
+ if (!e) return;
1287
+ _n(e, W.value);
1288
+ return;
1289
+ }
1290
+ let a = W.value;
1291
+ a === null || a < 0 || a >= Z.value.length ? a = n ? 0 : Z.value.length - 1 : (a += n ? 1 : -1, a < 0 && (a = Z.value.length - 1), a >= Z.value.length && (a = 0));
1292
+ let o = Z.value[a];
1293
+ o && yn(o, a, "keyboard");
1294
+ }
1295
+ let wn = O(() => ({
1296
+ headers: Bt.value?.colNames ?? [],
1297
+ rows: Bt.value?.a11yBody ?? []
1298
+ }));
1299
+ return C({
1300
+ getData: Ht,
1301
+ getImage: tn,
1302
+ generateCsv: zt,
1303
+ generatePdf: Nt,
1304
+ generateImage: Pt,
1305
+ generateSvg: cn,
1306
+ resetZoom: Xt,
1307
+ toggleTable: Ut,
1308
+ toggleTooltip: Wt,
1309
+ toggleAnnotator: Kt,
1310
+ toggleFullscreen: Vt,
1311
+ toggleZoom: qt,
1312
+ copyAlt: bn
1313
+ }), (e, t) => (I(), j("div", {
1314
+ class: "vue-data-ui-component vue-ui-word-cloud",
1315
+ ref_key: "wordCloudChart",
1316
+ ref: U,
1317
+ id: `wordCloud_${H.value}`,
1318
+ "data-resizing": Tt.value,
1319
+ "data-relayout": Ge.value,
1320
+ style: pe(`width: 100%; font-family:${G.value.style.fontFamily};background:${G.value.style.chart.backgroundColor};${G.value.responsive ? "height:100%" : ""}`),
1321
+ onMouseenter: t[3] ||= () => z(yt)(!0),
1322
+ onMouseleave: t[4] ||= () => {
1323
+ z(yt)(!1), dt.value || hn();
1324
+ }
1325
+ }, [
1326
+ M("div", {
1327
+ id: `chart-instructions-${H.value}`,
1328
+ class: "sr-only"
1329
+ }, [M("p", null, ye(G.value.a11y.translations.keyboardNavigation), 1)], 8, Xe),
1330
+ wn.value?.rows?.length ? (I(), k(ne, {
1331
+ key: 0,
1332
+ uid: H.value,
1333
+ head: wn.value.headers,
1334
+ body: wn.value.rows,
1335
+ notice: G.value.a11y.translations.tableAvailable,
1336
+ caption: G.value.a11y.translations.tableCaption
1337
+ }, null, 8, [
1338
+ "uid",
1339
+ "head",
1340
+ "body",
1341
+ "notice",
1342
+ "caption"
1343
+ ])) : A("", !0),
1344
+ G.value.userOptions.buttons.annotator ? (I(), k(z(De), {
1345
+ key: 1,
1346
+ svgRef: z(q),
1347
+ backgroundColor: G.value.style.chart.backgroundColor,
1348
+ color: G.value.style.chart.color,
1349
+ active: Gt.value,
1350
+ isCursorPointer: K.value,
1351
+ onClose: Kt
1352
+ }, {
1353
+ "annotator-action-close": B(() => [R(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1354
+ "annotator-action-color": B(({ color: t }) => [R(e.$slots, "annotator-action-color", F(P({ color: t })), void 0, !0)]),
1355
+ "annotator-action-draw": B(({ mode: t }) => [R(e.$slots, "annotator-action-draw", F(P({ mode: t })), void 0, !0)]),
1356
+ "annotator-action-undo": B(({ disabled: t }) => [R(e.$slots, "annotator-action-undo", F(P({ disabled: t })), void 0, !0)]),
1357
+ "annotator-action-redo": B(({ disabled: t }) => [R(e.$slots, "annotator-action-redo", F(P({ disabled: t })), void 0, !0)]),
1358
+ "annotator-action-delete": B(({ disabled: t }) => [R(e.$slots, "annotator-action-delete", F(P({ disabled: t })), void 0, !0)]),
1359
+ _: 3
1360
+ }, 8, [
1361
+ "svgRef",
1362
+ "backgroundColor",
1363
+ "color",
1364
+ "active",
1365
+ "isCursorPointer"
1366
+ ])) : A("", !0),
1367
+ G.value.style.chart.title.text ? (I(), j("div", {
1368
+ key: 2,
1369
+ ref_key: "chartTitle",
1370
+ ref: Le,
1371
+ style: "width:100%;background:transparent;padding-bottom:24px"
1372
+ }, [(I(), k(S, {
1373
+ key: `title_${ze.value}`,
1374
+ config: {
1375
+ title: { ...G.value.style.chart.title },
1376
+ subtitle: { ...G.value.style.chart.title.subtitle }
1377
+ }
1378
+ }, null, 8, ["config"]))], 512)) : A("", !0),
1379
+ G.value.userOptions.show && Fe.value && (z(bt) || z(vt)) ? (I(), k(z(Oe), {
1380
+ ref_key: "userOptionsRef",
1381
+ ref: Ue,
1382
+ key: `user_option_${Ie.value}`,
1383
+ backgroundColor: G.value.style.chart.backgroundColor,
1384
+ color: G.value.style.chart.color,
1385
+ isPrinting: z(jt),
1386
+ isImaging: z(Mt),
1387
+ uid: H.value,
1388
+ hasPdf: G.value.userOptions.buttons.pdf,
1389
+ hasXls: G.value.userOptions.buttons.csv,
1390
+ hasImg: G.value.userOptions.buttons.img,
1391
+ hasSvg: G.value.userOptions.buttons.svg,
1392
+ hasTable: G.value.userOptions.buttons.table,
1393
+ hasFullscreen: G.value.userOptions.buttons.fullscreen,
1394
+ hasAltCopy: G.value.userOptions.buttons.altCopy,
1395
+ isFullscreen: Q.value,
1396
+ titles: { ...G.value.userOptions.buttonTitles },
1397
+ chartElement: U.value,
1398
+ position: G.value.userOptions.position,
1399
+ hasTooltip: G.value.style.chart.tooltip.show && G.value.userOptions.buttons.tooltip,
1400
+ isTooltip: X.value.showTooltip,
1401
+ hasAnnotator: G.value.userOptions.buttons.annotator,
1402
+ isAnnotation: Gt.value,
1403
+ callbacks: G.value.userOptions.callbacks,
1404
+ printScale: G.value.userOptions.print.scale,
1405
+ tableDialog: G.value.table.useDialog,
1406
+ hasZoom: G.value.userOptions.buttons.zoom,
1407
+ isZoom: X.value.showZoom,
1408
+ isCursorPointer: K.value,
1409
+ onToggleFullscreen: Vt,
1410
+ onGeneratePdf: z(Nt),
1411
+ onGenerateCsv: zt,
1412
+ onGenerateImage: ln,
1413
+ onGenerateSvg: cn,
1414
+ onToggleTable: Ut,
1415
+ onToggleTooltip: Wt,
1416
+ onToggleAnnotator: Kt,
1417
+ onToggleZoom: qt,
1418
+ onCopyAlt: bn,
1419
+ style: pe({ visibility: z(bt) ? z(vt) ? "visible" : "hidden" : "visible" })
1420
+ }, se({ _: 2 }, [
1421
+ e.$slots.menuIcon ? {
1422
+ name: "menuIcon",
1423
+ fn: B(({ isOpen: t, color: n }) => [R(e.$slots, "menuIcon", F(P({
1424
+ isOpen: t,
1425
+ color: n
1426
+ })), void 0, !0)]),
1427
+ key: "0"
1428
+ } : void 0,
1429
+ e.$slots.optionTooltip ? {
1430
+ name: "optionTooltip",
1431
+ fn: B(() => [R(e.$slots, "optionTooltip", {}, void 0, !0)]),
1432
+ key: "1"
1433
+ } : void 0,
1434
+ e.$slots.optionPdf ? {
1435
+ name: "optionPdf",
1436
+ fn: B(() => [R(e.$slots, "optionPdf", {}, void 0, !0)]),
1437
+ key: "2"
1438
+ } : void 0,
1439
+ e.$slots.optionCsv ? {
1440
+ name: "optionCsv",
1441
+ fn: B(() => [R(e.$slots, "optionCsv", {}, void 0, !0)]),
1442
+ key: "3"
1443
+ } : void 0,
1444
+ e.$slots.optionImg ? {
1445
+ name: "optionImg",
1446
+ fn: B(() => [R(e.$slots, "optionImg", {}, void 0, !0)]),
1447
+ key: "4"
1448
+ } : void 0,
1449
+ e.$slots.optionSvg ? {
1450
+ name: "optionSvg",
1451
+ fn: B(() => [R(e.$slots, "optionSvg", {}, void 0, !0)]),
1452
+ key: "5"
1453
+ } : void 0,
1454
+ e.$slots.optionTable ? {
1455
+ name: "optionTable",
1456
+ fn: B(() => [R(e.$slots, "optionTable", {}, void 0, !0)]),
1457
+ key: "6"
1458
+ } : void 0,
1459
+ e.$slots.optionFullscreen ? {
1460
+ name: "optionFullscreen",
1461
+ fn: B(({ toggleFullscreen: t, isFullscreen: n }) => [R(e.$slots, "optionFullscreen", F(P({
1462
+ toggleFullscreen: t,
1463
+ isFullscreen: n
1464
+ })), void 0, !0)]),
1465
+ key: "7"
1466
+ } : void 0,
1467
+ e.$slots.optionAnnotator ? {
1468
+ name: "optionAnnotator",
1469
+ fn: B(({ toggleAnnotator: t, isAnnotator: n }) => [R(e.$slots, "optionAnnotator", F(P({
1470
+ toggleAnnotator: t,
1471
+ isAnnotator: n
1472
+ })), void 0, !0)]),
1473
+ key: "8"
1474
+ } : void 0,
1475
+ e.$slots.optionZoom ? {
1476
+ name: "optionZoom",
1477
+ fn: B(({ toggleZoom: t, isZoomLocked: n }) => [R(e.$slots, "optionZoom", F(P({
1478
+ toggleZoom: t,
1479
+ isZoomLocked: n
1480
+ })), void 0, !0)]),
1481
+ key: "9"
1482
+ } : void 0,
1483
+ e.$slots.optionAltCopy ? {
1484
+ name: "optionAltCopy",
1485
+ fn: B(({ altCopy: t }) => [R(e.$slots, "optionAltCopy", F(P({ altCopy: t })), void 0, !0)]),
1486
+ key: "10"
1487
+ } : void 0,
1488
+ e.$slots["custom-menu-before"] ? {
1489
+ name: "custom-menu-before",
1490
+ fn: B(() => [R(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1491
+ key: "11"
1492
+ } : void 0,
1493
+ e.$slots["custom-menu-after"] ? {
1494
+ name: "custom-menu-after",
1495
+ fn: B(() => [R(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1496
+ key: "12"
1497
+ } : void 0
1498
+ ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasTooltip.isTooltip.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.hasZoom.isZoom.isCursorPointer.onGeneratePdf.style".split("."))) : A("", !0),
1499
+ G.value.style.chart.controls.position === "top" && G.value.style.chart.controls.show && !z(pt) ? (I(), k(ae, {
1500
+ key: 4,
1501
+ ref_key: "zoomControls",
1502
+ ref: Ke,
1503
+ config: G.value,
1504
+ scale: z(en),
1505
+ isFullscreen: Q.value,
1506
+ isCursorPointer: K.value,
1507
+ onZoomIn: un,
1508
+ onZoomOut: dn,
1509
+ onResetZoom: t[0] ||= (e) => z(Xt)(!0)
1510
+ }, null, 8, [
1511
+ "config",
1512
+ "scale",
1513
+ "isFullscreen",
1514
+ "isCursorPointer"
1515
+ ])) : A("", !0),
1516
+ M("div", Ze, [(I(), j("svg", {
1517
+ ref_key: "svgRef",
1518
+ ref: q,
1519
+ class: fe({
1520
+ "vue-data-ui-fullscreen--on": Q.value,
1521
+ "vue-data-ui-fulscreen--off": !Q.value
1522
+ }),
1523
+ "aria-describedby": `chart-instructions-${H.value}`,
1524
+ xmlns: z(p),
1525
+ viewBox: `${z(Yt).x} ${z(Yt).y} ${z(Yt).width} ${z(Yt).height}`,
1526
+ style: "overflow:hidden;background:transparent;display:block",
1527
+ tabindex: "0",
1528
+ onFocus: xn,
1529
+ onBlur: Sn,
1530
+ onKeydown: Cn
1531
+ }, [
1532
+ le(z(ke)),
1533
+ e.$slots["chart-background"] ? (I(), j("foreignObject", {
1534
+ key: 0,
1535
+ x: 0,
1536
+ y: 0,
1537
+ width: J.value.width <= 0 ? 10 : J.value.width,
1538
+ height: J.value.height <= 0 ? 10 : J.value.height,
1539
+ style: { pointerEvents: "none" }
1540
+ }, [R(e.$slots, "chart-background", {}, void 0, !0)], 8, $e)) : A("", !0),
1541
+ M("g", {
1542
+ transform: `translate(${St.value.x}, ${St.value.y})`,
1543
+ class: fe({ "wc-finalized": We.value })
1544
+ }, [(I(!0), j(oe, null, ge(Z.value, (e, t) => (I(), j("g", {
1545
+ key: e.id,
1546
+ class: "vue-ui-word-cloud-word",
1547
+ transform: `translate(${e.x}, ${e.y})`
1548
+ }, [e.minX === void 0 ? A("", !0) : (I(), j("rect", {
1549
+ key: 0,
1550
+ "data-a11y-word-index": `${t}-${H.value}`,
1551
+ x: e.minX,
1552
+ y: e.minY * 1.25,
1553
+ width: e.maxX - e.minX,
1554
+ height: e.maxY - e.minY,
1555
+ fill: "transparent",
1556
+ "pointer-events": "visiblePainted",
1557
+ "aria-label": `${e.name}: ${(e.value || 0).toFixed(G.value.style.chart.tooltip.roundingValue)}`,
1558
+ onMouseover: (n) => yn(e, t),
1559
+ onMouseleave: (n) => gn(e, t),
1560
+ onClick: (n) => _n(e, t)
1561
+ }, null, 40, nt)), M("text", {
1562
+ fill: e.color,
1563
+ "font-weight": G.value.style.chart.words.bold ? "bold" : "normal",
1564
+ x: 0,
1565
+ y: 0,
1566
+ "font-size": e.fontSize,
1567
+ transform: `translate(${e.width / 2}, ${e.height / 2})`,
1568
+ "text-anchor": "middle",
1569
+ "dominant-baseline": "central",
1570
+ "paint-order": "stroke fill",
1571
+ stroke: !$.value || $.value === e.id ? G.value.style.chart.words.selectedStroke : void 0,
1572
+ "stroke-width": e.height * .05,
1573
+ "stroke-linecap": "round",
1574
+ "stroke-linejoin": "round",
1575
+ style: pe(`
1576
+ pointer-events:none;
1577
+ fill-opacity:${!$.value || $.value === e.id || !We.value ? 1 : G.value.style.chart.words.hoverOpacity} !important;
1578
+ `)
1579
+ }, ye(e.name), 13, rt)], 8, tt))), 128))], 10, et),
1580
+ R(e.$slots, "svg", { svg: {
1581
+ ...J.value,
1582
+ isPrintingImg: z(jt) || z(Mt) || Je.value,
1583
+ isPrintingSvg: ct.value
1584
+ } }, void 0, !0)
1585
+ ], 42, Qe)), e.$slots.hint ? (I(), j("div", it, [R(e.$slots, "hint", F(P({
1586
+ hint: G.value.a11y.translations.keyboardNavigation,
1587
+ isVisible: dt.value
1588
+ })), void 0, !0)])) : A("", !0)]),
1589
+ e.$slots.watermark ? (I(), j("div", at, [R(e.$slots, "watermark", F(P({ isPrinting: z(jt) || z(Mt) || Je.value || ct.value })), void 0, !0)])) : A("", !0),
1590
+ z(Zt) ? (I(), j("div", ot, [R(e.$slots, "reset-action", { reset: z(Xt) }, void 0, !0)])) : A("", !0),
1591
+ G.value.style.chart.controls.position === "bottom" && G.value.style.chart.controls.show && !z(pt) ? (I(), k(ae, {
1592
+ key: 7,
1593
+ ref_key: "zoomControls",
1594
+ ref: Ke,
1595
+ config: G.value,
1596
+ scale: z(en),
1597
+ isFullscreen: Q.value,
1598
+ isCursorPointer: K.value,
1599
+ onZoomIn: un,
1600
+ onZoomOut: dn,
1601
+ onResetZoom: t[1] ||= (e) => z(Xt)(!0)
1602
+ }, null, 8, [
1603
+ "config",
1604
+ "scale",
1605
+ "isFullscreen",
1606
+ "isCursorPointer"
1607
+ ])) : A("", !0),
1608
+ le(z(Ce), {
1609
+ teleportTo: G.value.style.chart.tooltip.teleportTo,
1610
+ show: X.value.showTooltip && Ve.value,
1611
+ backgroundColor: G.value.style.chart.tooltip.backgroundColor,
1612
+ color: G.value.style.chart.tooltip.color,
1613
+ fontSize: G.value.style.chart.tooltip.fontSize,
1614
+ borderRadius: G.value.style.chart.tooltip.borderRadius,
1615
+ borderColor: G.value.style.chart.tooltip.borderColor,
1616
+ borderWidth: G.value.style.chart.tooltip.borderWidth,
1617
+ backgroundOpacity: G.value.style.chart.tooltip.backgroundOpacity,
1618
+ position: G.value.style.chart.tooltip.position,
1619
+ offsetX: G.value.style.chart.tooltip.offsetX,
1620
+ offsetY: G.value.style.chart.tooltip.offsetY,
1621
+ parent: U.value,
1622
+ content: pn.value,
1623
+ isCustom: fn.value,
1624
+ isFullscreen: Q.value,
1625
+ smooth: G.value.style.chart.tooltip.smooth,
1626
+ backdropFilter: G.value.style.chart.tooltip.backdropFilter,
1627
+ smoothForce: G.value.style.chart.tooltip.smoothForce,
1628
+ smoothSnapThreshold: G.value.style.chart.tooltip.smoothSnapThreshold,
1629
+ isA11yMode: ut.value === "keyboard",
1630
+ a11yPosition: lt.value
1631
+ }, {
1632
+ "tooltip-before": B(() => [R(e.$slots, "tooltip-before", F(P({ ...mn.value })), void 0, !0)]),
1633
+ tooltip: B(() => [R(e.$slots, "tooltip", F(P({ ...mn.value })), void 0, !0)]),
1634
+ "tooltip-after": B(() => [R(e.$slots, "tooltip-after", F(P({ ...mn.value })), void 0, !0)]),
1635
+ _: 3
1636
+ }, 8, [
1637
+ "teleportTo",
1638
+ "show",
1639
+ "backgroundColor",
1640
+ "color",
1641
+ "fontSize",
1642
+ "borderRadius",
1643
+ "borderColor",
1644
+ "borderWidth",
1645
+ "backgroundOpacity",
1646
+ "position",
1647
+ "offsetX",
1648
+ "offsetY",
1649
+ "parent",
1650
+ "content",
1651
+ "isCustom",
1652
+ "isFullscreen",
1653
+ "smooth",
1654
+ "backdropFilter",
1655
+ "smoothForce",
1656
+ "smoothSnapThreshold",
1657
+ "isA11yMode",
1658
+ "a11yPosition"
1659
+ ]),
1660
+ e.$slots.source ? (I(), j("div", {
1661
+ key: 8,
1662
+ ref_key: "source",
1663
+ ref: Re,
1664
+ dir: "auto"
1665
+ }, [R(e.$slots, "source", {}, void 0, !0)], 512)) : A("", !0),
1666
+ Fe.value && G.value.userOptions.buttons.table ? (I(), k(_e(nn.value.component), ue({ key: 9 }, nn.value.props, {
1667
+ ref_key: "tableUnit",
1668
+ ref: He,
1669
+ onClose: rn
1670
+ }), se({
1671
+ content: B(() => [(I(), k(z(Ee), {
1672
+ key: `table_${Be.value}`,
1673
+ colNames: Bt.value.colNames,
1674
+ head: Bt.value.head,
1675
+ body: Bt.value.body,
1676
+ config: Bt.value.config,
1677
+ title: G.value.table.useDialog ? "" : nn.value.title,
1678
+ withCloseButton: !G.value.table.useDialog,
1679
+ isCursorPointer: K.value,
1680
+ onClose: rn
1681
+ }, {
1682
+ th: B(({ th: e }) => [M("div", {
1683
+ innerHTML: e,
1684
+ style: {
1685
+ display: "flex",
1686
+ "align-items": "center"
1687
+ }
1688
+ }, null, 8, st)]),
1689
+ td: B(({ td: e }) => [ce(ye(e.name || e), 1)]),
1690
+ _: 1
1691
+ }, 8, [
1692
+ "colNames",
1693
+ "head",
1694
+ "body",
1695
+ "config",
1696
+ "title",
1697
+ "withCloseButton",
1698
+ "isCursorPointer"
1699
+ ]))]),
1700
+ _: 2
1701
+ }, [G.value.table.useDialog ? {
1702
+ name: "title",
1703
+ fn: B(() => [ce(ye(nn.value.title), 1)]),
1704
+ key: "0"
1705
+ } : void 0, G.value.table.useDialog ? {
1706
+ name: "actions",
1707
+ fn: B(() => [M("button", {
1708
+ tabindex: "0",
1709
+ class: "vue-ui-user-options-button",
1710
+ onClick: t[2] ||= (e) => zt(G.value.userOptions.callbacks.csv),
1711
+ style: pe({ cursor: K.value ? "pointer" : "default" })
1712
+ }, [le(z(we), {
1713
+ name: "fileCsv",
1714
+ stroke: nn.value.props.color
1715
+ }, null, 8, ["stroke"])], 4)]),
1716
+ key: "1"
1717
+ } : void 0]), 1040)) : A("", !0),
1718
+ R(e.$slots, "skeleton", {}, () => [z(pt) ? (I(), k(y, { key: 0 })) : A("", !0)], !0)
1719
+ ], 44, Ye));
1720
+ }
1721
+ }, [["__scopeId", "data-v-95c02048"]]);
1722
+ //#endregion
1723
+ export { Je as n, ct as t };