vue-data-ui 3.25.8 → 3.25.10

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 (164) hide show
  1. package/dist/{BaseScanner-DZvpgOjM.js → BaseScanner-Dzc8VT3j.js} +6 -3
  2. package/dist/{PackageVersion-ekRvV3aF.js → PackageVersion-CZZayD-D.js} +1 -1
  3. package/dist/{PenAndPaper-KFzKlvbi.js → PenAndPaper-Cd3nItcO.js} +3 -3
  4. package/dist/{SlicerPreview-B6iHOC9L.js → SlicerPreview-Ccss7Vsq.js} +2 -2
  5. package/dist/{SparkTooltip-C-Y-mDrc.js → SparkTooltip-L3SliZbR.js} +1 -1
  6. package/dist/{UserOptions-2x4VklMW.js → UserOptions-qo_Tsqci.js} +1 -1
  7. package/dist/components/vue-ui-3d-bar.js +1 -1
  8. package/dist/components/vue-ui-age-pyramid.js +1 -1
  9. package/dist/components/vue-ui-annotator.js +1 -1
  10. package/dist/components/vue-ui-bullet.js +1 -1
  11. package/dist/components/vue-ui-bump.js +1 -1
  12. package/dist/components/vue-ui-candlestick.js +1 -1
  13. package/dist/components/vue-ui-carousel-table.js +1 -1
  14. package/dist/components/vue-ui-chestnut.js +1 -1
  15. package/dist/components/vue-ui-chord.js +1 -1
  16. package/dist/components/vue-ui-circle-pack.js +1 -1
  17. package/dist/components/vue-ui-cursor.js +1 -1
  18. package/dist/components/vue-ui-dag.js +1 -1
  19. package/dist/components/vue-ui-dashboard.js +1 -1
  20. package/dist/components/vue-ui-digits.js +1 -1
  21. package/dist/components/vue-ui-donut-evolution.js +1 -1
  22. package/dist/components/vue-ui-donut.js +1 -1
  23. package/dist/components/vue-ui-dumbbell.js +1 -1
  24. package/dist/components/vue-ui-flow.js +1 -1
  25. package/dist/components/vue-ui-funnel.js +1 -1
  26. package/dist/components/vue-ui-galaxy.js +1 -1
  27. package/dist/components/vue-ui-gauge.js +1 -1
  28. package/dist/components/vue-ui-geo.js +1 -1
  29. package/dist/components/vue-ui-gizmo.js +1 -1
  30. package/dist/components/vue-ui-heatmap.js +1 -1
  31. package/dist/components/vue-ui-hill.js +1 -1
  32. package/dist/components/vue-ui-history-plot.js +1 -1
  33. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  34. package/dist/components/vue-ui-kpi.js +1 -1
  35. package/dist/components/vue-ui-label.js +1 -1
  36. package/dist/components/vue-ui-molecule.js +1 -1
  37. package/dist/components/vue-ui-mood-radar.js +1 -1
  38. package/dist/components/vue-ui-nested-donuts.js +1 -1
  39. package/dist/components/vue-ui-onion.js +1 -1
  40. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  41. package/dist/components/vue-ui-quadrant.js +1 -1
  42. package/dist/components/vue-ui-quick-chart.js +1 -1
  43. package/dist/components/vue-ui-radar.js +1 -1
  44. package/dist/components/vue-ui-relation-circle.js +1 -1
  45. package/dist/components/vue-ui-ridgeline.js +1 -1
  46. package/dist/components/vue-ui-rings.js +1 -1
  47. package/dist/components/vue-ui-scatter.js +1 -1
  48. package/dist/components/vue-ui-skeleton.js +1 -1
  49. package/dist/components/vue-ui-spark-trend.js +1 -1
  50. package/dist/components/vue-ui-sparkbar.js +1 -1
  51. package/dist/components/vue-ui-sparkgauge.js +1 -1
  52. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  53. package/dist/components/vue-ui-sparkline.js +1 -1
  54. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  55. package/dist/components/vue-ui-stackbar.js +1 -1
  56. package/dist/components/vue-ui-stackline.js +1 -1
  57. package/dist/components/vue-ui-strip-plot.js +1 -1
  58. package/dist/components/vue-ui-table-heatmap.js +1 -1
  59. package/dist/components/vue-ui-table-sparkline.js +1 -1
  60. package/dist/components/vue-ui-table.js +1 -1
  61. package/dist/components/vue-ui-thermometer.js +1 -1
  62. package/dist/components/vue-ui-timer.js +1 -1
  63. package/dist/components/vue-ui-tiremarks.js +1 -1
  64. package/dist/components/vue-ui-treemap.js +1 -1
  65. package/dist/components/vue-ui-vertical-bar.js +1 -1
  66. package/dist/components/vue-ui-waffle.js +1 -1
  67. package/dist/components/vue-ui-wheel.js +1 -1
  68. package/dist/components/vue-ui-word-cloud.js +1 -1
  69. package/dist/components/vue-ui-world.js +1 -1
  70. package/dist/components/vue-ui-xy-canvas.js +1 -1
  71. package/dist/components/vue-ui-xy.js +1 -1
  72. package/dist/composables.js +1 -1
  73. package/dist/{dom-to-png-C6cQJ5Hq.js → dom-to-png-BR4imuKV.js} +1 -1
  74. package/dist/{geoProjections-CEo3dVaL.js → geoProjections-BYthUA8l.js} +2 -2
  75. package/dist/{img-DhGApYG0.js → img-BkMKbWsI.js} +1 -1
  76. package/dist/{package-C4XeEHJx.js → package-CYtJq7s7.js} +1 -1
  77. package/dist/{pdf-Di5yPEw9.js → pdf-BSOs_GZz.js} +1 -1
  78. package/dist/{render-common-CQUp12xB.js → render-common-CpHpPc5s.js} +1 -1
  79. package/dist/ssr/vue-ui-donut.js +1 -1
  80. package/dist/ssr/vue-ui-xy.js +1 -1
  81. package/dist/ssr.js +2 -2
  82. package/dist/style.css +1 -1
  83. package/dist/types/utils.d.ts +5 -5
  84. package/dist/types/vue-data-ui.d.ts +5 -5
  85. package/dist/{usePrinter-DISD7q5m.js → usePrinter-hohanNCX.js} +4 -4
  86. package/dist/{useTooltipPosition-DifeoeQW.js → useTooltipPosition-BCrtQa9H.js} +1 -1
  87. package/dist/{vue-data-ui-BChCkqtW.js → vue-data-ui-ChB3aXCO.js} +65 -65
  88. package/dist/vue-data-ui.js +66 -66
  89. package/dist/{vue-ui-3d-bar-BkVOy4Y_.js → vue-ui-3d-bar-DcXbkO19.js} +5 -5
  90. package/dist/{vue-ui-age-pyramid-1_yQ64LX.js → vue-ui-age-pyramid-Cnaxt9NI.js} +263 -251
  91. package/dist/{vue-ui-annotator-BO5ihHOB.js → vue-ui-annotator-BLYRy--7.js} +12 -12
  92. package/dist/{vue-ui-bullet-BF1FeBst.js → vue-ui-bullet-DOfD2TSb.js} +4 -4
  93. package/dist/{vue-ui-bump-ZtKya76Y.js → vue-ui-bump-DL2lDZbE.js} +3 -3
  94. package/dist/{vue-ui-candlestick-P-clTYIt.js → vue-ui-candlestick-ijujiVJ5.js} +453 -441
  95. package/dist/{vue-ui-carousel-table-BVS-4A3h.js → vue-ui-carousel-table-DFtWb2-C.js} +3 -3
  96. package/dist/{vue-ui-chestnut-DHOIbpib.js → vue-ui-chestnut-BGXr0s08.js} +5 -5
  97. package/dist/{vue-ui-chord-CX_Mc3Fp.js → vue-ui-chord-DgBzLfbv.js} +5 -5
  98. package/dist/{vue-ui-circle-pack-Caqvblsl.js → vue-ui-circle-pack-88qDJbt0.js} +494 -482
  99. package/dist/{vue-ui-cursor-BFF4tWUb.js → vue-ui-cursor-CcEB7Ypx.js} +1 -1
  100. package/dist/{vue-ui-dag-CtG3HUh4.js → vue-ui-dag-BeoFmTDs.js} +6 -6
  101. package/dist/{vue-ui-dashboard-DASHNFPT.js → vue-ui-dashboard-NOVcGMCa.js} +63 -63
  102. package/dist/{vue-ui-digits-BQWHzntO.js → vue-ui-digits-BGmT7H1z.js} +1 -1
  103. package/dist/{vue-ui-donut-DHP_lm0m.js → vue-ui-donut-CP7ilveE.js} +838 -826
  104. package/dist/{vue-ui-donut-vbqlIlij.js → vue-ui-donut-CtXzuWzy.js} +1 -1
  105. package/dist/{vue-ui-donut-evolution-Cio3lNLz.js → vue-ui-donut-evolution-D_-y7BZi.js} +6 -6
  106. package/dist/{vue-ui-dumbbell-C2lQhCfq.js → vue-ui-dumbbell-BR1Cn4wm.js} +4 -4
  107. package/dist/vue-ui-flow-Bm6TgD8I.js +1229 -0
  108. package/dist/{vue-ui-funnel-DDncfHgI.js → vue-ui-funnel-CQ0-9nZT.js} +3 -3
  109. package/dist/vue-ui-galaxy-DUto0BOw.js +1097 -0
  110. package/dist/{vue-ui-gauge-OQbET2bh.js → vue-ui-gauge-B6pyA6Jh.js} +4 -4
  111. package/dist/{vue-ui-geo-Ddw87hVT.js → vue-ui-geo-BlG7s8MH.js} +408 -396
  112. package/dist/{vue-ui-gizmo-DJVWEvWS.js → vue-ui-gizmo-BlyehpxE.js} +2 -2
  113. package/dist/{vue-ui-heatmap-BKG4xt6j.js → vue-ui-heatmap-DqbWkKAE.js} +405 -393
  114. package/dist/{vue-ui-hill-BAruBiw6.js → vue-ui-hill-CGE0NdNk.js} +7 -7
  115. package/dist/vue-ui-history-plot-CaxqIiTb.js +1710 -0
  116. package/dist/{vue-ui-horizontal-bar-CXT7-P_o.js → vue-ui-horizontal-bar-Ykwe4M1n.js} +401 -389
  117. package/dist/{vue-ui-kpi-uOGX20hs.js → vue-ui-kpi-B7Nfet0o.js} +1 -1
  118. package/dist/{vue-ui-label-C1UAzvAu.js → vue-ui-label-Cs4ZlAqr.js} +10 -10
  119. package/dist/{vue-ui-molecule-BcA064dR.js → vue-ui-molecule-DWq98OSc.js} +347 -335
  120. package/dist/{vue-ui-mood-radar-CXtC0IqT.js → vue-ui-mood-radar-DDfimq6c.js} +5 -5
  121. package/dist/{vue-ui-nested-donuts-BFE0oXF_.js → vue-ui-nested-donuts-Bt-r6uXS.js} +360 -348
  122. package/dist/vue-ui-onion-D8gOhQHP.js +1247 -0
  123. package/dist/{vue-ui-parallel-coordinate-plot-5kKVnNmE.js → vue-ui-parallel-coordinate-plot-BbPbJiiu.js} +387 -375
  124. package/dist/{vue-ui-quadrant-BPg8L6Sw.js → vue-ui-quadrant-BJlf3qW1.js} +418 -406
  125. package/dist/{vue-ui-quick-chart-DQ_rhjqc.js → vue-ui-quick-chart-Cb8x00-X.js} +550 -538
  126. package/dist/{vue-ui-radar-C65wD7cW.js → vue-ui-radar-30PF-qqr.js} +330 -318
  127. package/dist/{vue-ui-relation-circle-nZaZcCh1.js → vue-ui-relation-circle-CRiC4PnL.js} +4 -4
  128. package/dist/{vue-ui-ridgeline-Bsi2hN14.js → vue-ui-ridgeline-CSs4Tq_c.js} +4 -4
  129. package/dist/{vue-ui-rings-DkCzxDyQ.js → vue-ui-rings-BqRWK5rY.js} +321 -309
  130. package/dist/{vue-ui-scatter-V01qkcN8.js → vue-ui-scatter-Bsh6jbdW.js} +584 -572
  131. package/dist/{vue-ui-skeleton-BgYtv_I2.js → vue-ui-skeleton-DbPSsEKV.js} +1 -1
  132. package/dist/{vue-ui-spark-trend-Dm1OyGyr.js → vue-ui-spark-trend--8QokOII.js} +2 -2
  133. package/dist/{vue-ui-sparkbar-D3hChHHS.js → vue-ui-sparkbar-DkX9Demg.js} +2 -2
  134. package/dist/{vue-ui-sparkgauge-CAeJapmG.js → vue-ui-sparkgauge-Ci_xD5B7.js} +2 -2
  135. package/dist/{vue-ui-sparkhistogram-ZIo_Vg7F.js → vue-ui-sparkhistogram-Qe3ZCPRd.js} +2 -2
  136. package/dist/{vue-ui-sparkline-BjvSeM83.js → vue-ui-sparkline-BwldgOYW.js} +2 -2
  137. package/dist/vue-ui-sparkstackbar-Divd0hL_.js +750 -0
  138. package/dist/vue-ui-stackbar-BWPSGzN-.js +2369 -0
  139. package/dist/vue-ui-stackline-BQroSnwZ.js +2483 -0
  140. package/dist/vue-ui-strip-plot-BCUPHkCp.js +1752 -0
  141. package/dist/{vue-ui-table-C8cvK-x_.js → vue-ui-table-DJeXLYly.js} +2 -2
  142. package/dist/{vue-ui-table-heatmap-BSUab4fG.js → vue-ui-table-heatmap-D5F5bLx5.js} +2 -2
  143. package/dist/{vue-ui-table-sparkline-Dam9BFsU.js → vue-ui-table-sparkline-DCm8S2uK.js} +2 -2
  144. package/dist/{vue-ui-thermometer-zyBeCINd.js → vue-ui-thermometer-xu4R8d2f.js} +4 -4
  145. package/dist/{vue-ui-timer-CDXczagK.js → vue-ui-timer-i_3bMu3h.js} +1 -1
  146. package/dist/{vue-ui-tiremarks-CG8LNC9c.js → vue-ui-tiremarks-DGuMI0yH.js} +4 -4
  147. package/dist/{vue-ui-treemap-DfDRwoZc.js → vue-ui-treemap-Bvl7elni.js} +311 -299
  148. package/dist/vue-ui-waffle-CVuYg0yU.js +1633 -0
  149. package/dist/{vue-ui-wheel-DDJIPE_z.js → vue-ui-wheel-DqHD09iA.js} +4 -4
  150. package/dist/{vue-ui-word-cloud-DBOXRp-e.js → vue-ui-word-cloud-BDCuTQ8Q.js} +385 -372
  151. package/dist/{vue-ui-world-CiIyp7WH.js → vue-ui-world-B0oVwEDj.js} +474 -462
  152. package/dist/{vue-ui-xy-s_IZ573M.js → vue-ui-xy-BJJi0E4D.js} +1 -1
  153. package/dist/{vue-ui-xy-AGYE0Vsz.js → vue-ui-xy-D1dPd68D.js} +1447 -1432
  154. package/dist/{vue-ui-xy-canvas-MOMyUdJg.js → vue-ui-xy-canvas-R2xbgDOy.js} +523 -511
  155. package/package.json +3 -3
  156. package/dist/vue-ui-flow-Dmnz4LCl.js +0 -1217
  157. package/dist/vue-ui-galaxy-Dw7TyOH0.js +0 -1085
  158. package/dist/vue-ui-history-plot-BKUg8Gz_.js +0 -1698
  159. package/dist/vue-ui-onion-DhedgEnV.js +0 -1235
  160. package/dist/vue-ui-sparkstackbar-DGQcpWK4.js +0 -738
  161. package/dist/vue-ui-stackbar-D0qmFn5Y.js +0 -2355
  162. package/dist/vue-ui-stackline-BBtEVl9V.js +0 -2469
  163. package/dist/vue-ui-strip-plot-CkU-nCt4.js +0 -1740
  164. package/dist/vue-ui-waffle-D6_cGi1-.js +0 -1621
@@ -0,0 +1,2369 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { $ as t, Ct as n, D as r, G as a, Jt as o, K as s, Lt as c, Pt as l, S as u, X as d, Yt as ee, Z as te, Zt as ne, _ as re, bt as ie, c as ae, ft as oe, ht as se, i as ce, jt as le, lt as ue, nt as de, pt as fe, q as pe, qt as me, r as he, st as ge, t as _e, v as ve, w as ye } from "./lib-Dql7cqyA.js";
3
+ import { n as be, t as xe } from "./useHints-Dq_w2E8B.js";
4
+ import { n as Se, r as Ce, t as we } from "./useTimeLabels-d2f-W1L4.js";
5
+ import { t as Te } from "./useConfig-D32D002m.js";
6
+ import { t as Ee } from "./usePrinter-hohanNCX.js";
7
+ import { n as De, t as Oe } from "./BaseScanner-Dzc8VT3j.js";
8
+ import { t as ke } from "./useNestedProp-Chvyfpl-.js";
9
+ import { t as Ae } from "./useThemeCheck-C43Tcqmk.js";
10
+ import { t as je } from "./useChartExport-iwOqiIWX.js";
11
+ import { t as Me } from "./useTransitions-g_zBREk2.js";
12
+ import { t as Ne } from "./useStableElementSize-C7KADDKj.js";
13
+ import { t as Pe } from "./useTimeLabelCollider-AEcY4Ioe.js";
14
+ import { t as Fe } from "./img-BkMKbWsI.js";
15
+ import { n as Ie } from "./Title-CPHi-evi.js";
16
+ import { t as Le } from "./Shape-CIqU-p2F.js";
17
+ import { t as Re } from "./_plugin-vue_export-helper-B3ysoDQm.js";
18
+ import { l as ze, t as Be } from "./useResponsive-ZtArZtUf.js";
19
+ import { t as Ve } from "./DefGrad-DVBqDjhO.js";
20
+ import { t as He } from "./SlicerPreview-Ccss7Vsq.js";
21
+ import { t as Ue } from "./BaseLegendToggle-CXQrLjd-.js";
22
+ import { t as We } from "./A11yDataTable-DdRsVULz.js";
23
+ import { t as Ge } from "./useUserOptionState-DK-_1ddE.js";
24
+ import { t as Ke } from "./useChartAccessibility-DYqac8yF.js";
25
+ import { t as qe } from "./Legend-X4kF4PvW.js";
26
+ import { t as Je } from "./vue_ui_stackbar-COOrQQdK.js";
27
+ import { Fragment as f, Teleport as Ye, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as Xe, createSlots as Ze, createTextVNode as Qe, createVNode as $e, defineAsyncComponent as et, guardReactiveProps as _, mergeProps as tt, nextTick as nt, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as rt, onMounted as it, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as at, shallowRef as ot, toDisplayString as T, toRefs as st, unref as E, useSlots as ct, watch as lt, watchEffect as ut, withCtx as D } from "vue";
28
+ //#region src/components/vue-ui-stackbar.vue
29
+ var dt = /* @__PURE__ */ e({ default: () => cn }), ft = ["id"], pt = ["id"], mt = ["id"], ht = { style: { position: "relative" } }, gt = [
30
+ "xmlns",
31
+ "aria-describedby",
32
+ "viewBox"
33
+ ], _t = [
34
+ "x",
35
+ "y",
36
+ "width",
37
+ "height"
38
+ ], vt = { key: 1 }, yt = [
39
+ "x",
40
+ "y",
41
+ "width",
42
+ "height",
43
+ "stroke",
44
+ "stroke-width",
45
+ "stroke-linecap",
46
+ "stroke-linejoin",
47
+ "stroke-dasharray"
48
+ ], bt = [
49
+ "x1",
50
+ "x2",
51
+ "y1",
52
+ "y2",
53
+ "stroke",
54
+ "stroke-width",
55
+ "stroke-dasharray"
56
+ ], xt = [
57
+ "x1",
58
+ "x2",
59
+ "y1",
60
+ "y2",
61
+ "stroke",
62
+ "stroke-width",
63
+ "stroke-dasharray"
64
+ ], St = [
65
+ "x1",
66
+ "x2",
67
+ "y1",
68
+ "y2",
69
+ "stroke",
70
+ "stroke-width",
71
+ "stroke-dasharray"
72
+ ], Ct = [
73
+ "x1",
74
+ "x2",
75
+ "y1",
76
+ "y2",
77
+ "stroke",
78
+ "stroke-width",
79
+ "stroke-dasharray"
80
+ ], wt = { key: 0 }, Tt = [
81
+ "x",
82
+ "y",
83
+ "height",
84
+ "rx",
85
+ "width",
86
+ "fill",
87
+ "stroke",
88
+ "stroke-width"
89
+ ], Et = { key: 0 }, Dt = [
90
+ "x",
91
+ "y",
92
+ "height",
93
+ "rx",
94
+ "width",
95
+ "fill",
96
+ "stroke",
97
+ "stroke-width"
98
+ ], Ot = [
99
+ "x",
100
+ "y",
101
+ "width",
102
+ "rx",
103
+ "height",
104
+ "fill",
105
+ "stroke",
106
+ "stroke-width"
107
+ ], kt = { key: 0 }, At = [
108
+ "x",
109
+ "y",
110
+ "width",
111
+ "rx",
112
+ "height",
113
+ "fill",
114
+ "stroke",
115
+ "stroke-width"
116
+ ], jt = [
117
+ "x1",
118
+ "x2",
119
+ "y1",
120
+ "y2",
121
+ "stroke",
122
+ "stroke-width"
123
+ ], Mt = [
124
+ "x1",
125
+ "x2",
126
+ "y1",
127
+ "y2",
128
+ "stroke",
129
+ "stroke-width"
130
+ ], Nt = [
131
+ "x",
132
+ "y",
133
+ "font-size",
134
+ "fill",
135
+ "font-weight"
136
+ ], Pt = [
137
+ "transform",
138
+ "font-size",
139
+ "fill",
140
+ "font-weight"
141
+ ], Ft = [
142
+ "transform",
143
+ "font-size",
144
+ "fill",
145
+ "font-weight"
146
+ ], It = [
147
+ "transform",
148
+ "font-size",
149
+ "font-weight",
150
+ "fill"
151
+ ], Lt = [
152
+ "transform",
153
+ "font-size",
154
+ "fill",
155
+ "font-weight"
156
+ ], Rt = [
157
+ "transform",
158
+ "font-size",
159
+ "font-weight",
160
+ "fill"
161
+ ], zt = ["stroke", "d"], Bt = [
162
+ "transform",
163
+ "font-size",
164
+ "font-weight",
165
+ "fill",
166
+ "text-anchor"
167
+ ], Vt = ["d", "stroke"], Ht = [
168
+ "font-size",
169
+ "font-weight",
170
+ "fill",
171
+ "text-anchor",
172
+ "transform"
173
+ ], Ut = { key: 0 }, Wt = { key: 1 }, Gt = [
174
+ "text-anchor",
175
+ "font-size",
176
+ "font-weight",
177
+ "fill",
178
+ "transform",
179
+ "onClick"
180
+ ], Kt = [
181
+ "text-anchor",
182
+ "font-size",
183
+ "fill",
184
+ "transform",
185
+ "innerHTML",
186
+ "onClick"
187
+ ], qt = { key: 0 }, Jt = { key: 1 }, Yt = [
188
+ "font-size",
189
+ "font-weight",
190
+ "fill",
191
+ "stroke",
192
+ "transform",
193
+ "onClick"
194
+ ], Xt = [
195
+ "font-size",
196
+ "font-weight",
197
+ "fill",
198
+ "transform",
199
+ "onClick",
200
+ "innerHTML"
201
+ ], Zt = [
202
+ "x",
203
+ "y",
204
+ "width",
205
+ "height",
206
+ "onClick",
207
+ "onMouseenter",
208
+ "onMouseleave",
209
+ "fill"
210
+ ], Qt = [
211
+ "x",
212
+ "y",
213
+ "width",
214
+ "height",
215
+ "onClick",
216
+ "onMouseenter",
217
+ "onMouseleave",
218
+ "fill"
219
+ ], $t = ["data-start", "data-end"], en = {
220
+ key: 0,
221
+ style: {
222
+ position: "absolute",
223
+ top: "100%",
224
+ left: "0",
225
+ width: "100%"
226
+ },
227
+ "data-dom-to-png-ignore": "",
228
+ "aria-hidden": "true"
229
+ }, tn = {
230
+ key: 4,
231
+ class: "vue-data-ui-watermark"
232
+ }, nn = [
233
+ "x",
234
+ "y",
235
+ "height",
236
+ "width",
237
+ "fill",
238
+ "stroke"
239
+ ], rn = ["id"], an = ["onClick"], on = { key: 0 }, sn = { key: 1 }, cn = /*#__PURE__*/ Re({
240
+ __name: "vue-ui-stackbar",
241
+ props: {
242
+ config: {
243
+ type: Object,
244
+ default() {
245
+ return {};
246
+ }
247
+ },
248
+ dataset: {
249
+ type: Array,
250
+ default() {
251
+ return [];
252
+ }
253
+ },
254
+ selectedXIndex: {
255
+ type: Number,
256
+ default: void 0
257
+ }
258
+ },
259
+ emits: [
260
+ "selectDatapoint",
261
+ "selectLegend",
262
+ "selectTimeLabel",
263
+ "selectX",
264
+ "copyAlt"
265
+ ],
266
+ setup(e, { expose: Re, emit: dt }) {
267
+ let cn = et(() => import("./Tooltip-hhrkQ3Lk.js")), ln = et(() => import("./BaseIcon-D8R6_sKH.js").then((e) => e.n)), un = et(() => import("./vue-ui-accordion-DmkL8A59.js").then((e) => e.n)), dn = et(() => import("./DataTable-oiM9uWrQ.js")), fn = et(() => import("./PenAndPaper-Cd3nItcO.js").then((e) => e.t)), pn = et(() => import("./UserOptions-qo_Tsqci.js").then((e) => e.n)), mn = et(() => import("./PackageVersion-CZZayD-D.js").then((e) => e.t)), hn = et(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), { vue_ui_stackbar: gn } = Te(), { isThemeValid: _n, warnInvalidTheme: vn } = Ae(), yn = ct(), O = e, bn = dt, xn = p({
268
+ get() {
269
+ return !!O.dataset && O.dataset.length;
270
+ },
271
+ set(e) {
272
+ return e;
273
+ }
274
+ }), k = S(null), A = S(pe()), Sn = S(!1), Cn = S(null), wn = S(""), j = S([]), Tn = S(0), En = S(null), Dn = S(null), On = S(null), kn = S(null), An = S(!1), M = S(null), jn = S(!1), Mn = S(0), Nn = S(0), Pn = S(0), Fn = S(!1), In = S(null), Ln = S(null), Rn = S(null), zn = S(null), Bn = S(null), Vn = S(null), Hn = S(null), Un = S(null), Wn = ot(null), Gn = S(!1), Kn = S(0), qn = S(0), N = S(null), Jn = S({
275
+ x: 0,
276
+ y: 0
277
+ }), Yn = S("pointer"), Xn = Ne({
278
+ elementRef: Wn,
279
+ minimumWidth: 2,
280
+ minimumHeight: 2,
281
+ stableFramesRequired: 2,
282
+ once: !1,
283
+ onSizeAccepted: () => {
284
+ $n();
285
+ }
286
+ });
287
+ function Zn() {
288
+ Wn.value = k.value?.parentNode ?? null;
289
+ }
290
+ function Qn() {
291
+ return new Promise((e) => {
292
+ requestAnimationFrame(() => {
293
+ requestAnimationFrame(e);
294
+ });
295
+ });
296
+ }
297
+ async function $n() {
298
+ let e = ++qn.value;
299
+ Gn.value = !1, await nt(), await Qn(), await Qn(), e === qn.value && (Kn.value += 1, Gn.value = !0);
300
+ }
301
+ let er = S(null);
302
+ it(() => {
303
+ Fn.value = !0, Zn(), Xn.start(), Tr();
304
+ });
305
+ let P = S(dr()), F = p(() => P.value.userOptions), I = p(() => P.value.style.chart.grid), L = p(() => P.value.style.chart.bars), R = p(() => P.value.style.chart.grid.x.timeLabels), z = p(() => P.value.style.chart.tooltip), B = p(() => P.value.style.chart);
306
+ be({
307
+ config: () => P.value,
308
+ dataset: () => O.dataset,
309
+ component: "VueUiStackbar",
310
+ rules: [
311
+ xe.emptyArray,
312
+ {
313
+ test: (e) => e.some((e) => e.series.length > 60),
314
+ message: [
315
+ "👀 Some series have > 60 datapoints. Consider",
316
+ "",
317
+ "▶️ Using VueUiStackline instead, for better readability.",
318
+ "",
319
+ "▶️ Aggregating data to larger time units, to reduce the number of datapoints.",
320
+ "",
321
+ "▶️ Using filters to constraint the data to a specific time range."
322
+ ]
323
+ },
324
+ {
325
+ test: (e) => e.length > 6,
326
+ message: [
327
+ "👀 The number of series > 6, which can make the chart hard to read. Consider:",
328
+ "",
329
+ "▶️ Grouping small values into an \"Other\" category.",
330
+ "",
331
+ "▶️ Using filters to let users choose a maximum number of series to display."
332
+ ]
333
+ }
334
+ ]
335
+ });
336
+ let { transitionEnabled: V } = Me({
337
+ config: () => P.value.transitions,
338
+ dataset: () => O.dataset
339
+ }), H = p(() => P.value.userOptions.useCursorPointer), tr = p(() => ne({
340
+ defaultConfig: {
341
+ userOptions: { show: !1 },
342
+ useCssAnimation: !1,
343
+ table: { show: !1 },
344
+ tooltip: { show: !1 },
345
+ style: { chart: {
346
+ backgroundColor: "#99999930",
347
+ bars: {
348
+ totalValues: { show: !1 },
349
+ dataLabels: { show: !1 }
350
+ },
351
+ grid: {
352
+ frame: { stroke: "#6A6A6A" },
353
+ scale: {
354
+ scaleMin: 0,
355
+ scaleMax: 40
356
+ },
357
+ x: {
358
+ axisColor: "#6A6A6A",
359
+ linesColor: "#6A6A6A",
360
+ axisName: { show: !1 },
361
+ timeLabels: { show: !1 }
362
+ },
363
+ y: {
364
+ axisColor: "#6A6A6A",
365
+ linesColor: "#6A6A6A",
366
+ axisName: { show: !1 },
367
+ axisLabels: { show: !1 }
368
+ }
369
+ },
370
+ legend: { backgroundColor: "transparent" },
371
+ padding: {
372
+ left: 24,
373
+ right: 24,
374
+ bottom: 12
375
+ },
376
+ zoom: {
377
+ show: !1,
378
+ startIndex: null,
379
+ endIndex: null
380
+ }
381
+ } }
382
+ },
383
+ userConfig: P.value.skeletonConfig ?? {}
384
+ })), { loading: nr, FINAL_DATASET: rr, manualLoading: ir } = De({
385
+ ...st(O),
386
+ FINAL_CONFIG: P,
387
+ prepareConfig: dr,
388
+ callback: () => {
389
+ Promise.resolve().then(async () => {
390
+ (!B.value.zoom.keepState || !aa.value || J.value.start === 0 && J.value.end === 0) && await oa();
391
+ });
392
+ },
393
+ skeletonDataset: O.config?.skeletonDataset ?? [{
394
+ name: "",
395
+ series: [
396
+ 2,
397
+ 3,
398
+ 5,
399
+ 8,
400
+ 13,
401
+ 21
402
+ ],
403
+ color: "#BABABA"
404
+ }, {
405
+ name: "",
406
+ series: [
407
+ 1,
408
+ 2,
409
+ 3,
410
+ 5,
411
+ 8,
412
+ 13
413
+ ],
414
+ color: "#CACACA"
415
+ }],
416
+ skeletonConfig: ne({
417
+ defaultConfig: P.value,
418
+ userConfig: tr.value
419
+ })
420
+ }), { userOptionsVisible: ar, setUserOptionsVisibility: or, keepUserOptionState: sr } = Ge({ config: P.value }), { svgRef: cr } = Ke({ config: B.value.title });
421
+ function lr() {
422
+ or(!0);
423
+ }
424
+ function ur() {
425
+ or(!1), bn("selectX", {
426
+ index: null,
427
+ indexLabel: null,
428
+ dataset: null
429
+ }), M.value = null, N.value = null, Sn.value = !1;
430
+ }
431
+ function dr() {
432
+ let e = ke({
433
+ userConfig: O.config,
434
+ defaultConfig: gn
435
+ }), t = {};
436
+ O.config && ie(O.config, "style.chart.grid.x.timeLabels.showFirstAndLast") && (e.style.chart.grid.x.timeLabels.showFirstAndLast = !!O.config.style.chart.grid.x.timeLabels.showFirstAndLast);
437
+ let n = e.theme;
438
+ if (n) {
439
+ if (!_n.value(e)) vn(e), t = e;
440
+ else {
441
+ let r = ke({
442
+ userConfig: Je[n] || O.config,
443
+ defaultConfig: e
444
+ });
445
+ t = {
446
+ ...ke({
447
+ userConfig: O.config,
448
+ defaultConfig: r
449
+ }),
450
+ customPalette: e.customPalette.length ? e.customPalette : ee[n] || c
451
+ };
452
+ }
453
+ } else t = e;
454
+ return t;
455
+ }
456
+ let fr = p(() => L.value.dataLabels.hideUnderValue != null), pr = p(() => L.value.dataLabels.hideUnderPercentage != null);
457
+ function mr(e) {
458
+ let t = te(e);
459
+ return t?.style?.chart && delete t.style.chart.tooltip, JSON.stringify(t);
460
+ }
461
+ let hr = mr(O.config);
462
+ lt(() => O.config, (e, t) => {
463
+ let n = mr(e), r = n !== hr;
464
+ hr = n;
465
+ let a = dr();
466
+ if (!r) {
467
+ P.value.style.chart.tooltip = a.style.chart.tooltip, U.value.showTooltip = P.value.style.chart.tooltip.show;
468
+ return;
469
+ }
470
+ nr.value || (P.value = a), ar.value = !P.value.userOptions.showOnChartHover, U.value.dataLabels.show = L.value.dataLabels.show, U.value.showTable = P.value.table.show, U.value.showTooltip = z.value.show, Tr({ resetSlicer: !B.value.zoom.keepState }), Mn.value += 1, Nn.value += 1, Pn.value += 1, Zn(), !B.value.zoom.keepState || !aa.value || J.value.start === 0 && J.value.end === 0 ? oa() : Hr();
471
+ }, { deep: !0 }), lt(() => O.dataset, (e) => {
472
+ Array.isArray(e) && e.length > 0 && (ir.value = !1), Zn(), B.value.zoom.keepState ? Hr() : Gr();
473
+ }, { deep: !0 });
474
+ let U = S({
475
+ dataLabels: { show: L.value.dataLabels.show },
476
+ showTable: P.value.table.show,
477
+ showTooltip: z.value.show
478
+ });
479
+ lt(P, () => {
480
+ U.value = {
481
+ dataLabels: { show: L.value.dataLabels.show },
482
+ showTable: P.value.table.show,
483
+ showTooltip: z.value.show
484
+ };
485
+ }, { immediate: !0 });
486
+ let { isPrinting: gr, isImaging: _r, generatePdf: vr, generateImage: yr } = Ee({
487
+ elementId: `stackbar_${A.value}`,
488
+ fileName: B.value.title.text || "vue-ui-stackbar",
489
+ options: P.value.userOptions.print
490
+ }), W = S({
491
+ width: B.value.width,
492
+ height: B.value.height,
493
+ paddingRatio: {
494
+ top: B.value.padding.top / B.value.height,
495
+ right: B.value.padding.right / B.value.width,
496
+ bottom: B.value.padding.bottom / B.value.height,
497
+ left: B.value.padding.left / B.value.width
498
+ }
499
+ }), br = p(() => ye(P.value.customPalette)), xr = ot(null), Sr = ot(null), Cr = S(null), wr = p(() => P.value.debug);
500
+ function Tr({ resetSlicer: e = !0 } = {}) {
501
+ if (l(O.dataset) ? (de({
502
+ componentName: "VueUiStackbar",
503
+ type: "dataset",
504
+ debug: wr.value
505
+ }), ir.value = !0) : O.dataset.forEach((e, t) => {
506
+ se({
507
+ datasetObject: e,
508
+ requiredAttributes: ["name", "series"]
509
+ }).forEach((e) => {
510
+ xn.value = !1, de({
511
+ componentName: "VueUiStackbar",
512
+ type: "datasetSerieAttribute",
513
+ property: e,
514
+ index: t,
515
+ debug: wr.value
516
+ }), ir.value = !0;
517
+ });
518
+ }), l(O.dataset) || (ir.value = P.value.loading), setTimeout(() => {
519
+ jn.value = !0;
520
+ }, 10), P.value.responsive) {
521
+ let e = ze(() => {
522
+ jn.value = !1;
523
+ let { width: e, height: t } = Be({
524
+ chart: k.value,
525
+ title: B.value.title.text ? En.value : null,
526
+ legend: B.value.legend.show ? Dn.value : null,
527
+ slicer: B.value.zoom.show && q.value > 6 ? On.value.$el : null,
528
+ source: kn.value
529
+ });
530
+ requestAnimationFrame(() => {
531
+ W.value.width = e, W.value.height = t - 12, clearTimeout(Cr.value), Cr.value = setTimeout(() => {
532
+ jn.value = !0;
533
+ }, 10);
534
+ });
535
+ });
536
+ xr.value && (Sr.value && xr.value.unobserve(Sr.value), xr.value.disconnect()), xr.value = new ResizeObserver(e), Sr.value = k.value.parentNode, xr.value.observe(Sr.value);
537
+ }
538
+ $n(), e && oa();
539
+ }
540
+ rt(() => {
541
+ Xn.stop(), xr.value && (Sr.value && xr.value.unobserve(Sr.value), xr.value.disconnect());
542
+ });
543
+ let Er = p(() => I.value.y.position === "right");
544
+ function Dr() {
545
+ let e = 0;
546
+ P.value.orientation === "vertical" && Bn.value && (e = Array.from(Bn.value.querySelectorAll("text")).reduce((e, t) => {
547
+ let n = t.getComputedTextLength();
548
+ return n > e ? n : e;
549
+ }, 0)), P.value.orientation === "horizontal" && Vn.value && (e = Array.from(Vn.value.querySelectorAll("text")).reduce((e, t) => {
550
+ let n = t.getComputedTextLength();
551
+ return n > e ? n : e;
552
+ }, 0));
553
+ let t = zn.value ? zn.value.getBoundingClientRect().width + I.value.y.axisName.fontSize + I.value.y.axisName.offsetX : 0;
554
+ return {
555
+ left: Er.value ? 0 : e + t,
556
+ right: Er.value ? e + t : 0,
557
+ scaleLabelsWidth: e,
558
+ yAxisLabelWidth: t
559
+ };
560
+ }
561
+ let Or = S(0), kr = S(0), Ar = ze((e) => {
562
+ kr.value = e + L.value.totalValues.fontSize;
563
+ }, 100);
564
+ function jr() {
565
+ if (P.value.orientation !== "horizontal") return 0;
566
+ let e = Un.value;
567
+ if (!e) return 0;
568
+ let t = Array.from(e.querySelectorAll("text"));
569
+ if (!t.length) return 0;
570
+ let n = -Infinity;
571
+ for (let e of t) try {
572
+ let t = e.getBBox(), r = t.x + t.width;
573
+ r > n && (n = r);
574
+ } catch {}
575
+ return Math.max(0, n - (G.value?.right ?? 0));
576
+ }
577
+ ut((e) => {
578
+ if (P.value.orientation !== "horizontal") return;
579
+ let t = Un.value;
580
+ if (!t) return;
581
+ let n = () => {
582
+ let e = jr();
583
+ Ar(e);
584
+ };
585
+ n();
586
+ let r = new ResizeObserver(n);
587
+ r.observe(t);
588
+ let a = new MutationObserver(n);
589
+ a.observe(t, {
590
+ childList: !0,
591
+ subtree: !0,
592
+ characterData: !0
593
+ }), e(() => {
594
+ r.disconnect(), a.disconnect();
595
+ });
596
+ }), rt(() => {
597
+ Or.value = 0, kr.value = 0;
598
+ });
599
+ let Mr = S(0), Nr = S(0);
600
+ function Pr(e) {
601
+ let t = Number.isFinite(e) ? e : 0;
602
+ Mr.value !== t && (Mr.value = t);
603
+ }
604
+ function Fr() {
605
+ let e = P.value.orientation === "vertical" ? Vn.value : Bn.value;
606
+ if (!e) {
607
+ Pr(0);
608
+ return;
609
+ }
610
+ try {
611
+ Pr(e.getBBox()?.height);
612
+ } catch {
613
+ Pr(0);
614
+ }
615
+ }
616
+ function Ir() {
617
+ Nr.value && cancelAnimationFrame(Nr.value), Nr.value = requestAnimationFrame(() => {
618
+ requestAnimationFrame(() => {
619
+ Fr();
620
+ });
621
+ });
622
+ }
623
+ rt(() => {
624
+ Nr.value && cancelAnimationFrame(Nr.value);
625
+ });
626
+ let Lr = p(() => {
627
+ let e = 0;
628
+ if (Rn.value) try {
629
+ e = Rn.value.getBBox().height;
630
+ } catch {
631
+ e = 0;
632
+ }
633
+ let t = R.value.show ? Mr.value : 0;
634
+ return e + t;
635
+ }), G = p(() => {
636
+ Kn.value;
637
+ let { height: e, width: t } = W.value, { right: n } = W.value.paddingRatio, r = L.value.totalValues.show && O.dataset && O.dataset.length > 1 ? L.value.totalValues.fontSize * 1.3 : 0, a = 0, o = 0, s = 0, c = 0;
638
+ if (I.value.y.axisLabels.show) {
639
+ let e = Dr();
640
+ a = e.left, o = e.right, s = e.scaleLabelsWidth, c = e.yAxisLabelWidth;
641
+ }
642
+ let l = B.value.padding.top + r, u = t - t * n - kr.value - o, d = e - B.value.padding.bottom - Lr.value - r, ee = B.value.padding.left + a, te = t - ee - t * n - kr.value - o, ne = e - l - B.value.padding.bottom - Lr.value - r;
643
+ return {
644
+ chartHeight: e,
645
+ chartWidth: t,
646
+ top: l,
647
+ right: u,
648
+ bottom: d,
649
+ left: ee,
650
+ width: Math.max(0, te),
651
+ height: Math.max(0, ne),
652
+ offsetLeft: a,
653
+ offsetRightAxis: o,
654
+ scaleLabelsWidth: s,
655
+ yAxisLabelWidth: c
656
+ };
657
+ }), Rr = p(() => {
658
+ let { left: e, top: t, width: n, height: r } = G.value, a = J.value.start, o = J.value.end, s = Math.max(1, o - a), c = Math.max(0, Math.min(s, (Y.value.start ?? a) - a)), l = Math.max(0, Math.min(s, (Y.value.end ?? o) - a)), u = Math.max(0, l - c), d = {
659
+ fill: B.value.zoom.preview.fill,
660
+ stroke: B.value.zoom.preview.stroke,
661
+ "stroke-width": B.value.zoom.preview.strokeWidth,
662
+ "stroke-dasharray": B.value.zoom.preview.strokeDasharray,
663
+ "stroke-linecap": "round",
664
+ "stroke-linejoin": "round",
665
+ style: {
666
+ pointerEvents: "none",
667
+ transition: "none !important",
668
+ animation: "none !important"
669
+ }
670
+ };
671
+ if (P.value.orientation === "horizontal") {
672
+ let a = r / s;
673
+ return {
674
+ x: e,
675
+ y: t + c * a,
676
+ width: n,
677
+ height: u * a,
678
+ ...d
679
+ };
680
+ }
681
+ {
682
+ let a = n / s;
683
+ return {
684
+ x: e + c * a,
685
+ y: t,
686
+ width: u * a,
687
+ height: r,
688
+ ...d
689
+ };
690
+ }
691
+ }), K = p(() => rr.value.map((e, t) => {
692
+ let n = pe(), r = String(e.key ?? e.id ?? e.name ?? n), a = u(e.color) || br.value[t] || c[t] || c[t % c.length];
693
+ return {
694
+ ...e,
695
+ datasetKey: r,
696
+ series: JSON.parse(JSON.stringify(e.series)).map((e) => L.value.distributed ? Math.abs(e) : e),
697
+ signedSeries: e.series.map((e) => e >= 0 ? 1 : -1),
698
+ absoluteIndex: t,
699
+ id: n,
700
+ color: a
701
+ };
702
+ })), q = p(() => {
703
+ let e = Math.max(...K.value.filter((e) => !j.value.includes(e.id)).map((e) => e.series.length));
704
+ return isFinite(e) ? e : Math.max(...K.value.map((e) => e.series.length));
705
+ });
706
+ function zr(e) {
707
+ er.value = e;
708
+ }
709
+ let J = S({
710
+ start: 0,
711
+ end: Math.max(...rr.value.map((e) => e.series.length))
712
+ }), Y = S({
713
+ start: 0,
714
+ end: Math.max(...rr.value.map((e) => e.series.length))
715
+ }), Br = p(() => B.value.zoom.preview.enable && (Y.value.start !== J.value.start || Y.value.end !== J.value.end));
716
+ function Vr(e, t) {
717
+ Y.value[e] = t;
718
+ }
719
+ function Hr() {
720
+ let e = q.value, t = Math.max(0, Math.min(J.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(J.value.end ?? e, e));
721
+ (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), J.value.start = t, J.value.end = n, Y.value.start = t, Y.value.end = n, On.value && (On.value.setStartValue(t), On.value.setEndValue(n));
722
+ }
723
+ let Ur = S(null);
724
+ function Wr() {
725
+ return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
726
+ }
727
+ rt(() => {
728
+ Ur.value && cancelAnimationFrame(Ur.value);
729
+ });
730
+ async function Gr({ force: e = !1 } = {}) {
731
+ if (B.value.zoom.keepState && !e && aa.value && (J.value.start !== 0 || J.value.end !== 0)) {
732
+ Hr();
733
+ return;
734
+ }
735
+ oa(), await nt(), Ur.value && cancelAnimationFrame(Ur.value), Ur.value = requestAnimationFrame(async () => {
736
+ await Wr(), oa();
737
+ });
738
+ }
739
+ let X = p(() => {
740
+ let e;
741
+ return e = P.value.orientation === "vertical" ? G.value.width / (J.value.end - J.value.start) : G.value.height / (J.value.end - J.value.start), e <= 0 ? 0 : e;
742
+ }), Kr = p(() => me(K.value.filter((e) => !j.value.includes(e.id))).slice(J.value.start, J.value.end)), qr = p(() => j.value.length === K.value.length), Jr = p(() => B.value.zoom.minimap.show ? me(K.value.map((e) => ({
743
+ ...e,
744
+ series: e.series.map((e) => e ?? 0)
745
+ })).filter((e) => qr.value ? !0 : !j.value.includes(e.id))) : []), Yr = p(() => B.value.zoom.minimap.show ? [{
746
+ name: "",
747
+ series: Jr.value,
748
+ color: "#000000",
749
+ isVisible: !0
750
+ }] : []), Xr = p(() => me(K.value.filter((e) => !j.value.includes(e.id)).map((e) => ({
751
+ ...e,
752
+ series: e.series.map((t, n) => e.signedSeries[n] === -1 && t >= 0 ? -t : t)
753
+ }))).slice(J.value.start, J.value.end)), Zr = p(() => {
754
+ let e = K.value.filter((e) => !j.value.includes(e.id));
755
+ return {
756
+ positive: me(e.map((e) => ({
757
+ ...e,
758
+ series: e.series.slice(J.value.start, J.value.end).map((e) => e >= 0 ? e : 0)
759
+ }))),
760
+ negative: me(e.map((e) => ({
761
+ ...e,
762
+ series: e.series.slice(J.value.start, J.value.end).map((e) => e < 0 ? e : 0)
763
+ })))
764
+ };
765
+ }), Qr = p(() => {
766
+ let e = I.value.scale.scaleMax !== null && !L.value.distributed ? I.value.scale.scaleMax : Math.max(...Zr.value.positive), t = Math.min(...Zr.value.negative), n = I.value.scale.scaleMin !== null && !L.value.distributed ? I.value.scale.scaleMin : [
767
+ -Infinity,
768
+ Infinity,
769
+ NaN,
770
+ void 0,
771
+ null
772
+ ].includes(t) ? 0 : t;
773
+ return !L.value.distributed && (I.value.scale.scaleMax !== null || I.value.scale.scaleMin !== null) ? ve(n > 0 ? 0 : n, e < 0 ? 0 : e, I.value.scale.ticks) : re(n > 0 ? 0 : n, e < 0 ? 0 : e, I.value.scale.ticks);
774
+ }), $r = p(() => Qr.value.ticks), Z = p(() => {
775
+ let e = Qr.value, t = e.max + Math.abs(e.min);
776
+ return $r.value.map((n) => ({
777
+ zero: G.value.bottom - G.value.height * (Math.abs(e.min) / t),
778
+ y: G.value.bottom - G.value.height * ((n + Math.abs(e.min)) / t),
779
+ x: Er.value ? G.value.right + 8 : G.value.left - 8,
780
+ horizontal_zero: G.value.left + G.value.width * (Math.abs(e.min) / t),
781
+ horizontal_x: G.value.left + G.value.width * ((n + Math.abs(e.min)) / t),
782
+ horizontal_y: G.value.bottom - 8,
783
+ value: n
784
+ }));
785
+ }), ei = p(() => {
786
+ let e = I.value.y.axisLabels, { prefix: t, suffix: n } = L.value.dataLabels;
787
+ return $r.value.map((r) => String(ce(e.formatter, r, d({
788
+ p: t,
789
+ v: r,
790
+ s: n,
791
+ r: e.rounding
792
+ }), { datapoint: { value: r } }) ?? "")).join("|");
793
+ });
794
+ lt(() => [
795
+ ei.value,
796
+ P.value.orientation,
797
+ I.value.y.axisLabels.show,
798
+ I.value.y.axisLabels.fontSize,
799
+ I.value.y.axisLabels.bold,
800
+ I.value.y.position
801
+ ], () => {
802
+ I.value.y.axisLabels.show && $n();
803
+ }, { flush: "post" });
804
+ let Q = S([]), ti = S([]), ni = 0;
805
+ ut(() => {
806
+ let e = ++ni;
807
+ (async () => {
808
+ let t = await we({
809
+ values: R.value.values,
810
+ maxDatapoints: q.value,
811
+ formatter: R.value.datetimeFormatter,
812
+ start: J.value.start,
813
+ end: J.value.end
814
+ });
815
+ e === ni && (Q.value = t);
816
+ })();
817
+ });
818
+ let ri = 0;
819
+ ut(() => {
820
+ let e = ++ri;
821
+ (async () => {
822
+ let t = await we({
823
+ values: R.value.values,
824
+ maxDatapoints: q.value,
825
+ formatter: R.value.datetimeFormatter,
826
+ start: 0,
827
+ end: q.value
828
+ });
829
+ e === ri && (ti.value = t);
830
+ })();
831
+ });
832
+ let ii = p(() => {
833
+ let e = Math.max(1, Math.floor(Number(R.value.modulo) || 1)), t = (Q.value || []).map((e) => e?.text ?? ""), n = (ti.value || []).map((e) => e?.text ?? ""), r = J.value.start ?? 0, a = r > 0 || t.length < n.length;
834
+ return oe({
835
+ configuredModulo: e,
836
+ visibleTexts: t,
837
+ allTexts: n,
838
+ startAbs: r,
839
+ isZoomed: a
840
+ });
841
+ });
842
+ function ai(e) {
843
+ let t = R.value, n = Q.value || [], r = ti.value || [], a = J.value.start ?? 0, o = q.value, s = n.map((e) => e?.text ?? ""), c = r.map((e) => e?.text ?? ""), l = ae(!!t.showOnlyFirstAndLast, !!t.showOnlyAtModulo, ii.value, s, c, a, e, o);
844
+ if (!t.showFirstAndLast || t.showOnlyFirstAndLast || !l.length) return l;
845
+ let u = l.length - 1;
846
+ return l.map((e, t) => t !== 0 && t !== u ? e : {
847
+ ...e,
848
+ text: s[t] ?? ""
849
+ });
850
+ }
851
+ let oi = p(() => ai(M.value)), si = p(() => ai(null));
852
+ ut(() => {
853
+ P.value.orientation, R.value.show, R.value.fontSize, R.value.rotation, R.value.offsetY, si.value?.map((e) => e?.text ?? "").join("|"), ei.value, W.value.width, W.value.height, Vn.value, Bn.value, Rn.value, Ir();
854
+ }, { flush: "post" });
855
+ let ci = S({
856
+ months: [],
857
+ shortMonths: [],
858
+ days: [],
859
+ shortDays: []
860
+ }), li = 0;
861
+ ut(() => {
862
+ let e = ++li, t = R.value.datetimeFormatter;
863
+ (async () => {
864
+ let n = await Ce(t.locale).catch(() => Ce("en"));
865
+ e === li && (ci.value = n.data);
866
+ })();
867
+ });
868
+ let ui = p(() => {
869
+ let e = R.value.datetimeFormatter, t = Se({
870
+ useUTC: e.useUTC,
871
+ locale: ci.value,
872
+ januaryAsYear: e.januaryAsYear
873
+ });
874
+ return (e, n) => {
875
+ let r = R.value.values?.[e];
876
+ return r == null ? "" : t.formatDate(new Date(r), n);
877
+ };
878
+ }), di = p(() => (R.value.values || []).map((e, t) => ({
879
+ text: ui.value(t, B.value.zoom.timeFormat),
880
+ absoluteIndex: t
881
+ }))), fi = p(() => (R.value.values || []).map((e, t) => ({
882
+ text: ui.value(t, z.value.timeFormat),
883
+ absoluteIndex: t
884
+ }))), pi = p(() => {
885
+ let e = /* @__PURE__ */ new Map();
886
+ return (R.value.values || []).forEach((t) => {
887
+ if ([
888
+ null,
889
+ void 0,
890
+ ""
891
+ ].includes(t)) return;
892
+ let n = String(t);
893
+ e.set(n, (e.get(n) || 0) + 1);
894
+ }), e;
895
+ });
896
+ function mi(e) {
897
+ let t = (R.value.values || [])[e];
898
+ if ([
899
+ null,
900
+ void 0,
901
+ ""
902
+ ].includes(t)) return `fallback-${e}`;
903
+ let n = String(t);
904
+ return (pi.value.get(n) || 0) > 1 ? `${n}-${e}` : n;
905
+ }
906
+ function hi(e, t) {
907
+ return `${e.datasetKey}:${mi(t)}`;
908
+ }
909
+ let $ = p(() => {
910
+ if (!xn.value && !nr.value) return [];
911
+ let e = Array(q.value).fill(0), t = Array(q.value).fill(0), n = Array(q.value).fill(0), r = Array(q.value).fill(0), a = Math.max(...Zr.value.positive) || 0, o = Math.min(...Zr.value.negative), s = [
912
+ -Infinity,
913
+ Infinity,
914
+ NaN,
915
+ void 0,
916
+ null
917
+ ].includes(o) ? 0 : o, { min: c, max: l } = !L.value.distributed && (I.value.scale.scaleMax !== null || I.value.scale.scaleMin !== null) ? ve(I.value.scale.scaleMin === null ? s > 0 ? 0 : s : I.value.scale.scaleMin, I.value.scale.scaleMax === null ? a < 0 ? 0 : a : I.value.scale.scaleMax, I.value.scale.ticks) : re(I.value.scale.scaleMin === null ? s > 0 ? 0 : s : I.value.scale.scaleMin, I.value.scale.scaleMax === null ? a < 0 ? 0 : a : I.value.scale.scaleMax, I.value.scale.ticks), u = l + (c >= 0 ? 0 : Math.abs(c)) || 1, d = G.value.height, ee = G.value.width, te = Z.value[0] ? Z.value[0].zero : G.value.bottom, ne = Z.value[0] ? Z.value[0].horizontal_zero : G.value.left, ie = Array(Jr.value.length).fill(0), ae = Array(Jr.value.length).fill(0);
918
+ return K.value.filter((e) => !j.value.includes(e.id)).map((a) => {
919
+ let o = a.series.slice(), s = o.map((e, t) => ie[t]), c = o.map((e, t) => ae[t]);
920
+ o.forEach((e, t) => {
921
+ (Number(e) || 0) >= 0 ? ie[t] += Number(e) || 0 : ae[t] += Math.abs(Number(e) || 0);
922
+ });
923
+ let l = a.series.slice(J.value.start, J.value.end), re = a.signedSeries.slice(J.value.start, J.value.end), oe = l.map((e, t) => hi(a, J.value.start + t)), se = o.map((e, t) => hi(a, t)), ce = l.map((e, t) => G.value.left + X.value * t + X.value * L.value.gapRatio / 4), le = (Jr.value || []).filter(Number.isFinite), ue = le.length ? Math.max(...le) : 0, de = le.length ? Math.min(...le) : 0;
924
+ function fe({ minimapH: e }) {
925
+ let t = 1e-9, n = ue > 0;
926
+ if (n && de < 0) {
927
+ let n = Math.max(ue, Math.abs(de)) || t;
928
+ return {
929
+ pxPerUnit: e / 2 / n,
930
+ zero: e / 2
931
+ };
932
+ }
933
+ return n ? {
934
+ pxPerUnit: e / Math.max(t, ue),
935
+ zero: e
936
+ } : {
937
+ pxPerUnit: e / Math.max(t, Math.abs(de)),
938
+ zero: 0
939
+ };
940
+ }
941
+ let pe = ({ left: e, unitW: t }) => {
942
+ let n = t * (L.value.gapRatio / 4);
943
+ return o.map((r, a) => e + t * a + n);
944
+ }, me = l.map((e, t) => G.value.top + X.value * t + X.value * L.value.gapRatio / 4), he = l.map((t, r) => {
945
+ let a = L.value.distributed ? (t || 0) / Kr.value[r] : (t || 0) / u, o, s;
946
+ return t > 0 ? (s = d * a, o = te - s - e[r], e[r] += s) : (s = d * a, o = te + n[r], n[r] += Math.abs(s)), o;
947
+ }), ge = ({ minimapH: e }) => {
948
+ if (L.value.distributed) return o.map((t, n) => {
949
+ let r = Math.abs(Number(t) || 0), a = Math.abs(Jr.value?.[n] || 0) || 1e-9;
950
+ return e - (s[n] + r) / a * e;
951
+ });
952
+ let { pxPerUnit: t, zero: n } = fe({ minimapH: e });
953
+ return o.map((e, r) => {
954
+ let a = Number(e) || 0;
955
+ return a >= 0 ? n - (s[r] + a) * t : n + c[r] * t;
956
+ });
957
+ }, _e = l.map((e, n) => {
958
+ let a = L.value.distributed ? (e || 0) / Kr.value[n] : (e || 0) / u, o, s;
959
+ return e > 0 ? (s = ee * a, o = ne + t[n], t[n] += s) : (s = ee * a, o = ne - Math.abs(s) - r[n], r[n] += Math.abs(s)), o;
960
+ }), ve = l.map((e, t) => {
961
+ let n = L.value.distributed ? (e || 0) / Kr.value[t] : (e || 0) / u;
962
+ return e > 0 ? d * n : d * Math.abs(n);
963
+ }), ye = ({ minimapH: e }) => {
964
+ if (L.value.distributed) return o.map((t, n) => Math.abs(Number(t) || 0) / (Math.abs(Jr.value?.[n] || 0) || 1e-9) * e);
965
+ let { pxPerUnit: t } = fe({ minimapH: e });
966
+ return o.map((e) => Math.abs(Number(e) || 0) * t);
967
+ }, be = l.map((e, t) => {
968
+ let n = L.value.distributed ? (e || 0) / Kr.value[t] : (e || 0) / u;
969
+ return e > 0 ? ee * n : ee * Math.abs(n);
970
+ }), xe = l.map((e) => Math.abs(e)).reduce((e, t) => e + t, 0);
971
+ return {
972
+ ...a,
973
+ proportions: l.map((e, t) => L.value.distributed ? (e || 0) / Kr.value[t] : (e || 0) / xe),
974
+ series: l,
975
+ signedSeries: re,
976
+ rectKeys: oe,
977
+ minimapRectKeys: se,
978
+ x: ce,
979
+ y: he,
980
+ height: ve,
981
+ horizontal_width: be,
982
+ horizontal_y: me,
983
+ horizontal_x: _e,
984
+ xMinimap: pe,
985
+ yMinimap: ge,
986
+ heightMinimap: ye
987
+ };
988
+ });
989
+ }), gi = p(() => Xr.value.map((e, t) => ({
990
+ value: e,
991
+ sign: e >= 0 ? 1 : -1
992
+ })));
993
+ function _i(e, t, n, r, a) {
994
+ let o = a === -1 && e >= 0 ? -e : e;
995
+ return ce(L.value.dataLabels.formatter, o, d({
996
+ p: L.value.dataLabels.prefix,
997
+ v: o,
998
+ s: L.value.dataLabels.suffix,
999
+ r: L.value.dataLabels.rounding
1000
+ }), {
1001
+ datapoint: t,
1002
+ seriesIndex: n,
1003
+ datapointIndex: r
1004
+ });
1005
+ }
1006
+ function vi(e, t, n, r) {
1007
+ return ce(L.value.dataLabels.formatter, e, d({
1008
+ v: isNaN(e) ? 0 : e,
1009
+ s: "%",
1010
+ r: L.value.dataLabels.rounding
1011
+ }), {
1012
+ datapoint: t,
1013
+ seriesIndex: n,
1014
+ datapointIndex: r
1015
+ });
1016
+ }
1017
+ function yi(e) {
1018
+ let t = JSON.parse(JSON.stringify($.value)).map((t) => ({
1019
+ name: t.name,
1020
+ value: t.series[e] === 0 ? 0 : t.series[e] || null,
1021
+ proportion: t.proportions[e] || null,
1022
+ color: t.color,
1023
+ id: t.id
1024
+ }));
1025
+ P.value.events.datapointClick && P.value.events.datapointClick({
1026
+ datapoint: t,
1027
+ seriesIndex: e + J.value.start
1028
+ }), bn("selectDatapoint", {
1029
+ datapoint: t,
1030
+ period: Q.value[e]
1031
+ });
1032
+ }
1033
+ function bi(e) {
1034
+ return JSON.parse(JSON.stringify($.value)).map((t) => ({
1035
+ name: t.name,
1036
+ absoluteIndex: t.absoluteIndex,
1037
+ value: t.series[e] === 0 ? 0 : (t.signedSeries[e] === -1 && t.series[e] >= 0 ? -t.series[e] : t.series[e]) || null,
1038
+ proportion: t.proportions[e] || null,
1039
+ color: t.color,
1040
+ id: t.id,
1041
+ timeLabel: ti.value[e]
1042
+ }));
1043
+ }
1044
+ function xi(e) {
1045
+ if (P.value.events.datapointLeave) {
1046
+ let t = bi(e);
1047
+ P.value.events.datapointLeave({
1048
+ datapoint: t,
1049
+ seriesIndex: e + J.value.start
1050
+ });
1051
+ }
1052
+ Sn.value = !1, M.value = null, N.value === e && (N.value = null);
1053
+ }
1054
+ let Si = p(() => Array(q.value).fill(0).map((e, t) => bi(t)));
1055
+ lt(() => O.selectedXIndex, (e) => {
1056
+ if ([null, void 0].includes(O.selectedXIndex)) {
1057
+ M.value = null;
1058
+ return;
1059
+ }
1060
+ let t = e - J.value.start;
1061
+ t < 0 || e >= J.value.end ? M.value = null : M.value = t ?? null;
1062
+ }, { immediate: !0 });
1063
+ function Ci(e) {
1064
+ if (!z.value.showTimeLabel) return null;
1065
+ let t = Q.value?.[e]?.text || null, n = fi.value?.[e]?.text || null, r = ti.value?.[e]?.text || null;
1066
+ return z.value.useDefaultTimeFormat ? t : n || r;
1067
+ }
1068
+ function wi(e, t = "pointer") {
1069
+ if (qr.value) return;
1070
+ Yn.value = t, N.value = e, M.value = e, Sn.value = !0;
1071
+ let r = z.value.customFormat, a = bi(e);
1072
+ ua({
1073
+ seriesIndex: e,
1074
+ datapoint: a
1075
+ }), P.value.events.datapointEnter && P.value.events.datapointEnter({
1076
+ datapoint: a,
1077
+ seriesIndex: e + J.value.start
1078
+ }), Cn.value = {
1079
+ timeLabel: Ci(e),
1080
+ datapoint: a,
1081
+ seriesIndex: e,
1082
+ config: P.value,
1083
+ series: $.value
1084
+ };
1085
+ let o = a.map((e) => Math.abs(e.value)).reduce((e, t) => e + t, 0), s = a.map((e) => ge(e.value)).reduce((e, t) => e + t, 0);
1086
+ if (n(r) && ue(() => r({
1087
+ seriesIndex: e,
1088
+ datapoint: a,
1089
+ series: $.value,
1090
+ config: P.value
1091
+ }))) wn.value = r({
1092
+ seriesIndex: e,
1093
+ datapoint: a,
1094
+ series: $.value,
1095
+ config: P.value
1096
+ });
1097
+ else {
1098
+ let { showValue: t, showTotal: n, totalTranslation: r, showPercentage: c, borderColor: l, roundingValue: u, roundingPercentage: ee } = z.value, te = "", ne = Ci(e);
1099
+ ne && (te += `<div style="width:100%;text-align:center;border-bottom:1px solid ${l};padding-bottom:6px;margin-bottom:3px;">${ne}</div>`), n && (te += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
1100
+ <span>${r}:</span>
1101
+ <span>
1102
+ ${ce(L.value.dataLabels.formatter, s, d({
1103
+ p: L.value.dataLabels.prefix,
1104
+ v: s,
1105
+ s: L.value.dataLabels.suffix,
1106
+ r: u
1107
+ }), { datapoint: {
1108
+ name: r,
1109
+ value: s
1110
+ } })}
1111
+ </span>
1112
+ </div>`);
1113
+ let re = [t && c ? "(" : "", t && c ? ")" : ""];
1114
+ a.reverse().forEach((e) => {
1115
+ te += `
1116
+ <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
1117
+ <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${L.value.gradient.show ? `url(#gradient_${e.id})` : e.color}"/>${yn.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${A.value}_${e.absoluteIndex})"/>` : ""}</svg>
1118
+ ${e.name}${t || c ? ":" : ""} ${t ? ce(L.value.dataLabels.formatter, e.value, d({
1119
+ p: L.value.dataLabels.prefix,
1120
+ v: e.value,
1121
+ s: L.value.dataLabels.suffix,
1122
+ r: u
1123
+ }, { datapoint: e })) : ""} ${re[0]}${c ? d({
1124
+ v: isNaN(e.value / o) ? 0 : Math.abs(e.value) / o * 100,
1125
+ s: "%",
1126
+ r: ee
1127
+ }) : ""}${re[1]}
1128
+ </div>
1129
+ `;
1130
+ }), wn.value = `<div>${te}</div>`;
1131
+ }
1132
+ }
1133
+ let Ti = p(() => W.value.width), Ei = p(() => W.value.height);
1134
+ Pe({
1135
+ timeLabelsEls: P.value.orientation === "vertical" ? Vn : Bn,
1136
+ timeLabels: Q,
1137
+ slicer: J,
1138
+ configRef: P,
1139
+ rotationPath: [
1140
+ "style",
1141
+ "chart",
1142
+ "grid",
1143
+ "x",
1144
+ "timeLabels",
1145
+ "rotation"
1146
+ ],
1147
+ autoRotatePath: [
1148
+ "style",
1149
+ "chart",
1150
+ "grid",
1151
+ "x",
1152
+ "timeLabels",
1153
+ "autoRotate",
1154
+ "enable"
1155
+ ],
1156
+ isAutoSize: !1,
1157
+ width: Ti,
1158
+ height: Ei,
1159
+ rotation: R.value.autoRotate.angle
1160
+ });
1161
+ function Di(e) {
1162
+ An.value = e, Tn.value += 1;
1163
+ }
1164
+ function Oi() {
1165
+ U.value.showTable = !U.value.showTable;
1166
+ }
1167
+ function ki() {
1168
+ U.value.dataLabels.show = !U.value.dataLabels.show;
1169
+ }
1170
+ function Ai() {
1171
+ U.value.showTooltip = !U.value.showTooltip;
1172
+ }
1173
+ function ji() {
1174
+ return $.value;
1175
+ }
1176
+ let Mi = p(() => {
1177
+ if ($.value.length === 0) return {
1178
+ head: [],
1179
+ body: [],
1180
+ config: {},
1181
+ columnNames: []
1182
+ };
1183
+ let e = $.value.map(({ name: e, color: t }) => ({
1184
+ label: e,
1185
+ color: t
1186
+ })), t = [];
1187
+ return Q.value.forEach((e) => {
1188
+ let n = [R.value.values[e.absoluteIndex] ? e.text : i + 1];
1189
+ K.value.forEach((t) => {
1190
+ n.push(Number((t.series[e.absoluteIndex] || 0).toFixed(P.value.table.td.roundingValue)));
1191
+ }), t.push(n);
1192
+ }), {
1193
+ head: e,
1194
+ body: t
1195
+ };
1196
+ });
1197
+ function Ni(e = null) {
1198
+ let n = [
1199
+ [B.value.title.text],
1200
+ [B.value.title.subtitle.text],
1201
+ [""]
1202
+ ], a = ["", ...Mi.value.head.map((e) => e.label)], o = Mi.value.body, s = n.concat([a]).concat(o), c = r(s);
1203
+ e ? e(c) : t({
1204
+ csvContent: c,
1205
+ title: B.value.title.text || "vue-ui-stackbar"
1206
+ });
1207
+ }
1208
+ let Pi = p(() => {
1209
+ let e = [""].concat($.value.map((e) => e.name), "__SUM__"), t = [], n = J.value.end - J.value.start;
1210
+ for (let e = 0; e < n; e += 1) {
1211
+ let n = J.value.start + e, r = $.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
1212
+ t.push([R.value.values[n] && Q.value[e]?.text || n + 1].concat($.value.map((t) => (t.series[e] ?? 0).toFixed(P.value.table.td.roundingValue)), (r ?? 0).toFixed(P.value.table.td.roundingValue)));
1213
+ }
1214
+ let r = {
1215
+ th: {
1216
+ backgroundColor: P.value.table.th.backgroundColor,
1217
+ color: P.value.table.th.color,
1218
+ outline: P.value.table.th.outline
1219
+ },
1220
+ td: {
1221
+ backgroundColor: P.value.table.td.backgroundColor,
1222
+ color: P.value.table.td.color,
1223
+ outline: P.value.table.td.outline
1224
+ },
1225
+ breakpoint: P.value.table.responsiveBreakpoint
1226
+ }, a = [P.value.table.columnNames.period].concat($.value.map((e) => e.name), P.value.table.columnNames.total);
1227
+ return {
1228
+ head: e,
1229
+ body: t.slice(0, J.value.end - J.value.start),
1230
+ config: r,
1231
+ colNames: a
1232
+ };
1233
+ });
1234
+ function Fi() {
1235
+ j.value.length ? j.value = [] : Bi.value.forEach((e) => {
1236
+ j.value.push(e.id);
1237
+ }), bn("selectLegend", $.value);
1238
+ }
1239
+ function Ii(e) {
1240
+ if (j.value.includes(e.id)) j.value = j.value.filter((t) => t !== e.id);
1241
+ else {
1242
+ if (j.value.length === K.value.length - 1) return;
1243
+ j.value.push(e.id);
1244
+ }
1245
+ bn("selectLegend", $.value);
1246
+ }
1247
+ function Li(e) {
1248
+ return K.value.length ? K.value.find((t) => t.name === e) || (wr.value && console.warn(`VueUiStackbar - Series name not found "${e}"`), null) : (wr.value && console.warn("VueUiStackbar - There are no series to show."), null);
1249
+ }
1250
+ function Ri(e) {
1251
+ let t = Li(e);
1252
+ t !== null && j.value.includes(t.id) && Ii({ id: t.id });
1253
+ }
1254
+ function zi(e) {
1255
+ let t = Li(e);
1256
+ t !== null && (j.value.includes(t.id) || Ii({ id: t.id }));
1257
+ }
1258
+ let Bi = p(() => K.value.map((e, t) => ({
1259
+ ...e,
1260
+ shape: "square"
1261
+ })).map((e) => ({
1262
+ ...e,
1263
+ opacity: j.value.includes(e.id) ? .5 : 1,
1264
+ segregate: () => Ii(e),
1265
+ isSegregated: j.value.includes(e.id)
1266
+ }))), Vi = p(() => ({
1267
+ cy: "stackbar-legend",
1268
+ backgroundColor: B.value.legend.backgroundColor,
1269
+ color: B.value.legend.color,
1270
+ fontSize: B.value.legend.fontSize,
1271
+ paddingBottom: 12,
1272
+ fontWeight: B.value.legend.bold ? "bold" : ""
1273
+ })), Hi = S(!1);
1274
+ function Ui() {
1275
+ Hi.value = !Hi.value;
1276
+ }
1277
+ function Wi(e, t) {
1278
+ let n = JSON.parse(JSON.stringify($.value)).map((e) => ({
1279
+ name: e.name,
1280
+ value: e.series[t] === 0 ? 0 : (e.signedSeries[t] === -1 && e.series[t] >= 0 ? -e.series[t] : e.series[t]) || null,
1281
+ proportion: e.proportions[t] || null,
1282
+ color: e.color,
1283
+ id: e.id
1284
+ }));
1285
+ bn("selectTimeLabel", {
1286
+ datapoint: n,
1287
+ absoluteIndex: e.absoluteIndex,
1288
+ label: e.text
1289
+ });
1290
+ }
1291
+ let Gi = p(() => Math.max(...$.value.flatMap((e) => e.series)));
1292
+ function Ki(e, t) {
1293
+ return L.value.showDistributedPercentage && L.value.distributed ? pr.value ? t * 100 >= L.value.dataLabels.hideUnderPercentage : !L.value.dataLabels.hideEmptyPercentages || t > 0 : pr.value ? (fr.value && wr.value && console.warn("Vue Data UI - VueUiStackbar - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), e > Gi.value * L.value.dataLabels.hideUnderPercentage / 100) : fr.value ? Math.abs(e) >= L.value.dataLabels.hideUnderValue : !L.value.dataLabels.hideEmptyValues || e !== 0;
1294
+ }
1295
+ async function qi({ scale: e = 2 } = {}) {
1296
+ if (!k.value) return;
1297
+ let { imageUri: t, base64: n } = await Fe({
1298
+ domElement: k.value,
1299
+ base64: !0,
1300
+ img: !0,
1301
+ scale: e
1302
+ }), r = k.value.getBoundingClientRect(), a = {
1303
+ width: r.width,
1304
+ height: r.height,
1305
+ aspectRatio: r.height ? r.width / r.height : 0
1306
+ }, o = await fe(t, e) ?? a;
1307
+ return {
1308
+ imageUri: t,
1309
+ base64: n,
1310
+ title: B.value.title.text,
1311
+ ...o
1312
+ };
1313
+ }
1314
+ let Ji = p(() => {
1315
+ let e = P.value.table.useDialog && !P.value.table.show, t = U.value.showTable;
1316
+ return {
1317
+ component: e ? hn : un,
1318
+ title: `${B.value.title.text}${B.value.title.subtitle.text ? `: ${B.value.title.subtitle.text}` : ""}`,
1319
+ props: e ? {
1320
+ backgroundColor: P.value.table.th.backgroundColor,
1321
+ color: P.value.table.th.color,
1322
+ headerColor: P.value.table.th.color,
1323
+ headerBg: P.value.table.th.backgroundColor,
1324
+ isFullscreen: An.value,
1325
+ fullscreenParent: k.value,
1326
+ forcedWidth: Math.min(800, window.innerWidth * .8),
1327
+ isCursorPointer: H.value
1328
+ } : {
1329
+ hideDetails: !0,
1330
+ config: {
1331
+ open: t,
1332
+ maxHeight: 1e4,
1333
+ body: {
1334
+ backgroundColor: B.value.backgroundColor,
1335
+ color: B.value.color
1336
+ },
1337
+ head: {
1338
+ backgroundColor: B.value.backgroundColor,
1339
+ color: B.value.color
1340
+ }
1341
+ }
1342
+ }
1343
+ };
1344
+ });
1345
+ lt(() => U.value.showTable, (e) => {
1346
+ P.value.table.show || (e && P.value.table.useDialog && In.value ? In.value.open() : "close" in In.value && In.value.close());
1347
+ });
1348
+ function Yi() {
1349
+ U.value.showTable = !1, Ln.value && Ln.value.setTableIconState(!1);
1350
+ }
1351
+ let Xi = p(() => B.value.backgroundColor), Zi = p(() => B.value.legend), Qi = p(() => B.value.title), { isCallbackImaging: $i, isCallbackSvg: ea, generateSvg: ta, onGenerateImage: na } = je({
1352
+ svg: cr,
1353
+ title: Qi,
1354
+ legend: Zi,
1355
+ legendItems: Bi,
1356
+ backgroundColor: Xi,
1357
+ getSvgCallback: () => P.value.userOptions.callbacks.svg,
1358
+ generateImage: yr
1359
+ });
1360
+ function ra(e) {
1361
+ let t = q.value;
1362
+ return e > t ? t : e < 0 || e < J.value.start ? B.value.zoom.startIndex === null ? 1 : J.value.start + 1 : e;
1363
+ }
1364
+ let ia = S(!1), aa = S(!1);
1365
+ function oa() {
1366
+ if (!ia.value) {
1367
+ ia.value = !0;
1368
+ try {
1369
+ let { startIndex: e, endIndex: t, keepState: n } = B.value.zoom, r = n ? Math.max(0, q.value) : q.value;
1370
+ if (n && r <= 0) return;
1371
+ let a = e ?? 0, o = t == null ? r : Math.min(ra(t + 1), r);
1372
+ sa.value = !0, J.value.start = a, J.value.end = o, Y.value.start = a, Y.value.end = o, Hr(), aa.value = !0;
1373
+ } finally {
1374
+ queueMicrotask(() => {
1375
+ sa.value = !1;
1376
+ }), ia.value = !1;
1377
+ }
1378
+ }
1379
+ }
1380
+ let sa = S(!1);
1381
+ function ca(e) {
1382
+ ia.value || sa.value || e !== J.value.start && (J.value.start = e, Y.value.start = e, Hr());
1383
+ }
1384
+ function la(e) {
1385
+ if (ia.value || sa.value) return;
1386
+ let t = ra(e);
1387
+ t !== J.value.end && (J.value.end = t, Y.value.end = t, Hr());
1388
+ }
1389
+ function ua({ seriesIndex: e, datapoint: t }) {
1390
+ let n = J.value.start + e;
1391
+ bn("selectX", {
1392
+ dataset: t,
1393
+ index: n,
1394
+ indexLabel: R.value.values[n]
1395
+ });
1396
+ }
1397
+ function da() {
1398
+ return { y0: Z.value?.[0]?.zero ?? G.value.bottom };
1399
+ }
1400
+ function fa(e) {
1401
+ let { y0: t } = da(), n = L.value.totalValues, r = Math.max(2, n.fontSize * .3 + n.offsetY), a = Infinity, o = !1;
1402
+ for (let t of $.value || []) {
1403
+ let n = t?.series?.[e] ?? 0, r = t?.height?.[e] ?? 0, s = t?.y?.[e];
1404
+ n > 0 && r > 0 && Number.isFinite(s) && (o = !0, s < a && (a = s));
1405
+ }
1406
+ let s = (o && Number.isFinite(a) ? a : t) - r;
1407
+ return Math.min(Math.max(s, 0), G.value.bottom);
1408
+ }
1409
+ function pa(e) {
1410
+ let { x0: t } = da(), n = Math.max(2, L.value.totalValues.fontSize * .3 + L.value.totalValues.offsetX), r = -Infinity, a = !1;
1411
+ for (let t of $.value || []) {
1412
+ let n = t?.series?.[e] ?? 0, o = t?.horizontal_x?.[e], s = t?.horizontal_width?.[e], c = Number.isFinite(s) ? Math.max(0, s) : 0;
1413
+ Number.isFinite(o) && n > 0 && c > 0 && (a = !0, r = Math.max(r, o + c));
1414
+ }
1415
+ return (a && Number.isFinite(r) ? r : t) + n;
1416
+ }
1417
+ async function ma() {
1418
+ if (bn("copyAlt", {
1419
+ config: P.value,
1420
+ dataset: $.value
1421
+ }), !P.value.userOptions.callbacks.altCopy) {
1422
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1423
+ return;
1424
+ }
1425
+ await Promise.resolve(P.value.userOptions.callbacks.altCopy({
1426
+ config: P.value,
1427
+ dataset: $.value
1428
+ }));
1429
+ }
1430
+ let ha = S(!1);
1431
+ function ga() {
1432
+ N.value = null, ha.value = !0;
1433
+ }
1434
+ function _a() {
1435
+ N.value = null, Sn.value = !1, M.value = null, bn("selectX", {
1436
+ index: null,
1437
+ indexLabel: null,
1438
+ dataset: null
1439
+ }), ha.value = !1;
1440
+ }
1441
+ function va(e) {
1442
+ if (!cr.value || Hi.value || document.activeElement !== cr.value || qr.value || !J.value.end && J.value.end !== 0) return;
1443
+ let t = P.value.orientation === "vertical", n = P.value.orientation === "horizontal", r = t && e.key === "ArrowLeft" || n && e.key === "ArrowUp", a = t && e.key === "ArrowRight" || n && e.key === "ArrowDown", o = e.key === "Enter" || e.key === " ", s = e.key === "Escape";
1444
+ if (!r && !a && !o && !s) return;
1445
+ let c = J.value.end - J.value.start;
1446
+ if (c <= 0) return;
1447
+ if (e.preventDefault(), e.stopPropagation(), s) {
1448
+ N.value = null, Sn.value = !1, M.value = null, bn("selectX", {
1449
+ index: null,
1450
+ indexLabel: null,
1451
+ dataset: null
1452
+ });
1453
+ return;
1454
+ }
1455
+ if (o) {
1456
+ if (N.value === null) return;
1457
+ yi(N.value);
1458
+ return;
1459
+ }
1460
+ let l = N.value, u = M.value;
1461
+ l !== null && l >= 0 && l < c ? a ? (l += 1, l >= c && (l = 0)) : r && (--l, l < 0 && (l = c - 1)) : u !== null && u >= 0 && u < c ? (l = a ? u + 1 : u - 1, l >= c && (l = 0), l < 0 && (l = c - 1)) : l = a ? 0 : c - 1, N.value = l, ya(l), wi(l, "keyboard");
1462
+ }
1463
+ function ya(e) {
1464
+ if (!Number.isFinite(e)) return;
1465
+ let t, n;
1466
+ P.value.orientation === "vertical" ? (t = G.value.left + e * X.value + X.value / 2, n = G.value.top + G.value.height / 2) : (t = G.value.left + G.value.width / 2, n = G.value.top + e * X.value + X.value / 2);
1467
+ let r = o(t, n, cr.value);
1468
+ r && (Jn.value = r);
1469
+ }
1470
+ let ba = p(() => ({
1471
+ headers: Pi.value?.colNames ?? [],
1472
+ rows: Pi.value?.body ?? []
1473
+ }));
1474
+ return Re({
1475
+ getData: ji,
1476
+ getImage: qi,
1477
+ generatePdf: vr,
1478
+ generateCsv: Ni,
1479
+ generateImage: yr,
1480
+ generateSvg: ta,
1481
+ hideSeries: zi,
1482
+ showSeries: Ri,
1483
+ toggleTable: Oi,
1484
+ toggleLabels: ki,
1485
+ toggleTooltip: Ai,
1486
+ toggleAnnotator: Ui,
1487
+ toggleFullscreen: Di,
1488
+ copyAlt: ma
1489
+ }), (t, r) => (x(), g("div", {
1490
+ id: `stackbar_${A.value}`,
1491
+ ref_key: "stackbarChart",
1492
+ ref: k,
1493
+ class: v({
1494
+ "vue-data-ui-component": !0,
1495
+ "vue-ui-stackbar": !0,
1496
+ "vue-data-ui-wrapper-fullscreen": An.value
1497
+ }),
1498
+ style: b(`background:${B.value.backgroundColor};color:${B.value.color};font-family:${P.value.style.fontFamily}; position: relative; ${P.value.responsive ? "height: 100%" : ""}`),
1499
+ onMouseenter: lr,
1500
+ onMouseleave: ur
1501
+ }, [
1502
+ Xe("div", {
1503
+ id: `chart-instructions-${A.value}`,
1504
+ class: "sr-only"
1505
+ }, [Xe("p", null, T(P.value.a11y.translations.keyboardNavigation), 1)], 8, pt),
1506
+ ba.value?.rows?.length ? (x(), m(We, {
1507
+ key: 0,
1508
+ uid: A.value,
1509
+ head: ba.value.headers,
1510
+ body: ba.value.rows,
1511
+ notice: P.value.a11y.translations.tableAvailable,
1512
+ caption: P.value.a11y.translations.tableCaption
1513
+ }, null, 8, [
1514
+ "uid",
1515
+ "head",
1516
+ "body",
1517
+ "notice",
1518
+ "caption"
1519
+ ])) : h("", !0),
1520
+ F.value.buttons.annotator ? (x(), m(E(fn), {
1521
+ key: 1,
1522
+ svgRef: E(cr),
1523
+ backgroundColor: B.value.backgroundColor,
1524
+ color: B.value.color,
1525
+ active: Hi.value,
1526
+ isCursorPointer: H.value,
1527
+ palette: F.value.annotatorPalette,
1528
+ onClose: Ui
1529
+ }, {
1530
+ "annotator-action-close": D(() => [w(t.$slots, "annotator-action-close", {}, void 0, !0)]),
1531
+ "annotator-action-color": D(({ color: e }) => [w(t.$slots, "annotator-action-color", y(_({ color: e })), void 0, !0)]),
1532
+ "annotator-action-draw": D(({ mode: e }) => [w(t.$slots, "annotator-action-draw", y(_({ mode: e })), void 0, !0)]),
1533
+ "annotator-action-undo": D(({ disabled: e }) => [w(t.$slots, "annotator-action-undo", y(_({ disabled: e })), void 0, !0)]),
1534
+ "annotator-action-redo": D(({ disabled: e }) => [w(t.$slots, "annotator-action-redo", y(_({ disabled: e })), void 0, !0)]),
1535
+ "annotator-action-delete": D(({ disabled: e }) => [w(t.$slots, "annotator-action-delete", y(_({ disabled: e })), void 0, !0)]),
1536
+ _: 3
1537
+ }, 8, [
1538
+ "svgRef",
1539
+ "backgroundColor",
1540
+ "color",
1541
+ "active",
1542
+ "isCursorPointer",
1543
+ "palette"
1544
+ ])) : h("", !0),
1545
+ w(t.$slots, "userConfig", {}, void 0, !0),
1546
+ B.value.title.text ? (x(), g("div", {
1547
+ key: 2,
1548
+ ref_key: "chartTitle",
1549
+ ref: En,
1550
+ style: "width:100%;background:transparent;padding-bottom:24px"
1551
+ }, [(x(), m(Ie, {
1552
+ key: `title_${Mn.value}`,
1553
+ config: {
1554
+ title: {
1555
+ cy: "stackbar-title",
1556
+ ...B.value.title
1557
+ },
1558
+ subtitle: {
1559
+ cy: "stackbar-subtitle",
1560
+ ...B.value.title.subtitle
1561
+ }
1562
+ }
1563
+ }, null, 8, ["config"]))], 512)) : h("", !0),
1564
+ Xe("div", { id: `legend-top-${A.value}` }, null, 8, mt),
1565
+ F.value.show && xn.value && (E(sr) || E(ar)) ? (x(), m(E(pn), {
1566
+ ref_key: "userOptionsRef",
1567
+ ref: Ln,
1568
+ key: `user_option_${Tn.value}`,
1569
+ backgroundColor: B.value.backgroundColor,
1570
+ color: B.value.color,
1571
+ isPrinting: E(gr),
1572
+ isImaging: E(_r),
1573
+ uid: A.value,
1574
+ hasTooltip: z.value.show && F.value.buttons.tooltip,
1575
+ hasPdf: F.value.buttons.pdf,
1576
+ hasImg: F.value.buttons.img,
1577
+ hasSvg: F.value.buttons.svg,
1578
+ hasXls: F.value.buttons.csv,
1579
+ hasTable: F.value.buttons.table,
1580
+ hasLabel: F.value.buttons.labels,
1581
+ hasFullscreen: F.value.buttons.fullscreen,
1582
+ hasAltCopy: F.value.buttons.altCopy,
1583
+ isFullscreen: An.value,
1584
+ chartElement: k.value,
1585
+ position: F.value.position,
1586
+ isTooltip: U.value.showTooltip,
1587
+ titles: { ...F.value.buttonTitles },
1588
+ hasAnnotator: F.value.buttons.annotator,
1589
+ isAnnotation: Hi.value,
1590
+ callbacks: F.value.callbacks,
1591
+ printScale: F.value.print.scale,
1592
+ tableDialog: P.value.table.useDialog,
1593
+ isCursorPointer: H.value,
1594
+ onToggleFullscreen: Di,
1595
+ onGeneratePdf: E(vr),
1596
+ onGenerateCsv: Ni,
1597
+ onGenerateImage: E(na),
1598
+ onGenerateSvg: E(ta),
1599
+ onToggleTable: Oi,
1600
+ onToggleLabels: ki,
1601
+ onToggleTooltip: Ai,
1602
+ onToggleAnnotator: Ui,
1603
+ onCopyAlt: ma,
1604
+ style: b({ visibility: E(sr) ? E(ar) ? "visible" : "hidden" : "visible" })
1605
+ }, Ze({ _: 2 }, [
1606
+ t.$slots.menuIcon ? {
1607
+ name: "menuIcon",
1608
+ fn: D(({ isOpen: e, color: n }) => [w(t.$slots, "menuIcon", y(_({
1609
+ isOpen: e,
1610
+ color: n
1611
+ })), void 0, !0)]),
1612
+ key: "0"
1613
+ } : void 0,
1614
+ t.$slots.optionTooltip ? {
1615
+ name: "optionTooltip",
1616
+ fn: D(() => [w(t.$slots, "optionTooltip", {}, void 0, !0)]),
1617
+ key: "1"
1618
+ } : void 0,
1619
+ t.$slots.optionPdf ? {
1620
+ name: "optionPdf",
1621
+ fn: D(() => [w(t.$slots, "optionPdf", {}, void 0, !0)]),
1622
+ key: "2"
1623
+ } : void 0,
1624
+ t.$slots.optionCsv ? {
1625
+ name: "optionCsv",
1626
+ fn: D(() => [w(t.$slots, "optionCsv", {}, void 0, !0)]),
1627
+ key: "3"
1628
+ } : void 0,
1629
+ t.$slots.optionImg ? {
1630
+ name: "optionImg",
1631
+ fn: D(() => [w(t.$slots, "optionImg", {}, void 0, !0)]),
1632
+ key: "4"
1633
+ } : void 0,
1634
+ t.$slots.optionSvg ? {
1635
+ name: "optionSvg",
1636
+ fn: D(() => [w(t.$slots, "optionSvg", {}, void 0, !0)]),
1637
+ key: "5"
1638
+ } : void 0,
1639
+ t.$slots.optionTable ? {
1640
+ name: "optionTable",
1641
+ fn: D(() => [w(t.$slots, "optionTable", {}, void 0, !0)]),
1642
+ key: "6"
1643
+ } : void 0,
1644
+ t.$slots.optionLabels ? {
1645
+ name: "optionLabels",
1646
+ fn: D(() => [w(t.$slots, "optionLabels", {}, void 0, !0)]),
1647
+ key: "7"
1648
+ } : void 0,
1649
+ t.$slots.optionFullscreen ? {
1650
+ name: "optionFullscreen",
1651
+ fn: D(({ toggleFullscreen: e, isFullscreen: n }) => [w(t.$slots, "optionFullscreen", y(_({
1652
+ toggleFullscreen: e,
1653
+ isFullscreen: n
1654
+ })), void 0, !0)]),
1655
+ key: "8"
1656
+ } : void 0,
1657
+ t.$slots.optionAnnotator ? {
1658
+ name: "optionAnnotator",
1659
+ fn: D(({ toggleAnnotator: e, isAnnotator: n }) => [w(t.$slots, "optionAnnotator", y(_({
1660
+ toggleAnnotator: e,
1661
+ isAnnotator: n
1662
+ })), void 0, !0)]),
1663
+ key: "9"
1664
+ } : void 0,
1665
+ t.$slots.optionAltCopy ? {
1666
+ name: "optionAltCopy",
1667
+ fn: D(({ altCopy: e }) => [w(t.$slots, "optionAltCopy", y(_({ altCopy: e })), void 0, !0)]),
1668
+ key: "10"
1669
+ } : void 0,
1670
+ t.$slots["custom-menu-before"] ? {
1671
+ name: "custom-menu-before",
1672
+ fn: D(() => [w(t.$slots, "custom-menu-before", {}, void 0, !0)]),
1673
+ key: "11"
1674
+ } : void 0,
1675
+ t.$slots["custom-menu-after"] ? {
1676
+ name: "custom-menu-after",
1677
+ fn: D(() => [w(t.$slots, "custom-menu-after", {}, void 0, !0)]),
1678
+ key: "12"
1679
+ } : void 0
1680
+ ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : h("", !0),
1681
+ Xe("div", ht, [(x(), g("svg", {
1682
+ ref_key: "svgRef",
1683
+ ref: cr,
1684
+ xmlns: E(_e),
1685
+ "aria-describedby": `chart-instructions-${A.value}`,
1686
+ viewBox: `0 0 ${G.value.chartWidth <= 0 ? 10 : G.value.chartWidth} ${G.value.chartHeight <= 0 ? 10 : G.value.chartHeight}`,
1687
+ class: v({
1688
+ "vue-data-ui-loading": E(nr),
1689
+ "vue-data-ui-fullscreen--on": An.value,
1690
+ "vue-data-ui-fulscreen--off": !An.value,
1691
+ "vue-data-ui-no-transition": !E(V)
1692
+ }),
1693
+ style: b(`max-width:100%;overflow:visible;background:transparent;color:${B.value.color}`),
1694
+ tabindex: "0",
1695
+ onFocus: ga,
1696
+ onBlur: _a,
1697
+ onKeydown: va
1698
+ }, [
1699
+ $e(E(mn)),
1700
+ t.$slots["chart-background"] ? (x(), g("foreignObject", {
1701
+ key: 0,
1702
+ x: G.value.left,
1703
+ y: G.value.top,
1704
+ width: G.value.width <= 0 ? 10 : G.value.width,
1705
+ height: G.value.height <= 0 ? 10 : G.value.height,
1706
+ style: { pointerEvents: "none" }
1707
+ }, [w(t.$slots, "chart-background", {}, void 0, !0)], 8, _t)) : h("", !0),
1708
+ L.value.gradient.show ? (x(), g("defs", vt, [(x(!0), g(f, null, C($.value, (e, t) => (x(), m(Ve, {
1709
+ t: "linear",
1710
+ id: `gradient_${e.id}`,
1711
+ key: `gradient_${e.id}_${t}`,
1712
+ x1: "0%",
1713
+ y1: "0%",
1714
+ x2: "0%",
1715
+ y2: "100%",
1716
+ stops: [
1717
+ [
1718
+ "0%",
1719
+ e.color,
1720
+ 1
1721
+ ],
1722
+ [
1723
+ "61.8%",
1724
+ E(le)(e.color, L.value.gradient.intensity / 100),
1725
+ 1
1726
+ ],
1727
+ [
1728
+ "100%",
1729
+ e.color,
1730
+ 1
1731
+ ]
1732
+ ]
1733
+ }, null, 8, ["id", "stops"]))), 128))])) : h("", !0),
1734
+ I.value.frame.show ? (x(), g("rect", {
1735
+ key: 2,
1736
+ style: {
1737
+ pointerEvents: "none",
1738
+ transition: "none",
1739
+ animation: "none !important"
1740
+ },
1741
+ x: Math.max(0, G.value.left),
1742
+ y: Math.max(0, G.value.top),
1743
+ width: Math.max(0, G.value.width),
1744
+ height: Math.max(0, G.value.height),
1745
+ fill: "transparent",
1746
+ stroke: I.value.frame.stroke,
1747
+ "stroke-width": I.value.frame.strokeWidth,
1748
+ "stroke-linecap": I.value.frame.strokeLinecap,
1749
+ "stroke-linejoin": I.value.frame.strokeLinejoin,
1750
+ "stroke-dasharray": I.value.frame.strokeDasharray
1751
+ }, null, 8, yt)) : h("", !0),
1752
+ I.value.x.showHorizontalLines && P.value.orientation === "vertical" ? (x(!0), g(f, { key: 3 }, C(Z.value, (e, t) => (x(), g("line", {
1753
+ x1: G.value.left,
1754
+ x2: G.value.right,
1755
+ y1: e.y,
1756
+ y2: e.y,
1757
+ stroke: I.value.x.linesColor,
1758
+ "stroke-width": I.value.x.linesThickness,
1759
+ "stroke-dasharray": I.value.x.linesStrokeDasharray,
1760
+ "stroke-linecap": "round"
1761
+ }, null, 8, bt))), 256)) : h("", !0),
1762
+ I.value.x.showHorizontalLines && P.value.orientation === "horizontal" ? (x(!0), g(f, { key: 4 }, C(J.value.end - J.value.start + 1, (e, t) => (x(), g("line", {
1763
+ x1: G.value.left,
1764
+ x2: G.value.right,
1765
+ y1: G.value.top + X.value * t,
1766
+ y2: G.value.top + X.value * t,
1767
+ stroke: I.value.x.linesColor,
1768
+ "stroke-width": I.value.x.linesThickness,
1769
+ "stroke-dasharray": I.value.x.linesStrokeDasharray,
1770
+ "stroke-linecap": "round"
1771
+ }, null, 8, xt))), 256)) : h("", !0),
1772
+ I.value.y.showVerticalLines && P.value.orientation === "vertical" ? (x(!0), g(f, { key: 5 }, C(J.value.end - J.value.start + 1, (e, t) => (x(), g("line", {
1773
+ x1: G.value.left + X.value * t,
1774
+ x2: G.value.left + X.value * t,
1775
+ y1: G.value.top,
1776
+ y2: G.value.bottom,
1777
+ stroke: I.value.y.linesColor,
1778
+ "stroke-width": I.value.y.linesThickness,
1779
+ "stroke-dasharray": I.value.y.linesStrokeDasharray,
1780
+ "stroke-linecap": "round"
1781
+ }, null, 8, St))), 256)) : h("", !0),
1782
+ I.value.y.showVerticalLines && P.value.orientation === "horizontal" ? (x(!0), g(f, { key: 6 }, C(Z.value, (e, t) => (x(), g("line", {
1783
+ x1: e.horizontal_x,
1784
+ x2: e.horizontal_x,
1785
+ y1: G.value.top,
1786
+ y2: G.value.bottom,
1787
+ stroke: I.value.y.linesColor,
1788
+ "stroke-width": I.value.y.linesThickness,
1789
+ "stroke-dasharray": I.value.y.linesStrokeDasharray,
1790
+ "stroke-linecap": "round"
1791
+ }, null, 8, Ct))), 256)) : h("", !0),
1792
+ (x(!0), g(f, null, C($.value, (e, n) => (x(), g("g", { key: `stackbar-group-${e.datasetKey}-${n}-${A.value}` }, [t.$slots.pattern ? (x(), g("defs", wt, [w(t.$slots, "pattern", tt({ ref_for: !0 }, {
1793
+ seriesIndex: e.absoluteIndex,
1794
+ patternId: `pattern_${A.value}_${e.absoluteIndex}`
1795
+ }), void 0, !0)])) : h("", !0), P.value.orientation === "vertical" ? (x(), g(f, { key: 1 }, [(x(!0), g(f, null, C(e.x, (t, n) => (x(), g("rect", {
1796
+ key: `stackbar-rect-${e.rectKeys[n]}`,
1797
+ x: t,
1798
+ y: E(ge)(e.y[n]),
1799
+ height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
1800
+ rx: L.value.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : L.value.borderRadius,
1801
+ width: X.value * (1 - L.value.gapRatio / 2),
1802
+ fill: L.value.gradient.show ? `url(#gradient_${e.id})` : e.color,
1803
+ stroke: B.value.backgroundColor,
1804
+ "stroke-width": L.value.strokeWidth,
1805
+ "stroke-linecap": "round",
1806
+ "stroke-linejoin": "round",
1807
+ class: v({ "vue-data-ui-bar-transition": jn.value })
1808
+ }, null, 10, Tt))), 128)), t.$slots.pattern ? (x(), g("g", Et, [(x(!0), g(f, null, C(e.x, (t, n) => (x(), g("rect", {
1809
+ key: `stackbar-pattern-rect-${e.rectKeys[n]}`,
1810
+ x: t,
1811
+ y: E(ge)(e.y[n]),
1812
+ height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
1813
+ rx: L.value.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : L.value.borderRadius,
1814
+ width: X.value * (1 - L.value.gapRatio / 2),
1815
+ fill: `url(#pattern_${A.value}_${e.absoluteIndex})`,
1816
+ stroke: B.value.backgroundColor,
1817
+ "stroke-width": L.value.strokeWidth,
1818
+ "stroke-linecap": "round",
1819
+ "stroke-linejoin": "round",
1820
+ class: v({ "vue-data-ui-bar-transition": jn.value })
1821
+ }, null, 10, Dt))), 128))])) : h("", !0)], 64)) : (x(), g(f, { key: 2 }, [(x(!0), g(f, null, C(e.horizontal_x, (t, n) => (x(), g("rect", {
1822
+ key: `stackbar-rect-${e.rectKeys[n]}`,
1823
+ x: E(ge)(t, G.value.left),
1824
+ y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
1825
+ width: E(ge)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
1826
+ rx: L.value.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : L.value.borderRadius,
1827
+ height: X.value * (1 - L.value.gapRatio / 2),
1828
+ fill: L.value.gradient.show ? `url(#gradient_${e.id})` : e.color,
1829
+ stroke: B.value.backgroundColor,
1830
+ "stroke-width": L.value.strokeWidth,
1831
+ "stroke-linecap": "round",
1832
+ "stroke-linejoin": "round",
1833
+ class: v({ "vue-data-ui-bar-transition": jn.value })
1834
+ }, null, 10, Ot))), 128)), t.$slots.pattern ? (x(), g("g", kt, [(x(!0), g(f, null, C(e.horizontal_x, (t, n) => (x(), g("rect", {
1835
+ key: `stackbar-pattern-rect-${e.rectKeys[n]}`,
1836
+ x: E(ge)(t, G.value.left),
1837
+ y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
1838
+ width: E(ge)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
1839
+ rx: L.value.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : L.value.borderRadius,
1840
+ height: X.value * (1 - L.value.gapRatio / 2),
1841
+ fill: `url(#pattern_${A.value}_${e.absoluteIndex})`,
1842
+ stroke: B.value.backgroundColor,
1843
+ "stroke-width": L.value.strokeWidth,
1844
+ "stroke-linecap": "round",
1845
+ "stroke-linejoin": "round",
1846
+ class: v({ "vue-data-ui-bar-transition": jn.value })
1847
+ }, null, 10, At))), 128))])) : h("", !0)], 64))]))), 128)),
1848
+ I.value.x.showAxis ? (x(), g("line", {
1849
+ key: 7,
1850
+ x1: G.value.left,
1851
+ x2: G.value.right,
1852
+ y1: G.value.bottom,
1853
+ y2: G.value.bottom,
1854
+ stroke: I.value.x.axisColor,
1855
+ "stroke-width": I.value.x.axisThickness,
1856
+ "stroke-linecap": "round",
1857
+ "stroke-linejoin": "round"
1858
+ }, null, 8, jt)) : h("", !0),
1859
+ I.value.y.showAxis && !L.value.distributed ? (x(), g("line", {
1860
+ key: 8,
1861
+ x1: Er.value ? G.value.right : G.value.left,
1862
+ x2: Er.value ? G.value.right : G.value.left,
1863
+ y1: G.value.top,
1864
+ y2: G.value.bottom,
1865
+ stroke: I.value.y.axisColor,
1866
+ "stroke-width": I.value.y.axisThickness,
1867
+ "stroke-linecap": "round",
1868
+ "stroke-linejoin": "round"
1869
+ }, null, 8, Mt)) : h("", !0),
1870
+ I.value.x.axisName.show && I.value.x.axisName.text ? (x(), g("text", {
1871
+ key: 9,
1872
+ ref_key: "xAxisLabel",
1873
+ ref: Rn,
1874
+ x: G.value.left + G.value.width / 2,
1875
+ y: G.value.chartHeight - 3,
1876
+ "font-size": I.value.x.axisName.fontSize,
1877
+ fill: I.value.x.axisName.color,
1878
+ "font-weight": I.value.x.axisName.bold ? "bold" : "normal",
1879
+ "text-anchor": "middle"
1880
+ }, T(I.value.x.axisName.text), 9, Nt)) : h("", !0),
1881
+ I.value.y.axisName.show && I.value.y.axisName.text ? (x(), g("text", {
1882
+ key: 10,
1883
+ ref_key: "yAxisLabel",
1884
+ ref: zn,
1885
+ transform: `translate(${Er.value ? W.value.width - I.value.y.axisName.fontSize / 2 - I.value.y.axisName.offsetX : I.value.y.axisName.fontSize + I.value.y.axisName.offsetX}, ${G.value.top + G.value.height / 2}) rotate(-90)`,
1886
+ "font-size": I.value.y.axisName.fontSize,
1887
+ fill: I.value.y.axisName.color,
1888
+ "font-weight": I.value.y.axisName.bold ? "bold" : "normal",
1889
+ "text-anchor": "middle"
1890
+ }, T(I.value.y.axisName.text), 9, Pt)) : h("", !0),
1891
+ U.value.dataLabels.show && P.value.orientation === "vertical" ? (x(), g(f, { key: 11 }, [(x(!0), g(f, null, C($.value, (e, t) => (x(), g("g", { key: `dp_${e.id}` }, [(x(!0), g(f, null, C(e.x, (n, r) => (x(), g(f, { key: `rect_${e.id}_${J.value.start + r}` }, [Ki(e.series[r], e.proportions[r]) ? (x(), g("text", {
1892
+ key: 0,
1893
+ class: v({ "vue-data-ui-transition": E(V) }),
1894
+ transform: `translate(${n + X.value * (1 - L.value.gapRatio / 2) / 2}, ${e.y[r] + e.height[r] / 2 + L.value.dataLabels.fontSize / 3})`,
1895
+ "font-size": L.value.dataLabels.fontSize,
1896
+ fill: L.value.dataLabels.adaptColorToBackground ? E(he)(e.color) : L.value.dataLabels.color,
1897
+ "font-weight": L.value.dataLabels.bold ? "bold" : "normal",
1898
+ "text-anchor": "middle"
1899
+ }, T(L.value.showDistributedPercentage && L.value.distributed ? vi(e.proportions[r] * 100, e, t, r) : _i(e.series[r], e, t, r, e.signedSeries[r])), 11, Ft)) : h("", !0)], 64))), 128))]))), 128)), L.value.totalValues.show && $.value.length > 1 ? (x(), g("g", {
1900
+ key: 0,
1901
+ ref_key: "sumTop",
1902
+ ref: Hn
1903
+ }, [(x(!0), g(f, null, C(gi.value, (e, t) => (x(), g(f, { key: `tl_${t + J.value.start}` }, [!L.value.dataLabels.hideEmptyValues || e.value !== 0 ? (x(), g("text", {
1904
+ key: 0,
1905
+ class: v({ "vue-data-ui-transition": E(V) }),
1906
+ transform: `translate(${G.value.left + X.value * t + X.value / 2}, ${fa(t)})`,
1907
+ "text-anchor": "middle",
1908
+ "font-size": L.value.totalValues.fontSize,
1909
+ "font-weight": L.value.totalValues.bold ? "bold" : "normal",
1910
+ fill: L.value.totalValues.color
1911
+ }, T(_i(e.value, e, t, e.sign)), 11, It)) : h("", !0)], 64))), 128))], 512)) : h("", !0)], 64)) : h("", !0),
1912
+ U.value.dataLabels.show && P.value.orientation === "horizontal" ? (x(), g(f, { key: 12 }, [(x(!0), g(f, null, C($.value, (e, t) => (x(), g("g", null, [(x(!0), g(f, null, C(e.horizontal_x, (n, r) => (x(), g(f, null, [Ki(e.series[r], e.proportions[r]) ? (x(), g("text", {
1913
+ key: 0,
1914
+ class: v({ "vue-data-ui-transition": E(V) }),
1915
+ transform: `translate(${n + (e.horizontal_width[r] < 0 ? 1e-4 : e.horizontal_width[r]) / 2}, ${e.horizontal_y[r] + X.value * (1 - L.value.gapRatio / 2) / 2 + L.value.dataLabels.fontSize / 3})`,
1916
+ "font-size": L.value.dataLabels.fontSize,
1917
+ fill: L.value.dataLabels.adaptColorToBackground ? E(he)(e.color) : L.value.dataLabels.color,
1918
+ "font-weight": L.value.dataLabels.bold ? "bold" : "normal",
1919
+ "text-anchor": "middle"
1920
+ }, T(L.value.showDistributedPercentage && L.value.distributed ? vi(e.proportions[r] * 100, e, t, r) : _i(e.series[r], e, t, r, e.signedSeries[r])), 11, Lt)) : h("", !0)], 64))), 256))]))), 256)), L.value.totalValues.show && $.value.length > 1 ? (x(), g("g", {
1921
+ key: 0,
1922
+ ref_key: "sumRight",
1923
+ ref: Un
1924
+ }, [(x(!0), g(f, null, C(gi.value, (e, t) => (x(), g(f, null, [!L.value.dataLabels.hideEmptyValues || e.value !== 0 ? (x(), g("text", {
1925
+ key: 0,
1926
+ class: v({ "vue-data-ui-transition": E(V) }),
1927
+ transform: `translate(${pa(t)}, ${G.value.top + X.value * t + X.value / 2 + L.value.totalValues.fontSize / 3})`,
1928
+ "text-anchor": "start",
1929
+ "font-size": L.value.totalValues.fontSize,
1930
+ "font-weight": L.value.totalValues.bold ? "bold" : "normal",
1931
+ fill: L.value.totalValues.color
1932
+ }, T(_i(e.value, e, t, e.sign)), 11, Rt)) : h("", !0)], 64))), 256))], 512)) : h("", !0)], 64)) : h("", !0),
1933
+ I.value.y.axisLabels.show && !L.value.distributed && P.value.orientation === "vertical" ? (x(), g("g", {
1934
+ key: 13,
1935
+ ref_key: "scaleLabels",
1936
+ ref: Bn
1937
+ }, [(x(!0), g(f, null, C(Z.value, (e, t) => (x(), g("path", {
1938
+ key: `ty_${t}`,
1939
+ stroke: I.value.x.axisColor,
1940
+ class: v({ "vue-data-ui-transition": E(V) }),
1941
+ d: `M${Er.value ? G.value.right : G.value.left},${e.y} ${Er.value ? G.value.right + 6 : G.value.left - 6},${e.y}`,
1942
+ "stroke-width": 1,
1943
+ "stroke-linecap": "round"
1944
+ }, null, 10, zt))), 128)), (x(!0), g(f, null, C(Z.value, (e, t) => (x(), g("text", {
1945
+ class: v({ "vue-data-ui-transition": E(V) }),
1946
+ key: `tl_${t}`,
1947
+ transform: `translate(${e.x}, ${e.y + I.value.y.axisLabels.fontSize / 3})`,
1948
+ "font-size": I.value.y.axisLabels.fontSize,
1949
+ "font-weight": I.value.y.axisLabels.bold ? "bold" : "normal",
1950
+ fill: I.value.y.axisLabels.color,
1951
+ "text-anchor": Er.value ? "start" : "end"
1952
+ }, T(E(ce)(I.value.y.axisLabels.formatter, e.value, E(d)({
1953
+ p: L.value.dataLabels.prefix,
1954
+ v: e.value,
1955
+ s: L.value.dataLabels.suffix,
1956
+ r: I.value.y.axisLabels.rounding
1957
+ }), { datapoint: e })), 11, Bt))), 128))], 512)) : h("", !0),
1958
+ I.value.y.axisLabels.show && !L.value.distributed && P.value.orientation === "horizontal" ? (x(), g("g", {
1959
+ key: 14,
1960
+ ref_key: "scaleLabels",
1961
+ ref: Bn
1962
+ }, [(x(!0), g(f, null, C(Z.value, (e, t) => (x(), g("path", {
1963
+ key: `scy_${t}`,
1964
+ d: `M${e.horizontal_x},${G.value.bottom} ${e.horizontal_x},${G.value.bottom + 6}`,
1965
+ class: v({ "vue-data-ui-transition": E(V) }),
1966
+ stroke: I.value.x.axisColor,
1967
+ "stroke-width": 1,
1968
+ "stroke-linecap": "round"
1969
+ }, null, 10, Vt))), 128)), (x(!0), g(f, null, C(Z.value, (e, t) => (x(), g("text", {
1970
+ class: v(["vue-data-ui-time-label", { "vue-data-ui-transition": E(V) }]),
1971
+ key: `tly_${t}`,
1972
+ "font-size": R.value.fontSize,
1973
+ "font-weight": I.value.y.axisLabels.bold ? "bold" : "normal",
1974
+ fill: I.value.y.axisLabels.color,
1975
+ "text-anchor": R.value.rotation > 0 ? "start" : R.value.rotation < 0 ? "end" : "middle",
1976
+ transform: `translate(${e.horizontal_x}, ${G.value.bottom + R.value.fontSize * 1.3 + R.value.offsetY}), rotate(${R.value.rotation})`
1977
+ }, T(E(ce)(I.value.y.axisLabels.formatter, e.value, E(d)({
1978
+ p: L.value.dataLabels.prefix,
1979
+ v: e.value,
1980
+ s: L.value.dataLabels.suffix,
1981
+ r: I.value.y.axisLabels.rounding
1982
+ }), { datapoint: e })), 11, Ht))), 128))], 512)) : h("", !0),
1983
+ R.value.show && P.value.orientation === "vertical" ? (x(), g("g", {
1984
+ key: 15,
1985
+ ref_key: "timeLabelsEls",
1986
+ ref: Vn
1987
+ }, [t.$slots["time-label"] ? (x(), g("g", Ut, [(x(!0), g(f, null, C(oi.value, (e, n) => (x(), g("g", null, [w(t.$slots, "time-label", tt({ ref_for: !0 }, {
1988
+ x: G.value.left + X.value * n + X.value / 2,
1989
+ y: G.value.bottom + I.value.x.timeLabels.fontSize * 1.3 + I.value.x.timeLabels.offsetY,
1990
+ fontSize: I.value.x.timeLabels.fontSize,
1991
+ fill: I.value.x.timeLabels.color,
1992
+ transform: `translate(${G.value.left + X.value * n + X.value / 2}, ${G.value.bottom + R.value.fontSize * 1.3 + R.value.offsetY}), rotate(${R.value.rotation})`,
1993
+ absoluteIndex: e.absoluteIndex,
1994
+ content: e.text,
1995
+ textAnchor: I.value.x.timeLabels.rotation > 0 ? "start" : I.value.x.timeLabels.rotation < 0 ? "end" : "middle",
1996
+ show: !0
1997
+ }), void 0, !0)]))), 256))])) : (x(), g("g", Wt, [(x(!0), g(f, null, C(oi.value, (e, t) => (x(), g("g", null, [String(e.text).includes("\n") ? (x(), g("text", {
1998
+ class: v({ "vue-data-ui-transition": E(V) }),
1999
+ key: t + "-multi",
2000
+ "text-anchor": I.value.x.timeLabels.rotation > 0 ? "start" : I.value.x.timeLabels.rotation < 0 ? "end" : "middle",
2001
+ "font-size": I.value.x.timeLabels.fontSize,
2002
+ fill: I.value.x.timeLabels.color,
2003
+ transform: `
2004
+ translate(
2005
+ ${G.value.left + X.value * t + X.value / 2},
2006
+ ${G.value.bottom + R.value.fontSize * 1.3 + R.value.offsetY}
2007
+ ),
2008
+ rotate(${R.value.rotation})
2009
+ `,
2010
+ style: b({ cursor: H.value ? "pointer" : "default" }),
2011
+ innerHTML: E(a)({
2012
+ content: String(e.text),
2013
+ fontSize: I.value.x.timeLabels.fontSize,
2014
+ fill: I.value.x.timeLabels.color,
2015
+ x: 0,
2016
+ y: 0
2017
+ }),
2018
+ onClick: () => Wi(e, t)
2019
+ }, null, 14, Kt)) : (x(), g("text", {
2020
+ class: "vue-data-ui-time-label",
2021
+ key: t,
2022
+ "text-anchor": I.value.x.timeLabels.rotation > 0 ? "start" : I.value.x.timeLabels.rotation < 0 ? "end" : "middle",
2023
+ "font-size": I.value.x.timeLabels.fontSize,
2024
+ "font-weight": I.value.x.timeLabels.bold ? "bold" : "normal",
2025
+ fill: I.value.x.timeLabels.color,
2026
+ transform: `translate(${G.value.left + X.value * t + X.value / 2}, ${G.value.bottom + R.value.fontSize * 1.3 + R.value.offsetY}), rotate(${R.value.rotation})`,
2027
+ style: b({ cursor: H.value ? "pointer" : "default" }),
2028
+ onClick: () => Wi(e, t)
2029
+ }, T(e.text), 13, Gt))]))), 256))]))], 512)) : h("", !0),
2030
+ R.value.show && P.value.orientation === "horizontal" ? (x(), g("g", {
2031
+ key: 16,
2032
+ ref_key: "timeLabelsEls",
2033
+ ref: Vn
2034
+ }, [t.$slots["time-label"] ? (x(), g("g", qt, [(x(!0), g(f, null, C(oi.value, (e, n) => (x(), g("g", null, [w(t.$slots, "time-label", tt({ ref_for: !0 }, {
2035
+ x: G.value.left - 8,
2036
+ y: G.value.top + X.value * n + X.value / 2 + I.value.y.axisLabels.fontSize / 3,
2037
+ fontSize: I.value.x.timeLabels.fontSize,
2038
+ fill: I.value.x.timeLabels.color,
2039
+ transform: null,
2040
+ absoluteIndex: e.absoluteIndex,
2041
+ content: e.text,
2042
+ textAnchor: "end",
2043
+ show: !0
2044
+ }), void 0, !0)]))), 256))])) : (x(), g("g", Jt, [(x(!0), g(f, null, C(oi.value, (e, t) => (x(), g("g", null, [String(e.text).includes("\n") ? (x(), g("text", {
2045
+ key: 1,
2046
+ "text-anchor": "end",
2047
+ "font-size": I.value.y.axisLabels.fontSize,
2048
+ "font-weight": I.value.y.axisLabels.bold ? "bold" : "normal",
2049
+ fill: I.value.y.axisLabels.color,
2050
+ transform: `translate(${G.value.left - 8}, ${G.value.top + X.value * t + X.value / 2 + I.value.y.axisLabels.fontSize / 3})`,
2051
+ style: b({ cursor: H.value ? "pointer" : "default" }),
2052
+ onClick: () => Wi(e, t),
2053
+ innerHTML: E(s)({
2054
+ content: String(e.text),
2055
+ fontSize: I.value.y.axisLabels.fontSize,
2056
+ fill: I.value.y.axisLabels.color,
2057
+ stroke: B.value.backgroundColor,
2058
+ x: G.value.left - 8,
2059
+ y: 0
2060
+ })
2061
+ }, null, 12, Xt)) : (x(), g("text", {
2062
+ key: 0,
2063
+ "text-anchor": "end",
2064
+ "font-size": I.value.y.axisLabels.fontSize,
2065
+ "font-weight": I.value.y.axisLabels.bold ? "bold" : "normal",
2066
+ fill: I.value.y.axisLabels.color,
2067
+ stroke: B.value.backgroundColor,
2068
+ "stroke-linecap": "round",
2069
+ "stroke-linejoin": "round",
2070
+ "stroke-width": "3",
2071
+ "paint-order": "stroke fill",
2072
+ transform: `translate(${G.value.left - 8}, ${G.value.top + X.value * t + X.value / 2 + I.value.y.axisLabels.fontSize / 3})`,
2073
+ style: b({ cursor: H.value ? "pointer" : "default" }),
2074
+ onClick: () => Wi(e, t)
2075
+ }, T(e.text), 13, Yt))]))), 256))]))], 512)) : h("", !0),
2076
+ U.value.showTooltip && P.value.orientation === "vertical" ? (x(!0), g(f, { key: 17 }, C(J.value.end - J.value.start, (e, t) => (x(), g("rect", {
2077
+ x: G.value.left + t * X.value,
2078
+ y: G.value.top,
2079
+ width: X.value,
2080
+ height: G.value.height < 0 ? 0 : G.value.height,
2081
+ onClick: () => yi(t),
2082
+ onMouseenter: () => wi(t, "pointer"),
2083
+ onMouseleave: () => xi(t),
2084
+ fill: t === M.value || t === er.value ? B.value.highlighter.color : "transparent",
2085
+ style: b({ opacity: B.value.highlighter.opacity / 100 })
2086
+ }, null, 44, Zt))), 256)) : h("", !0),
2087
+ U.value.showTooltip && P.value.orientation === "horizontal" ? (x(!0), g(f, { key: 18 }, C(J.value.end - J.value.start, (e, t) => (x(), g("rect", {
2088
+ x: G.value.left,
2089
+ y: G.value.top + t * X.value,
2090
+ width: G.value.width < 0 ? 0 : G.value.width,
2091
+ height: X.value,
2092
+ onClick: () => yi(t),
2093
+ onMouseenter: () => wi(t, "pointer"),
2094
+ onMouseleave: () => xi(t),
2095
+ fill: t === M.value || t === er.value ? B.value.highlighter.color : "transparent",
2096
+ style: b({ opacity: B.value.highlighter.opacity / 100 })
2097
+ }, null, 44, Qt))), 256)) : h("", !0),
2098
+ Br.value ? (x(), g("rect", tt({ key: 19 }, Rr.value, {
2099
+ "data-start": J.value.start,
2100
+ "data-end": J.value.end
2101
+ }), null, 16, $t)) : h("", !0),
2102
+ w(t.$slots, "svg", { svg: {
2103
+ drawingArea: G.value,
2104
+ slicer: J.value,
2105
+ data: $.value,
2106
+ isPrintingImg: E(gr) || E(_r) || E($i),
2107
+ isPrintingSvg: E(ea),
2108
+ barWidth: X.value
2109
+ } }, void 0, !0)
2110
+ ], 46, gt)), t.$slots.hint ? (x(), g("div", en, [w(t.$slots, "hint", y(_({
2111
+ hint: P.value.a11y.translations.keyboardNavigation,
2112
+ isVisible: ha.value
2113
+ })), void 0, !0)])) : h("", !0)]),
2114
+ t.$slots.watermark ? (x(), g("div", tn, [w(t.$slots, "watermark", y(_({ isPrinting: E(gr) || E(_r) || E($i) || E(ea) })), void 0, !0)])) : h("", !0),
2115
+ B.value.zoom.show && xn.value && aa.value && q.value > 6 ? (x(), m(He, {
2116
+ key: 5,
2117
+ ref_key: "chartSlicer",
2118
+ ref: On,
2119
+ "data-dom-to-png-ignore-layout": "",
2120
+ allMinimaps: Yr.value,
2121
+ background: B.value.zoom.color,
2122
+ borderColor: B.value.backgroundColor,
2123
+ customFormat: B.value.zoom.customFormat,
2124
+ cutNullValues: !1,
2125
+ forceZeroCenter: !0,
2126
+ enableRangeHandles: B.value.zoom.enableRangeHandles,
2127
+ enableSelectionDrag: B.value.zoom.enableSelectionDrag,
2128
+ end: J.value.end,
2129
+ focusOnDrag: B.value.zoom.focusOnDrag,
2130
+ focusRangeRatio: B.value.zoom.focusRangeRatio,
2131
+ fontSize: B.value.zoom.fontSize,
2132
+ immediate: !B.value.zoom.preview.enable,
2133
+ inputColor: B.value.zoom.color,
2134
+ isPreview: Br.value,
2135
+ labelLeft: R.value.values[J.value.start] ? Q.value?.[0]?.text ?? "" : "",
2136
+ labelRight: R.value.values[J.value.end - 1] ? Q.value?.at(-1)?.text ?? "" : "",
2137
+ max: Math.max(...e.dataset.map((e) => e.series.length)),
2138
+ min: 0,
2139
+ minimap: Jr.value,
2140
+ minimapCompact: B.value.zoom.minimap.compact,
2141
+ minimapFrameColor: B.value.zoom.minimap.frameColor,
2142
+ minimapIndicatorColor: B.value.zoom.minimap.indicatorColor,
2143
+ minimapMerged: !1,
2144
+ minimapSelectedColor: B.value.zoom.minimap.selectedColor,
2145
+ minimapSelectedColorOpacity: B.value.zoom.minimap.selectedColorOpacity,
2146
+ minimapSelectedIndex: M.value,
2147
+ minimapSelectionRadius: 1,
2148
+ preciseLabels: di.value.length ? di.value : ti.value,
2149
+ refreshEndPoint: B.value.zoom.endIndex === null ? Math.max(...e.dataset.map((e) => e.series.length)) : B.value.zoom.endIndex + 1,
2150
+ refreshStartPoint: B.value.zoom.startIndex === null ? 0 : B.value.zoom.startIndex,
2151
+ selectColor: B.value.zoom.highlightColor,
2152
+ selectedSeries: Si.value,
2153
+ smoothMinimap: !1,
2154
+ start: J.value.start,
2155
+ textColor: B.value.color,
2156
+ timeLabels: ti.value,
2157
+ usePreciseLabels: R.value.datetimeFormatter.enable && !B.value.zoom.useDefaultFormat,
2158
+ valueEnd: J.value.end,
2159
+ valueStart: J.value.start,
2160
+ verticalHandles: B.value.zoom.minimap.verticalHandles,
2161
+ maxWidth: B.value.zoom.maxWidth,
2162
+ minimapLeftInsetRatio: G.value.chartWidth > 0 && B.value.zoom.autoFit ? G.value.left / G.value.chartWidth : null,
2163
+ minimapRightInsetRatio: G.value.chartWidth > 0 && B.value.zoom.autoFit ? (G.value.chartWidth - G.value.right) / G.value.chartWidth : null,
2164
+ isCursorPointer: H.value,
2165
+ additionalMinimapHeight: B.value.zoom.minimap.additionalHeight,
2166
+ handleType: B.value.zoom.minimap.handleType,
2167
+ handleIconColor: B.value.zoom.minimap.handleIconColor,
2168
+ handleBorderWidth: B.value.zoom.minimap.handleBorderWidth,
2169
+ handleBorderColor: B.value.zoom.minimap.handleBorderColor,
2170
+ handleFill: B.value.zoom.minimap.handleFill,
2171
+ handleWidth: B.value.zoom.minimap.handleWidth,
2172
+ "onUpdate:end": la,
2173
+ "onUpdate:start": ca,
2174
+ onTrapMouse: zr,
2175
+ onReset: r[0] ||= () => Gr({ force: !0 }),
2176
+ onFutureEnd: r[1] ||= (e) => Vr("end", e),
2177
+ onFutureStart: r[2] ||= (e) => Vr("start", e)
2178
+ }, {
2179
+ "reset-action": D(({ reset: e }) => [w(t.$slots, "reset-action", y(_({ reset: e })), void 0, !0)]),
2180
+ slotMap: D(({ width: e, height: t, unitW: n }) => [(x(!0), g(f, null, C($.value, (e) => (x(), g("g", { key: e.id }, [(x(!0), g(f, null, C(e.xMinimap({
2181
+ left: 0,
2182
+ unitW: n
2183
+ }), (r, a) => (x(), g("rect", {
2184
+ key: `minimap-rect-${e.minimapRectKeys[a]}`,
2185
+ x: a === 0 ? r - n * (L.value.gapRatio / 4) : r - n / 2,
2186
+ y: Math.max(0, Math.min(t, e.yMinimap({ minimapH: t })[a])),
2187
+ height: e.heightMinimap({ minimapH: t })[a],
2188
+ width: [0, q.value - 1].includes(a) ? n * (1 - L.value.gapRatio / 2) / 2 : n * (1 - L.value.gapRatio / 2),
2189
+ fill: L.value.gradient.show ? `url(#gradient_${e.id})` : e.color,
2190
+ stroke: B.value.backgroundColor,
2191
+ "stroke-width": .5,
2192
+ rx: "0",
2193
+ "stroke-linecap": "round",
2194
+ "stroke-linejoin": "round",
2195
+ style: b({ opacity: a >= Y.value.start && a <= Y.value.end ? 1 : .62 })
2196
+ }, null, 12, nn))), 128))]))), 128))]),
2197
+ _: 3
2198
+ }, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.isCursorPointer.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : h("", !0),
2199
+ $e(E(cn), {
2200
+ teleportTo: z.value.teleportTo,
2201
+ show: U.value.showTooltip && Sn.value,
2202
+ backgroundColor: z.value.backgroundColor,
2203
+ color: z.value.color,
2204
+ fontSize: z.value.fontSize,
2205
+ borderRadius: z.value.borderRadius,
2206
+ borderColor: z.value.borderColor,
2207
+ borderWidth: z.value.borderWidth,
2208
+ backgroundOpacity: z.value.backgroundOpacity,
2209
+ position: z.value.position,
2210
+ offsetX: z.value.offsetX,
2211
+ offsetY: z.value.offsetY,
2212
+ parent: k.value,
2213
+ content: wn.value,
2214
+ isFullscreen: An.value,
2215
+ isCustom: E(n)(z.value.customFormat),
2216
+ smooth: z.value.smooth,
2217
+ backdropFilter: z.value.backdropFilter,
2218
+ smoothForce: z.value.smoothForce,
2219
+ smoothSnapThreshold: z.value.smoothSnapThreshold,
2220
+ isA11yMode: Yn.value === "keyboard",
2221
+ a11yPosition: Jn.value
2222
+ }, {
2223
+ "tooltip-before": D(() => [w(t.$slots, "tooltip-before", y(_({ ...Cn.value })), void 0, !0)]),
2224
+ tooltip: D(() => [w(t.$slots, "tooltip", y(_({ ...Cn.value })), void 0, !0)]),
2225
+ "tooltip-after": D(() => [w(t.$slots, "tooltip-after", y(_({ ...Cn.value })), void 0, !0)]),
2226
+ _: 3
2227
+ }, 8, [
2228
+ "teleportTo",
2229
+ "show",
2230
+ "backgroundColor",
2231
+ "color",
2232
+ "fontSize",
2233
+ "borderRadius",
2234
+ "borderColor",
2235
+ "borderWidth",
2236
+ "backgroundOpacity",
2237
+ "position",
2238
+ "offsetX",
2239
+ "offsetY",
2240
+ "parent",
2241
+ "content",
2242
+ "isFullscreen",
2243
+ "isCustom",
2244
+ "smooth",
2245
+ "backdropFilter",
2246
+ "smoothForce",
2247
+ "smoothSnapThreshold",
2248
+ "isA11yMode",
2249
+ "a11yPosition"
2250
+ ]),
2251
+ Xe("div", { id: `legend-bottom-${A.value}` }, null, 8, rn),
2252
+ Fn.value && (Zi.value.show || t.$slots.legend) ? (x(), m(Ye, {
2253
+ key: 6,
2254
+ to: Zi.value.position === "top" ? `#legend-top-${A.value}` : `#legend-bottom-${A.value}`
2255
+ }, [Xe("div", {
2256
+ ref_key: "chartLegend",
2257
+ ref: Dn
2258
+ }, [w(t.$slots, "legend", { legend: Bi.value }, () => [Zi.value.show ? (x(), m(qe, {
2259
+ key: 0,
2260
+ legendSet: Bi.value,
2261
+ config: Vi.value,
2262
+ isCursorPointer: H.value,
2263
+ onClickMarker: r[3] ||= ({ legend: e }) => e.segregate()
2264
+ }, Ze({
2265
+ item: D(({ legend: e }) => [E(nr) ? h("", !0) : (x(), g("div", {
2266
+ key: 0,
2267
+ onClick: (t) => e.segregate(),
2268
+ style: b(`opacity:${j.value.includes(e.id) ? .5 : 1}`)
2269
+ }, T(e.name), 13, an))]),
2270
+ legendToggle: D(() => [Bi.value.length > 2 && Zi.value.selectAllToggle.show && !E(nr) ? (x(), m(Ue, {
2271
+ key: 0,
2272
+ backgroundColor: Zi.value.selectAllToggle.backgroundColor,
2273
+ color: Zi.value.selectAllToggle.color,
2274
+ fontSize: Zi.value.fontSize,
2275
+ checked: j.value.length > 0,
2276
+ isCursorPointer: H.value,
2277
+ onToggle: Fi
2278
+ }, null, 8, [
2279
+ "backgroundColor",
2280
+ "color",
2281
+ "fontSize",
2282
+ "checked",
2283
+ "isCursorPointer"
2284
+ ])) : h("", !0)]),
2285
+ _: 2
2286
+ }, [t.$slots.pattern ? {
2287
+ name: "legend-pattern",
2288
+ fn: D(({ legend: e, index: t }) => [$e(Le, {
2289
+ shape: e.shape,
2290
+ radius: 30,
2291
+ stroke: "none",
2292
+ plot: {
2293
+ x: 30,
2294
+ y: 30
2295
+ },
2296
+ fill: `url(#pattern_${A.value}_${t})`
2297
+ }, null, 8, ["shape", "fill"])]),
2298
+ key: "0"
2299
+ } : void 0]), 1032, [
2300
+ "legendSet",
2301
+ "config",
2302
+ "isCursorPointer"
2303
+ ])) : h("", !0)], !0)], 512)], 8, ["to"])) : h("", !0),
2304
+ t.$slots.source ? (x(), g("div", {
2305
+ key: 7,
2306
+ ref_key: "source",
2307
+ ref: kn,
2308
+ dir: "auto"
2309
+ }, [w(t.$slots, "source", {}, void 0, !0)], 512)) : h("", !0),
2310
+ xn.value && F.value.buttons.table ? (x(), m(at(Ji.value.component), tt({ key: 8 }, Ji.value.props, {
2311
+ ref_key: "tableUnit",
2312
+ ref: In,
2313
+ onClose: Yi
2314
+ }), Ze({
2315
+ content: D(() => [$e(E(dn), {
2316
+ colNames: Pi.value.colNames,
2317
+ head: Pi.value.head,
2318
+ body: Pi.value.body,
2319
+ config: Pi.value.config,
2320
+ title: P.value.table.useDialog ? "" : Ji.value.title,
2321
+ withCloseButton: !P.value.table.useDialog,
2322
+ isCursorPointer: H.value,
2323
+ onClose: Yi
2324
+ }, {
2325
+ th: D(({ th: e }) => [e === "__SUM__" ? (x(), g("div", on, [$e(E(ln), {
2326
+ name: "sigma",
2327
+ stroke: Pi.value.config.th.color,
2328
+ size: 16
2329
+ }, null, 8, ["stroke"])])) : (x(), g("div", sn, T(e), 1))]),
2330
+ td: D(({ td: e }) => [Qe(T(isNaN(Number(e)) ? e : E(d)({
2331
+ p: L.value.dataLabels.prefix,
2332
+ v: e,
2333
+ s: L.value.dataLabels.suffix,
2334
+ r: P.value.table.td.roundingValue
2335
+ })), 1)]),
2336
+ _: 1
2337
+ }, 8, [
2338
+ "colNames",
2339
+ "head",
2340
+ "body",
2341
+ "config",
2342
+ "title",
2343
+ "withCloseButton",
2344
+ "isCursorPointer"
2345
+ ])]),
2346
+ _: 2
2347
+ }, [P.value.table.useDialog ? {
2348
+ name: "title",
2349
+ fn: D(() => [Qe(T(Ji.value.title), 1)]),
2350
+ key: "0"
2351
+ } : void 0, P.value.table.useDialog ? {
2352
+ name: "actions",
2353
+ fn: D(() => [Xe("button", {
2354
+ tabindex: "0",
2355
+ class: "vue-ui-user-options-button",
2356
+ onClick: r[4] ||= (e) => Ni(F.value.callbacks.csv),
2357
+ style: b({ cursor: H.value ? "pointer" : "default" })
2358
+ }, [$e(E(ln), {
2359
+ name: "fileCsv",
2360
+ stroke: Ji.value.props.color
2361
+ }, null, 8, ["stroke"])], 4)]),
2362
+ key: "1"
2363
+ } : void 0]), 1040)) : h("", !0),
2364
+ w(t.$slots, "skeleton", {}, () => [E(nr) ? (x(), m(Oe, { key: 0 })) : h("", !0)], !0)
2365
+ ], 46, ft));
2366
+ }
2367
+ }, [["__scopeId", "data-v-2b2bb8b2"]]);
2368
+ //#endregion
2369
+ export { dt as n, cn as t };