@wick-charts/vue 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/BandSeries.vue.js +25 -24
  2. package/dist/BarSeries.vue.js +27 -26
  3. package/dist/CandlestickSeries.vue.js +25 -24
  4. package/dist/HeatmapSeries.vue.js +21 -20
  5. package/dist/LineSeries.vue.js +24 -23
  6. package/dist/PieSeries.vue.js +25 -24
  7. package/dist/composables.js +63 -36
  8. package/dist/core/dist/axis/dom-labels.js +64 -53
  9. package/dist/core/dist/chart/options.js +1 -1
  10. package/dist/core/dist/chart/y-target.js +38 -32
  11. package/dist/core/dist/chart.js +475 -439
  12. package/dist/core/dist/data/decimation.js +52 -51
  13. package/dist/core/dist/data/store.js +38 -20
  14. package/dist/core/dist/data/sync.js +80 -69
  15. package/dist/core/dist/perf/perf-hud.js +3 -3
  16. package/dist/core/dist/scales/tick-tracker.js +2 -1
  17. package/dist/core/dist/series/band.js +1 -1
  18. package/dist/core/dist/series/bar.js +240 -211
  19. package/dist/core/dist/series/base-multi-layer.js +267 -249
  20. package/dist/core/dist/series/candlestick.js +116 -116
  21. package/dist/core/dist/series/line.js +540 -455
  22. package/dist/core/dist/snapshots.js +96 -77
  23. package/dist/index.d.ts +22 -4
  24. package/dist/ui/InfoBar.vue.js +68 -68
  25. package/dist/ui/NumberFlow.vue.js +36 -27
  26. package/dist/ui/Tooltip.vue.js +127 -130
  27. package/package.json +2 -2
  28. package/src/BandSeries.vue +5 -3
  29. package/src/BarSeries.vue +5 -3
  30. package/src/CandlestickSeries.vue +5 -4
  31. package/src/ChartContainer.vue +1 -1
  32. package/src/HeatmapSeries.vue +5 -4
  33. package/src/LineSeries.vue +5 -3
  34. package/src/PieSeries.vue +6 -5
  35. package/src/composables.ts +64 -1
  36. package/src/ui/InfoBar.vue +11 -3
  37. package/src/ui/NumberFlow.vue +17 -3
  38. package/src/ui/Tooltip.vue +23 -12
@@ -1,73 +1,74 @@
1
- function D(t, h) {
2
- return t.length <= h ? t : v(
1
+ function k(t, n) {
2
+ return t.length <= n ? t : D(
3
3
  t,
4
- h,
5
- (l) => l.time,
6
- (l) => l.value
4
+ n,
5
+ (h) => h.time,
6
+ (h) => h.value
7
7
  );
8
8
  }
9
- function k(t, h) {
10
- if (t.length <= h) return t;
11
- const l = Math.ceil(t.length / h), u = [];
12
- for (let o = 0; o < t.length; o += l) {
13
- const n = Math.min(o + l, t.length);
9
+ function x(t, n) {
10
+ if (t.length <= n) return t;
11
+ const h = Math.ceil(t.length / n), a = [];
12
+ for (let l = 0; l < t.length; l += h) {
13
+ const o = Math.min(l + h, t.length);
14
14
  let s = -1 / 0, i = 1 / 0, c = 0;
15
- for (let r = o; r < n; r++)
16
- t[r].high > s && (s = t[r].high), t[r].low < i && (i = t[r].low), c += t[r].volume ?? 0;
17
- u.push({
18
- time: t[o].time,
19
- open: t[o].open,
15
+ for (let e = l; e < o; e++)
16
+ t[e].high > s && (s = t[e].high), t[e].low < i && (i = t[e].low), c += t[e].volume ?? 0;
17
+ a.push({
18
+ time: t[l].time,
19
+ open: t[l].open,
20
20
  high: s,
21
21
  low: i,
22
- close: t[n - 1].close,
22
+ close: t[o - 1].close,
23
23
  volume: c
24
24
  });
25
25
  }
26
- return u;
26
+ return a;
27
27
  }
28
- function x(t, h) {
29
- if (t.length <= h || h < 3) return t;
30
- const l = t.length - 1, u = Math.ceil((t.length - 2) / (h - 2)), o = [t[0]];
31
- for (let n = 1; n < l; n += u) {
32
- const s = Math.min(n + u, l);
33
- let i = 1 / 0, c = -1 / 0, r = !1;
34
- for (let f = n; f < s; f++) {
35
- const a = t[f];
36
- if (!Number.isFinite(a.low) || !Number.isFinite(a.high)) {
37
- r = !0;
28
+ function L(t, n) {
29
+ if (t.length <= n || n < 3) return t;
30
+ const h = t.length - 1, a = Math.ceil((t.length - 2) / (n - 2)), l = [t[0]];
31
+ for (let o = 1; o < h; o += a) {
32
+ const s = Math.min(o + a, h);
33
+ let i = 1 / 0, c = -1 / 0, e = !1;
34
+ for (let m = o; m < s; m++) {
35
+ const r = t[m];
36
+ if (!Number.isFinite(r.low) || !Number.isFinite(r.high)) {
37
+ e = !0;
38
38
  break;
39
39
  }
40
- a.low < i && (i = a.low), a.high > c && (c = a.high);
40
+ r.low < i && (i = r.low), r.high > c && (c = r.high);
41
41
  }
42
- o.push(r ? { time: t[n].time, low: Number.NaN, high: Number.NaN } : { time: t[n].time, low: i, high: c });
42
+ l.push(e ? { time: t[o].time, low: Number.NaN, high: Number.NaN } : { time: t[o].time, low: i, high: c });
43
43
  }
44
- return o.push(t[l]), o;
44
+ return l.push(t[h]), l;
45
45
  }
46
- function v(t, h, l, u) {
47
- if (h >= t.length || h < 3) return t;
48
- const o = [t[0]], n = (t.length - 2) / (h - 2);
46
+ function D(t, n, h, a) {
47
+ if (n >= t.length || n < 3) return t;
48
+ const l = [t[0]], o = (t.length - 2) / (n - 2);
49
49
  let s = 0;
50
- for (let i = 0; i < h - 2; i++) {
51
- const c = Math.floor((i + 1) * n) + 1, r = Math.min(Math.floor((i + 2) * n) + 1, t.length - 1);
52
- let f = 0, a = 0;
53
- const M = r, p = Math.min(Math.floor((i + 3) * n) + 1, t.length), g = p - M;
54
- if (g > 0) {
55
- for (let e = M; e < p; e++)
56
- f += l(t[e]), a += u(t[e]);
57
- f /= g, a /= g;
50
+ for (let i = 0; i < n - 2; i++) {
51
+ const c = Math.floor((i + 1) * o) + 1, e = Math.min(Math.floor((i + 2) * o) + 1, t.length - 1), m = h(t[s]), r = a(t[s]), p = Number.isFinite(r);
52
+ let g = 0, N = 0, b = 0;
53
+ const d = e, v = Math.min(Math.floor((i + 3) * o) + 1, t.length);
54
+ for (let u = d; u < v; u++) {
55
+ const f = a(t[u]);
56
+ Number.isFinite(f) && (g += h(t[u]), N += f, b++);
58
57
  }
59
- let w = -1, m = c;
60
- const N = l(t[s]), b = u(t[s]);
61
- for (let e = c; e < r; e++) {
62
- const d = Math.abs((N - f) * (u(t[e]) - b) - (N - l(t[e])) * (a - b));
63
- d > w && (w = d, m = e);
58
+ b > 0 ? (g /= b, N /= b) : (g = m, N = p ? r : 0);
59
+ let w = -1, M = c;
60
+ for (let u = c; u < e; u++) {
61
+ const f = a(t[u]);
62
+ if (!Number.isFinite(f)) continue;
63
+ const F = p ? Math.abs((m - g) * (f - r) - (m - h(t[u])) * (N - r)) : 0;
64
+ F > w && (w = F, M = u);
64
65
  }
65
- o.push(t[m]), s = m;
66
+ l.push(t[M]), s = M;
66
67
  }
67
- return o.push(t[t.length - 1]), o;
68
+ return l.push(t[t.length - 1]), l;
68
69
  }
69
70
  export {
70
- x as decimateBandData,
71
- D as decimateLineData,
72
- k as decimateOHLCData
71
+ L as decimateBandData,
72
+ k as decimateLineData,
73
+ x as decimateOHLCData
73
74
  };
@@ -1,10 +1,16 @@
1
- import { EventEmitter as d } from "../events.js";
1
+ import { EventEmitter as l } from "../events.js";
2
2
  import { binarySearch as n } from "../utils/math.js";
3
- class u extends d {
3
+ class u extends l {
4
4
  data = [];
5
5
  _visible = !0;
6
6
  cachedRange = null;
7
7
  cachedResult = [];
8
+ // Points `trimStart` dropped, oldest first. A view whose left edge is older
9
+ // than the kept head still draws them, so a rolling window slides out of view.
10
+ exited = [];
11
+ // Leftmost `from` read since the last trim: older exited points are out of every view since then.
12
+ lowestReadFrom = Number.POSITIVE_INFINITY;
13
+ appendedSinceTrim = 0;
8
14
  // Dev-only, warn-once-per-instance: these two conditions are almost always
9
15
  // a persistent bug in the caller's feed (not a one-off), so a per-call
10
16
  // warning would just spam the console on every tick.
@@ -25,7 +31,7 @@ class u extends d {
25
31
  }
26
32
  !a && process.env.NODE_ENV !== "production" && !this.warnedUnsorted && (this.warnedUnsorted = !0, console.warn(
27
33
  "[wick-charts] data is not sorted by time — re-sorting on every setData() call is wasted work. Sort your feed by `time` ascending before passing it in."
28
- )), this.data = a ? t.slice() : [...t].sort((e, i) => e.time - i.time), this.cachedRange = null, this.emit("update");
34
+ )), this.data = a ? t.slice() : [...t].sort((e, s) => e.time - s.time), this.exited = [], this.appendedSinceTrim = 0, this.cachedRange = null, this.emit("update");
29
35
  }
30
36
  append(t) {
31
37
  if (this.data.length > 0 && t.time <= this.data[this.data.length - 1].time) {
@@ -34,7 +40,7 @@ class u extends d {
34
40
  )), this.updateLast(t);
35
41
  return;
36
42
  }
37
- this.data.push(t), this.cachedRange = null, this.emit("update");
43
+ this.data.push(t), this.appendedSinceTrim++, this.cachedRange = null, this.emit("update");
38
44
  }
39
45
  updateLast(t) {
40
46
  this.data.length !== 0 && (this.data[this.data.length - 1] = t, this.cachedRange = null, this.emit("update"));
@@ -47,16 +53,22 @@ class u extends d {
47
53
  * is already validated and no re-sort is needed here. No-op on empty input.
48
54
  */
49
55
  prepend(t) {
50
- t.length !== 0 && (this.data = t.concat(this.data), this.cachedRange = null, this.emit("update"));
56
+ t.length !== 0 && (this.data = t.concat(this.data), this.exited = [], this.cachedRange = null, this.emit("update"));
51
57
  }
52
58
  trimStart(t) {
53
- if (!(t <= 0 || this.data.length === 0)) {
54
- if (t >= this.data.length) {
55
- this.data = [], this.cachedRange = null, this.emit("update");
56
- return;
57
- }
58
- this.data = this.data.slice(t), this.cachedRange = null, this.emit("update");
59
- }
59
+ if (t <= 0 || this.data.length === 0) return;
60
+ const a = this.data.slice(0, t), e = a.slice(Math.max(0, a.length - this.appendedSinceTrim)), s = e.length === a.length ? this.exited.concat(e) : e;
61
+ this.data = this.data.slice(t), this.exited = this.reachedByView(s), this.appendedSinceTrim = 0, this.lowestReadFrom = Number.POSITIVE_INFINITY, this.cachedRange = null, this.emit("update");
62
+ }
63
+ /**
64
+ * The exited points the leftmost view read since the last trim needs to reach its left edge.
65
+ * None without a read, so a chart that does not paint (a hidden tab) does not pile them up.
66
+ */
67
+ reachedByView(t) {
68
+ const a = this.lowestReadFrom, e = this.data[0];
69
+ if (e === void 0 || e.time <= a) return [];
70
+ const s = Math.max(0, n(t, a, (h) => h.time) - 1);
71
+ return t.slice(s);
60
72
  }
61
73
  getAll() {
62
74
  return this.data;
@@ -64,8 +76,14 @@ class u extends d {
64
76
  getVisibleData(t, a) {
65
77
  if (this.data.length === 0) return [];
66
78
  if (this.cachedRange && this.cachedRange.from === t && this.cachedRange.to === a) return this.cachedResult;
67
- const e = Math.max(0, n(this.data, t, (s) => s.time) - 1), i = Math.min(this.data.length, n(this.data, a, (s) => s.time) + 1);
68
- return this.cachedResult = this.data.slice(e, i), this.cachedRange = { from: t, to: a }, this.cachedResult;
79
+ this.lowestReadFrom = Math.min(this.lowestReadFrom, t);
80
+ const e = Math.max(0, n(this.data, t, (i) => i.time) - 1), s = Math.min(this.data.length, n(this.data, a, (i) => i.time) + 1);
81
+ let h = this.data.slice(e, s);
82
+ if (e === 0 && this.data[0].time > t && this.exited.length > 0) {
83
+ const i = Math.max(0, n(this.exited, t, (r) => r.time) - 1), d = Math.min(this.exited.length, n(this.exited, a, (r) => r.time) + 1);
84
+ h = this.exited.slice(i, d).concat(h);
85
+ }
86
+ return this.cachedResult = h, this.cachedRange = { from: t, to: a }, h;
69
87
  }
70
88
  first() {
71
89
  return this.data[0];
@@ -81,13 +99,13 @@ class u extends d {
81
99
  }
82
100
  findNearest(t, a) {
83
101
  if (this.data.length === 0) return null;
84
- const e = n(this.data, t, (h) => h.time);
85
- let i = null, s = a;
86
- for (let h = Math.max(0, e - 1); h <= Math.min(this.data.length - 1, e + 1); h++) {
87
- const r = Math.abs(this.data[h].time - t);
88
- r <= s && (s = r, i = this.data[h]);
102
+ const e = n(this.data, t, (i) => i.time);
103
+ let s = null, h = a;
104
+ for (let i = Math.max(0, e - 1); i <= Math.min(this.data.length - 1, e + 1); i++) {
105
+ const d = Math.abs(this.data[i].time - t);
106
+ d <= h && (h = d, s = this.data[i]);
89
107
  }
90
- return i;
108
+ return s;
91
109
  }
92
110
  }
93
111
  export {
@@ -1,102 +1,113 @@
1
- import { normalizeTime as T } from "../utils/time.js";
2
- function s(a) {
3
- return "x" in a ? a.x : T(a.time);
1
+ import { normalizeTime as A } from "../utils/time.js";
2
+ function i(a) {
3
+ return "x" in a ? a.x : A(a.time);
4
4
  }
5
- const D = { len: 0, firstTime: null, lastTime: null, data: null }, A = 20;
5
+ const S = { len: 0, firstTime: null, lastTime: null, data: null, last: null }, b = 20;
6
6
  function o(a, t) {
7
- if (s(a) !== s(t)) return !1;
8
- const r = Object.keys(a), e = Object.keys(t);
9
- return r.length !== e.length ? !1 : r.every((n) => n === "time" || a[n] === t[n]);
7
+ if (i(a) !== i(t)) return !1;
8
+ const l = Object.keys(a), e = Object.keys(t);
9
+ return l.length !== e.length ? !1 : l.every((r) => r === "time" || a[r] === t[r]);
10
10
  }
11
- function y(a, t) {
11
+ function p(a, t) {
12
12
  if (!a || a.length !== t.length || a === t) return !1;
13
- for (let r = 0; r < t.length - 1; r++)
14
- if (a[r] !== t[r] && !o(a[r], t[r]))
13
+ for (let l = 0; l < t.length - 1; l++)
14
+ if (a[l] !== t[l] && !o(a[l], t[l]))
15
15
  return !1;
16
16
  return !0;
17
17
  }
18
- function S(a, t, r) {
19
- if (!a || a.length === 0 || r <= 0 || a.length !== t.length - r) return !1;
20
- for (let e = 1; e < r; e++)
21
- if (s(t[e - 1]) >= s(t[e])) return !1;
22
- if (s(t[r - 1]) >= s(a[0])) return !1;
18
+ function E(a, t, l) {
19
+ if (!a || a.length === 0 || l <= 0 || a.length !== t.length - l) return !1;
20
+ for (let e = 1; e < l; e++)
21
+ if (i(t[e - 1]) >= i(t[e])) return !1;
22
+ if (i(t[l - 1]) >= i(a[0])) return !1;
23
23
  for (let e = 0; e < a.length; e++)
24
- if (!o(a[e], t[r + e])) return !1;
24
+ if (!o(a[e], t[l + e])) return !1;
25
25
  return !0;
26
26
  }
27
- function m(a, t, r) {
28
- if (!a || a === t) return "unchanged";
29
- const e = a.length - r;
30
- if (e <= 0 || e > t.length) return null;
31
- for (let l = 0; l < e - 1; l++) {
32
- const u = a[r + l];
33
- if (u !== t[l] && !o(u, t[l]))
27
+ function m(a, t, l) {
28
+ const e = a.data;
29
+ if (!e) return "unchanged";
30
+ if (e === t) return T(a, t) ? "lastEdited" : "unchanged";
31
+ const r = e.length - l;
32
+ if (r <= 0 || r > t.length) return null;
33
+ for (let u = 0; u < r - 1; u++) {
34
+ const f = e[l + u];
35
+ if (f !== t[u] && !o(f, t[u]))
34
36
  return null;
35
37
  }
36
- for (let l = e; l < t.length; l++)
37
- if (s(t[l - 1]) >= s(t[l])) return null;
38
- const n = a[a.length - 1], i = t[e - 1];
39
- return n === i || o(n, i) ? "unchanged" : s(n) !== s(i) ? null : "lastEdited";
38
+ for (let u = r; u < t.length; u++)
39
+ if (i(t[u - 1]) >= i(t[u])) return null;
40
+ const n = e[e.length - 1], s = t[r - 1];
41
+ return n === s || o(n, s) ? "unchanged" : i(n) !== i(s) ? null : "lastEdited";
40
42
  }
41
- function b(a) {
42
- return typeof a == "object" && a !== null && !Array.isArray(a) && Array.isArray(a.data);
43
+ function T(a, t) {
44
+ const l = a.last ?? null, e = t[a.len - 1];
45
+ return l === null || e === void 0 ? !1 : i(l) === i(e) && !o(l, e);
46
+ }
47
+ function h(a) {
48
+ const t = a[a.length - 1];
49
+ return { len: a.length, firstTime: i(a[0]), lastTime: i(t), data: a, last: { ...t } };
43
50
  }
44
51
  function L(a) {
52
+ return typeof a == "object" && a !== null && !Array.isArray(a) && Array.isArray(a.data);
53
+ }
54
+ function v(a) {
45
55
  if (!Array.isArray(a)) return [a];
46
56
  if (a.length === 0) return [{ data: [] }];
47
57
  const t = a[0];
48
- return Array.isArray(t) || b(t) ? a.map((r) => Array.isArray(r) ? { data: r } : r) : [{ data: a }];
58
+ return Array.isArray(t) || L(t) ? a.map((l) => Array.isArray(l) ? { data: l } : l) : [{ data: a }];
49
59
  }
50
- function k(a) {
51
- const { chart: t, id: r } = a, e = L(a.data), n = e.length > 1 ? e.map((l, u) => l.label ?? `Series ${u + 1}`) : [e[0].label];
52
- t.setSeriesLabels(r, n), t.setLayerColors(
53
- r,
54
- e.map((l) => l.color)
60
+ function j(a) {
61
+ const { chart: t, id: l } = a, e = v(a.data), r = e.length > 1 ? e.map((s, u) => s.label ?? `Series ${u + 1}`) : [e[0].label];
62
+ t.setSeriesLabels(l, r), t.setLayerColors(
63
+ l,
64
+ e.map((s) => s.color)
55
65
  );
56
- const i = [];
66
+ const n = [];
57
67
  return t.batch(() => {
58
- for (let l = 0; l < e.length; l++)
59
- i[l] = E({
68
+ for (let s = 0; s < e.length; s++)
69
+ n[s] = x({
60
70
  chart: t,
61
- id: r,
62
- data: e[l].data,
63
- prev: a.prev[l] ?? D,
64
- layerIndex: l
71
+ id: l,
72
+ data: e[s].data,
73
+ prev: a.prev[s] ?? S,
74
+ layerIndex: s
65
75
  });
66
- }), i;
76
+ }), n;
67
77
  }
68
- function E(a) {
69
- const { chart: t, id: r, data: e, prev: n, layerIndex: i } = a;
78
+ function x(a) {
79
+ const { chart: t, id: l, data: e, prev: r, layerIndex: n } = a;
70
80
  if (e.length === 0)
71
- return t.setSeriesData(r, [], i), { len: 0, firstTime: null, lastTime: null, data: [] };
72
- if (n.data === e && n.len === e.length) return n;
73
- const l = s(e[0]), u = s(e[e.length - 1]);
74
- if (typeof l == "string")
75
- return e.length === n.len && y(n.data, e) ? t.updateData(r, e[e.length - 1], i) : t.setSeriesData(r, e, i), { len: e.length, firstTime: l, lastTime: u, data: e };
76
- const d = n.firstTime !== null && n.firstTime !== l, f = e.length - n.len, p = n.lastTime !== null && n.lastTime !== u, c = d && f === 0 && p ? m(n.data, e, 1) : null;
77
- if (c !== null)
81
+ return t.setSeriesData(l, [], n), { len: 0, firstTime: null, lastTime: null, data: [], last: null };
82
+ if (r.data === e && r.len === e.length)
83
+ return T(r, e) ? (t.updateData(l, e[e.length - 1], n), h(e)) : r;
84
+ const s = i(e[0]), u = i(e[e.length - 1]);
85
+ if (typeof s == "string")
86
+ return e.length === r.len && p(r.data, e) ? t.updateData(l, e[e.length - 1], n) : t.setSeriesData(l, e, n), h(e);
87
+ const f = r.firstTime !== null && r.firstTime !== s, c = e.length - r.len, D = r.lastTime !== null && r.lastTime !== u, g = f && c === 0 && D ? m(r, e, 1) : null;
88
+ if (g !== null)
78
89
  t.batch(() => {
79
- c === "lastEdited" && t.updateData(r, e[e.length - 2], i), t.appendData(r, e[e.length - 1], i), t.keepLast(r, e.length, i);
90
+ g === "lastEdited" && t.updateData(l, e[e.length - 2], n), t.appendData(l, e[e.length - 1], n), t.keepLast(l, e.length, n);
80
91
  });
81
- else if (S(n.data, e, f))
82
- t.prependData(r, e.slice(0, f), i);
83
- else if (n.len === 0 || e.length < n.len || f > A || d)
84
- t.setSeriesData(r, e, i);
85
- else if (e.length === n.len)
86
- y(n.data, e) ? t.updateData(r, e[e.length - 1], i) : t.setSeriesData(r, e, i);
92
+ else if (E(r.data, e, c))
93
+ t.prependData(l, e.slice(0, c), n);
94
+ else if (r.len === 0 || e.length < r.len || c > b || f)
95
+ t.setSeriesData(l, e, n);
96
+ else if (e.length === r.len)
97
+ p(r.data, e) ? t.updateData(l, e[e.length - 1], n) : t.setSeriesData(l, e, n);
87
98
  else {
88
- const g = m(n.data, e, 0);
89
- g === null ? t.setSeriesData(r, e, i) : t.batch(() => {
90
- g === "lastEdited" && t.updateData(r, e[n.len - 1], i);
91
- for (let h = n.len; h < e.length; h++)
92
- t.appendData(r, e[h], i);
99
+ const y = m(r, e, 0);
100
+ y === null ? t.setSeriesData(l, e, n) : t.batch(() => {
101
+ y === "lastEdited" && t.updateData(l, e[r.len - 1], n);
102
+ for (let d = r.len; d < e.length; d++)
103
+ t.appendData(l, e[d], n);
93
104
  });
94
105
  }
95
- return { len: e.length, firstTime: l, lastTime: u, data: e };
106
+ return h(e);
96
107
  }
97
108
  export {
98
- D as EMPTY_SYNC_STATE,
99
- k as syncLayers,
100
- E as syncSeriesLayer,
101
- L as toLayers
109
+ S as EMPTY_SYNC_STATE,
110
+ j as syncLayers,
111
+ x as syncSeriesLayer,
112
+ v as toLayers
102
113
  };
@@ -20,7 +20,7 @@ function I(i) {
20
20
  function O(i) {
21
21
  return -I(i) / 12;
22
22
  }
23
- const B = "#9aa6b6", c = "#5d6877", C = "#e8eef7", x = "#cdd6e2", y = "#3fd68f", V = "#f5c451", $ = "#f4756a", Y = "#5d6877", X = {
23
+ const V = "#9aa6b6", c = "#5d6877", C = "#e8eef7", x = "#cdd6e2", y = "#3fd68f", B = "#f5c451", $ = "#f4756a", Y = "#5d6877", X = {
24
24
  position: "absolute",
25
25
  top: "8px",
26
26
  right: "8px",
@@ -34,7 +34,7 @@ const B = "#9aa6b6", c = "#5d6877", C = "#e8eef7", x = "#cdd6e2", y = "#3fd68f",
34
34
  border: "1px solid rgba(255, 255, 255, 0.09)",
35
35
  borderRadius: "10px",
36
36
  boxShadow: "0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05)",
37
- color: B,
37
+ color: V,
38
38
  font: "10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace",
39
39
  fontVariantNumeric: "tabular-nums",
40
40
  letterSpacing: "0.02em",
@@ -50,7 +50,7 @@ function G(i) {
50
50
  }`, i.head.appendChild(e);
51
51
  }
52
52
  function v(i) {
53
- return i <= H ? y : i <= F ? V : $;
53
+ return i <= H ? y : i <= F ? B : $;
54
54
  }
55
55
  function A(i) {
56
56
  return i >= 1e6 ? `${(i / 1e6).toFixed(1)}M` : i >= 1e4 ? `${(i / 1e3).toFixed(1)}k` : Math.round(i).toLocaleString("en-US");
@@ -74,8 +74,9 @@ class m {
74
74
  const t = [];
75
75
  let e = !1;
76
76
  for (const [o, r] of this.#t) {
77
+ r.animating && (e = !0);
77
78
  const i = r.current;
78
- i <= 0 || (t.push({ value: o, opacity: i }), r.animating && (e = !0));
79
+ i <= 0 || t.push({ value: o, opacity: i });
79
80
  }
80
81
  return { entries: t, isAnimating: e };
81
82
  }
@@ -122,7 +122,7 @@ class nt {
122
122
  const e = this.#t[i];
123
123
  if (!e) return;
124
124
  const o = this.#t.some((l) => l.store.length > 0), s = (t ?? []).map(S);
125
- e.store.setData(s), !o && s.length > 0 && this.#i.arm(this.#e.introMs);
125
+ !o && s.length > 0 && this.#i.arm(this.#e.introMs), e.store.setData(s);
126
126
  const n = e.store.last();
127
127
  e.displayedLast = n ? x(n) : null, e.chase = null, e.pinned = null, e.morphs.clear(), e.entries.clear(), this.#o.finish(), this.#s = null;
128
128
  }