@sheetxl/utils-mui 0.7.12 → 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.
@@ -1,4 +1,4 @@
1
- import q, { memo as oe, forwardRef as de, version as To, useLayoutEffect as Cr, useEffect as Se, useState as ne, 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";
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.12
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.
@@ -32,7 +32,7 @@ const rs = (e) => {
32
32
  }, Fr = (e, r, n, t) => {
33
33
  const { style: s, ...a } = e, o = k(Ze, { component: "div", ...a, style: { ...s, padding: "0px" }, sx: { padding: "0" }, color: e.disabled ? void 0 : "primary", "aria-label": n, size: "small", children: r });
34
34
  return k(dt, { title: e.disabled ? n : t, enterDelay: 800, enterNextDelay: 1600, children: e.disabled ? k("div", { style: { display: "flex" }, children: o }) : o });
35
- }, os = (e) => Fr(e, at.Horizontal ? k(be, { iconKey: "ArrowLeft", size: "small" }) : k(be, { iconKey: "ArrowUpward", size: "small" }), "Scroll " + (e.orientation === at.Horizontal ? "Left" : "Up"), `Scroll ${e.orientation === at.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), is = (e) => Fr(e, at.Horizontal ? k(be, { iconKey: "ArrowRight", size: "small" }) : k(be, { iconKey: "ArrowDownward", size: "small" }), "Scroll " + (e.orientation === at.Horizontal ? "Right" : "Down"), `Scroll ${e.orientation === at.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), ri = oe(de((e, r) => {
35
+ }, os = (e) => Fr(e, at.Horizontal ? k(be, { iconKey: "ArrowLeft", size: "small" }) : k(be, { iconKey: "ArrowUpward", size: "small" }), "Scroll " + (e.orientation === at.Horizontal ? "Left" : "Up"), `Scroll ${e.orientation === at.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), is = (e) => Fr(e, at.Horizontal ? k(be, { iconKey: "ArrowRight", size: "small" }) : k(be, { iconKey: "ArrowDownward", size: "small" }), "Scroll " + (e.orientation === at.Horizontal ? "Right" : "Down"), `Scroll ${e.orientation === at.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), ri = ie(de((e, r) => {
36
36
  const { orientation: n = "vertical", sx: t, ...s } = e, a = n === "vertical";
37
37
  return k(Er, { ref: r, sx: { marginLeft: a ? "2px" : void 0, marginRight: a ? "2px" : void 0, backgroundColor: "transparent !important", minHeight: a ? "1em" : void 0, minWidth: a ? void 0 : "1em", borderColor: (o) => o.palette.divider, ...t }, orientation: n, variant: "middle", flexItem: !0, ...s });
38
38
  }));
@@ -81,13 +81,13 @@ function Ir(e) {
81
81
  } });
82
82
  }), n;
83
83
  }
84
- var Vr = _r ? Cr : Se, Cn = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
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 = ne(null), r = e[0], n = e[1], t = ne(Cn), s = t[0], a = t[1], o = Z(function() {
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, f = i.y, x = i.width, y = i.height, b = i.top, v = i.left, m = i.bottom, h = i.right;
90
- a({ x: c, y: f, width: x, height: y, top: b, left: v, bottom: m, right: h });
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
  }, []);
@@ -98,45 +98,45 @@ const En = _r && window.ResizeObserver !== void 0 ? function() {
98
98
  }, [r]), [n, s];
99
99
  } : function() {
100
100
  return [oi, Cn];
101
- }, ii = "_traverse-ellipsis_14l1h_1", as = oe((e) => {
101
+ }, ii = "_traverse-ellipsis_14l1h_1", as = ie((e) => {
102
102
  const { sx: r, speed: n = 2, size: t = 70, ...s } = e;
103
103
  return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { stroke: (a) => a.palette.grey[600], fill: "none" }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", strokeWidth: "4", cx: "50", cy: "50", r: "48" }), k("line", { className: "primary", strokeLinecap: "round", strokeWidth: "4", x1: "50", y1: "50", x2: "85", y2: "50.5", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) }), k("line", { className: "primary", strokeLinecap: "round", strokeWidth: "4", x1: "50", y1: "50", x2: "49.5", y2: "74", children: k("animateTransform", { attributeName: "transform", dur: 7.5 * n + "s", type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) })] }) });
104
- }), ai = oe((e) => {
104
+ }), ai = ie((e) => {
105
105
  const { sx: r, speed: n = 1.5, size: t = 70, ...s } = e;
106
106
  return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { fill: (a) => a.palette.grey[600] }, "& .secondary": { stroke: (a) => a.palette.grey[600], fill: "none", opacity: 0.5 }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "secondary", strokeWidth: "4", cx: "50", cy: "50", r: "21" }), k("path", { className: "primary", d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50", children: k("animateTransform", { attributeName: "transform", type: "rotate", dur: 1 * n + "s", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) })] }) });
107
- }), ss = oe((e) => {
107
+ }), ss = ie((e) => {
108
108
  const { sx: r, speed: n = 1, size: t = 70, ...s } = e;
109
109
  return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", cx: "6", cy: "50", r: "6", children: k("animate", { attributeName: "opacity", dur: `${n}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.1" }) }), k("circle", { className: "primary", cx: "26", cy: "50", r: "6", children: k("animate", { attributeName: "opacity", dur: `${n}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.2" }) }), k("circle", { className: "primary", cx: "46", cy: "50", r: "6", children: k("animate", { attributeName: "opacity", dur: `${n}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.3" }) })] }) });
110
- }), ls = oe((e) => {
110
+ }), ls = ie((e) => {
111
111
  const { sx: r, speed: n = 1, size: t = 70, ...s } = e;
112
112
  return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { fill: (a) => a.palette.grey[600], stroke: "none" }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", cx: "6", cy: "50", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "translate", values: "0 15 ; 0 -15; 0 15", repeatCount: "indefinite", begin: "0.1" }) }), k("circle", { className: "primary", cx: "30", cy: "50", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "translate", values: "0 10 ; 0 -10; 0 10", repeatCount: "indefinite", begin: "0.2" }) }), k("circle", { className: "primary", cx: "54", cy: "50", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "translate", values: "0 5 ; 0 -5; 0 5", repeatCount: "indefinite", begin: "0.3" }) })] }) });
113
- }), cs = oe((e) => {
113
+ }), cs = ie((e) => {
114
114
  const { sx: r, speed: n = 2, size: t = 70, ...s } = e;
115
115
  return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { stroke: (a) => a.palette.grey[600], opacity: 0.5, fill: "none" }, "& .secondary": { fillOpacity: (a) => a.palette.grey[600], opacity: 0.8, stroke: (a) => a.palette.background.paper }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", strokeWidth: "4", cx: "50", cy: "50", r: "44" }), k("circle", { className: "secondary", strokeWidth: "3", cx: "8", cy: "54", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "rotate", from: "0 50 48", to: "360 50 52", repeatCount: "indefinite" }) })] }) });
116
- }), us = oe((e) => {
116
+ }), us = ie((e) => {
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
- }), si = k(ai, {}), li = oe(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: f, ...x } = e, y = Z(() => typeof f == "string" ? k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: f }) : f, [f]), b = ge(null), v = Z(() => {
121
- let p = J(X, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [y, c] });
122
- return l === !0 && (p = 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: p })), 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" } }), p] }) });
123
- }, [n, l]), m = ge(!1), h = ge(!1);
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, ...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
+ }, [n, l]), h = ge(!1), f = ge(!1);
124
124
  return Vr(() => {
125
- if (b.current && !m.current && !h.current) {
126
- if (h.current = !0, b.current.classList.contains("animatable") && !b.current.classList.contains("animating")) {
127
- let p = !1;
125
+ if (b.current && !h.current && !f.current) {
126
+ if (f.current = !0, b.current.classList.contains("animatable") && !b.current.classList.contains("animating")) {
127
+ let y = !1;
128
128
  const u = () => {
129
- h.current && (m.current = !0, h.current = !1, p = !0, s?.());
129
+ f.current && (h.current = !0, f.current = !1, y = !0, s?.());
130
130
  };
131
- b.current && b.current.addEventListener("transitionrun", u, { once: !0, capture: !0, passive: !0 }), h.current && b.current && (window.getComputedStyle(b.current, null).opacity, b.current.classList.add("animating")), setTimeout(() => {
132
- !p && h.current && b.current && (b.current?.removeEventListener("transitionrun", u), u());
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
+ !y && f.current && b.current && (b.current?.removeEventListener("transitionrun", u), u());
133
133
  }, 100);
134
- } else m.current = !0, h.current = !1, s?.();
134
+ } else h.current = !0, f.current = !1, s?.();
135
135
  return () => {
136
136
  };
137
137
  }
138
- }, [b.current]), Se(() => () => {
139
- m.current && (b.current?.classList.remove("animating"), m.current = !1, h.current = !1, a?.());
138
+ }, [b.current]), De(() => () => {
139
+ h.current && (b.current?.classList.remove("animating"), h.current = !1, f.current = !1, a?.());
140
140
  }, []), v;
141
141
  }));
142
142
  li.displayName = "LoadingPanel";
@@ -147,44 +147,44 @@ const ci = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, u
147
147
  } catch {
148
148
  }
149
149
  return e = (e = e.replace(/^\/+/, "")).replace(/^@?fs[\\/]/, "");
150
- }, Lr = oe(({ error: e, maxLines: r = Number.MAX_SAFE_INTEGER, hideLineNumbers: n = !1 }) => {
151
- const [t, s] = ne(null);
150
+ }, Lr = ie(({ error: e, maxLines: r = Number.MAX_SAFE_INTEGER, hideLineNumbers: n = !1 }) => {
151
+ const [t, s] = re(null);
152
152
  if (!e?.stack) return null;
153
153
  const a = Qo.collectErrorChain(e).reverse(), o = [];
154
- a.forEach(({ error: c }, f) => {
154
+ a.forEach(({ error: c }, p) => {
155
155
  const x = (c.stack || "").split(`
156
- `).filter(Boolean).map((y) => {
157
- let b = y.match(ci);
156
+ `).filter(Boolean).map((m) => {
157
+ let b = m.match(ci);
158
158
  if (b) {
159
- const [, v = "", m, h, p, u] = b;
160
- return { line: `at ${v ? v + " " : ""}${m}`, location: `${Mn(h).split(/[\\/]/).pop()}:${p}:${u}` };
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 = y.match(ui), b) {
163
- const [, v = "", m, h, p] = b, u = Mn(m), w = `${u.split(/[\\/]/).pop()}:${h}:${p}`;
164
- return { line: `at ${v ? v + " " : ""}${w}`, location: u !== w ? `${u}:${h}:${p}` : void 0 };
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: y.trim() };
166
+ return { line: m.trim() };
167
167
  });
168
- x.length && (o.push({ line: f ? `Caused by: ${x[0].line}` : x[0].line, isBoundary: !0 }), o.push(...x.slice(1)));
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 f = o.map((x) => {
174
+ const p = o.map((x) => {
175
175
  if (x.isBoundary) return c = 0, x.line;
176
176
  c++;
177
- let y = x.location && x.line !== x.location ? `${x.line} (${x.location})` : x.line;
178
- return c >= 1 && (y = ` ${y}`), y;
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
- await navigator.clipboard.writeText(f), s("Copied!"), setTimeout(() => s(null), 2e3);
181
+ await navigator.clipboard.writeText(p), s("Copied!"), setTimeout(() => s(null), 2e3);
182
182
  } catch (c) {
183
183
  s("Can't copy!"), console.warn("Failed to copy stack trace:", c);
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, f) => c.isBoundary ? k(X, { sx: { py: 1, mt: f > 0 ? 1 : 0, mb: 0.5, borderTop: f > 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-${f}`) : 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: f + 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-${f}`)), 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"] })] })] });
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) => {
@@ -192,21 +192,21 @@ const di = (e, r = !1, n = !1) => {
192
192
  if (e instanceof Error) return J(X, { sx: { display: "flex", flexDirection: "column", maxWidth: "500px", width: "100%" }, children: [k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, mb: 1 }, children: e.message }), e.cause ? J(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", mb: 1, opacity: 0.8 }, children: ["Caused by: ", e.cause instanceof Error ? e.cause.message : String(e.cause)] }) : null, !r && k(Lr, { error: e, hideLineNumbers: !0 })] });
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
- }, pi = oe(de((e, r) => {
195
+ }, pi = ie(de((e, r) => {
196
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
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
- const Br = oe(de((e, r) => {
200
+ const Br = ie(de((e, r) => {
201
201
  const { chips: n, sx: t, ...s } = e, a = q.useMemo(() => {
202
202
  if (!n) return null;
203
203
  let o = null;
204
204
  o = Array.isArray(n) ? n : [n];
205
205
  const l = [], i = o.length;
206
206
  for (let c = 0; c < i; c++) {
207
- const f = o[c];
207
+ const p = o[c];
208
208
  let x = null;
209
- typeof f == "string" ? x = k(Lo, { label: f, color: "primary", size: "small", sx: { scale: "0.8" } }, "chip-" + c) : q.cloneElement(f, { key: "chip-" + c }), l.push(x);
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, f = t.width / s, x = t.height / a;
251
- return { width: f, height: x, top: c, right: i + f, bottom: c + x, left: i, x: i, y: c };
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, f = 0, x = 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 y = zr();
311
- (y || !y && s === "fixed") && (f = l.offsetLeft, x = l.offsetTop);
310
+ var m = zr();
311
+ (m || !m && s === "fixed") && (p = l.offsetLeft, x = l.offsetTop);
312
312
  }
313
- return { width: i, height: c, x: f + Nn(t), y: x };
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), f = -o.scrollLeft + Nn(t), x = -o.scrollTop;
319
- return Qe(l || a).direction === "rtl" && (f += wt(a.clientWidth, l ? l.clientWidth : 0) - i), { width: i, height: c, x: f, y: x };
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,28 +338,28 @@ 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, f = t.rootBoundary, x = f === void 0 ? $r : f, y = t.elementContext, b = y === void 0 ? ht : y, v = t.altBoundary, m = v !== void 0 && v, h = t.padding, p = h === void 0 ? 0 : h, u = (function(A) {
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 p != "number" ? p : (n = p, fi.reduce(function(A, V) {
343
+ })(typeof y != "number" ? y : (n = y, fi.reduce(function(A, V) {
344
344
  return A[V] = n, A;
345
- }, {}))), w = b === ht ? "reference" : ht, E = e.rects.popper, T = e.elements[m ? w : b], L = (function(A, V, B, z) {
346
- var ie = V === "clippingParents" ? gi(A) : [].concat(V), G = [].concat(ie, [B]), Q = G[0], re = G.reduce(function(se, ee) {
347
- var le = Fn(A, ee, z);
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
+ 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
- return re.width = re.right - re.left, re.height = re.bottom - re.top, re.x = re.left, re.y = re.top, re;
351
- })(lt(T) ? T : T.contextElement || st(e.elements.popper), c, x, l), O = fn(e.elements.reference), R = (function(A) {
352
- var V, B = A.reference, z = A.element, ie = A.placement, G = ie ? (function(ce) {
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, 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
- })(ie) : null, Q = ie ? (function(ce) {
354
+ })(ee) : null, Q = ee ? (function(ce) {
355
355
  return ce.split("-")[1];
356
- })(ie) : null, re = B.x + B.width / 2 - z.width / 2, se = B.y + B.height / 2 - z.height / 2;
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
- V = { x: re, y: B.y - z.height };
359
+ V = { x: oe, y: B.y - z.height };
360
360
  break;
361
361
  case Nt:
362
- V = { x: re, y: B.y + B.height };
362
+ V = { x: oe, y: B.y + B.height };
363
363
  break;
364
364
  case en:
365
365
  V = { x: B.x + B.width, y: se };
@@ -370,63 +370,63 @@ function yi(e, r) {
370
370
  default:
371
371
  V = { x: B.x, y: B.y };
372
372
  }
373
- var ee = G ? (function(ce) {
373
+ var te = G ? (function(ce) {
374
374
  return ["top", "bottom"].indexOf(ce) >= 0 ? "x" : "y";
375
375
  })(G) : null;
376
- if (ee != null) {
377
- var le = ee === "y" ? "height" : "width";
376
+ if (te != null) {
377
+ var le = te === "y" ? "height" : "width";
378
378
  switch (Q) {
379
379
  case "start":
380
- V[ee] = V[ee] - (B[le] / 2 - z[le] / 2);
380
+ V[te] = V[te] - (B[le] / 2 - z[le] / 2);
381
381
  break;
382
382
  case "end":
383
- V[ee] = V[ee] + (B[le] / 2 - z[le] / 2);
383
+ V[te] = V[te] + (B[le] / 2 - z[le] / 2);
384
384
  }
385
385
  }
386
386
  return V;
387
- })({ reference: O, element: E, placement: a }), S = nn(Object.assign({}, E, R)), D = b === ht ? S : O, P = { top: L.top - D.top + u.top, bottom: D.bottom - L.bottom + u.bottom, left: L.left - D.left + u.left, right: D.right - L.right + u.right }, M = e.modifiersData.offset;
387
+ })({ reference: O, element: E, placement: a }), D = nn(Object.assign({}, E, P)), S = b === ht ? D : O, _ = { top: L.top - S.top + u.top, bottom: S.bottom - L.bottom + u.bottom, left: L.left - S.left + u.left, right: S.right - L.right + u.right }, M = e.modifiersData.offset;
388
388
  if (b === ht && M) {
389
- var I = M[a];
390
- Object.keys(P).forEach(function(A) {
389
+ var F = M[a];
390
+ Object.keys(_).forEach(function(A) {
391
391
  var V = [en, Nt].indexOf(A) >= 0 ? 1 : -1, B = [Zt, Nt].indexOf(A) >= 0 ? "y" : "x";
392
- P[A] += I[B] * V;
392
+ _[A] += F[B] * V;
393
393
  });
394
394
  }
395
- return P;
395
+ return _;
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, f = r.placement.split("-")[0], x = f === "left" ? "left" : "right", y = f === "top" ? "top" : "bottom";
400
- r.modifiersData[n] = { width: i - t[x] - a, height: c - t[y] - o };
401
- } }, vi = [0, 2], Gr = oe(de((e, r) => {
402
- const { sx: n, open: t, children: s, label: a, offsets: o = vi, anchorEl: l, anchorPosition: i, onMount: c, onOpening: f, onOpen: x, onClosing: y, onClose: b, resizeOnOverflow: v = !0, ...m } = e;
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
+ } }, 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: 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 h = dn(), p = { name: "applyMaxSize", enabled: !0, phase: "beforeWrite", requires: ["maxSize"], fn({ state: G }) {
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
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, p), G;
410
- }, [v, o]), [w, E] = ne(!1), T = q.useRef(null), L = ae(() => {
411
- c?.(I.current, T.current);
412
- }, [f]), O = ae(f, [f]), R = ae(x, [x]), S = ae(y, [y]), D = ae(() => {
409
+ return v && G.unshift(bi, y), G;
410
+ }, [v, o]), [w, E] = re(!1), T = q.useRef(null), L = ae(() => {
411
+ c?.(F.current, T.current);
412
+ }, [p]), O = ae(p, [p]), P = ae(x, [x]), D = ae(m, [m]), S = ae(() => {
413
413
  E(!1), b?.();
414
- }, [b]), [P, M] = ne(!1), I = q.useRef(null), A = q.useRef(!0), V = Z(() => ({ onFirstUpdate: () => {
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
416
  } }), [t, w]);
417
- Se(() => {
418
- t && P ? O?.() : !t && w && S?.(), t && E(t);
419
- }, [t, P]);
417
+ De(() => {
418
+ t && _ ? O?.() : !t && w && D?.(), t && E(t);
419
+ }, [t, _]);
420
420
  const B = Z(() => ({ getBoundingClientRect: () => i ? new DOMRect(i?.left || 0, i?.top || 0, 0, 0) : l.getBoundingClientRect() }), [i, l]);
421
- Po(r, () => ({ instance: () => T.current, element: () => I.current }), []);
422
- const { getPortalContainer: z } = ln(), ie = 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: I, popperRef: T, container: z, anchorEl: B, open: w, role: void 0, popperOptions: V, transition: !0, sx: ie, placement: "bottom-start", modifiers: u, ...m, children: ({ TransitionProps: G, placement: Q, ...re }) => {
424
- const { in: se, onEnter: ee, onExited: le, ...ce } = G ?? {};
421
+ Po(r, () => ({ instance: () => T.current, element: () => F.current }), []);
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
+ const { in: se, onEnter: te, onExited: le, ...ce } = G ?? {};
425
425
  return k(jo, { ...ce, in: t, onEnter: () => {
426
- ee?.(), R();
426
+ te?.(), P();
427
427
  }, onExited: () => {
428
- le?.(), D();
429
- }, timeout: { enter: h.transitions.duration.shorter, exit: 0 }, style: { transformOrigin: Q === "bottom-start" ? "left top" : "center bottom" }, children: typeof s == "function" ? s({ TransitionProps: G, placement: Q, ...re }) : s || Te.EmptyArray });
428
+ le?.(), S();
429
+ }, timeout: { enter: f.transitions.duration.shorter, exit: 0 }, style: { transformOrigin: Q === "bottom-start" ? "left top" : "center bottom" }, children: typeof s == "function" ? s({ TransitionProps: G, placement: Q, ...oe }) : s || Te.EmptyArray });
430
430
  } });
431
431
  }));
432
432
  Gr.displayName = "ExhibitPopper";
@@ -437,11 +437,11 @@ const ds = (e) => {
437
437
  if (r.palette.mode !== "dark") return;
438
438
  const n = r.palette.mode === "dark" ? r.palette.text.primary : r.palette.divider;
439
439
  return `drop-shadow(0px 0px ${e}px ${n})`;
440
- }, Xr = (e) => k(be, { ...e, iconKey: "ArrowDownOutline" }), xi = (e) => k(be, { ...e, iconKey: "ArrowRightOutline" }), fs = ei(oe(de((e, r) => {
440
+ }, Xr = (e) => k(be, { ...e, iconKey: "ArrowDownOutline" }), xi = (e) => k(be, { ...e, iconKey: "ArrowRightOutline" }), fs = ei(ie(de((e, r) => {
441
441
  const { sx: n, size: t = "small", activeColor: s, children: a, className: o, ...l } = e;
442
442
  let i = "1rem", c = "1rem";
443
443
  return t === "medium" ? (i = "1.25rem", c = "1.25rem") : t === "large" && (i = "1.5rem", c = "1.5rem"), k(X, { ref: r, className: Oe("icon", o), sx: { width: i, height: c, ...n }, ...l, children: a });
444
- })))(({ theme: e }) => ({ fill: "currentColor", "& .activeColor": { fill: e.palette.primary.main }, "& .styled.high_contrast": { fill: e.palette.primary.main }, "& .styled.background": { fill: e.palette.background.paper }, "& .styled.current_color": { fill: "currentColor" }, "& .styled.secondary": { fill: e.palette.secondary.main }, "& .styled.secondary_dark": { fill: e.palette.secondary.dark }, "& .styled.secondary_light": { fill: e.palette.secondary.light }, "& .styled.info": { fill: e.palette.info.main }, "& .styled.info.stroked": { stroke: e.palette.info.main }, "& .styled.info_dark": { fill: e.palette.info.dark }, "& .styled.info_light": { fill: e.palette.info.light }, "& .styled.warning": { fill: e.palette.warning.main }, "& .styled.warning.stroked": { stroke: e.palette.warning.main }, "& .styled.warning_dark": { fill: e.palette.warning.dark }, "& .styled.warning_light": { fill: e.palette.warning.light }, "& .styled.error.info": { fill: e.palette.error.main }, "& .styled.error.stroked": { stroke: e.palette.error.main }, "& .styled.error_dark": { fill: e.palette.error.dark }, "& .styled.error_light": { fill: e.palette.error.light }, "& .styled.success": { fill: e.palette.success.main }, "& .styled.success_dark": { fill: e.palette.success.dark }, "& .styled.success_light": { fill: e.palette.success.light }, "& .styled.grey": { fill: e.palette.text.icon ?? e.palette.action.active } })), wi = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, ki = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, Si = function(e, r = null) {
444
+ })))(({ theme: e }) => ({ fill: "currentColor", "& .activeColor": { fill: e.palette.primary.main }, "& .styled.high_contrast": { fill: e.palette.primary.main }, "& .styled.background": { fill: e.palette.background.paper }, "& .styled.current_color": { fill: "currentColor" }, "& .styled.secondary": { fill: e.palette.secondary.main }, "& .styled.secondary_dark": { fill: e.palette.secondary.dark }, "& .styled.secondary_light": { fill: e.palette.secondary.light }, "& .styled.info": { fill: e.palette.info.main }, "& .styled.info.stroked": { stroke: e.palette.info.main }, "& .styled.info_dark": { fill: e.palette.info.dark }, "& .styled.info_light": { fill: e.palette.info.light }, "& .styled.warning": { fill: e.palette.warning.main }, "& .styled.warning.stroked": { stroke: e.palette.warning.main }, "& .styled.warning_dark": { fill: e.palette.warning.dark }, "& .styled.warning_light": { fill: e.palette.warning.light }, "& .styled.error.info": { fill: e.palette.error.main }, "& .styled.error.stroked": { stroke: e.palette.error.main }, "& .styled.error_dark": { fill: e.palette.error.dark }, "& .styled.error_light": { fill: e.palette.error.light }, "& .styled.success": { fill: e.palette.success.main }, "& .styled.success_dark": { fill: e.palette.success.dark }, "& .styled.success_light": { fill: e.palette.success.light }, "& .styled.grey": { fill: e.palette.text.icon ?? e.palette.action.active } })), wi = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, ki = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, Di = function(e, r = null) {
445
445
  if (!e) return e;
446
446
  e = e.replace(wi, function(t, s, a, o) {
447
447
  return s + s + a + a + o + o;
@@ -451,7 +451,7 @@ const ds = (e) => {
451
451
  }, _n = function(e, r = 0.2, n = "light") {
452
452
  if (!e) return e;
453
453
  let t = n !== "dark";
454
- return r < 0 && (t = !t, r *= -1), e = Si(e), t ? Io(e, Math.max(0, Math.min(1, 1 * r))) : Vo(e, Math.max(0, Math.min(1, 1.5 * r)));
454
+ return r < 0 && (t = !t, r *= -1), e = Di(e), t ? Io(e, Math.max(0, Math.min(1, 1 * r))) : Vo(e, Math.max(0, Math.min(1, 1.5 * r)));
455
455
  }, hs = function(e) {
456
456
  let r = 0;
457
457
  return r = e < 1 ? 5.11916 * e ** 2 : 4.5 * Math.log(e + 1) + 2, (r / 100).toFixed(2);
@@ -465,16 +465,16 @@ const ds = (e) => {
465
465
  } } } } } }, a = s;
466
466
  return r && (a = Pr(s, r)), On(a);
467
467
  };
468
- function Di(e, r) {
468
+ function Si(e, r) {
469
469
  return r = Pr({ track: _n(e.palette.background.paper, 0.05, e?.palette.mode), thumb: _n(e.palette.background.paper, 0.3, e?.palette.mode), active: e.palette.primary.main, corner: e.palette.background.paper, outline: !1 }, r || {}), { "--scrollbar-track-color": me(r.track, 0.2), "--scrollbar-thumb-color": r.thumb, "--scrollbar-button-color": r.button || r.thumb, "--scrollbar-active-color": r.active, "--scrollbar-corner-color": r.corner || r.thumb, "--scrollbar-border-color": r.track, "--scrollbar-width": "13px", "--scrollbar-height": "13px", "--scrollbar-border-radius": "9999px", "--scrollbar-border-width": "2px", "--scrollbar-min-thumb-size": "24px" };
470
470
  }
471
471
  function Kr(e, r) {
472
- const n = Di(e, r), t = { ...n, "& .scrollbar, & .vsb-track, & .vsb-thumb": { ...n }, "&::-webkit-scrollbar, & *::-webkit-scrollbar": { backgroundColor: "var(--scrollbar-track-color)", width: "var(--scrollbar-width)", height: "var(--scrollbar-height)" }, "&::-webkit-scrollbar-button": { display: "none" }, "& .scrollbar-button": { fill: "var(--scrollbar-thumb-color)", backgroundColor: "transparent", transition: "fill opacity 260ms ease", width: "var(--scrollbar-width)", height: "var(--scrollbar-height)" }, "& .scrollbar-button:hover:not([disabled])": { fill: "var(--scrollbar-active-color)" }, "& .scrollbar-button:disabled": { opacity: 0.8 }, "&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {}, "&::-webkit-scrollbar-track-piece, & *::-webkit-scrollbar-track-piece": {}, "&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": { borderRadius: "var(--scrollbar-border-radius)", backgroundColor: "var(--scrollbar-thumb-color)", minHeight: "var(--scrollbar-min-thumb-size)", minWidth: "var(--scrollbar-min-thumb-size)", border: "var(--scrollbar-border-width) solid var(--scrollbar-border-color)" }, "&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": { backgroundColor: "var(--scrollbar-active-color)", border: r?.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": { backgroundColor: "var(--scrollbar-active-color)", border: r?.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": { backgroundColor: "var(--scrollbar-active-color)", border: r?.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": { backgroundColor: "var(--scrollbar-corner-color)" } };
472
+ const n = Si(e, r), t = { ...n, "& .scrollbar, & .vsb-track, & .vsb-thumb": { ...n }, "&::-webkit-scrollbar, & *::-webkit-scrollbar": { backgroundColor: "var(--scrollbar-track-color)", width: "var(--scrollbar-width)", height: "var(--scrollbar-height)" }, "&::-webkit-scrollbar-button": { display: "none" }, "& .scrollbar-button": { fill: "var(--scrollbar-thumb-color)", backgroundColor: "transparent", transition: "fill opacity 260ms ease", width: "var(--scrollbar-width)", height: "var(--scrollbar-height)" }, "& .scrollbar-button:hover:not([disabled])": { fill: "var(--scrollbar-active-color)" }, "& .scrollbar-button:disabled": { opacity: 0.8 }, "&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {}, "&::-webkit-scrollbar-track-piece, & *::-webkit-scrollbar-track-piece": {}, "&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": { borderRadius: "var(--scrollbar-border-radius)", backgroundColor: "var(--scrollbar-thumb-color)", minHeight: "var(--scrollbar-min-thumb-size)", minWidth: "var(--scrollbar-min-thumb-size)", border: "var(--scrollbar-border-width) solid var(--scrollbar-border-color)" }, "&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": { backgroundColor: "var(--scrollbar-active-color)", border: r?.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": { backgroundColor: "var(--scrollbar-active-color)", border: r?.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": { backgroundColor: "var(--scrollbar-active-color)", border: r?.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": { backgroundColor: "var(--scrollbar-corner-color)" } };
473
473
  return Te.getOS() === Te.OSType.Firefox && (t["* .pseudo-scrollbar"] = { scrollbarColor: "var(--scrollbar-thumb-color) transparent" }, t["* .pseudo-scrollbar:hover:not([disabled])"] = { scrollbarColor: "var(--scrollbar-active-color) transparent" }), t;
474
474
  }
475
475
  const gs = { Light: "light", Dark: "dark" };
476
476
  function ys(e) {
477
- const { mode: r } = e || {}, [n, t] = ne(() => {
477
+ const { mode: r } = e || {}, [n, t] = re(() => {
478
478
  if (r === "light" || r === "dark") return { themeMode: r, source: "prop" };
479
479
  if (typeof document < "u") {
480
480
  const s = An();
@@ -482,7 +482,7 @@ function ys(e) {
482
482
  }
483
483
  return { themeMode: In(), source: "media" };
484
484
  });
485
- return Se(() => {
485
+ return De(() => {
486
486
  const s = () => {
487
487
  if (r) return void (r === n.themeMode && n.source === "prop" || t((c) => ({ ...c, themeMode: r, source: "prop" })));
488
488
  const i = An();
@@ -513,14 +513,14 @@ const bs = { Popup: "popup", Anchor: "anchor" }, vs = { ByPopup: "popupDone", Ca
513
513
  }, Vn = (e, r, n) => {
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
- }, qr = oe(de((e, r) => {
517
- const { open: n, anchorEl: t, anchorPosition: s, label: a, floatReference: o, createPopupPanel: l = hn, popperProps: i, onMount: c, onClosing: f, onClose: x, onOpening: y, onOpen: b, children: v, sx: m, ...h } = e, p = ae(f, [f]), u = ae(x, [x]), w = ae(y, [y]), E = ae(b, [b]), [T, L] = ne(), O = ge(null), R = ae((D, P) => {
518
- L(D), c?.(O.current, P);
519
- }, [c]), S = Z(() => {
520
- const D = { popupContainer: T, floatReference: o, children: v, ...h }, P = l(D);
521
- return k(Et, { elevation: 8, ref: O, sx: { display: "flex", overflow: "auto", outline: "none", "&.MuiPaper-root": (M) => Kr(M) }, tabIndex: 0, children: P });
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: 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
+ L(S), c?.(O.current, _);
519
+ }, [c]), D = Z(() => {
520
+ const S = { popupContainer: T, floatReference: o, children: v, ...f }, _ = l(S);
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: R, onOpening: w, onOpen: E, onClosing: p, onClose: u, ...i, children: S });
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,123 +538,123 @@ 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]), [f, x] = ne(null), [y, b] = ne(!1), [v, m] = ne(!1), h = Z(() => t === null ? (Xt === null && (Xt = { key: { label: "root" }, isRoot: !0, parent: null, open: () => null, close: (g) => null, closeChild: (g) => null, onChildVisible: () => {
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, []), p = Z(() => ({ label: n }), []), u = q.useRef(null), w = q.useRef(r);
544
- Se(() => {
543
+ }, closeAll: () => B(0), floatElement: () => null, anchorElement: () => null }), Xt) : t, []), y = Z(() => ({ label: n }), []), u = q.useRef(null), w = q.useRef(r);
544
+ De(() => {
545
545
  w.current = r;
546
546
  }, [r]);
547
547
  const E = (g) => {
548
548
  const C = Ge.get(g);
549
- let F = null;
550
- return C && (F = Xe.get(C)?.close(0)), F;
551
- }, T = () => E(G.key), [L, O] = ne(), R = () => {
552
- if (!f) return void M();
553
- const g = new Promise((C, F) => {
554
- O((_) => ({ resolve: C, reject: F }));
549
+ let N = null;
550
+ return C && (N = Xe.get(C)?.close(0)), N;
551
+ }, T = () => E(G.key), [L, O] = re(), P = () => {
552
+ if (!p) return void M();
553
+ const g = new Promise((C, N) => {
554
+ O((I) => ({ resolve: C, reject: N }));
555
555
  });
556
- return T(), Ge.delete(h.key), x(!1), g;
556
+ return T(), Ge.delete(f.key), x(!1), g;
557
557
  };
558
- Se(() => {
558
+ De(() => {
559
559
  L && (L.resolve(), O(null));
560
- }, [y, v, L]);
561
- const S = _e(() => {
562
- let g = h;
560
+ }, [m, v, L]);
561
+ const D = _e(() => {
562
+ let g = f;
563
563
  for (; g.parent; ) g = g.parent;
564
564
  return E(g.key);
565
- }, []), D = () => {
566
- if (f) return void M();
567
- h && Xe.get(h.key)?.open(0);
568
- const g = Ge.get(h.key);
569
- g && g !== p && Xe.get(g)?.close(0), requestAnimationFrame(() => {
570
- Ge.set(h.key, G.key), x(!0);
565
+ }, []), S = () => {
566
+ if (p) return void M();
567
+ f && Xe.get(f.key)?.open(0);
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
- }, [P, M] = q.useReducer((g) => g + 1, 0), I = _e((g) => l === null ? null : l({ closeFloat: B, closeFloatAll: ie, ...g }), [l]), A = l === null, V = ae((g = 120) => Kt(g, D, /* @__PURE__ */ new Set([G]), !1)(), [D]), B = ae((g = 60) => Kt(g, R, Ln(G), !0)(), [R]), z = ae((g = 360) => Kt(g, T, Ln(((C) => {
573
- const F = Ge.get(C.key);
574
- return F && Xe.get(F) || null;
575
- })(G)), !0)(), [T]), ie = ae(S, [S]), G = Z(() => ({ key: p, isRoot: !1, label: n, parent: h, onChildVisible: () => {
576
- m(!0);
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
+ const N = Ge.get(C.key);
574
+ return N && Xe.get(N) || null;
575
+ })(G)), !0)(), [T]), ee = ae(D, [D]), G = Z(() => ({ key: y, isRoot: !1, label: n, parent: f, onChildVisible: () => {
576
+ h(!0);
577
577
  }, onChildHidden: () => {
578
- m(!1);
579
- }, open: V, close: B, closeChild: z, closeAll: ie, floatElement: () => u.current, anchorElement: () => w.current }), []);
580
- Se(() => {
581
- Xe.set(p, G);
582
- }, [G]), Se(() => () => {
583
- Xe.delete(p), B(0);
584
- }, []), Se(() => {
585
- f && !A && (b(!0), h.onChildVisible());
586
- }, [f, A]);
578
+ h(!1);
579
+ }, open: V, close: B, closeChild: z, closeAll: ee, floatElement: () => u.current, anchorElement: () => w.current }), []);
580
+ De(() => {
581
+ Xe.set(y, G);
582
+ }, [G]), De(() => () => {
583
+ Xe.delete(y), B(0);
584
+ }, []), De(() => {
585
+ p && !A && (b(!0), f.onChildVisible());
586
+ }, [p, A]);
587
587
  const Q = _e((g) => {
588
588
  g.which === Pe.Escape && (g.preventDefault(), g.stopPropagation(), B(0));
589
- }, []), re = q.useRef(null), se = _e(() => {
590
- const g = re.current, C = u.current;
589
+ }, []), oe = q.useRef(null), se = _e(() => {
590
+ const g = oe.current, C = u.current;
591
591
  g && C && (requestAnimationFrame(() => {
592
592
  (C.contains(document.activeElement) || document.activeElement === document.body) && g.focus();
593
- }), re.current = null), c?.();
594
- }, []), ee = _e((g) => {
595
- u.current = g, g.addEventListener("focus", (F) => {
596
- re.current = F.relatedTarget;
593
+ }), oe.current = null), c?.();
594
+ }, []), te = _e((g) => {
595
+ u.current = g, g.addEventListener("focus", (N) => {
596
+ oe.current = N.relatedTarget;
597
597
  }, { once: !0, passive: !0 });
598
598
  const C = document.activeElement;
599
599
  requestAnimationFrame(() => {
600
600
  C === document.activeElement && g.focus();
601
601
  });
602
- }, []), [le, ce] = ne();
603
- Se(() => {
604
- A && (f ? i?.() : f === !1 && c?.()), ce(y ? k(qr, { floatReference: G, open: f, label: n, anchorEl: r, onOpening: () => {
605
- i?.(), h.onChildVisible();
602
+ }, []), [le, ce] = re();
603
+ De(() => {
604
+ A && (p ? i?.() : p === !1 && c?.()), ce(m ? k(qr, { floatReference: G, open: p, label: n, anchorEl: r, onOpening: () => {
605
+ i?.(), f.onChildVisible();
606
606
  }, onClosing: se, onClose: () => {
607
- b(!1), h.onChildHidden();
608
- }, onMount: ee, popperProps: { onKeyDown: Q, onMouseEnter: (g) => {
609
- f && ze?.isClose && ze.setReferences.has(G) && (ze.fn.clear(), ze = null, G.closeChild());
610
- }, ...o }, createPopupPanel: I }) : null);
611
- }, [y, f, n, A, o, I, P]);
607
+ b(!1), f.onChildHidden();
608
+ }, onMount: te, popperProps: { onKeyDown: Q, onMouseEnter: (g) => {
609
+ p && ze?.isClose && ze.setReferences.has(G) && (ze.fn.clear(), ze = null, G.closeChild());
610
+ }, ...o }, createPopupPanel: F }) : null);
611
+ }, [m, p, n, A, o, F, _]);
612
612
  const d = ae((g) => {
613
613
  if (Ge.size === 0) return;
614
614
  let C = !1;
615
- Ge.forEach((F) => {
616
- const _ = Xe.get(F);
617
- if (C || !_) return;
618
- _.floatElement()?.contains?.(g.target) && (C = !0), _.anchorElement()?.contains?.(g.target) && (C = !0);
619
- }), C || S();
620
- }, [S]);
621
- return Se(() => {
622
- if (!f || !h.isRoot) return;
615
+ Ge.forEach((N) => {
616
+ const I = Xe.get(N);
617
+ if (C || !I) return;
618
+ I.floatElement()?.contains?.(g.target) && (C = !0), I.anchorElement()?.contains?.(g.target) && (C = !0);
619
+ }), C || D();
620
+ }, [D]);
621
+ return De(() => {
622
+ if (!p || !f.isRoot) return;
623
623
  const g = (C) => {
624
624
  d(C);
625
625
  };
626
626
  return document.addEventListener("mousedown", g), document.addEventListener("touchstart", g), document.addEventListener("focus", g), () => {
627
627
  document.removeEventListener("mousedown", g), document.removeEventListener("touchstart", g), document.removeEventListener("focus", g);
628
628
  };
629
- }, [f, h]), { component: le, reference: G };
630
- }, Ci = oe(de((e, r) => {
629
+ }, [p, f]), { component: le, reference: G };
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: f, ref: x, ...y } = i, b = [];
633
+ const { popupContainer: c, floatReference: p, ref: x, ...m } = i, b = [];
634
634
  for (let v = 0; v < n.length; v++) {
635
- const m = n[v];
636
- m && b.push(k(Ci, { parentFloat: f, ...y, ...m }, v));
635
+ const h = n[v];
636
+ h && b.push(k(Ci, { parentFloat: p, ...m, ...h }, v));
637
637
  }
638
- return J(X, { ref: r, sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: ["Children here", b, k(Ot, { parentFloat: f, children: "Close other children" })] });
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 };
640
640
  return k(t === Oi.Toolbar ? mn : Zr, { ...l });
641
- })), Ei = { placement: "right-start" }, xs = oe(de((e, r) => {
641
+ })), Ei = { placement: "right-start" }, xs = ie(de((e, r) => {
642
642
  const { children: n, sx: t, parentFloat: s, createPopupPanel: a, popperProps: o = Ei, label: l, ...i } = e;
643
- (function(h) {
644
- if (!h) throw new Error("Invariant failed");
643
+ (function(f) {
644
+ if (!f) throw new Error("Invariant failed");
645
645
  })(q.isValidElement(n));
646
- const c = n, f = Z(() => ({ ...c?.props, ...i, onContextMenu: (h) => {
647
- c?.props?.onContextMenu?.(h), h.isDefaultPrevented() || (i?.onContextMenu?.(h), h.isDefaultPrevented() || (b(h), h.preventDefault()));
648
- } }), [i, c?.props]), x = ae(a, [a]), [y, b] = q.useState(null), { reference: v, component: m } = zt({ label: l ?? "contextMenu", popperProps: o, parentFloat: s, anchor: { getBoundingClientRect: () => new DOMRect(y?.clientX || 0, y?.clientY || 0) }, onClose: () => b(null), createPopupPanel: x });
649
- return Se(() => {
650
- y ? v.open(0) : v.close(0);
651
- }, [y]), J(Je, { children: [q.cloneElement(n, f), m] });
646
+ const c = n, p = Z(() => ({ ...c?.props, ...i, onContextMenu: (f) => {
647
+ c?.props?.onContextMenu?.(f), f.isDefaultPrevented() || (i?.onContextMenu?.(f), f.isDefaultPrevented() || (b(f), f.preventDefault()));
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
+ return De(() => {
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 });
655
655
  });
656
656
  dt.displayName = "SimpleTooltip";
657
- const mt = oe((e) => {
657
+ const mt = ie((e) => {
658
658
  const { modifier: r, sx: n, ...t } = e;
659
659
  return k(X, { sx: { marginLeft: "1px", marginRight: "1px", borderRadius: "4px", borderStyle: "solid", borderTopWidth: "1px", borderLeftWidth: "1px", borderRightWidth: "1px", borderBottomWidth: "2px", borderTopColor: (s) => me(s.palette.background.paper, s.palette.action.disabledOpacity), borderLeftColor: (s) => me(s.palette.background.paper, s.palette.action.disabledOpacity), borderRightColor: (s) => me(s.palette.background.paper, s.palette.action.disabledOpacity), borderBottomColor: (s) => me(s.palette.background.paper, 1 - s.palette.action.disabledOpacity), backgroundColor: (s) => me(s.palette.action.hover, s.palette.action.disabledOpacity), paddingLeft: "4px", paddingRight: "4px", minHeight: "1.6em", display: "flex", justifyContent: "center", alignItems: "center", boxSizing: "content-box", overflow: "hidden", ...n }, ...t, children: k(X, { sx: { display: "flex", alignItems: "center", justifyContent: "center", textAlign: "center", "& *": { fontWeight: "500" } }, children: r }) });
660
660
  }), Mi = Te.getOS() === Te.OSType.MacOS || Te.getOS() === Te.OSType.IOS ? "Cmd" : "Ctrl", Jr = (e, r = !1, n = null) => {
@@ -668,161 +668,161 @@ const mt = oe((e) => {
668
668
  for (let a = 0; e.modifiers && a < e.modifiers.length; a++) t[e.modifiers[a]] = !0;
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
- }, pt = oe(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: f, componentDisabled: x = !1, sx: y, ...b } = e;
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: x = !1, sx: m, ...b } = e;
673
673
  let v = null;
674
674
  s && (v = Jr(s, i));
675
- const [m, h] = ne(null);
676
- return Se(() => {
677
- Promise.resolve(t).then((p) => {
678
- h(p);
675
+ const [h, f] = re(null);
676
+ return De(() => {
677
+ Promise.resolve(t).then((y) => {
678
+ f(y);
679
679
  });
680
- }, [t]), k(dt, { slotProps: { popper: { sx: { "& .MuiTooltip-tooltip": { marginTop: "0px !important" }, ...y }, modifiers: [{ name: "offset", options: { offset: [0, 14] } }] } }, className: "tooltip-wrapper", tabIndex: -1, title: !n && m ? 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: m }), 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
- })), Ti = k(be, {}), Pi = k(be, { iconKey: "Check" }), Wt = oe(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: f, sx: x, disabled: y, className: b, onFocus: v, onBlur: m, ...h } = e, [p, u] = ne(!1), w = { marginRight: "0px", padding: n ? "2px" : "7px", borderRadius: (R) => `${R.shape.borderRadius}px`, color: (R) => f ? void 0 : R.palette.text.icon ?? R.palette.action.active, border: (R) => `solid ${t ? R.palette.divider : "transparent"} 1px`, "& .MuiTouchRipple-child": { borderRadius: (R) => `${R.shape.borderRadius}px !important` }, "&.Mui-selected": { backgroundColor: (R) => me(R.palette.text.primary, R.palette.action.selectedOpacity), border: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px` }, "&.Mui-disabled": { border: (R) => `solid ${t ? R.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: (R) => R.palette.text.primary, border: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px`, "&.Mui-selected": { backgroundColor: (R) => me(R.palette.text.primary, R.palette.action.selectedOpacity + R.palette.action.hoverOpacity) }, "> .outline-hover": { outline: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px` }, backgroundColor: null }, "&.Mui-focusVisible": { outline: (R) => `solid ${R.palette.primary.main} 1px`, border: (R) => `1px solid ${R.palette?.primary?.main}`, zIndex: 1 } };
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
+ })), 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: 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
683
  let T = w;
684
684
  s || (T = Te.mergeContentful(w, E));
685
685
  const L = Z(() => {
686
- let R = typeof l == "function" ? l() : l;
687
- return R === null ? R : R || (o === void 0 ? Ti : Pi);
686
+ let P = typeof l == "function" ? l() : l;
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": p, "Mui-selected": o, "Mui-disabled": y }, b), onFocus: (R) => {
690
- u(!0), v?.(R);
691
- }, onBlur: (R) => {
692
- u(!1), m?.(R);
693
- }, size: "small", TouchRippleProps: { center: !1 }, sx: T, edge: "end", ...h, disabled: y || !1, children: [L, c] });
689
+ let O = J(Ze, { component: "div", ref: r, className: Oe({ "Mui-focusVisible": y, "Mui-selected": o, "Mui-disabled": m }, b), onFocus: (P) => {
690
+ u(!0), v?.(P);
691
+ }, onBlur: (P) => {
692
+ u(!1), h?.(P);
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
- const { label: R, description: S, maxWidth: D, shortcut: P, useModifierSymbols: M, componentDisabled: I, simple: A, chips: V, ref: B, ...z } = i;
696
- O = k(dt, { disableInteractive: !0, title: R ?? "", ...z, children: k(X, { sx: { display: "flex" }, children: O }) });
695
+ const { label: P, description: D, maxWidth: S, shortcut: _, useModifierSymbols: M, componentDisabled: F, simple: A, chips: V, ref: B, ...z } = i;
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
- })), Ri = k(be, {}), Ni = (e) => e.icon, Ot = oe(de((e, r) => {
700
- const { icon: n = Ri, renderIcon: t = Ni, parentFloat: s, className: a, onFocus: o, selected: l, onBlur: i, onMouseOver: c, onMouseOut: f, onMouseEnter: x, disabled: y, children: b, sx: v, tooltipProps: m, chips: h, primary: p, ...u } = e, [w, E] = ne(!1), [T, L] = ne(!1), O = Z(() => {
701
- const S = t?.({ icon: n, disabled: y, selected: l });
702
- return S ? k(zo, { className: Oe({ "Mui-focusVisible": w, "Mui-hovered": T }), sx: { "& .MuiSvgIcon-root": { color: (D) => p ? void 0 : D.palette.text.icon ?? D.palette.action.active }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { "& .MuiSvgIcon-root": { color: (D) => D.palette.text.primary } } }, children: S }) : null;
703
- }, [t, y, n, w, T, p, l]);
704
- let R = J(Mr, { ref: r, disabled: y, onMouseOver: (S) => {
705
- c?.(S), S.isDefaultPrevented() || L(!0);
706
- }, onMouseOut: (S) => {
707
- f?.(S), S.isDefaultPrevented() || L(!1);
708
- }, onMouseEnter: (S) => {
709
- x?.(S), S.isDefaultPrevented() || s?.closeChild();
710
- }, TouchRippleProps: { center: !1 }, className: Oe({ "Mui-focusVisible": w, "Mui-hovered": T }, a), onFocus: (S) => {
711
- o?.(S), E(!0);
712
- }, onBlur: (S) => {
713
- i?.(S), E(!1);
714
- }, sx: { flex: "1 1 100%", "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, "&.Mui-selected": { color: (S) => S.palette.text.primary }, color: (S) => S.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (S) => S.palette.text.primary }, ...v }, ...u, children: [O, b, h ? k(Br, { chips: h }) : null] });
715
- return m && (R = k(pt, { children: R, placement: "right-start", ...m })), R;
716
- })), ws = oe(de((e, r) => {
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: 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
+ c?.(D), D.isDefaultPrevented() || L(!0);
706
+ }, onMouseOut: (D) => {
707
+ p?.(D), D.isDefaultPrevented() || L(!1);
708
+ }, onMouseEnter: (D) => {
709
+ x?.(D), D.isDefaultPrevented() || s?.closeChild();
710
+ }, TouchRippleProps: { center: !1 }, className: Oe({ "Mui-focusVisible": w, "Mui-hovered": T }, a), onFocus: (D) => {
711
+ o?.(D), E(!0);
712
+ }, onBlur: (D) => {
713
+ i?.(D), E(!1);
714
+ }, sx: { flex: "1 1 100%", "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, "&.Mui-selected": { color: (D) => D.palette.text.primary }, color: (D) => D.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (D) => D.palette.text.primary }, ...v }, ...u, children: [O, b, f ? k(Br, { chips: f }) : null] });
715
+ return h && (P = k(pt, { children: P, placement: "right-start", ...h })), P;
716
+ })), ws = ie(de((e, r) => {
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
- })), mn = oe(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: f, onPopupClose: x, quickButtonProps: y, createQuickButton: b, tooltip: v = "", createTooltip: m, icon: h, disabled: p, buttonProps: u = Te.EmptyObject, disableHover: w, touchRippleRef: E, primary: T, children: L, sx: O, className: R, ...S } = e, D = dn(), P = Z(() => {
721
- const K = (te, ue, he, Le = he) => {
722
- const Ce = typeof t == "boolean" ? null : t[te];
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: 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
+ const K = (ne, ue, he, Le = he) => {
722
+ const Ce = typeof t == "boolean" ? null : t[ne];
723
723
  return typeof Ce == "function" ? Ce(ue) : Ce || (t ? he : Le);
724
724
  };
725
- return { outline: { color: (te) => K("color", te, te.palette.divider, "transparent"), hoverColor: (te) => K("hoverColor", te, te.palette.text?.primary, te.palette.divider), focusColor: (te) => K("focusColor", te, te.palette?.primary?.main) }, active: D.palette.mode === "dark" ? D.palette.text.secondary : D.palette.text.primary, text: D.palette.text.icon ?? D.palette.action.active };
726
- }, [t, D]), [M, I] = ne(!1), [A, V] = ne(!1), [B, z] = ne(!1), ie = ge(null), G = ge(null), Q = zt({ anchor: ie.current, label: s, createPopupPanel: i, parentFloat: l, popperProps: c?.popperProps, onClose: () => {
727
- I(!1), x?.();
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), 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
- I(!0), f?.();
730
- } }), re = ae((K) => {
729
+ F(!0), p?.();
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]), ee = Z(() => {
735
- const K = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (Y) => P.outline.color(Y), "&.Mui-focusVisible": { border: (Y) => `1px solid ${P.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) => P.outline.hoverColor(Y) }, "&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (Y) => P.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) => P.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` } }, te = { "&.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, te), Ce = Te.mergeContentful(ue, K);
736
- return { quickButtonStyling: he, openQuickButtonStyling: Le, compoundStyling: Ce, openCompoundStyling: Te.mergeContentful(Ce, te) };
737
- }, [P, w]), le = ae((K) => {
738
- const { children: te, ref: ue, ...he } = K;
739
- return k(dt, { ref: ue, ...he, disableInteractive: !0, children: te });
740
- }, []), ce = o || b, d = ce && (y?.tooltip || y?.createTooltip), g = (K) => {
741
- const { tooltip: te, createTooltip: ue, sx: he, ...Le } = K;
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
+ return { quickButtonStyling: he, openQuickButtonStyling: Le, compoundStyling: Ce, openCompoundStyling: Te.mergeContentful(Ce, ne) };
737
+ }, [_, w]), le = ae((K) => {
738
+ const { children: ne, ref: ue, ...he } = K;
739
+ return k(dt, { ref: ue, ...he, disableInteractive: !0, children: ne });
740
+ }, []), ce = o || b, d = ce && (m?.tooltip || m?.createTooltip), g = (K) => {
741
+ const { tooltip: ne, createTooltip: ue, sx: he, ...Le } = K;
742
742
  let Ce = k(Ze, { sx: { ...he }, component: "div", ...Le });
743
- return d && (Ce = (ue ?? le)({ title: M ? "" : te ?? v, children: k("div", { children: Ce }) }, M)), Ce;
743
+ return d && (Ce = (ue ?? le)({ title: M ? "" : ne ?? v, children: k("div", { children: Ce }) }, M)), Ce;
744
744
  }, C = { onKeyDown: (K) => {
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
- let F = k(Je, {});
748
- const _ = Z(() => typeof h == "function" ? h() : h, [h]);
747
+ let N = k(Je, {});
748
+ const I = Z(() => typeof f == "function" ? f() : f, [f]);
749
749
  if (ce) {
750
- let K = M ? ee.openQuickButtonStyling : ee.quickButtonStyling;
751
- const te = (b || g)({ tabIndex: -1, disabled: p, size: "small", edge: "end", onMouseEnter: () => {
750
+ let K = M ? te.openQuickButtonStyling : te.quickButtonStyling;
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
- he.button === 0 && (he.preventDefault(), re(he));
755
- }, touchRippleRef: E, children: _, ...y, className: Oe({ "Mui-focusVisible": A || M, "Mui-selected": a, "Mui-hovered": B || M, "Mui-disabled": p, bordered: !0, left: !0, "hard-right": !0 }, y?.className), sx: { ...ee.quickButtonStyling, height: "100%", ...y?.sx } });
754
+ he.button === 0 && (he.preventDefault(), oe(he));
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 = (m ?? le)({ title: M ? "" : v, children: ue }, M)), F = J(Je, { children: [te, k(Ze, { ref: G, component: "div", className: Oe({ "Mui-selected": M, "Mui-hovered": B || M, "Mui-disabled": p, "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)", ...ee.quickButtonStyling, ...K }, TouchRippleProps: { center: !1 }, tabIndex: -1, disabled: p, size: "small", edge: "end", onMouseDown: (he) => {
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
- let K = M ? ee.openCompoundStyling : ee.compoundStyling;
762
- F = k(Wt, { ref: G, tabIndex: -1, disabled: p, size: "small", icon: _, className: Oe({ "Mui-selected": M || a, "Mui-hovered": B, "Mui-disabled": p, "Mui-focusVisible": A || M, bordered: !0, left: !0, right: !0 }), sx: { ...ee.quickButtonStyling, ...K }, onMouseDown: (te) => {
763
- te.button === 0 && (te.preventDefault(), se());
761
+ let K = M ? te.openCompoundStyling : te.compoundStyling;
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
+ ne.button === 0 && (ne.preventDefault(), se());
764
764
  }, children: Vn(!1, n, M) });
765
765
  }
766
- const { className: N, 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: ie, tabIndex: p ? void 0 : 0, className: Oe(N, "split-button-root", { "Mui-focusVisible": A || M, "Mui-selected": M || a, "Mui-hovered": B, "Mui-disabled": p }), 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: F });
768
- return d || (U = (m ?? le)({ title: M ? "" : v, children: U }, M)), J(X, { className: Oe(R, "popupIconButton"), ref: r, ...S, sx: { zIndex: A || M ? 2 : void 0, display: "flex", alignItems: "center", ...O }, children: [U, Q.component] });
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: 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
+ 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
- const Fi = {}, Zr = oe(de((e, r) => {
772
- const { selected: n = !1, label: t, onQuickClick: s, parentFloat: a, createPopupPanel: o, popupProps: l = Fi, onPopupOpen: i, onPopupClose: c, quickButtonProps: f, createQuickButton: x, tooltip: y = "", createTooltip: b, icon: v, disabled: m, touchRippleRef: h, primary: p, children: u, sx: w, ...E } = e, [T, L] = ne(!1), [O, R] = ne(!1), [S, D] = ne(!1), [P, M] = ne(!1), I = ge(null), A = ge(null), V = Z(() => {
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: 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 };
776
- }, [l]), B = zt({ anchor: I.current, label: t, createPopupPanel: o, parentFloat: a, popperProps: V, onClose: () => {
776
+ }, [l]), B = zt({ anchor: F.current, label: t, createPopupPanel: o, parentFloat: a, popperProps: V, onClose: () => {
777
777
  L(!1), c?.();
778
778
  }, onOpen: () => {
779
779
  L(!0), i?.();
780
780
  } }), z = ae((d) => {
781
781
  d.button === 0 && (s?.(d), B.reference.close(0));
782
- }, [s]), ie = 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, ...F } = d;
784
- return k(dt, { ref: C, ...F, disableInteractive: !0, children: g });
785
- }, []), re = s || x, se = (d) => {
786
- const { tooltip: g, createTooltip: C, ...F } = d;
787
- return k(Ot, { icon: v, className: Oe({ "Mui-hovered": S }), sx: { flex: "1 1 100%", ...G }, ...F, children: t });
788
- }, ee = { onFocus: () => {
789
- R(!0);
790
- }, onBlur: () => R(!1), onMouseOver: () => {
791
- D(!0);
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
+ return k(Ot, { icon: v, className: Oe({ "Mui-hovered": D }), sx: { flex: "1 1 100%", ...G }, ...N, children: t });
788
+ }, te = { onFocus: () => {
789
+ P(!0);
790
+ }, onBlur: () => P(!1), onMouseOver: () => {
791
+ S(!0);
792
792
  }, onMouseLeave: () => {
793
- D(!1);
793
+ S(!1);
794
794
  }, onMouseEnter: () => {
795
795
  B.reference.open();
796
796
  }, onMouseDown: (d) => {
797
797
  d.button === 0 && d.preventDefault();
798
798
  } };
799
799
  let le = k(Je, {});
800
- if (re) {
801
- const d = (x || se)({ tabIndex: -1, disabled: m, onMouseEnter: () => {
800
+ if (oe) {
801
+ const d = (x || se)({ tabIndex: -1, disabled: h, onMouseEnter: () => {
802
802
  B.reference.parent.closeChild();
803
803
  }, onMouseDown: (g) => {
804
804
  g.button === 0 && (g.preventDefault(), z(g));
805
- }, className: Oe("quick-left", {}, f?.className), ...f });
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": S }), sx: { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px", paddingLeft: "0px", paddingRight: "0px", marginLeft: "0px", color: (g) => p ? void 0 : g.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (g) => g.palette.text.primary }, ...G }, tabIndex: -1, disabled: m, ...ee, children: k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", border: "1px solid transparent", paddingTop: "1px", paddingBottom: "1px", color: (g) => p ? void 0 : g.palette.text.icon ?? g.palette.action.active }, onMouseOver: (g) => {
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: (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
807
  g.preventDefault(), M(!0);
808
808
  }, onMouseLeave: () => {
809
809
  M(!1);
810
810
  }, onClick: (g) => {
811
811
  g.preventDefault(), T ? B.reference.close() : B.reference.open();
812
- }, children: ie }) })] });
813
- } else le = J(Ot, { ref: A, tabIndex: -1, disabled: m, icon: v, className: Oe({ "Mui-selected": T || n, "Mui-hovered": S }), sx: { flex: "1 1 100%", paddingRight: "0px", ...G }, onClick: (d) => {
812
+ }, children: ee }) })] });
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
- }, ...ee, children: [k("div", { style: { flex: "1 1 100%" }, children: t }), k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", color: (d) => p ? void 0 : d.palette.text.icon ?? d.palette.action.active }, children: ie })] });
816
- let ce = k(X, { "aria-label": "split button", ref: I, tabIndex: m ? void 0 : 0, className: Oe({ "Mui-disabled": m, "Mui-selected": T, "Mui-focusVisible": O || T, "Mui-hovered": S }), 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
- return re && !P && (f?.tooltip || f?.createTooltip) && (ce = (f?.createTooltip ?? Q)({ title: T ? "" : ce ?? f?.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
- })), ks = oe(de((e, r) => {
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
+ 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
+ })), 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;
820
820
  return k(pt, { label: s, shortcut: a, children: k(Wt, { ref: r, outlined: !1, tabIndex: o, selected: t, onMouseDown: (c) => {
821
821
  l && c.preventDefault();
822
822
  }, onClick: () => {
823
823
  n?.(!t);
824
824
  }, ...i }) });
825
- })), _i = k(be, {}), Ai = k(be, { iconKey: "Check" }), Ii = oe(de((e, r) => {
825
+ })), _i = k(be, {}), Ai = k(be, { iconKey: "Check" }), Ii = ie(de((e, r) => {
826
826
  const { children: n, selected: t = !0, outlined: s = !0, sx: a, ...o } = e;
827
827
  let l = n;
828
828
  return l === null && (l = _i), l || (l = Ai), k(X, { ref: r, sx: { display: "flex", border: (i) => t ? `solid ${s ? i.palette.divider : "transparent"} 1px` : "solid transparent 1px", borderRadius: (i) => `${i.shape.borderRadius}px`, backgroundColor: (i) => {
@@ -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 f, x = r.payload, y = x.id, b = x.props;
874
- return e[y] ? Ee({}, e, ((f = {})[y] = Ee({}, e[y], { props: Ee({}, e[y].props, b) }), f)) : 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
- var v = r.payload.id, m = Ee({}, e);
877
- return delete m[v], m;
876
+ var v = r.payload.id, h = Ee({}, e);
877
+ return delete h[v], h;
878
878
  case Ie.DESTROY_BY_ROOT_ID:
879
- var h = r.payload.rootId;
880
- return Object.keys(e).filter(function(p) {
881
- return p.split(".")[0] !== h;
882
- }).reduce(function(p, u) {
879
+ var f = r.payload.rootId;
880
+ return Object.keys(e).filter(function(y) {
881
+ return y.split(".")[0] !== f;
882
+ }).reduce(function(y, u) {
883
883
  var w;
884
- return Ee({}, p, ((w = {})[u] = e[u], w));
884
+ return Ee({}, y, ((w = {})[u] = e[u], w));
885
885
  }, {});
886
886
  default:
887
887
  throw new Error("Unexpected action");
@@ -892,38 +892,38 @@ var qt = "[ERROR]: Modal ID is missing", no = function(e) {
892
892
  for (var r = [], n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", t = 0; t < e; t++) r[t] = n.charAt(Math.floor(62 * Math.random()));
893
893
  return r.join("");
894
894
  }, ji = ["open"];
895
- function Ss(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], f = i[1], x = q.useCallback(function(p, u) {
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], x = q.useCallback(function(y, u) {
897
897
  var w = eo(u, ji);
898
- p ? f({ type: Ie.UPDATE, payload: { id: p, props: w } }) : console.error(qt);
899
- }, [f]), y = q.useCallback(function(p) {
900
- p ? f({ type: Ie.HIDE, payload: { id: p } }) : console.error(qt);
901
- }, [f]), b = q.useCallback(function(p) {
902
- p ? f({ type: Ie.DESTROY, payload: { id: p } }) : console.error(qt);
903
- }, [f]), v = q.useCallback(function(p) {
904
- p ? f({ type: Ie.DESTROY_BY_ROOT_ID, payload: { rootId: p } }) : console.error("[ERROR]: Modal root ID is missing");
905
- }, [f]), m = q.useCallback(function(p, u, w) {
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 w && w.rootId && (E = w.rootId + "." + E), f({ type: Ie.SHOW, payload: { id: E, component: p, props: u, options: w } }), { id: E, hide: function() {
908
- return y(E);
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
912
  return x(E, T);
913
913
  } };
914
- }, [f, y, b, x]), h = a ? No : Fo;
915
- return q.createElement(to.Provider, { value: { state: c, updateModal: x, hideModal: y, destroyModal: b, showModal: m, destroyModalsByRootId: v } }, r, q.createElement(h, Object.assign({}, a && { fallback: l }), Object.keys(c).map(function(p) {
916
- var u = c[p], w = u.component, E = u.props, T = u.options, L = function() {
917
- var R, S;
918
- E != null && E.onExited && E.onExited.apply(E, arguments), E != null && (R = E.TransitionProps) != null && R.onExited && (S = E.TransitionProps).onExited.apply(S, arguments), b(p);
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
+ 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(y);
919
919
  }, O = {};
920
- return O = t ? { onExited: L } : { TransitionProps: Ee({}, E?.TransitionProps, { onExited: L }) }, q.createElement(w, Object.assign({}, E, { key: p, onClose: function() {
921
- T && T.hideOnClose && y(p), T && T.destroyOnClose && T.hideOnClose && b(p), E && E.onClose && E.onClose.apply(E, arguments);
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
  }
925
925
  var ro = { enforceProvider: !1 };
926
- function Ds(e) {
926
+ function Ss(e) {
927
927
  Object.assign(ro, e);
928
928
  }
929
929
  function $i() {
@@ -937,7 +937,7 @@ function gn(e) {
937
937
  if ($i().enforceProvider && l === void 0) throw new Error("useModalContext must be used within a ModalProvider");
938
938
  return l || Vi;
939
939
  })(), t = n.showModal, s = n.destroyModalsByRootId, a = eo(n, zi), o = ge(no(6));
940
- return Se(function() {
940
+ return De(function() {
941
941
  return function() {
942
942
  !r && s && s(o.current);
943
943
  };
@@ -946,24 +946,26 @@ function gn(e) {
946
946
  }, [t]), destroyModalsByRootId: s }, a);
947
947
  }
948
948
  function Os(e) {
949
- const [r, n] = ne(() => /* @__PURE__ */ new Map()), { showModal: t, updateModal: s, destroyModal: a, hideModal: o } = gn({ disableAutoDestroy: !0 });
950
- return (l, i, c, f) => new Promise((x, y) => {
951
- const b = { ...e, ...c, onHide: () => {
952
- const p = r.get(l);
953
- c?.onHide?.(), n((u) => (u.delete(l), u)), o(p.id);
954
- }, onDone: (p) => {
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((x, m) => {
951
+ let b = !1;
952
+ c?.disableAutoDestroy !== void 0 && (b = c.disableAutoDestroy, delete (c = { ...c }).disableAutoDestroy);
953
+ const v = { ...e, ...c, ...p, onHide: () => {
955
954
  const u = r.get(l);
956
- n((w) => (w.delete(l), w)), c?.onDone?.(p), u && u.id && !f?.disableAutoDestroy && a(u.id);
957
- }, onShown: (p) => {
958
- n((u) => {
959
- const w = u.get(l);
960
- return u.set(l, { ...w, element: p }), u;
961
- }), x(p);
962
- }, open: !0 }, v = r.get(l);
963
- if (v) return s(v.id, b), void x(v.element);
964
- if (!i) return void y("invalid function");
965
- const m = q.lazy(i), h = t(m, b, { destroyOnClose: !f?.disableAutoDestroy });
966
- n((p) => (p.set(l, { id: h.id, element: null }), p));
955
+ p?.onHide?.(), n((w) => (w.delete(l), w)), o(u.id);
956
+ }, 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
+ }, onShown: (u) => {
960
+ n((w) => {
961
+ const E = w.get(l);
962
+ return w.set(l, { ...E, element: u }), w;
963
+ }), x(u);
964
+ }, open: !0 }, h = r.get(l);
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));
967
969
  });
968
970
  }
969
971
  var jn, $n, zn, Wn, Hn, Un = { exports: {} };
@@ -979,10 +981,10 @@ function Hi() {
979
981
  function n() {
980
982
  }
981
983
  return n.resetWarningCache = r, zn = function() {
982
- function t(o, l, i, c, f, x) {
984
+ function t(o, l, i, c, p, x) {
983
985
  if (x !== e) {
984
- var y = 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");
985
- throw y.name = "Invariant Violation", y;
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;
986
988
  }
987
989
  }
988
990
  function s() {
@@ -1019,8 +1021,8 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1019
1021
  t.flatten ? s.push.apply(s, i) : s.push({ scopeParent: o, candidates: i });
1020
1022
  } else {
1021
1023
  rt.call(o, It) && t.filter(o) && (n || !r.includes(o)) && s.push(o);
1022
- var c = o.shadowRoot || typeof t.getShadowRoot == "function" && t.getShadowRoot(o), f = !Vt(c, !1) && (!t.shadowRootFilter || t.shadowRootFilter(o));
1023
- if (c && f) {
1024
+ var c = o.shadowRoot || typeof t.getShadowRoot == "function" && t.getShadowRoot(o), p = !Vt(c, !1) && (!t.shadowRootFilter || t.shadowRootFilter(o));
1025
+ if (c && p) {
1024
1026
  var x = e(c === !0 ? o.children : c.children, !0, t);
1025
1027
  t.flatten ? s.push.apply(s, x) : s.push({ scopeParent: o, candidates: x });
1026
1028
  } else a.unshift.apply(a, o.children);
@@ -1078,12 +1080,12 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1078
1080
  e = a;
1079
1081
  }
1080
1082
  if ((function(i) {
1081
- var c, f, x, y, b = i && Ft(i), v = (c = b) === null || c === void 0 ? void 0 : c.host, m = !1;
1082
- if (b && b !== i) for (m = !!((f = v) !== null && f !== void 0 && (x = f.ownerDocument) !== null && x !== void 0 && x.contains(v) || i != null && (y = i.ownerDocument) !== null && y !== void 0 && y.contains(i)); !m && v; ) {
1083
- var h, p, u;
1084
- m = !((p = v = (h = b = Ft(v)) === null || h === void 0 ? void 0 : h.host) === null || p === void 0 || (u = p.ownerDocument) === null || u === void 0 || !u.contains(v));
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));
1085
1087
  }
1086
- return m;
1088
+ return h;
1087
1089
  })(e)) return !e.getClientRects().length;
1088
1090
  if (n !== "legacy-full") return !0;
1089
1091
  }
@@ -1116,9 +1118,9 @@ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1116
1118
  }, Ki = function e(r) {
1117
1119
  var n = [], t = [];
1118
1120
  return r.forEach(function(s, a) {
1119
- var o = !!s.scopeParent, l = o ? s.scopeParent : s, i = (function(f, x) {
1120
- var y = Ke(f);
1121
- return y < 0 && x && !lo(f) ? 0 : y;
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;
1122
1124
  })(l, o), c = o ? e(s.candidates) : l;
1123
1125
  i === 0 ? o ? n.push.apply(n, c) : n.push(l) : t.push({ documentOrder: a, tabIndex: i, item: s, isScope: o, content: c });
1124
1126
  }), t.sort(Ui).reduce(function(s, a) {
@@ -1219,204 +1221,204 @@ var ea = function(e, r) {
1219
1221
  return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
1220
1222
  }, oa = [];
1221
1223
  const ia = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTrap: function(e, r) {
1222
- var n, t = r?.document || document, s = r?.trapStack || oa, a = Xn({ returnFocusOnDeactivate: !0, escapeDeactivates: !0, delayInitialFocus: !0, isKeyForward: na, isKeyBackward: ra }, r), o = { containers: [], containerGroups: [], tabbableGroups: [], nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: !1, paused: !1, manuallyPaused: !1, delayInitialFocusTimer: void 0, recentNavEvent: void 0 }, l = function(S, D, P) {
1223
- return S && S[D] !== void 0 ? S[D] : a[P || D];
1224
- }, i = function(S, D) {
1225
- var P = typeof D?.composedPath == "function" ? D.composedPath() : void 0;
1224
+ var n, t = r?.document || document, s = r?.trapStack || oa, a = Xn({ returnFocusOnDeactivate: !0, escapeDeactivates: !0, delayInitialFocus: !0, isKeyForward: na, isKeyBackward: ra }, r), o = { containers: [], containerGroups: [], tabbableGroups: [], nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: !1, paused: !1, manuallyPaused: !1, delayInitialFocusTimer: void 0, recentNavEvent: void 0 }, l = function(D, S, _) {
1225
+ return D && D[S] !== void 0 ? D[S] : a[_ || S];
1226
+ }, i = function(D, S) {
1227
+ var _ = typeof S?.composedPath == "function" ? S.composedPath() : void 0;
1226
1228
  return o.containerGroups.findIndex(function(M) {
1227
- var I = M.container, A = M.tabbableNodes;
1228
- return I.contains(S) || P?.includes(I) || A.find(function(V) {
1229
- return V === S;
1229
+ var F = M.container, A = M.tabbableNodes;
1230
+ return F.contains(D) || _?.includes(F) || A.find(function(V) {
1231
+ return V === D;
1230
1232
  });
1231
1233
  });
1232
- }, c = function(S) {
1233
- var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, P = D.hasFallback, M = P !== void 0 && P, I = D.params, A = I === void 0 ? [] : I, V = a[S];
1234
+ }, c = function(D) {
1235
+ var S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ = S.hasFallback, M = _ !== void 0 && _, F = S.params, A = F === void 0 ? [] : F, V = a[D];
1234
1236
  if (typeof V == "function" && (V = V.apply(void 0, Zi(A))), V === !0 && (V = void 0), !V) {
1235
1237
  if (V === void 0 || V === !1) return V;
1236
- throw new Error("`".concat(S, "` was specified but was not a node, or did not return a node"));
1238
+ throw new Error("`".concat(D, "` was specified but was not a node, or did not return a node"));
1237
1239
  }
1238
1240
  var B = V;
1239
1241
  if (typeof V == "string") {
1240
1242
  try {
1241
1243
  B = t.querySelector(V);
1242
1244
  } catch (z) {
1243
- throw new Error("`".concat(S, '` appears to be an invalid selector; error="').concat(z.message, '"'));
1245
+ throw new Error("`".concat(D, '` appears to be an invalid selector; error="').concat(z.message, '"'));
1244
1246
  }
1245
- if (!B && !M) throw new Error("`".concat(S, "` as selector refers to no known node"));
1247
+ if (!B && !M) throw new Error("`".concat(D, "` as selector refers to no known node"));
1246
1248
  }
1247
1249
  return B;
1248
- }, f = function() {
1249
- var S = c("initialFocus", { hasFallback: !0 });
1250
- if (S === !1) return !1;
1251
- if (S === void 0 || S && !_t(S, a.tabbableOptions)) if (i(t.activeElement) >= 0) S = t.activeElement;
1250
+ }, p = function() {
1251
+ var D = c("initialFocus", { hasFallback: !0 });
1252
+ if (D === !1) return !1;
1253
+ if (D === void 0 || D && !_t(D, a.tabbableOptions)) if (i(t.activeElement) >= 0) D = t.activeElement;
1252
1254
  else {
1253
- var D = o.tabbableGroups[0];
1254
- S = D && D.firstTabbableNode || c("fallbackFocus");
1255
+ var S = o.tabbableGroups[0];
1256
+ D = S && S.firstTabbableNode || c("fallbackFocus");
1255
1257
  }
1256
- else S === null && (S = c("fallbackFocus"));
1257
- if (!S) throw new Error("Your focus-trap needs to have at least one focusable element");
1258
- return S;
1258
+ else D === null && (D = c("fallbackFocus"));
1259
+ if (!D) throw new Error("Your focus-trap needs to have at least one focusable element");
1260
+ return D;
1259
1261
  }, x = function() {
1260
- if (o.containerGroups = o.containers.map(function(S) {
1261
- var D = uo(S, a.tabbableOptions), P = po(S, a.tabbableOptions), M = D.length > 0 ? D[0] : void 0, I = D.length > 0 ? D[D.length - 1] : void 0, A = P.find(function(z) {
1262
+ if (o.containerGroups = o.containers.map(function(D) {
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) {
1262
1264
  return et(z);
1263
- }), V = P.slice().reverse().find(function(z) {
1265
+ }), V = _.slice().reverse().find(function(z) {
1264
1266
  return et(z);
1265
- }), B = !!D.find(function(z) {
1267
+ }), B = !!S.find(function(z) {
1266
1268
  return Ke(z) > 0;
1267
1269
  });
1268
- return { container: S, tabbableNodes: D, focusableNodes: P, posTabIndexesFound: B, firstTabbableNode: M, lastTabbableNode: I, firstDomTabbableNode: A, lastDomTabbableNode: V, nextTabbableNode: function(z) {
1269
- var ie = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], G = D.indexOf(z);
1270
- return G < 0 ? ie ? P.slice(P.indexOf(z) + 1).find(function(Q) {
1270
+ return { container: D, tabbableNodes: S, focusableNodes: _, posTabIndexesFound: B, firstTabbableNode: M, lastTabbableNode: F, firstDomTabbableNode: A, lastDomTabbableNode: V, nextTabbableNode: function(z) {
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) {
1271
1273
  return et(Q);
1272
- }) : P.slice(0, P.indexOf(z)).reverse().find(function(Q) {
1274
+ }) : _.slice(0, _.indexOf(z)).reverse().find(function(Q) {
1273
1275
  return et(Q);
1274
- }) : D[G + (ie ? 1 : -1)];
1276
+ }) : S[G + (ee ? 1 : -1)];
1275
1277
  } };
1276
- }), o.tabbableGroups = o.containerGroups.filter(function(S) {
1277
- return S.tabbableNodes.length > 0;
1278
+ }), o.tabbableGroups = o.containerGroups.filter(function(D) {
1279
+ return D.tabbableNodes.length > 0;
1278
1280
  }), o.tabbableGroups.length <= 0 && !c("fallbackFocus")) throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
1279
- if (o.containerGroups.find(function(S) {
1280
- return S.posTabIndexesFound;
1281
+ if (o.containerGroups.find(function(D) {
1282
+ return D.posTabIndexesFound;
1281
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.");
1282
- }, y = function(S) {
1283
- var D = S.activeElement;
1284
- if (D) return D.shadowRoot && D.shadowRoot.activeElement !== null ? y(D.shadowRoot) : D;
1285
- }, b = function(S) {
1286
- S !== !1 && S !== y(document) && (S && S.focus ? (S.focus({ preventScroll: !!a.preventScroll }), o.mostRecentlyFocusedNode = S, (function(D) {
1287
- return D.tagName && D.tagName.toLowerCase() === "input" && typeof D.select == "function";
1288
- })(S) && S.select()) : b(f()));
1289
- }, v = function(S) {
1290
- var D = c("setReturnFocus", { params: [S] });
1291
- return D || D !== !1 && S;
1292
- }, m = function(S) {
1293
- var D = S.target, P = S.event, M = S.isBackward, I = M !== void 0 && M;
1294
- D = D || Tt(P), x();
1284
+ }, m = function(D) {
1285
+ var S = D.activeElement;
1286
+ if (S) return S.shadowRoot && S.shadowRoot.activeElement !== null ? m(S.shadowRoot) : S;
1287
+ }, b = function(D) {
1288
+ D !== !1 && D !== m(document) && (D && D.focus ? (D.focus({ preventScroll: !!a.preventScroll }), o.mostRecentlyFocusedNode = D, (function(S) {
1289
+ return S.tagName && S.tagName.toLowerCase() === "input" && typeof S.select == "function";
1290
+ })(D) && D.select()) : b(p()));
1291
+ }, v = function(D) {
1292
+ var S = c("setReturnFocus", { params: [D] });
1293
+ return S || S !== !1 && D;
1294
+ }, h = function(D) {
1295
+ var S = D.target, _ = D.event, M = D.isBackward, F = M !== void 0 && M;
1296
+ S = S || Tt(_), x();
1295
1297
  var A = null;
1296
1298
  if (o.tabbableGroups.length > 0) {
1297
- var V = i(D, P), B = V >= 0 ? o.containerGroups[V] : void 0;
1298
- if (V < 0) A = I ? o.tabbableGroups[o.tabbableGroups.length - 1].lastTabbableNode : o.tabbableGroups[0].firstTabbableNode;
1299
- else if (I) {
1300
- var z = o.tabbableGroups.findIndex(function(ee) {
1301
- var le = ee.firstTabbableNode;
1302
- return D === le;
1299
+ var V = i(S, _), B = V >= 0 ? o.containerGroups[V] : void 0;
1300
+ if (V < 0) A = F ? o.tabbableGroups[o.tabbableGroups.length - 1].lastTabbableNode : o.tabbableGroups[0].firstTabbableNode;
1301
+ else if (F) {
1302
+ var z = o.tabbableGroups.findIndex(function(te) {
1303
+ var le = te.firstTabbableNode;
1304
+ return S === le;
1303
1305
  });
1304
- if (z < 0 && (B.container === D || _t(D, a.tabbableOptions) && !et(D, a.tabbableOptions) && !B.nextTabbableNode(D, !1)) && (z = V), z >= 0) {
1305
- var ie = z === 0 ? o.tabbableGroups.length - 1 : z - 1, G = o.tabbableGroups[ie];
1306
- A = Ke(D) >= 0 ? G.lastTabbableNode : G.lastDomTabbableNode;
1307
- } else kt(P) || (A = B.nextTabbableNode(D, !1));
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 ee = z === 0 ? o.tabbableGroups.length - 1 : z - 1, G = o.tabbableGroups[ee];
1308
+ A = Ke(S) >= 0 ? G.lastTabbableNode : G.lastDomTabbableNode;
1309
+ } else kt(_) || (A = B.nextTabbableNode(S, !1));
1308
1310
  } else {
1309
- var Q = o.tabbableGroups.findIndex(function(ee) {
1310
- var le = ee.lastTabbableNode;
1311
- return D === le;
1311
+ var Q = o.tabbableGroups.findIndex(function(te) {
1312
+ var le = te.lastTabbableNode;
1313
+ return S === le;
1312
1314
  });
1313
- if (Q < 0 && (B.container === D || _t(D, a.tabbableOptions) && !et(D, a.tabbableOptions) && !B.nextTabbableNode(D)) && (Q = V), Q >= 0) {
1314
- var re = Q === o.tabbableGroups.length - 1 ? 0 : Q + 1, se = o.tabbableGroups[re];
1315
- A = Ke(D) >= 0 ? se.firstTabbableNode : se.firstDomTabbableNode;
1316
- } else kt(P) || (A = B.nextTabbableNode(D));
1315
+ if (Q < 0 && (B.container === S || _t(S, a.tabbableOptions) && !et(S, a.tabbableOptions) && !B.nextTabbableNode(S)) && (Q = V), Q >= 0) {
1316
+ var oe = Q === o.tabbableGroups.length - 1 ? 0 : Q + 1, se = o.tabbableGroups[oe];
1317
+ A = Ke(S) >= 0 ? se.firstTabbableNode : se.firstDomTabbableNode;
1318
+ } else kt(_) || (A = B.nextTabbableNode(S));
1317
1319
  }
1318
1320
  } else A = c("fallbackFocus");
1319
1321
  return A;
1320
- }, h = function(S) {
1321
- var D = Tt(S);
1322
- i(D, S) >= 0 || (gt(a.clickOutsideDeactivates, S) ? n.deactivate({ returnFocus: a.returnFocusOnDeactivate }) : gt(a.allowOutsideClick, S) || S.preventDefault());
1323
- }, p = function(S) {
1324
- var D = Tt(S), P = i(D, S) >= 0;
1325
- if (P || D instanceof Document) P && (o.mostRecentlyFocusedNode = D);
1322
+ }, f = function(D) {
1323
+ var S = Tt(D);
1324
+ i(S, D) >= 0 || (gt(a.clickOutsideDeactivates, D) ? n.deactivate({ returnFocus: a.returnFocusOnDeactivate }) : gt(a.allowOutsideClick, D) || D.preventDefault());
1325
+ }, y = function(D) {
1326
+ var S = Tt(D), _ = i(S, D) >= 0;
1327
+ if (_ || S instanceof Document) _ && (o.mostRecentlyFocusedNode = S);
1326
1328
  else {
1327
1329
  var M;
1328
- S.stopImmediatePropagation();
1329
- var I = !0;
1330
+ D.stopImmediatePropagation();
1331
+ var F = !0;
1330
1332
  if (o.mostRecentlyFocusedNode) if (Ke(o.mostRecentlyFocusedNode) > 0) {
1331
1333
  var A = i(o.mostRecentlyFocusedNode), V = o.containerGroups[A].tabbableNodes;
1332
1334
  if (V.length > 0) {
1333
1335
  var B = V.findIndex(function(z) {
1334
1336
  return z === o.mostRecentlyFocusedNode;
1335
1337
  });
1336
- B >= 0 && (a.isKeyForward(o.recentNavEvent) ? B + 1 < V.length && (M = V[B + 1], I = !1) : B - 1 >= 0 && (M = V[B - 1], I = !1));
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));
1337
1339
  }
1338
1340
  } else o.containerGroups.some(function(z) {
1339
- return z.tabbableNodes.some(function(ie) {
1340
- return Ke(ie) > 0;
1341
+ return z.tabbableNodes.some(function(ee) {
1342
+ return Ke(ee) > 0;
1341
1343
  });
1342
- }) || (I = !1);
1343
- else I = !1;
1344
- I && (M = m({ target: o.mostRecentlyFocusedNode, isBackward: a.isKeyBackward(o.recentNavEvent) })), b(M || o.mostRecentlyFocusedNode || f());
1344
+ }) || (F = !1);
1345
+ else F = !1;
1346
+ F && (M = h({ target: o.mostRecentlyFocusedNode, isBackward: a.isKeyBackward(o.recentNavEvent) })), b(M || o.mostRecentlyFocusedNode || p());
1345
1347
  }
1346
1348
  o.recentNavEvent = void 0;
1347
- }, u = function(S) {
1348
- (a.isKeyForward(S) || a.isKeyBackward(S)) && (function(D) {
1349
- var P = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
1350
- o.recentNavEvent = D;
1351
- var M = m({ event: D, isBackward: P });
1352
- M && (kt(D) && D.preventDefault(), b(M));
1353
- })(S, a.isKeyBackward(S));
1354
- }, w = function(S) {
1355
- var D;
1356
- ((D = S) == null ? void 0 : D.key) !== "Escape" && D?.key !== "Esc" && D?.keyCode !== 27 || gt(a.escapeDeactivates, S) === !1 || (S.preventDefault(), n.deactivate());
1357
- }, E = function(S) {
1358
- var D = Tt(S);
1359
- i(D, S) >= 0 || gt(a.clickOutsideDeactivates, S) || gt(a.allowOutsideClick, S) || (S.preventDefault(), S.stopImmediatePropagation());
1349
+ }, u = function(D) {
1350
+ (a.isKeyForward(D) || a.isKeyBackward(D)) && (function(S) {
1351
+ var _ = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
1352
+ o.recentNavEvent = S;
1353
+ var M = h({ event: S, isBackward: _ });
1354
+ M && (kt(S) && S.preventDefault(), b(M));
1355
+ })(D, a.isKeyBackward(D));
1356
+ }, w = function(D) {
1357
+ var S;
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
+ }, E = function(D) {
1360
+ var S = Tt(D);
1361
+ i(S, D) >= 0 || gt(a.clickOutsideDeactivates, D) || gt(a.allowOutsideClick, D) || (D.preventDefault(), D.stopImmediatePropagation());
1360
1362
  }, T = function() {
1361
1363
  if (o.active) return ea(s, n), o.delayInitialFocusTimer = a.delayInitialFocus ? Kn(function() {
1362
- b(f());
1363
- }) : b(f()), t.addEventListener("focusin", p, !0), t.addEventListener("mousedown", h, { capture: !0, passive: !1 }), t.addEventListener("touchstart", h, { 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;
1364
+ b(p());
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;
1364
1366
  }, L = function() {
1365
- if (o.active) return t.removeEventListener("focusin", p, !0), t.removeEventListener("mousedown", h, !0), t.removeEventListener("touchstart", h, !0), t.removeEventListener("click", E, !0), t.removeEventListener("keydown", u, !0), t.removeEventListener("keydown", w), n;
1366
- }, O = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(function(S) {
1367
- S.some(function(D) {
1368
- return Array.from(D.removedNodes).some(function(P) {
1369
- return P === o.mostRecentlyFocusedNode;
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
+ }, O = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(function(D) {
1369
+ D.some(function(S) {
1370
+ return Array.from(S.removedNodes).some(function(_) {
1371
+ return _ === o.mostRecentlyFocusedNode;
1370
1372
  });
1371
- }) && b(f());
1372
- }) : void 0, R = function() {
1373
- O && (O.disconnect(), o.active && !o.paused && o.containers.map(function(S) {
1374
- O.observe(S, { subtree: !0, childList: !0 });
1373
+ }) && b(p());
1374
+ }) : void 0, P = function() {
1375
+ O && (O.disconnect(), o.active && !o.paused && o.containers.map(function(D) {
1376
+ O.observe(D, { subtree: !0, childList: !0 });
1375
1377
  }));
1376
1378
  };
1377
1379
  return n = { get active() {
1378
1380
  return o.active;
1379
1381
  }, get paused() {
1380
1382
  return o.paused;
1381
- }, activate: function(S) {
1383
+ }, activate: function(D) {
1382
1384
  if (o.active) return this;
1383
- var D = l(S, "onActivate"), P = l(S, "onPostActivate"), M = l(S, "checkCanFocusTrap");
1384
- M || x(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = y(t), D?.();
1385
- var I = function() {
1386
- M && x(), T(), R(), P?.();
1385
+ var S = l(D, "onActivate"), _ = l(D, "onPostActivate"), M = l(D, "checkCanFocusTrap");
1386
+ M || x(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = m(t), S?.();
1387
+ var F = function() {
1388
+ M && x(), T(), P(), _?.();
1387
1389
  };
1388
- return M ? (M(o.containers.concat()).then(I, I), this) : (I(), this);
1389
- }, deactivate: function(S) {
1390
+ return M ? (M(o.containers.concat()).then(F, F), this) : (F(), this);
1391
+ }, deactivate: function(D) {
1390
1392
  if (!o.active) return this;
1391
- var D = Xn({ onDeactivate: a.onDeactivate, onPostDeactivate: a.onPostDeactivate, checkCanReturnFocus: a.checkCanReturnFocus }, S);
1392
- clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, L(), o.active = !1, o.paused = !1, R(), ta(s, n);
1393
- var P = l(D, "onDeactivate"), M = l(D, "onPostDeactivate"), I = l(D, "checkCanReturnFocus"), A = l(D, "returnFocus", "returnFocusOnDeactivate");
1394
- P?.();
1393
+ var S = Xn({ onDeactivate: a.onDeactivate, onPostDeactivate: a.onPostDeactivate, checkCanReturnFocus: a.checkCanReturnFocus }, D);
1394
+ clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, L(), o.active = !1, o.paused = !1, P(), ta(s, n);
1395
+ var _ = l(S, "onDeactivate"), M = l(S, "onPostDeactivate"), F = l(S, "checkCanReturnFocus"), A = l(S, "returnFocus", "returnFocusOnDeactivate");
1396
+ _?.();
1395
1397
  var V = function() {
1396
1398
  Kn(function() {
1397
1399
  A && b(v(o.nodeFocusedBeforeActivation)), M?.();
1398
1400
  });
1399
1401
  };
1400
- return A && I ? (I(v(o.nodeFocusedBeforeActivation)).then(V, V), this) : (V(), this);
1401
- }, pause: function(S) {
1402
- return o.active ? (o.manuallyPaused = !0, this._setPausedState(!0, S)) : this;
1403
- }, unpause: function(S) {
1404
- return o.active ? (o.manuallyPaused = !1, s[s.length - 1] !== this ? this : this._setPausedState(!1, S)) : this;
1405
- }, updateContainerElements: function(S) {
1406
- var D = [].concat(S).filter(Boolean);
1407
- return o.containers = D.map(function(P) {
1408
- return typeof P == "string" ? t.querySelector(P) : P;
1409
- }), o.active && x(), R(), this;
1402
+ return A && F ? (F(v(o.nodeFocusedBeforeActivation)).then(V, V), this) : (V(), this);
1403
+ }, pause: function(D) {
1404
+ return o.active ? (o.manuallyPaused = !0, this._setPausedState(!0, D)) : this;
1405
+ }, unpause: function(D) {
1406
+ return o.active ? (o.manuallyPaused = !1, s[s.length - 1] !== this ? this : this._setPausedState(!1, D)) : this;
1407
+ }, updateContainerElements: function(D) {
1408
+ var S = [].concat(D).filter(Boolean);
1409
+ return o.containers = S.map(function(_) {
1410
+ return typeof _ == "string" ? t.querySelector(_) : _;
1411
+ }), o.active && x(), P(), this;
1410
1412
  } }, Object.defineProperties(n, { _isManuallyPaused: { value: function() {
1411
1413
  return o.manuallyPaused;
1412
- } }, _setPausedState: { value: function(S, D) {
1413
- if (o.paused === S) return this;
1414
- if (o.paused = S, S) {
1415
- var P = l(D, "onPause"), M = l(D, "onPostPause");
1416
- P?.(), L(), R(), M?.();
1414
+ } }, _setPausedState: { value: function(D, S) {
1415
+ if (o.paused === D) return this;
1416
+ if (o.paused = D, D) {
1417
+ var _ = l(S, "onPause"), M = l(S, "onPostPause");
1418
+ _?.(), L(), P(), M?.();
1417
1419
  } else {
1418
- var I = l(D, "onUnpause"), A = l(D, "onPostUnpause");
1419
- I?.(), x(), T(), R(), A?.();
1420
+ var F = l(S, "onUnpause"), A = l(S, "onPostUnpause");
1421
+ F?.(), x(), T(), P(), A?.();
1420
1422
  }
1421
1423
  return this;
1422
1424
  } } }), n.updateContainerElements(e), n;
@@ -1430,23 +1432,23 @@ var qn, Qn, la = (function() {
1430
1432
  return v && typeof Symbol == "function" && v.constructor === Symbol && v !== Symbol.prototype ? "symbol" : typeof v;
1431
1433
  }, e(b);
1432
1434
  }
1433
- function r(b, v, m) {
1434
- return v && (function(h, p) {
1435
- for (var u = 0; u < p.length; u++) {
1436
- var w = p[u];
1437
- w.enumerable = w.enumerable || !1, w.configurable = !0, "value" in w && (w.writable = !0), Object.defineProperty(h, o(w.key), w);
1435
+ function r(b, v, h) {
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);
1438
1440
  }
1439
1441
  })(b.prototype, v), Object.defineProperty(b, "prototype", { writable: !1 }), b;
1440
1442
  }
1441
- function n(b, v, m) {
1442
- return v = s(v), (function(h, p) {
1443
- if (p && (e(p) == "object" || typeof p == "function")) return p;
1444
- if (p !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
1443
+ function n(b, v, h) {
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");
1445
1447
  return (function(u) {
1446
1448
  if (u === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1447
1449
  return u;
1448
- })(h);
1449
- })(b, t() ? Reflect.construct(v, m || [], s(b).constructor) : v.apply(b, m));
1450
+ })(f);
1451
+ })(b, t() ? Reflect.construct(v, h || [], s(b).constructor) : v.apply(b, h));
1450
1452
  }
1451
1453
  function t() {
1452
1454
  try {
@@ -1464,99 +1466,99 @@ var qn, Qn, la = (function() {
1464
1466
  }, s(b);
1465
1467
  }
1466
1468
  function a(b, v) {
1467
- return a = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(m, h) {
1468
- return m.__proto__ = h, m;
1469
+ return a = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(h, f) {
1470
+ return h.__proto__ = f, h;
1469
1471
  }, a(b, v);
1470
1472
  }
1471
1473
  function o(b) {
1472
- var v = (function(m, h) {
1473
- if (e(m) != "object" || !m) return m;
1474
- var p = m[Symbol.toPrimitive];
1475
- if (p !== void 0) {
1476
- var u = p.call(m, h);
1474
+ var v = (function(h, f) {
1475
+ if (e(h) != "object" || !h) return h;
1476
+ var y = h[Symbol.toPrimitive];
1477
+ if (y !== void 0) {
1478
+ var u = y.call(h, f);
1477
1479
  if (e(u) != "object") return u;
1478
1480
  throw new TypeError("@@toPrimitive must return a primitive value.");
1479
1481
  }
1480
- return (h === "string" ? String : Number)(m);
1482
+ return (f === "string" ? String : Number)(h);
1481
1483
  })(b, "string");
1482
1484
  return e(v) == "symbol" ? v : v + "";
1483
1485
  }
1484
1486
  Qn = 1;
1485
- var l = q, i = yn(), c = aa.createFocusTrap, f = sa.isFocusable, x = (function(b) {
1486
- function v(m) {
1487
- var h;
1487
+ var l = q, i = yn(), c = aa.createFocusTrap, p = sa.isFocusable, x = (function(b) {
1488
+ function v(h) {
1489
+ var f;
1488
1490
  (function(w, E) {
1489
1491
  if (!(w instanceof E)) throw new TypeError("Cannot call a class as a function");
1490
1492
  })(this, v), (function(w, E, T) {
1491
1493
  (E = o(E)) in w ? Object.defineProperty(w, E, { value: T, enumerable: !0, configurable: !0, writable: !0 }) : w[E] = T;
1492
- })(h = n(this, v, [m]), "getNodeForOption", function(w) {
1494
+ })(f = n(this, v, [h]), "getNodeForOption", function(w) {
1493
1495
  var E, T = (E = this.internalOptions[w]) !== null && E !== void 0 ? E : this.originalOptions[w];
1494
1496
  if (typeof T == "function") {
1495
- for (var L = arguments.length, O = new Array(L > 1 ? L - 1 : 0), R = 1; R < L; R++) O[R - 1] = arguments[R];
1497
+ for (var L = arguments.length, O = new Array(L > 1 ? L - 1 : 0), P = 1; P < L; P++) O[P - 1] = arguments[P];
1496
1498
  T = T.apply(void 0, O);
1497
1499
  }
1498
1500
  if (T === !0 && (T = void 0), !T) {
1499
1501
  if (T === void 0 || T === !1) return T;
1500
1502
  throw new Error("`".concat(w, "` was specified but was not a node, or did not return a node"));
1501
1503
  }
1502
- var S, D = T;
1503
- if (typeof T == "string" && !(D = (S = this.getDocument()) === null || S === void 0 ? void 0 : S.querySelector(T))) throw new Error("`".concat(w, "` as selector refers to no known node"));
1504
- return D;
1505
- }), h.handleDeactivate = h.handleDeactivate.bind(h), h.handlePostDeactivate = h.handlePostDeactivate.bind(h), h.handleClickOutsideDeactivates = h.handleClickOutsideDeactivates.bind(h), h.internalOptions = { returnFocusOnDeactivate: !1, checkCanReturnFocus: null, onDeactivate: h.handleDeactivate, onPostDeactivate: h.handlePostDeactivate, clickOutsideDeactivates: h.handleClickOutsideDeactivates }, h.originalOptions = { returnFocusOnDeactivate: !0, onDeactivate: null, onPostDeactivate: null, checkCanReturnFocus: null, clickOutsideDeactivates: !1 };
1506
- var p = m.focusTrapOptions;
1507
- for (var u in p) Object.prototype.hasOwnProperty.call(p, u) && (u !== "returnFocusOnDeactivate" && u !== "onDeactivate" && u !== "onPostDeactivate" && u !== "checkCanReturnFocus" && u !== "clickOutsideDeactivates" ? h.internalOptions[u] = p[u] : h.originalOptions[u] = p[u]);
1508
- return h.outsideClick = null, h.focusTrapElements = m.containerElements || [], h.updatePreviousElement(), h;
1509
- }
1510
- return (function(m, h) {
1511
- if (typeof h != "function" && h !== null) throw new TypeError("Super expression must either be null or a function");
1512
- m.prototype = Object.create(h && h.prototype, { constructor: { value: m, writable: !0, configurable: !0 } }), Object.defineProperty(m, "prototype", { writable: !1 }), h && a(m, h);
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(w, "` as selector refers to no known node"));
1506
+ return S;
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 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
+ return f.outsideClick = null, f.focusTrapElements = h.containerElements || [], f.updatePreviousElement(), f;
1511
+ }
1512
+ return (function(h, f) {
1513
+ if (typeof f != "function" && f !== null) throw new TypeError("Super expression must either be null or a function");
1514
+ h.prototype = Object.create(f && f.prototype, { constructor: { value: h, writable: !0, configurable: !0 } }), Object.defineProperty(h, "prototype", { writable: !1 }), f && a(h, f);
1513
1515
  })(v, b), r(v, [{ key: "getDocument", value: function() {
1514
1516
  return this.props.focusTrapOptions.document || (typeof document < "u" ? document : void 0);
1515
1517
  } }, { key: "getReturnFocusNode", value: function() {
1516
- var m = this.getNodeForOption("setReturnFocus", this.previouslyFocusedElement);
1517
- return m || m !== !1 && this.previouslyFocusedElement;
1518
+ var h = this.getNodeForOption("setReturnFocus", this.previouslyFocusedElement);
1519
+ return h || h !== !1 && this.previouslyFocusedElement;
1518
1520
  } }, { key: "updatePreviousElement", value: function() {
1519
- var m = this.getDocument();
1520
- m && (this.previouslyFocusedElement = m.activeElement);
1521
+ var h = this.getDocument();
1522
+ h && (this.previouslyFocusedElement = h.activeElement);
1521
1523
  } }, { key: "deactivateTrap", value: function() {
1522
1524
  this.focusTrap && this.focusTrap.active && this.focusTrap.deactivate({ returnFocus: !1, checkCanReturnFocus: null, onDeactivate: this.originalOptions.onDeactivate });
1523
- } }, { key: "handleClickOutsideDeactivates", value: function(m) {
1524
- var h = typeof this.originalOptions.clickOutsideDeactivates == "function" ? this.originalOptions.clickOutsideDeactivates.call(null, m) : this.originalOptions.clickOutsideDeactivates;
1525
- return h && (this.outsideClick = { target: m.target, allowDeactivation: h }), h;
1525
+ } }, { key: "handleClickOutsideDeactivates", value: function(h) {
1526
+ var f = typeof this.originalOptions.clickOutsideDeactivates == "function" ? this.originalOptions.clickOutsideDeactivates.call(null, h) : this.originalOptions.clickOutsideDeactivates;
1527
+ return f && (this.outsideClick = { target: h.target, allowDeactivation: f }), f;
1526
1528
  } }, { key: "handleDeactivate", value: function() {
1527
1529
  this.originalOptions.onDeactivate && this.originalOptions.onDeactivate.call(null), this.deactivateTrap();
1528
1530
  } }, { key: "handlePostDeactivate", value: function() {
1529
- var m = this, h = function() {
1530
- var p = m.getReturnFocusNode(), u = !(!m.originalOptions.returnFocusOnDeactivate || p == null || !p.focus || m.outsideClick && (!m.outsideClick.allowDeactivation || f(m.outsideClick.target, m.internalOptions.tabbableOptions))), w = m.internalOptions.preventScroll, E = w !== void 0 && w;
1531
- u && p.focus({ preventScroll: E }), m.originalOptions.onPostDeactivate && m.originalOptions.onPostDeactivate.call(null), m.outsideClick = null;
1531
+ var h = this, f = function() {
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;
1532
1534
  };
1533
- this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(h, h) : h();
1535
+ this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(f, f) : f();
1534
1536
  } }, { key: "setupFocusTrap", value: function() {
1535
1537
  this.focusTrap ? this.props.active && !this.focusTrap.active && (this.focusTrap.activate(), this.props.paused && this.focusTrap.pause()) : this.focusTrapElements.some(Boolean) && (this.focusTrap = this.props._createFocusTrap(this.focusTrapElements, this.internalOptions), this.props.active && this.focusTrap.activate(), this.props.paused && this.focusTrap.pause());
1536
1538
  } }, { key: "componentDidMount", value: function() {
1537
1539
  this.props.active && this.setupFocusTrap();
1538
- } }, { key: "componentDidUpdate", value: function(m) {
1540
+ } }, { key: "componentDidUpdate", value: function(h) {
1539
1541
  if (this.focusTrap) {
1540
- m.containerElements !== this.props.containerElements && this.focusTrap.updateContainerElements(this.props.containerElements);
1541
- var h = !m.active && this.props.active, p = m.active && !this.props.active, u = !m.paused && this.props.paused, w = m.paused && !this.props.paused;
1542
- if (h && (this.updatePreviousElement(), this.focusTrap.activate()), p) return void this.deactivateTrap();
1542
+ h.containerElements !== this.props.containerElements && this.focusTrap.updateContainerElements(this.props.containerElements);
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();
1543
1545
  u && this.focusTrap.pause(), w && this.focusTrap.unpause();
1544
- } else m.containerElements !== this.props.containerElements && (this.focusTrapElements = this.props.containerElements), this.props.active && (this.updatePreviousElement(), this.setupFocusTrap());
1546
+ } else h.containerElements !== this.props.containerElements && (this.focusTrapElements = this.props.containerElements), this.props.active && (this.updatePreviousElement(), this.setupFocusTrap());
1545
1547
  } }, { key: "componentWillUnmount", value: function() {
1546
1548
  this.deactivateTrap();
1547
1549
  } }, { key: "render", value: function() {
1548
- var m = this, h = this.props.children ? l.Children.only(this.props.children) : void 0;
1549
- if (h) {
1550
- if (h.type && h.type === l.Fragment) throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");
1551
- return l.cloneElement(h, { ref: function(p) {
1552
- var u = m.props.containerElements;
1553
- h && (typeof h.ref == "function" ? h.ref(p) : h.ref && (h.ref.current = p)), m.focusTrapElements = u || [p];
1550
+ var h = this, f = this.props.children ? l.Children.only(this.props.children) : void 0;
1551
+ if (f) {
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(y) {
1554
+ var u = h.props.containerElements;
1555
+ f && (typeof f.ref == "function" ? f.ref(y) : f.ref && (f.ref.current = y)), h.focusTrapElements = u || [y];
1554
1556
  } });
1555
1557
  }
1556
1558
  return null;
1557
1559
  } }]);
1558
- })(l.Component), y = typeof Element > "u" ? Function : Element;
1559
- 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(y), i.string, i.bool, i.func]), fallbackFocus: i.oneOfType([i.instanceOf(y), 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(y), 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(y)), children: i.oneOfType([i.element, i.instanceOf(y)]) }, x.defaultProps = { active: !0, paused: !1, focusTrapOptions: {}, _createFocusTrap: c }, qn = x;
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;
1560
1562
  })();
1561
1563
  const ca = Ar(la);
1562
1564
  var Jn, yt = { exports: {} }, Zn = {}, Pt = { exports: {} }, er, ye = {}, Ue = {};
@@ -1576,10 +1578,10 @@ function Ht() {
1576
1578
  var tr, nr, Ye = {};
1577
1579
  function bn() {
1578
1580
  if (nr) return ye;
1579
- nr = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.addClassName = o, ye.addEvent = function(i, c, f, x) {
1581
+ nr = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.addClassName = o, ye.addEvent = function(i, c, p, x) {
1580
1582
  if (!i) return;
1581
- const y = { capture: !0, ...x };
1582
- i.addEventListener ? i.addEventListener(c, f, y) : i.attachEvent ? i.attachEvent("on" + c, f) : i["on" + c] = f;
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;
1583
1585
  }, ye.addUserSelectStyles = function(i) {
1584
1586
  if (!i) return;
1585
1587
  let c = i.getElementById("react-draggable-style-el");
@@ -1587,82 +1589,82 @@ function bn() {
1587
1589
  `, c.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
1588
1590
  `, i.getElementsByTagName("head")[0].appendChild(c)), i.body && o(i.body, "react-draggable-transparent-selection");
1589
1591
  }, ye.createCSSTransform = function(i, c) {
1590
- const f = s(i, c, "px");
1591
- return { [(0, r.browserPrefixToKey)("transform", r.default)]: f };
1592
+ const p = s(i, c, "px");
1593
+ return { [(0, r.browserPrefixToKey)("transform", r.default)]: p };
1592
1594
  }, ye.createSVGTransform = function(i, c) {
1593
1595
  return s(i, c, "");
1594
1596
  }, ye.getTouch = function(i, c) {
1595
- return i.targetTouches && (0, e.findInArray)(i.targetTouches, (f) => c === f.identifier) || i.changedTouches && (0, e.findInArray)(i.changedTouches, (f) => c === f.identifier);
1597
+ return i.targetTouches && (0, e.findInArray)(i.targetTouches, (p) => c === p.identifier) || i.changedTouches && (0, e.findInArray)(i.changedTouches, (p) => c === p.identifier);
1596
1598
  }, ye.getTouchIdentifier = function(i) {
1597
1599
  if (i.targetTouches && i.targetTouches[0]) return i.targetTouches[0].identifier;
1598
1600
  if (i.changedTouches && i.changedTouches[0]) return i.changedTouches[0].identifier;
1599
1601
  }, ye.getTranslation = s, ye.innerHeight = function(i) {
1600
1602
  let c = i.clientHeight;
1601
- const f = i.ownerDocument.defaultView.getComputedStyle(i);
1602
- return c -= (0, e.int)(f.paddingTop), c -= (0, e.int)(f.paddingBottom), c;
1603
+ const p = i.ownerDocument.defaultView.getComputedStyle(i);
1604
+ return c -= (0, e.int)(p.paddingTop), c -= (0, e.int)(p.paddingBottom), c;
1603
1605
  }, ye.innerWidth = function(i) {
1604
1606
  let c = i.clientWidth;
1605
- const f = i.ownerDocument.defaultView.getComputedStyle(i);
1606
- return c -= (0, e.int)(f.paddingLeft), c -= (0, e.int)(f.paddingRight), c;
1607
- }, ye.matchesSelector = t, ye.matchesSelectorAndParentsTo = function(i, c, f) {
1607
+ const p = i.ownerDocument.defaultView.getComputedStyle(i);
1608
+ return c -= (0, e.int)(p.paddingLeft), c -= (0, e.int)(p.paddingRight), c;
1609
+ }, ye.matchesSelector = t, ye.matchesSelectorAndParentsTo = function(i, c, p) {
1608
1610
  let x = i;
1609
1611
  do {
1610
1612
  if (t(x, c)) return !0;
1611
- if (x === f) return !1;
1613
+ if (x === p) return !1;
1612
1614
  x = x.parentNode;
1613
1615
  } while (x);
1614
1616
  return !1;
1615
- }, ye.offsetXYFromParent = function(i, c, f) {
1616
- const x = c === c.ownerDocument.body ? { left: 0, top: 0 } : c.getBoundingClientRect(), y = (i.clientX + c.scrollLeft - x.left) / f, b = (i.clientY + c.scrollTop - x.top) / f;
1617
- return { x: y, y: b };
1617
+ }, ye.offsetXYFromParent = function(i, c, p) {
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 };
1618
1620
  }, ye.outerHeight = function(i) {
1619
1621
  let c = i.clientHeight;
1620
- const f = i.ownerDocument.defaultView.getComputedStyle(i);
1621
- return c += (0, e.int)(f.borderTopWidth), c += (0, e.int)(f.borderBottomWidth), c;
1622
+ const p = i.ownerDocument.defaultView.getComputedStyle(i);
1623
+ return c += (0, e.int)(p.borderTopWidth), c += (0, e.int)(p.borderBottomWidth), c;
1622
1624
  }, ye.outerWidth = function(i) {
1623
1625
  let c = i.clientWidth;
1624
- const f = i.ownerDocument.defaultView.getComputedStyle(i);
1625
- return c += (0, e.int)(f.borderLeftWidth), c += (0, e.int)(f.borderRightWidth), c;
1626
- }, ye.removeClassName = l, ye.removeEvent = function(i, c, f, x) {
1626
+ const p = i.ownerDocument.defaultView.getComputedStyle(i);
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, x) {
1627
1629
  if (!i) return;
1628
- const y = { capture: !0, ...x };
1629
- i.removeEventListener ? i.removeEventListener(c, f, y) : i.detachEvent ? i.detachEvent("on" + c, f) : i["on" + c] = null;
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;
1630
1632
  }, ye.scheduleRemoveUserSelectStyles = function(i) {
1631
1633
  window.requestAnimationFrame ? window.requestAnimationFrame(() => {
1632
1634
  a(i);
1633
1635
  }) : a(i);
1634
1636
  };
1635
1637
  var e = Ht(), r = (function(i, c) {
1636
- if (typeof WeakMap == "function") var f = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap();
1637
- return (function(y, b) {
1638
- if (!b && y && y.__esModule) return y;
1639
- var v, m, h = { __proto__: null, default: y };
1640
- if (y === null || typeof y != "object" && typeof y != "function") return h;
1641
- if (v = b ? x : f) {
1642
- if (v.has(y)) return v.get(y);
1643
- v.set(y, h);
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);
1644
1646
  }
1645
- for (const p in y) p !== "default" && {}.hasOwnProperty.call(y, p) && ((m = (v = Object.defineProperty) && Object.getOwnPropertyDescriptor(y, p)) && (m.get || m.set) ? v(h, p, m) : h[p] = y[p]);
1646
- return h;
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
+ return f;
1647
1649
  })(i, c);
1648
1650
  })((function() {
1649
1651
  if (tr) return Ye;
1650
- tr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.browserPrefixToKey = f, Ye.browserPrefixToStyle = function(x, y) {
1651
- return y ? `-${y.toLowerCase()}-${x}` : x;
1652
+ tr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.browserPrefixToKey = p, Ye.browserPrefixToStyle = function(x, m) {
1653
+ return m ? `-${m.toLowerCase()}-${x}` : x;
1652
1654
  }, Ye.default = void 0, Ye.getPrefix = c;
1653
1655
  const i = ["Moz", "Webkit", "O", "ms"];
1654
1656
  function c() {
1655
1657
  let x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
1656
1658
  if (typeof window > "u") return "";
1657
- const y = window.document?.documentElement?.style;
1658
- if (!y || x in y) return "";
1659
- for (let b = 0; b < i.length; b++) if (f(x, i[b]) in y) return i[b];
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];
1660
1662
  return "";
1661
1663
  }
1662
- function f(x, y) {
1663
- return y ? `${y}${(function(b) {
1664
- let v = "", m = !0;
1665
- for (let h = 0; h < b.length; h++) m ? (v += b[h].toUpperCase(), m = !1) : b[h] === "-" ? m = !0 : v += b[h];
1664
+ function p(x, m) {
1665
+ return m ? `${m}${(function(b) {
1666
+ let v = "", h = !0;
1667
+ for (let f = 0; f < b.length; f++) h ? (v += b[f].toUpperCase(), h = !1) : b[f] === "-" ? h = !0 : v += b[f];
1666
1668
  return v;
1667
1669
  })(x)}` : x;
1668
1670
  }
@@ -1670,13 +1672,13 @@ function bn() {
1670
1672
  })());
1671
1673
  let n = "";
1672
1674
  function t(i, c) {
1673
- return n || (n = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(f) {
1674
- return (0, e.isFunction)(i[f]);
1675
+ return n || (n = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(p) {
1676
+ return (0, e.isFunction)(i[p]);
1675
1677
  })), !!(0, e.isFunction)(i[n]) && i[n](c);
1676
1678
  }
1677
- function s(i, c, f) {
1678
- let { x, y } = i, b = `translate(${x}${f},${y}${f})`;
1679
- return c && (b = `translate(${`${typeof c.x == "string" ? c.x : c.x + f}`}, ${`${typeof c.y == "string" ? c.y : c.y + f}`})` + b), b;
1679
+ function s(i, c, p) {
1680
+ let { x, y: m } = i, b = `translate(${x}${p},${m}${p})`;
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;
1680
1682
  }
1681
1683
  function a(i) {
1682
1684
  if (i) try {
@@ -1718,10 +1720,10 @@ function fo() {
1718
1720
  const l = n(t);
1719
1721
  if (typeof o == "string") {
1720
1722
  const { ownerDocument: i } = l, c = i.defaultView;
1721
- let f;
1722
- if (o === "parent" ? f = l.parentNode : f = l.getRootNode().querySelector(o), !(f instanceof c.HTMLElement)) throw new Error('Bounds selector "' + o + '" could not find an element.');
1723
- const x = f, y = c.getComputedStyle(l), b = c.getComputedStyle(x);
1724
- o = { left: -l.offsetLeft + (0, e.int)(b.paddingLeft) + (0, e.int)(y.marginLeft), top: -l.offsetTop + (0, e.int)(b.paddingTop) + (0, e.int)(y.marginTop), right: (0, r.innerWidth)(x) - (0, r.outerWidth)(l) - l.offsetLeft + (0, e.int)(b.paddingRight) - (0, e.int)(y.marginRight), bottom: (0, r.innerHeight)(x) - (0, r.outerHeight)(l) - l.offsetTop + (0, e.int)(b.paddingBottom) - (0, e.int)(y.marginBottom) };
1723
+ let p;
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 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) };
1725
1727
  }
1726
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];
1727
1729
  }, je.getControlPosition = function(t, s, a) {
@@ -1750,25 +1752,25 @@ function ua() {
1750
1752
  if (ir) return bt;
1751
1753
  ir = 1, Object.defineProperty(bt, "__esModule", { value: !0 }), bt.default = void 0;
1752
1754
  var e = (function(b, v) {
1753
- if (typeof WeakMap == "function") var m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
1754
- return (function(p, u) {
1755
- if (!u && p && p.__esModule) return p;
1756
- var w, E, T = { __proto__: null, default: p };
1757
- if (p === null || typeof p != "object" && typeof p != "function") return T;
1758
- if (w = u ? h : m) {
1759
- if (w.has(p)) return w.get(p);
1760
- w.set(p, T);
1755
+ if (typeof WeakMap == "function") var h = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap();
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);
1761
1763
  }
1762
- for (const L in p) L !== "default" && {}.hasOwnProperty.call(p, L) && ((E = (w = Object.defineProperty) && Object.getOwnPropertyDescriptor(p, L)) && (E.get || E.set) ? w(T, L, E) : T[L] = p[L]);
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]);
1763
1765
  return T;
1764
1766
  })(b, v);
1765
1767
  })(q), r = l(yn()), n = l(Rr), t = bn(), s = fo(), a = Ht(), o = l(ho());
1766
1768
  function l(b) {
1767
1769
  return b && b.__esModule ? b : { default: b };
1768
1770
  }
1769
- function i(b, v, m) {
1770
- return (v = (function(h) {
1771
- var p = (function(u, w) {
1771
+ function i(b, v, h) {
1772
+ return (v = (function(f) {
1773
+ var y = (function(u, w) {
1772
1774
  if (typeof u != "object" || !u) return u;
1773
1775
  var E = u[Symbol.toPrimitive];
1774
1776
  if (E !== void 0) {
@@ -1777,37 +1779,37 @@ function ua() {
1777
1779
  throw new TypeError("@@toPrimitive must return a primitive value.");
1778
1780
  }
1779
1781
  return (w === "string" ? String : Number)(u);
1780
- })(h, "string");
1781
- return typeof p == "symbol" ? p : p + "";
1782
- })(v)) in b ? Object.defineProperty(b, v, { value: m, enumerable: !0, configurable: !0, writable: !0 }) : b[v] = m, b;
1782
+ })(f, "string");
1783
+ return typeof y == "symbol" ? y : y + "";
1784
+ })(v)) in b ? Object.defineProperty(b, v, { value: h, enumerable: !0, configurable: !0, writable: !0 }) : b[v] = h, b;
1783
1785
  }
1784
- const c = { start: "touchstart", move: "touchmove", stop: "touchend" }, f = { start: "mousedown", move: "mousemove", stop: "mouseup" };
1785
- let x = f, y = class extends e.Component {
1786
+ const c = { start: "touchstart", move: "touchmove", stop: "touchend" }, p = { start: "mousedown", move: "mousemove", stop: "mouseup" };
1787
+ let x = p, m = class extends e.Component {
1786
1788
  constructor() {
1787
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) => {
1788
1790
  if (this.props.onMouseDown(b), !this.props.allowAnyClick && typeof b.button == "number" && b.button !== 0) return !1;
1789
1791
  const v = this.findDOMNode();
1790
1792
  if (!v || !v.ownerDocument || !v.ownerDocument.body) throw new Error("<DraggableCore> not mounted on DragStart!");
1791
- const { ownerDocument: m } = v;
1792
- if (this.props.disabled || !(b.target instanceof m.defaultView.Node) || this.props.handle && !(0, t.matchesSelectorAndParentsTo)(b.target, this.props.handle, v) || this.props.cancel && (0, t.matchesSelectorAndParentsTo)(b.target, this.props.cancel, v)) return;
1793
+ const { ownerDocument: h } = v;
1794
+ if (this.props.disabled || !(b.target instanceof h.defaultView.Node) || this.props.handle && !(0, t.matchesSelectorAndParentsTo)(b.target, this.props.handle, v) || this.props.cancel && (0, t.matchesSelectorAndParentsTo)(b.target, this.props.cancel, v)) return;
1793
1795
  b.type !== "touchstart" || this.props.allowMobileScroll || b.preventDefault();
1794
- const h = (0, t.getTouchIdentifier)(b);
1795
- this.touchIdentifier = h;
1796
- const p = (0, s.getControlPosition)(b, h, this);
1797
- if (p == null) return;
1798
- const { x: u, y: w } = p, E = (0, s.createCoreData)(this, u, w);
1799
- (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)(m), this.dragging = !0, this.lastX = u, this.lastY = w, (0, t.addEvent)(m, x.move, this.handleDrag), (0, t.addEvent)(m, x.stop, this.handleDragStop));
1796
+ const f = (0, t.getTouchIdentifier)(b);
1797
+ this.touchIdentifier = f;
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));
1800
1802
  }), i(this, "handleDrag", (b) => {
1801
1803
  const v = (0, s.getControlPosition)(b, this.touchIdentifier, this);
1802
1804
  if (v == null) return;
1803
- let { x: m, y: h } = v;
1805
+ let { x: h, y: f } = v;
1804
1806
  if (Array.isArray(this.props.grid)) {
1805
- let u = m - this.lastX, w = h - this.lastY;
1807
+ let u = h - this.lastX, w = f - this.lastY;
1806
1808
  if ([u, w] = (0, s.snapToGrid)(this.props.grid, u, w), !u && !w) return;
1807
- m = this.lastX + u, h = this.lastY + w;
1809
+ h = this.lastX + u, f = this.lastY + w;
1808
1810
  }
1809
- const p = (0, s.createCoreData)(this, m, h);
1810
- if ((0, o.default)("DraggableCore: handleDrag: %j", p), this.props.onDrag(b, p) !== !1 && this.mounted !== !1) this.lastX = m, this.lastY = h;
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;
1811
1813
  else try {
1812
1814
  this.handleDragStop(new MouseEvent("mouseup"));
1813
1815
  } catch {
@@ -1818,16 +1820,16 @@ function ua() {
1818
1820
  if (!this.dragging) return;
1819
1821
  const v = (0, s.getControlPosition)(b, this.touchIdentifier, this);
1820
1822
  if (v == null) return;
1821
- let { x: m, y: h } = v;
1823
+ let { x: h, y: f } = v;
1822
1824
  if (Array.isArray(this.props.grid)) {
1823
- let w = m - this.lastX || 0, E = h - this.lastY || 0;
1824
- [w, E] = (0, s.snapToGrid)(this.props.grid, w, E), m = this.lastX + w, h = this.lastY + E;
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;
1825
1827
  }
1826
- const p = (0, s.createCoreData)(this, m, h);
1827
- if (this.props.onStop(b, p) === !1 || this.mounted === !1) return !1;
1828
+ const y = (0, s.createCoreData)(this, h, f);
1829
+ if (this.props.onStop(b, y) === !1 || this.mounted === !1) return !1;
1828
1830
  const u = this.findDOMNode();
1829
- u && this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(u.ownerDocument), (0, o.default)("DraggableCore: handleDragStop: %j", p), 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));
1830
- }), i(this, "onMouseDown", (b) => (x = f, this.handleDragStart(b))), i(this, "onMouseUp", (b) => (x = f, this.handleDragStop(b))), i(this, "onTouchStart", (b) => (x = c, this.handleDragStart(b))), i(this, "onTouchEnd", (b) => (x = c, this.handleDragStop(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)));
1831
1833
  }
1832
1834
  componentDidMount() {
1833
1835
  this.mounted = !0;
@@ -1839,7 +1841,7 @@ function ua() {
1839
1841
  const b = this.findDOMNode();
1840
1842
  if (b) {
1841
1843
  const { ownerDocument: v } = b;
1842
- (0, t.removeEvent)(v, f.move, this.handleDrag), (0, t.removeEvent)(v, c.move, this.handleDrag), (0, t.removeEvent)(v, f.stop, this.handleDragStop), (0, t.removeEvent)(v, c.stop, this.handleDragStop), (0, t.removeEvent)(b, c.start, this.onTouchStart, { passive: !1 }), this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(v);
1844
+ (0, t.removeEvent)(v, p.move, this.handleDrag), (0, t.removeEvent)(v, c.move, this.handleDrag), (0, t.removeEvent)(v, p.stop, this.handleDragStop), (0, t.removeEvent)(v, c.stop, this.handleDragStop), (0, t.removeEvent)(b, c.start, this.onTouchStart, { passive: !1 }), this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(v);
1843
1845
  }
1844
1846
  }
1845
1847
  findDOMNode() {
@@ -1849,9 +1851,9 @@ function ua() {
1849
1851
  return e.cloneElement(e.Children.only(this.props.children), { onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp, onTouchEnd: this.onTouchEnd });
1850
1852
  }
1851
1853
  };
1852
- return bt.default = y, i(y, "displayName", "DraggableCore"), i(y, "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) {
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) {
1853
1855
  if (b[v] && b[v].nodeType !== 1) throw new Error("Draggable's offsetParent must be a DOM Node.");
1854
- }, 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(y, "defaultProps", { allowAnyClick: !1, allowMobileScroll: !1, disabled: !1, enableUserSelectHack: !0, onStart: function() {
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() {
1855
1857
  }, onDrag: function() {
1856
1858
  }, onStop: function() {
1857
1859
  }, onMouseDown: function() {
@@ -1862,50 +1864,50 @@ function da() {
1862
1864
  Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "DraggableCore", { enumerable: !0, get: function() {
1863
1865
  return i.default;
1864
1866
  } }), e.default = void 0;
1865
- var r = (function(v, m) {
1866
- if (typeof WeakMap == "function") var h = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap();
1867
+ var r = (function(v, h) {
1868
+ if (typeof WeakMap == "function") var f = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap();
1867
1869
  return (function(u, w) {
1868
1870
  if (!w && u && u.__esModule) return u;
1869
1871
  var E, T, L = { __proto__: null, default: u };
1870
1872
  if (u === null || typeof u != "object" && typeof u != "function") return L;
1871
- if (E = w ? p : h) {
1873
+ if (E = w ? y : f) {
1872
1874
  if (E.has(u)) return E.get(u);
1873
1875
  E.set(u, L);
1874
1876
  }
1875
1877
  for (const O in u) O !== "default" && {}.hasOwnProperty.call(u, O) && ((T = (E = Object.defineProperty) && Object.getOwnPropertyDescriptor(u, O)) && (T.get || T.set) ? E(L, O, T) : L[O] = u[O]);
1876
1878
  return L;
1877
- })(v, m);
1878
- })(q), n = f(yn()), t = f(Rr), s = (function() {
1879
+ })(v, h);
1880
+ })(q), n = p(yn()), t = p(Rr), s = (function() {
1879
1881
  if (Jn) return Pt.exports;
1880
- function v(h) {
1881
- var p, u, w = "";
1882
- if (typeof h == "string" || typeof h == "number") w += h;
1883
- else if (typeof h == "object") if (Array.isArray(h)) {
1884
- var E = h.length;
1885
- for (p = 0; p < E; p++) h[p] && (u = v(h[p])) && (w && (w += " "), w += u);
1886
- } else for (u in h) h[u] && (w && (w += " "), w += u);
1882
+ function v(f) {
1883
+ var y, u, w = "";
1884
+ if (typeof f == "string" || typeof f == "number") w += f;
1885
+ else if (typeof f == "object") if (Array.isArray(f)) {
1886
+ var E = f.length;
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);
1887
1889
  return w;
1888
1890
  }
1889
- function m() {
1890
- for (var h, p, u = 0, w = "", E = arguments.length; u < E; u++) (h = arguments[u]) && (p = v(h)) && (w && (w += " "), w += p);
1891
+ function h() {
1892
+ for (var f, y, u = 0, w = "", E = arguments.length; u < E; u++) (f = arguments[u]) && (y = v(f)) && (w && (w += " "), w += y);
1891
1893
  return w;
1892
1894
  }
1893
- return Jn = 1, Pt.exports = m, Pt.exports.clsx = m, Pt.exports;
1894
- })(), a = bn(), o = fo(), l = Ht(), i = f(ua()), c = f(ho());
1895
- function f(v) {
1895
+ return Jn = 1, Pt.exports = h, Pt.exports.clsx = h, Pt.exports;
1896
+ })(), a = bn(), o = fo(), l = Ht(), i = p(ua()), c = p(ho());
1897
+ function p(v) {
1896
1898
  return v && v.__esModule ? v : { default: v };
1897
1899
  }
1898
1900
  function x() {
1899
1901
  return x = Object.assign ? Object.assign.bind() : function(v) {
1900
- for (var m = 1; m < arguments.length; m++) {
1901
- var h = arguments[m];
1902
- for (var p in h) ({}).hasOwnProperty.call(h, p) && (v[p] = h[p]);
1902
+ for (var h = 1; h < arguments.length; h++) {
1903
+ var f = arguments[h];
1904
+ for (var y in f) ({}).hasOwnProperty.call(f, y) && (v[y] = f[y]);
1903
1905
  }
1904
1906
  return v;
1905
1907
  }, x.apply(null, arguments);
1906
1908
  }
1907
- function y(v, m, h) {
1908
- return (m = (function(p) {
1909
+ function m(v, h, f) {
1910
+ return (h = (function(y) {
1909
1911
  var u = (function(w, E) {
1910
1912
  if (typeof w != "object" || !w) return w;
1911
1913
  var T = w[Symbol.toPrimitive];
@@ -1915,41 +1917,41 @@ function da() {
1915
1917
  throw new TypeError("@@toPrimitive must return a primitive value.");
1916
1918
  }
1917
1919
  return (E === "string" ? String : Number)(w);
1918
- })(p, "string");
1920
+ })(y, "string");
1919
1921
  return typeof u == "symbol" ? u : u + "";
1920
- })(m)) in v ? Object.defineProperty(v, m, { value: h, enumerable: !0, configurable: !0, writable: !0 }) : v[m] = h, v;
1922
+ })(h)) in v ? Object.defineProperty(v, h, { value: f, enumerable: !0, configurable: !0, writable: !0 }) : v[h] = f, v;
1921
1923
  }
1922
1924
  class b extends r.Component {
1923
- static getDerivedStateFromProps(m, h) {
1924
- let { position: p } = m, { prevPropsPosition: u } = h;
1925
- return !p || u && p.x === u.x && p.y === u.y ? null : ((0, c.default)("Draggable: getDerivedStateFromProps %j", { position: p, prevPropsPosition: u }), { x: p.x, y: p.y, prevPropsPosition: { ...p } });
1925
+ static getDerivedStateFromProps(h, f) {
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 } });
1926
1928
  }
1927
- constructor(m) {
1928
- super(m), y(this, "onDragStart", (h, p) => {
1929
- if ((0, c.default)("Draggable: onDragStart: %j", p), this.props.onStart(h, (0, o.createDraggableData)(this, p)) === !1) return !1;
1929
+ constructor(h) {
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;
1930
1932
  this.setState({ dragging: !0, dragged: !0 });
1931
- }), y(this, "onDrag", (h, p) => {
1933
+ }), m(this, "onDrag", (f, y) => {
1932
1934
  if (!this.state.dragging) return !1;
1933
- (0, c.default)("Draggable: onDrag: %j", p);
1934
- const u = (0, o.createDraggableData)(this, p), w = { x: u.x, y: u.y, slackX: 0, slackY: 0 };
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 };
1935
1937
  if (this.props.bounds) {
1936
1938
  const { x: E, y: T } = w;
1937
1939
  w.x += this.state.slackX, w.y += this.state.slackY;
1938
1940
  const [L, O] = (0, o.getBoundPosition)(this, w.x, w.y);
1939
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;
1940
1942
  }
1941
- if (this.props.onDrag(h, u) === !1) return !1;
1943
+ if (this.props.onDrag(f, u) === !1) return !1;
1942
1944
  this.setState(w);
1943
- }), y(this, "onDragStop", (h, p) => {
1944
- if (!this.state.dragging || this.props.onStop(h, (0, o.createDraggableData)(this, p)) === !1) return !1;
1945
- (0, c.default)("Draggable: onDragStop: %j", p);
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);
1946
1948
  const u = { dragging: !1, slackX: 0, slackY: 0 };
1947
1949
  if (this.props.position) {
1948
1950
  const { x: w, y: E } = this.props.position;
1949
1951
  u.x = w, u.y = E;
1950
1952
  }
1951
1953
  this.setState(u);
1952
- }), this.state = { dragging: !1, dragged: !1, x: m.position ? m.position.x : m.defaultPosition.x, y: m.position ? m.position.y : m.defaultPosition.y, prevPropsPosition: { ...m.position }, slackX: 0, slackY: 0, isElementSVG: !1 }, !m.position || m.onDrag || m.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.");
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.");
1953
1955
  }
1954
1956
  componentDidMount() {
1955
1957
  window.SVGElement !== void 0 && this.findDOMNode() instanceof window.SVGElement && this.setState({ isElementSVG: !0 });
@@ -1961,15 +1963,15 @@ function da() {
1961
1963
  return this.props?.nodeRef?.current ?? t.default.findDOMNode(this);
1962
1964
  }
1963
1965
  render() {
1964
- const { axis: m, bounds: h, children: p, defaultPosition: u, defaultClassName: w, defaultClassNameDragging: E, defaultClassNameDragged: T, position: L, positionOffset: O, scale: R, ...S } = this.props;
1965
- let D = {}, P = null;
1966
- const M = !L || this.state.dragging, I = L || u, A = { x: (0, o.canDragX)(this) && M ? this.state.x : I.x, y: (0, o.canDragY)(this) && M ? this.state.y : I.y };
1967
- this.state.isElementSVG ? P = (0, a.createSVGTransform)(A, O) : D = (0, a.createCSSTransform)(A, O);
1968
- const V = (0, s.clsx)(p.props.className || "", w, { [E]: this.state.dragging, [T]: this.state.dragged });
1969
- return r.createElement(i.default, x({}, S, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), r.cloneElement(r.Children.only(p), { className: V, style: { ...p.props.style, ...D }, transform: P }));
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
+ let S = {}, _ = null;
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
+ this.state.isElementSVG ? _ = (0, a.createSVGTransform)(A, O) : S = (0, a.createCSSTransform)(A, O);
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: _ }));
1970
1972
  }
1971
1973
  }
1972
- e.default = b, y(b, "displayName", "Draggable"), y(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 }), y(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 });
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 });
1973
1975
  })(Zn)), Zn;
1974
1976
  }
1975
1977
  var pa = (function() {
@@ -1978,39 +1980,39 @@ var pa = (function() {
1978
1980
  const { default: e, DraggableCore: r } = da();
1979
1981
  return yt.exports = e, yt.exports.default = e, yt.exports.DraggableCore = r, yt.exports;
1980
1982
  })();
1981
- const fa = Ar(pa), lr = { x: 0, y: 0 }, ha = oe(de((e, r) => {
1982
- const { defaultPosition: n = lr, PaperComponent: t = Et, onDragStop: s, rootSel: a = ".MuiModal-root", handleSel: o = ".draggable-title", titleSize: l, rootSize: i, ...c } = e, f = ge(null), x = Z(() => l && i ? { left: 0, top: 0, right: i.width - l.width, bottom: i.height - l.height } : null, [l, i]), [y, b] = ne(null), [v, m] = ne(null), [h, p] = ne(null);
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), 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);
1983
1985
  return Cr(() => {
1984
- !y && n && b(n ?? lr);
1985
- }, [n]), Se(() => {
1986
- x && y && m({ x: Math.max(0, Math.min(y.x, x.right)), y: Math.max(0, Math.min(y.y, x.bottom)) });
1987
- }, [y, x]), k(fa, { nodeRef: f, handle: o, cancel: '[class*="MuiDialogContent-root"]', position: v, bounds: x ?? ".MuiModal-root", onStop: s, onStart: (u, w) => {
1986
+ !m && n && b(n ?? lr);
1987
+ }, [n]), De(() => {
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) => {
1988
1990
  const E = u;
1989
- p({ x: (E.clientX ?? E.touches?.[0]?.clientX) - w.x, y: (E.clientY ?? E.touches?.[0]?.clientY) - w.y });
1991
+ y({ x: (E.clientX ?? E.touches?.[0]?.clientX) - w.x, y: (E.clientY ?? E.touches?.[0]?.clientY) - w.y });
1990
1992
  }, onDrag: (u, w) => {
1991
1993
  const E = u, T = E.clientX ?? E.touches?.[0]?.clientX, L = E.clientY ?? E.touches?.[0]?.clientY;
1992
- b({ x: T - h.x, y: L - h.y });
1993
- }, children: k(t, { ref: At([f, r]), ...c }) });
1994
- })), ma = { x: "50", y: "50" }, ga = oe(de((e, r) => {
1995
- 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: f, onHide: x, onClose: y, open: b, autoFocusSel: v, children: m, transitionDuration: h = s, TransitionProps: p, slots: u = Te.EmptyArray, slotProps: w = Te.EmptyArray, sx: E, className: T, onMouseDown: L, initialPosition: O = ma, isModal: R = !1, ...S } = n;
1996
- let D = u.transition ?? Wo;
1997
- const P = u.backdrop ?? Ho, M = u.paper ?? Et;
1998
- let I = w.transition;
1999
- p && (I = { ...p, ...I });
2000
- const A = w.backdrop, V = w.paper, B = ge(null), [z, ie] = ne(null), [G, Q] = ne(!1), [re, se] = ne(!1), ee = ge(null), [le, ce] = En(), d = ge(null), [g, C] = En(), F = ge(null);
2001
- Se(() => {
1994
+ b({ x: T - f.x, y: L - f.y });
1995
+ }, children: k(t, { ref: At([p, r]), ...c }) });
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: 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
+ let S = u.transition ?? Wo;
1999
+ const _ = u.backdrop ?? Ho, M = u.paper ?? Et;
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
+ De(() => {
2002
2004
  z && Q(b);
2003
2005
  }, [b, z]);
2004
- const _ = ae(() => {
2006
+ const I = ae(() => {
2005
2007
  l?.(), Q(!1);
2006
2008
  }, [l]);
2007
- Se(() => {
2009
+ De(() => {
2008
2010
  if (ce.width === 0 && ce.height === 0 || z) return;
2009
- const $ = F.current?.getBoundingClientRect(), ke = ce.height - $.height, ft = ce.width - $.width;
2011
+ const $ = N.current?.getBoundingClientRect(), ke = ce.height - $.height, ft = ce.width - $.width;
2010
2012
  let He = 0.5 * ft, Yt = 0.5 * ke;
2011
- 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)), ie({ x: He, y: Yt });
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 });
2012
2014
  }, [ce, C]);
2013
- const [N, j] = ne(!1), [H, U] = ne(null), [K, te] = ne(null), ue = ae(($) => {
2015
+ const [R, j] = re(!1), [H, U] = re(null), [K, ne] = re(null), ue = ae(($) => {
2014
2016
  if (H) return H.focus($), !0;
2015
2017
  if (v) {
2016
2018
  const ke = d.current?.querySelectorAll?.(v);
@@ -2019,42 +2021,42 @@ const fa = Ar(pa), lr = { x: 0, y: 0 }, ha = oe(de((e, r) => {
2019
2021
  return d.current?.focus?.($), !1;
2020
2022
  }, [H, v]), he = Tr(r, () => ({ focus: ($) => {
2021
2023
  ue($);
2022
- } }), []), Le = { ...I, onExited: ($) => {
2023
- i?.(null), I?.onExited?.($);
2024
+ } }), []), Le = { ...F, onExited: ($) => {
2025
+ i?.(null), F?.onExited?.($);
2024
2026
  }, onExit: ($) => {
2025
2027
  const ke = K;
2026
2028
  ke && requestAnimationFrame(() => {
2027
2029
  he.current?.contains(document.activeElement) && ke.focus();
2028
- }), x?.(), se(!1), I?.onExit?.($);
2030
+ }), x?.(), se(!1), F?.onExit?.($);
2029
2031
  }, onEntered: ($, ke) => {
2030
- c?.(), I?.onEntered?.($, ke);
2032
+ c?.(), F?.onEntered?.($, ke);
2031
2033
  }, onEntering: ($, ke) => {
2032
- se(!0), f?.(he.current);
2034
+ se(!0), p?.(he.current);
2033
2035
  } };
2034
- Se(() => {
2035
- re && ue();
2036
- }, [re]);
2037
- let Ce = k(ca, { focusTrapOptions: { escapeDeactivates: !1, allowOutsideClick: !0, initialFocus: !1 }, ref: B, active: re, children: k(D, { in: G, timeout: h, role: "presentation", ...Le, children: k(X, { className: "MuiDialog-container", ref: d, tabIndex: 0, sx: { outline: "none", position: "relative" }, onKeyDown: ($) => {
2038
- $.which === Pe.Escape && (_(), ee.current?.start($, { center: !1 }), setTimeout(() => ee.current?.stop($), 180)), $.stopPropagation();
2039
- }, children: J(ha, { ref: At([F, r]), className: Oe({ "Mui-focusVisible": N }, 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, ...S, ...V, children: [a ? k(Uo, { className: Oe({ "Mui-selected": N }, "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: ee, onPointerDown: ($) => {
2040
- ee.current?.start($, { center: !1 }), $.stopPropagation(), $.preventDefault();
2041
- }, onPointerUp: _, children: k(be, { iconKey: "Close" }) }) })] }) }) : null, m] }) }) }) }), Y = null;
2042
- R && (Y = k(P, { ...A, open: G, onMouseDown: ($) => {
2043
- _(), A?.onMouseDown?.($);
2036
+ De(() => {
2037
+ oe && ue();
2038
+ }, [oe]);
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
+ $.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: 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
+ te.current?.start($, { center: !1 }), $.stopPropagation(), $.preventDefault();
2043
+ }, onPointerUp: I, children: k(be, { iconKey: "Close" }) }) })] }) }) : null, h] }) }) }) }), Y = null;
2044
+ P && (Y = k(_, { ...A, open: G, onMouseDown: ($) => {
2045
+ I(), A?.onMouseDown?.($);
2044
2046
  }, onClick: ($) => {
2045
- y?.($, "backdropClick"), A?.onClick?.($);
2047
+ m?.($, "backdropClick"), A?.onClick?.($);
2046
2048
  }, sx: { pointerEvents: "auto", ...A?.sx } }));
2047
2049
  const { getPortalContainer: pe } = ln();
2048
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: ($) => {
2049
- N && ($.target === d.current || $.target.tabIndex < 0) && d.current?.contains(document.activeElement);
2051
+ R && ($.target === d.current || $.target.tabIndex < 0) && d.current?.contains(document.activeElement);
2050
2052
  }, onContextMenu: ($) => {
2051
2053
  $.isPropagationStopped() || $.preventDefault();
2052
2054
  }, onFocus: ($) => {
2053
- !N && ($.target === d.current || $.target.tabIndex < 0) && setTimeout(() => {
2055
+ !R && ($.target === d.current || $.target.tabIndex < 0) && setTimeout(() => {
2054
2056
  ue();
2055
- }, 100), B.current?.focusTrap?.unpause(), j(!0), d.current?.contains($.target) && $.target !== d.current && U($.target), $.relatedTarget && !K && te($.relatedTarget);
2057
+ }, 100), B.current?.focusTrap?.unpause(), j(!0), d.current?.contains($.target) && $.target !== d.current && U($.target), $.relatedTarget && !K && ne($.relatedTarget);
2056
2058
  }, onBlur: ($) => {
2057
- he?.current?.contains($.relatedTarget) || (te(null), B.current?.focusTrap?.pause(), j(!1));
2059
+ he?.current?.contains($.relatedTarget) || (ne(null), B.current?.focusTrap?.pause(), j(!1));
2058
2060
  }, children: [Y, Ce] }), pe(), o + "");
2059
2061
  }));
2060
2062
  var Ve = typeof window < "u" ? window : { screen: {}, navigator: {} }, ut = (Ve.matchMedia || function() {
@@ -2064,10 +2066,10 @@ var Ve = typeof window < "u" ? window : { screen: {}, navigator: {} }, ut = (Ve.
2064
2066
  } }, cr = function() {
2065
2067
  };
2066
2068
  Ve.addEventListener && Ve.addEventListener("p", cr, ya), Ve.removeEventListener && Ve.removeEventListener("p", cr, !1);
2067
- var vn = "ontouchstart" in Ve, ba = vn || "TouchEvent" in Ve && ut("(any-pointer: coarse)").matches, ur = (Ve.navigator.maxTouchPoints || 0) > 0 || ba, mo = Ve.navigator.userAgent || "", va = ut("(pointer: coarse)").matches && /iPad|Macintosh/.test(mo) && Math.min(Ve.screen.width || 0, Ve.screen.height || 0) >= 768, go = (ut("(pointer: coarse)").matches || !ut("(pointer: fine)").matches && vn) && !/Windows.*Firefox/.test(mo), xa = ut("(any-pointer: fine)").matches || ut("(any-hover: hover)").matches || va || !vn, dr = !ur || !xa && go ? ur ? "touchOnly" : "mouseOnly" : "hybrid", wa = dr === "mouseOnly" ? "mouse" : dr === "touchOnly" || go ? "touch" : "mouse", St = (e) => e.type === "checkbox", tt = (e) => e instanceof Date, Re = (e) => e == null;
2069
+ var vn = "ontouchstart" in Ve, ba = vn || "TouchEvent" in Ve && ut("(any-pointer: coarse)").matches, ur = (Ve.navigator.maxTouchPoints || 0) > 0 || ba, mo = Ve.navigator.userAgent || "", va = ut("(pointer: coarse)").matches && /iPad|Macintosh/.test(mo) && Math.min(Ve.screen.width || 0, Ve.screen.height || 0) >= 768, go = (ut("(pointer: coarse)").matches || !ut("(pointer: fine)").matches && vn) && !/Windows.*Firefox/.test(mo), xa = ut("(any-pointer: fine)").matches || ut("(any-hover: hover)").matches || va || !vn, dr = !ur || !xa && go ? ur ? "touchOnly" : "mouseOnly" : "hybrid", wa = dr === "mouseOnly" ? "mouse" : dr === "touchOnly" || go ? "touch" : "mouse", Dt = (e) => e.type === "checkbox", tt = (e) => e instanceof Date, Re = (e) => e == null;
2068
2070
  const yo = (e) => typeof e == "object";
2069
2071
  var we = (e) => !Re(e) && !Array.isArray(e) && yo(e) && !tt(e), xn = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
2070
- function De(e) {
2072
+ function Se(e) {
2071
2073
  let r;
2072
2074
  const n = Array.isArray(e), t = typeof FileList < "u" && e instanceof FileList;
2073
2075
  if (e instanceof Date) r = new Date(e);
@@ -2076,7 +2078,7 @@ function De(e) {
2076
2078
  if (r = n ? [] : Object.create(Object.getPrototypeOf(e)), n || ((s) => {
2077
2079
  const a = s.constructor && s.constructor.prototype;
2078
2080
  return we(a) && a.hasOwnProperty("isPrototypeOf");
2079
- })(e)) for (const s in e) e.hasOwnProperty(s) && (r[s] = De(e[s]));
2081
+ })(e)) for (const s in e) e.hasOwnProperty(s) && (r[s] = Se(e[s]));
2080
2082
  else r = e;
2081
2083
  }
2082
2084
  return r;
@@ -2099,7 +2101,7 @@ var Ut = (e) => /^\w*$/.test(e), xe = (e) => e === void 0, on = (e) => Array.isA
2099
2101
  e[l] = i, e = e[l];
2100
2102
  }
2101
2103
  };
2102
- const ka = "blur", Sa = "focusout", Da = "onBlur", bo = "onChange", vo = "onSubmit", Oa = "onTouched", Ct = "all", Ca = "max", Ea = "min", Ma = "maxLength", Ta = "minLength", pr = "pattern", fr = "required", Pa = "validate", xo = q.createContext(null);
2104
+ const ka = "blur", Da = "focusout", Sa = "onBlur", bo = "onChange", vo = "onSubmit", Oa = "onTouched", Ct = "all", Ca = "max", Ea = "min", Ma = "maxLength", Ta = "minLength", pr = "pattern", fr = "required", Pa = "validate", xo = q.createContext(null);
2103
2105
  xo.displayName = "HookFormContext";
2104
2106
  const Ra = (e) => {
2105
2107
  const { children: r, ...n } = e;
@@ -2150,7 +2152,7 @@ var Ne = (e) => we(e) && !Object.keys(e).length, kn = (e) => e.type === "file",
2150
2152
  if (!xn) return !1;
2151
2153
  const r = e ? e.ownerDocument : 0;
2152
2154
  return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
2153
- }, ko = (e) => e.type === "select-multiple", Sn = (e) => e.type === "radio", Jt = (e) => Bt(e) && e.isConnected;
2155
+ }, ko = (e) => e.type === "select-multiple", Dn = (e) => e.type === "radio", Jt = (e) => Bt(e) && e.isConnected;
2154
2156
  function ve(e, r) {
2155
2157
  const n = Array.isArray(r) ? r : Ut(r) ? [r] : wn(r), t = n.length === 1 ? e : (function(o, l) {
2156
2158
  const i = l.slice(0, -1).length;
@@ -2163,23 +2165,23 @@ function ve(e, r) {
2163
2165
  return !0;
2164
2166
  })(t)) && ve(e, n.slice(0, -1)), e;
2165
2167
  }
2166
- function So(e) {
2168
+ function Do(e) {
2167
2169
  return Array.isArray(e) || we(e) && !((r) => {
2168
2170
  for (const n in r) if (Be(r[n])) return !0;
2169
2171
  return !1;
2170
2172
  })(e);
2171
2173
  }
2172
2174
  function sn(e, r = {}) {
2173
- for (const n in e) So(e[n]) ? (r[n] = Array.isArray(e[n]) ? [] : {}, sn(e[n], r[n])) : Re(e[n]) || (r[n] = !0);
2175
+ for (const n in e) Do(e[n]) ? (r[n] = Array.isArray(e[n]) ? [] : {}, sn(e[n], r[n])) : Re(e[n]) || (r[n] = !0);
2174
2176
  return r;
2175
2177
  }
2176
2178
  function it(e, r, n) {
2177
2179
  n || (n = sn(r));
2178
- for (const t in e) So(e[t]) ? xe(r) || an(n[t]) ? n[t] = sn(e[t], Array.isArray(e[t]) ? [] : {}) : it(e[t], Re(r) ? {} : r[t], n[t]) : n[t] = !qe(e[t], r[t]);
2180
+ for (const t in e) Do(e[t]) ? xe(r) || an(n[t]) ? n[t] = sn(e[t], Array.isArray(e[t]) ? [] : {}) : it(e[t], Re(r) ? {} : r[t], n[t]) : n[t] = !qe(e[t], r[t]);
2179
2181
  return n;
2180
2182
  }
2181
2183
  const mr = { value: !1, isValid: !1 }, gr = { value: !0, isValid: !0 };
2182
- var Do = (e) => {
2184
+ var So = (e) => {
2183
2185
  if (Array.isArray(e)) {
2184
2186
  if (e.length > 1) {
2185
2187
  const r = e.filter((n) => n && n.checked && !n.disabled).map((n) => n.value);
@@ -2193,20 +2195,20 @@ const yr = { isValid: !1, value: null };
2193
2195
  var Co = (e) => Array.isArray(e) ? e.reduce((r, n) => n && n.checked && !n.disabled ? { isValid: !0, value: n.value } : r, yr) : yr;
2194
2196
  function br(e) {
2195
2197
  const r = e.ref;
2196
- return kn(r) ? r.files : Sn(r) ? Co(e.refs).value : ko(r) ? [...r.selectedOptions].map(({ value: n }) => n) : St(r) ? Do(e.refs).value : Oo(xe(r.value) ? e.ref.value : r.value, e);
2198
+ return kn(r) ? r.files : Dn(r) ? Co(e.refs).value : ko(r) ? [...r.selectedOptions].map(({ value: n }) => n) : Dt(r) ? So(e.refs).value : Oo(xe(r.value) ? e.ref.value : r.value, e);
2197
2199
  }
2198
- var jt = (e) => e instanceof RegExp, vt = (e) => xe(e) ? e : jt(e) ? e.source : we(e) ? jt(e.value) ? e.value.source : e.value : e, vr = (e) => ({ isOnSubmit: !e || e === vo, isOnBlur: e === Da, isOnChange: e === bo, isOnAll: e === Ct, isOnTouch: e === Oa });
2200
+ var jt = (e) => e instanceof RegExp, vt = (e) => xe(e) ? e : jt(e) ? e.source : we(e) ? jt(e.value) ? e.value.source : e.value : e, vr = (e) => ({ isOnSubmit: !e || e === vo, isOnBlur: e === Sa, isOnChange: e === bo, isOnAll: e === Ct, isOnTouch: e === Oa });
2199
2201
  const xr = "AsyncFunction";
2200
2202
  var _a = (e) => !!e && !!e.validate && !!(Be(e.validate) && e.validate.constructor.name === xr || we(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === xr)), wr = (e, r, n) => !n && (r.watchAll || r.watch.has(e) || [...r.watch].some((t) => e.startsWith(t) && /^\.\w+/.test(e.slice(t.length))));
2201
- const Dt = (e, r, n, t) => {
2203
+ const St = (e, r, n, t) => {
2202
2204
  for (const s of n || Object.keys(e)) {
2203
2205
  const a = W(e, s);
2204
2206
  if (a) {
2205
2207
  const { _f: o, ...l } = a;
2206
2208
  if (o) {
2207
2209
  if (o.refs && o.refs[0] && r(o.refs[0], s) && !t || o.ref && r(o.ref, o.name) && !t) return !0;
2208
- if (Dt(l, r)) break;
2209
- } else if (we(l) && Dt(l, r)) break;
2210
+ if (St(l, r)) break;
2211
+ } else if (we(l) && St(l, r)) break;
2210
2212
  }
2211
2213
  }
2212
2214
  };
@@ -2227,180 +2229,180 @@ var Aa = (e, r, n) => {
2227
2229
  const t = xt(W(e, n));
2228
2230
  return fe(t, "root", r[n]), fe(e, n, t), e;
2229
2231
  };
2230
- function Sr(e, r, n = "validate") {
2232
+ function Dr(e, r, n = "validate") {
2231
2233
  if (Fe(e) || Array.isArray(e) && e.every(Fe) || $e(e) && !e) return { type: n, message: Fe(e) ? e : "", ref: r };
2232
2234
  }
2233
- var ot = (e) => we(e) && !jt(e) ? e : { value: e, message: "" }, Dr = async (e, r, n, t, s, a) => {
2234
- const { ref: o, refs: l, required: i, maxLength: c, minLength: f, min: x, max: y, pattern: b, validate: v, name: m, valueAsNumber: h, mount: p } = e._f, u = W(n, m);
2235
- if (!p || r.has(m)) return {};
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: 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 {};
2236
2238
  const w = l ? l[0] : o, E = (M) => {
2237
2239
  s && w.reportValidity && (w.setCustomValidity($e(M) ? "" : M || ""), w.reportValidity());
2238
- }, T = {}, L = Sn(o), O = St(o), R = L || O, S = (h || kn(o)) && xe(o.value) && xe(u) || Bt(o) && o.value === "" || u === "" || Array.isArray(u) && !u.length, D = Fa.bind(null, m, t, T), P = (M, I, A, V = Ma, B = Ta) => {
2239
- const z = M ? I : A;
2240
- T[m] = { type: M ? V : B, message: z, ref: o, ...D(M ? V : B, z) };
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
+ const z = M ? F : A;
2242
+ T[h] = { type: M ? V : B, message: z, ref: o, ...S(M ? V : B, z) };
2241
2243
  };
2242
- if (a ? !Array.isArray(u) || !u.length : i && (!R && (S || Re(u)) || $e(u) && !u || O && !Do(l).isValid || L && !Co(l).isValid)) {
2243
- const { value: M, message: I } = Fe(i) ? { value: !!i, message: i } : ot(i);
2244
- if (M && (T[m] = { type: fr, message: I, ref: w, ...D(fr, I) }, !t)) return E(I), T;
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
+ const { value: M, message: F } = Fe(i) ? { value: !!i, message: i } : ot(i);
2246
+ if (M && (T[h] = { type: fr, message: F, ref: w, ...S(fr, F) }, !t)) return E(F), T;
2245
2247
  }
2246
- if (!(S || Re(x) && Re(y))) {
2247
- let M, I;
2248
- const A = ot(y), V = ot(x);
2248
+ if (!(D || Re(x) && Re(m))) {
2249
+ let M, F;
2250
+ const A = ot(m), V = ot(x);
2249
2251
  if (Re(u) || isNaN(u)) {
2250
- const B = o.valueAsDate || new Date(u), z = (Q) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Q), ie = o.type == "time", G = o.type == "week";
2251
- Fe(A.value) && u && (M = ie ? z(u) > z(A.value) : G ? u > A.value : B > new Date(A.value)), Fe(V.value) && u && (I = ie ? z(u) < z(V.value) : G ? u < V.value : B < new Date(V.value));
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));
2252
2254
  } else {
2253
2255
  const B = o.valueAsNumber || u && +u;
2254
- Re(A.value) || (M = B > A.value), Re(V.value) || (I = B < V.value);
2256
+ Re(A.value) || (M = B > A.value), Re(V.value) || (F = B < V.value);
2255
2257
  }
2256
- if ((M || I) && (P(!!M, A.message, V.message, Ca, Ea), !t)) return E(T[m].message), T;
2258
+ if ((M || F) && (_(!!M, A.message, V.message, Ca, Ea), !t)) return E(T[h].message), T;
2257
2259
  }
2258
- if ((c || f) && !S && (Fe(u) || a && Array.isArray(u))) {
2259
- const M = ot(c), I = ot(f), A = !Re(M.value) && u.length > +M.value, V = !Re(I.value) && u.length < +I.value;
2260
- if ((A || V) && (P(A, M.message, I.message), !t)) return E(T[m].message), T;
2260
+ if ((c || p) && !D && (Fe(u) || a && Array.isArray(u))) {
2261
+ const M = ot(c), F = ot(p), A = !Re(M.value) && u.length > +M.value, V = !Re(F.value) && u.length < +F.value;
2262
+ if ((A || V) && (_(A, M.message, F.message), !t)) return E(T[h].message), T;
2261
2263
  }
2262
- if (b && !S && Fe(u)) {
2263
- const { value: M, message: I } = ot(b);
2264
- if (jt(M) && !u.match(M) && (T[m] = { type: pr, message: I, ref: o, ...D(pr, I) }, !t)) return E(I), T;
2264
+ if (b && !D && Fe(u)) {
2265
+ const { value: M, message: F } = ot(b);
2266
+ if (jt(M) && !u.match(M) && (T[h] = { type: pr, message: F, ref: o, ...S(pr, F) }, !t)) return E(F), T;
2265
2267
  }
2266
2268
  if (v) {
2267
2269
  if (Be(v)) {
2268
- const M = Sr(await v(u, n), w);
2269
- if (M && (T[m] = { ...M, ...D(Pa, M.message) }, !t)) return E(M.message), T;
2270
+ const M = Dr(await v(u, n), w);
2271
+ if (M && (T[h] = { ...M, ...S(Pa, M.message) }, !t)) return E(M.message), T;
2270
2272
  } else if (we(v)) {
2271
2273
  let M = {};
2272
- for (const I in v) {
2274
+ for (const F in v) {
2273
2275
  if (!Ne(M) && !t) break;
2274
- const A = Sr(await v[I](u, n), w, I);
2275
- A && (M = { ...A, ...D(I, A.message) }, E(A.message), t && (T[m] = M));
2276
+ const A = Dr(await v[F](u, n), w, F);
2277
+ A && (M = { ...A, ...S(F, A.message) }, E(A.message), t && (T[h] = M));
2276
2278
  }
2277
- if (!Ne(M) && (T[m] = { ref: w, ...M }, !t)) return T;
2279
+ if (!Ne(M) && (T[h] = { ref: w, ...M }, !t)) return T;
2278
2280
  }
2279
2281
  }
2280
2282
  return E(!0), T;
2281
2283
  };
2282
2284
  const Ia = { mode: vo, reValidateMode: bo, shouldFocusError: !0 };
2283
2285
  function Va(e = {}) {
2284
- 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)) && De(n.defaultValues || n.values) || {}, o = n.shouldUnregister ? {} : De(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;
2285
- const f = { isDirty: !1, dirtyFields: !1, validatingFields: !1, touchedFields: !1, isValidating: !1, isValid: !1, errors: !1 };
2286
- let x = { ...f };
2287
- const y = { array: hr(), state: hr() }, b = n.criteriaMode === Ct, v = async (d) => {
2288
- if (!n.disabled && (f.isValid || x.isValid || d)) {
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
+ const p = { isDirty: !1, dirtyFields: !1, validatingFields: !1, touchedFields: !1, isValidating: !1, isValid: !1, errors: !1 };
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)) {
2289
2291
  const g = n.resolver ? Ne((await w()).errors) : await E(s, !0);
2290
- g !== t.isValid && y.state.next({ isValid: g });
2292
+ g !== t.isValid && m.state.next({ isValid: g });
2291
2293
  }
2292
- }, m = (d, g) => {
2293
- !n.disabled && (f.isValidating || f.validatingFields || x.isValidating || x.validatingFields) && ((d || Array.from(i.mount)).forEach((C) => {
2294
+ }, h = (d, g) => {
2295
+ !n.disabled && (p.isValidating || p.validatingFields || x.isValidating || x.validatingFields) && ((d || Array.from(i.mount)).forEach((C) => {
2294
2296
  C && (g ? fe(t.validatingFields, C, g) : ve(t.validatingFields, C));
2295
- }), y.state.next({ validatingFields: t.validatingFields, isValidating: !Ne(t.validatingFields) }));
2296
- }, h = (d, g, C, F) => {
2297
- const _ = W(s, d);
2298
- if (_) {
2299
- const N = W(o, d, xe(C) ? W(a, d) : C);
2300
- xe(N) || F && F.defaultChecked || g ? fe(o, d, g ? N : br(_._f)) : O(d, N), l.mount && v();
2301
- }
2302
- }, p = (d, g, C, F, _) => {
2303
- let N = !1, j = !1;
2297
+ }), m.state.next({ validatingFields: t.validatingFields, isValidating: !Ne(t.validatingFields) }));
2298
+ }, f = (d, g, C, N) => {
2299
+ const I = W(s, d);
2300
+ if (I) {
2301
+ const R = W(o, d, xe(C) ? W(a, d) : C);
2302
+ xe(R) || N && N.defaultChecked || g ? fe(o, d, g ? R : br(I._f)) : O(d, R), l.mount && v();
2303
+ }
2304
+ }, y = (d, g, C, N, I) => {
2305
+ let R = !1, j = !1;
2304
2306
  const H = { name: d };
2305
2307
  if (!n.disabled) {
2306
- if (!C || F) {
2307
- (f.isDirty || x.isDirty) && (j = t.isDirty, t.isDirty = H.isDirty = T(), N = j !== H.isDirty);
2308
+ if (!C || N) {
2309
+ (p.isDirty || x.isDirty) && (j = t.isDirty, t.isDirty = H.isDirty = T(), R = j !== H.isDirty);
2308
2310
  const U = qe(W(a, d), g);
2309
- j = !!W(t.dirtyFields, d), U ? ve(t.dirtyFields, d) : fe(t.dirtyFields, d, !0), H.dirtyFields = t.dirtyFields, N = N || (f.dirtyFields || x.dirtyFields) && j !== !U;
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;
2310
2312
  }
2311
2313
  if (C) {
2312
2314
  const U = W(t.touchedFields, d);
2313
- U || (fe(t.touchedFields, d, C), H.touchedFields = t.touchedFields, N = N || (f.touchedFields || x.touchedFields) && U !== C);
2315
+ U || (fe(t.touchedFields, d, C), H.touchedFields = t.touchedFields, R = R || (p.touchedFields || x.touchedFields) && U !== C);
2314
2316
  }
2315
- N && _ && y.state.next(H);
2317
+ R && I && m.state.next(H);
2316
2318
  }
2317
- return N ? H : {};
2318
- }, u = (d, g, C, F) => {
2319
- const _ = W(t.errors, d), N = (f.isValid || x.isValid) && $e(g) && t.isValid !== g;
2319
+ return R ? H : {};
2320
+ }, u = (d, g, C, N) => {
2321
+ const I = W(t.errors, d), R = (p.isValid || x.isValid) && $e(g) && t.isValid !== g;
2320
2322
  var j;
2321
2323
  if (n.delayError && C ? (j = () => ((H, U) => {
2322
- fe(t.errors, H, U), y.state.next({ errors: t.errors });
2324
+ fe(t.errors, H, U), m.state.next({ errors: t.errors });
2323
2325
  })(d, C), r = (H) => {
2324
2326
  clearTimeout(c), c = setTimeout(j, H);
2325
- }, r(n.delayError)) : (clearTimeout(c), r = null, C ? fe(t.errors, d, C) : ve(t.errors, d)), (C ? !qe(_, C) : _) || !Ne(F) || N) {
2326
- const H = { ...F, ...N && $e(g) ? { isValid: g } : {}, errors: t.errors, name: d };
2327
- t = { ...t, ...H }, y.state.next(H);
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(g) ? { isValid: g } : {}, errors: t.errors, name: d };
2329
+ t = { ...t, ...H }, m.state.next(H);
2328
2330
  }
2329
2331
  }, w = async (d) => {
2330
- m(d, !0);
2331
- const g = await n.resolver(o, n.context, ((C, F, _, N) => {
2332
+ h(d, !0);
2333
+ const g = await n.resolver(o, n.context, ((C, N, I, R) => {
2332
2334
  const j = {};
2333
2335
  for (const H of C) {
2334
- const U = W(F, H);
2336
+ const U = W(N, H);
2335
2337
  U && fe(j, H, U._f);
2336
2338
  }
2337
- return { criteriaMode: _, names: [...C], fields: j, shouldUseNativeValidation: N };
2339
+ return { criteriaMode: I, names: [...C], fields: j, shouldUseNativeValidation: R };
2338
2340
  })(d || i.mount, s, n.criteriaMode, n.shouldUseNativeValidation));
2339
- return m(d), g;
2341
+ return h(d), g;
2340
2342
  }, E = async (d, g, C = { valid: !0 }) => {
2341
- for (const F in d) {
2342
- const _ = d[F];
2343
- if (_) {
2344
- const { _f: N, ...j } = _;
2345
- if (N) {
2346
- const H = i.array.has(N.name), U = _._f && _a(_._f);
2347
- U && f.validatingFields && m([N.name], !0);
2348
- const K = await Dr(_, i.disabled, o, b, n.shouldUseNativeValidation && !g, H);
2349
- if (U && f.validatingFields && m([N.name]), K[N.name] && (C.valid = !1, g)) break;
2350
- !g && (W(K, N.name) ? H ? Aa(t.errors, K, N.name) : fe(t.errors, N.name, K[N.name]) : ve(t.errors, N.name));
2343
+ for (const N in d) {
2344
+ const I = d[N];
2345
+ if (I) {
2346
+ const { _f: R, ...j } = I;
2347
+ if (R) {
2348
+ const H = i.array.has(R.name), U = I._f && _a(I._f);
2349
+ U && p.validatingFields && h([R.name], !0);
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));
2351
2353
  }
2352
2354
  !Ne(j) && await E(j, g, C);
2353
2355
  }
2354
2356
  }
2355
2357
  return C.valid;
2356
- }, T = (d, g) => !n.disabled && (d && g && fe(o, d, g), !qe(I(), a)), L = (d, g, C) => ((F, _, N, j, H) => Fe(F) ? (j && _.watch.add(F), W(N, F, H)) : Array.isArray(F) ? F.map((U) => (j && _.watch.add(U), W(N, U))) : (j && (_.watchAll = !0), N))(d, i, { ...l.mount ? o : xe(g) ? a : Fe(d) ? { [d]: g } : g }, C, g), O = (d, g, C = {}) => {
2357
- const F = W(s, d);
2358
- let _ = g;
2359
- if (F) {
2360
- const N = F._f;
2361
- N && (!N.disabled && fe(o, d, Oo(g, N)), _ = Bt(N.ref) && Re(g) ? "" : g, ko(N.ref) ? [...N.ref.options].forEach((j) => j.selected = _.includes(j.value)) : N.refs ? St(N.ref) ? N.refs.forEach((j) => {
2362
- j.defaultChecked && j.disabled || (Array.isArray(_) ? j.checked = !!_.find((H) => H === j.value) : j.checked = _ === j.value || !!_);
2363
- }) : N.refs.forEach((j) => j.checked = j.value === _) : kn(N.ref) ? N.ref.value = "" : (N.ref.value = _, N.ref.type || y.state.next({ name: d, values: De(o) })));
2364
- }
2365
- (C.shouldDirty || C.shouldTouch) && p(d, _, C.shouldTouch, C.shouldDirty, !0), C.shouldValidate && M(d);
2366
- }, R = (d, g, C) => {
2367
- for (const F in g) {
2368
- if (!g.hasOwnProperty(F)) return;
2369
- const _ = g[F], N = d + "." + F, j = W(s, N);
2370
- (i.array.has(d) || we(_) || j && !j._f) && !tt(_) ? R(N, _, C) : O(N, _, C);
2371
- }
2372
- }, S = (d, g, C = {}) => {
2373
- const F = W(s, d), _ = i.array.has(d), N = De(g);
2374
- fe(o, d, N), _ ? (y.array.next({ name: d, values: De(o) }), (f.isDirty || f.dirtyFields || x.isDirty || x.dirtyFields) && C.shouldDirty && y.state.next({ name: d, dirtyFields: it(a, o), isDirty: T(d, N) })) : !F || F._f || Re(N) ? O(d, N, C) : R(d, N, C), wr(d, i) && y.state.next({ ...t, name: d }), y.state.next({ name: l.mount ? d : void 0, values: De(o) });
2375
- }, D = async (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
+ const N = W(s, d);
2360
+ let I = g;
2361
+ if (N) {
2362
+ const R = N._f;
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
+ 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 || m.state.next({ name: d, values: Se(o) })));
2366
+ }
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
+ (i.array.has(d) || we(I) || j && !j._f) && !tt(I) ? P(R, I, C) : O(R, I, C);
2373
+ }
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
+ }, S = async (d) => {
2376
2378
  l.mount = !0;
2377
2379
  const g = d.target;
2378
- let C = g.name, F = !0;
2379
- const _ = W(s, C), N = (U) => {
2380
- F = Number.isNaN(U) || tt(U) && isNaN(U.getTime()) || qe(U, W(o, C, U));
2380
+ let C = g.name, N = !0;
2381
+ const I = W(s, C), R = (U) => {
2382
+ N = Number.isNaN(U) || tt(U) && isNaN(U.getTime()) || qe(U, W(o, C, U));
2381
2383
  }, j = vr(n.mode), H = vr(n.reValidateMode);
2382
- if (_) {
2384
+ if (I) {
2383
2385
  let U, K;
2384
- const te = g.type ? br(_._f) : ((pe) => we(pe) && pe.target ? St(pe.target) ? pe.target.checked : pe.target.value : pe)(d), ue = d.type === ka || d.type === Sa, he = !((pe) => pe.mount && (pe.required || pe.min || pe.max || pe.maxLength || pe.minLength || pe.pattern || pe.validate))(_._f) && !n.resolver && !W(t.errors, C) && !_._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);
2385
- fe(o, C, te), ue ? g && g.readOnly || (_._f.onBlur && _._f.onBlur(d), r && r(0)) : _._f.onChange && _._f.onChange(d);
2386
- const Ce = p(C, te, ue), Y = !Ne(Ce) || Le;
2387
- if (!ue && y.state.next({ name: C, type: d.type, values: De(o) }), he) return (f.isValid || x.isValid) && (n.mode === "onBlur" ? ue && v() : ue || v()), Y && y.state.next({ name: C, ...Le ? {} : Ce });
2388
- if (!ue && Le && y.state.next({ ...t }), n.resolver) {
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) {
2389
2391
  const { errors: pe } = await w([C]);
2390
- if (N(te), F) {
2392
+ if (R(ne), N) {
2391
2393
  const $ = kr(t.errors, s, C), ke = kr(pe, s, $.name || C);
2392
2394
  U = ke.error, C = ke.name, K = Ne(pe);
2393
2395
  }
2394
- } else m([C], !0), U = (await Dr(_, i.disabled, o, b, n.shouldUseNativeValidation))[C], m([C]), N(te), F && (U ? K = !1 : (f.isValid || x.isValid) && (K = await E(s, !0)));
2395
- F && (_._f.deps && (!Array.isArray(_._f.deps) || _._f.deps.length > 0) && M(_._f.deps), u(C, K, U, Ce));
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
+ N && (I._f.deps && (!Array.isArray(I._f.deps) || I._f.deps.length > 0) && M(I._f.deps), u(C, K, U, Ce));
2396
2398
  }
2397
- }, P = (d, g) => {
2399
+ }, _ = (d, g) => {
2398
2400
  if (W(t.errors, g) && d.focus) return d.focus(), 1;
2399
2401
  }, M = async (d, g = {}) => {
2400
- let C, F;
2401
- const _ = xt(d);
2402
+ let C, N;
2403
+ const I = xt(d);
2402
2404
  if (n.resolver) {
2403
- const N = await (async (j) => {
2405
+ const R = await (async (j) => {
2404
2406
  const { errors: H } = await w(j);
2405
2407
  if (j) for (const U of j) {
2406
2408
  const K = W(H, U);
@@ -2408,66 +2410,66 @@ function Va(e = {}) {
2408
2410
  }
2409
2411
  else t.errors = H;
2410
2412
  return H;
2411
- })(xe(d) ? d : _);
2412
- C = Ne(N), F = d ? !_.some((j) => W(N, j)) : C;
2413
- } else d ? (F = (await Promise.all(_.map(async (N) => {
2414
- const j = W(s, N);
2415
- return await E(j && j._f ? { [N]: j } : j);
2416
- }))).every(Boolean), (F || t.isValid) && v()) : F = C = await E(s);
2417
- return y.state.next({ ...!Fe(d) || (f.isValid || x.isValid) && C !== t.isValid ? {} : { name: d }, ...n.resolver || !d ? { isValid: C } : {}, errors: t.errors }), g.shouldFocus && !F && Dt(s, P, d ? _ : i.mount), F;
2418
- }, I = (d, g) => {
2413
+ })(xe(d) ? d : I);
2414
+ C = Ne(R), N = d ? !I.some((j) => W(R, j)) : C;
2415
+ } else d ? (N = (await Promise.all(I.map(async (R) => {
2416
+ const j = W(s, R);
2417
+ return await E(j && j._f ? { [R]: j } : j);
2418
+ }))).every(Boolean), (N || t.isValid) && v()) : N = C = await E(s);
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) => {
2419
2421
  let C = { ...l.mount ? o : a };
2420
- return g && (C = wo(g.dirtyFields ? t.dirtyFields : t.touchedFields, C)), xe(d) ? C : Fe(d) ? W(C, d) : d.map((F) => W(C, F));
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));
2421
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) => {
2422
- const F = (W(s, d, { _f: {} })._f || {}).ref, _ = W(t.errors, d) || {}, { ref: N, message: j, type: H, ...U } = _;
2423
- fe(t.errors, d, { ...U, ...g, ref: F }), y.state.next({ name: d, errors: t.errors, isValid: !1 }), C && C.shouldFocus && F && F.focus && F.focus();
2424
- }, B = (d) => y.state.subscribe({ next: (g) => {
2425
- var C, F, _;
2426
- C = d.name, F = g.name, _ = d.exact, C && F && C !== F && !xt(C).some((N) => N && (_ ? N === F : N.startsWith(F) || F.startsWith(N))) || !((N, j, H, U) => {
2427
- H(N);
2428
- const { name: K, ...te } = N;
2429
- return Ne(te) || Object.keys(te).length >= Object.keys(j).length || Object.keys(te).find((ue) => j[ue] === (!U || Ct));
2430
- })(g, d.formState || f, le, d.reRenderRoot) || d.callback({ values: { ...o }, ...t, ...g, defaultValues: a });
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, ...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
+ var C, N, I;
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
+ H(R);
2430
+ const { name: K, ...ne } = R;
2431
+ return Ne(ne) || Object.keys(ne).length >= Object.keys(j).length || Object.keys(ne).find((ue) => j[ue] === (!U || Ct));
2432
+ })(g, d.formState || p, le, d.reRenderRoot) || d.callback({ values: { ...o }, ...t, ...g, defaultValues: a });
2431
2433
  } }).unsubscribe, z = (d, g = {}) => {
2432
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);
2433
- y.state.next({ values: De(o) }), y.state.next({ ...t, ...g.keepDirty ? { isDirty: T() } : {} }), !g.keepIsValid && v();
2434
- }, ie = ({ disabled: d, name: g }) => {
2435
+ m.state.next({ values: Se(o) }), m.state.next({ ...t, ...g.keepDirty ? { isDirty: T() } : {} }), !g.keepIsValid && v();
2436
+ }, ee = ({ disabled: d, name: g }) => {
2435
2437
  ($e(d) && l.mount || d || i.disabled.has(g)) && (d ? i.disabled.add(g) : i.disabled.delete(g));
2436
2438
  }, G = (d, g = {}) => {
2437
2439
  let C = W(s, d);
2438
- const F = $e(g.disabled) || $e(n.disabled);
2439
- return fe(s, d, { ...C || {}, _f: { ...C && C._f ? C._f : { ref: { name: d } }, name: d, mount: !0, ...g } }), i.mount.add(d), C ? ie({ disabled: $e(g.disabled) ? g.disabled : n.disabled, name: d }) : h(d, !0, g.value), { ...F ? { 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: D, onBlur: D, ref: (_) => {
2440
- if (_) {
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
+ if (I) {
2441
2443
  G(d, g), C = W(s, d);
2442
- const N = xe(_.value) && _.querySelectorAll && _.querySelectorAll("input,select,textarea")[0] || _, j = ((U) => Sn(U) || St(U))(N), H = C._f.refs || [];
2443
- if (j ? H.find((U) => U === N) : N === C._f.ref) return;
2444
- fe(s, d, { _f: { ...C._f, ...j ? { refs: [...H.filter(Jt), N, ...Array.isArray(W(a, d)) ? [{}] : []], ref: { type: N.type, name: d } } : { ref: N } } }), h(d, !1, void 0, N);
2445
- } else C = W(s, d, {}), C._f && (C._f.mount = !1), (n.shouldUnregister || g.shouldUnregister) && (!((N, j) => N.has(((H) => H.substring(0, H.search(/\.\d+(\.|$)/)) || H)(j)))(i.array, d) || !l.action) && i.unMount.add(d);
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
+ if (j ? H.find((U) => U === R) : R === C._f.ref) return;
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 || g.shouldUnregister) && (!((R, j) => R.has(((H) => H.substring(0, H.search(/\.\d+(\.|$)/)) || H)(j)))(i.array, d) || !l.action) && i.unMount.add(d);
2446
2448
  } };
2447
- }, Q = () => n.shouldFocusError && Dt(s, P, i.mount), re = (d, g) => async (C) => {
2448
- let F;
2449
+ }, Q = () => n.shouldFocusError && St(s, _, i.mount), oe = (d, g) => async (C) => {
2450
+ let N;
2449
2451
  C && (C.preventDefault && C.preventDefault(), C.persist && C.persist());
2450
- let _ = De(o);
2451
- if (y.state.next({ isSubmitting: !0 }), n.resolver) {
2452
- const { errors: N, values: j } = await w();
2453
- t.errors = N, _ = De(j);
2452
+ let I = Se(o);
2453
+ if (m.state.next({ isSubmitting: !0 }), n.resolver) {
2454
+ const { errors: R, values: j } = await w();
2455
+ t.errors = R, I = Se(j);
2454
2456
  } else await E(s);
2455
- if (i.disabled.size) for (const N of i.disabled) ve(_, N);
2457
+ if (i.disabled.size) for (const R of i.disabled) ve(I, R);
2456
2458
  if (ve(t.errors, "root"), Ne(t.errors)) {
2457
- y.state.next({ errors: {} });
2459
+ m.state.next({ errors: {} });
2458
2460
  try {
2459
- await d(_, C);
2460
- } catch (N) {
2461
- F = N;
2461
+ await d(I, C);
2462
+ } catch (R) {
2463
+ N = R;
2462
2464
  }
2463
2465
  } else g && await g({ ...t.errors }, C), Q(), setTimeout(Q);
2464
- if (y.state.next({ isSubmitted: !0, isSubmitting: !1, isSubmitSuccessful: Ne(t.errors) && !F, submitCount: t.submitCount + 1, errors: t.errors }), F) throw F;
2466
+ if (m.state.next({ isSubmitted: !0, isSubmitting: !1, isSubmitSuccessful: Ne(t.errors) && !N, submitCount: t.submitCount + 1, errors: t.errors }), N) throw N;
2465
2467
  }, se = (d, g = {}) => {
2466
- const C = d ? De(d) : a, F = De(C), _ = Ne(d), N = _ ? a : F;
2468
+ const C = d ? Se(d) : a, N = Se(C), I = Ne(d), R = I ? a : N;
2467
2469
  if (g.keepDefaultValues || (a = C), !g.keepValues) {
2468
2470
  if (g.keepDirtyValues) {
2469
2471
  const j = /* @__PURE__ */ new Set([...i.mount, ...Object.keys(it(a, o))]);
2470
- for (const H of Array.from(j)) W(t.dirtyFields, H) ? fe(N, H, W(o, H)) : S(H, W(N, H));
2472
+ for (const H of Array.from(j)) W(t.dirtyFields, H) ? fe(R, H, W(o, H)) : D(H, W(R, H));
2471
2473
  } else {
2472
2474
  if (xn && xe(d)) for (const j of i.mount) {
2473
2475
  const H = W(s, j);
@@ -2482,36 +2484,36 @@ function Va(e = {}) {
2482
2484
  }
2483
2485
  }
2484
2486
  }
2485
- if (g.keepFieldsRef) for (const j of i.mount) S(j, W(N, j));
2487
+ if (g.keepFieldsRef) for (const j of i.mount) D(j, W(R, j));
2486
2488
  else s = {};
2487
2489
  }
2488
- o = n.shouldUnregister ? g.keepDefaultValues ? De(a) : {} : De(N), y.array.next({ values: { ...N } }), y.state.next({ values: { ...N } });
2490
+ o = n.shouldUnregister ? g.keepDefaultValues ? Se(a) : {} : Se(R), m.array.next({ values: { ...R } }), m.state.next({ values: { ...R } });
2489
2491
  }
2490
- 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 = !f.isValid || !!g.keepIsValid || !!g.keepDirtyValues, l.watch = !!n.shouldUnregister, y.state.next({ submitCount: g.keepSubmitCount ? t.submitCount : 0, isDirty: !_ && (g.keepDirty ? t.isDirty : !(!g.keepDefaultValues || qe(d, a))), isSubmitted: !!g.keepIsSubmitted && t.isSubmitted, dirtyFields: _ ? {} : 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 });
2491
- }, ee = (d, g) => se(Be(d) ? d(o) : d, g), le = (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) => {
2492
2494
  t = { ...t, ...d };
2493
- }, ce = { control: { register: G, unregister: z, getFieldState: A, handleSubmit: re, setError: V, _subscribe: B, _runSchema: w, _focusError: Q, _getWatch: L, _getDirty: T, _setValid: v, _setFieldArray: (d, g = [], C, F, _ = !0, N = !0) => {
2494
- if (F && C && !n.disabled) {
2495
- if (l.action = !0, N && Array.isArray(W(s, d))) {
2496
- const j = C(W(s, d), F.argA, F.argB);
2497
- _ && fe(s, d, j);
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
+ if (N && C && !n.disabled) {
2497
+ if (l.action = !0, R && Array.isArray(W(s, d))) {
2498
+ const j = C(W(s, d), N.argA, N.argB);
2499
+ I && fe(s, d, j);
2498
2500
  }
2499
- if (N && Array.isArray(W(t.errors, d))) {
2500
- const j = C(W(t.errors, d), F.argA, F.argB);
2501
- _ && fe(t.errors, d, j), ((H, U) => {
2501
+ if (R && Array.isArray(W(t.errors, d))) {
2502
+ const j = C(W(t.errors, d), N.argA, N.argB);
2503
+ I && fe(t.errors, d, j), ((H, U) => {
2502
2504
  !on(W(H, U)).length && ve(H, U);
2503
2505
  })(t.errors, d);
2504
2506
  }
2505
- if ((f.touchedFields || x.touchedFields) && N && Array.isArray(W(t.touchedFields, d))) {
2506
- const j = C(W(t.touchedFields, d), F.argA, F.argB);
2507
- _ && fe(t.touchedFields, d, j);
2507
+ if ((p.touchedFields || x.touchedFields) && R && Array.isArray(W(t.touchedFields, d))) {
2508
+ const j = C(W(t.touchedFields, d), N.argA, N.argB);
2509
+ I && fe(t.touchedFields, d, j);
2508
2510
  }
2509
- (f.dirtyFields || x.dirtyFields) && (t.dirtyFields = it(a, o)), y.state.next({ name: d, isDirty: T(d, g), dirtyFields: t.dirtyFields, errors: t.errors, isValid: t.isValid });
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 });
2510
2512
  } else fe(o, d, g);
2511
- }, _setDisabledField: ie, _setErrors: (d) => {
2512
- t.errors = d, y.state.next({ errors: t.errors, isValid: !1 });
2513
+ }, _setDisabledField: ee, _setErrors: (d) => {
2514
+ t.errors = d, m.state.next({ errors: t.errors, isValid: !1 });
2513
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) => {
2514
- ee(d, n.resetOptions), y.state.next({ isLoading: !1 });
2516
+ te(d, n.resetOptions), m.state.next({ isLoading: !1 });
2515
2517
  }), _removeUnmounted: () => {
2516
2518
  for (const d of i.unMount) {
2517
2519
  const g = W(s, d);
@@ -2519,13 +2521,13 @@ function Va(e = {}) {
2519
2521
  }
2520
2522
  i.unMount = /* @__PURE__ */ new Set();
2521
2523
  }, _disableForm: (d) => {
2522
- $e(d) && (y.state.next({ disabled: d }), Dt(s, (g, C) => {
2523
- const F = W(s, C);
2524
- F && (g.disabled = F._f.disabled || d, Array.isArray(F._f.refs) && F._f.refs.forEach((_) => {
2525
- _.disabled = F._f.disabled || d;
2524
+ $e(d) && (m.state.next({ disabled: d }), St(s, (g, C) => {
2525
+ const N = W(s, C);
2526
+ N && (g.disabled = N._f.disabled || d, Array.isArray(N._f.refs) && N._f.refs.forEach((I) => {
2527
+ I.disabled = N._f.disabled || d;
2526
2528
  }));
2527
2529
  }, 0, !1));
2528
- }, _subjects: y, _proxyFormState: f, get _fields() {
2530
+ }, _subjects: m, _proxyFormState: p, get _fields() {
2529
2531
  return s;
2530
2532
  }, get _formValues() {
2531
2533
  return o;
@@ -2545,15 +2547,15 @@ function Va(e = {}) {
2545
2547
  return n;
2546
2548
  }, set _options(d) {
2547
2549
  n = { ...n, ...d };
2548
- } }, subscribe: (d) => (l.mount = !0, x = { ...x, ...d.formState }, B({ ...d, formState: x })), trigger: M, register: G, handleSubmit: re, watch: (d, g) => Be(d) ? y.state.subscribe({ next: (C) => "values" in C && d(L(void 0, g), C) }) : L(d, g, !0), setValue: S, getValues: I, reset: ee, resetField: (d, g = {}) => {
2549
- W(s, d) && (xe(g.defaultValue) ? S(d, De(W(a, d))) : (S(d, g.defaultValue), fe(a, d, De(g.defaultValue))), g.keepTouched || ve(t.touchedFields, d), g.keepDirty || (ve(t.dirtyFields, d), t.isDirty = g.defaultValue ? T(d, De(W(a, d))) : T()), g.keepError || (ve(t.errors, d), f.isValid && v()), y.state.next({ ...t }));
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 }));
2550
2552
  }, clearErrors: (d) => {
2551
- d && xt(d).forEach((g) => ve(t.errors, g)), y.state.next({ errors: d ? t.errors : {} });
2553
+ d && xt(d).forEach((g) => ve(t.errors, g)), m.state.next({ errors: d ? t.errors : {} });
2552
2554
  }, unregister: z, setError: V, setFocus: (d, g = {}) => {
2553
- const C = W(s, d), F = C && C._f;
2554
- if (F) {
2555
- const _ = F.refs ? F.refs[0] : F.ref;
2556
- _.focus && (_.focus(), g.shouldSelect && Be(_.select) && _.select());
2555
+ const C = W(s, d), N = C && C._f;
2556
+ if (N) {
2557
+ const I = N.refs ? N.refs[0] : N.ref;
2558
+ I.focus && (I.focus(), g.shouldSelect && Be(I.select) && I.select());
2557
2559
  }
2558
2560
  }, getFieldState: A };
2559
2561
  return { ...ce, formControl: ce };
@@ -2585,63 +2587,63 @@ function La(e = {}) {
2585
2587
  }, [a, e.values]), q.useEffect(() => {
2586
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();
2587
2589
  }), r.current.formState = ((o, l, i, c = !0) => {
2588
- const f = { defaultValues: l._defaultValues };
2589
- for (const x in o) Object.defineProperty(f, x, { get: () => {
2590
- const y = x;
2591
- return l._proxyFormState[y] !== Ct && (l._proxyFormState[y] = !c || Ct), o[y];
2590
+ const p = { defaultValues: l._defaultValues };
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];
2592
2594
  } });
2593
- return f;
2595
+ return p;
2594
2596
  })(t, a), r.current;
2595
2597
  }
2596
- const Ba = ["Ok", "Cancel"], Or = oe(de((e, r) => {
2597
- const { description: n, icon: t, onCancel: s, onOption: a, onDone: o, onValidateOption: l, createOptionsButton: i, options: c = Ba, autoFocusSel: f = ".defaultOption", defaultOption: x = c[0], cancelOption: y = "Cancel", children: b, ...v } = e, m = La({ shouldUseNativeValidation: !1 }), { handleSubmit: h, formState: p } = m, u = ge(null), w = ge(null), E = ge(null), T = ae(async (P) => {
2598
- let M;
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: 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
+ let F;
2599
2601
  try {
2600
- if (M = await Promise.resolve(l?.(P)) ?? !0, M !== !0) return;
2601
- await Promise.resolve(a?.(P, P === y, P === x)), o?.(P);
2602
+ if (F = await Promise.resolve(l?.(M)) ?? !0, F !== !0) return;
2603
+ await Promise.resolve(a?.(M, M === m, M === x)), o?.(M);
2602
2604
  } catch {
2603
2605
  }
2604
- }, [a, o, l, y, x]), L = ae((P, M) => {
2606
+ }, [a, o, l, m, x]), O = ae((M, F) => {
2605
2607
  setTimeout(() => {
2606
- T(x);
2608
+ L(x);
2607
2609
  }, 180);
2608
- }, [T]), O = ae(() => {
2609
- a?.(y, !0, !1), s?.(), o?.(null);
2610
- }, [a, y, s, o]), R = p && (Object.keys(p.errors).length > 0 || p.disabled || p.isSubmitted), S = ae((P, M) => {
2611
- const I = P === y, A = { className: M ? "defaultOption" : "action", type: M ? "submit" : "button", style: { minWidth: "75px" }, onClick: () => {
2612
- I ? O() : M || T(P);
2610
+ }, [L]), P = ae(() => {
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
+ A ? P() : F || L(M);
2613
2615
  } };
2614
- if (i) return i(P, A, M);
2615
- const V = { className: M ? "defaultOption" : "action", variant: M ? "contained" : "outlined", size: "small", disabled: !I && R, color: "primary", ...A };
2616
- if (M || I) {
2617
- const B = M ? u : w;
2618
- V.touchRippleRef = B, V.onPointerDown = (z) => {
2619
- B.current?.start(z, { center: !1 }), z.stopPropagation(), z.preventDefault();
2616
+ if (i) return i(M, V, F);
2617
+ const B = { className: F ? "defaultOption" : "action", variant: F ? "contained" : "outlined", size: "small", disabled: !A && D, color: "primary", ...V };
2618
+ if (F || A) {
2619
+ const z = F ? w : E;
2620
+ B.touchRippleRef = z, B.onPointerDown = (ee) => {
2621
+ z.current?.start(ee, { center: !1 }), ee.stopPropagation(), ee.preventDefault();
2620
2622
  };
2621
2623
  }
2622
- return k(Yo, { ...V, children: k("div", { style: { paddingTop: "3px" }, children: P }) }, `action:${P}`);
2623
- }, [c, x, y, i, p]), D = Z(() => {
2624
- const P = [];
2625
- for (let M = 0; M < c.length; M++) {
2626
- const I = c[M], A = x ? I === x : M === 0;
2627
- P.push(S(I, A));
2628
- }
2629
- return P;
2630
- }, [c, x, p]);
2631
- return k(ga, { onCancel: O, initialPosition: { y: wa === "touch" ? "15" : "35" }, onDone: o, autoFocusSel: f, isModal: !0, ref: r, ...v, children: k(Ra, { ...m, children: J("form", { ref: E, onSubmit: h(L), children: [k(Go, { dividers: !0, onKeyDown: (P) => {
2632
- if (P.isDefaultPrevented()) return;
2633
- P.stopPropagation();
2634
- let M = null, I = null;
2635
- const A = P.which === Pe.Escape && y;
2636
- if (A) M = y, I = w;
2624
+ return k(Yo, { ...B, children: k("div", { style: { paddingTop: "3px" }, children: M }) }, `action:${M}`);
2625
+ }, [c, x, m, i, u]), _ = Z(() => {
2626
+ const M = [];
2627
+ for (let F = 0; F < c.length; F++) {
2628
+ const A = c[F], V = x ? A === x : F === 0;
2629
+ M.push(S(A, V));
2630
+ }
2631
+ return M;
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
+ if (M.isDefaultPrevented()) return;
2635
+ M.stopPropagation();
2636
+ let F = null, A = null;
2637
+ const V = M.which === Pe.Escape && m;
2638
+ if (V) F = m, A = E;
2637
2639
  else {
2638
- if (R) return;
2639
- P.which === Pe.Enter && (M = x ?? c[0], I = u);
2640
+ if (D) return;
2641
+ M.which === Pe.Enter && (F = x ?? c[0], A = w);
2640
2642
  }
2641
- M && (I.current?.start(P, { center: !1 }), setTimeout(() => {
2642
- I.current?.stop(P), A && T(M);
2643
+ F && (A.current?.start(M, { center: !1 }), setTimeout(() => {
2644
+ A.current?.stop(M), V && L(F);
2643
2645
  }, 180));
2644
- }, children: J(X, { sx: { display: "flex", flexDirection: "column", whiteSpace: "pre-wrap", rowGap: (P) => P.spacing(t || n ? 1.5 : 0) }, children: [J(X, { sx: { display: "flex", flexDirection: "column" }, children: [t, k(Me, { children: n })] }), b] }) }), k(Xo, { sx: { paddingTop: (P) => P.spacing(1), paddingBottom: (P) => P.spacing(1), paddingLeft: (P) => P.spacing(1), paddingRight: (P) => P.spacing(1), backgroundColor: (P) => me(P.palette.action.hover, 0.03) }, children: D })] }) }) });
2646
+ }, children: J(X, { sx: { display: "flex", flexDirection: "column", whiteSpace: "pre-wrap", rowGap: (M) => M.spacing(t || n ? 1.5 : 0) }, children: [J(X, { sx: { display: "flex", flexDirection: "column" }, children: [t, k(Me, { children: n })] }), v] }) }), k(Xo, { sx: { paddingTop: (M) => M.spacing(1), paddingBottom: (M) => M.spacing(1), paddingLeft: (M) => M.spacing(1), paddingRight: (M) => M.spacing(1), backgroundColor: (M) => me(M.palette.action.hover, 0.03) }, children: _ })] }) }) });
2645
2647
  })), ja = Object.freeze(Object.defineProperty({ __proto__: null, OptionsDialog: Or, default: Or }, Symbol.toStringTag, { value: "Module" })), $a = q.lazy(() => Promise.resolve().then(() => ja)), Cs = (e) => {
2646
2648
  const { showModal: r } = gn();
2647
2649
  return (n) => new Promise((t) => {
@@ -2651,60 +2653,60 @@ const Ba = ["Ok", "Cancel"], Or = oe(de((e, r) => {
2651
2653
  n?.onDone?.(), s.hide();
2652
2654
  } });
2653
2655
  });
2654
- }, za = q.lazy(() => import("./CH38wbt8hUWwf7_q.mjs")), Es = (e) => {
2656
+ }, za = q.lazy(() => import("./BEjEVDP4wDSgmkji.mjs")), Es = (e) => {
2655
2657
  const { showModal: r } = gn();
2656
2658
  return (n) => {
2657
2659
  const { defaultOption: t = n.options?.[0], cancelOption: s = "Cancel", ...a } = n;
2658
2660
  return new Promise((o) => {
2659
- const l = r(za, { ...e, defaultOption: t, cancelOption: s, onOption(i) {
2661
+ const l = r(za, { ...e, defaultOption: t, cancelOption: s, ...a, onOption(i) {
2660
2662
  a?.onOption?.(i, i === s, i === t), o({ input: "", option: i });
2661
- }, onInputOption(i, c) {
2662
- a?.onInputOption?.(i, c), o({ input: i, option: c });
2663
+ }, onInput(i, c) {
2664
+ a?.onInput?.(i, c), o({ input: i, option: c });
2663
2665
  }, onDone: () => {
2664
2666
  a?.onDone?.(), l.hide();
2665
2667
  } });
2666
2668
  });
2667
2669
  };
2668
- }, Dn = oe(de((e, r) => {
2670
+ }, Sn = ie(de((e, r) => {
2669
2671
  const { command: n, disabled: t = !1, shortcut: s, children: a, ...o } = e;
2670
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 }) });
2671
- })), Wa = k(be, {}), Eo = oe(de((e, r) => {
2672
- const { command: n, commandHook: t, scope: s, context: a, icon: o, label: l, disabled: i = !1, variant: c = Ae.Toolbar, shortcut: f, commandState: x, tooltipProps: y, ...b } = e, v = ge(null), m = ge(!1), h = Z(() => {
2673
- const R = { onExecute(S, D) {
2674
- t?.onExecute?.(S, D), m.current || (v.current?.start({ center: !1 }), setTimeout(() => v.current?.stop({}), 180)), m.current = !1;
2675
- }, onError(S, D, P) {
2676
- t?.onError(S, D, P);
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: x, tooltipProps: m, ...b } = e, v = ge(null), h = ge(!1), f = Z(() => {
2675
+ const P = { onExecute(D, S) {
2676
+ t?.onExecute?.(D, S), h.current || (v.current?.start({ center: !1 }), setTimeout(() => v.current?.stop({}), 180)), h.current = !1;
2677
+ }, onError(D, S, _) {
2678
+ t?.onError(D, S, _);
2677
2679
  } };
2678
- return t?.beforeExecute && (R.beforeExecute = t.beforeExecute), R;
2679
- }, [t]), p = cn(n, h), u = _e((R) => {
2680
- R.button === 0 && R.preventDefault();
2681
- }, []), w = _e((R) => {
2682
- R.button === 0 && n?.execute(x, t);
2683
- }, [p, t, x]), E = _e((R) => {
2684
- R.keyCode !== Pe.Enter && R.keyCode !== Pe.Space || n?.execute(x, t);
2685
- }, [p, t, x]), T = Z(() => {
2680
+ return t?.beforeExecute && (P.beforeExecute = t.beforeExecute), P;
2681
+ }, [t]), y = cn(n, f), u = _e((P) => {
2682
+ P.button === 0 && P.preventDefault();
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(() => {
2686
2688
  if (o) return typeof o == "function" ? o(n) : o;
2687
- let R = n?.icon(a);
2688
- return R ? (typeof R == "string" && (R = k(be, { iconKey: R })), R) : c === Ae.Toolbar || n?.state() ? void 0 : Wa;
2689
- }, [p, 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 }), [p, t, i, T]);
2689
+ let P = n?.icon(a);
2690
+ return P ? (typeof P == "string" && (P = k(be, { iconKey: P })), P) : c === Ae.Toolbar || n?.state() ? void 0 : Wa;
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]);
2690
2692
  let O;
2691
- 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(Dn, { command: n, placement: c === Ae.Toolbar ? "bottom-start" : "right-start", shortcut: f, ...y, children: O })), 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, ...m, children: O })), O;
2692
2694
  }));
2693
2695
  Eo.displayName = "CommandButton";
2694
- const Ha = k(be, {}), Ms = oe(de((e, r) => {
2695
- const { command: n, scope: t, icon: s = Ha, label: a, variant: o = Ae.Toolbar, disabled: l = !1, commandHook: i, ...c } = e, f = ge(null), x = ge(!1), y = Z(() => {
2696
- const O = { onExecute(R, S) {
2697
- i?.onExecute?.(R, S), x.current || (f.current?.start({ center: !1 }), setTimeout(() => f.current?.stop({}), 180)), x.current = !1;
2698
- }, onError(R, S, D) {
2699
- i?.onError(R, S, D);
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), x = ge(!1), m = Z(() => {
2698
+ const O = { onExecute(P, D) {
2699
+ i?.onExecute?.(P, D), x.current || (p.current?.start({ center: !1 }), setTimeout(() => p.current?.stop({}), 180)), x.current = !1;
2700
+ }, onError(P, D, S) {
2701
+ i?.onError(P, D, S);
2700
2702
  } };
2701
2703
  return i?.beforeExecute && (O.beforeExecute = i.beforeExecute), O;
2702
- }, [i]), b = cn(n, y), v = () => n?.state()?.toString() || "0", [m, h] = ne(v), p = ae(() => {
2703
- const O = parseFloat(m);
2704
- isNaN(O) ? h(v()) : parseFloat(v()) !== O && n.execute(O, i);
2705
- }, [v, n, m, i]);
2706
- Se(() => {
2707
- h(v());
2704
+ }, [i]), b = cn(n, m), v = () => n?.state()?.toString() || "0", [h, f] = re(v), y = ae(() => {
2705
+ const O = parseFloat(h);
2706
+ isNaN(O) ? f(v()) : parseFloat(v()) !== O && n.execute(O, i);
2707
+ }, [v, n, h, i]);
2708
+ De(() => {
2709
+ f(v());
2708
2710
  }, [n?.state()]);
2709
2711
  const u = Z(() => {
2710
2712
  let O = typeof s == "function" ? s(n) : s;
@@ -2713,104 +2715,112 @@ const Ha = k(be, {}), Ms = oe(de((e, r) => {
2713
2715
  O.button === 0 && O.stopPropagation();
2714
2716
  }, onMouseUp: (O) => {
2715
2717
  O.button === 0 && O.stopPropagation();
2716
- }, 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: m, onFocus: (O) => {
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) => {
2717
2719
  O.target?.select();
2718
2720
  }, onKeyDown: (O) => {
2719
- if (O.which === Pe.Enter) v() !== m && (O.stopPropagation(), O.preventDefault(), p());
2720
- else if (O.which === Pe.Escape) v() !== m && (h(v()), setTimeout(() => {
2721
+ if (O.which === Pe.Enter) v() !== h && (O.stopPropagation(), O.preventDefault(), y());
2722
+ else if (O.which === Pe.Escape) v() !== h && (f(v()), setTimeout(() => {
2721
2723
  O.target?.select();
2722
2724
  }, 0), O.stopPropagation(), O.preventDefault());
2723
2725
  else {
2724
- if (O.key.match("[-]") || O.key.match("[0-9.]") && (m + O.key).length > 4) return O.stopPropagation(), void O.preventDefault();
2726
+ if (O.key.match("[-]") || O.key.match("[0-9.]") && (h + O.key).length > 4) return O.stopPropagation(), void O.preventDefault();
2725
2727
  if (O.which === Pe.Space) return void O.preventDefault();
2726
2728
  }
2727
2729
  }, onBlur: () => {
2728
- p();
2730
+ y();
2729
2731
  }, onChange: (O) => {
2730
2732
  if (O.target.value.length > 4) return O.stopPropagation(), void O.preventDefault();
2731
- h(O.target.value);
2732
- } }) }), [m, l, n]), T = { tabIndex: 0, ref: r, icon: u, touchRippleRef: f, disabled: l || !n || n.disabled(), onMouseDown: (O) => {
2733
+ f(O.target.value);
2734
+ } }) }), [h, l, n]), T = { tabIndex: 0, ref: r, icon: u, touchRippleRef: p, disabled: l || !n || n.disabled(), onMouseDown: (O) => {
2733
2735
  O.button === 0 && O.preventDefault();
2734
2736
  }, onMouseUp: (O) => {
2735
- O.button !== 0 || O.isPropagationStopped() || O.isDefaultPrevented() || O.isDefaultPrevented() || (O.preventDefault(), n?.execute(!n?.state?.(), y));
2737
+ O.button !== 0 || O.isPropagationStopped() || O.isDefaultPrevented() || O.isDefaultPrevented() || (O.preventDefault(), n?.execute(!n?.state?.(), m));
2736
2738
  }, onKeyDown: (O) => {
2737
- O.keyCode !== Pe.Enter && O.keyCode !== Pe.Space || n?.execute(!n?.state?.(), y);
2739
+ O.keyCode !== Pe.Enter && O.keyCode !== Pe.Space || n?.execute(!n?.state?.(), m);
2738
2740
  } };
2739
2741
  let L;
2740
- 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(Dn, { command: n, placement: o === Ae.Toolbar ? "bottom-start" : "right-start", children: L })), L;
2741
- })), Mo = oe(de((e, r) => {
2742
- const { variant: n = Ae.Toolbar, quickCommand: t, onQuickClick: s, commands: a, commandState: o, commandHook: l, disabled: i, label: c, icon: f, createPopupPanel: x, tooltip: y, selected: b, scope: v, ...m } = e, h = ge(null), p = ge(!1), u = Z(() => {
2743
- const D = { onExecute(P, M) {
2744
- l?.onExecute?.(P, M), p.current || (h.current?.start({ center: !1 }), setTimeout(() => h.current?.stop({}), 180)), p.current = !1;
2745
- }, onError(P, M, I) {
2746
- l?.onError(P, M, I);
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
+ })), 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: x, tooltip: m, selected: b, scope: v, ...h } = e, f = ge(null), y = ge(!1), u = Z(() => {
2745
+ const S = { onExecute(_, M) {
2746
+ l?.onExecute?.(_, M), y.current || (f.current?.start({ center: !1 }), setTimeout(() => f.current?.stop({}), 180)), y.current = !1;
2747
+ }, onError(_, M, F) {
2748
+ l?.onError(_, M, F);
2747
2749
  } };
2748
- return l?.beforeExecute && (D.beforeExecute = l.beforeExecute), D;
2750
+ return l?.beforeExecute && (S.beforeExecute = l.beforeExecute), S;
2749
2751
  }, [l]), w = un(a, [t], null, [t]), E = w[0], { label: T, icon: L } = Z(() => {
2750
- let D = null;
2751
- c && (D = typeof c == "function" ? c(E) : c), D || (D = E?.label?.(v));
2752
- let P = f;
2753
- return P || (P = E?.icon?.()), typeof P == "string" ? P = k(be, { iconKey: P }) : typeof P == "function" && (P = P(E)), { label: D, icon: P };
2754
- }, [w, c, f]), O = { disabled: i, scope: v, touchRippleRef: h, onQuickClick: s, tooltip: y, label: T, icon: L };
2755
- (T || y) && (O.createTooltip = ({ children: D }, P) => k(pt, { label: T, description: y, disabled: P, children: D }));
2756
- const R = ae((D) => x?.(D, a), [x, w]), S = ae((D) => E?.execute(o, u), [E]);
2757
- return E ? (O.quickButtonProps = {}, O.quickButtonProps.createTooltip = ({ children: D, placement: P }, M) => k(Dn, { command: E, placement: P ?? n === Ae.Toolbar ? "bottom-start" : "right-start", disabled: M, children: D }), O.disabled = O.disabled ?? E?.disabled(), s || (O.onQuickClick = S)) : t && (O.onQuickClick = () => {
2758
- }), O.selected = b ?? E?.state(), O.createPopupPanel = R, n === Ae.Toolbar ? k(mn, { ...m, ...O, ref: r }) : k(Zr, { ...m, ...O, ref: r });
2752
+ let S = null;
2753
+ c && (S = typeof c == "function" ? c(E) : c), S || (S = E?.label?.(v));
2754
+ let _ = p;
2755
+ return _ || (_ = E?.icon?.()), typeof _ == "string" ? _ = k(be, { iconKey: _ }) : typeof _ == "function" && (_ = _(E)), { label: S, icon: _ };
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
+ 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
+ }), O.selected = b ?? E?.state(), O.createPopupPanel = P, n === Ae.Toolbar ? k(mn, { ...h, ...O, ref: r }) : k(Zr, { ...h, ...O, ref: r });
2759
2761
  }));
2760
2762
  Mo.displayName = "CommandPopupButton";
2761
2763
  const Ua = k(be, { iconKey: "Check" }), Ts = (e) => {
2762
2764
  const { command: r, label: n, scope: t, icon: s = Ua, sx: a, ...o } = e;
2763
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 })] });
2764
- }, Ya = oe(de((e, r) => {
2765
- const { sx: n, commands: t, commandButtonProps: s, parentFloat: a, createToolbarPalette: o, children: l, ...i } = e, c = Tr(r, () => ({}), []), [f, x] = ne(null), { reference: y } = zt({ label: "toolbar", anchor: c.current, parentFloat: a, createPopupPanel: null }), b = _e(() => {
2766
- const O = f;
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, x] = re(null), { reference: m } = zt({ label: "toolbar", anchor: c.current, parentFloat: a, createPopupPanel: null }), b = _e(() => {
2768
+ const O = p;
2767
2769
  O && requestAnimationFrame(() => {
2768
2770
  c.current?.contains(document.activeElement) && O.focus();
2769
2771
  });
2770
- }, []), v = Z(() => ({ dense: !0, outlined: !1 }), []), m = Z(() => {
2771
- const { commandHook: O, ...R } = s || {};
2772
- return { commandHook: { beforeExecute: (S, D) => O?.beforeExecute?.(S, D) !== !1 && y.closeAll(), onExecute(S, D) {
2773
- O?.onExecute?.(S, D), b();
2774
- }, onError(S, D, P) {
2775
- O?.onError?.(S, D, P);
2776
- } }, ...R };
2777
- }, [y, s]), h = Z(() => ({ ...v, ...m }), [v, m]), [p, u] = Ao((O) => O + 1, 0);
2772
+ }, []), v = Z(() => ({ dense: !0, outlined: !1 }), []), h = Z(() => {
2773
+ const { commandHook: O, ...P } = s || {};
2774
+ return { commandHook: { beforeExecute: (D, S) => O?.beforeExecute?.(D, S) !== !1 && m.closeAll(), onExecute(D, S) {
2775
+ O?.onExecute?.(D, S), b();
2776
+ }, onError(D, S, _) {
2777
+ O?.onError?.(D, S, _);
2778
+ } }, ...P };
2779
+ }, [m, s]), f = Z(() => ({ ...v, ...h }), [v, h]), [y, u] = Ao((O) => O + 1, 0);
2778
2780
  un(t, [], { onChange: () => {
2779
2781
  u();
2780
2782
  } });
2781
- const w = Z(() => ({ commands: t, parentFloat: y, ...m }), [p, h, y, s]);
2783
+ const w = Z(() => ({ commands: t, parentFloat: m, ...h }), [y, f, m, s]);
2782
2784
  let E = 0;
2783
2785
  v.dense || (E += 2), v.outlined && E++;
2784
2786
  let T = 2;
2785
2787
  v.dense || (T = 4);
2786
- const L = Z(() => o({ commands: t, commandButtonProps: h, commandPopupProps: { commands: t, ...w, ...s } }), [p, h, w, o]);
2788
+ const L = Z(() => o({ commands: t, commandButtonProps: f, commandPopupProps: { commands: t, ...w, ...s } }), [y, f, w, o]);
2787
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) => {
2788
- O.relatedTarget && !f && x(O.relatedTarget);
2790
+ O.relatedTarget && !p && x(O.relatedTarget);
2789
2791
  }, onBlur: (O) => {
2790
- f && !c?.current?.contains(O.relatedTarget) && x(null);
2792
+ p && !c?.current?.contains(O.relatedTarget) && x(null);
2791
2793
  }, onKeyDown: (O) => {
2792
- f && O.which === Pe.Escape && f.focus();
2794
+ p && O.which === Pe.Escape && p.focus();
2793
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 }) });
2794
2796
  }));
2795
2797
  Ya.displayName = "CommandToolbar";
2796
2798
  const Ga = (e) => {
2797
2799
  const { key: r, ...n } = e;
2798
2800
  return k(Eo, { ...n }, r);
2799
- }, Ps = oe(de((e, r) => {
2800
- const { popupCommandKeys: n, renderCommandButton: t = Ga, scope: s, commands: a, quickCommand: o, popupScope: l = o, commandState: i, commandHook: c, disabled: f = !1, ...x } = e, y = un(a, n ? [o, ...n] : [o]), b = _e((v, m) => {
2801
- const h = { variant: Ae.Menuitem, commandHook: c, commandState: i, scope: l, disabled: f }, p = [];
2802
- for (let u = 0; u < n?.length; u++) {
2803
- const w = n[u];
2804
- if (w === null || w === "-") {
2805
- p.push(k(ri, { orientation: "horizontal" }, `element-${p.length}`));
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, ...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}`));
2806
2816
  continue;
2807
2817
  }
2808
- const E = m.getCommand(w), T = { key: `${w}-${p.length}`, command: E, ...h }, L = t(T);
2809
- L && p.push(L);
2818
+ const L = f.getCommand(T), O = { key: `${T}-${u.length}`, command: L, ...y }, P = t(O);
2819
+ P && u.push(P);
2810
2820
  }
2811
- return hn({ ...v, children: p });
2812
- }, [f, c, i, l, n, t]);
2813
- return n ? k(Mo, { ref: r, commands: a, disabled: f, commandHook: c, commandState: i, scope: s, quickCommand: o, createPopupPanel: b, ...x }) : t({ ref: r, disabled: f, commandHook: c, commandState: i, scope: s, command: y[0], ...x });
2821
+ return hn({ ...h, children: u });
2822
+ }, [p, c, i, l, n, t]);
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 });
2814
2824
  }));
2815
2825
  export {
2816
2826
  vs as $,
@@ -2829,7 +2839,7 @@ export {
2829
2839
  dt as M,
2830
2840
  Ci as N,
2831
2841
  Or as O,
2832
- Ss as P,
2842
+ Ds as P,
2833
2843
  Os as Q,
2834
2844
  ga as R,
2835
2845
  Ii as S,
@@ -2837,7 +2847,7 @@ export {
2837
2847
  Cs as U,
2838
2848
  Es as V,
2839
2849
  $i as W,
2840
- Ds as X,
2850
+ Ss as X,
2841
2851
  gn as Y,
2842
2852
  Gr as Z,
2843
2853
  bs as _,
@@ -2850,7 +2860,7 @@ export {
2850
2860
  Eo as a5,
2851
2861
  Ms as a6,
2852
2862
  Mo as a7,
2853
- Dn as a8,
2863
+ Sn as a8,
2854
2864
  Ts as a9,
2855
2865
  Ya as aa,
2856
2866
  Ps as ab,
@@ -2860,8 +2870,8 @@ export {
2860
2870
  Zr as e,
2861
2871
  ks as f,
2862
2872
  pt as g,
2863
- Di as h,
2864
- Si as i,
2873
+ Si as h,
2874
+ Di as i,
2865
2875
  _n as j,
2866
2876
  ms as k,
2867
2877
  ds as l,