vue-data-ui 3.25.4 → 3.25.6

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 (213) hide show
  1. package/README.md +13 -13
  2. package/dist/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
  3. package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
  4. package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
  5. package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
  6. package/dist/{ColorPicker-ZJrR3Olp.js → ColorPicker-CUy15T72.js} +102 -100
  7. package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
  8. package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
  9. package/dist/{NonSvgPenAndPaper-DS84BAOx.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
  10. package/dist/{PackageVersion-5SWftabm.js → PackageVersion-ur6jKRL5.js} +1 -1
  11. package/dist/{PenAndPaper-B_SdRSKH.js → PenAndPaper-KFzKlvbi.js} +20 -4
  12. package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
  13. package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
  14. package/dist/components/vue-ui-3d-bar.js +1 -1
  15. package/dist/components/vue-ui-accordion.js +1 -1
  16. package/dist/components/vue-ui-age-pyramid.js +1 -1
  17. package/dist/components/vue-ui-annotator.js +1 -1
  18. package/dist/components/vue-ui-bullet.js +1 -1
  19. package/dist/components/vue-ui-bump.js +1 -1
  20. package/dist/components/vue-ui-candlestick.js +1 -1
  21. package/dist/components/vue-ui-carousel-table.js +1 -1
  22. package/dist/components/vue-ui-chestnut.js +1 -1
  23. package/dist/components/vue-ui-chord.js +1 -1
  24. package/dist/components/vue-ui-circle-pack.js +1 -1
  25. package/dist/components/vue-ui-cursor.js +1 -1
  26. package/dist/components/vue-ui-dag.js +1 -1
  27. package/dist/components/vue-ui-dashboard.js +1 -1
  28. package/dist/components/vue-ui-digits.js +1 -1
  29. package/dist/components/vue-ui-donut-evolution.js +1 -1
  30. package/dist/components/vue-ui-donut.js +1 -1
  31. package/dist/components/vue-ui-dumbbell.js +1 -1
  32. package/dist/components/vue-ui-flow.js +1 -1
  33. package/dist/components/vue-ui-funnel.js +1 -1
  34. package/dist/components/vue-ui-galaxy.js +1 -1
  35. package/dist/components/vue-ui-gauge.js +1 -1
  36. package/dist/components/vue-ui-geo.js +1 -1
  37. package/dist/components/vue-ui-gizmo.js +1 -1
  38. package/dist/components/vue-ui-heatmap.js +1 -1
  39. package/dist/components/vue-ui-hill.js +1 -1
  40. package/dist/components/vue-ui-history-plot.js +1 -1
  41. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  42. package/dist/components/vue-ui-icon.js +1 -1
  43. package/dist/components/vue-ui-kpi.js +1 -1
  44. package/dist/components/vue-ui-label.js +1 -1
  45. package/dist/components/vue-ui-mini-loader.js +1 -1
  46. package/dist/components/vue-ui-molecule.js +1 -1
  47. package/dist/components/vue-ui-mood-radar.js +1 -1
  48. package/dist/components/vue-ui-nested-donuts.js +1 -1
  49. package/dist/components/vue-ui-onion.js +1 -1
  50. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  51. package/dist/components/vue-ui-quadrant.js +1 -1
  52. package/dist/components/vue-ui-quick-chart.js +1 -1
  53. package/dist/components/vue-ui-radar.js +1 -1
  54. package/dist/components/vue-ui-rating.js +1 -1
  55. package/dist/components/vue-ui-relation-circle.js +1 -1
  56. package/dist/components/vue-ui-ridgeline.js +1 -1
  57. package/dist/components/vue-ui-rings.js +1 -1
  58. package/dist/components/vue-ui-scatter.js +1 -1
  59. package/dist/components/vue-ui-skeleton.js +1 -1
  60. package/dist/components/vue-ui-smiley.js +1 -1
  61. package/dist/components/vue-ui-spark-trend.js +1 -1
  62. package/dist/components/vue-ui-sparkbar.js +1 -1
  63. package/dist/components/vue-ui-sparkgauge.js +1 -1
  64. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  65. package/dist/components/vue-ui-sparkline.js +1 -1
  66. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  67. package/dist/components/vue-ui-stackbar.js +1 -1
  68. package/dist/components/vue-ui-stackline.js +1 -1
  69. package/dist/components/vue-ui-strip-plot.js +1 -1
  70. package/dist/components/vue-ui-table-heatmap.js +1 -1
  71. package/dist/components/vue-ui-table-sparkline.js +1 -1
  72. package/dist/components/vue-ui-table.js +1 -1
  73. package/dist/components/vue-ui-thermometer.js +1 -1
  74. package/dist/components/vue-ui-timer.js +1 -1
  75. package/dist/components/vue-ui-tiremarks.js +1 -1
  76. package/dist/components/vue-ui-treemap.js +1 -1
  77. package/dist/components/vue-ui-vertical-bar.js +1 -1
  78. package/dist/components/vue-ui-waffle.js +1 -1
  79. package/dist/components/vue-ui-wheel.js +1 -1
  80. package/dist/components/vue-ui-word-cloud.js +1 -1
  81. package/dist/components/vue-ui-world.js +1 -1
  82. package/dist/components/vue-ui-xy-canvas.js +1 -1
  83. package/dist/components/vue-ui-xy.js +1 -1
  84. package/dist/{package-DmsdiyeS.js → package-Dx7M6sYy.js} +1 -1
  85. package/dist/{render-common-zoPh9a78.js → render-common-DETHvNhl.js} +1 -1
  86. package/dist/ssr/vue-ui-donut.js +1 -1
  87. package/dist/ssr/vue-ui-xy.js +1 -1
  88. package/dist/ssr.js +2 -2
  89. package/dist/style.css +1 -1
  90. package/dist/types/vue-data-ui.d.ts +80 -1
  91. package/dist/types/vue-ui-annotator.d.ts +58 -2
  92. package/dist/{useConfig-CyCVHo81.js → useConfig-CIQZ6_r7.js} +1339 -1313
  93. package/dist/{useObjectBindings-ByORl1rV.js → useObjectBindings---mHNfbS.js} +2 -2
  94. package/dist/utils.js +1 -1
  95. package/dist/{vue-data-ui-DTj71yB7.js → vue-data-ui-Dh3_EsHb.js} +70 -70
  96. package/dist/vue-data-ui.js +71 -71
  97. package/dist/vue-ui-3d-bar-i1REAKnM.js +1831 -0
  98. package/dist/{vue-ui-accordion-D4zsdacF.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
  99. package/dist/vue-ui-age-pyramid-DuHblCNO.js +1293 -0
  100. package/dist/vue-ui-annotator-CTQHAPho.js +3325 -0
  101. package/dist/vue-ui-bullet-CYLnKrmM.js +702 -0
  102. package/dist/{vue-ui-bump-BkOtQNWe.js → vue-ui-bump-DhwySwgn.js} +382 -380
  103. package/dist/vue-ui-candlestick-BpiECaDj.js +1859 -0
  104. package/dist/{vue-ui-carousel-table-CRgbs7jR.js → vue-ui-carousel-table-D-T2yA7-.js} +2 -2
  105. package/dist/vue-ui-chestnut-1MsZ9Q3r.js +2016 -0
  106. package/dist/vue-ui-chord-QBQUSe7r.js +1347 -0
  107. package/dist/vue-ui-circle-pack-ZWEwtesD.js +1635 -0
  108. package/dist/{vue-ui-cursor-BHyXRadA.js → vue-ui-cursor-CHQcHAHQ.js} +2 -2
  109. package/dist/{vue-ui-dag-CyVqaLbF.js → vue-ui-dag-C_inEafb.js} +794 -792
  110. package/dist/{vue-ui-dashboard-7I-7wvCP.js → vue-ui-dashboard-Bs2mBur5.js} +74 -72
  111. package/dist/{vue-ui-digits-BBL8uERO.js → vue-ui-digits-DwE4MoXI.js} +2 -2
  112. package/dist/vue-ui-donut-BM9dMHXj.js +2415 -0
  113. package/dist/{vue-ui-donut-DcgUuefk.js → vue-ui-donut-CbOSJmRu.js} +2 -2
  114. package/dist/vue-ui-donut-evolution-C97_RHus.js +1552 -0
  115. package/dist/vue-ui-dumbbell-DwKa5EL5.js +1533 -0
  116. package/dist/vue-ui-flow-DTTr3YL9.js +1217 -0
  117. package/dist/vue-ui-funnel-C4pkBk3D.js +749 -0
  118. package/dist/vue-ui-galaxy-CuAPLOvX.js +1085 -0
  119. package/dist/vue-ui-gauge-DLDULH26.js +934 -0
  120. package/dist/{vue-ui-geo-jR4P4pbt.js → vue-ui-geo-DXIHhp-G.js} +431 -429
  121. package/dist/{vue-ui-gizmo-D6W86s9o.js → vue-ui-gizmo-PuURiePo.js} +2 -2
  122. package/dist/vue-ui-heatmap-mvWLKB99.js +1555 -0
  123. package/dist/{vue-ui-hill-fFq7pm-g.js → vue-ui-hill-DqsVJkmO.js} +472 -470
  124. package/dist/vue-ui-history-plot-BBVLgt9_.js +1698 -0
  125. package/dist/{vue-ui-horizontal-bar-D3Sft4kp.js → vue-ui-horizontal-bar-y8Q8PZwT.js} +513 -511
  126. package/dist/{vue-ui-kpi-fzLsKlyE.js → vue-ui-kpi-B2hf3kpp.js} +2 -2
  127. package/dist/{vue-ui-label-BSgLalWD.js → vue-ui-label-ClMQ5Gez.js} +1 -1
  128. package/dist/{vue-ui-mini-loader-BL2odRfu.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
  129. package/dist/vue-ui-molecule-eeW1Pmg8.js +929 -0
  130. package/dist/{vue-ui-mood-radar-bvGx6XgG.js → vue-ui-mood-radar-Dd1qfUiu.js} +378 -376
  131. package/dist/vue-ui-nested-donuts-CUARCr6O.js +1503 -0
  132. package/dist/vue-ui-onion-NoxHP0cG.js +1235 -0
  133. package/dist/{vue-ui-parallel-coordinate-plot-B_QJ4N9o.js → vue-ui-parallel-coordinate-plot-Cp3pCyxK.js} +409 -407
  134. package/dist/vue-ui-quadrant-C3kQtaeX.js +1967 -0
  135. package/dist/{vue-ui-quick-chart-BFscCR59.js → vue-ui-quick-chart-BZq517pL.js} +8 -6
  136. package/dist/vue-ui-radar-DvNrl4uD.js +1374 -0
  137. package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
  138. package/dist/vue-ui-relation-circle-1iS6C0xx.js +905 -0
  139. package/dist/vue-ui-ridgeline-B-EZiPCF.js +1630 -0
  140. package/dist/vue-ui-rings-BXuwrHos.js +1252 -0
  141. package/dist/vue-ui-scatter-ByL-ZZ3B.js +2405 -0
  142. package/dist/{vue-ui-skeleton-zmbcOVEf.js → vue-ui-skeleton-BcU1onF6.js} +698 -698
  143. package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
  144. package/dist/vue-ui-spark-trend-DjS31avb.js +457 -0
  145. package/dist/vue-ui-sparkbar-1Al_TLw1.js +401 -0
  146. package/dist/vue-ui-sparkgauge-CwLo53Y8.js +268 -0
  147. package/dist/vue-ui-sparkhistogram-CGw6SThG.js +589 -0
  148. package/dist/{vue-ui-sparkline-Dv7XrEzO.js → vue-ui-sparkline-CSZGBFfI.js} +511 -511
  149. package/dist/vue-ui-sparkstackbar-B8dloLMp.js +738 -0
  150. package/dist/vue-ui-stackbar-FvNd77t1.js +2355 -0
  151. package/dist/vue-ui-stackline-CP7PkqiG.js +2469 -0
  152. package/dist/vue-ui-strip-plot-DSMlDkv1.js +1740 -0
  153. package/dist/{vue-ui-table-heatmap-Dv_ZKKm3.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
  154. package/dist/vue-ui-table-rwKtnJKt.js +1352 -0
  155. package/dist/vue-ui-table-sparkline-B6wyEAyC.js +738 -0
  156. package/dist/{vue-ui-thermometer-DytlLJ32.js → vue-ui-thermometer-D0_KsB-y.js} +194 -192
  157. package/dist/{vue-ui-timer-CvHP4HoW.js → vue-ui-timer-1Z2zginj.js} +153 -153
  158. package/dist/vue-ui-tiremarks-zbl7aooy.js +540 -0
  159. package/dist/vue-ui-treemap-Drs4gK6L.js +1733 -0
  160. package/dist/vue-ui-waffle-DqUVsVNE.js +1621 -0
  161. package/dist/vue-ui-wheel-DLCBPW9t.js +873 -0
  162. package/dist/vue-ui-word-cloud-8Agk9h6c.js +1710 -0
  163. package/dist/{vue-ui-world-D0_2upjg.js → vue-ui-world-BOBHo7-L.js} +526 -524
  164. package/dist/vue-ui-xy-CSTJzRkk.js +5283 -0
  165. package/dist/{vue-ui-xy-D_5FfaH-.js → vue-ui-xy-Dmk1gQkI.js} +2 -2
  166. package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
  167. package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
  168. package/package.json +1 -1
  169. package/dist/vue-ui-3d-bar-CH8SpxS2.js +0 -1829
  170. package/dist/vue-ui-age-pyramid-B9MUVi75.js +0 -1241
  171. package/dist/vue-ui-annotator-CmlcWPIm.js +0 -2886
  172. package/dist/vue-ui-bullet-n8KNnDwh.js +0 -700
  173. package/dist/vue-ui-candlestick-Bxlvqk49.js +0 -1857
  174. package/dist/vue-ui-chestnut-ByDKbkG9.js +0 -2014
  175. package/dist/vue-ui-chord-DQRBgVOx.js +0 -1345
  176. package/dist/vue-ui-circle-pack-CBBc0HOe.js +0 -1633
  177. package/dist/vue-ui-donut-DfiocufT.js +0 -2413
  178. package/dist/vue-ui-donut-evolution-BoqO8By2.js +0 -1550
  179. package/dist/vue-ui-dumbbell-7M_oUQdi.js +0 -1529
  180. package/dist/vue-ui-flow-CoylrfnO.js +0 -1215
  181. package/dist/vue-ui-funnel-DaBYHWIC.js +0 -747
  182. package/dist/vue-ui-galaxy-BIebStQ3.js +0 -1083
  183. package/dist/vue-ui-gauge-CwdTmiRP.js +0 -932
  184. package/dist/vue-ui-heatmap-DXYlGwqR.js +0 -1553
  185. package/dist/vue-ui-history-plot-CgIELoD2.js +0 -1696
  186. package/dist/vue-ui-molecule-DeHWkkhy.js +0 -929
  187. package/dist/vue-ui-nested-donuts-CeAV2xPk.js +0 -1501
  188. package/dist/vue-ui-onion-B7oFulsQ.js +0 -1233
  189. package/dist/vue-ui-quadrant-DrKnz37q.js +0 -1965
  190. package/dist/vue-ui-radar-Bzx69q8f.js +0 -1372
  191. package/dist/vue-ui-rating-CimC9FQ9.js +0 -359
  192. package/dist/vue-ui-relation-circle-DIQYyDGb.js +0 -903
  193. package/dist/vue-ui-ridgeline-CPEnM45x.js +0 -1621
  194. package/dist/vue-ui-rings-qPL5Iwji.js +0 -1250
  195. package/dist/vue-ui-scatter-BB0ClTsU.js +0 -2403
  196. package/dist/vue-ui-smiley-DzPkCMN-.js +0 -376
  197. package/dist/vue-ui-spark-trend-Ciq7-k_q.js +0 -457
  198. package/dist/vue-ui-sparkbar-D1M7-naP.js +0 -401
  199. package/dist/vue-ui-sparkgauge-rsqaeR_n.js +0 -268
  200. package/dist/vue-ui-sparkhistogram-C4WXt2Ni.js +0 -589
  201. package/dist/vue-ui-sparkstackbar-DDOXdeV-.js +0 -738
  202. package/dist/vue-ui-stackbar-C_hMnOLb.js +0 -2353
  203. package/dist/vue-ui-stackline-BHGi63lD.js +0 -2467
  204. package/dist/vue-ui-strip-plot-Cygpn-l8.js +0 -1738
  205. package/dist/vue-ui-table-BQna1wL6.js +0 -1352
  206. package/dist/vue-ui-table-sparkline-BCuimtk6.js +0 -738
  207. package/dist/vue-ui-tiremarks-BvjdZwgh.js +0 -538
  208. package/dist/vue-ui-treemap-C5OpqzSc.js +0 -1731
  209. package/dist/vue-ui-waffle-B7T_Zzan.js +0 -1619
  210. package/dist/vue-ui-wheel-D1B0k7IW.js +0 -871
  211. package/dist/vue-ui-word-cloud-C4pX6jop.js +0 -1708
  212. package/dist/vue-ui-xy-Ck41KYqF.js +0 -5281
  213. package/dist/vue-ui-xy-canvas-B_8Mu19r.js +0 -1824
@@ -1,1708 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, Ct as n, D as r, J as i, Lt as a, Pt as o, S as s, X as c, Yt as l, Zt as u, b as d, ht as f, nt as p, q as m, t as h } from "./lib-Dql7cqyA.js";
3
- import { n as g, t as _ } from "./useHints-Dq_w2E8B.js";
4
- import { t as v } from "./useConfig-CyCVHo81.js";
5
- import { t as y } from "./usePrinter-DISD7q5m.js";
6
- import { n as ee, t as te } from "./BaseScanner-DZvpgOjM.js";
7
- import { t as b } from "./useNestedProp-Chvyfpl-.js";
8
- import { t as x } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as S } from "./useChartExport-iwOqiIWX.js";
10
- import { t as C } from "./img-DhGApYG0.js";
11
- import { n as w } from "./Title-CPHi-evi.js";
12
- import { t as T } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
- import { i as ne, t as re } from "./useResponsive-ZtArZtUf.js";
14
- import { t as ie } from "./A11yDataTable-DdRsVULz.js";
15
- import { t as E } from "./useUserOptionState-DK-_1ddE.js";
16
- import { t as ae } from "./useChartAccessibility-DYqac8yF.js";
17
- import { t as oe } from "./usePanZoom-CYU3B4T3.js";
18
- import { t as se } from "./vue_ui_word_cloud-C-qIMNLu.js";
19
- import { t as ce } from "./BaseZoomControls-Xo16vFa4.js";
20
- import { Fragment as le, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createSlots as ue, createTextVNode as de, createVNode as fe, defineAsyncComponent as M, guardReactiveProps as N, mergeProps as pe, nextTick as me, normalizeClass as he, normalizeProps as P, normalizeStyle as ge, onBeforeUnmount as _e, onMounted as ve, openBlock as F, ref as I, renderList as ye, renderSlot as L, resolveDynamicComponent as be, shallowRef as xe, toDisplayString as Se, toRefs as Ce, unref as R, watch as we, withCtx as z } from "vue";
21
- //#region src/wordcloud.js
22
- var Te = {
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
- }, Ee = "fast";
54
- function De(e) {
55
- return Te[e] || Te[Ee];
56
- }
57
- var Oe = /* @__PURE__ */ new Map();
58
- function ke(e) {
59
- let t = String(e), n = Oe.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 Oe.set(t, o), o;
71
- }
72
- function Ae({ 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 je(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 Me(e, t) {
127
- return 4294967295 >>> 32 - (t - e + 1) << e >>> 0;
128
- }
129
- function Ne(e) {
130
- return 4294967295 << e >>> 0;
131
- }
132
- function Pe(e) {
133
- return 4294967295 >>> 31 - e >>> 0;
134
- }
135
- function Fe({ 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] & Me(_, v)) return !1;
144
- } else {
145
- if (e[m + h] & Ne(_)) return !1;
146
- for (let t = h + 1; t < g; t += 1) if (e[m + t]) return !1;
147
- if (e[m + g] & Pe(v)) return !1;
148
- }
149
- }
150
- return !0;
151
- }
152
- function Ie({ 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 = Me(_, v);
161
- e[m + h] |= t;
162
- } else {
163
- {
164
- let t = Ne(_);
165
- e[m + h] |= t;
166
- }
167
- for (let t = h + 1; t < g; t += 1) e[m + t] = 4294967295;
168
- {
169
- let t = Pe(v);
170
- e[m + g] |= t;
171
- }
172
- }
173
- }
174
- }
175
- function B({ 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 Le(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 Re({ 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 Le(i, n);
235
- }
236
- function V(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 ze = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map();
286
- function Be({ 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 Ve({ word: e, fontSize: t, pad: n, canvas: r, ctx: i, svg: a }) {
291
- let o = Be({
292
- word: e,
293
- fontSize: t,
294
- pad: n,
295
- svg: a
296
- }), s = ze.get(o);
297
- if (s) return {
298
- key: o,
299
- bitmap: s
300
- };
301
- let c = Ae({
302
- word: e,
303
- fontSize: t,
304
- pad: n,
305
- canvas: r,
306
- ctx: i,
307
- svg: a
308
- });
309
- return ze.set(o, c), {
310
- key: o,
311
- bitmap: c
312
- };
313
- }
314
- function He({ bitmapKey: e, wordMask: t, w: n, h: r, dilation: i }) {
315
- let a = `${e}::d${i}`, o = H.get(a);
316
- if (o) return o;
317
- let s = B({
318
- wordMask: t,
319
- w: n,
320
- h: r,
321
- dilation: i
322
- }), c = {
323
- wordMask: s,
324
- runs: je(s)
325
- };
326
- return H.set(a, c), c;
327
- }
328
- function Ue(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 We() {
348
- return typeof performance < "u" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
349
- }
350
- function Ge({ 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 Ke({ 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 qe({ 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 = Ke({
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: He({
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: Re({
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 Je({ 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 } = qe({
417
- currentBitmap: b === 1 ? e : V(e, b),
418
- strictPixelPadding: d,
419
- scaleFactor: b,
420
- baseBitmap: e,
421
- bitmapKey: f,
422
- proximity: ee,
423
- minimumVisualPadding: te
424
- }), re = 0, ie = 0;
425
- for (; re < l && ie < v;) {
426
- for (let e = 0; e < h.length; e += 1) {
427
- ie += 1;
428
- let l = Math.round(s + re * h[e] - x / 2), u = Math.round(c + re * g[e] - S / 2);
429
- if (!(l < 0 || u < 0 || l + x > a || u + S > o) && Fe({
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 Ie({
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
- re += _, ie & 1023 || await y();
463
- }
464
- b *= u, await y();
465
- }
466
- return null;
467
- }
468
- async function Ye({ 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 Je({
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 Je({
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 Xe({ words: e, proximity: t = 0, svg: n, strictPixelPadding: r, quality: i = Ee, onProgress: a, debugTiming: o = !1 }) {
518
- let s = We(), 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 = De(i), g = ke(h.spiralStep), _ = ke(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), re = Math.floor(m / 2), ie = [...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), E = [], ae = h.scaleStep;
531
- for (let e = 0; e < ie.length; e += 1) {
532
- let i = ie[e], o = E.length, s = Ge({
533
- value: i.value,
534
- minimumValue: te,
535
- maximumValue: b,
536
- configuredMinimumFontSize: v,
537
- maximumFontSize: y
538
- }), c = Ve({
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 oe = await Ye({
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: re,
560
- maximumRadius: T,
561
- scaleStep: ae,
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 (oe && (E.push(oe), a && E.length > o)) {
573
- let e = E[E.length - 1];
574
- a({
575
- word: e,
576
- all: E
577
- });
578
- }
579
- await u();
580
- }
581
- if (!E.length) return [];
582
- Ue(E, p, m);
583
- let oe = s() - c;
584
- return o && typeof console < "u" && console.log && console.log("[vue-data-ui][word-cloud] positionWordsAsync:", `${oe.toFixed(2)} ms for ${e.length} words`), E.sort((e, t) => t.fontSize - e.fontSize);
585
- }
586
- //#endregion
587
- //#region src/components/vue-ui-word-cloud.vue
588
- var U = /* @__PURE__ */ e({ default: () => ut }), Ze = [
589
- "id",
590
- "data-resizing",
591
- "data-relayout"
592
- ], Qe = ["id"], $e = { style: { position: "relative" } }, et = [
593
- "aria-describedby",
594
- "xmlns",
595
- "viewBox"
596
- ], tt = ["width", "height"], nt = ["transform"], rt = ["transform"], it = [
597
- "data-a11y-word-index",
598
- "x",
599
- "y",
600
- "width",
601
- "height",
602
- "aria-label",
603
- "onMouseover",
604
- "onMouseleave",
605
- "onClick"
606
- ], at = [
607
- "fill",
608
- "font-weight",
609
- "font-size",
610
- "transform",
611
- "stroke",
612
- "stroke-width"
613
- ], ot = {
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
- }, st = {
624
- key: 5,
625
- class: "vue-data-ui-watermark"
626
- }, ct = {
627
- key: 6,
628
- "data-dom-to-png-ignore": "",
629
- class: "reset-wrapper"
630
- }, lt = { style: {
631
- display: "flex",
632
- "align-items": "center"
633
- } }, ut = /*#__PURE__*/ T({
634
- __name: "vue-ui-word-cloud",
635
- props: {
636
- config: {
637
- type: Object,
638
- default() {
639
- return {};
640
- }
641
- },
642
- dataset: {
643
- type: [Array, String],
644
- default() {
645
- return [];
646
- }
647
- }
648
- },
649
- emits: ["copyAlt"],
650
- setup(e, { expose: T, emit: Te }) {
651
- let Ee = M(() => import("./Tooltip-hhrkQ3Lk.js")), De = M(() => import("./BaseIcon-t83PDe9k.js").then((e) => e.n)), Oe = M(() => import("./vue-ui-accordion-D4zsdacF.js").then((e) => e.n)), ke = M(() => import("./DataTable-COIO9gi4.js")), Ae = M(() => import("./PenAndPaper-B_SdRSKH.js").then((e) => e.t)), je = M(() => import("./UserOptions-f3Q0nqrj.js").then((e) => e.n)), Me = M(() => import("./PackageVersion-5SWftabm.js").then((e) => e.t)), Ne = M(() => import("./BaseDraggableDialog-BM_R41j8.js").then((e) => e.n)), { vue_ui_word_cloud: Pe } = v(), { isThemeValid: Fe, warnInvalidTheme: Ie } = x(), B = e, Le = Te, Re = D({
652
- get() {
653
- return !!B.dataset && B.dataset.length;
654
- },
655
- set(e) {
656
- return e;
657
- }
658
- }), V = I(m()), ze = I(0), H = I(null), Be = I(null), Ve = I(null), He = I(0), Ue = I(0), We = I(!1), Ge = I(null), Ke = I(null), qe = I(!1), Je = I(!1), Ye = I(null), U = I(null), ut = I({
659
- x: 0,
660
- y: 0
661
- }), dt = I("pointer"), ft = I(!1), W = I(St());
662
- g({
663
- config: () => W.value,
664
- dataset: () => B.dataset,
665
- component: "VueUiWordCloud",
666
- rules: [_.noHint]
667
- });
668
- let G = D(() => W.value.userOptions.useCursorPointer), pt = D(() => u({
669
- defaultConfig: {
670
- userOptions: { show: !1 },
671
- table: { show: !1 },
672
- useCssAnimation: !1,
673
- animationDelayMs: 0,
674
- nodeCategories: {},
675
- nodeCategoryColors: {},
676
- style: { chart: {
677
- backgroundColor: "#99999930",
678
- words: {
679
- color: "#6A6A6A",
680
- usePalette: !1,
681
- selectedStroke: "#CCCCCC"
682
- }
683
- } }
684
- },
685
- userConfig: W.value.skeletonConfig ?? {}
686
- })), { loading: mt, FINAL_DATASET: ht, manualLoading: gt } = ee({
687
- ...Ce(B),
688
- FINAL_CONFIG: W,
689
- prepareConfig: St,
690
- callback: () => {
691
- Promise.resolve().then(() => {
692
- Y.value.showTable = W.value.table.show, Y.value.showTooltip = W.value.style.chart.tooltip.show, Y.value.showZoom = W.value.style.chart.zoom.show;
693
- });
694
- },
695
- skeletonDataset: B.config?.skeletonDataset ?? [
696
- {
697
- name: "Lorem",
698
- value: 6
699
- },
700
- {
701
- name: "ipsum",
702
- value: 3
703
- },
704
- {
705
- name: "dolor",
706
- value: 1
707
- },
708
- {
709
- name: "sit",
710
- value: 3
711
- },
712
- {
713
- name: "amet",
714
- value: 3
715
- },
716
- {
717
- name: "consectetur",
718
- value: 2
719
- },
720
- {
721
- name: "adipiscing",
722
- value: 1
723
- },
724
- {
725
- name: "elit",
726
- value: 2
727
- },
728
- {
729
- name: "Vivamus",
730
- value: 2
731
- },
732
- {
733
- name: "pulvinar",
734
- value: 1
735
- },
736
- {
737
- name: "pretium",
738
- value: 1
739
- },
740
- {
741
- name: "venenatis",
742
- value: 2
743
- },
744
- {
745
- name: "Donec",
746
- value: 1
747
- },
748
- {
749
- name: "imperdiet",
750
- value: 3
751
- },
752
- {
753
- name: "id",
754
- value: 1
755
- },
756
- {
757
- name: "porttitor",
758
- value: 2
759
- },
760
- {
761
- name: "tristique",
762
- value: 1
763
- },
764
- {
765
- name: "Aenean",
766
- value: 2
767
- },
768
- {
769
- name: "ac",
770
- value: 5
771
- },
772
- {
773
- name: "commodo",
774
- value: 2
775
- },
776
- {
777
- name: "justo",
778
- value: 2
779
- },
780
- {
781
- name: "Vestibulum",
782
- value: 2
783
- },
784
- {
785
- name: "placerat",
786
- value: 1
787
- },
788
- {
789
- name: "molestie",
790
- value: 1
791
- },
792
- {
793
- name: "nisl",
794
- value: 1
795
- },
796
- {
797
- name: "lacinia",
798
- value: 2
799
- },
800
- {
801
- name: "nulla",
802
- value: 1
803
- },
804
- {
805
- name: "posuere",
806
- value: 2
807
- },
808
- {
809
- name: "quis",
810
- value: 3
811
- },
812
- {
813
- name: "ullamcorper",
814
- value: 1
815
- },
816
- {
817
- name: "eu",
818
- value: 1
819
- },
820
- {
821
- name: "ex",
822
- value: 1
823
- },
824
- {
825
- name: "vitae",
826
- value: 3
827
- },
828
- {
829
- name: "facilisis",
830
- value: 1
831
- },
832
- {
833
- name: "Aliquam",
834
- value: 1
835
- },
836
- {
837
- name: "erat",
838
- value: 1
839
- },
840
- {
841
- name: "volutpat",
842
- value: 1
843
- },
844
- {
845
- name: "Proin",
846
- value: 1
847
- },
848
- {
849
- name: "nunc",
850
- value: 1
851
- },
852
- {
853
- name: "felis",
854
- value: 1
855
- },
856
- {
857
- name: "gravida",
858
- value: 3
859
- },
860
- {
861
- name: "sed",
862
- value: 1
863
- },
864
- {
865
- name: "orci",
866
- value: 1
867
- },
868
- {
869
- name: "Interdum",
870
- value: 1
871
- },
872
- {
873
- name: "et",
874
- value: 1
875
- },
876
- {
877
- name: "malesuada",
878
- value: 1
879
- },
880
- {
881
- name: "fames",
882
- value: 1
883
- },
884
- {
885
- name: "ante",
886
- value: 1
887
- }
888
- ],
889
- skeletonConfig: u({
890
- defaultConfig: W.value,
891
- userConfig: pt.value
892
- })
893
- }), _t = I(vt());
894
- function vt() {
895
- return typeof ht.value == "string" ? i(ht.value) : ht.value.map((e, t) => ({
896
- ...e,
897
- value: d(e.value)
898
- }));
899
- }
900
- let { userOptionsVisible: yt, setUserOptionsVisibility: bt, keepUserOptionState: xt } = E({ config: W.value }), { svgRef: K } = ae({ config: W.value.style.chart.title });
901
- function St() {
902
- let e = b({
903
- userConfig: B.config,
904
- defaultConfig: Pe
905
- }), t = e.theme;
906
- if (!t) return e;
907
- if (!Fe.value(e)) return Ie(e), e;
908
- let n = b({
909
- userConfig: se[t] || B.config,
910
- defaultConfig: e
911
- }), r = b({
912
- userConfig: B.config,
913
- defaultConfig: n
914
- });
915
- return {
916
- ...r,
917
- customPalette: r.customPalette.length ? r.customPalette : l[t] || a
918
- };
919
- }
920
- let Ct = I({
921
- x: 0,
922
- y: 0
923
- });
924
- function wt() {
925
- let e = {
926
- x: 0,
927
- y: 0,
928
- width: Math.max(10, q.value.width),
929
- height: Math.max(10, q.value.height)
930
- };
931
- Qt(e), Ct.value = {
932
- x: e.x + e.width / 2,
933
- y: e.y + e.height / 2
934
- }, Xt();
935
- }
936
- let Tt = ne(() => {
937
- Rt();
938
- }, 100), Et = I(!1);
939
- we(() => Et.value, (e) => {
940
- e === !1 && (Je.value = !0, Tt(), wt());
941
- }), we(() => B.config, (e) => {
942
- W.value = St(), yt.value = !W.value.userOptions.showOnChartHover, jt(), He.value += 1, Ue.value += 1, Y.value.showTable = W.value.table.show, Y.value.showTooltip = W.value.style.chart.tooltip.show, Y.value.showZoom = W.value.style.chart.zoom.show;
943
- }, { deep: !0 });
944
- let q = I({
945
- width: W.value.style.chart.width,
946
- height: W.value.style.chart.height,
947
- maxFontSize: W.value.style.chart.words.maxFontSize,
948
- minFontSize: W.value.style.chart.words.minFontSize,
949
- bold: W.value.style.chart.words.bold
950
- }), Dt = ne(() => {
951
- let { width: e, height: t } = re({
952
- chart: H.value,
953
- title: W.value.style.chart.title.text ? Be.value : null,
954
- legend: W.value.style.chart.controls.show ? Ye.value?.$el : null,
955
- source: Ve.value
956
- });
957
- requestAnimationFrame(async () => {
958
- q.value.width = Math.max(10, e), q.value.height = Math.max(10, t - 12), await me(), Et.value = !1;
959
- });
960
- }, 100), Ot = () => {
961
- Et.value = !0, Dt();
962
- }, J = xe(null), kt = xe(null);
963
- ve(jt);
964
- let At = D(() => W.value.debug);
965
- function jt() {
966
- o(B.dataset) ? p({
967
- componentName: "VueUiWordCloud",
968
- type: "dataset",
969
- debug: At.value
970
- }) : _t.value.forEach((e, t) => {
971
- f({
972
- datasetObject: e,
973
- requiredAttributes: ["name", "value"]
974
- }).forEach((e) => {
975
- Re.value = !1, p({
976
- componentName: "VueUiWordCloud",
977
- type: "datasetSerieAttribute",
978
- property: e,
979
- index: t,
980
- debug: At.value
981
- });
982
- });
983
- }), o(B.dataset) || (gt.value = W.value.loading), W.value.responsive && (J.value && (kt.value && J.value.unobserve(kt.value), J.value.disconnect()), J.value = new ResizeObserver(Ot), kt.value = H.value.parentNode, J.value.observe(kt.value)), wt();
984
- }
985
- _e(() => {
986
- J.value && (kt.value && J.value.unobserve(kt.value), J.value.disconnect());
987
- });
988
- let { isPrinting: Mt, isImaging: Nt, generatePdf: Pt, generateImage: Ft } = y({
989
- elementId: `wordCloud_${V.value}`,
990
- fileName: W.value.style.chart.title.text || "vue-ui-word-cloud",
991
- options: W.value.userOptions.print
992
- }), Y = I({
993
- showTable: W.value.table.show,
994
- showTooltip: W.value.style.chart.tooltip.show,
995
- showZoom: W.value.style.chart.zoom.show
996
- });
997
- we(W, () => {
998
- Y.value.showTable = W.value.table.show, Y.value.showTooltip = W.value.style.chart.tooltip.show, Y.value.showZoom = W.value.style.chart.zoom.show;
999
- }, { immediate: !0 });
1000
- function It(e, t, n = "Arial") {
1001
- let r = document.createElement("canvas").getContext("2d");
1002
- return r.font = `${t}px ${W.value.style.chart.words.bold ? "bold" : "normal"} ${n}`, {
1003
- width: r.measureText(e).width + W.value.style.chart.words.proximity,
1004
- height: t
1005
- };
1006
- }
1007
- let X = I([]), Lt = /* @__PURE__ */ new Map();
1008
- function Rt() {
1009
- let e = [..._t.value].map((e) => e.value), t = Math.max(...e), n = Math.min(...e), r = [..._t.value].map((e, r) => {
1010
- let i = (e.value - n) / (t - n) * (q.value.maxFontSize - q.value.minFontSize) + q.value.minFontSize;
1011
- i = isNaN(i) ? q.value.minFontSize : i;
1012
- let o = It(e.name, i);
1013
- return {
1014
- ...e,
1015
- id: e.id ?? `${e.name}__${r}`,
1016
- fontSize: i,
1017
- width: o.width,
1018
- height: o.height,
1019
- color: e.color ? s(e.color) : W.value.style.chart.words.usePalette ? W.value.customPalette[r] || W.value.customPalette[r % W.value.customPalette.length] || a[r] || a[r % a.length] : W.value.style.chart.words.color
1020
- };
1021
- });
1022
- X.value.length = 0, Lt.clear(), Xe({
1023
- debugTiming: At.value,
1024
- words: r,
1025
- svg: q.value,
1026
- proximity: W.value.style.chart.words.proximity,
1027
- strictPixelPadding: W.value.strictPixelPadding,
1028
- quality: W.value.quality,
1029
- onProgress: ({ all: e }) => {
1030
- for (let t of e) {
1031
- let e = t.id, n = Lt.get(e);
1032
- if (n === void 0) n = X.value.length, Lt.set(e, n), X.value.push({ ...t });
1033
- else {
1034
- let e = X.value[n];
1035
- 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;
1036
- }
1037
- }
1038
- }
1039
- }), X.value.sort((e, t) => t.fontSize - e.fontSize), Lt.clear(), X.value.forEach((e, t) => {
1040
- Lt.set(e.id, t);
1041
- }), qe.value = !0, Je.value = !1;
1042
- }
1043
- let zt = D(() => ({
1044
- head: X.value.map((e) => ({
1045
- name: e.name,
1046
- color: e.color
1047
- })),
1048
- body: X.value.map((e) => e.value)
1049
- }));
1050
- function Bt(e = null) {
1051
- me(() => {
1052
- let n = zt.value.head.map((e, t) => [[e.name], [zt.value.body[t]]]), i = [
1053
- [W.value.style.chart.title.text],
1054
- [W.value.style.chart.title.subtitle.text],
1055
- [[""], [W.value.table.columnNames.value]]
1056
- ].concat(n), a = r(i);
1057
- e ? e(a) : t({
1058
- csvContent: a,
1059
- title: W.value.style.chart.title.text || "vue-ui-word-cloud"
1060
- });
1061
- });
1062
- }
1063
- let Z = D(() => {
1064
- let e = [W.value.table.columnNames.series, W.value.table.columnNames.value], t = zt.value.head.map((e, t) => {
1065
- let n = c({
1066
- p: W.value.table.td.prefix,
1067
- v: zt.value.body[t],
1068
- s: W.value.table.td.suffix,
1069
- r: W.value.table.td.roundingValue
1070
- });
1071
- return [{
1072
- color: e.color,
1073
- name: e.name
1074
- }, n];
1075
- }), n = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), r = {
1076
- th: {
1077
- backgroundColor: W.value.table.th.backgroundColor,
1078
- color: W.value.table.th.color,
1079
- outline: W.value.table.th.outline
1080
- },
1081
- td: {
1082
- backgroundColor: W.value.table.td.backgroundColor,
1083
- color: W.value.table.td.color,
1084
- outline: W.value.table.td.outline
1085
- },
1086
- breakpoint: W.value.table.responsiveBreakpoint
1087
- };
1088
- return {
1089
- colNames: [W.value.table.columnNames.series, W.value.table.columnNames.value],
1090
- head: e,
1091
- body: t,
1092
- a11yBody: n,
1093
- config: r
1094
- };
1095
- }), Q = I(!1);
1096
- function Vt(e) {
1097
- Q.value = e, ze.value += 1;
1098
- }
1099
- function Ht() {
1100
- return X.value;
1101
- }
1102
- function Ut() {
1103
- Y.value.showTable = !Y.value.showTable;
1104
- }
1105
- function Wt() {
1106
- Y.value.showTooltip = !Y.value.showTooltip;
1107
- }
1108
- let Gt = I(!1);
1109
- function Kt() {
1110
- Gt.value = !Gt.value;
1111
- }
1112
- function qt() {
1113
- Y.value.showZoom = !Y.value.showZoom;
1114
- }
1115
- let Jt = D(() => !Gt.value && Y.value.showZoom), { viewBox: Yt, resetZoom: Xt, isZoom: Zt, setInitialViewBox: Qt, zoomByFactor: $t, scale: en } = oe(K, {
1116
- x: 0,
1117
- y: 0,
1118
- width: q.value.width <= 0 ? 10 : q.value.width,
1119
- height: q.value.height <= 0 ? 10 : q.value.height
1120
- }, 1, Jt);
1121
- we(() => B.dataset, () => {
1122
- _t.value = vt(), W.value.responsive || (Rt(), wt());
1123
- }, { immediate: !0 });
1124
- async function tn({ scale: e = 2 } = {}) {
1125
- if (!H.value) return;
1126
- let { width: t, height: n } = H.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await C({
1127
- domElement: H.value,
1128
- base64: !0,
1129
- img: !0,
1130
- scale: e
1131
- });
1132
- return {
1133
- imageUri: i,
1134
- base64: a,
1135
- title: W.value.style.chart.title.text,
1136
- width: t,
1137
- height: n,
1138
- aspectRatio: r
1139
- };
1140
- }
1141
- let nn = D(() => {
1142
- let e = W.value.table.useDialog && !W.value.table.show, t = Y.value.showTable;
1143
- return {
1144
- component: e ? Ne : Oe,
1145
- title: `${W.value.style.chart.title.text}${W.value.style.chart.title.subtitle.text ? `: ${W.value.style.chart.title.subtitle.text}` : ""}`,
1146
- props: e ? {
1147
- backgroundColor: W.value.table.th.backgroundColor,
1148
- color: W.value.table.th.color,
1149
- headerColor: W.value.table.th.color,
1150
- headerBg: W.value.table.th.backgroundColor,
1151
- isFullscreen: Q.value,
1152
- fullscreenParent: H.value,
1153
- forcedWidth: Math.min(500, window.innerWidth * .8),
1154
- isCursorPointer: G.value
1155
- } : {
1156
- hideDetails: !0,
1157
- config: {
1158
- open: t,
1159
- maxHeight: 1e4,
1160
- body: {
1161
- backgroundColor: W.value.style.chart.backgroundColor,
1162
- color: W.value.style.chart.color
1163
- },
1164
- head: {
1165
- backgroundColor: W.value.style.chart.backgroundColor,
1166
- color: W.value.style.chart.color
1167
- }
1168
- }
1169
- }
1170
- };
1171
- });
1172
- we(() => Y.value.showTable, (e) => {
1173
- W.value.table.show || (e && W.value.table.useDialog && Ge.value ? Ge.value.open() : "close" in Ge.value && Ge.value.close());
1174
- });
1175
- function rn() {
1176
- Y.value.showTable = !1, Ke.value && Ke.value.setTableIconState(!1);
1177
- }
1178
- let an = D(() => W.value.style.chart.backgroundColor), on = D(() => W.value.style.chart.title), { isCallbackImaging: sn, isCallbackSvg: cn, generateSvg: ln, onGenerateImage: un } = S({
1179
- svg: K,
1180
- title: on,
1181
- legend: null,
1182
- legendItems: null,
1183
- backgroundColor: an,
1184
- getSvgCallback: () => W.value.userOptions.callbacks.svg,
1185
- generateImage: Ft
1186
- });
1187
- function dn() {
1188
- $t(1.5, !0);
1189
- }
1190
- function fn() {
1191
- $t(1 / 1.5, !0);
1192
- }
1193
- let $ = I(null), pn = I(!1), mn = I(""), hn = I(null);
1194
- function gn() {
1195
- $.value = null, U.value = null, We.value = !1;
1196
- }
1197
- function _n(e, t) {
1198
- W.value.events.datapointLeave && W.value.events.datapointLeave({
1199
- datapoint: e,
1200
- seriesIndex: t
1201
- }), (U.value !== t || dt.value !== "keyboard") && ($.value = null, We.value = !1);
1202
- }
1203
- function vn(e, t) {
1204
- W.value.events.datapointClick && W.value.events.datapointClick({
1205
- datapoint: e,
1206
- seriesIndex: t
1207
- });
1208
- }
1209
- function yn(e) {
1210
- if (!K.value || e == null) return;
1211
- let t = K.value.querySelector(`[data-a11y-word-index="${e}-${V.value}"]`);
1212
- if (!t) return;
1213
- let n = t.getBoundingClientRect();
1214
- ut.value = {
1215
- x: n.left + n.width / 2,
1216
- y: n.top + n.height / 2
1217
- };
1218
- }
1219
- function bn(e, t, r = "pointer") {
1220
- if (W.value.events.datapointEnter && W.value.events.datapointEnter({
1221
- datapoint: e,
1222
- seriesIndex: t
1223
- }), !Y.value.showTooltip) return;
1224
- dt.value = r, U.value = t, $.value = e.id, hn.value = {
1225
- datapoint: e,
1226
- config: W.value,
1227
- seriesIndex: t
1228
- };
1229
- let i = W.value.style.chart.tooltip.customFormat;
1230
- if (pn.value = !1, n(i)) try {
1231
- let t = i({
1232
- datapoint: e,
1233
- config: W.value
1234
- });
1235
- typeof t == "string" && (mn.value = t, pn.value = !0);
1236
- } catch {
1237
- console.warn("Custom format cannot be applied."), pn.value = !1;
1238
- }
1239
- if (!pn.value) {
1240
- let t = `<svg viewBox="0 0 10 10" height="${W.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(W.value.style.chart.tooltip.roundingValue)}</b>`;
1241
- mn.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${t}</div>`;
1242
- }
1243
- r === "keyboard" && me(() => {
1244
- yn(t);
1245
- }), We.value = !0;
1246
- }
1247
- async function xn() {
1248
- if (Le("copyAlt", {
1249
- config: W.value,
1250
- dataset: X.value
1251
- }), !W.value.userOptions.callbacks.altCopy) {
1252
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1253
- return;
1254
- }
1255
- await Promise.resolve(W.value.userOptions.callbacks.altCopy({
1256
- config: W.value,
1257
- dataset: X.value
1258
- }));
1259
- }
1260
- function Sn() {
1261
- U.value = null, ft.value = !0;
1262
- }
1263
- function Cn() {
1264
- gn(), ft.value = !1;
1265
- }
1266
- function wn(e) {
1267
- if (!K.value || Gt.value || document.activeElement !== K.value || !X.value.length) return;
1268
- 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";
1269
- if (!t && !n && !r && !i) return;
1270
- if (e.preventDefault(), e.stopPropagation(), i) {
1271
- gn();
1272
- return;
1273
- }
1274
- if (r) {
1275
- if (U.value === null) return;
1276
- let e = X.value[U.value];
1277
- if (!e) return;
1278
- vn(e, U.value);
1279
- return;
1280
- }
1281
- let a = U.value;
1282
- a === null || a < 0 || a >= X.value.length ? a = n ? 0 : X.value.length - 1 : (a += n ? 1 : -1, a < 0 && (a = X.value.length - 1), a >= X.value.length && (a = 0));
1283
- let o = X.value[a];
1284
- o && bn(o, a, "keyboard");
1285
- }
1286
- let Tn = D(() => ({
1287
- headers: Z.value?.colNames ?? [],
1288
- rows: Z.value?.a11yBody ?? []
1289
- }));
1290
- return T({
1291
- getData: Ht,
1292
- getImage: tn,
1293
- generateCsv: Bt,
1294
- generatePdf: Pt,
1295
- generateImage: Ft,
1296
- generateSvg: ln,
1297
- resetZoom: Xt,
1298
- toggleTable: Ut,
1299
- toggleTooltip: Wt,
1300
- toggleAnnotator: Kt,
1301
- toggleFullscreen: Vt,
1302
- toggleZoom: qt,
1303
- copyAlt: xn
1304
- }), (e, t) => (F(), A("div", {
1305
- class: "vue-data-ui-component vue-ui-word-cloud",
1306
- ref_key: "wordCloudChart",
1307
- ref: H,
1308
- id: `wordCloud_${V.value}`,
1309
- "data-resizing": Et.value,
1310
- "data-relayout": Je.value,
1311
- style: ge(`width: 100%; font-family:${W.value.style.fontFamily};background:${W.value.style.chart.backgroundColor};${W.value.responsive ? "height:100%" : ""}`),
1312
- onMouseenter: t[3] ||= () => R(bt)(!0),
1313
- onMouseleave: t[4] ||= () => {
1314
- R(bt)(!1), ft.value || gn();
1315
- }
1316
- }, [
1317
- j("div", {
1318
- id: `chart-instructions-${V.value}`,
1319
- class: "sr-only"
1320
- }, [j("p", null, Se(W.value.a11y.translations.keyboardNavigation), 1)], 8, Qe),
1321
- Tn.value?.rows?.length ? (F(), O(ie, {
1322
- key: 0,
1323
- uid: V.value,
1324
- head: Tn.value.headers,
1325
- body: Tn.value.rows,
1326
- notice: W.value.a11y.translations.tableAvailable,
1327
- caption: W.value.a11y.translations.tableCaption
1328
- }, null, 8, [
1329
- "uid",
1330
- "head",
1331
- "body",
1332
- "notice",
1333
- "caption"
1334
- ])) : k("", !0),
1335
- W.value.userOptions.buttons.annotator ? (F(), O(R(Ae), {
1336
- key: 1,
1337
- svgRef: R(K),
1338
- backgroundColor: W.value.style.chart.backgroundColor,
1339
- color: W.value.style.chart.color,
1340
- active: Gt.value,
1341
- isCursorPointer: G.value,
1342
- onClose: Kt
1343
- }, {
1344
- "annotator-action-close": z(() => [L(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1345
- "annotator-action-color": z(({ color: t }) => [L(e.$slots, "annotator-action-color", P(N({ color: t })), void 0, !0)]),
1346
- "annotator-action-draw": z(({ mode: t }) => [L(e.$slots, "annotator-action-draw", P(N({ mode: t })), void 0, !0)]),
1347
- "annotator-action-undo": z(({ disabled: t }) => [L(e.$slots, "annotator-action-undo", P(N({ disabled: t })), void 0, !0)]),
1348
- "annotator-action-redo": z(({ disabled: t }) => [L(e.$slots, "annotator-action-redo", P(N({ disabled: t })), void 0, !0)]),
1349
- "annotator-action-delete": z(({ disabled: t }) => [L(e.$slots, "annotator-action-delete", P(N({ disabled: t })), void 0, !0)]),
1350
- _: 3
1351
- }, 8, [
1352
- "svgRef",
1353
- "backgroundColor",
1354
- "color",
1355
- "active",
1356
- "isCursorPointer"
1357
- ])) : k("", !0),
1358
- W.value.style.chart.title.text ? (F(), A("div", {
1359
- key: 2,
1360
- ref_key: "chartTitle",
1361
- ref: Be,
1362
- style: "width:100%;background:transparent;padding-bottom:24px"
1363
- }, [(F(), O(w, {
1364
- key: `title_${He.value}`,
1365
- config: {
1366
- title: { ...W.value.style.chart.title },
1367
- subtitle: { ...W.value.style.chart.title.subtitle }
1368
- }
1369
- }, null, 8, ["config"]))], 512)) : k("", !0),
1370
- W.value.userOptions.show && Re.value && (R(xt) || R(yt)) ? (F(), O(R(je), {
1371
- ref_key: "userOptionsRef",
1372
- ref: Ke,
1373
- key: `user_option_${ze.value}`,
1374
- backgroundColor: W.value.style.chart.backgroundColor,
1375
- color: W.value.style.chart.color,
1376
- isPrinting: R(Mt),
1377
- isImaging: R(Nt),
1378
- uid: V.value,
1379
- hasPdf: W.value.userOptions.buttons.pdf,
1380
- hasXls: W.value.userOptions.buttons.csv,
1381
- hasImg: W.value.userOptions.buttons.img,
1382
- hasSvg: W.value.userOptions.buttons.svg,
1383
- hasTable: W.value.userOptions.buttons.table,
1384
- hasFullscreen: W.value.userOptions.buttons.fullscreen,
1385
- hasAltCopy: W.value.userOptions.buttons.altCopy,
1386
- isFullscreen: Q.value,
1387
- titles: { ...W.value.userOptions.buttonTitles },
1388
- chartElement: H.value,
1389
- position: W.value.userOptions.position,
1390
- hasTooltip: W.value.style.chart.tooltip.show && W.value.userOptions.buttons.tooltip,
1391
- isTooltip: Y.value.showTooltip,
1392
- hasAnnotator: W.value.userOptions.buttons.annotator,
1393
- isAnnotation: Gt.value,
1394
- callbacks: W.value.userOptions.callbacks,
1395
- printScale: W.value.userOptions.print.scale,
1396
- tableDialog: W.value.table.useDialog,
1397
- hasZoom: W.value.userOptions.buttons.zoom,
1398
- isZoom: Y.value.showZoom,
1399
- isCursorPointer: G.value,
1400
- onToggleFullscreen: Vt,
1401
- onGeneratePdf: R(Pt),
1402
- onGenerateCsv: Bt,
1403
- onGenerateImage: R(un),
1404
- onGenerateSvg: R(ln),
1405
- onToggleTable: Ut,
1406
- onToggleTooltip: Wt,
1407
- onToggleAnnotator: Kt,
1408
- onToggleZoom: qt,
1409
- onCopyAlt: xn,
1410
- style: ge({ visibility: R(xt) ? R(yt) ? "visible" : "hidden" : "visible" })
1411
- }, ue({ _: 2 }, [
1412
- e.$slots.menuIcon ? {
1413
- name: "menuIcon",
1414
- fn: z(({ isOpen: t, color: n }) => [L(e.$slots, "menuIcon", P(N({
1415
- isOpen: t,
1416
- color: n
1417
- })), void 0, !0)]),
1418
- key: "0"
1419
- } : void 0,
1420
- e.$slots.optionTooltip ? {
1421
- name: "optionTooltip",
1422
- fn: z(() => [L(e.$slots, "optionTooltip", {}, void 0, !0)]),
1423
- key: "1"
1424
- } : void 0,
1425
- e.$slots.optionPdf ? {
1426
- name: "optionPdf",
1427
- fn: z(() => [L(e.$slots, "optionPdf", {}, void 0, !0)]),
1428
- key: "2"
1429
- } : void 0,
1430
- e.$slots.optionCsv ? {
1431
- name: "optionCsv",
1432
- fn: z(() => [L(e.$slots, "optionCsv", {}, void 0, !0)]),
1433
- key: "3"
1434
- } : void 0,
1435
- e.$slots.optionImg ? {
1436
- name: "optionImg",
1437
- fn: z(() => [L(e.$slots, "optionImg", {}, void 0, !0)]),
1438
- key: "4"
1439
- } : void 0,
1440
- e.$slots.optionSvg ? {
1441
- name: "optionSvg",
1442
- fn: z(() => [L(e.$slots, "optionSvg", {}, void 0, !0)]),
1443
- key: "5"
1444
- } : void 0,
1445
- e.$slots.optionTable ? {
1446
- name: "optionTable",
1447
- fn: z(() => [L(e.$slots, "optionTable", {}, void 0, !0)]),
1448
- key: "6"
1449
- } : void 0,
1450
- e.$slots.optionFullscreen ? {
1451
- name: "optionFullscreen",
1452
- fn: z(({ toggleFullscreen: t, isFullscreen: n }) => [L(e.$slots, "optionFullscreen", P(N({
1453
- toggleFullscreen: t,
1454
- isFullscreen: n
1455
- })), void 0, !0)]),
1456
- key: "7"
1457
- } : void 0,
1458
- e.$slots.optionAnnotator ? {
1459
- name: "optionAnnotator",
1460
- fn: z(({ toggleAnnotator: t, isAnnotator: n }) => [L(e.$slots, "optionAnnotator", P(N({
1461
- toggleAnnotator: t,
1462
- isAnnotator: n
1463
- })), void 0, !0)]),
1464
- key: "8"
1465
- } : void 0,
1466
- e.$slots.optionZoom ? {
1467
- name: "optionZoom",
1468
- fn: z(({ toggleZoom: t, isZoomLocked: n }) => [L(e.$slots, "optionZoom", P(N({
1469
- toggleZoom: t,
1470
- isZoomLocked: n
1471
- })), void 0, !0)]),
1472
- key: "9"
1473
- } : void 0,
1474
- e.$slots.optionAltCopy ? {
1475
- name: "optionAltCopy",
1476
- fn: z(({ altCopy: t }) => [L(e.$slots, "optionAltCopy", P(N({ altCopy: t })), void 0, !0)]),
1477
- key: "10"
1478
- } : void 0,
1479
- e.$slots["custom-menu-before"] ? {
1480
- name: "custom-menu-before",
1481
- fn: z(() => [L(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1482
- key: "11"
1483
- } : void 0,
1484
- e.$slots["custom-menu-after"] ? {
1485
- name: "custom-menu-after",
1486
- fn: z(() => [L(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1487
- key: "12"
1488
- } : void 0
1489
- ]), 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.onGenerateImage.onGenerateSvg.style".split("."))) : k("", !0),
1490
- W.value.style.chart.controls.position === "top" && W.value.style.chart.controls.show && !R(mt) ? (F(), O(ce, {
1491
- key: 4,
1492
- ref_key: "zoomControls",
1493
- ref: Ye,
1494
- config: W.value,
1495
- scale: R(en),
1496
- isFullscreen: Q.value,
1497
- isCursorPointer: G.value,
1498
- onZoomIn: dn,
1499
- onZoomOut: fn,
1500
- onResetZoom: t[0] ||= (e) => R(Xt)(!0)
1501
- }, null, 8, [
1502
- "config",
1503
- "scale",
1504
- "isFullscreen",
1505
- "isCursorPointer"
1506
- ])) : k("", !0),
1507
- j("div", $e, [(F(), A("svg", {
1508
- ref_key: "svgRef",
1509
- ref: K,
1510
- class: he({
1511
- "vue-data-ui-fullscreen--on": Q.value,
1512
- "vue-data-ui-fulscreen--off": !Q.value
1513
- }),
1514
- "aria-describedby": `chart-instructions-${V.value}`,
1515
- xmlns: R(h),
1516
- viewBox: `${R(Yt).x} ${R(Yt).y} ${R(Yt).width} ${R(Yt).height}`,
1517
- style: "overflow:hidden;background:transparent;display:block",
1518
- tabindex: "0",
1519
- onFocus: Sn,
1520
- onBlur: Cn,
1521
- onKeydown: wn
1522
- }, [
1523
- fe(R(Me)),
1524
- e.$slots["chart-background"] ? (F(), A("foreignObject", {
1525
- key: 0,
1526
- x: 0,
1527
- y: 0,
1528
- width: q.value.width <= 0 ? 10 : q.value.width,
1529
- height: q.value.height <= 0 ? 10 : q.value.height,
1530
- style: { pointerEvents: "none" }
1531
- }, [L(e.$slots, "chart-background", {}, void 0, !0)], 8, tt)) : k("", !0),
1532
- j("g", {
1533
- transform: `translate(${Ct.value.x}, ${Ct.value.y})`,
1534
- class: he({ "wc-finalized": qe.value })
1535
- }, [(F(!0), A(le, null, ye(X.value, (e, t) => (F(), A("g", {
1536
- key: e.id,
1537
- class: "vue-ui-word-cloud-word",
1538
- transform: `translate(${e.x}, ${e.y})`
1539
- }, [e.minX === void 0 ? k("", !0) : (F(), A("rect", {
1540
- key: 0,
1541
- "data-a11y-word-index": `${t}-${V.value}`,
1542
- x: e.minX,
1543
- y: e.minY * 1.25,
1544
- width: e.maxX - e.minX,
1545
- height: e.maxY - e.minY,
1546
- fill: "transparent",
1547
- "pointer-events": "visiblePainted",
1548
- "aria-label": `${e.name}: ${(e.value || 0).toFixed(W.value.style.chart.tooltip.roundingValue)}`,
1549
- onMouseover: (n) => bn(e, t),
1550
- onMouseleave: (n) => _n(e, t),
1551
- onClick: (n) => vn(e, t)
1552
- }, null, 40, it)), j("text", {
1553
- fill: e.color,
1554
- "font-weight": W.value.style.chart.words.bold ? "bold" : "normal",
1555
- x: 0,
1556
- y: 0,
1557
- "font-size": e.fontSize,
1558
- transform: `translate(${e.width / 2}, ${e.height / 2})`,
1559
- "text-anchor": "middle",
1560
- "dominant-baseline": "central",
1561
- "paint-order": "stroke fill",
1562
- stroke: !$.value || $.value === e.id ? W.value.style.chart.words.selectedStroke : void 0,
1563
- "stroke-width": e.height * .05,
1564
- "stroke-linecap": "round",
1565
- "stroke-linejoin": "round",
1566
- style: ge(`
1567
- pointer-events:none;
1568
- fill-opacity:${!$.value || $.value === e.id || !qe.value ? 1 : W.value.style.chart.words.hoverOpacity} !important;
1569
- `)
1570
- }, Se(e.name), 13, at)], 8, rt))), 128))], 10, nt),
1571
- L(e.$slots, "svg", { svg: {
1572
- ...q.value,
1573
- isPrintingImg: R(Mt) || R(Nt) || R(sn),
1574
- isPrintingSvg: R(cn)
1575
- } }, void 0, !0)
1576
- ], 42, et)), e.$slots.hint ? (F(), A("div", ot, [L(e.$slots, "hint", P(N({
1577
- hint: W.value.a11y.translations.keyboardNavigation,
1578
- isVisible: ft.value
1579
- })), void 0, !0)])) : k("", !0)]),
1580
- e.$slots.watermark ? (F(), A("div", st, [L(e.$slots, "watermark", P(N({ isPrinting: R(Mt) || R(Nt) || R(sn) || R(cn) })), void 0, !0)])) : k("", !0),
1581
- R(Zt) ? (F(), A("div", ct, [L(e.$slots, "reset-action", { reset: R(Xt) }, void 0, !0)])) : k("", !0),
1582
- W.value.style.chart.controls.position === "bottom" && W.value.style.chart.controls.show && !R(mt) ? (F(), O(ce, {
1583
- key: 7,
1584
- ref_key: "zoomControls",
1585
- ref: Ye,
1586
- config: W.value,
1587
- scale: R(en),
1588
- isFullscreen: Q.value,
1589
- isCursorPointer: G.value,
1590
- onZoomIn: dn,
1591
- onZoomOut: fn,
1592
- onResetZoom: t[1] ||= (e) => R(Xt)(!0)
1593
- }, null, 8, [
1594
- "config",
1595
- "scale",
1596
- "isFullscreen",
1597
- "isCursorPointer"
1598
- ])) : k("", !0),
1599
- fe(R(Ee), {
1600
- teleportTo: W.value.style.chart.tooltip.teleportTo,
1601
- show: Y.value.showTooltip && We.value,
1602
- backgroundColor: W.value.style.chart.tooltip.backgroundColor,
1603
- color: W.value.style.chart.tooltip.color,
1604
- fontSize: W.value.style.chart.tooltip.fontSize,
1605
- borderRadius: W.value.style.chart.tooltip.borderRadius,
1606
- borderColor: W.value.style.chart.tooltip.borderColor,
1607
- borderWidth: W.value.style.chart.tooltip.borderWidth,
1608
- backgroundOpacity: W.value.style.chart.tooltip.backgroundOpacity,
1609
- position: W.value.style.chart.tooltip.position,
1610
- offsetX: W.value.style.chart.tooltip.offsetX,
1611
- offsetY: W.value.style.chart.tooltip.offsetY,
1612
- parent: H.value,
1613
- content: mn.value,
1614
- isCustom: pn.value,
1615
- isFullscreen: Q.value,
1616
- smooth: W.value.style.chart.tooltip.smooth,
1617
- backdropFilter: W.value.style.chart.tooltip.backdropFilter,
1618
- smoothForce: W.value.style.chart.tooltip.smoothForce,
1619
- smoothSnapThreshold: W.value.style.chart.tooltip.smoothSnapThreshold,
1620
- isA11yMode: dt.value === "keyboard",
1621
- a11yPosition: ut.value
1622
- }, {
1623
- "tooltip-before": z(() => [L(e.$slots, "tooltip-before", P(N({ ...hn.value })), void 0, !0)]),
1624
- tooltip: z(() => [L(e.$slots, "tooltip", P(N({ ...hn.value })), void 0, !0)]),
1625
- "tooltip-after": z(() => [L(e.$slots, "tooltip-after", P(N({ ...hn.value })), void 0, !0)]),
1626
- _: 3
1627
- }, 8, [
1628
- "teleportTo",
1629
- "show",
1630
- "backgroundColor",
1631
- "color",
1632
- "fontSize",
1633
- "borderRadius",
1634
- "borderColor",
1635
- "borderWidth",
1636
- "backgroundOpacity",
1637
- "position",
1638
- "offsetX",
1639
- "offsetY",
1640
- "parent",
1641
- "content",
1642
- "isCustom",
1643
- "isFullscreen",
1644
- "smooth",
1645
- "backdropFilter",
1646
- "smoothForce",
1647
- "smoothSnapThreshold",
1648
- "isA11yMode",
1649
- "a11yPosition"
1650
- ]),
1651
- e.$slots.source ? (F(), A("div", {
1652
- key: 8,
1653
- ref_key: "source",
1654
- ref: Ve,
1655
- dir: "auto"
1656
- }, [L(e.$slots, "source", {}, void 0, !0)], 512)) : k("", !0),
1657
- Re.value && W.value.userOptions.buttons.table ? (F(), O(be(nn.value.component), pe({ key: 9 }, nn.value.props, {
1658
- ref_key: "tableUnit",
1659
- ref: Ge,
1660
- onClose: rn
1661
- }), ue({
1662
- content: z(() => [(F(), O(R(ke), {
1663
- key: `table_${Ue.value}`,
1664
- colNames: Z.value.colNames,
1665
- head: Z.value.head,
1666
- body: Z.value.body,
1667
- config: Z.value.config,
1668
- title: W.value.table.useDialog ? "" : nn.value.title,
1669
- withCloseButton: !W.value.table.useDialog,
1670
- isCursorPointer: G.value,
1671
- onClose: rn
1672
- }, {
1673
- th: z(({ th: e }) => [j("div", lt, Se(e), 1)]),
1674
- td: z(({ td: e }) => [de(Se(e.name || e), 1)]),
1675
- _: 1
1676
- }, 8, [
1677
- "colNames",
1678
- "head",
1679
- "body",
1680
- "config",
1681
- "title",
1682
- "withCloseButton",
1683
- "isCursorPointer"
1684
- ]))]),
1685
- _: 2
1686
- }, [W.value.table.useDialog ? {
1687
- name: "title",
1688
- fn: z(() => [de(Se(nn.value.title), 1)]),
1689
- key: "0"
1690
- } : void 0, W.value.table.useDialog ? {
1691
- name: "actions",
1692
- fn: z(() => [j("button", {
1693
- tabindex: "0",
1694
- class: "vue-ui-user-options-button",
1695
- onClick: t[2] ||= (e) => Bt(W.value.userOptions.callbacks.csv),
1696
- style: ge({ cursor: G.value ? "pointer" : "default" })
1697
- }, [fe(R(De), {
1698
- name: "fileCsv",
1699
- stroke: nn.value.props.color
1700
- }, null, 8, ["stroke"])], 4)]),
1701
- key: "1"
1702
- } : void 0]), 1040)) : k("", !0),
1703
- L(e.$slots, "skeleton", {}, () => [R(mt) ? (F(), O(te, { key: 0 })) : k("", !0)], !0)
1704
- ], 44, Ze));
1705
- }
1706
- }, [["__scopeId", "data-v-f2049d37"]]);
1707
- //#endregion
1708
- export { U as n, ut as t };