@graphysdk/react-renderer 0.0.1-experimental.1 → 0.0.1-experimental.3
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 +84 -16
- package/dist/index.mjs +1137 -1101
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
import { jsx as a, jsxs as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useStore as
|
|
6
|
-
import { isGraphConfig as
|
|
2
|
+
import { jsx as a, jsxs as m, Fragment as T } from "react/jsx-runtime";
|
|
3
|
+
import re, { clsx as ce } from "clsx";
|
|
4
|
+
import xo, { useMemo as v, useState as E, useRef as C, useEffect as L, useCallback as mt, useContext as ee, createContext as fe, useId as vt, Fragment as hn, memo as oe } from "react";
|
|
5
|
+
import { useStore as Te } from "zustand";
|
|
6
|
+
import { isGraphConfig as So, createCompiler as ko, convertSpecToInput as Lo, isCompilerCachingEnabled as Co, setCompilerCachingEnabled as To, COMPILER_STAGE_KEYS as yt, RESTING_HOVER_STATE as gn, HoverEngine as wo, buildTooltipContent as Ao, LAYOUT_PADDING as pn, getDifferenceArrowDimensions as Eo, createHeadlineItemRows as fn, LayoutCompiler as _o, BORDER_PRESET_GRADIENTS as Po, isSafeUrl as mn, SetContentCaptionCommand as Ho, SetContentTitleCommand as Fo, SetContentSubtitleCommand as No, computeDirectLabelsLayout as Bo, buildFontString as Io, CachedTextMeasurer as It, HeuristicTextMeasurer as Mo, getColor as z, getAlpha as X, getSize as Re, toPercent as x, toViewBoxY as ze, toViewBoxX as Ge, createAreaPathGenerators as vn, createStableKeyGenerator as We, GROUP_VARIABLES as Ae, prepareAreaObservations as yn, resolveStrokeWidth as $e, getDashArray as Xe, getLineType as Ve, isDefined as bn, getGroup as xn, getX as ue, getYMax as Do, getY as he, getXMax as Oo, getBarRectBounds as Sn, createLinePathGenerator as kn, prepareLineObservations as Ln, getStrokeWidth as Ro, buildAverageLineSymbols as zo, formatRuleValue as Go, getAngleExtent as Cn, getRadiusExtent as Tn, buildPolarBarArcPath as Ie, getHoverGuideRectProps as Wo, getHoverGuideLineProps as $o, buildDataLabelsContent as Xo, computeDifferenceArrow as Vo, computeFreeformArrow as Uo, createSegmentYReader as Yo, buildLayerYValueFormatter as jo, formatLegends as qo, formatHeadline as Ko, resolveHeadlinePlacement as Jo } from "@graphysdk/viz-engine";
|
|
7
7
|
import { createStore as bt } from "zustand/vanilla";
|
|
8
|
-
import { useMotionValue as
|
|
9
|
-
import { useShallow as
|
|
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
|
|
13
|
-
import { Bold as
|
|
8
|
+
import { useMotionValue as wn, animate as Zo, motion as Y, useSpring as Mt, useReducedMotion as Qo } from "motion/react";
|
|
9
|
+
import { useShallow as j } from "zustand/react/shallow";
|
|
10
|
+
import { useI18n as J, IntlProvider as ea } from "@graphysdk/i18n/react";
|
|
11
|
+
import { useFloating as xt, offset as St, flip as kt, shift as Lt, autoUpdate as ta } from "@floating-ui/react-dom";
|
|
12
|
+
import { Extension as na } from "@tiptap/core";
|
|
13
|
+
import { Bold as An } from "@tiptap/extension-bold";
|
|
14
14
|
import { Document as lt } from "@tiptap/extension-document";
|
|
15
|
-
import { HardBreak as
|
|
16
|
-
import { Heading as
|
|
17
|
-
import { Italic as
|
|
18
|
-
import { Link as
|
|
19
|
-
import { Text as
|
|
20
|
-
import { TextAlign as
|
|
21
|
-
import { TextStyle as
|
|
22
|
-
import { Underline as
|
|
23
|
-
import { UndoRedo as
|
|
24
|
-
import { Paragraph as
|
|
25
|
-
import { useEditorState as
|
|
15
|
+
import { HardBreak as En } from "@tiptap/extension-hard-break";
|
|
16
|
+
import { Heading as _n } from "@tiptap/extension-heading";
|
|
17
|
+
import { Italic as Pn } from "@tiptap/extension-italic";
|
|
18
|
+
import { Link as Hn } from "@tiptap/extension-link";
|
|
19
|
+
import { Text as Fn } from "@tiptap/extension-text";
|
|
20
|
+
import { TextAlign as Nn } from "@tiptap/extension-text-align";
|
|
21
|
+
import { TextStyle as Bn, Color as In, FontFamily as Mn } from "@tiptap/extension-text-style";
|
|
22
|
+
import { Underline as Dn } from "@tiptap/extension-underline";
|
|
23
|
+
import { UndoRedo as On, Placeholder as Rn } from "@tiptap/extensions";
|
|
24
|
+
import { Paragraph as ra } from "@tiptap/extension-paragraph";
|
|
25
|
+
import { useEditorState as oa, EditorContent as aa, useEditor as ia } 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 sa } from "react-dom";
|
|
29
|
+
import { assignInlineVars as la } from "@vanilla-extract/dynamic";
|
|
30
30
|
import { Popover as F } from "@base-ui/react/popover";
|
|
31
|
-
import { HexColorPicker as
|
|
31
|
+
import { HexColorPicker as ca, HexColorInput as da } from "react-colorful";
|
|
32
32
|
import { Menu as M } from "@base-ui/react/menu";
|
|
33
|
-
import { Toggle as
|
|
34
|
-
import { interpolatePath as
|
|
33
|
+
import { Toggle as ua } from "@base-ui/react/toggle";
|
|
34
|
+
import { interpolatePath as ha } from "d3-interpolate-path";
|
|
35
35
|
import { getContrast as ct } from "color2k";
|
|
36
|
-
typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.reactRenderer = "0.0.1-experimental.
|
|
37
|
-
const
|
|
36
|
+
typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.reactRenderer = "0.0.1-experimental.3");
|
|
37
|
+
const ga = 5, pa = (e) => {
|
|
38
38
|
if (process.env.NODE_ENV === "production")
|
|
39
39
|
return {
|
|
40
40
|
emit: () => {
|
|
41
41
|
},
|
|
42
|
-
subscribe: () =>
|
|
42
|
+
subscribe: () => ma,
|
|
43
43
|
getLastTrigger: () => null,
|
|
44
44
|
getLastCompile: () => null,
|
|
45
45
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -61,7 +61,7 @@ const ua = 5, ha = (e) => {
|
|
|
61
61
|
getLastCompile: () => e.getLastCompile(),
|
|
62
62
|
getCacheStats: () => e.getCacheStats()
|
|
63
63
|
};
|
|
64
|
-
},
|
|
64
|
+
}, fa = () => bt((e) => ({
|
|
65
65
|
lastCompile: null,
|
|
66
66
|
history: [],
|
|
67
67
|
nextId: 1,
|
|
@@ -70,19 +70,19 @@ const ua = 5, ha = (e) => {
|
|
|
70
70
|
if (r.lastSnapshot === n) return r;
|
|
71
71
|
const o = {
|
|
72
72
|
id: r.nextId,
|
|
73
|
-
label:
|
|
73
|
+
label: va(t),
|
|
74
74
|
stages: n.stages,
|
|
75
75
|
durationMs: n.durationMs
|
|
76
76
|
};
|
|
77
77
|
return {
|
|
78
78
|
lastCompile: o,
|
|
79
|
-
history:
|
|
79
|
+
history: ya(r.history, o, ga),
|
|
80
80
|
nextId: r.nextId + 1,
|
|
81
81
|
lastSnapshot: n
|
|
82
82
|
};
|
|
83
83
|
})
|
|
84
|
-
})),
|
|
85
|
-
},
|
|
84
|
+
})), ma = () => {
|
|
85
|
+
}, va = (e) => {
|
|
86
86
|
switch (e.kind) {
|
|
87
87
|
case "init":
|
|
88
88
|
return "init";
|
|
@@ -93,18 +93,18 @@ const ua = 5, ha = (e) => {
|
|
|
93
93
|
case "command":
|
|
94
94
|
return e.command.metadata.description;
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, ya = (e, t, n) => {
|
|
97
97
|
const r = e.length >= n ? e.length - (n - 1) : 0;
|
|
98
98
|
return [...e.slice(r), t];
|
|
99
|
-
},
|
|
99
|
+
}, ba = (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 xa(e, t) {
|
|
104
|
+
const n = So(e) ? e.themeOverrides : void 0;
|
|
105
105
|
return v(() => ({ ...t, ...n }), [t, n]);
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const zn = fe(null), og = ({
|
|
108
108
|
data: e,
|
|
109
109
|
input: t,
|
|
110
110
|
formattingLocale: n,
|
|
@@ -114,70 +114,70 @@ const On = fe(null), Kh = ({
|
|
|
114
114
|
themeOverrides: c,
|
|
115
115
|
children: l
|
|
116
116
|
}) => {
|
|
117
|
-
const [d] = E(() =>
|
|
117
|
+
const [d] = E(() => ko()), [u] = E(() => pa(d)), h = xa(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
|
-
}),
|
|
119
|
+
return u.emit({ kind: "init" }), ba(k);
|
|
120
|
+
}), f = C({ input: t, data: e, ctx: g });
|
|
121
121
|
L(() => {
|
|
122
|
-
const k = t !==
|
|
122
|
+
const k = t !== f.current.input, w = e !== f.current.data, A = g !== f.current.ctx;
|
|
123
123
|
if (!k && !w && !A) return;
|
|
124
|
-
const I =
|
|
125
|
-
|
|
126
|
-
}, [t, e, g, d,
|
|
124
|
+
const I = p.getState(), _ = k || A ? d.compile({ input: t, data: e, ctx: g }) : d.recompile({ spec: I.compiled.spec, data: e });
|
|
125
|
+
f.current = { input: t, data: e, ctx: g }, I.setCompiled(_), u.emit({ kind: k ? "input" : "data" });
|
|
126
|
+
}, [t, e, g, d, p, u]);
|
|
127
127
|
const y = mt(
|
|
128
128
|
(k) => {
|
|
129
|
-
const w =
|
|
129
|
+
const w = p.getState(), A = k.apply(w.compiled.spec);
|
|
130
130
|
if (!A) return;
|
|
131
131
|
const I = d.recompile({ spec: A.spec });
|
|
132
132
|
if (w.setCompiled(I), u.emit({ kind: "command", command: k }), !r) return;
|
|
133
|
-
const _ =
|
|
134
|
-
|
|
133
|
+
const _ = Lo(A.spec);
|
|
134
|
+
f.current = { input: _, data: f.current.data, ctx: f.current.ctx }, r(_);
|
|
135
135
|
},
|
|
136
|
-
[r, d, u,
|
|
136
|
+
[r, d, u, p]
|
|
137
137
|
), S = v(
|
|
138
|
-
() => ({ store:
|
|
139
|
-
[
|
|
138
|
+
() => ({ store: p, dispatch: y, formattingLocale: n, compileBus: u, theme: i, themeOverrides: h }),
|
|
139
|
+
[p, y, n, u, i, h]
|
|
140
140
|
);
|
|
141
|
-
return /* @__PURE__ */ a(
|
|
141
|
+
return /* @__PURE__ */ a(zn.Provider, { value: S, children: l });
|
|
142
142
|
}, me = () => {
|
|
143
|
-
const e =
|
|
143
|
+
const e = ee(zn);
|
|
144
144
|
if (!e) throw new Error("useGraph* hooks must be used inside a <GraphProvider>");
|
|
145
145
|
return e;
|
|
146
146
|
}, B = (e) => {
|
|
147
147
|
const { store: t } = me();
|
|
148
|
-
return
|
|
149
|
-
},
|
|
148
|
+
return Te(t, (n) => e(n.compiled));
|
|
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(() =>
|
|
153
|
+
var Sa = "drqe3u0", ka = "drqe3u1", La = "drqe3u2", Ca = "drqe3u3", He = "drqe3u4", Ta = "drqe3u5", wa = "drqe3u6", Aa = "drqe3u7", et = "drqe3u8", Ea = "drqe3u9", _a = "drqe3ua", Pa = "drqe3ub", Ha = "drqe3uc", Fa = "drqe3ud", Na = "drqe3ue", Ba = "drqe3uf", Ia = "drqe3ug", Ma = "drqe3uh", Da = "drqe3ui", Dt = { enabled: "drqe3uk drqe3uj", disabled: "drqe3ul drqe3uj" }, Ot = { ran: "drqe3un drqe3um", dim: "drqe3uo drqe3um" }, Wn = { ran: "drqe3uq drqe3up", cached: "drqe3ur drqe3up", untouched: "drqe3us drqe3up" };
|
|
154
|
+
const ag = ({ width: e = 380, style: t, className: n } = {}) => {
|
|
155
|
+
const { compileBus: r } = me(), [o] = E(() => fa()), [i, c] = E(!1), [l, d] = E(Co);
|
|
156
156
|
L(() => {
|
|
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 = Te(o, (y) => y.lastCompile), h = Te(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 To(S), S;
|
|
164
164
|
});
|
|
165
165
|
};
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */ a("div", { className:
|
|
170
|
-
/* @__PURE__ */ a("div", { className:
|
|
166
|
+
return /* @__PURE__ */ m("div", { className: re(_a, n), style: { width: e, ...t }, children: [
|
|
167
|
+
/* @__PURE__ */ m("div", { className: Sa, children: [
|
|
168
|
+
/* @__PURE__ */ m("div", { children: [
|
|
169
|
+
/* @__PURE__ */ a("div", { className: ka, children: "compile cache" }),
|
|
170
|
+
/* @__PURE__ */ a("div", { className: Na, 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: Ba, children: i ? "▾" : "▴" })
|
|
173
173
|
] }),
|
|
174
|
-
!i && /* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
174
|
+
!i && /* @__PURE__ */ m("div", { className: Pa, children: [
|
|
175
|
+
/* @__PURE__ */ m(
|
|
176
176
|
"button",
|
|
177
177
|
{
|
|
178
178
|
type: "button",
|
|
179
|
-
onClick:
|
|
180
|
-
className: l ?
|
|
179
|
+
onClick: f,
|
|
180
|
+
className: l ? Dt.enabled : Dt.disabled,
|
|
181
181
|
"aria-pressed": l,
|
|
182
182
|
children: [
|
|
183
183
|
"cache ",
|
|
@@ -185,63 +185,63 @@ const Jh = ({ width: e = 380, style: t, className: n } = {}) => {
|
|
|
185
185
|
]
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
|
-
/* @__PURE__ */ a("span", { className:
|
|
188
|
+
/* @__PURE__ */ a("span", { className: Ia, children: "next compile reflects this toggle" })
|
|
189
189
|
] }),
|
|
190
|
-
!i && !
|
|
191
|
-
/* @__PURE__ */ a(
|
|
192
|
-
/* @__PURE__ */ a(
|
|
190
|
+
!i && !p && /* @__PURE__ */ m(T, { children: [
|
|
191
|
+
/* @__PURE__ */ a(Oa, { delta: u?.stages, cumulative: g }),
|
|
192
|
+
/* @__PURE__ */ a(Ra, { entries: h })
|
|
193
193
|
] })
|
|
194
194
|
] });
|
|
195
|
-
},
|
|
196
|
-
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */ a("th", { className:
|
|
195
|
+
}, Oa = ({ delta: e, cumulative: t }) => /* @__PURE__ */ m("table", { className: La, children: [
|
|
196
|
+
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ m("tr", { className: Ma, children: [
|
|
197
|
+
/* @__PURE__ */ a("th", { className: Ca, 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__ */
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */ a("span", { className:
|
|
204
|
+
const r = e?.[n], o = za(r);
|
|
205
|
+
return /* @__PURE__ */ m("tr", { className: Ha, children: [
|
|
206
|
+
/* @__PURE__ */ m("td", { className: Ta, children: [
|
|
207
|
+
/* @__PURE__ */ a("span", { className: Wn[o], "aria-hidden": !0 }),
|
|
208
208
|
" ",
|
|
209
209
|
n
|
|
210
210
|
] }),
|
|
211
|
-
/* @__PURE__ */ a("td", { className: o === "ran" ?
|
|
211
|
+
/* @__PURE__ */ a("td", { className: o === "ran" ? Ot.ran : Ot.dim, children: r?.misses ?? 0 }),
|
|
212
212
|
/* @__PURE__ */ a("td", { className: et, children: r?.hits ?? 0 }),
|
|
213
213
|
/* @__PURE__ */ a("td", { className: et, children: t[n].misses }),
|
|
214
214
|
/* @__PURE__ */ a("td", { className: et, children: t[n].hits })
|
|
215
215
|
] }, n);
|
|
216
216
|
}) })
|
|
217
|
-
] }),
|
|
218
|
-
/* @__PURE__ */ a("div", { className:
|
|
217
|
+
] }), Ra = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ m("div", { className: Fa, children: [
|
|
218
|
+
/* @__PURE__ */ a("div", { className: Da, children: "recent compiles" }),
|
|
219
219
|
e.map((t) => {
|
|
220
|
-
const n =
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */ a("span", { className:
|
|
223
|
-
/* @__PURE__ */ a("span", { className:
|
|
224
|
-
/* @__PURE__ */
|
|
220
|
+
const n = Ga(t.stages, (i) => i.misses > 0), r = yt.length;
|
|
221
|
+
return /* @__PURE__ */ m("div", { className: wa, children: [
|
|
222
|
+
/* @__PURE__ */ a("span", { className: Wn[n === 0 ? "cached" : "ran"], "aria-hidden": !0 }),
|
|
223
|
+
/* @__PURE__ */ a("span", { className: Aa, title: t.label, children: t.label }),
|
|
224
|
+
/* @__PURE__ */ m("span", { className: Ea, children: [
|
|
225
225
|
n,
|
|
226
226
|
"/",
|
|
227
227
|
r,
|
|
228
228
|
" ran · ",
|
|
229
|
-
|
|
229
|
+
$n(t.durationMs)
|
|
230
230
|
] })
|
|
231
231
|
] }, t.id);
|
|
232
232
|
})
|
|
233
|
-
] }),
|
|
233
|
+
] }), za = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Ga = (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
|
-
},
|
|
239
|
-
hover:
|
|
238
|
+
}, $n = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Wa = () => bt((e) => ({
|
|
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 =
|
|
241
|
+
})), $a = (e, t) => {
|
|
242
|
+
const n = v(() => ({ layers: e, coordSystem: t }), [e, t]), r = C(null);
|
|
243
|
+
r.current === null && (r.current = new wo(n));
|
|
244
|
+
const o = r.current, i = C(!1);
|
|
245
245
|
return L(() => {
|
|
246
246
|
if (!i.current) {
|
|
247
247
|
i.current = !0;
|
|
@@ -249,38 +249,38 @@ const Jh = ({ width: e = 380, style: t, className: n } = {}) => {
|
|
|
249
249
|
}
|
|
250
250
|
o.update(n);
|
|
251
251
|
}, [o, n]), o;
|
|
252
|
-
},
|
|
252
|
+
}, Xn = fe(null), Xa = ({ children: e }) => {
|
|
253
253
|
const { layers: t, coordSystem: n } = B(
|
|
254
|
-
|
|
255
|
-
), r =
|
|
256
|
-
return c.current === null && (c.current = { engine: r, store: o, overlayRef: i }), /* @__PURE__ */ a(
|
|
254
|
+
j((l) => ({ layers: l.layers, coordSystem: l.coordSystem }))
|
|
255
|
+
), r = $a(t, n), [o] = E(() => Wa()), i = C(null), c = C(null);
|
|
256
|
+
return c.current === null && (c.current = { engine: r, store: o, overlayRef: i }), /* @__PURE__ */ a(Xn.Provider, { value: c.current, children: e });
|
|
257
257
|
}, Ue = () => {
|
|
258
|
-
const e =
|
|
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 Va = "_2qyyu60";
|
|
264
|
+
const Rt = 2, Ua = 12, Ya = 12, zt = 1, Gt = 2, ja = 4, Ye = ({
|
|
265
265
|
shape: e,
|
|
266
266
|
color: t,
|
|
267
267
|
lineType: n = "solid",
|
|
268
|
-
width: r =
|
|
269
|
-
height: o =
|
|
268
|
+
width: r = Ua,
|
|
269
|
+
height: o = Ya
|
|
270
270
|
}) => /* @__PURE__ */ a(
|
|
271
271
|
"svg",
|
|
272
272
|
{
|
|
273
|
-
className:
|
|
273
|
+
className: Va,
|
|
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 = Ka(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 Ot = 2, Xa = 12, Va = 12, Rt = 1, zt = 2, Ua = 4, Ye = ({
|
|
|
293
293
|
x2: i.x2,
|
|
294
294
|
y2: o / 2,
|
|
295
295
|
stroke: t,
|
|
296
|
-
strokeWidth:
|
|
296
|
+
strokeWidth: Rt,
|
|
297
297
|
strokeLinecap: i.linecap,
|
|
298
298
|
strokeDasharray: i.dashArray
|
|
299
299
|
}
|
|
@@ -304,7 +304,7 @@ const Ot = 2, Xa = 12, Va = 12, Rt = 1, zt = 2, Ua = 4, Ye = ({
|
|
|
304
304
|
}
|
|
305
305
|
case "area": {
|
|
306
306
|
const c = o / 2 - 1;
|
|
307
|
-
return /* @__PURE__ */
|
|
307
|
+
return /* @__PURE__ */ m(T, { 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 Ot = 2, Xa = 12, Va = 12, Rt = 1, zt = 2, Ua = 4, Ye = ({
|
|
|
314
314
|
x2: i.x2,
|
|
315
315
|
y2: c,
|
|
316
316
|
stroke: t,
|
|
317
|
-
strokeWidth:
|
|
317
|
+
strokeWidth: Rt,
|
|
318
318
|
strokeLinecap: i.linecap,
|
|
319
319
|
strokeDasharray: i.dashArray
|
|
320
320
|
}
|
|
@@ -324,26 +324,40 @@ const Ot = 2, Xa = 12, Va = 12, Rt = 1, zt = 2, Ua = 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
|
+
}, Ka = (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
|
-
const r = (t -
|
|
332
|
-
return { x1: 0, x2: t, dashArray: `${r} ${
|
|
331
|
+
const r = (t - zt * (Gt - 1)) / Gt;
|
|
332
|
+
return { x1: 0, x2: t, dashArray: `${r} ${zt}`, linecap: "butt" };
|
|
333
333
|
}
|
|
334
|
-
const n = t / (
|
|
334
|
+
const n = t / (ja - 1);
|
|
335
335
|
return { x1: 0, x2: t, dashArray: `1 ${n}`, linecap: "round" };
|
|
336
|
-
},
|
|
337
|
-
function
|
|
338
|
-
|
|
336
|
+
}, Vn = Object.freeze({}), Ct = fe(Vn), Ja = ({ slots: e, children: t }) => /* @__PURE__ */ a(Ct.Provider, { value: e ?? Vn, children: t });
|
|
337
|
+
function Q(e, t) {
|
|
338
|
+
const n = ee(Ct)[e];
|
|
339
|
+
return n === void 0 ? t : typeof n == "object" && Qa(n) ? n.render : n;
|
|
339
340
|
}
|
|
340
|
-
function
|
|
341
|
+
function Za() {
|
|
342
|
+
const e = ee(Ct);
|
|
343
|
+
return {
|
|
344
|
+
measureAxis: e.AxisTicks?.measure,
|
|
345
|
+
measureAxisLabel: e.AxisLabel?.measure,
|
|
346
|
+
measureLegend: e.Legend?.measure,
|
|
347
|
+
measureHeadline: e.Headline?.measure.measureHeadline,
|
|
348
|
+
measureHeadlineItemWidths: e.Headline?.measure.measureHeadlineItemWidths
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
function Qa(e) {
|
|
352
|
+
return "render" in e && typeof e.render == "function";
|
|
353
|
+
}
|
|
354
|
+
function Tt(e) {
|
|
341
355
|
const { store: t } = Ue();
|
|
342
|
-
return
|
|
356
|
+
return Te(t, e);
|
|
343
357
|
}
|
|
344
|
-
var
|
|
345
|
-
const
|
|
346
|
-
const { overlayRef: t } = Ue(), n =
|
|
358
|
+
var ei = "_19519k80", ti = "_19519k81", ni = "_19519k82", ri = "_19519k83", oi = "_19519k85", ai = "_19519k86", ii = "_19519k87", si = "_19519k88", li = "_19519k89";
|
|
359
|
+
const ci = (e) => {
|
|
360
|
+
const { overlayRef: t } = Ue(), n = C(null), [r, o] = E(!1), i = C(e);
|
|
347
361
|
return i.current = e, L(() => {
|
|
348
362
|
const c = t.current;
|
|
349
363
|
if (!c) return;
|
|
@@ -356,7 +370,7 @@ const ai = (e) => {
|
|
|
356
370
|
c.removeEventListener("pointermove", l), c.removeEventListener("pointerleave", d);
|
|
357
371
|
};
|
|
358
372
|
}, [t]), { cursorRef: n, isInside: r };
|
|
359
|
-
},
|
|
373
|
+
}, di = 16, ui = 8, hi = {
|
|
360
374
|
x: 0,
|
|
361
375
|
y: 0,
|
|
362
376
|
top: 0,
|
|
@@ -366,49 +380,49 @@ const ai = (e) => {
|
|
|
366
380
|
width: 0,
|
|
367
381
|
height: 0,
|
|
368
382
|
toJSON: () => ({})
|
|
369
|
-
},
|
|
383
|
+
}, gi = () => {
|
|
370
384
|
const e = B(
|
|
371
|
-
|
|
372
|
-
layers:
|
|
373
|
-
coordSystem:
|
|
374
|
-
scales:
|
|
375
|
-
guides:
|
|
376
|
-
numberFormat:
|
|
377
|
-
parsingLocale:
|
|
385
|
+
j((f) => ({
|
|
386
|
+
layers: f.layers,
|
|
387
|
+
coordSystem: f.coordSystem,
|
|
388
|
+
scales: f.scales,
|
|
389
|
+
guides: f.guides,
|
|
390
|
+
numberFormat: f.config.numberFormat,
|
|
391
|
+
parsingLocale: f.config.parsingLocale
|
|
378
392
|
}))
|
|
379
|
-
), { formattingLocale: t } = me(), n =
|
|
380
|
-
}), { cursorRef: i, isInside: c } =
|
|
381
|
-
() =>
|
|
393
|
+
), { formattingLocale: t } = me(), n = Tt((f) => f.hover), r = Q("Tooltip", pi), o = C(() => {
|
|
394
|
+
}), { cursorRef: i, isInside: c } = ci(() => o.current()), l = v(
|
|
395
|
+
() => Ao({ ...e, hover: n, formattingLocale: t }),
|
|
382
396
|
[e, n, t]
|
|
383
397
|
), d = l !== null && c, u = v(
|
|
384
398
|
() => ({
|
|
385
399
|
getBoundingClientRect: () => {
|
|
386
|
-
const
|
|
387
|
-
return
|
|
400
|
+
const f = i.current;
|
|
401
|
+
return f === null ? hi : fi(f);
|
|
388
402
|
}
|
|
389
403
|
}),
|
|
390
404
|
[i]
|
|
391
|
-
), { refs: h, floatingStyles: g, update:
|
|
405
|
+
), { refs: h, floatingStyles: g, update: p } = xt({
|
|
392
406
|
open: d,
|
|
393
407
|
placement: "right",
|
|
394
|
-
middleware: [St(
|
|
408
|
+
middleware: [St(di), kt(), Lt({ padding: ui })],
|
|
395
409
|
elements: { reference: u }
|
|
396
410
|
});
|
|
397
|
-
return o.current =
|
|
411
|
+
return o.current = p, d ? /* @__PURE__ */ a(
|
|
398
412
|
"div",
|
|
399
413
|
{
|
|
400
414
|
ref: h.setFloating,
|
|
401
415
|
role: "tooltip",
|
|
402
|
-
className:
|
|
416
|
+
className: si,
|
|
403
417
|
style: g,
|
|
404
418
|
"data-testid": "chart-tooltip",
|
|
405
419
|
children: /* @__PURE__ */ a(r, { content: l, isVisible: d })
|
|
406
420
|
}
|
|
407
421
|
) : null;
|
|
408
|
-
},
|
|
409
|
-
e.header !== null && /* @__PURE__ */ a("div", { className:
|
|
410
|
-
/* @__PURE__ */ a("div", { className:
|
|
411
|
-
] }) : null,
|
|
422
|
+
}, pi = ({ content: e, isVisible: t }) => t ? /* @__PURE__ */ m("div", { className: li, children: [
|
|
423
|
+
e.header !== null && /* @__PURE__ */ a("div", { className: ei, children: e.header }),
|
|
424
|
+
/* @__PURE__ */ a("div", { className: ti, children: e.rows.map((n) => /* @__PURE__ */ a(mi, { row: n, shouldHighlight: n.isPrimary && e.rows.length > 1 }, n.key)) })
|
|
425
|
+
] }) : null, fi = (e) => ({
|
|
412
426
|
x: e.clientX,
|
|
413
427
|
y: e.clientY,
|
|
414
428
|
top: e.clientY,
|
|
@@ -418,14 +432,14 @@ const ai = (e) => {
|
|
|
418
432
|
width: 0,
|
|
419
433
|
height: 0,
|
|
420
434
|
toJSON: () => ({})
|
|
421
|
-
}),
|
|
422
|
-
e.swatchColor === null ? /* @__PURE__ */ a("span", { className:
|
|
423
|
-
/* @__PURE__ */ a("span", { className:
|
|
424
|
-
/* @__PURE__ */ a("span", { className:
|
|
435
|
+
}), mi = ({ row: e, shouldHighlight: t }) => /* @__PURE__ */ m("div", { className: re(ni, { [ri]: t }), "data-testid": "chart-tooltip-row", children: [
|
|
436
|
+
e.swatchColor === null ? /* @__PURE__ */ a("span", { className: oi, "aria-hidden": !0 }) : /* @__PURE__ */ a(Ye, { shape: e.swatchShape, color: e.swatchColor, lineType: e.swatchLineType }),
|
|
437
|
+
/* @__PURE__ */ a("span", { className: ai, children: e.label }),
|
|
438
|
+
/* @__PURE__ */ a("span", { className: ii, children: e.value })
|
|
425
439
|
] });
|
|
426
|
-
var Vn = ["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)", gridLineWidth: "var(--graphy-grid-line-width)", gridLineDash: "var(--graphy-grid-line-dash)", tooltipBorderRadius: "var(--graphy-tooltip-border-radius)", tooltipPaddingBlock: "var(--graphy-tooltip-padding-block)", tooltipPaddingInline: "var(--graphy-tooltip-padding-inline)", 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)" };
|
|
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)" };
|
|
427
441
|
const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu',
|
|
428
|
-
'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`,
|
|
442
|
+
'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`, vi = R, K = {
|
|
429
443
|
regular: 400,
|
|
430
444
|
medium: 500,
|
|
431
445
|
semibold: 600,
|
|
@@ -454,10 +468,10 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
454
468
|
headingSm: 1.25,
|
|
455
469
|
headingMd: 1.41,
|
|
456
470
|
headingLg: 1.29
|
|
457
|
-
},
|
|
471
|
+
}, yi = `var(--typography-chart-font-family, ${s.fontFamilyDefault})`, tt = `var(--typography-chart-heading-font-family, ${s.fontFamilyHeading})`, U = (e) => `${e}em`, Yn = {
|
|
458
472
|
textScale: "1",
|
|
459
473
|
fontFamilyDefault: R,
|
|
460
|
-
fontFamilyHeading:
|
|
474
|
+
fontFamilyHeading: vi,
|
|
461
475
|
fontWeightRegular: K.regular.toString(),
|
|
462
476
|
fontWeightMedium: K.medium.toString(),
|
|
463
477
|
fontWeightSemibold: K.semibold.toString(),
|
|
@@ -476,7 +490,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
476
490
|
fontLineHeightMd: D.md.toString(),
|
|
477
491
|
fontLineHeightLg: D.lg.toString(),
|
|
478
492
|
fontLineHeightXl: D.xl.toString()
|
|
479
|
-
},
|
|
493
|
+
}, jn = {
|
|
480
494
|
fontSizeEditorBody: U(N.editorBody),
|
|
481
495
|
fontSizeHeadingSm: U(N.headingSm),
|
|
482
496
|
fontSizeHeadingMd: U(N.headingMd),
|
|
@@ -485,7 +499,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
485
499
|
fontLineHeightHeadingSm: D.headingSm.toString(),
|
|
486
500
|
fontLineHeightHeadingMd: D.headingMd.toString(),
|
|
487
501
|
fontLineHeightHeadingLg: D.headingLg.toString()
|
|
488
|
-
}, b = (e, t, n, r =
|
|
502
|
+
}, b = (e, t, n, r = yi) => `${e} ${t}/${n} ${r}`, qn = {
|
|
489
503
|
// Axes
|
|
490
504
|
fontTickLabel: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm),
|
|
491
505
|
fontAxisLabel: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm),
|
|
@@ -557,46 +571,49 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
557
571
|
// Highlight mode
|
|
558
572
|
fontHighlightModeTitle: b(s.fontWeightBold, s.fontSizeMd, s.fontLineHeightMd),
|
|
559
573
|
fontHighlightModeSubtitle: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm)
|
|
560
|
-
},
|
|
574
|
+
}, bi = {
|
|
561
575
|
small: 1.9,
|
|
562
576
|
medium: 2.3,
|
|
563
577
|
large: 2.6
|
|
564
|
-
},
|
|
578
|
+
}, xi = {
|
|
565
579
|
small: 1,
|
|
566
580
|
medium: 1,
|
|
567
581
|
large: 1.2
|
|
568
|
-
},
|
|
582
|
+
}, Si = R, Kn = D.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 = D.sm, dr = R, ki = ir * sr, ur = !1, Fe = 6, hr = 10, P = (e, t) => `color-mix(in srgb, transparent, ${e} ${t * 100}%)`, je = (e, t) => `hsl(from ${e} h s calc(l * ${1 - t}))`, gr = (e, t) => `hsl(from ${e} h s calc(l * ${1 + t}))`, dt = (e, t, n) => `color-mix(in srgb, ${e}, ${t} ${n * 100}%)`, Li = (e) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e), Ci = (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
|
+
graphPadding: W(pn),
|
|
569
584
|
gridLineWidth: "1px",
|
|
570
585
|
gridLineDash: "2 3",
|
|
571
586
|
tooltipBorderRadius: "6px",
|
|
587
|
+
tooltipBorderWidth: "1px",
|
|
572
588
|
tooltipPaddingBlock: "8px",
|
|
573
589
|
tooltipPaddingInline: "10px",
|
|
590
|
+
tooltipRowGap: "4px",
|
|
574
591
|
tooltipShadow: "0 4px 12px rgba(0, 0, 0, 0.18)",
|
|
575
|
-
tickLabelOffset:
|
|
576
|
-
legendItemGap:
|
|
577
|
-
legendSwatchGap:
|
|
578
|
-
legendSwatchWidth:
|
|
579
|
-
legendSwatchHeight:
|
|
580
|
-
legendPillPaddingInline:
|
|
581
|
-
legendPillPaddingBlock:
|
|
582
|
-
legendPillBorderWidth:
|
|
583
|
-
headlineRowGap:
|
|
584
|
-
headlineItemGap:
|
|
585
|
-
},
|
|
592
|
+
tickLabelOffset: W(hr),
|
|
593
|
+
legendItemGap: W(nr),
|
|
594
|
+
legendSwatchGap: W(tr),
|
|
595
|
+
legendSwatchWidth: W(er),
|
|
596
|
+
legendSwatchHeight: W(Qn),
|
|
597
|
+
legendPillPaddingInline: W(rr),
|
|
598
|
+
legendPillPaddingBlock: W(or),
|
|
599
|
+
legendPillBorderWidth: W(ar),
|
|
600
|
+
headlineRowGap: W(Jn),
|
|
601
|
+
headlineItemGap: W(Zn)
|
|
602
|
+
}, fr = {
|
|
586
603
|
elevationXs: "0 0 2px rgba(15, 15, 24, 0.12), 0 2px 2px rgba(14, 14, 52, 0.08)",
|
|
587
604
|
elevationSm: "0 0 4px rgba(15, 15, 24, 0.12), 0 4px 4px rgba(14, 14, 52, 0.08)",
|
|
588
605
|
elevationMd: "0 0 8px rgba(15, 15, 24, 0.12), 0 8px 8px rgba(14, 14, 52, 0.08)",
|
|
589
606
|
elevationLg: "0 0 16px rgba(15, 15, 24, 0.12), 0 16px 16px rgba(14, 14, 52, 0.08)"
|
|
590
|
-
},
|
|
607
|
+
}, mr = {
|
|
591
608
|
radiiXs: "4px",
|
|
592
609
|
radiiSm: "6px",
|
|
593
610
|
radiiMd: "8px",
|
|
594
611
|
radiiLg: "12px"
|
|
595
|
-
},
|
|
612
|
+
}, vr = {
|
|
596
613
|
zIndexToolbar: "10",
|
|
597
614
|
zIndexToolbarTooltip: "20",
|
|
598
615
|
zIndexToolbarPopover: "30"
|
|
599
|
-
},
|
|
616
|
+
}, Ti = 8, se = (e) => `${Ti * e}px`, yr = {
|
|
600
617
|
spaceXxs: se(0.25),
|
|
601
618
|
// space(0.25) → 2px
|
|
602
619
|
spaceXs: se(0.5),
|
|
@@ -609,7 +626,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
609
626
|
// space(1.5) → 12px
|
|
610
627
|
spaceXl: se(2)
|
|
611
628
|
// space(2) → 16px
|
|
612
|
-
},
|
|
629
|
+
}, wi = {
|
|
613
630
|
transparent: "transparent",
|
|
614
631
|
white: "#FFFFFF",
|
|
615
632
|
black: "#000000",
|
|
@@ -636,7 +653,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
636
653
|
purple50: "#7B56EA",
|
|
637
654
|
purple30: "#E093FE",
|
|
638
655
|
greyGradient80: "linear-gradient(to top, #222429, #31353f)"
|
|
639
|
-
},
|
|
656
|
+
}, Ai = {
|
|
640
657
|
textPrimary: s.grey0,
|
|
641
658
|
textSecondary: P(s.textPrimary, 0.8),
|
|
642
659
|
textDisabled: P(s.textPrimary, 0.5),
|
|
@@ -655,7 +672,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
655
672
|
raisedBackground: s.grey80,
|
|
656
673
|
overlayBackground: s.grey90,
|
|
657
674
|
overlayBorderGradient: s.greyGradient80
|
|
658
|
-
},
|
|
675
|
+
}, Ei = {
|
|
659
676
|
graphBackground: s.grey90,
|
|
660
677
|
gridLineColor: s.border10,
|
|
661
678
|
originLineColor: s.grey0,
|
|
@@ -700,7 +717,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
700
717
|
arrowAnnotationStickerOutlineColorInverse: "#1D2129",
|
|
701
718
|
annotationFrameBorderColor: s.blue60,
|
|
702
719
|
annotationMenuTriggerIconColor: s.white
|
|
703
|
-
},
|
|
720
|
+
}, _i = {
|
|
704
721
|
canvasDefault: "#FFFFFF",
|
|
705
722
|
canvasBlue: "#60a5fa",
|
|
706
723
|
canvasCyan: "#22d3ee",
|
|
@@ -712,20 +729,20 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
712
729
|
canvasPurple: "#a78bfa",
|
|
713
730
|
canvasGray: "#a8a29e",
|
|
714
731
|
canvasInverse: "#000000"
|
|
715
|
-
},
|
|
716
|
-
...
|
|
717
|
-
...
|
|
718
|
-
...pr,
|
|
732
|
+
}, Pi = {
|
|
733
|
+
...wi,
|
|
734
|
+
...Ai,
|
|
719
735
|
...fr,
|
|
720
|
-
...vr,
|
|
721
736
|
...mr,
|
|
722
|
-
...
|
|
723
|
-
...
|
|
724
|
-
...
|
|
725
|
-
...
|
|
737
|
+
...yr,
|
|
738
|
+
...vr,
|
|
739
|
+
...Ei,
|
|
740
|
+
..._i,
|
|
741
|
+
...pr,
|
|
726
742
|
...Yn,
|
|
743
|
+
...jn,
|
|
727
744
|
...qn
|
|
728
|
-
},
|
|
745
|
+
}, Hi = {
|
|
729
746
|
transparent: "transparent",
|
|
730
747
|
white: "#FFFFFF",
|
|
731
748
|
black: "#000000",
|
|
@@ -752,7 +769,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
752
769
|
purple50: "#7B56EA",
|
|
753
770
|
purple30: "#E093FE",
|
|
754
771
|
greyGradient80: "linear-gradient(to top, #F0F0F1, #F9F9FF)"
|
|
755
|
-
},
|
|
772
|
+
}, Fi = {
|
|
756
773
|
textPrimary: s.black,
|
|
757
774
|
textSecondary: P(s.textPrimary, 0.6),
|
|
758
775
|
textDisabled: P(s.textPrimary, 0.5),
|
|
@@ -771,7 +788,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
771
788
|
raisedBackground: s.grey85,
|
|
772
789
|
overlayBackground: s.grey100,
|
|
773
790
|
overlayBorderGradient: s.border10
|
|
774
|
-
},
|
|
791
|
+
}, Ni = {
|
|
775
792
|
graphBackground: s.grey100,
|
|
776
793
|
gridLineColor: s.border10,
|
|
777
794
|
originLineColor: s.grey0,
|
|
@@ -816,7 +833,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
816
833
|
arrowAnnotationStickerOutlineColorInverse: "#FFFFFF",
|
|
817
834
|
annotationFrameBorderColor: s.blue60,
|
|
818
835
|
annotationMenuTriggerIconColor: "#3d414c"
|
|
819
|
-
},
|
|
836
|
+
}, Bi = {
|
|
820
837
|
canvasDefault: "#000000",
|
|
821
838
|
canvasBlue: "#3b82f6",
|
|
822
839
|
canvasCyan: "#06b6d4",
|
|
@@ -828,137 +845,157 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
828
845
|
canvasPurple: "#8b5cf6",
|
|
829
846
|
canvasGray: "#78716c",
|
|
830
847
|
canvasInverse: "#ffffff"
|
|
831
|
-
},
|
|
832
|
-
...
|
|
833
|
-
...
|
|
834
|
-
...pr,
|
|
848
|
+
}, Ii = {
|
|
849
|
+
...Hi,
|
|
850
|
+
...Fi,
|
|
835
851
|
...fr,
|
|
836
|
-
...vr,
|
|
837
852
|
...mr,
|
|
838
|
-
...
|
|
839
|
-
...
|
|
840
|
-
...
|
|
841
|
-
...
|
|
853
|
+
...yr,
|
|
854
|
+
...vr,
|
|
855
|
+
...Ni,
|
|
856
|
+
...Bi,
|
|
857
|
+
...pr,
|
|
842
858
|
...Yn,
|
|
859
|
+
...jn,
|
|
843
860
|
...qn
|
|
844
|
-
},
|
|
845
|
-
...e === "dark" ?
|
|
861
|
+
}, br = (e, t = {}) => ({
|
|
862
|
+
...e === "dark" ? Pi : Ii,
|
|
846
863
|
...t
|
|
847
|
-
}),
|
|
848
|
-
const n =
|
|
864
|
+
}), xr = (e, t) => {
|
|
865
|
+
const n = br(e, t), r = $(n.legendPillPaddingInline, rr), o = $(n.legendPillPaddingBlock, or), i = $(n.legendPillBorderWidth, ar);
|
|
849
866
|
return {
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
867
|
+
graphPadding: $(n.graphPadding, pn),
|
|
868
|
+
tickLabelOffset: $(n.tickLabelOffset, hr),
|
|
869
|
+
legendSwatchWidth: $(n.legendSwatchWidth, er),
|
|
870
|
+
legendSwatchHeight: $(n.legendSwatchHeight, Qn),
|
|
871
|
+
legendSwatchGap: $(n.legendSwatchGap, tr),
|
|
872
|
+
legendItemGap: $(n.legendItemGap, nr),
|
|
855
873
|
legendPillPaddingInline: r,
|
|
856
874
|
legendPillPaddingBlock: o,
|
|
857
875
|
legendPillBorderWidth: i,
|
|
858
876
|
legendPillHorizontalChrome: 2 * (r + i),
|
|
859
877
|
legendPillVerticalChrome: 2 * (o + i),
|
|
860
|
-
headlineRowGap:
|
|
861
|
-
headlineItemGap:
|
|
878
|
+
headlineRowGap: $(n.headlineRowGap, Jn),
|
|
879
|
+
headlineItemGap: $(n.headlineItemGap, Zn)
|
|
862
880
|
};
|
|
863
|
-
},
|
|
864
|
-
function
|
|
881
|
+
}, Mi = Object.freeze(xr("light"));
|
|
882
|
+
function $(e, t) {
|
|
865
883
|
const n = e.trim();
|
|
866
884
|
if (!/^-?\d*\.?\d+(px)?$/.test(n)) return t;
|
|
867
885
|
const r = Number.parseFloat(n);
|
|
868
886
|
return Number.isFinite(r) ? r : t;
|
|
869
887
|
}
|
|
870
|
-
const
|
|
888
|
+
const Sr = fe(Mi), Di = ({ metrics: e, children: t }) => /* @__PURE__ */ a(Sr.Provider, { value: e, children: t }), wt = () => ee(Sr), At = N.sm, kr = R, Lr = 10, te = (e, t) => e * Lr * t, Oi = (e, t, n) => {
|
|
871
889
|
const { tickLabelOffset: r } = n;
|
|
872
890
|
return (o) => {
|
|
873
|
-
if (!o.isVisible || o.ticks.length === 0) return 0;
|
|
874
891
|
const i = o.position === "top" || o.position === "bottom", c = o.ticks.map(
|
|
875
892
|
(u) => e.measureText(u.formattedLabel, {
|
|
876
|
-
family:
|
|
877
|
-
size:
|
|
893
|
+
family: kr,
|
|
894
|
+
size: te(At, t)
|
|
878
895
|
})
|
|
879
896
|
), l = o.labelMaxWidthPx ?? Number.POSITIVE_INFINITY;
|
|
880
897
|
if (i) {
|
|
881
898
|
if (o.labelRotation !== 0) {
|
|
882
899
|
const u = c.map((g) => g.width);
|
|
883
|
-
return
|
|
900
|
+
return Wt(u, l) + 2 * r;
|
|
884
901
|
}
|
|
885
902
|
return Math.max(...c.map((u) => u.height)) + r;
|
|
886
903
|
}
|
|
887
|
-
return
|
|
904
|
+
return Wt(
|
|
888
905
|
c.map((u) => u.width),
|
|
889
906
|
l
|
|
890
907
|
) + r;
|
|
891
908
|
};
|
|
892
|
-
},
|
|
893
|
-
const { labelLineHeight: o, labelFontWeight: i } =
|
|
909
|
+
}, Wt = (e, t) => Math.min(Math.max(...e), t), Ri = (e) => () => te(At, e), zi = (e, t) => (n, r) => {
|
|
910
|
+
const { labelLineHeight: o, labelFontWeight: i } = Eo(r, t);
|
|
894
911
|
return e.measureText(n, {
|
|
895
912
|
family: R,
|
|
896
913
|
size: o,
|
|
897
914
|
weight: i
|
|
898
915
|
});
|
|
899
|
-
},
|
|
900
|
-
const i =
|
|
916
|
+
}, Gi = (e, t, n) => (r, o) => {
|
|
917
|
+
const i = Cr(r, o, e, t, n.headlineRowGap), c = Tr(i.map((d) => d.width)), l = Math.max(0, i.length - 1) * n.headlineItemGap;
|
|
901
918
|
return {
|
|
902
919
|
width: c + l,
|
|
903
920
|
height: Math.max(0, ...i.map((d) => d.height))
|
|
904
921
|
};
|
|
905
|
-
},
|
|
922
|
+
}, Wi = (e, t, n) => (r, o) => Cr(r, o, e, t, n.headlineRowGap).map(
|
|
906
923
|
(i) => i.width
|
|
907
|
-
),
|
|
924
|
+
), $i = (e, t) => (n, r) => {
|
|
908
925
|
const o = ut("value", r, t);
|
|
909
|
-
return { width: e.measureText(n, o).width, height: o.size *
|
|
910
|
-
},
|
|
911
|
-
const r =
|
|
926
|
+
return { width: e.measureText(n, o).width, height: o.size * Kn };
|
|
927
|
+
}, Xi = (e, t, n) => {
|
|
928
|
+
const r = Gi(e, t, n), o = $i(e, t);
|
|
912
929
|
return (i, c) => i.kind === "perGroup" ? r(i, c) : o(i.value, c);
|
|
913
|
-
},
|
|
930
|
+
}, Cr = (e, t, n, r, o) => {
|
|
914
931
|
const i = {
|
|
915
932
|
value: ut("value", t, r),
|
|
916
933
|
label: ut("label", t, r)
|
|
917
|
-
}, c = (l) =>
|
|
934
|
+
}, c = (l) => Vi(l, i, n);
|
|
918
935
|
return e.items.map((l) => {
|
|
919
|
-
const d =
|
|
936
|
+
const d = fn(l).map(c), u = Math.max(0, d.length - 1) * o;
|
|
920
937
|
return {
|
|
921
938
|
width: Math.max(0, ...d.map((h) => h.width)),
|
|
922
|
-
height:
|
|
939
|
+
height: Tr(d.map((h) => h.height)) + u
|
|
923
940
|
};
|
|
924
941
|
});
|
|
925
|
-
},
|
|
942
|
+
}, Vi = (e, t, n) => {
|
|
926
943
|
let r = 0, o = 0;
|
|
927
944
|
for (const i of e.segments)
|
|
928
945
|
if (i.kind === "text") {
|
|
929
946
|
const c = t[i.fontRole];
|
|
930
|
-
r += n.measureText(i.text, c).width, o = Math.max(o, c.size *
|
|
947
|
+
r += n.measureText(i.text, c).width, o = Math.max(o, c.size * Kn);
|
|
931
948
|
} else
|
|
932
949
|
r += i.size, o = Math.max(o, i.size);
|
|
933
950
|
return { width: r + Math.max(0, e.segments.length - 1) * e.gap, height: o };
|
|
934
951
|
}, ut = (e, t, n) => {
|
|
935
|
-
const r = e === "value" ?
|
|
936
|
-
return { family:
|
|
937
|
-
},
|
|
938
|
-
const t =
|
|
939
|
-
return { fontSizePx: t, lineBoxHeight: t *
|
|
940
|
-
},
|
|
941
|
-
|
|
942
|
-
const { fontSizePx: o, lineBoxHeight: i } = Tr(t), c = { family: cr, size: o };
|
|
952
|
+
const r = e === "value" ? bi[t] : xi[t];
|
|
953
|
+
return { family: Si, size: te(r, n) };
|
|
954
|
+
}, Tr = (e) => e.reduce((t, n) => t + n, 0), wr = (e) => {
|
|
955
|
+
const t = te(lr, e);
|
|
956
|
+
return { fontSizePx: t, lineBoxHeight: t * cr };
|
|
957
|
+
}, Ar = (e, t) => e ? t : 0, Ui = (e, t, n) => (r) => {
|
|
958
|
+
const { fontSizePx: o, lineBoxHeight: i } = wr(t), c = { family: dr, size: o };
|
|
943
959
|
if (r.position === "top" || r.position === "bottom")
|
|
944
960
|
return Math.max(i, n.legendSwatchHeight) + n.legendPillVerticalChrome;
|
|
945
961
|
const d = r.items.map((u) => {
|
|
946
|
-
const h = e.measureText(u.formattedLabel, c).width, g =
|
|
962
|
+
const h = e.measureText(u.formattedLabel, c).width, g = Ar(u.visual.color, n.legendSwatchWidth);
|
|
947
963
|
return g + (g > 0 ? n.legendSwatchGap : 0) + h;
|
|
948
964
|
});
|
|
949
965
|
return Math.max(...d) + n.legendPillHorizontalChrome;
|
|
950
|
-
},
|
|
951
|
-
family:
|
|
952
|
-
size:
|
|
953
|
-
}),
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
966
|
+
}, Yi = (e, t) => (n) => e.measureText(n, {
|
|
967
|
+
family: kr,
|
|
968
|
+
size: te(At, t)
|
|
969
|
+
}), ji = Object.freeze({}), qi = (e, t, n, r = ji) => {
|
|
970
|
+
const o = C(r);
|
|
971
|
+
return o.current = r, v(() => {
|
|
972
|
+
if (!e) return null;
|
|
973
|
+
const i = Oi(e, t, n), c = Ri(t), l = Ui(e, t, n), d = Xi(e, t, n), u = Wi(e, t, n), h = {
|
|
974
|
+
measureText: (g, p) => e.measureText(g, p),
|
|
975
|
+
textScale: t
|
|
976
|
+
};
|
|
977
|
+
return {
|
|
978
|
+
measureAxis: (g) => {
|
|
979
|
+
if (Ji(g)) return 0;
|
|
980
|
+
const p = o.current.measureAxis;
|
|
981
|
+
return p ? p(g, h) : i(g);
|
|
982
|
+
},
|
|
983
|
+
measureAxisLabel: (g) => {
|
|
984
|
+
const p = o.current.measureAxisLabel;
|
|
985
|
+
return p ? p(g, h) : c();
|
|
986
|
+
},
|
|
987
|
+
measureLegend: (g) => {
|
|
988
|
+
if (Zi(g)) return 0;
|
|
989
|
+
const p = o.current.measureLegend;
|
|
990
|
+
return p ? p(g, h) : l(g);
|
|
991
|
+
},
|
|
992
|
+
measureHeadline: (g, p) => (o.current.measureHeadline ?? d)(g, p),
|
|
993
|
+
measureHeadlineItemWidths: (g, p) => (o.current.measureHeadlineItemWidths ?? u)(g, p),
|
|
994
|
+
measureTickLabel: Yi(e, t),
|
|
995
|
+
measureDifferenceArrowLabel: zi(e, t)
|
|
996
|
+
};
|
|
997
|
+
}, [e, t, n]);
|
|
998
|
+
}, Ki = ({
|
|
962
999
|
measurer: e,
|
|
963
1000
|
axes: t,
|
|
964
1001
|
numberFormat: n,
|
|
@@ -970,8 +1007,9 @@ const xr = fe(Fi), Ni = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Pr
|
|
|
970
1007
|
formattingLocale: d,
|
|
971
1008
|
annotations: u,
|
|
972
1009
|
coordSystem: h,
|
|
973
|
-
textScale: g
|
|
974
|
-
|
|
1010
|
+
textScale: g,
|
|
1011
|
+
graphPadding: p
|
|
1012
|
+
}) => v(() => e ? new _o(e).compile({
|
|
975
1013
|
axes: t,
|
|
976
1014
|
numberFormat: n,
|
|
977
1015
|
parsingLocale: r,
|
|
@@ -982,7 +1020,8 @@ const xr = fe(Fi), Ni = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Pr
|
|
|
982
1020
|
formattingLocale: d,
|
|
983
1021
|
annotations: u,
|
|
984
1022
|
coordSystem: h,
|
|
985
|
-
textScale: g
|
|
1023
|
+
textScale: g,
|
|
1024
|
+
padding: p
|
|
986
1025
|
}) : null, [
|
|
987
1026
|
t,
|
|
988
1027
|
n,
|
|
@@ -995,18 +1034,19 @@ const xr = fe(Fi), Ni = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Pr
|
|
|
995
1034
|
u,
|
|
996
1035
|
h,
|
|
997
1036
|
g,
|
|
1037
|
+
p,
|
|
998
1038
|
e
|
|
999
|
-
]),
|
|
1039
|
+
]), Ji = (e) => !e.isVisible || e.ticks.length === 0, Zi = (e) => e.items.length === 0, $t = "data-variant", Er = ra.extend({
|
|
1000
1040
|
addAttributes() {
|
|
1001
1041
|
return {
|
|
1002
1042
|
variant: {
|
|
1003
1043
|
default: null,
|
|
1004
|
-
parseHTML: (e) => e.getAttribute(
|
|
1005
|
-
renderHTML: (e) => e.variant ? { [
|
|
1044
|
+
parseHTML: (e) => e.getAttribute($t) ?? null,
|
|
1045
|
+
renderHTML: (e) => e.variant ? { [$t]: e.variant } : {}
|
|
1006
1046
|
}
|
|
1007
1047
|
};
|
|
1008
1048
|
}
|
|
1009
|
-
}),
|
|
1049
|
+
}), Qi = na.create({
|
|
1010
1050
|
name: "preventBackspaceAcrossTitleBoundary",
|
|
1011
1051
|
addOptions() {
|
|
1012
1052
|
return { isTitleVisible: !0 };
|
|
@@ -1022,28 +1062,28 @@ const xr = fe(Fi), Ni = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Pr
|
|
|
1022
1062
|
}
|
|
1023
1063
|
};
|
|
1024
1064
|
}
|
|
1025
|
-
}),
|
|
1065
|
+
}), es = ({
|
|
1026
1066
|
titlePlaceholder: e,
|
|
1027
1067
|
subtitlePlaceholder: t,
|
|
1028
1068
|
isTitleVisible: n,
|
|
1029
1069
|
isSubtitleVisible: r
|
|
1030
1070
|
}) => [
|
|
1031
|
-
|
|
1032
|
-
|
|
1071
|
+
ns({ isTitleVisible: n, isSubtitleVisible: r }),
|
|
1072
|
+
Er,
|
|
1073
|
+
Fn,
|
|
1074
|
+
On,
|
|
1075
|
+
_n.configure({ levels: [1, 2, 3] }),
|
|
1076
|
+
An,
|
|
1033
1077
|
Pn,
|
|
1078
|
+
Dn,
|
|
1079
|
+
Nn.configure({ types: ["heading", "paragraph"] }),
|
|
1080
|
+
Hn.configure({ openOnClick: !1, autolink: !0 }),
|
|
1081
|
+
Bn,
|
|
1082
|
+
In,
|
|
1034
1083
|
Mn,
|
|
1035
|
-
An.configure({ levels: [1, 2, 3] }),
|
|
1036
|
-
Tn,
|
|
1037
1084
|
En,
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
_n.configure({ openOnClick: !1, autolink: !0 }),
|
|
1041
|
-
Fn,
|
|
1042
|
-
Nn,
|
|
1043
|
-
Bn,
|
|
1044
|
-
wn,
|
|
1045
|
-
Ui.configure({ isTitleVisible: n }),
|
|
1046
|
-
Dn.configure({
|
|
1085
|
+
Qi.configure({ isTitleVisible: n }),
|
|
1086
|
+
Rn.configure({
|
|
1047
1087
|
showOnlyCurrent: !1,
|
|
1048
1088
|
placeholder: ({ pos: o, editor: i }) => {
|
|
1049
1089
|
if (n && o === 0) return e;
|
|
@@ -1051,83 +1091,83 @@ const xr = fe(Fi), Ni = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Pr
|
|
|
1051
1091
|
return r && o === c ? t : "";
|
|
1052
1092
|
}
|
|
1053
1093
|
})
|
|
1054
|
-
],
|
|
1094
|
+
], ts = ({ placeholder: e }) => [
|
|
1055
1095
|
lt,
|
|
1056
|
-
|
|
1096
|
+
Er,
|
|
1097
|
+
Fn,
|
|
1098
|
+
On,
|
|
1099
|
+
_n.configure({ levels: [1, 2, 3] }),
|
|
1100
|
+
An,
|
|
1057
1101
|
Pn,
|
|
1102
|
+
Dn,
|
|
1103
|
+
Nn.configure({ types: ["heading", "paragraph"] }),
|
|
1104
|
+
Hn.configure({ openOnClick: !1, autolink: !0 }),
|
|
1105
|
+
Bn,
|
|
1106
|
+
In,
|
|
1058
1107
|
Mn,
|
|
1059
|
-
An.configure({ levels: [1, 2, 3] }),
|
|
1060
|
-
Tn,
|
|
1061
1108
|
En,
|
|
1062
|
-
|
|
1063
|
-
Hn.configure({ types: ["heading", "paragraph"] }),
|
|
1064
|
-
_n.configure({ openOnClick: !1, autolink: !0 }),
|
|
1065
|
-
Fn,
|
|
1066
|
-
Nn,
|
|
1067
|
-
Bn,
|
|
1068
|
-
wn,
|
|
1069
|
-
Dn.configure({
|
|
1109
|
+
Rn.configure({
|
|
1070
1110
|
showOnlyCurrent: !1,
|
|
1071
1111
|
placeholder: ({ pos: t }) => t === 0 ? e : ""
|
|
1072
1112
|
})
|
|
1073
|
-
],
|
|
1113
|
+
], ns = ({
|
|
1074
1114
|
isTitleVisible: e,
|
|
1075
1115
|
isSubtitleVisible: t
|
|
1076
|
-
}) => e && t ? lt.extend({ content: "block{2,}" }) : lt, Me = 0.1,
|
|
1116
|
+
}) => e && t ? lt.extend({ content: "block{2,}" }) : lt, Me = 0.1, rs = { light: 0.05, dark: 0.1 }, os = (e, t) => {
|
|
1077
1117
|
switch (e.type) {
|
|
1078
1118
|
case "none":
|
|
1079
1119
|
return null;
|
|
1080
1120
|
case "solid":
|
|
1081
1121
|
return e.color;
|
|
1082
1122
|
case "tinted":
|
|
1083
|
-
return
|
|
1123
|
+
return ss(e.color, t);
|
|
1084
1124
|
case "gradient":
|
|
1085
|
-
return
|
|
1125
|
+
return ls(e.color, t);
|
|
1086
1126
|
case "preset":
|
|
1087
|
-
return
|
|
1127
|
+
return Po[e.preset];
|
|
1088
1128
|
}
|
|
1089
|
-
},
|
|
1129
|
+
}, as = (e) => e.type === "none" ? 0 : e.width, is = (e, t, n) => {
|
|
1090
1130
|
if (e.type === "solid")
|
|
1091
1131
|
return e.color;
|
|
1092
1132
|
if (e.type === "tinted")
|
|
1093
|
-
return dt(n, e.color,
|
|
1094
|
-
},
|
|
1095
|
-
const r = e, o = t === "dark" ?
|
|
1133
|
+
return dt(n, e.color, rs[t]);
|
|
1134
|
+
}, ss = (e, t) => t === "dark" ? je(e, Me) : gr(e, Me), ls = (e, t, n = 90) => {
|
|
1135
|
+
const r = e, o = t === "dark" ? je(e, Me) : gr(e, Me);
|
|
1096
1136
|
return `linear-gradient(${n}deg, ${r} 0%, ${o} 100%)`;
|
|
1097
1137
|
};
|
|
1098
|
-
var
|
|
1099
|
-
const
|
|
1100
|
-
const e =
|
|
1138
|
+
var cs = "bow4tg0", ds = "bow4tg1", us = "bow4tg2", hs = "bow4tg3", gs = "_1ii3bsb0", ps = "_1ii3bsb1";
|
|
1139
|
+
const Et = fe(null), _t = () => {
|
|
1140
|
+
const e = ee(Et);
|
|
1101
1141
|
if (!e) throw new Error("useThemeContext must be used inside a <ThemeProvider>.");
|
|
1102
1142
|
return e;
|
|
1103
|
-
},
|
|
1104
|
-
const o = v(() =>
|
|
1143
|
+
}, fs = ({ theme: e, themeOverrides: t = {}, appearance: n, children: r }) => {
|
|
1144
|
+
const o = v(() => br(e, t), [e, t]), i = v(() => {
|
|
1105
1145
|
const l = {
|
|
1106
1146
|
[s.textScale]: String(n.textScale)
|
|
1107
1147
|
};
|
|
1108
1148
|
for (const [u, h] of Object.entries(t))
|
|
1109
1149
|
l[s[u]] = h;
|
|
1110
|
-
const d =
|
|
1111
|
-
return d !== void 0 && (l[s.graphBackground] = d),
|
|
1150
|
+
const d = is(n.background, e, o.graphBackground);
|
|
1151
|
+
return d !== void 0 && (l[s.graphBackground] = d), la(l);
|
|
1112
1152
|
}, [n.textScale, n.background, e, o.graphBackground, t]), c = v(
|
|
1113
1153
|
() => ({
|
|
1114
1154
|
theme: e,
|
|
1115
|
-
themeClass: e === "dark" ?
|
|
1155
|
+
themeClass: e === "dark" ? ps : gs,
|
|
1116
1156
|
inlineVarsStyle: i,
|
|
1117
1157
|
themeValues: o
|
|
1118
1158
|
}),
|
|
1119
1159
|
[e, i, o]
|
|
1120
1160
|
);
|
|
1121
|
-
return /* @__PURE__ */ a(
|
|
1161
|
+
return /* @__PURE__ */ a(Et.Provider, { value: c, children: r });
|
|
1122
1162
|
}, ae = ({ children: e, className: t, style: n }) => {
|
|
1123
|
-
const r =
|
|
1124
|
-
return /* @__PURE__ */ a("div", { className:
|
|
1125
|
-
},
|
|
1126
|
-
var
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1129
|
-
),
|
|
1130
|
-
const o = J(), i =
|
|
1163
|
+
const r = ee(Et), o = r ? re(r.themeClass, ds) : void 0, i = r ? { ...r.inlineVarsStyle, ...n } : n;
|
|
1164
|
+
return /* @__PURE__ */ a("div", { className: re(o, t), style: i, children: e });
|
|
1165
|
+
}, ms = "graphy_root", ie = () => typeof document > "u" ? null : document.getElementById(ms) ?? document.body;
|
|
1166
|
+
var vs = "yp3g0k0", ys = "yp3g0k1", _r = "yp3g0k3", bs = "yp3g0k4", Pr = "yp3g0k5", ht = "yp3g0k6", xs = "yp3g0k7", Ss = "yp3g0k8", Hr = "yp3g0k9", ks = "yp3g0ka", Ls = "yp3g0kb", Cs = "yp3g0kc", Ts = "yp3g0kd", ws = "yp3g0ke";
|
|
1167
|
+
const As = Un.map((e) => s[e]), Es = Object.fromEntries(
|
|
1168
|
+
Un.map((e) => [s[e], e])
|
|
1169
|
+
), _s = ({ editor: e, currentColor: t, isOpen: n, onOpenChange: r }) => {
|
|
1170
|
+
const o = J(), i = Hs(), c = mt(
|
|
1131
1171
|
(d) => {
|
|
1132
1172
|
e.chain().setColor(d).run();
|
|
1133
1173
|
},
|
|
@@ -1135,29 +1175,29 @@ const xs = Vn.map((e) => s[e]), Ss = Object.fromEntries(
|
|
|
1135
1175
|
), l = (d) => {
|
|
1136
1176
|
e.chain().focus().setColor(d).run(), r(!1);
|
|
1137
1177
|
};
|
|
1138
|
-
return /* @__PURE__ */
|
|
1178
|
+
return /* @__PURE__ */ m(F.Root, { open: n, onOpenChange: r, children: [
|
|
1139
1179
|
/* @__PURE__ */ a(
|
|
1140
1180
|
F.Trigger,
|
|
1141
1181
|
{
|
|
1142
1182
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
1143
1183
|
"aria-label": o("graph.toolbar.color.label"),
|
|
1144
|
-
className:
|
|
1184
|
+
className: vs,
|
|
1145
1185
|
onMouseDown: (d) => d.preventDefault(),
|
|
1146
|
-
children: /* @__PURE__ */ a("span", { className:
|
|
1186
|
+
children: /* @__PURE__ */ a("span", { className: ys, style: { background: t ?? "transparent" } })
|
|
1147
1187
|
}
|
|
1148
1188
|
),
|
|
1149
|
-
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { sideOffset: 6, align: "start", 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: bs, onMouseDown: (d) => d.preventDefault(), children: [
|
|
1150
1190
|
/* @__PURE__ */ a(
|
|
1151
|
-
|
|
1191
|
+
Xt,
|
|
1152
1192
|
{
|
|
1153
1193
|
title: o("graph.colorDropdown.colors"),
|
|
1154
|
-
colors:
|
|
1194
|
+
colors: As,
|
|
1155
1195
|
currentColor: t,
|
|
1156
1196
|
onPick: l
|
|
1157
1197
|
}
|
|
1158
1198
|
),
|
|
1159
1199
|
i.length > 0 && /* @__PURE__ */ a(
|
|
1160
|
-
|
|
1200
|
+
Xt,
|
|
1161
1201
|
{
|
|
1162
1202
|
title: o("graph.colorDropdown.chartColors"),
|
|
1163
1203
|
colors: i,
|
|
@@ -1165,58 +1205,58 @@ const xs = Vn.map((e) => s[e]), Ss = Object.fromEntries(
|
|
|
1165
1205
|
onPick: l
|
|
1166
1206
|
}
|
|
1167
1207
|
),
|
|
1168
|
-
/* @__PURE__ */ a(
|
|
1208
|
+
/* @__PURE__ */ a(Ps, { value: t ?? "#000000", onChange: c })
|
|
1169
1209
|
] }) }) }) })
|
|
1170
1210
|
] });
|
|
1171
|
-
},
|
|
1211
|
+
}, Xt = ({ title: e, colors: t, currentColor: n, onPick: r }) => /* @__PURE__ */ m("div", { className: Pr, children: [
|
|
1172
1212
|
/* @__PURE__ */ a("div", { className: ht, children: e }),
|
|
1173
|
-
/* @__PURE__ */ a("div", { className:
|
|
1213
|
+
/* @__PURE__ */ a("div", { className: xs, children: t.map((o) => /* @__PURE__ */ a(
|
|
1174
1214
|
"button",
|
|
1175
1215
|
{
|
|
1176
1216
|
type: "button",
|
|
1177
1217
|
"aria-label": o,
|
|
1178
|
-
className:
|
|
1179
|
-
"data-active":
|
|
1218
|
+
className: Ss,
|
|
1219
|
+
"data-active": Ns(o, n),
|
|
1180
1220
|
onMouseDown: (i) => i.preventDefault(),
|
|
1181
1221
|
onClick: () => r(o),
|
|
1182
|
-
children: /* @__PURE__ */ a("span", { className:
|
|
1222
|
+
children: /* @__PURE__ */ a("span", { className: Hr, style: Fr(o) })
|
|
1183
1223
|
},
|
|
1184
1224
|
o
|
|
1185
1225
|
)) })
|
|
1186
|
-
] }),
|
|
1187
|
-
const n = J(), [r, o] = E(!1), i =
|
|
1188
|
-
return /* @__PURE__ */
|
|
1189
|
-
/* @__PURE__ */
|
|
1226
|
+
] }), Ps = ({ value: e, onChange: t }) => {
|
|
1227
|
+
const n = J(), [r, o] = E(!1), i = Ci(e) ? e : "#000000", c = Fs(i);
|
|
1228
|
+
return /* @__PURE__ */ m(F.Root, { open: r, onOpenChange: o, children: [
|
|
1229
|
+
/* @__PURE__ */ m("div", { className: Pr, children: [
|
|
1190
1230
|
/* @__PURE__ */ a("div", { className: ht, children: n("graph.colorDropdown.custom") }),
|
|
1191
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ m(
|
|
1192
1232
|
F.Trigger,
|
|
1193
1233
|
{
|
|
1194
|
-
className:
|
|
1234
|
+
className: ks,
|
|
1195
1235
|
onMouseDown: (l) => l.preventDefault(),
|
|
1196
1236
|
"aria-label": n("graph.colorDropdown.pickCustom"),
|
|
1197
1237
|
children: [
|
|
1198
|
-
/* @__PURE__ */ a("span", { className:
|
|
1199
|
-
/* @__PURE__ */ a("span", { className:
|
|
1238
|
+
/* @__PURE__ */ a("span", { className: Hr, style: Fr(i) }),
|
|
1239
|
+
/* @__PURE__ */ a("span", { className: Ls, children: c })
|
|
1200
1240
|
]
|
|
1201
1241
|
}
|
|
1202
1242
|
)
|
|
1203
1243
|
] }),
|
|
1204
|
-
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { side: "right", align: "start", sideOffset: 18, className:
|
|
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: Cs, onMouseDown: (l) => l.preventDefault(), children: [
|
|
1205
1245
|
/* @__PURE__ */ a("div", { className: ht, children: n("graph.colorDropdown.pickColor") }),
|
|
1206
|
-
/* @__PURE__ */ a(
|
|
1246
|
+
/* @__PURE__ */ a(ca, { color: c, onChange: t, className: Ts }),
|
|
1207
1247
|
/* @__PURE__ */ a(
|
|
1208
|
-
|
|
1248
|
+
da,
|
|
1209
1249
|
{
|
|
1210
1250
|
color: c,
|
|
1211
1251
|
onChange: t,
|
|
1212
1252
|
prefixed: !0,
|
|
1213
|
-
className:
|
|
1253
|
+
className: ws,
|
|
1214
1254
|
onMouseDown: (l) => l.stopPropagation()
|
|
1215
1255
|
}
|
|
1216
1256
|
)
|
|
1217
1257
|
] }) }) }) })
|
|
1218
1258
|
] });
|
|
1219
|
-
},
|
|
1259
|
+
}, Hs = () => {
|
|
1220
1260
|
const e = B((t) => t.scales.color);
|
|
1221
1261
|
return v(() => {
|
|
1222
1262
|
if (!e || e.kind !== "visual") return [];
|
|
@@ -1227,15 +1267,15 @@ const xs = Vn.map((e) => s[e]), Ss = Object.fromEntries(
|
|
|
1227
1267
|
}
|
|
1228
1268
|
return [...t];
|
|
1229
1269
|
}, [e]);
|
|
1230
|
-
},
|
|
1270
|
+
}, Fr = (e) => ({
|
|
1231
1271
|
background: e,
|
|
1232
|
-
border: `1px solid ${
|
|
1233
|
-
}),
|
|
1234
|
-
const { themeValues: t } =
|
|
1235
|
-
if (
|
|
1236
|
-
const n =
|
|
1272
|
+
border: `1px solid ${je(e, 0.1)}`
|
|
1273
|
+
}), Fs = (e) => {
|
|
1274
|
+
const { themeValues: t } = _t();
|
|
1275
|
+
if (Li(e)) return e.toUpperCase();
|
|
1276
|
+
const n = Es[e];
|
|
1237
1277
|
return n ? t[n].toUpperCase() : "#000000";
|
|
1238
|
-
},
|
|
1278
|
+
}, Ns = (e, t) => t === null ? !1 : e.toLowerCase() === t.toLowerCase(), Bs = {
|
|
1239
1279
|
xxs: 8,
|
|
1240
1280
|
xs: 12,
|
|
1241
1281
|
sm: 16,
|
|
@@ -1243,13 +1283,13 @@ const xs = Vn.map((e) => s[e]), Ss = Object.fromEntries(
|
|
|
1243
1283
|
lg: 24,
|
|
1244
1284
|
xl: 36
|
|
1245
1285
|
};
|
|
1246
|
-
var
|
|
1286
|
+
var Is = { primary: "asohov1 asohov0", secondary: "asohov2 asohov0" };
|
|
1247
1287
|
const Z = ({ children: e, title: t, variant: n = "primary", size: r = "sm", ...o }) => {
|
|
1248
|
-
const i = vt(), c =
|
|
1249
|
-
return /* @__PURE__ */
|
|
1288
|
+
const i = vt(), c = Bs[r];
|
|
1289
|
+
return /* @__PURE__ */ m(
|
|
1250
1290
|
"svg",
|
|
1251
1291
|
{
|
|
1252
|
-
className:
|
|
1292
|
+
className: Is[n],
|
|
1253
1293
|
"aria-labelledby": t ? i : void 0,
|
|
1254
1294
|
height: c,
|
|
1255
1295
|
width: c,
|
|
@@ -1263,37 +1303,37 @@ const Z = ({ children: e, title: t, variant: n = "primary", size: r = "sm", ...o
|
|
|
1263
1303
|
]
|
|
1264
1304
|
}
|
|
1265
1305
|
);
|
|
1266
|
-
},
|
|
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" }) }) }), Ms = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", Br = `'Aeonik', 'Aeonik Fallback', ${R}`, Ds = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Os = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", Rs = `var(--brand-font-family), ${Br}`, gt = [
|
|
1267
1307
|
{ id: "modern", label: "Modern", preview: "Aa", fontFamily: R },
|
|
1268
|
-
{ id: "fresh", label: "Fresh", preview: "Aa", fontFamily:
|
|
1269
|
-
{ id: "timeless", label: "Timeless", preview: "Aa", fontFamily:
|
|
1270
|
-
{ id: "technical", label: "Technical", preview: "00", fontFamily:
|
|
1271
|
-
{ id: "fineliner", label: "Fineliner", preview: "Aa", fontFamily:
|
|
1272
|
-
{ id: "brand", label: "Brand", preview: "Aa", fontFamily:
|
|
1273
|
-
],
|
|
1274
|
-
var
|
|
1275
|
-
const
|
|
1276
|
-
const o = J(), i =
|
|
1308
|
+
{ id: "fresh", label: "Fresh", preview: "Aa", fontFamily: Br },
|
|
1309
|
+
{ id: "timeless", label: "Timeless", preview: "Aa", fontFamily: Ms },
|
|
1310
|
+
{ id: "technical", label: "Technical", preview: "00", fontFamily: Ds },
|
|
1311
|
+
{ id: "fineliner", label: "Fineliner", preview: "Aa", fontFamily: Os },
|
|
1312
|
+
{ id: "brand", label: "Brand", preview: "Aa", fontFamily: Rs }
|
|
1313
|
+
], zs = (e) => e ? gt.find((t) => t.fontFamily === e) ?? null : null;
|
|
1314
|
+
var Ir = "_1qkyw7q0", Mr = "_1qkyw7q1", Dr = "_1qkyw7q3", Or = "_1qkyw7q4", Rr = "_1qkyw7q5";
|
|
1315
|
+
const Gs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) => {
|
|
1316
|
+
const o = J(), i = zs(t) ?? gt[0], c = (l) => {
|
|
1277
1317
|
e.chain().focus().setFontFamily(l.fontFamily).run();
|
|
1278
1318
|
};
|
|
1279
|
-
return /* @__PURE__ */
|
|
1280
|
-
/* @__PURE__ */
|
|
1319
|
+
return /* @__PURE__ */ m(M.Root, { open: n, onOpenChange: r, children: [
|
|
1320
|
+
/* @__PURE__ */ m(
|
|
1281
1321
|
M.Trigger,
|
|
1282
1322
|
{
|
|
1283
1323
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
1284
1324
|
"aria-label": o("graph.toolbar.font.ariaLabel"),
|
|
1285
|
-
className:
|
|
1325
|
+
className: Ir,
|
|
1286
1326
|
onMouseDown: (l) => l.preventDefault(),
|
|
1287
1327
|
children: [
|
|
1288
|
-
/* @__PURE__ */ a("span", { className:
|
|
1289
|
-
/* @__PURE__ */ a(
|
|
1328
|
+
/* @__PURE__ */ a("span", { className: Mr, style: { fontFamily: i?.fontFamily }, children: i?.preview }),
|
|
1329
|
+
/* @__PURE__ */ a(Nr, { size: "sm" })
|
|
1290
1330
|
]
|
|
1291
1331
|
}
|
|
1292
1332
|
),
|
|
1293
|
-
/* @__PURE__ */ a(M.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(M.Positioner, { side: "bottom", align: "start", sideOffset: 6, className:
|
|
1333
|
+
/* @__PURE__ */ a(M.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(M.Positioner, { side: "bottom", align: "start", sideOffset: 6, className: Dr, children: /* @__PURE__ */ a(M.Popup, { className: Or, onMouseDown: (l) => l.preventDefault(), children: gt.map((l) => /* @__PURE__ */ a(
|
|
1294
1334
|
M.Item,
|
|
1295
1335
|
{
|
|
1296
|
-
className:
|
|
1336
|
+
className: Rr,
|
|
1297
1337
|
"data-selected": l.id === i?.id,
|
|
1298
1338
|
onClick: () => c(l),
|
|
1299
1339
|
children: /* @__PURE__ */ a("span", { style: { fontFamily: l.fontFamily }, children: l.label })
|
|
@@ -1301,44 +1341,44 @@ const Bs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) =>
|
|
|
1301
1341
|
l.id
|
|
1302
1342
|
)) }) }) }) })
|
|
1303
1343
|
] });
|
|
1304
|
-
},
|
|
1344
|
+
}, zr = {
|
|
1305
1345
|
id: "text",
|
|
1306
1346
|
translationKey: "graph.toolbar.heading.text",
|
|
1307
1347
|
previewFont: s.fontTextEditorBody
|
|
1308
|
-
},
|
|
1348
|
+
}, Vt = [
|
|
1309
1349
|
{ id: "caption", translationKey: "graph.toolbar.heading.caption", previewFont: s.fontTextEditorH6 },
|
|
1310
|
-
|
|
1350
|
+
zr,
|
|
1311
1351
|
{ id: "h3", translationKey: "graph.toolbar.heading.heading3", previewFont: s.fontTextEditorH3 },
|
|
1312
1352
|
{ id: "h2", translationKey: "graph.toolbar.heading.heading2", previewFont: s.fontTextEditorH2 },
|
|
1313
1353
|
{ id: "h1", translationKey: "graph.toolbar.heading.heading1", previewFont: s.fontTextEditorH1 }
|
|
1314
|
-
],
|
|
1315
|
-
const o = J(), i =
|
|
1316
|
-
return /* @__PURE__ */
|
|
1317
|
-
/* @__PURE__ */
|
|
1354
|
+
], Ws = ({ editor: e, activeStyle: t, isOpen: n, onOpenChange: r }) => {
|
|
1355
|
+
const o = J(), i = Vt.find((c) => c.id === t) ?? zr;
|
|
1356
|
+
return /* @__PURE__ */ m(M.Root, { open: n, onOpenChange: r, children: [
|
|
1357
|
+
/* @__PURE__ */ m(
|
|
1318
1358
|
M.Trigger,
|
|
1319
1359
|
{
|
|
1320
1360
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
1321
1361
|
"aria-label": o("graph.toolbar.heading.ariaLabel"),
|
|
1322
|
-
className:
|
|
1362
|
+
className: Ir,
|
|
1323
1363
|
onMouseDown: (c) => c.preventDefault(),
|
|
1324
1364
|
children: [
|
|
1325
|
-
/* @__PURE__ */ a("span", { className:
|
|
1326
|
-
/* @__PURE__ */ a(
|
|
1365
|
+
/* @__PURE__ */ a("span", { className: Mr, children: o(i.translationKey) }),
|
|
1366
|
+
/* @__PURE__ */ a(Nr, { size: "sm" })
|
|
1327
1367
|
]
|
|
1328
1368
|
}
|
|
1329
1369
|
),
|
|
1330
|
-
/* @__PURE__ */ a(M.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(M.Positioner, { side: "bottom", align: "start", sideOffset: 6, className:
|
|
1370
|
+
/* @__PURE__ */ a(M.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(M.Positioner, { side: "bottom", align: "start", sideOffset: 6, className: Dr, children: /* @__PURE__ */ a(M.Popup, { className: Or, onMouseDown: (c) => c.preventDefault(), children: Vt.map((c) => /* @__PURE__ */ a(
|
|
1331
1371
|
M.Item,
|
|
1332
1372
|
{
|
|
1333
|
-
className:
|
|
1373
|
+
className: Rr,
|
|
1334
1374
|
"data-selected": c.id === i.id,
|
|
1335
|
-
onClick: () =>
|
|
1336
|
-
children: /* @__PURE__ */ a(
|
|
1375
|
+
onClick: () => $s(e, c.id),
|
|
1376
|
+
children: /* @__PURE__ */ a(Xs, { font: c.previewFont, children: o(c.translationKey) })
|
|
1337
1377
|
},
|
|
1338
1378
|
c.id
|
|
1339
1379
|
)) }) }) }) })
|
|
1340
1380
|
] });
|
|
1341
|
-
},
|
|
1381
|
+
}, $s = (e, t) => {
|
|
1342
1382
|
switch (t) {
|
|
1343
1383
|
case "caption": {
|
|
1344
1384
|
e.chain().focus().setNode("paragraph", { variant: "caption" }).run();
|
|
@@ -1357,53 +1397,53 @@ const Bs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) =>
|
|
|
1357
1397
|
case "h3":
|
|
1358
1398
|
e.chain().focus().setHeading({ level: 3 }).run();
|
|
1359
1399
|
}
|
|
1360
|
-
},
|
|
1400
|
+
}, Xs = ({ font: e, children: t }) => /* @__PURE__ */ a("span", { style: { font: e, margin: 0 }, children: t }), Vs = (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" }) }) }), Us = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1361
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" }),
|
|
1362
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" })
|
|
1363
|
-
] }) }),
|
|
1403
|
+
] }) }), Ys = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1364
1404
|
/* @__PURE__ */ a("path", { d: "M18 6 6 18" }),
|
|
1365
1405
|
/* @__PURE__ */ a("path", { d: "m6 6 12 12" })
|
|
1366
|
-
] }) }),
|
|
1406
|
+
] }) }), js = (e) => !e.content || e.content.length === 0 ? !0 : e.content.every((t) => !t.content || t.content.length === 0), qs = (e) => {
|
|
1367
1407
|
const { $from: t } = e.state.selection, n = t.parent.textContent, r = t.parentOffset, o = t.start();
|
|
1368
1408
|
let i = r;
|
|
1369
|
-
for (; i > 0 &&
|
|
1409
|
+
for (; i > 0 && Ut(n[i - 1]); ) i -= 1;
|
|
1370
1410
|
let c = r;
|
|
1371
|
-
for (; c < n.length &&
|
|
1411
|
+
for (; c < n.length && Ut(n[c]); ) c += 1;
|
|
1372
1412
|
return { from: o + i, to: o + c };
|
|
1373
|
-
},
|
|
1374
|
-
var
|
|
1375
|
-
const
|
|
1376
|
-
const i = J(), [c, l] = E(""), d =
|
|
1413
|
+
}, Ut = (e) => e !== void 0 && /\S/.test(e);
|
|
1414
|
+
var Ks = "b5kquu0", Js = "b5kquu1", Zs = "b5kquu2", Qs = "b5kquu3", Yt = "b5kquu4";
|
|
1415
|
+
const el = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o }) => {
|
|
1416
|
+
const i = J(), [c, l] = E(""), d = C(null);
|
|
1377
1417
|
L(() => {
|
|
1378
1418
|
r && l(t ?? "");
|
|
1379
1419
|
}, [r, t]);
|
|
1380
1420
|
const u = () => {
|
|
1381
|
-
|
|
1421
|
+
tl(e, c), o(!1);
|
|
1382
1422
|
}, h = () => {
|
|
1383
1423
|
l(""), o(!1);
|
|
1384
|
-
}, g = (
|
|
1385
|
-
l(
|
|
1386
|
-
},
|
|
1387
|
-
|
|
1424
|
+
}, g = (f) => {
|
|
1425
|
+
l(f.target.value);
|
|
1426
|
+
}, p = (f) => {
|
|
1427
|
+
f.key === "Enter" && (f.preventDefault(), u());
|
|
1388
1428
|
};
|
|
1389
|
-
return /* @__PURE__ */
|
|
1429
|
+
return /* @__PURE__ */ m(F.Root, { open: r, onOpenChange: o, children: [
|
|
1390
1430
|
/* @__PURE__ */ a(
|
|
1391
1431
|
F.Trigger,
|
|
1392
1432
|
{
|
|
1393
1433
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
1394
1434
|
"aria-label": i("graph.toolbar.formatting.link"),
|
|
1395
1435
|
"data-active": n,
|
|
1396
|
-
className:
|
|
1397
|
-
onMouseDown: (
|
|
1398
|
-
children: /* @__PURE__ */ a(
|
|
1436
|
+
className: Ks,
|
|
1437
|
+
onMouseDown: (f) => f.preventDefault(),
|
|
1438
|
+
children: /* @__PURE__ */ a(Us, {})
|
|
1399
1439
|
}
|
|
1400
1440
|
),
|
|
1401
|
-
/* @__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: Js, children: /* @__PURE__ */ m(
|
|
1402
1442
|
F.Popup,
|
|
1403
1443
|
{
|
|
1404
|
-
className:
|
|
1444
|
+
className: Zs,
|
|
1405
1445
|
initialFocus: d,
|
|
1406
|
-
onMouseDown: (
|
|
1446
|
+
onMouseDown: (f) => f.preventDefault(),
|
|
1407
1447
|
children: [
|
|
1408
1448
|
/* @__PURE__ */ a(
|
|
1409
1449
|
"input",
|
|
@@ -1413,28 +1453,28 @@ const Ys = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
|
|
|
1413
1453
|
value: c,
|
|
1414
1454
|
placeholder: i("graph.toolbar.link.placeholder"),
|
|
1415
1455
|
"aria-label": i("graph.toolbar.link.urlLabel"),
|
|
1416
|
-
className:
|
|
1417
|
-
onMouseDown: (
|
|
1456
|
+
className: Qs,
|
|
1457
|
+
onMouseDown: (f) => f.stopPropagation(),
|
|
1418
1458
|
onChange: g,
|
|
1419
|
-
onKeyDown:
|
|
1459
|
+
onKeyDown: p
|
|
1420
1460
|
}
|
|
1421
1461
|
),
|
|
1422
|
-
/* @__PURE__ */ a("button", { type: "button", "aria-label": i("common.cancel"), className:
|
|
1462
|
+
/* @__PURE__ */ a("button", { type: "button", "aria-label": i("common.cancel"), className: Yt, onClick: h, children: /* @__PURE__ */ a(Ys, {}) }),
|
|
1423
1463
|
/* @__PURE__ */ a(
|
|
1424
1464
|
"button",
|
|
1425
1465
|
{
|
|
1426
1466
|
type: "button",
|
|
1427
1467
|
"aria-label": i("graph.toolbar.link.apply"),
|
|
1428
|
-
className:
|
|
1468
|
+
className: Yt,
|
|
1429
1469
|
onClick: u,
|
|
1430
|
-
children: /* @__PURE__ */ a(
|
|
1470
|
+
children: /* @__PURE__ */ a(Vs, {})
|
|
1431
1471
|
}
|
|
1432
1472
|
)
|
|
1433
1473
|
]
|
|
1434
1474
|
}
|
|
1435
1475
|
) }) }) })
|
|
1436
1476
|
] });
|
|
1437
|
-
},
|
|
1477
|
+
}, tl = (e, t) => {
|
|
1438
1478
|
const n = t.trim(), { selection: r } = e.state;
|
|
1439
1479
|
if (!n) {
|
|
1440
1480
|
e.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
@@ -1448,47 +1488,47 @@ const Ys = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
|
|
|
1448
1488
|
e.chain().focus().extendMarkRange("link").setLink({ href: n }).run();
|
|
1449
1489
|
return;
|
|
1450
1490
|
}
|
|
1451
|
-
const o =
|
|
1491
|
+
const o = qs(e);
|
|
1452
1492
|
e.chain().focus().setTextSelection(o).setLink({ href: n }).run();
|
|
1453
|
-
},
|
|
1493
|
+
}, nl = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1454
1494
|
/* @__PURE__ */ a("path", { d: "M21 5H3" }),
|
|
1455
1495
|
/* @__PURE__ */ a("path", { d: "M17 12H7" }),
|
|
1456
1496
|
/* @__PURE__ */ a("path", { d: "M19 19H5" })
|
|
1457
|
-
] }) }),
|
|
1497
|
+
] }) }), rl = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1458
1498
|
/* @__PURE__ */ a("path", { d: "M21 5H3" }),
|
|
1459
1499
|
/* @__PURE__ */ a("path", { d: "M21 12H9" }),
|
|
1460
1500
|
/* @__PURE__ */ a("path", { d: "M21 19H7" })
|
|
1461
|
-
] }) }),
|
|
1501
|
+
] }) }), ol = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1462
1502
|
/* @__PURE__ */ a("path", { d: "M21 5H3" }),
|
|
1463
1503
|
/* @__PURE__ */ a("path", { d: "M15 12H3" }),
|
|
1464
1504
|
/* @__PURE__ */ a("path", { d: "M17 19H3" })
|
|
1465
1505
|
] }) });
|
|
1466
|
-
var
|
|
1467
|
-
const
|
|
1506
|
+
var al = "k91gos0", il = "k91gos1";
|
|
1507
|
+
const sl = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
|
|
1468
1508
|
const o = (i) => i.preventDefault();
|
|
1469
|
-
return /* @__PURE__ */
|
|
1509
|
+
return /* @__PURE__ */ m(le.Root, { children: [
|
|
1470
1510
|
/* @__PURE__ */ a(
|
|
1471
1511
|
le.Trigger,
|
|
1472
1512
|
{
|
|
1473
|
-
render: /* @__PURE__ */ a(
|
|
1513
|
+
render: /* @__PURE__ */ a(ua, { render: /* @__PURE__ */ a(H.Button, {}), pressed: t, onPressedChange: () => n() }),
|
|
1474
1514
|
"aria-label": e,
|
|
1475
|
-
className:
|
|
1515
|
+
className: al,
|
|
1476
1516
|
onMouseDown: o,
|
|
1477
1517
|
children: r
|
|
1478
1518
|
}
|
|
1479
1519
|
),
|
|
1480
|
-
/* @__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: sl, children: /* @__PURE__ */ a(le.Popup, { className: il, children: e }) }) }) })
|
|
1481
1521
|
] });
|
|
1482
|
-
},
|
|
1522
|
+
}, ll = ({ editor: e, activeAlignment: t = "left" }) => {
|
|
1483
1523
|
const n = J();
|
|
1484
|
-
return /* @__PURE__ */
|
|
1524
|
+
return /* @__PURE__ */ m(T, { children: [
|
|
1485
1525
|
/* @__PURE__ */ a(
|
|
1486
1526
|
de,
|
|
1487
1527
|
{
|
|
1488
1528
|
label: n("graph.toolbar.textAlign.left"),
|
|
1489
1529
|
isActive: t === "left",
|
|
1490
1530
|
onToggle: () => e.chain().focus().setTextAlign("left").run(),
|
|
1491
|
-
children: /* @__PURE__ */ a(
|
|
1531
|
+
children: /* @__PURE__ */ a(ol, {})
|
|
1492
1532
|
}
|
|
1493
1533
|
),
|
|
1494
1534
|
/* @__PURE__ */ a(
|
|
@@ -1497,7 +1537,7 @@ const el = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
|
|
|
1497
1537
|
label: n("graph.toolbar.textAlign.center"),
|
|
1498
1538
|
isActive: t === "center",
|
|
1499
1539
|
onToggle: () => e.chain().focus().setTextAlign("center").run(),
|
|
1500
|
-
children: /* @__PURE__ */ a(
|
|
1540
|
+
children: /* @__PURE__ */ a(nl, {})
|
|
1501
1541
|
}
|
|
1502
1542
|
),
|
|
1503
1543
|
/* @__PURE__ */ a(
|
|
@@ -1506,13 +1546,13 @@ const el = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
|
|
|
1506
1546
|
label: n("graph.toolbar.textAlign.right"),
|
|
1507
1547
|
isActive: t === "right",
|
|
1508
1548
|
onToggle: () => e.chain().focus().setTextAlign("right").run(),
|
|
1509
|
-
children: /* @__PURE__ */ a(
|
|
1549
|
+
children: /* @__PURE__ */ a(rl, {})
|
|
1510
1550
|
}
|
|
1511
1551
|
)
|
|
1512
1552
|
] });
|
|
1513
1553
|
};
|
|
1514
|
-
var
|
|
1515
|
-
const
|
|
1554
|
+
var cl = "_1bp10ig0", ke = "_1bp10ig1", Ne = "_1bp10ig2";
|
|
1555
|
+
const dl = ({ editor: e }) => ({
|
|
1516
1556
|
isBold: e?.isActive("bold") ?? !1,
|
|
1517
1557
|
isItalic: e?.isActive("italic") ?? !1,
|
|
1518
1558
|
isUnderline: e?.isActive("underline") ?? !1,
|
|
@@ -1520,20 +1560,20 @@ const rl = ({ editor: e }) => ({
|
|
|
1520
1560
|
linkUrl: e?.getAttributes("link").href ?? null,
|
|
1521
1561
|
color: e?.getAttributes("textStyle").color ?? null,
|
|
1522
1562
|
fontFamily: e?.getAttributes("textStyle").fontFamily ?? null,
|
|
1523
|
-
fontSize:
|
|
1524
|
-
textAlign:
|
|
1525
|
-
}),
|
|
1563
|
+
fontSize: ul(e),
|
|
1564
|
+
textAlign: hl(e)
|
|
1565
|
+
}), ul = (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", hl = (e) => e ? e.isActive({ textAlign: "center" }) ? "center" : e.isActive({ textAlign: "right" }) ? "right" : "left" : "left", gl = 8, pl = 8, fl = ({ editor: e }) => {
|
|
1526
1566
|
const t = J(), [n, r] = E(!1), [o, i] = E(null), c = o !== null, l = (y) => (S) => {
|
|
1527
1567
|
i(S ? y : null);
|
|
1528
1568
|
}, { refs: d, floatingStyles: u } = xt({
|
|
1529
1569
|
placement: "top-start",
|
|
1530
1570
|
strategy: "fixed",
|
|
1531
|
-
middleware: [St(
|
|
1532
|
-
whileElementsMounted:
|
|
1533
|
-
}), h =
|
|
1571
|
+
middleware: [St(gl), kt(), Lt({ padding: pl })],
|
|
1572
|
+
whileElementsMounted: ta
|
|
1573
|
+
}), h = C(null), g = oa({
|
|
1534
1574
|
editor: e,
|
|
1535
|
-
selector:
|
|
1536
|
-
}),
|
|
1575
|
+
selector: dl
|
|
1576
|
+
}), p = mt(
|
|
1537
1577
|
(y) => {
|
|
1538
1578
|
h.current = y, d.setFloating(y);
|
|
1539
1579
|
},
|
|
@@ -1551,12 +1591,12 @@ const rl = ({ editor: e }) => ({
|
|
|
1551
1591
|
e.off("focus", y), e.off("blur", S);
|
|
1552
1592
|
};
|
|
1553
1593
|
}, [e]), !e || !n && !c) return null;
|
|
1554
|
-
const
|
|
1555
|
-
return
|
|
1556
|
-
/* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Provider, { children: /* @__PURE__ */
|
|
1557
|
-
/* @__PURE__ */
|
|
1594
|
+
const f = ie();
|
|
1595
|
+
return f ? sa(
|
|
1596
|
+
/* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Provider, { children: /* @__PURE__ */ m(H.Root, { ref: p, className: cl, style: u, children: [
|
|
1597
|
+
/* @__PURE__ */ m(H.Group, { className: ke, children: [
|
|
1558
1598
|
/* @__PURE__ */ a(
|
|
1559
|
-
|
|
1599
|
+
_s,
|
|
1560
1600
|
{
|
|
1561
1601
|
editor: e,
|
|
1562
1602
|
currentColor: g?.color ?? null,
|
|
@@ -1565,7 +1605,7 @@ const rl = ({ editor: e }) => ({
|
|
|
1565
1605
|
}
|
|
1566
1606
|
),
|
|
1567
1607
|
/* @__PURE__ */ a(
|
|
1568
|
-
|
|
1608
|
+
Gs,
|
|
1569
1609
|
{
|
|
1570
1610
|
editor: e,
|
|
1571
1611
|
currentFontFamily: g?.fontFamily ?? null,
|
|
@@ -1575,8 +1615,8 @@ const rl = ({ editor: e }) => ({
|
|
|
1575
1615
|
)
|
|
1576
1616
|
] }),
|
|
1577
1617
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1578
|
-
/* @__PURE__ */ a(H.Group, { className:
|
|
1579
|
-
|
|
1618
|
+
/* @__PURE__ */ a(H.Group, { className: ke, children: /* @__PURE__ */ a(
|
|
1619
|
+
Ws,
|
|
1580
1620
|
{
|
|
1581
1621
|
editor: e,
|
|
1582
1622
|
activeStyle: g?.fontSize ?? "text",
|
|
@@ -1585,7 +1625,7 @@ const rl = ({ editor: e }) => ({
|
|
|
1585
1625
|
}
|
|
1586
1626
|
) }),
|
|
1587
1627
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1588
|
-
/* @__PURE__ */
|
|
1628
|
+
/* @__PURE__ */ m(H.Group, { className: ke, children: [
|
|
1589
1629
|
/* @__PURE__ */ a(
|
|
1590
1630
|
de,
|
|
1591
1631
|
{
|
|
@@ -1615,10 +1655,10 @@ const rl = ({ editor: e }) => ({
|
|
|
1615
1655
|
)
|
|
1616
1656
|
] }),
|
|
1617
1657
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1618
|
-
/* @__PURE__ */ a(H.Group, { className:
|
|
1658
|
+
/* @__PURE__ */ a(H.Group, { className: ke, children: /* @__PURE__ */ a(ll, { editor: e, activeAlignment: g?.textAlign }) }),
|
|
1619
1659
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1620
|
-
/* @__PURE__ */ a(H.Group, { className:
|
|
1621
|
-
|
|
1660
|
+
/* @__PURE__ */ a(H.Group, { className: ke, children: /* @__PURE__ */ a(
|
|
1661
|
+
el,
|
|
1622
1662
|
{
|
|
1623
1663
|
editor: e,
|
|
1624
1664
|
currentUrl: g?.linkUrl ?? null,
|
|
@@ -1628,19 +1668,19 @@ const rl = ({ editor: e }) => ({
|
|
|
1628
1668
|
}
|
|
1629
1669
|
) })
|
|
1630
1670
|
] }) }) }),
|
|
1631
|
-
|
|
1671
|
+
f
|
|
1632
1672
|
) : null;
|
|
1633
1673
|
};
|
|
1634
|
-
var
|
|
1635
|
-
const
|
|
1636
|
-
/* @__PURE__ */ a(
|
|
1637
|
-
/* @__PURE__ */ a(
|
|
1638
|
-
] }),
|
|
1639
|
-
const n =
|
|
1674
|
+
var ml = "_2ngohc0";
|
|
1675
|
+
const Gr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ m("div", { className: ml, children: [
|
|
1676
|
+
/* @__PURE__ */ a(fl, { editor: e }),
|
|
1677
|
+
/* @__PURE__ */ a(aa, { editor: e, "aria-label": t })
|
|
1678
|
+
] }), vl = (e, t) => {
|
|
1679
|
+
const n = C(e);
|
|
1640
1680
|
n.current = e;
|
|
1641
|
-
const r =
|
|
1681
|
+
const r = C(t);
|
|
1642
1682
|
r.current = t;
|
|
1643
|
-
const o =
|
|
1683
|
+
const o = C(null), i = C(null), c = v(() => {
|
|
1644
1684
|
const l = () => {
|
|
1645
1685
|
i.current !== null && (clearTimeout(i.current), i.current = null), o.current = null;
|
|
1646
1686
|
}, d = () => {
|
|
@@ -1659,16 +1699,16 @@ const zr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ f("div", { className
|
|
|
1659
1699
|
return L(() => () => {
|
|
1660
1700
|
i.current !== null && clearTimeout(i.current);
|
|
1661
1701
|
}, []), c;
|
|
1662
|
-
},
|
|
1702
|
+
}, yl = 200, Wr = ({
|
|
1663
1703
|
content: e,
|
|
1664
1704
|
extensions: t,
|
|
1665
1705
|
isEditable: n,
|
|
1666
1706
|
onUpdate: r,
|
|
1667
|
-
updateDebounceMs: o =
|
|
1707
|
+
updateDebounceMs: o = yl
|
|
1668
1708
|
}) => {
|
|
1669
|
-
const i =
|
|
1709
|
+
const i = C(jt(e)), c = C(!1), l = vl((u) => {
|
|
1670
1710
|
c.current = !0, r?.(u);
|
|
1671
|
-
}, o), d =
|
|
1711
|
+
}, o), d = ia({
|
|
1672
1712
|
extensions: t,
|
|
1673
1713
|
content: i.current,
|
|
1674
1714
|
editable: n,
|
|
@@ -1683,12 +1723,12 @@ const zr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ f("div", { className
|
|
|
1683
1723
|
c.current = !1;
|
|
1684
1724
|
return;
|
|
1685
1725
|
}
|
|
1686
|
-
const u =
|
|
1687
|
-
|
|
1726
|
+
const u = jt(e), h = d.getJSON();
|
|
1727
|
+
bl(h, u) || (l.cancel(), d.commands.setContent(u, { emitUpdate: !1 }));
|
|
1688
1728
|
}, [d, e, l]), L(() => () => l.flush(), [l]), d;
|
|
1689
|
-
},
|
|
1690
|
-
var
|
|
1691
|
-
const
|
|
1729
|
+
}, jt = (e) => e === null ? { type: "doc", content: [] } : typeof e == "string" ? { type: "doc", content: [{ type: "paragraph", content: e ? [{ type: "text", text: e }] : [] }] } : e, bl = (e, t) => JSON.stringify(e) === JSON.stringify(t);
|
|
1730
|
+
var xl = "_1cocly40";
|
|
1731
|
+
const Sl = {
|
|
1692
1732
|
modern: "'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif",
|
|
1693
1733
|
timeless: "'Noto Serif', Georgia, 'Times New Roman', serif",
|
|
1694
1734
|
fresh: "'Aeonik', 'Aeonik Fallback', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
@@ -1696,22 +1736,22 @@ const pl = {
|
|
|
1696
1736
|
handwritten: "'Permanent Marker', cursive",
|
|
1697
1737
|
fineliner: "'Intruding Cat', cursive",
|
|
1698
1738
|
brand: "var(--brand-font-family), 'Aeonik', 'Inter', sans-serif"
|
|
1699
|
-
}, De = ({ content: e }) => /* @__PURE__ */ a(
|
|
1739
|
+
}, De = ({ content: e }) => /* @__PURE__ */ a(T, { children: $r(e.content ?? [e]) }), $r = (e) => e.map((t, n) => kl(t, n)), kl = (e, t) => {
|
|
1700
1740
|
if (e.type === "text")
|
|
1701
|
-
return
|
|
1741
|
+
return Ll(e, t);
|
|
1702
1742
|
if (e.type === "hardBreak" || e.type === "hard_break")
|
|
1703
1743
|
return /* @__PURE__ */ a("br", {}, t);
|
|
1704
|
-
const n = e.content ?
|
|
1744
|
+
const n = e.content ? $r(e.content) : null;
|
|
1705
1745
|
switch (e.type) {
|
|
1706
1746
|
case "doc":
|
|
1707
|
-
return /* @__PURE__ */ a(
|
|
1747
|
+
return /* @__PURE__ */ a(hn, { children: n }, t);
|
|
1708
1748
|
case "heading": {
|
|
1709
|
-
const r =
|
|
1710
|
-
return
|
|
1749
|
+
const r = Al(e.attrs?.level);
|
|
1750
|
+
return El(r, t, n, Kt(e.attrs));
|
|
1711
1751
|
}
|
|
1712
1752
|
case "paragraph": {
|
|
1713
1753
|
const r = ge(e.attrs?.variant);
|
|
1714
|
-
return /* @__PURE__ */ a("p", { "data-variant": r ?? void 0, style:
|
|
1754
|
+
return /* @__PURE__ */ a("p", { "data-variant": r ?? void 0, style: Xr(Kt(e.attrs)), children: n }, t);
|
|
1715
1755
|
}
|
|
1716
1756
|
case "blockquote":
|
|
1717
1757
|
return /* @__PURE__ */ a("blockquote", { children: n }, t);
|
|
@@ -1727,10 +1767,10 @@ const pl = {
|
|
|
1727
1767
|
default:
|
|
1728
1768
|
return /* @__PURE__ */ a("span", { children: n }, t);
|
|
1729
1769
|
}
|
|
1730
|
-
},
|
|
1770
|
+
}, Ll = (e, t) => {
|
|
1731
1771
|
const n = e.text ?? "";
|
|
1732
|
-
return !e.marks || e.marks.length === 0 ? /* @__PURE__ */ a("span", { children: n }, t) : e.marks.reduceRight((r, o, i) =>
|
|
1733
|
-
},
|
|
1772
|
+
return !e.marks || e.marks.length === 0 ? /* @__PURE__ */ a("span", { children: n }, t) : e.marks.reduceRight((r, o, i) => Cl(o, r, `${t}-${i}`), n);
|
|
1773
|
+
}, Cl = (e, t, n) => {
|
|
1734
1774
|
switch (e.type) {
|
|
1735
1775
|
case "bold":
|
|
1736
1776
|
case "strong":
|
|
@@ -1748,10 +1788,10 @@ const pl = {
|
|
|
1748
1788
|
return /* @__PURE__ */ a("code", { children: t }, n);
|
|
1749
1789
|
case "link": {
|
|
1750
1790
|
const r = ge(e.attrs?.href);
|
|
1751
|
-
return
|
|
1791
|
+
return mn(r) ? /* @__PURE__ */ a("a", { className: xl, href: r, rel: "noopener noreferrer", target: "_blank", children: t }, n) : /* @__PURE__ */ a("span", { children: t }, n);
|
|
1752
1792
|
}
|
|
1753
1793
|
case "textStyle": {
|
|
1754
|
-
const r =
|
|
1794
|
+
const r = Tl(e.attrs);
|
|
1755
1795
|
return r ? /* @__PURE__ */ a("span", { style: r, children: t }, n) : /* @__PURE__ */ a("span", { children: t }, n);
|
|
1756
1796
|
}
|
|
1757
1797
|
default:
|
|
@@ -1760,17 +1800,17 @@ const pl = {
|
|
|
1760
1800
|
}, qt = (e) => {
|
|
1761
1801
|
const t = ge(e && typeof e == "object" ? e.fontFamily : e);
|
|
1762
1802
|
if (t)
|
|
1763
|
-
return
|
|
1764
|
-
},
|
|
1803
|
+
return Sl[t] ?? t;
|
|
1804
|
+
}, Tl = (e) => {
|
|
1765
1805
|
if (!e) return null;
|
|
1766
1806
|
const t = {}, n = ge(e.color);
|
|
1767
1807
|
n && (t.color = n);
|
|
1768
1808
|
const r = qt(e.font) ?? qt(e.fontFamily);
|
|
1769
1809
|
r && (t.fontFamily = r);
|
|
1770
|
-
const o =
|
|
1810
|
+
const o = wl(e.fontSize);
|
|
1771
1811
|
return o && (t.fontSize = o), Object.keys(t).length > 0 ? t : null;
|
|
1772
|
-
},
|
|
1773
|
-
const o =
|
|
1812
|
+
}, wl = (e) => typeof e == "number" && Number.isFinite(e) ? `${e / 10}em` : ge(e), ge = (e) => typeof e == "string" && e.length > 0 ? e : void 0, Al = (e) => typeof e != "number" ? 3 : e < 1 ? 1 : e > 3 ? 3 : Math.round(e), El = (e, t, n, r) => {
|
|
1813
|
+
const o = Xr(r);
|
|
1774
1814
|
switch (e) {
|
|
1775
1815
|
case 1:
|
|
1776
1816
|
return /* @__PURE__ */ a("h1", { style: o, children: n }, t);
|
|
@@ -1779,12 +1819,12 @@ const pl = {
|
|
|
1779
1819
|
case 3:
|
|
1780
1820
|
return /* @__PURE__ */ a("h3", { style: o, children: n }, t);
|
|
1781
1821
|
}
|
|
1782
|
-
},
|
|
1822
|
+
}, Kt = (e) => {
|
|
1783
1823
|
const t = e?.textAlign;
|
|
1784
1824
|
if (t === "left" || t === "right" || t === "center" || t === "justify") return t;
|
|
1785
|
-
},
|
|
1786
|
-
var
|
|
1787
|
-
const
|
|
1825
|
+
}, Xr = (e) => e ? { textAlign: e } : void 0;
|
|
1826
|
+
var _l = "_4dlrid0", Vr = "_4dlrid1", Pl = "xfz7dq0", Hl = "xfz7dq1", Fl = "xfz7dq2", Nl = "xfz7dq3", Bl = "xfz7dq4";
|
|
1827
|
+
const Il = ({
|
|
1788
1828
|
ref: e,
|
|
1789
1829
|
footerRect: t,
|
|
1790
1830
|
mode: n = "readonly",
|
|
@@ -1793,73 +1833,73 @@ const El = ({
|
|
|
1793
1833
|
source: i,
|
|
1794
1834
|
isSourceVisible: c
|
|
1795
1835
|
}) => {
|
|
1796
|
-
const l = n === "editable", d = o && (l || r !== null), u = c && i !== null &&
|
|
1797
|
-
return !d && !u ? null : /* @__PURE__ */
|
|
1836
|
+
const l = n === "editable", d = o && (l || r !== null), u = c && i !== null && Rl(i);
|
|
1837
|
+
return !d && !u ? null : /* @__PURE__ */ m(
|
|
1798
1838
|
"div",
|
|
1799
1839
|
{
|
|
1800
1840
|
ref: e,
|
|
1801
|
-
className:
|
|
1841
|
+
className: Pl,
|
|
1802
1842
|
style: {
|
|
1803
1843
|
left: t.x,
|
|
1804
1844
|
top: t.y,
|
|
1805
1845
|
width: t.width
|
|
1806
1846
|
},
|
|
1807
1847
|
children: [
|
|
1808
|
-
d ? l ? /* @__PURE__ */ a(
|
|
1809
|
-
u && /* @__PURE__ */ a(
|
|
1848
|
+
d ? l ? /* @__PURE__ */ a(zl, { caption: r }) : /* @__PURE__ */ a(Ml, { caption: r }) : null,
|
|
1849
|
+
u && /* @__PURE__ */ a(Dl, { source: i })
|
|
1810
1850
|
]
|
|
1811
1851
|
}
|
|
1812
1852
|
);
|
|
1813
|
-
},
|
|
1814
|
-
const t =
|
|
1815
|
-
return n === "" && t === void 0 ? null : /* @__PURE__ */
|
|
1816
|
-
/* @__PURE__ */ a("span", { className:
|
|
1817
|
-
t !== void 0 ? /* @__PURE__ */ a("a", { className:
|
|
1853
|
+
}, Ml = ({ caption: e }) => e === null ? null : typeof e == "string" ? /* @__PURE__ */ a("p", { className: Vr, children: e }) : /* @__PURE__ */ a(De, { content: e }), Dl = ({ source: e }) => {
|
|
1854
|
+
const t = mn(e.url) ? e.url : void 0, n = e.label ?? (t !== void 0 ? Ol(t) : "");
|
|
1855
|
+
return n === "" && t === void 0 ? null : /* @__PURE__ */ m("div", { className: Hl, children: [
|
|
1856
|
+
/* @__PURE__ */ a("span", { className: Nl, children: "Source:" }),
|
|
1857
|
+
t !== void 0 ? /* @__PURE__ */ a("a", { className: Fl, href: t, target: "_blank", rel: "noopener noreferrer", children: n }) : /* @__PURE__ */ a("span", { className: Bl, children: n })
|
|
1818
1858
|
] });
|
|
1819
|
-
},
|
|
1859
|
+
}, Ol = (e) => {
|
|
1820
1860
|
try {
|
|
1821
1861
|
return new URL(e).hostname;
|
|
1822
1862
|
} catch {
|
|
1823
1863
|
return e;
|
|
1824
1864
|
}
|
|
1825
|
-
},
|
|
1826
|
-
const t =
|
|
1865
|
+
}, Rl = (e) => e.label !== void 0 && e.label !== "" || e.url !== void 0 && e.url !== "", zl = ({ caption: e }) => {
|
|
1866
|
+
const t = Gn(), n = v(() => ts({ placeholder: "Add caption" }), []), r = Wr({
|
|
1827
1867
|
content: e,
|
|
1828
1868
|
extensions: n,
|
|
1829
1869
|
isEditable: !0,
|
|
1830
1870
|
onUpdate: (o) => {
|
|
1831
|
-
const i =
|
|
1832
|
-
t(new
|
|
1871
|
+
const i = js(o) ? null : o;
|
|
1872
|
+
t(new Ho({ caption: i }));
|
|
1833
1873
|
}
|
|
1834
1874
|
});
|
|
1835
|
-
return /* @__PURE__ */ a(
|
|
1875
|
+
return /* @__PURE__ */ a(Gr, { editor: r, ariaLabel: "Chart caption" });
|
|
1836
1876
|
};
|
|
1837
|
-
var
|
|
1838
|
-
const
|
|
1877
|
+
var Gl = "_1k4qtbg0";
|
|
1878
|
+
const Wl = 3, $l = ({
|
|
1839
1879
|
title: e,
|
|
1840
1880
|
isTitleVisible: t,
|
|
1841
1881
|
subtitle: n,
|
|
1842
1882
|
isSubtitleVisible: r
|
|
1843
1883
|
}) => {
|
|
1844
1884
|
const o = [];
|
|
1845
|
-
return t && o.push({ type: "heading", attrs: { level:
|
|
1846
|
-
},
|
|
1885
|
+
return t && o.push({ type: "heading", attrs: { level: Wl }, content: Vl(e) }), r && o.push(...Ul(n)), { type: "doc", content: o };
|
|
1886
|
+
}, Xl = (e) => {
|
|
1847
1887
|
const t = e.content ?? [], [n, ...r] = t;
|
|
1848
1888
|
return {
|
|
1849
|
-
title:
|
|
1850
|
-
subtitle:
|
|
1889
|
+
title: Yl(n?.content ?? []),
|
|
1890
|
+
subtitle: jl(r)
|
|
1851
1891
|
};
|
|
1852
|
-
},
|
|
1892
|
+
}, Pt = (e) => ({
|
|
1853
1893
|
type: e.type ?? "text",
|
|
1854
|
-
...e.content !== void 0 ? { content: e.content.map(
|
|
1894
|
+
...e.content !== void 0 ? { content: e.content.map(Pt) } : {},
|
|
1855
1895
|
...e.text !== void 0 ? { text: e.text } : {},
|
|
1856
1896
|
...e.marks !== void 0 ? { marks: e.marks } : {},
|
|
1857
1897
|
...e.attrs !== void 0 ? { attrs: e.attrs } : {}
|
|
1858
|
-
}),
|
|
1898
|
+
}), Vl = (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 ?? [], Ul = (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] }, Yl = (e) => {
|
|
1859
1899
|
if (e.length === 0) return null;
|
|
1860
1900
|
const [t] = e;
|
|
1861
|
-
return t && e.length === 1 && t.type === "text" && (!t.marks || t.marks.length === 0) ? t.text ?? null : { type: "paragraph", content: e.map(
|
|
1862
|
-
},
|
|
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
|
+
}, jl = (e) => {
|
|
1863
1903
|
const t = e.filter((r) => (r.content ?? []).length > 0);
|
|
1864
1904
|
if (t.length === 0) return null;
|
|
1865
1905
|
const [n] = t;
|
|
@@ -1868,8 +1908,8 @@ const Il = 3, Ml = ({
|
|
|
1868
1908
|
if (o && r.length === 1 && o.type === "text" && (!o.marks || o.marks.length === 0))
|
|
1869
1909
|
return o.text ?? null;
|
|
1870
1910
|
}
|
|
1871
|
-
return { type: "doc", content: t.map(
|
|
1872
|
-
},
|
|
1911
|
+
return { type: "doc", content: t.map(Pt) };
|
|
1912
|
+
}, ql = ({
|
|
1873
1913
|
ref: e,
|
|
1874
1914
|
headerRect: t,
|
|
1875
1915
|
mode: n = "readonly",
|
|
@@ -1883,14 +1923,14 @@ const Il = 3, Ml = ({
|
|
|
1883
1923
|
"div",
|
|
1884
1924
|
{
|
|
1885
1925
|
ref: e,
|
|
1886
|
-
className:
|
|
1926
|
+
className: Gl,
|
|
1887
1927
|
style: {
|
|
1888
1928
|
left: t.x,
|
|
1889
1929
|
top: t.y,
|
|
1890
1930
|
width: t.width
|
|
1891
1931
|
},
|
|
1892
1932
|
children: l ? /* @__PURE__ */ a(
|
|
1893
|
-
|
|
1933
|
+
Jl,
|
|
1894
1934
|
{
|
|
1895
1935
|
title: r,
|
|
1896
1936
|
isTitleVisible: o,
|
|
@@ -1899,7 +1939,7 @@ const Il = 3, Ml = ({
|
|
|
1899
1939
|
},
|
|
1900
1940
|
[o ? "title" : "", c ? "subtitle" : ""].join("-")
|
|
1901
1941
|
) : /* @__PURE__ */ a(
|
|
1902
|
-
|
|
1942
|
+
Kl,
|
|
1903
1943
|
{
|
|
1904
1944
|
title: r,
|
|
1905
1945
|
isTitleVisible: o,
|
|
@@ -1909,22 +1949,22 @@ const Il = 3, Ml = ({
|
|
|
1909
1949
|
)
|
|
1910
1950
|
}
|
|
1911
1951
|
);
|
|
1912
|
-
},
|
|
1952
|
+
}, Kl = ({
|
|
1913
1953
|
title: e,
|
|
1914
1954
|
isTitleVisible: t,
|
|
1915
1955
|
isSubtitleVisible: n,
|
|
1916
1956
|
subtitle: r
|
|
1917
|
-
}) => /* @__PURE__ */
|
|
1918
|
-
t && e !== null && (typeof e == "string" ? /* @__PURE__ */ a("h1", { className:
|
|
1919
|
-
n && r !== null && (typeof r == "string" ? /* @__PURE__ */ a("p", { className:
|
|
1920
|
-
] }),
|
|
1957
|
+
}) => /* @__PURE__ */ m(T, { children: [
|
|
1958
|
+
t && e !== null && (typeof e == "string" ? /* @__PURE__ */ a("h1", { className: _l, children: e }) : /* @__PURE__ */ a(De, { content: e })),
|
|
1959
|
+
n && r !== null && (typeof r == "string" ? /* @__PURE__ */ a("p", { className: Vr, children: r }) : /* @__PURE__ */ a(De, { content: r }))
|
|
1960
|
+
] }), Jl = ({
|
|
1921
1961
|
title: e,
|
|
1922
1962
|
isTitleVisible: t,
|
|
1923
1963
|
isSubtitleVisible: n,
|
|
1924
1964
|
subtitle: r
|
|
1925
1965
|
}) => {
|
|
1926
|
-
const o =
|
|
1927
|
-
() =>
|
|
1966
|
+
const o = Gn(), i = v(
|
|
1967
|
+
() => es({
|
|
1928
1968
|
titlePlaceholder: "Untitled",
|
|
1929
1969
|
subtitlePlaceholder: "Untitled",
|
|
1930
1970
|
isTitleVisible: t,
|
|
@@ -1932,84 +1972,84 @@ const Il = 3, Ml = ({
|
|
|
1932
1972
|
}),
|
|
1933
1973
|
[t, n]
|
|
1934
1974
|
), c = v(
|
|
1935
|
-
() =>
|
|
1975
|
+
() => $l({ title: e, isTitleVisible: t, subtitle: r, isSubtitleVisible: n }),
|
|
1936
1976
|
[e, t, r, n]
|
|
1937
|
-
), l =
|
|
1977
|
+
), l = Wr({
|
|
1938
1978
|
content: c,
|
|
1939
1979
|
extensions: i,
|
|
1940
1980
|
isEditable: !0,
|
|
1941
1981
|
onUpdate: (d) => {
|
|
1942
|
-
const u =
|
|
1943
|
-
t && o(new
|
|
1982
|
+
const u = Xl(d);
|
|
1983
|
+
t && o(new Fo({ title: u.title })), n && o(new No({ subtitle: u.subtitle }));
|
|
1944
1984
|
}
|
|
1945
1985
|
});
|
|
1946
|
-
return /* @__PURE__ */ a(
|
|
1986
|
+
return /* @__PURE__ */ a(Gr, { editor: l, ariaLabel: "Chart title and subtitle" });
|
|
1947
1987
|
};
|
|
1948
|
-
var
|
|
1949
|
-
const
|
|
1988
|
+
var Zl = "_1u9qprb0", Ql = "_1u9qprb1", ec = "_9aen060", tc = "_9aen061", nc = "_9aen062", Ur = "_9aen063";
|
|
1989
|
+
const rc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1950
1990
|
__proto__: null,
|
|
1951
|
-
groupRow:
|
|
1952
|
-
item:
|
|
1953
|
-
trendRow:
|
|
1954
|
-
valueRow:
|
|
1955
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1991
|
+
groupRow: nc,
|
|
1992
|
+
item: Ur,
|
|
1993
|
+
trendRow: tc,
|
|
1994
|
+
valueRow: ec
|
|
1995
|
+
}, Symbol.toStringTag, { value: "Module" })), oc = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1956
1996
|
/* @__PURE__ */ a("path", { d: "m5 12 7-7 7 7" }),
|
|
1957
1997
|
/* @__PURE__ */ a("path", { d: "M12 19V5" })
|
|
1958
|
-
] }) }),
|
|
1959
|
-
var
|
|
1960
|
-
const
|
|
1998
|
+
] }) }), ac = (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 Yr = "n7clvo0", ic = "n7clvo1", sc = "n7clvo2", lc = "n7clvo3", jr = { small: "n7clvo4", medium: "n7clvo5", large: "n7clvo6" }, cc = { small: "n7clvo7", medium: "n7clvo8", large: "n7clvo9" }, dc = { up: "n7clvoa", down: "n7clvob", flat: "n7clvoc" }, uc = { up: "n7clvoe n7clvod", down: "n7clvof n7clvod", flat: "n7clvog n7clvod" };
|
|
2000
|
+
const hc = ({ segment: e, resolvedSize: t }) => {
|
|
1961
2001
|
if (e.kind === "swatch")
|
|
1962
2002
|
return /* @__PURE__ */ a(Ye, { shape: e.swatch.shape, color: e.swatch.color, width: e.size, height: e.size });
|
|
1963
2003
|
if (e.kind === "trendArrow")
|
|
1964
|
-
return /* @__PURE__ */ a("div", { className:
|
|
1965
|
-
const n = e.fontRole === "value" ?
|
|
1966
|
-
return /* @__PURE__ */ a("span", { className: ce(
|
|
1967
|
-
},
|
|
2004
|
+
return /* @__PURE__ */ a("div", { className: uc[e.direction], children: e.direction === "flat" ? /* @__PURE__ */ a(ac, { size: "xs", title: "" }) : /* @__PURE__ */ a(oc, { size: "xs", title: "" }) });
|
|
2005
|
+
const n = e.fontRole === "value" ? jr[t] : cc[t];
|
|
2006
|
+
return /* @__PURE__ */ a("span", { className: ce(gc(e), n), children: e.text });
|
|
2007
|
+
}, gc = (e) => {
|
|
1968
2008
|
switch (e.textRole) {
|
|
1969
2009
|
case "value":
|
|
1970
|
-
return
|
|
2010
|
+
return Yr;
|
|
1971
2011
|
case "observation":
|
|
1972
|
-
return
|
|
2012
|
+
return ic;
|
|
1973
2013
|
case "trendPercentage":
|
|
1974
|
-
return
|
|
2014
|
+
return dc[e.trendDirection ?? "up"];
|
|
1975
2015
|
case "trendReference":
|
|
1976
|
-
return
|
|
2016
|
+
return sc;
|
|
1977
2017
|
case "label":
|
|
1978
|
-
return
|
|
2018
|
+
return lc;
|
|
1979
2019
|
}
|
|
1980
|
-
},
|
|
2020
|
+
}, pc = ({ item: e, resolvedSize: t }) => /* @__PURE__ */ a("div", { className: Ur, children: fn(e).map((n) => /* @__PURE__ */ a(fc, { row: n, resolvedSize: t }, n.role)) }), fc = ({ row: e, resolvedSize: t }) => {
|
|
1981
2021
|
const n = e.role === "trendRow";
|
|
1982
2022
|
return /* @__PURE__ */ a(
|
|
1983
2023
|
"div",
|
|
1984
2024
|
{
|
|
1985
|
-
className:
|
|
2025
|
+
className: rc[e.role],
|
|
1986
2026
|
"data-testid": n ? "headline-trend" : void 0,
|
|
1987
|
-
"data-direction": n ?
|
|
2027
|
+
"data-direction": n ? mc(e) : void 0,
|
|
1988
2028
|
role: n ? "img" : void 0,
|
|
1989
2029
|
"aria-label": n ? e.ariaLabel : void 0,
|
|
1990
|
-
children: e.segments.map((r, o) => /* @__PURE__ */ a(
|
|
2030
|
+
children: e.segments.map((r, o) => /* @__PURE__ */ a(hc, { segment: r, resolvedSize: t }, o))
|
|
1991
2031
|
}
|
|
1992
2032
|
);
|
|
1993
|
-
},
|
|
2033
|
+
}, mc = (e) => {
|
|
1994
2034
|
const t = e.segments.find((n) => n.kind === "trendArrow");
|
|
1995
2035
|
return t?.kind === "trendArrow" ? t.direction : void 0;
|
|
1996
|
-
},
|
|
2036
|
+
}, vc = ({ headline: e, rect: t, resolvedSize: n, visibleItemCount: r }) => {
|
|
1997
2037
|
const o = {
|
|
1998
2038
|
left: t.x,
|
|
1999
2039
|
top: t.y,
|
|
2000
2040
|
width: t.width,
|
|
2001
2041
|
height: t.height
|
|
2002
2042
|
};
|
|
2003
|
-
return e.kind === "grandTotal" ? /* @__PURE__ */ a("div", { className:
|
|
2043
|
+
return e.kind === "grandTotal" ? /* @__PURE__ */ a("div", { className: Ql, style: o, children: /* @__PURE__ */ a("span", { className: ce(Yr, jr[n]), children: e.value }) }) : /* @__PURE__ */ a("div", { className: Zl, style: o, children: e.items.slice(0, r).map((i, c) => /* @__PURE__ */ a(pc, { item: i, resolvedSize: n }, `${i.label}-${c}`)) });
|
|
2004
2044
|
};
|
|
2005
|
-
var
|
|
2006
|
-
const
|
|
2007
|
-
const { lineBoxHeight: r } =
|
|
2045
|
+
var yc = "_1oj6yix0", bc = "_1oj6yix1", xc = "_1oj6yix2";
|
|
2046
|
+
const Sc = 8, kc = 16, Lc = 2, Cc = ({ legends: e, containerRect: t, textScale: n }) => {
|
|
2047
|
+
const { lineBoxHeight: r } = wr(n), { placements: o, hasOverlap: i } = Tc(e, t, r);
|
|
2008
2048
|
if (o.length === 0) return null;
|
|
2009
|
-
const c = i ?
|
|
2010
|
-
return /* @__PURE__ */
|
|
2011
|
-
i && /* @__PURE__ */ a("svg", { className:
|
|
2012
|
-
|
|
2049
|
+
const c = i ? kc : Sc, l = c - Lc;
|
|
2050
|
+
return /* @__PURE__ */ m("div", { className: yc, children: [
|
|
2051
|
+
i && /* @__PURE__ */ a("svg", { className: bc, width: t.width, height: t.height, children: o.map((d) => /* @__PURE__ */ a(
|
|
2052
|
+
wc,
|
|
2013
2053
|
{
|
|
2014
2054
|
anchorY: d.anchorY,
|
|
2015
2055
|
labelY: d.y,
|
|
@@ -2021,14 +2061,14 @@ const pc = 8, fc = 16, mc = 2, vc = ({ legends: e, containerRect: t, textScale:
|
|
|
2021
2061
|
o.map((d) => /* @__PURE__ */ a(
|
|
2022
2062
|
"span",
|
|
2023
2063
|
{
|
|
2024
|
-
className:
|
|
2064
|
+
className: xc,
|
|
2025
2065
|
style: { left: c, top: d.y, color: d.payload.color },
|
|
2026
2066
|
children: d.payload.label
|
|
2027
2067
|
},
|
|
2028
2068
|
d.payload.key
|
|
2029
2069
|
))
|
|
2030
2070
|
] });
|
|
2031
|
-
},
|
|
2071
|
+
}, Tc = (e, t, n) => v(() => {
|
|
2032
2072
|
const r = [];
|
|
2033
2073
|
for (const o of e)
|
|
2034
2074
|
for (const i of o.items) {
|
|
@@ -2039,12 +2079,12 @@ const pc = 8, fc = 16, mc = 2, vc = ({ legends: e, containerRect: t, textScale:
|
|
|
2039
2079
|
payload: { key: String(r.length), label: i.formattedLabel, color: c }
|
|
2040
2080
|
});
|
|
2041
2081
|
}
|
|
2042
|
-
return r.length === 0 || t.height <= 0 ? { placements: [], hasOverlap: !1 } :
|
|
2082
|
+
return r.length === 0 || t.height <= 0 ? { placements: [], hasOverlap: !1 } : Bo({
|
|
2043
2083
|
items: r,
|
|
2044
2084
|
containerHeight: t.height,
|
|
2045
2085
|
labelHeight: n
|
|
2046
2086
|
});
|
|
2047
|
-
}, [e, t.height, n]),
|
|
2087
|
+
}, [e, t.height, n]), wc = ({ anchorY: e, labelY: t, endX: n, color: r }) => {
|
|
2048
2088
|
const o = n / 2;
|
|
2049
2089
|
return /* @__PURE__ */ a(
|
|
2050
2090
|
"path",
|
|
@@ -2057,9 +2097,9 @@ const pc = 8, fc = 16, mc = 2, vc = ({ legends: e, containerRect: t, textScale:
|
|
|
2057
2097
|
}
|
|
2058
2098
|
);
|
|
2059
2099
|
};
|
|
2060
|
-
var
|
|
2061
|
-
const
|
|
2062
|
-
class
|
|
2100
|
+
var Ac = "_6a636s0";
|
|
2101
|
+
const Ec = /\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu, qr = "😀";
|
|
2102
|
+
class Ht {
|
|
2063
2103
|
constructor() {
|
|
2064
2104
|
this.emojiCorrections = /* @__PURE__ */ new Map(), this.currentFont = "";
|
|
2065
2105
|
const n = new OffscreenCanvas(1, 1).getContext("2d");
|
|
@@ -2078,14 +2118,14 @@ class Pt {
|
|
|
2078
2118
|
* Note: document.fonts.ready still resolves even if some fonts fail to load.
|
|
2079
2119
|
*/
|
|
2080
2120
|
static async create() {
|
|
2081
|
-
return typeof document < "u" && "fonts" in document && await document.fonts.ready, new
|
|
2121
|
+
return typeof document < "u" && "fonts" in document && await document.fonts.ready, new Ht();
|
|
2082
2122
|
}
|
|
2083
2123
|
measureText(t, n) {
|
|
2084
|
-
const r =
|
|
2124
|
+
const r = Io(n);
|
|
2085
2125
|
this.setFont(r);
|
|
2086
2126
|
const { width: o, fontBoundingBoxAscent: i, fontBoundingBoxDescent: c } = this.ctx.measureText(t);
|
|
2087
2127
|
let l = o;
|
|
2088
|
-
const d =
|
|
2128
|
+
const d = _c(t);
|
|
2089
2129
|
if (d > 0) {
|
|
2090
2130
|
const u = this.getEmojiCorrection(r);
|
|
2091
2131
|
l -= u * d;
|
|
@@ -2113,7 +2153,7 @@ class Pt {
|
|
|
2113
2153
|
const n = this.emojiCorrections.get(t);
|
|
2114
2154
|
if (n !== void 0) return n;
|
|
2115
2155
|
this.setFont(t);
|
|
2116
|
-
const r = this.ctx.measureText(qr).width, o =
|
|
2156
|
+
const r = this.ctx.measureText(qr).width, o = Pc(t);
|
|
2117
2157
|
let i = 0;
|
|
2118
2158
|
if (o !== null) {
|
|
2119
2159
|
const c = r - o;
|
|
@@ -2122,20 +2162,20 @@ class Pt {
|
|
|
2122
2162
|
return this.emojiCorrections.set(t, i), i;
|
|
2123
2163
|
}
|
|
2124
2164
|
}
|
|
2125
|
-
let
|
|
2126
|
-
const
|
|
2127
|
-
const t = e.match(
|
|
2165
|
+
let q = null;
|
|
2166
|
+
const _c = (e) => {
|
|
2167
|
+
const t = e.match(Ec);
|
|
2128
2168
|
return t ? t.length : 0;
|
|
2129
|
-
},
|
|
2130
|
-
const t =
|
|
2169
|
+
}, Pc = (e) => {
|
|
2170
|
+
const t = Hc();
|
|
2131
2171
|
return t ? (t.style.font = e, t.getBoundingClientRect().width) : null;
|
|
2132
|
-
},
|
|
2172
|
+
}, Hc = () => 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 = qr, document.body.appendChild(q)), q), Kr = fe(null), Fc = ({ children: e, measurer: t }) => {
|
|
2133
2173
|
const [n, r] = E(null);
|
|
2134
2174
|
L(() => {
|
|
2135
2175
|
if (t !== void 0) return;
|
|
2136
2176
|
let i = !1;
|
|
2137
2177
|
const c = () => {
|
|
2138
|
-
i || r(
|
|
2178
|
+
i || r(Nc());
|
|
2139
2179
|
};
|
|
2140
2180
|
return (async () => {
|
|
2141
2181
|
typeof document < "u" && "fonts" in document && await document.fonts.ready, c();
|
|
@@ -2144,21 +2184,21 @@ const kc = (e) => {
|
|
|
2144
2184
|
};
|
|
2145
2185
|
}, [t]);
|
|
2146
2186
|
const o = t ?? n;
|
|
2147
|
-
return o === null ? null : /* @__PURE__ */ a(
|
|
2187
|
+
return o === null ? null : /* @__PURE__ */ a(Kr.Provider, { value: o, children: e });
|
|
2148
2188
|
}, ve = () => {
|
|
2149
|
-
const e =
|
|
2189
|
+
const e = ee(Kr);
|
|
2150
2190
|
if (e === null)
|
|
2151
2191
|
throw new Error("useTextMeasurer must be used inside a <TextMeasurerProvider>.");
|
|
2152
2192
|
return e;
|
|
2153
|
-
},
|
|
2193
|
+
}, Nc = () => {
|
|
2154
2194
|
try {
|
|
2155
|
-
return new
|
|
2195
|
+
return new It(new Ht());
|
|
2156
2196
|
} catch {
|
|
2157
|
-
return new
|
|
2197
|
+
return new It(new Mo());
|
|
2158
2198
|
}
|
|
2159
2199
|
};
|
|
2160
|
-
var
|
|
2161
|
-
const
|
|
2200
|
+
var Bc = "_1kjk02r0", Ic = "_1kjk02r1", Mc = "_1kjk02r2", Dc = "_1kjk02r3", Oc = "_1kjk02r4", Rc = "_1kjk02r5", zc = "_1kjk02r6", Gc = "_1kjk02r7", Wc = "_1kjk02r8", $c = "_1kjk02r9", Xc = "_1kjk02ra", Vc = "_1kjk02rb", Uc = "_1dw9dgx0";
|
|
2201
|
+
const Yc = "#9ca3af", nt = "\0", jc = (e) => {
|
|
2162
2202
|
const t = [];
|
|
2163
2203
|
return e.forEach((n, r) => {
|
|
2164
2204
|
const o = n.aesthetics.includes("size");
|
|
@@ -2178,29 +2218,29 @@ const zc = "#9ca3af", nt = "\0", Gc = (e) => {
|
|
|
2178
2218
|
});
|
|
2179
2219
|
}
|
|
2180
2220
|
}), t;
|
|
2181
|
-
},
|
|
2182
|
-
const { legendSwatchWidth: r, legendSwatchHeight: o } =
|
|
2221
|
+
}, Jr = ({ pill: e }) => e.isBubble ? /* @__PURE__ */ a(Jc, { pill: e }) : /* @__PURE__ */ a(Kc, { pill: e }), qc = ({ color: e, lineType: t, shape: n }) => {
|
|
2222
|
+
const { legendSwatchWidth: r, legendSwatchHeight: o } = wt();
|
|
2183
2223
|
return e ? /* @__PURE__ */ a(Ye, { shape: n, color: e, lineType: t, width: r, height: o }) : null;
|
|
2184
|
-
},
|
|
2185
|
-
/* @__PURE__ */ a(
|
|
2224
|
+
}, Kc = ({ pill: e }) => /* @__PURE__ */ m(T, { children: [
|
|
2225
|
+
/* @__PURE__ */ a(qc, { color: e.visual.color, lineType: e.primaryLineType, shape: e.swatchShape }),
|
|
2186
2226
|
/* @__PURE__ */ a("span", { children: e.formattedLabel })
|
|
2187
|
-
] }),
|
|
2227
|
+
] }), Jc = ({ pill: e }) => {
|
|
2188
2228
|
const t = Number(e.visual.size);
|
|
2189
|
-
return /* @__PURE__ */
|
|
2229
|
+
return /* @__PURE__ */ m(T, { children: [
|
|
2190
2230
|
/* @__PURE__ */ a(
|
|
2191
2231
|
"span",
|
|
2192
2232
|
{
|
|
2193
|
-
className:
|
|
2233
|
+
className: Uc,
|
|
2194
2234
|
style: {
|
|
2195
2235
|
width: t,
|
|
2196
2236
|
height: t,
|
|
2197
|
-
backgroundColor: e.visual.color ??
|
|
2237
|
+
backgroundColor: e.visual.color ?? Yc
|
|
2198
2238
|
}
|
|
2199
2239
|
}
|
|
2200
2240
|
),
|
|
2201
2241
|
/* @__PURE__ */ a("span", { children: e.formattedLabel })
|
|
2202
2242
|
] });
|
|
2203
|
-
},
|
|
2243
|
+
}, Zc = ({ hiddenPills: e, placement: t }) => {
|
|
2204
2244
|
const n = J(), [r, o] = E(!1), { refs: i, floatingStyles: c } = xt({
|
|
2205
2245
|
open: r,
|
|
2206
2246
|
placement: t,
|
|
@@ -2208,37 +2248,37 @@ const zc = "#9ca3af", nt = "\0", Gc = (e) => {
|
|
|
2208
2248
|
});
|
|
2209
2249
|
L(() => {
|
|
2210
2250
|
if (!r) return;
|
|
2211
|
-
const h = (
|
|
2212
|
-
const
|
|
2213
|
-
if (!
|
|
2251
|
+
const h = (p) => {
|
|
2252
|
+
const f = p.target;
|
|
2253
|
+
if (!f) return;
|
|
2214
2254
|
const y = i.reference.current, S = i.floating.current;
|
|
2215
|
-
y instanceof Element && y.contains(
|
|
2216
|
-
}, g = (
|
|
2217
|
-
|
|
2255
|
+
y instanceof Element && y.contains(f) || S instanceof Element && S.contains(f) || o(!1);
|
|
2256
|
+
}, g = (p) => {
|
|
2257
|
+
p.key === "Escape" && o(!1);
|
|
2218
2258
|
};
|
|
2219
2259
|
return document.addEventListener("pointerdown", h), document.addEventListener("keydown", g), () => {
|
|
2220
2260
|
document.removeEventListener("pointerdown", h), document.removeEventListener("keydown", g);
|
|
2221
2261
|
};
|
|
2222
2262
|
}, [r, i.floating, i.reference]);
|
|
2223
|
-
const l = t === "left" || t === "right", d = Math.min(e.length - 1,
|
|
2224
|
-
return /* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
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(T, { children: [
|
|
2265
|
+
/* @__PURE__ */ m(
|
|
2226
2266
|
"div",
|
|
2227
2267
|
{
|
|
2228
2268
|
ref: i.setReference,
|
|
2229
|
-
className: ce(
|
|
2230
|
-
[
|
|
2231
|
-
[
|
|
2269
|
+
className: ce(Bc, {
|
|
2270
|
+
[Mc]: l,
|
|
2271
|
+
[Ic]: !l
|
|
2232
2272
|
}),
|
|
2233
2273
|
children: [
|
|
2234
2274
|
u.map((h) => /* @__PURE__ */ a(
|
|
2235
2275
|
"span",
|
|
2236
2276
|
{
|
|
2237
|
-
className: ce(
|
|
2238
|
-
[
|
|
2239
|
-
[
|
|
2277
|
+
className: ce(Dc, {
|
|
2278
|
+
[Rc]: l,
|
|
2279
|
+
[Oc]: !l
|
|
2240
2280
|
}),
|
|
2241
|
-
style:
|
|
2281
|
+
style: Qc(h, l),
|
|
2242
2282
|
"aria-hidden": !0
|
|
2243
2283
|
},
|
|
2244
2284
|
h
|
|
@@ -2247,12 +2287,12 @@ const zc = "#9ca3af", nt = "\0", Gc = (e) => {
|
|
|
2247
2287
|
"button",
|
|
2248
2288
|
{
|
|
2249
2289
|
type: "button",
|
|
2250
|
-
className: ce(
|
|
2290
|
+
className: ce(zc, { [Gc]: r }),
|
|
2251
2291
|
onClick: () => o((h) => !h),
|
|
2252
2292
|
"aria-haspopup": "dialog",
|
|
2253
2293
|
"aria-expanded": r,
|
|
2254
2294
|
"aria-label": `Show ${e.length} hidden legend ${e.length === 1 ? "item" : "items"}`,
|
|
2255
|
-
children: /* @__PURE__ */
|
|
2295
|
+
children: /* @__PURE__ */ m("span", { className: Wc, children: [
|
|
2256
2296
|
"+",
|
|
2257
2297
|
e.length
|
|
2258
2298
|
] })
|
|
@@ -2267,43 +2307,43 @@ const zc = "#9ca3af", nt = "\0", Gc = (e) => {
|
|
|
2267
2307
|
ref: i.setFloating,
|
|
2268
2308
|
role: "dialog",
|
|
2269
2309
|
"aria-label": n("graph.legend.hiddenItems"),
|
|
2270
|
-
className:
|
|
2310
|
+
className: $c,
|
|
2271
2311
|
style: c,
|
|
2272
|
-
children: /* @__PURE__ */ a("ul", { className:
|
|
2312
|
+
children: /* @__PURE__ */ a("ul", { className: Xc, children: e.map((h) => /* @__PURE__ */ a("li", { className: Vc, children: /* @__PURE__ */ a(Jr, { pill: h }) }, h.key)) })
|
|
2273
2313
|
}
|
|
2274
2314
|
)
|
|
2275
2315
|
] });
|
|
2276
|
-
},
|
|
2277
|
-
const n = -e *
|
|
2316
|
+
}, Qc = (e, t) => {
|
|
2317
|
+
const n = -e * sr;
|
|
2278
2318
|
return { transform: t ? `translateY(${n}px)` : `translateX(${n}px)` };
|
|
2279
2319
|
};
|
|
2280
|
-
var
|
|
2281
|
-
const
|
|
2320
|
+
var ed = "_1cecisi0", td = "_1cecisi1", nd = "_1cecisi2", rd = "_1cecisi3";
|
|
2321
|
+
const od = ({
|
|
2282
2322
|
edge: e,
|
|
2283
2323
|
formattedLegends: t,
|
|
2284
2324
|
containerWidth: n,
|
|
2285
2325
|
containerHeight: r,
|
|
2286
2326
|
textScale: o
|
|
2287
2327
|
}) => {
|
|
2288
|
-
const i = ve(), c =
|
|
2328
|
+
const i = ve(), c = wt(), l = v(() => jc(t), [t]), d = e === "left" || e === "right", u = d ? r : n, h = v(() => {
|
|
2289
2329
|
if (l.length === 0) return { visibleCount: 0, hasOverflow: !1 };
|
|
2290
2330
|
if (u <= 0) return { visibleCount: l.length, hasOverflow: !1 };
|
|
2291
|
-
const y =
|
|
2292
|
-
label:
|
|
2293
|
-
swatchInlineSize:
|
|
2331
|
+
const y = te(lr, o), S = { family: dr, size: y }, k = y * cr, w = (V) => d ? ad(V, k, c) : Zt({
|
|
2332
|
+
label: V.formattedLabel,
|
|
2333
|
+
swatchInlineSize: id(V, c.legendSwatchWidth),
|
|
2294
2334
|
textMeasurer: i,
|
|
2295
2335
|
font: S,
|
|
2296
2336
|
swatchGap: c.legendSwatchGap,
|
|
2297
2337
|
horizontalChrome: c.legendPillHorizontalChrome
|
|
2298
|
-
}), A = l.map(w), _ = (d ? k + c.legendPillVerticalChrome :
|
|
2338
|
+
}), A = l.map(w), _ = (d ? k + c.legendPillVerticalChrome : Zt({
|
|
2299
2339
|
label: `+${l.length}`,
|
|
2300
2340
|
swatchInlineSize: 0,
|
|
2301
2341
|
textMeasurer: i,
|
|
2302
2342
|
font: S,
|
|
2303
2343
|
swatchGap: c.legendSwatchGap,
|
|
2304
2344
|
horizontalChrome: c.legendPillHorizontalChrome
|
|
2305
|
-
})) +
|
|
2306
|
-
return
|
|
2345
|
+
})) + ki;
|
|
2346
|
+
return ld({
|
|
2307
2347
|
pillSizes: A,
|
|
2308
2348
|
overflowPillSize: _,
|
|
2309
2349
|
containerSize: u,
|
|
@@ -2311,21 +2351,21 @@ const Jc = ({
|
|
|
2311
2351
|
});
|
|
2312
2352
|
}, [l, u, d, i, o, c]);
|
|
2313
2353
|
if (l.length === 0) return null;
|
|
2314
|
-
const g = l.slice(0, h.visibleCount),
|
|
2315
|
-
return /* @__PURE__ */
|
|
2354
|
+
const g = l.slice(0, h.visibleCount), p = l.slice(h.visibleCount), f = h.hasOverflow && p.length > 0;
|
|
2355
|
+
return /* @__PURE__ */ m(
|
|
2316
2356
|
"div",
|
|
2317
2357
|
{
|
|
2318
|
-
className: ce(
|
|
2319
|
-
[
|
|
2320
|
-
[
|
|
2358
|
+
className: ce(ed, {
|
|
2359
|
+
[nd]: d,
|
|
2360
|
+
[td]: !d
|
|
2321
2361
|
}),
|
|
2322
2362
|
children: [
|
|
2323
|
-
g.map((y) => /* @__PURE__ */ a("div", { className:
|
|
2324
|
-
|
|
2363
|
+
g.map((y) => /* @__PURE__ */ a("div", { className: rd, children: /* @__PURE__ */ a(Jr, { pill: y }) }, y.key)),
|
|
2364
|
+
f && /* @__PURE__ */ a(Zc, { hiddenPills: p, placement: cd(e) })
|
|
2325
2365
|
]
|
|
2326
2366
|
}
|
|
2327
2367
|
);
|
|
2328
|
-
},
|
|
2368
|
+
}, Zt = ({
|
|
2329
2369
|
label: e,
|
|
2330
2370
|
swatchInlineSize: t,
|
|
2331
2371
|
textMeasurer: n,
|
|
@@ -2335,10 +2375,10 @@ const Jc = ({
|
|
|
2335
2375
|
}) => {
|
|
2336
2376
|
const c = n.measureText(e, r).width, l = t > 0 ? o : 0;
|
|
2337
2377
|
return t + l + c + i;
|
|
2338
|
-
},
|
|
2339
|
-
const r =
|
|
2378
|
+
}, ad = (e, t, n) => {
|
|
2379
|
+
const r = sd(e, n.legendSwatchHeight);
|
|
2340
2380
|
return Math.max(t, r) + n.legendPillVerticalChrome;
|
|
2341
|
-
},
|
|
2381
|
+
}, id = (e, t) => e.isBubble ? Number(e.visual.size) : Ar(e.visual.color, t), sd = (e, t) => e.isBubble ? Number(e.visual.size) : t, ld = ({
|
|
2342
2382
|
pillSizes: e,
|
|
2343
2383
|
overflowPillSize: t,
|
|
2344
2384
|
containerSize: n,
|
|
@@ -2357,7 +2397,7 @@ const Jc = ({
|
|
|
2357
2397
|
i = d, c += 1;
|
|
2358
2398
|
}
|
|
2359
2399
|
return { visibleCount: c, hasOverflow: !0 };
|
|
2360
|
-
},
|
|
2400
|
+
}, cd = (e) => {
|
|
2361
2401
|
switch (e) {
|
|
2362
2402
|
case "top":
|
|
2363
2403
|
return "bottom";
|
|
@@ -2368,7 +2408,7 @@ const Jc = ({
|
|
|
2368
2408
|
case "right":
|
|
2369
2409
|
return "left";
|
|
2370
2410
|
}
|
|
2371
|
-
},
|
|
2411
|
+
}, dd = oe(function({ formattedLegends: t, rects: n, textScale: r }) {
|
|
2372
2412
|
const o = v(() => {
|
|
2373
2413
|
const i = /* @__PURE__ */ new Map();
|
|
2374
2414
|
for (const c of t) {
|
|
@@ -2377,12 +2417,12 @@ const Jc = ({
|
|
|
2377
2417
|
}
|
|
2378
2418
|
return i;
|
|
2379
2419
|
}, [t]);
|
|
2380
|
-
return /* @__PURE__ */ a(
|
|
2420
|
+
return /* @__PURE__ */ a(T, { children: Array.from(o, ([i, c]) => {
|
|
2381
2421
|
const l = n[i];
|
|
2382
|
-
return l === void 0 ? null : /* @__PURE__ */
|
|
2422
|
+
return l === void 0 ? null : /* @__PURE__ */ m(
|
|
2383
2423
|
"div",
|
|
2384
2424
|
{
|
|
2385
|
-
className:
|
|
2425
|
+
className: Ac,
|
|
2386
2426
|
style: {
|
|
2387
2427
|
left: l.x,
|
|
2388
2428
|
top: l.y,
|
|
@@ -2391,7 +2431,7 @@ const Jc = ({
|
|
|
2391
2431
|
},
|
|
2392
2432
|
children: [
|
|
2393
2433
|
/* @__PURE__ */ a(
|
|
2394
|
-
|
|
2434
|
+
od,
|
|
2395
2435
|
{
|
|
2396
2436
|
edge: i,
|
|
2397
2437
|
formattedLegends: c.pill,
|
|
@@ -2400,17 +2440,17 @@ const Jc = ({
|
|
|
2400
2440
|
textScale: r
|
|
2401
2441
|
}
|
|
2402
2442
|
),
|
|
2403
|
-
/* @__PURE__ */ a(
|
|
2443
|
+
/* @__PURE__ */ a(Cc, { legends: c.direct, containerRect: l, textScale: r })
|
|
2404
2444
|
]
|
|
2405
2445
|
},
|
|
2406
2446
|
i
|
|
2407
2447
|
);
|
|
2408
2448
|
}) });
|
|
2409
2449
|
});
|
|
2410
|
-
const
|
|
2450
|
+
const Ft = 1, Zr = 8, ud = 12;
|
|
2411
2451
|
s.pointStrokeColor;
|
|
2412
|
-
const
|
|
2413
|
-
const t = z(e.observation), n = (
|
|
2452
|
+
const hd = 1, gd = 2, pd = 0.7, pe = ({ hit: e }) => {
|
|
2453
|
+
const t = z(e.observation), n = (X(e.observation) ?? Ft) * pd, r = (Re(e.observation) ?? Zr) / 2;
|
|
2414
2454
|
return /* @__PURE__ */ a(
|
|
2415
2455
|
"circle",
|
|
2416
2456
|
{
|
|
@@ -2420,20 +2460,20 @@ const ad = 1, id = 2, sd = 0.7, pe = ({ hit: e }) => {
|
|
|
2420
2460
|
fill: t,
|
|
2421
2461
|
opacity: n,
|
|
2422
2462
|
stroke: s.hoveredPointRingColor,
|
|
2423
|
-
strokeWidth:
|
|
2463
|
+
strokeWidth: gd,
|
|
2424
2464
|
"data-testid": "companion-point"
|
|
2425
2465
|
}
|
|
2426
2466
|
);
|
|
2427
|
-
},
|
|
2467
|
+
}, Qr = 0.3, eo = 1, O = {
|
|
2428
2468
|
type: "spring",
|
|
2429
2469
|
stiffness: 500,
|
|
2430
2470
|
damping: 60,
|
|
2431
2471
|
mass: 1
|
|
2432
2472
|
}, pt = (e, t) => {
|
|
2433
|
-
const n =
|
|
2473
|
+
const n = wn(e);
|
|
2434
2474
|
return L(() => {
|
|
2435
|
-
const r =
|
|
2436
|
-
|
|
2475
|
+
const r = ha(n.get(), e);
|
|
2476
|
+
Zo(0, 1, {
|
|
2437
2477
|
...t,
|
|
2438
2478
|
onUpdate: (o) => {
|
|
2439
2479
|
const i = r(o);
|
|
@@ -2443,30 +2483,30 @@ const ad = 1, id = 2, sd = 0.7, pe = ({ hit: e }) => {
|
|
|
2443
2483
|
}, [t, e, n]), n;
|
|
2444
2484
|
};
|
|
2445
2485
|
var ye = "_1d8mpa10";
|
|
2446
|
-
const
|
|
2486
|
+
const fd = oe(function({
|
|
2447
2487
|
layer: t,
|
|
2448
2488
|
coordSystem: n,
|
|
2449
2489
|
isAnimated: r
|
|
2450
2490
|
}) {
|
|
2451
2491
|
const { lineGenerator: o, areaGenerator: i } = v(
|
|
2452
|
-
() =>
|
|
2492
|
+
() => vn(n, t.params),
|
|
2453
2493
|
[t.params, n]
|
|
2454
2494
|
), c = v(() => {
|
|
2455
2495
|
const l = We(t.data, t.mapping, t.id), d = [];
|
|
2456
|
-
return t.data.groupBy(
|
|
2457
|
-
const h =
|
|
2458
|
-
if (!g || !
|
|
2459
|
-
const
|
|
2460
|
-
if (!
|
|
2461
|
-
const y = z(
|
|
2496
|
+
return t.data.groupBy(Ae.group).forEach((u) => {
|
|
2497
|
+
const h = yn([...u], t.params.missingValues), g = i(h), p = o(h);
|
|
2498
|
+
if (!g || !p) return;
|
|
2499
|
+
const f = h[0];
|
|
2500
|
+
if (!f) return;
|
|
2501
|
+
const y = z(f), S = X(f), k = $e(f, t.params), w = Xe(Ve(f));
|
|
2462
2502
|
d.push({
|
|
2463
|
-
key: l(
|
|
2503
|
+
key: l(f),
|
|
2464
2504
|
areaPath: g,
|
|
2465
|
-
linePath:
|
|
2505
|
+
linePath: p,
|
|
2466
2506
|
color: y,
|
|
2467
|
-
fillOpacity: S ??
|
|
2507
|
+
fillOpacity: S ?? Qr,
|
|
2468
2508
|
strokeWidth: k,
|
|
2469
|
-
strokeOpacity:
|
|
2509
|
+
strokeOpacity: eo,
|
|
2470
2510
|
strokeDasharray: w
|
|
2471
2511
|
});
|
|
2472
2512
|
}), d;
|
|
@@ -2481,7 +2521,7 @@ const ld = oe(function({
|
|
|
2481
2521
|
"data-geom": "area",
|
|
2482
2522
|
className: ye,
|
|
2483
2523
|
children: c.map((l) => /* @__PURE__ */ a(
|
|
2484
|
-
|
|
2524
|
+
md,
|
|
2485
2525
|
{
|
|
2486
2526
|
areaPath: l.areaPath,
|
|
2487
2527
|
linePath: l.linePath,
|
|
@@ -2496,7 +2536,7 @@ const ld = oe(function({
|
|
|
2496
2536
|
))
|
|
2497
2537
|
}
|
|
2498
2538
|
);
|
|
2499
|
-
}),
|
|
2539
|
+
}), md = ({
|
|
2500
2540
|
areaPath: e,
|
|
2501
2541
|
linePath: t,
|
|
2502
2542
|
color: n,
|
|
@@ -2506,7 +2546,7 @@ const ld = oe(function({
|
|
|
2506
2546
|
strokeDasharray: c,
|
|
2507
2547
|
isAnimated: l
|
|
2508
2548
|
}) => l ? /* @__PURE__ */ a(
|
|
2509
|
-
|
|
2549
|
+
vd,
|
|
2510
2550
|
{
|
|
2511
2551
|
areaPath: e,
|
|
2512
2552
|
linePath: t,
|
|
@@ -2516,7 +2556,7 @@ const ld = oe(function({
|
|
|
2516
2556
|
strokeOpacity: i,
|
|
2517
2557
|
strokeDasharray: c
|
|
2518
2558
|
}
|
|
2519
|
-
) : /* @__PURE__ */
|
|
2559
|
+
) : /* @__PURE__ */ m("g", { children: [
|
|
2520
2560
|
/* @__PURE__ */ a("path", { d: e, fill: n, fillOpacity: r, stroke: "none" }),
|
|
2521
2561
|
/* @__PURE__ */ a(
|
|
2522
2562
|
"path",
|
|
@@ -2530,7 +2570,7 @@ const ld = oe(function({
|
|
|
2530
2570
|
vectorEffect: "non-scaling-stroke"
|
|
2531
2571
|
}
|
|
2532
2572
|
)
|
|
2533
|
-
] }),
|
|
2573
|
+
] }), vd = ({
|
|
2534
2574
|
areaPath: e,
|
|
2535
2575
|
linePath: t,
|
|
2536
2576
|
color: n,
|
|
@@ -2540,7 +2580,7 @@ const ld = oe(function({
|
|
|
2540
2580
|
strokeDasharray: c
|
|
2541
2581
|
}) => {
|
|
2542
2582
|
const l = pt(e, O), d = pt(t, O);
|
|
2543
|
-
return /* @__PURE__ */
|
|
2583
|
+
return /* @__PURE__ */ m("g", { children: [
|
|
2544
2584
|
/* @__PURE__ */ a(Y.path, { d: l, fill: n, fillOpacity: r, stroke: "none" }),
|
|
2545
2585
|
/* @__PURE__ */ a(
|
|
2546
2586
|
Y.path,
|
|
@@ -2556,10 +2596,10 @@ const ld = oe(function({
|
|
|
2556
2596
|
)
|
|
2557
2597
|
] });
|
|
2558
2598
|
};
|
|
2559
|
-
var
|
|
2560
|
-
const rt = 1,
|
|
2561
|
-
const n =
|
|
2562
|
-
return /* @__PURE__ */
|
|
2599
|
+
var yd = "_46ebsf0";
|
|
2600
|
+
const rt = 1, bd = 2, xd = 1, Sd = ud / 2, kd = 2.25, Nt = ({ hit: e, ...t }) => {
|
|
2601
|
+
const n = Ld(e.observation), r = z(e.observation), o = X(e.observation) ?? Ft, i = x(Ge(e.x)), c = x(ze(e.y)), d = n + rt / 2 + xd + rt / 2;
|
|
2602
|
+
return /* @__PURE__ */ m("g", { ...t, className: yd, children: [
|
|
2563
2603
|
/* @__PURE__ */ a(
|
|
2564
2604
|
"circle",
|
|
2565
2605
|
{
|
|
@@ -2568,7 +2608,7 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2568
2608
|
r: d,
|
|
2569
2609
|
fill: "none",
|
|
2570
2610
|
stroke: s.hoveredPointRingColor,
|
|
2571
|
-
strokeWidth:
|
|
2611
|
+
strokeWidth: bd
|
|
2572
2612
|
}
|
|
2573
2613
|
),
|
|
2574
2614
|
/* @__PURE__ */ a(
|
|
@@ -2584,24 +2624,24 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2584
2624
|
}
|
|
2585
2625
|
)
|
|
2586
2626
|
] });
|
|
2587
|
-
},
|
|
2627
|
+
}, Ld = (e) => {
|
|
2588
2628
|
const t = Re(e);
|
|
2589
|
-
return
|
|
2590
|
-
},
|
|
2591
|
-
const o =
|
|
2592
|
-
const
|
|
2593
|
-
return
|
|
2629
|
+
return bn(t) ? t / kd : Sd;
|
|
2630
|
+
}, Cd = ({ layer: e, coordSystem: t, primary: n, companions: r }) => {
|
|
2631
|
+
const o = xn(n.observation), i = v(() => {
|
|
2632
|
+
const p = e.data.filter(Ae.group, "eq", o);
|
|
2633
|
+
return yn([...p], e.params.missingValues);
|
|
2594
2634
|
}, [e.data, e.params.missingValues, o]), { areaPath: c, linePath: l } = v(() => {
|
|
2595
|
-
const { lineGenerator:
|
|
2635
|
+
const { lineGenerator: p, areaGenerator: f } = vn(t, e.params);
|
|
2596
2636
|
return {
|
|
2597
|
-
areaPath:
|
|
2598
|
-
linePath:
|
|
2637
|
+
areaPath: f(i) ?? "",
|
|
2638
|
+
linePath: p(i) ?? ""
|
|
2599
2639
|
};
|
|
2600
2640
|
}, [t, e.params, i]);
|
|
2601
2641
|
if (!c || !l) return null;
|
|
2602
|
-
const d = z(n.observation), u =
|
|
2603
|
-
return /* @__PURE__ */
|
|
2604
|
-
/* @__PURE__ */
|
|
2642
|
+
const d = z(n.observation), u = X(n.observation) ?? Qr, h = $e(n.observation, e.params), g = Xe(Ve(n.observation));
|
|
2643
|
+
return /* @__PURE__ */ m("g", { "data-testid": "hovered-area", children: [
|
|
2644
|
+
/* @__PURE__ */ m(
|
|
2605
2645
|
"svg",
|
|
2606
2646
|
{
|
|
2607
2647
|
viewBox: "0 0 1 1",
|
|
@@ -2619,7 +2659,7 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2619
2659
|
fill: "none",
|
|
2620
2660
|
stroke: d,
|
|
2621
2661
|
strokeWidth: h,
|
|
2622
|
-
strokeOpacity:
|
|
2662
|
+
strokeOpacity: eo,
|
|
2623
2663
|
strokeDasharray: g,
|
|
2624
2664
|
vectorEffect: "non-scaling-stroke",
|
|
2625
2665
|
"data-testid": "hovered-area-edge"
|
|
@@ -2628,25 +2668,25 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2628
2668
|
]
|
|
2629
2669
|
}
|
|
2630
2670
|
),
|
|
2631
|
-
r.map((
|
|
2632
|
-
/* @__PURE__ */ a(
|
|
2671
|
+
r.map((p) => /* @__PURE__ */ a(pe, { hit: p }, `companion-${p.layerId}-${p.pointIndex}`)),
|
|
2672
|
+
/* @__PURE__ */ a(Nt, { hit: n, "data-testid": "hovered-area-point" })
|
|
2633
2673
|
] });
|
|
2634
|
-
},
|
|
2674
|
+
}, Td = {
|
|
2635
2675
|
geom: "area",
|
|
2636
2676
|
coord: "cartesian",
|
|
2637
2677
|
guideMode: "continuous",
|
|
2638
|
-
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(
|
|
2639
|
-
renderHover: ({ layer: e, coordSystem: t, primary: n, group: r, related: o }) => /* @__PURE__ */ a(
|
|
2640
|
-
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(
|
|
2678
|
+
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(fd, { layer: e, coordSystem: t, isAnimated: n }),
|
|
2679
|
+
renderHover: ({ layer: e, coordSystem: t, primary: n, group: r, related: o }) => /* @__PURE__ */ a(Cd, { layer: e, coordSystem: t, primary: n, companions: [...r, ...o] }),
|
|
2680
|
+
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(T, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
|
|
2641
2681
|
getOverlayAnchor: ({ observation: e, coordSystem: t }) => {
|
|
2642
2682
|
if (t.mainAxis === "x") {
|
|
2643
|
-
const o = ue(e), i =
|
|
2683
|
+
const o = ue(e), i = Do(e) ?? he(e);
|
|
2644
2684
|
return o === null || i === null ? null : { x: o, y: i };
|
|
2645
2685
|
}
|
|
2646
|
-
const n = he(e), r =
|
|
2686
|
+
const n = he(e), r = Oo(e) ?? ue(e);
|
|
2647
2687
|
return n === null || r === null ? null : { x: r, y: n };
|
|
2648
2688
|
}
|
|
2649
|
-
},
|
|
2689
|
+
}, to = 1, we = 4, wd = oe(function({
|
|
2650
2690
|
layer: t,
|
|
2651
2691
|
coordSystem: n,
|
|
2652
2692
|
isAnimated: r
|
|
@@ -2654,37 +2694,37 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2654
2694
|
const o = vt(), i = v(() => {
|
|
2655
2695
|
const l = We(t.data, t.mapping, t.id), d = /* @__PURE__ */ new Map();
|
|
2656
2696
|
for (const u of t.data) {
|
|
2657
|
-
const h =
|
|
2697
|
+
const h = Sn(n.mainAxis, u);
|
|
2658
2698
|
if (!h) continue;
|
|
2659
|
-
const g =
|
|
2699
|
+
const g = Ed(n.mainAxis, h), p = d.get(g), f = {
|
|
2660
2700
|
key: l(u),
|
|
2661
2701
|
...h,
|
|
2662
2702
|
fill: z(u),
|
|
2663
|
-
opacity:
|
|
2703
|
+
opacity: X(u) ?? to
|
|
2664
2704
|
};
|
|
2665
|
-
|
|
2705
|
+
p ? p.push(f) : d.set(g, [f]);
|
|
2666
2706
|
}
|
|
2667
2707
|
return [...d.entries()].map(([u, h]) => ({
|
|
2668
2708
|
id: `${o}${u}`,
|
|
2669
2709
|
bars: h,
|
|
2670
|
-
...
|
|
2710
|
+
..._d(h)
|
|
2671
2711
|
}));
|
|
2672
2712
|
}, [o, n.mainAxis, t]), c = i.filter((l) => l.bars.length > 1);
|
|
2673
|
-
return /* @__PURE__ */
|
|
2674
|
-
c.length > 0 && /* @__PURE__ */ a("defs", { children: c.map((l) => /* @__PURE__ */ a("clipPath", { id: l.id, children: /* @__PURE__ */ a(
|
|
2713
|
+
return /* @__PURE__ */ m(T, { children: [
|
|
2714
|
+
c.length > 0 && /* @__PURE__ */ a("defs", { children: c.map((l) => /* @__PURE__ */ a("clipPath", { id: l.id, children: /* @__PURE__ */ a(Ad, { column: l, isAnimated: r }) }, l.id)) }),
|
|
2675
2715
|
i.map((l) => {
|
|
2676
2716
|
const [d] = l.bars;
|
|
2677
2717
|
if (l.bars.length === 1 && d !== void 0) {
|
|
2678
2718
|
const { key: u, ...h } = d;
|
|
2679
|
-
return /* @__PURE__ */ a(
|
|
2719
|
+
return /* @__PURE__ */ a(Qt, { ...h, rx: we, isAnimated: r }, u);
|
|
2680
2720
|
}
|
|
2681
2721
|
return /* @__PURE__ */ a("g", { clipPath: `url(#${l.id})`, children: l.bars.map((u) => {
|
|
2682
2722
|
const { key: h, ...g } = u;
|
|
2683
|
-
return /* @__PURE__ */ a(
|
|
2723
|
+
return /* @__PURE__ */ a(Qt, { ...g, isAnimated: r }, h);
|
|
2684
2724
|
}) }, l.id);
|
|
2685
2725
|
})
|
|
2686
2726
|
] });
|
|
2687
|
-
}),
|
|
2727
|
+
}), Qt = ({ isAnimated: e, rx: t, ...n }) => e ? /* @__PURE__ */ a(
|
|
2688
2728
|
Y.rect,
|
|
2689
2729
|
{
|
|
2690
2730
|
initial: !1,
|
|
@@ -2713,13 +2753,13 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2713
2753
|
opacity: n.opacity,
|
|
2714
2754
|
rx: t
|
|
2715
2755
|
}
|
|
2716
|
-
),
|
|
2756
|
+
), Ad = ({ column: e, isAnimated: t }) => t ? /* @__PURE__ */ a(
|
|
2717
2757
|
Y.rect,
|
|
2718
2758
|
{
|
|
2719
2759
|
initial: !1,
|
|
2720
2760
|
style: { transformBox: "view-box" },
|
|
2721
2761
|
transition: O,
|
|
2722
|
-
rx:
|
|
2762
|
+
rx: we,
|
|
2723
2763
|
animate: {
|
|
2724
2764
|
x: x(e.x),
|
|
2725
2765
|
y: x(e.y),
|
|
@@ -2734,20 +2774,20 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2734
2774
|
y: x(e.y),
|
|
2735
2775
|
width: x(e.width),
|
|
2736
2776
|
height: x(e.height),
|
|
2737
|
-
rx:
|
|
2777
|
+
rx: we
|
|
2738
2778
|
}
|
|
2739
|
-
),
|
|
2779
|
+
), Ed = (e, t) => e === "x" ? `${t.x}-${t.width}` : `${t.y}-${t.height}`, _d = (e) => {
|
|
2740
2780
|
let t = 1 / 0, n = 1 / 0, r = -1 / 0, o = -1 / 0;
|
|
2741
2781
|
for (const i of e)
|
|
2742
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);
|
|
2743
2783
|
return { x: t, y: n, width: r - t, height: o - n };
|
|
2744
2784
|
};
|
|
2745
|
-
var
|
|
2746
|
-
const
|
|
2747
|
-
const r =
|
|
2785
|
+
var Pd = "_1suo8ub0";
|
|
2786
|
+
const Le = 3, Hd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
2787
|
+
const r = Sn(e.mainAxis, t.observation);
|
|
2748
2788
|
if (!r) return null;
|
|
2749
|
-
const o = r.x * n.width, i = r.y * n.height, c = r.width * n.width, l = r.height * n.height, d = o -
|
|
2750
|
-
return /* @__PURE__ */
|
|
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 = we + Le, f = z(t.observation), y = X(t.observation) ?? to;
|
|
2790
|
+
return /* @__PURE__ */ m("g", { "data-testid": "hovered-bar", children: [
|
|
2751
2791
|
/* @__PURE__ */ a(
|
|
2752
2792
|
"rect",
|
|
2753
2793
|
{
|
|
@@ -2755,9 +2795,9 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2755
2795
|
y: u,
|
|
2756
2796
|
width: h,
|
|
2757
2797
|
height: g,
|
|
2758
|
-
rx:
|
|
2798
|
+
rx: p,
|
|
2759
2799
|
fill: s.hoveredBarBorderColor,
|
|
2760
|
-
className:
|
|
2800
|
+
className: Pd,
|
|
2761
2801
|
"data-testid": "hovered-bar-border"
|
|
2762
2802
|
}
|
|
2763
2803
|
),
|
|
@@ -2768,38 +2808,38 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2768
2808
|
y: x(r.y),
|
|
2769
2809
|
width: x(r.width),
|
|
2770
2810
|
height: x(r.height),
|
|
2771
|
-
fill:
|
|
2811
|
+
fill: f,
|
|
2772
2812
|
opacity: y,
|
|
2773
|
-
rx:
|
|
2813
|
+
rx: we,
|
|
2774
2814
|
"data-testid": "hovered-bar-fill"
|
|
2775
2815
|
}
|
|
2776
2816
|
)
|
|
2777
2817
|
] });
|
|
2778
|
-
},
|
|
2818
|
+
}, Fd = {
|
|
2779
2819
|
geom: "bar",
|
|
2780
2820
|
coord: "cartesian",
|
|
2781
2821
|
guideMode: "bar",
|
|
2782
|
-
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(
|
|
2783
|
-
renderHover: ({ coordSystem: e, primary: t, panelRect: n }) => /* @__PURE__ */ a(
|
|
2822
|
+
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(wd, { layer: e, coordSystem: t, isAnimated: n }),
|
|
2823
|
+
renderHover: ({ coordSystem: e, primary: t, panelRect: n }) => /* @__PURE__ */ a(Hd, { coordSystem: e, primary: t, panelRect: n }),
|
|
2784
2824
|
renderHoverCompanions: () => null
|
|
2785
|
-
},
|
|
2825
|
+
}, no = 1, Nd = oe(function({
|
|
2786
2826
|
layer: t,
|
|
2787
2827
|
isAnimated: n
|
|
2788
2828
|
}) {
|
|
2789
|
-
const r = v(() =>
|
|
2829
|
+
const r = v(() => kn(t.params), [t.params]), o = v(() => {
|
|
2790
2830
|
const i = We(t.data, t.mapping, t.id), c = [];
|
|
2791
|
-
return t.data.groupBy(
|
|
2792
|
-
const d =
|
|
2831
|
+
return t.data.groupBy(Ae.group).forEach((l) => {
|
|
2832
|
+
const d = Ln([...l], t.params.missingValues), u = r(d);
|
|
2793
2833
|
if (!u) return;
|
|
2794
2834
|
const h = d[0];
|
|
2795
2835
|
if (!h) return;
|
|
2796
|
-
const g = z(h),
|
|
2836
|
+
const g = z(h), p = X(h), f = $e(h, t.params), y = Xe(Ve(h));
|
|
2797
2837
|
c.push({
|
|
2798
2838
|
key: i(h),
|
|
2799
2839
|
pathData: u,
|
|
2800
2840
|
color: g,
|
|
2801
|
-
opacity:
|
|
2802
|
-
strokeWidth:
|
|
2841
|
+
opacity: p ?? no,
|
|
2842
|
+
strokeWidth: f,
|
|
2803
2843
|
strokeDasharray: y
|
|
2804
2844
|
});
|
|
2805
2845
|
}), c;
|
|
@@ -2814,7 +2854,7 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2814
2854
|
"data-geom": "line",
|
|
2815
2855
|
className: ye,
|
|
2816
2856
|
children: o.map((i) => /* @__PURE__ */ a(
|
|
2817
|
-
|
|
2857
|
+
Bd,
|
|
2818
2858
|
{
|
|
2819
2859
|
pathData: i.pathData,
|
|
2820
2860
|
color: i.color,
|
|
@@ -2827,8 +2867,8 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2827
2867
|
))
|
|
2828
2868
|
}
|
|
2829
2869
|
);
|
|
2830
|
-
}),
|
|
2831
|
-
|
|
2870
|
+
}), Bd = ({ pathData: e, color: t, strokeWidth: n, opacity: r, strokeDasharray: o, isAnimated: i }) => i ? /* @__PURE__ */ a(
|
|
2871
|
+
Id,
|
|
2832
2872
|
{
|
|
2833
2873
|
pathData: e,
|
|
2834
2874
|
color: t,
|
|
@@ -2847,7 +2887,7 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2847
2887
|
strokeDasharray: o,
|
|
2848
2888
|
vectorEffect: "non-scaling-stroke"
|
|
2849
2889
|
}
|
|
2850
|
-
),
|
|
2890
|
+
), Id = ({
|
|
2851
2891
|
pathData: e,
|
|
2852
2892
|
color: t,
|
|
2853
2893
|
strokeWidth: n,
|
|
@@ -2867,14 +2907,14 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2867
2907
|
vectorEffect: "non-scaling-stroke"
|
|
2868
2908
|
}
|
|
2869
2909
|
);
|
|
2870
|
-
},
|
|
2871
|
-
const r =
|
|
2872
|
-
const h = e.data.filter(
|
|
2873
|
-
return
|
|
2874
|
-
}, [e.data, e.params.missingValues, r]), i = v(() =>
|
|
2910
|
+
}, Md = ({ layer: e, primary: t, companions: n }) => {
|
|
2911
|
+
const r = xn(t.observation), o = v(() => {
|
|
2912
|
+
const h = e.data.filter(Ae.group, "eq", r);
|
|
2913
|
+
return Ln([...h], e.params.missingValues);
|
|
2914
|
+
}, [e.data, e.params.missingValues, r]), i = v(() => kn(e.params)(o), [e.params, o]);
|
|
2875
2915
|
if (!i) return null;
|
|
2876
|
-
const c = z(t.observation), l =
|
|
2877
|
-
return /* @__PURE__ */
|
|
2916
|
+
const c = z(t.observation), l = X(t.observation) ?? no, d = $e(t.observation, e.params), u = Xe(Ve(t.observation));
|
|
2917
|
+
return /* @__PURE__ */ m("g", { "data-testid": "hovered-line", children: [
|
|
2878
2918
|
/* @__PURE__ */ a(
|
|
2879
2919
|
"svg",
|
|
2880
2920
|
{
|
|
@@ -2900,20 +2940,20 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2900
2940
|
}
|
|
2901
2941
|
),
|
|
2902
2942
|
n.map((h) => /* @__PURE__ */ a(pe, { hit: h }, `companion-${h.layerId}-${h.pointIndex}`)),
|
|
2903
|
-
/* @__PURE__ */ a(
|
|
2943
|
+
/* @__PURE__ */ a(Nt, { hit: t, "data-testid": "hovered-line-point" })
|
|
2904
2944
|
] });
|
|
2905
|
-
},
|
|
2945
|
+
}, Dd = {
|
|
2906
2946
|
geom: "line",
|
|
2907
2947
|
coord: "cartesian",
|
|
2908
2948
|
guideMode: "continuous",
|
|
2909
|
-
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(
|
|
2910
|
-
renderHover: ({ layer: e, primary: t, group: n, related: r }) => /* @__PURE__ */ a(
|
|
2911
|
-
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(
|
|
2949
|
+
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(Nd, { layer: e, isAnimated: t }),
|
|
2950
|
+
renderHover: ({ layer: e, primary: t, group: n, related: r }) => /* @__PURE__ */ a(Md, { layer: e, primary: t, companions: [...n, ...r] }),
|
|
2951
|
+
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(T, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
|
|
2912
2952
|
getOverlayAnchor: ({ observation: e }) => {
|
|
2913
2953
|
const t = ue(e), n = he(e);
|
|
2914
2954
|
return t === null || n === null ? null : { x: t, y: n };
|
|
2915
2955
|
}
|
|
2916
|
-
},
|
|
2956
|
+
}, Od = oe(function({
|
|
2917
2957
|
layer: t,
|
|
2918
2958
|
isAnimated: n
|
|
2919
2959
|
}) {
|
|
@@ -2924,22 +2964,22 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2924
2964
|
const l = i++, d = ue(c), u = he(c);
|
|
2925
2965
|
if (d === null || u === null)
|
|
2926
2966
|
continue;
|
|
2927
|
-
const h = z(c), g =
|
|
2967
|
+
const h = z(c), g = X(c), p = Re(c), f = Ro(c);
|
|
2928
2968
|
o.push({
|
|
2929
2969
|
key: String(l),
|
|
2930
2970
|
// using the observation index as key for points leads to nicer transitions
|
|
2931
2971
|
cx: Ge(d),
|
|
2932
2972
|
cy: ze(u),
|
|
2933
|
-
radius: (
|
|
2973
|
+
radius: (p ?? t.params.size) / 2,
|
|
2934
2974
|
fill: h,
|
|
2935
2975
|
stroke: s.pointStrokeColor,
|
|
2936
|
-
opacity: g ??
|
|
2937
|
-
strokeWidth:
|
|
2976
|
+
opacity: g ?? Ft,
|
|
2977
|
+
strokeWidth: f ?? hd
|
|
2938
2978
|
});
|
|
2939
2979
|
}
|
|
2940
2980
|
return o;
|
|
2941
2981
|
}, [t.data, t.params.size]);
|
|
2942
|
-
return /* @__PURE__ */ a(
|
|
2982
|
+
return /* @__PURE__ */ a(T, { children: r.map((o) => n ? /* @__PURE__ */ a(
|
|
2943
2983
|
Y.circle,
|
|
2944
2984
|
{
|
|
2945
2985
|
initial: !1,
|
|
@@ -2968,43 +3008,43 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2968
3008
|
},
|
|
2969
3009
|
o.key
|
|
2970
3010
|
)) });
|
|
2971
|
-
}),
|
|
3011
|
+
}), Rd = {
|
|
2972
3012
|
geom: "point",
|
|
2973
3013
|
coord: "cartesian",
|
|
2974
3014
|
guideMode: null,
|
|
2975
|
-
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(
|
|
2976
|
-
renderHover: ({ primary: e, group: t, related: n }) => /* @__PURE__ */
|
|
3015
|
+
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(Od, { layer: e, isAnimated: t }),
|
|
3016
|
+
renderHover: ({ primary: e, group: t, related: n }) => /* @__PURE__ */ m("g", { "data-testid": "hovered-point", children: [
|
|
2977
3017
|
[...t, ...n].map((r) => /* @__PURE__ */ a(pe, { hit: r }, `companion-${r.layerId}-${r.pointIndex}`)),
|
|
2978
|
-
/* @__PURE__ */ a(
|
|
3018
|
+
/* @__PURE__ */ a(Nt, { hit: e })
|
|
2979
3019
|
] }),
|
|
2980
|
-
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(
|
|
3020
|
+
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(T, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
|
|
2981
3021
|
getOverlayAnchor: ({ observation: e }) => {
|
|
2982
3022
|
const t = ue(e), n = he(e);
|
|
2983
3023
|
return t === null || n === null ? null : { x: t, y: n };
|
|
2984
3024
|
}
|
|
2985
|
-
},
|
|
2986
|
-
var
|
|
2987
|
-
const
|
|
3025
|
+
}, zd = 11.7, Gd = N.xs, Wd = R, $d = K.medium, Ce = 5, Xd = 5, en = 10, tn = 10, Vd = 4, Oe = 13, ro = 6, ot = 12, nn = 21.6, Ud = "0 0 10 18", Yd = "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", at = "#1A1A1A";
|
|
3026
|
+
var jd = "_16vokpr0";
|
|
3027
|
+
const qd = (e, t) => {
|
|
2988
3028
|
const n = e.mapping.y !== void 0, r = t.mainAxis === "y";
|
|
2989
3029
|
return n !== r;
|
|
2990
|
-
},
|
|
3030
|
+
}, Kd = (e, t) => {
|
|
2991
3031
|
const n = x(e ? 1 - t : t);
|
|
2992
3032
|
return e ? { x1: "0%", y1: n, x2: "100%", y2: n } : { x1: n, y1: "0%", x2: n, y2: "100%" };
|
|
2993
|
-
},
|
|
3033
|
+
}, Jd = (e, t) => e === "solid" ? {} : e === "dotted" ? { strokeDasharray: `0 ${t * 2}`, strokeLinecap: "round" } : {
|
|
2994
3034
|
strokeDasharray: `${t * 2} ${t * 3}`,
|
|
2995
3035
|
strokeLinecap: "round",
|
|
2996
3036
|
strokeMiterlimit: 16
|
|
2997
|
-
},
|
|
3037
|
+
}, Zd = (e) => {
|
|
2998
3038
|
const t = e.params.color, n = t ?? s.targetLineColor;
|
|
2999
3039
|
let r = s.targetLineLabelTextColor;
|
|
3000
3040
|
if (t !== void 0)
|
|
3001
3041
|
try {
|
|
3002
|
-
r = ct(t,
|
|
3042
|
+
r = ct(t, rn) > ct(t, at) ? rn : at;
|
|
3003
3043
|
} catch {
|
|
3004
3044
|
r = at;
|
|
3005
3045
|
}
|
|
3006
3046
|
return { lineColor: n, labelTextColor: r };
|
|
3007
|
-
},
|
|
3047
|
+
}, Qd = (e, t) => Be(e) && Be(t) ? `${e}: ${t}` : Be(e) ? e : Be(t) ? t : null, Be = (e) => e != null && e.trim() !== "", eu = ({
|
|
3008
3048
|
labelPosition: e,
|
|
3009
3049
|
linePosition: t,
|
|
3010
3050
|
color: n,
|
|
@@ -3013,21 +3053,21 @@ const Wd = (e, t) => {
|
|
|
3013
3053
|
text: i,
|
|
3014
3054
|
isAnimated: c
|
|
3015
3055
|
}) => {
|
|
3016
|
-
const l = e === "start", d = l ? -Oe : -(r - Oe), u = l ? d + r -
|
|
3017
|
-
/* @__PURE__ */ a("rect", { x: d, y: 0, width: r, height: o, rx:
|
|
3056
|
+
const l = e === "start", d = l ? -Oe : -(r - Oe), u = l ? d + r - Ce : d + Ce - ot, h = l ? void 0 : `rotate(180 ${u + ot / 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: ro, fill: n }),
|
|
3018
3058
|
/* @__PURE__ */ a("g", { transform: h, children: /* @__PURE__ */ a(
|
|
3019
3059
|
"svg",
|
|
3020
3060
|
{
|
|
3021
3061
|
x: u,
|
|
3022
|
-
y: (o -
|
|
3062
|
+
y: (o - nn) / 2,
|
|
3023
3063
|
width: ot,
|
|
3024
|
-
height:
|
|
3025
|
-
viewBox:
|
|
3064
|
+
height: nn,
|
|
3065
|
+
viewBox: Ud,
|
|
3026
3066
|
overflow: "visible",
|
|
3027
|
-
children: /* @__PURE__ */ a("path", { d:
|
|
3067
|
+
children: /* @__PURE__ */ a("path", { d: Yd, fill: n })
|
|
3028
3068
|
}
|
|
3029
3069
|
) }),
|
|
3030
|
-
/* @__PURE__ */ a("g", { transform: `translate(${d +
|
|
3070
|
+
/* @__PURE__ */ a("g", { transform: `translate(${d + Ce}, ${o / 2})`, children: i })
|
|
3031
3071
|
] });
|
|
3032
3072
|
return c ? /* @__PURE__ */ a(
|
|
3033
3073
|
Y.svg,
|
|
@@ -3035,12 +3075,12 @@ const Wd = (e, t) => {
|
|
|
3035
3075
|
initial: !1,
|
|
3036
3076
|
transition: O,
|
|
3037
3077
|
x: g,
|
|
3038
|
-
animate: { y:
|
|
3078
|
+
animate: { y: p },
|
|
3039
3079
|
overflow: "visible",
|
|
3040
|
-
children:
|
|
3080
|
+
children: f
|
|
3041
3081
|
}
|
|
3042
|
-
) : /* @__PURE__ */ a("svg", { x: g, y:
|
|
3043
|
-
},
|
|
3082
|
+
) : /* @__PURE__ */ a("svg", { x: g, y: p, overflow: "visible", children: f });
|
|
3083
|
+
}, tu = ({
|
|
3044
3084
|
labelPosition: e,
|
|
3045
3085
|
linePosition: t,
|
|
3046
3086
|
color: n,
|
|
@@ -3049,9 +3089,9 @@ const Wd = (e, t) => {
|
|
|
3049
3089
|
text: i,
|
|
3050
3090
|
isAnimated: c
|
|
3051
3091
|
}) => {
|
|
3052
|
-
const l = e === "start", d = l ? -Oe : -(o - Oe), u = x(t), h = l ? "100%" : "0%", g = /* @__PURE__ */
|
|
3053
|
-
/* @__PURE__ */ a("rect", { x: 0, y: d, width: r, height: o, rx:
|
|
3054
|
-
/* @__PURE__ */ a("g", { transform: `translate(${
|
|
3092
|
+
const l = e === "start", d = l ? -Oe : -(o - Oe), 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: ro, fill: n }),
|
|
3094
|
+
/* @__PURE__ */ a("g", { transform: `translate(${Ce}, ${d + o / 2})`, children: i })
|
|
3055
3095
|
] });
|
|
3056
3096
|
return c ? /* @__PURE__ */ a(
|
|
3057
3097
|
Y.svg,
|
|
@@ -3064,7 +3104,7 @@ const Wd = (e, t) => {
|
|
|
3064
3104
|
children: g
|
|
3065
3105
|
}
|
|
3066
3106
|
) : /* @__PURE__ */ a("svg", { x: u, y: h, overflow: "visible", children: g });
|
|
3067
|
-
},
|
|
3107
|
+
}, nu = ({
|
|
3068
3108
|
label: e,
|
|
3069
3109
|
textWidth: t,
|
|
3070
3110
|
labelPosition: n,
|
|
@@ -3076,8 +3116,8 @@ const Wd = (e, t) => {
|
|
|
3076
3116
|
symbolColor: d,
|
|
3077
3117
|
isAnimated: u
|
|
3078
3118
|
}) => {
|
|
3079
|
-
const h = l === null ? 0 :
|
|
3080
|
-
l !== null && d !== null && /* @__PURE__ */ a("g", { transform: `translate(0, ${-
|
|
3119
|
+
const h = l === null ? 0 : en + Vd, g = t + h + Ce * 2, p = zd + Xd * 2, f = /* @__PURE__ */ m(T, { children: [
|
|
3120
|
+
l !== null && d !== null && /* @__PURE__ */ a("g", { transform: `translate(0, ${-tn / 2})`, children: /* @__PURE__ */ a(Ye, { shape: l, color: d, width: en, height: tn }) }),
|
|
3081
3121
|
/* @__PURE__ */ a(
|
|
3082
3122
|
"text",
|
|
3083
3123
|
{
|
|
@@ -3091,30 +3131,30 @@ const Wd = (e, t) => {
|
|
|
3091
3131
|
)
|
|
3092
3132
|
] });
|
|
3093
3133
|
return r ? /* @__PURE__ */ a(
|
|
3094
|
-
|
|
3134
|
+
eu,
|
|
3095
3135
|
{
|
|
3096
3136
|
labelPosition: n,
|
|
3097
3137
|
linePosition: o,
|
|
3098
3138
|
color: i,
|
|
3099
3139
|
pillWidth: g,
|
|
3100
|
-
pillHeight:
|
|
3101
|
-
text:
|
|
3140
|
+
pillHeight: p,
|
|
3141
|
+
text: f,
|
|
3102
3142
|
isAnimated: u
|
|
3103
3143
|
}
|
|
3104
3144
|
) : /* @__PURE__ */ a(
|
|
3105
|
-
|
|
3145
|
+
tu,
|
|
3106
3146
|
{
|
|
3107
3147
|
labelPosition: n,
|
|
3108
3148
|
linePosition: o,
|
|
3109
3149
|
color: i,
|
|
3110
3150
|
pillWidth: g,
|
|
3111
|
-
pillHeight:
|
|
3112
|
-
text:
|
|
3151
|
+
pillHeight: p,
|
|
3152
|
+
text: f,
|
|
3113
3153
|
isAnimated: u
|
|
3114
3154
|
}
|
|
3115
3155
|
);
|
|
3116
|
-
},
|
|
3117
|
-
const i =
|
|
3156
|
+
}, ru = ({ layer: e, isHorizontalLine: t, position: n, lineColor: r, isAnimated: o }) => {
|
|
3157
|
+
const i = Kd(t, n), c = Jd(e.params.lineType, e.params.strokeWidth);
|
|
3118
3158
|
return o ? /* @__PURE__ */ a(
|
|
3119
3159
|
Y.line,
|
|
3120
3160
|
{
|
|
@@ -3136,14 +3176,14 @@ const Wd = (e, t) => {
|
|
|
3136
3176
|
vectorEffect: "non-scaling-stroke"
|
|
3137
3177
|
}
|
|
3138
3178
|
);
|
|
3139
|
-
},
|
|
3179
|
+
}, ou = oe(function({
|
|
3140
3180
|
layer: t,
|
|
3141
3181
|
coordSystem: n,
|
|
3142
3182
|
formattingLocale: r,
|
|
3143
3183
|
isAnimated: o
|
|
3144
3184
|
}) {
|
|
3145
3185
|
const i = ve(), { guides: c, numberFormat: l, textScale: d, layers: u, colorScale: h } = B(
|
|
3146
|
-
|
|
3186
|
+
j((_) => ({
|
|
3147
3187
|
guides: _.guides,
|
|
3148
3188
|
numberFormat: _.config.numberFormat,
|
|
3149
3189
|
textScale: _.config.appearance.textScale,
|
|
@@ -3151,27 +3191,27 @@ const Wd = (e, t) => {
|
|
|
3151
3191
|
colorScale: _.scales.color
|
|
3152
3192
|
}))
|
|
3153
3193
|
), g = v(
|
|
3154
|
-
() =>
|
|
3194
|
+
() => zo(u, h, n).get(t.id) ?? null,
|
|
3155
3195
|
[u, h, n, t.id]
|
|
3156
|
-
), m = v(
|
|
3157
|
-
() => Ud(t.params.label, Ro({ guides: c, numberFormat: l, layer: t, locale: r })),
|
|
3158
|
-
[c, l, r, t]
|
|
3159
3196
|
), p = v(
|
|
3197
|
+
() => Qd(t.params.label, Go({ guides: c, numberFormat: l, layer: t, locale: r })),
|
|
3198
|
+
[c, l, r, t]
|
|
3199
|
+
), f = v(
|
|
3160
3200
|
() => ({
|
|
3161
|
-
family:
|
|
3162
|
-
size:
|
|
3163
|
-
weight:
|
|
3201
|
+
family: Wd,
|
|
3202
|
+
size: te(Gd, d),
|
|
3203
|
+
weight: $d
|
|
3164
3204
|
}),
|
|
3165
3205
|
[d]
|
|
3166
3206
|
), y = v(
|
|
3167
|
-
() =>
|
|
3168
|
-
[
|
|
3207
|
+
() => p === null ? 0 : i.measureText(p, f).width,
|
|
3208
|
+
[p, f, i]
|
|
3169
3209
|
), S = t.data.getFirst();
|
|
3170
3210
|
if (!S) return null;
|
|
3171
|
-
const { lineColor: k, labelTextColor: w } =
|
|
3172
|
-
return I === null ? null : /* @__PURE__ */
|
|
3211
|
+
const { lineColor: k, labelTextColor: w } = Zd(t), A = qd(t, n), I = A ? he(S) : ue(S);
|
|
3212
|
+
return I === null ? null : /* @__PURE__ */ m("g", { "data-geom": "rule", className: jd, children: [
|
|
3173
3213
|
/* @__PURE__ */ a(
|
|
3174
|
-
|
|
3214
|
+
ru,
|
|
3175
3215
|
{
|
|
3176
3216
|
layer: t,
|
|
3177
3217
|
isHorizontalLine: A,
|
|
@@ -3180,10 +3220,10 @@ const Wd = (e, t) => {
|
|
|
3180
3220
|
isAnimated: o
|
|
3181
3221
|
}
|
|
3182
3222
|
),
|
|
3183
|
-
|
|
3184
|
-
|
|
3223
|
+
p !== null && /* @__PURE__ */ a(
|
|
3224
|
+
nu,
|
|
3185
3225
|
{
|
|
3186
|
-
label:
|
|
3226
|
+
label: p,
|
|
3187
3227
|
textWidth: y,
|
|
3188
3228
|
labelPosition: t.params.labelPosition,
|
|
3189
3229
|
isHorizontalLine: A,
|
|
@@ -3196,12 +3236,12 @@ const Wd = (e, t) => {
|
|
|
3196
3236
|
}
|
|
3197
3237
|
)
|
|
3198
3238
|
] });
|
|
3199
|
-
}),
|
|
3239
|
+
}), au = {
|
|
3200
3240
|
geom: "rule",
|
|
3201
3241
|
coord: "cartesian",
|
|
3202
3242
|
guideMode: null,
|
|
3203
3243
|
render: ({ layer: e, coordSystem: t, formattingLocale: n, isAnimated: r }) => /* @__PURE__ */ a(
|
|
3204
|
-
|
|
3244
|
+
ou,
|
|
3205
3245
|
{
|
|
3206
3246
|
layer: e,
|
|
3207
3247
|
coordSystem: t,
|
|
@@ -3211,26 +3251,26 @@ const Wd = (e, t) => {
|
|
|
3211
3251
|
),
|
|
3212
3252
|
renderHover: () => null,
|
|
3213
3253
|
renderHoverCompanions: () => null
|
|
3214
|
-
},
|
|
3254
|
+
}, oo = 1, on = Math.PI * 2, iu = oe(function({
|
|
3215
3255
|
layer: t,
|
|
3216
3256
|
isAnimated: n
|
|
3217
3257
|
}) {
|
|
3218
|
-
const r =
|
|
3258
|
+
const r = C(!1);
|
|
3219
3259
|
L(() => {
|
|
3220
3260
|
r.current = !0;
|
|
3221
3261
|
}, []);
|
|
3222
3262
|
const o = v(() => {
|
|
3223
3263
|
const i = We(t.data, t.mapping, t.id), c = [];
|
|
3224
3264
|
for (const l of t.data) {
|
|
3225
|
-
const d = i(l), { startAngle: u, endAngle: h } =
|
|
3226
|
-
u === null || h === null || g === null ||
|
|
3265
|
+
const d = i(l), { startAngle: u, endAngle: h } = Cn(l), { innerRadius: g, outerRadius: p } = Tn(l);
|
|
3266
|
+
u === null || h === null || g === null || p === null || c.push({
|
|
3227
3267
|
key: d,
|
|
3228
3268
|
startAngle: u,
|
|
3229
3269
|
endAngle: h,
|
|
3230
3270
|
innerRadius: g,
|
|
3231
|
-
outerRadius:
|
|
3271
|
+
outerRadius: p,
|
|
3232
3272
|
fill: z(l),
|
|
3233
|
-
opacity:
|
|
3273
|
+
opacity: X(l) ?? oo
|
|
3234
3274
|
});
|
|
3235
3275
|
}
|
|
3236
3276
|
return c;
|
|
@@ -3247,7 +3287,7 @@ const Wd = (e, t) => {
|
|
|
3247
3287
|
children: o.map((i) => {
|
|
3248
3288
|
if (n) {
|
|
3249
3289
|
const { key: c, ...l } = i;
|
|
3250
|
-
return /* @__PURE__ */ a(
|
|
3290
|
+
return /* @__PURE__ */ a(su, { isInitialRender: !r.current, ...l }, c);
|
|
3251
3291
|
}
|
|
3252
3292
|
return /* @__PURE__ */ a(
|
|
3253
3293
|
"path",
|
|
@@ -3266,7 +3306,7 @@ const Wd = (e, t) => {
|
|
|
3266
3306
|
})
|
|
3267
3307
|
}
|
|
3268
3308
|
);
|
|
3269
|
-
}),
|
|
3309
|
+
}), su = ({
|
|
3270
3310
|
startAngle: e,
|
|
3271
3311
|
endAngle: t,
|
|
3272
3312
|
innerRadius: n,
|
|
@@ -3275,29 +3315,29 @@ const Wd = (e, t) => {
|
|
|
3275
3315
|
opacity: i,
|
|
3276
3316
|
isInitialRender: c
|
|
3277
3317
|
}) => {
|
|
3278
|
-
const l = c ? e :
|
|
3318
|
+
const l = c ? e : on, d = c ? t : on, u = Mt(l, O), h = Mt(d, O), g = wn(
|
|
3279
3319
|
Ie({ startAngle: l, endAngle: d, innerRadius: n, outerRadius: r }) ?? ""
|
|
3280
3320
|
);
|
|
3281
3321
|
return L(() => {
|
|
3282
3322
|
u.set(e), h.set(t);
|
|
3283
3323
|
}, [u, h, e, t]), L(() => {
|
|
3284
|
-
const
|
|
3324
|
+
const p = () => {
|
|
3285
3325
|
const S = u.get(), k = h.get();
|
|
3286
3326
|
g.set(
|
|
3287
3327
|
Ie({ startAngle: S, endAngle: k, innerRadius: n, outerRadius: r }) ?? ""
|
|
3288
3328
|
);
|
|
3289
|
-
},
|
|
3329
|
+
}, f = u.on("change", p), y = h.on("change", p);
|
|
3290
3330
|
return () => {
|
|
3291
|
-
|
|
3331
|
+
f(), y();
|
|
3292
3332
|
};
|
|
3293
3333
|
}, [u, h, n, r, g]), /* @__PURE__ */ a(Y.path, { d: g, fill: o, opacity: i, transition: O });
|
|
3294
|
-
},
|
|
3295
|
-
const { startAngle: t, endAngle: n } =
|
|
3334
|
+
}, lu = ({ primary: e }) => {
|
|
3335
|
+
const { startAngle: t, endAngle: n } = Cn(e.observation), { innerRadius: r, outerRadius: o } = Tn(e.observation);
|
|
3296
3336
|
if (t === null || n === null || r === null || o === null)
|
|
3297
3337
|
return null;
|
|
3298
3338
|
const i = Ie({ startAngle: t, endAngle: n, innerRadius: r, outerRadius: o });
|
|
3299
3339
|
if (!i) return null;
|
|
3300
|
-
const c = z(e.observation), l =
|
|
3340
|
+
const c = z(e.observation), l = X(e.observation) ?? oo;
|
|
3301
3341
|
return /* @__PURE__ */ a(
|
|
3302
3342
|
"svg",
|
|
3303
3343
|
{
|
|
@@ -3311,59 +3351,59 @@ const Wd = (e, t) => {
|
|
|
3311
3351
|
children: /* @__PURE__ */ a("path", { d: i, fill: c, opacity: l })
|
|
3312
3352
|
}
|
|
3313
3353
|
);
|
|
3314
|
-
},
|
|
3354
|
+
}, cu = {
|
|
3315
3355
|
geom: "bar",
|
|
3316
3356
|
coord: "polar",
|
|
3317
3357
|
guideMode: null,
|
|
3318
|
-
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(
|
|
3319
|
-
renderHover: ({ primary: e }) => /* @__PURE__ */ a(
|
|
3358
|
+
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(iu, { layer: e, isAnimated: t }),
|
|
3359
|
+
renderHover: ({ primary: e }) => /* @__PURE__ */ a(lu, { primary: e }),
|
|
3320
3360
|
renderHoverCompanions: () => null
|
|
3321
|
-
},
|
|
3361
|
+
}, du = {
|
|
3322
3362
|
bar: {
|
|
3323
|
-
cartesian:
|
|
3324
|
-
polar:
|
|
3363
|
+
cartesian: Fd,
|
|
3364
|
+
polar: cu
|
|
3325
3365
|
},
|
|
3326
3366
|
line: {
|
|
3327
|
-
cartesian:
|
|
3367
|
+
cartesian: Dd
|
|
3328
3368
|
},
|
|
3329
3369
|
area: {
|
|
3330
|
-
cartesian:
|
|
3370
|
+
cartesian: Td
|
|
3331
3371
|
},
|
|
3332
3372
|
point: {
|
|
3333
|
-
cartesian:
|
|
3373
|
+
cartesian: Rd
|
|
3334
3374
|
},
|
|
3335
3375
|
rule: {
|
|
3336
|
-
cartesian:
|
|
3376
|
+
cartesian: au
|
|
3337
3377
|
}
|
|
3338
|
-
},
|
|
3378
|
+
}, qe = (e, t) => du[e.geom]?.[t.type] ?? null, uu = (e, t) => {
|
|
3339
3379
|
const n = e.filter((o) => o.interactive);
|
|
3340
3380
|
if (n.length === 0) return null;
|
|
3341
|
-
const r = n.map((o) =>
|
|
3381
|
+
const r = n.map((o) => qe(o, t)).filter((o) => o !== null).map((o) => o.guideMode);
|
|
3342
3382
|
return r.length === 0 ? null : r.some((o) => o === "bar") ? "bar" : r.every((o) => o === "continuous") ? "continuous" : null;
|
|
3343
|
-
},
|
|
3383
|
+
}, hu = 1, gu = "4 3", pu = ({ panelRect: e }) => {
|
|
3344
3384
|
const { coordSystem: t, layers: n, scales: r } = B(
|
|
3345
|
-
|
|
3346
|
-
), o =
|
|
3385
|
+
j((c) => ({ coordSystem: c.coordSystem, layers: c.layers, scales: c.scales }))
|
|
3386
|
+
), o = Tt((c) => c.hover.primary);
|
|
3347
3387
|
if (t.type !== "cartesian" || n.length === 0 || o === null) return null;
|
|
3348
|
-
const i =
|
|
3349
|
-
return i === null ? null : i === "bar" ? /* @__PURE__ */ a(
|
|
3350
|
-
},
|
|
3351
|
-
const r =
|
|
3352
|
-
return /* @__PURE__ */ a(
|
|
3388
|
+
const i = uu(n, t);
|
|
3389
|
+
return i === null ? null : i === "bar" ? /* @__PURE__ */ a(mu, { coordSystem: t, scales: r, primary: o, panelRect: e }) : /* @__PURE__ */ a(fu, { coordSystem: t, primary: o, panelRect: e });
|
|
3390
|
+
}, fu = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
3391
|
+
const r = $o(e, t);
|
|
3392
|
+
return /* @__PURE__ */ a(ao, { panelRect: n, children: /* @__PURE__ */ a(
|
|
3353
3393
|
"line",
|
|
3354
3394
|
{
|
|
3355
3395
|
...r,
|
|
3356
3396
|
stroke: s.hoverGuideLineColor,
|
|
3357
|
-
strokeWidth:
|
|
3358
|
-
strokeDasharray:
|
|
3397
|
+
strokeWidth: hu,
|
|
3398
|
+
strokeDasharray: gu,
|
|
3359
3399
|
strokeLinecap: "round",
|
|
3360
3400
|
"data-testid": "hover-guide-line"
|
|
3361
3401
|
}
|
|
3362
3402
|
) });
|
|
3363
|
-
},
|
|
3364
|
-
const o =
|
|
3365
|
-
return o === null ? null : /* @__PURE__ */ a(
|
|
3366
|
-
},
|
|
3403
|
+
}, mu = ({ coordSystem: e, scales: t, primary: n, panelRect: r }) => {
|
|
3404
|
+
const o = Wo(e, t, n);
|
|
3405
|
+
return o === null ? null : /* @__PURE__ */ a(ao, { panelRect: r, children: /* @__PURE__ */ a("rect", { ...o, fill: s.hoverGuideFillColor, "data-testid": "hover-guide-rect" }) });
|
|
3406
|
+
}, ao = ({ panelRect: e, children: t }) => /* @__PURE__ */ a(
|
|
3367
3407
|
"svg",
|
|
3368
3408
|
{
|
|
3369
3409
|
x: e.x,
|
|
@@ -3374,16 +3414,16 @@ const Wd = (e, t) => {
|
|
|
3374
3414
|
"data-testid": "hover-guide",
|
|
3375
3415
|
children: t
|
|
3376
3416
|
}
|
|
3377
|
-
),
|
|
3417
|
+
), vu = 200, yu = ({ engine: e, store: t, overlayRef: n }) => {
|
|
3378
3418
|
L(() => {
|
|
3379
3419
|
const r = n.current;
|
|
3380
3420
|
if (!r) return;
|
|
3381
|
-
const o =
|
|
3421
|
+
const o = bu(r, e), i = xu(r, e, t);
|
|
3382
3422
|
return () => {
|
|
3383
3423
|
i(), o();
|
|
3384
3424
|
};
|
|
3385
3425
|
}, [e, t, n]);
|
|
3386
|
-
},
|
|
3426
|
+
}, bu = (e, t) => {
|
|
3387
3427
|
const n = () => {
|
|
3388
3428
|
const c = e.getBoundingClientRect();
|
|
3389
3429
|
c.width === 0 || c.height === 0 || t.setViewport({ width: c.width, height: c.height });
|
|
@@ -3392,12 +3432,12 @@ const Wd = (e, t) => {
|
|
|
3392
3432
|
const o = () => {
|
|
3393
3433
|
r !== null && clearTimeout(r), r = setTimeout(() => {
|
|
3394
3434
|
r = null, n();
|
|
3395
|
-
},
|
|
3435
|
+
}, vu);
|
|
3396
3436
|
}, i = new ResizeObserver(o);
|
|
3397
3437
|
return i.observe(e), n(), () => {
|
|
3398
3438
|
i.disconnect(), r !== null && clearTimeout(r);
|
|
3399
3439
|
};
|
|
3400
|
-
},
|
|
3440
|
+
}, xu = (e, t, n) => {
|
|
3401
3441
|
let r = null, o = null;
|
|
3402
3442
|
const i = () => {
|
|
3403
3443
|
o = null;
|
|
@@ -3415,14 +3455,14 @@ const Wd = (e, t) => {
|
|
|
3415
3455
|
}, l = () => {
|
|
3416
3456
|
r = null, o !== null && (cancelAnimationFrame(o), o = null);
|
|
3417
3457
|
const d = n.getState();
|
|
3418
|
-
d.hover.primary !== null && d.setHoverState(
|
|
3458
|
+
d.hover.primary !== null && d.setHoverState(gn);
|
|
3419
3459
|
};
|
|
3420
3460
|
return e.addEventListener("pointermove", c), e.addEventListener("pointerleave", l), () => {
|
|
3421
3461
|
e.removeEventListener("pointermove", c), e.removeEventListener("pointerleave", l), o !== null && cancelAnimationFrame(o), r = null;
|
|
3422
3462
|
};
|
|
3423
|
-
},
|
|
3463
|
+
}, Su = ({ panelRect: e }) => {
|
|
3424
3464
|
const { engine: t, store: n, overlayRef: r } = Ue();
|
|
3425
|
-
return
|
|
3465
|
+
return yu({ engine: t, store: n, overlayRef: r }), /* @__PURE__ */ a(
|
|
3426
3466
|
"rect",
|
|
3427
3467
|
{
|
|
3428
3468
|
ref: r,
|
|
@@ -3435,8 +3475,8 @@ const Wd = (e, t) => {
|
|
|
3435
3475
|
"data-testid": "pointer-capture-layer"
|
|
3436
3476
|
}
|
|
3437
3477
|
);
|
|
3438
|
-
}, it = "data-hover-active",
|
|
3439
|
-
const { store: t } = Ue(), n =
|
|
3478
|
+
}, it = "data-hover-active", ku = (e) => {
|
|
3479
|
+
const { store: t } = Ue(), n = Te(t, (r) => r.hover.primary !== null);
|
|
3440
3480
|
L(() => {
|
|
3441
3481
|
const r = e.current;
|
|
3442
3482
|
if (r)
|
|
@@ -3444,11 +3484,11 @@ const Wd = (e, t) => {
|
|
|
3444
3484
|
r.removeAttribute(it);
|
|
3445
3485
|
};
|
|
3446
3486
|
}, [e, n]);
|
|
3447
|
-
},
|
|
3448
|
-
var
|
|
3449
|
-
const
|
|
3450
|
-
const u = i ? `rotate(-90 ${e} ${t})` : void 0, h = c === "aggregate" ?
|
|
3451
|
-
return /* @__PURE__ */
|
|
3487
|
+
}, io = N.xs, ft = R, so = K.medium, Lu = K.semibold, lo = 6, co = 2, Cu = 4, Tu = 2, an = 4;
|
|
3488
|
+
var wu = "_1agclyl0", Au = "_1agclyl1", Eu = "_1agclyl2", _u = { inside: "_1agclyl4 _1agclyl3", outside: "_1agclyl5 _1agclyl3" }, Pu = "_1agclyl6 _1agclyl3";
|
|
3489
|
+
const uo = ({ 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" ? Pu : _u[l], g = Hu(c, l, d);
|
|
3491
|
+
return /* @__PURE__ */ m("g", { transform: u, children: [
|
|
3452
3492
|
g && /* @__PURE__ */ a(
|
|
3453
3493
|
"rect",
|
|
3454
3494
|
{
|
|
@@ -3457,21 +3497,21 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3457
3497
|
y: t - r / 2,
|
|
3458
3498
|
width: n,
|
|
3459
3499
|
height: r,
|
|
3460
|
-
rx:
|
|
3461
|
-
ry:
|
|
3500
|
+
rx: an,
|
|
3501
|
+
ry: an
|
|
3462
3502
|
}
|
|
3463
3503
|
),
|
|
3464
3504
|
/* @__PURE__ */ a("text", { className: h, x: e, y: t, textAnchor: "middle", dominantBaseline: "central", children: o })
|
|
3465
3505
|
] });
|
|
3466
|
-
},
|
|
3467
|
-
if (e === "aggregate") return
|
|
3468
|
-
if (t === "outside" && n === "cartesian") return
|
|
3469
|
-
},
|
|
3470
|
-
dataLabel: { x:
|
|
3471
|
-
stackTotal: { x:
|
|
3472
|
-
},
|
|
3506
|
+
}, Hu = (e, t, n) => {
|
|
3507
|
+
if (e === "aggregate") return Eu;
|
|
3508
|
+
if (t === "outside" && n === "cartesian") return Au;
|
|
3509
|
+
}, Fu = {
|
|
3510
|
+
dataLabel: { x: lo, y: co },
|
|
3511
|
+
stackTotal: { x: Cu, y: Tu }
|
|
3512
|
+
}, Nu = ({ panelRect: e, formattingLocale: t }) => {
|
|
3473
3513
|
const n = ve(), r = B(
|
|
3474
|
-
|
|
3514
|
+
j((l) => ({
|
|
3475
3515
|
layers: l.layers,
|
|
3476
3516
|
coordSystem: l.coordSystem,
|
|
3477
3517
|
axes: l.guides.axes,
|
|
@@ -3480,14 +3520,14 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3480
3520
|
textScale: l.config.appearance.textScale
|
|
3481
3521
|
}))
|
|
3482
3522
|
), o = v(() => {
|
|
3483
|
-
const l =
|
|
3523
|
+
const l = te(io, r.textScale);
|
|
3484
3524
|
return {
|
|
3485
|
-
dataLabel: { family: ft, size: l, weight:
|
|
3486
|
-
stackTotal: { family: ft, size: l, weight:
|
|
3525
|
+
dataLabel: { family: ft, size: l, weight: so },
|
|
3526
|
+
stackTotal: { family: ft, size: l, weight: Lu }
|
|
3487
3527
|
};
|
|
3488
3528
|
}, [r.textScale]), i = v(
|
|
3489
3529
|
() => (l, d) => {
|
|
3490
|
-
const u = n.measureText(d, o[l]), h =
|
|
3530
|
+
const u = n.measureText(d, o[l]), h = Fu[l];
|
|
3491
3531
|
return {
|
|
3492
3532
|
...u,
|
|
3493
3533
|
width: u.width + h.x * 2,
|
|
@@ -3496,11 +3536,11 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3496
3536
|
},
|
|
3497
3537
|
[n, o]
|
|
3498
3538
|
), c = v(
|
|
3499
|
-
() =>
|
|
3539
|
+
() => Xo({ ...r, panelRect: e, measureDataLabel: i, formattingLocale: t }),
|
|
3500
3540
|
[r, e, i, t]
|
|
3501
3541
|
);
|
|
3502
|
-
return /* @__PURE__ */ a("g", { className:
|
|
3503
|
-
|
|
3542
|
+
return /* @__PURE__ */ a("g", { className: wu, transform: `translate(${e.x}, ${e.y})`, "data-testid": "data-labels", children: c.labels.map((l) => /* @__PURE__ */ a(
|
|
3543
|
+
uo,
|
|
3504
3544
|
{
|
|
3505
3545
|
x: l.x,
|
|
3506
3546
|
y: l.y,
|
|
@@ -3514,13 +3554,13 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3514
3554
|
},
|
|
3515
3555
|
l.key
|
|
3516
3556
|
)) });
|
|
3517
|
-
},
|
|
3557
|
+
}, Bu = ({ linePath: e, arrowheadPath: t, stroke: n, strokeWidth: r }) => {
|
|
3518
3558
|
const o = { stroke: n, strokeWidth: r, strokeLinecap: "round", fill: "none" };
|
|
3519
|
-
return /* @__PURE__ */
|
|
3559
|
+
return /* @__PURE__ */ m("g", { children: [
|
|
3520
3560
|
/* @__PURE__ */ a("path", { d: e, ...o }),
|
|
3521
3561
|
/* @__PURE__ */ a("path", { d: t, ...o, strokeLinejoin: "round" })
|
|
3522
3562
|
] });
|
|
3523
|
-
},
|
|
3563
|
+
}, Iu = ({
|
|
3524
3564
|
x: e,
|
|
3525
3565
|
y: t,
|
|
3526
3566
|
text: n,
|
|
@@ -3534,15 +3574,15 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3534
3574
|
const u = ve(), g = v(
|
|
3535
3575
|
() => u.measureText(n, { family: R, size: r, weight: d }),
|
|
3536
3576
|
[u, n, r, d]
|
|
3537
|
-
).width + o * 2,
|
|
3538
|
-
return /* @__PURE__ */
|
|
3577
|
+
).width + o * 2, p = r + i * 2;
|
|
3578
|
+
return /* @__PURE__ */ m("g", { style: { pointerEvents: "none" }, children: [
|
|
3539
3579
|
/* @__PURE__ */ a(
|
|
3540
3580
|
"rect",
|
|
3541
3581
|
{
|
|
3542
3582
|
x: e - g / 2,
|
|
3543
|
-
y: t -
|
|
3583
|
+
y: t - p / 2,
|
|
3544
3584
|
width: g,
|
|
3545
|
-
height:
|
|
3585
|
+
height: p,
|
|
3546
3586
|
rx: 4,
|
|
3547
3587
|
fill: s.graphBackground,
|
|
3548
3588
|
stroke: l,
|
|
@@ -3562,16 +3602,16 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3562
3602
|
}
|
|
3563
3603
|
)
|
|
3564
3604
|
] });
|
|
3565
|
-
},
|
|
3605
|
+
}, Mu = ({ panelRect: e, formattingLocale: t }) => {
|
|
3566
3606
|
const n = B(
|
|
3567
|
-
|
|
3607
|
+
j((o) => ({
|
|
3568
3608
|
differenceArrows: o.annotations.differenceArrows,
|
|
3569
3609
|
mainAxis: o.coordSystem.type === "cartesian" ? o.coordSystem.mainAxis : "x",
|
|
3570
3610
|
textScale: o.config.appearance.textScale
|
|
3571
3611
|
}))
|
|
3572
3612
|
), r = v(
|
|
3573
3613
|
() => n.differenceArrows.map(
|
|
3574
|
-
(o) =>
|
|
3614
|
+
(o) => Vo({
|
|
3575
3615
|
arrow: o,
|
|
3576
3616
|
mainAxis: n.mainAxis,
|
|
3577
3617
|
panelWidth: e.width,
|
|
@@ -3592,15 +3632,15 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3592
3632
|
labelPosition: u,
|
|
3593
3633
|
labelText: h,
|
|
3594
3634
|
labelLineHeight: g,
|
|
3595
|
-
labelPaddingX:
|
|
3596
|
-
labelPaddingY:
|
|
3635
|
+
labelPaddingX: p,
|
|
3636
|
+
labelPaddingY: f,
|
|
3597
3637
|
labelStrokeWidth: y,
|
|
3598
3638
|
labelFontWeight: S
|
|
3599
3639
|
}) => {
|
|
3600
3640
|
const k = o ?? s.defaultAnnotationArrowStroke;
|
|
3601
|
-
return /* @__PURE__ */
|
|
3641
|
+
return /* @__PURE__ */ m(xo.Fragment, { children: [
|
|
3602
3642
|
/* @__PURE__ */ a(
|
|
3603
|
-
|
|
3643
|
+
Bu,
|
|
3604
3644
|
{
|
|
3605
3645
|
linePath: c,
|
|
3606
3646
|
arrowheadPath: l,
|
|
@@ -3609,14 +3649,14 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3609
3649
|
}
|
|
3610
3650
|
),
|
|
3611
3651
|
/* @__PURE__ */ a(
|
|
3612
|
-
|
|
3652
|
+
Iu,
|
|
3613
3653
|
{
|
|
3614
3654
|
x: u.x,
|
|
3615
3655
|
y: u.y,
|
|
3616
3656
|
text: h,
|
|
3617
3657
|
lineHeight: g,
|
|
3618
|
-
paddingX:
|
|
3619
|
-
paddingY:
|
|
3658
|
+
paddingX: p,
|
|
3659
|
+
paddingY: f,
|
|
3620
3660
|
strokeWidth: y,
|
|
3621
3661
|
strokeColor: k,
|
|
3622
3662
|
fontWeight: S
|
|
@@ -3625,35 +3665,35 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3625
3665
|
] }, i);
|
|
3626
3666
|
}
|
|
3627
3667
|
) });
|
|
3628
|
-
},
|
|
3668
|
+
}, Du = 0, Ou = 1.15, sn = 1.15, Ru = "rgba(0, 0, 0, 0.16)", ln = 2, zu = 1.4, Gu = ({
|
|
3629
3669
|
arrow: e,
|
|
3630
3670
|
fallbackColor: t,
|
|
3631
3671
|
stickerOutlineColor: n,
|
|
3632
3672
|
stickerOutlineColorInverse: r
|
|
3633
3673
|
}) => {
|
|
3634
|
-
const o = vt(), i = e.color ?? t, c =
|
|
3674
|
+
const o = vt(), i = e.color ?? t, c = Wu(e.color, n, r), l = e.dashArray ? { strokeDasharray: e.dashArray, strokeDashoffset: e.dashOffset } : {}, d = e.arrowheadExtent + e.strokeWidth + ln + sn, u = {
|
|
3635
3675
|
x: Math.min(e.startX, e.endX) - d,
|
|
3636
3676
|
y: Math.min(e.startY, e.endY) - d,
|
|
3637
3677
|
width: Math.abs(e.endX - e.startX) + 2 * d,
|
|
3638
3678
|
height: Math.abs(e.endY - e.startY) + 2 * d
|
|
3639
3679
|
}, h = [e.linePath, e.startArrowheadPath, e.endArrowheadPath].filter((g) => g.length > 0).join(" ");
|
|
3640
|
-
return /* @__PURE__ */
|
|
3680
|
+
return /* @__PURE__ */ m("g", { children: [
|
|
3641
3681
|
e.hasStickerStyle && /* @__PURE__ */ a("defs", { children: /* @__PURE__ */ a("filter", { id: o, filterUnits: "userSpaceOnUse", ...u, children: /* @__PURE__ */ a(
|
|
3642
3682
|
"feDropShadow",
|
|
3643
3683
|
{
|
|
3644
|
-
dx:
|
|
3645
|
-
dy:
|
|
3646
|
-
stdDeviation:
|
|
3647
|
-
floodColor:
|
|
3684
|
+
dx: Du,
|
|
3685
|
+
dy: Ou,
|
|
3686
|
+
stdDeviation: sn,
|
|
3687
|
+
floodColor: Ru
|
|
3648
3688
|
}
|
|
3649
3689
|
) }) }),
|
|
3650
|
-
/* @__PURE__ */
|
|
3690
|
+
/* @__PURE__ */ m("g", { filter: e.hasStickerStyle ? `url(#${o})` : void 0, children: [
|
|
3651
3691
|
e.hasStickerStyle && /* @__PURE__ */ a(
|
|
3652
3692
|
"path",
|
|
3653
3693
|
{
|
|
3654
3694
|
d: h,
|
|
3655
3695
|
stroke: c,
|
|
3656
|
-
strokeWidth: e.strokeWidth + 2 *
|
|
3696
|
+
strokeWidth: e.strokeWidth + 2 * ln,
|
|
3657
3697
|
strokeLinecap: "round",
|
|
3658
3698
|
fill: "none"
|
|
3659
3699
|
}
|
|
@@ -3691,20 +3731,20 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3691
3731
|
)
|
|
3692
3732
|
] })
|
|
3693
3733
|
] });
|
|
3694
|
-
},
|
|
3734
|
+
}, Wu = (e, t, n) => {
|
|
3695
3735
|
if (e === null) return n;
|
|
3696
3736
|
try {
|
|
3697
|
-
return ct(e, t) <
|
|
3737
|
+
return ct(e, t) < zu ? n : t;
|
|
3698
3738
|
} catch {
|
|
3699
3739
|
return n;
|
|
3700
3740
|
}
|
|
3701
|
-
},
|
|
3702
|
-
const { themeValues: t } =
|
|
3703
|
-
() => n.map((o) =>
|
|
3741
|
+
}, $u = ({ panelRect: e }) => {
|
|
3742
|
+
const { themeValues: t } = _t(), n = B((o) => o.annotations.freeformArrows), r = v(
|
|
3743
|
+
() => n.map((o) => Uo({ arrow: o, panelWidth: e.width, panelHeight: e.height })).filter((o) => o !== null),
|
|
3704
3744
|
[n, e.width, e.height]
|
|
3705
3745
|
);
|
|
3706
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(
|
|
3707
|
-
|
|
3747
|
+
Gu,
|
|
3708
3748
|
{
|
|
3709
3749
|
arrow: o,
|
|
3710
3750
|
fallbackColor: s.defaultAnnotationArrowStroke,
|
|
@@ -3713,10 +3753,10 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3713
3753
|
},
|
|
3714
3754
|
o.id
|
|
3715
3755
|
)) });
|
|
3716
|
-
},
|
|
3717
|
-
const { tickLabelOffset: i } =
|
|
3718
|
-
return u ? /* @__PURE__ */ a("svg", { x: c, y: h ? "100%" : 0, style: { overflow: "visible" }, children: /* @__PURE__ */ a("text", { ...
|
|
3719
|
-
},
|
|
3756
|
+
}, Xu = ({ edge: e, areTicksVisible: t, position: n, labelRotation: r, label: o }) => {
|
|
3757
|
+
const { tickLabelOffset: i } = wt(), 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", { ...Uu(h, l, r), ...d, children: o }) }) : /* @__PURE__ */ a("text", { ...Vu(e, c, l), ...d, children: o });
|
|
3759
|
+
}, Vu = (e, t, n) => {
|
|
3720
3760
|
switch (e) {
|
|
3721
3761
|
case "bottom":
|
|
3722
3762
|
return {
|
|
@@ -3749,7 +3789,7 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3749
3789
|
dominantBaseline: "central"
|
|
3750
3790
|
};
|
|
3751
3791
|
}
|
|
3752
|
-
},
|
|
3792
|
+
}, Uu = (e, t, n) => {
|
|
3753
3793
|
const r = e ? -t : t;
|
|
3754
3794
|
return {
|
|
3755
3795
|
x: 0,
|
|
@@ -3758,16 +3798,16 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3758
3798
|
dominantBaseline: "central",
|
|
3759
3799
|
transform: `rotate(${n}, 0, ${r})`
|
|
3760
3800
|
};
|
|
3761
|
-
},
|
|
3801
|
+
}, Yu = ({ formattedAxis: e, rect: t }) => {
|
|
3762
3802
|
const n = e.position === "bottom" || e.position === "top";
|
|
3763
|
-
return /* @__PURE__ */
|
|
3764
|
-
|
|
3803
|
+
return /* @__PURE__ */ m("svg", { x: t.x, y: t.y, width: t.width, height: t.height, style: { overflow: "visible" }, children: [
|
|
3804
|
+
ur,
|
|
3765
3805
|
e.ticks.map((r, o) => {
|
|
3766
|
-
const i = r.formattedLabel, c = n ? r.position : 1 - r.position, l =
|
|
3767
|
-
return /* @__PURE__ */
|
|
3806
|
+
const i = r.formattedLabel, c = n ? r.position : 1 - r.position, l = ju(e.position, c, t);
|
|
3807
|
+
return /* @__PURE__ */ m("g", { children: [
|
|
3768
3808
|
e.ticksVisible && /* @__PURE__ */ a("line", { ...l, stroke: s.gridLineColor, strokeWidth: 1 }),
|
|
3769
3809
|
/* @__PURE__ */ a(
|
|
3770
|
-
|
|
3810
|
+
Xu,
|
|
3771
3811
|
{
|
|
3772
3812
|
edge: e.position,
|
|
3773
3813
|
areTicksVisible: e.ticksVisible,
|
|
@@ -3779,7 +3819,7 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3779
3819
|
] }, o);
|
|
3780
3820
|
})
|
|
3781
3821
|
] });
|
|
3782
|
-
},
|
|
3822
|
+
}, ju = (e, t, n) => {
|
|
3783
3823
|
const r = x(t);
|
|
3784
3824
|
switch (e) {
|
|
3785
3825
|
case "bottom":
|
|
@@ -3791,15 +3831,15 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3791
3831
|
case "right":
|
|
3792
3832
|
return { x1: 0, y1: r, x2: Fe, y2: r };
|
|
3793
3833
|
}
|
|
3794
|
-
},
|
|
3834
|
+
}, qu = ({ axes: e, rects: t }) => /* @__PURE__ */ a(T, { children: e.map((n) => {
|
|
3795
3835
|
const r = t[n.position];
|
|
3796
3836
|
if (!r || !n.isVisible) return null;
|
|
3797
|
-
const o =
|
|
3798
|
-
return /* @__PURE__ */
|
|
3799
|
-
|
|
3837
|
+
const o = Ku(n.position, r);
|
|
3838
|
+
return /* @__PURE__ */ m("g", { transform: `translate(${r.x}, ${r.y})`, children: [
|
|
3839
|
+
ur,
|
|
3800
3840
|
/* @__PURE__ */ a("text", { style: { font: s.fontAxisLabel }, fill: s.textPrimary, ...o, children: n.label })
|
|
3801
3841
|
] }, `axis-label-${n.position}`);
|
|
3802
|
-
}) }),
|
|
3842
|
+
}) }), Ku = (e, t) => {
|
|
3803
3843
|
const n = {
|
|
3804
3844
|
x: t.width / 2,
|
|
3805
3845
|
y: t.height / 2,
|
|
@@ -3807,18 +3847,15 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3807
3847
|
dominantBaseline: "middle"
|
|
3808
3848
|
};
|
|
3809
3849
|
return e === "left" ? (n.x = 0, n.textAnchor = "start") : e === "right" && (n.x = t.width, n.textAnchor = "end"), n;
|
|
3810
|
-
},
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
}),
|
|
3815
|
-
/* @__PURE__ */ a(Wu, { axes: e, rects: n })
|
|
3816
|
-
] }), ln = {
|
|
3850
|
+
}, Ju = ({ formattedAxes: e, tickRects: t }) => /* @__PURE__ */ a(T, { children: e.map((n) => {
|
|
3851
|
+
const r = t[n.position];
|
|
3852
|
+
return !r || !n.isVisible ? null : /* @__PURE__ */ a(Yu, { formattedAxis: n, rect: r }, n.scaleAestheticKey);
|
|
3853
|
+
}) }), Zu = ({ formattedAxes: e, labelRects: t }) => /* @__PURE__ */ a(qu, { axes: e, rects: t }), cn = {
|
|
3817
3854
|
strokeWidth: s.gridLineWidth,
|
|
3818
3855
|
strokeDashoffset: "0",
|
|
3819
3856
|
strokeDasharray: s.gridLineDash,
|
|
3820
3857
|
strokeLinecap: "round"
|
|
3821
|
-
},
|
|
3858
|
+
}, Qu = ({ axes: e, panel: t, panelRect: n }) => /* @__PURE__ */ m(
|
|
3822
3859
|
"svg",
|
|
3823
3860
|
{
|
|
3824
3861
|
x: n.x,
|
|
@@ -3838,7 +3875,7 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3838
3875
|
stroke: s.gridLineColor,
|
|
3839
3876
|
rx: 8,
|
|
3840
3877
|
ry: 8,
|
|
3841
|
-
...
|
|
3878
|
+
...cn
|
|
3842
3879
|
}
|
|
3843
3880
|
),
|
|
3844
3881
|
e.map((r) => {
|
|
@@ -3847,12 +3884,12 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3847
3884
|
return /* @__PURE__ */ a("g", { children: r.ticks.map((i, c) => {
|
|
3848
3885
|
if (i.position <= 0 || i.position >= 1) return null;
|
|
3849
3886
|
const l = o ? i.position : 1 - i.position, d = x(l);
|
|
3850
|
-
return /* @__PURE__ */ a("line", { ...o ? { x1: d, y1: 0, x2: d, y2: "100%" } : { x1: 0, y1: d, x2: "100%", y2: d }, ...
|
|
3887
|
+
return /* @__PURE__ */ a("line", { ...o ? { x1: d, y1: 0, x2: d, y2: "100%" } : { x1: 0, y1: d, x2: "100%", y2: d }, ...cn, stroke: s.gridLineColor }, c);
|
|
3851
3888
|
}) }, r.scaleAestheticKey);
|
|
3852
3889
|
})
|
|
3853
3890
|
]
|
|
3854
3891
|
}
|
|
3855
|
-
),
|
|
3892
|
+
), dn = ({ panelRect: e, zOrder: t }) => {
|
|
3856
3893
|
const r = B((o) => o.annotations.shapes).filter((o) => o.zOrder === t);
|
|
3857
3894
|
return r.length === 0 ? null : /* @__PURE__ */ a(
|
|
3858
3895
|
"svg",
|
|
@@ -3863,7 +3900,7 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3863
3900
|
height: e.height,
|
|
3864
3901
|
overflow: "visible",
|
|
3865
3902
|
"data-testid": `shapes-${t}`,
|
|
3866
|
-
children: r.map(({ id: o, x: i, y: c, width: l, height: d, fillColor: u, fillOpacity: h, strokeWidth: g, strokeColor:
|
|
3903
|
+
children: r.map(({ id: o, x: i, y: c, width: l, height: d, fillColor: u, fillOpacity: h, strokeWidth: g, strokeColor: p }) => /* @__PURE__ */ a(
|
|
3867
3904
|
"rect",
|
|
3868
3905
|
{
|
|
3869
3906
|
x: x(i),
|
|
@@ -3872,7 +3909,7 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3872
3909
|
height: x(d),
|
|
3873
3910
|
fill: u,
|
|
3874
3911
|
fillOpacity: h,
|
|
3875
|
-
stroke: g > 0 ?
|
|
3912
|
+
stroke: g > 0 ? p ?? s.defaultAnnotationShapeStroke : "none",
|
|
3876
3913
|
strokeWidth: g
|
|
3877
3914
|
},
|
|
3878
3915
|
o
|
|
@@ -3880,8 +3917,8 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3880
3917
|
}
|
|
3881
3918
|
);
|
|
3882
3919
|
};
|
|
3883
|
-
var
|
|
3884
|
-
const
|
|
3920
|
+
var eh = "_120wioc0";
|
|
3921
|
+
const th = ({ panelRect: e }) => {
|
|
3885
3922
|
const t = B((n) => n.annotations.textAnnotations);
|
|
3886
3923
|
return t.length === 0 ? null : /* @__PURE__ */ a(
|
|
3887
3924
|
"svg",
|
|
@@ -3903,8 +3940,8 @@ const Yu = ({ panelRect: e }) => {
|
|
|
3903
3940
|
children: /* @__PURE__ */ a(
|
|
3904
3941
|
"div",
|
|
3905
3942
|
{
|
|
3906
|
-
className:
|
|
3907
|
-
style:
|
|
3943
|
+
className: eh,
|
|
3944
|
+
style: nh(n.backgroundColor, n.backgroundColorStyle),
|
|
3908
3945
|
children: /* @__PURE__ */ a(De, { content: n.content })
|
|
3909
3946
|
}
|
|
3910
3947
|
)
|
|
@@ -3913,17 +3950,17 @@ const Yu = ({ panelRect: e }) => {
|
|
|
3913
3950
|
))
|
|
3914
3951
|
}
|
|
3915
3952
|
);
|
|
3916
|
-
},
|
|
3953
|
+
}, nh = (e, t) => e === null || e === "transparent" ? { color: s.textPrimary } : t === "fade" ? {
|
|
3917
3954
|
color: s.textPrimary,
|
|
3918
3955
|
backgroundColor: dt(e, s.grey100, 0.5),
|
|
3919
3956
|
boxShadow: `0 0 0 1.5px ${dt(e, s.grey0, 0.2)}`
|
|
3920
3957
|
} : {
|
|
3921
3958
|
color: s.textPrimary,
|
|
3922
3959
|
backgroundColor: e,
|
|
3923
|
-
boxShadow: `0 0 0 1.5px ${
|
|
3960
|
+
boxShadow: `0 0 0 1.5px ${je(e, 0.1)}`
|
|
3924
3961
|
};
|
|
3925
|
-
var
|
|
3926
|
-
const
|
|
3962
|
+
var rh = "usd3ea0", oh = "usd3ea1";
|
|
3963
|
+
const ah = ({
|
|
3927
3964
|
layer: e,
|
|
3928
3965
|
coordSystem: t,
|
|
3929
3966
|
isAnimated: n,
|
|
@@ -3931,22 +3968,22 @@ const Ju = ({
|
|
|
3931
3968
|
highlightStyle: o,
|
|
3932
3969
|
formattingLocale: i
|
|
3933
3970
|
}) => {
|
|
3934
|
-
const c =
|
|
3935
|
-
return c === null ? /* @__PURE__ */
|
|
3971
|
+
const c = qe(e, t);
|
|
3972
|
+
return c === null ? /* @__PURE__ */ m("text", { children: [
|
|
3936
3973
|
e.geom,
|
|
3937
3974
|
" not implemented"
|
|
3938
3975
|
] }) : /* @__PURE__ */ a(
|
|
3939
3976
|
"g",
|
|
3940
3977
|
{
|
|
3941
|
-
className:
|
|
3942
|
-
[
|
|
3943
|
-
[
|
|
3978
|
+
className: re({
|
|
3979
|
+
[oh]: r && o === "desaturate",
|
|
3980
|
+
[rh]: r && o === "dim"
|
|
3944
3981
|
}),
|
|
3945
3982
|
children: c.render({ layer: e, coordSystem: t, isAnimated: n, formattingLocale: i })
|
|
3946
3983
|
}
|
|
3947
3984
|
);
|
|
3948
3985
|
};
|
|
3949
|
-
function
|
|
3986
|
+
function ih({
|
|
3950
3987
|
plugin: e,
|
|
3951
3988
|
layer: t,
|
|
3952
3989
|
coordSystem: n,
|
|
@@ -3960,7 +3997,7 @@ function Zu({
|
|
|
3960
3997
|
}
|
|
3961
3998
|
return o;
|
|
3962
3999
|
}
|
|
3963
|
-
const
|
|
4000
|
+
const sh = 4, lh = ({
|
|
3964
4001
|
plugin: e,
|
|
3965
4002
|
layer: t,
|
|
3966
4003
|
matchedLayer: n,
|
|
@@ -3971,33 +4008,33 @@ const Qu = 4, eh = ({
|
|
|
3971
4008
|
formattingLocale: l
|
|
3972
4009
|
}) => {
|
|
3973
4010
|
const { numberFormat: d, textScale: u } = B(
|
|
3974
|
-
|
|
4011
|
+
j((y) => ({
|
|
3975
4012
|
numberFormat: y.config.numberFormat,
|
|
3976
4013
|
textScale: y.config.appearance.textScale
|
|
3977
4014
|
}))
|
|
3978
4015
|
), h = v(
|
|
3979
|
-
() =>
|
|
4016
|
+
() => ih({ plugin: e, layer: t, coordSystem: o, candidates: r }),
|
|
3980
4017
|
[e, t, o, r]
|
|
3981
|
-
), g = v(() =>
|
|
3982
|
-
() =>
|
|
4018
|
+
), g = v(() => Yo(t), [t]), p = v(
|
|
4019
|
+
() => jo({ layer: t, numberFormat: d, locale: l }),
|
|
3983
4020
|
[d, t, l]
|
|
3984
|
-
),
|
|
3985
|
-
return e === null || n === null && h.length === 0 ? null : /* @__PURE__ */
|
|
4021
|
+
), f = io * Lr * u;
|
|
4022
|
+
return e === null || n === null && h.length === 0 ? null : /* @__PURE__ */ m(T, { children: [
|
|
3986
4023
|
n ? e.render({ layer: n, coordSystem: o, isAnimated: i, formattingLocale: l }) : null,
|
|
3987
4024
|
h.map(({ observation: y, observationIndex: S, anchor: k }) => /* @__PURE__ */ a(
|
|
3988
|
-
|
|
4025
|
+
ch,
|
|
3989
4026
|
{
|
|
3990
4027
|
observation: y,
|
|
3991
4028
|
anchor: k,
|
|
3992
4029
|
panelRect: c,
|
|
3993
4030
|
readSegmentY: g,
|
|
3994
|
-
formatYValue:
|
|
3995
|
-
labelFontSizePx:
|
|
4031
|
+
formatYValue: p,
|
|
4032
|
+
labelFontSizePx: f
|
|
3996
4033
|
},
|
|
3997
|
-
|
|
4034
|
+
dh(y, S)
|
|
3998
4035
|
))
|
|
3999
4036
|
] });
|
|
4000
|
-
},
|
|
4037
|
+
}, ch = ({
|
|
4001
4038
|
observation: e,
|
|
4002
4039
|
anchor: t,
|
|
4003
4040
|
panelRect: n,
|
|
@@ -4005,19 +4042,19 @@ const Qu = 4, eh = ({
|
|
|
4005
4042
|
formatYValue: o,
|
|
4006
4043
|
labelFontSizePx: i
|
|
4007
4044
|
}) => {
|
|
4008
|
-
const c = ve(), l = Ge(t.x), d = ze(t.y), u = (Re(e) ??
|
|
4045
|
+
const c = ve(), l = Ge(t.x), d = ze(t.y), u = (Re(e) ?? Zr) / 2, h = r(e), g = bn(h) ? o(h, e) : null, p = v(() => {
|
|
4009
4046
|
if (g === null) return null;
|
|
4010
|
-
const
|
|
4047
|
+
const f = c.measureText(g, {
|
|
4011
4048
|
family: ft,
|
|
4012
4049
|
size: i,
|
|
4013
|
-
weight:
|
|
4050
|
+
weight: so
|
|
4014
4051
|
});
|
|
4015
4052
|
return {
|
|
4016
|
-
width:
|
|
4017
|
-
height:
|
|
4053
|
+
width: f.width + lo * 2,
|
|
4054
|
+
height: f.height + co * 2
|
|
4018
4055
|
};
|
|
4019
4056
|
}, [g, c, i]);
|
|
4020
|
-
return /* @__PURE__ */
|
|
4057
|
+
return /* @__PURE__ */ m(T, { children: [
|
|
4021
4058
|
/* @__PURE__ */ a(
|
|
4022
4059
|
"circle",
|
|
4023
4060
|
{
|
|
@@ -4028,13 +4065,13 @@ const Qu = 4, eh = ({
|
|
|
4028
4065
|
fill: z(e)
|
|
4029
4066
|
}
|
|
4030
4067
|
),
|
|
4031
|
-
g !== null &&
|
|
4032
|
-
|
|
4068
|
+
g !== null && p !== null && /* @__PURE__ */ a(
|
|
4069
|
+
uo,
|
|
4033
4070
|
{
|
|
4034
4071
|
x: l * n.width,
|
|
4035
|
-
y: d * n.height - u -
|
|
4036
|
-
width:
|
|
4037
|
-
height:
|
|
4072
|
+
y: d * n.height - u - sh - p.height / 2,
|
|
4073
|
+
width: p.width,
|
|
4074
|
+
height: p.height,
|
|
4038
4075
|
text: g,
|
|
4039
4076
|
isRotated: !1,
|
|
4040
4077
|
target: "observation",
|
|
@@ -4043,19 +4080,19 @@ const Qu = 4, eh = ({
|
|
|
4043
4080
|
}
|
|
4044
4081
|
)
|
|
4045
4082
|
] });
|
|
4046
|
-
},
|
|
4047
|
-
const n = e[
|
|
4083
|
+
}, dh = (e, t) => {
|
|
4084
|
+
const n = e[Ae.group];
|
|
4048
4085
|
return `${String(n ?? "")}\0${t}`;
|
|
4049
|
-
},
|
|
4050
|
-
const { primary: r, group: o, related: i } =
|
|
4051
|
-
|
|
4086
|
+
}, uh = ({ layer: e, coordSystem: t, panelRect: n }) => {
|
|
4087
|
+
const { primary: r, group: o, related: i } = Tt(
|
|
4088
|
+
j((d) => ({
|
|
4052
4089
|
primary: d.hover.primary,
|
|
4053
4090
|
group: d.hover.group,
|
|
4054
4091
|
related: d.hover.related
|
|
4055
4092
|
}))
|
|
4056
4093
|
);
|
|
4057
4094
|
if (r === null) return null;
|
|
4058
|
-
const c =
|
|
4095
|
+
const c = qe(e, t);
|
|
4059
4096
|
if (c === null) return null;
|
|
4060
4097
|
const l = i.get(e.id) ?? [];
|
|
4061
4098
|
return r.layerId === e.id ? c.renderHover({
|
|
@@ -4067,10 +4104,10 @@ const Qu = 4, eh = ({
|
|
|
4067
4104
|
panelRect: n
|
|
4068
4105
|
}) : l.length === 0 ? null : c.renderHoverCompanions({ layer: e, primary: r, related: l });
|
|
4069
4106
|
};
|
|
4070
|
-
var
|
|
4071
|
-
const
|
|
4107
|
+
var hh = "to1jkx0", gh = "to1jkx1";
|
|
4108
|
+
const ph = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
4072
4109
|
const { layers: r, coordSystem: o, highlightStyle: i } = B(
|
|
4073
|
-
|
|
4110
|
+
j((c) => ({
|
|
4074
4111
|
layers: c.layers,
|
|
4075
4112
|
coordSystem: c.coordSystem,
|
|
4076
4113
|
highlightStyle: c.config.appearance.highlightStyle
|
|
@@ -4083,11 +4120,11 @@ const ih = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4083
4120
|
y: t.y,
|
|
4084
4121
|
width: t.width,
|
|
4085
4122
|
height: t.height,
|
|
4086
|
-
className:
|
|
4123
|
+
className: hh,
|
|
4087
4124
|
"data-testid": "geom-layers",
|
|
4088
|
-
children: r.map((c) => /* @__PURE__ */
|
|
4125
|
+
children: r.map((c) => /* @__PURE__ */ m(hn, { children: [
|
|
4089
4126
|
/* @__PURE__ */ a(
|
|
4090
|
-
|
|
4127
|
+
vh,
|
|
4091
4128
|
{
|
|
4092
4129
|
layer: c,
|
|
4093
4130
|
coordSystem: o,
|
|
@@ -4097,14 +4134,14 @@ const ih = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4097
4134
|
formattingLocale: n
|
|
4098
4135
|
}
|
|
4099
4136
|
),
|
|
4100
|
-
/* @__PURE__ */ a(
|
|
4101
|
-
] }, `${c.id}-${
|
|
4137
|
+
/* @__PURE__ */ a(uh, { layer: c, coordSystem: o, panelRect: t })
|
|
4138
|
+
] }, `${c.id}-${fh(o)}`))
|
|
4102
4139
|
}
|
|
4103
4140
|
);
|
|
4104
|
-
},
|
|
4141
|
+
}, fh = (e) => e.type === "cartesian" ? `cartesian-${e.mainAxis}` : e.type, mh = (e) => {
|
|
4105
4142
|
if (e.geom !== "rule")
|
|
4106
|
-
return
|
|
4107
|
-
},
|
|
4143
|
+
return gh;
|
|
4144
|
+
}, vh = ({
|
|
4108
4145
|
layer: e,
|
|
4109
4146
|
coordSystem: t,
|
|
4110
4147
|
highlightStyle: n,
|
|
@@ -4112,10 +4149,10 @@ const ih = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4112
4149
|
panelRect: o,
|
|
4113
4150
|
formattingLocale: i
|
|
4114
4151
|
}) => {
|
|
4115
|
-
const c = v(() =>
|
|
4116
|
-
return /* @__PURE__ */
|
|
4152
|
+
const c = v(() => qe(e, t), [e, t]), l = e.highlight;
|
|
4153
|
+
return /* @__PURE__ */ m("g", { className: mh(e), children: [
|
|
4117
4154
|
/* @__PURE__ */ a(
|
|
4118
|
-
|
|
4155
|
+
ah,
|
|
4119
4156
|
{
|
|
4120
4157
|
layer: e,
|
|
4121
4158
|
coordSystem: t,
|
|
@@ -4126,7 +4163,7 @@ const ih = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4126
4163
|
}
|
|
4127
4164
|
),
|
|
4128
4165
|
l !== null && /* @__PURE__ */ a(
|
|
4129
|
-
|
|
4166
|
+
lh,
|
|
4130
4167
|
{
|
|
4131
4168
|
plugin: c,
|
|
4132
4169
|
layer: e,
|
|
@@ -4140,8 +4177,8 @@ const ih = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4140
4177
|
)
|
|
4141
4178
|
] });
|
|
4142
4179
|
};
|
|
4143
|
-
var
|
|
4144
|
-
const
|
|
4180
|
+
var yh = "_17uhij30";
|
|
4181
|
+
const bh = ({
|
|
4145
4182
|
formattedAxes: e,
|
|
4146
4183
|
panelGuide: t,
|
|
4147
4184
|
plotRect: n,
|
|
@@ -4151,81 +4188,82 @@ const uh = ({
|
|
|
4151
4188
|
shouldAnimate: c,
|
|
4152
4189
|
formattingLocale: l
|
|
4153
4190
|
}) => {
|
|
4154
|
-
const d =
|
|
4155
|
-
|
|
4156
|
-
const u =
|
|
4157
|
-
return /* @__PURE__ */
|
|
4191
|
+
const d = C(null);
|
|
4192
|
+
ku(d);
|
|
4193
|
+
const u = Q("Grid", Qu), h = Q("AxisTicks", Ju), g = Q("AxisLabel", Zu), p = v(() => ho(r, n), [r, n]), f = v(() => un(o, n), [o, n]), y = v(() => un(i, n), [i, n]);
|
|
4194
|
+
return /* @__PURE__ */ m(
|
|
4158
4195
|
"svg",
|
|
4159
4196
|
{
|
|
4160
4197
|
ref: d,
|
|
4161
|
-
className:
|
|
4198
|
+
className: yh,
|
|
4162
4199
|
width: n.width,
|
|
4163
4200
|
height: n.height,
|
|
4164
4201
|
style: { transform: `translate(${n.x}px, ${n.y}px)` },
|
|
4165
4202
|
"data-testid": "plot",
|
|
4166
4203
|
children: [
|
|
4167
|
-
/* @__PURE__ */ a(u, { axes: e, panel: t, panelRect:
|
|
4168
|
-
/* @__PURE__ */ a(
|
|
4169
|
-
/* @__PURE__ */ a(h, { formattedAxes: e, tickRects:
|
|
4170
|
-
/* @__PURE__ */ a(
|
|
4171
|
-
/* @__PURE__ */ a(
|
|
4172
|
-
/* @__PURE__ */ a(
|
|
4173
|
-
/* @__PURE__ */ a(
|
|
4174
|
-
/* @__PURE__ */ a(
|
|
4175
|
-
/* @__PURE__ */ a(
|
|
4176
|
-
/* @__PURE__ */ a(
|
|
4177
|
-
/* @__PURE__ */ a(
|
|
4204
|
+
/* @__PURE__ */ a(u, { axes: e, panel: t, panelRect: p }),
|
|
4205
|
+
/* @__PURE__ */ a(pu, { panelRect: p }),
|
|
4206
|
+
/* @__PURE__ */ a(h, { formattedAxes: e, tickRects: f }),
|
|
4207
|
+
/* @__PURE__ */ a(g, { formattedAxes: e, labelRects: y }),
|
|
4208
|
+
/* @__PURE__ */ a(dn, { panelRect: p, zOrder: "background" }),
|
|
4209
|
+
/* @__PURE__ */ a(ph, { shouldAnimate: c, panelRect: p, formattingLocale: l }),
|
|
4210
|
+
/* @__PURE__ */ a(Nu, { panelRect: p, formattingLocale: l }),
|
|
4211
|
+
/* @__PURE__ */ a(Mu, { panelRect: p, formattingLocale: l }),
|
|
4212
|
+
/* @__PURE__ */ a(dn, { panelRect: p, zOrder: "foreground" }),
|
|
4213
|
+
/* @__PURE__ */ a($u, { panelRect: p }),
|
|
4214
|
+
/* @__PURE__ */ a(th, { panelRect: p }),
|
|
4215
|
+
/* @__PURE__ */ a(Su, { panelRect: p })
|
|
4178
4216
|
]
|
|
4179
4217
|
}
|
|
4180
4218
|
);
|
|
4181
|
-
},
|
|
4219
|
+
}, ho = (e, t) => ({
|
|
4182
4220
|
x: e.x - t.x,
|
|
4183
4221
|
y: e.y - t.y,
|
|
4184
4222
|
width: e.width,
|
|
4185
4223
|
height: e.height
|
|
4186
|
-
}),
|
|
4224
|
+
}), un = (e, t) => {
|
|
4187
4225
|
const n = {};
|
|
4188
4226
|
for (const [r, o] of Object.entries(e))
|
|
4189
|
-
n[r] =
|
|
4227
|
+
n[r] = ho(o, t);
|
|
4190
4228
|
return n;
|
|
4191
4229
|
}, st = {
|
|
4192
4230
|
headerSize: { width: 0, height: 0 },
|
|
4193
4231
|
footerSize: { width: 0, height: 0 }
|
|
4194
|
-
},
|
|
4232
|
+
}, xh = () => {
|
|
4195
4233
|
const [e, t] = E(null), [n, r] = E(null), [o, i] = E(st);
|
|
4196
4234
|
return L(() => {
|
|
4197
4235
|
const c = () => {
|
|
4198
4236
|
const d = e ? { width: e.offsetWidth, height: e.offsetHeight } : st.headerSize, u = n ? { width: n.offsetWidth, height: n.offsetHeight } : st.footerSize;
|
|
4199
|
-
i((h) =>
|
|
4237
|
+
i((h) => Sh(h, { headerSize: d, footerSize: u }) ? { headerSize: d, footerSize: u } : h);
|
|
4200
4238
|
};
|
|
4201
4239
|
c();
|
|
4202
4240
|
const l = new ResizeObserver(c);
|
|
4203
4241
|
return e && l.observe(e), n && l.observe(n), () => l.disconnect();
|
|
4204
4242
|
}, [e, n]), { headerRef: t, footerRef: r, measurements: o };
|
|
4205
|
-
},
|
|
4206
|
-
const { theme: o, themeClass: i, inlineVarsStyle: c } =
|
|
4207
|
-
const
|
|
4208
|
-
return y !== null && (
|
|
4243
|
+
}, Sh = (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, kh = ({ appearance: e, isEditable: t, style: n, children: r }) => {
|
|
4244
|
+
const { theme: o, themeClass: i, inlineVarsStyle: c } = _t(), l = as(e.border), d = Math.max(0, e.cornerRadius), u = d === 0 ? 0 : d + l, h = v(() => {
|
|
4245
|
+
const f = { ...n, borderRadius: `${u}px`, ...c }, y = os(e.border, o);
|
|
4246
|
+
return y !== null && (f.background = y), f;
|
|
4209
4247
|
}, [n, u, c, e.border, o]), g = v(
|
|
4210
4248
|
() => ({
|
|
4211
4249
|
inset: `${l}px`,
|
|
4212
4250
|
borderRadius: `${d}px`
|
|
4213
4251
|
}),
|
|
4214
4252
|
[l, d]
|
|
4215
|
-
),
|
|
4216
|
-
return /* @__PURE__ */ a("div", { "data-testid": "graph-wrapper", className:
|
|
4253
|
+
), p = t && e.background.type === "solid" && e.background.color === "transparent";
|
|
4254
|
+
return /* @__PURE__ */ a("div", { "data-testid": "graph-wrapper", className: re(cs, i), style: h, children: /* @__PURE__ */ a(
|
|
4217
4255
|
"div",
|
|
4218
4256
|
{
|
|
4219
4257
|
"data-testid": "graph-inner",
|
|
4220
|
-
className:
|
|
4258
|
+
className: re(us, { [hs]: p }),
|
|
4221
4259
|
style: g,
|
|
4222
4260
|
children: r
|
|
4223
4261
|
}
|
|
4224
4262
|
) });
|
|
4225
|
-
},
|
|
4263
|
+
}, ig = ({ slots: e, ...t }) => {
|
|
4226
4264
|
const { formattingLocale: n } = me(), r = B((o) => o.config.parsingLocale);
|
|
4227
|
-
return /* @__PURE__ */ a(
|
|
4228
|
-
},
|
|
4265
|
+
return /* @__PURE__ */ a(Xa, { children: /* @__PURE__ */ a(Fc, { children: /* @__PURE__ */ a(ea, { locale: n ?? r, children: /* @__PURE__ */ a(Ja, { slots: e, children: /* @__PURE__ */ a(Lh, { ...t }) }) }) }) });
|
|
4266
|
+
}, Lh = ({
|
|
4229
4267
|
width: e,
|
|
4230
4268
|
height: t,
|
|
4231
4269
|
isAnimated: n,
|
|
@@ -4239,13 +4277,13 @@ const uh = ({
|
|
|
4239
4277
|
numberFormat: u,
|
|
4240
4278
|
parsingLocale: h,
|
|
4241
4279
|
appearance: g,
|
|
4242
|
-
annotations:
|
|
4243
|
-
coordSystem:
|
|
4280
|
+
annotations: p,
|
|
4281
|
+
coordSystem: f,
|
|
4244
4282
|
headline: y,
|
|
4245
4283
|
headlineConfig: S,
|
|
4246
4284
|
content: k
|
|
4247
4285
|
} = B(
|
|
4248
|
-
|
|
4286
|
+
j((G) => ({
|
|
4249
4287
|
axes: G.guides.axes,
|
|
4250
4288
|
panel: G.guides.panel,
|
|
4251
4289
|
legends: G.guides.legends,
|
|
@@ -4258,54 +4296,55 @@ const uh = ({
|
|
|
4258
4296
|
headlineConfig: G.config.headline,
|
|
4259
4297
|
content: G.config.content
|
|
4260
4298
|
}))
|
|
4261
|
-
), w =
|
|
4262
|
-
() =>
|
|
4263
|
-
[d, u, h,
|
|
4264
|
-
),
|
|
4265
|
-
() =>
|
|
4266
|
-
[y, S.show, u, h,
|
|
4267
|
-
),
|
|
4299
|
+
), w = Qo(), { headerRef: A, footerRef: I, measurements: _ } = xh(), { formattingLocale: V, theme: Ke, themeOverrides: Je } = me(), be = v(() => xr(Ke, Je), [Ke, Je]), go = Q("Header", ql), po = Q("Footer", Il), fo = Q("Legend", dd), mo = Q("Headline", vc), Bt = v(
|
|
4300
|
+
() => qo({ legends: d, numberFormat: u, parsingLocale: h, formattingLocale: V }),
|
|
4301
|
+
[d, u, h, V]
|
|
4302
|
+
), xe = v(
|
|
4303
|
+
() => Ko({ headline: y, show: S.show, numberFormat: u, parsingLocale: h, formattingLocale: V, t: i }),
|
|
4304
|
+
[y, S.show, u, h, V, i]
|
|
4305
|
+
), vo = ve(), Ze = g.border.type === "none" ? 0 : g.border.width, Qe = v(
|
|
4268
4306
|
() => ({
|
|
4269
4307
|
width: Math.max(0, e - 2 * Ze),
|
|
4270
4308
|
height: Math.max(0, t - 2 * Ze)
|
|
4271
4309
|
}),
|
|
4272
4310
|
[e, t, Ze]
|
|
4273
4311
|
), Ee = v(
|
|
4274
|
-
() =>
|
|
4275
|
-
formatted:
|
|
4312
|
+
() => xe ? {
|
|
4313
|
+
formatted: xe,
|
|
4276
4314
|
size: S.size,
|
|
4277
4315
|
position: S.position,
|
|
4278
|
-
innerRadius:
|
|
4316
|
+
innerRadius: f.type === "polar" ? f.innerRadius : 0
|
|
4279
4317
|
} : void 0,
|
|
4280
|
-
[
|
|
4281
|
-
), _e =
|
|
4318
|
+
[xe, S.size, S.position, f]
|
|
4319
|
+
), yo = Za(), _e = qi(vo, g.textScale, be, yo), Se = Ki({
|
|
4282
4320
|
measurer: _e,
|
|
4283
4321
|
axes: c,
|
|
4284
4322
|
numberFormat: u,
|
|
4285
4323
|
parsingLocale: h,
|
|
4286
|
-
formattedLegends:
|
|
4324
|
+
formattedLegends: Bt,
|
|
4287
4325
|
containerSize: Qe,
|
|
4288
4326
|
externalMeasurements: _,
|
|
4289
4327
|
headline: Ee,
|
|
4290
|
-
formattingLocale:
|
|
4291
|
-
annotations:
|
|
4292
|
-
coordSystem:
|
|
4293
|
-
textScale: g.textScale
|
|
4294
|
-
|
|
4328
|
+
formattingLocale: V,
|
|
4329
|
+
annotations: p,
|
|
4330
|
+
coordSystem: f,
|
|
4331
|
+
textScale: g.textScale,
|
|
4332
|
+
graphPadding: be.graphPadding
|
|
4333
|
+
}), Pe = v(() => !Se || !Ee || !_e ? null : Jo({
|
|
4295
4334
|
headline: Ee,
|
|
4296
|
-
layout:
|
|
4335
|
+
layout: Se.layout,
|
|
4297
4336
|
containerSize: Qe,
|
|
4298
4337
|
measurer: _e,
|
|
4299
|
-
itemGap:
|
|
4300
|
-
}), [
|
|
4301
|
-
if (!
|
|
4302
|
-
const { layout:
|
|
4303
|
-
return /* @__PURE__ */ a(
|
|
4338
|
+
itemGap: be.headlineItemGap
|
|
4339
|
+
}), [Se, Ee, Qe, _e, be.headlineItemGap]);
|
|
4340
|
+
if (!Se) return null;
|
|
4341
|
+
const { layout: ne, formattedAxes: bo } = Se;
|
|
4342
|
+
return /* @__PURE__ */ a(fs, { theme: Ke, themeOverrides: Je, appearance: g, children: /* @__PURE__ */ a(Di, { metrics: be, children: /* @__PURE__ */ m(kh, { appearance: g, isEditable: o === "editable", style: { width: e, height: t }, children: [
|
|
4304
4343
|
/* @__PURE__ */ a(
|
|
4305
|
-
|
|
4344
|
+
go,
|
|
4306
4345
|
{
|
|
4307
4346
|
ref: A,
|
|
4308
|
-
headerRect:
|
|
4347
|
+
headerRect: ne.header,
|
|
4309
4348
|
mode: o,
|
|
4310
4349
|
title: k.title,
|
|
4311
4350
|
isTitleVisible: k.isTitleVisible,
|
|
@@ -4314,23 +4353,23 @@ const uh = ({
|
|
|
4314
4353
|
}
|
|
4315
4354
|
),
|
|
4316
4355
|
/* @__PURE__ */ a(
|
|
4317
|
-
|
|
4356
|
+
bh,
|
|
4318
4357
|
{
|
|
4319
|
-
formattedAxes:
|
|
4358
|
+
formattedAxes: bo,
|
|
4320
4359
|
panelGuide: l,
|
|
4321
|
-
plotRect:
|
|
4322
|
-
panelRect:
|
|
4323
|
-
axisRects:
|
|
4324
|
-
axisLabelRects:
|
|
4360
|
+
plotRect: ne.plot,
|
|
4361
|
+
panelRect: ne.panel,
|
|
4362
|
+
axisRects: ne.axes,
|
|
4363
|
+
axisLabelRects: ne.axisLabels,
|
|
4325
4364
|
shouldAnimate: n ?? !w,
|
|
4326
|
-
formattingLocale:
|
|
4365
|
+
formattingLocale: V ?? h
|
|
4327
4366
|
}
|
|
4328
4367
|
),
|
|
4329
4368
|
/* @__PURE__ */ a(
|
|
4330
|
-
|
|
4369
|
+
po,
|
|
4331
4370
|
{
|
|
4332
4371
|
ref: I,
|
|
4333
|
-
footerRect:
|
|
4372
|
+
footerRect: ne.footer,
|
|
4334
4373
|
mode: o,
|
|
4335
4374
|
caption: k.caption,
|
|
4336
4375
|
isCaptionVisible: k.isCaptionVisible,
|
|
@@ -4338,39 +4377,36 @@ const uh = ({
|
|
|
4338
4377
|
isSourceVisible: k.isSourceVisible
|
|
4339
4378
|
}
|
|
4340
4379
|
),
|
|
4341
|
-
/* @__PURE__ */ a(
|
|
4342
|
-
|
|
4343
|
-
|
|
4380
|
+
/* @__PURE__ */ a(fo, { formattedLegends: Bt, rects: ne.legends, textScale: g.textScale }),
|
|
4381
|
+
xe && Pe && /* @__PURE__ */ a(
|
|
4382
|
+
mo,
|
|
4344
4383
|
{
|
|
4345
|
-
headline:
|
|
4384
|
+
headline: xe,
|
|
4346
4385
|
rect: Pe.rect,
|
|
4347
4386
|
resolvedSize: Pe.resolvedSize,
|
|
4348
4387
|
visibleItemCount: Pe.visibleItemCount
|
|
4349
4388
|
}
|
|
4350
4389
|
),
|
|
4351
|
-
r && /* @__PURE__ */ a(
|
|
4390
|
+
r && /* @__PURE__ */ a(gi, {})
|
|
4352
4391
|
] }) }) });
|
|
4353
4392
|
};
|
|
4354
4393
|
export {
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
ls as ThemeProvider,
|
|
4369
|
-
ss as darkTheme,
|
|
4370
|
-
is as lightTheme,
|
|
4394
|
+
Ht as CanvasTextMeasurer,
|
|
4395
|
+
Il as DefaultFooter,
|
|
4396
|
+
Qu as DefaultGrid,
|
|
4397
|
+
ql as DefaultHeader,
|
|
4398
|
+
pi as DefaultTooltip,
|
|
4399
|
+
ag as DevToolsPanel,
|
|
4400
|
+
og as GraphProvider,
|
|
4401
|
+
ig as GraphRenderer,
|
|
4402
|
+
Xa as HoverProvider,
|
|
4403
|
+
Fc as TextMeasurerProvider,
|
|
4404
|
+
fs as ThemeProvider,
|
|
4405
|
+
ps as darkTheme,
|
|
4406
|
+
gs as lightTheme,
|
|
4371
4407
|
B as useCompiledSelector,
|
|
4372
|
-
|
|
4373
|
-
|
|
4408
|
+
Gn as useGraphCommandDispatcher,
|
|
4409
|
+
Tt as useHoverState,
|
|
4374
4410
|
ve as useTextMeasurer,
|
|
4375
4411
|
s as vars
|
|
4376
4412
|
};
|