vue-data-ui 3.25.12 → 3.25.13

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 (154) hide show
  1. package/dist/{PackageVersion-KI_qWJHZ.js → PackageVersion-D5QkTJQU.js} +1 -1
  2. package/dist/components/vue-ui-3d-bar.js +1 -1
  3. package/dist/components/vue-ui-accordion.js +1 -1
  4. package/dist/components/vue-ui-age-pyramid.js +1 -1
  5. package/dist/components/vue-ui-annotator.js +1 -1
  6. package/dist/components/vue-ui-bullet.js +1 -1
  7. package/dist/components/vue-ui-bump.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dag.js +1 -1
  15. package/dist/components/vue-ui-dashboard.js +1 -1
  16. package/dist/components/vue-ui-digits.js +1 -1
  17. package/dist/components/vue-ui-donut-evolution.js +1 -1
  18. package/dist/components/vue-ui-donut.js +1 -1
  19. package/dist/components/vue-ui-dumbbell.js +1 -1
  20. package/dist/components/vue-ui-flow.js +1 -1
  21. package/dist/components/vue-ui-funnel.js +1 -1
  22. package/dist/components/vue-ui-galaxy.js +1 -1
  23. package/dist/components/vue-ui-gauge.js +1 -1
  24. package/dist/components/vue-ui-geo.js +1 -1
  25. package/dist/components/vue-ui-gizmo.js +1 -1
  26. package/dist/components/vue-ui-heatmap.js +1 -1
  27. package/dist/components/vue-ui-hill.js +1 -1
  28. package/dist/components/vue-ui-history-plot.js +1 -1
  29. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  30. package/dist/components/vue-ui-kpi.js +1 -1
  31. package/dist/components/vue-ui-label.js +1 -1
  32. package/dist/components/vue-ui-mini-loader.js +1 -1
  33. package/dist/components/vue-ui-molecule.js +1 -1
  34. package/dist/components/vue-ui-mood-radar.js +1 -1
  35. package/dist/components/vue-ui-nested-donuts.js +1 -1
  36. package/dist/components/vue-ui-onion.js +1 -1
  37. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  38. package/dist/components/vue-ui-quadrant.js +1 -1
  39. package/dist/components/vue-ui-quick-chart.js +1 -1
  40. package/dist/components/vue-ui-radar.js +1 -1
  41. package/dist/components/vue-ui-rating.js +1 -1
  42. package/dist/components/vue-ui-relation-circle.js +1 -1
  43. package/dist/components/vue-ui-ridgeline.js +1 -1
  44. package/dist/components/vue-ui-rings.js +1 -1
  45. package/dist/components/vue-ui-scatter.js +1 -1
  46. package/dist/components/vue-ui-skeleton.js +1 -1
  47. package/dist/components/vue-ui-smiley.js +1 -1
  48. package/dist/components/vue-ui-spark-trend.js +1 -1
  49. package/dist/components/vue-ui-sparkbar.js +1 -1
  50. package/dist/components/vue-ui-sparkgauge.js +1 -1
  51. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  52. package/dist/components/vue-ui-sparkline.js +1 -1
  53. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  54. package/dist/components/vue-ui-stackbar.js +1 -1
  55. package/dist/components/vue-ui-stackline.js +1 -1
  56. package/dist/components/vue-ui-strip-plot.js +1 -1
  57. package/dist/components/vue-ui-table-heatmap.js +1 -1
  58. package/dist/components/vue-ui-table-sparkline.js +1 -1
  59. package/dist/components/vue-ui-table.js +1 -1
  60. package/dist/components/vue-ui-thermometer.js +1 -1
  61. package/dist/components/vue-ui-timer.js +1 -1
  62. package/dist/components/vue-ui-tiremarks.js +1 -1
  63. package/dist/components/vue-ui-treemap.js +1 -1
  64. package/dist/components/vue-ui-vertical-bar.js +1 -1
  65. package/dist/components/vue-ui-waffle.js +1 -1
  66. package/dist/components/vue-ui-wheel.js +1 -1
  67. package/dist/components/vue-ui-word-cloud.js +1 -1
  68. package/dist/components/vue-ui-world.js +1 -1
  69. package/dist/components/vue-ui-xy-canvas.js +1 -1
  70. package/dist/components/vue-ui-xy.js +1 -1
  71. package/dist/{package-CUB9qFqi.js → package-Cmcke8zR.js} +1 -1
  72. package/dist/{render-common-DeM1ZJiv.js → render-common-CG1wuHZY.js} +1 -1
  73. package/dist/ssr/vue-ui-donut.js +1 -1
  74. package/dist/ssr/vue-ui-xy.js +1 -1
  75. package/dist/ssr.js +2 -2
  76. package/dist/style.css +1 -1
  77. package/dist/types/vue-data-ui.d.ts +3 -0
  78. package/dist/{useConfig-Be2DFBsb.js → useConfig-C2uy4ltq.js} +1 -0
  79. package/dist/{useObjectBindings-DUdzTGvh.js → useObjectBindings-CEuNiBIT.js} +1 -1
  80. package/dist/utils.js +1 -1
  81. package/dist/{vue-data-ui-COEVZKW5.js → vue-data-ui-BVzA0tEV.js} +69 -69
  82. package/dist/vue-data-ui.js +70 -70
  83. package/dist/{vue-ui-3d-bar-DFw5XDWb.js → vue-ui-3d-bar-Ckauu3d4.js} +2 -2
  84. package/dist/{vue-ui-accordion-BZCjuA3V.js → vue-ui-accordion-yHZMJLaY.js} +1 -1
  85. package/dist/{vue-ui-age-pyramid-DRUCkRz8.js → vue-ui-age-pyramid-BczIt1-U.js} +2 -2
  86. package/dist/{vue-ui-annotator-BfKA4YVr.js → vue-ui-annotator-BGB6K6u0.js} +2 -2
  87. package/dist/{vue-ui-bullet-B0IfmAiX.js → vue-ui-bullet-BoTsLccZ.js} +2 -2
  88. package/dist/{vue-ui-bump-C1kUAd9U.js → vue-ui-bump-B5ztSSQO.js} +2 -2
  89. package/dist/{vue-ui-candlestick-KA4AueJw.js → vue-ui-candlestick-BJtdA4Yu.js} +2 -2
  90. package/dist/{vue-ui-carousel-table-BxUd6pz5.js → vue-ui-carousel-table-D-3KSWok.js} +2 -2
  91. package/dist/{vue-ui-chestnut-DHSV3tgH.js → vue-ui-chestnut-W2l-W0_e.js} +2 -2
  92. package/dist/{vue-ui-chord-DwosQDGy.js → vue-ui-chord-BFPQsMj8.js} +2 -2
  93. package/dist/{vue-ui-circle-pack-OoLvvkpK.js → vue-ui-circle-pack-BtPc1BR3.js} +2 -2
  94. package/dist/{vue-ui-cursor-DIDq-I8_.js → vue-ui-cursor-CpNOiwkt.js} +2 -2
  95. package/dist/{vue-ui-dag-CEe-6BAo.js → vue-ui-dag-i-zPwLcN.js} +2 -2
  96. package/dist/{vue-ui-dashboard-Dyx0Ri4u.js → vue-ui-dashboard-DtaW9a2P.js} +65 -65
  97. package/dist/{vue-ui-digits-aocn4lMx.js → vue-ui-digits-BIlec9af.js} +2 -2
  98. package/dist/{vue-ui-donut-DBwkC_24.js → vue-ui-donut-Bgf-n95J.js} +2 -2
  99. package/dist/{vue-ui-donut-7uSOM7lM.js → vue-ui-donut-CJlBEyxu.js} +2 -2
  100. package/dist/{vue-ui-donut-evolution-BqQ7Tlsc.js → vue-ui-donut-evolution-C0BKntfL.js} +2 -2
  101. package/dist/{vue-ui-dumbbell-MGfC3D58.js → vue-ui-dumbbell-C112YLkC.js} +2 -2
  102. package/dist/{vue-ui-flow-593TeQ2W.js → vue-ui-flow-j4bDg9Zd.js} +2 -2
  103. package/dist/{vue-ui-funnel-DkJUBGun.js → vue-ui-funnel-CVHpfBCW.js} +2 -2
  104. package/dist/{vue-ui-galaxy-BrVH1I3l.js → vue-ui-galaxy-ChGpUWh8.js} +2 -2
  105. package/dist/{vue-ui-gauge-DC4S5TsV.js → vue-ui-gauge-Cp00vXfG.js} +2 -2
  106. package/dist/{vue-ui-geo-Yq0FgILc.js → vue-ui-geo-B4hDk5NO.js} +2 -2
  107. package/dist/{vue-ui-gizmo-D9gwOdZE.js → vue-ui-gizmo-D6nCCsS4.js} +2 -2
  108. package/dist/{vue-ui-heatmap-CIJRLiRS.js → vue-ui-heatmap-scVJc1cw.js} +3 -3
  109. package/dist/{vue-ui-hill-B8mE9MIi.js → vue-ui-hill-DnYUHGAK.js} +2 -2
  110. package/dist/{vue-ui-history-plot-Dj4qkhNI.js → vue-ui-history-plot-C5qAMaaW.js} +2 -2
  111. package/dist/{vue-ui-horizontal-bar-njm9Qfcd.js → vue-ui-horizontal-bar-nEG4uvpv.js} +3 -3
  112. package/dist/{vue-ui-kpi-CFk0QESG.js → vue-ui-kpi-DOxId6xg.js} +2 -2
  113. package/dist/{vue-ui-label-7gnBMFu5.js → vue-ui-label-BDKY7BI7.js} +1 -1
  114. package/dist/{vue-ui-mini-loader-CUVEBqJw.js → vue-ui-mini-loader-BknVs9VJ.js} +1 -1
  115. package/dist/{vue-ui-molecule-GqArgNXc.js → vue-ui-molecule-_x232mMu.js} +2 -2
  116. package/dist/{vue-ui-mood-radar-Du71PAqx.js → vue-ui-mood-radar-D-F4855V.js} +2 -2
  117. package/dist/{vue-ui-nested-donuts-BRGYUoVS.js → vue-ui-nested-donuts-0E5IllFW.js} +2 -2
  118. package/dist/{vue-ui-onion-C4LsJp_7.js → vue-ui-onion-Eip0S1H7.js} +2 -2
  119. package/dist/{vue-ui-parallel-coordinate-plot-DumwZpjI.js → vue-ui-parallel-coordinate-plot-DO0sQdJw.js} +2 -2
  120. package/dist/{vue-ui-quadrant-BFEihaNk.js → vue-ui-quadrant-CA0ClWfL.js} +2 -2
  121. package/dist/{vue-ui-quick-chart-COWxCDXU.js → vue-ui-quick-chart-D-VuAoll.js} +2 -2
  122. package/dist/{vue-ui-radar-BZMDCj34.js → vue-ui-radar-BTD7Y0Ps.js} +2 -2
  123. package/dist/{vue-ui-rating-D0tMtjhc.js → vue-ui-rating-C_Qj6gnP.js} +1 -1
  124. package/dist/{vue-ui-relation-circle-DSNuFlbr.js → vue-ui-relation-circle-CcxLBVFV.js} +2 -2
  125. package/dist/{vue-ui-ridgeline-DHHjDn73.js → vue-ui-ridgeline-BZrzbbhb.js} +2 -2
  126. package/dist/{vue-ui-rings-BMKxADUw.js → vue-ui-rings-CO48GOP2.js} +2 -2
  127. package/dist/{vue-ui-scatter-BKJUWiYg.js → vue-ui-scatter-DrxUgZbQ.js} +2 -2
  128. package/dist/{vue-ui-skeleton-_EBFqU7v.js → vue-ui-skeleton-CeKjW4MX.js} +2 -2
  129. package/dist/{vue-ui-smiley-DsfTcCOQ.js → vue-ui-smiley-BvRwx69s.js} +1 -1
  130. package/dist/{vue-ui-spark-trend-Dj1tZM1l.js → vue-ui-spark-trend-DnujGRyt.js} +2 -2
  131. package/dist/{vue-ui-sparkbar-B7ogNgvT.js → vue-ui-sparkbar-Cd_uhYGD.js} +2 -2
  132. package/dist/{vue-ui-sparkgauge-BFGXwszU.js → vue-ui-sparkgauge-hT31YEtt.js} +2 -2
  133. package/dist/{vue-ui-sparkhistogram-c-DSMEiv.js → vue-ui-sparkhistogram-PKlTYhKA.js} +2 -2
  134. package/dist/vue-ui-sparkline-BSu1uRvP.js +1610 -0
  135. package/dist/{vue-ui-sparkstackbar-DIMZ8Wxa.js → vue-ui-sparkstackbar-R0ij2vi1.js} +2 -2
  136. package/dist/{vue-ui-stackbar-C53nXwth.js → vue-ui-stackbar-BrzzkGFk.js} +2 -2
  137. package/dist/{vue-ui-stackline-D4ehty6i.js → vue-ui-stackline-zEX3gR3y.js} +2 -2
  138. package/dist/{vue-ui-strip-plot-CNnl1U1H.js → vue-ui-strip-plot-DR3N56rS.js} +2 -2
  139. package/dist/{vue-ui-table-Bbw0YVee.js → vue-ui-table-Bg6BeLrf.js} +3 -3
  140. package/dist/{vue-ui-table-heatmap-B1uYpEhA.js → vue-ui-table-heatmap-C1b1Pcp8.js} +1 -1
  141. package/dist/{vue-ui-table-sparkline-D98mkhX0.js → vue-ui-table-sparkline-CkVXyequ.js} +2 -2
  142. package/dist/{vue-ui-thermometer-CDYrYD7E.js → vue-ui-thermometer-CqkaMF7Z.js} +2 -2
  143. package/dist/{vue-ui-timer-CW3wa1tF.js → vue-ui-timer-CgJvNwBv.js} +2 -2
  144. package/dist/{vue-ui-tiremarks-CayzbbTu.js → vue-ui-tiremarks-B078YJ9M.js} +2 -2
  145. package/dist/{vue-ui-treemap-BuOGDfHZ.js → vue-ui-treemap-Cfjf8mDl.js} +2 -2
  146. package/dist/{vue-ui-waffle-D47Z_prI.js → vue-ui-waffle-BZIcPa0l.js} +2 -2
  147. package/dist/{vue-ui-wheel-CNF5e3TM.js → vue-ui-wheel-CPTm8AHn.js} +2 -2
  148. package/dist/{vue-ui-word-cloud-y46KDG7e.js → vue-ui-word-cloud-DnGblUwj.js} +2 -2
  149. package/dist/{vue-ui-world-DKW2yCXn.js → vue-ui-world-KkcpeKqp.js} +2 -2
  150. package/dist/{vue-ui-xy-BgmEGWgv.js → vue-ui-xy-C6lVqZnx.js} +3 -3
  151. package/dist/{vue-ui-xy-G3lMLlIL.js → vue-ui-xy-ClCV7xA5.js} +2 -2
  152. package/dist/{vue-ui-xy-canvas-CMAT-hT1.js → vue-ui-xy-canvas-BlpCbXKR.js} +2 -2
  153. package/package.json +1 -1
  154. package/dist/vue-ui-sparkline-Bm59iQiE.js +0 -1587
@@ -1,1587 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, A as n, G as r, I as i, Jt as a, Kt as o, L as s, Mt as c, N as l, P as u, Rt as d, S as f, Tt as p, U as ee, W as te, X as ne, at as re, ct as ie, d as ae, i as oe, k as se, m as ce, qt as le, t as ue, tn as de, ut as fe, vt as pe } from "./lib-DOpaUOQx.js";
3
- import { n as me, t as he } from "./useHints-Dq_w2E8B.js";
4
- import { t as m } from "./useTimeLabels-d2f-W1L4.js";
5
- import { t as ge } from "./useConfig-Be2DFBsb.js";
6
- import { n as _e, t as ve } from "./BaseScanner-Dzc8VT3j.js";
7
- import { t as ye } from "./useNestedProp-Bux0f4iY.js";
8
- import { t as be } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as xe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
10
- import { l as Se, t as Ce } from "./useResponsive-ZtArZtUf.js";
11
- import { t as we } from "./DefGrad-DVBqDjhO.js";
12
- import { t as Te } from "./A11yDataTable-DdRsVULz.js";
13
- import { t as Ee } from "./useChartAccessibility-DYqac8yF.js";
14
- import { t as De } from "./usePrefersMotion-BC-CsqR1.js";
15
- import { t as Oe } from "./vue_ui_sparkline-auZhap6Y.js";
16
- import { Fragment as h, computed as g, createBlock as ke, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as Ae, createVNode as je, defineAsyncComponent as Me, guardReactiveProps as Ne, nextTick as b, normalizeProps as Pe, normalizeStyle as x, onBeforeUnmount as Fe, onMounted as Ie, openBlock as S, ref as C, renderList as w, renderSlot as T, shallowRef as Le, toDisplayString as Re, toRefs as ze, unref as E, watch as D, watchEffect as Be, withCtx as Ve } from "vue";
17
- //#region src/atoms/SparklinePulse.vue
18
- var He = {
19
- key: 0,
20
- style: { "pointer-events": "none" }
21
- }, Ue = [
22
- "r",
23
- "fill",
24
- "filter"
25
- ], We = [
26
- "begin",
27
- "dur",
28
- "repeatCount",
29
- "fill",
30
- "calcMode",
31
- "keySplines",
32
- "keyTimes",
33
- "keyPoints"
34
- ], Ge = ["href"], Ke = [
35
- "dur",
36
- "repeatCount",
37
- "fill",
38
- "values"
39
- ], qe = ["r", "fill"], O = [
40
- "begin",
41
- "dur",
42
- "repeatCount",
43
- "calcMode",
44
- "keySplines",
45
- "keyTimes",
46
- "keyPoints"
47
- ], Je = ["href"], k = ["dur", "repeatCount"], Ye = {
48
- __name: "SparklinePulse",
49
- props: {
50
- uid: {
51
- type: String,
52
- required: !0
53
- },
54
- svgRef: {
55
- type: Object,
56
- default: null
57
- },
58
- pulsePathId: {
59
- type: String,
60
- required: !0
61
- },
62
- pulsePathLength: {
63
- type: Number,
64
- required: !0
65
- },
66
- pulseDur: {
67
- type: String,
68
- required: !0
69
- },
70
- pulseBegin: {
71
- type: String,
72
- required: !0
73
- },
74
- pulseRepeatCount: {
75
- type: String,
76
- required: !0
77
- },
78
- pulseFillMode: {
79
- type: String,
80
- default: void 0
81
- },
82
- pulseKeyPoints: {
83
- type: String,
84
- required: !0
85
- },
86
- pulseMotion: {
87
- type: Object,
88
- required: !0
89
- },
90
- pulse: {
91
- type: Object,
92
- required: !0
93
- },
94
- pulseTrail: {
95
- type: Object,
96
- required: !0
97
- },
98
- pulseTrailLength: {
99
- type: Number,
100
- required: !0
101
- },
102
- prefersReducedMotion: {
103
- type: Boolean,
104
- required: !0
105
- },
106
- loading: {
107
- type: Boolean,
108
- required: !0
109
- },
110
- isBar: {
111
- type: Boolean,
112
- required: !0
113
- }
114
- },
115
- setup(e) {
116
- let t = e, n = g(() => Math.min(t.pulseTrailLength, 45)), r = g(() => !!t.pulse?.show && !t.isBar && !t.prefersReducedMotion && !t.loading && Number(t.pulsePathLength) > 0);
117
- function i() {
118
- let e = t.svgRef?.value;
119
- e && (typeof e.pauseAnimations == "function" && e.pauseAnimations(), typeof e.setCurrentTime == "function" && e.setCurrentTime(0), typeof e.unpauseAnimations == "function" && e.unpauseAnimations());
120
- }
121
- function a(e, t) {
122
- if (typeof e != "string") return e;
123
- let n = e.trim().match(/^([\d.]+)\s*(ms|s)$/);
124
- if (!n) return e;
125
- let r = Number(n[1]), i = n[2];
126
- return Number.isNaN(r) ? e : `${r + t}${i}`;
127
- }
128
- function o(e) {
129
- return (n.value - e) / n.value * t.pulse.radius;
130
- }
131
- function s(e) {
132
- let r = t.pulse.trail.opacity, i = (n.value - e) / n.value, a = e === 0 ? 1 : i * r;
133
- return `0;${a};${a};0`;
134
- }
135
- return D(() => t.loading, async (e) => {
136
- if (e) {
137
- i();
138
- return;
139
- }
140
- await b(), i();
141
- }), D(() => t.pulsePathId, async () => {
142
- await b(), i();
143
- }), Fe(() => {
144
- i();
145
- }), (t, i) => r.value ? (S(), v("g", He, [(S(!0), v(h, null, w(n.value, (t, n) => (S(), v(h, null, [n % 3 == 0 ? (S(), v("circle", {
146
- key: `sparkline_dot_${n}_${e.pulsePathId}`,
147
- r: o(n),
148
- fill: e.pulse.color,
149
- filter: `url(#sparkline_pulse_glow_${e.uid})`,
150
- opacity: "0"
151
- }, [y("animateMotion", {
152
- begin: a(e.pulseBegin, n * 10),
153
- dur: e.pulseDur,
154
- repeatCount: e.pulseRepeatCount,
155
- fill: e.pulseFillMode,
156
- calcMode: e.pulseMotion.calcMode,
157
- keySplines: e.pulseMotion.keySplines || void 0,
158
- keyTimes: e.pulseMotion.keyTimes || void 0,
159
- keyPoints: e.pulseKeyPoints,
160
- rotate: "auto"
161
- }, [y("mpath", { href: `#${e.pulsePathId}` }, null, 8, Ge)], 8, We), y("animate", {
162
- attributeName: "opacity",
163
- dur: e.pulseDur,
164
- repeatCount: e.pulseRepeatCount,
165
- fill: e.pulseFillMode,
166
- values: s(n),
167
- keyTimes: "0;0.1;0.9;1"
168
- }, null, 8, Ke)], 8, Ue)) : _("", !0)], 64))), 256)), (S(), v("circle", {
169
- key: `sparkline_halo_${e.pulsePathId}`,
170
- r: Math.max(e.pulse.radius * 1.3),
171
- fill: e.pulse.color,
172
- opacity: "0"
173
- }, [y("animateMotion", {
174
- begin: e.pulseBegin,
175
- dur: e.pulseDur,
176
- repeatCount: e.pulseRepeatCount,
177
- calcMode: e.pulseMotion.calcMode,
178
- keySplines: e.pulseMotion.keySplines || void 0,
179
- keyTimes: e.pulseMotion.keyTimes || void 0,
180
- keyPoints: e.pulseKeyPoints,
181
- rotate: "auto"
182
- }, [y("mpath", { href: `#${e.pulsePathId}` }, null, 8, Je)], 8, O), y("animate", {
183
- attributeName: "opacity",
184
- values: "0;0.35;0.35;0",
185
- keyTimes: "0;0.15;0.85;1",
186
- dur: e.pulseDur,
187
- repeatCount: e.pulseRepeatCount
188
- }, null, 8, k)], 8, qe))])) : _("", !0);
189
- }
190
- }, Xe = {
191
- canvas: null,
192
- ctx: null
193
- };
194
- function Ze() {
195
- if (typeof document > "u") throw Error("color-utils: document is not available (browser-only).");
196
- if (!Xe.canvas) {
197
- let e = document.createElement("canvas");
198
- e.width = 1, e.height = 1;
199
- let t = e.getContext("2d", { willReadFrequently: !0 });
200
- if (!t) throw Error("color-utils: unable to get 2D canvas context.");
201
- Xe.canvas = e, Xe.ctx = t;
202
- }
203
- return Xe.ctx;
204
- }
205
- function Qe(e) {
206
- return e < 0 ? 0 : e > 255 ? 255 : Math.round(e);
207
- }
208
- function A(e) {
209
- return e < 0 ? 0 : e > 1 ? 1 : e;
210
- }
211
- function j(e, t = null) {
212
- if (typeof e != "string" || e.trim().length === 0) throw Error("colorToRgba: inputColor must be a non-empty string.");
213
- let n = e.trim();
214
- if (n.toLowerCase() === "transparent") return {
215
- red: 0,
216
- green: 0,
217
- blue: 0,
218
- alpha: 0
219
- };
220
- let r = N(n, t), i = Ze();
221
- i.clearRect(0, 0, 1, 1), i.fillStyle = "#000";
222
- let a = i.fillStyle;
223
- if (i.fillStyle = r, i.fillStyle === a && !$e(r)) throw Error(`colorToRgba: unsupported or invalid color "${e}".`);
224
- i.fillRect(0, 0, 1, 1);
225
- let o = i.getImageData(0, 0, 1, 1).data;
226
- return {
227
- red: o[0],
228
- green: o[1],
229
- blue: o[2],
230
- alpha: o[3] / 255
231
- };
232
- }
233
- function M(e, t = null) {
234
- if (!Array.isArray(e) || e.length === 0) throw Error("colorsToRgba: colors must be a non-empty array.");
235
- let n = Array(e.length);
236
- for (let r = 0; r < e.length; r += 1) n[r] = j(e[r], t);
237
- return n;
238
- }
239
- function N(e, t = null) {
240
- return e !== "currentColor" || typeof window > "u" || !t ? e : window.getComputedStyle(t).color || e;
241
- }
242
- function $e(e) {
243
- let t = e.trim().toLowerCase();
244
- return t === "black" || t === "#000" || t === "#000000" || t === "rgb(0, 0, 0)" || t === "rgba(0, 0, 0, 1)" || t === "rgba(0, 0, 0, 0)";
245
- }
246
- function P(e) {
247
- let t = A(e / 255);
248
- return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
249
- }
250
- function F(e) {
251
- let t = A(e), n;
252
- return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, Qe(n * 255);
253
- }
254
- function I(e, t, n, r) {
255
- let i = A(n);
256
- if (r === "linearRGB") {
257
- let n = P(e.red), r = P(e.green), a = P(e.blue), o = P(t.red), s = P(t.green), c = P(t.blue), l = n + (o - n) * i, u = r + (s - r) * i, d = a + (c - a) * i;
258
- return {
259
- red: F(l),
260
- green: F(u),
261
- blue: F(d),
262
- alpha: e.alpha + (t.alpha - e.alpha) * i
263
- };
264
- }
265
- return {
266
- red: e.red + (t.red - e.red) * i,
267
- green: e.green + (t.green - e.green) * i,
268
- blue: e.blue + (t.blue - e.blue) * i,
269
- alpha: e.alpha + (t.alpha - e.alpha) * i
270
- };
271
- }
272
- //#endregion
273
- //#region src/SPG/number-utils.js
274
- function L(e, t, n) {
275
- let r = e;
276
- return r < t && (r = t), r > n && (r = n), r;
277
- }
278
- function R(e, t) {
279
- let n = 10 ** t;
280
- return Math.round(e * n) / n;
281
- }
282
- function z(e) {
283
- return Number.isFinite(e) ? e.toString() : "0";
284
- }
285
- function B(e) {
286
- let t = L(e, 0, 255).toString(16);
287
- return t.length === 1 ? "0" + t : t;
288
- }
289
- function et(e) {
290
- if (typeof e != "string") return;
291
- let t = Number.parseFloat(e);
292
- return Number.isFinite(t) ? t : void 0;
293
- }
294
- function tt(e, t, n, r = !0) {
295
- let i = n - t;
296
- if (i === 0) return 0;
297
- let a = (e - t) / i;
298
- return r ? L(a, 0, 1) : a;
299
- }
300
- //#endregion
301
- //#region src/SPG/index.js
302
- var V = "http://www.w3.org/2000/svg";
303
- function nt(e) {
304
- if (typeof document > "u") throw Error("SvgPathGradientAsync: document is not available (browser-only implementation).");
305
- let t = document.createElementNS(V, "svg");
306
- t.setAttribute("width", "0"), t.setAttribute("height", "0"), t.setAttribute("viewBox", "0 0 0 0"), t.style.position = "absolute", t.style.left = "-10000px", t.style.top = "-10000px", t.style.visibility = "hidden", t.style.pointerEvents = "none";
307
- let n = document.createElementNS(V, "path");
308
- return e === "M " && (e = "M 0,0"), n.setAttribute("d", e), t.appendChild(n), document.body.appendChild(t), {
309
- svgElement: t,
310
- pathElement: n
311
- };
312
- }
313
- function H(e) {
314
- if (e) try {
315
- e.svgElement?.remove?.();
316
- } catch {}
317
- }
318
- function rt(e, t, n) {
319
- if (typeof n == "number" && n > 0) return n;
320
- let r = t * .75;
321
- r < .5 && (r = .5), r > 8 && (r = 8);
322
- let i = e / 2;
323
- return r > i && i > 0 && (r = i), r <= 0 && (r = 1), r;
324
- }
325
- function it(e, t, n) {
326
- if (typeof t == "number" && t >= 1) return Math.floor(t);
327
- let r = Math.ceil(e / (typeof n == "number" && n > 0 ? n : 2));
328
- return r < 1 ? 1 : r;
329
- }
330
- function at(e, t, n, r, i, a) {
331
- let o = n - t, s = Math.ceil(o / r) + 1;
332
- s < 2 && (s = 2), s > a && (s = a);
333
- let c = s > 1 ? o / (s - 1) : 0, l = e.getPointAtLength(t), u = `M ${z(R(l.x, i))} ${z(R(l.y, i))}`;
334
- for (let n = 1; n < s; n += 1) {
335
- let r = t + n * c, a = e.getPointAtLength(r);
336
- u += ` L ${z(R(a.x, i))} ${z(R(a.y, i))}`;
337
- }
338
- return u;
339
- }
340
- function ot(e, t, n, r, i, a) {
341
- let o = n - t, s = Math.ceil(o / r) + 1;
342
- s < 2 && (s = 2), s > a && (s = a);
343
- let c = s > 1 ? o / (s - 1) : 0, l = e.getPointAtLength(t), u = l.x, d = l.x, f = l.y, p = l.y, ee = `M ${z(R(l.x, i))} ${z(R(l.y, i))}`;
344
- for (let n = 1; n < s; n += 1) {
345
- let r = t + n * c, a = e.getPointAtLength(r);
346
- a.x < u && (u = a.x), a.x > d && (d = a.x), a.y < f && (f = a.y), a.y > p && (p = a.y), ee += ` L ${z(R(a.x, i))} ${z(R(a.y, i))}`;
347
- }
348
- return {
349
- pathData: ee,
350
- bounds: {
351
- minX: u,
352
- maxX: d,
353
- minY: f,
354
- maxY: p
355
- }
356
- };
357
- }
358
- function st(e) {
359
- if (e.length === 1) return [{
360
- position: 0,
361
- rgba: e[0]
362
- }];
363
- let t = Array(e.length), n = e.length - 1;
364
- for (let r = 0; r < e.length; r += 1) t[r] = {
365
- position: r / n,
366
- rgba: e[r]
367
- };
368
- return t;
369
- }
370
- function ct(e, t, n, r) {
371
- let i = L(t, 0, 1), a = r;
372
- for (a < 0 && (a = 0), a > e.length - 2 && (a = e.length - 2); a > 0 && i < e[a].position;) --a;
373
- for (; a < e.length - 2 && i > e[a + 1].position;) a += 1;
374
- let o = e[a], s = e[a + 1], c = s.position - o.position, l = c > 0 ? (i - o.position) / c : 0;
375
- return dt(lt(o.rgba, s.rgba, l, n));
376
- }
377
- function lt(e, t, n, r) {
378
- let i = L(n, 0, 1);
379
- if (r === "linearRGB") {
380
- let n = U(e.red), r = U(e.green), a = U(e.blue), o = U(t.red), s = U(t.green), c = U(t.blue), l = n + (o - n) * i, u = r + (s - r) * i, d = a + (c - a) * i;
381
- return {
382
- red: ut(l),
383
- green: ut(u),
384
- blue: ut(d),
385
- alpha: e.alpha + (t.alpha - e.alpha) * i
386
- };
387
- }
388
- return {
389
- red: e.red + (t.red - e.red) * i,
390
- green: e.green + (t.green - e.green) * i,
391
- blue: e.blue + (t.blue - e.blue) * i,
392
- alpha: e.alpha + (t.alpha - e.alpha) * i
393
- };
394
- }
395
- function U(e) {
396
- let t = L(e / 255, 0, 1);
397
- return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
398
- }
399
- function ut(e) {
400
- let t = L(e, 0, 1), n;
401
- return n = t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055, L(Math.round(n * 255), 0, 255);
402
- }
403
- function dt(e) {
404
- let t = L(e.alpha, 0, 1), n = L(Math.round(e.red), 0, 255), r = L(Math.round(e.green), 0, 255), i = L(Math.round(e.blue), 0, 255);
405
- return t >= 1 ? `#${B(n)}${B(r)}${B(i)}` : `rgba(${n}, ${r}, ${i}, ${R(t, 4).toString()})`;
406
- }
407
- function ft(e) {
408
- let t = `fill="${K(e.fill ?? "none")}"`, n = Object.keys(e);
409
- for (let r = 0; r < n.length; r += 1) {
410
- let i = n[r];
411
- if (i === "stroke" || i === "d") continue;
412
- let a = e[i];
413
- t += ` ${i}="${K(a)}"`;
414
- }
415
- return t;
416
- }
417
- function W(e, t, n) {
418
- return `<path d="${K(e)}" stroke="${K(t)}" ${n} />`;
419
- }
420
- function G(e) {
421
- let t = [], n = e.segmentAttributeMap.fill ?? "none";
422
- t.push(`fill="${K(n)}"`), t.push(`stroke="${K(e.stroke)}"`);
423
- for (let n of Object.keys(e.segmentAttributeMap)) {
424
- if (n === "stroke" || n === "d") continue;
425
- let r = e.segmentAttributeMap[n];
426
- t.push(`${n}="${K(r)}"`);
427
- }
428
- return `<path d="${K(e.pathData)}" ${t.join(" ")} />`;
429
- }
430
- function pt(e, t) {
431
- let n = [];
432
- for (let e of Object.keys(t)) n.push(`${e}="${K(t[e])}"`);
433
- return `<g data-svg-path-gradient="true"${n.length ? " " + n.join(" ") : ""}>${e.join("")}</g>`;
434
- }
435
- function K(e) {
436
- return String(e).replaceAll("&", "&amp;").replaceAll("\"", "&quot;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
437
- }
438
- function mt(e, t = null, n = {}) {
439
- return new Promise((r, i) => {
440
- let a = null;
441
- try {
442
- if (!e || typeof e != "string") throw Error("SvgPathGradientAsync: pathData must be a non-empty string.");
443
- let i = n.temperatureMode ?? null;
444
- if (i === null && (!Array.isArray(t) || t.length === 0)) throw Error("SvgPathGradientAsync: colors must be a non-empty array when temperatureMode is not enabled.");
445
- if ((n.returnMode ?? "string") !== "string") throw Error("SvgPathGradientAsync: only returnMode=\"string\" is supported for the async version.");
446
- let o = typeof n.decimalPlaces == "number" ? n.decimalPlaces : 3, s = typeof n.flattenTolerance == "number" && n.flattenTolerance > 0 ? n.flattenTolerance : .25, c = n.attrs ? { ...n.attrs } : {}, l = n.groupAttrs ? { ...n.groupAttrs } : {}, u = et(c["stroke-width"]), d = typeof n.strokeWidth == "number" && n.strokeWidth > 0 ? n.strokeWidth : typeof u == "number" && u > 0 ? u : 1;
447
- a = nt(e);
448
- let f = a.pathElement, p = f.getTotalLength(), ee = i === null ? M(t, n.colorReferenceElement) : [];
449
- if (i === null && (!(p > 0) || ee.length === 1)) {
450
- let t = pt([G({
451
- pathData: e,
452
- stroke: dt(ee[0]),
453
- segmentAttributeMap: c
454
- })], l);
455
- H(a), r(t);
456
- return;
457
- }
458
- let te = n.colorSpace ?? "linearRGB";
459
- if (i !== null) {
460
- let e = n.temperatureColors;
461
- if (!Array.isArray(e) || e.length !== 2) throw Error("SvgPathGradientAsync: temperatureColors must be a tuple of exactly 2 colors when temperatureMode is enabled.");
462
- }
463
- let ne = i === null ? null : M(n.temperatureColors, n.colorReferenceElement), re = i === null ? (() => {
464
- let e = st(ee), t = Array(e.length);
465
- for (let n = 0; n < e.length; n += 1) t[n] = {
466
- position: e[n].position,
467
- rgba: e[n].rgba
468
- };
469
- return t;
470
- })() : [], ie = rt(p, d, n.maxSegmentLength), ae = it(p, n.segments, ie), oe = p / ae, se = typeof n.overlap == "number" && n.overlap >= 0 ? n.overlap : d * .5, ce = oe * .45;
471
- se > ce && (se = ce);
472
- let le = typeof n.samplePointLimitPerSegment == "number" && n.samplePointLimitPerSegment > 10 ? n.samplePointLimitPerSegment : 250, ue = ft(c), de = [], fe = i === null ? null : [], pe = i === null ? null : [], me = 0, he = i === null ? re.length - 2 : 0, m = 0, ge = () => {
473
- let e = performance.now(), t = typeof n.frameBudgetMs == "number" ? n.frameBudgetMs : 8;
474
- for (; m < ae && performance.now() - e < t;) {
475
- let e = m * oe, t = (m + 1) * oe, n = e, r = t;
476
- if (m !== 0 && (n = e - se), m !== ae - 1 && (r = t + se), n = L(n, 0, p), r = L(r, 0, p), r > n) {
477
- if (i !== null) {
478
- let e = ot(f, n, r, s, o, le);
479
- fe.push(e.pathData), pe.push(e.bounds);
480
- } else {
481
- let e = (n + r) * .5 / p;
482
- for (; me < he && e > re[me + 1].position;) me += 1;
483
- let t = ct(re, e, te, me), i = at(f, n, r, s, o, le);
484
- de.push(W(i, t, ue));
485
- }
486
- }
487
- m += 1;
488
- }
489
- if (m < ae) {
490
- requestAnimationFrame(ge);
491
- return;
492
- }
493
- if (i !== null) {
494
- let e = Infinity, t = -Infinity;
495
- for (let n = 0; n < pe.length; n += 1) {
496
- let r = pe[n], a = i === "vertical" ? r.minY : r.minX, o = i === "vertical" ? r.maxY : r.maxX;
497
- a < e && (e = a), o > t && (t = o);
498
- }
499
- let n = ne[0], r = ne[1];
500
- de.length = 0;
501
- for (let a = 0; a < pe.length; a += 1) {
502
- let o = pe[a], s = tt(((i === "vertical" ? o.minY : o.minX) + (i === "vertical" ? o.maxY : o.maxX)) * .5, e, t, !0), c = dt(i === "vertical" ? I(n, r, s, te) : I(r, n, s, te)), l = fe[a];
503
- de.push(W(l, c, ue));
504
- }
505
- }
506
- let c = pt(de, l);
507
- H(a), r(c);
508
- };
509
- requestAnimationFrame(ge);
510
- } catch (e) {
511
- H(a), i(e);
512
- }
513
- });
514
- }
515
- //#endregion
516
- //#region src/atoms/SparklineGradientPath.vue
517
- var ht = ["innerHTML"], gt = {
518
- __name: "SparklineGradientPath",
519
- props: {
520
- svgPathData: {
521
- type: String,
522
- required: !0
523
- },
524
- enabled: {
525
- type: Boolean,
526
- required: !0
527
- },
528
- strokeWidth: {
529
- type: Number,
530
- required: !0
531
- },
532
- highColor: {
533
- type: String,
534
- required: !0
535
- },
536
- lowColor: {
537
- type: String,
538
- required: !0
539
- },
540
- segments: {
541
- type: Number,
542
- required: !0
543
- }
544
- },
545
- setup(e) {
546
- let t = e, n = C(""), r = 0;
547
- return D(() => [
548
- t.enabled,
549
- t.svgPathData,
550
- t.strokeWidth,
551
- t.highColor,
552
- t.lowColor,
553
- t.segments
554
- ], async ([e]) => {
555
- let i = ++r;
556
- if (!e) {
557
- n.value = "";
558
- return;
559
- }
560
- let a = await mt(t.svgPathData, null, {
561
- segments: t.segments,
562
- temperatureMode: "vertical",
563
- temperatureColors: [t.highColor, t.lowColor],
564
- attrs: {
565
- "stroke-width": t.strokeWidth,
566
- "stroke-linecap": "round",
567
- "stroke-linejoin": "round"
568
- },
569
- groupAttrs: { class: "vue-ui-sparkline-gradient" }
570
- });
571
- i === r && (n.value = a);
572
- }, { immediate: !0 }), (e, t) => (S(), v("g", { innerHTML: n.value }, null, 8, ht));
573
- }
574
- }, _t = /* @__PURE__ */ e({ default: () => Vt }), vt = ["id"], yt = ["id"], bt = { style: { position: "relative" } }, xt = [
575
- "xmlns",
576
- "viewBox",
577
- "aria-describedby"
578
- ], St = ["width", "height"], Ct = ["id"], wt = [
579
- "id",
580
- "y1",
581
- "y2"
582
- ], Tt = ["stop-color", "offset"], Et = { key: 1 }, Dt = [
583
- "data-cy",
584
- "d",
585
- "fill"
586
- ], Ot = [
587
- "id",
588
- "d",
589
- "stroke-width"
590
- ], kt = [
591
- "d",
592
- "stroke",
593
- "stroke-width",
594
- "stroke-dasharray"
595
- ], At = [
596
- "d",
597
- "stroke",
598
- "stroke-width"
599
- ], jt = [
600
- "id",
601
- "d",
602
- "stroke-width"
603
- ], Mt = [
604
- "d",
605
- "stroke",
606
- "stroke-width",
607
- "stroke-dasharray"
608
- ], Nt = [
609
- "d",
610
- "stroke",
611
- "stroke-width"
612
- ], Pt = [
613
- "x",
614
- "y",
615
- "width",
616
- "height",
617
- "fill",
618
- "rx"
619
- ], Ft = [
620
- "x1",
621
- "x2",
622
- "y1",
623
- "y2",
624
- "stroke",
625
- "stroke-width",
626
- "stroke-dasharray"
627
- ], It = [
628
- "x1",
629
- "x2",
630
- "y1",
631
- "y2",
632
- "stroke",
633
- "stroke-dasharray",
634
- "stroke-width"
635
- ], Lt = [
636
- "cx",
637
- "cy",
638
- "r",
639
- "fill",
640
- "stroke",
641
- "stroke-width"
642
- ], Rt = [
643
- "x",
644
- "y",
645
- "font-size",
646
- "font-weight",
647
- "fill"
648
- ], zt = [
649
- "x",
650
- "y",
651
- "height",
652
- "width",
653
- "onMouseenter",
654
- "onMouseleave",
655
- "onClick"
656
- ], Bt = {
657
- key: 0,
658
- style: {
659
- position: "absolute",
660
- top: "100%",
661
- left: "0",
662
- width: "100%"
663
- },
664
- "data-dom-to-png-ignore": "",
665
- "aria-hidden": "true"
666
- }, Vt = /*#__PURE__*/ xe({
667
- __name: "vue-ui-sparkline",
668
- props: {
669
- config: {
670
- type: Object,
671
- default() {
672
- return {};
673
- }
674
- },
675
- dataset: {
676
- type: Array,
677
- default() {
678
- return [];
679
- }
680
- },
681
- showInfo: {
682
- type: Boolean,
683
- default: !0
684
- },
685
- selectedIndex: {
686
- type: Number,
687
- default: void 0
688
- },
689
- heightRatio: {
690
- type: Number,
691
- default: 1
692
- },
693
- forcedPadding: {
694
- type: Number,
695
- default: 30
696
- }
697
- },
698
- emits: ["hoverIndex", "selectDatapoint"],
699
- setup(e, { emit: xe }) {
700
- let He = Me(() => import("./PackageVersion-KI_qWJHZ.js").then((e) => e.t)), Ue = Me(() => import("./SparkTooltip-B1gRxPfb.js")), { vue_ui_sparkline: We } = ge(), { isThemeValid: Ge, warnInvalidTheme: Ke } = be(), qe = De(), O = e, Je = g(() => Array.isArray(O.dataset) && O.dataset.length > 0), k = C(ne()), Xe = C(null), Ze = C(null), Qe = C(null), A = C(null), j = C(null), M = C(nt()), N = g(() => M.value.style.tooltip), $e = g(() => M.value.style.bar), P = g(() => M.value.style.line), F = g(() => M.value.style.area), I = g(() => M.value.style.dataLabel), L = g(() => M.value.style);
701
- me({
702
- config: () => M.value,
703
- dataset: () => O.dataset,
704
- component: "VueUiSparkline",
705
- rules: [
706
- he.emptyArray,
707
- {
708
- test: (e) => e.length > 500,
709
- message: [
710
- "👀 The dataset has > 500 datapoints. Consider if you really need this level of detail.",
711
- "",
712
- "▶️ Use larger time scales, or aggregated values"
713
- ]
714
- },
715
- {
716
- test: (e) => e.length > 1095,
717
- message: [
718
- "👀 The dataset has > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.",
719
- "",
720
- "▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted."
721
- ]
722
- }
723
- ]
724
- });
725
- function R(e) {
726
- return O.config?.skeletonDataset && Array.isArray(O.config.skeletonDataset) ? O.config.skeletonDataset.map((e) => ({
727
- period: "-",
728
- value: e
729
- })) : ie(e).map((e) => ({
730
- period: "-",
731
- value: e
732
- }));
733
- }
734
- let z = g(() => de({
735
- defaultConfig: {
736
- gradientPath: { show: !1 },
737
- temperatureColors: { show: !1 },
738
- style: {
739
- backgroundColor: "#99999930",
740
- scaleMin: 0,
741
- scaleMax: null,
742
- animation: { show: !1 },
743
- line: {
744
- color: "#AAAAAA",
745
- pulse: { show: !1 },
746
- dashIndices: []
747
- },
748
- bar: { color: "#AAAAAA" },
749
- area: { color: "#CACACA" },
750
- zeroLine: { color: "#6A6A6A" },
751
- dataLabel: { show: !1 },
752
- tooltip: { show: !1 }
753
- }
754
- },
755
- userConfig: M.value.skeletonConfig ?? {}
756
- })), { loading: B, FINAL_DATASET: et, manualLoading: tt } = _e({
757
- ...ze(O),
758
- FINAL_CONFIG: M,
759
- prepareConfig: nt,
760
- callback: () => {
761
- Promise.resolve().then(async () => {
762
- await b(), Gt();
763
- });
764
- },
765
- skeletonDataset: R(12),
766
- skeletonConfig: de({
767
- defaultConfig: M.value,
768
- userConfig: z.value
769
- })
770
- }), { svgRef: V } = Ee({ config: L.value.title });
771
- function nt() {
772
- let e = ye({
773
- userConfig: O.config,
774
- defaultConfig: We
775
- }), t = {}, n = e.theme;
776
- if (n) {
777
- if (!Ge.value(e)) Ke(e), t = e;
778
- else {
779
- let r = ye({
780
- userConfig: Oe[n] || O.config,
781
- defaultConfig: e
782
- });
783
- t = { ...ye({
784
- userConfig: O.config,
785
- defaultConfig: r
786
- }) };
787
- }
788
- } else t = e;
789
- return t;
790
- }
791
- let H = g(() => M.value?.style?.line.pulse || {}), rt = g(() => `${Math.max(200, Number(H.value.durationMs) || 4e3) / 1e3}s`), it = C(0), at = g(() => H.value?.begin || "0ms"), ot = C("0;1"), st = g(() => H.value?.loop === !1 ? "1" : "indefinite"), ct = g(() => H.value?.loop === !1 ? "freeze" : void 0), lt = g(() => H.value.trail.show && ft.value.lengthPx || 1), U = g(() => !!H.value?.show && !Q.value && !qe.value && !B.value && (Y.value?.length || 0) > 1);
792
- function ut() {
793
- if (!U.value) {
794
- it.value = 0;
795
- return;
796
- }
797
- let e = V.value;
798
- if (!e) return;
799
- let t = `#${qt.value}`, n = e.querySelector?.(t);
800
- if (n && typeof n.getTotalLength == "function") {
801
- let e = n.getTotalLength();
802
- Number.isFinite(e) && e > 0 && (it.value = e);
803
- return;
804
- }
805
- requestAnimationFrame(() => {
806
- let n = e.querySelector?.(t);
807
- if (n && typeof n.getTotalLength == "function") {
808
- let e = n.getTotalLength();
809
- Number.isFinite(e) && e > 0 && (it.value = e);
810
- }
811
- });
812
- }
813
- let dt = g(() => {
814
- let e = H.value?.easing || "ease-in-out", t = {
815
- ease: [
816
- .25,
817
- .1,
818
- .25,
819
- 1
820
- ],
821
- "ease-in": [
822
- .42,
823
- 0,
824
- 1,
825
- 1
826
- ],
827
- "ease-out": [
828
- 0,
829
- 0,
830
- .58,
831
- 1
832
- ],
833
- "ease-in-out": [
834
- .42,
835
- 0,
836
- .58,
837
- 1
838
- ]
839
- };
840
- return e === "linear" ? {
841
- calcMode: "linear",
842
- keySplines: null,
843
- keyTimes: "0;1"
844
- } : e === "steps" ? {
845
- calcMode: "discrete",
846
- keySplines: null,
847
- keyTimes: "0;1"
848
- } : {
849
- calcMode: "spline",
850
- keySplines: (e === "cubic-bezier" ? Array.isArray(H.value?.cubicBezier) && H.value.cubicBezier.length === 4 ? H.value.cubicBezier : [
851
- .4,
852
- 0,
853
- .2,
854
- 1
855
- ] : t[e] || t["ease-in-out"]).join(" "),
856
- keyTimes: "0;1"
857
- };
858
- }), ft = g(() => {
859
- let e = H.value?.trail || {}, t = P.value.strokeWidth || 1;
860
- return {
861
- show: e.show !== !1,
862
- lengthPx: e.length,
863
- width: Math.max(1, Number(e.strokeWidth) || t * 2.2),
864
- opacity: Math.min(1, Math.max(0, Number(e.opacity) ?? .6)),
865
- fadeIn: .5,
866
- fadeOut: .2
867
- };
868
- }), W = g(() => c({
869
- data: et.value,
870
- threshold: M.value.downsample.threshold
871
- }));
872
- g(() => {
873
- if (!M.value.temperatureColors.show) return !1;
874
- let e = et.value.map(({ value: e }) => e).filter((e) => Number.isFinite(e));
875
- return new Set(e).size <= 1;
876
- }), D(() => O.config, (e) => {
877
- B.value || (M.value = nt()), Zt(), q.value.chartWidth = L.value.chartWidth;
878
- }, { deep: !0 }), D(() => O.dataset, (e) => {
879
- Array.isArray(e) && e.length > 0 && (tt.value = !1), G.value = c({
880
- data: et.value.map((e) => ({
881
- ...e,
882
- value: [void 0].includes(e.value) ? null : e.value
883
- })),
884
- threshold: M.value.downsample.threshold
885
- });
886
- }, { deep: !0 });
887
- let G = C(pt());
888
- function pt() {
889
- return c({
890
- data: et.value.map((e) => L.value.animation.show && et.value.length > 1 ? {
891
- ...e,
892
- value: null
893
- } : {
894
- ...e,
895
- value: [void 0].includes(e.value) ? null : e.value
896
- }),
897
- threshold: M.value.downsample.threshold
898
- });
899
- }
900
- let K = Le(null), mt = Le(null), ht = C(!1), _t = C(0), Vt = C([]), Ht = C(""), Ut = g(() => {
901
- let e = (W.value || []).map((e) => `${e.period}::${Number.isFinite(e.value) ? e.value : 0}`).join("|"), t = M.value?.style?.animation || {}, n = !!M.value?.gradientPath?.show && !M.value.temperatureColors.show;
902
- return `${e}#${!!t.show}#${t.animationFrames || 0}#${n}`;
903
- });
904
- function Wt() {
905
- _t.value &&= (cancelAnimationFrame(_t.value), 0), Vt.value.forEach((e) => clearTimeout(e)), Vt.value = [], ht.value = !1;
906
- }
907
- function Gt() {
908
- let e = M.value?.style?.animation || {}, t = W.value || [], n = Ut.value, r = !!M.value.gradientPath.show && !M.value.temperatureColors.show;
909
- if (n && n === Ht.value && (ht.value || G.value.length === t.length)) return;
910
- if (Wt(), r || !e.show || B.value || t.length <= 1 || qe.value) {
911
- G.value = t, Ht.value = n;
912
- return;
913
- }
914
- ht.value = !0, Ht.value = n, G.value = [];
915
- let i = Math.max(1, Number(e.animationFrames) || 1), a = Math.max(1, Math.floor(i / t.length)), o = 0, s = () => {
916
- if (n !== Ut.value) {
917
- Wt();
918
- return;
919
- }
920
- if (o < t.length) {
921
- G.value.push(t[o]);
922
- let e = setTimeout(() => {
923
- _t.value = requestAnimationFrame(s);
924
- }, a);
925
- Vt.value.push(e), o += 1;
926
- } else G.value = t, Wt();
927
- };
928
- _t.value = requestAnimationFrame(s);
929
- }
930
- D(Ut, () => {
931
- Gt();
932
- }), Ie(() => {
933
- Zt(), Gt();
934
- }), Fe(() => {
935
- Wt();
936
- });
937
- let Kt = C(0);
938
- D(() => B.value, async (e) => {
939
- e || (await b(), Kt.value += 1);
940
- }), D(() => ht.value, async (e) => {
941
- e || B.value || (await b(), Kt.value += 1);
942
- });
943
- let qt = g(() => `sparkline_line_path_${k.value}`), Jt = C(!0);
944
- async function Yt() {
945
- Jt.value = !1, await b(), Jt.value = !0, await b(), ut();
946
- }
947
- let Xt = g(() => M.value.debug);
948
- function Zt() {
949
- if (d(O.dataset) ? (re({
950
- componentName: "VueUiSparkline",
951
- type: "dataset",
952
- debug: Xt.value
953
- }), tt.value = !0) : Xt.value && O.dataset.forEach((e, t) => {
954
- pe({
955
- datasetObject: e,
956
- requiredAttributes: ["period", "value"]
957
- }).forEach((e) => {
958
- re({
959
- componentName: "VueUiSparkline",
960
- type: "datasetSerieAttribute",
961
- property: e,
962
- index: t
963
- });
964
- });
965
- }), d(O.dataset) || (tt.value = M.value.loading), M.value.responsive) {
966
- let e = Se(() => {
967
- let { width: e, height: t } = Ce({
968
- chart: Xe.value,
969
- title: L.value.title.show && O.showInfo ? Ze.value : null,
970
- source: Qe.value
971
- });
972
- requestAnimationFrame(() => {
973
- q.value.width = e, q.value.height = t, q.value.chartWidth = L.value.chartWidth / 500 * e, q.value.padding = O.forcedPadding / 500 * e;
974
- });
975
- });
976
- K.value && (mt.value && K.value.unobserve(mt.value), K.value.disconnect()), K.value = new ResizeObserver(e), mt.value = Xe.value.parentNode, K.value.observe(mt.value);
977
- }
978
- }
979
- Fe(() => {
980
- K.value && (mt.value && K.value.unobserve(mt.value), K.value.disconnect());
981
- });
982
- let q = C({
983
- height: 80 * O.heightRatio,
984
- width: 500,
985
- chartWidth: L.value.chartWidth,
986
- padding: O.forcedPadding
987
- }), Qt = xe, J = g(() => {
988
- let { top: e, right: t, bottom: n, left: r } = L.value.padding;
989
- return {
990
- top: e,
991
- left: r,
992
- right: q.value.width - t,
993
- bottom: q.value.height - n,
994
- start: O.showInfo && I.value.show && I.value.position === "left" ? q.value.width - q.value.chartWidth + r : q.value.padding + r,
995
- width: O.showInfo && I.value.show ? q.value.chartWidth - r - t : q.value.width - q.value.padding - r - t,
996
- height: q.value.height - e - n
997
- };
998
- }), $t = g(() => [null, void 0].includes(L.value.scaleMin) ? Math.min(...G.value.map((e) => isNaN(e.value) || [
999
- void 0,
1000
- null,
1001
- "NaN",
1002
- NaN,
1003
- Infinity,
1004
- -Infinity
1005
- ].includes(e.value) ? 0 : e.value || 0)) : L.value.scaleMin), en = g(() => [null, void 0].includes(L.value.scaleMax) ? Math.max(...G.value.map((e) => isNaN(e.value) || [
1006
- void 0,
1007
- null,
1008
- "NaN",
1009
- NaN,
1010
- Infinity,
1011
- -Infinity
1012
- ].includes(e.value) ? 0 : e.value || 0)) : L.value.scaleMax), tn = g(() => {
1013
- let e = $t.value >= 0 ? 0 : $t.value;
1014
- return Math.abs(e);
1015
- }), nn = g(() => en.value + tn.value), rn = g(() => J.value.bottom - J.value.height * an(tn.value));
1016
- function an(e) {
1017
- return isNaN(e / nn.value) ? 0 : e / nn.value;
1018
- }
1019
- let on = g(() => W.value.length - 1 || 1), sn = C([]), cn = 0;
1020
- Be(() => {
1021
- let e = ++cn;
1022
- (async () => {
1023
- let t = await m({
1024
- values: W.value.map((e) => e.period),
1025
- maxDatapoints: W.value.length,
1026
- formatter: I.value.datetimeFormatter,
1027
- start: 0,
1028
- end: W.value.length
1029
- });
1030
- e === cn && (sn.value = t);
1031
- })();
1032
- });
1033
- let Y = g(() => G.value.map((e, t) => {
1034
- let n = isNaN(e.value) || [
1035
- void 0,
1036
- "NaN",
1037
- NaN,
1038
- Infinity,
1039
- -Infinity
1040
- ].includes(e.value) ? 0 : e.value, r = J.value.width / on.value;
1041
- return {
1042
- value: e.value,
1043
- absoluteValue: n,
1044
- period: sn.value && sn.value[t] && sn.value[t].text ? sn.value[t].text : e.period,
1045
- plotValue: n + tn.value,
1046
- toMax: an(n + tn.value),
1047
- x: J.value.start + t * r,
1048
- y: J.value.bottom - J.value.height * an(n + tn.value),
1049
- id: `plot_${k.value}_${t}`,
1050
- color: Q.value ? $e.value.color : F.value.useGradient ? a(P.value.color, .05 * (1 - t / on.value)) : P.value.color,
1051
- width: r
1052
- };
1053
- })), ln = g(() => O.selectedIndex !== void 0 && O.selectedIndex !== null && O.selectedIndex >= 0 && O.selectedIndex < Y.value.length ? O.selectedIndex : j.value !== void 0 && j.value !== null && j.value >= 0 && j.value < Y.value.length ? j.value : null), X = C(void 0), un = C(void 0);
1054
- function dn(e, t) {
1055
- M.value.events.datapointEnter && M.value.events.datapointEnter({
1056
- datapoint: e,
1057
- seriesIndex: t
1058
- }), j.value = t, A.value = t, X.value = e, un.value ||= e, Qt("hoverIndex", { index: t });
1059
- }
1060
- function fn(e, t) {
1061
- M.value.events.datapointLeave && M.value.events.datapointLeave({
1062
- datapoint: e,
1063
- seriesIndex: t
1064
- }), un.value = X.value, X.value = void 0, j.value = null, A.value = null, Qt("hoverIndex", { index: void 0 });
1065
- }
1066
- let Z = g(() => {
1067
- if (Je.value) {
1068
- let e = Y.value.map((e) => e.absoluteValue), t = e.reduce((e, t) => e + t, 0);
1069
- return {
1070
- latest: Y.value[Y.value.length - 1] ? Y.value[Y.value.length - 1].absoluteValue : 0,
1071
- sum: t,
1072
- average: t / Y.value.length,
1073
- median: ce(e),
1074
- trend: ae(Y.value.map(({ x: e, y: t, absoluteValue: n }) => ({
1075
- x: e,
1076
- y: t,
1077
- value: n
1078
- }))).trend
1079
- };
1080
- }
1081
- return {
1082
- latest: null,
1083
- sum: null,
1084
- average: null,
1085
- median: null,
1086
- trend: null
1087
- };
1088
- }), pn = g(() => Je.value ? I.value.valueType === "latest" ? Z.value.latest : I.value.valueType === "sum" ? Z.value.sum : I.value.valueType === "average" ? Z.value.average : 0 : 0), Q = g(() => M.value.type && M.value.type === "bar");
1089
- function mn(e, t) {
1090
- M.value.events.datapointClick && M.value.events.datapointClick({
1091
- datapoint: e,
1092
- seriesIndex: t
1093
- }), Qt("selectDatapoint", {
1094
- datapoint: e,
1095
- index: t
1096
- });
1097
- }
1098
- let hn = g(() => Array.isArray(P.value.dashIndices) && P.value.dashIndices.length > 0), gn = g(() => P.value.cutNullValues);
1099
- function _n(e) {
1100
- return ![
1101
- null,
1102
- void 0,
1103
- "NaN",
1104
- NaN,
1105
- Infinity,
1106
- -Infinity
1107
- ].includes(e);
1108
- }
1109
- function vn(e, t) {
1110
- let n = e[t - 1], r = e[t + 1], i = !!n && !!r && n.value == null && r.value == null || !n && !!r && r.value == null || !!n && !r && n.value == null;
1111
- return _n(e[t]?.value) && i && gn.value;
1112
- }
1113
- function yn(e, t) {
1114
- return X.value && e.id === X.value.id || ln.value === t || et.value.length === 1;
1115
- }
1116
- function bn(e, t) {
1117
- return Q.value || !_n(e?.value) ? !1 : L.value.plot.show && yn(e, t) || vn(Y.value, t);
1118
- }
1119
- function xn(e, t) {
1120
- return Math.max(1, yn(e, t) ? L.value.plot.radius : L.value.plot.radius * .7);
1121
- }
1122
- function Sn(e, t) {
1123
- return yn(e, t) ? L.value.plot.stroke : L.value.backgroundColor;
1124
- }
1125
- let Cn = g(() => gn.value ? Y.value : Y.value.filter((e) => e.value !== null)), wn = g(() => Y.value.filter((e) => e.value !== null)), Tn = g(() => wn.value.length > 1), En = g(() => Q.value || !Tn.value ? "" : gn.value ? i(Y.value) : u(Cn.value)), Dn = g(() => Q.value || !Tn.value ? "" : gn.value ? te(Y.value) : ee(Cn.value)), On = g(() => Q.value || !hn.value || !Tn.value ? [] : s(Cn.value, P.value.dashIndices)), kn = g(() => Q.value || !hn.value || !Tn.value ? [] : r(Cn.value, P.value.dashIndices)), An = g(() => Q.value || !F.value.show || !Tn.value ? [] : P.value.smooth ? l(Cn.value, J.value.bottom, gn.value).filter(Boolean) : (gn.value ? n(Y.value, J.value.bottom) : se(Cn.value, J.value.bottom)).split(";").filter(Boolean).map((e) => `M${e}Z`)), jn = g(() => Q.value || !M.value.gradientPath.show || M.value.temperatureColors.show ? "" : `M ${(P.value.smooth ? En.value : Dn.value) || "0,0"}`), Mn = g(() => {
1126
- if (!M.value.temperatureColors.show) return null;
1127
- let e = M.value.temperatureColors.colors;
1128
- return !Array.isArray(e) || !e.length ? null : e.map((e) => f(e));
1129
- }), $ = g(() => {
1130
- if (!M.value.temperatureColors.show) return null;
1131
- let e = M.value.temperatureColors.colors;
1132
- return !Array.isArray(e) || !e.length ? null : e.map((e) => f(e));
1133
- });
1134
- function Nn(e) {
1135
- if (!Number.isFinite(e?.y)) return 0;
1136
- let t = J.value.height || 1, n = (e.y - J.value.top) / t;
1137
- return Math.min(1, Math.max(0, n));
1138
- }
1139
- function Pn(e) {
1140
- let t = Mn.value;
1141
- return !Array.isArray(t) || !t.length ? e.color : p({
1142
- colors: t,
1143
- ratio: Nn(e)
1144
- });
1145
- }
1146
- D(() => [
1147
- U.value,
1148
- qt.value,
1149
- Y.value.length,
1150
- q.value.width,
1151
- q.value.height,
1152
- M.value?.style?.line?.smooth
1153
- ], async () => {
1154
- await b(), ut();
1155
- }, { immediate: !0 }), Ie(async () => {
1156
- await b(), ut();
1157
- }), D(() => B.value, async (e) => {
1158
- e || await Yt();
1159
- }), D(() => ht.value, async (e) => {
1160
- e || B.value || await Yt();
1161
- }), D(() => O.selectedIndex, (e) => {
1162
- if (e == null) {
1163
- j.value = null, A.value = null, X.value = void 0;
1164
- return;
1165
- }
1166
- if (e < 0 || e >= Y.value.length) return;
1167
- let t = Y.value[e];
1168
- t && (j.value = e, A.value = e, X.value = t);
1169
- });
1170
- let Fn = C(!1);
1171
- function In() {
1172
- let e = ln.value;
1173
- if (e !== null && e >= 0 && e < Y.value.length) {
1174
- let t = Y.value[e];
1175
- if (t) {
1176
- A.value = e, X.value = t, j.value = e, Fn.value = !0;
1177
- return;
1178
- }
1179
- }
1180
- A.value = null, !X.value && Y.value.length && dn(Y.value.at(-1), Y.value.length - 1), Fn.value = !0;
1181
- }
1182
- function Ln() {
1183
- un.value = X.value, (O.selectedIndex === void 0 || O.selectedIndex === null) && (A.value = null, X.value = void 0, j.value = null, Qt("hoverIndex", { index: void 0 })), Fn.value = !1;
1184
- }
1185
- function Rn(e) {
1186
- if (!V.value || document.activeElement !== V.value) return;
1187
- un.value = X.value;
1188
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
1189
- if (!t && !n) return;
1190
- let r = Y.value.length;
1191
- if (!r) return;
1192
- e.preventDefault(), e.stopPropagation();
1193
- let i = A.value, a = i !== null && i >= 0 && i < r, o = X.value ? Y.value.findIndex((e) => e.id === X.value.id) : -1;
1194
- a ? n ? (i += 1, i >= r && (i = 0)) : t && (--i, i < 0 && (i = r - 1)) : o !== null && o >= 0 && o < r ? (i = n ? o + 1 : o - 1, i >= r && (i = 0), i < 0 && (i = r - 1)) : i = n ? 0 : r - 1;
1195
- let s = Y.value[i];
1196
- s && (A.value = i, dn(s, i));
1197
- }
1198
- let zn = g(() => ({
1199
- headers: [M.value.translations.period, M.value.translations.value],
1200
- rows: Y.value.map((e) => [e.period, e.absoluteValue])
1201
- }));
1202
- return (n, r) => (S(), v("div", {
1203
- ref_key: "sparklineChart",
1204
- ref: Xe,
1205
- class: "vue-data-ui-component vue-ui-sparkline",
1206
- id: k.value,
1207
- style: x(`width:100%;font-family:${L.value.fontFamily};`)
1208
- }, [
1209
- y("p", {
1210
- id: `chart-instructions-${k.value}`,
1211
- class: "sr-only"
1212
- }, Re(M.value.a11y.translations.keyboardNavigation), 9, yt),
1213
- zn.value?.rows?.length ? (S(), ke(Te, {
1214
- key: 0,
1215
- uid: k.value,
1216
- head: zn.value.headers,
1217
- body: zn.value.rows,
1218
- notice: M.value.a11y.translations.tableAvailable,
1219
- caption: M.value.a11y.translations.tableCaption
1220
- }, null, 8, [
1221
- "uid",
1222
- "head",
1223
- "body",
1224
- "notice",
1225
- "caption"
1226
- ])) : _("", !0),
1227
- T(n.$slots, "before", Pe(Ne({
1228
- selected: X.value,
1229
- latest: Z.value.latest,
1230
- sum: Z.value.sum,
1231
- average: Z.value.average,
1232
- median: Z.value.median,
1233
- trend: Z.value.trend
1234
- })), void 0, !0),
1235
- L.value.title.show && e.showInfo ? (S(), v("div", {
1236
- key: 1,
1237
- ref_key: "chartTitle",
1238
- ref: Ze,
1239
- class: "vue-ui-sparkline-title",
1240
- style: x(`display:flex;align-items:center;width:100%;color:${L.value.title.color};background:${L.value.backgroundColor};justify-content:${L.value.title.textAlign === "left" ? "flex-start" : L.value.title.textAlign === "right" ? "flex-end" : "center"};height:${L.value.title.fontSize * 2}px;font-size:${L.value.title.fontSize}px;font-weight:${L.value.title.bold ? "bold" : "normal"};`)
1241
- }, [y("span", { style: x(`padding:${L.value.title.textAlign === "left" ? "0 0 0 12px" : L.value.title.textAlign === "right" ? "0 12px 0 0" : "0"}`) }, Re(X.value ? X.value.period : L.value.title.text), 5)], 4)) : _("", !0),
1242
- y("div", bt, [(S(), v("svg", {
1243
- ref_key: "svgRef",
1244
- ref: V,
1245
- xmlns: E(ue),
1246
- viewBox: `0 0 ${q.value.width} ${q.value.height}`,
1247
- style: x(`background:${L.value.backgroundColor};overflow:visible;direction:ltr`),
1248
- tabindex: "0",
1249
- "aria-describedby": `chart-instructions-${k.value}`,
1250
- onMouseleave: r[0] ||= (e) => un.value = void 0,
1251
- onFocus: In,
1252
- onBlur: Ln,
1253
- onKeydown: Rn
1254
- }, [
1255
- je(E(He)),
1256
- n.$slots["chart-background"] ? (S(), v("foreignObject", {
1257
- key: 0,
1258
- x: 0,
1259
- y: 0,
1260
- width: q.value.width <= 0 ? 10 : q.value.width,
1261
- height: q.value.height <= 0 ? 10 : q.value.height,
1262
- style: { pointerEvents: "none" }
1263
- }, [T(n.$slots, "chart-background", {}, void 0, !0)], 8, St)) : _("", !0),
1264
- y("defs", null, [
1265
- je(we, {
1266
- t: "linear",
1267
- x1: "0%",
1268
- y1: "0%",
1269
- x2: "100%",
1270
- y2: "0%",
1271
- id: `sparkline_gradient_${k.value}`,
1272
- stops: [[
1273
- "0%",
1274
- E(le)(E(a)(F.value.color, .05), F.value.opacity),
1275
- 1
1276
- ], [
1277
- "100%",
1278
- E(le)(F.value.color, F.value.opacity),
1279
- 1
1280
- ]]
1281
- }, null, 8, ["id", "stops"]),
1282
- je(we, {
1283
- t: "linear",
1284
- x2: "0%",
1285
- y2: "100%",
1286
- id: `sparkline_bar_gradient_pos_${k.value}`,
1287
- stops: [[
1288
- "0%",
1289
- $e.value.color,
1290
- 1
1291
- ], [
1292
- "100%",
1293
- E(a)($e.value.color, .05),
1294
- 1
1295
- ]]
1296
- }, null, 8, ["id", "stops"]),
1297
- je(we, {
1298
- t: "linear",
1299
- x2: "0%",
1300
- y2: "100%",
1301
- id: `sparkline_bar_gradient_neg_${k.value}`,
1302
- stops: [[
1303
- "0%",
1304
- E(a)($e.value.color, .05),
1305
- 1
1306
- ], [
1307
- "100%",
1308
- $e.value.color,
1309
- 1
1310
- ]]
1311
- }, null, 8, ["id", "stops"]),
1312
- y("filter", {
1313
- id: `sparkline_pulse_glow_${k.value}`,
1314
- filterUnits: "userSpaceOnUse",
1315
- x: "-50",
1316
- y: "-50",
1317
- width: "100",
1318
- height: "100"
1319
- }, [...r[1] ||= [y("feGaussianBlur", {
1320
- in: "SourceGraphic",
1321
- stdDeviation: "3",
1322
- result: "blur"
1323
- }, null, -1), y("feMerge", null, [y("feMergeNode", { in: "blur" }), y("feMergeNode", { in: "SourceGraphic" })], -1)]], 8, Ct),
1324
- M.value.temperatureColors.show && $.value ? (S(), v("linearGradient", {
1325
- key: 0,
1326
- id: `temperature_grad_sparkline_${k.value}`,
1327
- gradientUnits: "userSpaceOnUse",
1328
- x1: "0",
1329
- x2: "0",
1330
- y1: J.value.top,
1331
- y2: J.value.bottom
1332
- }, [(S(!0), v(h, null, w($.value, (e, t) => (S(), v("stop", {
1333
- key: `temperature_grad_stop_${t}_${k.value}`,
1334
- "stop-color": e,
1335
- offset: $.value.length === 1 ? "0%" : E(o)(t, $.value.length)
1336
- }, null, 8, Tt))), 128))], 8, wt)) : _("", !0)
1337
- ]),
1338
- F.value.show && !Q.value && An.value.length ? (S(), v("g", Et, [(S(!0), v(h, null, w(An.value, (e, t) => (S(), v("path", {
1339
- key: `sparkline_area_${t}_${k.value}`,
1340
- class: "vue-ui-sparkline-area",
1341
- "data-cy": P.value.smooth ? "sparkline-smooth-area" : "sparkline-angle-area",
1342
- d: e,
1343
- fill: F.value.useGradient ? `url(#sparkline_gradient_${k.value})` : E(le)(F.value.color, F.value.opacity),
1344
- "stroke-linecap": "round",
1345
- "stroke-linejoin": "round",
1346
- style: x({ transition: E(B) ? void 0 : "all 0.2s" })
1347
- }, null, 12, Dt))), 128))])) : _("", !0),
1348
- P.value.smooth && !Q.value ? (S(), v(h, { key: 2 }, [y("path", {
1349
- id: qt.value,
1350
- d: `M ${En.value || "0,0"}`,
1351
- fill: "none",
1352
- stroke: "transparent",
1353
- "stroke-width": P.value.strokeWidth,
1354
- "stroke-linecap": "round",
1355
- "stroke-linejoin": "round"
1356
- }, null, 8, Ot), hn.value ? (S(!0), v(h, { key: 0 }, w(On.value, (e) => (S(), v("path", {
1357
- key: e.path,
1358
- class: "vue-ui-sparkline-path",
1359
- d: `M ${e.path}`,
1360
- stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : P.value.color,
1361
- fill: "none",
1362
- "stroke-width": P.value.strokeWidth,
1363
- "stroke-linecap": "round",
1364
- "stroke-linejoin": "round",
1365
- "stroke-dasharray": e.dashed ? P.value.dashArray : 0,
1366
- style: x({ transition: E(B) ? void 0 : "all 0.2s" })
1367
- }, null, 12, kt))), 128)) : (S(), v("path", {
1368
- key: 1,
1369
- class: "vue-ui-sparkline-path",
1370
- d: `M ${En.value || "0,0"}`,
1371
- stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : P.value.color,
1372
- fill: "none",
1373
- "stroke-width": P.value.strokeWidth,
1374
- "stroke-linecap": "round",
1375
- "stroke-linejoin": "round",
1376
- style: x({ transition: E(B) ? void 0 : "all 0.2s" })
1377
- }, null, 12, At))], 64)) : _("", !0),
1378
- !P.value.smooth && !Q.value ? (S(), v(h, { key: 3 }, [y("path", {
1379
- id: qt.value,
1380
- d: `M ${Dn.value || "0,0"}`,
1381
- fill: "none",
1382
- stroke: "transparent",
1383
- "stroke-width": P.value.strokeWidth,
1384
- "stroke-linecap": "round",
1385
- "stroke-linejoin": "round"
1386
- }, null, 8, jt), hn.value ? (S(!0), v(h, { key: 0 }, w(kn.value, (e) => (S(), v("path", {
1387
- key: e.path,
1388
- class: "vue-ui-sparkline-path",
1389
- d: `M ${e.path}`,
1390
- stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : P.value.color,
1391
- fill: "none",
1392
- "stroke-width": P.value.strokeWidth,
1393
- "stroke-linecap": "round",
1394
- "stroke-linejoin": "round",
1395
- "stroke-dasharray": e.dashed ? P.value.dashArray * 2 : 0,
1396
- style: x({ transition: E(B) ? void 0 : "all 0.2s" })
1397
- }, null, 12, Mt))), 128)) : (S(), v("path", {
1398
- key: 1,
1399
- class: "vue-ui-sparkline-path",
1400
- d: `M ${Dn.value || "0,0"}`,
1401
- stroke: $.value ? `url(#temperature_grad_sparkline_${k.value})` : P.value.color,
1402
- fill: "none",
1403
- "stroke-width": P.value.strokeWidth,
1404
- "stroke-linecap": "round",
1405
- "stroke-linejoin": "round",
1406
- style: x({ transition: E(B) ? void 0 : "all 0.2s" })
1407
- }, null, 12, Nt))], 64)) : _("", !0),
1408
- jn.value && !$.value ? (S(), ke(gt, {
1409
- key: 4,
1410
- svgPathData: jn.value,
1411
- enabled: M.value.gradientPath.show && !Q.value && !$.value,
1412
- strokeWidth: P.value.strokeWidth,
1413
- highColor: M.value.gradientPath.colors.high,
1414
- lowColor: M.value.gradientPath.colors.low,
1415
- segments: M.value.gradientPath.segments
1416
- }, null, 8, [
1417
- "svgPathData",
1418
- "enabled",
1419
- "strokeWidth",
1420
- "highColor",
1421
- "lowColor",
1422
- "segments"
1423
- ])) : _("", !0),
1424
- Jt.value && U.value ? (S(), ke(Ye, {
1425
- key: 5,
1426
- uid: k.value,
1427
- svgRef: E(V),
1428
- pulsePathId: qt.value,
1429
- pulsePathLength: it.value,
1430
- pulseDur: rt.value,
1431
- pulseBegin: at.value,
1432
- pulseRepeatCount: st.value,
1433
- pulseFillMode: ct.value,
1434
- pulseKeyPoints: ot.value,
1435
- pulseMotion: dt.value,
1436
- pulse: H.value,
1437
- pulseTrail: ft.value,
1438
- pulseTrailLength: lt.value,
1439
- prefersReducedMotion: E(qe),
1440
- loading: E(B),
1441
- isBar: Q.value
1442
- }, null, 8, [
1443
- "uid",
1444
- "svgRef",
1445
- "pulsePathId",
1446
- "pulsePathLength",
1447
- "pulseDur",
1448
- "pulseBegin",
1449
- "pulseRepeatCount",
1450
- "pulseFillMode",
1451
- "pulseKeyPoints",
1452
- "pulseMotion",
1453
- "pulse",
1454
- "pulseTrail",
1455
- "pulseTrailLength",
1456
- "prefersReducedMotion",
1457
- "loading",
1458
- "isBar"
1459
- ])) : _("", !0),
1460
- (S(!0), v(h, null, w(Y.value, (e, t) => (S(), v("g", null, [Q.value ? (S(), v("rect", {
1461
- key: 0,
1462
- x: e.x - e.width / 2,
1463
- y: isNaN(e.absoluteValue > 0 ? e.y : rn.value) ? 0 : e.absoluteValue > 0 ? e.y : rn.value,
1464
- width: e.width,
1465
- height: isNaN(Math.abs(e.y - rn.value)) ? 0 : Math.abs(e.y - rn.value),
1466
- fill: e.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${k.value})` : `url(#sparkline_bar_gradient_neg_${k.value})`,
1467
- rx: $e.value.borderRadius
1468
- }, null, 8, Pt)) : _("", !0), L.value.verticalIndicator.show && (X.value && e.id === X.value.id || ln.value === t) ? (S(), v("line", {
1469
- key: 1,
1470
- x1: e.x,
1471
- x2: e.x,
1472
- y1: J.value.top - 6,
1473
- y2: J.value.bottom,
1474
- stroke: L.value.verticalIndicator.color || e.color,
1475
- "stroke-width": L.value.verticalIndicator.strokeWidth,
1476
- "stroke-linecap": "round",
1477
- "stroke-dasharray": L.value.verticalIndicator.strokeDasharray || 0
1478
- }, null, 8, Ft)) : _("", !0)]))), 256)),
1479
- $t.value < 0 ? (S(), v("line", {
1480
- key: 6,
1481
- x1: J.value.start,
1482
- x2: J.value.start + J.value.width,
1483
- y1: E(fe)(rn.value, J.value.bottom),
1484
- y2: E(fe)(rn.value, J.value.bottom),
1485
- stroke: L.value.zeroLine.color,
1486
- "stroke-dasharray": L.value.zeroLine.strokeWidth * 2,
1487
- "stroke-width": L.value.zeroLine.strokeWidth,
1488
- "stroke-linecap": "round"
1489
- }, null, 8, It)) : _("", !0),
1490
- (S(!0), v(h, null, w(Y.value, (e, t) => (S(), v("g", { key: `sparkline_plot_${e.id}` }, [bn(e, t) ? (S(), v("circle", {
1491
- key: 0,
1492
- cx: e.x,
1493
- cy: e.y,
1494
- r: xn(e, t),
1495
- fill: Pn(e),
1496
- stroke: Sn(e, t),
1497
- "stroke-width": L.value.plot.strokeWidth
1498
- }, null, 8, Lt)) : _("", !0)]))), 128)),
1499
- e.showInfo && I.value.show ? (S(), v("text", {
1500
- key: 7,
1501
- x: I.value.position === "left" ? 12 + I.value.offsetX : J.value.width + 12 + I.value.offsetX,
1502
- y: q.value.height / 2 + I.value.fontSize / 2.5 + I.value.offsetY,
1503
- "font-size": I.value.fontSize,
1504
- "font-weight": I.value.bold ? "bold" : "normal",
1505
- fill: I.value.color
1506
- }, Re(X.value ? E(oe)(I.value.formatter, X.value.absoluteValue, E(t)({
1507
- p: I.value.prefix,
1508
- v: X.value.absoluteValue,
1509
- s: I.value.suffix,
1510
- r: I.value.roundingValue
1511
- }), { datapoint: X.value }) : E(oe)(I.value.formatter, pn.value, E(t)({
1512
- p: I.value.prefix,
1513
- v: pn.value,
1514
- s: I.value.suffix,
1515
- r: I.value.roundingValue
1516
- }))), 9, Rt)) : _("", !0),
1517
- (S(!0), v(h, null, w(Y.value, (e, t) => (S(), v("rect", {
1518
- x: e.x - (J.value.width / (on.value + 1) > q.value.padding ? q.value.padding : J.value.width / (on.value + 1)) / 2,
1519
- y: J.value.top - 6,
1520
- height: J.value.height + 6,
1521
- width: J.value.width / (on.value + 1) > q.value.padding ? q.value.padding : J.value.width / (on.value + 1),
1522
- fill: "transparent",
1523
- onMouseenter: () => dn(e, t),
1524
- onMouseleave: () => fn(e, t),
1525
- onClick: () => mn(e, t)
1526
- }, null, 40, zt))), 256)),
1527
- T(n.$slots, "svg", { svg: {
1528
- ...q.value,
1529
- drawingArea: J.value,
1530
- timeLabels: sn.value,
1531
- series: Y.value,
1532
- hoveredIndex: A.value
1533
- } }, void 0, !0)
1534
- ], 44, xt)), n.$slots.hint ? (S(), v("div", Bt, [T(n.$slots, "hint", Pe(Ne({
1535
- hint: M.value.a11y.translations.keyboardNavigation,
1536
- isVisible: Fn.value
1537
- })), void 0, !0)])) : _("", !0)]),
1538
- X.value && N.value.show ? (S(), ke(E(Ue), {
1539
- key: 2,
1540
- x: X.value.x,
1541
- y: X.value.y,
1542
- prevX: un.value.x,
1543
- prevY: un.value.y,
1544
- offsetY: L.value.plot.radius * 3 + N.value.offsetY,
1545
- svgRef: E(V),
1546
- background: N.value.backgroundColor,
1547
- color: N.value.color,
1548
- fontSize: N.value.fontSize,
1549
- borderWidth: N.value.borderWidth,
1550
- borderColor: N.value.borderColor,
1551
- borderRadius: N.value.borderRadius,
1552
- backgroundOpacity: N.value.backgroundOpacity
1553
- }, {
1554
- default: Ve(() => [T(n.$slots, "tooltip", Pe(Ne({ ...X.value })), () => [Ae(Re(X.value.period) + ": " + Re(E(oe)(I.value.formatter, X.value.absoluteValue, E(t)({
1555
- p: I.value.prefix,
1556
- v: X.value.absoluteValue,
1557
- s: I.value.suffix,
1558
- r: I.value.roundingValue
1559
- }), { datapoint: X.value })), 1)], !0)]),
1560
- _: 3
1561
- }, 8, [
1562
- "x",
1563
- "y",
1564
- "prevX",
1565
- "prevY",
1566
- "offsetY",
1567
- "svgRef",
1568
- "background",
1569
- "color",
1570
- "fontSize",
1571
- "borderWidth",
1572
- "borderColor",
1573
- "borderRadius",
1574
- "backgroundOpacity"
1575
- ])) : _("", !0),
1576
- n.$slots.source ? (S(), v("div", {
1577
- key: 3,
1578
- ref_key: "source",
1579
- ref: Qe,
1580
- dir: "auto"
1581
- }, [T(n.$slots, "source", {}, void 0, !0)], 512)) : _("", !0),
1582
- T(n.$slots, "skeleton", {}, () => [E(B) ? (S(), ke(ve, { key: 0 })) : _("", !0)], !0)
1583
- ], 12, vt));
1584
- }
1585
- }, [["__scopeId", "data-v-ef970c4d"]]);
1586
- //#endregion
1587
- export { _t as n, Vt as t };