vue-data-ui 3.23.1 → 3.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/dist/{PackageVersion-D6d8SCp9.js → PackageVersion-DXU7nRr9.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-hill.js +1 -1
  28. package/dist/components/vue-ui-history-plot.js +1 -1
  29. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  30. package/dist/components/vue-ui-kpi.js +1 -1
  31. package/dist/components/vue-ui-mini-loader.js +1 -1
  32. package/dist/components/vue-ui-molecule.js +1 -1
  33. package/dist/components/vue-ui-mood-radar.js +1 -1
  34. package/dist/components/vue-ui-nested-donuts.js +1 -1
  35. package/dist/components/vue-ui-onion.js +1 -1
  36. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  37. package/dist/components/vue-ui-quadrant.js +1 -1
  38. package/dist/components/vue-ui-quick-chart.js +1 -1
  39. package/dist/components/vue-ui-radar.js +1 -1
  40. package/dist/components/vue-ui-rating.js +1 -1
  41. package/dist/components/vue-ui-relation-circle.js +1 -1
  42. package/dist/components/vue-ui-ridgeline.js +1 -1
  43. package/dist/components/vue-ui-rings.js +1 -1
  44. package/dist/components/vue-ui-scatter.js +1 -1
  45. package/dist/components/vue-ui-skeleton.js +1 -1
  46. package/dist/components/vue-ui-smiley.js +1 -1
  47. package/dist/components/vue-ui-spark-trend.js +1 -1
  48. package/dist/components/vue-ui-sparkbar.js +1 -1
  49. package/dist/components/vue-ui-sparkgauge.js +1 -1
  50. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  51. package/dist/components/vue-ui-sparkline.js +1 -1
  52. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  53. package/dist/components/vue-ui-stackbar.js +1 -1
  54. package/dist/components/vue-ui-stackline.js +1 -1
  55. package/dist/components/vue-ui-strip-plot.js +1 -1
  56. package/dist/components/vue-ui-table-heatmap.js +1 -1
  57. package/dist/components/vue-ui-table-sparkline.js +1 -1
  58. package/dist/components/vue-ui-table.js +1 -1
  59. package/dist/components/vue-ui-thermometer.js +1 -1
  60. package/dist/components/vue-ui-timer.js +1 -1
  61. package/dist/components/vue-ui-tiremarks.js +1 -1
  62. package/dist/components/vue-ui-treemap.js +1 -1
  63. package/dist/components/vue-ui-vertical-bar.js +1 -1
  64. package/dist/components/vue-ui-waffle.js +1 -1
  65. package/dist/components/vue-ui-wheel.js +1 -1
  66. package/dist/components/vue-ui-word-cloud.js +1 -1
  67. package/dist/components/vue-ui-world.js +1 -1
  68. package/dist/components/vue-ui-xy-canvas.js +1 -1
  69. package/dist/components/vue-ui-xy.js +1 -1
  70. package/dist/{package-KvlL5CqE.js → package-bsfpO6y3.js} +1 -1
  71. package/dist/{render-common-oDYGTc5P.js → render-common-C0PEe9so.js} +1 -1
  72. package/dist/ssr/vue-ui-donut.js +1 -1
  73. package/dist/ssr/vue-ui-xy.js +1 -1
  74. package/dist/ssr.js +2 -2
  75. package/dist/style.css +1 -1
  76. package/dist/types/vue-data-ui.d.ts +6 -0
  77. package/dist/{useSvgExport-DH-FfcqQ.js → useChartExport-DNiwdPmb.js} +47 -1
  78. package/dist/{useConfig-D3scuR88.js → useConfig-DlNpz6P8.js} +6 -0
  79. package/dist/{useObjectBindings-Brg8mm5J.js → useObjectBindings-BeWS5v0i.js} +1 -1
  80. package/dist/utils.js +1 -1
  81. package/dist/{vue-data-ui-DGWDPCwC.js → vue-data-ui-BNxtW8pK.js} +68 -68
  82. package/dist/vue-data-ui.js +69 -69
  83. package/dist/{vue-ui-3d-bar-C_Su9fve.js → vue-ui-3d-bar-BYumVxZG.js} +164 -182
  84. package/dist/{vue-ui-accordion-BxGriZik.js → vue-ui-accordion-DegI2lzR.js} +1 -1
  85. package/dist/vue-ui-age-pyramid-tJx_hCsS.js +1241 -0
  86. package/dist/{vue-ui-annotator-CCtnM8Rv.js → vue-ui-annotator-DfG79D4r.js} +2 -2
  87. package/dist/vue-ui-bullet-DrWG4jRy.js +700 -0
  88. package/dist/{vue-ui-bump-CcdzJZ9n.js → vue-ui-bump-mKysp0KO.js} +213 -263
  89. package/dist/vue-ui-candlestick-PgKcBZdy.js +1837 -0
  90. package/dist/vue-ui-carousel-table-DRvycNBl.js +467 -0
  91. package/dist/vue-ui-chestnut-Dpklo-VE.js +2014 -0
  92. package/dist/vue-ui-chord-7PPVH_iG.js +1345 -0
  93. package/dist/vue-ui-circle-pack-DW4Os6_8.js +1636 -0
  94. package/dist/{vue-ui-cursor-BqHr0n1Z.js → vue-ui-cursor-DIt7vOwc.js} +2 -2
  95. package/dist/{vue-ui-dag-jMLVoQkb.js → vue-ui-dag-Cl0WdSLb.js} +492 -515
  96. package/dist/{vue-ui-dashboard-DVAUFETR.js → vue-ui-dashboard-BwxRLR4E.js} +65 -65
  97. package/dist/{vue-ui-digits-Dy4gG6qm.js → vue-ui-digits-Bp1OH_t1.js} +2 -2
  98. package/dist/{vue-ui-donut-C0cWRLbU.js → vue-ui-donut-BZUT7QYt.js} +333 -359
  99. package/dist/vue-ui-donut-evolution-CQy3ZKXk.js +1549 -0
  100. package/dist/{vue-ui-donut-CYpxGBhl.js → vue-ui-donut-y6tOAVyY.js} +2 -2
  101. package/dist/{vue-ui-dumbbell-DxVbRjKR.js → vue-ui-dumbbell-BtKZcAOV.js} +378 -428
  102. package/dist/{vue-ui-flow-DWaZF4FS.js → vue-ui-flow-BF_cndsv.js} +182 -207
  103. package/dist/vue-ui-funnel-z3AeiDu6.js +750 -0
  104. package/dist/{vue-ui-galaxy-CWBP9oH9.js → vue-ui-galaxy-ClWaSOmM.js} +308 -334
  105. package/dist/vue-ui-gauge-CJstpakj.js +932 -0
  106. package/dist/{vue-ui-geo-ZA7CBy8f.js → vue-ui-geo-B1tOD3HC.js} +362 -413
  107. package/dist/{vue-ui-gizmo-SQCou0bQ.js → vue-ui-gizmo-foatosAv.js} +2 -2
  108. package/dist/{vue-ui-heatmap-CHd9gs_p.js → vue-ui-heatmap-By33A9dZ.js} +292 -315
  109. package/dist/vue-ui-hill-ewqkK9s5.js +1745 -0
  110. package/dist/{vue-ui-history-plot-BwnlC1mx.js → vue-ui-history-plot-FEIwXlsz.js} +258 -283
  111. package/dist/{vue-ui-horizontal-bar-BUar2HUH.js → vue-ui-horizontal-bar-D51sAeVu.js} +273 -298
  112. package/dist/{vue-ui-kpi-BF_9WWoo.js → vue-ui-kpi-y3EkgqJQ.js} +2 -2
  113. package/dist/{vue-ui-mini-loader-CvfukjXi.js → vue-ui-mini-loader-CtTewZJG.js} +1 -1
  114. package/dist/vue-ui-molecule-paWHp18h.js +935 -0
  115. package/dist/{vue-ui-mood-radar-_zpbmvJs.js → vue-ui-mood-radar-wBRTZI5k.js} +337 -386
  116. package/dist/vue-ui-nested-donuts-CB-HOLo2.js +1503 -0
  117. package/dist/{vue-ui-onion-CB5RYIy5.js → vue-ui-onion-B2Q2n55x.js} +257 -282
  118. package/dist/{vue-ui-parallel-coordinate-plot-BUwt-apg.js → vue-ui-parallel-coordinate-plot-GpkXiIZA.js} +190 -215
  119. package/dist/{vue-ui-quadrant-CoROD3er.js → vue-ui-quadrant-DOPuejDE.js} +213 -243
  120. package/dist/{vue-ui-quick-chart-BcH7eY4-.js → vue-ui-quick-chart-CgHX9njq.js} +52 -61
  121. package/dist/{vue-ui-radar-DGbaXGme.js → vue-ui-radar-BLvG-_zE.js} +343 -370
  122. package/dist/{vue-ui-rating-Bo3zD3yW.js → vue-ui-rating-BDVSVFA0.js} +8 -9
  123. package/dist/vue-ui-relation-circle-plOXwxJ5.js +903 -0
  124. package/dist/{vue-ui-ridgeline-BCaGcyfk.js → vue-ui-ridgeline-BbrnXvBo.js} +267 -317
  125. package/dist/{vue-ui-rings-BJUBn8_b.js → vue-ui-rings-B3cKfMWy.js} +407 -432
  126. package/dist/vue-ui-scatter-BY7waF2T.js +2403 -0
  127. package/dist/{vue-ui-skeleton-EeJcGbCo.js → vue-ui-skeleton-DwKxd7fk.js} +2 -2
  128. package/dist/{vue-ui-smiley-D0gibt5c.js → vue-ui-smiley-5iHJeTPc.js} +62 -63
  129. package/dist/{vue-ui-spark-trend-BRoQ7JpQ.js → vue-ui-spark-trend-MpvrV5Wd.js} +2 -2
  130. package/dist/{vue-ui-sparkbar-DFp2k7-7.js → vue-ui-sparkbar-s-2rBmEz.js} +97 -100
  131. package/dist/{vue-ui-sparkgauge-D0Bq85Hs.js → vue-ui-sparkgauge-B-BYVv4p.js} +2 -2
  132. package/dist/{vue-ui-sparkhistogram-BPln7v63.js → vue-ui-sparkhistogram-D7D4NHdi.js} +7 -8
  133. package/dist/{vue-ui-sparkline-C6Q45Dqp.js → vue-ui-sparkline-RbeYtLWp.js} +6 -7
  134. package/dist/{vue-ui-sparkstackbar-CjK4bcQg.js → vue-ui-sparkstackbar-ohN7mtbg.js} +191 -195
  135. package/dist/{vue-ui-stackbar-Ca8EPf3e.js → vue-ui-stackbar-D2bpvQYt.js} +524 -549
  136. package/dist/{vue-ui-stackline-Pz5WWlWT.js → vue-ui-stackline-Bo1oE8yq.js} +570 -595
  137. package/dist/vue-ui-strip-plot-CZ-C4a5x.js +1734 -0
  138. package/dist/{vue-ui-table-Bjg-ujJu.js → vue-ui-table-3PPiJPV6.js} +3 -3
  139. package/dist/{vue-ui-table-heatmap-ljeYW8Wc.js → vue-ui-table-heatmap-D1bbPXKG.js} +48 -49
  140. package/dist/{vue-ui-table-sparkline-iRFmtK5S.js → vue-ui-table-sparkline-l1cUX3ny.js} +7 -9
  141. package/dist/{vue-ui-thermometer-D8uiOaeA.js → vue-ui-thermometer-DltAELO7.js} +240 -261
  142. package/dist/{vue-ui-timer-CYw983oL.js → vue-ui-timer-DWNdx47q.js} +2 -2
  143. package/dist/vue-ui-tiremarks-GYhji_fa.js +538 -0
  144. package/dist/{vue-ui-treemap-h4VbnqPA.js → vue-ui-treemap-DjNlnOG5.js} +498 -524
  145. package/dist/vue-ui-waffle-BAA9EX6O.js +1386 -0
  146. package/dist/{vue-ui-wheel-tLvJadk5.js → vue-ui-wheel-DrefGLos.js} +188 -209
  147. package/dist/{vue-ui-word-cloud-BjpGSsod.js → vue-ui-word-cloud-CQZ8AyOi.js} +375 -398
  148. package/dist/{vue-ui-world-B4fCS3jN.js → vue-ui-world-Y7a3VEjq.js} +428 -453
  149. package/dist/{vue-ui-xy-7ZT9IRD8.js → vue-ui-xy-CJcdttNL.js} +857 -883
  150. package/dist/{vue-ui-xy-gyNS0yH0.js → vue-ui-xy-DPxtkYGc.js} +2 -2
  151. package/dist/{vue-ui-xy-canvas-BnLEwBpi.js → vue-ui-xy-canvas-1rbwMA1m.js} +13 -12
  152. package/package.json +1 -1
  153. package/dist/Slicer-CIk57nL4.js +0 -1163
  154. package/dist/vue-ui-age-pyramid-D4k1MkAL.js +0 -1264
  155. package/dist/vue-ui-bullet-DLZr2Uk8.js +0 -724
  156. package/dist/vue-ui-candlestick-EEEt7ORC.js +0 -1866
  157. package/dist/vue-ui-carousel-table-BicIpNAD.js +0 -463
  158. package/dist/vue-ui-chestnut-BI7mC5dd.js +0 -2068
  159. package/dist/vue-ui-chord-DXaq8ZMu.js +0 -1396
  160. package/dist/vue-ui-circle-pack-XHJBMG51.js +0 -1659
  161. package/dist/vue-ui-donut-evolution-DwR47A2r.js +0 -1603
  162. package/dist/vue-ui-funnel-Bmpx5GHR.js +0 -797
  163. package/dist/vue-ui-gauge-ByE_txav.js +0 -953
  164. package/dist/vue-ui-hill-BT183G-_.js +0 -1768
  165. package/dist/vue-ui-molecule-Bi2CKHer.js +0 -958
  166. package/dist/vue-ui-nested-donuts-qHZAJ70u.js +0 -1528
  167. package/dist/vue-ui-relation-circle-DaU1eTsG.js +0 -925
  168. package/dist/vue-ui-scatter-Pcft1bUt.js +0 -2428
  169. package/dist/vue-ui-strip-plot-Dw4MGDSO.js +0 -1757
  170. package/dist/vue-ui-tiremarks-CekiW2Ru.js +0 -559
  171. package/dist/vue-ui-waffle-cu0w_s6L.js +0 -1412
@@ -1,1768 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, D as n, Kt as r, Pt as i, X as a, a as o, i as s, q as c, r as l, x as u } from "./lib-Bttd6u5E.js";
3
- import { n as d, t as f } from "./useHints-Dq_w2E8B.js";
4
- import { t as p } from "./useConfig-D3scuR88.js";
5
- import { t as m } from "./usePrinter-DN5bYhTG.js";
6
- import { t as h } from "./useSvgExport-DH-FfcqQ.js";
7
- import { t as g } from "./useNestedProp-vPNvh7rV.js";
8
- import { t as ee } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as te } from "./useTransitions-g_zBREk2.js";
10
- import { t as ne } from "./img-Bnokohej.js";
11
- import { n as re } from "./Title-BE3qg9xl.js";
12
- import { t as ie } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
- import { t as ae } from "./useUserOptionState-DK-_1ddE.js";
14
- import { t as oe } from "./vue_ui_hill-dnltu0L-.js";
15
- import { Fragment as _, computed as v, createBlock as se, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as ce, createVNode as le, defineAsyncComponent as ue, guardReactiveProps as S, nextTick as de, normalizeClass as C, normalizeProps as w, normalizeStyle as T, onBeforeUnmount as fe, onMounted as pe, openBlock as E, ref as D, renderList as me, renderSlot as O, shallowRef as he, toDisplayString as k, unref as A, useTemplateRef as ge, watch as _e, withCtx as j, withKeys as ve, withModifiers as ye } from "vue";
16
- //#region src/components/vue-ui-hill.vue
17
- var be = /* @__PURE__ */ e({ default: () => mt }), xe = ["id", "data-editing"], Se = {
18
- key: 0,
19
- ref: "chartTitle",
20
- style: "width:100%;background:transparent;padding-bottom:24px"
21
- }, Ce = {
22
- key: 3,
23
- class: "vue-ui-hill__toolbar",
24
- "data-dom-to-png-ignore": ""
25
- }, we = ["viewBox"], Te = ["width", "height"], Ee = [
26
- "x1",
27
- "x2",
28
- "y1",
29
- "y2",
30
- "stroke",
31
- "stroke-width",
32
- "stroke-dasharray"
33
- ], De = [
34
- "x1",
35
- "x2",
36
- "y1",
37
- "y2",
38
- "stroke",
39
- "stroke-width",
40
- "stroke-dasharray"
41
- ], Oe = [
42
- "d",
43
- "stroke",
44
- "stroke-width",
45
- "stroke-dasharray"
46
- ], ke = {
47
- key: 0,
48
- "pointer-events": "none"
49
- }, Ae = [
50
- "d",
51
- "stroke",
52
- "stroke-width",
53
- "stroke-dasharray"
54
- ], je = [
55
- "cx",
56
- "cy",
57
- "r",
58
- "fill",
59
- "stroke",
60
- "stroke-width"
61
- ], Me = [
62
- "transform",
63
- "font-size",
64
- "fill",
65
- "stroke"
66
- ], Ne = [
67
- "transform",
68
- "data-datapoint-index",
69
- "data-datapoint-id",
70
- "tabindex",
71
- "aria-valuenow",
72
- "aria-valuetext",
73
- "aria-label",
74
- "onFocus",
75
- "onBlur",
76
- "onKeydown",
77
- "onPointerenter",
78
- "onPointerleave",
79
- "onClick"
80
- ], Pe = ["r", "onPointerdown"], Fe = [
81
- "r",
82
- "fill",
83
- "stroke",
84
- "stroke-width"
85
- ], Ie = ["stroke", "stroke-width"], Le = ["d"], Re = [
86
- "x",
87
- "y",
88
- "text-anchor",
89
- "fill",
90
- "font-size",
91
- "font-weight",
92
- "stroke",
93
- "stroke-width"
94
- ], ze = [
95
- "transform",
96
- "tabindex",
97
- "aria-label",
98
- "aria-expanded",
99
- "onClick",
100
- "onFocus",
101
- "onKeydown"
102
- ], Be = {
103
- key: 0,
104
- class: "vue-ui-hill__stack-overflow-collapse-ghosts",
105
- "pointer-events": "none",
106
- "aria-hidden": "true"
107
- }, Ve = [
108
- "cx",
109
- "cy",
110
- "r",
111
- "fill",
112
- "stroke",
113
- "stroke-width"
114
- ], He = ["from", "dur"], Ue = ["from", "dur"], We = [
115
- "from",
116
- "to",
117
- "dur"
118
- ], Ge = ["dur"], Ke = ["r"], qe = [
119
- "x",
120
- "y",
121
- "width",
122
- "height",
123
- "fill",
124
- "stroke",
125
- "stroke-width"
126
- ], Je = ["stroke", "stroke-width"], Ye = ["d"], Xe = [
127
- "y",
128
- "fill",
129
- "font-size",
130
- "font-weight",
131
- "stroke"
132
- ], Ze = [
133
- "x",
134
- "y",
135
- "fill",
136
- "font-size",
137
- "font-weight",
138
- "letter-spacing"
139
- ], Qe = [
140
- "x",
141
- "y",
142
- "fill",
143
- "font-size",
144
- "font-weight",
145
- "letter-spacing"
146
- ], $e = [
147
- "x",
148
- "y",
149
- "rx",
150
- "width",
151
- "height",
152
- "fill"
153
- ], et = ["id"], tt = [
154
- "x",
155
- "y",
156
- "width",
157
- "height",
158
- "rx",
159
- "ry"
160
- ], nt = ["clip-path"], rt = [
161
- "width",
162
- "x",
163
- "y",
164
- "fill",
165
- "height",
166
- "onPointerenter",
167
- "onPointerleave"
168
- ], it = [
169
- "x1",
170
- "x2",
171
- "y1",
172
- "y2",
173
- "stroke",
174
- "stroke-width"
175
- ], at = [
176
- "x",
177
- "y",
178
- "width",
179
- "height",
180
- "rx",
181
- "ry",
182
- "stroke",
183
- "stroke-width"
184
- ], ot = [
185
- "x",
186
- "y",
187
- "fill",
188
- "font-size"
189
- ], st = ["aria-label", "onKeydown"], ct = {
190
- key: 0,
191
- class: "vue-ui-hill__stack-overflow-menu-title"
192
- }, lt = [
193
- "disabled",
194
- "aria-label",
195
- "onClick"
196
- ], ut = { class: "vue-ui-hill__stack-overflow-menu-label" }, dt = { class: "vue-ui-hill__stack-overflow-menu-value" }, ft = {
197
- key: 6,
198
- class: "vue-data-ui-watermark"
199
- }, pt = {
200
- key: 7,
201
- class: "vue-ui-hill__loading",
202
- "data-dom-to-png-ignore": ""
203
- }, mt = /*#__PURE__*/ ie({
204
- __name: "vue-ui-hill",
205
- props: {
206
- config: {
207
- type: Object,
208
- default() {
209
- return {};
210
- }
211
- },
212
- dataset: {
213
- type: Array,
214
- default() {
215
- return [];
216
- }
217
- }
218
- },
219
- emits: [
220
- "edit",
221
- "save",
222
- "cancel",
223
- "copyAlt",
224
- "change",
225
- "dragStart",
226
- "dragEnd",
227
- "datapointEnter",
228
- "datapointLeave",
229
- "selectDatapoint"
230
- ],
231
- setup(e, { expose: ie, emit: be }) {
232
- let mt = ue(() => import("./HillActions-BD9j_sOU.js")), ht = ue(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), gt = ue(() => import("./PackageVersion-D6d8SCp9.js").then((e) => e.t)), _t = ue(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), vt = ue(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), { vue_ui_hill: yt } = p(), { isThemeValid: bt, warnInvalidTheme: xt } = ee(), St = e, Ct = D(c()), wt = he(null), Tt = ge("hillChartRef"), M = ge("svgRef"), Et = ge("overflowMenuRef"), Dt = ge("userOptionsRef"), Ot = D(!1), kt = D(!1), At = D(0), jt = be;
233
- function Mt() {
234
- let e = g({
235
- userConfig: St.config,
236
- defaultConfig: yt
237
- }), t = {}, n = e.theme;
238
- if (!n) t = e;
239
- else if (!bt.value(e)) xt(e), t = e;
240
- else {
241
- let i = g({
242
- userConfig: oe[n] || St.config,
243
- defaultConfig: e
244
- });
245
- t = {
246
- ...g({
247
- userConfig: St.config,
248
- defaultConfig: i
249
- }),
250
- customPalette: e.customPalette.length ? e.customPalette : r[n] || Xt
251
- };
252
- }
253
- return t;
254
- }
255
- let N = D(Mt());
256
- d({
257
- config: () => N.value,
258
- dataset: () => St.dataset,
259
- component: "VueUiHill",
260
- rules: [f.emptyArray, f.noHint]
261
- });
262
- let { transitionEnabled: Nt } = te({
263
- config: () => N.value.transitions,
264
- dataset: () => St.dataset
265
- }), { userOptionsVisible: Pt, setUserOptionsVisibility: Ft, keepUserOptionState: It } = ae({ config: N.value });
266
- function Lt() {
267
- Ft(!0);
268
- }
269
- function Rt() {
270
- Ft(!1), Jn.value = null, Q.value = null, qn.value = null;
271
- }
272
- let { isPrinting: zt, isImaging: Bt, generatePdf: Vt, generateImage: Ht } = m({
273
- elementId: `hill_${Ct.value}`,
274
- fileName: N.value.style.chart.title.text || "vue-ui-hill",
275
- options: N.value.userOptions.print
276
- }), Ut = v(() => N.value.userOptions.useCursorPointer), Wt = D(0), Gt = D(!1);
277
- function Kt(e) {
278
- Gt.value = e, Wt.value += 1;
279
- }
280
- let qt = D(!1);
281
- function Jt() {
282
- qt.value = !qt.value;
283
- }
284
- let Yt = v(() => N.value.userOptions.position === "left" ? "right" : "left");
285
- _e(() => St.config, () => {
286
- wt.value = null, N.value = Mt(), Wt.value += 1, P.value !== N.value.editing && (P.value = N.value.editing && !N.value.readonly);
287
- }, { deep: !0 });
288
- let Xt = v(() => {
289
- let e = N.value.customPalette;
290
- return Array.isArray(e) && e.length ? e : i;
291
- });
292
- function Zt(e) {
293
- let t = Number(e);
294
- return Number.isFinite(t) ? Math.min(1, Math.max(0, t)) : 0;
295
- }
296
- function Qt(e) {
297
- if (e <= 0) return "todo";
298
- if (e >= 1) return "done";
299
- let t = .5, n = Math.min(t, Math.max(0, Number(N.value.interaction.peakTolerance) || 0)), r = t - n, i = t + n;
300
- return e >= r && e <= i ? "top" : e < t ? "left" : "right";
301
- }
302
- function $t(e, t) {
303
- let n = e && typeof e == "object" ? e : {}, r = `Item ${t + 1}`, i = String(n.name ?? n.label ?? r), a = Zt(n.position ?? n.value ?? 0);
304
- return {
305
- ...n,
306
- id: String(n.id ?? `${i}-${t}`),
307
- name: i,
308
- label: String(n.label ?? i),
309
- position: a,
310
- color: n.color || Xt.value[t % Xt.value.length],
311
- muted: !!n.muted,
312
- disabled: !!n.disabled,
313
- status: Qt(e.position),
314
- labelSide: [
315
- "left",
316
- "right",
317
- "auto"
318
- ].includes(n.labelSide) ? n.labelSide : "auto",
319
- __index: t
320
- };
321
- }
322
- let en = v(() => Array.isArray(St.dataset) ? St.dataset.map($t) : []);
323
- function tn(e) {
324
- return e.map((e) => ({ ...e }));
325
- }
326
- function nn(e) {
327
- let { __index: t, ...n } = e;
328
- return Object.prototype.hasOwnProperty.call(n, "value") && (n.value = n.position), n;
329
- }
330
- function rn(e = F.value) {
331
- return e.map(nn);
332
- }
333
- let an = v(() => N.value.editing && !N.value.readonly), P = D(an.value), F = D(tn(en.value)), I = D(null);
334
- _e(en, (e) => {
335
- P.value || (wt.value = null, F.value = tn(e));
336
- }, { deep: !0 });
337
- let L = v(() => !N.value.readonly);
338
- _e(L, (e) => {
339
- e || (I.value = null, wt.value = null, P.value = !1, F.value = tn(en.value));
340
- });
341
- function R(e, t) {
342
- jt(e, t);
343
- let n = N.value.events?.[e];
344
- typeof n == "function" && n(t);
345
- }
346
- let z = v(() => N.value.style.chart), on = v(() => z.value.layout), B = v(() => on.value.hill), V = v(() => on.value.plots), H = v(() => on.value.labels.item), U = v(() => on.value.labels.phases), W = v(() => z.value.toolbar), G = v(() => on.value.stackbar), K = v(() => {
347
- let e = V.value.stacking?.overflow || {}, t = Math.max(0, Number(V.value.radius) || 0);
348
- return {
349
- show: e.show !== !1,
350
- marker: {
351
- radius: Math.max(4, Number(e.marker?.radius) || t),
352
- fill: e.marker.fill,
353
- stroke: e.marker?.stroke || V.value.stroke,
354
- strokeWidth: e.marker.strokeWidth,
355
- color: e.marker.labelColor,
356
- fontSize: e.marker.fontSize,
357
- bold: e.marker?.bold !== !1,
358
- offsetY: e.marker.labelOffsetY
359
- },
360
- hysteresis: t * 1.5,
361
- transitionDuration: Nt.value ? e.transitionDuration : 0,
362
- menu: {
363
- width: Math.max(160, Number(e.menu?.width) || 220),
364
- maxHeight: Math.max(96, Number(e.menu?.maxHeight) || 220),
365
- backgroundColor: e.menu?.backgroundColor || z.value.backgroundColor,
366
- color: e.menu?.color || z.value.color,
367
- borderColor: e.menu?.borderColor || V.value.stroke,
368
- borderRadius: Math.max(0, Number(e.menu?.borderRadius) || 6)
369
- }
370
- };
371
- });
372
- function sn(e, t, n = 1) {
373
- let r = Number(e);
374
- return Number.isFinite(r) ? Math.min(n, Math.max(0, r)) : t;
375
- }
376
- let q = v(() => {
377
- let e = B.value.geometry || {}, t = Math.max(0, Number(z.value.width) || 0), n = Math.max(0, Number(z.value.height) || 0), r = sn(e.horizontalPaddingRatio, .02, .49), i = sn(e.topPaddingRatio, .12, .49), a = sn(e.bottomPaddingRatio, .2, .49), o = sn(e.curvature, .65), s = t * r, c = t / 2, l = t * (1 - r), u = n * i, d = n * (1 - a), f = c - s, p = l - c, m = s + f * o, h = c + p * (1 - o);
378
- return {
379
- startX: s,
380
- centerX: c,
381
- endX: l,
382
- baseY: d,
383
- peakY: u,
384
- width: f + p,
385
- left: [
386
- {
387
- x: s,
388
- y: d
389
- },
390
- {
391
- x: m,
392
- y: d
393
- },
394
- {
395
- x: m,
396
- y: u
397
- },
398
- {
399
- x: c,
400
- y: u
401
- }
402
- ],
403
- right: [
404
- {
405
- x: c,
406
- y: u
407
- },
408
- {
409
- x: h,
410
- y: u
411
- },
412
- {
413
- x: h,
414
- y: d
415
- },
416
- {
417
- x: l,
418
- y: d
419
- }
420
- ]
421
- };
422
- }), cn = v(() => {
423
- let { left: e, right: t } = q.value;
424
- return [
425
- `M${e[0].x} ${e[0].y}`,
426
- `C${e[1].x} ${e[1].y} ${e[2].x} ${e[2].y} ${e[3].x} ${e[3].y}`,
427
- `C${t[1].x} ${t[1].y} ${t[2].x} ${t[2].y} ${t[3].x} ${t[3].y}`
428
- ].join(" ");
429
- });
430
- function ln(e, t, n, r, i) {
431
- let a = 1 - i;
432
- return a ** 3 * e + 3 * a ** 2 * i * t + 3 * a * i ** 2 * n + i ** 3 * r;
433
- }
434
- function un(e, t, n, r, i) {
435
- let a = 1 - i;
436
- return 3 * a ** 2 * (t - e) + 6 * a * i * (n - t) + 3 * i ** 2 * (r - n);
437
- }
438
- function dn(e) {
439
- let t = Zt(e), { startX: n, centerX: r, endX: i, left: a, right: o } = q.value, s = n + (t - 0) / 1 * (i - n), c = s <= r ? a : o, l = 0, u = 1;
440
- for (let e = 0; e < 28; e += 1) {
441
- let e = (l + u) / 2;
442
- ln(c[0].x, c[1].x, c[2].x, c[3].x, e) < s ? l = e : u = e;
443
- }
444
- let d = (l + u) / 2, f = ln(c[0].y, c[1].y, c[2].y, c[3].y, d), p = un(c[0].x, c[1].x, c[2].x, c[3].x, d), m = un(c[0].y, c[1].y, c[2].y, c[3].y, d), h = Math.hypot(p, m) || 1;
445
- return {
446
- x: s,
447
- y: f,
448
- normalX: m / h,
449
- normalY: -p / h
450
- };
451
- }
452
- function fn(e) {
453
- let t = Number(V.value.stacking.overlapThresholdRatio);
454
- return e * (2 - (Number.isFinite(t) ? Math.min(2, Math.max(0, t)) : .5));
455
- }
456
- function pn(e, t) {
457
- let n = /* @__PURE__ */ new Map(), r = V.value.stacking;
458
- if (e.forEach((e) => {
459
- n.set(e.id, {
460
- position: e.position,
461
- index: 0,
462
- size: 1,
463
- stackId: `stack:${e.id}`
464
- });
465
- }), !r.show || e.length < 2 || t <= 0) return n;
466
- let i = fn(t), a = e.map((e, t) => ({
467
- datapoint: e,
468
- index: t,
469
- point: dn(e.position)
470
- })).sort((e, t) => e.point.x - t.point.x || e.datapoint.position - t.datapoint.position || e.index - t.index), o = 0;
471
- for (; o < a.length;) {
472
- let e = [a[o]], t = o + 1;
473
- for (; t < a.length;) {
474
- let n = e[e.length - 1], r = a[t];
475
- if (Math.hypot(r.point.x - n.point.x, r.point.y - n.point.y) >= i) break;
476
- e.push(r), t += 1;
477
- }
478
- if (e.length > 1) {
479
- let t = e[0].datapoint.position, r = `stack:${e.map(({ datapoint: e }) => e.id).sort().join("|")}`;
480
- e.forEach(({ datapoint: i }, a) => {
481
- n.set(i.id, {
482
- position: t,
483
- index: a,
484
- size: e.length,
485
- stackId: r
486
- });
487
- });
488
- }
489
- o = t;
490
- }
491
- return n;
492
- }
493
- function mn(e) {
494
- let t = e + Math.max(0, Number(V.value.strokeWidth) || 0) / 2, n = V.value.stacking.gap ?? e / 2;
495
- return t * 2 + n;
496
- }
497
- let hn = D(null), J = D(null), Y = D(null), gn = D(null), _n = D(null), vn = /* @__PURE__ */ new Set(), yn = null, X = null, Z = null;
498
- function bn(e) {
499
- let t = Math.max(0, Number(V.value.strokeWidth) || 0), n = V.value.shadow.show ? Math.max(0, Number(V.value.shadow.blur) || 0) + Math.max(0, -(Number(V.value.shadow.offsetY) || 0)) : 0;
500
- return e + t / 2 + n;
501
- }
502
- function xn(e, t, n) {
503
- if (t <= 1) return e - bn(n);
504
- let r = mn(n);
505
- return e - (t - 1) * r - bn(n);
506
- }
507
- function Sn(e, t, n, r) {
508
- if (n <= 1) return vn.delete(e), !1;
509
- let i = xn(t, n, r), a = vn.has(e), o = K.value.hysteresis, s = a ? i < o : i < 0;
510
- return s ? vn.add(e) : vn.delete(e), s;
511
- }
512
- let Cn = v(() => {
513
- let e = Math.max(0, Number(V.value.radius) || 0), t = mn(e), n = pn(F.value, e), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = [], o = /* @__PURE__ */ new Set(), s = I.value?.id ?? null;
514
- K.value.show || vn.clear(), F.value.forEach((e) => {
515
- let t = n.get(e.id) || {
516
- position: e.position,
517
- index: 0,
518
- size: 1,
519
- stackId: `stack:${e.id}`
520
- };
521
- r.has(t.stackId) || r.set(t.stackId, []), r.get(t.stackId).push({
522
- datapoint: e,
523
- stack: t
524
- });
525
- });
526
- let c = new Set(r.keys());
527
- return vn.forEach((e) => {
528
- c.has(e) || vn.delete(e);
529
- }), r.forEach((n, r) => {
530
- let c = [...n].sort((e, t) => e.stack.index - t.stack.index || e.datapoint.__index - t.datapoint.__index), l = c.reduce((e, t) => e + (Number(t.datapoint.position) || 0), 0) / c.length, u = dn(l);
531
- if (!(K.value.show && Sn(r, u.y, c.length, e))) {
532
- c.forEach((e) => {
533
- i.set(e.datapoint.id, {
534
- hidden: !1,
535
- displayIndex: e.stack.index,
536
- stackId: r,
537
- stackSize: c.length,
538
- promotedFromOverflow: !1,
539
- renderPosition: e.stack.position
540
- });
541
- });
542
- return;
543
- }
544
- c.forEach(({ datapoint: e }) => {
545
- o.add(e.id);
546
- });
547
- let d = s ? c.find(({ datapoint: e }) => e.id === s) : null, f = c.find(({ datapoint: e }) => e.id === hn.value), p = d || f || null, m = p ? c.filter(({ datapoint: e }) => e.id !== p.datapoint.id) : c, h = J.value, g = !!(f && h?.datapointId === f.datapoint.id && !h.moved), ee = m.length ? g ? l : m.reduce((e, t) => e + (Number(t.datapoint.position) || 0), 0) / m.length : l, te = dn(ee);
548
- c.forEach((e) => {
549
- let t = p?.datapoint.id === e.datapoint.id, n = t && f?.datapoint.id === e.datapoint.id;
550
- i.set(e.datapoint.id, {
551
- hidden: !t,
552
- displayIndex: +!!t,
553
- stackId: r,
554
- stackSize: c.length,
555
- promotedFromOverflow: n,
556
- renderPosition: ee
557
- });
558
- }), m.length && a.push({
559
- stackId: r,
560
- anchorPosition: ee,
561
- x: te.x,
562
- y: te.y,
563
- hiddenCount: m.length,
564
- hiddenDatapoints: m.map(({ datapoint: e }) => e),
565
- memberIds: c.map(({ datapoint: e }) => e.id),
566
- collapseDatapoints: m.map(({ datapoint: e, stack: n }) => {
567
- let r = dn(n.position);
568
- return {
569
- id: e.id,
570
- color: e.color,
571
- relativeX: r.x - te.x,
572
- relativeY: r.y - n.index * t - te.y
573
- };
574
- })
575
- });
576
- }), {
577
- layoutMap: n,
578
- displayMap: i,
579
- markers: a,
580
- overflowMemberIds: o
581
- };
582
- });
583
- function wn(e) {
584
- let t = En.value.filter((e) => !e.isStackOverflowHidden), n = t.find((t) => t.id === e), r = new Map(t.filter((t) => t.id !== e).map((e) => [e.id, {
585
- x: e.x,
586
- y: e.y
587
- }]));
588
- if (!n || !V.value.stacking.show) return r;
589
- let i = t.filter((e) => Math.abs(e.x - n.x) < .001).sort((e, t) => t.y - e.y || e.datasetIndex - t.datasetIndex);
590
- if (i.length < 2) return r;
591
- let a = mn(Math.max(0, Number(V.value.radius) || 0)), o = Math.max(...i.map((e) => e.y));
592
- return i.filter((t) => t.id !== e).forEach((e, t) => {
593
- r.set(e.id, {
594
- x: n.x,
595
- y: o - t * a
596
- });
597
- }), r;
598
- }
599
- function Tn() {
600
- return new Map(En.value.filter((e) => !e.isStackOverflowHidden).map((e) => [e.id, {
601
- x: e.x,
602
- y: e.y
603
- }]));
604
- }
605
- let En = v(() => {
606
- let e = Math.max(0, Number(V.value.radius) || 0), { layoutMap: t, displayMap: n, markers: r } = Cn.value, i = mn(e), a = I.value, o = a?.stationaryLayout, s = o instanceof Map ? o : wt.value instanceof Map ? wt.value : null, c = null;
607
- if (a && o instanceof Map && V.value.stacking.show && e > 0) {
608
- let t = F.value.find((e) => e.id === a.id);
609
- if (t) {
610
- let n = r.find((e) => e.memberIds.includes(t.id));
611
- if (n) c = {
612
- x: n.x,
613
- y: n.y - i
614
- };
615
- else {
616
- let n = dn(t.position), r = fn(e), s = F.value.filter((e) => e.id !== a.id && o.has(e.id)).map((e) => {
617
- let t = dn(e.position);
618
- return {
619
- datapoint: e,
620
- distance: Math.hypot(t.x - n.x, t.y - n.y)
621
- };
622
- }).filter(({ distance: e }) => e < r).sort((e, t) => e.distance - t.distance)[0];
623
- if (s) {
624
- let e = o.get(s.datapoint.id), t = [...o.values()].filter((t) => Math.abs(t.x - e.x) < .001), n = Math.min(e.y, ...t.map((e) => e.y));
625
- c = {
626
- x: e.x,
627
- y: n - i
628
- };
629
- } else c = n;
630
- }
631
- }
632
- }
633
- return F.value.map((e, r) => {
634
- let o = t.get(e.id) || {
635
- position: e.position,
636
- index: 0,
637
- size: 1,
638
- stackId: `stack:${e.id}`
639
- }, l = n.get(e.id) || {
640
- hidden: !1,
641
- displayIndex: o.index,
642
- stackId: o.stackId,
643
- stackSize: o.size,
644
- renderPosition: o.position
645
- }, d = dn(l.renderPosition ?? o.position), f = e.id !== a?.id && !l.promotedFromOverflow && s instanceof Map ? s.get(e.id) : null, p = e.id === a?.id && c ? c : f || {
646
- x: d.x,
647
- y: d.y - l.displayIndex * i
648
- }, m = e.labelSide === "auto" ? null : e.labelSide, h = u(H.value.autoSideThreshold, .5, 1), g = m || (e.position > h ? "left" : "right"), ee = Math.abs(Number(H.value.offsetX) || 0) + V.value.radius + H.value.fontSize / 2;
649
- return {
650
- ...e,
651
- datasetIndex: r,
652
- x: p.x,
653
- y: p.y,
654
- stackId: l.stackId,
655
- stackSize: l.stackSize,
656
- stackDisplayIndex: l.displayIndex,
657
- isStackOverflowHidden: l.hidden,
658
- isPromotedFromStackOverflow: l.promotedFromOverflow,
659
- labelSide: g,
660
- labelX: g === "left" ? -ee : ee,
661
- textAnchor: g === "left" ? "end" : "start"
662
- };
663
- });
664
- });
665
- function Dn(e) {
666
- return F.value.find((t) => t.id === e);
667
- }
668
- function On(e, t) {
669
- let n = Zt(t), r;
670
- F.value = F.value.map((t) => t.id === e ? (r = {
671
- ...t,
672
- position: n
673
- }, r) : t), r && (mr(r.id, r.position), R("change", {
674
- datapoint: nn(r),
675
- dataset: rn()
676
- }));
677
- }
678
- function kn(e) {
679
- let t = M.value;
680
- if (!t) return null;
681
- let n = t.getScreenCTM();
682
- if (!n) return null;
683
- let r = t.createSVGPoint();
684
- r.x = e, r.y = 0;
685
- let i = r.matrixTransform(n.inverse()), { startX: a, endX: o } = q.value;
686
- return Zt(0 + (i.x - a) / (o - a) * 1);
687
- }
688
- function An() {
689
- L.value && (Y.value = null, hn.value = null, J.value = null, _n.value = null, sr(), wt.value = null, F.value = tn(en.value), P.value = !0, R("edit", rn()));
690
- }
691
- function jn() {
692
- let e = rn();
693
- Y.value = null, hn.value = null, J.value = null, _n.value = null, sr(), I.value = null, P.value = !1, R("save", e);
694
- }
695
- function Mn() {
696
- Y.value = null, hn.value = null, J.value = null, _n.value = null, sr(), I.value = null, wt.value = null, F.value = tn(en.value), P.value = !1, R("cancel", rn());
697
- }
698
- function Nn(e, t) {
699
- if (!L.value || !P.value || t.disabled) return;
700
- Y.value = null;
701
- let n = e.currentTarget.closest(".vue-ui-hill__datapoint");
702
- n && typeof n.focus == "function" && (n.focus(), Q.value = t.id), e.preventDefault();
703
- let r = wn(t.id), i = J.value?.datapointId === t.id && !J.value?.moved;
704
- if (I.value = {
705
- id: t.id,
706
- pointerId: e.pointerId,
707
- stationaryLayout: r,
708
- startClientX: e.clientX,
709
- hasMoved: !1,
710
- deferPositionUpdate: i
711
- }, M.value?.setPointerCapture(e.pointerId), !i) {
712
- let n = kn(e.clientX);
713
- n !== null && On(t.id, n);
714
- }
715
- let a = Dn(t.id);
716
- a && R("dragStart", nn(a));
717
- }
718
- function Pn(e) {
719
- if (!I.value || I.value.pointerId !== e.pointerId) return;
720
- e.preventDefault();
721
- let t = Math.abs(e.clientX - I.value.startClientX);
722
- if (I.value.deferPositionUpdate && !I.value.hasMoved && t < 3) return;
723
- I.value.hasMoved || (I.value = {
724
- ...I.value,
725
- hasMoved: !0
726
- });
727
- let n = kn(e.clientX);
728
- n !== null && On(I.value.id, n);
729
- }
730
- function Fn(e) {
731
- let t = I.value;
732
- if (!t || t.pointerId !== e.pointerId) return;
733
- M.value?.hasPointerCapture(e.pointerId) && M.value.releasePointerCapture(e.pointerId);
734
- let n = e.type === "pointerup" && !t.hasMoved, r = Dn(t.id);
735
- wt.value = Tn(), I.value = null, r && (n && R("selectDatapoint", Rn(r)), R("dragEnd", nn(r)));
736
- }
737
- function In(e, t) {
738
- if (!L.value || !P.value || t.disabled) return;
739
- let n = Math.max(0, Number(N.value.interaction.keyboardStep) || 0), r = null;
740
- switch (e.key) {
741
- case "ArrowLeft":
742
- case "ArrowDown":
743
- r = t.position - n;
744
- break;
745
- case "ArrowRight":
746
- case "ArrowUp":
747
- r = t.position + n;
748
- break;
749
- case "Home":
750
- r = 0;
751
- break;
752
- case "End":
753
- r = 1;
754
- break;
755
- default: return;
756
- }
757
- e.preventDefault();
758
- let i = e.currentTarget;
759
- Q.value = t.id, I.value = {
760
- id: t.id,
761
- pointerId: null,
762
- stationaryLayout: wn(t.id)
763
- }, On(t.id, r), wt.value = Tn(), I.value = null, de(() => {
764
- i?.isConnected && i.focus({ preventScroll: !0 });
765
- });
766
- }
767
- function Ln(e) {
768
- let t = .5, n = Math.max(0, Number(N.value.interaction.peakTolerance) || 0);
769
- return Math.abs(e - t) <= n ? N.value.a11y.translations.topOfHill : e < t ? U.value.left.text : U.value.right.text;
770
- }
771
- function Rn(e) {
772
- return {
773
- datapoint: nn(e),
774
- index: e.__index
775
- };
776
- }
777
- function zn(e) {
778
- Q.value = null, Jn.value = e.id, ![0, 1].includes(e.position) && Q.value !== e.id && Zn(e), R("datapointEnter", Rn(e));
779
- }
780
- function Bn(e) {
781
- Jn.value === e.id && (Jn.value = null), qn.value === e.id && Q.value !== e.id && I.value?.id !== e.id && (qn.value = null), R("datapointLeave", Rn(e));
782
- }
783
- function Vn(e) {
784
- P.value && L.value || R("selectDatapoint", Rn(e));
785
- }
786
- let Hn = v(() => {
787
- let e = z.value;
788
- return {
789
- width: "100%",
790
- maxWidth: "100%",
791
- color: e.color,
792
- backgroundColor: e.backgroundColor,
793
- fontFamily: N.value.style.fontFamily,
794
- "--vue-ui-hill-button-hover-border": W.value.buttons.hoverBorderColor,
795
- "--vue-ui-hill-button-active-offset": `${W.value.buttons.activeTranslateY}px`
796
- };
797
- }), Un = v(() => ({
798
- color: W.value.status.color,
799
- fontSize: `${W.value.status.fontSize}px`,
800
- fontWeight: W.value.status.bold ? "bold" : "normal",
801
- lineHeight: W.value.status.lineHeight
802
- }));
803
- v(() => ({
804
- color: z.value.title.color,
805
- fontSize: `${z.value.title.fontSize}px`,
806
- fontWeight: z.value.title.bold ? "bold" : "normal",
807
- textAlign: z.value.title.textAlign
808
- })), v(() => ({
809
- color: z.value.title.subtitle.color,
810
- fontSize: `${z.value.title.subtitle.fontSize}px`,
811
- fontWeight: z.value.title.subtitle.bold ? "bold" : "normal"
812
- }));
813
- let Wn = v(() => {
814
- let e = Math.max(0, Number(z.value.height) || 0);
815
- return Math.min(e, q.value.baseY + e) + U.value.offsetY;
816
- });
817
- function Gn(e) {
818
- return U.value[e].text;
819
- }
820
- function Kn(e) {
821
- return e.position === 0 || e.position === 1;
822
- }
823
- let qn = D(null), Jn = D(null), Q = D(null);
824
- function Yn(e) {
825
- Q.value = e.id;
826
- }
827
- function Xn(e) {
828
- Q.value === e.id && (Q.value = null), qn.value === e.id && Jn.value !== e.id && I.value?.id !== e.id && (qn.value = null);
829
- }
830
- function Zn(e) {
831
- e?.id && (qn.value = e.id);
832
- }
833
- let Qn = v(() => {
834
- let e = [], t = [], n = null;
835
- return En.value.forEach((r) => {
836
- if (!r.isStackOverflowHidden) {
837
- if (r.id === qn.value) {
838
- n = r;
839
- return;
840
- }
841
- Kn(r) ? e.push(r) : t.push(r);
842
- }
843
- }), [
844
- ...e,
845
- ...t,
846
- ...n ? [n] : []
847
- ];
848
- }), $n = v(() => Cn.value.markers), er = v(() => $n.value.find((e) => e.stackId === Y.value) || null), tr = v(() => {
849
- let e = Math.max(160, Number(K.value.menu.width) || 220), t = Math.max(80, Number(K.value.menu.maxHeight) || 220);
850
- return {
851
- visibility: gn.value ? "visible" : "hidden",
852
- width: "max-content",
853
- minWidth: `${e}px`,
854
- maxWidth: "calc(100% - 16px)",
855
- maxHeight: `${t}px`,
856
- backgroundColor: K.value.menu.backgroundColor,
857
- color: K.value.menu.color,
858
- borderColor: K.value.menu.borderColor,
859
- borderRadius: `${K.value.menu.borderRadius}px`
860
- };
861
- });
862
- function nr(e, t) {
863
- let n = M.value, r = Tt.value;
864
- if (!n || !r) return null;
865
- let i = n.getScreenCTM();
866
- if (!i) return null;
867
- let a = n.createSVGPoint();
868
- a.x = e, a.y = t;
869
- let o = a.matrixTransform(i), s = r.getBoundingClientRect();
870
- return {
871
- x: o.x - s.left,
872
- y: o.y - s.top
873
- };
874
- }
875
- function rr() {
876
- let e = er.value, t = Et.value, n = Tt.value;
877
- if (!e || !t || !n) {
878
- gn.value = null;
879
- return;
880
- }
881
- let r = nr(e.x, e.y), i = nr(e.x, e.y + K.value.marker.radius);
882
- if (!r || !i) {
883
- gn.value = null;
884
- return;
885
- }
886
- let a = n.getBoundingClientRect(), o = t.offsetWidth, s = t.offsetHeight, c = Math.abs(i.y - r.y), l = Math.max(0, a.width - 16), u = Math.min(o, l), d = r.x;
887
- if (u >= l) d = a.width / 2;
888
- else {
889
- let e = u / 2;
890
- d = Math.min(a.width - 8 - e, Math.max(8 + e, r.x));
891
- }
892
- let f = r.y + c + 8, p = r.y - c - 8 - s, m = f + s <= a.height - 8, h = p >= 8, g = f;
893
- !m && h ? g = p : m || (g = Math.min(Math.max(8, f), Math.max(8, a.height - s - 8))), gn.value = {
894
- left: `${d}px`,
895
- top: `${g}px`,
896
- transform: "translateX(-50%)",
897
- visibility: "visible"
898
- };
899
- }
900
- function ir() {
901
- typeof window > "u" || (Z !== null && window.cancelAnimationFrame(Z), Z = window.requestAnimationFrame(() => {
902
- Z = null, rr();
903
- }));
904
- }
905
- _e($n, (e) => {
906
- Y.value && !e.some((e) => e.stackId === Y.value) && or();
907
- }), _e(() => {
908
- let e = er.value;
909
- return e ? [
910
- e.stackId,
911
- e.x,
912
- e.y,
913
- e.hiddenDatapoints.length,
914
- e.hiddenDatapoints.map((e) => `${e.id}:${e.label}:${e.position}`).join("|"),
915
- K.value.marker.radius,
916
- K.value.menu.width,
917
- K.value.menu.maxHeight,
918
- K.value.menu.backgroundColor,
919
- K.value.menu.color,
920
- K.value.menu.borderColor,
921
- K.value.menu.borderRadius,
922
- Gt.value
923
- ] : null;
924
- }, (e) => {
925
- if (!e) {
926
- gn.value = null;
927
- return;
928
- }
929
- de(ir);
930
- }, { flush: "post" }), _e(Et, (e, t) => {
931
- t && X && X.unobserve(t), e && X && (X.observe(e), de(ir));
932
- }, { flush: "post" }), _e(() => {
933
- let e = hn.value;
934
- return !e || Cn.value.overflowMemberIds.has(e);
935
- }, (e) => {
936
- e || (hn.value = null, J.value = null);
937
- });
938
- function ar(e) {
939
- if (e) {
940
- if (Y.value === e.stackId) {
941
- ir();
942
- return;
943
- }
944
- gn.value = null, Y.value = e.stackId, de(ir);
945
- }
946
- }
947
- function or() {
948
- Y.value = null, gn.value = null, typeof window < "u" && Z !== null && (window.cancelAnimationFrame(Z), Z = null);
949
- }
950
- function sr() {
951
- yn !== null && (clearTimeout(yn), yn = null);
952
- }
953
- function cr() {
954
- let e = J.value;
955
- !e || e.moved || (sr(), _n.value = e.stackId, hn.value = null, J.value = null, or(), yn = setTimeout(() => {
956
- _n.value = null, yn = null;
957
- }, K.value.transitionDuration + 80));
958
- }
959
- function lr(e) {
960
- if (!(e instanceof Element)) return {
961
- isMenu: !1,
962
- isMarker: !1,
963
- isSelectedDatapoint: !1
964
- };
965
- let t = J.value, n = e.closest("[data-datapoint-id]");
966
- return {
967
- isMenu: !!e.closest("[data-stack-overflow-menu]"),
968
- isMarker: !!e.closest("[data-stack-overflow-marker]"),
969
- isSelectedDatapoint: !!(t && n?.getAttribute("data-datapoint-id") === t.datapointId)
970
- };
971
- }
972
- function ur(e) {
973
- let t = lr(e.target);
974
- Y.value && !t.isMenu && !t.isMarker && or(), J.value && !J.value.moved && !t.isMenu && !t.isMarker && !t.isSelectedDatapoint && cr();
975
- }
976
- function dr(e) {
977
- let t = En.value.find((t) => t.id === e);
978
- if (!t || t.isStackOverflowHidden) return;
979
- let n = M.value?.querySelector(`[data-datapoint-index="${t.__index}"]`);
980
- n && typeof n.focus == "function" && n.focus({ preventScroll: !0 });
981
- }
982
- function fr(e) {
983
- if (!e || e.disabled || N.value.readonly) return;
984
- let t = er.value?.stackId;
985
- t && (sr(), _n.value = null, hn.value = e.id, J.value = {
986
- datapointId: e.id,
987
- stackId: t,
988
- initialPosition: e.position,
989
- moved: !1
990
- }, or(), de(() => {
991
- dr(e.id);
992
- let t = En.value.find((t) => t.id === e.id);
993
- t && R("selectDatapoint", Rn(t));
994
- }));
995
- }
996
- function pr() {
997
- let e = Math.max(1, Number(q.value.width) || 1);
998
- return Math.max(1e-6, 1 / e * 2);
999
- }
1000
- function mr(e, t) {
1001
- let n = J.value;
1002
- !n || n.datapointId !== e || n.moved || Math.abs(t - n.initialPosition) >= pr() && (J.value = {
1003
- ...n,
1004
- moved: !0
1005
- });
1006
- }
1007
- pe(() => {
1008
- document.addEventListener("pointerdown", ur), window.addEventListener("resize", ir, { passive: !0 }), typeof ResizeObserver < "u" && (X = new ResizeObserver(() => {
1009
- er.value && ir();
1010
- }), Tt.value && X.observe(Tt.value), M.value && X.observe(M.value));
1011
- }), fe(() => {
1012
- document.removeEventListener("pointerdown", ur), window.removeEventListener("resize", ir), X?.disconnect(), X = null, Z !== null && (window.cancelAnimationFrame(Z), Z = null), sr();
1013
- });
1014
- function hr(e) {
1015
- return I.value ? I.value.id === e.id : Jn.value === e.id || Q.value === e.id;
1016
- }
1017
- function gr(e) {
1018
- return s(N.value.style.chart.layout.plots.dragMarker.positionIndicator.value.formatter, e.position, a({
1019
- p: "",
1020
- v: e.position * 100,
1021
- s: "%",
1022
- r: N.value.style.chart.layout.plots.dragMarker.positionIndicator.value.rounding
1023
- }));
1024
- }
1025
- function _r(e) {
1026
- if (e?.stage === "start") {
1027
- kt.value = !0;
1028
- return;
1029
- }
1030
- if (e?.stage === "end") {
1031
- kt.value = !1;
1032
- return;
1033
- }
1034
- Ht();
1035
- }
1036
- let vr = v(() => N.value.style.chart.backgroundColor), yr = v(() => N.value.style.chart.legend), br = v(() => N.value.style.chart.title), { exportSvg: xr, getSvg: Sr } = h({
1037
- svg: M,
1038
- title: br,
1039
- legend: yr,
1040
- legendItems: null,
1041
- backgroundColor: vr
1042
- });
1043
- async function Cr({ isCb: e }) {
1044
- Ot.value = !0, await de();
1045
- try {
1046
- if (e) {
1047
- let { blob: e, url: t, text: n, dataUrl: r } = await Sr();
1048
- await Promise.resolve(N.value.userOptions.callbacks.svg({
1049
- blob: e,
1050
- url: t,
1051
- text: n,
1052
- dataUrl: r
1053
- }));
1054
- } else await Promise.resolve(xr());
1055
- } finally {
1056
- Ot.value = !1;
1057
- }
1058
- }
1059
- function wr(e = null) {
1060
- de(() => {
1061
- let r = rn().map((e) => [
1062
- [e.name],
1063
- [e.position],
1064
- [gr(e)],
1065
- [Ln(e.position)]
1066
- ]), i = [
1067
- [N.value.style.chart.title.text],
1068
- [N.value.style.chart.title.subtitle.text],
1069
- [
1070
- ["Name"],
1071
- ["Position"],
1072
- ["Percentage"],
1073
- ["Phase"]
1074
- ]
1075
- ].concat(r), a = n(i);
1076
- e ? e(a) : t({
1077
- csvContent: a,
1078
- title: N.value.style.chart.title.text || "vue-ui-hill"
1079
- });
1080
- });
1081
- }
1082
- let Tr = v(() => N.value.style.chart.layout.stackbar.show), Er = v(() => {
1083
- let e = En.value.length;
1084
- En.value.reduce((e, t) => e + (t?.position ?? 0), 0);
1085
- let t = 0, n = En.value.every((e) => e.position === 1);
1086
- return En.value.toSorted((e, t) => {
1087
- if (n) return e.__index - t.__index;
1088
- let r = (e?.position ?? 0) - (t?.position ?? 0);
1089
- return r === 0 ? e.__index - t.__index : r;
1090
- }).map((n) => {
1091
- let r = n?.position ?? 0, i = e > 0 ? r / e : 0, a = {
1092
- ...n,
1093
- proportion: i,
1094
- proportionStart: t
1095
- };
1096
- return t += i, a;
1097
- });
1098
- }), $ = v(() => Math.min(1, Math.max(0, Er.value.reduce((e, t) => e + t.proportion, 0)))), Dr = v(() => $.value * 100), Or = v(() => q.value.left[0].x + q.value.width * $.value), kr = v(() => z.value.height + 32 + G.value.paddingTop);
1099
- function Ar() {
1100
- return s(G.value.label.formatter, Dr.value, a({
1101
- p: "",
1102
- v: Dr.value,
1103
- s: "%",
1104
- r: 0
1105
- }));
1106
- }
1107
- let jr = v(() => `${Ct.value}-stackbar-clip`);
1108
- async function Mr() {
1109
- let e = rn();
1110
- if (jt("copyAlt", {
1111
- config: N.value,
1112
- dataset: e
1113
- }), !N.value.userOptions.callbacks.altCopy) {
1114
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1115
- return;
1116
- }
1117
- await Promise.resolve(N.value.userOptions.callbacks.altCopy({
1118
- config: N.value,
1119
- dataset: e
1120
- }));
1121
- }
1122
- async function Nr({ scale: e = 2 } = {}) {
1123
- if (!Tt.value) return;
1124
- let { width: t, height: n } = Tt.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ne({
1125
- domElement: Tt.value,
1126
- base64: !0,
1127
- img: !0,
1128
- scale: e
1129
- });
1130
- return {
1131
- imageUri: i,
1132
- base64: a,
1133
- title: N.value.style.chart.title.text,
1134
- width: t,
1135
- height: n,
1136
- aspectRatio: r
1137
- };
1138
- }
1139
- function Pr() {
1140
- return rn();
1141
- }
1142
- return ie({
1143
- isEditing: P,
1144
- beginEditing: An,
1145
- save: jn,
1146
- cancel: Mn,
1147
- getData: Pr,
1148
- copyAlt: Mr,
1149
- toggleFullscreen: Kt,
1150
- toggleAnnotator: Jt,
1151
- generateImage: Ht,
1152
- generateSvg: Cr,
1153
- generatePdf: Vt,
1154
- generateCsv: wr,
1155
- getImage: Nr
1156
- }), (e, t) => (E(), b("div", {
1157
- ref_key: "hillChartRef",
1158
- ref: Tt,
1159
- class: C("vue-data-ui-component vue-ui-hill"),
1160
- style: T(Hn.value),
1161
- id: `hill_${Ct.value}`,
1162
- onMouseenter: Lt,
1163
- onMouseleave: Rt,
1164
- "data-editing": P.value
1165
- }, [
1166
- N.value.style.chart.title.text ? (E(), b("div", Se, [(E(), se(re, {
1167
- key: `title_${At.value}`,
1168
- config: {
1169
- title: {
1170
- cy: "hill-div-title",
1171
- ...N.value.style.chart.title
1172
- },
1173
- subtitle: {
1174
- cy: "hill-div-subtitle",
1175
- ...N.value.style.chart.title.subtitle
1176
- }
1177
- }
1178
- }, null, 8, ["config"]))], 512)) : y("", !0),
1179
- N.value.userOptions.buttons.annotator && M.value ? (E(), se(A(_t), {
1180
- key: 1,
1181
- color: N.value.style.chart.color,
1182
- backgroundColor: N.value.style.chart.backgroundColor,
1183
- active: qt.value,
1184
- svgRef: M.value,
1185
- isCursorPointer: Ut.value,
1186
- onClose: Jt
1187
- }, {
1188
- "annotator-action-close": j(() => [O(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1189
- "annotator-action-color": j(({ color: t }) => [O(e.$slots, "annotator-action-color", w(S({ color: t })), void 0, !0)]),
1190
- "annotator-action-draw": j(({ mode: t }) => [O(e.$slots, "annotator-action-draw", w(S({ mode: t })), void 0, !0)]),
1191
- "annotator-action-undo": j(({ disabled: t }) => [O(e.$slots, "annotator-action-undo", w(S({ disabled: t })), void 0, !0)]),
1192
- "annotator-action-redo": j(({ disabled: t }) => [O(e.$slots, "annotator-action-redo", w(S({ disabled: t })), void 0, !0)]),
1193
- "annotator-action-delete": j(({ disabled: t }) => [O(e.$slots, "annotator-action-delete", w(S({ disabled: t })), void 0, !0)]),
1194
- _: 3
1195
- }, 8, [
1196
- "color",
1197
- "backgroundColor",
1198
- "active",
1199
- "svgRef",
1200
- "isCursorPointer"
1201
- ])) : y("", !0),
1202
- W.value.show ? (E(), se(A(mt), {
1203
- key: 2,
1204
- "is-editing": P.value,
1205
- "is-editable": L.value,
1206
- "is-fullscreen": Gt.value,
1207
- position: Yt.value,
1208
- color: N.value.style.chart.color,
1209
- "background-color": N.value.style.chart.backgroundColor,
1210
- translations: W.value.buttons.translations,
1211
- "is-cursor-pointer": Ut.value,
1212
- onUpdate: An,
1213
- onCancel: Mn,
1214
- onSave: jn
1215
- }, {
1216
- "hill-edit": j(() => [O(e.$slots, "hill-edit", {}, void 0, !0)]),
1217
- "hill-cancel": j(() => [O(e.$slots, "hill-cancel", {}, void 0, !0)]),
1218
- "hill-save": j(() => [O(e.$slots, "hill-save", {}, void 0, !0)]),
1219
- _: 3
1220
- }, 8, [
1221
- "is-editing",
1222
- "is-editable",
1223
- "is-fullscreen",
1224
- "position",
1225
- "color",
1226
- "background-color",
1227
- "translations",
1228
- "is-cursor-pointer"
1229
- ])) : y("", !0),
1230
- W.value.show ? (E(), b("div", Ce, [x("p", {
1231
- class: "vue-ui-hill__status",
1232
- style: T(Un.value),
1233
- "aria-live": "polite"
1234
- }, k(P.value ? W.value.status.editInstruction : W.value.status.lastUpdated), 5)])) : y("", !0),
1235
- N.value.userOptions.show && (A(It) || A(Pt)) ? (E(), se(A(ht), {
1236
- ref_key: "userOptionsRef",
1237
- ref: Dt,
1238
- key: `uo_${Wt.value}`,
1239
- backgroundColor: N.value.style.chart.backgroundColor,
1240
- color: N.value.style.chart.color,
1241
- isPrinting: A(zt),
1242
- isImaging: A(Bt),
1243
- uid: Ct.value,
1244
- hasTooltip: !1,
1245
- hasPdf: N.value.userOptions.buttons.pdf,
1246
- hasImg: N.value.userOptions.buttons.img,
1247
- hasSvg: N.value.userOptions.buttons.svg,
1248
- hasXls: N.value.userOptions.buttons.csv,
1249
- hasTable: N.value.userOptions.buttons.table,
1250
- hasLabel: N.value.userOptions.buttons.labels,
1251
- hasFullscreen: N.value.userOptions.buttons.fullscreen,
1252
- hasAltCopy: N.value.userOptions.buttons.altCopy,
1253
- chartElement: Tt.value,
1254
- position: N.value.userOptions.position,
1255
- callbacks: N.value.userOptions.callbacks,
1256
- titles: { ...N.value.userOptions.buttonTitles },
1257
- hasAnnotator: N.value.userOptions.buttons.annotator,
1258
- isAnnotation: qt.value,
1259
- printScale: N.value.userOptions.print.scale,
1260
- isCursorPointer: Ut.value,
1261
- onToggleFullscreen: Kt,
1262
- onGeneratePdf: A(Vt),
1263
- onGenerateCsv: wr,
1264
- onGenerateImage: _r,
1265
- onGenerateSvg: Cr,
1266
- onToggleAnnotator: Jt,
1267
- onCopyAlt: Mr,
1268
- style: T({ visibility: A(It) ? A(Pt) ? "visible" : "hidden" : "visible" })
1269
- }, ce({ _: 2 }, [
1270
- e.$slots.menuIcon ? {
1271
- name: "menuIcon",
1272
- fn: j(({ isOpen: t, color: n }) => [O(e.$slots, "menuIcon", w(S({
1273
- isOpen: t,
1274
- color: n
1275
- })), void 0, !0)]),
1276
- key: "0"
1277
- } : void 0,
1278
- e.$slots.optionPdf ? {
1279
- name: "optionPdf",
1280
- fn: j(() => [O(e.$slots, "optionPdf", {}, void 0, !0)]),
1281
- key: "1"
1282
- } : void 0,
1283
- e.$slots.optionCsv ? {
1284
- name: "optionCsv",
1285
- fn: j(() => [O(e.$slots, "optionCsv", {}, void 0, !0)]),
1286
- key: "2"
1287
- } : void 0,
1288
- e.$slots.optionImg ? {
1289
- name: "optionImg",
1290
- fn: j(() => [O(e.$slots, "optionImg", {}, void 0, !0)]),
1291
- key: "3"
1292
- } : void 0,
1293
- e.$slots.optionSvg ? {
1294
- name: "optionSvg",
1295
- fn: j(() => [O(e.$slots, "optionSvg", {}, void 0, !0)]),
1296
- key: "4"
1297
- } : void 0,
1298
- e.$slots.optionFullscreen ? {
1299
- name: "optionFullscreen",
1300
- fn: j(({ toggleFullscreen: t, isFullscreen: n }) => [O(e.$slots, "optionFullscreen", w(S({
1301
- toggleFullscreen: t,
1302
- isFullscreen: n
1303
- })), void 0, !0)]),
1304
- key: "5"
1305
- } : void 0,
1306
- e.$slots.optionAnnotator ? {
1307
- name: "optionAnnotator",
1308
- fn: j(({ toggleAnnotator: t, isAnnotator: n }) => [O(e.$slots, "optionAnnotator", w(S({
1309
- toggleAnnotator: t,
1310
- isAnnotator: n
1311
- })), void 0, !0)]),
1312
- key: "6"
1313
- } : void 0,
1314
- e.$slots.optionAltCopy ? {
1315
- name: "optionAltCopy",
1316
- fn: j(({ altCopy: t }) => [O(e.$slots, "optionAltCopy", w(S({ altCopy: t })), void 0, !0)]),
1317
- key: "7"
1318
- } : void 0,
1319
- e.$slots["custom-menu-before"] ? {
1320
- name: "custom-menu-before",
1321
- fn: j(() => [O(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1322
- key: "8"
1323
- } : void 0,
1324
- e.$slots["custom-menu-after"] ? {
1325
- name: "custom-menu-after",
1326
- fn: j(() => [O(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1327
- key: "9"
1328
- } : void 0
1329
- ]), 1032, [
1330
- "backgroundColor",
1331
- "color",
1332
- "isPrinting",
1333
- "isImaging",
1334
- "uid",
1335
- "hasPdf",
1336
- "hasImg",
1337
- "hasSvg",
1338
- "hasXls",
1339
- "hasTable",
1340
- "hasLabel",
1341
- "hasFullscreen",
1342
- "hasAltCopy",
1343
- "chartElement",
1344
- "position",
1345
- "callbacks",
1346
- "titles",
1347
- "hasAnnotator",
1348
- "isAnnotation",
1349
- "printScale",
1350
- "isCursorPointer",
1351
- "onGeneratePdf",
1352
- "style"
1353
- ])) : y("", !0),
1354
- (E(), b("svg", {
1355
- ref_key: "svgRef",
1356
- ref: M,
1357
- style: T({
1358
- background: "transparent",
1359
- color: N.value.style.chart.color,
1360
- fontFamily: N.value.style.fontFamily
1361
- }),
1362
- class: C({ "vue-data-ui-no-transition": !A(Nt) }),
1363
- viewBox: `0 0 ${z.value.width} ${z.value.height + (Tr.value ? 32 + G.value.paddingTop + G.value.paddingBottom + G.value.height : 0)}`,
1364
- role: "group",
1365
- "aria-live": "polite",
1366
- preserveAspectRatio: "xMidYMid meet",
1367
- onPointermove: Pn,
1368
- onPointerup: Fn,
1369
- onPointercancel: Fn
1370
- }, [
1371
- le(A(gt)),
1372
- e.$slots["chart-background"] ? (E(), b("foreignObject", {
1373
- key: 0,
1374
- x: 0,
1375
- y: 0,
1376
- width: Math.max(.1, z.value.width),
1377
- height: Math.max(.1, z.value.height + (Tr.value ? 32 + G.value.paddingTop + G.value.paddingBottom + G.value.height : 0)),
1378
- style: { pointerEvents: "none" }
1379
- }, [O(e.$slots, "chart-background", {}, void 0, !0)], 8, Te)) : y("", !0),
1380
- B.value.baseline.show ? (E(), b("line", {
1381
- key: 1,
1382
- x1: q.value.startX,
1383
- x2: q.value.endX,
1384
- y1: q.value.baseY,
1385
- y2: q.value.baseY,
1386
- stroke: B.value.baseline.stroke,
1387
- "stroke-width": B.value.baseline.strokeWidth,
1388
- "stroke-dasharray": B.value.baseline.strokeDasharray,
1389
- "vector-effect": "non-scaling-stroke"
1390
- }, null, 8, Ee)) : y("", !0),
1391
- B.value.midline.show ? (E(), b("line", {
1392
- key: 2,
1393
- x1: q.value.centerX,
1394
- x2: q.value.centerX,
1395
- y1: q.value.peakY,
1396
- y2: q.value.baseY,
1397
- stroke: B.value.midline.stroke,
1398
- "stroke-width": B.value.midline.strokeWidth,
1399
- "stroke-dasharray": B.value.midline.strokeDasharray,
1400
- "vector-effect": "non-scaling-stroke"
1401
- }, null, 8, De)) : y("", !0),
1402
- x("path", {
1403
- d: cn.value,
1404
- fill: "none",
1405
- stroke: B.value.curve.stroke,
1406
- "stroke-width": B.value.curve.strokeWidth,
1407
- "stroke-dasharray": B.value.curve.strokeDasharray,
1408
- "stroke-linecap": "round",
1409
- "stroke-linejoin": "round",
1410
- "vector-effect": "non-scaling-stroke"
1411
- }, null, 8, Oe),
1412
- N.value.style.chart.layout.plots.dragMarker.positionIndicator.show ? (E(!0), b(_, { key: 3 }, me(Qn.value, (e) => (E(), b("g", { key: `position-indicator-${e.id}` }, [hr(e) && V.value.dragMarker.show ? (E(), b("g", ke, [
1413
- x("path", {
1414
- d: `M${e.x},${e.y} ${e.x},${q.value.baseY}`,
1415
- stroke: N.value.style.chart.layout.plots.dragMarker.positionIndicator.useSerieColor ? e.color : N.value.style.chart.layout.plots.dragMarker.positionIndicator.color,
1416
- "stroke-width": N.value.style.chart.layout.plots.dragMarker.positionIndicator.strokeWidth,
1417
- "stroke-dasharray": N.value.style.chart.layout.plots.dragMarker.positionIndicator.strokeDasharray,
1418
- "stroke-linecap": "round",
1419
- "vector-effect": "non-scaling-stroke",
1420
- class: C({ "vue-data-ui-transition": A(Nt) && I.value?.id !== e.id })
1421
- }, null, 10, Ae),
1422
- N.value.style.chart.layout.plots.dragMarker.positionIndicator.circle.show ? (E(), b("circle", {
1423
- key: 0,
1424
- cx: e.x,
1425
- cy: q.value.baseY,
1426
- r: N.value.style.chart.layout.plots.dragMarker.positionIndicator.circle.radius,
1427
- fill: N.value.style.chart.layout.plots.dragMarker.positionIndicator.useSerieColor ? e.color : N.value.style.chart.layout.plots.dragMarker.positionIndicator.color,
1428
- stroke: N.value.style.chart.layout.plots.dragMarker.positionIndicator.circle.stroke,
1429
- "stroke-width": N.value.style.chart.layout.plots.dragMarker.positionIndicator.circle.strokeWidth,
1430
- "vector-effect": "non-scaling-stroke",
1431
- "paint-order": "stroke fill",
1432
- class: C({ "vue-data-ui-transition": A(Nt) && I.value?.id !== e.id })
1433
- }, null, 10, je)) : y("", !0),
1434
- N.value.style.chart.layout.plots.dragMarker.positionIndicator.value.show ? (E(), b("text", {
1435
- key: 1,
1436
- "paint-order": "stroke fill",
1437
- "vector-effect": "non-scaling-stroke",
1438
- "text-anchor": "middle",
1439
- transform: `translate(${e.x}, ${q.value.baseY + N.value.style.chart.layout.plots.radius + N.value.style.chart.layout.plots.dragMarker.positionIndicator.value.offsetY + N.value.style.chart.layout.plots.dragMarker.positionIndicator.value.fontSize})`,
1440
- "font-size": N.value.style.chart.layout.plots.dragMarker.positionIndicator.value.fontSize,
1441
- fill: N.value.style.chart.layout.plots.dragMarker.positionIndicator.value.useSerieColor ? e.color : N.value.style.chart.layout.plots.dragMarker.positionIndicator.value.color,
1442
- stroke: N.value.style.chart.backgroundColor,
1443
- "stroke-width": "1",
1444
- class: C({ "vue-data-ui-transition": A(Nt) && I.value?.id !== e.id })
1445
- }, k(gr(e)), 11, Me)) : y("", !0)
1446
- ])) : y("", !0)]))), 128)) : y("", !0),
1447
- (E(!0), b(_, null, me(Qn.value, (e) => (E(), b("g", {
1448
- key: e.id,
1449
- "data-cy-datapoint": "",
1450
- class: C({
1451
- "vue-ui-hill__datapoint": !0,
1452
- "vue-data-ui-transition": A(Nt) && I.value?.id !== e.id,
1453
- "vue-ui-hill__datapoint--promoted": A(Nt) && e.isPromotedFromStackOverflow
1454
- }),
1455
- style: T({ opacity: [0, 1].includes(e.position) || e?.muted ? V.value.mutedOpacity : e?.disabled ? V.value.disabledOpacity : 1 }),
1456
- transform: `translate(${e.x} ${e.y})`,
1457
- "data-datapoint-index": e.__index,
1458
- "data-datapoint-id": e.id,
1459
- role: "slider",
1460
- tabindex: P.value && L.value && !e.disabled ? 0 : -1,
1461
- "aria-orientation": "horizontal",
1462
- "aria-valuemin": "0",
1463
- "aria-valuemax": "100",
1464
- "aria-valuenow": gr(e),
1465
- "aria-valuetext": `${e.label}: ${Ln(e.position)}, ${gr(e)}`,
1466
- "aria-label": e.label,
1467
- onFocus: (t) => Yn(e),
1468
- onBlur: (t) => Xn(e),
1469
- onKeydown: (t) => In(t, e),
1470
- onPointerenter: (t) => zn(e),
1471
- onPointerleave: (t) => Bn(e),
1472
- onClick: (t) => Vn(e)
1473
- }, [
1474
- x("circle", {
1475
- r: V.value.hitRadius,
1476
- fill: "transparent",
1477
- class: C({
1478
- "vue-ui-hill__hit-area--active": P.value && L.value && !e.disabled,
1479
- "vue-ui-hill__hit-area--dragging": I.value?.id === e.id
1480
- }),
1481
- onPointerdown: (t) => Nn(t, e)
1482
- }, null, 42, Pe),
1483
- x("circle", {
1484
- class: "vue-ui-hill-circle",
1485
- r: V.value.radius,
1486
- fill: e.color,
1487
- stroke: V.value.stroke,
1488
- "stroke-width": V.value.strokeWidth,
1489
- style: T({ filter: V.value.shadow.show ? `drop-shadow(${V.value.shadow.offsetX}px ${V.value.shadow.offsetY}px ${V.value.shadow.blur}px ${V.value.shadow.color})` : "none" }),
1490
- "vector-effect": "non-scaling-stroke",
1491
- "pointer-events": "none"
1492
- }, null, 12, Fe),
1493
- P.value && (I.value?.id === e.id && V.value.dragMarker.show || hr(e)) && !e?.disabled ? (E(), b("g", {
1494
- key: 0,
1495
- fill: "none",
1496
- stroke: A(l)(e.color),
1497
- "stroke-width": V.value.dragMarker.strokeWidth,
1498
- "stroke-linecap": "round",
1499
- "stroke-linejoin": "round",
1500
- "pointer-events": "none",
1501
- "vector-effect": "non-scaling-stroke",
1502
- "aria-hidden": "true"
1503
- }, [x("path", { d: V.value.dragMarker.crossPath }, null, 8, Le)], 8, Ie)) : y("", !0),
1504
- H.value.show ? (E(), b("text", {
1505
- key: 1,
1506
- x: e.labelX,
1507
- y: H.value.offsetY,
1508
- "text-anchor": e.textAnchor,
1509
- fill: H.value.useSerieColor ? e.color : H.value.color,
1510
- "font-size": H.value.fontSize,
1511
- "font-weight": H.value.bold ? "bold" : "normal",
1512
- "paint-order": "stroke fill",
1513
- stroke: H.value.stroke,
1514
- "stroke-width": H.value.strokeWidth,
1515
- "stroke-linejoin": "round",
1516
- "stroke-linecap": "round",
1517
- "pointer-events": "none",
1518
- style: { "user-select": "none" },
1519
- "dominant-baseline": "central"
1520
- }, k(A(o)(e.label, H.value.ellipsisThresholdChars)), 9, Re)) : y("", !0)
1521
- ], 46, Ne))), 128)),
1522
- (E(!0), b(_, null, me($n.value, (e) => (E(), b("g", {
1523
- key: `stack-overflow-${e.stackId}`,
1524
- class: C(["vue-ui-hill__stack-overflow-marker", {
1525
- "vue-ui-hill__stack-overflow-marker--animated": A(Nt),
1526
- "vue-ui-hill__stack-overflow-marker--restored": _n.value === e.stackId
1527
- }]),
1528
- style: T({
1529
- "--vue-ui-hill-overflow-marker-duration": `${K.value.transitionDuration * .7}ms`,
1530
- "--vue-ui-hill-overflow-marker-delay": `${K.value.transitionDuration * .3}ms`,
1531
- "--vue-ui-hill-overflow-label-duration": `${K.value.transitionDuration * .55}ms`,
1532
- "--vue-ui-hill-overflow-label-delay": `${K.value.transitionDuration * .45}ms`,
1533
- cursor: Ut.value && !N.value.readonly ? "pointer" : "default"
1534
- }),
1535
- transform: `translate(${e.x} ${e.y})`,
1536
- "data-stack-overflow-marker": "",
1537
- role: "button",
1538
- tabindex: P.value && L.value ? 0 : -1,
1539
- "aria-label": `${e.hiddenCount} stacked datapoints. Activate to choose one.`,
1540
- "aria-expanded": Y.value === e.stackId,
1541
- onPointerdown: t[0] ||= ye(() => {}, ["stop"]),
1542
- onClick: ye((t) => ar(e), ["stop"]),
1543
- onFocus: (t) => ar(e),
1544
- onKeydown: [
1545
- ve(ye((t) => ar(e), ["prevent", "stop"]), ["enter"]),
1546
- ve(ye((t) => ar(e), ["prevent", "stop"]), ["space"]),
1547
- ve(ye(or, ["prevent", "stop"]), ["esc"])
1548
- ]
1549
- }, [
1550
- A(Nt) && _n.value !== e.stackId ? (E(), b("g", Be, [(E(!0), b(_, null, me(e.collapseDatapoints, (t) => (E(), b("circle", {
1551
- key: `overflow-ghost-${e.stackId}-${t.id}`,
1552
- cx: t.relativeX,
1553
- cy: t.relativeY,
1554
- r: V.value.radius,
1555
- fill: t.color,
1556
- stroke: V.value.stroke,
1557
- "stroke-width": V.value.strokeWidth,
1558
- opacity: "0.8",
1559
- "vector-effect": "non-scaling-stroke"
1560
- }, [
1561
- x("animate", {
1562
- attributeName: "cx",
1563
- from: t.relativeX,
1564
- to: "0",
1565
- dur: `${K.value.transitionDuration}ms`,
1566
- fill: "freeze",
1567
- calcMode: "spline",
1568
- keyTimes: "0;1",
1569
- keySplines: "0.22 1 0.36 1"
1570
- }, null, 8, He),
1571
- x("animate", {
1572
- attributeName: "cy",
1573
- from: t.relativeY,
1574
- to: "0",
1575
- dur: `${K.value.transitionDuration}ms`,
1576
- fill: "freeze",
1577
- calcMode: "spline",
1578
- keyTimes: "0;1",
1579
- keySplines: "0.22 1 0.36 1"
1580
- }, null, 8, Ue),
1581
- x("animate", {
1582
- attributeName: "r",
1583
- from: V.value.radius,
1584
- to: K.value.marker.radius * .7,
1585
- dur: `${K.value.transitionDuration}ms`,
1586
- fill: "freeze"
1587
- }, null, 8, We),
1588
- x("animate", {
1589
- attributeName: "opacity",
1590
- from: "0.8",
1591
- to: "0",
1592
- dur: `${K.value.transitionDuration * .85}ms`,
1593
- fill: "freeze"
1594
- }, null, 8, Ge)
1595
- ], 8, Ve))), 128))])) : y("", !0),
1596
- x("circle", {
1597
- r: Math.max(V.value.hitRadius, K.value.marker.radius),
1598
- fill: "transparent",
1599
- "pointer-events": "all"
1600
- }, null, 8, Ke),
1601
- x("rect", {
1602
- class: "vue-ui-hill__stack-overflow-marker-rect",
1603
- x: -K.value.marker.radius,
1604
- y: -K.value.marker.radius,
1605
- width: K.value.marker.radius * 2,
1606
- height: K.value.marker.radius * 2,
1607
- fill: K.value.marker.fill,
1608
- stroke: K.value.marker.stroke,
1609
- "stroke-width": K.value.marker.strokeWidth,
1610
- "vector-effect": "non-scaling-stroke",
1611
- "pointer-events": "none"
1612
- }, null, 8, qe),
1613
- x("g", {
1614
- class: "vue-ui-hill__stack-overflow-focus-cross",
1615
- fill: "none",
1616
- stroke: A(l)(B.value.curve.stroke),
1617
- "stroke-width": V.value.dragMarker.strokeWidth,
1618
- "stroke-linecap": "round",
1619
- "stroke-linejoin": "round",
1620
- "pointer-events": "none",
1621
- "vector-effect": "non-scaling-stroke",
1622
- "aria-hidden": "true"
1623
- }, [x("path", { d: V.value.dragMarker.crossPath }, null, 8, Ye)], 8, Je),
1624
- er.value ? y("", !0) : (E(), b("text", {
1625
- key: 1,
1626
- class: "vue-ui-hill__stack-overflow-marker-label",
1627
- "text-anchor": "middle",
1628
- y: K.value.marker.radius + K.value.marker.offsetY + K.value.marker.fontSize,
1629
- fill: K.value.marker.color,
1630
- "font-size": K.value.marker.fontSize,
1631
- "font-weight": K.value.marker.bold ? "bold" : "normal",
1632
- "pointer-events": "none",
1633
- style: { "user-select": "none" },
1634
- "paint-order": "stroke fill",
1635
- "vector-effect": "non-scaling-stroke",
1636
- stroke: N.value.style.chart.backgroundColor,
1637
- "stroke-width": "3"
1638
- }, " +" + k(e.hiddenCount), 9, Xe))
1639
- ], 46, ze))), 128)),
1640
- U.value.show ? (E(), b(_, { key: 4 }, [x("text", {
1641
- x: (q.value.startX + q.value.centerX) / 2,
1642
- y: Wn.value,
1643
- "text-anchor": "middle",
1644
- fill: U.value.color,
1645
- "font-size": U.value.fontSize,
1646
- "font-weight": U.value.bold ? "bold" : "normal",
1647
- "letter-spacing": U.value.letterSpacing
1648
- }, k(Gn("left")), 9, Ze), x("text", {
1649
- x: (q.value.centerX + q.value.endX) / 2,
1650
- y: Wn.value,
1651
- "text-anchor": "middle",
1652
- fill: U.value.color,
1653
- "font-size": U.value.fontSize,
1654
- "font-weight": U.value.bold ? "bold" : "normal",
1655
- "letter-spacing": U.value.letterSpacing
1656
- }, k(Gn("right")), 9, Qe)], 64)) : y("", !0),
1657
- Tr.value ? (E(), b(_, { key: 5 }, [
1658
- x("rect", {
1659
- x: q.value.left[0].x,
1660
- y: kr.value,
1661
- rx: G.value.height / 2,
1662
- width: q.value.width,
1663
- height: G.value.height,
1664
- fill: G.value.gutterColor
1665
- }, null, 8, $e),
1666
- x("defs", null, [x("clipPath", { id: jr.value }, [x("rect", {
1667
- x: q.value.left[0].x,
1668
- y: kr.value,
1669
- width: q.value.width * $.value,
1670
- height: G.value.height,
1671
- rx: Math.min(G.value.height / 2, q.value.width * $.value / 2),
1672
- ry: Math.min(G.value.height / 2, q.value.width * $.value / 2)
1673
- }, null, 8, tt)], 8, et)]),
1674
- x("g", { "clip-path": `url(#${jr.value})` }, [(E(!0), b(_, null, me(Er.value, (e) => (E(), b("rect", {
1675
- key: `bar_fill_${e.id}`,
1676
- width: q.value.width * e.proportion,
1677
- x: q.value.left[0].x + q.value.width * e.proportionStart,
1678
- y: z.value.height + 32 + G.value.paddingTop,
1679
- fill: e.color,
1680
- height: G.value.height,
1681
- onPointerenter: (t) => zn(e),
1682
- onPointerleave: (t) => Bn(e)
1683
- }, null, 40, rt))), 128))], 8, nt),
1684
- (E(!0), b(_, null, me(Er.value.slice(1), (e) => (E(), b("line", {
1685
- key: `bar_separator_${e.id}`,
1686
- x1: q.value.left[0].x + q.value.width * e.proportionStart,
1687
- x2: q.value.left[0].x + q.value.width * e.proportionStart,
1688
- y1: z.value.height + 32 + G.value.paddingTop,
1689
- y2: z.value.height + 32 + G.value.paddingTop + G.value.height,
1690
- stroke: G.value.stroke,
1691
- "stroke-width": G.value.strokeWidth,
1692
- "vector-effect": "non-scaling-stroke"
1693
- }, null, 8, it))), 128)),
1694
- x("rect", {
1695
- x: q.value.left[0].x,
1696
- y: z.value.height + 32 + G.value.paddingTop,
1697
- width: q.value.width * $.value,
1698
- height: G.value.height,
1699
- rx: Math.min(G.value.height / 2, q.value.width * $.value / 2),
1700
- ry: Math.min(G.value.height / 2, q.value.width * $.value / 2),
1701
- fill: "none",
1702
- stroke: G.value.stroke,
1703
- "stroke-width": G.value.strokeWidth,
1704
- "vector-effect": "non-scaling-stroke"
1705
- }, null, 8, at),
1706
- G.value.label.show && $.value > 0 ? (E(), b("text", {
1707
- key: 0,
1708
- x: Or.value,
1709
- y: kr.value - 6,
1710
- fill: G.value.label.color,
1711
- "font-size": G.value.label.fontSize,
1712
- "text-anchor": "end",
1713
- "dominant-baseline": "auto",
1714
- "pointer-events": "none",
1715
- style: { "user-select": "none" }
1716
- }, k(Ar()), 9, ot)) : y("", !0)
1717
- ], 64)) : y("", !0),
1718
- O(e.$slots, "svg", { svg: {
1719
- drawingArea: q.value,
1720
- isEditing: P.value,
1721
- datapoints: Qn.value,
1722
- isPrintingImg: A(zt) || A(Bt) || kt.value,
1723
- isPrintingSvg: Ot.value
1724
- } }, void 0, !0)
1725
- ], 46, we)),
1726
- er.value ? (E(), b("div", {
1727
- ref_key: "overflowMenuRef",
1728
- ref: Et,
1729
- key: `stack-overflow-menu-${er.value.stackId}`,
1730
- class: "vue-ui-hill__stack-overflow-menu",
1731
- "data-stack-overflow-menu": "",
1732
- "data-dom-to-png-ignore": "",
1733
- style: T([tr.value, gn.value]),
1734
- role: "listbox",
1735
- "aria-label": `Choose one of ${er.value.hiddenCount} stacked datapoints`,
1736
- onPointerdown: t[1] ||= ye(() => {}, ["stop"]),
1737
- onClick: t[2] ||= ye(() => {}, ["stop"]),
1738
- onKeydown: ve(ye(or, ["prevent", "stop"]), ["esc"])
1739
- }, [N.value.style.chart.layout.plots.stacking.overflow.menu.title ? (E(), b("div", ct, k(N.value.style.chart.layout.plots.stacking.overflow.menu.title), 1)) : y("", !0), (E(!0), b(_, null, me(er.value.hiddenDatapoints, (e) => (E(), b("button", {
1740
- key: `hidden-${e.id}`,
1741
- type: "button",
1742
- class: C(["vue-ui-hill__stack-overflow-menu-item", { readonly: N.value.readonly }]),
1743
- role: "option",
1744
- disabled: e.disabled,
1745
- "aria-label": `${e.label}, ${gr(e)}`,
1746
- onClick: ye((t) => fr(e), ["stop"]),
1747
- style: T({ cursor: Ut.value && !N.value.readonly ? "pointer" : "default" })
1748
- }, [
1749
- x("span", {
1750
- class: "vue-ui-hill__stack-overflow-menu-swatch",
1751
- style: T({ backgroundColor: e.color }),
1752
- "aria-hidden": "true"
1753
- }, null, 4),
1754
- x("span", ut, k(A(o)(e.label, H.value.ellipsisThresholdChars)), 1),
1755
- x("span", dt, k(gr(e)), 1)
1756
- ], 14, lt))), 128))], 44, st)) : y("", !0),
1757
- O(e.$slots, "analysis", { data: { ...Er.value } }, void 0, !0),
1758
- e.$slots.watermark ? (E(), b("div", ft, [O(e.$slots, "watermark", w(S({ isPrinting: A(zt) || A(Bt) || kt.value || Ot.value })), void 0, !0)])) : y("", !0),
1759
- N.value.loading ? (E(), b("div", pt, [N.value.loading ? O(e.$slots, "loading", {}, () => [le(A(vt), {
1760
- name: "spinner2",
1761
- stroke: N.value.style.chart.color,
1762
- "is-spin": !0
1763
- }, null, 8, ["stroke"])], !0, 0) : y("", !0)])) : y("", !0)
1764
- ], 44, xe));
1765
- }
1766
- }, [["__scopeId", "data-v-93662db0"]]);
1767
- //#endregion
1768
- export { be as n, mt as t };