@sheetxl/utils-mui 0.7.13 → 0.7.14
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/browser/cjs/{DNyaE39SbtmF-UDK.cjs → DTu7X4NVQR5Imqxw.cjs} +2 -2
- package/browser/cjs/{DBKNbW_UZGIFdc_s.cjs → DlwQQFN_mRiIrttG.cjs} +6 -6
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{BfOux96gs0sl6o1o.mjs → BEjEVDP4wDSgmkji.mjs} +2 -2
- package/browser/esm/{B2ZgR_6AzHI4l5DU.mjs → BQAx8mHWow5_y9KO.mjs} +562 -554
- package/browser/esm/index.mjs +2 -2
- package/node/esm/index.mjs +165 -157
- package/node/esm/{B8AkLqu0SQMq831k.mjs → mzf6ST9951mHAaux.mjs} +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import q, { memo as ie, forwardRef as de, version as To, useLayoutEffect as Cr, useEffect as De, useState as re, useMemo as
|
|
1
|
+
import q, { memo as ie, forwardRef as de, version as To, useLayoutEffect as Cr, useEffect as De, useState as re, useMemo as Z, useRef as ge, useImperativeHandle as Po, useCallback as _e, createContext as Ro, Suspense as No, Fragment as Fo, useContext as _o, useReducer as Ao } from "react";
|
|
2
2
|
import { jsx as k, jsxs as J, Fragment as Je } from "react/jsx-runtime";
|
|
3
3
|
import { alpha as me, darken as Io, lighten as Vo } from "@mui/system";
|
|
4
4
|
import { IconButton as Ze, Divider as Er, Box as X, Typography as Me, Paper as Et, Chip as Lo, Popper as Bo, Grow as jo, Tooltip as $o, ListItemIcon as zo, MenuItem as Mr, Fade as Wo, Backdrop as Ho, DialogTitle as Uo, Button as Yo, DialogContent as Go, DialogActions as Xo, Input as Ko, Toolbar as qo } from "@mui/material";
|
|
@@ -8,7 +8,7 @@ import { useTheme as dn, styled as ei, createTheme as On, useThemeProps as ti }
|
|
|
8
8
|
import { deepmerge as Pr } from "@mui/utils";
|
|
9
9
|
import Rr, { createPortal as ni } from "react-dom";
|
|
10
10
|
/**
|
|
11
|
-
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.
|
|
11
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.14
|
|
12
12
|
*
|
|
13
13
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
14
14
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -83,11 +83,11 @@ function Ir(e) {
|
|
|
83
83
|
}
|
|
84
84
|
var Vr = _r ? Cr : De, Cn = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
|
|
85
85
|
const En = _r && window.ResizeObserver !== void 0 ? function() {
|
|
86
|
-
var e = re(null), r = e[0], n = e[1], t = re(Cn), s = t[0], a = t[1], o =
|
|
86
|
+
var e = re(null), r = e[0], n = e[1], t = re(Cn), s = t[0], a = t[1], o = Z(function() {
|
|
87
87
|
return new window.ResizeObserver(function(l) {
|
|
88
88
|
if (l[0]) {
|
|
89
|
-
var i = l[0].contentRect, c = i.x, p = i.y,
|
|
90
|
-
a({ x: c, y: p, width:
|
|
89
|
+
var i = l[0].contentRect, c = i.x, p = i.y, x = i.width, m = i.height, b = i.top, v = i.left, h = i.bottom, f = i.right;
|
|
90
|
+
a({ x: c, y: p, width: x, height: m, top: b, left: v, bottom: h, right: f });
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
}, []);
|
|
@@ -117,19 +117,19 @@ const En = _r && window.ResizeObserver !== void 0 ? function() {
|
|
|
117
117
|
const { sx: r, speed: n = 1, size: t = 13, width: s = 64, height: a = 17, ...o } = e;
|
|
118
118
|
return J(X, { sx: { width: `${s}px`, height: `${a}px`, "& .primary": { backgroundColor: (l) => l.palette.grey[600], top: `${(a - t) / 2}px`, width: () => `${t}px`, height: () => `${t}px` }, ...r }, className: Oe(ii, "animated-icon"), ...o, children: [k("div", { className: "primary" }), k("div", { className: "primary" }), k("div", { className: "primary" }), k("div", { className: "primary" })] });
|
|
119
119
|
}), si = k(ai, {}), li = ie(de((e, r) => {
|
|
120
|
-
const { sx: n, style: t, onMount: s, onUnmount: a, transitionDelay: o = "1200ms", panel: l = !1, transparentBackground: i = !0, icon: c = si, label: p, ...
|
|
121
|
-
let
|
|
122
|
-
return l === !0 && (
|
|
120
|
+
const { sx: n, style: t, onMount: s, onUnmount: a, transitionDelay: o = "1200ms", panel: l = !1, transparentBackground: i = !0, icon: c = si, label: p, ...x } = e, m = Z(() => typeof p == "string" ? k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: p }) : p, [p]), b = ge(null), v = Z(() => {
|
|
121
|
+
let y = J(X, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [m, c] });
|
|
122
|
+
return l === !0 && (y = k(Et, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", alignSelf: "center", marginBottom: "5%", backgroundColor: (u) => u.palette.info.light, color: (u) => u.palette.info.contrastText, paddingLeft: (u) => u.spacing(2), paddingRight: (u) => u.spacing(2), paddingTop: (u) => u.spacing(2), paddingBottom: (u) => u.spacing(1), rowGap: (u) => u.spacing(1), borderRadius: (u) => `${u.shape.borderRadius}px`, boxShadow: (u) => u.shadows[2], "& .primary": { background: (u) => `${me(u.palette.info.contrastText, 0.9)} !important`, boxShadow: (u) => `0 0 0 1px ${u.palette.mode === "dark" ? u.palette.text.secondary : u.palette.divider}`, boxSizing: "content-box", border: "solid transparent" }, zIndex: 1 }, children: y })), k(X, { ref: At([b, r]), className: "animatable", sx: { cursor: "wait", boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "column", willChange: "opacity", opacity: i ? 1e-3 : 1, transitionProperty: "opacity", transitionDelay: o, transitionDuration: "320ms", transitionTimingFunction: "ease-in", overflow: "hidden", outline: "none", width: "100%", height: "100%", minWidth: 0, minHeight: 0, zIndex: 99999, "&.animating": { opacity: 1 }, "&.animating-exit": { opacity: 0, transition: "opacity 210ms" }, ...n, ...t }, ...x, children: J(X, { className: "center", sx: { display: "flex", flex: "1 1 100%", height: "100%", width: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [k(X, { className: "backdrop", sx: { opacity: (u) => i ? 1.5 * u.palette.action.disabledOpacity : void 0, background: (u) => i ? void 0 : u.palette.background.paper, backdropFilter: "blur(4px)", borderRadius: (u) => `${u.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), y] }) });
|
|
123
123
|
}, [n, l]), h = ge(!1), f = ge(!1);
|
|
124
124
|
return Vr(() => {
|
|
125
125
|
if (b.current && !h.current && !f.current) {
|
|
126
126
|
if (f.current = !0, b.current.classList.contains("animatable") && !b.current.classList.contains("animating")) {
|
|
127
|
-
let
|
|
127
|
+
let y = !1;
|
|
128
128
|
const u = () => {
|
|
129
|
-
f.current && (h.current = !0, f.current = !1,
|
|
129
|
+
f.current && (h.current = !0, f.current = !1, y = !0, s?.());
|
|
130
130
|
};
|
|
131
131
|
b.current && b.current.addEventListener("transitionrun", u, { once: !0, capture: !0, passive: !0 }), f.current && b.current && (window.getComputedStyle(b.current, null).opacity, b.current.classList.add("animating")), setTimeout(() => {
|
|
132
|
-
!
|
|
132
|
+
!y && f.current && b.current && (b.current?.removeEventListener("transitionrun", u), u());
|
|
133
133
|
}, 100);
|
|
134
134
|
} else h.current = !0, f.current = !1, s?.();
|
|
135
135
|
return () => {
|
|
@@ -152,30 +152,30 @@ const ci = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, u
|
|
|
152
152
|
if (!e?.stack) return null;
|
|
153
153
|
const a = Qo.collectErrorChain(e).reverse(), o = [];
|
|
154
154
|
a.forEach(({ error: c }, p) => {
|
|
155
|
-
const
|
|
156
|
-
`).filter(Boolean).map((
|
|
157
|
-
let b =
|
|
155
|
+
const x = (c.stack || "").split(`
|
|
156
|
+
`).filter(Boolean).map((m) => {
|
|
157
|
+
let b = m.match(ci);
|
|
158
158
|
if (b) {
|
|
159
|
-
const [, v = "", h, f,
|
|
160
|
-
return { line: `at ${v ? v + " " : ""}${h}`, location: `${Mn(f).split(/[\\/]/).pop()}:${
|
|
159
|
+
const [, v = "", h, f, y, u] = b;
|
|
160
|
+
return { line: `at ${v ? v + " " : ""}${h}`, location: `${Mn(f).split(/[\\/]/).pop()}:${y}:${u}` };
|
|
161
161
|
}
|
|
162
|
-
if (b =
|
|
163
|
-
const [, v = "", h, f,
|
|
164
|
-
return { line: `at ${v ? v + " " : ""}${
|
|
162
|
+
if (b = m.match(ui), b) {
|
|
163
|
+
const [, v = "", h, f, y] = b, u = Mn(h), w = `${u.split(/[\\/]/).pop()}:${f}:${y}`;
|
|
164
|
+
return { line: `at ${v ? v + " " : ""}${w}`, location: u !== w ? `${u}:${f}:${y}` : void 0 };
|
|
165
165
|
}
|
|
166
|
-
return { line:
|
|
166
|
+
return { line: m.trim() };
|
|
167
167
|
});
|
|
168
|
-
|
|
168
|
+
x.length && (o.push({ line: p ? `Caused by: ${x[0].line}` : x[0].line, isBoundary: !0 }), o.push(...x.slice(1)));
|
|
169
169
|
});
|
|
170
170
|
const l = r ? o.slice(0, r) : o, i = r && o.length > r;
|
|
171
171
|
return J(X, { sx: { width: "100%", mt: 1 }, children: [J(X, { sx: { display: "flex", alignItems: "center", gap: 1, borderRadius: 1, px: 1, py: 0.5 }, children: [J(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", opacity: 0.8 }, children: ["Stack Trace(", a.length > 1 ? ` (${a.length} frames)` : "", ")"] }), k(X, { sx: { flex: 1 } }), t && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.8 }, children: t }), k(Ze, { size: "small", onClick: async () => {
|
|
172
172
|
try {
|
|
173
173
|
let c = 0;
|
|
174
|
-
const p = o.map((
|
|
175
|
-
if (
|
|
174
|
+
const p = o.map((x) => {
|
|
175
|
+
if (x.isBoundary) return c = 0, x.line;
|
|
176
176
|
c++;
|
|
177
|
-
let
|
|
178
|
-
return c >= 1 && (
|
|
177
|
+
let m = x.location && x.line !== x.location ? `${x.line} (${x.location})` : x.line;
|
|
178
|
+
return c >= 1 && (m = ` ${m}`), m;
|
|
179
179
|
}).join(`
|
|
180
180
|
`);
|
|
181
181
|
await navigator.clipboard.writeText(p), s("Copied!"), setTimeout(() => s(null), 2e3);
|
|
@@ -184,7 +184,7 @@ const ci = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, u
|
|
|
184
184
|
}
|
|
185
185
|
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Copy stack trace", children: k(be, { iconKey: "ContentCopy", style: { fontSize: "0.875rem" } }) }), k(Ze, { size: "small", onClick: () => {
|
|
186
186
|
s("Logged!"), setTimeout(() => s(null), 2e3), console.log(e);
|
|
187
|
-
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: k(be, { iconKey: "BugReport", style: { fontSize: "0.875rem" } }) })] }), J(X, { sx: { mt: 1, backgroundColor: "rgba(0, 0, 0, 0.2)", borderRadius: 1, p: 1, maxHeight: "300px", overflow: "auto", fontFamily: "monospace", fontSize: "0.75rem", lineHeight: 1.4 }, children: [l.map((c, p) => c.isBoundary ? k(X, { sx: { py: 1, mt: p > 0 ? 1 : 0, mb: 0.5, borderTop: p > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none" }, children: k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", fontWeight: "bold", color: (
|
|
187
|
+
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: k(be, { iconKey: "BugReport", style: { fontSize: "0.875rem" } }) })] }), J(X, { sx: { mt: 1, backgroundColor: "rgba(0, 0, 0, 0.2)", borderRadius: 1, p: 1, maxHeight: "300px", overflow: "auto", fontFamily: "monospace", fontSize: "0.75rem", lineHeight: 1.4 }, children: [l.map((c, p) => c.isBoundary ? k(X, { sx: { py: 1, mt: p > 0 ? 1 : 0, mb: 0.5, borderTop: p > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none" }, children: k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", fontWeight: "bold", color: (x) => c.isBoundary ? x.palette.text.primary : x.palette.text.secondary, display: "block" }, children: c.line }) }, `error-${p}`) : J(X, { sx: { display: "flex", alignItems: "flex-start", gap: 1, py: 0.25, pl: 1, "&:hover": { backgroundColor: "rgba(255, 255, 255, 0.05)" } }, children: [!n && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.5, minWidth: "20px", textAlign: "right", userSelect: "none" }, children: p + 1 }), J(X, { sx: { flex: 1, overflow: "hidden" }, children: [k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", color: "inherit" }, children: c.line }), c.location && c.line !== c.location && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic" }, children: c.location })] })] }, `stack-${p}`)), i && J(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic", textAlign: "center", display: "block", mt: 1 }, children: ["... and ", o.length - r, " more frames"] })] })] });
|
|
188
188
|
});
|
|
189
189
|
Lr.displayName = "StackTrace";
|
|
190
190
|
const di = (e, r = !1, n = !1) => {
|
|
@@ -193,8 +193,8 @@ const di = (e, r = !1, n = !1) => {
|
|
|
193
193
|
const t = e === "string" ? e : `Unknown Error: ${String(e)}`;
|
|
194
194
|
return k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: t });
|
|
195
195
|
}, pi = ie(de((e, r) => {
|
|
196
|
-
const { sx: n, icon: t = k(be, { iconKey: "Error", style: { fontSize: 48 } }), error: s, hideStackTrace: a = !1, stackTraceExpanded: o = !1, ...l } = e, i =
|
|
197
|
-
return
|
|
196
|
+
const { sx: n, icon: t = k(be, { iconKey: "Error", style: { fontSize: 48 } }), error: s, hideStackTrace: a = !1, stackTraceExpanded: o = !1, ...l } = e, i = Z(() => di(s, a, o), [s, a, o]);
|
|
197
|
+
return Z(() => k(X, { ref: r, sx: { boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "row", overflow: "hidden", width: "100%", height: "100%", ...n }, ...l, children: J(X, { sx: { display: "flex", flex: "1 1 100%", height: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [k(X, { className: "backdrop", sx: { backdropFilter: "blur(4px)", borderRadius: (c) => `${c.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), k(Et, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", rowGap: "8px", alignSelf: "center", marginBottom: "5%", backgroundColor: (c) => c.palette.error.light, color: (c) => c.palette.error.contrastText, paddingLeft: (c) => c.spacing(2), paddingRight: (c) => c.spacing(2), paddingTop: (c) => c.spacing(2), paddingBottom: (c) => c.spacing(2), borderRadius: (c) => `${c.shape.borderRadius}px`, boxShadow: (c) => c.shadows[2], "& .primary": { background: (c) => `${c.palette.error.contrastText} !important`, border: "solid transparent" }, zIndex: 1 }, children: k(X, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: (c) => c.spacing(2), width: "100%", maxWidth: "600px" }, children: J(X, { sx: { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: (c) => c.spacing(2) }, children: [t, i] }) }) })] }) }), [n]);
|
|
198
198
|
}));
|
|
199
199
|
pi.displayName = "ErrorPanel";
|
|
200
200
|
const Br = ie(de((e, r) => {
|
|
@@ -205,8 +205,8 @@ const Br = ie(de((e, r) => {
|
|
|
205
205
|
const l = [], i = o.length;
|
|
206
206
|
for (let c = 0; c < i; c++) {
|
|
207
207
|
const p = o[c];
|
|
208
|
-
let
|
|
209
|
-
typeof p == "string" ?
|
|
208
|
+
let x = null;
|
|
209
|
+
typeof p == "string" ? x = k(Lo, { label: p, color: "primary", size: "small", sx: { scale: "0.8" } }, "chip-" + c) : q.cloneElement(p, { key: "chip-" + c }), l.push(x);
|
|
210
210
|
}
|
|
211
211
|
return l;
|
|
212
212
|
}, [n]);
|
|
@@ -247,8 +247,8 @@ function fn(e, r, n) {
|
|
|
247
247
|
r === void 0 && (r = !1), n === void 0 && (n = !1);
|
|
248
248
|
var t = e.getBoundingClientRect(), s = 1, a = 1;
|
|
249
249
|
r && ct(e) && (s = e.offsetWidth > 0 && Pn(t.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && Pn(t.height) / e.offsetHeight || 1);
|
|
250
|
-
var o = (lt(e) ? We(e) : window).visualViewport, l = !zr() && n, i = (t.left + (l && o ? o.offsetLeft : 0)) / s, c = (t.top + (l && o ? o.offsetTop : 0)) / a, p = t.width / s,
|
|
251
|
-
return { width: p, height:
|
|
250
|
+
var o = (lt(e) ? We(e) : window).visualViewport, l = !zr() && n, i = (t.left + (l && o ? o.offsetLeft : 0)) / s, c = (t.top + (l && o ? o.offsetTop : 0)) / a, p = t.width / s, x = t.height / a;
|
|
251
|
+
return { width: p, height: x, top: c, right: i + p, bottom: c + x, left: i, x: i, y: c };
|
|
252
252
|
}
|
|
253
253
|
function Qe(e) {
|
|
254
254
|
return We(e).getComputedStyle(e);
|
|
@@ -304,19 +304,19 @@ function nn(e) {
|
|
|
304
304
|
}
|
|
305
305
|
function Fn(e, r, n) {
|
|
306
306
|
return r === $r ? nn((function(t, s) {
|
|
307
|
-
var a = We(t), o = st(t), l = a.visualViewport, i = o.clientWidth, c = o.clientHeight, p = 0,
|
|
307
|
+
var a = We(t), o = st(t), l = a.visualViewport, i = o.clientWidth, c = o.clientHeight, p = 0, x = 0;
|
|
308
308
|
if (l) {
|
|
309
309
|
i = l.width, c = l.height;
|
|
310
|
-
var
|
|
311
|
-
(
|
|
310
|
+
var m = zr();
|
|
311
|
+
(m || !m && s === "fixed") && (p = l.offsetLeft, x = l.offsetTop);
|
|
312
312
|
}
|
|
313
|
-
return { width: i, height: c, x: p + Nn(t), y:
|
|
313
|
+
return { width: i, height: c, x: p + Nn(t), y: x };
|
|
314
314
|
})(e, n)) : lt(r) ? (function(t, s) {
|
|
315
315
|
var a = fn(t, !1, s === "fixed");
|
|
316
316
|
return a.top = a.top + t.clientTop, a.left = a.left + t.clientLeft, a.bottom = a.top + t.clientHeight, a.right = a.left + t.clientWidth, a.width = t.clientWidth, a.height = t.clientHeight, a.x = a.left, a.y = a.top, a;
|
|
317
317
|
})(r, n) : nn((function(t) {
|
|
318
|
-
var s, a = st(t), o = Wr(t), l = (s = t.ownerDocument) == null ? void 0 : s.body, i = wt(a.scrollWidth, a.clientWidth, l ? l.scrollWidth : 0, l ? l.clientWidth : 0), c = wt(a.scrollHeight, a.clientHeight, l ? l.scrollHeight : 0, l ? l.clientHeight : 0), p = -o.scrollLeft + Nn(t),
|
|
319
|
-
return Qe(l || a).direction === "rtl" && (p += wt(a.clientWidth, l ? l.clientWidth : 0) - i), { width: i, height: c, x: p, y:
|
|
318
|
+
var s, a = st(t), o = Wr(t), l = (s = t.ownerDocument) == null ? void 0 : s.body, i = wt(a.scrollWidth, a.clientWidth, l ? l.scrollWidth : 0, l ? l.clientWidth : 0), c = wt(a.scrollHeight, a.clientHeight, l ? l.scrollHeight : 0, l ? l.clientHeight : 0), p = -o.scrollLeft + Nn(t), x = -o.scrollTop;
|
|
319
|
+
return Qe(l || a).direction === "rtl" && (p += wt(a.clientWidth, l ? l.clientWidth : 0) - i), { width: i, height: c, x: p, y: x };
|
|
320
320
|
})(st(e)));
|
|
321
321
|
}
|
|
322
322
|
function gi(e) {
|
|
@@ -338,22 +338,22 @@ function gi(e) {
|
|
|
338
338
|
}
|
|
339
339
|
function yi(e, r) {
|
|
340
340
|
r === void 0 && (r = {});
|
|
341
|
-
var n, t = r, s = t.placement, a = s === void 0 ? e.placement : s, o = t.strategy, l = o === void 0 ? e.strategy : o, i = t.boundary, c = i === void 0 ? "clippingParents" : i, p = t.rootBoundary,
|
|
341
|
+
var n, t = r, s = t.placement, a = s === void 0 ? e.placement : s, o = t.strategy, l = o === void 0 ? e.strategy : o, i = t.boundary, c = i === void 0 ? "clippingParents" : i, p = t.rootBoundary, x = p === void 0 ? $r : p, m = t.elementContext, b = m === void 0 ? ht : m, v = t.altBoundary, h = v !== void 0 && v, f = t.padding, y = f === void 0 ? 0 : f, u = (function(A) {
|
|
342
342
|
return Object.assign({}, { top: 0, right: 0, bottom: 0, left: 0 }, A);
|
|
343
|
-
})(typeof
|
|
343
|
+
})(typeof y != "number" ? y : (n = y, fi.reduce(function(A, V) {
|
|
344
344
|
return A[V] = n, A;
|
|
345
|
-
}, {}))),
|
|
346
|
-
var
|
|
345
|
+
}, {}))), w = b === ht ? "reference" : ht, E = e.rects.popper, T = e.elements[h ? w : b], L = (function(A, V, B, z) {
|
|
346
|
+
var ee = V === "clippingParents" ? gi(A) : [].concat(V), G = [].concat(ee, [B]), Q = G[0], oe = G.reduce(function(se, te) {
|
|
347
347
|
var le = Fn(A, te, z);
|
|
348
348
|
return se.top = wt(le.top, se.top), se.right = Tn(le.right, se.right), se.bottom = Tn(le.bottom, se.bottom), se.left = wt(le.left, se.left), se;
|
|
349
349
|
}, Fn(A, Q, z));
|
|
350
350
|
return oe.width = oe.right - oe.left, oe.height = oe.bottom - oe.top, oe.x = oe.left, oe.y = oe.top, oe;
|
|
351
|
-
})(lt(T) ? T : T.contextElement || st(e.elements.popper), c,
|
|
352
|
-
var V, B = A.reference, z = A.element,
|
|
351
|
+
})(lt(T) ? T : T.contextElement || st(e.elements.popper), c, x, l), O = fn(e.elements.reference), P = (function(A) {
|
|
352
|
+
var V, B = A.reference, z = A.element, ee = A.placement, G = ee ? (function(ce) {
|
|
353
353
|
return ce.split("-")[0];
|
|
354
|
-
})(
|
|
354
|
+
})(ee) : null, Q = ee ? (function(ce) {
|
|
355
355
|
return ce.split("-")[1];
|
|
356
|
-
})(
|
|
356
|
+
})(ee) : null, oe = B.x + B.width / 2 - z.width / 2, se = B.y + B.height / 2 - z.height / 2;
|
|
357
357
|
switch (G) {
|
|
358
358
|
case Zt:
|
|
359
359
|
V = { x: oe, y: B.y - z.height };
|
|
@@ -396,31 +396,31 @@ function yi(e, r) {
|
|
|
396
396
|
}
|
|
397
397
|
const bi = { name: "maxSize", enabled: !0, phase: "main", requiresIfExists: ["offset", "preventOverflow", "flip"], fn: function(e) {
|
|
398
398
|
var r = e.state, n = e.name, t = yi(r, e.options), s = r.modifiersData.preventOverflow || { x: 0, y: 0 }, a = s.x, o = s.y;
|
|
399
|
-
let l = r.rects.popper, i = l.width, c = l.height, p = r.placement.split("-")[0],
|
|
400
|
-
r.modifiersData[n] = { width: i - t[
|
|
399
|
+
let l = r.rects.popper, i = l.width, c = l.height, p = r.placement.split("-")[0], x = p === "left" ? "left" : "right", m = p === "top" ? "top" : "bottom";
|
|
400
|
+
r.modifiersData[n] = { width: i - t[x] - a, height: c - t[m] - o };
|
|
401
401
|
} }, vi = [0, 2], Gr = ie(de((e, r) => {
|
|
402
|
-
const { sx: n, open: t, children: s, label: a, offsets: o = vi, anchorEl: l, anchorPosition: i, onMount: c, onOpening: p, onOpen:
|
|
402
|
+
const { sx: n, open: t, children: s, label: a, offsets: o = vi, anchorEl: l, anchorPosition: i, onMount: c, onOpening: p, onOpen: x, onClosing: m, onClose: b, resizeOnOverflow: v = !0, ...h } = e;
|
|
403
403
|
if (Array.isArray(s)) throw new Error("children can not be an array");
|
|
404
|
-
const f = dn(),
|
|
404
|
+
const f = dn(), y = { name: "applyMaxSize", enabled: !0, phase: "beforeWrite", requires: ["maxSize"], fn({ state: G }) {
|
|
405
405
|
const { height: Q } = G.modifiersData.maxSize;
|
|
406
406
|
G.styles.popper.maxHeight = Q - 10 + "px";
|
|
407
|
-
} }, u =
|
|
407
|
+
} }, u = Z(() => {
|
|
408
408
|
const G = [{ name: "offset", options: { offset: o } }, { name: "flip", enabled: !0, options: { rootBoundary: "document" } }];
|
|
409
|
-
return v && G.unshift(bi,
|
|
410
|
-
}, [v, o]), [
|
|
409
|
+
return v && G.unshift(bi, y), G;
|
|
410
|
+
}, [v, o]), [w, E] = re(!1), T = q.useRef(null), L = ae(() => {
|
|
411
411
|
c?.(F.current, T.current);
|
|
412
|
-
}, [p]), O = ae(p, [p]), P = ae(
|
|
412
|
+
}, [p]), O = ae(p, [p]), P = ae(x, [x]), D = ae(m, [m]), S = ae(() => {
|
|
413
413
|
E(!1), b?.();
|
|
414
|
-
}, [b]), [_, M] = re(!1), F = q.useRef(null), A = q.useRef(!0), V =
|
|
414
|
+
}, [b]), [_, M] = re(!1), F = q.useRef(null), A = q.useRef(!0), V = Z(() => ({ onFirstUpdate: () => {
|
|
415
415
|
A.current && (M(!0), L?.(), A.current = !1);
|
|
416
|
-
} }), [t,
|
|
416
|
+
} }), [t, w]);
|
|
417
417
|
De(() => {
|
|
418
|
-
t && _ ? O?.() : !t &&
|
|
418
|
+
t && _ ? O?.() : !t && w && D?.(), t && E(t);
|
|
419
419
|
}, [t, _]);
|
|
420
|
-
const B =
|
|
420
|
+
const B = Z(() => ({ getBoundingClientRect: () => i ? new DOMRect(i?.left || 0, i?.top || 0, 0, 0) : l.getBoundingClientRect() }), [i, l]);
|
|
421
421
|
Po(r, () => ({ instance: () => T.current, element: () => F.current }), []);
|
|
422
|
-
const { getPortalContainer: z } = ln(),
|
|
423
|
-
return k(Bo, { ref: F, popperRef: T, container: z, anchorEl: B, open:
|
|
422
|
+
const { getPortalContainer: z } = ln(), ee = Z(() => ({ zIndex: t ? "1300" : "1299", display: "flex", pointerEvents: w && t ? void 0 : "none", maxWidth: "100%", maxHeight: "100%", ...n }), [n, t, w]);
|
|
423
|
+
return k(Bo, { ref: F, popperRef: T, container: z, anchorEl: B, open: w, role: void 0, popperOptions: V, transition: !0, sx: ee, placement: "bottom-start", modifiers: u, ...h, children: ({ TransitionProps: G, placement: Q, ...oe }) => {
|
|
424
424
|
const { in: se, onEnter: te, onExited: le, ...ce } = G ?? {};
|
|
425
425
|
return k(jo, { ...ce, in: t, onEnter: () => {
|
|
426
426
|
te?.(), P();
|
|
@@ -514,13 +514,13 @@ const bs = { Popup: "popup", Anchor: "anchor" }, vs = { ByPopup: "popupDone", Ca
|
|
|
514
514
|
let t;
|
|
515
515
|
return n && (t = (t ? t + " " : "") + "rotate(180deg)"), k(Xr, { style: { marginLeft: e ? void 0 : r ? "-0.25rem" : "-3px", marginRight: e ? void 0 : r ? "-0.25rem" : "-6px", transform: t }, color: "inherit" });
|
|
516
516
|
}, qr = ie(de((e, r) => {
|
|
517
|
-
const { open: n, anchorEl: t, anchorPosition: s, label: a, floatReference: o, createPopupPanel: l = hn, popperProps: i, onMount: c, onClosing: p, onClose:
|
|
517
|
+
const { open: n, anchorEl: t, anchorPosition: s, label: a, floatReference: o, createPopupPanel: l = hn, popperProps: i, onMount: c, onClosing: p, onClose: x, onOpening: m, onOpen: b, children: v, sx: h, ...f } = e, y = ae(p, [p]), u = ae(x, [x]), w = ae(m, [m]), E = ae(b, [b]), [T, L] = re(), O = ge(null), P = ae((S, _) => {
|
|
518
518
|
L(S), c?.(O.current, _);
|
|
519
|
-
}, [c]), D =
|
|
519
|
+
}, [c]), D = Z(() => {
|
|
520
520
|
const S = { popupContainer: T, floatReference: o, children: v, ...f }, _ = l(S);
|
|
521
521
|
return k(Et, { elevation: 8, ref: O, sx: { display: "flex", overflow: "auto", outline: "none", "&.MuiPaper-root": (M) => Kr(M) }, tabIndex: 0, children: _ });
|
|
522
522
|
}, [l, v, T, o]);
|
|
523
|
-
return k(Gr, { ref: r, anchorEl: t, anchorPosition: s, label: a, open: n, onMount: P, onOpening:
|
|
523
|
+
return k(Gr, { ref: r, anchorEl: t, anchorPosition: s, label: a, open: n, onMount: P, onOpening: w, onOpen: E, onClosing: y, onClose: u, ...i, children: D });
|
|
524
524
|
}));
|
|
525
525
|
qr.displayName = "ExhibitFloatPanel";
|
|
526
526
|
const Ge = /* @__PURE__ */ new Map();
|
|
@@ -538,102 +538,102 @@ const Kt = (e = null, r, n, t) => (ze && (ze.fn.clear(), ze = null), e === 0 ? r
|
|
|
538
538
|
const r = /* @__PURE__ */ new Set();
|
|
539
539
|
return Qr(r, e), r;
|
|
540
540
|
}, zt = (e) => {
|
|
541
|
-
const { anchor: r, label: n = null, parentFloat: t = null, onOpen: s, onClose: a, popperProps: o, createPopupPanel: l = hn } = e ?? {}, i = ae(s, [s]), c = ae(a, [a]), [p,
|
|
541
|
+
const { anchor: r, label: n = null, parentFloat: t = null, onOpen: s, onClose: a, popperProps: o, createPopupPanel: l = hn } = e ?? {}, i = ae(s, [s]), c = ae(a, [a]), [p, x] = re(null), [m, b] = re(!1), [v, h] = re(!1), f = Z(() => t === null ? (Xt === null && (Xt = { key: { label: "root" }, isRoot: !0, parent: null, open: () => null, close: (g) => null, closeChild: (g) => null, onChildVisible: () => {
|
|
542
542
|
}, onChildHidden: () => {
|
|
543
|
-
}, closeAll: () => B(0), floatElement: () => null, anchorElement: () => null }), Xt) : t, []),
|
|
543
|
+
}, closeAll: () => B(0), floatElement: () => null, anchorElement: () => null }), Xt) : t, []), y = Z(() => ({ label: n }), []), u = q.useRef(null), w = q.useRef(r);
|
|
544
544
|
De(() => {
|
|
545
|
-
|
|
545
|
+
w.current = r;
|
|
546
546
|
}, [r]);
|
|
547
|
-
const E = (
|
|
548
|
-
const C = Ge.get(
|
|
547
|
+
const E = (g) => {
|
|
548
|
+
const C = Ge.get(g);
|
|
549
549
|
let N = null;
|
|
550
550
|
return C && (N = Xe.get(C)?.close(0)), N;
|
|
551
551
|
}, T = () => E(G.key), [L, O] = re(), P = () => {
|
|
552
552
|
if (!p) return void M();
|
|
553
|
-
const
|
|
553
|
+
const g = new Promise((C, N) => {
|
|
554
554
|
O((I) => ({ resolve: C, reject: N }));
|
|
555
555
|
});
|
|
556
|
-
return T(), Ge.delete(f.key),
|
|
556
|
+
return T(), Ge.delete(f.key), x(!1), g;
|
|
557
557
|
};
|
|
558
558
|
De(() => {
|
|
559
559
|
L && (L.resolve(), O(null));
|
|
560
|
-
}, [
|
|
560
|
+
}, [m, v, L]);
|
|
561
561
|
const D = _e(() => {
|
|
562
|
-
let
|
|
563
|
-
for (;
|
|
564
|
-
return E(
|
|
562
|
+
let g = f;
|
|
563
|
+
for (; g.parent; ) g = g.parent;
|
|
564
|
+
return E(g.key);
|
|
565
565
|
}, []), S = () => {
|
|
566
566
|
if (p) return void M();
|
|
567
567
|
f && Xe.get(f.key)?.open(0);
|
|
568
|
-
const
|
|
569
|
-
|
|
570
|
-
Ge.set(f.key, G.key),
|
|
568
|
+
const g = Ge.get(f.key);
|
|
569
|
+
g && g !== y && Xe.get(g)?.close(0), requestAnimationFrame(() => {
|
|
570
|
+
Ge.set(f.key, G.key), x(!0);
|
|
571
571
|
});
|
|
572
|
-
}, [_, M] = q.useReducer((
|
|
572
|
+
}, [_, M] = q.useReducer((g) => g + 1, 0), F = _e((g) => l === null ? null : l({ closeFloat: B, closeFloatAll: ee, ...g }), [l]), A = l === null, V = ae((g = 120) => Kt(g, S, /* @__PURE__ */ new Set([G]), !1)(), [S]), B = ae((g = 60) => Kt(g, P, Ln(G), !0)(), [P]), z = ae((g = 360) => Kt(g, T, Ln(((C) => {
|
|
573
573
|
const N = Ge.get(C.key);
|
|
574
574
|
return N && Xe.get(N) || null;
|
|
575
|
-
})(G)), !0)(), [T]),
|
|
575
|
+
})(G)), !0)(), [T]), ee = ae(D, [D]), G = Z(() => ({ key: y, isRoot: !1, label: n, parent: f, onChildVisible: () => {
|
|
576
576
|
h(!0);
|
|
577
577
|
}, onChildHidden: () => {
|
|
578
578
|
h(!1);
|
|
579
|
-
}, open: V, close: B, closeChild: z, closeAll:
|
|
579
|
+
}, open: V, close: B, closeChild: z, closeAll: ee, floatElement: () => u.current, anchorElement: () => w.current }), []);
|
|
580
580
|
De(() => {
|
|
581
|
-
Xe.set(
|
|
581
|
+
Xe.set(y, G);
|
|
582
582
|
}, [G]), De(() => () => {
|
|
583
|
-
Xe.delete(
|
|
583
|
+
Xe.delete(y), B(0);
|
|
584
584
|
}, []), De(() => {
|
|
585
585
|
p && !A && (b(!0), f.onChildVisible());
|
|
586
586
|
}, [p, A]);
|
|
587
|
-
const Q = _e((
|
|
588
|
-
|
|
587
|
+
const Q = _e((g) => {
|
|
588
|
+
g.which === Pe.Escape && (g.preventDefault(), g.stopPropagation(), B(0));
|
|
589
589
|
}, []), oe = q.useRef(null), se = _e(() => {
|
|
590
|
-
const
|
|
591
|
-
|
|
592
|
-
(C.contains(document.activeElement) || document.activeElement === document.body) &&
|
|
590
|
+
const g = oe.current, C = u.current;
|
|
591
|
+
g && C && (requestAnimationFrame(() => {
|
|
592
|
+
(C.contains(document.activeElement) || document.activeElement === document.body) && g.focus();
|
|
593
593
|
}), oe.current = null), c?.();
|
|
594
|
-
}, []), te = _e((
|
|
595
|
-
u.current =
|
|
594
|
+
}, []), te = _e((g) => {
|
|
595
|
+
u.current = g, g.addEventListener("focus", (N) => {
|
|
596
596
|
oe.current = N.relatedTarget;
|
|
597
597
|
}, { once: !0, passive: !0 });
|
|
598
598
|
const C = document.activeElement;
|
|
599
599
|
requestAnimationFrame(() => {
|
|
600
|
-
C === document.activeElement &&
|
|
600
|
+
C === document.activeElement && g.focus();
|
|
601
601
|
});
|
|
602
602
|
}, []), [le, ce] = re();
|
|
603
603
|
De(() => {
|
|
604
|
-
A && (p ? i?.() : p === !1 && c?.()), ce(
|
|
604
|
+
A && (p ? i?.() : p === !1 && c?.()), ce(m ? k(qr, { floatReference: G, open: p, label: n, anchorEl: r, onOpening: () => {
|
|
605
605
|
i?.(), f.onChildVisible();
|
|
606
606
|
}, onClosing: se, onClose: () => {
|
|
607
607
|
b(!1), f.onChildHidden();
|
|
608
|
-
}, onMount: te, popperProps: { onKeyDown: Q, onMouseEnter: (
|
|
608
|
+
}, onMount: te, popperProps: { onKeyDown: Q, onMouseEnter: (g) => {
|
|
609
609
|
p && ze?.isClose && ze.setReferences.has(G) && (ze.fn.clear(), ze = null, G.closeChild());
|
|
610
610
|
}, ...o }, createPopupPanel: F }) : null);
|
|
611
|
-
}, [
|
|
612
|
-
const d = ae((
|
|
611
|
+
}, [m, p, n, A, o, F, _]);
|
|
612
|
+
const d = ae((g) => {
|
|
613
613
|
if (Ge.size === 0) return;
|
|
614
614
|
let C = !1;
|
|
615
615
|
Ge.forEach((N) => {
|
|
616
616
|
const I = Xe.get(N);
|
|
617
617
|
if (C || !I) return;
|
|
618
|
-
I.floatElement()?.contains?.(
|
|
618
|
+
I.floatElement()?.contains?.(g.target) && (C = !0), I.anchorElement()?.contains?.(g.target) && (C = !0);
|
|
619
619
|
}), C || D();
|
|
620
620
|
}, [D]);
|
|
621
621
|
return De(() => {
|
|
622
622
|
if (!p || !f.isRoot) return;
|
|
623
|
-
const
|
|
623
|
+
const g = (C) => {
|
|
624
624
|
d(C);
|
|
625
625
|
};
|
|
626
|
-
return document.addEventListener("mousedown",
|
|
627
|
-
document.removeEventListener("mousedown",
|
|
626
|
+
return document.addEventListener("mousedown", g), document.addEventListener("touchstart", g), document.addEventListener("focus", g), () => {
|
|
627
|
+
document.removeEventListener("mousedown", g), document.removeEventListener("touchstart", g), document.removeEventListener("focus", g);
|
|
628
628
|
};
|
|
629
629
|
}, [p, f]), { component: le, reference: G };
|
|
630
630
|
}, Ci = ie(de((e, r) => {
|
|
631
631
|
const { nestedChildren: n, variant: t, disabled: s = !1, createPopupPanel: a, ...o } = e, l = { disabled: s, createPopupPanel: ae((i) => {
|
|
632
632
|
if (!n || n.length === 0) return null;
|
|
633
|
-
const { popupContainer: c, floatReference: p, ref:
|
|
633
|
+
const { popupContainer: c, floatReference: p, ref: x, ...m } = i, b = [];
|
|
634
634
|
for (let v = 0; v < n.length; v++) {
|
|
635
635
|
const h = n[v];
|
|
636
|
-
h && b.push(k(Ci, { parentFloat: p, ...
|
|
636
|
+
h && b.push(k(Ci, { parentFloat: p, ...m, ...h }, v));
|
|
637
637
|
}
|
|
638
638
|
return J(X, { ref: r, sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: ["Children here", b, k(Ot, { parentFloat: p, children: "Close other children" })] });
|
|
639
639
|
}, [n]), ...o };
|
|
@@ -643,12 +643,12 @@ const Kt = (e = null, r, n, t) => (ze && (ze.fn.clear(), ze = null), e === 0 ? r
|
|
|
643
643
|
(function(f) {
|
|
644
644
|
if (!f) throw new Error("Invariant failed");
|
|
645
645
|
})(q.isValidElement(n));
|
|
646
|
-
const c = n, p =
|
|
646
|
+
const c = n, p = Z(() => ({ ...c?.props, ...i, onContextMenu: (f) => {
|
|
647
647
|
c?.props?.onContextMenu?.(f), f.isDefaultPrevented() || (i?.onContextMenu?.(f), f.isDefaultPrevented() || (b(f), f.preventDefault()));
|
|
648
|
-
} }), [i, c?.props]),
|
|
648
|
+
} }), [i, c?.props]), x = ae(a, [a]), [m, b] = q.useState(null), { reference: v, component: h } = zt({ label: l ?? "contextMenu", popperProps: o, parentFloat: s, anchor: { getBoundingClientRect: () => new DOMRect(m?.clientX || 0, m?.clientY || 0) }, onClose: () => b(null), createPopupPanel: x });
|
|
649
649
|
return De(() => {
|
|
650
|
-
|
|
651
|
-
}, [
|
|
650
|
+
m ? v.open(0) : v.close(0);
|
|
651
|
+
}, [m]), J(Je, { children: [q.cloneElement(n, p), h] });
|
|
652
652
|
})), dt = de((e, r) => {
|
|
653
653
|
const { slotProps: n, ...t } = e, { getPortalContainer: s } = ln();
|
|
654
654
|
return k($o, { ref: r, slotProps: { ...n, popper: { container: s, ...n?.popper || {} } }, ...t });
|
|
@@ -669,45 +669,45 @@ const mt = ie((e) => {
|
|
|
669
669
|
const s = [];
|
|
670
670
|
return t?.[Mt.Ctrl] && (s.push(k(mt, { modifier: r ? "^" : k("div", { style: { paddingRight: "1px" }, children: Mi }) }, "ctrl")), s.push("+")), t?.[Mt.Alt] && (s.push(k(mt, { modifier: r ? "⌥" : "Alt" }, "alt")), s.push("+")), t?.[Mt.Shift] && (s.push(k(mt, { modifier: r ? "⇧" : k("div", { style: { paddingRight: "1px" }, children: "Shift" }) }, "shift")), s.push("+")), t?.[Mt.Meta] && (s.push(k(mt, { modifier: r ? k("div", { style: { paddingTop: "1px" }, children: "⌘" }) : "Meta" }, "meta")), s.push("+")), s.push(k(mt, { modifier: Zo.toPrettyKeyCode(e.key) }, "character")), k(X, { sx: { display: "flex", alignItems: "center" }, children: s }, n);
|
|
671
671
|
}, pt = ie(de((e, r) => {
|
|
672
|
-
const { disabled: n = !1, label: t, shortcut: s, chips: a, description: o, maxWidth: l = 280, useModifierSymbols: i = !1, children: c, simple: p, componentDisabled:
|
|
672
|
+
const { disabled: n = !1, label: t, shortcut: s, chips: a, description: o, maxWidth: l = 280, useModifierSymbols: i = !1, children: c, simple: p, componentDisabled: x = !1, sx: m, ...b } = e;
|
|
673
673
|
let v = null;
|
|
674
674
|
s && (v = Jr(s, i));
|
|
675
675
|
const [h, f] = re(null);
|
|
676
676
|
return De(() => {
|
|
677
|
-
Promise.resolve(t).then((
|
|
678
|
-
f(
|
|
677
|
+
Promise.resolve(t).then((y) => {
|
|
678
|
+
f(y);
|
|
679
679
|
});
|
|
680
|
-
}, [t]), k(dt, { slotProps: { popper: { sx: { "& .MuiTooltip-tooltip": { marginTop: "0px !important" }, ...
|
|
680
|
+
}, [t]), k(dt, { slotProps: { popper: { sx: { "& .MuiTooltip-tooltip": { marginTop: "0px !important" }, ...m }, modifiers: [{ name: "offset", options: { offset: [0, 14] } }] } }, className: "tooltip-wrapper", tabIndex: -1, title: !n && h ? J(X, { sx: { maxWidth: `${l}px` }, ref: r, children: [J(X, { sx: { display: "flex", flexDirection: "row", marginBottom: o ? "4px" : "0px" }, children: [k(Me, { variant: "subtitle1", component: "div", flex: "1 1 100%", children: h }), a ? k(Br, { chips: a }) : null, v ? k(X, { sx: { marginLeft: "8px" } }, "leadingSpace") : k(Je, {}), v] }), o ? k(Me, { variant: "caption", sx: { whiteSpace: "pre-line", lineHeight: "1.4" }, children: o }) : k(Je, {})] }) : "", enterDelay: 260, enterNextDelay: 130, leaveDelay: 230, disableInteractive: !0, ...b, children: k("div", { style: { display: "flex", alignItems: "stretch", justifyContent: "stretch" }, children: c }) });
|
|
681
681
|
})), Ti = k(be, {}), Pi = k(be, { iconKey: "Check" }), Wt = ie(de((e, r) => {
|
|
682
|
-
const { dense: n = !0, outlined: t = !1, disableHover: s = !1, parentFloat: a, selected: o, icon: l, tooltipProps: i, children: c, primary: p, sx:
|
|
683
|
-
let T =
|
|
684
|
-
s || (T = Te.mergeContentful(
|
|
685
|
-
const L =
|
|
682
|
+
const { dense: n = !0, outlined: t = !1, disableHover: s = !1, parentFloat: a, selected: o, icon: l, tooltipProps: i, children: c, primary: p, sx: x, disabled: m, className: b, onFocus: v, onBlur: h, ...f } = e, [y, u] = re(!1), w = { marginRight: "0px", padding: n ? "2px" : "7px", borderRadius: (P) => `${P.shape.borderRadius}px`, color: (P) => p ? void 0 : P.palette.text.icon ?? P.palette.action.active, border: (P) => `solid ${t ? P.palette.divider : "transparent"} 1px`, "& .MuiTouchRipple-child": { borderRadius: (P) => `${P.shape.borderRadius}px !important` }, "&.Mui-selected": { backgroundColor: (P) => me(P.palette.text.primary, P.palette.action.selectedOpacity), border: (P) => `solid ${t ? P.palette.text?.primary : P.palette.divider} 1px` }, "&.Mui-disabled": { border: (P) => `solid ${t ? P.palette.divider : "transparent"} 1px` }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, "&.Mui-focusVisible": { outline: "solid transparent 1px", border: "1px solid transparent" }, ...x }, E = { "&:hover:not(.Mui-disabled, [disabled])": { color: (P) => P.palette.text.primary, border: (P) => `solid ${t ? P.palette.text?.primary : P.palette.divider} 1px`, "&.Mui-selected": { backgroundColor: (P) => me(P.palette.text.primary, P.palette.action.selectedOpacity + P.palette.action.hoverOpacity) }, "> .outline-hover": { outline: (P) => `solid ${t ? P.palette.text?.primary : P.palette.divider} 1px` }, backgroundColor: null }, "&.Mui-focusVisible": { outline: (P) => `solid ${P.palette.primary.main} 1px`, border: (P) => `1px solid ${P.palette?.primary?.main}`, zIndex: 1 } };
|
|
683
|
+
let T = w;
|
|
684
|
+
s || (T = Te.mergeContentful(w, E));
|
|
685
|
+
const L = Z(() => {
|
|
686
686
|
let P = typeof l == "function" ? l() : l;
|
|
687
687
|
return P === null ? P : P || (o === void 0 ? Ti : Pi);
|
|
688
688
|
}, [l, o]);
|
|
689
|
-
let O = J(Ze, { component: "div", ref: r, className: Oe({ "Mui-focusVisible":
|
|
689
|
+
let O = J(Ze, { component: "div", ref: r, className: Oe({ "Mui-focusVisible": y, "Mui-selected": o, "Mui-disabled": m }, b), onFocus: (P) => {
|
|
690
690
|
u(!0), v?.(P);
|
|
691
691
|
}, onBlur: (P) => {
|
|
692
692
|
u(!1), h?.(P);
|
|
693
|
-
}, size: "small", TouchRippleProps: { center: !1 }, sx: T, edge: "end", ...f, disabled:
|
|
693
|
+
}, size: "small", TouchRippleProps: { center: !1 }, sx: T, edge: "end", ...f, disabled: m || !1, children: [L, c] });
|
|
694
694
|
if (i) if (i.simple && i.label && !i.disabled) {
|
|
695
695
|
const { label: P, description: D, maxWidth: S, shortcut: _, useModifierSymbols: M, componentDisabled: F, simple: A, chips: V, ref: B, ...z } = i;
|
|
696
696
|
O = k(dt, { disableInteractive: !0, title: P ?? "", ...z, children: k(X, { sx: { display: "flex" }, children: O }) });
|
|
697
697
|
} else O = k(pt, { children: O, ...i });
|
|
698
698
|
return O;
|
|
699
699
|
})), Ri = k(be, {}), Ni = (e) => e.icon, Ot = ie(de((e, r) => {
|
|
700
|
-
const { icon: n = Ri, renderIcon: t = Ni, parentFloat: s, className: a, onFocus: o, selected: l, onBlur: i, onMouseOver: c, onMouseOut: p, onMouseEnter:
|
|
701
|
-
const D = t?.({ icon: n, disabled:
|
|
702
|
-
return D ? k(zo, { className: Oe({ "Mui-focusVisible":
|
|
703
|
-
}, [t,
|
|
704
|
-
let P = J(Mr, { ref: r, disabled:
|
|
700
|
+
const { icon: n = Ri, renderIcon: t = Ni, parentFloat: s, className: a, onFocus: o, selected: l, onBlur: i, onMouseOver: c, onMouseOut: p, onMouseEnter: x, disabled: m, children: b, sx: v, tooltipProps: h, chips: f, primary: y, ...u } = e, [w, E] = re(!1), [T, L] = re(!1), O = Z(() => {
|
|
701
|
+
const D = t?.({ icon: n, disabled: m, selected: l });
|
|
702
|
+
return D ? k(zo, { className: Oe({ "Mui-focusVisible": w, "Mui-hovered": T }), sx: { "& .MuiSvgIcon-root": { color: (S) => y ? void 0 : S.palette.text.icon ?? S.palette.action.active }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { "& .MuiSvgIcon-root": { color: (S) => S.palette.text.primary } } }, children: D }) : null;
|
|
703
|
+
}, [t, m, n, w, T, y, l]);
|
|
704
|
+
let P = J(Mr, { ref: r, disabled: m, onMouseOver: (D) => {
|
|
705
705
|
c?.(D), D.isDefaultPrevented() || L(!0);
|
|
706
706
|
}, onMouseOut: (D) => {
|
|
707
707
|
p?.(D), D.isDefaultPrevented() || L(!1);
|
|
708
708
|
}, onMouseEnter: (D) => {
|
|
709
|
-
|
|
710
|
-
}, TouchRippleProps: { center: !1 }, className: Oe({ "Mui-focusVisible":
|
|
709
|
+
x?.(D), D.isDefaultPrevented() || s?.closeChild();
|
|
710
|
+
}, TouchRippleProps: { center: !1 }, className: Oe({ "Mui-focusVisible": w, "Mui-hovered": T }, a), onFocus: (D) => {
|
|
711
711
|
o?.(D), E(!0);
|
|
712
712
|
}, onBlur: (D) => {
|
|
713
713
|
i?.(D), E(!1);
|
|
@@ -717,27 +717,27 @@ const mt = ie((e) => {
|
|
|
717
717
|
const { children: n, sx: t, primary: s = !1, variant: a = "subtitle1", ...o } = e;
|
|
718
718
|
return k(Je, { children: k(Me, { ref: r, variant: a, component: "div", sx: { userSelect: "none", fontWeight: "500", paddingLeft: "8px", paddingTop: a === "subtitle1" ? "2px" : void 0, paddingBottom: a === "subtitle1" ? "2px" : void 0, color: (l) => s ? void 0 : l.palette.text.secondary, ...t }, ...o, children: n }) });
|
|
719
719
|
})), mn = ie(de((e, r) => {
|
|
720
|
-
const { dense: n = !0, outlined: t = !1, label: s, selected: a = !1, onQuickClick: o, parentFloat: l, createPopupPanel: i, popupProps: c, onPopupOpen: p, onPopupClose:
|
|
720
|
+
const { dense: n = !0, outlined: t = !1, label: s, selected: a = !1, onQuickClick: o, parentFloat: l, createPopupPanel: i, popupProps: c, onPopupOpen: p, onPopupClose: x, quickButtonProps: m, createQuickButton: b, tooltip: v = "", createTooltip: h, icon: f, disabled: y, buttonProps: u = Te.EmptyObject, disableHover: w, touchRippleRef: E, primary: T, children: L, sx: O, className: P, ...D } = e, S = dn(), _ = Z(() => {
|
|
721
721
|
const K = (ne, ue, he, Le = he) => {
|
|
722
722
|
const Ce = typeof t == "boolean" ? null : t[ne];
|
|
723
723
|
return typeof Ce == "function" ? Ce(ue) : Ce || (t ? he : Le);
|
|
724
724
|
};
|
|
725
725
|
return { outline: { color: (ne) => K("color", ne, ne.palette.divider, "transparent"), hoverColor: (ne) => K("hoverColor", ne, ne.palette.text?.primary, ne.palette.divider), focusColor: (ne) => K("focusColor", ne, ne.palette?.primary?.main) }, active: S.palette.mode === "dark" ? S.palette.text.secondary : S.palette.text.primary, text: S.palette.text.icon ?? S.palette.action.active };
|
|
726
|
-
}, [t, S]), [M, F] = re(!1), [A, V] = re(!1), [B, z] = re(!1),
|
|
727
|
-
F(!1),
|
|
726
|
+
}, [t, S]), [M, F] = re(!1), [A, V] = re(!1), [B, z] = re(!1), ee = ge(null), G = ge(null), Q = zt({ anchor: ee.current, label: s, createPopupPanel: i, parentFloat: l, popperProps: c?.popperProps, onClose: () => {
|
|
727
|
+
F(!1), x?.();
|
|
728
728
|
}, onOpen: () => {
|
|
729
729
|
F(!0), p?.();
|
|
730
730
|
} }), oe = ae((K) => {
|
|
731
731
|
o?.(K), Q.reference.close(0);
|
|
732
732
|
}, [o, Q]), se = ae(() => {
|
|
733
733
|
M ? Q.reference.close(0) : Q.reference.open(0);
|
|
734
|
-
}, [M, Q, l, s]), te =
|
|
735
|
-
const K = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (Y) => _.outline.color(Y), "&.Mui-focusVisible": { border: (Y) => `1px solid ${_.outline.focusColor(Y)} !important` }, "&:hover:not(.Mui-disabled, [disabled])": { borderColor: () =>
|
|
734
|
+
}, [M, Q, l, s]), te = Z(() => {
|
|
735
|
+
const K = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (Y) => _.outline.color(Y), "&.Mui-focusVisible": { border: (Y) => `1px solid ${_.outline.focusColor(Y)} !important` }, "&:hover:not(.Mui-disabled, [disabled])": { borderColor: () => w ? "transparent" : void 0, backgroundColor: () => w ? "transparent" : void 0 }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (Y) => _.outline.hoverColor(Y) }, "&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (Y) => _.outline.hoverColor(Y) }, "&.left": { borderTopLeftRadius: (Y) => `${Y.shape.borderRadius}px`, borderBottomLeftRadius: (Y) => `${Y.shape.borderRadius}px`, borderLeftStyle: "solid" }, "&.hard-right": { borderRightStyle: "solid", borderRightWidth: "1px", borderRightColor: (Y) => _.outline.color(Y) }, "&.right": { borderTopRightRadius: (Y) => `${Y.shape.borderRadius}px`, borderBottomRightRadius: (Y) => `${Y.shape.borderRadius}px`, borderRightStyle: "solid" }, "&.divider": { borderLeftWidth: "0px !important" } }, "& .MuiTouchRipple-child": { borderRadius: (Y) => `${Y.shape.borderRadius}px !important` } }, ne = { "&.Mui-selected": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity + Y.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity) } } } }, ue = { maxHeight: "100%", "&.Mui-selected": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity + Y.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity) } } }, "&:hover:not(.Mui-disabled, [disabled])": { color: (Y) => Y.palette.text.primary }, backgroundColor: () => w ? "transparent" : void 0, color: (Y) => Y.palette.text.icon, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, padding: () => n ? "2px 3px" : "7px", marginRight: "0" }, he = Te.mergeContentful(ue, K), Le = Te.mergeContentful(he, ne), Ce = Te.mergeContentful(ue, K);
|
|
736
736
|
return { quickButtonStyling: he, openQuickButtonStyling: Le, compoundStyling: Ce, openCompoundStyling: Te.mergeContentful(Ce, ne) };
|
|
737
|
-
}, [_,
|
|
737
|
+
}, [_, w]), le = ae((K) => {
|
|
738
738
|
const { children: ne, ref: ue, ...he } = K;
|
|
739
739
|
return k(dt, { ref: ue, ...he, disableInteractive: !0, children: ne });
|
|
740
|
-
}, []), ce = o || b, d = ce && (
|
|
740
|
+
}, []), ce = o || b, d = ce && (m?.tooltip || m?.createTooltip), g = (K) => {
|
|
741
741
|
const { tooltip: ne, createTooltip: ue, sx: he, ...Le } = K;
|
|
742
742
|
let Ce = k(Ze, { sx: { ...he }, component: "div", ...Le });
|
|
743
743
|
return d && (Ce = (ue ?? le)({ title: M ? "" : ne ?? v, children: k("div", { children: Ce }) }, M)), Ce;
|
|
@@ -745,31 +745,31 @@ const mt = ie((e) => {
|
|
|
745
745
|
K.keyCode === Pe.Space ? se() : K.keyCode === Pe.F4 || K.keyCode === Pe.Down ? Q.reference.open(0) : K.keyCode === Pe.Up && Q.reference.close(0);
|
|
746
746
|
} };
|
|
747
747
|
let N = k(Je, {});
|
|
748
|
-
const I =
|
|
748
|
+
const I = Z(() => typeof f == "function" ? f() : f, [f]);
|
|
749
749
|
if (ce) {
|
|
750
750
|
let K = M ? te.openQuickButtonStyling : te.quickButtonStyling;
|
|
751
|
-
const ne = (b ||
|
|
751
|
+
const ne = (b || g)({ tabIndex: -1, disabled: y, size: "small", edge: "end", onMouseEnter: () => {
|
|
752
752
|
Q.reference.parent.closeChild();
|
|
753
753
|
}, onMouseDown: (he) => {
|
|
754
754
|
he.button === 0 && (he.preventDefault(), oe(he));
|
|
755
|
-
}, touchRippleRef: E, children: I, ...
|
|
755
|
+
}, touchRippleRef: E, children: I, ...m, className: Oe({ "Mui-focusVisible": A || M, "Mui-selected": a, "Mui-hovered": B || M, "Mui-disabled": y, bordered: !0, left: !0, "hard-right": !0 }, m?.className), sx: { ...te.quickButtonStyling, height: "100%", ...m?.sx } });
|
|
756
756
|
let ue = Vn(!0, n, M);
|
|
757
|
-
d && (ue = (h ?? le)({ title: M ? "" : v, children: ue }, M)), N = J(Je, { children: [ne, k(Ze, { ref: G, component: "div", className: Oe({ "Mui-selected": M, "Mui-hovered": B || M, "Mui-disabled":
|
|
757
|
+
d && (ue = (h ?? le)({ title: M ? "" : v, children: ue }, M)), N = J(Je, { children: [ne, k(Ze, { ref: G, component: "div", className: Oe({ "Mui-selected": M, "Mui-hovered": B || M, "Mui-disabled": y, "Mui-focusVisible": A || M, bordered: !0, right: !0, divider: !0 }), sx: { paddingLeft: (n ? 0 : 2) + "px", paddingRight: (n ? 0 : 2) + "px", width: () => "calc(var(--icon-size, 1.25em) * 0.8)", ...te.quickButtonStyling, ...K }, TouchRippleProps: { center: !1 }, tabIndex: -1, disabled: y, size: "small", edge: "end", onMouseDown: (he) => {
|
|
758
758
|
he.button === 0 && (he.preventDefault(), se());
|
|
759
759
|
}, children: ue })] });
|
|
760
760
|
} else {
|
|
761
761
|
let K = M ? te.openCompoundStyling : te.compoundStyling;
|
|
762
|
-
N = k(Wt, { ref: G, tabIndex: -1, disabled:
|
|
762
|
+
N = k(Wt, { ref: G, tabIndex: -1, disabled: y, size: "small", icon: I, className: Oe({ "Mui-selected": M || a, "Mui-hovered": B, "Mui-disabled": y, "Mui-focusVisible": A || M, bordered: !0, left: !0, right: !0 }), sx: { ...te.quickButtonStyling, ...K }, onMouseDown: (ne) => {
|
|
763
763
|
ne.button === 0 && (ne.preventDefault(), se());
|
|
764
764
|
}, children: Vn(!1, n, M) });
|
|
765
765
|
}
|
|
766
766
|
const { className: R, sx: j, ...H } = u;
|
|
767
|
-
let U = k(X, { onFocus: () => V(!0), onBlur: () => V(!1), onMouseOver: () => z(!0), onMouseOut: () => z(!1), ...C, "aria-label": "split button", ref:
|
|
767
|
+
let U = k(X, { onFocus: () => V(!0), onBlur: () => V(!1), onMouseOver: () => z(!0), onMouseOut: () => z(!1), ...C, "aria-label": "split button", ref: ee, tabIndex: y ? void 0 : 0, className: Oe(R, "split-button-root", { "Mui-focusVisible": A || M, "Mui-selected": M || a, "Mui-hovered": B, "Mui-disabled": y }), sx: { display: "flex", flex: "1 1 100%", alignItems: "stretch", width: "fit-content", "&:not(.Mui-disabled)": { cursor: "pointer" }, marginLeft: t ? "1px" : "0px", marginRight: t ? "1px" : "0px", borderRadius: (K) => `${K.shape.borderRadius}px`, "&.Mui-focusVisible": { outline: (K) => `solid ${K.palette.primary.main} 1px`, zIndex: 2 }, ...j }, ...H, children: N });
|
|
768
768
|
return d || (U = (h ?? le)({ title: M ? "" : v, children: U }, M)), J(X, { className: Oe(P, "popupIconButton"), ref: r, ...D, sx: { zIndex: A || M ? 2 : void 0, display: "flex", alignItems: "center", ...O }, children: [U, Q.component] });
|
|
769
769
|
}));
|
|
770
770
|
mn.displayName = "ExhibitPopupIconButton";
|
|
771
771
|
const Fi = {}, Zr = ie(de((e, r) => {
|
|
772
|
-
const { selected: n = !1, label: t, onQuickClick: s, parentFloat: a, createPopupPanel: o, popupProps: l = Fi, onPopupOpen: i, onPopupClose: c, quickButtonProps: p, createQuickButton:
|
|
772
|
+
const { selected: n = !1, label: t, onQuickClick: s, parentFloat: a, createPopupPanel: o, popupProps: l = Fi, onPopupOpen: i, onPopupClose: c, quickButtonProps: p, createQuickButton: x, tooltip: m = "", createTooltip: b, icon: v, disabled: h, touchRippleRef: f, primary: y, children: u, sx: w, ...E } = e, [T, L] = re(!1), [O, P] = re(!1), [D, S] = re(!1), [_, M] = re(!1), F = ge(null), A = ge(null), V = Z(() => {
|
|
773
773
|
if (!l) return;
|
|
774
774
|
const { popperProps: d } = l;
|
|
775
775
|
return { placement: "right-start", offsets: [-4, -2], ...d };
|
|
@@ -779,11 +779,11 @@ const Fi = {}, Zr = ie(de((e, r) => {
|
|
|
779
779
|
L(!0), i?.();
|
|
780
780
|
} }), z = ae((d) => {
|
|
781
781
|
d.button === 0 && (s?.(d), B.reference.close(0));
|
|
782
|
-
}, [s]),
|
|
783
|
-
const { children:
|
|
784
|
-
return k(dt, { ref: C, ...N, disableInteractive: !0, children:
|
|
785
|
-
}, []), oe = s ||
|
|
786
|
-
const { tooltip:
|
|
782
|
+
}, [s]), ee = k(xi, {}), G = { "&.Mui-selected": { color: (d) => d.palette.text.primary, "& svg * ": { color: (d) => d.palette.text.primary } } }, Q = _e((d) => {
|
|
783
|
+
const { children: g, ref: C, ...N } = d;
|
|
784
|
+
return k(dt, { ref: C, ...N, disableInteractive: !0, children: g });
|
|
785
|
+
}, []), oe = s || x, se = (d) => {
|
|
786
|
+
const { tooltip: g, createTooltip: C, ...N } = d;
|
|
787
787
|
return k(Ot, { icon: v, className: Oe({ "Mui-hovered": D }), sx: { flex: "1 1 100%", ...G }, ...N, children: t });
|
|
788
788
|
}, te = { onFocus: () => {
|
|
789
789
|
P(!0);
|
|
@@ -798,22 +798,22 @@ const Fi = {}, Zr = ie(de((e, r) => {
|
|
|
798
798
|
} };
|
|
799
799
|
let le = k(Je, {});
|
|
800
800
|
if (oe) {
|
|
801
|
-
const d = (
|
|
801
|
+
const d = (x || se)({ tabIndex: -1, disabled: h, onMouseEnter: () => {
|
|
802
802
|
B.reference.parent.closeChild();
|
|
803
|
-
}, onMouseDown: (
|
|
804
|
-
|
|
803
|
+
}, onMouseDown: (g) => {
|
|
804
|
+
g.button === 0 && (g.preventDefault(), z(g));
|
|
805
805
|
}, className: Oe("quick-left", {}, p?.className), ...p });
|
|
806
|
-
le = J(Je, { children: [d, k(Er, { sx: { ml: "0px", mr: "0px" }, orientation: "vertical", variant: "middle", flexItem: !0 }), k(Mr, { ref: A, className: Oe({ "Mui-selected": T, "Mui-hovered": D }), sx: { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px", paddingLeft: "0px", paddingRight: "0px", marginLeft: "0px", color: (
|
|
807
|
-
|
|
806
|
+
le = J(Je, { children: [d, k(Er, { sx: { ml: "0px", mr: "0px" }, orientation: "vertical", variant: "middle", flexItem: !0 }), k(Mr, { ref: A, className: Oe({ "Mui-selected": T, "Mui-hovered": D }), sx: { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px", paddingLeft: "0px", paddingRight: "0px", marginLeft: "0px", color: (g) => y ? void 0 : g.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (g) => g.palette.text.primary }, ...G }, tabIndex: -1, disabled: h, ...te, children: k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", border: "1px solid transparent", paddingTop: "1px", paddingBottom: "1px", color: (g) => y ? void 0 : g.palette.text.icon ?? g.palette.action.active }, onMouseOver: (g) => {
|
|
807
|
+
g.preventDefault(), M(!0);
|
|
808
808
|
}, onMouseLeave: () => {
|
|
809
809
|
M(!1);
|
|
810
|
-
}, onClick: (
|
|
811
|
-
|
|
812
|
-
}, children:
|
|
810
|
+
}, onClick: (g) => {
|
|
811
|
+
g.preventDefault(), T ? B.reference.close() : B.reference.open();
|
|
812
|
+
}, children: ee }) })] });
|
|
813
813
|
} else le = J(Ot, { ref: A, tabIndex: -1, disabled: h, icon: v, className: Oe({ "Mui-selected": T || n, "Mui-hovered": D }), sx: { flex: "1 1 100%", paddingRight: "0px", ...G }, onClick: (d) => {
|
|
814
814
|
d.preventDefault(), T ? B.reference.close() : B.reference.open();
|
|
815
|
-
}, ...te, children: [k("div", { style: { flex: "1 1 100%" }, children: t }), k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", color: (d) =>
|
|
816
|
-
let ce = k(X, { "aria-label": "split button", ref: F, tabIndex: h ? void 0 : 0, className: Oe({ "Mui-disabled": h, "Mui-selected": T, "Mui-focusVisible": O || T, "Mui-hovered": D }), sx: { display: "flex", flex: "1 1 100%", alignItems: "center", width: "fit-content", "& .quick-left": { borderTopRightRadius: "0px", borderBottomRightRadius: "0px", marginRight: "-1px" }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, ...
|
|
815
|
+
}, ...te, children: [k("div", { style: { flex: "1 1 100%" }, children: t }), k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", color: (d) => y ? void 0 : d.palette.text.icon ?? d.palette.action.active }, children: ee })] });
|
|
816
|
+
let ce = k(X, { "aria-label": "split button", ref: F, tabIndex: h ? void 0 : 0, className: Oe({ "Mui-disabled": h, "Mui-selected": T, "Mui-focusVisible": O || T, "Mui-hovered": D }), sx: { display: "flex", flex: "1 1 100%", alignItems: "center", width: "fit-content", "& .quick-left": { borderTopRightRadius: "0px", borderBottomRightRadius: "0px", marginRight: "-1px" }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, ...w }, ...E, children: le });
|
|
817
817
|
return oe && !_ && (p?.tooltip || p?.createTooltip) && (ce = (p?.createTooltip ?? Q)({ title: T ? "" : ce ?? p?.tooltip, children: ce }, T)), J(X, { ref: r, sx: { zIndex: O || T ? 2 : void 0, display: "flex", " .tooltip-wrapper": { display: "flex", flex: "1 1 100%" } }, children: [ce, B.component] });
|
|
818
818
|
})), ks = ie(de((e, r) => {
|
|
819
819
|
const { onSelectToggle: n, selected: t = !1, label: s, shortcut: a, tabIndex: o = 0, preventFocus: l = !1, ...i } = e;
|
|
@@ -870,18 +870,18 @@ function Bi(e, r) {
|
|
|
870
870
|
var i, c = r.payload.id;
|
|
871
871
|
return e[c] ? Ee({}, e, ((i = {})[c] = Ee({}, e[c], { props: Ee({}, e[c].props, { open: !1 }) }), i)) : e;
|
|
872
872
|
case Ie.UPDATE:
|
|
873
|
-
var p,
|
|
874
|
-
return e[
|
|
873
|
+
var p, x = r.payload, m = x.id, b = x.props;
|
|
874
|
+
return e[m] ? Ee({}, e, ((p = {})[m] = Ee({}, e[m], { props: Ee({}, e[m].props, b) }), p)) : e;
|
|
875
875
|
case Ie.DESTROY:
|
|
876
876
|
var v = r.payload.id, h = Ee({}, e);
|
|
877
877
|
return delete h[v], h;
|
|
878
878
|
case Ie.DESTROY_BY_ROOT_ID:
|
|
879
879
|
var f = r.payload.rootId;
|
|
880
|
-
return Object.keys(e).filter(function(
|
|
881
|
-
return
|
|
882
|
-
}).reduce(function(
|
|
883
|
-
var
|
|
884
|
-
return Ee({},
|
|
880
|
+
return Object.keys(e).filter(function(y) {
|
|
881
|
+
return y.split(".")[0] !== f;
|
|
882
|
+
}).reduce(function(y, u) {
|
|
883
|
+
var w;
|
|
884
|
+
return Ee({}, y, ((w = {})[u] = e[u], w));
|
|
885
885
|
}, {});
|
|
886
886
|
default:
|
|
887
887
|
throw new Error("Unexpected action");
|
|
@@ -893,32 +893,32 @@ var qt = "[ERROR]: Modal ID is missing", no = function(e) {
|
|
|
893
893
|
return r.join("");
|
|
894
894
|
}, ji = ["open"];
|
|
895
895
|
function Ds(e) {
|
|
896
|
-
var r = e.children, n = e.legacy, t = n !== void 0 && n, s = e.suspense, a = s === void 0 || s, o = e.fallback, l = o === void 0 ? null : o, i = q.useReducer(Bi, Li), c = i[0], p = i[1],
|
|
897
|
-
var
|
|
898
|
-
|
|
899
|
-
}, [p]),
|
|
900
|
-
|
|
901
|
-
}, [p]), b = q.useCallback(function(
|
|
902
|
-
|
|
903
|
-
}, [p]), v = q.useCallback(function(
|
|
904
|
-
|
|
905
|
-
}, [p]), h = q.useCallback(function(
|
|
896
|
+
var r = e.children, n = e.legacy, t = n !== void 0 && n, s = e.suspense, a = s === void 0 || s, o = e.fallback, l = o === void 0 ? null : o, i = q.useReducer(Bi, Li), c = i[0], p = i[1], x = q.useCallback(function(y, u) {
|
|
897
|
+
var w = eo(u, ji);
|
|
898
|
+
y ? p({ type: Ie.UPDATE, payload: { id: y, props: w } }) : console.error(qt);
|
|
899
|
+
}, [p]), m = q.useCallback(function(y) {
|
|
900
|
+
y ? p({ type: Ie.HIDE, payload: { id: y } }) : console.error(qt);
|
|
901
|
+
}, [p]), b = q.useCallback(function(y) {
|
|
902
|
+
y ? p({ type: Ie.DESTROY, payload: { id: y } }) : console.error(qt);
|
|
903
|
+
}, [p]), v = q.useCallback(function(y) {
|
|
904
|
+
y ? p({ type: Ie.DESTROY_BY_ROOT_ID, payload: { rootId: y } }) : console.error("[ERROR]: Modal root ID is missing");
|
|
905
|
+
}, [p]), h = q.useCallback(function(y, u, w) {
|
|
906
906
|
var E = no(8);
|
|
907
|
-
return
|
|
908
|
-
return
|
|
907
|
+
return w && w.rootId && (E = w.rootId + "." + E), p({ type: Ie.SHOW, payload: { id: E, component: y, props: u, options: w } }), { id: E, hide: function() {
|
|
908
|
+
return m(E);
|
|
909
909
|
}, destroy: function() {
|
|
910
910
|
return b(E);
|
|
911
911
|
}, update: function(T) {
|
|
912
|
-
return
|
|
912
|
+
return x(E, T);
|
|
913
913
|
} };
|
|
914
|
-
}, [p,
|
|
915
|
-
return q.createElement(to.Provider, { value: { state: c, updateModal:
|
|
916
|
-
var u = c[
|
|
914
|
+
}, [p, m, b, x]), f = a ? No : Fo;
|
|
915
|
+
return q.createElement(to.Provider, { value: { state: c, updateModal: x, hideModal: m, destroyModal: b, showModal: h, destroyModalsByRootId: v } }, r, q.createElement(f, Object.assign({}, a && { fallback: l }), Object.keys(c).map(function(y) {
|
|
916
|
+
var u = c[y], w = u.component, E = u.props, T = u.options, L = function() {
|
|
917
917
|
var P, D;
|
|
918
|
-
E != null && E.onExited && E.onExited.apply(E, arguments), E != null && (P = E.TransitionProps) != null && P.onExited && (D = E.TransitionProps).onExited.apply(D, arguments), b(
|
|
918
|
+
E != null && E.onExited && E.onExited.apply(E, arguments), E != null && (P = E.TransitionProps) != null && P.onExited && (D = E.TransitionProps).onExited.apply(D, arguments), b(y);
|
|
919
919
|
}, O = {};
|
|
920
|
-
return O = t ? { onExited: L } : { TransitionProps: Ee({}, E?.TransitionProps, { onExited: L }) }, q.createElement(
|
|
921
|
-
T && T.hideOnClose && y
|
|
920
|
+
return O = t ? { onExited: L } : { TransitionProps: Ee({}, E?.TransitionProps, { onExited: L }) }, q.createElement(w, Object.assign({}, E, { key: y, onClose: function() {
|
|
921
|
+
T && T.hideOnClose && m(y), T && T.destroyOnClose && T.hideOnClose && b(y), E && E.onClose && E.onClose.apply(E, arguments);
|
|
922
922
|
} }, T && !T.destroyOnClose && O));
|
|
923
923
|
})));
|
|
924
924
|
}
|
|
@@ -947,25 +947,25 @@ function gn(e) {
|
|
|
947
947
|
}
|
|
948
948
|
function Os(e) {
|
|
949
949
|
const [r, n] = re(() => /* @__PURE__ */ new Map()), { showModal: t, updateModal: s, destroyModal: a, hideModal: o } = gn({ disableAutoDestroy: !0 });
|
|
950
|
-
return (l, i, c, p) => new Promise((
|
|
950
|
+
return (l, i, c, p) => new Promise((x, m) => {
|
|
951
951
|
let b = !1;
|
|
952
952
|
c?.disableAutoDestroy !== void 0 && (b = c.disableAutoDestroy, delete (c = { ...c }).disableAutoDestroy);
|
|
953
953
|
const v = { ...e, ...c, ...p, onHide: () => {
|
|
954
954
|
const u = r.get(l);
|
|
955
|
-
p?.onHide?.(), n((
|
|
955
|
+
p?.onHide?.(), n((w) => (w.delete(l), w)), o(u.id);
|
|
956
956
|
}, onDone: (u) => {
|
|
957
|
-
const
|
|
958
|
-
n((E) => (E.delete(l), E)), p?.onDone?.(u),
|
|
957
|
+
const w = r.get(l);
|
|
958
|
+
n((E) => (E.delete(l), E)), p?.onDone?.(u), w && w.id && !b && a(w.id);
|
|
959
959
|
}, onShown: (u) => {
|
|
960
|
-
n((
|
|
961
|
-
const E =
|
|
962
|
-
return
|
|
963
|
-
}),
|
|
960
|
+
n((w) => {
|
|
961
|
+
const E = w.get(l);
|
|
962
|
+
return w.set(l, { ...E, element: u }), w;
|
|
963
|
+
}), x(u);
|
|
964
964
|
}, open: !0 }, h = r.get(l);
|
|
965
|
-
if (h) return s(h.id, v),
|
|
966
|
-
if (!i) return void
|
|
967
|
-
const f = q.lazy(i),
|
|
968
|
-
n((u) => (u.set(l, { id:
|
|
965
|
+
if (h) return s(h.id, v), x(h.element), void (v.autoFocus && h.element?.focus());
|
|
966
|
+
if (!i) return void m(`Invalid function for window '${l}'`);
|
|
967
|
+
const f = q.lazy(i), y = t(f, v, { destroyOnClose: !b });
|
|
968
|
+
n((u) => (u.set(l, { id: y.id, element: null }), u));
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
971
|
var jn, $n, zn, Wn, Hn, Un = { exports: {} };
|
|
@@ -981,10 +981,10 @@ function Hi() {
|
|
|
981
981
|
function n() {
|
|
982
982
|
}
|
|
983
983
|
return n.resetWarningCache = r, zn = function() {
|
|
984
|
-
function t(o, l, i, c, p,
|
|
985
|
-
if (
|
|
986
|
-
var
|
|
987
|
-
throw
|
|
984
|
+
function t(o, l, i, c, p, x) {
|
|
985
|
+
if (x !== e) {
|
|
986
|
+
var m = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
|
|
987
|
+
throw m.name = "Invariant Violation", m;
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
990
|
function s() {
|
|
@@ -1023,8 +1023,8 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1023
1023
|
rt.call(o, It) && t.filter(o) && (n || !r.includes(o)) && s.push(o);
|
|
1024
1024
|
var c = o.shadowRoot || typeof t.getShadowRoot == "function" && t.getShadowRoot(o), p = !Vt(c, !1) && (!t.shadowRootFilter || t.shadowRootFilter(o));
|
|
1025
1025
|
if (c && p) {
|
|
1026
|
-
var
|
|
1027
|
-
t.flatten ? s.push.apply(s,
|
|
1026
|
+
var x = e(c === !0 ? o.children : c.children, !0, t);
|
|
1027
|
+
t.flatten ? s.push.apply(s, x) : s.push({ scopeParent: o, candidates: x });
|
|
1028
1028
|
} else a.unshift.apply(a, o.children);
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
@@ -1080,10 +1080,10 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1080
1080
|
e = a;
|
|
1081
1081
|
}
|
|
1082
1082
|
if ((function(i) {
|
|
1083
|
-
var c, p,
|
|
1084
|
-
if (b && b !== i) for (h = !!((p = v) !== null && p !== void 0 && (
|
|
1085
|
-
var f,
|
|
1086
|
-
h = !((
|
|
1083
|
+
var c, p, x, m, b = i && Ft(i), v = (c = b) === null || c === void 0 ? void 0 : c.host, h = !1;
|
|
1084
|
+
if (b && b !== i) for (h = !!((p = v) !== null && p !== void 0 && (x = p.ownerDocument) !== null && x !== void 0 && x.contains(v) || i != null && (m = i.ownerDocument) !== null && m !== void 0 && m.contains(i)); !h && v; ) {
|
|
1085
|
+
var f, y, u;
|
|
1086
|
+
h = !((y = v = (f = b = Ft(v)) === null || f === void 0 ? void 0 : f.host) === null || y === void 0 || (u = y.ownerDocument) === null || u === void 0 || !u.contains(v));
|
|
1087
1087
|
}
|
|
1088
1088
|
return h;
|
|
1089
1089
|
})(e)) return !e.getClientRects().length;
|
|
@@ -1118,9 +1118,9 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1118
1118
|
}, Ki = function e(r) {
|
|
1119
1119
|
var n = [], t = [];
|
|
1120
1120
|
return r.forEach(function(s, a) {
|
|
1121
|
-
var o = !!s.scopeParent, l = o ? s.scopeParent : s, i = (function(p,
|
|
1122
|
-
var
|
|
1123
|
-
return
|
|
1121
|
+
var o = !!s.scopeParent, l = o ? s.scopeParent : s, i = (function(p, x) {
|
|
1122
|
+
var m = Ke(p);
|
|
1123
|
+
return m < 0 && x && !lo(p) ? 0 : m;
|
|
1124
1124
|
})(l, o), c = o ? e(s.candidates) : l;
|
|
1125
1125
|
i === 0 ? o ? n.push.apply(n, c) : n.push(l) : t.push({ documentOrder: a, tabIndex: i, item: s, isScope: o, content: c });
|
|
1126
1126
|
}), t.sort(Ui).reduce(function(s, a) {
|
|
@@ -1258,7 +1258,7 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1258
1258
|
else D === null && (D = c("fallbackFocus"));
|
|
1259
1259
|
if (!D) throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
1260
1260
|
return D;
|
|
1261
|
-
},
|
|
1261
|
+
}, x = function() {
|
|
1262
1262
|
if (o.containerGroups = o.containers.map(function(D) {
|
|
1263
1263
|
var S = uo(D, a.tabbableOptions), _ = po(D, a.tabbableOptions), M = S.length > 0 ? S[0] : void 0, F = S.length > 0 ? S[S.length - 1] : void 0, A = _.find(function(z) {
|
|
1264
1264
|
return et(z);
|
|
@@ -1268,12 +1268,12 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1268
1268
|
return Ke(z) > 0;
|
|
1269
1269
|
});
|
|
1270
1270
|
return { container: D, tabbableNodes: S, focusableNodes: _, posTabIndexesFound: B, firstTabbableNode: M, lastTabbableNode: F, firstDomTabbableNode: A, lastDomTabbableNode: V, nextTabbableNode: function(z) {
|
|
1271
|
-
var
|
|
1272
|
-
return G < 0 ?
|
|
1271
|
+
var ee = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], G = S.indexOf(z);
|
|
1272
|
+
return G < 0 ? ee ? _.slice(_.indexOf(z) + 1).find(function(Q) {
|
|
1273
1273
|
return et(Q);
|
|
1274
1274
|
}) : _.slice(0, _.indexOf(z)).reverse().find(function(Q) {
|
|
1275
1275
|
return et(Q);
|
|
1276
|
-
}) : S[G + (
|
|
1276
|
+
}) : S[G + (ee ? 1 : -1)];
|
|
1277
1277
|
} };
|
|
1278
1278
|
}), o.tabbableGroups = o.containerGroups.filter(function(D) {
|
|
1279
1279
|
return D.tabbableNodes.length > 0;
|
|
@@ -1281,11 +1281,11 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1281
1281
|
if (o.containerGroups.find(function(D) {
|
|
1282
1282
|
return D.posTabIndexesFound;
|
|
1283
1283
|
}) && o.containerGroups.length > 1) throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
1284
|
-
},
|
|
1284
|
+
}, m = function(D) {
|
|
1285
1285
|
var S = D.activeElement;
|
|
1286
|
-
if (S) return S.shadowRoot && S.shadowRoot.activeElement !== null ?
|
|
1286
|
+
if (S) return S.shadowRoot && S.shadowRoot.activeElement !== null ? m(S.shadowRoot) : S;
|
|
1287
1287
|
}, b = function(D) {
|
|
1288
|
-
D !== !1 && D !==
|
|
1288
|
+
D !== !1 && D !== m(document) && (D && D.focus ? (D.focus({ preventScroll: !!a.preventScroll }), o.mostRecentlyFocusedNode = D, (function(S) {
|
|
1289
1289
|
return S.tagName && S.tagName.toLowerCase() === "input" && typeof S.select == "function";
|
|
1290
1290
|
})(D) && D.select()) : b(p()));
|
|
1291
1291
|
}, v = function(D) {
|
|
@@ -1293,7 +1293,7 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1293
1293
|
return S || S !== !1 && D;
|
|
1294
1294
|
}, h = function(D) {
|
|
1295
1295
|
var S = D.target, _ = D.event, M = D.isBackward, F = M !== void 0 && M;
|
|
1296
|
-
S = S || Tt(_),
|
|
1296
|
+
S = S || Tt(_), x();
|
|
1297
1297
|
var A = null;
|
|
1298
1298
|
if (o.tabbableGroups.length > 0) {
|
|
1299
1299
|
var V = i(S, _), B = V >= 0 ? o.containerGroups[V] : void 0;
|
|
@@ -1304,7 +1304,7 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1304
1304
|
return S === le;
|
|
1305
1305
|
});
|
|
1306
1306
|
if (z < 0 && (B.container === S || _t(S, a.tabbableOptions) && !et(S, a.tabbableOptions) && !B.nextTabbableNode(S, !1)) && (z = V), z >= 0) {
|
|
1307
|
-
var
|
|
1307
|
+
var ee = z === 0 ? o.tabbableGroups.length - 1 : z - 1, G = o.tabbableGroups[ee];
|
|
1308
1308
|
A = Ke(S) >= 0 ? G.lastTabbableNode : G.lastDomTabbableNode;
|
|
1309
1309
|
} else kt(_) || (A = B.nextTabbableNode(S, !1));
|
|
1310
1310
|
} else {
|
|
@@ -1322,7 +1322,7 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1322
1322
|
}, f = function(D) {
|
|
1323
1323
|
var S = Tt(D);
|
|
1324
1324
|
i(S, D) >= 0 || (gt(a.clickOutsideDeactivates, D) ? n.deactivate({ returnFocus: a.returnFocusOnDeactivate }) : gt(a.allowOutsideClick, D) || D.preventDefault());
|
|
1325
|
-
},
|
|
1325
|
+
}, y = function(D) {
|
|
1326
1326
|
var S = Tt(D), _ = i(S, D) >= 0;
|
|
1327
1327
|
if (_ || S instanceof Document) _ && (o.mostRecentlyFocusedNode = S);
|
|
1328
1328
|
else {
|
|
@@ -1338,8 +1338,8 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1338
1338
|
B >= 0 && (a.isKeyForward(o.recentNavEvent) ? B + 1 < V.length && (M = V[B + 1], F = !1) : B - 1 >= 0 && (M = V[B - 1], F = !1));
|
|
1339
1339
|
}
|
|
1340
1340
|
} else o.containerGroups.some(function(z) {
|
|
1341
|
-
return z.tabbableNodes.some(function(
|
|
1342
|
-
return Ke(
|
|
1341
|
+
return z.tabbableNodes.some(function(ee) {
|
|
1342
|
+
return Ke(ee) > 0;
|
|
1343
1343
|
});
|
|
1344
1344
|
}) || (F = !1);
|
|
1345
1345
|
else F = !1;
|
|
@@ -1353,7 +1353,7 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1353
1353
|
var M = h({ event: S, isBackward: _ });
|
|
1354
1354
|
M && (kt(S) && S.preventDefault(), b(M));
|
|
1355
1355
|
})(D, a.isKeyBackward(D));
|
|
1356
|
-
},
|
|
1356
|
+
}, w = function(D) {
|
|
1357
1357
|
var S;
|
|
1358
1358
|
((S = D) == null ? void 0 : S.key) !== "Escape" && S?.key !== "Esc" && S?.keyCode !== 27 || gt(a.escapeDeactivates, D) === !1 || (D.preventDefault(), n.deactivate());
|
|
1359
1359
|
}, E = function(D) {
|
|
@@ -1362,9 +1362,9 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1362
1362
|
}, T = function() {
|
|
1363
1363
|
if (o.active) return ea(s, n), o.delayInitialFocusTimer = a.delayInitialFocus ? Kn(function() {
|
|
1364
1364
|
b(p());
|
|
1365
|
-
}) : b(p()), t.addEventListener("focusin",
|
|
1365
|
+
}) : b(p()), t.addEventListener("focusin", y, !0), t.addEventListener("mousedown", f, { capture: !0, passive: !1 }), t.addEventListener("touchstart", f, { capture: !0, passive: !1 }), t.addEventListener("click", E, { capture: !0, passive: !1 }), t.addEventListener("keydown", u, { capture: !0, passive: !1 }), t.addEventListener("keydown", w), n;
|
|
1366
1366
|
}, L = function() {
|
|
1367
|
-
if (o.active) return t.removeEventListener("focusin",
|
|
1367
|
+
if (o.active) return t.removeEventListener("focusin", y, !0), t.removeEventListener("mousedown", f, !0), t.removeEventListener("touchstart", f, !0), t.removeEventListener("click", E, !0), t.removeEventListener("keydown", u, !0), t.removeEventListener("keydown", w), n;
|
|
1368
1368
|
}, O = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(function(D) {
|
|
1369
1369
|
D.some(function(S) {
|
|
1370
1370
|
return Array.from(S.removedNodes).some(function(_) {
|
|
@@ -1383,9 +1383,9 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1383
1383
|
}, activate: function(D) {
|
|
1384
1384
|
if (o.active) return this;
|
|
1385
1385
|
var S = l(D, "onActivate"), _ = l(D, "onPostActivate"), M = l(D, "checkCanFocusTrap");
|
|
1386
|
-
M ||
|
|
1386
|
+
M || x(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = m(t), S?.();
|
|
1387
1387
|
var F = function() {
|
|
1388
|
-
M &&
|
|
1388
|
+
M && x(), T(), P(), _?.();
|
|
1389
1389
|
};
|
|
1390
1390
|
return M ? (M(o.containers.concat()).then(F, F), this) : (F(), this);
|
|
1391
1391
|
}, deactivate: function(D) {
|
|
@@ -1408,7 +1408,7 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1408
1408
|
var S = [].concat(D).filter(Boolean);
|
|
1409
1409
|
return o.containers = S.map(function(_) {
|
|
1410
1410
|
return typeof _ == "string" ? t.querySelector(_) : _;
|
|
1411
|
-
}), o.active &&
|
|
1411
|
+
}), o.active && x(), P(), this;
|
|
1412
1412
|
} }, Object.defineProperties(n, { _isManuallyPaused: { value: function() {
|
|
1413
1413
|
return o.manuallyPaused;
|
|
1414
1414
|
} }, _setPausedState: { value: function(D, S) {
|
|
@@ -1418,7 +1418,7 @@ const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
|
|
|
1418
1418
|
_?.(), L(), P(), M?.();
|
|
1419
1419
|
} else {
|
|
1420
1420
|
var F = l(S, "onUnpause"), A = l(S, "onPostUnpause");
|
|
1421
|
-
F?.(),
|
|
1421
|
+
F?.(), x(), T(), P(), A?.();
|
|
1422
1422
|
}
|
|
1423
1423
|
return this;
|
|
1424
1424
|
} } }), n.updateContainerElements(e), n;
|
|
@@ -1433,17 +1433,17 @@ var qn, Qn, la = (function() {
|
|
|
1433
1433
|
}, e(b);
|
|
1434
1434
|
}
|
|
1435
1435
|
function r(b, v, h) {
|
|
1436
|
-
return v && (function(f,
|
|
1437
|
-
for (var u = 0; u <
|
|
1438
|
-
var
|
|
1439
|
-
|
|
1436
|
+
return v && (function(f, y) {
|
|
1437
|
+
for (var u = 0; u < y.length; u++) {
|
|
1438
|
+
var w = y[u];
|
|
1439
|
+
w.enumerable = w.enumerable || !1, w.configurable = !0, "value" in w && (w.writable = !0), Object.defineProperty(f, o(w.key), w);
|
|
1440
1440
|
}
|
|
1441
1441
|
})(b.prototype, v), Object.defineProperty(b, "prototype", { writable: !1 }), b;
|
|
1442
1442
|
}
|
|
1443
1443
|
function n(b, v, h) {
|
|
1444
|
-
return v = s(v), (function(f,
|
|
1445
|
-
if (
|
|
1446
|
-
if (
|
|
1444
|
+
return v = s(v), (function(f, y) {
|
|
1445
|
+
if (y && (e(y) == "object" || typeof y == "function")) return y;
|
|
1446
|
+
if (y !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1447
1447
|
return (function(u) {
|
|
1448
1448
|
if (u === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1449
1449
|
return u;
|
|
@@ -1473,9 +1473,9 @@ var qn, Qn, la = (function() {
|
|
|
1473
1473
|
function o(b) {
|
|
1474
1474
|
var v = (function(h, f) {
|
|
1475
1475
|
if (e(h) != "object" || !h) return h;
|
|
1476
|
-
var
|
|
1477
|
-
if (
|
|
1478
|
-
var u =
|
|
1476
|
+
var y = h[Symbol.toPrimitive];
|
|
1477
|
+
if (y !== void 0) {
|
|
1478
|
+
var u = y.call(h, f);
|
|
1479
1479
|
if (e(u) != "object") return u;
|
|
1480
1480
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1481
1481
|
}
|
|
@@ -1484,29 +1484,29 @@ var qn, Qn, la = (function() {
|
|
|
1484
1484
|
return e(v) == "symbol" ? v : v + "";
|
|
1485
1485
|
}
|
|
1486
1486
|
Qn = 1;
|
|
1487
|
-
var l = q, i = yn(), c = aa.createFocusTrap, p = sa.isFocusable,
|
|
1487
|
+
var l = q, i = yn(), c = aa.createFocusTrap, p = sa.isFocusable, x = (function(b) {
|
|
1488
1488
|
function v(h) {
|
|
1489
1489
|
var f;
|
|
1490
|
-
(function(
|
|
1491
|
-
if (!(
|
|
1492
|
-
})(this, v), (function(
|
|
1493
|
-
(E = o(E)) in
|
|
1494
|
-
})(f = n(this, v, [h]), "getNodeForOption", function(
|
|
1495
|
-
var E, T = (E = this.internalOptions[
|
|
1490
|
+
(function(w, E) {
|
|
1491
|
+
if (!(w instanceof E)) throw new TypeError("Cannot call a class as a function");
|
|
1492
|
+
})(this, v), (function(w, E, T) {
|
|
1493
|
+
(E = o(E)) in w ? Object.defineProperty(w, E, { value: T, enumerable: !0, configurable: !0, writable: !0 }) : w[E] = T;
|
|
1494
|
+
})(f = n(this, v, [h]), "getNodeForOption", function(w) {
|
|
1495
|
+
var E, T = (E = this.internalOptions[w]) !== null && E !== void 0 ? E : this.originalOptions[w];
|
|
1496
1496
|
if (typeof T == "function") {
|
|
1497
1497
|
for (var L = arguments.length, O = new Array(L > 1 ? L - 1 : 0), P = 1; P < L; P++) O[P - 1] = arguments[P];
|
|
1498
1498
|
T = T.apply(void 0, O);
|
|
1499
1499
|
}
|
|
1500
1500
|
if (T === !0 && (T = void 0), !T) {
|
|
1501
1501
|
if (T === void 0 || T === !1) return T;
|
|
1502
|
-
throw new Error("`".concat(
|
|
1502
|
+
throw new Error("`".concat(w, "` was specified but was not a node, or did not return a node"));
|
|
1503
1503
|
}
|
|
1504
1504
|
var D, S = T;
|
|
1505
|
-
if (typeof T == "string" && !(S = (D = this.getDocument()) === null || D === void 0 ? void 0 : D.querySelector(T))) throw new Error("`".concat(
|
|
1505
|
+
if (typeof T == "string" && !(S = (D = this.getDocument()) === null || D === void 0 ? void 0 : D.querySelector(T))) throw new Error("`".concat(w, "` as selector refers to no known node"));
|
|
1506
1506
|
return S;
|
|
1507
1507
|
}), f.handleDeactivate = f.handleDeactivate.bind(f), f.handlePostDeactivate = f.handlePostDeactivate.bind(f), f.handleClickOutsideDeactivates = f.handleClickOutsideDeactivates.bind(f), f.internalOptions = { returnFocusOnDeactivate: !1, checkCanReturnFocus: null, onDeactivate: f.handleDeactivate, onPostDeactivate: f.handlePostDeactivate, clickOutsideDeactivates: f.handleClickOutsideDeactivates }, f.originalOptions = { returnFocusOnDeactivate: !0, onDeactivate: null, onPostDeactivate: null, checkCanReturnFocus: null, clickOutsideDeactivates: !1 };
|
|
1508
|
-
var
|
|
1509
|
-
for (var u in
|
|
1508
|
+
var y = h.focusTrapOptions;
|
|
1509
|
+
for (var u in y) Object.prototype.hasOwnProperty.call(y, u) && (u !== "returnFocusOnDeactivate" && u !== "onDeactivate" && u !== "onPostDeactivate" && u !== "checkCanReturnFocus" && u !== "clickOutsideDeactivates" ? f.internalOptions[u] = y[u] : f.originalOptions[u] = y[u]);
|
|
1510
1510
|
return f.outsideClick = null, f.focusTrapElements = h.containerElements || [], f.updatePreviousElement(), f;
|
|
1511
1511
|
}
|
|
1512
1512
|
return (function(h, f) {
|
|
@@ -1529,8 +1529,8 @@ var qn, Qn, la = (function() {
|
|
|
1529
1529
|
this.originalOptions.onDeactivate && this.originalOptions.onDeactivate.call(null), this.deactivateTrap();
|
|
1530
1530
|
} }, { key: "handlePostDeactivate", value: function() {
|
|
1531
1531
|
var h = this, f = function() {
|
|
1532
|
-
var
|
|
1533
|
-
u &&
|
|
1532
|
+
var y = h.getReturnFocusNode(), u = !(!h.originalOptions.returnFocusOnDeactivate || y == null || !y.focus || h.outsideClick && (!h.outsideClick.allowDeactivation || p(h.outsideClick.target, h.internalOptions.tabbableOptions))), w = h.internalOptions.preventScroll, E = w !== void 0 && w;
|
|
1533
|
+
u && y.focus({ preventScroll: E }), h.originalOptions.onPostDeactivate && h.originalOptions.onPostDeactivate.call(null), h.outsideClick = null;
|
|
1534
1534
|
};
|
|
1535
1535
|
this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(f, f) : f();
|
|
1536
1536
|
} }, { key: "setupFocusTrap", value: function() {
|
|
@@ -1540,9 +1540,9 @@ var qn, Qn, la = (function() {
|
|
|
1540
1540
|
} }, { key: "componentDidUpdate", value: function(h) {
|
|
1541
1541
|
if (this.focusTrap) {
|
|
1542
1542
|
h.containerElements !== this.props.containerElements && this.focusTrap.updateContainerElements(this.props.containerElements);
|
|
1543
|
-
var f = !h.active && this.props.active,
|
|
1544
|
-
if (f && (this.updatePreviousElement(), this.focusTrap.activate()),
|
|
1545
|
-
u && this.focusTrap.pause(),
|
|
1543
|
+
var f = !h.active && this.props.active, y = h.active && !this.props.active, u = !h.paused && this.props.paused, w = h.paused && !this.props.paused;
|
|
1544
|
+
if (f && (this.updatePreviousElement(), this.focusTrap.activate()), y) return void this.deactivateTrap();
|
|
1545
|
+
u && this.focusTrap.pause(), w && this.focusTrap.unpause();
|
|
1546
1546
|
} else h.containerElements !== this.props.containerElements && (this.focusTrapElements = this.props.containerElements), this.props.active && (this.updatePreviousElement(), this.setupFocusTrap());
|
|
1547
1547
|
} }, { key: "componentWillUnmount", value: function() {
|
|
1548
1548
|
this.deactivateTrap();
|
|
@@ -1550,15 +1550,15 @@ var qn, Qn, la = (function() {
|
|
|
1550
1550
|
var h = this, f = this.props.children ? l.Children.only(this.props.children) : void 0;
|
|
1551
1551
|
if (f) {
|
|
1552
1552
|
if (f.type && f.type === l.Fragment) throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");
|
|
1553
|
-
return l.cloneElement(f, { ref: function(
|
|
1553
|
+
return l.cloneElement(f, { ref: function(y) {
|
|
1554
1554
|
var u = h.props.containerElements;
|
|
1555
|
-
f && (typeof f.ref == "function" ? f.ref(
|
|
1555
|
+
f && (typeof f.ref == "function" ? f.ref(y) : f.ref && (f.ref.current = y)), h.focusTrapElements = u || [y];
|
|
1556
1556
|
} });
|
|
1557
1557
|
}
|
|
1558
1558
|
return null;
|
|
1559
1559
|
} }]);
|
|
1560
|
-
})(l.Component),
|
|
1561
|
-
return
|
|
1560
|
+
})(l.Component), m = typeof Element > "u" ? Function : Element;
|
|
1561
|
+
return x.propTypes = { active: i.bool, paused: i.bool, focusTrapOptions: i.shape({ document: i.object, onActivate: i.func, onPostActivate: i.func, checkCanFocusTrap: i.func, onPause: i.func, onPostPause: i.func, onUnpause: i.func, onPostUnpause: i.func, onDeactivate: i.func, onPostDeactivate: i.func, checkCanReturnFocus: i.func, initialFocus: i.oneOfType([i.instanceOf(m), i.string, i.bool, i.func]), fallbackFocus: i.oneOfType([i.instanceOf(m), i.string, i.func]), escapeDeactivates: i.oneOfType([i.bool, i.func]), clickOutsideDeactivates: i.oneOfType([i.bool, i.func]), returnFocusOnDeactivate: i.bool, setReturnFocus: i.oneOfType([i.instanceOf(m), i.string, i.bool, i.func]), allowOutsideClick: i.oneOfType([i.bool, i.func]), preventScroll: i.bool, tabbableOptions: i.shape({ displayCheck: i.oneOf(["full", "legacy-full", "non-zero-area", "none"]), getShadowRoot: i.oneOfType([i.bool, i.func]) }), trapStack: i.array, isKeyForward: i.func, isKeyBackward: i.func }), containerElements: i.arrayOf(i.instanceOf(m)), children: i.oneOfType([i.element, i.instanceOf(m)]) }, x.defaultProps = { active: !0, paused: !1, focusTrapOptions: {}, _createFocusTrap: c }, qn = x;
|
|
1562
1562
|
})();
|
|
1563
1563
|
const ca = Ar(la);
|
|
1564
1564
|
var Jn, yt = { exports: {} }, Zn = {}, Pt = { exports: {} }, er, ye = {}, Ue = {};
|
|
@@ -1578,10 +1578,10 @@ function Ht() {
|
|
|
1578
1578
|
var tr, nr, Ye = {};
|
|
1579
1579
|
function bn() {
|
|
1580
1580
|
if (nr) return ye;
|
|
1581
|
-
nr = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.addClassName = o, ye.addEvent = function(i, c, p,
|
|
1581
|
+
nr = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.addClassName = o, ye.addEvent = function(i, c, p, x) {
|
|
1582
1582
|
if (!i) return;
|
|
1583
|
-
const
|
|
1584
|
-
i.addEventListener ? i.addEventListener(c, p,
|
|
1583
|
+
const m = { capture: !0, ...x };
|
|
1584
|
+
i.addEventListener ? i.addEventListener(c, p, m) : i.attachEvent ? i.attachEvent("on" + c, p) : i["on" + c] = p;
|
|
1585
1585
|
}, ye.addUserSelectStyles = function(i) {
|
|
1586
1586
|
if (!i) return;
|
|
1587
1587
|
let c = i.getElementById("react-draggable-style-el");
|
|
@@ -1607,16 +1607,16 @@ function bn() {
|
|
|
1607
1607
|
const p = i.ownerDocument.defaultView.getComputedStyle(i);
|
|
1608
1608
|
return c -= (0, e.int)(p.paddingLeft), c -= (0, e.int)(p.paddingRight), c;
|
|
1609
1609
|
}, ye.matchesSelector = t, ye.matchesSelectorAndParentsTo = function(i, c, p) {
|
|
1610
|
-
let
|
|
1610
|
+
let x = i;
|
|
1611
1611
|
do {
|
|
1612
|
-
if (t(
|
|
1613
|
-
if (
|
|
1614
|
-
|
|
1615
|
-
} while (
|
|
1612
|
+
if (t(x, c)) return !0;
|
|
1613
|
+
if (x === p) return !1;
|
|
1614
|
+
x = x.parentNode;
|
|
1615
|
+
} while (x);
|
|
1616
1616
|
return !1;
|
|
1617
1617
|
}, ye.offsetXYFromParent = function(i, c, p) {
|
|
1618
|
-
const
|
|
1619
|
-
return { x:
|
|
1618
|
+
const x = c === c.ownerDocument.body ? { left: 0, top: 0 } : c.getBoundingClientRect(), m = (i.clientX + c.scrollLeft - x.left) / p, b = (i.clientY + c.scrollTop - x.top) / p;
|
|
1619
|
+
return { x: m, y: b };
|
|
1620
1620
|
}, ye.outerHeight = function(i) {
|
|
1621
1621
|
let c = i.clientHeight;
|
|
1622
1622
|
const p = i.ownerDocument.defaultView.getComputedStyle(i);
|
|
@@ -1625,48 +1625,48 @@ function bn() {
|
|
|
1625
1625
|
let c = i.clientWidth;
|
|
1626
1626
|
const p = i.ownerDocument.defaultView.getComputedStyle(i);
|
|
1627
1627
|
return c += (0, e.int)(p.borderLeftWidth), c += (0, e.int)(p.borderRightWidth), c;
|
|
1628
|
-
}, ye.removeClassName = l, ye.removeEvent = function(i, c, p,
|
|
1628
|
+
}, ye.removeClassName = l, ye.removeEvent = function(i, c, p, x) {
|
|
1629
1629
|
if (!i) return;
|
|
1630
|
-
const
|
|
1631
|
-
i.removeEventListener ? i.removeEventListener(c, p,
|
|
1630
|
+
const m = { capture: !0, ...x };
|
|
1631
|
+
i.removeEventListener ? i.removeEventListener(c, p, m) : i.detachEvent ? i.detachEvent("on" + c, p) : i["on" + c] = null;
|
|
1632
1632
|
}, ye.scheduleRemoveUserSelectStyles = function(i) {
|
|
1633
1633
|
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
1634
1634
|
a(i);
|
|
1635
1635
|
}) : a(i);
|
|
1636
1636
|
};
|
|
1637
1637
|
var e = Ht(), r = (function(i, c) {
|
|
1638
|
-
if (typeof WeakMap == "function") var p = /* @__PURE__ */ new WeakMap(),
|
|
1639
|
-
return (function(
|
|
1640
|
-
if (!b &&
|
|
1641
|
-
var v, h, f = { __proto__: null, default:
|
|
1642
|
-
if (
|
|
1643
|
-
if (v = b ?
|
|
1644
|
-
if (v.has(
|
|
1645
|
-
v.set(
|
|
1638
|
+
if (typeof WeakMap == "function") var p = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap();
|
|
1639
|
+
return (function(m, b) {
|
|
1640
|
+
if (!b && m && m.__esModule) return m;
|
|
1641
|
+
var v, h, f = { __proto__: null, default: m };
|
|
1642
|
+
if (m === null || typeof m != "object" && typeof m != "function") return f;
|
|
1643
|
+
if (v = b ? x : p) {
|
|
1644
|
+
if (v.has(m)) return v.get(m);
|
|
1645
|
+
v.set(m, f);
|
|
1646
1646
|
}
|
|
1647
|
-
for (const
|
|
1647
|
+
for (const y in m) y !== "default" && {}.hasOwnProperty.call(m, y) && ((h = (v = Object.defineProperty) && Object.getOwnPropertyDescriptor(m, y)) && (h.get || h.set) ? v(f, y, h) : f[y] = m[y]);
|
|
1648
1648
|
return f;
|
|
1649
1649
|
})(i, c);
|
|
1650
1650
|
})((function() {
|
|
1651
1651
|
if (tr) return Ye;
|
|
1652
|
-
tr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.browserPrefixToKey = p, Ye.browserPrefixToStyle = function(
|
|
1653
|
-
return
|
|
1652
|
+
tr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.browserPrefixToKey = p, Ye.browserPrefixToStyle = function(x, m) {
|
|
1653
|
+
return m ? `-${m.toLowerCase()}-${x}` : x;
|
|
1654
1654
|
}, Ye.default = void 0, Ye.getPrefix = c;
|
|
1655
1655
|
const i = ["Moz", "Webkit", "O", "ms"];
|
|
1656
1656
|
function c() {
|
|
1657
|
-
let
|
|
1657
|
+
let x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
1658
1658
|
if (typeof window > "u") return "";
|
|
1659
|
-
const
|
|
1660
|
-
if (!
|
|
1661
|
-
for (let b = 0; b < i.length; b++) if (p(
|
|
1659
|
+
const m = window.document?.documentElement?.style;
|
|
1660
|
+
if (!m || x in m) return "";
|
|
1661
|
+
for (let b = 0; b < i.length; b++) if (p(x, i[b]) in m) return i[b];
|
|
1662
1662
|
return "";
|
|
1663
1663
|
}
|
|
1664
|
-
function p(
|
|
1665
|
-
return
|
|
1664
|
+
function p(x, m) {
|
|
1665
|
+
return m ? `${m}${(function(b) {
|
|
1666
1666
|
let v = "", h = !0;
|
|
1667
1667
|
for (let f = 0; f < b.length; f++) h ? (v += b[f].toUpperCase(), h = !1) : b[f] === "-" ? h = !0 : v += b[f];
|
|
1668
1668
|
return v;
|
|
1669
|
-
})(
|
|
1669
|
+
})(x)}` : x;
|
|
1670
1670
|
}
|
|
1671
1671
|
return Ye.default = c(), Ye;
|
|
1672
1672
|
})());
|
|
@@ -1677,7 +1677,7 @@ function bn() {
|
|
|
1677
1677
|
})), !!(0, e.isFunction)(i[n]) && i[n](c);
|
|
1678
1678
|
}
|
|
1679
1679
|
function s(i, c, p) {
|
|
1680
|
-
let { x
|
|
1680
|
+
let { x, y: m } = i, b = `translate(${x}${p},${m}${p})`;
|
|
1681
1681
|
return c && (b = `translate(${`${typeof c.x == "string" ? c.x : c.x + p}`}, ${`${typeof c.y == "string" ? c.y : c.y + p}`})` + b), b;
|
|
1682
1682
|
}
|
|
1683
1683
|
function a(i) {
|
|
@@ -1722,8 +1722,8 @@ function fo() {
|
|
|
1722
1722
|
const { ownerDocument: i } = l, c = i.defaultView;
|
|
1723
1723
|
let p;
|
|
1724
1724
|
if (o === "parent" ? p = l.parentNode : p = l.getRootNode().querySelector(o), !(p instanceof c.HTMLElement)) throw new Error('Bounds selector "' + o + '" could not find an element.');
|
|
1725
|
-
const
|
|
1726
|
-
o = { left: -l.offsetLeft + (0, e.int)(b.paddingLeft) + (0, e.int)(
|
|
1725
|
+
const x = p, m = c.getComputedStyle(l), b = c.getComputedStyle(x);
|
|
1726
|
+
o = { left: -l.offsetLeft + (0, e.int)(b.paddingLeft) + (0, e.int)(m.marginLeft), top: -l.offsetTop + (0, e.int)(b.paddingTop) + (0, e.int)(m.marginTop), right: (0, r.innerWidth)(x) - (0, r.outerWidth)(l) - l.offsetLeft + (0, e.int)(b.paddingRight) - (0, e.int)(m.marginRight), bottom: (0, r.innerHeight)(x) - (0, r.outerHeight)(l) - l.offsetTop + (0, e.int)(b.paddingBottom) - (0, e.int)(m.marginBottom) };
|
|
1727
1727
|
}
|
|
1728
1728
|
return (0, e.isNum)(o.right) && (s = Math.min(s, o.right)), (0, e.isNum)(o.bottom) && (a = Math.min(a, o.bottom)), (0, e.isNum)(o.left) && (s = Math.max(s, o.left)), (0, e.isNum)(o.top) && (a = Math.max(a, o.top)), [s, a];
|
|
1729
1729
|
}, je.getControlPosition = function(t, s, a) {
|
|
@@ -1753,15 +1753,15 @@ function ua() {
|
|
|
1753
1753
|
ir = 1, Object.defineProperty(bt, "__esModule", { value: !0 }), bt.default = void 0;
|
|
1754
1754
|
var e = (function(b, v) {
|
|
1755
1755
|
if (typeof WeakMap == "function") var h = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap();
|
|
1756
|
-
return (function(
|
|
1757
|
-
if (!u &&
|
|
1758
|
-
var
|
|
1759
|
-
if (
|
|
1760
|
-
if (
|
|
1761
|
-
if (
|
|
1762
|
-
|
|
1756
|
+
return (function(y, u) {
|
|
1757
|
+
if (!u && y && y.__esModule) return y;
|
|
1758
|
+
var w, E, T = { __proto__: null, default: y };
|
|
1759
|
+
if (y === null || typeof y != "object" && typeof y != "function") return T;
|
|
1760
|
+
if (w = u ? f : h) {
|
|
1761
|
+
if (w.has(y)) return w.get(y);
|
|
1762
|
+
w.set(y, T);
|
|
1763
1763
|
}
|
|
1764
|
-
for (const L in
|
|
1764
|
+
for (const L in y) L !== "default" && {}.hasOwnProperty.call(y, L) && ((E = (w = Object.defineProperty) && Object.getOwnPropertyDescriptor(y, L)) && (E.get || E.set) ? w(T, L, E) : T[L] = y[L]);
|
|
1765
1765
|
return T;
|
|
1766
1766
|
})(b, v);
|
|
1767
1767
|
})(q), r = l(yn()), n = l(Rr), t = bn(), s = fo(), a = Ht(), o = l(ho());
|
|
@@ -1770,21 +1770,21 @@ function ua() {
|
|
|
1770
1770
|
}
|
|
1771
1771
|
function i(b, v, h) {
|
|
1772
1772
|
return (v = (function(f) {
|
|
1773
|
-
var
|
|
1773
|
+
var y = (function(u, w) {
|
|
1774
1774
|
if (typeof u != "object" || !u) return u;
|
|
1775
1775
|
var E = u[Symbol.toPrimitive];
|
|
1776
1776
|
if (E !== void 0) {
|
|
1777
|
-
var T = E.call(u,
|
|
1777
|
+
var T = E.call(u, w);
|
|
1778
1778
|
if (typeof T != "object") return T;
|
|
1779
1779
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1780
1780
|
}
|
|
1781
|
-
return (
|
|
1781
|
+
return (w === "string" ? String : Number)(u);
|
|
1782
1782
|
})(f, "string");
|
|
1783
|
-
return typeof
|
|
1783
|
+
return typeof y == "symbol" ? y : y + "";
|
|
1784
1784
|
})(v)) in b ? Object.defineProperty(b, v, { value: h, enumerable: !0, configurable: !0, writable: !0 }) : b[v] = h, b;
|
|
1785
1785
|
}
|
|
1786
1786
|
const c = { start: "touchstart", move: "touchmove", stop: "touchend" }, p = { start: "mousedown", move: "mousemove", stop: "mouseup" };
|
|
1787
|
-
let
|
|
1787
|
+
let x = p, m = class extends e.Component {
|
|
1788
1788
|
constructor() {
|
|
1789
1789
|
super(...arguments), i(this, "dragging", !1), i(this, "lastX", NaN), i(this, "lastY", NaN), i(this, "touchIdentifier", null), i(this, "mounted", !1), i(this, "handleDragStart", (b) => {
|
|
1790
1790
|
if (this.props.onMouseDown(b), !this.props.allowAnyClick && typeof b.button == "number" && b.button !== 0) return !1;
|
|
@@ -1795,26 +1795,26 @@ function ua() {
|
|
|
1795
1795
|
b.type !== "touchstart" || this.props.allowMobileScroll || b.preventDefault();
|
|
1796
1796
|
const f = (0, t.getTouchIdentifier)(b);
|
|
1797
1797
|
this.touchIdentifier = f;
|
|
1798
|
-
const
|
|
1799
|
-
if (
|
|
1800
|
-
const { x: u, y:
|
|
1801
|
-
(0, o.default)("DraggableCore: handleDragStart: %j", E), (0, o.default)("calling", this.props.onStart), this.props.onStart(b, E) !== !1 && this.mounted !== !1 && (this.props.enableUserSelectHack && (0, t.addUserSelectStyles)(h), this.dragging = !0, this.lastX = u, this.lastY =
|
|
1798
|
+
const y = (0, s.getControlPosition)(b, f, this);
|
|
1799
|
+
if (y == null) return;
|
|
1800
|
+
const { x: u, y: w } = y, E = (0, s.createCoreData)(this, u, w);
|
|
1801
|
+
(0, o.default)("DraggableCore: handleDragStart: %j", E), (0, o.default)("calling", this.props.onStart), this.props.onStart(b, E) !== !1 && this.mounted !== !1 && (this.props.enableUserSelectHack && (0, t.addUserSelectStyles)(h), this.dragging = !0, this.lastX = u, this.lastY = w, (0, t.addEvent)(h, x.move, this.handleDrag), (0, t.addEvent)(h, x.stop, this.handleDragStop));
|
|
1802
1802
|
}), i(this, "handleDrag", (b) => {
|
|
1803
1803
|
const v = (0, s.getControlPosition)(b, this.touchIdentifier, this);
|
|
1804
1804
|
if (v == null) return;
|
|
1805
1805
|
let { x: h, y: f } = v;
|
|
1806
1806
|
if (Array.isArray(this.props.grid)) {
|
|
1807
|
-
let u = h - this.lastX,
|
|
1808
|
-
if ([u,
|
|
1809
|
-
h = this.lastX + u, f = this.lastY +
|
|
1807
|
+
let u = h - this.lastX, w = f - this.lastY;
|
|
1808
|
+
if ([u, w] = (0, s.snapToGrid)(this.props.grid, u, w), !u && !w) return;
|
|
1809
|
+
h = this.lastX + u, f = this.lastY + w;
|
|
1810
1810
|
}
|
|
1811
|
-
const
|
|
1812
|
-
if ((0, o.default)("DraggableCore: handleDrag: %j",
|
|
1811
|
+
const y = (0, s.createCoreData)(this, h, f);
|
|
1812
|
+
if ((0, o.default)("DraggableCore: handleDrag: %j", y), this.props.onDrag(b, y) !== !1 && this.mounted !== !1) this.lastX = h, this.lastY = f;
|
|
1813
1813
|
else try {
|
|
1814
1814
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
1815
1815
|
} catch {
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1816
|
+
const w = document.createEvent("MouseEvents");
|
|
1817
|
+
w.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(w);
|
|
1818
1818
|
}
|
|
1819
1819
|
}), i(this, "handleDragStop", (b) => {
|
|
1820
1820
|
if (!this.dragging) return;
|
|
@@ -1822,14 +1822,14 @@ function ua() {
|
|
|
1822
1822
|
if (v == null) return;
|
|
1823
1823
|
let { x: h, y: f } = v;
|
|
1824
1824
|
if (Array.isArray(this.props.grid)) {
|
|
1825
|
-
let
|
|
1826
|
-
[
|
|
1825
|
+
let w = h - this.lastX || 0, E = f - this.lastY || 0;
|
|
1826
|
+
[w, E] = (0, s.snapToGrid)(this.props.grid, w, E), h = this.lastX + w, f = this.lastY + E;
|
|
1827
1827
|
}
|
|
1828
|
-
const
|
|
1829
|
-
if (this.props.onStop(b,
|
|
1828
|
+
const y = (0, s.createCoreData)(this, h, f);
|
|
1829
|
+
if (this.props.onStop(b, y) === !1 || this.mounted === !1) return !1;
|
|
1830
1830
|
const u = this.findDOMNode();
|
|
1831
|
-
u && this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(u.ownerDocument), (0, o.default)("DraggableCore: handleDragStop: %j",
|
|
1832
|
-
}), i(this, "onMouseDown", (b) => (
|
|
1831
|
+
u && this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(u.ownerDocument), (0, o.default)("DraggableCore: handleDragStop: %j", y), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, u && ((0, o.default)("DraggableCore: Removing handlers"), (0, t.removeEvent)(u.ownerDocument, x.move, this.handleDrag), (0, t.removeEvent)(u.ownerDocument, x.stop, this.handleDragStop));
|
|
1832
|
+
}), i(this, "onMouseDown", (b) => (x = p, this.handleDragStart(b))), i(this, "onMouseUp", (b) => (x = p, this.handleDragStop(b))), i(this, "onTouchStart", (b) => (x = c, this.handleDragStart(b))), i(this, "onTouchEnd", (b) => (x = c, this.handleDragStop(b)));
|
|
1833
1833
|
}
|
|
1834
1834
|
componentDidMount() {
|
|
1835
1835
|
this.mounted = !0;
|
|
@@ -1851,9 +1851,9 @@ function ua() {
|
|
|
1851
1851
|
return e.cloneElement(e.Children.only(this.props.children), { onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp, onTouchEnd: this.onTouchEnd });
|
|
1852
1852
|
}
|
|
1853
1853
|
};
|
|
1854
|
-
return bt.default =
|
|
1854
|
+
return bt.default = m, i(m, "displayName", "DraggableCore"), i(m, "propTypes", { allowAnyClick: r.default.bool, allowMobileScroll: r.default.bool, children: r.default.node.isRequired, disabled: r.default.bool, enableUserSelectHack: r.default.bool, offsetParent: function(b, v) {
|
|
1855
1855
|
if (b[v] && b[v].nodeType !== 1) throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
1856
|
-
}, grid: r.default.arrayOf(r.default.number), handle: r.default.string, cancel: r.default.string, nodeRef: r.default.object, onStart: r.default.func, onDrag: r.default.func, onStop: r.default.func, onMouseDown: r.default.func, scale: r.default.number, className: a.dontSetMe, style: a.dontSetMe, transform: a.dontSetMe }), i(
|
|
1856
|
+
}, grid: r.default.arrayOf(r.default.number), handle: r.default.string, cancel: r.default.string, nodeRef: r.default.object, onStart: r.default.func, onDrag: r.default.func, onStop: r.default.func, onMouseDown: r.default.func, scale: r.default.number, className: a.dontSetMe, style: a.dontSetMe, transform: a.dontSetMe }), i(m, "defaultProps", { allowAnyClick: !1, allowMobileScroll: !1, disabled: !1, enableUserSelectHack: !0, onStart: function() {
|
|
1857
1857
|
}, onDrag: function() {
|
|
1858
1858
|
}, onStop: function() {
|
|
1859
1859
|
}, onMouseDown: function() {
|
|
@@ -1865,12 +1865,12 @@ function da() {
|
|
|
1865
1865
|
return i.default;
|
|
1866
1866
|
} }), e.default = void 0;
|
|
1867
1867
|
var r = (function(v, h) {
|
|
1868
|
-
if (typeof WeakMap == "function") var f = /* @__PURE__ */ new WeakMap(),
|
|
1869
|
-
return (function(u,
|
|
1870
|
-
if (!
|
|
1868
|
+
if (typeof WeakMap == "function") var f = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap();
|
|
1869
|
+
return (function(u, w) {
|
|
1870
|
+
if (!w && u && u.__esModule) return u;
|
|
1871
1871
|
var E, T, L = { __proto__: null, default: u };
|
|
1872
1872
|
if (u === null || typeof u != "object" && typeof u != "function") return L;
|
|
1873
|
-
if (E =
|
|
1873
|
+
if (E = w ? y : f) {
|
|
1874
1874
|
if (E.has(u)) return E.get(u);
|
|
1875
1875
|
E.set(u, L);
|
|
1876
1876
|
}
|
|
@@ -1880,75 +1880,75 @@ function da() {
|
|
|
1880
1880
|
})(q), n = p(yn()), t = p(Rr), s = (function() {
|
|
1881
1881
|
if (Jn) return Pt.exports;
|
|
1882
1882
|
function v(f) {
|
|
1883
|
-
var
|
|
1884
|
-
if (typeof f == "string" || typeof f == "number")
|
|
1883
|
+
var y, u, w = "";
|
|
1884
|
+
if (typeof f == "string" || typeof f == "number") w += f;
|
|
1885
1885
|
else if (typeof f == "object") if (Array.isArray(f)) {
|
|
1886
1886
|
var E = f.length;
|
|
1887
|
-
for (
|
|
1888
|
-
} else for (u in f) f[u] && (
|
|
1889
|
-
return
|
|
1887
|
+
for (y = 0; y < E; y++) f[y] && (u = v(f[y])) && (w && (w += " "), w += u);
|
|
1888
|
+
} else for (u in f) f[u] && (w && (w += " "), w += u);
|
|
1889
|
+
return w;
|
|
1890
1890
|
}
|
|
1891
1891
|
function h() {
|
|
1892
|
-
for (var f,
|
|
1893
|
-
return
|
|
1892
|
+
for (var f, y, u = 0, w = "", E = arguments.length; u < E; u++) (f = arguments[u]) && (y = v(f)) && (w && (w += " "), w += y);
|
|
1893
|
+
return w;
|
|
1894
1894
|
}
|
|
1895
1895
|
return Jn = 1, Pt.exports = h, Pt.exports.clsx = h, Pt.exports;
|
|
1896
1896
|
})(), a = bn(), o = fo(), l = Ht(), i = p(ua()), c = p(ho());
|
|
1897
1897
|
function p(v) {
|
|
1898
1898
|
return v && v.__esModule ? v : { default: v };
|
|
1899
1899
|
}
|
|
1900
|
-
function
|
|
1901
|
-
return
|
|
1900
|
+
function x() {
|
|
1901
|
+
return x = Object.assign ? Object.assign.bind() : function(v) {
|
|
1902
1902
|
for (var h = 1; h < arguments.length; h++) {
|
|
1903
1903
|
var f = arguments[h];
|
|
1904
|
-
for (var
|
|
1904
|
+
for (var y in f) ({}).hasOwnProperty.call(f, y) && (v[y] = f[y]);
|
|
1905
1905
|
}
|
|
1906
1906
|
return v;
|
|
1907
|
-
},
|
|
1907
|
+
}, x.apply(null, arguments);
|
|
1908
1908
|
}
|
|
1909
|
-
function
|
|
1910
|
-
return (h = (function(
|
|
1911
|
-
var u = (function(
|
|
1912
|
-
if (typeof
|
|
1913
|
-
var T =
|
|
1909
|
+
function m(v, h, f) {
|
|
1910
|
+
return (h = (function(y) {
|
|
1911
|
+
var u = (function(w, E) {
|
|
1912
|
+
if (typeof w != "object" || !w) return w;
|
|
1913
|
+
var T = w[Symbol.toPrimitive];
|
|
1914
1914
|
if (T !== void 0) {
|
|
1915
|
-
var L = T.call(
|
|
1915
|
+
var L = T.call(w, E);
|
|
1916
1916
|
if (typeof L != "object") return L;
|
|
1917
1917
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1918
1918
|
}
|
|
1919
|
-
return (E === "string" ? String : Number)(
|
|
1920
|
-
})(
|
|
1919
|
+
return (E === "string" ? String : Number)(w);
|
|
1920
|
+
})(y, "string");
|
|
1921
1921
|
return typeof u == "symbol" ? u : u + "";
|
|
1922
1922
|
})(h)) in v ? Object.defineProperty(v, h, { value: f, enumerable: !0, configurable: !0, writable: !0 }) : v[h] = f, v;
|
|
1923
1923
|
}
|
|
1924
1924
|
class b extends r.Component {
|
|
1925
1925
|
static getDerivedStateFromProps(h, f) {
|
|
1926
|
-
let { position:
|
|
1927
|
-
return !
|
|
1926
|
+
let { position: y } = h, { prevPropsPosition: u } = f;
|
|
1927
|
+
return !y || u && y.x === u.x && y.y === u.y ? null : ((0, c.default)("Draggable: getDerivedStateFromProps %j", { position: y, prevPropsPosition: u }), { x: y.x, y: y.y, prevPropsPosition: { ...y } });
|
|
1928
1928
|
}
|
|
1929
1929
|
constructor(h) {
|
|
1930
|
-
super(h),
|
|
1931
|
-
if ((0, c.default)("Draggable: onDragStart: %j",
|
|
1930
|
+
super(h), m(this, "onDragStart", (f, y) => {
|
|
1931
|
+
if ((0, c.default)("Draggable: onDragStart: %j", y), this.props.onStart(f, (0, o.createDraggableData)(this, y)) === !1) return !1;
|
|
1932
1932
|
this.setState({ dragging: !0, dragged: !0 });
|
|
1933
|
-
}),
|
|
1933
|
+
}), m(this, "onDrag", (f, y) => {
|
|
1934
1934
|
if (!this.state.dragging) return !1;
|
|
1935
|
-
(0, c.default)("Draggable: onDrag: %j",
|
|
1936
|
-
const u = (0, o.createDraggableData)(this,
|
|
1935
|
+
(0, c.default)("Draggable: onDrag: %j", y);
|
|
1936
|
+
const u = (0, o.createDraggableData)(this, y), w = { x: u.x, y: u.y, slackX: 0, slackY: 0 };
|
|
1937
1937
|
if (this.props.bounds) {
|
|
1938
|
-
const { x: E, y: T } =
|
|
1939
|
-
|
|
1940
|
-
const [L, O] = (0, o.getBoundPosition)(this,
|
|
1941
|
-
|
|
1938
|
+
const { x: E, y: T } = w;
|
|
1939
|
+
w.x += this.state.slackX, w.y += this.state.slackY;
|
|
1940
|
+
const [L, O] = (0, o.getBoundPosition)(this, w.x, w.y);
|
|
1941
|
+
w.x = L, w.y = O, w.slackX = this.state.slackX + (E - w.x), w.slackY = this.state.slackY + (T - w.y), u.x = w.x, u.y = w.y, u.deltaX = w.x - this.state.x, u.deltaY = w.y - this.state.y;
|
|
1942
1942
|
}
|
|
1943
1943
|
if (this.props.onDrag(f, u) === !1) return !1;
|
|
1944
|
-
this.setState(
|
|
1945
|
-
}),
|
|
1946
|
-
if (!this.state.dragging || this.props.onStop(f, (0, o.createDraggableData)(this,
|
|
1947
|
-
(0, c.default)("Draggable: onDragStop: %j",
|
|
1944
|
+
this.setState(w);
|
|
1945
|
+
}), m(this, "onDragStop", (f, y) => {
|
|
1946
|
+
if (!this.state.dragging || this.props.onStop(f, (0, o.createDraggableData)(this, y)) === !1) return !1;
|
|
1947
|
+
(0, c.default)("Draggable: onDragStop: %j", y);
|
|
1948
1948
|
const u = { dragging: !1, slackX: 0, slackY: 0 };
|
|
1949
1949
|
if (this.props.position) {
|
|
1950
|
-
const { x, y: E } = this.props.position;
|
|
1951
|
-
u.x =
|
|
1950
|
+
const { x: w, y: E } = this.props.position;
|
|
1951
|
+
u.x = w, u.y = E;
|
|
1952
1952
|
}
|
|
1953
1953
|
this.setState(u);
|
|
1954
1954
|
}), this.state = { dragging: !1, dragged: !1, x: h.position ? h.position.x : h.defaultPosition.x, y: h.position ? h.position.y : h.defaultPosition.y, prevPropsPosition: { ...h.position }, slackX: 0, slackY: 0, isElementSVG: !1 }, !h.position || h.onDrag || h.onStop || console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
|
|
@@ -1963,15 +1963,15 @@ function da() {
|
|
|
1963
1963
|
return this.props?.nodeRef?.current ?? t.default.findDOMNode(this);
|
|
1964
1964
|
}
|
|
1965
1965
|
render() {
|
|
1966
|
-
const { axis: h, bounds: f, children:
|
|
1966
|
+
const { axis: h, bounds: f, children: y, defaultPosition: u, defaultClassName: w, defaultClassNameDragging: E, defaultClassNameDragged: T, position: L, positionOffset: O, scale: P, ...D } = this.props;
|
|
1967
1967
|
let S = {}, _ = null;
|
|
1968
1968
|
const M = !L || this.state.dragging, F = L || u, A = { x: (0, o.canDragX)(this) && M ? this.state.x : F.x, y: (0, o.canDragY)(this) && M ? this.state.y : F.y };
|
|
1969
1969
|
this.state.isElementSVG ? _ = (0, a.createSVGTransform)(A, O) : S = (0, a.createCSSTransform)(A, O);
|
|
1970
|
-
const V = (0, s.clsx)(
|
|
1971
|
-
return r.createElement(i.default,
|
|
1970
|
+
const V = (0, s.clsx)(y.props.className || "", w, { [E]: this.state.dragging, [T]: this.state.dragged });
|
|
1971
|
+
return r.createElement(i.default, x({}, D, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), r.cloneElement(r.Children.only(y), { className: V, style: { ...y.props.style, ...S }, transform: _ }));
|
|
1972
1972
|
}
|
|
1973
1973
|
}
|
|
1974
|
-
e.default = b,
|
|
1974
|
+
e.default = b, m(b, "displayName", "Draggable"), m(b, "propTypes", { ...i.default.propTypes, axis: n.default.oneOf(["both", "x", "y", "none"]), bounds: n.default.oneOfType([n.default.shape({ left: n.default.number, right: n.default.number, top: n.default.number, bottom: n.default.number }), n.default.string, n.default.oneOf([!1])]), defaultClassName: n.default.string, defaultClassNameDragging: n.default.string, defaultClassNameDragged: n.default.string, defaultPosition: n.default.shape({ x: n.default.number, y: n.default.number }), positionOffset: n.default.shape({ x: n.default.oneOfType([n.default.number, n.default.string]), y: n.default.oneOfType([n.default.number, n.default.string]) }), position: n.default.shape({ x: n.default.number, y: n.default.number }), className: l.dontSetMe, style: l.dontSetMe, transform: l.dontSetMe }), m(b, "defaultProps", { ...i.default.defaultProps, axis: "both", bounds: !1, defaultClassName: "react-draggable", defaultClassNameDragging: "react-draggable-dragging", defaultClassNameDragged: "react-draggable-dragged", defaultPosition: { x: 0, y: 0 }, scale: 1 });
|
|
1975
1975
|
})(Zn)), Zn;
|
|
1976
1976
|
}
|
|
1977
1977
|
var pa = (function() {
|
|
@@ -1981,25 +1981,25 @@ var pa = (function() {
|
|
|
1981
1981
|
return yt.exports = e, yt.exports.default = e, yt.exports.DraggableCore = r, yt.exports;
|
|
1982
1982
|
})();
|
|
1983
1983
|
const fa = Ar(pa), lr = { x: 0, y: 0 }, ha = ie(de((e, r) => {
|
|
1984
|
-
const { defaultPosition: n = lr, PaperComponent: t = Et, onDragStop: s, rootSel: a = ".MuiModal-root", handleSel: o = ".draggable-title", titleSize: l, rootSize: i, ...c } = e, p = ge(null),
|
|
1984
|
+
const { defaultPosition: n = lr, PaperComponent: t = Et, onDragStop: s, rootSel: a = ".MuiModal-root", handleSel: o = ".draggable-title", titleSize: l, rootSize: i, ...c } = e, p = ge(null), x = Z(() => l && i ? { left: 0, top: 0, right: i.width - l.width, bottom: i.height - l.height } : null, [l, i]), [m, b] = re(null), [v, h] = re(null), [f, y] = re(null);
|
|
1985
1985
|
return Cr(() => {
|
|
1986
|
-
!
|
|
1986
|
+
!m && n && b(n ?? lr);
|
|
1987
1987
|
}, [n]), De(() => {
|
|
1988
|
-
|
|
1989
|
-
}, [
|
|
1988
|
+
x && m && h({ x: Math.max(0, Math.min(m.x, x.right)), y: Math.max(0, Math.min(m.y, x.bottom)) });
|
|
1989
|
+
}, [m, x]), k(fa, { nodeRef: p, handle: o, cancel: '[class*="MuiDialogContent-root"]', position: v, bounds: x ?? ".MuiModal-root", onStop: s, onStart: (u, w) => {
|
|
1990
1990
|
const E = u;
|
|
1991
|
-
|
|
1992
|
-
}, onDrag: (u,
|
|
1991
|
+
y({ x: (E.clientX ?? E.touches?.[0]?.clientX) - w.x, y: (E.clientY ?? E.touches?.[0]?.clientY) - w.y });
|
|
1992
|
+
}, onDrag: (u, w) => {
|
|
1993
1993
|
const E = u, T = E.clientX ?? E.touches?.[0]?.clientX, L = E.clientY ?? E.touches?.[0]?.clientY;
|
|
1994
1994
|
b({ x: T - f.x, y: L - f.y });
|
|
1995
1995
|
}, children: k(t, { ref: At([p, r]), ...c }) });
|
|
1996
1996
|
})), ma = { x: "50", y: "50" }, ga = ie(de((e, r) => {
|
|
1997
|
-
const n = ti({ props: e, name: "MuiDialog" }), t = dn(), s = { enter: 0.66 * t.transitions.duration.enteringScreen, exit: 0.66 * t.transitions.duration.leavingScreen }, { title: a = "SheetXL", key: o = "draggable-window", onCancel: l, onDone: i, onShow: c, onShown: p, onHide:
|
|
1997
|
+
const n = ti({ props: e, name: "MuiDialog" }), t = dn(), s = { enter: 0.66 * t.transitions.duration.enteringScreen, exit: 0.66 * t.transitions.duration.leavingScreen }, { title: a = "SheetXL", key: o = "draggable-window", onCancel: l, onDone: i, onShow: c, onShown: p, onHide: x, onClose: m, open: b, autoFocusSel: v, children: h, transitionDuration: f = s, TransitionProps: y, slots: u = Te.EmptyArray, slotProps: w = Te.EmptyArray, sx: E, className: T, onMouseDown: L, initialPosition: O = ma, isModal: P = !1, ...D } = n;
|
|
1998
1998
|
let S = u.transition ?? Wo;
|
|
1999
1999
|
const _ = u.backdrop ?? Ho, M = u.paper ?? Et;
|
|
2000
|
-
let F =
|
|
2001
|
-
|
|
2002
|
-
const A =
|
|
2000
|
+
let F = w.transition;
|
|
2001
|
+
y && (F = { ...y, ...F });
|
|
2002
|
+
const A = w.backdrop, V = w.paper, B = ge(null), [z, ee] = re(null), [G, Q] = re(!1), [oe, se] = re(!1), te = ge(null), [le, ce] = En(), d = ge(null), [g, C] = En(), N = ge(null);
|
|
2003
2003
|
De(() => {
|
|
2004
2004
|
z && Q(b);
|
|
2005
2005
|
}, [b, z]);
|
|
@@ -2010,7 +2010,7 @@ const fa = Ar(pa), lr = { x: 0, y: 0 }, ha = ie(de((e, r) => {
|
|
|
2010
2010
|
if (ce.width === 0 && ce.height === 0 || z) return;
|
|
2011
2011
|
const $ = N.current?.getBoundingClientRect(), ke = ce.height - $.height, ft = ce.width - $.width;
|
|
2012
2012
|
let He = 0.5 * ft, Yt = 0.5 * ke;
|
|
2013
|
-
typeof O?.x == "number" ? He = O.x : typeof O?.x == "string" && (He = ft * (parseFloat(O.x) / 100)), typeof O?.y == "number" ? Yt = O.y : typeof O?.y == "string" && (Yt = ke * (parseFloat(O.y) / 100)),
|
|
2013
|
+
typeof O?.x == "number" ? He = O.x : typeof O?.x == "string" && (He = ft * (parseFloat(O.x) / 100)), typeof O?.y == "number" ? Yt = O.y : typeof O?.y == "string" && (Yt = ke * (parseFloat(O.y) / 100)), ee({ x: He, y: Yt });
|
|
2014
2014
|
}, [ce, C]);
|
|
2015
2015
|
const [R, j] = re(!1), [H, U] = re(null), [K, ne] = re(null), ue = ae(($) => {
|
|
2016
2016
|
if (H) return H.focus($), !0;
|
|
@@ -2027,7 +2027,7 @@ const fa = Ar(pa), lr = { x: 0, y: 0 }, ha = ie(de((e, r) => {
|
|
|
2027
2027
|
const ke = K;
|
|
2028
2028
|
ke && requestAnimationFrame(() => {
|
|
2029
2029
|
he.current?.contains(document.activeElement) && ke.focus();
|
|
2030
|
-
}),
|
|
2030
|
+
}), x?.(), se(!1), F?.onExit?.($);
|
|
2031
2031
|
}, onEntered: ($, ke) => {
|
|
2032
2032
|
c?.(), F?.onEntered?.($, ke);
|
|
2033
2033
|
}, onEntering: ($, ke) => {
|
|
@@ -2038,13 +2038,13 @@ const fa = Ar(pa), lr = { x: 0, y: 0 }, ha = ie(de((e, r) => {
|
|
|
2038
2038
|
}, [oe]);
|
|
2039
2039
|
let Ce = k(ca, { focusTrapOptions: { escapeDeactivates: !1, allowOutsideClick: !0, initialFocus: !1 }, ref: B, active: oe, children: k(S, { in: G, timeout: f, role: "presentation", ...Le, children: k(X, { className: "MuiDialog-container", ref: d, tabIndex: 0, sx: { outline: "none", position: "relative" }, onKeyDown: ($) => {
|
|
2040
2040
|
$.which === Pe.Escape && (I(), te.current?.start($, { center: !1 }), setTimeout(() => te.current?.stop($), 180)), $.stopPropagation();
|
|
2041
|
-
}, children: J(ha, { ref: At([N, r]), className: Oe({ "Mui-focusVisible": R }, T, "draggable"), sx: { "& *": ($) => Kr($), pointerEvents: "auto", userSelect: "none", "&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: ($) => `solid ${me($.palette.text?.primary, 0.2)} 1px` }, "&.Mui-focusVisible": { outline: ($) => `solid ${me($.palette.text?.primary, 0.2)} 1px` }, position: "absolute", maxWidth: "100%", ...E }, defaultPosition: z, titleSize: C, rootSize: ce, PaperComponent: M, ...D, ...V, children: [a ? k(Uo, { className: Oe({ "Mui-selected": R }, "draggable-title"), sx: { cursor: "move", display: "flex", color: ($) => $.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: ($) => `${$.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: ($) => $.transitions.duration.shortest / 2 + "ms" }, backgroundColor: ($) => me($.palette.action.hover, 0.03) }, ref:
|
|
2041
|
+
}, children: J(ha, { ref: At([N, r]), className: Oe({ "Mui-focusVisible": R }, T, "draggable"), sx: { "& *": ($) => Kr($), pointerEvents: "auto", userSelect: "none", "&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: ($) => `solid ${me($.palette.text?.primary, 0.2)} 1px` }, "&.Mui-focusVisible": { outline: ($) => `solid ${me($.palette.text?.primary, 0.2)} 1px` }, position: "absolute", maxWidth: "100%", ...E }, defaultPosition: z, titleSize: C, rootSize: ce, PaperComponent: M, ...D, ...V, children: [a ? k(Uo, { className: Oe({ "Mui-selected": R }, "draggable-title"), sx: { cursor: "move", display: "flex", color: ($) => $.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: ($) => `${$.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: ($) => $.transitions.duration.shortest / 2 + "ms" }, backgroundColor: ($) => me($.palette.action.hover, 0.03) }, ref: g, children: J(X, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: ($) => $.spacing(1), marginLeft: ($) => $.spacing(1), marginRight: ($) => $.spacing(1) }, children: [k(X, { sx: { flex: "1 1 100%", paddingLeft: ($) => $.spacing(1) }, children: a }), k(pt, { label: "Close", children: k(Ze, { "aria-label": "close", sx: { color: ($) => $.palette.text.icon ?? $.palette.action.active }, touchRippleRef: te, onPointerDown: ($) => {
|
|
2042
2042
|
te.current?.start($, { center: !1 }), $.stopPropagation(), $.preventDefault();
|
|
2043
2043
|
}, onPointerUp: I, children: k(be, { iconKey: "Close" }) }) })] }) }) : null, h] }) }) }) }), Y = null;
|
|
2044
2044
|
P && (Y = k(_, { ...A, open: G, onMouseDown: ($) => {
|
|
2045
2045
|
I(), A?.onMouseDown?.($);
|
|
2046
2046
|
}, onClick: ($) => {
|
|
2047
|
-
|
|
2047
|
+
m?.($, "backdropClick"), A?.onClick?.($);
|
|
2048
2048
|
}, sx: { pointerEvents: "auto", ...A?.sx } }));
|
|
2049
2049
|
const { getPortalContainer: pe } = ln();
|
|
2050
2050
|
return ni(J(X, { className: "MuiModal-root", sx: { position: "fixed", zIndex: "1300", right: "0", bottom: "0", top: "0", left: "0", outline: "0", display: "block", pointerEvents: "none" }, ref: At([he, le]), onPointerDown: ($) => {
|
|
@@ -2233,24 +2233,24 @@ function Dr(e, r, n = "validate") {
|
|
|
2233
2233
|
if (Fe(e) || Array.isArray(e) && e.every(Fe) || $e(e) && !e) return { type: n, message: Fe(e) ? e : "", ref: r };
|
|
2234
2234
|
}
|
|
2235
2235
|
var ot = (e) => we(e) && !jt(e) ? e : { value: e, message: "" }, Sr = async (e, r, n, t, s, a) => {
|
|
2236
|
-
const { ref: o, refs: l, required: i, maxLength: c, minLength: p, min:
|
|
2237
|
-
if (!
|
|
2238
|
-
const
|
|
2239
|
-
s &&
|
|
2236
|
+
const { ref: o, refs: l, required: i, maxLength: c, minLength: p, min: x, max: m, pattern: b, validate: v, name: h, valueAsNumber: f, mount: y } = e._f, u = W(n, h);
|
|
2237
|
+
if (!y || r.has(h)) return {};
|
|
2238
|
+
const w = l ? l[0] : o, E = (M) => {
|
|
2239
|
+
s && w.reportValidity && (w.setCustomValidity($e(M) ? "" : M || ""), w.reportValidity());
|
|
2240
2240
|
}, T = {}, L = Dn(o), O = Dt(o), P = L || O, D = (f || kn(o)) && xe(o.value) && xe(u) || Bt(o) && o.value === "" || u === "" || Array.isArray(u) && !u.length, S = Fa.bind(null, h, t, T), _ = (M, F, A, V = Ma, B = Ta) => {
|
|
2241
2241
|
const z = M ? F : A;
|
|
2242
2242
|
T[h] = { type: M ? V : B, message: z, ref: o, ...S(M ? V : B, z) };
|
|
2243
2243
|
};
|
|
2244
2244
|
if (a ? !Array.isArray(u) || !u.length : i && (!P && (D || Re(u)) || $e(u) && !u || O && !So(l).isValid || L && !Co(l).isValid)) {
|
|
2245
2245
|
const { value: M, message: F } = Fe(i) ? { value: !!i, message: i } : ot(i);
|
|
2246
|
-
if (M && (T[h] = { type: fr, message: F, ref:
|
|
2246
|
+
if (M && (T[h] = { type: fr, message: F, ref: w, ...S(fr, F) }, !t)) return E(F), T;
|
|
2247
2247
|
}
|
|
2248
|
-
if (!(D || Re(
|
|
2248
|
+
if (!(D || Re(x) && Re(m))) {
|
|
2249
2249
|
let M, F;
|
|
2250
|
-
const A = ot(
|
|
2250
|
+
const A = ot(m), V = ot(x);
|
|
2251
2251
|
if (Re(u) || isNaN(u)) {
|
|
2252
|
-
const B = o.valueAsDate || new Date(u), z = (Q) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Q),
|
|
2253
|
-
Fe(A.value) && u && (M =
|
|
2252
|
+
const B = o.valueAsDate || new Date(u), z = (Q) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Q), ee = o.type == "time", G = o.type == "week";
|
|
2253
|
+
Fe(A.value) && u && (M = ee ? z(u) > z(A.value) : G ? u > A.value : B > new Date(A.value)), Fe(V.value) && u && (F = ee ? z(u) < z(V.value) : G ? u < V.value : B < new Date(V.value));
|
|
2254
2254
|
} else {
|
|
2255
2255
|
const B = o.valueAsNumber || u && +u;
|
|
2256
2256
|
Re(A.value) || (M = B > A.value), Re(V.value) || (F = B < V.value);
|
|
@@ -2267,16 +2267,16 @@ var ot = (e) => we(e) && !jt(e) ? e : { value: e, message: "" }, Sr = async (e,
|
|
|
2267
2267
|
}
|
|
2268
2268
|
if (v) {
|
|
2269
2269
|
if (Be(v)) {
|
|
2270
|
-
const M = Dr(await v(u, n),
|
|
2270
|
+
const M = Dr(await v(u, n), w);
|
|
2271
2271
|
if (M && (T[h] = { ...M, ...S(Pa, M.message) }, !t)) return E(M.message), T;
|
|
2272
2272
|
} else if (we(v)) {
|
|
2273
2273
|
let M = {};
|
|
2274
2274
|
for (const F in v) {
|
|
2275
2275
|
if (!Ne(M) && !t) break;
|
|
2276
|
-
const A = Dr(await v[F](u, n),
|
|
2276
|
+
const A = Dr(await v[F](u, n), w, F);
|
|
2277
2277
|
A && (M = { ...A, ...S(F, A.message) }, E(A.message), t && (T[h] = M));
|
|
2278
2278
|
}
|
|
2279
|
-
if (!Ne(M) && (T[h] = { ref:
|
|
2279
|
+
if (!Ne(M) && (T[h] = { ref: w, ...M }, !t)) return T;
|
|
2280
2280
|
}
|
|
2281
2281
|
}
|
|
2282
2282
|
return E(!0), T;
|
|
@@ -2285,52 +2285,52 @@ const Ia = { mode: vo, reValidateMode: bo, shouldFocusError: !0 };
|
|
|
2285
2285
|
function Va(e = {}) {
|
|
2286
2286
|
let r, n = { ...Ia, ...e }, t = { submitCount: 0, isDirty: !1, isReady: !1, isLoading: Be(n.defaultValues), isValidating: !1, isSubmitted: !1, isSubmitting: !1, isSubmitSuccessful: !1, isValid: !1, touchedFields: {}, dirtyFields: {}, validatingFields: {}, errors: n.errors || {}, disabled: n.disabled || !1 }, s = {}, a = (we(n.defaultValues) || we(n.values)) && Se(n.defaultValues || n.values) || {}, o = n.shouldUnregister ? {} : Se(a), l = { action: !1, mount: !1, watch: !1 }, i = { mount: /* @__PURE__ */ new Set(), disabled: /* @__PURE__ */ new Set(), unMount: /* @__PURE__ */ new Set(), array: /* @__PURE__ */ new Set(), watch: /* @__PURE__ */ new Set() }, c = 0;
|
|
2287
2287
|
const p = { isDirty: !1, dirtyFields: !1, validatingFields: !1, touchedFields: !1, isValidating: !1, isValid: !1, errors: !1 };
|
|
2288
|
-
let
|
|
2289
|
-
const
|
|
2290
|
-
if (!n.disabled && (p.isValid ||
|
|
2291
|
-
const
|
|
2292
|
-
|
|
2293
|
-
}
|
|
2294
|
-
}, h = (d,
|
|
2295
|
-
!n.disabled && (p.isValidating || p.validatingFields ||
|
|
2296
|
-
C && (
|
|
2297
|
-
}),
|
|
2298
|
-
}, f = (d,
|
|
2288
|
+
let x = { ...p };
|
|
2289
|
+
const m = { array: hr(), state: hr() }, b = n.criteriaMode === Ct, v = async (d) => {
|
|
2290
|
+
if (!n.disabled && (p.isValid || x.isValid || d)) {
|
|
2291
|
+
const g = n.resolver ? Ne((await w()).errors) : await E(s, !0);
|
|
2292
|
+
g !== t.isValid && m.state.next({ isValid: g });
|
|
2293
|
+
}
|
|
2294
|
+
}, h = (d, g) => {
|
|
2295
|
+
!n.disabled && (p.isValidating || p.validatingFields || x.isValidating || x.validatingFields) && ((d || Array.from(i.mount)).forEach((C) => {
|
|
2296
|
+
C && (g ? fe(t.validatingFields, C, g) : ve(t.validatingFields, C));
|
|
2297
|
+
}), m.state.next({ validatingFields: t.validatingFields, isValidating: !Ne(t.validatingFields) }));
|
|
2298
|
+
}, f = (d, g, C, N) => {
|
|
2299
2299
|
const I = W(s, d);
|
|
2300
2300
|
if (I) {
|
|
2301
2301
|
const R = W(o, d, xe(C) ? W(a, d) : C);
|
|
2302
|
-
xe(R) || N && N.defaultChecked ||
|
|
2302
|
+
xe(R) || N && N.defaultChecked || g ? fe(o, d, g ? R : br(I._f)) : O(d, R), l.mount && v();
|
|
2303
2303
|
}
|
|
2304
|
-
},
|
|
2304
|
+
}, y = (d, g, C, N, I) => {
|
|
2305
2305
|
let R = !1, j = !1;
|
|
2306
2306
|
const H = { name: d };
|
|
2307
2307
|
if (!n.disabled) {
|
|
2308
2308
|
if (!C || N) {
|
|
2309
|
-
(p.isDirty ||
|
|
2310
|
-
const U = qe(W(a, d),
|
|
2311
|
-
j = !!W(t.dirtyFields, d), U ? ve(t.dirtyFields, d) : fe(t.dirtyFields, d, !0), H.dirtyFields = t.dirtyFields, R = R || (p.dirtyFields ||
|
|
2309
|
+
(p.isDirty || x.isDirty) && (j = t.isDirty, t.isDirty = H.isDirty = T(), R = j !== H.isDirty);
|
|
2310
|
+
const U = qe(W(a, d), g);
|
|
2311
|
+
j = !!W(t.dirtyFields, d), U ? ve(t.dirtyFields, d) : fe(t.dirtyFields, d, !0), H.dirtyFields = t.dirtyFields, R = R || (p.dirtyFields || x.dirtyFields) && j !== !U;
|
|
2312
2312
|
}
|
|
2313
2313
|
if (C) {
|
|
2314
2314
|
const U = W(t.touchedFields, d);
|
|
2315
|
-
U || (fe(t.touchedFields, d, C), H.touchedFields = t.touchedFields, R = R || (p.touchedFields ||
|
|
2315
|
+
U || (fe(t.touchedFields, d, C), H.touchedFields = t.touchedFields, R = R || (p.touchedFields || x.touchedFields) && U !== C);
|
|
2316
2316
|
}
|
|
2317
|
-
R && I &&
|
|
2317
|
+
R && I && m.state.next(H);
|
|
2318
2318
|
}
|
|
2319
2319
|
return R ? H : {};
|
|
2320
|
-
}, u = (d,
|
|
2321
|
-
const I = W(t.errors, d), R = (p.isValid ||
|
|
2320
|
+
}, u = (d, g, C, N) => {
|
|
2321
|
+
const I = W(t.errors, d), R = (p.isValid || x.isValid) && $e(g) && t.isValid !== g;
|
|
2322
2322
|
var j;
|
|
2323
2323
|
if (n.delayError && C ? (j = () => ((H, U) => {
|
|
2324
|
-
fe(t.errors, H, U),
|
|
2324
|
+
fe(t.errors, H, U), m.state.next({ errors: t.errors });
|
|
2325
2325
|
})(d, C), r = (H) => {
|
|
2326
2326
|
clearTimeout(c), c = setTimeout(j, H);
|
|
2327
2327
|
}, r(n.delayError)) : (clearTimeout(c), r = null, C ? fe(t.errors, d, C) : ve(t.errors, d)), (C ? !qe(I, C) : I) || !Ne(N) || R) {
|
|
2328
|
-
const H = { ...N, ...R && $e(
|
|
2329
|
-
t = { ...t, ...H },
|
|
2328
|
+
const H = { ...N, ...R && $e(g) ? { isValid: g } : {}, errors: t.errors, name: d };
|
|
2329
|
+
t = { ...t, ...H }, m.state.next(H);
|
|
2330
2330
|
}
|
|
2331
|
-
},
|
|
2331
|
+
}, w = async (d) => {
|
|
2332
2332
|
h(d, !0);
|
|
2333
|
-
const
|
|
2333
|
+
const g = await n.resolver(o, n.context, ((C, N, I, R) => {
|
|
2334
2334
|
const j = {};
|
|
2335
2335
|
for (const H of C) {
|
|
2336
2336
|
const U = W(N, H);
|
|
@@ -2338,8 +2338,8 @@ function Va(e = {}) {
|
|
|
2338
2338
|
}
|
|
2339
2339
|
return { criteriaMode: I, names: [...C], fields: j, shouldUseNativeValidation: R };
|
|
2340
2340
|
})(d || i.mount, s, n.criteriaMode, n.shouldUseNativeValidation));
|
|
2341
|
-
return h(d),
|
|
2342
|
-
}, E = async (d,
|
|
2341
|
+
return h(d), g;
|
|
2342
|
+
}, E = async (d, g, C = { valid: !0 }) => {
|
|
2343
2343
|
for (const N in d) {
|
|
2344
2344
|
const I = d[N];
|
|
2345
2345
|
if (I) {
|
|
@@ -2347,63 +2347,63 @@ function Va(e = {}) {
|
|
|
2347
2347
|
if (R) {
|
|
2348
2348
|
const H = i.array.has(R.name), U = I._f && _a(I._f);
|
|
2349
2349
|
U && p.validatingFields && h([R.name], !0);
|
|
2350
|
-
const K = await Sr(I, i.disabled, o, b, n.shouldUseNativeValidation && !
|
|
2351
|
-
if (U && p.validatingFields && h([R.name]), K[R.name] && (C.valid = !1,
|
|
2352
|
-
!
|
|
2350
|
+
const K = await Sr(I, i.disabled, o, b, n.shouldUseNativeValidation && !g, H);
|
|
2351
|
+
if (U && p.validatingFields && h([R.name]), K[R.name] && (C.valid = !1, g)) break;
|
|
2352
|
+
!g && (W(K, R.name) ? H ? Aa(t.errors, K, R.name) : fe(t.errors, R.name, K[R.name]) : ve(t.errors, R.name));
|
|
2353
2353
|
}
|
|
2354
|
-
!Ne(j) && await E(j,
|
|
2354
|
+
!Ne(j) && await E(j, g, C);
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
2357
|
return C.valid;
|
|
2358
|
-
}, T = (d,
|
|
2358
|
+
}, T = (d, g) => !n.disabled && (d && g && fe(o, d, g), !qe(F(), a)), L = (d, g, C) => ((N, I, R, j, H) => Fe(N) ? (j && I.watch.add(N), W(R, N, H)) : Array.isArray(N) ? N.map((U) => (j && I.watch.add(U), W(R, U))) : (j && (I.watchAll = !0), R))(d, i, { ...l.mount ? o : xe(g) ? a : Fe(d) ? { [d]: g } : g }, C, g), O = (d, g, C = {}) => {
|
|
2359
2359
|
const N = W(s, d);
|
|
2360
|
-
let I =
|
|
2360
|
+
let I = g;
|
|
2361
2361
|
if (N) {
|
|
2362
2362
|
const R = N._f;
|
|
2363
|
-
R && (!R.disabled && fe(o, d, Oo(
|
|
2363
|
+
R && (!R.disabled && fe(o, d, Oo(g, R)), I = Bt(R.ref) && Re(g) ? "" : g, ko(R.ref) ? [...R.ref.options].forEach((j) => j.selected = I.includes(j.value)) : R.refs ? Dt(R.ref) ? R.refs.forEach((j) => {
|
|
2364
2364
|
j.defaultChecked && j.disabled || (Array.isArray(I) ? j.checked = !!I.find((H) => H === j.value) : j.checked = I === j.value || !!I);
|
|
2365
|
-
}) : R.refs.forEach((j) => j.checked = j.value === I) : kn(R.ref) ? R.ref.value = "" : (R.ref.value = I, R.ref.type ||
|
|
2365
|
+
}) : R.refs.forEach((j) => j.checked = j.value === I) : kn(R.ref) ? R.ref.value = "" : (R.ref.value = I, R.ref.type || m.state.next({ name: d, values: Se(o) })));
|
|
2366
2366
|
}
|
|
2367
|
-
(C.shouldDirty || C.shouldTouch) &&
|
|
2368
|
-
}, P = (d,
|
|
2369
|
-
for (const N in
|
|
2370
|
-
if (!
|
|
2371
|
-
const I =
|
|
2367
|
+
(C.shouldDirty || C.shouldTouch) && y(d, I, C.shouldTouch, C.shouldDirty, !0), C.shouldValidate && M(d);
|
|
2368
|
+
}, P = (d, g, C) => {
|
|
2369
|
+
for (const N in g) {
|
|
2370
|
+
if (!g.hasOwnProperty(N)) return;
|
|
2371
|
+
const I = g[N], R = d + "." + N, j = W(s, R);
|
|
2372
2372
|
(i.array.has(d) || we(I) || j && !j._f) && !tt(I) ? P(R, I, C) : O(R, I, C);
|
|
2373
2373
|
}
|
|
2374
|
-
}, D = (d,
|
|
2375
|
-
const N = W(s, d), I = i.array.has(d), R = Se(
|
|
2376
|
-
fe(o, d, R), I ? (
|
|
2374
|
+
}, D = (d, g, C = {}) => {
|
|
2375
|
+
const N = W(s, d), I = i.array.has(d), R = Se(g);
|
|
2376
|
+
fe(o, d, R), I ? (m.array.next({ name: d, values: Se(o) }), (p.isDirty || p.dirtyFields || x.isDirty || x.dirtyFields) && C.shouldDirty && m.state.next({ name: d, dirtyFields: it(a, o), isDirty: T(d, R) })) : !N || N._f || Re(R) ? O(d, R, C) : P(d, R, C), wr(d, i) && m.state.next({ ...t, name: d }), m.state.next({ name: l.mount ? d : void 0, values: Se(o) });
|
|
2377
2377
|
}, S = async (d) => {
|
|
2378
2378
|
l.mount = !0;
|
|
2379
|
-
const
|
|
2380
|
-
let C =
|
|
2379
|
+
const g = d.target;
|
|
2380
|
+
let C = g.name, N = !0;
|
|
2381
2381
|
const I = W(s, C), R = (U) => {
|
|
2382
2382
|
N = Number.isNaN(U) || tt(U) && isNaN(U.getTime()) || qe(U, W(o, C, U));
|
|
2383
2383
|
}, j = vr(n.mode), H = vr(n.reValidateMode);
|
|
2384
2384
|
if (I) {
|
|
2385
2385
|
let U, K;
|
|
2386
|
-
const ne =
|
|
2387
|
-
fe(o, C, ne), ue ?
|
|
2388
|
-
const Ce =
|
|
2389
|
-
if (!ue &&
|
|
2390
|
-
if (!ue && Le &&
|
|
2391
|
-
const { errors: pe } = await
|
|
2386
|
+
const ne = g.type ? br(I._f) : ((pe) => we(pe) && pe.target ? Dt(pe.target) ? pe.target.checked : pe.target.value : pe)(d), ue = d.type === ka || d.type === Da, he = !((pe) => pe.mount && (pe.required || pe.min || pe.max || pe.maxLength || pe.minLength || pe.pattern || pe.validate))(I._f) && !n.resolver && !W(t.errors, C) && !I._f.deps || ((pe, $, ke, ft, He) => !He.isOnAll && (!ke && He.isOnTouch ? !($ || pe) : (ke ? ft.isOnBlur : He.isOnBlur) ? !pe : !(ke ? ft.isOnChange : He.isOnChange) || pe))(ue, W(t.touchedFields, C), t.isSubmitted, H, j), Le = wr(C, i, ue);
|
|
2387
|
+
fe(o, C, ne), ue ? g && g.readOnly || (I._f.onBlur && I._f.onBlur(d), r && r(0)) : I._f.onChange && I._f.onChange(d);
|
|
2388
|
+
const Ce = y(C, ne, ue), Y = !Ne(Ce) || Le;
|
|
2389
|
+
if (!ue && m.state.next({ name: C, type: d.type, values: Se(o) }), he) return (p.isValid || x.isValid) && (n.mode === "onBlur" ? ue && v() : ue || v()), Y && m.state.next({ name: C, ...Le ? {} : Ce });
|
|
2390
|
+
if (!ue && Le && m.state.next({ ...t }), n.resolver) {
|
|
2391
|
+
const { errors: pe } = await w([C]);
|
|
2392
2392
|
if (R(ne), N) {
|
|
2393
2393
|
const $ = kr(t.errors, s, C), ke = kr(pe, s, $.name || C);
|
|
2394
2394
|
U = ke.error, C = ke.name, K = Ne(pe);
|
|
2395
2395
|
}
|
|
2396
|
-
} else h([C], !0), U = (await Sr(I, i.disabled, o, b, n.shouldUseNativeValidation))[C], h([C]), R(ne), N && (U ? K = !1 : (p.isValid ||
|
|
2396
|
+
} else h([C], !0), U = (await Sr(I, i.disabled, o, b, n.shouldUseNativeValidation))[C], h([C]), R(ne), N && (U ? K = !1 : (p.isValid || x.isValid) && (K = await E(s, !0)));
|
|
2397
2397
|
N && (I._f.deps && (!Array.isArray(I._f.deps) || I._f.deps.length > 0) && M(I._f.deps), u(C, K, U, Ce));
|
|
2398
2398
|
}
|
|
2399
|
-
}, _ = (d,
|
|
2400
|
-
if (W(t.errors,
|
|
2401
|
-
}, M = async (d,
|
|
2399
|
+
}, _ = (d, g) => {
|
|
2400
|
+
if (W(t.errors, g) && d.focus) return d.focus(), 1;
|
|
2401
|
+
}, M = async (d, g = {}) => {
|
|
2402
2402
|
let C, N;
|
|
2403
2403
|
const I = xt(d);
|
|
2404
2404
|
if (n.resolver) {
|
|
2405
2405
|
const R = await (async (j) => {
|
|
2406
|
-
const { errors: H } = await
|
|
2406
|
+
const { errors: H } = await w(j);
|
|
2407
2407
|
if (j) for (const U of j) {
|
|
2408
2408
|
const K = W(H, U);
|
|
2409
2409
|
K ? fe(t.errors, U, K) : ve(t.errors, U);
|
|
@@ -2416,58 +2416,58 @@ function Va(e = {}) {
|
|
|
2416
2416
|
const j = W(s, R);
|
|
2417
2417
|
return await E(j && j._f ? { [R]: j } : j);
|
|
2418
2418
|
}))).every(Boolean), (N || t.isValid) && v()) : N = C = await E(s);
|
|
2419
|
-
return
|
|
2420
|
-
}, F = (d,
|
|
2419
|
+
return m.state.next({ ...!Fe(d) || (p.isValid || x.isValid) && C !== t.isValid ? {} : { name: d }, ...n.resolver || !d ? { isValid: C } : {}, errors: t.errors }), g.shouldFocus && !N && St(s, _, d ? I : i.mount), N;
|
|
2420
|
+
}, F = (d, g) => {
|
|
2421
2421
|
let C = { ...l.mount ? o : a };
|
|
2422
|
-
return
|
|
2423
|
-
}, A = (d,
|
|
2422
|
+
return g && (C = wo(g.dirtyFields ? t.dirtyFields : t.touchedFields, C)), xe(d) ? C : Fe(d) ? W(C, d) : d.map((N) => W(C, N));
|
|
2423
|
+
}, A = (d, g) => ({ invalid: !!W((g || t).errors, d), isDirty: !!W((g || t).dirtyFields, d), error: W((g || t).errors, d), isValidating: !!W(t.validatingFields, d), isTouched: !!W((g || t).touchedFields, d) }), V = (d, g, C) => {
|
|
2424
2424
|
const N = (W(s, d, { _f: {} })._f || {}).ref, I = W(t.errors, d) || {}, { ref: R, message: j, type: H, ...U } = I;
|
|
2425
|
-
fe(t.errors, d, { ...U, ...
|
|
2426
|
-
}, B = (d) =>
|
|
2425
|
+
fe(t.errors, d, { ...U, ...g, ref: N }), m.state.next({ name: d, errors: t.errors, isValid: !1 }), C && C.shouldFocus && N && N.focus && N.focus();
|
|
2426
|
+
}, B = (d) => m.state.subscribe({ next: (g) => {
|
|
2427
2427
|
var C, N, I;
|
|
2428
|
-
C = d.name, N =
|
|
2428
|
+
C = d.name, N = g.name, I = d.exact, C && N && C !== N && !xt(C).some((R) => R && (I ? R === N : R.startsWith(N) || N.startsWith(R))) || !((R, j, H, U) => {
|
|
2429
2429
|
H(R);
|
|
2430
2430
|
const { name: K, ...ne } = R;
|
|
2431
2431
|
return Ne(ne) || Object.keys(ne).length >= Object.keys(j).length || Object.keys(ne).find((ue) => j[ue] === (!U || Ct));
|
|
2432
|
-
})(
|
|
2433
|
-
} }).unsubscribe, z = (d,
|
|
2434
|
-
for (const C of d ? xt(d) : i.mount) i.mount.delete(C), i.array.delete(C),
|
|
2435
|
-
|
|
2436
|
-
},
|
|
2437
|
-
($e(d) && l.mount || d || i.disabled.has(
|
|
2438
|
-
}, G = (d,
|
|
2432
|
+
})(g, d.formState || p, le, d.reRenderRoot) || d.callback({ values: { ...o }, ...t, ...g, defaultValues: a });
|
|
2433
|
+
} }).unsubscribe, z = (d, g = {}) => {
|
|
2434
|
+
for (const C of d ? xt(d) : i.mount) i.mount.delete(C), i.array.delete(C), g.keepValue || (ve(s, C), ve(o, C)), !g.keepError && ve(t.errors, C), !g.keepDirty && ve(t.dirtyFields, C), !g.keepTouched && ve(t.touchedFields, C), !g.keepIsValidating && ve(t.validatingFields, C), !n.shouldUnregister && !g.keepDefaultValue && ve(a, C);
|
|
2435
|
+
m.state.next({ values: Se(o) }), m.state.next({ ...t, ...g.keepDirty ? { isDirty: T() } : {} }), !g.keepIsValid && v();
|
|
2436
|
+
}, ee = ({ disabled: d, name: g }) => {
|
|
2437
|
+
($e(d) && l.mount || d || i.disabled.has(g)) && (d ? i.disabled.add(g) : i.disabled.delete(g));
|
|
2438
|
+
}, G = (d, g = {}) => {
|
|
2439
2439
|
let C = W(s, d);
|
|
2440
|
-
const N = $e(
|
|
2441
|
-
return fe(s, d, { ...C || {}, _f: { ...C && C._f ? C._f : { ref: { name: d } }, name: d, mount: !0, ...
|
|
2440
|
+
const N = $e(g.disabled) || $e(n.disabled);
|
|
2441
|
+
return fe(s, d, { ...C || {}, _f: { ...C && C._f ? C._f : { ref: { name: d } }, name: d, mount: !0, ...g } }), i.mount.add(d), C ? ee({ disabled: $e(g.disabled) ? g.disabled : n.disabled, name: d }) : f(d, !0, g.value), { ...N ? { disabled: g.disabled || n.disabled } : {}, ...n.progressive ? { required: !!g.required, min: vt(g.min), max: vt(g.max), minLength: vt(g.minLength), maxLength: vt(g.maxLength), pattern: vt(g.pattern) } : {}, name: d, onChange: S, onBlur: S, ref: (I) => {
|
|
2442
2442
|
if (I) {
|
|
2443
|
-
G(d,
|
|
2443
|
+
G(d, g), C = W(s, d);
|
|
2444
2444
|
const R = xe(I.value) && I.querySelectorAll && I.querySelectorAll("input,select,textarea")[0] || I, j = ((U) => Dn(U) || Dt(U))(R), H = C._f.refs || [];
|
|
2445
2445
|
if (j ? H.find((U) => U === R) : R === C._f.ref) return;
|
|
2446
2446
|
fe(s, d, { _f: { ...C._f, ...j ? { refs: [...H.filter(Jt), R, ...Array.isArray(W(a, d)) ? [{}] : []], ref: { type: R.type, name: d } } : { ref: R } } }), f(d, !1, void 0, R);
|
|
2447
|
-
} else C = W(s, d, {}), C._f && (C._f.mount = !1), (n.shouldUnregister ||
|
|
2447
|
+
} else C = W(s, d, {}), C._f && (C._f.mount = !1), (n.shouldUnregister || g.shouldUnregister) && (!((R, j) => R.has(((H) => H.substring(0, H.search(/\.\d+(\.|$)/)) || H)(j)))(i.array, d) || !l.action) && i.unMount.add(d);
|
|
2448
2448
|
} };
|
|
2449
|
-
}, Q = () => n.shouldFocusError && St(s, _, i.mount), oe = (d,
|
|
2449
|
+
}, Q = () => n.shouldFocusError && St(s, _, i.mount), oe = (d, g) => async (C) => {
|
|
2450
2450
|
let N;
|
|
2451
2451
|
C && (C.preventDefault && C.preventDefault(), C.persist && C.persist());
|
|
2452
2452
|
let I = Se(o);
|
|
2453
|
-
if (
|
|
2454
|
-
const { errors: R, values: j } = await
|
|
2453
|
+
if (m.state.next({ isSubmitting: !0 }), n.resolver) {
|
|
2454
|
+
const { errors: R, values: j } = await w();
|
|
2455
2455
|
t.errors = R, I = Se(j);
|
|
2456
2456
|
} else await E(s);
|
|
2457
2457
|
if (i.disabled.size) for (const R of i.disabled) ve(I, R);
|
|
2458
2458
|
if (ve(t.errors, "root"), Ne(t.errors)) {
|
|
2459
|
-
|
|
2459
|
+
m.state.next({ errors: {} });
|
|
2460
2460
|
try {
|
|
2461
2461
|
await d(I, C);
|
|
2462
2462
|
} catch (R) {
|
|
2463
2463
|
N = R;
|
|
2464
2464
|
}
|
|
2465
|
-
} else
|
|
2466
|
-
if (
|
|
2467
|
-
}, se = (d,
|
|
2465
|
+
} else g && await g({ ...t.errors }, C), Q(), setTimeout(Q);
|
|
2466
|
+
if (m.state.next({ isSubmitted: !0, isSubmitting: !1, isSubmitSuccessful: Ne(t.errors) && !N, submitCount: t.submitCount + 1, errors: t.errors }), N) throw N;
|
|
2467
|
+
}, se = (d, g = {}) => {
|
|
2468
2468
|
const C = d ? Se(d) : a, N = Se(C), I = Ne(d), R = I ? a : N;
|
|
2469
|
-
if (
|
|
2470
|
-
if (
|
|
2469
|
+
if (g.keepDefaultValues || (a = C), !g.keepValues) {
|
|
2470
|
+
if (g.keepDirtyValues) {
|
|
2471
2471
|
const j = /* @__PURE__ */ new Set([...i.mount, ...Object.keys(it(a, o))]);
|
|
2472
2472
|
for (const H of Array.from(j)) W(t.dirtyFields, H) ? fe(R, H, W(o, H)) : D(H, W(R, H));
|
|
2473
2473
|
} else {
|
|
@@ -2484,15 +2484,15 @@ function Va(e = {}) {
|
|
|
2484
2484
|
}
|
|
2485
2485
|
}
|
|
2486
2486
|
}
|
|
2487
|
-
if (
|
|
2487
|
+
if (g.keepFieldsRef) for (const j of i.mount) D(j, W(R, j));
|
|
2488
2488
|
else s = {};
|
|
2489
2489
|
}
|
|
2490
|
-
o = n.shouldUnregister ?
|
|
2490
|
+
o = n.shouldUnregister ? g.keepDefaultValues ? Se(a) : {} : Se(R), m.array.next({ values: { ...R } }), m.state.next({ values: { ...R } });
|
|
2491
2491
|
}
|
|
2492
|
-
i = { mount:
|
|
2493
|
-
}, te = (d,
|
|
2492
|
+
i = { mount: g.keepDirtyValues ? i.mount : /* @__PURE__ */ new Set(), unMount: /* @__PURE__ */ new Set(), array: /* @__PURE__ */ new Set(), disabled: /* @__PURE__ */ new Set(), watch: /* @__PURE__ */ new Set(), watchAll: !1, focus: "" }, l.mount = !p.isValid || !!g.keepIsValid || !!g.keepDirtyValues, l.watch = !!n.shouldUnregister, m.state.next({ submitCount: g.keepSubmitCount ? t.submitCount : 0, isDirty: !I && (g.keepDirty ? t.isDirty : !(!g.keepDefaultValues || qe(d, a))), isSubmitted: !!g.keepIsSubmitted && t.isSubmitted, dirtyFields: I ? {} : g.keepDirtyValues ? g.keepDefaultValues && o ? it(a, o) : t.dirtyFields : g.keepDefaultValues && d ? it(a, d) : g.keepDirty ? t.dirtyFields : {}, touchedFields: g.keepTouched ? t.touchedFields : {}, errors: g.keepErrors ? t.errors : {}, isSubmitSuccessful: !!g.keepIsSubmitSuccessful && t.isSubmitSuccessful, isSubmitting: !1, defaultValues: a });
|
|
2493
|
+
}, te = (d, g) => se(Be(d) ? d(o) : d, g), le = (d) => {
|
|
2494
2494
|
t = { ...t, ...d };
|
|
2495
|
-
}, ce = { control: { register: G, unregister: z, getFieldState: A, handleSubmit: oe, setError: V, _subscribe: B, _runSchema:
|
|
2495
|
+
}, ce = { control: { register: G, unregister: z, getFieldState: A, handleSubmit: oe, setError: V, _subscribe: B, _runSchema: w, _focusError: Q, _getWatch: L, _getDirty: T, _setValid: v, _setFieldArray: (d, g = [], C, N, I = !0, R = !0) => {
|
|
2496
2496
|
if (N && C && !n.disabled) {
|
|
2497
2497
|
if (l.action = !0, R && Array.isArray(W(s, d))) {
|
|
2498
2498
|
const j = C(W(s, d), N.argA, N.argB);
|
|
@@ -2504,30 +2504,30 @@ function Va(e = {}) {
|
|
|
2504
2504
|
!on(W(H, U)).length && ve(H, U);
|
|
2505
2505
|
})(t.errors, d);
|
|
2506
2506
|
}
|
|
2507
|
-
if ((p.touchedFields ||
|
|
2507
|
+
if ((p.touchedFields || x.touchedFields) && R && Array.isArray(W(t.touchedFields, d))) {
|
|
2508
2508
|
const j = C(W(t.touchedFields, d), N.argA, N.argB);
|
|
2509
2509
|
I && fe(t.touchedFields, d, j);
|
|
2510
2510
|
}
|
|
2511
|
-
(p.dirtyFields ||
|
|
2512
|
-
} else fe(o, d,
|
|
2513
|
-
}, _setDisabledField:
|
|
2514
|
-
t.errors = d,
|
|
2511
|
+
(p.dirtyFields || x.dirtyFields) && (t.dirtyFields = it(a, o)), m.state.next({ name: d, isDirty: T(d, g), dirtyFields: t.dirtyFields, errors: t.errors, isValid: t.isValid });
|
|
2512
|
+
} else fe(o, d, g);
|
|
2513
|
+
}, _setDisabledField: ee, _setErrors: (d) => {
|
|
2514
|
+
t.errors = d, m.state.next({ errors: t.errors, isValid: !1 });
|
|
2515
2515
|
}, _getFieldArray: (d) => on(W(l.mount ? o : a, d, n.shouldUnregister ? W(a, d, []) : [])), _reset: se, _resetDefaultValues: () => Be(n.defaultValues) && n.defaultValues().then((d) => {
|
|
2516
|
-
te(d, n.resetOptions),
|
|
2516
|
+
te(d, n.resetOptions), m.state.next({ isLoading: !1 });
|
|
2517
2517
|
}), _removeUnmounted: () => {
|
|
2518
2518
|
for (const d of i.unMount) {
|
|
2519
|
-
const
|
|
2520
|
-
|
|
2519
|
+
const g = W(s, d);
|
|
2520
|
+
g && (g._f.refs ? g._f.refs.every((C) => !Jt(C)) : !Jt(g._f.ref)) && z(d);
|
|
2521
2521
|
}
|
|
2522
2522
|
i.unMount = /* @__PURE__ */ new Set();
|
|
2523
2523
|
}, _disableForm: (d) => {
|
|
2524
|
-
$e(d) && (
|
|
2524
|
+
$e(d) && (m.state.next({ disabled: d }), St(s, (g, C) => {
|
|
2525
2525
|
const N = W(s, C);
|
|
2526
|
-
N && (
|
|
2526
|
+
N && (g.disabled = N._f.disabled || d, Array.isArray(N._f.refs) && N._f.refs.forEach((I) => {
|
|
2527
2527
|
I.disabled = N._f.disabled || d;
|
|
2528
2528
|
}));
|
|
2529
2529
|
}, 0, !1));
|
|
2530
|
-
}, _subjects:
|
|
2530
|
+
}, _subjects: m, _proxyFormState: p, get _fields() {
|
|
2531
2531
|
return s;
|
|
2532
2532
|
}, get _formValues() {
|
|
2533
2533
|
return o;
|
|
@@ -2547,15 +2547,15 @@ function Va(e = {}) {
|
|
|
2547
2547
|
return n;
|
|
2548
2548
|
}, set _options(d) {
|
|
2549
2549
|
n = { ...n, ...d };
|
|
2550
|
-
} }, subscribe: (d) => (l.mount = !0,
|
|
2551
|
-
W(s, d) && (xe(
|
|
2550
|
+
} }, subscribe: (d) => (l.mount = !0, x = { ...x, ...d.formState }, B({ ...d, formState: x })), trigger: M, register: G, handleSubmit: oe, watch: (d, g) => Be(d) ? m.state.subscribe({ next: (C) => "values" in C && d(L(void 0, g), C) }) : L(d, g, !0), setValue: D, getValues: F, reset: te, resetField: (d, g = {}) => {
|
|
2551
|
+
W(s, d) && (xe(g.defaultValue) ? D(d, Se(W(a, d))) : (D(d, g.defaultValue), fe(a, d, Se(g.defaultValue))), g.keepTouched || ve(t.touchedFields, d), g.keepDirty || (ve(t.dirtyFields, d), t.isDirty = g.defaultValue ? T(d, Se(W(a, d))) : T()), g.keepError || (ve(t.errors, d), p.isValid && v()), m.state.next({ ...t }));
|
|
2552
2552
|
}, clearErrors: (d) => {
|
|
2553
|
-
d && xt(d).forEach((
|
|
2554
|
-
}, unregister: z, setError: V, setFocus: (d,
|
|
2553
|
+
d && xt(d).forEach((g) => ve(t.errors, g)), m.state.next({ errors: d ? t.errors : {} });
|
|
2554
|
+
}, unregister: z, setError: V, setFocus: (d, g = {}) => {
|
|
2555
2555
|
const C = W(s, d), N = C && C._f;
|
|
2556
2556
|
if (N) {
|
|
2557
2557
|
const I = N.refs ? N.refs[0] : N.ref;
|
|
2558
|
-
I.focus && (I.focus(),
|
|
2558
|
+
I.focus && (I.focus(), g.shouldSelect && Be(I.select) && I.select());
|
|
2559
2559
|
}
|
|
2560
2560
|
}, getFieldState: A };
|
|
2561
2561
|
return { ...ce, formControl: ce };
|
|
@@ -2588,57 +2588,57 @@ function La(e = {}) {
|
|
|
2588
2588
|
a._state.mount || (a._setValid(), a._state.mount = !0), a._state.watch && (a._state.watch = !1, a._subjects.state.next({ ...a._formState })), a._removeUnmounted();
|
|
2589
2589
|
}), r.current.formState = ((o, l, i, c = !0) => {
|
|
2590
2590
|
const p = { defaultValues: l._defaultValues };
|
|
2591
|
-
for (const
|
|
2592
|
-
const
|
|
2593
|
-
return l._proxyFormState[
|
|
2591
|
+
for (const x in o) Object.defineProperty(p, x, { get: () => {
|
|
2592
|
+
const m = x;
|
|
2593
|
+
return l._proxyFormState[m] !== Ct && (l._proxyFormState[m] = !c || Ct), o[m];
|
|
2594
2594
|
} });
|
|
2595
2595
|
return p;
|
|
2596
2596
|
})(t, a), r.current;
|
|
2597
2597
|
}
|
|
2598
2598
|
const Ba = ["Ok", "Cancel"], Or = ie(de((e, r) => {
|
|
2599
|
-
const { description: n, icon: t, onCancel: s, onOption: a, onDone: o, onValidateOption: l, createOptionsButton: i, options: c = Ba, autoFocusSel: p = ".defaultOption", defaultOption:
|
|
2599
|
+
const { description: n, icon: t, onCancel: s, onOption: a, onDone: o, onValidateOption: l, createOptionsButton: i, options: c = Ba, autoFocusSel: p = ".defaultOption", defaultOption: x = c[0], cancelOption: m = "Cancel", autoFocus: b, children: v, ...h } = e, f = La({ shouldUseNativeValidation: !1 }), { handleSubmit: y, formState: u } = f, w = ge(null), E = ge(null), T = ge(null), L = ae(async (M) => {
|
|
2600
2600
|
let F;
|
|
2601
2601
|
try {
|
|
2602
2602
|
if (F = await Promise.resolve(l?.(M)) ?? !0, F !== !0) return;
|
|
2603
|
-
await Promise.resolve(a?.(M, M ===
|
|
2603
|
+
await Promise.resolve(a?.(M, M === m, M === x)), o?.(M);
|
|
2604
2604
|
} catch {
|
|
2605
2605
|
}
|
|
2606
|
-
}, [a, o, l,
|
|
2606
|
+
}, [a, o, l, m, x]), O = ae((M, F) => {
|
|
2607
2607
|
setTimeout(() => {
|
|
2608
|
-
L(
|
|
2608
|
+
L(x);
|
|
2609
2609
|
}, 180);
|
|
2610
2610
|
}, [L]), P = ae(() => {
|
|
2611
|
-
a?.(
|
|
2612
|
-
}, [a,
|
|
2613
|
-
const A = M ===
|
|
2611
|
+
a?.(m, !0, !1), s?.(), o?.(null);
|
|
2612
|
+
}, [a, m, s, o]), D = u && (Object.keys(u.errors).length > 0 || u.disabled || u.isSubmitted), S = ae((M, F) => {
|
|
2613
|
+
const A = M === m, V = { className: F ? "defaultOption" : "action", type: F ? "submit" : "button", style: { minWidth: "75px" }, onClick: () => {
|
|
2614
2614
|
A ? P() : F || L(M);
|
|
2615
2615
|
} };
|
|
2616
2616
|
if (i) return i(M, V, F);
|
|
2617
2617
|
const B = { className: F ? "defaultOption" : "action", variant: F ? "contained" : "outlined", size: "small", disabled: !A && D, color: "primary", ...V };
|
|
2618
2618
|
if (F || A) {
|
|
2619
|
-
const z = F ?
|
|
2620
|
-
B.touchRippleRef = z, B.onPointerDown = (
|
|
2621
|
-
z.current?.start(
|
|
2619
|
+
const z = F ? w : E;
|
|
2620
|
+
B.touchRippleRef = z, B.onPointerDown = (ee) => {
|
|
2621
|
+
z.current?.start(ee, { center: !1 }), ee.stopPropagation(), ee.preventDefault();
|
|
2622
2622
|
};
|
|
2623
2623
|
}
|
|
2624
2624
|
return k(Yo, { ...B, children: k("div", { style: { paddingTop: "3px" }, children: M }) }, `action:${M}`);
|
|
2625
|
-
}, [c,
|
|
2625
|
+
}, [c, x, m, i, u]), _ = Z(() => {
|
|
2626
2626
|
const M = [];
|
|
2627
2627
|
for (let F = 0; F < c.length; F++) {
|
|
2628
|
-
const A = c[F], V =
|
|
2628
|
+
const A = c[F], V = x ? A === x : F === 0;
|
|
2629
2629
|
M.push(S(A, V));
|
|
2630
2630
|
}
|
|
2631
2631
|
return M;
|
|
2632
|
-
}, [c,
|
|
2633
|
-
return k(ga, { onCancel: P, initialPosition: { y: wa === "touch" ? "15" : "35" }, onDone: o, autoFocusSel: p, isModal: !0, ref: r, ...h, children: k(Ra, { ...f, children: J("form", { ref: T, onSubmit:
|
|
2632
|
+
}, [c, x, u]);
|
|
2633
|
+
return k(ga, { onCancel: P, initialPosition: { y: wa === "touch" ? "15" : "35" }, onDone: o, autoFocusSel: p, isModal: !0, ref: r, ...h, children: k(Ra, { ...f, children: J("form", { ref: T, onSubmit: y(O), children: [k(Go, { dividers: !0, onKeyDown: (M) => {
|
|
2634
2634
|
if (M.isDefaultPrevented()) return;
|
|
2635
2635
|
M.stopPropagation();
|
|
2636
2636
|
let F = null, A = null;
|
|
2637
|
-
const V = M.which === Pe.Escape &&
|
|
2638
|
-
if (V) F =
|
|
2637
|
+
const V = M.which === Pe.Escape && m;
|
|
2638
|
+
if (V) F = m, A = E;
|
|
2639
2639
|
else {
|
|
2640
2640
|
if (D) return;
|
|
2641
|
-
M.which === Pe.Enter && (F =
|
|
2641
|
+
M.which === Pe.Enter && (F = x ?? c[0], A = w);
|
|
2642
2642
|
}
|
|
2643
2643
|
F && (A.current?.start(M, { center: !1 }), setTimeout(() => {
|
|
2644
2644
|
A.current?.stop(M), V && L(F);
|
|
@@ -2653,7 +2653,7 @@ const Ba = ["Ok", "Cancel"], Or = ie(de((e, r) => {
|
|
|
2653
2653
|
n?.onDone?.(), s.hide();
|
|
2654
2654
|
} });
|
|
2655
2655
|
});
|
|
2656
|
-
}, za = q.lazy(() => import("./
|
|
2656
|
+
}, za = q.lazy(() => import("./BEjEVDP4wDSgmkji.mjs")), Es = (e) => {
|
|
2657
2657
|
const { showModal: r } = gn();
|
|
2658
2658
|
return (n) => {
|
|
2659
2659
|
const { defaultOption: t = n.options?.[0], cancelOption: s = "Cancel", ...a } = n;
|
|
@@ -2671,54 +2671,54 @@ const Ba = ["Ok", "Cancel"], Or = ie(de((e, r) => {
|
|
|
2671
2671
|
const { command: n, disabled: t = !1, shortcut: s, children: a, ...o } = e;
|
|
2672
2672
|
return cn(n), k(pt, { ref: r, label: t !== void 0 ? n?.label() : "", shortcut: s !== void 0 ? s : Array.isArray(n?.shortcut()) ? n?.shortcut()[0] : n?.shortcut(), description: n?.description(), disabled: t, chips: n?.tags(), componentDisabled: n?.disabled(), ...o, children: k("div", { style: { display: "flex", flex: "1 1 0%" }, children: a }) });
|
|
2673
2673
|
})), Wa = k(be, {}), Eo = ie(de((e, r) => {
|
|
2674
|
-
const { command: n, commandHook: t, scope: s, context: a, icon: o, label: l, disabled: i = !1, variant: c = Ae.Toolbar, shortcut: p, commandState:
|
|
2674
|
+
const { command: n, commandHook: t, scope: s, context: a, icon: o, label: l, disabled: i = !1, variant: c = Ae.Toolbar, shortcut: p, commandState: x, tooltipProps: m, ...b } = e, v = ge(null), h = ge(!1), f = Z(() => {
|
|
2675
2675
|
const P = { onExecute(D, S) {
|
|
2676
2676
|
t?.onExecute?.(D, S), h.current || (v.current?.start({ center: !1 }), setTimeout(() => v.current?.stop({}), 180)), h.current = !1;
|
|
2677
2677
|
}, onError(D, S, _) {
|
|
2678
2678
|
t?.onError(D, S, _);
|
|
2679
2679
|
} };
|
|
2680
2680
|
return t?.beforeExecute && (P.beforeExecute = t.beforeExecute), P;
|
|
2681
|
-
}, [t]),
|
|
2681
|
+
}, [t]), y = cn(n, f), u = _e((P) => {
|
|
2682
2682
|
P.button === 0 && P.preventDefault();
|
|
2683
|
-
}, []),
|
|
2684
|
-
P.button === 0 && n?.execute(
|
|
2685
|
-
}, [
|
|
2686
|
-
P.keyCode !== Pe.Enter && P.keyCode !== Pe.Space || n?.execute(
|
|
2687
|
-
}, [
|
|
2683
|
+
}, []), w = _e((P) => {
|
|
2684
|
+
P.button === 0 && n?.execute(x, t);
|
|
2685
|
+
}, [y, t, x]), E = _e((P) => {
|
|
2686
|
+
P.keyCode !== Pe.Enter && P.keyCode !== Pe.Space || n?.execute(x, t);
|
|
2687
|
+
}, [y, t, x]), T = Z(() => {
|
|
2688
2688
|
if (o) return typeof o == "function" ? o(n) : o;
|
|
2689
2689
|
let P = n?.icon(a);
|
|
2690
2690
|
return P ? (typeof P == "string" && (P = k(be, { iconKey: P })), P) : c === Ae.Toolbar || n?.state() ? void 0 : Wa;
|
|
2691
|
-
}, [
|
|
2691
|
+
}, [y, o]), L = Z(() => ({ tabIndex: 0, ref: r, selected: n?.state(), icon: c === Ae.Toolbar ? T : k(Ii, { selected: n?.state() ?? !1, children: T }), touchRippleRef: v, disabled: i || !n || n.disabled(), onMouseDown: u, onMouseUp: w, onKeyDown: E }), [y, t, i, T]);
|
|
2692
2692
|
let O;
|
|
2693
|
-
return O = c === Ae.Menuitem ? k(Ot, { ...b, chips: n?.tags(), ...L, children: l ?? n?.label(s, a) }) : k(Wt, { ...b, ...L }), (l || n?.label()) && ((n.disabled() || i) && (O = k("div", { children: O })), O = k(Sn, { command: n, placement: c === Ae.Toolbar ? "bottom-start" : "right-start", shortcut: p, ...
|
|
2693
|
+
return O = c === Ae.Menuitem ? k(Ot, { ...b, chips: n?.tags(), ...L, children: l ?? n?.label(s, a) }) : k(Wt, { ...b, ...L }), (l || n?.label()) && ((n.disabled() || i) && (O = k("div", { children: O })), O = k(Sn, { command: n, placement: c === Ae.Toolbar ? "bottom-start" : "right-start", shortcut: p, ...m, children: O })), O;
|
|
2694
2694
|
}));
|
|
2695
2695
|
Eo.displayName = "CommandButton";
|
|
2696
2696
|
const Ha = k(be, {}), Ms = ie(de((e, r) => {
|
|
2697
|
-
const { command: n, scope: t, icon: s = Ha, label: a, variant: o = Ae.Toolbar, disabled: l = !1, commandHook: i, ...c } = e, p = ge(null),
|
|
2697
|
+
const { command: n, scope: t, icon: s = Ha, label: a, variant: o = Ae.Toolbar, disabled: l = !1, commandHook: i, ...c } = e, p = ge(null), x = ge(!1), m = Z(() => {
|
|
2698
2698
|
const O = { onExecute(P, D) {
|
|
2699
|
-
i?.onExecute?.(P, D),
|
|
2699
|
+
i?.onExecute?.(P, D), x.current || (p.current?.start({ center: !1 }), setTimeout(() => p.current?.stop({}), 180)), x.current = !1;
|
|
2700
2700
|
}, onError(P, D, S) {
|
|
2701
2701
|
i?.onError(P, D, S);
|
|
2702
2702
|
} };
|
|
2703
2703
|
return i?.beforeExecute && (O.beforeExecute = i.beforeExecute), O;
|
|
2704
|
-
}, [i]), b = cn(n,
|
|
2704
|
+
}, [i]), b = cn(n, m), v = () => n?.state()?.toString() || "0", [h, f] = re(v), y = ae(() => {
|
|
2705
2705
|
const O = parseFloat(h);
|
|
2706
2706
|
isNaN(O) ? f(v()) : parseFloat(v()) !== O && n.execute(O, i);
|
|
2707
2707
|
}, [v, n, h, i]);
|
|
2708
2708
|
De(() => {
|
|
2709
2709
|
f(v());
|
|
2710
2710
|
}, [n?.state()]);
|
|
2711
|
-
const u =
|
|
2711
|
+
const u = Z(() => {
|
|
2712
2712
|
let O = typeof s == "function" ? s(n) : s;
|
|
2713
2713
|
return O && (O = n?.icon()), typeof O == "string" && (O = k(be, { iconKey: O })), O;
|
|
2714
|
-
}, [b, s, n?.icon]),
|
|
2714
|
+
}, [b, s, n?.icon]), w = Z(() => a === void 0 ? n?.label(t) : typeof a == "function" ? a() : a, [b]), E = Z(() => k(Ze, { ...c, sx: { paddingTop: "0px", paddingBottom: "0px" }, component: "div", disableRipple: !0, onClick: (O) => O.stopPropagation(), onMouseDown: (O) => {
|
|
2715
2715
|
O.button === 0 && O.stopPropagation();
|
|
2716
2716
|
}, onMouseUp: (O) => {
|
|
2717
2717
|
O.button === 0 && O.stopPropagation();
|
|
2718
2718
|
}, children: k(Ko, { inputMode: "numeric", disabled: l || !n || n.disabled(), inputProps: { tabIndex: 0, name: `input-${n.key()}`, autoComplete: "off", type: "number", maxLength: 4 }, sx: { paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (O) => `${Math.round(O.typography.fontSize)}px`, width: (O) => "3.2em", input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield" }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: h, onFocus: (O) => {
|
|
2719
2719
|
O.target?.select();
|
|
2720
2720
|
}, onKeyDown: (O) => {
|
|
2721
|
-
if (O.which === Pe.Enter) v() !== h && (O.stopPropagation(), O.preventDefault(),
|
|
2721
|
+
if (O.which === Pe.Enter) v() !== h && (O.stopPropagation(), O.preventDefault(), y());
|
|
2722
2722
|
else if (O.which === Pe.Escape) v() !== h && (f(v()), setTimeout(() => {
|
|
2723
2723
|
O.target?.select();
|
|
2724
2724
|
}, 0), O.stopPropagation(), O.preventDefault());
|
|
@@ -2727,35 +2727,35 @@ const Ha = k(be, {}), Ms = ie(de((e, r) => {
|
|
|
2727
2727
|
if (O.which === Pe.Space) return void O.preventDefault();
|
|
2728
2728
|
}
|
|
2729
2729
|
}, onBlur: () => {
|
|
2730
|
-
|
|
2730
|
+
y();
|
|
2731
2731
|
}, onChange: (O) => {
|
|
2732
2732
|
if (O.target.value.length > 4) return O.stopPropagation(), void O.preventDefault();
|
|
2733
2733
|
f(O.target.value);
|
|
2734
2734
|
} }) }), [h, l, n]), T = { tabIndex: 0, ref: r, icon: u, touchRippleRef: p, disabled: l || !n || n.disabled(), onMouseDown: (O) => {
|
|
2735
2735
|
O.button === 0 && O.preventDefault();
|
|
2736
2736
|
}, onMouseUp: (O) => {
|
|
2737
|
-
O.button !== 0 || O.isPropagationStopped() || O.isDefaultPrevented() || O.isDefaultPrevented() || (O.preventDefault(), n?.execute(!n?.state?.(),
|
|
2737
|
+
O.button !== 0 || O.isPropagationStopped() || O.isDefaultPrevented() || O.isDefaultPrevented() || (O.preventDefault(), n?.execute(!n?.state?.(), m));
|
|
2738
2738
|
}, onKeyDown: (O) => {
|
|
2739
|
-
O.keyCode !== Pe.Enter && O.keyCode !== Pe.Space || n?.execute(!n?.state?.(),
|
|
2739
|
+
O.keyCode !== Pe.Enter && O.keyCode !== Pe.Space || n?.execute(!n?.state?.(), m);
|
|
2740
2740
|
} };
|
|
2741
2741
|
let L;
|
|
2742
|
-
return L = o === Ae.Menuitem ? J(Ot, { ...c, chips: n?.tags(), ...T, children: [
|
|
2742
|
+
return L = o === Ae.Menuitem ? J(Ot, { ...c, chips: n?.tags(), ...T, children: [w, E] }) : k(Wt, { ...c, ...T }), n?.label() && ((n.disabled() || l) && (L = k("div", { children: L })), L = k(Sn, { command: n, placement: o === Ae.Toolbar ? "bottom-start" : "right-start", children: L })), L;
|
|
2743
2743
|
})), Mo = ie(de((e, r) => {
|
|
2744
|
-
const { variant: n = Ae.Toolbar, quickCommand: t, onQuickClick: s, commands: a, commandState: o, commandHook: l, disabled: i, label: c, icon: p, createPopupPanel:
|
|
2744
|
+
const { variant: n = Ae.Toolbar, quickCommand: t, onQuickClick: s, commands: a, commandState: o, commandHook: l, disabled: i, label: c, icon: p, createPopupPanel: x, tooltip: m, selected: b, scope: v, ...h } = e, f = ge(null), y = ge(!1), u = Z(() => {
|
|
2745
2745
|
const S = { onExecute(_, M) {
|
|
2746
|
-
l?.onExecute?.(_, M),
|
|
2746
|
+
l?.onExecute?.(_, M), y.current || (f.current?.start({ center: !1 }), setTimeout(() => f.current?.stop({}), 180)), y.current = !1;
|
|
2747
2747
|
}, onError(_, M, F) {
|
|
2748
2748
|
l?.onError(_, M, F);
|
|
2749
2749
|
} };
|
|
2750
2750
|
return l?.beforeExecute && (S.beforeExecute = l.beforeExecute), S;
|
|
2751
|
-
}, [l]),
|
|
2751
|
+
}, [l]), w = un(a, [t], null, [t]), E = w[0], { label: T, icon: L } = Z(() => {
|
|
2752
2752
|
let S = null;
|
|
2753
2753
|
c && (S = typeof c == "function" ? c(E) : c), S || (S = E?.label?.(v));
|
|
2754
2754
|
let _ = p;
|
|
2755
2755
|
return _ || (_ = E?.icon?.()), typeof _ == "string" ? _ = k(be, { iconKey: _ }) : typeof _ == "function" && (_ = _(E)), { label: S, icon: _ };
|
|
2756
|
-
}, [
|
|
2757
|
-
(T ||
|
|
2758
|
-
const P = ae((S) =>
|
|
2756
|
+
}, [w, c, p]), O = { disabled: i, scope: v, touchRippleRef: f, onQuickClick: s, tooltip: m, label: T, icon: L };
|
|
2757
|
+
(T || m) && (O.createTooltip = ({ children: S }, _) => k(pt, { label: T, description: m, disabled: _, children: S }));
|
|
2758
|
+
const P = ae((S) => x?.(S, a), [x, w]), D = ae((S) => E?.execute(o, u), [E]);
|
|
2759
2759
|
return E ? (O.quickButtonProps = {}, O.quickButtonProps.createTooltip = ({ children: S, placement: _ }, M) => k(Sn, { command: E, placement: _ ?? n === Ae.Toolbar ? "bottom-start" : "right-start", disabled: M, children: S }), O.disabled = O.disabled ?? E?.disabled(), s || (O.onQuickClick = D)) : t && (O.onQuickClick = () => {
|
|
2760
2760
|
}), O.selected = b ?? E?.state(), O.createPopupPanel = P, n === Ae.Toolbar ? k(mn, { ...h, ...O, ref: r }) : k(Zr, { ...h, ...O, ref: r });
|
|
2761
2761
|
}));
|
|
@@ -2764,32 +2764,32 @@ const Ua = k(be, { iconKey: "Check" }), Ts = (e) => {
|
|
|
2764
2764
|
const { command: r, label: n, scope: t, icon: s = Ua, sx: a, ...o } = e;
|
|
2765
2765
|
return J(X, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (l) => l.typography.subtitle2.fontSize, ...a }, ...o, children: [s, k(Me, { component: "div", sx: { whiteSpace: "nowrap", lineHeight: "1", paddingLeft: (l) => l.spacing(0.25), paddingRight: (l) => l.spacing(0.25), fontSize: "inherit" }, children: r?.label(t) || n })] });
|
|
2766
2766
|
}, Ya = ie(de((e, r) => {
|
|
2767
|
-
const { sx: n, commands: t, commandButtonProps: s, parentFloat: a, createToolbarPalette: o, children: l, ...i } = e, c = Tr(r, () => ({}), []), [p,
|
|
2767
|
+
const { sx: n, commands: t, commandButtonProps: s, parentFloat: a, createToolbarPalette: o, children: l, ...i } = e, c = Tr(r, () => ({}), []), [p, x] = re(null), { reference: m } = zt({ label: "toolbar", anchor: c.current, parentFloat: a, createPopupPanel: null }), b = _e(() => {
|
|
2768
2768
|
const O = p;
|
|
2769
2769
|
O && requestAnimationFrame(() => {
|
|
2770
2770
|
c.current?.contains(document.activeElement) && O.focus();
|
|
2771
2771
|
});
|
|
2772
|
-
}, []), v =
|
|
2772
|
+
}, []), v = Z(() => ({ dense: !0, outlined: !1 }), []), h = Z(() => {
|
|
2773
2773
|
const { commandHook: O, ...P } = s || {};
|
|
2774
|
-
return { commandHook: { beforeExecute: (D, S) => O?.beforeExecute?.(D, S) !== !1 &&
|
|
2774
|
+
return { commandHook: { beforeExecute: (D, S) => O?.beforeExecute?.(D, S) !== !1 && m.closeAll(), onExecute(D, S) {
|
|
2775
2775
|
O?.onExecute?.(D, S), b();
|
|
2776
2776
|
}, onError(D, S, _) {
|
|
2777
2777
|
O?.onError?.(D, S, _);
|
|
2778
2778
|
} }, ...P };
|
|
2779
|
-
}, [
|
|
2779
|
+
}, [m, s]), f = Z(() => ({ ...v, ...h }), [v, h]), [y, u] = Ao((O) => O + 1, 0);
|
|
2780
2780
|
un(t, [], { onChange: () => {
|
|
2781
2781
|
u();
|
|
2782
2782
|
} });
|
|
2783
|
-
const
|
|
2783
|
+
const w = Z(() => ({ commands: t, parentFloat: m, ...h }), [y, f, m, s]);
|
|
2784
2784
|
let E = 0;
|
|
2785
2785
|
v.dense || (E += 2), v.outlined && E++;
|
|
2786
2786
|
let T = 2;
|
|
2787
2787
|
v.dense || (T = 4);
|
|
2788
|
-
const L =
|
|
2788
|
+
const L = Z(() => o({ commands: t, commandButtonProps: f, commandPopupProps: { commands: t, ...w, ...s } }), [y, f, w, o]);
|
|
2789
2789
|
return k(qo, { variant: "dense", sx: { minHeight: "unset", height: "unset", paddingTop: `${T}px`, paddingBottom: `${T}px`, paddingLeft: "6px !important", paddingRight: "6px !important", flex: "1 1 0%", alignItems: "center", userSelect: "none", flexGrow: 1, display: "flex", overflow: "hidden", ...n }, ref: c, onFocus: (O) => {
|
|
2790
|
-
O.relatedTarget && !p &&
|
|
2790
|
+
O.relatedTarget && !p && x(O.relatedTarget);
|
|
2791
2791
|
}, onBlur: (O) => {
|
|
2792
|
-
p && !c?.current?.contains(O.relatedTarget) &&
|
|
2792
|
+
p && !c?.current?.contains(O.relatedTarget) && x(null);
|
|
2793
2793
|
}, onKeyDown: (O) => {
|
|
2794
2794
|
p && O.which === Pe.Escape && p.focus();
|
|
2795
2795
|
}, ...i, children: k("div", { ref: c, style: { flex: "1 1 100%", display: "flex", flexWrap: "wrap", rowGap: `${T}px`, columnGap: `${E}px`, alignItems: "center", maxWidth: "100%" }, children: L }) });
|
|
@@ -2799,20 +2799,28 @@ const Ga = (e) => {
|
|
|
2799
2799
|
const { key: r, ...n } = e;
|
|
2800
2800
|
return k(Eo, { ...n }, r);
|
|
2801
2801
|
}, Ps = ie(de((e, r) => {
|
|
2802
|
-
const { popupCommandKeys: n, renderCommandButton: t = Ga, scope: s, commands: a, quickCommand: o, popupScope: l = o, commandState: i, commandHook: c, disabled: p = !1, ...
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2802
|
+
const { popupCommandKeys: n, renderCommandButton: t = Ga, scope: s, commands: a, quickCommand: o, popupScope: l = o, commandState: i, commandHook: c, disabled: p = !1, ...x } = e, m = un(a, n ? [o, ...n] : [o]), { allDisabled: b } = Z(() => {
|
|
2803
|
+
let h = 0;
|
|
2804
|
+
const f = m.length;
|
|
2805
|
+
for (let y = 0; y < f; y++) {
|
|
2806
|
+
const u = m[y];
|
|
2807
|
+
u && !u.disabled() && h++;
|
|
2808
|
+
}
|
|
2809
|
+
return { allDisabled: h === 0 };
|
|
2810
|
+
}, [m]), v = _e((h, f) => {
|
|
2811
|
+
const y = { variant: Ae.Menuitem, commandHook: c, commandState: i, scope: l ?? s, disabled: p }, u = [], w = n ? n.length : 0;
|
|
2812
|
+
for (let E = 0; E < w; E++) {
|
|
2813
|
+
const T = n[E];
|
|
2814
|
+
if (T === null || T === "-") {
|
|
2815
|
+
u.push(k(ri, { orientation: "horizontal" }, `element-${u.length}`));
|
|
2808
2816
|
continue;
|
|
2809
2817
|
}
|
|
2810
|
-
const
|
|
2811
|
-
|
|
2818
|
+
const L = f.getCommand(T), O = { key: `${T}-${u.length}`, command: L, ...y }, P = t(O);
|
|
2819
|
+
P && u.push(P);
|
|
2812
2820
|
}
|
|
2813
|
-
return hn({ ...
|
|
2821
|
+
return hn({ ...h, children: u });
|
|
2814
2822
|
}, [p, c, i, l, n, t]);
|
|
2815
|
-
return n ? k(Mo, { ref: r, commands: a, disabled: p, commandHook: c, commandState: i, scope: s, quickCommand: o, createPopupPanel:
|
|
2823
|
+
return n ? k(Mo, { ref: r, commands: a, disabled: p || b, commandHook: c, commandState: i, scope: s, quickCommand: o, createPopupPanel: v, ...x }) : t({ ref: r, disabled: p, commandHook: c, commandState: i, scope: s, command: m[0], ...x });
|
|
2816
2824
|
}));
|
|
2817
2825
|
export {
|
|
2818
2826
|
vs as $,
|