@graphysdk/react-renderer 0.0.1-experimental.4 → 0.0.1-experimental.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +36 -4
- package/dist/index.mjs +928 -871
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
import { jsx as a, jsxs as m, Fragment as
|
|
2
|
+
import { jsx as a, jsxs as m, Fragment as w } from "react/jsx-runtime";
|
|
3
3
|
import re, { clsx as ce } from "clsx";
|
|
4
|
-
import
|
|
5
|
-
import { useStore as
|
|
6
|
-
import { isGraphConfig as
|
|
4
|
+
import Lo, { useMemo as v, useState as E, useRef as L, useEffect as C, useCallback as Oe, useContext as ee, createContext as fe, useId as vt, Fragment as hn, memo as oe, useReducer as Co } from "react";
|
|
5
|
+
import { useStore as we } from "zustand";
|
|
6
|
+
import { isGraphConfig as wo, createCompiler as To, convertSpecToInput as Ao, isCompilerCachingEnabled as Eo, setCompilerCachingEnabled as _o, COMPILER_STAGE_KEYS as yt, RESTING_HOVER_STATE as gn, HoverEngine as Po, buildTooltipContent as Ho, LAYOUT_PADDING as pn, getDifferenceArrowDimensions as Fo, createHeadlineItemRows as fn, LayoutCompiler as No, BORDER_PRESET_GRADIENTS as Bo, isSafeUrl as mn, SetContentCaptionCommand as Io, SetContentTitleCommand as Do, SetContentSubtitleCommand as Mo, computeDirectLabelsLayout as Ro, buildFontString as Oo, CachedTextMeasurer as It, HeuristicTextMeasurer as zo, getColor as z, getAlpha as X, getSize as ze, toPercent as x, toViewBoxY as Ge, toViewBoxX as We, createAreaPathGenerators as vn, createStableKeyGenerator as $e, GROUP_VARIABLES as Ae, prepareAreaObservations as yn, resolveStrokeWidth as Xe, getDashArray as Ve, getLineType as Ue, isDefined as bn, getGroup as xn, getX as ue, getYMax as Go, getY as he, getXMax as Wo, getBarRectBounds as Sn, createLinePathGenerator as kn, prepareLineObservations as Ln, getStrokeWidth as $o, buildAverageLineSymbols as Xo, formatRuleValue as Vo, getAngleExtent as Cn, getRadiusExtent as wn, buildPolarBarArcPath as Ie, getHoverGuideRectProps as Uo, getHoverGuideLineProps as Yo, buildDataLabelsContent as jo, computeDifferenceArrow as qo, computeFreeformArrow as Ko, createSegmentYReader as Jo, buildLayerYValueFormatter as Zo, formatLegends as Qo, formatHeadline as ea, resolveHeadlinePlacement as ta } from "@graphysdk/viz-engine";
|
|
7
7
|
import { createStore as bt } from "zustand/vanilla";
|
|
8
|
-
import { useMotionValue as
|
|
8
|
+
import { useMotionValue as Tn, animate as na, motion as Y, useSpring as Dt, useReducedMotion as ra } from "motion/react";
|
|
9
9
|
import { useShallow as j } from "zustand/react/shallow";
|
|
10
|
-
import { useI18n as J, IntlProvider as
|
|
11
|
-
import { useFloating as xt, offset as St, flip as kt, shift as Lt, autoUpdate as
|
|
12
|
-
import { Extension as
|
|
10
|
+
import { useI18n as J, IntlProvider as oa } from "@graphysdk/i18n/react";
|
|
11
|
+
import { useFloating as xt, offset as St, flip as kt, shift as Lt, autoUpdate as aa } from "@floating-ui/react-dom";
|
|
12
|
+
import { Extension as ia } from "@tiptap/core";
|
|
13
13
|
import { Bold as An } from "@tiptap/extension-bold";
|
|
14
|
-
import { Document as
|
|
14
|
+
import { Document as ct } from "@tiptap/extension-document";
|
|
15
15
|
import { HardBreak as En } from "@tiptap/extension-hard-break";
|
|
16
16
|
import { Heading as _n } from "@tiptap/extension-heading";
|
|
17
17
|
import { Italic as Pn } from "@tiptap/extension-italic";
|
|
18
18
|
import { Link as Hn } from "@tiptap/extension-link";
|
|
19
19
|
import { Text as Fn } from "@tiptap/extension-text";
|
|
20
20
|
import { TextAlign as Nn } from "@tiptap/extension-text-align";
|
|
21
|
-
import { TextStyle as Bn, Color as In, FontFamily as
|
|
22
|
-
import { Underline as
|
|
23
|
-
import { UndoRedo as
|
|
24
|
-
import { Paragraph as
|
|
25
|
-
import { useEditorState as
|
|
21
|
+
import { TextStyle as Bn, Color as In, FontFamily as Dn } from "@tiptap/extension-text-style";
|
|
22
|
+
import { Underline as Mn } from "@tiptap/extension-underline";
|
|
23
|
+
import { UndoRedo as Rn, Placeholder as On } from "@tiptap/extensions";
|
|
24
|
+
import { Paragraph as sa } from "@tiptap/extension-paragraph";
|
|
25
|
+
import { useEditorState as la, EditorContent as ca, useEditor as da } from "@tiptap/react";
|
|
26
26
|
import { Toolbar as H } from "@base-ui/react/toolbar";
|
|
27
27
|
import { Tooltip as le } from "@base-ui/react/tooltip";
|
|
28
|
-
import { createPortal as
|
|
29
|
-
import { assignInlineVars as
|
|
28
|
+
import { createPortal as ua } from "react-dom";
|
|
29
|
+
import { assignInlineVars as ha } from "@vanilla-extract/dynamic";
|
|
30
30
|
import { Popover as F } from "@base-ui/react/popover";
|
|
31
|
-
import { HexColorPicker as
|
|
32
|
-
import { Menu as
|
|
33
|
-
import { Toggle as
|
|
34
|
-
import { interpolatePath as
|
|
35
|
-
import { getContrast as
|
|
36
|
-
typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.reactRenderer = "0.0.1-experimental.
|
|
37
|
-
const
|
|
31
|
+
import { HexColorPicker as ga, HexColorInput as pa } from "react-colorful";
|
|
32
|
+
import { Menu as D } from "@base-ui/react/menu";
|
|
33
|
+
import { Toggle as fa } from "@base-ui/react/toggle";
|
|
34
|
+
import { interpolatePath as ma } from "d3-interpolate-path";
|
|
35
|
+
import { getContrast as dt } from "color2k";
|
|
36
|
+
typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.reactRenderer = "0.0.1-experimental.6");
|
|
37
|
+
const va = 5, ya = (e) => {
|
|
38
38
|
if (process.env.NODE_ENV === "production")
|
|
39
39
|
return {
|
|
40
40
|
emit: () => {
|
|
41
41
|
},
|
|
42
|
-
subscribe: () =>
|
|
42
|
+
subscribe: () => xa,
|
|
43
43
|
getLastTrigger: () => null,
|
|
44
44
|
getLastCompile: () => null,
|
|
45
45
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -61,7 +61,7 @@ const ga = 5, pa = (e) => {
|
|
|
61
61
|
getLastCompile: () => e.getLastCompile(),
|
|
62
62
|
getCacheStats: () => e.getCacheStats()
|
|
63
63
|
};
|
|
64
|
-
},
|
|
64
|
+
}, ba = () => bt((e) => ({
|
|
65
65
|
lastCompile: null,
|
|
66
66
|
history: [],
|
|
67
67
|
nextId: 1,
|
|
@@ -70,19 +70,19 @@ const ga = 5, pa = (e) => {
|
|
|
70
70
|
if (r.lastSnapshot === n) return r;
|
|
71
71
|
const o = {
|
|
72
72
|
id: r.nextId,
|
|
73
|
-
label:
|
|
73
|
+
label: Sa(t),
|
|
74
74
|
stages: n.stages,
|
|
75
75
|
durationMs: n.durationMs
|
|
76
76
|
};
|
|
77
77
|
return {
|
|
78
78
|
lastCompile: o,
|
|
79
|
-
history:
|
|
79
|
+
history: ka(r.history, o, va),
|
|
80
80
|
nextId: r.nextId + 1,
|
|
81
81
|
lastSnapshot: n
|
|
82
82
|
};
|
|
83
83
|
})
|
|
84
|
-
})),
|
|
85
|
-
},
|
|
84
|
+
})), xa = () => {
|
|
85
|
+
}, Sa = (e) => {
|
|
86
86
|
switch (e.kind) {
|
|
87
87
|
case "init":
|
|
88
88
|
return "init";
|
|
@@ -93,18 +93,18 @@ const ga = 5, pa = (e) => {
|
|
|
93
93
|
case "command":
|
|
94
94
|
return e.command.metadata.description;
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, ka = (e, t, n) => {
|
|
97
97
|
const r = e.length >= n ? e.length - (n - 1) : 0;
|
|
98
98
|
return [...e.slice(r), t];
|
|
99
|
-
},
|
|
99
|
+
}, La = (e) => bt((t) => ({
|
|
100
100
|
compiled: e,
|
|
101
101
|
setCompiled: (n) => t((r) => r.compiled === n ? r : { compiled: n })
|
|
102
102
|
}));
|
|
103
|
-
function
|
|
104
|
-
const n =
|
|
103
|
+
function Ca(e, t) {
|
|
104
|
+
const n = wo(e) ? e.themeOverrides : void 0;
|
|
105
105
|
return v(() => ({ ...t, ...n }), [t, n]);
|
|
106
106
|
}
|
|
107
|
-
const zn = fe(null),
|
|
107
|
+
const zn = fe(null), ug = ({
|
|
108
108
|
data: e,
|
|
109
109
|
input: t,
|
|
110
110
|
formattingLocale: n,
|
|
@@ -114,23 +114,23 @@ const zn = fe(null), og = ({
|
|
|
114
114
|
themeOverrides: c,
|
|
115
115
|
children: l
|
|
116
116
|
}) => {
|
|
117
|
-
const [d] = E(() =>
|
|
117
|
+
const [d] = E(() => To()), [u] = E(() => ya(d)), h = Ca(t, c), g = v(() => ({ customPalettes: o, theme: i }), [o, i]), [p] = E(() => {
|
|
118
118
|
const k = d.compile({ input: t, data: e, ctx: g });
|
|
119
|
-
return u.emit({ kind: "init" }),
|
|
120
|
-
}), f =
|
|
121
|
-
|
|
122
|
-
const k = t !== f.current.input,
|
|
123
|
-
if (!k && !
|
|
119
|
+
return u.emit({ kind: "init" }), La(k);
|
|
120
|
+
}), f = L({ input: t, data: e, ctx: g });
|
|
121
|
+
C(() => {
|
|
122
|
+
const k = t !== f.current.input, T = e !== f.current.data, A = g !== f.current.ctx;
|
|
123
|
+
if (!k && !T && !A) return;
|
|
124
124
|
const I = p.getState(), _ = k || A ? d.compile({ input: t, data: e, ctx: g }) : d.recompile({ spec: I.compiled.spec, data: e });
|
|
125
125
|
f.current = { input: t, data: e, ctx: g }, I.setCompiled(_), u.emit({ kind: k ? "input" : "data" });
|
|
126
126
|
}, [t, e, g, d, p, u]);
|
|
127
|
-
const y =
|
|
127
|
+
const y = Oe(
|
|
128
128
|
(k) => {
|
|
129
|
-
const
|
|
129
|
+
const T = p.getState(), A = k.apply(T.compiled.spec);
|
|
130
130
|
if (!A) return;
|
|
131
131
|
const I = d.recompile({ spec: A.spec });
|
|
132
|
-
if (
|
|
133
|
-
const _ =
|
|
132
|
+
if (T.setCompiled(I), u.emit({ kind: "command", command: k }), !r) return;
|
|
133
|
+
const _ = Ao(A.spec);
|
|
134
134
|
f.current = { input: _, data: f.current.data, ctx: f.current.ctx }, r(_);
|
|
135
135
|
},
|
|
136
136
|
[r, d, u, p]
|
|
@@ -145,39 +145,39 @@ const zn = fe(null), og = ({
|
|
|
145
145
|
return e;
|
|
146
146
|
}, B = (e) => {
|
|
147
147
|
const { store: t } = me();
|
|
148
|
-
return
|
|
148
|
+
return we(t, (n) => e(n.compiled));
|
|
149
149
|
}, Gn = () => {
|
|
150
150
|
const { dispatch: e } = me();
|
|
151
151
|
return e;
|
|
152
152
|
};
|
|
153
|
-
var
|
|
154
|
-
const
|
|
155
|
-
const { compileBus: r } = me(), [o] = E(() =>
|
|
156
|
-
|
|
153
|
+
var wa = "drqe3u0", Ta = "drqe3u1", Aa = "drqe3u2", Ea = "drqe3u3", He = "drqe3u4", _a = "drqe3u5", Pa = "drqe3u6", Ha = "drqe3u7", tt = "drqe3u8", Fa = "drqe3u9", Na = "drqe3ua", Ba = "drqe3ub", Ia = "drqe3uc", Da = "drqe3ud", Ma = "drqe3ue", Ra = "drqe3uf", Oa = "drqe3ug", za = "drqe3uh", Ga = "drqe3ui", Mt = { enabled: "drqe3uk drqe3uj", disabled: "drqe3ul drqe3uj" }, Rt = { ran: "drqe3un drqe3um", dim: "drqe3uo drqe3um" }, Wn = { ran: "drqe3uq drqe3up", cached: "drqe3ur drqe3up", untouched: "drqe3us drqe3up" };
|
|
154
|
+
const hg = ({ width: e = 380, style: t, className: n } = {}) => {
|
|
155
|
+
const { compileBus: r } = me(), [o] = E(() => ba()), [i, c] = E(!1), [l, d] = E(Eo);
|
|
156
|
+
C(() => {
|
|
157
157
|
const { recordCompile: y } = o.getState(), S = r.getLastTrigger(), k = r.getLastCompile();
|
|
158
158
|
return S && k && y(S, k), r.subscribe(y);
|
|
159
159
|
}, [o, r]);
|
|
160
|
-
const u =
|
|
160
|
+
const u = we(o, (y) => y.lastCompile), h = we(o, (y) => y.history), g = r.getCacheStats(), p = u === null && h.length === 0, f = () => {
|
|
161
161
|
d((y) => {
|
|
162
162
|
const S = !y;
|
|
163
|
-
return
|
|
163
|
+
return _o(S), S;
|
|
164
164
|
});
|
|
165
165
|
};
|
|
166
|
-
return /* @__PURE__ */ m("div", { className: re(
|
|
167
|
-
/* @__PURE__ */ m("div", { className:
|
|
166
|
+
return /* @__PURE__ */ m("div", { className: re(Na, n), style: { width: e, ...t }, children: [
|
|
167
|
+
/* @__PURE__ */ m("div", { className: wa, children: [
|
|
168
168
|
/* @__PURE__ */ m("div", { children: [
|
|
169
|
-
/* @__PURE__ */ a("div", { className:
|
|
170
|
-
/* @__PURE__ */ a("div", { className:
|
|
169
|
+
/* @__PURE__ */ a("div", { className: Ta, children: "compile cache" }),
|
|
170
|
+
/* @__PURE__ */ a("div", { className: Ma, children: p ? "production: stats disabled" : u ? `last: ${u.label} · ${$n(u.durationMs)}` : "awaiting first compile…" })
|
|
171
171
|
] }),
|
|
172
|
-
/* @__PURE__ */ a("button", { type: "button", onClick: () => c((y) => !y), className:
|
|
172
|
+
/* @__PURE__ */ a("button", { type: "button", onClick: () => c((y) => !y), className: Ra, children: i ? "▾" : "▴" })
|
|
173
173
|
] }),
|
|
174
|
-
!i && /* @__PURE__ */ m("div", { className:
|
|
174
|
+
!i && /* @__PURE__ */ m("div", { className: Ba, children: [
|
|
175
175
|
/* @__PURE__ */ m(
|
|
176
176
|
"button",
|
|
177
177
|
{
|
|
178
178
|
type: "button",
|
|
179
179
|
onClick: f,
|
|
180
|
-
className: l ?
|
|
180
|
+
className: l ? Mt.enabled : Mt.disabled,
|
|
181
181
|
"aria-pressed": l,
|
|
182
182
|
children: [
|
|
183
183
|
"cache ",
|
|
@@ -185,43 +185,43 @@ const ag = ({ width: e = 380, style: t, className: n } = {}) => {
|
|
|
185
185
|
]
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
|
-
/* @__PURE__ */ a("span", { className:
|
|
188
|
+
/* @__PURE__ */ a("span", { className: Oa, children: "next compile reflects this toggle" })
|
|
189
189
|
] }),
|
|
190
|
-
!i && !p && /* @__PURE__ */ m(
|
|
191
|
-
/* @__PURE__ */ a(
|
|
192
|
-
/* @__PURE__ */ a(
|
|
190
|
+
!i && !p && /* @__PURE__ */ m(w, { children: [
|
|
191
|
+
/* @__PURE__ */ a(Wa, { delta: u?.stages, cumulative: g }),
|
|
192
|
+
/* @__PURE__ */ a($a, { entries: h })
|
|
193
193
|
] })
|
|
194
194
|
] });
|
|
195
|
-
},
|
|
196
|
-
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ m("tr", { className:
|
|
197
|
-
/* @__PURE__ */ a("th", { className:
|
|
195
|
+
}, Wa = ({ delta: e, cumulative: t }) => /* @__PURE__ */ m("table", { className: Aa, children: [
|
|
196
|
+
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ m("tr", { className: za, children: [
|
|
197
|
+
/* @__PURE__ */ a("th", { className: Ea, children: "stage" }),
|
|
198
198
|
/* @__PURE__ */ a("th", { className: He, children: "Δ miss" }),
|
|
199
199
|
/* @__PURE__ */ a("th", { className: He, children: "Δ hit" }),
|
|
200
200
|
/* @__PURE__ */ a("th", { className: He, children: "total miss" }),
|
|
201
201
|
/* @__PURE__ */ a("th", { className: He, children: "total hit" })
|
|
202
202
|
] }) }),
|
|
203
203
|
/* @__PURE__ */ a("tbody", { children: yt.map((n) => {
|
|
204
|
-
const r = e?.[n], o =
|
|
205
|
-
return /* @__PURE__ */ m("tr", { className:
|
|
206
|
-
/* @__PURE__ */ m("td", { className:
|
|
204
|
+
const r = e?.[n], o = Xa(r);
|
|
205
|
+
return /* @__PURE__ */ m("tr", { className: Ia, children: [
|
|
206
|
+
/* @__PURE__ */ m("td", { className: _a, children: [
|
|
207
207
|
/* @__PURE__ */ a("span", { className: Wn[o], "aria-hidden": !0 }),
|
|
208
208
|
" ",
|
|
209
209
|
n
|
|
210
210
|
] }),
|
|
211
|
-
/* @__PURE__ */ a("td", { className: o === "ran" ?
|
|
212
|
-
/* @__PURE__ */ a("td", { className:
|
|
213
|
-
/* @__PURE__ */ a("td", { className:
|
|
214
|
-
/* @__PURE__ */ a("td", { className:
|
|
211
|
+
/* @__PURE__ */ a("td", { className: o === "ran" ? Rt.ran : Rt.dim, children: r?.misses ?? 0 }),
|
|
212
|
+
/* @__PURE__ */ a("td", { className: tt, children: r?.hits ?? 0 }),
|
|
213
|
+
/* @__PURE__ */ a("td", { className: tt, children: t[n].misses }),
|
|
214
|
+
/* @__PURE__ */ a("td", { className: tt, children: t[n].hits })
|
|
215
215
|
] }, n);
|
|
216
216
|
}) })
|
|
217
|
-
] }),
|
|
218
|
-
/* @__PURE__ */ a("div", { className:
|
|
217
|
+
] }), $a = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ m("div", { className: Da, children: [
|
|
218
|
+
/* @__PURE__ */ a("div", { className: Ga, children: "recent compiles" }),
|
|
219
219
|
e.map((t) => {
|
|
220
|
-
const n =
|
|
221
|
-
return /* @__PURE__ */ m("div", { className:
|
|
220
|
+
const n = Va(t.stages, (i) => i.misses > 0), r = yt.length;
|
|
221
|
+
return /* @__PURE__ */ m("div", { className: Pa, children: [
|
|
222
222
|
/* @__PURE__ */ a("span", { className: Wn[n === 0 ? "cached" : "ran"], "aria-hidden": !0 }),
|
|
223
|
-
/* @__PURE__ */ a("span", { className:
|
|
224
|
-
/* @__PURE__ */ m("span", { className:
|
|
223
|
+
/* @__PURE__ */ a("span", { className: Ha, title: t.label, children: t.label }),
|
|
224
|
+
/* @__PURE__ */ m("span", { className: Fa, children: [
|
|
225
225
|
n,
|
|
226
226
|
"/",
|
|
227
227
|
r,
|
|
@@ -230,57 +230,57 @@ const ag = ({ width: e = 380, style: t, className: n } = {}) => {
|
|
|
230
230
|
] })
|
|
231
231
|
] }, t.id);
|
|
232
232
|
})
|
|
233
|
-
] }),
|
|
233
|
+
] }), Xa = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Va = (e, t) => {
|
|
234
234
|
let n = 0;
|
|
235
235
|
for (const r of yt)
|
|
236
236
|
t(e[r]) && (n += 1);
|
|
237
237
|
return n;
|
|
238
|
-
}, $n = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`,
|
|
238
|
+
}, $n = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Ua = () => bt((e) => ({
|
|
239
239
|
hover: gn,
|
|
240
240
|
setHoverState: (t) => e((n) => n.hover === t ? n : { hover: t })
|
|
241
|
-
})),
|
|
242
|
-
const n = v(() => ({ layers: e, coordSystem: t }), [e, t]), r =
|
|
243
|
-
r.current === null && (r.current = new
|
|
244
|
-
const o = r.current, i =
|
|
245
|
-
return
|
|
241
|
+
})), Ya = (e, t) => {
|
|
242
|
+
const n = v(() => ({ layers: e, coordSystem: t }), [e, t]), r = L(null);
|
|
243
|
+
r.current === null && (r.current = new Po(n));
|
|
244
|
+
const o = r.current, i = L(!1);
|
|
245
|
+
return C(() => {
|
|
246
246
|
if (!i.current) {
|
|
247
247
|
i.current = !0;
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
250
|
o.update(n);
|
|
251
251
|
}, [o, n]), o;
|
|
252
|
-
}, Xn = fe(null),
|
|
252
|
+
}, Xn = fe(null), ja = ({ children: e }) => {
|
|
253
253
|
const { layers: t, coordSystem: n } = B(
|
|
254
254
|
j((l) => ({ layers: l.layers, coordSystem: l.coordSystem }))
|
|
255
|
-
), r =
|
|
255
|
+
), r = Ya(t, n), [o] = E(() => Ua()), i = L(null), c = L(null);
|
|
256
256
|
return c.current === null && (c.current = { engine: r, store: o, overlayRef: i }), /* @__PURE__ */ a(Xn.Provider, { value: c.current, children: e });
|
|
257
|
-
},
|
|
257
|
+
}, Ye = () => {
|
|
258
258
|
const e = ee(Xn);
|
|
259
259
|
if (e === null)
|
|
260
260
|
throw new Error("useHoverContext must be used inside a <HoverProvider>.");
|
|
261
261
|
return e;
|
|
262
262
|
};
|
|
263
|
-
var
|
|
264
|
-
const
|
|
263
|
+
var qa = "_2qyyu60";
|
|
264
|
+
const Ot = 2, Ka = 12, Ja = 12, zt = 1, Gt = 2, Za = 4, je = ({
|
|
265
265
|
shape: e,
|
|
266
266
|
color: t,
|
|
267
267
|
lineType: n = "solid",
|
|
268
|
-
width: r =
|
|
269
|
-
height: o =
|
|
268
|
+
width: r = Ka,
|
|
269
|
+
height: o = Ja
|
|
270
270
|
}) => /* @__PURE__ */ a(
|
|
271
271
|
"svg",
|
|
272
272
|
{
|
|
273
|
-
className:
|
|
273
|
+
className: qa,
|
|
274
274
|
width: r,
|
|
275
275
|
height: o,
|
|
276
276
|
viewBox: `0 0 ${r} ${o}`,
|
|
277
277
|
"aria-hidden": !0,
|
|
278
278
|
"data-testid": "chart-swatch",
|
|
279
279
|
"data-shape": e,
|
|
280
|
-
children:
|
|
280
|
+
children: Qa({ shape: e, color: t, lineType: n, width: r, height: o })
|
|
281
281
|
}
|
|
282
|
-
),
|
|
283
|
-
const i =
|
|
282
|
+
), Qa = ({ shape: e, color: t, lineType: n, width: r, height: o }) => {
|
|
283
|
+
const i = ei(n, r);
|
|
284
284
|
switch (e) {
|
|
285
285
|
case "square":
|
|
286
286
|
return /* @__PURE__ */ a("rect", { x: 1, y: 1, width: r - 2, height: o - 2, rx: 2, fill: t });
|
|
@@ -293,7 +293,7 @@ const Rt = 2, Ua = 12, Ya = 12, zt = 1, Gt = 2, ja = 4, Ye = ({
|
|
|
293
293
|
x2: i.x2,
|
|
294
294
|
y2: o / 2,
|
|
295
295
|
stroke: t,
|
|
296
|
-
strokeWidth:
|
|
296
|
+
strokeWidth: Ot,
|
|
297
297
|
strokeLinecap: i.linecap,
|
|
298
298
|
strokeDasharray: i.dashArray
|
|
299
299
|
}
|
|
@@ -304,7 +304,7 @@ const Rt = 2, Ua = 12, Ya = 12, zt = 1, Gt = 2, ja = 4, Ye = ({
|
|
|
304
304
|
}
|
|
305
305
|
case "area": {
|
|
306
306
|
const c = o / 2 - 1;
|
|
307
|
-
return /* @__PURE__ */ m(
|
|
307
|
+
return /* @__PURE__ */ m(w, { children: [
|
|
308
308
|
/* @__PURE__ */ a("rect", { x: 1, y: c, width: r - 2, height: o - c - 1, fill: t, opacity: 0.45 }),
|
|
309
309
|
/* @__PURE__ */ a(
|
|
310
310
|
"line",
|
|
@@ -314,7 +314,7 @@ const Rt = 2, Ua = 12, Ya = 12, zt = 1, Gt = 2, ja = 4, Ye = ({
|
|
|
314
314
|
x2: i.x2,
|
|
315
315
|
y2: c,
|
|
316
316
|
stroke: t,
|
|
317
|
-
strokeWidth:
|
|
317
|
+
strokeWidth: Ot,
|
|
318
318
|
strokeLinecap: i.linecap,
|
|
319
319
|
strokeDasharray: i.dashArray
|
|
320
320
|
}
|
|
@@ -324,21 +324,21 @@ const Rt = 2, Ua = 12, Ya = 12, zt = 1, Gt = 2, ja = 4, Ye = ({
|
|
|
324
324
|
case "slice":
|
|
325
325
|
return /* @__PURE__ */ a("path", { d: `M 0 ${o} L ${r} ${o} A ${r} ${o} 0 0 0 0 0 Z`, fill: t });
|
|
326
326
|
}
|
|
327
|
-
},
|
|
327
|
+
}, ei = (e, t) => {
|
|
328
328
|
if (e === "solid")
|
|
329
329
|
return { x1: 0, x2: t, dashArray: void 0, linecap: "round" };
|
|
330
330
|
if (e === "dashed") {
|
|
331
331
|
const r = (t - zt * (Gt - 1)) / Gt;
|
|
332
332
|
return { x1: 0, x2: t, dashArray: `${r} ${zt}`, linecap: "butt" };
|
|
333
333
|
}
|
|
334
|
-
const n = t / (
|
|
334
|
+
const n = t / (Za - 1);
|
|
335
335
|
return { x1: 0, x2: t, dashArray: `1 ${n}`, linecap: "round" };
|
|
336
|
-
}, Vn = Object.freeze({}), Ct = fe(Vn),
|
|
336
|
+
}, Vn = Object.freeze({}), Ct = fe(Vn), ti = ({ slots: e, children: t }) => /* @__PURE__ */ a(Ct.Provider, { value: e ?? Vn, children: t });
|
|
337
337
|
function Q(e, t) {
|
|
338
338
|
const n = ee(Ct)[e];
|
|
339
|
-
return n === void 0 ? t : typeof n == "object" &&
|
|
339
|
+
return n === void 0 ? t : typeof n == "object" && ri(n) ? n.render : n;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function ni() {
|
|
342
342
|
const e = ee(Ct);
|
|
343
343
|
return {
|
|
344
344
|
measureAxis: e.AxisTicks?.measure,
|
|
@@ -348,17 +348,17 @@ function Za() {
|
|
|
348
348
|
measureHeadlineItemWidths: e.Headline?.measure.measureHeadlineItemWidths
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function ri(e) {
|
|
352
352
|
return "render" in e && typeof e.render == "function";
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
const { store: t } =
|
|
356
|
-
return
|
|
354
|
+
function wt(e) {
|
|
355
|
+
const { store: t } = Ye();
|
|
356
|
+
return we(t, e);
|
|
357
357
|
}
|
|
358
|
-
var
|
|
359
|
-
const
|
|
360
|
-
const { overlayRef: t } =
|
|
361
|
-
return i.current = e,
|
|
358
|
+
var oi = "_19519k80", ai = "_19519k81", ii = "_19519k82", si = "_19519k83", li = "_19519k85", ci = "_19519k86", di = "_19519k87", ui = "_19519k88", hi = "_19519k89";
|
|
359
|
+
const gi = (e) => {
|
|
360
|
+
const { overlayRef: t } = Ye(), n = L(null), [r, o] = E(!1), i = L(e);
|
|
361
|
+
return i.current = e, C(() => {
|
|
362
362
|
const c = t.current;
|
|
363
363
|
if (!c) return;
|
|
364
364
|
const l = (u) => {
|
|
@@ -370,7 +370,7 @@ const ci = (e) => {
|
|
|
370
370
|
c.removeEventListener("pointermove", l), c.removeEventListener("pointerleave", d);
|
|
371
371
|
};
|
|
372
372
|
}, [t]), { cursorRef: n, isInside: r };
|
|
373
|
-
},
|
|
373
|
+
}, pi = 16, fi = 8, mi = {
|
|
374
374
|
x: 0,
|
|
375
375
|
y: 0,
|
|
376
376
|
top: 0,
|
|
@@ -380,7 +380,7 @@ const ci = (e) => {
|
|
|
380
380
|
width: 0,
|
|
381
381
|
height: 0,
|
|
382
382
|
toJSON: () => ({})
|
|
383
|
-
},
|
|
383
|
+
}, vi = () => {
|
|
384
384
|
const e = B(
|
|
385
385
|
j((f) => ({
|
|
386
386
|
layers: f.layers,
|
|
@@ -390,22 +390,22 @@ const ci = (e) => {
|
|
|
390
390
|
numberFormat: f.config.numberFormat,
|
|
391
391
|
parsingLocale: f.config.parsingLocale
|
|
392
392
|
}))
|
|
393
|
-
), { formattingLocale: t } = me(), n =
|
|
394
|
-
}), { cursorRef: i, isInside: c } =
|
|
395
|
-
() =>
|
|
393
|
+
), { formattingLocale: t } = me(), n = wt((f) => f.hover), r = Q("Tooltip", yi), o = L(() => {
|
|
394
|
+
}), { cursorRef: i, isInside: c } = gi(() => o.current()), l = v(
|
|
395
|
+
() => Ho({ ...e, hover: n, formattingLocale: t }),
|
|
396
396
|
[e, n, t]
|
|
397
397
|
), d = l !== null && c, u = v(
|
|
398
398
|
() => ({
|
|
399
399
|
getBoundingClientRect: () => {
|
|
400
400
|
const f = i.current;
|
|
401
|
-
return f === null ?
|
|
401
|
+
return f === null ? mi : bi(f);
|
|
402
402
|
}
|
|
403
403
|
}),
|
|
404
404
|
[i]
|
|
405
405
|
), { refs: h, floatingStyles: g, update: p } = xt({
|
|
406
406
|
open: d,
|
|
407
407
|
placement: "right",
|
|
408
|
-
middleware: [St(
|
|
408
|
+
middleware: [St(pi), kt(), Lt({ padding: fi })],
|
|
409
409
|
elements: { reference: u }
|
|
410
410
|
});
|
|
411
411
|
return o.current = p, d ? /* @__PURE__ */ a(
|
|
@@ -413,16 +413,16 @@ const ci = (e) => {
|
|
|
413
413
|
{
|
|
414
414
|
ref: h.setFloating,
|
|
415
415
|
role: "tooltip",
|
|
416
|
-
className:
|
|
416
|
+
className: ui,
|
|
417
417
|
style: g,
|
|
418
418
|
"data-testid": "chart-tooltip",
|
|
419
419
|
children: /* @__PURE__ */ a(r, { content: l, isVisible: d })
|
|
420
420
|
}
|
|
421
421
|
) : null;
|
|
422
|
-
},
|
|
423
|
-
e.header !== null && /* @__PURE__ */ a("div", { className:
|
|
424
|
-
/* @__PURE__ */ a("div", { className:
|
|
425
|
-
] }) : null,
|
|
422
|
+
}, yi = ({ content: e, isVisible: t }) => t ? /* @__PURE__ */ m("div", { className: hi, children: [
|
|
423
|
+
e.header !== null && /* @__PURE__ */ a("div", { className: oi, children: e.header }),
|
|
424
|
+
/* @__PURE__ */ a("div", { className: ai, children: e.rows.map((n) => /* @__PURE__ */ a(xi, { row: n, shouldHighlight: n.isPrimary && e.rows.length > 1 }, n.key)) })
|
|
425
|
+
] }) : null, bi = (e) => ({
|
|
426
426
|
x: e.clientX,
|
|
427
427
|
y: e.clientY,
|
|
428
428
|
top: e.clientY,
|
|
@@ -432,14 +432,14 @@ const ci = (e) => {
|
|
|
432
432
|
width: 0,
|
|
433
433
|
height: 0,
|
|
434
434
|
toJSON: () => ({})
|
|
435
|
-
}),
|
|
436
|
-
e.swatchColor === null ? /* @__PURE__ */ a("span", { className:
|
|
437
|
-
/* @__PURE__ */ a("span", { className:
|
|
438
|
-
/* @__PURE__ */ a("span", { className:
|
|
435
|
+
}), xi = ({ row: e, shouldHighlight: t }) => /* @__PURE__ */ m("div", { className: re(ii, { [si]: t }), "data-testid": "chart-tooltip-row", children: [
|
|
436
|
+
e.swatchColor === null ? /* @__PURE__ */ a("span", { className: li, "aria-hidden": !0 }) : /* @__PURE__ */ a(je, { shape: e.swatchShape, color: e.swatchColor, lineType: e.swatchLineType }),
|
|
437
|
+
/* @__PURE__ */ a("span", { className: ci, children: e.label }),
|
|
438
|
+
/* @__PURE__ */ a("span", { className: di, children: e.value })
|
|
439
439
|
] });
|
|
440
440
|
var Un = ["canvasDefault", "canvasBlue", "canvasCyan", "canvasGreen", "canvasYellow", "canvasOrange", "canvasRed", "canvasPink", "canvasPurple", "canvasGray", "canvasInverse"], s = { white: "var(--graphy-white)", black: "var(--graphy-black)", transparent: "var(--graphy-transparent)", grey100: "var(--graphy-grey-100)", grey95: "var(--graphy-grey-95)", grey90: "var(--graphy-grey-90)", grey85: "var(--graphy-grey-85)", grey80: "var(--graphy-grey-80)", grey75: "var(--graphy-grey-75)", grey70: "var(--graphy-grey-70)", grey60: "var(--graphy-grey-60)", grey50: "var(--graphy-grey-50)", grey0: "var(--graphy-grey-0)", greyGradient80: "var(--graphy-grey-gradient-80)", green60: "var(--graphy-green-60)", green50: "var(--graphy-green-50)", red60: "var(--graphy-red-60)", red50: "var(--graphy-red-50)", amber70: "var(--graphy-amber-70)", amber50: "var(--graphy-amber-50)", amber40: "var(--graphy-amber-40)", amber30: "var(--graphy-amber-30)", blue80: "var(--graphy-blue-80)", blue60: "var(--graphy-blue-60)", purple50: "var(--graphy-purple-50)", purple30: "var(--graphy-purple-30)", brand: "var(--graphy-brand)", success: "var(--graphy-success)", warning: "var(--graphy-warning)", alert: "var(--graphy-alert)", textPrimary: "var(--graphy-text-primary)", textSecondary: "var(--graphy-text-secondary)", textDisabled: "var(--graphy-text-disabled)", iconPrimary: "var(--graphy-icon-primary)", iconSecondary: "var(--graphy-icon-secondary)", iconStickerBackground: "var(--graphy-icon-sticker-background)", border100: "var(--graphy-border-100)", border50: "var(--graphy-border-50)", border10: "var(--graphy-border-10)", sunkenBackground: "var(--graphy-sunken-background)", defaultBackground: "var(--graphy-default-background)", raisedBackground: "var(--graphy-raised-background)", overlayBackground: "var(--graphy-overlay-background)", overlayBorderGradient: "var(--graphy-overlay-border-gradient)", graphBackground: "var(--graphy-graph-background)", gridLineColor: "var(--graphy-grid-line-color)", originLineColor: "var(--graphy-origin-line-color)", targetLineColor: "var(--graphy-target-line-color)", targetLineMarkerColor: "var(--graphy-target-line-marker-color)", targetLineLabelTextColor: "var(--graphy-target-line-label-text-color)", legendBackground: "var(--graphy-legend-background)", legendBorderColor: "var(--graphy-legend-border-color)", legendFocusOutlineColor: "var(--graphy-legend-focus-outline-color)", legendTextColor: "var(--graphy-legend-text-color)", dimmedSeriesLabelTextColor: "var(--graphy-dimmed-series-label-text-color)", dimmedSeriesLabelLineColor: "var(--graphy-dimmed-series-label-line-color)", trendNegativeColor: "var(--graphy-trend-negative-color)", trendPositiveColor: "var(--graphy-trend-positive-color)", trendNeutralColor: "var(--graphy-trend-neutral-color)", defaultAnnotationArrowStroke: "var(--graphy-default-annotation-arrow-stroke)", defaultAnnotationShapeStroke: "var(--graphy-default-annotation-shape-stroke)", defaultAnnotationShapeFill: "var(--graphy-default-annotation-shape-fill)", arrowAnnotationStickerOutlineColor: "var(--graphy-arrow-annotation-sticker-outline-color)", arrowAnnotationStickerOutlineColorInverse: "var(--graphy-arrow-annotation-sticker-outline-color-inverse)", annotationFrameBorderColor: "var(--graphy-annotation-frame-border-color)", annotationMenuTriggerIconColor: "var(--graphy-annotation-menu-trigger-icon-color)", heatmapEmptyTileBackground: "var(--graphy-heatmap-empty-tile-background)", dataLabelOutsideBackground: "var(--graphy-data-label-outside-background)", graphPadding: "var(--graphy-graph-padding)", gridLineWidth: "var(--graphy-grid-line-width)", gridLineDash: "var(--graphy-grid-line-dash)", tooltipBorderRadius: "var(--graphy-tooltip-border-radius)", tooltipBorderWidth: "var(--graphy-tooltip-border-width)", tooltipPaddingBlock: "var(--graphy-tooltip-padding-block)", tooltipPaddingInline: "var(--graphy-tooltip-padding-inline)", tooltipRowGap: "var(--graphy-tooltip-row-gap)", tooltipShadow: "var(--graphy-tooltip-shadow)", tickLabelOffset: "var(--graphy-tick-label-offset)", legendItemGap: "var(--graphy-legend-item-gap)", legendSwatchGap: "var(--graphy-legend-swatch-gap)", legendSwatchWidth: "var(--graphy-legend-swatch-width)", legendSwatchHeight: "var(--graphy-legend-swatch-height)", legendPillPaddingInline: "var(--graphy-legend-pill-padding-inline)", legendPillPaddingBlock: "var(--graphy-legend-pill-padding-block)", legendPillBorderWidth: "var(--graphy-legend-pill-border-width)", headlineRowGap: "var(--graphy-headline-row-gap)", headlineItemGap: "var(--graphy-headline-item-gap)", canvasDefault: "var(--graphy-canvas-default)", canvasBlue: "var(--graphy-canvas-blue)", canvasCyan: "var(--graphy-canvas-cyan)", canvasGreen: "var(--graphy-canvas-green)", canvasYellow: "var(--graphy-canvas-yellow)", canvasOrange: "var(--graphy-canvas-orange)", canvasRed: "var(--graphy-canvas-red)", canvasPink: "var(--graphy-canvas-pink)", canvasPurple: "var(--graphy-canvas-purple)", canvasGray: "var(--graphy-canvas-gray)", canvasInverse: "var(--graphy-canvas-inverse)", elevationXs: "var(--graphy-elevation-xs)", elevationSm: "var(--graphy-elevation-sm)", elevationMd: "var(--graphy-elevation-md)", elevationLg: "var(--graphy-elevation-lg)", radiiXs: "var(--graphy-radii-xs)", radiiSm: "var(--graphy-radii-sm)", radiiMd: "var(--graphy-radii-md)", radiiLg: "var(--graphy-radii-lg)", spaceXxs: "var(--graphy-space-xxs)", spaceXs: "var(--graphy-space-xs)", spaceSm: "var(--graphy-space-sm)", spaceMd: "var(--graphy-space-md)", spaceLg: "var(--graphy-space-lg)", spaceXl: "var(--graphy-space-xl)", zIndexToolbar: "var(--graphy-z-index-toolbar)", zIndexToolbarTooltip: "var(--graphy-z-index-toolbar-tooltip)", zIndexToolbarPopover: "var(--graphy-z-index-toolbar-popover)", toolbarBackgroundColor: "var(--graphy-toolbar-background-color)", toolbarButtonBackgroundColor: "var(--graphy-toolbar-button-background-color)", toolbarButtonBackgroundColorHovered: "var(--graphy-toolbar-button-background-color-hovered)", toolbarButtonBackgroundColorSelected: "var(--graphy-toolbar-button-background-color-selected)", toolbarSeparatorColor: "var(--graphy-toolbar-separator-color)", tooltipBackground: "var(--graphy-tooltip-background)", tooltipBorderColor: "var(--graphy-tooltip-border-color)", tooltipHeadingTextColor: "var(--graphy-tooltip-heading-text-color)", tooltipLabelTextColor: "var(--graphy-tooltip-label-text-color)", tooltipValueTextColor: "var(--graphy-tooltip-value-text-color)", tooltipPrimaryRowColor: "var(--graphy-tooltip-primary-row-color)", hoverGuideLineColor: "var(--graphy-hover-guide-line-color)", hoverGuideFillColor: "var(--graphy-hover-guide-fill-color)", hoveredBarBorderColor: "var(--graphy-hovered-bar-border-color)", hoveredPointRingColor: "var(--graphy-hovered-point-ring-color)", pointStrokeColor: "var(--graphy-point-stroke-color)", stackedBarHoverBorderColor: "var(--graphy-stacked-bar-hover-border-color)", fontFamilyDefault: "var(--graphy-font-family-default)", fontFamilyHeading: "var(--graphy-font-family-heading)", fontWeightRegular: "var(--graphy-font-weight-regular)", fontWeightMedium: "var(--graphy-font-weight-medium)", fontWeightSemibold: "var(--graphy-font-weight-semibold)", fontWeightBold: "var(--graphy-font-weight-bold)", fontWeightExtraBold: "var(--graphy-font-weight-extra-bold)", fontWeightBlack: "var(--graphy-font-weight-black)", textScale: "var(--graphy-text-scale)", fontSizeXxs: "var(--graphy-font-size-xxs)", fontSizeXs: "var(--graphy-font-size-xs)", fontSizeSm: "var(--graphy-font-size-sm)", fontSizeMd: "var(--graphy-font-size-md)", fontSizeLg: "var(--graphy-font-size-lg)", fontSizeXl: "var(--graphy-font-size-xl)", fontLineHeightXxs: "var(--graphy-font-line-height-xxs)", fontLineHeightXs: "var(--graphy-font-line-height-xs)", fontLineHeightSm: "var(--graphy-font-line-height-sm)", fontLineHeightMd: "var(--graphy-font-line-height-md)", fontLineHeightLg: "var(--graphy-font-line-height-lg)", fontLineHeightXl: "var(--graphy-font-line-height-xl)", fontSizeEditorBody: "var(--graphy-font-size-editor-body)", fontSizeHeadingSm: "var(--graphy-font-size-heading-sm)", fontSizeHeadingMd: "var(--graphy-font-size-heading-md)", fontSizeHeadingLg: "var(--graphy-font-size-heading-lg)", fontLineHeightEditorBody: "var(--graphy-font-line-height-editor-body)", fontLineHeightHeadingSm: "var(--graphy-font-line-height-heading-sm)", fontLineHeightHeadingMd: "var(--graphy-font-line-height-heading-md)", fontLineHeightHeadingLg: "var(--graphy-font-line-height-heading-lg)", fontTickLabel: "var(--graphy-font-tick-label)", fontAxisLabel: "var(--graphy-font-axis-label)", fontDataLabel: "var(--graphy-font-data-label)", fontStackTotal: "var(--graphy-font-stack-total)", fontLegendLabel: "var(--graphy-font-legend-label)", fontSeriesLabel: "var(--graphy-font-series-label)", fontTooltipLabel: "var(--graphy-font-tooltip-label)", fontTooltipHeading: "var(--graphy-font-tooltip-heading)", fontTooltipFooter: "var(--graphy-font-tooltip-footer)", fontJumboTooltipLabel: "var(--graphy-font-jumbo-tooltip-label)", fontJumboTooltip: "var(--graphy-font-jumbo-tooltip)", fontMiniTooltipLabel: "var(--graphy-font-mini-tooltip-label)", fontMiniTooltipFooter: "var(--graphy-font-mini-tooltip-footer)", fontTooltipCaption: "var(--graphy-font-tooltip-caption)", fontTooltipCaptionSmall: "var(--graphy-font-tooltip-caption-small)", fontTrendTag: "var(--graphy-font-trend-tag)", fontTrendTagSmall: "var(--graphy-font-trend-tag-small)", fontGoalLineLabel: "var(--graphy-font-goal-line-label)", fontPieLabel: "var(--graphy-font-pie-label)", fontPieChartTotal: "var(--graphy-font-pie-chart-total)", fontDifferenceArrowSmall: "var(--graphy-font-difference-arrow-small)", fontDifferenceArrowMedium: "var(--graphy-font-difference-arrow-medium)", fontDifferenceArrowLarge: "var(--graphy-font-difference-arrow-large)", fontButton: "var(--graphy-font-button)", fontInput: "var(--graphy-font-input)", fontInputLabel: "var(--graphy-font-input-label)", fontSelectLabel: "var(--graphy-font-select-label)", fontSelectDescription: "var(--graphy-font-select-description)", fontColorSelectLabel: "var(--graphy-font-color-select-label)", fontMenuTitle: "var(--graphy-font-menu-title)", fontMenuGroupTitle: "var(--graphy-font-menu-group-title)", fontMenuItemLabel: "var(--graphy-font-menu-item-label)", fontMenuItemLabelSecondary: "var(--graphy-font-menu-item-label-secondary)", fontUITooltip: "var(--graphy-font-uitooltip)", fontUITooltipSecondary: "var(--graphy-font-uitooltip-secondary)", fontErrorBoundaryTitle: "var(--graphy-font-error-boundary-title)", fontErrorBoundaryMessage: "var(--graphy-font-error-boundary-message)", fontTableCell: "var(--graphy-font-table-cell)", fontTableHeaderCell: "var(--graphy-font-table-header-cell)", fontSourceLabel: "var(--graphy-font-source-label)", fontSourceLink: "var(--graphy-font-source-link)", fontTextEditorH1: "var(--graphy-font-text-editor-h1)", fontTextEditorH2: "var(--graphy-font-text-editor-h2)", fontTextEditorH3: "var(--graphy-font-text-editor-h3)", fontTextEditorH6: "var(--graphy-font-text-editor-h6)", fontTextEditorBody: "var(--graphy-font-text-editor-body)", fontTextEditorLink: "var(--graphy-font-text-editor-link)", fontHighlightModeTitle: "var(--graphy-font-highlight-mode-title)", fontHighlightModeSubtitle: "var(--graphy-font-highlight-mode-subtitle)" };
|
|
441
|
-
const
|
|
442
|
-
'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`,
|
|
441
|
+
const O = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu',
|
|
442
|
+
'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`, Si = O, K = {
|
|
443
443
|
regular: 400,
|
|
444
444
|
medium: 500,
|
|
445
445
|
semibold: 600,
|
|
@@ -457,7 +457,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
457
457
|
headingSm: 1.8,
|
|
458
458
|
headingMd: 2.2,
|
|
459
459
|
headingLg: 2.8
|
|
460
|
-
},
|
|
460
|
+
}, M = {
|
|
461
461
|
xxs: 1,
|
|
462
462
|
xs: 1,
|
|
463
463
|
sm: 1.3,
|
|
@@ -468,10 +468,10 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
468
468
|
headingSm: 1.25,
|
|
469
469
|
headingMd: 1.41,
|
|
470
470
|
headingLg: 1.29
|
|
471
|
-
},
|
|
471
|
+
}, ki = `var(--typography-chart-font-family, ${s.fontFamilyDefault})`, nt = `var(--typography-chart-heading-font-family, ${s.fontFamilyHeading})`, U = (e) => `${e}em`, Yn = {
|
|
472
472
|
textScale: "1",
|
|
473
|
-
fontFamilyDefault:
|
|
474
|
-
fontFamilyHeading:
|
|
473
|
+
fontFamilyDefault: O,
|
|
474
|
+
fontFamilyHeading: Si,
|
|
475
475
|
fontWeightRegular: K.regular.toString(),
|
|
476
476
|
fontWeightMedium: K.medium.toString(),
|
|
477
477
|
fontWeightSemibold: K.semibold.toString(),
|
|
@@ -484,22 +484,22 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
484
484
|
fontSizeMd: U(N.md),
|
|
485
485
|
fontSizeLg: U(N.lg),
|
|
486
486
|
fontSizeXl: U(N.xl),
|
|
487
|
-
fontLineHeightXxs:
|
|
488
|
-
fontLineHeightXs:
|
|
489
|
-
fontLineHeightSm:
|
|
490
|
-
fontLineHeightMd:
|
|
491
|
-
fontLineHeightLg:
|
|
492
|
-
fontLineHeightXl:
|
|
487
|
+
fontLineHeightXxs: M.xxs.toString(),
|
|
488
|
+
fontLineHeightXs: M.xs.toString(),
|
|
489
|
+
fontLineHeightSm: M.sm.toString(),
|
|
490
|
+
fontLineHeightMd: M.md.toString(),
|
|
491
|
+
fontLineHeightLg: M.lg.toString(),
|
|
492
|
+
fontLineHeightXl: M.xl.toString()
|
|
493
493
|
}, jn = {
|
|
494
494
|
fontSizeEditorBody: U(N.editorBody),
|
|
495
495
|
fontSizeHeadingSm: U(N.headingSm),
|
|
496
496
|
fontSizeHeadingMd: U(N.headingMd),
|
|
497
497
|
fontSizeHeadingLg: U(N.headingLg),
|
|
498
|
-
fontLineHeightEditorBody:
|
|
499
|
-
fontLineHeightHeadingSm:
|
|
500
|
-
fontLineHeightHeadingMd:
|
|
501
|
-
fontLineHeightHeadingLg:
|
|
502
|
-
}, b = (e, t, n, r =
|
|
498
|
+
fontLineHeightEditorBody: M.editorBody.toString(),
|
|
499
|
+
fontLineHeightHeadingSm: M.headingSm.toString(),
|
|
500
|
+
fontLineHeightHeadingMd: M.headingMd.toString(),
|
|
501
|
+
fontLineHeightHeadingLg: M.headingLg.toString()
|
|
502
|
+
}, b = (e, t, n, r = ki) => `${e} ${t}/${n} ${r}`, qn = {
|
|
503
503
|
// Axes
|
|
504
504
|
fontTickLabel: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm),
|
|
505
505
|
fontAxisLabel: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm),
|
|
@@ -557,13 +557,13 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
557
557
|
fontSourceLabel: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm),
|
|
558
558
|
fontSourceLink: b(s.fontWeightRegular, s.fontSizeSm, s.fontLineHeightSm),
|
|
559
559
|
// Text editor
|
|
560
|
-
fontTextEditorH1: b(s.fontWeightBold, s.fontSizeHeadingLg, s.fontLineHeightHeadingLg,
|
|
561
|
-
fontTextEditorH2: b(s.fontWeightBold, s.fontSizeHeadingMd, s.fontLineHeightHeadingMd,
|
|
560
|
+
fontTextEditorH1: b(s.fontWeightBold, s.fontSizeHeadingLg, s.fontLineHeightHeadingLg, nt),
|
|
561
|
+
fontTextEditorH2: b(s.fontWeightBold, s.fontSizeHeadingMd, s.fontLineHeightHeadingMd, nt),
|
|
562
562
|
fontTextEditorH3: b(
|
|
563
563
|
s.fontWeightSemibold,
|
|
564
564
|
s.fontSizeHeadingSm,
|
|
565
565
|
s.fontLineHeightHeadingSm,
|
|
566
|
-
|
|
566
|
+
nt
|
|
567
567
|
),
|
|
568
568
|
fontTextEditorH6: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm),
|
|
569
569
|
fontTextEditorBody: b(s.fontWeightMedium, s.fontSizeEditorBody, s.fontLineHeightEditorBody),
|
|
@@ -571,15 +571,15 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
571
571
|
// Highlight mode
|
|
572
572
|
fontHighlightModeTitle: b(s.fontWeightBold, s.fontSizeMd, s.fontLineHeightMd),
|
|
573
573
|
fontHighlightModeSubtitle: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm)
|
|
574
|
-
},
|
|
574
|
+
}, Li = {
|
|
575
575
|
small: 1.9,
|
|
576
576
|
medium: 2.3,
|
|
577
577
|
large: 2.6
|
|
578
|
-
},
|
|
578
|
+
}, Ci = {
|
|
579
579
|
small: 1,
|
|
580
580
|
medium: 1,
|
|
581
581
|
large: 1.2
|
|
582
|
-
},
|
|
582
|
+
}, wi = O, Kn = M.sm, Jn = 2, Zn = 24, Qn = 12, er = 10, tr = 8, nr = 8, rr = 8, or = 2, ar = 1, ir = 2, sr = 4, lr = N.sm, cr = M.sm, dr = O, Ti = ir * sr, ur = !1, Fe = 6, hr = 10, P = (e, t) => `color-mix(in srgb, transparent, ${e} ${t * 100}%)`, qe = (e, t) => `hsl(from ${e} h s calc(l * ${1 - t}))`, gr = (e, t) => `hsl(from ${e} h s calc(l * ${1 + t}))`, ut = (e, t, n) => `color-mix(in srgb, ${e}, ${t} ${n * 100}%)`, Ai = (e) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e), Ei = (e) => e.length === 0 ? !1 : typeof CSS < "u" && typeof CSS.supports == "function" ? CSS.supports("color", e) : /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e), W = (e) => `${e}px`, pr = {
|
|
583
583
|
graphPadding: W(pn),
|
|
584
584
|
gridLineWidth: "1px",
|
|
585
585
|
gridLineDash: "2 3",
|
|
@@ -613,7 +613,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
613
613
|
zIndexToolbar: "10",
|
|
614
614
|
zIndexToolbarTooltip: "20",
|
|
615
615
|
zIndexToolbarPopover: "30"
|
|
616
|
-
},
|
|
616
|
+
}, _i = 8, se = (e) => `${_i * e}px`, yr = {
|
|
617
617
|
spaceXxs: se(0.25),
|
|
618
618
|
// space(0.25) → 2px
|
|
619
619
|
spaceXs: se(0.5),
|
|
@@ -626,7 +626,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
626
626
|
// space(1.5) → 12px
|
|
627
627
|
spaceXl: se(2)
|
|
628
628
|
// space(2) → 16px
|
|
629
|
-
},
|
|
629
|
+
}, Pi = {
|
|
630
630
|
transparent: "transparent",
|
|
631
631
|
white: "#FFFFFF",
|
|
632
632
|
black: "#000000",
|
|
@@ -653,7 +653,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
653
653
|
purple50: "#7B56EA",
|
|
654
654
|
purple30: "#E093FE",
|
|
655
655
|
greyGradient80: "linear-gradient(to top, #222429, #31353f)"
|
|
656
|
-
},
|
|
656
|
+
}, Hi = {
|
|
657
657
|
textPrimary: s.grey0,
|
|
658
658
|
textSecondary: P(s.textPrimary, 0.8),
|
|
659
659
|
textDisabled: P(s.textPrimary, 0.5),
|
|
@@ -672,7 +672,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
672
672
|
raisedBackground: s.grey80,
|
|
673
673
|
overlayBackground: s.grey90,
|
|
674
674
|
overlayBorderGradient: s.greyGradient80
|
|
675
|
-
},
|
|
675
|
+
}, Fi = {
|
|
676
676
|
graphBackground: s.grey90,
|
|
677
677
|
gridLineColor: s.border10,
|
|
678
678
|
originLineColor: s.grey0,
|
|
@@ -717,7 +717,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
717
717
|
arrowAnnotationStickerOutlineColorInverse: "#1D2129",
|
|
718
718
|
annotationFrameBorderColor: s.blue60,
|
|
719
719
|
annotationMenuTriggerIconColor: s.white
|
|
720
|
-
},
|
|
720
|
+
}, Ni = {
|
|
721
721
|
canvasDefault: "#FFFFFF",
|
|
722
722
|
canvasBlue: "#60a5fa",
|
|
723
723
|
canvasCyan: "#22d3ee",
|
|
@@ -729,20 +729,20 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
729
729
|
canvasPurple: "#a78bfa",
|
|
730
730
|
canvasGray: "#a8a29e",
|
|
731
731
|
canvasInverse: "#000000"
|
|
732
|
-
},
|
|
733
|
-
...
|
|
734
|
-
...
|
|
732
|
+
}, Bi = {
|
|
733
|
+
...Pi,
|
|
734
|
+
...Hi,
|
|
735
735
|
...fr,
|
|
736
736
|
...mr,
|
|
737
737
|
...yr,
|
|
738
738
|
...vr,
|
|
739
|
-
...
|
|
740
|
-
...
|
|
739
|
+
...Fi,
|
|
740
|
+
...Ni,
|
|
741
741
|
...pr,
|
|
742
742
|
...Yn,
|
|
743
743
|
...jn,
|
|
744
744
|
...qn
|
|
745
|
-
},
|
|
745
|
+
}, Ii = {
|
|
746
746
|
transparent: "transparent",
|
|
747
747
|
white: "#FFFFFF",
|
|
748
748
|
black: "#000000",
|
|
@@ -769,7 +769,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
769
769
|
purple50: "#7B56EA",
|
|
770
770
|
purple30: "#E093FE",
|
|
771
771
|
greyGradient80: "linear-gradient(to top, #F0F0F1, #F9F9FF)"
|
|
772
|
-
},
|
|
772
|
+
}, Di = {
|
|
773
773
|
textPrimary: s.black,
|
|
774
774
|
textSecondary: P(s.textPrimary, 0.6),
|
|
775
775
|
textDisabled: P(s.textPrimary, 0.5),
|
|
@@ -788,7 +788,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
788
788
|
raisedBackground: s.grey85,
|
|
789
789
|
overlayBackground: s.grey100,
|
|
790
790
|
overlayBorderGradient: s.border10
|
|
791
|
-
},
|
|
791
|
+
}, Mi = {
|
|
792
792
|
graphBackground: s.grey100,
|
|
793
793
|
gridLineColor: s.border10,
|
|
794
794
|
originLineColor: s.grey0,
|
|
@@ -833,7 +833,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
833
833
|
arrowAnnotationStickerOutlineColorInverse: "#FFFFFF",
|
|
834
834
|
annotationFrameBorderColor: s.blue60,
|
|
835
835
|
annotationMenuTriggerIconColor: "#3d414c"
|
|
836
|
-
},
|
|
836
|
+
}, Ri = {
|
|
837
837
|
canvasDefault: "#000000",
|
|
838
838
|
canvasBlue: "#3b82f6",
|
|
839
839
|
canvasCyan: "#06b6d4",
|
|
@@ -845,21 +845,21 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
845
845
|
canvasPurple: "#8b5cf6",
|
|
846
846
|
canvasGray: "#78716c",
|
|
847
847
|
canvasInverse: "#ffffff"
|
|
848
|
-
},
|
|
849
|
-
...
|
|
850
|
-
...
|
|
848
|
+
}, Oi = {
|
|
849
|
+
...Ii,
|
|
850
|
+
...Di,
|
|
851
851
|
...fr,
|
|
852
852
|
...mr,
|
|
853
853
|
...yr,
|
|
854
854
|
...vr,
|
|
855
|
-
...
|
|
856
|
-
...
|
|
855
|
+
...Mi,
|
|
856
|
+
...Ri,
|
|
857
857
|
...pr,
|
|
858
858
|
...Yn,
|
|
859
859
|
...jn,
|
|
860
860
|
...qn
|
|
861
861
|
}, br = (e, t = {}) => ({
|
|
862
|
-
...e === "dark" ?
|
|
862
|
+
...e === "dark" ? Bi : Oi,
|
|
863
863
|
...t
|
|
864
864
|
}), xr = (e, t) => {
|
|
865
865
|
const n = br(e, t), r = $(n.legendPillPaddingInline, rr), o = $(n.legendPillPaddingBlock, or), i = $(n.legendPillBorderWidth, ar);
|
|
@@ -878,14 +878,14 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
878
878
|
headlineRowGap: $(n.headlineRowGap, Jn),
|
|
879
879
|
headlineItemGap: $(n.headlineItemGap, Zn)
|
|
880
880
|
};
|
|
881
|
-
},
|
|
881
|
+
}, zi = Object.freeze(xr("light"));
|
|
882
882
|
function $(e, t) {
|
|
883
883
|
const n = e.trim();
|
|
884
884
|
if (!/^-?\d*\.?\d+(px)?$/.test(n)) return t;
|
|
885
885
|
const r = Number.parseFloat(n);
|
|
886
886
|
return Number.isFinite(r) ? r : t;
|
|
887
887
|
}
|
|
888
|
-
const Sr = fe(
|
|
888
|
+
const Sr = fe(zi), Gi = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Provider, { value: e, children: t }), Tt = () => ee(Sr), At = N.sm, kr = O, Lr = 10, te = (e, t) => e * Lr * t, Wi = (e, t, n) => {
|
|
889
889
|
const { tickLabelOffset: r } = n;
|
|
890
890
|
return (o) => {
|
|
891
891
|
const i = o.position === "top" || o.position === "bottom", c = o.ticks.map(
|
|
@@ -906,40 +906,40 @@ const Sr = fe(Mi), Di = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Pr
|
|
|
906
906
|
l
|
|
907
907
|
) + r;
|
|
908
908
|
};
|
|
909
|
-
}, Wt = (e, t) => Math.min(Math.max(...e), t),
|
|
910
|
-
const { labelLineHeight: o, labelFontWeight: i } =
|
|
909
|
+
}, Wt = (e, t) => Math.min(Math.max(...e), t), $i = (e) => () => te(At, e), Xi = (e, t) => (n, r) => {
|
|
910
|
+
const { labelLineHeight: o, labelFontWeight: i } = Fo(r, t);
|
|
911
911
|
return e.measureText(n, {
|
|
912
|
-
family:
|
|
912
|
+
family: O,
|
|
913
913
|
size: o,
|
|
914
914
|
weight: i
|
|
915
915
|
});
|
|
916
|
-
},
|
|
917
|
-
const i = Cr(r, o, e, t, n.headlineRowGap), c =
|
|
916
|
+
}, Vi = (e, t, n) => (r, o) => {
|
|
917
|
+
const i = Cr(r, o, e, t, n.headlineRowGap), c = wr(i.map((d) => d.width)), l = Math.max(0, i.length - 1) * n.headlineItemGap;
|
|
918
918
|
return {
|
|
919
919
|
width: c + l,
|
|
920
920
|
height: Math.max(0, ...i.map((d) => d.height))
|
|
921
921
|
};
|
|
922
|
-
},
|
|
922
|
+
}, Ui = (e, t, n) => (r, o) => Cr(r, o, e, t, n.headlineRowGap).map(
|
|
923
923
|
(i) => i.width
|
|
924
|
-
),
|
|
925
|
-
const o =
|
|
924
|
+
), Yi = (e, t) => (n, r) => {
|
|
925
|
+
const o = ht("value", r, t);
|
|
926
926
|
return { width: e.measureText(n, o).width, height: o.size * Kn };
|
|
927
|
-
},
|
|
928
|
-
const r =
|
|
927
|
+
}, ji = (e, t, n) => {
|
|
928
|
+
const r = Vi(e, t, n), o = Yi(e, t);
|
|
929
929
|
return (i, c) => i.kind === "perGroup" ? r(i, c) : o(i.value, c);
|
|
930
930
|
}, Cr = (e, t, n, r, o) => {
|
|
931
931
|
const i = {
|
|
932
|
-
value:
|
|
933
|
-
label:
|
|
934
|
-
}, c = (l) =>
|
|
932
|
+
value: ht("value", t, r),
|
|
933
|
+
label: ht("label", t, r)
|
|
934
|
+
}, c = (l) => qi(l, i, n);
|
|
935
935
|
return e.items.map((l) => {
|
|
936
936
|
const d = fn(l).map(c), u = Math.max(0, d.length - 1) * o;
|
|
937
937
|
return {
|
|
938
938
|
width: Math.max(0, ...d.map((h) => h.width)),
|
|
939
|
-
height:
|
|
939
|
+
height: wr(d.map((h) => h.height)) + u
|
|
940
940
|
};
|
|
941
941
|
});
|
|
942
|
-
},
|
|
942
|
+
}, qi = (e, t, n) => {
|
|
943
943
|
let r = 0, o = 0;
|
|
944
944
|
for (const i of e.segments)
|
|
945
945
|
if (i.kind === "text") {
|
|
@@ -948,14 +948,14 @@ const Sr = fe(Mi), Di = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Pr
|
|
|
948
948
|
} else
|
|
949
949
|
r += i.size, o = Math.max(o, i.size);
|
|
950
950
|
return { width: r + Math.max(0, e.segments.length - 1) * e.gap, height: o };
|
|
951
|
-
},
|
|
952
|
-
const r = e === "value" ?
|
|
953
|
-
return { family:
|
|
954
|
-
},
|
|
951
|
+
}, ht = (e, t, n) => {
|
|
952
|
+
const r = e === "value" ? Li[t] : Ci[t];
|
|
953
|
+
return { family: wi, size: te(r, n) };
|
|
954
|
+
}, wr = (e) => e.reduce((t, n) => t + n, 0), Tr = (e) => {
|
|
955
955
|
const t = te(lr, e);
|
|
956
956
|
return { fontSizePx: t, lineBoxHeight: t * cr };
|
|
957
|
-
}, Ar = (e, t) => e ? t : 0,
|
|
958
|
-
const { fontSizePx: o, lineBoxHeight: i } =
|
|
957
|
+
}, Ar = (e, t) => e ? t : 0, Ki = (e, t, n) => (r) => {
|
|
958
|
+
const { fontSizePx: o, lineBoxHeight: i } = Tr(t), c = { family: dr, size: o };
|
|
959
959
|
if (r.position === "top" || r.position === "bottom")
|
|
960
960
|
return Math.max(i, n.legendSwatchHeight) + n.legendPillVerticalChrome;
|
|
961
961
|
const d = r.items.map((u) => {
|
|
@@ -963,20 +963,20 @@ const Sr = fe(Mi), Di = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Pr
|
|
|
963
963
|
return g + (g > 0 ? n.legendSwatchGap : 0) + h;
|
|
964
964
|
});
|
|
965
965
|
return Math.max(...d) + n.legendPillHorizontalChrome;
|
|
966
|
-
},
|
|
966
|
+
}, Ji = (e, t) => (n) => e.measureText(n, {
|
|
967
967
|
family: kr,
|
|
968
968
|
size: te(At, t)
|
|
969
|
-
}),
|
|
970
|
-
const o =
|
|
969
|
+
}), Zi = Object.freeze({}), Qi = (e, t, n, r = Zi) => {
|
|
970
|
+
const o = L(r);
|
|
971
971
|
return o.current = r, v(() => {
|
|
972
972
|
if (!e) return null;
|
|
973
|
-
const i =
|
|
973
|
+
const i = Wi(e, t, n), c = $i(t), l = Ki(e, t, n), d = ji(e, t, n), u = Ui(e, t, n), h = {
|
|
974
974
|
measureText: (g, p) => e.measureText(g, p),
|
|
975
975
|
textScale: t
|
|
976
976
|
};
|
|
977
977
|
return {
|
|
978
978
|
measureAxis: (g) => {
|
|
979
|
-
if (
|
|
979
|
+
if (ts(g)) return 0;
|
|
980
980
|
const p = o.current.measureAxis;
|
|
981
981
|
return p ? p(g, h) : i(g);
|
|
982
982
|
},
|
|
@@ -985,17 +985,17 @@ const Sr = fe(Mi), Di = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Pr
|
|
|
985
985
|
return p ? p(g, h) : c();
|
|
986
986
|
},
|
|
987
987
|
measureLegend: (g) => {
|
|
988
|
-
if (
|
|
988
|
+
if (ns(g)) return 0;
|
|
989
989
|
const p = o.current.measureLegend;
|
|
990
990
|
return p ? p(g, h) : l(g);
|
|
991
991
|
},
|
|
992
992
|
measureHeadline: (g, p) => (o.current.measureHeadline ?? d)(g, p),
|
|
993
993
|
measureHeadlineItemWidths: (g, p) => (o.current.measureHeadlineItemWidths ?? u)(g, p),
|
|
994
|
-
measureTickLabel:
|
|
995
|
-
measureDifferenceArrowLabel:
|
|
994
|
+
measureTickLabel: Ji(e, t),
|
|
995
|
+
measureDifferenceArrowLabel: Xi(e, t)
|
|
996
996
|
};
|
|
997
997
|
}, [e, t, n]);
|
|
998
|
-
},
|
|
998
|
+
}, es = ({
|
|
999
999
|
measurer: e,
|
|
1000
1000
|
axes: t,
|
|
1001
1001
|
numberFormat: n,
|
|
@@ -1009,7 +1009,7 @@ const Sr = fe(Mi), Di = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Pr
|
|
|
1009
1009
|
coordSystem: h,
|
|
1010
1010
|
textScale: g,
|
|
1011
1011
|
graphPadding: p
|
|
1012
|
-
}) => v(() => e ? new
|
|
1012
|
+
}) => v(() => e ? new No(e).compile({
|
|
1013
1013
|
axes: t,
|
|
1014
1014
|
numberFormat: n,
|
|
1015
1015
|
parsingLocale: r,
|
|
@@ -1036,7 +1036,7 @@ const Sr = fe(Mi), Di = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Pr
|
|
|
1036
1036
|
g,
|
|
1037
1037
|
p,
|
|
1038
1038
|
e
|
|
1039
|
-
]),
|
|
1039
|
+
]), ts = (e) => !e.isVisible || e.ticks.length === 0, ns = (e) => e.items.length === 0, $t = "data-variant", Er = sa.extend({
|
|
1040
1040
|
addAttributes() {
|
|
1041
1041
|
return {
|
|
1042
1042
|
variant: {
|
|
@@ -1046,7 +1046,7 @@ const Sr = fe(Mi), Di = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Pr
|
|
|
1046
1046
|
}
|
|
1047
1047
|
};
|
|
1048
1048
|
}
|
|
1049
|
-
}),
|
|
1049
|
+
}), rs = ia.create({
|
|
1050
1050
|
name: "preventBackspaceAcrossTitleBoundary",
|
|
1051
1051
|
addOptions() {
|
|
1052
1052
|
return { isTitleVisible: !0 };
|
|
@@ -1062,28 +1062,28 @@ const Sr = fe(Mi), Di = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Pr
|
|
|
1062
1062
|
}
|
|
1063
1063
|
};
|
|
1064
1064
|
}
|
|
1065
|
-
}),
|
|
1065
|
+
}), os = ({
|
|
1066
1066
|
titlePlaceholder: e,
|
|
1067
1067
|
subtitlePlaceholder: t,
|
|
1068
1068
|
isTitleVisible: n,
|
|
1069
1069
|
isSubtitleVisible: r
|
|
1070
1070
|
}) => [
|
|
1071
|
-
|
|
1071
|
+
is({ isTitleVisible: n, isSubtitleVisible: r }),
|
|
1072
1072
|
Er,
|
|
1073
1073
|
Fn,
|
|
1074
|
-
|
|
1074
|
+
Rn,
|
|
1075
1075
|
_n.configure({ levels: [1, 2, 3] }),
|
|
1076
1076
|
An,
|
|
1077
1077
|
Pn,
|
|
1078
|
-
|
|
1078
|
+
Mn,
|
|
1079
1079
|
Nn.configure({ types: ["heading", "paragraph"] }),
|
|
1080
1080
|
Hn.configure({ openOnClick: !1, autolink: !0 }),
|
|
1081
1081
|
Bn,
|
|
1082
1082
|
In,
|
|
1083
|
-
|
|
1083
|
+
Dn,
|
|
1084
1084
|
En,
|
|
1085
|
-
|
|
1086
|
-
|
|
1085
|
+
rs.configure({ isTitleVisible: n }),
|
|
1086
|
+
On.configure({
|
|
1087
1087
|
showOnlyCurrent: !1,
|
|
1088
1088
|
placeholder: ({ pos: o, editor: i }) => {
|
|
1089
1089
|
if (n && o === 0) return e;
|
|
@@ -1091,68 +1091,68 @@ const Sr = fe(Mi), Di = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Pr
|
|
|
1091
1091
|
return r && o === c ? t : "";
|
|
1092
1092
|
}
|
|
1093
1093
|
})
|
|
1094
|
-
],
|
|
1095
|
-
|
|
1094
|
+
], as = ({ placeholder: e }) => [
|
|
1095
|
+
ct,
|
|
1096
1096
|
Er,
|
|
1097
1097
|
Fn,
|
|
1098
|
-
|
|
1098
|
+
Rn,
|
|
1099
1099
|
_n.configure({ levels: [1, 2, 3] }),
|
|
1100
1100
|
An,
|
|
1101
1101
|
Pn,
|
|
1102
|
-
|
|
1102
|
+
Mn,
|
|
1103
1103
|
Nn.configure({ types: ["heading", "paragraph"] }),
|
|
1104
1104
|
Hn.configure({ openOnClick: !1, autolink: !0 }),
|
|
1105
1105
|
Bn,
|
|
1106
1106
|
In,
|
|
1107
|
-
|
|
1107
|
+
Dn,
|
|
1108
1108
|
En,
|
|
1109
|
-
|
|
1109
|
+
On.configure({
|
|
1110
1110
|
showOnlyCurrent: !1,
|
|
1111
1111
|
placeholder: ({ pos: t }) => t === 0 ? e : ""
|
|
1112
1112
|
})
|
|
1113
|
-
],
|
|
1113
|
+
], is = ({
|
|
1114
1114
|
isTitleVisible: e,
|
|
1115
1115
|
isSubtitleVisible: t
|
|
1116
|
-
}) => e && t ?
|
|
1116
|
+
}) => e && t ? ct.extend({ content: "block{2,}" }) : ct, De = 0.1, ss = { light: 0.05, dark: 0.1 }, ls = (e, t) => {
|
|
1117
1117
|
switch (e.type) {
|
|
1118
1118
|
case "none":
|
|
1119
1119
|
return null;
|
|
1120
1120
|
case "solid":
|
|
1121
1121
|
return e.color;
|
|
1122
1122
|
case "tinted":
|
|
1123
|
-
return
|
|
1123
|
+
return us(e.color, t);
|
|
1124
1124
|
case "gradient":
|
|
1125
|
-
return
|
|
1125
|
+
return hs(e.color, t);
|
|
1126
1126
|
case "preset":
|
|
1127
|
-
return
|
|
1127
|
+
return Bo[e.preset];
|
|
1128
1128
|
}
|
|
1129
|
-
},
|
|
1129
|
+
}, cs = (e) => e.type === "none" ? 0 : e.width, ds = (e, t, n) => {
|
|
1130
1130
|
if (e.type === "solid")
|
|
1131
1131
|
return e.color;
|
|
1132
1132
|
if (e.type === "tinted")
|
|
1133
|
-
return
|
|
1134
|
-
},
|
|
1135
|
-
const r = e, o = t === "dark" ?
|
|
1133
|
+
return ut(n, e.color, ss[t]);
|
|
1134
|
+
}, us = (e, t) => t === "dark" ? qe(e, De) : gr(e, De), hs = (e, t, n = 90) => {
|
|
1135
|
+
const r = e, o = t === "dark" ? qe(e, De) : gr(e, De);
|
|
1136
1136
|
return `linear-gradient(${n}deg, ${r} 0%, ${o} 100%)`;
|
|
1137
1137
|
};
|
|
1138
|
-
var
|
|
1138
|
+
var gs = "bow4tg0", ps = "bow4tg1", fs = "bow4tg2", ms = "bow4tg3", vs = "_1ii3bsb0", ys = "_1ii3bsb1";
|
|
1139
1139
|
const Et = fe(null), _t = () => {
|
|
1140
1140
|
const e = ee(Et);
|
|
1141
1141
|
if (!e) throw new Error("useThemeContext must be used inside a <ThemeProvider>.");
|
|
1142
1142
|
return e;
|
|
1143
|
-
},
|
|
1143
|
+
}, bs = ({ theme: e, themeOverrides: t = {}, appearance: n, children: r }) => {
|
|
1144
1144
|
const o = v(() => br(e, t), [e, t]), i = v(() => {
|
|
1145
1145
|
const l = {
|
|
1146
1146
|
[s.textScale]: String(n.textScale)
|
|
1147
1147
|
};
|
|
1148
1148
|
for (const [u, h] of Object.entries(t))
|
|
1149
1149
|
l[s[u]] = h;
|
|
1150
|
-
const d =
|
|
1151
|
-
return d !== void 0 && (l[s.graphBackground] = d),
|
|
1150
|
+
const d = ds(n.background, e, o.graphBackground);
|
|
1151
|
+
return d !== void 0 && (l[s.graphBackground] = d), ha(l);
|
|
1152
1152
|
}, [n.textScale, n.background, e, o.graphBackground, t]), c = v(
|
|
1153
1153
|
() => ({
|
|
1154
1154
|
theme: e,
|
|
1155
|
-
themeClass: e === "dark" ?
|
|
1155
|
+
themeClass: e === "dark" ? ys : vs,
|
|
1156
1156
|
inlineVarsStyle: i,
|
|
1157
1157
|
themeValues: o
|
|
1158
1158
|
}),
|
|
@@ -1160,14 +1160,14 @@ const Et = fe(null), _t = () => {
|
|
|
1160
1160
|
);
|
|
1161
1161
|
return /* @__PURE__ */ a(Et.Provider, { value: c, children: r });
|
|
1162
1162
|
}, ae = ({ children: e, className: t, style: n }) => {
|
|
1163
|
-
const r = ee(Et), o = r ? re(r.themeClass,
|
|
1163
|
+
const r = ee(Et), o = r ? re(r.themeClass, ps) : void 0, i = r ? { ...r.inlineVarsStyle, ...n } : n;
|
|
1164
1164
|
return /* @__PURE__ */ a("div", { className: re(o, t), style: i, children: e });
|
|
1165
|
-
},
|
|
1166
|
-
var
|
|
1167
|
-
const
|
|
1165
|
+
}, xs = "graphy_root", ie = () => typeof document > "u" ? null : document.getElementById(xs) ?? document.body;
|
|
1166
|
+
var Ss = "yp3g0k0", ks = "yp3g0k1", _r = "yp3g0k3", Ls = "yp3g0k4", Pr = "yp3g0k5", gt = "yp3g0k6", Cs = "yp3g0k7", ws = "yp3g0k8", Hr = "yp3g0k9", Ts = "yp3g0ka", As = "yp3g0kb", Es = "yp3g0kc", _s = "yp3g0kd", Ps = "yp3g0ke";
|
|
1167
|
+
const Hs = Un.map((e) => s[e]), Fs = Object.fromEntries(
|
|
1168
1168
|
Un.map((e) => [s[e], e])
|
|
1169
|
-
),
|
|
1170
|
-
const o = J(), i =
|
|
1169
|
+
), Ns = ({ editor: e, currentColor: t, isOpen: n, onOpenChange: r }) => {
|
|
1170
|
+
const o = J(), i = Is(), c = Oe(
|
|
1171
1171
|
(d) => {
|
|
1172
1172
|
e.chain().setColor(d).run();
|
|
1173
1173
|
},
|
|
@@ -1181,17 +1181,17 @@ const As = Un.map((e) => s[e]), Es = Object.fromEntries(
|
|
|
1181
1181
|
{
|
|
1182
1182
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
1183
1183
|
"aria-label": o("graph.toolbar.color.label"),
|
|
1184
|
-
className:
|
|
1184
|
+
className: Ss,
|
|
1185
1185
|
onMouseDown: (d) => d.preventDefault(),
|
|
1186
|
-
children: /* @__PURE__ */ a("span", { className:
|
|
1186
|
+
children: /* @__PURE__ */ a("span", { className: ks, style: { background: t ?? "transparent" } })
|
|
1187
1187
|
}
|
|
1188
1188
|
),
|
|
1189
|
-
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { sideOffset: 6, align: "start", className: _r, children: /* @__PURE__ */ m(F.Popup, { className:
|
|
1189
|
+
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { sideOffset: 6, align: "start", className: _r, children: /* @__PURE__ */ m(F.Popup, { className: Ls, onMouseDown: (d) => d.preventDefault(), children: [
|
|
1190
1190
|
/* @__PURE__ */ a(
|
|
1191
1191
|
Xt,
|
|
1192
1192
|
{
|
|
1193
1193
|
title: o("graph.colorDropdown.colors"),
|
|
1194
|
-
colors:
|
|
1194
|
+
colors: Hs,
|
|
1195
1195
|
currentColor: t,
|
|
1196
1196
|
onPick: l
|
|
1197
1197
|
}
|
|
@@ -1205,58 +1205,58 @@ const As = Un.map((e) => s[e]), Es = Object.fromEntries(
|
|
|
1205
1205
|
onPick: l
|
|
1206
1206
|
}
|
|
1207
1207
|
),
|
|
1208
|
-
/* @__PURE__ */ a(
|
|
1208
|
+
/* @__PURE__ */ a(Bs, { value: t ?? "#000000", onChange: c })
|
|
1209
1209
|
] }) }) }) })
|
|
1210
1210
|
] });
|
|
1211
1211
|
}, Xt = ({ title: e, colors: t, currentColor: n, onPick: r }) => /* @__PURE__ */ m("div", { className: Pr, children: [
|
|
1212
|
-
/* @__PURE__ */ a("div", { className:
|
|
1213
|
-
/* @__PURE__ */ a("div", { className:
|
|
1212
|
+
/* @__PURE__ */ a("div", { className: gt, children: e }),
|
|
1213
|
+
/* @__PURE__ */ a("div", { className: Cs, children: t.map((o) => /* @__PURE__ */ a(
|
|
1214
1214
|
"button",
|
|
1215
1215
|
{
|
|
1216
1216
|
type: "button",
|
|
1217
1217
|
"aria-label": o,
|
|
1218
|
-
className:
|
|
1219
|
-
"data-active":
|
|
1218
|
+
className: ws,
|
|
1219
|
+
"data-active": Ms(o, n),
|
|
1220
1220
|
onMouseDown: (i) => i.preventDefault(),
|
|
1221
1221
|
onClick: () => r(o),
|
|
1222
1222
|
children: /* @__PURE__ */ a("span", { className: Hr, style: Fr(o) })
|
|
1223
1223
|
},
|
|
1224
1224
|
o
|
|
1225
1225
|
)) })
|
|
1226
|
-
] }),
|
|
1227
|
-
const n = J(), [r, o] = E(!1), i =
|
|
1226
|
+
] }), Bs = ({ value: e, onChange: t }) => {
|
|
1227
|
+
const n = J(), [r, o] = E(!1), i = Ei(e) ? e : "#000000", c = Ds(i);
|
|
1228
1228
|
return /* @__PURE__ */ m(F.Root, { open: r, onOpenChange: o, children: [
|
|
1229
1229
|
/* @__PURE__ */ m("div", { className: Pr, children: [
|
|
1230
|
-
/* @__PURE__ */ a("div", { className:
|
|
1230
|
+
/* @__PURE__ */ a("div", { className: gt, children: n("graph.colorDropdown.custom") }),
|
|
1231
1231
|
/* @__PURE__ */ m(
|
|
1232
1232
|
F.Trigger,
|
|
1233
1233
|
{
|
|
1234
|
-
className:
|
|
1234
|
+
className: Ts,
|
|
1235
1235
|
onMouseDown: (l) => l.preventDefault(),
|
|
1236
1236
|
"aria-label": n("graph.colorDropdown.pickCustom"),
|
|
1237
1237
|
children: [
|
|
1238
1238
|
/* @__PURE__ */ a("span", { className: Hr, style: Fr(i) }),
|
|
1239
|
-
/* @__PURE__ */ a("span", { className:
|
|
1239
|
+
/* @__PURE__ */ a("span", { className: As, children: c })
|
|
1240
1240
|
]
|
|
1241
1241
|
}
|
|
1242
1242
|
)
|
|
1243
1243
|
] }),
|
|
1244
|
-
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { side: "right", align: "start", sideOffset: 18, className: _r, children: /* @__PURE__ */ m(F.Popup, { className:
|
|
1245
|
-
/* @__PURE__ */ a("div", { className:
|
|
1246
|
-
/* @__PURE__ */ a(
|
|
1244
|
+
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { side: "right", align: "start", sideOffset: 18, className: _r, children: /* @__PURE__ */ m(F.Popup, { className: Es, onMouseDown: (l) => l.preventDefault(), children: [
|
|
1245
|
+
/* @__PURE__ */ a("div", { className: gt, children: n("graph.colorDropdown.pickColor") }),
|
|
1246
|
+
/* @__PURE__ */ a(ga, { color: c, onChange: t, className: _s }),
|
|
1247
1247
|
/* @__PURE__ */ a(
|
|
1248
|
-
|
|
1248
|
+
pa,
|
|
1249
1249
|
{
|
|
1250
1250
|
color: c,
|
|
1251
1251
|
onChange: t,
|
|
1252
1252
|
prefixed: !0,
|
|
1253
|
-
className:
|
|
1253
|
+
className: Ps,
|
|
1254
1254
|
onMouseDown: (l) => l.stopPropagation()
|
|
1255
1255
|
}
|
|
1256
1256
|
)
|
|
1257
1257
|
] }) }) }) })
|
|
1258
1258
|
] });
|
|
1259
|
-
},
|
|
1259
|
+
}, Is = () => {
|
|
1260
1260
|
const e = B((t) => t.scales.color);
|
|
1261
1261
|
return v(() => {
|
|
1262
1262
|
if (!e || e.kind !== "visual") return [];
|
|
@@ -1269,13 +1269,13 @@ const As = Un.map((e) => s[e]), Es = Object.fromEntries(
|
|
|
1269
1269
|
}, [e]);
|
|
1270
1270
|
}, Fr = (e) => ({
|
|
1271
1271
|
background: e,
|
|
1272
|
-
border: `1px solid ${
|
|
1273
|
-
}),
|
|
1272
|
+
border: `1px solid ${qe(e, 0.1)}`
|
|
1273
|
+
}), Ds = (e) => {
|
|
1274
1274
|
const { themeValues: t } = _t();
|
|
1275
|
-
if (
|
|
1276
|
-
const n =
|
|
1275
|
+
if (Ai(e)) return e.toUpperCase();
|
|
1276
|
+
const n = Fs[e];
|
|
1277
1277
|
return n ? t[n].toUpperCase() : "#000000";
|
|
1278
|
-
},
|
|
1278
|
+
}, Ms = (e, t) => t === null ? !1 : e.toLowerCase() === t.toLowerCase(), Rs = {
|
|
1279
1279
|
xxs: 8,
|
|
1280
1280
|
xs: 12,
|
|
1281
1281
|
sm: 16,
|
|
@@ -1283,13 +1283,13 @@ const As = Un.map((e) => s[e]), Es = Object.fromEntries(
|
|
|
1283
1283
|
lg: 24,
|
|
1284
1284
|
xl: 36
|
|
1285
1285
|
};
|
|
1286
|
-
var
|
|
1286
|
+
var Os = { primary: "asohov1 asohov0", secondary: "asohov2 asohov0" };
|
|
1287
1287
|
const Z = ({ children: e, title: t, variant: n = "primary", size: r = "sm", ...o }) => {
|
|
1288
|
-
const i = vt(), c =
|
|
1288
|
+
const i = vt(), c = Rs[r];
|
|
1289
1289
|
return /* @__PURE__ */ m(
|
|
1290
1290
|
"svg",
|
|
1291
1291
|
{
|
|
1292
|
-
className:
|
|
1292
|
+
className: Os[n],
|
|
1293
1293
|
"aria-labelledby": t ? i : void 0,
|
|
1294
1294
|
height: c,
|
|
1295
1295
|
width: c,
|
|
@@ -1303,37 +1303,37 @@ const Z = ({ children: e, title: t, variant: n = "primary", size: r = "sm", ...o
|
|
|
1303
1303
|
]
|
|
1304
1304
|
}
|
|
1305
1305
|
);
|
|
1306
|
-
}, Nr = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "m6 9 6 6 6-6" }) }) }),
|
|
1307
|
-
{ id: "modern", label: "Modern", preview: "Aa", fontFamily:
|
|
1306
|
+
}, Nr = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "m6 9 6 6 6-6" }) }) }), zs = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", Br = `'Aeonik', 'Aeonik Fallback', ${O}`, Gs = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Ws = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", $s = `var(--brand-font-family), ${Br}`, pt = [
|
|
1307
|
+
{ id: "modern", label: "Modern", preview: "Aa", fontFamily: O },
|
|
1308
1308
|
{ id: "fresh", label: "Fresh", preview: "Aa", fontFamily: Br },
|
|
1309
|
-
{ id: "timeless", label: "Timeless", preview: "Aa", fontFamily:
|
|
1310
|
-
{ id: "technical", label: "Technical", preview: "00", fontFamily:
|
|
1311
|
-
{ id: "fineliner", label: "Fineliner", preview: "Aa", fontFamily:
|
|
1312
|
-
{ id: "brand", label: "Brand", preview: "Aa", fontFamily:
|
|
1313
|
-
],
|
|
1314
|
-
var Ir = "_1qkyw7q0",
|
|
1315
|
-
const
|
|
1316
|
-
const o = J(), i =
|
|
1309
|
+
{ id: "timeless", label: "Timeless", preview: "Aa", fontFamily: zs },
|
|
1310
|
+
{ id: "technical", label: "Technical", preview: "00", fontFamily: Gs },
|
|
1311
|
+
{ id: "fineliner", label: "Fineliner", preview: "Aa", fontFamily: Ws },
|
|
1312
|
+
{ id: "brand", label: "Brand", preview: "Aa", fontFamily: $s }
|
|
1313
|
+
], Xs = (e) => e ? pt.find((t) => t.fontFamily === e) ?? null : null;
|
|
1314
|
+
var Ir = "_1qkyw7q0", Dr = "_1qkyw7q1", Mr = "_1qkyw7q3", Rr = "_1qkyw7q4", Or = "_1qkyw7q5";
|
|
1315
|
+
const Vs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) => {
|
|
1316
|
+
const o = J(), i = Xs(t) ?? pt[0], c = (l) => {
|
|
1317
1317
|
e.chain().focus().setFontFamily(l.fontFamily).run();
|
|
1318
1318
|
};
|
|
1319
|
-
return /* @__PURE__ */ m(
|
|
1319
|
+
return /* @__PURE__ */ m(D.Root, { open: n, onOpenChange: r, children: [
|
|
1320
1320
|
/* @__PURE__ */ m(
|
|
1321
|
-
|
|
1321
|
+
D.Trigger,
|
|
1322
1322
|
{
|
|
1323
1323
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
1324
1324
|
"aria-label": o("graph.toolbar.font.ariaLabel"),
|
|
1325
1325
|
className: Ir,
|
|
1326
1326
|
onMouseDown: (l) => l.preventDefault(),
|
|
1327
1327
|
children: [
|
|
1328
|
-
/* @__PURE__ */ a("span", { className:
|
|
1328
|
+
/* @__PURE__ */ a("span", { className: Dr, style: { fontFamily: i?.fontFamily }, children: i?.preview }),
|
|
1329
1329
|
/* @__PURE__ */ a(Nr, { size: "sm" })
|
|
1330
1330
|
]
|
|
1331
1331
|
}
|
|
1332
1332
|
),
|
|
1333
|
-
/* @__PURE__ */ a(
|
|
1334
|
-
|
|
1333
|
+
/* @__PURE__ */ a(D.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(D.Positioner, { side: "bottom", align: "start", sideOffset: 6, className: Mr, children: /* @__PURE__ */ a(D.Popup, { className: Rr, onMouseDown: (l) => l.preventDefault(), children: pt.map((l) => /* @__PURE__ */ a(
|
|
1334
|
+
D.Item,
|
|
1335
1335
|
{
|
|
1336
|
-
className:
|
|
1336
|
+
className: Or,
|
|
1337
1337
|
"data-selected": l.id === i?.id,
|
|
1338
1338
|
onClick: () => c(l),
|
|
1339
1339
|
children: /* @__PURE__ */ a("span", { style: { fontFamily: l.fontFamily }, children: l.label })
|
|
@@ -1351,34 +1351,34 @@ const Gs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) =>
|
|
|
1351
1351
|
{ id: "h3", translationKey: "graph.toolbar.heading.heading3", previewFont: s.fontTextEditorH3 },
|
|
1352
1352
|
{ id: "h2", translationKey: "graph.toolbar.heading.heading2", previewFont: s.fontTextEditorH2 },
|
|
1353
1353
|
{ id: "h1", translationKey: "graph.toolbar.heading.heading1", previewFont: s.fontTextEditorH1 }
|
|
1354
|
-
],
|
|
1354
|
+
], Us = ({ editor: e, activeStyle: t, isOpen: n, onOpenChange: r }) => {
|
|
1355
1355
|
const o = J(), i = Vt.find((c) => c.id === t) ?? zr;
|
|
1356
|
-
return /* @__PURE__ */ m(
|
|
1356
|
+
return /* @__PURE__ */ m(D.Root, { open: n, onOpenChange: r, children: [
|
|
1357
1357
|
/* @__PURE__ */ m(
|
|
1358
|
-
|
|
1358
|
+
D.Trigger,
|
|
1359
1359
|
{
|
|
1360
1360
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
1361
1361
|
"aria-label": o("graph.toolbar.heading.ariaLabel"),
|
|
1362
1362
|
className: Ir,
|
|
1363
1363
|
onMouseDown: (c) => c.preventDefault(),
|
|
1364
1364
|
children: [
|
|
1365
|
-
/* @__PURE__ */ a("span", { className:
|
|
1365
|
+
/* @__PURE__ */ a("span", { className: Dr, children: o(i.translationKey) }),
|
|
1366
1366
|
/* @__PURE__ */ a(Nr, { size: "sm" })
|
|
1367
1367
|
]
|
|
1368
1368
|
}
|
|
1369
1369
|
),
|
|
1370
|
-
/* @__PURE__ */ a(
|
|
1371
|
-
|
|
1370
|
+
/* @__PURE__ */ a(D.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(D.Positioner, { side: "bottom", align: "start", sideOffset: 6, className: Mr, children: /* @__PURE__ */ a(D.Popup, { className: Rr, onMouseDown: (c) => c.preventDefault(), children: Vt.map((c) => /* @__PURE__ */ a(
|
|
1371
|
+
D.Item,
|
|
1372
1372
|
{
|
|
1373
|
-
className:
|
|
1373
|
+
className: Or,
|
|
1374
1374
|
"data-selected": c.id === i.id,
|
|
1375
|
-
onClick: () =>
|
|
1376
|
-
children: /* @__PURE__ */ a(
|
|
1375
|
+
onClick: () => Ys(e, c.id),
|
|
1376
|
+
children: /* @__PURE__ */ a(js, { font: c.previewFont, children: o(c.translationKey) })
|
|
1377
1377
|
},
|
|
1378
1378
|
c.id
|
|
1379
1379
|
)) }) }) }) })
|
|
1380
1380
|
] });
|
|
1381
|
-
},
|
|
1381
|
+
}, Ys = (e, t) => {
|
|
1382
1382
|
switch (t) {
|
|
1383
1383
|
case "caption": {
|
|
1384
1384
|
e.chain().focus().setNode("paragraph", { variant: "caption" }).run();
|
|
@@ -1397,13 +1397,13 @@ const Gs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) =>
|
|
|
1397
1397
|
case "h3":
|
|
1398
1398
|
e.chain().focus().setHeading({ level: 3 }).run();
|
|
1399
1399
|
}
|
|
1400
|
-
},
|
|
1400
|
+
}, js = ({ font: e, children: t }) => /* @__PURE__ */ a("span", { style: { font: e, margin: 0 }, children: t }), qs = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "M20 6 9 17l-5-5" }) }) }), Ks = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1401
1401
|
/* @__PURE__ */ a("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
|
|
1402
1402
|
/* @__PURE__ */ a("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
|
|
1403
|
-
] }) }),
|
|
1403
|
+
] }) }), Js = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1404
1404
|
/* @__PURE__ */ a("path", { d: "M18 6 6 18" }),
|
|
1405
1405
|
/* @__PURE__ */ a("path", { d: "m6 6 12 12" })
|
|
1406
|
-
] }) }),
|
|
1406
|
+
] }) }), Zs = (e) => !e.content || e.content.length === 0 ? !0 : e.content.every((t) => !t.content || t.content.length === 0), Qs = (e) => {
|
|
1407
1407
|
const { $from: t } = e.state.selection, n = t.parent.textContent, r = t.parentOffset, o = t.start();
|
|
1408
1408
|
let i = r;
|
|
1409
1409
|
for (; i > 0 && Ut(n[i - 1]); ) i -= 1;
|
|
@@ -1411,14 +1411,14 @@ const Gs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) =>
|
|
|
1411
1411
|
for (; c < n.length && Ut(n[c]); ) c += 1;
|
|
1412
1412
|
return { from: o + i, to: o + c };
|
|
1413
1413
|
}, Ut = (e) => e !== void 0 && /\S/.test(e);
|
|
1414
|
-
var
|
|
1415
|
-
const
|
|
1416
|
-
const i = J(), [c, l] = E(""), d =
|
|
1417
|
-
|
|
1414
|
+
var el = "b5kquu0", tl = "b5kquu1", nl = "b5kquu2", rl = "b5kquu3", Yt = "b5kquu4";
|
|
1415
|
+
const ol = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o }) => {
|
|
1416
|
+
const i = J(), [c, l] = E(""), d = L(null);
|
|
1417
|
+
C(() => {
|
|
1418
1418
|
r && l(t ?? "");
|
|
1419
1419
|
}, [r, t]);
|
|
1420
1420
|
const u = () => {
|
|
1421
|
-
|
|
1421
|
+
al(e, c), o(!1);
|
|
1422
1422
|
}, h = () => {
|
|
1423
1423
|
l(""), o(!1);
|
|
1424
1424
|
}, g = (f) => {
|
|
@@ -1433,15 +1433,15 @@ const el = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
|
|
|
1433
1433
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
1434
1434
|
"aria-label": i("graph.toolbar.formatting.link"),
|
|
1435
1435
|
"data-active": n,
|
|
1436
|
-
className:
|
|
1436
|
+
className: el,
|
|
1437
1437
|
onMouseDown: (f) => f.preventDefault(),
|
|
1438
|
-
children: /* @__PURE__ */ a(
|
|
1438
|
+
children: /* @__PURE__ */ a(Ks, {})
|
|
1439
1439
|
}
|
|
1440
1440
|
),
|
|
1441
|
-
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { sideOffset: 6, align: "end", className:
|
|
1441
|
+
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { sideOffset: 6, align: "end", className: tl, children: /* @__PURE__ */ m(
|
|
1442
1442
|
F.Popup,
|
|
1443
1443
|
{
|
|
1444
|
-
className:
|
|
1444
|
+
className: nl,
|
|
1445
1445
|
initialFocus: d,
|
|
1446
1446
|
onMouseDown: (f) => f.preventDefault(),
|
|
1447
1447
|
children: [
|
|
@@ -1453,13 +1453,13 @@ const el = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
|
|
|
1453
1453
|
value: c,
|
|
1454
1454
|
placeholder: i("graph.toolbar.link.placeholder"),
|
|
1455
1455
|
"aria-label": i("graph.toolbar.link.urlLabel"),
|
|
1456
|
-
className:
|
|
1456
|
+
className: rl,
|
|
1457
1457
|
onMouseDown: (f) => f.stopPropagation(),
|
|
1458
1458
|
onChange: g,
|
|
1459
1459
|
onKeyDown: p
|
|
1460
1460
|
}
|
|
1461
1461
|
),
|
|
1462
|
-
/* @__PURE__ */ a("button", { type: "button", "aria-label": i("common.cancel"), className: Yt, onClick: h, children: /* @__PURE__ */ a(
|
|
1462
|
+
/* @__PURE__ */ a("button", { type: "button", "aria-label": i("common.cancel"), className: Yt, onClick: h, children: /* @__PURE__ */ a(Js, {}) }),
|
|
1463
1463
|
/* @__PURE__ */ a(
|
|
1464
1464
|
"button",
|
|
1465
1465
|
{
|
|
@@ -1467,14 +1467,14 @@ const el = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
|
|
|
1467
1467
|
"aria-label": i("graph.toolbar.link.apply"),
|
|
1468
1468
|
className: Yt,
|
|
1469
1469
|
onClick: u,
|
|
1470
|
-
children: /* @__PURE__ */ a(
|
|
1470
|
+
children: /* @__PURE__ */ a(qs, {})
|
|
1471
1471
|
}
|
|
1472
1472
|
)
|
|
1473
1473
|
]
|
|
1474
1474
|
}
|
|
1475
1475
|
) }) }) })
|
|
1476
1476
|
] });
|
|
1477
|
-
},
|
|
1477
|
+
}, al = (e, t) => {
|
|
1478
1478
|
const n = t.trim(), { selection: r } = e.state;
|
|
1479
1479
|
if (!n) {
|
|
1480
1480
|
e.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
@@ -1488,47 +1488,47 @@ const el = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
|
|
|
1488
1488
|
e.chain().focus().extendMarkRange("link").setLink({ href: n }).run();
|
|
1489
1489
|
return;
|
|
1490
1490
|
}
|
|
1491
|
-
const o =
|
|
1491
|
+
const o = Qs(e);
|
|
1492
1492
|
e.chain().focus().setTextSelection(o).setLink({ href: n }).run();
|
|
1493
|
-
},
|
|
1493
|
+
}, il = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1494
1494
|
/* @__PURE__ */ a("path", { d: "M21 5H3" }),
|
|
1495
1495
|
/* @__PURE__ */ a("path", { d: "M17 12H7" }),
|
|
1496
1496
|
/* @__PURE__ */ a("path", { d: "M19 19H5" })
|
|
1497
|
-
] }) }),
|
|
1497
|
+
] }) }), sl = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1498
1498
|
/* @__PURE__ */ a("path", { d: "M21 5H3" }),
|
|
1499
1499
|
/* @__PURE__ */ a("path", { d: "M21 12H9" }),
|
|
1500
1500
|
/* @__PURE__ */ a("path", { d: "M21 19H7" })
|
|
1501
|
-
] }) }),
|
|
1501
|
+
] }) }), ll = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1502
1502
|
/* @__PURE__ */ a("path", { d: "M21 5H3" }),
|
|
1503
1503
|
/* @__PURE__ */ a("path", { d: "M15 12H3" }),
|
|
1504
1504
|
/* @__PURE__ */ a("path", { d: "M17 19H3" })
|
|
1505
1505
|
] }) });
|
|
1506
|
-
var
|
|
1507
|
-
const
|
|
1506
|
+
var cl = "k91gos0", dl = "k91gos1";
|
|
1507
|
+
const ul = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
|
|
1508
1508
|
const o = (i) => i.preventDefault();
|
|
1509
1509
|
return /* @__PURE__ */ m(le.Root, { children: [
|
|
1510
1510
|
/* @__PURE__ */ a(
|
|
1511
1511
|
le.Trigger,
|
|
1512
1512
|
{
|
|
1513
|
-
render: /* @__PURE__ */ a(
|
|
1513
|
+
render: /* @__PURE__ */ a(fa, { render: /* @__PURE__ */ a(H.Button, {}), pressed: t, onPressedChange: () => n() }),
|
|
1514
1514
|
"aria-label": e,
|
|
1515
|
-
className:
|
|
1515
|
+
className: cl,
|
|
1516
1516
|
onMouseDown: o,
|
|
1517
1517
|
children: r
|
|
1518
1518
|
}
|
|
1519
1519
|
),
|
|
1520
|
-
/* @__PURE__ */ a(le.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Positioner, { sideOffset:
|
|
1520
|
+
/* @__PURE__ */ a(le.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Positioner, { sideOffset: ul, children: /* @__PURE__ */ a(le.Popup, { className: dl, children: e }) }) }) })
|
|
1521
1521
|
] });
|
|
1522
|
-
},
|
|
1522
|
+
}, hl = ({ editor: e, activeAlignment: t = "left" }) => {
|
|
1523
1523
|
const n = J();
|
|
1524
|
-
return /* @__PURE__ */ m(
|
|
1524
|
+
return /* @__PURE__ */ m(w, { children: [
|
|
1525
1525
|
/* @__PURE__ */ a(
|
|
1526
1526
|
de,
|
|
1527
1527
|
{
|
|
1528
1528
|
label: n("graph.toolbar.textAlign.left"),
|
|
1529
1529
|
isActive: t === "left",
|
|
1530
1530
|
onToggle: () => e.chain().focus().setTextAlign("left").run(),
|
|
1531
|
-
children: /* @__PURE__ */ a(
|
|
1531
|
+
children: /* @__PURE__ */ a(ll, {})
|
|
1532
1532
|
}
|
|
1533
1533
|
),
|
|
1534
1534
|
/* @__PURE__ */ a(
|
|
@@ -1537,7 +1537,7 @@ const sl = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
|
|
|
1537
1537
|
label: n("graph.toolbar.textAlign.center"),
|
|
1538
1538
|
isActive: t === "center",
|
|
1539
1539
|
onToggle: () => e.chain().focus().setTextAlign("center").run(),
|
|
1540
|
-
children: /* @__PURE__ */ a(
|
|
1540
|
+
children: /* @__PURE__ */ a(il, {})
|
|
1541
1541
|
}
|
|
1542
1542
|
),
|
|
1543
1543
|
/* @__PURE__ */ a(
|
|
@@ -1546,13 +1546,13 @@ const sl = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
|
|
|
1546
1546
|
label: n("graph.toolbar.textAlign.right"),
|
|
1547
1547
|
isActive: t === "right",
|
|
1548
1548
|
onToggle: () => e.chain().focus().setTextAlign("right").run(),
|
|
1549
|
-
children: /* @__PURE__ */ a(
|
|
1549
|
+
children: /* @__PURE__ */ a(sl, {})
|
|
1550
1550
|
}
|
|
1551
1551
|
)
|
|
1552
1552
|
] });
|
|
1553
1553
|
};
|
|
1554
|
-
var
|
|
1555
|
-
const
|
|
1554
|
+
var gl = "_1bp10ig0", ke = "_1bp10ig1", Ne = "_1bp10ig2";
|
|
1555
|
+
const pl = ({ editor: e }) => ({
|
|
1556
1556
|
isBold: e?.isActive("bold") ?? !1,
|
|
1557
1557
|
isItalic: e?.isActive("italic") ?? !1,
|
|
1558
1558
|
isUnderline: e?.isActive("underline") ?? !1,
|
|
@@ -1560,31 +1560,31 @@ const dl = ({ editor: e }) => ({
|
|
|
1560
1560
|
linkUrl: e?.getAttributes("link").href ?? null,
|
|
1561
1561
|
color: e?.getAttributes("textStyle").color ?? null,
|
|
1562
1562
|
fontFamily: e?.getAttributes("textStyle").fontFamily ?? null,
|
|
1563
|
-
fontSize:
|
|
1564
|
-
textAlign:
|
|
1565
|
-
}),
|
|
1563
|
+
fontSize: fl(e),
|
|
1564
|
+
textAlign: ml(e)
|
|
1565
|
+
}), fl = (e) => e ? e.isActive("heading", { level: 1 }) ? "h1" : e.isActive("heading", { level: 2 }) ? "h2" : e.isActive("heading", { level: 3 }) ? "h3" : e.isActive("paragraph", { variant: "caption" }) ? "caption" : "text" : "text", ml = (e) => e ? e.isActive({ textAlign: "center" }) ? "center" : e.isActive({ textAlign: "right" }) ? "right" : "left" : "left", vl = 8, yl = 8, bl = ({ editor: e }) => {
|
|
1566
1566
|
const t = J(), [n, r] = E(!1), [o, i] = E(null), c = o !== null, l = (y) => (S) => {
|
|
1567
1567
|
i(S ? y : null);
|
|
1568
1568
|
}, { refs: d, floatingStyles: u } = xt({
|
|
1569
1569
|
placement: "top-start",
|
|
1570
1570
|
strategy: "fixed",
|
|
1571
|
-
middleware: [St(
|
|
1572
|
-
whileElementsMounted:
|
|
1573
|
-
}), h =
|
|
1571
|
+
middleware: [St(vl), kt(), Lt({ padding: yl })],
|
|
1572
|
+
whileElementsMounted: aa
|
|
1573
|
+
}), h = L(null), g = la({
|
|
1574
1574
|
editor: e,
|
|
1575
|
-
selector:
|
|
1576
|
-
}), p =
|
|
1575
|
+
selector: pl
|
|
1576
|
+
}), p = Oe(
|
|
1577
1577
|
(y) => {
|
|
1578
1578
|
h.current = y, d.setFloating(y);
|
|
1579
1579
|
},
|
|
1580
1580
|
[d]
|
|
1581
1581
|
);
|
|
1582
|
-
if (
|
|
1582
|
+
if (C(() => {
|
|
1583
1583
|
e && d.setReference(e.view.dom);
|
|
1584
|
-
}, [e, d]),
|
|
1584
|
+
}, [e, d]), C(() => {
|
|
1585
1585
|
if (!e) return;
|
|
1586
1586
|
const y = () => r(!0), S = ({ event: k }) => {
|
|
1587
|
-
const { relatedTarget:
|
|
1587
|
+
const { relatedTarget: T, currentTarget: A } = k, I = T instanceof Node && h.current?.contains(T), _ = T instanceof Node && A instanceof Node && A.contains(T);
|
|
1588
1588
|
!I && !_ && r(!1);
|
|
1589
1589
|
};
|
|
1590
1590
|
return e.on("focus", y), e.on("blur", S), () => {
|
|
@@ -1592,11 +1592,11 @@ const dl = ({ editor: e }) => ({
|
|
|
1592
1592
|
};
|
|
1593
1593
|
}, [e]), !e || !n && !c) return null;
|
|
1594
1594
|
const f = ie();
|
|
1595
|
-
return f ?
|
|
1596
|
-
/* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Provider, { children: /* @__PURE__ */ m(H.Root, { ref: p, className:
|
|
1595
|
+
return f ? ua(
|
|
1596
|
+
/* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Provider, { children: /* @__PURE__ */ m(H.Root, { ref: p, className: gl, style: u, children: [
|
|
1597
1597
|
/* @__PURE__ */ m(H.Group, { className: ke, children: [
|
|
1598
1598
|
/* @__PURE__ */ a(
|
|
1599
|
-
|
|
1599
|
+
Ns,
|
|
1600
1600
|
{
|
|
1601
1601
|
editor: e,
|
|
1602
1602
|
currentColor: g?.color ?? null,
|
|
@@ -1605,7 +1605,7 @@ const dl = ({ editor: e }) => ({
|
|
|
1605
1605
|
}
|
|
1606
1606
|
),
|
|
1607
1607
|
/* @__PURE__ */ a(
|
|
1608
|
-
|
|
1608
|
+
Vs,
|
|
1609
1609
|
{
|
|
1610
1610
|
editor: e,
|
|
1611
1611
|
currentFontFamily: g?.fontFamily ?? null,
|
|
@@ -1616,7 +1616,7 @@ const dl = ({ editor: e }) => ({
|
|
|
1616
1616
|
] }),
|
|
1617
1617
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1618
1618
|
/* @__PURE__ */ a(H.Group, { className: ke, children: /* @__PURE__ */ a(
|
|
1619
|
-
|
|
1619
|
+
Us,
|
|
1620
1620
|
{
|
|
1621
1621
|
editor: e,
|
|
1622
1622
|
activeStyle: g?.fontSize ?? "text",
|
|
@@ -1655,10 +1655,10 @@ const dl = ({ editor: e }) => ({
|
|
|
1655
1655
|
)
|
|
1656
1656
|
] }),
|
|
1657
1657
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1658
|
-
/* @__PURE__ */ a(H.Group, { className: ke, children: /* @__PURE__ */ a(
|
|
1658
|
+
/* @__PURE__ */ a(H.Group, { className: ke, children: /* @__PURE__ */ a(hl, { editor: e, activeAlignment: g?.textAlign }) }),
|
|
1659
1659
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1660
1660
|
/* @__PURE__ */ a(H.Group, { className: ke, children: /* @__PURE__ */ a(
|
|
1661
|
-
|
|
1661
|
+
ol,
|
|
1662
1662
|
{
|
|
1663
1663
|
editor: e,
|
|
1664
1664
|
currentUrl: g?.linkUrl ?? null,
|
|
@@ -1671,16 +1671,16 @@ const dl = ({ editor: e }) => ({
|
|
|
1671
1671
|
f
|
|
1672
1672
|
) : null;
|
|
1673
1673
|
};
|
|
1674
|
-
var
|
|
1675
|
-
const Gr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ m("div", { className:
|
|
1676
|
-
/* @__PURE__ */ a(
|
|
1677
|
-
/* @__PURE__ */ a(
|
|
1678
|
-
] }),
|
|
1679
|
-
const n =
|
|
1674
|
+
var xl = "_2ngohc0";
|
|
1675
|
+
const Gr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ m("div", { className: xl, children: [
|
|
1676
|
+
/* @__PURE__ */ a(bl, { editor: e }),
|
|
1677
|
+
/* @__PURE__ */ a(ca, { editor: e, "aria-label": t })
|
|
1678
|
+
] }), Wr = (e, t) => {
|
|
1679
|
+
const n = L(e);
|
|
1680
1680
|
n.current = e;
|
|
1681
|
-
const r =
|
|
1681
|
+
const r = L(t);
|
|
1682
1682
|
r.current = t;
|
|
1683
|
-
const o =
|
|
1683
|
+
const o = L(null), i = L(null), c = v(() => {
|
|
1684
1684
|
const l = () => {
|
|
1685
1685
|
i.current !== null && (clearTimeout(i.current), i.current = null), o.current = null;
|
|
1686
1686
|
}, d = () => {
|
|
@@ -1696,39 +1696,39 @@ const Gr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ m("div", { className
|
|
|
1696
1696
|
o.current = h, i.current !== null && clearTimeout(i.current), i.current = setTimeout(d, r.current);
|
|
1697
1697
|
}, flush: d, cancel: l };
|
|
1698
1698
|
}, []);
|
|
1699
|
-
return
|
|
1699
|
+
return C(() => () => {
|
|
1700
1700
|
i.current !== null && clearTimeout(i.current);
|
|
1701
1701
|
}, []), c;
|
|
1702
|
-
},
|
|
1702
|
+
}, Sl = 200, $r = ({
|
|
1703
1703
|
content: e,
|
|
1704
1704
|
extensions: t,
|
|
1705
1705
|
isEditable: n,
|
|
1706
1706
|
onUpdate: r,
|
|
1707
|
-
updateDebounceMs: o =
|
|
1707
|
+
updateDebounceMs: o = Sl
|
|
1708
1708
|
}) => {
|
|
1709
|
-
const i =
|
|
1709
|
+
const i = L(jt(e)), c = L(!1), l = Wr((u) => {
|
|
1710
1710
|
c.current = !0, r?.(u);
|
|
1711
|
-
}, o), d =
|
|
1711
|
+
}, o), d = da({
|
|
1712
1712
|
extensions: t,
|
|
1713
1713
|
content: i.current,
|
|
1714
1714
|
editable: n,
|
|
1715
1715
|
immediatelyRender: !1,
|
|
1716
1716
|
onUpdate: ({ editor: u }) => l.run(u.getJSON())
|
|
1717
1717
|
});
|
|
1718
|
-
return
|
|
1718
|
+
return C(() => {
|
|
1719
1719
|
d?.setEditable(n);
|
|
1720
|
-
}, [d, n]),
|
|
1720
|
+
}, [d, n]), C(() => {
|
|
1721
1721
|
if (!d) return;
|
|
1722
1722
|
if (c.current) {
|
|
1723
1723
|
c.current = !1;
|
|
1724
1724
|
return;
|
|
1725
1725
|
}
|
|
1726
1726
|
const u = jt(e), h = d.getJSON();
|
|
1727
|
-
|
|
1728
|
-
}, [d, e, l]),
|
|
1729
|
-
}, jt = (e) => e === null ? { type: "doc", content: [] } : typeof e == "string" ? { type: "doc", content: [{ type: "paragraph", content: e ? [{ type: "text", text: e }] : [] }] } : e,
|
|
1730
|
-
var
|
|
1731
|
-
const
|
|
1727
|
+
kl(h, u) || (l.cancel(), d.commands.setContent(u, { emitUpdate: !1 }));
|
|
1728
|
+
}, [d, e, l]), C(() => () => l.flush(), [l]), d;
|
|
1729
|
+
}, jt = (e) => e === null ? { type: "doc", content: [] } : typeof e == "string" ? { type: "doc", content: [{ type: "paragraph", content: e ? [{ type: "text", text: e }] : [] }] } : e, kl = (e, t) => JSON.stringify(e) === JSON.stringify(t);
|
|
1730
|
+
var Ll = "_1cocly40";
|
|
1731
|
+
const Cl = {
|
|
1732
1732
|
modern: "'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif",
|
|
1733
1733
|
timeless: "'Noto Serif', Georgia, 'Times New Roman', serif",
|
|
1734
1734
|
fresh: "'Aeonik', 'Aeonik Fallback', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
@@ -1736,22 +1736,22 @@ const Sl = {
|
|
|
1736
1736
|
handwritten: "'Permanent Marker', cursive",
|
|
1737
1737
|
fineliner: "'Intruding Cat', cursive",
|
|
1738
1738
|
brand: "var(--brand-font-family), 'Aeonik', 'Inter', sans-serif"
|
|
1739
|
-
},
|
|
1739
|
+
}, Me = ({ content: e }) => /* @__PURE__ */ a(w, { children: Xr(e.content ?? [e]) }), Xr = (e) => e.map((t, n) => wl(t, n)), wl = (e, t) => {
|
|
1740
1740
|
if (e.type === "text")
|
|
1741
|
-
return
|
|
1741
|
+
return Tl(e, t);
|
|
1742
1742
|
if (e.type === "hardBreak" || e.type === "hard_break")
|
|
1743
1743
|
return /* @__PURE__ */ a("br", {}, t);
|
|
1744
|
-
const n = e.content ?
|
|
1744
|
+
const n = e.content ? Xr(e.content) : null;
|
|
1745
1745
|
switch (e.type) {
|
|
1746
1746
|
case "doc":
|
|
1747
1747
|
return /* @__PURE__ */ a(hn, { children: n }, t);
|
|
1748
1748
|
case "heading": {
|
|
1749
|
-
const r =
|
|
1750
|
-
return
|
|
1749
|
+
const r = Pl(e.attrs?.level);
|
|
1750
|
+
return Hl(r, t, n, Kt(e.attrs));
|
|
1751
1751
|
}
|
|
1752
1752
|
case "paragraph": {
|
|
1753
1753
|
const r = ge(e.attrs?.variant);
|
|
1754
|
-
return /* @__PURE__ */ a("p", { "data-variant": r ?? void 0, style:
|
|
1754
|
+
return /* @__PURE__ */ a("p", { "data-variant": r ?? void 0, style: Vr(Kt(e.attrs)), children: n }, t);
|
|
1755
1755
|
}
|
|
1756
1756
|
case "blockquote":
|
|
1757
1757
|
return /* @__PURE__ */ a("blockquote", { children: n }, t);
|
|
@@ -1767,10 +1767,10 @@ const Sl = {
|
|
|
1767
1767
|
default:
|
|
1768
1768
|
return /* @__PURE__ */ a("span", { children: n }, t);
|
|
1769
1769
|
}
|
|
1770
|
-
},
|
|
1770
|
+
}, Tl = (e, t) => {
|
|
1771
1771
|
const n = e.text ?? "";
|
|
1772
|
-
return !e.marks || e.marks.length === 0 ? /* @__PURE__ */ a("span", { children: n }, t) : e.marks.reduceRight((r, o, i) =>
|
|
1773
|
-
},
|
|
1772
|
+
return !e.marks || e.marks.length === 0 ? /* @__PURE__ */ a("span", { children: n }, t) : e.marks.reduceRight((r, o, i) => Al(o, r, `${t}-${i}`), n);
|
|
1773
|
+
}, Al = (e, t, n) => {
|
|
1774
1774
|
switch (e.type) {
|
|
1775
1775
|
case "bold":
|
|
1776
1776
|
case "strong":
|
|
@@ -1788,10 +1788,10 @@ const Sl = {
|
|
|
1788
1788
|
return /* @__PURE__ */ a("code", { children: t }, n);
|
|
1789
1789
|
case "link": {
|
|
1790
1790
|
const r = ge(e.attrs?.href);
|
|
1791
|
-
return mn(r) ? /* @__PURE__ */ a("a", { className:
|
|
1791
|
+
return mn(r) ? /* @__PURE__ */ a("a", { className: Ll, href: r, rel: "noopener noreferrer", target: "_blank", children: t }, n) : /* @__PURE__ */ a("span", { children: t }, n);
|
|
1792
1792
|
}
|
|
1793
1793
|
case "textStyle": {
|
|
1794
|
-
const r =
|
|
1794
|
+
const r = El(e.attrs);
|
|
1795
1795
|
return r ? /* @__PURE__ */ a("span", { style: r, children: t }, n) : /* @__PURE__ */ a("span", { children: t }, n);
|
|
1796
1796
|
}
|
|
1797
1797
|
default:
|
|
@@ -1800,17 +1800,17 @@ const Sl = {
|
|
|
1800
1800
|
}, qt = (e) => {
|
|
1801
1801
|
const t = ge(e && typeof e == "object" ? e.fontFamily : e);
|
|
1802
1802
|
if (t)
|
|
1803
|
-
return
|
|
1804
|
-
},
|
|
1803
|
+
return Cl[t] ?? t;
|
|
1804
|
+
}, El = (e) => {
|
|
1805
1805
|
if (!e) return null;
|
|
1806
1806
|
const t = {}, n = ge(e.color);
|
|
1807
1807
|
n && (t.color = n);
|
|
1808
1808
|
const r = qt(e.font) ?? qt(e.fontFamily);
|
|
1809
1809
|
r && (t.fontFamily = r);
|
|
1810
|
-
const o =
|
|
1810
|
+
const o = _l(e.fontSize);
|
|
1811
1811
|
return o && (t.fontSize = o), Object.keys(t).length > 0 ? t : null;
|
|
1812
|
-
},
|
|
1813
|
-
const o =
|
|
1812
|
+
}, _l = (e) => typeof e == "number" && Number.isFinite(e) ? `${e / 10}em` : ge(e), ge = (e) => typeof e == "string" && e.length > 0 ? e : void 0, Pl = (e) => typeof e != "number" ? 3 : e < 1 ? 1 : e > 3 ? 3 : Math.round(e), Hl = (e, t, n, r) => {
|
|
1813
|
+
const o = Vr(r);
|
|
1814
1814
|
switch (e) {
|
|
1815
1815
|
case 1:
|
|
1816
1816
|
return /* @__PURE__ */ a("h1", { style: o, children: n }, t);
|
|
@@ -1822,9 +1822,9 @@ const Sl = {
|
|
|
1822
1822
|
}, Kt = (e) => {
|
|
1823
1823
|
const t = e?.textAlign;
|
|
1824
1824
|
if (t === "left" || t === "right" || t === "center" || t === "justify") return t;
|
|
1825
|
-
},
|
|
1826
|
-
var
|
|
1827
|
-
const
|
|
1825
|
+
}, Vr = (e) => e ? { textAlign: e } : void 0;
|
|
1826
|
+
var Fl = "_4dlrid0", Ur = "_4dlrid1", Nl = "xfz7dq0", Bl = "xfz7dq1", Il = "xfz7dq2", Dl = "xfz7dq3", Ml = "xfz7dq4";
|
|
1827
|
+
const Rl = ({
|
|
1828
1828
|
ref: e,
|
|
1829
1829
|
footerRect: t,
|
|
1830
1830
|
mode: n = "readonly",
|
|
@@ -1833,61 +1833,61 @@ const Il = ({
|
|
|
1833
1833
|
source: i,
|
|
1834
1834
|
isSourceVisible: c
|
|
1835
1835
|
}) => {
|
|
1836
|
-
const l = n === "editable", d = o && (l || r !== null), u = c && i !== null &&
|
|
1836
|
+
const l = n === "editable", d = o && (l || r !== null), u = c && i !== null && Wl(i);
|
|
1837
1837
|
return !d && !u ? null : /* @__PURE__ */ m(
|
|
1838
1838
|
"div",
|
|
1839
1839
|
{
|
|
1840
1840
|
ref: e,
|
|
1841
|
-
className:
|
|
1841
|
+
className: Nl,
|
|
1842
1842
|
style: {
|
|
1843
1843
|
left: t.x,
|
|
1844
1844
|
top: t.y,
|
|
1845
1845
|
width: t.width
|
|
1846
1846
|
},
|
|
1847
1847
|
children: [
|
|
1848
|
-
d ? l ? /* @__PURE__ */ a(
|
|
1849
|
-
u && /* @__PURE__ */ a(
|
|
1848
|
+
d ? l ? /* @__PURE__ */ a($l, { caption: r }) : /* @__PURE__ */ a(Ol, { caption: r }) : null,
|
|
1849
|
+
u && /* @__PURE__ */ a(zl, { source: i })
|
|
1850
1850
|
]
|
|
1851
1851
|
}
|
|
1852
1852
|
);
|
|
1853
|
-
},
|
|
1854
|
-
const t = mn(e.url) ? e.url : void 0, n = e.label ?? (t !== void 0 ?
|
|
1855
|
-
return n === "" && t === void 0 ? null : /* @__PURE__ */ m("div", { className:
|
|
1856
|
-
/* @__PURE__ */ a("span", { className:
|
|
1857
|
-
t !== void 0 ? /* @__PURE__ */ a("a", { className:
|
|
1853
|
+
}, Ol = ({ caption: e }) => e === null ? null : typeof e == "string" ? /* @__PURE__ */ a("p", { className: Ur, children: e }) : /* @__PURE__ */ a(Me, { content: e }), zl = ({ source: e }) => {
|
|
1854
|
+
const t = mn(e.url) ? e.url : void 0, n = e.label ?? (t !== void 0 ? Gl(t) : "");
|
|
1855
|
+
return n === "" && t === void 0 ? null : /* @__PURE__ */ m("div", { className: Bl, children: [
|
|
1856
|
+
/* @__PURE__ */ a("span", { className: Dl, children: "Source:" }),
|
|
1857
|
+
t !== void 0 ? /* @__PURE__ */ a("a", { className: Il, href: t, target: "_blank", rel: "noopener noreferrer", children: n }) : /* @__PURE__ */ a("span", { className: Ml, children: n })
|
|
1858
1858
|
] });
|
|
1859
|
-
},
|
|
1859
|
+
}, Gl = (e) => {
|
|
1860
1860
|
try {
|
|
1861
1861
|
return new URL(e).hostname;
|
|
1862
1862
|
} catch {
|
|
1863
1863
|
return e;
|
|
1864
1864
|
}
|
|
1865
|
-
},
|
|
1866
|
-
const t = Gn(), n = v(() =>
|
|
1865
|
+
}, Wl = (e) => e.label !== void 0 && e.label !== "" || e.url !== void 0 && e.url !== "", $l = ({ caption: e }) => {
|
|
1866
|
+
const t = Gn(), n = v(() => as({ placeholder: "Add caption" }), []), r = $r({
|
|
1867
1867
|
content: e,
|
|
1868
1868
|
extensions: n,
|
|
1869
1869
|
isEditable: !0,
|
|
1870
1870
|
onUpdate: (o) => {
|
|
1871
|
-
const i =
|
|
1872
|
-
t(new
|
|
1871
|
+
const i = Zs(o) ? null : o;
|
|
1872
|
+
t(new Io({ caption: i }));
|
|
1873
1873
|
}
|
|
1874
1874
|
});
|
|
1875
1875
|
return /* @__PURE__ */ a(Gr, { editor: r, ariaLabel: "Chart caption" });
|
|
1876
1876
|
};
|
|
1877
|
-
var
|
|
1878
|
-
const
|
|
1877
|
+
var Xl = "_1k4qtbg0";
|
|
1878
|
+
const Vl = 3, Ul = ({
|
|
1879
1879
|
title: e,
|
|
1880
1880
|
isTitleVisible: t,
|
|
1881
1881
|
subtitle: n,
|
|
1882
1882
|
isSubtitleVisible: r
|
|
1883
1883
|
}) => {
|
|
1884
1884
|
const o = [];
|
|
1885
|
-
return t && o.push({ type: "heading", attrs: { level:
|
|
1886
|
-
},
|
|
1885
|
+
return t && o.push({ type: "heading", attrs: { level: Vl }, content: jl(e) }), r && o.push(...ql(n)), { type: "doc", content: o };
|
|
1886
|
+
}, Yl = (e) => {
|
|
1887
1887
|
const t = e.content ?? [], [n, ...r] = t;
|
|
1888
1888
|
return {
|
|
1889
|
-
title:
|
|
1890
|
-
subtitle:
|
|
1889
|
+
title: Kl(n?.content ?? []),
|
|
1890
|
+
subtitle: Jl(r)
|
|
1891
1891
|
};
|
|
1892
1892
|
}, Pt = (e) => ({
|
|
1893
1893
|
type: e.type ?? "text",
|
|
@@ -1895,11 +1895,11 @@ const Wl = 3, $l = ({
|
|
|
1895
1895
|
...e.text !== void 0 ? { text: e.text } : {},
|
|
1896
1896
|
...e.marks !== void 0 ? { marks: e.marks } : {},
|
|
1897
1897
|
...e.attrs !== void 0 ? { attrs: e.attrs } : {}
|
|
1898
|
-
}),
|
|
1898
|
+
}), jl = (e) => e === null ? [] : typeof e == "string" ? e === "" ? [] : [{ type: "text", text: e }] : e.type === "doc" && e.content ? e.content.flatMap((t) => t.content ?? []) : e.type === "text" || e.type === "hardBreak" ? [e] : e.content ?? [], ql = (e) => e === null ? [{ type: "paragraph" }] : typeof e == "string" ? e === "" ? [{ type: "paragraph" }] : [{ type: "paragraph", content: [{ type: "text", text: e }] }] : e.type === "doc" && e.content ? e.content.length === 0 ? [{ type: "paragraph" }] : e.content.map(Jt) : [Jt(e)], Jt = (e) => e.type === "paragraph" ? e : { type: "paragraph", content: e.content ?? [e] }, Kl = (e) => {
|
|
1899
1899
|
if (e.length === 0) return null;
|
|
1900
1900
|
const [t] = e;
|
|
1901
1901
|
return t && e.length === 1 && t.type === "text" && (!t.marks || t.marks.length === 0) ? t.text ?? null : { type: "paragraph", content: e.map(Pt) };
|
|
1902
|
-
},
|
|
1902
|
+
}, Jl = (e) => {
|
|
1903
1903
|
const t = e.filter((r) => (r.content ?? []).length > 0);
|
|
1904
1904
|
if (t.length === 0) return null;
|
|
1905
1905
|
const [n] = t;
|
|
@@ -1909,7 +1909,7 @@ const Wl = 3, $l = ({
|
|
|
1909
1909
|
return o.text ?? null;
|
|
1910
1910
|
}
|
|
1911
1911
|
return { type: "doc", content: t.map(Pt) };
|
|
1912
|
-
},
|
|
1912
|
+
}, Zl = ({
|
|
1913
1913
|
ref: e,
|
|
1914
1914
|
headerRect: t,
|
|
1915
1915
|
mode: n = "readonly",
|
|
@@ -1923,14 +1923,14 @@ const Wl = 3, $l = ({
|
|
|
1923
1923
|
"div",
|
|
1924
1924
|
{
|
|
1925
1925
|
ref: e,
|
|
1926
|
-
className:
|
|
1926
|
+
className: Xl,
|
|
1927
1927
|
style: {
|
|
1928
1928
|
left: t.x,
|
|
1929
1929
|
top: t.y,
|
|
1930
1930
|
width: t.width
|
|
1931
1931
|
},
|
|
1932
1932
|
children: l ? /* @__PURE__ */ a(
|
|
1933
|
-
|
|
1933
|
+
ec,
|
|
1934
1934
|
{
|
|
1935
1935
|
title: r,
|
|
1936
1936
|
isTitleVisible: o,
|
|
@@ -1939,7 +1939,7 @@ const Wl = 3, $l = ({
|
|
|
1939
1939
|
},
|
|
1940
1940
|
[o ? "title" : "", c ? "subtitle" : ""].join("-")
|
|
1941
1941
|
) : /* @__PURE__ */ a(
|
|
1942
|
-
|
|
1942
|
+
Ql,
|
|
1943
1943
|
{
|
|
1944
1944
|
title: r,
|
|
1945
1945
|
isTitleVisible: o,
|
|
@@ -1949,22 +1949,22 @@ const Wl = 3, $l = ({
|
|
|
1949
1949
|
)
|
|
1950
1950
|
}
|
|
1951
1951
|
);
|
|
1952
|
-
},
|
|
1952
|
+
}, Ql = ({
|
|
1953
1953
|
title: e,
|
|
1954
1954
|
isTitleVisible: t,
|
|
1955
1955
|
isSubtitleVisible: n,
|
|
1956
1956
|
subtitle: r
|
|
1957
|
-
}) => /* @__PURE__ */ m(
|
|
1958
|
-
t && e !== null && (typeof e == "string" ? /* @__PURE__ */ a("h1", { className:
|
|
1959
|
-
n && r !== null && (typeof r == "string" ? /* @__PURE__ */ a("p", { className:
|
|
1960
|
-
] }),
|
|
1957
|
+
}) => /* @__PURE__ */ m(w, { children: [
|
|
1958
|
+
t && e !== null && (typeof e == "string" ? /* @__PURE__ */ a("h1", { className: Fl, children: e }) : /* @__PURE__ */ a(Me, { content: e })),
|
|
1959
|
+
n && r !== null && (typeof r == "string" ? /* @__PURE__ */ a("p", { className: Ur, children: r }) : /* @__PURE__ */ a(Me, { content: r }))
|
|
1960
|
+
] }), ec = ({
|
|
1961
1961
|
title: e,
|
|
1962
1962
|
isTitleVisible: t,
|
|
1963
1963
|
isSubtitleVisible: n,
|
|
1964
1964
|
subtitle: r
|
|
1965
1965
|
}) => {
|
|
1966
1966
|
const o = Gn(), i = v(
|
|
1967
|
-
() =>
|
|
1967
|
+
() => os({
|
|
1968
1968
|
titlePlaceholder: "Untitled",
|
|
1969
1969
|
subtitlePlaceholder: "Untitled",
|
|
1970
1970
|
isTitleVisible: t,
|
|
@@ -1972,84 +1972,84 @@ const Wl = 3, $l = ({
|
|
|
1972
1972
|
}),
|
|
1973
1973
|
[t, n]
|
|
1974
1974
|
), c = v(
|
|
1975
|
-
() =>
|
|
1975
|
+
() => Ul({ title: e, isTitleVisible: t, subtitle: r, isSubtitleVisible: n }),
|
|
1976
1976
|
[e, t, r, n]
|
|
1977
|
-
), l =
|
|
1977
|
+
), l = $r({
|
|
1978
1978
|
content: c,
|
|
1979
1979
|
extensions: i,
|
|
1980
1980
|
isEditable: !0,
|
|
1981
1981
|
onUpdate: (d) => {
|
|
1982
|
-
const u =
|
|
1983
|
-
t && o(new
|
|
1982
|
+
const u = Yl(d);
|
|
1983
|
+
t && o(new Do({ title: u.title })), n && o(new Mo({ subtitle: u.subtitle }));
|
|
1984
1984
|
}
|
|
1985
1985
|
});
|
|
1986
1986
|
return /* @__PURE__ */ a(Gr, { editor: l, ariaLabel: "Chart title and subtitle" });
|
|
1987
1987
|
};
|
|
1988
|
-
var
|
|
1989
|
-
const
|
|
1988
|
+
var tc = "_1u9qprb0", nc = "_1u9qprb1", rc = "_9aen060", oc = "_9aen061", ac = "_9aen062", Yr = "_9aen063";
|
|
1989
|
+
const ic = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1990
1990
|
__proto__: null,
|
|
1991
|
-
groupRow:
|
|
1992
|
-
item:
|
|
1993
|
-
trendRow:
|
|
1994
|
-
valueRow:
|
|
1995
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1991
|
+
groupRow: ac,
|
|
1992
|
+
item: Yr,
|
|
1993
|
+
trendRow: oc,
|
|
1994
|
+
valueRow: rc
|
|
1995
|
+
}, Symbol.toStringTag, { value: "Module" })), sc = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1996
1996
|
/* @__PURE__ */ a("path", { d: "m5 12 7-7 7 7" }),
|
|
1997
1997
|
/* @__PURE__ */ a("path", { d: "M12 19V5" })
|
|
1998
|
-
] }) }),
|
|
1999
|
-
var
|
|
2000
|
-
const
|
|
1998
|
+
] }) }), lc = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "M5 12h14" }) }) });
|
|
1999
|
+
var jr = "n7clvo0", cc = "n7clvo1", dc = "n7clvo2", uc = "n7clvo3", qr = { small: "n7clvo4", medium: "n7clvo5", large: "n7clvo6" }, hc = { small: "n7clvo7", medium: "n7clvo8", large: "n7clvo9" }, gc = { up: "n7clvoa", down: "n7clvob", flat: "n7clvoc" }, pc = { up: "n7clvoe n7clvod", down: "n7clvof n7clvod", flat: "n7clvog n7clvod" };
|
|
2000
|
+
const fc = ({ segment: e, resolvedSize: t }) => {
|
|
2001
2001
|
if (e.kind === "swatch")
|
|
2002
|
-
return /* @__PURE__ */ a(
|
|
2002
|
+
return /* @__PURE__ */ a(je, { shape: e.swatch.shape, color: e.swatch.color, width: e.size, height: e.size });
|
|
2003
2003
|
if (e.kind === "trendArrow")
|
|
2004
|
-
return /* @__PURE__ */ a("div", { className:
|
|
2005
|
-
const n = e.fontRole === "value" ?
|
|
2006
|
-
return /* @__PURE__ */ a("span", { className: ce(
|
|
2007
|
-
},
|
|
2004
|
+
return /* @__PURE__ */ a("div", { className: pc[e.direction], children: e.direction === "flat" ? /* @__PURE__ */ a(lc, { size: "xs", title: "" }) : /* @__PURE__ */ a(sc, { size: "xs", title: "" }) });
|
|
2005
|
+
const n = e.fontRole === "value" ? qr[t] : hc[t];
|
|
2006
|
+
return /* @__PURE__ */ a("span", { className: ce(mc(e), n), children: e.text });
|
|
2007
|
+
}, mc = (e) => {
|
|
2008
2008
|
switch (e.textRole) {
|
|
2009
2009
|
case "value":
|
|
2010
|
-
return
|
|
2010
|
+
return jr;
|
|
2011
2011
|
case "observation":
|
|
2012
|
-
return
|
|
2012
|
+
return cc;
|
|
2013
2013
|
case "trendPercentage":
|
|
2014
|
-
return
|
|
2014
|
+
return gc[e.trendDirection ?? "up"];
|
|
2015
2015
|
case "trendReference":
|
|
2016
|
-
return
|
|
2016
|
+
return dc;
|
|
2017
2017
|
case "label":
|
|
2018
|
-
return
|
|
2018
|
+
return uc;
|
|
2019
2019
|
}
|
|
2020
|
-
},
|
|
2020
|
+
}, vc = ({ item: e, resolvedSize: t }) => /* @__PURE__ */ a("div", { className: Yr, children: fn(e).map((n) => /* @__PURE__ */ a(yc, { row: n, resolvedSize: t }, n.role)) }), yc = ({ row: e, resolvedSize: t }) => {
|
|
2021
2021
|
const n = e.role === "trendRow";
|
|
2022
2022
|
return /* @__PURE__ */ a(
|
|
2023
2023
|
"div",
|
|
2024
2024
|
{
|
|
2025
|
-
className:
|
|
2025
|
+
className: ic[e.role],
|
|
2026
2026
|
"data-testid": n ? "headline-trend" : void 0,
|
|
2027
|
-
"data-direction": n ?
|
|
2027
|
+
"data-direction": n ? bc(e) : void 0,
|
|
2028
2028
|
role: n ? "img" : void 0,
|
|
2029
2029
|
"aria-label": n ? e.ariaLabel : void 0,
|
|
2030
|
-
children: e.segments.map((r, o) => /* @__PURE__ */ a(
|
|
2030
|
+
children: e.segments.map((r, o) => /* @__PURE__ */ a(fc, { segment: r, resolvedSize: t }, o))
|
|
2031
2031
|
}
|
|
2032
2032
|
);
|
|
2033
|
-
},
|
|
2033
|
+
}, bc = (e) => {
|
|
2034
2034
|
const t = e.segments.find((n) => n.kind === "trendArrow");
|
|
2035
2035
|
return t?.kind === "trendArrow" ? t.direction : void 0;
|
|
2036
|
-
},
|
|
2036
|
+
}, xc = ({ headline: e, rect: t, resolvedSize: n, visibleItemCount: r }) => {
|
|
2037
2037
|
const o = {
|
|
2038
2038
|
left: t.x,
|
|
2039
2039
|
top: t.y,
|
|
2040
2040
|
width: t.width,
|
|
2041
2041
|
height: t.height
|
|
2042
2042
|
};
|
|
2043
|
-
return e.kind === "grandTotal" ? /* @__PURE__ */ a("div", { className:
|
|
2043
|
+
return e.kind === "grandTotal" ? /* @__PURE__ */ a("div", { className: nc, style: o, children: /* @__PURE__ */ a("span", { className: ce(jr, qr[n]), children: e.value }) }) : /* @__PURE__ */ a("div", { className: tc, style: o, children: e.items.slice(0, r).map((i, c) => /* @__PURE__ */ a(vc, { item: i, resolvedSize: n }, `${i.label}-${c}`)) });
|
|
2044
2044
|
};
|
|
2045
|
-
var
|
|
2046
|
-
const
|
|
2047
|
-
const { lineBoxHeight: r } =
|
|
2045
|
+
var Sc = "_1oj6yix0", kc = "_1oj6yix1", Lc = "_1oj6yix2";
|
|
2046
|
+
const Cc = 8, wc = 16, Tc = 2, Ac = ({ legends: e, containerRect: t, textScale: n }) => {
|
|
2047
|
+
const { lineBoxHeight: r } = Tr(n), { placements: o, hasOverlap: i } = Ec(e, t, r);
|
|
2048
2048
|
if (o.length === 0) return null;
|
|
2049
|
-
const c = i ?
|
|
2050
|
-
return /* @__PURE__ */ m("div", { className:
|
|
2051
|
-
i && /* @__PURE__ */ a("svg", { className:
|
|
2052
|
-
|
|
2049
|
+
const c = i ? wc : Cc, l = c - Tc;
|
|
2050
|
+
return /* @__PURE__ */ m("div", { className: Sc, children: [
|
|
2051
|
+
i && /* @__PURE__ */ a("svg", { className: kc, width: t.width, height: t.height, children: o.map((d) => /* @__PURE__ */ a(
|
|
2052
|
+
_c,
|
|
2053
2053
|
{
|
|
2054
2054
|
anchorY: d.anchorY,
|
|
2055
2055
|
labelY: d.y,
|
|
@@ -2061,14 +2061,14 @@ const Sc = 8, kc = 16, Lc = 2, Cc = ({ legends: e, containerRect: t, textScale:
|
|
|
2061
2061
|
o.map((d) => /* @__PURE__ */ a(
|
|
2062
2062
|
"span",
|
|
2063
2063
|
{
|
|
2064
|
-
className:
|
|
2064
|
+
className: Lc,
|
|
2065
2065
|
style: { left: c, top: d.y, color: d.payload.color },
|
|
2066
2066
|
children: d.payload.label
|
|
2067
2067
|
},
|
|
2068
2068
|
d.payload.key
|
|
2069
2069
|
))
|
|
2070
2070
|
] });
|
|
2071
|
-
},
|
|
2071
|
+
}, Ec = (e, t, n) => v(() => {
|
|
2072
2072
|
const r = [];
|
|
2073
2073
|
for (const o of e)
|
|
2074
2074
|
for (const i of o.items) {
|
|
@@ -2079,12 +2079,12 @@ const Sc = 8, kc = 16, Lc = 2, Cc = ({ legends: e, containerRect: t, textScale:
|
|
|
2079
2079
|
payload: { key: String(r.length), label: i.formattedLabel, color: c }
|
|
2080
2080
|
});
|
|
2081
2081
|
}
|
|
2082
|
-
return r.length === 0 || t.height <= 0 ? { placements: [], hasOverlap: !1 } :
|
|
2082
|
+
return r.length === 0 || t.height <= 0 ? { placements: [], hasOverlap: !1 } : Ro({
|
|
2083
2083
|
items: r,
|
|
2084
2084
|
containerHeight: t.height,
|
|
2085
2085
|
labelHeight: n
|
|
2086
2086
|
});
|
|
2087
|
-
}, [e, t.height, n]),
|
|
2087
|
+
}, [e, t.height, n]), _c = ({ anchorY: e, labelY: t, endX: n, color: r }) => {
|
|
2088
2088
|
const o = n / 2;
|
|
2089
2089
|
return /* @__PURE__ */ a(
|
|
2090
2090
|
"path",
|
|
@@ -2097,8 +2097,8 @@ const Sc = 8, kc = 16, Lc = 2, Cc = ({ legends: e, containerRect: t, textScale:
|
|
|
2097
2097
|
}
|
|
2098
2098
|
);
|
|
2099
2099
|
};
|
|
2100
|
-
var
|
|
2101
|
-
const
|
|
2100
|
+
var Pc = "_6a636s0";
|
|
2101
|
+
const Hc = /\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu, Kr = "😀";
|
|
2102
2102
|
class Ht {
|
|
2103
2103
|
constructor() {
|
|
2104
2104
|
this.emojiCorrections = /* @__PURE__ */ new Map(), this.currentFont = "";
|
|
@@ -2121,11 +2121,11 @@ class Ht {
|
|
|
2121
2121
|
return typeof document < "u" && "fonts" in document && await document.fonts.ready, new Ht();
|
|
2122
2122
|
}
|
|
2123
2123
|
measureText(t, n) {
|
|
2124
|
-
const r =
|
|
2124
|
+
const r = Oo(n);
|
|
2125
2125
|
this.setFont(r);
|
|
2126
2126
|
const { width: o, fontBoundingBoxAscent: i, fontBoundingBoxDescent: c } = this.ctx.measureText(t);
|
|
2127
2127
|
let l = o;
|
|
2128
|
-
const d =
|
|
2128
|
+
const d = Fc(t);
|
|
2129
2129
|
if (d > 0) {
|
|
2130
2130
|
const u = this.getEmojiCorrection(r);
|
|
2131
2131
|
l -= u * d;
|
|
@@ -2153,7 +2153,7 @@ class Ht {
|
|
|
2153
2153
|
const n = this.emojiCorrections.get(t);
|
|
2154
2154
|
if (n !== void 0) return n;
|
|
2155
2155
|
this.setFont(t);
|
|
2156
|
-
const r = this.ctx.measureText(
|
|
2156
|
+
const r = this.ctx.measureText(Kr).width, o = Nc(t);
|
|
2157
2157
|
let i = 0;
|
|
2158
2158
|
if (o !== null) {
|
|
2159
2159
|
const c = r - o;
|
|
@@ -2163,19 +2163,19 @@ class Ht {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
2165
|
let q = null;
|
|
2166
|
-
const
|
|
2167
|
-
const t = e.match(
|
|
2166
|
+
const Fc = (e) => {
|
|
2167
|
+
const t = e.match(Hc);
|
|
2168
2168
|
return t ? t.length : 0;
|
|
2169
|
-
},
|
|
2170
|
-
const t =
|
|
2169
|
+
}, Nc = (e) => {
|
|
2170
|
+
const t = Bc();
|
|
2171
2171
|
return t ? (t.style.font = e, t.getBoundingClientRect().width) : null;
|
|
2172
|
-
},
|
|
2172
|
+
}, Bc = () => typeof document > "u" ? null : (q || (q = document.createElement("span"), q.style.position = "absolute", q.style.visibility = "hidden", q.style.whiteSpace = "nowrap", q.style.left = "-9999px", q.textContent = Kr, document.body.appendChild(q)), q), Jr = fe(null), Ic = ({ children: e, measurer: t }) => {
|
|
2173
2173
|
const [n, r] = E(null);
|
|
2174
|
-
|
|
2174
|
+
C(() => {
|
|
2175
2175
|
if (t !== void 0) return;
|
|
2176
2176
|
let i = !1;
|
|
2177
2177
|
const c = () => {
|
|
2178
|
-
i || r(
|
|
2178
|
+
i || r(Dc());
|
|
2179
2179
|
};
|
|
2180
2180
|
return (async () => {
|
|
2181
2181
|
typeof document < "u" && "fonts" in document && await document.fonts.ready, c();
|
|
@@ -2184,21 +2184,21 @@ const _c = (e) => {
|
|
|
2184
2184
|
};
|
|
2185
2185
|
}, [t]);
|
|
2186
2186
|
const o = t ?? n;
|
|
2187
|
-
return o === null ? null : /* @__PURE__ */ a(
|
|
2187
|
+
return o === null ? null : /* @__PURE__ */ a(Jr.Provider, { value: o, children: e });
|
|
2188
2188
|
}, ve = () => {
|
|
2189
|
-
const e = ee(
|
|
2189
|
+
const e = ee(Jr);
|
|
2190
2190
|
if (e === null)
|
|
2191
2191
|
throw new Error("useTextMeasurer must be used inside a <TextMeasurerProvider>.");
|
|
2192
2192
|
return e;
|
|
2193
|
-
},
|
|
2193
|
+
}, Dc = () => {
|
|
2194
2194
|
try {
|
|
2195
2195
|
return new It(new Ht());
|
|
2196
2196
|
} catch {
|
|
2197
|
-
return new It(new
|
|
2197
|
+
return new It(new zo());
|
|
2198
2198
|
}
|
|
2199
2199
|
};
|
|
2200
|
-
var
|
|
2201
|
-
const
|
|
2200
|
+
var Mc = "_1kjk02r0", Rc = "_1kjk02r1", Oc = "_1kjk02r2", zc = "_1kjk02r3", Gc = "_1kjk02r4", Wc = "_1kjk02r5", $c = "_1kjk02r6", Xc = "_1kjk02r7", Vc = "_1kjk02r8", Uc = "_1kjk02r9", Yc = "_1kjk02ra", jc = "_1kjk02rb", qc = "_1dw9dgx0";
|
|
2201
|
+
const Kc = "#9ca3af", rt = "\0", Jc = (e) => {
|
|
2202
2202
|
const t = [];
|
|
2203
2203
|
return e.forEach((n, r) => {
|
|
2204
2204
|
const o = n.aesthetics.includes("size");
|
|
@@ -2207,9 +2207,9 @@ const Yc = "#9ca3af", nt = "\0", jc = (e) => {
|
|
|
2207
2207
|
const u = Number(i.visual.size);
|
|
2208
2208
|
if (!Number.isFinite(u) || u <= 0) continue;
|
|
2209
2209
|
}
|
|
2210
|
-
const c = i.visual.color ?? "", l = o ? `${
|
|
2210
|
+
const c = i.visual.color ?? "", l = o ? `${rt}${Number(i.visual.size)}` : "", d = i.visual.lineType;
|
|
2211
2211
|
t.push({
|
|
2212
|
-
key: `${r}${
|
|
2212
|
+
key: `${r}${rt}${String(i.value)}${rt}${c}${l}`,
|
|
2213
2213
|
formattedLabel: i.formattedLabel,
|
|
2214
2214
|
visual: i.visual,
|
|
2215
2215
|
swatchShape: i.swatchShape,
|
|
@@ -2218,35 +2218,35 @@ const Yc = "#9ca3af", nt = "\0", jc = (e) => {
|
|
|
2218
2218
|
});
|
|
2219
2219
|
}
|
|
2220
2220
|
}), t;
|
|
2221
|
-
},
|
|
2222
|
-
const { legendSwatchWidth: r, legendSwatchHeight: o } =
|
|
2223
|
-
return e ? /* @__PURE__ */ a(
|
|
2224
|
-
},
|
|
2225
|
-
/* @__PURE__ */ a(
|
|
2221
|
+
}, Zr = ({ pill: e }) => e.isBubble ? /* @__PURE__ */ a(ed, { pill: e }) : /* @__PURE__ */ a(Qc, { pill: e }), Zc = ({ color: e, lineType: t, shape: n }) => {
|
|
2222
|
+
const { legendSwatchWidth: r, legendSwatchHeight: o } = Tt();
|
|
2223
|
+
return e ? /* @__PURE__ */ a(je, { shape: n, color: e, lineType: t, width: r, height: o }) : null;
|
|
2224
|
+
}, Qc = ({ pill: e }) => /* @__PURE__ */ m(w, { children: [
|
|
2225
|
+
/* @__PURE__ */ a(Zc, { color: e.visual.color, lineType: e.primaryLineType, shape: e.swatchShape }),
|
|
2226
2226
|
/* @__PURE__ */ a("span", { children: e.formattedLabel })
|
|
2227
|
-
] }),
|
|
2227
|
+
] }), ed = ({ pill: e }) => {
|
|
2228
2228
|
const t = Number(e.visual.size);
|
|
2229
|
-
return /* @__PURE__ */ m(
|
|
2229
|
+
return /* @__PURE__ */ m(w, { children: [
|
|
2230
2230
|
/* @__PURE__ */ a(
|
|
2231
2231
|
"span",
|
|
2232
2232
|
{
|
|
2233
|
-
className:
|
|
2233
|
+
className: qc,
|
|
2234
2234
|
style: {
|
|
2235
2235
|
width: t,
|
|
2236
2236
|
height: t,
|
|
2237
|
-
backgroundColor: e.visual.color ??
|
|
2237
|
+
backgroundColor: e.visual.color ?? Kc
|
|
2238
2238
|
}
|
|
2239
2239
|
}
|
|
2240
2240
|
),
|
|
2241
2241
|
/* @__PURE__ */ a("span", { children: e.formattedLabel })
|
|
2242
2242
|
] });
|
|
2243
|
-
},
|
|
2243
|
+
}, td = ({ hiddenPills: e, placement: t }) => {
|
|
2244
2244
|
const n = J(), [r, o] = E(!1), { refs: i, floatingStyles: c } = xt({
|
|
2245
2245
|
open: r,
|
|
2246
2246
|
placement: t,
|
|
2247
2247
|
middleware: [St(4), kt(), Lt({ padding: 8 })]
|
|
2248
2248
|
});
|
|
2249
|
-
|
|
2249
|
+
C(() => {
|
|
2250
2250
|
if (!r) return;
|
|
2251
2251
|
const h = (p) => {
|
|
2252
2252
|
const f = p.target;
|
|
@@ -2261,24 +2261,24 @@ const Yc = "#9ca3af", nt = "\0", jc = (e) => {
|
|
|
2261
2261
|
};
|
|
2262
2262
|
}, [r, i.floating, i.reference]);
|
|
2263
2263
|
const l = t === "left" || t === "right", d = Math.min(e.length - 1, ir), u = Array.from({ length: d }, (h, g) => d - g);
|
|
2264
|
-
return /* @__PURE__ */ m(
|
|
2264
|
+
return /* @__PURE__ */ m(w, { children: [
|
|
2265
2265
|
/* @__PURE__ */ m(
|
|
2266
2266
|
"div",
|
|
2267
2267
|
{
|
|
2268
2268
|
ref: i.setReference,
|
|
2269
|
-
className: ce(
|
|
2270
|
-
[
|
|
2271
|
-
[
|
|
2269
|
+
className: ce(Mc, {
|
|
2270
|
+
[Oc]: l,
|
|
2271
|
+
[Rc]: !l
|
|
2272
2272
|
}),
|
|
2273
2273
|
children: [
|
|
2274
2274
|
u.map((h) => /* @__PURE__ */ a(
|
|
2275
2275
|
"span",
|
|
2276
2276
|
{
|
|
2277
|
-
className: ce(
|
|
2278
|
-
[
|
|
2279
|
-
[
|
|
2277
|
+
className: ce(zc, {
|
|
2278
|
+
[Wc]: l,
|
|
2279
|
+
[Gc]: !l
|
|
2280
2280
|
}),
|
|
2281
|
-
style:
|
|
2281
|
+
style: nd(h, l),
|
|
2282
2282
|
"aria-hidden": !0
|
|
2283
2283
|
},
|
|
2284
2284
|
h
|
|
@@ -2287,12 +2287,12 @@ const Yc = "#9ca3af", nt = "\0", jc = (e) => {
|
|
|
2287
2287
|
"button",
|
|
2288
2288
|
{
|
|
2289
2289
|
type: "button",
|
|
2290
|
-
className: ce(
|
|
2290
|
+
className: ce($c, { [Xc]: r }),
|
|
2291
2291
|
onClick: () => o((h) => !h),
|
|
2292
2292
|
"aria-haspopup": "dialog",
|
|
2293
2293
|
"aria-expanded": r,
|
|
2294
2294
|
"aria-label": `Show ${e.length} hidden legend ${e.length === 1 ? "item" : "items"}`,
|
|
2295
|
-
children: /* @__PURE__ */ m("span", { className:
|
|
2295
|
+
children: /* @__PURE__ */ m("span", { className: Vc, children: [
|
|
2296
2296
|
"+",
|
|
2297
2297
|
e.length
|
|
2298
2298
|
] })
|
|
@@ -2307,43 +2307,43 @@ const Yc = "#9ca3af", nt = "\0", jc = (e) => {
|
|
|
2307
2307
|
ref: i.setFloating,
|
|
2308
2308
|
role: "dialog",
|
|
2309
2309
|
"aria-label": n("graph.legend.hiddenItems"),
|
|
2310
|
-
className:
|
|
2310
|
+
className: Uc,
|
|
2311
2311
|
style: c,
|
|
2312
|
-
children: /* @__PURE__ */ a("ul", { className:
|
|
2312
|
+
children: /* @__PURE__ */ a("ul", { className: Yc, children: e.map((h) => /* @__PURE__ */ a("li", { className: jc, children: /* @__PURE__ */ a(Zr, { pill: h }) }, h.key)) })
|
|
2313
2313
|
}
|
|
2314
2314
|
)
|
|
2315
2315
|
] });
|
|
2316
|
-
},
|
|
2316
|
+
}, nd = (e, t) => {
|
|
2317
2317
|
const n = -e * sr;
|
|
2318
2318
|
return { transform: t ? `translateY(${n}px)` : `translateX(${n}px)` };
|
|
2319
2319
|
};
|
|
2320
|
-
var
|
|
2321
|
-
const
|
|
2320
|
+
var rd = "_1cecisi0", od = "_1cecisi1", ad = "_1cecisi2", id = "_1cecisi3";
|
|
2321
|
+
const sd = ({
|
|
2322
2322
|
edge: e,
|
|
2323
2323
|
formattedLegends: t,
|
|
2324
2324
|
containerWidth: n,
|
|
2325
2325
|
containerHeight: r,
|
|
2326
2326
|
textScale: o
|
|
2327
2327
|
}) => {
|
|
2328
|
-
const i = ve(), c =
|
|
2328
|
+
const i = ve(), c = Tt(), l = v(() => Jc(t), [t]), d = e === "left" || e === "right", u = d ? r : n, h = v(() => {
|
|
2329
2329
|
if (l.length === 0) return { visibleCount: 0, hasOverflow: !1 };
|
|
2330
2330
|
if (u <= 0) return { visibleCount: l.length, hasOverflow: !1 };
|
|
2331
|
-
const y = te(lr, o), S = { family: dr, size: y }, k = y * cr,
|
|
2331
|
+
const y = te(lr, o), S = { family: dr, size: y }, k = y * cr, T = (V) => d ? ld(V, k, c) : Zt({
|
|
2332
2332
|
label: V.formattedLabel,
|
|
2333
|
-
swatchInlineSize:
|
|
2333
|
+
swatchInlineSize: cd(V, c.legendSwatchWidth),
|
|
2334
2334
|
textMeasurer: i,
|
|
2335
2335
|
font: S,
|
|
2336
2336
|
swatchGap: c.legendSwatchGap,
|
|
2337
2337
|
horizontalChrome: c.legendPillHorizontalChrome
|
|
2338
|
-
}), A = l.map(
|
|
2338
|
+
}), A = l.map(T), _ = (d ? k + c.legendPillVerticalChrome : Zt({
|
|
2339
2339
|
label: `+${l.length}`,
|
|
2340
2340
|
swatchInlineSize: 0,
|
|
2341
2341
|
textMeasurer: i,
|
|
2342
2342
|
font: S,
|
|
2343
2343
|
swatchGap: c.legendSwatchGap,
|
|
2344
2344
|
horizontalChrome: c.legendPillHorizontalChrome
|
|
2345
|
-
})) +
|
|
2346
|
-
return
|
|
2345
|
+
})) + Ti;
|
|
2346
|
+
return ud({
|
|
2347
2347
|
pillSizes: A,
|
|
2348
2348
|
overflowPillSize: _,
|
|
2349
2349
|
containerSize: u,
|
|
@@ -2355,13 +2355,13 @@ const od = ({
|
|
|
2355
2355
|
return /* @__PURE__ */ m(
|
|
2356
2356
|
"div",
|
|
2357
2357
|
{
|
|
2358
|
-
className: ce(
|
|
2359
|
-
[
|
|
2360
|
-
[
|
|
2358
|
+
className: ce(rd, {
|
|
2359
|
+
[ad]: d,
|
|
2360
|
+
[od]: !d
|
|
2361
2361
|
}),
|
|
2362
2362
|
children: [
|
|
2363
|
-
g.map((y) => /* @__PURE__ */ a("div", { className:
|
|
2364
|
-
f && /* @__PURE__ */ a(
|
|
2363
|
+
g.map((y) => /* @__PURE__ */ a("div", { className: id, children: /* @__PURE__ */ a(Zr, { pill: y }) }, y.key)),
|
|
2364
|
+
f && /* @__PURE__ */ a(td, { hiddenPills: p, placement: hd(e) })
|
|
2365
2365
|
]
|
|
2366
2366
|
}
|
|
2367
2367
|
);
|
|
@@ -2375,10 +2375,10 @@ const od = ({
|
|
|
2375
2375
|
}) => {
|
|
2376
2376
|
const c = n.measureText(e, r).width, l = t > 0 ? o : 0;
|
|
2377
2377
|
return t + l + c + i;
|
|
2378
|
-
},
|
|
2379
|
-
const r =
|
|
2378
|
+
}, ld = (e, t, n) => {
|
|
2379
|
+
const r = dd(e, n.legendSwatchHeight);
|
|
2380
2380
|
return Math.max(t, r) + n.legendPillVerticalChrome;
|
|
2381
|
-
},
|
|
2381
|
+
}, cd = (e, t) => e.isBubble ? Number(e.visual.size) : Ar(e.visual.color, t), dd = (e, t) => e.isBubble ? Number(e.visual.size) : t, ud = ({
|
|
2382
2382
|
pillSizes: e,
|
|
2383
2383
|
overflowPillSize: t,
|
|
2384
2384
|
containerSize: n,
|
|
@@ -2397,7 +2397,7 @@ const od = ({
|
|
|
2397
2397
|
i = d, c += 1;
|
|
2398
2398
|
}
|
|
2399
2399
|
return { visibleCount: c, hasOverflow: !0 };
|
|
2400
|
-
},
|
|
2400
|
+
}, hd = (e) => {
|
|
2401
2401
|
switch (e) {
|
|
2402
2402
|
case "top":
|
|
2403
2403
|
return "bottom";
|
|
@@ -2408,7 +2408,7 @@ const od = ({
|
|
|
2408
2408
|
case "right":
|
|
2409
2409
|
return "left";
|
|
2410
2410
|
}
|
|
2411
|
-
},
|
|
2411
|
+
}, gd = oe(function({ formattedLegends: t, rects: n, textScale: r }) {
|
|
2412
2412
|
const o = v(() => {
|
|
2413
2413
|
const i = /* @__PURE__ */ new Map();
|
|
2414
2414
|
for (const c of t) {
|
|
@@ -2417,12 +2417,12 @@ const od = ({
|
|
|
2417
2417
|
}
|
|
2418
2418
|
return i;
|
|
2419
2419
|
}, [t]);
|
|
2420
|
-
return /* @__PURE__ */ a(
|
|
2420
|
+
return /* @__PURE__ */ a(w, { children: Array.from(o, ([i, c]) => {
|
|
2421
2421
|
const l = n[i];
|
|
2422
2422
|
return l === void 0 ? null : /* @__PURE__ */ m(
|
|
2423
2423
|
"div",
|
|
2424
2424
|
{
|
|
2425
|
-
className:
|
|
2425
|
+
className: Pc,
|
|
2426
2426
|
style: {
|
|
2427
2427
|
left: l.x,
|
|
2428
2428
|
top: l.y,
|
|
@@ -2431,7 +2431,7 @@ const od = ({
|
|
|
2431
2431
|
},
|
|
2432
2432
|
children: [
|
|
2433
2433
|
/* @__PURE__ */ a(
|
|
2434
|
-
|
|
2434
|
+
sd,
|
|
2435
2435
|
{
|
|
2436
2436
|
edge: i,
|
|
2437
2437
|
formattedLegends: c.pill,
|
|
@@ -2440,40 +2440,40 @@ const od = ({
|
|
|
2440
2440
|
textScale: r
|
|
2441
2441
|
}
|
|
2442
2442
|
),
|
|
2443
|
-
/* @__PURE__ */ a(
|
|
2443
|
+
/* @__PURE__ */ a(Ac, { legends: c.direct, containerRect: l, textScale: r })
|
|
2444
2444
|
]
|
|
2445
2445
|
},
|
|
2446
2446
|
i
|
|
2447
2447
|
);
|
|
2448
2448
|
}) });
|
|
2449
2449
|
});
|
|
2450
|
-
const Ft = 1,
|
|
2450
|
+
const Ft = 1, Qr = 8, pd = 12;
|
|
2451
2451
|
s.pointStrokeColor;
|
|
2452
|
-
const
|
|
2453
|
-
const t = z(e.observation), n = (X(e.observation) ?? Ft) *
|
|
2452
|
+
const fd = 1, md = 2, vd = 0.7, pe = ({ hit: e }) => {
|
|
2453
|
+
const t = z(e.observation), n = (X(e.observation) ?? Ft) * vd, r = (ze(e.observation) ?? Qr) / 2;
|
|
2454
2454
|
return /* @__PURE__ */ a(
|
|
2455
2455
|
"circle",
|
|
2456
2456
|
{
|
|
2457
|
-
cx: x(
|
|
2458
|
-
cy: x(
|
|
2457
|
+
cx: x(We(e.x)),
|
|
2458
|
+
cy: x(Ge(e.y)),
|
|
2459
2459
|
r,
|
|
2460
2460
|
fill: t,
|
|
2461
2461
|
opacity: n,
|
|
2462
2462
|
stroke: s.hoveredPointRingColor,
|
|
2463
|
-
strokeWidth:
|
|
2463
|
+
strokeWidth: md,
|
|
2464
2464
|
"data-testid": "companion-point"
|
|
2465
2465
|
}
|
|
2466
2466
|
);
|
|
2467
|
-
},
|
|
2467
|
+
}, eo = 0.3, to = 1, R = {
|
|
2468
2468
|
type: "spring",
|
|
2469
2469
|
stiffness: 500,
|
|
2470
2470
|
damping: 60,
|
|
2471
2471
|
mass: 1
|
|
2472
|
-
},
|
|
2473
|
-
const n =
|
|
2474
|
-
return
|
|
2475
|
-
const r =
|
|
2476
|
-
|
|
2472
|
+
}, ft = (e, t) => {
|
|
2473
|
+
const n = Tn(e);
|
|
2474
|
+
return C(() => {
|
|
2475
|
+
const r = ma(n.get(), e);
|
|
2476
|
+
na(0, 1, {
|
|
2477
2477
|
...t,
|
|
2478
2478
|
onUpdate: (o) => {
|
|
2479
2479
|
const i = r(o);
|
|
@@ -2483,7 +2483,7 @@ const hd = 1, gd = 2, pd = 0.7, pe = ({ hit: e }) => {
|
|
|
2483
2483
|
}, [t, e, n]), n;
|
|
2484
2484
|
};
|
|
2485
2485
|
var ye = "_1d8mpa10";
|
|
2486
|
-
const
|
|
2486
|
+
const yd = oe(function({
|
|
2487
2487
|
layer: t,
|
|
2488
2488
|
coordSystem: n,
|
|
2489
2489
|
isAnimated: r
|
|
@@ -2492,22 +2492,22 @@ const fd = oe(function({
|
|
|
2492
2492
|
() => vn(n, t.params),
|
|
2493
2493
|
[t.params, n]
|
|
2494
2494
|
), c = v(() => {
|
|
2495
|
-
const l =
|
|
2495
|
+
const l = $e(t.data, t.mapping, t.id), d = [];
|
|
2496
2496
|
return t.data.groupBy(Ae.group).forEach((u) => {
|
|
2497
2497
|
const h = yn([...u], t.params.missingValues), g = i(h), p = o(h);
|
|
2498
2498
|
if (!g || !p) return;
|
|
2499
2499
|
const f = h[0];
|
|
2500
2500
|
if (!f) return;
|
|
2501
|
-
const y = z(f), S = X(f), k =
|
|
2501
|
+
const y = z(f), S = X(f), k = Xe(f, t.params), T = Ve(Ue(f));
|
|
2502
2502
|
d.push({
|
|
2503
2503
|
key: l(f),
|
|
2504
2504
|
areaPath: g,
|
|
2505
2505
|
linePath: p,
|
|
2506
2506
|
color: y,
|
|
2507
|
-
fillOpacity: S ??
|
|
2507
|
+
fillOpacity: S ?? eo,
|
|
2508
2508
|
strokeWidth: k,
|
|
2509
|
-
strokeOpacity:
|
|
2510
|
-
strokeDasharray:
|
|
2509
|
+
strokeOpacity: to,
|
|
2510
|
+
strokeDasharray: T
|
|
2511
2511
|
});
|
|
2512
2512
|
}), d;
|
|
2513
2513
|
}, [i, o, t.data, t.id, t.mapping, t.params]);
|
|
@@ -2521,7 +2521,7 @@ const fd = oe(function({
|
|
|
2521
2521
|
"data-geom": "area",
|
|
2522
2522
|
className: ye,
|
|
2523
2523
|
children: c.map((l) => /* @__PURE__ */ a(
|
|
2524
|
-
|
|
2524
|
+
bd,
|
|
2525
2525
|
{
|
|
2526
2526
|
areaPath: l.areaPath,
|
|
2527
2527
|
linePath: l.linePath,
|
|
@@ -2536,7 +2536,7 @@ const fd = oe(function({
|
|
|
2536
2536
|
))
|
|
2537
2537
|
}
|
|
2538
2538
|
);
|
|
2539
|
-
}),
|
|
2539
|
+
}), bd = ({
|
|
2540
2540
|
areaPath: e,
|
|
2541
2541
|
linePath: t,
|
|
2542
2542
|
color: n,
|
|
@@ -2546,7 +2546,7 @@ const fd = oe(function({
|
|
|
2546
2546
|
strokeDasharray: c,
|
|
2547
2547
|
isAnimated: l
|
|
2548
2548
|
}) => l ? /* @__PURE__ */ a(
|
|
2549
|
-
|
|
2549
|
+
xd,
|
|
2550
2550
|
{
|
|
2551
2551
|
areaPath: e,
|
|
2552
2552
|
linePath: t,
|
|
@@ -2570,7 +2570,7 @@ const fd = oe(function({
|
|
|
2570
2570
|
vectorEffect: "non-scaling-stroke"
|
|
2571
2571
|
}
|
|
2572
2572
|
)
|
|
2573
|
-
] }),
|
|
2573
|
+
] }), xd = ({
|
|
2574
2574
|
areaPath: e,
|
|
2575
2575
|
linePath: t,
|
|
2576
2576
|
color: n,
|
|
@@ -2579,7 +2579,7 @@ const fd = oe(function({
|
|
|
2579
2579
|
strokeOpacity: i,
|
|
2580
2580
|
strokeDasharray: c
|
|
2581
2581
|
}) => {
|
|
2582
|
-
const l =
|
|
2582
|
+
const l = ft(e, R), d = ft(t, R);
|
|
2583
2583
|
return /* @__PURE__ */ m("g", { children: [
|
|
2584
2584
|
/* @__PURE__ */ a(Y.path, { d: l, fill: n, fillOpacity: r, stroke: "none" }),
|
|
2585
2585
|
/* @__PURE__ */ a(
|
|
@@ -2596,10 +2596,10 @@ const fd = oe(function({
|
|
|
2596
2596
|
)
|
|
2597
2597
|
] });
|
|
2598
2598
|
};
|
|
2599
|
-
var
|
|
2600
|
-
const
|
|
2601
|
-
const n =
|
|
2602
|
-
return /* @__PURE__ */ m("g", { ...t, className:
|
|
2599
|
+
var Sd = "_46ebsf0";
|
|
2600
|
+
const ot = 1, kd = 2, Ld = 1, Cd = pd / 2, wd = 2.25, Nt = ({ hit: e, ...t }) => {
|
|
2601
|
+
const n = Td(e.observation), r = z(e.observation), o = X(e.observation) ?? Ft, i = x(We(e.x)), c = x(Ge(e.y)), d = n + ot / 2 + Ld + ot / 2;
|
|
2602
|
+
return /* @__PURE__ */ m("g", { ...t, className: Sd, children: [
|
|
2603
2603
|
/* @__PURE__ */ a(
|
|
2604
2604
|
"circle",
|
|
2605
2605
|
{
|
|
@@ -2608,7 +2608,7 @@ const rt = 1, bd = 2, xd = 1, Sd = ud / 2, kd = 2.25, Nt = ({ hit: e, ...t }) =>
|
|
|
2608
2608
|
r: d,
|
|
2609
2609
|
fill: "none",
|
|
2610
2610
|
stroke: s.hoveredPointRingColor,
|
|
2611
|
-
strokeWidth:
|
|
2611
|
+
strokeWidth: kd
|
|
2612
2612
|
}
|
|
2613
2613
|
),
|
|
2614
2614
|
/* @__PURE__ */ a(
|
|
@@ -2620,14 +2620,14 @@ const rt = 1, bd = 2, xd = 1, Sd = ud / 2, kd = 2.25, Nt = ({ hit: e, ...t }) =>
|
|
|
2620
2620
|
fill: r,
|
|
2621
2621
|
opacity: o,
|
|
2622
2622
|
stroke: s.hoveredPointRingColor,
|
|
2623
|
-
strokeWidth:
|
|
2623
|
+
strokeWidth: ot
|
|
2624
2624
|
}
|
|
2625
2625
|
)
|
|
2626
2626
|
] });
|
|
2627
|
-
},
|
|
2628
|
-
const t =
|
|
2629
|
-
return bn(t) ? t /
|
|
2630
|
-
},
|
|
2627
|
+
}, Td = (e) => {
|
|
2628
|
+
const t = ze(e);
|
|
2629
|
+
return bn(t) ? t / wd : Cd;
|
|
2630
|
+
}, Ad = ({ layer: e, coordSystem: t, primary: n, companions: r }) => {
|
|
2631
2631
|
const o = xn(n.observation), i = v(() => {
|
|
2632
2632
|
const p = e.data.filter(Ae.group, "eq", o);
|
|
2633
2633
|
return yn([...p], e.params.missingValues);
|
|
@@ -2639,7 +2639,7 @@ const rt = 1, bd = 2, xd = 1, Sd = ud / 2, kd = 2.25, Nt = ({ hit: e, ...t }) =>
|
|
|
2639
2639
|
};
|
|
2640
2640
|
}, [t, e.params, i]);
|
|
2641
2641
|
if (!c || !l) return null;
|
|
2642
|
-
const d = z(n.observation), u = X(n.observation) ??
|
|
2642
|
+
const d = z(n.observation), u = X(n.observation) ?? eo, h = Xe(n.observation, e.params), g = Ve(Ue(n.observation));
|
|
2643
2643
|
return /* @__PURE__ */ m("g", { "data-testid": "hovered-area", children: [
|
|
2644
2644
|
/* @__PURE__ */ m(
|
|
2645
2645
|
"svg",
|
|
@@ -2659,7 +2659,7 @@ const rt = 1, bd = 2, xd = 1, Sd = ud / 2, kd = 2.25, Nt = ({ hit: e, ...t }) =>
|
|
|
2659
2659
|
fill: "none",
|
|
2660
2660
|
stroke: d,
|
|
2661
2661
|
strokeWidth: h,
|
|
2662
|
-
strokeOpacity:
|
|
2662
|
+
strokeOpacity: to,
|
|
2663
2663
|
strokeDasharray: g,
|
|
2664
2664
|
vectorEffect: "non-scaling-stroke",
|
|
2665
2665
|
"data-testid": "hovered-area-edge"
|
|
@@ -2671,52 +2671,52 @@ const rt = 1, bd = 2, xd = 1, Sd = ud / 2, kd = 2.25, Nt = ({ hit: e, ...t }) =>
|
|
|
2671
2671
|
r.map((p) => /* @__PURE__ */ a(pe, { hit: p }, `companion-${p.layerId}-${p.pointIndex}`)),
|
|
2672
2672
|
/* @__PURE__ */ a(Nt, { hit: n, "data-testid": "hovered-area-point" })
|
|
2673
2673
|
] });
|
|
2674
|
-
},
|
|
2674
|
+
}, Ed = {
|
|
2675
2675
|
geom: "area",
|
|
2676
2676
|
coord: "cartesian",
|
|
2677
2677
|
guideMode: "continuous",
|
|
2678
|
-
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(
|
|
2679
|
-
renderHover: ({ layer: e, coordSystem: t, primary: n, group: r, related: o }) => /* @__PURE__ */ a(
|
|
2680
|
-
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(
|
|
2678
|
+
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(yd, { layer: e, coordSystem: t, isAnimated: n }),
|
|
2679
|
+
renderHover: ({ layer: e, coordSystem: t, primary: n, group: r, related: o }) => /* @__PURE__ */ a(Ad, { layer: e, coordSystem: t, primary: n, companions: [...r, ...o] }),
|
|
2680
|
+
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(w, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
|
|
2681
2681
|
getOverlayAnchor: ({ observation: e, coordSystem: t }) => {
|
|
2682
2682
|
if (t.mainAxis === "x") {
|
|
2683
|
-
const o = ue(e), i =
|
|
2683
|
+
const o = ue(e), i = Go(e) ?? he(e);
|
|
2684
2684
|
return o === null || i === null ? null : { x: o, y: i };
|
|
2685
2685
|
}
|
|
2686
|
-
const n = he(e), r =
|
|
2686
|
+
const n = he(e), r = Wo(e) ?? ue(e);
|
|
2687
2687
|
return n === null || r === null ? null : { x: r, y: n };
|
|
2688
2688
|
}
|
|
2689
|
-
},
|
|
2689
|
+
}, no = 1, Te = 4, _d = oe(function({
|
|
2690
2690
|
layer: t,
|
|
2691
2691
|
coordSystem: n,
|
|
2692
2692
|
isAnimated: r
|
|
2693
2693
|
}) {
|
|
2694
2694
|
const o = vt(), i = v(() => {
|
|
2695
|
-
const l =
|
|
2695
|
+
const l = $e(t.data, t.mapping, t.id), d = /* @__PURE__ */ new Map();
|
|
2696
2696
|
for (const u of t.data) {
|
|
2697
2697
|
const h = Sn(n.mainAxis, u);
|
|
2698
2698
|
if (!h) continue;
|
|
2699
|
-
const g =
|
|
2699
|
+
const g = Hd(n.mainAxis, h), p = d.get(g), f = {
|
|
2700
2700
|
key: l(u),
|
|
2701
2701
|
...h,
|
|
2702
2702
|
fill: z(u),
|
|
2703
|
-
opacity: X(u) ??
|
|
2703
|
+
opacity: X(u) ?? no
|
|
2704
2704
|
};
|
|
2705
2705
|
p ? p.push(f) : d.set(g, [f]);
|
|
2706
2706
|
}
|
|
2707
2707
|
return [...d.entries()].map(([u, h]) => ({
|
|
2708
2708
|
id: `${o}${u}`,
|
|
2709
2709
|
bars: h,
|
|
2710
|
-
...
|
|
2710
|
+
...Fd(h)
|
|
2711
2711
|
}));
|
|
2712
2712
|
}, [o, n.mainAxis, t]), c = i.filter((l) => l.bars.length > 1);
|
|
2713
|
-
return /* @__PURE__ */ m(
|
|
2714
|
-
c.length > 0 && /* @__PURE__ */ a("defs", { children: c.map((l) => /* @__PURE__ */ a("clipPath", { id: l.id, children: /* @__PURE__ */ a(
|
|
2713
|
+
return /* @__PURE__ */ m(w, { children: [
|
|
2714
|
+
c.length > 0 && /* @__PURE__ */ a("defs", { children: c.map((l) => /* @__PURE__ */ a("clipPath", { id: l.id, children: /* @__PURE__ */ a(Pd, { column: l, isAnimated: r }) }, l.id)) }),
|
|
2715
2715
|
i.map((l) => {
|
|
2716
2716
|
const [d] = l.bars;
|
|
2717
2717
|
if (l.bars.length === 1 && d !== void 0) {
|
|
2718
2718
|
const { key: u, ...h } = d;
|
|
2719
|
-
return /* @__PURE__ */ a(Qt, { ...h, rx:
|
|
2719
|
+
return /* @__PURE__ */ a(Qt, { ...h, rx: Te, isAnimated: r }, u);
|
|
2720
2720
|
}
|
|
2721
2721
|
return /* @__PURE__ */ a("g", { clipPath: `url(#${l.id})`, children: l.bars.map((u) => {
|
|
2722
2722
|
const { key: h, ...g } = u;
|
|
@@ -2729,7 +2729,7 @@ const rt = 1, bd = 2, xd = 1, Sd = ud / 2, kd = 2.25, Nt = ({ hit: e, ...t }) =>
|
|
|
2729
2729
|
{
|
|
2730
2730
|
initial: !1,
|
|
2731
2731
|
style: { transformBox: "view-box" },
|
|
2732
|
-
transition:
|
|
2732
|
+
transition: R,
|
|
2733
2733
|
fill: n.fill,
|
|
2734
2734
|
opacity: n.opacity,
|
|
2735
2735
|
rx: t,
|
|
@@ -2753,13 +2753,13 @@ const rt = 1, bd = 2, xd = 1, Sd = ud / 2, kd = 2.25, Nt = ({ hit: e, ...t }) =>
|
|
|
2753
2753
|
opacity: n.opacity,
|
|
2754
2754
|
rx: t
|
|
2755
2755
|
}
|
|
2756
|
-
),
|
|
2756
|
+
), Pd = ({ column: e, isAnimated: t }) => t ? /* @__PURE__ */ a(
|
|
2757
2757
|
Y.rect,
|
|
2758
2758
|
{
|
|
2759
2759
|
initial: !1,
|
|
2760
2760
|
style: { transformBox: "view-box" },
|
|
2761
|
-
transition:
|
|
2762
|
-
rx:
|
|
2761
|
+
transition: R,
|
|
2762
|
+
rx: Te,
|
|
2763
2763
|
animate: {
|
|
2764
2764
|
x: x(e.x),
|
|
2765
2765
|
y: x(e.y),
|
|
@@ -2774,19 +2774,19 @@ const rt = 1, bd = 2, xd = 1, Sd = ud / 2, kd = 2.25, Nt = ({ hit: e, ...t }) =>
|
|
|
2774
2774
|
y: x(e.y),
|
|
2775
2775
|
width: x(e.width),
|
|
2776
2776
|
height: x(e.height),
|
|
2777
|
-
rx:
|
|
2777
|
+
rx: Te
|
|
2778
2778
|
}
|
|
2779
|
-
),
|
|
2779
|
+
), Hd = (e, t) => e === "x" ? `${t.x}-${t.width}` : `${t.y}-${t.height}`, Fd = (e) => {
|
|
2780
2780
|
let t = 1 / 0, n = 1 / 0, r = -1 / 0, o = -1 / 0;
|
|
2781
2781
|
for (const i of e)
|
|
2782
2782
|
i.x < t && (t = i.x), i.y < n && (n = i.y), i.x + i.width > r && (r = i.x + i.width), i.y + i.height > o && (o = i.y + i.height);
|
|
2783
2783
|
return { x: t, y: n, width: r - t, height: o - n };
|
|
2784
2784
|
};
|
|
2785
|
-
var
|
|
2786
|
-
const Le = 3,
|
|
2785
|
+
var Nd = "_1suo8ub0";
|
|
2786
|
+
const Le = 3, Bd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
2787
2787
|
const r = Sn(e.mainAxis, t.observation);
|
|
2788
2788
|
if (!r) return null;
|
|
2789
|
-
const o = r.x * n.width, i = r.y * n.height, c = r.width * n.width, l = r.height * n.height, d = o - Le, u = i - Le, h = c + Le * 2, g = l + Le * 2, p =
|
|
2789
|
+
const o = r.x * n.width, i = r.y * n.height, c = r.width * n.width, l = r.height * n.height, d = o - Le, u = i - Le, h = c + Le * 2, g = l + Le * 2, p = Te + Le, f = z(t.observation), y = X(t.observation) ?? no;
|
|
2790
2790
|
return /* @__PURE__ */ m("g", { "data-testid": "hovered-bar", children: [
|
|
2791
2791
|
/* @__PURE__ */ a(
|
|
2792
2792
|
"rect",
|
|
@@ -2797,7 +2797,7 @@ const Le = 3, Hd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2797
2797
|
height: g,
|
|
2798
2798
|
rx: p,
|
|
2799
2799
|
fill: s.hoveredBarBorderColor,
|
|
2800
|
-
className:
|
|
2800
|
+
className: Nd,
|
|
2801
2801
|
"data-testid": "hovered-bar-border"
|
|
2802
2802
|
}
|
|
2803
2803
|
),
|
|
@@ -2810,35 +2810,35 @@ const Le = 3, Hd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2810
2810
|
height: x(r.height),
|
|
2811
2811
|
fill: f,
|
|
2812
2812
|
opacity: y,
|
|
2813
|
-
rx:
|
|
2813
|
+
rx: Te,
|
|
2814
2814
|
"data-testid": "hovered-bar-fill"
|
|
2815
2815
|
}
|
|
2816
2816
|
)
|
|
2817
2817
|
] });
|
|
2818
|
-
},
|
|
2818
|
+
}, Id = {
|
|
2819
2819
|
geom: "bar",
|
|
2820
2820
|
coord: "cartesian",
|
|
2821
2821
|
guideMode: "bar",
|
|
2822
|
-
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(
|
|
2823
|
-
renderHover: ({ coordSystem: e, primary: t, panelRect: n }) => /* @__PURE__ */ a(
|
|
2822
|
+
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(_d, { layer: e, coordSystem: t, isAnimated: n }),
|
|
2823
|
+
renderHover: ({ coordSystem: e, primary: t, panelRect: n }) => /* @__PURE__ */ a(Bd, { coordSystem: e, primary: t, panelRect: n }),
|
|
2824
2824
|
renderHoverCompanions: () => null
|
|
2825
|
-
},
|
|
2825
|
+
}, ro = 1, Dd = oe(function({
|
|
2826
2826
|
layer: t,
|
|
2827
2827
|
isAnimated: n
|
|
2828
2828
|
}) {
|
|
2829
2829
|
const r = v(() => kn(t.params), [t.params]), o = v(() => {
|
|
2830
|
-
const i =
|
|
2830
|
+
const i = $e(t.data, t.mapping, t.id), c = [];
|
|
2831
2831
|
return t.data.groupBy(Ae.group).forEach((l) => {
|
|
2832
2832
|
const d = Ln([...l], t.params.missingValues), u = r(d);
|
|
2833
2833
|
if (!u) return;
|
|
2834
2834
|
const h = d[0];
|
|
2835
2835
|
if (!h) return;
|
|
2836
|
-
const g = z(h), p = X(h), f =
|
|
2836
|
+
const g = z(h), p = X(h), f = Xe(h, t.params), y = Ve(Ue(h));
|
|
2837
2837
|
c.push({
|
|
2838
2838
|
key: i(h),
|
|
2839
2839
|
pathData: u,
|
|
2840
2840
|
color: g,
|
|
2841
|
-
opacity: p ??
|
|
2841
|
+
opacity: p ?? ro,
|
|
2842
2842
|
strokeWidth: f,
|
|
2843
2843
|
strokeDasharray: y
|
|
2844
2844
|
});
|
|
@@ -2854,7 +2854,7 @@ const Le = 3, Hd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2854
2854
|
"data-geom": "line",
|
|
2855
2855
|
className: ye,
|
|
2856
2856
|
children: o.map((i) => /* @__PURE__ */ a(
|
|
2857
|
-
|
|
2857
|
+
Md,
|
|
2858
2858
|
{
|
|
2859
2859
|
pathData: i.pathData,
|
|
2860
2860
|
color: i.color,
|
|
@@ -2867,8 +2867,8 @@ const Le = 3, Hd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2867
2867
|
))
|
|
2868
2868
|
}
|
|
2869
2869
|
);
|
|
2870
|
-
}),
|
|
2871
|
-
|
|
2870
|
+
}), Md = ({ pathData: e, color: t, strokeWidth: n, opacity: r, strokeDasharray: o, isAnimated: i }) => i ? /* @__PURE__ */ a(
|
|
2871
|
+
Rd,
|
|
2872
2872
|
{
|
|
2873
2873
|
pathData: e,
|
|
2874
2874
|
color: t,
|
|
@@ -2887,14 +2887,14 @@ const Le = 3, Hd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2887
2887
|
strokeDasharray: o,
|
|
2888
2888
|
vectorEffect: "non-scaling-stroke"
|
|
2889
2889
|
}
|
|
2890
|
-
),
|
|
2890
|
+
), Rd = ({
|
|
2891
2891
|
pathData: e,
|
|
2892
2892
|
color: t,
|
|
2893
2893
|
strokeWidth: n,
|
|
2894
2894
|
opacity: r,
|
|
2895
2895
|
strokeDasharray: o
|
|
2896
2896
|
}) => {
|
|
2897
|
-
const i =
|
|
2897
|
+
const i = ft(e, R);
|
|
2898
2898
|
return /* @__PURE__ */ a(
|
|
2899
2899
|
Y.path,
|
|
2900
2900
|
{
|
|
@@ -2907,13 +2907,13 @@ const Le = 3, Hd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2907
2907
|
vectorEffect: "non-scaling-stroke"
|
|
2908
2908
|
}
|
|
2909
2909
|
);
|
|
2910
|
-
},
|
|
2910
|
+
}, Od = ({ layer: e, primary: t, companions: n }) => {
|
|
2911
2911
|
const r = xn(t.observation), o = v(() => {
|
|
2912
2912
|
const h = e.data.filter(Ae.group, "eq", r);
|
|
2913
2913
|
return Ln([...h], e.params.missingValues);
|
|
2914
2914
|
}, [e.data, e.params.missingValues, r]), i = v(() => kn(e.params)(o), [e.params, o]);
|
|
2915
2915
|
if (!i) return null;
|
|
2916
|
-
const c = z(t.observation), l = X(t.observation) ??
|
|
2916
|
+
const c = z(t.observation), l = X(t.observation) ?? ro, d = Xe(t.observation, e.params), u = Ve(Ue(t.observation));
|
|
2917
2917
|
return /* @__PURE__ */ m("g", { "data-testid": "hovered-line", children: [
|
|
2918
2918
|
/* @__PURE__ */ a(
|
|
2919
2919
|
"svg",
|
|
@@ -2942,18 +2942,18 @@ const Le = 3, Hd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2942
2942
|
n.map((h) => /* @__PURE__ */ a(pe, { hit: h }, `companion-${h.layerId}-${h.pointIndex}`)),
|
|
2943
2943
|
/* @__PURE__ */ a(Nt, { hit: t, "data-testid": "hovered-line-point" })
|
|
2944
2944
|
] });
|
|
2945
|
-
},
|
|
2945
|
+
}, zd = {
|
|
2946
2946
|
geom: "line",
|
|
2947
2947
|
coord: "cartesian",
|
|
2948
2948
|
guideMode: "continuous",
|
|
2949
|
-
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(
|
|
2950
|
-
renderHover: ({ layer: e, primary: t, group: n, related: r }) => /* @__PURE__ */ a(
|
|
2951
|
-
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(
|
|
2949
|
+
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(Dd, { layer: e, isAnimated: t }),
|
|
2950
|
+
renderHover: ({ layer: e, primary: t, group: n, related: r }) => /* @__PURE__ */ a(Od, { layer: e, primary: t, companions: [...n, ...r] }),
|
|
2951
|
+
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(w, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
|
|
2952
2952
|
getOverlayAnchor: ({ observation: e }) => {
|
|
2953
2953
|
const t = ue(e), n = he(e);
|
|
2954
2954
|
return t === null || n === null ? null : { x: t, y: n };
|
|
2955
2955
|
}
|
|
2956
|
-
},
|
|
2956
|
+
}, Gd = oe(function({
|
|
2957
2957
|
layer: t,
|
|
2958
2958
|
isAnimated: n
|
|
2959
2959
|
}) {
|
|
@@ -2964,26 +2964,26 @@ const Le = 3, Hd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2964
2964
|
const l = i++, d = ue(c), u = he(c);
|
|
2965
2965
|
if (d === null || u === null)
|
|
2966
2966
|
continue;
|
|
2967
|
-
const h = z(c), g = X(c), p =
|
|
2967
|
+
const h = z(c), g = X(c), p = ze(c), f = $o(c);
|
|
2968
2968
|
o.push({
|
|
2969
2969
|
key: String(l),
|
|
2970
2970
|
// using the observation index as key for points leads to nicer transitions
|
|
2971
|
-
cx:
|
|
2972
|
-
cy:
|
|
2971
|
+
cx: We(d),
|
|
2972
|
+
cy: Ge(u),
|
|
2973
2973
|
radius: (p ?? t.params.size) / 2,
|
|
2974
2974
|
fill: h,
|
|
2975
2975
|
stroke: s.pointStrokeColor,
|
|
2976
2976
|
opacity: g ?? Ft,
|
|
2977
|
-
strokeWidth: f ??
|
|
2977
|
+
strokeWidth: f ?? fd
|
|
2978
2978
|
});
|
|
2979
2979
|
}
|
|
2980
2980
|
return o;
|
|
2981
2981
|
}, [t.data, t.params.size]);
|
|
2982
|
-
return /* @__PURE__ */ a(
|
|
2982
|
+
return /* @__PURE__ */ a(w, { children: r.map((o) => n ? /* @__PURE__ */ a(
|
|
2983
2983
|
Y.circle,
|
|
2984
2984
|
{
|
|
2985
2985
|
initial: !1,
|
|
2986
|
-
transition:
|
|
2986
|
+
transition: R,
|
|
2987
2987
|
fill: o.fill,
|
|
2988
2988
|
stroke: o.stroke,
|
|
2989
2989
|
strokeWidth: o.strokeWidth,
|
|
@@ -3008,43 +3008,43 @@ const Le = 3, Hd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
3008
3008
|
},
|
|
3009
3009
|
o.key
|
|
3010
3010
|
)) });
|
|
3011
|
-
}),
|
|
3011
|
+
}), Wd = {
|
|
3012
3012
|
geom: "point",
|
|
3013
3013
|
coord: "cartesian",
|
|
3014
3014
|
guideMode: null,
|
|
3015
|
-
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(
|
|
3015
|
+
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(Gd, { layer: e, isAnimated: t }),
|
|
3016
3016
|
renderHover: ({ primary: e, group: t, related: n }) => /* @__PURE__ */ m("g", { "data-testid": "hovered-point", children: [
|
|
3017
3017
|
[...t, ...n].map((r) => /* @__PURE__ */ a(pe, { hit: r }, `companion-${r.layerId}-${r.pointIndex}`)),
|
|
3018
3018
|
/* @__PURE__ */ a(Nt, { hit: e })
|
|
3019
3019
|
] }),
|
|
3020
|
-
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(
|
|
3020
|
+
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(w, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
|
|
3021
3021
|
getOverlayAnchor: ({ observation: e }) => {
|
|
3022
3022
|
const t = ue(e), n = he(e);
|
|
3023
3023
|
return t === null || n === null ? null : { x: t, y: n };
|
|
3024
3024
|
}
|
|
3025
|
-
},
|
|
3026
|
-
var
|
|
3027
|
-
const
|
|
3025
|
+
}, $d = 11.7, Xd = N.xs, Vd = O, Ud = K.medium, Ce = 5, Yd = 5, en = 10, tn = 10, jd = 4, Re = 13, oo = 6, at = 12, nn = 21.6, qd = "0 0 10 18", Kd = "M2.48935 16.9323L9.07098 9.82964C9.51595 9.34944 9.51504 8.60728 9.0689 8.12818L2.48866 1.06172C1.85811 0.384586 0.974477 0 0.049217 0H0V18H0.0443689C0.972463 18 1.85854 17.6131 2.48935 16.9323Z", rn = "#FFFFFF", it = "#1A1A1A";
|
|
3026
|
+
var Jd = "_16vokpr0";
|
|
3027
|
+
const Zd = (e, t) => {
|
|
3028
3028
|
const n = e.mapping.y !== void 0, r = t.mainAxis === "y";
|
|
3029
3029
|
return n !== r;
|
|
3030
|
-
},
|
|
3030
|
+
}, Qd = (e, t) => {
|
|
3031
3031
|
const n = x(e ? 1 - t : t);
|
|
3032
3032
|
return e ? { x1: "0%", y1: n, x2: "100%", y2: n } : { x1: n, y1: "0%", x2: n, y2: "100%" };
|
|
3033
|
-
},
|
|
3033
|
+
}, eu = (e, t) => e === "solid" ? {} : e === "dotted" ? { strokeDasharray: `0 ${t * 2}`, strokeLinecap: "round" } : {
|
|
3034
3034
|
strokeDasharray: `${t * 2} ${t * 3}`,
|
|
3035
3035
|
strokeLinecap: "round",
|
|
3036
3036
|
strokeMiterlimit: 16
|
|
3037
|
-
},
|
|
3037
|
+
}, tu = (e) => {
|
|
3038
3038
|
const t = e.params.color, n = t ?? s.targetLineColor;
|
|
3039
3039
|
let r = s.targetLineLabelTextColor;
|
|
3040
3040
|
if (t !== void 0)
|
|
3041
3041
|
try {
|
|
3042
|
-
r =
|
|
3042
|
+
r = dt(t, rn) > dt(t, it) ? rn : it;
|
|
3043
3043
|
} catch {
|
|
3044
|
-
r =
|
|
3044
|
+
r = it;
|
|
3045
3045
|
}
|
|
3046
3046
|
return { lineColor: n, labelTextColor: r };
|
|
3047
|
-
},
|
|
3047
|
+
}, nu = (e, t) => Be(e) && Be(t) ? `${e}: ${t}` : Be(e) ? e : Be(t) ? t : null, Be = (e) => e != null && e.trim() !== "", ru = ({
|
|
3048
3048
|
labelPosition: e,
|
|
3049
3049
|
linePosition: t,
|
|
3050
3050
|
color: n,
|
|
@@ -3053,18 +3053,18 @@ const qd = (e, t) => {
|
|
|
3053
3053
|
text: i,
|
|
3054
3054
|
isAnimated: c
|
|
3055
3055
|
}) => {
|
|
3056
|
-
const l = e === "start", d = l ? -
|
|
3057
|
-
/* @__PURE__ */ a("rect", { x: d, y: 0, width: r, height: o, rx:
|
|
3056
|
+
const l = e === "start", d = l ? -Re : -(r - Re), u = l ? d + r - Ce : d + Ce - at, h = l ? void 0 : `rotate(180 ${u + at / 2} ${o / 2})`, g = l ? "0%" : "100%", p = x(1 - t), f = /* @__PURE__ */ m("g", { transform: `translate(0, ${-o / 2})`, pointerEvents: "none", children: [
|
|
3057
|
+
/* @__PURE__ */ a("rect", { x: d, y: 0, width: r, height: o, rx: oo, fill: n }),
|
|
3058
3058
|
/* @__PURE__ */ a("g", { transform: h, children: /* @__PURE__ */ a(
|
|
3059
3059
|
"svg",
|
|
3060
3060
|
{
|
|
3061
3061
|
x: u,
|
|
3062
3062
|
y: (o - nn) / 2,
|
|
3063
|
-
width:
|
|
3063
|
+
width: at,
|
|
3064
3064
|
height: nn,
|
|
3065
|
-
viewBox:
|
|
3065
|
+
viewBox: qd,
|
|
3066
3066
|
overflow: "visible",
|
|
3067
|
-
children: /* @__PURE__ */ a("path", { d:
|
|
3067
|
+
children: /* @__PURE__ */ a("path", { d: Kd, fill: n })
|
|
3068
3068
|
}
|
|
3069
3069
|
) }),
|
|
3070
3070
|
/* @__PURE__ */ a("g", { transform: `translate(${d + Ce}, ${o / 2})`, children: i })
|
|
@@ -3073,14 +3073,14 @@ const qd = (e, t) => {
|
|
|
3073
3073
|
Y.svg,
|
|
3074
3074
|
{
|
|
3075
3075
|
initial: !1,
|
|
3076
|
-
transition:
|
|
3076
|
+
transition: R,
|
|
3077
3077
|
x: g,
|
|
3078
3078
|
animate: { y: p },
|
|
3079
3079
|
overflow: "visible",
|
|
3080
3080
|
children: f
|
|
3081
3081
|
}
|
|
3082
3082
|
) : /* @__PURE__ */ a("svg", { x: g, y: p, overflow: "visible", children: f });
|
|
3083
|
-
},
|
|
3083
|
+
}, ou = ({
|
|
3084
3084
|
labelPosition: e,
|
|
3085
3085
|
linePosition: t,
|
|
3086
3086
|
color: n,
|
|
@@ -3089,22 +3089,22 @@ const qd = (e, t) => {
|
|
|
3089
3089
|
text: i,
|
|
3090
3090
|
isAnimated: c
|
|
3091
3091
|
}) => {
|
|
3092
|
-
const l = e === "start", d = l ? -
|
|
3093
|
-
/* @__PURE__ */ a("rect", { x: 0, y: d, width: r, height: o, rx:
|
|
3092
|
+
const l = e === "start", d = l ? -Re : -(o - Re), u = x(t), h = l ? "100%" : "0%", g = /* @__PURE__ */ m("g", { transform: `translate(${-r / 2}, 0)`, pointerEvents: "none", children: [
|
|
3093
|
+
/* @__PURE__ */ a("rect", { x: 0, y: d, width: r, height: o, rx: oo, fill: n }),
|
|
3094
3094
|
/* @__PURE__ */ a("g", { transform: `translate(${Ce}, ${d + o / 2})`, children: i })
|
|
3095
3095
|
] });
|
|
3096
3096
|
return c ? /* @__PURE__ */ a(
|
|
3097
3097
|
Y.svg,
|
|
3098
3098
|
{
|
|
3099
3099
|
initial: !1,
|
|
3100
|
-
transition:
|
|
3100
|
+
transition: R,
|
|
3101
3101
|
y: h,
|
|
3102
3102
|
animate: { x: u },
|
|
3103
3103
|
overflow: "visible",
|
|
3104
3104
|
children: g
|
|
3105
3105
|
}
|
|
3106
3106
|
) : /* @__PURE__ */ a("svg", { x: u, y: h, overflow: "visible", children: g });
|
|
3107
|
-
},
|
|
3107
|
+
}, au = ({
|
|
3108
3108
|
label: e,
|
|
3109
3109
|
textWidth: t,
|
|
3110
3110
|
labelPosition: n,
|
|
@@ -3116,8 +3116,8 @@ const qd = (e, t) => {
|
|
|
3116
3116
|
symbolColor: d,
|
|
3117
3117
|
isAnimated: u
|
|
3118
3118
|
}) => {
|
|
3119
|
-
const h = l === null ? 0 : en +
|
|
3120
|
-
l !== null && d !== null && /* @__PURE__ */ a("g", { transform: `translate(0, ${-tn / 2})`, children: /* @__PURE__ */ a(
|
|
3119
|
+
const h = l === null ? 0 : en + jd, g = t + h + Ce * 2, p = $d + Yd * 2, f = /* @__PURE__ */ m(w, { children: [
|
|
3120
|
+
l !== null && d !== null && /* @__PURE__ */ a("g", { transform: `translate(0, ${-tn / 2})`, children: /* @__PURE__ */ a(je, { shape: l, color: d, width: en, height: tn }) }),
|
|
3121
3121
|
/* @__PURE__ */ a(
|
|
3122
3122
|
"text",
|
|
3123
3123
|
{
|
|
@@ -3131,7 +3131,7 @@ const qd = (e, t) => {
|
|
|
3131
3131
|
)
|
|
3132
3132
|
] });
|
|
3133
3133
|
return r ? /* @__PURE__ */ a(
|
|
3134
|
-
|
|
3134
|
+
ru,
|
|
3135
3135
|
{
|
|
3136
3136
|
labelPosition: n,
|
|
3137
3137
|
linePosition: o,
|
|
@@ -3142,7 +3142,7 @@ const qd = (e, t) => {
|
|
|
3142
3142
|
isAnimated: u
|
|
3143
3143
|
}
|
|
3144
3144
|
) : /* @__PURE__ */ a(
|
|
3145
|
-
|
|
3145
|
+
ou,
|
|
3146
3146
|
{
|
|
3147
3147
|
labelPosition: n,
|
|
3148
3148
|
linePosition: o,
|
|
@@ -3153,13 +3153,13 @@ const qd = (e, t) => {
|
|
|
3153
3153
|
isAnimated: u
|
|
3154
3154
|
}
|
|
3155
3155
|
);
|
|
3156
|
-
},
|
|
3157
|
-
const i =
|
|
3156
|
+
}, iu = ({ layer: e, isHorizontalLine: t, position: n, lineColor: r, isAnimated: o }) => {
|
|
3157
|
+
const i = Qd(t, n), c = eu(e.params.lineType, e.params.strokeWidth);
|
|
3158
3158
|
return o ? /* @__PURE__ */ a(
|
|
3159
3159
|
Y.line,
|
|
3160
3160
|
{
|
|
3161
3161
|
initial: !1,
|
|
3162
|
-
transition:
|
|
3162
|
+
transition: R,
|
|
3163
3163
|
animate: { x1: i.x1, y1: i.y1, x2: i.x2, y2: i.y2 },
|
|
3164
3164
|
...c,
|
|
3165
3165
|
stroke: r,
|
|
@@ -3176,7 +3176,7 @@ const qd = (e, t) => {
|
|
|
3176
3176
|
vectorEffect: "non-scaling-stroke"
|
|
3177
3177
|
}
|
|
3178
3178
|
);
|
|
3179
|
-
},
|
|
3179
|
+
}, su = oe(function({
|
|
3180
3180
|
layer: t,
|
|
3181
3181
|
coordSystem: n,
|
|
3182
3182
|
formattingLocale: r,
|
|
@@ -3191,16 +3191,16 @@ const qd = (e, t) => {
|
|
|
3191
3191
|
colorScale: _.scales.color
|
|
3192
3192
|
}))
|
|
3193
3193
|
), g = v(
|
|
3194
|
-
() =>
|
|
3194
|
+
() => Xo(u, h, n).get(t.id) ?? null,
|
|
3195
3195
|
[u, h, n, t.id]
|
|
3196
3196
|
), p = v(
|
|
3197
|
-
() =>
|
|
3197
|
+
() => nu(t.params.label, Vo({ guides: c, numberFormat: l, layer: t, locale: r })),
|
|
3198
3198
|
[c, l, r, t]
|
|
3199
3199
|
), f = v(
|
|
3200
3200
|
() => ({
|
|
3201
|
-
family:
|
|
3202
|
-
size: te(
|
|
3203
|
-
weight:
|
|
3201
|
+
family: Vd,
|
|
3202
|
+
size: te(Xd, d),
|
|
3203
|
+
weight: Ud
|
|
3204
3204
|
}),
|
|
3205
3205
|
[d]
|
|
3206
3206
|
), y = v(
|
|
@@ -3208,10 +3208,10 @@ const qd = (e, t) => {
|
|
|
3208
3208
|
[p, f, i]
|
|
3209
3209
|
), S = t.data.getFirst();
|
|
3210
3210
|
if (!S) return null;
|
|
3211
|
-
const { lineColor: k, labelTextColor:
|
|
3212
|
-
return I === null ? null : /* @__PURE__ */ m("g", { "data-geom": "rule", className:
|
|
3211
|
+
const { lineColor: k, labelTextColor: T } = tu(t), A = Zd(t, n), I = A ? he(S) : ue(S);
|
|
3212
|
+
return I === null ? null : /* @__PURE__ */ m("g", { "data-geom": "rule", className: Jd, children: [
|
|
3213
3213
|
/* @__PURE__ */ a(
|
|
3214
|
-
|
|
3214
|
+
iu,
|
|
3215
3215
|
{
|
|
3216
3216
|
layer: t,
|
|
3217
3217
|
isHorizontalLine: A,
|
|
@@ -3221,7 +3221,7 @@ const qd = (e, t) => {
|
|
|
3221
3221
|
}
|
|
3222
3222
|
),
|
|
3223
3223
|
p !== null && /* @__PURE__ */ a(
|
|
3224
|
-
|
|
3224
|
+
au,
|
|
3225
3225
|
{
|
|
3226
3226
|
label: p,
|
|
3227
3227
|
textWidth: y,
|
|
@@ -3229,19 +3229,19 @@ const qd = (e, t) => {
|
|
|
3229
3229
|
isHorizontalLine: A,
|
|
3230
3230
|
position: I,
|
|
3231
3231
|
color: k,
|
|
3232
|
-
textColor:
|
|
3232
|
+
textColor: T,
|
|
3233
3233
|
symbolShape: g?.shape ?? null,
|
|
3234
3234
|
symbolColor: g?.color ?? null,
|
|
3235
3235
|
isAnimated: o
|
|
3236
3236
|
}
|
|
3237
3237
|
)
|
|
3238
3238
|
] });
|
|
3239
|
-
}),
|
|
3239
|
+
}), lu = {
|
|
3240
3240
|
geom: "rule",
|
|
3241
3241
|
coord: "cartesian",
|
|
3242
3242
|
guideMode: null,
|
|
3243
3243
|
render: ({ layer: e, coordSystem: t, formattingLocale: n, isAnimated: r }) => /* @__PURE__ */ a(
|
|
3244
|
-
|
|
3244
|
+
su,
|
|
3245
3245
|
{
|
|
3246
3246
|
layer: e,
|
|
3247
3247
|
coordSystem: t,
|
|
@@ -3251,18 +3251,18 @@ const qd = (e, t) => {
|
|
|
3251
3251
|
),
|
|
3252
3252
|
renderHover: () => null,
|
|
3253
3253
|
renderHoverCompanions: () => null
|
|
3254
|
-
},
|
|
3254
|
+
}, ao = 1, on = Math.PI * 2, cu = oe(function({
|
|
3255
3255
|
layer: t,
|
|
3256
3256
|
isAnimated: n
|
|
3257
3257
|
}) {
|
|
3258
|
-
const r =
|
|
3259
|
-
|
|
3258
|
+
const r = L(!1);
|
|
3259
|
+
C(() => {
|
|
3260
3260
|
r.current = !0;
|
|
3261
3261
|
}, []);
|
|
3262
3262
|
const o = v(() => {
|
|
3263
|
-
const i =
|
|
3263
|
+
const i = $e(t.data, t.mapping, t.id), c = [];
|
|
3264
3264
|
for (const l of t.data) {
|
|
3265
|
-
const d = i(l), { startAngle: u, endAngle: h } = Cn(l), { innerRadius: g, outerRadius: p } =
|
|
3265
|
+
const d = i(l), { startAngle: u, endAngle: h } = Cn(l), { innerRadius: g, outerRadius: p } = wn(l);
|
|
3266
3266
|
u === null || h === null || g === null || p === null || c.push({
|
|
3267
3267
|
key: d,
|
|
3268
3268
|
startAngle: u,
|
|
@@ -3270,7 +3270,7 @@ const qd = (e, t) => {
|
|
|
3270
3270
|
innerRadius: g,
|
|
3271
3271
|
outerRadius: p,
|
|
3272
3272
|
fill: z(l),
|
|
3273
|
-
opacity: X(l) ??
|
|
3273
|
+
opacity: X(l) ?? ao
|
|
3274
3274
|
});
|
|
3275
3275
|
}
|
|
3276
3276
|
return c;
|
|
@@ -3287,7 +3287,7 @@ const qd = (e, t) => {
|
|
|
3287
3287
|
children: o.map((i) => {
|
|
3288
3288
|
if (n) {
|
|
3289
3289
|
const { key: c, ...l } = i;
|
|
3290
|
-
return /* @__PURE__ */ a(
|
|
3290
|
+
return /* @__PURE__ */ a(du, { isInitialRender: !r.current, ...l }, c);
|
|
3291
3291
|
}
|
|
3292
3292
|
return /* @__PURE__ */ a(
|
|
3293
3293
|
"path",
|
|
@@ -3306,7 +3306,7 @@ const qd = (e, t) => {
|
|
|
3306
3306
|
})
|
|
3307
3307
|
}
|
|
3308
3308
|
);
|
|
3309
|
-
}),
|
|
3309
|
+
}), du = ({
|
|
3310
3310
|
startAngle: e,
|
|
3311
3311
|
endAngle: t,
|
|
3312
3312
|
innerRadius: n,
|
|
@@ -3315,12 +3315,12 @@ const qd = (e, t) => {
|
|
|
3315
3315
|
opacity: i,
|
|
3316
3316
|
isInitialRender: c
|
|
3317
3317
|
}) => {
|
|
3318
|
-
const l = c ? e : on, d = c ? t : on, u =
|
|
3318
|
+
const l = c ? e : on, d = c ? t : on, u = Dt(l, R), h = Dt(d, R), g = Tn(
|
|
3319
3319
|
Ie({ startAngle: l, endAngle: d, innerRadius: n, outerRadius: r }) ?? ""
|
|
3320
3320
|
);
|
|
3321
|
-
return
|
|
3321
|
+
return C(() => {
|
|
3322
3322
|
u.set(e), h.set(t);
|
|
3323
|
-
}, [u, h, e, t]),
|
|
3323
|
+
}, [u, h, e, t]), C(() => {
|
|
3324
3324
|
const p = () => {
|
|
3325
3325
|
const S = u.get(), k = h.get();
|
|
3326
3326
|
g.set(
|
|
@@ -3330,14 +3330,14 @@ const qd = (e, t) => {
|
|
|
3330
3330
|
return () => {
|
|
3331
3331
|
f(), y();
|
|
3332
3332
|
};
|
|
3333
|
-
}, [u, h, n, r, g]), /* @__PURE__ */ a(Y.path, { d: g, fill: o, opacity: i, transition:
|
|
3334
|
-
},
|
|
3335
|
-
const { startAngle: t, endAngle: n } = Cn(e.observation), { innerRadius: r, outerRadius: o } =
|
|
3333
|
+
}, [u, h, n, r, g]), /* @__PURE__ */ a(Y.path, { d: g, fill: o, opacity: i, transition: R });
|
|
3334
|
+
}, uu = ({ primary: e }) => {
|
|
3335
|
+
const { startAngle: t, endAngle: n } = Cn(e.observation), { innerRadius: r, outerRadius: o } = wn(e.observation);
|
|
3336
3336
|
if (t === null || n === null || r === null || o === null)
|
|
3337
3337
|
return null;
|
|
3338
3338
|
const i = Ie({ startAngle: t, endAngle: n, innerRadius: r, outerRadius: o });
|
|
3339
3339
|
if (!i) return null;
|
|
3340
|
-
const c = z(e.observation), l = X(e.observation) ??
|
|
3340
|
+
const c = z(e.observation), l = X(e.observation) ?? ao;
|
|
3341
3341
|
return /* @__PURE__ */ a(
|
|
3342
3342
|
"svg",
|
|
3343
3343
|
{
|
|
@@ -3351,59 +3351,59 @@ const qd = (e, t) => {
|
|
|
3351
3351
|
children: /* @__PURE__ */ a("path", { d: i, fill: c, opacity: l })
|
|
3352
3352
|
}
|
|
3353
3353
|
);
|
|
3354
|
-
},
|
|
3354
|
+
}, hu = {
|
|
3355
3355
|
geom: "bar",
|
|
3356
3356
|
coord: "polar",
|
|
3357
3357
|
guideMode: null,
|
|
3358
|
-
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(
|
|
3359
|
-
renderHover: ({ primary: e }) => /* @__PURE__ */ a(
|
|
3358
|
+
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(cu, { layer: e, isAnimated: t }),
|
|
3359
|
+
renderHover: ({ primary: e }) => /* @__PURE__ */ a(uu, { primary: e }),
|
|
3360
3360
|
renderHoverCompanions: () => null
|
|
3361
|
-
},
|
|
3361
|
+
}, gu = {
|
|
3362
3362
|
bar: {
|
|
3363
|
-
cartesian:
|
|
3364
|
-
polar:
|
|
3363
|
+
cartesian: Id,
|
|
3364
|
+
polar: hu
|
|
3365
3365
|
},
|
|
3366
3366
|
line: {
|
|
3367
|
-
cartesian:
|
|
3367
|
+
cartesian: zd
|
|
3368
3368
|
},
|
|
3369
3369
|
area: {
|
|
3370
|
-
cartesian:
|
|
3370
|
+
cartesian: Ed
|
|
3371
3371
|
},
|
|
3372
3372
|
point: {
|
|
3373
|
-
cartesian:
|
|
3373
|
+
cartesian: Wd
|
|
3374
3374
|
},
|
|
3375
3375
|
rule: {
|
|
3376
|
-
cartesian:
|
|
3376
|
+
cartesian: lu
|
|
3377
3377
|
}
|
|
3378
|
-
},
|
|
3378
|
+
}, Ke = (e, t) => gu[e.geom]?.[t.type] ?? null, pu = (e, t) => {
|
|
3379
3379
|
const n = e.filter((o) => o.interactive);
|
|
3380
3380
|
if (n.length === 0) return null;
|
|
3381
|
-
const r = n.map((o) =>
|
|
3381
|
+
const r = n.map((o) => Ke(o, t)).filter((o) => o !== null).map((o) => o.guideMode);
|
|
3382
3382
|
return r.length === 0 ? null : r.some((o) => o === "bar") ? "bar" : r.every((o) => o === "continuous") ? "continuous" : null;
|
|
3383
|
-
},
|
|
3383
|
+
}, fu = 1, mu = "4 3", vu = ({ panelRect: e }) => {
|
|
3384
3384
|
const { coordSystem: t, layers: n, scales: r } = B(
|
|
3385
3385
|
j((c) => ({ coordSystem: c.coordSystem, layers: c.layers, scales: c.scales }))
|
|
3386
|
-
), o =
|
|
3386
|
+
), o = wt((c) => c.hover.primary);
|
|
3387
3387
|
if (t.type !== "cartesian" || n.length === 0 || o === null) return null;
|
|
3388
|
-
const i =
|
|
3389
|
-
return i === null ? null : i === "bar" ? /* @__PURE__ */ a(
|
|
3390
|
-
},
|
|
3391
|
-
const r =
|
|
3392
|
-
return /* @__PURE__ */ a(
|
|
3388
|
+
const i = pu(n, t);
|
|
3389
|
+
return i === null ? null : i === "bar" ? /* @__PURE__ */ a(bu, { coordSystem: t, scales: r, primary: o, panelRect: e }) : /* @__PURE__ */ a(yu, { coordSystem: t, primary: o, panelRect: e });
|
|
3390
|
+
}, yu = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
3391
|
+
const r = Yo(e, t);
|
|
3392
|
+
return /* @__PURE__ */ a(io, { panelRect: n, children: /* @__PURE__ */ a(
|
|
3393
3393
|
"line",
|
|
3394
3394
|
{
|
|
3395
3395
|
...r,
|
|
3396
3396
|
stroke: s.hoverGuideLineColor,
|
|
3397
|
-
strokeWidth:
|
|
3398
|
-
strokeDasharray:
|
|
3397
|
+
strokeWidth: fu,
|
|
3398
|
+
strokeDasharray: mu,
|
|
3399
3399
|
strokeLinecap: "round",
|
|
3400
3400
|
"data-testid": "hover-guide-line"
|
|
3401
3401
|
}
|
|
3402
3402
|
) });
|
|
3403
|
-
},
|
|
3404
|
-
const o =
|
|
3405
|
-
return o === null ? null : /* @__PURE__ */ a(
|
|
3406
|
-
},
|
|
3403
|
+
}, bu = ({ coordSystem: e, scales: t, primary: n, panelRect: r }) => {
|
|
3404
|
+
const o = Uo(e, t, n);
|
|
3405
|
+
return o === null ? null : /* @__PURE__ */ a(io, { panelRect: r, children: /* @__PURE__ */ a("rect", { ...o, fill: s.hoverGuideFillColor, "data-testid": "hover-guide-rect" }) });
|
|
3406
|
+
}, io = ({ panelRect: e, children: t }) => /* @__PURE__ */ a(
|
|
3407
3407
|
"svg",
|
|
3408
3408
|
{
|
|
3409
3409
|
x: e.x,
|
|
@@ -3414,16 +3414,16 @@ const qd = (e, t) => {
|
|
|
3414
3414
|
"data-testid": "hover-guide",
|
|
3415
3415
|
children: t
|
|
3416
3416
|
}
|
|
3417
|
-
),
|
|
3418
|
-
|
|
3417
|
+
), xu = 200, Su = ({ engine: e, store: t, overlayRef: n }) => {
|
|
3418
|
+
C(() => {
|
|
3419
3419
|
const r = n.current;
|
|
3420
3420
|
if (!r) return;
|
|
3421
|
-
const o =
|
|
3421
|
+
const o = ku(r, e), i = Lu(r, e, t);
|
|
3422
3422
|
return () => {
|
|
3423
3423
|
i(), o();
|
|
3424
3424
|
};
|
|
3425
3425
|
}, [e, t, n]);
|
|
3426
|
-
},
|
|
3426
|
+
}, ku = (e, t) => {
|
|
3427
3427
|
const n = () => {
|
|
3428
3428
|
const c = e.getBoundingClientRect();
|
|
3429
3429
|
c.width === 0 || c.height === 0 || t.setViewport({ width: c.width, height: c.height });
|
|
@@ -3432,12 +3432,12 @@ const qd = (e, t) => {
|
|
|
3432
3432
|
const o = () => {
|
|
3433
3433
|
r !== null && clearTimeout(r), r = setTimeout(() => {
|
|
3434
3434
|
r = null, n();
|
|
3435
|
-
},
|
|
3435
|
+
}, xu);
|
|
3436
3436
|
}, i = new ResizeObserver(o);
|
|
3437
3437
|
return i.observe(e), n(), () => {
|
|
3438
3438
|
i.disconnect(), r !== null && clearTimeout(r);
|
|
3439
3439
|
};
|
|
3440
|
-
},
|
|
3440
|
+
}, Lu = (e, t, n) => {
|
|
3441
3441
|
let r = null, o = null;
|
|
3442
3442
|
const i = () => {
|
|
3443
3443
|
o = null;
|
|
@@ -3460,9 +3460,9 @@ const qd = (e, t) => {
|
|
|
3460
3460
|
return e.addEventListener("pointermove", c), e.addEventListener("pointerleave", l), () => {
|
|
3461
3461
|
e.removeEventListener("pointermove", c), e.removeEventListener("pointerleave", l), o !== null && cancelAnimationFrame(o), r = null;
|
|
3462
3462
|
};
|
|
3463
|
-
},
|
|
3464
|
-
const { engine: t, store: n, overlayRef: r } =
|
|
3465
|
-
return
|
|
3463
|
+
}, Cu = ({ panelRect: e }) => {
|
|
3464
|
+
const { engine: t, store: n, overlayRef: r } = Ye();
|
|
3465
|
+
return Su({ engine: t, store: n, overlayRef: r }), /* @__PURE__ */ a(
|
|
3466
3466
|
"rect",
|
|
3467
3467
|
{
|
|
3468
3468
|
ref: r,
|
|
@@ -3475,19 +3475,19 @@ const qd = (e, t) => {
|
|
|
3475
3475
|
"data-testid": "pointer-capture-layer"
|
|
3476
3476
|
}
|
|
3477
3477
|
);
|
|
3478
|
-
},
|
|
3479
|
-
const { store: t } =
|
|
3480
|
-
|
|
3478
|
+
}, st = "data-hover-active", wu = (e) => {
|
|
3479
|
+
const { store: t } = Ye(), n = we(t, (r) => r.hover.primary !== null);
|
|
3480
|
+
C(() => {
|
|
3481
3481
|
const r = e.current;
|
|
3482
3482
|
if (r)
|
|
3483
|
-
return n ? r.setAttribute(
|
|
3484
|
-
r.removeAttribute(
|
|
3483
|
+
return n ? r.setAttribute(st, "true") : r.removeAttribute(st), () => {
|
|
3484
|
+
r.removeAttribute(st);
|
|
3485
3485
|
};
|
|
3486
3486
|
}, [e, n]);
|
|
3487
|
-
},
|
|
3488
|
-
var
|
|
3489
|
-
const
|
|
3490
|
-
const u = i ? `rotate(-90 ${e} ${t})` : void 0, h = c === "aggregate" ?
|
|
3487
|
+
}, so = N.xs, mt = O, lo = K.medium, Tu = K.semibold, co = 6, uo = 2, Au = 4, Eu = 2, an = 4;
|
|
3488
|
+
var _u = "_1agclyl0", Pu = "_1agclyl1", Hu = "_1agclyl2", Fu = { inside: "_1agclyl4 _1agclyl3", outside: "_1agclyl5 _1agclyl3" }, Nu = "_1agclyl6 _1agclyl3";
|
|
3489
|
+
const ho = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c, position: l, coordType: d }) => {
|
|
3490
|
+
const u = i ? `rotate(-90 ${e} ${t})` : void 0, h = c === "aggregate" ? Nu : Fu[l], g = Bu(c, l, d);
|
|
3491
3491
|
return /* @__PURE__ */ m("g", { transform: u, children: [
|
|
3492
3492
|
g && /* @__PURE__ */ a(
|
|
3493
3493
|
"rect",
|
|
@@ -3503,13 +3503,13 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3503
3503
|
),
|
|
3504
3504
|
/* @__PURE__ */ a("text", { className: h, x: e, y: t, textAnchor: "middle", dominantBaseline: "central", children: o })
|
|
3505
3505
|
] });
|
|
3506
|
-
},
|
|
3507
|
-
if (e === "aggregate") return
|
|
3508
|
-
if (t === "outside" && n === "cartesian") return
|
|
3509
|
-
},
|
|
3510
|
-
dataLabel: { x:
|
|
3511
|
-
stackTotal: { x:
|
|
3512
|
-
},
|
|
3506
|
+
}, Bu = (e, t, n) => {
|
|
3507
|
+
if (e === "aggregate") return Hu;
|
|
3508
|
+
if (t === "outside" && n === "cartesian") return Pu;
|
|
3509
|
+
}, Iu = {
|
|
3510
|
+
dataLabel: { x: co, y: uo },
|
|
3511
|
+
stackTotal: { x: Au, y: Eu }
|
|
3512
|
+
}, Du = ({ panelRect: e, formattingLocale: t }) => {
|
|
3513
3513
|
const n = ve(), r = B(
|
|
3514
3514
|
j((l) => ({
|
|
3515
3515
|
layers: l.layers,
|
|
@@ -3520,14 +3520,14 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3520
3520
|
textScale: l.config.appearance.textScale
|
|
3521
3521
|
}))
|
|
3522
3522
|
), o = v(() => {
|
|
3523
|
-
const l = te(
|
|
3523
|
+
const l = te(so, r.textScale);
|
|
3524
3524
|
return {
|
|
3525
|
-
dataLabel: { family:
|
|
3526
|
-
stackTotal: { family:
|
|
3525
|
+
dataLabel: { family: mt, size: l, weight: lo },
|
|
3526
|
+
stackTotal: { family: mt, size: l, weight: Tu }
|
|
3527
3527
|
};
|
|
3528
3528
|
}, [r.textScale]), i = v(
|
|
3529
3529
|
() => (l, d) => {
|
|
3530
|
-
const u = n.measureText(d, o[l]), h =
|
|
3530
|
+
const u = n.measureText(d, o[l]), h = Iu[l];
|
|
3531
3531
|
return {
|
|
3532
3532
|
...u,
|
|
3533
3533
|
width: u.width + h.x * 2,
|
|
@@ -3536,11 +3536,11 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3536
3536
|
},
|
|
3537
3537
|
[n, o]
|
|
3538
3538
|
), c = v(
|
|
3539
|
-
() =>
|
|
3539
|
+
() => jo({ ...r, panelRect: e, measureDataLabel: i, formattingLocale: t }),
|
|
3540
3540
|
[r, e, i, t]
|
|
3541
3541
|
);
|
|
3542
|
-
return /* @__PURE__ */ a("g", { className:
|
|
3543
|
-
|
|
3542
|
+
return /* @__PURE__ */ a("g", { className: _u, transform: `translate(${e.x}, ${e.y})`, "data-testid": "data-labels", children: c.labels.map((l) => /* @__PURE__ */ a(
|
|
3543
|
+
ho,
|
|
3544
3544
|
{
|
|
3545
3545
|
x: l.x,
|
|
3546
3546
|
y: l.y,
|
|
@@ -3554,13 +3554,13 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3554
3554
|
},
|
|
3555
3555
|
l.key
|
|
3556
3556
|
)) });
|
|
3557
|
-
},
|
|
3557
|
+
}, Mu = ({ linePath: e, arrowheadPath: t, stroke: n, strokeWidth: r }) => {
|
|
3558
3558
|
const o = { stroke: n, strokeWidth: r, strokeLinecap: "round", fill: "none" };
|
|
3559
3559
|
return /* @__PURE__ */ m("g", { children: [
|
|
3560
3560
|
/* @__PURE__ */ a("path", { d: e, ...o }),
|
|
3561
3561
|
/* @__PURE__ */ a("path", { d: t, ...o, strokeLinejoin: "round" })
|
|
3562
3562
|
] });
|
|
3563
|
-
},
|
|
3563
|
+
}, Ru = ({
|
|
3564
3564
|
x: e,
|
|
3565
3565
|
y: t,
|
|
3566
3566
|
text: n,
|
|
@@ -3572,7 +3572,7 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3572
3572
|
fontWeight: d
|
|
3573
3573
|
}) => {
|
|
3574
3574
|
const u = ve(), g = v(
|
|
3575
|
-
() => u.measureText(n, { family:
|
|
3575
|
+
() => u.measureText(n, { family: O, size: r, weight: d }),
|
|
3576
3576
|
[u, n, r, d]
|
|
3577
3577
|
).width + o * 2, p = r + i * 2;
|
|
3578
3578
|
return /* @__PURE__ */ m("g", { style: { pointerEvents: "none" }, children: [
|
|
@@ -3597,12 +3597,12 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3597
3597
|
dominantBaseline: "central",
|
|
3598
3598
|
textAnchor: "middle",
|
|
3599
3599
|
fill: s.textPrimary,
|
|
3600
|
-
style: { fontFamily:
|
|
3600
|
+
style: { fontFamily: O, fontSize: r, fontWeight: d },
|
|
3601
3601
|
children: n
|
|
3602
3602
|
}
|
|
3603
3603
|
)
|
|
3604
3604
|
] });
|
|
3605
|
-
},
|
|
3605
|
+
}, Ou = ({ panelRect: e, formattingLocale: t }) => {
|
|
3606
3606
|
const n = B(
|
|
3607
3607
|
j((o) => ({
|
|
3608
3608
|
differenceArrows: o.annotations.differenceArrows,
|
|
@@ -3611,7 +3611,7 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3611
3611
|
}))
|
|
3612
3612
|
), r = v(
|
|
3613
3613
|
() => n.differenceArrows.map(
|
|
3614
|
-
(o) =>
|
|
3614
|
+
(o) => qo({
|
|
3615
3615
|
arrow: o,
|
|
3616
3616
|
mainAxis: n.mainAxis,
|
|
3617
3617
|
panelWidth: e.width,
|
|
@@ -3638,9 +3638,9 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3638
3638
|
labelFontWeight: S
|
|
3639
3639
|
}) => {
|
|
3640
3640
|
const k = o ?? s.defaultAnnotationArrowStroke;
|
|
3641
|
-
return /* @__PURE__ */ m(
|
|
3641
|
+
return /* @__PURE__ */ m(Lo.Fragment, { children: [
|
|
3642
3642
|
/* @__PURE__ */ a(
|
|
3643
|
-
|
|
3643
|
+
Mu,
|
|
3644
3644
|
{
|
|
3645
3645
|
linePath: c,
|
|
3646
3646
|
arrowheadPath: l,
|
|
@@ -3649,7 +3649,7 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3649
3649
|
}
|
|
3650
3650
|
),
|
|
3651
3651
|
/* @__PURE__ */ a(
|
|
3652
|
-
|
|
3652
|
+
Ru,
|
|
3653
3653
|
{
|
|
3654
3654
|
x: u.x,
|
|
3655
3655
|
y: u.y,
|
|
@@ -3665,13 +3665,13 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3665
3665
|
] }, i);
|
|
3666
3666
|
}
|
|
3667
3667
|
) });
|
|
3668
|
-
},
|
|
3668
|
+
}, zu = 0, Gu = 1.15, sn = 1.15, Wu = "rgba(0, 0, 0, 0.16)", ln = 2, $u = 1.4, Xu = ({
|
|
3669
3669
|
arrow: e,
|
|
3670
3670
|
fallbackColor: t,
|
|
3671
3671
|
stickerOutlineColor: n,
|
|
3672
3672
|
stickerOutlineColorInverse: r
|
|
3673
3673
|
}) => {
|
|
3674
|
-
const o = vt(), i = e.color ?? t, c =
|
|
3674
|
+
const o = vt(), i = e.color ?? t, c = Vu(e.color, n, r), l = e.dashArray ? { strokeDasharray: e.dashArray, strokeDashoffset: e.dashOffset } : {}, d = e.arrowheadExtent + e.strokeWidth + ln + sn, u = {
|
|
3675
3675
|
x: Math.min(e.startX, e.endX) - d,
|
|
3676
3676
|
y: Math.min(e.startY, e.endY) - d,
|
|
3677
3677
|
width: Math.abs(e.endX - e.startX) + 2 * d,
|
|
@@ -3681,10 +3681,10 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3681
3681
|
e.hasStickerStyle && /* @__PURE__ */ a("defs", { children: /* @__PURE__ */ a("filter", { id: o, filterUnits: "userSpaceOnUse", ...u, children: /* @__PURE__ */ a(
|
|
3682
3682
|
"feDropShadow",
|
|
3683
3683
|
{
|
|
3684
|
-
dx:
|
|
3685
|
-
dy:
|
|
3684
|
+
dx: zu,
|
|
3685
|
+
dy: Gu,
|
|
3686
3686
|
stdDeviation: sn,
|
|
3687
|
-
floodColor:
|
|
3687
|
+
floodColor: Wu
|
|
3688
3688
|
}
|
|
3689
3689
|
) }) }),
|
|
3690
3690
|
/* @__PURE__ */ m("g", { filter: e.hasStickerStyle ? `url(#${o})` : void 0, children: [
|
|
@@ -3731,20 +3731,20 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3731
3731
|
)
|
|
3732
3732
|
] })
|
|
3733
3733
|
] });
|
|
3734
|
-
},
|
|
3734
|
+
}, Vu = (e, t, n) => {
|
|
3735
3735
|
if (e === null) return n;
|
|
3736
3736
|
try {
|
|
3737
|
-
return
|
|
3737
|
+
return dt(e, t) < $u ? n : t;
|
|
3738
3738
|
} catch {
|
|
3739
3739
|
return n;
|
|
3740
3740
|
}
|
|
3741
|
-
},
|
|
3741
|
+
}, Uu = ({ panelRect: e }) => {
|
|
3742
3742
|
const { themeValues: t } = _t(), n = B((o) => o.annotations.freeformArrows), r = v(
|
|
3743
|
-
() => n.map((o) =>
|
|
3743
|
+
() => n.map((o) => Ko({ arrow: o, panelWidth: e.width, panelHeight: e.height })).filter((o) => o !== null),
|
|
3744
3744
|
[n, e.width, e.height]
|
|
3745
3745
|
);
|
|
3746
3746
|
return r.length === 0 ? null : /* @__PURE__ */ a("g", { transform: `translate(${e.x}, ${e.y})`, "data-testid": "freeform-arrows", children: r.map((o) => /* @__PURE__ */ a(
|
|
3747
|
-
|
|
3747
|
+
Xu,
|
|
3748
3748
|
{
|
|
3749
3749
|
arrow: o,
|
|
3750
3750
|
fallbackColor: s.defaultAnnotationArrowStroke,
|
|
@@ -3753,10 +3753,10 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3753
3753
|
},
|
|
3754
3754
|
o.id
|
|
3755
3755
|
)) });
|
|
3756
|
-
},
|
|
3757
|
-
const { tickLabelOffset: i } =
|
|
3758
|
-
return u ? /* @__PURE__ */ a("svg", { x: c, y: h ? "100%" : 0, style: { overflow: "visible" }, children: /* @__PURE__ */ a("text", { ...
|
|
3759
|
-
},
|
|
3756
|
+
}, Yu = ({ edge: e, areTicksVisible: t, position: n, labelRotation: r, label: o }) => {
|
|
3757
|
+
const { tickLabelOffset: i } = Tt(), c = x(n), l = (t ? 1 : 0) * i, d = { style: { font: s.fontTickLabel }, fill: s.textSecondary }, u = r !== 0 && (e === "top" || e === "bottom"), h = e === "top";
|
|
3758
|
+
return u ? /* @__PURE__ */ a("svg", { x: c, y: h ? "100%" : 0, style: { overflow: "visible" }, children: /* @__PURE__ */ a("text", { ...qu(h, l, r), ...d, children: o }) }) : /* @__PURE__ */ a("text", { ...ju(e, c, l), ...d, children: o });
|
|
3759
|
+
}, ju = (e, t, n) => {
|
|
3760
3760
|
switch (e) {
|
|
3761
3761
|
case "bottom":
|
|
3762
3762
|
return {
|
|
@@ -3789,7 +3789,7 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3789
3789
|
dominantBaseline: "central"
|
|
3790
3790
|
};
|
|
3791
3791
|
}
|
|
3792
|
-
},
|
|
3792
|
+
}, qu = (e, t, n) => {
|
|
3793
3793
|
const r = e ? -t : t;
|
|
3794
3794
|
return {
|
|
3795
3795
|
x: 0,
|
|
@@ -3798,16 +3798,16 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3798
3798
|
dominantBaseline: "central",
|
|
3799
3799
|
transform: `rotate(${n}, 0, ${r})`
|
|
3800
3800
|
};
|
|
3801
|
-
},
|
|
3801
|
+
}, Ku = ({ formattedAxis: e, rect: t }) => {
|
|
3802
3802
|
const n = e.position === "bottom" || e.position === "top";
|
|
3803
3803
|
return /* @__PURE__ */ m("svg", { x: t.x, y: t.y, width: t.width, height: t.height, style: { overflow: "visible" }, children: [
|
|
3804
3804
|
ur,
|
|
3805
3805
|
e.ticks.map((r, o) => {
|
|
3806
|
-
const i = r.formattedLabel, c = n ? r.position : 1 - r.position, l =
|
|
3806
|
+
const i = r.formattedLabel, c = n ? r.position : 1 - r.position, l = Ju(e.position, c, t);
|
|
3807
3807
|
return /* @__PURE__ */ m("g", { children: [
|
|
3808
3808
|
e.ticksVisible && /* @__PURE__ */ a("line", { ...l, stroke: s.gridLineColor, strokeWidth: 1 }),
|
|
3809
3809
|
/* @__PURE__ */ a(
|
|
3810
|
-
|
|
3810
|
+
Yu,
|
|
3811
3811
|
{
|
|
3812
3812
|
edge: e.position,
|
|
3813
3813
|
areTicksVisible: e.ticksVisible,
|
|
@@ -3819,7 +3819,7 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3819
3819
|
] }, o);
|
|
3820
3820
|
})
|
|
3821
3821
|
] });
|
|
3822
|
-
},
|
|
3822
|
+
}, Ju = (e, t, n) => {
|
|
3823
3823
|
const r = x(t);
|
|
3824
3824
|
switch (e) {
|
|
3825
3825
|
case "bottom":
|
|
@@ -3831,15 +3831,15 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3831
3831
|
case "right":
|
|
3832
3832
|
return { x1: 0, y1: r, x2: Fe, y2: r };
|
|
3833
3833
|
}
|
|
3834
|
-
},
|
|
3834
|
+
}, Zu = ({ axes: e, rects: t }) => /* @__PURE__ */ a(w, { children: e.map((n) => {
|
|
3835
3835
|
const r = t[n.position];
|
|
3836
3836
|
if (!r || !n.isVisible) return null;
|
|
3837
|
-
const o =
|
|
3837
|
+
const o = Qu(n.position, r);
|
|
3838
3838
|
return /* @__PURE__ */ m("g", { transform: `translate(${r.x}, ${r.y})`, children: [
|
|
3839
3839
|
ur,
|
|
3840
3840
|
/* @__PURE__ */ a("text", { style: { font: s.fontAxisLabel }, fill: s.textPrimary, ...o, children: n.label })
|
|
3841
3841
|
] }, `axis-label-${n.position}`);
|
|
3842
|
-
}) }),
|
|
3842
|
+
}) }), Qu = (e, t) => {
|
|
3843
3843
|
const n = {
|
|
3844
3844
|
x: t.width / 2,
|
|
3845
3845
|
y: t.height / 2,
|
|
@@ -3847,15 +3847,15 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3847
3847
|
dominantBaseline: "middle"
|
|
3848
3848
|
};
|
|
3849
3849
|
return e === "left" ? (n.x = 0, n.textAnchor = "start") : e === "right" && (n.x = t.width, n.textAnchor = "end"), n;
|
|
3850
|
-
},
|
|
3850
|
+
}, eh = ({ formattedAxes: e, tickRects: t }) => /* @__PURE__ */ a(w, { children: e.map((n) => {
|
|
3851
3851
|
const r = t[n.position];
|
|
3852
|
-
return !r || !n.isVisible ? null : /* @__PURE__ */ a(
|
|
3853
|
-
}) }),
|
|
3852
|
+
return !r || !n.isVisible ? null : /* @__PURE__ */ a(Ku, { formattedAxis: n, rect: r }, n.scaleAestheticKey);
|
|
3853
|
+
}) }), th = ({ formattedAxes: e, labelRects: t }) => /* @__PURE__ */ a(Zu, { axes: e, rects: t }), cn = {
|
|
3854
3854
|
strokeWidth: s.gridLineWidth,
|
|
3855
3855
|
strokeDashoffset: "0",
|
|
3856
3856
|
strokeDasharray: s.gridLineDash,
|
|
3857
3857
|
strokeLinecap: "round"
|
|
3858
|
-
},
|
|
3858
|
+
}, nh = ({ axes: e, panel: t, panelRect: n }) => /* @__PURE__ */ m(
|
|
3859
3859
|
"svg",
|
|
3860
3860
|
{
|
|
3861
3861
|
x: n.x,
|
|
@@ -3917,8 +3917,8 @@ const uo = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3917
3917
|
}
|
|
3918
3918
|
);
|
|
3919
3919
|
};
|
|
3920
|
-
var
|
|
3921
|
-
const
|
|
3920
|
+
var rh = "_120wioc0";
|
|
3921
|
+
const oh = ({ panelRect: e }) => {
|
|
3922
3922
|
const t = B((n) => n.annotations.textAnnotations);
|
|
3923
3923
|
return t.length === 0 ? null : /* @__PURE__ */ a(
|
|
3924
3924
|
"svg",
|
|
@@ -3940,9 +3940,9 @@ const th = ({ panelRect: e }) => {
|
|
|
3940
3940
|
children: /* @__PURE__ */ a(
|
|
3941
3941
|
"div",
|
|
3942
3942
|
{
|
|
3943
|
-
className:
|
|
3944
|
-
style:
|
|
3945
|
-
children: /* @__PURE__ */ a(
|
|
3943
|
+
className: rh,
|
|
3944
|
+
style: ah(n.backgroundColor, n.backgroundColorStyle),
|
|
3945
|
+
children: /* @__PURE__ */ a(Me, { content: n.content })
|
|
3946
3946
|
}
|
|
3947
3947
|
)
|
|
3948
3948
|
},
|
|
@@ -3950,17 +3950,17 @@ const th = ({ panelRect: e }) => {
|
|
|
3950
3950
|
))
|
|
3951
3951
|
}
|
|
3952
3952
|
);
|
|
3953
|
-
},
|
|
3953
|
+
}, ah = (e, t) => e === null || e === "transparent" ? { color: s.textPrimary } : t === "fade" ? {
|
|
3954
3954
|
color: s.textPrimary,
|
|
3955
|
-
backgroundColor:
|
|
3956
|
-
boxShadow: `0 0 0 1.5px ${
|
|
3955
|
+
backgroundColor: ut(e, s.grey100, 0.5),
|
|
3956
|
+
boxShadow: `0 0 0 1.5px ${ut(e, s.grey0, 0.2)}`
|
|
3957
3957
|
} : {
|
|
3958
3958
|
color: s.textPrimary,
|
|
3959
3959
|
backgroundColor: e,
|
|
3960
|
-
boxShadow: `0 0 0 1.5px ${
|
|
3960
|
+
boxShadow: `0 0 0 1.5px ${qe(e, 0.1)}`
|
|
3961
3961
|
};
|
|
3962
|
-
var
|
|
3963
|
-
const
|
|
3962
|
+
var ih = "usd3ea0", sh = "usd3ea1";
|
|
3963
|
+
const lh = ({
|
|
3964
3964
|
layer: e,
|
|
3965
3965
|
coordSystem: t,
|
|
3966
3966
|
isAnimated: n,
|
|
@@ -3968,7 +3968,7 @@ const ah = ({
|
|
|
3968
3968
|
highlightStyle: o,
|
|
3969
3969
|
formattingLocale: i
|
|
3970
3970
|
}) => {
|
|
3971
|
-
const c =
|
|
3971
|
+
const c = Ke(e, t);
|
|
3972
3972
|
return c === null ? /* @__PURE__ */ m("text", { children: [
|
|
3973
3973
|
e.geom,
|
|
3974
3974
|
" not implemented"
|
|
@@ -3976,14 +3976,14 @@ const ah = ({
|
|
|
3976
3976
|
"g",
|
|
3977
3977
|
{
|
|
3978
3978
|
className: re({
|
|
3979
|
-
[
|
|
3980
|
-
[
|
|
3979
|
+
[sh]: r && o === "desaturate",
|
|
3980
|
+
[ih]: r && o === "dim"
|
|
3981
3981
|
}),
|
|
3982
3982
|
children: c.render({ layer: e, coordSystem: t, isAnimated: n, formattingLocale: i })
|
|
3983
3983
|
}
|
|
3984
3984
|
);
|
|
3985
3985
|
};
|
|
3986
|
-
function
|
|
3986
|
+
function ch({
|
|
3987
3987
|
plugin: e,
|
|
3988
3988
|
layer: t,
|
|
3989
3989
|
coordSystem: n,
|
|
@@ -3997,7 +3997,7 @@ function ih({
|
|
|
3997
3997
|
}
|
|
3998
3998
|
return o;
|
|
3999
3999
|
}
|
|
4000
|
-
const
|
|
4000
|
+
const dh = 4, uh = ({
|
|
4001
4001
|
plugin: e,
|
|
4002
4002
|
layer: t,
|
|
4003
4003
|
matchedLayer: n,
|
|
@@ -4013,16 +4013,16 @@ const sh = 4, lh = ({
|
|
|
4013
4013
|
textScale: y.config.appearance.textScale
|
|
4014
4014
|
}))
|
|
4015
4015
|
), h = v(
|
|
4016
|
-
() =>
|
|
4016
|
+
() => ch({ plugin: e, layer: t, coordSystem: o, candidates: r }),
|
|
4017
4017
|
[e, t, o, r]
|
|
4018
|
-
), g = v(() =>
|
|
4019
|
-
() =>
|
|
4018
|
+
), g = v(() => Jo(t), [t]), p = v(
|
|
4019
|
+
() => Zo({ layer: t, numberFormat: d, locale: l }),
|
|
4020
4020
|
[d, t, l]
|
|
4021
|
-
), f =
|
|
4022
|
-
return e === null || n === null && h.length === 0 ? null : /* @__PURE__ */ m(
|
|
4021
|
+
), f = so * Lr * u;
|
|
4022
|
+
return e === null || n === null && h.length === 0 ? null : /* @__PURE__ */ m(w, { children: [
|
|
4023
4023
|
n ? e.render({ layer: n, coordSystem: o, isAnimated: i, formattingLocale: l }) : null,
|
|
4024
4024
|
h.map(({ observation: y, observationIndex: S, anchor: k }) => /* @__PURE__ */ a(
|
|
4025
|
-
|
|
4025
|
+
hh,
|
|
4026
4026
|
{
|
|
4027
4027
|
observation: y,
|
|
4028
4028
|
anchor: k,
|
|
@@ -4031,10 +4031,10 @@ const sh = 4, lh = ({
|
|
|
4031
4031
|
formatYValue: p,
|
|
4032
4032
|
labelFontSizePx: f
|
|
4033
4033
|
},
|
|
4034
|
-
|
|
4034
|
+
gh(y, S)
|
|
4035
4035
|
))
|
|
4036
4036
|
] });
|
|
4037
|
-
},
|
|
4037
|
+
}, hh = ({
|
|
4038
4038
|
observation: e,
|
|
4039
4039
|
anchor: t,
|
|
4040
4040
|
panelRect: n,
|
|
@@ -4042,19 +4042,19 @@ const sh = 4, lh = ({
|
|
|
4042
4042
|
formatYValue: o,
|
|
4043
4043
|
labelFontSizePx: i
|
|
4044
4044
|
}) => {
|
|
4045
|
-
const c = ve(), l =
|
|
4045
|
+
const c = ve(), l = We(t.x), d = Ge(t.y), u = (ze(e) ?? Qr) / 2, h = r(e), g = bn(h) ? o(h, e) : null, p = v(() => {
|
|
4046
4046
|
if (g === null) return null;
|
|
4047
4047
|
const f = c.measureText(g, {
|
|
4048
|
-
family:
|
|
4048
|
+
family: mt,
|
|
4049
4049
|
size: i,
|
|
4050
|
-
weight:
|
|
4050
|
+
weight: lo
|
|
4051
4051
|
});
|
|
4052
4052
|
return {
|
|
4053
|
-
width: f.width +
|
|
4054
|
-
height: f.height +
|
|
4053
|
+
width: f.width + co * 2,
|
|
4054
|
+
height: f.height + uo * 2
|
|
4055
4055
|
};
|
|
4056
4056
|
}, [g, c, i]);
|
|
4057
|
-
return /* @__PURE__ */ m(
|
|
4057
|
+
return /* @__PURE__ */ m(w, { children: [
|
|
4058
4058
|
/* @__PURE__ */ a(
|
|
4059
4059
|
"circle",
|
|
4060
4060
|
{
|
|
@@ -4066,10 +4066,10 @@ const sh = 4, lh = ({
|
|
|
4066
4066
|
}
|
|
4067
4067
|
),
|
|
4068
4068
|
g !== null && p !== null && /* @__PURE__ */ a(
|
|
4069
|
-
|
|
4069
|
+
ho,
|
|
4070
4070
|
{
|
|
4071
4071
|
x: l * n.width,
|
|
4072
|
-
y: d * n.height - u -
|
|
4072
|
+
y: d * n.height - u - dh - p.height / 2,
|
|
4073
4073
|
width: p.width,
|
|
4074
4074
|
height: p.height,
|
|
4075
4075
|
text: g,
|
|
@@ -4080,11 +4080,11 @@ const sh = 4, lh = ({
|
|
|
4080
4080
|
}
|
|
4081
4081
|
)
|
|
4082
4082
|
] });
|
|
4083
|
-
},
|
|
4083
|
+
}, gh = (e, t) => {
|
|
4084
4084
|
const n = e[Ae.group];
|
|
4085
4085
|
return `${String(n ?? "")}\0${t}`;
|
|
4086
|
-
},
|
|
4087
|
-
const { primary: r, group: o, related: i } =
|
|
4086
|
+
}, ph = ({ layer: e, coordSystem: t, panelRect: n }) => {
|
|
4087
|
+
const { primary: r, group: o, related: i } = wt(
|
|
4088
4088
|
j((d) => ({
|
|
4089
4089
|
primary: d.hover.primary,
|
|
4090
4090
|
group: d.hover.group,
|
|
@@ -4092,7 +4092,7 @@ const sh = 4, lh = ({
|
|
|
4092
4092
|
}))
|
|
4093
4093
|
);
|
|
4094
4094
|
if (r === null) return null;
|
|
4095
|
-
const c =
|
|
4095
|
+
const c = Ke(e, t);
|
|
4096
4096
|
if (c === null) return null;
|
|
4097
4097
|
const l = i.get(e.id) ?? [];
|
|
4098
4098
|
return r.layerId === e.id ? c.renderHover({
|
|
@@ -4104,8 +4104,8 @@ const sh = 4, lh = ({
|
|
|
4104
4104
|
panelRect: n
|
|
4105
4105
|
}) : l.length === 0 ? null : c.renderHoverCompanions({ layer: e, primary: r, related: l });
|
|
4106
4106
|
};
|
|
4107
|
-
var
|
|
4108
|
-
const
|
|
4107
|
+
var fh = "to1jkx0", mh = "to1jkx1";
|
|
4108
|
+
const vh = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
4109
4109
|
const { layers: r, coordSystem: o, highlightStyle: i } = B(
|
|
4110
4110
|
j((c) => ({
|
|
4111
4111
|
layers: c.layers,
|
|
@@ -4120,11 +4120,11 @@ const ph = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4120
4120
|
y: t.y,
|
|
4121
4121
|
width: t.width,
|
|
4122
4122
|
height: t.height,
|
|
4123
|
-
className:
|
|
4123
|
+
className: fh,
|
|
4124
4124
|
"data-testid": "geom-layers",
|
|
4125
4125
|
children: r.map((c) => /* @__PURE__ */ m(hn, { children: [
|
|
4126
4126
|
/* @__PURE__ */ a(
|
|
4127
|
-
|
|
4127
|
+
xh,
|
|
4128
4128
|
{
|
|
4129
4129
|
layer: c,
|
|
4130
4130
|
coordSystem: o,
|
|
@@ -4134,14 +4134,14 @@ const ph = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4134
4134
|
formattingLocale: n
|
|
4135
4135
|
}
|
|
4136
4136
|
),
|
|
4137
|
-
/* @__PURE__ */ a(
|
|
4138
|
-
] }, `${c.id}-${
|
|
4137
|
+
/* @__PURE__ */ a(ph, { layer: c, coordSystem: o, panelRect: t })
|
|
4138
|
+
] }, `${c.id}-${yh(o)}`))
|
|
4139
4139
|
}
|
|
4140
4140
|
);
|
|
4141
|
-
},
|
|
4141
|
+
}, yh = (e) => e.type === "cartesian" ? `cartesian-${e.mainAxis}` : e.type, bh = (e) => {
|
|
4142
4142
|
if (e.geom !== "rule")
|
|
4143
|
-
return
|
|
4144
|
-
},
|
|
4143
|
+
return mh;
|
|
4144
|
+
}, xh = ({
|
|
4145
4145
|
layer: e,
|
|
4146
4146
|
coordSystem: t,
|
|
4147
4147
|
highlightStyle: n,
|
|
@@ -4149,10 +4149,10 @@ const ph = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4149
4149
|
panelRect: o,
|
|
4150
4150
|
formattingLocale: i
|
|
4151
4151
|
}) => {
|
|
4152
|
-
const c = v(() =>
|
|
4153
|
-
return /* @__PURE__ */ m("g", { className:
|
|
4152
|
+
const c = v(() => Ke(e, t), [e, t]), l = e.highlight;
|
|
4153
|
+
return /* @__PURE__ */ m("g", { className: bh(e), children: [
|
|
4154
4154
|
/* @__PURE__ */ a(
|
|
4155
|
-
|
|
4155
|
+
lh,
|
|
4156
4156
|
{
|
|
4157
4157
|
layer: e,
|
|
4158
4158
|
coordSystem: t,
|
|
@@ -4163,7 +4163,7 @@ const ph = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4163
4163
|
}
|
|
4164
4164
|
),
|
|
4165
4165
|
l !== null && /* @__PURE__ */ a(
|
|
4166
|
-
|
|
4166
|
+
uh,
|
|
4167
4167
|
{
|
|
4168
4168
|
plugin: c,
|
|
4169
4169
|
layer: e,
|
|
@@ -4177,8 +4177,8 @@ const ph = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4177
4177
|
)
|
|
4178
4178
|
] });
|
|
4179
4179
|
};
|
|
4180
|
-
var
|
|
4181
|
-
const
|
|
4180
|
+
var Sh = "_17uhij30";
|
|
4181
|
+
const kh = ({
|
|
4182
4182
|
formattedAxes: e,
|
|
4183
4183
|
panelGuide: t,
|
|
4184
4184
|
plotRect: n,
|
|
@@ -4188,35 +4188,35 @@ const bh = ({
|
|
|
4188
4188
|
shouldAnimate: c,
|
|
4189
4189
|
formattingLocale: l
|
|
4190
4190
|
}) => {
|
|
4191
|
-
const d =
|
|
4192
|
-
|
|
4193
|
-
const u = Q("Grid",
|
|
4191
|
+
const d = L(null);
|
|
4192
|
+
wu(d);
|
|
4193
|
+
const u = Q("Grid", nh), h = Q("AxisTicks", eh), g = Q("AxisLabel", th), p = v(() => go(r, n), [r, n]), f = v(() => un(o, n), [o, n]), y = v(() => un(i, n), [i, n]);
|
|
4194
4194
|
return /* @__PURE__ */ m(
|
|
4195
4195
|
"svg",
|
|
4196
4196
|
{
|
|
4197
4197
|
ref: d,
|
|
4198
|
-
className:
|
|
4198
|
+
className: Sh,
|
|
4199
4199
|
width: n.width,
|
|
4200
4200
|
height: n.height,
|
|
4201
4201
|
style: { transform: `translate(${n.x}px, ${n.y}px)` },
|
|
4202
4202
|
"data-testid": "plot",
|
|
4203
4203
|
children: [
|
|
4204
4204
|
/* @__PURE__ */ a(u, { axes: e, panel: t, panelRect: p }),
|
|
4205
|
-
/* @__PURE__ */ a(
|
|
4205
|
+
/* @__PURE__ */ a(vu, { panelRect: p }),
|
|
4206
4206
|
/* @__PURE__ */ a(h, { formattedAxes: e, tickRects: f }),
|
|
4207
4207
|
/* @__PURE__ */ a(g, { formattedAxes: e, labelRects: y }),
|
|
4208
4208
|
/* @__PURE__ */ a(dn, { panelRect: p, zOrder: "background" }),
|
|
4209
|
-
/* @__PURE__ */ a(
|
|
4210
|
-
/* @__PURE__ */ a(
|
|
4211
|
-
/* @__PURE__ */ a(
|
|
4209
|
+
/* @__PURE__ */ a(vh, { shouldAnimate: c, panelRect: p, formattingLocale: l }),
|
|
4210
|
+
/* @__PURE__ */ a(Du, { panelRect: p, formattingLocale: l }),
|
|
4211
|
+
/* @__PURE__ */ a(Ou, { panelRect: p, formattingLocale: l }),
|
|
4212
4212
|
/* @__PURE__ */ a(dn, { panelRect: p, zOrder: "foreground" }),
|
|
4213
|
-
/* @__PURE__ */ a(
|
|
4214
|
-
/* @__PURE__ */ a(
|
|
4215
|
-
/* @__PURE__ */ a(
|
|
4213
|
+
/* @__PURE__ */ a(Uu, { panelRect: p }),
|
|
4214
|
+
/* @__PURE__ */ a(oh, { panelRect: p }),
|
|
4215
|
+
/* @__PURE__ */ a(Cu, { panelRect: p })
|
|
4216
4216
|
]
|
|
4217
4217
|
}
|
|
4218
4218
|
);
|
|
4219
|
-
},
|
|
4219
|
+
}, go = (e, t) => ({
|
|
4220
4220
|
x: e.x - t.x,
|
|
4221
4221
|
y: e.y - t.y,
|
|
4222
4222
|
width: e.width,
|
|
@@ -4224,25 +4224,82 @@ const bh = ({
|
|
|
4224
4224
|
}), un = (e, t) => {
|
|
4225
4225
|
const n = {};
|
|
4226
4226
|
for (const [r, o] of Object.entries(e))
|
|
4227
|
-
n[r] =
|
|
4227
|
+
n[r] = go(o, t);
|
|
4228
4228
|
return n;
|
|
4229
|
-
},
|
|
4229
|
+
}, Lh = { width: 0, height: 0, isDefault: !0 }, po = ({
|
|
4230
|
+
debounce: e = 0,
|
|
4231
|
+
onResize: t
|
|
4232
|
+
} = {}) => {
|
|
4233
|
+
const [n, r] = Co(
|
|
4234
|
+
(d, u) => d.width === u.width && d.height === u.height ? d : u,
|
|
4235
|
+
Lh
|
|
4236
|
+
), o = Wr((d) => {
|
|
4237
|
+
t?.(d), r(d);
|
|
4238
|
+
}, e), i = L(null), c = L(null), l = Oe(
|
|
4239
|
+
(d) => {
|
|
4240
|
+
!d || i.current === d || (c.current ??= new ResizeObserver(([u]) => {
|
|
4241
|
+
if (!u) return;
|
|
4242
|
+
const h = Math.round(u.contentBoxSize[0]?.inlineSize ?? u.contentRect.width), g = Math.round(u.contentBoxSize[0]?.blockSize ?? u.contentRect.height);
|
|
4243
|
+
o.run({ width: h, height: g, isDefault: !1 });
|
|
4244
|
+
}), i.current && c.current.unobserve(i.current), i.current = d, c.current.observe(d));
|
|
4245
|
+
},
|
|
4246
|
+
[o]
|
|
4247
|
+
);
|
|
4248
|
+
return { ...n, setElement: l };
|
|
4249
|
+
}, fo = (e) => {
|
|
4250
|
+
let t, n;
|
|
4251
|
+
return "aspectRatio" in e ? "intrinsicWidth" in e ? (t = e.intrinsicWidth, n = t / e.aspectRatio) : (n = e.intrinsicHeight, t = n * e.aspectRatio) : (t = e.intrinsicWidth, n = e.intrinsicHeight), { width: t, height: n };
|
|
4252
|
+
}, Ch = (e, t) => {
|
|
4253
|
+
const n = po({ onResize: t });
|
|
4254
|
+
return v(() => {
|
|
4255
|
+
if (e.mode !== "keepAspectRatio")
|
|
4256
|
+
return {
|
|
4257
|
+
setContainer: n.setElement,
|
|
4258
|
+
canRender: !1,
|
|
4259
|
+
outerStyles: {},
|
|
4260
|
+
innerStyles: {}
|
|
4261
|
+
};
|
|
4262
|
+
const r = fo(e), o = n.width > 0 && r.width > 0 ? n.width / r.width : 1;
|
|
4263
|
+
return {
|
|
4264
|
+
setContainer: n.setElement,
|
|
4265
|
+
canRender: !n.isDefault,
|
|
4266
|
+
outerStyles: {
|
|
4267
|
+
width: "100%",
|
|
4268
|
+
...n.isDefault ? { aspectRatio: `${r.width} / ${r.height}` } : { height: r.height * o }
|
|
4269
|
+
},
|
|
4270
|
+
innerStyles: {
|
|
4271
|
+
transformOrigin: "top left",
|
|
4272
|
+
transform: `scale(${o})`,
|
|
4273
|
+
width: r.width,
|
|
4274
|
+
height: r.height
|
|
4275
|
+
}
|
|
4276
|
+
};
|
|
4277
|
+
}, [e, n.width, n.setElement, n.isDefault]);
|
|
4278
|
+
}, wh = ({ sizing: e, onResize: t, children: n }) => {
|
|
4279
|
+
const r = po({ onResize: t }), o = Ch(e, t);
|
|
4280
|
+
if (e.mode === "keepAspectRatio")
|
|
4281
|
+
return /* @__PURE__ */ a("div", { ref: o.setContainer, style: o.outerStyles, "data-testid": "graph-sizer", children: o.canRender && /* @__PURE__ */ a("div", { style: o.innerStyles, children: n(fo(e)) }) });
|
|
4282
|
+
if (e.mode === "fixed")
|
|
4283
|
+
return /* @__PURE__ */ a("div", { ref: r.setElement, style: { width: e.width, height: e.height }, "data-testid": "graph-sizer", children: n({ width: e.width, height: e.height }) });
|
|
4284
|
+
const i = !r.isDefault && r.width > 0 && r.height > 0;
|
|
4285
|
+
return /* @__PURE__ */ a("div", { ref: r.setElement, style: { width: "100%", height: "100%" }, "data-testid": "graph-sizer", children: i && n({ width: r.width, height: r.height }) });
|
|
4286
|
+
}, Th = { mode: "responsive" }, lt = {
|
|
4230
4287
|
headerSize: { width: 0, height: 0 },
|
|
4231
4288
|
footerSize: { width: 0, height: 0 }
|
|
4232
|
-
},
|
|
4233
|
-
const [e, t] = E(null), [n, r] = E(null), [o, i] = E(
|
|
4234
|
-
return
|
|
4289
|
+
}, Ah = () => {
|
|
4290
|
+
const [e, t] = E(null), [n, r] = E(null), [o, i] = E(lt);
|
|
4291
|
+
return C(() => {
|
|
4235
4292
|
const c = () => {
|
|
4236
|
-
const d = e ? { width: e.offsetWidth, height: e.offsetHeight } :
|
|
4237
|
-
i((h) =>
|
|
4293
|
+
const d = e ? { width: e.offsetWidth, height: e.offsetHeight } : lt.headerSize, u = n ? { width: n.offsetWidth, height: n.offsetHeight } : lt.footerSize;
|
|
4294
|
+
i((h) => Eh(h, { headerSize: d, footerSize: u }) ? { headerSize: d, footerSize: u } : h);
|
|
4238
4295
|
};
|
|
4239
4296
|
c();
|
|
4240
4297
|
const l = new ResizeObserver(c);
|
|
4241
4298
|
return e && l.observe(e), n && l.observe(n), () => l.disconnect();
|
|
4242
4299
|
}, [e, n]), { headerRef: t, footerRef: r, measurements: o };
|
|
4243
|
-
},
|
|
4244
|
-
const { theme: o, themeClass: i, inlineVarsStyle: c } = _t(), l =
|
|
4245
|
-
const f = { ...n, borderRadius: `${u}px`, ...c }, y =
|
|
4300
|
+
}, Eh = (e, t) => e.headerSize.width !== t.headerSize.width || e.headerSize.height !== t.headerSize.height || e.footerSize.width !== t.footerSize.width || e.footerSize.height !== t.footerSize.height, _h = ({ appearance: e, isEditable: t, style: n, children: r }) => {
|
|
4301
|
+
const { theme: o, themeClass: i, inlineVarsStyle: c } = _t(), l = cs(e.border), d = Math.max(0, e.cornerRadius), u = d === 0 ? 0 : d + l, h = v(() => {
|
|
4302
|
+
const f = { ...n, borderRadius: `${u}px`, ...c }, y = ls(e.border, o);
|
|
4246
4303
|
return y !== null && (f.background = y), f;
|
|
4247
4304
|
}, [n, u, c, e.border, o]), g = v(
|
|
4248
4305
|
() => ({
|
|
@@ -4251,19 +4308,19 @@ const bh = ({
|
|
|
4251
4308
|
}),
|
|
4252
4309
|
[l, d]
|
|
4253
4310
|
), p = t && e.background.type === "solid" && e.background.color === "transparent";
|
|
4254
|
-
return /* @__PURE__ */ a("div", { "data-testid": "graph-wrapper", className: re(
|
|
4311
|
+
return /* @__PURE__ */ a("div", { "data-testid": "graph-wrapper", className: re(gs, i), style: h, children: /* @__PURE__ */ a(
|
|
4255
4312
|
"div",
|
|
4256
4313
|
{
|
|
4257
4314
|
"data-testid": "graph-inner",
|
|
4258
|
-
className: re(
|
|
4315
|
+
className: re(fs, { [ms]: p }),
|
|
4259
4316
|
style: g,
|
|
4260
4317
|
children: r
|
|
4261
4318
|
}
|
|
4262
4319
|
) });
|
|
4263
|
-
},
|
|
4264
|
-
const { formattingLocale:
|
|
4265
|
-
return /* @__PURE__ */ a(
|
|
4266
|
-
},
|
|
4320
|
+
}, gg = ({ slots: e, sizing: t = Th, onResize: n, ...r }) => {
|
|
4321
|
+
const { formattingLocale: o } = me(), i = B((c) => c.config.parsingLocale);
|
|
4322
|
+
return /* @__PURE__ */ a(ja, { children: /* @__PURE__ */ a(Ic, { children: /* @__PURE__ */ a(oa, { locale: o ?? i, children: /* @__PURE__ */ a(ti, { slots: e, children: /* @__PURE__ */ a(wh, { sizing: t, onResize: n, children: ({ width: c, height: l }) => /* @__PURE__ */ a(Ph, { width: c, height: l, ...r }) }) }) }) }) });
|
|
4323
|
+
}, Ph = ({
|
|
4267
4324
|
width: e,
|
|
4268
4325
|
height: t,
|
|
4269
4326
|
isAnimated: n,
|
|
@@ -4296,18 +4353,18 @@ const bh = ({
|
|
|
4296
4353
|
headlineConfig: G.config.headline,
|
|
4297
4354
|
content: G.config.content
|
|
4298
4355
|
}))
|
|
4299
|
-
),
|
|
4300
|
-
() =>
|
|
4356
|
+
), T = ra(), { headerRef: A, footerRef: I, measurements: _ } = Ah(), { formattingLocale: V, theme: Je, themeOverrides: Ze } = me(), be = v(() => xr(Je, Ze), [Je, Ze]), mo = Q("Header", Zl), vo = Q("Footer", Rl), yo = Q("Legend", gd), bo = Q("Headline", xc), Bt = v(
|
|
4357
|
+
() => Qo({ legends: d, numberFormat: u, parsingLocale: h, formattingLocale: V }),
|
|
4301
4358
|
[d, u, h, V]
|
|
4302
4359
|
), xe = v(
|
|
4303
|
-
() =>
|
|
4360
|
+
() => ea({ headline: y, show: S.show, numberFormat: u, parsingLocale: h, formattingLocale: V, t: i }),
|
|
4304
4361
|
[y, S.show, u, h, V, i]
|
|
4305
|
-
),
|
|
4362
|
+
), xo = ve(), Qe = g.border.type === "none" ? 0 : g.border.width, et = v(
|
|
4306
4363
|
() => ({
|
|
4307
|
-
width: Math.max(0, e - 2 *
|
|
4308
|
-
height: Math.max(0, t - 2 *
|
|
4364
|
+
width: Math.max(0, e - 2 * Qe),
|
|
4365
|
+
height: Math.max(0, t - 2 * Qe)
|
|
4309
4366
|
}),
|
|
4310
|
-
[e, t,
|
|
4367
|
+
[e, t, Qe]
|
|
4311
4368
|
), Ee = v(
|
|
4312
4369
|
() => xe ? {
|
|
4313
4370
|
formatted: xe,
|
|
@@ -4316,13 +4373,13 @@ const bh = ({
|
|
|
4316
4373
|
innerRadius: f.type === "polar" ? f.innerRadius : 0
|
|
4317
4374
|
} : void 0,
|
|
4318
4375
|
[xe, S.size, S.position, f]
|
|
4319
|
-
),
|
|
4376
|
+
), So = ni(), _e = Qi(xo, g.textScale, be, So), Se = es({
|
|
4320
4377
|
measurer: _e,
|
|
4321
4378
|
axes: c,
|
|
4322
4379
|
numberFormat: u,
|
|
4323
4380
|
parsingLocale: h,
|
|
4324
4381
|
formattedLegends: Bt,
|
|
4325
|
-
containerSize:
|
|
4382
|
+
containerSize: et,
|
|
4326
4383
|
externalMeasurements: _,
|
|
4327
4384
|
headline: Ee,
|
|
4328
4385
|
formattingLocale: V,
|
|
@@ -4330,18 +4387,18 @@ const bh = ({
|
|
|
4330
4387
|
coordSystem: f,
|
|
4331
4388
|
textScale: g.textScale,
|
|
4332
4389
|
graphPadding: be.graphPadding
|
|
4333
|
-
}), Pe = v(() => !Se || !Ee || !_e ? null :
|
|
4390
|
+
}), Pe = v(() => !Se || !Ee || !_e ? null : ta({
|
|
4334
4391
|
headline: Ee,
|
|
4335
4392
|
layout: Se.layout,
|
|
4336
|
-
containerSize:
|
|
4393
|
+
containerSize: et,
|
|
4337
4394
|
measurer: _e,
|
|
4338
4395
|
itemGap: be.headlineItemGap
|
|
4339
|
-
}), [Se, Ee,
|
|
4396
|
+
}), [Se, Ee, et, _e, be.headlineItemGap]);
|
|
4340
4397
|
if (!Se) return null;
|
|
4341
|
-
const { layout: ne, formattedAxes:
|
|
4342
|
-
return /* @__PURE__ */ a(
|
|
4398
|
+
const { layout: ne, formattedAxes: ko } = Se;
|
|
4399
|
+
return /* @__PURE__ */ a(bs, { theme: Je, themeOverrides: Ze, appearance: g, children: /* @__PURE__ */ a(Gi, { metrics: be, children: /* @__PURE__ */ m(_h, { appearance: g, isEditable: o === "editable", style: { width: "100%", height: "100%" }, children: [
|
|
4343
4400
|
/* @__PURE__ */ a(
|
|
4344
|
-
|
|
4401
|
+
mo,
|
|
4345
4402
|
{
|
|
4346
4403
|
ref: A,
|
|
4347
4404
|
headerRect: ne.header,
|
|
@@ -4353,20 +4410,20 @@ const bh = ({
|
|
|
4353
4410
|
}
|
|
4354
4411
|
),
|
|
4355
4412
|
/* @__PURE__ */ a(
|
|
4356
|
-
|
|
4413
|
+
kh,
|
|
4357
4414
|
{
|
|
4358
|
-
formattedAxes:
|
|
4415
|
+
formattedAxes: ko,
|
|
4359
4416
|
panelGuide: l,
|
|
4360
4417
|
plotRect: ne.plot,
|
|
4361
4418
|
panelRect: ne.panel,
|
|
4362
4419
|
axisRects: ne.axes,
|
|
4363
4420
|
axisLabelRects: ne.axisLabels,
|
|
4364
|
-
shouldAnimate: n ?? !
|
|
4421
|
+
shouldAnimate: n ?? !T,
|
|
4365
4422
|
formattingLocale: V ?? h
|
|
4366
4423
|
}
|
|
4367
4424
|
),
|
|
4368
4425
|
/* @__PURE__ */ a(
|
|
4369
|
-
|
|
4426
|
+
vo,
|
|
4370
4427
|
{
|
|
4371
4428
|
ref: I,
|
|
4372
4429
|
footerRect: ne.footer,
|
|
@@ -4377,9 +4434,9 @@ const bh = ({
|
|
|
4377
4434
|
isSourceVisible: k.isSourceVisible
|
|
4378
4435
|
}
|
|
4379
4436
|
),
|
|
4380
|
-
/* @__PURE__ */ a(
|
|
4437
|
+
/* @__PURE__ */ a(yo, { formattedLegends: Bt, rects: ne.legends, textScale: g.textScale }),
|
|
4381
4438
|
xe && Pe && /* @__PURE__ */ a(
|
|
4382
|
-
|
|
4439
|
+
bo,
|
|
4383
4440
|
{
|
|
4384
4441
|
headline: xe,
|
|
4385
4442
|
rect: Pe.rect,
|
|
@@ -4387,26 +4444,26 @@ const bh = ({
|
|
|
4387
4444
|
visibleItemCount: Pe.visibleItemCount
|
|
4388
4445
|
}
|
|
4389
4446
|
),
|
|
4390
|
-
r && /* @__PURE__ */ a(
|
|
4447
|
+
r && /* @__PURE__ */ a(vi, {})
|
|
4391
4448
|
] }) }) });
|
|
4392
4449
|
};
|
|
4393
4450
|
export {
|
|
4394
4451
|
Ht as CanvasTextMeasurer,
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4452
|
+
Rl as DefaultFooter,
|
|
4453
|
+
nh as DefaultGrid,
|
|
4454
|
+
Zl as DefaultHeader,
|
|
4455
|
+
yi as DefaultTooltip,
|
|
4456
|
+
hg as DevToolsPanel,
|
|
4457
|
+
ug as GraphProvider,
|
|
4458
|
+
gg as GraphRenderer,
|
|
4459
|
+
ja as HoverProvider,
|
|
4460
|
+
Ic as TextMeasurerProvider,
|
|
4461
|
+
bs as ThemeProvider,
|
|
4462
|
+
ys as darkTheme,
|
|
4463
|
+
vs as lightTheme,
|
|
4407
4464
|
B as useCompiledSelector,
|
|
4408
4465
|
Gn as useGraphCommandDispatcher,
|
|
4409
|
-
|
|
4466
|
+
wt as useHoverState,
|
|
4410
4467
|
ve as useTextMeasurer,
|
|
4411
4468
|
s as vars
|
|
4412
4469
|
};
|