@lilt-ui/charts 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/cards/funnel-chart-card.d.ts +8 -1
- package/dist/cards/horizontal-bar-chart-card.d.ts +8 -1
- package/dist/cards/radial-chart-card.d.ts +28 -1
- package/dist/cards/use-card-selection.d.ts +10 -0
- package/dist/finance.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +950 -926
- package/dist/interaction/tooltip-view.d.ts +2 -0
- package/dist/{skeleton-block-9CpTCbZr.js → skeleton-block-CHH5SIAo.js} +667 -645
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +17 -3
- package/package.json +1 -1
|
@@ -1942,7 +1942,7 @@ function un(e) {
|
|
|
1942
1942
|
function dn(e, t) {
|
|
1943
1943
|
return !(e > 0) || !(t > 0) ? 0 : Math.min(14, e * .24) * Math.min(1, t / 8);
|
|
1944
1944
|
}
|
|
1945
|
-
function
|
|
1945
|
+
function fn(e, t, n, r, i = dn(n, r), a = !0) {
|
|
1946
1946
|
let o = i * ln, s = n - i, c = e + s, l = t + r, u = Math.min(1, r / 2), d = `L${c + i},${l - o}L${c},${l}H${e}Z`;
|
|
1947
1947
|
return {
|
|
1948
1948
|
front: `M${e},${t}H${c}V${l}H${e}Z`,
|
|
@@ -1953,13 +1953,13 @@ function q(e, t, n, r, i = dn(n, r), a = !0) {
|
|
|
1953
1953
|
rise: o
|
|
1954
1954
|
};
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function pn(e, t, n, r) {
|
|
1957
1957
|
let i = dn(n, r);
|
|
1958
|
-
return
|
|
1958
|
+
return fn(e - (n - i) / 2, t, n, r, i);
|
|
1959
1959
|
}
|
|
1960
1960
|
//#endregion
|
|
1961
1961
|
//#region src/engine/isometric-bars.ts
|
|
1962
|
-
var
|
|
1962
|
+
var q = 8;
|
|
1963
1963
|
function mn(e, t) {
|
|
1964
1964
|
let n = Math.max(0, Math.min(1, t.progress ?? 1)), r = t.originY ?? e.baseline, i = t.stacked && Rt(t.geometry, t.seriesIds, t.seriesId, e), a = e.height * n, o = r + (e.y - r) * n, s = Math.min(i ? t.segmentGap ?? 0 : 0, a / 2);
|
|
1965
1965
|
if (a -= s, e.negative || (o += s), a <= 0 || e.width <= 0) return null;
|
|
@@ -1968,7 +1968,7 @@ function mn(e, t) {
|
|
|
1968
1968
|
let [t, n] = [m[e - 1], m[e]];
|
|
1969
1969
|
h = Math.min(h, Math.abs(n.x - t.x) - t.width);
|
|
1970
1970
|
}
|
|
1971
|
-
let g = Math.max(0, Math.min(c * 1.6, h / 2)), _ =
|
|
1971
|
+
let g = Math.max(0, Math.min(c * 1.6, h / 2)), _ = fn(l, o, e.width, a, c, f), { rise: v } = _, y = l + _.frontWidth, b = o + a;
|
|
1972
1972
|
return {
|
|
1973
1973
|
x: l,
|
|
1974
1974
|
y: o,
|
|
@@ -2123,11 +2123,11 @@ function Tn({ id: e, color: t }) {
|
|
|
2123
2123
|
}
|
|
2124
2124
|
//#endregion
|
|
2125
2125
|
//#region src/primitives/isometric-bar.tsx
|
|
2126
|
-
var En = 40,
|
|
2127
|
-
function
|
|
2126
|
+
var En = 40, Dn = 48;
|
|
2127
|
+
function On({ bar: e, mark: t, id: n, color: r, fill: i, fillOpacity: a, stroke: o, strokeWidth: s, active: c = !1 }) {
|
|
2128
2128
|
let l = mn(e, t);
|
|
2129
2129
|
if (!l) return null;
|
|
2130
|
-
let { x: u, y: d, width: f, height: p, depth: m, rise: h, grounded: g } = l, _ = u + f, v = d + p, y = i === r ? `url(#${n}-front)` : i, b = `url(#${n}-side)`, x = `url(#${n}-top)`, S = Math.min(.45,
|
|
2130
|
+
let { x: u, y: d, width: f, height: p, depth: m, rise: h, grounded: g } = l, _ = u + f, v = d + p, y = i === r ? `url(#${n}-front)` : i, b = `url(#${n}-side)`, x = `url(#${n}-top)`, S = Math.min(.45, Dn / p), C = Math.max(S, 1 - En / p), w = c ? 6 : 0;
|
|
2131
2131
|
return /* @__PURE__ */ N("g", {
|
|
2132
2132
|
opacity: a < 1 ? a : void 0,
|
|
2133
2133
|
children: [
|
|
@@ -2231,9 +2231,9 @@ function Dn({ bar: e, mark: t, id: n, color: r, fill: i, fillOpacity: a, stroke:
|
|
|
2231
2231
|
}
|
|
2232
2232
|
//#endregion
|
|
2233
2233
|
//#region src/lifecycle/use-skeleton-clock.ts
|
|
2234
|
-
var
|
|
2234
|
+
var J = 2800;
|
|
2235
2235
|
function kn(e) {
|
|
2236
|
-
return `${-(e %
|
|
2236
|
+
return `${-(e % J)}ms`;
|
|
2237
2237
|
}
|
|
2238
2238
|
function An(e, t) {
|
|
2239
2239
|
let n = k(null);
|
|
@@ -2264,7 +2264,7 @@ function Nn(e, t, n, r) {
|
|
|
2264
2264
|
}));
|
|
2265
2265
|
return pe().x((e) => e.x).y((e) => e.y).curve(I)(i) ?? "";
|
|
2266
2266
|
}
|
|
2267
|
-
function
|
|
2267
|
+
function Pn({ width: e, height: t, left: n, right: r, top: i, bottom: a, axis: o = "classic", inset: s = 0, edge: c = 8 }) {
|
|
2268
2268
|
let l = Math.max(0, e - n - r), u = n + l, d = Math.max(i, t - a), f = Math.max(0, d - i - Math.min(18, (d - i) * .15)), p = Nn(n + c, i + 4, Math.max(0, l - c * 2), f), m = `${p} L${u - c},${d} L${n + c},${d} Z`, h = [
|
|
2269
2269
|
0,
|
|
2270
2270
|
.25,
|
|
@@ -2299,12 +2299,12 @@ function Y({ width: e, height: t, left: n, right: r, top: i, bottom: a, axis: o
|
|
|
2299
2299
|
}).join("")
|
|
2300
2300
|
};
|
|
2301
2301
|
}
|
|
2302
|
-
function
|
|
2302
|
+
function Fn({ width: e, height: t, left: n, right: r, top: i, bottom: a, visible: o, opacity: s, reducedMotion: c, id: l, marks: u = "line", mark: d, compact: f = !1, barCount: p = 12, seriesCount: m = 1, barAppearances: h = [], barWidth: g, showLine: _ = !1, lineDepth: v = !1, axis: y = "classic", inset: b = 0, edge: x = 8, loadingStyle: S = "shimmer" }) {
|
|
2303
2303
|
let C = k(null);
|
|
2304
2304
|
if (D(() => {
|
|
2305
2305
|
C.current?.style.setProperty("--lilt-skeleton-clock", kn(Date.now()));
|
|
2306
2306
|
}, [o, S]), !o || e <= 0 || t <= 0) return null;
|
|
2307
|
-
let { plotWidth: w, plotBottom: T, contour: E, areaPath: O, gridRows: A, yBars: ee, xBars: te } =
|
|
2307
|
+
let { plotWidth: w, plotBottom: T, contour: E, areaPath: O, gridRows: A, yBars: ee, xBars: te } = Pn({
|
|
2308
2308
|
width: e,
|
|
2309
2309
|
height: t,
|
|
2310
2310
|
left: n,
|
|
@@ -2356,7 +2356,7 @@ function Pn({ width: e, height: t, left: n, right: r, top: i, bottom: a, visible
|
|
|
2356
2356
|
...t,
|
|
2357
2357
|
mask: e
|
|
2358
2358
|
})
|
|
2359
|
-
}, n)), be = ge && h.includes("isometric"), xe = Math.max(0, i -
|
|
2359
|
+
}, n)), be = ge && h.includes("isometric"), xe = Math.max(0, i - q), Se = S !== "shimmer" && !c, Ce = (e = 0) => ({
|
|
2360
2360
|
"--lilt-skeleton-step": e,
|
|
2361
2361
|
"--lilt-skeleton-floor": `${T}px`
|
|
2362
2362
|
}), we = f ? "" : `${ee}${te}`, Te = u === "area-stack" ? Array.from({ length: Math.max(1, m) }, (e, r) => {
|
|
@@ -2578,7 +2578,7 @@ function Pn({ width: e, height: t, left: n, right: r, top: i, bottom: a, visible
|
|
|
2578
2578
|
"--lilt-skeleton-step": t,
|
|
2579
2579
|
"--lilt-skeleton-bar-height": `${e.height}px`
|
|
2580
2580
|
},
|
|
2581
|
-
children: /* @__PURE__ */ M(
|
|
2581
|
+
children: /* @__PURE__ */ M(On, {
|
|
2582
2582
|
bar: e,
|
|
2583
2583
|
mark: L(n),
|
|
2584
2584
|
id: `${l}-bar-${t}-${n}`,
|
|
@@ -2627,7 +2627,7 @@ function Pn({ width: e, height: t, left: n, right: r, top: i, bottom: a, visible
|
|
|
2627
2627
|
})
|
|
2628
2628
|
});
|
|
2629
2629
|
}
|
|
2630
|
-
function
|
|
2630
|
+
function In(e, t) {
|
|
2631
2631
|
let [n, r] = A(e), [i, a] = A(!1);
|
|
2632
2632
|
return n !== e && (r(e), a(!e && !t)), T(() => {
|
|
2633
2633
|
if (!i) return;
|
|
@@ -2635,7 +2635,7 @@ function Fn(e, t) {
|
|
|
2635
2635
|
return () => window.clearTimeout(e);
|
|
2636
2636
|
}, [i]), i;
|
|
2637
2637
|
}
|
|
2638
|
-
function
|
|
2638
|
+
function Y({ leaving: e, origin: t, children: n }) {
|
|
2639
2639
|
let r = k(n);
|
|
2640
2640
|
return e ? b(r.current, { "data-skeleton-leaving": t }) : (r.current = n, n);
|
|
2641
2641
|
}
|
|
@@ -2810,7 +2810,7 @@ function Zn({ bar: e, appearance: t = "solid", mark: n, fill: r, color: i, basel
|
|
|
2810
2810
|
"data-appearance": t,
|
|
2811
2811
|
opacity: p,
|
|
2812
2812
|
...f,
|
|
2813
|
-
children: /* @__PURE__ */ M(
|
|
2813
|
+
children: /* @__PURE__ */ M(On, {
|
|
2814
2814
|
bar: e,
|
|
2815
2815
|
mark: n,
|
|
2816
2816
|
id: s,
|
|
@@ -2923,12 +2923,12 @@ var Qn = {
|
|
|
2923
2923
|
stiffness: 120,
|
|
2924
2924
|
damping: 22,
|
|
2925
2925
|
mass: 1
|
|
2926
|
-
},
|
|
2926
|
+
}, tr = {
|
|
2927
2927
|
stiffness: 420,
|
|
2928
2928
|
damping: 42,
|
|
2929
2929
|
mass: 1
|
|
2930
|
-
},
|
|
2931
|
-
function
|
|
2930
|
+
}, nr = 24;
|
|
2931
|
+
function X(e, t, n) {
|
|
2932
2932
|
return Math.min(n, Math.max(t, e));
|
|
2933
2933
|
}
|
|
2934
2934
|
function rr({ descriptor: e, color: t, geometry: n, cursorX: r, bottom: i, halo: a, ring: o = !1 }) {
|
|
@@ -2981,7 +2981,7 @@ function ir({ snapshot: e, selection: t, series: n, seriesColors: r = {}, paintI
|
|
|
2981
2981
|
C,
|
|
2982
2982
|
w,
|
|
2983
2983
|
s
|
|
2984
|
-
]), ee = E ? e.geometry?.series[E.id] : void 0, j = e.bars !== null, re = n.some((e) => e.bar?.appearance === "isometric") ?
|
|
2984
|
+
]), ee = E ? e.geometry?.series[E.id] : void 0, j = e.bars !== null, re = n.some((e) => e.bar?.appearance === "isometric") ? q : 0, oe = j && !e.stack, se = O(() => new Map(e.data.rows.map((e) => [e.sourceIndex, e])), [e.data.rows]), ce = t ? se.get(t.sourceIndex) : void 0, le = ce?.x === t?.x ? ce : null, ue = le?.statuses, I = le?.fields, de = j ? 32 : 16, fe = j && t ? n.flatMap((n) => {
|
|
2985
2985
|
let r = e.geometry?.bars[n.id]?.find((e) => e.valueX === t.x);
|
|
2986
2986
|
return r ? [{
|
|
2987
2987
|
descriptor: n,
|
|
@@ -2997,7 +2997,7 @@ function ir({ snapshot: e, selection: t, series: n, seriesColors: r = {}, paintI
|
|
|
2997
2997
|
color: o
|
|
2998
2998
|
});
|
|
2999
2999
|
return s ? [/* @__PURE__ */ M("g", { children: s }, `${t.series}-${i}`)] : [];
|
|
3000
|
-
}) : [], ge = t ? e.xToPixel(t.x) : e.plot.left, [_e, ve] = Wn(ge, Qn), [ye, be] = Wn(ge, $n), [xe, Se] = Wn(ge, er), [Ce, we] = Wn(16,
|
|
3000
|
+
}) : [], ge = t ? e.xToPixel(t.x) : e.plot.left, [_e, ve] = Wn(ge, Qn), [ye, be] = Wn(ge, $n), [xe, Se] = Wn(ge, er), [Ce, we] = Wn(16, tr), Te = k(16), Ee = k(!1), De = k(null), [Oe, ke] = A(a ? 236 : 188);
|
|
3001
3001
|
D(() => {
|
|
3002
3002
|
let e = De.current;
|
|
3003
3003
|
if (!e) return;
|
|
@@ -3032,7 +3032,7 @@ function ir({ snapshot: e, selection: t, series: n, seriesColors: r = {}, paintI
|
|
|
3032
3032
|
if (n) return n.negative ? n.y + n.height : n.y;
|
|
3033
3033
|
}
|
|
3034
3034
|
return (ee ? Ot(ee, n) : null)?.y ?? e.plot.bottom;
|
|
3035
|
-
}), je = F(_e, (e) => ee && Ot(ee, e) ? 1 : 0), R = at(), Me = !ct(R.axis.y), Ne = k(null), Pe = k(null), Fe = ie(48), Ie = F([_e, Fe], ([t, n]) =>
|
|
3035
|
+
}), je = F(_e, (e) => ee && Ot(ee, e) ? 1 : 0), R = at(), Me = !ct(R.axis.y), Ne = k(null), Pe = k(null), Fe = ie(48), Ie = F([_e, Fe], ([t, n]) => X(Number(t) - Number(n) / 2, e.plot.left + (R.inset > 0 ? 4 : -R.overhang), e.plot.right - (R.inset > 0 ? 4 : -R.overhang) - Number(n))), Le = F([Ie, Fe], ([e, t]) => Number(e) + Number(t) / 2), Re = F(Ae, (t) => X(t, e.plot.top, e.plot.bottom)), Be = F(Re, (t) => Me ? t - nr - 3 : X(t, e.plot.top + nr / 2, e.plot.bottom) - nr / 2), Ve = R.pillPosition === "mark", He = j && t && E ? e.geometry?.bars[E.id]?.find((e) => e.valueX === t.x) : void 0, [Ue, B] = Wn(0, Qn), We = He && t ? He.x + He.width / 2 - e.xToPixel(t.x) : 0;
|
|
3036
3036
|
D(() => {
|
|
3037
3037
|
B(We, !Ee.current || p);
|
|
3038
3038
|
}, [
|
|
@@ -3044,11 +3044,11 @@ function ir({ snapshot: e, selection: t, series: n, seriesColors: r = {}, paintI
|
|
|
3044
3044
|
_e,
|
|
3045
3045
|
Ue,
|
|
3046
3046
|
Ke
|
|
3047
|
-
], ([t, n, r]) =>
|
|
3047
|
+
], ([t, n, r]) => X(Number(t) + Number(n) - Number(r) / 2, e.plot.left + 4, e.plot.right - 4 - Number(r))), Je = He ? 8 : 14, V = !!He?.negative, Ye = fe.filter((e) => !e.bar.negative), H = oe && He && t ? L.flatMap((n) => {
|
|
3048
3048
|
let r = e.geometry?.series[n.id], i = r ? Ot(r, e.xToPixel(t.x)) : null;
|
|
3049
3049
|
return i ? [i.y - 6] : [];
|
|
3050
3050
|
}) : [], U = oe && He && Ye.length ? Math.min(...Ye.map((e) => e.bar.y), ...H) : null, Xe = F(Ae, (e) => {
|
|
3051
|
-
let t = U !== null && !V ? U : e, n = t -
|
|
3051
|
+
let t = U !== null && !V ? U : e, n = t - nr - Je;
|
|
3052
3052
|
return V || n < -4 ? t + Je : n;
|
|
3053
3053
|
}), W = !g && !b && !v;
|
|
3054
3054
|
ae(Le, "change", (e) => R.x.set(e)), ae(_e, "change", (e) => R.pointerX.set(e)), ae(Re, "change", (e) => R.y.set(e)), D(() => {
|
|
@@ -3081,7 +3081,7 @@ function ir({ snapshot: e, selection: t, series: n, seriesColors: r = {}, paintI
|
|
|
3081
3081
|
p,
|
|
3082
3082
|
g
|
|
3083
3083
|
]);
|
|
3084
|
-
let Ze = F([xe, Ce], ([e, t]) =>
|
|
3084
|
+
let Ze = F([xe, Ce], ([e, t]) => X(Number(e) + Number(t), 8, Math.max(8, d - Oe - 8))), Qe = t?.pinned ? Math.min(80, Math.max(8, f - 72)) : Math.max(-48, e.plot.top - 64), $e = F(ye, (t) => X(t - 58, e.plot.left, e.plot.right - 116)), G = +!!t, et = t ? e.formatX(t.x) : "", tt = E ? r[E.id] ?? ze(E, n.indexOf(E)) : "var(--lilt-series-1)";
|
|
3085
3085
|
D(() => {
|
|
3086
3086
|
let e = Ne.current?.offsetWidth;
|
|
3087
3087
|
e && Fe.set(e);
|
|
@@ -3307,7 +3307,7 @@ function ir({ snapshot: e, selection: t, series: n, seriesColors: r = {}, paintI
|
|
|
3307
3307
|
ref: Ne,
|
|
3308
3308
|
style: {
|
|
3309
3309
|
left: Ie,
|
|
3310
|
-
top: e.plot.bottom + 22 -
|
|
3310
|
+
top: e.plot.bottom + 22 - nr / 2,
|
|
3311
3311
|
"--lilt-pill-accent": tt
|
|
3312
3312
|
},
|
|
3313
3313
|
transition: { duration: p ? 0 : .12 },
|
|
@@ -3706,9 +3706,9 @@ function pr(e, t, n) {
|
|
|
3706
3706
|
}
|
|
3707
3707
|
//#endregion
|
|
3708
3708
|
//#region src/interaction/chart-sync.ts
|
|
3709
|
-
var
|
|
3710
|
-
function
|
|
3711
|
-
let t =
|
|
3709
|
+
var mr = /* @__PURE__ */ new Map();
|
|
3710
|
+
function hr(e) {
|
|
3711
|
+
let t = mr.get(e);
|
|
3712
3712
|
if (t) return t;
|
|
3713
3713
|
let n = null, r = 0, i = /* @__PURE__ */ new Set();
|
|
3714
3714
|
return t = {
|
|
@@ -3723,18 +3723,18 @@ function mr(e) {
|
|
|
3723
3723
|
subscribe(e) {
|
|
3724
3724
|
return i.add(e), () => i.delete(e);
|
|
3725
3725
|
}
|
|
3726
|
-
},
|
|
3726
|
+
}, mr.set(e, t), t;
|
|
3727
3727
|
}
|
|
3728
|
-
var
|
|
3728
|
+
var gr = "sync", Z = () => () => void 0, _r = () => null;
|
|
3729
3729
|
function vr(e) {
|
|
3730
|
-
let t = e ?
|
|
3730
|
+
let t = e ? hr(e) : null, n = ee(t?.subscribe ?? Z, t?.get ?? _r, t?.get ?? _r);
|
|
3731
3731
|
return n ? {
|
|
3732
3732
|
value: n.kind === "time" ? new Date(n.key) : n.key,
|
|
3733
3733
|
kind: n.kind,
|
|
3734
3734
|
pinned: n.pinned
|
|
3735
3735
|
} : null;
|
|
3736
3736
|
}
|
|
3737
|
-
function
|
|
3737
|
+
function yr(e, t, n, r) {
|
|
3738
3738
|
if (e.kind !== t) return null;
|
|
3739
3739
|
if (t === "category") {
|
|
3740
3740
|
let t = n.indexOf(String(e.key));
|
|
@@ -3749,12 +3749,12 @@ function Q(e, t, n, r) {
|
|
|
3749
3749
|
let o = [...r].sort((e, t) => e - t), s = o.slice(1).map((e, t) => e - o[t]).filter((e) => e > 0).sort((e, t) => e - t), c = s.length ? s[Math.floor(s.length / 2)] : 0;
|
|
3750
3750
|
return Math.abs(r[a] - i) <= c / 2 ? r[a] : null;
|
|
3751
3751
|
}
|
|
3752
|
-
function
|
|
3752
|
+
function br(e, t, n, r, i, { label: a, release: o } = {}) {
|
|
3753
3753
|
let s = E(), c = k(o);
|
|
3754
3754
|
c.current = o, T(() => {
|
|
3755
3755
|
if (!e) return;
|
|
3756
|
-
let o =
|
|
3757
|
-
t.getSnapshot().inspection?.ownerId === "sync" && (m = !0, t.clearInspection(
|
|
3756
|
+
let o = hr(e), l = n.map((e) => String(e[r] ?? "")), u = n.map(i.position), d = (e) => i.kind === "category" ? l[e] ?? null : e, f = o.releases(), p = !1, m = !1, h = () => {
|
|
3757
|
+
t.getSnapshot().inspection?.ownerId === "sync" && (m = !0, t.clearInspection(gr), m = !1);
|
|
3758
3758
|
}, g = () => {
|
|
3759
3759
|
let e = t.getSnapshot().inspection;
|
|
3760
3760
|
if (o.releases() !== f && (f = o.releases(), e?.pinned && !e.local && e.ownerId !== "sync")) {
|
|
@@ -3763,7 +3763,7 @@ function yr(e, t, n, r, i, { label: a, release: o } = {}) {
|
|
|
3763
3763
|
}
|
|
3764
3764
|
let n = o.get();
|
|
3765
3765
|
if (n?.source === s || e?.pinned && e.ownerId !== "sync" && (e.local || !n?.pinned)) return;
|
|
3766
|
-
let r = n ?
|
|
3766
|
+
let r = n ? yr(n, i.kind, l, u) : null;
|
|
3767
3767
|
if (!n || r === null) {
|
|
3768
3768
|
h();
|
|
3769
3769
|
return;
|
|
@@ -3771,7 +3771,7 @@ function yr(e, t, n, r, i, { label: a, release: o } = {}) {
|
|
|
3771
3771
|
t.inspect({
|
|
3772
3772
|
x: r,
|
|
3773
3773
|
pinned: n.pinned,
|
|
3774
|
-
ownerId:
|
|
3774
|
+
ownerId: gr,
|
|
3775
3775
|
...n.pinned && n.label ? { from: n.label } : {}
|
|
3776
3776
|
});
|
|
3777
3777
|
}, _ = t.subscribe(() => {
|
|
@@ -3809,7 +3809,7 @@ function yr(e, t, n, r, i, { label: a, release: o } = {}) {
|
|
|
3809
3809
|
}
|
|
3810
3810
|
//#endregion
|
|
3811
3811
|
//#region src/use-chart-width.ts
|
|
3812
|
-
function
|
|
3812
|
+
function Q(e) {
|
|
3813
3813
|
let t = e.getBoundingClientRect(), n = (e, t) => e > 0 && Math.abs(e - t) > 1;
|
|
3814
3814
|
return {
|
|
3815
3815
|
width: n(e.offsetWidth, t.width) ? e.offsetWidth : t.width,
|
|
@@ -3821,7 +3821,7 @@ function xr() {
|
|
|
3821
3821
|
return D(() => {
|
|
3822
3822
|
let t = e.current;
|
|
3823
3823
|
if (!t) return;
|
|
3824
|
-
let r = () => n(
|
|
3824
|
+
let r = () => n(Q(t).width);
|
|
3825
3825
|
r();
|
|
3826
3826
|
let i = new ResizeObserver(r);
|
|
3827
3827
|
return i.observe(t), () => i.disconnect();
|
|
@@ -3881,7 +3881,7 @@ function Pr(e, t, n = !1) {
|
|
|
3881
3881
|
let r = e.current;
|
|
3882
3882
|
if (!r) return;
|
|
3883
3883
|
let a = () => {
|
|
3884
|
-
let e =
|
|
3884
|
+
let e = Q(r);
|
|
3885
3885
|
i((r) => {
|
|
3886
3886
|
let i = {
|
|
3887
3887
|
width: e.width > 0 ? e.width : r.width,
|
|
@@ -4037,46 +4037,46 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4037
4037
|
to: W,
|
|
4038
4038
|
duration: d ? 520 : sn("initial", !1)
|
|
4039
4039
|
} : null);
|
|
4040
|
-
let ft = dt.current, [pt, mt] = A(() => ut ? W : null), ht = k(pt), [gt, _t] = A(
|
|
4041
|
-
|
|
4042
|
-
let [
|
|
4043
|
-
|
|
4044
|
-
|
|
4040
|
+
let ft = dt.current, [pt, mt] = A(() => ut ? W : null), ht = k(pt), [gt, _t] = A(!1), [vt, yt] = A(ft), [bt, xt] = A(+!ft), St = k(vt), [Ct, wt] = A(ut ? ft ? "revealing" : "ready" : v === "loading" ? "pending" : "empty"), [Tt, Et] = A(!1), Dt = k(!1), [kt, At] = A(!1), jt = k(!1);
|
|
4041
|
+
jt.current = kt;
|
|
4042
|
+
let [Mt, Nt] = A(!1), Pt = k(null), Ft = k(re), It = k(pt), Lt = k(ae), Rt = k(null), zt = k(null), Bt = k(null), Vt = k(null), Ut = k(!1), K = k(null), Gt = C(() => {
|
|
4043
|
+
Ut.current = !0, K.current !== null && window.clearTimeout(K.current), K.current = window.setTimeout(() => {
|
|
4044
|
+
Ut.current = !1, K.current = null;
|
|
4045
4045
|
}, 750);
|
|
4046
|
-
}, []),
|
|
4047
|
-
T(() => () => F?.releaseOwner(
|
|
4048
|
-
let
|
|
4046
|
+
}, []), Kt = k(null), qt = k(null), Jt = `${G}-owner`;
|
|
4047
|
+
T(() => () => F?.releaseOwner(Jt), [Jt, F]);
|
|
4048
|
+
let Yt = ee(F?.subscribe ?? Dr, F?.getSnapshot ?? Or, F?.getSnapshot ?? Or), Xt = O(() => le === !0 ? {} : le || {}, [le]), Zt = O(() => ue === !0 ? {} : ue || {}, [ue]), Qt = O(() => I === !0 ? {} : I || {}, [I]), $t = !!le, en = !!(ue || de), tn = !!I, [rn, ln] = A(() => L?.getSnapshot().visibleSeries ?? i.map((e) => e.id)), un = k(i.map((e) => e.id));
|
|
4049
4049
|
T(() => {
|
|
4050
4050
|
if (fe) return;
|
|
4051
|
-
let e = i.map((e) => e.id), t =
|
|
4052
|
-
|
|
4051
|
+
let e = i.map((e) => e.id), t = un.current;
|
|
4052
|
+
un.current = e, ln((n) => {
|
|
4053
4053
|
let r = n.filter((t) => e.includes(t)), i = e.filter((e) => !t.includes(e)), a = [...r, ...i];
|
|
4054
4054
|
return a.length === n.length && a.every((e, t) => e === n[t]) ? n : a;
|
|
4055
4055
|
});
|
|
4056
4056
|
}, [i, fe]);
|
|
4057
|
-
let
|
|
4057
|
+
let dn = fe ?? rn, [fn, pn] = A(null);
|
|
4058
4058
|
T(() => {
|
|
4059
|
-
|
|
4060
|
-
let t = pr(e,
|
|
4059
|
+
pn((e) => {
|
|
4060
|
+
let t = pr(e, dn, i.map((e) => e.id));
|
|
4061
4061
|
return !e || !t ? t : fr(e.restore, t.restore) && fr(e.expected, t.expected) && fr(e.previous, t.previous) ? e : t;
|
|
4062
4062
|
});
|
|
4063
|
-
}, [i,
|
|
4064
|
-
let q = O(() => i.filter((e) =>
|
|
4065
|
-
|
|
4066
|
-
let [
|
|
4067
|
-
|
|
4068
|
-
let [
|
|
4069
|
-
ht.current = pt,
|
|
4070
|
-
let
|
|
4063
|
+
}, [i, dn]);
|
|
4064
|
+
let q = O(() => i.filter((e) => dn.includes(e.id)), [i, dn]), mn = Rn(i.map((e) => e.id), dn, !!c.stack, U), hn = c.stack ? mn : void 0, [gn, _n] = A(null), vn = k(null);
|
|
4065
|
+
vn.current = gn;
|
|
4066
|
+
let [yn, bn] = A(null), xn = (e) => !!(e && q.some((t) => t.id === e)), Sn = ve !== "nearest" && ve !== "total" ? ve : null, Cn = xn(yn) ? yn : xn(Sn) ? Sn : ve === "nearest" && xn(gn) ? gn : p, [wn, Tn] = A(null), [En, Dn] = A(null), On = k(!1), [J, kn] = A(null), An = k(J);
|
|
4067
|
+
An.current = J;
|
|
4068
|
+
let [jn, Mn] = A(null), Nn = k(null), [Pn, In] = A(null), Y = F ? Yt.comparison : Pn, [zn, Vn] = A(null), Hn = F ? Yt.focus : zn, [Un, Wn] = A(!0), [Kn, qn] = A(null), [Jn, Yn] = A(null), [Xn, Zn] = A(!1), Qn = k(null), $n = k(null), er = k(q.map((e) => e.id).join("|"));
|
|
4069
|
+
ht.current = pt, St.current = vt, Dt.current = Tt, Lt.current = ae;
|
|
4070
|
+
let tr = C((e, t, n) => {
|
|
4071
4071
|
let r = ot.current.next(), i = d && t === "initial" && ne && !U ? 520 : sn(t, U, ne), a = t === "matched-update" || t === "topology-update", o = performance.now(), s = a && cn(e.rows.length * e.series.length, o - ct.current) ? 0 : i;
|
|
4072
|
-
a && (ct.current = o), ht.current = e, mt(e),
|
|
4072
|
+
a && (ct.current = o), ht.current = e, mt(e), yt(s === 0 ? null : {
|
|
4073
4073
|
id: r,
|
|
4074
4074
|
kind: t,
|
|
4075
4075
|
from: n,
|
|
4076
4076
|
to: e,
|
|
4077
4077
|
duration: s,
|
|
4078
|
-
fromDomain:
|
|
4079
|
-
}),
|
|
4078
|
+
fromDomain: $n.current?.yDomain
|
|
4079
|
+
}), xt(+(s === 0)), wt(s === 0 ? "ready" : t === "matched-update" || t === "topology-update" ? "updating" : t === "initial" ? "revealing" : "ready");
|
|
4080
4080
|
}, [
|
|
4081
4081
|
ne,
|
|
4082
4082
|
d,
|
|
@@ -4084,12 +4084,12 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4084
4084
|
]);
|
|
4085
4085
|
T(() => {
|
|
4086
4086
|
if (v !== "loading" || ht.current) {
|
|
4087
|
-
(v !== "ready" || ht.current) && !
|
|
4087
|
+
(v !== "ready" || ht.current) && !jt.current && Et(!1);
|
|
4088
4088
|
return;
|
|
4089
4089
|
}
|
|
4090
|
-
|
|
4090
|
+
wt("pending"), Et(!1);
|
|
4091
4091
|
let e = window.setTimeout(() => {
|
|
4092
|
-
|
|
4092
|
+
Et(!0), wt("loading");
|
|
4093
4093
|
}, 120);
|
|
4094
4094
|
return () => window.clearTimeout(e);
|
|
4095
4095
|
}, [
|
|
@@ -4097,173 +4097,173 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4097
4097
|
re,
|
|
4098
4098
|
v
|
|
4099
4099
|
]), D(() => {
|
|
4100
|
-
if (
|
|
4101
|
-
ht.current ||
|
|
4100
|
+
if (Ft.current !== re && (Ft.current = re, ct.current = -Infinity, ot.current.next(), ht.current = null, mt(null), yt(null), Et(!1), Q.current = null, br(null), F?.clearInspection(L ? void 0 : Jt), wt(v === "loading" ? "pending" : "revealing"), Lt.current?.(null)), Xe.error) {
|
|
4101
|
+
ht.current || wt("error"), Et(!1);
|
|
4102
4102
|
return;
|
|
4103
4103
|
}
|
|
4104
4104
|
if (v === "loading") {
|
|
4105
|
-
|
|
4105
|
+
At(!1), Nt(!1), ht.current && wt("updating");
|
|
4106
4106
|
return;
|
|
4107
4107
|
}
|
|
4108
4108
|
if (v === "error") {
|
|
4109
|
-
|
|
4109
|
+
wt(ht.current ? "ready" : "error");
|
|
4110
4110
|
return;
|
|
4111
4111
|
}
|
|
4112
4112
|
if (!W || !$e) {
|
|
4113
|
-
W && ht.current !== W && (ht.current = W, mt(W),
|
|
4113
|
+
W && ht.current !== W && (ht.current = W, mt(W), yt(null), br(null), Q.current = null, F?.clearInspection(L ? void 0 : Jt), Lt.current?.(null)), Et(!1), wt("empty");
|
|
4114
4114
|
return;
|
|
4115
4115
|
}
|
|
4116
4116
|
if (!ht.current) {
|
|
4117
|
-
if (
|
|
4118
|
-
|
|
4117
|
+
if (Dt.current && !U && !Mt) {
|
|
4118
|
+
At(!0);
|
|
4119
4119
|
return;
|
|
4120
4120
|
}
|
|
4121
|
-
|
|
4121
|
+
tr(W, "initial", null), Mt || Et(!1);
|
|
4122
4122
|
return;
|
|
4123
4123
|
}
|
|
4124
4124
|
if (jr(ht.current, W)) {
|
|
4125
4125
|
ht.current !== W && (ht.current = W, mt(W));
|
|
4126
4126
|
return;
|
|
4127
4127
|
}
|
|
4128
|
-
let e =
|
|
4129
|
-
|
|
4128
|
+
let e = It.current ?? ht.current, t = Ie(ht.current, W, q) ? "matched-update" : "topology-update";
|
|
4129
|
+
tr(W, t, e);
|
|
4130
4130
|
}, [
|
|
4131
4131
|
q,
|
|
4132
|
-
|
|
4132
|
+
Jt,
|
|
4133
4133
|
F,
|
|
4134
4134
|
Xe.error,
|
|
4135
4135
|
U,
|
|
4136
4136
|
re,
|
|
4137
|
-
|
|
4138
|
-
|
|
4137
|
+
Mt,
|
|
4138
|
+
tr,
|
|
4139
4139
|
v,
|
|
4140
4140
|
W,
|
|
4141
4141
|
$e
|
|
4142
4142
|
]), T(() => {
|
|
4143
|
-
if (!
|
|
4144
|
-
let e = window.setTimeout(() =>
|
|
4145
|
-
|
|
4143
|
+
if (!kt) return;
|
|
4144
|
+
let e = window.setTimeout(() => Nt(!0), Cr), t = window.setTimeout(() => {
|
|
4145
|
+
At(!1), Nt(!1), Et(!1);
|
|
4146
4146
|
}, 240);
|
|
4147
4147
|
return () => {
|
|
4148
4148
|
window.clearTimeout(e), window.clearTimeout(t);
|
|
4149
4149
|
};
|
|
4150
|
-
}, [
|
|
4151
|
-
let
|
|
4150
|
+
}, [kt]);
|
|
4151
|
+
let nr = !ne && vt?.kind === "initial";
|
|
4152
4152
|
T(() => {
|
|
4153
|
-
if (!
|
|
4154
|
-
if (U ||
|
|
4155
|
-
|
|
4153
|
+
if (!vt) return;
|
|
4154
|
+
if (U || vt.duration === 0 || nr || document.hidden) {
|
|
4155
|
+
xt(1), yt(null), Et(!1), wt("ready");
|
|
4156
4156
|
return;
|
|
4157
4157
|
}
|
|
4158
4158
|
let e = performance.now(), t = 0, n = (r) => {
|
|
4159
|
-
if (!ot.current.isCurrent(
|
|
4160
|
-
let i = Math.min(1, (r - e) /
|
|
4161
|
-
if (
|
|
4159
|
+
if (!ot.current.isCurrent(vt.id)) return;
|
|
4160
|
+
let i = Math.min(1, (r - e) / vt.duration);
|
|
4161
|
+
if (xt(i), i < 1) {
|
|
4162
4162
|
t = window.requestAnimationFrame(n);
|
|
4163
4163
|
return;
|
|
4164
4164
|
}
|
|
4165
|
-
|
|
4165
|
+
yt((e) => e?.id === vt.id ? null : e), Et(!1), wt("ready");
|
|
4166
4166
|
}, r = () => {
|
|
4167
|
-
document.hidden && (window.cancelAnimationFrame(t),
|
|
4167
|
+
document.hidden && (window.cancelAnimationFrame(t), xt(1), yt(null), Et(!1), wt("ready"));
|
|
4168
4168
|
};
|
|
4169
4169
|
return document.addEventListener("visibilitychange", r), t = window.requestAnimationFrame(n), () => {
|
|
4170
4170
|
window.cancelAnimationFrame(t), document.removeEventListener("visibilitychange", r);
|
|
4171
4171
|
};
|
|
4172
4172
|
}, [
|
|
4173
|
-
|
|
4173
|
+
nr,
|
|
4174
4174
|
U,
|
|
4175
|
-
|
|
4175
|
+
vt
|
|
4176
4176
|
]);
|
|
4177
|
-
let X = pt ?? (v === "ready" && $e && (!
|
|
4177
|
+
let X = pt ?? (v === "ready" && $e && (!Tt || Mt) ? W : null), rr = Nr(bt), ar = O(() => vt?.kind === "matched-update" && vt.from ? Mr(vt.from, vt.to, rr) : X, [
|
|
4178
4178
|
X,
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
]),
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
]),
|
|
4179
|
+
vt,
|
|
4180
|
+
rr
|
|
4181
|
+
]), sr = O(() => Hn ? [Math.min(Hn.startX, Hn.endX), Math.max(Hn.startX, Hn.endX)] : tn ? Kn : null, [
|
|
4182
|
+
Hn,
|
|
4183
|
+
Kn,
|
|
4184
|
+
tn
|
|
4185
|
+
]), lr = O(() => Ir(vt?.from ?? null, q, n, r, H, V, vt?.fromDomain, sr, i, c, hn, B, xe, Se), [
|
|
4186
4186
|
q,
|
|
4187
4187
|
H,
|
|
4188
4188
|
i,
|
|
4189
4189
|
V,
|
|
4190
|
-
|
|
4191
|
-
|
|
4190
|
+
vt?.from,
|
|
4191
|
+
vt?.fromDomain,
|
|
4192
4192
|
n,
|
|
4193
|
-
|
|
4193
|
+
sr,
|
|
4194
4194
|
r,
|
|
4195
4195
|
c,
|
|
4196
|
-
|
|
4196
|
+
hn,
|
|
4197
4197
|
B,
|
|
4198
4198
|
xe,
|
|
4199
4199
|
Se
|
|
4200
|
-
]),
|
|
4200
|
+
]), mr = O(() => Ir(X, q, n, r, H, V, void 0, sr, i, c, hn, B, xe, Se), [
|
|
4201
4201
|
X,
|
|
4202
4202
|
q,
|
|
4203
4203
|
n,
|
|
4204
4204
|
r,
|
|
4205
4205
|
H,
|
|
4206
4206
|
V,
|
|
4207
|
-
|
|
4207
|
+
sr,
|
|
4208
4208
|
i,
|
|
4209
4209
|
c,
|
|
4210
|
-
|
|
4210
|
+
hn,
|
|
4211
4211
|
B,
|
|
4212
4212
|
xe,
|
|
4213
4213
|
Se
|
|
4214
|
-
]),
|
|
4215
|
-
x:
|
|
4216
|
-
y:
|
|
4217
|
-
} : null,
|
|
4218
|
-
if (
|
|
4219
|
-
let e =
|
|
4220
|
-
return Ir(
|
|
4214
|
+
]), hr = Bn(mr?.yDomain ? {
|
|
4215
|
+
x: mr.xDomain,
|
|
4216
|
+
y: mr.yDomain
|
|
4217
|
+
} : null, Hn ? `${Hn.startX}:${Hn.endX}` : "full", X, `${V.width}:${V.height}`, U), Z = O(() => {
|
|
4218
|
+
if (vt?.kind !== "matched-update" && !hr) return mr;
|
|
4219
|
+
let e = hr?.y ?? (lr?.yDomain && mr?.yDomain ? [lr.yDomain[0] + (mr.yDomain[0] - lr.yDomain[0]) * rr, lr.yDomain[1] + (mr.yDomain[1] - lr.yDomain[1]) * rr] : void 0);
|
|
4220
|
+
return Ir(ar, q, n, r, H, V, e, hr?.x ?? sr, i, c, hn, B, xe, Se);
|
|
4221
4221
|
}, [
|
|
4222
4222
|
q,
|
|
4223
|
-
|
|
4224
|
-
|
|
4223
|
+
mr,
|
|
4224
|
+
hr,
|
|
4225
4225
|
H,
|
|
4226
|
+
lr,
|
|
4226
4227
|
ar,
|
|
4227
|
-
nr,
|
|
4228
4228
|
i,
|
|
4229
4229
|
V,
|
|
4230
|
-
|
|
4231
|
-
tr,
|
|
4232
|
-
n,
|
|
4230
|
+
vt?.kind,
|
|
4233
4231
|
rr,
|
|
4232
|
+
n,
|
|
4233
|
+
sr,
|
|
4234
4234
|
r,
|
|
4235
4235
|
c,
|
|
4236
|
-
|
|
4236
|
+
hn,
|
|
4237
4237
|
B,
|
|
4238
4238
|
xe,
|
|
4239
4239
|
Se
|
|
4240
|
-
]),
|
|
4240
|
+
]), _r = O(() => sr === null ? mr : Ir(X, q, n, r, H, V, void 0, void 0, i, c, hn, B, xe, Se), [
|
|
4241
4241
|
q,
|
|
4242
4242
|
X,
|
|
4243
|
-
|
|
4243
|
+
mr,
|
|
4244
4244
|
H,
|
|
4245
4245
|
i,
|
|
4246
4246
|
V,
|
|
4247
4247
|
n,
|
|
4248
|
-
|
|
4248
|
+
sr,
|
|
4249
4249
|
r,
|
|
4250
4250
|
c,
|
|
4251
|
-
|
|
4251
|
+
hn,
|
|
4252
4252
|
B,
|
|
4253
4253
|
xe,
|
|
4254
4254
|
Se
|
|
4255
|
-
]),
|
|
4255
|
+
]), vr = q.map((e) => e.id).join("|");
|
|
4256
4256
|
D(() => {
|
|
4257
|
-
!c.stack &&
|
|
4258
|
-
|
|
4259
|
-
}, U ? 0 : 444)),
|
|
4257
|
+
!c.stack && er.current !== vr && $n.current && Z && (Yn($n.current), Zn(!0), Qn.current !== null && window.clearTimeout(Qn.current), Qn.current = window.setTimeout(() => {
|
|
4258
|
+
Zn(!1), Yn(null), Qn.current = null;
|
|
4259
|
+
}, U ? 0 : 444)), er.current = vr, $n.current = Z;
|
|
4260
4260
|
}, [
|
|
4261
4261
|
c.stack,
|
|
4262
4262
|
U,
|
|
4263
4263
|
Z,
|
|
4264
|
-
|
|
4265
|
-
]),
|
|
4266
|
-
let [
|
|
4264
|
+
vr
|
|
4265
|
+
]), It.current = ar ?? It.current;
|
|
4266
|
+
let [yr, br] = A(() => {
|
|
4267
4267
|
let e = L?.getSnapshot().inspection;
|
|
4268
4268
|
return e ? {
|
|
4269
4269
|
row: e.row,
|
|
@@ -4271,10 +4271,10 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4271
4271
|
x: e.x,
|
|
4272
4272
|
pinned: e.pinned
|
|
4273
4273
|
} : null;
|
|
4274
|
-
}), Q = k(
|
|
4275
|
-
Q.current =
|
|
4276
|
-
let
|
|
4277
|
-
if (
|
|
4274
|
+
}), Q = k(yr);
|
|
4275
|
+
Q.current = yr;
|
|
4276
|
+
let xr = k(!1), Er = k(!1), Ar = C(() => {
|
|
4277
|
+
if (xr.current = !1, L && !Er.current && n.type !== "category") {
|
|
4278
4278
|
Q.current?.pinned ? L.actions.release() : L.actions.clearInspection();
|
|
4279
4279
|
return;
|
|
4280
4280
|
}
|
|
@@ -4282,28 +4282,28 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4282
4282
|
ce?.(null);
|
|
4283
4283
|
return;
|
|
4284
4284
|
}
|
|
4285
|
-
Q.current && (n.type === "category" && Q.current.pinned && ce?.(null), Q.current = null,
|
|
4285
|
+
Q.current && (n.type === "category" && Q.current.pinned && ce?.(null), Q.current = null, br(null), Lt.current?.(null), F?.clearInspection(L ? void 0 : Jt));
|
|
4286
4286
|
}, [
|
|
4287
|
-
|
|
4287
|
+
Jt,
|
|
4288
4288
|
F,
|
|
4289
4289
|
L,
|
|
4290
4290
|
ce,
|
|
4291
4291
|
se,
|
|
4292
4292
|
n.type
|
|
4293
|
-
]),
|
|
4294
|
-
Q.current && (Q.current = null,
|
|
4293
|
+
]), Vr = C((e = !1) => {
|
|
4294
|
+
Q.current && (Q.current = null, br(null), Lt.current?.(null), e || F?.clearInspection(L ? void 0 : Jt));
|
|
4295
4295
|
}, [
|
|
4296
|
-
|
|
4296
|
+
Jt,
|
|
4297
4297
|
F,
|
|
4298
4298
|
L
|
|
4299
4299
|
]);
|
|
4300
4300
|
T(() => {
|
|
4301
|
-
b ||
|
|
4302
|
-
}, [b,
|
|
4303
|
-
let
|
|
4301
|
+
b || Vr(!0);
|
|
4302
|
+
}, [b, Vr]);
|
|
4303
|
+
let Hr = C((e, t, r = !1, i = !1) => {
|
|
4304
4304
|
let a = Z, o = a?.data.rows[e];
|
|
4305
4305
|
if (!b || !a || !o) return;
|
|
4306
|
-
if (t && (
|
|
4306
|
+
if (t && (xr.current = i), L && !Er.current && n.type !== "category") {
|
|
4307
4307
|
t ? L.actions.pin(o.x, i ? { local: i } : void 0) : L.actions.inspect(o.x);
|
|
4308
4308
|
return;
|
|
4309
4309
|
}
|
|
@@ -4316,19 +4316,19 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4316
4316
|
pinned: t,
|
|
4317
4317
|
...t && i ? { local: i } : {}
|
|
4318
4318
|
}, c = Q.current;
|
|
4319
|
-
c && c.sourceIndex === s.sourceIndex && c.pinned === s.pinned && !!c.local == !!s.local && c.row === s.row || (Q.current = s,
|
|
4319
|
+
c && c.sourceIndex === s.sourceIndex && c.pinned === s.pinned && !!c.local == !!s.local && c.row === s.row || (Q.current = s, br(s), Lt.current?.(s), n.type === "category" && t && !r && ce?.(o.categoryId ?? null), n.type !== "category" && F?.inspect({
|
|
4320
4320
|
x: s.x,
|
|
4321
4321
|
pinned: t,
|
|
4322
|
-
ownerId:
|
|
4322
|
+
ownerId: Jt,
|
|
4323
4323
|
...s.local ? { local: !0 } : {}
|
|
4324
|
-
}),
|
|
4324
|
+
}), tn && e < a.data.rows.length - 1 && Un && (Wn(!1), qn(a.xDomain), Qt.onFollowingChange?.(!1)));
|
|
4325
4325
|
}, [
|
|
4326
|
-
|
|
4326
|
+
Jt,
|
|
4327
4327
|
F,
|
|
4328
|
-
|
|
4328
|
+
Un,
|
|
4329
4329
|
b,
|
|
4330
|
-
|
|
4331
|
-
|
|
4330
|
+
Qt,
|
|
4331
|
+
tn,
|
|
4332
4332
|
L,
|
|
4333
4333
|
ce,
|
|
4334
4334
|
se,
|
|
@@ -4338,35 +4338,35 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4338
4338
|
T(() => {
|
|
4339
4339
|
if (n.type !== "category" || se === void 0 || pt !== ht.current) return;
|
|
4340
4340
|
if (se === null) {
|
|
4341
|
-
Q.current?.pinned && (b ?
|
|
4341
|
+
Q.current?.pinned && (b ? Ar() : Vr());
|
|
4342
4342
|
return;
|
|
4343
4343
|
}
|
|
4344
4344
|
if (!Z) {
|
|
4345
|
-
|
|
4345
|
+
Vr(), v === "ready" && pt !== null && ce?.(null);
|
|
4346
4346
|
return;
|
|
4347
4347
|
}
|
|
4348
4348
|
let e = Z.data.rows.findIndex((e) => e.categoryId === se);
|
|
4349
|
-
e < 0 ? (
|
|
4349
|
+
e < 0 ? (Vr(), ce?.(null)) : b && Hr(e, !0, !0);
|
|
4350
4350
|
}, [
|
|
4351
4351
|
pt,
|
|
4352
|
-
|
|
4352
|
+
Ar,
|
|
4353
4353
|
b,
|
|
4354
|
-
|
|
4354
|
+
Vr,
|
|
4355
4355
|
ce,
|
|
4356
|
-
|
|
4356
|
+
Hr,
|
|
4357
4357
|
se,
|
|
4358
4358
|
v,
|
|
4359
4359
|
Z,
|
|
4360
4360
|
n.type
|
|
4361
4361
|
]);
|
|
4362
|
-
let
|
|
4362
|
+
let Ur = C((e, t = !1) => {
|
|
4363
4363
|
let n = Z, r = Le.current;
|
|
4364
4364
|
if (!n || !r || !n.data.rows.length) return null;
|
|
4365
4365
|
let i = z.current ?? r.getBoundingClientRect();
|
|
4366
4366
|
if (z.current = i, !i.width || !i.height) return null;
|
|
4367
4367
|
let a = (e.clientX - i.left) / i.width * V.width;
|
|
4368
4368
|
return !t && (a < n.plot.left - 8 || a > n.plot.right + 8) ? null : dr(n.data.rows, n.xDomain, a, n.xToPixel);
|
|
4369
|
-
}, [V.width, Z]),
|
|
4369
|
+
}, [V.width, Z]), Wr = C((e) => {
|
|
4370
4370
|
let t = Z?.data.rows[e];
|
|
4371
4371
|
if (!Z || !t) return [];
|
|
4372
4372
|
if (c.bars) {
|
|
@@ -4405,63 +4405,63 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4405
4405
|
q,
|
|
4406
4406
|
c,
|
|
4407
4407
|
Z
|
|
4408
|
-
]),
|
|
4408
|
+
]), Gr = C((e, t, n) => {
|
|
4409
4409
|
if (ve !== "nearest" || q.length < 2) return;
|
|
4410
4410
|
let r = Le.current?.getBoundingClientRect();
|
|
4411
4411
|
if (!r?.height || !r.width) return;
|
|
4412
4412
|
z.current = r;
|
|
4413
|
-
let i = (t - r.left) / r.width * V.width, a = (n - r.top) / r.height * V.height, o =
|
|
4413
|
+
let i = (t - r.left) / r.width * V.width, a = (n - r.top) / r.height * V.height, o = Wr(e);
|
|
4414
4414
|
if (!o.length) return;
|
|
4415
4415
|
let s = !(!c.bars || c.stack), l = s ? o.filter((e) => e.line && Math.abs(e.y - a) <= Sr).sort((e, t) => Math.abs(e.y - a) - Math.abs(t.y - a))[0] : void 0, u = s ? l ? [l] : o.filter((e) => !e.line) : o;
|
|
4416
4416
|
if (!u.length) return;
|
|
4417
4417
|
let d = u.map((e) => ({
|
|
4418
4418
|
id: e.id,
|
|
4419
4419
|
distance: Math.abs(s && !l ? e.x - i : e.y - a)
|
|
4420
|
-
})), f = d.reduce((e, t) => t.distance < e.distance ? t : e), p = l ? void 0 : d.find((e) => e.id ===
|
|
4421
|
-
p && p.id !== f.id && p.distance - f.distance < m || f.id !==
|
|
4420
|
+
})), f = d.reduce((e, t) => t.distance < e.distance ? t : e), p = l ? void 0 : d.find((e) => e.id === vn.current), m = s ? 2 : 8;
|
|
4421
|
+
p && p.id !== f.id && p.distance - f.distance < m || f.id !== vn.current && _n(f.id);
|
|
4422
4422
|
}, [
|
|
4423
4423
|
q.length,
|
|
4424
4424
|
c,
|
|
4425
4425
|
ve,
|
|
4426
|
-
|
|
4426
|
+
Wr,
|
|
4427
4427
|
V.height,
|
|
4428
4428
|
V.width
|
|
4429
|
-
]),
|
|
4430
|
-
if (!(
|
|
4429
|
+
]), Kr = C((e) => {
|
|
4430
|
+
if (!($t && Y && !Vt.current)) {
|
|
4431
4431
|
if (Q.current?.pinned && e.pointerType !== "touch") {
|
|
4432
|
-
Z &&
|
|
4432
|
+
Z && Gr(Br(Z, Q.current.sourceIndex), e.clientX, e.clientY);
|
|
4433
4433
|
return;
|
|
4434
4434
|
}
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
let e =
|
|
4435
|
+
zt.current = e, Rt.current === null && (Rt.current = window.requestAnimationFrame(() => {
|
|
4436
|
+
Rt.current = null;
|
|
4437
|
+
let e = zt.current;
|
|
4438
4438
|
if (!e || Q.current?.pinned && e.pointerType !== "touch") return;
|
|
4439
|
-
let t =
|
|
4440
|
-
t !== null && (
|
|
4439
|
+
let t = Ur(e);
|
|
4440
|
+
t !== null && (Hr(t, !1), Gr(t, e.clientX, e.clientY));
|
|
4441
4441
|
}));
|
|
4442
4442
|
}
|
|
4443
4443
|
}, [
|
|
4444
|
-
|
|
4444
|
+
$t,
|
|
4445
4445
|
Y,
|
|
4446
|
-
|
|
4447
|
-
|
|
4446
|
+
Ur,
|
|
4447
|
+
Hr,
|
|
4448
4448
|
Z,
|
|
4449
|
-
|
|
4450
|
-
]),
|
|
4449
|
+
Gr
|
|
4450
|
+
]), qr = k(!1);
|
|
4451
4451
|
T(() => {
|
|
4452
4452
|
let e = (e) => {
|
|
4453
4453
|
let t = e.target, n = Pe.current?.closest("[data-lilt-chart]");
|
|
4454
|
-
|
|
4454
|
+
qr.current = !!n?.contains(t), !t?.closest("button, a, input, [role=\"tab\"]") && F?.getSnapshot().inspection?.ownerId !== "sync" && (t?.closest(".lilt-chart__plot-host")?.querySelector(".lilt-chart__pin[data-ghost]") || Q.current?.pinned && Pe.current && !Pe.current.contains(e.target) && Ar());
|
|
4455
4455
|
};
|
|
4456
4456
|
return document.addEventListener("pointerdown", e, !0), () => {
|
|
4457
|
-
document.removeEventListener("pointerdown", e, !0),
|
|
4457
|
+
document.removeEventListener("pointerdown", e, !0), Rt.current !== null && window.cancelAnimationFrame(Rt.current), qt.current !== null && window.cancelAnimationFrame(qt.current), K.current !== null && window.clearTimeout(K.current);
|
|
4458
4458
|
};
|
|
4459
|
-
}, [
|
|
4459
|
+
}, [Ar, F]), T(() => {
|
|
4460
4460
|
let e = Q.current;
|
|
4461
4461
|
if (!e || !Z) return;
|
|
4462
4462
|
let t = Z.data.rows.findIndex((t) => e.categoryId === void 0 ? t.x === e.x : t.categoryId === e.categoryId);
|
|
4463
4463
|
if (t < 0) {
|
|
4464
|
-
|
|
4464
|
+
Vr();
|
|
4465
4465
|
return;
|
|
4466
4466
|
}
|
|
4467
4467
|
let n = Z.data.rows[t];
|
|
@@ -4473,17 +4473,17 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4473
4473
|
categoryId: n.categoryId,
|
|
4474
4474
|
pinned: e.pinned
|
|
4475
4475
|
};
|
|
4476
|
-
Q.current = r,
|
|
4476
|
+
Q.current = r, br(r), Lt.current?.(r);
|
|
4477
4477
|
}, [
|
|
4478
|
-
|
|
4478
|
+
Vr,
|
|
4479
4479
|
re,
|
|
4480
4480
|
Z
|
|
4481
4481
|
]), T(() => {
|
|
4482
4482
|
if (!F || !b || !Z || n.type === "category" || !ht.current || !ht.current.rows.length || !Fe(ht.current)) return;
|
|
4483
|
-
let e =
|
|
4483
|
+
let e = Yt.inspection;
|
|
4484
4484
|
if (!e) {
|
|
4485
4485
|
if (L?.getSnapshot().inspection?.pinned) return;
|
|
4486
|
-
Q.current && (Q.current = null,
|
|
4486
|
+
Q.current && (Q.current = null, br(null), Lt.current?.(null));
|
|
4487
4487
|
return;
|
|
4488
4488
|
}
|
|
4489
4489
|
let t = Z.data.rows.findIndex((t) => t.x === e.x);
|
|
@@ -4495,7 +4495,7 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4495
4495
|
}), n > oe.nearestWithin && (t = -1);
|
|
4496
4496
|
}
|
|
4497
4497
|
if (t < 0) {
|
|
4498
|
-
Q.current && (Q.current = null,
|
|
4498
|
+
Q.current && (Q.current = null, br(null), Lt.current?.(null));
|
|
4499
4499
|
return;
|
|
4500
4500
|
}
|
|
4501
4501
|
let r = Z.data.rows[t], i = Q.current;
|
|
@@ -4506,46 +4506,46 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4506
4506
|
x: r.x,
|
|
4507
4507
|
pinned: e.pinned
|
|
4508
4508
|
};
|
|
4509
|
-
Q.current = a,
|
|
4509
|
+
Q.current = a, br(a), Lt.current?.(a);
|
|
4510
4510
|
}, [
|
|
4511
4511
|
F,
|
|
4512
4512
|
he,
|
|
4513
|
-
|
|
4513
|
+
Yt.inspection,
|
|
4514
4514
|
b,
|
|
4515
4515
|
oe,
|
|
4516
4516
|
L,
|
|
4517
4517
|
Z,
|
|
4518
4518
|
n.type
|
|
4519
4519
|
]);
|
|
4520
|
-
let
|
|
4520
|
+
let Jr = [
|
|
4521
4521
|
Y?.series,
|
|
4522
|
-
|
|
4522
|
+
Xt.series,
|
|
4523
4523
|
q[0]?.id
|
|
4524
|
-
].find((e) => q.some((t) => t.id === e)),
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4524
|
+
].find((e) => q.some((t) => t.id === e)), Yr = O(() => $t && Y && Jr && q.some((e) => e.id === Jr) && X ? Re(X, Y, Jr, Xt.percentage) : null, [
|
|
4525
|
+
Xt.percentage,
|
|
4526
|
+
$t,
|
|
4527
|
+
Jr,
|
|
4528
4528
|
Y,
|
|
4529
4529
|
X,
|
|
4530
4530
|
q
|
|
4531
4531
|
]);
|
|
4532
4532
|
D(() => {
|
|
4533
|
-
|
|
4534
|
-
}, [
|
|
4535
|
-
let
|
|
4536
|
-
if (L && !
|
|
4537
|
-
e ? L.actions.compare(e,
|
|
4533
|
+
On.current && Yr && (On.current = !1, Pe.current?.querySelector(".lilt-chart__comparison-handle[data-endpoint=\"start\"]")?.focus());
|
|
4534
|
+
}, [Yr]);
|
|
4535
|
+
let Xr = C((e) => {
|
|
4536
|
+
if (L && !Er.current) {
|
|
4537
|
+
e ? L.actions.compare(e, Xt.percentage) : L.actions.clearComparison();
|
|
4538
4538
|
return;
|
|
4539
4539
|
}
|
|
4540
|
-
F ? F.setComparison(e) :
|
|
4540
|
+
F ? F.setComparison(e) : In(e);
|
|
4541
4541
|
}, [
|
|
4542
4542
|
F,
|
|
4543
4543
|
L,
|
|
4544
|
-
|
|
4545
|
-
]),
|
|
4546
|
-
|
|
4547
|
-
}, []),
|
|
4548
|
-
Y && X && (
|
|
4544
|
+
Xt.percentage
|
|
4545
|
+
]), Zr = C(() => {
|
|
4546
|
+
Nn.current = null, Mn(null), Dn(null);
|
|
4547
|
+
}, []), Qr = C((e, t) => {
|
|
4548
|
+
Y && X && (Nn.current = {
|
|
4549
4549
|
handle: e,
|
|
4550
4550
|
original: Y,
|
|
4551
4551
|
draft: {
|
|
@@ -4553,12 +4553,12 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4553
4553
|
endX: Y.endX
|
|
4554
4554
|
},
|
|
4555
4555
|
pointerId: t
|
|
4556
|
-
},
|
|
4556
|
+
}, Mn(e), Dn({
|
|
4557
4557
|
startX: Y.startX,
|
|
4558
4558
|
endX: Y.endX
|
|
4559
4559
|
}));
|
|
4560
|
-
}, [Y, X]),
|
|
4561
|
-
let n =
|
|
4560
|
+
}, [Y, X]), $r = C((e, t) => {
|
|
4561
|
+
let n = Nn.current, r = X?.rows;
|
|
4562
4562
|
if (!n || n.handle !== e || !r?.length) return;
|
|
4563
4563
|
let i = e === "start" ? n.draft.endX : n.draft.startX, a = r.findIndex((e) => e.x === i);
|
|
4564
4564
|
if (a < 0) return;
|
|
@@ -4568,102 +4568,102 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4568
4568
|
l !== void 0 && (n.draft = {
|
|
4569
4569
|
...n.draft,
|
|
4570
4570
|
[e === "start" ? "startX" : "endX"]: l
|
|
4571
|
-
},
|
|
4572
|
-
}, [X]),
|
|
4573
|
-
let e =
|
|
4574
|
-
e && (
|
|
4571
|
+
}, Dn(n.draft));
|
|
4572
|
+
}, [X]), ei = C(() => {
|
|
4573
|
+
let e = Nn.current;
|
|
4574
|
+
e && (Nn.current = null, Mn(null), Dn(null), (e.draft.startX !== e.original.startX || e.draft.endX !== e.original.endX) && Xr({
|
|
4575
4575
|
...e.draft,
|
|
4576
4576
|
series: e.original.series
|
|
4577
4577
|
}));
|
|
4578
|
-
}, [
|
|
4578
|
+
}, [Xr]);
|
|
4579
4579
|
T(() => {
|
|
4580
|
-
let e =
|
|
4581
|
-
e && X && (!X.rows.some((t) => t.x === e.original.startX) || !X.rows.some((t) => t.x === e.original.endX)) &&
|
|
4582
|
-
}, [
|
|
4583
|
-
let
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
let e =
|
|
4580
|
+
let e = Nn.current;
|
|
4581
|
+
e && X && (!X.rows.some((t) => t.x === e.original.startX) || !X.rows.some((t) => t.x === e.original.endX)) && Zr();
|
|
4582
|
+
}, [Zr, X]);
|
|
4583
|
+
let ti = C((e) => {
|
|
4584
|
+
Kt.current = { clientX: e.clientX }, qt.current === null && (qt.current = window.requestAnimationFrame(() => {
|
|
4585
|
+
qt.current = null;
|
|
4586
|
+
let e = Vt.current, t = Kt.current;
|
|
4587
4587
|
if (!t) return;
|
|
4588
|
-
let n =
|
|
4588
|
+
let n = Ur(t, !0), r = n === null ? void 0 : Z?.data.rows[n]?.x;
|
|
4589
4589
|
if (r !== void 0) {
|
|
4590
|
-
if (
|
|
4591
|
-
|
|
4590
|
+
if (An.current) {
|
|
4591
|
+
kn((e) => e && e.probeX !== r ? {
|
|
4592
4592
|
...e,
|
|
4593
4593
|
probeX: r
|
|
4594
4594
|
} : e);
|
|
4595
4595
|
return;
|
|
4596
4596
|
}
|
|
4597
|
-
e &&
|
|
4597
|
+
e && Dn({
|
|
4598
4598
|
startX: Math.min(e.startX, r),
|
|
4599
4599
|
endX: Math.max(e.startX, r)
|
|
4600
4600
|
});
|
|
4601
4601
|
}
|
|
4602
4602
|
}));
|
|
4603
|
-
}, [
|
|
4604
|
-
|
|
4603
|
+
}, [Ur, Z]), ni = C((e, t, n = !1, r = Jr) => {
|
|
4604
|
+
Xr({
|
|
4605
4605
|
startX: n ? e : Math.min(e, t),
|
|
4606
4606
|
endX: n ? t : Math.max(e, t),
|
|
4607
4607
|
series: r
|
|
4608
|
-
}),
|
|
4608
|
+
}), Tn(null), Dn(null), kn(null), Ar();
|
|
4609
4609
|
}, [
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
]),
|
|
4614
|
-
|
|
4615
|
-
}, [
|
|
4616
|
-
|
|
4617
|
-
|
|
4610
|
+
Ar,
|
|
4611
|
+
Jr,
|
|
4612
|
+
Xr
|
|
4613
|
+
]), ri = C((e) => {
|
|
4614
|
+
wn === null ? Tn(e) : wn === e ? Tn(null) : (On.current = !0, ni(wn, e));
|
|
4615
|
+
}, [wn, ni]), ii = C((e) => {
|
|
4616
|
+
Yn(Z), Zn(!0), Qn.current !== null && window.clearTimeout(Qn.current), e(), Qn.current = window.setTimeout(() => {
|
|
4617
|
+
Zn(!1), Yn(null), Qn.current = null;
|
|
4618
4618
|
}, U ? 0 : 444);
|
|
4619
4619
|
}, [U, Z]);
|
|
4620
4620
|
T(() => () => {
|
|
4621
|
-
|
|
4621
|
+
Qn.current !== null && window.clearTimeout(Qn.current);
|
|
4622
4622
|
}, []);
|
|
4623
|
-
let
|
|
4624
|
-
|
|
4625
|
-
}, [F,
|
|
4626
|
-
|
|
4623
|
+
let ai = C((e) => {
|
|
4624
|
+
Qn.current !== null && window.clearTimeout(Qn.current), Qn.current = null, Yn(null), Zn(!1), F ? F.setFocus(e) : Vn(e), Zt.onChange?.(e);
|
|
4625
|
+
}, [F, Zt]), oi = C(() => {
|
|
4626
|
+
Xr(null), Hn && ai(null), Tn(null), Dn(null);
|
|
4627
4627
|
}, [
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
]),
|
|
4632
|
-
if (
|
|
4633
|
-
|
|
4628
|
+
Hn,
|
|
4629
|
+
Xr,
|
|
4630
|
+
ai
|
|
4631
|
+
]), si = C(() => {
|
|
4632
|
+
if (Nn.current) {
|
|
4633
|
+
Zr();
|
|
4634
4634
|
return;
|
|
4635
4635
|
}
|
|
4636
|
-
if (
|
|
4637
|
-
|
|
4636
|
+
if (Vt.current && Gt(), Vt.current = null, qt.current !== null && (window.cancelAnimationFrame(qt.current), qt.current = null), An.current) {
|
|
4637
|
+
kn(null);
|
|
4638
4638
|
return;
|
|
4639
4639
|
}
|
|
4640
|
-
if (
|
|
4641
|
-
|
|
4640
|
+
if (En) {
|
|
4641
|
+
Dn(null);
|
|
4642
4642
|
return;
|
|
4643
4643
|
}
|
|
4644
|
-
if (
|
|
4645
|
-
|
|
4644
|
+
if (wn !== null) {
|
|
4645
|
+
Tn(null);
|
|
4646
4646
|
return;
|
|
4647
4647
|
}
|
|
4648
|
-
if (
|
|
4649
|
-
|
|
4648
|
+
if (Hn) {
|
|
4649
|
+
ai(null);
|
|
4650
4650
|
return;
|
|
4651
4651
|
}
|
|
4652
4652
|
if (Y) {
|
|
4653
|
-
|
|
4653
|
+
oi();
|
|
4654
4654
|
return;
|
|
4655
4655
|
}
|
|
4656
|
-
|
|
4656
|
+
Ar();
|
|
4657
4657
|
}, [
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4658
|
+
Zr,
|
|
4659
|
+
oi,
|
|
4660
|
+
Ar,
|
|
4661
|
+
En,
|
|
4661
4662
|
wn,
|
|
4662
|
-
Sn,
|
|
4663
4663
|
Y,
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4664
|
+
Hn,
|
|
4665
|
+
ai,
|
|
4666
|
+
Gt
|
|
4667
4667
|
]);
|
|
4668
4668
|
T(() => {
|
|
4669
4669
|
let e = (e) => {
|
|
@@ -4674,50 +4674,50 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4674
4674
|
let e = n.closest("[data-lilt-chart]");
|
|
4675
4675
|
if (e && e !== t) return;
|
|
4676
4676
|
}
|
|
4677
|
-
n instanceof Element && n.closest("[role=\"dialog\"]") && !t.contains(n) || (t.contains(n) ||
|
|
4677
|
+
n instanceof Element && n.closest("[role=\"dialog\"]") && !t.contains(n) || (t.contains(n) || qr.current) && (e.preventDefault(), n instanceof Element && n.closest(".lilt-chart__tooltip, .lilt-chart__adaptive-custom, .lilt-chart__comparison-tooltip") && Pe.current?.focus({ preventScroll: !0 }), si());
|
|
4678
4678
|
}
|
|
4679
4679
|
};
|
|
4680
4680
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
4681
|
-
}, [
|
|
4682
|
-
let
|
|
4683
|
-
|
|
4684
|
-
|
|
4681
|
+
}, [si]);
|
|
4682
|
+
let ci = C(() => {
|
|
4683
|
+
ii(() => {
|
|
4684
|
+
qn(null), Wn(!0), Ar(), Qt.onFollowingChange?.(!0);
|
|
4685
4685
|
});
|
|
4686
4686
|
}, [
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
]),
|
|
4691
|
-
fe ||
|
|
4692
|
-
}, [pe, fe]),
|
|
4693
|
-
|
|
4694
|
-
}, [
|
|
4695
|
-
let t =
|
|
4696
|
-
|
|
4687
|
+
Ar,
|
|
4688
|
+
Qt,
|
|
4689
|
+
ii
|
|
4690
|
+
]), li = X?.rows.at(-1)?.x, ui = Kn && X ? X.rows.filter((e) => e.x > Kn[1]).length : 0, di = C((e) => {
|
|
4691
|
+
fe || ln(e), pe?.(e);
|
|
4692
|
+
}, [pe, fe]), fi = C((e) => {
|
|
4693
|
+
pn(null), di(e);
|
|
4694
|
+
}, [di]), pi = C((e) => {
|
|
4695
|
+
let t = fn?.restore ?? dn;
|
|
4696
|
+
pn({
|
|
4697
4697
|
id: e,
|
|
4698
4698
|
restore: t,
|
|
4699
4699
|
expected: [e],
|
|
4700
|
-
previous:
|
|
4701
|
-
}),
|
|
4700
|
+
previous: dn
|
|
4701
|
+
}), di([e]);
|
|
4702
4702
|
}, [
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
]),
|
|
4707
|
-
if (!
|
|
4708
|
-
let e = i.map((e) => e.id), t =
|
|
4709
|
-
|
|
4703
|
+
fn,
|
|
4704
|
+
di,
|
|
4705
|
+
dn
|
|
4706
|
+
]), mi = C(() => {
|
|
4707
|
+
if (!fn) return;
|
|
4708
|
+
let e = i.map((e) => e.id), t = fn.restore.filter((t) => e.includes(t));
|
|
4709
|
+
pn(null), di(t);
|
|
4710
4710
|
}, [
|
|
4711
|
-
|
|
4712
|
-
|
|
4711
|
+
fn,
|
|
4712
|
+
di,
|
|
4713
4713
|
i
|
|
4714
|
-
]),
|
|
4715
|
-
|
|
4716
|
-
}, [
|
|
4714
|
+
]), hi = C(() => {
|
|
4715
|
+
pn(null), di(i.map((e) => e.id));
|
|
4716
|
+
}, [di, i]), gi = ["lilt-chart__plot-host", m].filter(Boolean).join(" "), _i = {
|
|
4717
4717
|
...h,
|
|
4718
4718
|
"--lilt-chart-height": `${V.height || a}px`
|
|
4719
|
-
},
|
|
4720
|
-
|
|
4719
|
+
}, vi = !!(W && W.rows.length > 0 && !Fe(W)), yi = Ct === "empty" || v === "ready" && !!W && (W?.rows.length === 0 || vi), $ = Xe.error ?? (v === "error" ? x ?? "Could not load chart data." : null), bi = nr ? null : vt?.kind ?? (Xn ? "matched-update" : null), xi = nr ? 0 : vt?.duration ?? (Xn ? 420 : 0), Si = ne && !U && bi === "initial";
|
|
4720
|
+
Tt && !kt && v === "loading" && (Pt.current = /* @__PURE__ */ M(Fn, {
|
|
4721
4721
|
bottom: H.bottom,
|
|
4722
4722
|
height: V.height,
|
|
4723
4723
|
id: `${G}-skeleton`,
|
|
@@ -4742,8 +4742,8 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4742
4742
|
loadingStyle: y,
|
|
4743
4743
|
edge: Ce && !c.bars ? 0 : 8
|
|
4744
4744
|
}));
|
|
4745
|
-
let
|
|
4746
|
-
let c = !(!
|
|
4745
|
+
let Ci = Tt ? Pt.current : null, wi = an(Z?.plot.left ?? 0, Z?.plot.width ?? V.width, Si ? nn(bt * xi, 0, xi) : 1), Ti = lr ?? Jn, Ei = !!((bi === "topology-update" || Xn) && Ti && Z), Di = k(/* @__PURE__ */ new Map()), Oi = (e, t, a, o, s) => {
|
|
4746
|
+
let c = !(!yr || Yr), l = q.some((e) => e.id === yn) ? yn : null, u = Si && !U ? bt : 1, d = [
|
|
4747
4747
|
e,
|
|
4748
4748
|
t,
|
|
4749
4749
|
o,
|
|
@@ -4754,19 +4754,19 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4754
4754
|
H,
|
|
4755
4755
|
V,
|
|
4756
4756
|
U,
|
|
4757
|
-
|
|
4758
|
-
|
|
4757
|
+
xi,
|
|
4758
|
+
bi,
|
|
4759
4759
|
et,
|
|
4760
4760
|
tt,
|
|
4761
4761
|
nt,
|
|
4762
|
-
|
|
4762
|
+
Cn,
|
|
4763
4763
|
c,
|
|
4764
4764
|
l,
|
|
4765
4765
|
q,
|
|
4766
4766
|
u,
|
|
4767
|
-
|
|
4767
|
+
Si,
|
|
4768
4768
|
_
|
|
4769
|
-
], f =
|
|
4769
|
+
], f = Di.current.get(a);
|
|
4770
4770
|
if (f && f.inputs.length === d.length && f.inputs.every((e, t) => Object.is(e, d[t]))) return f.element;
|
|
4771
4771
|
let p = Lr(e, t, {
|
|
4772
4772
|
series: i,
|
|
@@ -4775,12 +4775,12 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4775
4775
|
margins: H,
|
|
4776
4776
|
size: V,
|
|
4777
4777
|
reducedMotion: U,
|
|
4778
|
-
transitionDuration:
|
|
4779
|
-
transitionKind:
|
|
4778
|
+
transitionDuration: xi,
|
|
4779
|
+
transitionKind: bi,
|
|
4780
4780
|
clipId: et,
|
|
4781
4781
|
gridGradientId: tt,
|
|
4782
4782
|
paintId: nt,
|
|
4783
|
-
inspectionSeries:
|
|
4783
|
+
inspectionSeries: Cn,
|
|
4784
4784
|
inspecting: c,
|
|
4785
4785
|
focusedSeries: l,
|
|
4786
4786
|
visibleSeries: q.map((e) => e.id),
|
|
@@ -4788,116 +4788,116 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4788
4788
|
}), m = /* @__PURE__ */ M(P.g, {
|
|
4789
4789
|
animate: { opacity: o ?? 1 },
|
|
4790
4790
|
className: "lilt-chart__data-layer",
|
|
4791
|
-
initial: s === void 0 ? o === void 0 &&
|
|
4792
|
-
transition: { duration: U ? 0 :
|
|
4791
|
+
initial: s === void 0 ? o === void 0 && Si ? !1 : o === void 0 ? void 0 : { opacity: o } : { opacity: s },
|
|
4792
|
+
transition: { duration: U ? 0 : bi === "topology-update" || bi === "matched-update" ? xi / 1e3 : .12 },
|
|
4793
4793
|
children: /* @__PURE__ */ M(Wt, {
|
|
4794
4794
|
value: p,
|
|
4795
4795
|
children: _
|
|
4796
4796
|
})
|
|
4797
4797
|
}, a);
|
|
4798
|
-
return !
|
|
4798
|
+
return !Di.current.has(a) && Di.current.size >= 3 && Di.current.clear(), Di.current.set(a, {
|
|
4799
4799
|
inputs: d,
|
|
4800
4800
|
element: m
|
|
4801
4801
|
}), m;
|
|
4802
|
-
},
|
|
4802
|
+
}, ki = O(() => Z?.data.rows.filter((e) => e.x >= Z.xDomain[0] && e.x <= Z.xDomain[1]), [Z]), Ai = ki?.[0], ji = ki?.at(-1), Mi = Ai && Z ? Br(Z, Ai.sourceIndex) : 0, Ni = ji && Z ? Br(Z, ji.sourceIndex) : 0, Pi = yr && Z && yr.x >= Z.xDomain[0] && yr.x <= Z.xDomain[1] ? yr : null, Fi = Pi && Z ? Br(Z, Pi.sourceIndex) : Ni, Ii = q.find((e) => e.id === Jr), Li = dn.length === 0, Ri = Pi?.row ?? ji?.datum ?? null, zi = Pi?.x ?? ji?.x, Bi = Ri && zi !== void 0 && Z ? `${Z.formatX(zi)} · ${q.map((e) => `${e.label} ${zr(e, Ri, Z.formatValue)}`).join(" · ")}` : Li ? "No series selected" : "No observation available", Vi = Yt.inspection?.ownerId === gr, Hi = !(!Yt.inspection || Yt.inspection.ownerId === Jt || L && Yt.inspection.ownerId === "model"), Ui = (J ? {
|
|
4803
4803
|
startX: J.baselineX,
|
|
4804
4804
|
endX: J.probeX
|
|
4805
|
-
} :
|
|
4806
|
-
startX:
|
|
4807
|
-
endX:
|
|
4808
|
-
} : null)) &&
|
|
4805
|
+
} : En ?? (wn !== null && yr ? {
|
|
4806
|
+
startX: wn,
|
|
4807
|
+
endX: yr.x
|
|
4808
|
+
} : null)) && Jr && X ? Re(X, J ? {
|
|
4809
4809
|
startX: J.baselineX,
|
|
4810
4810
|
endX: J.probeX
|
|
4811
|
-
} :
|
|
4812
|
-
startX:
|
|
4813
|
-
endX:
|
|
4814
|
-
},
|
|
4815
|
-
startX:
|
|
4816
|
-
endX:
|
|
4817
|
-
}, q,
|
|
4818
|
-
|
|
4819
|
-
|
|
4811
|
+
} : En ?? {
|
|
4812
|
+
startX: wn,
|
|
4813
|
+
endX: yr.x
|
|
4814
|
+
}, Jr, Xt.percentage) : null, Wi = $t && b ? Ui ?? Yr : null, Gi = Wi?.startX, Ki = Wi?.endX, qi = Z?.formatValue, Ji = O(() => Gi !== void 0 && Ki !== void 0 && X && qi ? He(X, {
|
|
4815
|
+
startX: Gi,
|
|
4816
|
+
endX: Ki
|
|
4817
|
+
}, q, qi, Xt.percentage) : [], [
|
|
4818
|
+
Gi,
|
|
4819
|
+
Ki,
|
|
4820
4820
|
X,
|
|
4821
4821
|
q,
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
]),
|
|
4822
|
+
qi,
|
|
4823
|
+
Xt.percentage
|
|
4824
|
+
]), Yi = Gi === void 0 ? "" : Z?.formatX(Gi) ?? "", Xi = Ki === void 0 ? "" : Z?.formatX(Ki) ?? "", Zi = Ui ? "preview" : "complete", Qi = !!Hn, $i = O(() => Gi === void 0 || Ki === void 0 || Ji.length === 0 ? null : {
|
|
4825
4825
|
kind: "range",
|
|
4826
|
-
startRow: X?.rows.find((e) => e.x ===
|
|
4827
|
-
endRow: X?.rows.find((e) => e.x ===
|
|
4828
|
-
startSourceIndex: X?.rows.find((e) => e.x ===
|
|
4829
|
-
endSourceIndex: X?.rows.find((e) => e.x ===
|
|
4830
|
-
percentagePolicy:
|
|
4831
|
-
startX:
|
|
4832
|
-
endX:
|
|
4833
|
-
formattedStartX:
|
|
4834
|
-
formattedEndX:
|
|
4835
|
-
elapsed: Math.abs(
|
|
4836
|
-
phase:
|
|
4837
|
-
focused:
|
|
4838
|
-
series:
|
|
4826
|
+
startRow: X?.rows.find((e) => e.x === Gi)?.datum ?? null,
|
|
4827
|
+
endRow: X?.rows.find((e) => e.x === Ki)?.datum ?? null,
|
|
4828
|
+
startSourceIndex: X?.rows.find((e) => e.x === Gi)?.sourceIndex ?? null,
|
|
4829
|
+
endSourceIndex: X?.rows.find((e) => e.x === Ki)?.sourceIndex ?? null,
|
|
4830
|
+
percentagePolicy: Xt.percentage ?? "positive-baseline",
|
|
4831
|
+
startX: Gi,
|
|
4832
|
+
endX: Ki,
|
|
4833
|
+
formattedStartX: Yi,
|
|
4834
|
+
formattedEndX: Xi,
|
|
4835
|
+
elapsed: Math.abs(Ki - Gi),
|
|
4836
|
+
phase: Zi,
|
|
4837
|
+
focused: Qi,
|
|
4838
|
+
series: Ji
|
|
4839
4839
|
}, [
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
qi,
|
|
4843
|
-
Ji,
|
|
4840
|
+
Gi,
|
|
4841
|
+
Ki,
|
|
4844
4842
|
Yi,
|
|
4845
4843
|
Xi,
|
|
4846
|
-
|
|
4844
|
+
Zi,
|
|
4845
|
+
Qi,
|
|
4846
|
+
Ji,
|
|
4847
4847
|
X,
|
|
4848
|
-
|
|
4849
|
-
]),
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
}, [
|
|
4853
|
-
let
|
|
4854
|
-
|
|
4848
|
+
Xt.percentage
|
|
4849
|
+
]), ea = k(Xt.onChange);
|
|
4850
|
+
ea.current = Xt.onChange, T(() => {
|
|
4851
|
+
ea.current?.($i);
|
|
4852
|
+
}, [$i]);
|
|
4853
|
+
let ta = O(() => $i ? {
|
|
4854
|
+
...$i,
|
|
4855
4855
|
motion: U ? "none" : "auto",
|
|
4856
4856
|
clear: () => {
|
|
4857
|
-
|
|
4857
|
+
$i.phase === "preview" ? si() : oi(), Pe.current?.focus({ preventScroll: !0 });
|
|
4858
4858
|
},
|
|
4859
|
-
focus:
|
|
4860
|
-
startX:
|
|
4861
|
-
endX:
|
|
4859
|
+
focus: $i.phase === "complete" && en && !$i.focused ? () => ai({
|
|
4860
|
+
startX: $i.startX,
|
|
4861
|
+
endX: $i.endX
|
|
4862
4862
|
}) : void 0,
|
|
4863
|
-
fullRange:
|
|
4863
|
+
fullRange: $i.phase === "complete" && $i.focused ? () => ai(null) : void 0
|
|
4864
4864
|
} : null, [
|
|
4865
|
-
|
|
4865
|
+
$i,
|
|
4866
4866
|
U,
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
]),
|
|
4872
|
-
if (!Q.current?.pinned ||
|
|
4867
|
+
si,
|
|
4868
|
+
oi,
|
|
4869
|
+
en,
|
|
4870
|
+
ai
|
|
4871
|
+
]), na = () => {
|
|
4872
|
+
if (!Q.current?.pinned || !$t) return;
|
|
4873
4873
|
let e = Q.current.x;
|
|
4874
|
-
|
|
4874
|
+
kn({
|
|
4875
4875
|
baselineX: e,
|
|
4876
4876
|
probeX: e
|
|
4877
|
-
}),
|
|
4878
|
-
}, ta = (e, t) => {
|
|
4879
|
-
t.button === 0 && Y && (t.preventDefault(), t.stopPropagation(), t.currentTarget.focus(), Xr(e, t.pointerId), t.currentTarget.setPointerCapture(t.pointerId));
|
|
4880
|
-
}, na = (e, t) => {
|
|
4881
|
-
if (jn.current?.pointerId !== t.pointerId) return;
|
|
4882
|
-
let n = Vr(t.nativeEvent, !0);
|
|
4883
|
-
n !== null && Zr(e, n);
|
|
4877
|
+
}), Tn(null), Dn(null);
|
|
4884
4878
|
}, ra = (e, t) => {
|
|
4885
|
-
|
|
4886
|
-
let n = Vr(t.nativeEvent, !0);
|
|
4887
|
-
n !== null && Zr(e, n), Qr();
|
|
4879
|
+
t.button === 0 && Y && (t.preventDefault(), t.stopPropagation(), t.currentTarget.focus(), Qr(e, t.pointerId), t.currentTarget.setPointerCapture(t.pointerId));
|
|
4888
4880
|
}, ia = (e, t) => {
|
|
4881
|
+
if (Nn.current?.pointerId !== t.pointerId) return;
|
|
4882
|
+
let n = Ur(t.nativeEvent, !0);
|
|
4883
|
+
n !== null && $r(e, n);
|
|
4884
|
+
}, aa = (e, t) => {
|
|
4885
|
+
if (Nn.current?.pointerId !== t.pointerId) return;
|
|
4886
|
+
let n = Ur(t.nativeEvent, !0);
|
|
4887
|
+
n !== null && $r(e, n), ei();
|
|
4888
|
+
}, oa = (e, t) => {
|
|
4889
4889
|
if (t.key === "Escape") {
|
|
4890
|
-
if (!
|
|
4891
|
-
t.preventDefault(), t.stopPropagation(),
|
|
4890
|
+
if (!Nn.current) return;
|
|
4891
|
+
t.preventDefault(), t.stopPropagation(), Zr();
|
|
4892
4892
|
return;
|
|
4893
4893
|
}
|
|
4894
4894
|
if (t.key === "Enter") {
|
|
4895
|
-
t.preventDefault(), t.stopPropagation(),
|
|
4895
|
+
t.preventDefault(), t.stopPropagation(), ei();
|
|
4896
4896
|
return;
|
|
4897
4897
|
}
|
|
4898
4898
|
let n = X?.rows;
|
|
4899
4899
|
if (!n || !Y) return;
|
|
4900
|
-
let r =
|
|
4900
|
+
let r = Nn.current?.draft ?? Y, i = n.findIndex((t) => t.x === r[e === "start" ? "startX" : "endX"]), a = n.findIndex((t) => t.x === r[e === "start" ? "endX" : "startX"]);
|
|
4901
4901
|
if (i < 0 || a < 0) return;
|
|
4902
4902
|
let o = Y.startX > Y.endX, s = o ? e === "start" ? a + 1 : 0 : e === "start" ? 0 : a + 1, c = o ? e === "start" ? n.length - 1 : a - 1 : e === "start" ? a - 1 : n.length - 1, l;
|
|
4903
4903
|
switch (t.key) {
|
|
@@ -4923,8 +4923,8 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4923
4923
|
break;
|
|
4924
4924
|
default: return;
|
|
4925
4925
|
}
|
|
4926
|
-
t.preventDefault(), t.stopPropagation(),
|
|
4927
|
-
},
|
|
4926
|
+
t.preventDefault(), t.stopPropagation(), Nn.current || Qr(e), $r(e, l);
|
|
4927
|
+
}, sa = J ? "Arrow keys choose the second point. Enter compares. Escape keeps the pin." : `Left and Right inspect.${ve === "nearest" && q.length > 1 ? " Up and Down switch series." : ""} ${$t ? "Enter marks a range. " : ""}Escape clears.`, ca = b && Z && !Li && !($t && Y) ? /* @__PURE__ */ N("label", {
|
|
4928
4928
|
className: "lilt-chart__keyboard-input",
|
|
4929
4929
|
children: [
|
|
4930
4930
|
/* @__PURE__ */ M("span", {
|
|
@@ -4933,52 +4933,55 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4933
4933
|
}),
|
|
4934
4934
|
/* @__PURE__ */ M("input", {
|
|
4935
4935
|
"aria-label": "Select an observation",
|
|
4936
|
-
"aria-valuetext":
|
|
4937
|
-
max:
|
|
4938
|
-
min:
|
|
4936
|
+
"aria-valuetext": Bi,
|
|
4937
|
+
max: Ni,
|
|
4938
|
+
min: Mi,
|
|
4939
4939
|
onChange: (e) => {
|
|
4940
4940
|
let t = Number(e.currentTarget.value), n = Z.data.rows[t]?.x;
|
|
4941
|
-
J && n !== void 0 ?
|
|
4941
|
+
J && n !== void 0 ? kn({
|
|
4942
4942
|
...J,
|
|
4943
4943
|
probeX: n
|
|
4944
|
-
}) :
|
|
4944
|
+
}) : Hr(t, !0, !1, xr.current);
|
|
4945
4945
|
},
|
|
4946
|
-
onFocus: () =>
|
|
4946
|
+
onFocus: (e) => {
|
|
4947
|
+
_t(e.currentTarget.matches(":focus-visible")), Hr(Fi, yr?.pinned ?? !1);
|
|
4948
|
+
},
|
|
4949
|
+
onBlur: () => _t(!1),
|
|
4947
4950
|
onKeyDown: (e) => {
|
|
4948
|
-
if (e.key === "Escape" && (e.preventDefault(),
|
|
4949
|
-
let t =
|
|
4951
|
+
if (_t(!0), e.key === "Escape" && (e.preventDefault(), si()), (e.key === "ArrowUp" || e.key === "ArrowDown") && ve === "nearest" && q.length > 1 && !J) {
|
|
4952
|
+
let t = Wr(Number(e.currentTarget.value));
|
|
4950
4953
|
if (t.length > 1) {
|
|
4951
4954
|
e.preventDefault();
|
|
4952
|
-
let n = t.findIndex((e) => e.id ===
|
|
4953
|
-
|
|
4955
|
+
let n = t.findIndex((e) => e.id === Cn), r = e.key === "ArrowUp" ? -1 : 1, i = Math.min(t.length - 1, Math.max(0, (n < 0 ? 0 : n) + r));
|
|
4956
|
+
_n(t[i].id);
|
|
4954
4957
|
return;
|
|
4955
4958
|
}
|
|
4956
4959
|
}
|
|
4957
|
-
if (e.key === "Enter" && !(
|
|
4958
|
-
e.preventDefault(),
|
|
4960
|
+
if (e.key === "Enter" && !($t && Ii)) {
|
|
4961
|
+
e.preventDefault(), Hr(Number(e.currentTarget.value), !0, !1, e.altKey);
|
|
4959
4962
|
return;
|
|
4960
4963
|
}
|
|
4961
|
-
if (
|
|
4964
|
+
if ($t && Ii && e.key === "Enter") {
|
|
4962
4965
|
e.preventDefault();
|
|
4963
4966
|
let t = Z.data.rows[Number(e.currentTarget.value)]?.x;
|
|
4964
4967
|
if (t === void 0) return;
|
|
4965
4968
|
if (J) {
|
|
4966
|
-
t !== J.baselineX && (
|
|
4969
|
+
t !== J.baselineX && (On.current = !0, ni(J.baselineX, t, !0));
|
|
4967
4970
|
return;
|
|
4968
4971
|
}
|
|
4969
|
-
|
|
4972
|
+
ri(t);
|
|
4970
4973
|
}
|
|
4971
4974
|
},
|
|
4972
4975
|
type: "range",
|
|
4973
|
-
value: J ? Math.max(
|
|
4976
|
+
value: J ? Math.max(Mi, Z.data.rows.findIndex((e) => e.x === J.probeX)) : Fi
|
|
4974
4977
|
}),
|
|
4975
|
-
/* @__PURE__ */ M("small", { children:
|
|
4978
|
+
/* @__PURE__ */ M("small", { children: sa })
|
|
4976
4979
|
]
|
|
4977
|
-
}) : null,
|
|
4978
|
-
range:
|
|
4979
|
-
series:
|
|
4980
|
-
snapshot:
|
|
4981
|
-
} : null,
|
|
4980
|
+
}) : null, la = en && !de && Hn && _r && Zt.overview !== !1 && Jr ? {
|
|
4981
|
+
range: Hn,
|
|
4982
|
+
series: Jr,
|
|
4983
|
+
snapshot: _r
|
|
4984
|
+
} : null, ua = (ta?.phase === "complete" ? Z?.data.rows.find((e) => e.x === ta.endX) : void 0) ?? (Pi ? Z?.data.rows.find((e) => e.sourceIndex === Pi.sourceIndex) : ji), da = O(() => (ki ?? []).map((e) => ({
|
|
4982
4985
|
id: e.categoryId ?? String(e.x),
|
|
4983
4986
|
x: e.x,
|
|
4984
4987
|
row: e.datum,
|
|
@@ -4991,10 +4994,10 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
4991
4994
|
})),
|
|
4992
4995
|
statuses: e.statuses
|
|
4993
4996
|
})), [
|
|
4994
|
-
|
|
4997
|
+
ki,
|
|
4995
4998
|
i,
|
|
4996
4999
|
Z
|
|
4997
|
-
]),
|
|
5000
|
+
]), fa = {
|
|
4998
5001
|
series: i.map((e, t) => {
|
|
4999
5002
|
let n = !!c.stack?.series.includes(e.id), r = c.bars?.includes(e.id) ? "bar" : n || !c.bars && e.area ? "area" : "line";
|
|
5000
5003
|
return {
|
|
@@ -5004,144 +5007,144 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
5004
5007
|
kind: r,
|
|
5005
5008
|
treatment: r === "area" ? e.area?.treatment ?? (n ? "solid" : "fade") : r === "bar" ? e.bar?.treatment ?? "solid" : "solid",
|
|
5006
5009
|
dasharray: e.line?.dasharray,
|
|
5007
|
-
visible:
|
|
5008
|
-
value:
|
|
5010
|
+
visible: dn.includes(e.id),
|
|
5011
|
+
value: ua?.values[e.id] ?? null,
|
|
5009
5012
|
formattedValue: (() => {
|
|
5010
|
-
let t =
|
|
5013
|
+
let t = ua?.values[e.id];
|
|
5011
5014
|
return t == null ? "No data" : e.formatValue?.(t) ?? Z?.formatValue(t) ?? String(t);
|
|
5012
5015
|
})(),
|
|
5013
|
-
status:
|
|
5016
|
+
status: ua?.statuses[e.id] ?? "observed"
|
|
5014
5017
|
};
|
|
5015
5018
|
}),
|
|
5016
5019
|
reducedMotion: U,
|
|
5017
|
-
comparison:
|
|
5018
|
-
observations:
|
|
5019
|
-
inspectedX:
|
|
5020
|
-
pinnedX:
|
|
5020
|
+
comparison: ta,
|
|
5021
|
+
observations: da,
|
|
5022
|
+
inspectedX: Pi?.x ?? null,
|
|
5023
|
+
pinnedX: Pi?.pinned ? Pi.x : null,
|
|
5021
5024
|
onInspect: (e, t) => {
|
|
5022
5025
|
let n = Z?.data.rows.findIndex((t) => t.x === e) ?? -1;
|
|
5023
|
-
n >= 0 &&
|
|
5026
|
+
n >= 0 && Hr(n, t);
|
|
5024
5027
|
},
|
|
5025
5028
|
onClearInspect: () => {
|
|
5026
|
-
Q.current?.pinned ||
|
|
5029
|
+
Q.current?.pinned || Ar();
|
|
5027
5030
|
},
|
|
5028
|
-
onReleaseInspect:
|
|
5031
|
+
onReleaseInspect: Ar,
|
|
5029
5032
|
onFocus: (e) => {
|
|
5030
|
-
|
|
5033
|
+
bn(e), e && !Q.current?.pinned && !Q.current && ji && Z && Hr(Br(Z, ji.sourceIndex), !1), !e && !Q.current?.pinned && Ar();
|
|
5031
5034
|
},
|
|
5032
|
-
onVisibleChange:
|
|
5033
|
-
isolatedId:
|
|
5034
|
-
onIsolate:
|
|
5035
|
-
onRestore:
|
|
5036
|
-
onShowAll:
|
|
5035
|
+
onVisibleChange: fi,
|
|
5036
|
+
isolatedId: fn?.id ?? null,
|
|
5037
|
+
onIsolate: pi,
|
|
5038
|
+
onRestore: mi,
|
|
5039
|
+
onShowAll: hi
|
|
5037
5040
|
};
|
|
5038
5041
|
return D(() => {
|
|
5039
5042
|
if (!L || !Z || !L.getAcceptedFrame()) return;
|
|
5040
|
-
let e =
|
|
5043
|
+
let e = Pi && Z ? Z.data.rows.find((e) => e.sourceIndex === Pi.sourceIndex && e.x === Pi.x) : void 0;
|
|
5041
5044
|
Ze(L, {
|
|
5042
|
-
inspection: e && Z ? Gn(Z, e, q,
|
|
5043
|
-
comparison:
|
|
5044
|
-
visibleSeries:
|
|
5045
|
-
legend:
|
|
5045
|
+
inspection: e && Z ? Gn(Z, e, q, Pi.pinned, q.length > 1 ? Cn ?? null : null) : null,
|
|
5046
|
+
comparison: ta,
|
|
5047
|
+
visibleSeries: dn,
|
|
5048
|
+
legend: fa.series
|
|
5046
5049
|
}, {
|
|
5047
5050
|
inspect: (e) => {
|
|
5048
5051
|
let t = Z?.data.rows.findIndex((t) => t.x === e) ?? -1;
|
|
5049
5052
|
if (t >= 0) {
|
|
5050
|
-
|
|
5053
|
+
Er.current = !0;
|
|
5051
5054
|
try {
|
|
5052
|
-
|
|
5055
|
+
Hr(t, !1);
|
|
5053
5056
|
} finally {
|
|
5054
|
-
|
|
5057
|
+
Er.current = !1;
|
|
5055
5058
|
}
|
|
5056
5059
|
}
|
|
5057
5060
|
},
|
|
5058
5061
|
clearInspection: () => {
|
|
5059
5062
|
if (!Q.current?.pinned) {
|
|
5060
|
-
|
|
5063
|
+
Er.current = !0;
|
|
5061
5064
|
try {
|
|
5062
|
-
|
|
5065
|
+
Ar();
|
|
5063
5066
|
} finally {
|
|
5064
|
-
|
|
5067
|
+
Er.current = !1;
|
|
5065
5068
|
}
|
|
5066
5069
|
}
|
|
5067
5070
|
},
|
|
5068
5071
|
pin: (e, t) => {
|
|
5069
5072
|
let n = Z?.data.rows.findIndex((t) => t.x === e) ?? -1;
|
|
5070
5073
|
if (n >= 0) {
|
|
5071
|
-
|
|
5074
|
+
Er.current = !0;
|
|
5072
5075
|
try {
|
|
5073
|
-
|
|
5076
|
+
Hr(n, !0, !1, !!t?.local);
|
|
5074
5077
|
} finally {
|
|
5075
|
-
|
|
5078
|
+
Er.current = !1;
|
|
5076
5079
|
}
|
|
5077
5080
|
}
|
|
5078
5081
|
},
|
|
5079
5082
|
release: () => {
|
|
5080
|
-
|
|
5083
|
+
Er.current = !0;
|
|
5081
5084
|
try {
|
|
5082
|
-
|
|
5085
|
+
Ar();
|
|
5083
5086
|
} finally {
|
|
5084
|
-
|
|
5087
|
+
Er.current = !1;
|
|
5085
5088
|
}
|
|
5086
5089
|
},
|
|
5087
|
-
setVisibleSeries:
|
|
5088
|
-
focusSeries:
|
|
5090
|
+
setVisibleSeries: fi,
|
|
5091
|
+
focusSeries: fa.onFocus,
|
|
5089
5092
|
compare: (e) => {
|
|
5090
|
-
|
|
5093
|
+
Er.current = !0;
|
|
5091
5094
|
try {
|
|
5092
|
-
|
|
5095
|
+
Xr(e);
|
|
5093
5096
|
} finally {
|
|
5094
|
-
|
|
5097
|
+
Er.current = !1;
|
|
5095
5098
|
}
|
|
5096
5099
|
},
|
|
5097
5100
|
clearComparison: () => {
|
|
5098
|
-
|
|
5101
|
+
Er.current = !0;
|
|
5099
5102
|
try {
|
|
5100
|
-
|
|
5103
|
+
ta?.clear?.();
|
|
5101
5104
|
} finally {
|
|
5102
|
-
|
|
5105
|
+
Er.current = !1;
|
|
5103
5106
|
}
|
|
5104
5107
|
},
|
|
5105
|
-
focusComparison:
|
|
5106
|
-
fullRange:
|
|
5108
|
+
focusComparison: ta?.focus ?? (() => void 0),
|
|
5109
|
+
fullRange: ta?.fullRange ?? (() => void 0)
|
|
5107
5110
|
});
|
|
5108
5111
|
}), T(() => () => {
|
|
5109
5112
|
L && Qe(L);
|
|
5110
5113
|
}, [L]), D(() => {
|
|
5111
5114
|
me.publish({
|
|
5112
|
-
comparison:
|
|
5113
|
-
toolbar: b &&
|
|
5114
|
-
label:
|
|
5115
|
-
pressed: !!(J ||
|
|
5115
|
+
comparison: ta,
|
|
5116
|
+
toolbar: b && $t && Ii && Z && !Li ? {
|
|
5117
|
+
label: Yr ? "Clear comparison" : J || wn !== null ? "Cancel comparison" : q.length > 1 ? "Compare range" : `Compare ${Ii.label}`,
|
|
5118
|
+
pressed: !!(J || wn !== null),
|
|
5116
5119
|
onClick: () => {
|
|
5117
|
-
if (
|
|
5118
|
-
|
|
5120
|
+
if (Yr) {
|
|
5121
|
+
oi();
|
|
5119
5122
|
return;
|
|
5120
5123
|
}
|
|
5121
|
-
if (J ||
|
|
5122
|
-
|
|
5124
|
+
if (J || wn !== null) {
|
|
5125
|
+
si();
|
|
5123
5126
|
return;
|
|
5124
5127
|
}
|
|
5125
|
-
let e = Q.current ? Z.data.rows.findIndex((e) => e.x === Q.current.x) :
|
|
5126
|
-
t && (
|
|
5128
|
+
let e = Q.current ? Z.data.rows.findIndex((e) => e.x === Q.current.x) : Mi, t = Z.data.rows[Math.max(Mi, e)];
|
|
5129
|
+
t && (Hr(Math.max(Mi, e), !0), kn({
|
|
5127
5130
|
baselineX: t.x,
|
|
5128
5131
|
probeX: t.x
|
|
5129
5132
|
}), requestAnimationFrame(() => Pe.current?.querySelector("input[type=\"range\"]")?.focus()));
|
|
5130
5133
|
}
|
|
5131
5134
|
} : null,
|
|
5132
|
-
readout: qe ||
|
|
5133
|
-
overview:
|
|
5134
|
-
...
|
|
5135
|
-
snapshot:
|
|
5135
|
+
readout: qe || Hi || Wi ? null : Bi,
|
|
5136
|
+
overview: la ? {
|
|
5137
|
+
...la,
|
|
5138
|
+
snapshot: la.snapshot
|
|
5136
5139
|
} : null,
|
|
5137
|
-
brush: de &&
|
|
5138
|
-
snapshot:
|
|
5139
|
-
range:
|
|
5140
|
+
brush: de && _r && _r.data.rows.length > 1 && q[0] ? {
|
|
5141
|
+
snapshot: _r,
|
|
5142
|
+
range: Hn,
|
|
5140
5143
|
seriesId: q[0].id,
|
|
5141
5144
|
reducedMotion: U,
|
|
5142
|
-
onFocus:
|
|
5145
|
+
onFocus: ai
|
|
5143
5146
|
} : null,
|
|
5144
|
-
legend:
|
|
5147
|
+
legend: fa
|
|
5145
5148
|
});
|
|
5146
5149
|
}), /* @__PURE__ */ M(it.Provider, {
|
|
5147
5150
|
value: Ne,
|
|
@@ -5151,18 +5154,18 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
5151
5154
|
"data-lilt-axis-x": De.x,
|
|
5152
5155
|
"data-lilt-axis-y": De.y,
|
|
5153
5156
|
"data-lilt-pill": Te,
|
|
5154
|
-
className:
|
|
5155
|
-
"data-lilt-focused":
|
|
5156
|
-
"data-lilt-inspecting": b &&
|
|
5157
|
-
"data-lilt-live":
|
|
5158
|
-
"data-lilt-phase":
|
|
5157
|
+
className: gi,
|
|
5158
|
+
"data-lilt-focused": Hn ? "true" : void 0,
|
|
5159
|
+
"data-lilt-inspecting": b && yr ? "true" : "false",
|
|
5160
|
+
"data-lilt-live": tn ? Un ? "following" : "paused" : void 0,
|
|
5161
|
+
"data-lilt-phase": Ct,
|
|
5159
5162
|
"data-lilt-bars": c.bars ? "true" : void 0,
|
|
5160
5163
|
"data-lilt-stack": c.stack?.mode,
|
|
5161
5164
|
"data-lilt-compact": d || void 0,
|
|
5162
|
-
"data-lilt-adaptive": qe ||
|
|
5165
|
+
"data-lilt-adaptive": qe || Hi ? "true" : void 0,
|
|
5163
5166
|
"data-lilt-fill": We ? "true" : void 0,
|
|
5164
5167
|
ref: Pe,
|
|
5165
|
-
style:
|
|
5168
|
+
style: _i,
|
|
5166
5169
|
tabIndex: -1,
|
|
5167
5170
|
children: [
|
|
5168
5171
|
/* @__PURE__ */ N("svg", {
|
|
@@ -5171,14 +5174,14 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
5171
5174
|
height: V.height,
|
|
5172
5175
|
tabIndex: b && d ? 0 : void 0,
|
|
5173
5176
|
onFocus: () => {
|
|
5174
|
-
d && !Q.current &&
|
|
5177
|
+
d && !Q.current && Hr(Ni, !1);
|
|
5175
5178
|
},
|
|
5176
5179
|
onBlur: () => {
|
|
5177
|
-
d &&
|
|
5180
|
+
d && Ar();
|
|
5178
5181
|
},
|
|
5179
5182
|
onKeyDown: (e) => {
|
|
5180
5183
|
if (e.key === "Escape") {
|
|
5181
|
-
e.preventDefault(),
|
|
5184
|
+
e.preventDefault(), si();
|
|
5182
5185
|
return;
|
|
5183
5186
|
}
|
|
5184
5187
|
if (!d || ![
|
|
@@ -5188,41 +5191,41 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
5188
5191
|
"End"
|
|
5189
5192
|
].includes(e.key)) return;
|
|
5190
5193
|
e.preventDefault();
|
|
5191
|
-
let t = Q.current && Z ? Br(Z, Q.current.sourceIndex) :
|
|
5192
|
-
|
|
5194
|
+
let t = Q.current && Z ? Br(Z, Q.current.sourceIndex) : Ni, n = e.key === "Home" ? Mi : e.key === "End" ? Ni : Math.min(Ni, Math.max(Mi, t + (e.key === "ArrowRight" ? 1 : -1)));
|
|
5195
|
+
Hr(n, !1);
|
|
5193
5196
|
},
|
|
5194
5197
|
onClick: (e) => {
|
|
5195
5198
|
if (!b) return;
|
|
5196
|
-
if (
|
|
5197
|
-
|
|
5199
|
+
if (Ut.current) {
|
|
5200
|
+
Ut.current = !1;
|
|
5198
5201
|
return;
|
|
5199
5202
|
}
|
|
5200
|
-
let t =
|
|
5203
|
+
let t = Ur(e.nativeEvent);
|
|
5201
5204
|
if (t === null) return;
|
|
5202
5205
|
let n = Z?.data.rows[t]?.x;
|
|
5203
5206
|
if (J && n !== void 0) {
|
|
5204
|
-
n !== J.baselineX &&
|
|
5207
|
+
n !== J.baselineX && ni(J.baselineX, n, !0);
|
|
5205
5208
|
return;
|
|
5206
5209
|
}
|
|
5207
|
-
if (
|
|
5208
|
-
|
|
5210
|
+
if ($t && Y && !Hn && en && n !== void 0 && n >= Math.min(Y.startX, Y.endX) && n <= Math.max(Y.startX, Y.endX)) {
|
|
5211
|
+
ai(Y);
|
|
5209
5212
|
return;
|
|
5210
5213
|
}
|
|
5211
|
-
if (
|
|
5212
|
-
let r = e.altKey ||
|
|
5213
|
-
Q.current?.pinned && Q.current.sourceIndex === Z?.data.rows[t]?.sourceIndex && (!e.altKey ||
|
|
5214
|
+
if ($t && Y) return;
|
|
5215
|
+
let r = e.altKey || xr.current;
|
|
5216
|
+
Q.current?.pinned && Q.current.sourceIndex === Z?.data.rows[t]?.sourceIndex && (!e.altKey || xr.current) ? Ar() : Hr(t, !0, !1, r);
|
|
5214
5217
|
},
|
|
5215
5218
|
onPointerCancel: () => {
|
|
5216
|
-
|
|
5219
|
+
Bt.current = null, Vt.current = null, Dn(null), zt.current = null;
|
|
5217
5220
|
},
|
|
5218
5221
|
onPointerEnter: Ye,
|
|
5219
5222
|
onPointerDown: (e) => {
|
|
5220
5223
|
if (!J) {
|
|
5221
|
-
if (
|
|
5222
|
-
let t =
|
|
5224
|
+
if ($t && Ii && e.button === 0) {
|
|
5225
|
+
let t = Ur(e.nativeEvent), n = t === null ? void 0 : Z?.data.rows[t]?.x;
|
|
5223
5226
|
if (t !== null && n !== void 0) {
|
|
5224
|
-
let r = e.target.closest("[data-series]")?.getAttribute("data-series"), i = q.some((e) => e.id === r) ? r :
|
|
5225
|
-
|
|
5227
|
+
let r = e.target.closest("[data-series]")?.getAttribute("data-series"), i = q.some((e) => e.id === r) ? r : Ii.id;
|
|
5228
|
+
Vt.current = {
|
|
5226
5229
|
startX: n,
|
|
5227
5230
|
startIndex: t,
|
|
5228
5231
|
series: i,
|
|
@@ -5233,54 +5236,54 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
5233
5236
|
}
|
|
5234
5237
|
return;
|
|
5235
5238
|
}
|
|
5236
|
-
e.pointerType === "touch" && (
|
|
5239
|
+
e.pointerType === "touch" && (Bt.current = {
|
|
5237
5240
|
x: e.clientX,
|
|
5238
5241
|
moved: !1
|
|
5239
5242
|
});
|
|
5240
5243
|
}
|
|
5241
5244
|
},
|
|
5242
5245
|
onPointerLeave: () => {
|
|
5243
|
-
Q.current?.pinned ||
|
|
5246
|
+
Q.current?.pinned || Ar();
|
|
5244
5247
|
},
|
|
5245
5248
|
onPointerMove: (e) => {
|
|
5246
5249
|
if (J) {
|
|
5247
|
-
e.pointerType !== "touch" &&
|
|
5250
|
+
e.pointerType !== "touch" && ti(e.nativeEvent);
|
|
5248
5251
|
return;
|
|
5249
5252
|
}
|
|
5250
|
-
if (
|
|
5251
|
-
let t =
|
|
5252
|
-
!t.moved && Math.abs(e.clientX - t.clientX) > (e.pointerType === "touch" ? 8 : 4) && (t.moved = !0,
|
|
5253
|
+
if (Vt.current?.pointerId === e.pointerId) {
|
|
5254
|
+
let t = Vt.current;
|
|
5255
|
+
!t.moved && Math.abs(e.clientX - t.clientX) > (e.pointerType === "touch" ? 8 : 4) && (t.moved = !0, Ar()), t.moved && ti(e.nativeEvent);
|
|
5253
5256
|
return;
|
|
5254
5257
|
}
|
|
5255
|
-
if (!(
|
|
5258
|
+
if (!($t && Y)) {
|
|
5256
5259
|
if (e.pointerType === "touch") {
|
|
5257
|
-
let t =
|
|
5260
|
+
let t = Bt.current;
|
|
5258
5261
|
if (!t) return;
|
|
5259
|
-
!t.moved && Math.abs(e.clientX - t.x) > 8 && (t.moved = !0, e.currentTarget.setPointerCapture?.(e.pointerId)), t.moved &&
|
|
5262
|
+
!t.moved && Math.abs(e.clientX - t.x) > 8 && (t.moved = !0, e.currentTarget.setPointerCapture?.(e.pointerId)), t.moved && Kr(e.nativeEvent);
|
|
5260
5263
|
return;
|
|
5261
5264
|
}
|
|
5262
|
-
|
|
5265
|
+
Kr(e.nativeEvent);
|
|
5263
5266
|
}
|
|
5264
5267
|
},
|
|
5265
5268
|
onPointerUp: (e) => {
|
|
5266
5269
|
if (J) {
|
|
5267
5270
|
if (e.pointerType === "touch") {
|
|
5268
|
-
let t =
|
|
5269
|
-
n !== void 0 && n !== J.baselineX &&
|
|
5271
|
+
let t = Ur(e.nativeEvent), n = t === null ? void 0 : Z?.data.rows[t]?.x;
|
|
5272
|
+
n !== void 0 && n !== J.baselineX && ni(J.baselineX, n, !0), Gt();
|
|
5270
5273
|
}
|
|
5271
5274
|
return;
|
|
5272
5275
|
}
|
|
5273
|
-
if (
|
|
5274
|
-
let t =
|
|
5275
|
-
if (
|
|
5276
|
-
let n =
|
|
5277
|
-
r !== void 0 && r !== t.startX ?
|
|
5276
|
+
if (Vt.current?.pointerId === e.pointerId) {
|
|
5277
|
+
let t = Vt.current;
|
|
5278
|
+
if (Vt.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), t.moved) {
|
|
5279
|
+
let n = Ur(e.nativeEvent, !0), r = n === null ? void 0 : Z?.data.rows[n]?.x;
|
|
5280
|
+
r !== void 0 && r !== t.startX ? ni(t.startX, r, !1, t.series) : Hr(t.startIndex, !0), Dn(null), Gt();
|
|
5278
5281
|
}
|
|
5279
5282
|
return;
|
|
5280
5283
|
}
|
|
5281
5284
|
if (e.pointerType !== "touch") return;
|
|
5282
|
-
let t =
|
|
5283
|
-
t !== null && (
|
|
5285
|
+
let t = Ur(e.nativeEvent);
|
|
5286
|
+
t !== null && (Hr(t, !0, !1, xr.current), Gt()), Bt.current = null;
|
|
5284
5287
|
},
|
|
5285
5288
|
ref: Le,
|
|
5286
5289
|
style: { touchAction: "pan-y pinch-zoom" },
|
|
@@ -5300,8 +5303,8 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
5300
5303
|
/* @__PURE__ */ N("linearGradient", {
|
|
5301
5304
|
id: `${et}-edge`,
|
|
5302
5305
|
gradientUnits: "userSpaceOnUse",
|
|
5303
|
-
x1:
|
|
5304
|
-
x2:
|
|
5306
|
+
x1: wi.start,
|
|
5307
|
+
x2: wi.end,
|
|
5305
5308
|
y1: 0,
|
|
5306
5309
|
y2: 0,
|
|
5307
5310
|
children: [/* @__PURE__ */ M("stop", {
|
|
@@ -5323,7 +5326,7 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
5323
5326
|
children: /* @__PURE__ */ M("rect", {
|
|
5324
5327
|
width: V.width,
|
|
5325
5328
|
height: V.height,
|
|
5326
|
-
fill:
|
|
5329
|
+
fill: Si ? `url(#${et}-edge)` : "white"
|
|
5327
5330
|
})
|
|
5328
5331
|
}),
|
|
5329
5332
|
/* @__PURE__ */ N("linearGradient", {
|
|
@@ -5363,26 +5366,26 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
5363
5366
|
chartId: G,
|
|
5364
5367
|
series: i
|
|
5365
5368
|
})
|
|
5366
|
-
] }),
|
|
5369
|
+
] }), Ei && Ti && Z ? /* @__PURE__ */ N(j, { children: [Oi(Ti, null, `old-${vt?.id ?? 0}`, 0, 1), Oi(Z, lr, `new-${vt?.id ?? 0}`, 1, 0)] }) : Z ? /* @__PURE__ */ M("g", { children: Oi(Z, lr ?? Jn, "current") }) : null]
|
|
5367
5370
|
}),
|
|
5368
|
-
|
|
5369
|
-
|
|
5371
|
+
ca,
|
|
5372
|
+
Tt ? /* @__PURE__ */ M("div", {
|
|
5370
5373
|
className: "lilt-chart__skeleton-host",
|
|
5371
|
-
"data-skeleton-leaving":
|
|
5374
|
+
"data-skeleton-leaving": kt ? "bottom" : void 0,
|
|
5372
5375
|
style: { transformOrigin: `50% ${Math.max(0, V.height - H.bottom)}px` },
|
|
5373
|
-
children:
|
|
5376
|
+
children: Ci
|
|
5374
5377
|
}) : null,
|
|
5375
|
-
Z &&
|
|
5378
|
+
Z && yr && !Ui && !J && !Yr ? /* @__PURE__ */ M(ir, {
|
|
5376
5379
|
paintId: nt,
|
|
5377
5380
|
seriesColors: Object.fromEntries(i.map((e, t) => [e.id, ze(e, t)])),
|
|
5378
5381
|
crossGradientId: at,
|
|
5379
5382
|
height: V.height,
|
|
5380
5383
|
highlightMaskId: rt,
|
|
5381
|
-
inspectionSeries:
|
|
5384
|
+
inspectionSeries: Cn,
|
|
5382
5385
|
stackedPill: ve === "total" ? "total" : ye,
|
|
5383
5386
|
reducedMotion: U,
|
|
5384
|
-
selection:
|
|
5385
|
-
onCompareFromHere:
|
|
5387
|
+
selection: yr,
|
|
5388
|
+
onCompareFromHere: yr?.pinned && $t && !J ? na : void 0,
|
|
5386
5389
|
series: q,
|
|
5387
5390
|
marks: l,
|
|
5388
5391
|
snapshot: Z,
|
|
@@ -5391,61 +5394,62 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
5391
5394
|
inlineOnly: !0,
|
|
5392
5395
|
hideAxisBadges: Je || _e === !1,
|
|
5393
5396
|
panel: !!f && !d,
|
|
5394
|
-
peer:
|
|
5397
|
+
peer: Hi && !Vi
|
|
5395
5398
|
}) : null,
|
|
5396
|
-
/* @__PURE__ */ M(te, { children: Z &&
|
|
5397
|
-
left: Z.xToPixel(
|
|
5399
|
+
/* @__PURE__ */ M(te, { children: Z && Pi?.pinned && !d && (!Hi || Vi) && !J && !Yr ? /* @__PURE__ */ M(ur, {
|
|
5400
|
+
left: Z.xToPixel(Pi.x) - 12,
|
|
5398
5401
|
top: Math.max(0, Z.plot.top - 24 - 4),
|
|
5399
5402
|
reducedMotion: U,
|
|
5400
|
-
ghost:
|
|
5401
|
-
from:
|
|
5402
|
-
local: !
|
|
5403
|
-
onRelease:
|
|
5403
|
+
ghost: Vi,
|
|
5404
|
+
from: Vi ? Yt.inspection?.from : void 0,
|
|
5405
|
+
local: !Vi && xr.current,
|
|
5406
|
+
onRelease: Ar
|
|
5404
5407
|
}, "pin") : null }),
|
|
5405
|
-
Z &&
|
|
5406
|
-
comparison:
|
|
5407
|
-
rows:
|
|
5408
|
-
preview: !(!
|
|
5408
|
+
Z && Wi ? /* @__PURE__ */ M(or, {
|
|
5409
|
+
comparison: Wi,
|
|
5410
|
+
rows: Ji,
|
|
5411
|
+
preview: !(!Ui || jn),
|
|
5409
5412
|
reducedMotion: U,
|
|
5410
5413
|
snapshot: Z,
|
|
5411
|
-
onEndpointPointerDown:
|
|
5412
|
-
onEndpointPointerMove:
|
|
5413
|
-
onEndpointPointerUp:
|
|
5414
|
-
onEndpointCancel:
|
|
5415
|
-
onEndpointCommit:
|
|
5416
|
-
onEndpointKeyDown:
|
|
5414
|
+
onEndpointPointerDown: ra,
|
|
5415
|
+
onEndpointPointerMove: ia,
|
|
5416
|
+
onEndpointPointerUp: aa,
|
|
5417
|
+
onEndpointCancel: Zr,
|
|
5418
|
+
onEndpointCommit: ei,
|
|
5419
|
+
onEndpointKeyDown: oa
|
|
5417
5420
|
}) : null,
|
|
5418
5421
|
f ? /* @__PURE__ */ M(cr, {
|
|
5419
5422
|
value: {
|
|
5420
|
-
inspection: Z &&
|
|
5421
|
-
let e = Z.data.rows.find((e) => e.sourceIndex ===
|
|
5422
|
-
return e ? Gn(Z, e, q,
|
|
5423
|
+
inspection: Z && Pi && !Wi ? (() => {
|
|
5424
|
+
let e = Z.data.rows.find((e) => e.sourceIndex === Pi.sourceIndex && e.x === Pi.x);
|
|
5425
|
+
return e ? Gn(Z, e, q, Pi.pinned, q.length > 1 ? Cn ?? null : null) : null;
|
|
5423
5426
|
})() : null,
|
|
5424
|
-
comparison:
|
|
5427
|
+
comparison: ta,
|
|
5425
5428
|
colors: Object.fromEntries(i.map((e, t) => [e.id, ze(e, t)])),
|
|
5426
|
-
x: Z &&
|
|
5427
|
-
compareStartX: Z &&
|
|
5428
|
-
compareEndX: Z &&
|
|
5429
|
+
x: Z && Pi ? Z.xToPixel(Pi.x) : 0,
|
|
5430
|
+
compareStartX: Z && ta ? Z.xToPixel(ta.startX) : 0,
|
|
5431
|
+
compareEndX: Z && ta ? Z.xToPixel(ta.endX) : 0,
|
|
5429
5432
|
top: Z?.plot.top ?? 0,
|
|
5430
5433
|
width: V.width,
|
|
5431
5434
|
height: V.height,
|
|
5432
5435
|
reducedMotion: U,
|
|
5433
5436
|
compact: d,
|
|
5434
5437
|
narrow: qe,
|
|
5435
|
-
peer:
|
|
5436
|
-
|
|
5438
|
+
peer: Hi,
|
|
5439
|
+
keyboardHint: gt && ca ? sa : null,
|
|
5440
|
+
adaptive: Z && !Wi ? {
|
|
5437
5441
|
snapshot: Z,
|
|
5438
5442
|
series: q,
|
|
5439
|
-
selection:
|
|
5440
|
-
sharedX:
|
|
5441
|
-
peer:
|
|
5442
|
-
pinned: !(!
|
|
5443
|
+
selection: Pi,
|
|
5444
|
+
sharedX: Yt.inspection?.x,
|
|
5445
|
+
peer: Hi,
|
|
5446
|
+
pinned: !(!yr?.pinned || J),
|
|
5443
5447
|
reducedMotion: U,
|
|
5444
|
-
onRelease:
|
|
5445
|
-
onCompareFromHere:
|
|
5448
|
+
onRelease: Ar,
|
|
5449
|
+
onCompareFromHere: yr?.pinned && $t && !J ? na : void 0
|
|
5446
5450
|
} : null,
|
|
5447
|
-
onRelease:
|
|
5448
|
-
onCompareFromHere:
|
|
5451
|
+
onRelease: Ar,
|
|
5452
|
+
onCompareFromHere: yr?.pinned && $t && !J ? na : void 0
|
|
5449
5453
|
},
|
|
5450
5454
|
children: f
|
|
5451
5455
|
}) : null,
|
|
@@ -5454,27 +5458,27 @@ function Vr({ data: e, x: n, y: r = wr, series: i, height: a = 340, compactHeigh
|
|
|
5454
5458
|
role: "status",
|
|
5455
5459
|
children: "Updating"
|
|
5456
5460
|
}) : null,
|
|
5457
|
-
|
|
5461
|
+
yi ? /* @__PURE__ */ M(Ln, {
|
|
5458
5462
|
kind: "empty",
|
|
5459
|
-
message:
|
|
5463
|
+
message: vi ? "No values for this period" : "No data for this period"
|
|
5460
5464
|
}) : null,
|
|
5461
|
-
|
|
5465
|
+
Li ? /* @__PURE__ */ M(Ln, {
|
|
5462
5466
|
kind: "empty",
|
|
5463
5467
|
message: "No series selected"
|
|
5464
5468
|
}) : null,
|
|
5465
|
-
|
|
5469
|
+
$ ? /* @__PURE__ */ M(Ln, {
|
|
5466
5470
|
kind: pt ? "refresh-error" : "error",
|
|
5467
|
-
message:
|
|
5471
|
+
message: $,
|
|
5468
5472
|
retry: S
|
|
5469
5473
|
}) : null,
|
|
5470
|
-
|
|
5474
|
+
tn && !Un ? /* @__PURE__ */ N("button", {
|
|
5471
5475
|
className: "lilt-chart__live-control",
|
|
5472
|
-
onClick:
|
|
5476
|
+
onClick: ci,
|
|
5473
5477
|
type: "button",
|
|
5474
|
-
children: [
|
|
5475
|
-
}) :
|
|
5478
|
+
children: [ui > 0 ? `${ui} new ${ui === 1 ? "point" : "points"} · ` : "", Qt.returnLabel ?? "Return to live"]
|
|
5479
|
+
}) : tn && li !== void 0 ? /* @__PURE__ */ M("span", {
|
|
5476
5480
|
className: "lilt-chart__live-badge",
|
|
5477
|
-
children:
|
|
5481
|
+
children: Qt.label ?? "Live"
|
|
5478
5482
|
}) : null
|
|
5479
5483
|
]
|
|
5480
5484
|
})
|
|
@@ -5740,10 +5744,12 @@ function qr({ snapshot: e, series: t, selection: n, sharedX: r, peer: i, pinned:
|
|
|
5740
5744
|
//#endregion
|
|
5741
5745
|
//#region src/interaction/tooltip.tsx
|
|
5742
5746
|
function Jr(e = {}) {
|
|
5743
|
-
let t = lr(), n = Oe(), r = k(null), [i, a] = A(0);
|
|
5747
|
+
let t = lr(), n = Oe(), r = k(null), [i, a] = A(0), o = k(null), [s, c] = A(0);
|
|
5744
5748
|
if (D(() => {
|
|
5745
5749
|
let e = r.current;
|
|
5746
5750
|
e && e.offsetWidth !== i && a(e.offsetWidth);
|
|
5751
|
+
let t = o.current?.offsetHeight ?? 0;
|
|
5752
|
+
t !== s && c(t);
|
|
5747
5753
|
}), e.model && e.model !== n.model) throw Error("Lilt Tooltip model must be the model supplied to its Chart.");
|
|
5748
5754
|
if (e.floating === !1) return null;
|
|
5749
5755
|
if (t.comparison) return e.renderComparison ? /* @__PURE__ */ M(Kr, {
|
|
@@ -5761,29 +5767,29 @@ function Jr(e = {}) {
|
|
|
5761
5767
|
...t.adaptive,
|
|
5762
5768
|
renderContent: e.renderContent
|
|
5763
5769
|
}) : null;
|
|
5764
|
-
let
|
|
5765
|
-
if (!
|
|
5766
|
-
let
|
|
5770
|
+
let l = t.inspection;
|
|
5771
|
+
if (!l) return null;
|
|
5772
|
+
let u = Math.min(236, Math.max(160, t.width - 16)), d = t.x + u + 16 <= t.width - 8 ? t.x + 16 : Math.max(8, t.x - u - 16), f = Math.max(0, Math.min(8, t.height - 160)), p = Math.max(48, t.height - f - 4), m = l.series.reduce((e, t) => e + +!!t.fields.length, 0), h = 50 + (e.renderContent ? s + 15 : l.series.length * 24 + m * 14) + (l.pinned ? 47 : 0) + (t.keyboardHint ? 56 : 0), g = e.density && e.density !== "auto" ? e.density : h > p ? "compact" : "comfortable", _ = g === "compact", v = l.series.length > 1 ? l.activeSeriesId : void 0, y = v ?? l.series[0]?.id, b = t.reducedMotion ? { duration: 0 } : {
|
|
5767
5773
|
type: "spring",
|
|
5768
5774
|
stiffness: 520,
|
|
5769
5775
|
damping: 42,
|
|
5770
5776
|
mass: .6
|
|
5771
|
-
},
|
|
5777
|
+
}, x = (e) => t.colors[e] ?? "var(--lilt-series-1)";
|
|
5772
5778
|
if (e.layout === "strip") {
|
|
5773
5779
|
let n = Math.min(Math.max(8, t.x - i / 2), Math.max(8, t.width - i - 8)), a = Math.max(0, t.top - 38);
|
|
5774
5780
|
return /* @__PURE__ */ M(P.div, {
|
|
5775
5781
|
ref: r,
|
|
5776
|
-
"aria-label": e["aria-label"] ?? `Values for ${
|
|
5782
|
+
"aria-label": e["aria-label"] ?? `Values for ${l.formattedX}`,
|
|
5777
5783
|
className: [
|
|
5778
5784
|
"lilt-chart__tooltip",
|
|
5779
5785
|
"lilt-chart__strip",
|
|
5780
5786
|
e.className
|
|
5781
5787
|
].filter(Boolean).join(" "),
|
|
5782
5788
|
"data-layout": "strip",
|
|
5783
|
-
"data-pinned":
|
|
5789
|
+
"data-pinned": l.pinned || void 0,
|
|
5784
5790
|
"data-variant": e.variant ?? "soft",
|
|
5785
5791
|
"data-indicator": e.indicator ?? "square",
|
|
5786
|
-
inert: !
|
|
5792
|
+
inert: !l.pinned,
|
|
5787
5793
|
initial: {
|
|
5788
5794
|
opacity: 0,
|
|
5789
5795
|
left: n,
|
|
@@ -5796,32 +5802,32 @@ function Jr(e = {}) {
|
|
|
5796
5802
|
},
|
|
5797
5803
|
transition: {
|
|
5798
5804
|
opacity: { duration: t.reducedMotion ? 0 : .15 },
|
|
5799
|
-
left:
|
|
5805
|
+
left: b,
|
|
5800
5806
|
top: { duration: 0 }
|
|
5801
5807
|
},
|
|
5802
5808
|
style: {
|
|
5803
5809
|
maxWidth: Math.max(1, t.width - 16),
|
|
5804
|
-
"--lilt-tooltip-series": (
|
|
5810
|
+
"--lilt-tooltip-series": (y && x(y)) ?? "var(--lilt-series-1)"
|
|
5805
5811
|
},
|
|
5806
5812
|
children: /* @__PURE__ */ N("div", {
|
|
5807
5813
|
className: "lilt-chart__tooltip-panel",
|
|
5808
5814
|
children: [
|
|
5809
5815
|
/* @__PURE__ */ M("span", {
|
|
5810
5816
|
className: "lilt-chart__strip-title",
|
|
5811
|
-
children:
|
|
5817
|
+
children: l.formattedX
|
|
5812
5818
|
}),
|
|
5813
5819
|
e.renderContent ? /* @__PURE__ */ M("span", {
|
|
5814
5820
|
className: "lilt-chart__tooltip-custom",
|
|
5815
|
-
children: e.renderContent(
|
|
5816
|
-
}) :
|
|
5821
|
+
children: e.renderContent(l)
|
|
5822
|
+
}) : l.series.map((e) => /* @__PURE__ */ N("span", {
|
|
5817
5823
|
className: "lilt-chart__strip-item",
|
|
5818
|
-
"data-active":
|
|
5819
|
-
"data-muted":
|
|
5824
|
+
"data-active": v && e.id === v || void 0,
|
|
5825
|
+
"data-muted": v && e.id !== v || void 0,
|
|
5820
5826
|
children: [
|
|
5821
5827
|
/* @__PURE__ */ M("span", {
|
|
5822
5828
|
className: "lilt-chart__tooltip-swatch",
|
|
5823
5829
|
"aria-hidden": "true",
|
|
5824
|
-
style: { backgroundColor:
|
|
5830
|
+
style: { backgroundColor: x(e.id) }
|
|
5825
5831
|
}),
|
|
5826
5832
|
/* @__PURE__ */ M("strong", { children: e.formattedValue }),
|
|
5827
5833
|
/* @__PURE__ */ M("span", {
|
|
@@ -5830,7 +5836,7 @@ function Jr(e = {}) {
|
|
|
5830
5836
|
})
|
|
5831
5837
|
]
|
|
5832
5838
|
}, e.id)),
|
|
5833
|
-
|
|
5839
|
+
l.pinned ? /* @__PURE__ */ M("button", {
|
|
5834
5840
|
type: "button",
|
|
5835
5841
|
className: "lilt-chart__strip-release",
|
|
5836
5842
|
onClick: t.onRelease,
|
|
@@ -5841,38 +5847,46 @@ function Jr(e = {}) {
|
|
|
5841
5847
|
});
|
|
5842
5848
|
}
|
|
5843
5849
|
return /* @__PURE__ */ M(P.div, {
|
|
5844
|
-
"aria-label": e["aria-label"] ?? `Values for ${
|
|
5850
|
+
"aria-label": e["aria-label"] ?? `Values for ${l.formattedX}`,
|
|
5845
5851
|
className: ["lilt-chart__tooltip", e.className].filter(Boolean).join(" "),
|
|
5846
|
-
"data-pinned":
|
|
5852
|
+
"data-pinned": l.pinned || void 0,
|
|
5847
5853
|
"data-variant": e.variant ?? "soft",
|
|
5848
5854
|
"data-indicator": e.indicator ?? "square",
|
|
5849
5855
|
"data-adaptive": e.adaptive === !1 ? "false" : void 0,
|
|
5850
|
-
|
|
5856
|
+
"data-density": g,
|
|
5857
|
+
"data-keyboard-hint": t.keyboardHint ? "" : void 0,
|
|
5858
|
+
inert: !l.pinned,
|
|
5851
5859
|
initial: {
|
|
5852
5860
|
opacity: 0,
|
|
5853
|
-
left:
|
|
5854
|
-
top:
|
|
5861
|
+
left: d,
|
|
5862
|
+
top: f
|
|
5855
5863
|
},
|
|
5856
5864
|
animate: {
|
|
5857
5865
|
opacity: 1,
|
|
5858
|
-
left:
|
|
5859
|
-
top:
|
|
5866
|
+
left: d,
|
|
5867
|
+
top: f
|
|
5860
5868
|
},
|
|
5861
5869
|
transition: {
|
|
5862
5870
|
opacity: { duration: t.reducedMotion ? 0 : .15 },
|
|
5863
|
-
left:
|
|
5864
|
-
top:
|
|
5871
|
+
left: b,
|
|
5872
|
+
top: b
|
|
5865
5873
|
},
|
|
5866
5874
|
style: {
|
|
5867
5875
|
maxWidth: Math.max(1, t.width - 16),
|
|
5868
|
-
"--lilt-tooltip-series": (
|
|
5876
|
+
"--lilt-tooltip-series": (y && t.colors[y]) ?? "var(--lilt-series-1)"
|
|
5869
5877
|
},
|
|
5870
5878
|
children: /* @__PURE__ */ N("div", {
|
|
5871
5879
|
className: "lilt-chart__tooltip-panel",
|
|
5880
|
+
style: { maxHeight: p },
|
|
5872
5881
|
children: [
|
|
5873
5882
|
/* @__PURE__ */ N("div", {
|
|
5874
5883
|
className: "lilt-chart__tooltip-title",
|
|
5875
|
-
children: [/* @__PURE__ */ M("span", { children:
|
|
5884
|
+
children: [/* @__PURE__ */ M("span", { children: l.formattedX }), l.pinned && _ ? /* @__PURE__ */ M("button", {
|
|
5885
|
+
type: "button",
|
|
5886
|
+
className: "lilt-chart__tooltip-release",
|
|
5887
|
+
onClick: t.onRelease,
|
|
5888
|
+
children: "Unpin"
|
|
5889
|
+
}) : l.pinned ? /* @__PURE__ */ N("span", {
|
|
5876
5890
|
className: "lilt-chart__tooltip-pin-status",
|
|
5877
5891
|
children: [/* @__PURE__ */ M("span", {
|
|
5878
5892
|
"aria-hidden": "true",
|
|
@@ -5894,40 +5908,48 @@ function Jr(e = {}) {
|
|
|
5894
5908
|
}),
|
|
5895
5909
|
e.renderContent ? /* @__PURE__ */ M("div", {
|
|
5896
5910
|
className: "lilt-chart__tooltip-custom",
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
"
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5911
|
+
ref: o,
|
|
5912
|
+
children: e.renderContent(l)
|
|
5913
|
+
}) : /* @__PURE__ */ M("div", {
|
|
5914
|
+
className: "lilt-chart__tooltip-rows",
|
|
5915
|
+
children: l.series.map((e) => /* @__PURE__ */ N("div", {
|
|
5916
|
+
className: "lilt-chart__tooltip-row",
|
|
5917
|
+
"data-active": v && e.id === v || void 0,
|
|
5918
|
+
"data-muted": v && e.id !== v || void 0,
|
|
5919
|
+
children: [
|
|
5920
|
+
/* @__PURE__ */ M("span", {
|
|
5921
|
+
className: "lilt-chart__tooltip-swatch",
|
|
5922
|
+
"aria-hidden": "true",
|
|
5923
|
+
style: { backgroundColor: t.colors[e.id] ?? "var(--lilt-series-1)" }
|
|
5924
|
+
}),
|
|
5925
|
+
/* @__PURE__ */ M("span", {
|
|
5926
|
+
className: "lilt-chart__tooltip-label",
|
|
5927
|
+
children: e.label
|
|
5928
|
+
}),
|
|
5929
|
+
e.status === "observed" ? null : /* @__PURE__ */ M("span", {
|
|
5930
|
+
className: "lilt-chart__tooltip-status",
|
|
5931
|
+
children: e.status
|
|
5932
|
+
}),
|
|
5933
|
+
/* @__PURE__ */ M("strong", { children: e.formattedValue }),
|
|
5934
|
+
e.fields.length ? /* @__PURE__ */ M(We, { fields: e.fields }) : null
|
|
5935
|
+
]
|
|
5936
|
+
}, e.id))
|
|
5937
|
+
}),
|
|
5938
|
+
l.pinned && (!_ || t.onCompareFromHere) ? /* @__PURE__ */ N("div", {
|
|
5921
5939
|
className: "lilt-chart__tooltip-actions",
|
|
5922
5940
|
children: [t.onCompareFromHere ? /* @__PURE__ */ M("button", {
|
|
5923
5941
|
type: "button",
|
|
5924
5942
|
onClick: t.onCompareFromHere,
|
|
5925
5943
|
children: "Compare from here"
|
|
5926
|
-
}) : null, /* @__PURE__ */ M("button", {
|
|
5944
|
+
}) : null, _ ? null : /* @__PURE__ */ M("button", {
|
|
5927
5945
|
type: "button",
|
|
5928
5946
|
onClick: t.onRelease,
|
|
5929
5947
|
children: "Unpin"
|
|
5930
5948
|
})]
|
|
5949
|
+
}) : null,
|
|
5950
|
+
t.keyboardHint ? /* @__PURE__ */ M("p", {
|
|
5951
|
+
className: "lilt-chart__tooltip-hint",
|
|
5952
|
+
children: t.keyboardHint
|
|
5931
5953
|
}) : null
|
|
5932
5954
|
]
|
|
5933
5955
|
})
|
|
@@ -6289,7 +6311,7 @@ function Oi(e, t) {
|
|
|
6289
6311
|
}
|
|
6290
6312
|
function ki(e, t, n, r) {
|
|
6291
6313
|
let { width: i } = Di(r), a = r.y(Math.max(t, n)), o = Math.max(1, r.y(Math.min(t, n)) - a);
|
|
6292
|
-
return
|
|
6314
|
+
return pn(e, a - (o === 1 ? .5 : 0), i, o);
|
|
6293
6315
|
}
|
|
6294
6316
|
function Ai(e, t, n, r) {
|
|
6295
6317
|
let { width: i, half: a } = Di(r), o = r.y(Math.max(t, n)), s = r.y(Math.min(t, n)), c = Math.max(1, s - o);
|
|
@@ -6315,7 +6337,7 @@ function Pi(e, t, n) {
|
|
|
6315
6337
|
};
|
|
6316
6338
|
}
|
|
6317
6339
|
function Fi(e, t, n) {
|
|
6318
|
-
let { width: r, half: i } = Di(n), a = ji(n), o = n.y(t.q3), s = n.y(t.q1), c =
|
|
6340
|
+
let { width: r, half: i } = Di(n), a = ji(n), o = n.y(t.q3), s = n.y(t.q1), c = fn(e - i, o, r, Math.max(1, s - o)), l = c.rise / 2, u = e - i, d = u + c.frontWidth, f = n.y(t.median);
|
|
6319
6341
|
return {
|
|
6320
6342
|
faces: c,
|
|
6321
6343
|
lift: l,
|
|
@@ -6567,9 +6589,9 @@ function Vi({ series: e, className: t, model: n }) {
|
|
|
6567
6589
|
id: S,
|
|
6568
6590
|
children: /* @__PURE__ */ M("rect", {
|
|
6569
6591
|
x: i.plot.left,
|
|
6570
|
-
y: i.plot.top -
|
|
6592
|
+
y: i.plot.top - q,
|
|
6571
6593
|
width: i.plot.width,
|
|
6572
|
-
height: i.plot.height +
|
|
6594
|
+
height: i.plot.height + q
|
|
6573
6595
|
})
|
|
6574
6596
|
}) }) : null,
|
|
6575
6597
|
m.bar?.track && (!g || i.stack.series[0] === e) ? h?.map((e) => {
|
|
@@ -7735,7 +7757,7 @@ function Na({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
|
|
|
7735
7757
|
series: Ct,
|
|
7736
7758
|
status: Oe ? "loading" : "ready"
|
|
7737
7759
|
}), Lt = tt(It, (e) => e.inspection);
|
|
7738
|
-
|
|
7760
|
+
br(de, It.getController(), z, g, Qe, {
|
|
7739
7761
|
label: t,
|
|
7740
7762
|
release: It.actions.release
|
|
7741
7763
|
}), tt(It, Ma);
|
|
@@ -7762,19 +7784,19 @@ function Na({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
|
|
|
7762
7784
|
}), {
|
|
7763
7785
|
start: 0,
|
|
7764
7786
|
end: 0
|
|
7765
|
-
}), nn = Qt ? tn(Qt) : void 0, rn = $t ? tn($t) : void 0, an = B ? (e) => `${new Intl.NumberFormat(ae, { maximumFractionDigits: 1 }).format(e)} pp` : Je, on = Ca(an), sn = Mt === null ? null : Gt.filter((e) => S === "inverse" ? e <= Mt : e >= Mt).length, cn = Fe && z.length ? Fe(z) : null, ln = Jt && e.kind === "marks" ? e.describe?.(Jt) ?? null : null, un = Jt && ut ? ut[Jt.sourceIndex] ?? null : null, dn = un?.severity ? gt(Jt?.sourceIndex) ?? mt(un.flags) : null,
|
|
7787
|
+
}), nn = Qt ? tn(Qt) : void 0, rn = $t ? tn($t) : void 0, an = B ? (e) => `${new Intl.NumberFormat(ae, { maximumFractionDigits: 1 }).format(e)} pp` : Je, on = Ca(an), sn = Mt === null ? null : Gt.filter((e) => S === "inverse" ? e <= Mt : e >= Mt).length, cn = Fe && z.length ? Fe(z) : null, ln = Jt && e.kind === "marks" ? e.describe?.(Jt) ?? null : null, un = Jt && ut ? ut[Jt.sourceIndex] ?? null : null, dn = un?.severity ? gt(Jt?.sourceIndex) ?? mt(un.flags) : null, fn = !!(G !== null && Jt?.series.some((e) => e.status === "forecast")), pn = K.size === 0 || B && Qt?.series.some((e) => K.has(e.id) && (e.startValue === null || e.endValue === null)) ? null : Yt ? B && [...K].some((e) => Yt.get(e) == null) ? null : [...Yt].reduce((e, [t, n]) => e + (K.has(t) ? n ?? 0 : 0), 0) : nn ? nn.end - nn.start : Kt, q = (e) => {
|
|
7766
7788
|
Bt(e), It.actions.focusSeries(e);
|
|
7767
7789
|
}, mn = (e) => {
|
|
7768
|
-
Ht(e),
|
|
7790
|
+
Ht(e), q(null), It.actions.setVisibleSeries(Ct.map((e) => e.id).filter((t) => !e.includes(t)));
|
|
7769
7791
|
}, hn = st(fe), gn = ct(hn.y), _n = hn.y === "classic" ? 44 : 48, vn = !!Tt, yn = xe ? 0 : 4, bn = lt(Ee, hn.y) === "mark", xn = {
|
|
7770
7792
|
top: pe === "strip" ? 44 : bn ? 30 : hn.y === "inline" || hn.y === "ruler" ? 22 : 8,
|
|
7771
7793
|
right: gn && vn ? _n : yn,
|
|
7772
7794
|
bottom: e.kind === "marks" && e.xAxis === !1 ? 6 : 28,
|
|
7773
7795
|
left: gn ? _n : yn
|
|
7774
|
-
}, Sn = Se ?? (xe ? 20 : 0), Cn = Ct.filter((e) => !U.has(e.id)).map((e) => e.id), wn = Ct.filter((e) => Rt.has(e.id)), Tn = nt.length ? Qe.position(nt.at(-1)) : null, En = z.length ? Qe.position(z.at(-1)) : null,
|
|
7796
|
+
}, Sn = Se ?? (xe ? 20 : 0), Cn = Ct.filter((e) => !U.has(e.id)).map((e) => e.id), wn = Ct.filter((e) => Rt.has(e.id)), Tn = nt.length ? Qe.position(nt.at(-1)) : null, En = z.length ? Qe.position(z.at(-1)) : null, Dn = G === null || En === null || G > En ? null : Tn === null ? G : e.kind === "bar" ? (Tn + Ra(z, Qe, G)) / 2 : Tn, On = /* @__PURE__ */ N(j, { children: [
|
|
7775
7797
|
/* @__PURE__ */ M(Ui, { pattern: "lines" }),
|
|
7776
|
-
|
|
7777
|
-
from:
|
|
7798
|
+
Dn === null ? null : /* @__PURE__ */ M(ma, {
|
|
7799
|
+
from: Dn,
|
|
7778
7800
|
to: Infinity,
|
|
7779
7801
|
label: I?.label ?? "Forecast",
|
|
7780
7802
|
color: "var(--lilt-muted)",
|
|
@@ -7821,7 +7843,7 @@ function Na({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
|
|
|
7821
7843
|
e.kind !== "marks" || e.xAxis !== !1 ? /* @__PURE__ */ M(oa, { labels: e.kind === "bar" || e.kind === "marks" ? "fit" : void 0 }) : null,
|
|
7822
7844
|
/* @__PURE__ */ M(sa, {}),
|
|
7823
7845
|
vn ? /* @__PURE__ */ M(sa, { scale: "secondary" }) : null
|
|
7824
|
-
] }),
|
|
7846
|
+
] }), J = {
|
|
7825
7847
|
model: It,
|
|
7826
7848
|
height: re,
|
|
7827
7849
|
margins: xn,
|
|
@@ -7842,7 +7864,7 @@ function Na({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
|
|
|
7842
7864
|
layout: pe === "strip" ? "strip" : "float"
|
|
7843
7865
|
} : void 0
|
|
7844
7866
|
}, kn = Ue && Cn.length ? { series: Cn } : void 0, An = /* @__PURE__ */ M(ni, {
|
|
7845
|
-
...
|
|
7867
|
+
...J,
|
|
7846
7868
|
bars: e.kind === "bar" ? Ue ? {
|
|
7847
7869
|
segmentGap: 2,
|
|
7848
7870
|
width: e.barWidth
|
|
@@ -7854,7 +7876,7 @@ function Na({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
|
|
|
7854
7876
|
stack: kn,
|
|
7855
7877
|
pillValue: Ue ? Te : void 0,
|
|
7856
7878
|
slots: e.kind === "marks" && !!e.slots,
|
|
7857
|
-
children:
|
|
7879
|
+
children: On
|
|
7858
7880
|
}), jn = !rn || B && $t.series.some((e) => K.has(e.id) && (e.startValue === null || e.endValue === null)) ? null : rn.end - rn.start, Mn = $t && !Oe ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("span", {
|
|
7859
7881
|
className: "lilt-card-badge__comparison",
|
|
7860
7882
|
role: "status",
|
|
@@ -7922,19 +7944,19 @@ function Na({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
|
|
|
7922
7944
|
onValueChange: ze
|
|
7923
7945
|
}) : null,
|
|
7924
7946
|
children: [/* @__PURE__ */ M(s, { children: Pe ?? t }), /* @__PURE__ */ M(o, {
|
|
7925
|
-
value:
|
|
7947
|
+
value: pn,
|
|
7926
7948
|
format: Qt ? on : Je,
|
|
7927
7949
|
loading: Oe,
|
|
7928
7950
|
motion: Ae,
|
|
7929
7951
|
children: Oe ? null : Jt ? /* @__PURE__ */ N(j, { children: [
|
|
7930
|
-
Mt !== null && Mt !== 0 &&
|
|
7931
|
-
value:
|
|
7952
|
+
Mt !== null && Mt !== 0 && pn !== null ? /* @__PURE__ */ M(a, {
|
|
7953
|
+
value: pn / Mt - 1,
|
|
7932
7954
|
tone: S,
|
|
7933
7955
|
format: Fa
|
|
7934
7956
|
}) : null,
|
|
7935
7957
|
/* @__PURE__ */ N(i, { children: [
|
|
7936
7958
|
Jt.formattedX,
|
|
7937
|
-
|
|
7959
|
+
fn ? ` · ${I?.label ?? "Forecast"}` : "",
|
|
7938
7960
|
ln ? ` · ${ln}` : ""
|
|
7939
7961
|
] }),
|
|
7940
7962
|
dn ? /* @__PURE__ */ M("span", {
|
|
@@ -8010,7 +8032,7 @@ function Na({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
|
|
|
8010
8032
|
"aria-label": `${t} by series`,
|
|
8011
8033
|
activeId: zt ?? Lt?.activeSeriesId ?? null,
|
|
8012
8034
|
renderValue: Oe ? () => /* @__PURE__ */ M("span", { className: "lilt-card__skeleton lilt-card__skeleton--tile" }) : void 0,
|
|
8013
|
-
onHoverIdChange:
|
|
8035
|
+
onHoverIdChange: q,
|
|
8014
8036
|
hiddenIds: Vt,
|
|
8015
8037
|
onHiddenIdsChange: mn,
|
|
8016
8038
|
items: Ct.map((e) => {
|
|
@@ -8064,4 +8086,4 @@ function za({ width: e = "100%", height: t, step: n = 0 }) {
|
|
|
8064
8086
|
});
|
|
8065
8087
|
}
|
|
8066
8088
|
//#endregion
|
|
8067
|
-
export { Tn as $, Oi as A, $r as B, Ii as C, xi as D, Ei as E, Ni as F, vr as G,
|
|
8089
|
+
export { Tn as $, Oi as A, $r as B, Ii as C, xi as D, Ei as E, Ni as F, vr as G, Q as H, yi as I, In as J, Ln as K, ni as L, Ai as M, ki as N, Fi as O, Ci as P, vn as Q, Xr as R, Ri as S, Ti as T, xr as U, Jr as V, br as W, yn as X, An as Y, Sn as Z, oa as _, we as _t, Ca as a, un as at, Vi as b, ke as bt, ya as c, K as ct, pa as d, nt as dt, _n as et, ma as f, tt as ft, ca as g, Pe as gt, la as h, $e as ht, xa as i, pn as it, wi as j, Pi as k, va as l, Tt as lt, ua as m, et as mt, Na as n, hn as nt, ba as o, fn as ot, da as p, G as pt, Y as q, Aa as r, xn as rt, Sa as s, rn as st, za as t, gn as tt, ha as u, Ot as ut, sa as v, Ae as vt, Li as w, Bi as x, _e as xt, Ui as y, Oe as yt, ei as z };
|