@pie-element/graphing 10.1.1 → 10.1.2-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/configure.d.ts +26 -0
- package/dist/author/configure.js +208 -0
- package/dist/author/correct-response.d.ts +54 -0
- package/dist/author/correct-response.js +303 -0
- package/dist/author/defaults.d.ts +294 -0
- package/dist/author/defaults.js +415 -0
- package/dist/author/graphing-config.d.ts +34 -0
- package/dist/author/graphing-config.js +244 -0
- package/dist/author/index.d.ts +59 -0
- package/dist/author/index.js +96 -0
- package/dist/author/utils.d.ts +43 -0
- package/dist/author/utils.js +260 -0
- package/dist/browser/author/index.js +4480 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/container-DaIvr1Vu.js +57966 -0
- package/dist/browser/container-DaIvr1Vu.js.map +1 -0
- package/dist/browser/controller/index.js +353 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +683 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/dist-BrN2xZtM.js +547 -0
- package/dist/browser/dist-BrN2xZtM.js.map +1 -0
- package/dist/browser/graphing.css +2 -0
- package/dist/controller/defaults.d.ts +59 -0
- package/dist/controller/defaults.js +61 -0
- package/dist/controller/index.d.ts +34 -0
- package/dist/controller/index.js +179 -0
- package/dist/controller/utils.d.ts +37 -0
- package/dist/controller/utils.js +111 -0
- package/dist/delivery/index.d.ts +21 -0
- package/dist/delivery/index.js +43 -0
- package/dist/delivery/main.d.ts +23 -0
- package/dist/delivery/main.js +107 -0
- package/dist/delivery/utils.d.ts +22 -0
- package/dist/graphing.css +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +406 -0
- package/dist/index.js +2 -0
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +88 -21
- package/CHANGELOG.json +0 -652
- package/CHANGELOG.md +0 -2043
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -382
- package/configure/CHANGELOG.md +0 -1834
- package/configure/lib/configure.js +0 -328
- package/configure/lib/configure.js.map +0 -1
- package/configure/lib/correct-response.js +0 -484
- package/configure/lib/correct-response.js.map +0 -1
- package/configure/lib/defaults.js +0 -448
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/graphing-config.js +0 -388
- package/configure/lib/graphing-config.js.map +0 -1
- package/configure/lib/index.js +0 -173
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/utils.js +0 -122
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -30
- package/controller/CHANGELOG.json +0 -412
- package/controller/CHANGELOG.md +0 -1267
- package/controller/lib/defaults.js +0 -64
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -459
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -451
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -24
- package/docs/config-schema.json +0 -3164
- package/docs/config-schema.json.md +0 -2293
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -200
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -20
- package/docs/pie-schema.json +0 -3495
- package/docs/pie-schema.json.md +0 -1345
- package/lib/index.js +0 -69
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -161
- package/lib/main.js.map +0 -1
- package/lib/utils.js +0 -24
- package/lib/utils.js.map +0 -1
|
@@ -0,0 +1,4480 @@
|
|
|
1
|
+
import { D as e, N as t, R as n, _ as r, h as i, p as a, u as o, v as s } from "../dist-BrN2xZtM.js";
|
|
2
|
+
import { $ as c, A as l, B as u, C as d, F as f, G as p, H as m, I as h, J as g, K as _, L as v, M as y, N as b, Q as x, R as S, S as C, U as w, V as T, W as E, X as D, Y as O, Z as k, _ as A, a as ee, at as j, b as M, c as te, ct as N, d as ne, dt as P, et as F, f as re, ft as I, g as ie, gt as L, h as ae, ht as oe, i as R, it as z, j as se, k as ce, l as le, lt as B, m as ue, mt as de, n as fe, nt as V, ot as pe, p as me, pt as he, q as H, r as ge, rt as U, s as _e, st as ve, t as ye, u as be, ut as xe, v as Se, w as Ce, x as W, y as we } from "../container-DaIvr1Vu.js";
|
|
3
|
+
import * as G from "react";
|
|
4
|
+
import K, { Component as Te, createElement as Ee } from "react";
|
|
5
|
+
import { createRoot as De } from "react-dom/client";
|
|
6
|
+
import { Fragment as Oe, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
7
|
+
import ke from "react-dom";
|
|
8
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/createChainedFunction.js
|
|
9
|
+
var Ae = _;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/switchBaseClasses.js
|
|
12
|
+
function je(e) {
|
|
13
|
+
return I("PrivateSwitchBase", e);
|
|
14
|
+
}
|
|
15
|
+
P("PrivateSwitchBase", [
|
|
16
|
+
"root",
|
|
17
|
+
"checked",
|
|
18
|
+
"disabled",
|
|
19
|
+
"input",
|
|
20
|
+
"edgeStart",
|
|
21
|
+
"edgeEnd"
|
|
22
|
+
]);
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/SwitchBase.js
|
|
25
|
+
var Me = (e) => {
|
|
26
|
+
let { classes: t, checked: n, disabled: r, edge: i } = e;
|
|
27
|
+
return B({
|
|
28
|
+
root: [
|
|
29
|
+
"root",
|
|
30
|
+
n && "checked",
|
|
31
|
+
r && "disabled",
|
|
32
|
+
i && `edge${p(i)}`
|
|
33
|
+
],
|
|
34
|
+
input: ["input"]
|
|
35
|
+
}, je, t);
|
|
36
|
+
}, Ne = z(v, { name: "MuiSwitchBase" })({
|
|
37
|
+
padding: 9,
|
|
38
|
+
borderRadius: "50%",
|
|
39
|
+
variants: [
|
|
40
|
+
{
|
|
41
|
+
props: {
|
|
42
|
+
edge: "start",
|
|
43
|
+
size: "small"
|
|
44
|
+
},
|
|
45
|
+
style: { marginLeft: -3 }
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
props: ({ edge: e, ownerState: t }) => e === "start" && t.size !== "small",
|
|
49
|
+
style: { marginLeft: -12 }
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
props: {
|
|
53
|
+
edge: "end",
|
|
54
|
+
size: "small"
|
|
55
|
+
},
|
|
56
|
+
style: { marginRight: -3 }
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
props: ({ edge: e, ownerState: t }) => e === "end" && t.size !== "small",
|
|
60
|
+
style: { marginRight: -12 }
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}), Y = z("input", {
|
|
64
|
+
name: "MuiSwitchBase",
|
|
65
|
+
shouldForwardProp: j
|
|
66
|
+
})({
|
|
67
|
+
cursor: "inherit",
|
|
68
|
+
position: "absolute",
|
|
69
|
+
opacity: 0,
|
|
70
|
+
width: "100%",
|
|
71
|
+
height: "100%",
|
|
72
|
+
top: 0,
|
|
73
|
+
left: 0,
|
|
74
|
+
margin: 0,
|
|
75
|
+
padding: 0,
|
|
76
|
+
zIndex: 1
|
|
77
|
+
}), Pe = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
78
|
+
let { autoFocus: n, checked: r, checkedIcon: i, defaultChecked: a, disabled: o, disableFocusRipple: s = !1, edge: c = !1, icon: l, id: u, inputProps: d, inputRef: f, name: p, onBlur: h, onChange: g, onFocus: _, readOnly: v, required: y = !1, tabIndex: b, type: x, value: S, slots: C = {}, slotProps: w = {}, ...T } = e, [E, D] = m({
|
|
79
|
+
controlled: r,
|
|
80
|
+
default: !!a,
|
|
81
|
+
name: "SwitchBase",
|
|
82
|
+
state: "checked"
|
|
83
|
+
}), O = se(), k = (e) => {
|
|
84
|
+
_ && _(e), O && O.onFocus && O.onFocus(e);
|
|
85
|
+
}, A = (e) => {
|
|
86
|
+
h && h(e), O && O.onBlur && O.onBlur(e);
|
|
87
|
+
}, ee = (e) => {
|
|
88
|
+
if (e.nativeEvent.defaultPrevented || v) return;
|
|
89
|
+
let t = e.target.checked;
|
|
90
|
+
D(t), g && g(e, t);
|
|
91
|
+
}, j = o;
|
|
92
|
+
O && j === void 0 && (j = O.disabled);
|
|
93
|
+
let M = x === "checkbox" || x === "radio", te = {
|
|
94
|
+
...e,
|
|
95
|
+
checked: E,
|
|
96
|
+
disabled: j,
|
|
97
|
+
disableFocusRipple: s,
|
|
98
|
+
edge: c
|
|
99
|
+
}, N = Me(te), ne = {
|
|
100
|
+
slots: C,
|
|
101
|
+
slotProps: {
|
|
102
|
+
input: d,
|
|
103
|
+
...w
|
|
104
|
+
}
|
|
105
|
+
}, [P, F] = H("root", {
|
|
106
|
+
ref: t,
|
|
107
|
+
elementType: Ne,
|
|
108
|
+
className: N.root,
|
|
109
|
+
shouldForwardComponentProp: !0,
|
|
110
|
+
externalForwardedProps: {
|
|
111
|
+
...ne,
|
|
112
|
+
component: "span",
|
|
113
|
+
...T
|
|
114
|
+
},
|
|
115
|
+
getSlotProps: (e) => ({
|
|
116
|
+
...e,
|
|
117
|
+
onFocus: (t) => {
|
|
118
|
+
e.onFocus?.(t), k(t);
|
|
119
|
+
},
|
|
120
|
+
onBlur: (t) => {
|
|
121
|
+
e.onBlur?.(t), A(t);
|
|
122
|
+
}
|
|
123
|
+
}),
|
|
124
|
+
ownerState: te,
|
|
125
|
+
additionalProps: {
|
|
126
|
+
centerRipple: !0,
|
|
127
|
+
focusRipple: !s,
|
|
128
|
+
role: void 0,
|
|
129
|
+
tabIndex: null
|
|
130
|
+
}
|
|
131
|
+
}), [re, I] = H("input", {
|
|
132
|
+
ref: f,
|
|
133
|
+
elementType: Y,
|
|
134
|
+
className: N.input,
|
|
135
|
+
externalForwardedProps: ne,
|
|
136
|
+
getSlotProps: (e) => ({
|
|
137
|
+
...e,
|
|
138
|
+
onChange: (t) => {
|
|
139
|
+
e.onChange?.(t), ee(t);
|
|
140
|
+
}
|
|
141
|
+
}),
|
|
142
|
+
ownerState: te,
|
|
143
|
+
additionalProps: {
|
|
144
|
+
autoFocus: n,
|
|
145
|
+
checked: r,
|
|
146
|
+
defaultChecked: a,
|
|
147
|
+
disabled: j,
|
|
148
|
+
id: M ? u : void 0,
|
|
149
|
+
name: p,
|
|
150
|
+
readOnly: v,
|
|
151
|
+
required: y,
|
|
152
|
+
tabIndex: b,
|
|
153
|
+
type: x,
|
|
154
|
+
...x === "checkbox" && S === void 0 ? {} : { value: S }
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
return /*#__PURE__*/ J(P, {
|
|
158
|
+
...F,
|
|
159
|
+
children: [/*#__PURE__*/ q(re, { ...I }), E ? i : l]
|
|
160
|
+
});
|
|
161
|
+
}), Fe = E(/*#__PURE__*/ q("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }), "CheckBoxOutlineBlank"), Ie = E(/*#__PURE__*/ q("path", { d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }), "CheckBox"), Le = E(/*#__PURE__*/ q("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z" }), "IndeterminateCheckBox");
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Checkbox/checkboxClasses.js
|
|
164
|
+
function Re(e) {
|
|
165
|
+
return I("MuiCheckbox", e);
|
|
166
|
+
}
|
|
167
|
+
var ze = P("MuiCheckbox", [
|
|
168
|
+
"root",
|
|
169
|
+
"checked",
|
|
170
|
+
"disabled",
|
|
171
|
+
"indeterminate",
|
|
172
|
+
"colorPrimary",
|
|
173
|
+
"colorSecondary",
|
|
174
|
+
"sizeSmall",
|
|
175
|
+
"sizeMedium"
|
|
176
|
+
]), Be = (e) => {
|
|
177
|
+
let { classes: t, indeterminate: n, color: r, size: i } = e, a = B({ root: [
|
|
178
|
+
"root",
|
|
179
|
+
n && "indeterminate",
|
|
180
|
+
`color${p(r)}`,
|
|
181
|
+
`size${p(i)}`
|
|
182
|
+
] }, Re, t);
|
|
183
|
+
return {
|
|
184
|
+
...t,
|
|
185
|
+
...a
|
|
186
|
+
};
|
|
187
|
+
}, Ve = z(Pe, {
|
|
188
|
+
shouldForwardProp: (e) => j(e) || e === "classes",
|
|
189
|
+
name: "MuiCheckbox",
|
|
190
|
+
slot: "Root",
|
|
191
|
+
overridesResolver: (e, t) => {
|
|
192
|
+
let { ownerState: n } = e;
|
|
193
|
+
return [
|
|
194
|
+
t.root,
|
|
195
|
+
n.indeterminate && t.indeterminate,
|
|
196
|
+
t[`size${p(n.size)}`],
|
|
197
|
+
n.color !== "default" && t[`color${p(n.color)}`]
|
|
198
|
+
];
|
|
199
|
+
}
|
|
200
|
+
})(g(({ theme: e }) => ({
|
|
201
|
+
color: (e.vars || e).palette.text.secondary,
|
|
202
|
+
variants: [
|
|
203
|
+
{
|
|
204
|
+
props: {
|
|
205
|
+
color: "default",
|
|
206
|
+
disableRipple: !1
|
|
207
|
+
},
|
|
208
|
+
style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity) } }
|
|
209
|
+
},
|
|
210
|
+
...Object.entries(e.palette).filter(h()).map(([t]) => ({
|
|
211
|
+
props: {
|
|
212
|
+
color: t,
|
|
213
|
+
disableRipple: !1
|
|
214
|
+
},
|
|
215
|
+
style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity) } }
|
|
216
|
+
})),
|
|
217
|
+
...Object.entries(e.palette).filter(h()).map(([t]) => ({
|
|
218
|
+
props: { color: t },
|
|
219
|
+
style: {
|
|
220
|
+
[`&.${ze.checked}, &.${ze.indeterminate}`]: { color: (e.vars || e).palette[t].main },
|
|
221
|
+
[`&.${ze.disabled}`]: { color: (e.vars || e).palette.action.disabled }
|
|
222
|
+
}
|
|
223
|
+
})),
|
|
224
|
+
{
|
|
225
|
+
props: { disableRipple: !1 },
|
|
226
|
+
style: { "&:hover": { "@media (hover: none)": { backgroundColor: "transparent" } } }
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}))), He = /*#__PURE__*/ q(Ie, {}), Ue = /*#__PURE__*/ q(Fe, {}), We = /*#__PURE__*/ q(Le, {}), Ge = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
230
|
+
let n = F({
|
|
231
|
+
props: e,
|
|
232
|
+
name: "MuiCheckbox"
|
|
233
|
+
}), { checkedIcon: r = He, color: i = "primary", icon: a = Ue, indeterminate: o = !1, indeterminateIcon: s = We, inputProps: c, size: l = "medium", disableRipple: d = !1, className: f, slots: p = {}, slotProps: m = {}, ...h } = n, g = o ? s : a, _ = o ? s : r, v = {
|
|
234
|
+
...n,
|
|
235
|
+
disableRipple: d,
|
|
236
|
+
color: i,
|
|
237
|
+
indeterminate: o,
|
|
238
|
+
size: l
|
|
239
|
+
}, y = Be(v), b = m.input ?? c, [x, S] = H("root", {
|
|
240
|
+
ref: t,
|
|
241
|
+
elementType: Ve,
|
|
242
|
+
className: he(y.root, f),
|
|
243
|
+
shouldForwardComponentProp: !0,
|
|
244
|
+
externalForwardedProps: {
|
|
245
|
+
slots: p,
|
|
246
|
+
slotProps: m,
|
|
247
|
+
...h
|
|
248
|
+
},
|
|
249
|
+
ownerState: v,
|
|
250
|
+
additionalProps: {
|
|
251
|
+
type: "checkbox",
|
|
252
|
+
icon: /*#__PURE__*/ G.cloneElement(g, { fontSize: g.props.fontSize ?? l }),
|
|
253
|
+
checkedIcon: /*#__PURE__*/ G.cloneElement(_, { fontSize: _.props.fontSize ?? l }),
|
|
254
|
+
disableRipple: d,
|
|
255
|
+
slots: p,
|
|
256
|
+
slotProps: { input: u(typeof b == "function" ? b(v) : b, {
|
|
257
|
+
"data-indeterminate": o,
|
|
258
|
+
"aria-checked": o ? "mixed" : void 0
|
|
259
|
+
}) }
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
return /*#__PURE__*/ q(x, {
|
|
263
|
+
...S,
|
|
264
|
+
classes: y
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControlLabel/formControlLabelClasses.js
|
|
269
|
+
function Ke(e) {
|
|
270
|
+
return I("MuiFormControlLabel", e);
|
|
271
|
+
}
|
|
272
|
+
var qe = P("MuiFormControlLabel", [
|
|
273
|
+
"root",
|
|
274
|
+
"labelPlacementStart",
|
|
275
|
+
"labelPlacementTop",
|
|
276
|
+
"labelPlacementBottom",
|
|
277
|
+
"disabled",
|
|
278
|
+
"label",
|
|
279
|
+
"error",
|
|
280
|
+
"required",
|
|
281
|
+
"asterisk"
|
|
282
|
+
]), Je = (e) => {
|
|
283
|
+
let { classes: t, disabled: n, labelPlacement: r, error: i, required: a } = e;
|
|
284
|
+
return B({
|
|
285
|
+
root: [
|
|
286
|
+
"root",
|
|
287
|
+
n && "disabled",
|
|
288
|
+
`labelPlacement${p(r)}`,
|
|
289
|
+
i && "error",
|
|
290
|
+
a && "required"
|
|
291
|
+
],
|
|
292
|
+
label: ["label", n && "disabled"],
|
|
293
|
+
asterisk: ["asterisk", i && "error"]
|
|
294
|
+
}, Ke, t);
|
|
295
|
+
}, Ye = z("label", {
|
|
296
|
+
name: "MuiFormControlLabel",
|
|
297
|
+
slot: "Root",
|
|
298
|
+
overridesResolver: (e, t) => {
|
|
299
|
+
let { ownerState: n } = e;
|
|
300
|
+
return [
|
|
301
|
+
{ [`& .${qe.label}`]: t.label },
|
|
302
|
+
t.root,
|
|
303
|
+
t[`labelPlacement${p(n.labelPlacement)}`]
|
|
304
|
+
];
|
|
305
|
+
}
|
|
306
|
+
})(g(({ theme: e }) => ({
|
|
307
|
+
display: "inline-flex",
|
|
308
|
+
alignItems: "center",
|
|
309
|
+
cursor: "pointer",
|
|
310
|
+
verticalAlign: "middle",
|
|
311
|
+
WebkitTapHighlightColor: "transparent",
|
|
312
|
+
marginLeft: -11,
|
|
313
|
+
marginRight: 16,
|
|
314
|
+
[`&.${qe.disabled}`]: { cursor: "default" },
|
|
315
|
+
[`& .${qe.label}`]: { [`&.${qe.disabled}`]: { color: (e.vars || e).palette.text.disabled } },
|
|
316
|
+
variants: [
|
|
317
|
+
{
|
|
318
|
+
props: { labelPlacement: "start" },
|
|
319
|
+
style: {
|
|
320
|
+
flexDirection: "row-reverse",
|
|
321
|
+
marginRight: -11
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
props: { labelPlacement: "top" },
|
|
326
|
+
style: { flexDirection: "column-reverse" }
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
props: { labelPlacement: "bottom" },
|
|
330
|
+
style: { flexDirection: "column" }
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
props: ({ labelPlacement: e }) => e === "start" || e === "top" || e === "bottom",
|
|
334
|
+
style: { marginLeft: 16 }
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
}))), Xe = z("span", {
|
|
338
|
+
name: "MuiFormControlLabel",
|
|
339
|
+
slot: "Asterisk"
|
|
340
|
+
})(g(({ theme: e }) => ({ [`&.${qe.error}`]: { color: (e.vars || e).palette.error.main } }))), Ze = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
341
|
+
let n = F({
|
|
342
|
+
props: e,
|
|
343
|
+
name: "MuiFormControlLabel"
|
|
344
|
+
}), { checked: r, className: i, componentsProps: a = {}, control: o, disabled: s, disableTypography: c, inputRef: l, label: u, labelPlacement: d = "end", name: f, onChange: p, required: m, slots: h = {}, slotProps: g = {}, value: _, ...v } = n, y = se(), x = s ?? o.props.disabled ?? y?.disabled, S = m ?? o.props.required, C = {
|
|
345
|
+
disabled: x,
|
|
346
|
+
required: S
|
|
347
|
+
};
|
|
348
|
+
[
|
|
349
|
+
"checked",
|
|
350
|
+
"name",
|
|
351
|
+
"onChange",
|
|
352
|
+
"value",
|
|
353
|
+
"inputRef"
|
|
354
|
+
].forEach((e) => {
|
|
355
|
+
o.props[e] === void 0 && n[e] !== void 0 && (C[e] = n[e]);
|
|
356
|
+
});
|
|
357
|
+
let w = b({
|
|
358
|
+
props: n,
|
|
359
|
+
muiFormControl: y,
|
|
360
|
+
states: ["error"]
|
|
361
|
+
}), T = {
|
|
362
|
+
...n,
|
|
363
|
+
disabled: x,
|
|
364
|
+
labelPlacement: d,
|
|
365
|
+
required: S,
|
|
366
|
+
error: w.error
|
|
367
|
+
}, E = Je(T), [D, O] = H("typography", {
|
|
368
|
+
elementType: W,
|
|
369
|
+
externalForwardedProps: {
|
|
370
|
+
slots: h,
|
|
371
|
+
slotProps: {
|
|
372
|
+
...a,
|
|
373
|
+
...g
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
ownerState: T
|
|
377
|
+
}), k = u;
|
|
378
|
+
return k != null && k.type !== W && !c && (k = /*#__PURE__*/ q(D, {
|
|
379
|
+
component: "span",
|
|
380
|
+
...O,
|
|
381
|
+
className: he(E.label, O?.className),
|
|
382
|
+
children: k
|
|
383
|
+
})), /*#__PURE__*/ J(Ye, {
|
|
384
|
+
className: he(E.root, i),
|
|
385
|
+
ownerState: T,
|
|
386
|
+
ref: t,
|
|
387
|
+
...v,
|
|
388
|
+
children: [/*#__PURE__*/ G.cloneElement(o, C), S ? /*#__PURE__*/ J("div", { children: [k, /*#__PURE__*/ J(Xe, {
|
|
389
|
+
ownerState: T,
|
|
390
|
+
"aria-hidden": !0,
|
|
391
|
+
className: E.asterisk,
|
|
392
|
+
children: [" ", "*"]
|
|
393
|
+
})] }) : k]
|
|
394
|
+
});
|
|
395
|
+
});
|
|
396
|
+
//#endregion
|
|
397
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputAdornment/inputAdornmentClasses.js
|
|
398
|
+
function Qe(e) {
|
|
399
|
+
return I("MuiInputAdornment", e);
|
|
400
|
+
}
|
|
401
|
+
var $e = P("MuiInputAdornment", [
|
|
402
|
+
"root",
|
|
403
|
+
"filled",
|
|
404
|
+
"standard",
|
|
405
|
+
"outlined",
|
|
406
|
+
"positionStart",
|
|
407
|
+
"positionEnd",
|
|
408
|
+
"disablePointerEvents",
|
|
409
|
+
"hiddenLabel",
|
|
410
|
+
"sizeSmall"
|
|
411
|
+
]), et, tt = (e, t) => {
|
|
412
|
+
let { ownerState: n } = e;
|
|
413
|
+
return [
|
|
414
|
+
t.root,
|
|
415
|
+
t[`position${p(n.position)}`],
|
|
416
|
+
n.disablePointerEvents === !0 && t.disablePointerEvents,
|
|
417
|
+
t[n.variant]
|
|
418
|
+
];
|
|
419
|
+
}, nt = (e) => {
|
|
420
|
+
let { classes: t, disablePointerEvents: n, hiddenLabel: r, position: i, size: a, variant: o } = e;
|
|
421
|
+
return B({ root: [
|
|
422
|
+
"root",
|
|
423
|
+
n && "disablePointerEvents",
|
|
424
|
+
i && `position${p(i)}`,
|
|
425
|
+
o,
|
|
426
|
+
r && "hiddenLabel",
|
|
427
|
+
a && `size${p(a)}`
|
|
428
|
+
] }, Qe, t);
|
|
429
|
+
}, rt = z("div", {
|
|
430
|
+
name: "MuiInputAdornment",
|
|
431
|
+
slot: "Root",
|
|
432
|
+
overridesResolver: tt
|
|
433
|
+
})(g(({ theme: e }) => ({
|
|
434
|
+
display: "flex",
|
|
435
|
+
maxHeight: "2em",
|
|
436
|
+
alignItems: "center",
|
|
437
|
+
whiteSpace: "nowrap",
|
|
438
|
+
color: (e.vars || e).palette.action.active,
|
|
439
|
+
variants: [
|
|
440
|
+
{
|
|
441
|
+
props: { variant: "filled" },
|
|
442
|
+
style: { [`&.${$e.positionStart}&:not(.${$e.hiddenLabel})`]: { marginTop: 16 } }
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
props: { position: "start" },
|
|
446
|
+
style: { marginRight: 8 }
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
props: { position: "end" },
|
|
450
|
+
style: { marginLeft: 8 }
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
props: { disablePointerEvents: !0 },
|
|
454
|
+
style: { pointerEvents: "none" }
|
|
455
|
+
}
|
|
456
|
+
]
|
|
457
|
+
}))), it = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
458
|
+
let n = F({
|
|
459
|
+
props: e,
|
|
460
|
+
name: "MuiInputAdornment"
|
|
461
|
+
}), { children: r, className: i, component: a = "div", disablePointerEvents: o = !1, disableTypography: s = !1, position: c, variant: l, ...u } = n, d = se() || {}, f = l;
|
|
462
|
+
l && d.variant, d && !f && (f = d.variant);
|
|
463
|
+
let p = {
|
|
464
|
+
...n,
|
|
465
|
+
hiddenLabel: d.hiddenLabel,
|
|
466
|
+
size: d.size,
|
|
467
|
+
disablePointerEvents: o,
|
|
468
|
+
position: c,
|
|
469
|
+
variant: f
|
|
470
|
+
}, m = nt(p);
|
|
471
|
+
return /*#__PURE__*/ q(y.Provider, {
|
|
472
|
+
value: null,
|
|
473
|
+
children: /*#__PURE__*/ q(rt, {
|
|
474
|
+
as: a,
|
|
475
|
+
ownerState: p,
|
|
476
|
+
className: he(m.root, i),
|
|
477
|
+
ref: t,
|
|
478
|
+
...u,
|
|
479
|
+
children: typeof r == "string" && !s ? /*#__PURE__*/ q(W, {
|
|
480
|
+
color: "textSecondary",
|
|
481
|
+
children: r
|
|
482
|
+
}) : /*#__PURE__*/ J(G.Fragment, { children: [c === "start" ? et ||= /*#__PURE__*/ q("span", {
|
|
483
|
+
className: "notranslate",
|
|
484
|
+
"aria-hidden": !0,
|
|
485
|
+
children: ""
|
|
486
|
+
}) : null, r] })
|
|
487
|
+
})
|
|
488
|
+
});
|
|
489
|
+
}), at = E(/*#__PURE__*/ q("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" }), "RadioButtonUnchecked"), ot = E(/*#__PURE__*/ q("path", { d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z" }), "RadioButtonChecked"), st = z("span", {
|
|
490
|
+
name: "MuiRadioButtonIcon",
|
|
491
|
+
shouldForwardProp: j
|
|
492
|
+
})({
|
|
493
|
+
position: "relative",
|
|
494
|
+
display: "flex"
|
|
495
|
+
}), ct = z(at, { name: "MuiRadioButtonIcon" })({ transform: "scale(1)" }), lt = z(ot, { name: "MuiRadioButtonIcon" })(g(({ theme: e }) => ({
|
|
496
|
+
left: 0,
|
|
497
|
+
position: "absolute",
|
|
498
|
+
transform: "scale(0)",
|
|
499
|
+
transition: e.transitions.create("transform", {
|
|
500
|
+
easing: e.transitions.easing.easeIn,
|
|
501
|
+
duration: e.transitions.duration.shortest
|
|
502
|
+
}),
|
|
503
|
+
variants: [{
|
|
504
|
+
props: { checked: !0 },
|
|
505
|
+
style: {
|
|
506
|
+
transform: "scale(1)",
|
|
507
|
+
transition: e.transitions.create("transform", {
|
|
508
|
+
easing: e.transitions.easing.easeOut,
|
|
509
|
+
duration: e.transitions.duration.shortest
|
|
510
|
+
})
|
|
511
|
+
}
|
|
512
|
+
}]
|
|
513
|
+
})));
|
|
514
|
+
function ut(e) {
|
|
515
|
+
let { checked: t = !1, classes: n = {}, fontSize: r } = e, i = {
|
|
516
|
+
...e,
|
|
517
|
+
checked: t
|
|
518
|
+
};
|
|
519
|
+
return /*#__PURE__*/ J(st, {
|
|
520
|
+
className: n.root,
|
|
521
|
+
ownerState: i,
|
|
522
|
+
children: [/*#__PURE__*/ q(ct, {
|
|
523
|
+
fontSize: r,
|
|
524
|
+
className: n.background,
|
|
525
|
+
ownerState: i
|
|
526
|
+
}), /*#__PURE__*/ q(lt, {
|
|
527
|
+
fontSize: r,
|
|
528
|
+
className: n.dot,
|
|
529
|
+
ownerState: i
|
|
530
|
+
})]
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/RadioGroupContext.js
|
|
535
|
+
var dt = /*#__PURE__*/ G.createContext(void 0);
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/useRadioGroup.js
|
|
538
|
+
function ft() {
|
|
539
|
+
return G.useContext(dt);
|
|
540
|
+
}
|
|
541
|
+
//#endregion
|
|
542
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/radioClasses.js
|
|
543
|
+
function pt(e) {
|
|
544
|
+
return I("MuiRadio", e);
|
|
545
|
+
}
|
|
546
|
+
var mt = P("MuiRadio", [
|
|
547
|
+
"root",
|
|
548
|
+
"checked",
|
|
549
|
+
"disabled",
|
|
550
|
+
"colorPrimary",
|
|
551
|
+
"colorSecondary",
|
|
552
|
+
"sizeSmall"
|
|
553
|
+
]), ht = (e) => {
|
|
554
|
+
let { classes: t, color: n, size: r } = e, i = { root: [
|
|
555
|
+
"root",
|
|
556
|
+
`color${p(n)}`,
|
|
557
|
+
r !== "medium" && `size${p(r)}`
|
|
558
|
+
] };
|
|
559
|
+
return {
|
|
560
|
+
...t,
|
|
561
|
+
...B(i, pt, t)
|
|
562
|
+
};
|
|
563
|
+
}, gt = z(Pe, {
|
|
564
|
+
shouldForwardProp: (e) => j(e) || e === "classes",
|
|
565
|
+
name: "MuiRadio",
|
|
566
|
+
slot: "Root",
|
|
567
|
+
overridesResolver: (e, t) => {
|
|
568
|
+
let { ownerState: n } = e;
|
|
569
|
+
return [
|
|
570
|
+
t.root,
|
|
571
|
+
n.size !== "medium" && t[`size${p(n.size)}`],
|
|
572
|
+
t[`color${p(n.color)}`]
|
|
573
|
+
];
|
|
574
|
+
}
|
|
575
|
+
})(g(({ theme: e }) => ({
|
|
576
|
+
color: (e.vars || e).palette.text.secondary,
|
|
577
|
+
[`&.${mt.disabled}`]: { color: (e.vars || e).palette.action.disabled },
|
|
578
|
+
variants: [
|
|
579
|
+
{
|
|
580
|
+
props: {
|
|
581
|
+
color: "default",
|
|
582
|
+
disabled: !1,
|
|
583
|
+
disableRipple: !1
|
|
584
|
+
},
|
|
585
|
+
style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity) } }
|
|
586
|
+
},
|
|
587
|
+
...Object.entries(e.palette).filter(h()).map(([t]) => ({
|
|
588
|
+
props: {
|
|
589
|
+
color: t,
|
|
590
|
+
disabled: !1,
|
|
591
|
+
disableRipple: !1
|
|
592
|
+
},
|
|
593
|
+
style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity) } }
|
|
594
|
+
})),
|
|
595
|
+
...Object.entries(e.palette).filter(h()).map(([t]) => ({
|
|
596
|
+
props: {
|
|
597
|
+
color: t,
|
|
598
|
+
disabled: !1
|
|
599
|
+
},
|
|
600
|
+
style: { [`&.${mt.checked}`]: { color: (e.vars || e).palette[t].main } }
|
|
601
|
+
})),
|
|
602
|
+
{
|
|
603
|
+
props: { disableRipple: !1 },
|
|
604
|
+
style: { "&:hover": { "@media (hover: none)": { backgroundColor: "transparent" } } }
|
|
605
|
+
}
|
|
606
|
+
]
|
|
607
|
+
})));
|
|
608
|
+
function _t(e, t) {
|
|
609
|
+
return typeof t == "object" && t ? e === t : String(e) === String(t);
|
|
610
|
+
}
|
|
611
|
+
var vt = /*#__PURE__*/ q(ut, { checked: !0 }), yt = /*#__PURE__*/ q(ut, {}), bt = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
612
|
+
let n = F({
|
|
613
|
+
props: e,
|
|
614
|
+
name: "MuiRadio"
|
|
615
|
+
}), { checked: r, checkedIcon: i = vt, color: a = "primary", icon: o = yt, name: s, onChange: c, size: l = "medium", className: u, disabled: d, disableRipple: f = !1, slots: p = {}, slotProps: m = {}, inputProps: h, ...g } = n, _ = se(), v = d;
|
|
616
|
+
_ && v === void 0 && (v = _.disabled), v ??= !1;
|
|
617
|
+
let y = {
|
|
618
|
+
...n,
|
|
619
|
+
disabled: v,
|
|
620
|
+
disableRipple: f,
|
|
621
|
+
color: a,
|
|
622
|
+
size: l
|
|
623
|
+
}, b = ht(y), x = ft(), S = r, C = Ae(c, x && x.onChange), w = s;
|
|
624
|
+
x && (S === void 0 && (S = _t(x.value, n.value)), w === void 0 && (w = x.name));
|
|
625
|
+
let T = m.input ?? h, [E, D] = H("root", {
|
|
626
|
+
ref: t,
|
|
627
|
+
elementType: gt,
|
|
628
|
+
className: he(b.root, u),
|
|
629
|
+
shouldForwardComponentProp: !0,
|
|
630
|
+
externalForwardedProps: {
|
|
631
|
+
slots: p,
|
|
632
|
+
slotProps: m,
|
|
633
|
+
...g
|
|
634
|
+
},
|
|
635
|
+
getSlotProps: (e) => ({
|
|
636
|
+
...e,
|
|
637
|
+
onChange: (t, ...n) => {
|
|
638
|
+
e.onChange?.(t, ...n), C(t, ...n);
|
|
639
|
+
}
|
|
640
|
+
}),
|
|
641
|
+
ownerState: y,
|
|
642
|
+
additionalProps: {
|
|
643
|
+
type: "radio",
|
|
644
|
+
icon: /*#__PURE__*/ G.cloneElement(o, { fontSize: o.props.fontSize ?? l }),
|
|
645
|
+
checkedIcon: /*#__PURE__*/ G.cloneElement(i, { fontSize: i.props.fontSize ?? l }),
|
|
646
|
+
disabled: v,
|
|
647
|
+
name: w,
|
|
648
|
+
checked: S,
|
|
649
|
+
slots: p,
|
|
650
|
+
slotProps: { input: typeof T == "function" ? T(y) : T }
|
|
651
|
+
}
|
|
652
|
+
});
|
|
653
|
+
return /*#__PURE__*/ q(E, {
|
|
654
|
+
...D,
|
|
655
|
+
classes: b
|
|
656
|
+
});
|
|
657
|
+
});
|
|
658
|
+
//#endregion
|
|
659
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/tooltipClasses.js
|
|
660
|
+
function xt(e) {
|
|
661
|
+
return I("MuiTooltip", e);
|
|
662
|
+
}
|
|
663
|
+
var X = P("MuiTooltip", [
|
|
664
|
+
"popper",
|
|
665
|
+
"popperInteractive",
|
|
666
|
+
"popperArrow",
|
|
667
|
+
"popperClose",
|
|
668
|
+
"tooltip",
|
|
669
|
+
"tooltipArrow",
|
|
670
|
+
"touch",
|
|
671
|
+
"tooltipPlacementLeft",
|
|
672
|
+
"tooltipPlacementRight",
|
|
673
|
+
"tooltipPlacementTop",
|
|
674
|
+
"tooltipPlacementBottom",
|
|
675
|
+
"arrow"
|
|
676
|
+
]);
|
|
677
|
+
//#endregion
|
|
678
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/Tooltip.js
|
|
679
|
+
function St(e) {
|
|
680
|
+
return Math.round(e * 1e5) / 1e5;
|
|
681
|
+
}
|
|
682
|
+
var Ct = (e) => {
|
|
683
|
+
let { classes: t, disableInteractive: n, arrow: r, touch: i, placement: a } = e;
|
|
684
|
+
return B({
|
|
685
|
+
popper: [
|
|
686
|
+
"popper",
|
|
687
|
+
!n && "popperInteractive",
|
|
688
|
+
r && "popperArrow"
|
|
689
|
+
],
|
|
690
|
+
tooltip: [
|
|
691
|
+
"tooltip",
|
|
692
|
+
r && "tooltipArrow",
|
|
693
|
+
i && "touch",
|
|
694
|
+
`tooltipPlacement${p(a.split("-")[0])}`
|
|
695
|
+
],
|
|
696
|
+
arrow: ["arrow"]
|
|
697
|
+
}, xt, t);
|
|
698
|
+
}, wt = z(te, {
|
|
699
|
+
name: "MuiTooltip",
|
|
700
|
+
slot: "Popper",
|
|
701
|
+
overridesResolver: (e, t) => {
|
|
702
|
+
let { ownerState: n } = e;
|
|
703
|
+
return [
|
|
704
|
+
t.popper,
|
|
705
|
+
!n.disableInteractive && t.popperInteractive,
|
|
706
|
+
n.arrow && t.popperArrow,
|
|
707
|
+
!n.open && t.popperClose
|
|
708
|
+
];
|
|
709
|
+
}
|
|
710
|
+
})(g(({ theme: e }) => ({
|
|
711
|
+
zIndex: (e.vars || e).zIndex.tooltip,
|
|
712
|
+
pointerEvents: "none",
|
|
713
|
+
variants: [
|
|
714
|
+
{
|
|
715
|
+
props: ({ ownerState: e }) => !e.disableInteractive,
|
|
716
|
+
style: { pointerEvents: "auto" }
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
props: ({ open: e }) => !e,
|
|
720
|
+
style: { pointerEvents: "none" }
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
props: ({ ownerState: e }) => e.arrow,
|
|
724
|
+
style: {
|
|
725
|
+
[`&[data-popper-placement*="bottom"] .${X.arrow}`]: {
|
|
726
|
+
top: 0,
|
|
727
|
+
marginTop: "-0.71em",
|
|
728
|
+
"&::before": { transformOrigin: "0 100%" }
|
|
729
|
+
},
|
|
730
|
+
[`&[data-popper-placement*="top"] .${X.arrow}`]: {
|
|
731
|
+
bottom: 0,
|
|
732
|
+
marginBottom: "-0.71em",
|
|
733
|
+
"&::before": { transformOrigin: "100% 0" }
|
|
734
|
+
},
|
|
735
|
+
[`&[data-popper-placement*="right"] .${X.arrow}`]: {
|
|
736
|
+
height: "1em",
|
|
737
|
+
width: "0.71em",
|
|
738
|
+
"&::before": { transformOrigin: "100% 100%" }
|
|
739
|
+
},
|
|
740
|
+
[`&[data-popper-placement*="left"] .${X.arrow}`]: {
|
|
741
|
+
height: "1em",
|
|
742
|
+
width: "0.71em",
|
|
743
|
+
"&::before": { transformOrigin: "0 0" }
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
props: ({ ownerState: e }) => e.arrow && !e.isRtl,
|
|
749
|
+
style: { [`&[data-popper-placement*="right"] .${X.arrow}`]: {
|
|
750
|
+
left: 0,
|
|
751
|
+
marginLeft: "-0.71em"
|
|
752
|
+
} }
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
props: ({ ownerState: e }) => e.arrow && !!e.isRtl,
|
|
756
|
+
style: { [`&[data-popper-placement*="right"] .${X.arrow}`]: {
|
|
757
|
+
right: 0,
|
|
758
|
+
marginRight: "-0.71em"
|
|
759
|
+
} }
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
props: ({ ownerState: e }) => e.arrow && !e.isRtl,
|
|
763
|
+
style: { [`&[data-popper-placement*="left"] .${X.arrow}`]: {
|
|
764
|
+
right: 0,
|
|
765
|
+
marginRight: "-0.71em"
|
|
766
|
+
} }
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
props: ({ ownerState: e }) => e.arrow && !!e.isRtl,
|
|
770
|
+
style: { [`&[data-popper-placement*="left"] .${X.arrow}`]: {
|
|
771
|
+
left: 0,
|
|
772
|
+
marginLeft: "-0.71em"
|
|
773
|
+
} }
|
|
774
|
+
}
|
|
775
|
+
]
|
|
776
|
+
}))), Tt = z("div", {
|
|
777
|
+
name: "MuiTooltip",
|
|
778
|
+
slot: "Tooltip",
|
|
779
|
+
overridesResolver: (e, t) => {
|
|
780
|
+
let { ownerState: n } = e;
|
|
781
|
+
return [
|
|
782
|
+
t.tooltip,
|
|
783
|
+
n.touch && t.touch,
|
|
784
|
+
n.arrow && t.tooltipArrow,
|
|
785
|
+
t[`tooltipPlacement${p(n.placement.split("-")[0])}`]
|
|
786
|
+
];
|
|
787
|
+
}
|
|
788
|
+
})(g(({ theme: e }) => ({
|
|
789
|
+
backgroundColor: e.vars ? e.vars.palette.Tooltip.bg : e.alpha(e.palette.grey[700], .92),
|
|
790
|
+
borderRadius: (e.vars || e).shape.borderRadius,
|
|
791
|
+
color: (e.vars || e).palette.common.white,
|
|
792
|
+
fontFamily: e.typography.fontFamily,
|
|
793
|
+
padding: "4px 8px",
|
|
794
|
+
fontSize: e.typography.pxToRem(11),
|
|
795
|
+
maxWidth: 300,
|
|
796
|
+
margin: 2,
|
|
797
|
+
wordWrap: "break-word",
|
|
798
|
+
fontWeight: e.typography.fontWeightMedium,
|
|
799
|
+
[`.${X.popper}[data-popper-placement*="left"] &`]: { transformOrigin: "right center" },
|
|
800
|
+
[`.${X.popper}[data-popper-placement*="right"] &`]: { transformOrigin: "left center" },
|
|
801
|
+
[`.${X.popper}[data-popper-placement*="top"] &`]: {
|
|
802
|
+
transformOrigin: "center bottom",
|
|
803
|
+
marginBottom: "14px"
|
|
804
|
+
},
|
|
805
|
+
[`.${X.popper}[data-popper-placement*="bottom"] &`]: {
|
|
806
|
+
transformOrigin: "center top",
|
|
807
|
+
marginTop: "14px"
|
|
808
|
+
},
|
|
809
|
+
variants: [
|
|
810
|
+
{
|
|
811
|
+
props: ({ ownerState: e }) => e.arrow,
|
|
812
|
+
style: {
|
|
813
|
+
position: "relative",
|
|
814
|
+
margin: 0
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
props: ({ ownerState: e }) => e.touch,
|
|
819
|
+
style: {
|
|
820
|
+
padding: "8px 16px",
|
|
821
|
+
fontSize: e.typography.pxToRem(14),
|
|
822
|
+
lineHeight: `${St(16 / 14)}em`,
|
|
823
|
+
fontWeight: e.typography.fontWeightRegular
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
props: ({ ownerState: e }) => !e.isRtl,
|
|
828
|
+
style: {
|
|
829
|
+
[`.${X.popper}[data-popper-placement*="left"] &`]: { marginRight: "14px" },
|
|
830
|
+
[`.${X.popper}[data-popper-placement*="right"] &`]: { marginLeft: "14px" }
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
props: ({ ownerState: e }) => !e.isRtl && e.touch,
|
|
835
|
+
style: {
|
|
836
|
+
[`.${X.popper}[data-popper-placement*="left"] &`]: { marginRight: "24px" },
|
|
837
|
+
[`.${X.popper}[data-popper-placement*="right"] &`]: { marginLeft: "24px" }
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
props: ({ ownerState: e }) => !!e.isRtl,
|
|
842
|
+
style: {
|
|
843
|
+
[`.${X.popper}[data-popper-placement*="left"] &`]: { marginLeft: "14px" },
|
|
844
|
+
[`.${X.popper}[data-popper-placement*="right"] &`]: { marginRight: "14px" }
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
props: ({ ownerState: e }) => !!e.isRtl && e.touch,
|
|
849
|
+
style: {
|
|
850
|
+
[`.${X.popper}[data-popper-placement*="left"] &`]: { marginLeft: "24px" },
|
|
851
|
+
[`.${X.popper}[data-popper-placement*="right"] &`]: { marginRight: "24px" }
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
props: ({ ownerState: e }) => e.touch,
|
|
856
|
+
style: { [`.${X.popper}[data-popper-placement*="top"] &`]: { marginBottom: "24px" } }
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
props: ({ ownerState: e }) => e.touch,
|
|
860
|
+
style: { [`.${X.popper}[data-popper-placement*="bottom"] &`]: { marginTop: "24px" } }
|
|
861
|
+
}
|
|
862
|
+
]
|
|
863
|
+
}))), Et = z("span", {
|
|
864
|
+
name: "MuiTooltip",
|
|
865
|
+
slot: "Arrow"
|
|
866
|
+
})(g(({ theme: e }) => ({
|
|
867
|
+
overflow: "hidden",
|
|
868
|
+
position: "absolute",
|
|
869
|
+
width: "1em",
|
|
870
|
+
height: "0.71em",
|
|
871
|
+
boxSizing: "border-box",
|
|
872
|
+
color: e.vars ? e.vars.palette.Tooltip.bg : e.alpha(e.palette.grey[700], .9),
|
|
873
|
+
"&::before": {
|
|
874
|
+
content: "\"\"",
|
|
875
|
+
margin: "auto",
|
|
876
|
+
display: "block",
|
|
877
|
+
width: "100%",
|
|
878
|
+
height: "100%",
|
|
879
|
+
backgroundColor: "currentColor",
|
|
880
|
+
transform: "rotate(45deg)"
|
|
881
|
+
}
|
|
882
|
+
}))), Dt = !1, Ot = new x(), kt = {
|
|
883
|
+
x: 0,
|
|
884
|
+
y: 0
|
|
885
|
+
};
|
|
886
|
+
function At(e, t) {
|
|
887
|
+
return (n, ...r) => {
|
|
888
|
+
t && t(n, ...r), e(n, ...r);
|
|
889
|
+
};
|
|
890
|
+
}
|
|
891
|
+
var jt = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
892
|
+
let n = F({
|
|
893
|
+
props: e,
|
|
894
|
+
name: "MuiTooltip"
|
|
895
|
+
}), { arrow: r = !1, children: i, classes: a, components: o = {}, componentsProps: s = {}, describeChild: l = !1, disableFocusListener: u = !1, disableHoverListener: d = !1, disableInteractive: f = !1, disableTouchListener: p = !1, enterDelay: h = 100, enterNextDelay: g = 0, enterTouchDelay: _ = 700, followCursor: v = !1, id: y, leaveDelay: b = 0, leaveTouchDelay: x = 1500, onClose: C, onOpen: E, open: A, placement: ee = "bottom", PopperComponent: j, PopperProps: M = {}, slotProps: N = {}, slots: ne = {}, title: P, TransitionComponent: re, TransitionProps: I, ...ie } = n, L = /*#__PURE__*/ G.isValidElement(i) ? i : /*#__PURE__*/ q("span", { children: i }), ae = pe(), oe = xe(), [R, z] = G.useState(), [se, ce] = G.useState(null), le = G.useRef(!1), B = f || v, ue = c(), de = c(), fe = c(), V = c(), [me, ge] = m({
|
|
896
|
+
controlled: A,
|
|
897
|
+
default: !1,
|
|
898
|
+
name: "Tooltip",
|
|
899
|
+
state: "open"
|
|
900
|
+
}), U = me, _e = w(y), ve = G.useRef(), ye = T(() => {
|
|
901
|
+
ve.current !== void 0 && (document.body.style.WebkitUserSelect = ve.current, ve.current = void 0), V.clear();
|
|
902
|
+
});
|
|
903
|
+
G.useEffect(() => ye, [ye]);
|
|
904
|
+
let be = (e) => {
|
|
905
|
+
Ot.clear(), Dt = !0, ge(!0), E && !U && E(e);
|
|
906
|
+
}, Se = T((e) => {
|
|
907
|
+
Ot.start(800 + b, () => {
|
|
908
|
+
Dt = !1;
|
|
909
|
+
}), ge(!1), C && U && C(e), ue.start(ae.transitions.duration.shortest, () => {
|
|
910
|
+
le.current = !1;
|
|
911
|
+
});
|
|
912
|
+
}), Ce = (e) => {
|
|
913
|
+
le.current && e.type !== "touchstart" || (R && R.removeAttribute("title"), de.clear(), fe.clear(), h || Dt && g ? de.start(Dt ? g : h, () => {
|
|
914
|
+
be(e);
|
|
915
|
+
}) : be(e));
|
|
916
|
+
}, W = (e) => {
|
|
917
|
+
de.clear(), fe.start(b, () => {
|
|
918
|
+
Se(e);
|
|
919
|
+
});
|
|
920
|
+
}, [, we] = G.useState(!1), K = (e) => {
|
|
921
|
+
let t = e?.target ?? R;
|
|
922
|
+
if (!t || !S(t)) {
|
|
923
|
+
we(!1);
|
|
924
|
+
let n = e ?? new Event("blur");
|
|
925
|
+
!e && t && (Object.defineProperty(n, "target", { value: t }), Object.defineProperty(n, "currentTarget", { value: t })), W(n);
|
|
926
|
+
}
|
|
927
|
+
}, Te = (e) => {
|
|
928
|
+
R || z(e.currentTarget), S(e.target) && (we(!0), Ce(e));
|
|
929
|
+
}, Ee = (e) => {
|
|
930
|
+
le.current = !0;
|
|
931
|
+
let t = L.props;
|
|
932
|
+
t.onTouchStart && t.onTouchStart(e);
|
|
933
|
+
}, De = (e) => {
|
|
934
|
+
Ee(e), fe.clear(), ue.clear(), ye(), ve.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", V.start(_, () => {
|
|
935
|
+
document.body.style.WebkitUserSelect = ve.current, Ce(e);
|
|
936
|
+
});
|
|
937
|
+
}, Oe = (e) => {
|
|
938
|
+
L.props.onTouchEnd && L.props.onTouchEnd(e), ye(), fe.start(x, () => {
|
|
939
|
+
Se(e);
|
|
940
|
+
});
|
|
941
|
+
};
|
|
942
|
+
G.useEffect(() => {
|
|
943
|
+
if (!U) return;
|
|
944
|
+
function e(e) {
|
|
945
|
+
e.key === "Escape" && Se(e);
|
|
946
|
+
}
|
|
947
|
+
return document.addEventListener("keydown", e), () => {
|
|
948
|
+
document.removeEventListener("keydown", e);
|
|
949
|
+
};
|
|
950
|
+
}, [Se, U]);
|
|
951
|
+
let ke = D(k(L), z, t);
|
|
952
|
+
!P && P !== 0 && (U = !1);
|
|
953
|
+
let Ae = G.useRef(), je = (e) => {
|
|
954
|
+
let t = L.props;
|
|
955
|
+
t.onMouseMove && t.onMouseMove(e), kt = {
|
|
956
|
+
x: e.clientX,
|
|
957
|
+
y: e.clientY
|
|
958
|
+
}, Ae.current && Ae.current.update();
|
|
959
|
+
}, Me = {}, Ne = typeof P == "string";
|
|
960
|
+
l ? (Me.title = !U && Ne && !d ? P : null, Me["aria-describedby"] = U ? _e : null) : (Me["aria-label"] = Ne ? P : null, Me["aria-labelledby"] = U && !Ne ? _e : null);
|
|
961
|
+
let Y = {
|
|
962
|
+
...Me,
|
|
963
|
+
...ie,
|
|
964
|
+
...L.props,
|
|
965
|
+
className: he(ie.className, L.props.className),
|
|
966
|
+
onTouchStart: Ee,
|
|
967
|
+
ref: ke,
|
|
968
|
+
...v ? { onMouseMove: je } : {}
|
|
969
|
+
}, Pe = {};
|
|
970
|
+
p || (Y.onTouchStart = De, Y.onTouchEnd = Oe), d || (Y.onMouseOver = At(Ce, Y.onMouseOver), Y.onMouseLeave = At(W, Y.onMouseLeave), B || (Pe.onMouseOver = Ce, Pe.onMouseLeave = W)), u || (Y.onFocus = At(Te, Y.onFocus), Y.onBlur = At(K, Y.onBlur), B || (Pe.onFocus = Te, Pe.onBlur = K));
|
|
971
|
+
let Fe = {
|
|
972
|
+
...n,
|
|
973
|
+
isRtl: oe,
|
|
974
|
+
arrow: r,
|
|
975
|
+
disableInteractive: B,
|
|
976
|
+
placement: ee,
|
|
977
|
+
PopperComponentProp: j,
|
|
978
|
+
touch: le.current
|
|
979
|
+
}, Ie = typeof N.popper == "function" ? N.popper(Fe) : N.popper, Le = G.useMemo(() => {
|
|
980
|
+
let e = [{
|
|
981
|
+
name: "arrow",
|
|
982
|
+
enabled: !!se,
|
|
983
|
+
options: {
|
|
984
|
+
element: se,
|
|
985
|
+
padding: 4
|
|
986
|
+
}
|
|
987
|
+
}];
|
|
988
|
+
return M.popperOptions?.modifiers && (e = e.concat(M.popperOptions.modifiers)), Ie?.popperOptions?.modifiers && (e = e.concat(Ie.popperOptions.modifiers)), {
|
|
989
|
+
...M.popperOptions,
|
|
990
|
+
...Ie?.popperOptions,
|
|
991
|
+
modifiers: e
|
|
992
|
+
};
|
|
993
|
+
}, [
|
|
994
|
+
se,
|
|
995
|
+
M.popperOptions,
|
|
996
|
+
Ie?.popperOptions
|
|
997
|
+
]), Re = Ct(Fe), ze = typeof N.transition == "function" ? N.transition(Fe) : N.transition, Be = {
|
|
998
|
+
slots: {
|
|
999
|
+
popper: o.Popper,
|
|
1000
|
+
transition: o.Transition ?? re,
|
|
1001
|
+
tooltip: o.Tooltip,
|
|
1002
|
+
arrow: o.Arrow,
|
|
1003
|
+
...ne
|
|
1004
|
+
},
|
|
1005
|
+
slotProps: {
|
|
1006
|
+
arrow: N.arrow ?? s.arrow,
|
|
1007
|
+
popper: {
|
|
1008
|
+
...M,
|
|
1009
|
+
...Ie ?? s.popper
|
|
1010
|
+
},
|
|
1011
|
+
tooltip: N.tooltip ?? s.tooltip,
|
|
1012
|
+
transition: {
|
|
1013
|
+
...I,
|
|
1014
|
+
...ze ?? s.transition
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
}, [Ve, He] = H("popper", {
|
|
1018
|
+
elementType: wt,
|
|
1019
|
+
externalForwardedProps: Be,
|
|
1020
|
+
ownerState: Fe,
|
|
1021
|
+
className: he(Re.popper, M?.className)
|
|
1022
|
+
}), [Ue, We] = H("transition", {
|
|
1023
|
+
elementType: O,
|
|
1024
|
+
externalForwardedProps: Be,
|
|
1025
|
+
ownerState: Fe
|
|
1026
|
+
}), [Ge, Ke] = H("tooltip", {
|
|
1027
|
+
elementType: Tt,
|
|
1028
|
+
className: Re.tooltip,
|
|
1029
|
+
externalForwardedProps: Be,
|
|
1030
|
+
ownerState: Fe
|
|
1031
|
+
}), [qe, Je] = H("arrow", {
|
|
1032
|
+
elementType: Et,
|
|
1033
|
+
className: Re.arrow,
|
|
1034
|
+
externalForwardedProps: Be,
|
|
1035
|
+
ownerState: Fe,
|
|
1036
|
+
ref: ce
|
|
1037
|
+
});
|
|
1038
|
+
return /*#__PURE__*/ J(G.Fragment, { children: [/*#__PURE__*/ G.cloneElement(L, Y), /*#__PURE__*/ q(Ve, {
|
|
1039
|
+
as: j ?? te,
|
|
1040
|
+
placement: ee,
|
|
1041
|
+
anchorEl: v ? { getBoundingClientRect: () => ({
|
|
1042
|
+
top: kt.y,
|
|
1043
|
+
left: kt.x,
|
|
1044
|
+
right: kt.x,
|
|
1045
|
+
bottom: kt.y,
|
|
1046
|
+
width: 0,
|
|
1047
|
+
height: 0
|
|
1048
|
+
}) } : R,
|
|
1049
|
+
popperRef: Ae,
|
|
1050
|
+
open: R ? U : !1,
|
|
1051
|
+
id: _e,
|
|
1052
|
+
transition: !0,
|
|
1053
|
+
...Pe,
|
|
1054
|
+
...He,
|
|
1055
|
+
popperOptions: Le,
|
|
1056
|
+
children: ({ TransitionProps: e }) => /*#__PURE__*/ q(Ue, {
|
|
1057
|
+
timeout: ae.transitions.duration.shorter,
|
|
1058
|
+
...e,
|
|
1059
|
+
...We,
|
|
1060
|
+
children: /*#__PURE__*/ J(Ge, {
|
|
1061
|
+
...Ke,
|
|
1062
|
+
children: [P, r ? /*#__PURE__*/ q(qe, { ...Je }) : null]
|
|
1063
|
+
})
|
|
1064
|
+
})
|
|
1065
|
+
})] });
|
|
1066
|
+
});
|
|
1067
|
+
//#endregion
|
|
1068
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Switch/switchClasses.js
|
|
1069
|
+
function Mt(e) {
|
|
1070
|
+
return I("MuiSwitch", e);
|
|
1071
|
+
}
|
|
1072
|
+
var Z = P("MuiSwitch", [
|
|
1073
|
+
"root",
|
|
1074
|
+
"edgeStart",
|
|
1075
|
+
"edgeEnd",
|
|
1076
|
+
"switchBase",
|
|
1077
|
+
"colorPrimary",
|
|
1078
|
+
"colorSecondary",
|
|
1079
|
+
"sizeSmall",
|
|
1080
|
+
"sizeMedium",
|
|
1081
|
+
"checked",
|
|
1082
|
+
"disabled",
|
|
1083
|
+
"input",
|
|
1084
|
+
"thumb",
|
|
1085
|
+
"track"
|
|
1086
|
+
]), Nt = (e) => {
|
|
1087
|
+
let { classes: t, edge: n, size: r, color: i, checked: a, disabled: o } = e, s = B({
|
|
1088
|
+
root: [
|
|
1089
|
+
"root",
|
|
1090
|
+
n && `edge${p(n)}`,
|
|
1091
|
+
`size${p(r)}`
|
|
1092
|
+
],
|
|
1093
|
+
switchBase: [
|
|
1094
|
+
"switchBase",
|
|
1095
|
+
`color${p(i)}`,
|
|
1096
|
+
a && "checked",
|
|
1097
|
+
o && "disabled"
|
|
1098
|
+
],
|
|
1099
|
+
thumb: ["thumb"],
|
|
1100
|
+
track: ["track"],
|
|
1101
|
+
input: ["input"]
|
|
1102
|
+
}, Mt, t);
|
|
1103
|
+
return {
|
|
1104
|
+
...t,
|
|
1105
|
+
...s
|
|
1106
|
+
};
|
|
1107
|
+
}, Pt = z("span", {
|
|
1108
|
+
name: "MuiSwitch",
|
|
1109
|
+
slot: "Root",
|
|
1110
|
+
overridesResolver: (e, t) => {
|
|
1111
|
+
let { ownerState: n } = e;
|
|
1112
|
+
return [
|
|
1113
|
+
t.root,
|
|
1114
|
+
n.edge && t[`edge${p(n.edge)}`],
|
|
1115
|
+
t[`size${p(n.size)}`]
|
|
1116
|
+
];
|
|
1117
|
+
}
|
|
1118
|
+
})({
|
|
1119
|
+
display: "inline-flex",
|
|
1120
|
+
width: 58,
|
|
1121
|
+
height: 38,
|
|
1122
|
+
overflow: "hidden",
|
|
1123
|
+
padding: 12,
|
|
1124
|
+
boxSizing: "border-box",
|
|
1125
|
+
position: "relative",
|
|
1126
|
+
flexShrink: 0,
|
|
1127
|
+
zIndex: 0,
|
|
1128
|
+
verticalAlign: "middle",
|
|
1129
|
+
"@media print": { colorAdjust: "exact" },
|
|
1130
|
+
variants: [
|
|
1131
|
+
{
|
|
1132
|
+
props: { edge: "start" },
|
|
1133
|
+
style: { marginLeft: -8 }
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
props: { edge: "end" },
|
|
1137
|
+
style: { marginRight: -8 }
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
props: { size: "small" },
|
|
1141
|
+
style: {
|
|
1142
|
+
width: 40,
|
|
1143
|
+
height: 24,
|
|
1144
|
+
padding: 7,
|
|
1145
|
+
[`& .${Z.thumb}`]: {
|
|
1146
|
+
width: 16,
|
|
1147
|
+
height: 16
|
|
1148
|
+
},
|
|
1149
|
+
[`& .${Z.switchBase}`]: {
|
|
1150
|
+
padding: 4,
|
|
1151
|
+
[`&.${Z.checked}`]: { transform: "translateX(16px)" }
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
]
|
|
1156
|
+
}), Ft = z(Pe, {
|
|
1157
|
+
name: "MuiSwitch",
|
|
1158
|
+
slot: "SwitchBase",
|
|
1159
|
+
overridesResolver: (e, t) => {
|
|
1160
|
+
let { ownerState: n } = e;
|
|
1161
|
+
return [
|
|
1162
|
+
t.switchBase,
|
|
1163
|
+
{ [`& .${Z.input}`]: t.input },
|
|
1164
|
+
n.color !== "default" && t[`color${p(n.color)}`]
|
|
1165
|
+
];
|
|
1166
|
+
}
|
|
1167
|
+
})(g(({ theme: e }) => ({
|
|
1168
|
+
position: "absolute",
|
|
1169
|
+
top: 0,
|
|
1170
|
+
left: 0,
|
|
1171
|
+
zIndex: 1,
|
|
1172
|
+
color: e.vars ? e.vars.palette.Switch.defaultColor : `${e.palette.mode === "light" ? e.palette.common.white : e.palette.grey[300]}`,
|
|
1173
|
+
transition: e.transitions.create(["left", "transform"], { duration: e.transitions.duration.shortest }),
|
|
1174
|
+
[`&.${Z.checked}`]: { transform: "translateX(20px)" },
|
|
1175
|
+
[`&.${Z.disabled}`]: { color: e.vars ? e.vars.palette.Switch.defaultDisabledColor : `${e.palette.mode === "light" ? e.palette.grey[100] : e.palette.grey[600]}` },
|
|
1176
|
+
[`&.${Z.checked} + .${Z.track}`]: { opacity: .5 },
|
|
1177
|
+
[`&.${Z.disabled} + .${Z.track}`]: { opacity: e.vars ? e.vars.opacity.switchTrackDisabled : `${e.palette.mode === "light" ? .12 : .2}` },
|
|
1178
|
+
[`& .${Z.input}`]: {
|
|
1179
|
+
left: "-100%",
|
|
1180
|
+
width: "300%"
|
|
1181
|
+
}
|
|
1182
|
+
})), g(({ theme: e }) => ({
|
|
1183
|
+
"&:hover": {
|
|
1184
|
+
backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity),
|
|
1185
|
+
"@media (hover: none)": { backgroundColor: "transparent" }
|
|
1186
|
+
},
|
|
1187
|
+
variants: [...Object.entries(e.palette).filter(h(["light"])).map(([t]) => ({
|
|
1188
|
+
props: { color: t },
|
|
1189
|
+
style: {
|
|
1190
|
+
[`&.${Z.checked}`]: {
|
|
1191
|
+
color: (e.vars || e).palette[t].main,
|
|
1192
|
+
"&:hover": {
|
|
1193
|
+
backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity),
|
|
1194
|
+
"@media (hover: none)": { backgroundColor: "transparent" }
|
|
1195
|
+
},
|
|
1196
|
+
[`&.${Z.disabled}`]: { color: e.vars ? e.vars.palette.Switch[`${t}DisabledColor`] : `${e.palette.mode === "light" ? e.lighten(e.palette[t].main, .62) : e.darken(e.palette[t].main, .55)}` }
|
|
1197
|
+
},
|
|
1198
|
+
[`&.${Z.checked} + .${Z.track}`]: { backgroundColor: (e.vars || e).palette[t].main }
|
|
1199
|
+
}
|
|
1200
|
+
}))]
|
|
1201
|
+
}))), It = z("span", {
|
|
1202
|
+
name: "MuiSwitch",
|
|
1203
|
+
slot: "Track"
|
|
1204
|
+
})(g(({ theme: e }) => ({
|
|
1205
|
+
height: "100%",
|
|
1206
|
+
width: "100%",
|
|
1207
|
+
borderRadius: 14 / 2,
|
|
1208
|
+
boxSizing: "border-box",
|
|
1209
|
+
border: "1px solid transparent",
|
|
1210
|
+
zIndex: -1,
|
|
1211
|
+
transition: e.transitions.create(["opacity", "background-color"], { duration: e.transitions.duration.shortest }),
|
|
1212
|
+
backgroundColor: e.vars ? e.vars.palette.common.onBackground : `${e.palette.mode === "light" ? e.palette.common.black : e.palette.common.white}`,
|
|
1213
|
+
opacity: e.vars ? e.vars.opacity.switchTrack : `${e.palette.mode === "light" ? .38 : .3}`
|
|
1214
|
+
}))), Lt = z("span", {
|
|
1215
|
+
name: "MuiSwitch",
|
|
1216
|
+
slot: "Thumb"
|
|
1217
|
+
})(g(({ theme: e }) => ({
|
|
1218
|
+
boxShadow: (e.vars || e).shadows[1],
|
|
1219
|
+
backgroundColor: "currentColor",
|
|
1220
|
+
boxSizing: "border-box",
|
|
1221
|
+
border: "1px solid transparent",
|
|
1222
|
+
width: 20,
|
|
1223
|
+
height: 20,
|
|
1224
|
+
borderRadius: "50%"
|
|
1225
|
+
}))), Rt = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
1226
|
+
let n = F({
|
|
1227
|
+
props: e,
|
|
1228
|
+
name: "MuiSwitch"
|
|
1229
|
+
}), { className: r, color: i = "primary", edge: a = !1, size: o = "medium", sx: s, slots: c = {}, slotProps: l = {}, ...d } = n, f = {
|
|
1230
|
+
...n,
|
|
1231
|
+
color: i,
|
|
1232
|
+
edge: a,
|
|
1233
|
+
size: o
|
|
1234
|
+
}, p = Nt(f), m = l.input, h = {
|
|
1235
|
+
slots: c,
|
|
1236
|
+
slotProps: l
|
|
1237
|
+
}, [g, _] = H("root", {
|
|
1238
|
+
className: he(p.root, r),
|
|
1239
|
+
elementType: Pt,
|
|
1240
|
+
externalForwardedProps: h,
|
|
1241
|
+
ownerState: f,
|
|
1242
|
+
additionalProps: { sx: s }
|
|
1243
|
+
}), [v, y] = H("thumb", {
|
|
1244
|
+
className: p.thumb,
|
|
1245
|
+
elementType: Lt,
|
|
1246
|
+
externalForwardedProps: h,
|
|
1247
|
+
ownerState: f
|
|
1248
|
+
}), b = /*#__PURE__*/ q(v, { ...y }), [x, S] = H("track", {
|
|
1249
|
+
className: p.track,
|
|
1250
|
+
elementType: It,
|
|
1251
|
+
externalForwardedProps: h,
|
|
1252
|
+
ownerState: f
|
|
1253
|
+
});
|
|
1254
|
+
return /*#__PURE__*/ J(g, {
|
|
1255
|
+
..._,
|
|
1256
|
+
children: [/*#__PURE__*/ q(Ft, {
|
|
1257
|
+
type: "checkbox",
|
|
1258
|
+
icon: b,
|
|
1259
|
+
checkedIcon: b,
|
|
1260
|
+
ref: t,
|
|
1261
|
+
ownerState: f,
|
|
1262
|
+
...d,
|
|
1263
|
+
classes: {
|
|
1264
|
+
...p,
|
|
1265
|
+
root: p.switchBase
|
|
1266
|
+
},
|
|
1267
|
+
slots: {
|
|
1268
|
+
...c.switchBase && { root: c.switchBase },
|
|
1269
|
+
...c.input && { input: c.input }
|
|
1270
|
+
},
|
|
1271
|
+
slotProps: {
|
|
1272
|
+
...l.switchBase && { root: typeof l.switchBase == "function" ? l.switchBase(f) : l.switchBase },
|
|
1273
|
+
input: u(typeof m == "function" ? m(f) : m, { role: "switch" })
|
|
1274
|
+
}
|
|
1275
|
+
}), /*#__PURE__*/ q(x, { ...S })]
|
|
1276
|
+
});
|
|
1277
|
+
}), zt = /* @__PURE__ */ n(o(), 1), Q = /* @__PURE__ */ n(oe(), 1), Bt = z(be)(() => ({ fontSize: "max(1.25rem, 18px)" })), Vt = z(le)(() => ({ fontSize: "max(1rem, 14px)" })), Ht = ({ text: e, title: t, onClose: n, onConfirm: r, open: i, onCloseText: a, onConfirmText: o, disableAutoFocus: s, disableEnforceFocus: c, disableRestoreFocus: l }) => /* @__PURE__ */ J(me, {
|
|
1278
|
+
open: i,
|
|
1279
|
+
disableAutoFocus: s,
|
|
1280
|
+
disableEnforceFocus: c,
|
|
1281
|
+
disableRestoreFocus: l,
|
|
1282
|
+
onClose: n,
|
|
1283
|
+
children: [
|
|
1284
|
+
t && /* @__PURE__ */ q(Bt, { children: t }),
|
|
1285
|
+
e && /* @__PURE__ */ q(ie, { children: /* @__PURE__ */ q(Vt, { children: e }) }),
|
|
1286
|
+
/* @__PURE__ */ J(ue, { children: [n && /* @__PURE__ */ q(f, {
|
|
1287
|
+
onClick: n,
|
|
1288
|
+
color: "primary",
|
|
1289
|
+
children: a
|
|
1290
|
+
}), r && /* @__PURE__ */ q(f, {
|
|
1291
|
+
autoFocus: !0,
|
|
1292
|
+
onClick: r,
|
|
1293
|
+
color: "primary",
|
|
1294
|
+
children: o
|
|
1295
|
+
})] })
|
|
1296
|
+
]
|
|
1297
|
+
});
|
|
1298
|
+
Ht.defaultProps = {
|
|
1299
|
+
onCloseText: "CANCEL",
|
|
1300
|
+
onConfirmText: "OK",
|
|
1301
|
+
disableAutoFocus: !1,
|
|
1302
|
+
disableEnforceFocus: !1,
|
|
1303
|
+
disableRestoreFocus: !1
|
|
1304
|
+
}, Ht.propTypes = {
|
|
1305
|
+
text: Q.default.oneOfType([Q.default.string, Q.default.object]),
|
|
1306
|
+
title: Q.default.string,
|
|
1307
|
+
onClose: Q.default.func,
|
|
1308
|
+
onConfirm: Q.default.func,
|
|
1309
|
+
open: Q.default.bool,
|
|
1310
|
+
onConfirmText: Q.default.string,
|
|
1311
|
+
onCloseText: Q.default.string,
|
|
1312
|
+
disableAutoFocus: Q.default.bool,
|
|
1313
|
+
disableEnforceFocus: Q.default.bool,
|
|
1314
|
+
disableRestoreFocus: Q.default.bool
|
|
1315
|
+
};
|
|
1316
|
+
//#endregion
|
|
1317
|
+
//#region ../../lib-react/config-ui/dist/radio-with-label.js
|
|
1318
|
+
var Ut = z(Ze)(() => ({ "& .MuiFormControlLabel-label": {
|
|
1319
|
+
left: "-5px",
|
|
1320
|
+
position: "relative"
|
|
1321
|
+
} })), Wt = z(bt)(() => ({ color: `${V.tertiary()} !important` })), Gt = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ q(Ut, {
|
|
1322
|
+
value: t,
|
|
1323
|
+
control: /* @__PURE__ */ q(Wt, {
|
|
1324
|
+
checked: n,
|
|
1325
|
+
onChange: r
|
|
1326
|
+
}),
|
|
1327
|
+
label: e
|
|
1328
|
+
});
|
|
1329
|
+
Gt.propTypes = {
|
|
1330
|
+
label: Q.default.string,
|
|
1331
|
+
value: Q.default.string,
|
|
1332
|
+
checked: Q.default.bool,
|
|
1333
|
+
onChange: Q.default.func
|
|
1334
|
+
};
|
|
1335
|
+
//#endregion
|
|
1336
|
+
//#region ../../lib-react/config-ui/dist/tabs/index.js
|
|
1337
|
+
var Kt = z(ne)(() => ({})), qt = class extends K.Component {
|
|
1338
|
+
static propTypes = {
|
|
1339
|
+
className: Q.default.string,
|
|
1340
|
+
contentClassName: Q.default.string,
|
|
1341
|
+
contentStyle: Q.default.object,
|
|
1342
|
+
children: Q.default.oneOfType([Q.default.arrayOf(Q.default.node), Q.default.node]).isRequired
|
|
1343
|
+
};
|
|
1344
|
+
constructor(e) {
|
|
1345
|
+
super(e), this.state = { value: 0 };
|
|
1346
|
+
}
|
|
1347
|
+
handleChange = (e, t) => {
|
|
1348
|
+
this.setState({ value: t });
|
|
1349
|
+
};
|
|
1350
|
+
render() {
|
|
1351
|
+
let { value: e } = this.state, { children: t, className: n, contentClassName: r, contentStyle: i = {} } = this.props;
|
|
1352
|
+
return /* @__PURE__ */ J("div", {
|
|
1353
|
+
className: n,
|
|
1354
|
+
children: [/* @__PURE__ */ q(re, {
|
|
1355
|
+
indicatorColor: "primary",
|
|
1356
|
+
value: e,
|
|
1357
|
+
onChange: this.handleChange,
|
|
1358
|
+
children: K.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ q(Kt, { label: e.props.title }, t) : null)
|
|
1359
|
+
}), /* @__PURE__ */ q("div", {
|
|
1360
|
+
className: r,
|
|
1361
|
+
style: i,
|
|
1362
|
+
children: t[e]
|
|
1363
|
+
})]
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1366
|
+
}, Jt = z(Ze)(({ theme: e, mini: t }) => ({
|
|
1367
|
+
margin: 0,
|
|
1368
|
+
marginLeft: 0,
|
|
1369
|
+
padding: 0,
|
|
1370
|
+
"& .MuiFormControlLabel-label": {
|
|
1371
|
+
fontSize: e.typography.fontSize - 1,
|
|
1372
|
+
transform: "translate(-4%, 2%)",
|
|
1373
|
+
color: "rgba(0,0,0,1.0)",
|
|
1374
|
+
...t && {
|
|
1375
|
+
marginLeft: e.spacing(1),
|
|
1376
|
+
color: N[700],
|
|
1377
|
+
fontSize: e.typography.fontSize - 3
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
})), Yt = z(Ge)(({ theme: e, mini: t, error: n }) => ({
|
|
1381
|
+
color: `${V.tertiary()} !important`,
|
|
1382
|
+
...t && {
|
|
1383
|
+
margin: 0,
|
|
1384
|
+
padding: 0,
|
|
1385
|
+
width: e.spacing(3),
|
|
1386
|
+
height: e.spacing(3)
|
|
1387
|
+
},
|
|
1388
|
+
...n && { color: `${e.palette.error.main} !important` }
|
|
1389
|
+
})), Xt = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ q(Jt, {
|
|
1390
|
+
mini: e,
|
|
1391
|
+
control: /* @__PURE__ */ q(Yt, {
|
|
1392
|
+
checked: t,
|
|
1393
|
+
onChange: n,
|
|
1394
|
+
value: r,
|
|
1395
|
+
mini: e,
|
|
1396
|
+
error: a
|
|
1397
|
+
}),
|
|
1398
|
+
label: i
|
|
1399
|
+
});
|
|
1400
|
+
Xt.propTypes = {
|
|
1401
|
+
mini: Q.default.bool,
|
|
1402
|
+
checked: Q.default.bool.isRequired,
|
|
1403
|
+
onChange: Q.default.func.isRequired,
|
|
1404
|
+
value: Q.default.string,
|
|
1405
|
+
label: Q.default.string.isRequired,
|
|
1406
|
+
error: Q.default.bool
|
|
1407
|
+
}, Xt.defaultProps = {
|
|
1408
|
+
value: "",
|
|
1409
|
+
mini: !1,
|
|
1410
|
+
error: !1
|
|
1411
|
+
};
|
|
1412
|
+
//#endregion
|
|
1413
|
+
//#region ../../lib-react/config-ui/dist/number-text-field.js
|
|
1414
|
+
var Zt = (0, zt.default)("@pie-lib:config-ui:number-text-field"), Qt = z(ae)(({ theme: e }) => ({
|
|
1415
|
+
marginRight: e.spacing(1),
|
|
1416
|
+
"& .MuiInputLabel-root": {
|
|
1417
|
+
width: "auto",
|
|
1418
|
+
minWidth: "max-content",
|
|
1419
|
+
maxWidth: "none",
|
|
1420
|
+
whiteSpace: "nowrap",
|
|
1421
|
+
overflow: "visible",
|
|
1422
|
+
transform: "translate(0, 8px) scale(0.75)",
|
|
1423
|
+
transformOrigin: "top left",
|
|
1424
|
+
position: "relative"
|
|
1425
|
+
},
|
|
1426
|
+
"& .MuiInputBase-root, & .MuiInput-root, & .MuiFilledInput-root, & .MuiOutlinedInput-root": {
|
|
1427
|
+
height: "auto",
|
|
1428
|
+
minHeight: "auto",
|
|
1429
|
+
marginTop: 0
|
|
1430
|
+
},
|
|
1431
|
+
"& .MuiInputBase-input": {
|
|
1432
|
+
height: "auto",
|
|
1433
|
+
minHeight: "auto",
|
|
1434
|
+
padding: "6px 0 7px"
|
|
1435
|
+
}
|
|
1436
|
+
})), $t = (e, t) => {
|
|
1437
|
+
if (!s(e) && !s(t)) return 0;
|
|
1438
|
+
if (!s(e) && s(t)) return t;
|
|
1439
|
+
if (s(e)) return e;
|
|
1440
|
+
}, en = class extends K.Component {
|
|
1441
|
+
static propTypes = {
|
|
1442
|
+
disabled: Q.default.bool,
|
|
1443
|
+
className: Q.default.string,
|
|
1444
|
+
inputClassName: Q.default.string,
|
|
1445
|
+
onChange: Q.default.func.isRequired,
|
|
1446
|
+
value: Q.default.number,
|
|
1447
|
+
min: Q.default.number,
|
|
1448
|
+
max: Q.default.number,
|
|
1449
|
+
label: Q.default.string,
|
|
1450
|
+
suffix: Q.default.string,
|
|
1451
|
+
showErrorWhenOutsideRange: Q.default.bool,
|
|
1452
|
+
disableUnderline: Q.default.bool,
|
|
1453
|
+
variant: Q.default.string
|
|
1454
|
+
};
|
|
1455
|
+
static defaultProps = { showErrorWhenOutsideRange: !1 };
|
|
1456
|
+
constructor(e) {
|
|
1457
|
+
super(e);
|
|
1458
|
+
let t = this.clamp(e.value);
|
|
1459
|
+
this.state = { value: t }, t !== e.value && this.props.onChange({}, t), this.onChange = this.onChange.bind(this);
|
|
1460
|
+
}
|
|
1461
|
+
UNSAFE_componentWillReceiveProps(e) {
|
|
1462
|
+
let t = this.clamp(e.value, e.min, e.max);
|
|
1463
|
+
this.setState({ value: t });
|
|
1464
|
+
}
|
|
1465
|
+
clamp(e, t = this.props.min, n = this.props.max) {
|
|
1466
|
+
return s(e) ? (s(n) && (e = Math.min(e, n)), s(t) && (e = Math.max(e, t)), e) : $t(t, n);
|
|
1467
|
+
}
|
|
1468
|
+
onBlur = (e) => {
|
|
1469
|
+
let t = e.target.value, n = parseFloat(t);
|
|
1470
|
+
Zt("rawNumber: ", n);
|
|
1471
|
+
let r = this.clamp(n);
|
|
1472
|
+
Zt("number: ", r), r !== this.state.value && (Zt("trigger update..."), this.setState({ value: r.toString() }, () => {
|
|
1473
|
+
this.props.onChange(e, r);
|
|
1474
|
+
}));
|
|
1475
|
+
};
|
|
1476
|
+
onChange(e) {
|
|
1477
|
+
let t = e.target.value;
|
|
1478
|
+
this.setState({ value: t });
|
|
1479
|
+
}
|
|
1480
|
+
errorMessage = () => {
|
|
1481
|
+
let { min: e, max: t } = this.props;
|
|
1482
|
+
if (e && t) return `The value must be between ${e} and ${t}`;
|
|
1483
|
+
if (e) return `The value must be greater than ${e}`;
|
|
1484
|
+
if (t) return `The value must be less than ${t}`;
|
|
1485
|
+
};
|
|
1486
|
+
getError = () => {
|
|
1487
|
+
let { value: e } = this.state, t = parseFloat(e);
|
|
1488
|
+
if (this.clamp(t) !== t) return this.errorMessage();
|
|
1489
|
+
};
|
|
1490
|
+
render() {
|
|
1491
|
+
let { className: e, label: t, disabled: n, suffix: r, min: i, max: a, inputClassName: o, disableUnderline: s, showErrorWhenOutsideRange: c, variant: l } = this.props, u = c && this.getError();
|
|
1492
|
+
return /* @__PURE__ */ q(Qt, {
|
|
1493
|
+
variant: s ? "filled" : l || "standard",
|
|
1494
|
+
inputRef: (e) => {
|
|
1495
|
+
this.inputRef = e;
|
|
1496
|
+
},
|
|
1497
|
+
disabled: n,
|
|
1498
|
+
label: t,
|
|
1499
|
+
InputLabelProps: { shrink: !0 },
|
|
1500
|
+
value: this.state.value,
|
|
1501
|
+
error: !!u,
|
|
1502
|
+
helperText: u,
|
|
1503
|
+
onChange: this.onChange,
|
|
1504
|
+
onBlur: this.onBlur,
|
|
1505
|
+
onKeyDown: (e) => {
|
|
1506
|
+
e.key === "Enter" && this.inputRef && this.inputRef.blur();
|
|
1507
|
+
},
|
|
1508
|
+
type: "number",
|
|
1509
|
+
className: e,
|
|
1510
|
+
slotProps: { input: {
|
|
1511
|
+
endAdornment: r && /* @__PURE__ */ q(it, {
|
|
1512
|
+
position: "end",
|
|
1513
|
+
children: r
|
|
1514
|
+
}),
|
|
1515
|
+
className: o,
|
|
1516
|
+
inputProps: {
|
|
1517
|
+
min: i,
|
|
1518
|
+
max: a
|
|
1519
|
+
}
|
|
1520
|
+
} },
|
|
1521
|
+
margin: "normal"
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
}, tn = (e) => typeof e == "object" && !!e && typeof e.n == "number" && typeof e.d == "number", nn = (e) => {
|
|
1525
|
+
if (typeof e == "number") return e;
|
|
1526
|
+
if (tn(e)) return (e.s ?? 1) * e.n / e.d;
|
|
1527
|
+
let t = String(e).trim(), n = t.match(/^([+-]?\d+)\s*\/\s*([+-]?\d+)$/);
|
|
1528
|
+
return n ? Number.parseInt(n[1] ?? "0", 10) / Number.parseInt(n[2] ?? "1", 10) : Number(t);
|
|
1529
|
+
}, rn = E(/*#__PURE__*/ q("path", { d: "M19 13H5v-2h14z" }), "Remove"), an = E(/*#__PURE__*/ q("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z" }), "Add"), on = z(ae)(() => ({
|
|
1530
|
+
"& input[type=number]": { MozAppearance: "textfield" },
|
|
1531
|
+
"& input[type=number]::-webkit-outer-spin-button": {
|
|
1532
|
+
WebkitAppearance: "none",
|
|
1533
|
+
margin: 0
|
|
1534
|
+
},
|
|
1535
|
+
"& input[type=number]::-webkit-inner-spin-button": {
|
|
1536
|
+
WebkitAppearance: "none",
|
|
1537
|
+
margin: 0
|
|
1538
|
+
}
|
|
1539
|
+
})), sn = z(d)(() => ({ padding: "2px" })), cn = (e, t) => {
|
|
1540
|
+
if (!s(e) && !s(t)) return 0;
|
|
1541
|
+
if (!s(e) && s(t)) return t;
|
|
1542
|
+
if (s(e)) return e;
|
|
1543
|
+
}, ln = class extends K.Component {
|
|
1544
|
+
static propTypes = {
|
|
1545
|
+
className: Q.default.string,
|
|
1546
|
+
customValues: Q.default.array,
|
|
1547
|
+
disabled: Q.default.bool,
|
|
1548
|
+
error: Q.default.bool,
|
|
1549
|
+
inputClassName: Q.default.string,
|
|
1550
|
+
helperText: Q.default.string,
|
|
1551
|
+
onChange: Q.default.func.isRequired,
|
|
1552
|
+
onlyIntegersAllowed: Q.default.bool,
|
|
1553
|
+
value: Q.default.any,
|
|
1554
|
+
min: Q.default.number,
|
|
1555
|
+
max: Q.default.number,
|
|
1556
|
+
step: Q.default.number,
|
|
1557
|
+
label: Q.default.string,
|
|
1558
|
+
disableUnderline: Q.default.bool,
|
|
1559
|
+
textAlign: Q.default.string,
|
|
1560
|
+
variant: Q.default.string,
|
|
1561
|
+
type: Q.default.string
|
|
1562
|
+
};
|
|
1563
|
+
static defaultProps = {
|
|
1564
|
+
step: 1,
|
|
1565
|
+
customValues: [],
|
|
1566
|
+
textAlign: "center",
|
|
1567
|
+
variant: "standard",
|
|
1568
|
+
onlyIntegersAllowed: !1
|
|
1569
|
+
};
|
|
1570
|
+
constructor(e) {
|
|
1571
|
+
super(e);
|
|
1572
|
+
let { value: t, currentIndex: n } = this.normalizeValueAndIndex(e.customValues, e.value);
|
|
1573
|
+
this.state = {
|
|
1574
|
+
value: t,
|
|
1575
|
+
currentIndex: n
|
|
1576
|
+
}, t !== e.value && this.props.onChange({}, t), this.onChange = this.onChange.bind(this);
|
|
1577
|
+
}
|
|
1578
|
+
UNSAFE_componentWillReceiveProps(e) {
|
|
1579
|
+
let { value: t, currentIndex: n } = this.normalizeValueAndIndex(e.customValues, e.value, e.min, e.max);
|
|
1580
|
+
this.setState({
|
|
1581
|
+
value: t,
|
|
1582
|
+
currentIndex: n
|
|
1583
|
+
});
|
|
1584
|
+
}
|
|
1585
|
+
clamp(e, t = this.props.min, n = this.props.max) {
|
|
1586
|
+
let { customValues: r } = this.props;
|
|
1587
|
+
return (r || []).length > 0 ? e : s(e) ? (s(n) && (e = Math.min(e, n)), s(t) && (e = Math.max(e, t)), e) : cn(t, n);
|
|
1588
|
+
}
|
|
1589
|
+
normalizeValueAndIndex = (e, t, n, r) => {
|
|
1590
|
+
let { type: i } = this.props, a = this.clamp(t, n, r), o = (e || []).findIndex((e) => e === a);
|
|
1591
|
+
if ((e || []).length > 0 && o === -1) {
|
|
1592
|
+
let t = i === "text" ? this.getClosestFractionValue(e, a) : this.getClosestValue(e, a);
|
|
1593
|
+
return {
|
|
1594
|
+
value: t.value,
|
|
1595
|
+
currentIndex: t.index
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1598
|
+
return {
|
|
1599
|
+
value: a,
|
|
1600
|
+
currentIndex: o
|
|
1601
|
+
};
|
|
1602
|
+
};
|
|
1603
|
+
getClosestValue = (e, t) => e.reduce((e, n, r) => Math.abs(n - t) < Math.abs(e.value - t) ? {
|
|
1604
|
+
value: n,
|
|
1605
|
+
index: r
|
|
1606
|
+
} : e, {
|
|
1607
|
+
value: e[0],
|
|
1608
|
+
index: 0
|
|
1609
|
+
});
|
|
1610
|
+
getClosestFractionValue = (e, t) => e.reduce((e, n, r) => Math.abs(nn(n) - nn(t)) < Math.abs(nn(e.value) - nn(t)) ? {
|
|
1611
|
+
value: n,
|
|
1612
|
+
index: r
|
|
1613
|
+
} : e, {
|
|
1614
|
+
value: e[0],
|
|
1615
|
+
index: 0
|
|
1616
|
+
});
|
|
1617
|
+
getValidFraction = (e) => {
|
|
1618
|
+
if (this.isPositiveInteger(e.trim())) return e.trim();
|
|
1619
|
+
if (e.trim() === "" || e.trim().split("/").length !== 2) return !1;
|
|
1620
|
+
let [t, n] = e.trim().split("/");
|
|
1621
|
+
return isNaN(t) || isNaN(n) || (t = parseFloat(t), n = parseFloat(n), !Number.isInteger(t) || !Number.isInteger(n)) || t < 0 || n < 1 ? !1 : t + "/" + n;
|
|
1622
|
+
};
|
|
1623
|
+
isPositiveInteger = (e) => e >>> 0 === parseFloat(e);
|
|
1624
|
+
onBlur = (e) => {
|
|
1625
|
+
let { customValues: t, onlyIntegersAllowed: n, type: r } = this.props, { value: i } = e.target;
|
|
1626
|
+
r === "text" && (i = this.getValidFraction(i) || this.props.value);
|
|
1627
|
+
let a = n ? Math.round(parseFloat(i)) : parseFloat(i);
|
|
1628
|
+
r === "text" && (a = i.trim());
|
|
1629
|
+
let { value: o, currentIndex: s } = this.normalizeValueAndIndex(t, a);
|
|
1630
|
+
this.setState({
|
|
1631
|
+
value: o.toString(),
|
|
1632
|
+
currentIndex: s
|
|
1633
|
+
}, () => this.props.onChange(e, o));
|
|
1634
|
+
};
|
|
1635
|
+
onChange(e) {
|
|
1636
|
+
let { type: t } = this.props, { value: n } = e.target;
|
|
1637
|
+
t !== "text" && typeof n == "string" && n.trim() === "" || this.setState({ value: n });
|
|
1638
|
+
}
|
|
1639
|
+
changeValue(e, t = 1, n = !1) {
|
|
1640
|
+
e.preventDefault();
|
|
1641
|
+
let { customValues: r, step: i, onlyIntegersAllowed: a, onChange: o } = this.props, { currentIndex: s, value: c } = this.state, l = s + t * 1, u;
|
|
1642
|
+
if (r.length > 0) {
|
|
1643
|
+
if (l < 0 || l >= r.length) return;
|
|
1644
|
+
u = r[l];
|
|
1645
|
+
} else {
|
|
1646
|
+
let e = ((a ? parseInt(c) : parseFloat(c)) * 1e4 + i * t * 1e4) / 1e4;
|
|
1647
|
+
u = this.clamp(e);
|
|
1648
|
+
}
|
|
1649
|
+
this.setState({
|
|
1650
|
+
value: u.toString(),
|
|
1651
|
+
currentIndex: l
|
|
1652
|
+
}, () => {
|
|
1653
|
+
n && o(e, u);
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
render() {
|
|
1657
|
+
let { className: e, label: t, disabled: n, error: r, min: i, max: a, customValues: o, inputClassName: c, disableUnderline: l, helperText: u, variant: d, textAlign: f, type: p = "number" } = this.props, { value: m } = this.state, h = e, g = !1, _ = !1;
|
|
1658
|
+
return o.length > 0 ? (g = m === o[0], _ = m === o[o.length - 1]) : s(i) && s(a) && (g = m === i, _ = m === a), /* @__PURE__ */ q(on, {
|
|
1659
|
+
variant: d,
|
|
1660
|
+
inputRef: (e) => this.inputRef = e,
|
|
1661
|
+
disabled: n,
|
|
1662
|
+
label: t,
|
|
1663
|
+
value: m,
|
|
1664
|
+
error: r,
|
|
1665
|
+
helperText: u,
|
|
1666
|
+
onChange: this.onChange,
|
|
1667
|
+
onBlur: this.onBlur,
|
|
1668
|
+
onKeyPress: (e) => {
|
|
1669
|
+
e.key === "Enter" && this.inputRef && this.inputRef.blur();
|
|
1670
|
+
},
|
|
1671
|
+
onKeyDown: (e) => {
|
|
1672
|
+
e.key === "ArrowUp" && this.changeValue(e), e.key === "ArrowDown" && this.changeValue(e, -1);
|
|
1673
|
+
},
|
|
1674
|
+
title: "",
|
|
1675
|
+
type: p,
|
|
1676
|
+
className: h,
|
|
1677
|
+
InputProps: {
|
|
1678
|
+
className: c,
|
|
1679
|
+
disableUnderline: l,
|
|
1680
|
+
startAdornment: /* @__PURE__ */ q(it, {
|
|
1681
|
+
position: "start",
|
|
1682
|
+
children: /* @__PURE__ */ q(sn, {
|
|
1683
|
+
disabled: n || g,
|
|
1684
|
+
onClick: (e) => this.changeValue(e, -1, !0),
|
|
1685
|
+
size: "large",
|
|
1686
|
+
children: /* @__PURE__ */ q(rn, { fontSize: "small" })
|
|
1687
|
+
})
|
|
1688
|
+
}),
|
|
1689
|
+
endAdornment: /* @__PURE__ */ q(it, {
|
|
1690
|
+
position: "end",
|
|
1691
|
+
children: /* @__PURE__ */ q(sn, {
|
|
1692
|
+
disabled: n || _,
|
|
1693
|
+
onClick: (e) => this.changeValue(e, 1, !0),
|
|
1694
|
+
size: "large",
|
|
1695
|
+
children: /* @__PURE__ */ q(an, { fontSize: "small" })
|
|
1696
|
+
})
|
|
1697
|
+
})
|
|
1698
|
+
},
|
|
1699
|
+
inputProps: {
|
|
1700
|
+
style: { textAlign: f },
|
|
1701
|
+
min: i,
|
|
1702
|
+
max: a
|
|
1703
|
+
}
|
|
1704
|
+
});
|
|
1705
|
+
}
|
|
1706
|
+
};
|
|
1707
|
+
//#endregion
|
|
1708
|
+
//#region ../../lib-react/config-ui/dist/two-choice.js
|
|
1709
|
+
function un(e) {
|
|
1710
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
1711
|
+
}
|
|
1712
|
+
function dn(e, t) {
|
|
1713
|
+
return !e || un(e) ? e : un(e.default) ? e.default : t && un(e[t]) ? e[t] : t && un(e[t]?.default) ? e[t].default : e;
|
|
1714
|
+
}
|
|
1715
|
+
var fn = dn(ce, "InputContainer") || dn(hn.InputContainer, "InputContainer"), pn = Ce, mn = pn.default, hn = mn && typeof mn == "object" ? mn : pn, gn = z("div")(({ theme: e, direction: t }) => ({
|
|
1716
|
+
display: "flex",
|
|
1717
|
+
flexWrap: "wrap",
|
|
1718
|
+
paddingLeft: 0,
|
|
1719
|
+
marginTop: e.spacing(1),
|
|
1720
|
+
...t === "vertical" && { flexDirection: "column" }
|
|
1721
|
+
})), _n = class extends K.Component {
|
|
1722
|
+
static propTypes = {
|
|
1723
|
+
header: Q.default.string.isRequired,
|
|
1724
|
+
className: Q.default.string,
|
|
1725
|
+
customLabel: Q.default.func,
|
|
1726
|
+
opts: Q.default.array.isRequired,
|
|
1727
|
+
value: Q.default.string,
|
|
1728
|
+
onChange: Q.default.func.isRequired,
|
|
1729
|
+
direction: Q.default.oneOf(["horizontal", "vertical"])
|
|
1730
|
+
};
|
|
1731
|
+
handleChange = (e) => {
|
|
1732
|
+
this.props.onChange(e.currentTarget.value);
|
|
1733
|
+
};
|
|
1734
|
+
render() {
|
|
1735
|
+
let { header: e, className: t, customLabel: n, opts: r, value: i, direction: a } = this.props, o = r.map((e) => typeof e == "string" ? {
|
|
1736
|
+
label: e,
|
|
1737
|
+
value: e
|
|
1738
|
+
} : e), s = n || Gt;
|
|
1739
|
+
return /* @__PURE__ */ q(fn, {
|
|
1740
|
+
label: e,
|
|
1741
|
+
className: t,
|
|
1742
|
+
children: /* @__PURE__ */ q(gn, {
|
|
1743
|
+
direction: a,
|
|
1744
|
+
children: o.map((e, t) => /* @__PURE__ */ q(s, {
|
|
1745
|
+
value: e.value,
|
|
1746
|
+
checked: e.value === i,
|
|
1747
|
+
onChange: this.handleChange,
|
|
1748
|
+
label: e.label
|
|
1749
|
+
}, t))
|
|
1750
|
+
})
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
}, vn = Q.default.shape({
|
|
1754
|
+
label: Q.default.string,
|
|
1755
|
+
value: Q.default.string
|
|
1756
|
+
});
|
|
1757
|
+
(class extends K.Component {
|
|
1758
|
+
static propTypes = {
|
|
1759
|
+
header: Q.default.string.isRequired,
|
|
1760
|
+
value: Q.default.string.isRequired,
|
|
1761
|
+
onChange: Q.default.func.isRequired,
|
|
1762
|
+
one: Q.default.oneOfType([vn, Q.default.string]),
|
|
1763
|
+
two: Q.default.oneOfType([vn, Q.default.string]),
|
|
1764
|
+
className: Q.default.string,
|
|
1765
|
+
customLabel: Q.default.func
|
|
1766
|
+
};
|
|
1767
|
+
render() {
|
|
1768
|
+
let { one: e, two: t, header: n, className: r, customLabel: i, value: a, onChange: o } = this.props;
|
|
1769
|
+
return /* @__PURE__ */ q(_n, {
|
|
1770
|
+
customLabel: i,
|
|
1771
|
+
header: n,
|
|
1772
|
+
className: r,
|
|
1773
|
+
opts: [e, t],
|
|
1774
|
+
value: a,
|
|
1775
|
+
onChange: o
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
});
|
|
1779
|
+
//#endregion
|
|
1780
|
+
//#region ../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js
|
|
1781
|
+
var yn = Object.defineProperty, bn = (e, t) => {
|
|
1782
|
+
let n = {};
|
|
1783
|
+
for (var r in e) yn(n, r, {
|
|
1784
|
+
get: e[r],
|
|
1785
|
+
enumerable: !0
|
|
1786
|
+
});
|
|
1787
|
+
return t || yn(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
1788
|
+
}, xn = z("div")(() => ({
|
|
1789
|
+
display: "flex",
|
|
1790
|
+
flexDirection: "column",
|
|
1791
|
+
position: "relative"
|
|
1792
|
+
})), Sn = z("div")(() => ({
|
|
1793
|
+
display: "flex",
|
|
1794
|
+
justifyContent: "space-between"
|
|
1795
|
+
})), Cn = z("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), wn = z("div")(() => ({ flex: "1" })), Tn = z("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), En = class extends K.Component {
|
|
1796
|
+
static propTypes = {
|
|
1797
|
+
mode: Q.default.oneOf(["tabbed", "inline"]),
|
|
1798
|
+
secondary: Q.default.oneOfType([Q.default.arrayOf(Q.default.node), Q.default.node]),
|
|
1799
|
+
children: Q.default.oneOfType([Q.default.arrayOf(Q.default.node), Q.default.node]),
|
|
1800
|
+
dimensions: Q.default.object
|
|
1801
|
+
};
|
|
1802
|
+
getConfiguration = () => {
|
|
1803
|
+
let { secondary: e } = this.props;
|
|
1804
|
+
return e?.props?.configuration || e?.props?.children?.props?.configuration || void 0;
|
|
1805
|
+
};
|
|
1806
|
+
render() {
|
|
1807
|
+
let { mode: e, secondary: t, children: n, dimensions: r } = this.props, { minHeight: i, minWidth: a, maxHeight: o, maxWidth: s } = r || {}, c = this.getConfiguration(), l = Object.entries(c || {}).some(([, e]) => !!e?.settings);
|
|
1808
|
+
if (!l) try {
|
|
1809
|
+
l = JSON.stringify(c)?.match(/settings":true/)?.length;
|
|
1810
|
+
} catch (e) {
|
|
1811
|
+
console.log(e.toString());
|
|
1812
|
+
}
|
|
1813
|
+
return /* @__PURE__ */ J(xn, {
|
|
1814
|
+
style: {
|
|
1815
|
+
minHeight: i,
|
|
1816
|
+
minWidth: a,
|
|
1817
|
+
maxHeight: o,
|
|
1818
|
+
maxWidth: s
|
|
1819
|
+
},
|
|
1820
|
+
children: [
|
|
1821
|
+
e === "inline" && /* @__PURE__ */ J(Sn, { children: [/* @__PURE__ */ q(wn, {
|
|
1822
|
+
className: "design-container",
|
|
1823
|
+
children: n
|
|
1824
|
+
}), l && /* @__PURE__ */ q(Tn, {
|
|
1825
|
+
className: "settings-container",
|
|
1826
|
+
children: t
|
|
1827
|
+
})] }),
|
|
1828
|
+
e === "tabbed" && l && /* @__PURE__ */ J(qt, {
|
|
1829
|
+
onChange: this.onTabsChange,
|
|
1830
|
+
contentClassName: "content-container",
|
|
1831
|
+
indicatorColor: "primary",
|
|
1832
|
+
children: [/* @__PURE__ */ q(Cn, {
|
|
1833
|
+
title: "Design",
|
|
1834
|
+
className: "design-container",
|
|
1835
|
+
children: n
|
|
1836
|
+
}), /* @__PURE__ */ q(Cn, {
|
|
1837
|
+
title: "Settings",
|
|
1838
|
+
className: "settings-container",
|
|
1839
|
+
children: t
|
|
1840
|
+
})]
|
|
1841
|
+
}),
|
|
1842
|
+
e === "tabbed" && !l && /* @__PURE__ */ q(Cn, {
|
|
1843
|
+
className: "design-container",
|
|
1844
|
+
children: n
|
|
1845
|
+
})
|
|
1846
|
+
]
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1849
|
+
};
|
|
1850
|
+
//#endregion
|
|
1851
|
+
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
1852
|
+
function Dn() {
|
|
1853
|
+
return Dn = Object.assign ? Object.assign.bind() : function(e) {
|
|
1854
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1855
|
+
var n = arguments[t];
|
|
1856
|
+
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1857
|
+
}
|
|
1858
|
+
return e;
|
|
1859
|
+
}, Dn.apply(null, arguments);
|
|
1860
|
+
}
|
|
1861
|
+
//#endregion
|
|
1862
|
+
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
1863
|
+
function On(e, t) {
|
|
1864
|
+
if (e == null) return {};
|
|
1865
|
+
var n = {};
|
|
1866
|
+
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
1867
|
+
if (t.indexOf(r) !== -1) continue;
|
|
1868
|
+
n[r] = e[r];
|
|
1869
|
+
}
|
|
1870
|
+
return n;
|
|
1871
|
+
}
|
|
1872
|
+
//#endregion
|
|
1873
|
+
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
1874
|
+
function kn(e, t) {
|
|
1875
|
+
return kn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
1876
|
+
return e.__proto__ = t, e;
|
|
1877
|
+
}, kn(e, t);
|
|
1878
|
+
}
|
|
1879
|
+
//#endregion
|
|
1880
|
+
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
1881
|
+
function An(e, t) {
|
|
1882
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, kn(e, t);
|
|
1883
|
+
}
|
|
1884
|
+
//#endregion
|
|
1885
|
+
//#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
1886
|
+
var jn = (function() {
|
|
1887
|
+
if (typeof Map < "u") return Map;
|
|
1888
|
+
function e(e, t) {
|
|
1889
|
+
var n = -1;
|
|
1890
|
+
return e.some(function(e, r) {
|
|
1891
|
+
return e[0] === t ? (n = r, !0) : !1;
|
|
1892
|
+
}), n;
|
|
1893
|
+
}
|
|
1894
|
+
return function() {
|
|
1895
|
+
function t() {
|
|
1896
|
+
this.__entries__ = [];
|
|
1897
|
+
}
|
|
1898
|
+
return Object.defineProperty(t.prototype, "size", {
|
|
1899
|
+
get: function() {
|
|
1900
|
+
return this.__entries__.length;
|
|
1901
|
+
},
|
|
1902
|
+
enumerable: !0,
|
|
1903
|
+
configurable: !0
|
|
1904
|
+
}), t.prototype.get = function(t) {
|
|
1905
|
+
var n = e(this.__entries__, t), r = this.__entries__[n];
|
|
1906
|
+
return r && r[1];
|
|
1907
|
+
}, t.prototype.set = function(t, n) {
|
|
1908
|
+
var r = e(this.__entries__, t);
|
|
1909
|
+
~r ? this.__entries__[r][1] = n : this.__entries__.push([t, n]);
|
|
1910
|
+
}, t.prototype.delete = function(t) {
|
|
1911
|
+
var n = this.__entries__, r = e(n, t);
|
|
1912
|
+
~r && n.splice(r, 1);
|
|
1913
|
+
}, t.prototype.has = function(t) {
|
|
1914
|
+
return !!~e(this.__entries__, t);
|
|
1915
|
+
}, t.prototype.clear = function() {
|
|
1916
|
+
this.__entries__.splice(0);
|
|
1917
|
+
}, t.prototype.forEach = function(e, t) {
|
|
1918
|
+
t === void 0 && (t = null);
|
|
1919
|
+
for (var n = 0, r = this.__entries__; n < r.length; n++) {
|
|
1920
|
+
var i = r[n];
|
|
1921
|
+
e.call(t, i[1], i[0]);
|
|
1922
|
+
}
|
|
1923
|
+
}, t;
|
|
1924
|
+
}();
|
|
1925
|
+
})(), Mn = typeof window < "u" && typeof document < "u" && window.document === document, Nn = (function() {
|
|
1926
|
+
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
1927
|
+
})(), Pn = (function() {
|
|
1928
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Nn) : function(e) {
|
|
1929
|
+
return setTimeout(function() {
|
|
1930
|
+
return e(Date.now());
|
|
1931
|
+
}, 1e3 / 60);
|
|
1932
|
+
};
|
|
1933
|
+
})(), Fn = 2;
|
|
1934
|
+
function In(e, t) {
|
|
1935
|
+
var n = !1, r = !1, i = 0;
|
|
1936
|
+
function a() {
|
|
1937
|
+
n && (n = !1, e()), r && s();
|
|
1938
|
+
}
|
|
1939
|
+
function o() {
|
|
1940
|
+
Pn(a);
|
|
1941
|
+
}
|
|
1942
|
+
function s() {
|
|
1943
|
+
var e = Date.now();
|
|
1944
|
+
if (n) {
|
|
1945
|
+
if (e - i < Fn) return;
|
|
1946
|
+
r = !0;
|
|
1947
|
+
} else n = !0, r = !1, setTimeout(o, t);
|
|
1948
|
+
i = e;
|
|
1949
|
+
}
|
|
1950
|
+
return s;
|
|
1951
|
+
}
|
|
1952
|
+
var Ln = 20, Rn = [
|
|
1953
|
+
"top",
|
|
1954
|
+
"right",
|
|
1955
|
+
"bottom",
|
|
1956
|
+
"left",
|
|
1957
|
+
"width",
|
|
1958
|
+
"height",
|
|
1959
|
+
"size",
|
|
1960
|
+
"weight"
|
|
1961
|
+
], zn = typeof MutationObserver < "u", Bn = function() {
|
|
1962
|
+
function e() {
|
|
1963
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = In(this.refresh.bind(this), Ln);
|
|
1964
|
+
}
|
|
1965
|
+
return e.prototype.addObserver = function(e) {
|
|
1966
|
+
~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
|
|
1967
|
+
}, e.prototype.removeObserver = function(e) {
|
|
1968
|
+
var t = this.observers_, n = t.indexOf(e);
|
|
1969
|
+
~n && t.splice(n, 1), !t.length && this.connected_ && this.disconnect_();
|
|
1970
|
+
}, e.prototype.refresh = function() {
|
|
1971
|
+
this.updateObservers_() && this.refresh();
|
|
1972
|
+
}, e.prototype.updateObservers_ = function() {
|
|
1973
|
+
var e = this.observers_.filter(function(e) {
|
|
1974
|
+
return e.gatherActive(), e.hasActive();
|
|
1975
|
+
});
|
|
1976
|
+
return e.forEach(function(e) {
|
|
1977
|
+
return e.broadcastActive();
|
|
1978
|
+
}), e.length > 0;
|
|
1979
|
+
}, e.prototype.connect_ = function() {
|
|
1980
|
+
!Mn || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), zn ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
1981
|
+
attributes: !0,
|
|
1982
|
+
childList: !0,
|
|
1983
|
+
characterData: !0,
|
|
1984
|
+
subtree: !0
|
|
1985
|
+
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
1986
|
+
}, e.prototype.disconnect_ = function() {
|
|
1987
|
+
!Mn || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
1988
|
+
}, e.prototype.onTransitionEnd_ = function(e) {
|
|
1989
|
+
var t = e.propertyName, n = t === void 0 ? "" : t;
|
|
1990
|
+
Rn.some(function(e) {
|
|
1991
|
+
return !!~n.indexOf(e);
|
|
1992
|
+
}) && this.refresh();
|
|
1993
|
+
}, e.getInstance = function() {
|
|
1994
|
+
return this.instance_ ||= new e(), this.instance_;
|
|
1995
|
+
}, e.instance_ = null, e;
|
|
1996
|
+
}(), Vn = (function(e, t) {
|
|
1997
|
+
for (var n = 0, r = Object.keys(t); n < r.length; n++) {
|
|
1998
|
+
var i = r[n];
|
|
1999
|
+
Object.defineProperty(e, i, {
|
|
2000
|
+
value: t[i],
|
|
2001
|
+
enumerable: !1,
|
|
2002
|
+
writable: !1,
|
|
2003
|
+
configurable: !0
|
|
2004
|
+
});
|
|
2005
|
+
}
|
|
2006
|
+
return e;
|
|
2007
|
+
}), Hn = (function(e) {
|
|
2008
|
+
return e && e.ownerDocument && e.ownerDocument.defaultView || Nn;
|
|
2009
|
+
}), Un = $n(0, 0, 0, 0);
|
|
2010
|
+
function Wn(e) {
|
|
2011
|
+
return parseFloat(e) || 0;
|
|
2012
|
+
}
|
|
2013
|
+
function Gn(e) {
|
|
2014
|
+
return [...arguments].slice(1).reduce(function(t, n) {
|
|
2015
|
+
var r = e["border-" + n + "-width"];
|
|
2016
|
+
return t + Wn(r);
|
|
2017
|
+
}, 0);
|
|
2018
|
+
}
|
|
2019
|
+
function Kn(e) {
|
|
2020
|
+
for (var t = [
|
|
2021
|
+
"top",
|
|
2022
|
+
"right",
|
|
2023
|
+
"bottom",
|
|
2024
|
+
"left"
|
|
2025
|
+
], n = {}, r = 0, i = t; r < i.length; r++) {
|
|
2026
|
+
var a = i[r], o = e["padding-" + a];
|
|
2027
|
+
n[a] = Wn(o);
|
|
2028
|
+
}
|
|
2029
|
+
return n;
|
|
2030
|
+
}
|
|
2031
|
+
function qn(e) {
|
|
2032
|
+
var t = e.getBBox();
|
|
2033
|
+
return $n(0, 0, t.width, t.height);
|
|
2034
|
+
}
|
|
2035
|
+
function Jn(e) {
|
|
2036
|
+
var t = e.clientWidth, n = e.clientHeight;
|
|
2037
|
+
if (!t && !n) return Un;
|
|
2038
|
+
var r = Hn(e).getComputedStyle(e), i = Kn(r), a = i.left + i.right, o = i.top + i.bottom, s = Wn(r.width), c = Wn(r.height);
|
|
2039
|
+
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= Gn(r, "left", "right") + a), Math.round(c + o) !== n && (c -= Gn(r, "top", "bottom") + o)), !Xn(e)) {
|
|
2040
|
+
var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
|
|
2041
|
+
Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
|
|
2042
|
+
}
|
|
2043
|
+
return $n(i.left, i.top, s, c);
|
|
2044
|
+
}
|
|
2045
|
+
var Yn = (function() {
|
|
2046
|
+
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
2047
|
+
return e instanceof Hn(e).SVGGraphicsElement;
|
|
2048
|
+
} : function(e) {
|
|
2049
|
+
return e instanceof Hn(e).SVGElement && typeof e.getBBox == "function";
|
|
2050
|
+
};
|
|
2051
|
+
})();
|
|
2052
|
+
function Xn(e) {
|
|
2053
|
+
return e === Hn(e).document.documentElement;
|
|
2054
|
+
}
|
|
2055
|
+
function Zn(e) {
|
|
2056
|
+
return Mn ? Yn(e) ? qn(e) : Jn(e) : Un;
|
|
2057
|
+
}
|
|
2058
|
+
function Qn(e) {
|
|
2059
|
+
var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
|
|
2060
|
+
return Vn(a, {
|
|
2061
|
+
x: t,
|
|
2062
|
+
y: n,
|
|
2063
|
+
width: r,
|
|
2064
|
+
height: i,
|
|
2065
|
+
top: n,
|
|
2066
|
+
right: t + r,
|
|
2067
|
+
bottom: i + n,
|
|
2068
|
+
left: t
|
|
2069
|
+
}), a;
|
|
2070
|
+
}
|
|
2071
|
+
function $n(e, t, n, r) {
|
|
2072
|
+
return {
|
|
2073
|
+
x: e,
|
|
2074
|
+
y: t,
|
|
2075
|
+
width: n,
|
|
2076
|
+
height: r
|
|
2077
|
+
};
|
|
2078
|
+
}
|
|
2079
|
+
var er = function() {
|
|
2080
|
+
function e(e) {
|
|
2081
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = $n(0, 0, 0, 0), this.target = e;
|
|
2082
|
+
}
|
|
2083
|
+
return e.prototype.isActive = function() {
|
|
2084
|
+
var e = Zn(this.target);
|
|
2085
|
+
return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
|
|
2086
|
+
}, e.prototype.broadcastRect = function() {
|
|
2087
|
+
var e = this.contentRect_;
|
|
2088
|
+
return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
|
|
2089
|
+
}, e;
|
|
2090
|
+
}(), tr = function() {
|
|
2091
|
+
function e(e, t) {
|
|
2092
|
+
var n = Qn(t);
|
|
2093
|
+
Vn(this, {
|
|
2094
|
+
target: e,
|
|
2095
|
+
contentRect: n
|
|
2096
|
+
});
|
|
2097
|
+
}
|
|
2098
|
+
return e;
|
|
2099
|
+
}(), nr = function() {
|
|
2100
|
+
function e(e, t, n) {
|
|
2101
|
+
if (this.activeObservations_ = [], this.observations_ = new jn(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
|
|
2102
|
+
this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
|
|
2103
|
+
}
|
|
2104
|
+
return e.prototype.observe = function(e) {
|
|
2105
|
+
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
2106
|
+
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
2107
|
+
if (!(e instanceof Hn(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
2108
|
+
var t = this.observations_;
|
|
2109
|
+
t.has(e) || (t.set(e, new er(e)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
2110
|
+
}
|
|
2111
|
+
}, e.prototype.unobserve = function(e) {
|
|
2112
|
+
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
2113
|
+
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
2114
|
+
if (!(e instanceof Hn(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
2115
|
+
var t = this.observations_;
|
|
2116
|
+
t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
|
|
2117
|
+
}
|
|
2118
|
+
}, e.prototype.disconnect = function() {
|
|
2119
|
+
this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
|
|
2120
|
+
}, e.prototype.gatherActive = function() {
|
|
2121
|
+
var e = this;
|
|
2122
|
+
this.clearActive(), this.observations_.forEach(function(t) {
|
|
2123
|
+
t.isActive() && e.activeObservations_.push(t);
|
|
2124
|
+
});
|
|
2125
|
+
}, e.prototype.broadcastActive = function() {
|
|
2126
|
+
if (this.hasActive()) {
|
|
2127
|
+
var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
|
|
2128
|
+
return new tr(e.target, e.broadcastRect());
|
|
2129
|
+
});
|
|
2130
|
+
this.callback_.call(e, t, e), this.clearActive();
|
|
2131
|
+
}
|
|
2132
|
+
}, e.prototype.clearActive = function() {
|
|
2133
|
+
this.activeObservations_.splice(0);
|
|
2134
|
+
}, e.prototype.hasActive = function() {
|
|
2135
|
+
return this.activeObservations_.length > 0;
|
|
2136
|
+
}, e;
|
|
2137
|
+
}(), rr = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new jn(), ir = function() {
|
|
2138
|
+
function e(t) {
|
|
2139
|
+
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
|
|
2140
|
+
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
2141
|
+
var n = new nr(t, Bn.getInstance(), this);
|
|
2142
|
+
rr.set(this, n);
|
|
2143
|
+
}
|
|
2144
|
+
return e;
|
|
2145
|
+
}();
|
|
2146
|
+
[
|
|
2147
|
+
"observe",
|
|
2148
|
+
"unobserve",
|
|
2149
|
+
"disconnect"
|
|
2150
|
+
].forEach(function(e) {
|
|
2151
|
+
ir.prototype[e] = function() {
|
|
2152
|
+
var t;
|
|
2153
|
+
return (t = rr.get(this))[e].apply(t, arguments);
|
|
2154
|
+
};
|
|
2155
|
+
});
|
|
2156
|
+
var ar = (function() {
|
|
2157
|
+
return Nn.ResizeObserver === void 0 ? ir : Nn.ResizeObserver;
|
|
2158
|
+
})(), or = [
|
|
2159
|
+
"client",
|
|
2160
|
+
"offset",
|
|
2161
|
+
"scroll",
|
|
2162
|
+
"bounds",
|
|
2163
|
+
"margin"
|
|
2164
|
+
];
|
|
2165
|
+
function sr(e) {
|
|
2166
|
+
var t = [];
|
|
2167
|
+
return or.forEach(function(n) {
|
|
2168
|
+
e[n] && t.push(n);
|
|
2169
|
+
}), t;
|
|
2170
|
+
}
|
|
2171
|
+
function cr(e, t) {
|
|
2172
|
+
var n = {};
|
|
2173
|
+
if (t.indexOf("client") > -1 && (n.client = {
|
|
2174
|
+
top: e.clientTop,
|
|
2175
|
+
left: e.clientLeft,
|
|
2176
|
+
width: e.clientWidth,
|
|
2177
|
+
height: e.clientHeight
|
|
2178
|
+
}), t.indexOf("offset") > -1 && (n.offset = {
|
|
2179
|
+
top: e.offsetTop,
|
|
2180
|
+
left: e.offsetLeft,
|
|
2181
|
+
width: e.offsetWidth,
|
|
2182
|
+
height: e.offsetHeight
|
|
2183
|
+
}), t.indexOf("scroll") > -1 && (n.scroll = {
|
|
2184
|
+
top: e.scrollTop,
|
|
2185
|
+
left: e.scrollLeft,
|
|
2186
|
+
width: e.scrollWidth,
|
|
2187
|
+
height: e.scrollHeight
|
|
2188
|
+
}), t.indexOf("bounds") > -1) {
|
|
2189
|
+
var r = e.getBoundingClientRect();
|
|
2190
|
+
n.bounds = {
|
|
2191
|
+
top: r.top,
|
|
2192
|
+
right: r.right,
|
|
2193
|
+
bottom: r.bottom,
|
|
2194
|
+
left: r.left,
|
|
2195
|
+
width: r.width,
|
|
2196
|
+
height: r.height
|
|
2197
|
+
};
|
|
2198
|
+
}
|
|
2199
|
+
if (t.indexOf("margin") > -1) {
|
|
2200
|
+
var i = getComputedStyle(e);
|
|
2201
|
+
n.margin = {
|
|
2202
|
+
top: i ? parseInt(i.marginTop) : 0,
|
|
2203
|
+
right: i ? parseInt(i.marginRight) : 0,
|
|
2204
|
+
bottom: i ? parseInt(i.marginBottom) : 0,
|
|
2205
|
+
left: i ? parseInt(i.marginLeft) : 0
|
|
2206
|
+
};
|
|
2207
|
+
}
|
|
2208
|
+
return n;
|
|
2209
|
+
}
|
|
2210
|
+
function lr(e) {
|
|
2211
|
+
return e && e.ownerDocument && e.ownerDocument.defaultView || window;
|
|
2212
|
+
}
|
|
2213
|
+
function ur(e) {
|
|
2214
|
+
return function(t) {
|
|
2215
|
+
var n, r;
|
|
2216
|
+
return r = n = /*#__PURE__*/ function(n) {
|
|
2217
|
+
An(r, n);
|
|
2218
|
+
function r() {
|
|
2219
|
+
var t, r = [...arguments];
|
|
2220
|
+
return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
|
|
2221
|
+
entry: {},
|
|
2222
|
+
client: {},
|
|
2223
|
+
offset: {},
|
|
2224
|
+
scroll: {},
|
|
2225
|
+
bounds: {},
|
|
2226
|
+
margin: {}
|
|
2227
|
+
} }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
|
|
2228
|
+
var r = cr(t._node, e || sr(t.props));
|
|
2229
|
+
n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
|
|
2230
|
+
t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
|
|
2231
|
+
});
|
|
2232
|
+
}, t._handleRef = function(e) {
|
|
2233
|
+
t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = lr(t._node);
|
|
2234
|
+
var n = t.props.innerRef;
|
|
2235
|
+
n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
|
|
2236
|
+
}, t;
|
|
2237
|
+
}
|
|
2238
|
+
var i = r.prototype;
|
|
2239
|
+
return i.componentDidMount = function() {
|
|
2240
|
+
this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new ar(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(cr(this._node, e || sr(this.props))));
|
|
2241
|
+
}, i.componentWillUnmount = function() {
|
|
2242
|
+
this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
|
|
2243
|
+
}, i.render = function() {
|
|
2244
|
+
var e = this.props;
|
|
2245
|
+
return e.innerRef, e.onResize, Ee(t, Dn({}, On(e, ["innerRef", "onResize"]), {
|
|
2246
|
+
measureRef: this._handleRef,
|
|
2247
|
+
measure: this.measure,
|
|
2248
|
+
contentRect: this.state.contentRect
|
|
2249
|
+
}));
|
|
2250
|
+
}, r;
|
|
2251
|
+
}(Te), n.propTypes = {
|
|
2252
|
+
client: Q.default.bool,
|
|
2253
|
+
offset: Q.default.bool,
|
|
2254
|
+
scroll: Q.default.bool,
|
|
2255
|
+
bounds: Q.default.bool,
|
|
2256
|
+
margin: Q.default.bool,
|
|
2257
|
+
innerRef: Q.default.oneOfType([Q.default.object, Q.default.func]),
|
|
2258
|
+
onResize: Q.default.func
|
|
2259
|
+
}, r;
|
|
2260
|
+
};
|
|
2261
|
+
}
|
|
2262
|
+
var dr = ur()(function(e) {
|
|
2263
|
+
var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
|
|
2264
|
+
return i({
|
|
2265
|
+
measure: t,
|
|
2266
|
+
measureRef: n,
|
|
2267
|
+
contentRect: r
|
|
2268
|
+
});
|
|
2269
|
+
});
|
|
2270
|
+
dr.displayName = "Measure", dr.propTypes.children = Q.default.func;
|
|
2271
|
+
//#endregion
|
|
2272
|
+
//#region ../../lib-react/config-ui/dist/layout/settings-box.js
|
|
2273
|
+
var fr = z("div")(({ theme: e }) => ({
|
|
2274
|
+
backgroundColor: e.palette.background.paper,
|
|
2275
|
+
border: `2px solid ${e.palette.grey[200]}`,
|
|
2276
|
+
display: "flex",
|
|
2277
|
+
flexDirection: "column",
|
|
2278
|
+
justifyContent: "flex-start",
|
|
2279
|
+
minWidth: "275px",
|
|
2280
|
+
maxWidth: "300px",
|
|
2281
|
+
padding: "20px 4px 4px 20px",
|
|
2282
|
+
zIndex: 99
|
|
2283
|
+
})), pr = class extends K.Component {
|
|
2284
|
+
static propTypes = {
|
|
2285
|
+
className: Q.default.string,
|
|
2286
|
+
children: Q.default.oneOfType([Q.default.arrayOf(Q.default.node), Q.default.node]).isRequired
|
|
2287
|
+
};
|
|
2288
|
+
static defaultProps = {};
|
|
2289
|
+
render() {
|
|
2290
|
+
let { className: e, children: t } = this.props;
|
|
2291
|
+
return /* @__PURE__ */ q(fr, {
|
|
2292
|
+
className: e,
|
|
2293
|
+
children: t
|
|
2294
|
+
});
|
|
2295
|
+
}
|
|
2296
|
+
}, mr = ve({
|
|
2297
|
+
typography: { fontFamily: "inherit" },
|
|
2298
|
+
components: { MuiButton: { styleOverrides: { contained: {
|
|
2299
|
+
backgroundColor: "#e0e0e0",
|
|
2300
|
+
color: "#000000",
|
|
2301
|
+
"&:hover": { backgroundColor: "#bdbdbd" }
|
|
2302
|
+
} } } }
|
|
2303
|
+
}), hr = class extends K.Component {
|
|
2304
|
+
static propTypes = {
|
|
2305
|
+
children: Q.default.oneOfType([
|
|
2306
|
+
Q.default.string,
|
|
2307
|
+
Q.default.arrayOf(Q.default.element),
|
|
2308
|
+
Q.default.element
|
|
2309
|
+
]),
|
|
2310
|
+
className: Q.default.string,
|
|
2311
|
+
dimensions: Q.default.object,
|
|
2312
|
+
settings: Q.default.element,
|
|
2313
|
+
sidePanelMinWidth: Q.default.number,
|
|
2314
|
+
hideSettings: Q.default.bool,
|
|
2315
|
+
extraCSSRules: Q.default.shape({
|
|
2316
|
+
names: Q.default.arrayOf(Q.default.string),
|
|
2317
|
+
rules: Q.default.string
|
|
2318
|
+
})
|
|
2319
|
+
};
|
|
2320
|
+
static defaultProps = {
|
|
2321
|
+
sidePanelMinWidth: 1135,
|
|
2322
|
+
hideSettings: !1,
|
|
2323
|
+
dimensions: {}
|
|
2324
|
+
};
|
|
2325
|
+
constructor(...e) {
|
|
2326
|
+
super(...e), this.state = { layoutMode: void 0 };
|
|
2327
|
+
}
|
|
2328
|
+
onResize = (e) => {
|
|
2329
|
+
let { bounds: t } = e, { sidePanelMinWidth: n, dimensions: r } = this.props, { maxWidth: i } = r || {}, a = t.width > n && (!i || i > n) ? "inline" : "tabbed";
|
|
2330
|
+
a !== this.state.layoutMode && this.setState({ layoutMode: a });
|
|
2331
|
+
};
|
|
2332
|
+
render() {
|
|
2333
|
+
return /* @__PURE__ */ q(de, {
|
|
2334
|
+
injectFirst: !0,
|
|
2335
|
+
children: /* @__PURE__ */ q(U, {
|
|
2336
|
+
theme: mr,
|
|
2337
|
+
children: /* @__PURE__ */ q(dr, {
|
|
2338
|
+
bounds: !0,
|
|
2339
|
+
onResize: this.onResize,
|
|
2340
|
+
children: ({ measureRef: e }) => {
|
|
2341
|
+
let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ q(pr, {
|
|
2342
|
+
className: "settings-box",
|
|
2343
|
+
children: n
|
|
2344
|
+
}) : n;
|
|
2345
|
+
return /* @__PURE__ */ J("div", {
|
|
2346
|
+
ref: e,
|
|
2347
|
+
className: "main-container extraCSSRules",
|
|
2348
|
+
children: [a?.rules ? /* @__PURE__ */ q("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ q(En, {
|
|
2349
|
+
mode: o,
|
|
2350
|
+
secondary: s,
|
|
2351
|
+
dimensions: i,
|
|
2352
|
+
children: t
|
|
2353
|
+
})]
|
|
2354
|
+
});
|
|
2355
|
+
}
|
|
2356
|
+
})
|
|
2357
|
+
})
|
|
2358
|
+
});
|
|
2359
|
+
}
|
|
2360
|
+
}, gr = ur("bounds")(hr), _r = /* @__PURE__ */ bn({
|
|
2361
|
+
ConfigLayout: () => gr,
|
|
2362
|
+
LayoutContents: () => En
|
|
2363
|
+
}), vr = z("div")(() => ({
|
|
2364
|
+
display: "flex",
|
|
2365
|
+
width: "100%",
|
|
2366
|
+
justifyContent: "space-between"
|
|
2367
|
+
})), yr = z(l)(({ theme: e }) => ({
|
|
2368
|
+
color: "rgba(0, 0, 0, 0.89)",
|
|
2369
|
+
fontSize: e.typography.fontSize,
|
|
2370
|
+
paddingTop: e.spacing(2)
|
|
2371
|
+
})), br = z(Rt)(({ checked: e }) => ({
|
|
2372
|
+
"&.Mui-checked .MuiSwitch-thumb": { color: `${V.tertiary()} !important` },
|
|
2373
|
+
"&.Mui-checked .MuiSwitch-track": { backgroundColor: `${V.tertiaryLight()} !important` },
|
|
2374
|
+
"& .MuiSwitch-track": { backgroundColor: e ? `${V.tertiaryLight()} !important` : void 0 }
|
|
2375
|
+
})), xr = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ J(vr, { children: [/* @__PURE__ */ q(yr, { children: n }), /* @__PURE__ */ q(br, {
|
|
2376
|
+
checked: e,
|
|
2377
|
+
disabled: t,
|
|
2378
|
+
onChange: (e) => r(e.target.checked)
|
|
2379
|
+
})] });
|
|
2380
|
+
xr.propTypes = {
|
|
2381
|
+
checked: Q.default.bool,
|
|
2382
|
+
disabled: Q.default.bool,
|
|
2383
|
+
label: Q.default.string.isRequired,
|
|
2384
|
+
toggle: Q.default.func.isRequired
|
|
2385
|
+
};
|
|
2386
|
+
//#endregion
|
|
2387
|
+
//#region ../../lib-react/config-ui/dist/settings/settings-radio-label.js
|
|
2388
|
+
var Sr = z(Ze)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
|
|
2389
|
+
color: "rgba(0, 0, 0, 0.89)",
|
|
2390
|
+
fontSize: e.typography.fontSize - 2,
|
|
2391
|
+
left: "-5px",
|
|
2392
|
+
position: "relative"
|
|
2393
|
+
} })), Cr = z(bt)(() => ({ color: `${V.tertiary()} !important` })), wr = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ q(Sr, {
|
|
2394
|
+
value: t,
|
|
2395
|
+
control: /* @__PURE__ */ q(Cr, {
|
|
2396
|
+
checked: n,
|
|
2397
|
+
onChange: r
|
|
2398
|
+
}),
|
|
2399
|
+
label: e
|
|
2400
|
+
});
|
|
2401
|
+
wr.propTypes = {
|
|
2402
|
+
label: Q.default.string,
|
|
2403
|
+
value: Q.default.string,
|
|
2404
|
+
checked: Q.default.bool,
|
|
2405
|
+
onChange: Q.default.func
|
|
2406
|
+
};
|
|
2407
|
+
//#endregion
|
|
2408
|
+
//#region ../../lib-react/config-ui/dist/settings/panel.js
|
|
2409
|
+
var Tr = (0, zt.default)("pie-lib:config-ui:settings:panel"), Er = {
|
|
2410
|
+
label: Q.default.string,
|
|
2411
|
+
value: Q.default.string
|
|
2412
|
+
}, Dr = {
|
|
2413
|
+
label: Q.default.string,
|
|
2414
|
+
value: Q.default.string,
|
|
2415
|
+
onChange: Q.default.func
|
|
2416
|
+
}, Or = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ q(Xt, {
|
|
2417
|
+
checked: t,
|
|
2418
|
+
label: e,
|
|
2419
|
+
onChange: (e) => {
|
|
2420
|
+
n(e.target.checked);
|
|
2421
|
+
}
|
|
2422
|
+
});
|
|
2423
|
+
Or.propTypes = {
|
|
2424
|
+
label: Q.default.string,
|
|
2425
|
+
value: Q.default.bool,
|
|
2426
|
+
onChange: Q.default.func
|
|
2427
|
+
};
|
|
2428
|
+
var kr = z(_n)(({ theme: e }) => ({
|
|
2429
|
+
marginTop: e.spacing(.5),
|
|
2430
|
+
paddingBottom: e.spacing(.5),
|
|
2431
|
+
width: "100%",
|
|
2432
|
+
"& > label": {
|
|
2433
|
+
color: "rgba(0, 0, 0, 0.89)",
|
|
2434
|
+
transform: "translate(0, 10px) scale(1)",
|
|
2435
|
+
fontSize: "18px",
|
|
2436
|
+
marginTop: e.spacing(2.5)
|
|
2437
|
+
},
|
|
2438
|
+
"& > div": { marginTop: e.spacing(2.5) }
|
|
2439
|
+
})), Ar = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ q(kr, {
|
|
2440
|
+
direction: "horizontal",
|
|
2441
|
+
customLabel: wr,
|
|
2442
|
+
value: t,
|
|
2443
|
+
header: e,
|
|
2444
|
+
opts: r,
|
|
2445
|
+
onChange: n
|
|
2446
|
+
});
|
|
2447
|
+
Ar.propTypes = {
|
|
2448
|
+
...Dr,
|
|
2449
|
+
choices: Q.default.arrayOf(Q.default.shape(Er))
|
|
2450
|
+
};
|
|
2451
|
+
var jr = Ar, Mr = z("p")(({ theme: e }) => ({
|
|
2452
|
+
margin: 0,
|
|
2453
|
+
fontSize: e.typography.fontSize
|
|
2454
|
+
})), Nr = z(Se)(({ theme: e }) => ({
|
|
2455
|
+
marginTop: e.spacing(.5),
|
|
2456
|
+
border: "2px solid lightgrey",
|
|
2457
|
+
padding: `0 ${e.spacing(1)}`,
|
|
2458
|
+
borderRadius: "4px"
|
|
2459
|
+
})), Pr = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
|
|
2460
|
+
let i = (e) => typeof e == "string" ? e : e.label, a = (e) => typeof e == "string" ? e : e.value;
|
|
2461
|
+
return /* @__PURE__ */ J("div", { children: [e && /* @__PURE__ */ q(Mr, { children: e }), /* @__PURE__ */ q(Nr, {
|
|
2462
|
+
value: t || r && r[0],
|
|
2463
|
+
onChange: ({ target: e }) => n(e.value),
|
|
2464
|
+
input: /* @__PURE__ */ q(M, { id: `dropdown-${e}` }),
|
|
2465
|
+
disableUnderline: !0,
|
|
2466
|
+
MenuProps: { transitionDuration: {
|
|
2467
|
+
enter: 225,
|
|
2468
|
+
exit: 195
|
|
2469
|
+
} },
|
|
2470
|
+
children: r.map((e, t) => /* @__PURE__ */ q(A, {
|
|
2471
|
+
value: a(e),
|
|
2472
|
+
children: i(e)
|
|
2473
|
+
}, t))
|
|
2474
|
+
})] });
|
|
2475
|
+
};
|
|
2476
|
+
Pr.propTypes = {
|
|
2477
|
+
...Dr,
|
|
2478
|
+
choices: Q.default.arrayOf(Q.default.string)
|
|
2479
|
+
};
|
|
2480
|
+
var Fr = z(W)(({ theme: e }) => ({
|
|
2481
|
+
marginRight: e.spacing(3),
|
|
2482
|
+
marginTop: e.spacing(1)
|
|
2483
|
+
})), Ir = ({ label: e }) => /* @__PURE__ */ q(Fr, { children: e }), Lr = z(en)(({ theme: e }) => ({
|
|
2484
|
+
width: "35%",
|
|
2485
|
+
marginRight: e.spacing(3),
|
|
2486
|
+
marginTop: e.spacing(1),
|
|
2487
|
+
"& .MuiInputBase-root": {
|
|
2488
|
+
marginTop: e.spacing(.5),
|
|
2489
|
+
border: "2px solid lightgrey",
|
|
2490
|
+
borderRadius: "4px",
|
|
2491
|
+
padding: `0 ${e.spacing(1)}`,
|
|
2492
|
+
backgroundColor: "transparent"
|
|
2493
|
+
}
|
|
2494
|
+
})), Rr = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ q(Lr, {
|
|
2495
|
+
variant: "standard",
|
|
2496
|
+
label: e || "Label",
|
|
2497
|
+
value: t,
|
|
2498
|
+
max: a,
|
|
2499
|
+
min: i,
|
|
2500
|
+
onChange: (e, t) => n(t),
|
|
2501
|
+
suffix: r,
|
|
2502
|
+
showErrorWhenOutsideRange: !0,
|
|
2503
|
+
disableUnderline: !0
|
|
2504
|
+
});
|
|
2505
|
+
Rr.propTypes = {
|
|
2506
|
+
...Dr,
|
|
2507
|
+
suffix: Q.default.string,
|
|
2508
|
+
min: Q.default.number,
|
|
2509
|
+
max: Q.default.number,
|
|
2510
|
+
value: Q.default.number
|
|
2511
|
+
}, Ir.propTypes = { ...Dr };
|
|
2512
|
+
var zr = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ q(xr, {
|
|
2513
|
+
label: t,
|
|
2514
|
+
checked: !!n,
|
|
2515
|
+
disabled: !!e,
|
|
2516
|
+
toggle: r
|
|
2517
|
+
});
|
|
2518
|
+
zr.propTypes = {
|
|
2519
|
+
...Dr,
|
|
2520
|
+
value: Q.default.bool
|
|
2521
|
+
};
|
|
2522
|
+
var Br = {
|
|
2523
|
+
toggle: zr,
|
|
2524
|
+
radio: jr,
|
|
2525
|
+
dropdown: Pr,
|
|
2526
|
+
numberField: Rr,
|
|
2527
|
+
checkbox: Or,
|
|
2528
|
+
textField: Ir
|
|
2529
|
+
}, Vr = z("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), Hr = z("div")(({ theme: e }) => ({
|
|
2530
|
+
color: "#495B8F",
|
|
2531
|
+
fontSize: e.typography.fontSize + 2,
|
|
2532
|
+
fontWeight: 600,
|
|
2533
|
+
marginBottom: e.spacing(1)
|
|
2534
|
+
})), Ur = z("p")(({ theme: e }) => ({
|
|
2535
|
+
fontSize: e.typography.fontSize,
|
|
2536
|
+
marginBottom: 0
|
|
2537
|
+
})), Wr = (e) => {
|
|
2538
|
+
let { model: n, label: r, group: i, configuration: a, onChange: o } = e, s = (e, r, i) => {
|
|
2539
|
+
let { isConfigProperty: s, ...c } = t(e, i || r), l = t(s ? a : n, r), u = {
|
|
2540
|
+
...c,
|
|
2541
|
+
key: r,
|
|
2542
|
+
value: l
|
|
2543
|
+
}, d = Br[u.type];
|
|
2544
|
+
return /* @__PURE__ */ q(d, {
|
|
2545
|
+
...u,
|
|
2546
|
+
onChange: (e) => o(r, e, s)
|
|
2547
|
+
}, r);
|
|
2548
|
+
}, c = (e, t) => {
|
|
2549
|
+
let n = e[t];
|
|
2550
|
+
if (!n) return null;
|
|
2551
|
+
let { type: r, label: i, fields: a, choices: o } = n;
|
|
2552
|
+
return r === "numberFields" ? /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Ur, { children: i }), Object.keys(a).map((n) => s(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", { children: i }), Object.keys(o).map((n) => s(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : s(e, t);
|
|
2553
|
+
};
|
|
2554
|
+
return /* @__PURE__ */ J(Vr, { children: [/* @__PURE__ */ q(Hr, { children: r }), Object.keys(i).map((e) => c(i, e))] });
|
|
2555
|
+
};
|
|
2556
|
+
Wr.propTypes = {
|
|
2557
|
+
model: Q.default.object,
|
|
2558
|
+
label: Q.default.string,
|
|
2559
|
+
group: Q.default.object,
|
|
2560
|
+
configuration: Q.default.object,
|
|
2561
|
+
onChange: Q.default.func
|
|
2562
|
+
};
|
|
2563
|
+
var Gr = class extends K.Component {
|
|
2564
|
+
static propTypes = {
|
|
2565
|
+
model: Q.default.object,
|
|
2566
|
+
configuration: Q.default.object,
|
|
2567
|
+
groups: Q.default.object,
|
|
2568
|
+
onChangeModel: Q.default.func,
|
|
2569
|
+
onChangeConfiguration: Q.default.func,
|
|
2570
|
+
modal: Q.default.object
|
|
2571
|
+
};
|
|
2572
|
+
static defaultProps = {
|
|
2573
|
+
onChangeModel: () => {},
|
|
2574
|
+
onChangeConfiguration: () => {}
|
|
2575
|
+
};
|
|
2576
|
+
change = (e, t, n = !1) => {
|
|
2577
|
+
Tr("[changeModel]", e, t);
|
|
2578
|
+
let { onChangeModel: i, onChangeConfiguration: a } = this.props, o = { ...this.props.model }, s = { ...this.props.configuration };
|
|
2579
|
+
n ? (r(s, e, t), a(s, e)) : (r(o, e, t), i(o, e));
|
|
2580
|
+
};
|
|
2581
|
+
render() {
|
|
2582
|
+
let { groups: e, model: t, configuration: n, modal: r } = this.props;
|
|
2583
|
+
return Tr("render:", t), /* @__PURE__ */ J("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ q(Wr, {
|
|
2584
|
+
label: r,
|
|
2585
|
+
model: t,
|
|
2586
|
+
configuration: n,
|
|
2587
|
+
group: e[r],
|
|
2588
|
+
onChange: this.change
|
|
2589
|
+
}, r) : null), r] });
|
|
2590
|
+
}
|
|
2591
|
+
}, Kr = /* @__PURE__ */ bn({
|
|
2592
|
+
Panel: () => Gr,
|
|
2593
|
+
checkbox: () => ei,
|
|
2594
|
+
checkboxes: () => ti,
|
|
2595
|
+
dropdown: () => Zr,
|
|
2596
|
+
numberField: () => Qr,
|
|
2597
|
+
numberFields: () => $r,
|
|
2598
|
+
radio: () => Xr,
|
|
2599
|
+
textField: () => qr,
|
|
2600
|
+
toggle: () => Jr
|
|
2601
|
+
}), qr = (e, t = !0) => ({
|
|
2602
|
+
label: e,
|
|
2603
|
+
type: "textField",
|
|
2604
|
+
isConfigProperty: t
|
|
2605
|
+
}), Jr = (e, t = !1, n = !1) => ({
|
|
2606
|
+
type: "toggle",
|
|
2607
|
+
label: e,
|
|
2608
|
+
isConfigProperty: t,
|
|
2609
|
+
disabled: n
|
|
2610
|
+
}), Yr = (e) => typeof e == "string" ? {
|
|
2611
|
+
label: e,
|
|
2612
|
+
value: e
|
|
2613
|
+
} : e, Xr = function() {
|
|
2614
|
+
let [e, t, n = !1] = Array.prototype.slice.call(arguments);
|
|
2615
|
+
return {
|
|
2616
|
+
type: "radio",
|
|
2617
|
+
label: e,
|
|
2618
|
+
choices: t && t.map((e) => Yr(e)),
|
|
2619
|
+
isConfigProperty: n
|
|
2620
|
+
};
|
|
2621
|
+
}, Zr = (e, t, n = !1) => ({
|
|
2622
|
+
type: "dropdown",
|
|
2623
|
+
label: e,
|
|
2624
|
+
choices: t,
|
|
2625
|
+
isConfigProperty: n
|
|
2626
|
+
}), Qr = (e, t, n = !1) => ({
|
|
2627
|
+
...t,
|
|
2628
|
+
label: e,
|
|
2629
|
+
type: "numberField",
|
|
2630
|
+
isConfigProperty: n
|
|
2631
|
+
}), $r = (e, t, n = !1) => (Object.keys(t).map((e) => {
|
|
2632
|
+
t[e] = Qr(t[e].label, t[e], n);
|
|
2633
|
+
}), {
|
|
2634
|
+
type: "numberFields",
|
|
2635
|
+
label: e,
|
|
2636
|
+
fields: t
|
|
2637
|
+
}), ei = (e, t, n = !1) => ({
|
|
2638
|
+
...t,
|
|
2639
|
+
label: e,
|
|
2640
|
+
type: "checkbox",
|
|
2641
|
+
isConfigProperty: n
|
|
2642
|
+
}), ti = (e, t, n = !1) => (Object.keys(t).map((e) => {
|
|
2643
|
+
t[e] = ei(t[e].label, t[e], n);
|
|
2644
|
+
}), {
|
|
2645
|
+
type: "checkboxes",
|
|
2646
|
+
label: e,
|
|
2647
|
+
choices: t
|
|
2648
|
+
});
|
|
2649
|
+
//#endregion
|
|
2650
|
+
//#region ../../lib-react/config-ui/dist/index.js
|
|
2651
|
+
function ni(e) {
|
|
2652
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
2653
|
+
}
|
|
2654
|
+
function ri(e, t) {
|
|
2655
|
+
return !e || ni(e) ? e : ni(e.default) ? e.default : t && ni(e[t]) ? e[t] : t && ni(e[t]?.default) ? e[t].default : e;
|
|
2656
|
+
}
|
|
2657
|
+
var ii = ri(ce, "InputContainer") || ri(si.InputContainer, "InputContainer"), ai = Ce, oi = ai.default, si = oi && typeof oi == "object" ? oi : ai;
|
|
2658
|
+
//#endregion
|
|
2659
|
+
//#region ../../lib-react/graphing/dist/grid-setup.js
|
|
2660
|
+
function ci(e) {
|
|
2661
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
2662
|
+
}
|
|
2663
|
+
function li(e, t) {
|
|
2664
|
+
return !e || ci(e) ? e : ci(e.default) ? e.default : t && ci(e[t]) ? e[t] : t && ci(e[t]?.default) ? e[t].default : e;
|
|
2665
|
+
}
|
|
2666
|
+
var ui = li(ce, "InputContainer") || li(pi.InputContainer, "InputContainer"), di = Ce, fi = di.default, pi = fi && typeof fi == "object" ? fi : di, mi = z("div")(() => ({ width: "450px" })), hi = z("div")(() => ({
|
|
2667
|
+
display: "flex",
|
|
2668
|
+
flexDirection: "column",
|
|
2669
|
+
width: "100%"
|
|
2670
|
+
})), gi = z("div")(() => ({
|
|
2671
|
+
display: "flex",
|
|
2672
|
+
flexDirection: "column",
|
|
2673
|
+
alignItems: "center"
|
|
2674
|
+
})), _i = z("div")(() => ({
|
|
2675
|
+
display: "flex",
|
|
2676
|
+
justifyContent: "space-around",
|
|
2677
|
+
alignItems: "center"
|
|
2678
|
+
})), vi = z("div")(({ theme: e }) => ({
|
|
2679
|
+
width: "130px",
|
|
2680
|
+
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
2681
|
+
})), yi = z("div")(({ theme: e }) => ({
|
|
2682
|
+
width: "160px",
|
|
2683
|
+
margin: `${e.spacing(1)} ${e.spacing(.5)}`,
|
|
2684
|
+
"& .MuiFormControl-root": { width: "100%" }
|
|
2685
|
+
})), bi = z("div")(({ theme: e }) => ({
|
|
2686
|
+
width: "230px",
|
|
2687
|
+
margin: `${e.spacing(1)} ${e.spacing(.5)}`,
|
|
2688
|
+
"& .MuiFormControl-root": { width: "100%" }
|
|
2689
|
+
})), xi = z(W)(({ theme: e }) => ({
|
|
2690
|
+
fontStyle: "italic",
|
|
2691
|
+
margin: `${e.spacing(1)} 0`
|
|
2692
|
+
})), Si = z("div")(() => ({
|
|
2693
|
+
display: "flex",
|
|
2694
|
+
justifyContent: "space-between",
|
|
2695
|
+
alignItems: "center"
|
|
2696
|
+
})), Ci = z(W)(() => ({ color: V.disabled() })), wi = z("div")(({ theme: e }) => ({ paddingTop: e.spacing(2) })), Ti = (e) => {
|
|
2697
|
+
let { disabled: t, displayedFields: n, labelValue: r, labelValues: i, gridValue: a, gridValues: o, onChange: s } = e, { labelStep: c = {}, step: l = {} } = n;
|
|
2698
|
+
return /* @__PURE__ */ J(gi, { children: [l && l.enabled && /* @__PURE__ */ q(yi, { children: /* @__PURE__ */ q(ln, {
|
|
2699
|
+
label: l.label || "",
|
|
2700
|
+
value: a,
|
|
2701
|
+
customValues: o,
|
|
2702
|
+
variant: "outlined",
|
|
2703
|
+
disabled: t,
|
|
2704
|
+
onChange: (e, t) => s("step", t)
|
|
2705
|
+
}) }), c && c.enabled && /* @__PURE__ */ q(yi, { children: /* @__PURE__ */ q(ln, {
|
|
2706
|
+
label: c.label || "",
|
|
2707
|
+
value: r,
|
|
2708
|
+
customValues: i,
|
|
2709
|
+
variant: "outlined",
|
|
2710
|
+
disabled: t,
|
|
2711
|
+
onChange: (e, t) => s("labelStep", t)
|
|
2712
|
+
}) })] });
|
|
2713
|
+
};
|
|
2714
|
+
Ti.propTypes = {
|
|
2715
|
+
disabled: Q.default.bool,
|
|
2716
|
+
displayedFields: Q.default.object,
|
|
2717
|
+
labelValue: Q.default.number,
|
|
2718
|
+
labelValues: Q.default.array,
|
|
2719
|
+
gridValue: Q.default.number,
|
|
2720
|
+
gridValues: Q.default.array,
|
|
2721
|
+
onChange: Q.default.func
|
|
2722
|
+
};
|
|
2723
|
+
var Ei = (e) => {
|
|
2724
|
+
let { disabled: t, displayedFields: n, displayHeader: r, label: i, maxValue: a, minValue: o, onChange: s, type: c } = e, { axisLabel: l = {}, min: u = {}, max: d = {} } = n;
|
|
2725
|
+
return /* @__PURE__ */ J(gi, { children: [
|
|
2726
|
+
r && /* @__PURE__ */ J(W, {
|
|
2727
|
+
variant: "subtitle2",
|
|
2728
|
+
children: [/* @__PURE__ */ q("i", { children: c === "domain" ? "x" : "y" }), "-axis"]
|
|
2729
|
+
}),
|
|
2730
|
+
u && u.enabled && /* @__PURE__ */ q(yi, { children: /* @__PURE__ */ q(ln, {
|
|
2731
|
+
label: u.label || "",
|
|
2732
|
+
value: o,
|
|
2733
|
+
min: -1e4,
|
|
2734
|
+
max: a - .05,
|
|
2735
|
+
variant: "outlined",
|
|
2736
|
+
disabled: t,
|
|
2737
|
+
onChange: (e, t) => s("min", t)
|
|
2738
|
+
}) }),
|
|
2739
|
+
d && d.enabled && /* @__PURE__ */ q(yi, { children: /* @__PURE__ */ q(ln, {
|
|
2740
|
+
label: d.label || "",
|
|
2741
|
+
value: a,
|
|
2742
|
+
min: o + .05,
|
|
2743
|
+
max: 1e4,
|
|
2744
|
+
variant: "outlined",
|
|
2745
|
+
disabled: t,
|
|
2746
|
+
onChange: (e, t) => s("max", t)
|
|
2747
|
+
}) }),
|
|
2748
|
+
l && l.enabled && /* @__PURE__ */ q(yi, { children: /* @__PURE__ */ q(ui, {
|
|
2749
|
+
label: l.label || "",
|
|
2750
|
+
children: /* @__PURE__ */ q(wi, { children: /* @__PURE__ */ q(_e, {
|
|
2751
|
+
onChange: (e) => s("axisLabel", e),
|
|
2752
|
+
markup: i || "",
|
|
2753
|
+
charactersLimit: 5,
|
|
2754
|
+
onKeyDown: (e) => e.key === "Enter",
|
|
2755
|
+
activePlugins: [
|
|
2756
|
+
"bold",
|
|
2757
|
+
"italic",
|
|
2758
|
+
"underline",
|
|
2759
|
+
"strikethrough"
|
|
2760
|
+
]
|
|
2761
|
+
}) })
|
|
2762
|
+
}) })
|
|
2763
|
+
] });
|
|
2764
|
+
};
|
|
2765
|
+
Ei.propTypes = {
|
|
2766
|
+
disabled: Q.default.bool,
|
|
2767
|
+
displayedFields: Q.default.object,
|
|
2768
|
+
displayHeader: Q.default.bool,
|
|
2769
|
+
label: Q.default.string,
|
|
2770
|
+
maxValue: Q.default.number,
|
|
2771
|
+
minValue: Q.default.number,
|
|
2772
|
+
type: Q.default.string,
|
|
2773
|
+
onChange: Q.default.func
|
|
2774
|
+
};
|
|
2775
|
+
var Di = (e) => {
|
|
2776
|
+
let { domain: t, displayedFields: n = {}, gridValues: r = {}, includeAxes: i, labelValues: a = {}, onChange: o, onChangeView: s, range: c, size: l, sizeConstraints: u, standardGrid: d } = e, f = {
|
|
2777
|
+
min: 2,
|
|
2778
|
+
max: 41
|
|
2779
|
+
}, { axisLabel: p = {}, dimensionsEnabled: m, includeAxesEnabled: h, labelStep: g = {}, min: _ = {}, max: v = {}, standardGridEnabled: y, step: b = {} } = n || {}, x = _.enabled || v.enabled || p.enabled || b.enabled || g.enabled, S = {
|
|
2780
|
+
step: b,
|
|
2781
|
+
labelStep: g
|
|
2782
|
+
}, C = {
|
|
2783
|
+
min: _,
|
|
2784
|
+
max: v,
|
|
2785
|
+
axisLabel: p
|
|
2786
|
+
}, w = (e) => {
|
|
2787
|
+
let n = (e) => {
|
|
2788
|
+
let n = e === "domain" ? t : c;
|
|
2789
|
+
return {
|
|
2790
|
+
min: 1,
|
|
2791
|
+
max: n.max < f.min || n.max > f.max ? 16 : n.max,
|
|
2792
|
+
step: 1,
|
|
2793
|
+
labelStep: 0
|
|
2794
|
+
};
|
|
2795
|
+
};
|
|
2796
|
+
o({
|
|
2797
|
+
includeAxes: e,
|
|
2798
|
+
range: {
|
|
2799
|
+
...c,
|
|
2800
|
+
...e ? { labelStep: 1 } : n("range")
|
|
2801
|
+
},
|
|
2802
|
+
domain: {
|
|
2803
|
+
...t,
|
|
2804
|
+
...e ? { labelStep: 1 } : n("domain")
|
|
2805
|
+
}
|
|
2806
|
+
});
|
|
2807
|
+
}, T = (e) => {
|
|
2808
|
+
o({
|
|
2809
|
+
standardGrid: e,
|
|
2810
|
+
range: {
|
|
2811
|
+
...t,
|
|
2812
|
+
axisLabel: c.axisLabel
|
|
2813
|
+
},
|
|
2814
|
+
graph: {
|
|
2815
|
+
...l,
|
|
2816
|
+
height: l.width
|
|
2817
|
+
}
|
|
2818
|
+
});
|
|
2819
|
+
}, E = (e, t) => {
|
|
2820
|
+
let n = {
|
|
2821
|
+
...l,
|
|
2822
|
+
[e]: t
|
|
2823
|
+
};
|
|
2824
|
+
d && (n.height = t), o({ graph: n });
|
|
2825
|
+
}, D = (e, n) => {
|
|
2826
|
+
t[e] = n, d && e !== "axisLabel" && (c[e] = n), o({
|
|
2827
|
+
domain: t,
|
|
2828
|
+
range: c
|
|
2829
|
+
});
|
|
2830
|
+
}, O = (e, t) => {
|
|
2831
|
+
c[e] = t, o({ range: c });
|
|
2832
|
+
}, k = /* @__PURE__ */ J(Oe, { children: [
|
|
2833
|
+
/* @__PURE__ */ J(_i, { children: [/* @__PURE__ */ q(Ei, {
|
|
2834
|
+
displayedFields: C,
|
|
2835
|
+
displayHeader: x,
|
|
2836
|
+
type: "domain",
|
|
2837
|
+
minValue: t.min,
|
|
2838
|
+
maxValue: t.max,
|
|
2839
|
+
label: t.axisLabel,
|
|
2840
|
+
includeAxes: i,
|
|
2841
|
+
onChange: D
|
|
2842
|
+
}), /* @__PURE__ */ q(Ei, {
|
|
2843
|
+
displayedFields: C,
|
|
2844
|
+
displayHeader: x,
|
|
2845
|
+
type: "range",
|
|
2846
|
+
minValue: c.min,
|
|
2847
|
+
maxValue: c.max,
|
|
2848
|
+
label: c.axisLabel,
|
|
2849
|
+
disabled: d,
|
|
2850
|
+
includeAxes: i,
|
|
2851
|
+
onChange: O
|
|
2852
|
+
})] }),
|
|
2853
|
+
(_.enabled || v.enabled) && /* @__PURE__ */ q(xi, { children: "If you want the axis to be visible, use a zero or negative Min Value, and a positive Max Value" }),
|
|
2854
|
+
(b.enabled || g.enabled) && /* @__PURE__ */ J(_i, { children: [/* @__PURE__ */ q(Ti, {
|
|
2855
|
+
displayedFields: S,
|
|
2856
|
+
gridValue: t.step,
|
|
2857
|
+
labelValue: t.labelStep,
|
|
2858
|
+
gridValues: r.domain || [],
|
|
2859
|
+
labelValues: a.domain || [],
|
|
2860
|
+
onChange: D
|
|
2861
|
+
}), /* @__PURE__ */ q(Ti, {
|
|
2862
|
+
disabled: d,
|
|
2863
|
+
displayedFields: S,
|
|
2864
|
+
gridValue: c.step,
|
|
2865
|
+
labelValue: c.labelStep,
|
|
2866
|
+
gridValues: r.range || [],
|
|
2867
|
+
labelValues: a.range || [],
|
|
2868
|
+
onChange: O
|
|
2869
|
+
})] }),
|
|
2870
|
+
g.enabled && /* @__PURE__ */ q(xi, { children: "For unnumbered gridlines, enter a label interval of 0" })
|
|
2871
|
+
] }), A = v.enabled ? /* @__PURE__ */ J(gi, { children: [/* @__PURE__ */ q(bi, { children: /* @__PURE__ */ q(ln, {
|
|
2872
|
+
label: "Number of Vertical Gridlines",
|
|
2873
|
+
value: t.max,
|
|
2874
|
+
min: !i && f.min,
|
|
2875
|
+
max: !i && f.max,
|
|
2876
|
+
variant: "outlined",
|
|
2877
|
+
onChange: (e, t) => D("max", t)
|
|
2878
|
+
}) }), /* @__PURE__ */ q(bi, { children: /* @__PURE__ */ q(ln, {
|
|
2879
|
+
label: "Number of Horizontal Gridlines",
|
|
2880
|
+
value: c.max,
|
|
2881
|
+
min: !i && f.min,
|
|
2882
|
+
max: !i && f.max,
|
|
2883
|
+
variant: "outlined",
|
|
2884
|
+
disabled: d,
|
|
2885
|
+
onChange: (e, t) => O("max", t)
|
|
2886
|
+
}) })] }) : null;
|
|
2887
|
+
return /* @__PURE__ */ q(mi, { children: /* @__PURE__ */ J(ee, {
|
|
2888
|
+
onChange: s,
|
|
2889
|
+
TransitionProps: { timeout: {
|
|
2890
|
+
enter: 225,
|
|
2891
|
+
exit: 195
|
|
2892
|
+
} },
|
|
2893
|
+
children: [/* @__PURE__ */ q(ge, {
|
|
2894
|
+
expandIcon: /* @__PURE__ */ q(fe, {}),
|
|
2895
|
+
children: /* @__PURE__ */ q(W, {
|
|
2896
|
+
variant: "subtitle1",
|
|
2897
|
+
children: "Customize Grid Setup"
|
|
2898
|
+
})
|
|
2899
|
+
}), /* @__PURE__ */ q(R, { children: /* @__PURE__ */ J(hi, { children: [
|
|
2900
|
+
h && /* @__PURE__ */ q(xr, {
|
|
2901
|
+
label: "Include axes and labels?",
|
|
2902
|
+
toggle: w,
|
|
2903
|
+
checked: i
|
|
2904
|
+
}),
|
|
2905
|
+
y && /* @__PURE__ */ q(xr, {
|
|
2906
|
+
label: "Constrain to standard coordinate grid?",
|
|
2907
|
+
toggle: T,
|
|
2908
|
+
checked: d
|
|
2909
|
+
}),
|
|
2910
|
+
i ? k : A,
|
|
2911
|
+
m && /* @__PURE__ */ J(Si, { children: [
|
|
2912
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(W, { children: "Dimensions(px)" }), /* @__PURE__ */ J(Ci, { children: [
|
|
2913
|
+
"Min ",
|
|
2914
|
+
u.min,
|
|
2915
|
+
", Max ",
|
|
2916
|
+
u.max
|
|
2917
|
+
] })] }),
|
|
2918
|
+
/* @__PURE__ */ q(vi, { children: /* @__PURE__ */ q(ln, {
|
|
2919
|
+
label: "Width",
|
|
2920
|
+
value: l.width,
|
|
2921
|
+
min: u.min,
|
|
2922
|
+
max: u.max,
|
|
2923
|
+
step: u.step,
|
|
2924
|
+
variant: "outlined",
|
|
2925
|
+
onChange: (e, t) => E("width", t)
|
|
2926
|
+
}) }),
|
|
2927
|
+
/* @__PURE__ */ q(vi, { children: /* @__PURE__ */ q(ln, {
|
|
2928
|
+
label: "Height",
|
|
2929
|
+
value: l.height,
|
|
2930
|
+
min: u.min,
|
|
2931
|
+
max: u.max,
|
|
2932
|
+
step: u.step,
|
|
2933
|
+
variant: "outlined",
|
|
2934
|
+
disabled: d,
|
|
2935
|
+
onChange: (e, t) => E("height", t)
|
|
2936
|
+
}) })
|
|
2937
|
+
] })
|
|
2938
|
+
] }) })]
|
|
2939
|
+
}) });
|
|
2940
|
+
};
|
|
2941
|
+
Di.propTypes = {
|
|
2942
|
+
domain: Q.default.object,
|
|
2943
|
+
displayedFields: Q.default.object,
|
|
2944
|
+
gridValues: Q.default.object,
|
|
2945
|
+
includeAxes: Q.default.bool,
|
|
2946
|
+
labelValues: Q.default.object,
|
|
2947
|
+
onChange: Q.default.func,
|
|
2948
|
+
onChangeView: Q.default.func,
|
|
2949
|
+
range: Q.default.object,
|
|
2950
|
+
size: Q.default.object,
|
|
2951
|
+
sizeConstraints: Q.default.object,
|
|
2952
|
+
standardGrid: Q.default.bool
|
|
2953
|
+
};
|
|
2954
|
+
//#endregion
|
|
2955
|
+
//#region src/author/utils.ts
|
|
2956
|
+
var Oi = [
|
|
2957
|
+
.01,
|
|
2958
|
+
.02,
|
|
2959
|
+
.04,
|
|
2960
|
+
.05,
|
|
2961
|
+
.0625,
|
|
2962
|
+
.1,
|
|
2963
|
+
.125,
|
|
2964
|
+
.2,
|
|
2965
|
+
.25,
|
|
2966
|
+
.5,
|
|
2967
|
+
1,
|
|
2968
|
+
2,
|
|
2969
|
+
3,
|
|
2970
|
+
4,
|
|
2971
|
+
5,
|
|
2972
|
+
8,
|
|
2973
|
+
10,
|
|
2974
|
+
12,
|
|
2975
|
+
15,
|
|
2976
|
+
20,
|
|
2977
|
+
40,
|
|
2978
|
+
50,
|
|
2979
|
+
64,
|
|
2980
|
+
100,
|
|
2981
|
+
500,
|
|
2982
|
+
1e3
|
|
2983
|
+
], ki = [
|
|
2984
|
+
.01,
|
|
2985
|
+
.02,
|
|
2986
|
+
.05,
|
|
2987
|
+
.1,
|
|
2988
|
+
.2,
|
|
2989
|
+
.25,
|
|
2990
|
+
.5,
|
|
2991
|
+
1,
|
|
2992
|
+
2,
|
|
2993
|
+
5,
|
|
2994
|
+
10,
|
|
2995
|
+
20,
|
|
2996
|
+
50,
|
|
2997
|
+
100,
|
|
2998
|
+
500,
|
|
2999
|
+
1e3
|
|
3000
|
+
], Ai = {
|
|
3001
|
+
.01: [
|
|
3002
|
+
0,
|
|
3003
|
+
.01,
|
|
3004
|
+
.02,
|
|
3005
|
+
.04,
|
|
3006
|
+
.05,
|
|
3007
|
+
.1
|
|
3008
|
+
],
|
|
3009
|
+
.02: [
|
|
3010
|
+
0,
|
|
3011
|
+
.02,
|
|
3012
|
+
.04,
|
|
3013
|
+
.1
|
|
3014
|
+
],
|
|
3015
|
+
.04: [
|
|
3016
|
+
0,
|
|
3017
|
+
.04,
|
|
3018
|
+
.08,
|
|
3019
|
+
.16,
|
|
3020
|
+
.2
|
|
3021
|
+
],
|
|
3022
|
+
.05: [
|
|
3023
|
+
0,
|
|
3024
|
+
.05,
|
|
3025
|
+
.1,
|
|
3026
|
+
.2,
|
|
3027
|
+
.25
|
|
3028
|
+
],
|
|
3029
|
+
.0625: [
|
|
3030
|
+
0,
|
|
3031
|
+
.0625,
|
|
3032
|
+
.125,
|
|
3033
|
+
.25,
|
|
3034
|
+
.5
|
|
3035
|
+
],
|
|
3036
|
+
.1: [
|
|
3037
|
+
0,
|
|
3038
|
+
.1,
|
|
3039
|
+
.2,
|
|
3040
|
+
.4,
|
|
3041
|
+
.5,
|
|
3042
|
+
1
|
|
3043
|
+
],
|
|
3044
|
+
.125: [
|
|
3045
|
+
0,
|
|
3046
|
+
.125,
|
|
3047
|
+
.25,
|
|
3048
|
+
.5,
|
|
3049
|
+
1
|
|
3050
|
+
],
|
|
3051
|
+
.2: [
|
|
3052
|
+
0,
|
|
3053
|
+
.2,
|
|
3054
|
+
.5,
|
|
3055
|
+
.1
|
|
3056
|
+
],
|
|
3057
|
+
.25: [
|
|
3058
|
+
0,
|
|
3059
|
+
.25,
|
|
3060
|
+
.5,
|
|
3061
|
+
1,
|
|
3062
|
+
2
|
|
3063
|
+
],
|
|
3064
|
+
.5: [
|
|
3065
|
+
0,
|
|
3066
|
+
.5,
|
|
3067
|
+
1,
|
|
3068
|
+
2
|
|
3069
|
+
],
|
|
3070
|
+
1: [
|
|
3071
|
+
0,
|
|
3072
|
+
1,
|
|
3073
|
+
2,
|
|
3074
|
+
4,
|
|
3075
|
+
5,
|
|
3076
|
+
10
|
|
3077
|
+
],
|
|
3078
|
+
2: [
|
|
3079
|
+
0,
|
|
3080
|
+
2,
|
|
3081
|
+
4,
|
|
3082
|
+
8,
|
|
3083
|
+
10
|
|
3084
|
+
],
|
|
3085
|
+
3: [
|
|
3086
|
+
0,
|
|
3087
|
+
3,
|
|
3088
|
+
6,
|
|
3089
|
+
12,
|
|
3090
|
+
15
|
|
3091
|
+
],
|
|
3092
|
+
4: [
|
|
3093
|
+
0,
|
|
3094
|
+
4,
|
|
3095
|
+
8,
|
|
3096
|
+
16,
|
|
3097
|
+
20
|
|
3098
|
+
],
|
|
3099
|
+
5: [
|
|
3100
|
+
0,
|
|
3101
|
+
5,
|
|
3102
|
+
10,
|
|
3103
|
+
20,
|
|
3104
|
+
25
|
|
3105
|
+
],
|
|
3106
|
+
8: [
|
|
3107
|
+
0,
|
|
3108
|
+
8,
|
|
3109
|
+
16,
|
|
3110
|
+
32,
|
|
3111
|
+
40,
|
|
3112
|
+
64
|
|
3113
|
+
],
|
|
3114
|
+
10: [
|
|
3115
|
+
0,
|
|
3116
|
+
10,
|
|
3117
|
+
20,
|
|
3118
|
+
40,
|
|
3119
|
+
50,
|
|
3120
|
+
100
|
|
3121
|
+
],
|
|
3122
|
+
12: [
|
|
3123
|
+
0,
|
|
3124
|
+
12,
|
|
3125
|
+
24
|
|
3126
|
+
],
|
|
3127
|
+
15: [
|
|
3128
|
+
0,
|
|
3129
|
+
15,
|
|
3130
|
+
30,
|
|
3131
|
+
60
|
|
3132
|
+
],
|
|
3133
|
+
20: [
|
|
3134
|
+
0,
|
|
3135
|
+
20,
|
|
3136
|
+
40,
|
|
3137
|
+
80,
|
|
3138
|
+
100
|
|
3139
|
+
],
|
|
3140
|
+
40: [
|
|
3141
|
+
0,
|
|
3142
|
+
40,
|
|
3143
|
+
80,
|
|
3144
|
+
160,
|
|
3145
|
+
200
|
|
3146
|
+
],
|
|
3147
|
+
50: [
|
|
3148
|
+
0,
|
|
3149
|
+
50,
|
|
3150
|
+
100,
|
|
3151
|
+
200,
|
|
3152
|
+
250
|
|
3153
|
+
],
|
|
3154
|
+
64: [
|
|
3155
|
+
0,
|
|
3156
|
+
64,
|
|
3157
|
+
128
|
|
3158
|
+
],
|
|
3159
|
+
100: [
|
|
3160
|
+
0,
|
|
3161
|
+
100,
|
|
3162
|
+
200,
|
|
3163
|
+
400,
|
|
3164
|
+
500
|
|
3165
|
+
],
|
|
3166
|
+
500: [
|
|
3167
|
+
0,
|
|
3168
|
+
500,
|
|
3169
|
+
1e3,
|
|
3170
|
+
2500
|
|
3171
|
+
],
|
|
3172
|
+
1e3: [
|
|
3173
|
+
0,
|
|
3174
|
+
1e3,
|
|
3175
|
+
2e3,
|
|
3176
|
+
4e3,
|
|
3177
|
+
5e3
|
|
3178
|
+
]
|
|
3179
|
+
}, ji = (e, t, n = !1) => {
|
|
3180
|
+
let r = 10 * (e.max - e.min) / t, i = r * 10, a = n && !ki.includes(e.step) && Oi.includes(e.step);
|
|
3181
|
+
return (!n || a ? Oi : ki).filter((e) => e >= r && e <= i);
|
|
3182
|
+
}, Mi = (e) => Ai[e] || [], Ni = (e, t, n, r) => {
|
|
3183
|
+
let i = ji(e, t), o = Mi(e.step);
|
|
3184
|
+
if (!a(n, i) && !i.includes(e.step)) {
|
|
3185
|
+
let n = ji(e, t, !0)[0] || 1;
|
|
3186
|
+
return e.step = n, o = Mi(n), o.includes(e.labelStep) || (e.labelStep = n), {
|
|
3187
|
+
gridValues: i,
|
|
3188
|
+
labelValues: o
|
|
3189
|
+
};
|
|
3190
|
+
}
|
|
3191
|
+
return !a(r, o) && !o.includes(e.labelStep) && (e.labelStep = e.step), {
|
|
3192
|
+
gridValues: i,
|
|
3193
|
+
labelValues: o
|
|
3194
|
+
};
|
|
3195
|
+
}, Pi = (e) => {
|
|
3196
|
+
let t = [], n = 0;
|
|
3197
|
+
for (; n >= e.min && t.indexOf(n) < 0;) t.push(n), n = Math.round((n - e.step) * 1e4) / 1e4;
|
|
3198
|
+
for (n = Math.round(e.step * 1e4) / 1e4; n <= e.max && t.indexOf(n) < 0;) t.push(n), n = Math.round((n + e.step) * 1e4) / 1e4;
|
|
3199
|
+
return t ? t.filter((t) => t >= e.min && t <= e.max) : [];
|
|
3200
|
+
}, Fi = (e, t, n) => {
|
|
3201
|
+
let r = Pi(e), i = Pi(t), a = (e, t) => r.includes(e) && i.includes(t);
|
|
3202
|
+
return Object.entries(n || {}).reduce((e, [t, n]) => (e[t] = {
|
|
3203
|
+
...n,
|
|
3204
|
+
marks: (n.marks || []).filter((e) => {
|
|
3205
|
+
if (e.type === "point") return a(e.x, e.y);
|
|
3206
|
+
if (e.type === "polygon") return !e.points.find((e) => !a(e.x, e.y));
|
|
3207
|
+
let t = e.from || e.root, n = e.to || e.edge;
|
|
3208
|
+
return e.building ? a(t.x, t.y) : a(t.x, t.y) && a(n.x, n.y);
|
|
3209
|
+
})
|
|
3210
|
+
}, e), {});
|
|
3211
|
+
}, Ii = z("div")(({ theme: e }) => ({
|
|
3212
|
+
display: "flex",
|
|
3213
|
+
flexWrap: "wrap",
|
|
3214
|
+
marginBottom: e.spacing(2.5)
|
|
3215
|
+
})), Li = z("div")(({ theme: e }) => ({
|
|
3216
|
+
display: "flex",
|
|
3217
|
+
flexDirection: "column",
|
|
3218
|
+
marginRight: e.spacing(3),
|
|
3219
|
+
marginBottom: e.spacing(2.5)
|
|
3220
|
+
})), Ri = z("div")({
|
|
3221
|
+
display: "flex",
|
|
3222
|
+
flexDirection: "column"
|
|
3223
|
+
}), zi = z(W)(({ theme: e }) => ({
|
|
3224
|
+
marginTop: e.spacing(1.5),
|
|
3225
|
+
marginBottom: e.spacing(1)
|
|
3226
|
+
})), Bi = z("div")(({ theme: e }) => ({
|
|
3227
|
+
display: "flex",
|
|
3228
|
+
flexWrap: "wrap",
|
|
3229
|
+
alignItems: "center",
|
|
3230
|
+
width: "100%",
|
|
3231
|
+
marginBottom: e.spacing(2.5)
|
|
3232
|
+
})), Vi = z(W)(({ theme: e }) => ({ padding: `0 ${e.spacing(1)}` })), Hi = z(Se)({ flex: "1" }), Ui = class extends G.Component {
|
|
3233
|
+
static propTypes = {
|
|
3234
|
+
availableTools: Q.default.array,
|
|
3235
|
+
authoring: Q.default.object,
|
|
3236
|
+
dimensionsEnabled: Q.default.bool,
|
|
3237
|
+
graphDimensions: Q.default.object,
|
|
3238
|
+
gridConfigurations: Q.default.array,
|
|
3239
|
+
labelsPlaceholders: Q.default.object,
|
|
3240
|
+
model: Q.default.object.isRequired,
|
|
3241
|
+
onChange: Q.default.func.isRequired,
|
|
3242
|
+
showLabels: Q.default.bool,
|
|
3243
|
+
showTitle: Q.default.bool,
|
|
3244
|
+
titlePlaceholder: Q.default.string
|
|
3245
|
+
};
|
|
3246
|
+
constructor(e) {
|
|
3247
|
+
super(e);
|
|
3248
|
+
let { domain: t, range: n, graph: r } = e.model || {}, i = {
|
|
3249
|
+
domain: ji(t, r.width, !0),
|
|
3250
|
+
range: ji(n, r.height, !0)
|
|
3251
|
+
}, a = {
|
|
3252
|
+
domain: Mi(t.step),
|
|
3253
|
+
range: Mi(n.step)
|
|
3254
|
+
};
|
|
3255
|
+
this.state = {
|
|
3256
|
+
gridValues: i,
|
|
3257
|
+
labelValues: a,
|
|
3258
|
+
showPixelGuides: !1,
|
|
3259
|
+
dialog: { isOpened: !1 },
|
|
3260
|
+
domain: { ...t },
|
|
3261
|
+
range: { ...n }
|
|
3262
|
+
};
|
|
3263
|
+
}
|
|
3264
|
+
changeBackgroundMarks = (e) => {
|
|
3265
|
+
let t = {
|
|
3266
|
+
...this.props.model,
|
|
3267
|
+
backgroundMarks: e
|
|
3268
|
+
};
|
|
3269
|
+
this.props.onChange(t);
|
|
3270
|
+
};
|
|
3271
|
+
changeLabels = (e) => {
|
|
3272
|
+
let { model: t, onChange: n } = this.props;
|
|
3273
|
+
n({
|
|
3274
|
+
...t,
|
|
3275
|
+
labels: e
|
|
3276
|
+
});
|
|
3277
|
+
};
|
|
3278
|
+
changeTitle = (e) => {
|
|
3279
|
+
let { model: t, onChange: n } = this.props;
|
|
3280
|
+
n({
|
|
3281
|
+
...t,
|
|
3282
|
+
title: e
|
|
3283
|
+
});
|
|
3284
|
+
};
|
|
3285
|
+
onConfigChange = (e, t) => {
|
|
3286
|
+
let { model: n, onChange: r } = this.props, { defaultGridConfiguration: i = 0 } = n, { gridValues: o, labelValues: s, domain: c, range: l } = this.state, u = {
|
|
3287
|
+
...n,
|
|
3288
|
+
...e
|
|
3289
|
+
}, { answers: d, domain: f, includeAxes: p, graph: m, range: h, standardGrid: g } = u, _ = {
|
|
3290
|
+
domain: [],
|
|
3291
|
+
range: []
|
|
3292
|
+
}, v = {
|
|
3293
|
+
domain: [],
|
|
3294
|
+
range: []
|
|
3295
|
+
}, y = t >= 0 ? t : i;
|
|
3296
|
+
if (p) {
|
|
3297
|
+
let e = Ni(f, m.width, o.domain, s.domain);
|
|
3298
|
+
_.domain = e.gridValues || [], v.domain = e.labelValues || [];
|
|
3299
|
+
}
|
|
3300
|
+
if (g) _.range = _.domain, v.range = v.domain, h.step = f.step, h.labelStep = f.labelStep;
|
|
3301
|
+
else if (p) {
|
|
3302
|
+
let e = Ni(h, m.height, o.range, s.range);
|
|
3303
|
+
_.range = e.gridValues || [], v.range = e.labelValues || [];
|
|
3304
|
+
}
|
|
3305
|
+
let b = Fi(f, h, d);
|
|
3306
|
+
if (!a(d, b)) {
|
|
3307
|
+
this.setState({ dialog: {
|
|
3308
|
+
isOpened: !0,
|
|
3309
|
+
onClose: () => this.setState({ dialog: { isOpened: !1 } }, r({
|
|
3310
|
+
...n,
|
|
3311
|
+
domain: c,
|
|
3312
|
+
range: l
|
|
3313
|
+
})),
|
|
3314
|
+
onConfirm: () => {
|
|
3315
|
+
this.setState({
|
|
3316
|
+
gridValues: _,
|
|
3317
|
+
labelValues: v,
|
|
3318
|
+
dialog: { isOpened: !1 },
|
|
3319
|
+
domain: { ...f },
|
|
3320
|
+
range: { ...h }
|
|
3321
|
+
}, r({
|
|
3322
|
+
...u,
|
|
3323
|
+
answers: b,
|
|
3324
|
+
defaultGridConfiguration: y
|
|
3325
|
+
}));
|
|
3326
|
+
}
|
|
3327
|
+
} });
|
|
3328
|
+
return;
|
|
3329
|
+
}
|
|
3330
|
+
this.setState({
|
|
3331
|
+
gridValues: _,
|
|
3332
|
+
labelValues: v,
|
|
3333
|
+
domain: { ...f },
|
|
3334
|
+
range: { ...h }
|
|
3335
|
+
}), r({
|
|
3336
|
+
...u,
|
|
3337
|
+
defaultGridConfiguration: y
|
|
3338
|
+
});
|
|
3339
|
+
};
|
|
3340
|
+
onChangeView = (e, t) => {
|
|
3341
|
+
let { graphDimensions: { enabled: n } = {} } = this.props;
|
|
3342
|
+
n && this.setState({ showPixelGuides: t });
|
|
3343
|
+
};
|
|
3344
|
+
changeGridConfiguration = (e) => {
|
|
3345
|
+
let { gridConfigurations: t } = this.props, { value: n } = e.target;
|
|
3346
|
+
this.onConfigChange(t?.[n] || {}, n);
|
|
3347
|
+
};
|
|
3348
|
+
render() {
|
|
3349
|
+
let { authoring: e = {}, availableTools: t = [], gridConfigurations: n = [], graphDimensions: r = {}, labelsPlaceholders: i, model: a, showLabels: o, dimensionsEnabled: s, showTitle: c, titlePlaceholder: l, mathMlOptions: u = {}, removeIncompleteTool: d } = this.props, { arrows: f, backgroundMarks: p, coordinatesOnHover: m, defaultGridConfiguration: h, domain: g, includeAxes: _, labels: v, range: y, standardGrid: b, title: x } = a || {}, S = (a || {}).graph || {}, { min: C, max: w, step: T } = r || {}, { dialog: E = {}, gridValues: D, labelValues: O, showPixelGuides: k } = this.state, ee = {
|
|
3350
|
+
min: Math.max(150, C),
|
|
3351
|
+
max: Math.min(800, w),
|
|
3352
|
+
step: T >= 1 ? Math.min(200, T) : 20
|
|
3353
|
+
}, j = {
|
|
3354
|
+
axisLabel: e.axisLabel,
|
|
3355
|
+
dimensionsEnabled: s,
|
|
3356
|
+
includeAxesEnabled: e.includeAxesEnabled,
|
|
3357
|
+
labelStep: e.labelStep,
|
|
3358
|
+
min: e.min,
|
|
3359
|
+
max: e.max,
|
|
3360
|
+
standardGridEnabled: e.standardGridEnabled,
|
|
3361
|
+
step: e.step
|
|
3362
|
+
}, M = e.enabled && Object.values(j).some((e) => typeof e == "object" ? e.enabled : e);
|
|
3363
|
+
return /* @__PURE__ */ J(Ii, { children: [
|
|
3364
|
+
/* @__PURE__ */ J(Li, { children: [n && n.length ? /* @__PURE__ */ J(Bi, { children: [/* @__PURE__ */ q(Vi, {
|
|
3365
|
+
component: "div",
|
|
3366
|
+
variant: "h6",
|
|
3367
|
+
children: "Grid Configuration"
|
|
3368
|
+
}), /* @__PURE__ */ q(Hi, {
|
|
3369
|
+
input: /* @__PURE__ */ q(we, {}),
|
|
3370
|
+
displayEmpty: !0,
|
|
3371
|
+
onChange: this.changeGridConfiguration,
|
|
3372
|
+
value: h,
|
|
3373
|
+
MenuProps: { transitionDuration: {
|
|
3374
|
+
enter: 225,
|
|
3375
|
+
exit: 195
|
|
3376
|
+
} },
|
|
3377
|
+
children: (n || []).map((e, t) => /* @__PURE__ */ q(A, {
|
|
3378
|
+
value: t,
|
|
3379
|
+
children: e.label
|
|
3380
|
+
}, t))
|
|
3381
|
+
})] }) : null, M && /* @__PURE__ */ q(Di, {
|
|
3382
|
+
displayedFields: j,
|
|
3383
|
+
domain: g,
|
|
3384
|
+
gridValues: D,
|
|
3385
|
+
includeAxes: _,
|
|
3386
|
+
labelValues: O,
|
|
3387
|
+
range: y,
|
|
3388
|
+
size: S,
|
|
3389
|
+
sizeConstraints: ee,
|
|
3390
|
+
standardGrid: b,
|
|
3391
|
+
onChange: this.onConfigChange,
|
|
3392
|
+
onChangeView: this.onChangeView
|
|
3393
|
+
})] }),
|
|
3394
|
+
/* @__PURE__ */ J(Ri, { children: [
|
|
3395
|
+
/* @__PURE__ */ q(W, {
|
|
3396
|
+
component: "div",
|
|
3397
|
+
variant: "h6",
|
|
3398
|
+
children: "Define Graph Attributes"
|
|
3399
|
+
}),
|
|
3400
|
+
/* @__PURE__ */ q(zi, {
|
|
3401
|
+
component: "div",
|
|
3402
|
+
variant: "body1",
|
|
3403
|
+
children: "Use this interface to add/edit a title and/or labels, and to set background shapes"
|
|
3404
|
+
}),
|
|
3405
|
+
/* @__PURE__ */ q(ye, {
|
|
3406
|
+
axesSettings: { includeArrows: f },
|
|
3407
|
+
backgroundMarks: [],
|
|
3408
|
+
coordinatesOnHover: m,
|
|
3409
|
+
collapsibleToolbar: !0,
|
|
3410
|
+
collapsibleToolbarTitle: "Add Background Shapes to Graph",
|
|
3411
|
+
domain: g,
|
|
3412
|
+
labels: v,
|
|
3413
|
+
labelsPlaceholders: i,
|
|
3414
|
+
marks: p,
|
|
3415
|
+
onChangeLabels: this.changeLabels,
|
|
3416
|
+
onChangeMarks: this.changeBackgroundMarks,
|
|
3417
|
+
onChangeTitle: this.changeTitle,
|
|
3418
|
+
range: y,
|
|
3419
|
+
showLabels: o,
|
|
3420
|
+
showPixelGuides: k,
|
|
3421
|
+
showTitle: c,
|
|
3422
|
+
size: {
|
|
3423
|
+
width: S.width,
|
|
3424
|
+
height: S.height
|
|
3425
|
+
},
|
|
3426
|
+
title: x,
|
|
3427
|
+
titlePlaceholder: l,
|
|
3428
|
+
toolbarTools: t,
|
|
3429
|
+
mathMlOptions: u,
|
|
3430
|
+
removeIncompleteTool: d
|
|
3431
|
+
}, "graphing-config")
|
|
3432
|
+
] }, "graph"),
|
|
3433
|
+
/* @__PURE__ */ q(Ht, {
|
|
3434
|
+
open: E.isOpened,
|
|
3435
|
+
title: "Warning",
|
|
3436
|
+
text: "This change would make it impossible for students to plot one or more graph objects in the current correct answers. If you proceed, all such graph objects will be removed from the correct answers.",
|
|
3437
|
+
onClose: E.onClose,
|
|
3438
|
+
onConfirm: E.onConfirm
|
|
3439
|
+
})
|
|
3440
|
+
] });
|
|
3441
|
+
}
|
|
3442
|
+
}, Wi = E(/*#__PURE__*/ q("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" }), "Info"), Gi = "#D5D5D5", Ki = "#AAAAAA", qi = z("div")({ color: Ki }), Ji = z("div")(({ theme: e }) => ({
|
|
3443
|
+
margin: `${e.spacing(2.5)} 0`,
|
|
3444
|
+
cursor: "pointer",
|
|
3445
|
+
background: e.palette.grey[200],
|
|
3446
|
+
padding: e.spacing(1.5),
|
|
3447
|
+
width: "fit-content",
|
|
3448
|
+
borderRadius: "4px",
|
|
3449
|
+
"&:hover": { background: Gi }
|
|
3450
|
+
})), Yi = z("div")(({ theme: e }) => ({
|
|
3451
|
+
marginTop: e.spacing(1),
|
|
3452
|
+
display: "flex",
|
|
3453
|
+
flexWrap: "wrap"
|
|
3454
|
+
})), Xi = z("div")(({ theme: e }) => ({
|
|
3455
|
+
cursor: "pointer",
|
|
3456
|
+
margin: e.spacing(1),
|
|
3457
|
+
padding: e.spacing(1),
|
|
3458
|
+
border: `2px solid ${e.palette.common.white}`,
|
|
3459
|
+
textTransform: "capitalize",
|
|
3460
|
+
"&:hover": { color: e.palette.grey[800] }
|
|
3461
|
+
})), Zi = z(Xi)({
|
|
3462
|
+
background: Gi,
|
|
3463
|
+
border: `2px solid ${Ki}`
|
|
3464
|
+
}), Qi = z("div")(({ theme: e }) => ({
|
|
3465
|
+
display: "flex",
|
|
3466
|
+
alignItems: "center",
|
|
3467
|
+
marginTop: e.spacing(2.5)
|
|
3468
|
+
})), $i = z("div")(({ theme: e }) => ({
|
|
3469
|
+
marginLeft: "6px",
|
|
3470
|
+
color: e.palette.grey[600],
|
|
3471
|
+
"&:hover": {
|
|
3472
|
+
cursor: "pointer",
|
|
3473
|
+
color: e.palette.common.black
|
|
3474
|
+
}
|
|
3475
|
+
})), ea = z("div")(({ theme: e }) => ({ marginBottom: e.spacing(.5) })), ta = z(({ className: e, ...t }) => /* @__PURE__ */ q(jt, {
|
|
3476
|
+
...t,
|
|
3477
|
+
classes: { tooltip: e }
|
|
3478
|
+
}))(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
|
|
3479
|
+
fontSize: e.typography.fontSize - 2,
|
|
3480
|
+
whiteSpace: "pre",
|
|
3481
|
+
maxWidth: "500px"
|
|
3482
|
+
} })), na = z(W)(({ theme: e }) => ({
|
|
3483
|
+
marginTop: e.spacing(1.5),
|
|
3484
|
+
marginBottom: e.spacing(1)
|
|
3485
|
+
})), ra = z("div")({
|
|
3486
|
+
display: "flex",
|
|
3487
|
+
alignItems: "center",
|
|
3488
|
+
justifyContent: "space-between"
|
|
3489
|
+
}), ia = z("div")({
|
|
3490
|
+
display: "flex",
|
|
3491
|
+
alignItems: "center",
|
|
3492
|
+
width: "300px"
|
|
3493
|
+
}), aa = z(Se)(({ theme: e }) => ({
|
|
3494
|
+
marginLeft: e.spacing(1),
|
|
3495
|
+
textTransform: "uppercase",
|
|
3496
|
+
color: e.palette.grey[800]
|
|
3497
|
+
})), oa = z(A)({ textTransform: "uppercase" }), sa = z("div")(({ theme: e }) => ({
|
|
3498
|
+
fontSize: e.typography.fontSize - 2,
|
|
3499
|
+
color: e.palette.error.main,
|
|
3500
|
+
marginTop: e.spacing(1)
|
|
3501
|
+
})), ca = ({ availableTools: e, defaultTool: t, hasErrors: n, toolbarTools: r, toggleToolBarTool: i, onDefaultToolChange: a }) => {
|
|
3502
|
+
let o = e || [], s = o.includes("label"), c = (r || []).filter((e) => e !== "label");
|
|
3503
|
+
return s && (o = [...o.filter((e) => e !== "label"), "label"]), /* @__PURE__ */ J(qi, { children: [/* @__PURE__ */ J(ra, { children: [/* @__PURE__ */ q("span", { children: "GRAPHING TOOLS" }), c.length > 0 && /* @__PURE__ */ J(ia, { children: [/* @__PURE__ */ q("span", { children: "Default graphing tool:" }), /* @__PURE__ */ q(aa, {
|
|
3504
|
+
variant: "standard",
|
|
3505
|
+
onChange: a,
|
|
3506
|
+
value: t,
|
|
3507
|
+
disableUnderline: !0,
|
|
3508
|
+
MenuProps: { transitionDuration: {
|
|
3509
|
+
enter: 225,
|
|
3510
|
+
exit: 195
|
|
3511
|
+
} },
|
|
3512
|
+
children: c.map((e, t) => /* @__PURE__ */ q(oa, {
|
|
3513
|
+
value: e,
|
|
3514
|
+
children: e
|
|
3515
|
+
}, t))
|
|
3516
|
+
})] })] }), /* @__PURE__ */ q(Yi, { children: o.map((e) => /* @__PURE__ */ q(r.find((t) => t === e) ? Zi : Xi, {
|
|
3517
|
+
style: { ...n && e !== "label" && { color: "red" } },
|
|
3518
|
+
onClick: () => i(e),
|
|
3519
|
+
children: e.toUpperCase()
|
|
3520
|
+
}, e)) })] });
|
|
3521
|
+
};
|
|
3522
|
+
ca.propTypes = {
|
|
3523
|
+
toolbarTools: Q.default.arrayOf(Q.default.string),
|
|
3524
|
+
toggleToolBarTool: Q.default.func,
|
|
3525
|
+
availableTools: Q.default.array,
|
|
3526
|
+
defaultTool: Q.default.string,
|
|
3527
|
+
hasErrors: Q.default.number,
|
|
3528
|
+
onDefaultToolChange: Q.default.func
|
|
3529
|
+
};
|
|
3530
|
+
var la = class extends G.Component {
|
|
3531
|
+
static propTypes = {
|
|
3532
|
+
availableTools: Q.default.array,
|
|
3533
|
+
errors: Q.default.object,
|
|
3534
|
+
model: Q.default.object.isRequired,
|
|
3535
|
+
onChange: Q.default.func.isRequired,
|
|
3536
|
+
toolbarTools: Q.default.arrayOf(Q.default.String)
|
|
3537
|
+
};
|
|
3538
|
+
state = { dialog: { open: !1 } };
|
|
3539
|
+
componentDidMount() {
|
|
3540
|
+
try {
|
|
3541
|
+
L(ke.findDOMNode(this));
|
|
3542
|
+
} catch {
|
|
3543
|
+
console.error("DOM not mounted");
|
|
3544
|
+
}
|
|
3545
|
+
}
|
|
3546
|
+
handleAlertDialog = (e, t) => this.setState({ dialog: { open: e } }, t);
|
|
3547
|
+
changeMarks = (e, t) => {
|
|
3548
|
+
let { model: n, onChange: i } = this.props;
|
|
3549
|
+
r(n, `answers.${e}.marks`, t), i(n);
|
|
3550
|
+
};
|
|
3551
|
+
filterMarks = (e) => {
|
|
3552
|
+
let { model: { answers: t } } = this.props;
|
|
3553
|
+
return Object.entries(t || {}).reduce((t, [n, r]) => (t[n] = {
|
|
3554
|
+
...r,
|
|
3555
|
+
marks: (r.marks || []).filter((t) => t.type !== e)
|
|
3556
|
+
}, t), {});
|
|
3557
|
+
};
|
|
3558
|
+
changeToolbarTools = (e) => {
|
|
3559
|
+
let { model: t, onChange: n } = this.props;
|
|
3560
|
+
t.toolbarTools = e, n(t);
|
|
3561
|
+
};
|
|
3562
|
+
updateModel = (e) => {
|
|
3563
|
+
let { model: t, onChange: n } = this.props;
|
|
3564
|
+
n({
|
|
3565
|
+
...t,
|
|
3566
|
+
...e
|
|
3567
|
+
});
|
|
3568
|
+
};
|
|
3569
|
+
toggleToolBarTool = (e) => {
|
|
3570
|
+
let { model: { defaultTool: t, toolbarTools: n, answers: r = {} } } = this.props, i = [...n], o = t, s = n.findIndex((t) => e === t);
|
|
3571
|
+
if (s >= 0) {
|
|
3572
|
+
let n = this.filterMarks(e);
|
|
3573
|
+
if (i.splice(s, 1), e === t) {
|
|
3574
|
+
let e = (i || []).filter((e) => e !== "label");
|
|
3575
|
+
o = e.length && e[0] || "";
|
|
3576
|
+
}
|
|
3577
|
+
if (!a(r, n)) {
|
|
3578
|
+
this.setState({ dialog: {
|
|
3579
|
+
open: !0,
|
|
3580
|
+
title: "Warning",
|
|
3581
|
+
text: `Correct answer includes one or more ${e} objects and all of them will be deleted.`,
|
|
3582
|
+
onConfirm: () => this.handleAlertDialog(!1, this.updateModel({
|
|
3583
|
+
toolbarTools: i,
|
|
3584
|
+
answers: n,
|
|
3585
|
+
defaultTool: o
|
|
3586
|
+
})),
|
|
3587
|
+
onClose: () => this.handleAlertDialog(!1)
|
|
3588
|
+
} });
|
|
3589
|
+
return;
|
|
3590
|
+
}
|
|
3591
|
+
} else i.push(e), t === "" && e !== "label" && (o = e);
|
|
3592
|
+
this.updateModel({
|
|
3593
|
+
toolbarTools: i,
|
|
3594
|
+
defaultTool: o
|
|
3595
|
+
});
|
|
3596
|
+
};
|
|
3597
|
+
onDefaultToolChange = (e) => {
|
|
3598
|
+
let { value: t } = e.target;
|
|
3599
|
+
this.updateModel({ defaultTool: t });
|
|
3600
|
+
};
|
|
3601
|
+
addAlternateResponse = () => {
|
|
3602
|
+
let { model: e, onChange: t } = this.props, { answers: n } = e || {}, i = Object.keys(n || {});
|
|
3603
|
+
r(e, `answers.${`alternate${i.length}`}`, {
|
|
3604
|
+
name: `Alternate ${i.length}`,
|
|
3605
|
+
marks: []
|
|
3606
|
+
}), t(e);
|
|
3607
|
+
};
|
|
3608
|
+
deleteAlternateResponse = (e, t) => {
|
|
3609
|
+
let { model: n, onChange: r } = this.props, { answers: i } = n || {}, { marks: a = [], name: o } = t || {}, s = () => {
|
|
3610
|
+
delete i[e];
|
|
3611
|
+
let t = Object.entries(i).reduce((e, t, n) => {
|
|
3612
|
+
let [r, i] = t;
|
|
3613
|
+
return r === "correctAnswer" ? {
|
|
3614
|
+
...e,
|
|
3615
|
+
[r]: i
|
|
3616
|
+
} : {
|
|
3617
|
+
...e,
|
|
3618
|
+
["alternate" + n]: {
|
|
3619
|
+
...i,
|
|
3620
|
+
name: `Alternate ${n}`
|
|
3621
|
+
}
|
|
3622
|
+
};
|
|
3623
|
+
}, {});
|
|
3624
|
+
r({
|
|
3625
|
+
...n,
|
|
3626
|
+
answers: t
|
|
3627
|
+
});
|
|
3628
|
+
};
|
|
3629
|
+
if (a.length) {
|
|
3630
|
+
this.setState({ dialog: {
|
|
3631
|
+
open: !0,
|
|
3632
|
+
title: "Warning",
|
|
3633
|
+
text: `${o} includes one or more shapes and the entire response will be deleted.`,
|
|
3634
|
+
onConfirm: () => this.handleAlertDialog(!1, s),
|
|
3635
|
+
onClose: () => this.handleAlertDialog(!1)
|
|
3636
|
+
} });
|
|
3637
|
+
return;
|
|
3638
|
+
}
|
|
3639
|
+
s();
|
|
3640
|
+
};
|
|
3641
|
+
render() {
|
|
3642
|
+
let { availableTools: e, errors: t, model: n, mathMlOptions: r = {}, removeIncompleteTool: i } = this.props, { dialog: a } = this.state, { answers: o = {}, arrows: s, backgroundMarks: c, coordinatesOnHover: l, defaultTool: u, domain: d, graph: f = {}, labels: p, labelsEnabled: m, range: h, title: g, titleEnabled: _, toolbarTools: v } = n || {}, { correctAnswerErrors: y = {}, toolbarToolsError: b } = t || {};
|
|
3643
|
+
return /* @__PURE__ */ J("div", { children: [
|
|
3644
|
+
/* @__PURE__ */ q(W, {
|
|
3645
|
+
component: "div",
|
|
3646
|
+
variant: "h6",
|
|
3647
|
+
children: "Define Tool Set and Correct Response"
|
|
3648
|
+
}),
|
|
3649
|
+
/* @__PURE__ */ q(na, {
|
|
3650
|
+
component: "div",
|
|
3651
|
+
variant: "body1",
|
|
3652
|
+
children: "Use this interface to choose which graphing tools students will be able to use, and to define the correct answer"
|
|
3653
|
+
}),
|
|
3654
|
+
/* @__PURE__ */ q(ca, {
|
|
3655
|
+
availableTools: e,
|
|
3656
|
+
defaultTool: u,
|
|
3657
|
+
hasErrors: !!b,
|
|
3658
|
+
onDefaultToolChange: this.onDefaultToolChange,
|
|
3659
|
+
toggleToolBarTool: this.toggleToolBarTool,
|
|
3660
|
+
toolbarTools: v
|
|
3661
|
+
}),
|
|
3662
|
+
b && /* @__PURE__ */ q(sa, { children: b }),
|
|
3663
|
+
Object.entries(o || {}).map(([e, t]) => {
|
|
3664
|
+
let { marks: n = [], name: a } = t || {};
|
|
3665
|
+
return /* @__PURE__ */ J(G.Fragment, { children: [
|
|
3666
|
+
/* @__PURE__ */ J(Qi, { children: [
|
|
3667
|
+
/* @__PURE__ */ q(ea, { children: a }),
|
|
3668
|
+
e === "correctAnswer" && /* @__PURE__ */ q(ta, {
|
|
3669
|
+
disableFocusListener: !0,
|
|
3670
|
+
disableTouchListener: !0,
|
|
3671
|
+
placement: "right",
|
|
3672
|
+
title: "At least 1 graph object should be defined.",
|
|
3673
|
+
children: /* @__PURE__ */ q(Wi, {
|
|
3674
|
+
fontSize: "small",
|
|
3675
|
+
color: "primary",
|
|
3676
|
+
style: {
|
|
3677
|
+
marginLeft: "8px",
|
|
3678
|
+
marginBottom: "auto"
|
|
3679
|
+
}
|
|
3680
|
+
})
|
|
3681
|
+
}),
|
|
3682
|
+
e !== "correctAnswer" && /* @__PURE__ */ q($i, {
|
|
3683
|
+
onClick: () => this.deleteAlternateResponse(e, t),
|
|
3684
|
+
children: /* @__PURE__ */ q(C, {})
|
|
3685
|
+
})
|
|
3686
|
+
] }),
|
|
3687
|
+
/* @__PURE__ */ q(ye, {
|
|
3688
|
+
style: y[e] && { border: "2px solid red" },
|
|
3689
|
+
axesSettings: { includeArrows: s },
|
|
3690
|
+
backgroundMarks: c.filter((e) => !e.building),
|
|
3691
|
+
coordinatesOnHover: l,
|
|
3692
|
+
disabledLabels: !0,
|
|
3693
|
+
disabledTitle: !0,
|
|
3694
|
+
domain: d,
|
|
3695
|
+
draggableTools: e === "correctAnswer",
|
|
3696
|
+
labels: p,
|
|
3697
|
+
marks: n,
|
|
3698
|
+
onChangeMarks: (t) => this.changeMarks(e, t),
|
|
3699
|
+
range: h,
|
|
3700
|
+
showLabels: m,
|
|
3701
|
+
showTitle: _,
|
|
3702
|
+
size: {
|
|
3703
|
+
width: f.width,
|
|
3704
|
+
height: f.height
|
|
3705
|
+
},
|
|
3706
|
+
title: g,
|
|
3707
|
+
toolbarTools: v,
|
|
3708
|
+
onChangeTools: (e) => this.updateModel({ toolbarTools: e }),
|
|
3709
|
+
mathMlOptions: r,
|
|
3710
|
+
removeIncompleteTool: i,
|
|
3711
|
+
limitLabeling: !0
|
|
3712
|
+
}),
|
|
3713
|
+
y[e] && /* @__PURE__ */ q(sa, { children: y[e] })
|
|
3714
|
+
] }, `correct-response-graph-${a}`);
|
|
3715
|
+
}),
|
|
3716
|
+
/* @__PURE__ */ q(Ji, {
|
|
3717
|
+
onClick: this.addAlternateResponse,
|
|
3718
|
+
children: "ADD ALTERNATE"
|
|
3719
|
+
}),
|
|
3720
|
+
/* @__PURE__ */ q(Ht, {
|
|
3721
|
+
open: a.open,
|
|
3722
|
+
title: a.title,
|
|
3723
|
+
text: a.text,
|
|
3724
|
+
onClose: a.onClose,
|
|
3725
|
+
onConfirm: a.onConfirm
|
|
3726
|
+
})
|
|
3727
|
+
] });
|
|
3728
|
+
}
|
|
3729
|
+
}, { Panel: ua, toggle: $, radio: da, checkboxes: fa, textField: pa, dropdown: ma } = Kr, ha = (0, zt.default)("@pie-element:graphing:configure"), ga = z(ii)(({ theme: e }) => ({
|
|
3730
|
+
width: "100%",
|
|
3731
|
+
paddingTop: e.spacing(2),
|
|
3732
|
+
marginBottom: e.spacing(2)
|
|
3733
|
+
})), _a = z(W)(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), va = z("div")(({ theme: e }) => ({
|
|
3734
|
+
fontSize: e.typography.fontSize - 2,
|
|
3735
|
+
color: e.palette.error.main,
|
|
3736
|
+
paddingTop: e.spacing(1)
|
|
3737
|
+
})), ya = class extends K.Component {
|
|
3738
|
+
static propTypes = {
|
|
3739
|
+
onModelChanged: Q.default.func,
|
|
3740
|
+
onConfigurationChanged: Q.default.func,
|
|
3741
|
+
imageSupport: Q.default.object,
|
|
3742
|
+
uploadSoundSupport: Q.default.object,
|
|
3743
|
+
model: Q.default.object.isRequired,
|
|
3744
|
+
configuration: Q.default.object.isRequired
|
|
3745
|
+
};
|
|
3746
|
+
componentDidMount() {
|
|
3747
|
+
let { configuration: e, onModelChanged: t, model: n } = this.props, { availableTools: r, title: a, graphDimensions: o } = e || {}, { arrows: s, titleEnabled: c, dimensionsEnabled: l } = n || {};
|
|
3748
|
+
typeof s == "boolean" && (s = s ? {
|
|
3749
|
+
left: !0,
|
|
3750
|
+
right: !0,
|
|
3751
|
+
up: !0,
|
|
3752
|
+
down: !0
|
|
3753
|
+
} : {
|
|
3754
|
+
left: !1,
|
|
3755
|
+
right: !1,
|
|
3756
|
+
up: !1,
|
|
3757
|
+
down: !1
|
|
3758
|
+
});
|
|
3759
|
+
let u = i(r || [], n.toolbarTools || []), d = c ?? a.enabled, f = l ?? o.enabled;
|
|
3760
|
+
t && t({
|
|
3761
|
+
...n,
|
|
3762
|
+
arrows: s,
|
|
3763
|
+
toolbarTools: u,
|
|
3764
|
+
titleEnabled: d,
|
|
3765
|
+
dimensionsEnabled: f
|
|
3766
|
+
});
|
|
3767
|
+
}
|
|
3768
|
+
onRationaleChange = (e) => {
|
|
3769
|
+
let { onModelChanged: t, model: n } = this.props;
|
|
3770
|
+
t({
|
|
3771
|
+
...n,
|
|
3772
|
+
rationale: e
|
|
3773
|
+
});
|
|
3774
|
+
};
|
|
3775
|
+
onPromptChange = (e) => {
|
|
3776
|
+
let { onModelChanged: t, model: n } = this.props;
|
|
3777
|
+
t({
|
|
3778
|
+
...n,
|
|
3779
|
+
prompt: e
|
|
3780
|
+
});
|
|
3781
|
+
};
|
|
3782
|
+
onTeacherInstructionsChange = (e) => {
|
|
3783
|
+
let { onModelChanged: t, model: n } = this.props;
|
|
3784
|
+
t({
|
|
3785
|
+
...n,
|
|
3786
|
+
teacherInstructions: e
|
|
3787
|
+
});
|
|
3788
|
+
};
|
|
3789
|
+
render() {
|
|
3790
|
+
let { model: e, configuration: t, onConfigurationChanged: n, onModelChanged: r, imageSupport: i, uploadSoundSupport: a } = this.props, { arrows: o = {}, authoring: s = {}, availableTools: c = [], baseInputConfiguration: l = {}, coordinatesOnHover: u = {}, contentDimensions: d = {}, gridConfigurations: f = [], graphDimensions: p = {}, instruction: m = {}, labels: h = {}, padding: g = {}, prompt: _ = {}, rationale: v = {}, scoringType: y = {}, settingsPanelDisabled: b, spellCheck: x = {}, studentInstructions: S = {}, teacherInstructions: C = {}, title: w = {}, maxImageWidth: T = {}, maxImageHeight: E = {}, withRubric: D = {}, language: O = {}, languageChoices: k = {}, mathMlOptions: A = {}, removeIncompleteTool: ee = !1 } = t || {}, { errors: j = {}, extraCSSRules: M, labelsEnabled: te, dimensionsEnabled: N, promptEnabled: ne, rationaleEnabled: P, spellCheckEnabled: F, teacherInstructionsEnabled: re, titleEnabled: I } = e || {}, { prompt: ie, rationale: L, teacherInstructions: ae } = j || {};
|
|
3791
|
+
ha("[render] model", e);
|
|
3792
|
+
let oe = T && T.prompt, R = E && E.prompt, z = {
|
|
3793
|
+
top: h.top,
|
|
3794
|
+
right: h.right,
|
|
3795
|
+
bottom: h.bottom,
|
|
3796
|
+
left: h.left
|
|
3797
|
+
}, se = {
|
|
3798
|
+
arrows: o.settings && fa(o.label, {
|
|
3799
|
+
left: o.left,
|
|
3800
|
+
right: o.right,
|
|
3801
|
+
up: o.up,
|
|
3802
|
+
down: o.down
|
|
3803
|
+
}),
|
|
3804
|
+
titleEnabled: w.settings && $(w.label),
|
|
3805
|
+
padding: g.settings && $(g.label),
|
|
3806
|
+
labelsEnabled: h.settings && $(h.label),
|
|
3807
|
+
"language.enabled": O.settings && $(O.label, !0),
|
|
3808
|
+
language: O.settings && O.enabled && ma(k.label, k.options),
|
|
3809
|
+
dimensionsEnabled: p.settings && $(p.label),
|
|
3810
|
+
coordinatesOnHover: u.settings && $(u.label)
|
|
3811
|
+
}, ce = {
|
|
3812
|
+
"authoring.enabled": s.settings && $(s.label, !0),
|
|
3813
|
+
teacherInstructionsEnabled: C.settings && $(C.label),
|
|
3814
|
+
studentInstructionsEnabled: S.settings && $(S.label),
|
|
3815
|
+
promptEnabled: _.settings && $(_.label),
|
|
3816
|
+
rationaleEnabled: v.settings && $(v.label),
|
|
3817
|
+
spellCheckEnabled: x.settings && $(x.label),
|
|
3818
|
+
scoringType: y.settings && da(y.label, ["dichotomous", "partial scoring"]),
|
|
3819
|
+
rubricEnabled: D?.settings && $(D?.label),
|
|
3820
|
+
instruction: m.settings && pa(m.label)
|
|
3821
|
+
}, le = (e = {}) => ({
|
|
3822
|
+
...l,
|
|
3823
|
+
...e
|
|
3824
|
+
});
|
|
3825
|
+
return /* @__PURE__ */ J(_r.ConfigLayout, {
|
|
3826
|
+
extraCSSRules: M,
|
|
3827
|
+
dimensions: d,
|
|
3828
|
+
hideSettings: b,
|
|
3829
|
+
settings: /* @__PURE__ */ q(ua, {
|
|
3830
|
+
model: e,
|
|
3831
|
+
configuration: t,
|
|
3832
|
+
onChangeModel: r,
|
|
3833
|
+
onChangeConfiguration: n,
|
|
3834
|
+
groups: {
|
|
3835
|
+
Settings: se,
|
|
3836
|
+
Properties: ce
|
|
3837
|
+
}
|
|
3838
|
+
}),
|
|
3839
|
+
children: [
|
|
3840
|
+
/* @__PURE__ */ q(_a, {
|
|
3841
|
+
component: "div",
|
|
3842
|
+
variant: "body1",
|
|
3843
|
+
children: m?.label || ""
|
|
3844
|
+
}),
|
|
3845
|
+
re && /* @__PURE__ */ J(ga, {
|
|
3846
|
+
label: C.label,
|
|
3847
|
+
children: [/* @__PURE__ */ q(_e, {
|
|
3848
|
+
markup: e.teacherInstructions || "",
|
|
3849
|
+
onChange: this.onTeacherInstructionsChange,
|
|
3850
|
+
imageSupport: i,
|
|
3851
|
+
error: ae,
|
|
3852
|
+
nonEmpty: !1,
|
|
3853
|
+
pluginProps: le(C?.inputConfiguration),
|
|
3854
|
+
spellCheck: F,
|
|
3855
|
+
maxImageWidth: T && T.teacherInstructions || oe,
|
|
3856
|
+
maxImageHeight: E && E.teacherInstructions || R,
|
|
3857
|
+
uploadSoundSupport: a,
|
|
3858
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
3859
|
+
mathMlOptions: A
|
|
3860
|
+
}), ae && /* @__PURE__ */ q(va, { children: ae })]
|
|
3861
|
+
}),
|
|
3862
|
+
ne && /* @__PURE__ */ J(ga, {
|
|
3863
|
+
label: _.label,
|
|
3864
|
+
children: [/* @__PURE__ */ q(_e, {
|
|
3865
|
+
markup: e.prompt,
|
|
3866
|
+
onChange: this.onPromptChange,
|
|
3867
|
+
imageSupport: i,
|
|
3868
|
+
error: ie,
|
|
3869
|
+
nonEmpty: !1,
|
|
3870
|
+
spellCheck: F,
|
|
3871
|
+
pluginProps: le(_?.inputConfiguration),
|
|
3872
|
+
disableUnderline: !0,
|
|
3873
|
+
maxImageWidth: oe,
|
|
3874
|
+
maxImageHeight: R,
|
|
3875
|
+
uploadSoundSupport: a,
|
|
3876
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
3877
|
+
mathMlOptions: A
|
|
3878
|
+
}), ie && /* @__PURE__ */ q(va, { children: ie })]
|
|
3879
|
+
}),
|
|
3880
|
+
/* @__PURE__ */ q(Ui, {
|
|
3881
|
+
authoring: s,
|
|
3882
|
+
availableTools: c,
|
|
3883
|
+
gridConfigurations: f,
|
|
3884
|
+
graphDimensions: p,
|
|
3885
|
+
labelsPlaceholders: z,
|
|
3886
|
+
model: e,
|
|
3887
|
+
showLabels: te,
|
|
3888
|
+
dimensionsEnabled: N,
|
|
3889
|
+
showTitle: I,
|
|
3890
|
+
titlePlaceholder: w.placeholder,
|
|
3891
|
+
onChange: this.props.onModelChanged,
|
|
3892
|
+
mathMlOptions: A,
|
|
3893
|
+
removeIncompleteTool: ee
|
|
3894
|
+
}),
|
|
3895
|
+
/* @__PURE__ */ q(la, {
|
|
3896
|
+
availableTools: c,
|
|
3897
|
+
errors: j,
|
|
3898
|
+
model: e,
|
|
3899
|
+
onChange: this.props.onModelChanged,
|
|
3900
|
+
mathMlOptions: A,
|
|
3901
|
+
removeIncompleteTool: ee
|
|
3902
|
+
}),
|
|
3903
|
+
P && /* @__PURE__ */ J(ga, {
|
|
3904
|
+
label: v.label || "Rationale",
|
|
3905
|
+
children: [/* @__PURE__ */ q(_e, {
|
|
3906
|
+
markup: e.rationale || "",
|
|
3907
|
+
onChange: this.onRationaleChange,
|
|
3908
|
+
imageSupport: i,
|
|
3909
|
+
error: L,
|
|
3910
|
+
spellCheck: F,
|
|
3911
|
+
pluginProps: le(v?.inputConfiguration),
|
|
3912
|
+
maxImageWidth: T && T.rationale || oe,
|
|
3913
|
+
maxImageHeight: E && E.rationale || R,
|
|
3914
|
+
uploadSoundSupport: a,
|
|
3915
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
3916
|
+
mathMlOptions: A
|
|
3917
|
+
}), L && /* @__PURE__ */ q(va, { children: L })]
|
|
3918
|
+
})
|
|
3919
|
+
]
|
|
3920
|
+
});
|
|
3921
|
+
}
|
|
3922
|
+
}, ba = class e extends CustomEvent {
|
|
3923
|
+
static {
|
|
3924
|
+
this.TYPE = "model.updated";
|
|
3925
|
+
}
|
|
3926
|
+
constructor(t, n = !1) {
|
|
3927
|
+
super(e.TYPE, {
|
|
3928
|
+
bubbles: !0,
|
|
3929
|
+
detail: {
|
|
3930
|
+
update: t,
|
|
3931
|
+
reset: n
|
|
3932
|
+
}
|
|
3933
|
+
}), this.update = t, this.reset = n;
|
|
3934
|
+
}
|
|
3935
|
+
}, xa = class e extends CustomEvent {
|
|
3936
|
+
static {
|
|
3937
|
+
this.TYPE = "delete.image";
|
|
3938
|
+
}
|
|
3939
|
+
constructor(t, n) {
|
|
3940
|
+
super(e.TYPE, {
|
|
3941
|
+
bubbles: !0,
|
|
3942
|
+
detail: {
|
|
3943
|
+
src: t,
|
|
3944
|
+
done: n
|
|
3945
|
+
}
|
|
3946
|
+
}), this.src = t, this.done = n;
|
|
3947
|
+
}
|
|
3948
|
+
}, Sa = class e extends CustomEvent {
|
|
3949
|
+
static {
|
|
3950
|
+
this.TYPE = "insert.image";
|
|
3951
|
+
}
|
|
3952
|
+
constructor(t) {
|
|
3953
|
+
super(e.TYPE, {
|
|
3954
|
+
bubbles: !0,
|
|
3955
|
+
detail: t
|
|
3956
|
+
}), this.handler = t;
|
|
3957
|
+
}
|
|
3958
|
+
}, Ca = class e extends CustomEvent {
|
|
3959
|
+
static {
|
|
3960
|
+
this.TYPE = "delete.sound";
|
|
3961
|
+
}
|
|
3962
|
+
constructor(t, n) {
|
|
3963
|
+
super(e.TYPE, {
|
|
3964
|
+
bubbles: !0,
|
|
3965
|
+
detail: {
|
|
3966
|
+
src: t,
|
|
3967
|
+
done: n
|
|
3968
|
+
}
|
|
3969
|
+
}), this.src = t, this.done = n;
|
|
3970
|
+
}
|
|
3971
|
+
}, wa = class e extends CustomEvent {
|
|
3972
|
+
static {
|
|
3973
|
+
this.TYPE = "insert.sound";
|
|
3974
|
+
}
|
|
3975
|
+
constructor(t) {
|
|
3976
|
+
super(e.TYPE, {
|
|
3977
|
+
bubbles: !0,
|
|
3978
|
+
detail: t
|
|
3979
|
+
}), this.handler = t;
|
|
3980
|
+
}
|
|
3981
|
+
}, Ta = [
|
|
3982
|
+
"circle",
|
|
3983
|
+
"line",
|
|
3984
|
+
"label",
|
|
3985
|
+
"parabola",
|
|
3986
|
+
"point",
|
|
3987
|
+
"polygon",
|
|
3988
|
+
"ray",
|
|
3989
|
+
"segment",
|
|
3990
|
+
"sine",
|
|
3991
|
+
"vector"
|
|
3992
|
+
], Ea = {
|
|
3993
|
+
model: {
|
|
3994
|
+
answers: { correctAnswer: {
|
|
3995
|
+
name: "Correct Answer",
|
|
3996
|
+
marks: []
|
|
3997
|
+
} },
|
|
3998
|
+
arrows: {
|
|
3999
|
+
left: !0,
|
|
4000
|
+
right: !0,
|
|
4001
|
+
up: !0,
|
|
4002
|
+
down: !0
|
|
4003
|
+
},
|
|
4004
|
+
backgroundMarks: [],
|
|
4005
|
+
coordinatesOnHover: !1,
|
|
4006
|
+
defaultGridConfiguration: 0,
|
|
4007
|
+
domain: {
|
|
4008
|
+
min: -5,
|
|
4009
|
+
max: 5,
|
|
4010
|
+
step: 1,
|
|
4011
|
+
labelStep: 1,
|
|
4012
|
+
axisLabel: "x"
|
|
4013
|
+
},
|
|
4014
|
+
graph: {
|
|
4015
|
+
width: 500,
|
|
4016
|
+
height: 500
|
|
4017
|
+
},
|
|
4018
|
+
includeAxes: !0,
|
|
4019
|
+
labels: {},
|
|
4020
|
+
labelsEnabled: !0,
|
|
4021
|
+
padding: !0,
|
|
4022
|
+
prompt: "",
|
|
4023
|
+
promptEnabled: !0,
|
|
4024
|
+
range: {
|
|
4025
|
+
min: -5,
|
|
4026
|
+
max: 5,
|
|
4027
|
+
step: 1,
|
|
4028
|
+
labelStep: 1,
|
|
4029
|
+
axisLabel: "y"
|
|
4030
|
+
},
|
|
4031
|
+
rationale: "",
|
|
4032
|
+
rationaleEnabled: !0,
|
|
4033
|
+
standardGrid: !1,
|
|
4034
|
+
studentInstructionsEnabled: !0,
|
|
4035
|
+
teacherInstructions: "",
|
|
4036
|
+
teacherInstructionsEnabled: !0,
|
|
4037
|
+
title: "",
|
|
4038
|
+
titleEnabled: !0,
|
|
4039
|
+
toolbarTools: Ta
|
|
4040
|
+
},
|
|
4041
|
+
configuration: {
|
|
4042
|
+
baseInputConfiguration: {
|
|
4043
|
+
h3: { disabled: !0 },
|
|
4044
|
+
audio: { disabled: !1 },
|
|
4045
|
+
video: { disabled: !1 },
|
|
4046
|
+
image: { disabled: !1 },
|
|
4047
|
+
textAlign: { disabled: !0 },
|
|
4048
|
+
showParagraphs: { disabled: !1 },
|
|
4049
|
+
separateParagraphs: { disabled: !0 }
|
|
4050
|
+
},
|
|
4051
|
+
availableTools: Ta,
|
|
4052
|
+
authoring: {
|
|
4053
|
+
settings: !1,
|
|
4054
|
+
label: "Customize Grid Setup",
|
|
4055
|
+
enabled: !0,
|
|
4056
|
+
includeAxesEnabled: !0,
|
|
4057
|
+
standardGridEnabled: !0,
|
|
4058
|
+
min: {
|
|
4059
|
+
label: "Min Value",
|
|
4060
|
+
enabled: !0
|
|
4061
|
+
},
|
|
4062
|
+
max: {
|
|
4063
|
+
label: "Max Value",
|
|
4064
|
+
enabled: !0
|
|
4065
|
+
},
|
|
4066
|
+
axisLabel: {
|
|
4067
|
+
label: "Label",
|
|
4068
|
+
enabled: !0
|
|
4069
|
+
},
|
|
4070
|
+
step: {
|
|
4071
|
+
label: "Grid Interval",
|
|
4072
|
+
enabled: !0
|
|
4073
|
+
},
|
|
4074
|
+
labelStep: {
|
|
4075
|
+
label: "Label Interval",
|
|
4076
|
+
enabled: !0
|
|
4077
|
+
}
|
|
4078
|
+
},
|
|
4079
|
+
arrows: {
|
|
4080
|
+
settings: !0,
|
|
4081
|
+
label: "Include Arrows",
|
|
4082
|
+
left: { label: "left" },
|
|
4083
|
+
right: { label: "right" },
|
|
4084
|
+
up: { label: "up" },
|
|
4085
|
+
down: { label: "down" }
|
|
4086
|
+
},
|
|
4087
|
+
gridConfigurations: [
|
|
4088
|
+
{
|
|
4089
|
+
label: "4-quadrant coordinate grid, -10 to 10",
|
|
4090
|
+
arrows: {
|
|
4091
|
+
left: !0,
|
|
4092
|
+
right: !0,
|
|
4093
|
+
up: !0,
|
|
4094
|
+
down: !0
|
|
4095
|
+
},
|
|
4096
|
+
domain: {
|
|
4097
|
+
min: -10,
|
|
4098
|
+
max: 10,
|
|
4099
|
+
step: 1,
|
|
4100
|
+
padding: 0,
|
|
4101
|
+
labelStep: 1,
|
|
4102
|
+
axisLabel: "<i>x</i>"
|
|
4103
|
+
},
|
|
4104
|
+
graph: {
|
|
4105
|
+
width: 480,
|
|
4106
|
+
height: 480
|
|
4107
|
+
},
|
|
4108
|
+
includeAxes: !0,
|
|
4109
|
+
labels: {
|
|
4110
|
+
top: "",
|
|
4111
|
+
right: "",
|
|
4112
|
+
bottom: "",
|
|
4113
|
+
left: ""
|
|
4114
|
+
},
|
|
4115
|
+
padding: !0,
|
|
4116
|
+
range: {
|
|
4117
|
+
min: -10,
|
|
4118
|
+
max: 10,
|
|
4119
|
+
step: 1,
|
|
4120
|
+
padding: 0,
|
|
4121
|
+
labelStep: 1,
|
|
4122
|
+
axisLabel: "<i>y</i>"
|
|
4123
|
+
},
|
|
4124
|
+
standardGrid: !0,
|
|
4125
|
+
title: ""
|
|
4126
|
+
},
|
|
4127
|
+
{
|
|
4128
|
+
label: "0 to 10 on both axes",
|
|
4129
|
+
arrows: {
|
|
4130
|
+
left: !1,
|
|
4131
|
+
right: !0,
|
|
4132
|
+
up: !0,
|
|
4133
|
+
down: !1
|
|
4134
|
+
},
|
|
4135
|
+
domain: {
|
|
4136
|
+
min: 0,
|
|
4137
|
+
max: 10,
|
|
4138
|
+
step: 1,
|
|
4139
|
+
padding: 0,
|
|
4140
|
+
labelStep: 1,
|
|
4141
|
+
axisLabel: "<i>x</i>"
|
|
4142
|
+
},
|
|
4143
|
+
graph: {
|
|
4144
|
+
width: 480,
|
|
4145
|
+
height: 480
|
|
4146
|
+
},
|
|
4147
|
+
includeAxes: !0,
|
|
4148
|
+
labels: {
|
|
4149
|
+
top: "",
|
|
4150
|
+
right: "",
|
|
4151
|
+
bottom: "",
|
|
4152
|
+
left: ""
|
|
4153
|
+
},
|
|
4154
|
+
padding: !0,
|
|
4155
|
+
range: {
|
|
4156
|
+
min: 0,
|
|
4157
|
+
max: 10,
|
|
4158
|
+
step: 1,
|
|
4159
|
+
padding: 0,
|
|
4160
|
+
labelStep: 1,
|
|
4161
|
+
axisLabel: "<i>y</i>"
|
|
4162
|
+
},
|
|
4163
|
+
standardGrid: !0,
|
|
4164
|
+
title: ""
|
|
4165
|
+
},
|
|
4166
|
+
{
|
|
4167
|
+
label: "0 to 20 on both axes",
|
|
4168
|
+
arrows: {
|
|
4169
|
+
left: !1,
|
|
4170
|
+
right: !0,
|
|
4171
|
+
up: !0,
|
|
4172
|
+
down: !1
|
|
4173
|
+
},
|
|
4174
|
+
domain: {
|
|
4175
|
+
min: 0,
|
|
4176
|
+
max: 20,
|
|
4177
|
+
step: 1,
|
|
4178
|
+
padding: 0,
|
|
4179
|
+
labelStep: 1,
|
|
4180
|
+
axisLabel: "<i>x</i>"
|
|
4181
|
+
},
|
|
4182
|
+
graph: {
|
|
4183
|
+
width: 480,
|
|
4184
|
+
height: 480
|
|
4185
|
+
},
|
|
4186
|
+
includeAxes: !0,
|
|
4187
|
+
labels: {
|
|
4188
|
+
top: "",
|
|
4189
|
+
right: "",
|
|
4190
|
+
bottom: "",
|
|
4191
|
+
left: ""
|
|
4192
|
+
},
|
|
4193
|
+
padding: !0,
|
|
4194
|
+
range: {
|
|
4195
|
+
min: 0,
|
|
4196
|
+
max: 20,
|
|
4197
|
+
step: 1,
|
|
4198
|
+
padding: 0,
|
|
4199
|
+
labelStep: 1,
|
|
4200
|
+
axisLabel: "<i>y</i>"
|
|
4201
|
+
},
|
|
4202
|
+
standardGrid: !0,
|
|
4203
|
+
title: ""
|
|
4204
|
+
},
|
|
4205
|
+
{
|
|
4206
|
+
label: "Sample Data Graph",
|
|
4207
|
+
arrows: {
|
|
4208
|
+
left: !1,
|
|
4209
|
+
right: !0,
|
|
4210
|
+
up: !0,
|
|
4211
|
+
down: !1
|
|
4212
|
+
},
|
|
4213
|
+
domain: {
|
|
4214
|
+
min: 0,
|
|
4215
|
+
max: 30,
|
|
4216
|
+
step: 1,
|
|
4217
|
+
padding: 0,
|
|
4218
|
+
labelStep: 2,
|
|
4219
|
+
axisLabel: "<i>t</i>"
|
|
4220
|
+
},
|
|
4221
|
+
graph: {
|
|
4222
|
+
width: 480,
|
|
4223
|
+
height: 480
|
|
4224
|
+
},
|
|
4225
|
+
includeAxes: !0,
|
|
4226
|
+
labels: {
|
|
4227
|
+
top: "",
|
|
4228
|
+
right: "",
|
|
4229
|
+
bottom: "Time (seconds)",
|
|
4230
|
+
left: "Distance (meters)"
|
|
4231
|
+
},
|
|
4232
|
+
padding: !0,
|
|
4233
|
+
range: {
|
|
4234
|
+
min: 0,
|
|
4235
|
+
max: 80,
|
|
4236
|
+
step: 5,
|
|
4237
|
+
padding: 0,
|
|
4238
|
+
labelStep: 10,
|
|
4239
|
+
axisLabel: "<i>d</i>"
|
|
4240
|
+
},
|
|
4241
|
+
standardGrid: !1,
|
|
4242
|
+
title: "Distance as a function of time"
|
|
4243
|
+
},
|
|
4244
|
+
{
|
|
4245
|
+
label: "No Visible Axes",
|
|
4246
|
+
arrows: {
|
|
4247
|
+
left: !1,
|
|
4248
|
+
right: !1,
|
|
4249
|
+
up: !1,
|
|
4250
|
+
down: !1
|
|
4251
|
+
},
|
|
4252
|
+
domain: {
|
|
4253
|
+
min: 1,
|
|
4254
|
+
max: 21,
|
|
4255
|
+
step: 1,
|
|
4256
|
+
padding: 0,
|
|
4257
|
+
labelStep: 0,
|
|
4258
|
+
axisLabel: ""
|
|
4259
|
+
},
|
|
4260
|
+
graph: {
|
|
4261
|
+
width: 480,
|
|
4262
|
+
height: 480
|
|
4263
|
+
},
|
|
4264
|
+
includeAxes: !1,
|
|
4265
|
+
labels: {
|
|
4266
|
+
top: "",
|
|
4267
|
+
right: "",
|
|
4268
|
+
bottom: "",
|
|
4269
|
+
left: ""
|
|
4270
|
+
},
|
|
4271
|
+
padding: !0,
|
|
4272
|
+
range: {
|
|
4273
|
+
min: 1,
|
|
4274
|
+
max: 21,
|
|
4275
|
+
step: 1,
|
|
4276
|
+
padding: 0,
|
|
4277
|
+
labelStep: 0,
|
|
4278
|
+
axisLabel: ""
|
|
4279
|
+
},
|
|
4280
|
+
standardGrid: !1,
|
|
4281
|
+
title: ""
|
|
4282
|
+
}
|
|
4283
|
+
],
|
|
4284
|
+
graphDimensions: {
|
|
4285
|
+
settings: !1,
|
|
4286
|
+
label: "Graph Dimensions",
|
|
4287
|
+
enabled: !0,
|
|
4288
|
+
min: 150,
|
|
4289
|
+
max: 800,
|
|
4290
|
+
step: 20
|
|
4291
|
+
},
|
|
4292
|
+
padding: {
|
|
4293
|
+
settings: !1,
|
|
4294
|
+
label: "Padding"
|
|
4295
|
+
},
|
|
4296
|
+
labels: {
|
|
4297
|
+
settings: !0,
|
|
4298
|
+
label: "Graph Labels",
|
|
4299
|
+
enabled: !0,
|
|
4300
|
+
top: "Click here to add a top label",
|
|
4301
|
+
right: "Click here to add a right label",
|
|
4302
|
+
bottom: "Click here to add a bottom label",
|
|
4303
|
+
left: "Click here to add a left label"
|
|
4304
|
+
},
|
|
4305
|
+
prompt: {
|
|
4306
|
+
settings: !0,
|
|
4307
|
+
label: "Item Stem",
|
|
4308
|
+
required: !1,
|
|
4309
|
+
inputConfiguration: {
|
|
4310
|
+
audio: { disabled: !1 },
|
|
4311
|
+
video: { disabled: !1 },
|
|
4312
|
+
image: { disabled: !1 }
|
|
4313
|
+
}
|
|
4314
|
+
},
|
|
4315
|
+
rationale: {
|
|
4316
|
+
settings: !0,
|
|
4317
|
+
label: "Rationale",
|
|
4318
|
+
required: !1,
|
|
4319
|
+
inputConfiguration: {
|
|
4320
|
+
audio: { disabled: !1 },
|
|
4321
|
+
video: { disabled: !1 },
|
|
4322
|
+
image: { disabled: !1 }
|
|
4323
|
+
}
|
|
4324
|
+
},
|
|
4325
|
+
scoringType: {
|
|
4326
|
+
settings: !1,
|
|
4327
|
+
label: "Scoring Type"
|
|
4328
|
+
},
|
|
4329
|
+
studentInstructions: {
|
|
4330
|
+
settings: !1,
|
|
4331
|
+
label: "Student Instructions"
|
|
4332
|
+
},
|
|
4333
|
+
teacherInstructions: {
|
|
4334
|
+
settings: !0,
|
|
4335
|
+
label: "Teacher Instructions",
|
|
4336
|
+
required: !1,
|
|
4337
|
+
inputConfiguration: {
|
|
4338
|
+
audio: { disabled: !1 },
|
|
4339
|
+
video: { disabled: !1 },
|
|
4340
|
+
image: { disabled: !1 }
|
|
4341
|
+
}
|
|
4342
|
+
},
|
|
4343
|
+
title: {
|
|
4344
|
+
settings: !0,
|
|
4345
|
+
label: "Graph Title",
|
|
4346
|
+
enabled: !0,
|
|
4347
|
+
placeholder: "Click here to add a title for this graph"
|
|
4348
|
+
},
|
|
4349
|
+
instruction: {
|
|
4350
|
+
settings: !1,
|
|
4351
|
+
label: "Graphing questions involve plotting points, lines, or other objects on a graph. To create one, first configure the grid, then select the plotting tools students will be offered, and use them to define the correct answer."
|
|
4352
|
+
},
|
|
4353
|
+
settingsPanelDisabled: !1,
|
|
4354
|
+
spellCheck: {
|
|
4355
|
+
label: "Spellcheck",
|
|
4356
|
+
settings: !1,
|
|
4357
|
+
enabled: !0
|
|
4358
|
+
},
|
|
4359
|
+
coordinatesOnHover: {
|
|
4360
|
+
settings: !0,
|
|
4361
|
+
label: "Coordinates on Hover"
|
|
4362
|
+
},
|
|
4363
|
+
maxImageWidth: {
|
|
4364
|
+
teacherInstructions: 300,
|
|
4365
|
+
prompt: 300,
|
|
4366
|
+
rationale: 300
|
|
4367
|
+
},
|
|
4368
|
+
maxImageHeight: {
|
|
4369
|
+
teacherInstructions: 300,
|
|
4370
|
+
prompt: 300,
|
|
4371
|
+
rationale: 300
|
|
4372
|
+
},
|
|
4373
|
+
withRubric: {
|
|
4374
|
+
settings: !1,
|
|
4375
|
+
label: "Add Rubric"
|
|
4376
|
+
},
|
|
4377
|
+
language: {
|
|
4378
|
+
settings: !1,
|
|
4379
|
+
label: "Specify Language",
|
|
4380
|
+
enabled: !1
|
|
4381
|
+
},
|
|
4382
|
+
languageChoices: {
|
|
4383
|
+
label: "Language Choices",
|
|
4384
|
+
options: []
|
|
4385
|
+
},
|
|
4386
|
+
mathMlOptions: {
|
|
4387
|
+
mmlOutput: !1,
|
|
4388
|
+
mmlEditing: !1
|
|
4389
|
+
},
|
|
4390
|
+
removeIncompleteTool: !1
|
|
4391
|
+
}
|
|
4392
|
+
}, Da = (0, zt.default)("pie-elements:graphing:configure"), Oa = (e) => Object.keys(e || {}).sort().reduce((t, n) => (n !== "correctAnswer" && (t[n] = e[n]), t), {}), ka = class t extends HTMLElement {
|
|
4393
|
+
static createDefaultModel = (e = {}) => {
|
|
4394
|
+
let t = {
|
|
4395
|
+
...Ea.model,
|
|
4396
|
+
...e
|
|
4397
|
+
}, { answers: n = {}, domain: r = {}, defaultTool: i, graph: a = {}, range: o = {}, standardGrid: s, toolbarTools: c } = t, l = (c || []).filter((e) => e !== "label"), u = i || l.length && l[0] || "";
|
|
4398
|
+
return {
|
|
4399
|
+
...t,
|
|
4400
|
+
answers: n && n.correctAnswer && {
|
|
4401
|
+
correctAnswer: n.correctAnswer,
|
|
4402
|
+
...Oa(n)
|
|
4403
|
+
} || n,
|
|
4404
|
+
defaultTool: u,
|
|
4405
|
+
range: s && {
|
|
4406
|
+
...o,
|
|
4407
|
+
min: r.min,
|
|
4408
|
+
max: r.max,
|
|
4409
|
+
step: r.step,
|
|
4410
|
+
labelStep: r.labelStep
|
|
4411
|
+
} || o,
|
|
4412
|
+
graph: s && {
|
|
4413
|
+
...a,
|
|
4414
|
+
height: a.width
|
|
4415
|
+
} || a
|
|
4416
|
+
};
|
|
4417
|
+
};
|
|
4418
|
+
constructor() {
|
|
4419
|
+
super(), this._root = null, this._model = t.createDefaultModel(), this._configuration = Ea.configuration;
|
|
4420
|
+
}
|
|
4421
|
+
set model(n) {
|
|
4422
|
+
this._model = t.createDefaultModel(n), this._modelCopy = e(this._model), this._render();
|
|
4423
|
+
}
|
|
4424
|
+
resetModelAfterConfigurationIsSet = () => {
|
|
4425
|
+
let e = document.querySelectorAll("pie-author");
|
|
4426
|
+
this.hasPlayerAsParent = Array.from(e).some((e) => e.contains(this)), this.hasPlayerAsParent && (this._modelCopy ? this._model = this._modelCopy : delete this._modelCopy);
|
|
4427
|
+
};
|
|
4428
|
+
set configuration(e) {
|
|
4429
|
+
this._configuration = {
|
|
4430
|
+
...Ea.configuration,
|
|
4431
|
+
...e
|
|
4432
|
+
}, this.resetModelAfterConfigurationIsSet(), e.language?.enabled ? e.languageChoices?.options?.length && (this._model.language = e.languageChoices.options[0].value) : e.language.settings ? this._model.language && (this._configuration.language.enabled = !0) : delete this._model.language, this._render();
|
|
4433
|
+
}
|
|
4434
|
+
onModelChanged = (e) => {
|
|
4435
|
+
this._model = e, this._render(), Da("[onModelChanged]: ", this._model), this.dispatchEvent(new ba(this._model));
|
|
4436
|
+
};
|
|
4437
|
+
onConfigurationChanged = (e) => {
|
|
4438
|
+
this._configuration = e, this._render();
|
|
4439
|
+
};
|
|
4440
|
+
insertImage = (e) => {
|
|
4441
|
+
this.dispatchEvent(new Sa(e));
|
|
4442
|
+
};
|
|
4443
|
+
onDeleteImage = (e, t) => {
|
|
4444
|
+
this.dispatchEvent(new xa(e, t));
|
|
4445
|
+
};
|
|
4446
|
+
insertSound(e) {
|
|
4447
|
+
this.dispatchEvent(new wa(e));
|
|
4448
|
+
}
|
|
4449
|
+
onDeleteSound(e, t) {
|
|
4450
|
+
this.dispatchEvent(new Ca(e, t));
|
|
4451
|
+
}
|
|
4452
|
+
_render() {
|
|
4453
|
+
if (this._model) {
|
|
4454
|
+
let e = K.createElement(ya, {
|
|
4455
|
+
onModelChanged: this.onModelChanged,
|
|
4456
|
+
onConfigurationChanged: this.onConfigurationChanged,
|
|
4457
|
+
model: this._model,
|
|
4458
|
+
configuration: this._configuration,
|
|
4459
|
+
imageSupport: {
|
|
4460
|
+
add: this.insertImage,
|
|
4461
|
+
delete: this.onDeleteImage
|
|
4462
|
+
},
|
|
4463
|
+
uploadSoundSupport: {
|
|
4464
|
+
add: this.insertSound.bind(this),
|
|
4465
|
+
delete: this.onDeleteSound.bind(this)
|
|
4466
|
+
}
|
|
4467
|
+
});
|
|
4468
|
+
this._root ||= De(this), this._root.render(e), queueMicrotask(() => {
|
|
4469
|
+
L(this);
|
|
4470
|
+
});
|
|
4471
|
+
}
|
|
4472
|
+
}
|
|
4473
|
+
disconnectedCallback() {
|
|
4474
|
+
this._root && this._root.unmount();
|
|
4475
|
+
}
|
|
4476
|
+
};
|
|
4477
|
+
//#endregion
|
|
4478
|
+
export { ka as default };
|
|
4479
|
+
|
|
4480
|
+
//# sourceMappingURL=index.js.map
|