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