vue-data-ui 3.18.4 → 3.19.0

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 (145) hide show
  1. package/dist/{PackageVersion-BIfMr89l.js → PackageVersion-D5dkifa6.js} +1 -1
  2. package/dist/components/vue-ui-3d-bar.js +1 -1
  3. package/dist/components/vue-ui-accordion.js +1 -1
  4. package/dist/components/vue-ui-age-pyramid.js +1 -1
  5. package/dist/components/vue-ui-annotator.js +1 -1
  6. package/dist/components/vue-ui-bullet.js +1 -1
  7. package/dist/components/vue-ui-bump.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dag.js +1 -1
  15. package/dist/components/vue-ui-dashboard.js +1 -1
  16. package/dist/components/vue-ui-digits.js +1 -1
  17. package/dist/components/vue-ui-donut-evolution.js +1 -1
  18. package/dist/components/vue-ui-donut.js +1 -1
  19. package/dist/components/vue-ui-dumbbell.js +1 -1
  20. package/dist/components/vue-ui-flow.js +1 -1
  21. package/dist/components/vue-ui-funnel.js +1 -1
  22. package/dist/components/vue-ui-galaxy.js +1 -1
  23. package/dist/components/vue-ui-gauge.js +1 -1
  24. package/dist/components/vue-ui-geo.js +1 -1
  25. package/dist/components/vue-ui-gizmo.js +1 -1
  26. package/dist/components/vue-ui-heatmap.js +1 -1
  27. package/dist/components/vue-ui-history-plot.js +1 -1
  28. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  29. package/dist/components/vue-ui-kpi.js +1 -1
  30. package/dist/components/vue-ui-mini-loader.js +1 -1
  31. package/dist/components/vue-ui-molecule.js +1 -1
  32. package/dist/components/vue-ui-mood-radar.js +1 -1
  33. package/dist/components/vue-ui-nested-donuts.js +1 -1
  34. package/dist/components/vue-ui-onion.js +1 -1
  35. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  36. package/dist/components/vue-ui-quadrant.js +1 -1
  37. package/dist/components/vue-ui-quick-chart.js +1 -1
  38. package/dist/components/vue-ui-radar.js +1 -1
  39. package/dist/components/vue-ui-rating.js +1 -1
  40. package/dist/components/vue-ui-relation-circle.js +1 -1
  41. package/dist/components/vue-ui-ridgeline.js +1 -1
  42. package/dist/components/vue-ui-rings.js +1 -1
  43. package/dist/components/vue-ui-scatter.js +1 -1
  44. package/dist/components/vue-ui-skeleton.js +1 -1
  45. package/dist/components/vue-ui-smiley.js +1 -1
  46. package/dist/components/vue-ui-spark-trend.js +1 -1
  47. package/dist/components/vue-ui-sparkbar.js +1 -1
  48. package/dist/components/vue-ui-sparkgauge.js +1 -1
  49. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  50. package/dist/components/vue-ui-sparkline.js +1 -1
  51. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  52. package/dist/components/vue-ui-stackbar.js +1 -1
  53. package/dist/components/vue-ui-stackline.js +1 -1
  54. package/dist/components/vue-ui-strip-plot.js +1 -1
  55. package/dist/components/vue-ui-table-heatmap.js +1 -1
  56. package/dist/components/vue-ui-table-sparkline.js +1 -1
  57. package/dist/components/vue-ui-table.js +1 -1
  58. package/dist/components/vue-ui-thermometer.js +1 -1
  59. package/dist/components/vue-ui-timer.js +1 -1
  60. package/dist/components/vue-ui-tiremarks.js +1 -1
  61. package/dist/components/vue-ui-treemap.js +1 -1
  62. package/dist/components/vue-ui-vertical-bar.js +1 -1
  63. package/dist/components/vue-ui-waffle.js +1 -1
  64. package/dist/components/vue-ui-wheel.js +1 -1
  65. package/dist/components/vue-ui-word-cloud.js +1 -1
  66. package/dist/components/vue-ui-world.js +1 -1
  67. package/dist/components/vue-ui-xy-canvas.js +1 -1
  68. package/dist/components/vue-ui-xy.js +1 -1
  69. package/dist/style.css +1 -1
  70. package/dist/types/vue-data-ui.d.ts +79 -0
  71. package/dist/types/vue-ui-circle-pack.d.ts +12 -0
  72. package/dist/{useConfig-BV0kTCnO.js → useConfig-nXlOKvBq.js} +31 -3
  73. package/dist/{useObjectBindings-Ce_ZZk-f.js → useObjectBindings-SXpt83LZ.js} +2 -2
  74. package/dist/utils.js +1 -1
  75. package/dist/{vue-data-ui-Wr6-S9EX.js → vue-data-ui-DxDDhG_Z.js} +67 -67
  76. package/dist/vue-data-ui.js +68 -68
  77. package/dist/{vue-ui-3d-bar-LiAqP781.js → vue-ui-3d-bar-Dkpnduj2.js} +2 -2
  78. package/dist/{vue-ui-accordion-cVv18nTV.js → vue-ui-accordion-CWXbkzsg.js} +1 -1
  79. package/dist/{vue-ui-age-pyramid-CTHUPhvW.js → vue-ui-age-pyramid-YRzKi3YZ.js} +2 -2
  80. package/dist/{vue-ui-annotator-B9mA_PlF.js → vue-ui-annotator-C6MknYlp.js} +2 -2
  81. package/dist/{vue-ui-bullet-Bajk8MIY.js → vue-ui-bullet--e6wu_eV.js} +2 -2
  82. package/dist/{vue-ui-bump-BKLTUDLW.js → vue-ui-bump-k2AwGC59.js} +2 -2
  83. package/dist/{vue-ui-candlestick-BTb7d0AS.js → vue-ui-candlestick-BVmiu7I8.js} +2 -2
  84. package/dist/{vue-ui-carousel-table-iRWAi2wg.js → vue-ui-carousel-table-CDYCZkJe.js} +2 -2
  85. package/dist/{vue-ui-chestnut-a88ukfxE.js → vue-ui-chestnut-CoPll4kt.js} +2 -2
  86. package/dist/{vue-ui-chord-BbI1-lsC.js → vue-ui-chord-Zxza5Lek.js} +2 -2
  87. package/dist/vue-ui-circle-pack-CGss-GQ3.js +1596 -0
  88. package/dist/{vue-ui-cursor-Bm3EYKYW.js → vue-ui-cursor-g1ARqBdZ.js} +2 -2
  89. package/dist/{vue-ui-dag-C45i25qr.js → vue-ui-dag-C_APXc5p.js} +2 -2
  90. package/dist/{vue-ui-dashboard-NPke80jQ.js → vue-ui-dashboard-WaoHmE2e.js} +65 -65
  91. package/dist/{vue-ui-digits-CRmqw9qB.js → vue-ui-digits-B6B0VxQN.js} +2 -2
  92. package/dist/{vue-ui-donut-BZmdvDTt.js → vue-ui-donut-C9DqiLiv.js} +2 -2
  93. package/dist/{vue-ui-donut-evolution-CHmXN-Jn.js → vue-ui-donut-evolution-Bk8wqv1D.js} +2 -2
  94. package/dist/{vue-ui-dumbbell-Sc0284dz.js → vue-ui-dumbbell-DFXC67IB.js} +2 -2
  95. package/dist/{vue-ui-flow-BsWTziuy.js → vue-ui-flow-nyqdaw6K.js} +2 -2
  96. package/dist/{vue-ui-funnel-CiZTp1me.js → vue-ui-funnel-AWd3vkNN.js} +2 -2
  97. package/dist/{vue-ui-galaxy-CESuLzxI.js → vue-ui-galaxy-9fc9Hd8V.js} +2 -2
  98. package/dist/{vue-ui-gauge-DP2zUL0h.js → vue-ui-gauge-CWFeHBud.js} +2 -2
  99. package/dist/{vue-ui-geo-CN9ujHFQ.js → vue-ui-geo-Dmzbrvxi.js} +2 -2
  100. package/dist/{vue-ui-gizmo-b89rBZ_1.js → vue-ui-gizmo-C7-ia7Qj.js} +2 -2
  101. package/dist/{vue-ui-heatmap-pVDHQXRU.js → vue-ui-heatmap-u70d0SIw.js} +3 -3
  102. package/dist/{vue-ui-history-plot-CrdoDusc.js → vue-ui-history-plot-CAyTp6g-.js} +2 -2
  103. package/dist/{vue-ui-horizontal-bar-W85Az1bg.js → vue-ui-horizontal-bar-BwLGyJym.js} +3 -3
  104. package/dist/{vue-ui-kpi-BrbRbdEh.js → vue-ui-kpi-C3y5-BRC.js} +2 -2
  105. package/dist/{vue-ui-mini-loader-BcCG6Yqb.js → vue-ui-mini-loader-B-4A16WA.js} +1 -1
  106. package/dist/{vue-ui-molecule-CNvUirzZ.js → vue-ui-molecule-DHdJBIhR.js} +5 -4
  107. package/dist/{vue-ui-mood-radar-PMiphOmU.js → vue-ui-mood-radar-3rQ3seXn.js} +2 -2
  108. package/dist/{vue-ui-nested-donuts-fZx83AnA.js → vue-ui-nested-donuts-CkyNVcNS.js} +2 -2
  109. package/dist/{vue-ui-onion-Dje-weuv.js → vue-ui-onion-BRS0F7vR.js} +2 -2
  110. package/dist/{vue-ui-parallel-coordinate-plot-DfNs8FYS.js → vue-ui-parallel-coordinate-plot-CK2ZUlSw.js} +2 -2
  111. package/dist/{vue-ui-quadrant-XHxq-DlE.js → vue-ui-quadrant-Cj2KV_z7.js} +2 -2
  112. package/dist/{vue-ui-quick-chart-CaHl0J15.js → vue-ui-quick-chart-Bhr12oH8.js} +2 -2
  113. package/dist/{vue-ui-radar-DNahNoSY.js → vue-ui-radar-DnOyaQkz.js} +2 -2
  114. package/dist/{vue-ui-rating-DA9Bmfyb.js → vue-ui-rating-BJ9v9H9k.js} +1 -1
  115. package/dist/{vue-ui-relation-circle-DEkfxis6.js → vue-ui-relation-circle-u9QEc8ee.js} +2 -2
  116. package/dist/{vue-ui-ridgeline-DJCIoplO.js → vue-ui-ridgeline-DYTp5R9J.js} +2 -2
  117. package/dist/{vue-ui-rings-BmwAXIIS.js → vue-ui-rings-ClYcK_nn.js} +2 -2
  118. package/dist/{vue-ui-scatter-gDbtwMUL.js → vue-ui-scatter-D0SU1o_K.js} +2 -2
  119. package/dist/{vue-ui-skeleton-Dk3sAiyy.js → vue-ui-skeleton-8lXnB1kN.js} +2 -2
  120. package/dist/{vue-ui-smiley-B6nc7b71.js → vue-ui-smiley-XGOYNEOl.js} +1 -1
  121. package/dist/{vue-ui-spark-trend-D8yEotVY.js → vue-ui-spark-trend-BSpJpbES.js} +2 -2
  122. package/dist/{vue-ui-sparkbar-nYDeWrnP.js → vue-ui-sparkbar-DNDThOca.js} +2 -2
  123. package/dist/{vue-ui-sparkgauge-DLlF5ikf.js → vue-ui-sparkgauge-yWuiAETN.js} +2 -2
  124. package/dist/{vue-ui-sparkhistogram-BiBnGnPd.js → vue-ui-sparkhistogram-BDBECsRm.js} +2 -2
  125. package/dist/{vue-ui-sparkline-BZreSPaz.js → vue-ui-sparkline-CuYL1Whh.js} +210 -206
  126. package/dist/{vue-ui-sparkstackbar-CsDTWemd.js → vue-ui-sparkstackbar-22TzSWXm.js} +2 -2
  127. package/dist/{vue-ui-stackbar-O5MKTViN.js → vue-ui-stackbar-DUVQRjp6.js} +2 -2
  128. package/dist/{vue-ui-stackline-C3H-w9qM.js → vue-ui-stackline-J0R-RjHc.js} +2 -2
  129. package/dist/{vue-ui-strip-plot-DHj_ep-p.js → vue-ui-strip-plot-CZtkOhgu.js} +2 -2
  130. package/dist/{vue-ui-table-CKlbqFCS.js → vue-ui-table-DLPvMKgy.js} +3 -3
  131. package/dist/{vue-ui-table-heatmap-CfGJVzI3.js → vue-ui-table-heatmap-CjSOXgXq.js} +1 -1
  132. package/dist/{vue-ui-table-sparkline-RzS0ScTK.js → vue-ui-table-sparkline-DOzz3o1m.js} +2 -2
  133. package/dist/{vue-ui-thermometer-BBUD_cKx.js → vue-ui-thermometer-Bfqbd1ax.js} +2 -2
  134. package/dist/{vue-ui-timer-C2uHLhKn.js → vue-ui-timer-D0-TQScN.js} +2 -2
  135. package/dist/{vue-ui-tiremarks-DapXAkBg.js → vue-ui-tiremarks-BVSRY8Gj.js} +2 -2
  136. package/dist/{vue-ui-treemap-F6LUlmcN.js → vue-ui-treemap-DH06-VQ7.js} +2 -2
  137. package/dist/{vue-ui-waffle-BcSsPMHf.js → vue-ui-waffle-CerCRZ-W.js} +2 -2
  138. package/dist/{vue-ui-wheel-CGbzQLRr.js → vue-ui-wheel-B1lApEvE.js} +2 -2
  139. package/dist/{vue-ui-word-cloud-ClUfpy7l.js → vue-ui-word-cloud-B_NoJE4l.js} +2 -2
  140. package/dist/{vue-ui-world-BG0sN6kF.js → vue-ui-world-CI3t1Fim.js} +2 -2
  141. package/dist/{vue-ui-xy-canvas-DF3izGyG.js → vue-ui-xy-canvas-QZ0PIIIj.js} +2 -2
  142. package/dist/{vue-ui-xy-ClcDhyHP.js → vue-ui-xy-xLZXDH_8.js} +74 -56
  143. package/dist/{vue_ui_circle_pack-DBKz_Fi_.js → vue_ui_circle_pack-FjH0ZQeb.js} +42 -0
  144. package/package.json +1 -1
  145. package/dist/vue-ui-circle-pack-DWaIDPsl.js +0 -1183
@@ -1,1183 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
- import { G as t, H as n, It as r, J as i, Lt as a, S as o, St as s, Tt as c, W as l, X as u, i as d, pt as f, r as p, t as m, x as ee, y as te, yt as ne, z as re, zt as ie } from "./lib-BkiwukKO.js";
3
- import { t as ae } from "./useConfig-BV0kTCnO.js";
4
- import { t as oe } from "./usePrinter-X0yWOynH.js";
5
- import { n as se, t as ce } from "./BaseScanner-C7dmAref.js";
6
- import { t as le } from "./useSvgExport-Dtu973wa.js";
7
- import { t as ue } from "./useNestedProp-Ck4hsrpu.js";
8
- import { t as de } from "./useThemeCheck-rFK9Zlb_.js";
9
- import { t as fe } from "./img-BjOr008R.js";
10
- import { n as pe } from "./Title-__gWq2g6.js";
11
- import { t as me } from "./_plugin-vue_export-helper-Dq1MygBL.js";
12
- import { c as he } from "./canvas-lib-DTaADQOK.js";
13
- import { t as ge } from "./useResponsive-CrAInupd.js";
14
- import { t as _e } from "./A11yDataTable-q2-8fSlJ.js";
15
- import { t as ve } from "./useUserOptionState-CjPJPTg2.js";
16
- import { t as ye } from "./useChartAccessibility-Do37qcw2.js";
17
- import { t as be } from "./vue_ui_circle_pack-DBKz_Fi_.js";
18
- import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as xe, createTextVNode as Se, createVNode as Ce, defineAsyncComponent as x, guardReactiveProps as S, mergeProps as we, nextTick as Te, normalizeClass as Ee, normalizeProps as C, normalizeStyle as w, onBeforeUnmount as De, onMounted as Oe, openBlock as T, ref as E, renderList as ke, renderSlot as D, resolveDynamicComponent as Ae, toDisplayString as O, toRefs as je, unref as k, watch as Me, withCtx as A } from "vue";
19
- //#region src/packCircles.js
20
- function Ne(e, t = 0) {
21
- let n = e.reduce((e, { x: n, r }) => Math.min(e, n - r - t), Infinity), r = e.reduce((e, { x: n, r }) => Math.max(e, n + r + t), -Infinity), i = e.reduce((e, { y: n, r }) => Math.min(e, n - r - t), Infinity), a = e.reduce((e, { y: n, r }) => Math.max(e, n + r + t), -Infinity);
22
- return [
23
- n,
24
- i,
25
- r - n,
26
- a - i
27
- ];
28
- }
29
- function Pe(e, t, n) {
30
- let r = e._, i = e.next._, a = r.r + i.r, o = (r.x * i.r + i.x * r.r) / a, s = (r.y * i.r + i.y * r.r) / a;
31
- return Math.max(Math.abs(o * n), Math.abs(s * t));
32
- }
33
- function Fe(e, t, n) {
34
- let r = Pe, i = e.length;
35
- if (!i) return e;
36
- e.sort((e, t) => t.r - e.r);
37
- let a, o, s;
38
- if (a = e[0], a.x = 0, a.y = 0, !(i > 1)) return e;
39
- if (o = e[1], a.x = -o.r, o.x = a.r, o.y = 0, !(i > 2)) return Re(e, n, t), e;
40
- Ie(o, a, s = e[2]), a = new M(a), o = new M(o), s = new M(s), a.next = s.previous = o, o.next = a.previous = s, s.next = o.previous = a;
41
- packLoop: for (let c = 3; c < i; ++c) {
42
- Ie(a._, o._, s = e[c]), s = new M(s);
43
- let i = o.next, l = a.previous, u = o._.r, d = a._.r;
44
- do
45
- if (u <= d) {
46
- if (Le(i._, s._)) {
47
- o = i, a.next = o, o.previous = a, --c;
48
- continue packLoop;
49
- }
50
- u += i._.r, i = i.next;
51
- } else {
52
- if (Le(l._, s._)) {
53
- a = l, a.next = o, o.previous = a, --c;
54
- continue packLoop;
55
- }
56
- d += l._.r, l = l.previous;
57
- }
58
- while (i !== l.next);
59
- s.previous = a, s.next = o, a.next = o.previous = o = s;
60
- let f = a, p = r(a, n, t), m = a.next;
61
- for (; m !== o;) {
62
- let e = r(m, n, t);
63
- e < p && (f = m, p = e), m = m.next;
64
- }
65
- a = f, o = a.next;
66
- }
67
- return Re(e, n, t), Ve(e, n, t), e;
68
- }
69
- function Ie(e, t, n) {
70
- let r = e.x - t.x, i = e.y - t.y, a = r * r + i * i;
71
- if (a) {
72
- let o = (t.r + n.r) ** 2, s = (e.r + n.r) ** 2;
73
- if (o > s) {
74
- let t = (a + s - o) / (2 * a), c = Math.sqrt(Math.max(0, s / a - t * t));
75
- n.x = e.x - t * r - c * i, n.y = e.y - t * i + c * r;
76
- } else {
77
- let e = (a + o - s) / (2 * a), c = Math.sqrt(Math.max(0, o / a - e * e));
78
- n.x = t.x + e * r - c * i, n.y = t.y + e * i + c * r;
79
- }
80
- } else n.x = t.x + n.r, n.y = t.y;
81
- }
82
- function Le(e, t) {
83
- let n = e.r + t.r - 1e-6, r = t.x - e.x, i = t.y - e.y;
84
- return n > 0 && n * n > r * r + i * i;
85
- }
86
- function Re(e, t, n) {
87
- if (e.length < 4) return;
88
- let r = e[0].r, i = e.findIndex((e) => e.r < r * .6), a = i === -1 ? Math.min(e.length, 12) : i, o = e.slice(0, Math.max(3, a));
89
- for (let t = 0; t < 80; t += 1) {
90
- let t = !1;
91
- for (let n = 0; n < o.length; n += 1) {
92
- let r = o[n], i = .06 * (1 - n / Math.max(1, o.length)), a = r.x * (1 - i), s = r.y * (1 - i);
93
- ze(r, a, s, e, n) && (r.x = a, r.y = s, t = !0);
94
- }
95
- if (Be(o), !t) break;
96
- }
97
- let s = o.reduce((e, t) => e + t.x, 0) / o.length, c = o.reduce((e, t) => e + t.y, 0) / o.length;
98
- for (let t of e) t.x -= s, t.y -= c;
99
- }
100
- function ze(e, t, n, r) {
101
- let i = e.x, a = e.y;
102
- e.x = t, e.y = n;
103
- for (let t of r) if (t !== e && Le(e, t)) return e.x = i, e.y = a, !1;
104
- return e.x = i, e.y = a, !0;
105
- }
106
- function Be(e) {
107
- for (let t = 0; t < 6; t += 1) {
108
- let t = !1;
109
- for (let n = 0; n < e.length - 1; n += 1) for (let r = n + 1; r < e.length; r += 1) {
110
- let i = e[n], a = e[r], o = a.x - i.x, s = a.y - i.y, c = Math.sqrt(o * o + s * s) || 1e-6, l = i.r + a.r;
111
- if (c < l) {
112
- let e = (l - c) / 2, n = o / c, r = s / c;
113
- i.x -= n * e, i.y -= r * e, a.x += n * e, a.y += r * e, t = !0;
114
- }
115
- }
116
- if (!t) break;
117
- }
118
- }
119
- function Ve(e, t, n) {
120
- if (e.length < 6) return;
121
- let r = e[0].r, i = e.findIndex((e) => e.r <= r * .45);
122
- if (i !== -1) for (let r = i; r < e.length; r += 1) {
123
- let i = e[r], a = He(i, e.slice(0, r), t, n);
124
- a && (i.x = a.x, i.y = a.y);
125
- }
126
- }
127
- function He(e, t, n, r) {
128
- if (t.length < 2) return null;
129
- let i = null, a = Infinity;
130
- for (let o = 0; o < t.length - 1; o += 1) for (let s = o + 1; s < t.length; s += 1) {
131
- let c = t[o], l = t[s], u = Ue(c, l, e.r);
132
- for (let o of u) {
133
- if (!o) continue;
134
- let s = {
135
- ...e,
136
- x: o.x,
137
- y: o.y
138
- };
139
- if (!j(s, t)) continue;
140
- let c = We(s, t, n, r);
141
- c < a && (a = c, i = o);
142
- }
143
- }
144
- return i;
145
- }
146
- function Ue(e, t, n) {
147
- let r = e.r + n, i = t.r + n, a = t.x - e.x, o = t.y - e.y, s = a * a + o * o, c = Math.sqrt(s);
148
- if (!c || c > r + i || c < Math.abs(r - i)) return [];
149
- let l = (r * r - i * i + s) / (2 * c), u = r * r - l * l;
150
- if (u < 0) return [];
151
- let d = Math.sqrt(u), f = a / c, p = o / c, m = e.x + l * f, ee = e.y + l * p, te = -p * d, ne = f * d;
152
- return [{
153
- x: m + te,
154
- y: ee + ne
155
- }, {
156
- x: m - te,
157
- y: ee - ne
158
- }];
159
- }
160
- function j(e, t) {
161
- for (let n of t) if (Le(n, e)) return !1;
162
- return !0;
163
- }
164
- function We(e, t, n, r) {
165
- let i = e.x / Math.max(1, n), a = e.y / Math.max(1, r), o = i * i + a * a, s = [];
166
- for (let n of t) {
167
- let t = e.x - n.x, r = e.y - n.y, i = Math.sqrt(t * t + r * r) - (e.r + n.r);
168
- s.push(i);
169
- }
170
- s.sort((e, t) => e - t);
171
- let c = s[0] ?? 0, l = s[1] ?? c, u = s[2] ?? l;
172
- return c * 8 + l * 4 + u * 2 + o * e.r * 12;
173
- }
174
- var M = class {
175
- constructor(e) {
176
- this._ = e, this.next = null, this.previous = null;
177
- }
178
- }, Ge = /* @__PURE__ */ e({ default: () => lt }), Ke = ["id"], qe = ["id"], Je = [
179
- "xmlns",
180
- "aria-describedby",
181
- "viewBox"
182
- ], Ye = [
183
- "x",
184
- "y",
185
- "width",
186
- "height"
187
- ], Xe = ["id"], Ze = ["stop-color"], Qe = ["stop-color"], $e = ["stop-color"], et = { key: 0 }, tt = [
188
- "x",
189
- "y",
190
- "width",
191
- "height",
192
- "stroke",
193
- "stroke-width",
194
- "fill",
195
- "rx",
196
- "onMouseenter",
197
- "onMouseout",
198
- "onClick"
199
- ], nt = [
200
- "x",
201
- "y",
202
- "width",
203
- "height",
204
- "stroke",
205
- "stroke-width",
206
- "fill",
207
- "rx"
208
- ], rt = [
209
- "x",
210
- "y",
211
- "width",
212
- "height",
213
- "fill",
214
- "rx"
215
- ], it = [
216
- "x",
217
- "y",
218
- "font-size",
219
- "fill",
220
- "font-weight"
221
- ], at = [
222
- "x",
223
- "y",
224
- "font-size",
225
- "fill",
226
- "font-weight"
227
- ], ot = {
228
- key: 0,
229
- style: {
230
- position: "absolute",
231
- top: "100%",
232
- left: "0",
233
- width: "100%"
234
- },
235
- "data-dom-to-png-ignore": "",
236
- "aria-hidden": "true"
237
- }, st = {
238
- key: 5,
239
- class: "vue-data-ui-watermark"
240
- }, ct = ["innerHTML"], lt = /* @__PURE__ */ me({
241
- __name: "vue-ui-circle-pack",
242
- props: {
243
- config: {
244
- type: Object,
245
- default() {
246
- return {};
247
- }
248
- },
249
- dataset: {
250
- type: Array,
251
- default() {
252
- return [];
253
- }
254
- }
255
- },
256
- emits: ["selectDatapoint", "copyAlt"],
257
- setup(e, { expose: me, emit: Pe }) {
258
- let Ie = x(() => import("./Tooltip-B7lmdbac.js")), Le = x(() => import("./BaseIcon-CEmt3Ifx.js").then((e) => e.n)), Re = x(() => import("./vue-ui-accordion-cVv18nTV.js").then((e) => e.n)), ze = x(() => import("./DataTable-BvDJEAma.js")), Be = x(() => import("./UserOptions-DMw8EZEo.js").then((e) => e.n)), Ve = x(() => import("./PenAndPaper-DwpL8Z0l.js").then((e) => e.t)), He = x(() => import("./PackageVersion-BIfMr89l.js").then((e) => e.t)), Ue = x(() => import("./BaseDraggableDialog-BQcmQAK5.js").then((e) => e.n)), j = e, We = Pe, { vue_ui_circle_pack: M } = ae(), { isThemeValid: Ge, warnInvalidTheme: lt } = de(), ut = g(() => !!j.dataset && j.dataset.length), N = E(n()), P = E(null), dt = E(null), ft = E(null), pt = E(0), mt = E(0), ht = E(0), gt = E(null), F = E(null), _t = E(null), vt = E(!1), yt = E(""), I = E(null), bt = E(!1), xt = E(!1), L = E(null), St = E({
259
- x: 0,
260
- y: 0
261
- }), R = E("pointer"), Ct = E(!1), z = E(At()), B = g(() => z.value.userOptions.useCursorPointer), wt = g(() => ie({
262
- defaultConfig: {
263
- userOptions: { show: !1 },
264
- table: { show: !1 },
265
- style: { chart: {
266
- backgroundColor: "#99999930",
267
- circles: {
268
- stroke: "#6A6A6A",
269
- labels: {
270
- name: { show: !1 },
271
- value: { show: !1 }
272
- }
273
- }
274
- } }
275
- },
276
- userConfig: z.value.skeletonConfig ?? {}
277
- })), { loading: Tt, FINAL_DATASET: Et } = se({
278
- ...je(j),
279
- FINAL_CONFIG: z,
280
- prepareConfig: At,
281
- skeletonDataset: j.config?.skeletonDataset ?? [
282
- {
283
- name: "_",
284
- value: 13,
285
- color: "#F2F2F2"
286
- },
287
- {
288
- name: "_",
289
- value: 8,
290
- color: "#DBDBDB"
291
- },
292
- {
293
- name: "_",
294
- value: 5,
295
- color: "#ADADAD"
296
- },
297
- {
298
- name: "_",
299
- value: 3,
300
- color: "#969696"
301
- },
302
- {
303
- name: "_",
304
- value: 2,
305
- color: "#808080"
306
- },
307
- {
308
- name: "_",
309
- value: 1,
310
- color: "#696969"
311
- }
312
- ],
313
- skeletonConfig: ie({
314
- defaultConfig: z.value,
315
- userConfig: wt.value
316
- })
317
- }), { svgRef: V } = ye({ config: z.value.style.chart.title }), { userOptionsVisible: Dt, setUserOptionsVisibility: Ot, keepUserOptionState: kt } = ve({ config: z.value });
318
- function At() {
319
- let e = ue({
320
- userConfig: j.config,
321
- defaultConfig: M
322
- }), t = e.theme;
323
- if (!t) return e;
324
- if (!Ge.value(e)) return lt(e), e;
325
- let n = ue({
326
- userConfig: be[t] || j.config,
327
- defaultConfig: e
328
- }), r = ue({
329
- userConfig: j.config,
330
- defaultConfig: n
331
- });
332
- return {
333
- ...r,
334
- customPalette: r.customPalette.length ? r.customPalette : a[t] || c
335
- };
336
- }
337
- Me(() => j.config, (e) => {
338
- z.value = At(), Dt.value = !z.value.userOptions.showOnChartHover, Ut(), pt.value += 1, mt.value += 1, H.value.showTable = z.value.table.show;
339
- }, { deep: !0 });
340
- let { isPrinting: jt, isImaging: Mt, generatePdf: Nt, generateImage: Pt } = oe({
341
- elementId: `vue-ui-circle-pack_${N.value}`,
342
- fileName: z.value.style.chart.title.text || "vue-ui-circle-pack",
343
- options: z.value.userOptions.print
344
- }), Ft = g(() => z.value.userOptions.show && !z.value.style.chart.title.text), H = E({
345
- showTable: z.value.table.show,
346
- showTooltip: z.value.style.chart.tooltip.show
347
- });
348
- Me(z, () => {
349
- H.value = {
350
- showTable: z.value.table.show,
351
- showTooltip: z.value.style.chart.tooltip.show
352
- };
353
- }, { immediate: !0 });
354
- let U = E({
355
- h: 10,
356
- w: 10
357
- }), It = E([
358
- 0,
359
- 0,
360
- 100,
361
- 100
362
- ]), Lt = g(() => z.value.debug), Rt = g(() => {
363
- let e = z.value.style?.chart || {};
364
- return e.dimensions && typeof e.dimensions.width == "number" ? e.dimensions.width : typeof e.width == "number" ? e.width : 300;
365
- }), zt = g(() => {
366
- let e = z.value.style?.chart || {};
367
- return e.dimensions && typeof e.dimensions.height == "number" ? e.dimensions.height : typeof e.height == "number" ? e.height : 300;
368
- }), W = E([]), G = E("0 0 100 100"), K = E(null), q = E(null);
369
- function Bt(e, t) {
370
- U.value = {
371
- w: e,
372
- h: t
373
- };
374
- let n = J.value.map((e) => ({ ...e }));
375
- if (!n.length) {
376
- W.value = [], It.value = [
377
- 0,
378
- 0,
379
- e,
380
- t
381
- ], G.value = `0 0 ${e} ${t}`;
382
- return;
383
- }
384
- let r = Fe(n, t, e), [i, a, o, s] = Ne(r, 1), c = Math.min(o ? e / o : 1, s ? t / s : 1), l = (e - o * c) / 2, u = (t - s * c) / 2;
385
- W.value = r.map((e) => ({
386
- ...e,
387
- x: (e.x - i) * c + l,
388
- y: (e.y - a) * c + u,
389
- r: e.r * c
390
- })), It.value = [
391
- 0,
392
- 0,
393
- e,
394
- t
395
- ], G.value = `0 0 ${e} ${t}`;
396
- }
397
- function Vt() {
398
- if (!z.value.responsive || !P.value) return;
399
- let e = he(() => {
400
- let { width: e, height: t } = ge({
401
- chart: P.value,
402
- title: z.value.style.chart.title.text ? dt.value : null,
403
- legend: null,
404
- source: gt.value,
405
- noTitle: ft.value
406
- });
407
- requestAnimationFrame(() => {
408
- !e || !t || (V.value && (V.value.setAttribute("width", e), V.value.setAttribute("height", t)), Bt(e, t));
409
- });
410
- });
411
- K.value && (q.value && K.value.unobserve(q.value), K.value.disconnect()), K.value = new ResizeObserver(e), q.value = P.value.parentNode || P.value, q.value && K.value.observe(q.value), e();
412
- }
413
- function Ht() {
414
- K.value && (q.value && K.value.unobserve(q.value), K.value.disconnect(), K.value = null, q.value = null);
415
- }
416
- async function Ut() {
417
- s(j.dataset) && u({
418
- componentName: "VueUiCirclePack",
419
- type: "dataset",
420
- debug: Lt.value
421
- });
422
- let e = Rt.value, t = zt.value;
423
- Bt(e, t), z.value.responsive ? Vt() : Ht();
424
- }
425
- Oe(Ut), De(() => {
426
- Ht();
427
- }), Me(() => Et.value, async (e) => {
428
- await Ut();
429
- }, { deep: !0 });
430
- let Wt = g(() => ee(z.value.customPalette)), J = g(() => Et.value.map((e, t) => {
431
- let r = te(e.color) || Wt.value[t] || a[z.value.theme || "default"][t % a[z.value.theme || "default"].length] || c[t] || c[t % c.length];
432
- return {
433
- ...e,
434
- r: e.value,
435
- id: n(),
436
- color: r
437
- };
438
- }).filter((e) => ![
439
- null,
440
- void 0,
441
- Infinity,
442
- -Infinity
443
- ].includes(e.value))), Y = g(() => W.value.length ? Math.max(...W.value.map((e) => e.r)) : 0);
444
- function Gt(e, t) {
445
- return Y.value ? t / Y.value * e : 0;
446
- }
447
- function Kt(e, t) {
448
- z.value.events.datapointLeave && z.value.events.datapointLeave({
449
- datapoint: e,
450
- seriesIndex: t
451
- }), !(R.value === "keyboard" && I.value?.id === e?.id) && (vt.value = !1, I.value = null, L.value = null, R.value = "pointer");
452
- }
453
- function qt(e, t) {
454
- We("selectDatapoint", e), z.value.events.datapointClick && z.value.events.datapointClick({
455
- datapoint: e,
456
- seriesIndex: t
457
- });
458
- }
459
- let Jt = E(null), X = E(!1);
460
- function Yt(e, t, n = "pointer") {
461
- I.value = e, L.value = t, R.value = n, z.value.events.datapointEnter && z.value.events.datapointEnter({
462
- datapoint: e,
463
- seriesIndex: t
464
- }), Jt.value = {
465
- datapoint: e,
466
- seriesIndex: t,
467
- config: z.value,
468
- series: J.value
469
- }, vt.value = !0;
470
- let r = z.value.style.chart.tooltip.customFormat;
471
- if (X.value = !1, f(r)) try {
472
- let n = r({
473
- seriesIndex: t,
474
- datapoint: e,
475
- series: J.value,
476
- config: z.value
477
- });
478
- typeof n == "string" && (yt.value = n, X.value = !0);
479
- } catch {
480
- console.warn("Custom format cannot be applied."), X.value = !1;
481
- }
482
- if (!X.value) {
483
- let t = "";
484
- t += `
485
- <div style="display:flex;align-items:center;gap:4px;">
486
- <svg viewBox="0 0 10 10" height="${z.value.style.chart.tooltip.fontSize}" width="${z.value.style.chart.tooltip.fontSize}">
487
- <circle
488
- cx="5"
489
- cy="5"
490
- r="5"
491
- fill="${z.value.style.chart.circles.gradient.show ? `url(#${e.id})` : e.color}"
492
- />
493
- </svg>
494
- <span>${e.name}: <b>${Xt(e)}</b></span>
495
- </div>
496
- `, yt.value = t;
497
- }
498
- }
499
- function Xt(e) {
500
- return d(z.value.style.chart.circles.labels.value.formatter, e.value, t({
501
- p: z.value.style.chart.circles.labels.value.prefix,
502
- v: e.value,
503
- s: z.value.style.chart.circles.labels.value.suffix,
504
- r: z.value.style.chart.circles.labels.value.rounding
505
- }));
506
- }
507
- function Zt(e) {
508
- if (!e) return 0;
509
- let t = Xt(e), n = e.r / (t.length || 1) * (t.length === 1 ? 1 : 2);
510
- return Math.min(e.r / 2.5, n);
511
- }
512
- let Z = E(!1);
513
- function Qt(e) {
514
- Z.value = e, ht.value += 1;
515
- }
516
- let Q = E(!1);
517
- function $t() {
518
- Q.value = !Q.value;
519
- }
520
- let en = g(() => {
521
- let e = J.value.map((e) => ({
522
- name: e.name,
523
- value: e.value,
524
- color: e.color
525
- })).toSorted((e, t) => t.value - e.value);
526
- return {
527
- head: e,
528
- body: e.map((e) => e.value)
529
- };
530
- });
531
- function tn(e = null) {
532
- Te(() => {
533
- let t = en.value.head.map((e, t) => [[e.name], [en.value.body[t]]]), n = o([
534
- [z.value.style.chart.title.text],
535
- [z.value.style.chart.title.subtitle.text],
536
- [[""], [z.value.table.columnNames.value]]
537
- ].concat(t));
538
- e ? e(n) : i({
539
- csvContent: n,
540
- title: z.value.style.chart.title.text || "vue-ui-circle-pack"
541
- });
542
- });
543
- }
544
- let $ = g(() => {
545
- let e = [z.value.table.columnNames.datapoint, z.value.table.columnNames.value], n = en.value.head.map((e, n) => {
546
- let r = t({
547
- p: z.value.style.chart.circles.labels.value.prefix,
548
- v: en.value.body[n],
549
- s: z.value.style.chart.circles.labels.value.suffix,
550
- r: z.value.style.chart.circles.labels.value.rounding
551
- });
552
- return [{
553
- color: e.color,
554
- name: e.name
555
- }, r];
556
- }), r = {
557
- th: {
558
- backgroundColor: z.value.table.th.backgroundColor,
559
- color: z.value.table.th.color,
560
- outline: z.value.table.th.outline
561
- },
562
- td: {
563
- backgroundColor: z.value.table.td.backgroundColor,
564
- color: z.value.table.td.color,
565
- outline: z.value.table.td.outline
566
- },
567
- breakpoint: z.value.table.responsiveBreakpoint
568
- };
569
- return {
570
- colNames: [z.value.table.columnNames.datapoint, z.value.table.columnNames.value],
571
- head: e,
572
- body: n,
573
- config: r
574
- };
575
- });
576
- function nn() {
577
- H.value.showTable = !H.value.showTable;
578
- }
579
- function rn() {
580
- H.value.showTooltip = !H.value.showTooltip;
581
- }
582
- function an() {
583
- return J.value;
584
- }
585
- async function on({ scale: e = 2 } = {}) {
586
- if (!P.value) return;
587
- let { width: t, height: n } = P.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await fe({
588
- domElement: P.value,
589
- base64: !0,
590
- img: !0,
591
- scale: e
592
- });
593
- return {
594
- imageUri: i,
595
- base64: a,
596
- title: z.value.style.chart.title.text,
597
- width: t,
598
- height: n,
599
- aspectRatio: r
600
- };
601
- }
602
- let sn = g(() => {
603
- let e = z.value.table.useDialog && !z.value.table.show, t = H.value.showTable;
604
- return {
605
- component: e ? Ue : Re,
606
- title: `${z.value.style.chart.title.text}${z.value.style.chart.title.subtitle.text ? `: ${z.value.style.chart.title.subtitle.text}` : ""}`,
607
- props: e ? {
608
- backgroundColor: z.value.table.th.backgroundColor,
609
- color: z.value.table.th.color,
610
- headerColor: z.value.table.th.color,
611
- headerBg: z.value.table.th.backgroundColor,
612
- isFullscreen: Z.value,
613
- fullscreenParent: P.value,
614
- forcedWidth: Math.min(500, window.innerWidth * .8),
615
- isCursorPointer: B.value
616
- } : {
617
- hideDetails: !0,
618
- config: {
619
- open: t,
620
- maxHeight: 1e4,
621
- body: {
622
- backgroundColor: z.value.style.chart.backgroundColor,
623
- color: z.value.style.chart.color
624
- },
625
- head: {
626
- backgroundColor: z.value.style.chart.backgroundColor,
627
- color: z.value.style.chart.color
628
- }
629
- }
630
- }
631
- };
632
- });
633
- Me(() => H.value.showTable, (e) => {
634
- z.value.table.show || (e && z.value.table.useDialog && F.value ? F.value.open() : F.value && "close" in F.value && F.value.close());
635
- });
636
- function cn() {
637
- H.value.showTable = !1, _t.value && _t.value.setTableIconState(!1);
638
- }
639
- let ln = g(() => z.value.style.chart.backgroundColor), { exportSvg: un, getSvg: dn } = le({
640
- svg: V,
641
- title: g(() => z.value.style.chart.title),
642
- backgroundColor: ln
643
- });
644
- async function fn({ isCb: e }) {
645
- xt.value = !0, await Te();
646
- try {
647
- if (e) {
648
- let { blob: e, url: t, text: n, dataUrl: r } = await dn();
649
- await Promise.resolve(z.value.userOptions.callbacks.svg({
650
- blob: e,
651
- url: t,
652
- text: n,
653
- dataUrl: r
654
- }));
655
- } else await Promise.resolve(un());
656
- } finally {
657
- xt.value = !1;
658
- }
659
- }
660
- function pn(e) {
661
- if (e?.stage === "start") {
662
- bt.value = !0;
663
- return;
664
- }
665
- if (e?.stage === "end") {
666
- bt.value = !1;
667
- return;
668
- }
669
- Pt();
670
- }
671
- async function mn() {
672
- if (We("copyAlt", {
673
- config: z.value,
674
- dataset: J.value
675
- }), !z.value.userOptions.callbacks.altCopy) {
676
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
677
- return;
678
- }
679
- await Promise.resolve(z.value.userOptions.callbacks.altCopy({
680
- config: z.value,
681
- dataset: J.value
682
- }));
683
- }
684
- function hn(e) {
685
- if (!Number.isFinite(e) || !V.value) return;
686
- let t = W.value[e];
687
- if (!t) return;
688
- let n = r(t.x, t.y, V.value);
689
- n && (St.value = n);
690
- }
691
- function gn() {
692
- if (L.value !== null) {
693
- let e = W.value[L.value];
694
- e && Kt(e, L.value);
695
- }
696
- L.value = null, R.value = "pointer", vt.value = !1, I.value = null;
697
- }
698
- function _n() {
699
- L.value = null, Ct.value = !0;
700
- }
701
- function vn() {
702
- gn(), Ct.value = !1;
703
- }
704
- function yn(e, t) {
705
- let n = W.value.length;
706
- return n ? e === null || e < 0 || e >= n ? t === "next" ? 0 : n - 1 : t === "previous" ? (e - 1 + n) % n : (e + 1) % n : null;
707
- }
708
- function bn(e) {
709
- if (!V.value || Q.value || document.activeElement !== V.value || !W.value.length) return;
710
- let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
711
- if (!t && !n && !r && !i) return;
712
- if (e.preventDefault(), e.stopPropagation(), i) {
713
- gn();
714
- return;
715
- }
716
- if (r) {
717
- if (L.value === null) return;
718
- let e = W.value[L.value];
719
- if (!e) return;
720
- qt(e, L.value);
721
- return;
722
- }
723
- let a = L.value;
724
- a === null || a < 0 || a >= W.value.length ? a = n ? 0 : W.value.length - 1 : n ? a = yn(a, "next") : t && (a = yn(a, "previous"));
725
- let o = W.value[a];
726
- o && (L.value = a, hn(a), Yt(o, a, "keyboard"));
727
- }
728
- let xn = g(() => ({
729
- headers: $.value?.colNames ?? [],
730
- rows: $.value?.body?.map((e) => [e[0]?.name ?? "", e[1]]) ?? []
731
- }));
732
- return me({
733
- getData: an,
734
- getImage: on,
735
- generateCsv: tn,
736
- generatePdf: Nt,
737
- generateImage: Pt,
738
- generateSvg: fn,
739
- toggleTable: nn,
740
- toggleAnnotator: $t,
741
- toggleFullscreen: Qt,
742
- copyAlt: mn
743
- }), (e, t) => (T(), y("div", {
744
- id: `vue-ui-circle-pack_${N.value}`,
745
- class: Ee(`vue-data-ui-component vue-ui-circle-pack ${Z.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${k(Tt) ? "loading" : ""}`),
746
- ref_key: "circlePackChart",
747
- ref: P,
748
- style: w(`font-family:${z.value.style.fontFamily};text-align:center;background:${z.value.style.chart.backgroundColor};`),
749
- onMouseenter: t[1] ||= () => k(Ot)(!0),
750
- onMouseleave: t[2] ||= () => k(Ot)(!1)
751
- }, [
752
- b("div", {
753
- id: `chart-instructions-${N.value}`,
754
- class: "sr-only"
755
- }, [b("p", null, O(z.value.a11y.translations.keyboardNavigation), 1)], 8, qe),
756
- xn.value?.rows?.length ? (T(), _(_e, {
757
- key: 0,
758
- uid: N.value,
759
- head: xn.value.headers,
760
- body: xn.value.rows,
761
- notice: z.value.a11y.translations.tableAvailable,
762
- caption: z.value.a11y.translations.tableCaption
763
- }, null, 8, [
764
- "uid",
765
- "head",
766
- "body",
767
- "notice",
768
- "caption"
769
- ])) : v("", !0),
770
- z.value.userOptions.buttons.annotator ? (T(), _(k(Ve), {
771
- key: 1,
772
- svgRef: k(V),
773
- backgroundColor: z.value.style.chart.backgroundColor,
774
- color: z.value.style.chart.color,
775
- active: Q.value,
776
- scale: Y.value / 100,
777
- isCursorPointer: B.value,
778
- onClose: $t
779
- }, {
780
- "annotator-action-close": A(() => [D(e.$slots, "annotator-action-close", {}, void 0, !0)]),
781
- "annotator-action-color": A(({ color: t }) => [D(e.$slots, "annotator-action-color", C(S({ color: t })), void 0, !0)]),
782
- "annotator-action-draw": A(({ mode: t }) => [D(e.$slots, "annotator-action-draw", C(S({ mode: t })), void 0, !0)]),
783
- "annotator-action-undo": A(({ disabled: t }) => [D(e.$slots, "annotator-action-undo", C(S({ disabled: t })), void 0, !0)]),
784
- "annotator-action-redo": A(({ disabled: t }) => [D(e.$slots, "annotator-action-redo", C(S({ disabled: t })), void 0, !0)]),
785
- "annotator-action-delete": A(({ disabled: t }) => [D(e.$slots, "annotator-action-delete", C(S({ disabled: t })), void 0, !0)]),
786
- _: 3
787
- }, 8, [
788
- "svgRef",
789
- "backgroundColor",
790
- "color",
791
- "active",
792
- "scale",
793
- "isCursorPointer"
794
- ])) : v("", !0),
795
- D(e.$slots, "userConfig", {}, void 0, !0),
796
- Ft.value ? (T(), y("div", {
797
- key: 2,
798
- ref_key: "noTitle",
799
- ref: ft,
800
- class: "vue-data-ui-no-title-space",
801
- style: "height:36px; width: 100%;background:transparent"
802
- }, null, 512)) : v("", !0),
803
- z.value.style.chart.title.text ? (T(), y("div", {
804
- key: 3,
805
- ref_key: "chartTitle",
806
- ref: dt,
807
- style: "width:100%;background:transparent;padding-bottom:12px"
808
- }, [(T(), _(pe, {
809
- key: `title_${pt.value}`,
810
- config: {
811
- title: {
812
- cy: "donut-div-title",
813
- ...z.value.style.chart.title
814
- },
815
- subtitle: {
816
- cy: "donut-div-subtitle",
817
- ...z.value.style.chart.title.subtitle
818
- }
819
- }
820
- }, null, 8, ["config"]))], 512)) : v("", !0),
821
- z.value.userOptions.show && ut.value && (k(kt) || k(Dt)) ? (T(), _(k(Be), {
822
- ref_key: "userOptionsRef",
823
- ref: _t,
824
- key: `user_option_${ht.value}`,
825
- backgroundColor: z.value.style.chart.backgroundColor,
826
- color: z.value.style.chart.color,
827
- isPrinting: k(jt),
828
- isImaging: k(Mt),
829
- uid: N.value,
830
- hasTooltip: z.value.userOptions.buttons.tooltip,
831
- isTooltip: H.value.showTooltip,
832
- hasLabel: !1,
833
- hasPdf: z.value.userOptions.buttons.pdf,
834
- hasImg: z.value.userOptions.buttons.img,
835
- hasSvg: z.value.userOptions.buttons.svg,
836
- hasXls: z.value.userOptions.buttons.csv,
837
- hasTable: z.value.userOptions.buttons.table,
838
- hasFullscreen: z.value.userOptions.buttons.fullscreen,
839
- hasAltCopy: z.value.userOptions.buttons.altCopy,
840
- isFullscreen: Z.value,
841
- chartElement: P.value,
842
- position: z.value.userOptions.position,
843
- callbacks: z.value.userOptions.callbacks,
844
- printScale: z.value.userOptions.print.scale,
845
- titles: { ...z.value.userOptions.buttonTitles },
846
- hasAnnotator: z.value.userOptions.buttons.annotator,
847
- isAnnotation: Q.value,
848
- tableDialog: z.value.table.useDialog,
849
- isCursorPointer: B.value,
850
- onToggleFullscreen: Qt,
851
- onGeneratePdf: k(Nt),
852
- onGenerateCsv: tn,
853
- onGenerateImage: pn,
854
- onGenerateSvg: fn,
855
- onToggleTable: nn,
856
- onToggleTooltip: rn,
857
- onToggleAnnotator: $t,
858
- onCopyAlt: mn,
859
- style: w({ visibility: k(kt) ? k(Dt) ? "visible" : "hidden" : "visible" })
860
- }, xe({ _: 2 }, [
861
- e.$slots.menuIcon ? {
862
- name: "menuIcon",
863
- fn: A(({ isOpen: t, color: n }) => [D(e.$slots, "menuIcon", C(S({
864
- isOpen: t,
865
- color: n
866
- })), void 0, !0)]),
867
- key: "0"
868
- } : void 0,
869
- e.$slots.optionTooltip ? {
870
- name: "optionTooltip",
871
- fn: A(() => [D(e.$slots, "optionTooltip", {}, void 0, !0)]),
872
- key: "1"
873
- } : void 0,
874
- e.$slots.optionPdf ? {
875
- name: "optionPdf",
876
- fn: A(() => [D(e.$slots, "optionPdf", {}, void 0, !0)]),
877
- key: "2"
878
- } : void 0,
879
- e.$slots.optionCsv ? {
880
- name: "optionCsv",
881
- fn: A(() => [D(e.$slots, "optionCsv", {}, void 0, !0)]),
882
- key: "3"
883
- } : void 0,
884
- e.$slots.optionImg ? {
885
- name: "optionImg",
886
- fn: A(() => [D(e.$slots, "optionImg", {}, void 0, !0)]),
887
- key: "4"
888
- } : void 0,
889
- e.$slots.optionSvg ? {
890
- name: "optionSvg",
891
- fn: A(() => [D(e.$slots, "optionSvg", {}, void 0, !0)]),
892
- key: "5"
893
- } : void 0,
894
- e.$slots.optionTable ? {
895
- name: "optionTable",
896
- fn: A(() => [D(e.$slots, "optionTable", {}, void 0, !0)]),
897
- key: "6"
898
- } : void 0,
899
- e.$slots.optionFullscreen ? {
900
- name: "optionFullscreen",
901
- fn: A(({ toggleFullscreen: t, isFullscreen: n }) => [D(e.$slots, "optionFullscreen", C(S({
902
- toggleFullscreen: t,
903
- isFullscreen: n
904
- })), void 0, !0)]),
905
- key: "7"
906
- } : void 0,
907
- e.$slots.optionAnnotator ? {
908
- name: "optionAnnotator",
909
- fn: A(({ toggleAnnotator: t, isAnnotator: n }) => [D(e.$slots, "optionAnnotator", C(S({
910
- toggleAnnotator: t,
911
- isAnnotator: n
912
- })), void 0, !0)]),
913
- key: "8"
914
- } : void 0,
915
- e.$slots.optionAltCopy ? {
916
- name: "optionAltCopy",
917
- fn: A(({ altCopy: t }) => [D(e.$slots, "optionAltCopy", C(S({ altCopy: t })), void 0, !0)]),
918
- key: "9"
919
- } : void 0
920
- ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.isTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.printScale.titles.hasAnnotator.isAnnotation.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : v("", !0),
921
- b("div", { class: Ee({
922
- "vue-ui-circle-pack-svg-container": !0,
923
- "not-responsive": !z.value.responsive
924
- }) }, [(T(), y("svg", {
925
- ref_key: "svgRef",
926
- ref: V,
927
- xmlns: k(m),
928
- "aria-describedby": `chart-instructions-${N.value}`,
929
- viewBox: G.value,
930
- preserveAspectRatio: "xMidYMid meet",
931
- class: Ee({
932
- "vue-data-ui-fullscreen--on": Z.value,
933
- "vue-data-ui-fulscreen--off": !Z.value,
934
- "not-responsive": !z.value.responsive
935
- }),
936
- style: w(`display:block;${z.value.responsive ? "width:100%;height:auto" : "height:100%;"};overflow:visible;background:transparent;color:${z.value.style.chart.color};background:${z.value.style.chart.backgroundColor};`),
937
- tabindex: "0",
938
- onFocus: _n,
939
- onBlur: vn,
940
- onKeydown: bn
941
- }, [
942
- Ce(k(He)),
943
- e.$slots["chart-background"] ? (T(), y("foreignObject", {
944
- key: 0,
945
- x: G.value.x,
946
- y: G.value.y,
947
- width: U.value.w,
948
- height: U.value.h,
949
- style: { pointerEvents: "none" }
950
- }, [D(e.$slots, "chart-background", {}, void 0, !0)], 8, Ye)) : v("", !0),
951
- (T(!0), y(h, null, ke(W.value, (t, n) => (T(), y(h, { key: t.id }, [
952
- b("defs", null, [b("radialGradient", {
953
- id: t.id,
954
- fy: "30%"
955
- }, [
956
- b("stop", {
957
- offset: "10%",
958
- "stop-color": k(ne)(t.color, z.value.style.chart.circles.gradient.intensity / 100)
959
- }, null, 8, Ze),
960
- b("stop", {
961
- offset: "90%",
962
- "stop-color": k(l)(t.color, .1)
963
- }, null, 8, Qe),
964
- b("stop", {
965
- offset: "100%",
966
- "stop-color": t.color
967
- }, null, 8, $e)
968
- ], 8, Xe)]),
969
- e.$slots.pattern ? (T(), y("g", et, [b("defs", null, [D(e.$slots, "pattern", we({ ref_for: !0 }, {
970
- ...t,
971
- patternId: `pattern_${N.value}_${t.id}`
972
- }), void 0, !0)])])) : v("", !0),
973
- b("rect", {
974
- x: t.x - t.r,
975
- y: t.y - t.r,
976
- width: t.r * 2,
977
- height: t.r * 2,
978
- stroke: z.value.style.chart.circles.stroke,
979
- "stroke-width": z.value.style.chart.circles.strokeWidth * (Y.value || 1) / 100,
980
- fill: z.value.style.chart.circles.gradient.show ? `url(#${t.id})` : t.color,
981
- rx: t.r,
982
- onMouseenter: (e) => Yt(t, n, "pointer"),
983
- onMouseout: (e) => Kt(t, n),
984
- onClick: (e) => qt(t, n)
985
- }, null, 40, tt),
986
- e.$slots.pattern ? (T(), y("rect", {
987
- key: 1,
988
- x: t.x - t.r,
989
- y: t.y - t.r,
990
- width: t.r * 2,
991
- height: t.r * 2,
992
- stroke: z.value.style.chart.circles.stroke,
993
- "stroke-width": z.value.style.chart.circles.strokeWidth * (Y.value || 1) / 100,
994
- fill: `url(#pattern_${N.value}_${t.id})`,
995
- rx: t.r,
996
- style: { pointerEvents: "none" }
997
- }, null, 8, nt)) : v("", !0)
998
- ], 64))), 128)),
999
- (T(!0), y(h, null, ke(W.value, (e, t) => (T(), y("rect", {
1000
- key: e.id,
1001
- x: e.x - e.r,
1002
- y: e.y - e.r,
1003
- width: e.r * 2,
1004
- height: e.r * 2,
1005
- stroke: "none",
1006
- fill: I.value && I.value.id === e.id ? z.value.style.chart.circles.gradient.show ? `url(#${e.id})` : e.color : "transparent",
1007
- rx: e.r,
1008
- style: w({
1009
- filter: I.value && I.value.id === e.id ? `drop-shadow(0px 0px 6px ${z.value.style.chart.circles.selectedShadowColor})` : "none",
1010
- opacity: +!!I.value,
1011
- pointerEvents: "none",
1012
- transition: "opacity 0.2s ease-in-out"
1013
- })
1014
- }, null, 12, rt))), 128)),
1015
- (T(!0), y(h, null, ke(W.value, (t, n) => (T(), y(h, { key: t.id }, [e.$slots["data-label"] ? D(e.$slots, "data-label", we({
1016
- key: 0,
1017
- ref_for: !0
1018
- }, {
1019
- ...t,
1020
- createTSpans: k(re),
1021
- fontSize: {
1022
- name: t.r / 3 * z.value.style.chart.circles.labels.name.fontSizeRatio,
1023
- value: Zt(t) * z.value.style.chart.circles.labels.value.fontSizeRatio
1024
- },
1025
- color: z.value.style.chart.circles.labels.name.color ? z.value.style.chart.circles.labels.name.color : k(p)(t.color)
1026
- }), void 0, !0) : (T(), y(h, { key: 1 }, [z.value.style.chart.circles.labels.name.show && t.name ? (T(), y("text", {
1027
- key: 0,
1028
- style: {
1029
- pointerEvents: "none",
1030
- transition: "opacity 0.2s ease-in-out"
1031
- },
1032
- x: t.x,
1033
- y: t.y + Gt(t.r, z.value.style.chart.circles.labels.name.offsetY) - t.r / 10,
1034
- "font-size": t.r / 3 * z.value.style.chart.circles.labels.name.fontSizeRatio,
1035
- fill: z.value.style.chart.circles.labels.name.color === "auto" ? k(p)(t.color) : z.value.style.chart.circles.labels.name.color,
1036
- "font-weight": z.value.style.chart.circles.labels.name.bold ? "bold" : "normal",
1037
- "text-anchor": "middle"
1038
- }, O(t.name), 9, it)) : v("", !0), z.value.style.chart.circles.labels.value.show ? (T(), y("text", {
1039
- key: 1,
1040
- style: {
1041
- pointerEvents: "none",
1042
- transition: "opacity 0.2s ease-in-out"
1043
- },
1044
- x: t.x,
1045
- y: t.y + Gt(t.r, z.value.style.chart.circles.labels.value.offsetY) + t.r / 2.5,
1046
- "font-size": Zt(t) * z.value.style.chart.circles.labels.value.fontSizeRatio,
1047
- fill: z.value.style.chart.circles.labels.value.color === "auto" ? k(p)(t.color) : z.value.style.chart.circles.labels.value.color,
1048
- "font-weight": z.value.style.chart.circles.labels.value.bold ? "bold" : "normal",
1049
- "text-anchor": "middle"
1050
- }, O(Xt(t)), 9, at)) : v("", !0)], 64)), D(e.$slots, "circle", we({ ref_for: !0 }, {
1051
- ...t,
1052
- isSelected: I.value?.id === t.id,
1053
- uid: `${n}_${N.value}`
1054
- }), void 0, !0)], 64))), 128)),
1055
- D(e.$slots, "svg", { svg: {
1056
- drawingArea: {
1057
- width: U.value.w,
1058
- height: U.value.h
1059
- },
1060
- width: U.value.w,
1061
- height: U.value.h,
1062
- isPrintingImg: k(jt) || k(Mt) || bt.value,
1063
- isPrintingSvg: xt.value
1064
- } }, void 0, !0)
1065
- ], 46, Je)), e.$slots.hint ? (T(), y("div", ot, [D(e.$slots, "hint", C(S({
1066
- hint: z.value.a11y.translations.keyboardNavigation,
1067
- isVisible: Ct.value
1068
- })), void 0, !0)])) : v("", !0)], 2),
1069
- e.$slots.watermark ? (T(), y("div", st, [D(e.$slots, "watermark", C(S({ isPrinting: k(jt) || k(Mt) || bt.value || xt.value })), void 0, !0)])) : v("", !0),
1070
- e.$slots.source ? (T(), y("div", {
1071
- key: 6,
1072
- ref_key: "source",
1073
- ref: gt,
1074
- dir: "auto"
1075
- }, [D(e.$slots, "source", {}, void 0, !0)], 512)) : v("", !0),
1076
- Ce(k(Ie), {
1077
- teleportTo: z.value.style.chart.tooltip.teleportTo,
1078
- show: H.value.showTooltip && vt.value,
1079
- backgroundColor: z.value.style.chart.tooltip.backgroundColor,
1080
- color: z.value.style.chart.tooltip.color,
1081
- fontSize: z.value.style.chart.tooltip.fontSize,
1082
- borderRadius: z.value.style.chart.tooltip.borderRadius,
1083
- borderColor: z.value.style.chart.tooltip.borderColor,
1084
- borderWidth: z.value.style.chart.tooltip.borderWidth,
1085
- backgroundOpacity: z.value.style.chart.tooltip.backgroundOpacity,
1086
- position: z.value.style.chart.tooltip.position,
1087
- offsetY: z.value.style.chart.tooltip.offsetY,
1088
- parent: P.value,
1089
- content: yt.value,
1090
- isCustom: X.value,
1091
- isFullscreen: Z.value,
1092
- smooth: z.value.style.chart.tooltip.smooth,
1093
- backdropFilter: z.value.style.chart.tooltip.backdropFilter,
1094
- smoothForce: z.value.style.chart.tooltip.smoothForce,
1095
- smoothSnapThreshold: z.value.style.chart.tooltip.smoothSnapThrehsold,
1096
- isA11yMode: R.value === "keyboard",
1097
- a11yPosition: St.value
1098
- }, {
1099
- "tooltip-before": A(() => [D(e.$slots, "tooltip-before", C(S({ ...Jt.value })), void 0, !0)]),
1100
- tooltip: A(() => [D(e.$slots, "tooltip", C(S({ ...Jt.value })), void 0, !0)]),
1101
- "tooltip-after": A(() => [D(e.$slots, "tooltip-after", C(S({ ...Jt.value })), void 0, !0)]),
1102
- _: 3
1103
- }, 8, [
1104
- "teleportTo",
1105
- "show",
1106
- "backgroundColor",
1107
- "color",
1108
- "fontSize",
1109
- "borderRadius",
1110
- "borderColor",
1111
- "borderWidth",
1112
- "backgroundOpacity",
1113
- "position",
1114
- "offsetY",
1115
- "parent",
1116
- "content",
1117
- "isCustom",
1118
- "isFullscreen",
1119
- "smooth",
1120
- "backdropFilter",
1121
- "smoothForce",
1122
- "smoothSnapThreshold",
1123
- "isA11yMode",
1124
- "a11yPosition"
1125
- ]),
1126
- ut.value && z.value.userOptions.buttons.table ? (T(), _(Ae(sn.value.component), we({ key: 7 }, sn.value.props, {
1127
- ref_key: "tableUnit",
1128
- ref: F,
1129
- onClose: cn
1130
- }), xe({
1131
- content: A(() => [(T(), _(k(ze), {
1132
- key: `table_${mt.value}`,
1133
- colNames: $.value.colNames,
1134
- head: $.value.head,
1135
- body: $.value.body,
1136
- config: $.value.config,
1137
- title: z.value.table.useDialog ? "" : sn.value.title,
1138
- withCloseButton: !z.value.table.useDialog,
1139
- isCursorPointer: B.value,
1140
- onClose: cn
1141
- }, {
1142
- th: A(({ th: e }) => [b("div", {
1143
- innerHTML: e,
1144
- style: {
1145
- display: "flex",
1146
- "align-items": "center"
1147
- }
1148
- }, null, 8, ct)]),
1149
- td: A(({ td: e }) => [Se(O(e.name || e), 1)]),
1150
- _: 1
1151
- }, 8, [
1152
- "colNames",
1153
- "head",
1154
- "body",
1155
- "config",
1156
- "title",
1157
- "withCloseButton",
1158
- "isCursorPointer"
1159
- ]))]),
1160
- _: 2
1161
- }, [z.value.table.useDialog ? {
1162
- name: "title",
1163
- fn: A(() => [Se(O(sn.value.title), 1)]),
1164
- key: "0"
1165
- } : void 0, z.value.table.useDialog ? {
1166
- name: "actions",
1167
- fn: A(() => [b("button", {
1168
- tabindex: "0",
1169
- class: "vue-ui-user-options-button",
1170
- onClick: t[0] ||= (e) => tn(z.value.userOptions.callbacks.csv),
1171
- style: w({ cursor: B.value ? "pointer" : "default" })
1172
- }, [Ce(k(Le), {
1173
- name: "fileCsv",
1174
- stroke: sn.value.props.color
1175
- }, null, 8, ["stroke"])], 4)]),
1176
- key: "1"
1177
- } : void 0]), 1040)) : v("", !0),
1178
- D(e.$slots, "skeleton", {}, () => [k(Tt) ? (T(), _(ce, { key: 0 })) : v("", !0)], !0)
1179
- ], 46, Ke));
1180
- }
1181
- }, [["__scopeId", "data-v-e1e7634e"]]);
1182
- //#endregion
1183
- export { Ge as n, lt as t };