@adyen/lume-vue3 0.10.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { defineComponent as Z, ref as S, openBlock as h, createElementBlock as T, mergeProps as C, createElementVNode as j, toDisplayString as q, createCommentVNode as P, isRef as At, computed as p, watch as U, toRefs as Q, inject as He, reactive as Be, onMounted as pe, unref as l, Fragment as K, renderList as z, createBlock as W, normalizeClass as ee, normalizeStyle as Tt, onBeforeUnmount as Lt, watchEffect as Ot, renderSlot as R, createTextVNode as de, useSlots as ne, withDirectives as Kt, withCtx as V, createSlots as le, vShow as Jt, pushScopeId as Qt, popScopeId as qt, provide as Ce, createVNode as oe, normalizeProps as ue, guardReactiveProps as ie, defineAsyncComponent as je, resolveDynamicComponent as en } from "vue";
2
- import { format as tn, ticks as nn, scaleBand as Le, scaleLinear as Oe, link as on, line as an, area as rn } from "d3";
3
- import { createPopper as ln } from "@popperjs/core";
4
- import { sankeyLinkHorizontal as un, sankey as sn, sankeyJustify as cn } from "d3-sankey";
5
- const dn = {
1
+ import { defineComponent as Z, ref as C, openBlock as _, createElementBlock as L, mergeProps as M, createElementVNode as G, toDisplayString as ee, createCommentVNode as P, isRef as Lt, computed as p, watch as X, toRefs as q, inject as Be, reactive as Re, onMounted as pe, unref as l, Fragment as J, renderList as z, createBlock as W, normalizeClass as te, normalizeStyle as Ot, onBeforeUnmount as $t, watchEffect as xt, renderSlot as R, createTextVNode as de, useSlots as oe, withDirectives as Jt, withCtx as V, createSlots as ue, vShow as Qt, pushScopeId as qt, popScopeId as en, provide as Me, createVNode as ae, normalizeProps as ie, guardReactiveProps as se, defineAsyncComponent as Ge, resolveDynamicComponent as tn } from "vue";
2
+ import { format as nn, ticks as on, scaleBand as $e, scaleLinear as xe, link as an, line as rn, area as ln } from "d3";
3
+ import { createPopper as un } from "@popperjs/core";
4
+ import { sankeyLinkHorizontal as sn, sankey as cn, sankeyJustify as dn } from "d3-sankey";
5
+ const vn = {
6
6
  class: "axis__tick-label lume-typography--axis",
7
7
  "pointer-events": "all",
8
8
  "data-j-axis__tick-label": ""
9
- }, vn = /* @__PURE__ */ Z({
9
+ }, pn = /* @__PURE__ */ Z({
10
10
  __name: "lume-tick",
11
11
  props: {
12
12
  value: {
@@ -44,8 +44,8 @@ const dn = {
44
44
  },
45
45
  emits: ["click", "mouseenter"],
46
46
  setup(e, { expose: t, emit: n }) {
47
- const o = S(null);
48
- return t({ ref: o }), (r, a) => (h(), T("g", C(e.group, {
47
+ const o = C(null);
48
+ return t({ ref: o }), (r, a) => (_(), L("g", M(e.group, {
49
49
  class: ["axis__tick", {
50
50
  "axis__tick--hovered": e.isHovered,
51
51
  "axis__tick--hidden": e.isHidden
@@ -54,27 +54,27 @@ const dn = {
54
54
  onMouseenter: a[0] || (a[0] = (u) => n("mouseenter", u)),
55
55
  onClick: a[1] || (a[1] = (u) => n("click", u))
56
56
  }), [
57
- j("g", dn, [
58
- j("rect", C(e.ghost, {
57
+ G("g", vn, [
58
+ G("rect", M(e.ghost, {
59
59
  class: "axis__ghost",
60
60
  fill: "url(#lume-tick-gradient)"
61
61
  }), null, 16),
62
- j("text", C(e.label, {
62
+ G("text", M(e.label, {
63
63
  ref_key: "labelRef",
64
64
  ref: o,
65
65
  class: "axis__label"
66
- }), q(e.value), 17)
66
+ }), ee(e.value), 17)
67
67
  ]),
68
- e.withGridlines ? (h(), T("line", C({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : P("", !0)
68
+ e.withGridlines ? (_(), L("line", M({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : P("", !0)
69
69
  ], 16));
70
70
  }
71
71
  });
72
- const J = (e, t) => {
72
+ const Q = (e, t) => {
73
73
  const n = e.__vccOpts || e;
74
74
  for (const [o, r] of t)
75
75
  n[o] = r;
76
76
  return n;
77
- }, it = /* @__PURE__ */ J(vn, [["__scopeId", "data-v-59ddc0a6"]]), pn = [
77
+ }, st = /* @__PURE__ */ Q(pn, [["__scopeId", "data-v-59ddc0a6"]]), fn = [
78
78
  "controls",
79
79
  "legend",
80
80
  "axes",
@@ -82,10 +82,10 @@ const J = (e, t) => {
82
82
  "tooltip",
83
83
  "tooltip-content"
84
84
  ];
85
- function $t() {
85
+ function wt() {
86
86
  return process.env.NODE_ENV === "production";
87
87
  }
88
- function xt(e) {
88
+ function It(e) {
89
89
  return (e == null ? void 0 : e.map(
90
90
  (t) => t.values.map((n) => n == null ? void 0 : n.value).flat()
91
91
  ).flat()) || [];
@@ -93,30 +93,30 @@ function xt(e) {
93
93
  function Ke(e) {
94
94
  return e.length === 1;
95
95
  }
96
- function fn(e) {
96
+ function hn(e) {
97
97
  return !!e && e.every(
98
98
  (t) => "color" in t
99
99
  );
100
100
  }
101
- function Ge(e) {
101
+ function je(e) {
102
102
  return !!e && typeof e == "object" && !Array.isArray(e);
103
103
  }
104
- function wt(e, t) {
104
+ function Et(e, t) {
105
105
  const n = { ...e };
106
106
  return Object.entries(t).forEach(([o, r]) => {
107
- n[o] = Ge(e[o]) && Ge(r) ? wt(e[o], r) : r;
107
+ n[o] = je(e[o]) && je(r) ? Et(e[o], r) : r;
108
108
  }), n;
109
109
  }
110
- function hn(e) {
111
- return e != null && Ge(e) && "value" in e;
110
+ function mn(e) {
111
+ return e != null && je(e) && "value" in e;
112
112
  }
113
- function ge(e) {
113
+ function ye(e) {
114
114
  return (e == null ? void 0 : e.bandwidth) !== void 0;
115
115
  }
116
- function mn(e) {
117
- return ge(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
116
+ function gn(e) {
117
+ return ye(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
118
118
  }
119
- const gn = (e, t) => {
119
+ const _n = (e, t) => {
120
120
  if (!e)
121
121
  throw new Error("Data is not a valid array");
122
122
  if (e.length === 0)
@@ -126,9 +126,9 @@ const gn = (e, t) => {
126
126
  throw new Error("Index exceeds length of at least one of the datasets");
127
127
  });
128
128
  };
129
- function _n(e, t) {
129
+ function yn(e, t) {
130
130
  var n;
131
- return gn(e, t), ((n = e.reduce(
131
+ return _n(e, t), ((n = e.reduce(
132
132
  (o, r) => {
133
133
  var a, u;
134
134
  return (((a = o.values[t]) == null ? void 0 : a.value) ?? 0) > (((u = r.values[t]) == null ? void 0 : u.value) ?? 0) ? o : r;
@@ -136,7 +136,7 @@ function _n(e, t) {
136
136
  ).values[t]) == null ? void 0 : n.value) || 0;
137
137
  }
138
138
  function Ve(e) {
139
- const t = At(e) ? e.value : e;
139
+ const t = Lt(e) ? e.value : e;
140
140
  if (!t)
141
141
  throw new Error("No empty array can be created from specified data value");
142
142
  const n = Math.max(
@@ -145,17 +145,17 @@ function Ve(e) {
145
145
  );
146
146
  return Array(n).fill(null);
147
147
  }
148
- function yn(e) {
149
- return ge(e) ? e.domain().length : Math.max(...e.domain());
148
+ function kn(e) {
149
+ return ye(e) ? e.domain().length : Math.max(...e.domain());
150
150
  }
151
- function kn(e, t) {
151
+ function bn(e, t) {
152
152
  return (n) => Math.round(e * (1 - n) + t * n);
153
153
  }
154
- function bn(e, t, n) {
154
+ function An(e, t, n) {
155
155
  const o = n ? e.length - t : t, r = e.slice(0, o);
156
156
  return e.slice(o).concat(r);
157
157
  }
158
- function _e(e) {
158
+ function ke(e) {
159
159
  if (e.groups) {
160
160
  const t = Object.keys(e);
161
161
  return Object.assign(
@@ -165,32 +165,32 @@ function _e(e) {
165
165
  }
166
166
  return e;
167
167
  }
168
- function An(e) {
168
+ function Tn(e) {
169
169
  return Object.assign(
170
170
  {},
171
171
  ...Object.keys(e).map(
172
- (t) => pn.includes(t) ? {} : { [t]: e[t] }
172
+ (t) => fn.includes(t) ? {} : { [t]: e[t] }
173
173
  )
174
174
  );
175
175
  }
176
- const Tn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
176
+ const Ln = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
177
177
  (t, n) => t += (n &= 63) < 36 ? n.toString(36) : n < 62 ? (n - 26).toString(36).toUpperCase() : n > 62 ? "-" : "_",
178
178
  ""
179
179
  );
180
180
  var ve = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
181
181
  Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e))(ve || {});
182
- const Ln = "[lume] ";
183
- function he(e, t = !0) {
184
- t && $t() || console.warn(Ln + "Warning: " + e);
182
+ const On = "[lume] ";
183
+ function ge(e, t = !0) {
184
+ t && wt() || console.warn(On + "Warning: " + e);
185
185
  }
186
- const De = (e) => {
186
+ const He = (e) => {
187
187
  let t = null;
188
188
  switch (typeof e) {
189
189
  case "string":
190
190
  try {
191
- t = tn(e);
191
+ t = nn(e);
192
192
  } catch {
193
- he(ve.InvalidFormat), t = null;
193
+ ge(ve.InvalidFormat), t = null;
194
194
  }
195
195
  break;
196
196
  case "function":
@@ -203,29 +203,29 @@ const De = (e) => {
203
203
  return t ? t(...o) : o[0];
204
204
  }
205
205
  return n;
206
- }, $e = () => ({
206
+ }, we = () => ({
207
207
  options: {
208
208
  type: Object,
209
209
  default: () => ({})
210
210
  }
211
211
  });
212
- function se(e, t) {
212
+ function ce(e, t) {
213
213
  return { allOptions: p(() => {
214
- const o = At(t) ? t == null ? void 0 : t.value : t;
215
- return o ? wt(o, e.value) : e.value;
214
+ const o = Lt(t) ? t == null ? void 0 : t.value : t;
215
+ return o ? Et(o, e.value) : e.value;
216
216
  }) };
217
217
  }
218
- const On = 0.15;
219
- function $n(e, t, n) {
220
- const o = S(), r = p(() => Math.max(...e.value.range())), a = p(() => t.value.length);
218
+ const $n = 0.15;
219
+ function xn(e, t, n) {
220
+ const o = C(), r = p(() => Math.max(...e.value.range())), a = p(() => t.value.length);
221
221
  function u() {
222
222
  if (!t.value)
223
223
  return;
224
224
  const i = t.value.reduce(
225
- (d, v) => d + v.ref.getBoundingClientRect().width,
225
+ (v, d) => v + d.ref.getBoundingClientRect().width,
226
226
  0
227
227
  ), c = Math.ceil(i / a.value);
228
- o.value = c + c * On;
228
+ o.value = c + c * $n;
229
229
  }
230
230
  function s(i) {
231
231
  if (!t.value)
@@ -233,20 +233,20 @@ function $n(e, t, n) {
233
233
  const c = t.value.length;
234
234
  if (i === 0)
235
235
  return !0;
236
- const d = r.value / c, v = typeof n == "number" && n > 0 && n + 1 || Math.ceil(o.value / d);
237
- return i % v === 0;
236
+ const v = r.value / c, d = typeof n == "number" && n > 0 && n + 1 || Math.ceil(o.value / v);
237
+ return i % d === 0;
238
238
  }
239
- return U(t, u), { showTick: s };
239
+ return X(t, u), { showTick: s };
240
240
  }
241
- var ae = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(ae || {}), It = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(It || {}), Je = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(Je || {}), Et = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(Et || {}), Qe = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(Qe || {});
241
+ var re = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(re || {}), Nt = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(Nt || {}), Je = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(Je || {}), Dt = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(Dt || {}), Qe = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(Qe || {});
242
242
  const D = {
243
243
  HORIZONTAL: "horizontal",
244
244
  VERTICAL: "vertical"
245
- }, xn = {
245
+ }, wn = {
246
246
  SINGLE: "single",
247
247
  GROUPED: "grouped",
248
248
  STACKED: "stacked"
249
- }, Nt = "No data", st = 20, Dt = 0.33, Ht = 0.5, Bt = 12, xe = 8, wn = 1, In = [
249
+ }, Ht = "No data", ct = 20, Bt = 0.33, Rt = 0.5, St = 12, Ie = 8, In = 1, En = [
250
250
  "auto",
251
251
  "auto-start",
252
252
  "auto-end",
@@ -263,10 +263,10 @@ const D = {
263
263
  "left-start",
264
264
  "left-end"
265
265
  ];
266
- function Re(e) {
267
- e != null && e.closest("svg") || he(ve.NotContainedInSvg);
266
+ function Se(e) {
267
+ e != null && e.closest("svg") || ge(ve.NotContainedInSvg);
268
268
  }
269
- const Rt = {
269
+ const Ct = {
270
270
  /** Displays a line for each tick. */
271
271
  gridLines: !1,
272
272
  /** Displays the axis title. */
@@ -282,14 +282,14 @@ const Rt = {
282
282
  tickFormat: null,
283
283
  /** Space between the tick label and the axis line. */
284
284
  tickPadding: 8
285
- }, En = {
286
- ...Rt,
285
+ }, Nn = {
286
+ ...Ct,
287
287
  withTitle: !1,
288
288
  skip: !0
289
- }, Nn = {
290
- ...Rt,
289
+ }, Dn = {
290
+ ...Ct,
291
291
  gridLines: !0
292
- }, Dn = function(e, t, n) {
292
+ }, Hn = function(e, t, n) {
293
293
  const o = p(() => e.value.step() * e.value.paddingInner() / 2);
294
294
  function r(i, c) {
295
295
  return {
@@ -297,15 +297,15 @@ const Rt = {
297
297
  };
298
298
  }
299
299
  function a(i) {
300
- var d;
300
+ var v;
301
301
  const c = Math.max(
302
302
  e.value.step(),
303
- (i ? (d = i.getComputedTextLength) == null ? void 0 : d.call(i) : e.value.step()) + 20
303
+ (i ? (v = i.getComputedTextLength) == null ? void 0 : v.call(i) : e.value.step()) + 20
304
304
  );
305
305
  return {
306
306
  x: -(c - e.value.step()) / 2,
307
307
  width: c,
308
- height: n.value.tickPadding + Bt + xe
308
+ height: n.value.tickPadding + St + Ie
309
309
  };
310
310
  }
311
311
  function u() {
@@ -331,7 +331,7 @@ const Rt = {
331
331
  getTickGroupAttributes: r,
332
332
  getTickLabelAttributes: s
333
333
  };
334
- }, Hn = function(e, t, n) {
334
+ }, Bn = function(e, t, n) {
335
335
  const o = p(() => e.value.step() * e.value.paddingInner() / 2);
336
336
  function r(i, c) {
337
337
  return {
@@ -339,8 +339,8 @@ const Rt = {
339
339
  };
340
340
  }
341
341
  function a(i) {
342
- var d;
343
- const c = (i ? (d = i.getComputedTextLength) == null ? void 0 : d.call(i) : 42) + n.value.tickPadding + xe;
342
+ var v;
343
+ const c = (i ? (v = i.getComputedTextLength) == null ? void 0 : v.call(i) : 42) + n.value.tickPadding + Ie;
344
344
  return {
345
345
  x: -c,
346
346
  width: c,
@@ -369,7 +369,7 @@ const Rt = {
369
369
  getTickGroupAttributes: r,
370
370
  getTickLabelAttributes: s
371
371
  };
372
- }, Bn = function(e, t, n) {
372
+ }, Rn = function(e, t, n) {
373
373
  const o = p(() => {
374
374
  const i = e.value.ticks();
375
375
  return i.length > 1 ? e.value(i[1]) - e.value(i[0]) : 0;
@@ -381,7 +381,7 @@ const Rt = {
381
381
  }
382
382
  function a() {
383
383
  return {
384
- height: n.value.tickPadding + Bt + xe,
384
+ height: n.value.tickPadding + St + Ie,
385
385
  width: o.value,
386
386
  x: -(o.value / 2)
387
387
  };
@@ -404,7 +404,7 @@ const Rt = {
404
404
  getTickGroupAttributes: r,
405
405
  getTickLabelAttributes: s
406
406
  };
407
- }, Rn = function(e, t, n) {
407
+ }, Sn = function(e, t, n) {
408
408
  const o = p(() => {
409
409
  const i = e.value.ticks();
410
410
  return i.length > 1 ? e.value(i[1]) - e.value(i[0]) : 0;
@@ -415,8 +415,8 @@ const Rt = {
415
415
  };
416
416
  }
417
417
  function a(i) {
418
- var d;
419
- const c = (((d = i == null ? void 0 : i.getComputedTextLength) == null ? void 0 : d.call(i)) || 0) + n.value.tickPadding + xe;
418
+ var v;
419
+ const c = (((v = i == null ? void 0 : i.getComputedTextLength) == null ? void 0 : v.call(i)) || 0) + n.value.tickPadding + Ie;
420
420
  return {
421
421
  width: c,
422
422
  height: o.value,
@@ -442,33 +442,33 @@ const Rt = {
442
442
  getTickGroupAttributes: r,
443
443
  getTickLabelAttributes: s
444
444
  };
445
- }, Mn = {
446
- "x-band-scale-axis": Dn,
447
- "y-band-scale-axis": Hn,
448
- "x-linear-scale-axis": Bn,
449
- "y-linear-scale-axis": Rn
450
- }, Sn = ["transform"], Cn = { key: 0 }, jn = /* @__PURE__ */ j("linearGradient", { id: "lume-tick-gradient" }, [
451
- /* @__PURE__ */ j("stop", {
445
+ }, Cn = {
446
+ "x-band-scale-axis": Hn,
447
+ "y-band-scale-axis": Bn,
448
+ "x-linear-scale-axis": Rn,
449
+ "y-linear-scale-axis": Sn
450
+ }, Mn = ["transform"], Gn = { key: 0 }, jn = /* @__PURE__ */ G("linearGradient", { id: "lume-tick-gradient" }, [
451
+ /* @__PURE__ */ G("stop", {
452
452
  offset: "0%",
453
453
  "stop-color": "rgba(255,255,255,0)"
454
454
  }),
455
- /* @__PURE__ */ j("stop", {
455
+ /* @__PURE__ */ G("stop", {
456
456
  offset: "10%",
457
457
  "stop-color": "var(--lume-chart-background-color)"
458
458
  }),
459
- /* @__PURE__ */ j("stop", {
459
+ /* @__PURE__ */ G("stop", {
460
460
  offset: "90%",
461
461
  "stop-color": "var(--lume-chart-background-color)"
462
462
  }),
463
- /* @__PURE__ */ j("stop", {
463
+ /* @__PURE__ */ G("stop", {
464
464
  offset: "100%",
465
465
  "stop-color": "rgba(255,255,255,0)"
466
466
  })
467
- ], -1), Gn = [
467
+ ], -1), Vn = [
468
468
  jn
469
469
  ];
470
- var Mt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Mt || {}), St = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(St || {}), Fe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Fe || {});
471
- const ct = /* @__PURE__ */ Z({
470
+ var Mt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Mt || {}), Gt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(Gt || {}), Fe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Fe || {});
471
+ const dt = /* @__PURE__ */ Z({
472
472
  __name: "lume-axis",
473
473
  props: {
474
474
  scale: {
@@ -483,7 +483,7 @@ const ct = /* @__PURE__ */ Z({
483
483
  position: {
484
484
  type: String,
485
485
  default: void 0,
486
- validator: (e) => e in St
486
+ validator: (e) => e in Gt
487
487
  },
488
488
  containerSize: {
489
489
  type: Object,
@@ -497,123 +497,123 @@ const ct = /* @__PURE__ */ Z({
497
497
  type: String,
498
498
  default: D.VERTICAL
499
499
  },
500
- ...$e()
500
+ ...we()
501
501
  },
502
502
  emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
503
503
  setup(e, { emit: t }) {
504
- const n = e, o = 16, { scale: r, containerSize: a, hoveredIndex: u, options: s, orientation: i } = Q(n), c = He("isEmpty", S(!1)), d = Be({}), v = S(null), y = S(null), $ = S(null), k = p(
504
+ const n = e, o = 16, { scale: r, containerSize: a, hoveredIndex: u, options: s, orientation: i } = q(n), c = Be("isEmpty", C(!1)), v = Re({}), d = C(null), h = C(null), k = C(null), m = p(
505
505
  () => n.type ? Fe[n.type] : n.position
506
506
  ), A = p(
507
- () => n.type || (k.value === "left" ? "y" : "x")
508
- ), m = p(
507
+ () => n.type || (m.value === "left" ? "y" : "x")
508
+ ), f = p(
509
509
  () => A.value === "x" && i.value === D.VERTICAL || A.value === "y" && i.value === D.HORIZONTAL
510
- ), { allOptions: _ } = se(
510
+ ), { allOptions: y } = ce(
511
511
  s,
512
- A.value === "x" ? En : Nn
513
- ), { showTick: E } = $n(r, v, _.value.skip), N = p(() => {
514
- var g, L, f, B;
515
- return A.value === "y" && c.value ? `translate(0, ${((g = a.value) == null ? void 0 : g.height) / 2})` : A.value === "x" && c.value ? `translate(-${((L = a.value) == null ? void 0 : L.width) / 2}, ${(f = a.value) == null ? void 0 : f.height})` : `translate(0, ${A.value === "x" ? (B = a.value) == null ? void 0 : B.height : 0})`;
516
- }), I = p(() => {
517
- if (ge(r.value))
512
+ A.value === "x" ? Nn : Dn
513
+ ), { showTick: E } = xn(r, d, y.value.skip), w = p(() => {
514
+ var B, b, I, g;
515
+ return A.value === "y" && c.value ? `translate(0, ${((B = a.value) == null ? void 0 : B.height) / 2})` : A.value === "x" && c.value ? `translate(-${((b = a.value) == null ? void 0 : b.width) / 2}, ${(I = a.value) == null ? void 0 : I.height})` : `translate(0, ${A.value === "x" ? (g = a.value) == null ? void 0 : g.height : 0})`;
516
+ }), N = p(() => {
517
+ if (ye(r.value))
518
518
  return r.value.labels || r.value.domain();
519
- const { tickCount: g } = _.value, [L, f] = r.value.domain();
520
- return nn(L, f, g);
521
- }), x = p(() => {
522
- const { tickFormat: g } = _.value;
523
- return De(g);
519
+ const { tickCount: B } = y.value, [b, I] = r.value.domain();
520
+ return on(b, I, B);
521
+ }), $ = p(() => {
522
+ const { tickFormat: B } = y.value;
523
+ return He(B);
524
524
  }), H = p(
525
- () => _.value.withHover && m.value && u.value > -1
526
- ), M = p(
527
- () => _.value.tickPadding + xe || o
528
- ), X = p(() => A.value === "x" ? (
525
+ () => y.value.withHover && f.value && u.value > -1
526
+ ), S = p(
527
+ () => y.value.tickPadding + Ie || o
528
+ ), Y = p(() => A.value === "x" ? (
529
529
  // If x axis, get the tick height
530
530
  Math.max(
531
- ...(v.value || []).map(
532
- (g) => {
533
- var L, f;
534
- return ((f = (L = g.ref).getBBox) == null ? void 0 : f.call(L).height) + M.value;
531
+ ...(d.value || []).map(
532
+ (B) => {
533
+ var b, I;
534
+ return ((I = (b = B.ref).getBBox) == null ? void 0 : I.call(b).height) + S.value;
535
535
  }
536
536
  )
537
537
  )
538
538
  ) : (
539
539
  // If y axis, get the tick width
540
540
  Math.max(
541
- ...(v.value || []).map(
542
- (g) => {
543
- var L, f;
544
- return ((f = (L = g.ref).getBBox) == null ? void 0 : f.call(L).width) + M.value;
541
+ ...(d.value || []).map(
542
+ (B) => {
543
+ var b, I;
544
+ return ((I = (b = B.ref).getBBox) == null ? void 0 : I.call(b).width) + S.value;
545
545
  }
546
546
  )
547
547
  )
548
548
  ));
549
- function Y(g) {
550
- const { showTicks: L } = _.value;
551
- return L === !1 ? "" : x.value(g);
549
+ function K(B) {
550
+ const { showTicks: b } = y.value;
551
+ return b === !1 ? "" : $.value(B);
552
552
  }
553
- function G(g, L, f) {
554
- t("mouseenter", { index: m.value ? g : null, value: L, event: f });
553
+ function F(B, b, I) {
554
+ t("mouseenter", { index: f.value ? B : null, value: b, event: I });
555
555
  }
556
- function te(g, L, f) {
557
- t("click", { index: g, value: L, event: f });
556
+ function ne(B, b, I) {
557
+ t("click", { index: B, value: b, event: I });
558
558
  }
559
- function Te(g) {
560
- var L;
561
- if (!(!v.value || !v.value.length))
562
- return (L = v.value[g]) == null ? void 0 : L.ref;
559
+ function be(B) {
560
+ var b;
561
+ if (!(!d.value || !d.value.length))
562
+ return (b = d.value[B]) == null ? void 0 : b.ref;
563
563
  }
564
- function ce() {
565
- $.value = I.value.map(
566
- (g, L) => ({
567
- value: Y(g),
568
- group: d.getTickGroupAttributes(g, L),
569
- ghost: d.getTickGhostAttributes(Te(L)),
570
- label: d.getTickLabelAttributes(),
571
- gridline: d.getGridLinesAttributes()
564
+ function fe() {
565
+ k.value = N.value.map(
566
+ (B, b) => ({
567
+ value: K(B),
568
+ group: v.getTickGroupAttributes(B, b),
569
+ ghost: v.getTickGhostAttributes(be(b)),
570
+ label: v.getTickLabelAttributes(),
571
+ gridline: v.getGridLinesAttributes()
572
572
  })
573
573
  );
574
574
  }
575
- function ye() {
576
- const g = r.value.step ? "bandScale" : "linearScale", L = Mn[`${A.value}-${Mt[g]}`];
577
- Object.entries(L(r, a, _) || []).forEach(
578
- ([f, B]) => {
579
- d[f] = B;
575
+ function he() {
576
+ const B = r.value.step ? "bandScale" : "linearScale", b = Cn[`${A.value}-${Mt[B]}`];
577
+ Object.entries(b(r, a, y) || []).forEach(
578
+ ([I, g]) => {
579
+ v[I] = g;
580
580
  }
581
581
  );
582
582
  }
583
- return U(r, ye, { flush: "sync", immediate: !0 }), U(r, ce, { immediate: !0 }), U(v, ce), U(X, (g) => t("lume__internal--axis-size", g)), pe(() => Re(y.value)), (g, L) => l(r) ? (h(), T("g", {
583
+ return X(r, he, { flush: "sync", immediate: !0 }), X(r, fe, { immediate: !0 }), X(d, fe), X(Y, (B) => t("lume__internal--axis-size", B)), pe(() => Se(h.value)), (B, b) => l(r) ? (_(), L("g", {
584
584
  key: 0,
585
585
  ref_key: "root",
586
- ref: y,
586
+ ref: h,
587
587
  class: "axis",
588
- transform: l(N),
588
+ transform: l(w),
589
589
  "data-j-axis": "",
590
- onMouseleave: L[1] || (L[1] = (f) => t("mouseleave", f))
590
+ onMouseleave: b[1] || (b[1] = (I) => t("mouseleave", I))
591
591
  }, [
592
- l(A) === "x" ? (h(), T("defs", Cn, Gn)) : P("", !0),
593
- (h(!0), T(K, null, z($.value, (f, B) => (h(), W(l(it), C({
594
- key: `${f.value}_${B}`,
592
+ l(A) === "x" ? (_(), L("defs", Gn, Vn)) : P("", !0),
593
+ (_(!0), L(J, null, z(k.value, (I, g) => (_(), W(l(st), M({
594
+ key: `${I.value}_${g}`,
595
595
  ref_for: !0,
596
596
  ref_key: "tickRefs",
597
- ref: v
598
- }, f, {
599
- "is-hidden": l(_).skip && !l(E)(B),
600
- "with-gridlines": l(_).gridLines,
601
- onMouseenter: (F) => G(B, f.value, F),
602
- onClick: (F) => te(B, f.value, F)
597
+ ref: d
598
+ }, I, {
599
+ "is-hidden": l(y).skip && !l(E)(g),
600
+ "with-gridlines": l(y).gridLines,
601
+ onMouseenter: (j) => F(g, I.value, j),
602
+ onClick: (j) => ne(g, I.value, j)
603
603
  }), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
604
- l(H) ? (h(), W(l(it), C({ key: 1 }, $.value[l(u)], {
604
+ l(H) ? (_(), W(l(st), M({ key: 1 }, k.value[l(u)], {
605
605
  "with-gridlines": !1,
606
606
  "is-hovered": "",
607
- onClick: L[0] || (L[0] = (f) => te(
607
+ onClick: b[0] || (b[0] = (I) => ne(
608
608
  l(u),
609
- $.value[l(u)].value,
610
- f
609
+ k.value[l(u)].value,
610
+ I
611
611
  ))
612
612
  }), null, 16)) : P("", !0)
613
- ], 40, Sn)) : P("", !0);
613
+ ], 40, Mn)) : P("", !0);
614
614
  }
615
615
  });
616
- function Vn(e, t, n, o) {
616
+ function Fn(e, t, n, o) {
617
617
  const r = p(() => n.value > 0 && n.value < 1), a = p(
618
618
  () => o.value > 0 && o.value < 1
619
619
  ), u = p(
@@ -625,13 +625,13 @@ function Vn(e, t, n, o) {
625
625
  );
626
626
  return { computedX: u, computedY: s, shouldHaveMinWidth: r, shouldHaveMinHeight: a };
627
627
  }
628
- function Fn(e, t, n, o) {
629
- const r = S(0), a = S(0), u = p(() => `${e.value + n.value / 2}px ${t.value + o.value / 2}px`);
628
+ function Pn(e, t, n, o) {
629
+ const r = C(0), a = C(0), u = p(() => `${e.value + n.value / 2}px ${t.value + o.value / 2}px`);
630
630
  return pe(() => {
631
631
  r.value = n.value, a.value = o.value;
632
- }), U(n, (s) => r.value = s), U(o, (s) => a.value = s), { computedWidth: r, computedHeight: a, transformOrigin: u };
632
+ }), X(n, (s) => r.value = s), X(o, (s) => a.value = s), { computedWidth: r, computedHeight: a, transformOrigin: u };
633
633
  }
634
- const Pn = ["x", "y", "width", "height"], zn = /* @__PURE__ */ Z({
634
+ const zn = ["x", "y", "width", "height"], Zn = /* @__PURE__ */ Z({
635
635
  __name: "lume-bar",
636
636
  props: {
637
637
  x: {
@@ -669,36 +669,36 @@ const Pn = ["x", "y", "width", "height"], zn = /* @__PURE__ */ Z({
669
669
  },
670
670
  emits: ["click", "mouseover", "mouseleave"],
671
671
  setup(e, { emit: t }) {
672
- const n = e, { x: o, y: r, width: a, height: u, transition: s, classList: i } = Q(n), c = S(null), d = p(
672
+ const n = e, { x: o, y: r, width: a, height: u, transition: s, classList: i } = q(n), c = C(null), v = p(
673
673
  () => typeof i.value == "string" ? [i.value] : i.value
674
- ), v = p(() => s.value === "width"), y = p(() => s.value === "height"), $ = Fn(o, r, a, u), { computedX: k, computedY: A, shouldHaveMinWidth: m, shouldHaveMinHeight: _ } = Vn(o, r, a, u), E = p(() => m.value ? 1 : (v.value ? $.computedWidth : a).value), N = p(() => _.value ? 1 : (y.value ? $.computedHeight : u).value), I = v.value || y.value ? $.transformOrigin : null;
675
- return pe(() => Re(c.value)), (x, H) => (h(), T("rect", {
674
+ ), d = p(() => s.value === "width"), h = p(() => s.value === "height"), k = Pn(o, r, a, u), { computedX: m, computedY: A, shouldHaveMinWidth: f, shouldHaveMinHeight: y } = Fn(o, r, a, u), E = p(() => f.value ? 1 : (d.value ? k.computedWidth : a).value), w = p(() => y.value ? 1 : (h.value ? k.computedHeight : u).value), N = d.value || h.value ? k.transformOrigin : null;
675
+ return pe(() => Se(c.value)), ($, H) => (_(), L("rect", {
676
676
  ref_key: "root",
677
677
  ref: c,
678
- class: ee(["lume-bar", [
678
+ class: te(["lume-bar", [
679
679
  {
680
680
  "lume-fill--faded": e.isFaded,
681
681
  "lume-bar--negative": e.isNegative,
682
- "lume-bar--transition-width": l(v),
683
- "lume-bar--transition-height": l(y)
682
+ "lume-bar--transition-width": l(d),
683
+ "lume-bar--transition-height": l(h)
684
684
  },
685
- ...l(d)
685
+ ...l(v)
686
686
  ]]),
687
- style: Tt({ transformOrigin: l(I) }),
688
- x: l(k),
687
+ style: Ot({ transformOrigin: l(N) }),
688
+ x: l(m),
689
689
  y: l(A),
690
690
  width: l(E),
691
- height: l(N),
691
+ height: l(w),
692
692
  "data-j-bar": "",
693
- onClick: H[0] || (H[0] = (M) => t("click", M)),
694
- onMouseover: H[1] || (H[1] = (M) => t("mouseover", M)),
695
- onMouseleave: H[2] || (H[2] = (M) => t("mouseleave", M))
696
- }, null, 46, Pn));
693
+ onClick: H[0] || (H[0] = (S) => t("click", S)),
694
+ onMouseover: H[1] || (H[1] = (S) => t("mouseover", S)),
695
+ onMouseleave: H[2] || (H[2] = (S) => t("mouseleave", S))
696
+ }, null, 46, zn));
697
697
  }
698
698
  });
699
- const qe = /* @__PURE__ */ J(zn, [["__scopeId", "data-v-8e8f732a"]]);
700
- function Zn() {
701
- const e = S(), t = Be({
699
+ const qe = /* @__PURE__ */ Q(Zn, [["__scopeId", "data-v-8e8f732a"]]);
700
+ function Wn() {
701
+ const e = C(), t = Re({
702
702
  dimensions: {}
703
703
  }), n = new ResizeObserver((o) => {
704
704
  o.forEach((r) => {
@@ -707,11 +707,11 @@ function Zn() {
707
707
  });
708
708
  return pe(() => {
709
709
  n.observe(e.value);
710
- }), Lt(() => {
710
+ }), $t(() => {
711
711
  n.unobserve(e.value);
712
712
  }), { resizeState: t, resizeRef: e };
713
713
  }
714
- const Wn = ["height"], Un = ["transform"], Xn = /* @__PURE__ */ Z({
714
+ const Un = ["height"], Xn = ["transform"], Yn = /* @__PURE__ */ Z({
715
715
  __name: "lume-chart-container",
716
716
  props: {
717
717
  margins: {
@@ -733,75 +733,75 @@ const Wn = ["height"], Un = ["transform"], Xn = /* @__PURE__ */ Z({
733
733
  },
734
734
  emits: ["click", "mouseenter", "mouseleave", "resize"],
735
735
  setup(e, { emit: t }) {
736
- const n = e, { margins: o, containerSize: r } = Q(n), a = S(null), { resizeRef: u, resizeState: s } = Zn(), i = p(
736
+ const n = e, { margins: o, containerSize: r } = q(n), a = C(null), { resizeRef: u, resizeState: s } = Wn(), i = p(
737
737
  () => r.value.height + o.value.top + o.value.bottom
738
738
  );
739
- return Ot(() => {
739
+ return xt(() => {
740
740
  if (!a.value)
741
741
  return;
742
- const { width: c } = s.dimensions, { height: d } = a.value.getBoundingClientRect();
743
- if (!c || !d)
742
+ const { width: c } = s.dimensions, { height: v } = a.value.getBoundingClientRect();
743
+ if (!c || !v)
744
744
  return;
745
- const v = c - o.value.left - o.value.right, y = d - o.value.top - o.value.bottom, $ = {
746
- width: v > 0 ? v : 0,
747
- height: y > 0 ? y : 0,
745
+ const d = c - o.value.left - o.value.right, h = v - o.value.top - o.value.bottom, k = {
746
+ width: d > 0 ? d : 0,
747
+ height: h > 0 ? h : 0,
748
748
  outerWidth: c,
749
- outerHeight: d
749
+ outerHeight: v
750
750
  };
751
- t("resize", $);
752
- }), (c, d) => (h(), T("div", {
751
+ t("resize", k);
752
+ }), (c, v) => (_(), L("div", {
753
753
  ref_key: "resizeRef",
754
754
  ref: u,
755
- class: ee(["lume-chart-container", {
755
+ class: te(["lume-chart-container", {
756
756
  "lume-chart-container--minimum": !e.noMinSize
757
757
  }]),
758
758
  "data-j-chart-container": ""
759
759
  }, [
760
760
  R(c.$slots, "header", {}, void 0, !0),
761
- (h(), T("svg", {
761
+ (_(), L("svg", {
762
762
  ref_key: "root",
763
763
  ref: a,
764
- class: ee(["lume-chart-container__svg", {
764
+ class: te(["lume-chart-container__svg", {
765
765
  "lume-chart-container__svg--transparent": e.transparentBackground
766
766
  }]),
767
767
  height: l(i),
768
768
  "data-j-chart-container__root": "",
769
- onClick: d[0] || (d[0] = (v) => t("click", v)),
770
- onMouseenter: d[1] || (d[1] = (v) => t("mouseenter", v)),
771
- onMouseleave: d[2] || (d[2] = (v) => t("mouseleave", v))
769
+ onClick: v[0] || (v[0] = (d) => t("click", d)),
770
+ onMouseenter: v[1] || (v[1] = (d) => t("mouseenter", d)),
771
+ onMouseleave: v[2] || (v[2] = (d) => t("mouseleave", d))
772
772
  }, [
773
- j("g", {
773
+ G("g", {
774
774
  transform: `translate(${l(o).left}, ${l(o).top})`,
775
775
  class: "lume-chart-container__group",
776
776
  "data-j-chart-container__group": ""
777
777
  }, [
778
778
  R(c.$slots, "default", {}, void 0, !0)
779
- ], 8, Un)
780
- ], 42, Wn)),
779
+ ], 8, Xn)
780
+ ], 42, Un)),
781
781
  R(c.$slots, "footer", {}, void 0, !0),
782
782
  R(c.$slots, "extra", {}, void 0, !0)
783
783
  ], 2));
784
784
  }
785
785
  });
786
- const Yn = /* @__PURE__ */ J(Xn, [["__scopeId", "data-v-36870bc4"]]), Kn = ["onClick", "onMouseenter"], Jn = /* @__PURE__ */ Z({
786
+ const Kn = /* @__PURE__ */ Q(Yn, [["__scopeId", "data-v-36870bc4"]]), Jn = ["onClick", "onMouseenter"], Qn = /* @__PURE__ */ Z({
787
787
  __name: "lume-chart-legend",
788
788
  props: {
789
789
  data: {
790
790
  type: Array,
791
- validator: fn,
791
+ validator: hn,
792
792
  required: !0
793
793
  }
794
794
  },
795
795
  emits: ["click", "mouseenter", "mouseleave"],
796
796
  setup(e, { emit: t }) {
797
- const n = He("isEmpty");
798
- return (o, r) => l(n) ? P("", !0) : (h(), T("div", {
797
+ const n = Be("isEmpty");
798
+ return (o, r) => l(n) ? P("", !0) : (_(), L("div", {
799
799
  key: 0,
800
800
  class: "lume-chart-legend",
801
801
  "data-j-chart-legend": "",
802
802
  onMouseleave: r[0] || (r[0] = (a) => t("mouseleave"))
803
803
  }, [
804
- (h(!0), T(K, null, z(e.data, (a, u) => (h(), T("div", {
804
+ (_(!0), L(J, null, z(e.data, (a, u) => (_(), L("div", {
805
805
  key: `legend-item-${u}`,
806
806
  class: "lume-chart-legend__item lume-typography--body",
807
807
  tabindex: "0",
@@ -809,47 +809,47 @@ const Yn = /* @__PURE__ */ J(Xn, [["__scopeId", "data-v-36870bc4"]]), Kn = ["onC
809
809
  onClick: (s) => t("click", { index: u, dataset: a, event: s }),
810
810
  onMouseenter: (s) => t("mouseenter", { index: u, dataset: a, event: s })
811
811
  }, [
812
- j("span", {
813
- class: ee(["lume-chart-legend__symbol", `lume-background-color--${a.color}`]),
812
+ G("span", {
813
+ class: te(["lume-chart-legend__symbol", `lume-background-color--${a.color}`]),
814
814
  "data-j-chart-legend__symbol": ""
815
815
  }, null, 2),
816
- de(" " + q(a.label || u), 1)
817
- ], 40, Kn))), 128))
816
+ de(" " + ee(a.label || u), 1)
817
+ ], 40, Jn))), 128))
818
818
  ], 32));
819
819
  }
820
820
  });
821
- const dt = /* @__PURE__ */ J(Jn, [["__scopeId", "data-v-4710298b"]]);
822
- const Qn = {}, qn = {
821
+ const vt = /* @__PURE__ */ Q(Qn, [["__scopeId", "data-v-4710298b"]]);
822
+ const qn = {}, eo = {
823
823
  class: "lume-tooltip__title",
824
824
  "data-j-tooltip__title": ""
825
825
  };
826
- function eo(e, t) {
827
- return h(), T("div", qn, [
826
+ function to(e, t) {
827
+ return _(), L("div", eo, [
828
828
  R(e.$slots, "default", {}, void 0, !0)
829
829
  ]);
830
830
  }
831
- const to = /* @__PURE__ */ J(Qn, [["render", eo], ["__scopeId", "data-v-8af3fac6"]]);
832
- const no = {}, oo = {
831
+ const no = /* @__PURE__ */ Q(qn, [["render", to], ["__scopeId", "data-v-8af3fac6"]]);
832
+ const oo = {}, ao = {
833
833
  class: "lume-tooltip__item",
834
834
  "data-j-tooltip__summary-item": ""
835
- }, ao = { class: "lume-tooltip__value" };
836
- function ro(e, t) {
837
- return h(), T("li", oo, [
838
- j("span", null, [
835
+ }, ro = { class: "lume-tooltip__value" };
836
+ function lo(e, t) {
837
+ return _(), L("li", ao, [
838
+ G("span", null, [
839
839
  R(e.$slots, "default", {}, void 0, !0)
840
840
  ]),
841
- j("strong", ao, [
841
+ G("strong", ro, [
842
842
  R(e.$slots, "value", {}, void 0, !0)
843
843
  ])
844
844
  ]);
845
845
  }
846
- const lo = /* @__PURE__ */ J(no, [["render", ro], ["__scopeId", "data-v-4ed7ec1b"]]), uo = {
846
+ const uo = /* @__PURE__ */ Q(oo, [["render", lo], ["__scopeId", "data-v-4ed7ec1b"]]), io = {
847
847
  class: "lume-tooltip__item",
848
848
  "data-j-tooltip__item": ""
849
- }, io = { "data-j-tooltip__item__label": "" }, so = {
849
+ }, so = { "data-j-tooltip__item__label": "" }, co = {
850
850
  class: "lume-tooltip__value",
851
851
  "data-j-tooltip__item__value": ""
852
- }, co = /* @__PURE__ */ Z({
852
+ }, vo = /* @__PURE__ */ Z({
853
853
  __name: "lume-tooltip-item",
854
854
  props: {
855
855
  color: {
@@ -858,27 +858,27 @@ const lo = /* @__PURE__ */ J(no, [["render", ro], ["__scopeId", "data-v-4ed7ec1b
858
858
  }
859
859
  },
860
860
  setup(e) {
861
- return (t, n) => (h(), T("li", uo, [
862
- e.color ? (h(), T("span", {
861
+ return (t, n) => (_(), L("li", io, [
862
+ e.color ? (_(), L("span", {
863
863
  key: 0,
864
- class: ee([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
864
+ class: te([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
865
865
  "data-j-tooltip__item__symbol": ""
866
866
  }, null, 2)) : P("", !0),
867
- j("span", io, [
867
+ G("span", so, [
868
868
  R(t.$slots, "label", {}, void 0, !0)
869
869
  ]),
870
- j("strong", so, [
870
+ G("strong", co, [
871
871
  R(t.$slots, "value", {}, void 0, !0)
872
872
  ])
873
873
  ]));
874
874
  }
875
875
  });
876
- const vo = /* @__PURE__ */ J(co, [["__scopeId", "data-v-4f995c3c"]]), po = (e) => (Qt("data-v-57f370fa"), e = e(), qt(), e), fo = { class: "lume-tooltip__items" }, ho = {
876
+ const po = /* @__PURE__ */ Q(vo, [["__scopeId", "data-v-4f995c3c"]]), fo = (e) => (qt("data-v-57f370fa"), e = e(), en(), e), ho = { class: "lume-tooltip__items" }, mo = {
877
877
  key: 0,
878
878
  class: "lume-tooltip__break"
879
- }, mo = /* @__PURE__ */ po(() => /* @__PURE__ */ j("hr", null, null, -1)), go = [
880
- mo
881
- ], _o = /* @__PURE__ */ Z({
879
+ }, go = /* @__PURE__ */ fo(() => /* @__PURE__ */ G("hr", null, null, -1)), _o = [
880
+ go
881
+ ], yo = /* @__PURE__ */ Z({
882
882
  __name: "lume-tooltip",
883
883
  props: {
884
884
  targetElement: {
@@ -892,7 +892,7 @@ const vo = /* @__PURE__ */ J(co, [["__scopeId", "data-v-4f995c3c"]]), po = (e) =
892
892
  position: {
893
893
  type: String,
894
894
  default: "auto",
895
- validator: (e) => In.includes(e)
895
+ validator: (e) => En.includes(e)
896
896
  },
897
897
  fixedPositioning: {
898
898
  type: Boolean,
@@ -910,15 +910,15 @@ const vo = /* @__PURE__ */ J(co, [["__scopeId", "data-v-4f995c3c"]]), po = (e) =
910
910
  type: String,
911
911
  default: null
912
912
  },
913
- ...$e()
913
+ ...we()
914
914
  },
915
915
  emits: ["opened", "moved", "closed"],
916
916
  setup(e, { emit: t }) {
917
- const n = e, o = S(null), { items: r, options: a } = Q(n), u = ne(), s = S(null), { allOptions: i } = se(a), c = p(
917
+ const n = e, o = C(null), { items: r, options: a } = q(n), u = oe(), s = C(null), { allOptions: i } = ce(a), c = p(
918
918
  () => i.value.fixedPositioning ?? n.fixedPositioning
919
- ), d = p(
919
+ ), v = p(
920
920
  () => c.value ? "fixed" : "absolute"
921
- ), v = p(() => [
921
+ ), d = p(() => [
922
922
  {
923
923
  name: "computeStyles",
924
924
  options: {
@@ -931,79 +931,79 @@ const vo = /* @__PURE__ */ J(co, [["__scopeId", "data-v-4f995c3c"]]), po = (e) =
931
931
  options: { offset: [0, i.value.offset || 8] }
932
932
  },
933
933
  ...n.modifiers || []
934
- ]), y = p(
934
+ ]), h = p(
935
935
  () => i.value.showTitle !== !1 && n.title != null
936
- ), $ = p(() => De(i.value.valueFormat)), k = p(() => De(i.value.titleFormat)), A = p(
936
+ ), k = p(() => He(i.value.valueFormat)), m = p(() => He(i.value.titleFormat)), A = p(
937
937
  () => {
938
- var I;
939
- return ((I = r.value) == null ? void 0 : I.find((x) => x.isSummary)) || {
938
+ var N;
939
+ return ((N = r.value) == null ? void 0 : N.find(($) => $.isSummary)) || {
940
940
  label: i.value.summary ?? n.summary
941
941
  };
942
942
  }
943
- ), m = p(() => u.summary || A.value.label);
944
- function _() {
945
- n.targetElement && o.value && (s.value = ln(n.targetElement, o.value, {
943
+ ), f = p(() => u.summary || A.value.label);
944
+ function y() {
945
+ n.targetElement && o.value && (s.value = un(n.targetElement, o.value, {
946
946
  placement: n.position,
947
- strategy: d.value,
948
- modifiers: v.value
947
+ strategy: v.value,
948
+ modifiers: d.value
949
949
  }), t("opened", n.targetElement));
950
950
  }
951
951
  function E() {
952
952
  s.value && (s.value.destroy(), t("closed"));
953
953
  }
954
- function N() {
954
+ function w() {
955
955
  s.value && (o.value.classList.add("lume-tooltip--animated"), n.targetElement ? function() {
956
956
  s.value.state.elements.reference = n.targetElement, s.value.update(), t("moved", n.targetElement);
957
957
  }() : E());
958
958
  }
959
- return U(
959
+ return X(
960
960
  () => n.targetElement,
961
- (I, x) => {
962
- !x && I ? _() : N();
961
+ (N, $) => {
962
+ !$ && N ? y() : w();
963
963
  }
964
- ), pe(_), Lt(E), (I, x) => Kt((h(), T("div", {
964
+ ), pe(y), $t(E), (N, $) => Jt((_(), L("div", {
965
965
  ref_key: "root",
966
966
  ref: o,
967
967
  class: "lume-tooltip lume-typography--caption",
968
968
  "data-j-tooltip": ""
969
969
  }, [
970
- R(I.$slots, "default", {}, () => [
971
- R(I.$slots, "title", {}, () => [
972
- l(y) ? (h(), W(l(to), { key: 0 }, {
970
+ R(N.$slots, "default", {}, () => [
971
+ R(N.$slots, "title", {}, () => [
972
+ l(h) ? (_(), W(l(no), { key: 0 }, {
973
973
  default: V(() => [
974
- de(q(l(k)(e.title)), 1)
974
+ de(ee(l(m)(e.title)), 1)
975
975
  ]),
976
976
  _: 1
977
977
  })) : P("", !0)
978
978
  ], !0),
979
- j("ul", fo, [
980
- R(I.$slots, "summary", {}, () => [
981
- l(m) ? (h(), W(l(lo), { key: 0 }, le({
979
+ G("ul", ho, [
980
+ R(N.$slots, "summary", {}, () => [
981
+ l(f) ? (_(), W(l(uo), { key: 0 }, ue({
982
982
  default: V(() => [
983
- de(q(l(A).label) + " ", 1)
983
+ de(ee(l(A).label) + " ", 1)
984
984
  ]),
985
985
  _: 2
986
986
  }, [
987
987
  l(A).value ? {
988
988
  name: "value",
989
989
  fn: V(() => [
990
- de(q(l($)(l(A).value)), 1)
990
+ de(ee(l(k)(l(A).value)), 1)
991
991
  ]),
992
992
  key: "0"
993
993
  } : void 0
994
994
  ]), 1024)) : P("", !0)
995
995
  ], !0),
996
- l(m) ? (h(), T("li", ho, go)) : P("", !0),
997
- R(I.$slots, "items", {}, () => [
998
- (h(!0), T(K, null, z(l(r), (H) => (h(), W(l(vo), {
996
+ l(f) ? (_(), L("li", mo, _o)) : P("", !0),
997
+ R(N.$slots, "items", {}, () => [
998
+ (_(!0), L(J, null, z(l(r), (H) => (_(), W(l(po), {
999
999
  key: H.label,
1000
1000
  color: H.color
1001
1001
  }, {
1002
1002
  label: V(() => [
1003
- de(q(H.label), 1)
1003
+ de(ee(H.label), 1)
1004
1004
  ]),
1005
1005
  value: V(() => [
1006
- de(q(l($)(H.value)), 1)
1006
+ de(ee(l(k)(H.value)), 1)
1007
1007
  ]),
1008
1008
  _: 2
1009
1009
  }, 1032, ["color"]))), 128))
@@ -1011,57 +1011,57 @@ const vo = /* @__PURE__ */ J(co, [["__scopeId", "data-v-4f995c3c"]]), po = (e) =
1011
1011
  ])
1012
1012
  ], !0)
1013
1013
  ], 512)), [
1014
- [Jt, e.targetElement]
1014
+ [Qt, e.targetElement]
1015
1015
  ]);
1016
1016
  }
1017
1017
  });
1018
- const yo = /* @__PURE__ */ J(_o, [["__scopeId", "data-v-57f370fa"]]);
1019
- var fe = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(fe || {});
1020
- const ko = fe.Categorical, we = ae.Skyblue, bo = Je.SkyTeal;
1021
- function Ao(e) {
1022
- return e === fe.Divergent ? bo : we;
1023
- }
1018
+ const ko = /* @__PURE__ */ Q(yo, [["__scopeId", "data-v-57f370fa"]]);
1019
+ var me = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(me || {});
1020
+ const bo = me.Categorical, Ee = re.Skyblue, Ao = Je.SkyTeal;
1024
1021
  function To(e) {
1022
+ return e === me.Divergent ? Ao : Ee;
1023
+ }
1024
+ function Lo(e) {
1025
1025
  return Object.values(Qe).includes(e);
1026
1026
  }
1027
- function vt(e, t) {
1028
- return t === fe.Divergent ? Object.values(Je).includes(e) : Object.values({
1029
- ...ae,
1030
- ...It,
1031
- ...Et,
1027
+ function pt(e, t) {
1028
+ return t === me.Divergent ? Object.values(Je).includes(e) : Object.values({
1029
+ ...re,
1030
+ ...Nt,
1031
+ ...Dt,
1032
1032
  ...Qe
1033
1033
  }).includes(e);
1034
1034
  }
1035
- function Lo(e, t) {
1036
- const n = Object.values(ae).indexOf(e);
1037
- return bn(Object.values(ae), n > -1 ? n : 0)[t];
1038
- }
1039
1035
  function Oo(e, t) {
1036
+ const n = Object.values(re).indexOf(e);
1037
+ return An(Object.values(re), n > -1 ? n : 0)[t];
1038
+ }
1039
+ function $o(e, t) {
1040
1040
  const n = 50 + t * 10;
1041
1041
  return `${e}-${n}`;
1042
1042
  }
1043
- function $o(e, t) {
1043
+ function xo(e, t) {
1044
1044
  const n = (t + 1) * 10;
1045
1045
  return `${e}-${n}`;
1046
1046
  }
1047
- function pt(e, t, n) {
1047
+ function ft(e, t, n) {
1048
1048
  switch (t) {
1049
1049
  default:
1050
- case fe.Categorical:
1051
- return To(e) ? e : Lo(e, n);
1052
- case fe.Sequential:
1053
- return Oo(e, n);
1054
- case fe.Divergent:
1050
+ case me.Categorical:
1051
+ return Lo(e) ? e : Oo(e, n);
1052
+ case me.Sequential:
1055
1053
  return $o(e, n);
1054
+ case me.Divergent:
1055
+ return xo(e, n);
1056
1056
  }
1057
1057
  }
1058
- function xo(e, t, n = ko, o) {
1059
- return vt(e, n) ? e : (o > 4 && (he(ve.ColorLoop), o = o % 5), vt(t, n) ? pt(t, n, o) : pt(Ao(n), n, o));
1060
- }
1061
- function wo(e) {
1062
- return e.map((t) => hn(t) ? t : { value: t });
1058
+ function wo(e, t, n = bo, o) {
1059
+ return pt(e, n) ? e : (o > 4 && (ge(ve.ColorLoop), o = o % 5), pt(t, n) ? ft(t, n, o) : ft(To(n), n, o));
1063
1060
  }
1064
1061
  function Io(e) {
1062
+ return e.map((t) => mn(t) ? t : { value: t });
1063
+ }
1064
+ function Eo(e) {
1065
1065
  return e.__internal === !0;
1066
1066
  }
1067
1067
  const et = (e = null) => ({
@@ -1076,7 +1076,7 @@ const et = (e = null) => ({
1076
1076
  },
1077
1077
  color: {
1078
1078
  type: String,
1079
- default: ae.Skyblue
1079
+ default: re.Skyblue
1080
1080
  },
1081
1081
  title: {
1082
1082
  type: String,
@@ -1084,33 +1084,33 @@ const et = (e = null) => ({
1084
1084
  }
1085
1085
  });
1086
1086
  function tt(e, t, n, o, r) {
1087
- const a = Be({
1087
+ const a = Re({
1088
1088
  width: 0,
1089
1089
  height: 0
1090
- }), u = Tn(12), s = p(() => {
1091
- var d;
1092
- return e.value.length > 5 && he(ve.DatasetLength), (d = e.value) == null ? void 0 : d.map(
1093
- (v, y) => {
1094
- if (Io(v))
1095
- return v;
1096
- const $ = wo(v.values), k = xo(
1097
- v.color,
1090
+ }), u = Ln(12), s = p(() => {
1091
+ var v;
1092
+ return e.value.length > 5 && ge(ve.DatasetLength), (v = e.value) == null ? void 0 : v.map(
1093
+ (d, h) => {
1094
+ if (Eo(d))
1095
+ return d;
1096
+ const k = Io(d.values), m = wo(
1097
+ d.color,
1098
1098
  n == null ? void 0 : n.value,
1099
1099
  o == null ? void 0 : o.value.colorPalette,
1100
- y
1100
+ h
1101
1101
  );
1102
1102
  return {
1103
- ...v,
1104
- values: $,
1105
- color: k,
1103
+ ...d,
1104
+ values: k,
1105
+ color: m,
1106
1106
  __internal: !0
1107
1107
  };
1108
1108
  }
1109
1109
  );
1110
- }), i = p(() => Array.isArray(t.value) ? t.value : Ve(e.value).map((d, v) => v));
1111
- function c(d) {
1112
- const v = (r == null ? void 0 : r.value) === D.HORIZONTAL && Ve(e).length * (((o == null ? void 0 : o.value.barHeight) || st) * 2) + ((o == null ? void 0 : o.value.barHeight) || st) || d.height;
1113
- a.width = d.width, a.height = v;
1110
+ }), i = p(() => Array.isArray(t.value) ? t.value : Ve(e.value).map((v, d) => d));
1111
+ function c(v) {
1112
+ const d = (r == null ? void 0 : r.value) === D.HORIZONTAL && Ve(e).length * (((o == null ? void 0 : o.value.barHeight) || ct) * 2) + ((o == null ? void 0 : o.value.barHeight) || ct) || v.height;
1113
+ a.width = v.width, a.height = d;
1114
1114
  }
1115
1115
  return {
1116
1116
  chartID: u,
@@ -1120,7 +1120,7 @@ function tt(e, t, n, o, r) {
1120
1120
  updateSize: c
1121
1121
  };
1122
1122
  }
1123
- const Eo = () => ({
1123
+ const No = () => ({
1124
1124
  xScale: {
1125
1125
  type: Function,
1126
1126
  default: null
@@ -1130,69 +1130,69 @@ const Eo = () => ({
1130
1130
  default: null
1131
1131
  }
1132
1132
  });
1133
- function No(e, t, n, o, r) {
1134
- const a = S(null), u = S(null);
1133
+ function Do(e, t, n, o, r) {
1134
+ const a = C(null), u = C(null);
1135
1135
  function s() {
1136
1136
  const { width: i, height: c } = n;
1137
- !i && !c || !t.value || !e.value || (o.value === D.HORIZONTAL ? (a.value = ht(
1137
+ !i && !c || !t.value || !e.value || (o.value === D.HORIZONTAL ? (a.value = mt(
1138
1138
  e.value,
1139
1139
  i,
1140
1140
  o.value,
1141
1141
  r.value.startOnZero
1142
- ), u.value = ft(
1142
+ ), u.value = ht(
1143
1143
  t.value,
1144
1144
  c,
1145
1145
  o.value,
1146
1146
  r.value
1147
- )) : (a.value = ft(
1147
+ )) : (a.value = ht(
1148
1148
  t.value,
1149
1149
  i,
1150
1150
  o.value,
1151
1151
  r.value
1152
- ), u.value = ht(
1152
+ ), u.value = mt(
1153
1153
  e.value,
1154
1154
  c,
1155
1155
  o.value,
1156
1156
  r.value.startOnZero
1157
1157
  )));
1158
1158
  }
1159
- return Ot(s), { xScale: a, yScale: u };
1159
+ return xt(s), { xScale: a, yScale: u };
1160
1160
  }
1161
- function ft(e, t, n, o) {
1162
- const r = [0, t], { padding: a, paddingInner: u, paddingOuter: s } = o, i = a ?? (n === D.HORIZONTAL ? Ht : Dt);
1161
+ function ht(e, t, n, o) {
1162
+ const r = [0, t], { padding: a, paddingInner: u, paddingOuter: s } = o, i = a ?? (n === D.HORIZONTAL ? Rt : Bt);
1163
1163
  return Object.assign(
1164
- Le().range(r).paddingInner(u ?? i).paddingOuter(s ?? i).domain(e.map((c, d) => d)),
1164
+ $e().range(r).paddingInner(u ?? i).paddingOuter(s ?? i).domain(e.map((c, v) => v)),
1165
1165
  { labels: e }
1166
1166
  );
1167
1167
  }
1168
- function ht(e, t, n, o) {
1169
- const r = xt(e).filter((d) => d != null), a = [0, t];
1168
+ function mt(e, t, n, o) {
1169
+ const r = It(e).filter((v) => v != null), a = [0, t];
1170
1170
  if (r.length === 0)
1171
- return Oe().range(a).domain([0, 0]).nice();
1171
+ return xe().range(a).domain([0, 0]).nice();
1172
1172
  const u = Math.min(...r), s = o && u > 0 ? 0 : u, i = Math.max(...r), c = n === D.HORIZONTAL ? [s, i] : [i, s];
1173
- return Oe().range(a).domain(c).nice();
1173
+ return xe().range(a).domain(c).nice();
1174
1174
  }
1175
- function mt(e) {
1175
+ function gt(e) {
1176
1176
  return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
1177
1177
  }
1178
1178
  function Pe(e, t) {
1179
- return ge(e) ? e.bandwidth() / 2 + e(e.domain()[t]) : e(t);
1179
+ return ye(e) ? e.bandwidth() / 2 + e(e.domain()[t]) : e(t);
1180
1180
  }
1181
- function gt(e, t, {
1181
+ function _t(e, t, {
1182
1182
  padding: n,
1183
1183
  paddingInner: o,
1184
1184
  paddingOuter: r
1185
1185
  } = {}) {
1186
- const a = n ?? (t === D.HORIZONTAL ? Ht : Dt);
1186
+ const a = n ?? (t === D.HORIZONTAL ? Rt : Bt);
1187
1187
  return e.copy().paddingInner(o ?? a).paddingOuter(r ?? a);
1188
1188
  }
1189
- function Ct(e) {
1189
+ function jt(e) {
1190
1190
  return Object.values(D).includes(e);
1191
1191
  }
1192
- const be = (e, t = !0) => ({
1192
+ const Te = (e, t = !0) => ({
1193
1193
  ...et(e),
1194
- ...Eo(),
1195
- ...$e(),
1194
+ ...No(),
1195
+ ...we(),
1196
1196
  classList: {
1197
1197
  type: [String, Array],
1198
1198
  default: () => []
@@ -1205,17 +1205,17 @@ const be = (e, t = !0) => ({
1205
1205
  orientation: {
1206
1206
  type: String,
1207
1207
  default: D.VERTICAL,
1208
- validator: Ct
1208
+ validator: jt
1209
1209
  }
1210
1210
  } : {}
1211
- }), Do = (e) => ({
1211
+ }), Ho = (e) => ({
1212
1212
  ...et(e),
1213
- ...$e(),
1213
+ ...we(),
1214
1214
  hoveredElement: {
1215
1215
  type: [Number, String],
1216
1216
  default: null
1217
1217
  }
1218
- }), Me = () => ({
1218
+ }), Ce = () => ({
1219
1219
  data: {
1220
1220
  type: Array,
1221
1221
  required: !0
@@ -1231,7 +1231,7 @@ const be = (e, t = !0) => ({
1231
1231
  orientation: {
1232
1232
  type: String,
1233
1233
  default: D.VERTICAL,
1234
- validator: Ct
1234
+ validator: jt
1235
1235
  },
1236
1236
  xScale: {
1237
1237
  type: Function,
@@ -1257,10 +1257,10 @@ const be = (e, t = !0) => ({
1257
1257
  type: [String, Array],
1258
1258
  default: () => []
1259
1259
  }
1260
- }), Ho = { class: "lume-overlay-group" }, Bo = /* @__PURE__ */ Z({
1260
+ }), Bo = { class: "lume-overlay-group" }, Ro = /* @__PURE__ */ Z({
1261
1261
  __name: "lume-overlay-group",
1262
1262
  props: {
1263
- ...Me(),
1263
+ ...Ce(),
1264
1264
  orientation: {
1265
1265
  type: String,
1266
1266
  default: D.VERTICAL
@@ -1268,38 +1268,38 @@ const be = (e, t = !0) => ({
1268
1268
  },
1269
1269
  emits: ["click", "lume__internal--hover", "mouseover"],
1270
1270
  setup(e, { emit: t }) {
1271
- const n = e, { data: o, orientation: r, xScale: a, yScale: u } = Q(n), s = p(() => Ve(o));
1271
+ const n = e, { data: o, orientation: r, xScale: a, yScale: u } = q(n), s = p(() => Ve(o));
1272
1272
  function i(c) {
1273
- var m;
1274
- const d = r.value === D.HORIZONTAL ? u.value : a.value, v = d.domain(), y = mn(d), $ = ((m = d.paddingInner) == null ? void 0 : m.call(d)) ?? 0, k = y * $, A = ge(d) ? d(v[c]) - k / 2 : d(c) - y / 2;
1273
+ var f;
1274
+ const v = r.value === D.HORIZONTAL ? u.value : a.value, d = v.domain(), h = gn(v), k = ((f = v.paddingInner) == null ? void 0 : f.call(v)) ?? 0, m = h * k, A = ye(v) ? v(d[c]) - m / 2 : v(c) - h / 2;
1275
1275
  return r.value === D.HORIZONTAL ? {
1276
1276
  width: Math.max(...a.value.range()),
1277
- height: y,
1277
+ height: h,
1278
1278
  transform: `translate(0, ${A})`
1279
1279
  } : {
1280
- width: y,
1280
+ width: h,
1281
1281
  height: Math.max(...u.value.range()),
1282
1282
  transform: `translate(${A}, 0)`
1283
1283
  };
1284
1284
  }
1285
- return (c, d) => (h(), T("g", Ho, [
1286
- (h(!0), T(K, null, z(l(s), (v, y) => (h(), W(l(qe), C(i(y), {
1287
- key: `overlay-${y}`,
1288
- "data-j-lume-overlay-group": y,
1285
+ return (c, v) => (_(), L("g", Bo, [
1286
+ (_(!0), L(J, null, z(l(s), (d, h) => (_(), W(l(qe), M(i(h), {
1287
+ key: `overlay-${h}`,
1288
+ "data-j-lume-overlay-group": h,
1289
1289
  transition: !1,
1290
1290
  "class-list": "lume-fill--transparent",
1291
- onMouseover: ($) => t("lume__internal--hover", y),
1292
- onClick: ($) => t("click", { index: y, event: $ })
1291
+ onMouseover: (k) => t("lume__internal--hover", h),
1292
+ onClick: (k) => t("click", { index: h, event: k })
1293
1293
  }), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
1294
1294
  ]));
1295
1295
  }
1296
1296
  });
1297
- function Ro(e) {
1297
+ function So(e) {
1298
1298
  return { hasNegativeValues: p(
1299
- () => xt(e.value).some((n) => n < 0)
1299
+ () => It(e.value).some((n) => n < 0)
1300
1300
  ) };
1301
1301
  }
1302
- function Mo(e, t, n, o) {
1302
+ function Co(e, t, n, o) {
1303
1303
  const r = p(
1304
1304
  () => o.value === D.HORIZONTAL
1305
1305
  ), a = p(
@@ -1324,19 +1324,19 @@ function Mo(e, t, n, o) {
1324
1324
  transform: s.value
1325
1325
  })) };
1326
1326
  }
1327
- function So(e) {
1327
+ function Mo(e) {
1328
1328
  return e.reduce((t, n) => n.values.map((o, r) => t[r] ? o.value > t[r] ? o.value : t[r] : o.value ?? 0), []);
1329
1329
  }
1330
- function Co(e) {
1330
+ function Go(e) {
1331
1331
  return e.reduce((t, n) => n.values.map((o, r) => {
1332
1332
  const a = o.value == null || o.value < 0 ? 0 : o.value;
1333
1333
  return t[r] ? t[r] + a : a;
1334
1334
  }), []);
1335
1335
  }
1336
- const _t = {
1337
- "stacked-bar": Co
1336
+ const yt = {
1337
+ "stacked-bar": Go
1338
1338
  };
1339
- function jt(e, t, n, o, r, a, u) {
1339
+ function Vt(e, t, n, o, r, a, u) {
1340
1340
  const s = p(
1341
1341
  () => {
1342
1342
  var c;
@@ -1344,13 +1344,13 @@ function jt(e, t, n, o, r, a, u) {
1344
1344
  }
1345
1345
  );
1346
1346
  function i(c) {
1347
- const d = u != null && u.value && _t[u.value] ? _t[u.value](c) : So(c);
1348
- e.value = d.map((v, y) => ({
1349
- cx: (r == null ? void 0 : r.value) === D.HORIZONTAL ? n.value(v) : Pe(n.value, y),
1350
- cy: (r == null ? void 0 : r.value) === D.HORIZONTAL ? Pe(o.value, y) : o.value(v)
1347
+ const v = u != null && u.value && yt[u.value] ? yt[u.value](c) : Mo(c);
1348
+ e.value = v.map((d, h) => ({
1349
+ cx: (r == null ? void 0 : r.value) === D.HORIZONTAL ? n.value(d) : Pe(n.value, h),
1350
+ cy: (r == null ? void 0 : r.value) === D.HORIZONTAL ? Pe(o.value, h) : o.value(d)
1351
1351
  }));
1352
1352
  }
1353
- return U(
1353
+ return X(
1354
1354
  [n, o],
1355
1355
  () => {
1356
1356
  n.value && o.value && (a != null && a.value) && s.value && i(a.value);
@@ -1359,7 +1359,7 @@ function jt(e, t, n, o, r, a, u) {
1359
1359
  ), { shouldGenerateTooltipAnchors: s, updateTooltipAnchorAttributes: i };
1360
1360
  }
1361
1361
  function jo() {
1362
- const e = Be({
1362
+ const e = Re({
1363
1363
  opened: !1,
1364
1364
  targetElement: null
1365
1365
  });
@@ -1369,19 +1369,19 @@ function jo() {
1369
1369
  e.opened = !1, e.targetElement = null;
1370
1370
  } };
1371
1371
  }
1372
- function Go(e) {
1372
+ function Vo(e) {
1373
1373
  return { getTooltipItems: p(
1374
1374
  () => (n) => e.value.map(({ color: o, label: r, values: a }) => {
1375
1375
  var u, s, i;
1376
1376
  return {
1377
1377
  color: ((u = a[n]) == null ? void 0 : u.color) || o,
1378
1378
  label: r,
1379
- value: ((s = a[n]) == null ? void 0 : s.label) ?? ((i = a[n]) == null ? void 0 : i.value) ?? Nt
1379
+ value: ((s = a[n]) == null ? void 0 : s.label) ?? ((i = a[n]) == null ? void 0 : i.value) ?? Ht
1380
1380
  };
1381
1381
  })
1382
1382
  ) };
1383
1383
  }
1384
- const ze = 16, Ze = 8, We = 28, Ue = 24, me = {
1384
+ const ze = 16, Ze = 8, We = 28, Ue = 24, _e = {
1385
1385
  VERTICAL: {
1386
1386
  top: ze,
1387
1387
  right: Ze,
@@ -1395,217 +1395,217 @@ const ze = 16, Ze = 8, We = 28, Ue = 24, me = {
1395
1395
  left: Ue
1396
1396
  }
1397
1397
  };
1398
- function Vo(e) {
1398
+ function Fo(e) {
1399
1399
  return !e || e === "auto" || e.top == null || e.top === "auto" ? ze : e.top;
1400
1400
  }
1401
- function Fo(e) {
1401
+ function Po(e) {
1402
1402
  return !e || e === "auto" || e.right == null || e.right === "auto" ? Ze : e.right;
1403
1403
  }
1404
- function Po(e, t) {
1404
+ function zo(e, t) {
1405
1405
  return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? t || We : e.bottom;
1406
1406
  }
1407
- function zo(e, t) {
1407
+ function Zo(e, t) {
1408
1408
  return !e || e === "auto" || e.left == null || e.left === "auto" ? t || Ue : e.left;
1409
1409
  }
1410
- const Zo = { class: "lume-chart__header" }, Wo = { class: "lume-chart__header-section" }, Uo = {
1410
+ const Wo = { class: "lume-chart__header" }, Uo = { class: "lume-chart__header-section" }, Xo = {
1411
1411
  key: 0,
1412
1412
  class: "lume-chart__title lume-chart-title lume-typography--display"
1413
- }, Xo = { class: "lume-chart__controls" }, Yo = { class: "lume-chart__header-section" }, Ko = {
1413
+ }, Yo = { class: "lume-chart__controls" }, Ko = { class: "lume-chart__header-section" }, Jo = {
1414
1414
  key: 0,
1415
1415
  class: "lume-chart__axis-title lume-axis-title lume-typography--body"
1416
- }, Jo = { key: 3 }, Qo = ["r"], qo = {
1416
+ }, Qo = { key: 3 }, qo = ["r"], ea = {
1417
1417
  key: 0,
1418
1418
  class: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title lume-typography--body"
1419
- }, ea = /* @__PURE__ */ Z({
1419
+ }, ta = /* @__PURE__ */ Z({
1420
1420
  __name: "lume-chart",
1421
1421
  props: {
1422
- ...be(),
1422
+ ...Te(),
1423
1423
  chartType: {
1424
1424
  type: String,
1425
1425
  default: null
1426
1426
  }
1427
1427
  },
1428
1428
  setup(e, { emit: t }) {
1429
- const n = e, o = ne(), { data: r, labels: a, color: u, options: s, orientation: i, chartType: c } = Q(n), d = S(-1), v = S(null), y = S(null), $ = S([]), k = S(0), A = S(0), { allOptions: m } = se(s), { internalData: _, computedLabels: E, containerSize: N, updateSize: I, chartID: x } = tt(r, a, u, m, i), { xScale: H, yScale: M } = No(
1430
- _,
1429
+ const n = e, o = oe(), { data: r, labels: a, color: u, options: s, orientation: i, chartType: c } = q(n), v = C(-1), d = C(null), h = C(null), k = C([]), m = C(0), A = C(0), { allOptions: f } = ce(s), { internalData: y, computedLabels: E, containerSize: w, updateSize: N, chartID: $ } = tt(r, a, u, f, i), { xScale: H, yScale: S } = Do(
1430
+ y,
1431
1431
  E,
1432
- N,
1432
+ w,
1433
1433
  i,
1434
- m
1435
- ), X = p(() => ({
1436
- top: Vo(m.value.margins),
1437
- right: Fo(m.value.margins),
1438
- bottom: Po(m.value.margins, k.value),
1439
- left: zo(m.value.margins, A.value)
1440
- })), Y = p(() => {
1434
+ f
1435
+ ), Y = p(() => ({
1436
+ top: Fo(f.value.margins),
1437
+ right: Po(f.value.margins),
1438
+ bottom: zo(f.value.margins, m.value),
1439
+ left: Zo(f.value.margins, A.value)
1440
+ })), K = p(() => {
1441
1441
  var O;
1442
- return n.xScale ? mt(n.xScale) ? n.xScale : (O = n.xScale) == null ? void 0 : O.call(n, _.value, a.value, N) : H.value;
1443
- }), G = p(() => {
1442
+ return n.xScale ? gt(n.xScale) ? n.xScale : (O = n.xScale) == null ? void 0 : O.call(n, y.value, a.value, w) : H.value;
1443
+ }), F = p(() => {
1444
1444
  var O;
1445
- return n.yScale ? mt(n.yScale) ? n.yScale : (O = n.yScale) == null ? void 0 : O.call(n, _.value, a.value, N) : M.value;
1446
- }), te = p(() => ({
1447
- ...m.value.xAxisOptions,
1445
+ return n.yScale ? gt(n.yScale) ? n.yScale : (O = n.yScale) == null ? void 0 : O.call(n, y.value, a.value, w) : S.value;
1446
+ }), ne = p(() => ({
1447
+ ...f.value.xAxisOptions,
1448
1448
  withHover: i.value === D.VERTICAL
1449
- })), Te = p(() => ({
1450
- ...m.value.yAxisOptions,
1449
+ })), be = p(() => ({
1450
+ ...f.value.yAxisOptions,
1451
1451
  withHover: i.value === D.HORIZONTAL
1452
- })), ce = p(() => {
1452
+ })), fe = p(() => {
1453
1453
  var O;
1454
- return (O = m.value.xAxisOptions) == null ? void 0 : O.title;
1455
- }), ye = p(() => {
1454
+ return (O = f.value.xAxisOptions) == null ? void 0 : O.title;
1455
+ }), he = p(() => {
1456
1456
  var O;
1457
- return (O = m.value.yAxisOptions) == null ? void 0 : O.title;
1458
- }), g = p(() => {
1457
+ return (O = f.value.yAxisOptions) == null ? void 0 : O.title;
1458
+ }), B = p(() => {
1459
1459
  var O;
1460
- return ((O = m.value.xAxisOptions) == null ? void 0 : O.withTitle) !== !1 && ce.value;
1461
- }), L = p(() => {
1460
+ return ((O = f.value.xAxisOptions) == null ? void 0 : O.withTitle) !== !1 && fe.value;
1461
+ }), b = p(() => {
1462
1462
  var O;
1463
- return ((O = m.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 && ye.value;
1464
- }), f = p(
1463
+ return ((O = f.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 && he.value;
1464
+ }), I = p(
1465
1465
  () => r.value.every((O) => !O.values.length)
1466
- ), B = p(() => {
1467
- const O = [], { noBaseScales: b } = m.value;
1468
- return b || O.push(() => !!(Y.value && G.value)), O.every((w) => w() === !0);
1469
- }), { hasNegativeValues: F } = Ro(_), { negativeBarAttributes: re } = Mo(
1470
- N,
1471
- Y,
1472
- G,
1466
+ ), g = p(() => {
1467
+ const O = [], { noBaseScales: T } = f.value;
1468
+ return T || O.push(() => !!(K.value && F.value)), O.every((x) => x() === !0);
1469
+ }), { hasNegativeValues: j } = So(y), { negativeBarAttributes: U } = Co(
1470
+ w,
1471
+ K,
1472
+ F,
1473
1473
  i
1474
- ), { shouldGenerateTooltipAnchors: Se } = jt(
1475
- $,
1476
- m,
1477
- Y,
1478
- G,
1474
+ ), { shouldGenerateTooltipAnchors: le } = Vt(
1475
+ k,
1476
+ f,
1477
+ K,
1478
+ F,
1479
1479
  i,
1480
- _,
1480
+ y,
1481
1481
  c
1482
- ), { tooltipConfig: Ie, showTooltip: Ee, hideTooltip: Wt } = jo(), { getTooltipItems: ot } = Go(_), Ut = p(
1483
- () => m.value.withTooltip !== !1 && Ie.opened
1484
- ), at = p(
1482
+ ), { tooltipConfig: Oe, showTooltip: ot, hideTooltip: Ne } = jo(), { getTooltipItems: at } = Vo(y), Xt = p(
1483
+ () => f.value.withTooltip !== !1 && Oe.opened
1484
+ ), rt = p(
1485
1485
  () => {
1486
1486
  var O;
1487
- return ((O = m.value.tooltipOptions) == null ? void 0 : O.position) || "top";
1487
+ return ((O = f.value.tooltipOptions) == null ? void 0 : O.position) || "top";
1488
1488
  }
1489
1489
  );
1490
- function Ne(O) {
1491
- var b;
1492
- if (O !== d.value && (m.value.withHover !== !1 && (d.value = O), m.value.withTooltip !== !1)) {
1493
- const w = (b = m.value.tooltipOptions) != null && b.targetElement ? m.value.tooltipOptions.targetElement === "self" ? y.value.$el : m.value.tooltipOptions.targetElement : v.value[O];
1494
- Ee(w);
1490
+ function De(O) {
1491
+ var T;
1492
+ if (O !== v.value && (f.value.withHover !== !1 && (v.value = O), f.value.withTooltip !== !1)) {
1493
+ const x = (T = f.value.tooltipOptions) != null && T.targetElement ? f.value.tooltipOptions.targetElement === "self" ? h.value.$el : f.value.tooltipOptions.targetElement : d.value[O];
1494
+ ot(x);
1495
1495
  }
1496
1496
  }
1497
- function rt(O) {
1497
+ function lt(O) {
1498
1498
  if (O > r.value[0].values.length - 1) {
1499
- he(ve.InvalidHoveredIndex);
1499
+ ge(ve.InvalidHoveredIndex);
1500
1500
  return;
1501
1501
  }
1502
- Ne(O);
1502
+ De(O);
1503
1503
  }
1504
- function Xt() {
1505
- Wt(), d.value = -1, t("chart-mouseleave");
1504
+ function Yt() {
1505
+ Ne(), v.value = -1, t("chart-mouseleave");
1506
1506
  }
1507
- function lt({ index: O, value: b, event: w }) {
1508
- O !== null && Ne(O), t("axis-mouseenter", { index: O, value: b, event: w });
1507
+ function ut({ index: O, value: T, event: x }) {
1508
+ O !== null && De(O), t("axis-mouseenter", { index: O, value: T, event: x });
1509
1509
  }
1510
- function ut({ index: O, value: b, event: w }) {
1511
- t("axis-click", { index: O, value: b, event: w });
1510
+ function it({ index: O, value: T, event: x }) {
1511
+ t("axis-click", { index: O, value: T, event: x });
1512
1512
  }
1513
- return U(
1513
+ return X(
1514
1514
  r,
1515
- (O, b) => t("data-changed", { newValue: O, oldValue: b })
1516
- ), U(
1515
+ (O, T) => t("data-changed", { newValue: O, oldValue: T })
1516
+ ), X(
1517
1517
  a,
1518
- (O, b) => t("labels-changed", { newValue: O, oldValue: b })
1519
- ), U(f, (O) => O && he(ve.Empty), { immediate: !0 }), U(() => n.hoveredIndex, rt), U(
1520
- $,
1518
+ (O, T) => t("labels-changed", { newValue: O, oldValue: T })
1519
+ ), X(I, (O) => O && ge(ve.Empty), { immediate: !0 }), X(() => n.hoveredIndex, lt), X(
1520
+ k,
1521
1521
  (O) => {
1522
- O && n.hoveredIndex != null && d.value === -1 && rt(n.hoveredIndex);
1522
+ O && n.hoveredIndex != null && v.value === -1 && lt(n.hoveredIndex);
1523
1523
  },
1524
1524
  { flush: "post" }
1525
1525
  ), pe(() => {
1526
1526
  t("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
1527
- }), Ce("chartID", x), Ce("isEmpty", f), Ce("tooltipAnchorAttributes", $), (O, b) => (h(), W(l(Yn), {
1528
- id: `lume-chart_${l(x)}`,
1527
+ }), Me("chartID", $), Me("isEmpty", I), Me("tooltipAnchorAttributes", k), (O, T) => (_(), W(l(Kn), {
1528
+ id: `lume-chart_${l($)}`,
1529
1529
  ref_key: "chartContainer",
1530
- ref: y,
1531
- margins: l(X),
1532
- "container-size": l(N),
1533
- "no-min-size": l(m).noMinSize,
1534
- "transparent-background": l(m).transparentBackground,
1530
+ ref: h,
1531
+ margins: l(Y),
1532
+ "container-size": l(w),
1533
+ "no-min-size": l(f).noMinSize,
1534
+ "transparent-background": l(f).transparentBackground,
1535
1535
  "data-j-lume-chart": "",
1536
- onResize: l(I),
1537
- onClick: b[22] || (b[22] = (w) => t("chart-click", w)),
1538
- onMouseenter: b[23] || (b[23] = (w) => t("chart-mouseenter", w)),
1539
- onMouseleave: Xt
1536
+ onResize: l(N),
1537
+ onClick: T[22] || (T[22] = (x) => t("chart-click", x)),
1538
+ onMouseenter: T[23] || (T[23] = (x) => t("chart-mouseenter", x)),
1539
+ onMouseleave: Yt
1540
1540
  }, {
1541
1541
  header: V(() => [
1542
- j("div", Zo, [
1543
- j("div", Wo, [
1544
- O.title ? (h(), T("h1", Uo, q(O.title), 1)) : P("", !0),
1545
- j("div", Xo, [
1542
+ G("div", Wo, [
1543
+ G("div", Uo, [
1544
+ O.title ? (_(), L("h1", Xo, ee(O.title), 1)) : P("", !0),
1545
+ G("div", Yo, [
1546
1546
  R(O.$slots, "controls", {}, void 0, !0)
1547
1547
  ])
1548
1548
  ]),
1549
- j("div", Yo, [
1550
- l(L) ? (h(), T("h3", Ko, q(l(ye)), 1)) : P("", !0),
1551
- R(O.$slots, "legend", { data: l(_) }, () => [
1552
- l(m).withLegend !== !1 && l(m).legendPosition !== "bottom" ? (h(), W(l(dt), {
1549
+ G("div", Ko, [
1550
+ l(b) ? (_(), L("h3", Jo, ee(l(he)), 1)) : P("", !0),
1551
+ R(O.$slots, "legend", { data: l(y) }, () => [
1552
+ l(f).withLegend !== !1 && l(f).legendPosition !== "bottom" ? (_(), W(l(vt), {
1553
1553
  key: 0,
1554
- data: l(_),
1554
+ data: l(y),
1555
1555
  class: "lume-chart__legend",
1556
1556
  "data-j-lume-chart__legend": "",
1557
- onClick: b[0] || (b[0] = (w) => t("legend-click", w)),
1558
- onMouseenter: b[1] || (b[1] = (w) => t("legend-mouseenter", w)),
1559
- onMouseleave: b[2] || (b[2] = (w) => t("legend-mouseleave"))
1557
+ onClick: T[0] || (T[0] = (x) => t("legend-click", x)),
1558
+ onMouseenter: T[1] || (T[1] = (x) => t("legend-mouseenter", x)),
1559
+ onMouseleave: T[2] || (T[2] = (x) => t("legend-mouseleave"))
1560
1560
  }, null, 8, ["data"])) : P("", !0)
1561
1561
  ], !0)
1562
1562
  ])
1563
1563
  ])
1564
1564
  ]),
1565
1565
  footer: V(() => [
1566
- l(g) ? (h(), T("h3", qo, q(l(ce)), 1)) : P("", !0),
1567
- l(m).withLegend !== !1 && l(m).legendPosition == "bottom" ? (h(), W(l(dt), {
1566
+ l(B) ? (_(), L("h3", ea, ee(l(fe)), 1)) : P("", !0),
1567
+ l(f).withLegend !== !1 && l(f).legendPosition == "bottom" ? (_(), W(l(vt), {
1568
1568
  key: 1,
1569
- data: l(_),
1569
+ data: l(y),
1570
1570
  class: "lume-chart__legend lume-chart__legend--bottom",
1571
1571
  "data-j-lume-chart__legend": "",
1572
- onClick: b[16] || (b[16] = (w) => t("legend-click", w)),
1573
- onMouseenter: b[17] || (b[17] = (w) => t("legend-mouseenter", w)),
1574
- onMouseleave: b[18] || (b[18] = (w) => t("legend-mouseleave"))
1572
+ onClick: T[16] || (T[16] = (x) => t("legend-click", x)),
1573
+ onMouseenter: T[17] || (T[17] = (x) => t("legend-mouseenter", x)),
1574
+ onMouseleave: T[18] || (T[18] = (x) => t("legend-mouseleave"))
1575
1575
  }, null, 8, ["data"])) : P("", !0)
1576
1576
  ]),
1577
1577
  extra: V(() => [
1578
- R(O.$slots, "tooltip", C(l(Ie), {
1579
- data: l(_),
1578
+ R(O.$slots, "tooltip", M(l(Oe), {
1579
+ data: l(y),
1580
1580
  labels: l(E),
1581
- title: l(E)[d.value],
1582
- items: l(ot)(d.value),
1583
- position: l(at),
1584
- withTooltip: l(m).withTooltip !== !1,
1585
- hoveredIndex: d.value,
1586
- options: l(m).tooltipOptions
1581
+ title: l(E)[v.value],
1582
+ items: l(at)(v.value),
1583
+ position: l(rt),
1584
+ withTooltip: l(f).withTooltip !== !1,
1585
+ hoveredIndex: v.value,
1586
+ options: l(f).tooltipOptions
1587
1587
  }), () => [
1588
- l(Ut) ? (h(), W(l(yo), C({ key: 0 }, l(Ie), {
1589
- position: l(at),
1590
- title: l(E)[d.value],
1591
- items: l(ot)(d.value),
1592
- options: l(m).tooltipOptions,
1588
+ l(Xt) ? (_(), W(l(ko), M({ key: 0 }, l(Oe), {
1589
+ position: l(rt),
1590
+ title: l(E)[v.value],
1591
+ items: l(at)(v.value),
1592
+ options: l(f).tooltipOptions,
1593
1593
  "data-j-lume-chart__tooltip": "",
1594
- onOpened: b[19] || (b[19] = (w) => t("tooltip-opened", {
1595
- index: d.value,
1596
- targetElement: w
1594
+ onOpened: T[19] || (T[19] = (x) => t("tooltip-opened", {
1595
+ index: v.value,
1596
+ targetElement: x
1597
1597
  })),
1598
- onMoved: b[20] || (b[20] = (w) => t("tooltip-moved", {
1599
- index: d.value,
1600
- targetElement: w
1598
+ onMoved: T[20] || (T[20] = (x) => t("tooltip-moved", {
1599
+ index: v.value,
1600
+ targetElement: x
1601
1601
  })),
1602
- onClosed: b[21] || (b[21] = (w) => t("tooltip-closed"))
1602
+ onClosed: T[21] || (T[21] = (x) => t("tooltip-closed"))
1603
1603
  }), {
1604
1604
  default: V(() => [
1605
1605
  R(O.$slots, "tooltip-content", {
1606
- data: l(_),
1606
+ data: l(y),
1607
1607
  labels: l(E),
1608
- hoveredIndex: d.value
1608
+ hoveredIndex: v.value
1609
1609
  }, void 0, !0)
1610
1610
  ]),
1611
1611
  _: 3
@@ -1613,87 +1613,87 @@ const Zo = { class: "lume-chart__header" }, Wo = { class: "lume-chart__header-se
1613
1613
  ], !0)
1614
1614
  ]),
1615
1615
  default: V(() => [
1616
- l(B) ? (h(), T(K, { key: 0 }, [
1617
- l(F) ? (h(), W(l(qe), C({ key: 0 }, l(re), {
1616
+ l(g) ? (_(), L(J, { key: 0 }, [
1617
+ l(j) ? (_(), W(l(qe), M({ key: 0 }, l(U), {
1618
1618
  "class-list": "lume-fill--negative",
1619
1619
  transition: !1,
1620
1620
  "data-j-lume-chart__negative-values": ""
1621
1621
  }), null, 16)) : P("", !0),
1622
- l(m).withAxes !== !1 ? R(O.$slots, "axes", {
1622
+ l(f).withAxes !== !1 ? R(O.$slots, "axes", {
1623
1623
  key: 1,
1624
- xScale: l(Y),
1625
- yScale: l(G),
1626
- containerSize: l(N),
1627
- options: l(m),
1628
- hoveredIndex: d.value
1624
+ xScale: l(K),
1625
+ yScale: l(F),
1626
+ containerSize: l(w),
1627
+ options: l(f),
1628
+ hoveredIndex: v.value
1629
1629
  }, () => [
1630
- oe(l(ct), {
1630
+ ae(l(dt), {
1631
1631
  type: "x",
1632
- scale: l(Y),
1633
- "container-size": l(N),
1634
- options: l(te),
1635
- "hovered-index": d.value,
1632
+ scale: l(K),
1633
+ "container-size": l(w),
1634
+ options: l(ne),
1635
+ "hovered-index": v.value,
1636
1636
  orientation: l(i),
1637
1637
  "data-j-lume-chart__x-axis": "",
1638
- onClick: ut,
1639
- onMouseenter: lt,
1640
- onMouseleave: b[3] || (b[3] = (w) => t("axis-mouseleave")),
1641
- "onLume__internal-AxisSize": b[4] || (b[4] = (w) => k.value = w)
1638
+ onClick: it,
1639
+ onMouseenter: ut,
1640
+ onMouseleave: T[3] || (T[3] = (x) => t("axis-mouseleave")),
1641
+ "onLume__internal-AxisSize": T[4] || (T[4] = (x) => m.value = x)
1642
1642
  }, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
1643
- oe(l(ct), {
1643
+ ae(l(dt), {
1644
1644
  type: "y",
1645
- scale: l(G),
1646
- "container-size": l(N),
1647
- options: l(Te),
1648
- "hovered-index": d.value,
1645
+ scale: l(F),
1646
+ "container-size": l(w),
1647
+ options: l(be),
1648
+ "hovered-index": v.value,
1649
1649
  orientation: l(i),
1650
1650
  "data-j-lume-chart__y-axis": "",
1651
- onClick: ut,
1652
- onMouseenter: lt,
1653
- onMouseleave: b[5] || (b[5] = (w) => t("axis-mouseleave")),
1654
- "onLume__internal-AxisSize": b[6] || (b[6] = (w) => A.value = w)
1651
+ onClick: it,
1652
+ onMouseenter: ut,
1653
+ onMouseleave: T[5] || (T[5] = (x) => t("axis-mouseleave")),
1654
+ "onLume__internal-AxisSize": T[6] || (T[6] = (x) => A.value = x)
1655
1655
  }, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
1656
1656
  ], !0) : P("", !0),
1657
- l(m).withHover !== !1 ? (h(), W(l(Bo), {
1657
+ l(f).withHover !== !1 ? (_(), W(l(Ro), {
1658
1658
  key: 2,
1659
- data: l(_),
1659
+ data: l(y),
1660
1660
  orientation: l(i),
1661
- "x-scale": l(Y),
1662
- "y-scale": l(G),
1661
+ "x-scale": l(K),
1662
+ "y-scale": l(F),
1663
1663
  "data-j-lume-chart__overlay-group": "",
1664
- "onLume__internal-Hover": Ne
1664
+ "onLume__internal-Hover": De
1665
1665
  }, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : P("", !0),
1666
- l(Se) ? (h(), T("g", Jo, [
1667
- (h(!0), T(K, null, z($.value, (w, Yt) => (h(), T("circle", C(w, {
1666
+ l(le) ? (_(), L("g", Qo, [
1667
+ (_(!0), L(J, null, z(k.value, (x, Kt) => (_(), L("circle", M(x, {
1668
1668
  ref_for: !0,
1669
1669
  ref_key: "tooltipAnchor",
1670
- ref: v,
1671
- key: `anchor_${Yt}`,
1672
- r: l(wn),
1670
+ ref: d,
1671
+ key: `anchor_${Kt}`,
1672
+ r: l(In),
1673
1673
  class: "lume-fill--transparent"
1674
- }), null, 16, Qo))), 128))
1674
+ }), null, 16, qo))), 128))
1675
1675
  ])) : P("", !0),
1676
1676
  R(O.$slots, "groups", {
1677
- data: l(_),
1677
+ data: l(y),
1678
1678
  labels: l(E),
1679
- options: l(m),
1679
+ options: l(f),
1680
1680
  orientation: l(i),
1681
- xScale: l(Y),
1682
- yScale: l(G),
1683
- hoveredIndex: d.value,
1684
- containerSize: l(N),
1685
- transition: l(m).withTransition !== !1,
1681
+ xScale: l(K),
1682
+ yScale: l(F),
1683
+ hoveredIndex: v.value,
1684
+ containerSize: l(w),
1685
+ transition: l(f).withTransition !== !1,
1686
1686
  classList: O.classList,
1687
- onNodeClick: b[7] || (b[7] = (w) => t("node-click", w)),
1688
- onNodeMouseenter: b[8] || (b[8] = (w) => t("node-mouseenter", w)),
1689
- onNodeMouseleave: b[9] || (b[9] = (w) => t("node-mouseleave", w)),
1690
- onLinkClick: b[10] || (b[10] = (w) => t("link-click", w)),
1691
- onLinkMouseenter: b[11] || (b[11] = (w) => t("link-mouseenter", w)),
1692
- onLinkMouseleave: b[12] || (b[12] = (w) => t("link-mouseleave", w)),
1693
- onBarClick: b[13] || (b[13] = (w) => t("bar-click", w)),
1694
- onLineClick: b[14] || (b[14] = (w) => t("line-click", w)),
1695
- onPointClick: b[15] || (b[15] = (w) => t("point-click", w)),
1696
- "onLume__internal-Hover": Ne
1687
+ onNodeClick: T[7] || (T[7] = (x) => t("node-click", x)),
1688
+ onNodeMouseenter: T[8] || (T[8] = (x) => t("node-mouseenter", x)),
1689
+ onNodeMouseleave: T[9] || (T[9] = (x) => t("node-mouseleave", x)),
1690
+ onLinkClick: T[10] || (T[10] = (x) => t("link-click", x)),
1691
+ onLinkMouseenter: T[11] || (T[11] = (x) => t("link-mouseenter", x)),
1692
+ onLinkMouseleave: T[12] || (T[12] = (x) => t("link-mouseleave", x)),
1693
+ onBarClick: T[13] || (T[13] = (x) => t("bar-click", x)),
1694
+ onLineClick: T[14] || (T[14] = (x) => t("line-click", x)),
1695
+ onPointClick: T[15] || (T[15] = (x) => t("point-click", x)),
1696
+ "onLume__internal-Hover": De
1697
1697
  }, void 0, !0)
1698
1698
  ], 64)) : P("", !0)
1699
1699
  ]),
@@ -1701,36 +1701,36 @@ const Zo = { class: "lume-chart__header" }, Wo = { class: "lume-chart__header-se
1701
1701
  }, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
1702
1702
  }
1703
1703
  });
1704
- const Ae = /* @__PURE__ */ J(ea, [["__scopeId", "data-v-c4b73860"]]), ta = ["dy"], na = /* @__PURE__ */ Z({
1704
+ const Le = /* @__PURE__ */ Q(ta, [["__scopeId", "data-v-c4b73860"]]), na = ["dy"], oa = /* @__PURE__ */ Z({
1705
1705
  __name: "lume-alluvial-node-label",
1706
1706
  props: {
1707
1707
  bottom: { type: Boolean, default: !1 }
1708
1708
  },
1709
1709
  setup(e) {
1710
- return (t, n) => (h(), T("text", {
1710
+ return (t, n) => (_(), L("text", {
1711
1711
  class: "lume-alluvial-group__node-label",
1712
1712
  dy: e.bottom ? "1.2em" : ""
1713
1713
  }, [
1714
1714
  R(t.$slots, "default", {}, void 0, !0)
1715
- ], 8, ta));
1715
+ ], 8, na));
1716
1716
  }
1717
1717
  });
1718
- const oa = /* @__PURE__ */ J(na, [["__scopeId", "data-v-d2a7cb8e"]]), aa = ["dy"], ra = /* @__PURE__ */ Z({
1718
+ const aa = /* @__PURE__ */ Q(oa, [["__scopeId", "data-v-d2a7cb8e"]]), ra = ["dy"], la = /* @__PURE__ */ Z({
1719
1719
  __name: "lume-alluvial-node-value",
1720
1720
  props: {
1721
1721
  bottom: { type: Boolean, default: !0 }
1722
1722
  },
1723
1723
  setup(e) {
1724
- return (t, n) => (h(), T("text", {
1724
+ return (t, n) => (_(), L("text", {
1725
1725
  class: "lume-alluvial-group__node-value",
1726
1726
  dy: e.bottom ? "1.2em" : ""
1727
1727
  }, [
1728
1728
  R(t.$slots, "default", {}, void 0, !0)
1729
- ], 8, aa));
1729
+ ], 8, ra));
1730
1730
  }
1731
1731
  });
1732
- const la = /* @__PURE__ */ J(ra, [["__scopeId", "data-v-002e2887"]]);
1733
- function yt(e, t) {
1732
+ const ua = /* @__PURE__ */ Q(la, [["__scopeId", "data-v-002e2887"]]);
1733
+ function kt(e, t) {
1734
1734
  return {
1735
1735
  x0: 0 + (t ? t.left : 0),
1736
1736
  y0: 0 + (t ? t.top : 0),
@@ -1738,32 +1738,32 @@ function yt(e, t) {
1738
1738
  y1: e.height - (t ? t.bottom : 0)
1739
1739
  };
1740
1740
  }
1741
- function ua(e) {
1742
- const t = S(yt(e));
1741
+ function ia(e) {
1742
+ const t = C(kt(e));
1743
1743
  function n(o) {
1744
- t.value = yt(e, o);
1744
+ t.value = kt(e, o);
1745
1745
  }
1746
1746
  return { extents: t, updateExtents: n };
1747
1747
  }
1748
- var Gt = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(Gt || {});
1749
- const ia = "[lume] ";
1750
- function sa(e, t, n = !0) {
1751
- n && $t() || console.error(ia + "Error: " + e, t);
1748
+ var Ft = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(Ft || {});
1749
+ const sa = "[lume] ";
1750
+ function ca(e, t, n = !0) {
1751
+ n && wt() || console.error(sa + "Error: " + e, t);
1752
1752
  }
1753
- const kt = 8, ca = 8, da = 20, va = 200;
1754
- function ke(e) {
1753
+ const bt = 8, da = 8, va = 20, pa = 200;
1754
+ function Ae(e) {
1755
1755
  return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
1756
1756
  }
1757
- function pa(e, t) {
1757
+ function fa(e, t) {
1758
1758
  return t.nodes.find((n) => n.id === e);
1759
1759
  }
1760
- function fa(e, t) {
1760
+ function ha(e, t) {
1761
1761
  return t.links.find((n) => n.id === e);
1762
1762
  }
1763
- function Vt(e) {
1763
+ function Pt(e) {
1764
1764
  return !!(e.sourceLinks && e.targetLinks);
1765
1765
  }
1766
- function ha(e, t) {
1766
+ function ma(e, t) {
1767
1767
  if (!t)
1768
1768
  return;
1769
1769
  const n = e.nodes.filter((u) => u.targetLinks.length === 0).map((u) => `${u.id}`), o = e.nodes.filter((u) => u.sourceLinks.length === 0).map((u) => `${u.id}`), r = t.filter((u) => n.includes(u.dataset.id)).reduce(
@@ -1780,41 +1780,41 @@ function ha(e, t) {
1780
1780
  bottom: 0
1781
1781
  };
1782
1782
  }
1783
- function ma(e) {
1783
+ function ga(e) {
1784
1784
  return e.map((t) => ({
1785
1785
  x: t.x0,
1786
1786
  y: t.y0,
1787
1787
  width: t.x1 - t.x0,
1788
1788
  height: t.y1 - t.y0,
1789
1789
  textTransform: {
1790
- x: t.depth > 0 ? t.x1 + kt : t.x0 - kt,
1790
+ x: t.depth > 0 ? t.x1 + bt : t.x0 - bt,
1791
1791
  y: (t.y1 + t.y0) / 2
1792
1792
  },
1793
1793
  node: t
1794
1794
  }));
1795
1795
  }
1796
- function ga(e) {
1797
- return [e.source.x1, e.y0];
1798
- }
1799
1796
  function _a(e) {
1800
- return [e.target.x0, e.y1];
1797
+ return [e.source.x1, e.y0];
1801
1798
  }
1802
1799
  function ya(e) {
1803
- return e.curveFunction ? on(e.curveFunction).source(ga).target(_a) : un();
1800
+ return [e.target.x0, e.y1];
1804
1801
  }
1805
1802
  function ka(e) {
1803
+ return e.curveFunction ? an(e.curveFunction).source(_a).target(ya) : sn();
1804
+ }
1805
+ function ba(e) {
1806
1806
  return e.map((t) => {
1807
1807
  var n;
1808
1808
  return {
1809
1809
  id: t.id,
1810
- color: t.color || ((n = t.source) == null ? void 0 : n.color) || we,
1811
- d: ya(t)(t),
1810
+ color: t.color || ((n = t.source) == null ? void 0 : n.color) || Ee,
1811
+ d: ka(t)(t),
1812
1812
  strokeWidth: Math.max(1, t.width),
1813
1813
  link: t
1814
1814
  };
1815
1815
  });
1816
1816
  }
1817
- function bt(e, t, n, o, r) {
1817
+ function At(e, t, n, o, r) {
1818
1818
  if (o === !1) {
1819
1819
  e.node = {
1820
1820
  ...e.node,
@@ -1822,8 +1822,8 @@ function bt(e, t, n, o, r) {
1822
1822
  };
1823
1823
  return;
1824
1824
  }
1825
- const a = Date.now(), u = kn(t, n), s = () => {
1826
- let c = (Date.now() - a) / va;
1825
+ const a = Date.now(), u = bn(t, n), s = () => {
1826
+ let c = (Date.now() - a) / pa;
1827
1827
  c > 1 && (c = 1), e.node = {
1828
1828
  ...e.node,
1829
1829
  transitionValue: r && c === 1 ? void 0 : u(c)
@@ -1831,53 +1831,84 @@ function bt(e, t, n, o, r) {
1831
1831
  };
1832
1832
  requestAnimationFrame(s);
1833
1833
  }
1834
- const ba = {
1834
+ const Aa = {
1835
1835
  nodes: [],
1836
1836
  links: []
1837
1837
  };
1838
- function Aa(e, t, n) {
1839
- const o = S(null), r = p(() => {
1840
- var s;
1841
- return (s = e.value) == null ? void 0 : s[0].values.map(
1842
- ({ label: i, color: c, value: d, deriveColorFromIncomingLinks: v }) => ({
1843
- label: i || d.toString(),
1844
- color: c,
1845
- fallbackColor: c || we,
1846
- id: d,
1847
- deriveColorFromIncomingLinks: v
1838
+ function Tt(e, t) {
1839
+ return t.find((n) => n.every((o) => o.x0 === e.x0));
1840
+ }
1841
+ function Ta(e, t, n) {
1842
+ const o = C(null), r = p(() => {
1843
+ var d;
1844
+ return (d = e.value) == null ? void 0 : d[0].values.map(
1845
+ ({ label: h, color: k, value: m, deriveColorFromIncomingLinks: A, offset: f }) => ({
1846
+ label: h || m.toString(),
1847
+ color: k,
1848
+ fallbackColor: k || Ee,
1849
+ id: m,
1850
+ deriveColorFromIncomingLinks: A,
1851
+ offset: f
1848
1852
  })
1849
1853
  );
1850
1854
  }), a = p(
1851
1855
  () => {
1852
- var s;
1853
- return (s = e.value) == null ? void 0 : s[0].values.map(
1854
- (i) => {
1855
- var c;
1856
- return (c = i.targets) == null ? void 0 : c.map(
1857
- ({ node: d, value: v, color: y, curveFunction: $ }) => ({
1858
- id: `${i.value}:${d}`,
1859
- color: y,
1860
- curveFunction: $,
1861
- source: i.value ?? i.label,
1862
- target: d,
1863
- value: v
1856
+ var d;
1857
+ return (d = e.value) == null ? void 0 : d[0].values.map(
1858
+ (h) => {
1859
+ var k;
1860
+ return (k = h.targets) == null ? void 0 : k.map(
1861
+ ({ node: m, value: A, color: f, curveFunction: y }) => ({
1862
+ id: `${h.value}:${m}`,
1863
+ color: f,
1864
+ curveFunction: y,
1865
+ source: h.value ?? h.label,
1866
+ target: m,
1867
+ value: A
1864
1868
  })
1865
1869
  );
1866
1870
  }
1867
1871
  ).filter(Boolean).flat();
1868
1872
  }
1869
- ), u = p(() => sn().nodeId(ke).nodeAlign(t.value.nodeAlign).nodePadding(t.value.nodePadding).nodeSort(t.value.nodeSort).nodeWidth(t.value.nodeWidth).linkSort(t.value.linkSort).iterations(t.value.iterations));
1870
- return U([u, n], () => {
1873
+ ), u = p(() => cn().nodeId(Ae).nodeAlign(t.value.nodeAlign).nodePadding(t.value.nodePadding).nodeSort(t.value.nodeSort).nodeWidth(t.value.nodeWidth).linkSort(t.value.linkSort).iterations(t.value.iterations)), s = p(() => {
1874
+ var d;
1875
+ return (d = o.value) == null ? void 0 : d.nodes.reduce(
1876
+ (h, k) => {
1877
+ const m = Tt(k, h);
1878
+ return m ? (m.push(k), m.sort((A, f) => (A._y0 || A.y0) - (f._y0 || f.y0))) : h.push([k]), h;
1879
+ },
1880
+ []
1881
+ );
1882
+ });
1883
+ function i(d) {
1884
+ const { offset: h } = d, k = Tt(d, s.value);
1885
+ if (!k)
1886
+ return;
1887
+ const m = k[k.findIndex((f) => f.id === d.id) - 1], A = m && k.length !== 1 ? m.y1 + h : h;
1888
+ d._y0 = d.y0, d._y1 = d.y1, d.y0 = A, d.y1 = d.y0 + (d._y1 - d._y0);
1889
+ }
1890
+ function c(d, h) {
1891
+ const { id: k, _y0: m, y0: A } = d, f = h.links.filter(
1892
+ (w) => w.source.id === k
1893
+ ), y = h.links.filter(
1894
+ (w) => w.target.id === k
1895
+ ), E = A - m;
1896
+ f.forEach((w) => w.y0 += E), y.forEach((w) => w.y1 += E);
1897
+ }
1898
+ const v = p(() => (o.value && r.value.forEach((d) => {
1899
+ typeof d.offset == "number" && (i(d), c(d, o.value));
1900
+ }), o.value));
1901
+ return X([u, n], () => {
1871
1902
  try {
1872
- const { x0: s, y0: i, x1: c, y1: d } = n.value;
1903
+ const { x0: d, y0: h, x1: k, y1: m } = n.value;
1873
1904
  o.value = u.value.extent([
1874
- [s, i],
1875
- [c, d]
1905
+ [d, h],
1906
+ [k, m]
1876
1907
  ])({ nodes: r.value, links: a.value });
1877
- } catch (s) {
1878
- sa(Gt.GraphProblem, s), o.value = ba;
1908
+ } catch (d) {
1909
+ ca(Ft.GraphProblem, d), o.value = Aa;
1879
1910
  }
1880
- }), { graph: o };
1911
+ }), { columns: s, graph: v };
1881
1912
  }
1882
1913
  function Xe(e, t) {
1883
1914
  return t || (t = {}), e.targetLinks && e.targetLinks.forEach(({ source: n, value: o }) => {
@@ -1895,12 +1926,12 @@ function Ye(e, t) {
1895
1926
  );
1896
1927
  }), t;
1897
1928
  }
1898
- function Ta(e, t) {
1929
+ function La(e, t) {
1899
1930
  return t.links.reduce((n, o) => (o.source.id in e && o.target.id in e && n.push(o.id), n), []);
1900
1931
  }
1901
- const La = (e, t) => {
1932
+ const Oa = (e, t) => {
1902
1933
  let n;
1903
- Vt(e) ? n = {
1934
+ Pt(e) ? n = {
1904
1935
  [e.id]: e.value,
1905
1936
  ...Xe(e),
1906
1937
  ...Ye(e)
@@ -1910,36 +1941,36 @@ const La = (e, t) => {
1910
1941
  ...Xe(e.source),
1911
1942
  ...Ye(e.target)
1912
1943
  };
1913
- const o = Ta(n, t);
1944
+ const o = La(n, t);
1914
1945
  return { nodes: n, links: o };
1915
- }, Oa = (e) => {
1916
- if (Vt(e)) {
1946
+ }, $a = (e) => {
1947
+ if (Pt(e)) {
1917
1948
  const t = [...e.sourceLinks, ...e.targetLinks];
1918
1949
  return {
1919
1950
  nodes: t.reduce(
1920
- (n, { source: o, target: r, value: a }) => o === e ? { ...n, [ke(r)]: a } : { ...n, [ke(o)]: a },
1921
- { [ke(e)]: e.value }
1951
+ (n, { source: o, target: r, value: a }) => o === e ? { ...n, [Ae(r)]: a } : { ...n, [Ae(o)]: a },
1952
+ { [Ae(e)]: e.value }
1922
1953
  ),
1923
1954
  links: t.map(({ id: n }) => n)
1924
1955
  };
1925
1956
  }
1926
1957
  return {
1927
1958
  nodes: {
1928
- [ke(e.target)]: e.value,
1929
- [ke(e.source)]: e.source.value
1959
+ [Ae(e.target)]: e.value,
1960
+ [Ae(e.source)]: e.source.value
1930
1961
  },
1931
1962
  links: [e.id]
1932
1963
  };
1933
1964
  };
1934
- function $a(e, t, n) {
1935
- const o = S(null), r = p(() => o.value ? typeof t.value.highlightedElements == "function" ? t.value.highlightedElements(
1965
+ function xa(e, t, n) {
1966
+ const o = C(null), r = p(() => o.value ? typeof t.value.highlightedElements == "function" ? t.value.highlightedElements(
1936
1967
  o.value,
1937
1968
  n.value
1938
- ) : t.value.highlightedElements === "closest" ? Oa(o.value, n.value) : La(o.value, n.value) : { nodes: {}, links: [] });
1939
- return U(r, (a, u) => {
1969
+ ) : t.value.highlightedElements === "closest" ? $a(o.value, n.value) : Oa(o.value, n.value) : { nodes: {}, links: [] });
1970
+ return X(r, (a, u) => {
1940
1971
  if (a.links.length === 0 && Object.keys(a.nodes).length === 0) {
1941
1972
  e.value.forEach((s) => {
1942
- s.node.id in u.nodes && bt(
1973
+ s.node.id in u.nodes && At(
1943
1974
  s,
1944
1975
  u.nodes[s.node.id],
1945
1976
  s.node.value,
@@ -1950,7 +1981,7 @@ function $a(e, t, n) {
1950
1981
  return;
1951
1982
  }
1952
1983
  e.value.forEach((s) => {
1953
- s.node.id in a.nodes && bt(
1984
+ s.node.id in a.nodes && At(
1954
1985
  s,
1955
1986
  s.node.value,
1956
1987
  a.nodes[s.node.id],
@@ -1959,13 +1990,13 @@ function $a(e, t, n) {
1959
1990
  });
1960
1991
  }), { highlightedElements: r, hoveredElement: o };
1961
1992
  }
1962
- const xa = {
1993
+ const wa = {
1963
1994
  class: "lume-alluvial-group",
1964
1995
  "data-j-alluvial-group": ""
1965
- }, wa = { key: 0 }, Ia = ["x", "y"], Ea = { key: 0 }, Na = ["id", "x1", "x2"], Da = ["stop-color"], Ha = ["stop-color"], Ba = ["d", "stroke-width", "onClick", "onMouseover"], Ra = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ma = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Sa = ["x", "y", "height", "width"], Ca = ["transform", "data-id"], ja = /* @__PURE__ */ Z({
1996
+ }, Ia = { key: 0 }, Ea = ["x", "y"], Na = { key: 0 }, Da = ["id", "x1", "x2"], Ha = ["stop-color"], Ba = ["stop-color"], Ra = ["d", "stroke-width", "onClick", "onMouseover"], Sa = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ca = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Ma = ["x", "y", "height", "width"], Ga = ["transform", "data-id"], ja = /* @__PURE__ */ Z({
1966
1997
  __name: "lume-alluvial-group",
1967
1998
  props: {
1968
- ...Me(),
1999
+ ...Ce(),
1969
2000
  hoveredElementId: {
1970
2001
  type: [Number, String],
1971
2002
  default: null
@@ -1973,240 +2004,236 @@ const xa = {
1973
2004
  },
1974
2005
  emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
1975
2006
  setup(e, { emit: t }) {
1976
- const n = e, o = He("chartID"), { data: r, options: a } = Q(n), u = S([]), s = S([]), i = S(null), { extents: c, updateExtents: d } = ua(n.containerSize), { graph: v } = Aa(r, a, c), { hoveredElement: y, highlightedElements: $ } = $a(
2007
+ const n = e, o = Be("chartID"), { data: r, options: a } = q(n), u = C([]), s = C([]), i = C(null), { extents: c, updateExtents: v } = ia(n.containerSize), { columns: d, graph: h } = Ta(r, a, c), { hoveredElement: k, highlightedElements: m } = xa(
1977
2008
  u,
1978
2009
  a,
1979
- v
1980
- ), k = p(() => De(a.value.valueFormat)), A = p(
1981
- () => Object.keys($.value.nodes)
1982
- ), m = p(
1983
- () => u.value.reduce((g, L) => {
1984
- const f = L.x + a.value.nodeWidth / 2;
1985
- return g.includes(f) ? g : [...g, f];
1986
- }, []).sort((g, L) => g - L)
1987
- // Make sure positions are sorted in ascending order
1988
- ), _ = p(() => {
2010
+ h
2011
+ ), A = p(() => He(a.value.valueFormat)), f = p(
2012
+ () => Object.keys(m.value.nodes)
2013
+ ), y = p(() => d.value ? d.value.map(
2014
+ (b) => b[0].x0 + a.value.nodeWidth / 2
2015
+ ) : []), E = p(() => {
1989
2016
  if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
1990
- return a.value.nodeHeaders.slice(0, m.value.length).map((g, L) => ({
1991
- label: g,
1992
- x: m.value[L]
2017
+ return a.value.nodeHeaders.slice(0, y.value.length).map((b, I) => ({
2018
+ label: b,
2019
+ x: y.value[I]
1993
2020
  }));
1994
- }), E = p(
1995
- () => a.value.nodeHeaderPadding ?? da
2021
+ }), w = p(
2022
+ () => a.value.nodeHeaderPadding ?? va
1996
2023
  ), N = p(() => {
1997
- if (!(!a.value.gradient || !v.value))
1998
- return v.value.links.reduce((g, L) => {
1999
- const { source: f, target: B } = L, F = f.color || f.fallbackColor, re = B.deriveColorFromIncomingLinks ? F : B.color || B.fallbackColor;
2000
- return g[L.id] = {
2001
- source: F,
2002
- target: re,
2003
- x1: f.x1,
2004
- x2: B.x0
2005
- }, g;
2024
+ if (!(!a.value.gradient || !h.value))
2025
+ return h.value.links.reduce((b, I) => {
2026
+ const { source: g, target: j } = I, U = g.color || g.fallbackColor, le = j.deriveColorFromIncomingLinks ? U : j.color || j.fallbackColor;
2027
+ return b[I.id] = {
2028
+ source: U,
2029
+ target: le,
2030
+ x1: g.x1,
2031
+ x2: j.x0
2032
+ }, b;
2006
2033
  }, {});
2007
- }), I = p(() => {
2008
- const g = u.value.filter(
2009
- (f) => G(f)
2010
- ), L = [];
2011
- return g.forEach((f) => {
2012
- const B = [];
2013
- s.value.filter(({ link: F }) => F.target.id === f.node.id).reverse().reduce((F, re) => {
2014
- const Se = re.link.target.y1 - re.link.target.y0, Ee = re.link.value / f.node.value * Se;
2015
- return B.push({
2016
- x: f.x,
2017
- y: f.y + F,
2018
- height: Ee,
2019
- width: f.width,
2020
- key: `node-block-${f.node.id}-source-link-${re.link.source.id}`,
2021
- class: `lume-alluvial-group__node-block lume-fill--${re.link.source.color || we}`
2022
- }), F + Ee;
2023
- }, 0), L.push({
2024
- id: f.node.id,
2025
- subNodes: B
2034
+ }), $ = p(() => {
2035
+ const b = u.value.filter(
2036
+ (g) => ne(g)
2037
+ ), I = [];
2038
+ return b.forEach((g) => {
2039
+ const j = [];
2040
+ s.value.filter(({ link: U }) => U.target.id === g.node.id).reverse().reduce((U, le) => {
2041
+ const Oe = le.link.target.y1 - le.link.target.y0, Ne = le.link.value / g.node.value * Oe;
2042
+ return j.push({
2043
+ x: g.x,
2044
+ y: g.y + U,
2045
+ height: Ne,
2046
+ width: g.width,
2047
+ key: `node-block-${g.node.id}-source-link-${le.link.source.id}`,
2048
+ class: `lume-alluvial-group__node-block lume-fill--${le.link.source.color || Ee}`
2049
+ }), U + Ne;
2050
+ }, 0), I.push({
2051
+ id: g.node.id,
2052
+ subNodes: j
2026
2053
  });
2027
- }), L;
2054
+ }), I;
2028
2055
  });
2029
- function x(g) {
2030
- return a.value.gradient && `url('#${o}_${g.id}')`;
2056
+ function H(b) {
2057
+ return a.value.gradient && `url('#${o}_${b.id}')`;
2031
2058
  }
2032
- function H(g) {
2033
- return A.value.length > 0 && !A.value.includes(g.toString());
2059
+ function S(b) {
2060
+ return f.value.length > 0 && !f.value.includes(b.toString());
2034
2061
  }
2035
- function M(g) {
2036
- return A.value.length > 0 && A.value.includes(g.toString());
2062
+ function Y(b) {
2063
+ return f.value.length > 0 && f.value.includes(b.toString());
2037
2064
  }
2038
- function X(g) {
2039
- return $.value.links.length > 0 && !$.value.links.includes(g);
2065
+ function K(b) {
2066
+ return m.value.links.length > 0 && !m.value.links.includes(b);
2040
2067
  }
2041
- function Y(g) {
2042
- return $.value.links.length > 0 && $.value.links.includes(g);
2068
+ function F(b) {
2069
+ return m.value.links.length > 0 && m.value.links.includes(b);
2043
2070
  }
2044
- function G(g) {
2045
- return !g.node.color && g.node.deriveColorFromIncomingLinks;
2071
+ function ne(b) {
2072
+ return !b.node.color && b.node.deriveColorFromIncomingLinks;
2046
2073
  }
2047
- function te(g, L) {
2048
- g !== y.value && (y.value = g, t("link-mouseenter", { link: g, event: L }));
2074
+ function be(b, I) {
2075
+ b !== k.value && (k.value = b, t("link-mouseenter", { link: b, event: I }));
2049
2076
  }
2050
- function Te(g) {
2051
- const L = y.value;
2052
- y.value = null, t("link-mouseleave", { link: L, event: g });
2077
+ function fe(b) {
2078
+ const I = k.value;
2079
+ k.value = null, t("link-mouseleave", { link: I, event: b });
2053
2080
  }
2054
- function ce(g) {
2055
- if (g == null) {
2056
- y.value = null;
2081
+ function he(b) {
2082
+ if (b == null) {
2083
+ k.value = null;
2057
2084
  return;
2058
2085
  }
2059
- const L = pa(g, v.value) || fa(g, v.value);
2060
- if (!L) {
2061
- he(ve.InvalidHoveredElement);
2086
+ const I = fa(b, h.value) || ha(b, h.value);
2087
+ if (!I) {
2088
+ ge(ve.InvalidHoveredElement);
2062
2089
  return;
2063
2090
  }
2064
- y.value = L;
2091
+ k.value = I;
2065
2092
  }
2066
- function ye(g) {
2067
- var L;
2068
- return ((L = I.value.find(({ id: f }) => g === f)) == null ? void 0 : L.subNodes) ?? [];
2093
+ function B(b) {
2094
+ var I;
2095
+ return ((I = $.value.find(({ id: g }) => b === g)) == null ? void 0 : I.subNodes) ?? [];
2069
2096
  }
2070
- return U(v, (g) => {
2071
- u.value = ma(g.nodes), s.value = ka(g.links).reverse(), y.value == null && n.hoveredElementId != null && ce(n.hoveredElementId);
2072
- }), U([n.containerSize, i], () => {
2097
+ return X(h, (b) => {
2098
+ u.value = ga(b.nodes), s.value = ba(b.links).reverse(), k.value == null && n.hoveredElementId != null && he(n.hoveredElementId);
2099
+ }), X([n.containerSize, i], () => {
2073
2100
  if (n.containerSize.width && n.containerSize.height) {
2074
- const g = ha(v.value, i.value);
2075
- d(g);
2101
+ const b = ma(h.value, i.value);
2102
+ v(b);
2076
2103
  }
2077
- }), U(() => n.hoveredElementId, ce), (g, L) => (h(), T("g", xa, [
2078
- l(_) ? (h(), T("g", wa, [
2079
- (h(!0), T(K, null, z(l(_), (f) => (h(), T("text", {
2080
- key: `header_${f.x}`,
2081
- x: f.x,
2082
- y: -l(E),
2104
+ }), X(() => n.hoveredElementId, he), (b, I) => (_(), L("g", wa, [
2105
+ l(E) ? (_(), L("g", Ia, [
2106
+ (_(!0), L(J, null, z(l(E), (g) => (_(), L("text", {
2107
+ key: `header_${g.x}`,
2108
+ x: g.x,
2109
+ y: -l(w),
2083
2110
  class: "lume-alluvial-group__node-header lume-typography--caption"
2084
- }, q(f.label), 9, Ia))), 128))
2111
+ }, ee(g.label), 9, Ea))), 128))
2085
2112
  ])) : P("", !0),
2086
- j("g", {
2113
+ G("g", {
2087
2114
  class: "lume-alluvial-link-group",
2088
- onMouseleave: Te
2115
+ onMouseleave: fe
2089
2116
  }, [
2090
- l(a).gradient ? (h(), T("defs", Ea, [
2091
- (h(!0), T(K, null, z(l(N), (f, B) => (h(), T("linearGradient", {
2092
- id: `${l(o)}_${B}`,
2093
- key: B,
2117
+ l(a).gradient ? (_(), L("defs", Na, [
2118
+ (_(!0), L(J, null, z(l(N), (g, j) => (_(), L("linearGradient", {
2119
+ id: `${l(o)}_${j}`,
2120
+ key: j,
2094
2121
  gradientUnits: "userSpaceOnUse",
2095
- x1: f.x1,
2096
- x2: f.x2
2122
+ x1: g.x1,
2123
+ x2: g.x2
2097
2124
  }, [
2098
- j("stop", {
2125
+ G("stop", {
2099
2126
  offset: "0%",
2100
- "stop-color": `var(--lume-color--${f.source})`
2101
- }, null, 8, Da),
2102
- j("stop", {
2127
+ "stop-color": `var(--lume-color--${g.source})`
2128
+ }, null, 8, Ha),
2129
+ G("stop", {
2103
2130
  offset: "100%",
2104
- "stop-color": `var(--lume-color--${f.target})`
2105
- }, null, 8, Ha)
2106
- ], 8, Na))), 128))
2131
+ "stop-color": `var(--lume-color--${g.target})`
2132
+ }, null, 8, Ba)
2133
+ ], 8, Da))), 128))
2107
2134
  ])) : P("", !0),
2108
- (h(!0), T(K, null, z(s.value, (f) => (h(), T("path", {
2109
- key: `link-ghost_${f.id}`,
2110
- class: ee(["lume-alluvial-group__link", [
2135
+ (_(!0), L(J, null, z(s.value, (g) => (_(), L("path", {
2136
+ key: `link-ghost_${g.id}`,
2137
+ class: te(["lume-alluvial-group__link", [
2111
2138
  "lume-stroke--transparent",
2112
2139
  "lume-alluvial-group__link--ghost"
2113
2140
  ]]),
2114
- d: f.d,
2115
- "stroke-width": f.strokeWidth + l(ca),
2141
+ d: g.d,
2142
+ "stroke-width": g.strokeWidth + l(da),
2116
2143
  "data-j-alluvial-ghost": "",
2117
- onClick: (B) => t("link-click", { link: f.link, event: B }),
2118
- onMouseover: (B) => te(f.link, B)
2119
- }, null, 40, Ba))), 128)),
2120
- (h(!0), T(K, null, z(s.value, (f) => (h(), T("path", {
2121
- key: `link_${f.id}`,
2122
- class: ee(["lume-alluvial-group__link", {
2123
- [`lume-stroke--${f.color}`]: !l(a).gradient && f.color,
2124
- "lume-alluvial-group__link--faded": X(f.id),
2125
- "lume-alluvial-group__link--focused": Y(f.id)
2144
+ onClick: (j) => t("link-click", { link: g.link, event: j }),
2145
+ onMouseover: (j) => be(g.link, j)
2146
+ }, null, 40, Ra))), 128)),
2147
+ (_(!0), L(J, null, z(s.value, (g) => (_(), L("path", {
2148
+ key: `link_${g.id}`,
2149
+ class: te(["lume-alluvial-group__link", {
2150
+ [`lume-stroke--${g.color}`]: !l(a).gradient && g.color,
2151
+ "lume-alluvial-group__link--faded": K(g.id),
2152
+ "lume-alluvial-group__link--focused": F(g.id)
2126
2153
  }]),
2127
- d: f.d,
2128
- stroke: x(f.link),
2129
- "stroke-dasharray": g.containerSize.width,
2130
- "stroke-dashoffset": g.containerSize.width,
2131
- "stroke-width": f.strokeWidth,
2154
+ d: g.d,
2155
+ stroke: H(g.link),
2156
+ "stroke-dasharray": b.containerSize.width,
2157
+ "stroke-dashoffset": b.containerSize.width,
2158
+ "stroke-width": g.strokeWidth,
2132
2159
  "data-j-alluvial-path": "",
2133
- "data-id": f.id,
2134
- onClick: (B) => t("link-click", { link: f.link, event: B }),
2135
- onMouseover: (B) => te(f.link, B)
2136
- }, null, 42, Ra))), 128))
2160
+ "data-id": g.id,
2161
+ onClick: (j) => t("link-click", { link: g.link, event: j }),
2162
+ onMouseover: (j) => be(g.link, j)
2163
+ }, null, 42, Sa))), 128))
2137
2164
  ], 32),
2138
- (h(!0), T(K, null, z(u.value, (f, B) => (h(), T("g", {
2139
- key: `node-block_${B}`,
2140
- class: ee(["lume-alluvial-group__node", {
2141
- "lume-alluvial-group__node--faded": H(f.node.id),
2142
- "lume-alluvial-group__node--focused": M(f.node.id)
2165
+ (_(!0), L(J, null, z(u.value, (g, j) => (_(), L("g", {
2166
+ key: `node-block_${j}`,
2167
+ class: te(["lume-alluvial-group__node", {
2168
+ "lume-alluvial-group__node--faded": S(g.node.id),
2169
+ "lume-alluvial-group__node--focused": Y(g.node.id)
2143
2170
  }]),
2144
2171
  "data-j-alluvial-group__node-block": ""
2145
2172
  }, [
2146
- j("g", {
2147
- onClick: (F) => t("node-click", { node: f.node, event: F }),
2148
- onMouseenter: (F) => t("node-mouseenter", { node: f.node, event: F }),
2149
- onMouseleave: (F) => t("node-mouseleave", { node: f.node, event: F }),
2150
- onMouseover: (F) => y.value = f.node,
2151
- onMouseout: L[0] || (L[0] = (F) => y.value = null)
2173
+ G("g", {
2174
+ onClick: (U) => t("node-click", { node: g.node, event: U }),
2175
+ onMouseenter: (U) => t("node-mouseenter", { node: g.node, event: U }),
2176
+ onMouseleave: (U) => t("node-mouseleave", { node: g.node, event: U }),
2177
+ onMouseover: (U) => k.value = g.node,
2178
+ onMouseout: I[0] || (I[0] = (U) => k.value = null)
2152
2179
  }, [
2153
- G(f) ? (h(!0), T(K, { key: 0 }, z(ye(
2154
- f.node.id
2155
- ), (F) => (h(), T("rect", C(F, {
2156
- key: F.key,
2180
+ ne(g) ? (_(!0), L(J, { key: 0 }, z(B(
2181
+ g.node.id
2182
+ ), (U) => (_(), L("rect", M(U, {
2183
+ key: U.key,
2157
2184
  "data-j-alluvial-sub-nodes": ""
2158
- }), null, 16))), 128)) : (h(), T("rect", {
2185
+ }), null, 16))), 128)) : (_(), L("rect", {
2159
2186
  key: 1,
2160
- class: ee(["lume-alluvial-group__node-block", `lume-fill--${f.node.color || f.node.fallbackColor}`]),
2161
- x: f.x,
2162
- y: f.y,
2163
- height: f.height,
2164
- width: f.width
2165
- }, null, 10, Sa)),
2166
- j("g", {
2187
+ class: te(["lume-alluvial-group__node-block", `lume-fill--${g.node.color || g.node.fallbackColor}`]),
2188
+ x: g.x,
2189
+ y: g.y,
2190
+ height: g.height,
2191
+ width: g.width
2192
+ }, null, 10, Ma)),
2193
+ G("g", {
2167
2194
  ref_for: !0,
2168
2195
  ref_key: "nodeTextRefs",
2169
2196
  ref: i,
2170
- class: ee(["lume-alluvial-group__node-text lume-typography--caption", {
2171
- "lume-alluvial-group__node-text--left": f.node.depth === 0
2197
+ class: te(["lume-alluvial-group__node-text lume-typography--caption", {
2198
+ "lume-alluvial-group__node-text--left": g.node.depth === 0
2172
2199
  }]),
2173
- transform: `translate(${f.textTransform.x},${f.textTransform.y})`,
2174
- "data-id": f.node.id
2200
+ transform: `translate(${g.textTransform.x},${g.textTransform.y})`,
2201
+ "data-id": g.node.id
2175
2202
  }, [
2176
- R(g.$slots, `node-text-${f.node.id}`, {
2177
- node: f.node,
2178
- value: l(k)(
2179
- f.node.transitionValue || f.node.value,
2180
- f.node.value
2203
+ R(b.$slots, `node-text-${g.node.id}`, {
2204
+ node: g.node,
2205
+ value: l(A)(
2206
+ g.node.transitionValue || g.node.value,
2207
+ g.node.value
2181
2208
  )
2182
2209
  }, () => [
2183
- oe(l(oa), {
2210
+ ae(l(aa), {
2184
2211
  bottom: l(a).switchText
2185
2212
  }, {
2186
2213
  default: V(() => [
2187
- de(q(f.node.label), 1)
2214
+ de(ee(g.node.label), 1)
2188
2215
  ]),
2189
2216
  _: 2
2190
2217
  }, 1032, ["bottom"]),
2191
- oe(l(la), {
2218
+ ae(l(ua), {
2192
2219
  bottom: !l(a).switchText
2193
2220
  }, {
2194
2221
  default: V(() => [
2195
- de(q(l(k)(
2196
- f.node.transitionValue || f.node.value,
2197
- f.node.value
2222
+ de(ee(l(A)(
2223
+ g.node.transitionValue || g.node.value,
2224
+ g.node.value
2198
2225
  )), 1)
2199
2226
  ]),
2200
2227
  _: 2
2201
2228
  }, 1032, ["bottom"])
2202
2229
  ], !0)
2203
- ], 10, Ca)
2204
- ], 40, Ma)
2230
+ ], 10, Ga)
2231
+ ], 40, Ca)
2205
2232
  ], 2))), 128))
2206
2233
  ]));
2207
2234
  }
2208
2235
  });
2209
- const Ga = /* @__PURE__ */ J(ja, [["__scopeId", "data-v-1b46bc35"]]), Va = {
2236
+ const Va = /* @__PURE__ */ Q(ja, [["__scopeId", "data-v-6fe8c153"]]), Fa = {
2210
2237
  margins: {
2211
2238
  top: 0,
2212
2239
  right: 0,
@@ -2222,16 +2249,16 @@ const Ga = /* @__PURE__ */ J(ja, [["__scopeId", "data-v-1b46bc35"]]), Va = {
2222
2249
  highlightedElements: "closest",
2223
2250
  nodePadding: 16,
2224
2251
  nodeWidth: 16,
2225
- nodeAlign: cn,
2252
+ nodeAlign: dn,
2226
2253
  valueFormat: (e) => String(e),
2227
2254
  iterations: 6
2228
- }, wr = /* @__PURE__ */ Z({
2255
+ }, Ir = /* @__PURE__ */ Z({
2229
2256
  __name: "lume-alluvial-diagram",
2230
2257
  props: {
2231
- ...Do(Ke)
2258
+ ...Ho(Ke)
2232
2259
  },
2233
2260
  setup(e) {
2234
- const t = e, n = _e(ne()), o = An(ne()), { options: r } = Q(t), { allOptions: a } = se(r, Va);
2261
+ const t = e, n = ke(oe()), o = Tn(oe()), { options: r } = q(t), { allOptions: a } = ce(r, Fa);
2235
2262
  function u(s) {
2236
2263
  return {
2237
2264
  ...s,
@@ -2239,54 +2266,54 @@ const Ga = /* @__PURE__ */ J(ja, [["__scopeId", "data-v-1b46bc35"]]), Va = {
2239
2266
  // Alluvial chart never uses base scales
2240
2267
  };
2241
2268
  }
2242
- return (s, i) => (h(), W(l(Ae), C(t, {
2269
+ return (s, i) => (_(), W(l(Le), M(t, {
2243
2270
  options: u(l(a)),
2244
2271
  "data-j-alluvial-diagram": ""
2245
- }), le({
2272
+ }), ue({
2246
2273
  groups: V((c) => [
2247
- oe(l(Ga), C(c, { "hovered-element-id": s.hoveredElement }), le({ _: 2 }, [
2248
- z(l(o), (d, v) => ({
2249
- name: v,
2250
- fn: V((y) => [
2251
- R(s.$slots, v, ue(ie(y || {})))
2274
+ ae(l(Va), M(c, { "hovered-element-id": s.hoveredElement }), ue({ _: 2 }, [
2275
+ z(l(o), (v, d) => ({
2276
+ name: d,
2277
+ fn: V((h) => [
2278
+ R(s.$slots, d, ie(se(h || {})))
2252
2279
  ])
2253
2280
  }))
2254
2281
  ]), 1040, ["hovered-element-id"])
2255
2282
  ]),
2256
2283
  _: 2
2257
2284
  }, [
2258
- z(l(n), (c, d) => ({
2259
- name: d,
2260
- fn: V((v) => [
2261
- R(s.$slots, d, ue(ie(v || {})))
2285
+ z(l(n), (c, v) => ({
2286
+ name: v,
2287
+ fn: V((d) => [
2288
+ R(s.$slots, v, ie(se(d || {})))
2262
2289
  ])
2263
2290
  }))
2264
2291
  ]), 1040, ["options"]));
2265
2292
  }
2266
2293
  });
2267
- var Ft = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(Ft || {});
2268
- const Ir = /* @__PURE__ */ Z({
2294
+ var zt = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(zt || {});
2295
+ const Er = /* @__PURE__ */ Z({
2269
2296
  __name: "lume-bar-chart",
2270
2297
  props: {
2271
- ...be(),
2298
+ ...Te(),
2272
2299
  type: {
2273
2300
  type: String,
2274
2301
  default: null,
2275
- validator: (e) => e in Ft || e == null
2302
+ validator: (e) => e in zt || e == null
2276
2303
  }
2277
2304
  },
2278
2305
  setup(e) {
2279
- const t = e, n = je(
2306
+ const t = e, n = Ge(
2280
2307
  () => import("./common/42f5d2fc.js")
2281
- ), o = je(
2308
+ ), o = Ge(
2282
2309
  () => import("./common/abc9d23d.js")
2283
- ), r = je(
2310
+ ), r = Ge(
2284
2311
  () => import("./common/0664fd4d.js")
2285
2312
  ), a = /* @__PURE__ */ new Map([
2286
2313
  ["single", n],
2287
2314
  ["grouped", o],
2288
2315
  ["stacked", r]
2289
- ]), u = _e(ne());
2316
+ ]), u = ke(oe());
2290
2317
  function s(c) {
2291
2318
  return {
2292
2319
  ...c,
@@ -2307,39 +2334,39 @@ const Ir = /* @__PURE__ */ Z({
2307
2334
  return a.get(t.type);
2308
2335
  }
2309
2336
  });
2310
- return (c, d) => (h(), W(en(l(i)), C({ ...t, ...c.$attrs }, {
2337
+ return (c, v) => (_(), W(tn(l(i)), M({ ...t, ...c.$attrs }, {
2311
2338
  options: s(c.options)
2312
- }), le({ _: 2 }, [
2313
- z(l(u), (v, y) => ({
2314
- name: y,
2315
- fn: V(($) => [
2316
- R(c.$slots, y, ue(ie($ || {})))
2339
+ }), ue({ _: 2 }, [
2340
+ z(l(u), (d, h) => ({
2341
+ name: h,
2342
+ fn: V((k) => [
2343
+ R(c.$slots, h, ie(se(k || {})))
2317
2344
  ])
2318
2345
  }))
2319
2346
  ]), 1040, ["options"]));
2320
2347
  }
2321
2348
  });
2322
- function Fa(e) {
2323
- return Object.values(xn).includes(e) || e == null;
2324
- }
2325
2349
  function Pa(e) {
2350
+ return Object.values(wn).includes(e) || e == null;
2351
+ }
2352
+ function za(e) {
2326
2353
  return Object.values(D).includes(e);
2327
2354
  }
2328
- const za = (e = !1) => ({
2355
+ const Za = (e = !1) => ({
2329
2356
  type: {
2330
2357
  type: String,
2331
2358
  default: null,
2332
- validator: Fa
2359
+ validator: Pa
2333
2360
  },
2334
2361
  ...e ? {
2335
2362
  orientation: {
2336
2363
  type: String,
2337
2364
  default: D.VERTICAL,
2338
- validator: Pa
2365
+ validator: za
2339
2366
  }
2340
2367
  } : {}
2341
2368
  });
2342
- function Pt(e) {
2369
+ function Zt(e) {
2343
2370
  const t = p(() => e.value.map((o) => ({
2344
2371
  ...o,
2345
2372
  values: o.values.map((r) => ({
@@ -2354,10 +2381,10 @@ function Pt(e) {
2354
2381
  });
2355
2382
  return { multiBarData: t, groupedData: n };
2356
2383
  }
2357
- function Za(e, t) {
2384
+ function Wa(e, t) {
2358
2385
  return e.value.length === 1 ? "single" : t.value;
2359
2386
  }
2360
- function Wa(e, t, n) {
2387
+ function Ua(e, t, n) {
2361
2388
  const o = p(
2362
2389
  () => n.value === D.HORIZONTAL
2363
2390
  );
@@ -2367,170 +2394,170 @@ function Wa(e, t, n) {
2367
2394
  const a = p(() => o.value ? (() => (r(e.value), e.value))() : e.value), u = p(() => o.value ? t.value : (() => (r(t.value), t.value))());
2368
2395
  return { barXScale: a, barYScale: u };
2369
2396
  }
2370
- function Ua(e, t, n, o, r, a) {
2397
+ function Xa(e, t, n, o, r, a) {
2371
2398
  const u = p(
2372
2399
  () => o.value === D.HORIZONTAL
2373
2400
  );
2374
- function s(v, y) {
2375
- let $, k;
2376
- return u.value ? ($ = v >= 0 ? t.value(0) : t.value(v), k = n.value(n.value.domain()[y])) : ($ = t.value(t.value.domain()[y]), k = v < 0 ? n.value(0) : n.value(v)), { x: $, y: k };
2401
+ function s(d, h) {
2402
+ let k, m;
2403
+ return u.value ? (k = d >= 0 ? t.value(0) : t.value(d), m = n.value(n.value.domain()[h])) : (k = t.value(t.value.domain()[h]), m = d < 0 ? n.value(0) : n.value(d)), { x: k, y: m };
2377
2404
  }
2378
- function i(v) {
2379
- return u.value ? v < 0 ? t.value(0) - t.value(v) : t.value(v) - t.value(0) : t.value.bandwidth();
2405
+ function i(d) {
2406
+ return u.value ? d < 0 ? t.value(0) - t.value(d) : t.value(d) - t.value(0) : t.value.bandwidth();
2380
2407
  }
2381
- function c(v) {
2382
- return u.value ? n.value.bandwidth() : v < 0 ? n.value(v) - n.value(0) : n.value(0) - n.value(v);
2408
+ function c(d) {
2409
+ return u.value ? n.value.bandwidth() : d < 0 ? n.value(d) - n.value(0) : n.value(0) - n.value(d);
2383
2410
  }
2384
- function d(v, y, $) {
2385
- const { value: k, color: A } = v, m = A ?? e.value[y].color ?? we, { x: _, y: E } = s(k, $), N = i(k), I = c(k);
2411
+ function v(d, h, k) {
2412
+ const { value: m, color: A } = d, f = A ?? e.value[h].color ?? Ee, { x: y, y: E } = s(m, k), w = i(m), N = c(m);
2386
2413
  return {
2387
- classList: [`lume-fill--${m}`, ...a],
2388
- x: _,
2414
+ classList: [`lume-fill--${f}`, ...a],
2415
+ x: y,
2389
2416
  y: E,
2390
- width: N,
2391
- height: I,
2392
- isFaded: r.value !== -1 && r.value !== $,
2393
- isNegative: k < 0
2417
+ width: w,
2418
+ height: N,
2419
+ isFaded: r.value !== -1 && r.value !== k,
2420
+ isNegative: m < 0
2394
2421
  };
2395
2422
  }
2396
- return { barAttributeGenerator: d };
2423
+ return { barAttributeGenerator: v };
2397
2424
  }
2398
- function Xa(e, t, n, o, r, a) {
2425
+ function Ya(e, t, n, o, r, a) {
2399
2426
  const u = p(
2400
2427
  () => o.value === D.HORIZONTAL
2401
- ), s = p(() => Le().domain(e.value.map((k, A) => A)).range([0, t.value.bandwidth()]).padding(0)), i = p(() => Le().domain(e.value.map((k, A) => A)).range([0, n.value.bandwidth()]).padding(0));
2402
- function c(k, A, m) {
2428
+ ), s = p(() => $e().domain(e.value.map((m, A) => A)).range([0, t.value.bandwidth()]).padding(0)), i = p(() => $e().domain(e.value.map((m, A) => A)).range([0, n.value.bandwidth()]).padding(0));
2429
+ function c(m, A, f) {
2403
2430
  if (u.value)
2404
- return k >= 0 ? t.value(0) : t.value(k);
2405
- const _ = t.value.domain();
2406
- return t.value(_[A]) + s.value(m);
2431
+ return m >= 0 ? t.value(0) : t.value(m);
2432
+ const y = t.value.domain();
2433
+ return t.value(y[A]) + s.value(f);
2407
2434
  }
2408
- function d(k, A, m) {
2435
+ function v(m, A, f) {
2409
2436
  if (u.value) {
2410
- const _ = n.value.domain();
2411
- return n.value(_[A]) + i.value(m);
2437
+ const y = n.value.domain();
2438
+ return n.value(y[A]) + i.value(f);
2412
2439
  }
2413
- return k < 0 ? n.value(0) : n.value(k);
2440
+ return m < 0 ? n.value(0) : n.value(m);
2414
2441
  }
2415
- function v(k) {
2416
- return u.value ? k < 0 ? t.value(0) - t.value(k) : t.value(k) - t.value(0) : s.value.bandwidth();
2442
+ function d(m) {
2443
+ return u.value ? m < 0 ? t.value(0) - t.value(m) : t.value(m) - t.value(0) : s.value.bandwidth();
2417
2444
  }
2418
- function y(k) {
2419
- return u.value ? i.value.bandwidth() : k < 0 ? n.value(k) - n.value(0) : n.value(0) - n.value(k);
2445
+ function h(m) {
2446
+ return u.value ? i.value.bandwidth() : m < 0 ? n.value(m) - n.value(0) : n.value(0) - n.value(m);
2420
2447
  }
2421
- function $(k, A, m) {
2422
- const { value: _, color: E } = k, N = E ?? e.value[A].color ?? Object.values(ae)[A], I = c(_, m, A), x = d(_, m, A), H = v(_), M = y(_);
2448
+ function k(m, A, f) {
2449
+ const { value: y, color: E } = m, w = E ?? e.value[A].color ?? Object.values(re)[A], N = c(y, f, A), $ = v(y, f, A), H = d(y), S = h(y);
2423
2450
  return {
2424
- classList: [`lume-fill--${N}`, ...a],
2425
- x: I,
2426
- y: x,
2451
+ classList: [`lume-fill--${w}`, ...a],
2452
+ x: N,
2453
+ y: $,
2427
2454
  width: H,
2428
- height: M,
2429
- isFaded: r.value !== -1 && r.value !== m,
2430
- isNegative: _ < 0
2455
+ height: S,
2456
+ isFaded: r.value !== -1 && r.value !== f,
2457
+ isNegative: y < 0
2431
2458
  };
2432
2459
  }
2433
- return { barAttributeGenerator: $ };
2460
+ return { barAttributeGenerator: k };
2434
2461
  }
2435
- function Ya(e, t, n) {
2462
+ function Ka(e, t, n) {
2436
2463
  const o = p(
2437
2464
  () => t.value === D.HORIZONTAL
2438
2465
  ), r = p(() => {
2439
2466
  const i = e.value.map(
2440
- (c) => c.filter((d) => d.value < 0).reduce((d, v) => d + v.value, 0)
2467
+ (c) => c.filter((v) => v.value < 0).reduce((v, d) => v + d.value, 0)
2441
2468
  );
2442
2469
  return Math.min(...i);
2443
2470
  }), a = p(() => {
2444
2471
  const i = e.value.map(
2445
2472
  (c) => c.reduce(
2446
- (d, v) => v.value >= 0 ? d + v.value : d,
2473
+ (v, d) => d.value >= 0 ? v + d.value : v,
2447
2474
  0
2448
2475
  )
2449
2476
  );
2450
2477
  return Math.max(...i);
2451
2478
  });
2452
- function u(i, c, d) {
2453
- return o.value ? Oe().domain([r.value, a.value]).range([0, d.width]) : Object.assign(
2454
- gt(
2455
- Le().domain(c.map((v, y) => y)).range([0, d.width]),
2479
+ function u(i, c, v) {
2480
+ return o.value ? xe().domain([r.value, a.value]).range([0, v.width]) : Object.assign(
2481
+ _t(
2482
+ $e().domain(c.map((d, h) => h)).range([0, v.width]),
2456
2483
  t.value,
2457
2484
  n.value
2458
2485
  ),
2459
2486
  { labels: c }
2460
2487
  );
2461
2488
  }
2462
- function s(i, c, d) {
2489
+ function s(i, c, v) {
2463
2490
  return o.value ? Object.assign(
2464
- gt(
2465
- Le().domain(c.map((v, y) => y)).range([0, d.height]),
2491
+ _t(
2492
+ $e().domain(c.map((d, h) => h)).range([0, v.height]),
2466
2493
  t.value,
2467
2494
  n.value
2468
2495
  ),
2469
2496
  { labels: c }
2470
- ) : Oe().domain([a.value, r.value]).range([0, d.height]);
2497
+ ) : xe().domain([a.value, r.value]).range([0, v.height]);
2471
2498
  }
2472
2499
  return { stackedXScaleGenerator: u, stackedYScaleGenerator: s };
2473
2500
  }
2474
- function Ka(e, t, n, o, r, a) {
2501
+ function Ja(e, t, n, o, r, a) {
2475
2502
  const u = p(
2476
2503
  () => o.value === D.HORIZONTAL
2477
2504
  ), s = p(
2478
2505
  () => u.value ? n.value.domain() : t.value.domain()
2479
2506
  ), i = p(
2480
- () => e.value.map((_) => _.values.map((E) => E == null ? void 0 : E.value))
2507
+ () => e.value.map((y) => y.values.map((E) => E == null ? void 0 : E.value))
2481
2508
  );
2482
- function c(_, E, N) {
2483
- let I, x;
2484
- return u.value ? (I = t.value(_ >= 0 ? 0 + N : _ + N), x = n.value(s.value[E])) : (I = t.value(s.value[E]), x = n.value(_ >= 0 ? _ + N : 0 + N)), { x: I, y: x };
2509
+ function c(y, E, w) {
2510
+ let N, $;
2511
+ return u.value ? (N = t.value(y >= 0 ? 0 + w : y + w), $ = n.value(s.value[E])) : (N = t.value(s.value[E]), $ = n.value(y >= 0 ? y + w : 0 + w)), { x: N, y: $ };
2485
2512
  }
2486
- function d(_) {
2487
- return u.value ? t.value(_) - t.value(0) : t.value.bandwidth();
2513
+ function v(y) {
2514
+ return u.value ? t.value(y) - t.value(0) : t.value.bandwidth();
2488
2515
  }
2489
- function v(_) {
2490
- return u.value ? t.value(0) - t.value(_) : t.value.bandwidth();
2516
+ function d(y) {
2517
+ return u.value ? t.value(0) - t.value(y) : t.value.bandwidth();
2491
2518
  }
2492
- function y(_) {
2493
- return u.value ? n.value.bandwidth() : n.value(0) - n.value(_);
2519
+ function h(y) {
2520
+ return u.value ? n.value.bandwidth() : n.value(0) - n.value(y);
2494
2521
  }
2495
- function $(_) {
2496
- return u.value ? n.value.bandwidth() : n.value(_) - n.value(0);
2522
+ function k(y) {
2523
+ return u.value ? n.value.bandwidth() : n.value(y) - n.value(0);
2497
2524
  }
2498
- function k(_, E) {
2499
- return _ ? i.value.reduce((N, I, x) => (x < _ && I[E] >= 0 && (N += I[E]), N), 0) : 0;
2525
+ function m(y, E) {
2526
+ return y ? i.value.reduce((w, N, $) => ($ < y && N[E] >= 0 && (w += N[E]), w), 0) : 0;
2500
2527
  }
2501
- function A(_, E) {
2502
- return _ ? i.value.reduce((N, I, x) => (x < _ && I[E] < 0 && (N += I[E]), N), 0) : 0;
2528
+ function A(y, E) {
2529
+ return y ? i.value.reduce((w, N, $) => ($ < y && N[E] < 0 && (w += N[E]), w), 0) : 0;
2503
2530
  }
2504
- function m(_, E, N) {
2505
- const { value: I, color: x } = _, H = I >= 0 ? d(I) : v(I), M = I >= 0 ? y(I) : $(I), X = I >= 0 ? k(E, N) : A(E, N), { x: Y, y: G } = c(I, N, X);
2531
+ function f(y, E, w) {
2532
+ const { value: N, color: $ } = y, H = N >= 0 ? v(N) : d(N), S = N >= 0 ? h(N) : k(N), Y = N >= 0 ? m(E, w) : A(E, w), { x: K, y: F } = c(N, w, Y);
2506
2533
  return {
2507
- classList: [`lume-fill--${x ?? e.value[E].color ?? Object.values(ae)[E]}`, ...a],
2534
+ classList: [`lume-fill--${$ ?? e.value[E].color ?? Object.values(re)[E]}`, ...a],
2508
2535
  width: H,
2509
- height: M,
2510
- x: Y,
2511
- y: G,
2512
- isFaded: r.value !== -1 && r.value !== N,
2513
- isNegative: I < 0
2536
+ height: S,
2537
+ x: K,
2538
+ y: F,
2539
+ isFaded: r.value !== -1 && r.value !== w,
2540
+ isNegative: N < 0
2514
2541
  };
2515
2542
  }
2516
- return { barAttributeGenerator: m };
2543
+ return { barAttributeGenerator: f };
2517
2544
  }
2518
- const Ja = {
2545
+ const Qa = {
2519
2546
  class: "lume-bar-group",
2520
2547
  "data-j-bars-group": ""
2521
- }, Qa = ["onMouseenter"], qa = {
2522
- single: Ua,
2523
- grouped: Xa,
2524
- stacked: Ka
2548
+ }, qa = ["onMouseenter"], er = {
2549
+ single: Xa,
2550
+ grouped: Ya,
2551
+ stacked: Ja
2525
2552
  }, nt = /* @__PURE__ */ Z({
2526
2553
  __name: "lume-bar-group",
2527
2554
  props: {
2528
- ...Me(),
2555
+ ...Ce(),
2529
2556
  classList: {
2530
2557
  type: [String, Array],
2531
2558
  default: () => []
2532
2559
  },
2533
- ...za(!0),
2560
+ ...Za(!0),
2534
2561
  transition: {
2535
2562
  type: Boolean,
2536
2563
  default: !0
@@ -2546,177 +2573,177 @@ const Ja = {
2546
2573
  type: s,
2547
2574
  xScale: i,
2548
2575
  yScale: c,
2549
- classList: d
2550
- } = Q(n), { groupedData: v } = Pt(o), { barXScale: y, barYScale: $ } = Wa(i, c, a), k = p(() => typeof d.value == "string" ? [d.value] : d.value), A = p(() => {
2551
- const _ = Za(o, s), { barAttributeGenerator: E } = qa[_](
2576
+ classList: v
2577
+ } = q(n), { groupedData: d } = Zt(o), { barXScale: h, barYScale: k } = Ua(i, c, a), m = p(() => typeof v.value == "string" ? [v.value] : v.value), A = p(() => {
2578
+ const y = Wa(o, s), { barAttributeGenerator: E } = er[y](
2552
2579
  o,
2553
- y,
2554
- $,
2580
+ h,
2581
+ k,
2555
2582
  a,
2556
2583
  r,
2557
- k.value
2584
+ m.value
2558
2585
  );
2559
2586
  return E;
2560
- }), m = p(() => {
2587
+ }), f = p(() => {
2561
2588
  if (u.value)
2562
2589
  return a.value === D.HORIZONTAL ? "width" : "height";
2563
2590
  });
2564
- return (_, E) => (h(), T("g", Ja, [
2565
- (h(!0), T(K, null, z(l(v), (N, I) => (h(), T("g", {
2566
- key: I,
2567
- onMouseenter: (x) => t("lume__internal--hover", I)
2591
+ return (y, E) => (_(), L("g", Qa, [
2592
+ (_(!0), L(J, null, z(l(d), (w, N) => (_(), L("g", {
2593
+ key: N,
2594
+ onMouseenter: ($) => t("lume__internal--hover", N)
2568
2595
  }, [
2569
- (h(!0), T(K, null, z(N, (x, H) => (h(), W(l(qe), C(l(A)(x, H, I, N), {
2596
+ (_(!0), L(J, null, z(w, ($, H) => (_(), W(l(qe), M(l(A)($, H, N, w), {
2570
2597
  key: `bar-${H}`,
2571
- transition: l(m),
2598
+ transition: l(f),
2572
2599
  "data-j-lume-bar": "",
2573
- onClick: (M) => t("bar-click", {
2574
- index: I,
2600
+ onClick: (S) => t("bar-click", {
2601
+ index: N,
2575
2602
  datasetIndex: H,
2576
- event: M
2603
+ event: S
2577
2604
  })
2578
2605
  }), null, 16, ["transition", "onClick"]))), 128))
2579
- ], 40, Qa))), 128))
2606
+ ], 40, qa))), 128))
2580
2607
  ]));
2581
2608
  }
2582
- }), er = {
2609
+ }), tr = {
2583
2610
  [D.VERTICAL]: {
2584
2611
  withTooltip: !0,
2585
2612
  xAxisOptions: {},
2586
2613
  yAxisOptions: { gridLines: !0 },
2587
- margins: me.VERTICAL
2614
+ margins: _e.VERTICAL
2588
2615
  },
2589
2616
  [D.HORIZONTAL]: {
2590
2617
  withTooltip: !0,
2591
2618
  xAxisOptions: { gridLines: !0 },
2592
2619
  yAxisOptions: { gridLines: !1 },
2593
- margins: me.HORIZONTAL
2620
+ margins: _e.HORIZONTAL
2594
2621
  }
2595
- }, Er = /* @__PURE__ */ Z({
2622
+ }, Nr = /* @__PURE__ */ Z({
2596
2623
  __name: "lume-single-bar-chart",
2597
2624
  props: {
2598
- ...be(Ke)
2625
+ ...Te(Ke)
2599
2626
  },
2600
2627
  setup(e) {
2601
- const t = e, n = _e(ne()), { orientation: o, options: r } = Q(t), a = p(
2602
- () => er[o.value || D.VERTICAL]
2628
+ const t = e, n = ke(oe()), { orientation: o, options: r } = q(t), a = p(
2629
+ () => tr[o.value || D.VERTICAL]
2603
2630
  // needs to be computed so that default options are reactive
2604
- ), { allOptions: u } = se(r, a);
2605
- return (s, i) => (h(), W(l(Ae), C(t, {
2631
+ ), { allOptions: u } = ce(r, a);
2632
+ return (s, i) => (_(), W(l(Le), M(t, {
2606
2633
  "chart-type": "single-bar",
2607
2634
  options: l(u),
2608
2635
  "data-j-single-bar-chart": ""
2609
- }), le({
2636
+ }), ue({
2610
2637
  groups: V((c) => [
2611
- oe(l(nt), C(c, { orientation: l(o) }), null, 16, ["orientation"])
2638
+ ae(l(nt), M(c, { orientation: l(o) }), null, 16, ["orientation"])
2612
2639
  ]),
2613
2640
  _: 2
2614
2641
  }, [
2615
- z(l(n), (c, d) => ({
2616
- name: d,
2617
- fn: V((v) => [
2618
- R(s.$slots, d, ue(ie(v || {})))
2642
+ z(l(n), (c, v) => ({
2643
+ name: v,
2644
+ fn: V((d) => [
2645
+ R(s.$slots, v, ie(se(d || {})))
2619
2646
  ])
2620
2647
  }))
2621
2648
  ]), 1040, ["options"]));
2622
2649
  }
2623
- }), tr = {
2650
+ }), nr = {
2624
2651
  [D.VERTICAL]: {
2625
2652
  withTooltip: !0,
2626
2653
  xAxisOptions: {},
2627
2654
  yAxisOptions: { gridLines: !0 },
2628
- margins: me.VERTICAL
2655
+ margins: _e.VERTICAL
2629
2656
  },
2630
2657
  [D.HORIZONTAL]: {
2631
2658
  withTooltip: !0,
2632
2659
  xAxisOptions: { gridLines: !0 },
2633
2660
  yAxisOptions: { gridLines: !1 },
2634
- margins: me.HORIZONTAL,
2661
+ margins: _e.HORIZONTAL,
2635
2662
  tooltipOptions: { position: "right" }
2636
2663
  }
2637
- }, Nr = /* @__PURE__ */ Z({
2664
+ }, Dr = /* @__PURE__ */ Z({
2638
2665
  __name: "lume-grouped-bar-chart",
2639
2666
  props: {
2640
- ...be()
2667
+ ...Te()
2641
2668
  },
2642
2669
  setup(e) {
2643
- const t = e, n = _e(ne()), { orientation: o, options: r } = Q(t), a = p(
2644
- () => tr[o.value || D.VERTICAL]
2670
+ const t = e, n = ke(oe()), { orientation: o, options: r } = q(t), a = p(
2671
+ () => nr[o.value || D.VERTICAL]
2645
2672
  // needs to be computed so that default options are reactive
2646
- ), { allOptions: u } = se(
2673
+ ), { allOptions: u } = ce(
2647
2674
  r,
2648
2675
  a
2649
2676
  );
2650
- return (s, i) => (h(), W(l(Ae), C(t, {
2677
+ return (s, i) => (_(), W(l(Le), M(t, {
2651
2678
  "chart-type": "grouped-bar",
2652
2679
  options: l(u),
2653
2680
  "data-j-grouped-bar-chart": ""
2654
- }), le({
2681
+ }), ue({
2655
2682
  groups: V((c) => [
2656
- oe(l(nt), C(c, { type: "grouped" }), null, 16)
2683
+ ae(l(nt), M(c, { type: "grouped" }), null, 16)
2657
2684
  ]),
2658
2685
  _: 2
2659
2686
  }, [
2660
- z(l(n), (c, d) => ({
2661
- name: d,
2662
- fn: V((v) => [
2663
- R(s.$slots, d, ue(ie(v || {})))
2687
+ z(l(n), (c, v) => ({
2688
+ name: v,
2689
+ fn: V((d) => [
2690
+ R(s.$slots, v, ie(se(d || {})))
2664
2691
  ])
2665
2692
  }))
2666
2693
  ]), 1040, ["options"]));
2667
2694
  }
2668
- }), nr = {
2695
+ }), or = {
2669
2696
  [D.VERTICAL]: {
2670
2697
  withTooltip: !0,
2671
2698
  xAxisOptions: {},
2672
2699
  yAxisOptions: { gridLines: !0 },
2673
- margins: me.VERTICAL
2700
+ margins: _e.VERTICAL
2674
2701
  },
2675
2702
  [D.HORIZONTAL]: {
2676
2703
  withTooltip: !0,
2677
2704
  xAxisOptions: { gridLines: !0 },
2678
2705
  yAxisOptions: { gridLines: !1 },
2679
- margins: me.HORIZONTAL,
2706
+ margins: _e.HORIZONTAL,
2680
2707
  tooltipOptions: { position: "right" }
2681
2708
  }
2682
- }, Dr = /* @__PURE__ */ Z({
2709
+ }, Hr = /* @__PURE__ */ Z({
2683
2710
  __name: "lume-stacked-bar-chart",
2684
2711
  props: {
2685
- ...be()
2712
+ ...Te()
2686
2713
  },
2687
2714
  setup(e) {
2688
- const t = e, n = _e(ne()), { data: o, orientation: r, options: a } = Q(t), u = p(
2689
- () => nr[r.value || D.VERTICAL]
2715
+ const t = e, n = ke(oe()), { data: o, orientation: r, options: a } = q(t), u = p(
2716
+ () => or[r.value || D.VERTICAL]
2690
2717
  // needs to be computed so that default options are reactive
2691
- ), { allOptions: s } = se(
2718
+ ), { allOptions: s } = ce(
2692
2719
  a,
2693
2720
  u
2694
- ), { internalData: i } = tt(o), { groupedData: c } = Pt(i), { stackedXScaleGenerator: d, stackedYScaleGenerator: v } = Ya(
2721
+ ), { internalData: i } = tt(o), { groupedData: c } = Zt(i), { stackedXScaleGenerator: v, stackedYScaleGenerator: d } = Ka(
2695
2722
  c,
2696
2723
  r,
2697
2724
  a
2698
2725
  );
2699
- return (y, $) => (h(), W(l(Ae), C(t, {
2726
+ return (h, k) => (_(), W(l(Le), M(t, {
2700
2727
  "chart-type": "stacked-bar",
2701
2728
  options: l(s),
2702
- "x-scale": l(d),
2703
- "y-scale": l(v),
2729
+ "x-scale": l(v),
2730
+ "y-scale": l(d),
2704
2731
  "data-j-stacked-bar-chart": ""
2705
- }), le({
2706
- groups: V((k) => [
2707
- oe(l(nt), C(k, { type: "stacked" }), null, 16)
2732
+ }), ue({
2733
+ groups: V((m) => [
2734
+ ae(l(nt), M(m, { type: "stacked" }), null, 16)
2708
2735
  ]),
2709
2736
  _: 2
2710
2737
  }, [
2711
- z(l(n), (k, A) => ({
2738
+ z(l(n), (m, A) => ({
2712
2739
  name: A,
2713
- fn: V((m) => [
2714
- R(y.$slots, A, ue(ie(m || {})))
2740
+ fn: V((f) => [
2741
+ R(h.$slots, A, ie(se(f || {})))
2715
2742
  ])
2716
2743
  }))
2717
2744
  ]), 1040, ["options", "x-scale", "y-scale"]));
2718
2745
  }
2719
- }), or = ["d", "stroke-width"], ar = 2, rr = /* @__PURE__ */ Z({
2746
+ }), ar = ["d", "stroke-width"], rr = 2, lr = /* @__PURE__ */ Z({
2720
2747
  __name: "lume-line",
2721
2748
  props: {
2722
2749
  pathDefinition: {
@@ -2725,11 +2752,11 @@ const Ja = {
2725
2752
  },
2726
2753
  width: {
2727
2754
  type: Number,
2728
- default: ar
2755
+ default: rr
2729
2756
  },
2730
2757
  color: {
2731
2758
  type: String,
2732
- default: ae.Skyblue
2759
+ default: re.Skyblue
2733
2760
  },
2734
2761
  dashed: {
2735
2762
  type: Boolean,
@@ -2750,38 +2777,38 @@ const Ja = {
2750
2777
  },
2751
2778
  emits: ["click"],
2752
2779
  setup(e, { emit: t }) {
2753
- const n = S(null);
2754
- return pe(() => Re(n.value)), (o, r) => (h(), T("path", {
2780
+ const n = C(null);
2781
+ return pe(() => Se(n.value)), (o, r) => (_(), L("path", {
2755
2782
  ref_key: "root",
2756
2783
  ref: n,
2757
- class: ee(["lume-line", {
2784
+ class: te(["lume-line", {
2758
2785
  [`lume-stroke--${e.color}`]: !0,
2759
2786
  "lume-line--dashed": e.dashed,
2760
2787
  "lume-line--transition": e.transition
2761
2788
  }]),
2762
2789
  d: e.pathDefinition,
2763
2790
  "stroke-width": e.width,
2764
- style: Tt({
2791
+ style: Ot({
2765
2792
  animationDelay: e.transition && e.animationDelay + "s",
2766
2793
  animationDuration: e.transition && e.animationDuration + "s"
2767
2794
  }),
2768
2795
  "data-j-line": "",
2769
2796
  onClick: r[0] || (r[0] = (a) => t("click", a))
2770
- }, null, 14, or));
2797
+ }, null, 14, ar));
2771
2798
  }
2772
2799
  });
2773
- const lr = /* @__PURE__ */ J(rr, [["__scopeId", "data-v-08896455"]]), ur = ["cx", "cy", "r", "stroke-width"], ir = 4, sr = /* @__PURE__ */ Z({
2800
+ const ur = /* @__PURE__ */ Q(lr, [["__scopeId", "data-v-08896455"]]), ir = ["cx", "cy", "r", "stroke-width"], sr = 4, cr = /* @__PURE__ */ Z({
2774
2801
  __name: "lume-point",
2775
2802
  props: {
2776
2803
  x: { type: Number, required: !0 },
2777
2804
  y: { type: Number, required: !0 },
2778
2805
  color: {
2779
2806
  type: String,
2780
- default: ae.Skyblue
2807
+ default: re.Skyblue
2781
2808
  },
2782
2809
  radius: {
2783
2810
  type: Number,
2784
- default: ir
2811
+ default: sr
2785
2812
  },
2786
2813
  active: {
2787
2814
  type: Boolean,
@@ -2790,29 +2817,29 @@ const lr = /* @__PURE__ */ J(rr, [["__scopeId", "data-v-08896455"]]), ur = ["cx"
2790
2817
  },
2791
2818
  emits: ["click"],
2792
2819
  setup(e, { emit: t }) {
2793
- const n = e, o = S(null), r = p(() => n.radius / 2);
2794
- return pe(() => Re(o.value)), (a, u) => (h(), T("circle", {
2820
+ const n = e, o = C(null), r = p(() => n.radius / 2);
2821
+ return pe(() => Se(o.value)), (a, u) => (_(), L("circle", {
2795
2822
  ref_key: "root",
2796
2823
  ref: o,
2797
- class: ee(["lume-point", `lume-stroke--${e.color}`]),
2824
+ class: te(["lume-point", `lume-stroke--${e.color}`]),
2798
2825
  cx: e.x,
2799
2826
  cy: e.y,
2800
2827
  r: e.active ? e.radius : 0,
2801
2828
  "stroke-width": l(r),
2802
2829
  "data-j-point": "",
2803
2830
  onClick: u[0] || (u[0] = (s) => t("click", s))
2804
- }, null, 10, ur));
2831
+ }, null, 10, ir));
2805
2832
  }
2806
2833
  });
2807
- const cr = /* @__PURE__ */ J(sr, [["__scopeId", "data-v-9bacbd7d"]]);
2808
- function zt(e) {
2834
+ const dr = /* @__PURE__ */ Q(cr, [["__scopeId", "data-v-9bacbd7d"]]);
2835
+ function Wt(e) {
2809
2836
  function t(a) {
2810
2837
  let u = null;
2811
2838
  return a == null ? void 0 : a.reduce((s, i, c) => (i == null || i.value == null ? (u ? u.push(c) : u = [c], c === (a == null ? void 0 : a.length) - 1 && s.push(u)) : u && (s.push(u), u = null), s), []);
2812
2839
  }
2813
2840
  function n(a, u, s, i) {
2814
- const v = Math.abs(a - u) / (s + 1) * (i + 1);
2815
- return a > u ? a - v : a + v;
2841
+ const d = Math.abs(a - u) / (s + 1) * (i + 1);
2842
+ return a > u ? a - d : a + d;
2816
2843
  }
2817
2844
  function o(a) {
2818
2845
  return function(s) {
@@ -2827,21 +2854,21 @@ function zt(e) {
2827
2854
  ...a,
2828
2855
  isDashed: o(u),
2829
2856
  values: a.values.map((s, i) => {
2830
- var d, v;
2857
+ var v, d;
2831
2858
  const c = u.find(
2832
- (y) => y.includes(i)
2859
+ (h) => h.includes(i)
2833
2860
  );
2834
2861
  if (c) {
2835
- const y = c[0] - 1, $ = c[c.length - 1] + 1;
2836
- let k = (d = a.values[y]) == null ? void 0 : d.value, A = (v = a.values[$]) == null ? void 0 : v.value;
2837
- return k == null && (k = A), A == null && (A = k), {
2862
+ const h = c[0] - 1, k = c[c.length - 1] + 1;
2863
+ let m = (v = a.values[h]) == null ? void 0 : v.value, A = (d = a.values[k]) == null ? void 0 : d.value;
2864
+ return m == null && (m = A), A == null && (A = m), {
2838
2865
  value: n(
2839
- k,
2866
+ m,
2840
2867
  A,
2841
2868
  c.length,
2842
2869
  c.indexOf(i)
2843
2870
  ),
2844
- label: Nt
2871
+ label: Ht
2845
2872
  };
2846
2873
  }
2847
2874
  return s;
@@ -2849,29 +2876,29 @@ function zt(e) {
2849
2876
  };
2850
2877
  })) };
2851
2878
  }
2852
- function dr(e, t) {
2879
+ function vr(e, t) {
2853
2880
  const n = e.bandwidth() / 2;
2854
2881
  return (o, r) => e(e.domain()[t + (r - 1)]) + n;
2855
2882
  }
2856
- function vr(e, t) {
2883
+ function pr(e, t) {
2857
2884
  return (n, o) => e(t + (o - 1));
2858
2885
  }
2859
- function pr(e, t, n, o) {
2860
- return an().x(
2861
- ge(n) ? dr(n, e) : vr(n, e)
2886
+ function fr(e, t, n, o) {
2887
+ return rn().x(
2888
+ ye(n) ? vr(n, e) : pr(n, e)
2862
2889
  ).y((a) => o(a))(t);
2863
2890
  }
2864
- const fr = {
2891
+ const hr = {
2865
2892
  class: "lume-line-group",
2866
2893
  "data-j-lume-line-group": ""
2867
- }, hr = { class: "lume-line-group__lines" }, mr = {
2894
+ }, mr = { class: "lume-line-group__lines" }, gr = {
2868
2895
  key: 0,
2869
2896
  class: "lume-line-group__points",
2870
2897
  "data-j-lume-line-group__points": ""
2871
- }, gr = 1, _r = /* @__PURE__ */ Z({
2898
+ }, _r = 1, yr = /* @__PURE__ */ Z({
2872
2899
  __name: "lume-line-group",
2873
2900
  props: {
2874
- ...Me(),
2901
+ ...Ce(),
2875
2902
  withPoints: {
2876
2903
  type: Boolean,
2877
2904
  default: !0
@@ -2883,10 +2910,10 @@ const fr = {
2883
2910
  },
2884
2911
  emits: ["line-click", "point-click", "lume__internal--hover"],
2885
2912
  setup(e, { emit: t }) {
2886
- const n = e, { data: o, options: r, xScale: a, yScale: u } = Q(n), s = He(
2913
+ const n = e, { data: o, options: r, xScale: a, yScale: u } = q(n), s = Be(
2887
2914
  "tooltipAnchorAttributes",
2888
2915
  null
2889
- ), { updateTooltipAnchorAttributes: i } = jt(
2916
+ ), { updateTooltipAnchorAttributes: i } = Vt(
2890
2917
  s,
2891
2918
  r,
2892
2919
  a,
@@ -2894,144 +2921,144 @@ const fr = {
2894
2921
  ), c = p(() => {
2895
2922
  if (o.value.every((H) => H.isDashed))
2896
2923
  return o.value;
2897
- const { computedLineData: x } = zt(o);
2898
- return r.value.withTooltip !== !1 && (s != null && s.value) && i(x.value), x.value;
2899
- }), d = p(() => {
2924
+ const { computedLineData: $ } = Wt(o);
2925
+ return r.value.withTooltip !== !1 && (s != null && s.value) && i($.value), $.value;
2926
+ }), v = p(() => {
2900
2927
  if (n.hoveredIndex === -1)
2901
2928
  return;
2902
- const x = _n(
2929
+ const $ = yn(
2903
2930
  c.value,
2904
2931
  n.hoveredIndex
2905
2932
  );
2906
2933
  return {
2907
2934
  d: `M ${Pe(a.value, n.hoveredIndex)},${u.value.range()[1]}
2908
- V ${u.value(x)}`
2935
+ V ${u.value($)}`
2909
2936
  // Move to X index, Vertical line to the highest point
2910
2937
  };
2911
- }), v = p(
2912
- () => a.value && gr / (yn(a.value) - 1)
2938
+ }), d = p(
2939
+ () => a.value && _r / (kn(a.value) - 1)
2913
2940
  // Subtracting the first line (read below)
2914
- ), y = p(
2941
+ ), h = p(
2915
2942
  () => {
2916
- var x;
2917
- return ((x = r.value) == null ? void 0 : x.lineWidth) * 2 || void 0;
2943
+ var $;
2944
+ return (($ = r.value) == null ? void 0 : $.lineWidth) * 2 || void 0;
2918
2945
  }
2919
2946
  // If no `lineWidth`, returns NaN which needs to be undefined
2920
- ), $ = p(
2947
+ ), k = p(
2921
2948
  () => a.value.bandwidth() / 2
2922
- ), k = p(() => a.value.domain()), A = p(
2949
+ ), m = p(() => a.value.domain()), A = p(
2923
2950
  () => r.value.withPoints ?? n.withPoints
2924
2951
  );
2925
- function m(x) {
2926
- return c.value[x].values;
2952
+ function f($) {
2953
+ return c.value[$].values;
2927
2954
  }
2928
- function _(x, H) {
2929
- var X, Y;
2930
- const M = x === 0 ? [] : [
2931
- (X = m(H)[x - 1]) == null ? void 0 : X.value,
2932
- (Y = m(H)[x]) == null ? void 0 : Y.value
2955
+ function y($, H) {
2956
+ var Y, K;
2957
+ const S = $ === 0 ? [] : [
2958
+ (Y = f(H)[$ - 1]) == null ? void 0 : Y.value,
2959
+ (K = f(H)[$]) == null ? void 0 : K.value
2933
2960
  ];
2934
- return pr(
2935
- x,
2936
- M,
2961
+ return fr(
2962
+ $,
2963
+ S,
2937
2964
  a.value,
2938
2965
  u.value
2939
2966
  ) || "";
2940
2967
  }
2941
- function E(x) {
2968
+ function E($) {
2942
2969
  return {
2943
- animationDelay: x < 2 ? 0 : (x - 1) * v.value,
2944
- animationDuration: v.value
2970
+ animationDelay: $ < 2 ? 0 : ($ - 1) * d.value,
2971
+ animationDuration: d.value
2945
2972
  };
2946
2973
  }
2947
- function N(x, H) {
2948
- var X;
2949
- const M = (X = m(H)[x]) == null ? void 0 : X.value;
2974
+ function w($, H) {
2975
+ var Y;
2976
+ const S = (Y = f(H)[$]) == null ? void 0 : Y.value;
2950
2977
  return {
2951
- x: ge(a.value) ? n.xScale(k.value[x]) + $.value : n.xScale(x),
2952
- y: u.value(M)
2978
+ x: ye(a.value) ? n.xScale(m.value[$]) + k.value : n.xScale($),
2979
+ y: u.value(S)
2953
2980
  };
2954
2981
  }
2955
- function I(x) {
2956
- return n.hoveredIndex === x;
2982
+ function N($) {
2983
+ return n.hoveredIndex === $;
2957
2984
  }
2958
- return (x, H) => (h(), T("g", fr, [
2959
- j("path", C(l(d), {
2985
+ return ($, H) => (_(), L("g", hr, [
2986
+ G("path", M(l(v), {
2960
2987
  class: "lume-line-group__overlay-line",
2961
2988
  "data-j-lume-line-group__overlay-line": ""
2962
2989
  }), null, 16),
2963
- (h(!0), T(K, null, z(l(c), (M, X) => (h(), T("g", {
2964
- key: M.label,
2990
+ (_(!0), L(J, null, z(l(c), (S, Y) => (_(), L("g", {
2991
+ key: S.label,
2965
2992
  class: "lume-line-group__group"
2966
2993
  }, [
2967
- j("g", hr, [
2968
- (h(!0), T(K, null, z(M.values, (Y, G) => (h(), W(l(lr), C(E(G), {
2969
- key: `line-${G}`,
2970
- color: M.color,
2971
- dashed: M.isDashed(G),
2972
- "path-definition": _(G, X),
2994
+ G("g", mr, [
2995
+ (_(!0), L(J, null, z(S.values, (K, F) => (_(), W(l(ur), M(E(F), {
2996
+ key: `line-${F}`,
2997
+ color: S.color,
2998
+ dashed: S.isDashed(F),
2999
+ "path-definition": y(F, Y),
2973
3000
  transition: e.transition,
2974
3001
  width: l(r).lineWidth,
2975
- onClick: (te) => t("line-click", { index: G, datasetIndex: X, event: te })
3002
+ onClick: (ne) => t("line-click", { index: F, datasetIndex: Y, event: ne })
2976
3003
  }), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
2977
3004
  ]),
2978
- l(A) ? (h(), T("g", mr, [
2979
- (h(!0), T(K, null, z(M.values, (Y, G) => (h(), W(l(cr), C(N(G, X), {
2980
- key: `point-${G}`,
2981
- active: I(G),
2982
- color: M.color,
2983
- index: G,
2984
- radius: l(y),
2985
- onClick: (te) => t("point-click", { index: G, datasetIndex: X, event: te })
3005
+ l(A) ? (_(), L("g", gr, [
3006
+ (_(!0), L(J, null, z(S.values, (K, F) => (_(), W(l(dr), M(w(F, Y), {
3007
+ key: `point-${F}`,
3008
+ active: N(F),
3009
+ color: S.color,
3010
+ index: F,
3011
+ radius: l(h),
3012
+ onClick: (ne) => t("point-click", { index: F, datasetIndex: Y, event: ne })
2986
3013
  }), null, 16, ["active", "color", "index", "radius", "onClick"]))), 128))
2987
3014
  ])) : P("", !0)
2988
3015
  ]))), 128))
2989
3016
  ]));
2990
3017
  }
2991
3018
  });
2992
- const Zt = /* @__PURE__ */ J(_r, [["__scopeId", "data-v-c4d7f0ca"]]), yr = {
2993
- margins: me.VERTICAL,
3019
+ const Ut = /* @__PURE__ */ Q(yr, [["__scopeId", "data-v-c4d7f0ca"]]), kr = {
3020
+ margins: _e.VERTICAL,
2994
3021
  startOnZero: !0,
2995
3022
  withTooltip: !0,
2996
3023
  xAxisOptions: {},
2997
3024
  yAxisOptions: { gridLines: !0 }
2998
- }, Hr = /* @__PURE__ */ Z({
3025
+ }, Br = /* @__PURE__ */ Z({
2999
3026
  __name: "lume-line-chart",
3000
3027
  props: {
3001
- ...be(null, !1)
3028
+ ...Te(null, !1)
3002
3029
  },
3003
3030
  setup(e) {
3004
- const t = e, n = _e(ne()), { options: o } = Q(t), { allOptions: r } = se(o, yr);
3005
- return (a, u) => (h(), W(l(Ae), C(t, {
3031
+ const t = e, n = ke(oe()), { options: o } = q(t), { allOptions: r } = ce(o, kr);
3032
+ return (a, u) => (_(), W(l(Le), M(t, {
3006
3033
  "chart-type": "line",
3007
3034
  options: l(r),
3008
3035
  "data-j-lume-line-chart": ""
3009
- }), le({
3036
+ }), ue({
3010
3037
  groups: V((s) => [
3011
- oe(l(Zt), ue(ie(s)), null, 16)
3038
+ ae(l(Ut), ie(se(s)), null, 16)
3012
3039
  ]),
3013
3040
  _: 2
3014
3041
  }, [
3015
3042
  z(l(n), (s, i) => ({
3016
3043
  name: i,
3017
3044
  fn: V((c) => [
3018
- R(a.$slots, i, ue(ie(c || {})))
3045
+ R(a.$slots, i, ie(se(c || {})))
3019
3046
  ])
3020
3047
  }))
3021
3048
  ]), 1040, ["options"]));
3022
3049
  }
3023
3050
  });
3024
- function kr(e) {
3051
+ function br(e) {
3025
3052
  return { areaPathDefinition: p(
3026
3053
  () => function(n, o) {
3027
3054
  if (!n || !o)
3028
3055
  return;
3029
3056
  const r = e.value[0].values;
3030
- return rn().x((a, u) => n(u)).y0(o(Math.min(...o.domain()))).y1((a) => o(a.value))(r);
3057
+ return ln().x((a, u) => n(u)).y0(o(Math.min(...o.domain()))).y1((a) => o(a.value))(r);
3031
3058
  }
3032
3059
  ) };
3033
3060
  }
3034
- const br = {
3061
+ const Ar = {
3035
3062
  margins: {
3036
3063
  top: 0,
3037
3064
  right: 0,
@@ -3045,82 +3072,82 @@ const br = {
3045
3072
  tooltipOptions: {
3046
3073
  showTitle: !1
3047
3074
  }
3048
- }, Ar = ["d"], Tr = /* @__PURE__ */ Z({
3075
+ }, Tr = ["d"], Lr = /* @__PURE__ */ Z({
3049
3076
  __name: "lume-sparkline-chart",
3050
3077
  props: {
3051
3078
  ...et(null),
3052
- ...$e()
3079
+ ...we()
3053
3080
  },
3054
3081
  setup(e, { expose: t }) {
3055
- const n = e, o = _e(ne()), { data: r, options: a } = Q(n), { internalData: u } = tt(r), { allOptions: s } = se(a, br), { computedLineData: i } = zt(u), { areaPathDefinition: c } = kr(i), d = p(() => u.value[0].color), v = p(
3056
- () => r.value[0].areaColor || d.value
3082
+ const n = e, o = ke(oe()), { data: r, options: a } = q(n), { internalData: u } = tt(r), { allOptions: s } = ce(a, Ar), { computedLineData: i } = Wt(u), { areaPathDefinition: c } = br(i), v = p(() => u.value[0].color), d = p(
3083
+ () => r.value[0].areaColor || v.value
3057
3084
  );
3058
- function y(k) {
3085
+ function h(m) {
3059
3086
  return {
3060
- ...k,
3087
+ ...m,
3061
3088
  noMinSize: !0
3062
3089
  };
3063
3090
  }
3064
- function $(k, A, m) {
3065
- return Oe().range([0, m.width]).domain([0, k[0].values.length - 1]);
3091
+ function k(m, A, f) {
3092
+ return xe().range([0, f.width]).domain([0, m[0].values.length - 1]);
3066
3093
  }
3067
3094
  return t({
3068
3095
  areaPathDefinition: c
3069
- }), (k, A) => (h(), W(l(Ae), C(n, {
3096
+ }), (m, A) => (_(), W(l(Le), M(n, {
3070
3097
  "chart-type": "line",
3071
- options: y(l(s)),
3072
- "x-scale": $
3073
- }), le({
3074
- groups: V((m) => [
3075
- l(s).showArea ? (h(), T("path", {
3098
+ options: h(l(s)),
3099
+ "x-scale": k
3100
+ }), ue({
3101
+ groups: V((f) => [
3102
+ l(s).showArea ? (_(), L("path", {
3076
3103
  key: 0,
3077
- class: ee([
3104
+ class: te([
3078
3105
  "sparkline-chart__area",
3079
3106
  l(a).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
3080
- `lume-fill--${l(v) || l(d)}`,
3107
+ `lume-fill--${l(d) || l(v)}`,
3081
3108
  "lume-fill--faded"
3082
3109
  ]),
3083
- d: l(c)(m.xScale, m.yScale),
3110
+ d: l(c)(f.xScale, f.yScale),
3084
3111
  "data-j-sparkline__area": ""
3085
- }, null, 10, Ar)) : P("", !0),
3086
- oe(l(Zt), C(m, { "with-points": !1 }), null, 16)
3112
+ }, null, 10, Tr)) : P("", !0),
3113
+ ae(l(Ut), M(f, { "with-points": !1 }), null, 16)
3087
3114
  ]),
3088
3115
  _: 2
3089
3116
  }, [
3090
- z(l(o), (m, _) => ({
3091
- name: _,
3117
+ z(l(o), (f, y) => ({
3118
+ name: y,
3092
3119
  fn: V((E) => [
3093
- R(k.$slots, _, ue(ie(E || {})), void 0, !0)
3120
+ R(m.$slots, y, ie(se(E || {})), void 0, !0)
3094
3121
  ])
3095
3122
  }))
3096
3123
  ]), 1040, ["options"]));
3097
3124
  }
3098
3125
  });
3099
- const Br = /* @__PURE__ */ J(Tr, [["__scopeId", "data-v-9fc2cb6e"]]);
3126
+ const Rr = /* @__PURE__ */ Q(Lr, [["__scopeId", "data-v-9fc2cb6e"]]);
3100
3127
  export {
3101
- wr as LumeAlluvialDiagram,
3102
- Ga as LumeAlluvialGroup,
3103
- oa as LumeAlluvialNodeLabel,
3104
- la as LumeAlluvialNodeValue,
3105
- ct as LumeAxis,
3128
+ Ir as LumeAlluvialDiagram,
3129
+ Va as LumeAlluvialGroup,
3130
+ aa as LumeAlluvialNodeLabel,
3131
+ ua as LumeAlluvialNodeValue,
3132
+ dt as LumeAxis,
3106
3133
  qe as LumeBar,
3107
- Ir as LumeBarChart,
3134
+ Er as LumeBarChart,
3108
3135
  nt as LumeBarGroup,
3109
- Ae as LumeChart,
3110
- Yn as LumeChartContainer,
3111
- dt as LumeChartLegend,
3112
- Nr as LumeGroupedBarChart,
3113
- lr as LumeLine,
3114
- Hr as LumeLineChart,
3115
- Zt as LumeLineGroup,
3116
- Bo as LumeOverlayGroup,
3117
- cr as LumePoint,
3118
- Er as LumeSingleBarChart,
3119
- Br as LumeSparklineChart,
3120
- Dr as LumeStackedBarChart,
3121
- yo as LumeTooltip,
3122
- vo as LumeTooltipItem,
3123
- lo as LumeTooltipSummary,
3124
- to as LumeTooltipTitle
3136
+ Le as LumeChart,
3137
+ Kn as LumeChartContainer,
3138
+ vt as LumeChartLegend,
3139
+ Dr as LumeGroupedBarChart,
3140
+ ur as LumeLine,
3141
+ Br as LumeLineChart,
3142
+ Ut as LumeLineGroup,
3143
+ Ro as LumeOverlayGroup,
3144
+ dr as LumePoint,
3145
+ Nr as LumeSingleBarChart,
3146
+ Rr as LumeSparklineChart,
3147
+ Hr as LumeStackedBarChart,
3148
+ ko as LumeTooltip,
3149
+ po as LumeTooltipItem,
3150
+ uo as LumeTooltipSummary,
3151
+ no as LumeTooltipTitle
3125
3152
  };
3126
3153
  //# sourceMappingURL=index.js.map