@graphysdk/react-renderer 1.8.1-beta.1786366143449 → 1.8.1-beta.1786446230102
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/editable.cjs +1 -1
- package/dist/editable.css +1 -1
- package/dist/editable.d.ts +25 -10
- package/dist/editable.mjs +1642 -1247
- package/dist/{history-chords-C4ubfbkC.js → history-chords-ClsfSt3J.js} +8 -8
- package/dist/history-chords-DyVxXLaG.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/history-chords-B9Z337V_.cjs +0 -1
package/dist/editable.mjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { g as
|
|
3
|
-
import { AddAnnotationCommand as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { useShallow as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import
|
|
9
|
-
import { assignInlineVars as
|
|
10
|
-
import { Menu as
|
|
11
|
-
import { Menu as
|
|
12
|
-
import { Accordion as
|
|
13
|
-
import { NumberField as
|
|
14
|
-
import { Radio as
|
|
15
|
-
import { RadioGroup as
|
|
16
|
-
import { Select as
|
|
17
|
-
import { Slider as
|
|
18
|
-
import { Switch as
|
|
19
|
-
import { Input as
|
|
20
|
-
import './editable.css';var
|
|
21
|
-
const { chartId: t } =
|
|
22
|
-
return i === null ? null : /* @__PURE__ */ m(
|
|
23
|
-
ref:
|
|
24
|
-
className:
|
|
25
|
-
...
|
|
26
|
-
}), i), /* @__PURE__ */ n(
|
|
27
|
-
value:
|
|
1
|
+
import { B as De, D as ue, E as Nt, F as kt, I as Rt, L as He, M as ac, N as I, Q as Et, S as ee, V as de, Z as _t, b as T, c as Dt, d as Z, et as Ht, f as ve, h as Tn, i as Vt, k as Ve, l as zt, m as Ft, n as _, o as Pn, p as Me, r as Bt, rt as U, s as Gt, t as Kt, tt as K, u as Ce, v as Ut, x as X, y as we } from "./history-chords-ClsfSt3J.js";
|
|
2
|
+
import { g as Wt } from "./font-values-CPxYeqns.js";
|
|
3
|
+
import { ARROW_DEFAULTS as Zt, AddAnnotationCommand as j, AddHighlightCommand as qt, BORDER_RADIUS_TOKENS as je, CONSTANT_VARIABLES as $t, DEFAULT_BAR_BORDER_RADIUS as Xt, DEFAULT_POINT_SIZE as jt, DEFAULT_STROKE_WIDTH as Yt, DIFFERENCE_ARROW_DEFAULTS as In, MAX_BAR_WIDTH as Qt, MIN_BAR_WIDTH as Jt, RESTING_HOVER_STATE as An, RemoveAnnotationCommand as ze, RemoveHighlightCommand as er, SHAPE_DEFAULTS as nr, SetAppearanceCornerRadiusCommand as tr, SetAppearanceTextScaleCommand as rr, SetAxisLabelCommand as ar, SetAxisPositionCommand as or, SetAxisTickModeCommand as ir, SetAxisTicksVisibilityCommand as lr, SetAxisVisibilityCommand as sr, SetBarBorderRadiusCommand as cr, SetBarWidthCommand as dr, SetChartTypeCommand as hr, SetContentCaptionCommand as ur, SetContentSourceCommand as mr, SetContentSubtitleCommand as pr, SetContentTitleCommand as gr, SetDataLabelsFormatCommand as vr, SetGridLineStyleCommand as Cr, SetGridLineWidthCommand as fr, SetGridVisibilityCommand as br, SetHeadlineCompareWithCommand as yr, SetHeadlinePositionCommand as Sr, SetHeadlineShowCommand as Ye, SetHeadlineSizeCommand as wr, SetHighlightDimStyleCommand as xr, SetLegendAlignCommand as Lr, SetLegendDisplayCommand as Tr, SetLegendPositionCommand as Pr, SetLineInterpolationCommand as Ir, SetLineMissingValuesCommand as Ar, SetLineWidthCommand as Qe, SetNumberFormatAbbreviationCommand as Or, SetNumberFormatDecimalsCommand as Je, SetPointSizeCommand as Mr, SetPolarInnerRadiusCommand as Nr, SetPolarStartAngleCommand as kr, SetRuleLabelCommand as Rr, SetRuleValueCommand as Er, SetScaleDomainCommand as ge, SetScaleReverseCommand as _r, SetScaleTransformCommand as Dr, SetScaleZeroCommand as en, SetStatLineCommand as Hr, TEXT_ANNOTATION_DEFAULTS as Vr, ToggleCategoryLabelsCommand as zr, ToggleContentVisibilityCommand as xe, ToggleDataLabelsCommand as Fr, ToggleGoalLineCommand as Br, ToggleLineFillCommand as Gr, ToggleLinePointsVisibilityCommand as Kr, ToggleStackTotalsCommand as Ur, UpdateAnnotationCommand as On, areAnchorsEqual as Mn, areEndpointsComparable as Wr, buildEditMenuTriggerRegion as Zr, buildLayerStyleAddress as qr, buildObservationAnchor as $r, buildObservationPredicate as Xr, canAnchorDirectLabels as jr, canPlaceDataLabels as Yr, createObservationAnchorParser as Qr, createStyleResolver as Jr, createValueFormatter as ea, extractConstantValue as na, extractVariableName as ta, filterLayersByGeoms as Ne, findAverageLineLayer as ra, findGoalLineLayer as aa, findHighlightsAtObservation as oa, findLayerByGeom as Nn, findObservationAttachment as ia, findStyleRule as la, findTrendLineLayer as sa, formatDifferenceLabel as ca, getColor as da, hasMultipleGroups as ha, inferDefaultDifferenceArrowEndpoints as ua, inferDifferenceArrowEndpoints as ma, isCompanionLayer as kn, isObservationAttachmentKind as pa, isPointWithinEditMenuTrigger as Rn, isSafeUrl as ga, projectAnchorToPanel as va, readChartType as Ca, readHighlightDimStyle as fa, resolveComparisonBasis as ba, resolveObservationPoint as ke, stepDifferenceArrowEndpoint as ya, toPanelCursor as Fe } from "@graphysdk/viz-engine";
|
|
4
|
+
import { createContext as me, useCallback as fe, useContext as ie, useEffect as B, useId as ae, useMemo as E, useRef as be, useState as q } from "react";
|
|
5
|
+
import { Fragment as G, jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
6
|
+
import { useShallow as Be } from "zustand/react/shallow";
|
|
7
|
+
import { createPortal as Sa } from "react-dom";
|
|
8
|
+
import oe from "clsx";
|
|
9
|
+
import { assignInlineVars as En } from "@vanilla-extract/dynamic";
|
|
10
|
+
import { Menu as V } from "@base-ui/react/menu";
|
|
11
|
+
import { Menu as Y } from "@base-ui/react";
|
|
12
|
+
import { Accordion as ce } from "@base-ui/react/accordion";
|
|
13
|
+
import { NumberField as nn } from "@base-ui/react/number-field";
|
|
14
|
+
import { Radio as _n } from "@base-ui/react/radio";
|
|
15
|
+
import { RadioGroup as Dn } from "@base-ui/react/radio-group";
|
|
16
|
+
import { Select as W } from "@base-ui/react/select";
|
|
17
|
+
import { Slider as le } from "@base-ui/react/slider";
|
|
18
|
+
import { Switch as tn } from "@base-ui/react/switch";
|
|
19
|
+
import { Input as wa } from "@base-ui/react/input";
|
|
20
|
+
import './editable.css';var xa = "data-graphy-chart-chrome", La = "data-graphy-chart-menu", Hn = { [La]: "" }, ye = (e) => ({ [xa]: e }), Vn = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, Ta = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, Pa = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, he = (e, t, i) => e instanceof Node && (t.contains(e) || Vn(e, i)), Ia = "cml7ha0", zn = me(null), Aa = ({ children: e }) => {
|
|
21
|
+
const { chartId: t } = U(), [i] = q(He), [o, r] = q(null);
|
|
22
|
+
return i === null ? null : /* @__PURE__ */ m(G, { children: [Sa(/* @__PURE__ */ n("div", {
|
|
23
|
+
ref: r,
|
|
24
|
+
className: Ia,
|
|
25
|
+
...ye(t)
|
|
26
|
+
}), i), /* @__PURE__ */ n(zn.Provider, {
|
|
27
|
+
value: o,
|
|
28
28
|
children: e
|
|
29
29
|
})] });
|
|
30
|
-
},
|
|
30
|
+
}, Ge = () => ie(zn), Fn = (e) => /* @__PURE__ */ m(T, {
|
|
31
31
|
viewBox: "0 0 16 16",
|
|
32
32
|
...e,
|
|
33
33
|
children: [
|
|
@@ -53,73 +53,73 @@ import './editable.css';var oa = "data-graphy-chart-chrome", ia = "data-graphy-c
|
|
|
53
53
|
})
|
|
54
54
|
]
|
|
55
55
|
});
|
|
56
|
-
var
|
|
56
|
+
var Bn = "efjmb40", Gn = "efjmb41", ne = "efjmb42", te = "efjmb43", Oa = "efjmb44", Ma = "efjmb45", Na = /* @__PURE__ */ new Set([
|
|
57
57
|
"item-press",
|
|
58
58
|
"escape-key",
|
|
59
59
|
"outside-press",
|
|
60
60
|
"close-press",
|
|
61
61
|
"sibling-open",
|
|
62
62
|
"trigger-press"
|
|
63
|
-
]),
|
|
64
|
-
const
|
|
65
|
-
s ? (l(!0), i?.()) :
|
|
63
|
+
]), Ke = ({ label: e, icon: t, onOpened: i, children: o }) => {
|
|
64
|
+
const r = Ge(), [a, l] = q(!1), c = (s, u) => {
|
|
65
|
+
s ? (l(!0), i?.()) : Na.has(u.reason) && l(!1);
|
|
66
66
|
};
|
|
67
|
-
return /* @__PURE__ */ m(
|
|
67
|
+
return /* @__PURE__ */ m(Y.SubmenuRoot, {
|
|
68
68
|
open: a,
|
|
69
69
|
onOpenChange: c,
|
|
70
|
-
children: [/* @__PURE__ */ n(
|
|
70
|
+
children: [/* @__PURE__ */ n(ka, {
|
|
71
71
|
label: e,
|
|
72
72
|
icon: t
|
|
73
|
-
}), /* @__PURE__ */ n(
|
|
74
|
-
container:
|
|
75
|
-
children: /* @__PURE__ */ n(
|
|
73
|
+
}), /* @__PURE__ */ n(Y.Portal, {
|
|
74
|
+
container: r,
|
|
75
|
+
children: /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(Y.Positioner, {
|
|
76
76
|
side: "right",
|
|
77
77
|
align: "start",
|
|
78
78
|
sideOffset: 4,
|
|
79
|
-
className:
|
|
80
|
-
...
|
|
81
|
-
children: /* @__PURE__ */ n(
|
|
82
|
-
className:
|
|
83
|
-
children:
|
|
79
|
+
className: Bn,
|
|
80
|
+
...Hn,
|
|
81
|
+
children: /* @__PURE__ */ n(Y.Popup, {
|
|
82
|
+
className: Gn,
|
|
83
|
+
children: o
|
|
84
84
|
})
|
|
85
85
|
}) })
|
|
86
86
|
})]
|
|
87
87
|
});
|
|
88
|
-
},
|
|
89
|
-
className:
|
|
88
|
+
}, ka = ({ label: e, icon: t }) => /* @__PURE__ */ m(Y.SubmenuTrigger, {
|
|
89
|
+
className: ne,
|
|
90
90
|
openOnHover: !1,
|
|
91
91
|
children: [
|
|
92
92
|
t,
|
|
93
93
|
/* @__PURE__ */ n("span", {
|
|
94
|
-
className:
|
|
94
|
+
className: te,
|
|
95
95
|
children: e
|
|
96
96
|
}),
|
|
97
97
|
/* @__PURE__ */ n("span", {
|
|
98
|
-
className:
|
|
99
|
-
children: /* @__PURE__ */ n(
|
|
98
|
+
className: Ma,
|
|
99
|
+
children: /* @__PURE__ */ n(we, { size: "sm" })
|
|
100
100
|
})
|
|
101
101
|
]
|
|
102
|
-
}),
|
|
103
|
-
const a =
|
|
104
|
-
u.length !== 0 && (s(new
|
|
102
|
+
}), Ra = "_1qe7q450", Ea = "_1qe7q451", _a = "_1qe7q452", Da = ({ label: e, placeholder: t, addLabel: i, at: o, onRequestClose: r }) => {
|
|
103
|
+
const a = be(null), [l, c] = q(""), { dispatch: s } = ee(), u = l.trim(), d = () => {
|
|
104
|
+
u.length !== 0 && (s(new j({
|
|
105
105
|
kind: "comment",
|
|
106
106
|
annotation: {
|
|
107
|
-
at:
|
|
108
|
-
content:
|
|
107
|
+
at: o,
|
|
108
|
+
content: Ha(u)
|
|
109
109
|
}
|
|
110
|
-
})),
|
|
110
|
+
})), r());
|
|
111
111
|
};
|
|
112
|
-
return /* @__PURE__ */ n(
|
|
112
|
+
return /* @__PURE__ */ n(Ke, {
|
|
113
113
|
label: e,
|
|
114
|
-
icon: /* @__PURE__ */ n(
|
|
114
|
+
icon: /* @__PURE__ */ n(Fn, {}),
|
|
115
115
|
onOpened: () => {
|
|
116
116
|
requestAnimationFrame(() => a.current?.focus());
|
|
117
117
|
},
|
|
118
118
|
children: /* @__PURE__ */ m("div", {
|
|
119
|
-
className:
|
|
119
|
+
className: Ra,
|
|
120
120
|
children: [/* @__PURE__ */ n("input", {
|
|
121
121
|
ref: a,
|
|
122
|
-
className:
|
|
122
|
+
className: Ea,
|
|
123
123
|
value: l,
|
|
124
124
|
placeholder: t,
|
|
125
125
|
onChange: (g) => {
|
|
@@ -130,14 +130,14 @@ var Dn = "efjmb40", zn = "efjmb41", ee = "efjmb42", ne = "efjmb43", ha = "efjmb4
|
|
|
130
130
|
}
|
|
131
131
|
}), /* @__PURE__ */ n("button", {
|
|
132
132
|
type: "button",
|
|
133
|
-
className:
|
|
133
|
+
className: _a,
|
|
134
134
|
disabled: u.length === 0,
|
|
135
135
|
onClick: d,
|
|
136
136
|
children: i
|
|
137
137
|
})]
|
|
138
138
|
})
|
|
139
139
|
});
|
|
140
|
-
},
|
|
140
|
+
}, Ha = (e) => ({
|
|
141
141
|
type: "doc",
|
|
142
142
|
content: [{
|
|
143
143
|
type: "paragraph",
|
|
@@ -146,7 +146,7 @@ var Dn = "efjmb40", zn = "efjmb41", ee = "efjmb42", ne = "efjmb43", ha = "efjmb4
|
|
|
146
146
|
text: e
|
|
147
147
|
}]
|
|
148
148
|
}]
|
|
149
|
-
}),
|
|
149
|
+
}), Va = (e) => /* @__PURE__ */ n(T, {
|
|
150
150
|
viewBox: "0 0 15 14",
|
|
151
151
|
...e,
|
|
152
152
|
children: /* @__PURE__ */ n("path", {
|
|
@@ -154,8 +154,8 @@ var Dn = "efjmb40", zn = "efjmb41", ee = "efjmb42", ne = "efjmb43", ha = "efjmb4
|
|
|
154
154
|
fill: "currentColor",
|
|
155
155
|
fillOpacity: "0.8"
|
|
156
156
|
})
|
|
157
|
-
}),
|
|
158
|
-
const { dispatch:
|
|
157
|
+
}), za = "relative-difference", Fa = ({ label: e, layer: t, at: i, onRequestClose: o }) => {
|
|
158
|
+
const { dispatch: r } = ee(), a = K((s) => s.coordSystem), l = E(() => ma({
|
|
159
159
|
layer: t,
|
|
160
160
|
at: i,
|
|
161
161
|
coordSystem: a
|
|
@@ -166,77 +166,77 @@ var Dn = "efjmb40", zn = "efjmb41", ee = "efjmb42", ne = "efjmb43", ha = "efjmb4
|
|
|
166
166
|
]);
|
|
167
167
|
if (l === null) return null;
|
|
168
168
|
const c = () => {
|
|
169
|
-
|
|
169
|
+
r(new j({
|
|
170
170
|
kind: "differenceArrow",
|
|
171
171
|
annotation: {
|
|
172
|
-
...
|
|
172
|
+
...In,
|
|
173
173
|
...l,
|
|
174
|
-
label:
|
|
174
|
+
label: za
|
|
175
175
|
}
|
|
176
|
-
})),
|
|
176
|
+
})), o();
|
|
177
177
|
};
|
|
178
|
-
return /* @__PURE__ */ m(
|
|
179
|
-
className:
|
|
178
|
+
return /* @__PURE__ */ m(V.Item, {
|
|
179
|
+
className: ne,
|
|
180
180
|
onClick: c,
|
|
181
|
-
children: [/* @__PURE__ */ n(
|
|
182
|
-
className:
|
|
181
|
+
children: [/* @__PURE__ */ n(Va, {}), /* @__PURE__ */ n("span", {
|
|
182
|
+
className: te,
|
|
183
183
|
children: e
|
|
184
184
|
})]
|
|
185
185
|
});
|
|
186
186
|
};
|
|
187
|
-
function
|
|
188
|
-
if (e.type === "polar" && !
|
|
187
|
+
function Ba(e, t) {
|
|
188
|
+
if (e.type === "polar" && !Ga(t)) return [{
|
|
189
189
|
scope: "series",
|
|
190
190
|
labelKey: "pieSlice"
|
|
191
191
|
}];
|
|
192
|
-
const i =
|
|
192
|
+
const i = ha(t.data, t.mapping);
|
|
193
193
|
switch (t.geom) {
|
|
194
194
|
case "bar": {
|
|
195
|
-
const
|
|
195
|
+
const o = [{
|
|
196
196
|
scope: "data-point",
|
|
197
197
|
labelKey: "bar"
|
|
198
198
|
}];
|
|
199
199
|
if (i) {
|
|
200
|
-
const
|
|
201
|
-
|
|
200
|
+
const r = t.position === "stack" || t.position === "fill";
|
|
201
|
+
o.push({
|
|
202
202
|
scope: "x-value",
|
|
203
|
-
labelKey:
|
|
204
|
-
}),
|
|
203
|
+
labelKey: r ? "barStack" : "barGroup"
|
|
204
|
+
}), o.push({
|
|
205
205
|
scope: "series",
|
|
206
206
|
labelKey: "barSeries"
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
return
|
|
209
|
+
return o;
|
|
210
210
|
}
|
|
211
211
|
case "line":
|
|
212
212
|
case "area": {
|
|
213
|
-
const
|
|
213
|
+
const o = [{
|
|
214
214
|
scope: "data-point",
|
|
215
215
|
labelKey: "linePoint"
|
|
216
216
|
}];
|
|
217
|
-
return i &&
|
|
217
|
+
return i && o.push({
|
|
218
218
|
scope: "series",
|
|
219
219
|
labelKey: "lineSeries"
|
|
220
|
-
}),
|
|
220
|
+
}), o;
|
|
221
221
|
}
|
|
222
222
|
case "point": {
|
|
223
|
-
const
|
|
223
|
+
const o = [{
|
|
224
224
|
scope: "data-point",
|
|
225
225
|
labelKey: "scatterPoint"
|
|
226
226
|
}];
|
|
227
|
-
return i &&
|
|
227
|
+
return i && o.push({
|
|
228
228
|
scope: "series",
|
|
229
229
|
labelKey: "scatterSeries"
|
|
230
|
-
}),
|
|
230
|
+
}), o;
|
|
231
231
|
}
|
|
232
232
|
default:
|
|
233
233
|
return [];
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
var
|
|
237
|
-
const t =
|
|
238
|
-
return t !== null && t !==
|
|
239
|
-
},
|
|
236
|
+
var Ga = (e) => {
|
|
237
|
+
const t = ta(e.mapping.x);
|
|
238
|
+
return t !== null && t !== $t.x;
|
|
239
|
+
}, Ka = (e) => /* @__PURE__ */ m(T, {
|
|
240
240
|
viewBox: "0 0 16 16",
|
|
241
241
|
...e,
|
|
242
242
|
children: [
|
|
@@ -275,7 +275,7 @@ var Pa = (e) => {
|
|
|
275
275
|
rx: ".533"
|
|
276
276
|
})
|
|
277
277
|
]
|
|
278
|
-
}),
|
|
278
|
+
}), Ua = (e) => /* @__PURE__ */ m(T, {
|
|
279
279
|
viewBox: "0 0 16 16",
|
|
280
280
|
...e,
|
|
281
281
|
children: [
|
|
@@ -314,7 +314,7 @@ var Pa = (e) => {
|
|
|
314
314
|
rx: ".533"
|
|
315
315
|
})
|
|
316
316
|
]
|
|
317
|
-
}),
|
|
317
|
+
}), Wa = (e) => /* @__PURE__ */ m(T, {
|
|
318
318
|
viewBox: "0 0 16 16",
|
|
319
319
|
...e,
|
|
320
320
|
children: [
|
|
@@ -353,7 +353,7 @@ var Pa = (e) => {
|
|
|
353
353
|
rx: ".533"
|
|
354
354
|
})
|
|
355
355
|
]
|
|
356
|
-
}),
|
|
356
|
+
}), Za = (e) => /* @__PURE__ */ m(T, {
|
|
357
357
|
viewBox: "0 0 16 16",
|
|
358
358
|
...e,
|
|
359
359
|
children: [
|
|
@@ -373,7 +373,7 @@ var Pa = (e) => {
|
|
|
373
373
|
d: "M11.733 10.074H16v5.408a.52.52 0 0 1-.518.518h-3.23a.52.52 0 0 1-.519-.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
374
374
|
})
|
|
375
375
|
]
|
|
376
|
-
}),
|
|
376
|
+
}), qa = (e) => /* @__PURE__ */ m(T, {
|
|
377
377
|
viewBox: "0 0 16 16",
|
|
378
378
|
...e,
|
|
379
379
|
children: [
|
|
@@ -407,7 +407,7 @@ var Pa = (e) => {
|
|
|
407
407
|
d: "M5.29 6.62a1.3 1.3 0 0 1-.424-.075 1 1 0 0 1-.373-.244 1.2 1.2 0 0 1-.262-.45 2.1 2.1 0 0 1-.096-.699q0-.389.082-.693.083-.304.238-.514a1.05 1.05 0 0 1 .374-.322q.22-.11.492-.11.285 0 .505.112a.973.973 0 0 1 .526.744h-.54a.5.5 0 0 0-.17-.277.5.5 0 0 0-.321-.105.54.54 0 0 0-.485.273q-.168.273-.17.75h.021a.8.8 0 0 1 .188-.223.92.92 0 0 1 .569-.195.91.91 0 0 1 .813.477q.125.222.123.509 0 .297-.136.536a1 1 0 0 1-.383.372 1.15 1.15 0 0 1-.571.134m-.003-.443a.54.54 0 0 0 .288-.078.57.57 0 0 0 .2-.211.6.6 0 0 0 .073-.299.6.6 0 0 0-.07-.294.54.54 0 0 0-.484-.285.55.55 0 0 0-.403.173.596.596 0 0 0 .108.914.53.53 0 0 0 .288.08M6.88 6.579v-.396l1.05-1.03q.15-.15.25-.27a1 1 0 0 0 .151-.229.6.6 0 0 0 .05-.236.432.432 0 0 0-.244-.405.6.6 0 0 0-.258-.056q-.15 0-.261.062a.43.43 0 0 0-.175.173.56.56 0 0 0-.06.267H6.86q0-.288.132-.5a.9.9 0 0 1 .362-.33q.231-.117.532-.117.303 0 .534.114.23.114.358.312a.8.8 0 0 1 .128.452.9.9 0 0 1-.065.334q-.065.164-.229.363-.162.2-.456.483l-.522.53v.021h1.318v.458zM10.57 6.62a1.3 1.3 0 0 1-.423-.075 1 1 0 0 1-.373-.244 1.2 1.2 0 0 1-.263-.45 2.1 2.1 0 0 1-.096-.699q0-.389.083-.693t.238-.514a1.05 1.05 0 0 1 .374-.322q.219-.11.492-.11.285 0 .505.112a.973.973 0 0 1 .526.744h-.54a.5.5 0 0 0-.17-.277.5.5 0 0 0-.322-.105.54.54 0 0 0-.484.273q-.168.273-.17.75h.02a.8.8 0 0 1 .188-.223.92.92 0 0 1 .569-.195.91.91 0 0 1 .814.477q.125.222.123.509 0 .297-.136.536a1 1 0 0 1-.383.372 1.15 1.15 0 0 1-.572.134m-.002-.443a.54.54 0 0 0 .288-.078.57.57 0 0 0 .2-.211.6.6 0 0 0 .073-.299.6.6 0 0 0-.071-.294.54.54 0 0 0-.483-.285.54.54 0 0 0-.403.173.597.597 0 0 0 .107.914.53.53 0 0 0 .289.08"
|
|
408
408
|
})
|
|
409
409
|
]
|
|
410
|
-
}),
|
|
410
|
+
}), $a = (e) => /* @__PURE__ */ m(T, {
|
|
411
411
|
viewBox: "0 0 16 16",
|
|
412
412
|
...e,
|
|
413
413
|
children: [
|
|
@@ -448,7 +448,7 @@ var Pa = (e) => {
|
|
|
448
448
|
fillOpacity: "0.8"
|
|
449
449
|
})
|
|
450
450
|
]
|
|
451
|
-
}),
|
|
451
|
+
}), Xa = (e) => /* @__PURE__ */ m(T, {
|
|
452
452
|
viewBox: "0 0 16 16",
|
|
453
453
|
...e,
|
|
454
454
|
children: [
|
|
@@ -470,7 +470,7 @@ var Pa = (e) => {
|
|
|
470
470
|
d: "M15.999 8a8 8 0 0 1-7.588 7.989l-.412.01V8z"
|
|
471
471
|
})
|
|
472
472
|
]
|
|
473
|
-
}),
|
|
473
|
+
}), ja = (e) => /* @__PURE__ */ m(T, {
|
|
474
474
|
viewBox: "0 0 16 16",
|
|
475
475
|
...e,
|
|
476
476
|
children: [
|
|
@@ -531,7 +531,7 @@ var Pa = (e) => {
|
|
|
531
531
|
transform: "matrix(-1 0 0 1 15.933 .533)"
|
|
532
532
|
})
|
|
533
533
|
]
|
|
534
|
-
}),
|
|
534
|
+
}), Ya = (e) => /* @__PURE__ */ m(T, {
|
|
535
535
|
viewBox: "0 0 16 16",
|
|
536
536
|
...e,
|
|
537
537
|
children: [
|
|
@@ -592,20 +592,20 @@ var Pa = (e) => {
|
|
|
592
592
|
transform: "matrix(-1 0 0 1 15.933 .533)"
|
|
593
593
|
})
|
|
594
594
|
]
|
|
595
|
-
}),
|
|
596
|
-
bar:
|
|
597
|
-
barGroup:
|
|
598
|
-
barStack:
|
|
599
|
-
barSeries:
|
|
600
|
-
linePoint:
|
|
601
|
-
lineSeries:
|
|
602
|
-
scatterPoint:
|
|
603
|
-
scatterSeries:
|
|
604
|
-
pieSlice:
|
|
605
|
-
},
|
|
606
|
-
const t =
|
|
595
|
+
}), Qa = {
|
|
596
|
+
bar: Ka,
|
|
597
|
+
barGroup: Ua,
|
|
598
|
+
barStack: Za,
|
|
599
|
+
barSeries: Wa,
|
|
600
|
+
linePoint: qa,
|
|
601
|
+
lineSeries: $a,
|
|
602
|
+
scatterPoint: ja,
|
|
603
|
+
scatterSeries: Ya,
|
|
604
|
+
pieSlice: Xa
|
|
605
|
+
}, Kn = ({ labelKey: e }) => {
|
|
606
|
+
const t = Qa[e];
|
|
607
607
|
return /* @__PURE__ */ n(t, {});
|
|
608
|
-
},
|
|
608
|
+
}, Un = (e) => /* @__PURE__ */ m(T, {
|
|
609
609
|
viewBox: "0 0 16 16",
|
|
610
610
|
...e,
|
|
611
611
|
children: [/* @__PURE__ */ n("path", {
|
|
@@ -618,81 +618,81 @@ var Pa = (e) => {
|
|
|
618
618
|
fill: "currentColor",
|
|
619
619
|
fillOpacity: "0.8"
|
|
620
620
|
})]
|
|
621
|
-
}),
|
|
622
|
-
const
|
|
623
|
-
return /* @__PURE__ */ n(
|
|
621
|
+
}), Ja = ({ label: e, options: t, onSelect: i }) => {
|
|
622
|
+
const o = I();
|
|
623
|
+
return /* @__PURE__ */ n(Ke, {
|
|
624
624
|
label: e,
|
|
625
|
-
icon: /* @__PURE__ */ n(
|
|
626
|
-
children: t.map((
|
|
627
|
-
className:
|
|
628
|
-
onClick: () => i(
|
|
629
|
-
children: [/* @__PURE__ */ n(
|
|
630
|
-
className:
|
|
631
|
-
children:
|
|
625
|
+
icon: /* @__PURE__ */ n(Un, {}),
|
|
626
|
+
children: t.map((r) => /* @__PURE__ */ m(Y.Item, {
|
|
627
|
+
className: ne,
|
|
628
|
+
onClick: () => i(r.scope),
|
|
629
|
+
children: [/* @__PURE__ */ n(Kn, { labelKey: r.labelKey }), /* @__PURE__ */ n("span", {
|
|
630
|
+
className: te,
|
|
631
|
+
children: o(`graph.annotations.highlights.labels.${r.labelKey}`)
|
|
632
632
|
})]
|
|
633
|
-
},
|
|
633
|
+
}, r.scope))
|
|
634
634
|
});
|
|
635
|
-
},
|
|
636
|
-
const a =
|
|
637
|
-
const p = new Set(
|
|
635
|
+
}, eo = ({ label: e, layer: t, observation: i, highlights: o, onRequestClose: r }) => {
|
|
636
|
+
const a = I(), { dispatch: l } = ee(), c = K((p) => p.coordSystem), s = E(() => Xr(t, i), [t, i]), u = E(() => Ba(c, t), [c, t]), d = E(() => {
|
|
637
|
+
const p = new Set(o.map((g) => g.scope));
|
|
638
638
|
return u.filter((g) => !p.has(g.scope));
|
|
639
|
-
}, [u,
|
|
639
|
+
}, [u, o]), [h] = d;
|
|
640
640
|
if (s === null || h === void 0) return null;
|
|
641
641
|
const v = (p) => {
|
|
642
|
-
l(new
|
|
642
|
+
l(new qt({
|
|
643
643
|
predicate: s,
|
|
644
644
|
scope: p,
|
|
645
645
|
layerId: t.id
|
|
646
|
-
})),
|
|
646
|
+
})), r();
|
|
647
647
|
};
|
|
648
648
|
if (d.length === 1) {
|
|
649
649
|
const p = u.length === 1 ? e : a("graph.annotations.baseMenu.highlightWithLabel", { label: a(`graph.annotations.highlights.labels.${h.labelKey}`) });
|
|
650
|
-
return /* @__PURE__ */ m(
|
|
651
|
-
className:
|
|
650
|
+
return /* @__PURE__ */ m(Y.Item, {
|
|
651
|
+
className: ne,
|
|
652
652
|
onClick: () => v(h.scope),
|
|
653
|
-
children: [/* @__PURE__ */ n(
|
|
654
|
-
className:
|
|
653
|
+
children: [/* @__PURE__ */ n(Kn, { labelKey: h.labelKey }), /* @__PURE__ */ n("span", {
|
|
654
|
+
className: te,
|
|
655
655
|
children: p
|
|
656
656
|
})]
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
return /* @__PURE__ */ n(
|
|
659
|
+
return /* @__PURE__ */ n(Ja, {
|
|
660
660
|
label: e,
|
|
661
661
|
options: d,
|
|
662
662
|
onSelect: v
|
|
663
663
|
});
|
|
664
|
-
},
|
|
665
|
-
className:
|
|
664
|
+
}, no = "_1aafi1g0", to = "_1aafi1g1", Wn = ({ children: e }) => /* @__PURE__ */ m("span", {
|
|
665
|
+
className: no,
|
|
666
666
|
"aria-hidden": "true",
|
|
667
|
-
children: [e, /* @__PURE__ */ n("span", { className:
|
|
668
|
-
}),
|
|
669
|
-
const { dispatch:
|
|
670
|
-
if (
|
|
667
|
+
children: [e, /* @__PURE__ */ n("span", { className: to })]
|
|
668
|
+
}), ro = ({ label: e, highlights: t, onRequestClose: i }) => {
|
|
669
|
+
const { dispatch: o } = ee(), r = t.at(-1);
|
|
670
|
+
if (r === void 0) return null;
|
|
671
671
|
const a = () => {
|
|
672
|
-
|
|
672
|
+
o(new er({ id: r.id })), i();
|
|
673
673
|
};
|
|
674
|
-
return /* @__PURE__ */ m(
|
|
675
|
-
className:
|
|
674
|
+
return /* @__PURE__ */ m(V.Item, {
|
|
675
|
+
className: ne,
|
|
676
676
|
onClick: a,
|
|
677
|
-
children: [/* @__PURE__ */ n(
|
|
678
|
-
className:
|
|
677
|
+
children: [/* @__PURE__ */ n(Wn, { children: /* @__PURE__ */ n(Un, {}) }), /* @__PURE__ */ n("span", {
|
|
678
|
+
className: te,
|
|
679
679
|
children: e
|
|
680
680
|
})]
|
|
681
681
|
});
|
|
682
|
-
},
|
|
683
|
-
const i = K((
|
|
684
|
-
return
|
|
682
|
+
}, ao = (e, t) => {
|
|
683
|
+
const i = K((r) => r.spec.highlights), o = K((r) => r.config.parsingLocale);
|
|
684
|
+
return E(() => oa({
|
|
685
685
|
layer: e,
|
|
686
686
|
highlights: i,
|
|
687
687
|
observation: t,
|
|
688
|
-
parsingLocale:
|
|
688
|
+
parsingLocale: o
|
|
689
689
|
}), [
|
|
690
690
|
e,
|
|
691
691
|
i,
|
|
692
692
|
t,
|
|
693
|
-
|
|
693
|
+
o
|
|
694
694
|
]);
|
|
695
|
-
},
|
|
695
|
+
}, Zn = (e) => /* @__PURE__ */ m(T, {
|
|
696
696
|
viewBox: "0 0 16 16",
|
|
697
697
|
...e,
|
|
698
698
|
children: [
|
|
@@ -715,22 +715,22 @@ var Pa = (e) => {
|
|
|
715
715
|
fillOpacity: "0.8"
|
|
716
716
|
})
|
|
717
717
|
]
|
|
718
|
-
}),
|
|
719
|
-
const { dispatch:
|
|
720
|
-
|
|
718
|
+
}), oo = ({ label: e, at: t, onRequestClose: i }) => {
|
|
719
|
+
const { dispatch: o } = ee(), r = () => {
|
|
720
|
+
o(new j({
|
|
721
721
|
kind: "pinnedNumber",
|
|
722
722
|
annotation: { at: t }
|
|
723
723
|
})), i();
|
|
724
724
|
};
|
|
725
|
-
return /* @__PURE__ */ m(
|
|
726
|
-
className:
|
|
727
|
-
onClick:
|
|
728
|
-
children: [/* @__PURE__ */ n(
|
|
729
|
-
className:
|
|
725
|
+
return /* @__PURE__ */ m(V.Item, {
|
|
726
|
+
className: ne,
|
|
727
|
+
onClick: r,
|
|
728
|
+
children: [/* @__PURE__ */ n(Zn, {}), /* @__PURE__ */ n("span", {
|
|
729
|
+
className: te,
|
|
730
730
|
children: e
|
|
731
731
|
})]
|
|
732
732
|
});
|
|
733
|
-
},
|
|
733
|
+
}, qn = (e) => /* @__PURE__ */ m(T, {
|
|
734
734
|
viewBox: "0 0 16 16",
|
|
735
735
|
...e,
|
|
736
736
|
children: [
|
|
@@ -763,35 +763,35 @@ var Pa = (e) => {
|
|
|
763
763
|
fillOpacity: "0.8"
|
|
764
764
|
})
|
|
765
765
|
]
|
|
766
|
-
}),
|
|
766
|
+
}), $n = {
|
|
767
767
|
pinnedNumber: {
|
|
768
|
-
icon:
|
|
768
|
+
icon: Zn,
|
|
769
769
|
labelKey: "graph.annotations.baseMenu.unpinNumber"
|
|
770
770
|
},
|
|
771
771
|
comment: {
|
|
772
|
-
icon:
|
|
772
|
+
icon: Fn,
|
|
773
773
|
labelKey: "graph.annotations.baseMenu.removeAnnotation"
|
|
774
774
|
},
|
|
775
775
|
sticker: {
|
|
776
|
-
icon:
|
|
776
|
+
icon: qn,
|
|
777
777
|
labelKey: "graph.annotations.baseMenu.removeSticker"
|
|
778
778
|
},
|
|
779
779
|
image: null
|
|
780
|
-
},
|
|
781
|
-
const i =
|
|
782
|
-
|
|
780
|
+
}, io = (e) => pa(e.kind) && $n[e.kind] !== null, lo = ({ attachment: e, onRequestClose: t }) => {
|
|
781
|
+
const i = I(), { dispatch: o } = ee(), { icon: r, labelKey: a } = $n[e.kind], l = () => {
|
|
782
|
+
o(new ze({ id: e.annotation.id })), t();
|
|
783
783
|
};
|
|
784
|
-
return /* @__PURE__ */ m(
|
|
785
|
-
className:
|
|
784
|
+
return /* @__PURE__ */ m(V.Item, {
|
|
785
|
+
className: ne,
|
|
786
786
|
onClick: l,
|
|
787
|
-
children: [/* @__PURE__ */ n(
|
|
788
|
-
className:
|
|
787
|
+
children: [/* @__PURE__ */ n(Wn, { children: /* @__PURE__ */ n(r, {}) }), /* @__PURE__ */ n("span", {
|
|
788
|
+
className: te,
|
|
789
789
|
children: i(a)
|
|
790
790
|
})]
|
|
791
791
|
});
|
|
792
|
-
},
|
|
793
|
-
const { dispatch:
|
|
794
|
-
|
|
792
|
+
}, so = "ceeojg0", co = "ceeojg1", ho = "ceeojg2", uo = ({ label: e, at: t, onRequestClose: i }) => {
|
|
793
|
+
const { dispatch: o } = ee(), r = (a) => {
|
|
794
|
+
o(new j({
|
|
795
795
|
kind: "sticker",
|
|
796
796
|
annotation: {
|
|
797
797
|
at: {
|
|
@@ -802,125 +802,125 @@ var Pa = (e) => {
|
|
|
802
802
|
}
|
|
803
803
|
})), i();
|
|
804
804
|
};
|
|
805
|
-
return /* @__PURE__ */ n(
|
|
805
|
+
return /* @__PURE__ */ n(Ke, {
|
|
806
806
|
label: e,
|
|
807
|
-
icon: /* @__PURE__ */ n(
|
|
807
|
+
icon: /* @__PURE__ */ n(qn, {}),
|
|
808
808
|
children: /* @__PURE__ */ n("div", {
|
|
809
|
-
className:
|
|
810
|
-
children: Object.entries(
|
|
811
|
-
className:
|
|
809
|
+
className: so,
|
|
810
|
+
children: Object.entries(Gt).map(([a, l]) => /* @__PURE__ */ n(Y.Item, {
|
|
811
|
+
className: co,
|
|
812
812
|
"aria-label": a,
|
|
813
|
-
onClick: () =>
|
|
813
|
+
onClick: () => r(a),
|
|
814
814
|
children: /* @__PURE__ */ n("img", {
|
|
815
|
-
className:
|
|
815
|
+
className: ho,
|
|
816
816
|
src: l.src,
|
|
817
817
|
alt: a
|
|
818
818
|
})
|
|
819
819
|
}, a))
|
|
820
820
|
})
|
|
821
821
|
});
|
|
822
|
-
},
|
|
823
|
-
const i =
|
|
824
|
-
if (e.kind !== "menu" ||
|
|
825
|
-
const
|
|
822
|
+
}, mo = ({ interaction: e, panelOrigin: t }) => {
|
|
823
|
+
const i = Z(), o = Ce((a) => a.menuTrigger);
|
|
824
|
+
if (e.kind !== "menu" || o === null) return null;
|
|
825
|
+
const r = () => {
|
|
826
826
|
i.getState().releaseInteraction("menu");
|
|
827
827
|
};
|
|
828
|
-
return /* @__PURE__ */ n(
|
|
828
|
+
return /* @__PURE__ */ n(po, {
|
|
829
829
|
trigger: {
|
|
830
|
-
x: t.x +
|
|
831
|
-
y: t.y +
|
|
832
|
-
radius:
|
|
830
|
+
x: t.x + o.center.x,
|
|
831
|
+
y: t.y + o.center.y,
|
|
832
|
+
radius: o.radius
|
|
833
833
|
},
|
|
834
834
|
layer: e.anchor.layer,
|
|
835
835
|
at: e.anchor.at,
|
|
836
836
|
observation: e.anchor.observation,
|
|
837
|
-
onClose:
|
|
837
|
+
onClose: r
|
|
838
838
|
});
|
|
839
|
-
},
|
|
840
|
-
const a =
|
|
839
|
+
}, po = ({ trigger: e, layer: t, at: i, observation: o, onClose: r }) => {
|
|
840
|
+
const a = I(), l = Ge(), c = K((f) => f.spec.annotations), s = K((f) => f.config.parsingLocale), u = vo(), { x: d, y: h, radius: v } = e, p = E(() => go(d, h, v), [
|
|
841
841
|
d,
|
|
842
842
|
h,
|
|
843
843
|
v
|
|
844
|
-
]), g =
|
|
845
|
-
!f &&
|
|
844
|
+
]), g = ia(c, i, E(() => Qr(t, s), [t, s])), C = g !== null && io(g) ? g : null, P = ao(t, o), y = (f, x) => {
|
|
845
|
+
!f && Co(x.reason) && r();
|
|
846
846
|
};
|
|
847
|
-
return /* @__PURE__ */ n(
|
|
847
|
+
return /* @__PURE__ */ n(V.Root, {
|
|
848
848
|
open: u,
|
|
849
849
|
modal: !1,
|
|
850
850
|
onOpenChange: y,
|
|
851
|
-
children: /* @__PURE__ */ n(
|
|
851
|
+
children: /* @__PURE__ */ n(V.Portal, {
|
|
852
852
|
container: l,
|
|
853
|
-
children: /* @__PURE__ */ n(
|
|
853
|
+
children: /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(V.Positioner, {
|
|
854
854
|
anchor: p,
|
|
855
855
|
side: "right",
|
|
856
856
|
align: "start",
|
|
857
857
|
sideOffset: 8,
|
|
858
|
-
className:
|
|
859
|
-
...
|
|
860
|
-
children: /* @__PURE__ */ m(
|
|
861
|
-
className:
|
|
858
|
+
className: Bn,
|
|
859
|
+
...Hn,
|
|
860
|
+
children: /* @__PURE__ */ m(V.Popup, {
|
|
861
|
+
className: Gn,
|
|
862
862
|
"data-testid": "observation-menu",
|
|
863
863
|
children: [
|
|
864
|
-
|
|
865
|
-
attachment:
|
|
866
|
-
onRequestClose:
|
|
864
|
+
C !== null && /* @__PURE__ */ n(lo, {
|
|
865
|
+
attachment: C,
|
|
866
|
+
onRequestClose: r
|
|
867
867
|
}),
|
|
868
|
-
/* @__PURE__ */ n(
|
|
868
|
+
/* @__PURE__ */ n(ro, {
|
|
869
869
|
label: a("graph.annotations.baseMenu.removeHighlight"),
|
|
870
870
|
highlights: P,
|
|
871
|
-
onRequestClose:
|
|
871
|
+
onRequestClose: r
|
|
872
872
|
}),
|
|
873
|
-
/* @__PURE__ */ n(
|
|
874
|
-
|
|
875
|
-
/* @__PURE__ */ n(
|
|
873
|
+
/* @__PURE__ */ n(V.Separator, { className: Oa }),
|
|
874
|
+
C === null && /* @__PURE__ */ m(G, { children: [
|
|
875
|
+
/* @__PURE__ */ n(oo, {
|
|
876
876
|
label: a("graph.annotations.baseMenu.pinNumber"),
|
|
877
877
|
at: i,
|
|
878
|
-
onRequestClose:
|
|
878
|
+
onRequestClose: r
|
|
879
879
|
}),
|
|
880
|
-
/* @__PURE__ */ n(
|
|
880
|
+
/* @__PURE__ */ n(Da, {
|
|
881
881
|
label: a("graph.annotations.baseMenu.annotate"),
|
|
882
882
|
placeholder: a("graph.annotations.textMenu.placeholder"),
|
|
883
883
|
addLabel: a("graph.annotations.textMenu.addButton"),
|
|
884
884
|
at: i,
|
|
885
|
-
onRequestClose:
|
|
885
|
+
onRequestClose: r
|
|
886
886
|
}),
|
|
887
|
-
/* @__PURE__ */ n(
|
|
887
|
+
/* @__PURE__ */ n(uo, {
|
|
888
888
|
label: a("graph.annotations.baseMenu.addSticker"),
|
|
889
889
|
at: i,
|
|
890
|
-
onRequestClose:
|
|
890
|
+
onRequestClose: r
|
|
891
891
|
})
|
|
892
892
|
] }),
|
|
893
|
-
t.highlight !== null && /* @__PURE__ */ n(
|
|
893
|
+
t.highlight !== null && /* @__PURE__ */ n(eo, {
|
|
894
894
|
label: a("graph.annotations.baseMenu.highlight"),
|
|
895
895
|
layer: t,
|
|
896
|
-
observation:
|
|
896
|
+
observation: o,
|
|
897
897
|
highlights: P,
|
|
898
|
-
onRequestClose:
|
|
898
|
+
onRequestClose: r
|
|
899
899
|
}),
|
|
900
|
-
/* @__PURE__ */ n(
|
|
900
|
+
/* @__PURE__ */ n(Fa, {
|
|
901
901
|
label: a("graph.annotations.baseMenu.differenceArrow"),
|
|
902
902
|
layer: t,
|
|
903
903
|
at: i,
|
|
904
|
-
onRequestClose:
|
|
904
|
+
onRequestClose: r
|
|
905
905
|
})
|
|
906
906
|
]
|
|
907
907
|
})
|
|
908
908
|
}) })
|
|
909
909
|
})
|
|
910
910
|
});
|
|
911
|
-
},
|
|
912
|
-
const [e, t] =
|
|
913
|
-
return
|
|
911
|
+
}, go = (e, t, i) => ({ getBoundingClientRect: () => new DOMRect(e - i, t - i, i * 2, i * 2) }), vo = () => {
|
|
912
|
+
const [e, t] = q(!1);
|
|
913
|
+
return B(() => {
|
|
914
914
|
t(!0);
|
|
915
915
|
}, []), e;
|
|
916
|
-
},
|
|
917
|
-
const e =
|
|
918
|
-
return
|
|
919
|
-
},
|
|
916
|
+
}, Co = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", fo = () => {
|
|
917
|
+
const e = Pn();
|
|
918
|
+
return Xn(e);
|
|
919
|
+
}, Xn = (e) => {
|
|
920
920
|
if (e.length !== 1) return null;
|
|
921
921
|
const [t] = e;
|
|
922
922
|
return t?.kind === "annotation" ? t.id : null;
|
|
923
|
-
},
|
|
923
|
+
}, bo = (e) => /* @__PURE__ */ n(T, {
|
|
924
924
|
...e,
|
|
925
925
|
children: /* @__PURE__ */ m("g", {
|
|
926
926
|
stroke: "currentColor",
|
|
@@ -929,7 +929,7 @@ var Pa = (e) => {
|
|
|
929
929
|
strokeLinejoin: "round",
|
|
930
930
|
children: [/* @__PURE__ */ n("path", { d: "M4 9h16m-4-4 4 4" }), /* @__PURE__ */ n("path", { d: "M20 15H4m4 4-4-4" })]
|
|
931
931
|
})
|
|
932
|
-
}),
|
|
932
|
+
}), yo = (e) => /* @__PURE__ */ n(T, {
|
|
933
933
|
...e,
|
|
934
934
|
children: /* @__PURE__ */ m("g", {
|
|
935
935
|
stroke: "currentColor",
|
|
@@ -943,43 +943,43 @@ var Pa = (e) => {
|
|
|
943
943
|
/* @__PURE__ */ n("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" })
|
|
944
944
|
]
|
|
945
945
|
})
|
|
946
|
-
}),
|
|
947
|
-
var
|
|
948
|
-
var
|
|
946
|
+
}), So = { kind: "chrome-popup" }, wo = "var(--q7gcrz0)", xo = "var(--q7gcrz1)", Lo = "q7gcrz2", To = "q7gcrz3";
|
|
947
|
+
var Po = "q7gcrz5", Io = "q7gcrz6", Ao = "q7gcrz7", Oo = "q7gcrz8", jn = "q7gcrz9", Mo = "q7gcrza";
|
|
948
|
+
var rn = "q7gcrzd q7gcrzc", Yn = "q7gcrze q7gcrzc", No = [
|
|
949
949
|
"absolute-difference",
|
|
950
950
|
"relative-difference",
|
|
951
951
|
"proportion"
|
|
952
|
-
],
|
|
952
|
+
], an = ["absolute-difference", "relative-difference"], ko = ["relative-difference", "proportion"], Ro = {
|
|
953
953
|
"absolute-difference": "graph.annotations.differenceArrowToolbar.labelKind.absoluteDifference",
|
|
954
954
|
"relative-difference": "graph.annotations.differenceArrowToolbar.labelKind.relativeDifference",
|
|
955
955
|
proportion: "graph.annotations.differenceArrowToolbar.labelKind.proportion"
|
|
956
|
-
},
|
|
957
|
-
const { formattingLocale: t } =
|
|
958
|
-
return
|
|
959
|
-
const
|
|
960
|
-
return
|
|
956
|
+
}, Eo = (e) => {
|
|
957
|
+
const { formattingLocale: t } = U(), i = K((r) => r.config.parsingLocale), o = t ?? i;
|
|
958
|
+
return E(() => {
|
|
959
|
+
const r = Wr(e.start, e.end);
|
|
960
|
+
return No.filter((a) => r || !an.includes(a) || a === e.label).map((a) => ({
|
|
961
961
|
kind: a,
|
|
962
|
-
nameKey:
|
|
963
|
-
preview:
|
|
964
|
-
locale:
|
|
962
|
+
nameKey: Ro[a],
|
|
963
|
+
preview: ca({
|
|
964
|
+
locale: o,
|
|
965
965
|
kind: a,
|
|
966
966
|
startValue: e.start.measurementValue,
|
|
967
967
|
endValue: e.end.measurementValue,
|
|
968
968
|
valueFormat: e.start.valueFormat
|
|
969
969
|
}),
|
|
970
|
-
isPickable:
|
|
971
|
-
isSuspect:
|
|
970
|
+
isPickable: r || !an.includes(a),
|
|
971
|
+
isSuspect: ko.includes(a) && e.start.measurementValue === 0
|
|
972
972
|
}));
|
|
973
|
-
}, [e,
|
|
974
|
-
},
|
|
975
|
-
const
|
|
973
|
+
}, [e, o]);
|
|
974
|
+
}, se = 8, _o = ({ labelBox: e, panelRect: t, frameWidth: i, frameHeight: o }) => {
|
|
975
|
+
const r = t.y + e.y, a = r + e.height, l = r - 8 - 36, c = a + 8, s = Do(se, l >= se ? l : c, o - se - 36), u = se;
|
|
976
976
|
return {
|
|
977
977
|
top: s,
|
|
978
978
|
left: u,
|
|
979
|
-
available: Math.max(0, i -
|
|
979
|
+
available: Math.max(0, i - se * 2),
|
|
980
980
|
centre: t.x + e.x + e.width / 2 - u
|
|
981
981
|
};
|
|
982
|
-
},
|
|
982
|
+
}, Do = (e, t, i) => Math.max(e, Math.min(t, i)), Ae = [
|
|
983
983
|
{
|
|
984
984
|
id: "small",
|
|
985
985
|
nameKey: "graph.annotations.differenceArrowToolbar.size.small"
|
|
@@ -992,46 +992,46 @@ var nn = "q7gcrzd q7gcrzc", qn = "q7gcrze q7gcrzc", mo = [
|
|
|
992
992
|
id: "large",
|
|
993
993
|
nameKey: "graph.annotations.differenceArrowToolbar.size.large"
|
|
994
994
|
}
|
|
995
|
-
],
|
|
996
|
-
const l =
|
|
995
|
+
], Ho = ({ arrow: e, labelBox: t, panelRect: i, frameWidth: o, frameHeight: r, frameElement: a }) => {
|
|
996
|
+
const l = I(), { chartId: c, commands: s } = U(), u = Z(), [d, h] = q(null), v = Eo(e), p = _o({
|
|
997
997
|
labelBox: t,
|
|
998
998
|
panelRect: i,
|
|
999
|
-
frameWidth:
|
|
1000
|
-
frameHeight:
|
|
999
|
+
frameWidth: o,
|
|
1000
|
+
frameHeight: r
|
|
1001
1001
|
}), g = (y, f) => {
|
|
1002
|
-
s.dispatch(new
|
|
1002
|
+
s.dispatch(new On({
|
|
1003
1003
|
kind: "differenceArrow",
|
|
1004
1004
|
id: e.id,
|
|
1005
1005
|
patch: y
|
|
1006
1006
|
}), f);
|
|
1007
1007
|
};
|
|
1008
|
-
|
|
1008
|
+
B(() => () => s.seal(), [s]), B(() => {
|
|
1009
1009
|
const { claimInteraction: y, releaseInteraction: f } = u.getState();
|
|
1010
|
-
return d === null ? f("chrome-popup") : y(
|
|
1010
|
+
return d === null ? f("chrome-popup") : y(So), () => f("chrome-popup");
|
|
1011
1011
|
}, [u, d]);
|
|
1012
|
-
const
|
|
1012
|
+
const C = (y) => {
|
|
1013
1013
|
h(y ? "color" : null), y || s.seal();
|
|
1014
1014
|
}, P = () => {
|
|
1015
1015
|
s.dispatch(new ze({ id: e.id })), a.focus({ preventScroll: !0 });
|
|
1016
1016
|
};
|
|
1017
1017
|
return /* @__PURE__ */ n("div", {
|
|
1018
|
-
className:
|
|
1018
|
+
className: Lo,
|
|
1019
1019
|
style: {
|
|
1020
1020
|
top: p.top,
|
|
1021
1021
|
left: p.left,
|
|
1022
1022
|
width: p.available
|
|
1023
1023
|
},
|
|
1024
|
-
children: /* @__PURE__ */ m(
|
|
1024
|
+
children: /* @__PURE__ */ m(X.Root, {
|
|
1025
1025
|
"aria-label": l("graph.annotations.differenceArrowToolbar.label"),
|
|
1026
|
-
className:
|
|
1026
|
+
className: To,
|
|
1027
1027
|
"data-testid": "difference-arrow-toolbar",
|
|
1028
|
-
...
|
|
1029
|
-
style:
|
|
1030
|
-
[
|
|
1031
|
-
[
|
|
1028
|
+
...ye(c),
|
|
1029
|
+
style: En({
|
|
1030
|
+
[wo]: `${p.centre}px`,
|
|
1031
|
+
[xo]: `${p.available}px`
|
|
1032
1032
|
}),
|
|
1033
1033
|
children: [
|
|
1034
|
-
/* @__PURE__ */ n(
|
|
1034
|
+
/* @__PURE__ */ n(Vo, {
|
|
1035
1035
|
options: v,
|
|
1036
1036
|
current: e.label,
|
|
1037
1037
|
isOpen: d === "labelKind",
|
|
@@ -1040,20 +1040,20 @@ var nn = "q7gcrzd q7gcrzc", qn = "q7gcrze q7gcrzc", mo = [
|
|
|
1040
1040
|
g({ label: y }), h(null);
|
|
1041
1041
|
}
|
|
1042
1042
|
}),
|
|
1043
|
-
/* @__PURE__ */ n(
|
|
1044
|
-
/* @__PURE__ */ n(
|
|
1043
|
+
/* @__PURE__ */ n(X.Separator, {}),
|
|
1044
|
+
/* @__PURE__ */ n(X.ColorPicker, {
|
|
1045
1045
|
color: e.color,
|
|
1046
1046
|
label: l("graph.annotations.differenceArrowToolbar.color"),
|
|
1047
1047
|
onChange: (y) => g({ color: y }, { transient: !0 }),
|
|
1048
1048
|
isOpen: d === "color",
|
|
1049
|
-
onOpenChange:
|
|
1050
|
-
popupAttributes:
|
|
1049
|
+
onOpenChange: C,
|
|
1050
|
+
popupAttributes: ye(c),
|
|
1051
1051
|
children: /* @__PURE__ */ n("span", {
|
|
1052
|
-
className:
|
|
1052
|
+
className: Io,
|
|
1053
1053
|
style: { background: e.color ?? "transparent" }
|
|
1054
1054
|
})
|
|
1055
1055
|
}),
|
|
1056
|
-
/* @__PURE__ */ n(
|
|
1056
|
+
/* @__PURE__ */ n(zo, {
|
|
1057
1057
|
current: e.size,
|
|
1058
1058
|
isOpen: d === "size",
|
|
1059
1059
|
onOpenChange: (y) => h(y ? "size" : null),
|
|
@@ -1061,24 +1061,24 @@ var nn = "q7gcrzd q7gcrzc", qn = "q7gcrze q7gcrzc", mo = [
|
|
|
1061
1061
|
g({ size: y }), h(null);
|
|
1062
1062
|
}
|
|
1063
1063
|
}),
|
|
1064
|
-
/* @__PURE__ */ n(
|
|
1065
|
-
/* @__PURE__ */ n(
|
|
1064
|
+
/* @__PURE__ */ n(X.Separator, {}),
|
|
1065
|
+
/* @__PURE__ */ n(X.Button, {
|
|
1066
1066
|
"aria-label": l("graph.annotations.differenceArrowToolbar.swap"),
|
|
1067
|
-
className:
|
|
1067
|
+
className: rn,
|
|
1068
1068
|
onClick: () => g({
|
|
1069
1069
|
start: e.end.anchor,
|
|
1070
1070
|
end: e.start.anchor
|
|
1071
1071
|
}),
|
|
1072
|
-
children: /* @__PURE__ */ n(
|
|
1072
|
+
children: /* @__PURE__ */ n(bo, {
|
|
1073
1073
|
size: "sm",
|
|
1074
1074
|
title: ""
|
|
1075
1075
|
})
|
|
1076
1076
|
}),
|
|
1077
|
-
/* @__PURE__ */ n(
|
|
1077
|
+
/* @__PURE__ */ n(X.Button, {
|
|
1078
1078
|
"aria-label": l("graph.annotations.differenceArrowToolbar.remove"),
|
|
1079
|
-
className:
|
|
1079
|
+
className: rn,
|
|
1080
1080
|
onClick: P,
|
|
1081
|
-
children: /* @__PURE__ */ n(
|
|
1081
|
+
children: /* @__PURE__ */ n(yo, {
|
|
1082
1082
|
size: "sm",
|
|
1083
1083
|
title: ""
|
|
1084
1084
|
})
|
|
@@ -1086,21 +1086,21 @@ var nn = "q7gcrzd q7gcrzc", qn = "q7gcrze q7gcrzc", mo = [
|
|
|
1086
1086
|
]
|
|
1087
1087
|
})
|
|
1088
1088
|
});
|
|
1089
|
-
},
|
|
1090
|
-
const a =
|
|
1091
|
-
return /* @__PURE__ */ m(
|
|
1089
|
+
}, Vo = ({ options: e, current: t, isOpen: i, onOpenChange: o, onPick: r }) => {
|
|
1090
|
+
const a = I(), l = e.find((s) => s.kind === t), c = e.some((s) => s.isPickable && s.kind !== t);
|
|
1091
|
+
return /* @__PURE__ */ m(V.Root, {
|
|
1092
1092
|
open: i,
|
|
1093
1093
|
modal: !1,
|
|
1094
|
-
onOpenChange:
|
|
1095
|
-
children: [/* @__PURE__ */ m(
|
|
1096
|
-
render: /* @__PURE__ */ n(
|
|
1094
|
+
onOpenChange: o,
|
|
1095
|
+
children: [/* @__PURE__ */ m(V.Trigger, {
|
|
1096
|
+
render: /* @__PURE__ */ n(X.Button, {}),
|
|
1097
1097
|
"aria-label": a("graph.annotations.differenceArrowToolbar.labelKind.ariaLabel"),
|
|
1098
|
-
className:
|
|
1098
|
+
className: Yn,
|
|
1099
1099
|
disabled: !c,
|
|
1100
1100
|
onMouseDown: (s) => s.preventDefault(),
|
|
1101
1101
|
children: [
|
|
1102
1102
|
/* @__PURE__ */ n("span", {
|
|
1103
|
-
className:
|
|
1103
|
+
className: Po,
|
|
1104
1104
|
children: l === void 0 ? "" : a(l.nameKey)
|
|
1105
1105
|
}),
|
|
1106
1106
|
l !== void 0 && /* @__PURE__ */ m("span", {
|
|
@@ -1111,13 +1111,13 @@ var nn = "q7gcrzd q7gcrzc", qn = "q7gcrze q7gcrzc", mo = [
|
|
|
1111
1111
|
")"
|
|
1112
1112
|
]
|
|
1113
1113
|
}),
|
|
1114
|
-
/* @__PURE__ */ n(
|
|
1114
|
+
/* @__PURE__ */ n(we, { size: "sm" })
|
|
1115
1115
|
]
|
|
1116
|
-
}), /* @__PURE__ */ n(
|
|
1117
|
-
className:
|
|
1116
|
+
}), /* @__PURE__ */ n(Qn, { children: e.map((s) => /* @__PURE__ */ m(V.Item, {
|
|
1117
|
+
className: jn,
|
|
1118
1118
|
"data-selected": s.kind === t,
|
|
1119
1119
|
disabled: !s.isPickable,
|
|
1120
|
-
onClick: () =>
|
|
1120
|
+
onClick: () => r(s.kind),
|
|
1121
1121
|
children: [
|
|
1122
1122
|
/* @__PURE__ */ n("span", { children: a(s.nameKey) }),
|
|
1123
1123
|
(s.isSuspect || !s.isPickable) && /* @__PURE__ */ n("span", {
|
|
@@ -1127,75 +1127,75 @@ var nn = "q7gcrzd q7gcrzc", qn = "q7gcrze q7gcrzc", mo = [
|
|
|
1127
1127
|
children: "⚠"
|
|
1128
1128
|
}),
|
|
1129
1129
|
/* @__PURE__ */ n("span", {
|
|
1130
|
-
className:
|
|
1130
|
+
className: Mo,
|
|
1131
1131
|
children: s.preview
|
|
1132
1132
|
})
|
|
1133
1133
|
]
|
|
1134
1134
|
}, s.kind)) })]
|
|
1135
1135
|
});
|
|
1136
|
-
},
|
|
1137
|
-
const
|
|
1138
|
-
return /* @__PURE__ */ m(
|
|
1136
|
+
}, zo = ({ current: e, isOpen: t, onOpenChange: i, onPick: o }) => {
|
|
1137
|
+
const r = I(), a = Ae.find((l) => l.id === e) ?? Ae[0];
|
|
1138
|
+
return /* @__PURE__ */ m(V.Root, {
|
|
1139
1139
|
open: t,
|
|
1140
1140
|
modal: !1,
|
|
1141
1141
|
onOpenChange: i,
|
|
1142
|
-
children: [/* @__PURE__ */ m(
|
|
1143
|
-
render: /* @__PURE__ */ n(
|
|
1144
|
-
"aria-label":
|
|
1145
|
-
className:
|
|
1142
|
+
children: [/* @__PURE__ */ m(V.Trigger, {
|
|
1143
|
+
render: /* @__PURE__ */ n(X.Button, {}),
|
|
1144
|
+
"aria-label": r("graph.annotations.differenceArrowToolbar.size.ariaLabel"),
|
|
1145
|
+
className: Yn,
|
|
1146
1146
|
onMouseDown: (l) => l.preventDefault(),
|
|
1147
|
-
children: [/* @__PURE__ */ n("span", { children: a === void 0 ? "" :
|
|
1148
|
-
}), /* @__PURE__ */ n(
|
|
1149
|
-
className:
|
|
1147
|
+
children: [/* @__PURE__ */ n("span", { children: a === void 0 ? "" : r(a.nameKey) }), /* @__PURE__ */ n(we, { size: "sm" })]
|
|
1148
|
+
}), /* @__PURE__ */ n(Qn, { children: Ae.map((l) => /* @__PURE__ */ n(V.Item, {
|
|
1149
|
+
className: jn,
|
|
1150
1150
|
"data-selected": l.id === e,
|
|
1151
|
-
onClick: () =>
|
|
1152
|
-
children:
|
|
1151
|
+
onClick: () => o(l.id),
|
|
1152
|
+
children: r(l.nameKey)
|
|
1153
1153
|
}, l.id)) })]
|
|
1154
1154
|
});
|
|
1155
|
-
},
|
|
1156
|
-
const { chartId: t } =
|
|
1157
|
-
return /* @__PURE__ */ n(
|
|
1158
|
-
container:
|
|
1159
|
-
children: /* @__PURE__ */ n(
|
|
1155
|
+
}, Qn = ({ children: e }) => {
|
|
1156
|
+
const { chartId: t } = U();
|
|
1157
|
+
return /* @__PURE__ */ n(V.Portal, {
|
|
1158
|
+
container: He(),
|
|
1159
|
+
children: /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(V.Positioner, {
|
|
1160
1160
|
side: "bottom",
|
|
1161
1161
|
align: "start",
|
|
1162
1162
|
sideOffset: 6,
|
|
1163
|
-
className:
|
|
1164
|
-
children: /* @__PURE__ */ n(
|
|
1165
|
-
className:
|
|
1163
|
+
className: Ao,
|
|
1164
|
+
children: /* @__PURE__ */ n(V.Popup, {
|
|
1165
|
+
className: Oo,
|
|
1166
1166
|
onMouseDown: (i) => i.preventDefault(),
|
|
1167
|
-
...
|
|
1167
|
+
...ye(t),
|
|
1168
1168
|
children: e
|
|
1169
1169
|
})
|
|
1170
1170
|
}) })
|
|
1171
1171
|
});
|
|
1172
1172
|
};
|
|
1173
|
-
var
|
|
1174
|
-
|
|
1173
|
+
var Fo = "ydgo3h0", Bo = "ydgo3h1", Go = "ydgo3h2", Jn = (e) => e === "start" ? "end" : "start", et = ({ dispatch: e, arrow: t, endpoint: i, anchor: o }) => {
|
|
1174
|
+
Mn(o, t[i].anchor) || e(new On({
|
|
1175
1175
|
kind: "differenceArrow",
|
|
1176
1176
|
id: t.id,
|
|
1177
|
-
patch: { [i]:
|
|
1177
|
+
patch: { [i]: o }
|
|
1178
1178
|
}));
|
|
1179
|
-
},
|
|
1180
|
-
const u =
|
|
1179
|
+
}, Ko = ({ clientPoint: e, panelOrigin: t, panelRect: i, engine: o, layers: r, coordSystem: a, resolver: l, fixedAnchor: c, align: s }) => {
|
|
1180
|
+
const u = Uo({
|
|
1181
1181
|
x: e.x - t.x,
|
|
1182
1182
|
y: e.y - t.y
|
|
1183
|
-
}, i), { primary: d } =
|
|
1183
|
+
}, i), { primary: d } = o.query(Fe(u, i));
|
|
1184
1184
|
if (d === null) return null;
|
|
1185
|
-
const h =
|
|
1185
|
+
const h = r.find((p) => p.id === d.layerId);
|
|
1186
1186
|
if (h === void 0) return null;
|
|
1187
|
-
const v =
|
|
1187
|
+
const v = ke({
|
|
1188
1188
|
resolver: l,
|
|
1189
1189
|
layer: h,
|
|
1190
1190
|
observation: d.observation,
|
|
1191
1191
|
coordSystem: a,
|
|
1192
1192
|
align: s
|
|
1193
1193
|
});
|
|
1194
|
-
return v === null ||
|
|
1195
|
-
},
|
|
1194
|
+
return v === null || Mn(v.anchor, c) ? null : v;
|
|
1195
|
+
}, Uo = (e, t) => ({
|
|
1196
1196
|
x: Math.max(0, Math.min(e.x, t.width)),
|
|
1197
1197
|
y: Math.max(0, Math.min(e.y, t.height))
|
|
1198
|
-
}),
|
|
1198
|
+
}), Wo = class {
|
|
1199
1199
|
constructor(e) {
|
|
1200
1200
|
this.params = e, this.listeners = new AbortController(), this.pendingEvent = null, this.scheduledFrame = null, this.hasMoved = !1, this.hasPublished = !1, this.handleMove = (t) => {
|
|
1201
1201
|
t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.hasMoved = !0, this.scheduledFrame === null && (this.scheduledFrame = requestAnimationFrame(this.runFrame)));
|
|
@@ -1207,20 +1207,20 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1207
1207
|
this.scheduledFrame = null;
|
|
1208
1208
|
const t = this.pendingEvent;
|
|
1209
1209
|
if (this.pendingEvent = null, t === null) return;
|
|
1210
|
-
const { editorStore: i, engine:
|
|
1211
|
-
if (this.hasPublished &&
|
|
1212
|
-
const p =
|
|
1210
|
+
const { editorStore: i, engine: o, anchorResolver: r, endpoint: a, readInputs: l } = this.params, { arrow: c, panelOrigin: s, panelRect: u, layers: d, coordSystem: h } = l(), v = i.getState();
|
|
1211
|
+
if (this.hasPublished && Me(ve(v, "endpoint-drag"), c.id, a) === null) return;
|
|
1212
|
+
const p = Ko({
|
|
1213
1213
|
clientPoint: {
|
|
1214
1214
|
x: t.clientX,
|
|
1215
1215
|
y: t.clientY
|
|
1216
1216
|
},
|
|
1217
1217
|
panelOrigin: s,
|
|
1218
1218
|
panelRect: u,
|
|
1219
|
-
engine:
|
|
1219
|
+
engine: o,
|
|
1220
1220
|
layers: d,
|
|
1221
1221
|
coordSystem: h,
|
|
1222
|
-
resolver:
|
|
1223
|
-
fixedAnchor: c[
|
|
1222
|
+
resolver: r,
|
|
1223
|
+
fixedAnchor: c[Jn(a)].anchor,
|
|
1224
1224
|
align: c[a].anchor.align
|
|
1225
1225
|
});
|
|
1226
1226
|
p !== null && this.publish(p);
|
|
@@ -1232,37 +1232,37 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1232
1232
|
}
|
|
1233
1233
|
finish(e) {
|
|
1234
1234
|
this.params.onSettled(), this.listeners.abort(), this.cancelFrame(), e && this.hasMoved && this.runFrame(), this.pendingEvent = null;
|
|
1235
|
-
const { editorStore: t, endpoint: i, readInputs:
|
|
1236
|
-
c !== null && (l.releaseInteraction("endpoint-drag"), e &&
|
|
1237
|
-
dispatch:
|
|
1235
|
+
const { editorStore: t, endpoint: i, readInputs: o, dispatch: r } = this.params, { arrow: a } = o(), l = t.getState(), c = Me(ve(l, "endpoint-drag"), a.id, i);
|
|
1236
|
+
c !== null && (l.releaseInteraction("endpoint-drag"), e && et({
|
|
1237
|
+
dispatch: r,
|
|
1238
1238
|
arrow: a,
|
|
1239
1239
|
endpoint: i,
|
|
1240
1240
|
anchor: c.point.anchor
|
|
1241
1241
|
}));
|
|
1242
1242
|
}
|
|
1243
1243
|
publish(e) {
|
|
1244
|
-
const { editorStore: t, readInputs: i, endpoint:
|
|
1244
|
+
const { editorStore: t, readInputs: i, endpoint: o } = this.params;
|
|
1245
1245
|
t.getState().claimInteraction({
|
|
1246
1246
|
kind: "endpoint-drag",
|
|
1247
1247
|
annotationId: i().arrow.id,
|
|
1248
|
-
endpoint:
|
|
1248
|
+
endpoint: o,
|
|
1249
1249
|
point: e
|
|
1250
1250
|
}), this.hasPublished = !0;
|
|
1251
1251
|
}
|
|
1252
1252
|
cancelFrame() {
|
|
1253
1253
|
this.scheduledFrame !== null && (cancelAnimationFrame(this.scheduledFrame), this.scheduledFrame = null);
|
|
1254
1254
|
}
|
|
1255
|
-
},
|
|
1256
|
-
const { commands:
|
|
1255
|
+
}, Zo = ({ arrow: e, panelOrigin: t, panelRect: i }) => {
|
|
1256
|
+
const { commands: o, anchorResolver: r } = U(), { engine: a } = De(), l = Z(), c = de({
|
|
1257
1257
|
arrow: e,
|
|
1258
1258
|
panelOrigin: t,
|
|
1259
1259
|
panelRect: i,
|
|
1260
|
-
...K(
|
|
1260
|
+
...K(Be((u) => ({
|
|
1261
1261
|
layers: u.layers,
|
|
1262
1262
|
coordSystem: u.coordSystem
|
|
1263
1263
|
})))
|
|
1264
|
-
}), s =
|
|
1265
|
-
return
|
|
1264
|
+
}), s = be(null);
|
|
1265
|
+
return B(() => () => s.current?.finish(!1), []), fe((u) => ({
|
|
1266
1266
|
onClick: (d) => d.stopPropagation(),
|
|
1267
1267
|
onPointerDown: (d) => {
|
|
1268
1268
|
if (d.button !== 0 || s.current !== null) return;
|
|
@@ -1272,15 +1272,15 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1272
1272
|
return;
|
|
1273
1273
|
}
|
|
1274
1274
|
d.currentTarget.focus({ preventScroll: !0 }), d.preventDefault();
|
|
1275
|
-
const h = new
|
|
1275
|
+
const h = new Wo({
|
|
1276
1276
|
handle: d.currentTarget,
|
|
1277
1277
|
pointerId: d.pointerId,
|
|
1278
1278
|
endpoint: u,
|
|
1279
1279
|
readInputs: () => c.current,
|
|
1280
1280
|
editorStore: l,
|
|
1281
1281
|
engine: a,
|
|
1282
|
-
anchorResolver:
|
|
1283
|
-
dispatch:
|
|
1282
|
+
anchorResolver: r,
|
|
1283
|
+
dispatch: o.dispatch,
|
|
1284
1284
|
onSettled: () => {
|
|
1285
1285
|
s.current = null;
|
|
1286
1286
|
}
|
|
@@ -1291,22 +1291,22 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1291
1291
|
c,
|
|
1292
1292
|
l,
|
|
1293
1293
|
a,
|
|
1294
|
-
|
|
1295
|
-
|
|
1294
|
+
r,
|
|
1295
|
+
o
|
|
1296
1296
|
]);
|
|
1297
|
-
},
|
|
1298
|
-
const { commands: t, anchorResolver: i } =
|
|
1297
|
+
}, qo = [" ", "Enter"], $o = ({ arrow: e }) => {
|
|
1298
|
+
const { commands: t, anchorResolver: i } = U(), o = Z(), { layers: r, coordSystem: a, mainAxis: l } = K(Be((s) => ({
|
|
1299
1299
|
layers: s.layers,
|
|
1300
1300
|
coordSystem: s.coordSystem,
|
|
1301
1301
|
mainAxis: s.coordSystem.type === "cartesian" ? s.coordSystem.mainAxis : "x"
|
|
1302
1302
|
}))), c = e.id;
|
|
1303
|
-
return
|
|
1304
|
-
const s =
|
|
1305
|
-
|
|
1306
|
-
}, [
|
|
1303
|
+
return B(() => () => {
|
|
1304
|
+
const s = o.getState();
|
|
1305
|
+
ve(s, "endpoint-drag")?.annotationId === c && s.releaseInteraction("endpoint-drag");
|
|
1306
|
+
}, [o, c]), fe((s) => ({ onKeyDown: (u) => {
|
|
1307
1307
|
if (u.altKey || u.ctrlKey || u.metaKey || u.shiftKey) return;
|
|
1308
|
-
const d =
|
|
1309
|
-
if (
|
|
1308
|
+
const d = o.getState(), h = Me(ve(d, "endpoint-drag"), e.id, s);
|
|
1309
|
+
if (qo.includes(u.key)) {
|
|
1310
1310
|
if (u.preventDefault(), u.repeat) return;
|
|
1311
1311
|
if (h === null) return d.claimInteraction({
|
|
1312
1312
|
kind: "endpoint-drag",
|
|
@@ -1314,7 +1314,7 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1314
1314
|
endpoint: s,
|
|
1315
1315
|
point: e[s]
|
|
1316
1316
|
});
|
|
1317
|
-
d.releaseInteraction("endpoint-drag"),
|
|
1317
|
+
d.releaseInteraction("endpoint-drag"), et({
|
|
1318
1318
|
dispatch: t.dispatch,
|
|
1319
1319
|
arrow: e,
|
|
1320
1320
|
endpoint: s,
|
|
@@ -1323,15 +1323,15 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1323
1323
|
return;
|
|
1324
1324
|
}
|
|
1325
1325
|
if (h === null) return;
|
|
1326
|
-
const v =
|
|
1326
|
+
const v = Xo(u.key, l);
|
|
1327
1327
|
if (v === null) return;
|
|
1328
1328
|
u.preventDefault();
|
|
1329
|
-
const p =
|
|
1329
|
+
const p = jo({
|
|
1330
1330
|
arrow: e,
|
|
1331
1331
|
endpoint: s,
|
|
1332
1332
|
from: h.point.anchor,
|
|
1333
1333
|
move: v,
|
|
1334
|
-
layers:
|
|
1334
|
+
layers: r,
|
|
1335
1335
|
coordSystem: a,
|
|
1336
1336
|
resolver: i
|
|
1337
1337
|
});
|
|
@@ -1343,29 +1343,29 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1343
1343
|
});
|
|
1344
1344
|
} }), [
|
|
1345
1345
|
e,
|
|
1346
|
-
|
|
1346
|
+
o,
|
|
1347
1347
|
t,
|
|
1348
1348
|
i,
|
|
1349
|
-
|
|
1349
|
+
r,
|
|
1350
1350
|
a,
|
|
1351
1351
|
l
|
|
1352
1352
|
]);
|
|
1353
|
-
},
|
|
1353
|
+
}, Xo = (e, t) => {
|
|
1354
1354
|
const i = e === "ArrowUp" || e === "ArrowDown";
|
|
1355
1355
|
return !i && !(e === "ArrowLeft" || e === "ArrowRight") ? null : {
|
|
1356
1356
|
axis: t === "x" === i ? "cross" : "main",
|
|
1357
1357
|
step: e === "ArrowDown" || e === "ArrowRight" ? 1 : -1
|
|
1358
1358
|
};
|
|
1359
|
-
},
|
|
1360
|
-
const c =
|
|
1359
|
+
}, jo = ({ arrow: e, endpoint: t, from: i, move: o, layers: r, coordSystem: a, resolver: l }) => {
|
|
1360
|
+
const c = r.find((u) => u.id === i.layerId);
|
|
1361
1361
|
if (c === void 0) return null;
|
|
1362
|
-
const s =
|
|
1362
|
+
const s = ya({
|
|
1363
1363
|
layer: c,
|
|
1364
1364
|
from: i,
|
|
1365
|
-
partner: e[
|
|
1366
|
-
axis:
|
|
1367
|
-
step:
|
|
1368
|
-
canLandOn: (u) =>
|
|
1365
|
+
partner: e[Jn(t)].anchor,
|
|
1366
|
+
axis: o.axis,
|
|
1367
|
+
step: o.step,
|
|
1368
|
+
canLandOn: (u) => ke({
|
|
1369
1369
|
resolver: l,
|
|
1370
1370
|
layer: c,
|
|
1371
1371
|
observation: u,
|
|
@@ -1373,40 +1373,40 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1373
1373
|
align: e[t].anchor.align
|
|
1374
1374
|
}) !== null
|
|
1375
1375
|
});
|
|
1376
|
-
return s === null ? null :
|
|
1376
|
+
return s === null ? null : ke({
|
|
1377
1377
|
resolver: l,
|
|
1378
1378
|
layer: c,
|
|
1379
1379
|
observation: s.observation,
|
|
1380
1380
|
coordSystem: a,
|
|
1381
1381
|
align: e[t].anchor.align
|
|
1382
1382
|
});
|
|
1383
|
-
},
|
|
1384
|
-
const t =
|
|
1385
|
-
return t === null ? null : /* @__PURE__ */ n(
|
|
1383
|
+
}, Yo = (e) => {
|
|
1384
|
+
const t = fo();
|
|
1385
|
+
return t === null ? null : /* @__PURE__ */ n(Qo, {
|
|
1386
1386
|
annotationId: t,
|
|
1387
1387
|
...e
|
|
1388
1388
|
});
|
|
1389
|
-
},
|
|
1390
|
-
const i =
|
|
1391
|
-
return
|
|
1392
|
-
committedArrow:
|
|
1393
|
-
committedLabelBox:
|
|
1394
|
-
labelBox:
|
|
1395
|
-
start:
|
|
1396
|
-
end:
|
|
1397
|
-
isDragged:
|
|
1389
|
+
}, Qo = ({ annotationId: e, ...t }) => {
|
|
1390
|
+
const i = Dt(), o = E(() => i.find((r) => r.id === e), [i, e]);
|
|
1391
|
+
return o === void 0 ? null : /* @__PURE__ */ n(Jo, {
|
|
1392
|
+
committedArrow: o.committedArrow,
|
|
1393
|
+
committedLabelBox: o.committedLabelBox,
|
|
1394
|
+
labelBox: o.labelBox,
|
|
1395
|
+
start: o.start,
|
|
1396
|
+
end: o.end,
|
|
1397
|
+
isDragged: o.isDragged,
|
|
1398
1398
|
...t
|
|
1399
1399
|
});
|
|
1400
|
-
},
|
|
1401
|
-
const d =
|
|
1400
|
+
}, Jo = ({ committedArrow: e, committedLabelBox: t, labelBox: i, start: o, end: r, panelRect: a, panelOrigin: l, frameRect: c, frameElement: s, isDragged: u }) => {
|
|
1401
|
+
const d = Zo({
|
|
1402
1402
|
arrow: e,
|
|
1403
1403
|
panelOrigin: l,
|
|
1404
1404
|
panelRect: a
|
|
1405
|
-
}), h =
|
|
1405
|
+
}), h = $o({ arrow: e });
|
|
1406
1406
|
return /* @__PURE__ */ m("div", {
|
|
1407
1407
|
"data-testid": "difference-arrow-selection",
|
|
1408
1408
|
children: [
|
|
1409
|
-
!u && /* @__PURE__ */ n(
|
|
1409
|
+
!u && /* @__PURE__ */ n(Ho, {
|
|
1410
1410
|
arrow: e,
|
|
1411
1411
|
labelBox: t,
|
|
1412
1412
|
panelRect: a,
|
|
@@ -1416,7 +1416,7 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1416
1416
|
}),
|
|
1417
1417
|
/* @__PURE__ */ n("div", {
|
|
1418
1418
|
"aria-hidden": "true",
|
|
1419
|
-
className:
|
|
1419
|
+
className: Go,
|
|
1420
1420
|
"data-testid": "difference-arrow-selection-label",
|
|
1421
1421
|
style: {
|
|
1422
1422
|
left: a.x + i.x - 2,
|
|
@@ -1425,24 +1425,24 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1425
1425
|
height: i.height + 4
|
|
1426
1426
|
}
|
|
1427
1427
|
}),
|
|
1428
|
-
/* @__PURE__ */ n(
|
|
1428
|
+
/* @__PURE__ */ n(on, {
|
|
1429
1429
|
endpoint: "start",
|
|
1430
|
-
point:
|
|
1430
|
+
point: o,
|
|
1431
1431
|
panelRect: a,
|
|
1432
1432
|
dragHandlers: d("start"),
|
|
1433
1433
|
keyboardHandlers: h("start")
|
|
1434
1434
|
}),
|
|
1435
|
-
/* @__PURE__ */ n(
|
|
1435
|
+
/* @__PURE__ */ n(on, {
|
|
1436
1436
|
endpoint: "end",
|
|
1437
|
-
point:
|
|
1437
|
+
point: r,
|
|
1438
1438
|
panelRect: a,
|
|
1439
1439
|
dragHandlers: d("end"),
|
|
1440
1440
|
keyboardHandlers: h("end")
|
|
1441
1441
|
})
|
|
1442
1442
|
]
|
|
1443
1443
|
});
|
|
1444
|
-
},
|
|
1445
|
-
className:
|
|
1444
|
+
}, on = ({ endpoint: e, point: t, panelRect: i, dragHandlers: o, keyboardHandlers: r }) => /* @__PURE__ */ n("div", {
|
|
1445
|
+
className: Fo,
|
|
1446
1446
|
"data-testid": "difference-arrow-selection-handle",
|
|
1447
1447
|
"data-endpoint": e,
|
|
1448
1448
|
role: "button",
|
|
@@ -1451,13 +1451,13 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1451
1451
|
top: i.y + t.y
|
|
1452
1452
|
},
|
|
1453
1453
|
tabIndex: 0,
|
|
1454
|
-
...r,
|
|
1455
1454
|
...o,
|
|
1455
|
+
...r,
|
|
1456
1456
|
children: /* @__PURE__ */ n("span", {
|
|
1457
1457
|
"aria-hidden": "true",
|
|
1458
|
-
className:
|
|
1458
|
+
className: Bo
|
|
1459
1459
|
})
|
|
1460
|
-
}),
|
|
1460
|
+
}), ei = (e) => /* @__PURE__ */ n(T, {
|
|
1461
1461
|
...e,
|
|
1462
1462
|
children: /* @__PURE__ */ m("g", {
|
|
1463
1463
|
stroke: "currentColor",
|
|
@@ -1466,104 +1466,104 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1466
1466
|
strokeLinejoin: "round",
|
|
1467
1467
|
children: [/* @__PURE__ */ n("path", { d: "M12 5v14" }), /* @__PURE__ */ n("path", { d: "M5 12h14" })]
|
|
1468
1468
|
})
|
|
1469
|
-
}),
|
|
1469
|
+
}), ni = "var(--_1tyillx0)", ti = {
|
|
1470
1470
|
rest: 0.5,
|
|
1471
1471
|
hovered: 0.75,
|
|
1472
1472
|
open: 1
|
|
1473
1473
|
};
|
|
1474
|
-
var
|
|
1474
|
+
var ri = "_1tyillx1", ai = {
|
|
1475
1475
|
rest: "_1tyillx2",
|
|
1476
1476
|
hovered: "_1tyillx3",
|
|
1477
1477
|
open: "_1tyillx4"
|
|
1478
|
-
},
|
|
1478
|
+
}, oi = "_1tyillx5", ii = {
|
|
1479
1479
|
closed: "_1tyillx6",
|
|
1480
1480
|
open: "_1tyillx7"
|
|
1481
|
-
},
|
|
1482
|
-
const i =
|
|
1483
|
-
if (
|
|
1484
|
-
const c =
|
|
1481
|
+
}, li = ({ interaction: e, panelRect: t }) => {
|
|
1482
|
+
const i = Z(), o = K((c) => c.coordSystem), r = e.kind === "trigger" || e.kind === "menu" ? e.anchor : null, a = si(e), l = E(() => {
|
|
1483
|
+
if (r === null) return null;
|
|
1484
|
+
const c = va(r.position, t, o);
|
|
1485
1485
|
return {
|
|
1486
1486
|
center: c,
|
|
1487
|
-
radius: 19 *
|
|
1487
|
+
radius: 19 * ti[a],
|
|
1488
1488
|
target: {
|
|
1489
1489
|
kind: "observation",
|
|
1490
|
-
cursor:
|
|
1490
|
+
cursor: Fe(c, t)
|
|
1491
1491
|
}
|
|
1492
1492
|
};
|
|
1493
1493
|
}, [
|
|
1494
|
-
o,
|
|
1495
|
-
t,
|
|
1496
1494
|
r,
|
|
1495
|
+
t,
|
|
1496
|
+
o,
|
|
1497
1497
|
a
|
|
1498
1498
|
]);
|
|
1499
|
-
return
|
|
1499
|
+
return B(() => {
|
|
1500
1500
|
i.getState().setMenuTrigger(l);
|
|
1501
|
-
}, [i, l]),
|
|
1501
|
+
}, [i, l]), B(() => () => i.getState().setMenuTrigger(null), [i]), r === null || l === null ? null : /* @__PURE__ */ n("div", {
|
|
1502
1502
|
"aria-hidden": "true",
|
|
1503
1503
|
"data-testid": "observation-menu-trigger",
|
|
1504
1504
|
"data-state": a,
|
|
1505
|
-
className:
|
|
1505
|
+
className: oe(ri, ai[a]),
|
|
1506
1506
|
style: {
|
|
1507
1507
|
left: t.x + l.center.x,
|
|
1508
1508
|
top: t.y + l.center.y,
|
|
1509
|
-
...
|
|
1509
|
+
...En({ [ni]: r.color ?? Wt.border50 })
|
|
1510
1510
|
},
|
|
1511
1511
|
children: /* @__PURE__ */ n("span", {
|
|
1512
|
-
className:
|
|
1513
|
-
children: /* @__PURE__ */ n(
|
|
1512
|
+
className: oe(oi, ii[a === "open" ? "open" : "closed"]),
|
|
1513
|
+
children: /* @__PURE__ */ n(ei, { size: "lg" })
|
|
1514
1514
|
})
|
|
1515
1515
|
});
|
|
1516
|
-
},
|
|
1517
|
-
const { chartId: i } =
|
|
1518
|
-
|
|
1516
|
+
}, si = (e) => e.kind === "menu" ? "open" : e.kind === "trigger" && e.isEngaged ? "hovered" : "rest", ci = 'button:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])', di = (e, t) => {
|
|
1517
|
+
const { chartId: i } = U(), o = Z();
|
|
1518
|
+
B(() => {
|
|
1519
1519
|
if (t === null) return;
|
|
1520
|
-
const
|
|
1521
|
-
if (a.key !== "Tab" || a.defaultPrevented || !
|
|
1522
|
-
const l = [...t.querySelectorAll(
|
|
1520
|
+
const r = (a) => {
|
|
1521
|
+
if (a.key !== "Tab" || a.defaultPrevented || !he(a.target, e, i) || o.getState().standingInteraction?.kind === "chrome-popup") return;
|
|
1522
|
+
const l = [...t.querySelectorAll(ci)];
|
|
1523
1523
|
if (l.length === 0) return;
|
|
1524
1524
|
a.preventDefault();
|
|
1525
1525
|
const c = l.findIndex((s) => s === document.activeElement);
|
|
1526
1526
|
l[c === -1 ? a.shiftKey ? l.length - 1 : 0 : (c + (a.shiftKey ? -1 : 1) + l.length) % l.length]?.focus();
|
|
1527
1527
|
};
|
|
1528
|
-
return document.addEventListener("keydown",
|
|
1528
|
+
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
1529
1529
|
}, [
|
|
1530
1530
|
e,
|
|
1531
1531
|
t,
|
|
1532
1532
|
i,
|
|
1533
|
-
|
|
1533
|
+
o
|
|
1534
1534
|
]);
|
|
1535
|
-
},
|
|
1536
|
-
const { selectionStore: t, chartId: i } =
|
|
1537
|
-
|
|
1538
|
-
let
|
|
1539
|
-
const
|
|
1535
|
+
}, hi = (e) => {
|
|
1536
|
+
const { selectionStore: t, chartId: i } = U();
|
|
1537
|
+
B(() => {
|
|
1538
|
+
let o = null;
|
|
1539
|
+
const r = () => {
|
|
1540
1540
|
e.focus({ preventScroll: !0 });
|
|
1541
1541
|
}, a = (c) => {
|
|
1542
1542
|
const { selection: s, clearSelection: u } = t.getState();
|
|
1543
|
-
s.length !== 0 && (
|
|
1543
|
+
s.length !== 0 && (he(c.target, e, i) || u());
|
|
1544
1544
|
}, l = (c) => {
|
|
1545
|
-
t.getState().selection.length !== 0 &&
|
|
1546
|
-
|
|
1545
|
+
t.getState().selection.length !== 0 && he(c.target, e, i) && c.relatedTarget === null && (o !== null && cancelAnimationFrame(o), o = requestAnimationFrame(() => {
|
|
1546
|
+
o = null, document.hasFocus() && (he(document.activeElement, e, i) || t.getState().clearSelection());
|
|
1547
1547
|
}));
|
|
1548
1548
|
};
|
|
1549
|
-
return e.addEventListener("pointerdown",
|
|
1550
|
-
|
|
1549
|
+
return e.addEventListener("pointerdown", r), document.addEventListener("focusin", a), document.addEventListener("focusout", l), () => {
|
|
1550
|
+
o !== null && cancelAnimationFrame(o), e.removeEventListener("pointerdown", r), document.removeEventListener("focusin", a), document.removeEventListener("focusout", l);
|
|
1551
1551
|
};
|
|
1552
1552
|
}, [
|
|
1553
1553
|
e,
|
|
1554
1554
|
t,
|
|
1555
1555
|
i
|
|
1556
1556
|
]);
|
|
1557
|
-
},
|
|
1558
|
-
const { selectionStore: t, commands: i, chartId:
|
|
1559
|
-
const { selection: s } = t.getState(), u =
|
|
1557
|
+
}, ui = (e) => {
|
|
1558
|
+
const { selectionStore: t, commands: i, chartId: o } = U(), r = Z(), a = fe((c) => {
|
|
1559
|
+
const { selection: s } = t.getState(), u = Xn(s);
|
|
1560
1560
|
u !== null && (c.preventDefault(), i.dispatch(new ze({ id: u })), e.focus({ preventScroll: !0 }));
|
|
1561
1561
|
}, [
|
|
1562
1562
|
e,
|
|
1563
1563
|
i,
|
|
1564
1564
|
t
|
|
1565
1565
|
]), l = fe((c) => {
|
|
1566
|
-
const s =
|
|
1566
|
+
const s = r.getState();
|
|
1567
1567
|
switch (s.standingInteraction?.kind) {
|
|
1568
1568
|
case "endpoint-drag":
|
|
1569
1569
|
s.releaseInteraction("endpoint-drag");
|
|
@@ -1574,7 +1574,7 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1574
1574
|
s.releaseInteraction("menu");
|
|
1575
1575
|
return;
|
|
1576
1576
|
default:
|
|
1577
|
-
if (
|
|
1577
|
+
if (Vn(c.target, o)) {
|
|
1578
1578
|
e.focus({ preventScroll: !0 });
|
|
1579
1579
|
return;
|
|
1580
1580
|
}
|
|
@@ -1582,14 +1582,14 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1582
1582
|
return;
|
|
1583
1583
|
}
|
|
1584
1584
|
}, [
|
|
1585
|
-
|
|
1585
|
+
r,
|
|
1586
1586
|
t,
|
|
1587
1587
|
e,
|
|
1588
|
-
|
|
1588
|
+
o
|
|
1589
1589
|
]);
|
|
1590
|
-
|
|
1590
|
+
B(() => {
|
|
1591
1591
|
const c = (s) => {
|
|
1592
|
-
if (
|
|
1592
|
+
if (he(s.target, e, o) && !mi(s.target) && !Ta(s.target))
|
|
1593
1593
|
switch (s.key) {
|
|
1594
1594
|
case "Escape":
|
|
1595
1595
|
return l(s);
|
|
@@ -1605,48 +1605,48 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1605
1605
|
e,
|
|
1606
1606
|
a,
|
|
1607
1607
|
l,
|
|
1608
|
-
|
|
1608
|
+
o
|
|
1609
1609
|
]);
|
|
1610
|
-
},
|
|
1610
|
+
}, mi = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), pi = `[${Tn}]`, nt = (e, t, i) => {
|
|
1611
1611
|
if (typeof document.elementsFromPoint != "function") return null;
|
|
1612
|
-
const
|
|
1613
|
-
return
|
|
1614
|
-
},
|
|
1612
|
+
const o = document.elementsFromPoint(e, t);
|
|
1613
|
+
return gi(o, i);
|
|
1614
|
+
}, gi = (e, t) => {
|
|
1615
1615
|
for (const i of e) {
|
|
1616
|
-
const
|
|
1617
|
-
if (
|
|
1618
|
-
const
|
|
1619
|
-
if (
|
|
1616
|
+
const o = i.closest(pi);
|
|
1617
|
+
if (o === null || !t.contains(o)) continue;
|
|
1618
|
+
const r = vi(o);
|
|
1619
|
+
if (r !== null) return r;
|
|
1620
1620
|
}
|
|
1621
1621
|
return null;
|
|
1622
|
-
},
|
|
1623
|
-
const t = e.getAttribute(
|
|
1622
|
+
}, vi = (e) => {
|
|
1623
|
+
const t = e.getAttribute(Tn);
|
|
1624
1624
|
if (t !== "annotation") return null;
|
|
1625
|
-
const i = e.getAttribute(
|
|
1625
|
+
const i = e.getAttribute(Ft);
|
|
1626
1626
|
return i === null || i === "" ? null : {
|
|
1627
1627
|
kind: t,
|
|
1628
1628
|
id: i
|
|
1629
1629
|
};
|
|
1630
|
-
},
|
|
1631
|
-
const e =
|
|
1632
|
-
layers:
|
|
1633
|
-
coordSystem:
|
|
1634
|
-
}))), { anchorResolver:
|
|
1635
|
-
return
|
|
1630
|
+
}, Ci = () => {
|
|
1631
|
+
const e = Nt((r) => r.hover.primary), { layers: t, coordSystem: i } = K(Be((r) => ({
|
|
1632
|
+
layers: r.layers,
|
|
1633
|
+
coordSystem: r.coordSystem
|
|
1634
|
+
}))), { anchorResolver: o } = U();
|
|
1635
|
+
return E(() => {
|
|
1636
1636
|
if (e === null) return null;
|
|
1637
|
-
const
|
|
1638
|
-
if (
|
|
1639
|
-
const a =
|
|
1637
|
+
const r = t.find((c) => c.id === e.layerId);
|
|
1638
|
+
if (r === void 0) return null;
|
|
1639
|
+
const a = o.resolve(r.geom, e.observation, {
|
|
1640
1640
|
coordSystem: i,
|
|
1641
|
-
position:
|
|
1641
|
+
position: r.position,
|
|
1642
1642
|
purpose: "pin"
|
|
1643
1643
|
});
|
|
1644
1644
|
if (a === null) return null;
|
|
1645
|
-
const l =
|
|
1645
|
+
const l = $r(r, e.observation);
|
|
1646
1646
|
return l === null ? null : {
|
|
1647
1647
|
position: a,
|
|
1648
|
-
color:
|
|
1649
|
-
layer:
|
|
1648
|
+
color: da(e.observation),
|
|
1649
|
+
layer: r,
|
|
1650
1650
|
at: l,
|
|
1651
1651
|
observation: e.observation
|
|
1652
1652
|
};
|
|
@@ -1654,11 +1654,11 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1654
1654
|
e,
|
|
1655
1655
|
t,
|
|
1656
1656
|
i,
|
|
1657
|
-
|
|
1657
|
+
o
|
|
1658
1658
|
]);
|
|
1659
|
-
},
|
|
1660
|
-
const e =
|
|
1661
|
-
return
|
|
1659
|
+
}, fi = { kind: "idle" }, tt = () => {
|
|
1660
|
+
const e = Ce((o) => o.standingInteraction), t = Ce((o) => o.chromeUnderPointer), i = Ci();
|
|
1661
|
+
return E(() => e !== null ? e : i === null ? fi : {
|
|
1662
1662
|
kind: "trigger",
|
|
1663
1663
|
anchor: i,
|
|
1664
1664
|
isEngaged: t === "menu-trigger"
|
|
@@ -1667,22 +1667,22 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1667
1667
|
i,
|
|
1668
1668
|
t
|
|
1669
1669
|
]);
|
|
1670
|
-
},
|
|
1671
|
-
const i =
|
|
1672
|
-
|
|
1673
|
-
let
|
|
1670
|
+
}, bi = (e, t) => {
|
|
1671
|
+
const i = Z(), o = de(t);
|
|
1672
|
+
B(() => {
|
|
1673
|
+
let r = null, a = null;
|
|
1674
1674
|
const l = (h) => {
|
|
1675
1675
|
const { menuTrigger: v } = i.getState();
|
|
1676
|
-
return v === null ? null :
|
|
1676
|
+
return v === null ? null : Rn(h, v) ? "menu-trigger" : null;
|
|
1677
1677
|
}, c = () => {
|
|
1678
|
-
|
|
1678
|
+
r = null;
|
|
1679
1679
|
const h = a;
|
|
1680
1680
|
if (a = null, h === null) return;
|
|
1681
|
-
const v =
|
|
1681
|
+
const v = o.current, p = i.getState();
|
|
1682
1682
|
p.setChromeUnderPointer(l({
|
|
1683
1683
|
x: h.x - v.x,
|
|
1684
1684
|
y: h.y - v.y
|
|
1685
|
-
})), p.standingInteraction?.kind !== "menu" && p.setEditTargetUnderPointer(
|
|
1685
|
+
})), p.standingInteraction?.kind !== "menu" && p.setEditTargetUnderPointer(nt(h.x, h.y, e));
|
|
1686
1686
|
}, s = () => {
|
|
1687
1687
|
const h = i.getState();
|
|
1688
1688
|
h.setChromeUnderPointer(null), h.setEditTargetUnderPointer(null);
|
|
@@ -1690,68 +1690,68 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1690
1690
|
a = {
|
|
1691
1691
|
x: h.clientX,
|
|
1692
1692
|
y: h.clientY
|
|
1693
|
-
},
|
|
1693
|
+
}, r === null && (r = requestAnimationFrame(c));
|
|
1694
1694
|
}, d = () => {
|
|
1695
|
-
a = null,
|
|
1695
|
+
a = null, r !== null && (cancelAnimationFrame(r), r = null), s();
|
|
1696
1696
|
};
|
|
1697
1697
|
return e.addEventListener("pointermove", u), e.addEventListener("pointerleave", d), () => {
|
|
1698
|
-
|
|
1698
|
+
r !== null && cancelAnimationFrame(r), e.removeEventListener("pointermove", u), e.removeEventListener("pointerleave", d), s();
|
|
1699
1699
|
};
|
|
1700
1700
|
}, [
|
|
1701
1701
|
e,
|
|
1702
1702
|
i,
|
|
1703
|
-
|
|
1703
|
+
o
|
|
1704
1704
|
]);
|
|
1705
|
-
},
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1705
|
+
}, ln = "editor", sn = [], yi = (e, t, i, o) => {
|
|
1706
|
+
const r = tt(), { store: a } = De(), l = Pn().length > 0, c = Ce((d) => d.menuTrigger), s = r.kind === "menu", u = E(() => c === null ? sn : [Zr(c)], [c]);
|
|
1707
|
+
bi(e, t), Si(r, e, t, i), hi(e), ui(e), di(e, o), B(() => (a.getState().publishPointerRegions(ln, u), () => a.getState().publishPointerRegions(ln, sn)), [a, u]), B(() => (a.getState().setPointerSuspended(s || l), () => a.getState().setPointerSuspended(!1)), [
|
|
1708
1708
|
a,
|
|
1709
1709
|
s,
|
|
1710
1710
|
l
|
|
1711
|
-
]),
|
|
1711
|
+
]), B(() => {
|
|
1712
1712
|
if (!l) return;
|
|
1713
1713
|
const d = a.getState();
|
|
1714
|
-
d.setHoverState(
|
|
1714
|
+
d.setHoverState(An), d.setTooltipAnchor(null);
|
|
1715
1715
|
}, [a, l]);
|
|
1716
|
-
},
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1716
|
+
}, Si = (e, t, i, o) => {
|
|
1717
|
+
const r = Z(), { selectionStore: a } = U(), { store: l, engine: c } = De(), s = de(e), u = de(i), d = de(o);
|
|
1718
|
+
B(() => {
|
|
1719
1719
|
const h = (y) => {
|
|
1720
|
-
const { menuTrigger: f } =
|
|
1721
|
-
return f === null ? !1 :
|
|
1720
|
+
const { menuTrigger: f } = r.getState();
|
|
1721
|
+
return f === null ? !1 : Rn(cn(y, u.current), f);
|
|
1722
1722
|
}, v = (y) => {
|
|
1723
1723
|
if (h(y) || a.getState().selection.length > 0) return;
|
|
1724
|
-
const f = d.current, x =
|
|
1725
|
-
l.getState().setHoverState(
|
|
1724
|
+
const f = d.current, x = cn(y, u.current), L = wi(x, f) ? c.query(Fe(x, f)) : An;
|
|
1725
|
+
l.getState().setHoverState(L);
|
|
1726
1726
|
};
|
|
1727
1727
|
let p = !1;
|
|
1728
1728
|
const g = () => {
|
|
1729
1729
|
p = s.current.kind === "menu";
|
|
1730
|
-
},
|
|
1731
|
-
const f =
|
|
1730
|
+
}, C = (y) => {
|
|
1731
|
+
const f = nt(y.clientX, y.clientY, t), x = a.getState();
|
|
1732
1732
|
if (f === null) {
|
|
1733
1733
|
x.clearSelection();
|
|
1734
1734
|
return;
|
|
1735
1735
|
}
|
|
1736
1736
|
x.setSelection([f]);
|
|
1737
1737
|
}, P = (y) => {
|
|
1738
|
-
if (
|
|
1739
|
-
const { claimInteraction: f, releaseInteraction: x } =
|
|
1740
|
-
if (!
|
|
1741
|
-
x("menu"),
|
|
1738
|
+
if (Pa(y.target)) return;
|
|
1739
|
+
const { claimInteraction: f, releaseInteraction: x } = r.getState(), L = h(y);
|
|
1740
|
+
if (!L || p) {
|
|
1741
|
+
x("menu"), L || C(y), p && v(y);
|
|
1742
1742
|
return;
|
|
1743
1743
|
}
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1744
|
+
const A = s.current;
|
|
1745
|
+
A.kind === "trigger" && f({
|
|
1746
1746
|
kind: "menu",
|
|
1747
|
-
anchor:
|
|
1747
|
+
anchor: A.anchor
|
|
1748
1748
|
});
|
|
1749
1749
|
};
|
|
1750
1750
|
return document.addEventListener("pointerdown", g, !0), document.addEventListener("click", P), () => {
|
|
1751
1751
|
document.removeEventListener("pointerdown", g, !0), document.removeEventListener("click", P);
|
|
1752
1752
|
};
|
|
1753
1753
|
}, [
|
|
1754
|
-
|
|
1754
|
+
r,
|
|
1755
1755
|
a,
|
|
1756
1756
|
t,
|
|
1757
1757
|
s,
|
|
@@ -1760,18 +1760,18 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1760
1760
|
u,
|
|
1761
1761
|
d
|
|
1762
1762
|
]);
|
|
1763
|
-
},
|
|
1763
|
+
}, cn = (e, t) => ({
|
|
1764
1764
|
x: e.clientX - t.x,
|
|
1765
1765
|
y: e.clientY - t.y
|
|
1766
|
-
}),
|
|
1767
|
-
const { measureRef: i, screenRect:
|
|
1768
|
-
return
|
|
1766
|
+
}), wi = (e, t) => e.x >= 0 && e.x <= t.width && e.y >= 0 && e.y <= t.height, xi = ({ frameElement: e, panelRect: t }) => {
|
|
1767
|
+
const { measureRef: i, screenRect: o } = kt(), r = Z();
|
|
1768
|
+
return B(() => (i(e), () => i(null)), [i, e]), B(() => () => r.getState().releaseInteraction("menu"), [r]), o === null ? null : /* @__PURE__ */ n(Aa, { children: /* @__PURE__ */ n(Li, {
|
|
1769
1769
|
frameElement: e,
|
|
1770
|
-
frameRect:
|
|
1770
|
+
frameRect: o,
|
|
1771
1771
|
panelRect: t
|
|
1772
1772
|
}) });
|
|
1773
|
-
},
|
|
1774
|
-
const
|
|
1773
|
+
}, Li = ({ frameElement: e, frameRect: t, panelRect: i }) => {
|
|
1774
|
+
const o = E(() => ({
|
|
1775
1775
|
x: t.left + i.x,
|
|
1776
1776
|
y: t.top + i.y
|
|
1777
1777
|
}), [
|
|
@@ -1779,79 +1779,79 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1779
1779
|
t.top,
|
|
1780
1780
|
i.x,
|
|
1781
1781
|
i.y
|
|
1782
|
-
]), [
|
|
1783
|
-
return
|
|
1782
|
+
]), [r, a] = q(null);
|
|
1783
|
+
return yi(e, o, i, r), /* @__PURE__ */ n(Ti, {
|
|
1784
1784
|
frameElement: e,
|
|
1785
1785
|
frameRect: t,
|
|
1786
|
-
panelOrigin:
|
|
1786
|
+
panelOrigin: o,
|
|
1787
1787
|
panelRect: i,
|
|
1788
1788
|
boxRef: a
|
|
1789
1789
|
});
|
|
1790
|
-
},
|
|
1791
|
-
const a =
|
|
1792
|
-
return /* @__PURE__ */ n(
|
|
1790
|
+
}, Ti = ({ frameElement: e, frameRect: t, panelOrigin: i, panelRect: o, boxRef: r }) => {
|
|
1791
|
+
const a = Ge(), l = tt();
|
|
1792
|
+
return /* @__PURE__ */ n(Rt, {
|
|
1793
1793
|
rect: t,
|
|
1794
|
-
zIndex:
|
|
1794
|
+
zIndex: Et.editorOverlay,
|
|
1795
1795
|
container: a,
|
|
1796
1796
|
"data-testid": "editor-overlay",
|
|
1797
|
-
boxRef:
|
|
1798
|
-
children: /* @__PURE__ */ m(
|
|
1799
|
-
/* @__PURE__ */ n(
|
|
1800
|
-
panelRect:
|
|
1797
|
+
boxRef: r,
|
|
1798
|
+
children: /* @__PURE__ */ m(ue, { children: [
|
|
1799
|
+
/* @__PURE__ */ n(Yo, {
|
|
1800
|
+
panelRect: o,
|
|
1801
1801
|
panelOrigin: i,
|
|
1802
1802
|
frameRect: t,
|
|
1803
1803
|
frameElement: e
|
|
1804
1804
|
}),
|
|
1805
|
-
/* @__PURE__ */ n(
|
|
1805
|
+
/* @__PURE__ */ n(li, {
|
|
1806
1806
|
interaction: l,
|
|
1807
|
-
panelRect:
|
|
1807
|
+
panelRect: o
|
|
1808
1808
|
}),
|
|
1809
|
-
/* @__PURE__ */ n(
|
|
1809
|
+
/* @__PURE__ */ n(mo, {
|
|
1810
1810
|
interaction: l,
|
|
1811
1811
|
panelOrigin: i
|
|
1812
1812
|
})
|
|
1813
1813
|
] })
|
|
1814
1814
|
});
|
|
1815
|
-
},
|
|
1816
|
-
slots:
|
|
1817
|
-
EditorSurface:
|
|
1815
|
+
}, Lc = ({ slots: e, ...t }) => /* @__PURE__ */ n(zt, { children: /* @__PURE__ */ n(Vt, {
|
|
1816
|
+
slots: E(() => ({
|
|
1817
|
+
EditorSurface: xi,
|
|
1818
1818
|
...e
|
|
1819
1819
|
}), [e]),
|
|
1820
1820
|
...t
|
|
1821
|
-
}) }),
|
|
1822
|
-
const
|
|
1823
|
-
let
|
|
1821
|
+
}) }), rt = me(null), at = ({ labelId: e, controlId: t, children: i }) => {
|
|
1822
|
+
const o = E(() => {
|
|
1823
|
+
let r = null;
|
|
1824
1824
|
return {
|
|
1825
1825
|
labelId: e,
|
|
1826
1826
|
controlId: t,
|
|
1827
|
-
claimControlId: (a) => (
|
|
1827
|
+
claimControlId: (a) => (r ??= a, r === a)
|
|
1828
1828
|
};
|
|
1829
1829
|
}, [e, t]);
|
|
1830
|
-
return /* @__PURE__ */ n(
|
|
1831
|
-
value:
|
|
1830
|
+
return /* @__PURE__ */ n(rt.Provider, {
|
|
1831
|
+
value: o,
|
|
1832
1832
|
children: i
|
|
1833
1833
|
});
|
|
1834
|
-
},
|
|
1835
|
-
const
|
|
1834
|
+
}, Q = ({ id: e, ariaLabel: t, ariaLabelledBy: i }, o = !0) => {
|
|
1835
|
+
const r = ie(rt), a = ae(), [l] = q(() => o ? r?.claimControlId(a) ?? !1 : !1), c = e ?? (l ? r?.controlId : void 0), s = i ?? (t === void 0 ? r?.labelId : void 0);
|
|
1836
1836
|
return {
|
|
1837
1837
|
...c !== void 0 && { id: c },
|
|
1838
1838
|
...t !== void 0 && { "aria-label": t },
|
|
1839
1839
|
...s !== void 0 && { "aria-labelledby": s }
|
|
1840
1840
|
};
|
|
1841
1841
|
};
|
|
1842
|
-
var
|
|
1842
|
+
var Pi = {
|
|
1843
1843
|
default: "woi4bh4 woi4bh3",
|
|
1844
1844
|
tile: "woi4bh5 woi4bh3"
|
|
1845
|
-
},
|
|
1846
|
-
const s =
|
|
1845
|
+
}, Ii = ({ label: e, icon: t, onClick: i, variant: o = "default", isDisabled: r, ariaLabel: a, ariaLabelledBy: l, id: c }) => {
|
|
1846
|
+
const s = Q({
|
|
1847
1847
|
id: c,
|
|
1848
1848
|
ariaLabel: a,
|
|
1849
1849
|
ariaLabelledBy: l
|
|
1850
|
-
}), u =
|
|
1850
|
+
}), u = o === "tile";
|
|
1851
1851
|
return /* @__PURE__ */ m("button", {
|
|
1852
1852
|
type: "button",
|
|
1853
|
-
className:
|
|
1854
|
-
disabled:
|
|
1853
|
+
className: Pi[o],
|
|
1854
|
+
disabled: r,
|
|
1855
1855
|
onClick: i,
|
|
1856
1856
|
...s,
|
|
1857
1857
|
children: [t !== void 0 && /* @__PURE__ */ n("span", {
|
|
@@ -1862,23 +1862,23 @@ var si = {
|
|
|
1862
1862
|
children: e
|
|
1863
1863
|
})]
|
|
1864
1864
|
});
|
|
1865
|
-
},
|
|
1866
|
-
const e =
|
|
1865
|
+
}, Ue = me(null), M = () => {
|
|
1866
|
+
const e = ie(Ue);
|
|
1867
1867
|
if (!e) throw new Error("An editing section must sit inside an <EditorPanel.Root> bound to a graph — pass it a `handle`, or render the panel inside a <GraphProvider>.");
|
|
1868
1868
|
return e;
|
|
1869
|
-
},
|
|
1870
|
-
const
|
|
1869
|
+
}, ot = ({ children: e, onKeyDown: t, ...i }) => {
|
|
1870
|
+
const o = ie(Ue);
|
|
1871
1871
|
return /* @__PURE__ */ n("div", {
|
|
1872
1872
|
onKeyDown: (a) => {
|
|
1873
|
-
if (t?.(a), !
|
|
1874
|
-
const l =
|
|
1875
|
-
l && (a.preventDefault(), l === "undo" ?
|
|
1873
|
+
if (t?.(a), !o || a.defaultPrevented) return;
|
|
1874
|
+
const l = Kt(a.nativeEvent);
|
|
1875
|
+
l && (a.preventDefault(), l === "undo" ? o.undo() : o.redo());
|
|
1876
1876
|
},
|
|
1877
1877
|
...i,
|
|
1878
1878
|
children: e
|
|
1879
1879
|
});
|
|
1880
|
-
},
|
|
1881
|
-
const t =
|
|
1880
|
+
}, it = "keyboard", Le = (e) => {
|
|
1881
|
+
const t = be(!1), i = be(!1), o = () => {
|
|
1882
1882
|
t.current = !1, i.current && (i.current = !1, e?.());
|
|
1883
1883
|
};
|
|
1884
1884
|
return {
|
|
@@ -1889,8 +1889,8 @@ var si = {
|
|
|
1889
1889
|
}
|
|
1890
1890
|
e?.();
|
|
1891
1891
|
},
|
|
1892
|
-
commitUnlessHeldKey: (
|
|
1893
|
-
if (
|
|
1892
|
+
commitUnlessHeldKey: (r) => {
|
|
1893
|
+
if (r) {
|
|
1894
1894
|
i.current = !0;
|
|
1895
1895
|
return;
|
|
1896
1896
|
}
|
|
@@ -1900,68 +1900,69 @@ var si = {
|
|
|
1900
1900
|
onKeyDown: () => {
|
|
1901
1901
|
t.current = !0;
|
|
1902
1902
|
},
|
|
1903
|
-
onKeyUp:
|
|
1904
|
-
onBlur: (
|
|
1905
|
-
|
|
1903
|
+
onKeyUp: o,
|
|
1904
|
+
onBlur: (r) => {
|
|
1905
|
+
r.relatedTarget instanceof Node && r.currentTarget.contains(r.relatedTarget) || o();
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
};
|
|
1909
|
-
},
|
|
1910
|
-
var
|
|
1911
|
-
const
|
|
1912
|
-
id:
|
|
1913
|
-
ariaLabel:
|
|
1914
|
-
ariaLabelledBy:
|
|
1915
|
-
}), { commitUnlessHeldKey:
|
|
1916
|
-
return /* @__PURE__ */ n(
|
|
1917
|
-
className:
|
|
1909
|
+
}, Ai = "eh8dvc0", Oi = "eh8dvc1 uz3g760", Mi = "eh8dvc2 uz3g761";
|
|
1910
|
+
var Ni = ({ value: e, onChange: t, onCommit: i, min: o, max: r, step: a, placeholder: l, prefix: c, suffix: s, isDisabled: u, hasError: d, ariaLabel: h, ariaLabelledBy: v, id: p }) => {
|
|
1911
|
+
const g = Q({
|
|
1912
|
+
id: p,
|
|
1913
|
+
ariaLabel: h,
|
|
1914
|
+
ariaLabelledBy: v
|
|
1915
|
+
}), { commitUnlessHeldKey: C, gestureHandlers: P } = Le(i);
|
|
1916
|
+
return /* @__PURE__ */ n(nn.Root, {
|
|
1917
|
+
className: Ai,
|
|
1918
1918
|
value: e,
|
|
1919
|
-
onValueChange: (
|
|
1920
|
-
onValueCommitted: (
|
|
1921
|
-
|
|
1919
|
+
onValueChange: (y) => t(y),
|
|
1920
|
+
onValueCommitted: (y, f) => {
|
|
1921
|
+
C(f.reason === it);
|
|
1922
1922
|
},
|
|
1923
|
-
min:
|
|
1924
|
-
max:
|
|
1923
|
+
min: o,
|
|
1924
|
+
max: r,
|
|
1925
1925
|
step: a,
|
|
1926
|
-
disabled:
|
|
1927
|
-
children: /* @__PURE__ */ m(
|
|
1928
|
-
className:
|
|
1929
|
-
"data-error":
|
|
1930
|
-
"data-disabled":
|
|
1926
|
+
disabled: u,
|
|
1927
|
+
children: /* @__PURE__ */ m(ot, {
|
|
1928
|
+
className: Oi,
|
|
1929
|
+
"data-error": d === !0,
|
|
1930
|
+
"data-disabled": u === !0 ? "" : void 0,
|
|
1931
1931
|
children: [
|
|
1932
|
-
|
|
1932
|
+
c !== void 0 && /* @__PURE__ */ n("span", {
|
|
1933
1933
|
className: "eh8dvc3",
|
|
1934
|
-
children:
|
|
1934
|
+
children: c
|
|
1935
1935
|
}),
|
|
1936
|
-
/* @__PURE__ */ n(
|
|
1937
|
-
className:
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1936
|
+
/* @__PURE__ */ n(nn.Input, {
|
|
1937
|
+
className: Mi,
|
|
1938
|
+
placeholder: l,
|
|
1939
|
+
...P,
|
|
1940
|
+
"aria-invalid": d === !0 ? !0 : void 0,
|
|
1941
|
+
...g
|
|
1941
1942
|
}),
|
|
1942
|
-
|
|
1943
|
+
s !== void 0 && /* @__PURE__ */ n("span", {
|
|
1943
1944
|
className: "eh8dvc3",
|
|
1944
|
-
children:
|
|
1945
|
+
children: s
|
|
1945
1946
|
})
|
|
1946
1947
|
]
|
|
1947
1948
|
})
|
|
1948
1949
|
});
|
|
1949
|
-
},
|
|
1950
|
+
}, ki = "_1b7s5f0", re = {
|
|
1950
1951
|
1: "_1b7s5f1",
|
|
1951
1952
|
2: "_1b7s5f2",
|
|
1952
1953
|
3: "_1b7s5f3",
|
|
1953
1954
|
4: "_1b7s5f4",
|
|
1954
1955
|
5: "_1b7s5f5",
|
|
1955
1956
|
6: "_1b7s5f6"
|
|
1956
|
-
},
|
|
1957
|
-
var
|
|
1958
|
-
const d =
|
|
1957
|
+
}, Ri = "_1b7s5f7";
|
|
1958
|
+
var Ei = 6, _i = ({ options: e, value: t, onChange: i, onCommit: o, columns: r, itemLayout: a = "tile", isDisabled: l, ariaLabel: c, ariaLabelledBy: s, id: u }) => {
|
|
1959
|
+
const d = Q({
|
|
1959
1960
|
id: u,
|
|
1960
1961
|
ariaLabel: c,
|
|
1961
1962
|
ariaLabelledBy: s
|
|
1962
|
-
}), h = a === "swatch", { commitAfterChange: v, gestureHandlers: p } =
|
|
1963
|
-
return /* @__PURE__ */ n(
|
|
1964
|
-
className:
|
|
1963
|
+
}), h = a === "swatch", { commitAfterChange: v, gestureHandlers: p } = Le(o);
|
|
1964
|
+
return /* @__PURE__ */ n(Dn, {
|
|
1965
|
+
className: oe(ki, Di(r ?? e.length)),
|
|
1965
1966
|
value: t,
|
|
1966
1967
|
onValueChange: (g) => {
|
|
1967
1968
|
i(g), v();
|
|
@@ -1969,10 +1970,10 @@ var vi = 6, fi = ({ options: e, value: t, onChange: i, onCommit: r, columns: o,
|
|
|
1969
1970
|
...p,
|
|
1970
1971
|
disabled: l,
|
|
1971
1972
|
...d,
|
|
1972
|
-
children: e.map((g) => /* @__PURE__ */ m(
|
|
1973
|
+
children: e.map((g) => /* @__PURE__ */ m(_n.Root, {
|
|
1973
1974
|
value: g.value,
|
|
1974
1975
|
disabled: g.isDisabled,
|
|
1975
|
-
className:
|
|
1976
|
+
className: oe(Ri, h && "_1b7s5f8"),
|
|
1976
1977
|
"aria-label": h ? g.label : void 0,
|
|
1977
1978
|
children: [g.icon, !h && /* @__PURE__ */ n("span", {
|
|
1978
1979
|
className: "_1b7s5f9",
|
|
@@ -1980,71 +1981,71 @@ var vi = 6, fi = ({ options: e, value: t, onChange: i, onCommit: r, columns: o,
|
|
|
1980
1981
|
})]
|
|
1981
1982
|
}, g.value))
|
|
1982
1983
|
});
|
|
1983
|
-
},
|
|
1984
|
-
switch (Math.min(Math.max(Math.round(e), 1),
|
|
1984
|
+
}, Di = (e) => {
|
|
1985
|
+
switch (Math.min(Math.max(Math.round(e), 1), Ei)) {
|
|
1985
1986
|
case 1:
|
|
1986
|
-
return
|
|
1987
|
+
return re[1];
|
|
1987
1988
|
case 2:
|
|
1988
|
-
return
|
|
1989
|
+
return re[2];
|
|
1989
1990
|
case 3:
|
|
1990
|
-
return
|
|
1991
|
+
return re[3];
|
|
1991
1992
|
case 4:
|
|
1992
|
-
return
|
|
1993
|
+
return re[4];
|
|
1993
1994
|
case 5:
|
|
1994
|
-
return
|
|
1995
|
+
return re[5];
|
|
1995
1996
|
default:
|
|
1996
|
-
return
|
|
1997
|
+
return re[6];
|
|
1997
1998
|
}
|
|
1998
|
-
},
|
|
1999
|
-
var
|
|
2000
|
-
const u =
|
|
1999
|
+
}, Hi = "_1g5x15w0 uz3g760", Vi = "_1g5x15w1", zi = "_1g5x15w2", dn = "_1g5x15w3", Fi = "_1g5x15w4", Bi = "_1g5x15w5", Gi = "_1g5x15w6", Ki = "_1g5x15w7";
|
|
2000
|
+
var Ui = ({ options: e, value: t, onChange: i, placeholder: o, isDisabled: r, hasError: a, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
|
|
2001
|
+
const u = Q({
|
|
2001
2002
|
id: s,
|
|
2002
2003
|
ariaLabel: l,
|
|
2003
2004
|
ariaLabelledBy: c
|
|
2004
2005
|
});
|
|
2005
|
-
return /* @__PURE__ */ m(
|
|
2006
|
+
return /* @__PURE__ */ m(W.Root, {
|
|
2006
2007
|
value: t,
|
|
2007
2008
|
onValueChange: (d) => d !== null && i(d),
|
|
2008
|
-
disabled:
|
|
2009
|
+
disabled: r,
|
|
2009
2010
|
items: e.map((d) => ({
|
|
2010
2011
|
value: d.value,
|
|
2011
2012
|
label: d.label
|
|
2012
2013
|
})),
|
|
2013
|
-
children: [/* @__PURE__ */ m(
|
|
2014
|
-
className:
|
|
2014
|
+
children: [/* @__PURE__ */ m(W.Trigger, {
|
|
2015
|
+
className: Hi,
|
|
2015
2016
|
"data-error": a === !0,
|
|
2016
2017
|
...u,
|
|
2017
|
-
children: [/* @__PURE__ */ n(
|
|
2018
|
-
className:
|
|
2019
|
-
children: (d) =>
|
|
2020
|
-
}), /* @__PURE__ */ n(
|
|
2021
|
-
className:
|
|
2022
|
-
children: /* @__PURE__ */ n(
|
|
2018
|
+
children: [/* @__PURE__ */ n(W.Value, {
|
|
2019
|
+
className: Vi,
|
|
2020
|
+
children: (d) => Wi(e, d, o)
|
|
2021
|
+
}), /* @__PURE__ */ n(W.Icon, {
|
|
2022
|
+
className: dn,
|
|
2023
|
+
children: /* @__PURE__ */ n(we, { size: "sm" })
|
|
2023
2024
|
})]
|
|
2024
|
-
}), /* @__PURE__ */ n(
|
|
2025
|
-
container:
|
|
2026
|
-
children: /* @__PURE__ */ n(
|
|
2027
|
-
className:
|
|
2025
|
+
}), /* @__PURE__ */ n(W.Portal, {
|
|
2026
|
+
container: He(),
|
|
2027
|
+
children: /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(W.Positioner, {
|
|
2028
|
+
className: Fi,
|
|
2028
2029
|
sideOffset: 4,
|
|
2029
2030
|
alignItemWithTrigger: !1,
|
|
2030
|
-
children: /* @__PURE__ */ n(
|
|
2031
|
-
className:
|
|
2032
|
-
children: e.map((d) => /* @__PURE__ */ m(
|
|
2031
|
+
children: /* @__PURE__ */ n(W.Popup, {
|
|
2032
|
+
className: Bi,
|
|
2033
|
+
children: e.map((d) => /* @__PURE__ */ m(W.Item, {
|
|
2033
2034
|
value: d.value,
|
|
2034
2035
|
disabled: d.isDisabled,
|
|
2035
|
-
className:
|
|
2036
|
+
className: Gi,
|
|
2036
2037
|
children: [
|
|
2037
2038
|
d.icon,
|
|
2038
2039
|
/* @__PURE__ */ m("span", {
|
|
2039
|
-
className:
|
|
2040
|
-
children: [/* @__PURE__ */ n(
|
|
2040
|
+
className: Ki,
|
|
2041
|
+
children: [/* @__PURE__ */ n(W.ItemText, { children: d.label }), d.description !== void 0 && /* @__PURE__ */ n("span", {
|
|
2041
2042
|
className: "_1g5x15w8",
|
|
2042
2043
|
children: d.description
|
|
2043
2044
|
})]
|
|
2044
2045
|
}),
|
|
2045
|
-
/* @__PURE__ */ n(
|
|
2046
|
-
className:
|
|
2047
|
-
children: /* @__PURE__ */ n(
|
|
2046
|
+
/* @__PURE__ */ n(W.ItemIndicator, {
|
|
2047
|
+
className: dn,
|
|
2048
|
+
children: /* @__PURE__ */ n(Ut, { size: "sm" })
|
|
2048
2049
|
})
|
|
2049
2050
|
]
|
|
2050
2051
|
}, d.value))
|
|
@@ -2052,34 +2053,34 @@ var Ti = ({ options: e, value: t, onChange: i, placeholder: r, isDisabled: o, ha
|
|
|
2052
2053
|
}) })
|
|
2053
2054
|
})]
|
|
2054
2055
|
});
|
|
2055
|
-
},
|
|
2056
|
-
className:
|
|
2056
|
+
}, Wi = (e, t, i) => t === null ? /* @__PURE__ */ n("span", {
|
|
2057
|
+
className: zi,
|
|
2057
2058
|
children: i
|
|
2058
|
-
}) :
|
|
2059
|
-
var
|
|
2060
|
-
const h =
|
|
2059
|
+
}) : Zi(e, t), Zi = (e, t) => e.find((i) => i.value === t)?.label ?? t, qi = "vod76w0", $i = "vod76w1", Xi = "vod76w2", ji = "vod76w3", Yi = "vod76w4", Qi = "vod76w5";
|
|
2060
|
+
var Ji = ({ value: e, onChange: t, onCommit: i, min: o, max: r, step: a, suffix: l, formatValue: c, isDisabled: s, ariaLabel: u, ariaLabelledBy: d }) => {
|
|
2061
|
+
const h = Q({
|
|
2061
2062
|
ariaLabel: u,
|
|
2062
2063
|
ariaLabelledBy: d
|
|
2063
|
-
}, !1), v =
|
|
2064
|
+
}, !1), v = el(e, l, c), { commitUnlessHeldKey: p, gestureHandlers: g } = Le(i);
|
|
2064
2065
|
return /* @__PURE__ */ m("div", {
|
|
2065
|
-
className:
|
|
2066
|
-
children: [/* @__PURE__ */ n(
|
|
2067
|
-
className:
|
|
2066
|
+
className: qi,
|
|
2067
|
+
children: [/* @__PURE__ */ n(le.Root, {
|
|
2068
|
+
className: $i,
|
|
2068
2069
|
value: e,
|
|
2069
|
-
onValueChange: (
|
|
2070
|
-
onValueCommitted: (
|
|
2071
|
-
p(P.reason ===
|
|
2070
|
+
onValueChange: (C) => t(C),
|
|
2071
|
+
onValueCommitted: (C, P) => {
|
|
2072
|
+
p(P.reason === it);
|
|
2072
2073
|
},
|
|
2073
|
-
min:
|
|
2074
|
-
max:
|
|
2074
|
+
min: o,
|
|
2075
|
+
max: r,
|
|
2075
2076
|
step: a,
|
|
2076
2077
|
disabled: s,
|
|
2077
|
-
children: /* @__PURE__ */ n(
|
|
2078
|
-
className:
|
|
2079
|
-
children: /* @__PURE__ */ m(
|
|
2080
|
-
className:
|
|
2081
|
-
children: [/* @__PURE__ */ n(
|
|
2082
|
-
className:
|
|
2078
|
+
children: /* @__PURE__ */ n(le.Control, {
|
|
2079
|
+
className: Xi,
|
|
2080
|
+
children: /* @__PURE__ */ m(le.Track, {
|
|
2081
|
+
className: ji,
|
|
2082
|
+
children: [/* @__PURE__ */ n(le.Indicator, { className: Yi }), /* @__PURE__ */ n(le.Thumb, {
|
|
2083
|
+
className: Qi,
|
|
2083
2084
|
...g,
|
|
2084
2085
|
...h
|
|
2085
2086
|
})]
|
|
@@ -2090,49 +2091,49 @@ var Ri = ({ value: e, onChange: t, onCommit: i, min: r, max: o, step: a, suffix:
|
|
|
2090
2091
|
children: v
|
|
2091
2092
|
})]
|
|
2092
2093
|
});
|
|
2093
|
-
},
|
|
2094
|
-
const l =
|
|
2094
|
+
}, el = (e, t, i) => i !== void 0 ? i(e) : t !== void 0 ? `${e}${t}` : null, nl = "_1hyrlw60", tl = "_1hyrlw61", rl = ({ isChecked: e, onChange: t, isDisabled: i, ariaLabel: o, ariaLabelledBy: r, id: a }) => {
|
|
2095
|
+
const l = Q({
|
|
2095
2096
|
id: a,
|
|
2096
|
-
ariaLabel:
|
|
2097
|
-
ariaLabelledBy:
|
|
2097
|
+
ariaLabel: o,
|
|
2098
|
+
ariaLabelledBy: r
|
|
2098
2099
|
});
|
|
2099
|
-
return /* @__PURE__ */ n(
|
|
2100
|
+
return /* @__PURE__ */ n(tn.Root, {
|
|
2100
2101
|
checked: e,
|
|
2101
2102
|
onCheckedChange: (c) => t(c),
|
|
2102
2103
|
disabled: i,
|
|
2103
|
-
className:
|
|
2104
|
+
className: nl,
|
|
2104
2105
|
...l,
|
|
2105
|
-
children: /* @__PURE__ */ n(
|
|
2106
|
+
children: /* @__PURE__ */ n(tn.Thumb, { className: tl })
|
|
2106
2107
|
});
|
|
2107
|
-
},
|
|
2108
|
-
const u =
|
|
2108
|
+
}, al = "uz3g761", ol = "tpcnun0 uz3g760", il = ({ value: e, onChange: t, onCommit: i, placeholder: o, isDisabled: r, hasError: a, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
|
|
2109
|
+
const u = Q({
|
|
2109
2110
|
id: s,
|
|
2110
2111
|
ariaLabel: l,
|
|
2111
2112
|
ariaLabelledBy: c
|
|
2112
2113
|
});
|
|
2113
|
-
return /* @__PURE__ */ n(
|
|
2114
|
-
className:
|
|
2114
|
+
return /* @__PURE__ */ n(ot, {
|
|
2115
|
+
className: ol,
|
|
2115
2116
|
"data-error": a === !0,
|
|
2116
|
-
children: /* @__PURE__ */ n(
|
|
2117
|
-
className:
|
|
2117
|
+
children: /* @__PURE__ */ n(wa, {
|
|
2118
|
+
className: al,
|
|
2118
2119
|
value: e,
|
|
2119
2120
|
onValueChange: (d) => t(d),
|
|
2120
2121
|
onBlur: i,
|
|
2121
|
-
placeholder:
|
|
2122
|
-
disabled:
|
|
2122
|
+
placeholder: o,
|
|
2123
|
+
disabled: r,
|
|
2123
2124
|
"aria-invalid": a === !0 ? !0 : void 0,
|
|
2124
2125
|
...u
|
|
2125
2126
|
})
|
|
2126
2127
|
});
|
|
2127
|
-
},
|
|
2128
|
-
var
|
|
2129
|
-
const u =
|
|
2128
|
+
}, ll = "cnu9yl0", sl = "cnu9yl1";
|
|
2129
|
+
var cl = ({ options: e, value: t, onChange: i, onCommit: o, itemLayout: r = "inline", isDisabled: a, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
|
|
2130
|
+
const u = Q({
|
|
2130
2131
|
id: s,
|
|
2131
2132
|
ariaLabel: l,
|
|
2132
2133
|
ariaLabelledBy: c
|
|
2133
|
-
}), d =
|
|
2134
|
-
return /* @__PURE__ */ n(
|
|
2135
|
-
className:
|
|
2134
|
+
}), d = r === "stacked", { commitAfterChange: h, gestureHandlers: v } = Le(o);
|
|
2135
|
+
return /* @__PURE__ */ n(Dn, {
|
|
2136
|
+
className: ll,
|
|
2136
2137
|
value: t,
|
|
2137
2138
|
onValueChange: (p) => {
|
|
2138
2139
|
i(p), h();
|
|
@@ -2140,71 +2141,71 @@ var Wi = ({ options: e, value: t, onChange: i, onCommit: r, itemLayout: o = "inl
|
|
|
2140
2141
|
...v,
|
|
2141
2142
|
disabled: a,
|
|
2142
2143
|
...u,
|
|
2143
|
-
children: e.map((p) => /* @__PURE__ */ m(
|
|
2144
|
+
children: e.map((p) => /* @__PURE__ */ m(_n.Root, {
|
|
2144
2145
|
value: p.value,
|
|
2145
2146
|
disabled: p.isDisabled,
|
|
2146
|
-
className:
|
|
2147
|
-
"aria-label":
|
|
2148
|
-
children: [p.icon,
|
|
2147
|
+
className: oe(sl, d && "cnu9yl2"),
|
|
2148
|
+
"aria-label": dl(p, d),
|
|
2149
|
+
children: [p.icon, lt(p, d) && /* @__PURE__ */ n("span", {
|
|
2149
2150
|
className: "cnu9yl3",
|
|
2150
2151
|
children: p.label
|
|
2151
2152
|
})]
|
|
2152
2153
|
}, p.value))
|
|
2153
2154
|
});
|
|
2154
|
-
},
|
|
2155
|
-
if (!
|
|
2155
|
+
}, lt = (e, t) => e.icon === void 0 || t, dl = (e, t) => {
|
|
2156
|
+
if (!lt(e, t))
|
|
2156
2157
|
return e.label;
|
|
2157
|
-
},
|
|
2158
|
-
ToggleGroup:
|
|
2159
|
-
Switch:
|
|
2160
|
-
Slider:
|
|
2161
|
-
RadioGrid:
|
|
2162
|
-
Button:
|
|
2163
|
-
TextField:
|
|
2164
|
-
NumberField:
|
|
2165
|
-
Select:
|
|
2166
|
-
},
|
|
2167
|
-
const i =
|
|
2168
|
-
...
|
|
2158
|
+
}, st = {
|
|
2159
|
+
ToggleGroup: cl,
|
|
2160
|
+
Switch: rl,
|
|
2161
|
+
Slider: Ji,
|
|
2162
|
+
RadioGrid: _i,
|
|
2163
|
+
Button: Ii,
|
|
2164
|
+
TextField: il,
|
|
2165
|
+
NumberField: Ni,
|
|
2166
|
+
Select: Ui
|
|
2167
|
+
}, ct = me(st), hl = ({ controls: e, children: t }) => {
|
|
2168
|
+
const i = E(() => ({
|
|
2169
|
+
...st,
|
|
2169
2170
|
...e
|
|
2170
2171
|
}), [e]);
|
|
2171
|
-
return /* @__PURE__ */ n(
|
|
2172
|
+
return /* @__PURE__ */ n(ct.Provider, {
|
|
2172
2173
|
value: i,
|
|
2173
2174
|
children: t
|
|
2174
2175
|
});
|
|
2175
|
-
},
|
|
2176
|
-
className:
|
|
2176
|
+
}, N = () => ie(ct), ul = "_12lhx9e0", dt = ({ children: e }) => /* @__PURE__ */ n("div", {
|
|
2177
|
+
className: ul,
|
|
2177
2178
|
children: e
|
|
2178
|
-
}),
|
|
2179
|
-
className:
|
|
2179
|
+
}), ml = "_139ohwv0", z = ({ children: e }) => /* @__PURE__ */ n("div", {
|
|
2180
|
+
className: ml,
|
|
2180
2181
|
children: e
|
|
2181
|
-
}),
|
|
2182
|
-
const e =
|
|
2182
|
+
}), ht = me(null), pl = ht.Provider, gl = () => {
|
|
2183
|
+
const e = ie(ht);
|
|
2183
2184
|
if (!e) throw new Error("A section must be rendered inside <EditorPanel.Root>.");
|
|
2184
2185
|
return e;
|
|
2185
|
-
},
|
|
2186
|
-
List:
|
|
2187
|
-
Grid:
|
|
2186
|
+
}, vl = "_1jlczkt0", Cl = "data-graphy-editor-panel", fl = {
|
|
2187
|
+
List: z,
|
|
2188
|
+
Grid: dt
|
|
2188
2189
|
};
|
|
2189
|
-
function
|
|
2190
|
+
function bl(e) {
|
|
2190
2191
|
if (e === void 0) return !1;
|
|
2191
2192
|
const t = e.split(/\s+/);
|
|
2192
2193
|
return t.includes("_1ii3bsb0") || t.includes("_1ii3bsb1");
|
|
2193
2194
|
}
|
|
2194
|
-
var
|
|
2195
|
-
const a =
|
|
2195
|
+
var yl = ({ handle: e, children: t, controls: i, defaultExpandedSection: o = void 0, className: r }) => {
|
|
2196
|
+
const a = Bt(e), { themeClass: l, inlineVarsStyle: c } = Ve(), [s, u] = q(() => o ? [o] : []), d = E(() => ({
|
|
2196
2197
|
expandSection: (h) => u([h]),
|
|
2197
2198
|
collapseAllSections: () => u([])
|
|
2198
2199
|
}), []);
|
|
2199
|
-
return /* @__PURE__ */ n(
|
|
2200
|
+
return /* @__PURE__ */ n(Ue.Provider, {
|
|
2200
2201
|
value: a,
|
|
2201
|
-
children: /* @__PURE__ */ n(
|
|
2202
|
+
children: /* @__PURE__ */ n(hl, {
|
|
2202
2203
|
controls: i,
|
|
2203
|
-
children: /* @__PURE__ */ n(
|
|
2204
|
+
children: /* @__PURE__ */ n(pl, {
|
|
2204
2205
|
value: d,
|
|
2205
|
-
children: /* @__PURE__ */ n(
|
|
2206
|
-
[
|
|
2207
|
-
className:
|
|
2206
|
+
children: /* @__PURE__ */ n(ce.Root, {
|
|
2207
|
+
[Cl]: "",
|
|
2208
|
+
className: oe(vl, r, { [l]: !bl(r) }),
|
|
2208
2209
|
style: c,
|
|
2209
2210
|
value: s,
|
|
2210
2211
|
onValueChange: (h) => u(h),
|
|
@@ -2213,37 +2214,43 @@ var rl = ({ handle: e, children: t, controls: i, defaultExpandedSection: r = voi
|
|
|
2213
2214
|
})
|
|
2214
2215
|
})
|
|
2215
2216
|
});
|
|
2216
|
-
},
|
|
2217
|
-
Root:
|
|
2218
|
-
Controls:
|
|
2219
|
-
},
|
|
2217
|
+
}, ut = {
|
|
2218
|
+
Root: yl,
|
|
2219
|
+
Controls: fl
|
|
2220
|
+
}, hn = {
|
|
2220
2221
|
stack: "pr583x0",
|
|
2221
2222
|
grid: "pr583x1"
|
|
2222
|
-
},
|
|
2223
|
-
|
|
2223
|
+
}, un = "pr583x2", Sl = {
|
|
2224
|
+
plain: "pr583x4 pr583x3",
|
|
2225
|
+
withIcon: "pr583x5 pr583x3"
|
|
2226
|
+
}, b = ({ label: e, layout: t = "grid", icon: i, children: o }) => {
|
|
2227
|
+
const r = ae(), a = ae();
|
|
2224
2228
|
return e === void 0 ? /* @__PURE__ */ n("div", {
|
|
2225
|
-
className:
|
|
2229
|
+
className: hn[t],
|
|
2226
2230
|
children: /* @__PURE__ */ n("div", {
|
|
2227
|
-
className:
|
|
2228
|
-
children:
|
|
2231
|
+
className: un,
|
|
2232
|
+
children: o
|
|
2229
2233
|
})
|
|
2230
2234
|
}) : /* @__PURE__ */ m("div", {
|
|
2231
|
-
className:
|
|
2232
|
-
children: [/* @__PURE__ */
|
|
2235
|
+
className: hn[t],
|
|
2236
|
+
children: [/* @__PURE__ */ m("label", {
|
|
2233
2237
|
id: r,
|
|
2234
|
-
htmlFor:
|
|
2235
|
-
className:
|
|
2236
|
-
children:
|
|
2238
|
+
htmlFor: a,
|
|
2239
|
+
className: Sl[i === void 0 ? "plain" : "withIcon"],
|
|
2240
|
+
children: [i !== void 0 && /* @__PURE__ */ n("span", {
|
|
2241
|
+
"aria-hidden": "true",
|
|
2242
|
+
children: i
|
|
2243
|
+
}), e]
|
|
2237
2244
|
}), /* @__PURE__ */ n("div", {
|
|
2238
|
-
className:
|
|
2239
|
-
children: /* @__PURE__ */ n(
|
|
2245
|
+
className: un,
|
|
2246
|
+
children: /* @__PURE__ */ n(at, {
|
|
2240
2247
|
labelId: r,
|
|
2241
|
-
controlId:
|
|
2242
|
-
children:
|
|
2248
|
+
controlId: a,
|
|
2249
|
+
children: o
|
|
2243
2250
|
})
|
|
2244
2251
|
})]
|
|
2245
2252
|
});
|
|
2246
|
-
},
|
|
2253
|
+
}, wl = (e) => /* @__PURE__ */ n(T, {
|
|
2247
2254
|
...e,
|
|
2248
2255
|
children: /* @__PURE__ */ n("g", {
|
|
2249
2256
|
stroke: "currentColor",
|
|
@@ -2252,55 +2259,55 @@ var rl = ({ handle: e, children: t, controls: i, defaultExpandedSection: r = voi
|
|
|
2252
2259
|
strokeLinejoin: "round",
|
|
2253
2260
|
children: /* @__PURE__ */ n("path", { d: "m9 6 6 6-6 6" })
|
|
2254
2261
|
})
|
|
2255
|
-
}),
|
|
2256
|
-
var
|
|
2257
|
-
var
|
|
2262
|
+
}), We = "_40zvwv0", Ze = "_40zvwv1", xl = "_40zvwv2", mt = "_40zvwv3", Ll = "_40zvwv4 _40zvwv3";
|
|
2263
|
+
var Tl = "_40zvwv6";
|
|
2264
|
+
var Pl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory: o, onOpenChange: r, children: a }) => t === "collapsible" ? /* @__PURE__ */ n(Al, {
|
|
2258
2265
|
title: e,
|
|
2259
2266
|
preview: i,
|
|
2260
|
-
accessory:
|
|
2261
|
-
onOpenChange:
|
|
2267
|
+
accessory: o,
|
|
2268
|
+
onOpenChange: r,
|
|
2262
2269
|
children: a
|
|
2263
|
-
}) : t === "inline" && i === void 0 ? /* @__PURE__ */ n(
|
|
2270
|
+
}) : t === "inline" && i === void 0 ? /* @__PURE__ */ n(Il, {
|
|
2264
2271
|
title: e,
|
|
2265
|
-
accessory:
|
|
2272
|
+
accessory: o,
|
|
2266
2273
|
children: a
|
|
2267
2274
|
}) : /* @__PURE__ */ m("div", {
|
|
2268
|
-
className:
|
|
2275
|
+
className: We,
|
|
2269
2276
|
children: [/* @__PURE__ */ m("div", {
|
|
2270
|
-
className:
|
|
2277
|
+
className: Ze,
|
|
2271
2278
|
children: [
|
|
2272
2279
|
/* @__PURE__ */ n("span", {
|
|
2273
|
-
className:
|
|
2280
|
+
className: mt,
|
|
2274
2281
|
children: e
|
|
2275
2282
|
}),
|
|
2276
2283
|
i !== void 0 && /* @__PURE__ */ n("span", {
|
|
2277
2284
|
className: "_40zvwv5",
|
|
2278
2285
|
children: i
|
|
2279
2286
|
}),
|
|
2280
|
-
|
|
2287
|
+
o !== void 0 && /* @__PURE__ */ n("span", {
|
|
2281
2288
|
className: "_40zvwv7",
|
|
2282
|
-
children:
|
|
2289
|
+
children: o
|
|
2283
2290
|
})
|
|
2284
2291
|
]
|
|
2285
2292
|
}), /* @__PURE__ */ n("div", { children: a })]
|
|
2286
|
-
}),
|
|
2287
|
-
const
|
|
2293
|
+
}), Il = ({ title: e, accessory: t, children: i }) => {
|
|
2294
|
+
const o = ae(), r = ae();
|
|
2288
2295
|
return /* @__PURE__ */ n("div", {
|
|
2289
|
-
className:
|
|
2296
|
+
className: We,
|
|
2290
2297
|
children: /* @__PURE__ */ m("div", {
|
|
2291
|
-
className:
|
|
2298
|
+
className: Ze,
|
|
2292
2299
|
children: [
|
|
2293
2300
|
/* @__PURE__ */ n("label", {
|
|
2294
|
-
id:
|
|
2295
|
-
htmlFor:
|
|
2296
|
-
className:
|
|
2301
|
+
id: o,
|
|
2302
|
+
htmlFor: r,
|
|
2303
|
+
className: Ll,
|
|
2297
2304
|
children: e
|
|
2298
2305
|
}),
|
|
2299
2306
|
/* @__PURE__ */ n("span", {
|
|
2300
|
-
className:
|
|
2301
|
-
children: /* @__PURE__ */ n(
|
|
2302
|
-
labelId:
|
|
2303
|
-
controlId:
|
|
2307
|
+
className: Tl,
|
|
2308
|
+
children: /* @__PURE__ */ n(at, {
|
|
2309
|
+
labelId: o,
|
|
2310
|
+
controlId: r,
|
|
2304
2311
|
children: i
|
|
2305
2312
|
})
|
|
2306
2313
|
}),
|
|
@@ -2311,22 +2318,22 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2311
2318
|
]
|
|
2312
2319
|
})
|
|
2313
2320
|
});
|
|
2314
|
-
},
|
|
2315
|
-
const a =
|
|
2316
|
-
return /* @__PURE__ */ m(
|
|
2321
|
+
}, Al = ({ title: e, preview: t, accessory: i, onOpenChange: o, children: r }) => {
|
|
2322
|
+
const a = I();
|
|
2323
|
+
return /* @__PURE__ */ m(ce.Item, {
|
|
2317
2324
|
value: e,
|
|
2318
|
-
className:
|
|
2319
|
-
onOpenChange:
|
|
2320
|
-
children: [/* @__PURE__ */ m(
|
|
2321
|
-
className:
|
|
2325
|
+
className: We,
|
|
2326
|
+
onOpenChange: o,
|
|
2327
|
+
children: [/* @__PURE__ */ m(ce.Header, {
|
|
2328
|
+
className: Ze,
|
|
2322
2329
|
render: /* @__PURE__ */ n("div", {}),
|
|
2323
2330
|
children: [
|
|
2324
|
-
/* @__PURE__ */ n(
|
|
2325
|
-
className:
|
|
2331
|
+
/* @__PURE__ */ n(ce.Trigger, {
|
|
2332
|
+
className: xl,
|
|
2326
2333
|
"aria-label": a("editor.accessibility.toggleSection", { title: e })
|
|
2327
2334
|
}),
|
|
2328
2335
|
/* @__PURE__ */ n("span", {
|
|
2329
|
-
className:
|
|
2336
|
+
className: mt,
|
|
2330
2337
|
children: e
|
|
2331
2338
|
}),
|
|
2332
2339
|
t !== void 0 && /* @__PURE__ */ n("span", {
|
|
@@ -2338,267 +2345,267 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2338
2345
|
children: i
|
|
2339
2346
|
}),
|
|
2340
2347
|
/* @__PURE__ */ n("span", {
|
|
2341
|
-
className:
|
|
2342
|
-
children: /* @__PURE__ */ n(
|
|
2348
|
+
className: Pl,
|
|
2349
|
+
children: /* @__PURE__ */ n(wl, { size: "sm" })
|
|
2343
2350
|
})
|
|
2344
2351
|
]
|
|
2345
|
-
}), /* @__PURE__ */ n(
|
|
2352
|
+
}), /* @__PURE__ */ n(ce.Panel, { children: /* @__PURE__ */ n("div", { children: r }) })]
|
|
2346
2353
|
});
|
|
2347
|
-
},
|
|
2348
|
-
const { expandSection: l, collapseAllSections: c } =
|
|
2354
|
+
}, Ol = ({ title: e, isChecked: t, onToggle: i, isDisabled: o, preview: r, children: a }) => {
|
|
2355
|
+
const { expandSection: l, collapseAllSections: c } = gl(), { Switch: s } = N();
|
|
2349
2356
|
return /* @__PURE__ */ n(D, {
|
|
2350
2357
|
title: e,
|
|
2351
2358
|
layout: "collapsible",
|
|
2352
|
-
preview:
|
|
2359
|
+
preview: r,
|
|
2353
2360
|
onOpenChange: (h) => {
|
|
2354
|
-
h && !t &&
|
|
2361
|
+
h && !t && o !== !0 && i(!0);
|
|
2355
2362
|
},
|
|
2356
2363
|
accessory: /* @__PURE__ */ n(s, {
|
|
2357
2364
|
isChecked: t,
|
|
2358
2365
|
onChange: (h) => {
|
|
2359
2366
|
i(h), h ? l(e) : c();
|
|
2360
2367
|
},
|
|
2361
|
-
isDisabled:
|
|
2368
|
+
isDisabled: o,
|
|
2362
2369
|
ariaLabel: e
|
|
2363
2370
|
}),
|
|
2364
2371
|
children: a
|
|
2365
2372
|
});
|
|
2366
|
-
},
|
|
2373
|
+
}, Ml = {
|
|
2367
2374
|
horizontal: ["bottom", "top"],
|
|
2368
2375
|
vertical: ["left", "right"]
|
|
2369
|
-
},
|
|
2376
|
+
}, Nl = {
|
|
2370
2377
|
left: "editor.axesPanel.position.left",
|
|
2371
2378
|
right: "editor.axesPanel.position.right",
|
|
2372
2379
|
top: "editor.axesPanel.position.top",
|
|
2373
2380
|
bottom: "editor.axesPanel.position.bottom"
|
|
2374
|
-
},
|
|
2381
|
+
}, kl = {
|
|
2375
2382
|
x: "editor.axesPanel.mainAxisSection.xAxis",
|
|
2376
2383
|
y: "editor.axesPanel.mainAxisSection.yAxis"
|
|
2377
|
-
},
|
|
2378
|
-
const
|
|
2384
|
+
}, mn = ({ axis: e, title: t, layout: i = "collapsible", preview: o }) => {
|
|
2385
|
+
const r = M(), a = _(r), l = I(), { NumberField: c, Switch: s, TextField: u, ToggleGroup: d } = N();
|
|
2379
2386
|
if (!a) return null;
|
|
2380
|
-
const h = a.coordSystem.type === "polar" ? a.coordSystem.axisMapping[e].geometry : "linear", v = a.config.axes[e], p = a.scales[e], g = p?.spec,
|
|
2381
|
-
if (h === "circular" || h === "radial" &&
|
|
2382
|
-
const P = g !== void 0 && "reverse" in g ? g : void 0, y = g?.scaleType === "continuous" || g?.scaleType === "datetime", f = e === "y" &&
|
|
2383
|
-
value:
|
|
2384
|
-
label:
|
|
2385
|
-
})),
|
|
2386
|
-
value:
|
|
2387
|
-
label: l(
|
|
2388
|
-
})),
|
|
2387
|
+
const h = a.coordSystem.type === "polar" ? a.coordSystem.axisMapping[e].geometry : "linear", v = a.config.axes[e], p = a.scales[e], g = p?.spec, C = g?.scaleType === "continuous" ? g : void 0;
|
|
2388
|
+
if (h === "circular" || h === "radial" && C === void 0) return null;
|
|
2389
|
+
const P = g !== void 0 && "reverse" in g ? g : void 0, y = g?.scaleType === "continuous" || g?.scaleType === "datetime", f = e === "y" && C !== void 0 && a.layers.some((S) => S.yScaleType === "primary" && S.geom === "bar"), x = C?.transform === "log", L = C?.domainMax ?? null, A = Rl(C), H = (S, $) => S.map((pe) => ({
|
|
2390
|
+
value: pe,
|
|
2391
|
+
label: $(pe)
|
|
2392
|
+
})), k = a.guides.axes.find((S) => S.scaleAestheticKey === e)?.position, F = Ml[k === "bottom" || k === "top" || k === void 0 && e === "x" ? "horizontal" : "vertical"], O = a.guides.legends.drawn.some((S) => F.some(($) => $ === S.position)), w = F.map((S) => ({
|
|
2393
|
+
value: S,
|
|
2394
|
+
label: l(Nl[S])
|
|
2395
|
+
})), R = H(["auto", "edges"], (S) => l(S === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), J = H(["linear", "log"], (S) => l(S === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), Ct = H([
|
|
2389
2396
|
"auto",
|
|
2390
2397
|
"zero",
|
|
2391
2398
|
"custom"
|
|
2392
|
-
], (
|
|
2393
|
-
|
|
2399
|
+
], (S) => l(S === "zero" ? "editor.axesPanel.startFrom.zero" : S === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")), ft = H(["auto", "custom"], (S) => l(S === "custom" ? "editor.axesPanel.endAt.custom" : "editor.axesPanel.endAt.auto")), bt = H(["no", "yes"], (S) => l(S === "yes" ? "editor.axesPanel.yesNo.yes" : "editor.axesPanel.yesNo.no")), yt = (S) => {
|
|
2400
|
+
r.commands.dispatch(new sr({
|
|
2394
2401
|
axis: e,
|
|
2395
|
-
isVisible:
|
|
2402
|
+
isVisible: S
|
|
2396
2403
|
}));
|
|
2397
|
-
},
|
|
2398
|
-
|
|
2404
|
+
}, St = (S) => {
|
|
2405
|
+
r.commands.dispatch(new ar({
|
|
2399
2406
|
axis: e,
|
|
2400
|
-
label:
|
|
2407
|
+
label: S === "" ? null : S
|
|
2401
2408
|
}), { transient: !0 });
|
|
2402
|
-
},
|
|
2403
|
-
|
|
2409
|
+
}, wt = (S) => {
|
|
2410
|
+
r.commands.dispatch(new lr({
|
|
2404
2411
|
axis: e,
|
|
2405
|
-
isVisible:
|
|
2412
|
+
isVisible: S
|
|
2406
2413
|
}));
|
|
2407
|
-
},
|
|
2408
|
-
|
|
2414
|
+
}, xt = (S) => {
|
|
2415
|
+
r.commands.dispatch(new ir({
|
|
2409
2416
|
axis: e,
|
|
2410
|
-
tickMode:
|
|
2417
|
+
tickMode: S === "edges" ? "edges" : "auto"
|
|
2411
2418
|
}));
|
|
2412
|
-
},
|
|
2413
|
-
|
|
2419
|
+
}, Lt = (S) => {
|
|
2420
|
+
r.commands.dispatch(new _r({
|
|
2414
2421
|
scaledAesthetic: e,
|
|
2415
|
-
reverse:
|
|
2422
|
+
reverse: S === "yes"
|
|
2416
2423
|
}));
|
|
2417
|
-
},
|
|
2418
|
-
|
|
2424
|
+
}, Tt = (S) => {
|
|
2425
|
+
r.commands.dispatch(new Dr({
|
|
2419
2426
|
scaledAesthetic: e,
|
|
2420
|
-
transform:
|
|
2427
|
+
transform: S === "log" ? "log" : "linear"
|
|
2421
2428
|
}));
|
|
2422
|
-
},
|
|
2423
|
-
|
|
2429
|
+
}, Xe = (S) => {
|
|
2430
|
+
r.commands.dispatch(new ge({
|
|
2424
2431
|
scaledAesthetic: e,
|
|
2425
|
-
...
|
|
2432
|
+
...S
|
|
2426
2433
|
}), { transient: !0 });
|
|
2427
|
-
},
|
|
2428
|
-
|
|
2429
|
-
},
|
|
2430
|
-
|
|
2431
|
-
},
|
|
2432
|
-
if (
|
|
2433
|
-
if (
|
|
2434
|
-
|
|
2434
|
+
}, Pt = (S) => {
|
|
2435
|
+
S !== null && Xe({ domainMin: S });
|
|
2436
|
+
}, It = (S) => {
|
|
2437
|
+
S !== null && Xe({ domainMax: S });
|
|
2438
|
+
}, At = (S) => {
|
|
2439
|
+
if (C) {
|
|
2440
|
+
if (S === "custom") {
|
|
2441
|
+
C.zero && r.commands.dispatch(new en({
|
|
2435
2442
|
scaledAesthetic: e,
|
|
2436
2443
|
zero: !1
|
|
2437
|
-
})),
|
|
2444
|
+
})), r.commands.dispatch(new ge({
|
|
2438
2445
|
scaledAesthetic: e,
|
|
2439
|
-
domainMin:
|
|
2446
|
+
domainMin: pn(p?.domain, "start")
|
|
2440
2447
|
}));
|
|
2441
2448
|
return;
|
|
2442
2449
|
}
|
|
2443
|
-
|
|
2450
|
+
C.domainMin !== null && r.commands.dispatch(new ge({
|
|
2444
2451
|
scaledAesthetic: e,
|
|
2445
2452
|
domainMin: null
|
|
2446
|
-
})),
|
|
2453
|
+
})), r.commands.dispatch(new en({
|
|
2447
2454
|
scaledAesthetic: e,
|
|
2448
|
-
zero:
|
|
2455
|
+
zero: S === "zero"
|
|
2449
2456
|
}));
|
|
2450
2457
|
}
|
|
2451
|
-
},
|
|
2452
|
-
const
|
|
2453
|
-
|
|
2458
|
+
}, Ot = (S) => {
|
|
2459
|
+
const $ = S === "custom" ? pn(p?.domain, "end") : null;
|
|
2460
|
+
r.commands.dispatch(new ge({
|
|
2454
2461
|
scaledAesthetic: e,
|
|
2455
|
-
domainMax:
|
|
2462
|
+
domainMax: $
|
|
2456
2463
|
}));
|
|
2457
|
-
},
|
|
2458
|
-
const
|
|
2459
|
-
|
|
2464
|
+
}, Mt = (S) => {
|
|
2465
|
+
const $ = F.find((pe) => pe === S);
|
|
2466
|
+
$ && r.commands.dispatch(new or({
|
|
2460
2467
|
axis: e,
|
|
2461
|
-
position:
|
|
2468
|
+
position: $
|
|
2462
2469
|
}));
|
|
2463
2470
|
};
|
|
2464
2471
|
return /* @__PURE__ */ n(D, {
|
|
2465
|
-
title: t ?? l(
|
|
2472
|
+
title: t ?? l(kl[e]),
|
|
2466
2473
|
layout: i,
|
|
2467
|
-
preview:
|
|
2468
|
-
children: /* @__PURE__ */ m(
|
|
2469
|
-
/* @__PURE__ */ n(
|
|
2474
|
+
preview: o,
|
|
2475
|
+
children: /* @__PURE__ */ m(z, { children: [
|
|
2476
|
+
/* @__PURE__ */ n(b, {
|
|
2470
2477
|
label: l("editor.axesPanel.controls.visible"),
|
|
2471
2478
|
children: /* @__PURE__ */ n(s, {
|
|
2472
2479
|
isChecked: v.isVisible,
|
|
2473
|
-
onChange:
|
|
2480
|
+
onChange: yt
|
|
2474
2481
|
})
|
|
2475
2482
|
}),
|
|
2476
|
-
h === "linear" && /* @__PURE__ */ m(
|
|
2483
|
+
h === "linear" && /* @__PURE__ */ m(G, { children: [/* @__PURE__ */ n(b, {
|
|
2477
2484
|
label: l("editor.axesPanel.controls.title"),
|
|
2478
2485
|
children: /* @__PURE__ */ n(u, {
|
|
2479
2486
|
value: v.label ?? "",
|
|
2480
|
-
onChange:
|
|
2481
|
-
onCommit:
|
|
2487
|
+
onChange: St,
|
|
2488
|
+
onCommit: r.commands.seal
|
|
2482
2489
|
})
|
|
2483
|
-
}), /* @__PURE__ */ n(
|
|
2490
|
+
}), /* @__PURE__ */ n(b, {
|
|
2484
2491
|
label: l("editor.axesPanel.controls.ticks"),
|
|
2485
2492
|
children: /* @__PURE__ */ n(s, {
|
|
2486
2493
|
isChecked: v.ticks.isVisible,
|
|
2487
|
-
onChange:
|
|
2494
|
+
onChange: wt
|
|
2488
2495
|
})
|
|
2489
2496
|
})] }),
|
|
2490
|
-
y && /* @__PURE__ */ n(
|
|
2497
|
+
y && /* @__PURE__ */ n(b, {
|
|
2491
2498
|
label: l("editor.axesPanel.controls.labels"),
|
|
2492
2499
|
children: /* @__PURE__ */ n(d, {
|
|
2493
2500
|
value: v.ticks.mode,
|
|
2494
|
-
options:
|
|
2495
|
-
onChange:
|
|
2501
|
+
options: R,
|
|
2502
|
+
onChange: xt
|
|
2496
2503
|
})
|
|
2497
2504
|
}),
|
|
2498
|
-
|
|
2505
|
+
C && h === "linear" && !O && /* @__PURE__ */ n(b, {
|
|
2499
2506
|
label: l("editor.axesPanel.controls.position"),
|
|
2500
2507
|
children: /* @__PURE__ */ n(d, {
|
|
2501
|
-
value:
|
|
2508
|
+
value: k ?? v.position,
|
|
2502
2509
|
options: w,
|
|
2503
|
-
onChange:
|
|
2510
|
+
onChange: Mt
|
|
2504
2511
|
})
|
|
2505
2512
|
}),
|
|
2506
|
-
P !== void 0 && /* @__PURE__ */ n(
|
|
2513
|
+
P !== void 0 && /* @__PURE__ */ n(b, {
|
|
2507
2514
|
label: l("editor.axesPanel.controls.reverse"),
|
|
2508
2515
|
children: /* @__PURE__ */ n(d, {
|
|
2509
2516
|
value: P.reverse === !0 ? "yes" : "no",
|
|
2510
|
-
options:
|
|
2511
|
-
onChange:
|
|
2517
|
+
options: bt,
|
|
2518
|
+
onChange: Lt
|
|
2512
2519
|
})
|
|
2513
2520
|
}),
|
|
2514
|
-
|
|
2521
|
+
C && !f && /* @__PURE__ */ n(b, {
|
|
2515
2522
|
label: l("editor.axesPanel.controls.scale"),
|
|
2516
2523
|
children: /* @__PURE__ */ n(d, {
|
|
2517
2524
|
value: x ? "log" : "linear",
|
|
2518
|
-
options:
|
|
2519
|
-
onChange:
|
|
2525
|
+
options: J,
|
|
2526
|
+
onChange: Tt
|
|
2520
2527
|
})
|
|
2521
2528
|
}),
|
|
2522
|
-
|
|
2523
|
-
!f && /* @__PURE__ */ m(
|
|
2529
|
+
C && !x && /* @__PURE__ */ m(G, { children: [
|
|
2530
|
+
!f && /* @__PURE__ */ m(G, { children: [/* @__PURE__ */ n(b, {
|
|
2524
2531
|
label: l("editor.axesPanel.controls.startFrom"),
|
|
2525
2532
|
children: /* @__PURE__ */ n(d, {
|
|
2526
|
-
value:
|
|
2527
|
-
options:
|
|
2528
|
-
onChange:
|
|
2533
|
+
value: A,
|
|
2534
|
+
options: Ct,
|
|
2535
|
+
onChange: At
|
|
2529
2536
|
})
|
|
2530
|
-
}),
|
|
2537
|
+
}), A === "custom" && /* @__PURE__ */ n(b, {
|
|
2531
2538
|
label: l("editor.axesPanel.controls.value"),
|
|
2532
2539
|
children: /* @__PURE__ */ n(c, {
|
|
2533
|
-
value:
|
|
2534
|
-
onChange:
|
|
2535
|
-
onCommit:
|
|
2540
|
+
value: C.domainMin ?? null,
|
|
2541
|
+
onChange: Pt,
|
|
2542
|
+
onCommit: r.commands.seal
|
|
2536
2543
|
})
|
|
2537
2544
|
})] }),
|
|
2538
|
-
/* @__PURE__ */ n(
|
|
2545
|
+
/* @__PURE__ */ n(b, {
|
|
2539
2546
|
label: l("editor.axesPanel.controls.endAt"),
|
|
2540
2547
|
children: /* @__PURE__ */ n(d, {
|
|
2541
|
-
value:
|
|
2542
|
-
options:
|
|
2543
|
-
onChange:
|
|
2548
|
+
value: L === null ? "auto" : "custom",
|
|
2549
|
+
options: ft,
|
|
2550
|
+
onChange: Ot
|
|
2544
2551
|
})
|
|
2545
2552
|
}),
|
|
2546
|
-
|
|
2553
|
+
L !== null && /* @__PURE__ */ n(b, {
|
|
2547
2554
|
label: l("editor.axesPanel.controls.value"),
|
|
2548
2555
|
children: /* @__PURE__ */ n(c, {
|
|
2549
|
-
value:
|
|
2550
|
-
onChange:
|
|
2551
|
-
onCommit:
|
|
2556
|
+
value: L,
|
|
2557
|
+
onChange: It,
|
|
2558
|
+
onCommit: r.commands.seal
|
|
2552
2559
|
})
|
|
2553
2560
|
})
|
|
2554
2561
|
] })
|
|
2555
2562
|
] })
|
|
2556
2563
|
});
|
|
2557
|
-
},
|
|
2564
|
+
}, Rl = (e) => e === void 0 ? "auto" : e.domainMin !== null && e.domainMin !== void 0 ? "custom" : e.zero === !0 ? "zero" : "auto", pn = (e, t) => {
|
|
2558
2565
|
const i = t === "start" ? e?.[0] : e?.[e.length - 1];
|
|
2559
2566
|
return typeof i == "number" ? i : 0;
|
|
2560
|
-
},
|
|
2561
|
-
const i = M(),
|
|
2562
|
-
return /* @__PURE__ */ n(
|
|
2563
|
-
label:
|
|
2564
|
-
children: /* @__PURE__ */ n(
|
|
2567
|
+
}, qe = ({ value: e, onChange: t }) => {
|
|
2568
|
+
const i = M(), o = I(), { TextField: r } = N(), a = e !== null && typeof e != "string", l = (c) => t(c === "" ? null : c);
|
|
2569
|
+
return /* @__PURE__ */ n(b, {
|
|
2570
|
+
label: o("editor.elementsPanel.contentValue"),
|
|
2571
|
+
children: /* @__PURE__ */ n(r, {
|
|
2565
2572
|
value: typeof e == "string" ? e : "",
|
|
2566
2573
|
onChange: l,
|
|
2567
2574
|
onCommit: i.commands.seal,
|
|
2568
2575
|
isDisabled: a
|
|
2569
2576
|
})
|
|
2570
2577
|
});
|
|
2571
|
-
},
|
|
2572
|
-
const
|
|
2573
|
-
if (!
|
|
2574
|
-
const c =
|
|
2575
|
-
|
|
2578
|
+
}, El = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2579
|
+
const o = M(), r = _(o), a = I(), { Switch: l } = N();
|
|
2580
|
+
if (!r) return null;
|
|
2581
|
+
const c = r.config.content, s = (d) => {
|
|
2582
|
+
o.commands.dispatch(new xe({
|
|
2576
2583
|
slot: "caption",
|
|
2577
2584
|
isVisible: d
|
|
2578
2585
|
}));
|
|
2579
2586
|
}, u = (d) => {
|
|
2580
|
-
|
|
2587
|
+
o.commands.dispatch(new ur({ caption: d }), { transient: !0 });
|
|
2581
2588
|
};
|
|
2582
2589
|
return /* @__PURE__ */ n(D, {
|
|
2583
2590
|
title: e ?? a("editor.elementsPanel.footerSection.caption"),
|
|
2584
2591
|
layout: t,
|
|
2585
2592
|
preview: i,
|
|
2586
|
-
children: /* @__PURE__ */ m(
|
|
2593
|
+
children: /* @__PURE__ */ m(z, { children: [/* @__PURE__ */ n(b, {
|
|
2587
2594
|
label: a("editor.elementsPanel.contentVisible"),
|
|
2588
2595
|
children: /* @__PURE__ */ n(l, {
|
|
2589
2596
|
isChecked: c.isCaptionVisible,
|
|
2590
2597
|
onChange: s
|
|
2591
2598
|
})
|
|
2592
|
-
}), /* @__PURE__ */ n(
|
|
2599
|
+
}), /* @__PURE__ */ n(qe, {
|
|
2593
2600
|
value: c.caption,
|
|
2594
2601
|
onChange: u
|
|
2595
2602
|
})] })
|
|
2596
2603
|
});
|
|
2597
|
-
},
|
|
2598
|
-
const
|
|
2599
|
-
if (!
|
|
2600
|
-
const c =
|
|
2601
|
-
|
|
2604
|
+
}, gn = /^[a-z][a-z\d+.-]*:/i, _l = {}, Dl = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2605
|
+
const o = M(), r = _(o), a = I(), { Switch: l } = N();
|
|
2606
|
+
if (!r) return null;
|
|
2607
|
+
const c = r.config.content, s = (u) => {
|
|
2608
|
+
o.commands.dispatch(new xe({
|
|
2602
2609
|
slot: "source",
|
|
2603
2610
|
isVisible: u
|
|
2604
2611
|
}));
|
|
@@ -2607,74 +2614,74 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2607
2614
|
title: e ?? a("editor.elementsPanel.sourceSection.title"),
|
|
2608
2615
|
layout: t,
|
|
2609
2616
|
preview: i,
|
|
2610
|
-
children: /* @__PURE__ */ m(
|
|
2617
|
+
children: /* @__PURE__ */ m(z, { children: [/* @__PURE__ */ n(b, {
|
|
2611
2618
|
label: a("editor.elementsPanel.contentVisible"),
|
|
2612
2619
|
children: /* @__PURE__ */ n(l, {
|
|
2613
2620
|
isChecked: c.isSourceVisible,
|
|
2614
2621
|
onChange: s
|
|
2615
2622
|
})
|
|
2616
|
-
}), /* @__PURE__ */ n(
|
|
2623
|
+
}), /* @__PURE__ */ n(Hl, { source: c.source ?? _l })] })
|
|
2617
2624
|
});
|
|
2618
|
-
},
|
|
2619
|
-
const t = M(), i =
|
|
2625
|
+
}, Hl = ({ source: e }) => {
|
|
2626
|
+
const t = M(), i = I(), { TextField: o } = N(), r = (s) => {
|
|
2620
2627
|
const u = (s.label ?? "") !== "" || (s.url ?? "") !== "";
|
|
2621
|
-
t.commands.dispatch(new
|
|
2628
|
+
t.commands.dispatch(new mr({ source: u ? s : null }), { transient: !0 });
|
|
2622
2629
|
}, a = () => {
|
|
2623
2630
|
const s = e.url ?? "";
|
|
2624
|
-
s !== "" && !
|
|
2631
|
+
s !== "" && !gn.test(s) && r({
|
|
2625
2632
|
...e,
|
|
2626
2633
|
url: `https://${s}`
|
|
2627
2634
|
}), t.commands.seal();
|
|
2628
|
-
}, l = (s) =>
|
|
2635
|
+
}, l = (s) => r({
|
|
2629
2636
|
...e,
|
|
2630
2637
|
url: s
|
|
2631
|
-
}), c = (s) =>
|
|
2638
|
+
}), c = (s) => r({
|
|
2632
2639
|
...e,
|
|
2633
2640
|
label: s
|
|
2634
2641
|
});
|
|
2635
|
-
return /* @__PURE__ */ m(
|
|
2642
|
+
return /* @__PURE__ */ m(G, { children: [/* @__PURE__ */ n(b, {
|
|
2636
2643
|
label: i("editor.elementsPanel.sourceSection.url"),
|
|
2637
|
-
children: /* @__PURE__ */ n(
|
|
2644
|
+
children: /* @__PURE__ */ n(o, {
|
|
2638
2645
|
value: e.url ?? "",
|
|
2639
2646
|
onChange: l,
|
|
2640
2647
|
onCommit: a,
|
|
2641
|
-
hasError:
|
|
2648
|
+
hasError: gn.test(e.url ?? "") && !ga(e.url)
|
|
2642
2649
|
})
|
|
2643
|
-
}), /* @__PURE__ */ n(
|
|
2650
|
+
}), /* @__PURE__ */ n(b, {
|
|
2644
2651
|
label: i("editor.elementsPanel.sourceSection.name"),
|
|
2645
|
-
children: /* @__PURE__ */ n(
|
|
2652
|
+
children: /* @__PURE__ */ n(o, {
|
|
2646
2653
|
value: e.label ?? "",
|
|
2647
2654
|
onChange: c,
|
|
2648
2655
|
onCommit: t.commands.seal
|
|
2649
2656
|
})
|
|
2650
2657
|
})] });
|
|
2651
|
-
},
|
|
2652
|
-
const
|
|
2653
|
-
if (!
|
|
2654
|
-
const c =
|
|
2655
|
-
|
|
2658
|
+
}, Vl = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2659
|
+
const o = M(), r = _(o), a = I(), { Switch: l } = N();
|
|
2660
|
+
if (!r) return null;
|
|
2661
|
+
const c = r.config.content, s = (d) => {
|
|
2662
|
+
o.commands.dispatch(new xe({
|
|
2656
2663
|
slot: "subtitle",
|
|
2657
2664
|
isVisible: d
|
|
2658
2665
|
}));
|
|
2659
2666
|
}, u = (d) => {
|
|
2660
|
-
|
|
2667
|
+
o.commands.dispatch(new pr({ subtitle: d }), { transient: !0 });
|
|
2661
2668
|
};
|
|
2662
2669
|
return /* @__PURE__ */ n(D, {
|
|
2663
2670
|
title: e ?? a("editor.elementsPanel.headerSection.subtitle"),
|
|
2664
2671
|
layout: t,
|
|
2665
2672
|
preview: i,
|
|
2666
|
-
children: /* @__PURE__ */ m(
|
|
2673
|
+
children: /* @__PURE__ */ m(z, { children: [/* @__PURE__ */ n(b, {
|
|
2667
2674
|
label: a("editor.elementsPanel.contentVisible"),
|
|
2668
2675
|
children: /* @__PURE__ */ n(l, {
|
|
2669
2676
|
isChecked: c.isSubtitleVisible,
|
|
2670
2677
|
onChange: s
|
|
2671
2678
|
})
|
|
2672
|
-
}), /* @__PURE__ */ n(
|
|
2679
|
+
}), /* @__PURE__ */ n(qe, {
|
|
2673
2680
|
value: c.subtitle,
|
|
2674
2681
|
onChange: u
|
|
2675
2682
|
})] })
|
|
2676
2683
|
});
|
|
2677
|
-
},
|
|
2684
|
+
}, Re = [
|
|
2678
2685
|
0.8,
|
|
2679
2686
|
1,
|
|
2680
2687
|
1.2,
|
|
@@ -2685,15 +2692,15 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2685
2692
|
2.5,
|
|
2686
2693
|
3,
|
|
2687
2694
|
4
|
|
2688
|
-
],
|
|
2689
|
-
const
|
|
2690
|
-
if (!
|
|
2691
|
-
const { textScale: c } =
|
|
2695
|
+
], zl = Re.length / 2, Fl = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2696
|
+
const o = M(), r = _(o), a = I(), { RadioGrid: l } = N();
|
|
2697
|
+
if (!r) return null;
|
|
2698
|
+
const { textScale: c } = r.config.appearance, s = (h) => a("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${h}` }), u = Re.map((h) => ({
|
|
2692
2699
|
value: `${h}`,
|
|
2693
2700
|
label: s(h)
|
|
2694
2701
|
})), d = (h) => {
|
|
2695
|
-
const v =
|
|
2696
|
-
v !== void 0 &&
|
|
2702
|
+
const v = Re.find((p) => `${p}` === h);
|
|
2703
|
+
v !== void 0 && o.commands.dispatch(new rr({ textScale: v }));
|
|
2697
2704
|
};
|
|
2698
2705
|
return /* @__PURE__ */ n(D, {
|
|
2699
2706
|
title: e ?? a("editor.elementsPanel.textSizeSection.title"),
|
|
@@ -2702,77 +2709,77 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2702
2709
|
children: /* @__PURE__ */ n(l, {
|
|
2703
2710
|
value: `${c}`,
|
|
2704
2711
|
options: u,
|
|
2705
|
-
columns:
|
|
2712
|
+
columns: zl,
|
|
2706
2713
|
onChange: d,
|
|
2707
2714
|
ariaLabel: a("editor.elementsPanel.textSizeSection.title")
|
|
2708
2715
|
})
|
|
2709
2716
|
});
|
|
2710
|
-
},
|
|
2711
|
-
const
|
|
2712
|
-
if (!
|
|
2713
|
-
const c =
|
|
2714
|
-
|
|
2717
|
+
}, Bl = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2718
|
+
const o = M(), r = _(o), a = I(), { Switch: l } = N();
|
|
2719
|
+
if (!r) return null;
|
|
2720
|
+
const c = r.config.content, s = (d) => {
|
|
2721
|
+
o.commands.dispatch(new xe({
|
|
2715
2722
|
slot: "title",
|
|
2716
2723
|
isVisible: d
|
|
2717
2724
|
}));
|
|
2718
2725
|
}, u = (d) => {
|
|
2719
|
-
|
|
2726
|
+
o.commands.dispatch(new gr({ title: d }), { transient: !0 });
|
|
2720
2727
|
};
|
|
2721
2728
|
return /* @__PURE__ */ n(D, {
|
|
2722
2729
|
title: e ?? a("editor.elementsPanel.headerSection.toggleTitle"),
|
|
2723
2730
|
layout: t,
|
|
2724
2731
|
preview: i,
|
|
2725
|
-
children: /* @__PURE__ */ m(
|
|
2732
|
+
children: /* @__PURE__ */ m(z, { children: [/* @__PURE__ */ n(b, {
|
|
2726
2733
|
label: a("editor.elementsPanel.contentVisible"),
|
|
2727
2734
|
children: /* @__PURE__ */ n(l, {
|
|
2728
2735
|
isChecked: c.isTitleVisible,
|
|
2729
2736
|
onChange: s
|
|
2730
2737
|
})
|
|
2731
|
-
}), /* @__PURE__ */ n(
|
|
2738
|
+
}), /* @__PURE__ */ n(qe, {
|
|
2732
2739
|
value: c.title,
|
|
2733
2740
|
onChange: u
|
|
2734
2741
|
})] })
|
|
2735
2742
|
});
|
|
2736
|
-
},
|
|
2743
|
+
}, Tc = ({ children: e, ...t }) => /* @__PURE__ */ n(ut.Root, {
|
|
2737
2744
|
...t,
|
|
2738
|
-
children: e ?? /* @__PURE__ */ m(
|
|
2739
|
-
/* @__PURE__ */ n(
|
|
2740
|
-
/* @__PURE__ */ n(
|
|
2741
|
-
/* @__PURE__ */ n(
|
|
2742
|
-
/* @__PURE__ */ n(
|
|
2743
|
-
/* @__PURE__ */ n(
|
|
2745
|
+
children: e ?? /* @__PURE__ */ m(G, { children: [
|
|
2746
|
+
/* @__PURE__ */ n(Bl, {}),
|
|
2747
|
+
/* @__PURE__ */ n(Vl, {}),
|
|
2748
|
+
/* @__PURE__ */ n(El, {}),
|
|
2749
|
+
/* @__PURE__ */ n(Dl, {}),
|
|
2750
|
+
/* @__PURE__ */ n(Fl, {})
|
|
2744
2751
|
] })
|
|
2745
|
-
}),
|
|
2752
|
+
}), Pc = ({ children: e, ...t }) => /* @__PURE__ */ n(ut.Root, {
|
|
2746
2753
|
...t,
|
|
2747
|
-
children: e ?? /* @__PURE__ */ m(
|
|
2748
|
-
}),
|
|
2749
|
-
const
|
|
2750
|
-
if (!
|
|
2751
|
-
const { cornerRadius: s } =
|
|
2754
|
+
children: e ?? /* @__PURE__ */ m(G, { children: [/* @__PURE__ */ n(mn, { axis: "x" }), /* @__PURE__ */ n(mn, { axis: "y" })] })
|
|
2755
|
+
}), Te = (e) => `${e}px`, pt = (e) => `${Math.round(e * 100)}%`, Gl = (e) => `${e}°`, Kl = 24, vn = ["dim", "desaturate"], Ic = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2756
|
+
const o = M(), r = _(o), a = I(), { Slider: l, ToggleGroup: c } = N();
|
|
2757
|
+
if (!r) return null;
|
|
2758
|
+
const { cornerRadius: s } = r.config.appearance, u = fa(r.spec), d = vn.map((p) => ({
|
|
2752
2759
|
value: p,
|
|
2753
2760
|
label: a(p === "dim" ? "editor.highlighting.highlightStyle.tint" : "editor.highlighting.highlightStyle.grey")
|
|
2754
2761
|
})), h = (p) => {
|
|
2755
|
-
|
|
2762
|
+
o.commands.dispatch(new tr({ cornerRadius: p }), { transient: !0 });
|
|
2756
2763
|
}, v = (p) => {
|
|
2757
|
-
const g =
|
|
2758
|
-
g &&
|
|
2764
|
+
const g = vn.find((C) => C === p);
|
|
2765
|
+
g && o.commands.dispatch(new xr({ dimStyle: g }));
|
|
2759
2766
|
};
|
|
2760
2767
|
return /* @__PURE__ */ n(D, {
|
|
2761
2768
|
title: e ?? a("editor.colorPanel.appearanceSection.title"),
|
|
2762
2769
|
layout: t,
|
|
2763
2770
|
preview: i,
|
|
2764
|
-
children: /* @__PURE__ */ m(
|
|
2771
|
+
children: /* @__PURE__ */ m(z, { children: [/* @__PURE__ */ n(b, {
|
|
2765
2772
|
label: a("editor.colorPanel.borderSection.cornerRadius"),
|
|
2766
2773
|
children: /* @__PURE__ */ n(l, {
|
|
2767
2774
|
value: s,
|
|
2768
2775
|
min: 0,
|
|
2769
|
-
max:
|
|
2776
|
+
max: Kl,
|
|
2770
2777
|
step: 1,
|
|
2771
|
-
formatValue:
|
|
2778
|
+
formatValue: Te,
|
|
2772
2779
|
onChange: h,
|
|
2773
|
-
onCommit:
|
|
2780
|
+
onCommit: o.commands.seal
|
|
2774
2781
|
})
|
|
2775
|
-
}), /* @__PURE__ */ n(
|
|
2782
|
+
}), /* @__PURE__ */ n(b, {
|
|
2776
2783
|
label: a("editor.colorPanel.appearanceSection.highlightStyle"),
|
|
2777
2784
|
children: /* @__PURE__ */ n(c, {
|
|
2778
2785
|
value: u,
|
|
@@ -2781,31 +2788,31 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2781
2788
|
})
|
|
2782
2789
|
})] })
|
|
2783
2790
|
});
|
|
2784
|
-
},
|
|
2785
|
-
const { colorScheme: i } =
|
|
2786
|
-
return
|
|
2787
|
-
const
|
|
2788
|
-
return
|
|
2791
|
+
}, $e = (e, t) => {
|
|
2792
|
+
const { colorScheme: i } = Ve();
|
|
2793
|
+
return E(() => {
|
|
2794
|
+
const o = e?.layers.find((r) => r.id === t);
|
|
2795
|
+
return o === void 0 ? null : Jr({ colorScheme: i }).geomReaders(o);
|
|
2789
2796
|
}, [
|
|
2790
2797
|
e,
|
|
2791
2798
|
t,
|
|
2792
2799
|
i
|
|
2793
2800
|
]);
|
|
2794
|
-
},
|
|
2795
|
-
const
|
|
2796
|
-
if (!
|
|
2801
|
+
}, Ul = 0.05, Ac = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2802
|
+
const o = M(), r = _(o), a = I(), { Slider: l, ToggleGroup: c } = N(), s = r ? Nn(r.spec.layers, "bar") : void 0, u = $e(r, s?.id ?? null);
|
|
2803
|
+
if (!r || !s || r.coordSystem.type === "polar" && r.coordSystem.bandAxis === null) return null;
|
|
2797
2804
|
const d = (p) => {
|
|
2798
|
-
|
|
2805
|
+
o.commands.dispatch(new dr({
|
|
2799
2806
|
layerId: s.id,
|
|
2800
2807
|
width: p
|
|
2801
2808
|
}), { transient: !0 });
|
|
2802
2809
|
}, h = (p) => {
|
|
2803
|
-
const g =
|
|
2804
|
-
g &&
|
|
2810
|
+
const g = je.find((C) => C === p);
|
|
2811
|
+
g && o.commands.dispatch(new cr({
|
|
2805
2812
|
layerId: s.id,
|
|
2806
2813
|
borderRadius: g
|
|
2807
2814
|
}));
|
|
2808
|
-
}, v =
|
|
2815
|
+
}, v = je.map((p) => ({
|
|
2809
2816
|
value: p,
|
|
2810
2817
|
label: a(`editor.graphPanel.barSection.roundingOptions.${p}`)
|
|
2811
2818
|
}));
|
|
@@ -2813,95 +2820,336 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2813
2820
|
title: e ?? a("editor.graphPanel.barSection.title"),
|
|
2814
2821
|
layout: t,
|
|
2815
2822
|
preview: i,
|
|
2816
|
-
children: /* @__PURE__ */ m(
|
|
2823
|
+
children: /* @__PURE__ */ m(z, { children: [/* @__PURE__ */ n(b, {
|
|
2817
2824
|
label: a("editor.graphPanel.barSection.thickness"),
|
|
2818
2825
|
children: /* @__PURE__ */ n(l, {
|
|
2819
2826
|
value: s.params.width,
|
|
2820
|
-
min:
|
|
2821
|
-
max:
|
|
2822
|
-
step:
|
|
2823
|
-
formatValue:
|
|
2827
|
+
min: Jt,
|
|
2828
|
+
max: Qt,
|
|
2829
|
+
step: Ul,
|
|
2830
|
+
formatValue: pt,
|
|
2824
2831
|
onChange: d,
|
|
2825
|
-
onCommit:
|
|
2832
|
+
onCommit: o.commands.seal
|
|
2826
2833
|
})
|
|
2827
|
-
}), /* @__PURE__ */ n(
|
|
2834
|
+
}), /* @__PURE__ */ n(b, {
|
|
2828
2835
|
label: a("editor.graphPanel.barSection.rounding"),
|
|
2829
2836
|
layout: "stack",
|
|
2830
2837
|
children: /* @__PURE__ */ n(c, {
|
|
2831
|
-
value: u?.get("borderRadius") ??
|
|
2838
|
+
value: u?.get("borderRadius") ?? Xt,
|
|
2832
2839
|
options: v,
|
|
2833
2840
|
onChange: h
|
|
2834
2841
|
})
|
|
2835
2842
|
})] })
|
|
2836
2843
|
});
|
|
2837
|
-
},
|
|
2838
|
-
const
|
|
2844
|
+
}, Pe = ({ children: e }) => {
|
|
2845
|
+
const t = ae();
|
|
2846
|
+
return /* @__PURE__ */ m(G, { children: [/* @__PURE__ */ n("g", {
|
|
2847
|
+
filter: `url(#${t})`,
|
|
2848
|
+
children: e
|
|
2849
|
+
}), /* @__PURE__ */ n("defs", { children: /* @__PURE__ */ m("filter", {
|
|
2850
|
+
id: t,
|
|
2851
|
+
x: "-20%",
|
|
2852
|
+
y: "-20%",
|
|
2853
|
+
width: "140%",
|
|
2854
|
+
height: "140%",
|
|
2855
|
+
children: [/* @__PURE__ */ n("feDropShadow", {
|
|
2856
|
+
dx: "0",
|
|
2857
|
+
dy: "0",
|
|
2858
|
+
stdDeviation: "0.586",
|
|
2859
|
+
floodColor: "#0F0F18",
|
|
2860
|
+
floodOpacity: "0.12"
|
|
2861
|
+
}), /* @__PURE__ */ n("feDropShadow", {
|
|
2862
|
+
dx: "0",
|
|
2863
|
+
dy: "1.172",
|
|
2864
|
+
stdDeviation: "0.586",
|
|
2865
|
+
floodColor: "#0E0E34",
|
|
2866
|
+
floodOpacity: "0.16"
|
|
2867
|
+
})]
|
|
2868
|
+
}) })] });
|
|
2869
|
+
}, Ie = "qdaoth0", Wl = (e) => /* @__PURE__ */ m(T, {
|
|
2870
|
+
viewBox: "0 0 31 33",
|
|
2871
|
+
...e,
|
|
2872
|
+
children: [/* @__PURE__ */ n(Pe, { children: /* @__PURE__ */ n("path", {
|
|
2873
|
+
className: Ie,
|
|
2874
|
+
fillRule: "evenodd",
|
|
2875
|
+
clipRule: "evenodd",
|
|
2876
|
+
d: "M25.7417 6.23664C25.7417 6.09417 25.7076 5.95967 25.6471 5.84086C25.5633 5.67624 25.4288 5.54173 25.2641 5.4579C25.1453 5.39739 25.0108 5.36328 24.8684 5.36328H12.0591C11.5767 5.36328 11.1857 5.7543 11.1857 6.23664C11.1857 6.71899 11.5767 7.11 12.0591 7.11H22.7599L5.61908 24.2508C5.27801 24.5919 5.27801 25.1448 5.61908 25.4859C5.96015 25.827 6.51313 25.827 6.8542 25.4859L23.995 8.34513V19.0459C23.995 19.5283 24.386 19.9193 24.8684 19.9193C25.3507 19.9193 25.7417 19.5283 25.7417 19.0459V6.23664ZM20.995 15.5878V19.0459C20.995 21.1851 22.7292 22.9193 24.8684 22.9193C27.0076 22.9193 28.7417 21.1851 28.7417 19.0459V6.23664C28.7417 4.09744 27.0076 2.36328 24.8684 2.36328H12.0591C9.91985 2.36328 8.18569 4.09744 8.18569 6.23664C8.18569 8.37584 9.91985 10.11 12.0591 10.11H15.5172L3.49777 22.1295C1.98512 23.6421 1.98513 26.0946 3.49776 27.6072C5.0104 29.1199 7.46288 29.1199 8.97552 27.6072L20.995 15.5878Z"
|
|
2877
|
+
}) }), /* @__PURE__ */ n("path", {
|
|
2878
|
+
fill: "currentColor",
|
|
2879
|
+
d: "M12.0591 7.11C11.5767 7.11 11.1857 6.71899 11.1857 6.23664C11.1857 5.7543 11.5767 5.36328 12.0591 5.36328H24.8684C25.3507 5.36328 25.7417 5.7543 25.7417 6.23664V19.0459C25.7417 19.5283 25.3507 19.9193 24.8684 19.9193C24.386 19.9193 23.995 19.5283 23.995 19.0459V8.34512L6.8542 25.4859C6.51313 25.827 5.96015 25.827 5.61908 25.4859C5.27801 25.1448 5.27801 24.5919 5.61908 24.2508L22.7599 7.11H12.0591Z"
|
|
2880
|
+
})]
|
|
2881
|
+
}), Zl = (e) => /* @__PURE__ */ n(T, {
|
|
2882
|
+
viewBox: "0 0 32 32",
|
|
2883
|
+
...e,
|
|
2884
|
+
children: /* @__PURE__ */ m(Pe, { children: [/* @__PURE__ */ n("path", {
|
|
2885
|
+
className: Ie,
|
|
2886
|
+
d: "M11 21H21V11H11V21ZM29 23C29 26.3137 26.3137 29 23 29H9C5.68629 29 3 26.3137 3 23V9C3 5.68629 5.68629 3 9 3H23C26.3137 3 29 5.68629 29 9V23Z"
|
|
2887
|
+
}), /* @__PURE__ */ n("path", {
|
|
2888
|
+
fill: "currentColor",
|
|
2889
|
+
d: "M24.25 9C24.25 8.30964 23.6904 7.75 23 7.75H9C8.30964 7.75 7.75 8.30964 7.75 9V23C7.75 23.6904 8.30964 24.25 9 24.25H23C23.6904 24.25 24.25 23.6904 24.25 23V9ZM25.75 23C25.75 24.5188 24.5188 25.75 23 25.75H9C7.48122 25.75 6.25 24.5188 6.25 23V9C6.25 7.48122 7.48122 6.25 9 6.25H23C24.5188 6.25 25.75 7.48122 25.75 9V23Z"
|
|
2890
|
+
})] })
|
|
2891
|
+
}), ql = (e) => /* @__PURE__ */ m(T, {
|
|
2892
|
+
viewBox: "0 0 32 33",
|
|
2893
|
+
...e,
|
|
2894
|
+
children: [/* @__PURE__ */ n(Pe, { children: /* @__PURE__ */ n("path", {
|
|
2895
|
+
className: Ie,
|
|
2896
|
+
fillRule: "evenodd",
|
|
2897
|
+
clipRule: "evenodd",
|
|
2898
|
+
d: "M4.89961 14.7968C3.08522 13.5116 1.89961 11.3966 1.89961 9.00039C1.89961 5.07917 5.07839 1.90039 8.99961 1.90039C10.7798 1.90039 12.4069 2.55553 13.6531 3.63785C14.3179 3.17306 15.1269 2.90039 15.9996 2.90039L22.9996 2.90039C25.264 2.90039 27.0996 4.73602 27.0996 7.00039L27.0996 9.7243C27.5717 9.92414 28.014 10.2165 28.3987 10.6013C29.9999 12.2024 29.9999 14.7984 28.3987 16.3995L27.9182 16.8801C29.2628 18.172 30.0996 19.9885 30.0996 22.0004C30.0996 25.9216 26.9208 29.1004 22.9996 29.1004C21.2195 29.1004 19.5923 28.4453 18.3461 27.3629C17.6813 27.8277 16.8723 28.1004 15.9996 28.1004L8.99961 28.1004C6.73524 28.1004 4.89961 26.2648 4.89961 24.0004L4.89961 14.7968Z"
|
|
2899
|
+
}) }), /* @__PURE__ */ n("path", {
|
|
2900
|
+
fill: "currentColor",
|
|
2901
|
+
fillRule: "evenodd",
|
|
2902
|
+
clipRule: "evenodd",
|
|
2903
|
+
d: "M25.25 22C25.25 20.7574 24.2426 19.75 23 19.75C21.7574 19.75 20.75 20.7574 20.75 22C20.75 23.2426 21.7574 24.25 23 24.25C24.2426 24.25 25.25 23.2426 25.25 22ZM23 18.25C25.0711 18.25 26.75 19.9289 26.75 22C26.75 24.0711 25.0711 25.75 23 25.75C20.9289 25.75 19.25 24.0711 19.25 22C19.25 19.9289 20.9289 18.25 23 18.25ZM11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25C10.2426 11.25 11.25 10.2426 11.25 9ZM9.75 12.675C11.4617 12.3275 12.75 10.8142 12.75 9C12.75 6.92893 11.0711 5.25 9 5.25C6.92893 5.25 5.25 6.92893 5.25 9C5.25 10.8142 6.53832 12.3275 8.25 12.675L8.25 24C8.25 24.4142 8.58579 24.75 9 24.75L16 24.75C16.4142 24.75 16.75 24.4142 16.75 24L16.75 7.75L22.25 7.75L22.25 14.1893L21.0303 12.9697C20.7374 12.6768 20.2626 12.6768 19.9697 12.9697C19.6768 13.2626 19.6768 13.7374 19.9697 14.0303L22.4697 16.5303C22.7626 16.8232 23.2374 16.8232 23.5303 16.5303L26.0303 14.0303C26.3232 13.7374 26.3232 13.2626 26.0303 12.9697C25.7374 12.6768 25.2626 12.6768 24.9697 12.9697L23.75 14.1893L23.75 7C23.75 6.58579 23.4142 6.25 23 6.25L16 6.25C15.5858 6.25 15.25 6.58579 15.25 7L15.25 23.25L9.75 23.25L9.75 12.675Z"
|
|
2904
|
+
})]
|
|
2905
|
+
}), $l = (e) => /* @__PURE__ */ m(T, {
|
|
2906
|
+
viewBox: "0 0 32 33",
|
|
2907
|
+
...e,
|
|
2908
|
+
children: [/* @__PURE__ */ n(Pe, { children: /* @__PURE__ */ n("path", {
|
|
2909
|
+
className: Ie,
|
|
2910
|
+
d: "M20.7271 2C21.4372 2 21.7114 2.00463 22.0841 2.03504C22.8228 2.0954 23.4839 2.25122 24.1592 2.59527C25.1865 3.1188 26.0219 3.9541 26.5458 4.98208C26.8896 5.65706 27.0454 6.31812 27.1057 7.05672C27.1301 7.35469 27.1379 7.58979 27.14 8.03558L27.1408 9.10155C27.1408 11.2114 25.4304 12.922 23.3205 12.922C21.4083 12.922 19.8243 11.5172 19.5441 9.68336L19.538 9.64H18.39V21.687L20.0392 21.6877C22.149 21.6877 23.8595 23.398 23.8595 25.508C23.8595 27.6178 22.149 29.3283 20.0392 29.3283H9.10159C6.99169 29.3283 5.28127 27.6178 5.28127 25.508C5.28127 23.398 6.99172 21.6877 9.10159 21.6877L10.75 21.687V9.64H9.601L9.59661 9.68334C9.32609 11.4539 7.84018 12.8246 6.01692 12.917L5.82032 12.922C3.71035 12.922 2 11.2114 2 9.10155V8.41371C2 7.70349 2.00463 7.42929 2.03504 7.05674C2.09538 6.31803 2.25122 5.65681 2.59521 4.98173C3.11877 3.95419 3.95418 3.11876 4.98174 2.5952C5.65683 2.25122 6.31798 2.09539 7.057 2.03501C7.42935 2.00463 7.70354 2 8.41371 2H20.7271Z"
|
|
2911
|
+
}) }), /* @__PURE__ */ n("path", {
|
|
2912
|
+
fill: "currentColor",
|
|
2913
|
+
d: "M8.41371 5H20.7271C21.1595 5 21.5325 5 21.8398 5.02507C22.1641 5.05157 22.4867 5.11007 22.7971 5.26822C23.2601 5.50416 23.6366 5.88064 23.8726 6.3437C24.0307 6.65409 24.0892 6.97666 24.1157 7.30097C24.1408 7.60823 24.1408 7.98127 24.1408 8.41369V9.10155C24.1408 9.55465 23.7735 9.92195 23.3205 9.92195C22.8674 9.92195 22.5001 9.55465 22.5001 9.10155V8.44533C22.5001 7.97237 22.4995 7.66699 22.4805 7.43457C22.4623 7.21172 22.4314 7.12909 22.4107 7.08853C22.3321 6.93418 22.2066 6.80869 22.0522 6.73004C22.0117 6.70938 21.9291 6.67847 21.7062 6.66026C21.4738 6.64127 21.1684 6.64063 20.6954 6.64063H15.3907V24.6877H20.0392C20.4922 24.6877 20.8595 25.0549 20.8595 25.508C20.8595 25.961 20.4922 26.3283 20.0392 26.3283H9.10159C8.64854 26.3283 8.28127 25.961 8.28127 25.508C8.28127 25.0549 8.64854 24.6877 9.10159 24.6877H13.7501V6.64063H8.44533C7.97238 6.64063 7.66699 6.64127 7.43457 6.66026C7.21172 6.67847 7.1291 6.70938 7.08854 6.73004C6.93418 6.80869 6.80869 6.93418 6.73004 7.08853C6.70938 7.12909 6.67847 7.21172 6.66026 7.43457C6.64127 7.66699 6.64063 7.97237 6.64063 8.44533V9.10155C6.64063 9.55465 6.27337 9.92195 5.82032 9.92195C5.36727 9.92195 5 9.55465 5 9.10155V8.41371C5 7.98128 5 7.60823 5.02508 7.30097C5.05157 6.97666 5.11007 6.65409 5.26823 6.3437C5.50417 5.88064 5.88064 5.50416 6.3437 5.26822C6.65409 5.11007 6.97666 5.05157 7.30097 5.02507C7.60824 5 7.98129 5 8.41371 5Z"
|
|
2914
|
+
})]
|
|
2915
|
+
}), Xl = {
|
|
2916
|
+
x: 0.5,
|
|
2917
|
+
y: 0.5
|
|
2918
|
+
}, jl = 0.2, Yl = {
|
|
2919
|
+
x: 0.375,
|
|
2920
|
+
y: 0.25,
|
|
2921
|
+
width: 0.25,
|
|
2922
|
+
height: 0.5
|
|
2923
|
+
}, Ql = {
|
|
2924
|
+
fillColor: null,
|
|
2925
|
+
fillOpacity: 0.25,
|
|
2926
|
+
strokeWidth: 0,
|
|
2927
|
+
zOrder: "background"
|
|
2928
|
+
}, Jl = {
|
|
2929
|
+
x: 0.4,
|
|
2930
|
+
y: 0.6
|
|
2931
|
+
}, es = {
|
|
2932
|
+
x: 0.6,
|
|
2933
|
+
y: 0.4
|
|
2934
|
+
}, ns = "relative-difference", Oc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2935
|
+
const o = M(), r = _(o), a = I(), { Button: l } = N();
|
|
2936
|
+
if (!r) return null;
|
|
2937
|
+
const c = () => {
|
|
2938
|
+
o.commands.dispatch(new j({
|
|
2939
|
+
kind: "text",
|
|
2940
|
+
annotation: {
|
|
2941
|
+
...Vr,
|
|
2942
|
+
content: ts(a("editor.annotatePanel.callOutSection.text")),
|
|
2943
|
+
at: {
|
|
2944
|
+
anchorType: "panel",
|
|
2945
|
+
...Xl
|
|
2946
|
+
},
|
|
2947
|
+
width: jl
|
|
2948
|
+
}
|
|
2949
|
+
}));
|
|
2950
|
+
}, s = () => {
|
|
2951
|
+
o.commands.dispatch(new j({
|
|
2952
|
+
kind: "arrow",
|
|
2953
|
+
annotation: {
|
|
2954
|
+
...Zt,
|
|
2955
|
+
start: {
|
|
2956
|
+
anchorType: "panel",
|
|
2957
|
+
...Jl
|
|
2958
|
+
},
|
|
2959
|
+
end: {
|
|
2960
|
+
anchorType: "panel",
|
|
2961
|
+
...es
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
}));
|
|
2965
|
+
}, u = () => {
|
|
2966
|
+
o.commands.dispatch(new j({
|
|
2967
|
+
kind: "shape",
|
|
2968
|
+
annotation: {
|
|
2969
|
+
...nr,
|
|
2970
|
+
...Ql,
|
|
2971
|
+
region: {
|
|
2972
|
+
anchorType: "panel",
|
|
2973
|
+
...Yl
|
|
2974
|
+
}
|
|
2975
|
+
}
|
|
2976
|
+
}));
|
|
2977
|
+
}, d = () => {
|
|
2978
|
+
const v = ua(r);
|
|
2979
|
+
v !== null && o.commands.dispatch(new j({
|
|
2980
|
+
kind: "differenceArrow",
|
|
2981
|
+
annotation: {
|
|
2982
|
+
...In,
|
|
2983
|
+
...v,
|
|
2984
|
+
label: ns
|
|
2985
|
+
}
|
|
2986
|
+
}));
|
|
2987
|
+
}, h = r.coordSystem.type === "cartesian";
|
|
2988
|
+
return /* @__PURE__ */ n(D, {
|
|
2989
|
+
title: e ?? a("editor.annotatePanel.callOutSection.title"),
|
|
2990
|
+
layout: t,
|
|
2991
|
+
preview: i,
|
|
2992
|
+
children: /* @__PURE__ */ m(dt, { children: [
|
|
2993
|
+
/* @__PURE__ */ n(l, {
|
|
2994
|
+
variant: "tile",
|
|
2995
|
+
icon: /* @__PURE__ */ n($l, { size: "xl" }),
|
|
2996
|
+
label: a("editor.annotatePanel.callOutSection.text"),
|
|
2997
|
+
onClick: c
|
|
2998
|
+
}),
|
|
2999
|
+
/* @__PURE__ */ n(l, {
|
|
3000
|
+
variant: "tile",
|
|
3001
|
+
icon: /* @__PURE__ */ n(Wl, { size: "xl" }),
|
|
3002
|
+
label: a("editor.annotatePanel.callOutSection.arrow"),
|
|
3003
|
+
onClick: s
|
|
3004
|
+
}),
|
|
3005
|
+
/* @__PURE__ */ n(l, {
|
|
3006
|
+
variant: "tile",
|
|
3007
|
+
icon: /* @__PURE__ */ n(Zl, { size: "xl" }),
|
|
3008
|
+
label: a("editor.annotatePanel.callOutSection.box"),
|
|
3009
|
+
onClick: u
|
|
3010
|
+
}),
|
|
3011
|
+
h && /* @__PURE__ */ n(l, {
|
|
3012
|
+
variant: "tile",
|
|
3013
|
+
icon: /* @__PURE__ */ n(ql, { size: "xl" }),
|
|
3014
|
+
label: a("editor.annotatePanel.callOutSection.difference"),
|
|
3015
|
+
onClick: d
|
|
3016
|
+
})
|
|
3017
|
+
] })
|
|
3018
|
+
});
|
|
3019
|
+
}, ts = (e) => ({
|
|
3020
|
+
type: "doc",
|
|
3021
|
+
content: [{
|
|
3022
|
+
type: "paragraph",
|
|
3023
|
+
content: [{
|
|
3024
|
+
type: "text",
|
|
3025
|
+
text: e
|
|
3026
|
+
}]
|
|
3027
|
+
}]
|
|
3028
|
+
}), rs = 0.1, as = 20, Mc = ({ title: e, preview: t }) => {
|
|
3029
|
+
const i = M(), o = _(i), r = I(), { NumberField: a, TextField: l } = N();
|
|
3030
|
+
if (!o || o.coordSystem.type === "polar") return null;
|
|
3031
|
+
const c = aa(o.spec.layers), s = e ?? r("editor.annotationsPanel.goalSection.title"), u = na(c?.mapping.y), d = typeof u == "number" ? u : null, h = (g) => {
|
|
3032
|
+
const C = new Br({
|
|
3033
|
+
showGoalLine: g,
|
|
3034
|
+
value: os(o),
|
|
3035
|
+
...c !== void 0 && { layerId: c.id }
|
|
3036
|
+
});
|
|
3037
|
+
i.commands.dispatch(C);
|
|
3038
|
+
}, v = (g) => {
|
|
3039
|
+
if (c === void 0) return;
|
|
3040
|
+
const C = new Rr({
|
|
3041
|
+
layerId: c.id,
|
|
3042
|
+
label: g === "" ? null : g
|
|
3043
|
+
});
|
|
3044
|
+
i.commands.dispatch(C, { transient: !0 });
|
|
3045
|
+
}, p = (g) => {
|
|
3046
|
+
if (c === void 0 || g === null) return;
|
|
3047
|
+
const C = new Er({
|
|
3048
|
+
layerId: c.id,
|
|
3049
|
+
value: g
|
|
3050
|
+
});
|
|
3051
|
+
i.commands.dispatch(C, { transient: !0 });
|
|
3052
|
+
};
|
|
3053
|
+
return /* @__PURE__ */ n(Ol, {
|
|
3054
|
+
title: s,
|
|
3055
|
+
preview: t,
|
|
3056
|
+
isChecked: c !== void 0,
|
|
3057
|
+
onToggle: h,
|
|
3058
|
+
children: /* @__PURE__ */ m(z, { children: [/* @__PURE__ */ n(b, {
|
|
3059
|
+
label: r("editor.annotationsPanel.goalSection.labelControl"),
|
|
3060
|
+
children: /* @__PURE__ */ n(l, {
|
|
3061
|
+
value: c?.params.label ?? "",
|
|
3062
|
+
placeholder: r("editor.annotationsPanel.goalSection.labelPlaceholder"),
|
|
3063
|
+
onChange: v,
|
|
3064
|
+
onCommit: i.commands.seal,
|
|
3065
|
+
ariaLabel: r("editor.annotationsPanel.goalSection.labelAriaLabel")
|
|
3066
|
+
})
|
|
3067
|
+
}), /* @__PURE__ */ n(b, {
|
|
3068
|
+
label: r("editor.annotationsPanel.goalSection.valueControl"),
|
|
3069
|
+
children: /* @__PURE__ */ n(a, {
|
|
3070
|
+
value: d,
|
|
3071
|
+
placeholder: r("editor.powerUpPanel.valueInput.numberPlaceholder"),
|
|
3072
|
+
onChange: p,
|
|
3073
|
+
onCommit: i.commands.seal,
|
|
3074
|
+
ariaLabel: r("editor.annotationsPanel.goalSection.valueAriaLabel")
|
|
3075
|
+
})
|
|
3076
|
+
})] })
|
|
3077
|
+
});
|
|
3078
|
+
}, os = (e) => {
|
|
3079
|
+
const t = (e.scales.y?.domain ?? []).filter((l) => typeof l == "number");
|
|
3080
|
+
if (t.length === 0) return 0;
|
|
3081
|
+
const i = Math.max(...t), o = i - Math.min(...t), r = o > 0 ? o : Math.abs(i);
|
|
3082
|
+
if (r === 0) return 0;
|
|
3083
|
+
const a = Math.min(as, Math.max(0, 1 - Math.floor(Math.log10(r))));
|
|
3084
|
+
return Number((i + r * rs).toFixed(a));
|
|
3085
|
+
}, Nc = ({ layerId: e, title: t, layout: i = "collapsible", preview: o }) => {
|
|
3086
|
+
const r = M(), a = _(r), l = I(), { Switch: c } = N();
|
|
2839
3087
|
if (!a) return null;
|
|
2840
|
-
const s = e === void 0 ? a.spec.layers[0] : a.spec.layers.find((
|
|
3088
|
+
const s = e === void 0 ? a.spec.layers[0] : a.spec.layers.find((k) => k.id === e);
|
|
2841
3089
|
if (!s) return null;
|
|
2842
|
-
const { showDataLabels: u, format: d, showStackTotals: h, showCategoryLabels: v } = s.dataLabels, p = a.coordSystem.type === "polar", g = s.geom === "bar",
|
|
2843
|
-
if (!
|
|
2844
|
-
const x = (
|
|
2845
|
-
const
|
|
3090
|
+
const { showDataLabels: u, format: d, showStackTotals: h, showCategoryLabels: v } = s.dataLabels, p = a.coordSystem.type === "polar", g = s.geom === "bar", C = s.position === "stack" || s.position === "fill", P = g && !p && s.position === "stack", y = g && (!p || u), f = g || s.geom === "area" && C;
|
|
3091
|
+
if (!Yr(s.geom, a.coordSystem.type)) return null;
|
|
3092
|
+
const x = (k) => {
|
|
3093
|
+
const F = new Fr({
|
|
2846
3094
|
layerId: s.id,
|
|
2847
|
-
showDataLabels:
|
|
3095
|
+
showDataLabels: k
|
|
2848
3096
|
});
|
|
2849
|
-
|
|
2850
|
-
},
|
|
2851
|
-
const
|
|
3097
|
+
r.commands.dispatch(F);
|
|
3098
|
+
}, L = (k) => {
|
|
3099
|
+
const F = new vr({
|
|
2852
3100
|
layerId: s.id,
|
|
2853
|
-
format:
|
|
3101
|
+
format: k ? "percentage" : "absolute"
|
|
2854
3102
|
});
|
|
2855
|
-
|
|
2856
|
-
},
|
|
2857
|
-
const
|
|
3103
|
+
r.commands.dispatch(F);
|
|
3104
|
+
}, A = (k) => {
|
|
3105
|
+
const F = new Ur({
|
|
2858
3106
|
layerId: s.id,
|
|
2859
|
-
showStackTotals:
|
|
3107
|
+
showStackTotals: k
|
|
2860
3108
|
});
|
|
2861
|
-
|
|
2862
|
-
},
|
|
2863
|
-
const
|
|
3109
|
+
r.commands.dispatch(F);
|
|
3110
|
+
}, H = (k) => {
|
|
3111
|
+
const F = new zr({
|
|
2864
3112
|
layerId: s.id,
|
|
2865
|
-
showCategoryLabels:
|
|
3113
|
+
showCategoryLabels: k
|
|
2866
3114
|
});
|
|
2867
|
-
|
|
3115
|
+
r.commands.dispatch(F);
|
|
2868
3116
|
};
|
|
2869
3117
|
return /* @__PURE__ */ n(D, {
|
|
2870
3118
|
title: t ?? l("editor.graphPanel.graphOptionsSection.title"),
|
|
2871
3119
|
layout: i,
|
|
2872
|
-
preview:
|
|
2873
|
-
children: /* @__PURE__ */ m(
|
|
2874
|
-
/* @__PURE__ */ n(
|
|
3120
|
+
preview: o,
|
|
3121
|
+
children: /* @__PURE__ */ m(z, { children: [
|
|
3122
|
+
/* @__PURE__ */ n(b, {
|
|
2875
3123
|
label: l("editor.graphPanel.graphOptions.dataLabels"),
|
|
2876
3124
|
children: /* @__PURE__ */ n(c, {
|
|
2877
3125
|
isChecked: u,
|
|
2878
3126
|
onChange: x
|
|
2879
3127
|
})
|
|
2880
3128
|
}),
|
|
2881
|
-
u && f && /* @__PURE__ */ n(
|
|
3129
|
+
u && f && /* @__PURE__ */ n(b, {
|
|
2882
3130
|
label: l("editor.graphPanel.graphOptions.showPercentages"),
|
|
2883
3131
|
children: /* @__PURE__ */ n(c, {
|
|
2884
3132
|
isChecked: d === "percentage",
|
|
2885
|
-
onChange:
|
|
3133
|
+
onChange: L
|
|
2886
3134
|
})
|
|
2887
3135
|
}),
|
|
2888
|
-
P && /* @__PURE__ */ n(
|
|
3136
|
+
P && /* @__PURE__ */ n(b, {
|
|
2889
3137
|
label: l("editor.graphPanel.graphOptions.stackTotals"),
|
|
2890
3138
|
children: /* @__PURE__ */ n(c, {
|
|
2891
3139
|
isChecked: h,
|
|
2892
|
-
onChange:
|
|
3140
|
+
onChange: A
|
|
2893
3141
|
})
|
|
2894
3142
|
}),
|
|
2895
|
-
y && /* @__PURE__ */ n(
|
|
3143
|
+
y && /* @__PURE__ */ n(b, {
|
|
2896
3144
|
label: l("editor.graphPanel.graphOptions.categoryLabels"),
|
|
2897
3145
|
children: /* @__PURE__ */ n(c, {
|
|
2898
3146
|
isChecked: v,
|
|
2899
|
-
onChange:
|
|
3147
|
+
onChange: H
|
|
2900
3148
|
})
|
|
2901
3149
|
})
|
|
2902
3150
|
] })
|
|
2903
3151
|
});
|
|
2904
|
-
},
|
|
3152
|
+
}, is = (e) => /* @__PURE__ */ m(T, {
|
|
2905
3153
|
viewBox: "0 0 16 16",
|
|
2906
3154
|
...e,
|
|
2907
3155
|
children: [/* @__PURE__ */ n("path", {
|
|
@@ -2913,7 +3161,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2913
3161
|
fillOpacity: "0.3",
|
|
2914
3162
|
d: "M5.744 5.565 0 11.826V8l5.744-6.957 4.718 2.087L16 0v6.957l-5.538 4z"
|
|
2915
3163
|
})]
|
|
2916
|
-
}),
|
|
3164
|
+
}), ls = (e) => /* @__PURE__ */ n(T, {
|
|
2917
3165
|
viewBox: "0 0 16 16",
|
|
2918
3166
|
...e,
|
|
2919
3167
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -2955,7 +3203,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2955
3203
|
})
|
|
2956
3204
|
]
|
|
2957
3205
|
})
|
|
2958
|
-
}),
|
|
3206
|
+
}), ss = (e) => /* @__PURE__ */ n(T, {
|
|
2959
3207
|
viewBox: "0 0 16 16",
|
|
2960
3208
|
...e,
|
|
2961
3209
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -2970,7 +3218,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2970
3218
|
d: "M0 12.445h4.267V.52A.52.52 0 0 0 3.748 0H.518A.52.52 0 0 0 0 .519zM5.867 7.111h4.266V.52A.52.52 0 0 0 9.615 0h-3.23a.52.52 0 0 0-.518.519zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
2971
3219
|
})]
|
|
2972
3220
|
})
|
|
2973
|
-
}),
|
|
3221
|
+
}), cs = (e) => /* @__PURE__ */ n(T, {
|
|
2974
3222
|
viewBox: "0 0 16 16",
|
|
2975
3223
|
...e,
|
|
2976
3224
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -2985,7 +3233,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2985
3233
|
d: "M0 7.037c0-.286.232-.518.519-.518h3.23c.286 0 .518.232.518.518v5.408H0zM5.867 7.111h4.266V4.074a.52.52 0 0 0-.518-.518h-3.23a.52.52 0 0 0-.518.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
2986
3234
|
})]
|
|
2987
3235
|
})
|
|
2988
|
-
}),
|
|
3236
|
+
}), ds = (e) => /* @__PURE__ */ m(T, {
|
|
2989
3237
|
viewBox: "0 0 16 16",
|
|
2990
3238
|
...e,
|
|
2991
3239
|
children: [
|
|
@@ -3024,7 +3272,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3024
3272
|
rx: ".533"
|
|
3025
3273
|
})
|
|
3026
3274
|
]
|
|
3027
|
-
}),
|
|
3275
|
+
}), hs = (e) => /* @__PURE__ */ m(T, {
|
|
3028
3276
|
viewBox: "0 0 16 16",
|
|
3029
3277
|
...e,
|
|
3030
3278
|
children: [/* @__PURE__ */ n("path", {
|
|
@@ -3036,7 +3284,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3036
3284
|
fillOpacity: "0.3",
|
|
3037
3285
|
d: "M0 12.445h4.267V.52A.52.52 0 0 0 3.748 0H.518A.52.52 0 0 0 0 .519zM5.867 7.111h4.266V.52A.52.52 0 0 0 9.615 0h-3.23a.52.52 0 0 0-.518.519zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
3038
3286
|
})]
|
|
3039
|
-
}),
|
|
3287
|
+
}), us = (e) => /* @__PURE__ */ m(T, {
|
|
3040
3288
|
viewBox: "0 0 16 16",
|
|
3041
3289
|
...e,
|
|
3042
3290
|
children: [/* @__PURE__ */ n("path", {
|
|
@@ -3048,7 +3296,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3048
3296
|
fillOpacity: "0.3",
|
|
3049
3297
|
d: "M0 7.037c0-.286.232-.518.519-.518h3.23c.286 0 .518.232.518.518v5.408H0zM5.867 7.111h4.266V4.074a.52.52 0 0 0-.518-.518h-3.23a.52.52 0 0 0-.518.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
3050
3298
|
})]
|
|
3051
|
-
}),
|
|
3299
|
+
}), ms = (e) => /* @__PURE__ */ n(T, {
|
|
3052
3300
|
viewBox: "0 0 16 16",
|
|
3053
3301
|
...e,
|
|
3054
3302
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -3083,7 +3331,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3083
3331
|
})
|
|
3084
3332
|
]
|
|
3085
3333
|
})
|
|
3086
|
-
}),
|
|
3334
|
+
}), ps = (e) => /* @__PURE__ */ n(T, {
|
|
3087
3335
|
viewBox: "0 0 16 16",
|
|
3088
3336
|
...e,
|
|
3089
3337
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -3160,7 +3408,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3160
3408
|
]
|
|
3161
3409
|
})]
|
|
3162
3410
|
})
|
|
3163
|
-
}),
|
|
3411
|
+
}), gs = (e) => /* @__PURE__ */ m(T, {
|
|
3164
3412
|
viewBox: "0 0 16 16",
|
|
3165
3413
|
...e,
|
|
3166
3414
|
children: [
|
|
@@ -3182,7 +3430,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3182
3430
|
d: "M15.999 8a8 8 0 0 1-7.588 7.989l-.412.01V8z"
|
|
3183
3431
|
})
|
|
3184
3432
|
]
|
|
3185
|
-
}),
|
|
3433
|
+
}), vs = (e) => /* @__PURE__ */ n(T, {
|
|
3186
3434
|
viewBox: "0 0 16 16",
|
|
3187
3435
|
...e,
|
|
3188
3436
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -3226,10 +3474,10 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3226
3474
|
})
|
|
3227
3475
|
]
|
|
3228
3476
|
})
|
|
3229
|
-
}),
|
|
3477
|
+
}), Cs = 0.55, Ee = [
|
|
3230
3478
|
{
|
|
3231
3479
|
name: "column",
|
|
3232
|
-
icon:
|
|
3480
|
+
icon: ds,
|
|
3233
3481
|
summary: {
|
|
3234
3482
|
coordType: "cartesian",
|
|
3235
3483
|
geom: "bar",
|
|
@@ -3238,7 +3486,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3238
3486
|
},
|
|
3239
3487
|
{
|
|
3240
3488
|
name: "columnStacked",
|
|
3241
|
-
icon:
|
|
3489
|
+
icon: us,
|
|
3242
3490
|
summary: {
|
|
3243
3491
|
coordType: "cartesian",
|
|
3244
3492
|
geom: "bar",
|
|
@@ -3247,7 +3495,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3247
3495
|
},
|
|
3248
3496
|
{
|
|
3249
3497
|
name: "columnStackedFill",
|
|
3250
|
-
icon:
|
|
3498
|
+
icon: hs,
|
|
3251
3499
|
summary: {
|
|
3252
3500
|
coordType: "cartesian",
|
|
3253
3501
|
geom: "bar",
|
|
@@ -3256,7 +3504,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3256
3504
|
},
|
|
3257
3505
|
{
|
|
3258
3506
|
name: "bar",
|
|
3259
|
-
icon:
|
|
3507
|
+
icon: ls,
|
|
3260
3508
|
summary: {
|
|
3261
3509
|
coordType: "flip",
|
|
3262
3510
|
geom: "bar",
|
|
@@ -3265,7 +3513,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3265
3513
|
},
|
|
3266
3514
|
{
|
|
3267
3515
|
name: "barStacked",
|
|
3268
|
-
icon:
|
|
3516
|
+
icon: cs,
|
|
3269
3517
|
summary: {
|
|
3270
3518
|
coordType: "flip",
|
|
3271
3519
|
geom: "bar",
|
|
@@ -3274,7 +3522,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3274
3522
|
},
|
|
3275
3523
|
{
|
|
3276
3524
|
name: "barStackedFill",
|
|
3277
|
-
icon:
|
|
3525
|
+
icon: ss,
|
|
3278
3526
|
summary: {
|
|
3279
3527
|
coordType: "flip",
|
|
3280
3528
|
geom: "bar",
|
|
@@ -3283,7 +3531,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3283
3531
|
},
|
|
3284
3532
|
{
|
|
3285
3533
|
name: "line",
|
|
3286
|
-
icon:
|
|
3534
|
+
icon: ps,
|
|
3287
3535
|
summary: {
|
|
3288
3536
|
coordType: "cartesian",
|
|
3289
3537
|
geom: "line",
|
|
@@ -3292,7 +3540,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3292
3540
|
},
|
|
3293
3541
|
{
|
|
3294
3542
|
name: "areaStacked",
|
|
3295
|
-
icon:
|
|
3543
|
+
icon: is,
|
|
3296
3544
|
summary: {
|
|
3297
3545
|
coordType: "cartesian",
|
|
3298
3546
|
geom: "area",
|
|
@@ -3301,7 +3549,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3301
3549
|
},
|
|
3302
3550
|
{
|
|
3303
3551
|
name: "scatter",
|
|
3304
|
-
icon:
|
|
3552
|
+
icon: vs,
|
|
3305
3553
|
summary: {
|
|
3306
3554
|
coordType: "cartesian",
|
|
3307
3555
|
geom: "point",
|
|
@@ -3310,7 +3558,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3310
3558
|
},
|
|
3311
3559
|
{
|
|
3312
3560
|
name: "pie",
|
|
3313
|
-
icon:
|
|
3561
|
+
icon: gs,
|
|
3314
3562
|
summary: {
|
|
3315
3563
|
coordType: "polar",
|
|
3316
3564
|
geom: "bar",
|
|
@@ -3321,31 +3569,31 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3321
3569
|
},
|
|
3322
3570
|
{
|
|
3323
3571
|
name: "donut",
|
|
3324
|
-
icon:
|
|
3572
|
+
icon: ms,
|
|
3325
3573
|
summary: {
|
|
3326
3574
|
coordType: "polar",
|
|
3327
3575
|
geom: "bar",
|
|
3328
3576
|
position: "fill",
|
|
3329
3577
|
theta: "y",
|
|
3330
|
-
innerRadius:
|
|
3578
|
+
innerRadius: Cs
|
|
3331
3579
|
}
|
|
3332
3580
|
}
|
|
3333
|
-
],
|
|
3581
|
+
], fs = 0.05, bs = (e) => e === null ? null : Ee.find((t) => Ss(t.summary, e)) ?? null, ys = (e, t) => {
|
|
3334
3582
|
const { summary: i } = e;
|
|
3335
|
-
return i.coordType !== "polar" || !
|
|
3583
|
+
return i.coordType !== "polar" || !Se(i.innerRadius) || t === null || t.coordType !== "polar" || !Se(t.innerRadius) ? i : {
|
|
3336
3584
|
...i,
|
|
3337
3585
|
innerRadius: t.innerRadius
|
|
3338
3586
|
};
|
|
3339
|
-
},
|
|
3340
|
-
const
|
|
3587
|
+
}, Ss = (e, t) => e.coordType !== t.coordType || e.geom !== t.geom || e.position !== t.position ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && Se(e.innerRadius) === Se(t.innerRadius), Se = (e) => e >= fs, ws = 3, kc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3588
|
+
const o = M(), r = _(o), a = I(), { RadioGrid: l } = N(), c = E(() => Ee.map(({ name: h, icon: v }) => ({
|
|
3341
3589
|
value: h,
|
|
3342
3590
|
label: a(`editor.graphTypes.${h}`),
|
|
3343
3591
|
icon: /* @__PURE__ */ n(v, { size: "md" })
|
|
3344
3592
|
})), [a]);
|
|
3345
|
-
if (!
|
|
3346
|
-
const s =
|
|
3347
|
-
const v =
|
|
3348
|
-
v &&
|
|
3593
|
+
if (!r) return null;
|
|
3594
|
+
const s = Ca(r.spec), u = bs(s), d = (h) => {
|
|
3595
|
+
const v = Ee.find((p) => p.name === h);
|
|
3596
|
+
v && o.commands.dispatch(new hr(ys(v, s)));
|
|
3349
3597
|
};
|
|
3350
3598
|
return /* @__PURE__ */ n(D, {
|
|
3351
3599
|
title: e ?? a("editor.graphPanel.graphTypeSection.title"),
|
|
@@ -3354,36 +3602,36 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3354
3602
|
children: /* @__PURE__ */ n(l, {
|
|
3355
3603
|
value: u?.name ?? "",
|
|
3356
3604
|
options: c,
|
|
3357
|
-
columns:
|
|
3605
|
+
columns: ws,
|
|
3358
3606
|
onChange: d,
|
|
3359
3607
|
ariaLabel: a("editor.graphPanel.graphTypeSection.title")
|
|
3360
3608
|
})
|
|
3361
3609
|
});
|
|
3362
|
-
},
|
|
3610
|
+
}, Cn = [
|
|
3363
3611
|
"solid",
|
|
3364
3612
|
"dashed",
|
|
3365
3613
|
"dotted"
|
|
3366
|
-
],
|
|
3367
|
-
const
|
|
3368
|
-
if (!
|
|
3369
|
-
const d =
|
|
3614
|
+
], xs = Number.parseFloat(Ht.gridLineWidth), Ls = 8, Ts = 0, Rc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3615
|
+
const o = M(), r = _(o), a = I(), { Slider: l, Switch: c, ToggleGroup: s } = N(), { themeValues: u } = Ve();
|
|
3616
|
+
if (!r) return null;
|
|
3617
|
+
const d = r.guides.axes.filter(Ps);
|
|
3370
3618
|
if (d.length === 0) return null;
|
|
3371
|
-
const h =
|
|
3619
|
+
const h = r.coordSystem.type !== "polar", v = d.some((f) => f.gridVisible), p = r.config.axes.y.grid, g = Cn.map((f) => ({
|
|
3372
3620
|
value: f,
|
|
3373
3621
|
label: a(`editor.graphPanel.gridSection.lineStyles.${f}`)
|
|
3374
|
-
})),
|
|
3375
|
-
|
|
3622
|
+
})), C = (f) => (x) => {
|
|
3623
|
+
o.commands.dispatch(new br({
|
|
3376
3624
|
axis: f,
|
|
3377
3625
|
isVisible: x
|
|
3378
3626
|
}));
|
|
3379
3627
|
}, P = (f) => {
|
|
3380
|
-
const x =
|
|
3381
|
-
x &&
|
|
3628
|
+
const x = Cn.find((L) => L === f);
|
|
3629
|
+
x && o.commands.dispatch(new Cr({
|
|
3382
3630
|
axis: "both",
|
|
3383
3631
|
lineStyle: x
|
|
3384
3632
|
}));
|
|
3385
3633
|
}, y = (f) => {
|
|
3386
|
-
|
|
3634
|
+
o.commands.dispatch(new fr({
|
|
3387
3635
|
axis: "both",
|
|
3388
3636
|
lineWidth: f
|
|
3389
3637
|
}), { transient: !0 });
|
|
@@ -3392,328 +3640,328 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3392
3640
|
title: e ?? a("editor.graphPanel.gridSection.title"),
|
|
3393
3641
|
layout: t,
|
|
3394
3642
|
preview: i,
|
|
3395
|
-
children: /* @__PURE__ */ m(
|
|
3396
|
-
label: a(
|
|
3643
|
+
children: /* @__PURE__ */ m(z, { children: [d.map((f) => /* @__PURE__ */ n(b, {
|
|
3644
|
+
label: a(Is(f)),
|
|
3397
3645
|
children: /* @__PURE__ */ n(c, {
|
|
3398
3646
|
isChecked: f.gridVisible,
|
|
3399
|
-
onChange:
|
|
3647
|
+
onChange: C(f.scaleAestheticKey)
|
|
3400
3648
|
})
|
|
3401
|
-
}, f.scaleAestheticKey)), h && v && /* @__PURE__ */ m(
|
|
3649
|
+
}, f.scaleAestheticKey)), h && v && /* @__PURE__ */ m(G, { children: [/* @__PURE__ */ n(b, {
|
|
3402
3650
|
label: a("editor.graphPanel.gridSection.gridStyle"),
|
|
3403
3651
|
children: /* @__PURE__ */ n(s, {
|
|
3404
3652
|
value: p.lineStyle,
|
|
3405
3653
|
options: g,
|
|
3406
3654
|
onChange: P
|
|
3407
3655
|
})
|
|
3408
|
-
}), /* @__PURE__ */ n(
|
|
3656
|
+
}), /* @__PURE__ */ n(b, {
|
|
3409
3657
|
label: a("editor.graphPanel.gridSection.gridThickness"),
|
|
3410
3658
|
children: /* @__PURE__ */ n(l, {
|
|
3411
|
-
value: p.lineWidth ??
|
|
3412
|
-
min:
|
|
3413
|
-
max:
|
|
3659
|
+
value: p.lineWidth ?? _t(u.gridLineWidth, xs),
|
|
3660
|
+
min: Ts,
|
|
3661
|
+
max: Ls,
|
|
3414
3662
|
step: 0.5,
|
|
3415
|
-
formatValue:
|
|
3663
|
+
formatValue: Te,
|
|
3416
3664
|
onChange: y,
|
|
3417
|
-
onCommit:
|
|
3665
|
+
onCommit: o.commands.seal
|
|
3418
3666
|
})
|
|
3419
3667
|
})] })] })
|
|
3420
3668
|
});
|
|
3421
|
-
},
|
|
3669
|
+
}, Ps = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", Is = (e) => e.geometry === "radial" ? "editor.graphPanel.gridSection.rings" : e.geometry === "circular" ? "editor.graphPanel.gridSection.spokes" : e.scaleAestheticKey === "x" ? "editor.graphPanel.gridSection.verticalGridLines" : "editor.graphPanel.gridSection.horizontalGridLines", As = "total", gt = [
|
|
3422
3670
|
"total",
|
|
3423
3671
|
"average",
|
|
3424
3672
|
"current"
|
|
3425
|
-
],
|
|
3673
|
+
], Os = ["total"], fn = ["previous", "first"], bn = [
|
|
3426
3674
|
"auto",
|
|
3427
3675
|
"small",
|
|
3428
3676
|
"medium",
|
|
3429
3677
|
"large"
|
|
3430
|
-
],
|
|
3431
|
-
const
|
|
3432
|
-
if (!
|
|
3433
|
-
const s =
|
|
3678
|
+
], Ec = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3679
|
+
const o = M(), r = _(o), a = I(), { Switch: l, ToggleGroup: c } = N();
|
|
3680
|
+
if (!r) return null;
|
|
3681
|
+
const s = r.config.headline, u = s.show !== "none", d = r.coordSystem, h = d.type === "polar", v = d.type === "polar" && d.innerRadius > 0, p = r.layers.some((w) => w.summary.grandTotal !== void 0);
|
|
3434
3682
|
if (h && !p) return null;
|
|
3435
|
-
const g = h ?
|
|
3683
|
+
const g = h ? Os : gt, C = r.guides.headline, P = C?.kind === "perGroup" && C.items.some((w) => w.comparison !== null), y = g.map((w) => ({
|
|
3436
3684
|
value: w,
|
|
3437
3685
|
label: a(`editor.graphPanel.headlineNumberSection.metrics.${w}`)
|
|
3438
|
-
})), f =
|
|
3686
|
+
})), f = fn.map((w) => ({
|
|
3439
3687
|
value: w,
|
|
3440
3688
|
label: a(`editor.graphPanel.headlineNumberSection.comparison.${w}`)
|
|
3441
|
-
})), x =
|
|
3689
|
+
})), x = bn.map((w) => ({
|
|
3442
3690
|
value: w,
|
|
3443
3691
|
label: a(w === "auto" ? "editor.graphPanel.numberFormat.options.auto" : `editor.graphPanel.headlineNumberSize.sizes.${w}`)
|
|
3444
|
-
})),
|
|
3692
|
+
})), L = [{
|
|
3445
3693
|
value: "above",
|
|
3446
3694
|
label: a("editor.graphPanel.headlineNumberSection.position.above")
|
|
3447
3695
|
}, {
|
|
3448
3696
|
value: "center",
|
|
3449
3697
|
label: a("editor.graphPanel.headlineNumberSection.position.center")
|
|
3450
|
-
}],
|
|
3451
|
-
|
|
3452
|
-
}, B = (w) => {
|
|
3453
|
-
const O = g.find((Q) => Q === w);
|
|
3454
|
-
O && r.commands.dispatch(new je({ show: O }));
|
|
3455
|
-
}, N = (w) => {
|
|
3456
|
-
const O = vn.find((Q) => Q === w);
|
|
3457
|
-
O && r.commands.dispatch(new mr({ compareWith: O }));
|
|
3698
|
+
}], A = (w) => {
|
|
3699
|
+
o.commands.dispatch(new Ye({ show: w ? As : "none" }));
|
|
3458
3700
|
}, H = (w) => {
|
|
3459
|
-
const
|
|
3460
|
-
|
|
3461
|
-
},
|
|
3462
|
-
|
|
3701
|
+
const R = g.find((J) => J === w);
|
|
3702
|
+
R && o.commands.dispatch(new Ye({ show: R }));
|
|
3703
|
+
}, k = (w) => {
|
|
3704
|
+
const R = fn.find((J) => J === w);
|
|
3705
|
+
R && o.commands.dispatch(new yr({ compareWith: R }));
|
|
3706
|
+
}, F = (w) => {
|
|
3707
|
+
const R = bn.find((J) => J === w);
|
|
3708
|
+
R && o.commands.dispatch(new wr({ size: R }));
|
|
3709
|
+
}, O = (w) => {
|
|
3710
|
+
o.commands.dispatch(new Sr({ position: w === "center" ? "center" : "above" }));
|
|
3463
3711
|
};
|
|
3464
3712
|
return /* @__PURE__ */ n(D, {
|
|
3465
3713
|
title: e ?? a("editor.graphPanel.headlineNumberSection.title"),
|
|
3466
3714
|
layout: t,
|
|
3467
|
-
preview: i ??
|
|
3468
|
-
children: /* @__PURE__ */ m(
|
|
3715
|
+
preview: i ?? Ms(a, s.show),
|
|
3716
|
+
children: /* @__PURE__ */ m(z, { children: [/* @__PURE__ */ n(b, {
|
|
3469
3717
|
label: a("editor.graphPanel.headlineNumberSection.toggle"),
|
|
3470
3718
|
children: /* @__PURE__ */ n(l, {
|
|
3471
3719
|
isChecked: u,
|
|
3472
|
-
onChange:
|
|
3720
|
+
onChange: A
|
|
3473
3721
|
})
|
|
3474
|
-
}), u && /* @__PURE__ */ m(
|
|
3475
|
-
y.length > 1 && /* @__PURE__ */ n(
|
|
3722
|
+
}), u && /* @__PURE__ */ m(G, { children: [
|
|
3723
|
+
y.length > 1 && /* @__PURE__ */ n(b, {
|
|
3476
3724
|
label: a("editor.graphPanel.headlineNumberSection.metricLabel"),
|
|
3477
3725
|
layout: "stack",
|
|
3478
3726
|
children: /* @__PURE__ */ n(c, {
|
|
3479
3727
|
value: s.show,
|
|
3480
3728
|
options: y,
|
|
3481
|
-
onChange:
|
|
3729
|
+
onChange: H
|
|
3482
3730
|
})
|
|
3483
3731
|
}),
|
|
3484
|
-
P && /* @__PURE__ */ n(
|
|
3732
|
+
P && /* @__PURE__ */ n(b, {
|
|
3485
3733
|
label: a("editor.graphPanel.headlineNumberSection.compareWithLabel"),
|
|
3486
3734
|
layout: "stack",
|
|
3487
3735
|
children: /* @__PURE__ */ n(c, {
|
|
3488
|
-
value:
|
|
3736
|
+
value: ba(s.compareWith),
|
|
3489
3737
|
options: f,
|
|
3490
|
-
onChange:
|
|
3738
|
+
onChange: k
|
|
3491
3739
|
})
|
|
3492
3740
|
}),
|
|
3493
|
-
/* @__PURE__ */ n(
|
|
3741
|
+
/* @__PURE__ */ n(b, {
|
|
3494
3742
|
label: a("editor.graphPanel.headlineNumberSize.sizeLabel"),
|
|
3495
3743
|
children: /* @__PURE__ */ n(c, {
|
|
3496
3744
|
value: s.size,
|
|
3497
3745
|
options: x,
|
|
3498
|
-
onChange:
|
|
3746
|
+
onChange: F
|
|
3499
3747
|
})
|
|
3500
3748
|
}),
|
|
3501
|
-
v && /* @__PURE__ */ n(
|
|
3749
|
+
v && /* @__PURE__ */ n(b, {
|
|
3502
3750
|
label: a("editor.axesPanel.controls.position"),
|
|
3503
3751
|
children: /* @__PURE__ */ n(c, {
|
|
3504
3752
|
value: s.position,
|
|
3505
|
-
options:
|
|
3506
|
-
onChange:
|
|
3753
|
+
options: L,
|
|
3754
|
+
onChange: O
|
|
3507
3755
|
})
|
|
3508
3756
|
})
|
|
3509
3757
|
] })] })
|
|
3510
3758
|
});
|
|
3511
|
-
},
|
|
3512
|
-
const i =
|
|
3759
|
+
}, Ms = (e, t) => {
|
|
3760
|
+
const i = gt.find((o) => o === t);
|
|
3513
3761
|
return i && e(`editor.graphPanel.headlineNumberSection.metrics.${i}`);
|
|
3514
|
-
},
|
|
3762
|
+
}, Oe = [
|
|
3515
3763
|
"top",
|
|
3516
3764
|
"bottom",
|
|
3517
3765
|
"left",
|
|
3518
3766
|
"right",
|
|
3519
3767
|
"none"
|
|
3520
|
-
],
|
|
3768
|
+
], yn = [
|
|
3521
3769
|
"auto",
|
|
3522
3770
|
"start",
|
|
3523
3771
|
"center",
|
|
3524
3772
|
"end"
|
|
3525
|
-
],
|
|
3773
|
+
], Sn = [
|
|
3526
3774
|
"auto",
|
|
3527
3775
|
"pill",
|
|
3528
3776
|
"direct"
|
|
3529
|
-
],
|
|
3530
|
-
const
|
|
3777
|
+
], _c = ({ positions: e, title: t, layout: i = "collapsible", preview: o }) => {
|
|
3778
|
+
const r = M(), a = _(r), l = I(), { ToggleGroup: c } = N();
|
|
3531
3779
|
if (!a) return null;
|
|
3532
|
-
const s = a.config.legend.position, u = e ??
|
|
3780
|
+
const s = a.config.legend.position, u = e ?? Oe, d = a.guides.legends.drawn[0], h = jr({
|
|
3533
3781
|
legendPosition: a.guides.legends.position,
|
|
3534
3782
|
coordSystem: a.coordSystem,
|
|
3535
3783
|
layers: a.layers
|
|
3536
3784
|
}), v = a.guides.headline?.kind === "perGroup", p = a.guides.colorGroups.length > 0;
|
|
3537
3785
|
if (s === "auto" && d === void 0 && !h && (v || !p)) return null;
|
|
3538
|
-
const g = d?.position ?? "none",
|
|
3539
|
-
value:
|
|
3540
|
-
label: l(`editor.graphPanel.legendSection.${
|
|
3541
|
-
})), y = (
|
|
3542
|
-
const w =
|
|
3543
|
-
w &&
|
|
3544
|
-
}, f = (
|
|
3545
|
-
const w =
|
|
3546
|
-
w &&
|
|
3547
|
-
}, x = (
|
|
3548
|
-
const w =
|
|
3549
|
-
w &&
|
|
3550
|
-
},
|
|
3551
|
-
value:
|
|
3552
|
-
label: l(`editor.graphPanel.legendSection.align.${
|
|
3553
|
-
})),
|
|
3554
|
-
value:
|
|
3555
|
-
label: l(`editor.graphPanel.legendSection.display.${
|
|
3556
|
-
})),
|
|
3786
|
+
const g = d?.position ?? "none", C = s === "auto" ? g : s, P = Oe.filter((O) => O === C || u.includes(O)).map((O) => ({
|
|
3787
|
+
value: O,
|
|
3788
|
+
label: l(`editor.graphPanel.legendSection.${O}`)
|
|
3789
|
+
})), y = (O) => {
|
|
3790
|
+
const w = Oe.find((R) => R === O);
|
|
3791
|
+
w && r.commands.dispatch(new Pr({ position: w }));
|
|
3792
|
+
}, f = (O) => {
|
|
3793
|
+
const w = yn.find((R) => R === O);
|
|
3794
|
+
w && r.commands.dispatch(new Lr({ align: w }));
|
|
3795
|
+
}, x = (O) => {
|
|
3796
|
+
const w = Sn.find((R) => R === O);
|
|
3797
|
+
w && r.commands.dispatch(new Tr({ display: w }));
|
|
3798
|
+
}, L = yn.map((O) => ({
|
|
3799
|
+
value: O,
|
|
3800
|
+
label: l(`editor.graphPanel.legendSection.align.${O}`)
|
|
3801
|
+
})), A = Sn.map((O) => ({
|
|
3802
|
+
value: O,
|
|
3803
|
+
label: l(`editor.graphPanel.legendSection.display.${O}`)
|
|
3804
|
+
})), H = t ?? l("editor.graphPanel.legendSection.title"), k = P.find((O) => O.value === C)?.label, F = d !== void 0;
|
|
3557
3805
|
return /* @__PURE__ */ n(D, {
|
|
3558
|
-
title:
|
|
3806
|
+
title: H,
|
|
3559
3807
|
layout: i,
|
|
3560
|
-
preview:
|
|
3561
|
-
children: /* @__PURE__ */ m(
|
|
3562
|
-
/* @__PURE__ */ n(
|
|
3808
|
+
preview: o ?? k,
|
|
3809
|
+
children: /* @__PURE__ */ m(z, { children: [
|
|
3810
|
+
/* @__PURE__ */ n(b, {
|
|
3563
3811
|
label: l("editor.axesPanel.controls.position"),
|
|
3564
3812
|
layout: "stack",
|
|
3565
3813
|
children: /* @__PURE__ */ n(c, {
|
|
3566
|
-
value:
|
|
3814
|
+
value: C,
|
|
3567
3815
|
options: P,
|
|
3568
3816
|
onChange: y
|
|
3569
3817
|
})
|
|
3570
3818
|
}),
|
|
3571
|
-
|
|
3819
|
+
F && /* @__PURE__ */ n(b, {
|
|
3572
3820
|
label: l("editor.graphPanel.legendSection.alignLabel"),
|
|
3573
3821
|
layout: "stack",
|
|
3574
3822
|
children: /* @__PURE__ */ n(c, {
|
|
3575
3823
|
value: a.config.legend.align,
|
|
3576
|
-
options:
|
|
3824
|
+
options: L,
|
|
3577
3825
|
onChange: f
|
|
3578
3826
|
})
|
|
3579
3827
|
}),
|
|
3580
|
-
h && /* @__PURE__ */ n(
|
|
3828
|
+
h && /* @__PURE__ */ n(b, {
|
|
3581
3829
|
label: l("editor.graphPanel.legendSection.displayLabel"),
|
|
3582
3830
|
layout: "stack",
|
|
3583
3831
|
children: /* @__PURE__ */ n(c, {
|
|
3584
3832
|
value: a.config.legend.display,
|
|
3585
|
-
options:
|
|
3833
|
+
options: A,
|
|
3586
3834
|
onChange: x
|
|
3587
3835
|
})
|
|
3588
3836
|
})
|
|
3589
3837
|
] })
|
|
3590
3838
|
});
|
|
3591
|
-
},
|
|
3592
|
-
const t = M(), i =
|
|
3839
|
+
}, Ns = 1, ks = 20, Rs = 0.5, vt = ({ layerId: e }) => {
|
|
3840
|
+
const t = M(), i = _(t), { Slider: o } = N(), r = $e(i, e);
|
|
3593
3841
|
if (!i) return null;
|
|
3594
3842
|
const a = (l) => {
|
|
3595
|
-
const c = new
|
|
3843
|
+
const c = new Mr({
|
|
3596
3844
|
layerId: e,
|
|
3597
3845
|
size: l
|
|
3598
3846
|
});
|
|
3599
3847
|
t.commands.dispatch(c, { transient: !0 });
|
|
3600
3848
|
};
|
|
3601
|
-
return /* @__PURE__ */ n(
|
|
3602
|
-
value:
|
|
3603
|
-
min:
|
|
3604
|
-
max:
|
|
3605
|
-
step:
|
|
3606
|
-
formatValue:
|
|
3849
|
+
return /* @__PURE__ */ n(o, {
|
|
3850
|
+
value: r?.get("size") ?? jt,
|
|
3851
|
+
min: Ns,
|
|
3852
|
+
max: ks,
|
|
3853
|
+
step: Rs,
|
|
3854
|
+
formatValue: Te,
|
|
3607
3855
|
onChange: a,
|
|
3608
3856
|
onCommit: t.commands.seal
|
|
3609
3857
|
});
|
|
3610
|
-
},
|
|
3858
|
+
}, Es = 1, _s = 10, Ds = 0.1, Hs = [
|
|
3611
3859
|
"gap",
|
|
3612
3860
|
"zero",
|
|
3613
3861
|
"connect"
|
|
3614
|
-
],
|
|
3615
|
-
const
|
|
3616
|
-
if (!
|
|
3617
|
-
const p =
|
|
3862
|
+
], Dc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3863
|
+
const o = M(), r = _(o), a = I(), { Select: l, Slider: c, Switch: s, ToggleGroup: u } = N(), d = r?.spec.layers ?? [], h = Nn(d, "line", "area"), v = $e(r, h?.id ?? null);
|
|
3864
|
+
if (!r || !h) return null;
|
|
3865
|
+
const p = r.coordSystem.type === "polar", g = Fs(a, h), C = zs(h, d), P = wn(r.spec, h.geom, "strokeWidth", h.id), y = typeof P == "number", f = h.geom === "line" ? h : void 0, x = [{
|
|
3618
3866
|
value: "auto",
|
|
3619
3867
|
label: a("editor.graphPanel.numberFormat.options.auto")
|
|
3620
3868
|
}, {
|
|
3621
3869
|
value: "custom",
|
|
3622
3870
|
label: a("editor.graphPanel.numberFormat.options.custom")
|
|
3623
|
-
}],
|
|
3624
|
-
|
|
3871
|
+
}], L = (w) => {
|
|
3872
|
+
o.commands.dispatch(new Kr({
|
|
3625
3873
|
layerId: h.id,
|
|
3626
3874
|
showPoints: w
|
|
3627
3875
|
}));
|
|
3628
|
-
},
|
|
3629
|
-
f &&
|
|
3876
|
+
}, A = (w) => {
|
|
3877
|
+
f && o.commands.dispatch(new Gr({
|
|
3630
3878
|
layerId: f.id,
|
|
3631
3879
|
showFill: w
|
|
3632
3880
|
}));
|
|
3633
|
-
},
|
|
3634
|
-
|
|
3881
|
+
}, H = (w) => {
|
|
3882
|
+
o.commands.dispatch(new Ir({
|
|
3635
3883
|
layerId: h.id,
|
|
3636
3884
|
interpolate: w ? "catmull-rom" : "linear"
|
|
3637
3885
|
}));
|
|
3638
|
-
},
|
|
3639
|
-
const
|
|
3640
|
-
|
|
3886
|
+
}, k = (w) => {
|
|
3887
|
+
const R = v?.get("strokeWidth") ?? Yt;
|
|
3888
|
+
o.commands.dispatch(new Qe({
|
|
3641
3889
|
layerId: h.id,
|
|
3642
|
-
lineWidth: w === "custom" ?
|
|
3890
|
+
lineWidth: w === "custom" ? R : null
|
|
3643
3891
|
}));
|
|
3644
|
-
},
|
|
3645
|
-
|
|
3892
|
+
}, F = (w) => {
|
|
3893
|
+
o.commands.dispatch(new Qe({
|
|
3646
3894
|
layerId: h.id,
|
|
3647
3895
|
lineWidth: w
|
|
3648
3896
|
}), { transient: !0 });
|
|
3649
|
-
},
|
|
3650
|
-
const
|
|
3651
|
-
|
|
3897
|
+
}, O = (w) => {
|
|
3898
|
+
const R = Vs(w);
|
|
3899
|
+
R && o.commands.dispatch(new Ar({
|
|
3652
3900
|
layerId: h.id,
|
|
3653
|
-
missingValues:
|
|
3901
|
+
missingValues: R
|
|
3654
3902
|
}));
|
|
3655
3903
|
};
|
|
3656
3904
|
return /* @__PURE__ */ n(D, {
|
|
3657
3905
|
title: e ?? a("editor.fineTunePanel.lineStyleSection.title"),
|
|
3658
3906
|
layout: t,
|
|
3659
3907
|
preview: i,
|
|
3660
|
-
children: /* @__PURE__ */ m(
|
|
3661
|
-
/* @__PURE__ */ n(
|
|
3908
|
+
children: /* @__PURE__ */ m(z, { children: [
|
|
3909
|
+
/* @__PURE__ */ n(b, {
|
|
3662
3910
|
label: a("editor.graphPanel.graphOptions.showPoints"),
|
|
3663
3911
|
children: /* @__PURE__ */ n(s, {
|
|
3664
|
-
isChecked:
|
|
3665
|
-
onChange:
|
|
3912
|
+
isChecked: C !== void 0,
|
|
3913
|
+
onChange: L
|
|
3666
3914
|
})
|
|
3667
3915
|
}),
|
|
3668
|
-
|
|
3916
|
+
C && /* @__PURE__ */ n(b, {
|
|
3669
3917
|
label: a("editor.graphPanel.pointSize.label"),
|
|
3670
|
-
children: /* @__PURE__ */ n(
|
|
3918
|
+
children: /* @__PURE__ */ n(vt, { layerId: C.id })
|
|
3671
3919
|
}),
|
|
3672
|
-
f && !p && /* @__PURE__ */ n(
|
|
3920
|
+
f && !p && /* @__PURE__ */ n(b, {
|
|
3673
3921
|
label: a("editor.graphPanel.graphOptions.lineFill"),
|
|
3674
3922
|
children: /* @__PURE__ */ n(s, {
|
|
3675
|
-
isChecked:
|
|
3676
|
-
onChange:
|
|
3923
|
+
isChecked: wn(r.spec, "line", "fillAlpha", f.id) !== void 0,
|
|
3924
|
+
onChange: A
|
|
3677
3925
|
})
|
|
3678
3926
|
}),
|
|
3679
|
-
!p && /* @__PURE__ */ n(
|
|
3927
|
+
!p && /* @__PURE__ */ n(b, {
|
|
3680
3928
|
label: a("editor.graphPanel.graphOptions.smoothLines"),
|
|
3681
3929
|
children: /* @__PURE__ */ n(s, {
|
|
3682
3930
|
isChecked: h.params.interpolate === "catmull-rom",
|
|
3683
|
-
onChange:
|
|
3931
|
+
onChange: H
|
|
3684
3932
|
})
|
|
3685
3933
|
}),
|
|
3686
|
-
/* @__PURE__ */ n(
|
|
3934
|
+
/* @__PURE__ */ n(b, {
|
|
3687
3935
|
label: a("editor.graphPanel.lineThickness.label"),
|
|
3688
3936
|
children: /* @__PURE__ */ n(u, {
|
|
3689
3937
|
value: y ? "custom" : "auto",
|
|
3690
3938
|
options: x,
|
|
3691
|
-
onChange:
|
|
3939
|
+
onChange: k
|
|
3692
3940
|
})
|
|
3693
3941
|
}),
|
|
3694
|
-
y && /* @__PURE__ */ n(
|
|
3942
|
+
y && /* @__PURE__ */ n(b, {
|
|
3695
3943
|
label: a("editor.graphPanel.numberFormat.valueLabel"),
|
|
3696
3944
|
children: /* @__PURE__ */ n(c, {
|
|
3697
3945
|
value: P,
|
|
3698
|
-
min:
|
|
3699
|
-
max:
|
|
3700
|
-
step:
|
|
3701
|
-
formatValue:
|
|
3702
|
-
onChange:
|
|
3703
|
-
onCommit:
|
|
3946
|
+
min: Es,
|
|
3947
|
+
max: _s,
|
|
3948
|
+
step: Ds,
|
|
3949
|
+
formatValue: Te,
|
|
3950
|
+
onChange: F,
|
|
3951
|
+
onCommit: o.commands.seal
|
|
3704
3952
|
})
|
|
3705
3953
|
}),
|
|
3706
|
-
!p && g.length > 1 && /* @__PURE__ */ n(
|
|
3954
|
+
!p && g.length > 1 && /* @__PURE__ */ n(b, {
|
|
3707
3955
|
label: a("editor.fineTunePanel.detailSection.missingValues"),
|
|
3708
3956
|
children: /* @__PURE__ */ n(l, {
|
|
3709
3957
|
value: h.params.missingValues,
|
|
3710
3958
|
options: g,
|
|
3711
|
-
onChange:
|
|
3959
|
+
onChange: O
|
|
3712
3960
|
})
|
|
3713
3961
|
})
|
|
3714
3962
|
] })
|
|
3715
3963
|
});
|
|
3716
|
-
},
|
|
3964
|
+
}, Vs = (e) => Hs.find((t) => t === e), wn = (e, t, i, o) => la(e.styles.overrides, qr(t, o))?.declarations?.[i], zs = (e, t) => Ne(t, "point").find((i) => kn(i, [e])), Fs = (e, t) => {
|
|
3717
3965
|
const i = [{
|
|
3718
3966
|
value: "gap",
|
|
3719
3967
|
label: e("editor.graphPanel.treatEmptyValues.leaveGap.label")
|
|
@@ -3724,8 +3972,8 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3724
3972
|
return t.position !== "stack" && t.position !== "fill" && i.push({
|
|
3725
3973
|
value: "connect",
|
|
3726
3974
|
label: e("editor.graphPanel.treatEmptyValues.connectGaps.label")
|
|
3727
|
-
}), t.geom === "area" ? i.filter((
|
|
3728
|
-
},
|
|
3975
|
+
}), t.geom === "area" ? i.filter((o) => o.value !== "gap") : i;
|
|
3976
|
+
}, Bs = "k", Gs = 2, Ks = 0, Us = 5, _e = [
|
|
3729
3977
|
{
|
|
3730
3978
|
value: "k",
|
|
3731
3979
|
labelKey: "thousands"
|
|
@@ -3738,34 +3986,34 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3738
3986
|
value: "b",
|
|
3739
3987
|
labelKey: "billions"
|
|
3740
3988
|
}
|
|
3741
|
-
],
|
|
3742
|
-
const
|
|
3743
|
-
if (!
|
|
3744
|
-
const { abbreviation: s, decimals: u } =
|
|
3745
|
-
value:
|
|
3746
|
-
label: a(`editor.graphPanel.numberFormat.options.${
|
|
3747
|
-
})), p =
|
|
3989
|
+
], Ws = ["auto", "none"], Hc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3990
|
+
const o = M(), r = _(o), a = I(), { NumberField: l, ToggleGroup: c } = N();
|
|
3991
|
+
if (!r) return null;
|
|
3992
|
+
const { abbreviation: s, decimals: u } = r.config.numberFormat, d = Zs(s) !== void 0, h = u !== "auto", v = (x) => x.map((L) => ({
|
|
3993
|
+
value: L,
|
|
3994
|
+
label: a(`editor.graphPanel.numberFormat.options.${L}`)
|
|
3995
|
+
})), p = _e.map(({ value: x, labelKey: L }) => ({
|
|
3748
3996
|
value: x,
|
|
3749
|
-
label: a(`common.abbreviations.${
|
|
3997
|
+
label: a(`common.abbreviations.${L}`)
|
|
3750
3998
|
})), g = (x) => {
|
|
3751
|
-
|
|
3752
|
-
},
|
|
3753
|
-
const
|
|
3754
|
-
g(
|
|
3999
|
+
o.commands.dispatch(new Or({ abbreviation: x }));
|
|
4000
|
+
}, C = (x) => {
|
|
4001
|
+
const L = Ws.find((A) => A === x);
|
|
4002
|
+
g(L ?? Bs);
|
|
3755
4003
|
}, P = (x) => {
|
|
3756
|
-
const
|
|
3757
|
-
|
|
4004
|
+
const L = _e.find((A) => A.value === x);
|
|
4005
|
+
L && g(L.value);
|
|
3758
4006
|
}, y = (x) => {
|
|
3759
|
-
|
|
4007
|
+
o.commands.dispatch(new Je({ decimals: x === "custom" ? Gs : "auto" }));
|
|
3760
4008
|
}, f = (x) => {
|
|
3761
|
-
x !== null &&
|
|
4009
|
+
x !== null && o.commands.dispatch(new Je({ decimals: x }), { transient: !0 });
|
|
3762
4010
|
};
|
|
3763
4011
|
return /* @__PURE__ */ n(D, {
|
|
3764
4012
|
title: e ?? a("editor.graphPanel.numberFormatSection.title"),
|
|
3765
4013
|
layout: t,
|
|
3766
4014
|
preview: i,
|
|
3767
|
-
children: /* @__PURE__ */ m(
|
|
3768
|
-
/* @__PURE__ */ n(
|
|
4015
|
+
children: /* @__PURE__ */ m(z, { children: [
|
|
4016
|
+
/* @__PURE__ */ n(b, {
|
|
3769
4017
|
label: a("editor.graphPanel.numberFormat.abbreviationLabel"),
|
|
3770
4018
|
children: /* @__PURE__ */ n(c, {
|
|
3771
4019
|
value: d ? "custom" : s,
|
|
@@ -3774,10 +4022,10 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3774
4022
|
"none",
|
|
3775
4023
|
"custom"
|
|
3776
4024
|
]),
|
|
3777
|
-
onChange:
|
|
4025
|
+
onChange: C
|
|
3778
4026
|
})
|
|
3779
4027
|
}),
|
|
3780
|
-
d && /* @__PURE__ */ n(
|
|
4028
|
+
d && /* @__PURE__ */ n(b, {
|
|
3781
4029
|
label: a("editor.graphPanel.numberFormat.valueLabel"),
|
|
3782
4030
|
children: /* @__PURE__ */ n(c, {
|
|
3783
4031
|
value: s,
|
|
@@ -3785,7 +4033,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3785
4033
|
onChange: P
|
|
3786
4034
|
})
|
|
3787
4035
|
}),
|
|
3788
|
-
/* @__PURE__ */ n(
|
|
4036
|
+
/* @__PURE__ */ n(b, {
|
|
3789
4037
|
label: a("editor.graphPanel.numberFormat.decimalPlacesLabel"),
|
|
3790
4038
|
children: /* @__PURE__ */ n(c, {
|
|
3791
4039
|
value: h ? "custom" : "auto",
|
|
@@ -3793,107 +4041,254 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3793
4041
|
onChange: y
|
|
3794
4042
|
})
|
|
3795
4043
|
}),
|
|
3796
|
-
h && /* @__PURE__ */ n(
|
|
4044
|
+
h && /* @__PURE__ */ n(b, {
|
|
3797
4045
|
label: a("editor.graphPanel.numberFormat.valueLabel"),
|
|
3798
4046
|
children: /* @__PURE__ */ n(l, {
|
|
3799
4047
|
value: u,
|
|
3800
|
-
min:
|
|
3801
|
-
max:
|
|
4048
|
+
min: Ks,
|
|
4049
|
+
max: Us,
|
|
3802
4050
|
onChange: f,
|
|
3803
|
-
onCommit:
|
|
4051
|
+
onCommit: o.commands.seal
|
|
3804
4052
|
})
|
|
3805
4053
|
})
|
|
3806
4054
|
] })
|
|
3807
4055
|
});
|
|
3808
|
-
},
|
|
3809
|
-
const
|
|
3810
|
-
if (!
|
|
3811
|
-
const a =
|
|
4056
|
+
}, Zs = (e) => _e.find((t) => t.value === e), Vc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
4057
|
+
const o = _(M()), r = I();
|
|
4058
|
+
if (!o) return null;
|
|
4059
|
+
const a = qs(o.spec.layers);
|
|
3812
4060
|
return a ? /* @__PURE__ */ n(D, {
|
|
3813
|
-
title: e ??
|
|
4061
|
+
title: e ?? r("editor.graphPanel.pointSize.label"),
|
|
3814
4062
|
layout: t,
|
|
3815
4063
|
preview: i,
|
|
3816
|
-
children: /* @__PURE__ */ n(
|
|
3817
|
-
label:
|
|
3818
|
-
children: /* @__PURE__ */ n(
|
|
4064
|
+
children: /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(b, {
|
|
4065
|
+
label: r("editor.graphPanel.numberFormat.valueLabel"),
|
|
4066
|
+
children: /* @__PURE__ */ n(vt, { layerId: a.id })
|
|
3819
4067
|
}) })
|
|
3820
4068
|
}) : null;
|
|
3821
|
-
},
|
|
3822
|
-
const t =
|
|
3823
|
-
return
|
|
3824
|
-
},
|
|
3825
|
-
const
|
|
3826
|
-
if (!
|
|
3827
|
-
const { innerRadius: c, startAngle: s } =
|
|
3828
|
-
|
|
4069
|
+
}, qs = (e) => {
|
|
4070
|
+
const t = Ne(e, "line", "area");
|
|
4071
|
+
return Ne(e, "point").find((i) => !kn(i, t));
|
|
4072
|
+
}, $s = 0.9, Xs = 360, js = 0.05, Ys = 15, zc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
4073
|
+
const o = M(), r = _(o), a = I(), { Slider: l } = N();
|
|
4074
|
+
if (!r || r.spec.coords.coordType !== "polar") return null;
|
|
4075
|
+
const { innerRadius: c, startAngle: s } = r.spec.coords.params, u = (h) => {
|
|
4076
|
+
o.commands.dispatch(new Nr({ innerRadius: h }), { transient: !0 });
|
|
3829
4077
|
}, d = (h) => {
|
|
3830
|
-
|
|
4078
|
+
o.commands.dispatch(new kr({ startAngle: h }), { transient: !0 });
|
|
3831
4079
|
};
|
|
3832
4080
|
return /* @__PURE__ */ n(D, {
|
|
3833
4081
|
title: e ?? a("editor.graphPanel.polarSection.title"),
|
|
3834
4082
|
layout: t,
|
|
3835
4083
|
preview: i,
|
|
3836
|
-
children: /* @__PURE__ */ m(
|
|
4084
|
+
children: /* @__PURE__ */ m(z, { children: [/* @__PURE__ */ n(b, {
|
|
3837
4085
|
label: a("editor.graphPanel.polarSection.innerRadius"),
|
|
3838
4086
|
children: /* @__PURE__ */ n(l, {
|
|
3839
4087
|
value: c,
|
|
3840
4088
|
min: 0,
|
|
3841
|
-
max:
|
|
3842
|
-
step:
|
|
3843
|
-
formatValue:
|
|
4089
|
+
max: $s,
|
|
4090
|
+
step: js,
|
|
4091
|
+
formatValue: pt,
|
|
3844
4092
|
onChange: u,
|
|
3845
|
-
onCommit:
|
|
4093
|
+
onCommit: o.commands.seal
|
|
3846
4094
|
})
|
|
3847
|
-
}), /* @__PURE__ */ n(
|
|
4095
|
+
}), /* @__PURE__ */ n(b, {
|
|
3848
4096
|
label: a("editor.graphPanel.polarSection.startAngle"),
|
|
3849
4097
|
children: /* @__PURE__ */ n(l, {
|
|
3850
4098
|
value: s,
|
|
3851
4099
|
min: 0,
|
|
3852
|
-
max:
|
|
3853
|
-
step:
|
|
3854
|
-
formatValue:
|
|
4100
|
+
max: Xs - 1,
|
|
4101
|
+
step: Ys,
|
|
4102
|
+
formatValue: Gl,
|
|
3855
4103
|
onChange: d,
|
|
3856
|
-
onCommit:
|
|
4104
|
+
onCommit: o.commands.seal
|
|
3857
4105
|
})
|
|
3858
4106
|
})] })
|
|
3859
4107
|
});
|
|
4108
|
+
}, Qs = (e) => /* @__PURE__ */ m(T, {
|
|
4109
|
+
...e,
|
|
4110
|
+
children: [
|
|
4111
|
+
/* @__PURE__ */ n("path", {
|
|
4112
|
+
fillRule: "evenodd",
|
|
4113
|
+
clipRule: "evenodd",
|
|
4114
|
+
opacity: "0.12",
|
|
4115
|
+
d: "M2 10C2 7.19974 2 5.79961 2.54497 4.73005C3.02433 3.78924 3.78924 3.02433 4.73005 2.54497C5.79961 2 7.19974 2 10 2H14C16.8003 2 18.2004 2 19.27 2.54497C20.2108 3.02433 20.9757 3.78924 21.455 4.73005C22 5.79961 22 7.19974 22 10V14C22 16.8003 22 18.2004 21.455 19.27C20.9757 20.2108 20.2108 20.9757 19.27 21.455C18.2004 22 16.8003 22 14 22H10C7.19974 22 5.79961 22 4.73005 21.455C3.78924 20.9757 3.02433 20.2108 2.54497 19.27C2 18.2004 2 16.8003 2 14V10Z",
|
|
4116
|
+
fill: "currentColor"
|
|
4117
|
+
}),
|
|
4118
|
+
/* @__PURE__ */ n("path", {
|
|
4119
|
+
fillRule: "evenodd",
|
|
4120
|
+
clipRule: "evenodd",
|
|
4121
|
+
d: "M9.96644 1.25C8.59472 1.25 7.51929 1.24999 6.65494 1.32061C5.77479 1.39252 5.04768 1.54138 4.38955 1.87671C3.30762 2.42798 2.42798 3.30762 1.87671 4.38955C1.54138 5.04768 1.39252 5.77479 1.32061 6.65494C1.24999 7.51929 1.25 8.59472 1.25 9.96644V14.0336C1.25 15.4053 1.24999 16.4807 1.32061 17.3451C1.39252 18.2252 1.54138 18.9523 1.87671 19.6104C2.42798 20.6924 3.30762 21.572 4.38955 22.1233C5.04768 22.4586 5.77479 22.6075 6.65494 22.6794C7.51927 22.75 8.59469 22.75 9.96637 22.75H14.0336C15.4053 22.75 16.4807 22.75 17.3451 22.6794C18.2252 22.6075 18.9523 22.4586 19.6104 22.1233C20.6924 21.572 21.572 20.6924 22.1233 19.6104C22.4586 18.9523 22.6075 18.2252 22.6794 17.3451C22.75 16.4807 22.75 15.4053 22.75 14.0336V9.96642C22.75 8.59473 22.75 7.51927 22.6794 6.65494C22.6075 5.77479 22.4586 5.04768 22.1233 4.38955C21.572 3.30762 20.6924 2.42798 19.6104 1.87671C18.9523 1.54138 18.2252 1.39252 17.3451 1.32061C16.4807 1.24999 15.4053 1.25 14.0336 1.25H9.96644ZM5.07054 3.21322C5.48197 3.00359 5.9897 2.87996 6.77708 2.81563C7.57322 2.75058 8.58749 2.75 10 2.75H14C15.4125 2.75 16.4268 2.75058 17.2229 2.81563C18.0103 2.87996 18.518 3.00359 18.9295 3.21322C19.7291 3.62068 20.3793 4.27085 20.7868 5.07054C20.9964 5.48197 21.12 5.9897 21.1844 6.77708C21.2494 7.57322 21.25 8.58749 21.25 10V14C21.25 15.4125 21.2494 16.4268 21.1844 17.2229C21.12 18.0103 20.9964 18.518 20.7868 18.9295C20.3793 19.7291 19.7291 20.3793 18.9295 20.7868C18.518 20.9964 18.0103 21.12 17.2229 21.1844C16.4268 21.2494 15.4125 21.25 14 21.25H10C8.58749 21.25 7.57322 21.2494 6.77708 21.1844C5.9897 21.12 5.48197 20.9964 5.07054 20.7868C4.27085 20.3793 3.62068 19.7291 3.21322 18.9295C3.00359 18.518 2.87996 18.0103 2.81563 17.2229C2.75058 16.4268 2.75 15.4125 2.75 14V10C2.75 8.58749 2.75058 7.57322 2.81563 6.77708C2.87996 5.9897 3.00359 5.48197 3.21322 5.07054C3.62068 4.27085 4.27085 3.62068 5.07054 3.21322Z",
|
|
4122
|
+
fill: "currentColor"
|
|
4123
|
+
}),
|
|
4124
|
+
/* @__PURE__ */ n("path", {
|
|
4125
|
+
fillRule: "evenodd",
|
|
4126
|
+
clipRule: "evenodd",
|
|
4127
|
+
d: "M19.4796 12.2222L17.6085 12.2291L17.6029 10.7291L19.474 10.7222L19.4796 12.2222ZM15.3662 12.2375L13.124 12.2459L13.1184 10.7459L15.3606 10.7375L15.3662 12.2375ZM10.8817 12.2542L8.63945 12.2626L8.63386 10.7626L10.8761 10.7542L10.8817 12.2542ZM6.39719 12.2709L4.52607 12.2779L4.52048 10.7779L6.3916 10.7709L6.39719 12.2709Z",
|
|
4128
|
+
fill: "currentColor"
|
|
4129
|
+
})
|
|
4130
|
+
]
|
|
4131
|
+
}), xn = (e) => /* @__PURE__ */ m(T, {
|
|
4132
|
+
...e,
|
|
4133
|
+
children: [
|
|
4134
|
+
/* @__PURE__ */ n("path", {
|
|
4135
|
+
fillRule: "evenodd",
|
|
4136
|
+
clipRule: "evenodd",
|
|
4137
|
+
opacity: "0.12",
|
|
4138
|
+
d: "M2 10C2 7.19974 2 5.79961 2.54497 4.73005C3.02433 3.78924 3.78924 3.02433 4.73005 2.54497C5.79961 2 7.19974 2 10 2H14C16.8003 2 18.2004 2 19.27 2.54497C20.2108 3.02433 20.9757 3.78924 21.455 4.73005C22 5.79961 22 7.19974 22 10V14C22 16.8003 22 18.2004 21.455 19.27C20.9757 20.2108 20.2108 20.9757 19.27 21.455C18.2004 22 16.8003 22 14 22H10C7.19974 22 5.79961 22 4.73005 21.455C3.78924 20.9757 3.02433 20.2108 2.54497 19.27C2 18.2004 2 16.8003 2 14V10Z",
|
|
4139
|
+
fill: "currentColor"
|
|
4140
|
+
}),
|
|
4141
|
+
/* @__PURE__ */ n("path", {
|
|
4142
|
+
fillRule: "evenodd",
|
|
4143
|
+
clipRule: "evenodd",
|
|
4144
|
+
d: "M9.96644 1.25C8.59472 1.25 7.51929 1.24999 6.65494 1.32061C5.77479 1.39252 5.04768 1.54138 4.38955 1.87671C3.30762 2.42798 2.42798 3.30762 1.87671 4.38955C1.54138 5.04768 1.39252 5.77479 1.32061 6.65494C1.24999 7.51929 1.25 8.59472 1.25 9.96644V14.0336C1.25 15.4053 1.24999 16.4807 1.32061 17.3451C1.39252 18.2252 1.54138 18.9523 1.87671 19.6104C2.42798 20.6924 3.30762 21.572 4.38955 22.1233C5.04768 22.4586 5.77479 22.6075 6.65494 22.6794C7.51927 22.75 8.59469 22.75 9.96637 22.75H14.0336C15.4053 22.75 16.4807 22.75 17.3451 22.6794C18.2252 22.6075 18.9523 22.4586 19.6104 22.1233C20.6924 21.572 21.572 20.6924 22.1233 19.6104C22.4586 18.9523 22.6075 18.2252 22.6794 17.3451C22.75 16.4807 22.75 15.4053 22.75 14.0336V9.96642C22.75 8.59473 22.75 7.51927 22.6794 6.65494C22.6075 5.77479 22.4586 5.04768 22.1233 4.38955C21.572 3.30762 20.6924 2.42798 19.6104 1.87671C18.9523 1.54138 18.2252 1.39252 17.3451 1.32061C16.4807 1.24999 15.4053 1.25 14.0336 1.25H9.96644ZM5.07054 3.21322C5.48197 3.00359 5.9897 2.87996 6.77708 2.81563C7.57322 2.75058 8.58749 2.75 10 2.75H14C15.4125 2.75 16.4268 2.75058 17.2229 2.81563C18.0103 2.87996 18.518 3.00359 18.9295 3.21322C19.7291 3.62068 20.3793 4.27085 20.7868 5.07054C20.9964 5.48197 21.12 5.9897 21.1844 6.77708C21.2494 7.57322 21.25 8.58749 21.25 10V14C21.25 15.4125 21.2494 16.4268 21.1844 17.2229C21.12 18.0103 20.9964 18.518 20.7868 18.9295C20.3793 19.7291 19.7291 20.3793 18.9295 20.7868C18.518 20.9964 18.0103 21.12 17.2229 21.1844C16.4268 21.2494 15.4125 21.25 14 21.25H10C8.58749 21.25 7.57322 21.2494 6.77708 21.1844C5.9897 21.12 5.48197 20.9964 5.07054 20.7868C4.27085 20.3793 3.62068 19.7291 3.21322 18.9295C3.00359 18.518 2.87996 18.0103 2.81563 17.2229C2.75058 16.4268 2.75 15.4125 2.75 14V10C2.75 8.58749 2.75058 7.57322 2.81563 6.77708C2.87996 5.9897 3.00359 5.48197 3.21322 5.07054C3.62068 4.27085 4.27085 3.62068 5.07054 3.21322Z",
|
|
4145
|
+
fill: "currentColor"
|
|
4146
|
+
}),
|
|
4147
|
+
/* @__PURE__ */ n("path", {
|
|
4148
|
+
fillRule: "evenodd",
|
|
4149
|
+
clipRule: "evenodd",
|
|
4150
|
+
d: "M18.6749 8.04877L17.1069 9.06975L16.2884 7.81273L17.8564 6.79175L18.6749 8.04877ZM15.2278 10.2932L13.3488 11.5167L12.5303 10.2597L14.4093 9.03622L15.2278 10.2932ZM11.4697 12.7402L9.59064 13.9637L8.77217 12.7067L10.6512 11.4832L11.4697 12.7402ZM7.71158 15.1872L6.14354 16.2082L5.32507 14.9511L6.89311 13.9302L7.71158 15.1872Z",
|
|
4151
|
+
fill: "currentColor"
|
|
4152
|
+
})
|
|
4153
|
+
]
|
|
4154
|
+
}), Js = (e) => E(() => {
|
|
4155
|
+
if (e === null) return {
|
|
4156
|
+
options: [],
|
|
4157
|
+
findValue: () => {
|
|
4158
|
+
}
|
|
4159
|
+
};
|
|
4160
|
+
const { parsingLocale: t, numberFormat: i } = e.config, o = e.guides.colorGroups.map((r) => {
|
|
4161
|
+
const a = ea({
|
|
4162
|
+
valueFormat: r.valueFormat,
|
|
4163
|
+
locale: t,
|
|
4164
|
+
numberFormat: i
|
|
4165
|
+
}), l = r.value instanceof Date ? r.value.getTime() : r.value;
|
|
4166
|
+
return {
|
|
4167
|
+
value: l,
|
|
4168
|
+
option: {
|
|
4169
|
+
value: String(l),
|
|
4170
|
+
label: r.label ?? a(r.value)
|
|
4171
|
+
}
|
|
4172
|
+
};
|
|
4173
|
+
});
|
|
4174
|
+
return {
|
|
4175
|
+
options: o.map(({ option: r }) => r),
|
|
4176
|
+
findValue: (r) => o.find((a) => a.option.value === r)?.value
|
|
4177
|
+
};
|
|
4178
|
+
}, [e]), Ln = [
|
|
4179
|
+
"linear",
|
|
4180
|
+
"exponential",
|
|
4181
|
+
"quadratic",
|
|
4182
|
+
"polynomial",
|
|
4183
|
+
"logarithmic",
|
|
4184
|
+
"power",
|
|
4185
|
+
"loess"
|
|
4186
|
+
], ec = "linear", Fc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
4187
|
+
const o = M(), r = _(o), a = I(), { Select: l, Switch: c } = N(), { options: s, findValue: u } = Js(r);
|
|
4188
|
+
if (!r || r.coordSystem.type === "polar") return null;
|
|
4189
|
+
const d = sa(r.spec.layers), h = ra(r.spec.layers), v = d?.stat.type === "smooth" ? d.stat.method : ec, p = nc(h), g = Ln.map((L) => ({
|
|
4190
|
+
value: L,
|
|
4191
|
+
label: a(`editor.annotationsPanel.trendType.options.${L}`)
|
|
4192
|
+
})), C = (L, A = {}) => {
|
|
4193
|
+
const H = d ?? h, k = new Hr({
|
|
4194
|
+
line: L,
|
|
4195
|
+
...A,
|
|
4196
|
+
...H !== void 0 && { layerId: H.id },
|
|
4197
|
+
label: a("editor.annotationsPanel.trendsAndAveragesSection.average")
|
|
4198
|
+
});
|
|
4199
|
+
o.commands.dispatch(k);
|
|
4200
|
+
}, P = (L) => C(L ? "trend" : "none", { method: v }), y = (L) => C(L ? "average" : "none", { group: p ?? u(s[0]?.value ?? "") }), f = (L) => {
|
|
4201
|
+
const A = Ln.find((H) => H === L);
|
|
4202
|
+
A !== void 0 && C("trend", { method: A });
|
|
4203
|
+
}, x = (L) => {
|
|
4204
|
+
const A = L === null ? void 0 : u(L);
|
|
4205
|
+
A !== void 0 && C("average", { group: A });
|
|
4206
|
+
};
|
|
4207
|
+
return /* @__PURE__ */ n(D, {
|
|
4208
|
+
title: e ?? a("editor.annotationsPanel.trendsAndAveragesSection.title"),
|
|
4209
|
+
layout: t,
|
|
4210
|
+
preview: i ?? /* @__PURE__ */ n(xn, { size: "lg" }),
|
|
4211
|
+
children: /* @__PURE__ */ m(z, { children: [
|
|
4212
|
+
/* @__PURE__ */ n(b, {
|
|
4213
|
+
label: a("editor.annotationsPanel.trendsAndAveragesSection.trend"),
|
|
4214
|
+
icon: /* @__PURE__ */ n(xn, { size: "lg" }),
|
|
4215
|
+
children: /* @__PURE__ */ n(c, {
|
|
4216
|
+
isChecked: d !== void 0,
|
|
4217
|
+
onChange: P
|
|
4218
|
+
})
|
|
4219
|
+
}),
|
|
4220
|
+
d !== void 0 && /* @__PURE__ */ n(b, {
|
|
4221
|
+
label: a("editor.annotationsPanel.trendType.label"),
|
|
4222
|
+
children: /* @__PURE__ */ n(l, {
|
|
4223
|
+
value: v,
|
|
4224
|
+
options: g,
|
|
4225
|
+
onChange: f,
|
|
4226
|
+
placeholder: a("editor.annotationsPanel.trendType.placeholder")
|
|
4227
|
+
})
|
|
4228
|
+
}),
|
|
4229
|
+
/* @__PURE__ */ n(b, {
|
|
4230
|
+
label: a("editor.annotationsPanel.trendsAndAveragesSection.average"),
|
|
4231
|
+
icon: /* @__PURE__ */ n(Qs, { size: "lg" }),
|
|
4232
|
+
children: /* @__PURE__ */ n(c, {
|
|
4233
|
+
isChecked: h !== void 0,
|
|
4234
|
+
onChange: y
|
|
4235
|
+
})
|
|
4236
|
+
}),
|
|
4237
|
+
h !== void 0 && s.length > 0 && /* @__PURE__ */ n(b, {
|
|
4238
|
+
label: a("editor.annotationsPanel.averageLineSeries.label"),
|
|
4239
|
+
children: /* @__PURE__ */ n(l, {
|
|
4240
|
+
value: p === void 0 ? null : String(p),
|
|
4241
|
+
options: s,
|
|
4242
|
+
onChange: x,
|
|
4243
|
+
placeholder: a("editor.annotationsPanel.averageLineSeries.placeholder"),
|
|
4244
|
+
ariaLabel: a("editor.annotationsPanel.averageLineSeries.ariaLabel")
|
|
4245
|
+
})
|
|
4246
|
+
})
|
|
4247
|
+
] })
|
|
4248
|
+
});
|
|
4249
|
+
}, nc = (e) => {
|
|
4250
|
+
const t = e?.transforms.find((i) => i.transformType === "filter")?.options.value;
|
|
4251
|
+
return t instanceof Date ? t.getTime() : t;
|
|
3860
4252
|
};
|
|
3861
4253
|
export {
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
4254
|
+
Ic as AppearanceSection,
|
|
4255
|
+
Pc as AxesPanel,
|
|
4256
|
+
mn as AxisSection,
|
|
4257
|
+
Ac as BarSection,
|
|
4258
|
+
Ii as Button,
|
|
4259
|
+
Oc as CalloutsSection,
|
|
4260
|
+
El as CaptionSection,
|
|
4261
|
+
Lc as EditableGraphRenderer,
|
|
4262
|
+
ut as EditorPanel,
|
|
4263
|
+
Tc as ElementsPanel,
|
|
4264
|
+
Mc as GoalSection,
|
|
4265
|
+
Nc as GraphOptionsSection,
|
|
4266
|
+
kc as GraphTypeSection,
|
|
4267
|
+
Rc as GridSection,
|
|
4268
|
+
Ec as HeadlineSection,
|
|
4269
|
+
ac as IntlProvider,
|
|
4270
|
+
_c as LegendSection,
|
|
4271
|
+
Dc as LineSection,
|
|
4272
|
+
Ni as NumberField,
|
|
4273
|
+
Hc as NumberFormatSection,
|
|
4274
|
+
Cl as PANEL_ROOT_ATTRIBUTE,
|
|
4275
|
+
Vc as PointSection,
|
|
4276
|
+
zc as PolarSection,
|
|
4277
|
+
_i as RadioGrid,
|
|
4278
|
+
b as Row,
|
|
3885
4279
|
D as Section,
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
4280
|
+
Ui as Select,
|
|
4281
|
+
Ji as Slider,
|
|
4282
|
+
Dl as SourceSection,
|
|
4283
|
+
Vl as SubtitleSection,
|
|
4284
|
+
rl as Switch,
|
|
4285
|
+
il as TextField,
|
|
4286
|
+
Fl as TextSizeSection,
|
|
4287
|
+
Bl as TitleSection,
|
|
4288
|
+
cl as ToggleGroup,
|
|
4289
|
+
Ol as ToggledSection,
|
|
4290
|
+
Fc as TrendsAndAveragesSection,
|
|
4291
|
+
N as useControls,
|
|
4292
|
+
gl as usePanelExpansion,
|
|
3898
4293
|
M as usePanelGraph
|
|
3899
4294
|
};
|