@adyen/lume 1.2.0 → 1.2.1

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