@umriss-ui/charts 0.3.0-rc.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/charts.js CHANGED
@@ -1,21 +1,22 @@
1
- var fe = Object.defineProperty;
2
- var me = (n, t, e) => t in n ? fe(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var g = (n, t, e) => me(n, typeof t != "symbol" ? t + "" : t, e);
4
- import { jsx as I, jsxs as B, Fragment as Nt } from "react/jsx-runtime";
5
- import { useRef as Z, useEffect as D, createContext as pe, useContext as ye, useSyncExternalStore as Et, useCallback as ge, useState as be, useMemo as E } from "react";
6
- function xe() {
1
+ import "./charts.css";
2
+ var ye = Object.defineProperty;
3
+ var ge = (n, t, e) => t in n ? ye(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
4
+ var g = (n, t, e) => ge(n, typeof t != "symbol" ? t + "" : t, e);
5
+ import { jsx as I, jsxs as _, Fragment as Nt } from "react/jsx-runtime";
6
+ import { useRef as X, useEffect as D, createContext as be, useContext as xe, useSyncExternalStore as Et, useCallback as ve, useState as ke, useMemo as E } from "react";
7
+ function Ne() {
7
8
  var t;
8
9
  const n = import.meta;
9
10
  return typeof ((t = n.env) == null ? void 0 : t.DEV) == "boolean" ? n.env.DEV : typeof process < "u" && (process != null && process.env) ? process.env.NODE_ENV !== "production" : !1;
10
11
  }
11
- const st = xe();
12
- function ut(n, t) {
13
- if (st && !n)
12
+ const it = Ne();
13
+ function ct(n, t) {
14
+ if (it && !n)
14
15
  throw new Error(`@umriss-ui/charts: ${t}`);
15
16
  }
16
17
  const Ot = /* @__PURE__ */ new Set();
17
- function q(n, t) {
18
- !st || Ot.has(n) || (Ot.add(n), console.warn(`@umriss-ui/charts: ${t}`));
18
+ function G(n, t) {
19
+ !it || Ot.has(n) || (Ot.add(n), console.warn(`@umriss-ui/charts: ${t}`));
19
20
  }
20
21
  const W = {
21
22
  colorAxis: "rgba(23, 23, 23, 0.17)",
@@ -31,49 +32,78 @@ const W = {
31
32
  }, Ht = /* @__PURE__ */ new WeakMap();
32
33
  let wt = 0;
33
34
  const It = /* @__PURE__ */ new Set();
34
- let bt = null;
35
- function _(n, t, e) {
35
+ let gt = null;
36
+ function bt(n, t, e) {
36
37
  const i = n.getPropertyValue(t).trim();
37
38
  return i === "" ? e : i;
38
39
  }
39
- function ve(n) {
40
- const t = getComputedStyle(n), e = [];
41
- for (let i = 1; i <= 6; i++)
42
- e.push(_(t, `--uc-series-${i}`, W.series[i - 1] ?? "#2563eb"));
43
- return {
44
- colorAxis: _(t, "--uc-color-axis", W.colorAxis),
45
- colorGrid: _(t, "--uc-color-grid", W.colorGrid),
46
- colorText: _(t, "--uc-color-text", W.colorText),
47
- colorBg: _(t, "--uc-color-bg", W.colorBg),
48
- colorWarning: _(t, "--uc-color-warning", W.colorWarning),
49
- colorAlarm: _(t, "--uc-color-alarm", W.colorAlarm),
50
- colorOk: _(t, "--uc-color-ok", W.colorOk),
51
- font: _(t, "--uc-font", W.font),
52
- fontMono: _(t, "--uc-font-mono", W.fontMono),
53
- series: e
54
- };
40
+ function ne(n, t) {
41
+ const e = n.ownerDocument.createElement("span");
42
+ e.setAttribute("aria-hidden", "true"), e.style.position = "absolute", e.style.visibility = "hidden", n.appendChild(e);
43
+ try {
44
+ return t((i) => {
45
+ e.style.color = "", e.style.color = i;
46
+ const r = getComputedStyle(e).color;
47
+ return r === "" || r.startsWith("var(") ? i : r;
48
+ });
49
+ } finally {
50
+ e.remove();
51
+ }
52
+ }
53
+ function we(n) {
54
+ const t = getComputedStyle(n);
55
+ return ne(n, (e) => {
56
+ const i = (s, o) => {
57
+ const a = bt(t, s, o);
58
+ if (a === o) return o;
59
+ const l = e(`var(${s})`);
60
+ return l === `var(${s})` ? a : l;
61
+ }, r = [];
62
+ for (let s = 1; s <= 6; s++)
63
+ r.push(i(`--uc-series-${s}`, W.series[s - 1] ?? "#2563eb"));
64
+ return {
65
+ colorAxis: i("--uc-color-axis", W.colorAxis),
66
+ colorGrid: i("--uc-color-grid", W.colorGrid),
67
+ colorText: i("--uc-color-text", W.colorText),
68
+ colorBg: i("--uc-color-bg", W.colorBg),
69
+ colorWarning: i("--uc-color-warning", W.colorWarning),
70
+ colorAlarm: i("--uc-color-alarm", W.colorAlarm),
71
+ colorOk: i("--uc-color-ok", W.colorOk),
72
+ font: bt(t, "--uc-font", W.font),
73
+ fontMono: bt(t, "--uc-font-mono", W.fontMono),
74
+ series: r
75
+ };
76
+ });
77
+ }
78
+ function ie() {
79
+ var n, t;
80
+ gt === null && (typeof MutationObserver > "u" || typeof document > "u" || (gt = new MutationObserver(() => Rt()), gt.observe(document.documentElement, { attributes: !0 }), typeof window < "u" && typeof window.matchMedia == "function" && ((t = (n = window.matchMedia("(prefers-color-scheme: dark)")).addEventListener) == null || t.call(n, "change", () => Rt()))));
55
81
  }
56
- function ke() {
57
- bt === null && (typeof MutationObserver > "u" || typeof document > "u" || (bt = new MutationObserver(() => we()), bt.observe(document.documentElement, { attributes: !0 })));
82
+ function Xn(n, t) {
83
+ return ie(), ne(n, (e) => {
84
+ const i = {};
85
+ for (const r of Object.keys(t)) i[r] = e(t[r]);
86
+ return i;
87
+ });
58
88
  }
59
- function Ne(n) {
60
- ke();
89
+ function Ie(n) {
90
+ ie();
61
91
  const t = Ht.get(n);
62
92
  if (t !== void 0 && t.generation === wt) return t.theme;
63
- const e = ve(n);
93
+ const e = we(n);
64
94
  return Ht.set(n, { generation: wt, theme: e }), e;
65
95
  }
66
- function we() {
96
+ function Rt() {
67
97
  wt++;
68
98
  for (const n of It) n();
69
99
  }
70
- function Ie(n) {
100
+ function Se(n) {
71
101
  return It.add(n), () => {
72
102
  It.delete(n);
73
103
  };
74
104
  }
75
- const Se = { width: 0, height: 0 };
76
- class Me {
105
+ const Me = { width: 0, height: 0 };
106
+ class Te {
77
107
  constructor(t) {
78
108
  g(this, "span", null);
79
109
  g(this, "root");
@@ -84,16 +114,16 @@ class Me {
84
114
  if (this.span !== null) return this.span;
85
115
  if (typeof document > "u") return null;
86
116
  const t = document.createElement("span");
87
- return t.className = "kc-measure", t.setAttribute("aria-hidden", "true"), this.root.appendChild(t), this.span = t, t;
117
+ return t.className = "uc-measure", t.setAttribute("aria-hidden", "true"), this.root.appendChild(t), this.span = t, t;
88
118
  }
89
119
  /** Width and height of a text in the presentation of the given class. */
90
120
  measure(t, e) {
91
- const i = `${e}|${t}`, s = this.cache.get(i);
92
- if (s !== void 0) return s;
93
- const r = this.ensure();
94
- if (r === null) return Se;
95
- r.className = `kc-measure ${e}`, r.textContent = t;
96
- const o = r.getBoundingClientRect(), a = { width: o.width, height: o.height };
121
+ const i = `${e}|${t}`, r = this.cache.get(i);
122
+ if (r !== void 0) return r;
123
+ const s = this.ensure();
124
+ if (s === null) return Me;
125
+ s.className = `uc-measure ${e}`, s.textContent = t;
126
+ const o = s.getBoundingClientRect(), a = { width: o.width, height: o.height };
97
127
  return this.cache.set(i, a), a;
98
128
  }
99
129
  clear() {
@@ -107,47 +137,47 @@ class Me {
107
137
  function St(n) {
108
138
  return Object.is(n, -0) ? 0 : n;
109
139
  }
110
- function pt(n, t) {
140
+ function mt(n, t) {
111
141
  if (!Number.isFinite(n) || n <= 0) return 1;
112
- const e = Math.max(1, Math.floor(t)), i = n / e, s = Math.pow(10, Math.floor(Math.log10(i))), r = i / s, o = 1e-9;
113
- return (r <= 1 + o ? 1 : r <= 2 + o ? 2 : r <= 5 + o ? 5 : 10) * s;
142
+ const e = Math.max(1, Math.floor(t)), i = n / e, r = Math.pow(10, Math.floor(Math.log10(i))), s = i / r, o = 1e-9;
143
+ return (s <= 1 + o ? 1 : s <= 2 + o ? 2 : s <= 5 + o ? 5 : 10) * r;
114
144
  }
115
145
  function Dt(n) {
116
146
  const t = Math.abs(n);
117
147
  if (!Number.isFinite(t) || t === 0) return 0;
118
148
  const e = Math.floor(Math.log10(t));
119
149
  let i = e < 0 ? -e : 0;
120
- const s = t * 1e-9;
121
- for (; i < 12 && Math.abs(Number(t.toFixed(i)) - t) > s; )
150
+ const r = t * 1e-9;
151
+ for (; i < 12 && Math.abs(Number(t.toFixed(i)) - t) > r; )
122
152
  i++;
123
153
  return i;
124
154
  }
125
155
  function Mt(n, t) {
126
156
  return t <= 0 || !Number.isFinite(n) || Math.abs(n) >= 1e21 ? St(n) : St(Number(n.toFixed(Math.min(20, t))));
127
157
  }
128
- function Te(n, t, e) {
158
+ function Ae(n, t, e) {
129
159
  if (!Number.isFinite(n) || !Number.isFinite(t)) return [0, 1];
130
160
  if (n === t) return [n - 1, t + 1];
131
- const i = pt(t - n, e), s = Dt(i);
161
+ const i = mt(t - n, e), r = Dt(i);
132
162
  return [
133
- Mt(Math.floor(n / i) * i, s),
134
- Mt(Math.ceil(t / i) * i, s)
163
+ Mt(Math.floor(n / i) * i, r),
164
+ Mt(Math.ceil(t / i) * i, r)
135
165
  ];
136
166
  }
137
- function Rt(n, t) {
167
+ function Vt(n, t) {
138
168
  return !Number.isFinite(n) || !Number.isFinite(t) ? [0, 1] : n === t ? [n - 1, t + 1] : [n, t];
139
169
  }
140
- function ee(n, t, e) {
170
+ function re(n, t, e) {
141
171
  if (!Number.isFinite(n) || !Number.isFinite(t)) return [];
142
172
  if (n === t) return [St(n)];
143
- const [i, s] = n < t ? [n, t] : [t, n], r = pt(s - i, e), o = Dt(r), a = r * 1e-9, l = Math.ceil((i - a) / r), c = Math.floor((s + a) / r);
173
+ const [i, r] = n < t ? [n, t] : [t, n], s = mt(r - i, e), o = Dt(s), a = s * 1e-9, l = Math.ceil((i - a) / s), c = Math.floor((r + a) / s);
144
174
  if (!Number.isFinite(l) || !Number.isFinite(c)) return [];
145
175
  const u = [];
146
176
  for (let h = l; h <= c; h++)
147
- u.push(Mt(h * r, o));
177
+ u.push(Mt(h * s, o));
148
178
  return u;
149
179
  }
150
- class Vt {
180
+ class _t {
151
181
  constructor(t, e) {
152
182
  g(this, "domain");
153
183
  g(this, "range");
@@ -165,106 +195,106 @@ class Vt {
165
195
  return this.m === 0 ? this.domain[0] : (t - this.b) / this.m;
166
196
  }
167
197
  ticks(t) {
168
- return ee(this.domain[0], this.domain[1], t);
198
+ return re(this.domain[0], this.domain[1], t);
169
199
  }
170
200
  }
171
- let at = null;
172
- function ne() {
173
- if (at !== null) return at;
201
+ let ot = null;
202
+ function se() {
203
+ if (ot !== null) return ot;
174
204
  const n = typeof navigator > "u" ? void 0 : navigator.language;
175
- return at = typeof n == "string" && n !== "" ? n : "en-US", at;
205
+ return ot = typeof n == "string" && n !== "" ? n : "en-US", ot;
176
206
  }
177
- const dt = /* @__PURE__ */ new Map();
178
- function Ae(n) {
179
- const t = ne(), e = `${t}|${n}`;
180
- let i = dt.get(e);
207
+ const ht = /* @__PURE__ */ new Map();
208
+ function Le(n) {
209
+ const t = se(), e = `${t}|${n}`;
210
+ let i = ht.get(e);
181
211
  return i === void 0 && (i = new Intl.NumberFormat(t, {
182
212
  minimumFractionDigits: n,
183
213
  maximumFractionDigits: n,
184
214
  useGrouping: !0
185
- }), dt.set(e, i)), i;
215
+ }), ht.set(e, i)), i;
186
216
  }
187
- function Le(n, t) {
188
- return Ae(Math.min(6, Dt(t))).format(n);
217
+ function Fe(n, t) {
218
+ return Le(Math.min(6, Dt(t))).format(n);
189
219
  }
190
- function _t(n) {
220
+ function Bt(n) {
191
221
  if (!Number.isFinite(n)) return "–";
192
- const t = ne(), e = `${t}|value`;
193
- let i = dt.get(e);
194
- return i === void 0 && (i = new Intl.NumberFormat(t, { maximumFractionDigits: 3, useGrouping: !0 }), dt.set(e, i)), i.format(n);
195
- }
196
- const K = 1e3, U = 60 * K, Q = 60 * U, X = 24 * Q;
197
- function Fe(n) {
198
- const t = n.filter((r) => Number.isFinite(r.from) && Number.isFinite(r.to) && r.to > r.from).sort((r, o) => r.from - o.from), e = [];
199
- for (const r of t) {
222
+ const t = se(), e = `${t}|value`;
223
+ let i = ht.get(e);
224
+ return i === void 0 && (i = new Intl.NumberFormat(t, { maximumFractionDigits: 3, useGrouping: !0 }), ht.set(e, i)), i.format(n);
225
+ }
226
+ const q = 1e3, K = 60 * q, J = 60 * K, U = 24 * J;
227
+ function Pe(n) {
228
+ const t = n.filter((s) => Number.isFinite(s.from) && Number.isFinite(s.to) && s.to > s.from).sort((s, o) => s.from - o.from), e = [];
229
+ for (const s of t) {
200
230
  const o = e[e.length - 1];
201
- o !== void 0 && r.from <= o.to ? r.to > o.to && (e[e.length - 1] = { from: o.from, to: r.to }) : e.push({ from: r.from, to: r.to });
231
+ o !== void 0 && s.from <= o.to ? s.to > o.to && (e[e.length - 1] = { from: o.from, to: s.to }) : e.push({ from: s.from, to: s.to });
202
232
  }
203
233
  const i = [];
204
- let s = 0;
205
- for (const r of e)
206
- i.push(s), s += r.to - r.from;
207
- return { intervals: e, offsets: i, total: s };
234
+ let r = 0;
235
+ for (const s of e)
236
+ i.push(r), r += s.to - s.from;
237
+ return { intervals: e, offsets: i, total: r };
208
238
  }
209
- const Bt = /* @__PURE__ */ new WeakMap();
210
- function G(n) {
239
+ const Yt = /* @__PURE__ */ new WeakMap();
240
+ function z(n) {
211
241
  if (!Array.isArray(n)) return n;
212
- const t = n, e = Bt.get(t);
242
+ const t = n, e = Yt.get(t);
213
243
  if (e !== void 0) return e;
214
- const i = Fe(t);
215
- return Bt.set(t, i), i;
244
+ const i = Pe(t);
245
+ return Yt.set(t, i), i;
216
246
  }
217
- function Pe(n, t) {
247
+ function Ee(n, t) {
218
248
  const e = n.intervals;
219
- let i = 0, s = e.length - 1, r = -1;
220
- for (; i <= s; ) {
221
- const o = i + s >> 1;
222
- e[o].from <= t ? (r = o, i = o + 1) : s = o - 1;
249
+ let i = 0, r = e.length - 1, s = -1;
250
+ for (; i <= r; ) {
251
+ const o = i + r >> 1;
252
+ e[o].from <= t ? (s = o, i = o + 1) : r = o - 1;
223
253
  }
224
- return r < 0 ? -1 : t <= e[r].to ? r : -1;
254
+ return s < 0 ? -1 : t <= e[s].to ? s : -1;
225
255
  }
226
- function yt(n, t) {
227
- const e = G(t);
256
+ function pt(n, t) {
257
+ const e = z(t);
228
258
  if (e.intervals.length === 0) return n;
229
- const i = Pe(e, n);
259
+ const i = Ee(e, n);
230
260
  return i < 0 ? Number.NaN : e.offsets[i] + (n - e.intervals[i].from);
231
261
  }
232
- function ft(n, t) {
233
- const e = G(t), i = e.intervals;
262
+ function dt(n, t) {
263
+ const e = z(t), i = e.intervals;
234
264
  if (i.length === 0) return n;
235
265
  if (!(n >= 0) || n > e.total) return Number.NaN;
236
266
  if (n === e.total)
237
267
  return i[i.length - 1].to;
238
- let s = 0, r = i.length - 1, o = 0;
239
- for (; s <= r; ) {
240
- const a = s + r >> 1;
241
- e.offsets[a] <= n ? (o = a, s = a + 1) : r = a - 1;
268
+ let r = 0, s = i.length - 1, o = 0;
269
+ for (; r <= s; ) {
270
+ const a = r + s >> 1;
271
+ e.offsets[a] <= n ? (o = a, r = a + 1) : s = a - 1;
242
272
  }
243
273
  return i[o].from + (n - e.offsets[o]);
244
274
  }
245
- function Un(n, t, e, i) {
246
- const s = G(n);
247
- for (let r = 0; r < e; r++)
248
- i[r] = yt(t[r], s);
275
+ function Zn(n, t, e, i) {
276
+ const r = z(n);
277
+ for (let s = 0; s < e; s++)
278
+ i[s] = pt(t[s], r);
249
279
  }
250
- function Ee(n, t) {
251
- const e = G(t);
280
+ function De(n, t) {
281
+ const e = z(t);
252
282
  if (e.intervals.length === 0) return n;
253
- const i = yt(n, e);
283
+ const i = pt(n, e);
254
284
  if (!Number.isNaN(i)) return i;
255
285
  if (!Number.isFinite(n)) return Number.NaN;
256
- for (let s = 0; s < e.intervals.length; s++) {
257
- const r = e.intervals[s];
258
- if (n < r.from) return e.offsets[s];
286
+ for (let r = 0; r < e.intervals.length; r++) {
287
+ const s = e.intervals[r];
288
+ if (n < s.from) return e.offsets[r];
259
289
  }
260
290
  return e.total;
261
291
  }
262
- function De(n, t) {
263
- const e = G(t);
264
- return e.intervals.length === 0 ? !1 : Number.isNaN(yt(n, e));
292
+ function $e(n, t) {
293
+ const e = z(t);
294
+ return e.intervals.length === 0 ? !1 : Number.isNaN(pt(n, e));
265
295
  }
266
- function $e(n) {
267
- const t = G(n), e = [];
296
+ function Ce(n) {
297
+ const t = z(n), e = [];
268
298
  for (let i = 1; i < t.intervals.length; i++)
269
299
  e.push({
270
300
  from: t.intervals[i - 1].to,
@@ -273,109 +303,109 @@ function $e(n) {
273
303
  });
274
304
  return e;
275
305
  }
276
- function Ce(n, t, e) {
277
- return $e(n).map((i) => i.operatingTime).filter((i) => i >= t && i <= e);
306
+ function We(n, t, e) {
307
+ return Ce(n).map((i) => i.operatingTime).filter((i) => i >= t && i <= e);
278
308
  }
279
- const Yt = [
309
+ const zt = [
310
+ q,
311
+ 2 * q,
312
+ 5 * q,
313
+ 10 * q,
314
+ 15 * q,
315
+ 30 * q,
280
316
  K,
281
317
  2 * K,
282
318
  5 * K,
283
319
  10 * K,
284
320
  15 * K,
285
321
  30 * K,
322
+ J,
323
+ 2 * J,
324
+ 3 * J,
325
+ 6 * J,
326
+ 12 * J,
286
327
  U,
287
328
  2 * U,
288
- 5 * U,
289
- 10 * U,
290
- 15 * U,
291
- 30 * U,
292
- Q,
293
- 2 * Q,
294
- 3 * Q,
295
- 6 * Q,
296
- 12 * Q,
297
- X,
298
- 2 * X,
299
- 7 * X,
300
- 14 * X,
301
- 28 * X
329
+ 7 * U,
330
+ 14 * U,
331
+ 28 * U
302
332
  ];
303
- function We(n, t) {
304
- const e = Yt[0];
333
+ function Oe(n, t) {
334
+ const e = zt[0];
305
335
  if (!Number.isFinite(n) || n <= 0) return e;
306
336
  const i = n / Math.max(1, Math.floor(t));
307
- for (const s of Yt) if (s >= i) return s;
308
- return X * pt(i / X, 1);
337
+ for (const r of zt) if (r >= i) return r;
338
+ return U * mt(i / U, 1);
309
339
  }
310
- function Oe(n, t, e, i, s = 0) {
311
- const r = G(n), o = [];
340
+ function He(n, t, e, i, r = 0) {
341
+ const s = z(n), o = [];
312
342
  if (!Number.isFinite(t) || !Number.isFinite(e) || !(i > 0)) return o;
313
- const a = Math.ceil((t - s) / i), l = Math.floor((e - s) / i);
343
+ const a = Math.ceil((t - r) / i), l = Math.floor((e - r) / i);
314
344
  if (!Number.isFinite(a) || !Number.isFinite(l)) return o;
315
345
  let c = Number.NaN;
316
346
  for (let u = a; u <= l; u++) {
317
- const h = s + u * i, p = yt(h, r);
347
+ const h = r + u * i, p = pt(h, s);
318
348
  Number.isNaN(p) || p === c || (o.push({ wallClock: h, operatingTime: p }), c = p);
319
349
  }
320
350
  return o;
321
351
  }
322
- function He(n, t, e, i, s = 0) {
323
- const r = G(n);
324
- if (r.intervals.length === 0 || !(e > t)) return [];
325
- const o = Math.max(0, Math.min(r.total, t)), a = Math.max(0, Math.min(r.total, e)), l = We(e - t, i);
326
- return Oe(
327
- r,
328
- ft(o, r),
329
- ft(a, r),
352
+ function Re(n, t, e, i, r = 0) {
353
+ const s = z(n);
354
+ if (s.intervals.length === 0 || !(e > t)) return [];
355
+ const o = Math.max(0, Math.min(s.total, t)), a = Math.max(0, Math.min(s.total, e)), l = Oe(e - t, i);
356
+ return He(
357
+ s,
358
+ dt(o, s),
359
+ dt(a, s),
330
360
  l,
331
- s
361
+ r
332
362
  ).map((u) => u.operatingTime).filter((u) => u >= t && u <= e);
333
363
  }
334
- const Tt = 5, At = 4, xt = 8, zt = 4, Re = 8, ht = "kc-tick-label", lt = "kc-axis-title", ie = {
364
+ const Tt = 5, At = 4, xt = 8, Gt = 4, Ve = 8, ut = "uc-tick-label", at = "uc-axis-title", oe = {
335
365
  width: 0,
336
366
  height: 0,
337
367
  plot: { x: 0, y: 0, width: 0, height: 0 },
338
368
  axes: []
339
369
  };
340
- function Gt(n, t, e) {
341
- const i = Math.ceil(t), s = e.get(n);
342
- return s === void 0 || i > s || s - i >= Re ? (e.set(n, i), i) : s;
370
+ function qt(n, t, e) {
371
+ const i = Math.ceil(t), r = e.get(n);
372
+ return r === void 0 || i > r || r - i >= Ve ? (e.set(n, i), i) : r;
343
373
  }
344
- function qt(n, t) {
374
+ function Kt(n, t) {
345
375
  const e = n.domainMode;
346
376
  if (Array.isArray(e)) {
347
- const r = e;
348
- return r[0] === r[1] ? [r[0] - 1, r[1] + 1] : r;
377
+ const s = e;
378
+ return s[0] === s[1] ? [s[0] - 1, s[1] + 1] : s;
349
379
  }
350
- const [i, s] = n.extent;
351
- return n.calendar !== void 0 && n.calendar.length > 0 || e === "data" ? Rt(i, s) : Te(i, s, t);
380
+ const [i, r] = n.extent;
381
+ return n.calendar !== void 0 && n.calendar.length > 0 || e === "data" ? Vt(i, r) : Ae(i, r, t);
352
382
  }
353
- function Ve(n) {
383
+ function _e(n) {
354
384
  if (!Number.isFinite(n)) return "";
355
385
  const t = new Date(n), e = (i) => String(i).padStart(2, "0");
356
386
  return `${e(t.getDate())}.${e(t.getMonth() + 1)}. ${e(t.getHours())}:${e(t.getMinutes())}`;
357
387
  }
358
- function Kt(n, t, e) {
388
+ function Ut(n, t, e) {
359
389
  if (n.tickValues !== void 0)
360
- return n.tickValues.filter((s) => s >= t[0] && s <= t[1]);
390
+ return n.tickValues.filter((r) => r >= t[0] && r <= t[1]);
361
391
  const i = n.calendar;
362
- return i !== void 0 && i.length > 0 ? He(i, t[0], t[1], e) : ee(t[0], t[1], e);
392
+ return i !== void 0 && i.length > 0 ? Re(i, t[0], t[1], e) : re(t[0], t[1], e);
363
393
  }
364
- function Ut(n, t, e) {
394
+ function Xt(n, t, e) {
365
395
  const i = n.calendar;
366
396
  if (i !== void 0 && i.length > 0) {
367
- const r = n.tickFormat;
368
- return r === void 0 ? (o) => Ve(ft(o, i)) : (o) => r(ft(o, i));
397
+ const s = n.tickFormat;
398
+ return s === void 0 ? (o) => _e(dt(o, i)) : (o) => s(dt(o, i));
369
399
  }
370
400
  if (n.tickFormat !== void 0) return n.tickFormat;
371
- const s = pt(Math.abs(t[1] - t[0]), e);
372
- return (r) => Le(r, s);
401
+ const r = mt(Math.abs(t[1] - t[0]), e);
402
+ return (s) => Fe(s, r);
373
403
  }
374
- function _e(n) {
375
- const { width: t, height: e, padding: i, axes: s, measure: r, hysteresis: o } = n, a = s.filter((v) => v.position === "left"), l = s.filter((v) => v.position === "right"), c = s.filter((v) => v.position === "top"), u = s.filter((v) => v.position === "bottom"), h = Math.ceil(r("0", ht).height) || 14, p = /* @__PURE__ */ new Map();
404
+ function Be(n) {
405
+ const { width: t, height: e, padding: i, axes: r, measure: s, hysteresis: o } = n, a = r.filter((v) => v.position === "left"), l = r.filter((v) => v.position === "right"), c = r.filter((v) => v.position === "top"), u = r.filter((v) => v.position === "bottom"), h = Math.ceil(s("0", ut).height) || 14, p = /* @__PURE__ */ new Map();
376
406
  for (const v of [...c, ...u]) {
377
- const M = v.label === void 0 || v.label === "" ? 0 : Math.ceil(r(v.label, lt).height) + zt;
378
- p.set(v.key, Gt(v.key, Tt + At + h + M, o));
407
+ const M = v.label === void 0 || v.label === "" ? 0 : Math.ceil(s(v.label, at).height) + Gt;
408
+ p.set(v.key, qt(v.key, Tt + At + h + M, o));
379
409
  }
380
410
  const d = (v, M) => {
381
411
  let x = 0;
@@ -386,13 +416,13 @@ function _e(n) {
386
416
  return x;
387
417
  }, m = i.top + d(c, p), y = e - i.bottom - d(u, p), f = Math.max(0, y - m), b = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map();
388
418
  for (const v of [...a, ...l]) {
389
- const M = v.tickCount ?? Math.max(2, Math.round(f / 50)), x = qt(v, M), A = Kt(v, x, M), $ = Ut(v, x, M), T = A.map($), O = T.map((V) => r(V, ht).width);
419
+ const M = v.tickCount ?? Math.max(2, Math.round(f / 50)), x = Kt(v, M), A = Ut(v, x, M), $ = Xt(v, x, M), T = A.map($), O = T.map((V) => s(V, ut).width);
390
420
  let C = 0;
391
421
  for (const V of O) V > C && (C = V);
392
- const et = v.label === void 0 || v.label === "" ? 0 : Math.ceil(r(v.label, lt).height) + zt;
422
+ const tt = v.label === void 0 || v.label === "" ? 0 : Math.ceil(s(v.label, at).height) + Gt;
393
423
  b.set(v.key, { axis: v, domain: x, values: A, labels: T, widths: O, format: $ }), k.set(
394
424
  v.key,
395
- Gt(v.key, Tt + At + C + et, o)
425
+ qt(v.key, Tt + At + C + tt, o)
396
426
  );
397
427
  }
398
428
  const N = i.left + d(a, k), w = t - i.right - d(l, k), L = Math.max(0, w - N), F = { x: N, y: m, width: L, height: f }, P = (v, M, x, A) => {
@@ -411,12 +441,12 @@ function _e(n) {
411
441
  v.forEach((x, A) => {
412
442
  const $ = k.get(x.key) ?? 0, T = b.get(x.key), O = P(x, A, M, $);
413
443
  M += $ + xt;
414
- const C = (T == null ? void 0 : T.domain) ?? [0, 1], et = (T == null ? void 0 : T.format) ?? ((j) => String(j)), V = new Vt(C, [m + f, m]), nt = ((T == null ? void 0 : T.values) ?? []).map((j, Y) => ({
444
+ const C = (T == null ? void 0 : T.domain) ?? [0, 1], tt = (T == null ? void 0 : T.format) ?? ((j) => String(j)), V = new _t(C, [m + f, m]), et = ((T == null ? void 0 : T.values) ?? []).map((j, B) => ({
415
445
  value: j,
416
- label: (T == null ? void 0 : T.labels[Y]) ?? "",
446
+ label: (T == null ? void 0 : T.labels[B]) ?? "",
417
447
  px: V.toPx(j),
418
448
  labelLeft: 0,
419
- labelWidth: (T == null ? void 0 : T.widths[Y]) ?? 0
449
+ labelWidth: (T == null ? void 0 : T.widths[B]) ?? 0
420
450
  }));
421
451
  S.push({
422
452
  key: x.key,
@@ -430,9 +460,9 @@ function _e(n) {
430
460
  stack: A,
431
461
  domain: C,
432
462
  scale: V,
433
- ticks: nt,
434
- format: et,
435
- titleSize: x.label === void 0 || x.label === "" ? 0 : Math.ceil(r(x.label, lt).height),
463
+ ticks: et,
464
+ format: tt,
465
+ titleSize: x.label === void 0 || x.label === "" ? 0 : Math.ceil(s(x.label, at).height),
436
466
  breaks: []
437
467
  });
438
468
  });
@@ -443,9 +473,9 @@ function _e(n) {
443
473
  v.forEach((x, A) => {
444
474
  const $ = p.get(x.key) ?? 0, T = P(x, A, M, $);
445
475
  M += $ + xt;
446
- const O = x.tickCount ?? Math.max(2, Math.round(L / 80)), C = qt(x, O), et = Kt(x, C, O), V = Ut(x, C, O), nt = new Vt(C, [N, N + L]), j = et.map((Y) => {
447
- const Ct = V(Y), gt = r(Ct, ht).width, Wt = nt.toPx(Y), he = Wt - gt / 2, de = Math.min(Math.max(he, 0), Math.max(0, t - gt));
448
- return { value: Y, label: Ct, px: Wt, labelLeft: de, labelWidth: gt };
476
+ const O = x.tickCount ?? Math.max(2, Math.round(L / 80)), C = Kt(x, O), tt = Ut(x, C, O), V = Xt(x, C, O), et = new _t(C, [N, N + L]), j = tt.map((B) => {
477
+ const Ct = V(B), yt = s(Ct, ut).width, Wt = et.toPx(B), me = Wt - yt / 2, pe = Math.min(Math.max(me, 0), Math.max(0, t - yt));
478
+ return { value: B, label: Ct, px: Wt, labelLeft: pe, labelWidth: yt };
449
479
  });
450
480
  S.push({
451
481
  key: x.key,
@@ -458,67 +488,67 @@ function _e(n) {
458
488
  size: $,
459
489
  stack: A,
460
490
  domain: C,
461
- scale: nt,
491
+ scale: et,
462
492
  ticks: j,
463
493
  format: V,
464
- titleSize: x.label === void 0 || x.label === "" ? 0 : Math.ceil(r(x.label, lt).height),
465
- breaks: x.calendar === void 0 || x.calendar.length === 0 ? [] : Ce(x.calendar, C[0], C[1]).map((Y) => nt.toPx(Y))
494
+ titleSize: x.label === void 0 || x.label === "" ? 0 : Math.ceil(s(x.label, at).height),
495
+ breaks: x.calendar === void 0 || x.calendar.length === 0 ? [] : We(x.calendar, C[0], C[1]).map((B) => et.toPx(B))
466
496
  });
467
497
  });
468
498
  };
469
499
  return R(c), R(u), { width: t, height: e, plot: F, axes: S };
470
500
  }
471
- function Be(n, t, e) {
501
+ function Ye(n, t, e) {
472
502
  if (t <= 0 || !(e >= n[0])) return -1;
473
- let i = 0, s = t - 1;
474
- if (n[s] <= e) return s;
475
- for (; s - i > 1; ) {
476
- const r = i + s >> 1;
477
- n[r] <= e ? i = r : s = r;
503
+ let i = 0, r = t - 1;
504
+ if (n[r] <= e) return r;
505
+ for (; r - i > 1; ) {
506
+ const s = i + r >> 1;
507
+ n[s] <= e ? i = s : r = s;
478
508
  }
479
509
  return i;
480
510
  }
481
- function se(n, t, e, i) {
511
+ function ae(n, t, e, i) {
482
512
  return e + 1 < t ? n[e + 1] : i;
483
513
  }
484
514
  function rt(n, t) {
485
515
  return Number.isFinite(n) ? n : t;
486
516
  }
487
- function re(n) {
517
+ function le(n) {
488
518
  return !Number.isFinite(n);
489
519
  }
490
- function Xt(n, t) {
520
+ function Zt(n, t) {
491
521
  return n < t;
492
522
  }
493
- function Ye(n, t, e, i) {
494
- const s = new Int32Array(e);
495
- for (let r = 0; r < e; r++) {
496
- const o = n[r], a = rt(t[r], i);
497
- if (!Xt(o, a)) continue;
523
+ function ze(n, t, e, i) {
524
+ const r = new Int32Array(e);
525
+ for (let s = 0; s < e; s++) {
526
+ const o = n[s], a = rt(t[s], i);
527
+ if (!Zt(o, a)) continue;
498
528
  let l = 0;
499
- for (let c = 0; c < r; c++) {
529
+ for (let c = 0; c < s; c++) {
500
530
  const u = n[c], h = rt(t[c], i);
501
- Xt(u, h) && o < h && u < a && l++;
531
+ Zt(u, h) && o < h && u < a && l++;
502
532
  }
503
- s[r] = l;
533
+ r[s] = l;
504
534
  }
505
- return s;
535
+ return r;
506
536
  }
507
- function ze(n, t, e, i, s, r, o, a) {
537
+ function Ge(n, t, e, i, r, s, o, a) {
508
538
  const l = o / 2;
509
539
  for (let c = i - 1; c >= 0; c--) {
510
540
  const u = e[c];
511
- if (!(Math.abs(u - r) <= l)) continue;
541
+ if (!(Math.abs(u - s) <= l)) continue;
512
542
  const h = n[c], p = rt(t[c], a);
513
- if (s >= h && s < p) return c;
543
+ if (r >= h && r < p) return c;
514
544
  }
515
545
  return -1;
516
546
  }
517
- function ot(n) {
547
+ function st(n) {
518
548
  return Math.round(n) + 0.5;
519
549
  }
520
- function Ge(n, t) {
521
- const { plot: e, axes: i, theme: s } = t, r = e.x, o = e.x + e.width, a = e.y, l = e.y + e.height;
550
+ function qe(n, t) {
551
+ const { plot: e, axes: i, theme: r } = t, s = e.x, o = e.x + e.width, a = e.y, l = e.y + e.height;
522
552
  n.lineWidth = 1;
523
553
  for (const c of i)
524
554
  if (c.grid)
@@ -529,17 +559,17 @@ function Ge(n, t) {
529
559
  for (const d of c.ticks)
530
560
  if ((c.orientation === "y" && d.value === 0) === h)
531
561
  if (p = !0, c.orientation === "y") {
532
- const y = ot(d.px);
533
- n.moveTo(r, y), n.lineTo(o, y);
562
+ const y = st(d.px);
563
+ n.moveTo(s, y), n.lineTo(o, y);
534
564
  } else {
535
- const y = ot(d.px);
565
+ const y = st(d.px);
536
566
  n.moveTo(y, a), n.lineTo(y, l);
537
567
  }
538
- p && (n.strokeStyle = h ? s.colorAxis : s.colorGrid, n.stroke());
568
+ p && (n.strokeStyle = h ? r.colorAxis : r.colorGrid, n.stroke());
539
569
  }
540
570
  }
541
- function qe(n, t) {
542
- const e = t.length, i = t.xScale.m, s = t.xScale.b, r = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = new Path2D();
571
+ function Ke(n, t) {
572
+ const e = t.length, i = t.xScale.m, r = t.xScale.b, s = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = new Path2D();
543
573
  let u = !1;
544
574
  for (let h = 0; h < e; h++) {
545
575
  const p = l[h];
@@ -547,7 +577,7 @@ function qe(n, t) {
547
577
  u = !1;
548
578
  continue;
549
579
  }
550
- const d = a[h] * i + s, m = p * r + o;
580
+ const d = a[h] * i + r, m = p * s + o;
551
581
  u ? c.lineTo(d, m) : (c.moveTo(d, m), u = !0);
552
582
  }
553
583
  if (n.strokeStyle = t.color, n.lineWidth = t.strokeWidth, t.dash !== void 0 && t.dash.length > 0 ? n.setLineDash(t.dash) : n.setLineDash([]), n.stroke(c), n.setLineDash([]), t.marker) {
@@ -555,14 +585,14 @@ function qe(n, t) {
555
585
  for (let d = 0; d < e; d++) {
556
586
  const m = l[d];
557
587
  if (Number.isNaN(m)) continue;
558
- const y = a[d] * i + s, f = m * r + o;
588
+ const y = a[d] * i + r, f = m * s + o;
559
589
  p.moveTo(y + h, f), p.arc(y, f, h, 0, Math.PI * 2);
560
590
  }
561
591
  n.fillStyle = t.color, n.fill(p);
562
592
  }
563
593
  }
564
- function Ke(n, t) {
565
- const e = t.length, i = t.xScale.m, s = t.xScale.b, r = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = t.y0, u = t.baseline * r + o, h = new Path2D(), p = new Path2D();
594
+ function Ue(n, t) {
595
+ const e = t.length, i = t.xScale.m, r = t.xScale.b, s = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = t.y0, u = t.baseline * s + o, h = new Path2D(), p = new Path2D();
566
596
  let d = 0;
567
597
  for (; d < e; ) {
568
598
  for (; d < e && (Number.isNaN(l[d]) || c !== null && Number.isNaN(c[d])); )
@@ -573,40 +603,40 @@ function Ke(n, t) {
573
603
  d++;
574
604
  const y = d - 1;
575
605
  for (let f = m; f <= y; f++) {
576
- const b = a[f] * i + s, k = l[f] * r + o;
606
+ const b = a[f] * i + r, k = l[f] * s + o;
577
607
  f === m ? (h.moveTo(b, k), p.moveTo(b, k)) : (h.lineTo(b, k), p.lineTo(b, k));
578
608
  }
579
609
  if (c === null)
580
- h.lineTo(a[y] * i + s, u), h.lineTo(a[m] * i + s, u);
610
+ h.lineTo(a[y] * i + r, u), h.lineTo(a[m] * i + r, u);
581
611
  else
582
612
  for (let f = y; f >= m; f--)
583
- h.lineTo(a[f] * i + s, c[f] * r + o);
613
+ h.lineTo(a[f] * i + r, c[f] * s + o);
584
614
  h.closePath();
585
615
  }
586
616
  n.globalAlpha = t.alpha * t.fillOpacity, n.fillStyle = t.color, n.fill(h), t.strokeWidth > 0 && (n.globalAlpha = t.alpha, n.strokeStyle = t.color, n.lineWidth = t.strokeWidth, n.setLineDash([]), n.stroke(p));
587
617
  }
588
- function Ue(n, t) {
589
- const e = t.length, i = t.xScale.m, s = t.xScale.b, r = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = t.baseline * r + o, u = t.offset * i, h = t.width * i, p = new Path2D();
618
+ function Xe(n, t) {
619
+ const e = t.length, i = t.xScale.m, r = t.xScale.b, s = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = t.baseline * s + o, u = t.offset * i, h = t.width * i, p = new Path2D();
590
620
  for (let d = 0; d < e; d++) {
591
621
  const m = l[d];
592
622
  if (Number.isNaN(m)) continue;
593
- const y = a[d] * i + s + u, f = m * r + o;
623
+ const y = a[d] * i + r + u, f = m * s + o;
594
624
  p.rect(y, f, h, c - f);
595
625
  }
596
626
  n.fillStyle = t.color, n.fill(p);
597
627
  }
598
- function Xe(n, t) {
599
- const e = t.length, i = t.xScale.m, s = t.xScale.b, r = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = t.radius, u = new Path2D();
628
+ function Ze(n, t) {
629
+ const e = t.length, i = t.xScale.m, r = t.xScale.b, s = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = t.radius, u = new Path2D();
600
630
  for (let h = 0; h < e; h++) {
601
631
  const p = l[h];
602
632
  if (Number.isNaN(p)) continue;
603
- const d = a[h] * i + s, m = p * r + o;
633
+ const d = a[h] * i + r, m = p * s + o;
604
634
  u.moveTo(d + c, m), u.arc(d, m, c, 0, Math.PI * 2);
605
635
  }
606
636
  n.fillStyle = t.color, n.fill(u);
607
637
  }
608
- function Ze(n, t) {
609
- const e = t.length, i = t.xScale.m, s = t.xScale.b, r = t.x, o = t.y, a = t.laneTop, l = t.laneBottom - t.laneTop, c = t.colors.length;
638
+ function je(n, t) {
639
+ const e = t.length, i = t.xScale.m, r = t.xScale.b, s = t.x, o = t.y, a = t.laneTop, l = t.laneBottom - t.laneTop, c = t.colors.length;
610
640
  if (c === 0 || l <= 0) return;
611
641
  const u = [];
612
642
  for (let p = 0; p < c; p++) u.push(new Path2D());
@@ -616,31 +646,31 @@ function Ze(n, t) {
616
646
  if (Number.isNaN(d)) continue;
617
647
  const m = d | 0, y = u[m];
618
648
  if (y === void 0) continue;
619
- const f = r[p], b = se(r, e, p, t.domainEnd);
620
- b > f && (y.rect(f * i + s, a, (b - f) * i, l), h = !0);
649
+ const f = s[p], b = ae(s, e, p, t.domainEnd);
650
+ b > f && (y.rect(f * i + r, a, (b - f) * i, l), h = !0);
621
651
  }
622
652
  if (h)
623
653
  for (let p = 0; p < c; p++)
624
654
  n.fillStyle = t.colors[p], n.fill(u[p]);
625
655
  }
626
656
  function Je(n, t) {
627
- const e = t.length, i = t.xScale.m, s = t.xScale.b, r = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = t.buckets, u = t.colors.length;
657
+ const e = t.length, i = t.xScale.m, r = t.xScale.b, s = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = t.buckets, u = t.colors.length;
628
658
  if (u === 0) return;
629
- const h = t.width * i, p = Math.abs(t.height * r), d = [];
659
+ const h = t.width * i, p = Math.abs(t.height * s), d = [];
630
660
  for (let m = 0; m < u; m++) d.push(new Path2D());
631
661
  for (let m = 0; m < e; m++) {
632
662
  const y = c[m];
633
663
  if (y < 0) continue;
634
664
  const f = d[y];
635
665
  if (f === void 0) continue;
636
- const b = a[m] * i + s - h / 2, k = l[m] * r + o - p / 2;
666
+ const b = a[m] * i + r - h / 2, k = l[m] * s + o - p / 2;
637
667
  f.rect(b, k, h, p);
638
668
  }
639
669
  for (let m = 0; m < u; m++)
640
670
  n.fillStyle = t.colors[m], n.fill(d[m]);
641
671
  }
642
- function je(n, t) {
643
- const e = t.length, i = t.xScale.m, s = t.xScale.b, r = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = t.x1, u = t.depth, h = Math.abs(t.height * r), p = h * 0.28, d = new Path2D(), m = new Path2D();
672
+ function Qe(n, t) {
673
+ const e = t.length, i = t.xScale.m, r = t.xScale.b, s = t.yScale.m, o = t.yScale.b, a = t.x, l = t.y, c = t.x1, u = t.depth, h = Math.abs(t.height * s), p = h * 0.28, d = new Path2D(), m = new Path2D();
644
674
  for (let y = 0; y < e; y++) {
645
675
  const f = l[y];
646
676
  if (Number.isNaN(f)) continue;
@@ -648,100 +678,100 @@ function je(n, t) {
648
678
  if (Number.isNaN(b)) continue;
649
679
  const k = c[y], N = rt(k, t.domainEnd);
650
680
  if (!(N >= b)) continue;
651
- const w = b * i + s, L = Math.max(1, (N - b) * i), F = f * r + o + u[y] * p;
652
- (re(k) ? m : d).rect(w, F - h / 2, L, h);
681
+ const w = b * i + r, L = Math.max(1, (N - b) * i), F = f * s + o + u[y] * p;
682
+ (le(k) ? m : d).rect(w, F - h / 2, L, h);
653
683
  }
654
684
  n.fillStyle = t.color, n.fill(d), n.save(), n.globalAlpha = n.globalAlpha * 0.45, n.fill(m), n.restore(), n.strokeStyle = t.color, n.lineWidth = 1, n.setLineDash([3, 2]), n.stroke(m), n.setLineDash([]);
655
685
  }
656
- function Zt(n, t, e) {
686
+ function jt(n, t, e) {
657
687
  for (const i of e) {
658
688
  if (i.band) {
659
- const s = Math.min(i.fromPx, i.toPx), r = Math.max(i.fromPx, i.toPx);
660
- n.fillStyle = i.color, n.save(), n.globalAlpha = 0.12, i.orientation === "y" ? n.fillRect(t.x, s, t.width, r - s) : n.fillRect(s, t.y, r - s, t.height), n.restore();
689
+ const r = Math.min(i.fromPx, i.toPx), s = Math.max(i.fromPx, i.toPx);
690
+ n.fillStyle = i.color, n.save(), n.globalAlpha = 0.12, i.orientation === "y" ? n.fillRect(t.x, r, t.width, s - r) : n.fillRect(r, t.y, s - r, t.height), n.restore();
661
691
  continue;
662
692
  }
663
693
  if (n.beginPath(), i.orientation === "y") {
664
- const s = ot(i.fromPx);
665
- n.moveTo(t.x, s), n.lineTo(t.x + t.width, s);
694
+ const r = st(i.fromPx);
695
+ n.moveTo(t.x, r), n.lineTo(t.x + t.width, r);
666
696
  } else {
667
- const s = ot(i.fromPx);
668
- n.moveTo(s, t.y), n.lineTo(s, t.y + t.height);
697
+ const r = st(i.fromPx);
698
+ n.moveTo(r, t.y), n.lineTo(r, t.y + t.height);
669
699
  }
670
700
  n.strokeStyle = i.color, n.lineWidth = 1, n.setLineDash(i.dash), n.stroke(), n.setLineDash([]);
671
701
  }
672
702
  }
673
- function Qe(n, t) {
674
- const { width: e, height: i, plot: s, series: r } = t;
675
- if (n.clearRect(0, 0, e, i), !(s.width <= 0 || s.height <= 0)) {
676
- Ge(n, t), n.save(), n.beginPath(), n.rect(s.x, s.y, s.width, s.height), n.clip(), n.lineJoin = "round", n.lineCap = "round", n.globalAlpha = 1, Zt(n, s, t.limitBands);
677
- for (const o of r)
703
+ function tn(n, t) {
704
+ const { width: e, height: i, plot: r, series: s } = t;
705
+ if (n.clearRect(0, 0, e, i), !(r.width <= 0 || r.height <= 0)) {
706
+ qe(n, t), n.save(), n.beginPath(), n.rect(r.x, r.y, r.width, r.height), n.clip(), n.lineJoin = "round", n.lineCap = "round", n.globalAlpha = 1, jt(n, r, t.limitBands);
707
+ for (const o of s)
678
708
  if (o.length !== 0)
679
709
  switch (n.globalAlpha = o.alpha, o.kind) {
680
710
  case "line":
681
- qe(n, o);
711
+ Ke(n, o);
682
712
  break;
683
713
  case "area":
684
- Ke(n, o);
714
+ Ue(n, o);
685
715
  break;
686
716
  case "bar":
687
- Ue(n, o);
717
+ Xe(n, o);
688
718
  break;
689
719
  case "scatter":
690
- Xe(n, o);
720
+ Ze(n, o);
691
721
  break;
692
722
  case "state":
693
- Ze(n, o);
723
+ je(n, o);
694
724
  break;
695
725
  case "matrix":
696
726
  Je(n, o);
697
727
  break;
698
728
  case "span":
699
- je(n, o);
729
+ Qe(n, o);
700
730
  break;
701
731
  }
702
- n.globalAlpha = 1, Zt(n, s, t.limitLines), n.restore();
732
+ n.globalAlpha = 1, jt(n, r, t.limitLines), n.restore();
703
733
  }
704
734
  }
705
- function tn(n, t) {
706
- const { width: e, height: i, plot: s, theme: r, hover: o } = t;
707
- if (n.clearRect(0, 0, e, i), o === null || s.width <= 0 || s.height <= 0) return;
708
- const a = ot(o.hit.xPx);
709
- a >= s.x && a <= s.x + s.width && (n.beginPath(), n.moveTo(a, s.y), n.lineTo(a, s.y + s.height), n.lineWidth = 1, n.strokeStyle = r.colorAxis, n.setLineDash([]), n.stroke());
735
+ function en(n, t) {
736
+ const { width: e, height: i, plot: r, theme: s, hover: o } = t;
737
+ if (n.clearRect(0, 0, e, i), o === null || r.width <= 0 || r.height <= 0) return;
738
+ const a = st(o.hit.xPx);
739
+ a >= r.x && a <= r.x + r.width && (n.beginPath(), n.moveTo(a, r.y), n.lineTo(a, r.y + r.height), n.lineWidth = 1, n.strokeStyle = s.colorAxis, n.setLineDash([]), n.stroke());
710
740
  for (const l of o.marker)
711
- n.beginPath(), n.arc(l.x, l.y, 5.5, 0, Math.PI * 2), n.fillStyle = r.colorBg, n.fill(), n.beginPath(), n.arc(l.x, l.y, 3.5, 0, Math.PI * 2), n.fillStyle = l.color, n.fill();
741
+ n.beginPath(), n.arc(l.x, l.y, 5.5, 0, Math.PI * 2), n.fillStyle = s.colorBg, n.fill(), n.beginPath(), n.arc(l.x, l.y, 3.5, 0, Math.PI * 2), n.fillStyle = l.color, n.fill();
712
742
  }
713
- function en(n, t, e) {
743
+ function nn(n, t, e) {
714
744
  if (t <= 0) return -1;
715
745
  if (t === 1) return 0;
716
- let i = 0, s = t - 1;
746
+ let i = 0, r = t - 1;
717
747
  if (e <= n[i]) return i;
718
- if (e >= n[s]) return s;
719
- for (; s - i > 1; ) {
720
- const a = i + s >> 1;
721
- n[a] <= e ? i = a : s = a;
748
+ if (e >= n[r]) return r;
749
+ for (; r - i > 1; ) {
750
+ const a = i + r >> 1;
751
+ n[a] <= e ? i = a : r = a;
722
752
  }
723
- const r = e - n[i];
724
- return n[s] - e < r ? s : i;
753
+ const s = e - n[i];
754
+ return n[r] - e < s ? r : i;
725
755
  }
726
756
  function Jt(n, t) {
727
757
  if (t < 2) return 0;
728
758
  const e = n.slice(0, t).sort();
729
759
  let i = Number.POSITIVE_INFINITY;
730
- for (let s = 1; s < t; s++) {
731
- const r = e[s] - e[s - 1];
732
- r > 0 && r < i && (i = r);
760
+ for (let r = 1; r < t; r++) {
761
+ const s = e[r] - e[r - 1];
762
+ s > 0 && s < i && (i = s);
733
763
  }
734
764
  return Number.isFinite(i) ? i : 0;
735
765
  }
736
- function ct(n, t) {
766
+ function lt(n, t) {
737
767
  return n > 0 ? n : t;
738
768
  }
739
- function nn(n, t, e, i, s, r, o) {
740
- const a = r / 2, l = o / 2;
769
+ function rn(n, t, e, i, r, s, o) {
770
+ const a = s / 2, l = o / 2;
741
771
  for (let c = 0; c < e; c++) {
742
772
  const u = i - n[c];
743
773
  if (!(u >= -a && u < a)) continue;
744
- const h = s - t[c];
774
+ const h = r - t[c];
745
775
  if (h >= -l && h < l)
746
776
  return c;
747
777
  }
@@ -753,33 +783,33 @@ const sn = {
753
783
  warning: 2,
754
784
  alarm: 3
755
785
  };
756
- function Xn(n) {
786
+ function jn(n) {
757
787
  return sn[n];
758
788
  }
759
- const jt = { warning: 2, alarm: 3 };
760
- function rn(n, t = {}) {
789
+ const Qt = { warning: 2, alarm: 3 };
790
+ function on(n, t = {}) {
761
791
  if (n == null || !Number.isFinite(n))
762
792
  return { verdict: "unknown" };
763
793
  const e = t.target, i = e !== void 0 && Number.isFinite(e) ? n - e : void 0;
764
- let s, r = 0;
794
+ let r, s = 0;
765
795
  for (const a of t.limits ?? []) {
766
796
  const l = a.side === "upper" ? n - a.value : a.value - n;
767
- l > 0 && (s === void 0 || jt[a.severity] > jt[s.severity] || a.severity === s.severity && l > r) && (s = a, r = l);
797
+ l > 0 && (r === void 0 || Qt[a.severity] > Qt[r.severity] || a.severity === r.severity && l > s) && (r = a, s = l);
768
798
  }
769
- if (s === void 0)
799
+ if (r === void 0)
770
800
  return i === void 0 ? { verdict: "ok" } : { verdict: "ok", deviation: i };
771
801
  const o = {
772
- verdict: s.severity,
773
- limit: s,
774
- excess: r
802
+ verdict: r.severity,
803
+ limit: r,
804
+ excess: s
775
805
  };
776
806
  return i === void 0 ? o : { ...o, deviation: i };
777
807
  }
778
- function on(n, t, e, i, s) {
779
- const r = n.length, o = new Float64Array(r), a = new Float64Array(r), l = typeof i == "function" ? i : null, c = l === null ? null : new Float64Array(r), u = (s == null ? void 0 : s.value) ?? null, h = u === null ? null : new Float64Array(r), p = (s == null ? void 0 : s.xEnd) ?? null, d = p === null ? null : new Float64Array(r), m = (s == null ? void 0 : s.xMap) ?? null, y = (s == null ? void 0 : s.xGap) ?? null;
808
+ function an(n, t, e, i, r) {
809
+ const s = n.length, o = new Float64Array(s), a = new Float64Array(s), l = typeof i == "function" ? i : null, c = l === null ? null : new Float64Array(s), u = (r == null ? void 0 : r.value) ?? null, h = u === null ? null : new Float64Array(s), p = (r == null ? void 0 : r.xEnd) ?? null, d = p === null ? null : new Float64Array(s), m = (r == null ? void 0 : r.xMap) ?? null, y = (r == null ? void 0 : r.xGap) ?? null;
780
810
  let f = Number.POSITIVE_INFINITY, b = Number.NEGATIVE_INFINITY, k = Number.POSITIVE_INFINITY, N = Number.NEGATIVE_INFINITY;
781
- typeof i == "number" && r > 0 && (k = i, N = i);
782
- for (let w = 0; w < r; w++) {
811
+ typeof i == "number" && s > 0 && (k = i, N = i);
812
+ for (let w = 0; w < s; w++) {
783
813
  const L = n[w], F = t(L, w), P = m === null ? F : m(F);
784
814
  o[w] = P;
785
815
  const S = y !== null && y(F);
@@ -797,90 +827,90 @@ function on(n, t, e, i, s) {
797
827
  c[w] = M, M < k && (k = M), M > N && (N = M);
798
828
  }
799
829
  }
800
- return { series: { x: o, y: a, y0: c, w: h, x1: d, length: r }, extent: { xMin: f, xMax: b, yMin: k, yMax: N } };
830
+ return { series: { x: o, y: a, y0: c, w: h, x1: d, length: s }, extent: { xMin: f, xMax: b, yMin: k, yMax: N } };
801
831
  }
802
- function an(n, t) {
832
+ function ln(n, t) {
803
833
  for (let e = 1; e < t; e++)
804
834
  if (n[e] < n[e - 1]) return e;
805
835
  return -1;
806
836
  }
807
- function ln(n, t, e, i) {
808
- let s = Number.POSITIVE_INFINITY, r = Number.NEGATIVE_INFINITY;
837
+ function cn(n, t, e, i) {
838
+ let r = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY;
809
839
  for (const o of e) {
810
840
  const a = o.extent;
811
841
  if (a === null || !(n === "x" ? o.xAxisId === t : o.yAxisId === t)) continue;
812
842
  const c = n === "x" ? a.xMin : a.yMin, u = n === "x" ? a.xMax : a.yMax;
813
- c < s && (s = c), u > r && (r = u);
843
+ c < r && (r = c), u > s && (s = u);
814
844
  }
815
845
  if (i !== void 0)
816
846
  for (const o of i)
817
- Number.isFinite(o) && (o < s && (s = o), o > r && (r = o));
818
- return !Number.isFinite(s) || !Number.isFinite(r) ? [0, 1] : [s, r];
847
+ Number.isFinite(o) && (o < r && (r = o), o > s && (s = o));
848
+ return !Number.isFinite(r) || !Number.isFinite(s) ? [0, 1] : [r, s];
819
849
  }
820
- function cn(n, t) {
850
+ function un(n, t) {
821
851
  let e = Number.POSITIVE_INFINITY;
822
852
  for (let i = 1; i < t; i++) {
823
- const s = n[i] - n[i - 1];
824
- s > 0 && s < e && (e = s);
853
+ const r = n[i] - n[i - 1];
854
+ r > 0 && r < e && (e = r);
825
855
  }
826
856
  return Number.isFinite(e) ? e : 0;
827
857
  }
828
- function un(n, t) {
858
+ function hn(n, t) {
829
859
  return n > 0 ? n : t;
830
860
  }
831
- function hn(n, t, e, i) {
832
- const s = n * t, r = s / i;
833
- return { offset: -s / 2 + e * r, width: r };
861
+ function dn(n, t, e, i) {
862
+ const r = n * t, s = r / i;
863
+ return { offset: -r / 2 + e * s, width: s };
834
864
  }
835
- function dn(n) {
865
+ function fn(n) {
836
866
  const t = /* @__PURE__ */ new Map();
837
867
  for (const i of n) {
838
868
  if (i.kind !== "bar") continue;
839
- const s = t.get(i.xAxisId);
840
- s === void 0 ? t.set(i.xAxisId, [i]) : s.push(i);
869
+ const r = t.get(i.xAxisId);
870
+ r === void 0 ? t.set(i.xAxisId, [i]) : r.push(i);
841
871
  }
842
872
  const e = /* @__PURE__ */ new Map();
843
873
  for (const i of t.values()) {
844
- let s = Number.POSITIVE_INFINITY;
874
+ let r = Number.POSITIVE_INFINITY;
845
875
  for (const a of i)
846
- a.step > 0 && a.step < s && (s = a.step);
847
- const r = Number.isFinite(s) ? s : 0, o = i[0].fraction;
876
+ a.step > 0 && a.step < r && (r = a.step);
877
+ const s = Number.isFinite(r) ? r : 0, o = i[0].fraction;
848
878
  i.forEach((a, l) => {
849
879
  e.set(a.order, {
850
880
  index: l,
851
881
  size: i.length,
852
- step: r,
882
+ step: s,
853
883
  fraction: o
854
884
  });
855
885
  });
856
886
  }
857
887
  return e;
858
888
  }
859
- const Qt = {
889
+ const te = {
860
890
  version: 0,
861
- layout: ie,
891
+ layout: oe,
862
892
  legend: null,
863
893
  series: [],
864
894
  limits: []
865
- }, te = {
895
+ }, ee = {
866
896
  version: 0,
867
897
  hover: null,
868
898
  tooltip: null,
869
899
  xLabel: ""
870
- }, fn = 4, mn = 60;
900
+ }, mn = 4, pn = 60;
871
901
  let vt = 0;
872
- const pn = new Float64Array(0), yn = new Int32Array(0);
873
- function z(n, t) {
902
+ const yn = new Float64Array(0), gn = new Int32Array(0);
903
+ function Y(n, t) {
874
904
  return n === t ? !0 : typeof n != "function" || typeof t != "function" ? !1 : String(n) === String(t);
875
905
  }
876
- function mt(n, t) {
906
+ function ft(n, t) {
877
907
  if (n === t) return !0;
878
908
  if (n === void 0 || t === void 0 || n.length !== t.length) return !1;
879
909
  for (let e = 0; e < n.length; e++) if (n[e] !== t[e]) return !1;
880
910
  return !0;
881
911
  }
882
- function gn(n, t) {
883
- return n.kind === t.kind && z(n.accessor, t.accessor) && n.data === t.data && z(Pt(n), Pt(t)) && z(Lt(n), Lt(t)) && z(Ft(n), Ft(t));
912
+ function bn(n, t) {
913
+ return n.kind === t.kind && Y(n.accessor, t.accessor) && n.data === t.data && Y(Pt(n), Pt(t)) && Y(Lt(n), Lt(t)) && Y(Ft(n), Ft(t));
884
914
  }
885
915
  function Lt(n) {
886
916
  return n.kind === "matrix" ? n.value : void 0;
@@ -903,16 +933,16 @@ function Pt(n) {
903
933
  return;
904
934
  }
905
935
  }
906
- function bn(n, t) {
936
+ function xn(n, t) {
907
937
  if (n.kind !== t.kind) return !1;
908
938
  switch (t.kind) {
909
939
  case "line": {
910
940
  const e = n;
911
- return e.strokeWidth === t.strokeWidth && e.markers === t.markers && mt(e.dash, t.dash);
941
+ return e.strokeWidth === t.strokeWidth && e.markers === t.markers && ft(e.dash, t.dash);
912
942
  }
913
943
  case "area": {
914
944
  const e = n;
915
- return z(e.baseline, t.baseline) && e.fillOpacity === t.fillOpacity && e.strokeWidth === t.strokeWidth;
945
+ return Y(e.baseline, t.baseline) && e.fillOpacity === t.fillOpacity && e.strokeWidth === t.strokeWidth;
916
946
  }
917
947
  case "bar":
918
948
  return n.barWidth === t.barWidth;
@@ -920,64 +950,64 @@ function bn(n, t) {
920
950
  return n.radius === t.radius;
921
951
  case "state": {
922
952
  const e = n;
923
- return e.laneFrom === t.laneFrom && e.laneTo === t.laneTo && xn(e.states, t.states);
953
+ return e.laneFrom === t.laneFrom && e.laneTo === t.laneTo && vn(e.states, t.states);
924
954
  }
925
955
  case "matrix":
926
- return vn(n.coloring, t.coloring);
956
+ return kn(n.coloring, t.coloring);
927
957
  case "span":
928
958
  return n.height === t.height;
929
959
  }
930
960
  }
931
- function xn(n, t) {
932
- var e, i, s, r;
961
+ function vn(n, t) {
962
+ var e, i, r, s;
933
963
  if (n === t) return !0;
934
964
  if (n.length !== t.length) return !1;
935
965
  for (let o = 0; o < n.length; o++)
936
- if (((e = n[o]) == null ? void 0 : e.label) !== ((i = t[o]) == null ? void 0 : i.label) || ((s = n[o]) == null ? void 0 : s.color) !== ((r = t[o]) == null ? void 0 : r.color)) return !1;
966
+ if (((e = n[o]) == null ? void 0 : e.label) !== ((i = t[o]) == null ? void 0 : i.label) || ((r = n[o]) == null ? void 0 : r.color) !== ((s = t[o]) == null ? void 0 : s.color)) return !1;
937
967
  return !0;
938
968
  }
939
- function vn(n, t) {
940
- return n === t ? !0 : n.kind !== t.kind ? !1 : n.kind === "assessment" && t.kind === "assessment" ? n.limits === t.limits : n.kind === "gradient" && t.kind === "gradient" ? mt(n.stops, t.stops) && mt(n.range, t.range) : !1;
941
- }
942
969
  function kn(n, t) {
970
+ return n === t ? !0 : n.kind !== t.kind ? !1 : n.kind === "assessment" && t.kind === "assessment" ? n.limits === t.limits : n.kind === "gradient" && t.kind === "gradient" ? ft(n.stops, t.stops) && ft(n.range, t.range) : !1;
971
+ }
972
+ function Nn(n, t) {
943
973
  return n.kind === "assessment" ? [t.colorOk, t.colorWarning, t.colorAlarm] : n.stops;
944
974
  }
945
- function Nn(n, t, e) {
975
+ function wn(n, t, e) {
946
976
  var c, u;
947
- const i = n.length, s = new Int32Array(i), r = n.w;
948
- if (r === null || e === 0)
949
- return s.fill(-1), s;
977
+ const i = n.length, r = new Int32Array(i), s = n.w;
978
+ if (s === null || e === 0)
979
+ return r.fill(-1), r;
950
980
  if (t.kind === "assessment") {
951
981
  for (let h = 0; h < i; h++) {
952
- const p = rn(r[h], t.limits);
953
- s[h] = p.verdict === "alarm" ? 2 : p.verdict === "warning" ? 1 : p.verdict === "ok" ? 0 : -1;
982
+ const p = on(s[h], t.limits);
983
+ r[h] = p.verdict === "alarm" ? 2 : p.verdict === "warning" ? 1 : p.verdict === "ok" ? 0 : -1;
954
984
  }
955
- return s;
985
+ return r;
956
986
  }
957
987
  let o = (c = t.range) == null ? void 0 : c[0], a = (u = t.range) == null ? void 0 : u[1];
958
988
  if (o === void 0 || a === void 0) {
959
989
  o = Number.POSITIVE_INFINITY, a = Number.NEGATIVE_INFINITY;
960
990
  for (let h = 0; h < i; h++) {
961
- const p = r[h];
991
+ const p = s[h];
962
992
  Number.isFinite(p) && (p < o && (o = p), p > a && (a = p));
963
993
  }
964
994
  }
965
995
  const l = a - o;
966
996
  for (let h = 0; h < i; h++) {
967
- const p = r[h];
997
+ const p = s[h];
968
998
  if (!Number.isFinite(p)) {
969
- s[h] = -1;
999
+ r[h] = -1;
970
1000
  continue;
971
1001
  }
972
1002
  const d = l > 0 ? (p - o) / l : 0.5, m = Math.floor(d * e);
973
- s[h] = m < 0 ? 0 : m >= e ? e - 1 : m;
1003
+ r[h] = m < 0 ? 0 : m >= e ? e - 1 : m;
974
1004
  }
975
- return s;
1005
+ return r;
976
1006
  }
977
- function wn(n, t) {
1007
+ function In(n, t) {
978
1008
  return n === t ? !0 : Array.isArray(n) && Array.isArray(t) ? n[0] === t[0] && n[1] === t[1] : !1;
979
1009
  }
980
- class oe {
1010
+ class ce {
981
1011
  constructor() {
982
1012
  /* ---------- Registration ---------- */
983
1013
  g(this, "series", /* @__PURE__ */ new Map());
@@ -1016,15 +1046,15 @@ class oe {
1016
1046
  g(this, "theme", null);
1017
1047
  g(this, "unsubscribeTheme", null);
1018
1048
  /* ---------- Layout and interaction ---------- */
1019
- g(this, "layout", ie);
1049
+ g(this, "layout", oe);
1020
1050
  g(this, "hysteresis", /* @__PURE__ */ new Map());
1021
1051
  g(this, "hover", null);
1022
1052
  g(this, "hoverKey", "");
1023
1053
  g(this, "hoverXLabel", "");
1024
1054
  g(this, "highlight", null);
1025
1055
  /* ---------- Snapshots for the HTML layer ---------- */
1026
- g(this, "layoutSnapshot", Qt);
1027
- g(this, "hoverSnapshot", te);
1056
+ g(this, "layoutSnapshot", te);
1057
+ g(this, "hoverSnapshot", ee);
1028
1058
  g(this, "layoutSubscribers", /* @__PURE__ */ new Set());
1029
1059
  g(this, "hoverSubscribers", /* @__PURE__ */ new Set());
1030
1060
  /* ---------- Instrumentation (R-5.1) ---------- */
@@ -1042,12 +1072,12 @@ class oe {
1042
1072
  this.layoutSubscribers.delete(t);
1043
1073
  }));
1044
1074
  g(this, "getLayoutSnapshot", () => this.layoutSnapshot);
1045
- g(this, "getLayoutServerSnapshot", () => Qt);
1075
+ g(this, "getLayoutServerSnapshot", () => te);
1046
1076
  g(this, "subscribeHover", (t) => (this.hoverSubscribers.add(t), () => {
1047
1077
  this.hoverSubscribers.delete(t);
1048
1078
  }));
1049
1079
  g(this, "getHoverSnapshot", () => this.hoverSnapshot);
1050
- g(this, "getHoverServerSnapshot", () => te);
1080
+ g(this, "getHoverServerSnapshot", () => ee);
1051
1081
  }
1052
1082
  setOnPerf(t) {
1053
1083
  this.onPerf = t;
@@ -1089,12 +1119,12 @@ class oe {
1089
1119
  updateSeries(t, e) {
1090
1120
  const i = this.series.get(t);
1091
1121
  if (i === void 0) return;
1092
- const s = i.config, r = gn(s, e), o = r && s.xAxisId === e.xAxisId && s.yAxisId === e.yAxisId && s.name === e.name && s.color === e.color && s.tone === e.tone && bn(s, e);
1093
- if (s.name !== e.name && e.name !== void 0) {
1122
+ const r = i.config, s = bn(r, e), o = s && r.xAxisId === e.xAxisId && r.yAxisId === e.yAxisId && r.name === e.name && r.color === e.color && r.tone === e.tone && xn(r, e);
1123
+ if (r.name !== e.name && e.name !== void 0) {
1094
1124
  const a = this.slotsByName.get(e.name);
1095
1125
  a === void 0 ? this.slotsByName.set(e.name, i.slot) : this.slotTaken(a, i) || (i.slot = a);
1096
1126
  }
1097
- i.config = e, !o && (r || (i.materialized = null, i.extent = null, i.step = null, i.cellHeight = null, i.depth = null, this.materialsDirty = !0), this.markLayoutDirty());
1127
+ i.config = e, !o && (s || (i.materialized = null, i.extent = null, i.step = null, i.cellHeight = null, i.depth = null, this.materialsDirty = !0), this.markLayoutDirty());
1098
1128
  }
1099
1129
  unregisterSeries(t) {
1100
1130
  this.series.delete(t) && (this.materialsDirty = !0, this.markLayoutDirty());
@@ -1106,9 +1136,9 @@ class oe {
1106
1136
  updateAxis(t, e) {
1107
1137
  const i = this.axes.get(t);
1108
1138
  if (i === void 0) return;
1109
- const s = i.config, r = z(s.accessor, e.accessor) && s.calendar === e.calendar, o = r && s.id === e.id && s.orientation === e.orientation && s.position === e.position && s.label === e.label && s.tickCount === e.tickCount && s.grid === e.grid && mt(s.ticks, e.ticks) && wn(s.domain, e.domain) && z(s.tickFormat, e.tickFormat);
1139
+ const r = i.config, s = Y(r.accessor, e.accessor) && r.calendar === e.calendar, o = s && r.id === e.id && r.orientation === e.orientation && r.position === e.position && r.label === e.label && r.tickCount === e.tickCount && r.grid === e.grid && ft(r.ticks, e.ticks) && In(r.domain, e.domain) && Y(r.tickFormat, e.tickFormat);
1110
1140
  if (i.config = e, !o) {
1111
- if (!r || s.id !== e.id) {
1141
+ if (!s || r.id !== e.id) {
1112
1142
  for (const a of this.series.values())
1113
1143
  a.materialized = null, a.extent = null, a.step = null, a.cellHeight = null, a.depth = null;
1114
1144
  this.materialsDirty = !0;
@@ -1129,8 +1159,8 @@ class oe {
1129
1159
  updateLimit(t, e) {
1130
1160
  const i = this.limits.get(t);
1131
1161
  if (i === void 0) return;
1132
- const s = i.config;
1133
- i.config = e, !(s.kind === e.kind && s.axisId === e.axisId && s.orientation === e.orientation && s.severity === e.severity && s.role === e.role && s.label === e.label && s.color === e.color && s.inExtent === e.inExtent && (s.kind === "line" && e.kind === "line" ? s.value === e.value : s.kind === "band" && e.kind === "band" && s.from === e.from && s.to === e.to)) && this.markLayoutDirty();
1162
+ const r = i.config;
1163
+ i.config = e, !(r.kind === e.kind && r.axisId === e.axisId && r.orientation === e.orientation && r.severity === e.severity && r.role === e.role && r.label === e.label && r.color === e.color && r.inExtent === e.inExtent && (r.kind === "line" && e.kind === "line" ? r.value === e.value : r.kind === "band" && e.kind === "band" && r.from === e.from && r.to === e.to)) && this.markLayoutDirty();
1134
1164
  }
1135
1165
  unregisterLimit(t) {
1136
1166
  this.limits.delete(t) && this.markLayoutDirty();
@@ -1152,7 +1182,7 @@ class oe {
1152
1182
  }
1153
1183
  updateTooltip(t) {
1154
1184
  const e = this.tooltip;
1155
- if (e !== null && e.mode === t.mode && z(e.render, t.render)) {
1185
+ if (e !== null && e.mode === t.mode && Y(e.render, t.render)) {
1156
1186
  this.tooltip = t;
1157
1187
  return;
1158
1188
  }
@@ -1185,41 +1215,41 @@ class oe {
1185
1215
  /* ================= Checks (R-4.12, R-4.13) ================= */
1186
1216
  /** Called from the Chart after the child effects; DEV only. */
1187
1217
  validate() {
1188
- if (!st) return;
1218
+ if (!it) return;
1189
1219
  const t = /* @__PURE__ */ new Set();
1190
- for (const { config: r } of this.axesInOrder()) {
1191
- const o = `${r.orientation}:${r.id}`, a = r.orientation === "x" ? "XAxis" : "YAxis";
1192
- ut(
1220
+ for (const { config: s } of this.axesInOrder()) {
1221
+ const o = `${s.orientation}:${s.id}`, a = s.orientation === "x" ? "XAxis" : "YAxis";
1222
+ ct(
1193
1223
  !t.has(o),
1194
- `Two <${a}> with the same id "${r.id}". A second ${a} needs an own id (R-4.12).`
1224
+ `Two <${a}> with the same id "${s.id}". A second ${a} needs an own id (R-4.12).`
1195
1225
  ), t.add(o);
1196
1226
  }
1197
1227
  const e = /* @__PURE__ */ new Set();
1198
- for (const { config: r } of this.series.values())
1199
- ut(
1200
- t.has(`x:${r.xAxisId}`),
1201
- `Series "${r.name ?? "?"}" refers to the unknown x axis "${r.xAxisId}" (R-4.12).`
1202
- ), ut(
1203
- t.has(`y:${r.yAxisId}`),
1204
- `Series "${r.name ?? "?"}" refers to the unknown y axis "${r.yAxisId}" (R-4.12).`
1205
- ), e.add(`x:${r.xAxisId}`), e.add(`y:${r.yAxisId}`);
1206
- for (const r of t)
1207
- !e.has(r) && this.series.size > 0 && q(
1208
- `axis-without-series-${r}`,
1209
- `Axis "${r}" has no bound series; it is drawn with the domain [0, 1] (R-4.13).`
1228
+ for (const { config: s } of this.series.values())
1229
+ ct(
1230
+ t.has(`x:${s.xAxisId}`),
1231
+ `Series "${s.name ?? "?"}" refers to the unknown x axis "${s.xAxisId}" (R-4.12).`
1232
+ ), ct(
1233
+ t.has(`y:${s.yAxisId}`),
1234
+ `Series "${s.name ?? "?"}" refers to the unknown y axis "${s.yAxisId}" (R-4.12).`
1235
+ ), e.add(`x:${s.xAxisId}`), e.add(`y:${s.yAxisId}`);
1236
+ for (const s of t)
1237
+ !e.has(s) && this.series.size > 0 && G(
1238
+ `axis-without-series-${s}`,
1239
+ `Axis "${s}" has no bound series; it is drawn with the domain [0, 1] (R-4.13).`
1210
1240
  );
1211
1241
  const i = /* @__PURE__ */ new Map();
1212
- for (const { config: r } of this.seriesInOrder()) {
1213
- if (r.kind !== "bar") continue;
1214
- const o = i.get(r.xAxisId);
1215
- o === void 0 ? i.set(r.xAxisId, r.barWidth) : o !== r.barWidth && q(
1216
- `bar-width-${r.xAxisId}`,
1217
- `Bars on the x axis "${r.xAxisId}" give different barWidth. A group shares one width fraction; that of the first (${o}) applies (ADR-0002).`
1242
+ for (const { config: s } of this.seriesInOrder()) {
1243
+ if (s.kind !== "bar") continue;
1244
+ const o = i.get(s.xAxisId);
1245
+ o === void 0 ? i.set(s.xAxisId, s.barWidth) : o !== s.barWidth && G(
1246
+ `bar-width-${s.xAxisId}`,
1247
+ `Bars on the x axis "${s.xAxisId}" give different barWidth. A group shares one width fraction; that of the first (${o}) applies (ADR-0002).`
1218
1248
  );
1219
1249
  }
1220
- let s = 0;
1221
- for (const r of this.axesInOrder()) r.config.grid === !0 && s++;
1222
- s > 1 && q(
1250
+ let r = 0;
1251
+ for (const s of this.axesInOrder()) s.config.grid === !0 && r++;
1252
+ r > 1 && G(
1223
1253
  "multiple-grids",
1224
1254
  "More than one axis draws grid. Unaligned grids compete visually; there is no tick alignment between axes in V0 (R-4.15)."
1225
1255
  );
@@ -1237,22 +1267,22 @@ class oe {
1237
1267
  e += i.materialized.length;
1238
1268
  continue;
1239
1269
  }
1240
- const s = i.config, r = s.data ?? this.data, o = this.findXAxis(s.xAxisId);
1270
+ const r = i.config, s = r.data ?? this.data, o = this.findXAxis(r.xAxisId);
1241
1271
  if (o === null) continue;
1242
- const a = on(
1243
- r,
1272
+ const a = an(
1273
+ s,
1244
1274
  o.accessor,
1245
- s.accessor,
1246
- Pt(s),
1275
+ r.accessor,
1276
+ Pt(r),
1247
1277
  {
1248
- value: Lt(s),
1249
- xEnd: Ft(s),
1278
+ value: Lt(r),
1279
+ xEnd: Ft(r),
1250
1280
  xMap: this.mapFor(o),
1251
1281
  xGap: this.gapFor(o)
1252
1282
  }
1253
1283
  );
1254
- if (i.materialized = a.series, e += a.series.length, s.kind === "bar") {
1255
- const l = cn(a.series.x, a.series.length);
1284
+ if (i.materialized = a.series, e += a.series.length, r.kind === "bar") {
1285
+ const l = un(a.series.x, a.series.length);
1256
1286
  i.step = l;
1257
1287
  const c = l / 2;
1258
1288
  i.extent = {
@@ -1260,7 +1290,7 @@ class oe {
1260
1290
  xMin: a.extent.xMin - c,
1261
1291
  xMax: a.extent.xMax + c
1262
1292
  };
1263
- } else if (s.kind === "matrix") {
1293
+ } else if (r.kind === "matrix") {
1264
1294
  const l = Jt(a.series.x, a.series.length), c = Jt(a.series.y, a.series.length);
1265
1295
  i.step = l, i.cellHeight = c, i.extent = {
1266
1296
  xMin: a.extent.xMin - l / 2,
@@ -1268,14 +1298,14 @@ class oe {
1268
1298
  yMin: a.extent.yMin - c / 2,
1269
1299
  yMax: a.extent.yMax + c / 2
1270
1300
  };
1271
- } else if (s.kind === "state")
1301
+ } else if (r.kind === "state")
1272
1302
  i.step = null, i.extent = {
1273
1303
  ...a.extent,
1274
1304
  yMin: Number.POSITIVE_INFINITY,
1275
1305
  yMax: Number.NEGATIVE_INFINITY
1276
1306
  };
1277
- else if (s.kind === "span") {
1278
- i.depth = Ye(
1307
+ else if (r.kind === "span") {
1308
+ i.depth = ze(
1279
1309
  a.series.x,
1280
1310
  a.series.x1 ?? new Float64Array(a.series.length),
1281
1311
  a.series.length,
@@ -1284,7 +1314,7 @@ class oe {
1284
1314
  // and that is exactly the value it gets here.
1285
1315
  a.extent.xMax
1286
1316
  );
1287
- const l = (s.height ?? 0.6) / 2;
1317
+ const l = (r.height ?? 0.6) / 2;
1288
1318
  i.step = null, i.extent = {
1289
1319
  ...a.extent,
1290
1320
  yMin: a.extent.yMin - l,
@@ -1292,10 +1322,10 @@ class oe {
1292
1322
  };
1293
1323
  } else
1294
1324
  i.step = null, i.extent = a.extent;
1295
- if (!this.sortednessChecked && st) {
1325
+ if (!this.sortednessChecked && it) {
1296
1326
  this.sortednessChecked = !0;
1297
- const l = an(a.series.x, a.series.length);
1298
- l >= 0 && q(
1327
+ const l = ln(a.series.x, a.series.length);
1328
+ l >= 0 && G(
1299
1329
  "x-unsorted",
1300
1330
  `X values are not sorted ascending (index ${l}). Binary search and path building assume sortedness; there is no automatic sorting (R-2.6).`
1301
1331
  );
@@ -1304,10 +1334,10 @@ class oe {
1304
1334
  this.materialsDirty = !1, this.perf.materializeMs = (typeof performance > "u" ? 0 : performance.now()) - t, this.perf.points = e;
1305
1335
  }
1306
1336
  /* ================= DOM binding, DPR, resize ================= */
1307
- bind(t, e, i, s) {
1308
- this.container = t, this.themeRoot = s, this.seriesCanvas = e, this.overlayCanvas = i, this.seriesCtx = e.getContext("2d"), this.overlayCtx = i.getContext("2d"), this.measurer = new Me(s), this.dpr = typeof devicePixelRatio == "number" ? devicePixelRatio : 1, this.rebindDprWatch(), this.unsubscribeTheme = Ie(() => {
1309
- var r;
1310
- this.theme = null, (r = this.measurer) == null || r.clear(), this.markLayoutDirty();
1337
+ bind(t, e, i, r) {
1338
+ this.container = t, this.themeRoot = r, this.seriesCanvas = e, this.overlayCanvas = i, this.seriesCtx = e.getContext("2d"), this.overlayCtx = i.getContext("2d"), this.measurer = new Te(r), this.dpr = typeof devicePixelRatio == "number" ? devicePixelRatio : 1, this.rebindDprWatch(), this.unsubscribeTheme = Se(() => {
1339
+ var s;
1340
+ this.theme = null, (s = this.measurer) == null || s.clear(), this.markLayoutDirty();
1311
1341
  }), this.theme = null, this.markLayoutDirty();
1312
1342
  }
1313
1343
  bindTooltip(t) {
@@ -1329,12 +1359,12 @@ class oe {
1329
1359
  applyPendingSize() {
1330
1360
  if (this.pendingWidth === null || this.pendingHeight === null) return;
1331
1361
  this.cssWidth = this.pendingWidth, this.cssHeight = this.pendingHeight, this.pendingWidth = null, this.pendingHeight = null;
1332
- const { seriesCanvas: t, overlayCanvas: e, seriesCtx: i, overlayCtx: s, dpr: r } = this;
1333
- if (!t || !e || !i || !s) return;
1334
- const o = Math.max(0, Math.round(this.cssWidth * r)), a = Math.max(0, Math.round(this.cssHeight * r));
1362
+ const { seriesCanvas: t, overlayCanvas: e, seriesCtx: i, overlayCtx: r, dpr: s } = this;
1363
+ if (!t || !e || !i || !r) return;
1364
+ const o = Math.max(0, Math.round(this.cssWidth * s)), a = Math.max(0, Math.round(this.cssHeight * s));
1335
1365
  for (const l of [t, e])
1336
1366
  l.width = o, l.height = a, l.style.width = `${this.cssWidth}px`, l.style.height = `${this.cssHeight}px`;
1337
- i.setTransform(r, 0, 0, r, 0, 0), s.setTransform(r, 0, 0, r, 0, 0);
1367
+ i.setTransform(s, 0, 0, s, 0, 0), r.setTransform(s, 0, 0, s, 0, 0);
1338
1368
  }
1339
1369
  /* ================= Scheduling (R-2.11) ================= */
1340
1370
  markSeriesDirty() {
@@ -1354,7 +1384,7 @@ class oe {
1354
1384
  }));
1355
1385
  }
1356
1386
  frame() {
1357
- if (this.applyPendingSize(), this.theme === null && this.themeRoot !== null && (this.theme = Ne(this.themeRoot)), this.cssWidth <= 0 || this.cssHeight <= 0) {
1387
+ if (this.applyPendingSize(), this.theme === null && this.themeRoot !== null && (this.theme = Ie(this.themeRoot)), this.cssWidth <= 0 || this.cssHeight <= 0) {
1358
1388
  this.layoutDirty && this.pushLayoutSnapshot();
1359
1389
  return;
1360
1390
  }
@@ -1366,9 +1396,9 @@ class oe {
1366
1396
  gridDefault() {
1367
1397
  const t = /* @__PURE__ */ new Map();
1368
1398
  let e = !0, i = !0;
1369
- for (const [s, r] of [...this.axes.entries()].sort((o, a) => o[1].order - a[1].order)) {
1370
- const o = r.config.orientation === "x" ? e : i;
1371
- t.set(s, r.config.grid ?? o), r.config.orientation === "x" ? e = !1 : i = !1;
1399
+ for (const [r, s] of [...this.axes.entries()].sort((o, a) => o[1].order - a[1].order)) {
1400
+ const o = s.config.orientation === "x" ? e : i;
1401
+ t.set(r, s.config.grid ?? o), s.config.orientation === "x" ? e = !1 : i = !1;
1372
1402
  }
1373
1403
  return t;
1374
1404
  }
@@ -1379,18 +1409,18 @@ class oe {
1379
1409
  The layout path calls extentFor directly. */
1380
1410
  axisExtent(t, e) {
1381
1411
  this.materialsDirty && this.materialize();
1382
- const i = [...this.series.values()].map((s) => ({
1383
- xAxisId: s.config.xAxisId,
1384
- yAxisId: s.config.yAxisId,
1385
- extent: s.extent
1412
+ const i = [...this.series.values()].map((r) => ({
1413
+ xAxisId: r.config.xAxisId,
1414
+ yAxisId: r.config.yAxisId,
1415
+ extent: r.extent
1386
1416
  }));
1387
- return ln(t, e, i, this.limitValues(t, e));
1417
+ return cn(t, e, i, this.limitValues(t, e));
1388
1418
  }
1389
1419
  /** The values of the limits that are to pull this axis along. */
1390
1420
  limitValues(t, e) {
1391
1421
  const i = [];
1392
- for (const { config: s } of this.limits.values())
1393
- s.inExtent && (s.orientation !== t || s.axisId !== e || (s.kind === "line" ? i.push(s.value) : i.push(s.from, s.to)));
1422
+ for (const { config: r } of this.limits.values())
1423
+ r.inExtent && (r.orientation !== t || r.axisId !== e || (r.kind === "line" ? i.push(r.value) : i.push(r.from, r.to)));
1394
1424
  return i;
1395
1425
  }
1396
1426
  /** Pre-mapping of the x values of an axis with an operating calendar. The scale
@@ -1400,27 +1430,27 @@ class oe {
1400
1430
  mapFor(t) {
1401
1431
  const e = t.calendar;
1402
1432
  if (!(e === void 0 || e.length === 0))
1403
- return (i) => Ee(i, e);
1433
+ return (i) => De(i, e);
1404
1434
  }
1405
1435
  gapFor(t) {
1406
1436
  const e = t.calendar;
1407
1437
  if (!(e === void 0 || e.length === 0))
1408
- return (i) => De(i, e);
1438
+ return (i) => $e(i, e);
1409
1439
  }
1410
1440
  extentFor(t) {
1411
1441
  return this.axisExtent(t.orientation, t.id);
1412
1442
  }
1413
1443
  updateLayout() {
1414
1444
  const t = this.measurer, e = this.gridDefault(), i = [];
1415
- for (const [s, r] of [...this.axes.entries()].sort((o, a) => o[1].order - a[1].order)) {
1416
- const o = r.config;
1445
+ for (const [r, s] of [...this.axes.entries()].sort((o, a) => o[1].order - a[1].order)) {
1446
+ const o = s.config;
1417
1447
  i.push({
1418
1448
  key: `${o.orientation}:${o.id}`,
1419
1449
  id: o.id,
1420
1450
  orientation: o.orientation,
1421
1451
  position: o.position,
1422
1452
  label: o.label,
1423
- grid: e.get(s) ?? !1,
1453
+ grid: e.get(r) ?? !1,
1424
1454
  extent: this.extentFor(o),
1425
1455
  domainMode: o.domain,
1426
1456
  tickCount: o.tickCount,
@@ -1429,12 +1459,12 @@ class oe {
1429
1459
  calendar: o.calendar
1430
1460
  });
1431
1461
  }
1432
- this.layout = _e({
1462
+ this.layout = Be({
1433
1463
  width: this.cssWidth,
1434
1464
  height: this.cssHeight,
1435
1465
  padding: this.padding,
1436
1466
  axes: i,
1437
- measure: (s, r) => t === null ? { width: 0, height: 0 } : t.measure(s, r),
1467
+ measure: (r, s) => t === null ? { width: 0, height: 0 } : t.measure(r, s),
1438
1468
  hysteresis: this.hysteresis
1439
1469
  });
1440
1470
  }
@@ -1445,36 +1475,36 @@ class oe {
1445
1475
  }
1446
1476
  /* ================= Series colours and legend entries ================= */
1447
1477
  colorFor(t, e) {
1448
- var r;
1478
+ var s;
1449
1479
  if (t.config.color !== void 0) return t.config.color;
1450
1480
  const i = t.config.tone;
1451
1481
  if (i !== void 0) {
1452
1482
  const o = this.theme ?? W;
1453
1483
  return i === "alarm" ? o.colorAlarm : i === "warning" ? o.colorWarning : o.colorOk;
1454
1484
  }
1455
- const s = ((r = this.theme) == null ? void 0 : r.series) ?? W.series;
1456
- return s[this.paletteSlot(t, e) % Math.max(1, s.length)] ?? W.series[0] ?? "#2563eb";
1485
+ const r = ((s = this.theme) == null ? void 0 : s.series) ?? W.series;
1486
+ return r[this.paletteSlot(t, e) % Math.max(1, r.length)] ?? W.series[0] ?? "#2563eb";
1457
1487
  }
1458
1488
  /** Named: the place of the name. Nameless: the index in the registration, as
1459
1489
  before - and a warning as soon as that shifts underneath it. */
1460
1490
  paletteSlot(t, e) {
1461
- return t.config.name !== void 0 ? t.slot : (t.lastSlot !== null && t.lastSlot !== e && q(
1491
+ return t.config.name !== void 0 ? t.slot : (t.lastSlot !== null && t.lastSlot !== e && G(
1462
1492
  "series-without-name-colour",
1463
1493
  "a series without a name has changed its colour, because a series before it went away - with `name` it keeps it."
1464
1494
  ), t.lastSlot = e, e);
1465
1495
  }
1466
1496
  nameFor(t, e) {
1467
- return t.config.name !== void 0 ? t.config.name : (q(
1497
+ return t.config.name !== void 0 ? t.config.name : (G(
1468
1498
  "series-without-name",
1469
1499
  `a series without a name is called "Series ${e + 1}" in the legend and the tooltip - the name belongs in \`name\`.`
1470
1500
  ), `Series ${e + 1}`);
1471
1501
  }
1472
1502
  legendItems() {
1473
1503
  const t = [], e = /* @__PURE__ */ new Set();
1474
- return this.seriesInOrder().forEach((i, s) => {
1475
- const r = i.config;
1476
- if (r.kind === "state") {
1477
- r.states.forEach((o, a) => {
1504
+ return this.seriesInOrder().forEach((i, r) => {
1505
+ const s = i.config;
1506
+ if (s.kind === "state") {
1507
+ s.states.forEach((o, a) => {
1478
1508
  const l = `${o.label}\0${o.color}`;
1479
1509
  e.has(l) || (e.add(l), t.push({
1480
1510
  id: `${i.order}:${a}`,
@@ -1487,8 +1517,8 @@ class oe {
1487
1517
  }
1488
1518
  t.push({
1489
1519
  id: String(i.order),
1490
- name: this.nameFor(i, s),
1491
- color: this.colorFor(i, s),
1520
+ name: this.nameFor(i, r),
1521
+ color: this.colorFor(i, r),
1492
1522
  seriesId: i.order
1493
1523
  });
1494
1524
  }), t;
@@ -1511,24 +1541,24 @@ class oe {
1511
1541
  }
1512
1542
  limitItems(t) {
1513
1543
  const e = this.theme ?? W, i = [];
1514
- for (const { config: s } of this.limitsInOrder()) {
1515
- if (s.kind === "band" !== t) continue;
1516
- const r = this.findAxis(s.orientation, s.axisId);
1517
- if (r === null) continue;
1518
- const o = this.limitColor(s, e), a = this.limitDash(s);
1519
- if (s.kind === "band")
1544
+ for (const { config: r } of this.limitsInOrder()) {
1545
+ if (r.kind === "band" !== t) continue;
1546
+ const s = this.findAxis(r.orientation, r.axisId);
1547
+ if (s === null) continue;
1548
+ const o = this.limitColor(r, e), a = this.limitDash(r);
1549
+ if (r.kind === "band")
1520
1550
  i.push({
1521
- orientation: s.orientation,
1522
- fromPx: r.scale.toPx(s.from),
1523
- toPx: r.scale.toPx(s.to),
1551
+ orientation: r.orientation,
1552
+ fromPx: s.scale.toPx(r.from),
1553
+ toPx: s.scale.toPx(r.to),
1524
1554
  color: o,
1525
1555
  band: !0,
1526
1556
  dash: a
1527
1557
  });
1528
1558
  else {
1529
- const l = r.scale.toPx(s.value);
1559
+ const l = s.scale.toPx(r.value);
1530
1560
  i.push({
1531
- orientation: s.orientation,
1561
+ orientation: r.orientation,
1532
1562
  fromPx: l,
1533
1563
  toPx: l,
1534
1564
  color: o,
@@ -1544,13 +1574,13 @@ class oe {
1544
1574
  const t = [];
1545
1575
  for (const { order: e, config: i } of this.limitsInOrder()) {
1546
1576
  if (i.label === void 0 || i.label === "") continue;
1547
- const s = this.findAxis(i.orientation, i.axisId);
1548
- if (s === null) continue;
1549
- const r = i.kind === "line" ? i.value : (i.from + i.to) / 2;
1577
+ const r = this.findAxis(i.orientation, i.axisId);
1578
+ if (r === null) continue;
1579
+ const s = i.kind === "line" ? i.value : (i.from + i.to) / 2;
1550
1580
  t.push({
1551
1581
  id: e,
1552
- axisKey: s.key,
1553
- px: s.scale.toPx(r),
1582
+ axisKey: r.key,
1583
+ px: r.scale.toPx(s),
1554
1584
  label: i.label,
1555
1585
  severity: i.severity,
1556
1586
  role: i.role
@@ -1560,29 +1590,29 @@ class oe {
1560
1590
  }
1561
1591
  /* ================= Drawing ================= */
1562
1592
  drawItems() {
1563
- const t = [], e = this.seriesInOrder(), i = dn(
1564
- e.map((s) => ({
1565
- order: s.order,
1566
- kind: s.config.kind,
1567
- xAxisId: s.config.xAxisId,
1568
- step: s.step ?? 0,
1569
- fraction: s.config.kind === "bar" ? s.config.barWidth : 0
1593
+ const t = [], e = this.seriesInOrder(), i = fn(
1594
+ e.map((r) => ({
1595
+ order: r.order,
1596
+ kind: r.config.kind,
1597
+ xAxisId: r.config.xAxisId,
1598
+ step: r.step ?? 0,
1599
+ fraction: r.config.kind === "bar" ? r.config.barWidth : 0
1570
1600
  }))
1571
1601
  );
1572
- return e.forEach((s, r) => {
1573
- const o = s.materialized;
1602
+ return e.forEach((r, s) => {
1603
+ const o = r.materialized;
1574
1604
  if (o === null) return;
1575
- const a = this.findAxis("x", s.config.xAxisId), l = this.findAxis("y", s.config.yAxisId);
1605
+ const a = this.findAxis("x", r.config.xAxisId), l = this.findAxis("y", r.config.yAxisId);
1576
1606
  if (a === null || l === null) return;
1577
- const c = this.highlight !== null && this.highlight !== s.order, u = {
1607
+ const c = this.highlight !== null && this.highlight !== r.order, u = {
1578
1608
  x: o.x,
1579
1609
  y: o.y,
1580
1610
  length: o.length,
1581
1611
  xScale: a.scale,
1582
1612
  yScale: l.scale,
1583
- color: this.colorFor(s, r),
1613
+ color: this.colorFor(r, s),
1584
1614
  alpha: c ? 0.25 : 1
1585
- }, h = s.config;
1615
+ }, h = r.config;
1586
1616
  switch (h.kind) {
1587
1617
  case "line":
1588
1618
  t.push({
@@ -1590,7 +1620,7 @@ class oe {
1590
1620
  kind: "line",
1591
1621
  strokeWidth: h.strokeWidth,
1592
1622
  dash: h.dash,
1593
- marker: h.markers === "always" || h.markers === "auto" && o.length <= mn
1623
+ marker: h.markers === "always" || h.markers === "auto" && o.length <= pn
1594
1624
  });
1595
1625
  break;
1596
1626
  case "area":
@@ -1604,13 +1634,13 @@ class oe {
1604
1634
  });
1605
1635
  break;
1606
1636
  case "bar": {
1607
- const p = i.get(s.order) ?? {
1637
+ const p = i.get(r.order) ?? {
1608
1638
  index: 0,
1609
1639
  size: 1,
1610
- step: s.step ?? 0,
1640
+ step: r.step ?? 0,
1611
1641
  fraction: h.barWidth
1612
- }, d = a.scale.domain, m = hn(
1613
- un(p.step, d[1] - d[0]),
1642
+ }, d = a.scale.domain, m = dn(
1643
+ hn(p.step, d[1] - d[0]),
1614
1644
  p.fraction,
1615
1645
  p.index,
1616
1646
  p.size
@@ -1640,18 +1670,18 @@ class oe {
1640
1670
  break;
1641
1671
  }
1642
1672
  case "matrix": {
1643
- const p = kn(h.coloring, this.theme ?? W);
1673
+ const p = Nn(h.coloring, this.theme ?? W);
1644
1674
  t.push({
1645
1675
  ...u,
1646
1676
  kind: "matrix",
1647
- buckets: Nn(o, h.coloring, p.length),
1677
+ buckets: wn(o, h.coloring, p.length),
1648
1678
  colors: p,
1649
- width: ct(
1650
- s.step ?? 0,
1679
+ width: lt(
1680
+ r.step ?? 0,
1651
1681
  a.scale.domain[1] - a.scale.domain[0]
1652
1682
  ),
1653
- height: ct(
1654
- s.cellHeight ?? 0,
1683
+ height: lt(
1684
+ r.cellHeight ?? 0,
1655
1685
  l.scale.domain[1] - l.scale.domain[0]
1656
1686
  )
1657
1687
  });
@@ -1661,11 +1691,11 @@ class oe {
1661
1691
  t.push({
1662
1692
  ...u,
1663
1693
  kind: "span",
1664
- x1: o.x1 ?? pn,
1694
+ x1: o.x1 ?? yn,
1665
1695
  // Computed once per materialisation, not per frame: the calculation
1666
1696
  // is quadratic, and a schedule with five hundred spans is pushed and
1667
1697
  // pulled like any other chart.
1668
- depth: s.depth ?? yn,
1698
+ depth: r.depth ?? gn,
1669
1699
  height: h.height ?? 0.6,
1670
1700
  domainEnd: a.scale.domain[1]
1671
1701
  });
@@ -1678,15 +1708,15 @@ class oe {
1678
1708
  axis: a single series fills its band, a stack gets a domain with one unit per
1679
1709
  machine from the caller. */
1680
1710
  lanePx(t, e) {
1681
- const i = e.scale.domain, s = e.scale.toPx(t.laneFrom ?? i[0]), r = e.scale.toPx(t.laneTo ?? i[1]);
1682
- return { top: Math.min(s, r), bottom: Math.max(s, r) };
1711
+ const i = e.scale.domain, r = e.scale.toPx(t.laneFrom ?? i[0]), s = e.scale.toPx(t.laneTo ?? i[1]);
1712
+ return { top: Math.min(r, s), bottom: Math.max(r, s) };
1683
1713
  }
1684
1714
  drawSeriesLayer() {
1685
- var s;
1715
+ var r;
1686
1716
  const t = this.seriesCtx, e = this.theme;
1687
1717
  if (!t || !e) return;
1688
1718
  const i = typeof performance > "u" ? 0 : performance.now();
1689
- Qe(t, {
1719
+ tn(t, {
1690
1720
  width: this.cssWidth,
1691
1721
  height: this.cssHeight,
1692
1722
  plot: this.layout.plot,
@@ -1695,11 +1725,11 @@ class oe {
1695
1725
  series: this.drawItems(),
1696
1726
  limitBands: this.limitItems(!0),
1697
1727
  limitLines: this.limitItems(!1)
1698
- }), this.perf.seriesDrawMs = (typeof performance > "u" ? 0 : performance.now()) - i, (s = this.onPerf) == null || s.call(this, { ...this.perf });
1728
+ }), this.perf.seriesDrawMs = (typeof performance > "u" ? 0 : performance.now()) - i, (r = this.onPerf) == null || r.call(this, { ...this.perf });
1699
1729
  }
1700
1730
  drawOverlayLayer() {
1701
1731
  const t = this.overlayCtx, e = this.theme;
1702
- !t || !e || (tn(t, {
1732
+ !t || !e || (en(t, {
1703
1733
  width: this.cssWidth,
1704
1734
  height: this.cssHeight,
1705
1735
  plot: this.layout.plot,
@@ -1726,22 +1756,22 @@ class oe {
1726
1756
  this.pointerLeave();
1727
1757
  return;
1728
1758
  }
1729
- const s = i.key;
1730
- this.hover = i.state, this.hover.mouseX = t, this.hover.mouseY = e, this.markOverlayDirty(), s !== this.hoverKey && (this.hoverKey = s, this.hoverXLabel = i.xLabel, this.pushHoverSnapshot());
1759
+ const r = i.key;
1760
+ this.hover = i.state, this.hover.mouseX = t, this.hover.mouseY = e, this.markOverlayDirty(), r !== this.hoverKey && (this.hoverKey = r, this.hoverXLabel = i.xLabel, this.pushHoverSnapshot());
1731
1761
  }
1732
1762
  pointerLeave() {
1733
1763
  this.hover === null && this.hoverKey === "" || (this.hover = null, this.hoverKey = "", this.markOverlayDirty(), this.pushHoverSnapshot());
1734
1764
  }
1735
1765
  hitTest(t, e) {
1736
1766
  var y;
1737
- const i = ((y = this.tooltip) == null ? void 0 : y.mode) ?? "x", s = [];
1767
+ const i = ((y = this.tooltip) == null ? void 0 : y.mode) ?? "x", r = [];
1738
1768
  if (this.seriesInOrder().forEach((f, b) => {
1739
1769
  const k = f.materialized;
1740
1770
  if (k === null || k.length === 0) return;
1741
1771
  const N = f.config, w = this.findAxis("x", N.xAxisId), L = this.findAxis("y", N.yAxisId);
1742
1772
  if (w === null || L === null) return;
1743
1773
  const F = w.scale.fromPx(t), P = L.scale.fromPx(e), S = this.hitIn(f, k, w, L, e, F, P);
1744
- S !== null && s.push({
1774
+ S !== null && r.push({
1745
1775
  entry: f,
1746
1776
  index: S.index,
1747
1777
  color: S.color ?? this.colorFor(f, b),
@@ -1755,12 +1785,12 @@ class oe {
1755
1785
  value: S.value,
1756
1786
  segment: S.segment
1757
1787
  });
1758
- }), s.length === 0) return null;
1759
- const r = s.filter((f) => !f.areal), o = r.length > 0 ? r : s;
1788
+ }), r.length === 0) return null;
1789
+ const s = r.filter((f) => !f.areal), o = s.length > 0 ? s : r;
1760
1790
  let a = o[0];
1761
1791
  if (i === "nearest") {
1762
1792
  let f = Number.POSITIVE_INFINITY;
1763
- for (const b of s) {
1793
+ for (const b of r) {
1764
1794
  const k = b.areal ? 0 : b.px - t, N = b.areal ? 0 : b.py - e, w = k * k + N * N;
1765
1795
  w < f && (f = w, a = b);
1766
1796
  }
@@ -1771,11 +1801,11 @@ class oe {
1771
1801
  k < f && (f = k, a = b);
1772
1802
  }
1773
1803
  }
1774
- const l = i === "nearest" ? [a] : s.filter(
1804
+ const l = i === "nearest" ? [a] : r.filter(
1775
1805
  // An area is always included: it covers the pointer, otherwise it
1776
1806
  // would not have reported a hit at all. Only points have to share the
1777
1807
  // x position.
1778
- (f) => f.areal || Math.abs(f.px - a.px) <= fn
1808
+ (f) => f.areal || Math.abs(f.px - a.px) <= mn
1779
1809
  ), c = l.map((f) => ({
1780
1810
  seriesName: f.name,
1781
1811
  color: f.color,
@@ -1803,16 +1833,16 @@ class oe {
1803
1833
  and a span ask "what lies under the pointer", and that is not the same
1804
1834
  question: for the right half of every segment the nearest point gives the
1805
1835
  wrong answer. */
1806
- hitIn(t, e, i, s, r, o, a) {
1836
+ hitIn(t, e, i, r, s, o, a) {
1807
1837
  const l = t.config, c = e.length;
1808
1838
  if (l.kind === "state") {
1809
- const d = this.lanePx(l, s);
1810
- if (r < d.top || r > d.bottom) return null;
1811
- const m = Be(e.x, c, o);
1839
+ const d = this.lanePx(l, r);
1840
+ if (s < d.top || s > d.bottom) return null;
1841
+ const m = Ye(e.x, c, o);
1812
1842
  if (m < 0) return null;
1813
1843
  const y = e.y[m];
1814
1844
  if (Number.isNaN(y)) return null;
1815
- const f = e.x[m], b = se(e.x, c, m, i.scale.domain[1]), k = l.states[y | 0];
1845
+ const f = e.x[m], b = ae(e.x, c, m, i.scale.domain[1]), k = l.states[y | 0];
1816
1846
  return {
1817
1847
  index: m,
1818
1848
  px: i.scale.toPx(f),
@@ -1828,7 +1858,7 @@ class oe {
1828
1858
  if (l.kind === "span") {
1829
1859
  const d = e.x1;
1830
1860
  if (d === null) return null;
1831
- const m = i.scale.domain[1], y = l.height ?? 0.6, f = ze(
1861
+ const m = i.scale.domain[1], y = l.height ?? 0.6, f = Ge(
1832
1862
  e.x,
1833
1863
  d,
1834
1864
  e.y,
@@ -1843,7 +1873,7 @@ class oe {
1843
1873
  return {
1844
1874
  index: f,
1845
1875
  px: i.scale.toPx(b),
1846
- py: s.scale.toPx(k),
1876
+ py: r.scale.toPx(k),
1847
1877
  xValue: b,
1848
1878
  yValue: k,
1849
1879
  marked: !1,
@@ -1852,19 +1882,19 @@ class oe {
1852
1882
  from: b,
1853
1883
  to: rt(N, m),
1854
1884
  label: "",
1855
- open: re(N)
1885
+ open: le(N)
1856
1886
  }
1857
1887
  };
1858
1888
  }
1859
1889
  if (l.kind === "matrix") {
1860
- const d = nn(
1890
+ const d = rn(
1861
1891
  e.x,
1862
1892
  e.y,
1863
1893
  c,
1864
1894
  o,
1865
1895
  a,
1866
- ct(t.step ?? 0, i.scale.domain[1] - i.scale.domain[0]),
1867
- ct(t.cellHeight ?? 0, s.scale.domain[1] - s.scale.domain[0])
1896
+ lt(t.step ?? 0, i.scale.domain[1] - i.scale.domain[0]),
1897
+ lt(t.cellHeight ?? 0, r.scale.domain[1] - r.scale.domain[0])
1868
1898
  );
1869
1899
  if (d < 0) return null;
1870
1900
  const m = e.w, y = m === null ? Number.NaN : m[d];
@@ -1873,7 +1903,7 @@ class oe {
1873
1903
  return {
1874
1904
  index: d,
1875
1905
  px: i.scale.toPx(f),
1876
- py: s.scale.toPx(b),
1906
+ py: r.scale.toPx(b),
1877
1907
  xValue: f,
1878
1908
  // yValue stays the position on the y axis; the value that carries the
1879
1909
  // colour stands in a field of its own. Colour alone can transport no
@@ -1884,7 +1914,7 @@ class oe {
1884
1914
  areal: !0
1885
1915
  };
1886
1916
  }
1887
- const u = en(e.x, c, o);
1917
+ const u = nn(e.x, c, o);
1888
1918
  if (u < 0) return null;
1889
1919
  const h = e.y[u];
1890
1920
  if (Number.isNaN(h)) return null;
@@ -1892,7 +1922,7 @@ class oe {
1892
1922
  return {
1893
1923
  index: u,
1894
1924
  px: i.scale.toPx(p),
1895
- py: s.scale.toPx(h),
1925
+ py: r.scale.toPx(h),
1896
1926
  xValue: p,
1897
1927
  yValue: h,
1898
1928
  marked: !0,
@@ -1909,11 +1939,11 @@ class oe {
1909
1939
  t.style.opacity = "0";
1910
1940
  return;
1911
1941
  }
1912
- const i = t.offsetWidth, s = t.offsetHeight;
1913
- let r = e.hit.xPx + 12;
1914
- r + i > this.cssWidth && (r = e.hit.xPx - 12 - i), r < 0 && (r = 0);
1915
- let o = e.mouseY - s / 2;
1916
- o = Math.min(Math.max(o, 0), Math.max(0, this.cssHeight - s)), t.style.transform = `translate3d(${Math.round(r)}px, ${Math.round(o)}px, 0)`, t.style.opacity = "1";
1942
+ const i = t.offsetWidth, r = t.offsetHeight;
1943
+ let s = e.hit.xPx + 12;
1944
+ s + i > this.cssWidth && (s = e.hit.xPx - 12 - i), s < 0 && (s = 0);
1945
+ let o = e.mouseY - r / 2;
1946
+ o = Math.min(Math.max(o, 0), Math.max(0, this.cssHeight - r)), t.style.transform = `translate3d(${Math.round(s)}px, ${Math.round(o)}px, 0)`, t.style.opacity = "1";
1917
1947
  }
1918
1948
  /* ================= Snapshots for the HTML layer ================= */
1919
1949
  pushLayoutSnapshot() {
@@ -1938,18 +1968,18 @@ class oe {
1938
1968
  }
1939
1969
  /** Class name of the measuring span for tick labels - keeps the CSS and the
1940
1970
  layout in step. */
1941
- g(oe, "classTick", ht);
1942
- const ae = pe(null);
1943
- function tt(n) {
1944
- const t = ye(ae);
1945
- if (t === null && st)
1971
+ g(ce, "classTick", ut);
1972
+ const ue = be(null);
1973
+ function Q(n) {
1974
+ const t = xe(ue);
1975
+ if (t === null && it)
1946
1976
  throw new Error(
1947
1977
  `@umriss-ui/charts: <${n}> must be used inside a <Chart>.`
1948
1978
  );
1949
1979
  return t;
1950
1980
  }
1951
- function J(n, t) {
1952
- const e = tt(n), i = Z(null);
1981
+ function Z(n, t) {
1982
+ const e = Q(n), i = X(null);
1953
1983
  D(() => {
1954
1984
  if (e !== null)
1955
1985
  return i.current = e.registerSeries(t), () => {
@@ -1959,8 +1989,8 @@ function J(n, t) {
1959
1989
  e !== null && i.current !== null && e.updateSeries(i.current, t);
1960
1990
  });
1961
1991
  }
1962
- function le(n, t) {
1963
- const e = tt(n), i = Z(null);
1992
+ function he(n, t) {
1993
+ const e = Q(n), i = X(null);
1964
1994
  D(() => {
1965
1995
  if (e !== null)
1966
1996
  return i.current = e.registerAxis(t), () => {
@@ -1970,8 +2000,8 @@ function le(n, t) {
1970
2000
  e !== null && i.current !== null && e.updateAxis(i.current, t);
1971
2001
  });
1972
2002
  }
1973
- function ce(n, t) {
1974
- const e = tt(n), i = Z(null);
2003
+ function de(n, t) {
2004
+ const e = Q(n), i = X(null);
1975
2005
  D(() => {
1976
2006
  if (e !== null)
1977
2007
  return i.current = e.registerLimit(t), () => {
@@ -1981,8 +2011,8 @@ function ce(n, t) {
1981
2011
  e !== null && i.current !== null && e.updateLimit(i.current, t);
1982
2012
  });
1983
2013
  }
1984
- function In(n, t) {
1985
- const e = tt(n);
2014
+ function Sn(n, t) {
2015
+ const e = Q(n);
1986
2016
  D(() => {
1987
2017
  if (e !== null)
1988
2018
  return e.registerLegend(t), () => e.unregisterLegend();
@@ -1990,8 +2020,8 @@ function In(n, t) {
1990
2020
  e == null || e.updateLegend(t);
1991
2021
  });
1992
2022
  }
1993
- function Sn(n, t) {
1994
- const e = tt(n);
2023
+ function Mn(n, t) {
2024
+ const e = Q(n);
1995
2025
  D(() => {
1996
2026
  if (e !== null)
1997
2027
  return e.registerTooltip(t), () => e.unregisterTooltip();
@@ -1999,30 +2029,30 @@ function Sn(n, t) {
1999
2029
  e == null || e.updateTooltip(t);
2000
2030
  });
2001
2031
  }
2002
- function Mn(n, t) {
2003
- const { band: e, position: i, orientation: s } = n, r = {
2032
+ function Tn(n, t) {
2033
+ const { band: e, position: i, orientation: r } = n, s = {
2004
2034
  left: `${e.x}px`,
2005
2035
  top: `${e.y}px`,
2006
2036
  width: `${e.width}px`,
2007
2037
  height: `${e.height}px`
2008
2038
  }, o = Tt + At;
2009
- return /* @__PURE__ */ B(
2039
+ return /* @__PURE__ */ _(
2010
2040
  "div",
2011
2041
  {
2012
- className: `kc-axis kc-axis-${s} kc-axis-${i}`,
2013
- style: r,
2042
+ className: `uc-axis uc-axis-${r} uc-axis-${i}`,
2043
+ style: s,
2014
2044
  "data-axis": n.id,
2015
2045
  children: [
2016
- /* @__PURE__ */ I("span", { className: "kc-axis-line" }),
2046
+ /* @__PURE__ */ I("span", { className: "uc-axis-line" }),
2017
2047
  n.ticks.map((a) => {
2018
- if (s === "y") {
2048
+ if (r === "y") {
2019
2049
  const c = Math.round(a.px - e.y);
2020
- return /* @__PURE__ */ B("span", { className: "kc-tick", style: { top: `${c}px` }, children: [
2021
- /* @__PURE__ */ I("span", { className: "kc-tick-mark" }),
2050
+ return /* @__PURE__ */ _("span", { className: "uc-tick", style: { top: `${c}px` }, children: [
2051
+ /* @__PURE__ */ I("span", { className: "uc-tick-mark" }),
2022
2052
  /* @__PURE__ */ I(
2023
2053
  "span",
2024
2054
  {
2025
- className: "kc-tick-label",
2055
+ className: "uc-tick-label",
2026
2056
  style: { [i === "left" ? "right" : "left"]: `${o}px` },
2027
2057
  children: a.label
2028
2058
  }
@@ -2030,12 +2060,12 @@ function Mn(n, t) {
2030
2060
  ] }, a.value);
2031
2061
  }
2032
2062
  const l = Math.round(a.px - e.x);
2033
- return /* @__PURE__ */ B("span", { className: "kc-tick", style: { left: `${l}px` }, children: [
2034
- /* @__PURE__ */ I("span", { className: "kc-tick-mark" }),
2063
+ return /* @__PURE__ */ _("span", { className: "uc-tick", style: { left: `${l}px` }, children: [
2064
+ /* @__PURE__ */ I("span", { className: "uc-tick-mark" }),
2035
2065
  /* @__PURE__ */ I(
2036
2066
  "span",
2037
2067
  {
2038
- className: "kc-tick-label",
2068
+ className: "uc-tick-label",
2039
2069
  style: {
2040
2070
  left: `${Math.round(a.labelLeft - e.x) - l}px`,
2041
2071
  [i === "top" ? "bottom" : "top"]: `${o}px`
@@ -2048,17 +2078,17 @@ function Mn(n, t) {
2048
2078
  n.breaks.map((a, l) => /* @__PURE__ */ I(
2049
2079
  "span",
2050
2080
  {
2051
- className: "kc-break",
2081
+ className: "uc-break",
2052
2082
  style: { left: `${Math.round(a - e.x)}px` },
2053
2083
  "aria-hidden": "true"
2054
2084
  },
2055
2085
  `break-${l}`
2056
2086
  )),
2057
2087
  t.map(
2058
- (a) => s === "y" ? /* @__PURE__ */ I(
2088
+ (a) => r === "y" ? /* @__PURE__ */ I(
2059
2089
  "span",
2060
2090
  {
2061
- className: "kc-limit-label",
2091
+ className: "uc-limit-label",
2062
2092
  "data-severity": a.severity,
2063
2093
  "data-role": a.role,
2064
2094
  style: { top: `${Math.round(a.px - e.y)}px` },
@@ -2068,7 +2098,7 @@ function Mn(n, t) {
2068
2098
  ) : /* @__PURE__ */ I(
2069
2099
  "span",
2070
2100
  {
2071
- className: "kc-limit-label",
2101
+ className: "uc-limit-label",
2072
2102
  "data-severity": a.severity,
2073
2103
  "data-role": a.role,
2074
2104
  style: {
@@ -2080,38 +2110,38 @@ function Mn(n, t) {
2080
2110
  `limit-${a.id}`
2081
2111
  )
2082
2112
  ),
2083
- n.label !== void 0 && n.label !== "" && /* @__PURE__ */ I("span", { className: "kc-axis-title", children: n.label })
2113
+ n.label !== void 0 && n.label !== "" && /* @__PURE__ */ I("span", { className: "uc-axis-title", children: n.label })
2084
2114
  ]
2085
2115
  },
2086
2116
  n.key
2087
2117
  );
2088
2118
  }
2089
- function Tn({ scene: n }) {
2119
+ function An({ scene: n }) {
2090
2120
  const t = Et(
2091
2121
  n.subscribeLayout,
2092
2122
  n.getLayoutSnapshot,
2093
2123
  n.getLayoutServerSnapshot
2094
2124
  ), { layout: e } = t;
2095
- return e.plot.width <= 0 || e.plot.height <= 0 ? null : /* @__PURE__ */ I("div", { className: "kc-axes", children: e.axes.map(
2096
- (i) => Mn(
2125
+ return e.plot.width <= 0 || e.plot.height <= 0 ? null : /* @__PURE__ */ I("div", { className: "uc-axes", children: e.axes.map(
2126
+ (i) => Tn(
2097
2127
  i,
2098
- t.limits.filter((s) => s.axisKey === i.key)
2128
+ t.limits.filter((r) => r.axisKey === i.key)
2099
2129
  )
2100
2130
  ) });
2101
2131
  }
2102
- function An(n) {
2132
+ function Ln(n) {
2103
2133
  var e;
2104
2134
  const t = (e = n.segment) == null ? void 0 : e.label;
2105
- return t !== void 0 && t !== "" ? t : n.value !== void 0 ? _t(n.value) : _t(n.yValue);
2135
+ return t !== void 0 && t !== "" ? t : n.value !== void 0 ? Bt(n.value) : Bt(n.yValue);
2106
2136
  }
2107
- function Ln({ scene: n }) {
2137
+ function Fn({ scene: n }) {
2108
2138
  const t = Et(
2109
2139
  n.subscribeHover,
2110
2140
  n.getHoverSnapshot,
2111
2141
  n.getHoverServerSnapshot
2112
- ), e = ge(
2113
- (s) => {
2114
- n.bindTooltip(s);
2142
+ ), e = ve(
2143
+ (r) => {
2144
+ n.bindTooltip(r);
2115
2145
  },
2116
2146
  [n]
2117
2147
  );
@@ -2119,27 +2149,27 @@ function Ln({ scene: n }) {
2119
2149
  n.markOverlayDirty();
2120
2150
  }, [n, t.version]), t.tooltip === null) return null;
2121
2151
  const i = t.hover;
2122
- return /* @__PURE__ */ I("div", { className: "kc-tooltip", ref: e, role: "presentation", children: i === null ? null : t.tooltip.render !== void 0 ? t.tooltip.render(i.hit) : /* @__PURE__ */ B(Nt, { children: [
2123
- /* @__PURE__ */ I("div", { className: "kc-tooltip-head", children: t.xLabel }),
2124
- /* @__PURE__ */ I("div", { className: "kc-tooltip-list", children: i.hit.points.map((s) => /* @__PURE__ */ B("div", { className: "kc-tooltip-row", children: [
2125
- /* @__PURE__ */ I("span", { className: "kc-tooltip-chip", style: { background: s.color } }),
2126
- /* @__PURE__ */ I("span", { className: "kc-tooltip-name", children: s.seriesName }),
2127
- /* @__PURE__ */ I("span", { className: "kc-tooltip-value", children: An(s) })
2128
- ] }, `${s.seriesName}-${s.index}`)) })
2152
+ return /* @__PURE__ */ I("div", { className: "uc-tooltip", ref: e, role: "presentation", children: i === null ? null : t.tooltip.render !== void 0 ? t.tooltip.render(i.hit) : /* @__PURE__ */ _(Nt, { children: [
2153
+ /* @__PURE__ */ I("div", { className: "uc-tooltip-head", children: t.xLabel }),
2154
+ /* @__PURE__ */ I("div", { className: "uc-tooltip-list", children: i.hit.points.map((r) => /* @__PURE__ */ _("div", { className: "uc-tooltip-row", children: [
2155
+ /* @__PURE__ */ I("span", { className: "uc-tooltip-chip", style: { background: r.color } }),
2156
+ /* @__PURE__ */ I("span", { className: "uc-tooltip-name", children: r.seriesName }),
2157
+ /* @__PURE__ */ I("span", { className: "uc-tooltip-value", children: Ln(r) })
2158
+ ] }, `${r.seriesName}-${r.index}`)) })
2129
2159
  ] }) });
2130
2160
  }
2131
- function Zn(n) {
2161
+ function Jn(n) {
2132
2162
  const {
2133
2163
  data: t,
2134
2164
  width: e = "100%",
2135
2165
  height: i = 300,
2136
- padding: s = 8,
2137
- ariaLabel: r,
2166
+ padding: r = 8,
2167
+ ariaLabel: s,
2138
2168
  className: o,
2139
2169
  style: a,
2140
2170
  onPerf: l,
2141
2171
  children: c
2142
- } = n, [u] = be(() => new oe()), h = Z(null), p = Z(null), d = Z(null), m = Z(null), y = typeof s == "number" ? void 0 : s, f = typeof s == "number" ? s : void 0, b = f ?? (y == null ? void 0 : y.top), k = f ?? (y == null ? void 0 : y.right), N = f ?? (y == null ? void 0 : y.bottom), w = f ?? (y == null ? void 0 : y.left), L = E(
2172
+ } = n, [u] = ke(() => new ce()), h = X(null), p = X(null), d = X(null), m = X(null), y = typeof r == "number" ? void 0 : r, f = typeof r == "number" ? r : void 0, b = f ?? (y == null ? void 0 : y.top), k = f ?? (y == null ? void 0 : y.right), N = f ?? (y == null ? void 0 : y.bottom), w = f ?? (y == null ? void 0 : y.left), L = E(
2143
2173
  () => ({
2144
2174
  top: b ?? 8,
2145
2175
  right: k ?? 8,
@@ -2148,7 +2178,7 @@ function Zn(n) {
2148
2178
  }),
2149
2179
  [b, k, N, w]
2150
2180
  );
2151
- r === void 0 && q(
2181
+ s === void 0 && G(
2152
2182
  "chart-arialabel",
2153
2183
  "Chart without ariaLabel - please set a meaningful description (R-7.6)."
2154
2184
  ), D(() => {
@@ -2185,27 +2215,27 @@ function Zn(n) {
2185
2215
  }, P = (S) => {
2186
2216
  u.pointerMove(S.nativeEvent.offsetX, S.nativeEvent.offsetY);
2187
2217
  };
2188
- return /* @__PURE__ */ I(ae.Provider, { value: u, children: /* @__PURE__ */ B(
2218
+ return /* @__PURE__ */ I(ue.Provider, { value: u, children: /* @__PURE__ */ _(
2189
2219
  "div",
2190
2220
  {
2191
2221
  ref: h,
2192
- className: o ? `kc-root ${o}` : "kc-root",
2222
+ className: o ? `uc-root ${o}` : "uc-root",
2193
2223
  style: F,
2194
2224
  children: [
2195
- /* @__PURE__ */ B(
2225
+ /* @__PURE__ */ _(
2196
2226
  "div",
2197
2227
  {
2198
2228
  ref: p,
2199
- className: "kc-plot",
2229
+ className: "uc-plot",
2200
2230
  role: "img",
2201
- "aria-label": r,
2231
+ "aria-label": s,
2202
2232
  onPointerMove: P,
2203
2233
  onPointerLeave: () => u.pointerLeave(),
2204
2234
  children: [
2205
- /* @__PURE__ */ I("canvas", { ref: d, className: "kc-layer-series", "aria-hidden": "true" }),
2206
- /* @__PURE__ */ I("canvas", { ref: m, className: "kc-layer-overlay", "aria-hidden": "true" }),
2207
- /* @__PURE__ */ I(Tn, { scene: u }),
2208
- /* @__PURE__ */ I(Ln, { scene: u })
2235
+ /* @__PURE__ */ I("canvas", { ref: d, className: "uc-layer-series", "aria-hidden": "true" }),
2236
+ /* @__PURE__ */ I("canvas", { ref: m, className: "uc-layer-overlay", "aria-hidden": "true" }),
2237
+ /* @__PURE__ */ I(An, { scene: u }),
2238
+ /* @__PURE__ */ I(Fn, { scene: u })
2209
2239
  ]
2210
2240
  }
2211
2241
  ),
@@ -2214,13 +2244,13 @@ function Zn(n) {
2214
2244
  }
2215
2245
  ) });
2216
2246
  }
2217
- function Jn(n) {
2247
+ function Qn(n) {
2218
2248
  const {
2219
2249
  accessor: t,
2220
2250
  baseline: e,
2221
2251
  xAxisId: i = "x",
2222
- yAxisId: s = "y",
2223
- data: r,
2252
+ yAxisId: r = "y",
2253
+ data: s,
2224
2254
  name: o,
2225
2255
  color: a,
2226
2256
  fillOpacity: l = 0.18,
@@ -2231,24 +2261,24 @@ function Jn(n) {
2231
2261
  accessor: t,
2232
2262
  baseline: e,
2233
2263
  xAxisId: i,
2234
- yAxisId: s,
2235
- data: r,
2264
+ yAxisId: r,
2265
+ data: s,
2236
2266
  name: o,
2237
2267
  color: a,
2238
2268
  fillOpacity: l,
2239
2269
  strokeWidth: c
2240
2270
  }),
2241
- [t, e, i, s, r, o, a, l, c]
2271
+ [t, e, i, r, s, o, a, l, c]
2242
2272
  );
2243
- return J("Area", u), null;
2273
+ return Z("Area", u), null;
2244
2274
  }
2245
- function jn(n) {
2275
+ function ti(n) {
2246
2276
  const {
2247
2277
  accessor: t,
2248
2278
  xAxisId: e = "x",
2249
2279
  yAxisId: i = "y",
2250
- data: s,
2251
- name: r,
2280
+ data: r,
2281
+ name: s,
2252
2282
  color: o,
2253
2283
  barWidth: a = 0.8
2254
2284
  } = n, l = E(
@@ -2257,22 +2287,22 @@ function jn(n) {
2257
2287
  accessor: t,
2258
2288
  xAxisId: e,
2259
2289
  yAxisId: i,
2260
- data: s,
2261
- name: r,
2290
+ data: r,
2291
+ name: s,
2262
2292
  color: o,
2263
2293
  barWidth: a
2264
2294
  }),
2265
- [t, e, i, s, r, o, a]
2295
+ [t, e, i, r, s, o, a]
2266
2296
  );
2267
- return J("Bar", l), null;
2297
+ return Z("Bar", l), null;
2268
2298
  }
2269
- function Fn(n) {
2299
+ function Pn(n) {
2270
2300
  const {
2271
2301
  accessor: t,
2272
2302
  xAxisId: e = "x",
2273
2303
  yAxisId: i = "y",
2274
- data: s,
2275
- name: r,
2304
+ data: r,
2305
+ name: s,
2276
2306
  color: o,
2277
2307
  tone: a,
2278
2308
  strokeWidth: l = 1.5,
@@ -2284,25 +2314,25 @@ function Fn(n) {
2284
2314
  accessor: t,
2285
2315
  xAxisId: e,
2286
2316
  yAxisId: i,
2287
- data: s,
2288
- name: r,
2317
+ data: r,
2318
+ name: s,
2289
2319
  color: o,
2290
2320
  tone: a,
2291
2321
  strokeWidth: l,
2292
2322
  dash: c,
2293
2323
  markers: u
2294
2324
  }),
2295
- [t, e, i, s, r, o, a, l, c, u]
2325
+ [t, e, i, r, s, o, a, l, c, u]
2296
2326
  );
2297
- return J("Line", h), null;
2327
+ return Z("Line", h), null;
2298
2328
  }
2299
- function Pn(n) {
2329
+ function En(n) {
2300
2330
  const {
2301
2331
  accessor: t,
2302
2332
  xAxisId: e = "x",
2303
2333
  yAxisId: i = "y",
2304
- data: s,
2305
- name: r,
2334
+ data: r,
2335
+ name: s,
2306
2336
  color: o,
2307
2337
  tone: a,
2308
2338
  radius: l = 3
@@ -2312,23 +2342,23 @@ function Pn(n) {
2312
2342
  accessor: t,
2313
2343
  xAxisId: e,
2314
2344
  yAxisId: i,
2315
- data: s,
2316
- name: r,
2345
+ data: r,
2346
+ name: s,
2317
2347
  color: o,
2318
2348
  tone: a,
2319
2349
  radius: l
2320
2350
  }),
2321
- [t, e, i, s, r, o, a, l]
2351
+ [t, e, i, r, s, o, a, l]
2322
2352
  );
2323
- return J("Scatter", c), null;
2353
+ return Z("Scatter", c), null;
2324
2354
  }
2325
- function Qn(n) {
2355
+ function ei(n) {
2326
2356
  const {
2327
2357
  accessor: t,
2328
2358
  states: e,
2329
2359
  xAxisId: i = "x",
2330
- yAxisId: s = "y",
2331
- data: r,
2360
+ yAxisId: r = "y",
2361
+ data: s,
2332
2362
  name: o,
2333
2363
  laneFrom: a,
2334
2364
  laneTo: l
@@ -2338,17 +2368,17 @@ function Qn(n) {
2338
2368
  accessor: t,
2339
2369
  states: e,
2340
2370
  xAxisId: i,
2341
- yAxisId: s,
2342
- data: r,
2371
+ yAxisId: r,
2372
+ data: s,
2343
2373
  name: o,
2344
2374
  laneFrom: a,
2345
2375
  laneTo: l
2346
2376
  }),
2347
- [t, e, i, s, r, o, a, l]
2377
+ [t, e, i, r, s, o, a, l]
2348
2378
  );
2349
- return J("StateBand", c), null;
2379
+ return Z("StateBand", c), null;
2350
2380
  }
2351
- const En = [
2381
+ const Dn = [
2352
2382
  "#eef2ff",
2353
2383
  "#c7d2fe",
2354
2384
  "#a5b4fc",
@@ -2357,17 +2387,17 @@ const En = [
2357
2387
  "#4f46e5",
2358
2388
  "#4338ca"
2359
2389
  ];
2360
- function ti(n) {
2390
+ function ni(n) {
2361
2391
  const {
2362
2392
  accessor: t,
2363
2393
  value: e,
2364
2394
  coloring: i,
2365
- xAxisId: s = "x",
2366
- yAxisId: r = "y",
2395
+ xAxisId: r = "x",
2396
+ yAxisId: s = "y",
2367
2397
  data: o,
2368
2398
  name: a
2369
2399
  } = n, l = E(
2370
- () => i ?? { kind: "gradient", stops: En },
2400
+ () => i ?? { kind: "gradient", stops: Dn },
2371
2401
  [i]
2372
2402
  ), c = E(
2373
2403
  () => ({
@@ -2375,22 +2405,22 @@ function ti(n) {
2375
2405
  accessor: t,
2376
2406
  value: e,
2377
2407
  coloring: l,
2378
- xAxisId: s,
2379
- yAxisId: r,
2408
+ xAxisId: r,
2409
+ yAxisId: s,
2380
2410
  data: o,
2381
2411
  name: a
2382
2412
  }),
2383
- [t, e, l, s, r, o, a]
2413
+ [t, e, l, r, s, o, a]
2384
2414
  );
2385
- return J("Matrix", c), null;
2415
+ return Z("Matrix", c), null;
2386
2416
  }
2387
- function ei(n) {
2417
+ function ii(n) {
2388
2418
  const {
2389
2419
  accessor: t,
2390
2420
  to: e,
2391
2421
  xAxisId: i = "x",
2392
- yAxisId: s = "y",
2393
- data: r,
2422
+ yAxisId: r = "y",
2423
+ data: s,
2394
2424
  name: o,
2395
2425
  color: a,
2396
2426
  height: l = 0.6
@@ -2400,23 +2430,23 @@ function ei(n) {
2400
2430
  accessor: t,
2401
2431
  to: e,
2402
2432
  xAxisId: i,
2403
- yAxisId: s,
2404
- data: r,
2433
+ yAxisId: r,
2434
+ data: s,
2405
2435
  name: o,
2406
2436
  color: a,
2407
2437
  height: l
2408
2438
  }),
2409
- [t, e, i, s, r, o, a, l]
2439
+ [t, e, i, r, s, o, a, l]
2410
2440
  );
2411
- return J("Span", c), null;
2441
+ return Z("Span", c), null;
2412
2442
  }
2413
- function it(n) {
2443
+ function nt(n) {
2414
2444
  const {
2415
2445
  value: t,
2416
2446
  axisId: e = "y",
2417
2447
  orientation: i = "y",
2418
- severity: s = "alarm",
2419
- label: r,
2448
+ severity: r = "alarm",
2449
+ label: s,
2420
2450
  color: o,
2421
2451
  inExtent: a = !0,
2422
2452
  role: l = "specification"
@@ -2426,23 +2456,23 @@ function it(n) {
2426
2456
  value: t,
2427
2457
  axisId: e,
2428
2458
  orientation: i,
2429
- severity: s,
2459
+ severity: r,
2430
2460
  role: l,
2431
- label: r,
2461
+ label: s,
2432
2462
  color: o,
2433
2463
  inExtent: a
2434
2464
  }),
2435
- [t, e, i, s, l, r, o, a]
2465
+ [t, e, i, r, l, s, o, a]
2436
2466
  );
2437
- return ce("LimitLine", c), null;
2467
+ return de("LimitLine", c), null;
2438
2468
  }
2439
- function ni(n) {
2469
+ function ri(n) {
2440
2470
  const {
2441
2471
  from: t,
2442
2472
  to: e,
2443
2473
  axisId: i = "y",
2444
- orientation: s = "y",
2445
- severity: r = "warning",
2474
+ orientation: r = "y",
2475
+ severity: s = "warning",
2446
2476
  label: o,
2447
2477
  color: a,
2448
2478
  inExtent: l = !0,
@@ -2453,18 +2483,18 @@ function ni(n) {
2453
2483
  from: t,
2454
2484
  to: e,
2455
2485
  axisId: i,
2456
- orientation: s,
2457
- severity: r,
2486
+ orientation: r,
2487
+ severity: s,
2458
2488
  role: c,
2459
2489
  label: o,
2460
2490
  color: a,
2461
2491
  inExtent: l
2462
2492
  }),
2463
- [t, e, i, s, r, c, o, a, l]
2493
+ [t, e, i, r, s, c, o, a, l]
2464
2494
  );
2465
- return ce("LimitBand", u), null;
2495
+ return de("LimitBand", u), null;
2466
2496
  }
2467
- const Dn = 1.128;
2497
+ const $n = 1.128;
2468
2498
  function kt(n, t) {
2469
2499
  return {
2470
2500
  center: n,
@@ -2473,46 +2503,46 @@ function kt(n, t) {
2473
2503
  lower: n - 3 * t
2474
2504
  };
2475
2505
  }
2476
- function ii(n, t) {
2506
+ function si(n, t) {
2477
2507
  return (t - n) / 3;
2478
2508
  }
2479
- function $n(n, t) {
2509
+ function Cn(n, t) {
2480
2510
  if (t.kind === "given")
2481
2511
  return kt(t.center, t.sigma);
2482
2512
  const e = Math.max(0, Math.trunc(t.from)), i = Math.min(n.length, Math.trunc(t.to));
2483
- let s = 0, r = 0, o = 0, a = 0, l = Number.NaN;
2513
+ let r = 0, s = 0, o = 0, a = 0, l = Number.NaN;
2484
2514
  for (let u = e; u < i; u++) {
2485
2515
  const h = n[u];
2486
2516
  if (!Number.isFinite(h)) {
2487
2517
  l = Number.NaN;
2488
2518
  continue;
2489
2519
  }
2490
- s += h, r++, Number.isFinite(l) && (o += Math.abs(h - l), a++), l = h;
2520
+ r += h, s++, Number.isFinite(l) && (o += Math.abs(h - l), a++), l = h;
2491
2521
  }
2492
- if (r === 0) return kt(Number.NaN, Number.NaN);
2493
- const c = a === 0 ? 0 : o / a / Dn;
2494
- return kt(s / r, c);
2522
+ if (s === 0) return kt(Number.NaN, Number.NaN);
2523
+ const c = a === 0 ? 0 : o / a / $n;
2524
+ return kt(r / s, c);
2495
2525
  }
2496
- function Cn(n, t = [1, 2]) {
2526
+ function Wn(n, t = [1, 2]) {
2497
2527
  return t.map((e) => ({
2498
2528
  k: e,
2499
2529
  upper: n.center + e * n.sigma,
2500
2530
  lower: n.center - e * n.sigma
2501
2531
  }));
2502
2532
  }
2503
- function Wn(n, t) {
2533
+ function On(n, t) {
2504
2534
  return Number.isFinite(n) ? n > t ? 1 : n < t ? -1 : 0 : 0;
2505
2535
  }
2506
- function ue(n, t) {
2536
+ function fe(n, t) {
2507
2537
  const e = [];
2508
2538
  if (t < 1) return e;
2509
2539
  let i = 0;
2510
- for (let s = 1; s <= n.length; s++) {
2511
- const r = s < n.length ? n[s] : Number.NaN, o = n[i];
2512
- if (r !== o) {
2513
- if (o !== 0 && s - i >= t)
2514
- for (let a = i; a < s; a++) e.push(a);
2515
- i = s;
2540
+ for (let r = 1; r <= n.length; r++) {
2541
+ const s = r < n.length ? n[r] : Number.NaN, o = n[i];
2542
+ if (s !== o) {
2543
+ if (o !== 0 && r - i >= t)
2544
+ for (let a = i; a < r; a++) e.push(a);
2545
+ i = r;
2516
2546
  }
2517
2547
  }
2518
2548
  return e;
@@ -2525,59 +2555,59 @@ const $t = {
2525
2555
  runLength: 9,
2526
2556
  trendLength: 6
2527
2557
  };
2528
- function On(n, t) {
2558
+ function Hn(n, t) {
2529
2559
  const e = [];
2530
2560
  for (let i = 0; i < n.length; i++) {
2531
- const s = n[i];
2532
- (s > t.upper || s < t.lower) && e.push(i);
2561
+ const r = n[i];
2562
+ (r > t.upper || r < t.lower) && e.push(i);
2533
2563
  }
2534
2564
  return e;
2535
2565
  }
2536
- function Hn(n, t, e = $t.runLength) {
2537
- return ue(
2538
- n.map((i) => Wn(i, t.center)),
2566
+ function Rn(n, t, e = $t.runLength) {
2567
+ return fe(
2568
+ n.map((i) => On(i, t.center)),
2539
2569
  e
2540
2570
  );
2541
2571
  }
2542
- function Rn(n, t = $t.trendLength) {
2572
+ function Vn(n, t = $t.trendLength) {
2543
2573
  const e = [];
2544
- for (let s = 1; s < n.length; s++) {
2545
- const r = n[s - 1], o = n[s];
2546
- e.push(Number.isFinite(r) && Number.isFinite(o) ? Math.sign(o - r) : 0);
2574
+ for (let r = 1; r < n.length; r++) {
2575
+ const s = n[r - 1], o = n[r];
2576
+ e.push(Number.isFinite(s) && Number.isFinite(o) ? Math.sign(o - s) : 0);
2547
2577
  }
2548
2578
  const i = [];
2549
- for (const s of ue(e, Math.max(1, t - 1)))
2550
- i[i.length - 1] !== s && i.push(s), i.push(s + 1);
2579
+ for (const r of fe(e, Math.max(1, t - 1)))
2580
+ i[i.length - 1] !== r && i.push(r), i.push(r + 1);
2551
2581
  return i;
2552
2582
  }
2553
- function Vn(n, t) {
2554
- const e = t.center + 2 * t.sigma, i = t.center - 2 * t.sigma, s = /* @__PURE__ */ new Set();
2555
- for (let r = 0; r + 2 < n.length; r++)
2583
+ function _n(n, t) {
2584
+ const e = t.center + 2 * t.sigma, i = t.center - 2 * t.sigma, r = /* @__PURE__ */ new Set();
2585
+ for (let s = 0; s + 2 < n.length; s++)
2556
2586
  for (const o of [
2557
- [r, r + 1, r + 2].filter((a) => n[a] > e),
2558
- [r, r + 1, r + 2].filter((a) => n[a] < i)
2587
+ [s, s + 1, s + 2].filter((a) => n[a] > e),
2588
+ [s, s + 1, s + 2].filter((a) => n[a] < i)
2559
2589
  ])
2560
- if (o.length >= 2) for (const a of o) s.add(a);
2561
- return [...s].sort((r, o) => r - o);
2590
+ if (o.length >= 2) for (const a of o) r.add(a);
2591
+ return [...r].sort((s, o) => s - o);
2562
2592
  }
2563
- function _n(n, t, e = {}) {
2564
- const i = { ...$t, ...e }, s = [], r = (o, a) => {
2565
- a.length > 0 && s.push({ rule: o, indices: a });
2593
+ function Bn(n, t, e = {}) {
2594
+ const i = { ...$t, ...e }, r = [], s = (o, a) => {
2595
+ a.length > 0 && r.push({ rule: o, indices: a });
2566
2596
  };
2567
- return i.outlier && r("outlier", On(n, t)), i.run && r("run", Hn(n, t, i.runLength)), i.trend && r("trend", Rn(n, i.trendLength)), i.twoOfThree && r("twoOfThree", Vn(n, t)), s;
2597
+ return i.outlier && s("outlier", Hn(n, t)), i.run && s("run", Rn(n, t, i.runLength)), i.trend && s("trend", Vn(n, i.trendLength)), i.twoOfThree && s("twoOfThree", _n(n, t)), r;
2568
2598
  }
2569
- function Bn(n) {
2599
+ function Yn(n) {
2570
2600
  const t = /* @__PURE__ */ new Set();
2571
2601
  for (const e of n) for (const i of e.indices) t.add(i);
2572
2602
  return [...t].sort((e, i) => e - i);
2573
2603
  }
2574
- function si(n) {
2604
+ function oi(n) {
2575
2605
  const {
2576
2606
  accessor: t,
2577
2607
  data: e,
2578
2608
  origin: i,
2579
- xAxisId: s = "x",
2580
- yAxisId: r = "y",
2609
+ xAxisId: r = "x",
2610
+ yAxisId: s = "y",
2581
2611
  name: o,
2582
2612
  color: a,
2583
2613
  rules: l,
@@ -2593,10 +2623,10 @@ function si(n) {
2593
2623
  F.push(S ?? Number.NaN);
2594
2624
  }
2595
2625
  return F;
2596
- }, [e, t]), y = E(() => $n(m, i), [m, i]), f = E(
2597
- () => _n(m, y, l ?? {}),
2626
+ }, [e, t]), y = E(() => Cn(m, i), [m, i]), f = E(
2627
+ () => Bn(m, y, l ?? {}),
2598
2628
  [m, y, l]
2599
- ), b = E(() => new Set(Bn(f)), [f]);
2629
+ ), b = E(() => new Set(Yn(f)), [f]);
2600
2630
  D(() => {
2601
2631
  d == null || d(f);
2602
2632
  }, [f, d]);
@@ -2607,43 +2637,43 @@ function si(n) {
2607
2637
  () => b.size === 0 ? e : e.slice(),
2608
2638
  [e, b]
2609
2639
  ), w = E(
2610
- () => c ? Cn(y, [1, 2]) : [],
2640
+ () => c ? Wn(y, [1, 2]) : [],
2611
2641
  [c, y]
2612
2642
  ), L = Number.isFinite(y.center);
2613
- return /* @__PURE__ */ B(Nt, { children: [
2614
- /* @__PURE__ */ I(Fn, { accessor: t, data: e, xAxisId: s, yAxisId: r, name: o, color: a }),
2615
- L && /* @__PURE__ */ B(Nt, { children: [
2643
+ return /* @__PURE__ */ _(Nt, { children: [
2644
+ /* @__PURE__ */ I(Pn, { accessor: t, data: e, xAxisId: r, yAxisId: s, name: o, color: a }),
2645
+ L && /* @__PURE__ */ _(Nt, { children: [
2616
2646
  w.map((F) => /* @__PURE__ */ I(
2617
- it,
2647
+ nt,
2618
2648
  {
2619
2649
  value: F.upper,
2620
- axisId: r,
2650
+ axisId: s,
2621
2651
  role: "zone",
2622
2652
  inExtent: !1
2623
2653
  },
2624
2654
  `zone-${F.k}-upper`
2625
2655
  )),
2626
2656
  w.map((F) => /* @__PURE__ */ I(
2627
- it,
2657
+ nt,
2628
2658
  {
2629
2659
  value: F.lower,
2630
- axisId: r,
2660
+ axisId: s,
2631
2661
  role: "zone",
2632
2662
  inExtent: !1
2633
2663
  },
2634
2664
  `zone-${F.k}-lower`
2635
2665
  )),
2636
- /* @__PURE__ */ I(it, { value: y.center, axisId: r, role: "control" }),
2637
- /* @__PURE__ */ I(it, { value: y.upper, axisId: r, role: "control", label: u }),
2638
- /* @__PURE__ */ I(it, { value: y.lower, axisId: r, role: "control", label: h })
2666
+ /* @__PURE__ */ I(nt, { value: y.center, axisId: s, role: "control" }),
2667
+ /* @__PURE__ */ I(nt, { value: y.upper, axisId: s, role: "control", label: u }),
2668
+ /* @__PURE__ */ I(nt, { value: y.lower, axisId: s, role: "control", label: h })
2639
2669
  ] }),
2640
2670
  /* @__PURE__ */ I(
2641
- Pn,
2671
+ En,
2642
2672
  {
2643
2673
  accessor: k,
2644
2674
  data: N,
2645
- xAxisId: s,
2646
- yAxisId: r,
2675
+ xAxisId: r,
2676
+ yAxisId: s,
2647
2677
  name: p,
2648
2678
  tone: "alarm",
2649
2679
  radius: 4
@@ -2651,13 +2681,13 @@ function si(n) {
2651
2681
  )
2652
2682
  ] });
2653
2683
  }
2654
- function ri(n) {
2684
+ function ai(n) {
2655
2685
  const {
2656
2686
  id: t = "x",
2657
2687
  position: e = "bottom",
2658
2688
  accessor: i,
2659
- label: s,
2660
- tickCount: r,
2689
+ label: r,
2690
+ tickCount: s,
2661
2691
  tickFormat: o,
2662
2692
  domain: a = "nice",
2663
2693
  grid: l,
@@ -2669,25 +2699,25 @@ function ri(n) {
2669
2699
  orientation: "x",
2670
2700
  position: e,
2671
2701
  accessor: i,
2672
- label: s,
2673
- tickCount: r,
2702
+ label: r,
2703
+ tickCount: s,
2674
2704
  tickFormat: o,
2675
2705
  domain: a,
2676
2706
  grid: l,
2677
2707
  ticks: c,
2678
2708
  calendar: u
2679
2709
  }),
2680
- [t, e, i, s, r, o, a, l, c, u]
2710
+ [t, e, i, r, s, o, a, l, c, u]
2681
2711
  );
2682
- return le("XAxis", h), null;
2712
+ return he("XAxis", h), null;
2683
2713
  }
2684
- function oi(n) {
2714
+ function li(n) {
2685
2715
  const {
2686
2716
  id: t = "y",
2687
2717
  position: e = "left",
2688
2718
  accessor: i,
2689
- label: s,
2690
- tickCount: r,
2719
+ label: r,
2720
+ tickCount: s,
2691
2721
  tickFormat: o,
2692
2722
  domain: a = "nice",
2693
2723
  grid: l,
@@ -2698,63 +2728,63 @@ function oi(n) {
2698
2728
  orientation: "y",
2699
2729
  position: e,
2700
2730
  accessor: i,
2701
- label: s,
2702
- tickCount: r,
2731
+ label: r,
2732
+ tickCount: s,
2703
2733
  tickFormat: o,
2704
2734
  domain: a,
2705
2735
  grid: l,
2706
2736
  ticks: c
2707
2737
  }),
2708
- [t, e, i, s, r, o, a, l, c]
2738
+ [t, e, i, r, s, o, a, l, c]
2709
2739
  );
2710
- return le("YAxis", u), null;
2740
+ return he("YAxis", u), null;
2711
2741
  }
2712
- function Yn({
2742
+ function zn({
2713
2743
  scene: n,
2714
2744
  placement: t
2715
2745
  }) {
2716
- In("Legend", { placement: t });
2746
+ Sn("Legend", { placement: t });
2717
2747
  const e = Et(
2718
2748
  n.subscribeLayout,
2719
2749
  n.getLayoutSnapshot,
2720
2750
  n.getLayoutServerSnapshot
2721
2751
  );
2722
- return e.series.length === 0 ? null : /* @__PURE__ */ I("div", { className: `kc-legend kc-legend-${t}`, children: e.series.map((i) => /* @__PURE__ */ B(
2752
+ return e.series.length === 0 ? null : /* @__PURE__ */ I("div", { className: `uc-legend uc-legend-${t}`, children: e.series.map((i) => /* @__PURE__ */ _(
2723
2753
  "span",
2724
2754
  {
2725
- className: "kc-legend-item",
2755
+ className: "uc-legend-item",
2726
2756
  onPointerEnter: () => n.setHighlight(i.seriesId),
2727
2757
  onPointerLeave: () => n.setHighlight(null),
2728
2758
  children: [
2729
- /* @__PURE__ */ I("span", { className: "kc-legend-chip", style: { background: i.color } }),
2759
+ /* @__PURE__ */ I("span", { className: "uc-legend-chip", style: { background: i.color } }),
2730
2760
  i.name
2731
2761
  ]
2732
2762
  },
2733
2763
  i.id
2734
2764
  )) });
2735
2765
  }
2736
- function ai({ placement: n = "top" }) {
2737
- const t = tt("Legend");
2738
- return t === null ? null : /* @__PURE__ */ I(Yn, { scene: t, placement: n });
2766
+ function ci({ placement: n = "top" }) {
2767
+ const t = Q("Legend");
2768
+ return t === null ? null : /* @__PURE__ */ I(zn, { scene: t, placement: n });
2739
2769
  }
2740
- function li(n) {
2770
+ function ui(n) {
2741
2771
  const { mode: t = "x", render: e } = n, i = E(
2742
2772
  () => ({ mode: t, render: e }),
2743
2773
  [t, e]
2744
2774
  );
2745
- return Sn("Tooltip", i), null;
2775
+ return Mn("Tooltip", i), null;
2746
2776
  }
2747
- const zn = {
2777
+ const Gn = {
2748
2778
  cutoff: 0.8,
2749
2779
  collectRank: Number.POSITIVE_INFINITY
2750
2780
  };
2751
- function ci(n, t = {}) {
2752
- const e = { ...zn, ...t };
2753
- ut(
2781
+ function hi(n, t = {}) {
2782
+ const e = { ...Gn, ...t };
2783
+ ct(
2754
2784
  !Number.isFinite(e.collectRank) || e.remainderName !== void 0,
2755
2785
  "pareto: a collect rank needs `remainderName` - the package brings no name for the remainder."
2756
2786
  );
2757
- const i = n.map((d, m) => ({ item: d, inputIndex: m })).sort((d, m) => m.item.value - d.item.value || d.inputIndex - m.inputIndex).map(({ item: d }) => d), s = Math.max(0, Math.min(i.length, Math.floor(e.collectRank))), r = i.slice(0, s), o = i.slice(s), a = o.length === 0 ? r : [...r, { name: e.remainderName ?? "", value: o.reduce((d, m) => d + m.value, 0) }], l = a.reduce((d, m) => d + m.value, 0), c = [];
2787
+ const i = n.map((d, m) => ({ item: d, inputIndex: m })).sort((d, m) => m.item.value - d.item.value || d.inputIndex - m.inputIndex).map(({ item: d }) => d), r = Math.max(0, Math.min(i.length, Math.floor(e.collectRank))), s = i.slice(0, r), o = i.slice(r), a = o.length === 0 ? s : [...s, { name: e.remainderName ?? "", value: o.reduce((d, m) => d + m.value, 0) }], l = a.reduce((d, m) => d + m.value, 0), c = [];
2758
2788
  let u = 0;
2759
2789
  for (let d = 0; d < a.length; d++) {
2760
2790
  const m = a[d];
@@ -2771,50 +2801,53 @@ function ci(n, t = {}) {
2771
2801
  return { entries: c, total: l, cutoffIndex: p };
2772
2802
  }
2773
2803
  export {
2774
- Jn as Area,
2775
- jn as Bar,
2776
- Zn as Chart,
2777
- si as ControlChart,
2778
- X as DAY,
2779
- En as DEFAULT_GRADIENT,
2780
- Q as HOUR,
2781
- ai as Legend,
2782
- ni as LimitBand,
2783
- it as LimitLine,
2784
- Fn as Line,
2785
- Vt as LinearScale,
2786
- U as MINUTE,
2787
- ti as Matrix,
2788
- K as SECOND,
2789
- Pn as Scatter,
2790
- ei as Span,
2791
- Qn as StateBand,
2792
- li as Tooltip,
2793
- ri as XAxis,
2794
- oi as YAxis,
2795
- rn as assess,
2796
- Ce as breaks,
2797
- G as calendarFrom,
2798
- $n as controlLimits,
2804
+ Qn as Area,
2805
+ ti as Bar,
2806
+ Jn as Chart,
2807
+ oi as ControlChart,
2808
+ U as DAY,
2809
+ Dn as DEFAULT_GRADIENT,
2810
+ J as HOUR,
2811
+ ci as Legend,
2812
+ ri as LimitBand,
2813
+ nt as LimitLine,
2814
+ Pn as Line,
2815
+ _t as LinearScale,
2816
+ K as MINUTE,
2817
+ ni as Matrix,
2818
+ q as SECOND,
2819
+ En as Scatter,
2820
+ ii as Span,
2821
+ ei as StateBand,
2822
+ ui as Tooltip,
2823
+ ai as XAxis,
2824
+ li as YAxis,
2825
+ on as assess,
2826
+ We as breaks,
2827
+ z as calendarFrom,
2828
+ Cn as controlLimits,
2799
2829
  $t as defaultRules,
2800
- we as invalidateTheme,
2801
- Un as mapSeries,
2802
- Fe as operatingCalendar,
2803
- He as operatingTicks,
2804
- Oe as operatingTimeTicks,
2805
- ci as pareto,
2806
- zn as paretoDefaults,
2807
- $e as removedIntervals,
2808
- On as ruleOutlier,
2809
- Hn as ruleRun,
2810
- Rn as ruleTrend,
2811
- Vn as ruleTwoOfThree,
2812
- ii as sigmaFromLimit,
2813
- We as timeStep,
2814
- yt as toOperatingTime,
2815
- ft as toWallClock,
2816
- Xn as verdictWeight,
2817
- Bn as violatedIndices,
2818
- _n as violations,
2819
- Cn as zones
2830
+ Rt as invalidateTheme,
2831
+ Zn as mapSeries,
2832
+ Pe as operatingCalendar,
2833
+ Re as operatingTicks,
2834
+ He as operatingTimeTicks,
2835
+ hi as pareto,
2836
+ Gn as paretoDefaults,
2837
+ Ce as removedIntervals,
2838
+ Xn as resolveColours,
2839
+ Hn as ruleOutlier,
2840
+ Rn as ruleRun,
2841
+ Vn as ruleTrend,
2842
+ _n as ruleTwoOfThree,
2843
+ si as sigmaFromLimit,
2844
+ Se as subscribeTheme,
2845
+ Oe as timeStep,
2846
+ pt as toOperatingTime,
2847
+ De as toOperatingTimeClamped,
2848
+ dt as toWallClock,
2849
+ jn as verdictWeight,
2850
+ Yn as violatedIndices,
2851
+ Bn as violations,
2852
+ Wn as zones
2820
2853
  };