@sheetxl/studio-mui 0.7.21 → 0.7.22

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.
Files changed (41) hide show
  1. package/browser/cjs/{BWS4gFWp8lDPvR9C.cjs → BCSkf7oG5MtK-XGZ.cjs} +1 -1
  2. package/browser/cjs/{7uRpnSJkNHg_E-KO.cjs → BOj9VP_ZCebWTfxc.cjs} +2 -2
  3. package/browser/cjs/{DHwhTAQeNs4slttB.cjs → Biy5SuviR3Cz0S4F.cjs} +2 -2
  4. package/browser/cjs/{rIy1Cx7HX-8zaQjY.cjs → C1PlAY37pY831-YP.cjs} +7 -7
  5. package/browser/cjs/{DbqHWelIXc-F2a9N.cjs → Cc3dH2YOCi1SjPK4.cjs} +1 -1
  6. package/browser/cjs/{DX5ji_lT0Qlqznv7.cjs → Ccx9l-If3BC4K6LY.cjs} +2 -2
  7. package/browser/cjs/{CmSwD6NZAHhOcRi3.cjs → DR8b8OAx9_mnaJoN.cjs} +2 -2
  8. package/browser/cjs/{muTJOFrCXh156rjc.cjs → D_R6KuQiPoJdxVa_.cjs} +1 -1
  9. package/browser/cjs/{saPH3d5fE-ugXp6m.cjs → DkGstRdRpze8sHAr.cjs} +1 -1
  10. package/browser/cjs/{DMOT_ixtKqRvPULq.cjs → StW-maKM8OSYcle5.cjs} +1 -1
  11. package/browser/cjs/index.cjs +2 -2
  12. package/browser/cjs/{B4j_sdzJNzq1ZPbT.cjs → kjlgjQkY0fb-Rc-P.cjs} +1 -1
  13. package/browser/cjs/qoo14c2KOLE_IfIO.cjs +20 -0
  14. package/browser/esm/{C7jHdVMf6Yr4eH_B.mjs → 0OyyoHlgiaso9tYr.mjs} +1 -1
  15. package/browser/esm/{BNmwaUWz2DJqWumP.mjs → BE92YslAajVEiBuX.mjs} +2 -2
  16. package/browser/esm/{BMo7K5LaD7zuDVg9.mjs → BJO2iGA4QZN4Tzfv.mjs} +7 -7
  17. package/browser/esm/{D5XNYGaC4Yw6vCRL.mjs → BQGW_5yvCb0eTpib.mjs} +1 -1
  18. package/browser/esm/{CROTe62QHFVo8YMt.mjs → BYAdBaegvg_SoS6K.mjs} +2 -2
  19. package/browser/esm/{DUzVAMWTrS0u37LX.mjs → BsxSk3HxwjxRtPtZ.mjs} +2 -2
  20. package/browser/esm/{DltuoFr9A-WJccbV.mjs → D-9Ar2kzfZAziktn.mjs} +1 -1
  21. package/browser/esm/{0D8VtNalLeBTB51a.mjs → D4Z_3xY0vO_3FL6K.mjs} +1 -1
  22. package/browser/esm/{mqkuG-TcLS4nn4x0.mjs → DB1mGkEgnMnMQ8CH.mjs} +1229 -1227
  23. package/browser/esm/{aUkJls9HzxnrZSof.mjs → HmzSBdi0ej5oeXZ1.mjs} +1 -1
  24. package/browser/esm/{DtifaYF85GrfJ9_1.mjs → ePSxe_g7wEvzmkJ7.mjs} +1 -1
  25. package/browser/esm/index.mjs +2 -2
  26. package/browser/esm/{Btt4G85L5v01eySb.mjs → pshi0IoaQJ-EyVt3.mjs} +2 -2
  27. package/licenses/dependencies.txt +180 -180
  28. package/node/esm/{oYh6joioOWhFd_R3.mjs → B67HtQl_OohbFhFm.mjs} +1 -1
  29. package/node/esm/{DQnCFz2zJgMwLou_.mjs → BD8iIgRl14sLSdN1.mjs} +1 -1
  30. package/node/esm/{Do7ts-uMkQANfvhq.mjs → BKeEywP27oPbnpFS.mjs} +1 -1
  31. package/node/esm/{DCngEQG4um0yTeoj.mjs → BkQRle53yjTwYnC4.mjs} +28 -28
  32. package/node/esm/{BYjJIMFsheqJcsEI.mjs → Bl77xZWpq8Ix5EEF.mjs} +1 -1
  33. package/node/esm/{CJU8jJhxtR3PEj2I.mjs → C1HBS_UNswHQvckQ.mjs} +1 -1
  34. package/node/esm/{CS0OWM24rZpAGRKU.mjs → C4wnaXAtg_BfPjQR.mjs} +1 -1
  35. package/node/esm/{CACqTiBtxYlo1mu7.mjs → Dhp7eefBNVIcSWf6.mjs} +1 -1
  36. package/node/esm/{D6B7z_d11sd-U1fU.mjs → bp_PxnEExWX_-i_8.mjs} +1 -1
  37. package/node/esm/index.mjs +679 -679
  38. package/node/esm/{CdUceTAldsMTIFnD.mjs → j5ssn9j67ROjzwGT.mjs} +1 -1
  39. package/package.json +8 -8
  40. package/types/index.d.ts +9 -10
  41. package/browser/cjs/B-O26BvbKDImp7pm.cjs +0 -20
@@ -1,17 +1,17 @@
1
- import { Color as ft, IColor as hr, ITheme as yl, CommonUtils as Ct, IBorder as Ce, FontUtils as wl, IFont as _t, NumberFormat as ht, IFontCollection as Sl, IStyle as ce, ITextFrame as vl, Table as Wn, IFill as fn, CoordUtils as Cl, ISheet as Lt, LicenseManager as ko, TypesUtils as kl, Workbook as gr } from "@sheetxl/sdk";
2
- import { StyledStrokePath as Tl, StaticBorderRenderer as jn, useModelListener as je, createCellEditStateFromCell as El, SheetCellEditor as Dl, ScriptEditor as Rl, DefaultTaskPaneRegistry as en, useTaskPaneArea as fa, useDocThemes as ba, TabStrip as Ml, SheetElement as Nl, SheetScrollbar as fr, PictureEditor as Pl, ChartEditor as Fl, EmptyFrame as Ol, LogoNoPaddingIcon as Bl, TaskPaneArea as Al, TaskPaneProvider as Il } from "@sheetxl/react";
1
+ import { Color as ft, IColor as hr, ITheme as yl, CommonUtils as vt, IBorder as ve, FontUtils as wl, IFont as _t, NumberFormat as ht, CoordUtils as Sl, Table as Wn, IFill as fn, ISheet as Lt, LicenseManager as ko, TypesUtils as Cl, IFontCollection as vl, IStyle as ce, ITextFrame as kl, Workbook as gr } from "@sheetxl/sdk";
2
+ import { StyledStrokePath as Tl, StaticBorderRenderer as jn, useModelListener as je, createCellEditStateFromCell as El, SheetCellEditor as Dl, DefaultTaskPaneRegistry as en, ScriptEditor as Rl, useTaskPaneArea as fa, useDocThemes as ba, TabStrip as Ml, SheetElement as Nl, SheetScrollbar as fr, PictureEditor as Pl, ChartEditor as Fl, EmptyFrame as Ol, LogoNoPaddingIcon as Bl, TaskPaneArea as Al, TaskPaneProvider as Il } from "@sheetxl/react";
3
3
  import { jsxs as I, Fragment as ae, jsx as o } from "react/jsx-runtime";
4
- import ne, { memo as U, forwardRef as X, useMemo as L, useCallback as _, isValidElement as $n, useState as V, useEffect as le, Suspense as xa, useRef as xe, createElement as De, useReducer as tn, version as Ll, useLayoutEffect as Tt, useContext as zl, cloneElement as Hl, Component as Wl } from "react";
5
- import { Box as O, Typography as Fe, IconButton as ct, MenuItem as ya, Divider as po, Button as Qo, SvgIcon as wa, Input as Vn, FormControlLabel as At, Checkbox as It, FormControl as _n, TextField as Sa, InputAdornment as jl, Slider as $l, Paper as xt, CircularProgress as Vl, Select as _l, Tabs as va, Tab as Ca, useMediaQuery as ka, Card as Ul, CardActions as Gl, Collapse as ql, DialogTitle as Kl, CssBaseline as Xl } from "@mui/material";
6
- import { CommandButton as B, ExhibitDivider as Q, defaultCreatePopupPanel as ke, CommandPopupButton as Oe, InputCommandButton as Yl, SimpleTooltip as Et, AnimatedLoadingPanel as Po, PopupButtonType as rt, ExhibitPopupIconButton as Dt, ExhibitPopupMenuItem as Un, ExhibitMenuItem as dt, createStrokeShadowFilter as br, strokeShadowFilter as Zl, ExhibitTooltip as at, ExhibitIconButton as bt, CommandTooltip as Gn, SimpleCommandPopupButton as Ke, SelectedIcon as on, LabelIcon as nn, ExhibitMenuHeader as ro, ContextMenu as Ta, ExhibitOptionButton as Ql, hexToRGB as xr, useFloatStack as ao, elevateColor as it, CommandToolbar as rn, renderScrollButtonEdge as Jl, renderScrollButtonEnd as es, renderScrollButtonStart as ts, StackTraceErrorPanel as os, scrollbarTheming as ns, StackTrace as rs, useResolvedThemeMode as Ea, ThemeMode as Pn, useModal as as, useLazyWindow as is, useOptionsDialog as ls, useInputDialog as ss, AnimatedTraversingEllipsisIcon as cs, createExhibitTheme as yr, ModalProvider as ds } from "@sheetxl/utils-mui";
4
+ import ne, { memo as U, forwardRef as X, useMemo as L, useCallback as _, isValidElement as $n, useState as V, useEffect as le, Suspense as xa, useRef as xe, version as Ll, createElement as De, useReducer as tn, useLayoutEffect as Tt, useContext as zl, cloneElement as Hl, Component as Wl } from "react";
5
+ import { Box as O, Typography as Fe, IconButton as ct, MenuItem as ya, Divider as po, Button as Qo, SvgIcon as wa, Input as Vn, FormControl as _n, TextField as Sa, InputAdornment as jl, Slider as $l, Paper as xt, FormControlLabel as At, Checkbox as It, CircularProgress as Vl, Select as _l, Tabs as Ca, Tab as va, useMediaQuery as ka, Card as Ul, CardActions as Kl, Collapse as Gl, DialogTitle as ql, CssBaseline as Xl } from "@mui/material";
6
+ import { CommandButton as B, ExhibitDivider as Q, defaultCreatePopupPanel as ke, CommandPopupButton as Oe, InputCommandButton as Yl, SimpleTooltip as Et, AnimatedLoadingPanel as Po, PopupButtonType as rt, ExhibitPopupIconButton as Dt, ExhibitPopupMenuItem as Un, ExhibitMenuItem as dt, createStrokeShadowFilter as br, strokeShadowFilter as Zl, ExhibitTooltip as at, ExhibitIconButton as bt, CommandTooltip as Kn, SimpleCommandPopupButton as qe, SelectedIcon as on, ExhibitOptionButton as Ql, ExhibitMenuHeader as ro, hexToRGB as xr, useFloatStack as ao, elevateColor as it, CommandToolbar as nn, renderScrollButtonEdge as Jl, renderScrollButtonEnd as es, renderScrollButtonStart as ts, StackTraceErrorPanel as os, scrollbarTheming as ns, LabelIcon as rn, ContextMenu as Ta, StackTrace as rs, useResolvedThemeMode as Ea, ThemeMode as Pn, useModal as as, useLazyWindow as is, useOptionsDialog as ls, useInputDialog as ss, AnimatedTraversingEllipsisIcon as cs, createExhibitTheme as yr, ModalProvider as ds } from "@sheetxl/utils-mui";
7
7
  import { useTheme as Je, alpha as Se, getOverlayAlpha as Be, ThemeProvider as Da } from "@mui/material/styles";
8
- import { useCommands as Ae, CommandButtonType as re, useCallbackRef as Z, ReactUtils as an, KeyCodes as he, DynamicIcon as ye, useCommand as Ut, useMouseDownAndHoldListener as wr, useEditMode as ln, useNotifier as sn, NotifierType as kt, useImperativeElement as Rt, SplitPane as qn, RoundedTab as ps, DefaultDynamicIconService as Kn, SimpleCommand as We, Command as be, KeyModifiers as fe, CommandGroup as Xn, ToolTipPlacement as uo, ScrollPane as us, useUndoManager as ms, DefaultReactNotifier as hs, NotifierProvider as gs, UncaughtErrorBoundary as fs, ReactErrorBoundary as bs } from "@sheetxl/utils-react";
8
+ import { useCommands as Ae, CommandButtonType as re, useCallbackRef as Z, ReactUtils as an, KeyCodes as he, DynamicIcon as ye, useCommand as Ut, useMouseDownAndHoldListener as wr, useEditMode as ln, useNotifier as sn, NotifierType as kt, useImperativeElement as Rt, SplitPane as Gn, DefaultDynamicIconService as qn, RoundedTab as ps, SimpleCommand as We, Command as be, KeyModifiers as fe, CommandGroup as Xn, ToolTipPlacement as uo, ScrollPane as us, useUndoManager as ms, DefaultReactNotifier as hs, NotifierProvider as gs, UncaughtErrorBoundary as fs, ReactErrorBoundary as bs } from "@sheetxl/utils-react";
9
9
  import eo, { createPortal as xs } from "react-dom";
10
10
  import { alpha as tt } from "@mui/system";
11
- import { CommonUtils as Qe, ChainedError as Fn, ErrorUtils as ys, ExpectedError as ws, PartialError as Ss, UndoManager as vs } from "@sheetxl/utils";
11
+ import { CommonUtils as Qe, ChainedError as Fn, ErrorUtils as ys, ExpectedError as ws, PartialError as Ss, UndoManager as Cs } from "@sheetxl/utils";
12
12
  import { IOUtils as to } from "@sheetxl/io";
13
13
  /**
14
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.21
14
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.22
15
15
  *
16
16
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
17
17
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -29,9 +29,9 @@ function Re() {
29
29
  for (var n, a, t = 0, e = "", r = arguments.length; t < r; t++) (n = arguments[t]) && (a = Ra(n)) && (e && (e += " "), e += a);
30
30
  return e;
31
31
  }
32
- const Cs = U(X((n, a) => {
32
+ const vs = U(X((n, a) => {
33
33
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...h } = n, i = Ae(t, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), d = L(() => {
34
- for (let p = 0; p < i.length; p++) if (i[p]?.state()) return i[p];
34
+ for (let p = 0; p < i.length; p++) if (i[p]?.getState()) return i[p];
35
35
  return i[0];
36
36
  }, [i]), g = L(() => {
37
37
  if (!e) return null;
@@ -41,48 +41,48 @@ const Cs = U(X((n, a) => {
41
41
  const u = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, x = I(ae, { children: [o(B, { ...u, command: s.getCommand("formatAlignLeftToggle") }), o(B, { ...u, command: s.getCommand("formatAlignCenterToggle") }), o(B, { ...u, command: s.getCommand("formatAlignRightToggle") }), o(B, { ...u, command: s.getCommand("formatAlignJustifyToggle") }), o(Q, { orientation: "horizontal" }), o(B, { ...u, command: s.getCommand("formatAlignCenterContinuousToggle") }), o(B, { ...u, command: s.getCommand("formatAlignFillToggle") }), o(B, { ...u, command: s.getCommand("formatAlignDistributedHorizontalToggle") })] }), w = I(O, { sx: { className: Re("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (f) => f.stopPropagation(), children: [o(B, { command: s.getCommand("formatIndentDecrease"), commandHook: g, scope: r, disabled: l }), o(B, { command: s.getCommand("formatIndentIncrease"), commandHook: g, scope: r, disabled: l })] }), m = I(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...h, children: [w, o(Q, { orientation: "horizontal" }), o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: x })] });
42
42
  return ke({ ...p, children: m });
43
43
  }, [l, e]);
44
- return o(Oe, { ref: a, parentFloat: c, commands: t, commandHook: e, scope: r, createPopupPanel: b, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d?.key(), icon: d?.icon() ?? "FormatAlignLeft", ...h });
44
+ return o(Oe, { ref: a, parentFloat: c, commands: t, commandHook: e, scope: r, createPopupPanel: b, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d?.getKey(), icon: d?.getIcon() ?? "FormatAlignLeft", ...h });
45
45
  })), ks = U(X((n, a) => {
46
46
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = Ae(t, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), { activeCommand: i, allDisabled: d } = L(() => {
47
47
  const b = h.length;
48
48
  let p, s = 0;
49
49
  for (let u = 0; u < b; u++) {
50
50
  const x = h[u];
51
- x && !x.disabled() && (!p && x?.state() && (p = x), s++);
51
+ x && !x.disabled() && (!p && x?.getState() && (p = x), s++);
52
52
  }
53
53
  return p = p ?? h[0], { activeCommand: p, allDisabled: s === 0 };
54
54
  }, [h]), g = _((b, p) => {
55
55
  const s = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, u = I(ae, { children: [o(B, { ...s, command: p.getCommand("formatAlignTopToggle") }), o(B, { ...s, command: p.getCommand("formatAlignMiddleToggle") }), o(B, { ...s, command: p.getCommand("formatAlignBottomToggle") }), o(Q, { orientation: "horizontal" }), o(B, { ...s, command: p.getCommand("formatAlignJustifyVerticalToggle") }), o(B, { ...s, command: p.getCommand("formatAlignDistributedVerticalToggle") })] });
56
56
  return ke({ ...b, children: u });
57
57
  }, [l, e]);
58
- return o(Oe, { ref: a, commands: t, commandHook: e, createPopupPanel: g, disabled: l || d, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: i?.icon() ?? "TextVerticalBottom", ...c });
58
+ return o(Oe, { ref: a, commands: t, commandHook: e, createPopupPanel: g, disabled: l || d, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: i?.getIcon() ?? "TextVerticalBottom", ...c });
59
59
  })), Ts = U(X((n, a) => {
60
60
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = Ae(t, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), { activeCommand: i, allDisabled: d } = L(() => {
61
61
  const b = h.length;
62
62
  let p, s = 0;
63
63
  for (let u = 0; u < b; u++) {
64
64
  const x = h[u];
65
- x && !x.disabled() && (!p && x?.state() && (p = x), s++);
65
+ x && !x.disabled() && (!p && x?.getState() && (p = x), s++);
66
66
  }
67
67
  return p = p ?? h[0], { activeCommand: p, allDisabled: s === 0 };
68
68
  }, [h]), g = Z((b, p) => {
69
69
  const s = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, u = I(ae, { children: [o(B, { ...s, command: p.getCommand("formatTextOverflowVisibleToggle") }), o(B, { ...s, command: p.getCommand("formatTextOverflowWrapToggle") }), o(B, { ...s, command: p.getCommand("formatTextOverflowClipToggle") }), o(Q, { orientation: "horizontal" }), o(B, { ...s, command: p.getCommand("formatTextOverflowShrinkToggle") })] });
70
70
  return ke({ ...b, children: u });
71
71
  }, [l, e, r]);
72
- return o(Oe, { ref: a, commands: t, commandHook: e, disabled: l || d, scope: r, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: g, icon: i?.icon() ?? "TextHorizontalOverflow", ...c });
72
+ return o(Oe, { ref: a, commands: t, commandHook: e, disabled: l || d, scope: r, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: g, icon: i?.getIcon() ?? "TextHorizontalOverflow", ...c });
73
73
  })), Es = U(X((n, a) => {
74
74
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = Ae(t, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), i = L(() => {
75
75
  const b = h.length;
76
76
  for (let p = 0; p < b; p++) {
77
77
  const s = h[p];
78
- if (s?.state()) return s;
78
+ if (s?.getState()) return s;
79
79
  }
80
80
  return h[1];
81
81
  }, [h]), d = _((b, p) => {
82
82
  const s = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, u = I(ae, { children: [o(B, { ...s, command: p.getCommand("formatTextRotate0") }), o(Q, { orientation: "horizontal" }), o(B, { ...s, command: p.getCommand("formatTextRotate315") }), o(B, { ...s, command: p.getCommand("formatTextRotate45") }), o(B, { ...s, command: p.getCommand("formatTextRotate90") }), o(B, { ...s, command: p.getCommand("formatTextRotate270") }), o(Q, { orientation: "horizontal" }), o(Yl, { ...s, command: p.getCommand("formatTextRotateCustom"), label: "Custom" })] });
83
83
  return ke({ ...b, children: u });
84
- }, [l, e, r, t]), g = L(() => (t.getCommand("formatTextRotateCustom")?.state() ?? 0) !== 0, [h]);
85
- return o(Oe, { ref: a, commands: t, commandHook: e, scope: r, selected: g, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: d, quickCommand: g ? "formatTextRotate0" : "formatTextRotate315", icon: i?.icon() ?? "TextRotation315", ...c });
84
+ }, [l, e, r, t]), g = L(() => (t.getCommand("formatTextRotateCustom")?.getState() ?? 0) !== 0, [h]);
85
+ return o(Oe, { ref: a, commands: t, commandHook: e, scope: r, selected: g, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: d, quickCommand: g ? "formatTextRotate0" : "formatTextRotate315", icon: i?.getIcon() ?? "TextRotation315", ...c });
86
86
  })), Ds = { Preset: "preset", Custom: "custom" }, Do = { Start: "start", End: "end" }, bn = {}, Rs = (n, a, t, e) => {
87
87
  const r = n + "-" + a + "-" + t + (e ? "-server" : "");
88
88
  if (bn[r]) return bn[r];
@@ -100,27 +100,27 @@ const Cs = U(X((n, a) => {
100
100
  }), Ps = U((n) => {
101
101
  const { selectedColor: a, onSelectColor: t, onPreviewColor: e, onClick: r, onKeyDown: l, onMouseOver: c, onMouseLeave: h, onFocus: i, style: d = an.EmptyCssProperties, children: g, alphaWhite: b, alphaGrey: p, darkMode: s, alphaCheckSize: u = 7, ...x } = n;
102
102
  if (!a) throw new Error("a selectedColor is required");
103
- const w = _((v) => {
104
- r?.(v), v.isDefaultPrevented() || (v.ctrlKey ? e?.(a.toRGBA()) : t?.(a.toRGBA()));
105
- }, [t, e, r, a]), m = _((v) => {
106
- c?.(v), v.isDefaultPrevented() || e?.(a.toRGBA());
107
- }, [e, c, a]), f = _((v) => {
108
- h?.(v), v.isDefaultPrevented();
109
- }, [e, h]), y = _((v) => {
110
- i?.(v), v.isDefaultPrevented() || e?.(a.toRGBA());
111
- }, [e, i, a]), C = _((v) => {
112
- l?.(v), v.isDefaultPrevented() || v.keyCode === he.Enter && t?.(a.toRGBA());
103
+ const w = _((C) => {
104
+ r?.(C), C.isDefaultPrevented() || (C.ctrlKey ? e?.(a.toRGBA()) : t?.(a.toRGBA()));
105
+ }, [t, e, r, a]), m = _((C) => {
106
+ c?.(C), C.isDefaultPrevented() || e?.(a.toRGBA());
107
+ }, [e, c, a]), f = _((C) => {
108
+ h?.(C), C.isDefaultPrevented();
109
+ }, [e, h]), y = _((C) => {
110
+ i?.(C), C.isDefaultPrevented() || e?.(a.toRGBA());
111
+ }, [e, i, a]), v = _((C) => {
112
+ l?.(C), C.isDefaultPrevented() || C.keyCode === he.Enter && t?.(a.toRGBA());
113
113
  }, [t, l, a]), S = L(() => a.toRGBA().alpha === 1 ? null : o(Ns, { size: u, white: b, grey: p, style: { position: "absolute", width: "calc(100% - 1.5px)", height: "calc(100% - 1.5px)", top: "0.75px", left: "0.75px" } }), [b, p, a]);
114
- return I("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d }, tabIndex: 0, ...x, onClick: w, onKeyDown: C, onMouseOver: m, onMouseLeave: f, onFocus: y, children: [S, o("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: a.toCSS(s) }, children: g })] });
114
+ return I("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d }, tabIndex: 0, ...x, onClick: w, onKeyDown: v, onMouseOver: m, onMouseLeave: f, onFocus: y, children: [S, o("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: a.toCSS(s) }, children: g })] });
115
115
  }), Yn = U((n) => {
116
116
  const { schemeColorLookup: a, selectedColor: t, previewColor: e, colorDef: r, onSelectColorDef: l, onPreviewColorDef: c, propsSwatch: h, defaultButtonSize: i = 24, isLarge: d = !1, compareRGB: g = !1, darkMode: b = !1, ...p } = n, s = new ft({ val: r.definition.val, adjs: r.definition.adjs }, (S) => a(S)), u = g ? s.toRGBA().toString() : s.toString(), x = t && (g ? t.toRGBA().toString() : t.toString()) === u, w = e && (g ? e.toRGBA().toString() : e.toString()) === u, m = [];
117
117
  m.push({ [hr.AdjustmentType.Inv]: !0 }), m.push({ [hr.AdjustmentType.Alpha]: 100 });
118
118
  const f = s.adjust(m), y = _(() => {
119
119
  l?.(r);
120
- }, [l, r]), C = _((S) => {
120
+ }, [l, r]), v = _((S) => {
121
121
  c?.(S ? r : null);
122
122
  }, [c, r]);
123
- return o(Et, { disableInteractive: !0, PopperProps: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } }, title: r.description, placement: "bottom-start", children: o("div", { style: { width: i * (d ? 1.2 : 1) + "px", height: i * (d ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...p, children: I(Ps, { selectedColor: s, title: null, onSelectColor: y, onPreviewColor: C, alphaCheckSize: d ? 9 : void 0, darkMode: b, ...h, children: [o("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: f.toRGBA(b).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: x ? "1" : "0" } }), o("div", { style: { position: "absolute", width: 0.33 * i * (d ? 1.2 : 1) + "px", height: 0.33 * i * (d ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: f.toRGBA(b).toString(), borderRadius: "50%", opacity: w ? "1" : "0" } })] }) }) });
123
+ return o(Et, { disableInteractive: !0, PopperProps: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } }, title: r.description, placement: "bottom-start", children: o("div", { style: { width: i * (d ? 1.2 : 1) + "px", height: i * (d ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...p, children: I(Ps, { selectedColor: s, title: null, onSelectColor: y, onPreviewColor: v, alphaCheckSize: d ? 9 : void 0, darkMode: b, ...h, children: [o("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: f.toRGBA(b).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: x ? "1" : "0" } }), o("div", { style: { position: "absolute", width: 0.33 * i * (d ? 1.2 : 1) + "px", height: 0.33 * i * (d ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: f.toRGBA(b).toString(), borderRadius: "50%", opacity: w ? "1" : "0" } })] }) }) });
124
124
  }), Io = U((n) => {
125
125
  const { title: a, schemeColorLookup: t, colorDefs: e, selectedColor: r, previewColor: l, onSelectColorDef: c, onPreviewColorDef: h, style: i = an.EmptyCssProperties, compareRGB: d = !1, darkMode: g, propsSwatch: b, ...p } = n;
126
126
  let s;
@@ -136,13 +136,13 @@ const Cs = U(X((n, a) => {
136
136
  }, [h]), w = L(() => {
137
137
  let f = [];
138
138
  for (let y = 0; y < s.length; y++) {
139
- let C = [], S = s[y];
139
+ let v = [], S = s[y];
140
140
  for (let k = 0; k < S.length; k++) {
141
141
  let E = S[k];
142
- C.push(o(Yn, { schemeColorLookup: t, colorDef: E, selectedColor: r, previewColor: l, onSelectColorDef: u, onPreviewColorDef: x, propsSwatch: b, compareRGB: d, darkMode: g }, y + " " + k));
142
+ v.push(o(Yn, { schemeColorLookup: t, colorDef: E, selectedColor: r, previewColor: l, onSelectColorDef: u, onPreviewColorDef: x, propsSwatch: b, compareRGB: d, darkMode: g }, y + " " + k));
143
143
  }
144
- let v = o(O, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (k) => k.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: C }, "" + y);
145
- f.push(v);
144
+ let C = o(O, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (k) => k.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: v }, "" + y);
145
+ f.push(C);
146
146
  }
147
147
  return f;
148
148
  }, [s, r, l, u, x]), m = L(() => a ? o(Fe, { noWrap: !0, component: "div", sx: { display: "flex", flexShrink: "0", paddingLeft: "6px", paddingBottom: "4px", paddingTop: "0px", userSelect: "none", color: (f) => f.palette.text.secondary }, children: a }) : null, [a]);
@@ -154,21 +154,21 @@ const Cs = U(X((n, a) => {
154
154
  r?.set(i, h);
155
155
  const d = h.toRGBA().toString();
156
156
  l?.set(d, h);
157
- }, Fs = ne.lazy(() => import("./DUzVAMWTrS0u37LX.mjs")), Os = U(X((n, a) => {
158
- const { selectedColor: t = null, previewColor: e = n.selectedColor ?? null, recentColors: r, schemeLookup: l, disableAlpha: c = !1, previewDebounceTime: h = 100, initialPanelType: i, defaultButtonSize: d = 24, width: g, onElementLoad: b, onDone: p, onEyeDropStart: s, onEyeDropStop: u, onPreviewColor: x, onPreviewColorImmediate: w, onSelectColor: m, autoColor: f, autoColorLabel: y = "Automatic", autoColorPosition: C = Do.Start, compareRGB: S = !1, darkMode: v = !1, ...k } = n, E = e || t, T = Z(x, [x]), M = Z(w, [w]), R = Z(m, [m]), D = Z(s, [s]), N = Z(u, [u]), [$, F] = V(!1), z = Je(), P = L(() => l || ft.getDefaultSchemeLookup(), [l]), j = L(() => {
159
- const W = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), ve = [];
160
- ze("Primary Background", "bg1", P, ve, W, J), ze("Primary Text", "tx1", P, ve, W, J), ze("Secondary Background", "bg2", P, ve, W, J), ze("Secondary Text", "tx2", P, ve, W, J), ze("Accent 1", "accent1", P, ve, W, J), ze("Accent 2", "accent2", P, ve, W, J), ze("Accent 3", "accent3", P, ve, W, J), ze("Accent 4", "accent4", P, ve, W, J), ze("Accent 5", "accent5", P, ve, W, J), ze("Accent 6", "accent6", P, ve, W, J);
161
- const ge = yl.buildPalette(ve, P, W, J), Ne = [];
157
+ }, Fs = ne.lazy(() => import("./BsxSk3HxwjxRtPtZ.mjs")), Os = U(X((n, a) => {
158
+ const { selectedColor: t = null, previewColor: e = n.selectedColor ?? null, recentColors: r, schemeLookup: l, disableAlpha: c = !1, previewDebounceTime: h = 100, initialPanelType: i, defaultButtonSize: d = 24, width: g, onElementLoad: b, onDone: p, onEyeDropStart: s, onEyeDropStop: u, onPreviewColor: x, onPreviewColorImmediate: w, onSelectColor: m, autoColor: f, autoColorLabel: y = "Automatic", autoColorPosition: v = Do.Start, compareRGB: S = !1, darkMode: C = !1, ...k } = n, E = e || t, T = Z(x, [x]), M = Z(w, [w]), R = Z(m, [m]), D = Z(s, [s]), N = Z(u, [u]), [$, F] = V(!1), z = Je(), P = L(() => l || ft.getDefaultSchemeLookup(), [l]), j = L(() => {
159
+ const W = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), Ce = [];
160
+ ze("Primary Background", "bg1", P, Ce, W, J), ze("Primary Text", "tx1", P, Ce, W, J), ze("Secondary Background", "bg2", P, Ce, W, J), ze("Secondary Text", "tx2", P, Ce, W, J), ze("Accent 1", "accent1", P, Ce, W, J), ze("Accent 2", "accent2", P, Ce, W, J), ze("Accent 3", "accent3", P, Ce, W, J), ze("Accent 4", "accent4", P, Ce, W, J), ze("Accent 5", "accent5", P, Ce, W, J), ze("Accent 6", "accent6", P, Ce, W, J);
161
+ const ge = yl.buildPalette(Ce, P, W, J), Ne = [];
162
162
  if (ze("Dark Red", "C00000", P, Ne, W, J), ze("Red", "FF0000", P, Ne, W, J), ze("Orange", "FFC000", P, Ne, W, J), ze("Yellow", "FFFF00", P, Ne, W, J), ze("Light Green", "92D050", P, Ne, W, J), ze("Green", "00B050", P, Ne, W, J), ze("Light Blue", "00B0F0", P, Ne, W, J), ze("Blue", "0070C0", P, Ne, W, J), ze("Dark Blue", "002060", P, Ne, W, J), c ? ze("Purple Is A Fruit", "7030A0", P, Ne, W, J) : ze("Transparent", "00000000", P, Ne, W, J), f) {
163
163
  const Xe = f.toString();
164
164
  W.set(Xe, f);
165
165
  }
166
- const qe = /* @__PURE__ */ new Map(), Ve = typeof r == "function" ? r() : r, Ze = [];
166
+ const Ge = /* @__PURE__ */ new Map(), Ve = typeof r == "function" ? r() : r, Ze = [];
167
167
  for (let Xe = 0; Ve && Xe < Ve.length; Xe++) {
168
168
  const Ue = Ve[Xe].toString();
169
- qe.set(Ue, Ve[Xe]), Ze.push({ description: "Recent " + (Xe + 1), definition: { val: Ve[Xe].toString() } });
169
+ Ge.set(Ue, Ve[Xe]), Ze.push({ description: "Recent " + (Xe + 1), definition: { val: Ve[Xe].toString() } });
170
170
  }
171
- return { primaryColors: ve, modifiedPresets: ge, standardColors: Ne, recentColorsLimited: Ze, mapAllPresets: W, mapAllPresetsRGB: J, mapRecent: qe };
171
+ return { primaryColors: Ce, modifiedPresets: ge, standardColors: Ne, recentColorsLimited: Ze, mapAllPresets: W, mapAllPresetsRGB: J, mapRecent: Ge };
172
172
  }, [P, r, c, f]);
173
173
  le(() => {
174
174
  b?.();
@@ -181,11 +181,11 @@ const Cs = U(X((n, a) => {
181
181
  else if (t) {
182
182
  let W = t.toString(), J = j.mapAllPresets.get(W);
183
183
  J || (W = t.toRGBA().toString(), J = j.mapAllPresetsRGB.get(W));
184
- const ve = j.mapRecent.get(W);
185
- de(!J && !ve);
184
+ const Ce = j.mapRecent.get(W);
185
+ de(!J && !Ce);
186
186
  }
187
187
  }, [t, i]);
188
- const A = _(Ct.debounce((W) => {
188
+ const A = _(vt.debounce((W) => {
189
189
  T?.(W);
190
190
  }, h), [T, h]), [H, ie] = V();
191
191
  le(() => {
@@ -195,13 +195,13 @@ const Cs = U(X((n, a) => {
195
195
  M && (M(W), A(W));
196
196
  }, [M]), Y = Z((W) => {
197
197
  oe(W ? new ft({ val: W.definition.val, adjs: W.definition.adjs }, P) : null);
198
- }, [P]), G = _((W) => {
198
+ }, [P]), K = _((W) => {
199
199
  W.ctrlKey && de(!0);
200
200
  }, []), pe = Z((W) => {
201
201
  let J = !1;
202
202
  if (W) {
203
- const ve = W.toString();
204
- J = !j.mapAllPresets.has(ve);
203
+ const Ce = W.toString();
204
+ J = !j.mapAllPresets.has(Ce);
205
205
  }
206
206
  R?.(W, J);
207
207
  }, [R, j]), Me = Z((W) => {
@@ -214,33 +214,33 @@ const Cs = U(X((n, a) => {
214
214
  }, [P]), Ie = L(() => window.EyeDropper === void 0 ? o(ae, {}) : o(ct, { "aria-label": "eye dropper", size: "small", sx: { color: (W) => W.palette.text.icon ?? W.palette.action.active }, onClick: async () => {
215
215
  F(!0), D?.(), await new EyeDropper().open().then((W) => {
216
216
  F(!1), N?.();
217
- let J = new ft(W.sRGBHex), ve = J.toString(), ge = j.mapAllPresets.get(ve);
218
- if (ge || (ve = J.toRGBA().toString(), ge = j.mapAllPresetsRGB.get(ve)), !ge) {
219
- const Ne = J.toRGBA(), qe = 3;
217
+ let J = new ft(W.sRGBHex), Ce = J.toString(), ge = j.mapAllPresets.get(Ce);
218
+ if (ge || (Ce = J.toRGBA().toString(), ge = j.mapAllPresetsRGB.get(Ce)), !ge) {
219
+ const Ne = J.toRGBA(), Ge = 3;
220
220
  let Ve = 255;
221
221
  j.mapAllPresetsRGB.forEach((Ze, Xe) => {
222
222
  const Ue = Ze.toRGBA(), ee = Math.abs(Ue.red - Ne.red) + Math.abs(Ue.blue - Ne.blue) + Math.abs(Ue.green - Ne.green);
223
- ee < qe && ee < Ve && (ge = Ze);
223
+ ee < Ge && ee < Ve && (ge = Ze);
224
224
  });
225
225
  }
226
226
  de(!ge), oe(ge || J);
227
227
  }).catch((W) => {
228
228
  F(!1), W?.name !== "AbortError" && console.error(W);
229
229
  });
230
- }, children: o(ye, { iconKey: "Colorize" }) }), [j, v]), me = L(() => {
230
+ }, children: o(ye, { iconKey: "Colorize" }) }), [j, C]), me = L(() => {
231
231
  if (!te) return;
232
232
  const W = { opacity: te ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
233
233
  return o(xa, { fallback: o("div", { style: W, children: o(Po, {}) }), children: o(Fs, { style: W, selectedColor: E ? E.toRGBA().toString() : "transparent", onColorChange: Te, disableAlpha: c }) });
234
- }, [te, E]), ue = L(() => ({ onClick: G, alphaGrey: z.palette.text.icon ?? z.palette.action.active }), [G, z]), q = L(() => {
234
+ }, [te, E]), ue = L(() => ({ onClick: K, alphaGrey: z.palette.text.icon ?? z.palette.action.active }), [K, z]), G = L(() => {
235
235
  if (!f) return null;
236
236
  const W = { description: y, definition: { val: f.getVal(), adjs: f.getAdjustments() } };
237
237
  return o(ae, { children: I(ya, { sx: { display: "flex", color: (J) => J.palette.text.secondary }, onMouseOver: () => {
238
238
  Y(null);
239
239
  }, onClick: () => {
240
240
  Me(null);
241
- }, children: [o(O, { sx: { flex: "none", boxShadow: (J) => J.shadows[2], borderRadius: (J) => J.spacing(0.5), overflow: "hidden" }, children: o(Yn, { schemeColorLookup: P, colorDef: W, selectedColor: t === null ? f : t, previewColor: e === null ? f : e, defaultButtonSize: d, isLarge: !0, darkMode: v, compareRGB: S, propsSwatch: ue }) }), o(Fe, { noWrap: !0, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: y })] }) });
241
+ }, children: [o(O, { sx: { flex: "none", boxShadow: (J) => J.shadows[2], borderRadius: (J) => J.spacing(0.5), overflow: "hidden" }, children: o(Yn, { schemeColorLookup: P, colorDef: W, selectedColor: t === null ? f : t, previewColor: e === null ? f : e, defaultButtonSize: d, isLarge: !0, darkMode: C, compareRGB: S, propsSwatch: ue }) }), o(Fe, { noWrap: !0, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: y })] }) });
242
242
  }, [f, y, P, t, e]);
243
- return I(O, { ref: a, sx: { width: g, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...k, children: [I("div", { style: { position: "relative", display: "flex" }, children: [I("div", { style: { opacity: te ? "0" : 1 }, children: [q && C === Do.Start ? I(ae, { children: [q, o(po, { light: !0, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, o(Io, { title: "Theme Colors", schemeColorLookup: P, colorDefs: j.primaryColors, selectedColor: t, previewColor: e === void 0 ? t : e, propsSwatch: ue, onPreviewColorDef: Y, onSelectColorDef: Me, compareRGB: S, darkMode: v }), o(Io, { schemeColorLookup: P, colorDefs: j.modifiedPresets, selectedColor: t, previewColor: e === void 0 ? t : e, propsSwatch: ue, onPreviewColorDef: Y, onSelectColorDef: Me, compareRGB: S, darkMode: v }), o(po, { light: !0, style: { marginBottom: "10px" } }), o(Io, { title: "Standard Colors", schemeColorLookup: P, colorDefs: j.standardColors, selectedColor: t, previewColor: e === void 0 ? t : e, propsSwatch: ue, onPreviewColorDef: Y, onSelectColorDef: Me, compareRGB: S, darkMode: v }), I("div", { style: { opacity: j.recentColorsLimited.length === 0 ? "0" : void 0, display: j.recentColorsLimited.length === 0 ? "none" : void 0 }, children: [o(po, { light: !0, style: { marginBottom: "10px" } }), o(Io, { title: "Recent Colors", schemeColorLookup: P, colorDefs: j.recentColorsLimited, selectedColor: t, previewColor: e === void 0 ? t : e, propsSwatch: ue, onPreviewColorDef: Y, onSelectColorDef: Me, compareRGB: S, darkMode: v })] }), q && C === Do.End ? I(ae, { children: [o(po, { light: !0, sx: { marginTop: "2px", marginBottom: "2px" } }), q, o("div", { style: { marginBottom: "2px" } })] }) : null] }), me] }), o(po, { light: !0, style: { marginBottom: "10px" } }), I("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [Ie, o("div", { style: { flex: "1 1 100%", background: "pink" } }), o(Qo, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
243
+ return I(O, { ref: a, sx: { width: g, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...k, children: [I("div", { style: { position: "relative", display: "flex" }, children: [I("div", { style: { opacity: te ? "0" : 1 }, children: [G && v === Do.Start ? I(ae, { children: [G, o(po, { light: !0, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, o(Io, { title: "Theme Colors", schemeColorLookup: P, colorDefs: j.primaryColors, selectedColor: t, previewColor: e === void 0 ? t : e, propsSwatch: ue, onPreviewColorDef: Y, onSelectColorDef: Me, compareRGB: S, darkMode: C }), o(Io, { schemeColorLookup: P, colorDefs: j.modifiedPresets, selectedColor: t, previewColor: e === void 0 ? t : e, propsSwatch: ue, onPreviewColorDef: Y, onSelectColorDef: Me, compareRGB: S, darkMode: C }), o(po, { light: !0, style: { marginBottom: "10px" } }), o(Io, { title: "Standard Colors", schemeColorLookup: P, colorDefs: j.standardColors, selectedColor: t, previewColor: e === void 0 ? t : e, propsSwatch: ue, onPreviewColorDef: Y, onSelectColorDef: Me, compareRGB: S, darkMode: C }), I("div", { style: { opacity: j.recentColorsLimited.length === 0 ? "0" : void 0, display: j.recentColorsLimited.length === 0 ? "none" : void 0 }, children: [o(po, { light: !0, style: { marginBottom: "10px" } }), o(Io, { title: "Recent Colors", schemeColorLookup: P, colorDefs: j.recentColorsLimited, selectedColor: t, previewColor: e === void 0 ? t : e, propsSwatch: ue, onPreviewColorDef: Y, onSelectColorDef: Me, compareRGB: S, darkMode: C })] }), G && v === Do.End ? I(ae, { children: [o(po, { light: !0, sx: { marginTop: "2px", marginBottom: "2px" } }), G, o("div", { style: { marginBottom: "2px" } })] }) : null] }), me] }), o(po, { light: !0, style: { marginBottom: "10px" } }), I("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [Ie, o("div", { style: { flex: "1 1 100%", background: "pink" } }), o(Qo, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
244
244
  se();
245
245
  }, children: o("div", te ? { children: "Preset" } : { children: "Custom" }) }), o(Qo, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
246
246
  Promise.resolve(p?.()).then(() => {
@@ -248,16 +248,16 @@ const Cs = U(X((n, a) => {
248
248
  });
249
249
  }, children: "Done" })] })] });
250
250
  })), Bs = o(ye, { iconKey: "circle.colored" }), Ma = U(X((n, a) => {
251
- const { selectedColor: t, quickColor: e, icon: r = Bs, tooltip: l, label: c, onPreviewColor: h, onPreviewColorImmediate: i, onSelectColor: d, variant: g = rt.Toolbar, propsPanel: b, shouldCloseFloatAll: p = !0, compareRGB: s = !1, darkMode: u = !1, ...x } = n, w = Z(h, [h]), m = Z(i, [i]), f = Z(d, [d]), [y, C] = V(() => {
252
- }), S = e || y || t || b?.autoColor, v = xe(!1), k = _(() => {
251
+ const { selectedColor: t, quickColor: e, icon: r = Bs, tooltip: l, label: c, onPreviewColor: h, onPreviewColorImmediate: i, onSelectColor: d, variant: g = rt.Toolbar, propsPanel: b, shouldCloseFloatAll: p = !0, compareRGB: s = !1, darkMode: u = !1, ...x } = n, w = Z(h, [h]), m = Z(i, [i]), f = Z(d, [d]), [y, v] = V(() => {
252
+ }), S = e || y || t || b?.autoColor, C = xe(!1), k = _(() => {
253
253
  }, []), E = Z(() => {
254
- C(t);
254
+ v(t);
255
255
  }, [t]), T = Z((j) => {
256
- v.current || (C(j), w?.(j));
256
+ C.current || (v(j), w?.(j));
257
257
  }, [w]), M = Z((j) => {
258
- v.current || (C(j), m?.(j));
258
+ C.current || (v(j), m?.(j));
259
259
  }, [m]), R = Z((j, te) => {
260
- v.current || (C(void 0), f?.(j, te));
260
+ C.current || (v(void 0), f?.(j, te));
261
261
  }, [f]), D = L(() => o(O, { className: "color-wrapper", sx: { lineHeight: "0", color: "inherit", "--sxl-color-active": `${S?.toCSS(u) ?? "transparent"}`, "& .activeColor": { fill: `${S?.toCSS(u) ?? "transparent"}` }, "& .style_grey": { fill: (j) => j.palette.text.icon ?? j.palette.action.active } }, children: typeof r == "function" ? r() : r }), [S, r, u]), N = Z((j) => {
262
262
  f?.(e, !1);
263
263
  }, [f, e]), [$, F] = V(!1), z = _((j) => {
@@ -272,7 +272,7 @@ const Cs = U(X((n, a) => {
272
272
  return o(wa, { sx: { width: `${t}px`, height: `${e}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (g) => `${a ? a.toRGBA(i).toString() : g.palette.text.icon ?? g.palette.action.active}` }, "& .style_grey": { stroke: (g) => g.palette.text.icon ?? g.palette.action.active }, ...l }, height: e, width: t, viewBox: `0 0 ${t} ${e}`, ...d, children: o(Tl, { length: t, width: e, dashArray: r, isDouble: c, isAngled: h, className: "activeColor" }) });
273
273
  }, As = U(X((n, a) => {
274
274
  const { variant: t, showLabels: e = !1, disabled: r = !1, createPopupPanel: l, styleColor: c, selectedStyle: h, onSelectStyle: i, showNone: d = !0, darkMode: g, sx: b, ...p } = n, s = Z(i, []), u = _((f) => {
275
- const { popupContainer: y, floatReference: C, closeFloat: S, ...v } = f, k = [], E = Ce.BuiltInDefinitionsArray;
275
+ const { popupContainer: y, floatReference: v, closeFloat: S, ...C } = f, k = [], E = ve.BuiltInDefinitionsArray;
276
276
  for (let T = 0; T < E.length; T++) {
277
277
  const M = E[T];
278
278
  if (M.description === "None" && !d) continue;
@@ -282,33 +282,33 @@ const Cs = U(X((n, a) => {
282
282
  S(), s(M.style);
283
283
  }, onKeyDown: (N) => {
284
284
  N.which === he.Enter && S();
285
- }, selected: M.style === h, parentFloat: C, children: D }, T));
285
+ }, selected: M.style === h, parentFloat: v, children: D }, T));
286
286
  }
287
287
  return o(O, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: k });
288
288
  }, [r, d, c, h, g]), x = L(() => {
289
- const f = Ce.BuiltInDefinitions.get(h);
289
+ const f = ve.BuiltInDefinitions.get(h);
290
290
  let y;
291
291
  return y = f.description === "None" ? o(O, { sx: { minWidth: `${Yo}px` }, children: "None" }) : o(Sr, { styleColor: c, length: Yo, width: f.width, dashArray: f.pattern, darkMode: g, isDouble: f.description.toLowerCase().includes("double"), isAngled: f.description.toLowerCase().includes("slant") }), o(O, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: br() } }, children: y });
292
- }, [h, c]), w = L(() => Ce.BuiltInDefinitions.get(h), [h]), m = { disabled: r, icon: x, tooltip: "Border Style: " + w.description, sx: { background: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})`, ...b }, createPopupPanel: u, ...p };
292
+ }, [h, c]), w = L(() => ve.BuiltInDefinitions.get(h), [h]), m = { disabled: r, icon: x, tooltip: "Border Style: " + w.description, sx: { background: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})`, ...b }, createPopupPanel: u, ...p };
293
293
  return t === rt.Toolbar ? o(Dt, { ...m }) : o(Un, { ...m });
294
294
  })), Is = U(X((n, a) => {
295
- const { autoColor: t = null, schemeLookup: e, autoStrokeStyle: r = Ce.StrokeStyle.Thin, disabled: l = !1, darkMode: c = !1, showStylingBefore: h = !0, onSelectBorder: i, onPreviewBorder: d, selectedBorder: g, createTemporaryBorder: b, ...p } = n, s = Z(i, [i]), u = Z(d, [d]), [x, w] = V(), [m, f] = V(), y = x ?? r, C = m ?? t, S = g || { bottom: { style: r, color: t?.toString() } }, v = Z((D) => {
295
+ const { autoColor: t = null, schemeLookup: e, autoStrokeStyle: r = ve.StrokeStyle.Thin, disabled: l = !1, darkMode: c = !1, showStylingBefore: h = !0, onSelectBorder: i, onPreviewBorder: d, selectedBorder: g, createTemporaryBorder: b, ...p } = n, s = Z(i, [i]), u = Z(d, [d]), [x, w] = V(), [m, f] = V(), y = x ?? r, v = m ?? t, S = g || { bottom: { style: r, color: t?.toString() } }, C = Z((D) => {
296
296
  const N = {}, $ = D ? Object.keys(D) : [];
297
297
  let F = !1;
298
298
  const z = $.length;
299
299
  for (let ie = 0; ie < z; ie++) {
300
300
  const oe = $[ie];
301
- D[oe]?.style && (N[oe] = { style: D[oe].style, color: D[oe].color }, F || N[oe].style === Ce.StrokeStyle.None || (F = !0));
301
+ D[oe]?.style && (N[oe] = { style: D[oe].style, color: D[oe].color }, F || N[oe].style === ve.StrokeStyle.None || (F = !0));
302
302
  }
303
303
  $.length < 6 && (F = !0);
304
304
  const P = F ? N.left : null, j = F ? N.top : null, te = F ? N.right : null, de = F ? N.bottom : null, se = F ? N.vertical : null, A = F ? N.horizontal : null;
305
305
  let H = "";
306
306
  return j || P || (H += "M 3,5 H 5 V 3 H 3 "), j || (H += "M 7,5 H 9 V 3 H 7 "), j || se || (H += "M 11,5 h 2 V 3 h -2 "), j || (H += "M 15,5 h 2 V 3 h -2 "), j || te || (H += "M 19,5 h 2 V 3 h -2 "), P || (H += "M 3,9 H 5 V 7 H 3 "), se || (H += "M 11,9 h 2 V 7 h -2 "), te || (H += "M 19,9 h 2 V 7 h -2 "), A || P || (H += "M 3,13 H 5 V 11 H 3 "), A || (H += "M 7,13 H 9 V 11 H 7 "), A || se || (H += "M 11,13 h 2 v -2 h -2 "), A || te || (H += "M 19,13 h 2 v -2 h -2 "), A || (H += "M 15,13 h 2 v -2 h -2 "), P || (H += "M 3,17 H 5 V 15 H 3 "), se || (H += "M 11,17 h 2 v -2 h -2 "), te || (H += "M 19,17 h 2 v -2 h -2 "), de || P || (H += "M 3,21 H 5 V 19 H 3 "), de || (H += "M 7,21 H 9 V 19 H 7 "), de || se || (H += "M 11,21 h 2 v -2 h -2 "), de || (H += "M 15,21 h 2 v -2 h -2 "), de || te || (H += "M 19,21 h 2 v -2 h -2 "), I(ye, { children: [" ", I(O, { className: "border-icon", sx: { width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", position: "relative", "& .grid > path": { opacity: "0.8" } }, children: [o("svg", { viewBox: "0 0 24 24", className: "grid", style: { top: "0px", left: "0px", width: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", height: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", position: "absolute" }, children: o("path", { className: "fill", d: H }) }), o(O, { className: "border-container", sx: { position: "absolute", display: "flex", justifyContent: "stretch", alignItems: "stretch", top: "0px", left: "0px", width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", padding: "1px 1px", "& svg path": { filter: Zl } }, children: o(jn, { getBorderAt: (ie, oe) => {
307
307
  if (!b || $.length === 0) return null;
308
- const Y = ie.rowIndex, G = ie.colIndex, pe = {};
309
- return Y === 0 ? (pe.top = N.top, pe.bottom = N.horizontal) : (pe.top = N.horizontal, pe.bottom = N.bottom), G === 0 ? (pe.left = N.left, pe.right = N.vertical) : (pe.left = N.vertical, pe.right = N.right), b?.(pe);
308
+ const Y = ie.rowIndex, K = ie.colIndex, pe = {};
309
+ return Y === 0 ? (pe.top = N.top, pe.bottom = N.horizontal) : (pe.top = N.horizontal, pe.bottom = N.bottom), K === 0 ? (pe.left = N.left, pe.right = N.vertical) : (pe.left = N.vertical, pe.right = N.right), b?.(pe);
310
310
  }, darkMode: c, style: { top: "2px", left: "2px", width: "calc(100% - 5px)", height: "calc(100% - 5px)", position: "absolute" } }) })] })] });
311
- }, [C, y, c]), k = _((D, N, $) => {
311
+ }, [v, y, c]), k = _((D, N, $) => {
312
312
  let F = null;
313
313
  if (D && D.length > 0) {
314
314
  let z = null;
@@ -323,29 +323,29 @@ const Cs = U(X((n, a) => {
323
323
  u?.(D);
324
324
  }, []), M = _((D) => {
325
325
  const { closeFloatAll: N, floatReference: $ } = D, F = (j, te, de = "bottom", se = !1) => {
326
- const A = k(j, C ?? null, se ? Ce.StrokeStyle.None : y ?? null), H = se ? k([], C ?? null, y ?? null) : A;
327
- return o(bt, { icon: v(H), sx: { background: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})` }, propsTooltip: { label: te, simple: !0, placement: de }, onClick: () => {
326
+ const A = k(j, v ?? null, se ? ve.StrokeStyle.None : y ?? null), H = se ? k([], v ?? null, y ?? null) : A;
327
+ return o(bt, { icon: C(H), sx: { background: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})` }, propsTooltip: { label: te, simple: !0, placement: de }, onClick: () => {
328
328
  N(), T(A), E(A);
329
329
  } });
330
- }, z = I(ae, { children: [I(O, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [F([Ce.Edge.Left, Ce.Edge.Top, Ce.Edge.Right, Ce.Edge.Bottom, Ce.Edge.Horizontal, Ce.Edge.Vertical], "All Borders", "top"), F([Ce.Edge.Horizontal, Ce.Edge.Vertical], "Inner Borders", "top"), F([Ce.Edge.Horizontal], "Inside Horizontal Borders", "top"), F([Ce.Edge.Vertical], "Inside Vertical Borders", "top"), F([Ce.Edge.Left, Ce.Edge.Top, Ce.Edge.Right, Ce.Edge.Bottom], "Outside Borders", "top")] }), I(O, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [F([Ce.Edge.Left], "Left Borders"), F([Ce.Edge.Top], "Top Borders"), F([Ce.Edge.Right], "Right Borders"), F([Ce.Edge.Bottom], "Bottom Borders"), F([Ce.Edge.Left, Ce.Edge.Top, Ce.Edge.Right, Ce.Edge.Bottom, Ce.Edge.Horizontal, Ce.Edge.Vertical, Ce.Edge.DiagonalUp, Ce.Edge.DiagonalDown], "No Borders", "bottom", !0)] })] }), P = o(ae, { children: I(O, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [o(Ma, { variant: rt.Toolbar, icon: o(ye, { iconKey: "stroke.colored" }), selectedColor: y === Ce.StrokeStyle.None ? new ft("transparent") : C, onPreviewColor: (j) => {
330
+ }, z = I(ae, { children: [I(O, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [F([ve.Edge.Left, ve.Edge.Top, ve.Edge.Right, ve.Edge.Bottom, ve.Edge.Horizontal, ve.Edge.Vertical], "All Borders", "top"), F([ve.Edge.Horizontal, ve.Edge.Vertical], "Inner Borders", "top"), F([ve.Edge.Horizontal], "Inside Horizontal Borders", "top"), F([ve.Edge.Vertical], "Inside Vertical Borders", "top"), F([ve.Edge.Left, ve.Edge.Top, ve.Edge.Right, ve.Edge.Bottom], "Outside Borders", "top")] }), I(O, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [F([ve.Edge.Left], "Left Borders"), F([ve.Edge.Top], "Top Borders"), F([ve.Edge.Right], "Right Borders"), F([ve.Edge.Bottom], "Bottom Borders"), F([ve.Edge.Left, ve.Edge.Top, ve.Edge.Right, ve.Edge.Bottom, ve.Edge.Horizontal, ve.Edge.Vertical, ve.Edge.DiagonalUp, ve.Edge.DiagonalDown], "No Borders", "bottom", !0)] })] }), P = o(ae, { children: I(O, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [o(Ma, { variant: rt.Toolbar, icon: o(ye, { iconKey: "stroke.colored" }), selectedColor: y === ve.StrokeStyle.None ? new ft("transparent") : v, onPreviewColor: (j) => {
331
331
  f(j);
332
332
  }, onSelectColor: (j, te) => {
333
333
  f(j);
334
- }, darkMode: c, tooltip: "Border Color", propsPanel: { disableAlpha: !0, autoColor: t, schemeLookup: e }, disabled: l || y === Ce.StrokeStyle.None, parentFloat: $, shouldCloseFloatAll: !1 }), o(As, { selectedStyle: y, onSelectStyle: w, styleColor: C, darkMode: c, variant: rt.Toolbar, parentFloat: $ })] }) });
334
+ }, darkMode: c, tooltip: "Border Color", propsPanel: { disableAlpha: !0, autoColor: t, schemeLookup: e }, disabled: l || y === ve.StrokeStyle.None, parentFloat: $, shouldCloseFloatAll: !1 }), o(As, { selectedStyle: y, onSelectStyle: w, styleColor: v, darkMode: c, variant: rt.Toolbar, parentFloat: $ })] }) });
335
335
  return I(O, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (j) => j.stopPropagation(), children: [h ? P : z, o(Q, { orientation: "horizontal" }), h ? z : P] });
336
- }, [y, C, t, e, c]), R = L(() => v(S), [S, c]);
336
+ }, [y, v, t, e, c]), R = L(() => C(S), [S, c]);
337
337
  return o(Dt, { ref: a, createPopupPanel: M, propsPopup: { propsPopper: { resizeOnOverflow: !1 } }, createTooltip: ({ children: D }, N) => o(at, { label: "Borders", description: "Set the borders.", disabled: N, children: D }), onQuickClick: () => {
338
338
  s?.(S);
339
339
  }, disabled: l, icon: R, ...p });
340
340
  })), Ls = U(X((n, a) => {
341
- const { commands: t, command: e, commandHook: r, variant: l = re.Toolbar, disabled: c = !1, autoColor: h, autoStrokeStyle: i, schemeLookup: d, createTemporaryBorder: g, selectedBorder: b, onSelectBorder: p, darkMode: s, icon: u, label: x, ...w } = n, m = Ae(t, ["formatBorder"]), f = e ?? m[0], y = f?.context() ?? null, C = y?.autoColor ?? h, S = y?.autoStyle ?? i, v = b ?? y?.quickBorder, k = s ?? y?.darkMode, E = g ?? y?.createTemporaryBorder, T = d ?? y?.schemeLookup, M = Z((D) => {
341
+ const { commands: t, command: e, commandHook: r, variant: l = re.Toolbar, disabled: c = !1, autoColor: h, autoStrokeStyle: i, schemeLookup: d, createTemporaryBorder: g, selectedBorder: b, onSelectBorder: p, darkMode: s, icon: u, label: x, ...w } = n, m = Ae(t, ["formatBorder"]), f = e ?? m[0], y = f?.getContext() ?? null, v = y?.autoColor ?? h, S = y?.autoStyle ?? i, C = b ?? y?.quickBorder, k = s ?? y?.darkMode, E = g ?? y?.createTemporaryBorder, T = d ?? y?.schemeLookup, M = Z((D) => {
342
342
  y?.onBorderSelect && y.onBorderSelect(D), p?.(D), f?.execute(D, r);
343
343
  }, [f, p, r]), R = _((D, N) => {
344
344
  const { children: $, title: F, ...z } = D;
345
345
  let P = D.children;
346
- return (f?.disabled() || c) && (P = o("div", { children: P })), o(Gn, { command: f, placement: l === re.Toolbar ? "bottom-start" : "right-start", disabled: N, ...z, children: P });
346
+ return (f?.disabled() || c) && (P = o("div", { children: P })), o(Kn, { command: f, placement: l === re.Toolbar ? "bottom-start" : "right-start", disabled: N, ...z, children: P });
347
347
  }, [f, c]);
348
- return o(Is, { ref: a, autoColor: C, darkMode: k, autoStrokeStyle: S, createTemporaryBorder: E, schemeLookup: T, selectedBorder: v, onSelectBorder: M, createTooltip: R, disabled: c || !f || f.disabled(), ...w });
348
+ return o(Is, { ref: a, autoColor: v, darkMode: k, autoStrokeStyle: S, createTemporaryBorder: E, schemeLookup: T, selectedBorder: C, onSelectBorder: M, createTooltip: R, disabled: c || !f || f.disabled(), ...w });
349
349
  })), zs = U(X((n, a) => {
350
350
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = _((i, d) => {
351
351
  const g = { variant: re.Menuitem, commandHook: e, scope: r, disabled: l }, b = I(ae, { children: [o(B, { ...g, command: d.getCommand("mergeToggle") }), o(B, { ...g, command: d.getCommand("mergeHorizontal") }), o(B, { ...g, command: d.getCommand("mergeVertical") }), o(Q, { orientation: "horizontal" }), o(B, { ...g, command: d.getCommand("unmerge") })] });
@@ -358,21 +358,21 @@ const Cs = U(X((n, a) => {
358
358
  return ke({ ...i, children: b });
359
359
  }, [l, e, r]);
360
360
  return o(Oe, { ref: a, commands: t, commandHook: e, createPopupPanel: h, quickCommand: "freezeToggle", label: "Freeze Panes", tooltip: "Freeze a portion of the sheet to keep it visible while you scroll through the rest of the sheet.\\n\\nUseful for viewing data in other parts of your worksheet without losing your headers or labels.", icon: "Freeze", ...c });
361
- })), Ws = U(X((n, a) => o(Ke, { ref: a, ...n, popupCommandKeys: ["find", "findReplace", "goto"], scope: "find", label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find" }))), js = U(X((n, a) => {
361
+ })), Ws = U(X((n, a) => o(qe, { ref: a, ...n, popupCommandKeys: ["find", "findReplace", "goto"], scope: "find", label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find" }))), js = U(X((n, a) => {
362
362
  const { command: t, commandHook: e, showQuickButtons: r = !!n.commands, commands: l, fontSizes: c = wl.DefaultFontSizes, disabled: h = !1, parentFloat: i, icon: d, label: g, sx: b, ...p } = n;
363
363
  Ut(t);
364
- const s = () => t?.state()?.toString() || "11", [u, x] = V(s), w = Z(() => {
364
+ const s = () => t?.getState()?.toString() || "11", [u, x] = V(s), w = Z(() => {
365
365
  const E = parseFloat(u);
366
366
  isNaN(E) ? x(s()) : parseFloat(s()) !== E && t.execute(E, e);
367
367
  }, [s, t, u, e]);
368
368
  le(() => {
369
369
  x(s());
370
- }, [t?.state()]);
370
+ }, [t?.getState()]);
371
371
  const m = L(() => {
372
372
  if (!e) return null;
373
373
  const E = { ...e };
374
374
  return delete E.beforeExecute, E;
375
- }, [e]), f = Ae(l, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), y = L(() => f ? I(O, { className: Re("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (E) => E.stopPropagation(), children: [o(B, { command: f[0], commandHook: m }), o(B, { command: f[1], commandHook: m })] }) : null, [f]), C = Je(), S = L(() => `${_t.getSharedMeasurer()("12.3", Math.round(C.typography.fontSize), C.typography.fontFamily).width}px`, [C]), v = _((E) => {
375
+ }, [e]), f = Ae(l, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), y = L(() => f ? I(O, { className: Re("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (E) => E.stopPropagation(), children: [o(B, { command: f[0], commandHook: m }), o(B, { command: f[1], commandHook: m })] }) : null, [f]), v = Je(), S = L(() => `${_t.getSharedMeasurer()("12.3", Math.round(v.typography.fontSize), v.typography.fontFamily).width}px`, [v]), C = _((E) => {
376
376
  const { onMouseDown: T, onMouseUp: M, ...R } = E;
377
377
  return o(ct, { component: "div", ...R, disableRipple: !0, children: o(Vn, { inputMode: "numeric", disabled: h || !t || t.disabled(), inputProps: { name: "font-input", autoComplete: "off", tabIndex: 0, type: "number", maxLength: 4, max: 409, min: 2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (D) => `1px solid ${D.palette.text.icon ?? D.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (D) => `1px solid ${D.palette.error.main}` }, "::after": { borderBottom: (D) => `1px solid ${D.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (D) => `${Math.round(D.typography.fontSize)}px`, width: S, color: (D) => D.palette.text.secondary, input: { padding: "0 0", textAlign: "center", height: "1rem", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (D) => D.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (D) => D.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" } }, value: u, onFocus: (D) => {
378
378
  D.target?.select();
@@ -394,7 +394,7 @@ const Cs = U(X((n, a) => {
394
394
  }, [u, h, t]), k = _((E) => {
395
395
  const T = (N) => {
396
396
  t?.execute(N, e);
397
- }, M = t?.state(), R = [];
397
+ }, M = t?.getState(), R = [];
398
398
  for (let N = 0; N < c.length; N++) {
399
399
  const $ = c[N] === M;
400
400
  R.push(o(dt, { selected: $, icon: $ ? o(on, {}) : void 0, disabled: h || !t || t.disabled(), onMouseDown: (F) => {
@@ -407,9 +407,9 @@ const Cs = U(X((n, a) => {
407
407
  }
408
408
  const D = I(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...p, children: [y, o(Q, { orientation: "horizontal" }), o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: R })] });
409
409
  return ke({ ...E, children: D });
410
- }, [h, t?.state(), e]);
411
- return o(Dt, { ref: a, sx: { ...b }, tabIndex: -1, outlined: !0, disabled: h, parentFloat: i, createPopupPanel: k, createTooltip: ({ children: E }, T) => o(at, { label: t?.label(), description: t?.description(), disabled: T || t?.disabled(), children: E }), renderQuickButton: v, ...p });
412
- })), vr = U((n) => {
410
+ }, [h, t?.getState(), e]);
411
+ return o(Dt, { ref: a, sx: { ...b }, tabIndex: -1, outlined: !0, disabled: h, parentFloat: i, createPopupPanel: k, createTooltip: ({ children: E }, T) => o(at, { label: t?.getLabel(), description: t?.getDescription(), disabled: T || t?.disabled(), children: E }), renderQuickButton: C, ...p });
412
+ })), Cr = U((n) => {
413
413
  const { selected: a, disabled: t, formattedValue: e, handleSetFormat: r, format: l, sx: c, ...h } = n;
414
414
  return o(dt, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...c }, disabled: t, selected: a, icon: a ? o(on, {}) : void 0, onMouseDown: (i) => {
415
415
  i.button === 0 && i.preventDefault();
@@ -419,14 +419,14 @@ const Cs = U(X((n, a) => {
419
419
  i.keyCode !== he.Enter && i.keyCode !== he.Space || r(l.numberFormat);
420
420
  }, ...h, children: I(O, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [I(Fe, { component: "div", children: [l.formatType, l.formatType === ht.Type.Custom ? "…" : ""] }), o(Fe, { variant: "caption", component: "div", sx: { color: (i) => tt(i.palette.text.primary, 0.6), paddingTop: e && e.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: e && e.length > 0 ? e : " " })] }) });
421
421
  }), $s = U(X((n, a) => {
422
- const { commands: t, commandHook: e, scope: r, sx: l, disabled: c = !1, parentFloat: h, ...i } = n, d = Ae(t, ["formatNumberFormat"])[0], g = d?.state() ? ht.Styles.lookupStyle(d?.state()).formatType : ht.Type.General, b = L(() => {
422
+ const { commands: t, commandHook: e, scope: r, sx: l, disabled: c = !1, parentFloat: h, ...i } = n, d = Ae(t, ["formatNumberFormat"])[0], g = d?.getState() ? ht.Styles.lookupStyle(d?.getState()).formatType : ht.Type.General, b = L(() => {
423
423
  if (!e) return null;
424
424
  const x = { ...e };
425
425
  return delete x.beforeExecute, x;
426
426
  }, [e]), p = _((x, w) => {
427
427
  const m = (M) => {
428
- e?.beforeExecute?.(d, d?.state()), d.execute(M, e), e?.onExecute?.(d, d?.state());
429
- }, f = d?.context()(), y = ht.Styles.lookupPrimary(), C = [];
428
+ e?.beforeExecute?.(d, d?.getState()), d.execute(M, e), e?.onExecute?.(d, d?.getState());
429
+ }, f = d?.getContext()(), y = ht.Styles.lookupPrimary(), v = [];
430
430
  for (let M = 0; M < y.length; M++) {
431
431
  let R = "";
432
432
  if (f && !f.isEmpty()) try {
@@ -436,34 +436,34 @@ const Cs = U(X((n, a) => {
436
436
  }
437
437
  R === "" && y[M].formatType === ht.Type.General && (R = "No specific format");
438
438
  const D = y[M].formatType === g;
439
- C.push(o(vr, { selected: D, disabled: c || !d || d.disabled(), formattedValue: R, handleSetFormat: m, format: y[M] }, y[M].formatType));
439
+ v.push(o(Cr, { selected: D, disabled: c || !d || d.disabled(), formattedValue: R, handleSetFormat: m, format: y[M] }, y[M].formatType));
440
440
  }
441
- const S = { numberFormat: "", formatType: ht.Type.Custom }, v = g === ht.Type.Custom, k = o(vr, { selected: v, disabled: c || !d || d.disabled(), formattedValue: v ? f.getNumberFormat().displayText : "", handleSetFormat: () => {
442
- e?.beforeExecute?.(d, d?.state()), w.getCommand("formatNumberDialog")?.execute(d?.state()), e?.onExecute?.(d, d?.state());
443
- }, format: S, sx: { flex: "0", width: "100%" } }, ht.Type.Custom), E = I(O, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (M) => M.stopPropagation(), children: [o(B, { command: w.getCommand("formatNumberFormatAccountingStyle"), commandHook: b, scope: r }), o(B, { command: w.getCommand("formatNumberFormatPercentStyle"), commandHook: b, scope: r }), o(B, { command: w.getCommand("formatNumberFormatCommaStyle"), commandHook: b, scope: r }), o(B, { command: w.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: b, scope: r }), o(B, { command: w.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: b, scope: r })] }), T = I(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i, children: [E, o(Q, { orientation: "horizontal" }), o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: C }), o(Q, { orientation: "horizontal" }), k] });
441
+ const S = { numberFormat: "", formatType: ht.Type.Custom }, C = g === ht.Type.Custom, k = o(Cr, { selected: C, disabled: c || !d || d.disabled(), formattedValue: C ? f.getNumberFormat().displayText : "", handleSetFormat: () => {
442
+ e?.beforeExecute?.(d, d?.getState()), w.getCommand("formatNumberDialog")?.execute(d?.getState()), e?.onExecute?.(d, d?.getState());
443
+ }, format: S, sx: { flex: "0", width: "100%" } }, ht.Type.Custom), E = I(O, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (M) => M.stopPropagation(), children: [o(B, { command: w.getCommand("formatNumberFormatAccountingStyle"), commandHook: b, scope: r }), o(B, { command: w.getCommand("formatNumberFormatPercentStyle"), commandHook: b, scope: r }), o(B, { command: w.getCommand("formatNumberFormatCommaStyle"), commandHook: b, scope: r }), o(B, { command: w.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: b, scope: r }), o(B, { command: w.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: b, scope: r })] }), T = I(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i, children: [E, o(Q, { orientation: "horizontal" }), o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: v }), o(Q, { orientation: "horizontal" }), k] });
444
444
  return ke({ ...x, children: T });
445
- }, [d?.context(), d?.state(), e, r]), s = Je(), u = L(() => {
445
+ }, [d?.getContext(), d?.getState(), e, r]), s = Je(), u = L(() => {
446
446
  const x = ht.Type.MediumTime;
447
447
  return `${_t.getSharedMeasurer()(x, Math.round(s.typography.fontSize), s.typography.fontFamily).width}px`;
448
448
  }, [s]);
449
- return o(Oe, { ref: a, commands: t, sx: l, outlined: !0, disabled: c, parentFloat: h, createPopupPanel: p, createTooltip: ({ children: x }, w) => o(at, { label: d?.label(), description: d?.description(), disabled: w, children: x }), icon: o(O, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (x) => `${Math.round(x.typography.fontSize)}px`, color: (x) => x.palette.text.secondary, fontFamily: (x) => x.typography.fontFamily, width: u }, children: o(O, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: g }) }), ...i });
450
- })), Na = U(X((n, a) => o(Ke, { ref: a, ...n, popupCommandKeys: ["clearAll", "clearFormats", "clearContents", "clearComments", "clearHyperlinks"], scope: "clear", label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", icon: "ClearAll" }))), Vs = U(X((n, a) => o(Ke, { ref: a, ...n, popupCommandKeys: ["fillDown", "fillRight", "fillUp", "fillLeft"], scope: "fill", label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", icon: "FillDown" }))), Pa = U(X((n, a) => {
449
+ return o(Oe, { ref: a, commands: t, sx: l, outlined: !0, disabled: c, parentFloat: h, createPopupPanel: p, createTooltip: ({ children: x }, w) => o(at, { label: d?.getLabel(), description: d?.getDescription(), disabled: w, children: x }), icon: o(O, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (x) => `${Math.round(x.typography.fontSize)}px`, color: (x) => x.palette.text.secondary, fontFamily: (x) => x.typography.fontFamily, width: u }, children: o(O, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: g }) }), ...i });
450
+ })), Na = U(X((n, a) => o(qe, { ref: a, ...n, popupCommandKeys: ["clearAll", "clearFormats", "clearContents", "clearComments", "clearHyperlinks"], scope: "clear", label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", icon: "ClearAll" }))), Vs = U(X((n, a) => o(qe, { ref: a, ...n, popupCommandKeys: ["fillDown", "fillRight", "fillUp", "fillLeft"], scope: "fill", label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", icon: "FillDown" }))), Pa = U(X((n, a) => {
451
451
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, disableSheet: c = !1, preferSingleMenu: h = !0, showQuickButton: i = !0, variant: d = re.Toolbar, ...g } = n, b = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns", "addSheet"];
452
452
  c || b.push("addSheet");
453
453
  const p = Ae(t, b), { singleCommand: s, allDisabled: u } = L(() => {
454
454
  let w = null, m = 0;
455
455
  const f = p.length;
456
456
  for (let y = 0; y < f; y++) {
457
- const C = p[y];
458
- C && !C.disabled() && (h && d === re.Menuitem && (w = m === 0 ? C : null), m++);
457
+ const v = p[y];
458
+ v && !v.disabled() && (h && d === re.Menuitem && (w = m === 0 ? v : null), m++);
459
459
  }
460
460
  return { singleCommand: w, allDisabled: m === 0 };
461
461
  }, [p]), x = _((w, m) => {
462
462
  let f = null;
463
463
  const y = { variant: re.Menuitem, commandHook: e, scope: "insertCells", disabled: l };
464
464
  c || (f = I(ae, { children: [o(Q, { orientation: "horizontal" }), o(B, { ...y, command: m.getCommand("addSheet") })] }));
465
- const C = I(ae, { children: [o(B, { ...y, command: p[0] }), o(B, { ...y, command: p[1] }), o(Q, { orientation: "horizontal" }), o(B, { ...y, command: p[2] }), o(B, { ...y, command: p[3] }), f] });
466
- return ke({ ...w, children: C });
465
+ const v = I(ae, { children: [o(B, { ...y, command: p[0] }), o(B, { ...y, command: p[1] }), o(Q, { orientation: "horizontal" }), o(B, { ...y, command: p[2] }), o(B, { ...y, command: p[3] }), f] });
466
+ return ke({ ...w, children: v });
467
467
  }, [l, p, e, r]);
468
468
  return s ? o(B, { ref: a, variant: d, commandHook: e, disabled: l, command: s, ...g }) : o(Oe, { ref: a, variant: d, quickCommand: "insertCells", commands: t, commandHook: e, scope: r, disabled: l || u, tooltip: I(ae, { children: [o("span", { children: "Insert new cells, rows or columns to your workbook." }), o("br", {}), o("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: x, ...g });
469
469
  })), Fa = U(X((n, a) => {
@@ -473,16 +473,16 @@ const Cs = U(X((n, a) => {
473
473
  let w = null, m = 0;
474
474
  const f = p.length;
475
475
  for (let y = 0; y < f; y++) {
476
- const C = p[y];
477
- C && !C.disabled() && (h && d === re.Menuitem && (w = m === 0 ? C : null), m++);
476
+ const v = p[y];
477
+ v && !v.disabled() && (h && d === re.Menuitem && (w = m === 0 ? v : null), m++);
478
478
  }
479
479
  return { singleCommand: w, allDisabled: m === 0 };
480
480
  }, [p]), x = _((w, m) => {
481
481
  const f = { variant: re.Menuitem, commandHook: e, scope: "deleteCells", disabled: l };
482
482
  let y = null;
483
483
  c || (y = I(ae, { children: [o(Q, { orientation: "horizontal" }), o(B, { ...f, command: m.getCommand("deleteSheet") })] }));
484
- const C = I(ae, { children: [o(B, { ...f, command: m.getCommand("deleteCellsShiftUp") }), o(B, { ...f, command: m.getCommand("deleteCellsShiftLeft") }), o(Q, { orientation: "horizontal" }), o(B, { ...f, command: m.getCommand("deleteRows") }), o(B, { ...f, command: m.getCommand("deleteColumns") }), y] });
485
- return ke({ ...w, children: C });
484
+ const v = I(ae, { children: [o(B, { ...f, command: m.getCommand("deleteCellsShiftUp") }), o(B, { ...f, command: m.getCommand("deleteCellsShiftLeft") }), o(Q, { orientation: "horizontal" }), o(B, { ...f, command: m.getCommand("deleteRows") }), o(B, { ...f, command: m.getCommand("deleteColumns") }), y] });
485
+ return ke({ ...w, children: v });
486
486
  }, [l, e, r]);
487
487
  return s ? o(B, { ref: a, variant: d, commandHook: e, disabled: l, command: s, ...g }) : o(Oe, { ref: a, variant: d, quickCommand: "deleteCells", commands: t, commandHook: e, scope: r, disabled: l || u, tooltip: I(ae, { children: [o("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), o("br", {}), o("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: x, ...g });
488
488
  })), Oa = U(X((n, a) => {
@@ -495,348 +495,22 @@ const Cs = U(X((n, a) => {
495
495
  }
496
496
  return { allDisabled: g === 0 };
497
497
  }, [h]), d = _((g, b) => {
498
- const p = { variant: re.Menuitem, commandHook: e, scope: "formatCells" }, s = { commands: b, parentFloat: g.floatReference, ...p }, u = I(ae, { children: [o(B, { ...p, command: b.getCommand("resizeRows") }), o(B, { ...p, command: b.getCommand("autoFitRows") }), o(Q, { orientation: "horizontal" }), o(B, { ...p, command: b.getCommand("resizeColumns") }), o(B, { ...p, command: b.getCommand("autoFitColumns") }), o(Q, { orientation: "horizontal" }), o(Ke, { ref: a, ...s, popupCommandKeys: ["hideColumns", "hideRows", null, "unhideColumns", "unhideRows"], popupScope: "hideUnhide", label: "Hide & Unhide" })] });
498
+ const p = { variant: re.Menuitem, commandHook: e, scope: "formatCells" }, s = { commands: b, parentFloat: g.floatReference, ...p }, u = I(ae, { children: [o(B, { ...p, command: b.getCommand("resizeRows") }), o(B, { ...p, command: b.getCommand("autoFitRows") }), o(Q, { orientation: "horizontal" }), o(B, { ...p, command: b.getCommand("resizeColumns") }), o(B, { ...p, command: b.getCommand("autoFitColumns") }), o(Q, { orientation: "horizontal" }), o(qe, { ref: a, ...s, popupCommandKeys: ["hideColumns", "hideRows", null, "unhideColumns", "unhideRows"], popupScope: "hideUnhide", label: "Hide & Unhide" })] });
499
499
  return ke({ ...g, children: u });
500
500
  }, [e, r]);
501
501
  return o(Oe, { ref: a, commands: t, commandHook: e, scope: r, createPopupPanel: d, disabled: l || i, icon: "CellsFormat", label: "Format Cells", tooltip: "Change row and column sizes or visibility.", ...c });
502
502
  }));
503
503
  Oa.displayName = "CellsFormatCommandButton";
504
- const Mo = U(X((n, a) => {
505
- const { command: t, commandHook: e, onSelectColor: r, disabled: l = !1, variant: c = re.Toolbar, quickColor: h, propsPanel: i, isSplit: d = !1, darkMode: g, icon: b, ...p } = n, { autoColor: s, schemeLookup: u, recentColors: x, ...w } = i;
506
- if (p.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
507
- Ut(t);
508
- const m = t?.context();
509
- let f = h ?? m?.quickColor;
510
- d && !f && (f = new ft("transparent"));
511
- const y = s ?? m?.autoColor, C = u ?? m?.schemeLookup, S = x ?? m?.recentColors, v = g ?? m?.darkMode, k = L(() => ({ autoColor: y, schemeLookup: C, recentColors: S, darkMode: v, ...w }), [y, C, S, v]), E = Z((M, R) => {
512
- M && R && m?.addRecentColor && m.addRecentColor(M), m?.onColorSelect && m.onColorSelect(M), r?.(M, R), t?.execute(M, e);
513
- }, [t, r, e, m]), T = _((M, R) => {
514
- const { children: D, title: N, ...$ } = M;
515
- let F = M.children;
516
- return (t?.disabled() || l) && (F = o("div", { children: F })), o(Gn, { command: t, placement: c === re.Toolbar ? "bottom-start" : "right-start", disabled: R, ...$, children: F });
517
- }, [t, l]);
518
- return o(Ma, { ref: a, propsPanel: k, icon: b ?? t?.icon(m), quickColor: f, selectedColor: t?.state(), onSelectColor: E, variant: c === re.Menuitem ? rt.Menuitem : rt.Toolbar, createTooltip: T, label: t?.label(), disabled: l || !t || t.disabled(), compareRGB: !0, darkMode: v, ...p });
519
- }));
520
- Mo.displayName = "ColorCommandButton";
521
- const _s = U(X((n, a) => {
522
- const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...h } = n, i = Ae(t, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d = _((g, b) => {
523
- const p = { variant: re.Menuitem, parentFloat: g.floatReference, commandHook: e, scope: r, disabled: l }, s = I(ae, { children: [o(B, { ...p, command: b.getCommand("gridlinesToggle") }), o(Mo, { ...p, command: b.getCommand("sheetViewFormatGridlinesColor"), icon: o(ye, { iconKey: "stroke.colored" }), propsPanel: { disableAlpha: !0 } }), o(Q, { orientation: "horizontal" }), o(B, { ...p, command: b.getCommand("sheetViewToggleGridlinesColumns") }), o(B, { ...p, command: b.getCommand("sheetViewToggleGridlinesRows") })] });
524
- return ke({ ...g, children: s });
525
- }, [l, e]);
526
- return o(Oe, { ref: a, parentFloat: c, quickCommand: i[0]?.key(), commands: t, commandHook: e, createPopupPanel: d, label: "Gridlines", tooltip: "Configure how the lines between rows and columns in the sheet are displayed.", icon: o(nn, { command: i[0], scope: "view" }), ...h });
527
- })), Ba = U(X((n, a) => o(Ke, { ref: a, ...n, popupCommandKeys: ["sortAscending", "sortDescending", "sortCustom", null, "autoFilterToggle", "autoFilterClear", "autoFilterReapply"], scope: "sortFilter", label: "Sort & Filter", tooltip: I(ae, { children: [o("span", { children: "Organize your data so it's easier to analyze." }), o("br", {}), o("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), icon: "SortFilter" }))), qd = U(X((n, a) => {
528
- const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = _((i, d) => {
529
- const g = { variant: re.Menuitem, commandHook: e, scope: "sort", disabled: l }, b = I(ae, { children: [o(B, { ...g, scope: "filter", command: d.getCommand("autoFilterToggle") }), o(B, { ...g, scope: "filter", command: d.getCommand("autoFilterClear") }), o(B, { ...g, scope: "filter", command: d.getCommand("autoFilterReapply") })] });
530
- return ke({ ...i, children: b });
531
- }, [l, e, r]);
532
- return o(Oe, { ref: a, commands: t, commandHook: e, scope: r, disabled: l, label: "Filter", tooltip: I(ae, { children: [o("span", { children: "Organize your data so it's easier to analyze." }), o("br", {}), o("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: h, icon: "FilterToggle", ...c });
533
- })), Aa = U(X((n, a) => {
534
- const { quickCommand: t, icon: e, isRedo: r = !1, nestRedo: l = !0, undoManager: c, scope: h, sx: i, disabled: d, commands: g, ...b } = n, p = [t];
535
- !r && l && p.push("redo");
536
- const s = Ae(g, p), u = s[0], x = s[1], w = c ?? u?.context?.()?.undoManager;
537
- let m = d;
538
- d || (m = !u || u.disabled(), x && !x.disabled() && (m = !1));
539
- const [f, y] = V(0), C = _((S, v) => {
540
- let k = f === 0 ? "Cancel" : `${u.label()} ${f} Action${f === 1 ? "" : "s"}`, E = !1;
541
- w || (E = !0), E || (E = l ? !w.hasRedo() && !w.hasUndo() : !w.hasRedo());
542
- const T = (F) => {
543
- u.execute(F);
544
- }, M = o(dt, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: E ? void 0 : "0 0", minWidth: "180px" }, icon: o(ye, {}), onMouseEnter: () => {
545
- y(0);
546
- }, onMouseDown: (F) => {
547
- F.button === 0 && F.preventDefault();
548
- }, onMouseUp: (F) => {
549
- F.button === 0 && T(f);
550
- }, onKeyDown: (F) => {
551
- F.isDefaultPrevented() || F.keyCode !== he.Enter && F.keyCode !== he.Space || T(f);
552
- }, children: o(Fe, { component: "div", variant: "caption", sx: { fontSize: "0.875rem", letterSpacing: "0.01071em" }, children: k }) });
553
- if (E) return M;
554
- const R = r ? w?.getRedoDescriptions() : w?.getUndoDescriptions(), D = [];
555
- for (let F = 0; F < R.length; F++) {
556
- const z = R[F];
557
- D.push(o(dt, { sx: { maxWidth: "360px", display: "flex" }, disabled: m, selected: F < f, icon: o(ye, {}), onMouseEnter: () => {
558
- y(F + 1);
559
- }, onMouseDown: (P) => {
560
- P.button === 0 && P.preventDefault();
561
- }, onMouseUp: (P) => {
562
- P.button === 0 && T(F + 1);
563
- }, onKeyDown: (P) => {
564
- P.isDefaultPrevented() || P.keyCode !== he.Enter && P.keyCode !== he.Space || T(F + 1);
565
- }, children: I(O, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [o(Fe, { component: "div", children: z }), o(ye, {})] }) }, `action:${F}`));
566
- }
567
- let N = null;
568
- if (!r && l) {
569
- const F = { scope: "undo", commands: v, variant: re.Menuitem, parentFloat: S.floatReference };
570
- N = [], N.push(o(Aa, { ...F, quickCommand: "redo", isRedo: !0 }, "nested:redo")), w.hasRedo() && w.hasUndo() && N.push(o(Q, { orientation: "horizontal" }, "action:redo-div"));
571
- }
572
- const $ = I(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
573
- S.closeFloatAll();
574
- }, onMouseLeave: () => {
575
- y(0);
576
- }, children: [N, o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: D }), o(Q, { orientation: "horizontal" }), M] });
577
- return ke({ ...S, children: $ });
578
- }, [u?.context(), u?.state(), h, w, f, m]);
579
- return o(Oe, { ref: a, commands: g, quickCommand: t, scope: h, disabled: m, label: u?.label() ?? (r ? "Redo" : "Undo"), tooltip: o(ae, { children: o("span", { children: `${u?.label() ?? "No"} last actions.` }) }), createPopupPanel: C, icon: e ?? (r ? "Redo" : "Undo"), selected: !1, ...b });
580
- })), no = Sl.getFontList(), Ia = /* @__PURE__ */ new Map();
581
- for (let n = 0; n < no.length; n++) Ia.set(no[n].fontRef.getFamily(), no[n]);
582
- const Us = U(X((n, a) => {
583
- const { command: t, commandHook: e, sx: r, disabled: l = !1, parentFloat: c, icon: h, label: i, ...d } = n;
584
- Ut(t);
585
- const g = t?.state(), b = Je(), p = L(() => `${_t.getSharedMeasurer()("Times New Roman", Math.round(b.typography.fontSize), b.typography.fontFamily).width}px`, [b]), s = _((u) => {
586
- const x = (y) => {
587
- t?.execute(y, e);
588
- }, w = [];
589
- for (let y = 0; y < no.length; y++) w.push({ key: no[y].fontRef.getFamily(), description: no[y].fontRef.getFamily() });
590
- Ia.get(g) || w.unshift({ key: g, description: g });
591
- const m = [];
592
- for (let y = 0; y < w.length; y++) {
593
- const C = w[y].key === g;
594
- m.push(o(dt, { sx: { display: "flex", paddingTop: "4px", paddingBottom: "4px" }, selected: C, disabled: l || !t || t.disabled(), icon: C ? o(on, {}) : void 0, onMouseUp: (S) => {
595
- S.button === 0 && x(w[y].key);
596
- }, onMouseDown: (S) => {
597
- S.button === 0 && S.preventDefault();
598
- }, onKeyDown: (S) => {
599
- S.keyCode !== he.Enter && S.keyCode !== he.Space || x(w[y].key);
600
- }, children: o(O, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: o(Fe, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => w[y]?.key }, children: w[y].description }) }) }, y + "" + w[y].key));
601
- }
602
- const f = o(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...d, children: o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: m }) });
603
- return ke({ ...u, children: f });
604
- }, [l, t?.state()]);
605
- return o(Dt, { ref: a, sx: { ...r }, outlined: !0, disabled: l, parentFloat: c, createPopupPanel: s, createTooltip: ({ children: u }, x) => o(at, { label: t?.label(), description: t?.description(), disabled: x, children: u }), icon: o(O, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (u) => `${Math.round(u.typography.fontSize)}px`, fontFamily: (u) => u.typography.fontFamily, color: (u) => u.palette.text.secondary, width: p }, children: o(O, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: g }) }), ...d });
606
- })), Gs = U(X((n, a) => {
607
- const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = Ae(t, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), i = L(() => {
608
- const g = h.length;
609
- for (let b = 0; b < g; b++) {
610
- const p = h[b];
611
- if (p?.state()) return p;
612
- }
613
- return h[0];
614
- }, [h]), d = _((g, b) => {
615
- const p = { variant: re.Menuitem, commandHook: e, scope: "textEffects", disabled: l }, s = I(ae, { children: [o(B, { ...p, command: b.getCommand("formatStrikeThroughToggle") }), o(B, { ...p, command: b.getCommand("formatSuperscriptToggle") }), o(B, { ...p, command: b.getCommand("formatSubscriptToggle") })] });
616
- return ke({ ...g, children: s });
617
- }, [l, e, r]);
618
- return o(Oe, { ref: a, quickCommand: i?.key(), commands: t, commandHook: e, createPopupPanel: d, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: i?.icon() ?? "TextStrike", ...c });
619
- })), qs = U(X((n, a) => {
620
- const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = Ae(t, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), i = L(() => {
621
- const g = h.length;
622
- for (let b = 0; b < g; b++) if (h[b]?.state()) return h[b];
623
- return h[0];
624
- }, [h]), d = _((g, b) => {
625
- const p = { variant: re.Menuitem, commandHook: e, scope: "underline", disabled: l }, s = I(ae, { children: [o(B, { ...p, command: b.getCommand("formatUnderlinedToggle") }), o(B, { ...p, command: b.getCommand("formatUnderlinedDoubleToggle") }), o(B, { ...p, command: b.getCommand("formatUnderlinedAccountingToggle"), commandHook: e }), o(B, { ...p, command: b.getCommand("formatUnderlinedAccountingDoubleToggle") })] });
626
- return ke({ ...g, children: s });
627
- }, [l, e, r]);
628
- return o(Oe, { ref: a, quickCommand: i?.key(), commands: t, commandHook: e, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: d, icon: i?.icon() ?? "TextUnderline", ...c });
629
- })), La = U(X((n, a) => {
630
- const { command: t, commands: e, commandHook: r, scope: l, includePasteAllInPopup: c = !0, disabled: h = !1, ...i } = n, d = Z((g, b) => {
631
- const p = { variant: re.Menuitem, commandHook: r, scope: "paste", disabled: h }, s = [];
632
- return c && (s.push(De(B, { ...p, command: b.getCommand("paste"), key: "paste" })), s.push(o(Q, { orientation: "horizontal" }, "paste-div"))), s.push(De(B, { ...p, command: b.getCommand("pasteValues"), key: "pasteValues" })), s.push(De(B, { ...p, command: b.getCommand("pasteFormats"), key: "pasteFormats" })), s.push(De(B, { ...p, command: b.getCommand("pasteFormulas"), key: "pasteFormulas" })), s.push(De(B, { ...p, command: b.getCommand("pasteTranspose"), key: "pasteTranspose" })), s.push(De(B, { ...p, command: b.getCommand("pasteLinks"), key: "pasteLinks" })), ke({ ...g, children: s });
633
- }, [h, r, l, c]);
634
- return o(Oe, { ref: a, commands: e, commandHook: r, scope: l, createPopupPanel: d, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", ...i });
635
- })), Ks = U(X((n, a) => {
636
- const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...h } = n, i = Ae(t, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d = _((g, b) => {
637
- const p = { variant: re.Menuitem, parentFloat: g.floatReference, commandHook: e, scope: r, disabled: l }, s = I(ae, { children: [o(B, { ...p, command: b.getCommand("sheetViewToggleShowHeadings") }), o(B, { ...p, command: b.getCommand("sheetViewToggleShowHeadingsNumeric") }), o(Q, { orientation: "horizontal" }), o(B, { ...p, command: b.getCommand("sheetViewToggleShowHeadingColumns") }), o(B, { ...p, command: b.getCommand("sheetViewToggleShowHeadingRows") })] });
638
- return ke({ ...g, children: s });
639
- }, [l, e, r]);
640
- return o(Oe, { ref: a, parentFloat: c, quickCommand: i[0]?.key(), commands: t, commandHook: e, createPopupPanel: d, label: "Headings", tooltip: "Configure how the column and rows headings in the sheet are displayed.", icon: o(nn, { command: i[0], scope: "view" }), ...h });
641
- })), Xs = U(X((n, a) => {
642
- const { commands: t, commandHook: e, scope: r = "view", disabled: l = !1, ...c } = n, h = _((i) => {
643
- const d = { variant: re.Menuitem, parentFloat: i.floatReference, commandHook: e, scope: r, disabled: l }, g = I(ae, { children: [o(B, { ...d, command: t.getCommand("workbookViewToggleShowFormulaBar") }), o(B, { ...d, command: t.getCommand("workbookViewToggleShowTabs") }), o(B, { ...d, command: t.getCommand("workbookViewToggleShowStatusBar") }), o(Q, { orientation: "horizontal" }), o(B, { ...d, command: t.getCommand("workbookViewToggleShowHorizontalScrollBar") }), o(B, { ...d, command: t.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
644
- return ke({ ...i, children: g });
645
- }, [l, t, e, r]);
646
- return o(Oe, { ref: a, commands: t, disabled: l, commandHook: e, scope: r, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: h, icon: o(nn, { icon: null, label: "Workbook View" }), ...c });
647
- })), za = U(X((n, a) => {
648
- const { value: t, cellStyle: e, styles: r, createTemporaryCell: l, bodyStyle: c, sx: h, propsBorder: i, disabled: d, ...g } = n, b = L(() => l({ value: t, style: e }), [t, e, l]), p = L(() => b.getStyle(), [b, c]), s = L(() => p.getFill().toCSS(c?.darkMode ?? !1), [p]), u = p.getInsets(), x = p.getFont(), w = _(() => p.getBorder(), [p]);
649
- return o(O, { ref: a, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: c?.fill, filter: d ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...s }, "& .text": { flex: "1 1 100%", ...x.toCSS(c?.darkMode ?? !1, 1), boxSizing: "border-box", padding: `${u.top}px ${u.right}px ${u.bottom}px ${u.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: x.toCSS().textDecoration, textAlign: vl.toCSSHorizontalTextAlign(b.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...h }, ...g, children: o(jn, { getBorderAt: w, darkMode: c?.darkMode ?? !1, rowCount: 1, columnCount: 1, style: { height: "100%", width: "100%", ...i?.style }, ...i, children: o(O, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-2px", marginBottom: "-2px", display: "flex", alignItems: "center" }, children: o(O, { className: "text", children: t }) }) }) });
650
- })), Ys = U((n) => {
651
- const { styles: a, namedStyle: t, selectedNamed: e, hasContextMenu: r = !0, bodyStyle: l, onSelectNamed: c, createTemporaryCell: h, parentFloat: i, commands: d, disabled: g, commandHook: b, ...p } = n, s = _((w) => {
652
- const m = { variant: re.Menuitem, commandHook: b, context: "cellStyle" }, f = I(ae, { children: [o(B, { ...m, style: { fontWeight: 550 }, command: d.getCommand("formatCellStyle"), commandState: t, disabled: g }), o(Q, { orientation: "horizontal" }), o(B, { ...m, command: d.getCommand("modifyCellStyle"), commandState: { named: t } }), o(B, { ...m, command: d.getCommand("deleteCellStyle"), commandState: t, disabled: g || t?.getName() === ce.BuiltInName.Normal })] });
653
- return ke({ ...w, children: o(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: f }) }) });
654
- }, []), u = t?.getName() === e?.getName();
655
- let x = o(bt, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (w) => `solid ${u ? w.palette.primary.dark : "transparent"} 1px` }, propsTooltip: { label: t.getName(), placement: "bottom-start" }, disabled: g, icon: null, onClick: () => {
656
- c?.(t);
657
- }, ...p, children: o(za, { value: t.getName(), cellStyle: { named: t.getName() }, styles: a, createTemporaryCell: h, bodyStyle: l }) }, t.getName());
658
- return r && (x = o(Ta, { label: t.getName(), parentFloat: i, createPopupPanel: s, children: x })), x;
659
- }), Zs = U(X((n, a) => {
660
- const { commands: t, command: e, commandHook: r, selectedNamed: l, onSelectNamed: c, disabled: h = !1, bodyStyle: i, usePreviewIcon: d = !0, ...g } = n;
661
- Ut(e);
662
- const b = e?.context(), p = b?.styles, s = l ?? b?.named(), u = i ?? b?.bodyStyle(), x = Z((C) => {
663
- c?.(C), e?.execute(C, r);
664
- }, [e, c, r]), w = _((C, S) => {
665
- const v = { onSelectNamed: x, styles: p(), parentFloat: C.floatReference }, k = p().getCustomNamed(), E = /* @__PURE__ */ new Map(), T = [];
666
- for (let P = 0; P < k.length; P++) E.set(k[P].getName(), k[P]), p().getNamed(k[P].getName()).getBuiltInID() === null && T.push(k[P].getName());
667
- const M = (P) => {
668
- let j = E.get(P);
669
- return j || (j = p().getNamed(P)), !j || j.isHidden() ? null : o(Ys, { namedStyle: j, selectedNamed: s, bodyStyle: b.bodyStyle(), createTemporaryCell: b.createTemporaryCell, commands: t, commandHook: r, ...v }, P);
670
- }, R = (P, j, te = !0) => {
671
- const de = [];
672
- for (let se = 0; se < j.length; se++) {
673
- const A = M(j[se]);
674
- A && de.push(A);
675
- }
676
- return de.length === 0 ? null : I(O, { children: [te ? o(Q, { orientation: "horizontal" }) : null, o(ro, { children: P }, P + "-header"), o(O, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: de }, P + "-presets")] }, P);
677
- }, D = (P, j) => {
678
- const te = [];
679
- for (let de = 0; de < j.length; de++) {
680
- const se = M(j[de]);
681
- se && te.push(se);
682
- }
683
- return te.length === 0 ? null : o(O, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: te }, P + "-presets");
684
- }, N = [];
685
- N.push(R("Custom", T, !1)), N.push(R("Good, Bad and Neutral", [ce.BuiltInName.Normal, ce.BuiltInName.Bad, ce.BuiltInName.Good, ce.BuiltInName.Neutral], T.length > 0)), N.push(R("Data and Model", [ce.BuiltInName.Calculation, ce.BuiltInName.CheckCell, ce.BuiltInName.ExplanatoryText, ce.BuiltInName.FollowedHyperlink, ce.BuiltInName.Hyperlink, ce.BuiltInName.Input, ce.BuiltInName.LinkedCell, ce.BuiltInName.Note, ce.BuiltInName.Output, ce.BuiltInName.WarningText])), N.push(R("Titles and Headings", [ce.BuiltInName.Heading1, ce.BuiltInName.Heading2, ce.BuiltInName.Heading3, ce.BuiltInName.Heading4, ce.BuiltInName.Title, ce.BuiltInName.Total]));
686
- let $ = [];
687
- var F, z;
688
- return $.push(D("Accent 1", [ce.BuiltInName.Accent1_20, ce.BuiltInName.Accent1_40, ce.BuiltInName.Accent1_60, ce.BuiltInName.Accent1])), $.push(D("Accent 2", [ce.BuiltInName.Accent2_20, ce.BuiltInName.Accent2_40, ce.BuiltInName.Accent2_60, ce.BuiltInName.Accent2])), $.push(D("Accent 3", [ce.BuiltInName.Accent3_20, ce.BuiltInName.Accent3_40, ce.BuiltInName.Accent3_60, ce.BuiltInName.Accent3])), $.push(D("Accent 4", [ce.BuiltInName.Accent4_20, ce.BuiltInName.Accent4_40, ce.BuiltInName.Accent4_60, ce.BuiltInName.Accent4])), $.push(D("Accent 5", [ce.BuiltInName.Accent5_20, ce.BuiltInName.Accent5_40, ce.BuiltInName.Accent5_60, ce.BuiltInName.Accent5])), $.push(D("Accent 6", [ce.BuiltInName.Accent6_20, ce.BuiltInName.Accent6_40, ce.BuiltInName.Accent6_60, ce.BuiltInName.Accent6])), N.push((F = "Themed Cell Styles", z = $, I(O, { children: [o(Q, { orientation: "horizontal" }), o(ro, { children: F }, F + "-header"), o(O, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: z }, F + "-presets")] }, F))), N.push(R("Number Format", [ce.BuiltInName.Comma, ce.BuiltInName.Comma0, ce.BuiltInName.Currency, ce.BuiltInName.Currency0, ce.BuiltInName.Percent])), I(O, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (P) => `${P.shape.borderRadius}px`, paddingBottom: (P) => `${P.shape.borderRadius}px` }, children: [o(O, { onContextMenu: () => {
689
- }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: N }), o(Q, { orientation: "horizontal" }), o(B, { variant: re.Menuitem, commandState: s, command: S.getCommand("newCellStyle"), context: "styles", commandHook: r, disabled: h })] });
690
- }, [s, p?.().getTheme(), u]), m = Z((C) => {
691
- const S = 18 / _t.getDeviceScale(), v = b?.createTemporaryCell(C);
692
- return v.getStyle().getFont().getSize() <= S ? v : v.createTemporaryCell({ style: { font: { size: S } } });
693
- }, [b?.createTemporaryCell]), f = h || !e || e.disabled(), y = L(() => b && d ? o(za, { value: s?.getName() ?? "Custom", cellStyle: s ? { named: s.getName() } : void 0, styles: b.styles(), createTemporaryCell: m, bodyStyle: b.bodyStyle(), className: "outline-hover", disabled: f, sx: { marginRight: "4px", borderRadius: "2px", minHeight: "calc(100% - 2px)", overflow: "hidden", outline: (C) => `1px solid ${C.palette.action.hover}` }, propsBorder: { style: { height: "calc(100% - 2px)", width: "calc(100% - 1px)" } } }) : e?.icon(), [s, u, f, e]);
694
- return o(Oe, { ref: a, createPopupPanel: w, outlined: d, commands: t, createTooltip: ({ children: C }, S) => o(at, { label: e?.label(), description: e?.description(), disabled: S, children: C }), selected: !1, disabled: f, label: e?.label(), icon: y, ...g });
695
- })), Ha = "_sheetxl-reset_11z3j_1", Qs = 10, Wa = U(X((n, a) => {
696
- const { styles: t, table: e, tableStyle: r = e?.getStyle() ?? t.getDefaultTableStyle(), bodyStyle: l, sx: c, disabled: h, className: i, forceThinBorder: d, cellHeight: g = Qs, isLive: b = !1, ...p } = n, s = Math.ceil(1.3 * g), [u, x] = tn((C) => C + 1, 0);
697
- le(() => {
698
- if (b && e) return e.addListeners({ onAnyChange: () => {
699
- x();
700
- } });
701
- }, [e, b]);
702
- const w = L(() => {
703
- let C = e?.toJSON() ?? {};
704
- const S = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
705
- return C && (C.styleOptions = { ...C.styleOptions, name: r.getName() }), C.ref = S, new Wn({ initialAnchor: S, json: C, styles: t });
706
- }, [u, e, r, t]), m = L(() => {
707
- const C = [];
708
- for (let S = 0; S < 5; S++) for (let v = 0; v < 5; v++) {
709
- const k = w.getStyleAt({ colIndex: v, rowIndex: S });
710
- C.push(k);
711
- }
712
- return C;
713
- }, [w]), f = L(() => {
714
- const C = (v, k, E) => {
715
- let T = E.getFill().toCSS(l?.darkMode ?? !1);
716
- const M = s - (k < 4 ? 1 : 0), R = g - (v < 4 ? 1 : 0), D = E.getFont().getFill().toCSS(l?.darkMode ?? !1);
717
- return T = { ...T, position: "absolute", boxSizing: "border-box", left: k * (s - 1), top: v * (g - 1), width: M, height: R }, o("td", { className: `table-style-fill ${v}-${k}`, style: T, children: o("div", { className: `table-style-text ${v}-${k}`, style: { position: "absolute", boxSizing: "border-box", width: "6px", left: (M - 6) / 2, top: (R - 1) / 2, borderTop: `1px solid ${D}` } }) }, `${v}-${k}`);
718
- }, S = [];
719
- for (let v = 0; v < 5; v++) {
720
- const k = [];
721
- for (let E = 0; E < 5; E++) {
722
- const T = m[5 * v + E];
723
- k.push(C(v, E, T));
724
- }
725
- S.push(o("tr", { children: k }, v));
726
- }
727
- return S;
728
- }, [w, r, l]), y = _((C, S) => m[S].getBorder() ?? null, [m]);
729
- return o(O, { ref: a, className: "table-format-preview", sx: { background: l?.fill, filter: h ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...c }, ...p, children: o(jn, { getBorderAt: y, rowCount: 5, columnCount: 5, forceThinBorder: d, width: 5 * (s - 1) + 1, height: 5 * (g - 1) + 1, darkMode: l?.darkMode ?? !1, style: { pointerEvents: "none" }, children: o("table", { className: Re(i, "sheetxl-table-preview", Ha), style: { borderCollapse: "collapse", width: 5 * (s - 1) + 1, height: 5 * (g - 1) + 1 }, children: o("tbody", { children: f }) }) }) });
730
- })), mo = (n, a, t, e, r) => {
731
- n.beginPath(), n.moveTo(a + 0.5, t + 0.5), n.lineTo(e + 0.5, r + 0.5), n.stroke();
732
- }, Js = U(X((n, a) => {
733
- const { table: t, tableStyle: e, styles: r, bodyStyle: l, disabled: c, style: h, className: i, canvas: d, ...g } = n, b = L(() => {
734
- const u = t.toJSON(), x = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
735
- return u.styleOptions = { ...u.styleOptions, name: e.getName() }, u.ref = x, new Wn({ initialAnchor: x, json: u, styles: r });
736
- }, [t, e, r]), p = L(() => {
737
- const u = [];
738
- for (let x = 0; x < 5; x++) for (let w = 0; w < 5; w++) {
739
- const m = b.getStyleAt({ colIndex: w, rowIndex: x });
740
- u.push(m);
741
- }
742
- return u;
743
- }, [b]), s = L(() => {
744
- let u = d;
745
- if (d || (u = document.createElement("canvas")), !u) return null;
746
- u.width !== 61 && (u.width = 61), u.height !== 46 && (u.height = 46);
747
- const x = u.getContext("2d", { alpha: !1 });
748
- if (!x) return null;
749
- const w = 12, m = l?.darkMode ?? !1;
750
- for (let f = 0; f < 5; f++) for (let y = 0; y < 5; y++) {
751
- const C = p[5 * f + y].getFill();
752
- let S = l?.fill;
753
- C.getType() === fn.Type.Solid ? S = C.getColor().toCSS(m, !1) : C.getType() === fn.Type.Gradient ? S = C.getStops[0]?.color.toCSS(m, !1) : C.getType() === fn.Type.Pattern && (S = C.getForeground().toCSS(m, !1)), x.fillStyle = S;
754
- const v = y * w, k = 9 * f;
755
- x.fillRect(v, k, 13, 10);
756
- }
757
- x.lineWidth = 1;
758
- for (let f = 0; f < 5; f++) for (let y = 0; y < 5; y++) {
759
- const C = p[5 * f + y], S = y * w, v = 9 * f, k = C.getBorder();
760
- if (!k.isEmpty()) {
761
- const M = k.getLeft();
762
- M.isNone() || (x.strokeStyle = M.getColor().toCSS(m, !1), mo(x, S, v, S, v + 9));
763
- const R = k.getTop();
764
- R.isNone() || (x.strokeStyle = R.getColor().toCSS(m, !1), mo(x, S, v, S + w, 9 * f));
765
- const D = k.getRight();
766
- D.isNone() || (x.strokeStyle = D.getColor().toCSS(m, !1), mo(x, S + w, v, S + w, v + 9));
767
- const N = k.getBottom();
768
- N.isNone() || (x.strokeStyle = N.getColor().toCSS(m, !1), mo(x, S, v + 9, S + w, v + 9));
769
- }
770
- x.strokeStyle = C.getFont().getFill().toCSS(m, !1);
771
- const E = 4, T = 2.5;
772
- mo(x, y * w + T, 9 * f + E, y * w + T + 7, 9 * f + E);
773
- }
774
- return `url(${u.toDataURL()})`;
775
- }, [d, b, e, l]);
776
- return o("div", { ref: a, className: Re("table-style-preview", i), style: { backgroundImage: s, width: 61, height: 46, ...h }, ...g });
777
- })), ec = "_table-style-options-container_1kfn2_1", tc = "_table-style-options_1kfn2_1", oc = U(X((n, a) => {
778
- const { styleOptions: t, onStyleOptionsChange: e, showHeaderRow: r, onShowHeaderRowChange: l, showTotalRow: c, onShowTotalRowChange: h, showFilterButton: i, onShowFilterButtonChange: d, sx: g, className: b, disabled: p, ...s } = n;
779
- return o("div", { className: ec, children: I(O, { sx: { pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (u) => `${u.spacing(2)}`, marginRight: (u) => `${u.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (u) => `${u.spacing(0.5)}` }, ...g }, ...s, ref: a, className: Re(b, tc), children: [l && o(At, { control: o(It, { checked: r ?? !1, indeterminate: r == null, onChange: () => l(!r), disabled: p || r == null }), label: "Header Row", labelPlacement: "end" }), h && o(At, { control: o(It, { checked: c ?? !1, indeterminate: c == null, onChange: () => h(!c), disabled: p || c == null }), label: "Total Row", labelPlacement: "end" }), o(At, { control: o(It, { checked: t?.showRowStripes ?? !1, indeterminate: !t, disabled: p || !t, onChange: () => {
780
- e?.({ ...t, showRowStripes: !t?.showRowStripes });
781
- } }), label: "Banded Rows", labelPlacement: "end" }), o(At, { control: o(It, { checked: t?.showFirstColumn ?? !1, indeterminate: !t, disabled: p || !t, onChange: () => {
782
- e?.({ ...t, showFirstColumn: !t?.showFirstColumn });
783
- } }), label: "First Column", labelPlacement: "end" }), o(At, { control: o(It, { checked: t?.showLastColumn ?? !1, indeterminate: !t, disabled: p || !t, onChange: () => {
784
- e?.({ ...t, showLastColumn: !t?.showLastColumn });
785
- } }), label: "Last Column", labelPlacement: "end" }), o(At, { control: o(It, { checked: t?.showColumnStripes ?? !1, indeterminate: !t, disabled: p || !t, onChange: () => {
786
- e?.({ ...t, showColumnStripes: !t?.showColumnStripes });
787
- } }), label: "Banded Columns", labelPlacement: "end" }), d && o(At, { control: o(It, { checked: i ?? !1, indeterminate: i == null, disabled: p || !t || i == null, onChange: () => d(!i) }), label: "Filter Button", labelPlacement: "end" })] }) });
788
- }));
789
- function xn(n, a) {
790
- if (typeof n == "function") return n(a);
791
- n && (n.current = a);
792
- }
793
- var yt = parseInt(Ll.split(".")[0], 10) >= 19 ? function(n) {
794
- return (a) => {
795
- const t = [];
796
- for (const e of n) {
797
- const r = xn(e, a), l = typeof r == "function";
798
- t.push(l ? r : () => xn(e, null));
799
- }
800
- return () => {
801
- for (const e of t) e();
802
- };
803
- };
804
- } : function(n) {
805
- return (a) => {
806
- for (const t of n) xn(t, a);
807
- };
808
- }, nc = function() {
809
- }, ja = typeof window < "u", To = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
810
- function Kd(n) {
811
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
812
- }
813
- var rc = ja ? Tt : le, Cr = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
814
- const Vt = ja && window.ResizeObserver !== void 0 ? function() {
815
- var n = V(null), a = n[0], t = n[1], e = V(Cr), r = e[0], l = e[1], c = L(function() {
816
- return new window.ResizeObserver(function(h) {
817
- if (h[0]) {
818
- var i = h[0].contentRect, d = i.x, g = i.y, b = i.width, p = i.height, s = i.top, u = i.left, x = i.bottom, w = i.right;
819
- l({ x: d, y: g, width: b, height: p, top: s, left: u, bottom: x, right: w });
820
- }
821
- });
822
- }, []);
823
- return rc(function() {
824
- if (a) return c.observe(a), function() {
825
- c.disconnect();
826
- };
827
- }, [a]), [t, r];
828
- } : function() {
829
- return [nc, Cr];
830
- }, ac = "_range-row_akhf4_1", ic = "_action-row_akhf4_15", $a = ne.createContext(null);
831
- $a.displayName = "HookFormContext";
832
- const Va = () => ne.useContext($a);
504
+ const Ba = ne.createContext(null);
505
+ Ba.displayName = "HookFormContext";
506
+ const Aa = () => ne.useContext(Ba);
833
507
  typeof window < "u" ? ne.useLayoutEffect : ne.useEffect;
834
- const _a = U(X((n, a) => {
835
- const { disabled: t, style: e, className: r, sx: l, defaultInput: c, value: h, formName: i, formOptions: d, onChangeInput: g, onValidate: b, onKeyDown: p, ...s } = n, u = Va(), x = i && u ? u.register(i, d) : null, [w, m] = V(""), [f, y] = V(""), [C, S] = V(h);
508
+ const Ia = U(X((n, a) => {
509
+ const { disabled: t, style: e, className: r, sx: l, defaultInput: c, value: h, formName: i, formOptions: d, onChangeInput: g, onValidate: b, onKeyDown: p, ...s } = n, u = Aa(), x = i && u ? u.register(i, d) : null, [w, m] = V(""), [f, y] = V(""), [v, S] = V(h);
836
510
  le(() => {
837
511
  S(h), y("");
838
512
  }, [h]);
839
- const v = Z((R) => {
513
+ const C = Z((R) => {
840
514
  let D = "";
841
515
  try {
842
516
  S(R), b?.(R), g?.(R);
@@ -845,38 +519,38 @@ const _a = U(X((n, a) => {
845
519
  }
846
520
  i && u && (D ? u.setError(i, { message: D }) : u.clearErrors(i)), y(D);
847
521
  }, [h, b, g]), k = Z(async (R) => {
848
- R.keyCode === he.Escape && w !== h && (v(w), u?.setValue(i, w), u?.clearErrors(i), R.stopPropagation()), p?.(R);
522
+ R.keyCode === he.Escape && w !== h && (C(w), u?.setValue(i, w), u?.clearErrors(i), R.stopPropagation()), p?.(R);
849
523
  }, [p, w, h, u]), E = Z((R) => {
850
524
  m(R.target.value ?? "");
851
525
  }, []), T = Z((R) => {
852
526
  m(""), x?.onBlur(R);
853
527
  }, []), M = _((R) => {
854
- v(R.target.value), x?.onChange(R);
528
+ C(R.target.value), x?.onChange(R);
855
529
  }, [x]);
856
- return o(_n, { sx: { paddingTop: (R) => R.spacing(1.5), minWidth: 135, width: "100%", ...l }, size: "small", ref: a, className: Re("named-input", r), ...s, children: o(Sa, { label: "Name", placeholder: c, onFocus: E, onBlur: T, inputRef: x?.ref, disabled: t, error: !!f, helperText: f || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (R) => R.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", name: i, spellCheck: !1, autoComplete: "off", readOnly: t, sx: { paddingTop: (R) => R.spacing(1.25), paddingBottom: (R) => R.spacing(0.75), backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})` } } }, value: C ?? "", onChange: M, onKeyDownCapture: k, onContextMenu: (R) => {
530
+ return o(_n, { sx: { paddingTop: (R) => R.spacing(1.5), minWidth: 135, width: "100%", ...l }, size: "small", ref: a, className: Re("named-input", r), ...s, children: o(Sa, { label: "Name", placeholder: c, onFocus: E, onBlur: T, inputRef: x?.ref, disabled: t, error: !!f, helperText: f || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (R) => R.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", name: i, spellCheck: !1, autoComplete: "off", readOnly: t, sx: { paddingTop: (R) => R.spacing(1.25), paddingBottom: (R) => R.spacing(0.75), backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})` } } }, value: v ?? "", onChange: M, onKeyDownCapture: k, onContextMenu: (R) => {
857
531
  R.stopPropagation();
858
532
  } }) });
859
533
  }));
860
- _a.displayName = "NamedInput";
861
- const Lo = (n) => n === null ? "" : n.toString(), Ua = U(X((n, a) => {
862
- const { formName: t, formOptions: e, disabled: r, style: l, className: c, sx: h, onKeyDown: i, value: d, onChangeInput: g, resolvedAddress: b, ...p } = n, s = Va(), u = t && s ? s.register(t, e) : null, [x, w] = V(""), [m, f] = V(!1), [y, C] = V(() => Lo(d));
534
+ Ia.displayName = "NamedInput";
535
+ const Lo = (n) => n === null ? "" : n.toString(), La = U(X((n, a) => {
536
+ const { formName: t, formOptions: e, disabled: r, style: l, className: c, sx: h, onKeyDown: i, value: d, onChangeInput: g, resolvedAddress: b, ...p } = n, s = Aa(), u = t && s ? s.register(t, e) : null, [x, w] = V(""), [m, f] = V(!1), [y, v] = V(() => Lo(d));
863
537
  le(() => {
864
- C(Lo(d)), w(""), t && s && s.clearErrors(t), f(!1);
538
+ v(Lo(d)), w(""), t && s && s.clearErrors(t), f(!1);
865
539
  }, [d]);
866
540
  const S = Z((D) => {
867
541
  let N = "";
868
542
  try {
869
- C(D);
543
+ v(D);
870
544
  const $ = Lo(d), F = b(D);
871
545
  F.toString() !== $ && g?.(F);
872
546
  } catch {
873
547
  N = "Invalid Range";
874
548
  }
875
549
  t && s && (N ? s.setError(t, { message: N }) : s.clearErrors(t)), w(N), f(!0);
876
- }, [y, g, t, s]), v = Z(async (D) => {
550
+ }, [y, g, t, s]), C = Z(async (D) => {
877
551
  if (m && D.keyCode === he.Escape) {
878
552
  const N = Lo(d);
879
- C(N), w(""), f(!1), D.stopPropagation();
553
+ v(N), w(""), f(!1), D.stopPropagation();
880
554
  }
881
555
  i?.(D);
882
556
  }, [d, g, i, m]), k = Z((D) => {
@@ -886,14 +560,14 @@ const Lo = (n) => n === null ? "" : n.toString(), Ua = U(X((n, a) => {
886
560
  }, [u]), [T, M] = V(!1), R = L(() => o(jl, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: o(Ql, { disabled: !0, selected: T, onSelectToggle: (D) => {
887
561
  M(D);
888
562
  }, label: "Select Range", icon: o(ye, { iconKey: "SelectRangeMode" }) }) }), [T]);
889
- return o(_n, { sx: { paddingTop: (D) => D.spacing(1.5), minWidth: 135, width: "100%", ...h }, size: "small", ref: a, className: Re("range-input", c), ...p, children: o(Sa, { label: "Range", placeholder: "Enter Range", onBlur: k, disabled: r, error: !!x, inputRef: u?.ref, helperText: x || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (D) => D.spacing(0.5) } }, slotProps: { input: { endAdornment: R }, inputLabel: { shrink: !0 }, htmlInput: { spellCheck: !1, autoComplete: "off", readOnly: r, name: t, sx: { paddingTop: (D) => D.spacing(1.25), paddingBottom: (D) => D.spacing(0.75) } } }, value: y ?? "", onChange: E, onKeyDownCapture: v, onContextMenu: (D) => {
563
+ return o(_n, { sx: { paddingTop: (D) => D.spacing(1.5), minWidth: 135, width: "100%", ...h }, size: "small", ref: a, className: Re("range-input", c), ...p, children: o(Sa, { label: "Range", placeholder: "Enter Range", onBlur: k, disabled: r, error: !!x, inputRef: u?.ref, helperText: x || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (D) => D.spacing(0.5) } }, slotProps: { input: { endAdornment: R }, inputLabel: { shrink: !0 }, htmlInput: { spellCheck: !1, autoComplete: "off", readOnly: r, name: t, sx: { paddingTop: (D) => D.spacing(1.25), paddingBottom: (D) => D.spacing(0.75) } } }, value: y ?? "", onChange: E, onKeyDownCapture: C, onContextMenu: (D) => {
890
564
  D.stopPropagation();
891
565
  } }) });
892
566
  }));
893
- Ua.displayName = "RangeInput";
567
+ La.displayName = "RangeInput";
894
568
  const et = [];
895
569
  et.push(nt("Primary Background", "bg1")), et.push(nt("Primary Text", "tx1")), et.push(nt("Secondary Background", "bg2")), et.push(nt("Secondary Text", "tx2")), et.push(nt("Accent 1", "accent1")), et.push(nt("Accent 2", "accent2")), et.push(nt("Accent 3", "accent3")), et.push(nt("Accent 4", "accent4")), et.push(nt("Accent 5", "accent5")), et.push(nt("Accent 6", "accent6"));
896
- const lc = (n) => {
570
+ const _s = (n) => {
897
571
  const { docTheme: a, onSelectTheme: t, darkMode: e, isSelected: r, outlined: l, sx: c, ...h } = n, i = Je(), d = L(() => {
898
572
  let g = [];
899
573
  for (let b = 0; b < et.length; b++) {
@@ -904,14 +578,14 @@ const lc = (n) => {
904
578
  }, [a, i]);
905
579
  return o(bt, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (g) => `solid ${r ? g.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (g) => `solid ${g.palette.text.primary} 1px !important` } }, icon: null, ...h, children: I(O, { sx: { border: (g) => `solid ${g.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (g) => r ? g.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (g) => g.palette.text.primary } }, children: [o(O, { sx: {}, children: a.getName() }), I(O, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [d, o(O, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => a.getFontScheme().getMajorFont() }, children: o(Et, { disableInteractive: !0, slotProps: { popper: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } } }, title: o("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
906
580
  The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: o("div", { children: a.getFontScheme().getMinorFont() }) }) })] })] }) });
907
- }, sc = U(X((n, a) => {
581
+ }, Us = U(X((n, a) => {
908
582
  const { themes: t, selectedTheme: e, onSelectTheme: r, sx: l, disabled: c = !1, darkMode: h, ...i } = n, d = L(() => {
909
583
  const g = t?.getItems({ selected: e }) ?? [], b = [];
910
584
  if (g.length === 0) return o(ro, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
911
585
  const p = g.length;
912
586
  for (let s = 0; s < p; s++) {
913
587
  const u = g[s], x = e && u?.getName() === e.getName(), w = g[s + 1];
914
- w && w.isCustom() !== u.isCustom() && b.push(o(Q, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${s}`)), b.push(o(lc, { docTheme: u, onSelectTheme: () => r(u), isSelected: x, disabled: c, darkMode: h, onMouseDown: (m) => {
588
+ w && w.isCustom() !== u.isCustom() && b.push(o(Q, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${s}`)), b.push(o(_s, { docTheme: u, onSelectTheme: () => r(u), isSelected: x, disabled: c, darkMode: h, onMouseDown: (m) => {
915
589
  m.button === 0 && m.preventDefault();
916
590
  }, onMouseUp: (m) => {
917
591
  m.button === 0 && r(u);
@@ -922,22 +596,43 @@ The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bott
922
596
  return b;
923
597
  }, [e, r, h]);
924
598
  return o(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: a, ...i, children: I(O, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [o(ro, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), o(Q, {}), o(O, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: d })] }) });
925
- })), cc = U(X((n, a) => {
599
+ })), Ks = U(X((n, a) => {
926
600
  const { themes: t, selectedTheme: e, onSelectTheme: r, icon: l, tooltip: c, label: h, variant: i = rt.Toolbar, darkMode: d, propsPanel: g, ...b } = n, p = l || o(ye, { iconKey: "Theme2" }), s = _((x) => {
927
601
  const { closeFloatAll: w } = x;
928
- return o(sc, { ...g, themes: t, selectedTheme: e, onSelectTheme: r, darkMode: d, onKeyDown: (m) => {
602
+ return o(Us, { ...g, themes: t, selectedTheme: e, onSelectTheme: r, darkMode: d, onKeyDown: (m) => {
929
603
  m.which === he.Enter && w();
930
604
  } });
931
605
  }, [t, e, r, g, d]), u = { createPopupPanel: s, tooltip: c || h || "Theme", label: h, icon: p, ...b };
932
606
  return i === rt.Toolbar ? o(Dt, { ref: a, ...u }) : o(Un, { ref: a, ...u });
933
- })), Ga = U(X((n, a) => {
607
+ }));
608
+ function xn(n, a) {
609
+ if (typeof n == "function") return n(a);
610
+ n && (n.current = a);
611
+ }
612
+ var yt = parseInt(Ll.split(".")[0], 10) >= 19 ? function(n) {
613
+ return (a) => {
614
+ const t = [];
615
+ for (const e of n) {
616
+ const r = xn(e, a), l = typeof r == "function";
617
+ t.push(l ? r : () => xn(e, null));
618
+ }
619
+ return () => {
620
+ for (const e of t) e();
621
+ };
622
+ };
623
+ } : function(n) {
624
+ return (a) => {
625
+ for (const t of n) xn(t, a);
626
+ };
627
+ };
628
+ const za = U(X((n, a) => {
934
629
  const { sheet: t, className: e, debounceDelay: r = 220, sx: l, ...c } = n, [h, i] = V(() => t.getView().getZoomScale()), [d, g] = V(null), b = xe(0);
935
630
  je(t, { onViewChange: () => {
936
631
  g(!0), b.current === 0 && i(t.getView().getZoomScale());
937
632
  } }), le(() => {
938
633
  b.current = 0, g(!1), i(t.getView().getZoomScale());
939
634
  }, [t]), le(() => {
940
- b.current !== 0 && Ct.debounce(() => {
635
+ b.current !== 0 && vt.debounce(() => {
941
636
  h === b.current && (b.current = 0, t.getView().update({ zoomScale: h }));
942
637
  }, r)();
943
638
  }, [h, r]);
@@ -953,8 +648,8 @@ The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bott
953
648
  m.current?.contains(document.activeElement) && k.focus();
954
649
  });
955
650
  }, []), y = wr(() => {
956
- p(s(Ct.findNextStep(t.getView().getZoomScale(), !1, 10)));
957
- }), C = wr(() => p(s(Ct.findNextStep(t.getView().getZoomScale(), !0, 10)))), S = Je(), v = L(() => `${_t.getSharedMeasurer()("100%", Math.round(S.typography.fontSize), S.typography.fontFamily).width}px`, [S]);
651
+ p(s(vt.findNextStep(t.getView().getZoomScale(), !1, 10)));
652
+ }), v = wr(() => p(s(vt.findNextStep(t.getView().getZoomScale(), !0, 10)))), S = Je(), C = L(() => `${_t.getSharedMeasurer()("100%", Math.round(S.typography.fontSize), S.typography.fontFamily).width}px`, [S]);
958
653
  return I(O, { ref: a, className: Re(e), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (k) => k.palette.text.secondary, ...l }, onFocus: (k) => {
959
654
  k.relatedTarget && !x && w(k.relatedTarget);
960
655
  }, onBlur: (k) => {
@@ -966,19 +661,19 @@ The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bott
966
661
  }, ...c, children: [o(Et, { disableInteractive: !0, title: "Zoom Out", children: o(ct, { sx: { padding: "0", "&:hover:not([disabled])": { color: (k) => k.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (k) => {
967
662
  k.button !== 0 ? k.preventDefault() : y(k);
968
663
  }, children: o(ye, { iconKey: "Remove" }) }) }), o($l, { ref: m, sx: { flex: "1 1 100%", padding: "6px 0px !important", marginRight: "2px", marginLeft: "2px", "& .MuiSlider-thumb": { height: 14, width: 6, borderRadius: 0.75, "&.Mui-focusVisible": { boxShadow: (k) => `0px 0px 0px 3px ${xr(k.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (k) => `0px 0px 0px 2px ${xr(k.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: d ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: !1, min: 0, step: 1, value: u, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => g(!1), onWheel: (k) => {
969
- p(s(Ct.findNextStep(t.getView().getZoomScale(), k.deltaY < 0, 10)));
664
+ p(s(vt.findNextStep(t.getView().getZoomScale(), k.deltaY < 0, 10)));
970
665
  }, onKeyDown: (k) => {
971
- k.which === he.Down || k.which === he.Right ? (p(s(Ct.findNextStep(t.getView().getZoomScale(), !0, 10))), k.preventDefault()) : k.which === he.Up || k.which === he.Left ? (p(s(Ct.findNextStep(t.getView().getZoomScale(), !1, 10))), k.preventDefault()) : k.which !== he.Enter && k.which !== he.Escape || f();
666
+ k.which === he.Down || k.which === he.Right ? (p(s(vt.findNextStep(t.getView().getZoomScale(), !0, 10))), k.preventDefault()) : k.which === he.Up || k.which === he.Left ? (p(s(vt.findNextStep(t.getView().getZoomScale(), !1, 10))), k.preventDefault()) : k.which !== he.Enter && k.which !== he.Escape || f();
972
667
  }, onChange: (k, E) => {
973
668
  Math.abs(E - 100) < 3 ? p(100) : p(E);
974
669
  }, valueLabelFormat: (k, E) => `Zoom: ${Math.round(h)}%` }), o(Et, { disableInteractive: !0, title: "Zoom In", children: o(ct, { sx: { padding: "0", "&:hover:not([disabled])": { color: (k) => k.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (k) => {
975
- k.button !== 0 ? k.preventDefault() : C(k);
670
+ k.button !== 0 ? k.preventDefault() : v(k);
976
671
  }, children: o(ye, { iconKey: "Add" }) }) }), I(O, { sx: { display: "flex", flexDirection: "row" }, children: [o(O, { sx: { minWidth: "8px" } }), o(Fe, { noWrap: !0, component: "div", onClick: () => {
977
672
  p(100);
978
- }, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: v }, children: o("div", { children: Math.round(h) + "%" }) })] })] });
673
+ }, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: C }, children: o("div", { children: Math.round(h) + "%" }) })] })] });
979
674
  }));
980
- Ga.displayName = "SheetZoomScale";
981
- const qa = U(X((n, a) => {
675
+ za.displayName = "SheetZoomScale";
676
+ const Ha = U(X((n, a) => {
982
677
  const { sx: t, sheet: e, gridStyle: r, children: l, childrenEnd: c, ...h } = n, i = xe(null);
983
678
  le(() => {
984
679
  const s = (u) => u.preventDefault();
@@ -990,17 +685,21 @@ const qa = U(X((n, a) => {
990
685
  const s = d.getMode();
991
686
  return s?.description ? s.description : "Ready";
992
687
  }, [d]), [b, p] = V(!1);
993
- return I(O, { className: "statusBar", ref: yt([i, a]), sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: b ? "visible" : "hidden", boxShadow: `0px -1px 0px ${r.header.edgeStrokeFill}`, zIndex: 1e3, ...t }, onMouseOver: () => p(!0), onMouseLeave: () => p(!1), ...h, children: [l, o("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: o(Fe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (s) => s.palette.text.secondary }, variant: "caption", children: g }) }), c ? o(O, { sx: { display: "flex", alignItems: "center" }, children: c }) : null, o(Q, { style: { marginTop: "6px", marginBottom: "6px" } }), o(Ga, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: e })] });
688
+ return I(O, { className: "statusBar", ref: yt([i, a]), sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: b ? "visible" : "hidden", boxShadow: `0px -1px 0px ${r.header.edgeStrokeFill}`, zIndex: 1e3, ...t }, onMouseOver: () => p(!0), onMouseLeave: () => p(!1), ...h, children: [l, o("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: o(Fe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (s) => s.palette.text.secondary }, variant: "caption", children: g }) }), c ? o(O, { sx: { display: "flex", alignItems: "center" }, children: c }) : null, o(Q, { style: { marginTop: "6px", marginBottom: "6px" } }), o(za, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: e })] });
994
689
  }));
995
- qa.displayName = "StatusBar";
996
- var kr, Tr, yn, Er, Dr, zo = { exports: {} }, ho = {}, go = { exports: {} }, Rr = {}, Mr = { exports: {} };
997
- function dc() {
998
- return Tr ? kr : (Tr = 1, kr = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
690
+ Ha.displayName = "StatusBar";
691
+ var To = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
692
+ function Gd(n) {
693
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
999
694
  }
1000
- function pc() {
1001
- if (Er) return yn;
1002
- Er = 1;
1003
- var n = dc();
695
+ var vr, kr, yn, Tr, Er, zo = { exports: {} }, mo = {}, ho = { exports: {} }, Dr = {}, Rr = { exports: {} };
696
+ function Gs() {
697
+ return kr ? vr : (kr = 1, vr = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
698
+ }
699
+ function qs() {
700
+ if (Tr) return yn;
701
+ Tr = 1;
702
+ var n = Gs();
1004
703
  function a() {
1005
704
  }
1006
705
  function t() {
@@ -1021,11 +720,11 @@ function pc() {
1021
720
  }, yn;
1022
721
  }
1023
722
  function cn() {
1024
- return Dr || (Dr = 1, Mr.exports = pc()()), Mr.exports;
723
+ return Er || (Er = 1, Rr.exports = qs()()), Rr.exports;
1025
724
  }
1026
- var Nr, Ho = { exports: {} }, Pr, He = {}, wt = {};
725
+ var Mr, Ho = { exports: {} }, Nr, He = {}, wt = {};
1027
726
  function dn() {
1028
- return Pr || (Pr = 1, Object.defineProperty(wt, "__esModule", { value: !0 }), wt.dontSetMe = function(n, a, t) {
727
+ return Nr || (Nr = 1, Object.defineProperty(wt, "__esModule", { value: !0 }), wt.dontSetMe = function(n, a, t) {
1029
728
  if (n[a]) return new Error(`Invalid prop ${a} passed to ${t} - do not set this, set it on the child.`);
1030
729
  }, wt.findInArray = function(n, a) {
1031
730
  for (let t = 0, e = n.length; t < e; t++) if (a.apply(a, [n[t], t, n])) return n[t];
@@ -1037,10 +736,10 @@ function dn() {
1037
736
  return typeof n == "number" && !isNaN(n);
1038
737
  }), wt;
1039
738
  }
1040
- var Fr, Or, St = {};
739
+ var Pr, Fr, St = {};
1041
740
  function Zn() {
1042
- if (Or) return He;
1043
- Or = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.addClassName = c, He.addEvent = function(i, d, g, b) {
741
+ if (Fr) return He;
742
+ Fr = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.addClassName = c, He.addEvent = function(i, d, g, b) {
1044
743
  if (!i) return;
1045
744
  const p = { capture: !0, ...b };
1046
745
  i.addEventListener ? i.addEventListener(d, g, p) : i.attachEvent ? i.attachEvent("on" + d, g) : i["on" + d] = g;
@@ -1110,8 +809,8 @@ function Zn() {
1110
809
  return w;
1111
810
  })(i, d);
1112
811
  })((function() {
1113
- if (Fr) return St;
1114
- Fr = 1, Object.defineProperty(St, "__esModule", { value: !0 }), St.browserPrefixToKey = g, St.browserPrefixToStyle = function(b, p) {
812
+ if (Pr) return St;
813
+ Pr = 1, Object.defineProperty(St, "__esModule", { value: !0 }), St.browserPrefixToKey = g, St.browserPrefixToStyle = function(b, p) {
1115
814
  return p ? `-${p.toLowerCase()}-${b}` : b;
1116
815
  }, St.default = void 0, St.getPrefix = d;
1117
816
  const i = ["Moz", "Webkit", "O", "ms"];
@@ -1160,10 +859,10 @@ function Zn() {
1160
859
  }
1161
860
  return He;
1162
861
  }
1163
- var Br, lt = {};
1164
- function Ka() {
1165
- if (Br) return lt;
1166
- Br = 1, Object.defineProperty(lt, "__esModule", { value: !0 }), lt.canDragX = function(e) {
862
+ var Or, lt = {};
863
+ function Wa() {
864
+ if (Or) return lt;
865
+ Or = 1, Object.defineProperty(lt, "__esModule", { value: !0 }), lt.canDragX = function(e) {
1167
866
  return e.props.axis === "both" || e.props.axis === "x";
1168
867
  }, lt.canDragY = function(e) {
1169
868
  return e.props.axis === "both" || e.props.axis === "y";
@@ -1205,28 +904,28 @@ function Ka() {
1205
904
  }
1206
905
  return lt;
1207
906
  }
1208
- var Ar, Ir, Lr, zr, fo = {}, Wo = {};
1209
- function Xa() {
1210
- return Ar || (Ar = 1, Object.defineProperty(Wo, "__esModule", { value: !0 }), Wo.default = function() {
907
+ var Br, Ar, Ir, Lr, go = {}, Wo = {};
908
+ function ja() {
909
+ return Br || (Br = 1, Object.defineProperty(Wo, "__esModule", { value: !0 }), Wo.default = function() {
1211
910
  }), Wo;
1212
911
  }
1213
- function uc() {
1214
- if (Ir) return fo;
1215
- Ir = 1, Object.defineProperty(fo, "__esModule", { value: !0 }), fo.default = void 0;
912
+ function Xs() {
913
+ if (Ar) return go;
914
+ Ar = 1, Object.defineProperty(go, "__esModule", { value: !0 }), go.default = void 0;
1216
915
  var n = (function(s, u) {
1217
916
  if (typeof WeakMap == "function") var x = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap();
1218
917
  return (function(m, f) {
1219
918
  if (!f && m && m.__esModule) return m;
1220
- var y, C, S = { __proto__: null, default: m };
919
+ var y, v, S = { __proto__: null, default: m };
1221
920
  if (m === null || typeof m != "object" && typeof m != "function") return S;
1222
921
  if (y = f ? w : x) {
1223
922
  if (y.has(m)) return y.get(m);
1224
923
  y.set(m, S);
1225
924
  }
1226
- for (const v in m) v !== "default" && {}.hasOwnProperty.call(m, v) && ((C = (y = Object.defineProperty) && Object.getOwnPropertyDescriptor(m, v)) && (C.get || C.set) ? y(S, v, C) : S[v] = m[v]);
925
+ for (const C in m) C !== "default" && {}.hasOwnProperty.call(m, C) && ((v = (y = Object.defineProperty) && Object.getOwnPropertyDescriptor(m, C)) && (v.get || v.set) ? y(S, C, v) : S[C] = m[C]);
1227
926
  return S;
1228
927
  })(s, u);
1229
- })(ne), a = h(cn()), t = h(eo), e = Zn(), r = Ka(), l = dn(), c = h(Xa());
928
+ })(ne), a = h(cn()), t = h(eo), e = Zn(), r = Wa(), l = dn(), c = h(ja());
1230
929
  function h(s) {
1231
930
  return s && s.__esModule ? s : { default: s };
1232
931
  }
@@ -1234,9 +933,9 @@ function uc() {
1234
933
  return (u = (function(w) {
1235
934
  var m = (function(f, y) {
1236
935
  if (typeof f != "object" || !f) return f;
1237
- var C = f[Symbol.toPrimitive];
1238
- if (C !== void 0) {
1239
- var S = C.call(f, y);
936
+ var v = f[Symbol.toPrimitive];
937
+ if (v !== void 0) {
938
+ var S = v.call(f, y);
1240
939
  if (typeof S != "object") return S;
1241
940
  throw new TypeError("@@toPrimitive must return a primitive value.");
1242
941
  }
@@ -1259,8 +958,8 @@ function uc() {
1259
958
  this.touchIdentifier = w;
1260
959
  const m = (0, r.getControlPosition)(s, w, this);
1261
960
  if (m == null) return;
1262
- const { x: f, y } = m, C = (0, r.createCoreData)(this, f, y);
1263
- (0, c.default)("DraggableCore: handleDragStart: %j", C), (0, c.default)("calling", this.props.onStart), this.props.onStart(s, C) !== !1 && this.mounted !== !1 && (this.props.enableUserSelectHack && (0, e.addUserSelectStyles)(x), this.dragging = !0, this.lastX = f, this.lastY = y, (0, e.addEvent)(x, b.move, this.handleDrag), (0, e.addEvent)(x, b.stop, this.handleDragStop));
961
+ const { x: f, y } = m, v = (0, r.createCoreData)(this, f, y);
962
+ (0, c.default)("DraggableCore: handleDragStart: %j", v), (0, c.default)("calling", this.props.onStart), this.props.onStart(s, v) !== !1 && this.mounted !== !1 && (this.props.enableUserSelectHack && (0, e.addUserSelectStyles)(x), this.dragging = !0, this.lastX = f, this.lastY = y, (0, e.addEvent)(x, b.move, this.handleDrag), (0, e.addEvent)(x, b.stop, this.handleDragStop));
1264
963
  }), i(this, "handleDrag", (s) => {
1265
964
  const u = (0, r.getControlPosition)(s, this.touchIdentifier, this);
1266
965
  if (u == null) return;
@@ -1284,8 +983,8 @@ function uc() {
1284
983
  if (u == null) return;
1285
984
  let { x, y: w } = u;
1286
985
  if (Array.isArray(this.props.grid)) {
1287
- let y = x - this.lastX || 0, C = w - this.lastY || 0;
1288
- [y, C] = (0, r.snapToGrid)(this.props.grid, y, C), x = this.lastX + y, w = this.lastY + C;
986
+ let y = x - this.lastX || 0, v = w - this.lastY || 0;
987
+ [y, v] = (0, r.snapToGrid)(this.props.grid, y, v), x = this.lastX + y, w = this.lastY + v;
1289
988
  }
1290
989
  const m = (0, r.createCoreData)(this, x, w);
1291
990
  if (this.props.onStop(s, m) === !1 || this.mounted === !1) return !1;
@@ -1313,16 +1012,16 @@ function uc() {
1313
1012
  return n.cloneElement(n.Children.only(this.props.children), { onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp, onTouchEnd: this.onTouchEnd });
1314
1013
  }
1315
1014
  };
1316
- return fo.default = p, i(p, "displayName", "DraggableCore"), i(p, "propTypes", { allowAnyClick: a.default.bool, allowMobileScroll: a.default.bool, children: a.default.node.isRequired, disabled: a.default.bool, enableUserSelectHack: a.default.bool, offsetParent: function(s, u) {
1015
+ return go.default = p, i(p, "displayName", "DraggableCore"), i(p, "propTypes", { allowAnyClick: a.default.bool, allowMobileScroll: a.default.bool, children: a.default.node.isRequired, disabled: a.default.bool, enableUserSelectHack: a.default.bool, offsetParent: function(s, u) {
1317
1016
  if (s[u] && s[u].nodeType !== 1) throw new Error("Draggable's offsetParent must be a DOM Node.");
1318
1017
  }, grid: a.default.arrayOf(a.default.number), handle: a.default.string, cancel: a.default.string, nodeRef: a.default.object, onStart: a.default.func, onDrag: a.default.func, onStop: a.default.func, onMouseDown: a.default.func, scale: a.default.number, className: l.dontSetMe, style: l.dontSetMe, transform: l.dontSetMe }), i(p, "defaultProps", { allowAnyClick: !1, allowMobileScroll: !1, disabled: !1, enableUserSelectHack: !0, onStart: function() {
1319
1018
  }, onDrag: function() {
1320
1019
  }, onStop: function() {
1321
1020
  }, onMouseDown: function() {
1322
- }, scale: 1 }), fo;
1021
+ }, scale: 1 }), go;
1323
1022
  }
1324
- function mc() {
1325
- return Lr || (Lr = 1, (function(n) {
1023
+ function Ys() {
1024
+ return Ir || (Ir = 1, (function(n) {
1326
1025
  Object.defineProperty(n, "__esModule", { value: !0 }), Object.defineProperty(n, "DraggableCore", { enumerable: !0, get: function() {
1327
1026
  return i.default;
1328
1027
  } }), n.default = void 0;
@@ -1330,32 +1029,32 @@ function mc() {
1330
1029
  if (typeof WeakMap == "function") var w = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap();
1331
1030
  return (function(f, y) {
1332
1031
  if (!y && f && f.__esModule) return f;
1333
- var C, S, v = { __proto__: null, default: f };
1334
- if (f === null || typeof f != "object" && typeof f != "function") return v;
1335
- if (C = y ? m : w) {
1336
- if (C.has(f)) return C.get(f);
1337
- C.set(f, v);
1032
+ var v, S, C = { __proto__: null, default: f };
1033
+ if (f === null || typeof f != "object" && typeof f != "function") return C;
1034
+ if (v = y ? m : w) {
1035
+ if (v.has(f)) return v.get(f);
1036
+ v.set(f, C);
1338
1037
  }
1339
- for (const k in f) k !== "default" && {}.hasOwnProperty.call(f, k) && ((S = (C = Object.defineProperty) && Object.getOwnPropertyDescriptor(f, k)) && (S.get || S.set) ? C(v, k, S) : v[k] = f[k]);
1340
- return v;
1038
+ for (const k in f) k !== "default" && {}.hasOwnProperty.call(f, k) && ((S = (v = Object.defineProperty) && Object.getOwnPropertyDescriptor(f, k)) && (S.get || S.set) ? v(C, k, S) : C[k] = f[k]);
1039
+ return C;
1341
1040
  })(u, x);
1342
1041
  })(ne), t = g(cn()), e = g(eo), r = (function() {
1343
- if (Nr) return Ho.exports;
1042
+ if (Mr) return Ho.exports;
1344
1043
  function u(w) {
1345
1044
  var m, f, y = "";
1346
1045
  if (typeof w == "string" || typeof w == "number") y += w;
1347
1046
  else if (typeof w == "object") if (Array.isArray(w)) {
1348
- var C = w.length;
1349
- for (m = 0; m < C; m++) w[m] && (f = u(w[m])) && (y && (y += " "), y += f);
1047
+ var v = w.length;
1048
+ for (m = 0; m < v; m++) w[m] && (f = u(w[m])) && (y && (y += " "), y += f);
1350
1049
  } else for (f in w) w[f] && (y && (y += " "), y += f);
1351
1050
  return y;
1352
1051
  }
1353
1052
  function x() {
1354
- for (var w, m, f = 0, y = "", C = arguments.length; f < C; f++) (w = arguments[f]) && (m = u(w)) && (y && (y += " "), y += m);
1053
+ for (var w, m, f = 0, y = "", v = arguments.length; f < v; f++) (w = arguments[f]) && (m = u(w)) && (y && (y += " "), y += m);
1355
1054
  return y;
1356
1055
  }
1357
- return Nr = 1, Ho.exports = x, Ho.exports.clsx = x, Ho.exports;
1358
- })(), l = Zn(), c = Ka(), h = dn(), i = g(uc()), d = g(Xa());
1056
+ return Mr = 1, Ho.exports = x, Ho.exports.clsx = x, Ho.exports;
1057
+ })(), l = Zn(), c = Wa(), h = dn(), i = g(Xs()), d = g(ja());
1359
1058
  function g(u) {
1360
1059
  return u && u.__esModule ? u : { default: u };
1361
1060
  }
@@ -1370,15 +1069,15 @@ function mc() {
1370
1069
  }
1371
1070
  function p(u, x, w) {
1372
1071
  return (x = (function(m) {
1373
- var f = (function(y, C) {
1072
+ var f = (function(y, v) {
1374
1073
  if (typeof y != "object" || !y) return y;
1375
1074
  var S = y[Symbol.toPrimitive];
1376
1075
  if (S !== void 0) {
1377
- var v = S.call(y, C);
1378
- if (typeof v != "object") return v;
1076
+ var C = S.call(y, v);
1077
+ if (typeof C != "object") return C;
1379
1078
  throw new TypeError("@@toPrimitive must return a primitive value.");
1380
1079
  }
1381
- return (C === "string" ? String : Number)(y);
1080
+ return (v === "string" ? String : Number)(y);
1382
1081
  })(m, "string");
1383
1082
  return typeof f == "symbol" ? f : f + "";
1384
1083
  })(x)) in u ? Object.defineProperty(u, x, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : u[x] = w, u;
@@ -1397,10 +1096,10 @@ function mc() {
1397
1096
  (0, d.default)("Draggable: onDrag: %j", m);
1398
1097
  const f = (0, c.createDraggableData)(this, m), y = { x: f.x, y: f.y, slackX: 0, slackY: 0 };
1399
1098
  if (this.props.bounds) {
1400
- const { x: C, y: S } = y;
1099
+ const { x: v, y: S } = y;
1401
1100
  y.x += this.state.slackX, y.y += this.state.slackY;
1402
- const [v, k] = (0, c.getBoundPosition)(this, y.x, y.y);
1403
- y.x = v, y.y = k, y.slackX = this.state.slackX + (C - y.x), y.slackY = this.state.slackY + (S - y.y), f.x = y.x, f.y = y.y, f.deltaX = y.x - this.state.x, f.deltaY = y.y - this.state.y;
1101
+ const [C, k] = (0, c.getBoundPosition)(this, y.x, y.y);
1102
+ y.x = C, y.y = k, y.slackX = this.state.slackX + (v - y.x), y.slackY = this.state.slackY + (S - y.y), f.x = y.x, f.y = y.y, f.deltaX = y.x - this.state.x, f.deltaY = y.y - this.state.y;
1404
1103
  }
1405
1104
  if (this.props.onDrag(w, f) === !1) return !1;
1406
1105
  this.setState(y);
@@ -1409,8 +1108,8 @@ function mc() {
1409
1108
  (0, d.default)("Draggable: onDragStop: %j", m);
1410
1109
  const f = { dragging: !1, slackX: 0, slackY: 0 };
1411
1110
  if (this.props.position) {
1412
- const { x: y, y: C } = this.props.position;
1413
- f.x = y, f.y = C;
1111
+ const { x: y, y: v } = this.props.position;
1112
+ f.x = y, f.y = v;
1414
1113
  }
1415
1114
  this.setState(f);
1416
1115
  }), this.state = { dragging: !1, dragged: !1, x: x.position ? x.position.x : x.defaultPosition.x, y: x.position ? x.position.y : x.defaultPosition.y, prevPropsPosition: { ...x.position }, slackX: 0, slackY: 0, isElementSVG: !1 }, !x.position || x.onDrag || x.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.");
@@ -1425,27 +1124,27 @@ function mc() {
1425
1124
  return this.props?.nodeRef?.current ?? e.default.findDOMNode(this);
1426
1125
  }
1427
1126
  render() {
1428
- const { axis: x, bounds: w, children: m, defaultPosition: f, defaultClassName: y, defaultClassNameDragging: C, defaultClassNameDragged: S, position: v, positionOffset: k, scale: E, ...T } = this.props;
1127
+ const { axis: x, bounds: w, children: m, defaultPosition: f, defaultClassName: y, defaultClassNameDragging: v, defaultClassNameDragged: S, position: C, positionOffset: k, scale: E, ...T } = this.props;
1429
1128
  let M = {}, R = null;
1430
- const D = !v || this.state.dragging, N = v || f, $ = { x: (0, c.canDragX)(this) && D ? this.state.x : N.x, y: (0, c.canDragY)(this) && D ? this.state.y : N.y };
1129
+ const D = !C || this.state.dragging, N = C || f, $ = { x: (0, c.canDragX)(this) && D ? this.state.x : N.x, y: (0, c.canDragY)(this) && D ? this.state.y : N.y };
1431
1130
  this.state.isElementSVG ? R = (0, l.createSVGTransform)($, k) : M = (0, l.createCSSTransform)($, k);
1432
- const F = (0, r.clsx)(m.props.className || "", y, { [C]: this.state.dragging, [S]: this.state.dragged });
1131
+ const F = (0, r.clsx)(m.props.className || "", y, { [v]: this.state.dragging, [S]: this.state.dragged });
1433
1132
  return a.createElement(i.default, b({}, T, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), a.cloneElement(a.Children.only(m), { className: F, style: { ...m.props.style, ...M }, transform: R }));
1434
1133
  }
1435
1134
  }
1436
1135
  n.default = s, p(s, "displayName", "Draggable"), p(s, "propTypes", { ...i.default.propTypes, axis: t.default.oneOf(["both", "x", "y", "none"]), bounds: t.default.oneOfType([t.default.shape({ left: t.default.number, right: t.default.number, top: t.default.number, bottom: t.default.number }), t.default.string, t.default.oneOf([!1])]), defaultClassName: t.default.string, defaultClassNameDragging: t.default.string, defaultClassNameDragged: t.default.string, defaultPosition: t.default.shape({ x: t.default.number, y: t.default.number }), positionOffset: t.default.shape({ x: t.default.oneOfType([t.default.number, t.default.string]), y: t.default.oneOfType([t.default.number, t.default.string]) }), position: t.default.shape({ x: t.default.number, y: t.default.number }), className: h.dontSetMe, style: h.dontSetMe, transform: h.dontSetMe }), p(s, "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 });
1437
- })(Rr)), Rr;
1136
+ })(Dr)), Dr;
1438
1137
  }
1439
- function Ya() {
1440
- if (zr) return go.exports;
1441
- zr = 1;
1442
- const { default: n, DraggableCore: a } = mc();
1443
- return go.exports = n, go.exports.default = n, go.exports.DraggableCore = a, go.exports;
1138
+ function $a() {
1139
+ if (Lr) return ho.exports;
1140
+ Lr = 1;
1141
+ const { default: n, DraggableCore: a } = Ys();
1142
+ return ho.exports = n, ho.exports.default = n, ho.exports.DraggableCore = a, ho.exports;
1444
1143
  }
1445
- var Hr, jo = {};
1446
- function hc() {
1447
- if (Hr) return jo;
1448
- Hr = 1, jo.__esModule = !0, jo.cloneElement = function(l, c) {
1144
+ var zr, jo = {};
1145
+ function Zs() {
1146
+ if (zr) return jo;
1147
+ zr = 1, jo.__esModule = !0, jo.cloneElement = function(l, c) {
1449
1148
  return c.style && l.props.style && (c.style = e(e({}, l.props.style), c.style)), c.className && l.props.className && (c.className = l.props.className + " " + c.className), a.default.cloneElement(l, c);
1450
1149
  };
1451
1150
  var n, a = (n = ne) && n.__esModule ? n : { default: n };
@@ -1487,12 +1186,12 @@ function hc() {
1487
1186
  }
1488
1187
  return jo;
1489
1188
  }
1490
- var Wr, jr, bo = {};
1491
- function Za() {
1492
- if (Wr) return bo;
1493
- Wr = 1, bo.__esModule = !0, bo.resizableProps = void 0;
1189
+ var Hr, Wr, fo = {};
1190
+ function Va() {
1191
+ if (Hr) return fo;
1192
+ Hr = 1, fo.__esModule = !0, fo.resizableProps = void 0;
1494
1193
  var n, a = (n = cn()) && n.__esModule ? n : { default: n };
1495
- Ya();
1194
+ $a();
1496
1195
  var t = { axis: a.default.oneOf(["both", "x", "y", "none"]), className: a.default.string, children: a.default.element.isRequired, draggableOpts: a.default.shape({ allowAnyClick: a.default.bool, cancel: a.default.string, children: a.default.node, disabled: a.default.bool, enableUserSelectHack: a.default.bool, offsetParent: a.default.node, grid: a.default.arrayOf(a.default.number), handle: a.default.string, nodeRef: a.default.object, onStart: a.default.func, onDrag: a.default.func, onStop: a.default.func, onMouseDown: a.default.func, scale: a.default.number }), height: function() {
1497
1196
  for (var e = arguments.length, r = new Array(e), l = 0; l < e; l++) r[l] = arguments[l];
1498
1197
  var c, h = r[0];
@@ -1502,11 +1201,11 @@ function Za() {
1502
1201
  var c, h = r[0];
1503
1202
  return h.axis === "both" || h.axis === "x" ? (c = a.default.number).isRequired.apply(c, r) : a.default.number.apply(a.default, r);
1504
1203
  } };
1505
- return bo.resizableProps = t, bo;
1204
+ return fo.resizableProps = t, fo;
1506
1205
  }
1507
- function Qa() {
1508
- if (jr) return ho;
1509
- jr = 1, ho.__esModule = !0, ho.default = void 0;
1206
+ function _a() {
1207
+ if (Wr) return mo;
1208
+ Wr = 1, mo.__esModule = !0, mo.default = void 0;
1510
1209
  var n = (function(p, s) {
1511
1210
  if (p && p.__esModule) return p;
1512
1211
  if (p === null || typeof p != "object" && typeof p != "function") return { default: p };
@@ -1518,7 +1217,7 @@ function Qa() {
1518
1217
  f && (f.get || f.set) ? Object.defineProperty(x, m, f) : x[m] = p[m];
1519
1218
  }
1520
1219
  return x.default = p, u && u.set(p, x), x;
1521
- })(ne), a = Ya(), t = hc(), e = Za(), r = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
1220
+ })(ne), a = $a(), t = Zs(), e = Va(), r = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
1522
1221
  function l(p) {
1523
1222
  if (typeof WeakMap != "function") return null;
1524
1223
  var s = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap();
@@ -1562,8 +1261,8 @@ function Qa() {
1562
1261
  if (typeof m != "object" || m === null) return m;
1563
1262
  var y = m[Symbol.toPrimitive];
1564
1263
  if (y !== void 0) {
1565
- var C = y.call(m, f);
1566
- if (typeof C != "object") return C;
1264
+ var v = y.call(m, f);
1265
+ if (typeof v != "object") return v;
1567
1266
  throw new TypeError("@@toPrimitive must return a primitive value.");
1568
1267
  }
1569
1268
  return (f === "string" ? String : Number)(m);
@@ -1579,7 +1278,7 @@ function Qa() {
1579
1278
  var b = (function(p) {
1580
1279
  var s, u;
1581
1280
  function x() {
1582
- for (var m, f = arguments.length, y = new Array(f), C = 0; C < f; C++) y[C] = arguments[C];
1281
+ for (var m, f = arguments.length, y = new Array(f), v = 0; v < f; v++) y[v] = arguments[v];
1583
1282
  return (m = p.call.apply(p, [this].concat(y)) || this).handleRefs = {}, m.lastHandleRect = null, m.slack = null, m;
1584
1283
  }
1585
1284
  u = p, (s = x).prototype = Object.create(u.prototype), s.prototype.constructor = s, g(s, u);
@@ -1589,39 +1288,39 @@ function Qa() {
1589
1288
  }, w.resetData = function() {
1590
1289
  this.lastHandleRect = this.slack = null;
1591
1290
  }, w.runConstraints = function(m, f) {
1592
- var y = this.props, C = y.minConstraints, S = y.maxConstraints, v = y.lockAspectRatio;
1593
- if (!C && !S && !v) return [m, f];
1594
- if (v) {
1291
+ var y = this.props, v = y.minConstraints, S = y.maxConstraints, C = y.lockAspectRatio;
1292
+ if (!v && !S && !C) return [m, f];
1293
+ if (C) {
1595
1294
  var k = this.props.width / this.props.height, E = m - this.props.width, T = f - this.props.height;
1596
1295
  Math.abs(E) > Math.abs(T * k) ? f = m / k : m = f * k;
1597
1296
  }
1598
1297
  var M = m, R = f, D = this.slack || [0, 0], N = D[0], $ = D[1];
1599
- return m += N, f += $, C && (m = Math.max(C[0], m), f = Math.max(C[1], f)), S && (m = Math.min(S[0], m), f = Math.min(S[1], f)), this.slack = [N + (M - m), $ + (R - f)], [m, f];
1298
+ return m += N, f += $, v && (m = Math.max(v[0], m), f = Math.max(v[1], f)), S && (m = Math.min(S[0], m), f = Math.min(S[1], f)), this.slack = [N + (M - m), $ + (R - f)], [m, f];
1600
1299
  }, w.resizeHandler = function(m, f) {
1601
1300
  var y = this;
1602
- return function(C, S) {
1603
- var v = S.node, k = S.deltaX, E = S.deltaY;
1301
+ return function(v, S) {
1302
+ var C = S.node, k = S.deltaX, E = S.deltaY;
1604
1303
  m === "onResizeStart" && y.resetData();
1605
1304
  var T = (y.props.axis === "both" || y.props.axis === "x") && f !== "n" && f !== "s", M = (y.props.axis === "both" || y.props.axis === "y") && f !== "e" && f !== "w";
1606
1305
  if (T || M) {
1607
- var R = f[0], D = f[f.length - 1], N = v.getBoundingClientRect();
1306
+ var R = f[0], D = f[f.length - 1], N = C.getBoundingClientRect();
1608
1307
  y.lastHandleRect != null && (D === "w" && (k += N.left - y.lastHandleRect.left), R === "n" && (E += N.top - y.lastHandleRect.top)), y.lastHandleRect = N, D === "w" && (k = -k), R === "n" && (E = -E);
1609
1308
  var $ = y.props.width + (T ? k / y.props.transformScale : 0), F = y.props.height + (M ? E / y.props.transformScale : 0), z = y.runConstraints($, F);
1610
1309
  $ = z[0], F = z[1];
1611
1310
  var P = $ !== y.props.width || F !== y.props.height, j = typeof y.props[m] == "function" ? y.props[m] : null;
1612
- j && !(m === "onResize" && !P) && (C.persist == null || C.persist(), j(C, { node: v, size: { width: $, height: F }, handle: f })), m === "onResizeStop" && y.resetData();
1311
+ j && !(m === "onResize" && !P) && (v.persist == null || v.persist(), j(v, { node: C, size: { width: $, height: F }, handle: f })), m === "onResizeStop" && y.resetData();
1613
1312
  }
1614
1313
  };
1615
1314
  }, w.renderResizeHandle = function(m, f) {
1616
1315
  var y = this.props.handle;
1617
1316
  if (!y) return n.createElement("span", { className: "react-resizable-handle react-resizable-handle-" + m, ref: f });
1618
1317
  if (typeof y == "function") return y(m, f);
1619
- var C = i({ ref: f }, typeof y.type == "string" ? {} : { handleAxis: m });
1620
- return n.cloneElement(y, C);
1318
+ var v = i({ ref: f }, typeof y.type == "string" ? {} : { handleAxis: m });
1319
+ return n.cloneElement(y, v);
1621
1320
  }, w.render = function() {
1622
- var m = this, f = this.props, y = f.children, C = f.className, S = f.draggableOpts;
1321
+ var m = this, f = this.props, y = f.children, v = f.className, S = f.draggableOpts;
1623
1322
  f.width, f.height, f.handle, f.handleSize, f.lockAspectRatio, f.axis, f.minConstraints, f.maxConstraints, f.onResize, f.onResizeStop, f.onResizeStart;
1624
- var v = f.resizeHandles;
1323
+ var C = f.resizeHandles;
1625
1324
  f.transformScale;
1626
1325
  var k = (function(E, T) {
1627
1326
  if (E == null) return {};
@@ -1629,18 +1328,18 @@ function Qa() {
1629
1328
  for (R = 0; R < N.length; R++) M = N[R], T.indexOf(M) >= 0 || (D[M] = E[M]);
1630
1329
  return D;
1631
1330
  })(f, r);
1632
- return (0, t.cloneElement)(y, i(i({}, k), {}, { className: (C ? C + " " : "") + "react-resizable", children: [].concat(y.props.children, v.map(function(E) {
1331
+ return (0, t.cloneElement)(y, i(i({}, k), {}, { className: (v ? v + " " : "") + "react-resizable", children: [].concat(y.props.children, C.map(function(E) {
1633
1332
  var T, M = (T = m.handleRefs[E]) != null ? T : m.handleRefs[E] = n.createRef();
1634
1333
  return n.createElement(a.DraggableCore, c({}, S, { nodeRef: M, key: "resizableHandle-" + E, onStop: m.resizeHandler("onResizeStop", E), onStart: m.resizeHandler("onResizeStart", E), onDrag: m.resizeHandler("onResize", E) }), m.renderResizeHandle(E, M));
1635
1334
  })) }));
1636
1335
  }, x;
1637
1336
  })(n.Component);
1638
- return ho.default = b, b.propTypes = e.resizableProps, b.defaultProps = { axis: "both", handleSize: [20, 20], lockAspectRatio: !1, minConstraints: [20, 20], maxConstraints: [1 / 0, 1 / 0], resizeHandles: ["se"], transformScale: 1 }, ho;
1337
+ return mo.default = b, b.propTypes = e.resizableProps, b.defaultProps = { axis: "both", handleSize: [20, 20], lockAspectRatio: !1, minConstraints: [20, 20], maxConstraints: [1 / 0, 1 / 0], resizeHandles: ["se"], transformScale: 1 }, mo;
1639
1338
  }
1640
- var $r, Vr, xo = {};
1641
- function gc() {
1642
- if ($r) return xo;
1643
- $r = 1, xo.__esModule = !0, xo.default = void 0;
1339
+ var jr, $r, bo = {};
1340
+ function Qs() {
1341
+ if (jr) return bo;
1342
+ jr = 1, bo.__esModule = !0, bo.default = void 0;
1644
1343
  var n = (function(s, u) {
1645
1344
  if (s && s.__esModule) return s;
1646
1345
  if (s === null || typeof s != "object" && typeof s != "function") return { default: s };
@@ -1652,7 +1351,7 @@ function gc() {
1652
1351
  y && (y.get || y.set) ? Object.defineProperty(w, f, y) : w[f] = s[f];
1653
1352
  }
1654
1353
  return w.default = s, x && x.set(s, w), w;
1655
- })(ne), a = l(cn()), t = l(Qa()), e = Za(), r = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
1354
+ })(ne), a = l(cn()), t = l(_a()), e = Va(), r = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
1656
1355
  function l(s) {
1657
1356
  return s && s.__esModule ? s : { default: s };
1658
1357
  }
@@ -1697,9 +1396,9 @@ function gc() {
1697
1396
  return (u = (function(w) {
1698
1397
  var m = (function(f, y) {
1699
1398
  if (typeof f != "object" || f === null) return f;
1700
- var C = f[Symbol.toPrimitive];
1701
- if (C !== void 0) {
1702
- var S = C.call(f, y);
1399
+ var v = f[Symbol.toPrimitive];
1400
+ if (v !== void 0) {
1401
+ var S = v.call(f, y);
1703
1402
  if (typeof S != "object") return S;
1704
1403
  throw new TypeError("@@toPrimitive must return a primitive value.");
1705
1404
  }
@@ -1716,11 +1415,11 @@ function gc() {
1716
1415
  var p = (function(s) {
1717
1416
  var u, x;
1718
1417
  function w() {
1719
- for (var m, f = arguments.length, y = new Array(f), C = 0; C < f; C++) y[C] = arguments[C];
1720
- return (m = s.call.apply(s, [this].concat(y)) || this).state = { width: m.props.width, height: m.props.height, propsWidth: m.props.width, propsHeight: m.props.height }, m.onResize = function(S, v) {
1721
- var k = v.size;
1418
+ for (var m, f = arguments.length, y = new Array(f), v = 0; v < f; v++) y[v] = arguments[v];
1419
+ return (m = s.call.apply(s, [this].concat(y)) || this).state = { width: m.props.width, height: m.props.height, propsWidth: m.props.width, propsHeight: m.props.height }, m.onResize = function(S, C) {
1420
+ var k = C.size;
1722
1421
  m.props.onResize ? (S.persist == null || S.persist(), m.setState(k, function() {
1723
- return m.props.onResize && m.props.onResize(S, v);
1422
+ return m.props.onResize && m.props.onResize(S, C);
1724
1423
  })) : m.setState(k);
1725
1424
  }, m;
1726
1425
  }
@@ -1729,7 +1428,7 @@ function gc() {
1729
1428
  }, w.prototype.render = function() {
1730
1429
  var m = this.props, f = m.handle, y = m.handleSize;
1731
1430
  m.onResize;
1732
- var C = m.onResizeStart, S = m.onResizeStop, v = m.draggableOpts, k = m.minConstraints, E = m.maxConstraints, T = m.lockAspectRatio, M = m.axis;
1431
+ var v = m.onResizeStart, S = m.onResizeStop, C = m.draggableOpts, k = m.minConstraints, E = m.maxConstraints, T = m.lockAspectRatio, M = m.axis;
1733
1432
  m.width, m.height;
1734
1433
  var R = m.resizeHandles, D = m.style, N = m.transformScale, $ = (function(F, z) {
1735
1434
  if (F == null) return {};
@@ -1737,33 +1436,33 @@ function gc() {
1737
1436
  for (j = 0; j < de.length; j++) P = de[j], z.indexOf(P) >= 0 || (te[P] = F[P]);
1738
1437
  return te;
1739
1438
  })(m, r);
1740
- return n.createElement(t.default, { axis: M, draggableOpts: v, handle: f, handleSize: y, height: this.state.height, lockAspectRatio: T, maxConstraints: E, minConstraints: k, onResizeStart: C, onResize: this.onResize, onResizeStop: S, resizeHandles: R, transformScale: N, width: this.state.width }, n.createElement("div", h({}, $, { style: d(d({}, D), {}, { width: this.state.width + "px", height: this.state.height + "px" }) })));
1439
+ return n.createElement(t.default, { axis: M, draggableOpts: C, handle: f, handleSize: y, height: this.state.height, lockAspectRatio: T, maxConstraints: E, minConstraints: k, onResizeStart: v, onResize: this.onResize, onResizeStop: S, resizeHandles: R, transformScale: N, width: this.state.width }, n.createElement("div", h({}, $, { style: d(d({}, D), {}, { width: this.state.width + "px", height: this.state.height + "px" }) })));
1741
1440
  }, w;
1742
1441
  })(n.Component);
1743
- return xo.default = p, p.propTypes = d(d({}, e.resizableProps), {}, { children: a.default.element }), xo;
1442
+ return bo.default = p, p.propTypes = d(d({}, e.resizableProps), {}, { children: a.default.element }), bo;
1744
1443
  }
1745
- var fc = (Vr || (Vr = 1, zo.exports = function() {
1444
+ var Js = ($r || ($r = 1, zo.exports = function() {
1746
1445
  throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable");
1747
- }, zo.exports.Resizable = Qa().default, zo.exports.ResizableBox = gc().default), zo.exports);
1748
- const Ja = U(X((n, a) => {
1749
- const { disabled: t, names: e, workbook: r, restoreFocus: l, readonly: c = !1, disabled: h = !1, propsCommandPopupButton: i, sx: d, ...g } = n, b = sn(), [p, s] = V(null), [u, x] = V(() => r.getSelectedRanges().getCoords()), [w, m] = V(!1), { reference: f } = ao({ parentFloat: i?.parentFloat }), [y, C] = V(() => c || !r.getProtection().isStructureAllowed()), S = () => p?.text ?? "", [v, k] = V(S), E = Z(() => {
1750
- if (f?.closeAll(), !v) {
1446
+ }, zo.exports.Resizable = _a().default, zo.exports.ResizableBox = Qs().default), zo.exports);
1447
+ const Ua = U(X((n, a) => {
1448
+ const { disabled: t, names: e, workbook: r, restoreFocus: l, readonly: c = !1, disabled: h = !1, propsCommandPopupButton: i, sx: d, ...g } = n, b = sn(), [p, s] = V(null), [u, x] = V(() => r.getSelectedRanges().getCoords()), [w, m] = V(!1), { reference: f } = ao({ parentFloat: i?.parentFloat }), [y, v] = V(() => c || !r.getProtection().isStructureAllowed()), S = () => p?.text ?? "", [C, k] = V(S), E = Z(() => {
1449
+ if (f?.closeAll(), !C) {
1751
1450
  const oe = S();
1752
1451
  return k(S()), oe;
1753
1452
  }
1754
- if (S() === v) return v;
1755
- const A = v.trim().toLowerCase();
1756
- if (A === "r" || A === "c") return v;
1453
+ if (S() === C) return C;
1454
+ const A = C.trim().toLowerCase();
1455
+ if (A === "r" || A === "c") return C;
1757
1456
  try {
1758
- const oe = r.getRanges(v);
1457
+ const oe = r.getRanges(C);
1759
1458
  if (oe) return oe.toString();
1760
1459
  } catch {
1761
1460
  }
1762
- const H = e.getByName(v);
1763
- if (H && H.getRanges()) return v;
1461
+ const H = e.getByName(C);
1462
+ if (H && H.getRanges()) return C;
1764
1463
  let ie = null;
1765
1464
  try {
1766
- const oe = r.getRanges(v), Y = oe.getCoords().map((G) => ({ $colEnd: !0, $rowEnd: !0, $colStart: !0, $rowStart: !0, ...G }));
1465
+ const oe = r.getRanges(C), Y = oe.getCoords().map((K) => ({ $colEnd: !0, $rowEnd: !0, $colStart: !0, $rowStart: !0, ...K }));
1767
1466
  ie = r.getRanges(Y);
1768
1467
  } catch {
1769
1468
  }
@@ -1772,13 +1471,13 @@ const Ja = U(X((n, a) => {
1772
1471
  ie = r.getRanges(oe);
1773
1472
  }
1774
1473
  try {
1775
- let oe = e.getByName(v);
1776
- y || oe || (oe = e.addReference(v, ie)), oe && s({ text: oe.getName() });
1474
+ let oe = e.getByName(C);
1475
+ y || oe || (oe = e.addReference(C, ie)), oe && s({ text: oe.getName() });
1777
1476
  } catch (oe) {
1778
1477
  k(S()), b.showMessage?.(oe.message, { type: kt.Error });
1779
1478
  }
1780
1479
  return null;
1781
- }, [v, e, f, y, b]), T = Z(() => {
1480
+ }, [C, e, f, y, b]), T = Z(() => {
1782
1481
  if (r.isClosed()) return;
1783
1482
  const A = [];
1784
1483
  for (let oe = 0; oe < u.length; oe++) {
@@ -1802,17 +1501,17 @@ const Ja = U(X((n, a) => {
1802
1501
  }, [p, u]);
1803
1502
  const [D, N] = V(r?.getSelectedSheet());
1804
1503
  je(r, { onProtectionChange: (A) => {
1805
- C(c || !A.getProtection().isStructureAllowed());
1504
+ v(c || !A.getProtection().isStructureAllowed());
1806
1505
  }, onSheetsChange: (A) => {
1807
1506
  N(A?.getSelectedSheet());
1808
1507
  }, onViewChange(A) {
1809
1508
  N(A?.getSelectedSheet());
1810
1509
  } });
1811
- const [$, F] = V(null), z = Z(Ct.debounce(T, $ ? 320 : 0), []);
1510
+ const [$, F] = V(null), z = Z(vt.debounce(T, $ ? 320 : 0), []);
1812
1511
  je(D.getSelection(), { onChange: () => {
1813
1512
  x((A) => {
1814
1513
  const H = r.getSelectedRanges().getCoords();
1815
- return Cl.isEqualRangesArrays(H, A) ? A : H;
1514
+ return Sl.isEqualRangesArrays(H, A) ? A : H;
1816
1515
  });
1817
1516
  }, onAdjustingChange: (A) => {
1818
1517
  F(A.getAdjusting());
@@ -1826,13 +1525,13 @@ const Ja = U(X((n, a) => {
1826
1525
  }, [u, r, $]);
1827
1526
  const P = xe(null), j = _((A) => {
1828
1527
  const { onMouseDown: H, onMouseUp: ie, ...oe } = A;
1829
- return o(ct, { ...oe, sx: { ...oe?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: !0, children: o(Vn, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: !1, spellCheck: !1, autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", enterKeyHint: "done", ref: P }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (Y) => `1px solid ${Y.palette.text.icon ?? Y.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (Y) => `1px solid ${Y.palette.primary.main}` }, "::after": { borderBottom: (Y) => `1px solid ${Y.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", height: "1rem", fontSize: 11 * _t.getDeviceScale(), fontStyle: p?.fontStyle, paddingLeft: (Y) => Y.spacing(0.75), paddingRight: (Y) => Y.spacing(0.75), boxShadow: "none", flex: "1", color: (Y) => Y.palette.text.secondary, input: { padding: "0", height: "1rem", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (Y) => Y.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (Y) => Y.palette.text.primary } } }, value: v, onFocus: (Y) => {
1528
+ return o(ct, { ...oe, sx: { ...oe?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: !0, children: o(Vn, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: !1, spellCheck: !1, autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", enterKeyHint: "done", ref: P }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (Y) => `1px solid ${Y.palette.text.icon ?? Y.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (Y) => `1px solid ${Y.palette.primary.main}` }, "::after": { borderBottom: (Y) => `1px solid ${Y.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", height: "1rem", fontSize: 11 * _t.getDeviceScale(), fontStyle: p?.fontStyle, paddingLeft: (Y) => Y.spacing(0.75), paddingRight: (Y) => Y.spacing(0.75), boxShadow: "none", flex: "1", color: (Y) => Y.palette.text.secondary, input: { padding: "0", height: "1rem", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (Y) => Y.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (Y) => Y.palette.text.primary } } }, value: C, onFocus: (Y) => {
1830
1529
  Y.target?.select();
1831
1530
  }, onKeyDown: (Y) => {
1832
1531
  if (Y.which === he.Enter || Y.which === he.Tab) {
1833
- let G = v;
1834
- S() !== v && (Y.stopPropagation(), Y.preventDefault(), G = E()), G ? te(G) : l?.();
1835
- } else if (Y.which === he.Escape) S() !== v ? (k(S()), setTimeout(() => {
1532
+ let K = C;
1533
+ S() !== C && (Y.stopPropagation(), Y.preventDefault(), K = E()), K ? te(K) : l?.();
1534
+ } else if (Y.which === he.Escape) S() !== C ? (k(S()), setTimeout(() => {
1836
1535
  Y.target?.select();
1837
1536
  }, 0), Y.stopPropagation(), Y.preventDefault()) : l?.();
1838
1537
  else if (Y.which === he.Space) return void Y.stopPropagation();
@@ -1841,7 +1540,7 @@ const Ja = U(X((n, a) => {
1841
1540
  }, onChange: (Y) => {
1842
1541
  k(Y.target.value);
1843
1542
  } }) });
1844
- }, [v, p]), te = Z(async (A) => {
1543
+ }, [C, p]), te = Z(async (A) => {
1845
1544
  try {
1846
1545
  f?.closeAll();
1847
1546
  const H = e.lookupByRanges(A)?.[0];
@@ -1849,104 +1548,263 @@ const Ja = U(X((n, a) => {
1849
1548
  } catch (H) {
1850
1549
  b.showMessage?.(H.message, { type: kt.Error });
1851
1550
  }
1852
- }, [e, b, r]), de = _((A) => {
1853
- setTimeout(() => {
1854
- m(!0);
1855
- }, 0);
1856
- const H = { variant: re.Menuitem, parentFloat: A.floatReference, commandHook: { ...i?.commandHook, beforeExecute: (Te, Ie) => (f?.closeAll(), i?.commandHook?.beforeExecute?.(Te, Ie)) }, scope: i?.scope, commands: i?.commands };
1857
- let ie = e.getItems({ scope: r?.getSelectedSheet().getName() });
1858
- ie = ie.sort((Te, Ie) => Te.getType() === Ie.getType() ? Te.getName().localeCompare(Ie.getName()) : Te.getType() === "range" ? -1 : 1);
1859
- const oe = y ? null : ["editNamedReference", "deleteNamedReference"], Y = y ? null : ["editTable", null, "convertTableToRange", "deleteTable"], G = [], pe = ie.length;
1860
- for (let Te = 0; Te < pe; Te++) {
1861
- const Ie = ie[Te], me = Ie.getRanges();
1862
- if (!me || Ie.isHidden()) continue;
1863
- const ue = Ie.getType();
1864
- ue !== ie[Te - 1]?.getType() && (Te > 0 && G.push(o(Q, { orientation: "horizontal" }, `type-divider-${G.length}`)), G.push(o(ro, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: Ie.getType() === "reference" ? "Ranges" : "Tables" }, `type-header-${G.length}`))), ue === "reference" ? G.push(De(Ke, { ...H, key: "named-" + G.length, popupCommandKeys: oe, popupScope: "namedItem", scope: "namedItem", commandState: Ie, commands: i?.commands, label: Ie.getName(), quickCommand: "selectNamed", disabled: !Ie.getRanges() || h, icon: "NamedRange" })) : ue === "table" && G.push(De(Ke, { ...H, key: "namedItem-" + G.length, popupCommandKeys: Y, popupScope: "namedItem", scope: "namedItem", commands: i?.commands, commandState: Ie, label: Ie.getName(), quickCommand: "selectNamed", disabled: !me || h, icon: "InsertTable" }));
1551
+ }, [e, b, r]), de = _((A) => {
1552
+ setTimeout(() => {
1553
+ m(!0);
1554
+ }, 0);
1555
+ const H = { variant: re.Menuitem, parentFloat: A.floatReference, commandHook: { ...i?.commandHook, beforeExecute: (Te, Ie) => (f?.closeAll(), i?.commandHook?.beforeExecute?.(Te, Ie)) }, scope: i?.scope, commands: i?.commands };
1556
+ let ie = e.getItems({ scope: r?.getSelectedSheet().getName() });
1557
+ ie = ie.sort((Te, Ie) => Te.getType() === Ie.getType() ? Te.getName().localeCompare(Ie.getName()) : Te.getType() === "range" ? -1 : 1);
1558
+ const oe = y ? null : ["editNamedReference", "deleteNamedReference"], Y = y ? null : ["editTable", null, "convertTableToRange", "deleteTable"], K = [], pe = ie.length;
1559
+ for (let Te = 0; Te < pe; Te++) {
1560
+ const Ie = ie[Te], me = Ie.getRanges();
1561
+ if (!me || Ie.isHidden()) continue;
1562
+ const ue = Ie.getType();
1563
+ ue !== ie[Te - 1]?.getType() && (Te > 0 && K.push(o(Q, { orientation: "horizontal" }, `type-divider-${K.length}`)), K.push(o(ro, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: Ie.getType() === "reference" ? "Ranges" : "Tables" }, `type-header-${K.length}`))), ue === "reference" ? K.push(De(qe, { ...H, key: "named-" + K.length, popupCommandKeys: oe, popupScope: "namedItem", scope: "namedItem", commandState: Ie, commands: i?.commands, label: Ie.getName(), quickCommand: "selectNamed", disabled: !Ie.getRanges() || h, icon: "NamedRange" })) : ue === "table" && K.push(De(qe, { ...H, key: "namedItem-" + K.length, popupCommandKeys: Y, popupScope: "namedItem", scope: "namedItem", commands: i?.commands, commandState: Ie, label: Ie.getName(), quickCommand: "selectNamed", disabled: !me || h, icon: "InsertTable" }));
1564
+ }
1565
+ const Me = I(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g, children: [y ? null : o(B, { ...H, scope: "namedItem", command: i?.commands.getCommand("addNamedReference") }), K && K.length > 0 ? I(ae, { children: [y ? null : o(Q, { orientation: "horizontal" }), o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: K })] }) : null] });
1566
+ return ke({ ...A, children: Me });
1567
+ }, [r, M, e, p, y]), se = Rt(a, () => ({ focus(A) {
1568
+ P.current?.focus(A);
1569
+ } }), []);
1570
+ return o(O, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...d }, ref: yt([se, a]), ...g, children: o(Dt, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%" }, ...d }, propsButton: { sx: { backgroundColor: (A) => A.palette.background.paper, backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})` } }, tabIndex: -1, outlined: { color: (A) => t ? A.palette.action.disabled : Se(A.palette.divider, 0.2) }, parentFloat: f, createPopupPanel: de, onPopupOpen: () => m(!0), onPopupClose: () => m(!1), createTooltip: ({ children: A }, H) => o(at, { title: H || w ? "" : "Name Box", disabled: H, leaveDelay: 0, sx: { opacity: H || w ? 0 : 1 }, children: A }), renderQuickButton: j }) });
1571
+ }));
1572
+ Ua.displayName = "NamedCollectionEditor";
1573
+ const ec = (n, a) => o(Ua, { ref: a, ...n }), Ka = U(X((n, a) => {
1574
+ const { sx: t, workbook: e, sheetElement: r, gridStyle: l, showNamedCollectionEditor: c = !0, propsNamedCollectionEditor: h, renderNamedCollectionEditor: i = ec, disabled: d, commands: g, ...b } = n, [p, s] = V(e?.getSelectedSheet()), [u, x] = V(p.getSelectedCell().getCoords()), [w, m] = V(!1), f = d || w;
1575
+ je(e, { onSheetsChange: (K) => {
1576
+ const pe = K?.getSelectedSheet();
1577
+ x(pe.getSelectedCell().getCoords()), s(pe);
1578
+ }, onViewChange(K) {
1579
+ const pe = K?.getSelectedSheet();
1580
+ x(pe.getSelectedCell().getCoords()), s(pe);
1581
+ } });
1582
+ const y = xe(null), v = L(() => ({ fontSize: 11 }), []);
1583
+ je(p.getSelection(), { onChange: () => {
1584
+ const K = p.getSelectedCell();
1585
+ m(!K.isEditAllowed()), x(K.getCoords());
1586
+ } }), je(p, { onProtectionChange() {
1587
+ m(!p.getSelectedCell().isEditAllowed());
1588
+ } });
1589
+ const S = y.current?.getLineHeight() ?? 20, [C, k] = V(S), [E, T] = V(5), [M, R] = V(1), D = Z((K, { size: pe }) => {
1590
+ K.preventDefault(), K.stopPropagation();
1591
+ const Me = Math.floor(pe.height / S);
1592
+ k(Me * S + 1), Me > 1 && T(Me);
1593
+ }, [S]), N = Z((K, { size: pe }) => {
1594
+ const Me = Math.floor(pe.height / S);
1595
+ R(Me);
1596
+ }, [S]), $ = ln(), F = $.getMode();
1597
+ let z = null;
1598
+ F?.key === "edit" && (z = F.args?.stateAndCoords);
1599
+ const P = L(() => {
1600
+ let K = z?.editState;
1601
+ return K || (K = El(() => p.getRange(u).getCell())), o(O, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: o(Dl, { ref: y, activeCoords: u, sheet: p, onFocus: () => {
1602
+ r?.startEdit({ autoFocus: !1, editMode: !0, cell: u });
1603
+ }, defaultTextStyle: v, useRichStyling: !1, disabled: f, onChangeEdit: (pe) => {
1604
+ if (pe.dirty !== void 0) {
1605
+ const Me = { sheet: p, coords: u, editState: pe };
1606
+ $.setMode((Te) => ({ ...Te, args: { ...Te?.args, stateAndCoords: Me } }));
1607
+ }
1608
+ }, editState: K, commands: g, onCancelEdit: () => {
1609
+ r?.cancelEdit(), r?.focus();
1610
+ }, onSubmitEdit: () => {
1611
+ r?.submitEdit(), r?.focus();
1612
+ }, linesVisible: M }) });
1613
+ }, [p, z, u, M, r]), j = xe(null), te = L(() => c ? i({ names: e.getNames(), workbook: e, ...h }, j) : null, [i, h, c, p, e, f]), de = L(() => I(xt, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})`, border: (K) => `solid ${f ? K.palette.action.disabled : Se(K.palette.divider, 0.2)} 1px` }, children: [o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "warning", "aria-label": "cancel-formula-edit", icon: o(ye, { iconKey: "CloseError" }), propsTooltip: { label: "Cancel", simple: !0 }, disabled: f || z === null, onMouseDown: (K) => {
1614
+ K.button === 0 && K.preventDefault();
1615
+ }, onClick: () => {
1616
+ r.cancelEdit();
1617
+ } }), o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "primary", "aria-label": "commit-formula-edit", icon: o(ye, { iconKey: "CheckSuccess" }), propsTooltip: { label: "Enter", simple: !0 }, disabled: f || z === null, onMouseDown: (K) => {
1618
+ K.button === 0 && K.preventDefault();
1619
+ }, onClick: () => {
1620
+ r.submitEdit();
1621
+ } }), o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, disabled: !0, "aria-label": "commit-formula-function", icon: o(ye, { iconKey: "Function", style: { transform: "scale(0.85)" } }), propsTooltip: { label: "Insert Function", simple: !0 }, onMouseDown: (K) => {
1622
+ K.button === 0 && K.preventDefault();
1623
+ } })] }), [f, z]), se = Je(), [A, H] = V(!1), ie = L(() => I(O, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (K) => K.spacing(0.5), alignItems: "start" }, children: [de, I(xt, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (K) => K.typography.fontFamily, fontSize: 11 * _t.getDeviceScale(), alignItems: "stretch", paddingTop: "2px", paddingBottom: "2px", boxShadow: "none", borderRadius: (K) => `${K.shape.borderRadius}px`, backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})`, border: (K) => `solid ${f ? K.palette.action.disabled : Se(K.palette.divider, 0.2)} 1px`, "& textarea": { color: (K) => f ? `${K.palette.text.disabled} !important` : K.palette.text.primary }, "& .react-resizable-handle": { width: "100%", height: "8px", backgroundColor: "transparent", boxSizing: "content-box", zIndex: 1e3 }, "& .react-resizable-handle-s": { position: "absolute", bottom: "-10px", cursor: "s-resize" } }, onFocus: () => H(!0), onBlur: () => H(!1), onMouseDown: (K) => {
1624
+ K.target?.classList.contains("react-resizable-handle") && K.preventDefault();
1625
+ }, children: [o(O, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignItems: "center", marginTop: "0px", paddingLeft: (K) => K.spacing(1), paddingRight: (K) => K.spacing(1) }, children: o(Js.ResizableBox, { height: C, draggableOpts: { grid: [S, S] }, minConstraints: [S, S], maxConstraints: [15 * S, 15 * S], onResize: N, onResizeStop: D, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: P }) }), o(bt, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, "aria-label": "toggle-expand-formula-edit", icon: o(ye, { iconKey: M > 1 ? "ExpandLess" : "ExpandMore" }), propsTooltip: { label: (M > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: !0 }, onMouseDown: (K) => {
1626
+ K.button === 0 && K.preventDefault();
1627
+ }, onClick: () => {
1628
+ const K = M > 1 ? 1 : E;
1629
+ k(K * S + 1), R(K);
1630
+ } }), o(O, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: A ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (K) => K.palette.primary.main, borderRadius: (K) => `${K.shape.borderRadius}px` } })] })] }), [de, P, A, M, S]), oe = L(() => te || ie ? !te && ie ? ie : te && !ie ? te : o(ae, { children: o(Gn, { fixedPane: "before", minBefore: "165px", minAfter: "200px", propsPaneBefore: { style: { alignItems: "flex-start" } }, propsPaneAfter: { style: { overflow: "visible" } }, propsResizer: { style: { backgroundImage: `url("data:image/svg+xml,%3Csvg width='6' height='13' viewBox='0 0 6 13' version='1.1' fill='${se.palette.text.icon ?? se.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='m 4.5961932,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.88365,0 -1.60005,-0.71626 -1.60005,-1.59991 0,-0.88365 0.7164,-1.6000508 1.60005,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60004 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60005 0,-0.88365 0.7164,-1.59991 1.60005,-1.59991 0.88364,0 1.59991,0.71626 1.59991,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center calc(((var(--icon-size, 24) - 13px + 5px) / 2))", minWidth: "18px", marginRight: "1px" } }, elementBefore: te, elementAfter: ie }) }) : null, [te, ie]), Y = Rt(a, () => ({ isFormulaBarElement: () => !0, getNamedCollectionEditorElement: () => j.current }), []);
1631
+ return o(O, { sx: { display: "flex", flexDirection: "row", gap: (K) => K.spacing(0.5), ...t }, ref: Y, ...b, children: oe });
1632
+ }));
1633
+ Ka.displayName = "FormulaBar";
1634
+ const Ga = U(X((n, a) => {
1635
+ const { filter: t, commands: e, disabled: r, style: l, floatReference: c, ...h } = n, i = L(() => ({}), []), d = L(() => ({ commandHook: { beforeExecute: (p, s) => c.closeAll(), onExecute() {
1636
+ }, onError() {
1637
+ console.log("onError");
1638
+ } }, disabled: r, parentFloat: c }), [r, c]), g = L(() => ({ ...i, ...d, variant: re.Menuitem }), [i, d]), b = I(ae, { children: [o(B, { ...g, command: e.getCommand("sortAscending") }), o(B, { ...g, command: e.getCommand("sortDescending") }), o(Q, { orientation: "horizontal" }), o(B, { ...g, command: e.getCommand("autoFilterClear") }), []] });
1639
+ return o(O, { ref: a, style: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...l }, ...h, children: b });
1640
+ }));
1641
+ Ga.displayName = "FilterColumnMenu";
1642
+ const tc = U(X((n, a) => {
1643
+ const { children: t, className: e, disabled: r, style: l, filter: c, ...h } = n, i = Rt(a, () => ({ isFilters: () => !0 }), []);
1644
+ return o("div", { ref: i, className: Re("filters", e), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...l }, ...h, children: I("div", { style: { flex: "1 1 100%", display: "flex", minHeight: "100px", minWidth: "220px", alignItems: "center", border: "grey solid 1px", padding: "4px 4px", overflow: "hidden", flexDirection: "column", justifyContent: "space-evenly", marginTop: "4px", marginBottom: "4px", marginLeft: "16px", marginRight: "16px" }, children: [o("div", { children: c.getName() }), o("div", { children: "Filter Widget" })] }) });
1645
+ }));
1646
+ tc.displayName = "Filters";
1647
+ const qa = "_sheetxl-reset_11z3j_1", oc = 10, Xa = U(X((n, a) => {
1648
+ const { styles: t, table: e, tableStyle: r = e?.getStyle() ?? t.getDefaultTableStyle(), bodyStyle: l, sx: c, disabled: h, className: i, forceThinBorder: d, cellHeight: g = oc, isLive: b = !1, ...p } = n, s = Math.ceil(1.3 * g), [u, x] = tn((v) => v + 1, 0);
1649
+ le(() => {
1650
+ if (b && e) return e.addListeners({ onAnyChange: () => {
1651
+ x();
1652
+ } });
1653
+ }, [e, b]);
1654
+ const w = L(() => {
1655
+ let v = e?.toJSON() ?? {};
1656
+ const S = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
1657
+ return v && (v.styleOptions = { ...v.styleOptions, name: r.getName() }), v.ref = S, new Wn({ initialAnchor: S, json: v, styles: t });
1658
+ }, [u, e, r, t]), m = L(() => {
1659
+ const v = [];
1660
+ for (let S = 0; S < 5; S++) for (let C = 0; C < 5; C++) {
1661
+ const k = w.getStyleAt({ colIndex: C, rowIndex: S });
1662
+ v.push(k);
1663
+ }
1664
+ return v;
1665
+ }, [w]), f = L(() => {
1666
+ const v = (C, k, E) => {
1667
+ let T = E.getFill().toCSS(l?.darkMode ?? !1);
1668
+ const M = s - (k < 4 ? 1 : 0), R = g - (C < 4 ? 1 : 0), D = E.getFont().getFill().toCSS(l?.darkMode ?? !1);
1669
+ return T = { ...T, position: "absolute", boxSizing: "border-box", left: k * (s - 1), top: C * (g - 1), width: M, height: R }, o("td", { className: `table-style-fill ${C}-${k}`, style: T, children: o("div", { className: `table-style-text ${C}-${k}`, style: { position: "absolute", boxSizing: "border-box", width: "6px", left: (M - 6) / 2, top: (R - 1) / 2, borderTop: `1px solid ${D}` } }) }, `${C}-${k}`);
1670
+ }, S = [];
1671
+ for (let C = 0; C < 5; C++) {
1672
+ const k = [];
1673
+ for (let E = 0; E < 5; E++) {
1674
+ const T = m[5 * C + E];
1675
+ k.push(v(C, E, T));
1676
+ }
1677
+ S.push(o("tr", { children: k }, C));
1678
+ }
1679
+ return S;
1680
+ }, [w, r, l]), y = _((v, S) => m[S].getBorder() ?? null, [m]);
1681
+ return o(O, { ref: a, className: "table-format-preview", sx: { background: l?.fill, filter: h ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...c }, ...p, children: o(jn, { getBorderAt: y, rowCount: 5, columnCount: 5, forceThinBorder: d, width: 5 * (s - 1) + 1, height: 5 * (g - 1) + 1, darkMode: l?.darkMode ?? !1, style: { pointerEvents: "none" }, children: o("table", { className: Re(i, "sheetxl-table-preview", qa), style: { borderCollapse: "collapse", width: 5 * (s - 1) + 1, height: 5 * (g - 1) + 1 }, children: o("tbody", { children: f }) }) }) });
1682
+ })), xo = (n, a, t, e, r) => {
1683
+ n.beginPath(), n.moveTo(a + 0.5, t + 0.5), n.lineTo(e + 0.5, r + 0.5), n.stroke();
1684
+ }, nc = U(X((n, a) => {
1685
+ const { table: t, tableStyle: e, styles: r, bodyStyle: l, disabled: c, style: h, className: i, canvas: d, ...g } = n, b = L(() => {
1686
+ const u = t.toJSON(), x = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
1687
+ return u.styleOptions = { ...u.styleOptions, name: e.getName() }, u.ref = x, new Wn({ initialAnchor: x, json: u, styles: r });
1688
+ }, [t, e, r]), p = L(() => {
1689
+ const u = [];
1690
+ for (let x = 0; x < 5; x++) for (let w = 0; w < 5; w++) {
1691
+ const m = b.getStyleAt({ colIndex: w, rowIndex: x });
1692
+ u.push(m);
1693
+ }
1694
+ return u;
1695
+ }, [b]), s = L(() => {
1696
+ let u = d;
1697
+ if (d || (u = document.createElement("canvas")), !u) return null;
1698
+ u.width !== 61 && (u.width = 61), u.height !== 46 && (u.height = 46);
1699
+ const x = u.getContext("2d", { alpha: !1 });
1700
+ if (!x) return null;
1701
+ const w = 12, m = l?.darkMode ?? !1;
1702
+ for (let f = 0; f < 5; f++) for (let y = 0; y < 5; y++) {
1703
+ const v = p[5 * f + y].getFill();
1704
+ let S = l?.fill;
1705
+ v.getType() === fn.Type.Solid ? S = v.getColor().toCSS(m, !1) : v.getType() === fn.Type.Gradient ? S = v.getStops[0]?.color.toCSS(m, !1) : v.getType() === fn.Type.Pattern && (S = v.getForeground().toCSS(m, !1)), x.fillStyle = S;
1706
+ const C = y * w, k = 9 * f;
1707
+ x.fillRect(C, k, 13, 10);
1708
+ }
1709
+ x.lineWidth = 1;
1710
+ for (let f = 0; f < 5; f++) for (let y = 0; y < 5; y++) {
1711
+ const v = p[5 * f + y], S = y * w, C = 9 * f, k = v.getBorder();
1712
+ if (!k.isEmpty()) {
1713
+ const M = k.getLeft();
1714
+ M.isNone() || (x.strokeStyle = M.getColor().toCSS(m, !1), xo(x, S, C, S, C + 9));
1715
+ const R = k.getTop();
1716
+ R.isNone() || (x.strokeStyle = R.getColor().toCSS(m, !1), xo(x, S, C, S + w, 9 * f));
1717
+ const D = k.getRight();
1718
+ D.isNone() || (x.strokeStyle = D.getColor().toCSS(m, !1), xo(x, S + w, C, S + w, C + 9));
1719
+ const N = k.getBottom();
1720
+ N.isNone() || (x.strokeStyle = N.getColor().toCSS(m, !1), xo(x, S, C + 9, S + w, C + 9));
1721
+ }
1722
+ x.strokeStyle = v.getFont().getFill().toCSS(m, !1);
1723
+ const E = 4, T = 2.5;
1724
+ xo(x, y * w + T, 9 * f + E, y * w + T + 7, 9 * f + E);
1725
+ }
1726
+ return `url(${u.toDataURL()})`;
1727
+ }, [d, b, e, l]);
1728
+ return o("div", { ref: a, className: Re("table-style-preview", i), style: { backgroundImage: s, width: 61, height: 46, ...h }, ...g });
1729
+ })), rc = "_table-style-options-container_1kfn2_1", ac = "_table-style-options_1kfn2_1", ic = U(X((n, a) => {
1730
+ const { styleOptions: t, onStyleOptionsChange: e, showHeaderRow: r, onShowHeaderRowChange: l, showTotalRow: c, onShowTotalRowChange: h, showFilterButton: i, onShowFilterButtonChange: d, sx: g, className: b, disabled: p, ...s } = n;
1731
+ return o("div", { className: rc, children: I(O, { sx: { pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (u) => `${u.spacing(2)}`, marginRight: (u) => `${u.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (u) => `${u.spacing(0.5)}` }, ...g }, ...s, ref: a, className: Re(b, ac), children: [l && o(At, { control: o(It, { checked: r ?? !1, indeterminate: r == null, onChange: () => l(!r), disabled: p || r == null }), label: "Header Row", labelPlacement: "end" }), h && o(At, { control: o(It, { checked: c ?? !1, indeterminate: c == null, onChange: () => h(!c), disabled: p || c == null }), label: "Total Row", labelPlacement: "end" }), o(At, { control: o(It, { checked: t?.showRowStripes ?? !1, indeterminate: !t, disabled: p || !t, onChange: () => {
1732
+ e?.({ ...t, showRowStripes: !t?.showRowStripes });
1733
+ } }), label: "Banded Rows", labelPlacement: "end" }), o(At, { control: o(It, { checked: t?.showFirstColumn ?? !1, indeterminate: !t, disabled: p || !t, onChange: () => {
1734
+ e?.({ ...t, showFirstColumn: !t?.showFirstColumn });
1735
+ } }), label: "First Column", labelPlacement: "end" }), o(At, { control: o(It, { checked: t?.showLastColumn ?? !1, indeterminate: !t, disabled: p || !t, onChange: () => {
1736
+ e?.({ ...t, showLastColumn: !t?.showLastColumn });
1737
+ } }), label: "Last Column", labelPlacement: "end" }), o(At, { control: o(It, { checked: t?.showColumnStripes ?? !1, indeterminate: !t, disabled: p || !t, onChange: () => {
1738
+ e?.({ ...t, showColumnStripes: !t?.showColumnStripes });
1739
+ } }), label: "Banded Columns", labelPlacement: "end" }), d && o(At, { control: o(It, { checked: i ?? !1, indeterminate: i == null, disabled: p || !t || i == null, onChange: () => d(!i) }), label: "Filter Button", labelPlacement: "end" })] }) });
1740
+ }));
1741
+ var lc = function() {
1742
+ }, Ya = typeof window < "u", sc = Ya ? Tt : le, Vr = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
1743
+ const Vt = Ya && window.ResizeObserver !== void 0 ? function() {
1744
+ var n = V(null), a = n[0], t = n[1], e = V(Vr), r = e[0], l = e[1], c = L(function() {
1745
+ return new window.ResizeObserver(function(h) {
1746
+ if (h[0]) {
1747
+ var i = h[0].contentRect, d = i.x, g = i.y, b = i.width, p = i.height, s = i.top, u = i.left, x = i.bottom, w = i.right;
1748
+ l({ x: d, y: g, width: b, height: p, top: s, left: u, bottom: x, right: w });
1749
+ }
1750
+ });
1751
+ }, []);
1752
+ return sc(function() {
1753
+ if (a) return c.observe(a), function() {
1754
+ c.disconnect();
1755
+ };
1756
+ }, [a]), [t, r];
1757
+ } : function() {
1758
+ return [lc, Vr];
1759
+ }, cc = "_range-row_akhf4_1", dc = "_action-row_akhf4_15", pc = U(X((n, a) => {
1760
+ const { title: t, commands: e, className: r, ...l } = n, c = sn(), [h, i] = V(!1), [d, g] = V(!1), b = xe(null), [p, s] = tn((E) => E + 1, 0), [u, { width: x }] = Vt(), w = Ae(e, ["editTable"])[0].getContext(), m = w.table(), [f, y] = V(() => m ? w.getNames().getRanges(m.getRange()) : null), v = L(() => m?.getName() ?? "", [m]);
1761
+ je(w.table(), { onAnchorCoordsChange(E) {
1762
+ y(w.getNames().getRanges(E.getRange()));
1763
+ }, onProtectedChange(E) {
1764
+ s();
1765
+ } });
1766
+ const S = Z((E) => {
1767
+ w?.table().setName(E);
1768
+ }, [w]), C = Z((E) => {
1769
+ w?.table().resize(E.at(0));
1770
+ }, [w]);
1771
+ let k = null;
1772
+ return w.table() || (k = o(Fe, { component: "div", style: { top: "0", left: "0", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center" }, children: "No table selected" })), o(xt, { square: !0, onFocus: () => i(!0), onBlur: (E) => {
1773
+ b?.current?.contains(E.relatedTarget) || i(!1);
1774
+ }, ref: yt([b, u, a]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (E) => E.spacing(1.5), paddingRight: (E) => E.spacing(1.5), paddingTop: (E) => E.spacing(1.5), paddingBottom: (E) => E.spacing(1.5), boxSizing: "border-box" }, className: Re("sxl-table-details-panel", r, { "sxl-has-focus": h }), ...l, children: k || I(O, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: w.table() ? 1 : 0 }, children: [o(O, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (E) => E.spacing(2), paddingLeft: (E) => E.spacing(2), paddingRight: (E) => E.spacing(2) }, children: I(O, { className: cc, children: [o(Ia, { formName: "name", defaultInput: v, value: m?.getName() ?? "No table", onChangeInput: S, onValidate: (E) => {
1775
+ m && m.getName().toLowerCase() === E.toLowerCase() || w?.getNames().validateName(E);
1776
+ }, disabled: m?.isProtected() ?? !0, onFocus: (E) => {
1777
+ d || E.target?.select(), g(!0);
1778
+ } }), o(La, { formName: "range", value: f, onChangeInput: C, resolvedAddress: w.getNames().getRanges.bind(w.getNames()), disabled: m?.isProtected() ?? !0, onFocus: (E) => {
1779
+ d || E.target?.select(), g(!0);
1780
+ } })] }) }), I(O, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (E) => E.spacing(0.5), marginTop: (E) => E.spacing(1) }, children: [o(Q, { orientation: "horizontal", sx: { marginTop: (E) => E.spacing(1.5), marginBottom: (E) => E.spacing(0.75) } }), o(O, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (E) => E.spacing(1), marginBottom: (E) => E.spacing(1) }, children: I("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [o(Xa, { table: m, styles: w.styles(), bodyStyle: w.bodyStyle(), cellHeight: 30, isLive: !0 }), o(Di, { command: e.getCommand("formatTableStyle"), commands: e, disabledQuickKey: !0 })] }) }), o(Q, { orientation: "horizontal", sx: { marginTop: (E) => E.spacing(1.5), marginBottom: (E) => E.spacing(0.75) } }), o(ic, { disabled: m?.isProtected(), styleOptions: m?.getStyleOptions() ?? null, onStyleOptionsChange: (E) => {
1781
+ m.updateStyleOptions(E);
1782
+ }, showHeaderRow: m?.getShowHeaders(), onShowHeaderRowChange: (E) => {
1783
+ try {
1784
+ m.setShowHeaders(E);
1785
+ } catch (T) {
1786
+ c.showError(T);
1787
+ }
1788
+ }, showTotalRow: m?.getShowTotals(), onShowTotalRowChange: (E) => {
1789
+ try {
1790
+ m.setShowTotals(E);
1791
+ } catch (T) {
1792
+ c.showError(T);
1793
+ }
1794
+ }, showFilterButton: m?.getFilter() ? m.getShowFilterButton() : null, onShowFilterButtonChange: (E) => {
1795
+ try {
1796
+ m.setShowFilterButton(E);
1797
+ } catch (T) {
1798
+ c.showError(T);
1865
1799
  }
1866
- const Me = I(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g, children: [y ? null : o(B, { ...H, scope: "namedItem", command: i?.commands.getCommand("addNamedReference") }), G && G.length > 0 ? I(ae, { children: [y ? null : o(Q, { orientation: "horizontal" }), o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: G })] }) : null] });
1867
- return ke({ ...A, children: Me });
1868
- }, [r, M, e, p, y]), se = Rt(a, () => ({ focus(A) {
1869
- P.current?.focus(A);
1870
- } }), []);
1871
- return o(O, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...d }, ref: yt([se, a]), ...g, children: o(Dt, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%" }, ...d }, propsButton: { sx: { backgroundColor: (A) => A.palette.background.paper, backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})` } }, tabIndex: -1, outlined: { color: (A) => t ? A.palette.action.disabled : Se(A.palette.divider, 0.2) }, parentFloat: f, createPopupPanel: de, onPopupOpen: () => m(!0), onPopupClose: () => m(!1), createTooltip: ({ children: A }, H) => o(at, { title: H || w ? "" : "Name Box", disabled: H, leaveDelay: 0, sx: { opacity: H || w ? 0 : 1 }, children: A }), renderQuickButton: j }) });
1872
- }));
1873
- Ja.displayName = "NamedCollectionEditor";
1874
- const bc = (n, a) => o(Ja, { ref: a, ...n }), ei = U(X((n, a) => {
1875
- const { sx: t, workbook: e, sheetElement: r, gridStyle: l, showNamedCollectionEditor: c = !0, propsNamedCollectionEditor: h, renderNamedCollectionEditor: i = bc, disabled: d, commands: g, ...b } = n, [p, s] = V(e?.getSelectedSheet()), [u, x] = V(p.getSelectedCell().getCoords()), [w, m] = V(!1), f = d || w;
1876
- je(e, { onSheetsChange: (G) => {
1877
- const pe = G?.getSelectedSheet();
1878
- x(pe.getSelectedCell().getCoords()), s(pe);
1879
- }, onViewChange(G) {
1880
- const pe = G?.getSelectedSheet();
1881
- x(pe.getSelectedCell().getCoords()), s(pe);
1882
- } });
1883
- const y = xe(null), C = L(() => ({ fontSize: 11 }), []);
1884
- je(p.getSelection(), { onChange: () => {
1885
- const G = p.getSelectedCell();
1886
- m(!G.isEditAllowed()), x(G.getCoords());
1887
- } }), je(p, { onProtectionChange() {
1888
- m(!p.getSelectedCell().isEditAllowed());
1889
- } });
1890
- const S = y.current?.getLineHeight() ?? 20, [v, k] = V(S), [E, T] = V(5), [M, R] = V(1), D = Z((G, { size: pe }) => {
1891
- G.preventDefault(), G.stopPropagation();
1892
- const Me = Math.floor(pe.height / S);
1893
- k(Me * S + 1), Me > 1 && T(Me);
1894
- }, [S]), N = Z((G, { size: pe }) => {
1895
- const Me = Math.floor(pe.height / S);
1896
- R(Me);
1897
- }, [S]), $ = ln(), F = $.getMode();
1898
- let z = null;
1899
- F?.key === "edit" && (z = F.args?.stateAndCoords);
1900
- const P = L(() => {
1901
- let G = z?.editState;
1902
- return G || (G = El(() => p.getRange(u).getCell())), o(O, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: o(Dl, { ref: y, activeCoords: u, sheet: p, onFocus: () => {
1903
- r?.startEdit({ autoFocus: !1, editMode: !0, cell: u });
1904
- }, defaultTextStyle: C, useRichStyling: !1, disabled: f, onChangeEdit: (pe) => {
1905
- if (pe.dirty !== void 0) {
1906
- const Me = { sheet: p, coords: u, editState: pe };
1907
- $.setMode((Te) => ({ ...Te, args: { ...Te?.args, stateAndCoords: Me } }));
1908
- }
1909
- }, editState: G, commands: g, onCancelEdit: () => {
1910
- r?.cancelEdit(), r?.focus();
1911
- }, onSubmitEdit: () => {
1912
- r?.submitEdit(), r?.focus();
1913
- }, linesVisible: M }) });
1914
- }, [p, z, u, M, r]), j = xe(null), te = L(() => c ? i({ names: e.getNames(), workbook: e, ...h }, j) : null, [i, h, c, p, e, f]), de = L(() => I(xt, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})`, border: (G) => `solid ${f ? G.palette.action.disabled : Se(G.palette.divider, 0.2)} 1px` }, children: [o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "warning", "aria-label": "cancel-formula-edit", icon: o(ye, { iconKey: "CloseError" }), propsTooltip: { label: "Cancel", simple: !0 }, disabled: f || z === null, onMouseDown: (G) => {
1915
- G.button === 0 && G.preventDefault();
1916
- }, onClick: () => {
1917
- r.cancelEdit();
1918
- } }), o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "primary", "aria-label": "commit-formula-edit", icon: o(ye, { iconKey: "CheckSuccess" }), propsTooltip: { label: "Enter", simple: !0 }, disabled: f || z === null, onMouseDown: (G) => {
1919
- G.button === 0 && G.preventDefault();
1920
- }, onClick: () => {
1921
- r.submitEdit();
1922
- } }), o(bt, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, disabled: !0, "aria-label": "commit-formula-function", icon: o(ye, { iconKey: "Function", style: { transform: "scale(0.85)" } }), propsTooltip: { label: "Insert Function", simple: !0 }, onMouseDown: (G) => {
1923
- G.button === 0 && G.preventDefault();
1924
- } })] }), [f, z]), se = Je(), [A, H] = V(!1), ie = L(() => I(O, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (G) => G.spacing(0.5), alignItems: "start" }, children: [de, I(xt, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (G) => G.typography.fontFamily, fontSize: 11 * _t.getDeviceScale(), alignItems: "stretch", paddingTop: "2px", paddingBottom: "2px", boxShadow: "none", borderRadius: (G) => `${G.shape.borderRadius}px`, backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})`, border: (G) => `solid ${f ? G.palette.action.disabled : Se(G.palette.divider, 0.2)} 1px`, "& textarea": { color: (G) => f ? `${G.palette.text.disabled} !important` : G.palette.text.primary }, "& .react-resizable-handle": { width: "100%", height: "8px", backgroundColor: "transparent", boxSizing: "content-box", zIndex: 1e3 }, "& .react-resizable-handle-s": { position: "absolute", bottom: "-10px", cursor: "s-resize" } }, onFocus: () => H(!0), onBlur: () => H(!1), onMouseDown: (G) => {
1925
- G.target?.classList.contains("react-resizable-handle") && G.preventDefault();
1926
- }, children: [o(O, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignItems: "center", marginTop: "0px", paddingLeft: (G) => G.spacing(1), paddingRight: (G) => G.spacing(1) }, children: o(fc.ResizableBox, { height: v, draggableOpts: { grid: [S, S] }, minConstraints: [S, S], maxConstraints: [15 * S, 15 * S], onResize: N, onResizeStop: D, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: P }) }), o(bt, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, "aria-label": "toggle-expand-formula-edit", icon: o(ye, { iconKey: M > 1 ? "ExpandLess" : "ExpandMore" }), propsTooltip: { label: (M > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: !0 }, onMouseDown: (G) => {
1927
- G.button === 0 && G.preventDefault();
1928
- }, onClick: () => {
1929
- const G = M > 1 ? 1 : E;
1930
- k(G * S + 1), R(G);
1931
- } }), o(O, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: A ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (G) => G.palette.primary.main, borderRadius: (G) => `${G.shape.borderRadius}px` } })] })] }), [de, P, A, M, S]), oe = L(() => te || ie ? !te && ie ? ie : te && !ie ? te : o(ae, { children: o(qn, { fixedPane: "before", minBefore: "165px", minAfter: "200px", propsPaneBefore: { style: { alignItems: "flex-start" } }, propsPaneAfter: { style: { overflow: "visible" } }, propsResizer: { style: { backgroundImage: `url("data:image/svg+xml,%3Csvg width='6' height='13' viewBox='0 0 6 13' version='1.1' fill='${se.palette.text.icon ?? se.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='m 4.5961932,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.88365,0 -1.60005,-0.71626 -1.60005,-1.59991 0,-0.88365 0.7164,-1.6000508 1.60005,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60004 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60005 0,-0.88365 0.7164,-1.59991 1.60005,-1.59991 0.88364,0 1.59991,0.71626 1.59991,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center calc(((var(--icon-size, 24) - 13px + 5px) / 2))", minWidth: "18px", marginRight: "1px" } }, elementBefore: te, elementAfter: ie }) }) : null, [te, ie]), Y = Rt(a, () => ({ isFormulaBarElement: () => !0, getNamedCollectionEditorElement: () => j.current }), []);
1932
- return o(O, { sx: { display: "flex", flexDirection: "row", gap: (G) => G.spacing(0.5), ...t }, ref: Y, ...b, children: oe });
1933
- }));
1934
- ei.displayName = "FormulaBar";
1935
- const ti = U(X((n, a) => {
1936
- const { filter: t, commands: e, disabled: r, style: l, floatReference: c, ...h } = n, i = L(() => ({}), []), d = L(() => ({ commandHook: { beforeExecute: (p, s) => c.closeAll(), onExecute() {
1937
- }, onError() {
1938
- console.log("onError");
1939
- } }, disabled: r, parentFloat: c }), [r, c]), g = L(() => ({ ...i, ...d, variant: re.Menuitem }), [i, d]), b = I(ae, { children: [o(B, { ...g, command: e.getCommand("sortAscending") }), o(B, { ...g, command: e.getCommand("sortDescending") }), o(Q, { orientation: "horizontal" }), o(B, { ...g, command: e.getCommand("autoFilterClear") }), []] });
1940
- return o(O, { ref: a, style: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...l }, ...h, children: b });
1941
- }));
1942
- ti.displayName = "FilterColumnMenu";
1943
- const xc = U(X((n, a) => {
1944
- const { children: t, className: e, disabled: r, style: l, filter: c, ...h } = n, i = Rt(a, () => ({ isFilters: () => !0 }), []);
1945
- return o("div", { ref: i, className: Re("filters", e), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...l }, ...h, children: I("div", { style: { flex: "1 1 100%", display: "flex", minHeight: "100px", minWidth: "220px", alignItems: "center", border: "grey solid 1px", padding: "4px 4px", overflow: "hidden", flexDirection: "column", justifyContent: "space-evenly", marginTop: "4px", marginBottom: "4px", marginLeft: "16px", marginRight: "16px" }, children: [o("div", { children: c.getName() }), o("div", { children: "Filter Widget" })] }) });
1946
- }));
1947
- xc.displayName = "Filters";
1948
- const oi = U(X((n, a) => {
1949
- const { children: t, sheet: e, style: r, className: l, value: c, index: h, editing: i, editable: d, disabled: g, selectedIndex: b, dragging: p, borderColor: s, borderWidth: u, activeColor: x, background: w = "white", tabRadius: m = 4, gridTheme: f, ...y } = n, [C, S] = V(() => !!e && e.getProtection().isLocked()), [v, k] = V(() => e ? e.getTabColor() : null);
1800
+ } }), o(Q, { orientation: "horizontal" }), I(O, { className: dc, children: [o(B, { variant: re.Menuitem, command: e.getCommand("convertTableToRange"), commandState: m }), o(B, { variant: re.Menuitem, commandState: m, command: e.getCommand("deleteTable") })] })] })] }) });
1801
+ })), uc = (n, a) => {
1802
+ const { model: t, commands: e, entryKey: r, frame: l, ...c } = n;
1803
+ return o(pc, { ref: a, commands: e, ...c });
1804
+ }, mc = () => {
1805
+ qn.register("plugin-table", { icons: {} }), en.registerTaskPane({ key: "tableDetails", getTitle: () => "Table Details", getIcon: () => "Table", renderTaskPane: uc }, !0);
1806
+ }, Za = U(X((n, a) => {
1807
+ const { children: t, sheet: e, style: r, className: l, value: c, index: h, editing: i, editable: d, disabled: g, selectedIndex: b, dragging: p, borderColor: s, borderWidth: u, activeColor: x, background: w = "white", tabRadius: m = 4, gridTheme: f, ...y } = n, [v, S] = V(() => !!e && e.getProtection().isLocked()), [C, k] = V(() => e ? e.getTabColor() : null);
1950
1808
  je(e, { onProtectionChange: () => {
1951
1809
  S(e.getProtection().isLocked());
1952
1810
  }, onTabColorChange: () => {
@@ -1956,17 +1814,17 @@ const oi = U(X((n, a) => {
1956
1814
  } });
1957
1815
  const E = Je(), T = b === h;
1958
1816
  let M = null, R = null;
1959
- if (v || p) {
1817
+ if (C || p) {
1960
1818
  let $ = w;
1961
- v ? (R = v.toBlackOrWhite().toCSS(), $ = v?.toCSS()) : T || ($ = E.palette.background.paper), M = o(O, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: T ? "50%" : "100%", borderRadius: "4px", border: (F) => T ? `${w} solid 1px` : `${F.palette.divider} solid 1px`, background: T && v ? `linear-gradient(0deg, ${$} 0%, transparent)` : $ } });
1819
+ C ? (R = C.toBlackOrWhite().toCSS(), $ = C?.toCSS()) : T || ($ = E.palette.background.paper), M = o(O, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: T ? "50%" : "100%", borderRadius: "4px", border: (F) => T ? `${w} solid 1px` : `${F.palette.divider} solid 1px`, background: T && C ? `linear-gradient(0deg, ${$} 0%, transparent)` : $ } });
1962
1820
  }
1963
1821
  let D = null;
1964
1822
  typeof s == "string" ? D = s : s?.toCSS && (D = s.toCSS());
1965
1823
  const N = T ? o(O, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: ($) => $.palette.primary.main } }) : null;
1966
- return o(Da, { theme: T ? f ?? E : E, children: o(O, { ref: a, className: Re(l), sx: { ...r, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: T ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p ? "grabbing" : void 0 }, ...y, children: o(ps, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: m, strokeColor: T ? D : "transparent", children: o(Qo, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: T ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p ? "grabbing" : void 0, color: T ? "primary" : R || "text.secondary", backgroundColor: T ? w : "transparent", "&:hover:not([disabled])": { backgroundColor: T ? w : "transparent" }, "& input": { color: ($) => `${$.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: g, disableRipple: i, component: "div", children: I(ae, { children: [M, I(O, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [I(O, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: T ? void 0 : "1px" }, children: [t, N] }), C ? o(ye, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : o(O, { sx: { minHeight: "22px" } })] })] }) }, c + ":" + h) }) }) });
1824
+ return o(Da, { theme: T ? f ?? E : E, children: o(O, { ref: a, className: Re(l), sx: { ...r, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: T ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p ? "grabbing" : void 0 }, ...y, children: o(ps, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: m, strokeColor: T ? D : "transparent", children: o(Qo, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: T ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p ? "grabbing" : void 0, color: T ? "primary" : R || "text.secondary", backgroundColor: T ? w : "transparent", "&:hover:not([disabled])": { backgroundColor: T ? w : "transparent" }, "& input": { color: ($) => `${$.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: g, disableRipple: i, component: "div", children: I(ae, { children: [M, I(O, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [I(O, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: T ? void 0 : "1px" }, children: [t, N] }), v ? o(ye, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : o(O, { sx: { minHeight: "22px" } })] })] }) }, c + ":" + h) }) }) });
1967
1825
  }));
1968
- oi.displayName = "SheetTab";
1969
- const ni = U(X((n, a) => {
1826
+ Za.displayName = "SheetTab";
1827
+ const Qa = U(X((n, a) => {
1970
1828
  const { workbook: t, index: e, commands: r, scope: l = "sheet", disabled: c, floatReference: h, sx: i, className: d, tabStripRef: g, ...b } = n, [p, s] = V(t?.getProtection());
1971
1829
  je(t, { onProtectionChange: (f) => {
1972
1830
  s(f?.getProtection());
@@ -1980,11 +1838,11 @@ const ni = U(X((n, a) => {
1980
1838
  Promise.resolve(h.closeAll()).then(() => {
1981
1839
  g?.startEdit(e);
1982
1840
  });
1983
- }, disabled: c || !p.isStructureAllowed(), parentFloat: h, children: ["Rename", l !== "sheet" ? " Sheet" : ""] }), o(B, { command: r.getCommand("duplicateSheet"), ...w, variant: re.Menuitem }), o(B, { command: r?.getCommand("protectionSheetToggle"), ...w, variant: re.Menuitem }), o(Mo, { variant: re.Menuitem, command: r.getCommand("formatSheetTabColor"), icon: o(ye, { iconKey: "stroke.colored" }), propsPanel: { disableAlpha: !0, autoColorLabel: "No Tab Color", autoColorPosition: Do.End }, parentFloat: h }), o(Q, { orientation: "horizontal" }), o(B, { command: r.getCommand("hideSheet"), ...w, variant: re.Menuitem })] });
1841
+ }, disabled: c || !p.isStructureAllowed(), parentFloat: h, children: ["Rename", l !== "sheet" ? " Sheet" : ""] }), o(B, { command: r.getCommand("duplicateSheet"), ...w, variant: re.Menuitem }), o(B, { command: r?.getCommand("protectionSheetToggle"), ...w, variant: re.Menuitem }), o(No, { variant: re.Menuitem, command: r.getCommand("formatSheetTabColor"), icon: o(ye, { iconKey: "stroke.colored" }), propsPanel: { disableAlpha: !0, autoColorLabel: "No Tab Color", autoColorPosition: Do.End }, parentFloat: h }), o(Q, { orientation: "horizontal" }), o(B, { command: r.getCommand("hideSheet"), ...w, variant: re.Menuitem })] });
1984
1842
  return o(O, { ref: a, className: Re("menu", d), sx: { ...i }, ...b, children: m });
1985
1843
  }));
1986
- ni.displayName = "SheetTabMenu";
1987
- const ri = U(X((n, a) => {
1844
+ Qa.displayName = "SheetTabMenu";
1845
+ const Ja = U(X((n, a) => {
1988
1846
  const { workbook: t, gridStyle: e, floatReference: r, closeFloatAll: l, className: c, ...h } = n, [i, d] = V(t?.getSheets().getItems()), [g, b] = V(t?.getProtection());
1989
1847
  je(t, { onSheetsChange: (s) => {
1990
1848
  d(s.getSheets().getItems());
@@ -1996,11 +1854,11 @@ const ri = U(X((n, a) => {
1996
1854
  for (let w = 0; w < u.length; w++) {
1997
1855
  const m = u[w], f = m.getVisibility();
1998
1856
  if (f === Lt.Visibility.VeryHidden) continue;
1999
- const y = x === m, C = m.getProtection().isLocked(), S = m.getTabColor(), v = e?.body.fill ?? "transparent";
2000
- let k = null, E = null, T = v;
2001
- S && (T = S.toCSS(), y || (E = S.toBlackOrWhite().toCSS()), k = o(O, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: y ? T : "transparent", borderRadius: "4px", border: `solid 1px ${e.header.edgeStrokeFill}` }, children: o(O, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: y || f === Lt.Visibility.Hidden ? "50%" : "100%", border: (R) => y ? `${v} solid 1.5px` : `${R.palette.divider} solid 1px`, background: y && S ? `linear-gradient(0deg, ${T} 0%, ${v})` : T, borderRadius: "4px" } }) }));
1857
+ const y = x === m, v = m.getProtection().isLocked(), S = m.getTabColor(), C = e?.body.fill ?? "transparent";
1858
+ let k = null, E = null, T = C;
1859
+ S && (T = S.toCSS(), y || (E = S.toBlackOrWhite().toCSS()), k = o(O, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: y ? T : "transparent", borderRadius: "4px", border: `solid 1px ${e.header.edgeStrokeFill}` }, children: o(O, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: y || f === Lt.Visibility.Hidden ? "50%" : "100%", border: (R) => y ? `${C} solid 1.5px` : `${R.palette.divider} solid 1px`, background: y && S ? `linear-gradient(0deg, ${T} 0%, ${C})` : T, borderRadius: "4px" } }) }));
2002
1860
  let M = null;
2003
- C && (M = o(ye, { iconKey: "Lock" })), f !== Lt.Visibility.Visible && (M = o(ye, { iconKey: "VisibilityOff", style: { opacity: g.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" })), M && (M = o(O, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: M })), s.push(o(dt, { disabled: !g.isStructureAllowed() && f === Lt.Visibility.Hidden, sx: { color: (R) => {
1861
+ v && (M = o(ye, { iconKey: "Lock" })), f !== Lt.Visibility.Visible && (M = o(ye, { iconKey: "VisibilityOff", style: { opacity: g.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" })), M && (M = o(O, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: M })), s.push(o(dt, { disabled: !g.isStructureAllowed() && f === Lt.Visibility.Hidden, sx: { color: (R) => {
2004
1862
  let D = y ? R.palette.primary.main : R.palette.text.secondary;
2005
1863
  return E && (D = E), f === Lt.Visibility.Hidden && (D = tt(D, R.palette.action.disabledOpacity)), D;
2006
1864
  }, borderLeft: (R) => `${y ? R.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", paddingTop: "4px", paddingBottom: "4px", fontWeight: y ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: y ? o(on, {}) : void 0, onMouseDown: (R) => R.preventDefault(), onMouseUp: () => {
@@ -2017,20 +1875,20 @@ const ri = U(X((n, a) => {
2017
1875
  }, [t, g, i, r, e]);
2018
1876
  return o(O, { ref: a, className: Re("menu", c), ...h, children: p });
2019
1877
  }));
2020
- ri.displayName = "SheetsAllMenu";
2021
- let $o = !1, ai = !1, vt = null;
1878
+ Ja.displayName = "SheetsAllMenu";
1879
+ let $o = !1, ei = !1, Ct = null;
2022
1880
  const _r = async (n) => {
2023
1881
  const a = await ko.getDetails();
2024
- if (ai || a.isEval()) {
1882
+ if (ei || a.isEval()) {
2025
1883
  try {
2026
1884
  const t = top ?? window;
2027
- t.SheetXL || (t.SheetXL = Object.freeze({ getSelectedWorkbook: () => vt?.getWorkbook(), getSelectedSheet: () => vt?.getWorkbook().getSelectedSheet(), getSelectedRange: () => vt?.getWorkbook().getSelectedRange(), getSelectedRanges: () => vt?.getWorkbook().getSelectedRanges(), getRange: (e) => vt?.getWorkbook().getRange(e), getSelectedWorkbookElement: () => vt, getLicenseManager: () => ko, moreExamples: () => {
1885
+ t.SheetXL || (t.SheetXL = Object.freeze({ getSelectedWorkbook: () => Ct?.getWorkbook(), getSelectedSheet: () => Ct?.getWorkbook().getSelectedSheet(), getSelectedRange: () => Ct?.getWorkbook().getSelectedRange(), getSelectedRanges: () => Ct?.getWorkbook().getSelectedRanges(), getRange: (e) => Ct?.getWorkbook().getRange(e), getSelectedWorkbookElement: () => Ct, getLicenseManager: () => ko, moreExamples: () => {
2028
1886
  console.table({ "SheetXL.getRange('Sheet1!e5:f6').setValues([[110, 220], [210, 220]])": { Summary: "Set an array of values." }, "SheetXL.getRange('a1:e5').setValue(100)": { Summary: "Set a single repeating value to a range." }, "SheetXL.getRange('Sheet1!e5:f6').getValues()": { Summary: "Get the values as a 2d array (see forEach)." }, "SheetXL.getSelectedRange().setValue(new Date())": { Summary: "Set current date/time using Javascript Date." }, "SheetXL.getSelectedRange().setValue('10/23/95')": { Summary: "Set current date/time using string." }, "SheetXL.getSelectedSheet().getUsedRange().getValues()": { Summary: "Get all of the values in a sheet." }, "SheetXL.getSelectedRange().getStyle().update({ fill: 'accent4' })": { Summary: "Set fill to theme color 4." }, "SheetXL.getRange('E:L').getStyle().update({ fill: 'accent1 lumMod 90 lumOff 40' })": { Summary: "Set some columns to a modified theme color." }, "SheetXL.getRange('e5:f10').getStyle().update({ style: { border: 'double blue' }})": { Summary: "Set border." }, "SheetXL.getCell().getStyle().fill.toCSS()": { Summary: "Get the fill style as css for the selected cell." }, "SheetXL.getRange('a1:a3').autoFill('a1:a7')": { Summary: "Autofill down." }, "SheetXL.getRange('e7:i9').merge({ orientation: 'rows' })": { Summary: "Merge cells horizontally." }, "SheetXL.getSelectedRange().sort({ ascending: false, hasHeader: false })": { Summary: "Sort selected cells ascending with a header." }, "SheetXL.getSelectedRange().clear('all')": { Summary: "Clear the current range a different way." }, "SheetXL.getSelectedSheet().getTables().add('b2:e9')": { Summary: "Create a 4x8 table at b2 for current sheet." }, "SheetXL.getRange('a1:c3').copyFrom('e1:g3')": { Summary: "Copy cells." }, "SheetXL.getRange('c:t').getColumnHeaders().setSize(30)": { Summary: "Set the size of columns to 30 pixels." }, "SheetXL.getRange('2:3').delete()": { Summary: "Remove rows 2 and 3 and shift up." }, "SheetXL.getSelectedSheet().getMovables().addImage('https://www.sheetxl.com/logo-text.svg')": { Summary: "Add an image." }, "SheetXL.getSelectedSheet().getMovables().addImage('https://www.sheetxl.com/logo-text.svg', { bounds: { height: 100 } })": { Summary: "Add an image of height 100." }, "SheetXL.getSelectedRange().doBatch(() => { SheetXL.getSelectedRange().setValue(1.50).getStyle().update({ numberFormat: '0%' }).autoFit(); }, 'Enter 150%')": { Summary: "Set value to 100 and numberformat to 0% as a single." }, "SheetXL.getSelectedRange().doBatch(() => { SheetXL.getSelectedRange().setValue('Remind Me Later').getStyle().update({ namedStyle: 'Note'}).autoFit(); }, 'Set Reminder')": { Summary: "Set a value and style to Note style and autofit text." }, "SheetXL.getSelectedWorkbook().getNames().addReference('Small_Range', 'A2:E5');": { Summary: "Add a named range." }, "SheetXL.getSelectedWorkbook().getRange('a1:e5').addListener((e) => { console.log('got an update for:', e.getSource().toString()) })": { Summary: "Listen for updates at a range." } });
2029
1887
  } }));
2030
1888
  } catch (t) {
2031
1889
  t instanceof DOMException || console.error(t), $o = !0;
2032
1890
  }
2033
- if (vt !== n && (vt = n, !$o)) try {
1891
+ if (Ct !== n && (Ct = n, !$o)) try {
2034
1892
  $o = !0, (top ?? window).SheetXL && (await ko._validate(!0), ko.wasPrinted() && (() => {
2035
1893
  Qe.consoleWithNoSource(`%cTip: You can access the API directly in the console.
2036
1894
  Try
@@ -2045,8 +1903,8 @@ Try
2045
1903
  t instanceof DOMException || console.error(t);
2046
1904
  }
2047
1905
  }
2048
- }, Xd = (n) => {
2049
- ai = n;
1906
+ }, qd = (n) => {
1907
+ ei = n;
2050
1908
  };
2051
1909
  function On() {
2052
1910
  return On = Object.assign ? Object.assign.bind() : function(n) {
@@ -2057,7 +1915,7 @@ function On() {
2057
1915
  return n;
2058
1916
  }, On.apply(null, arguments);
2059
1917
  }
2060
- function ii(n, a) {
1918
+ function ti(n, a) {
2061
1919
  if (n == null) return {};
2062
1920
  var t = {};
2063
1921
  for (var e in n) if ({}.hasOwnProperty.call(n, e)) {
@@ -2071,14 +1929,14 @@ function Bn(n, a) {
2071
1929
  return t.__proto__ = e, t;
2072
1930
  }, Bn(n, a);
2073
1931
  }
2074
- function li(n, a) {
1932
+ function oi(n, a) {
2075
1933
  n.prototype = Object.create(a.prototype), n.prototype.constructor = n, Bn(n, a);
2076
1934
  }
2077
1935
  function Ur(n, a) {
2078
1936
  return n.replace(new RegExp("(^|\\s)" + a + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
2079
1937
  }
2080
- const Gr = !1, si = ne.createContext(null);
2081
- var ci = function(n) {
1938
+ const Kr = !1, ni = ne.createContext(null);
1939
+ var ri = function(n) {
2082
1940
  return n.scrollTop;
2083
1941
  }, Eo = "unmounted", zt = "exited", Ht = "entering", Qt = "entered", An = "exiting", gt = (function(n) {
2084
1942
  function a(e, r) {
@@ -2087,7 +1945,7 @@ var ci = function(n) {
2087
1945
  var c, h = r && !r.isMounting ? e.enter : e.appear;
2088
1946
  return l.appearStatus = null, e.in ? h ? (c = zt, l.appearStatus = Ht) : c = Qt : c = e.unmountOnExit || e.mountOnEnter ? Eo : zt, l.state = { status: c }, l.nextCallback = null, l;
2089
1947
  }
2090
- li(a, n), a.getDerivedStateFromProps = function(e, r) {
1948
+ oi(a, n), a.getDerivedStateFromProps = function(e, r) {
2091
1949
  return e.in && r.status === Eo ? { status: zt } : null;
2092
1950
  };
2093
1951
  var t = a.prototype;
@@ -2109,14 +1967,14 @@ var ci = function(n) {
2109
1967
  if (e === void 0 && (e = !1), r !== null) if (this.cancelNextCallback(), r === Ht) {
2110
1968
  if (this.props.unmountOnExit || this.props.mountOnEnter) {
2111
1969
  var l = this.props.nodeRef ? this.props.nodeRef.current : eo.findDOMNode(this);
2112
- l && ci(l);
1970
+ l && ri(l);
2113
1971
  }
2114
1972
  this.performEnter(e);
2115
1973
  } else this.performExit();
2116
1974
  else this.props.unmountOnExit && this.state.status === zt && this.setState({ status: Eo });
2117
1975
  }, t.performEnter = function(e) {
2118
1976
  var r = this, l = this.props.enter, c = this.context ? this.context.isMounting : e, h = this.props.nodeRef ? [c] : [eo.findDOMNode(this), c], i = h[0], d = h[1], g = this.getTimeouts(), b = c ? g.appear : g.enter;
2119
- !e && !l || Gr ? this.safeSetState({ status: Qt }, function() {
1977
+ !e && !l || Kr ? this.safeSetState({ status: Qt }, function() {
2120
1978
  r.props.onEntered(i);
2121
1979
  }) : (this.props.onEnter(i, d), this.safeSetState({ status: Ht }, function() {
2122
1980
  r.props.onEntering(i, d), r.onTransitionEnd(b, function() {
@@ -2127,7 +1985,7 @@ var ci = function(n) {
2127
1985
  }));
2128
1986
  }, t.performExit = function() {
2129
1987
  var e = this, r = this.props.exit, l = this.getTimeouts(), c = this.props.nodeRef ? void 0 : eo.findDOMNode(this);
2130
- r && !Gr ? (this.props.onExit(c), this.safeSetState({ status: An }, function() {
1988
+ r && !Kr ? (this.props.onExit(c), this.safeSetState({ status: An }, function() {
2131
1989
  e.props.onExiting(c), e.onTransitionEnd(l.exit, function() {
2132
1990
  e.safeSetState({ status: zt }, function() {
2133
1991
  e.props.onExited(c);
@@ -2162,13 +2020,13 @@ var ci = function(n) {
2162
2020
  if (e === Eo) return null;
2163
2021
  var r = this.props, l = r.children;
2164
2022
  r.in, r.mountOnEnter, r.unmountOnExit, r.appear, r.enter, r.exit, r.timeout, r.addEndListener, r.onEnter, r.onEntering, r.onEntered, r.onExit, r.onExiting, r.onExited, r.nodeRef;
2165
- var c = ii(r, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
2166
- return ne.createElement(si.Provider, { value: null }, typeof l == "function" ? l(e, c) : ne.cloneElement(ne.Children.only(l), c));
2023
+ var c = ti(r, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
2024
+ return ne.createElement(ni.Provider, { value: null }, typeof l == "function" ? l(e, c) : ne.cloneElement(ne.Children.only(l), c));
2167
2025
  }, a;
2168
2026
  })(ne.Component);
2169
- function Kt() {
2027
+ function qt() {
2170
2028
  }
2171
- gt.contextType = si, gt.propTypes = {}, gt.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: Kt, onEntering: Kt, onEntered: Kt, onExit: Kt, onExiting: Kt, onExited: Kt }, gt.UNMOUNTED = Eo, gt.EXITED = zt, gt.ENTERING = Ht, gt.ENTERED = Qt, gt.EXITING = An;
2029
+ gt.contextType = ni, gt.propTypes = {}, gt.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: qt, onEntering: qt, onEntered: qt, onExit: qt, onExiting: qt, onExited: qt }, gt.UNMOUNTED = Eo, gt.EXITED = zt, gt.ENTERING = Ht, gt.ENTERED = Qt, gt.EXITING = An;
2172
2030
  var wn = function(n, a) {
2173
2031
  return n && a && a.split(" ").forEach(function(t) {
2174
2032
  return r = t, void ((e = n).classList ? e.classList.remove(r) : typeof e.className == "string" ? e.className = Ur(e.className, r) : e.setAttribute("class", Ur(e.className && e.className.baseVal || "", r)));
@@ -2202,11 +2060,11 @@ var wn = function(n, a) {
2202
2060
  return { baseClassName: g, activeClassName: d ? g + "-active" : i[h + "Active"], doneClassName: d ? g + "-done" : i[h + "Done"] };
2203
2061
  }, e;
2204
2062
  }
2205
- li(a, n);
2063
+ oi(a, n);
2206
2064
  var t = a.prototype;
2207
2065
  return t.addClass = function(e, r, l) {
2208
2066
  var c = this.getClassNames(r)[l + "ClassName"], h = this.getClassNames("enter").doneClassName;
2209
- r === "appear" && l === "done" && h && (c += " " + h), l === "active" && e && ci(e), c && (this.appliedClasses[r][l] = c, (function(i, d) {
2067
+ r === "appear" && l === "done" && h && (c += " " + h), l === "active" && e && ri(e), c && (this.appliedClasses[r][l] = c, (function(i, d) {
2210
2068
  i && d && d.split(" ").forEach(function(g) {
2211
2069
  return p = g, void ((b = i).classList ? b.classList.add(p) : (function(s, u) {
2212
2070
  return s.classList ? !!u && s.classList.contains(u) : (" " + (s.className.baseVal || s.className) + " ").indexOf(" " + u + " ") !== -1;
@@ -2220,12 +2078,12 @@ var wn = function(n, a) {
2220
2078
  }, t.render = function() {
2221
2079
  var e = this.props;
2222
2080
  e.classNames;
2223
- var r = ii(e, ["classNames"]);
2081
+ var r = ti(e, ["classNames"]);
2224
2082
  return ne.createElement(gt, On({}, r, { onEnter: this.onEnter, onEntered: this.onEntered, onEntering: this.onEntering, onExit: this.onExit, onExiting: this.onExiting, onExited: this.onExited }));
2225
2083
  }, a;
2226
2084
  })(ne.Component);
2227
2085
  In.defaultProps = { classNames: "" }, In.propTypes = {};
2228
- const Sn = 0.12, qr = (n, a) => {
2086
+ const Sn = 0.12, Gr = (n, a) => {
2229
2087
  const t = {}, e = (i) => {
2230
2088
  const d = i.palette?.background.default ?? "rgba(255,255,255,1)";
2231
2089
  return { text: { fontFamily: i.typography?.fontFamily ?? "Calibri", fontSize: i.typography?.fontSize ?? 8.25, fontWeight: i.typography?.fontWeightRegular ?? "400", fill: i.palette.mode === "dark" ? i.palette?.text?.secondary : i.palette?.text?.primary }, fill: d, strokeFill: it(d, Sn, i.palette?.mode), darkMode: i.palette.mode === "dark" };
@@ -2235,26 +2093,26 @@ const Sn = 0.12, qr = (n, a) => {
2235
2093
  t.headerSelect = { ...t.header, strokeFill: n.palette.primary.main, fill: tt(l, 0.2), text: { ...t.header.text, fill: n.palette.primary.main }, dividerStrokeFill: tt(l, 0.7) }, t.headerSelectAll = { ...t.headerSelect, fill: tt(l, 0.9), text: { ...t.headerSelect.text, fill: n.palette.primary.contrastText }, edgeStrokeFill: t.headerSelect.strokeFill }, t.buttonSurface = { ...r, strokeFill: it(r.fill, Sn, a.palette?.mode), fill: a && a.palette.mode === "dark" && a.palette.mode !== n.palette.mode ? r.fill : it(r.fill, 0.055, a.palette?.mode), edgeStrokeFill: a.palette.mode === "dark" ? r.strokeFill : it(r.fill, 0.328, a.palette?.mode) }, t.headerSelection = { fill: n.palette?.primary?.main ? tt(n.palette?.primary?.main, 0.1) : void 0, strokeFill: n.palette?.primary?.main }, t.headerSelectionInactive = { ...t.headerSelection, fill: n.palette?.divider ? tt(n.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
2236
2094
  const c = a ?? n, h = c.palette.mode === "dark";
2237
2095
  return t.selection = { fill: c.palette?.primary?.main ? tt(c.palette?.primary?.main, 0.1) : void 0, strokeFill: c.palette?.primary?.main }, t.selectionInactive = { ...t.selection, fill: c.palette?.divider ? tt(c.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, t.selectionRemove = { ...t.selection, fill: tt(c.palette.warning.light, 0.05), strokeFill: c.palette.warning.dark }, a && (t.body = e(a)), t.colorShadow = tt(c.palette.action.active, 0.5), t.colorGrey = c.palette.action.active, t.filterDarkInvert = h ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", t;
2238
- }, yc = "_sheetxl-theme_4opcr_2", No = U(X((n, a) => {
2096
+ }, hc = "_sheetxl-theme_4opcr_2", Mo = U(X((n, a) => {
2239
2097
  const { children: t, sx: e, parentFloat: r, ...l } = n, c = Rt(a, () => ({}), []), [h, i] = Vt(), d = xe(null), g = xe(null), [b, p] = ne.useReducer((S) => S + 1, 0), [s, u] = V(null), [x, w] = V(null), [m, f] = V(null), { reference: y } = ao({ parentFloat: r, label: "overflow" });
2240
2098
  Tt(() => {
2241
2099
  g.current = { refs: [] };
2242
- const S = [], v = ne.Children.toArray(t);
2100
+ const S = [], C = ne.Children.toArray(t);
2243
2101
  let k = 0;
2244
- v.forEach((E, T) => {
2102
+ C.forEach((E, T) => {
2245
2103
  S.push(o(O, { sx: { display: "flex" }, ref: (M) => {
2246
- k++, k === v.length && p();
2104
+ k++, k === C.length && p();
2247
2105
  const R = { current: null };
2248
2106
  R.current = M, g.current.refs[T] = R;
2249
2107
  }, children: E }, T));
2250
2108
  }), u(S);
2251
2109
  }, [t, i]), Tt(() => {
2252
2110
  if (!s) return;
2253
- const S = g.current.refs, v = S ? S.length : 0;
2254
- if (!c.current || v === 0) return w(null), void f(null);
2111
+ const S = g.current.refs, C = S ? S.length : 0;
2112
+ if (!c.current || C === 0) return w(null), void f(null);
2255
2113
  const k = c.current?.getBoundingClientRect(), E = [], T = [];
2256
2114
  let M = 0, R = !1;
2257
- for (let N = 0; !R && N < v; N++) {
2115
+ for (let N = 0; !R && N < C; N++) {
2258
2116
  const $ = S[N];
2259
2117
  if (!$) continue;
2260
2118
  if (!$.current) {
@@ -2267,7 +2125,7 @@ const Sn = 0.12, qr = (n, a) => {
2267
2125
  if (!R) return w(null), void f([]);
2268
2126
  const D = d.current?.getBoundingClientRect();
2269
2127
  M = 0;
2270
- for (let N = 0; N < v; N++) {
2128
+ for (let N = 0; N < C; N++) {
2271
2129
  const $ = S[N];
2272
2130
  let F = !1;
2273
2131
  if ($.current) {
@@ -2278,26 +2136,26 @@ const Sn = 0.12, qr = (n, a) => {
2278
2136
  }
2279
2137
  w(E.length > 0 ? E : null), f(T.length > 0 ? T : null);
2280
2138
  }, [t, s, i, y, b]);
2281
- const C = Z((S) => {
2282
- const v = [], k = m.length;
2139
+ const v = Z((S) => {
2140
+ const C = [], k = m.length;
2283
2141
  for (let T = 0; T < k; T++) {
2284
2142
  const M = ne.Children.toArray(m[T])[0];
2285
2143
  ne.Children.toArray(M.props.children?.props?.children ?? M.props.children).forEach((R, D) => {
2286
2144
  const N = R, $ = { ...N.props, key: `overflow-${T}-${D}${N.key ?? ""}` };
2287
2145
  $.parentFloat && S && ($.parentFloat = S.floatReference);
2288
2146
  const F = ne.cloneElement(N, $);
2289
- v.push(F);
2147
+ C.push(F);
2290
2148
  });
2291
2149
  }
2292
- const E = o(O, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (T) => T.spacing(0.25), paddingTop: (T) => T.spacing(0.5), paddingBottom: (T) => T.spacing(0.5), paddingLeft: (T) => T.spacing(1), paddingRight: (T) => T.spacing(1), overflow: "hidden" }, children: v });
2150
+ const E = o(O, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (T) => T.spacing(0.25), paddingTop: (T) => T.spacing(0.5), paddingBottom: (T) => T.spacing(0.5), paddingLeft: (T) => T.spacing(1), paddingRight: (T) => T.spacing(1), overflow: "hidden" }, children: C });
2293
2151
  return ke({ ...S, children: E });
2294
2152
  }, [m]);
2295
- return I(O, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...e }, ref: yt([c, h, a]), ...l, children: [o(O, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%", alignItems: "center" }, children: x ?? s }), o(O, { className: "overflow-palette-popup-button", sx: { display: m !== null && m.length === 0 ? "none" : "flex", flex: "1 1 0" }, children: o(Dt, { createPopupPanel: C, ref: d, parentFloat: y, createTooltip: ({ children: S }, v) => o(at, { label: "More", description: "More toolbar options…", disabled: v, children: S }), icon: o(ye, { iconKey: "MoreHorizontal" }) }) })] });
2296
- })), di = "https://unpkg.com/@sheetxl/scripting-templates/dist", wc = (n) => {
2153
+ return I(O, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...e }, ref: yt([c, h, a]), ...l, children: [o(O, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%", alignItems: "center" }, children: x ?? s }), o(O, { className: "overflow-palette-popup-button", sx: { display: m !== null && m.length === 0 ? "none" : "flex", flex: "1 1 0" }, children: o(Dt, { createPopupPanel: v, ref: d, parentFloat: y, createTooltip: ({ children: S }, C) => o(at, { label: "More", description: "More toolbar options…", disabled: C, children: S }), icon: o(ye, { iconKey: "MoreHorizontal" }) }) })] });
2154
+ })), ai = "https://unpkg.com/@sheetxl/scripting-templates/dist", gc = (n) => {
2297
2155
  if (n.metadata?.name) return n.metadata.name;
2298
2156
  let a = (n.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
2299
2157
  return n.metadata?.icon === "formula" ? a.toUpperCase() : (a = a.replace(/([a-z])([A-Z])/g, "$1 $2"), a.replace(/[-_]/g, " ").trim().split(/\s+/).map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join(" "));
2300
- }, pi = async (n) => {
2158
+ }, ii = async (n) => {
2301
2159
  const a = to.relativePath(n, "./manifest.json"), t = await fetch(a);
2302
2160
  if (!t.ok) throw new Fn(`Failed to retrieve directory at '${n}': ${t.statusText}`);
2303
2161
  const e = await t.text();
@@ -2314,30 +2172,30 @@ const Sn = 0.12, qr = (n, a) => {
2314
2172
  if (!i.ok) throw new Error(`Failed to fetch file at '${c.path}': ${i.statusText}`);
2315
2173
  const d = await i.text();
2316
2174
  let g = c.metadata;
2317
- return g?.title || (g = { title: wc(c), ...g }), { path: c.path, content: d, metadata: g };
2175
+ return g?.title || (g = { title: gc(c), ...g }), { path: c.path, content: d, metadata: g };
2318
2176
  } catch (h) {
2319
2177
  console.error(h.message);
2320
2178
  }
2321
2179
  return null;
2322
2180
  });
2323
2181
  return (await Promise.all(l)).filter((c) => c !== null);
2324
- }, vn = { marginRight: "4px" }, Cn = "1em", Sc = U((n) => {
2182
+ }, Cn = { marginRight: "4px" }, vn = "1em", fc = U((n) => {
2325
2183
  const { disabled: a, snippet: t, description: e, handleInsert: r, sx: l, ...c } = n;
2326
2184
  let h;
2327
2185
  const i = t.metadata?.icon;
2328
- return h = o(ye, i === "formula" ? { iconKey: "ScriptFormula", size: Cn, style: vn } : i === "macro" ? { iconKey: "ScriptMacro", size: Cn, style: vn } : { iconKey: "ScriptAutoStart", size: Cn, style: vn }), o(dt, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...l }, disabled: a, icon: h, onMouseDown: (d) => {
2186
+ return h = o(ye, i === "formula" ? { iconKey: "ScriptFormula", size: vn, style: Cn } : i === "macro" ? { iconKey: "ScriptMacro", size: vn, style: Cn } : { iconKey: "ScriptAutoStart", size: vn, style: Cn }), o(dt, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...l }, disabled: a, icon: h, onMouseDown: (d) => {
2329
2187
  d.button === 0 && d.preventDefault();
2330
2188
  }, onMouseUp: (d) => {
2331
2189
  d.button === 0 && r(t);
2332
2190
  }, onKeyDown: (d) => {
2333
2191
  d.keyCode !== he.Enter && d.keyCode !== he.Space || r(t);
2334
2192
  }, ...c, children: I(O, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [o(Fe, { component: "div", children: t.metadata?.title ?? t.path }), o(Fe, { variant: "caption", component: "div", sx: { color: (d) => tt(d.palette.text.secondary ?? d.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: t.metadata?.summary })] }) });
2335
- }), vc = U(X((n, a) => {
2336
- const { commands: t, commandHook: e, scope: r, disabled: l = !1, scriptPath: c = di, ...h } = n, [i, d] = V([]), [g, b] = V(!0), p = Ae(t, ["executeSelectedScript"]), s = p[0]?.context?.();
2193
+ }), bc = U(X((n, a) => {
2194
+ const { commands: t, commandHook: e, scope: r, disabled: l = !1, scriptPath: c = ai, ...h } = n, [i, d] = V([]), [g, b] = V(!0), p = Ae(t, ["executeSelectedScript"]), s = p[0]?.getContext();
2337
2195
  le(() => {
2338
2196
  (async () => {
2339
2197
  try {
2340
- const x = await pi(c);
2198
+ const x = await ii(c);
2341
2199
  d(x);
2342
2200
  } catch {
2343
2201
  } finally {
@@ -2351,31 +2209,31 @@ const Sn = 0.12, qr = (n, a) => {
2351
2209
  s.getEditor()?.insertSnippet(S.content), x.closeFloat();
2352
2210
  }, y = [];
2353
2211
  for (let S = 0; S < i.length; S++) {
2354
- const v = i[S];
2355
- v && y.push(o(Sc, { handleInsert: f, snippet: v }, v.path));
2212
+ const C = i[S];
2213
+ C && y.push(o(fc, { handleInsert: f, snippet: C }, C.path));
2356
2214
  }
2357
- const C = I(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [y.length > 0 ? I(ae, { children: [o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: y }), o(Q, { orientation: "horizontal" })] }) : null, De(B, { ...m, key: "help", command: t.getCommand("help") })] });
2358
- return ke({ ...x, children: C });
2215
+ const v = I(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [y.length > 0 ? I(ae, { children: [o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: y }), o(Q, { orientation: "horizontal" })] }) : null, De(B, { ...m, key: "help", command: t.getCommand("help") })] });
2216
+ return ke({ ...x, children: v });
2359
2217
  }, [l, e, r, g, s]);
2360
2218
  return o(Oe, { ref: a, commands: t, disabled: l, commandHook: e, scope: r, label: "Insert Script", tooltip: "Inserts a script from a set of templates.", createPopupPanel: u, icon: "ScriptInsert", ...h });
2361
- })), ui = U(X((n, a) => {
2219
+ })), li = U(X((n, a) => {
2362
2220
  const { commands: t, parentFloat: e, propsCommandButton: r, ...l } = n, c = Z((h) => {
2363
2221
  const { propsCommandButton: i, propsCommandPopup: d } = h;
2364
- return o(ae, { children: I("div", { style: { display: "flex", flex: "1 1 100%" }, children: [o("div", { children: o(No, { parentFloat: e, style: {}, children: o(B, { ...i, command: t?.getCommand("saveScripts") }) }) }), o("div", { style: { flex: "1 1 100%" } }), o("div", { children: o(No, { parentFloat: e, style: {}, children: o(vc, { ...i, commands: t }) }) })] }) });
2222
+ return o(ae, { children: I("div", { style: { display: "flex", flex: "1 1 100%" }, children: [o("div", { children: o(Mo, { parentFloat: e, style: {}, children: o(B, { ...i, command: t?.getCommand("saveScripts") }) }) }), o("div", { style: { flex: "1 1 100%" } }), o("div", { children: o(Mo, { parentFloat: e, style: {}, children: o(bc, { ...i, commands: t }) }) })] }) });
2365
2223
  }, [t]);
2366
- return o(rn, { ref: a, commands: t, parentFloat: e, propsCommandButton: r, renderToolbarPalette: c, ...l });
2224
+ return o(nn, { ref: a, commands: t, parentFloat: e, propsCommandButton: r, renderToolbarPalette: c, ...l });
2367
2225
  }));
2368
- ui.displayName = "ScriptEditorToolbar";
2369
- const mi = U(X((n, a) => {
2370
- const { scriptPath: t = di, onScriptSelect: e, sx: r = an.EmptyCssProperties, className: l, buttonMinWidth: c = 210, buttonMinHeight: h = 80, gap: i = 12, ...d } = n, [g, b] = V([]), [p, s] = V(!0), [u, x] = V(null);
2226
+ li.displayName = "ScriptEditorToolbar";
2227
+ const si = U(X((n, a) => {
2228
+ const { scriptPath: t = ai, onScriptSelect: e, sx: r = an.EmptyCssProperties, className: l, buttonMinWidth: c = 210, buttonMinHeight: h = 80, gap: i = 12, ...d } = n, [g, b] = V([]), [p, s] = V(!0), [u, x] = V(null);
2371
2229
  if (le(() => {
2372
2230
  (async () => {
2373
2231
  const f = [{ path: null, metadata: { title: "Blank Template...", summary: "Start with an empty script." }, content: "" }];
2374
2232
  try {
2375
2233
  s(!0), x(null);
2376
- const y = await pi(t);
2377
- for (let C = 0; C < y.length; C++) {
2378
- const S = y[C];
2234
+ const y = await ii(t);
2235
+ for (let v = 0; v < y.length; v++) {
2236
+ const S = y[v];
2379
2237
  S && f.push(S);
2380
2238
  }
2381
2239
  } catch (y) {
@@ -2393,8 +2251,8 @@ const mi = U(X((n, a) => {
2393
2251
  };
2394
2252
  return I(O, { ref: a, className: Re(l, "script-select"), sx: { background: (f) => f.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})`, ...r }, ...d, children: [I(O, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [o(Fe, { variant: "h6", gutterBottom: !0, children: "Script Template" }), o(Fe, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), o(Fe, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Templates provide a foundation to customize and meet your specific needs." }), o(O, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${c}px, 1fr))`, gap: `${i}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: g.map((f, y) => I(Qo, { variant: "outlined", sx: { minWidth: c, minHeight: h, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...y === 0 && { borderStyle: "dashed", marginBottom: "8px" }, ...y === 1 && { gridColumn: "1" } }, onClick: () => e?.(f), children: [I(O, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [o(Fe, { variant: "subtitle2", component: "div", children: f.metadata?.title || f.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), m(f)] }), f.metadata?.summary && o(Fe, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: f.metadata.summary })] }, `${f.path}-${y}`)) })] }), w] });
2395
2253
  }));
2396
- mi.displayName = "TemplateSelectPanel";
2397
- const hi = U(X((n, a) => {
2254
+ si.displayName = "TemplateSelectPanel";
2255
+ const ci = U(X((n, a) => {
2398
2256
  const { className: t, sx: e, propsScriptEditor: r, commands: l, readOnly: c = !1, frame: h, autoFocusSel: i, autoFocus: d = !0, scripts: g, ...b } = n, p = Je(), [s, u] = V(!1), x = xe(!1), [w, m] = V({ message: "Loading", cursor: "", dirty: !1 }), [f, y] = V(null);
2399
2257
  le(() => {
2400
2258
  let z = !1;
@@ -2407,18 +2265,18 @@ const hi = U(X((n, a) => {
2407
2265
  z = !0;
2408
2266
  };
2409
2267
  }, [g]);
2410
- const C = _((z) => {
2268
+ const v = _((z) => {
2411
2269
  m((P) => ({ ...P, ...z }));
2412
- }, []), S = xe(null), [v, k] = V(null), E = xe(null), T = Z((z) => {
2413
- if (v) return v.focus(z), !0;
2270
+ }, []), S = xe(null), [C, k] = V(null), E = xe(null), T = Z((z) => {
2271
+ if (C) return C.focus(z), !0;
2414
2272
  if (i) {
2415
2273
  const P = S.current?.querySelectorAll?.(i);
2416
2274
  if (P && P.length > 0) return P[0]?.focus?.(z), !0;
2417
2275
  }
2418
2276
  return S.current?.focus?.(z), !1;
2419
- }, [v, i, d]), M = L(() => o(Po, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: !1 }), []), R = L(() => o(xt, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (z) => z.spacing(0.5), marginRight: (z) => z.spacing(0.5), marginTop: (z) => z.spacing(1), marginBottom: (z) => z.spacing(1) }, children: o(ui, { commands: l }) }), [p, l]), D = L(() => o(O, { className: Re("script-status-panel", "status-panel"), sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", margin: 0, borderTop: `solid 1px ${p.palette.divider}` }, children: I("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [o(Fe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (z) => z.palette.text.secondary }, variant: "caption", children: w.message }), o(Fe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (z) => z.palette.text.secondary }, variant: "caption", children: w.dirty ? "Unsaved" : "" }), o(Fe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (z) => z.palette.text.secondary }, variant: "caption", children: w.cursor })] }) }), [w]), N = L(() => I(O, { className: Re("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [R, o(O, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: o(Rl, { ref: S, loadingPanel: M, readOnly: c, frame: h, autoFocus: d, commands: l, onStatusChange: C, darkMode: p.palette.mode === "dark", ...r }) }), D] }), [p, l, R, D, s, M, c, r, d, i, h, C]), $ = L(() => {
2277
+ }, [C, i, d]), M = L(() => o(Po, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: !1 }), []), R = L(() => o(xt, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (z) => z.spacing(0.5), marginRight: (z) => z.spacing(0.5), marginTop: (z) => z.spacing(1), marginBottom: (z) => z.spacing(1) }, children: o(li, { commands: l }) }), [p, l]), D = L(() => o(O, { className: Re("script-status-panel", "status-panel"), sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", margin: 0, borderTop: `solid 1px ${p.palette.divider}` }, children: I("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [o(Fe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (z) => z.palette.text.secondary }, variant: "caption", children: w.message }), o(Fe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (z) => z.palette.text.secondary }, variant: "caption", children: w.dirty ? "Unsaved" : "" }), o(Fe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (z) => z.palette.text.secondary }, variant: "caption", children: w.cursor })] }) }), [w]), N = L(() => I(O, { className: Re("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [R, o(O, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: o(Rl, { ref: S, loadingPanel: M, readOnly: c, frame: h, autoFocus: d, commands: l, onStatusChange: v, darkMode: p.palette.mode === "dark", ...r }) }), D] }), [p, l, R, D, s, M, c, r, d, i, h, v]), $ = L(() => {
2420
2278
  let z;
2421
- return f === null ? null : (f.source === null && (z = o(mi, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (P) => {
2279
+ return f === null ? null : (f.source === null && (z = o(si, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (P) => {
2422
2280
  S.current?.getEditor()?.insertSnippet(P.content), y({ source: P.content ?? "" });
2423
2281
  } })), o(O, { tabIndex: 0, className: Re("script-workspace", t), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none" }, onPointerDown: (P) => {
2424
2282
  P.isDefaultPrevented() || S.current?.focus();
@@ -2432,12 +2290,12 @@ const hi = U(X((n, a) => {
2432
2290
  F?.current?.contains(z.relatedTarget) || F?.current === z.relatedTarget || (E.current = null, x.current = !1, u(!1)), b?.onBlur?.(z);
2433
2291
  }, children: $ });
2434
2292
  }));
2435
- hi.displayName = "ScriptWorkspace";
2436
- const Cc = (n, a) => {
2293
+ ci.displayName = "ScriptWorkspace";
2294
+ const xc = (n, a) => {
2437
2295
  const { model: t, commands: e, entryKey: r, frame: l, ...c } = n;
2438
- return o(hi, { ref: a, readOnly: !1, commands: e, frame: l, scripts: t?.getScripts(), ...c });
2439
- }, gi = U(X((n, a) => {
2440
- const { commands: t, ...e } = n, r = Ae(t, ["executeScript", "showScriptEditor"]), [l, c] = V([]), [h, i] = V(!1), d = r[0]?.context?.();
2296
+ return o(ci, { ref: a, readOnly: !1, commands: e, frame: l, scripts: t?.getScripts(), ...c });
2297
+ }, di = U(X((n, a) => {
2298
+ const { commands: t, ...e } = n, r = Ae(t, ["executeScript", "showScriptEditor"]), [l, c] = V([]), [h, i] = V(!1), d = r[0]?.getContext();
2441
2299
  le(() => {
2442
2300
  const u = d?.getScripts();
2443
2301
  u && (async () => {
@@ -2454,26 +2312,26 @@ const Cc = (n, a) => {
2454
2312
  const s = I(O, { ref: a, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [b.length > 0 ? I(ae, { children: [o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: b }), o(Q, { orientation: "horizontal" })] }) : null, De(B, { ...g, key: "show-editor", command: t.getCommand("showScriptEditor") })] });
2455
2313
  return ke({ ...e, children: s });
2456
2314
  }));
2457
- gi.displayName = "RunScriptPopupPanel";
2458
- const fi = U(X((n, a) => {
2459
- const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = "showScriptEditor", i = Ae(t, ["executeScript", "showScriptEditor"])[0].context(), d = _((g, b) => {
2460
- const p = o(gi, { ...g, commands: b });
2315
+ di.displayName = "RunScriptPopupPanel";
2316
+ const pi = U(X((n, a) => {
2317
+ const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = "showScriptEditor", i = Ae(t, ["executeScript", "showScriptEditor"])[0].getContext(), d = _((g, b) => {
2318
+ const p = o(di, { ...g, commands: b });
2461
2319
  return ke({ ...g, children: p });
2462
2320
  }, [l, i, e, r]);
2463
- return o(Oe, { ref: a, commands: t, commandHook: e, createPopupPanel: d, selected: t.getCommand(h).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: h, ...c });
2464
- })), kc = (n) => o(B, { ...n }), bi = U(X((n, a) => {
2465
- const { commands: t, parentFloat: e, propsCommandButton: r, ...l } = n, [c, h] = V(!1), i = Ae(t, ["executeScript", "showScriptEditor"]), d = i[0]?.context?.();
2321
+ return o(Oe, { ref: a, commands: t, commandHook: e, createPopupPanel: d, selected: t.getCommand(h).getState(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: h, ...c });
2322
+ })), yc = (n) => o(B, { ...n }), ui = U(X((n, a) => {
2323
+ const { commands: t, parentFloat: e, propsCommandButton: r, ...l } = n, [c, h] = V(!1), i = Ae(t, ["executeScript", "showScriptEditor"]), d = i[0]?.getContext();
2466
2324
  le(() => {
2467
2325
  const p = d?.getScripts();
2468
2326
  if (!p) return;
2469
2327
  const s = i[1], u = async () => {
2470
2328
  if (!s) return;
2471
2329
  let m = !1;
2472
- if (!s.state()) {
2330
+ if (!s.getState()) {
2473
2331
  const f = await p.searchFunctions({ type: "macro" }), y = f?.length ?? 0;
2474
- for (let C = 0; f && !m && C < y; C++) m = !0;
2332
+ for (let v = 0; f && !m && v < y; v++) m = !0;
2475
2333
  }
2476
- h(m || !!s.state());
2334
+ h(m || !!s.getState());
2477
2335
  };
2478
2336
  u();
2479
2337
  const x = s.addPropertyListener(() => {
@@ -2494,48 +2352,48 @@ const fi = U(X((n, a) => {
2494
2352
  for (let k = 0; k < m; k++) {
2495
2353
  const E = x[k], T = E.createCommand?.(g);
2496
2354
  if (!T) continue;
2497
- const M = { command: T, ...u }, R = (E.createCommandButton ?? kc)(M);
2355
+ const M = { command: T, ...u }, R = (E.createCommandButton ?? yc)(M);
2498
2356
  w.push(R);
2499
2357
  }
2500
2358
  }
2501
- const f = o(Mo, { ...u, command: t.getCommand("formatFontColor"), isSplit: !0, propsPanel: { disableAlpha: !0 } }), y = o(Mo, { ...u, command: t.getCommand("formatFillColor"), isSplit: !0, propsPanel: { disableAlpha: !0, autoColorLabel: "No Fill", autoColorPosition: Do.End } }), C = t.getCommand("undo") ? o(ae, { children: o(Aa, { ...u, quickCommand: "undo" }) }) : null, S = t.getCommand("find") ? o(ae, { children: o(Ws, { ...u }) }) : null;
2502
- let v = null;
2503
- return c && (v = I(ae, { children: [o(Q, {}), o(fi, { ...u })] })), I(No, { parentFloat: e, children: [C, null, C ? o(Q, {}) : null, o(La, { ...u, command: t.getCommand("paste") }), o(B, { ...s, command: t.getCommand("formatPainterToggle") }), o(Qn, { ...s, command: t.getCommand("copy") }), o(Q, {}), o(Us, { ...u, command: t.getCommand("formatFontFamily") }), o(js, { ...u, command: t.getCommand("formatFontSize") }), o(B, { ...s, command: t.getCommand("formatBoldToggle") }), o(B, { ...s, command: t.getCommand("formatItalicToggle") }), o(qs, { ...u }), o(Gs, { ...u }), o(Ls, { ...u }), y, f, o(Q, {}), o(Cs, { ...u }), o(ks, { ...u }), o(Es, { ...u }), o(Ts, { ...u }), o(zs, { ...u }), o(Q, {}), o($s, { ...u }), o(Q, {}), o(Zs, { command: t.getCommand("formatCellStyle"), ...u }), o(Di, { command: t.getCommand("formatTableStyle"), ...u }), o(Q, {}), o(Pa, { ...u }), o(Fa, { ...u }), o(Oa, { ...u }), o(Q, {}), o(Mi, { ...u }), o(Vs, { ...u }), o(Na, { ...u }), o(Ba, { ...u }), S, v, w] });
2359
+ const f = o(No, { ...u, command: t.getCommand("formatFontColor"), isSplit: !0, propsPanel: { disableAlpha: !0 } }), y = o(No, { ...u, command: t.getCommand("formatFillColor"), isSplit: !0, propsPanel: { disableAlpha: !0, autoColorLabel: "No Fill", autoColorPosition: Do.End } }), v = t.getCommand("undo") ? o(ae, { children: o(vi, { ...u, quickCommand: "undo" }) }) : null, S = t.getCommand("find") ? o(ae, { children: o(Ws, { ...u }) }) : null;
2360
+ let C = null;
2361
+ return c && (C = I(ae, { children: [o(Q, {}), o(pi, { ...u })] })), I(Mo, { parentFloat: e, children: [v, null, v ? o(Q, {}) : null, o(Ti, { ...u, command: t.getCommand("paste") }), o(B, { ...s, command: t.getCommand("formatPainterToggle") }), o(Qn, { ...s, command: t.getCommand("copy") }), o(Q, {}), o(Wc, { ...u, command: t.getCommand("formatFontFamily") }), o(js, { ...u, command: t.getCommand("formatFontSize") }), o(B, { ...s, command: t.getCommand("formatBoldToggle") }), o(B, { ...s, command: t.getCommand("formatItalicToggle") }), o($c, { ...u }), o(jc, { ...u }), o(Ls, { ...u }), y, f, o(Q, {}), o(vs, { ...u }), o(ks, { ...u }), o(Es, { ...u }), o(Ts, { ...u }), o(zs, { ...u }), o(Q, {}), o($s, { ...u }), o(Q, {}), o(Kc, { command: t.getCommand("formatCellStyle"), ...u }), o(Di, { command: t.getCommand("formatTableStyle"), ...u }), o(Q, {}), o(Pa, { ...u }), o(Fa, { ...u }), o(Oa, { ...u }), o(Q, {}), o(Mi, { ...u }), o(Vs, { ...u }), o(Na, { ...u }), o(Ci, { ...u }), S, C, w] });
2504
2362
  }, [t, i, c, g]);
2505
- return o(rn, { ref: a, commands: t, parentFloat: e, propsCommandButton: r, renderToolbarPalette: b, ...l });
2363
+ return o(nn, { ref: a, commands: t, parentFloat: e, propsCommandButton: r, renderToolbarPalette: b, ...l });
2506
2364
  }));
2507
- bi.displayName = "HomeToolbar";
2508
- const xi = U(X((n, a) => {
2365
+ ui.displayName = "HomeToolbar";
2366
+ const mi = U(X((n, a) => {
2509
2367
  const { commands: t, parentFloat: e, propsCommandButton: r, ...l } = n, c = Z((h) => {
2510
2368
  const { propsCommandButton: i, propsCommandPopup: d } = h;
2511
- return I(No, { parentFloat: e, children: [o(B, { ...i, command: t.getCommand("insertTable") }), o(Ri, { ...d }), null, o(B, { ...i, command: t.getCommand("updateHyperlink") }), o(B, { ...i, command: t.getCommand("updateComments") })] });
2369
+ return I(Mo, { parentFloat: e, children: [o(B, { ...i, command: t.getCommand("insertTable") }), o(Ri, { ...d }), null, o(B, { ...i, command: t.getCommand("updateHyperlink") }), o(B, { ...i, command: t.getCommand("updateComments") })] });
2512
2370
  }, [t]);
2513
- return o(rn, { ref: a, commands: t, parentFloat: e, propsCommandButton: r, renderToolbarPalette: c, ...l });
2371
+ return o(nn, { ref: a, commands: t, parentFloat: e, propsCommandButton: r, renderToolbarPalette: c, ...l });
2514
2372
  }));
2515
- xi.displayName = "InsertToolbar";
2516
- const yi = U(X((n, a) => {
2373
+ mi.displayName = "InsertToolbar";
2374
+ const hi = U(X((n, a) => {
2517
2375
  const { commands: t, parentFloat: e, propsCommandButton: r, ...l } = n, c = Z((h) => {
2518
2376
  const { propsCommandButton: i, propsCommandPopup: d } = h;
2519
- return I(No, { parentFloat: e, children: [o(Hs, { ...d }), o(B, { ...d, command: t.getCommand("protectionSheetToggle") }), o(Q, {}), o(_s, { ...d }), o(Ks, { ...d }), o(Q, {}), o(B, { ...i, command: t.getCommand("sheetViewToggleFormulaView"), scope: "view" }), o(B, { ...i, command: t.getCommand("sheetViewToggleShowZeros"), scope: "view" }), o(Q, {}), o(Xs, { ...d }), o(Kc, { command: t.getCommand("selectTheme"), ...d }), o(Q, {}), o(fi, { ...d, scope: "view" }), o(Q, {}), o(B, { ...i, command: t.getCommand("fullScreenToggle"), scope: "view" })] });
2377
+ return I(Mo, { parentFloat: e, children: [o(Hs, { ...d }), o(B, { ...d, command: t.getCommand("protectionSheetToggle") }), o(Q, {}), o(Hc, { ...d }), o(Vc, { ...d }), o(Q, {}), o(B, { ...i, command: t.getCommand("sheetViewToggleFormulaView"), scope: "view" }), o(B, { ...i, command: t.getCommand("sheetViewToggleShowZeros"), scope: "view" }), o(Q, {}), o(_c, { ...d }), o(qc, { command: t.getCommand("selectTheme"), ...d }), o(Q, {}), o(pi, { ...d, scope: "view" }), o(Q, {}), o(B, { ...i, command: t.getCommand("fullScreenToggle"), scope: "view" })] });
2520
2378
  }, [t]);
2521
- return o(rn, { ref: a, commands: t, parentFloat: e, propsCommandButton: r, renderToolbarPalette: c, ...l });
2379
+ return o(nn, { ref: a, commands: t, parentFloat: e, propsCommandButton: r, renderToolbarPalette: c, ...l });
2522
2380
  }));
2523
- yi.displayName = "ViewToolbar";
2524
- const wi = (n) => o(Si, { ...n }), Tc = U((n) => {
2381
+ hi.displayName = "ViewToolbar";
2382
+ const gi = (n) => o(fi, { ...n }), wc = U((n) => {
2525
2383
  const { sx: a, ...t } = n;
2526
- return I(O, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e) => `${Se(e.palette.primary.main, 0.35)} solid 2px` } }, children: [o(Ca, { disableRipple: !0, onMouseDown: (e) => {
2384
+ return I(O, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e) => `${Se(e.palette.primary.main, 0.35)} solid 2px` } }, children: [o(va, { disableRipple: !0, onMouseDown: (e) => {
2527
2385
  e.button === 0 && e.preventDefault();
2528
2386
  }, sx: { textTransform: "none", flex: "1 1 100%", fontWeight: (e) => e.typography.fontWeightRegular, padding: "2px 6px", minHeight: "0px", minWidth: "0px", marginRight: (e) => e.spacing(0.5), "&.Mui-selected": {}, "&.Mui-focusVisible": {}, ...a }, ...t }), o(O, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
2529
- }), Ec = U((n) => {
2387
+ }), Sc = U((n) => {
2530
2388
  const { toolbars: a, value: t, onToolbarChange: e, sx: r, ...l } = n, c = L(() => {
2531
2389
  const h = [];
2532
- for (let i = 0; i < a.length; i++) h.push(o(Tc, { label: a[i].label }, a[i].label));
2390
+ for (let i = 0; i < a.length; i++) h.push(o(wc, { label: a[i].label }, a[i].label));
2533
2391
  return h;
2534
2392
  }, [a]);
2535
- return o(va, { value: t, onChange: (h, i) => {
2393
+ return o(Ca, { value: t, onChange: (h, i) => {
2536
2394
  e?.(i);
2537
2395
  }, variant: "scrollable", scrollButtons: !1, sx: { paddingLeft: (h) => h.spacing(1.5), paddingRight: (h) => h.spacing(1.5), paddingTop: (h) => h.spacing(0), paddingBottom: (h) => h.spacing(0), minHeight: "26px", alignItems: "center", "& .MuiTabs-indicator": { display: "flex", justifyContent: "center", backgroundColor: "transparent" }, "& .MuiTabs-indicatorSpan": { width: "90%", borderRadius: "4px", minWidth: "4px", backgroundColor: (h) => h.palette.primary.main }, "& .MuiTab-root": { marginRight: "0px" }, ...r }, slotProps: { indicator: { children: o("span", { className: "MuiTabs-indicatorSpan" }) } }, ...l, children: c });
2538
- }), Dc = U((n) => {
2396
+ }), Cc = U((n) => {
2539
2397
  const { toolbars: a, value: t, onToolbarChange: e, propsSelect: r, ...l } = n, c = _((i) => {
2540
2398
  e?.(i.target.value);
2541
2399
  }, [e]), h = L(() => {
@@ -2549,26 +2407,26 @@ const wi = (n) => o(Si, { ...n }), Tc = U((n) => {
2549
2407
  return i;
2550
2408
  }, [a, t]);
2551
2409
  return o(_n, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (i) => i.spacing(0.5), paddingBottom: (i) => i.spacing(0.5), paddingLeft: (i) => i.spacing(2), color: (i) => i.palette.primary.main }, "& .MuiSelect-icon": { fill: (i) => i.palette.text.icon ?? i.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (i) => i.palette.text.icon ?? i.palette.action.active } }, ...r }, size: "small", children: o(_l, { value: t, onChange: c, variant: "outlined", sx: { backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})` }, ...l, children: h }) });
2552
- }), Si = U(X((n, a) => {
2410
+ }), fi = U(X((n, a) => {
2553
2411
  const { commands: t, wrapperSelect: e, propsSelect: r = Qe.EmptyObject, isCompact: l = !1, wrapperPalette: c, propsToolbars: h = Qe.EmptyObject, propsPalette: i = Qe.EmptyObject, workbook: d, sx: g, ...b } = n, p = L(() => {
2554
- const S = [], { ref: v, ...k } = h?.Home || Qe.EmptyObject;
2555
- S.push({ label: "Home", component: o(bi, { commands: t, ...k }) });
2412
+ const S = [], { ref: C, ...k } = h?.Home || Qe.EmptyObject;
2413
+ S.push({ label: "Home", component: o(ui, { commands: t, ...k }) });
2556
2414
  const { ref: E, ...T } = h?.Insert || Qe.EmptyObject;
2557
- S.push({ label: "Insert", component: o(xi, { commands: t, ...T }) });
2415
+ S.push({ label: "Insert", component: o(mi, { commands: t, ...T }) });
2558
2416
  const { ref: M, ...R } = h?.View || Qe.EmptyObject;
2559
- return S.push({ label: "View", component: o(yi, { commands: t, ...R }) }), S;
2417
+ return S.push({ label: "View", component: o(hi, { commands: t, ...R }) }), S;
2560
2418
  }, [t, d]), s = L(() => {
2561
2419
  const S = [];
2562
- for (let v = 0; v < p.length; v++) S.push(ne.cloneElement(p[v].component, { ...p[v].component.props, key: p[v].key ?? p[v].label }));
2420
+ for (let C = 0; C < p.length; C++) S.push(ne.cloneElement(p[C].component, { ...p[C].component.props, key: p[C].key ?? p[C].label }));
2563
2421
  return S;
2564
2422
  }, [p]), [u, x] = V(0), w = (S) => {
2565
2423
  x(S);
2566
- }, m = L(() => o(l ? Dc : Ec, { toolbars: p, value: u, onToolbarChange: w, sx: r }), [p, u, r, l]), { sx: f, ...y } = i, C = o(xt, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})`, marginLeft: (S) => S.spacing(1), marginRight: (S) => S.spacing(1), marginTop: (S) => S.spacing(0.5), marginBottom: (S) => S.spacing(0.5), ...f }, ...y, children: s[u] });
2567
- return I(O, { ref: a, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (S) => S.spacing(0.5), "*": { userSelect: "none" }, ...g }, ...b, children: [e ? e(m) : m, c ? c(C) : C] });
2424
+ }, m = L(() => o(l ? Cc : Sc, { toolbars: p, value: u, onToolbarChange: w, sx: r }), [p, u, r, l]), { sx: f, ...y } = i, v = o(xt, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})`, marginLeft: (S) => S.spacing(1), marginRight: (S) => S.spacing(1), marginTop: (S) => S.spacing(0.5), marginBottom: (S) => S.spacing(0.5), ...f }, ...y, children: s[u] });
2425
+ return I(O, { ref: a, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (S) => S.spacing(0.5), "*": { userSelect: "none" }, ...g }, ...b, children: [e ? e(m) : m, c ? c(v) : v] });
2568
2426
  }));
2569
- var Kr, Xr;
2570
- Si.displayName = "WorkbookToolbars", (function() {
2571
- if (Xr) return Kr;
2427
+ var qr, Xr;
2428
+ fi.displayName = "WorkbookToolbars", (function() {
2429
+ if (Xr) return qr;
2572
2430
  Xr = 1;
2573
2431
  var n = /^\s+|\s+$/g, a = /^[-+]0x[0-9a-f]+$/i, t = /^0b[01]+$/i, e = /^0o[0-7]+$/i, r = parseInt, l = typeof To == "object" && To && To.Object === Object && To, c = typeof self == "object" && self && self.Object === Object && self, h = l || c || Function("return this")(), i = Object.prototype.toString, d = Math.max, g = Math.min, b = function() {
2574
2432
  return h.Date.now();
@@ -2593,42 +2451,42 @@ Si.displayName = "WorkbookToolbars", (function() {
2593
2451
  var w = t.test(u);
2594
2452
  return w || e.test(u) ? r(u.slice(2), w ? 2 : 8) : a.test(u) ? NaN : +u;
2595
2453
  }
2596
- Kr = function(u, x, w) {
2597
- var m, f, y, C, S, v, k = 0, E = !1, T = !1, M = !0;
2454
+ qr = function(u, x, w) {
2455
+ var m, f, y, v, S, C, k = 0, E = !1, T = !1, M = !0;
2598
2456
  if (typeof u != "function") throw new TypeError("Expected a function");
2599
2457
  function R(z) {
2600
2458
  var P = m, j = f;
2601
- return m = f = void 0, k = z, C = u.apply(j, P);
2459
+ return m = f = void 0, k = z, v = u.apply(j, P);
2602
2460
  }
2603
2461
  function D(z) {
2604
- var P = z - v;
2605
- return v === void 0 || P >= x || P < 0 || T && z - k >= y;
2462
+ var P = z - C;
2463
+ return C === void 0 || P >= x || P < 0 || T && z - k >= y;
2606
2464
  }
2607
2465
  function N() {
2608
2466
  var z = b();
2609
2467
  if (D(z)) return $(z);
2610
2468
  S = setTimeout(N, (function(P) {
2611
- var j = x - (P - v);
2469
+ var j = x - (P - C);
2612
2470
  return T ? g(j, y - (P - k)) : j;
2613
2471
  })(z));
2614
2472
  }
2615
2473
  function $(z) {
2616
- return S = void 0, M && m ? R(z) : (m = f = void 0, C);
2474
+ return S = void 0, M && m ? R(z) : (m = f = void 0, v);
2617
2475
  }
2618
2476
  function F() {
2619
2477
  var z = b(), P = D(z);
2620
- if (m = arguments, f = this, v = z, P) {
2478
+ if (m = arguments, f = this, C = z, P) {
2621
2479
  if (S === void 0) return (function(j) {
2622
- return k = j, S = setTimeout(N, x), E ? R(j) : C;
2623
- })(v);
2624
- if (T) return S = setTimeout(N, x), R(v);
2480
+ return k = j, S = setTimeout(N, x), E ? R(j) : v;
2481
+ })(C);
2482
+ if (T) return S = setTimeout(N, x), R(C);
2625
2483
  }
2626
- return S === void 0 && (S = setTimeout(N, x)), C;
2484
+ return S === void 0 && (S = setTimeout(N, x)), v;
2627
2485
  }
2628
2486
  return x = s(x) || 0, p(w) && (E = !!w.leading, y = (T = "maxWait" in w) ? d(s(w.maxWait) || 0, x) : y, M = "trailing" in w ? !!w.trailing : M), F.cancel = function() {
2629
- S !== void 0 && clearTimeout(S), k = 0, m = v = f = S = void 0;
2487
+ S !== void 0 && clearTimeout(S), k = 0, m = C = f = S = void 0;
2630
2488
  }, F.flush = function() {
2631
- return S === void 0 ? C : $(b());
2489
+ return S === void 0 ? v : $(b());
2632
2490
  }, F;
2633
2491
  };
2634
2492
  })();
@@ -2663,7 +2521,7 @@ Zr || (Zr = 1, Qr.exports = (function() {
2663
2521
  };
2664
2522
  return kn.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : h, kn;
2665
2523
  })()), Qr.exports;
2666
- var Jr, ea, yo = { exports: {} }, Jt = { exports: {} }, Rc = Jt.exports;
2524
+ var Jr, ea, yo = { exports: {} }, Jt = { exports: {} }, vc = Jt.exports;
2667
2525
  (function() {
2668
2526
  if (ea) return yo.exports;
2669
2527
  ea = 1;
@@ -2681,7 +2539,7 @@ var Jr, ea, yo = { exports: {} }, Jt = { exports: {} }, Rc = Jt.exports;
2681
2539
  }, s = Date.now()) : (Jt.exports = function() {
2682
2540
  return (/* @__PURE__ */ new Date()).getTime() - s;
2683
2541
  }, s = (/* @__PURE__ */ new Date()).getTime());
2684
- }.call(Rc)), Jt.exports), a = typeof window > "u" ? To : window, t = ["moz", "webkit"], e = "AnimationFrame", r = a["request" + e], l = a["cancel" + e] || a["cancelRequest" + e], c = 0; !r && c < t.length; c++) r = a[t[c] + "Request" + e], l = a[t[c] + "Cancel" + e] || a[t[c] + "CancelRequest" + e];
2542
+ }.call(vc)), Jt.exports), a = typeof window > "u" ? To : window, t = ["moz", "webkit"], e = "AnimationFrame", r = a["request" + e], l = a["cancel" + e] || a["cancelRequest" + e], c = 0; !r && c < t.length; c++) r = a[t[c] + "Request" + e], l = a[t[c] + "Cancel" + e] || a[t[c] + "CancelRequest" + e];
2685
2543
  if (!r || !l) {
2686
2544
  var h = 0, i = 0, d = [], g = 1e3 / 60;
2687
2545
  r = function(b) {
@@ -2744,7 +2602,7 @@ var st = { DOM_UNAVAILABLE_ERROR: "DOM is unavailable server-side. Please use th
2744
2602
  const t = this.getEventName(n);
2745
2603
  t && document.removeEventListener(t, a);
2746
2604
  } };
2747
- const Mc = (n) => {
2605
+ const kc = (n) => {
2748
2606
  const { workbook: a, workbookElement: t, target: e, commands: r, darkMode: l } = n, c = sn(), [h, i] = V(a?.getSelectedSheet()), [d, g] = V(a?.getSheets().getItems()), b = fa(), p = L(() => [new We("activateTask", e, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new We("workbookStatistics", e, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [fe.Ctrl, fe.Shift] } }), new We("workbookStatistics", e, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [fe.Ctrl, fe.Shift] } }), new We("showFormat", e, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [fe.Ctrl, fe.Shift] } }), new be("newCellStyle", e, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later.", icon: "NewPresetStyles" }), new be("deleteCellStyle", e, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new be("modifyCellStyle", e, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new We("find", e, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [fe.Ctrl] }, { key: "F5", modifiers: [fe.Shift] }] }), new We("findReplace", e, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [fe.Ctrl] }, { key: "H", modifiers: [fe.Ctrl, fe.Alt] }] }), new We("goto", e, { label: "Go To", description: "Open the 'Go To' window.", icon: "GoTo", shortcut: [{ key: "G", modifiers: [fe.Ctrl] }] }), new We("workbookViewToggleExpandFormulaBar", e, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [fe.Ctrl, fe.Shift] } }), new We("workbookViewToggleShowFormulaBar", e, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new We("workbookViewToggleShowTabs", e, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new We("workbookViewToggleShowStatusBar", e, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new We("workbookViewToggleShowHorizontalScrollBar", e, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new We("workbookViewToggleShowVerticalScrollBar", e, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new be("hideSheet", e, { label: "Hide Sheet", scopedLabels: { sheet: "Hide" }, description: "Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs.", icon: "VisibilityOff" }), new be("deleteSheet", e, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new be("addSheet", e, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [fe.Shift] }, { key: "F1", modifiers: [fe.Alt, fe.Shift] }] }), new be("duplicateSheet", e, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new be("nextSheet", e, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [fe.Ctrl] }] }), new be("previousSheet", e, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [fe.Ctrl] }] }), new be("selectNextSheet", e, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [fe.Ctrl, fe.Shift] }] }), new be("selectPreviousSheet", e, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [fe.Ctrl, fe.Shift] }] }), new be("selectTheme", e, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new be("selectNamed", e, { label: (T) => T?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (T) => T?.getName() ?? "Select" }, description: "Select the item." }), new be("addNamedReference", e, { label: "Define Named Reference", scopedLabels: { namedItem: "Define Name…" }, description: "Add a new named reference. Names can be used as a substitute for cell references.", icon: "InsertNamedRange" }), new be("editNamedReference", e, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references.", icon: "NamedRangeEdit" }), new be("deleteNamedReference", e, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "DeleteNamedRange" }), new We("activeNameBox", e, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [fe.Alt] } }), new We("createNamedReferenceFromSelection", e, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [fe.Ctrl, fe.Shift] } }), new We("activeNameManager", e, { label: "Activate Name Manager", description: `Create, edit, delete, and find all the names used in the workbook.
2749
2607
 
2750
2608
  Names can be used as a substitute for cell references.`, shortcut: { key: "F3", modifiers: [fe.Ctrl] } }), new be("fullScreenToggle", e, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new be("showScriptEditor", e, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [fe.Alt] }] }), new be("executeScript", e, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new be("executeSelectedScript", e, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new be("saveScripts", e, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new be("maximumWorkbookToggle", e, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [fe.Ctrl] } }), new be("spellCheck", e, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new be("calculateAll", e, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } })], []), s = L(() => {
@@ -2805,7 +2663,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2805
2663
  }, onScriptsChange: (T) => {
2806
2664
  w();
2807
2665
  } });
2808
- const { isFullscreenAvailable: f, isFullscreenEnabled: y, toggleFullscreen: C } = (function(T = {}) {
2666
+ const { isFullscreenAvailable: f, isFullscreenEnabled: y, toggleFullscreen: v } = (function(T = {}) {
2809
2667
  const { target: M, onChange: R, onError: D, requestFullScreenOptions: N } = T, [$, F] = V(!1), [z, P] = V(null), [j, te] = V(!1), de = _(() => st.requestFullscreen(M?.current || null, N), [M, N]), se = _(() => st.exitFullscreen(), []), A = _(() => st.fullscreenElement ? se() : de(), [de, se]), H = _((oe) => {
2810
2668
  const Y = st.fullscreenElement;
2811
2669
  P(Y), te(!!Y), R?.(oe);
@@ -2822,7 +2680,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2822
2680
  le(() => {
2823
2681
  s.getCommand("selectTheme").update({ state: () => a.getTheme(), context: () => ({ theme: a.getTheme(), themes: S, darkMode: l }) });
2824
2682
  }, [a?.getTheme(), l]);
2825
- const v = Z(async function(T, M) {
2683
+ const C = Z(async function(T, M) {
2826
2684
  let R = null;
2827
2685
  const D = a.getScripts();
2828
2686
  if (T?.declaration || T?.functionName) {
@@ -2847,7 +2705,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2847
2705
  } catch {
2848
2706
  }
2849
2707
  }
2850
- })(), title: s.getCommand("newCellStyle")?.label("cellStyle"), description: "Enter a name for the new cell style.", inputLabel: "Style Name", propsInput: { style: { minWidth: "300px" } }, options: ["Ok", "Cancel"], defaultOption: "Ok", onValidateInput: async (M, R) => {
2708
+ })(), title: s.getCommand("newCellStyle")?.getLabel("cellStyle"), description: "Enter a name for the new cell style.", inputLabel: "Style Name", propsInput: { style: { minWidth: "300px" } }, options: ["Ok", "Cancel"], defaultOption: "Ok", onValidateInput: async (M, R) => {
2851
2709
  let D = null;
2852
2710
  try {
2853
2711
  a.getStyles().validateStyleName(M, !1);
@@ -2887,7 +2745,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2887
2745
  a.setTheme(T);
2888
2746
  }), s.getCommand("calculateAll").updateCallback(() => {
2889
2747
  a.getSelectedSheet().getEntireRange().calculate(!0);
2890
- }), s.getCommand("executeScript").updateCallback(v), s.getCommand("executeSelectedScript").updateCallback(v);
2748
+ }), s.getCommand("executeScript").updateCallback(C), s.getCommand("executeSelectedScript").updateCallback(C);
2891
2749
  }, [a, c]);
2892
2750
  const k = Z(async (T) => {
2893
2751
  let M = 0, R = null, D = "Find & Replace";
@@ -2944,7 +2802,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2944
2802
  } catch (D) {
2945
2803
  c.showError(D.message);
2946
2804
  }
2947
- }, title: s.getCommand("activateTask")?.label(), inputLabel: "Task Name", options: ["Activate"] };
2805
+ }, title: s.getCommand("activateTask")?.getLabel(), inputLabel: "Task Name", options: ["Activate"] };
2948
2806
  c.showInput(M);
2949
2807
  }), s.getCommand("goto")?.update({ disabled: !c }).updateCallback(() => {
2950
2808
  const M = { onInput: async (R) => {
@@ -2953,7 +2811,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2953
2811
  } catch (D) {
2954
2812
  c.showMessage(D.message, { type: kt.Error });
2955
2813
  }
2956
- }, title: s.getCommand("goto")?.label(), inputLabel: "Location", options: ["Go To"] };
2814
+ }, title: s.getCommand("goto")?.getLabel(), inputLabel: "Location", options: ["Go To"] };
2957
2815
  c.showInput(M);
2958
2816
  }), s.getCommand("selectNamed")?.update({ disabled: !c }).updateCallback(async (M) => {
2959
2817
  if (M) try {
@@ -2984,91 +2842,91 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
2984
2842
  });
2985
2843
  } }), le(() => {
2986
2844
  s.getCommand("fullScreenToggle").update({ state: y, disabled: !f, icon: y ? "FullScreenOff" : "FullScreen" }).updateCallback(() => {
2987
- C();
2845
+ v();
2988
2846
  });
2989
2847
  }, [y, f]), le(() => {
2990
2848
  const T = a.getProtection().isStructureAllowed();
2991
2849
  s.getCommand("hideSheet").update({ disabled: d.length <= 1 || !T }), s.getCommand("deleteSheet").update({ disabled: d.length <= 1 || !T });
2992
2850
  }, [d, h]), s;
2993
- }, Nc = "_sheetxl-workbook_g5t6x_5", Qn = U(X((n, a) => {
2851
+ }, Tc = "_sheetxl-workbook_g5t6x_5", Qn = U(X((n, a) => {
2994
2852
  const { command: t, ...e } = n, r = ln(), [l, c] = V(!1), [h, i] = V("info");
2995
2853
  return le(() => {
2996
2854
  const d = r.getMode();
2997
2855
  c(d?.key === "copy" || d?.key === "cut"), i(d?.key === "cut" ? "warn" : "accent");
2998
2856
  }, [r]), o(B, { ref: a, command: t, icon: o(ye, { iconKey: "copy.walking", propsSource: { isWalking: l, themedType: h } }), ...e });
2999
- })), vi = U(X((n, a) => {
2857
+ })), bi = U(X((n, a) => {
3000
2858
  const { movable: t, commands: e, disabled: r, sx: l, floatReference: c, ...h } = n;
3001
2859
  je(t, { onAnyChange(s) {
3002
2860
  } });
3003
2861
  const i = L(() => ({}), []), d = L(() => ({ commandHook: { beforeExecute: (s, u) => c.closeAll(), onExecute() {
3004
2862
  }, onError() {
3005
2863
  console.log("onError");
3006
- } }, disabled: r, parentFloat: c }), [r, c]), g = L(() => ({ variant: re.Menuitem, ...i, ...d }), [i, d]), b = L(() => ({ commands: e, variant: re.Menuitem, parentFloat: c, ...d }), [e, d, c]), p = I(ae, { children: [o(Qn, { command: e.getCommand("copy"), ...g, variant: re.Menuitem }), [], o(Q, { orientation: "horizontal" }), o(Ke, { ...b, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), o(Ke, { ...b, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), o(Q, { orientation: "horizontal" }), o(B, { ...g, command: e.getCommand("toggleLockAspectRatio") }), o(Q, { orientation: "horizontal" }), o(Ke, { ...b, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: "DrawAlignLeft", tooltip: "Quickly change the placement of your drawings." }), o(Q, { orientation: "horizontal" }), o(Ke, { ...b, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
2864
+ } }, disabled: r, parentFloat: c }), [r, c]), g = L(() => ({ variant: re.Menuitem, ...i, ...d }), [i, d]), b = L(() => ({ commands: e, variant: re.Menuitem, parentFloat: c, ...d }), [e, d, c]), p = I(ae, { children: [o(Qn, { command: e.getCommand("copy"), ...g, variant: re.Menuitem }), [], o(Q, { orientation: "horizontal" }), o(qe, { ...b, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), o(qe, { ...b, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), o(Q, { orientation: "horizontal" }), o(B, { ...g, command: e.getCommand("toggleLockAspectRatio") }), o(Q, { orientation: "horizontal" }), o(qe, { ...b, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: "DrawAlignLeft", tooltip: "Quickly change the placement of your drawings." }), o(Q, { orientation: "horizontal" }), o(qe, { ...b, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
3007
2865
  return o(O, { ref: a, sx: { paddingTop: "4px", paddingBottom: "4px", ...l }, ...h, children: p });
3008
2866
  }));
3009
- vi.displayName = "MovableContextMenu";
3010
- const Ci = U(X((n, a) => {
3011
- const { workbook: t, commands: e, onBeforeUserChange: r, onUserChange: l, disabled: c = !1, readOnly: h = !1, propsContextMenu: i, renderContextMenu: d = Hc, propsSheetsAll: g, renderSheetsAll: b = Wc, propsSheetTab: p, renderSheetTab: s, background: u = "transparent", className: x, sx: w, borderWidth: m, borderColor: f, gridTheme: y, gridStyle: C, ...S } = n, [v, k] = V(t?.getSelectedSheetIndex()), [E, T] = V(t?.getSheets().getItems()), [M, R] = V(t?.getProtection());
3012
- je(t, { onViewChange(q) {
3013
- k(q?.getSelectedSheetIndex());
3014
- }, onSheetsChange: (q) => {
3015
- T(q.getSheets().getItems());
3016
- }, onProtectionChange: (q) => {
3017
- R(q?.getProtection());
2867
+ bi.displayName = "MovableContextMenu";
2868
+ const xi = U(X((n, a) => {
2869
+ const { workbook: t, commands: e, onBeforeUserChange: r, onUserChange: l, disabled: c = !1, readOnly: h = !1, propsContextMenu: i, renderContextMenu: d = Bc, propsSheetsAll: g, renderSheetsAll: b = Ac, propsSheetTab: p, renderSheetTab: s, background: u = "transparent", className: x, sx: w, borderWidth: m, borderColor: f, gridTheme: y, gridStyle: v, ...S } = n, [C, k] = V(t?.getSelectedSheetIndex()), [E, T] = V(t?.getSheets().getItems()), [M, R] = V(t?.getProtection());
2870
+ je(t, { onViewChange(G) {
2871
+ k(G?.getSelectedSheetIndex());
2872
+ }, onSheetsChange: (G) => {
2873
+ T(G.getSheets().getItems());
2874
+ }, onProtectionChange: (G) => {
2875
+ R(G?.getProtection());
3018
2876
  } });
3019
2877
  const D = h || !M.isStructureAllowed(), N = L(() => {
3020
- const q = [];
3021
- for (let W = 0; W < E.length; W++) q.push(E[W].getName());
3022
- return q;
3023
- }, [E]), $ = _((q) => {
3024
- r?.(q) !== !1 && (t.getSheetAt(q).select(), l?.(q));
3025
- }, [t, r, l]), F = _((q, W) => {
3026
- t.getSheetAt(q).setName(W), l?.(q);
3027
- }, [t, l]), z = _((q, W) => {
3028
- t.getSheetAt(q).setPosition(W), l?.(W);
2878
+ const G = [];
2879
+ for (let W = 0; W < E.length; W++) G.push(E[W].getName());
2880
+ return G;
2881
+ }, [E]), $ = _((G) => {
2882
+ r?.(G) !== !1 && (t.getSheetAt(G).select(), l?.(G));
2883
+ }, [t, r, l]), F = _((G, W) => {
2884
+ t.getSheetAt(G).setName(W), l?.(G);
2885
+ }, [t, l]), z = _((G, W) => {
2886
+ t.getSheetAt(G).setPosition(W), l?.(W);
3029
2887
  }, [t, l]), P = Z(() => {
3030
- if (r?.(v) === !1) return;
3031
- const q = v + 1;
3032
- t.getSheets().add({ name: void 0, autoSelect: !0 }), l?.(q);
3033
- }, [t, r, l, v]), j = L(() => ({ placement: "top-start" }), []), te = xe(null), [de, se] = V(!1), A = _((q) => {
3034
- const { closeFloatAll: W, floatReference: J } = q;
3035
- return b({ workbook: t, gridStyle: C, floatReference: J, closeFloatAll: W, ...g });
3036
- }, [b, g, c, t, C]), { reference: H, component: ie } = ao({ label: "allSheet", propsPopper: j, anchor: te.current, onOpen: () => se(!0), onClose: () => se(!1), createPopupPanel: A }), oe = xe(null), [Y, G] = V(null), pe = _((q) => {
3037
- const { floatReference: W } = q;
2888
+ if (r?.(C) === !1) return;
2889
+ const G = C + 1;
2890
+ t.getSheets().add({ name: void 0, autoSelect: !0 }), l?.(G);
2891
+ }, [t, r, l, C]), j = L(() => ({ placement: "top-start" }), []), te = xe(null), [de, se] = V(!1), A = _((G) => {
2892
+ const { closeFloatAll: W, floatReference: J } = G;
2893
+ return b({ workbook: t, gridStyle: v, floatReference: J, closeFloatAll: W, ...g });
2894
+ }, [b, g, c, t, v]), { reference: H, component: ie } = ao({ label: "allSheet", propsPopper: j, anchor: te.current, onOpen: () => se(!0), onClose: () => se(!1), createPopupPanel: A }), oe = xe(null), [Y, K] = V(null), pe = _((G) => {
2895
+ const { floatReference: W } = G;
3038
2896
  return d?.({ workbook: t, index: Y?.index, tabStripRef: oe.current, commands: e, disabled: c, floatReference: W, ...i });
3039
- }, [d, i, c, t, e, Y]), { reference: Me, component: Te } = ao({ label: "sheetTab", propsPopper: j, anchor: { getBoundingClientRect: () => new DOMRect(Y?.left || 0, Y?.top || 0, 0, 0) }, onClose: () => G(null), createPopupPanel: pe });
2897
+ }, [d, i, c, t, e, Y]), { reference: Me, component: Te } = ao({ label: "sheetTab", propsPopper: j, anchor: { getBoundingClientRect: () => new DOMRect(Y?.left || 0, Y?.top || 0, 0, 0) }, onClose: () => K(null), createPopupPanel: pe });
3040
2898
  le(() => {
3041
2899
  Y ? Me.open(0) : Me.close(0);
3042
2900
  }, [Y]);
3043
- const Ie = _((q, W) => {
3044
- q.preventDefault(), G({ left: q.clientX - 2, top: q.clientY - 4, index: W });
3045
- }, []), me = Z((q) => {
2901
+ const Ie = _((G, W) => {
2902
+ G.preventDefault(), K({ left: G.clientX - 2, top: G.clientY - 4, index: W });
2903
+ }, []), me = Z((G) => {
3046
2904
  let W;
3047
2905
  try {
3048
- W = t?.getSheetAt(q.index);
2906
+ W = t?.getSheetAt(G.index);
3049
2907
  } catch {
3050
2908
  }
3051
- return W ? (s ?? jc)({ sheet: W, gridTheme: y, onContextMenu: (J) => {
3052
- $(q.index), Ie(J, q.index);
3053
- }, ...q, ...p }) : null;
3054
- }, [s, p, t, y]), ue = L(() => D ? null : o(Et, { disableInteractive: !0, title: "New sheet", children: o(ct, { disabled: c, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (q) => q.palette.primary.main }, color: (q) => q.palette.text.icon ?? q.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (q) => {
3055
- q.button === 0 && q.preventDefault();
2909
+ return W ? (s ?? Ic)({ sheet: W, gridTheme: y, onContextMenu: (J) => {
2910
+ $(G.index), Ie(J, G.index);
2911
+ }, ...G, ...p }) : null;
2912
+ }, [s, p, t, y]), ue = L(() => D ? null : o(Et, { disableInteractive: !0, title: "New sheet", children: o(ct, { disabled: c, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (G) => G.palette.primary.main }, color: (G) => G.palette.text.icon ?? G.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (G) => {
2913
+ G.button === 0 && G.preventDefault();
3056
2914
  }, onClick: () => P(), children: o(ye, { iconKey: "AddCircle" }) }) }), [c, D, P]);
3057
- return I(O, { ref: a, className: Re(x), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...w }, ...S, children: [o(Ml, { ref: oe, selectedTabIndex: v, tabNames: N, onSelectedTabIndexChange: $, onTabNameChange: F, onTabMove: z, background: u, borderColor: f, borderWidth: m, activeColor: null, disabled: c, disableDrag: D, renderScrollButtonStart: ts, renderScrollButtonEnd: es, renderScrollButtonEdge: Jl, renderTabButton: me, renderTabDivider: (q) => {
3058
- const { key: W, ...J } = q;
3059
- return o(Q, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (ve) => Se(ve.palette.divider, 0.25) }, ...J }, W);
3060
- }, propsEditLabel: { readOnly: D, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (q) => {
3061
- t.isValidSheetNameCharacter(q.key) || q.preventDefault();
2915
+ return I(O, { ref: a, className: Re(x), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...w }, ...S, children: [o(Ml, { ref: oe, selectedTabIndex: C, tabNames: N, onSelectedTabIndexChange: $, onTabNameChange: F, onTabMove: z, background: u, borderColor: f, borderWidth: m, activeColor: null, disabled: c, disableDrag: D, renderScrollButtonStart: ts, renderScrollButtonEnd: es, renderScrollButtonEdge: Jl, renderTabButton: me, renderTabDivider: (G) => {
2916
+ const { key: W, ...J } = G;
2917
+ return o(Q, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (Ce) => Se(Ce.palette.divider, 0.25) }, ...J }, W);
2918
+ }, propsEditLabel: { readOnly: D, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (G) => {
2919
+ t.isValidSheetNameCharacter(G.key) || G.preventDefault();
3062
2920
  }, onCancel: () => {
3063
- l?.(v);
3064
- } }, children: o(Et, { disableInteractive: !0, title: de ? "" : "List all sheets", children: o(bt, { sx: { padding: "0px", ml: 0.5, mr: 0, mt: 0, mb: 0, "& svg": { transform: "scale(0.8, 1)" }, color: (q) => q.palette.text.icon ?? q.palette.action.active }, ref: te, dense: !0, outlined: !1, selected: de, color: "primary", "aria-label": "menu", onMouseDown: (q) => {
3065
- q.button === 0 && q.preventDefault();
2921
+ l?.(C);
2922
+ } }, children: o(Et, { disableInteractive: !0, title: de ? "" : "List all sheets", children: o(bt, { sx: { padding: "0px", ml: 0.5, mr: 0, mt: 0, mb: 0, "& svg": { transform: "scale(0.8, 1)" }, color: (G) => G.palette.text.icon ?? G.palette.action.active }, ref: te, dense: !0, outlined: !1, selected: de, color: "primary", "aria-label": "menu", onMouseDown: (G) => {
2923
+ G.button === 0 && G.preventDefault();
3066
2924
  }, onClick: () => {
3067
2925
  de ? H.close(0) : H.open(0);
3068
2926
  }, icon: o(ye, { iconKey: "Menu" }) }) }) }), o("div", { style: { borderTop: `solid ${f} ${m}px`, minWidth: "4px" } }), o("div", { style: { borderTop: `solid ${f} ${m}px`, flex: "none", display: "flex", alignItems: "center" }, children: ue }), o("div", { style: { borderTop: `solid ${f} ${m}px`, flex: 1, minWidth: "24px" } }), Te, ie] });
3069
2927
  }));
3070
- Ci.displayName = "WorkbookStrip";
3071
- const ki = U(X((n, a) => {
2928
+ xi.displayName = "WorkbookStrip";
2929
+ const yi = U(X((n, a) => {
3072
2930
  const { workbook: t, commands: e, disabled: r, sx: l, floatReference: c, className: h, ...i } = n, [d, g] = tn((D) => D + 1, 0), [b, p] = V(t.getSelectedSheet()), [s, u] = V(b.getSelectedRanges()), [x, w] = V(b.getSelectedCell());
3073
2931
  je(t, { onSheetsChange() {
3074
2932
  p(t.getSelectedSheet());
@@ -3080,133 +2938,133 @@ const ki = U(X((n, a) => {
3080
2938
  const m = L(() => ({}), []), f = L(() => ({ commandHook: { beforeExecute: (D, N) => c.closeAll(), onExecute() {
3081
2939
  }, onError() {
3082
2940
  console.log("onError");
3083
- } }, disabled: r, scope: "contextMenu", parentFloat: c }), [r, c]), y = L(() => ({ ...m, ...f, variant: re.Menuitem }), [m, f]), C = L(() => ({ commands: e, variant: re.Menuitem, parentFloat: c, ...f }), [e, f, c]), S = [];
3084
- let v = s.isEntireRows(), k = s.isEntireColumns();
3085
- s && (v && (S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), S.push(De(B, { command: e.getCommand("hideColumns"), ...y, key: "context:" + S.length })), S.push(De(B, { command: e.getCommand("unhideColumns"), ...y, key: "context:" + S.length }))), k && (S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), S.push(De(B, { command: e.getCommand("hideRows"), ...y, key: "context:" + S.length })), S.push(De(B, { command: e.getCommand("unhideRows"), ...y, key: "context:" + S.length }))), (v || k) && S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), v && (S.push(De(B, { command: e.getCommand("autoFitColumns"), ...y, key: "context:" + S.length })), S.push(De(B, { ...y, command: e.getCommand("resizeColumns"), key: "context:" + S.length }))), k && (S.push(De(B, { command: e.getCommand("autoFitRows"), ...y, key: "context:" + S.length })), S.push(De(B, { ...y, command: e.getCommand("resizeRows"), key: "context:" + S.length }))));
3086
- const E = [], T = e.getCommand("formatTableStyle"), M = T?.context()?.table();
3087
- if (Ut(T), !v && !k) {
3088
- if (E.push(o(Q, { orientation: "horizontal" }, "contextBefore:" + E.length)), x?.getHyperlink()) E.push(De(Ke, { ...C, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + E.length, quickCommand: "openHyperlink" }));
2941
+ } }, disabled: r, scope: "contextMenu", parentFloat: c }), [r, c]), y = L(() => ({ ...m, ...f, variant: re.Menuitem }), [m, f]), v = L(() => ({ commands: e, variant: re.Menuitem, parentFloat: c, ...f }), [e, f, c]), S = [];
2942
+ let C = s.isEntireRows(), k = s.isEntireColumns();
2943
+ s && (C && (S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), S.push(De(B, { command: e.getCommand("hideColumns"), ...y, key: "context:" + S.length })), S.push(De(B, { command: e.getCommand("unhideColumns"), ...y, key: "context:" + S.length }))), k && (S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), S.push(De(B, { command: e.getCommand("hideRows"), ...y, key: "context:" + S.length })), S.push(De(B, { command: e.getCommand("unhideRows"), ...y, key: "context:" + S.length }))), (C || k) && S.push(o(Q, { orientation: "horizontal" }, "context:" + S.length)), C && (S.push(De(B, { command: e.getCommand("autoFitColumns"), ...y, key: "context:" + S.length })), S.push(De(B, { ...y, command: e.getCommand("resizeColumns"), key: "context:" + S.length }))), k && (S.push(De(B, { command: e.getCommand("autoFitRows"), ...y, key: "context:" + S.length })), S.push(De(B, { ...y, command: e.getCommand("resizeRows"), key: "context:" + S.length }))));
2944
+ const E = [], T = e.getCommand("formatTableStyle"), M = T?.getContext()?.table();
2945
+ if (Ut(T), !C && !k) {
2946
+ if (E.push(o(Q, { orientation: "horizontal" }, "contextBefore:" + E.length)), x?.getHyperlink()) E.push(De(qe, { ...v, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + E.length, quickCommand: "openHyperlink" }));
3089
2947
  else {
3090
2948
  const D = e.getCommand("updateHyperlink");
3091
2949
  E.push(De(B, { command: D, ...y, key: "contextBefore:" + E.length }));
3092
2950
  }
3093
- if (x?.getComments()) E.push(De(Ke, { ...C, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + E.length, quickCommand: "updateComments" }));
2951
+ if (x?.getComments()) E.push(De(qe, { ...v, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + E.length, quickCommand: "updateComments" }));
3094
2952
  else {
3095
2953
  const D = e.getCommand("updateComments");
3096
2954
  E.push(De(B, { command: D, ...y, key: "contextBefore:" + E.length }));
3097
2955
  }
3098
- M ? E.push(De(Ke, { ...C, variant: re.Menuitem, key: "contextBefore:" + E.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: M, quickCommand: "editTable" })) : E.push(De(B, { command: e.getCommand("insertTable"), ...y, key: "context:" + S.length })), E.push(De(Ri, { ...C, key: "contextBefore:" + E.length }));
2956
+ M ? E.push(De(qe, { ...v, variant: re.Menuitem, key: "contextBefore:" + E.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: M, quickCommand: "editTable" })) : E.push(De(B, { command: e.getCommand("insertTable"), ...y, key: "context:" + S.length })), E.push(De(Ri, { ...v, key: "contextBefore:" + E.length }));
3099
2957
  }
3100
- const R = I(ae, { children: [o(B, { command: e.getCommand("cut"), ...y }), o(Qn, { command: e.getCommand("copy"), ...y }), o(La, { command: e.getCommand("paste"), ...C, includePasteAllInPopup: !1 }), o(Q, { orientation: "horizontal" }), o(Ba, { ...C }), o(Q, { orientation: "horizontal" }), o(Pa, { commands: e, ...C, disableSheet: !0 }), o(Fa, { commands: e, ...C, disableSheet: !0 }), o(Na, { ...C }), E, S] });
2958
+ const R = I(ae, { children: [o(B, { command: e.getCommand("cut"), ...y }), o(Qn, { command: e.getCommand("copy"), ...y }), o(Ti, { command: e.getCommand("paste"), ...v, includePasteAllInPopup: !1 }), o(Q, { orientation: "horizontal" }), o(Ci, { ...v }), o(Q, { orientation: "horizontal" }), o(Pa, { commands: e, ...v, disableSheet: !0 }), o(Fa, { commands: e, ...v, disableSheet: !0 }), o(Na, { ...v }), E, S] });
3101
2959
  return o(O, { ref: a, className: Re("menu", h), sx: { ...l }, ...i, children: R });
3102
2960
  }));
3103
- ki.displayName = "WorkbookContextMenu";
3104
- const Pc = (n) => o(vi, { ...n }), Fc = (n) => o(ki, { ...n }), Oc = (n) => o(ti, { ...n }), Bc = (n) => o(ei, { ...n }), Jn = (n) => o(Po, { transitionDelay: "160ms", transparentBackground: !0, ...n }), Ac = (n) => o(os, { fullscreen: !0, ...n }), Ic = (n) => o(Nl, { ...n }), Lc = (n) => o(qa, { ...n }), zc = (n) => o(Ci, { ...n }), Hc = (n) => o(ni, { ...n }), Wc = (n) => o(ri, { ...n }), jc = (n) => o(oi, { ...n }), $c = { fireOnModelChange: !1 }, ta = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Ti = U(X((n, a) => {
3105
- const { workbook: t, onElementLoad: e, autoFocus: r = !1, style: l, className: c, onFocus: h, onBlur: i, onKeyDown: d, onRepeatCommandChange: g, commands: b, showFormulaBar: p, propsFormulaBar: s, renderFormulaBar: u = Bc, showTabs: x, propsTabs: w, renderTabs: m = zc, showStatusBar: f, propsStatusBar: y, renderStatusBar: C = Lc, propsToolbar: S, renderToolbar: v = wi, propsContextMenu: k, renderContextMenu: E = Fc, renderFilterMenu: T = Oc, renderMovableMenu: M = Pc, renderLoading: R = Jn, propsLoading: D, propsSheet: N, renderSheet: $ = Ic, wrapperMain: F, showHorizontalScrollbar: z, showVerticalScrollbar: P, gridTheme: j, headersTheme: te, enableDarkImages: de, ...se } = n;
2961
+ yi.displayName = "WorkbookContextMenu";
2962
+ const Ec = (n) => o(bi, { ...n }), Dc = (n) => o(yi, { ...n }), Rc = (n) => o(Ga, { ...n }), Mc = (n) => o(Ka, { ...n }), Jn = (n) => o(Po, { transitionDelay: "160ms", transparentBackground: !0, ...n }), Nc = (n) => o(os, { fullscreen: !0, ...n }), Pc = (n) => o(Nl, { ...n }), Fc = (n) => o(Ha, { ...n }), Oc = (n) => o(xi, { ...n }), Bc = (n) => o(Qa, { ...n }), Ac = (n) => o(Ja, { ...n }), Ic = (n) => o(Za, { ...n }), Lc = { fireOnModelChange: !1 }, ta = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, wi = U(X((n, a) => {
2963
+ const { workbook: t, onElementLoad: e, autoFocus: r = !1, style: l, className: c, onFocus: h, onBlur: i, onKeyDown: d, onRepeatCommandChange: g, commands: b, showFormulaBar: p, propsFormulaBar: s, renderFormulaBar: u = Mc, showTabs: x, propsTabs: w, renderTabs: m = Oc, showStatusBar: f, propsStatusBar: y, renderStatusBar: v = Fc, propsToolbar: S, renderToolbar: C = gi, propsContextMenu: k, renderContextMenu: E = Dc, renderFilterMenu: T = Rc, renderMovableMenu: M = Ec, renderLoading: R = Jn, propsLoading: D, propsSheet: N, renderSheet: $ = Pc, wrapperMain: F, showHorizontalScrollbar: z, showVerticalScrollbar: P, gridTheme: j, headersTheme: te, enableDarkImages: de, ...se } = n;
3106
2964
  if (!t) throw new Error("IWorkbook must be provided.");
3107
- const A = Je(), H = xe(null), [ie, oe] = V(!1), Y = xe(null), G = L(() => o(O, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: Y }), []), [pe, Me] = V(!1), [Te, Ie] = V(!1), me = _(() => {
2965
+ const A = Je(), H = xe(null), [ie, oe] = V(!1), Y = xe(null), K = L(() => o(O, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: Y }), []), [pe, Me] = V(!1), [Te, Ie] = V(!1), me = _(() => {
3108
2966
  Me(!0);
3109
- }, []), ue = xe(null), q = Rt(a, () => ({ isWorkbookElement: () => !0, getWorkbook: () => t, getSheetElement: () => H.current, getViewportElement: () => Y.current, getFormulaBarElement: () => ue.current, focus() {
2967
+ }, []), ue = xe(null), G = Rt(a, () => ({ isWorkbookElement: () => !0, getWorkbook: () => t, getSheetElement: () => H.current, getViewportElement: () => Y.current, getFormulaBarElement: () => ue.current, focus() {
3110
2968
  H && H.current && H.current.focus();
3111
2969
  } }), [t]), W = xe(null);
3112
2970
  Tt(() => {
3113
- !pe || !q.current || (async () => (W.current !== e && (await e?.({ source: q.current }), W.current = e), Ie(!0)))();
3114
- }, [pe, q.current]), _r(q.current);
3115
- const J = _((K) => (H.current?.submitEdit(), !0), []), ve = _(() => {
2971
+ !pe || !G.current || (async () => (W.current !== e && (await e?.({ source: G.current }), W.current = e), Ie(!0)))();
2972
+ }, [pe, G.current]), _r(G.current);
2973
+ const J = _((q) => (H.current?.submitEdit(), !0), []), Ce = _(() => {
3116
2974
  requestAnimationFrame(() => {
3117
2975
  H?.current?.focus();
3118
2976
  });
3119
- }, []), [ge, Ne] = V(t.getSelectedSheet()), [qe, Ve] = V(t.getProtection());
3120
- je(t, { onSheetsChange: (K) => {
3121
- Ne(K?.getSelectedSheet());
3122
- }, onViewChange(K) {
3123
- Ne(K?.getSelectedSheet());
3124
- }, onProtectionChange: (K) => {
3125
- Ve(K?.getProtection());
3126
- } }), je(t, { onRequestSelect: async (K, Ee) => new Promise(($e) => {
2977
+ }, []), [ge, Ne] = V(t.getSelectedSheet()), [Ge, Ve] = V(t.getProtection());
2978
+ je(t, { onSheetsChange: (q) => {
2979
+ Ne(q?.getSelectedSheet());
2980
+ }, onViewChange(q) {
2981
+ Ne(q?.getSelectedSheet());
2982
+ }, onProtectionChange: (q) => {
2983
+ Ve(q?.getProtection());
2984
+ } }), je(t, { onRequestSelect: async (q, Ee) => new Promise(($e) => {
3127
2985
  H.current.getSheet() !== Ee ? H.current.getGridElement()?.onViewChangeOnce(() => {
3128
2986
  H.current.getSheet() !== Ee && $e(!1), $e(!0);
3129
2987
  }) : $e(!0);
3130
- }) }, $c);
3131
- const [Ze, Xe] = tn((K) => K + 1, 0), Ue = t.getView();
3132
- je(Ue, { onViewChange: (K) => {
2988
+ }) }, Lc);
2989
+ const [Ze, Xe] = tn((q) => q + 1, 0), Ue = t.getView();
2990
+ je(Ue, { onViewChange: (q) => {
3133
2991
  Xe();
3134
2992
  } });
3135
- const ee = j ?? A, we = L(() => qr(A, ee), [A, ee]), Mt = te ?? A, un = L(() => qr(A, Mt), [A, Mt]), [io, Bo] = V(null);
2993
+ const ee = j ?? A, we = L(() => Gr(A, ee), [A, ee]), Mt = te ?? A, un = L(() => Gr(A, Mt), [A, Mt]), [io, Bo] = V(null);
3136
2994
  _(() => {
3137
2995
  H.current.focus();
3138
2996
  }, []);
3139
- const Le = Mc({ workbook: t, workbookElement: q.current, target: () => H.current, commands: b, darkMode: we.body.darkMode }), Nt = xe(null), [Pt, nr] = V(!1), [rr, ar] = V(null), [ir, Xi] = V(uo.Top), [lo, Yi] = V(kl.EmptyBounds), mn = _(() => {
2997
+ const Le = kc({ workbook: t, workbookElement: G.current, target: () => H.current, commands: b, darkMode: we.body.darkMode }), Nt = xe(null), [Pt, nr] = V(!1), [rr, ar] = V(null), [ir, Xi] = V(uo.Top), [lo, Yi] = V(Cl.EmptyBounds), mn = _(() => {
3140
2998
  nr(!1), ar(null);
3141
- }, []), so = _((K, Ee, $e = uo.Top) => {
3142
- Yi(K), Xi($e), ar(Ee), Nt.current !== null && setTimeout(() => {
2999
+ }, []), so = _((q, Ee, $e = uo.Top) => {
3000
+ Yi(q), Xi($e), ar(Ee), Nt.current !== null && setTimeout(() => {
3143
3001
  Nt.current !== null && Nt.current.update();
3144
3002
  }, 160), nr(!0);
3145
- }, []), [Bd, lr] = V("sheet"), Ft = x ?? Ue?.isShowTabs(), Ot = z ?? Ue?.isShowHorizontalScrollbar(), Zi = p ?? Ue?.isShowFormulaBar(), Ao = f ?? Ue?.isShowStatusBar(), sr = P ?? Ue?.isShowVerticalScrollbar(), qt = we?.header?.edgeStrokeFill || "rgb(171,171,171)", Qi = L(() => Ao ? C({ sheet: ge, gridStyle: we, ...y }) : null, [C, y, Ao, we, ge]), Ji = L(() => v({ commands: Le, workbook: q.current, ...S }), [Le, v, S, A]), [el, { width: hn }] = Vt(), Bt = hn === 0 || hn > 560, gn = L(() => {
3003
+ }, []), [Bd, lr] = V("sheet"), Ft = x ?? Ue?.isShowTabs(), Ot = z ?? Ue?.isShowHorizontalScrollbar(), Zi = p ?? Ue?.isShowFormulaBar(), Ao = f ?? Ue?.isShowStatusBar(), sr = P ?? Ue?.isShowVerticalScrollbar(), Gt = we?.header?.edgeStrokeFill || "rgb(171,171,171)", Qi = L(() => Ao ? v({ sheet: ge, gridStyle: we, ...y }) : null, [v, y, Ao, we, ge]), Ji = L(() => C({ commands: Le, workbook: G.current, ...S }), [Le, C, S, A]), [el, { width: hn }] = Vt(), Bt = hn === 0 || hn > 560, gn = L(() => {
3146
3004
  if (!Ft) return null;
3147
- let K = m({ background: we.body.fill, borderWidth: 1, borderColor: qt, gridTheme: ee, gridStyle: we, onBeforeUserChange: J, onUserChange: ve, workbook: t, commands: Le, propsSheetTab: {}, ...w });
3148
- return Bt || (K = o("div", { style: { flex: "none", display: "flex" }, children: K })), K;
3149
- }, [m, w, A, t, ee, Bt, Le, Ft]), cr = _((K) => {
3150
- const { style: Ee, ...$e } = K;
3151
- let _e = null, pt = null, Ge = null;
3152
- if (Ot && (pt = o("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${qt} 1px`, flexDirection: "column", justifyContent: "center" }, children: o(fr, { ...$e, style: { paddingLeft: "4px", paddingRight: "4px", ...Ee }, propsTouchThumb: { backgroundColor: ee.palette.background.paper, borderColor: ee.palette.primary.main, fillColor: "grey" }, endGap: 700, sheet: ge, onShowTooltip: (Ye) => {
3005
+ let q = m({ background: we.body.fill, borderWidth: 1, borderColor: Gt, gridTheme: ee, gridStyle: we, onBeforeUserChange: J, onUserChange: Ce, workbook: t, commands: Le, propsSheetTab: {}, ...w });
3006
+ return Bt || (q = o("div", { style: { flex: "none", display: "flex" }, children: q })), q;
3007
+ }, [m, w, A, t, ee, Bt, Le, Ft]), cr = _((q) => {
3008
+ const { style: Ee, ...$e } = q;
3009
+ let _e = null, pt = null, Ke = null;
3010
+ if (Ot && (pt = o("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${Gt} 1px`, flexDirection: "column", justifyContent: "center" }, children: o(fr, { ...$e, style: { paddingLeft: "4px", paddingRight: "4px", ...Ee }, propsTouchThumb: { backgroundColor: ee.palette.background.paper, borderColor: ee.palette.primary.main, fillColor: "grey" }, endGap: 700, sheet: ge, onShowTooltip: (Ye) => {
3153
3011
  so({ x: Ye.anchor.x, y: Ye.anchor.y, width: 0, height: 0 }, Ye.display, Ye.placement);
3154
- }, onCloseTooltip: () => mn() }) })), Ft && Bt && (Ge = gn), Ft && Bt && !Ot && (Ge = I(O, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [Ge, o(O, { sx: { borderTop: `solid ${qt} 1px`, flex: "1" } })] })), Ge && Ot) _e = o(qn, { position: t.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: Ye }) => {
3012
+ }, onCloseTooltip: () => mn() }) })), Ft && Bt && (Ke = gn), Ft && Bt && !Ot && (Ke = I(O, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [Ke, o(O, { sx: { borderTop: `solid ${Gt} 1px`, flex: "1" } })] })), Ke && Ot) _e = o(Gn, { position: t.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: Ye }) => {
3155
3013
  t.getView().setTabRatio(Math.round(10 * Ye));
3156
- }, minBefore: "200px", minAfter: "180px", propsResizer: { style: { minWidth: "11px", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${A.palette.text.icon ?? A.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center", borderTop: `solid ${qt} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: Ge, elementAfter: pt });
3014
+ }, minBefore: "200px", minAfter: "180px", propsResizer: { style: { minWidth: "11px", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${A.palette.text.icon ?? A.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center", borderTop: `solid ${Gt} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: Ke, elementAfter: pt });
3157
3015
  else if (Ot) _e = pt;
3158
3016
  else {
3159
- if (!Ge) return o(O, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: Ao ? null : `solid ${qt} 1px` } });
3160
- _e = Ge;
3017
+ if (!Ke) return o(O, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: Ao ? null : `solid ${Gt} 1px` } });
3018
+ _e = Ke;
3161
3019
  }
3162
3020
  return o(O, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: _e });
3163
3021
  }, [ge, J, t, we, ee, Le, Ft, Ot, Ao, Bt]), [ot, co] = ne.useState(null), tl = L(() => ({ placement: "right-start", ...ot?.propsPopper }), [ot?.propsPopper]), { reference: dr, component: ol } = ao({ label: "contextMenu", propsPopper: tl, anchor: ot?.anchor ?? { getBoundingClientRect: () => new DOMRect(ot?.clientX || 0, ot?.clientY || 0) }, onClose: () => co(null), createPopupPanel: ot?.createPopupPanel });
3164
3022
  le(() => {
3165
3023
  ot ? dr.open(0) : dr.close(0);
3166
3024
  }, [ot]);
3167
- const nl = Z((K, Ee) => {
3168
- if (K?.isDefaultPrevented()) return !0;
3169
- K.preventDefault(), ot && ot.anchor === K.currentTarget ? co(null) : co({ anchor: K.currentTarget, propsPopper: { offsets: [-4, 2] }, createPopupPanel: ($e) => {
3025
+ const nl = Z((q, Ee) => {
3026
+ if (q?.isDefaultPrevented()) return !0;
3027
+ q.preventDefault(), ot && ot.anchor === q.currentTarget ? co(null) : co({ anchor: q.currentTarget, propsPopper: { offsets: [-4, 2] }, createPopupPanel: ($e) => {
3170
3028
  const { floatReference: _e } = $e;
3171
3029
  return T({ filter: Ee, commands: Le, floatReference: _e, ...k });
3172
3030
  } });
3173
- }, [T, k, Le, t, ot]), pr = Z((K) => {
3174
- if (K.originalEvent?.isDefaultPrevented()) return !0;
3175
- K.originalEvent?.preventDefault(), co({ clientX: K.clientX, clientY: K.clientY, createPopupPanel: (Ee) => {
3031
+ }, [T, k, Le, t, ot]), pr = Z((q) => {
3032
+ if (q.originalEvent?.isDefaultPrevented()) return !0;
3033
+ q.originalEvent?.preventDefault(), co({ clientX: q.clientX, clientY: q.clientY, createPopupPanel: (Ee) => {
3176
3034
  const { floatReference: $e } = Ee;
3177
3035
  return E({ commands: Le, workbook: t, floatReference: $e, ...k });
3178
3036
  } });
3179
- }, [E, k, Le, t]), rl = Z((K, Ee) => {
3180
- if (K?.isDefaultPrevented()) return !0;
3181
- K.preventDefault(), co({ clientX: K.clientX, clientY: K.clientY, createPopupPanel: ($e) => {
3037
+ }, [E, k, Le, t]), rl = Z((q, Ee) => {
3038
+ if (q?.isDefaultPrevented()) return !0;
3039
+ q.preventDefault(), co({ clientX: q.clientX, clientY: q.clientY, createPopupPanel: ($e) => {
3182
3040
  const { floatReference: _e } = $e;
3183
3041
  return M({ movable: Ee, commands: Le, floatReference: _e, ...k });
3184
3042
  } });
3185
3043
  }, [M, k, Le]);
3186
3044
  L(() => {
3187
- const K = [new We("openContextMenu", () => H.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [fe.Shift] }, { key: "ContextMenu" }] })];
3188
- Le.addCommands(K, !0);
3045
+ const q = [new We("openContextMenu", () => H.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [fe.Shift] }, { key: "ContextMenu" }] })];
3046
+ Le.addCommands(q, !0);
3189
3047
  }, [Le]), le(() => {
3190
3048
  Le.getCommand("openContextMenu").updateCallback(() => {
3191
- const K = ge.getSelection().getCoords().cell;
3192
- H.current?.getGridElement()?.scrollCellCoordsIntoView(K).then((Ee) => {
3049
+ const q = ge.getSelection().getCoords().cell;
3050
+ H.current?.getGridElement()?.scrollCellCoordsIntoView(q).then((Ee) => {
3193
3051
  requestAnimationFrame(() => {
3194
- const $e = ge.getView().getZoomScale() / 100, _e = ge.getColumnHeaders().findOffset(K.colIndex + 1) * $e, pt = ge.getRowHeaders().findOffset(K.rowIndex + 1) * $e, Ge = H.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
3195
- pr({ clientX: _e - Ge.x - Ee.left + 6, clientY: pt - Ge.y - Ee.top + 6 });
3052
+ const $e = ge.getView().getZoomScale() / 100, _e = ge.getColumnHeaders().findOffset(q.colIndex + 1) * $e, pt = ge.getRowHeaders().findOffset(q.rowIndex + 1) * $e, Ke = H.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
3053
+ pr({ clientX: _e - Ke.x - Ee.left + 6, clientY: pt - Ke.y - Ee.top + 6 });
3196
3054
  });
3197
3055
  });
3198
3056
  });
3199
3057
  }, [ge]);
3200
- const al = Z((K) => {
3201
- Le?.dispatchToFocusedCommand(K);
3058
+ const al = Z((q) => {
3059
+ Le?.dispatchToFocusedCommand(q);
3202
3060
  }, [Le]), il = Z(() => {
3203
- _r(q.current);
3061
+ _r(G.current);
3204
3062
  }, []), ll = _(() => {
3205
3063
  lr("sheet");
3206
3064
  }, []), sl = _(() => {
3207
3065
  lr("formulaBar");
3208
- }, []), cl = _((K) => {
3209
- const { style: Ee, ...$e } = K;
3066
+ }, []), cl = _((q) => {
3067
+ const { style: Ee, ...$e } = q;
3210
3068
  return o(fr, { ...$e, style: { ...Ee, paddingTop: "4px", paddingBottom: "4px" }, propsTouchThumb: { backgroundColor: ee.palette.background.paper, borderColor: ee.palette.primary.main, fillColor: "grey" }, sheet: ge, endGap: 700, onShowTooltip: (_e) => {
3211
3069
  so(_e.anchor, _e.display, uo.Left);
3212
3070
  }, onCloseTooltip: () => mn() });
@@ -3214,48 +3072,48 @@ const Pc = (n) => o(vi, { ...n }), Fc = (n) => o(ki, { ...n }), Oc = (n) => o(ti
3214
3072
  le(() => {
3215
3073
  r && H && H.current && H.current.focus();
3216
3074
  }, []);
3217
- const ur = xe(null), dl = L(() => o(In, { in: !Te, nodeRef: ur, timeout: 500, classNames: "animating", unmountOnExit: !0, children: o(O, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", position: "absolute", boxSizing: "border-box", pointerEvents: Te ? "none" : l?.pointerEvents }, children: R?.({ ref: ur, ...D }) }) }), [Te, R, D]), pl = L(() => u({ ref: ue, sx: { marginTop: (K) => K.spacing(0.25), marginLeft: (K) => K.spacing(1), marginRight: (K) => K.spacing(1) }, workbook: t, sheetElement: H.current, gridStyle: we, onFocus: sl, ...s, propsNamedCollectionEditor: { restoreFocus: (K) => H.current.focus(K), ...s?.propsNamedCollectionEditor, propsCommandPopupButton: { commands: Le, ...s?.propsNamedCollectionEditor?.propsCommandPopupButton } } }), [u, s, t, we, Le, Te]), ul = _((K) => {
3218
- const { movable: Ee, ...$e } = K, _e = { movable: Ee, onContextMenuCapture: (Ye) => {
3075
+ const ur = xe(null), dl = L(() => o(In, { in: !Te, nodeRef: ur, timeout: 500, classNames: "animating", unmountOnExit: !0, children: o(O, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", position: "absolute", boxSizing: "border-box", pointerEvents: Te ? "none" : l?.pointerEvents }, children: R?.({ ref: ur, ...D }) }) }), [Te, R, D]), pl = L(() => u({ ref: ue, sx: { marginTop: (q) => q.spacing(0.25), marginLeft: (q) => q.spacing(1), marginRight: (q) => q.spacing(1) }, workbook: t, sheetElement: H.current, gridStyle: we, onFocus: sl, ...s, propsNamedCollectionEditor: { restoreFocus: (q) => H.current.focus(q), ...s?.propsNamedCollectionEditor, propsCommandPopupButton: { commands: Le, ...s?.propsNamedCollectionEditor?.propsCommandPopupButton } } }), [u, s, t, we, Le, Te]), ul = _((q) => {
3076
+ const { movable: Ee, ...$e } = q, _e = { movable: Ee, onContextMenuCapture: (Ye) => {
3219
3077
  rl(Ye, Ee);
3220
3078
  }, ...$e }, pt = Ee.getContent().getType();
3221
- let Ge = null;
3079
+ let Ke = null;
3222
3080
  if (pt === "picture") return o(Pl, { loadingPanel: o(Po, { style: { position: "absolute" }, transitionDelay: "100", sx: { border: (Ye) => `solid 1px ${Ye.palette.action.active}` } }), picture: Ee.getContent(), description: Ee.getDescription() ?? Ee?.getName(), ..._e });
3223
3081
  if (pt === "chart") {
3224
3082
  const Ye = { ..._e, chart: Ee.getContent() };
3225
3083
  return o(Fl, { ...Ye });
3226
3084
  }
3227
- if (Ge = `Float of type '${pt}'.`, typeof Ge == "string") {
3228
- const Ye = { ..._e, description: Ge };
3229
- Ge = o(Ol, { ...Ye });
3085
+ if (Ke = `Float of type '${pt}'.`, typeof Ke == "string") {
3086
+ const Ye = { ..._e, description: Ke };
3087
+ Ke = o(Ol, { ...Ye });
3230
3088
  }
3231
- return o("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: Ge }, Ee.getUUID());
3232
- }, []), mr = L(() => $({ ref: H, style: ta, onFocus: ll, gridStyle: we, headersStyle: un, sheet: ge, commands: Le, onSheetContextMenu: pr, onViewportChange: (K) => {
3233
- Bo(K);
3234
- }, showScrollbars: !1, viewportComponent: G, onRepeatCommandChange: g, onElementLoad: me, onShowColumnTooltip: (K) => {
3235
- so(K.anchor, K.display, uo.Top);
3236
- }, onShowRowTooltip: (K) => {
3237
- so(K.anchor, K.display, uo.Right);
3238
- }, onShowTooltip: (K) => {
3239
- so({ x: K.anchor.x, y: K.anchor.y, width: 0, height: 0 }, K.display, K.placement);
3240
- }, onCloseTooltip: () => mn(), renderMovable: ul, ...N, propsCellRender: { onFilterButtonMouseDown: (K, Ee) => {
3241
- N?.propsCellRender?.onFilterButtonMouseDown(K, Ee), nl(K, Ee);
3089
+ return o("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: Ke }, Ee.getUUID());
3090
+ }, []), mr = L(() => $({ ref: H, style: ta, onFocus: ll, gridStyle: we, headersStyle: un, sheet: ge, commands: Le, onSheetContextMenu: pr, onViewportChange: (q) => {
3091
+ Bo(q);
3092
+ }, showScrollbars: !1, viewportComponent: K, onRepeatCommandChange: g, onElementLoad: me, onShowColumnTooltip: (q) => {
3093
+ so(q.anchor, q.display, uo.Top);
3094
+ }, onShowRowTooltip: (q) => {
3095
+ so(q.anchor, q.display, uo.Right);
3096
+ }, onShowTooltip: (q) => {
3097
+ so({ x: q.anchor.x, y: q.anchor.y, width: 0, height: 0 }, q.display, q.placement);
3098
+ }, onCloseTooltip: () => mn(), renderMovable: ul, ...N, propsCellRender: { onFilterButtonMouseDown: (q, Ee) => {
3099
+ N?.propsCellRender?.onFilterButtonMouseDown(q, Ee), nl(q, Ee);
3242
3100
  }, ...N?.propsCellRender } }), [Le, N, ge, we, g]), ml = L(() => {
3243
- let K = o(us, { ref: el, style: ta, viewport: io, touchElement: H.current?.getGridElement()?.stage, onScrollViewport: (Ee) => {
3101
+ let q = o(us, { ref: el, style: ta, viewport: io, touchElement: H.current?.getGridElement()?.stage, onScrollViewport: (Ee) => {
3244
3102
  H.current?.getGridElement()?.scrollTo(Ee);
3245
3103
  }, showHorizontalScrollbar: Ot || Ft, showVerticalScrollbar: sr, renderScrollbarHorizontal: cr, renderScrollbarVertical: cl, children: mr });
3246
- return Bt || hn === 0 || (K = I(ae, { children: [K, gn] })), F ? F(K) : K;
3247
- }, [Ot, Ft, cr, sr, io, Bt, mr, gn, A, F, ee]), hl = L(() => o(Et, { arrow: !0, disableInteractive: !0, open: Pt, title: o(Fe, { variant: "subtitle2", component: "div", children: rr }), placement: ir, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: Nt, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Pt ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(lo.x, lo.y, lo.width, lo.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: o(O, {}) }), [Pt, rr, ir, lo, Nt]), gl = L(() => ({ boxSizing: "border-box", background: (K) => K.palette.mode !== "dark" ? we.header.fill : K.palette.background.paper, "& *": { ...ns(A), fontWeight: 400 }, "& .viewport-overlay": { borderRight: `solid ${qt} 1px` }, ...l }), [l, we]), fl = L(() => o(O, { sx: { marginBottom: (K) => K.spacing(0.75) } }), []), bl = L(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: Te ? void 0 : 0, "--sxl-app-color-high-contrast": A.palette.primary.main, "--sxl-app-color-primary": A.palette.primary.main, "--sxl-app-color-primary-dark": A.palette.primary.dark, "--sxl-app-color-primary-light": A.palette.primary.light, "--sxl-app-color-info": A.palette.info.main, "--sxl-app-color-info-dark": A.palette.info.dark, "--sxl-app-color-info-light": A.palette.info.light, "--sxl-app-color-secondary": A.palette.secondary.main, "--sxl-app-color-secondary-dark": A.palette.secondary.dark, "--sxl-app-color-secondary-light": A.palette.secondary.light, "--sxl-app-color-success": A.palette.success.main, "--sxl-app-color-success-dark": A.palette.success.dark, "--sxl-app-color-success-light": A.palette.success.light, "--sxl-app-color-warning": A.palette.warning.main, "--sxl-app-color-warning-dark": A.palette.warning.dark, "--sxl-app-color-warning-light": A.palette.warning.light, "--sxl-app-color-error": A.palette.error.main, "--sxl-app-color-error-dark": A.palette.error.dark, "--sxl-app-color-error-light": A.palette.error.light, "--sxl-app-color-text": A.palette.text.primary, "--sxl-app-color-text-secondary": A.palette.text.secondary, "--sxl-app-color-text-disabled": A.palette.text.disabled, "--sxl-app-color-background": A.palette.background.paper, "--sxl-app-color-button-surface": A.palette.grey[600], "--sxl-app-color-shadow": A.palette.action.focus, "--sxl-app-color-grey": A.palette.grey[500], "--sxl-app-filter-dark-invert": we.body.darkMode && de ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": we.body.darkMode ? `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})` : void 0 }), [we, A, Te]), xl = L(() => Re(Ha), []);
3248
- return I(O, { className: Re("sheetxl-workbook", Nc, { "Mui-focusVisible": ie }, yc, c), sx: gl, style: l, ...se, ref: q, onFocus: (K) => {
3249
- oe(!0), il(), h?.(K);
3250
- }, onBlur: (K) => {
3251
- oe(!1), i?.(K);
3252
- }, onKeyDown: (K) => {
3253
- al(K), d?.(K);
3104
+ return Bt || hn === 0 || (q = I(ae, { children: [q, gn] })), F ? F(q) : q;
3105
+ }, [Ot, Ft, cr, sr, io, Bt, mr, gn, A, F, ee]), hl = L(() => o(Et, { arrow: !0, disableInteractive: !0, open: Pt, title: o(Fe, { variant: "subtitle2", component: "div", children: rr }), placement: ir, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: Nt, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Pt ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(lo.x, lo.y, lo.width, lo.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: o(O, {}) }), [Pt, rr, ir, lo, Nt]), gl = L(() => ({ boxSizing: "border-box", background: (q) => q.palette.mode !== "dark" ? we.header.fill : q.palette.background.paper, "& *": { ...ns(A), fontWeight: 400 }, "& .viewport-overlay": { borderRight: `solid ${Gt} 1px` }, ...l }), [l, we]), fl = L(() => o(O, { sx: { marginBottom: (q) => q.spacing(0.75) } }), []), bl = L(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: Te ? void 0 : 0, "--sxl-app-color-high-contrast": A.palette.primary.main, "--sxl-app-color-primary": A.palette.primary.main, "--sxl-app-color-primary-dark": A.palette.primary.dark, "--sxl-app-color-primary-light": A.palette.primary.light, "--sxl-app-color-info": A.palette.info.main, "--sxl-app-color-info-dark": A.palette.info.dark, "--sxl-app-color-info-light": A.palette.info.light, "--sxl-app-color-secondary": A.palette.secondary.main, "--sxl-app-color-secondary-dark": A.palette.secondary.dark, "--sxl-app-color-secondary-light": A.palette.secondary.light, "--sxl-app-color-success": A.palette.success.main, "--sxl-app-color-success-dark": A.palette.success.dark, "--sxl-app-color-success-light": A.palette.success.light, "--sxl-app-color-warning": A.palette.warning.main, "--sxl-app-color-warning-dark": A.palette.warning.dark, "--sxl-app-color-warning-light": A.palette.warning.light, "--sxl-app-color-error": A.palette.error.main, "--sxl-app-color-error-dark": A.palette.error.dark, "--sxl-app-color-error-light": A.palette.error.light, "--sxl-app-color-text": A.palette.text.primary, "--sxl-app-color-text-secondary": A.palette.text.secondary, "--sxl-app-color-text-disabled": A.palette.text.disabled, "--sxl-app-color-background": A.palette.background.paper, "--sxl-app-color-button-surface": A.palette.grey[600], "--sxl-app-color-shadow": A.palette.action.focus, "--sxl-app-color-grey": A.palette.grey[500], "--sxl-app-filter-dark-invert": we.body.darkMode && de ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": we.body.darkMode ? `linear-gradient(${Se("#fff", Be(5))}, ${Se("#fff", Be(5))})` : void 0 }), [we, A, Te]), xl = L(() => Re(qa), []);
3106
+ return I(O, { className: Re("sheetxl-workbook", Tc, { "Mui-focusVisible": ie }, hc, c), sx: gl, style: l, ...se, ref: G, onFocus: (q) => {
3107
+ oe(!0), il(), h?.(q);
3108
+ }, onBlur: (q) => {
3109
+ oe(!1), i?.(q);
3110
+ }, onKeyDown: (q) => {
3111
+ al(q), d?.(q);
3254
3112
  }, children: [I("div", { className: xl, style: bl, children: [Ji, Zi ? pl : null, fl, ml, Qi, hl, ol] }), dl] });
3255
3113
  }));
3256
- Ti.displayName = "WorkbookElement";
3257
- const Vc = (n = !1, a = !1) => a ? null : { "& input:not(:focus):not(:hover)": { color: (t) => t.palette.text.secondary }, backgroundColor: (t) => Se(t.palette.background.paper, 0.6), borderRadius: (t) => `${t.shape.borderRadius}px`, border: (t) => `solid ${n ? t.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t) => `solid ${n ? t.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (t) => t.palette.background.paper }, "&:hover:not([disabled])": { border: (t) => `solid ${n ? t.palette.text?.primary : t.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (t) => `solid ${t.palette.primary.main} 1px !important`, border: (t) => `1px solid ${t.palette?.primary?.main} !important` } }, Ei = U(X((n, a) => {
3258
- const { sx: t, workbook: e, title: r = "", placeHolder: l = "Untitled", onTitleChange: c, readOnly: h = !1, hidden: i, ...d } = n, [g, b] = V(!1), [p, s] = V(!1), [u, x] = V(r ?? ""), [w, m] = V(""), [f, { width: y }] = Vt(), [C, { width: S }] = Vt(), [v, k] = V(!1), E = xe(null), T = xe(null), M = Rt(a, () => ({ requestWorkbookTitle: (R = null, D) => {
3114
+ wi.displayName = "WorkbookElement";
3115
+ const zc = (n = !1, a = !1) => a ? null : { "& input:not(:focus):not(:hover)": { color: (t) => t.palette.text.secondary }, backgroundColor: (t) => Se(t.palette.background.paper, 0.6), borderRadius: (t) => `${t.shape.borderRadius}px`, border: (t) => `solid ${n ? t.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t) => `solid ${n ? t.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (t) => t.palette.background.paper }, "&:hover:not([disabled])": { border: (t) => `solid ${n ? t.palette.text?.primary : t.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (t) => `solid ${t.palette.primary.main} 1px !important`, border: (t) => `1px solid ${t.palette?.primary?.main} !important` } }, Si = U(X((n, a) => {
3116
+ const { sx: t, workbook: e, title: r = "", placeHolder: l = "Untitled", onTitleChange: c, readOnly: h = !1, hidden: i, ...d } = n, [g, b] = V(!1), [p, s] = V(!1), [u, x] = V(r ?? ""), [w, m] = V(""), [f, { width: y }] = Vt(), [v, { width: S }] = Vt(), [C, k] = V(!1), E = xe(null), T = xe(null), M = Rt(a, () => ({ requestWorkbookTitle: (R = null, D) => {
3259
3117
  T.current = { onAccept: R, requestReason: D?.requestReason }, D?.selectAll && E.current?.select(), E.current?.focus(D);
3260
3118
  }, focus: (R) => {
3261
3119
  E.current?.focus(R);
@@ -3263,12 +3121,12 @@ const Vc = (n = !1, a = !1) => a ? null : { "& input:not(:focus):not(:hover)": {
3263
3121
  return Tt(() => {
3264
3122
  k(r !== u), m(r), x(r);
3265
3123
  }, [r]), le(() => {
3266
- v && y !== 0 && Qe.debounce(() => {
3124
+ C && y !== 0 && Qe.debounce(() => {
3267
3125
  k(!1);
3268
3126
  }, 300)();
3269
- }, [v, y]), le(() => {
3127
+ }, [C, y]), le(() => {
3270
3128
  s(u && !to.isValidWindowsFilename(u));
3271
- }, [u]), i ? null : o(O, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: v ? "0" : "1", transition: v ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: yt([M, C, a]), ...d, children: o(at, { label: T.current?.requestReason ?? "Workbook Name", children: I(O, { className: Re({ "Mui-focusVisible": g }), sx: { visibility: y === 0 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...Vc(!0, h), ...t }, children: [h ? o(Fe, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: u !== w ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (R) => p ? R.palette.error.dark : void 0 }, children: r ?? l }) : o(Vn, { sx: { width: `${Math.min(y + 3, Math.max(S, M.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (R) => p ? R.palette.error.dark : void 0, fontStyle: u !== w ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: !0, fullWidth: !1, multiline: !1, readOnly: h, spellCheck: !1, placeholder: l, onFocus: (R) => {
3129
+ }, [u]), i ? null : o(O, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: C ? "0" : "1", transition: C ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: yt([M, v, a]), ...d, children: o(at, { label: T.current?.requestReason ?? "Workbook Name", children: I(O, { className: Re({ "Mui-focusVisible": g }), sx: { visibility: y === 0 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...zc(!0, h), ...t }, children: [h ? o(Fe, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: u !== w ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (R) => p ? R.palette.error.dark : void 0 }, children: r ?? l }) : o(Vn, { sx: { width: `${Math.min(y + 3, Math.max(S, M.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (R) => p ? R.palette.error.dark : void 0, fontStyle: u !== w ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: !0, fullWidth: !1, multiline: !1, readOnly: h, spellCheck: !1, placeholder: l, onFocus: (R) => {
3272
3130
  b(!0), R.target?.select();
3273
3131
  }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: E }, onBlur: () => {
3274
3132
  b(!1), p ? x(w) : (u !== w && (c?.(u), u && T.current?.onAccept?.(u, "blur")), T.current = null);
@@ -3281,61 +3139,205 @@ const Vc = (n = !1, a = !1) => a ? null : { "& input:not(:focus):not(:hover)": {
3281
3139
  }, 0)), T.current = null, R.stopPropagation(), R.preventDefault());
3282
3140
  }, value: u }), o(O, { ref: f, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: u !== w ? "italic" : void 0, fontFamily: (R) => R.typography.fontFamily, letterSpacing: "0.00938em" }, children: u || l })] }) }) });
3283
3141
  }));
3284
- Ei.displayName = "WorkbookTitle";
3285
- const _c = U(X((n, a) => {
3286
- const { title: t, commands: e, className: r, ...l } = n, c = sn(), [h, i] = V(!1), [d, g] = V(!1), b = xe(null), [p, s] = tn((E) => E + 1, 0), [u, { width: x }] = Vt(), w = Ae(e, ["editTable"])[0].context(), m = w.table(), [f, y] = V(() => m ? w.getNames().getRanges(m.getRange()) : null), C = L(() => m?.getName() ?? "", [m]);
3287
- je(w.table(), { onAnchorCoordsChange(E) {
3288
- y(w.getNames().getRanges(E.getRange()));
3289
- }, onProtectedChange(E) {
3290
- s();
3291
- } });
3292
- const S = Z((E) => {
3293
- w?.table().setName(E);
3294
- }, [w]), v = Z((E) => {
3295
- w?.table().resize(E.at(0));
3296
- }, [w]);
3297
- let k = null;
3298
- return w.table() || (k = o(Fe, { component: "div", style: { top: "0", left: "0", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center" }, children: "No table selected" })), o(xt, { square: !0, onFocus: () => i(!0), onBlur: (E) => {
3299
- b?.current?.contains(E.relatedTarget) || i(!1);
3300
- }, ref: yt([b, u, a]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (E) => E.spacing(1.5), paddingRight: (E) => E.spacing(1.5), paddingTop: (E) => E.spacing(1.5), paddingBottom: (E) => E.spacing(1.5), boxSizing: "border-box" }, className: Re("sxl-table-details-panel", r, { "sxl-has-focus": h }), ...l, children: k || I(O, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: w.table() ? 1 : 0 }, children: [o(O, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (E) => E.spacing(2), paddingLeft: (E) => E.spacing(2), paddingRight: (E) => E.spacing(2) }, children: I(O, { className: ac, children: [o(_a, { formName: "name", defaultInput: C, value: m?.getName() ?? "No table", onChangeInput: S, onValidate: (E) => {
3301
- m && m.getName().toLowerCase() === E.toLowerCase() || w?.getNames().validateName(E);
3302
- }, disabled: m?.isProtected() ?? !0, onFocus: (E) => {
3303
- d || E.target?.select(), g(!0);
3304
- } }), o(Ua, { formName: "range", value: f, onChangeInput: v, resolvedAddress: w.getNames().getRanges.bind(w.getNames()), disabled: m?.isProtected() ?? !0, onFocus: (E) => {
3305
- d || E.target?.select(), g(!0);
3306
- } })] }) }), I(O, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (E) => E.spacing(0.5), marginTop: (E) => E.spacing(1) }, children: [o(Q, { orientation: "horizontal", sx: { marginTop: (E) => E.spacing(1.5), marginBottom: (E) => E.spacing(0.75) } }), o(O, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (E) => E.spacing(1), marginBottom: (E) => E.spacing(1) }, children: I("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [o(Wa, { table: m, styles: w.styles(), bodyStyle: w.bodyStyle(), cellHeight: 30, isLive: !0 }), o(Di, { command: e.getCommand("formatTableStyle"), commands: e, disabledQuickKey: !0 })] }) }), o(Q, { orientation: "horizontal", sx: { marginTop: (E) => E.spacing(1.5), marginBottom: (E) => E.spacing(0.75) } }), o(oc, { disabled: m?.isProtected(), styleOptions: m?.getStyleOptions() ?? null, onStyleOptionsChange: (E) => {
3307
- m.updateStyleOptions(E);
3308
- }, showHeaderRow: m?.getShowHeaders(), onShowHeaderRowChange: (E) => {
3309
- try {
3310
- m.setShowHeaders(E);
3311
- } catch (T) {
3312
- c.showError(T);
3142
+ Si.displayName = "WorkbookTitle";
3143
+ const No = U(X((n, a) => {
3144
+ const { command: t, commandHook: e, onSelectColor: r, disabled: l = !1, variant: c = re.Toolbar, quickColor: h, propsPanel: i, isSplit: d = !1, darkMode: g, icon: b, ...p } = n, { autoColor: s, schemeLookup: u, recentColors: x, ...w } = i;
3145
+ if (p.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
3146
+ Ut(t);
3147
+ const m = t?.getContext();
3148
+ let f = h ?? m?.quickColor;
3149
+ d && !f && (f = new ft("transparent"));
3150
+ const y = s ?? m?.autoColor, v = u ?? m?.schemeLookup, S = x ?? m?.recentColors, C = g ?? m?.darkMode, k = L(() => ({ autoColor: y, schemeLookup: v, recentColors: S, darkMode: C, ...w }), [y, v, S, C]), E = Z((M, R) => {
3151
+ M && R && m?.addRecentColor && m.addRecentColor(M), m?.onColorSelect && m.onColorSelect(M), r?.(M, R), t?.execute(M, e);
3152
+ }, [t, r, e, m]), T = _((M, R) => {
3153
+ const { children: D, title: N, ...$ } = M;
3154
+ let F = M.children;
3155
+ return (t?.disabled() || l) && (F = o("div", { children: F })), o(Kn, { command: t, placement: c === re.Toolbar ? "bottom-start" : "right-start", disabled: R, ...$, children: F });
3156
+ }, [t, l]);
3157
+ return o(Ma, { ref: a, propsPanel: k, icon: b ?? t?.getIcon(m), quickColor: f, selectedColor: t?.getState(), onSelectColor: E, variant: c === re.Menuitem ? rt.Menuitem : rt.Toolbar, createTooltip: T, label: t?.getLabel(), disabled: l || !t || t.disabled(), compareRGB: !0, darkMode: C, ...p });
3158
+ }));
3159
+ No.displayName = "ColorCommandButton";
3160
+ const Hc = U(X((n, a) => {
3161
+ const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...h } = n, i = Ae(t, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d = _((g, b) => {
3162
+ const p = { variant: re.Menuitem, parentFloat: g.floatReference, commandHook: e, scope: r, disabled: l }, s = I(ae, { children: [o(B, { ...p, command: b.getCommand("gridlinesToggle") }), o(No, { ...p, command: b.getCommand("sheetViewFormatGridlinesColor"), icon: o(ye, { iconKey: "stroke.colored" }), propsPanel: { disableAlpha: !0 } }), o(Q, { orientation: "horizontal" }), o(B, { ...p, command: b.getCommand("sheetViewToggleGridlinesColumns") }), o(B, { ...p, command: b.getCommand("sheetViewToggleGridlinesRows") })] });
3163
+ return ke({ ...g, children: s });
3164
+ }, [l, e]);
3165
+ return o(Oe, { ref: a, parentFloat: c, quickCommand: i[0]?.getKey(), commands: t, commandHook: e, createPopupPanel: d, label: "Gridlines", tooltip: "Configure how the lines between rows and columns in the sheet are displayed.", icon: o(rn, { command: i[0], scope: "view" }), ...h });
3166
+ })), Ci = U(X((n, a) => o(qe, { ref: a, ...n, popupCommandKeys: ["sortAscending", "sortDescending", "sortCustom", null, "autoFilterToggle", "autoFilterClear", "autoFilterReapply"], scope: "sortFilter", label: "Sort & Filter", tooltip: I(ae, { children: [o("span", { children: "Organize your data so it's easier to analyze." }), o("br", {}), o("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), icon: "SortFilter" }))), Xd = U(X((n, a) => {
3167
+ const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = _((i, d) => {
3168
+ const g = { variant: re.Menuitem, commandHook: e, scope: "sort", disabled: l }, b = I(ae, { children: [o(B, { ...g, scope: "filter", command: d.getCommand("autoFilterToggle") }), o(B, { ...g, scope: "filter", command: d.getCommand("autoFilterClear") }), o(B, { ...g, scope: "filter", command: d.getCommand("autoFilterReapply") })] });
3169
+ return ke({ ...i, children: b });
3170
+ }, [l, e, r]);
3171
+ return o(Oe, { ref: a, commands: t, commandHook: e, scope: r, disabled: l, label: "Filter", tooltip: I(ae, { children: [o("span", { children: "Organize your data so it's easier to analyze." }), o("br", {}), o("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: h, icon: "FilterToggle", ...c });
3172
+ })), vi = U(X((n, a) => {
3173
+ const { quickCommand: t, icon: e, isRedo: r = !1, nestRedo: l = !0, undoManager: c, scope: h, sx: i, disabled: d, commands: g, ...b } = n, p = [t];
3174
+ !r && l && p.push("redo");
3175
+ const s = Ae(g, p), u = s[0], x = s[1], w = c ?? u?.getContext?.()?.undoManager;
3176
+ let m = d;
3177
+ d || (m = !u || u.disabled(), x && !x.disabled() && (m = !1));
3178
+ const [f, y] = V(0), v = _((S, C) => {
3179
+ let k = f === 0 ? "Cancel" : `${u.getLabel()} ${f} Action${f === 1 ? "" : "s"}`, E = !1;
3180
+ w || (E = !0), E || (E = l ? !w.hasRedo() && !w.hasUndo() : !w.hasRedo());
3181
+ const T = (F) => {
3182
+ u.execute(F);
3183
+ }, M = o(dt, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: E ? void 0 : "0 0", minWidth: "180px" }, icon: o(ye, {}), onMouseEnter: () => {
3184
+ y(0);
3185
+ }, onMouseDown: (F) => {
3186
+ F.button === 0 && F.preventDefault();
3187
+ }, onMouseUp: (F) => {
3188
+ F.button === 0 && T(f);
3189
+ }, onKeyDown: (F) => {
3190
+ F.isDefaultPrevented() || F.keyCode !== he.Enter && F.keyCode !== he.Space || T(f);
3191
+ }, children: o(Fe, { component: "div", variant: "caption", sx: { fontSize: "0.875rem", letterSpacing: "0.01071em" }, children: k }) });
3192
+ if (E) return M;
3193
+ const R = r ? w?.getRedoDescriptions() : w?.getUndoDescriptions(), D = [];
3194
+ for (let F = 0; F < R.length; F++) {
3195
+ const z = R[F];
3196
+ D.push(o(dt, { sx: { maxWidth: "360px", display: "flex" }, disabled: m, selected: F < f, icon: o(ye, {}), onMouseEnter: () => {
3197
+ y(F + 1);
3198
+ }, onMouseDown: (P) => {
3199
+ P.button === 0 && P.preventDefault();
3200
+ }, onMouseUp: (P) => {
3201
+ P.button === 0 && T(F + 1);
3202
+ }, onKeyDown: (P) => {
3203
+ P.isDefaultPrevented() || P.keyCode !== he.Enter && P.keyCode !== he.Space || T(F + 1);
3204
+ }, children: I(O, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [o(Fe, { component: "div", children: z }), o(ye, {})] }) }, `action:${F}`));
3313
3205
  }
3314
- }, showTotalRow: m?.getShowTotals(), onShowTotalRowChange: (E) => {
3315
- try {
3316
- m.setShowTotals(E);
3317
- } catch (T) {
3318
- c.showError(T);
3206
+ let N = null;
3207
+ if (!r && l) {
3208
+ const F = { scope: "undo", commands: C, variant: re.Menuitem, parentFloat: S.floatReference };
3209
+ N = [], N.push(o(vi, { ...F, quickCommand: "redo", isRedo: !0 }, "nested:redo")), w.hasRedo() && w.hasUndo() && N.push(o(Q, { orientation: "horizontal" }, "action:redo-div"));
3319
3210
  }
3320
- }, showFilterButton: m?.getFilter() ? m.getShowFilterButton() : null, onShowFilterButtonChange: (E) => {
3321
- try {
3322
- m.setShowFilterButton(E);
3323
- } catch (T) {
3324
- c.showError(T);
3211
+ const $ = I(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
3212
+ S.closeFloatAll();
3213
+ }, onMouseLeave: () => {
3214
+ y(0);
3215
+ }, children: [N, o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: D }), o(Q, { orientation: "horizontal" }), M] });
3216
+ return ke({ ...S, children: $ });
3217
+ }, [u?.getContext(), u?.getState(), h, w, f, m]);
3218
+ return o(Oe, { ref: a, commands: g, quickCommand: t, scope: h, disabled: m, label: u?.getLabel() ?? (r ? "Redo" : "Undo"), tooltip: o(ae, { children: o("span", { children: `${u?.getLabel() ?? "No"} last actions.` }) }), createPopupPanel: v, icon: e ?? (r ? "Redo" : "Undo"), selected: !1, ...b });
3219
+ })), no = vl.getFontList(), ki = /* @__PURE__ */ new Map();
3220
+ for (let n = 0; n < no.length; n++) ki.set(no[n].fontRef.getFamily(), no[n]);
3221
+ const Wc = U(X((n, a) => {
3222
+ const { command: t, commandHook: e, sx: r, disabled: l = !1, parentFloat: c, icon: h, label: i, ...d } = n;
3223
+ Ut(t);
3224
+ const g = t?.getState(), b = Je(), p = L(() => `${_t.getSharedMeasurer()("Times New Roman", Math.round(b.typography.fontSize), b.typography.fontFamily).width}px`, [b]), s = _((u) => {
3225
+ const x = (y) => {
3226
+ t?.execute(y, e);
3227
+ }, w = [];
3228
+ for (let y = 0; y < no.length; y++) w.push({ key: no[y].fontRef.getFamily(), description: no[y].fontRef.getFamily() });
3229
+ ki.get(g) || w.unshift({ key: g, description: g });
3230
+ const m = [];
3231
+ for (let y = 0; y < w.length; y++) {
3232
+ const v = w[y].key === g;
3233
+ m.push(o(dt, { sx: { display: "flex", paddingTop: "4px", paddingBottom: "4px" }, selected: v, disabled: l || !t || t.disabled(), icon: v ? o(on, {}) : void 0, onMouseUp: (S) => {
3234
+ S.button === 0 && x(w[y].key);
3235
+ }, onMouseDown: (S) => {
3236
+ S.button === 0 && S.preventDefault();
3237
+ }, onKeyDown: (S) => {
3238
+ S.keyCode !== he.Enter && S.keyCode !== he.Space || x(w[y].key);
3239
+ }, children: o(O, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: o(Fe, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => w[y]?.key }, children: w[y].description }) }) }, y + "" + w[y].key));
3325
3240
  }
3326
- } }), o(Q, { orientation: "horizontal" }), I(O, { className: ic, children: [o(B, { variant: re.Menuitem, command: e.getCommand("convertTableToRange"), commandState: m }), o(B, { variant: re.Menuitem, commandState: m, command: e.getCommand("deleteTable") })] })] })] }) });
3327
- })), Uc = (n, a) => {
3328
- const { model: t, commands: e, entryKey: r, frame: l, ...c } = n;
3329
- return o(_c, { ref: a, commands: e, ...c });
3330
- }, Gc = () => {
3331
- Kn.register("plugin-table", { icons: {} }), en.registerTaskPane({ key: "tableDetails", getTitle: () => "Table Details", getIcon: () => "Table", renderTaskPane: Uc }, !0);
3332
- }, qc = U((n) => {
3241
+ const f = o(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...d, children: o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: m }) });
3242
+ return ke({ ...u, children: f });
3243
+ }, [l, t?.getState()]);
3244
+ return o(Dt, { ref: a, sx: { ...r }, outlined: !0, disabled: l, parentFloat: c, createPopupPanel: s, createTooltip: ({ children: u }, x) => o(at, { label: t?.getLabel(), description: t?.getDescription(), disabled: x, children: u }), icon: o(O, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (u) => `${Math.round(u.typography.fontSize)}px`, fontFamily: (u) => u.typography.fontFamily, color: (u) => u.palette.text.secondary, width: p }, children: o(O, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: g }) }), ...d });
3245
+ })), jc = U(X((n, a) => {
3246
+ const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = Ae(t, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), i = L(() => {
3247
+ const g = h.length;
3248
+ for (let b = 0; b < g; b++) {
3249
+ const p = h[b];
3250
+ if (p?.getState()) return p;
3251
+ }
3252
+ return h[0];
3253
+ }, [h]), d = _((g, b) => {
3254
+ const p = { variant: re.Menuitem, commandHook: e, scope: "textEffects", disabled: l }, s = I(ae, { children: [o(B, { ...p, command: b.getCommand("formatStrikeThroughToggle") }), o(B, { ...p, command: b.getCommand("formatSuperscriptToggle") }), o(B, { ...p, command: b.getCommand("formatSubscriptToggle") })] });
3255
+ return ke({ ...g, children: s });
3256
+ }, [l, e, r]);
3257
+ return o(Oe, { ref: a, quickCommand: i?.getKey(), commands: t, commandHook: e, createPopupPanel: d, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: i?.getIcon() ?? "TextStrike", ...c });
3258
+ })), $c = U(X((n, a) => {
3259
+ const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = Ae(t, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), i = L(() => {
3260
+ const g = h.length;
3261
+ for (let b = 0; b < g; b++) if (h[b]?.getState()) return h[b];
3262
+ return h[0];
3263
+ }, [h]), d = _((g, b) => {
3264
+ const p = { variant: re.Menuitem, commandHook: e, scope: "underline", disabled: l }, s = I(ae, { children: [o(B, { ...p, command: b.getCommand("formatUnderlinedToggle") }), o(B, { ...p, command: b.getCommand("formatUnderlinedDoubleToggle") }), o(B, { ...p, command: b.getCommand("formatUnderlinedAccountingToggle"), commandHook: e }), o(B, { ...p, command: b.getCommand("formatUnderlinedAccountingDoubleToggle") })] });
3265
+ return ke({ ...g, children: s });
3266
+ }, [l, e, r]);
3267
+ return o(Oe, { ref: a, quickCommand: i?.getKey(), commands: t, commandHook: e, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: d, icon: i?.getIcon() ?? "TextUnderline", ...c });
3268
+ })), Ti = U(X((n, a) => {
3269
+ const { command: t, commands: e, commandHook: r, scope: l, includePasteAllInPopup: c = !0, disabled: h = !1, ...i } = n, d = Z((g, b) => {
3270
+ const p = { variant: re.Menuitem, commandHook: r, scope: "paste", disabled: h }, s = [];
3271
+ return c && (s.push(De(B, { ...p, command: b.getCommand("paste"), key: "paste" })), s.push(o(Q, { orientation: "horizontal" }, "paste-div"))), s.push(De(B, { ...p, command: b.getCommand("pasteValues"), key: "pasteValues" })), s.push(De(B, { ...p, command: b.getCommand("pasteFormats"), key: "pasteFormats" })), s.push(De(B, { ...p, command: b.getCommand("pasteFormulas"), key: "pasteFormulas" })), s.push(De(B, { ...p, command: b.getCommand("pasteTranspose"), key: "pasteTranspose" })), s.push(De(B, { ...p, command: b.getCommand("pasteLinks"), key: "pasteLinks" })), ke({ ...g, children: s });
3272
+ }, [h, r, l, c]);
3273
+ return o(Oe, { ref: a, commands: e, commandHook: r, scope: l, createPopupPanel: d, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", ...i });
3274
+ })), Vc = U(X((n, a) => {
3275
+ const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...h } = n, i = Ae(t, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d = _((g, b) => {
3276
+ const p = { variant: re.Menuitem, parentFloat: g.floatReference, commandHook: e, scope: r, disabled: l }, s = I(ae, { children: [o(B, { ...p, command: b.getCommand("sheetViewToggleShowHeadings") }), o(B, { ...p, command: b.getCommand("sheetViewToggleShowHeadingsNumeric") }), o(Q, { orientation: "horizontal" }), o(B, { ...p, command: b.getCommand("sheetViewToggleShowHeadingColumns") }), o(B, { ...p, command: b.getCommand("sheetViewToggleShowHeadingRows") })] });
3277
+ return ke({ ...g, children: s });
3278
+ }, [l, e, r]);
3279
+ return o(Oe, { ref: a, parentFloat: c, quickCommand: i[0]?.getKey(), commands: t, commandHook: e, createPopupPanel: d, label: "Headings", tooltip: "Configure how the column and rows headings in the sheet are displayed.", icon: o(rn, { command: i[0], scope: "view" }), ...h });
3280
+ })), _c = U(X((n, a) => {
3281
+ const { commands: t, commandHook: e, scope: r = "view", disabled: l = !1, ...c } = n, h = _((i) => {
3282
+ const d = { variant: re.Menuitem, parentFloat: i.floatReference, commandHook: e, scope: r, disabled: l }, g = I(ae, { children: [o(B, { ...d, command: t.getCommand("workbookViewToggleShowFormulaBar") }), o(B, { ...d, command: t.getCommand("workbookViewToggleShowTabs") }), o(B, { ...d, command: t.getCommand("workbookViewToggleShowStatusBar") }), o(Q, { orientation: "horizontal" }), o(B, { ...d, command: t.getCommand("workbookViewToggleShowHorizontalScrollBar") }), o(B, { ...d, command: t.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
3283
+ return ke({ ...i, children: g });
3284
+ }, [l, t, e, r]);
3285
+ return o(Oe, { ref: a, commands: t, disabled: l, commandHook: e, scope: r, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: h, icon: o(rn, { icon: null, label: "Workbook View" }), ...c });
3286
+ })), Ei = U(X((n, a) => {
3287
+ const { value: t, cellStyle: e, styles: r, createTemporaryCell: l, bodyStyle: c, sx: h, propsBorder: i, disabled: d, ...g } = n, b = L(() => l({ value: t, style: e }), [t, e, l]), p = L(() => b.getStyle(), [b, c]), s = L(() => p.getFill().toCSS(c?.darkMode ?? !1), [p]), u = p.getInsets(), x = p.getFont(), w = _(() => p.getBorder(), [p]);
3288
+ return o(O, { ref: a, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: c?.fill, filter: d ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...s }, "& .text": { flex: "1 1 100%", ...x.toCSS(c?.darkMode ?? !1, 1), boxSizing: "border-box", padding: `${u.top}px ${u.right}px ${u.bottom}px ${u.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: x.toCSS().textDecoration, textAlign: kl.toCSSHorizontalTextAlign(b.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...h }, ...g, children: o(jn, { getBorderAt: w, darkMode: c?.darkMode ?? !1, rowCount: 1, columnCount: 1, style: { height: "100%", width: "100%", ...i?.style }, ...i, children: o(O, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-2px", marginBottom: "-2px", display: "flex", alignItems: "center" }, children: o(O, { className: "text", children: t }) }) }) });
3289
+ })), Uc = U((n) => {
3290
+ const { styles: a, namedStyle: t, selectedNamed: e, hasContextMenu: r = !0, bodyStyle: l, onSelectNamed: c, createTemporaryCell: h, parentFloat: i, commands: d, disabled: g, commandHook: b, ...p } = n, s = _((w) => {
3291
+ const m = { variant: re.Menuitem, commandHook: b, context: "cellStyle" }, f = I(ae, { children: [o(B, { ...m, style: { fontWeight: 550 }, command: d.getCommand("formatCellStyle"), commandState: t, disabled: g }), o(Q, { orientation: "horizontal" }), o(B, { ...m, command: d.getCommand("modifyCellStyle"), commandState: { named: t } }), o(B, { ...m, command: d.getCommand("deleteCellStyle"), commandState: t, disabled: g || t?.getName() === ce.BuiltInName.Normal })] });
3292
+ return ke({ ...w, children: o(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: f }) }) });
3293
+ }, []), u = t?.getName() === e?.getName();
3294
+ let x = o(bt, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (w) => `solid ${u ? w.palette.primary.dark : "transparent"} 1px` }, propsTooltip: { label: t.getName(), placement: "bottom-start" }, disabled: g, icon: null, onClick: () => {
3295
+ c?.(t);
3296
+ }, ...p, children: o(Ei, { value: t.getName(), cellStyle: { named: t.getName() }, styles: a, createTemporaryCell: h, bodyStyle: l }) }, t.getName());
3297
+ return r && (x = o(Ta, { label: t.getName(), parentFloat: i, createPopupPanel: s, children: x })), x;
3298
+ }), Kc = U(X((n, a) => {
3299
+ const { commands: t, command: e, commandHook: r, selectedNamed: l, onSelectNamed: c, disabled: h = !1, bodyStyle: i, usePreviewIcon: d = !0, ...g } = n;
3300
+ Ut(e);
3301
+ const b = e?.getContext(), p = b?.styles, s = l ?? b?.named(), u = i ?? b?.bodyStyle(), x = Z((v) => {
3302
+ c?.(v), e?.execute(v, r);
3303
+ }, [e, c, r]), w = _((v, S) => {
3304
+ const C = { onSelectNamed: x, styles: p(), parentFloat: v.floatReference }, k = p().getCustomNamed(), E = /* @__PURE__ */ new Map(), T = [];
3305
+ for (let P = 0; P < k.length; P++) E.set(k[P].getName(), k[P]), p().getNamed(k[P].getName()).getBuiltInID() === null && T.push(k[P].getName());
3306
+ const M = (P) => {
3307
+ let j = E.get(P);
3308
+ return j || (j = p().getNamed(P)), !j || j.isHidden() ? null : o(Uc, { namedStyle: j, selectedNamed: s, bodyStyle: b.bodyStyle(), createTemporaryCell: b.createTemporaryCell, commands: t, commandHook: r, ...C }, P);
3309
+ }, R = (P, j, te = !0) => {
3310
+ const de = [];
3311
+ for (let se = 0; se < j.length; se++) {
3312
+ const A = M(j[se]);
3313
+ A && de.push(A);
3314
+ }
3315
+ return de.length === 0 ? null : I(O, { children: [te ? o(Q, { orientation: "horizontal" }) : null, o(ro, { children: P }, P + "-header"), o(O, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: de }, P + "-presets")] }, P);
3316
+ }, D = (P, j) => {
3317
+ const te = [];
3318
+ for (let de = 0; de < j.length; de++) {
3319
+ const se = M(j[de]);
3320
+ se && te.push(se);
3321
+ }
3322
+ return te.length === 0 ? null : o(O, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: te }, P + "-presets");
3323
+ }, N = [];
3324
+ N.push(R("Custom", T, !1)), N.push(R("Good, Bad and Neutral", [ce.BuiltInName.Normal, ce.BuiltInName.Bad, ce.BuiltInName.Good, ce.BuiltInName.Neutral], T.length > 0)), N.push(R("Data and Model", [ce.BuiltInName.Calculation, ce.BuiltInName.CheckCell, ce.BuiltInName.ExplanatoryText, ce.BuiltInName.FollowedHyperlink, ce.BuiltInName.Hyperlink, ce.BuiltInName.Input, ce.BuiltInName.LinkedCell, ce.BuiltInName.Note, ce.BuiltInName.Output, ce.BuiltInName.WarningText])), N.push(R("Titles and Headings", [ce.BuiltInName.Heading1, ce.BuiltInName.Heading2, ce.BuiltInName.Heading3, ce.BuiltInName.Heading4, ce.BuiltInName.Title, ce.BuiltInName.Total]));
3325
+ let $ = [];
3326
+ var F, z;
3327
+ return $.push(D("Accent 1", [ce.BuiltInName.Accent1_20, ce.BuiltInName.Accent1_40, ce.BuiltInName.Accent1_60, ce.BuiltInName.Accent1])), $.push(D("Accent 2", [ce.BuiltInName.Accent2_20, ce.BuiltInName.Accent2_40, ce.BuiltInName.Accent2_60, ce.BuiltInName.Accent2])), $.push(D("Accent 3", [ce.BuiltInName.Accent3_20, ce.BuiltInName.Accent3_40, ce.BuiltInName.Accent3_60, ce.BuiltInName.Accent3])), $.push(D("Accent 4", [ce.BuiltInName.Accent4_20, ce.BuiltInName.Accent4_40, ce.BuiltInName.Accent4_60, ce.BuiltInName.Accent4])), $.push(D("Accent 5", [ce.BuiltInName.Accent5_20, ce.BuiltInName.Accent5_40, ce.BuiltInName.Accent5_60, ce.BuiltInName.Accent5])), $.push(D("Accent 6", [ce.BuiltInName.Accent6_20, ce.BuiltInName.Accent6_40, ce.BuiltInName.Accent6_60, ce.BuiltInName.Accent6])), N.push((F = "Themed Cell Styles", z = $, I(O, { children: [o(Q, { orientation: "horizontal" }), o(ro, { children: F }, F + "-header"), o(O, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: z }, F + "-presets")] }, F))), N.push(R("Number Format", [ce.BuiltInName.Comma, ce.BuiltInName.Comma0, ce.BuiltInName.Currency, ce.BuiltInName.Currency0, ce.BuiltInName.Percent])), I(O, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (P) => `${P.shape.borderRadius}px`, paddingBottom: (P) => `${P.shape.borderRadius}px` }, children: [o(O, { onContextMenu: () => {
3328
+ }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: N }), o(Q, { orientation: "horizontal" }), o(B, { variant: re.Menuitem, commandState: s, command: S.getCommand("newCellStyle"), context: "styles", commandHook: r, disabled: h })] });
3329
+ }, [s, p?.().getTheme(), u]), m = Z((v) => {
3330
+ const S = 18 / _t.getDeviceScale(), C = b?.createTemporaryCell(v);
3331
+ return C.getStyle().getFont().getSize() <= S ? C : C.createTemporaryCell({ style: { font: { size: S } } });
3332
+ }, [b?.createTemporaryCell]), f = h || !e || e.disabled(), y = L(() => b && d ? o(Ei, { value: s?.getName() ?? "Custom", cellStyle: s ? { named: s.getName() } : void 0, styles: b.styles(), createTemporaryCell: m, bodyStyle: b.bodyStyle(), className: "outline-hover", disabled: f, sx: { marginRight: "4px", borderRadius: "2px", minHeight: "calc(100% - 2px)", overflow: "hidden", outline: (v) => `1px solid ${v.palette.action.hover}` }, propsBorder: { style: { height: "calc(100% - 2px)", width: "calc(100% - 1px)" } } }) : e?.getIcon(), [s, u, f, e]);
3333
+ return o(Oe, { ref: a, createPopupPanel: w, outlined: d, commands: t, createTooltip: ({ children: v }, S) => o(at, { label: e?.getLabel(), description: e?.getDescription(), disabled: S, children: v }), selected: !1, disabled: f, label: e?.getLabel(), icon: y, ...g });
3334
+ })), Gc = U((n) => {
3333
3335
  const { table: a, tableStyle: t, selectedTableStyleName: e, onSelectTableStyleName: r, styles: l, hasContextMenu: c = !0, bodyStyle: h, parentFloat: i, commands: d, disabled: g, commandHook: b, useCanvasPreview: p = !0, canvas: s, ...u } = n, x = _((y) => {
3334
- const C = { variant: re.Menuitem, commandHook: b, context: "table" }, S = I(ae, { children: [o(B, { ...C, command: d.getCommand("formatTableStyleClearCellStyles"), commandState: t, disabled: g }), o(B, { ...C, style: { fontWeight: 550 }, command: d.getCommand("formatTableStyle"), commandState: { name: t.getName() }, disabled: g }), o(Q, { orientation: "horizontal" }), o(B, { ...C, command: d.getCommand("setDefaultTableStyle"), commandState: t.getName(), disabled: g }), o(Q, { orientation: "horizontal" }), o(B, { ...C, command: d.getCommand("deleteTableStyle"), commandState: t?.getName(), disabled: g || !t || t.isBuiltIn() })] });
3336
+ const v = { variant: re.Menuitem, commandHook: b, context: "table" }, S = I(ae, { children: [o(B, { ...v, command: d.getCommand("formatTableStyleClearCellStyles"), commandState: t, disabled: g }), o(B, { ...v, style: { fontWeight: 550 }, command: d.getCommand("formatTableStyle"), commandState: { name: t.getName() }, disabled: g }), o(Q, { orientation: "horizontal" }), o(B, { ...v, command: d.getCommand("setDefaultTableStyle"), commandState: t.getName(), disabled: g }), o(Q, { orientation: "horizontal" }), o(B, { ...v, command: d.getCommand("deleteTableStyle"), commandState: t?.getName(), disabled: g || !t || t.isBuiltIn() })] });
3335
3337
  return ke({ ...y, children: o(O, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: o(O, { sx: { overflow: "auto", flex: "1 1 100%" }, children: S }) }) });
3336
3338
  }, [d]), w = t?.getName() === e, m = L(() => {
3337
3339
  const y = { table: a, tableStyle: t, styles: l, bodyStyle: h };
3338
- return p ? o(Js, { canvas: s, ...y }) : o(Wa, { ...y });
3340
+ return p ? o(nc, { canvas: s, ...y }) : o(Xa, { ...y });
3339
3341
  }, [a, t, l, h]);
3340
3342
  let f = o(bt, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (y) => `solid ${w ? y.palette.primary.dark : "transparent"} 1px` }, propsTooltip: { label: t.getName() ?? "None", placement: "bottom-start" }, disabled: g, icon: null, onClick: () => {
3341
3343
  r?.(t?.getName());
@@ -3344,7 +3346,7 @@ const _c = U(X((n, a) => {
3344
3346
  }), Di = U(X((n, a) => {
3345
3347
  const { commands: t, command: e, commandHook: r, selectedTable: l, onSelectTableStyleName: c, disabled: h = !1, bodyStyle: i, disabledQuickKey: d = !1, usePreviewIcon: g = !1, ...b } = n;
3346
3348
  Ut(e);
3347
- const p = e?.context(), s = p?.styles, u = l ?? p?.table?.();
3349
+ const p = e?.getContext(), s = p?.styles, u = l ?? p?.table?.();
3348
3350
  let x = "insertTable";
3349
3351
  u && (x = "editTable");
3350
3352
  const w = L(() => ((M, R) => {
@@ -3354,19 +3356,19 @@ const _c = U(X((n, a) => {
3354
3356
  le(() => {
3355
3357
  y(m);
3356
3358
  }, [m]);
3357
- const C = i ?? p?.bodyStyle(), S = Z((M) => {
3359
+ const v = i ?? p?.bodyStyle(), S = Z((M) => {
3358
3360
  c?.(M), e?.execute({ name: M }, r);
3359
- }, [e, c, r]), v = xe(null), k = _((M, R) => {
3361
+ }, [e, c, r]), C = xe(null), k = _((M, R) => {
3360
3362
  const D = { onSelectTableStyleName: S, styles: s(), parentFloat: M.floatReference };
3361
- v.current || (v.current = document.createElement("canvas"));
3363
+ C.current || (C.current = document.createElement("canvas"));
3362
3364
  const N = (A) => {
3363
3365
  const H = s().getTableStyle(A);
3364
- return H ? o(qc, { table: f, tableStyle: H, selectedTableStyleName: f.getStyleOptions().name, bodyStyle: p.bodyStyle(), commands: R, commandHook: r, canvas: v.current, ...D }, A) : null;
3366
+ return H ? o(Gc, { table: f, tableStyle: H, selectedTableStyleName: f.getStyleOptions().name, bodyStyle: p.bodyStyle(), commands: R, commandHook: r, canvas: C.current, ...D }, A) : null;
3365
3367
  }, $ = (A, H, ie = !0) => {
3366
3368
  const oe = [];
3367
3369
  for (let Y = 0; Y < H.length; Y++) {
3368
- const G = N(H[Y]);
3369
- G && oe.push(G);
3370
+ const K = N(H[Y]);
3371
+ K && oe.push(K);
3370
3372
  }
3371
3373
  return oe.length === 0 ? null : I(O, { children: [ie ? o(Q, { orientation: "horizontal" }) : null, o(ro, { children: A }, A + "-header"), o(O, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: oe }, A + "-presets")] }, A);
3372
3374
  }, F = [], z = s().getCustomTableStyles(), P = [];
@@ -3387,26 +3389,26 @@ const _c = U(X((n, a) => {
3387
3389
  let se = null;
3388
3390
  return u && (se = I(ae, { children: [o(Q, { orientation: "horizontal" }), o(B, { variant: re.Menuitem, command: R.getCommand("formatTableStyleClearTableStyle"), commandHook: r, disabled: h })] })), I(O, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (A) => `${A.shape.borderRadius}px`, paddingBottom: (A) => `${A.shape.borderRadius}px` }, children: [o(O, { onContextMenu: () => {
3389
3391
  }, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: F }), se] });
3390
- }, [s, s?.().getTheme(), C, f]), E = h || !e || e.disabled(), T = L(() => {
3391
- if (!p || !g) return e?.icon();
3392
- }, [f, C, E, e]);
3393
- return o(Oe, { ref: a, quickCommand: d ? void 0 : x, createPopupPanel: k, commands: t, label: e?.label(), commandState: u, commandHook: r, selected: u !== null, createTooltip: ({ children: M }, R) => o(at, { label: e?.label(), description: e?.description(), disabled: R, children: M }), disabled: E, icon: T, ...b });
3394
- })), Kc = U(X((n, a) => {
3392
+ }, [s, s?.().getTheme(), v, f]), E = h || !e || e.disabled(), T = L(() => {
3393
+ if (!p || !g) return e?.getIcon();
3394
+ }, [f, v, E, e]);
3395
+ return o(Oe, { ref: a, quickCommand: d ? void 0 : x, createPopupPanel: k, commands: t, label: e?.getLabel(), commandState: u, commandHook: r, selected: u !== null, createTooltip: ({ children: M }, R) => o(at, { label: e?.getLabel(), description: e?.getDescription(), disabled: R, children: M }), disabled: E, icon: T, ...b });
3396
+ })), qc = U(X((n, a) => {
3395
3397
  const { command: t, commandHook: e, selectedTheme: r, onSelectTheme: l, disabled: c = !1, darkMode: h, label: i, icon: d, variant: g, ...b } = n;
3396
3398
  Ut(t);
3397
- const p = t?.context()?.themes, s = r || t?.context()?.theme, u = h ?? t?.context()?.darkMode, x = c || t?.disabled(), w = Z((f) => {
3399
+ const p = t?.getContext()?.themes, s = r || t?.getContext()?.theme, u = h ?? t?.getContext()?.darkMode, x = c || t?.disabled(), w = Z((f) => {
3398
3400
  l?.(f), t?.execute(f, e);
3399
3401
  }, [l, e]), m = _((f, y) => {
3400
- const { children: C, title: S, ...v } = f;
3402
+ const { children: v, title: S, ...C } = f;
3401
3403
  let k = f.children;
3402
- return (x || y) && (k = o("div", { children: k })), o(Gn, { command: t, placement: g === re.Toolbar ? "bottom-start" : "right-start", disabled: x || y, ...v, children: k });
3404
+ return (x || y) && (k = o("div", { children: k })), o(Kn, { command: t, placement: g === re.Toolbar ? "bottom-start" : "right-start", disabled: x || y, ...C, children: k });
3403
3405
  }, [t, x]);
3404
- return o(cc, { ref: a, themes: p, selectedTheme: s, onSelectTheme: w, variant: g === re.Menuitem ? rt.Menuitem : rt.Toolbar, createTooltip: m, disabled: x, darkMode: u, ...b });
3406
+ return o(Ks, { ref: a, themes: p, selectedTheme: s, onSelectTheme: w, variant: g === re.Menuitem ? rt.Menuitem : rt.Toolbar, createTooltip: m, disabled: x, darkMode: u, ...b });
3405
3407
  })), Xc = U(X((n, a) => {
3406
3408
  const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, h = Ae(t, ["themeMode"])[0], i = Z((s, u) => {
3407
3409
  const x = { variant: re.Menuitem, commandHook: e, scope: "appearance", disabled: l }, w = I(ae, { children: [o(B, { ...x, command: h }), o(B, { ...x, command: u.getCommand("defaultThemeMode") }), o(Q, { orientation: "horizontal" }), o(B, { ...x, command: u.getCommand("enableDarkGrid") }), o(B, { ...x, command: u.getCommand("enableDarkImages") })] });
3408
3410
  return ke({ ...s, children: w });
3409
- }, [l, h, e, r]), d = h?.state(), g = ka("(prefers-color-scheme: dark)"), b = d === "dark" || d === null && g, p = h?.state() !== null;
3411
+ }, [l, h, e, r]), d = h?.getState(), g = ka("(prefers-color-scheme: dark)"), b = d === "dark" || d === null && g, p = h?.getState() !== null;
3410
3412
  return o(Oe, { ref: a, quickCommand: "themeMode", commands: t, commandHook: e, createPopupPanel: i, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
3411
3413
  h?.execute(b ? "light" : "dark", e);
3412
3414
  }, selected: p, ...c });
@@ -3428,7 +3430,7 @@ const _c = U(X((n, a) => {
3428
3430
  return b ? o(B, { ref: a, variant: i, commandHook: e, disabled: l, command: b, ...d }) : o(Oe, { ref: a, variant: i, quickCommand: "insertImageFromFile", commands: t, commandHook: e, scope: r, disabled: l || p, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: s, icon: "InsertImage", ...d });
3429
3431
  })), Mi = U(X((n, a) => {
3430
3432
  const { ...t } = n;
3431
- return o(Ke, { ref: a, ...t, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions." });
3433
+ return o(qe, { ref: a, ...t, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions." });
3432
3434
  }));
3433
3435
  Mi.displayName = "InsertFunctionSumCommandPopupButton";
3434
3436
  const Tn = new Map([{ key: "financial", label: "Financial", icon: "FormulaFinancial" }, { key: "logical", label: "Logical", icon: "FormulaLogical" }, { key: "text", label: "Text", icon: "FormulaText" }, { key: "dateTime", label: "Date & Time", icon: "FormulaDateTime" }, { key: "lookupReference", label: "Lookup & Reference", icon: "FormulaLookupReference" }, { key: "mathTrig", label: "Math & Trig", icon: "FormulaMathTrig" }, { key: "statDist", label: "Statistical", icon: "FormulaStatistical" }, { key: "engineering", label: "Engineering", icon: "FormulaEngineering" }, { key: "information", label: "Information", icon: "FormulaInformation" }, { key: "cube", label: "Cube", icon: "FormulaCube" }, { key: "database", label: "Database", icon: "FormulaDatabase" }, { key: "web", label: "Web", icon: "FormulaWeb" }, { key: "custom", label: "Custom", icon: "FormulaCustom" }].map((n) => [n.key, n])), Zc = U((n) => {
@@ -3459,12 +3461,12 @@ const Jc = U(X((n, a) => {
3459
3461
  le(() => {
3460
3462
  (async () => {
3461
3463
  g(!0);
3462
- const x = c[0]?.context(), w = await x.searchByCategory(e);
3464
+ const x = c[0]?.getContext(), w = await x.searchByCategory(e);
3463
3465
  i(w), g(!1);
3464
3466
  })();
3465
3467
  }, []);
3466
3468
  const b = h.length, p = new Array(b), s = t.getCommand("insertFunction"), u = (x) => {
3467
- r?.beforeExecute?.(s, s?.state()), s.execute(x), r?.onExecute?.(s, s?.state());
3469
+ r?.beforeExecute?.(s, s?.getState()), s.execute(x), r?.onExecute?.(s, s?.getState());
3468
3470
  };
3469
3471
  for (let x = 0; x < b; x++) {
3470
3472
  const w = h[x];
@@ -3484,7 +3486,7 @@ function Ni(n) {
3484
3486
  else for (a in n) n[a] && (e && (e += " "), e += a);
3485
3487
  return e;
3486
3488
  }
3487
- function Gt() {
3489
+ function Kt() {
3488
3490
  for (var n, a, t = 0, e = ""; t < arguments.length; ) (n = arguments[t++]) && (a = Ni(n)) && (e && (e += " "), e += a);
3489
3491
  return e;
3490
3492
  }
@@ -3723,16 +3725,16 @@ var Li = X(function(n, a) {
3723
3725
  }, [r]);
3724
3726
  return le(function() {
3725
3727
  if (!l && r !== "down" && r !== "right") {
3726
- var f = (function(C, S) {
3727
- var v;
3728
+ var f = (function(v, S) {
3729
+ var C;
3728
3730
  function k() {
3729
3731
  for (var E = this, T = arguments.length, M = new Array(T), R = 0; R < T; R++) M[R] = arguments[R];
3730
- clearTimeout(v), v = setTimeout(function() {
3731
- C.apply(E, M);
3732
+ clearTimeout(C), C = setTimeout(function() {
3733
+ v.apply(E, M);
3732
3734
  }, S);
3733
3735
  }
3734
3736
  return S === void 0 && (S = 166), k.clear = function() {
3735
- clearTimeout(v);
3737
+ clearTimeout(C);
3736
3738
  }, k;
3737
3739
  })(function() {
3738
3740
  u.current && Uo(r, u.current);
@@ -3746,11 +3748,11 @@ var Li = X(function(n, a) {
3746
3748
  }, [l, m]), De(tr, Object.assign({ appear: !0, nodeRef: u, onEnter: function(f, y) {
3747
3749
  Uo(r, f), Ai(f), d && d(f, y);
3748
3750
  }, onEntered: g, onEntering: function(f) {
3749
- var y = c?.transitionTimingFunction || ld, C = Jo({ timeout: i, mode: "enter", style: Pe({}, c, { transitionTimingFunction: y }) });
3750
- f.style.webkitTransition = oo("-webkit-transform", C), f.style.transition = oo("transform", C), f.style.webkitTransform = "none", f.style.transform = "none";
3751
+ var y = c?.transitionTimingFunction || ld, v = Jo({ timeout: i, mode: "enter", style: Pe({}, c, { transitionTimingFunction: y }) });
3752
+ f.style.webkitTransition = oo("-webkit-transform", v), f.style.transition = oo("transform", v), f.style.webkitTransform = "none", f.style.transform = "none";
3751
3753
  }, onExit: function(f) {
3752
- var y = c?.transitionTimingFunction || sd, C = Jo({ timeout: i, mode: "exit", style: Pe({}, c, { transitionTimingFunction: y }) });
3753
- f.style.webkitTransition = oo("-webkit-transform", C), f.style.transition = oo("transform", C), Uo(r, f), b && b(f);
3754
+ var y = c?.transitionTimingFunction || sd, v = Jo({ timeout: i, mode: "exit", style: Pe({}, c, { transitionTimingFunction: y }) });
3755
+ f.style.webkitTransition = oo("-webkit-transform", v), f.style.transition = oo("transform", v), Uo(r, f), b && b(f);
3754
3756
  }, onExited: function(f) {
3755
3757
  f.style.webkitTransition = "", f.style.transition = "", p && p(f);
3756
3758
  }, in: l, timeout: i }, s), function(f, y) {
@@ -3813,7 +3815,7 @@ var hd = "notistack-SnackbarContainer", gd = "notistack-Snackbar", zi = "notista
3813
3815
  var g = Jo({ timeout: 175, mode: "exit" }), b = g.duration, p = g.easing;
3814
3816
  d.style.transitionDuration = typeof b == "string" ? b : b + "ms", d.style.height = Dn, d.style.transitionTimingFunction = p || "";
3815
3817
  }, nodeRef: c, timeout: 175 }, function(d, g) {
3816
- return De("div", Object.assign({ ref: h, className: Gt(ca.root, d === "entered" && ca.entered), style: Pe({ pointerEvents: "all", overflow: "hidden", minHeight: Dn, transition: oo("height") }, d === "entered" && { overflow: "visible" }, {}, d === "exited" && !e && { visibility: "hidden" }) }, g), De("div", { ref: l, className: zi, style: { display: "flex", width: "100%" } }, t));
3818
+ return De("div", Object.assign({ ref: h, className: Kt(ca.root, d === "entered" && ca.entered), style: Pe({ pointerEvents: "all", overflow: "hidden", minHeight: Dn, transition: oo("height") }, d === "entered" && { overflow: "visible" }, {}, d === "exited" && !e && { visibility: "hidden" }) }, g), De("div", { ref: l, className: zi, style: { display: "flex", width: "100%" } }, t));
3817
3819
  });
3818
3820
  });
3819
3821
  Hi.displayName = "Collapse";
@@ -3861,7 +3863,7 @@ var Rn, Wi = X(function(n, a) {
3861
3863
  if (!c && d) return window.addEventListener("focus", w), window.addEventListener("blur", x), function() {
3862
3864
  window.removeEventListener("focus", w), window.removeEventListener("blur", x);
3863
3865
  };
3864
- }, [c, w, d]), De("div", Object.assign({ ref: a }, b, { className: Gt(gd, e), onMouseEnter: function(m) {
3866
+ }, [c, w, d]), De("div", Object.assign({ ref: a }, b, { className: Kt(gd, e), onMouseEnter: function(m) {
3865
3867
  b.onMouseEnter && b.onMouseEnter(m), x();
3866
3868
  }, onMouseLeave: function(m) {
3867
3869
  b.onMouseLeave && b.onMouseLeave(m), w();
@@ -3870,15 +3872,15 @@ var Rn, Wi = X(function(n, a) {
3870
3872
  Wi.displayName = "Snackbar";
3871
3873
  var Sd = Oo({ root: (Rn = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, Rn[Zo] = { flexGrow: "initial", minWidth: "288px" }, Rn) }), or = X(function(n, a) {
3872
3874
  var t = n.className, e = Fo(n, ["className"]);
3873
- return ne.createElement("div", Object.assign({ ref: a, className: Gt(Sd.root, t) }, e));
3875
+ return ne.createElement("div", Object.assign({ ref: a, className: Kt(Sd.root, t) }, e));
3874
3876
  });
3875
3877
  or.displayName = "SnackbarContent";
3876
3878
  var So = Oo({ root: { backgroundColor: "#313131", fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", color: "#fff", alignItems: "center", padding: "6px 16px", borderRadius: "4px", boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)" }, lessPadding: { paddingLeft: "20px" }, default: { backgroundColor: "#313131" }, success: { backgroundColor: "#43a047" }, error: { backgroundColor: "#d32f2f" }, warning: { backgroundColor: "#ff9800" }, info: { backgroundColor: "#2196f3" }, message: { display: "flex", alignItems: "center", padding: "8px 0" }, action: { display: "flex", alignItems: "center", marginLeft: "auto", paddingLeft: "16px", marginRight: "-8px" } }), ua = "notistack-snackbar", ji = X(function(n, a) {
3877
3879
  var t = n.id, e = n.message, r = n.action, l = n.iconVariant, c = n.variant, h = n.hideIconVariant, i = n.style, d = n.className, g = l[c], b = r;
3878
- return typeof b == "function" && (b = b(t)), ne.createElement(or, { ref: a, role: "alert", "aria-describedby": ua, style: i, className: Gt(fd, bd(c), So.root, So[c], d, !h && g && So.lessPadding) }, ne.createElement("div", { id: ua, className: So.message }, h ? null : g, e), b && ne.createElement("div", { className: So.action }, b));
3880
+ return typeof b == "function" && (b = b(t)), ne.createElement(or, { ref: a, role: "alert", "aria-describedby": ua, style: i, className: Kt(fd, bd(c), So.root, So[c], d, !h && g && So.lessPadding) }, ne.createElement("div", { id: ua, className: So.message }, h ? null : g, e), b && ne.createElement("div", { className: So.action }, b));
3879
3881
  });
3880
3882
  ji.displayName = "MaterialDesignContent";
3881
- var vo, Mn, Go, qo, Nn, vd = U(ji), Cd = Oo({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), kd = function(n) {
3883
+ var Co, Mn, Ko, Go, Nn, Cd = U(ji), vd = Oo({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), kd = function(n) {
3882
3884
  var a = xe(), t = V(!0), e = t[0], r = t[1], l = Ro([n.snack.onClose, n.onClose]), c = _(function() {
3883
3885
  a.current = setTimeout(function() {
3884
3886
  r(function(E) {
@@ -3891,7 +3893,7 @@ var vo, Mn, Go, qo, Nn, vd = U(ji), Cd = Oo({ wrappedRoot: { width: "100%", posi
3891
3893
  a.current && clearTimeout(a.current);
3892
3894
  };
3893
3895
  }, []);
3894
- var h, i = n.snack, d = n.classes, g = n.Component, b = g === void 0 ? vd : g, p = L(function() {
3896
+ var h, i = n.snack, d = n.classes, g = n.Component, b = g === void 0 ? Cd : g, p = L(function() {
3895
3897
  return (function(E) {
3896
3898
  E === void 0 && (E = {});
3897
3899
  var T = { containerRoot: !0, containerAnchorOriginTopCenter: !0, containerAnchorOriginBottomCenter: !0, containerAnchorOriginTopRight: !0, containerAnchorOriginBottomRight: !0, containerAnchorOriginTopLeft: !0, containerAnchorOriginBottomLeft: !0 };
@@ -3902,17 +3904,17 @@ var vo, Mn, Go, qo, Nn, vd = U(ji), Cd = Oo({ wrappedRoot: { width: "100%", posi
3902
3904
  return Pe({}, M, ((D = {})[R] = E[R], D));
3903
3905
  }, {});
3904
3906
  })(d);
3905
- }, [d]), s = i.open, u = i.SnackbarProps, x = i.TransitionComponent, w = i.TransitionProps, m = i.transitionDuration, f = i.disableWindowBlurListener, y = i.content, C = Fo(i, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), S = Pe({ direction: (h = C.anchorOrigin, h.horizontal !== "center" ? da[h.horizontal] : da[h.vertical]), timeout: m }, w), v = y;
3906
- typeof v == "function" && (v = v(C.id, C.message));
3907
+ }, [d]), s = i.open, u = i.SnackbarProps, x = i.TransitionComponent, w = i.TransitionProps, m = i.transitionDuration, f = i.disableWindowBlurListener, y = i.content, v = Fo(i, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), S = Pe({ direction: (h = v.anchorOrigin, h.horizontal !== "center" ? da[h.horizontal] : da[h.vertical]), timeout: m }, w), C = y;
3908
+ typeof C == "function" && (C = C(v.id, v.message));
3907
3909
  var k = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(E, T) {
3908
3910
  var M;
3909
- return Pe({}, E, ((M = {})[T] = Ro([n.snack[T], n[T]], C.id), M));
3911
+ return Pe({}, E, ((M = {})[T] = Ro([n.snack[T], n[T]], v.id), M));
3910
3912
  }, {});
3911
- return ne.createElement(Hi, { in: e, onExited: k.onExited }, ne.createElement(Wi, { open: s, id: C.id, disableWindowBlurListener: f, autoHideDuration: C.autoHideDuration, className: Gt(Cd.wrappedRoot, p.root, p[xd(C.anchorOrigin)]), SnackbarProps: u, onClose: l }, ne.createElement(x, Object.assign({}, S, { appear: !0, in: s, onExit: k.onExit, onExited: c, onEnter: k.onEnter, onEntered: Ro([k.onEntered, function() {
3913
+ return ne.createElement(Hi, { in: e, onExited: k.onExited }, ne.createElement(Wi, { open: s, id: v.id, disableWindowBlurListener: f, autoHideDuration: v.autoHideDuration, className: Kt(vd.wrappedRoot, p.root, p[xd(v.anchorOrigin)]), SnackbarProps: u, onClose: l }, ne.createElement(x, Object.assign({}, S, { appear: !0, in: s, onExit: k.onExit, onExited: c, onEnter: k.onEnter, onEntered: Ro([k.onEntered, function() {
3912
3914
  n.snack.requestClose && l(null, "instructed", n.snack.id);
3913
- }], C.id) }), v || ne.createElement(b, Object.assign({}, C)))));
3914
- }, Co = { default: 20 }, Ko = { default: 6, dense: 2 }, ma = "." + zi, Xo = Oo({ root: (vo = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: oo(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, vo[ma] = { padding: Ko.default + "px 0px", transition: "padding 300ms ease 0ms" }, vo.maxWidth = "calc(100% - " + 2 * Co.default + "px)", vo[En] = { width: "100%", maxWidth: "calc(100% - 32px)" }, vo), rootDense: (Mn = {}, Mn[ma] = { padding: Ko.dense + "px 0px" }, Mn), top: { top: Co.default - Ko.default + "px", flexDirection: "column" }, bottom: { bottom: Co.default - Ko.default + "px", flexDirection: "column-reverse" }, left: (Go = { left: Co.default + "px" }, Go[Zo] = { alignItems: "flex-start" }, Go[En] = { left: "16px" }, Go), right: (qo = { right: Co.default + "px" }, qo[Zo] = { alignItems: "flex-end" }, qo[En] = { right: "16px" }, qo), center: (Nn = { left: "50%", transform: "translateX(-50%)" }, Nn[Zo] = { alignItems: "center" }, Nn) }), Td = U(function(n) {
3915
- var a = n.classes, t = a === void 0 ? {} : a, e = n.anchorOrigin, r = n.dense, l = n.children, c = Gt(hd, Xo[e.vertical], Xo[e.horizontal], Xo.root, t.containerRoot, t["containerAnchorOrigin" + er(e)], r && Xo.rootDense);
3915
+ }], v.id) }), C || ne.createElement(b, Object.assign({}, v)))));
3916
+ }, vo = { default: 20 }, qo = { default: 6, dense: 2 }, ma = "." + zi, Xo = Oo({ root: (Co = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: oo(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, Co[ma] = { padding: qo.default + "px 0px", transition: "padding 300ms ease 0ms" }, Co.maxWidth = "calc(100% - " + 2 * vo.default + "px)", Co[En] = { width: "100%", maxWidth: "calc(100% - 32px)" }, Co), rootDense: (Mn = {}, Mn[ma] = { padding: qo.dense + "px 0px" }, Mn), top: { top: vo.default - qo.default + "px", flexDirection: "column" }, bottom: { bottom: vo.default - qo.default + "px", flexDirection: "column-reverse" }, left: (Ko = { left: vo.default + "px" }, Ko[Zo] = { alignItems: "flex-start" }, Ko[En] = { left: "16px" }, Ko), right: (Go = { right: vo.default + "px" }, Go[Zo] = { alignItems: "flex-end" }, Go[En] = { right: "16px" }, Go), center: (Nn = { left: "50%", transform: "translateX(-50%)" }, Nn[Zo] = { alignItems: "center" }, Nn) }), Td = U(function(n) {
3917
+ var a = n.classes, t = a === void 0 ? {} : a, e = n.anchorOrigin, r = n.dense, l = n.children, c = Kt(hd, Xo[e.vertical], Xo[e.horizontal], Xo.root, t.containerRoot, t["containerAnchorOrigin" + er(e)], r && Xo.rootDense);
3916
3918
  return ne.createElement("div", { className: c }, l);
3917
3919
  }), ha = function(n) {
3918
3920
  return !(typeof n == "string" || $n(n));
@@ -3921,7 +3923,7 @@ var vo, Mn, Go, qo, Nn, vd = U(ji), Cd = Oo({ wrappedRoot: { width: "100%", posi
3921
3923
  var e;
3922
3924
  return (e = n.call(this, t) || this).enqueueSnackbar = function(r, l) {
3923
3925
  if (l === void 0 && (l = {}), r == null) throw new Error("enqueueSnackbar called with invalid argument");
3924
- var c = ha(r) ? r : l, h = ha(r) ? r.message : r, i = c.key, d = c.preventDuplicate, g = Fo(c, ["key", "preventDuplicate"]), b = Vo(i), p = b ? i : (/* @__PURE__ */ new Date()).getTime() + Math.random(), s = md(g, e.props), u = Pe({ id: p }, g, { message: h, open: !0, entered: !1, requestClose: !1, persist: s("persist"), action: s("action"), content: s("content"), variant: s("variant"), anchorOrigin: s("anchorOrigin"), disableWindowBlurListener: s("disableWindowBlurListener"), autoHideDuration: s("autoHideDuration"), hideIconVariant: s("hideIconVariant"), TransitionComponent: s("TransitionComponent"), transitionDuration: s("transitionDuration"), TransitionProps: s("TransitionProps", !0), iconVariant: s("iconVariant", !0), style: s("style", !0), SnackbarProps: s("SnackbarProps", !0), className: Gt(e.props.className, g.className) });
3926
+ var c = ha(r) ? r : l, h = ha(r) ? r.message : r, i = c.key, d = c.preventDuplicate, g = Fo(c, ["key", "preventDuplicate"]), b = Vo(i), p = b ? i : (/* @__PURE__ */ new Date()).getTime() + Math.random(), s = md(g, e.props), u = Pe({ id: p }, g, { message: h, open: !0, entered: !1, requestClose: !1, persist: s("persist"), action: s("action"), content: s("content"), variant: s("variant"), anchorOrigin: s("anchorOrigin"), disableWindowBlurListener: s("disableWindowBlurListener"), autoHideDuration: s("autoHideDuration"), hideIconVariant: s("hideIconVariant"), TransitionComponent: s("TransitionComponent"), transitionDuration: s("transitionDuration"), TransitionProps: s("TransitionProps", !0), iconVariant: s("iconVariant", !0), style: s("style", !0), SnackbarProps: s("SnackbarProps", !0), className: Kt(e.props.className, g.className) });
3925
3927
  return u.persist && (u.autoHideDuration = void 0), e.setState(function(x) {
3926
3928
  if (d === void 0 && e.props.preventDuplicate || d) {
3927
3929
  var w = function(y) {
@@ -4058,7 +4060,7 @@ const $t = new Dd(), mt = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a39
4058
4060
  i(t);
4059
4061
  }, [t, i]);
4060
4062
  let w = p?.message;
4061
- return !w && $n(e) && (w = e), w || typeof e != "string" || (w = e), w || (w = `Unknown Error: ${e}`), o(or, { ref: a, className: Re(mt.root, "error-snackbar"), children: I(Ul, { className: mt.card, style: { backgroundColor: d.palette.error.dark, border: `1px solid ${d.palette.error.dark}` }, children: [I(Gl, { className: mt.actionRoot, children: [c ? null : r?.error, o(Fe, { variant: "body2", component: "div", className: mt.typography, children: w }), o("div", { style: { flex: "1 1 auto" } }), I("div", { className: mt.icons, children: [s ? o(ct, { "aria-label": "Show more", size: "small", className: Re(mt.expand, { [mt.expandOpen]: g }), onClick: u, children: o(ye, { iconKey: "ExpandMore" }) }) : null, o(ct, { size: "small", className: mt.expand, onClick: x, children: o(ye, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), s ? o(ql, { in: g, timeout: "auto", children: o("div", { className: mt.stackTraceContainer, style: { backgroundColor: d.palette.error.light, borderTop: `1px solid ${d.palette.error.main}` }, children: o(rs, { error: l, hideLineNumbers: !0 }) }) }) : null] }) });
4063
+ return !w && $n(e) && (w = e), w || typeof e != "string" || (w = e), w || (w = `Unknown Error: ${e}`), o(or, { ref: a, className: Re(mt.root, "error-snackbar"), children: I(Ul, { className: mt.card, style: { backgroundColor: d.palette.error.dark, border: `1px solid ${d.palette.error.dark}` }, children: [I(Kl, { className: mt.actionRoot, children: [c ? null : r?.error, o(Fe, { variant: "body2", component: "div", className: mt.typography, children: w }), o("div", { style: { flex: "1 1 auto" } }), I("div", { className: mt.icons, children: [s ? o(ct, { "aria-label": "Show more", size: "small", className: Re(mt.expand, { [mt.expandOpen]: g }), onClick: u, children: o(ye, { iconKey: "ExpandMore" }) }) : null, o(ct, { size: "small", className: mt.expand, onClick: x, children: o(ye, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), s ? o(Gl, { in: g, timeout: "auto", children: o("div", { className: mt.stackTraceContainer, style: { backgroundColor: d.palette.error.light, borderTop: `1px solid ${d.palette.error.main}` }, children: o(rs, { error: l, hideLineNumbers: !0 }) }) }) : null] }) });
4062
4064
  }));
4063
4065
  Vi.displayName = "ToastError";
4064
4066
  const _i = U(X((n, a) => {
@@ -4086,7 +4088,7 @@ const _i = U(X((n, a) => {
4086
4088
  u.isDefaultPrevented || b.closeFloatAll();
4087
4089
  } });
4088
4090
  }, [l, t, e, r, h]), g = "File";
4089
- return o(Oe, { commands: t, disabled: l, commandHook: e, scope: r, label: g, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (b) => `calc(1.25rem + ${b.spacing(2)}px)` } }, ...c, createPopupPanel: d, icon: o(nn, { className: "label", icon: null, label: g }) });
4091
+ return o(Oe, { commands: t, disabled: l, commandHook: e, scope: r, label: g, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (b) => `calc(1.25rem + ${b.spacing(2)}px)` } }, ...c, createPopupPanel: d, icon: o(rn, { className: "label", icon: null, label: g }) });
4090
4092
  }));
4091
4093
  _i.displayName = "StandaloneFileCommandButton";
4092
4094
  const Rd = o(at, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: o(O, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: o(Bl, { onClick: () => {
@@ -4099,75 +4101,75 @@ const Rd = o(at, { label: "SheetXL", description: "Visit me at sheetxl.com.", ch
4099
4101
  d?.closeAll();
4100
4102
  }, onError(m, f, y) {
4101
4103
  } } }) : null, x = L(() => ({ paddingLeft: (m) => m.spacing(1), paddingRight: (m) => m.spacing(1) }), []), w = xe(null);
4102
- return o(O, { ref: yt([w, g, a]), ...i, children: wi({ commands: t, isCompact: p, workbook: e, wrapperSelect: (m) => I(O, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (f) => f.spacing(1), paddingLeft: (f) => f.spacing(1), paddingRight: (f) => f.spacing(1) }, children: [I(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (f) => f.spacing(0.5) }, children: [r, I(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (f) => f.spacing(0.25) }, children: [s, m] })] }), o(O, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: l }), o(O, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p && !u ? "0 0 auto" : "1 1 100%" }, children: u })] }), propsSelect: x, propsToolbars: { Home: { sx: {} } } }) });
4104
+ return o(O, { ref: yt([w, g, a]), ...i, children: gi({ commands: t, isCompact: p, workbook: e, wrapperSelect: (m) => I(O, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (f) => f.spacing(1), paddingLeft: (f) => f.spacing(1), paddingRight: (f) => f.spacing(1) }, children: [I(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (f) => f.spacing(0.5) }, children: [r, I(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (f) => f.spacing(0.25) }, children: [s, m] })] }), o(O, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: l }), o(O, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p && !u ? "0 0 auto" : "1 1 100%" }, children: u })] }), propsSelect: x, propsToolbars: { Home: { sx: {} } } }) });
4103
4105
  }));
4104
4106
  Ui.displayName = "StudioToolbar";
4105
4107
  const Md = () => {
4106
4108
  window.open(window.origin.toString(), "sheetxl-" + Qe.uuidV4(), "popup=true");
4107
- }, Gi = U((n) => {
4108
- const { workbook: a, setWorkbook: t, refWorkbookTitle: e, titleWorkbook: r, setWorkbookTitle: l, titlePlaceHolder: c, undoManager: h, commands: i, importExportDisabled: d, themeOptions: g, renderWorkbook: b } = n, p = ((v) => {
4109
- const { workbook: k, setWorkbook: E, importExportDisabled: T, workbookTitle: M = "export", setWorkbookTitle: R, requestWorkbookTitle: D, themeOptions: N, undoManager: $, commands: F, onExecute: z } = v, P = sn(), j = Z(N?.onModeChange, [N?.onModeChange]), te = Z(N?.onEnabledDarkGridChange, [N?.onEnabledDarkGridChange]), de = Z(N?.onEnabledDarkImagesChange, [N?.onEnabledDarkImagesChange]), se = Z(async (me = null, ue = null, q = null) => {
4109
+ }, Ki = U((n) => {
4110
+ const { workbook: a, setWorkbook: t, refWorkbookTitle: e, titleWorkbook: r, setWorkbookTitle: l, titlePlaceHolder: c, undoManager: h, commands: i, importExportDisabled: d, themeOptions: g, renderWorkbook: b } = n, p = ((C) => {
4111
+ const { workbook: k, setWorkbook: E, importExportDisabled: T, workbookTitle: M = "export", setWorkbookTitle: R, requestWorkbookTitle: D, themeOptions: N, undoManager: $, commands: F, onExecute: z } = C, P = sn(), j = Z(N?.onModeChange, [N?.onModeChange]), te = Z(N?.onEnabledDarkGridChange, [N?.onEnabledDarkGridChange]), de = Z(N?.onEnabledDarkImagesChange, [N?.onEnabledDarkImagesChange]), se = Z(async (me = null, ue = null, G = null) => {
4110
4112
  const W = [];
4111
- let J, ve = null, ge = null;
4112
- if (typeof me == "string" ? ge = me : ve = me, J = ve ? me : await Qe.openFileDialog(ge ?? await $t.getAllReadFormatsAsString()), !J) return null;
4113
+ let J, Ce = null, ge = null;
4114
+ if (typeof me == "string" ? ge = me : Ce = me, J = Ce ? me : await Qe.openFileDialog(ge ?? await $t.getAllReadFormatsAsString()), !J) return null;
4113
4115
  const Ne = { source: J, typedCreateWorkbookOptions: ue, progress: { onWarning: (Ve) => {
4114
4116
  W.push(Ve);
4115
4117
  } } };
4116
- q && (Ne.progress.onStart = q);
4117
- const qe = await $t.read(Ne, P);
4118
+ G && (Ne.progress.onStart = G);
4119
+ const Ge = await $t.read(Ne, P);
4118
4120
  return W.length > 0 && (P.showMessage("Some elements were not able to be imported. See console for details."), console.warn(`Import warnings:
4119
4121
  ` + W.join(`
4120
- `))), qe;
4121
- }, [z, P, k]), A = Z(async (me, ue, q) => {
4122
+ `))), Ge;
4123
+ }, [z, P, k]), A = Z(async (me, ue, G) => {
4122
4124
  if (!ue && D) {
4123
- const W = await D("Enter Workbook name to " + (q?.isDefault ? "Save." : `Export as ${q?.description}.`));
4124
- return W !== null && $t.writeFile(W, me, { format: q.key });
4125
+ const W = await D("Enter Workbook name to " + (G?.isDefault ? "Save." : `Export as ${G?.description}.`));
4126
+ return W !== null && $t.writeFile(W, me, { format: G.key });
4125
4127
  }
4126
- return $t.writeFile(ue, me, { format: q.key });
4128
+ return $t.writeFile(ue, me, { format: G.key });
4127
4129
  }, [P, k, D]), H = _(() => ({ contains: (me) => !0, focus() {
4128
4130
  } }), []), [ie, oe] = ne.useState([]);
4129
4131
  le(() => {
4130
4132
  T ? oe([]) : (async () => {
4131
4133
  const me = [];
4132
4134
  (await $t.getWriteFormats()).forEach((ue) => {
4133
- const q = ue.isDefault, W = { label: q ? "Save Workbook" : `Save Workbook as ${ue.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${ue.description}` }, tags: ue.tags, description: `Save the workbook to the desktop${q ? "" : ` as ${ue.description}`}.`, icon: "FileDownloadAsSheet" };
4134
- q && (W.shortcut = { key: "S", modifiers: [fe.Ctrl] }, me.push(new be("saveWorkbookAs", H, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [fe.Shift, fe.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
4135
+ const G = ue.isDefault, W = { label: G ? "Save Workbook" : `Save Workbook as ${ue.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${ue.description}` }, tags: ue.tags, description: `Save the workbook to the desktop${G ? "" : ` as ${ue.description}`}.`, icon: "FileDownloadAsSheet" };
4136
+ G && (W.shortcut = { key: "S", modifiers: [fe.Ctrl] }, me.push(new be("saveWorkbookAs", H, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [fe.Shift, fe.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
4135
4137
  A(k, null, ue).catch((ge) => {
4136
4138
  P.showError(ge);
4137
4139
  });
4138
4140
  })));
4139
- const J = ue.key, ve = q ? "saveWorkbook" : `saveWorkbookAs${J}`;
4140
- J === "CSV" ? W.icon = "FileDownloadAsCSV" : J === "Excel" && (W.icon = "FileDownloadAsExcel"), me.push(new be(ve, H, W, (ge) => {
4141
+ const J = ue.key, Ce = G ? "saveWorkbook" : `saveWorkbookAs${J}`;
4142
+ J === "CSV" ? W.icon = "FileDownloadAsCSV" : J === "Excel" && (W.icon = "FileDownloadAsExcel"), me.push(new be(Ce, H, W, (ge) => {
4141
4143
  A(k, ge ?? M, ue).catch((Ne) => {
4142
4144
  P.showError(Ne);
4143
4145
  });
4144
4146
  }));
4145
4147
  }), me.push(new be("openWorkbook", H, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", icon: "FileOpen", shortcut: { key: "O", modifiers: [fe.Ctrl] } }, async (ue = null) => {
4146
- const q = { csv: { date1904: k.isDate1904(), ...k.options } };
4148
+ const G = { csv: { date1904: k.isDate1904(), ...k.options } };
4147
4149
  try {
4148
4150
  let W, J = null;
4149
- const ve = async (qe) => {
4150
- J = qe.format, W = qe.name;
4151
- }, ge = await se(ue, q, ve);
4151
+ const Ce = async (Ge) => {
4152
+ J = Ge.format, W = Ge.name;
4153
+ }, ge = await se(ue, G, Ce);
4152
4154
  if (!ge) return;
4153
4155
  const Ne = ge.getSelectedSheet();
4154
4156
  if (J.mimeType === "text/csv") {
4155
- const qe = k.findValidSheetName(W);
4157
+ const Ge = k.findValidSheetName(W);
4156
4158
  await k.doBatch(async () => {
4157
4159
  const Ve = { colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 };
4158
4160
  let Ze = Ne.getUsedRange();
4159
4161
  if (!Ze) return void P.showMessage("The file appears to be blank.");
4160
- Ze = Ze.getUnion(Ve), await k.getSheets().add({ name: qe, autoSelect: !0 }).getRange(Ve).copyFrom(Ze);
4161
- }, `Import CSV '${qe}'`);
4162
+ Ze = Ze.getUnion(Ve), await k.getSheets().add({ name: Ge, autoSelect: !0 }).getRange(Ve).copyFrom(Ze);
4163
+ }, `Import CSV '${Ge}'`);
4162
4164
  } else k?.close(), R?.(ge.getName() ?? ""), E(ge);
4163
4165
  } catch (W) {
4164
4166
  P.showError(W);
4165
4167
  }
4166
4168
  })), me.push(new be("openWorkbookFromUrl", H, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(ue) {
4167
4169
  if (!ue) {
4168
- const q = await P.showInput({ title: "Open Workbook from the Web", description: "Enter the web address for the workbook to open.", inputLabel: "Address", initialValue: "https://www.sheetxl.com/examples/features-checklist.xlsx", propsInput: { style: { minWidth: "440px" } }, options: ["Open"] });
4169
- if (q.option !== "Open") return;
4170
- ue = q.input;
4170
+ const G = await P.showInput({ title: "Open Workbook from the Web", description: "Enter the web address for the workbook to open.", inputLabel: "Address", initialValue: "https://www.sheetxl.com/examples/features-checklist.xlsx", propsInput: { style: { minWidth: "440px" } }, options: ["Open"] });
4171
+ if (G.option !== "Open") return;
4172
+ ue = G.input;
4171
4173
  }
4172
4174
  ue && console.log("openWorkbookFromUrl", ue);
4173
4175
  })), me.push(new We("closeWorkbook", H, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [fe.Ctrl, fe.Alt] } }, async function() {
@@ -4190,9 +4192,9 @@ const Md = () => {
4190
4192
  }), new be("gotoUrlIssue", H, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request.", icon: "Ticket" }, () => {
4191
4193
  window?.open("https://github.com/sheetxl/sheetxl/issues");
4192
4194
  })];
4193
- }, [k, M, P, T, N]), G = L(() => [...Y, ...ie], [Y, ie]), pe = L(() => {
4195
+ }, [k, M, P, T, N]), K = L(() => [...Y, ...ie], [Y, ie]), pe = L(() => {
4194
4196
  let me = null;
4195
- return me = F ? F.createChildGroup(H, "standaloneWorkbook", !1) : new Xn(H, "standaloneWorkbook"), me.addCommands(G, !0), me;
4197
+ return me = F ? F.createChildGroup(H, "standaloneWorkbook", !1) : new Xn(H, "standaloneWorkbook"), me.addCommands(K, !0), me;
4196
4198
  }, [F, Y, ie]);
4197
4199
  ms({ manager: $, commands: pe });
4198
4200
  const Me = ka("(prefers-color-scheme: dark)"), { themeMode: Te } = Ea();
@@ -4208,27 +4210,27 @@ const Md = () => {
4208
4210
  }), pe.getCommand("enableDarkImages").update({ state: N.enableDarkImages }).updateCallback(() => {
4209
4211
  de(!N.enableDarkImages);
4210
4212
  });
4211
- }, [Te, N, G]);
4213
+ }, [Te, N, K]);
4212
4214
  const { showModal: Ie } = as();
4213
4215
  return le(() => {
4214
- const me = () => new Promise((ue, q) => {
4215
- const W = ne.lazy(() => import("./BMo7K5LaD7zuDVg9.mjs")), J = Ie(W, { title: "Shortcut Keys Reference", commands: pe, onDone: () => {
4216
+ const me = () => new Promise((ue, G) => {
4217
+ const W = ne.lazy(() => import("./BJO2iGA4QZN4Tzfv.mjs")), J = Ie(W, { title: "Shortcut Keys Reference", commands: pe, onDone: () => {
4216
4218
  J.hide();
4217
4219
  }, slotProps: { transition: { onExited: () => {
4218
4220
  ue(!0);
4219
4221
  } } } });
4220
4222
  });
4221
4223
  pe.getCommand("showKeyboardShortcuts").updateCallback(() => me()), pe.getCommand("help").updateCallback(() => me());
4222
- }, [G, pe]), pe;
4223
- })({ workbook: a, setWorkbook: t, importExportDisabled: d, workbookTitle: r, setWorkbookTitle: l, commands: i, requestWorkbookTitle: (v) => new Promise((k) => {
4224
+ }, [K, pe]), pe;
4225
+ })({ workbook: a, setWorkbook: t, importExportDisabled: d, workbookTitle: r, setWorkbookTitle: l, commands: i, requestWorkbookTitle: (C) => new Promise((k) => {
4224
4226
  e.current ? e.current.requestWorkbookTitle((E, T) => {
4225
4227
  k(E);
4226
- }, { selectAll: !0, requestReason: v }) : k(c);
4228
+ }, { selectAll: !0, requestReason: C }) : k(c);
4227
4229
  }), themeOptions: g, undoManager: h, onExecute: _(() => {
4228
- }, []) }), s = L(() => o(Yc, { commands: p, disableHover: !0, sx: { padding: "0" }, propsButton: { sx: { maxHeight: "22px" } } }), [p]), [u, x] = ne.useState(null), w = _((v) => {
4229
- const k = v.dataTransfer;
4230
+ }, []) }), s = L(() => o(Yc, { commands: p, disableHover: !0, sx: { padding: "0" }, propsButton: { sx: { maxHeight: "22px" } } }), [p]), [u, x] = ne.useState(null), w = _((C) => {
4231
+ const k = C.dataTransfer;
4230
4232
  if (p?.getCommand("openWorkbook") && k) {
4231
- if (v.type === "dragenter" || v.type === "dragover") {
4233
+ if (C.type === "dragenter" || C.type === "dragover") {
4232
4234
  const E = (D) => {
4233
4235
  const N = k.items, $ = N.length;
4234
4236
  for (let F = 0; F < $; F++) {
@@ -4241,32 +4243,32 @@ const Md = () => {
4241
4243
  T = E("image/");
4242
4244
  const M = k.types, R = k.items;
4243
4245
  T ? x({ item: T, text: "" }) : M.includes("Files") && R.length > 0 ? x({ item: R[0], text: "Drop to open" }) : M.includes("text/html") || M.includes("text/plain") ? (x({ item: R[0], text: "" }), k.effectAllowed = "none", k.dropEffect = "none") : (k.effectAllowed = "none", k.dropEffect = "none");
4244
- } else v.type === "dragleave" && x(null);
4245
- v.preventDefault();
4246
+ } else C.type === "dragleave" && x(null);
4247
+ C.preventDefault();
4246
4248
  }
4247
- }, [p]), m = ne.useRef(null), f = Z((v) => {
4248
- if (u && p && (v.preventDefault(), v.stopPropagation(), x(null), v.dataTransfer.files && v.dataTransfer.files.length > 0)) {
4249
- const k = v.dataTransfer.files[0];
4249
+ }, [p]), m = ne.useRef(null), f = Z((C) => {
4250
+ if (u && p && (C.preventDefault(), C.stopPropagation(), x(null), C.dataTransfer.files && C.dataTransfer.files.length > 0)) {
4251
+ const k = C.dataTransfer.files[0];
4250
4252
  if (!k) return;
4251
4253
  if (k?.type?.startsWith("image/")) {
4252
- const E = m.current?.getSheetElement()?.getGridElement().getViewFromClient(v.clientX, v.clientY);
4254
+ const E = m.current?.getSheetElement()?.getGridElement().getViewFromClient(C.clientX, C.clientY);
4253
4255
  if (!E) return;
4254
- const T = E.getRelativePointFromClient(v.clientX, v.clientY), M = E.toAbsoluteBounds({ ...T, width: 0, height: 0 }), R = E.getCellCoordsFromClient(v.clientX, v.clientY);
4256
+ const T = E.getRelativePointFromClient(C.clientX, C.clientY), M = E.toAbsoluteBounds({ ...T, width: 0, height: 0 }), R = E.getCellCoordsFromClient(C.clientX, C.clientY);
4255
4257
  p.getCommand("insertImageFromFile")?.execute({ file: k, options: { bounds: { x: M.x, y: M.y } }, goto: { range: { ...R } } });
4256
4258
  } else p.getCommand("openWorkbook")?.execute(k);
4257
4259
  }
4258
- }, [p, u]), y = L(() => u && u.text ? o(O, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: (v) => v.palette.divider, color: (v) => v.palette.primary.dark }, children: o(Fe, { variant: "h4", children: u.text }) }) : null, [u]), C = { ref: m, commands: p, onDragStart: (v) => {
4259
- if (v.target.src) {
4260
+ }, [p, u]), y = L(() => u && u.text ? o(O, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: (C) => C.palette.divider, color: (C) => C.palette.primary.dark }, children: o(Fe, { variant: "h4", children: u.text }) }) : null, [u]), v = { ref: m, commands: p, onDragStart: (C) => {
4261
+ if (C.target.src) {
4260
4262
  const k = new Image();
4261
- k.src = v.target.src, v.dataTransfer.setDragImage(k, 1, 1);
4263
+ k.src = C.target.src, C.dataTransfer.setDragImage(k, 1, 1);
4262
4264
  }
4263
4265
  }, onDragEnter: w, onDragLeave: w, onDragOver: w, onDrop: f };
4264
- a && (C.propsStatusBar = { childrenEnd: s });
4265
- let S = b(C);
4266
+ a && (v.propsStatusBar = { childrenEnd: s });
4267
+ let S = b(v);
4266
4268
  return y ? I(ae, { children: [S, y] }) : S;
4267
4269
  });
4268
- Gi.displayName = "CommandsWrapper";
4269
- const qi = U((n) => {
4270
+ Ki.displayName = "CommandsWrapper";
4271
+ const Gi = U((n) => {
4270
4272
  const { children: a } = n, t = $i(), e = t ? t.enqueueSnackbar : () => {
4271
4273
  }, r = t ? t.closeSnackbar : () => {
4272
4274
  }, [l, c] = V({ isMounted: !1, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), h = _(() => {
@@ -4274,45 +4276,45 @@ const qi = U((n) => {
4274
4276
  }, []), i = _(() => {
4275
4277
  c((m) => ({ ...m, isMounted: !1 }));
4276
4278
  }, []), d = {}, g = is(d), b = ls(d), p = ss(d), s = xe(/* @__PURE__ */ new Set()), u = L(() => {
4277
- const m = (C, S) => {
4279
+ const m = (v, S) => {
4278
4280
  if (S?.onceKey) {
4279
4281
  if (s.current.has(S.onceKey)) return;
4280
4282
  const k = new Set(s.current);
4281
4283
  k.add(S.onceKey), s.current = k;
4282
4284
  }
4283
- const v = { variant: S?.type ?? kt.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: S?.preventDuplicate, persist: S?.persist ?? S?.type === kt.Error, action: (k) => o(ct, { onClick: () => r(k), children: o(ye, { iconKey: "Cancel" }) }) };
4284
- S?.enqueueProps && Object.assign(v, S.enqueueProps), C || console.log("message is 'null'", S), e(C ?? "Alert", v);
4285
- }, f = { showMessage: m, showBusy: (C, S) => {
4286
- let v = null;
4285
+ const C = { variant: S?.type ?? kt.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: S?.preventDuplicate, persist: S?.persist ?? S?.type === kt.Error, action: (k) => o(ct, { onClick: () => r(k), children: o(ye, { iconKey: "Cancel" }) }) };
4286
+ S?.enqueueProps && Object.assign(C, S.enqueueProps), v || console.log("message is 'null'", S), e(v ?? "Alert", C);
4287
+ }, f = { showMessage: m, showBusy: (v, S) => {
4288
+ let C = null;
4287
4289
  const k = new Promise((E) => {
4288
- v = E;
4290
+ C = E;
4289
4291
  });
4290
4292
  return c((E) => {
4291
4293
  const T = new Map(E.starting);
4292
- return T.set(k, v), { ...E, label: C, starting: T };
4294
+ return T.set(k, C), { ...E, label: v, starting: T };
4293
4295
  }), k;
4294
- }, showWindow: (C, S) => {
4295
- const v = S;
4296
+ }, showWindow: (v, S) => {
4297
+ const C = S;
4296
4298
  return S = { ...S, onKeyDown: (k) => {
4297
- k.isDefaultPrevented() || k.isPropagationStopped() || v?.onKeyDown?.(k);
4298
- } }, g(C, { sort: () => import("./DltuoFr9A-WJccbV.mjs"), numberFormat: () => import("./D5XNYGaC4Yw6vCRL.mjs"), hyperlink: () => import("./DtifaYF85GrfJ9_1.mjs"), comments: () => import("./aUkJls9HzxnrZSof.mjs"), find: () => import("./CROTe62QHFVo8YMt.mjs"), tableNew: () => import("./BNmwaUWz2DJqWumP.mjs"), namedDetails: () => import("./Btt4G85L5v01eySb.mjs"), resizeHeader: () => import("./C7jHdVMf6Yr4eH_B.mjs") }[C], S);
4299
- }, showOptions: b, showInput: p, showError: (C) => {
4300
- let S, v = kt.Error, k = "Unknown Error";
4301
- typeof C == "string" ? k = C : C instanceof Error && (S = C, C.message && (k = C.message)), C instanceof Ss && (v = kt.Info), m(k, { type: v, enqueueProps: { error: S } });
4299
+ k.isDefaultPrevented() || k.isPropagationStopped() || C?.onKeyDown?.(k);
4300
+ } }, g(v, { sort: () => import("./D-9Ar2kzfZAziktn.mjs"), numberFormat: () => import("./BQGW_5yvCb0eTpib.mjs"), hyperlink: () => import("./ePSxe_g7wEvzmkJ7.mjs"), comments: () => import("./HmzSBdi0ej5oeXZ1.mjs"), find: () => import("./BYAdBaegvg_SoS6K.mjs"), tableNew: () => import("./BE92YslAajVEiBuX.mjs"), namedDetails: () => import("./pshi0IoaQJ-EyVt3.mjs"), resizeHeader: () => import("./0OyyoHlgiaso9tYr.mjs") }[v], S);
4301
+ }, showOptions: b, showInput: p, showError: (v) => {
4302
+ let S, C = kt.Error, k = "Unknown Error";
4303
+ typeof v == "string" ? k = v : v instanceof Error && (S = v, v.message && (k = v.message)), v instanceof Ss && (C = kt.Info), m(k, { type: C, enqueueProps: { error: S } });
4302
4304
  } }, y = new hs();
4303
4305
  return y.setOverrides(f), y;
4304
4306
  }, []);
4305
4307
  le(() => {
4306
4308
  l.starting.size <= 0 || !l.isMounted || c((m) => {
4307
4309
  const f = new Map(m.running);
4308
- return m.starting.forEach((y, C) => {
4310
+ return m.starting.forEach((y, v) => {
4309
4311
  const S = () => {
4310
- c((v) => {
4311
- const k = new Map(v.running);
4312
- return k.delete(C), { ...v, running: k };
4312
+ c((C) => {
4313
+ const k = new Map(C.running);
4314
+ return k.delete(v), { ...C, running: k };
4313
4315
  });
4314
4316
  };
4315
- f.set(C, S), y(S);
4317
+ f.set(v, S), y(S);
4316
4318
  }), { ...m, starting: /* @__PURE__ */ new Map(), running: f };
4317
4319
  });
4318
4320
  }, [l]);
@@ -4321,7 +4323,7 @@ const qi = U((n) => {
4321
4323
  l.starting.size !== 0 || l.running.size !== 0 ? w(o(Po, { icon: o(cs, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: !0, label: l.label, onMount: h, onUnmount: i, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : w(null);
4322
4324
  }, [l.starting, l.running]), I(gs, { notifier: u, children: [x, a] });
4323
4325
  });
4324
- qi.displayName = "SnackbarWrapper";
4326
+ Gi.displayName = "SnackbarWrapper";
4325
4327
  const Nd = U(X((n, a) => {
4326
4328
  const { children: t, title: e, taskPanes: r, onSelect: l, selected: c, registry: h = en, style: i, iconsOnly: d, className: g, ...b } = n, p = L(() => r.map((x) => {
4327
4329
  const w = h.getRegisteredTaskPane(x);
@@ -4329,16 +4331,16 @@ const Nd = U(X((n, a) => {
4329
4331
  let m = w.getIcon?.();
4330
4332
  m && (typeof m == "string" && (m = o(ye, { iconKey: m })), m = o("span", { style: { display: "inline-block", transform: "rotate(90deg)", transformOrigin: "center" }, children: m }));
4331
4333
  const f = x === c;
4332
- return o(Ca, { value: x, label: o(Et, { disableInteractive: !0, title: w.getTitle() ?? "", placement: "left-start", children: I(O, { sx: { padding: "0px 0px", writingMode: "vertical-rl", textOrientation: "mixed", display: "flex", alignItems: "center", justifyContent: "space-between", minWidth: "0px", color: (y) => y.palette.text.secondary }, children: [m && o(O, { sx: { display: "inline-block", transformOrigin: "center", color: (y) => y.palette.text.secondary }, children: m }), d && m ? null : o(Fe, { component: "div", textTransform: "none", sx: { padding: "4px 0px", color: (y) => f ? y.palette.primary.main : y.palette.text.secondary }, children: w.getTitle() })] }) }), sx: { padding: "4px 4px", minWidth: "0px", minHeight: "0px", borderRadius: "4px" }, className: Re("taskpane-strip-item", { "Mui-selected": f }), onClick: () => n.onSelect(x) }, x);
4334
+ return o(va, { value: x, label: o(Et, { disableInteractive: !0, title: w.getTitle() ?? "", placement: "left-start", children: I(O, { sx: { padding: "0px 0px", writingMode: "vertical-rl", textOrientation: "mixed", display: "flex", alignItems: "center", justifyContent: "space-between", minWidth: "0px", color: (y) => y.palette.text.secondary }, children: [m && o(O, { sx: { display: "inline-block", transformOrigin: "center", color: (y) => y.palette.text.secondary }, children: m }), d && m ? null : o(Fe, { component: "div", textTransform: "none", sx: { padding: "4px 0px", color: (y) => f ? y.palette.primary.main : y.palette.text.secondary }, children: w.getTitle() })] }) }), sx: { padding: "4px 4px", minWidth: "0px", minHeight: "0px", borderRadius: "4px" }, className: Re("taskpane-strip-item", { "Mui-selected": f }), onClick: () => n.onSelect(x) }, x);
4333
4335
  }), [r, c, l, h]), s = Rt(a, () => ({ isTaskPaneStrip: () => !0 }), []), u = L(() => Re("taskpane-strip", g), [g]);
4334
- return o(O, { ref: s, className: u, sx: { paddingLeft: "2px", paddingTop: "4px", ...i }, ...b, children: o(va, { orientation: "vertical", variant: "scrollable", value: c, onChange: (x, w) => {
4336
+ return o(O, { ref: s, className: u, sx: { paddingLeft: "2px", paddingTop: "4px", ...i }, ...b, children: o(Ca, { orientation: "vertical", variant: "scrollable", value: c, onChange: (x, w) => {
4335
4337
  l(w);
4336
4338
  }, slotProps: { list: { sx: { gap: "2px" } }, indicator: { sx: { left: "0px", right: "unset" } } }, children: p }) });
4337
4339
  })), Pd = (n) => o(Nd, { ...n }), Fd = ne.forwardRef((n, a) => {
4338
4340
  const { commands: t, model: e, ...r } = n, l = Je(), c = `solid ${Se(l.palette.divider, 0.2)} 1px`, h = `${l.shape.borderRadius ?? 4}px`, i = `${l.spacing?.(0.5) ?? 4}px`, d = xe(null);
4339
4341
  return o(Al, { model: e, ref: a, propsFrame: { style: { border: c, borderRadius: h, marginBottom: i } }, alwaysShowStrip: !0, renderTaskPanelTitle: (g) => {
4340
4342
  const { title: b, icon: p, onClose: s, readOnly: u, focused: x, ...w } = g;
4341
- return o(Kl, { className: Re({ "Mui-selected": x }), sx: { display: "flex", flex: "1 1 %0", color: (m) => m.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (m) => `${m.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (m) => m.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (m) => Se(m.palette.action.hover, 0.03), borderBottom: (m) => `solid ${Se(m.palette.divider, 0.2)} 1px` }, ...w, children: I(O, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (m) => m.spacing(0.25), marginBottom: (m) => m.spacing(0.25), marginLeft: (m) => m.spacing(1), marginRight: (m) => m.spacing(1) }, children: [o(O, { sx: { flex: "1 1 100%", paddingLeft: (m) => m.spacing(1) }, children: b }), o(at, { label: "Close", children: o(ct, { "aria-label": "close", sx: { color: (m) => m.palette.text.icon ?? m.palette.action.active }, touchRippleRef: d, onPointerDown: (m) => {
4343
+ return o(ql, { className: Re({ "Mui-selected": x }), sx: { display: "flex", flex: "1 1 %0", color: (m) => m.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (m) => `${m.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (m) => m.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (m) => Se(m.palette.action.hover, 0.03), borderBottom: (m) => `solid ${Se(m.palette.divider, 0.2)} 1px` }, ...w, children: I(O, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (m) => m.spacing(0.25), marginBottom: (m) => m.spacing(0.25), marginLeft: (m) => m.spacing(1), marginRight: (m) => m.spacing(1) }, children: [o(O, { sx: { flex: "1 1 100%", paddingLeft: (m) => m.spacing(1) }, children: b }), o(at, { label: "Close", children: o(ct, { "aria-label": "close", sx: { color: (m) => m.palette.text.icon ?? m.palette.action.active }, touchRippleRef: d, onPointerDown: (m) => {
4342
4344
  d.current?.start(m, { center: !1 }), m.stopPropagation(), m.preventDefault();
4343
4345
  }, onPointerUp: () => {
4344
4346
  s();
@@ -4348,16 +4350,16 @@ const Nd = U(X((n, a) => {
4348
4350
  }, onClose: () => {
4349
4351
  n?.onClose?.();
4350
4352
  }, commands: t, ...r });
4351
- }), ga = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Ki = U(X((n, a) => {
4353
+ }), ga = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, qi = U(X((n, a) => {
4352
4354
  const { mainElement: t, sidebarElement: e, className: r, style: l, ...c } = n, h = Je(), [i, { width: d }] = Vt(), g = d > 530 || d === 0, b = xe(null);
4353
4355
  let p = null, s = 4, u = 13;
4354
- return g ? p = "m 3.6261898,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.8836498,0 -1.60004965,-0.71626 -1.60004965,-1.59991 0,-0.88365 0.71639985,-1.6000508 1.60004965,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.8836498,0 -1.60004965,-0.7164 -1.60004965,-1.60004 0,-0.88365 0.71639985,-1.60005 1.60004965,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 1.14263,3.19996 0.42623015,2.48356 0.42623015,1.59991 0.42623015,0.71626 1.14263,0 2.0262798,0 c 0.88364,0 1.59991,0.71626 1.59991,1.59991" : (p = "M 1.59991,3.62619 C 0.71626,3.62619 0,2.90992 0,2.02628 0,1.1426301 0.71626,0.42623015 1.59991,0.42623015 c 0.88365,0 1.6000508,0.71639995 1.6000508,1.60004985 0,0.88364 -0.7164008,1.59991 -1.6000508,1.59991 m 4.881294,0 c -0.88364,0 -1.60004,-0.71627 -1.60004,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60004,-1.60004985 0.88365,0 1.60005,0.71639995 1.60005,1.60004985 0,0.88364 -0.7164,1.59991 -1.60005,1.59991 m 4.881226,0 c -0.88365,0 -1.60005,-0.71627 -1.60005,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60005,-1.60004985 0.88365,0 1.59991,0.71639995 1.59991,1.60004985 0,0.88364 -0.71626,1.59991 -1.59991,1.59991", s = 13, u = 4), o(qn, { ref: yt([b, i, a]), className: r, style: l ? { ...ga, ...l } : ga, ...c, fixedPane: "after", position: "40%", minAfter: g ? "280px" : "120px", splitDirection: g ? "row" : "column", propsResizer: { className: "styled-resizer", style: { minWidth: g ? "6px" : void 0, minHeight: g ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${s}' height='${u}' viewBox='0 0 ${s} ${u}' version='1.1' fill='${h.palette.text.icon ?? h.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${p}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: g ? "left center" : "top center" } }, elementBefore: t, propsPaneBefore: { style: { flexDirection: "column", marginRight: e ? void 0 : "6px" } }, elementAfter: e, propsPaneAfter: { style: { marginLeft: g ? "0px" : "4px", marginRight: g ? "8px" : "4px" } } });
4356
+ return g ? p = "m 3.6261898,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.8836498,0 -1.60004965,-0.71626 -1.60004965,-1.59991 0,-0.88365 0.71639985,-1.6000508 1.60004965,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.8836498,0 -1.60004965,-0.7164 -1.60004965,-1.60004 0,-0.88365 0.71639985,-1.60005 1.60004965,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 1.14263,3.19996 0.42623015,2.48356 0.42623015,1.59991 0.42623015,0.71626 1.14263,0 2.0262798,0 c 0.88364,0 1.59991,0.71626 1.59991,1.59991" : (p = "M 1.59991,3.62619 C 0.71626,3.62619 0,2.90992 0,2.02628 0,1.1426301 0.71626,0.42623015 1.59991,0.42623015 c 0.88365,0 1.6000508,0.71639995 1.6000508,1.60004985 0,0.88364 -0.7164008,1.59991 -1.6000508,1.59991 m 4.881294,0 c -0.88364,0 -1.60004,-0.71627 -1.60004,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60004,-1.60004985 0.88365,0 1.60005,0.71639995 1.60005,1.60004985 0,0.88364 -0.7164,1.59991 -1.60005,1.59991 m 4.881226,0 c -0.88365,0 -1.60005,-0.71627 -1.60005,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60005,-1.60004985 0.88365,0 1.59991,0.71639995 1.59991,1.60004985 0,0.88364 -0.71626,1.59991 -1.59991,1.59991", s = 13, u = 4), o(Gn, { ref: yt([b, i, a]), className: r, style: l ? { ...ga, ...l } : ga, ...c, fixedPane: "after", position: "40%", minAfter: g ? "280px" : "120px", splitDirection: g ? "row" : "column", propsResizer: { className: "styled-resizer", style: { minWidth: g ? "6px" : void 0, minHeight: g ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${s}' height='${u}' viewBox='0 0 ${s} ${u}' version='1.1' fill='${h.palette.text.icon ?? h.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${p}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: g ? "left center" : "top center" } }, elementBefore: t, propsPaneBefore: { style: { flexDirection: "column", marginRight: e ? void 0 : "6px" } }, elementAfter: e, propsPaneAfter: { style: { marginLeft: g ? "0px" : "4px", marginRight: g ? "8px" : "4px" } } });
4355
4357
  }));
4356
- Ki.displayName = "StudioSplitPane", Gc(), Kn.register("plugin-scripts", { icons: {} }), en.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: Cc }, !0);
4358
+ qi.displayName = "StudioSplitPane", mc(), qn.register("plugin-scripts", { icons: {} }), en.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: xc }, !0);
4357
4359
  const Hn = U(X((n, a) => {
4358
- const { className: t, sx: e, square: r, elevation: l, variant: c, style: h, onElementLoad: i, onError: d, undoManager: g, renderWorkbookError: b = Ac, onKeyDown: p, workbook: s, onWorkbookChange: u, logo: x, importExportDisabled: w = !1, themeOptions: m, autoFocus: f = !1, commands: y, title: C, onWorkbookTitleChange: S, propsWorkbookTitle: v, renderLoading: k = Jn, propsLoading: E, ...T } = n, M = xe(null), R = Z(u, [u]), D = Z(S ?? v?.onTitleChange, [S ?? v?.onTitleChange]), N = v?.placeHolder ?? "Untitled", $ = m?.mode, { themeMode: F, source: z } = Ea({ mode: $ }), P = L(() => ({ ...m, light: yr(!1, Qe.deepMerge(m?.theme ?? {}, m?.light ?? {})), dark: yr(!0, Qe.deepMerge(m?.theme ?? {}, m?.dark ?? {})) }), [m]), j = F === Pn.Dark, [te, de] = V(null);
4360
+ const { className: t, sx: e, square: r, elevation: l, variant: c, style: h, onElementLoad: i, onError: d, undoManager: g, renderWorkbookError: b = Nc, onKeyDown: p, workbook: s, onWorkbookChange: u, logo: x, importExportDisabled: w = !1, themeOptions: m, autoFocus: f = !1, commands: y, title: v, onWorkbookTitleChange: S, propsWorkbookTitle: C, renderLoading: k = Jn, propsLoading: E, ...T } = n, M = xe(null), R = Z(u, [u]), D = Z(S ?? C?.onTitleChange, [S ?? C?.onTitleChange]), N = C?.placeHolder ?? "Untitled", $ = m?.mode, { themeMode: F, source: z } = Ea({ mode: $ }), P = L(() => ({ ...m, light: yr(!1, Qe.deepMerge(m?.theme ?? {}, m?.light ?? {})), dark: yr(!0, Qe.deepMerge(m?.theme ?? {}, m?.dark ?? {})) }), [m]), j = F === Pn.Dark, [te, de] = V(null);
4359
4361
  le(() => {
4360
- de(g ?? new vs());
4362
+ de(g ?? new Cs());
4361
4363
  }, [g]);
4362
4364
  const [se, A] = V(null), [H, ie] = V(null), oe = ba();
4363
4365
  Tt(() => {
@@ -4380,7 +4382,7 @@ const Hn = U(X((n, a) => {
4380
4382
  })();
4381
4383
  }
4382
4384
  }, [H]);
4383
- const [Y, G] = V(null);
4385
+ const [Y, K] = V(null);
4384
4386
  le(() => {
4385
4387
  if (!te || !se) return;
4386
4388
  te.clear();
@@ -4393,51 +4395,51 @@ const Hn = U(X((n, a) => {
4393
4395
  } });
4394
4396
  }, [te, se, Y]);
4395
4397
  const pe = Z((ee) => {
4396
- ee ? te.setRepeatableOperation({ description: ee.label(), repeat: async () => ee.execute() }) : te.setRepeatableOperation(null);
4397
- }, [te]), [Me, Te] = V(C ?? v?.title ?? "");
4398
+ ee ? te.setRepeatableOperation({ description: ee.getLabel(), repeat: async () => ee.execute() }) : te.setRepeatableOperation(null);
4399
+ }, [te]), [Me, Te] = V(v ?? C?.title ?? "");
4398
4400
  le(() => {
4399
- Te(C ?? v?.title ?? "");
4400
- }, [C ?? v?.title]), le(() => {
4401
+ Te(v ?? C?.title ?? "");
4402
+ }, [v ?? C?.title]), le(() => {
4401
4403
  D?.(Me);
4402
4404
  }, [Me]);
4403
4405
  const [Ie, me] = V(null), ue = L(() => {
4404
4406
  const ee = () => ({ contains: (we) => !0, focus() {
4405
4407
  } });
4406
4408
  return y ? y.createChildGroup(ee, "application", !1) : new Xn(ee, "application");
4407
- }, [y]), q = Z(async (ee) => {
4408
- me(ee.source.getViewportElement()), G(ee), ue.activate("sheet"), await Kn.prefetch(), i?.(ee);
4409
+ }, [y]), G = Z(async (ee) => {
4410
+ me(ee.source.getViewportElement()), K(ee), ue.activate("sheet"), await qn.prefetch(), i?.(ee);
4409
4411
  }, [ue]);
4410
4412
  le(() => {
4411
4413
  Y && f && Y.source?.focus(typeof f == "object" ? f : void 0);
4412
4414
  }, [Y, f]);
4413
4415
  const W = xe(null), J = _((ee) => {
4414
4416
  let we = null;
4415
- return v?.hidden || (we = o(Ei, { ...v, style: { maxWidth: "100%", ...v?.style }, workbook: M.current, ref: W, title: Me, placeHolder: N, onTitleChange: (Mt) => {
4417
+ return C?.hidden || (we = o(Si, { ...C, style: { maxWidth: "100%", ...C?.style }, workbook: M.current, ref: W, title: Me, placeHolder: N, onTitleChange: (Mt) => {
4416
4418
  Te(Mt);
4417
4419
  } })), o(Ui, { ...ee, logo: x, mainElement: we, showFileMenu: !w, showAppearanceMenu: !!(P?.onEnabledDarkGridChange || P?.onEnabledDarkImagesChange || P?.onModeChange) });
4418
- }, [x, Me, v, P, w, ue]);
4420
+ }, [x, Me, C, P, w, ue]);
4419
4421
  le(() => {
4420
4422
  const ee = (we) => we.preventDefault();
4421
4423
  return M.current?.addEventListener("wheel", ee, { passive: !1 }), () => {
4422
4424
  M.current?.removeEventListener("wheel", ee);
4423
4425
  };
4424
4426
  }, []);
4425
- const ve = L(() => ({ "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (ee) => ee.palette.getContrastText(ee.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (ee) => ee.palette.getContrastText(ee.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (ee) => ee.palette.getContrastText(ee.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (ee) => ee.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" }, ...e }), [e]), [ge, Ne] = V(null), qe = _((ee) => o(Fd, { model: se?.workbook, commands: ue, ...ee }), [ue, se]), Ve = _((ee) => o(Ki, { mainElement: ee, sidebarElement: ge }), [ge]), Ze = yt([M, a]), Xe = _((ee) => {
4427
+ const Ce = L(() => ({ "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (ee) => ee.palette.getContrastText(ee.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (ee) => ee.palette.getContrastText(ee.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (ee) => ee.palette.getContrastText(ee.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (ee) => ee.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" }, ...e }), [e]), [ge, Ne] = V(null), Ge = _((ee) => o(Fd, { model: se?.workbook, commands: ue, ...ee }), [ue, se]), Ve = _((ee) => o(qi, { mainElement: ee, sidebarElement: ge }), [ge]), Ze = yt([M, a]), Xe = _((ee) => {
4426
4428
  const { commands: we, ref: Mt, ...un } = ee;
4427
4429
  if (!se) return o(xt, { sx: e, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...h }, children: k({ ...E }) });
4428
4430
  if (se.error) return o(xt, { sx: e, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "stretch", justifyContent: "stretch", ...h }, children: b({ style: { width: "100%", height: "100%", ...h }, error: se.error }) });
4429
4431
  let io = null, Bo = null, Le = !1;
4430
4432
  P && (io = j ? P.dark : P.light, Bo = j && P.enableDarkGrid ? P.dark : P.light, Le = P.enableDarkImages);
4431
- const Nt = o(Ti, { tabIndex: 0, autoFocus: !1, workbook: se.workbook, ref: yt([Mt, Ze]), renderToolbar: J, onElementLoad: q, onRepeatCommandChange: pe, onKeyDown: (Pt) => {
4433
+ const Nt = o(wi, { tabIndex: 0, autoFocus: !1, workbook: se.workbook, ref: yt([Mt, Ze]), renderToolbar: J, onElementLoad: G, onRepeatCommandChange: pe, onKeyDown: (Pt) => {
4432
4434
  p?.(Pt);
4433
4435
  }, propsLoading: E, renderLoading: k, gridTheme: Bo, headersTheme: io, enableDarkImages: Le, wrapperMain: Ve, className: Re(t), onContextMenu: (Pt) => Pt.preventDefault(), commands: we, ...T, ...un }, "WorkbookElement");
4434
- return o(xt, { sx: ve, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "stretch", justifyContent: "stretch", ...h }, square: r, elevation: l, variant: c, children: Nt });
4435
- }, [se, Me, te, k, E, T, r, l, c, b, P, J, ve, Ve]);
4436
+ return o(xt, { sx: Ce, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "stretch", justifyContent: "stretch", ...h }, square: r, elevation: l, variant: c, children: Nt });
4437
+ }, [se, Me, te, k, E, T, r, l, c, b, P, J, Ce, Ve]);
4436
4438
  let Ue = o(Ed, { maxSnack: 3, domRoot: Ie, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (ee, we, Mt) => {
4437
4439
  M.current?.focus();
4438
- }, Components: { error: Vi }, iconVariant: { success: o(wa, { style: { marginRight: "8px" }, children: o("path", { d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" }) }), error: o(ye, { iconKey: "ErrorAlert", style: { marginRight: "8px" } }) }, children: o(Il, { renderArea: qe, onUpdateArea: (ee) => {
4440
+ }, Components: { error: Vi }, iconVariant: { success: o(wa, { style: { marginRight: "8px" }, children: o("path", { d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" }) }), error: o(ye, { iconKey: "ErrorAlert", style: { marginRight: "8px" } }) }, children: o(Il, { renderArea: Ge, onUpdateArea: (ee) => {
4439
4441
  Ne(ee);
4440
- }, children: o(ds, { children: o(qi, { children: o(fs, { children: o(bs, { children: o(Gi, { workbook: se?.workbook, renderWorkbook: Xe, setWorkbook: ie, importExportDisabled: w, titlePlaceHolder: N, titleWorkbook: Me, setWorkbookTitle: Te, refWorkbookTitle: W, commands: ue, undoManager: te, themeOptions: P }) }) }) }) }) }) });
4442
+ }, children: o(ds, { children: o(Gi, { children: o(fs, { children: o(bs, { children: o(Ki, { workbook: se?.workbook, renderWorkbook: Xe, setWorkbook: ie, importExportDisabled: w, titlePlaceHolder: N, titleWorkbook: Me, setWorkbookTitle: Te, refWorkbookTitle: W, commands: ue, undoManager: te, themeOptions: P }) }) }) }) }) }) });
4441
4443
  return P && (Ue = I(Da, { theme: j ? P.dark : P.light, children: [P.cssBaseline ? o(Xl, {}) : null, Ue] })), Ue;
4442
4444
  }));
4443
4445
  Hn.displayName = "EagerStudio";
@@ -4447,68 +4449,68 @@ export {
4447
4449
  Di as A,
4448
4450
  Ls as B,
4449
4451
  Ns as C,
4450
- Kc as D,
4452
+ qc as D,
4451
4453
  Xc as E,
4452
4454
  Hs as F,
4453
4455
  Yc as G,
4454
- Cs as H,
4456
+ vs as H,
4455
4457
  Ri as I,
4456
4458
  Qn as J,
4457
4459
  Mi as K,
4458
4460
  Qc as L,
4459
4461
  zs as M,
4460
- _a as N,
4462
+ Ia as N,
4461
4463
  Is as O,
4462
- La as P,
4464
+ Ti as P,
4463
4465
  Sr as Q,
4464
- Ua as R,
4466
+ La as R,
4465
4467
  ed as S,
4466
4468
  Ts as T,
4467
- Aa as U,
4469
+ vi as U,
4468
4470
  ks as V,
4469
- Xs as W,
4471
+ _c as W,
4470
4472
  As as X,
4471
4473
  Ds as Y,
4472
4474
  Do as Z,
4473
4475
  Bn as _,
4474
- Gt as a,
4476
+ Kt as a,
4475
4477
  Yn as a0,
4476
4478
  Io as a1,
4477
4479
  Ma as a2,
4478
- lc as a3,
4479
- sc as a4,
4480
- cc as a5,
4481
- qa as a6,
4482
- Ga as a7,
4483
- ei as a8,
4484
- Ja as a9,
4485
- ti as aa,
4486
- xc as ab,
4487
- Wa as ac,
4488
- Js as ad,
4489
- oc as ae,
4490
- _c as af,
4491
- Uc as ag,
4492
- Gc as ah,
4493
- oi as ai,
4494
- ni as aj,
4495
- ri as ak,
4496
- Xd as al,
4497
- Ti as am,
4498
- Ei as an,
4499
- ki as ao,
4500
- Ci as ap,
4501
- Mc as aq,
4502
- qr as ar,
4480
+ _s as a3,
4481
+ Us as a4,
4482
+ Ks as a5,
4483
+ Ha as a6,
4484
+ za as a7,
4485
+ Ka as a8,
4486
+ Ua as a9,
4487
+ Ga as aa,
4488
+ tc as ab,
4489
+ Xa as ac,
4490
+ nc as ad,
4491
+ ic as ae,
4492
+ pc as af,
4493
+ uc as ag,
4494
+ mc as ah,
4495
+ Za as ai,
4496
+ Qa as aj,
4497
+ Ja as ak,
4498
+ qd as al,
4499
+ wi as am,
4500
+ Si as an,
4501
+ yi as ao,
4502
+ xi as ap,
4503
+ kc as aq,
4504
+ Gr as ar,
4503
4505
  Hn as as,
4504
4506
  Dd as at,
4505
4507
  $t as au,
4506
4508
  On as b,
4507
4509
  To as c,
4508
- ii as d,
4510
+ ti as d,
4509
4511
  Re as e,
4510
4512
  Es as f,
4511
- Kd as g,
4513
+ Gd as g,
4512
4514
  Ws as h,
4513
4515
  js as i,
4514
4516
  $s as j,
@@ -4517,15 +4519,15 @@ export {
4517
4519
  Pa as m,
4518
4520
  Fa as n,
4519
4521
  Oa as o,
4520
- _s as p,
4521
- Ba as q,
4522
+ Hc as p,
4523
+ Ci as q,
4522
4524
  cn as r,
4523
- qd as s,
4524
- Mo as t,
4525
+ Xd as s,
4526
+ No as t,
4525
4527
  Vt as u,
4526
- Us as v,
4527
- Gs as w,
4528
- qs as x,
4529
- Ks as y,
4530
- Zs as z
4528
+ Wc as v,
4529
+ jc as w,
4530
+ $c as x,
4531
+ Vc as y,
4532
+ Kc as z
4531
4533
  };