@sheetxl/studio-mui 0.7.19 → 0.7.21

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/{DQDHzkk3uE69oOf1.cjs → 7uRpnSJkNHg_E-KO.cjs} +2 -2
  2. package/browser/cjs/B-O26BvbKDImp7pm.cjs +20 -0
  3. package/browser/cjs/{bHc9WXWuOLgCy20D.cjs → B4j_sdzJNzq1ZPbT.cjs} +1 -1
  4. package/browser/cjs/{BGM5Egsh-nk8JoMR.cjs → BWS4gFWp8lDPvR9C.cjs} +1 -1
  5. package/browser/cjs/{CDa5R5H06f0QGbLy.cjs → CmSwD6NZAHhOcRi3.cjs} +2 -2
  6. package/browser/cjs/{DLI8Ew9QZfYFQggZ.cjs → DHwhTAQeNs4slttB.cjs} +2 -2
  7. package/browser/cjs/{Bewd3fxKZsnU-nNE.cjs → DMOT_ixtKqRvPULq.cjs} +1 -1
  8. package/browser/cjs/{CnqcFtkhyr8c_vIx.cjs → DX5ji_lT0Qlqznv7.cjs} +6 -6
  9. package/browser/cjs/{DdfZbPGZ8PPPUM_a.cjs → DbqHWelIXc-F2a9N.cjs} +1 -1
  10. package/browser/cjs/index.cjs +2 -2
  11. package/browser/cjs/{CRfQidmKBQ4Osnbw.cjs → muTJOFrCXh156rjc.cjs} +1 -1
  12. package/browser/cjs/{DeVzYeQ2NQw772Pw.cjs → rIy1Cx7HX-8zaQjY.cjs} +3 -3
  13. package/browser/cjs/{O0u5_8LdiNZxf7nW.cjs → saPH3d5fE-ugXp6m.cjs} +1 -1
  14. package/browser/esm/{B_99zP5rSV8EjlLY.mjs → 0D8VtNalLeBTB51a.mjs} +1 -1
  15. package/browser/esm/{C4TtshZ7KhuiUGbn.mjs → BMo7K5LaD7zuDVg9.mjs} +3 -3
  16. package/browser/esm/{CW4BTiGS1PKWCRBT.mjs → BNmwaUWz2DJqWumP.mjs} +2 -2
  17. package/browser/esm/{DDfXhHCLfmybPYNh.mjs → Btt4G85L5v01eySb.mjs} +2 -2
  18. package/browser/esm/{DUKRC4tS-eJTCx_v.mjs → C7jHdVMf6Yr4eH_B.mjs} +1 -1
  19. package/browser/esm/{CxSd30g44XJ8mnmj.mjs → CROTe62QHFVo8YMt.mjs} +2 -2
  20. package/browser/esm/{jCtxuLpDj7wzHB8p.mjs → D5XNYGaC4Yw6vCRL.mjs} +1 -1
  21. package/browser/esm/{Epfu4gRj2jHk_aDB.mjs → DUzVAMWTrS0u37LX.mjs} +524 -525
  22. package/browser/esm/{CQRjYFZa4QbRTGg_.mjs → DltuoFr9A-WJccbV.mjs} +1 -1
  23. package/browser/esm/{Cmnwt2GoquorcXj3.mjs → DtifaYF85GrfJ9_1.mjs} +1 -1
  24. package/browser/esm/{BdkP5a6d0ML7Y0b2.mjs → aUkJls9HzxnrZSof.mjs} +1 -1
  25. package/browser/esm/index.mjs +18 -19
  26. package/browser/esm/mqkuG-TcLS4nn4x0.mjs +4531 -0
  27. package/node/esm/{DiTrdBQV2uxN3GKM.mjs → BYjJIMFsheqJcsEI.mjs} +1 -1
  28. package/node/esm/{eZ7cx2YnaEfXyfU8.mjs → CACqTiBtxYlo1mu7.mjs} +1 -1
  29. package/node/esm/{D3_AGbvzQKHFYZxn.mjs → CJU8jJhxtR3PEj2I.mjs} +1 -1
  30. package/node/esm/{BEnfb2SK8bA4gTFW.mjs → CS0OWM24rZpAGRKU.mjs} +1 -1
  31. package/node/esm/{B8fe0e-2ZKPkjmUL.mjs → CdUceTAldsMTIFnD.mjs} +1 -1
  32. package/node/esm/{DNlKlusE8DeOTRuC.mjs → D6B7z_d11sd-U1fU.mjs} +1 -1
  33. package/node/esm/{BNP3QSlZuis44plx.mjs → DCngEQG4um0yTeoj.mjs} +1 -1
  34. package/node/esm/{CkTwDMf16gYei7o2.mjs → DQnCFz2zJgMwLou_.mjs} +2 -3
  35. package/node/esm/{Id0KR5kK1ADVhWhD.mjs → Do7ts-uMkQANfvhq.mjs} +1 -1
  36. package/node/esm/index.mjs +1194 -1177
  37. package/node/esm/{BZDELNZUW344wqXt.mjs → oYh6joioOWhFd_R3.mjs} +1 -1
  38. package/package.json +8 -8
  39. package/types/index.d.ts +165 -207
  40. package/browser/cjs/BZwSUqHASXkJlWax.cjs +0 -20
  41. package/browser/esm/D0Qe0M3MAH6Ya8_q.mjs +0 -4513
@@ -1,32 +1,32 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.19
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.21
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { Color as e, IColor as t, ITheme as o, CommonUtils as n, IBorder as a, FontUtils as r, IFont as l, NumberFormat as i, IFontCollection as s, IStyle as d, ITextFrame as c, Table as m, IFill as p, CoordUtils as u, ISheet as g, LicenseManager as h, Workbook as f, TypesUtils as x } from "@sheetxl/sdk";
7
+ import { Color as e, IColor as t, ITheme as o, CommonUtils as n, IBorder as a, FontUtils as r, IFont as l, NumberFormat as i, IFontCollection as s, IStyle as d, ITextFrame as c, Table as m, IFill as p, CoordUtils as u, ISheet as g, LicenseManager as h, TypesUtils as f, Workbook as x } from "@sheetxl/sdk";
8
8
  import { LicenseManager } from "@sheetxl/sdk";
9
- import { StyledStrokePath as b, StaticBorderRenderer as y, useModelListener as w, createCellEditStateFromCell as S, SheetCellEditor as k, ScriptEditor as C, DefaultTaskPaneRegistry as v, useTaskPaneArea as T, useDocThemes as R, TabStrip as P, SheetElement as D, SheetScrollbar as F, PictureEditor as M, ChartEditor as N, EmptyFrame as B, LogoNoPaddingIcon as E, TaskPaneArea as I, TaskPaneProvider as A } from "@sheetxl/react";
9
+ import { StyledStrokePath as b, StaticBorderRenderer as y, useModelListener as w, createCellEditStateFromCell as S, SheetCellEditor as C, ScriptEditor as k, DefaultTaskPaneRegistry as v, useTaskPaneArea as T, useDocThemes as R, TabStrip as D, SheetElement as F, SheetScrollbar as M, PictureEditor as N, ChartEditor as B, EmptyFrame as E, LogoNoPaddingIcon as P, TaskPaneArea as I, TaskPaneProvider as A } from "@sheetxl/react";
10
10
  import { DefaultTaskPaneRegistry, useModelListener, useRangeListener } from "@sheetxl/react";
11
11
  import { jsxs as L, Fragment as H, jsx as z } from "react/jsx-runtime";
12
- import W, { memo as $, forwardRef as O, useMemo as V, useCallback as K, isValidElement as G, useState as _, useEffect as U, Suspense as j, useRef as q, createElement as X, useReducer as Z, useImperativeHandle as Y, useLayoutEffect as Q } from "react";
13
- import { Box as J, Typography as ee, IconButton as te, MenuItem as oe, Divider as ne, Button as ae, SvgIcon as re, Input as le, FormControlLabel as ie, Checkbox as se, FormControl as de, TextField as ce, InputAdornment as me, Slider as pe, Paper as ue, CircularProgress as ge, Select as he, Tabs as fe, Tab as xe, useMediaQuery as be, Card as ye, CardActions as we, Collapse as Se, DialogTitle as ke, CssBaseline as Ce } from "@mui/material";
14
- import { CommandButton as ve, ExhibitDivider as Te, defaultCreatePopupPanel as Re, CommandPopupButton as Pe, InputCommandButton as De, SimpleTooltip as Fe, LoadingPanel as Me, PopupButtonType as Ne, ExhibitPopupIconButton as Be, ExhibitPopupMenuItem as Ee, ExhibitMenuItem as Ie, createStrokeShadowFilter as Ae, strokeShadowFilter as Le, ExhibitTooltip as He, ExhibitIconButton as ze, CommandTooltip as We, SimpleCommandPopupButton as $e, SelectedIcon as Oe, LabelIcon as Ve, ExhibitMenuHeader as Ke, ContextMenu as Ge, ExhibitOptionButton as _e, hexToRGB as Ue, useFloatStack as je, elevateColor as qe, CommandToolbar as Xe, createScrollEdgeButton as Ze, createScrollEndButton as Ye, createScrollStartButton as Qe, scrollbarTheming as Je, StackTrace as et, useResolvedThemeMode as tt, ThemeMode as ot, useModal as nt, useLazyWindow as at, useOptionsDialog as rt, useInputDialog as lt, AnimatedTraversingEllipsisIcon as it, ErrorPanel as st, createExhibitTheme as dt, ModalProvider as ct } from "@sheetxl/utils-mui";
15
- import mt from "clsx";
16
- import { useCommands as pt, CommandButtonType as ut, useCallbackRef as gt, ReactUtils as ht, KeyCodes as ft, DynamicIcon as xt, useCommand as bt, useMouseDownAndHoldListener as yt, useEditMode as wt, useNotifier as St, NotifierType as kt, useImperativeElement as Ct, SplitPane as vt, RoundedTab as Tt, DefaultDynamicIconService as Rt, SimpleCommand as Pt, Command as Dt, KeyModifiers as Ft, CommandGroup as Mt, ToolTipPlacement as Nt, ScrollPane as Bt, useUndoManager as Et, DefaultReactNotifier as It, NotifierProvider as At, UncaughtErrorBoundary as Lt, ReactErrorBoundary as Ht } from "@sheetxl/utils-react";
17
- import { useTheme as zt, alpha as Wt, getOverlayAlpha as $t, ThemeProvider as Ot } from "@mui/material/styles";
18
- import { alpha as Vt } from "@mui/system";
19
- import { useFormContext as Kt } from "react-hook-form";
20
- import { ResizableBox as Gt } from "react-resizable";
21
- import { mergeRefs as _t } from "react-merge-refs";
22
- import { useMeasure as Ut } from "react-use";
23
- import { CommonUtils as jt, ChainedError as qt, ErrorUtils as Xt, ExpectedError as Zt, PartialError as Yt, UndoManager as Qt } from "@sheetxl/utils";
24
- import { CSSTransition as Jt } from "react-transition-group";
25
- import { useFullscreen as eo } from "rooks";
26
- import { IOUtils as to } from "@sheetxl/io";
27
- import { useSnackbar as oo, SnackbarContent as no, SnackbarProvider as ao } from "notistack";
28
- const ro = $(O((e2, t2) => {
29
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), d2 = V(() => {
12
+ import W, { memo as $, forwardRef as O, useMemo as V, useCallback as K, isValidElement as G, useState as j, useEffect as _, Suspense as U, useRef as q, createElement as X, useReducer as Z, useLayoutEffect as Y } from "react";
13
+ import { Box as Q, Typography as J, IconButton as ee, MenuItem as te, Divider as oe, Button as ne, SvgIcon as ae, Input as re, FormControlLabel as le, Checkbox as ie, FormControl as se, TextField as de, InputAdornment as ce, Slider as me, Paper as pe, CircularProgress as ue, Select as ge, Tabs as he, Tab as fe, useMediaQuery as xe, Card as be, CardActions as ye, Collapse as we, DialogTitle as Se, CssBaseline as Ce } from "@mui/material";
14
+ import { CommandButton as ke, ExhibitDivider as ve, defaultCreatePopupPanel as Te, CommandPopupButton as Re, InputCommandButton as De, SimpleTooltip as Fe, AnimatedLoadingPanel as Me, PopupButtonType as Ne, ExhibitPopupIconButton as Be, ExhibitPopupMenuItem as Ee, ExhibitMenuItem as Pe, createStrokeShadowFilter as Ie, strokeShadowFilter as Ae, ExhibitTooltip as Le, ExhibitIconButton as He, CommandTooltip as ze, SimpleCommandPopupButton as We, SelectedIcon as $e, LabelIcon as Oe, ExhibitMenuHeader as Ve, ContextMenu as Ke, ExhibitOptionButton as Ge, hexToRGB as je, useFloatStack as _e, elevateColor as Ue, CommandToolbar as qe, renderScrollButtonEdge as Xe, renderScrollButtonEnd as Ze, renderScrollButtonStart as Ye, StackTraceErrorPanel as Qe, scrollbarTheming as Je, StackTrace as et, useResolvedThemeMode as tt, ThemeMode as ot, useModal as nt, useLazyWindow as at, useOptionsDialog as rt, useInputDialog as lt, AnimatedTraversingEllipsisIcon as it, createExhibitTheme as st, ModalProvider as dt } from "@sheetxl/utils-mui";
15
+ import { useTheme as ct, alpha as mt, getOverlayAlpha as pt, ThemeProvider as ut } from "@mui/material/styles";
16
+ import gt from "clsx";
17
+ import { useCommands as ht, CommandButtonType as ft, useCallbackRef as xt, ReactUtils as bt, KeyCodes as yt, DynamicIcon as wt, useCommand as St, useMouseDownAndHoldListener as Ct, useEditMode as kt, useNotifier as vt, NotifierType as Tt, useImperativeElement as Rt, SplitPane as Dt, RoundedTab as Ft, DefaultDynamicIconService as Mt, SimpleCommand as Nt, Command as Bt, KeyModifiers as Et, CommandGroup as Pt, ToolTipPlacement as It, ScrollPane as At, useUndoManager as Lt, DefaultReactNotifier as Ht, NotifierProvider as zt, UncaughtErrorBoundary as Wt, ReactErrorBoundary as $t } from "@sheetxl/utils-react";
18
+ import { ResizableBox as Ot } from "react-resizable";
19
+ import { mergeRefs as Vt } from "react-merge-refs";
20
+ import { alpha as Kt } from "@mui/system";
21
+ import { useFormContext as Gt } from "react-hook-form";
22
+ import { useMeasure as jt } from "react-use";
23
+ import { CommonUtils as _t, ChainedError as Ut, ErrorUtils as qt, ExpectedError as Xt, PartialError as Zt, UndoManager as Yt } from "@sheetxl/utils";
24
+ import { CSSTransition as Qt } from "react-transition-group";
25
+ import { useFullscreen as Jt } from "rooks";
26
+ import { IOUtils as eo } from "@sheetxl/io";
27
+ import { useSnackbar as to, SnackbarContent as oo, SnackbarProvider as no } from "notistack";
28
+ const ao = $(O((e2, t2) => {
29
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ht(o2, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), d2 = V(() => {
30
30
  for (let e3 = 0; e3 < s2.length; e3++) if (s2[e3]?.state()) return s2[e3];
31
31
  return s2[0];
32
32
  }, [s2]), c2 = V(() => {
@@ -34,12 +34,12 @@ const ro = $(O((e2, t2) => {
34
34
  const e3 = { ...n2 };
35
35
  return delete e3.beforeExecute, e3;
36
36
  }, [n2]), m2 = K((e3, t3) => {
37
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatAlignLeftToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignCenterToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignRightToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignJustifyToggle") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("formatAlignCenterContinuousToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignFillToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignDistributedHorizontalToggle") })] }), s3 = L(J, { sx: { className: mt("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [z(ve, { command: t3.getCommand("formatIndentDecrease"), commandHook: c2, scope: a2, disabled: r2 }), z(ve, { command: t3.getCommand("formatIndentIncrease"), commandHook: c2, scope: a2, disabled: r2 })] }), d3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i2, children: [s3, z(Te, { orientation: "horizontal" }), z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l3 })] });
38
- return Re({ ...e3, children: d3 });
37
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("formatAlignLeftToggle") }), z(ke, { ...o3, command: t3.getCommand("formatAlignCenterToggle") }), z(ke, { ...o3, command: t3.getCommand("formatAlignRightToggle") }), z(ke, { ...o3, command: t3.getCommand("formatAlignJustifyToggle") }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("formatAlignCenterContinuousToggle") }), z(ke, { ...o3, command: t3.getCommand("formatAlignFillToggle") }), z(ke, { ...o3, command: t3.getCommand("formatAlignDistributedHorizontalToggle") })] }), s3 = L(Q, { sx: { className: gt("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [z(ke, { command: t3.getCommand("formatIndentDecrease"), commandHook: c2, scope: a2, disabled: r2 }), z(ke, { command: t3.getCommand("formatIndentIncrease"), commandHook: c2, scope: a2, disabled: r2 })] }), d3 = L(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i2, children: [s3, z(ve, { orientation: "horizontal" }), z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l3 })] });
38
+ return Te({ ...e3, children: d3 });
39
39
  }, [r2, n2]);
40
- return z(Pe, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: m2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d2?.key(), icon: d2?.icon() ?? "FormatAlignLeft", ...i2 });
41
- })), lo = $(O((e2, t2) => {
42
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), { activeCommand: s2, allDisabled: d2 } = V(() => {
40
+ return z(Re, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: m2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d2?.key(), icon: d2?.icon() ?? "FormatAlignLeft", ...i2 });
41
+ })), ro = $(O((e2, t2) => {
42
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ht(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), { activeCommand: s2, allDisabled: d2 } = V(() => {
43
43
  const e3 = i2.length;
44
44
  let t3, o3 = 0;
45
45
  for (let n3 = 0; n3 < e3; n3++) {
@@ -48,12 +48,12 @@ const ro = $(O((e2, t2) => {
48
48
  }
49
49
  return t3 = t3 ?? i2[0], { activeCommand: t3, allDisabled: 0 === o3 };
50
50
  }, [i2]), c2 = K((e3, t3) => {
51
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatAlignTopToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignMiddleToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignBottomToggle") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("formatAlignJustifyVerticalToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignDistributedVerticalToggle") })] });
52
- return Re({ ...e3, children: l3 });
51
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("formatAlignTopToggle") }), z(ke, { ...o3, command: t3.getCommand("formatAlignMiddleToggle") }), z(ke, { ...o3, command: t3.getCommand("formatAlignBottomToggle") }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("formatAlignJustifyVerticalToggle") }), z(ke, { ...o3, command: t3.getCommand("formatAlignDistributedVerticalToggle") })] });
52
+ return Te({ ...e3, children: l3 });
53
53
  }, [r2, n2]);
54
- return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: c2, disabled: r2 || d2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: s2?.icon() ?? "TextVerticalBottom", ...l2 });
55
- })), io = $(O((e2, t2) => {
56
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), { activeCommand: s2, allDisabled: d2 } = V(() => {
54
+ return z(Re, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: c2, disabled: r2 || d2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: s2?.icon() ?? "TextVerticalBottom", ...l2 });
55
+ })), lo = $(O((e2, t2) => {
56
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ht(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), { activeCommand: s2, allDisabled: d2 } = V(() => {
57
57
  const e3 = i2.length;
58
58
  let t3, o3 = 0;
59
59
  for (let n3 = 0; n3 < e3; n3++) {
@@ -61,13 +61,13 @@ const ro = $(O((e2, t2) => {
61
61
  e4 && !e4.disabled() && (!t3 && e4?.state() && (t3 = e4), o3++);
62
62
  }
63
63
  return t3 = t3 ?? i2[0], { activeCommand: t3, allDisabled: 0 === o3 };
64
- }, [i2]), c2 = gt((e3, t3) => {
65
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatTextOverflowVisibleToggle") }), z(ve, { ...o3, command: t3.getCommand("formatTextOverflowWrapToggle") }), z(ve, { ...o3, command: t3.getCommand("formatTextOverflowClipToggle") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("formatTextOverflowShrinkToggle") })] });
66
- return Re({ ...e3, children: l3 });
64
+ }, [i2]), c2 = xt((e3, t3) => {
65
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("formatTextOverflowVisibleToggle") }), z(ke, { ...o3, command: t3.getCommand("formatTextOverflowWrapToggle") }), z(ke, { ...o3, command: t3.getCommand("formatTextOverflowClipToggle") }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("formatTextOverflowShrinkToggle") })] });
66
+ return Te({ ...e3, children: l3 });
67
67
  }, [r2, n2, a2]);
68
- return z(Pe, { ref: t2, commands: o2, commandHook: n2, disabled: r2 || d2, scope: a2, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: c2, icon: s2?.icon() ?? "TextHorizontalOverflow", ...l2 });
69
- })), so = $(O((e2, t2) => {
70
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = V(() => {
68
+ return z(Re, { ref: t2, commands: o2, commandHook: n2, disabled: r2 || d2, scope: a2, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: c2, icon: s2?.icon() ?? "TextHorizontalOverflow", ...l2 });
69
+ })), io = $(O((e2, t2) => {
70
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ht(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = V(() => {
71
71
  const e3 = i2.length;
72
72
  for (let t3 = 0; t3 < e3; t3++) {
73
73
  const e4 = i2[t3];
@@ -75,13 +75,13 @@ const ro = $(O((e2, t2) => {
75
75
  }
76
76
  return i2[1];
77
77
  }, [i2]), d2 = K((e3, t3) => {
78
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatTextRotate0") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate315") }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate45") }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate90") }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate270") }), z(Te, { orientation: "horizontal" }), z(De, { ...o3, command: t3.getCommand("formatTextRotateCustom"), label: "Custom" })] });
79
- return Re({ ...e3, children: l3 });
78
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("formatTextRotate0") }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("formatTextRotate315") }), z(ke, { ...o3, command: t3.getCommand("formatTextRotate45") }), z(ke, { ...o3, command: t3.getCommand("formatTextRotate90") }), z(ke, { ...o3, command: t3.getCommand("formatTextRotate270") }), z(ve, { orientation: "horizontal" }), z(De, { ...o3, command: t3.getCommand("formatTextRotateCustom"), label: "Custom" })] });
79
+ return Te({ ...e3, children: l3 });
80
80
  }, [r2, n2, a2, o2]), c2 = V(() => 0 !== (o2.getCommand("formatTextRotateCustom")?.state() ?? 0), [i2]);
81
- return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, selected: c2, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: d2, quickCommand: c2 ? "formatTextRotate0" : "formatTextRotate315", icon: s2?.icon() ?? "TextRotation315", ...l2 });
82
- })), co = { Preset: "preset", Custom: "custom" }, mo = { Start: "start", End: "end" }, po = {}, uo = (e2, t2, o2, n2) => {
81
+ return z(Re, { ref: t2, commands: o2, commandHook: n2, scope: a2, selected: c2, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: d2, quickCommand: c2 ? "formatTextRotate0" : "formatTextRotate315", icon: s2?.icon() ?? "TextRotation315", ...l2 });
82
+ })), so = { Preset: "preset", Custom: "custom" }, co = { Start: "start", End: "end" }, mo = {}, po = (e2, t2, o2, n2) => {
83
83
  const a2 = e2 + "-" + t2 + "-" + o2 + (n2 ? "-server" : "");
84
- if (po[a2]) return po[a2];
84
+ if (mo[a2]) return mo[a2];
85
85
  const r2 = ((e3, t3, o3, n3) => {
86
86
  if ("undefined" == typeof document && !n3) return null;
87
87
  const a3 = n3 ? new n3() : document.createElement("canvas");
@@ -89,12 +89,12 @@ const ro = $(O((e2, t2) => {
89
89
  const r3 = a3.getContext("2d");
90
90
  return r3 ? (r3.fillStyle = e3, r3.fillRect(0, 0, a3.width, a3.height), r3.fillStyle = t3, r3.fillRect(0, 0, o3, o3), r3.translate(o3, o3), r3.fillRect(0, 0, o3, o3), a3.toDataURL()) : null;
91
91
  })(e2, t2, o2, n2);
92
- return po[a2] = r2, r2;
93
- }, go = {}, ho = $((e2) => {
94
- const { className: t2, style: o2 = ht.EmptyCssProperties, white: n2 = "transparent", grey: a2 = "grey", size: r2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = go, children: d2, ...c2 } = e2, m2 = d2, p2 = V(() => Object.assign({ borderRadius: l2, boxShadow: i2, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${uo(n2, a2, r2, s2?.canvas)}) center left` }, o2), [n2, a2, r2, s2]);
92
+ return mo[a2] = r2, r2;
93
+ }, uo = {}, go = $((e2) => {
94
+ const { className: t2, style: o2 = bt.EmptyCssProperties, white: n2 = "transparent", grey: a2 = "grey", size: r2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = uo, children: d2, ...c2 } = e2, m2 = d2, p2 = V(() => Object.assign({ borderRadius: l2, boxShadow: i2, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${po(n2, a2, r2, s2?.canvas)}) center left` }, o2), [n2, a2, r2, s2]);
95
95
  return G(d2) ? W.cloneElement(d2, { ...m2.props }) : z("div", { style: p2, ...c2 });
96
- }), fo = $((e2) => {
97
- const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: a2, onKeyDown: r2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 = ht.EmptyCssProperties, children: c2, alphaWhite: m2, alphaGrey: p2, darkMode: u2, alphaCheckSize: g2 = 7, ...h2 } = e2;
96
+ }), ho = $((e2) => {
97
+ const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: a2, onKeyDown: r2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 = bt.EmptyCssProperties, children: c2, alphaWhite: m2, alphaGrey: p2, darkMode: u2, alphaCheckSize: g2 = 7, ...h2 } = e2;
98
98
  if (!t2) throw new Error("a selectedColor is required");
99
99
  const f2 = K((e3) => {
100
100
  a2?.(e3), e3.isDefaultPrevented() || (e3.ctrlKey ? n2?.(t2.toRGBA()) : o2?.(t2.toRGBA()));
@@ -105,20 +105,20 @@ const ro = $(O((e2, t2) => {
105
105
  }, [n2, i2]), y2 = K((e3) => {
106
106
  s2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
107
107
  }, [n2, s2, t2]), w2 = K((e3) => {
108
- r2?.(e3), e3.isDefaultPrevented() || e3.keyCode === ft.Enter && o2?.(t2.toRGBA());
109
- }, [o2, r2, t2]), S2 = V(() => 1 === t2.toRGBA().alpha ? null : z(ho, { size: g2, white: m2, grey: p2, style: { position: "absolute", width: "calc(100% - 1.5px)", height: "calc(100% - 1.5px)", top: "0.75px", left: "0.75px" } }), [m2, p2, t2]);
108
+ r2?.(e3), e3.isDefaultPrevented() || e3.keyCode === yt.Enter && o2?.(t2.toRGBA());
109
+ }, [o2, r2, t2]), S2 = V(() => 1 === t2.toRGBA().alpha ? null : z(go, { size: g2, white: m2, grey: p2, style: { position: "absolute", width: "calc(100% - 1.5px)", height: "calc(100% - 1.5px)", top: "0.75px", left: "0.75px" } }), [m2, p2, t2]);
110
110
  return L("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d2 }, tabIndex: 0, ...h2, onClick: f2, onKeyDown: w2, onMouseOver: x2, onMouseLeave: b2, onFocus: y2, children: [S2, z("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: t2.toCSS(u2) }, children: c2 })] });
111
- }), xo = $((o2) => {
112
- const { schemeColorLookup: n2, selectedColor: a2, previewColor: r2, colorDef: l2, onSelectColorDef: i2, onPreviewColorDef: s2, swatchProps: d2, defaultButtonSize: c2 = 24, isLarge: m2 = false, compareRGB: p2 = false, darkMode: u2 = false, ...g2 } = o2, h2 = new e({ val: l2.definition.val, adjs: l2.definition.adjs }, (e2) => n2(e2)), f2 = p2 ? h2.toRGBA().toString() : h2.toString(), x2 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, b2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, y2 = [];
111
+ }), fo = $((o2) => {
112
+ const { schemeColorLookup: n2, selectedColor: a2, previewColor: r2, colorDef: l2, onSelectColorDef: i2, onPreviewColorDef: s2, propsSwatch: d2, defaultButtonSize: c2 = 24, isLarge: m2 = false, compareRGB: p2 = false, darkMode: u2 = false, ...g2 } = o2, h2 = new e({ val: l2.definition.val, adjs: l2.definition.adjs }, (e2) => n2(e2)), f2 = p2 ? h2.toRGBA().toString() : h2.toString(), x2 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, b2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, y2 = [];
113
113
  y2.push({ [t.AdjustmentType.Inv]: true }), y2.push({ [t.AdjustmentType.Alpha]: 100 });
114
114
  const w2 = h2.adjust(y2), S2 = K(() => {
115
115
  i2?.(l2);
116
- }, [i2, l2]), k2 = K((e2) => {
116
+ }, [i2, l2]), C2 = K((e2) => {
117
117
  s2?.(e2 ? l2 : null);
118
118
  }, [s2, l2]);
119
- return z(Fe, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: l2.description, placement: "bottom-start", children: z("div", { style: { width: c2 * (m2 ? 1.2 : 1) + "px", height: c2 * (m2 ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g2, children: L(fo, { selectedColor: h2, title: null, onSelectColor: S2, onPreviewColor: k2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...d2, children: [z("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: w2.toRGBA(u2).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: x2 ? "1" : "0" } }), z("div", { style: { position: "absolute", width: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", height: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: w2.toRGBA(u2).toString(), borderRadius: "50%", opacity: b2 ? "1" : "0" } })] }) }) });
120
- }), bo = $((e2) => {
121
- const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = ht.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, swatchProps: m2, ...p2 } = e2;
119
+ return z(Fe, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: l2.description, placement: "bottom-start", children: z("div", { style: { width: c2 * (m2 ? 1.2 : 1) + "px", height: c2 * (m2 ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g2, children: L(ho, { selectedColor: h2, title: null, onSelectColor: S2, onPreviewColor: C2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...d2, children: [z("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: w2.toRGBA(u2).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: x2 ? "1" : "0" } }), z("div", { style: { position: "absolute", width: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", height: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: w2.toRGBA(u2).toString(), borderRadius: "50%", opacity: b2 ? "1" : "0" } })] }) }) });
120
+ }), xo = $((e2) => {
121
+ const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = bt.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, propsSwatch: m2, ...p2 } = e2;
122
122
  let u2;
123
123
  if (Array.isArray(n2[0])) u2 = n2;
124
124
  else {
@@ -135,27 +135,27 @@ const ro = $(O((e2, t2) => {
135
135
  let n3 = [], l3 = u2[t3];
136
136
  for (let e4 = 0; e4 < l3.length; e4++) {
137
137
  let i4 = l3[e4];
138
- n3.push(z(xo, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
138
+ n3.push(z(fo, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: g2, onPreviewColorDef: h2, propsSwatch: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
139
139
  }
140
- let i3 = z(J, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (e4) => e4.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: n3 }, "" + t3);
140
+ let i3 = z(Q, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (e4) => e4.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: n3 }, "" + t3);
141
141
  e3.push(i3);
142
142
  }
143
143
  return e3;
144
- }, [u2, a2, r2, g2, h2]), x2 = V(() => t2 ? z(ee, { noWrap: true, component: "div", sx: { display: "flex", flexShrink: "0", paddingLeft: "6px", paddingBottom: "4px", paddingTop: "0px", userSelect: "none", color: (e3) => e3.palette.text.secondary }, children: t2 }) : null, [t2]);
145
- return L(J, { style: { ...s2 }, children: [x2, z(J, { sx: { display: "flex", flexDirection: "row", gap: "6px", marginBottom: "14px", flexWrap: "wrap", justifyContent: "flex-start" }, ...p2, children: f2 })] });
146
- }), yo = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), wo = (t2, o2, n2, a2, r2, l2) => {
147
- const i2 = yo(t2, o2);
144
+ }, [u2, a2, r2, g2, h2]), x2 = V(() => t2 ? z(J, { noWrap: true, component: "div", sx: { display: "flex", flexShrink: "0", paddingLeft: "6px", paddingBottom: "4px", paddingTop: "0px", userSelect: "none", color: (e3) => e3.palette.text.secondary }, children: t2 }) : null, [t2]);
145
+ return L(Q, { style: { ...s2 }, children: [x2, z(Q, { sx: { display: "flex", flexDirection: "row", gap: "6px", marginBottom: "14px", flexWrap: "wrap", justifyContent: "flex-start" }, ...p2, children: f2 })] });
146
+ }), bo = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), yo = (t2, o2, n2, a2, r2, l2) => {
147
+ const i2 = bo(t2, o2);
148
148
  a2?.push(i2);
149
149
  const s2 = new e({ val: i2.definition.val, adjs: i2.definition.adjs }, n2), d2 = s2.toString();
150
150
  r2?.set(d2, s2);
151
151
  const c2 = s2.toRGBA().toString();
152
152
  l2?.set(c2, s2);
153
- }, So = W.lazy(() => import("./CkTwDMf16gYei7o2.mjs")), ko = $(O((t2, a2) => {
154
- const { selectedColor: r2 = null, previewColor: l2 = t2.selectedColor ?? null, recentColors: i2, schemeLookup: s2, disableAlpha: d2 = false, previewDebounceTime: c2 = 100, initialPanelType: m2, defaultButtonSize: p2 = 24, width: u2, onElementLoad: g2, onDone: h2, onEyeDropStart: f2, onEyeDropStop: x2, onPreviewColor: b2, onPreviewColorImmediate: y2, onSelectColor: w2, autoColor: S2, autoColorLabel: k2 = "Automatic", autoColorPosition: C2 = mo.Start, compareRGB: v2 = false, darkMode: T2 = false, ...R2 } = t2, P2 = l2 || r2, D2 = gt(b2, [b2]), F2 = gt(y2, [y2]), M2 = gt(w2, [w2]), N2 = gt(f2, [f2]), B2 = gt(x2, [x2]), [E2, I2] = _(false), A2 = zt(), W2 = V(() => s2 || e.getDefaultSchemeLookup(), [s2]), $2 = V(() => {
153
+ }, wo = W.lazy(() => import("./DQnCFz2zJgMwLou_.mjs")), So = $(O((t2, a2) => {
154
+ const { selectedColor: r2 = null, previewColor: l2 = t2.selectedColor ?? null, recentColors: i2, schemeLookup: s2, disableAlpha: d2 = false, previewDebounceTime: c2 = 100, initialPanelType: m2, defaultButtonSize: p2 = 24, width: u2, onElementLoad: g2, onDone: h2, onEyeDropStart: f2, onEyeDropStop: x2, onPreviewColor: b2, onPreviewColorImmediate: y2, onSelectColor: w2, autoColor: S2, autoColorLabel: C2 = "Automatic", autoColorPosition: k2 = co.Start, compareRGB: v2 = false, darkMode: T2 = false, ...R2 } = t2, D2 = l2 || r2, F2 = xt(b2, [b2]), M2 = xt(y2, [y2]), N2 = xt(w2, [w2]), B2 = xt(f2, [f2]), E2 = xt(x2, [x2]), [P2, I2] = j(false), A2 = ct(), W2 = V(() => s2 || e.getDefaultSchemeLookup(), [s2]), $2 = V(() => {
155
155
  const e2 = /* @__PURE__ */ new Map(), t3 = /* @__PURE__ */ new Map(), n2 = [];
156
- wo("Primary Background", "bg1", W2, n2, e2, t3), wo("Primary Text", "tx1", W2, n2, e2, t3), wo("Secondary Background", "bg2", W2, n2, e2, t3), wo("Secondary Text", "tx2", W2, n2, e2, t3), wo("Accent 1", "accent1", W2, n2, e2, t3), wo("Accent 2", "accent2", W2, n2, e2, t3), wo("Accent 3", "accent3", W2, n2, e2, t3), wo("Accent 4", "accent4", W2, n2, e2, t3), wo("Accent 5", "accent5", W2, n2, e2, t3), wo("Accent 6", "accent6", W2, n2, e2, t3);
156
+ yo("Primary Background", "bg1", W2, n2, e2, t3), yo("Primary Text", "tx1", W2, n2, e2, t3), yo("Secondary Background", "bg2", W2, n2, e2, t3), yo("Secondary Text", "tx2", W2, n2, e2, t3), yo("Accent 1", "accent1", W2, n2, e2, t3), yo("Accent 2", "accent2", W2, n2, e2, t3), yo("Accent 3", "accent3", W2, n2, e2, t3), yo("Accent 4", "accent4", W2, n2, e2, t3), yo("Accent 5", "accent5", W2, n2, e2, t3), yo("Accent 6", "accent6", W2, n2, e2, t3);
157
157
  const a3 = o.buildPalette(n2, W2, e2, t3), r3 = [];
158
- if (wo("Dark Red", "C00000", W2, r3, e2, t3), wo("Red", "FF0000", W2, r3, e2, t3), wo("Orange", "FFC000", W2, r3, e2, t3), wo("Yellow", "FFFF00", W2, r3, e2, t3), wo("Light Green", "92D050", W2, r3, e2, t3), wo("Green", "00B050", W2, r3, e2, t3), wo("Light Blue", "00B0F0", W2, r3, e2, t3), wo("Blue", "0070C0", W2, r3, e2, t3), wo("Dark Blue", "002060", W2, r3, e2, t3), d2 ? wo("Purple Is A Fruit", "7030A0", W2, r3, e2, t3) : wo("Transparent", "00000000", W2, r3, e2, t3), S2) {
158
+ if (yo("Dark Red", "C00000", W2, r3, e2, t3), yo("Red", "FF0000", W2, r3, e2, t3), yo("Orange", "FFC000", W2, r3, e2, t3), yo("Yellow", "FFFF00", W2, r3, e2, t3), yo("Light Green", "92D050", W2, r3, e2, t3), yo("Green", "00B050", W2, r3, e2, t3), yo("Light Blue", "00B0F0", W2, r3, e2, t3), yo("Blue", "0070C0", W2, r3, e2, t3), yo("Dark Blue", "002060", W2, r3, e2, t3), d2 ? yo("Purple Is A Fruit", "7030A0", W2, r3, e2, t3) : yo("Transparent", "00000000", W2, r3, e2, t3), S2) {
159
159
  const t4 = S2.toString();
160
160
  e2.set(t4, S2);
161
161
  }
@@ -166,14 +166,14 @@ const ro = $(O((e2, t2) => {
166
166
  }
167
167
  return { primaryColors: n2, modifiedPresets: a3, standardColors: r3, recentColorsLimited: c3, mapAllPresets: e2, mapAllPresetsRGB: t3, mapRecent: l3 };
168
168
  }, [W2, i2, d2, S2]);
169
- U(() => {
169
+ _(() => {
170
170
  g2?.();
171
171
  }, []);
172
- const [O2, G2] = _(false), q2 = K(() => {
172
+ const [O2, G2] = j(false), q2 = K(() => {
173
173
  G2((e2) => !e2);
174
174
  }, []);
175
- U(() => {
176
- if (m2) G2(m2 === co.Custom);
175
+ _(() => {
176
+ if (m2) G2(m2 === so.Custom);
177
177
  else if (r2) {
178
178
  let e2 = r2.toString(), t3 = $2.mapAllPresets.get(e2);
179
179
  t3 || (e2 = r2.toRGBA().toString(), t3 = $2.mapAllPresetsRGB.get(e2));
@@ -182,36 +182,36 @@ const ro = $(O((e2, t2) => {
182
182
  }
183
183
  }, [r2, m2]);
184
184
  const X2 = K(n.debounce((e2) => {
185
- D2?.(e2);
186
- }, c2), [D2, c2]), [Z2, Y2] = _();
187
- U(() => {
185
+ F2?.(e2);
186
+ }, c2), [F2, c2]), [Z2, Y2] = j();
187
+ _(() => {
188
188
  Y2(l2 || r2);
189
189
  }, [l2, r2]);
190
- const Q2 = gt((e2) => {
191
- F2 && (F2(e2), X2(e2));
192
- }, [F2]), re2 = gt((t3) => {
193
- Q2(t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, W2) : null);
190
+ const ae2 = xt((e2) => {
191
+ M2 && (M2(e2), X2(e2));
192
+ }, [M2]), re2 = xt((t3) => {
193
+ ae2(t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, W2) : null);
194
194
  }, [W2]), le2 = K((e2) => {
195
195
  e2.ctrlKey && G2(true);
196
- }, []), ie2 = gt((e2) => {
196
+ }, []), ie2 = xt((e2) => {
197
197
  let t3 = false;
198
198
  if (e2) {
199
199
  const o2 = e2.toString();
200
200
  t3 = !$2.mapAllPresets.has(o2);
201
201
  }
202
- M2?.(e2, t3);
203
- }, [M2, $2]), se2 = gt((t3) => {
202
+ N2?.(e2, t3);
203
+ }, [N2, $2]), se2 = xt((t3) => {
204
204
  const o2 = t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, W2) : null;
205
205
  Promise.resolve(h2?.()).then(() => {
206
206
  ie2(o2);
207
207
  });
208
- }, [W2, h2]), de2 = gt((t3) => {
209
- Q2(t3 ? new e(t3, W2) : null);
208
+ }, [W2, h2]), de2 = xt((t3) => {
209
+ ae2(t3 ? new e(t3, W2) : null);
210
210
  }, [W2]), ce2 = V(() => {
211
211
  if (void 0 === window.EyeDropper) return z(H, {});
212
- return z(te, { "aria-label": "eye dropper", size: "small", sx: { color: (e2) => e2.palette.text.icon ?? e2.palette.action.active }, onClick: async () => {
213
- I2(true), N2?.(), await new EyeDropper().open().then((t3) => {
214
- I2(false), B2?.();
212
+ return z(ee, { "aria-label": "eye dropper", size: "small", sx: { color: (e2) => e2.palette.text.icon ?? e2.palette.action.active }, onClick: async () => {
213
+ I2(true), B2?.(), await new EyeDropper().open().then((t3) => {
214
+ I2(false), E2?.();
215
215
  let o2 = new e(t3.sRGBHex), n2 = o2.toString(), a3 = $2.mapAllPresets.get(n2);
216
216
  if (a3 || (n2 = o2.toRGBA().toString(), a3 = $2.mapAllPresetsRGB.get(n2)), !a3) {
217
217
  const e2 = o2.toRGBA(), t4 = 3;
@@ -221,77 +221,77 @@ const ro = $(O((e2, t2) => {
221
221
  i3 < t4 && i3 < n3 && (a3 = o3);
222
222
  });
223
223
  }
224
- G2(!a3), Q2(a3 || o2);
224
+ G2(!a3), ae2(a3 || o2);
225
225
  }).catch((e2) => {
226
226
  I2(false), "AbortError" !== e2?.name && console.error(e2);
227
227
  });
228
- }, children: z(xt, { iconKey: "Colorize" }) });
228
+ }, children: z(wt, { iconKey: "Colorize" }) });
229
229
  }, [$2, T2]), me2 = V(() => {
230
230
  if (!O2) return;
231
231
  const e2 = { opacity: O2 ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
232
- return z(j, { fallback: z("div", { style: e2, children: z(Me, {}) }), children: z(So, { style: e2, selectedColor: P2 ? P2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
233
- }, [O2, P2]), pe2 = V(() => ({ onClick: le2, alphaGrey: A2.palette.text.icon ?? A2.palette.action.active }), [le2, A2]), ue2 = V(() => {
232
+ return z(U, { fallback: z("div", { style: e2, children: z(Me, {}) }), children: z(wo, { style: e2, selectedColor: D2 ? D2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
233
+ }, [O2, D2]), pe2 = V(() => ({ onClick: le2, alphaGrey: A2.palette.text.icon ?? A2.palette.action.active }), [le2, A2]), ue2 = V(() => {
234
234
  if (!S2) return null;
235
- const e2 = { description: k2, definition: { val: S2.getVal(), adjs: S2.getAdjustments() } };
236
- return z(H, { children: L(oe, { sx: { display: "flex", color: (e3) => e3.palette.text.secondary }, onMouseOver: () => {
235
+ const e2 = { description: C2, definition: { val: S2.getVal(), adjs: S2.getAdjustments() } };
236
+ return z(H, { children: L(te, { sx: { display: "flex", color: (e3) => e3.palette.text.secondary }, onMouseOver: () => {
237
237
  re2(null);
238
238
  }, onClick: () => {
239
239
  se2(null);
240
- }, children: [z(J, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: z(xo, { schemeColorLookup: W2, colorDef: e2, selectedColor: null === r2 ? S2 : r2, previewColor: null === l2 ? S2 : l2, defaultButtonSize: p2, isLarge: true, darkMode: T2, compareRGB: v2, swatchProps: pe2 }) }), z(ee, { noWrap: true, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: k2 })] }) });
241
- }, [S2, k2, W2, r2, l2]);
242
- return L(J, { ref: a2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...R2, children: [L("div", { style: { position: "relative", display: "flex" }, children: [L("div", { style: { opacity: O2 ? "0" : 1 }, children: [ue2 && C2 === mo.Start ? L(H, { children: [ue2, z(ne, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, z(bo, { title: "Theme Colors", schemeColorLookup: W2, colorDefs: $2.primaryColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), z(bo, { schemeColorLookup: W2, colorDefs: $2.modifiedPresets, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), z(ne, { light: true, style: { marginBottom: "10px" } }), z(bo, { title: "Standard Colors", schemeColorLookup: W2, colorDefs: $2.standardColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), L("div", { style: { opacity: 0 === $2.recentColorsLimited.length ? "0" : void 0, display: 0 === $2.recentColorsLimited.length ? "none" : void 0 }, children: [z(ne, { light: true, style: { marginBottom: "10px" } }), z(bo, { title: "Recent Colors", schemeColorLookup: W2, colorDefs: $2.recentColorsLimited, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 })] }), ue2 && C2 === mo.End ? L(H, { children: [z(ne, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, z("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), z(ne, { light: true, style: { marginBottom: "10px" } }), L("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [ce2, z("div", { style: { flex: "1 1 100%", background: "pink" } }), z(ae, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
240
+ }, children: [z(Q, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: z(fo, { schemeColorLookup: W2, colorDef: e2, selectedColor: null === r2 ? S2 : r2, previewColor: null === l2 ? S2 : l2, defaultButtonSize: p2, isLarge: true, darkMode: T2, compareRGB: v2, propsSwatch: pe2 }) }), z(J, { noWrap: true, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: C2 })] }) });
241
+ }, [S2, C2, W2, r2, l2]);
242
+ return L(Q, { ref: a2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...R2, children: [L("div", { style: { position: "relative", display: "flex" }, children: [L("div", { style: { opacity: O2 ? "0" : 1 }, children: [ue2 && k2 === co.Start ? L(H, { children: [ue2, z(oe, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, z(xo, { title: "Theme Colors", schemeColorLookup: W2, colorDefs: $2.primaryColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, propsSwatch: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), z(xo, { schemeColorLookup: W2, colorDefs: $2.modifiedPresets, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, propsSwatch: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), z(oe, { light: true, style: { marginBottom: "10px" } }), z(xo, { title: "Standard Colors", schemeColorLookup: W2, colorDefs: $2.standardColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, propsSwatch: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), L("div", { style: { opacity: 0 === $2.recentColorsLimited.length ? "0" : void 0, display: 0 === $2.recentColorsLimited.length ? "none" : void 0 }, children: [z(oe, { light: true, style: { marginBottom: "10px" } }), z(xo, { title: "Recent Colors", schemeColorLookup: W2, colorDefs: $2.recentColorsLimited, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, propsSwatch: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 })] }), ue2 && k2 === co.End ? L(H, { children: [z(oe, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, z("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), z(oe, { light: true, style: { marginBottom: "10px" } }), L("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [ce2, z("div", { style: { flex: "1 1 100%", background: "pink" } }), z(ne, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
243
243
  q2();
244
- }, children: z("div", O2 ? { children: "Preset" } : { children: "Custom" }) }), z(ae, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
244
+ }, children: z("div", O2 ? { children: "Preset" } : { children: "Custom" }) }), z(ne, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
245
245
  Promise.resolve(h2?.()).then(() => {
246
246
  ie2(Z2);
247
247
  });
248
248
  }, children: "Done" })] })] });
249
- })), Co = z(xt, { iconKey: "circle.colored" }), vo = $(O((e2, t2) => {
250
- const { selectedColor: o2, quickColor: n2, icon: a2 = Co, tooltip: r2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Ne.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = gt(i2, [i2]), x2 = gt(s2, [s2]), b2 = gt(d2, [d2]), [y2, w2] = _(() => {
251
- }), S2 = n2 || (y2 || o2) || m2?.autoColor, k2 = q(false), C2 = K(() => {
252
- }, []), v2 = gt(() => {
249
+ })), Co = z(wt, { iconKey: "circle.colored" }), ko = $(O((e2, t2) => {
250
+ const { selectedColor: o2, quickColor: n2, icon: a2 = Co, tooltip: r2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Ne.Toolbar, propsPanel: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = xt(i2, [i2]), x2 = xt(s2, [s2]), b2 = xt(d2, [d2]), [y2, w2] = j(() => {
251
+ }), S2 = n2 || (y2 || o2) || m2?.autoColor, C2 = q(false), k2 = K(() => {
252
+ }, []), v2 = xt(() => {
253
253
  w2(o2);
254
- }, [o2]), T2 = gt((e3) => {
255
- k2.current || (w2(e3), f2?.(e3));
256
- }, [f2]), R2 = gt((e3) => {
257
- k2.current || (w2(e3), x2?.(e3));
258
- }, [x2]), P2 = gt((e3, t3) => {
259
- k2.current || (w2(void 0), b2?.(e3, t3));
260
- }, [b2]), D2 = V(() => z(J, { className: "color-wrapper", sx: { lineHeight: "0", color: "inherit", "--sxl-color-active": `${S2?.toCSS(g2) ?? "transparent"}`, "& .activeColor": { fill: `${S2?.toCSS(g2) ?? "transparent"}` }, "& .style_grey": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, children: "function" == typeof a2 ? a2() : a2 }), [S2, a2, g2]), F2 = gt((e3) => {
254
+ }, [o2]), T2 = xt((e3) => {
255
+ C2.current || (w2(e3), f2?.(e3));
256
+ }, [f2]), R2 = xt((e3) => {
257
+ C2.current || (w2(e3), x2?.(e3));
258
+ }, [x2]), D2 = xt((e3, t3) => {
259
+ C2.current || (w2(void 0), b2?.(e3, t3));
260
+ }, [b2]), F2 = V(() => z(Q, { className: "color-wrapper", sx: { lineHeight: "0", color: "inherit", "--sxl-color-active": `${S2?.toCSS(g2) ?? "transparent"}`, "& .activeColor": { fill: `${S2?.toCSS(g2) ?? "transparent"}` }, "& .style_grey": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, children: "function" == typeof a2 ? a2() : a2 }), [S2, a2, g2]), M2 = xt((e3) => {
261
261
  b2?.(n2, false);
262
- }, [b2, n2]), [M2, N2] = _(false), B2 = K((e3) => {
262
+ }, [b2, n2]), [N2, B2] = j(false), E2 = K((e3) => {
263
263
  const { closeFloat: t3, closeFloatAll: n3 } = e3;
264
- return z(ko, { ...m2, selectedColor: o2, previewColor: y2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
265
- e4.which === ft.Enter && (p2 ? n3() : t3());
266
- }, onPreviewColorImmediate: R2, onPreviewColor: T2, onSelectColor: P2, onEyeDropStart: () => N2(true), onEyeDropStop: () => N2(false), compareRGB: u2, darkMode: g2 });
267
- }, [o2, y2, p2, S2, m2?.autoColor, g2]), E2 = { onQuickClick: n2 ? F2 : void 0, createPopupPanel: B2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: v2, onPopupClose: C2, tooltip: r2 || l2 || "Color", label: l2, icon: D2, ...h2 };
268
- return c2 === Ne.Toolbar ? z(Be, { ref: t2, ...E2 }) : z(Ee, { ref: t2, ...E2 });
269
- })), To = 82, Ro = (e2) => {
270
- const { styleColor: t2, length: o2 = To, width: n2 = 1, dashArray: a2 = null, sx: r2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...d2 } = e2;
271
- return z(re, { sx: { width: `${o2}px`, height: `${n2}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (e3) => `${t2 ? t2.toRGBA(s2).toString() : e3.palette.text.icon ?? e3.palette.action.active}` }, "& .style_grey": { stroke: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, ...r2 }, height: n2, width: o2, viewBox: `0 0 ${o2} ${n2}`, ...d2, children: z(b, { length: o2, width: n2, dashArray: a2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
272
- }, Po = $(O((e2, t2) => {
273
- const { variant: o2, showLabels: n2 = false, disabled: r2 = false, createPopupPanel: l2, styleColor: i2, selectedStyle: s2, onSelectStyle: d2, showNone: c2 = true, darkMode: m2, sx: p2, ...u2 } = e2, g2 = gt(d2, []), h2 = K((e3) => {
264
+ return z(So, { ...m2, selectedColor: o2, previewColor: y2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
265
+ e4.which === yt.Enter && (p2 ? n3() : t3());
266
+ }, onPreviewColorImmediate: R2, onPreviewColor: T2, onSelectColor: D2, onEyeDropStart: () => B2(true), onEyeDropStop: () => B2(false), compareRGB: u2, darkMode: g2 });
267
+ }, [o2, y2, p2, S2, m2?.autoColor, g2]), P2 = { onQuickClick: n2 ? M2 : void 0, createPopupPanel: E2, propsPopup: { propsPopper: { resizeOnOverflow: false } }, onPopupOpen: v2, onPopupClose: k2, tooltip: r2 || l2 || "Color", label: l2, icon: F2, ...h2 };
268
+ return c2 === Ne.Toolbar ? z(Be, { ref: t2, ...P2 }) : z(Ee, { ref: t2, ...P2 });
269
+ })), vo = 82, To = (e2) => {
270
+ const { styleColor: t2, length: o2 = vo, width: n2 = 1, dashArray: a2 = null, sx: r2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...d2 } = e2;
271
+ return z(ae, { sx: { width: `${o2}px`, height: `${n2}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (e3) => `${t2 ? t2.toRGBA(s2).toString() : e3.palette.text.icon ?? e3.palette.action.active}` }, "& .style_grey": { stroke: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, ...r2 }, height: n2, width: o2, viewBox: `0 0 ${o2} ${n2}`, ...d2, children: z(b, { length: o2, width: n2, dashArray: a2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
272
+ }, Ro = $(O((e2, t2) => {
273
+ const { variant: o2, showLabels: n2 = false, disabled: r2 = false, createPopupPanel: l2, styleColor: i2, selectedStyle: s2, onSelectStyle: d2, showNone: c2 = true, darkMode: m2, sx: p2, ...u2 } = e2, g2 = xt(d2, []), h2 = K((e3) => {
274
274
  const { popupContainer: t3, floatReference: o3, closeFloat: l3, ...d3 } = e3, p3 = [], u3 = a.BuiltInDefinitionsArray;
275
275
  for (let e4 = 0; e4 < u3.length; e4++) {
276
276
  const t4 = u3[e4];
277
277
  if ("None" === t4.description && !c2) continue;
278
- const a2 = z(Ro, { styleColor: i2, length: To, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
278
+ const a2 = z(To, { styleColor: i2, length: vo, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
279
279
  let d4 = null;
280
- d4 = n2 ? L(H, { children: [z(J, { sx: { marginRight: "6px" }, children: t4.description }), L(J, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [z("div", { style: { flex: "1 1 100%" } }), a2] })] }) : "None" === t4.description ? "None" : a2, p3.push(z(Ie, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ae(4) }, paddingLeft: "16px", background: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` }, tooltipProps: { description: n2 ? "" : t4.description }, icon: null, disabled: r2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
280
+ d4 = n2 ? L(H, { children: [z(Q, { sx: { marginRight: "6px" }, children: t4.description }), L(Q, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [z("div", { style: { flex: "1 1 100%" } }), a2] })] }) : "None" === t4.description ? "None" : a2, p3.push(z(Pe, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ie(4) }, paddingLeft: "16px", background: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})` }, propsTooltip: { description: n2 ? "" : t4.description }, icon: null, disabled: r2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
281
281
  l3(), g2(t4.style);
282
282
  }, onKeyDown: (e5) => {
283
- e5.which === ft.Enter && l3();
283
+ e5.which === yt.Enter && l3();
284
284
  }, selected: t4.style === s2, parentFloat: o3, children: d4 }, e4));
285
285
  }
286
- return z(J, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: p3 });
286
+ return z(Q, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: p3 });
287
287
  }, [r2, c2, i2, s2, m2]), f2 = V(() => {
288
288
  const e3 = a.BuiltInDefinitions.get(s2);
289
289
  let t3;
290
- return t3 = "None" === e3.description ? z(J, { sx: { minWidth: `${To}px` }, children: "None" }) : z(Ro, { styleColor: i2, length: To, width: e3.width, dashArray: e3.pattern, darkMode: m2, isDouble: e3.description.toLowerCase().includes("double"), isAngled: e3.description.toLowerCase().includes("slant") }), z(J, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Ae() } }, children: t3 });
291
- }, [s2, i2]), x2 = V(() => a.BuiltInDefinitions.get(s2), [s2]), b2 = { disabled: r2, icon: f2, tooltip: "Border Style: " + x2.description, sx: { background: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, ...p2 }, createPopupPanel: h2, ...u2 };
290
+ return t3 = "None" === e3.description ? z(Q, { sx: { minWidth: `${vo}px` }, children: "None" }) : z(To, { styleColor: i2, length: vo, width: e3.width, dashArray: e3.pattern, darkMode: m2, isDouble: e3.description.toLowerCase().includes("double"), isAngled: e3.description.toLowerCase().includes("slant") }), z(Q, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Ie() } }, children: t3 });
291
+ }, [s2, i2]), x2 = V(() => a.BuiltInDefinitions.get(s2), [s2]), b2 = { disabled: r2, icon: f2, tooltip: "Border Style: " + x2.description, sx: { background: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})`, ...p2 }, createPopupPanel: h2, ...u2 };
292
292
  return o2 === Ne.Toolbar ? z(Be, { ...b2 }) : z(Ee, { ...b2 });
293
293
  })), Do = $(O((t2, o2) => {
294
- const { autoColor: n2 = null, schemeLookup: r2, autoStrokeStyle: l2 = a.StrokeStyle.Thin, disabled: i2 = false, darkMode: s2 = false, showStylingBefore: d2 = true, onSelectBorder: c2, onPreviewBorder: m2, selectedBorder: p2, createTemporaryBorder: u2, ...g2 } = t2, h2 = gt(c2, [c2]), f2 = gt(m2, [m2]), [x2, b2] = _(), [w2, S2] = _(), k2 = x2 ?? l2, C2 = w2 ?? n2, v2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, T2 = gt((e2) => {
294
+ const { autoColor: n2 = null, schemeLookup: r2, autoStrokeStyle: l2 = a.StrokeStyle.Thin, disabled: i2 = false, darkMode: s2 = false, showStylingBefore: d2 = true, onSelectBorder: c2, onPreviewBorder: m2, selectedBorder: p2, createTemporaryBorder: u2, ...g2 } = t2, h2 = xt(c2, [c2]), f2 = xt(m2, [m2]), [x2, b2] = j(), [w2, S2] = j(), C2 = x2 ?? l2, k2 = w2 ?? n2, v2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, T2 = xt((e2) => {
295
295
  const t3 = {}, o3 = e2 ? Object.keys(e2) : [];
296
296
  let n3 = false;
297
297
  const r3 = o3.length;
@@ -302,12 +302,12 @@ const ro = $(O((e2, t2) => {
302
302
  o3.length < 6 && (n3 = true);
303
303
  const l3 = n3 ? t3.left : null, i3 = n3 ? t3.top : null, d3 = n3 ? t3.right : null, c3 = n3 ? t3.bottom : null, m3 = n3 ? t3.vertical : null, p3 = n3 ? t3.horizontal : null;
304
304
  let g3 = "";
305
- return i3 || l3 || (g3 += "M 3,5 H 5 V 3 H 3 "), i3 || (g3 += "M 7,5 H 9 V 3 H 7 "), i3 || m3 || (g3 += "M 11,5 h 2 V 3 h -2 "), i3 || (g3 += "M 15,5 h 2 V 3 h -2 "), i3 || d3 || (g3 += "M 19,5 h 2 V 3 h -2 "), l3 || (g3 += "M 3,9 H 5 V 7 H 3 "), m3 || (g3 += "M 11,9 h 2 V 7 h -2 "), d3 || (g3 += "M 19,9 h 2 V 7 h -2 "), p3 || l3 || (g3 += "M 3,13 H 5 V 11 H 3 "), p3 || (g3 += "M 7,13 H 9 V 11 H 7 "), p3 || m3 || (g3 += "M 11,13 h 2 v -2 h -2 "), p3 || d3 || (g3 += "M 19,13 h 2 v -2 h -2 "), p3 || (g3 += "M 15,13 h 2 v -2 h -2 "), l3 || (g3 += "M 3,17 H 5 V 15 H 3 "), m3 || (g3 += "M 11,17 h 2 v -2 h -2 "), d3 || (g3 += "M 19,17 h 2 v -2 h -2 "), c3 || l3 || (g3 += "M 3,21 H 5 V 19 H 3 "), c3 || (g3 += "M 7,21 H 9 V 19 H 7 "), c3 || m3 || (g3 += "M 11,21 h 2 v -2 h -2 "), c3 || (g3 += "M 15,21 h 2 v -2 h -2 "), c3 || d3 || (g3 += "M 19,21 h 2 v -2 h -2 "), L(xt, { children: [" ", L(J, { 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: [z("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: z("path", { className: "fill", d: g3 }) }), z(J, { 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: Le } }, children: z(y, { getBorderAt: (e3, n4) => {
305
+ return i3 || l3 || (g3 += "M 3,5 H 5 V 3 H 3 "), i3 || (g3 += "M 7,5 H 9 V 3 H 7 "), i3 || m3 || (g3 += "M 11,5 h 2 V 3 h -2 "), i3 || (g3 += "M 15,5 h 2 V 3 h -2 "), i3 || d3 || (g3 += "M 19,5 h 2 V 3 h -2 "), l3 || (g3 += "M 3,9 H 5 V 7 H 3 "), m3 || (g3 += "M 11,9 h 2 V 7 h -2 "), d3 || (g3 += "M 19,9 h 2 V 7 h -2 "), p3 || l3 || (g3 += "M 3,13 H 5 V 11 H 3 "), p3 || (g3 += "M 7,13 H 9 V 11 H 7 "), p3 || m3 || (g3 += "M 11,13 h 2 v -2 h -2 "), p3 || d3 || (g3 += "M 19,13 h 2 v -2 h -2 "), p3 || (g3 += "M 15,13 h 2 v -2 h -2 "), l3 || (g3 += "M 3,17 H 5 V 15 H 3 "), m3 || (g3 += "M 11,17 h 2 v -2 h -2 "), d3 || (g3 += "M 19,17 h 2 v -2 h -2 "), c3 || l3 || (g3 += "M 3,21 H 5 V 19 H 3 "), c3 || (g3 += "M 7,21 H 9 V 19 H 7 "), c3 || m3 || (g3 += "M 11,21 h 2 v -2 h -2 "), c3 || (g3 += "M 15,21 h 2 v -2 h -2 "), c3 || d3 || (g3 += "M 19,21 h 2 v -2 h -2 "), L(wt, { children: [" ", L(Q, { 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: [z("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: z("path", { className: "fill", d: g3 }) }), z(Q, { 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: Ae } }, children: z(y, { getBorderAt: (e3, n4) => {
306
306
  if (!u2 || 0 === o3.length) return null;
307
307
  const a2 = e3.rowIndex, r4 = e3.colIndex, l4 = {};
308
308
  return 0 === a2 ? (l4.top = t3.top, l4.bottom = t3.horizontal) : (l4.top = t3.horizontal, l4.bottom = t3.bottom), 0 === r4 ? (l4.left = t3.left, l4.right = t3.vertical) : (l4.left = t3.vertical, l4.right = t3.right), u2?.(l4);
309
309
  }, darkMode: s2, style: { top: "2px", left: "2px", width: "calc(100% - 5px)", height: "calc(100% - 5px)", position: "absolute" } }) })] })] });
310
- }, [C2, k2, s2]), R2 = K((e2, t3, o3) => {
310
+ }, [k2, C2, s2]), R2 = K((e2, t3, o3) => {
311
311
  let n3 = null;
312
312
  if (e2 && e2.length > 0) {
313
313
  let a2 = null;
@@ -316,74 +316,74 @@ const ro = $(O((e2, t2) => {
316
316
  for (let t4 = 0; t4 < r3; t4++) n3[e2[t4]] = a2;
317
317
  }
318
318
  return n3;
319
- }, []), P2 = K((e2) => {
320
- h2?.(e2);
321
319
  }, []), D2 = K((e2) => {
320
+ h2?.(e2);
321
+ }, []), F2 = K((e2) => {
322
322
  f2?.(e2);
323
- }, []), F2 = K((t3) => {
323
+ }, []), M2 = K((t3) => {
324
324
  const { closeFloatAll: o3, floatReference: l3 } = t3, c3 = (e2, t4, n3 = "bottom", r3 = false) => {
325
- const l4 = R2(e2, C2 ?? null, r3 ? a.StrokeStyle.None : k2 ?? null), i3 = r3 ? R2([], C2 ?? null, k2 ?? null) : l4;
326
- return z(ze, { icon: T2(i3), sx: { background: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` }, tooltipProps: { label: t4, simple: true, placement: n3 }, onClick: () => {
327
- o3(), D2(l4), P2(l4);
325
+ const l4 = R2(e2, k2 ?? null, r3 ? a.StrokeStyle.None : C2 ?? null), i3 = r3 ? R2([], k2 ?? null, C2 ?? null) : l4;
326
+ return z(He, { icon: T2(i3), sx: { background: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})` }, propsTooltip: { label: t4, simple: true, placement: n3 }, onClick: () => {
327
+ o3(), F2(l4), D2(l4);
328
328
  } });
329
- }, m3 = L(H, { children: [L(J, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical], "All Borders", "top"), c3([a.Edge.Horizontal, a.Edge.Vertical], "Inner Borders", "top"), c3([a.Edge.Horizontal], "Inside Horizontal Borders", "top"), c3([a.Edge.Vertical], "Inside Vertical Borders", "top"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom], "Outside Borders", "top")] }), L(J, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left], "Left Borders"), c3([a.Edge.Top], "Top Borders"), c3([a.Edge.Right], "Right Borders"), c3([a.Edge.Bottom], "Bottom Borders"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical, a.Edge.DiagonalUp, a.Edge.DiagonalDown], "No Borders", "bottom", true)] })] }), p3 = z(H, { children: L(J, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [z(vo, { variant: Ne.Toolbar, icon: z(xt, { iconKey: "stroke.colored" }), selectedColor: k2 === a.StrokeStyle.None ? new e("transparent") : C2, onPreviewColor: (e2) => {
329
+ }, m3 = L(H, { children: [L(Q, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical], "All Borders", "top"), c3([a.Edge.Horizontal, a.Edge.Vertical], "Inner Borders", "top"), c3([a.Edge.Horizontal], "Inside Horizontal Borders", "top"), c3([a.Edge.Vertical], "Inside Vertical Borders", "top"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom], "Outside Borders", "top")] }), L(Q, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left], "Left Borders"), c3([a.Edge.Top], "Top Borders"), c3([a.Edge.Right], "Right Borders"), c3([a.Edge.Bottom], "Bottom Borders"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical, a.Edge.DiagonalUp, a.Edge.DiagonalDown], "No Borders", "bottom", true)] })] }), p3 = z(H, { children: L(Q, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [z(ko, { variant: Ne.Toolbar, icon: z(wt, { iconKey: "stroke.colored" }), selectedColor: C2 === a.StrokeStyle.None ? new e("transparent") : k2, onPreviewColor: (e2) => {
330
330
  S2(e2);
331
331
  }, onSelectColor: (e2, t4) => {
332
332
  S2(e2);
333
- }, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || k2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), z(Po, { selectedStyle: k2, onSelectStyle: b2, styleColor: C2, darkMode: s2, variant: Ne.Toolbar, parentFloat: l3 })] }) });
334
- return L(J, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [d2 ? p3 : m3, z(Te, { orientation: "horizontal" }), d2 ? m3 : p3] });
335
- }, [k2, C2, n2, r2, s2]), M2 = V(() => T2(v2), [v2, s2]);
336
- return z(Be, { ref: o2, createPopupPanel: F2, popupProps: { popperProps: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => z(He, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
333
+ }, darkMode: s2, tooltip: "Border Color", propsPanel: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || C2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), z(Ro, { selectedStyle: C2, onSelectStyle: b2, styleColor: k2, darkMode: s2, variant: Ne.Toolbar, parentFloat: l3 })] }) });
334
+ return L(Q, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [d2 ? p3 : m3, z(ve, { orientation: "horizontal" }), d2 ? m3 : p3] });
335
+ }, [C2, k2, n2, r2, s2]), N2 = V(() => T2(v2), [v2, s2]);
336
+ return z(Be, { ref: o2, createPopupPanel: M2, propsPopup: { propsPopper: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => z(Le, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
337
337
  h2?.(v2);
338
- }, quickButtonProps: { sx: {} }, disabled: i2, icon: M2, ...g2 });
338
+ }, disabled: i2, icon: N2, ...g2 });
339
339
  })), Fo = $(O((e2, t2) => {
340
- const { commands: o2, command: n2, commandHook: a2, variant: r2 = ut.Toolbar, disabled: l2 = false, autoColor: i2, autoStrokeStyle: s2, schemeLookup: d2, createTemporaryBorder: c2, selectedBorder: m2, onSelectBorder: p2, darkMode: u2, icon: g2, label: h2, ...f2 } = e2, x2 = pt(o2, ["formatBorder"]), b2 = n2 ?? x2[0], y2 = b2?.context() ?? null, w2 = y2?.autoColor ?? i2, S2 = y2?.autoStyle ?? s2, k2 = m2 ?? y2?.quickBorder, C2 = u2 ?? y2?.darkMode, v2 = c2 ?? y2?.createTemporaryBorder, T2 = d2 ?? y2?.schemeLookup, R2 = gt((e3) => {
340
+ const { commands: o2, command: n2, commandHook: a2, variant: r2 = ft.Toolbar, disabled: l2 = false, autoColor: i2, autoStrokeStyle: s2, schemeLookup: d2, createTemporaryBorder: c2, selectedBorder: m2, onSelectBorder: p2, darkMode: u2, icon: g2, label: h2, ...f2 } = e2, x2 = ht(o2, ["formatBorder"]), b2 = n2 ?? x2[0], y2 = b2?.context() ?? null, w2 = y2?.autoColor ?? i2, S2 = y2?.autoStyle ?? s2, C2 = m2 ?? y2?.quickBorder, k2 = u2 ?? y2?.darkMode, v2 = c2 ?? y2?.createTemporaryBorder, T2 = d2 ?? y2?.schemeLookup, R2 = xt((e3) => {
341
341
  y2?.onBorderSelect && y2.onBorderSelect(e3), p2?.(e3), b2?.execute(e3, a2);
342
- }, [b2, p2, a2]), P2 = K((e3, t3) => {
342
+ }, [b2, p2, a2]), D2 = K((e3, t3) => {
343
343
  const { children: o3, title: n3, ...a3 } = e3;
344
344
  let i3 = e3.children;
345
- return (b2?.disabled() || l2) && (i3 = z("div", { children: i3 })), z(We, { command: b2, placement: r2 === ut.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...a3, children: i3 });
345
+ return (b2?.disabled() || l2) && (i3 = z("div", { children: i3 })), z(ze, { command: b2, placement: r2 === ft.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...a3, children: i3 });
346
346
  }, [b2, l2]);
347
- return z(Do, { ref: t2, autoColor: w2, darkMode: C2, autoStrokeStyle: S2, createTemporaryBorder: v2, schemeLookup: T2, selectedBorder: k2, onSelectBorder: R2, createTooltip: P2, disabled: l2 || !b2 || b2.disabled(), ...f2 });
347
+ return z(Do, { ref: t2, autoColor: w2, darkMode: k2, autoStrokeStyle: S2, createTemporaryBorder: v2, schemeLookup: T2, selectedBorder: C2, onSelectBorder: R2, createTooltip: D2, disabled: l2 || !b2 || b2.disabled(), ...f2 });
348
348
  })), Mo = $(O((e2, t2) => {
349
349
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
350
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("mergeToggle") }), z(ve, { ...o3, command: t3.getCommand("mergeHorizontal") }), z(ve, { ...o3, command: t3.getCommand("mergeVertical") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("unmerge") })] });
351
- return Re({ ...e3, children: l3 });
350
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("mergeToggle") }), z(ke, { ...o3, command: t3.getCommand("mergeHorizontal") }), z(ke, { ...o3, command: t3.getCommand("mergeVertical") }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("unmerge") })] });
351
+ return Te({ ...e3, children: l3 });
352
352
  }, [r2, n2, a2]);
353
- return z(Pe, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: "MergeAll", ...l2 });
353
+ return z(Re, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: "MergeAll", ...l2 });
354
354
  })), No = $(O((e2, t2) => {
355
355
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
356
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("freezeToggle") }), z(ve, { ...o3, command: t3.getCommand("freezeToggleHorizontal") }), z(ve, { ...o3, command: t3.getCommand("freezeToggleVertical") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("unfreeze") })] });
357
- return Re({ ...e3, children: l3 });
356
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("freezeToggle") }), z(ke, { ...o3, command: t3.getCommand("freezeToggleHorizontal") }), z(ke, { ...o3, command: t3.getCommand("freezeToggleVertical") }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("unfreeze") })] });
357
+ return Te({ ...e3, children: l3 });
358
358
  }, [r2, n2, a2]);
359
- return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: i2, 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", ...l2 });
360
- })), Bo = $(O((e2, t2) => z($e, { ref: t2, ...e2, popupCommandKeys: ["find", "findReplace", "goto"], scope: "find", label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find" }))), Eo = $(O((e2, t2) => {
359
+ return z(Re, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: i2, 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", ...l2 });
360
+ })), Bo = $(O((e2, t2) => z(We, { ref: t2, ...e2, popupCommandKeys: ["find", "findReplace", "goto"], scope: "find", label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find" }))), Eo = $(O((e2, t2) => {
361
361
  const { command: o2, commandHook: n2, showQuickButtons: a2 = !!e2.commands, commands: i2, fontSizes: s2 = r.DefaultFontSizes, disabled: d2 = false, parentFloat: c2, icon: m2, label: p2, sx: u2, ...g2 } = e2;
362
- bt(o2);
363
- const h2 = () => o2?.state()?.toString() || "11", [f2, x2] = _(h2), b2 = gt(() => {
362
+ St(o2);
363
+ const h2 = () => o2?.state()?.toString() || "11", [f2, x2] = j(h2), b2 = xt(() => {
364
364
  const e3 = parseFloat(f2);
365
365
  isNaN(e3) ? x2(h2()) : parseFloat(h2()) !== e3 && o2.execute(e3, n2);
366
366
  }, [h2, o2, f2, n2]);
367
- U(() => {
367
+ _(() => {
368
368
  x2(h2());
369
369
  }, [o2?.state()]);
370
370
  const y2 = V(() => {
371
371
  if (!n2) return null;
372
372
  const e3 = { ...n2 };
373
373
  return delete e3.beforeExecute, e3;
374
- }, [n2]), w2 = pt(i2, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), S2 = V(() => w2 ? L(J, { className: mt("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e3) => e3.stopPropagation(), children: [z(ve, { command: w2[0], commandHook: y2 }), z(ve, { command: w2[1], commandHook: y2 })] }) : null, [w2]), k2 = zt(), C2 = V(() => `${l.getSharedMeasurer()("12.3", Math.round(k2.typography.fontSize), k2.typography.fontFamily).width}px`, [k2]), v2 = K((e3) => {
374
+ }, [n2]), w2 = ht(i2, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), S2 = V(() => w2 ? L(Q, { className: gt("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e3) => e3.stopPropagation(), children: [z(ke, { command: w2[0], commandHook: y2 }), z(ke, { command: w2[1], commandHook: y2 })] }) : null, [w2]), C2 = ct(), k2 = V(() => `${l.getSharedMeasurer()("12.3", Math.round(C2.typography.fontSize), C2.typography.fontFamily).width}px`, [C2]), v2 = K((e3) => {
375
375
  const { onMouseDown: t3, onMouseUp: n3, ...a3 } = e3;
376
- return z(te, { component: "div", ...a3, disableRipple: true, children: z(le, { inputMode: "numeric", disabled: d2 || !o2 || o2.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: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.error.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (e4) => `${Math.round(e4.typography.fontSize)}px`, width: C2, color: (e4) => e4.palette.text.secondary, input: { padding: "0 0", textAlign: "center", height: "1rem", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" } }, value: f2, onFocus: (e4) => {
376
+ return z(ee, { component: "div", ...a3, disableRipple: true, children: z(re, { inputMode: "numeric", disabled: d2 || !o2 || o2.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: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.error.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (e4) => `${Math.round(e4.typography.fontSize)}px`, width: k2, color: (e4) => e4.palette.text.secondary, input: { padding: "0 0", textAlign: "center", height: "1rem", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" } }, value: f2, onFocus: (e4) => {
377
377
  e4.target?.select();
378
378
  }, onKeyDown: (e4) => {
379
- if (e4.which === ft.Enter) h2() !== f2 && (e4.stopPropagation(), e4.preventDefault(), b2());
380
- else if (e4.which === ft.Escape) h2() !== f2 && (x2(h2()), setTimeout(() => {
379
+ if (e4.which === yt.Enter) h2() !== f2 && (e4.stopPropagation(), e4.preventDefault(), b2());
380
+ else if (e4.which === yt.Escape) h2() !== f2 && (x2(h2()), setTimeout(() => {
381
381
  e4.target?.select();
382
382
  }, 0), e4.stopPropagation(), e4.preventDefault());
383
383
  else {
384
384
  if (e4.key.match("[-]")) return e4.stopPropagation(), void e4.preventDefault();
385
385
  if (e4.key.match("[0-9.]") && (f2 + e4.key).length > 4) return e4.stopPropagation(), void e4.preventDefault();
386
- if (e4.which === ft.Space) return void e4.preventDefault();
386
+ if (e4.which === yt.Space) return void e4.preventDefault();
387
387
  }
388
388
  }, onBlur: () => {
389
389
  b2();
@@ -397,29 +397,29 @@ const ro = $(O((e2, t2) => {
397
397
  }, a3 = o2?.state(), r2 = [];
398
398
  for (let e4 = 0; e4 < s2.length; e4++) {
399
399
  const n3 = s2[e4] === a3;
400
- r2.push(z(Ie, { selected: n3, icon: n3 ? z(Oe, {}) : void 0, disabled: d2 || !o2 || o2.disabled(), onMouseDown: (e5) => {
400
+ r2.push(z(Pe, { selected: n3, icon: n3 ? z($e, {}) : void 0, disabled: d2 || !o2 || o2.disabled(), onMouseDown: (e5) => {
401
401
  0 === e5.button && e5.preventDefault();
402
402
  }, onMouseUp: (o3) => {
403
403
  0 === o3.button && t3(s2[e4]);
404
404
  }, onKeyDown: (o3) => {
405
- o3.keyCode !== ft.Enter && o3.keyCode !== ft.Space || t3(s2[e4]);
406
- }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: z(J, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: s2[e4] }) }, "fontSize-" + e4));
405
+ o3.keyCode !== yt.Enter && o3.keyCode !== yt.Space || t3(s2[e4]);
406
+ }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: z(Q, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: s2[e4] }) }, "fontSize-" + e4));
407
407
  }
408
- const l2 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g2, children: [S2, z(Te, { orientation: "horizontal" }), z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 })] });
409
- return Re({ ...e3, children: l2 });
408
+ const l2 = L(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g2, children: [S2, z(ve, { orientation: "horizontal" }), z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 })] });
409
+ return Te({ ...e3, children: l2 });
410
410
  }, [d2, o2?.state(), n2]);
411
- return z(Be, { ref: t2, sx: { ...u2 }, tabIndex: -1, outlined: true, disabled: d2, parentFloat: c2, createPopupPanel: T2, createTooltip: ({ children: e3 }, t3) => z(He, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: v2, ...g2 });
412
- })), Io = $((e2) => {
411
+ return z(Be, { ref: t2, sx: { ...u2 }, tabIndex: -1, outlined: true, disabled: d2, parentFloat: c2, createPopupPanel: T2, createTooltip: ({ children: e3 }, t3) => z(Le, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), renderQuickButton: v2, ...g2 });
412
+ })), Po = $((e2) => {
413
413
  const { selected: t2, disabled: o2, formattedValue: n2, handleSetFormat: a2, format: r2, sx: l2, ...s2 } = e2;
414
- return z(Ie, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...l2 }, disabled: o2, selected: t2, icon: t2 ? z(Oe, {}) : void 0, onMouseDown: (e3) => {
414
+ return z(Pe, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...l2 }, disabled: o2, selected: t2, icon: t2 ? z($e, {}) : void 0, onMouseDown: (e3) => {
415
415
  0 === e3.button && e3.preventDefault();
416
416
  }, onMouseUp: (e3) => {
417
417
  0 === e3.button && a2(r2.numberFormat);
418
418
  }, onKeyDown: (e3) => {
419
- e3.keyCode !== ft.Enter && e3.keyCode !== ft.Space || a2(r2.numberFormat);
420
- }, ...s2, children: L(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [L(ee, { component: "div", children: [r2.formatType, r2.formatType === i.Type.Custom ? "…" : ""] }), z(ee, { variant: "caption", component: "div", sx: { color: (e3) => Vt(e3.palette.text.primary, 0.6), paddingTop: n2 && n2.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: n2 && n2.length > 0 ? n2 : " " })] }) });
421
- }), Ao = $(O((e2, t2) => {
422
- const { commands: o2, commandHook: n2, scope: a2, sx: r2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = pt(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? i.Styles.lookupStyle(m2?.state()).formatType : i.Type.General, u2 = V(() => {
419
+ e3.keyCode !== yt.Enter && e3.keyCode !== yt.Space || a2(r2.numberFormat);
420
+ }, ...s2, children: L(Q, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [L(J, { component: "div", children: [r2.formatType, r2.formatType === i.Type.Custom ? "…" : ""] }), z(J, { variant: "caption", component: "div", sx: { color: (e3) => Kt(e3.palette.text.primary, 0.6), paddingTop: n2 && n2.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: n2 && n2.length > 0 ? n2 : " " })] }) });
421
+ }), Io = $(O((e2, t2) => {
422
+ const { commands: o2, commandHook: n2, scope: a2, sx: r2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = ht(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? i.Styles.lookupStyle(m2?.state()).formatType : i.Type.General, u2 = V(() => {
423
423
  if (!n2) return null;
424
424
  const e3 = { ...n2 };
425
425
  return delete e3.beforeExecute, e3;
@@ -436,57 +436,57 @@ const ro = $(O((e2, t2) => {
436
436
  }
437
437
  "" === t4 && l2[e4].formatType === i.Type.General && (t4 = "No specific format");
438
438
  const n3 = l2[e4].formatType === p2;
439
- d3.push(z(Io, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: l2[e4] }, l2[e4].formatType));
439
+ d3.push(z(Po, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: l2[e4] }, l2[e4].formatType));
440
440
  }
441
- const g3 = { numberFormat: "", formatType: i.Type.Custom }, h3 = p2 === i.Type.Custom, f3 = z(Io, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? r3.getNumberFormat().displayText : "", handleSetFormat: () => {
441
+ const g3 = { numberFormat: "", formatType: i.Type.Custom }, h3 = p2 === i.Type.Custom, f3 = z(Po, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? r3.getNumberFormat().displayText : "", handleSetFormat: () => {
442
442
  n2?.beforeExecute?.(m2, m2?.state()), t3.getCommand("formatNumberDialog")?.execute(m2?.state()), n2?.onExecute?.(m2, m2?.state());
443
- }, format: g3, sx: { flex: "0", width: "100%" } }, i.Type.Custom), x2 = L(J, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [z(ve, { command: t3.getCommand("formatNumberFormatAccountingStyle"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: a2 })] }), b2 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...c2, children: [x2, z(Te, { orientation: "horizontal" }), z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(Te, { orientation: "horizontal" }), f3] });
444
- return Re({ ...e3, children: b2 });
445
- }, [m2?.context(), m2?.state(), n2, a2]), h2 = zt(), f2 = V(() => {
443
+ }, format: g3, sx: { flex: "0", width: "100%" } }, i.Type.Custom), x2 = L(Q, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [z(ke, { command: t3.getCommand("formatNumberFormatAccountingStyle"), commandHook: u2, scope: a2 }), z(ke, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: a2 }), z(ke, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: a2 }), z(ke, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: a2 }), z(ke, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: a2 })] }), b2 = L(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...c2, children: [x2, z(ve, { orientation: "horizontal" }), z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(ve, { orientation: "horizontal" }), f3] });
444
+ return Te({ ...e3, children: b2 });
445
+ }, [m2?.context(), m2?.state(), n2, a2]), h2 = ct(), f2 = V(() => {
446
446
  const e3 = i.Type.MediumTime;
447
447
  return `${l.getSharedMeasurer()(e3, Math.round(h2.typography.fontSize), h2.typography.fontFamily).width}px`;
448
448
  }, [h2]);
449
- return z(Pe, { ref: t2, commands: o2, sx: r2, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => z(He, { label: m2?.label(), description: m2?.description(), disabled: t3, children: e3 }), icon: z(J, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, color: (e3) => e3.palette.text.secondary, fontFamily: (e3) => e3.typography.fontFamily, width: f2 }, children: z(J, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: p2 }) }), ...c2 });
450
- })), Lo = $(O((e2, t2) => z($e, { ref: t2, ...e2, 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" }))), Ho = $(O((e2, t2) => z($e, { ref: t2, ...e2, popupCommandKeys: ["fillDown", "fillRight", "fillUp", "fillLeft"], scope: "fill", label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", icon: "FillDown" }))), zo = $(O((e2, t2) => {
451
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = ut.Toolbar, ...c2 } = e2, m2 = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns", "addSheet"];
449
+ return z(Re, { ref: t2, commands: o2, sx: r2, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => z(Le, { label: m2?.label(), description: m2?.description(), disabled: t3, children: e3 }), icon: z(Q, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, color: (e3) => e3.palette.text.secondary, fontFamily: (e3) => e3.typography.fontFamily, width: f2 }, children: z(Q, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: p2 }) }), ...c2 });
450
+ })), Ao = $(O((e2, t2) => z(We, { ref: t2, ...e2, 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" }))), Lo = $(O((e2, t2) => z(We, { ref: t2, ...e2, popupCommandKeys: ["fillDown", "fillRight", "fillUp", "fillLeft"], scope: "fill", label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", icon: "FillDown" }))), Ho = $(O((e2, t2) => {
451
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = ft.Toolbar, ...c2 } = e2, m2 = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns", "addSheet"];
452
452
  l2 || m2.push("addSheet");
453
- const p2 = pt(o2, m2), { singleCommand: u2, allDisabled: g2 } = V(() => {
453
+ const p2 = ht(o2, m2), { singleCommand: u2, allDisabled: g2 } = V(() => {
454
454
  let e3 = null, t3 = 0;
455
455
  const o3 = p2.length;
456
456
  for (let n3 = 0; n3 < o3; n3++) {
457
457
  const o4 = p2[n3];
458
- o4 && !o4.disabled() && (i2 && d2 === ut.Menuitem && (e3 = 0 === t3 ? o4 : null), t3++);
458
+ o4 && !o4.disabled() && (i2 && d2 === ft.Menuitem && (e3 = 0 === t3 ? o4 : null), t3++);
459
459
  }
460
460
  return { singleCommand: e3, allDisabled: 0 === t3 };
461
461
  }, [p2]), h2 = K((e3, t3) => {
462
462
  let o3 = null;
463
- const a3 = { variant: ut.Menuitem, commandHook: n2, scope: "insertCells", disabled: r2 };
464
- l2 || (o3 = L(H, { children: [z(Te, { orientation: "horizontal" }), z(ve, { ...a3, command: t3.getCommand("addSheet") })] }));
465
- const i3 = L(H, { children: [z(ve, { ...a3, command: p2[0] }), z(ve, { ...a3, command: p2[1] }), z(Te, { orientation: "horizontal" }), z(ve, { ...a3, command: p2[2] }), z(ve, { ...a3, command: p2[3] }), o3] });
466
- return Re({ ...e3, children: i3 });
463
+ const a3 = { variant: ft.Menuitem, commandHook: n2, scope: "insertCells", disabled: r2 };
464
+ l2 || (o3 = L(H, { children: [z(ve, { orientation: "horizontal" }), z(ke, { ...a3, command: t3.getCommand("addSheet") })] }));
465
+ const i3 = L(H, { children: [z(ke, { ...a3, command: p2[0] }), z(ke, { ...a3, command: p2[1] }), z(ve, { orientation: "horizontal" }), z(ke, { ...a3, command: p2[2] }), z(ke, { ...a3, command: p2[3] }), o3] });
466
+ return Te({ ...e3, children: i3 });
467
467
  }, [r2, p2, n2, a2]);
468
- return u2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, ...c2 }) : z(Pe, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || g2, tooltip: L(H, { children: [z("span", { children: "Insert new cells, rows or columns to your workbook." }), z("br", {}), z("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: h2, ...c2 });
469
- })), Wo = $(O((e2, t2) => {
470
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = ut.Toolbar, ...c2 } = e2, m2 = ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"];
468
+ return u2 ? z(ke, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, ...c2 }) : z(Re, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || g2, tooltip: L(H, { children: [z("span", { children: "Insert new cells, rows or columns to your workbook." }), z("br", {}), z("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: h2, ...c2 });
469
+ })), zo = $(O((e2, t2) => {
470
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = ft.Toolbar, ...c2 } = e2, m2 = ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"];
471
471
  l2 || m2.push("deleteSheet");
472
- const p2 = pt(o2, m2), { singleCommand: u2, allDisabled: g2 } = V(() => {
472
+ const p2 = ht(o2, m2), { singleCommand: u2, allDisabled: g2 } = V(() => {
473
473
  let e3 = null, t3 = 0;
474
474
  const o3 = p2.length;
475
475
  for (let n3 = 0; n3 < o3; n3++) {
476
476
  const o4 = p2[n3];
477
- o4 && !o4.disabled() && (i2 && d2 === ut.Menuitem && (e3 = 0 === t3 ? o4 : null), t3++);
477
+ o4 && !o4.disabled() && (i2 && d2 === ft.Menuitem && (e3 = 0 === t3 ? o4 : null), t3++);
478
478
  }
479
479
  return { singleCommand: e3, allDisabled: 0 === t3 };
480
480
  }, [p2]), h2 = K((e3, t3) => {
481
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "deleteCells", disabled: r2 };
481
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: "deleteCells", disabled: r2 };
482
482
  let a3 = null;
483
- l2 || (a3 = L(H, { children: [z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("deleteSheet") })] }));
484
- const i3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("deleteCellsShiftUp") }), z(ve, { ...o3, command: t3.getCommand("deleteCellsShiftLeft") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("deleteRows") }), z(ve, { ...o3, command: t3.getCommand("deleteColumns") }), a3] });
485
- return Re({ ...e3, children: i3 });
483
+ l2 || (a3 = L(H, { children: [z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("deleteSheet") })] }));
484
+ const i3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("deleteCellsShiftUp") }), z(ke, { ...o3, command: t3.getCommand("deleteCellsShiftLeft") }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("deleteRows") }), z(ke, { ...o3, command: t3.getCommand("deleteColumns") }), a3] });
485
+ return Te({ ...e3, children: i3 });
486
486
  }, [r2, n2, a2]);
487
- return u2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, ...c2 }) : z(Pe, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || g2, tooltip: L(H, { children: [z("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), z("br", {}), z("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: h2, ...c2 });
488
- })), $o = $(O((e2, t2) => {
489
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["resizeRows", "autoFitRows", "resizeColumns", "autoFitColumns", "hideColumns", "hideRows", "unhideColumns", "unhideRows"]), { allDisabled: s2 } = V(() => {
487
+ return u2 ? z(ke, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, ...c2 }) : z(Re, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || g2, tooltip: L(H, { children: [z("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), z("br", {}), z("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: h2, ...c2 });
488
+ })), Wo = $(O((e2, t2) => {
489
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ht(o2, ["resizeRows", "autoFitRows", "resizeColumns", "autoFitColumns", "hideColumns", "hideRows", "unhideColumns", "unhideRows"]), { allDisabled: s2 } = V(() => {
490
490
  let e3 = 0;
491
491
  const t3 = i2.length;
492
492
  for (let o3 = 0; o3 < t3; o3++) {
@@ -495,116 +495,116 @@ const ro = $(O((e2, t2) => {
495
495
  }
496
496
  return { allDisabled: 0 === e3 };
497
497
  }, [i2]), d2 = K((e3, o3) => {
498
- const a3 = { variant: ut.Menuitem, commandHook: n2, scope: "formatCells" }, r3 = { commands: o3, parentFloat: e3.floatReference, ...a3 }, l3 = L(H, { children: [z(ve, { ...a3, command: o3.getCommand("resizeRows") }), z(ve, { ...a3, command: o3.getCommand("autoFitRows") }), z(Te, { orientation: "horizontal" }), z(ve, { ...a3, command: o3.getCommand("resizeColumns") }), z(ve, { ...a3, command: o3.getCommand("autoFitColumns") }), z(Te, { orientation: "horizontal" }), z($e, { ref: t2, ...r3, popupCommandKeys: ["hideColumns", "hideRows", null, "unhideColumns", "unhideRows"], popupScope: "hideUnhide", label: "Hide & Unhide" })] });
499
- return Re({ ...e3, children: l3 });
498
+ const a3 = { variant: ft.Menuitem, commandHook: n2, scope: "formatCells" }, r3 = { commands: o3, parentFloat: e3.floatReference, ...a3 }, l3 = L(H, { children: [z(ke, { ...a3, command: o3.getCommand("resizeRows") }), z(ke, { ...a3, command: o3.getCommand("autoFitRows") }), z(ve, { orientation: "horizontal" }), z(ke, { ...a3, command: o3.getCommand("resizeColumns") }), z(ke, { ...a3, command: o3.getCommand("autoFitColumns") }), z(ve, { orientation: "horizontal" }), z(We, { ref: t2, ...r3, popupCommandKeys: ["hideColumns", "hideRows", null, "unhideColumns", "unhideRows"], popupScope: "hideUnhide", label: "Hide & Unhide" })] });
499
+ return Te({ ...e3, children: l3 });
500
500
  }, [n2, a2]);
501
- return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: d2, disabled: r2 || s2, icon: "CellsFormat", label: "Format Cells", tooltip: "Change row and column sizes or visibility.", ...l2 });
501
+ return z(Re, { ref: t2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: d2, disabled: r2 || s2, icon: "CellsFormat", label: "Format Cells", tooltip: "Change row and column sizes or visibility.", ...l2 });
502
502
  }));
503
- $o.displayName = "CellsFormatCommandButton";
504
- const Oo = $(O((t2, o2) => {
505
- const { command: n2, commandHook: a2, onSelectColor: r2, disabled: l2 = false, variant: i2 = ut.Toolbar, quickColor: s2, panelProps: d2, isSplit: c2 = false, darkMode: m2, icon: p2, ...u2 } = t2, { autoColor: g2, schemeLookup: h2, recentColors: f2, ...x2 } = d2;
503
+ Wo.displayName = "CellsFormatCommandButton";
504
+ const $o = $(O((t2, o2) => {
505
+ const { command: n2, commandHook: a2, onSelectColor: r2, disabled: l2 = false, variant: i2 = ft.Toolbar, quickColor: s2, propsPanel: d2, isSplit: c2 = false, darkMode: m2, icon: p2, ...u2 } = t2, { autoColor: g2, schemeLookup: h2, recentColors: f2, ...x2 } = d2;
506
506
  if (u2.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
507
- bt(n2);
507
+ St(n2);
508
508
  const b2 = n2?.context();
509
509
  let y2 = s2 ?? b2?.quickColor;
510
510
  c2 && !y2 && (y2 = new e("transparent"));
511
- const w2 = g2 ?? b2?.autoColor, S2 = h2 ?? b2?.schemeLookup, k2 = f2 ?? b2?.recentColors, C2 = m2 ?? b2?.darkMode, v2 = V(() => ({ autoColor: w2, schemeLookup: S2, recentColors: k2, darkMode: C2, ...x2 }), [w2, S2, k2, C2]), T2 = gt((e2, t3) => {
511
+ const w2 = g2 ?? b2?.autoColor, S2 = h2 ?? b2?.schemeLookup, C2 = f2 ?? b2?.recentColors, k2 = m2 ?? b2?.darkMode, v2 = V(() => ({ autoColor: w2, schemeLookup: S2, recentColors: C2, darkMode: k2, ...x2 }), [w2, S2, C2, k2]), T2 = xt((e2, t3) => {
512
512
  e2 && t3 && b2?.addRecentColor && b2.addRecentColor(e2), b2?.onColorSelect && b2.onColorSelect(e2), r2?.(e2, t3), n2?.execute(e2, a2);
513
513
  }, [n2, r2, a2, b2]), R2 = K((e2, t3) => {
514
514
  const { children: o3, title: a3, ...r3 } = e2;
515
515
  let s3 = e2.children;
516
- return (n2?.disabled() || l2) && (s3 = z("div", { children: s3 })), z(We, { command: n2, placement: i2 === ut.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...r3, children: s3 });
516
+ return (n2?.disabled() || l2) && (s3 = z("div", { children: s3 })), z(ze, { command: n2, placement: i2 === ft.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...r3, children: s3 });
517
517
  }, [n2, l2]);
518
- return z(vo, { ref: o2, panelProps: v2, icon: p2 ?? n2?.icon(b2), quickColor: y2, selectedColor: n2?.state(), onSelectColor: T2, variant: i2 === ut.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: R2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: C2, ...u2 });
518
+ return z(ko, { ref: o2, propsPanel: v2, icon: p2 ?? n2?.icon(b2), quickColor: y2, selectedColor: n2?.state(), onSelectColor: T2, variant: i2 === ft.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: R2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: k2, ...u2 });
519
519
  }));
520
- Oo.displayName = "ColorCommandButton";
521
- const Vo = $(O((e2, t2) => {
522
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = K((e3, t3) => {
523
- const o3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("gridlinesToggle") }), z(Oo, { ...o3, command: t3.getCommand("sheetViewFormatGridlinesColor"), icon: z(xt, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: true } }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesColumns") }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesRows") })] });
524
- return Re({ ...e3, children: l3 });
520
+ $o.displayName = "ColorCommandButton";
521
+ const Oo = $(O((e2, t2) => {
522
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ht(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = K((e3, t3) => {
523
+ const o3 = { variant: ft.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("gridlinesToggle") }), z($o, { ...o3, command: t3.getCommand("sheetViewFormatGridlinesColor"), icon: z(wt, { iconKey: "stroke.colored" }), propsPanel: { disableAlpha: true } }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesColumns") }), z(ke, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesRows") })] });
524
+ return Te({ ...e3, children: l3 });
525
525
  }, [r2, n2]);
526
- return z(Pe, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Gridlines", tooltip: "Configure how the lines between rows and columns in the sheet are displayed.", icon: z(Ve, { command: s2[0], scope: "view" }), ...i2 });
527
- })), Ko = $(O((e2, t2) => z($e, { ref: t2, ...e2, popupCommandKeys: ["sortAscending", "sortDescending", "sortCustom", null, "autoFilterToggle", "autoFilterClear", "autoFilterReapply"], scope: "sortFilter", label: "Sort & Filter", tooltip: L(H, { children: [z("span", { children: "Organize your data so it's easier to analyze." }), z("br", {}), z("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), icon: "SortFilter" }))), Go = $(O((e2, t2) => {
526
+ return z(Re, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Gridlines", tooltip: "Configure how the lines between rows and columns in the sheet are displayed.", icon: z(Oe, { command: s2[0], scope: "view" }), ...i2 });
527
+ })), Vo = $(O((e2, t2) => z(We, { ref: t2, ...e2, popupCommandKeys: ["sortAscending", "sortDescending", "sortCustom", null, "autoFilterToggle", "autoFilterClear", "autoFilterReapply"], scope: "sortFilter", label: "Sort & Filter", tooltip: L(H, { children: [z("span", { children: "Organize your data so it's easier to analyze." }), z("br", {}), z("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), icon: "SortFilter" }))), Ko = $(O((e2, t2) => {
528
528
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
529
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle") }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear") }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply") })] });
530
- return Re({ ...e3, children: a3 });
529
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = L(H, { children: [z(ke, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle") }), z(ke, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear") }), z(ke, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply") })] });
530
+ return Te({ ...e3, children: a3 });
531
531
  }, [r2, n2, a2]);
532
- return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Filter", tooltip: L(H, { children: [z("span", { children: "Organize your data so it's easier to analyze." }), z("br", {}), z("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: "FilterToggle", ...l2 });
533
- })), _o = $(O((e2, t2) => {
532
+ return z(Re, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Filter", tooltip: L(H, { children: [z("span", { children: "Organize your data so it's easier to analyze." }), z("br", {}), z("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: "FilterToggle", ...l2 });
533
+ })), Go = $(O((e2, t2) => {
534
534
  const { quickCommand: o2, icon: n2, isRedo: a2 = false, nestRedo: r2 = true, undoManager: l2, scope: i2, sx: s2, disabled: d2, commands: c2, ...m2 } = e2, p2 = [o2];
535
535
  !a2 && r2 && p2.push("redo");
536
- const u2 = pt(c2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
536
+ const u2 = ht(c2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
537
537
  let x2 = d2;
538
538
  d2 || (x2 = !g2 || g2.disabled(), h2 && !h2.disabled() && (x2 = false));
539
- const [b2, y2] = _(0), w2 = K((e3, t3) => {
539
+ const [b2, y2] = j(0), w2 = K((e3, t3) => {
540
540
  let o3 = 0 === b2 ? "Cancel" : `${g2.label()} ${b2} Action${1 === b2 ? "" : "s"}`, n3 = false;
541
541
  f2 || (n3 = true), n3 || (n3 = r2 ? !f2.hasRedo() && !f2.hasUndo() : !f2.hasRedo());
542
542
  const l3 = (e4) => {
543
543
  g2.execute(e4);
544
- }, i3 = z(Ie, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: n3 ? void 0 : "0 0", minWidth: "180px" }, icon: z(xt, {}), onMouseEnter: () => {
544
+ }, i3 = z(Pe, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: n3 ? void 0 : "0 0", minWidth: "180px" }, icon: z(wt, {}), onMouseEnter: () => {
545
545
  y2(0);
546
546
  }, onMouseDown: (e4) => {
547
547
  0 === e4.button && e4.preventDefault();
548
548
  }, onMouseUp: (e4) => {
549
549
  0 === e4.button && l3(b2);
550
550
  }, onKeyDown: (e4) => {
551
- e4.isDefaultPrevented() || e4.keyCode !== ft.Enter && e4.keyCode !== ft.Space || l3(b2);
552
- }, children: z(ee, { component: "div", variant: "caption", sx: { fontSize: "0.875rem", letterSpacing: "0.01071em" }, children: o3 }) });
551
+ e4.isDefaultPrevented() || e4.keyCode !== yt.Enter && e4.keyCode !== yt.Space || l3(b2);
552
+ }, children: z(J, { component: "div", variant: "caption", sx: { fontSize: "0.875rem", letterSpacing: "0.01071em" }, children: o3 }) });
553
553
  if (n3) return i3;
554
554
  const s3 = a2 ? f2?.getRedoDescriptions() : f2?.getUndoDescriptions(), d3 = [];
555
555
  for (let e4 = 0; e4 < s3.length; e4++) {
556
556
  const t4 = s3[e4];
557
- d3.push(z(Ie, { sx: { maxWidth: "360px", display: "flex" }, disabled: x2, selected: e4 < b2, icon: z(xt, {}), onMouseEnter: () => {
557
+ d3.push(z(Pe, { sx: { maxWidth: "360px", display: "flex" }, disabled: x2, selected: e4 < b2, icon: z(wt, {}), onMouseEnter: () => {
558
558
  y2(e4 + 1);
559
559
  }, onMouseDown: (e5) => {
560
560
  0 === e5.button && e5.preventDefault();
561
561
  }, onMouseUp: (t5) => {
562
562
  0 === t5.button && l3(e4 + 1);
563
563
  }, onKeyDown: (t5) => {
564
- t5.isDefaultPrevented() || t5.keyCode !== ft.Enter && t5.keyCode !== ft.Space || l3(e4 + 1);
565
- }, children: L(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [z(ee, { component: "div", children: t4 }), z(xt, {})] }) }, `action:${e4}`));
564
+ t5.isDefaultPrevented() || t5.keyCode !== yt.Enter && t5.keyCode !== yt.Space || l3(e4 + 1);
565
+ }, children: L(Q, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [z(J, { component: "div", children: t4 }), z(wt, {})] }) }, `action:${e4}`));
566
566
  }
567
567
  let c3 = null;
568
568
  if (!a2 && r2) {
569
- const o4 = { scope: "undo", commands: t3, variant: ut.Menuitem, parentFloat: e3.floatReference };
570
- c3 = [], c3.push(z(_o, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(z(Te, { orientation: "horizontal" }, "action:redo-div"));
569
+ const o4 = { scope: "undo", commands: t3, variant: ft.Menuitem, parentFloat: e3.floatReference };
570
+ c3 = [], c3.push(z(Go, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(z(ve, { orientation: "horizontal" }, "action:redo-div"));
571
571
  }
572
- const m3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
572
+ const m3 = L(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
573
573
  e3.closeFloatAll();
574
574
  }, onMouseLeave: () => {
575
575
  y2(0);
576
- }, children: [c3, z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(Te, { orientation: "horizontal" }), i3] });
577
- return Re({ ...e3, children: m3 });
576
+ }, children: [c3, z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(ve, { orientation: "horizontal" }), i3] });
577
+ return Te({ ...e3, children: m3 });
578
578
  }, [g2?.context(), g2?.state(), i2, f2, b2, x2]);
579
- return z(Pe, { ref: t2, commands: c2, quickCommand: o2, scope: i2, disabled: x2, label: g2?.label() ?? (a2 ? "Redo" : "Undo"), tooltip: z(H, { children: z("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: w2, icon: n2 ?? (a2 ? "Redo" : "Undo"), selected: false, ...m2 });
580
- })), Uo = s.getFontList(), jo = /* @__PURE__ */ new Map();
581
- for (let e2 = 0; e2 < Uo.length; e2++) jo.set(Uo[e2].fontRef.getFamily(), Uo[e2]);
582
- const qo = $(O((e2, t2) => {
579
+ return z(Re, { ref: t2, commands: c2, quickCommand: o2, scope: i2, disabled: x2, label: g2?.label() ?? (a2 ? "Redo" : "Undo"), tooltip: z(H, { children: z("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: w2, icon: n2 ?? (a2 ? "Redo" : "Undo"), selected: false, ...m2 });
580
+ })), jo = s.getFontList(), _o = /* @__PURE__ */ new Map();
581
+ for (let e2 = 0; e2 < jo.length; e2++) _o.set(jo[e2].fontRef.getFamily(), jo[e2]);
582
+ const Uo = $(O((e2, t2) => {
583
583
  const { command: o2, commandHook: n2, sx: a2, disabled: r2 = false, parentFloat: i2, icon: s2, label: d2, ...c2 } = e2;
584
- bt(o2);
585
- const m2 = o2?.state(), p2 = zt(), u2 = V(() => `${l.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = K((e3) => {
584
+ St(o2);
585
+ const m2 = o2?.state(), p2 = ct(), u2 = V(() => `${l.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = K((e3) => {
586
586
  const t3 = (e4) => {
587
587
  o2?.execute(e4, n2);
588
588
  }, a3 = [];
589
- for (let e4 = 0; e4 < Uo.length; e4++) a3.push({ key: Uo[e4].fontRef.getFamily(), description: Uo[e4].fontRef.getFamily() });
590
- jo.get(m2) || a3.unshift({ key: m2, description: m2 });
589
+ for (let e4 = 0; e4 < jo.length; e4++) a3.push({ key: jo[e4].fontRef.getFamily(), description: jo[e4].fontRef.getFamily() });
590
+ _o.get(m2) || a3.unshift({ key: m2, description: m2 });
591
591
  const l2 = [];
592
592
  for (let e4 = 0; e4 < a3.length; e4++) {
593
593
  const n3 = a3[e4].key === m2;
594
- l2.push(z(Ie, { sx: { display: "flex", paddingTop: "4px", paddingBottom: "4px" }, selected: n3, disabled: r2 || !o2 || o2.disabled(), icon: n3 ? z(Oe, {}) : void 0, onMouseUp: (o3) => {
594
+ l2.push(z(Pe, { sx: { display: "flex", paddingTop: "4px", paddingBottom: "4px" }, selected: n3, disabled: r2 || !o2 || o2.disabled(), icon: n3 ? z($e, {}) : void 0, onMouseUp: (o3) => {
595
595
  0 === o3.button && t3(a3[e4].key);
596
596
  }, onMouseDown: (e5) => {
597
597
  0 === e5.button && e5.preventDefault();
598
598
  }, onKeyDown: (o3) => {
599
- o3.keyCode !== ft.Enter && o3.keyCode !== ft.Space || t3(a3[e4].key);
600
- }, children: z(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: z(ee, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => a3[e4]?.key }, children: a3[e4].description }) }) }, e4 + "" + a3[e4].key));
599
+ o3.keyCode !== yt.Enter && o3.keyCode !== yt.Space || t3(a3[e4].key);
600
+ }, children: z(Q, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: z(J, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => a3[e4]?.key }, children: a3[e4].description }) }) }, e4 + "" + a3[e4].key));
601
601
  }
602
- const i3 = z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...c2, children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l2 }) });
603
- return Re({ ...e3, children: i3 });
602
+ const i3 = z(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...c2, children: z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l2 }) });
603
+ return Te({ ...e3, children: i3 });
604
604
  }, [r2, o2?.state()]);
605
- return z(Be, { ref: t2, sx: { ...a2 }, outlined: true, disabled: r2, parentFloat: i2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => z(He, { label: o2?.label(), description: o2?.description(), disabled: t3, children: e3 }), icon: z(J, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, fontFamily: (e3) => e3.typography.fontFamily, color: (e3) => e3.palette.text.secondary, width: u2 }, children: z(J, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m2 }) }), ...c2 });
606
- })), Xo = $(O((e2, t2) => {
607
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), s2 = V(() => {
605
+ return z(Be, { ref: t2, sx: { ...a2 }, outlined: true, disabled: r2, parentFloat: i2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => z(Le, { label: o2?.label(), description: o2?.description(), disabled: t3, children: e3 }), icon: z(Q, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, fontFamily: (e3) => e3.typography.fontFamily, color: (e3) => e3.palette.text.secondary, width: u2 }, children: z(Q, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m2 }) }), ...c2 });
606
+ })), qo = $(O((e2, t2) => {
607
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ht(o2, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), s2 = V(() => {
608
608
  const e3 = i2.length;
609
609
  for (let t3 = 0; t3 < e3; t3++) {
610
610
  const e4 = i2[t3];
@@ -612,89 +612,89 @@ const qo = $(O((e2, t2) => {
612
612
  }
613
613
  return i2[0];
614
614
  }, [i2]), d2 = K((e3, t3) => {
615
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "textEffects", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatStrikeThroughToggle") }), z(ve, { ...o3, command: t3.getCommand("formatSuperscriptToggle") }), z(ve, { ...o3, command: t3.getCommand("formatSubscriptToggle") })] });
616
- return Re({ ...e3, children: a3 });
615
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: "textEffects", disabled: r2 }, a3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("formatStrikeThroughToggle") }), z(ke, { ...o3, command: t3.getCommand("formatSuperscriptToggle") }), z(ke, { ...o3, command: t3.getCommand("formatSubscriptToggle") })] });
616
+ return Te({ ...e3, children: a3 });
617
617
  }, [r2, n2, a2]);
618
- return z(Pe, { ref: t2, quickCommand: s2?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: s2?.icon() ?? "TextStrike", ...l2 });
619
- })), Zo = $(O((e2, t2) => {
620
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = V(() => {
618
+ return z(Re, { ref: t2, quickCommand: s2?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: s2?.icon() ?? "TextStrike", ...l2 });
619
+ })), Xo = $(O((e2, t2) => {
620
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ht(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = V(() => {
621
621
  const e3 = i2.length;
622
622
  for (let t3 = 0; t3 < e3; t3++) if (i2[t3]?.state()) return i2[t3];
623
623
  return i2[0];
624
624
  }, [i2]), d2 = K((e3, t3) => {
625
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "underline", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatUnderlinedToggle") }), z(ve, { ...o3, command: t3.getCommand("formatUnderlinedDoubleToggle") }), z(ve, { ...o3, command: t3.getCommand("formatUnderlinedAccountingToggle"), commandHook: n2 }), z(ve, { ...o3, command: t3.getCommand("formatUnderlinedAccountingDoubleToggle") })] });
626
- return Re({ ...e3, children: a3 });
625
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: "underline", disabled: r2 }, a3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("formatUnderlinedToggle") }), z(ke, { ...o3, command: t3.getCommand("formatUnderlinedDoubleToggle") }), z(ke, { ...o3, command: t3.getCommand("formatUnderlinedAccountingToggle"), commandHook: n2 }), z(ke, { ...o3, command: t3.getCommand("formatUnderlinedAccountingDoubleToggle") })] });
626
+ return Te({ ...e3, children: a3 });
627
627
  }, [r2, n2, a2]);
628
- return z(Pe, { ref: t2, quickCommand: s2?.key(), commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: d2, icon: s2?.icon() ?? "TextUnderline", ...l2 });
629
- })), Yo = $(O((e2, t2) => {
630
- const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = gt((e3, t3) => {
631
- const o3 = { variant: ut.Menuitem, commandHook: a2, scope: "paste", disabled: i2 }, n3 = [];
632
- return l2 && (n3.push(X(ve, { ...o3, command: t3.getCommand("paste"), key: "paste" })), n3.push(z(Te, { orientation: "horizontal" }, "paste-div"))), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks" })), Re({ ...e3, children: n3 });
628
+ return z(Re, { ref: t2, quickCommand: s2?.key(), commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: d2, icon: s2?.icon() ?? "TextUnderline", ...l2 });
629
+ })), Zo = $(O((e2, t2) => {
630
+ const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = xt((e3, t3) => {
631
+ const o3 = { variant: ft.Menuitem, commandHook: a2, scope: "paste", disabled: i2 }, n3 = [];
632
+ return l2 && (n3.push(X(ke, { ...o3, command: t3.getCommand("paste"), key: "paste" })), n3.push(z(ve, { orientation: "horizontal" }, "paste-div"))), n3.push(X(ke, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues" })), n3.push(X(ke, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats" })), n3.push(X(ke, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas" })), n3.push(X(ke, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose" })), n3.push(X(ke, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks" })), Te({ ...e3, children: n3 });
633
633
  }, [i2, a2, r2, l2]);
634
- return z(Pe, { ref: t2, commands: n2, commandHook: a2, scope: r2, createPopupPanel: d2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", ...s2 });
635
- })), Qo = $(O((e2, t2) => {
636
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = K((e3, t3) => {
637
- const o3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadings") }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingsNumeric") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingColumns") }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingRows") })] });
638
- return Re({ ...e3, children: l3 });
634
+ return z(Re, { ref: t2, commands: n2, commandHook: a2, scope: r2, createPopupPanel: d2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", ...s2 });
635
+ })), Yo = $(O((e2, t2) => {
636
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ht(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = K((e3, t3) => {
637
+ const o3 = { variant: ft.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadings") }), z(ke, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingsNumeric") }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingColumns") }), z(ke, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingRows") })] });
638
+ return Te({ ...e3, children: l3 });
639
639
  }, [r2, n2, a2]);
640
- return z(Pe, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Headings", tooltip: "Configure how the column and rows headings in the sheet are displayed.", icon: z(Ve, { command: s2[0], scope: "view" }), ...i2 });
641
- })), Jo = $(O((e2, t2) => {
640
+ return z(Re, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Headings", tooltip: "Configure how the column and rows headings in the sheet are displayed.", icon: z(Oe, { command: s2[0], scope: "view" }), ...i2 });
641
+ })), Qo = $(O((e2, t2) => {
642
642
  const { commands: o2, commandHook: n2, scope: a2 = "view", disabled: r2 = false, ...l2 } = e2, i2 = K((e3) => {
643
- const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowFormulaBar") }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowTabs") }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowStatusBar") }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowHorizontalScrollBar") }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
644
- return Re({ ...e3, children: l3 });
643
+ const t3 = { variant: ft.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ke, { ...t3, command: o2.getCommand("workbookViewToggleShowFormulaBar") }), z(ke, { ...t3, command: o2.getCommand("workbookViewToggleShowTabs") }), z(ke, { ...t3, command: o2.getCommand("workbookViewToggleShowStatusBar") }), z(ve, { orientation: "horizontal" }), z(ke, { ...t3, command: o2.getCommand("workbookViewToggleShowHorizontalScrollBar") }), z(ke, { ...t3, command: o2.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
644
+ return Te({ ...e3, children: l3 });
645
645
  }, [r2, o2, n2, a2]);
646
- return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: i2, icon: z(Ve, { icon: null, label: "Workbook View" }), ...l2 });
647
- })), en = $(O((e2, t2) => {
648
- const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: d2, ...m2 } = e2, p2 = V(() => r2({ value: o2, style: n2 }), [o2, n2, r2]), u2 = V(() => p2.getStyle(), [p2, l2]), g2 = V(() => u2.getFill().toCSS(l2?.darkMode ?? false), [u2]), h2 = u2.getInsets(), f2 = u2.getFont(), x2 = K(() => u2.getBorder(), [u2]);
649
- return z(J, { ref: t2, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter: d2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...g2 }, "& .text": { flex: "1 1 100%", ...f2.toCSS(l2?.darkMode ?? false, 1), boxSizing: "border-box", padding: `${h2.top}px ${h2.right}px ${h2.bottom}px ${h2.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: f2.toCSS().textDecoration, textAlign: c.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: z(y, { getBorderAt: x2, darkMode: l2?.darkMode ?? false, rowCount: 1, columnCount: 1, style: { height: "100%", width: "100%", ...s2?.style }, ...s2, children: z(J, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-2px", marginBottom: "-2px", display: "flex", alignItems: "center" }, children: z(J, { className: "text", children: o2 }) }) }) });
650
- })), tn = $((e2) => {
646
+ return z(Re, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: i2, icon: z(Oe, { icon: null, label: "Workbook View" }), ...l2 });
647
+ })), Jo = $(O((e2, t2) => {
648
+ const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, propsBorder: s2, disabled: d2, ...m2 } = e2, p2 = V(() => r2({ value: o2, style: n2 }), [o2, n2, r2]), u2 = V(() => p2.getStyle(), [p2, l2]), g2 = V(() => u2.getFill().toCSS(l2?.darkMode ?? false), [u2]), h2 = u2.getInsets(), f2 = u2.getFont(), x2 = K(() => u2.getBorder(), [u2]);
649
+ return z(Q, { ref: t2, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter: d2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...g2 }, "& .text": { flex: "1 1 100%", ...f2.toCSS(l2?.darkMode ?? false, 1), boxSizing: "border-box", padding: `${h2.top}px ${h2.right}px ${h2.bottom}px ${h2.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: f2.toCSS().textDecoration, textAlign: c.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: z(y, { getBorderAt: x2, darkMode: l2?.darkMode ?? false, rowCount: 1, columnCount: 1, style: { height: "100%", width: "100%", ...s2?.style }, ...s2, children: z(Q, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-2px", marginBottom: "-2px", display: "flex", alignItems: "center" }, children: z(Q, { className: "text", children: o2 }) }) }) });
650
+ })), en = $((e2) => {
651
651
  const { styles: t2, namedStyle: o2, selectedNamed: n2, hasContextMenu: a2 = true, bodyStyle: r2, onSelectNamed: l2, createTemporaryCell: i2, parentFloat: s2, commands: c2, disabled: m2, commandHook: p2, ...u2 } = e2, g2 = K((e3) => {
652
- const t3 = { variant: ut.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = L(H, { children: [z(ve, { ...t3, style: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2 }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: c2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), z(ve, { ...t3, command: c2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() === d.BuiltInName.Normal })] });
653
- return Re({ ...e3, children: z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
652
+ const t3 = { variant: ft.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = L(H, { children: [z(ke, { ...t3, style: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2 }), z(ve, { orientation: "horizontal" }), z(ke, { ...t3, command: c2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), z(ke, { ...t3, command: c2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() === d.BuiltInName.Normal })] });
653
+ return Te({ ...e3, children: z(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
654
654
  }, []), h2 = o2?.getName() === n2?.getName();
655
- let f2 = z(ze, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${h2 ? e3.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o2.getName(), placement: "bottom-start" }, disabled: m2, icon: null, onClick: () => {
655
+ let f2 = z(He, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${h2 ? e3.palette.primary.dark : "transparent"} 1px` }, propsTooltip: { label: o2.getName(), placement: "bottom-start" }, disabled: m2, icon: null, onClick: () => {
656
656
  l2?.(o2);
657
- }, ...u2, children: z(en, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
658
- return a2 && (f2 = z(Ge, { label: o2.getName(), parentFloat: s2, createPopupPanel: g2, children: f2 })), f2;
659
- }), on = $(O((e2, t2) => {
657
+ }, ...u2, children: z(Jo, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
658
+ return a2 && (f2 = z(Ke, { label: o2.getName(), parentFloat: s2, createPopupPanel: g2, children: f2 })), f2;
659
+ }), tn = $(O((e2, t2) => {
660
660
  const { commands: o2, command: n2, commandHook: a2, selectedNamed: r2, onSelectNamed: i2, disabled: s2 = false, bodyStyle: c2, usePreviewIcon: m2 = true, ...p2 } = e2;
661
- bt(n2);
662
- const u2 = n2?.context(), g2 = u2?.styles, h2 = r2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), x2 = gt((e3) => {
661
+ St(n2);
662
+ const u2 = n2?.context(), g2 = u2?.styles, h2 = r2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), x2 = xt((e3) => {
663
663
  i2?.(e3), n2?.execute(e3, a2);
664
664
  }, [n2, i2, a2]), b2 = K((e3, t3) => {
665
665
  const n3 = { onSelectNamed: x2, styles: g2(), parentFloat: e3.floatReference }, r3 = g2().getCustomNamed(), l2 = /* @__PURE__ */ new Map(), i3 = [];
666
666
  for (let e4 = 0; e4 < r3.length; e4++) l2.set(r3[e4].getName(), r3[e4]), null === g2().getNamed(r3[e4].getName()).getBuiltInID() && i3.push(r3[e4].getName());
667
667
  const c3 = (e4) => {
668
668
  let t4 = l2.get(e4);
669
- return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : z(tn, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: a2, ...n3 }, e4);
669
+ return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : z(en, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: a2, ...n3 }, e4);
670
670
  }, m3 = (e4, t4, o3 = true) => {
671
671
  const n4 = [];
672
672
  for (let e5 = 0; e5 < t4.length; e5++) {
673
673
  const o4 = c3(t4[e5]);
674
674
  o4 && n4.push(o4);
675
675
  }
676
- return 0 === n4.length ? null : L(J, { children: [o3 ? z(Te, { orientation: "horizontal" }) : null, z(Ke, { children: e4 }, e4 + "-header"), z(J, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: n4 }, e4 + "-presets")] }, e4);
676
+ return 0 === n4.length ? null : L(Q, { children: [o3 ? z(ve, { orientation: "horizontal" }) : null, z(Ve, { children: e4 }, e4 + "-header"), z(Q, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: n4 }, e4 + "-presets")] }, e4);
677
677
  }, p3 = (e4, t4) => {
678
678
  const o3 = [];
679
679
  for (let e5 = 0; e5 < t4.length; e5++) {
680
680
  const n4 = c3(t4[e5]);
681
681
  n4 && o3.push(n4);
682
682
  }
683
- return 0 === o3.length ? null : z(J, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: o3 }, e4 + "-presets");
683
+ return 0 === o3.length ? null : z(Q, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: o3 }, e4 + "-presets");
684
684
  }, f3 = [];
685
685
  f3.push(m3("Custom", i3, false)), f3.push(m3("Good, Bad and Neutral", [d.BuiltInName.Normal, d.BuiltInName.Bad, d.BuiltInName.Good, d.BuiltInName.Neutral], i3.length > 0)), f3.push(m3("Data and Model", [d.BuiltInName.Calculation, d.BuiltInName.CheckCell, d.BuiltInName.ExplanatoryText, d.BuiltInName.FollowedHyperlink, d.BuiltInName.Hyperlink, d.BuiltInName.Input, d.BuiltInName.LinkedCell, d.BuiltInName.Note, d.BuiltInName.Output, d.BuiltInName.WarningText])), f3.push(m3("Titles and Headings", [d.BuiltInName.Heading1, d.BuiltInName.Heading2, d.BuiltInName.Heading3, d.BuiltInName.Heading4, d.BuiltInName.Title, d.BuiltInName.Total]));
686
686
  let b3 = [];
687
687
  var y3, w3;
688
- return b3.push(p3("Accent 1", [d.BuiltInName.Accent1_20, d.BuiltInName.Accent1_40, d.BuiltInName.Accent1_60, d.BuiltInName.Accent1])), b3.push(p3("Accent 2", [d.BuiltInName.Accent2_20, d.BuiltInName.Accent2_40, d.BuiltInName.Accent2_60, d.BuiltInName.Accent2])), b3.push(p3("Accent 3", [d.BuiltInName.Accent3_20, d.BuiltInName.Accent3_40, d.BuiltInName.Accent3_60, d.BuiltInName.Accent3])), b3.push(p3("Accent 4", [d.BuiltInName.Accent4_20, d.BuiltInName.Accent4_40, d.BuiltInName.Accent4_60, d.BuiltInName.Accent4])), b3.push(p3("Accent 5", [d.BuiltInName.Accent5_20, d.BuiltInName.Accent5_40, d.BuiltInName.Accent5_60, d.BuiltInName.Accent5])), b3.push(p3("Accent 6", [d.BuiltInName.Accent6_20, d.BuiltInName.Accent6_40, d.BuiltInName.Accent6_60, d.BuiltInName.Accent6])), f3.push((y3 = "Themed Cell Styles", w3 = b3, L(J, { children: [z(Te, { orientation: "horizontal" }), z(Ke, { children: y3 }, y3 + "-header"), z(J, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: w3 }, y3 + "-presets")] }, y3))), f3.push(m3("Number Format", [d.BuiltInName.Comma, d.BuiltInName.Comma0, d.BuiltInName.Currency, d.BuiltInName.Currency0, d.BuiltInName.Percent])), L(J, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [z(J, { onContextMenu: () => {
689
- }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), z(Te, { orientation: "horizontal" }), z(ve, { variant: ut.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: a2, disabled: s2 })] });
690
- }, [h2, g2?.().getTheme(), f2]), y2 = gt((e3) => {
688
+ return b3.push(p3("Accent 1", [d.BuiltInName.Accent1_20, d.BuiltInName.Accent1_40, d.BuiltInName.Accent1_60, d.BuiltInName.Accent1])), b3.push(p3("Accent 2", [d.BuiltInName.Accent2_20, d.BuiltInName.Accent2_40, d.BuiltInName.Accent2_60, d.BuiltInName.Accent2])), b3.push(p3("Accent 3", [d.BuiltInName.Accent3_20, d.BuiltInName.Accent3_40, d.BuiltInName.Accent3_60, d.BuiltInName.Accent3])), b3.push(p3("Accent 4", [d.BuiltInName.Accent4_20, d.BuiltInName.Accent4_40, d.BuiltInName.Accent4_60, d.BuiltInName.Accent4])), b3.push(p3("Accent 5", [d.BuiltInName.Accent5_20, d.BuiltInName.Accent5_40, d.BuiltInName.Accent5_60, d.BuiltInName.Accent5])), b3.push(p3("Accent 6", [d.BuiltInName.Accent6_20, d.BuiltInName.Accent6_40, d.BuiltInName.Accent6_60, d.BuiltInName.Accent6])), f3.push((y3 = "Themed Cell Styles", w3 = b3, L(Q, { children: [z(ve, { orientation: "horizontal" }), z(Ve, { children: y3 }, y3 + "-header"), z(Q, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: w3 }, y3 + "-presets")] }, y3))), f3.push(m3("Number Format", [d.BuiltInName.Comma, d.BuiltInName.Comma0, d.BuiltInName.Currency, d.BuiltInName.Currency0, d.BuiltInName.Percent])), L(Q, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [z(Q, { onContextMenu: () => {
689
+ }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), z(ve, { orientation: "horizontal" }), z(ke, { variant: ft.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: a2, disabled: s2 })] });
690
+ }, [h2, g2?.().getTheme(), f2]), y2 = xt((e3) => {
691
691
  const t3 = 18 / l.getDeviceScale(), o3 = u2?.createTemporaryCell(e3);
692
692
  return o3.getStyle().getFont().getSize() <= t3 ? o3 : o3.createTemporaryCell({ style: { font: { size: t3 } } });
693
- }, [u2?.createTemporaryCell]), w2 = s2 || !n2 || n2.disabled(), S2 = V(() => u2 && m2 ? z(en, { value: h2?.getName() ?? "Custom", cellStyle: h2 ? { named: h2.getName() } : void 0, styles: u2.styles(), createTemporaryCell: y2, bodyStyle: u2.bodyStyle(), className: "outline-hover", disabled: w2, sx: { marginRight: "4px", borderRadius: "2px", minHeight: "calc(100% - 2px)", overflow: "hidden", outline: (e3) => `1px solid ${e3.palette.action.hover}` }, borderProps: { style: { height: "calc(100% - 2px)", width: "calc(100% - 1px)" } } }) : n2?.icon(), [h2, f2, w2, n2]);
694
- return z(Pe, { ref: t2, createPopupPanel: b2, outlined: m2, commands: o2, createTooltip: ({ children: e3 }, t3) => z(He, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), selected: false, disabled: w2, label: n2?.label(), icon: S2, ...p2 });
695
- })), nn = "_sheetxl-reset_11z3j_1", an = 10, rn = $(O((e2, t2) => {
696
- const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: c2 = an, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * c2), [h2, f2] = Z((e3) => e3 + 1, 0);
697
- U(() => {
693
+ }, [u2?.createTemporaryCell]), w2 = s2 || !n2 || n2.disabled(), S2 = V(() => u2 && m2 ? z(Jo, { value: h2?.getName() ?? "Custom", cellStyle: h2 ? { named: h2.getName() } : void 0, styles: u2.styles(), createTemporaryCell: y2, bodyStyle: u2.bodyStyle(), className: "outline-hover", disabled: w2, sx: { marginRight: "4px", borderRadius: "2px", minHeight: "calc(100% - 2px)", overflow: "hidden", outline: (e3) => `1px solid ${e3.palette.action.hover}` }, propsBorder: { style: { height: "calc(100% - 2px)", width: "calc(100% - 1px)" } } }) : n2?.icon(), [h2, f2, w2, n2]);
694
+ return z(Re, { ref: t2, createPopupPanel: b2, outlined: m2, commands: o2, createTooltip: ({ children: e3 }, t3) => z(Le, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), selected: false, disabled: w2, label: n2?.label(), icon: S2, ...p2 });
695
+ })), on = "_sheetxl-reset_11z3j_1", nn = 10, an = $(O((e2, t2) => {
696
+ const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: c2 = nn, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * c2), [h2, f2] = Z((e3) => e3 + 1, 0);
697
+ _(() => {
698
698
  if (p2 && n2) return n2.addListeners({ onAnyChange: () => {
699
699
  f2();
700
700
  } });
@@ -726,10 +726,10 @@ const qo = $(O((e2, t2) => {
726
726
  }
727
727
  return t3;
728
728
  }, [x2, a2, r2]), S2 = K((e3, t3) => b2[t3].getBorder() ?? null, [b2]);
729
- return z(J, { ref: t2, className: "table-format-preview", sx: { background: r2?.fill, filter: i2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...l2 }, ...u2, children: z(y, { getBorderAt: S2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (c2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: z("table", { className: mt(s2, "sheetxl-table-preview", nn), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (c2 - 1) + 1 }, children: z("tbody", { children: w2 }) }) }) });
730
- })), ln = (e2, t2, o2, n2, a2) => {
729
+ return z(Q, { ref: t2, className: "table-format-preview", sx: { background: r2?.fill, filter: i2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...l2 }, ...u2, children: z(y, { getBorderAt: S2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (c2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: z("table", { className: gt(s2, "sheetxl-table-preview", on), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (c2 - 1) + 1 }, children: z("tbody", { children: w2 }) }) }) });
730
+ })), rn = (e2, t2, o2, n2, a2) => {
731
731
  e2.beginPath(), e2.moveTo(t2 + 0.5, o2 + 0.5), e2.lineTo(n2 + 0.5, a2 + 0.5), e2.stroke();
732
- }, sn = $(O((e2, t2) => {
732
+ }, ln = $(O((e2, t2) => {
733
733
  const { table: o2, tableStyle: n2, styles: a2, bodyStyle: r2, disabled: l2, style: i2, className: s2, canvas: d2, ...c2 } = e2, u2 = V(() => {
734
734
  const e3 = o2.toJSON(), t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
735
735
  return e3.styleOptions = { ...e3.styleOptions, name: n2.getName() }, e3.ref = t3, new m({ initialAnchor: t3, json: e3, styles: a2 });
@@ -759,38 +759,38 @@ const qo = $(O((e2, t2) => {
759
759
  const r3 = g2[5 * e4 + a3], l3 = a3 * o3, i3 = 9 * e4, s3 = r3.getBorder();
760
760
  if (!s3.isEmpty()) {
761
761
  const a4 = s3.getLeft();
762
- a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false), ln(t3, l3, i3, l3, i3 + 9));
762
+ a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false), rn(t3, l3, i3, l3, i3 + 9));
763
763
  const r4 = s3.getTop();
764
- r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), ln(t3, l3, i3, l3 + o3, 9 * e4));
764
+ r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), rn(t3, l3, i3, l3 + o3, 9 * e4));
765
765
  const d4 = s3.getRight();
766
- d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), ln(t3, l3 + o3, i3, l3 + o3, i3 + 9));
766
+ d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), rn(t3, l3 + o3, i3, l3 + o3, i3 + 9));
767
767
  const c4 = s3.getBottom();
768
- c4.isNone() || (t3.strokeStyle = c4.getColor().toCSS(n3, false), ln(t3, l3, i3 + 9, l3 + o3, i3 + 9));
768
+ c4.isNone() || (t3.strokeStyle = c4.getColor().toCSS(n3, false), rn(t3, l3, i3 + 9, l3 + o3, i3 + 9));
769
769
  }
770
770
  t3.strokeStyle = r3.getFont().getFill().toCSS(n3, false);
771
771
  const d3 = 4, c3 = 2.5;
772
- ln(t3, a3 * o3 + c3, 9 * e4 + d3, a3 * o3 + c3 + 7, 9 * e4 + d3);
772
+ rn(t3, a3 * o3 + c3, 9 * e4 + d3, a3 * o3 + c3 + 7, 9 * e4 + d3);
773
773
  }
774
774
  return `url(${e3.toDataURL()})`;
775
775
  }, [d2, u2, n2, r2]);
776
- return z("div", { ref: t2, className: mt("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...c2 });
777
- })), dn = "_table-style-options-container_1kfn2_1", cn = "_table-style-options_1kfn2_1", mn = $(O((e2, t2) => {
776
+ return z("div", { ref: t2, className: gt("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...c2 });
777
+ })), sn = "_table-style-options-container_1kfn2_1", dn = "_table-style-options_1kfn2_1", cn = $(O((e2, t2) => {
778
778
  const { styleOptions: o2, onStyleOptionsChange: n2, showHeaderRow: a2, onShowHeaderRowChange: r2, showTotalRow: l2, onShowTotalRowChange: i2, showFilterButton: s2, onShowFilterButtonChange: d2, sx: c2, className: m2, disabled: p2, ...u2 } = e2;
779
- return z("div", { className: dn, children: L(J, { sx: { pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (e3) => `${e3.spacing(2)}`, marginRight: (e3) => `${e3.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (e3) => `${e3.spacing(0.5)}` }, ...c2 }, ...u2, ref: t2, className: mt(m2, cn), children: [r2 && z(ie, { control: z(se, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: p2 || null == a2 }), label: "Header Row", labelPlacement: "end" }), i2 && z(ie, { control: z(se, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: p2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
779
+ return z("div", { className: sn, children: L(Q, { sx: { pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (e3) => `${e3.spacing(2)}`, marginRight: (e3) => `${e3.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (e3) => `${e3.spacing(0.5)}` }, ...c2 }, ...u2, ref: t2, className: gt(m2, dn), children: [r2 && z(le, { control: z(ie, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: p2 || null == a2 }), label: "Header Row", labelPlacement: "end" }), i2 && z(le, { control: z(ie, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: p2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), z(le, { control: z(ie, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
780
780
  n2?.({ ...o2, showRowStripes: !o2?.showRowStripes });
781
- } }), label: "Banded Rows", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showFirstColumn ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
781
+ } }), label: "Banded Rows", labelPlacement: "end" }), z(le, { control: z(ie, { checked: o2?.showFirstColumn ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
782
782
  n2?.({ ...o2, showFirstColumn: !o2?.showFirstColumn });
783
- } }), label: "First Column", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showLastColumn ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
783
+ } }), label: "First Column", labelPlacement: "end" }), z(le, { control: z(ie, { checked: o2?.showLastColumn ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
784
784
  n2?.({ ...o2, showLastColumn: !o2?.showLastColumn });
785
- } }), label: "Last Column", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showColumnStripes ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
785
+ } }), label: "Last Column", labelPlacement: "end" }), z(le, { control: z(ie, { checked: o2?.showColumnStripes ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
786
786
  n2?.({ ...o2, showColumnStripes: !o2?.showColumnStripes });
787
- } }), label: "Banded Columns", labelPlacement: "end" }), d2 && z(ie, { control: z(se, { checked: s2 ?? false, indeterminate: null == s2, disabled: p2 || !o2 || null == s2, onChange: () => d2(!s2) }), label: "Filter Button", labelPlacement: "end" })] }) });
788
- })), pn = "_range-row_akhf4_1", un = "_action-row_akhf4_15", gn = $(O((e2, t2) => {
789
- const { disabled: o2, style: n2, className: a2, sx: r2, defaultInput: l2, value: i2, formName: s2, formOptions: d2, onChangeInput: c2, onValidate: m2, onKeyDown: p2, ...u2 } = e2, g2 = Kt(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, x2] = _(""), [b2, y2] = _(""), [w2, S2] = _(i2);
790
- U(() => {
787
+ } }), label: "Banded Columns", labelPlacement: "end" }), d2 && z(le, { control: z(ie, { checked: s2 ?? false, indeterminate: null == s2, disabled: p2 || !o2 || null == s2, onChange: () => d2(!s2) }), label: "Filter Button", labelPlacement: "end" })] }) });
788
+ })), mn = "_range-row_akhf4_1", pn = "_action-row_akhf4_15", un = $(O((e2, t2) => {
789
+ const { disabled: o2, style: n2, className: a2, sx: r2, defaultInput: l2, value: i2, formName: s2, formOptions: d2, onChangeInput: c2, onValidate: m2, onKeyDown: p2, ...u2 } = e2, g2 = Gt(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, x2] = j(""), [b2, y2] = j(""), [w2, S2] = j(i2);
790
+ _(() => {
791
791
  S2(i2), y2("");
792
792
  }, [i2]);
793
- const k2 = gt((e3) => {
793
+ const C2 = xt((e3) => {
794
794
  let t3 = "";
795
795
  try {
796
796
  S2(e3), m2?.(e3), c2?.(e3);
@@ -798,118 +798,118 @@ const qo = $(O((e2, t2) => {
798
798
  t3 = e4.message ?? "Invalid Name";
799
799
  }
800
800
  s2 && g2 && (t3 ? g2.setError(s2, { message: t3 }) : g2.clearErrors(s2)), y2(t3);
801
- }, [i2, m2, c2]), C2 = gt(async (e3) => {
802
- e3.keyCode === ft.Escape && f2 !== i2 && (k2(f2), g2?.setValue(s2, f2), g2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
803
- }, [p2, f2, i2, g2]), v2 = gt((e3) => {
801
+ }, [i2, m2, c2]), k2 = xt(async (e3) => {
802
+ e3.keyCode === yt.Escape && f2 !== i2 && (C2(f2), g2?.setValue(s2, f2), g2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
803
+ }, [p2, f2, i2, g2]), v2 = xt((e3) => {
804
804
  x2(e3.target.value ?? "");
805
- }, []), T2 = gt((e3) => {
805
+ }, []), T2 = xt((e3) => {
806
806
  x2(""), h2?.onBlur(e3);
807
807
  }, []), R2 = K((e3) => {
808
- k2(e3.target.value), h2?.onChange(e3);
808
+ C2(e3.target.value), h2?.onChange(e3);
809
809
  }, [h2]);
810
- return z(de, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...r2 }, size: "small", ref: t2, className: mt("named-input", a2), ...u2, children: z(ce, { label: "Name", placeholder: l2, onFocus: v2, onBlur: T2, inputRef: h2?.ref, disabled: o2, error: !!b2, helperText: b2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, slotProps: { inputLabel: { shrink: true }, htmlInput: { className: "autoFocus", name: s2, spellCheck: false, autoComplete: "off", readOnly: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75), backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` } } }, value: w2 ?? "", onChange: R2, onKeyDownCapture: C2, onContextMenu: (e3) => {
810
+ return z(se, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...r2 }, size: "small", ref: t2, className: gt("named-input", a2), ...u2, children: z(de, { label: "Name", placeholder: l2, onFocus: v2, onBlur: T2, inputRef: h2?.ref, disabled: o2, error: !!b2, helperText: b2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, slotProps: { inputLabel: { shrink: true }, htmlInput: { className: "autoFocus", name: s2, spellCheck: false, autoComplete: "off", readOnly: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75), backgroundImage: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})` } } }, value: w2 ?? "", onChange: R2, onKeyDownCapture: k2, onContextMenu: (e3) => {
811
811
  e3.stopPropagation();
812
812
  } }) });
813
813
  }));
814
- gn.displayName = "NamedInput";
815
- const hn = (e2) => null === e2 ? "" : e2.toString(), fn = $(O((e2, t2) => {
816
- const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = Kt(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = _(""), [x2, b2] = _(false), [y2, w2] = _(() => hn(d2));
817
- U(() => {
818
- w2(hn(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), b2(false);
814
+ un.displayName = "NamedInput";
815
+ const gn = (e2) => null === e2 ? "" : e2.toString(), hn = $(O((e2, t2) => {
816
+ const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = Gt(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = j(""), [x2, b2] = j(false), [y2, w2] = j(() => gn(d2));
817
+ _(() => {
818
+ w2(gn(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), b2(false);
819
819
  }, [d2]);
820
- const S2 = gt((e3) => {
820
+ const S2 = xt((e3) => {
821
821
  let t3 = "";
822
822
  try {
823
823
  w2(e3);
824
- const t4 = hn(d2), o3 = m2(e3);
824
+ const t4 = gn(d2), o3 = m2(e3);
825
825
  o3.toString() !== t4 && c2?.(o3);
826
826
  } catch (e4) {
827
827
  t3 = "Invalid Range";
828
828
  }
829
829
  o2 && u2 && (t3 ? u2.setError(o2, { message: t3 }) : u2.clearErrors(o2)), f2(t3), b2(true);
830
- }, [y2, c2, o2, u2]), k2 = gt(async (e3) => {
831
- if (x2 && e3.keyCode === ft.Escape) {
832
- const t3 = hn(d2);
830
+ }, [y2, c2, o2, u2]), C2 = xt(async (e3) => {
831
+ if (x2 && e3.keyCode === yt.Escape) {
832
+ const t3 = gn(d2);
833
833
  w2(t3), f2(""), b2(false), e3.stopPropagation();
834
834
  }
835
835
  s2?.(e3);
836
- }, [d2, c2, s2, x2]), C2 = gt((e3) => {
836
+ }, [d2, c2, s2, x2]), k2 = xt((e3) => {
837
837
  g2?.onBlur(e3);
838
838
  }, [g2]), v2 = K((e3) => {
839
839
  S2(e3.target.value), g2?.onChange(e3);
840
- }, [g2]), [T2, R2] = _(false), P2 = V(() => z(me, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: z(_e, { disabled: true, selected: T2, onSelectToggle: (e3) => {
840
+ }, [g2]), [T2, R2] = j(false), D2 = V(() => z(ce, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: z(Ge, { disabled: true, selected: T2, onSelectToggle: (e3) => {
841
841
  R2(e3);
842
- }, label: "Select Range", icon: z(xt, { iconKey: "SelectRangeMode" }) }) }), [T2]);
843
- return z(de, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className: mt("range-input", l2), ...p2, children: z(ce, { label: "Range", placeholder: "Enter Range", onBlur: C2, disabled: a2, error: !!h2, inputRef: g2?.ref, helperText: h2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, slotProps: { input: { endAdornment: P2 }, inputLabel: { shrink: true }, htmlInput: { spellCheck: false, autoComplete: "off", readOnly: a2, name: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75) } } }, value: y2 ?? "", onChange: v2, onKeyDownCapture: k2, onContextMenu: (e3) => {
842
+ }, label: "Select Range", icon: z(wt, { iconKey: "SelectRangeMode" }) }) }), [T2]);
843
+ return z(se, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className: gt("range-input", l2), ...p2, children: z(de, { label: "Range", placeholder: "Enter Range", onBlur: k2, disabled: a2, error: !!h2, inputRef: g2?.ref, helperText: h2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, slotProps: { input: { endAdornment: D2 }, inputLabel: { shrink: true }, htmlInput: { spellCheck: false, autoComplete: "off", readOnly: a2, name: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75) } } }, value: y2 ?? "", onChange: v2, onKeyDownCapture: C2, onContextMenu: (e3) => {
844
844
  e3.stopPropagation();
845
845
  } }) });
846
846
  }));
847
- fn.displayName = "RangeInput";
848
- const xn = [];
849
- xn.push(yo("Primary Background", "bg1")), xn.push(yo("Primary Text", "tx1")), xn.push(yo("Secondary Background", "bg2")), xn.push(yo("Secondary Text", "tx2")), xn.push(yo("Accent 1", "accent1")), xn.push(yo("Accent 2", "accent2")), xn.push(yo("Accent 3", "accent3")), xn.push(yo("Accent 4", "accent4")), xn.push(yo("Accent 5", "accent5")), xn.push(yo("Accent 6", "accent6"));
850
- const bn = (e2) => {
851
- const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 = zt(), d2 = V(() => {
847
+ hn.displayName = "RangeInput";
848
+ const fn = [];
849
+ fn.push(bo("Primary Background", "bg1")), fn.push(bo("Primary Text", "tx1")), fn.push(bo("Secondary Background", "bg2")), fn.push(bo("Secondary Text", "tx2")), fn.push(bo("Accent 1", "accent1")), fn.push(bo("Accent 2", "accent2")), fn.push(bo("Accent 3", "accent3")), fn.push(bo("Accent 4", "accent4")), fn.push(bo("Accent 5", "accent5")), fn.push(bo("Accent 6", "accent6"));
850
+ const xn = (e2) => {
851
+ const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 = ct(), d2 = V(() => {
852
852
  let e3 = [];
853
- for (let o3 = 0; o3 < xn.length; o3++) {
854
- const a3 = xn[o3];
855
- e3.push(z(xo, { schemeColorLookup: t2.schemeLookup(), colorDef: a3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
853
+ for (let o3 = 0; o3 < fn.length; o3++) {
854
+ const a3 = fn[o3];
855
+ e3.push(z(fo, { schemeColorLookup: t2.schemeLookup(), colorDef: a3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
856
856
  }
857
- return z(J, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: z(J, { sx: { display: "flex", boxShadow: (e4) => e4.shadows[2] }, children: e3 }) });
857
+ return z(Q, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: z(Q, { sx: { display: "flex", boxShadow: (e4) => e4.shadows[2] }, children: e3 }) });
858
858
  }, [t2, s2]);
859
- return z(ze, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${a2 ? e3.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (e3) => `solid ${e3.palette.text.primary} 1px !important` } }, icon: null, ...i2, children: L(J, { sx: { border: (e3) => `solid ${e3.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (e3) => a2 ? e3.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (e3) => e3.palette.text.primary } }, children: [z(J, { sx: {}, children: t2.getName() }), L(J, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [d2, z(J, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => t2.getFontScheme().getMajorFont() }, children: z(Fe, { disableInteractive: true, slotProps: { popper: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } } }, title: z("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
859
+ return z(He, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${a2 ? e3.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (e3) => `solid ${e3.palette.text.primary} 1px !important` } }, icon: null, ...i2, children: L(Q, { sx: { border: (e3) => `solid ${e3.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (e3) => a2 ? e3.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (e3) => e3.palette.text.primary } }, children: [z(Q, { sx: {}, children: t2.getName() }), L(Q, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [d2, z(Q, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => t2.getFontScheme().getMajorFont() }, children: z(Fe, { disableInteractive: true, slotProps: { popper: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } } }, title: z("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
860
860
  The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: z("div", { children: t2.getFontScheme().getMinorFont() }) }) })] })] }) });
861
- }, yn = $(O((e2, t2) => {
861
+ }, bn = $(O((e2, t2) => {
862
862
  const { themes: o2, selectedTheme: n2, onSelectTheme: a2, sx: r2, disabled: l2 = false, darkMode: i2, ...s2 } = e2, d2 = V(() => {
863
863
  const e3 = o2?.getItems({ selected: n2 }) ?? [], t3 = [];
864
- if (0 === e3.length) return z(Ke, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
864
+ if (0 === e3.length) return z(Ve, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
865
865
  const r3 = e3.length;
866
866
  for (let o3 = 0; o3 < r3; o3++) {
867
867
  const r4 = e3[o3], s3 = n2 && r4?.getName() === n2.getName(), d3 = e3[o3 + 1];
868
- d3 && d3.isCustom() !== r4.isCustom() && t3.push(z(Te, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(z(bn, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
868
+ d3 && d3.isCustom() !== r4.isCustom() && t3.push(z(ve, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(z(xn, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
869
869
  0 === e4.button && e4.preventDefault();
870
870
  }, onMouseUp: (e4) => {
871
871
  0 === e4.button && a2(r4);
872
872
  }, onKeyDown: (e4) => {
873
- e4.keyCode !== ft.Enter && e4.keyCode !== ft.Space || a2(r4);
873
+ e4.keyCode !== yt.Enter && e4.keyCode !== yt.Space || a2(r4);
874
874
  } }, r4.getName()));
875
875
  }
876
876
  return t3;
877
877
  }, [n2, a2, i2]);
878
- return z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: t2, ...s2, children: L(J, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [z(Ke, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), z(Te, {}), z(J, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: d2 })] }) });
879
- })), wn = $(O((e2, t2) => {
880
- const { themes: o2, selectedTheme: n2, onSelectTheme: a2, icon: r2, tooltip: l2, label: i2, variant: s2 = Ne.Toolbar, darkMode: d2, panelProps: c2, ...m2 } = e2, p2 = r2 || z(xt, { iconKey: "Theme2" }), u2 = { createPopupPanel: K((e3) => {
878
+ return z(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: t2, ...s2, children: L(Q, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [z(Ve, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), z(ve, {}), z(Q, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: d2 })] }) });
879
+ })), yn = $(O((e2, t2) => {
880
+ const { themes: o2, selectedTheme: n2, onSelectTheme: a2, icon: r2, tooltip: l2, label: i2, variant: s2 = Ne.Toolbar, darkMode: d2, propsPanel: c2, ...m2 } = e2, p2 = r2 || z(wt, { iconKey: "Theme2" }), u2 = { createPopupPanel: K((e3) => {
881
881
  const { closeFloatAll: t3 } = e3;
882
- return z(yn, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: d2, onKeyDown: (e4) => {
883
- e4.which === ft.Enter && t3();
882
+ return z(bn, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: d2, onKeyDown: (e4) => {
883
+ e4.which === yt.Enter && t3();
884
884
  } });
885
885
  }, [o2, n2, a2, c2, d2]), tooltip: l2 || i2 || "Theme", label: i2, icon: p2, ...m2 };
886
886
  return s2 === Ne.Toolbar ? z(Be, { ref: t2, ...u2 }) : z(Ee, { ref: t2, ...u2 });
887
- })), Sn = $(O((e2, t2) => {
888
- const { sheet: o2, className: a2, debounceDelay: r2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = _(() => o2.getView().getZoomScale()), [m2, p2] = _(null), u2 = q(0);
887
+ })), wn = $(O((e2, t2) => {
888
+ const { sheet: o2, className: a2, debounceDelay: r2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = j(() => o2.getView().getZoomScale()), [m2, p2] = j(null), u2 = q(0);
889
889
  w(o2, { onViewChange: () => {
890
890
  p2(true), 0 === u2.current && c2(o2.getView().getZoomScale());
891
- } }), U(() => {
891
+ } }), _(() => {
892
892
  u2.current = 0, p2(false), c2(o2.getView().getZoomScale());
893
- }, [o2]), U(() => {
893
+ }, [o2]), _(() => {
894
894
  0 !== u2.current && n.debounce(() => {
895
895
  d2 === u2.current && (u2.current = 0, o2.getView().update({ zoomScale: d2 }));
896
896
  }, r2)();
897
897
  }, [d2, r2]);
898
- const g2 = gt((e3) => {
898
+ const g2 = xt((e3) => {
899
899
  let t3 = e3;
900
900
  e3 < 100 ? t3 = Math.round(e3 / (10 / 9) + 10) : e3 > 100 && (t3 = Math.round(3 * e3 - 200)), u2.current = t3, p2(true), c2(t3);
901
901
  }, [o2]), h2 = (e3) => {
902
902
  let t3 = e3;
903
903
  return e3 < 100 ? t3 = 10 / 9 * (e3 - 10) : e3 > 100 && (t3 = (e3 + 200) / 3), t3;
904
- }, f2 = h2(d2), [x2, b2] = _(null), y2 = q(null), S2 = K(() => {
904
+ }, f2 = h2(d2), [x2, b2] = j(null), y2 = q(null), S2 = K(() => {
905
905
  const e3 = x2;
906
906
  e3 && requestAnimationFrame(() => {
907
907
  y2.current?.contains(document.activeElement) && e3.focus();
908
908
  });
909
- }, []), k2 = yt(() => {
909
+ }, []), C2 = Ct(() => {
910
910
  g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10)));
911
- }), C2 = yt(() => g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), v2 = zt(), T2 = V(() => `${l.getSharedMeasurer()("100%", Math.round(v2.typography.fontSize), v2.typography.fontFamily).width}px`, [v2]);
912
- return L(J, { ref: t2, className: mt(a2), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (e3) => e3.palette.text.secondary, ...i2 }, onFocus: (e3) => {
911
+ }), k2 = Ct(() => g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), v2 = ct(), T2 = V(() => `${l.getSharedMeasurer()("100%", Math.round(v2.typography.fontSize), v2.typography.fontFamily).width}px`, [v2]);
912
+ return L(Q, { ref: t2, className: gt(a2), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (e3) => e3.palette.text.secondary, ...i2 }, onFocus: (e3) => {
913
913
  e3.relatedTarget && !x2 && b2(e3.relatedTarget);
914
914
  }, onBlur: (e3) => {
915
915
  x2 && !y2?.current?.contains(e3.relatedTarget) && b2(null);
@@ -917,43 +917,41 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
917
917
  0 === e3.button && e3.preventDefault();
918
918
  }, onMouseUp: (e3) => {
919
919
  0 === e3.button && S2();
920
- }, ...s2, children: [z(Fe, { disableInteractive: true, title: "Zoom Out", children: z(te, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
921
- 0 !== e3.button ? e3.preventDefault() : k2(e3);
922
- }, children: z(xt, { iconKey: "Remove" }) }) }), z(pe, { ref: y2, 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: (e3) => `0px 0px 0px 3px ${Ue(e3.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (e3) => `0px 0px 0px 2px ${Ue(e3.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: m2 ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: false, min: 0, step: 1, value: f2, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => p2(false), onWheel: (e3) => {
920
+ }, ...s2, children: [z(Fe, { disableInteractive: true, title: "Zoom Out", children: z(ee, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
921
+ 0 !== e3.button ? e3.preventDefault() : C2(e3);
922
+ }, children: z(wt, { iconKey: "Remove" }) }) }), z(me, { ref: y2, 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: (e3) => `0px 0px 0px 3px ${je(e3.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (e3) => `0px 0px 0px 2px ${je(e3.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: m2 ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: false, min: 0, step: 1, value: f2, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => p2(false), onWheel: (e3) => {
923
923
  g2(h2(n.findNextStep(o2.getView().getZoomScale(), e3.deltaY < 0, 10)));
924
924
  }, onKeyDown: (e3) => {
925
- e3.which === ft.Down || e3.which === ft.Right ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === ft.Up || e3.which === ft.Left ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== ft.Enter && e3.which !== ft.Escape || S2();
925
+ e3.which === yt.Down || e3.which === yt.Right ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === yt.Up || e3.which === yt.Left ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== yt.Enter && e3.which !== yt.Escape || S2();
926
926
  }, onChange: (e3, t3) => {
927
927
  Math.abs(t3 - 100) < 3 ? g2(100) : g2(t3);
928
- }, valueLabelFormat: (e3, t3) => `Zoom: ${Math.round(d2)}%` }), z(Fe, { disableInteractive: true, title: "Zoom In", children: z(te, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
929
- 0 !== e3.button ? e3.preventDefault() : C2(e3);
930
- }, children: z(xt, { iconKey: "Add" }) }) }), L(J, { sx: { display: "flex", flexDirection: "row" }, children: [z(J, { sx: { minWidth: "8px" } }), z(ee, { noWrap: true, component: "div", onClick: () => {
928
+ }, valueLabelFormat: (e3, t3) => `Zoom: ${Math.round(d2)}%` }), z(Fe, { disableInteractive: true, title: "Zoom In", children: z(ee, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
929
+ 0 !== e3.button ? e3.preventDefault() : k2(e3);
930
+ }, children: z(wt, { iconKey: "Add" }) }) }), L(Q, { sx: { display: "flex", flexDirection: "row" }, children: [z(Q, { sx: { minWidth: "8px" } }), z(J, { noWrap: true, component: "div", onClick: () => {
931
931
  g2(100);
932
932
  }, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: T2 }, children: z("div", { children: Math.round(d2) + "%" }) })] })] });
933
933
  }));
934
- Sn.displayName = "SheetZoomScale";
935
- const kn = $(O((e2, t2) => {
936
- const { sx: o2, sheet: n2, gridStyle: a2, children: r2, childrenEnd: l2, ...i2 } = e2;
937
- Y(t2, () => ({}));
938
- const s2 = q(null);
939
- U(() => {
934
+ wn.displayName = "SheetZoomScale";
935
+ const Sn = $(O((e2, t2) => {
936
+ const { sx: o2, sheet: n2, gridStyle: a2, children: r2, childrenEnd: l2, ...i2 } = e2, s2 = q(null);
937
+ _(() => {
940
938
  const e3 = (e4) => e4.preventDefault();
941
939
  return s2.current?.addEventListener("wheel", e3, { passive: false }), () => {
942
940
  s2.current?.removeEventListener("wheel", e3);
943
941
  };
944
942
  }, []);
945
- const d2 = wt(), c2 = V(() => {
943
+ const d2 = kt(), c2 = V(() => {
946
944
  const e3 = d2.getMode();
947
945
  return e3?.description ? e3.description : "Ready";
948
- }, [d2]), [m2, p2] = _(false);
949
- return L(J, { ref: s2, sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: m2 ? "visible" : "hidden", boxShadow: `0px -1px 0px ${a2.header.edgeStrokeFill}`, ...o2 }, onMouseOver: () => p2(true), onMouseLeave: () => p2(false), ...i2, children: [r2, z("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? z(J, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, z(Te, { style: { marginTop: "6px", marginBottom: "6px" } }), z(Sn, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
946
+ }, [d2]), [m2, p2] = j(false);
947
+ return L(Q, { className: "statusBar", ref: Vt([s2, t2]), sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: m2 ? "visible" : "hidden", boxShadow: `0px -1px 0px ${a2.header.edgeStrokeFill}`, zIndex: 1e3, ...o2 }, onMouseOver: () => p2(true), onMouseLeave: () => p2(false), ...i2, children: [r2, z("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: z(J, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? z(Q, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, z(ve, { style: { marginTop: "6px", marginBottom: "6px" } }), z(wn, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
950
948
  }));
951
- kn.displayName = "StatusBar";
949
+ Sn.displayName = "StatusBar";
952
950
  const Cn = $(O((e2, t2) => {
953
- const { disabled: o2, names: a2, workbook: r2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, ...p2 } = e2, g2 = St(), [h2, f2] = _(null), [x2, b2] = _(() => r2.getSelectedRanges().getCoords()), [y2, S2] = _(false), { reference: k2 } = je({ parentFloat: c2?.parentFloat }), [C2, v2] = _(() => s2 || !r2.getProtection().isStructureAllowed()), T2 = () => h2?.text ?? "", [R2, P2] = _(T2), D2 = gt(() => {
954
- if (k2?.closeAll(), !R2) {
951
+ const { disabled: o2, names: a2, workbook: r2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, propsCommandPopupButton: c2, sx: m2, ...p2 } = e2, g2 = vt(), [h2, f2] = j(null), [x2, b2] = j(() => r2.getSelectedRanges().getCoords()), [y2, S2] = j(false), { reference: C2 } = _e({ parentFloat: c2?.parentFloat }), [k2, v2] = j(() => s2 || !r2.getProtection().isStructureAllowed()), T2 = () => h2?.text ?? "", [R2, D2] = j(T2), F2 = xt(() => {
952
+ if (C2?.closeAll(), !R2) {
955
953
  const e4 = T2();
956
- return P2(T2()), e4;
954
+ return D2(T2()), e4;
957
955
  }
958
956
  if (T2() === R2) return R2;
959
957
  const e3 = R2.trim().toLowerCase();
@@ -977,12 +975,12 @@ const Cn = $(O((e2, t2) => {
977
975
  }
978
976
  try {
979
977
  let e4 = a2.getByName(R2);
980
- C2 || e4 || (e4 = a2.addReference(R2, o3)), e4 && f2({ text: e4.getName() });
978
+ k2 || e4 || (e4 = a2.addReference(R2, o3)), e4 && f2({ text: e4.getName() });
981
979
  } catch (e4) {
982
- P2(T2()), g2.showMessage?.(e4.message, { type: kt.Error });
980
+ D2(T2()), g2.showMessage?.(e4.message, { type: Tt.Error });
983
981
  }
984
982
  return null;
985
- }, [R2, a2, k2, C2, g2]), F2 = gt(() => {
983
+ }, [R2, a2, C2, k2, g2]), M2 = xt(() => {
986
984
  if (r2.isClosed()) return;
987
985
  const e3 = [];
988
986
  for (let t4 = 0; t4 < x2.length; t4++) {
@@ -996,31 +994,31 @@ const Cn = $(O((e2, t2) => {
996
994
  }
997
995
  let o3 = null;
998
996
  o3 = t3?.length > 0 ? t3[0].getName() : r2.getSelectedSheet().getSelectedRange().toString(), f2({ text: o3 });
999
- }, [r2, x2]), [M2, N2] = _(() => a2?.getItems() ?? null);
997
+ }, [r2, x2]), [N2, B2] = j(() => a2?.getItems() ?? null);
1000
998
  w(a2, { onCollectionChange(e3) {
1001
- N2(a2.getItems()), F2();
999
+ B2(a2.getItems()), M2();
1002
1000
  }, onClose(e3) {
1003
- N2([]);
1004
- } }), U(() => {
1005
- P2(T2());
1001
+ B2([]);
1002
+ } }), _(() => {
1003
+ D2(T2());
1006
1004
  }, [h2, x2]);
1007
- const [B2, E2] = _(r2?.getSelectedSheet());
1005
+ const [E2, P2] = j(r2?.getSelectedSheet());
1008
1006
  w(r2, { onProtectionChange: (e3) => {
1009
1007
  v2(s2 || !e3.getProtection().isStructureAllowed());
1010
1008
  }, onSheetsChange: (e3) => {
1011
- E2(e3?.getSelectedSheet());
1009
+ P2(e3?.getSelectedSheet());
1012
1010
  }, onViewChange(e3) {
1013
- E2(e3?.getSelectedSheet());
1011
+ P2(e3?.getSelectedSheet());
1014
1012
  } });
1015
- const [I2, A2] = _(null), W2 = gt(n.debounce(F2, I2 ? 320 : 0), []);
1016
- w(B2.getSelection(), { onChange: () => {
1013
+ const [I2, A2] = j(null), W2 = xt(n.debounce(M2, I2 ? 320 : 0), []);
1014
+ w(E2.getSelection(), { onChange: () => {
1017
1015
  b2((e3) => {
1018
1016
  const t3 = r2.getSelectedRanges().getCoords();
1019
1017
  return u.isEqualRangesArrays(t3, e3) ? e3 : t3;
1020
1018
  });
1021
1019
  }, onAdjustingChange: (e3) => {
1022
1020
  A2(e3.getAdjusting());
1023
- } }), U(() => {
1021
+ } }), _(() => {
1024
1022
  if (I2) {
1025
1023
  const e3 = r2.getSelectedRange(), t3 = e3.getRowCount(), o3 = e3.getColumnCount();
1026
1024
  let n2 = `${t3}R x ${o3}C`;
@@ -1030,53 +1028,53 @@ const Cn = $(O((e2, t2) => {
1030
1028
  }, [x2, r2, I2]);
1031
1029
  const $2 = q(null), O2 = K((e3) => {
1032
1030
  const { onMouseDown: t3, onMouseUp: o3, ...n2 } = e3;
1033
- return z(te, { ...n2, sx: { ...n2?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: true, children: z(le, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: false, spellCheck: false, autoComplete: "off", ref: $2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", height: "1rem", fontSize: 11 * l.getDeviceScale(), fontStyle: h2?.fontStyle, paddingLeft: (e4) => e4.spacing(0.75), paddingRight: (e4) => e4.spacing(0.75), boxShadow: "none", flex: "1", color: (e4) => e4.palette.text.secondary, input: { padding: "0", height: "1rem", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } } }, value: R2, onFocus: (e4) => {
1031
+ return z(ee, { ...n2, sx: { ...n2?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: true, children: z(re, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: false, spellCheck: false, autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", enterKeyHint: "done", ref: $2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", height: "1rem", fontSize: 11 * l.getDeviceScale(), fontStyle: h2?.fontStyle, paddingLeft: (e4) => e4.spacing(0.75), paddingRight: (e4) => e4.spacing(0.75), boxShadow: "none", flex: "1", color: (e4) => e4.palette.text.secondary, input: { padding: "0", height: "1rem", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } } }, value: R2, onFocus: (e4) => {
1034
1032
  e4.target?.select();
1035
1033
  }, onKeyDown: (e4) => {
1036
- if (e4.which === ft.Enter || e4.which === ft.Tab) {
1034
+ if (e4.which === yt.Enter || e4.which === yt.Tab) {
1037
1035
  let t4 = R2;
1038
- T2() !== R2 && (e4.stopPropagation(), e4.preventDefault(), t4 = D2()), t4 ? V2(t4) : i2?.();
1039
- } else if (e4.which === ft.Escape) T2() !== R2 ? (P2(T2()), setTimeout(() => {
1036
+ T2() !== R2 && (e4.stopPropagation(), e4.preventDefault(), t4 = F2()), t4 ? V2(t4) : i2?.();
1037
+ } else if (e4.which === yt.Escape) T2() !== R2 ? (D2(T2()), setTimeout(() => {
1040
1038
  e4.target?.select();
1041
1039
  }, 0), e4.stopPropagation(), e4.preventDefault()) : i2?.();
1042
- else if (e4.which === ft.Space) return void e4.stopPropagation();
1040
+ else if (e4.which === yt.Space) return void e4.stopPropagation();
1043
1041
  }, onBlur: () => {
1044
- P2(T2());
1042
+ D2(T2());
1045
1043
  }, onChange: (e4) => {
1046
- P2(e4.target.value);
1044
+ D2(e4.target.value);
1047
1045
  } }) });
1048
- }, [R2, h2]), V2 = gt(async (e3) => {
1046
+ }, [R2, h2]), V2 = xt(async (e3) => {
1049
1047
  try {
1050
- k2?.closeAll();
1048
+ C2?.closeAll();
1051
1049
  const t3 = a2.lookupByRanges(e3)?.[0];
1052
- t3 && await t3?.select(), await r2.getRanges(e3)?.select();
1050
+ t3 && await t3?.select(), await r2.getRanges(e3)?.select({ autoFocus: true });
1053
1051
  } catch (e4) {
1054
- g2.showMessage?.(e4.message, { type: kt.Error });
1052
+ g2.showMessage?.(e4.message, { type: Tt.Error });
1055
1053
  }
1056
1054
  }, [a2, g2, r2]), G2 = K((e3) => {
1057
1055
  setTimeout(() => {
1058
1056
  S2(true);
1059
1057
  }, 0);
1060
- const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (k2?.closeAll(), c2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: c2?.scope, commands: c2?.commands };
1058
+ const t3 = { variant: ft.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (C2?.closeAll(), c2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: c2?.scope, commands: c2?.commands };
1061
1059
  let o3 = a2.getItems({ scope: r2?.getSelectedSheet().getName() });
1062
1060
  o3 = o3.sort((e4, t4) => e4.getType() === t4.getType() ? e4.getName().localeCompare(t4.getName()) : "range" === e4.getType() ? -1 : 1);
1063
- const n2 = C2 ? null : ["editNamedReference", "deleteNamedReference"], l2 = C2 ? null : ["editTable", null, "convertTableToRange", "deleteTable"], i3 = [], s3 = o3.length;
1061
+ const n2 = k2 ? null : ["editNamedReference", "deleteNamedReference"], l2 = k2 ? null : ["editTable", null, "convertTableToRange", "deleteTable"], i3 = [], s3 = o3.length;
1064
1062
  for (let e4 = 0; e4 < s3; e4++) {
1065
1063
  const a3 = o3[e4], r3 = a3.getRanges();
1066
1064
  if (!r3 || a3.isHidden()) continue;
1067
1065
  const s4 = a3.getType();
1068
- s4 !== o3[e4 - 1]?.getType() && (e4 > 0 && i3.push(z(Te, { orientation: "horizontal" }, `type-divider-${i3.length}`)), i3.push(z(Ke, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: "reference" === a3.getType() ? "Ranges" : "Tables" }, `type-header-${i3.length}`))), "reference" === s4 ? i3.push(X($e, { ...t3, key: "named-" + i3.length, popupCommandKeys: n2, popupScope: "namedItem", scope: "namedItem", commandState: a3, commands: c2?.commands, label: a3.getName(), quickCommand: "selectNamed", disabled: !a3.getRanges() || d2, icon: "NamedRange" })) : "table" === s4 && i3.push(X($e, { ...t3, key: "namedItem-" + i3.length, popupCommandKeys: l2, popupScope: "namedItem", scope: "namedItem", commands: c2?.commands, commandState: a3, label: a3.getName(), quickCommand: "selectNamed", disabled: !r3 || d2, icon: "InsertTable" }));
1066
+ s4 !== o3[e4 - 1]?.getType() && (e4 > 0 && i3.push(z(ve, { orientation: "horizontal" }, `type-divider-${i3.length}`)), i3.push(z(Ve, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: "reference" === a3.getType() ? "Ranges" : "Tables" }, `type-header-${i3.length}`))), "reference" === s4 ? i3.push(X(We, { ...t3, key: "named-" + i3.length, popupCommandKeys: n2, popupScope: "namedItem", scope: "namedItem", commandState: a3, commands: c2?.commands, label: a3.getName(), quickCommand: "selectNamed", disabled: !a3.getRanges() || d2, icon: "NamedRange" })) : "table" === s4 && i3.push(X(We, { ...t3, key: "namedItem-" + i3.length, popupCommandKeys: l2, popupScope: "namedItem", scope: "namedItem", commands: c2?.commands, commandState: a3, label: a3.getName(), quickCommand: "selectNamed", disabled: !r3 || d2, icon: "InsertTable" }));
1069
1067
  }
1070
- const m3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...p2, children: [C2 ? null : z(ve, { ...t3, scope: "namedItem", command: c2?.commands.getCommand("addNamedReference") }), i3 && i3.length > 0 ? L(H, { children: [C2 ? null : z(Te, { orientation: "horizontal" }), z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 })] }) : null] });
1071
- return Re({ ...e3, children: m3 });
1072
- }, [r2, M2, a2, h2, C2]), j2 = Ct(t2, () => ({ focus(e3) {
1068
+ const m3 = L(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...p2, children: [k2 ? null : z(ke, { ...t3, scope: "namedItem", command: c2?.commands.getCommand("addNamedReference") }), i3 && i3.length > 0 ? L(H, { children: [k2 ? null : z(ve, { orientation: "horizontal" }), z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 })] }) : null] });
1069
+ return Te({ ...e3, children: m3 });
1070
+ }, [r2, N2, a2, h2, k2]), U2 = Rt(t2, () => ({ focus(e3) {
1073
1071
  $2.current?.focus(e3);
1074
1072
  } }), []);
1075
- return z(J, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: _t([j2, t2]), ...p2, children: z(Be, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%" }, ...m2 }, buttonProps: { sx: { backgroundColor: (e3) => e3.palette.background.paper, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : Wt(e3.palette.divider, 0.2) }, parentFloat: k2, createPopupPanel: G2, onPopupOpen: () => S2(true), onPopupClose: () => S2(false), createTooltip: ({ children: e3 }, t3) => z(He, { title: t3 || y2 ? "" : "Name Box", disabled: t3, leaveDelay: 0, sx: { opacity: t3 || y2 ? 0 : 1 }, children: e3 }), createQuickButton: O2 }) });
1073
+ return z(Q, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Vt([U2, t2]), ...p2, children: z(Be, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%" }, ...m2 }, propsButton: { sx: { backgroundColor: (e3) => e3.palette.background.paper, backgroundImage: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : mt(e3.palette.divider, 0.2) }, parentFloat: C2, createPopupPanel: G2, onPopupOpen: () => S2(true), onPopupClose: () => S2(false), createTooltip: ({ children: e3 }, t3) => z(Le, { title: t3 || y2 ? "" : "Name Box", disabled: t3, leaveDelay: 0, sx: { opacity: t3 || y2 ? 0 : 1 }, children: e3 }), renderQuickButton: O2 }) });
1076
1074
  }));
1077
1075
  Cn.displayName = "NamedCollectionEditor";
1078
- const vn = (e2, t2) => z(Cn, { ref: t2, ...e2 }), Tn = $(O((e2, t2) => {
1079
- const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: r2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = vn, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = _(n2?.getSelectedSheet()), [h2, f2] = _(u2.getSelectedCell().getCoords()), [x2, b2] = _(false), y2 = c2 || x2;
1076
+ const kn = (e2, t2) => z(Cn, { ref: t2, ...e2 }), vn = $(O((e2, t2) => {
1077
+ const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: r2, showNamedCollectionEditor: i2 = true, propsNamedCollectionEditor: s2, renderNamedCollectionEditor: d2 = kn, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = j(n2?.getSelectedSheet()), [h2, f2] = j(u2.getSelectedCell().getCoords()), [x2, b2] = j(false), y2 = c2 || x2;
1080
1078
  w(n2, { onSheetsChange: (e3) => {
1081
1079
  const t3 = e3?.getSelectedSheet();
1082
1080
  f2(t3.getSelectedCell().getCoords()), g2(t3);
@@ -1084,26 +1082,26 @@ const vn = (e2, t2) => z(Cn, { ref: t2, ...e2 }), Tn = $(O((e2, t2) => {
1084
1082
  const t3 = e3?.getSelectedSheet();
1085
1083
  f2(t3.getSelectedCell().getCoords()), g2(t3);
1086
1084
  } });
1087
- const C2 = q(null), v2 = V(() => ({ fontSize: 11 }), []);
1085
+ const k2 = q(null), v2 = V(() => ({ fontSize: 11 }), []);
1088
1086
  w(u2.getSelection(), { onChange: () => {
1089
1087
  const e3 = u2.getSelectedCell();
1090
1088
  b2(!e3.isEditAllowed()), f2(e3.getCoords());
1091
1089
  } }), w(u2, { onProtectionChange() {
1092
1090
  b2(!u2.getSelectedCell().isEditAllowed());
1093
1091
  } });
1094
- const T2 = C2.current?.getLineHeight() ?? 20, [R2, P2] = _(T2), [D2, F2] = _(5), [M2, N2] = _(1), B2 = gt((e3, { size: t3 }) => {
1092
+ const T2 = k2.current?.getLineHeight() ?? 20, [R2, D2] = j(T2), [F2, M2] = j(5), [N2, B2] = j(1), E2 = xt((e3, { size: t3 }) => {
1095
1093
  e3.preventDefault(), e3.stopPropagation();
1096
1094
  const o3 = Math.floor(t3.height / T2);
1097
- P2(o3 * T2 + 1), o3 > 1 && F2(o3);
1098
- }, [T2]), E2 = gt((e3, { size: t3 }) => {
1095
+ D2(o3 * T2 + 1), o3 > 1 && M2(o3);
1096
+ }, [T2]), P2 = xt((e3, { size: t3 }) => {
1099
1097
  const o3 = Math.floor(t3.height / T2);
1100
- N2(o3);
1101
- }, [T2]), I2 = wt(), A2 = I2.getMode();
1098
+ B2(o3);
1099
+ }, [T2]), I2 = kt(), A2 = I2.getMode();
1102
1100
  let W2 = null;
1103
1101
  "edit" === A2?.key && (W2 = A2.args?.stateAndCoords);
1104
1102
  const $2 = V(() => {
1105
1103
  let e3 = W2?.editState;
1106
- return e3 || (e3 = S(() => u2.getRange(h2).getCell())), z(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: z(k, { ref: C2, activeCoords: h2, sheet: u2, onFocus: () => {
1104
+ return e3 || (e3 = S(() => u2.getRange(h2).getCell())), z(Q, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: z(C, { ref: k2, activeCoords: h2, sheet: u2, onFocus: () => {
1107
1105
  a2?.startEdit({ autoFocus: false, editMode: true, cell: h2 });
1108
1106
  }, defaultTextStyle: v2, useRichStyling: false, disabled: y2, onChangeEdit: (e4) => {
1109
1107
  if (void 0 !== e4.dirty) {
@@ -1114,82 +1112,82 @@ const vn = (e2, t2) => z(Cn, { ref: t2, ...e2 }), Tn = $(O((e2, t2) => {
1114
1112
  a2?.cancelEdit(), a2?.focus();
1115
1113
  }, onSubmitEdit: () => {
1116
1114
  a2?.submitEdit(), a2?.focus();
1117
- }, linesVisible: M2 }) });
1118
- }, [u2, W2, h2, M2, a2]), O2 = q(null), K2 = V(() => i2 ? d2({ names: n2.getNames(), workbook: n2, ...s2 }, O2) : null, [d2, s2, i2, u2, n2, y2]), G2 = V(() => L(ue, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, border: (e3) => `solid ${y2 ? e3.palette.action.disabled : Wt(e3.palette.divider, 0.2)} 1px` }, children: [z(ze, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "warning", "aria-label": "cancel-formula-edit", icon: z(xt, { iconKey: "CloseError" }), tooltipProps: { label: "Cancel", simple: true }, disabled: y2 || null === W2, onMouseDown: (e3) => {
1115
+ }, linesVisible: N2 }) });
1116
+ }, [u2, W2, h2, N2, a2]), O2 = q(null), K2 = V(() => i2 ? d2({ names: n2.getNames(), workbook: n2, ...s2 }, O2) : null, [d2, s2, i2, u2, n2, y2]), G2 = V(() => L(pe, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})`, border: (e3) => `solid ${y2 ? e3.palette.action.disabled : mt(e3.palette.divider, 0.2)} 1px` }, children: [z(He, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "warning", "aria-label": "cancel-formula-edit", icon: z(wt, { iconKey: "CloseError" }), propsTooltip: { label: "Cancel", simple: true }, disabled: y2 || null === W2, onMouseDown: (e3) => {
1119
1117
  0 === e3.button && e3.preventDefault();
1120
1118
  }, onClick: () => {
1121
1119
  a2.cancelEdit();
1122
- } }), z(ze, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "primary", "aria-label": "commit-formula-edit", icon: z(xt, { iconKey: "CheckSuccess" }), tooltipProps: { label: "Enter", simple: true }, disabled: y2 || null === W2, onMouseDown: (e3) => {
1120
+ } }), z(He, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "primary", "aria-label": "commit-formula-edit", icon: z(wt, { iconKey: "CheckSuccess" }), propsTooltip: { label: "Enter", simple: true }, disabled: y2 || null === W2, onMouseDown: (e3) => {
1123
1121
  0 === e3.button && e3.preventDefault();
1124
1122
  }, onClick: () => {
1125
1123
  a2.submitEdit();
1126
- } }), z(ze, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, disabled: true, "aria-label": "commit-formula-function", icon: z(xt, { iconKey: "Function", style: { transform: "scale(0.85)" } }), tooltipProps: { label: "Insert Function", simple: true }, onMouseDown: (e3) => {
1124
+ } }), z(He, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, disabled: true, "aria-label": "commit-formula-function", icon: z(wt, { iconKey: "Function", style: { transform: "scale(0.85)" } }), propsTooltip: { label: "Insert Function", simple: true }, onMouseDown: (e3) => {
1127
1125
  0 === e3.button && e3.preventDefault();
1128
- } })] }), [y2, W2]), U2 = zt(), [j2, X2] = _(false), Z2 = V(() => L(J, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [G2, L(ue, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 * l.getDeviceScale(), alignItems: "stretch", paddingTop: "2px", paddingBottom: "2px", boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, border: (e3) => `solid ${y2 ? e3.palette.action.disabled : Wt(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => y2 ? `${e3.palette.text.disabled} !important` : e3.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: () => X2(true), onBlur: () => X2(false), onMouseDown: (e3) => {
1126
+ } })] }), [y2, W2]), _2 = ct(), [U2, X2] = j(false), Z2 = V(() => L(Q, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [G2, L(pe, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 * l.getDeviceScale(), alignItems: "stretch", paddingTop: "2px", paddingBottom: "2px", boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})`, border: (e3) => `solid ${y2 ? e3.palette.action.disabled : mt(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => y2 ? `${e3.palette.text.disabled} !important` : e3.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: () => X2(true), onBlur: () => X2(false), onMouseDown: (e3) => {
1129
1127
  e3.target?.classList.contains("react-resizable-handle") && e3.preventDefault();
1130
- }, children: [z(J, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignItems: "center", marginTop: "0px", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: z(Gt, { height: R2, draggableOpts: { grid: [T2, T2] }, minConstraints: [T2, T2], maxConstraints: [15 * T2, 15 * T2], onResize: E2, onResizeStop: B2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: $2 }) }), z(ze, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, "aria-label": "toggle-expand-formula-edit", icon: z(xt, { iconKey: M2 > 1 ? "ExpandLess" : "ExpandMore" }), tooltipProps: { label: (M2 > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: true }, onMouseDown: (e3) => {
1128
+ }, children: [z(Q, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignItems: "center", marginTop: "0px", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: z(Ot, { height: R2, draggableOpts: { grid: [T2, T2] }, minConstraints: [T2, T2], maxConstraints: [15 * T2, 15 * T2], onResize: P2, onResizeStop: E2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: $2 }) }), z(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, "aria-label": "toggle-expand-formula-edit", icon: z(wt, { iconKey: N2 > 1 ? "ExpandLess" : "ExpandMore" }), propsTooltip: { label: (N2 > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: true }, onMouseDown: (e3) => {
1131
1129
  0 === e3.button && e3.preventDefault();
1132
1130
  }, onClick: () => {
1133
- const e3 = M2 > 1 ? 1 : D2;
1134
- P2(e3 * T2 + 1), N2(e3);
1135
- } }), z(J, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: j2 ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (e3) => e3.palette.primary.main, borderRadius: (e3) => `${e3.shape.borderRadius}px` } })] })] }), [G2, $2, j2, M2, T2]), Y2 = V(() => K2 || Z2 ? !K2 && Z2 ? Z2 : K2 && !Z2 ? K2 : z(H, { children: z(vt, { fixedPane: "before", minBefore: "165px", minAfter: "200px", paneBeforeProps: { style: { alignItems: "flex-start" } }, paneAfterProps: { style: { overflow: "visible" } }, resizerProps: { style: { backgroundImage: `url("data:image/svg+xml,%3Csvg width='6' height='13' viewBox='0 0 6 13' version='1.1' fill='${U2.palette.text.icon ?? U2.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: K2, elementAfter: Z2 }) }) : null, [K2, Z2]), Q2 = Ct(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => O2.current }), []);
1136
- return z(J, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Q2, ...p2, children: Y2 });
1131
+ const e3 = N2 > 1 ? 1 : F2;
1132
+ D2(e3 * T2 + 1), B2(e3);
1133
+ } }), z(Q, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: U2 ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (e3) => e3.palette.primary.main, borderRadius: (e3) => `${e3.shape.borderRadius}px` } })] })] }), [G2, $2, U2, N2, T2]), Y2 = V(() => K2 || Z2 ? !K2 && Z2 ? Z2 : K2 && !Z2 ? K2 : z(H, { children: z(Dt, { 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='${_2.palette.text.icon ?? _2.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: K2, elementAfter: Z2 }) }) : null, [K2, Z2]), J2 = Rt(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => O2.current }), []);
1134
+ return z(Q, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: J2, ...p2, children: Y2 });
1137
1135
  }));
1138
- Tn.displayName = "FormulaBar";
1139
- const Rn = $(O((e2, t2) => {
1140
- const { filter: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2, s2 = V(() => ({}), []), d2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1136
+ vn.displayName = "FormulaBar";
1137
+ const Tn = $(O((e2, t2) => {
1138
+ const { filter: o2, commands: n2, disabled: a2, style: r2, floatReference: l2, ...i2 } = e2, s2 = V(() => ({}), []), d2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1141
1139
  }, onError() {
1142
1140
  console.log("onError");
1143
- } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = V(() => ({ ...s2, ...d2, variant: ut.Menuitem }), [s2, d2]), m2 = L(H, { children: [z(ve, { ...c2, command: n2.getCommand("sortAscending") }), z(ve, { ...c2, command: n2.getCommand("sortDescending") }), z(Te, { orientation: "horizontal" }), z(ve, { ...c2, command: n2.getCommand("autoFilterClear") }), []] });
1144
- return z(J, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
1141
+ } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = V(() => ({ ...s2, ...d2, variant: ft.Menuitem }), [s2, d2]), m2 = L(H, { children: [z(ke, { ...c2, command: n2.getCommand("sortAscending") }), z(ke, { ...c2, command: n2.getCommand("sortDescending") }), z(ve, { orientation: "horizontal" }), z(ke, { ...c2, command: n2.getCommand("autoFilterClear") }), []] });
1142
+ return z(Q, { ref: t2, style: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
1145
1143
  }));
1146
- Rn.displayName = "FilterColumnMenu";
1147
- const Pn = $(O((e2, t2) => {
1148
- const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = Ct(t2, () => ({ isFilters: () => true }), []);
1149
- return z("div", { ref: s2, className: mt("filters", n2), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...r2 }, ...i2, children: L("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: [z("div", { children: l2.getName() }), z("div", { children: "Filter Widget" })] }) });
1144
+ Tn.displayName = "FilterColumnMenu";
1145
+ const Rn = $(O((e2, t2) => {
1146
+ const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = Rt(t2, () => ({ isFilters: () => true }), []);
1147
+ return z("div", { ref: s2, className: gt("filters", n2), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...r2 }, ...i2, children: L("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: [z("div", { children: l2.getName() }), z("div", { children: "Filter Widget" })] }) });
1150
1148
  }));
1151
- Pn.displayName = "Filters";
1149
+ Rn.displayName = "Filters";
1152
1150
  const Dn = $(O((e2, t2) => {
1153
- const { children: o2, sheet: n2, style: a2, className: r2, value: l2, index: i2, editing: s2, editable: d2, disabled: c2, selectedIndex: m2, dragging: p2, borderColor: u2, borderWidth: g2, activeColor: h2, background: f2 = "white", tabRadius: x2 = 4, gridTheme: b2, ...y2 } = e2, [S2, k2] = _(() => !!n2 && n2.getProtection().isLocked()), [C2, v2] = _(() => n2 ? n2.getTabColor() : null);
1151
+ const { children: o2, sheet: n2, style: a2, className: r2, value: l2, index: i2, editing: s2, editable: d2, disabled: c2, selectedIndex: m2, dragging: p2, borderColor: u2, borderWidth: g2, activeColor: h2, background: f2 = "white", tabRadius: x2 = 4, gridTheme: b2, ...y2 } = e2, [S2, C2] = j(() => !!n2 && n2.getProtection().isLocked()), [k2, v2] = j(() => n2 ? n2.getTabColor() : null);
1154
1152
  w(n2, { onProtectionChange: () => {
1155
- k2(n2.getProtection().isLocked());
1153
+ C2(n2.getProtection().isLocked());
1156
1154
  }, onTabColorChange: () => {
1157
1155
  v2(n2.getTabColor());
1158
1156
  }, onStyleChange: () => {
1159
1157
  v2(n2.getTabColor());
1160
1158
  } });
1161
- const T2 = zt(), R2 = m2 === i2;
1162
- let P2 = null, D2 = null;
1163
- if (C2 || p2) {
1159
+ const T2 = ct(), R2 = m2 === i2;
1160
+ let D2 = null, F2 = null;
1161
+ if (k2 || p2) {
1164
1162
  let e3 = f2;
1165
- C2 ? (D2 = C2.toBlackOrWhite().toCSS(), e3 = C2?.toCSS()) : R2 || (e3 = T2.palette.background.paper), P2 = z(J, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: R2 ? "50%" : "100%", borderRadius: "4px", border: (e4) => R2 ? `${f2} solid 1px` : `${e4.palette.divider} solid 1px`, background: R2 && C2 ? `linear-gradient(0deg, ${e3} 0%, transparent)` : e3 } });
1163
+ k2 ? (F2 = k2.toBlackOrWhite().toCSS(), e3 = k2?.toCSS()) : R2 || (e3 = T2.palette.background.paper), D2 = z(Q, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: R2 ? "50%" : "100%", borderRadius: "4px", border: (e4) => R2 ? `${f2} solid 1px` : `${e4.palette.divider} solid 1px`, background: R2 && k2 ? `linear-gradient(0deg, ${e3} 0%, transparent)` : e3 } });
1166
1164
  }
1167
- let F2 = null;
1168
- "string" == typeof u2 ? F2 = u2 : u2?.toCSS && (F2 = u2.toCSS());
1169
- const M2 = R2 ? z(J, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
1170
- return z(Ot, { theme: R2 ? b2 ?? T2 : T2, children: z(J, { ref: t2, className: mt(r2), sx: { ...a2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: R2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p2 ? "grabbing" : void 0 }, ...y2, children: z(Tt, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: x2, strokeColor: R2 ? F2 : "transparent", children: z(ae, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: R2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: R2 ? "primary" : D2 || "text.secondary", backgroundColor: R2 ? f2 : "transparent", "&:hover:not([disabled])": { backgroundColor: R2 ? f2 : "transparent" }, "& input": { color: (e3) => `${e3.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: c2, disableRipple: s2, component: "div", children: L(H, { children: [P2, L(J, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [L(J, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: R2 ? void 0 : "1px" }, children: [o2, M2] }), S2 ? z(xt, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : z(J, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1165
+ let M2 = null;
1166
+ "string" == typeof u2 ? M2 = u2 : u2?.toCSS && (M2 = u2.toCSS());
1167
+ const N2 = R2 ? z(Q, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
1168
+ return z(ut, { theme: R2 ? b2 ?? T2 : T2, children: z(Q, { ref: t2, className: gt(r2), sx: { ...a2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: R2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p2 ? "grabbing" : void 0 }, ...y2, children: z(Ft, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: x2, strokeColor: R2 ? M2 : "transparent", children: z(ne, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: R2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: R2 ? "primary" : F2 || "text.secondary", backgroundColor: R2 ? f2 : "transparent", "&:hover:not([disabled])": { backgroundColor: R2 ? f2 : "transparent" }, "& input": { color: (e3) => `${e3.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: c2, disableRipple: s2, component: "div", children: L(H, { children: [D2, L(Q, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [L(Q, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: R2 ? void 0 : "1px" }, children: [o2, N2] }), S2 ? z(wt, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : z(Q, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1171
1169
  }));
1172
1170
  Dn.displayName = "SheetTab";
1173
1171
  const Fn = $(O((e2, t2) => {
1174
- const { workbook: o2, index: n2, commands: a2, scope: r2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: d2, tabStripRef: c2, ...m2 } = e2, [p2, u2] = _(o2?.getProtection());
1172
+ const { workbook: o2, index: n2, commands: a2, scope: r2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: d2, tabStripRef: c2, ...m2 } = e2, [p2, u2] = j(o2?.getProtection());
1175
1173
  w(o2, { onProtectionChange: (e3) => {
1176
1174
  u2(e3?.getProtection());
1177
1175
  } });
1178
1176
  const g2 = V(() => ({}), []), h2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => i2.closeAll(), onExecute() {
1179
1177
  }, onError() {
1180
1178
  console.log("onError");
1181
- } }, scope: r2, commandState: n2, disabled: l2 || void 0 === n2, parentFloat: i2 }), [l2, i2]), f2 = V(() => ({ ...g2, ...h2 }), [g2, h2]), x2 = L(H, { children: [z(ve, { command: a2.getCommand("addSheet"), commandState: n2, ...f2, variant: ut.Menuitem }), z(ve, { command: a2.getCommand("deleteSheet"), ...f2, variant: ut.Menuitem }), L(Ie, { onMouseDown: (e3) => {
1179
+ } }, scope: r2, commandState: n2, disabled: l2 || void 0 === n2, parentFloat: i2 }), [l2, i2]), f2 = V(() => ({ ...g2, ...h2 }), [g2, h2]), x2 = L(H, { children: [z(ke, { command: a2.getCommand("addSheet"), commandState: n2, ...f2, variant: ft.Menuitem }), z(ke, { command: a2.getCommand("deleteSheet"), ...f2, variant: ft.Menuitem }), L(Pe, { onMouseDown: (e3) => {
1182
1180
  0 === e3.button && e3.preventDefault();
1183
1181
  }, onMouseUp: () => {
1184
1182
  Promise.resolve(i2.closeAll()).then(() => {
1185
1183
  c2?.startEdit(n2);
1186
1184
  });
1187
- }, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== r2 ? " Sheet" : ""] }), z(ve, { command: a2.getCommand("duplicateSheet"), ...f2, variant: ut.Menuitem }), z(ve, { command: a2?.getCommand("protectionSheetToggle"), ...f2, variant: ut.Menuitem }), z(Oo, { variant: ut.Menuitem, command: a2.getCommand("formatSheetTabColor"), icon: z(xt, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: mo.End }, parentFloat: i2 }), z(Te, { orientation: "horizontal" }), z(ve, { command: a2.getCommand("hideSheet"), ...f2, variant: ut.Menuitem })] });
1188
- return z(J, { ref: t2, className: mt("menu", d2), sx: { ...s2 }, ...m2, children: x2 });
1185
+ }, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== r2 ? " Sheet" : ""] }), z(ke, { command: a2.getCommand("duplicateSheet"), ...f2, variant: ft.Menuitem }), z(ke, { command: a2?.getCommand("protectionSheetToggle"), ...f2, variant: ft.Menuitem }), z($o, { variant: ft.Menuitem, command: a2.getCommand("formatSheetTabColor"), icon: z(wt, { iconKey: "stroke.colored" }), propsPanel: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: co.End }, parentFloat: i2 }), z(ve, { orientation: "horizontal" }), z(ke, { command: a2.getCommand("hideSheet"), ...f2, variant: ft.Menuitem })] });
1186
+ return z(Q, { ref: t2, className: gt("menu", d2), sx: { ...s2 }, ...m2, children: x2 });
1189
1187
  }));
1190
1188
  Fn.displayName = "SheetTabMenu";
1191
1189
  const Mn = $(O((e2, t2) => {
1192
- const { workbook: o2, gridStyle: n2, floatReference: a2, closeFloatAll: r2, className: l2, ...i2 } = e2, [s2, d2] = _(o2?.getSheets().getItems()), [c2, m2] = _(o2?.getProtection());
1190
+ const { workbook: o2, gridStyle: n2, floatReference: a2, closeFloatAll: r2, className: l2, ...i2 } = e2, [s2, d2] = j(o2?.getSheets().getItems()), [c2, m2] = j(o2?.getProtection());
1193
1191
  w(o2, { onSheetsChange: (e3) => {
1194
1192
  d2(e3.getSheets().getItems());
1195
1193
  }, onProtectionChange: (e3) => {
@@ -1202,12 +1200,12 @@ const Mn = $(O((e2, t2) => {
1202
1200
  if (i3 === g.Visibility.VeryHidden) continue;
1203
1201
  const s3 = r3 === l3, d3 = l3.getProtection().isLocked(), m3 = l3.getTabColor(), p3 = n2?.body.fill ?? "transparent";
1204
1202
  let u2 = null, h2 = null, f2 = p3;
1205
- m3 && (f2 = m3.toCSS(), s3 || (h2 = m3.toBlackOrWhite().toCSS()), u2 = z(J, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: s3 ? f2 : "transparent", borderRadius: "4px", border: `solid 1px ${n2.header.edgeStrokeFill}` }, children: z(J, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: s3 || i3 === g.Visibility.Hidden ? "50%" : "100%", border: (e4) => s3 ? `${p3} solid 1.5px` : `${e4.palette.divider} solid 1px`, background: s3 && m3 ? `linear-gradient(0deg, ${f2} 0%, ${p3})` : f2, borderRadius: "4px" } }) }));
1203
+ m3 && (f2 = m3.toCSS(), s3 || (h2 = m3.toBlackOrWhite().toCSS()), u2 = z(Q, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: s3 ? f2 : "transparent", borderRadius: "4px", border: `solid 1px ${n2.header.edgeStrokeFill}` }, children: z(Q, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: s3 || i3 === g.Visibility.Hidden ? "50%" : "100%", border: (e4) => s3 ? `${p3} solid 1.5px` : `${e4.palette.divider} solid 1px`, background: s3 && m3 ? `linear-gradient(0deg, ${f2} 0%, ${p3})` : f2, borderRadius: "4px" } }) }));
1206
1204
  let x2 = null;
1207
- d3 && (x2 = z(xt, { iconKey: "Lock" })), i3 !== g.Visibility.Visible && (x2 = z(xt, { iconKey: "VisibilityOff", style: { opacity: c2.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" })), x2 && (x2 = z(J, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: x2 })), e3.push(z(Ie, { disabled: !c2.isStructureAllowed() && i3 === g.Visibility.Hidden, sx: { color: (e4) => {
1205
+ d3 && (x2 = z(wt, { iconKey: "Lock" })), i3 !== g.Visibility.Visible && (x2 = z(wt, { iconKey: "VisibilityOff", style: { opacity: c2.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" })), x2 && (x2 = z(Q, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: x2 })), e3.push(z(Pe, { disabled: !c2.isStructureAllowed() && i3 === g.Visibility.Hidden, sx: { color: (e4) => {
1208
1206
  let t4 = s3 ? e4.palette.primary.main : e4.palette.text.secondary;
1209
- return h2 && (t4 = h2), i3 === g.Visibility.Hidden && (t4 = Vt(t4, e4.palette.action.disabledOpacity)), t4;
1210
- }, borderLeft: (e4) => `${s3 ? e4.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", paddingTop: "4px", paddingBottom: "4px", fontWeight: s3 ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: s3 ? z(Oe, {}) : void 0, onMouseDown: (e4) => e4.preventDefault(), onMouseUp: () => {
1207
+ return h2 && (t4 = h2), i3 === g.Visibility.Hidden && (t4 = Kt(t4, e4.palette.action.disabledOpacity)), t4;
1208
+ }, borderLeft: (e4) => `${s3 ? e4.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", paddingTop: "4px", paddingBottom: "4px", fontWeight: s3 ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: s3 ? z($e, {}) : void 0, onMouseDown: (e4) => e4.preventDefault(), onMouseUp: () => {
1211
1209
  Promise.resolve(a2.closeAll()).then(() => {
1212
1210
  try {
1213
1211
  l3.select();
@@ -1215,16 +1213,16 @@ const Mn = $(O((e2, t2) => {
1215
1213
  console.error(e4);
1216
1214
  }
1217
1215
  });
1218
- }, children: L(H, { children: [u2, L(J, { sx: { paddingRight: "0px", paddingLeft: "4px", display: "flex", flexDirection: "row", flex: "1 1 100%", overflow: "hidden", alignItems: "center", zIndex: 2 }, children: [L(J, { className: "sheet-name", sx: { display: "flex", flexDirection: "column", paddingLeft: "8px", paddingRight: "8px", alignItems: "center" }, children: [l3.getName(), z(J, { sx: { height: "0px", opacity: "0", fontWeight: "700" }, children: l3.getName() })] }), x2] })] }) }, "" + o3));
1216
+ }, children: L(H, { children: [u2, L(Q, { sx: { paddingRight: "0px", paddingLeft: "4px", display: "flex", flexDirection: "row", flex: "1 1 100%", overflow: "hidden", alignItems: "center", zIndex: 2 }, children: [L(Q, { className: "sheet-name", sx: { display: "flex", flexDirection: "column", paddingLeft: "8px", paddingRight: "8px", alignItems: "center" }, children: [l3.getName(), z(Q, { sx: { height: "0px", opacity: "0", fontWeight: "700" }, children: l3.getName() })] }), x2] })] }) }, "" + o3));
1219
1217
  }
1220
1218
  return e3;
1221
1219
  }, [o2, c2, s2, a2, n2]);
1222
- return z(J, { ref: t2, className: mt("menu", l2), ...i2, children: p2 });
1220
+ return z(Q, { ref: t2, className: gt("menu", l2), ...i2, children: p2 });
1223
1221
  }));
1224
1222
  Mn.displayName = "SheetsAllMenu";
1225
1223
  let Nn = false, Bn = false;
1226
1224
  let En = null;
1227
- const In = async (e2) => {
1225
+ const Pn = async (e2) => {
1228
1226
  const t2 = await h.getDetails();
1229
1227
  if (Bn || t2.isEval()) {
1230
1228
  try {
@@ -1239,7 +1237,7 @@ const In = async (e2) => {
1239
1237
  if (En !== e2 && (En = e2, !Nn)) try {
1240
1238
  Nn = true;
1241
1239
  (top ?? window).SheetXL && (await h._validate(true), h.wasPrinted() && (() => {
1242
- jt.consoleWithNoSource("%cTip: You can access the API directly in the console.\nTry\n%c>%c SheetXL.getRange('b2:c3').setValues([[42, 'Hello Word'], [new Date(), true]]) %c\n>%c SheetXL.moreExamples()", "color:#ffa726;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;"), Nn = true;
1240
+ _t.consoleWithNoSource("%cTip: You can access the API directly in the console.\nTry\n%c>%c SheetXL.getRange('b2:c3').setValues([[42, 'Hello Word'], [new Date(), true]]) %c\n>%c SheetXL.moreExamples()", "color:#ffa726;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;"), Nn = true;
1243
1241
  const e3 = document.getElementById("openEditorLink");
1244
1242
  e3 && e3.addEventListener("click", (e4) => {
1245
1243
  e4.preventDefault(), console.log("openScriptEditor called from console");
@@ -1249,32 +1247,32 @@ const In = async (e2) => {
1249
1247
  e3 instanceof DOMException || console.error(e3);
1250
1248
  }
1251
1249
  }
1252
- }, An = (e2) => {
1250
+ }, In = (e2) => {
1253
1251
  Bn = e2;
1254
- }, Ln = 0.12, Hn = (e2, t2) => {
1252
+ }, An = 0.12, Ln = (e2, t2) => {
1255
1253
  const o2 = {}, n2 = (e3) => {
1256
1254
  const t3 = e3.palette?.background.default ?? "rgba(255,255,255,1)";
1257
- return { text: { fontFamily: e3.typography?.fontFamily ?? "Calibri", fontSize: e3.typography?.fontSize ?? 8.25, fontWeight: e3.typography?.fontWeightRegular ?? "400", fill: "dark" === e3.palette.mode ? e3.palette?.text?.secondary : e3.palette?.text?.primary }, fill: t3, strokeFill: qe(t3, Ln, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
1255
+ return { text: { fontFamily: e3.typography?.fontFamily ?? "Calibri", fontSize: e3.typography?.fontSize ?? 8.25, fontWeight: e3.typography?.fontWeightRegular ?? "400", fill: "dark" === e3.palette.mode ? e3.palette?.text?.secondary : e3.palette?.text?.primary }, fill: t3, strokeFill: Ue(t3, An, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
1258
1256
  }, a2 = n2(t2);
1259
- o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: qe(o2.body.fill, Ln, e2.palette?.mode), fill: t2 && "dark" === e2.palette.mode && t2.palette.mode !== e2.palette.mode ? o2.body.fill : qe(o2.body.fill, 0.055, e2.palette?.mode), edgeStrokeFill: "dark" === e2.palette.mode ? o2.body.strokeFill : qe(o2.body.fill, 0.328, e2.palette?.mode) }, o2.headerHover = (t3) => ({ ...o2.header, strokeFill: qe(t3?.fill ?? o2.body.fill, 0.22, e2.palette?.mode), fill: qe(t3?.fill ?? o2.header.fill, 0.065, e2.palette?.mode), text: { ...t3?.text, fontWeight: e2.typography?.fontWeightBold } });
1260
- const r2 = qe("dark" !== e2.palette.mode ? e2.palette.primary.light : e2.palette.primary.main, 0.055, e2.palette?.mode);
1261
- o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill: Vt(r2, 0.2), text: { ...o2.header.text, fill: e2.palette.primary.main }, dividerStrokeFill: Vt(r2, 0.7) }, o2.headerSelectAll = { ...o2.headerSelect, fill: Vt(r2, 0.9), text: { ...o2.headerSelect.text, fill: e2.palette.primary.contrastText }, edgeStrokeFill: o2.headerSelect.strokeFill }, o2.buttonSurface = { ...a2, strokeFill: qe(a2.fill, Ln, t2.palette?.mode), fill: t2 && "dark" === t2.palette.mode && t2.palette.mode !== e2.palette.mode ? a2.fill : qe(a2.fill, 0.055, t2.palette?.mode), edgeStrokeFill: "dark" === t2.palette.mode ? a2.strokeFill : qe(a2.fill, 0.328, t2.palette?.mode) }, o2.headerSelection = { fill: e2.palette?.primary?.main ? Vt(e2.palette?.primary?.main, 0.1) : void 0, strokeFill: e2.palette?.primary?.main }, o2.headerSelectionInactive = { ...o2.headerSelection, fill: e2.palette?.divider ? Vt(e2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
1257
+ o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: Ue(o2.body.fill, An, e2.palette?.mode), fill: t2 && "dark" === e2.palette.mode && t2.palette.mode !== e2.palette.mode ? o2.body.fill : Ue(o2.body.fill, 0.055, e2.palette?.mode), edgeStrokeFill: "dark" === e2.palette.mode ? o2.body.strokeFill : Ue(o2.body.fill, 0.328, e2.palette?.mode) }, o2.headerHover = (t3) => ({ ...o2.header, strokeFill: Ue(t3?.fill ?? o2.body.fill, 0.22, e2.palette?.mode), fill: Ue(t3?.fill ?? o2.header.fill, 0.065, e2.palette?.mode), text: { ...t3?.text, fontWeight: e2.typography?.fontWeightBold } });
1258
+ const r2 = Ue("dark" !== e2.palette.mode ? e2.palette.primary.light : e2.palette.primary.main, 0.055, e2.palette?.mode);
1259
+ o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill: Kt(r2, 0.2), text: { ...o2.header.text, fill: e2.palette.primary.main }, dividerStrokeFill: Kt(r2, 0.7) }, o2.headerSelectAll = { ...o2.headerSelect, fill: Kt(r2, 0.9), text: { ...o2.headerSelect.text, fill: e2.palette.primary.contrastText }, edgeStrokeFill: o2.headerSelect.strokeFill }, o2.buttonSurface = { ...a2, strokeFill: Ue(a2.fill, An, t2.palette?.mode), fill: t2 && "dark" === t2.palette.mode && t2.palette.mode !== e2.palette.mode ? a2.fill : Ue(a2.fill, 0.055, t2.palette?.mode), edgeStrokeFill: "dark" === t2.palette.mode ? a2.strokeFill : Ue(a2.fill, 0.328, t2.palette?.mode) }, o2.headerSelection = { fill: e2.palette?.primary?.main ? Kt(e2.palette?.primary?.main, 0.1) : void 0, strokeFill: e2.palette?.primary?.main }, o2.headerSelectionInactive = { ...o2.headerSelection, fill: e2.palette?.divider ? Kt(e2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
1262
1260
  const l2 = t2 ?? e2, i2 = "dark" === l2.palette.mode;
1263
- return o2.selection = { fill: l2.palette?.primary?.main ? Vt(l2.palette?.primary?.main, 0.1) : void 0, strokeFill: l2.palette?.primary?.main }, o2.selectionInactive = { ...o2.selection, fill: l2.palette?.divider ? Vt(l2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, o2.selectionRemove = { ...o2.selection, fill: Vt(l2.palette.warning.light, 0.05), strokeFill: l2.palette.warning.dark }, t2 && (o2.body = n2(t2)), o2.colorShadow = Vt(l2.palette.action.active, 0.5), o2.colorGrey = l2.palette.action.active, o2.filterDarkInvert = i2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", o2;
1264
- }, zn = $(O((e2, t2) => {
1265
- const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 = Ct(t2, () => ({}), []), [i2, s2] = Ut(), d2 = q(null), c2 = q(null), [m2, p2] = W.useReducer((e3) => e3 + 1, 0), [u2, g2] = _(null), [h2, f2] = _(null), [x2, b2] = _(null), { reference: y2 } = je({ parentFloat: a2, label: "overflow" });
1266
- Q(() => {
1261
+ return o2.selection = { fill: l2.palette?.primary?.main ? Kt(l2.palette?.primary?.main, 0.1) : void 0, strokeFill: l2.palette?.primary?.main }, o2.selectionInactive = { ...o2.selection, fill: l2.palette?.divider ? Kt(l2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, o2.selectionRemove = { ...o2.selection, fill: Kt(l2.palette.warning.light, 0.05), strokeFill: l2.palette.warning.dark }, t2 && (o2.body = n2(t2)), o2.colorShadow = Kt(l2.palette.action.active, 0.5), o2.colorGrey = l2.palette.action.active, o2.filterDarkInvert = i2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", o2;
1262
+ }, Hn = "_sheetxl-theme_4opcr_2", zn = $(O((e2, t2) => {
1263
+ const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 = Rt(t2, () => ({}), []), [i2, s2] = jt(), d2 = q(null), c2 = q(null), [m2, p2] = W.useReducer((e3) => e3 + 1, 0), [u2, g2] = j(null), [h2, f2] = j(null), [x2, b2] = j(null), { reference: y2 } = _e({ parentFloat: a2, label: "overflow" });
1264
+ Y(() => {
1267
1265
  c2.current = { refs: [] };
1268
1266
  const e3 = [], t3 = W.Children.toArray(o2);
1269
1267
  let n3 = 0;
1270
1268
  t3.forEach((o3, a3) => {
1271
- e3.push(z(J, { sx: { display: "flex" }, ref: (e4) => {
1269
+ e3.push(z(Q, { sx: { display: "flex" }, ref: (e4) => {
1272
1270
  n3++, n3 === t3.length && p2();
1273
1271
  const o4 = { current: null };
1274
1272
  o4.current = e4, c2.current.refs[a3] = o4;
1275
1273
  }, children: o3 }, a3));
1276
1274
  }), g2(e3);
1277
- }, [o2, s2]), Q(() => {
1275
+ }, [o2, s2]), Y(() => {
1278
1276
  if (!u2) return;
1279
1277
  const e3 = c2.current.refs, t3 = e3 ? e3.length : 0;
1280
1278
  if (!l2.current || 0 === t3) return f2(null), void b2(null);
@@ -1304,7 +1302,7 @@ const In = async (e2) => {
1304
1302
  }
1305
1303
  f2(n3.length > 0 ? n3 : null), b2(a3.length > 0 ? a3 : null);
1306
1304
  }, [o2, u2, s2, y2, m2]);
1307
- const w2 = gt((e3) => {
1305
+ const w2 = xt((e3) => {
1308
1306
  const t3 = [], o3 = x2.length;
1309
1307
  for (let n4 = 0; n4 < o3; n4++) {
1310
1308
  const o4 = W.Children.toArray(x2[n4])[0];
@@ -1315,10 +1313,10 @@ const In = async (e2) => {
1315
1313
  t3.push(i3);
1316
1314
  });
1317
1315
  }
1318
- const n3 = z(J, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (e4) => e4.spacing(0.25), paddingTop: (e4) => e4.spacing(0.5), paddingBottom: (e4) => e4.spacing(0.5), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1), overflow: "hidden" }, children: t3 });
1319
- return Re({ ...e3, children: n3 });
1316
+ const n3 = z(Q, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (e4) => e4.spacing(0.25), paddingTop: (e4) => e4.spacing(0.5), paddingBottom: (e4) => e4.spacing(0.5), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1), overflow: "hidden" }, children: t3 });
1317
+ return Te({ ...e3, children: n3 });
1320
1318
  }, [x2]);
1321
- return L(J, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: _t([l2, i2, t2]), ...r2, children: [z(J, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%", alignItems: "center" }, children: h2 ?? u2 }), z(J, { className: "overflow-palette-popup-button", sx: { display: null !== x2 && 0 === x2.length ? "none" : "flex", flex: "1 1 0" }, children: z(Be, { createPopupPanel: w2, ref: d2, parentFloat: y2, createTooltip: ({ children: e3 }, t3) => z(He, { label: "More", description: "More toolbar options…", disabled: t3, children: e3 }), icon: z(xt, { iconKey: "MoreHorizontal" }) }) })] });
1319
+ return L(Q, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Vt([l2, i2, t2]), ...r2, children: [z(Q, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%", alignItems: "center" }, children: h2 ?? u2 }), z(Q, { className: "overflow-palette-popup-button", sx: { display: null !== x2 && 0 === x2.length ? "none" : "flex", flex: "1 1 0" }, children: z(Be, { createPopupPanel: w2, ref: d2, parentFloat: y2, createTooltip: ({ children: e3 }, t3) => z(Le, { label: "More", description: "More toolbar options…", disabled: t3, children: e3 }), icon: z(wt, { iconKey: "MoreHorizontal" }) }) })] });
1322
1320
  })), Wn = "https://unpkg.com/@sheetxl/scripting-templates/dist", $n = (e2) => {
1323
1321
  if (e2.metadata?.name) return e2.metadata.name;
1324
1322
  let t2 = (e2.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
@@ -1326,10 +1324,10 @@ const In = async (e2) => {
1326
1324
  t2 = t2.replace(/([a-z])([A-Z])/g, "$1 $2");
1327
1325
  return t2.replace(/[-_]/g, " ").trim().split(/\s+/).map((e3) => e3.charAt(0).toUpperCase() + e3.slice(1)).join(" ");
1328
1326
  }, On = async (e2) => {
1329
- const t2 = to.relativePath(e2, "./manifest.json"), o2 = await fetch(t2);
1330
- if (!o2.ok) throw new qt(`Failed to retrieve directory at '${e2}': ${o2.statusText}`);
1327
+ const t2 = eo.relativePath(e2, "./manifest.json"), o2 = await fetch(t2);
1328
+ if (!o2.ok) throw new Ut(`Failed to retrieve directory at '${e2}': ${o2.statusText}`);
1331
1329
  const n2 = await o2.text();
1332
- if (n2.trim().toLowerCase().startsWith("<!doctype html") || n2.trim().toLowerCase().startsWith("<html")) throw new qt(`Failed to retrieve directory at '${e2}'`);
1330
+ if (n2.trim().toLowerCase().startsWith("<!doctype html") || n2.trim().toLowerCase().startsWith("<html")) throw new Ut(`Failed to retrieve directory at '${e2}'`);
1333
1331
  let a2;
1334
1332
  try {
1335
1333
  a2 = JSON.parse(n2);
@@ -1338,7 +1336,7 @@ const In = async (e2) => {
1338
1336
  }
1339
1337
  const r2 = a2.map(async (t3) => {
1340
1338
  try {
1341
- const o3 = to.relativePath(e2, t3.path), n3 = await fetch(o3);
1339
+ const o3 = eo.relativePath(e2, t3.path), n3 = await fetch(o3);
1342
1340
  if (!n3.ok) throw new Error(`Failed to fetch file at '${t3.path}': ${n3.statusText}`);
1343
1341
  const a3 = await n3.text();
1344
1342
  let r3 = t3.metadata;
@@ -1354,16 +1352,16 @@ const In = async (e2) => {
1354
1352
  const { disabled: t2, snippet: o2, description: n2, handleInsert: a2, sx: r2, ...l2 } = e2;
1355
1353
  let i2;
1356
1354
  const s2 = o2.metadata?.icon;
1357
- return i2 = z(xt, "formula" === s2 ? { iconKey: "ScriptFormula", size: Kn, style: Vn } : "macro" === s2 ? { iconKey: "ScriptMacro", size: Kn, style: Vn } : { iconKey: "ScriptAutoStart", size: Kn, style: Vn }), z(Ie, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...r2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
1355
+ return i2 = z(wt, "formula" === s2 ? { iconKey: "ScriptFormula", size: Kn, style: Vn } : "macro" === s2 ? { iconKey: "ScriptMacro", size: Kn, style: Vn } : { iconKey: "ScriptAutoStart", size: Kn, style: Vn }), z(Pe, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...r2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
1358
1356
  0 === e3.button && e3.preventDefault();
1359
1357
  }, onMouseUp: (e3) => {
1360
1358
  0 === e3.button && a2(o2);
1361
1359
  }, onKeyDown: (e3) => {
1362
- e3.keyCode !== ft.Enter && e3.keyCode !== ft.Space || a2(o2);
1363
- }, ...l2, children: L(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [z(ee, { component: "div", children: o2.metadata?.title ?? o2.path }), z(ee, { variant: "caption", component: "div", sx: { color: (e3) => Vt(e3.palette.text.secondary ?? e3.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o2.metadata?.summary })] }) });
1364
- }), _n = $(O((e2, t2) => {
1365
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = Wn, ...i2 } = e2, [s2, d2] = _([]), [c2, m2] = _(true), p2 = pt(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1366
- U(() => {
1360
+ e3.keyCode !== yt.Enter && e3.keyCode !== yt.Space || a2(o2);
1361
+ }, ...l2, children: L(Q, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [z(J, { component: "div", children: o2.metadata?.title ?? o2.path }), z(J, { variant: "caption", component: "div", sx: { color: (e3) => Kt(e3.palette.text.secondary ?? e3.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o2.metadata?.summary })] }) });
1362
+ }), jn = $(O((e2, t2) => {
1363
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = Wn, ...i2 } = e2, [s2, d2] = j([]), [c2, m2] = j(true), p2 = ht(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1364
+ _(() => {
1367
1365
  (async () => {
1368
1366
  try {
1369
1367
  const e3 = await On(l2);
@@ -1376,28 +1374,28 @@ const In = async (e2) => {
1376
1374
  }, [l2]);
1377
1375
  const g2 = K((e3, t3) => {
1378
1376
  if (c2) return z("div", { children: "Loading..." });
1379
- const a3 = { variant: ut.Menuitem, commandHook: n2, scope: "scripts", disabled: r2 }, l3 = (t4) => {
1377
+ const a3 = { variant: ft.Menuitem, commandHook: n2, scope: "scripts", disabled: r2 }, l3 = (t4) => {
1380
1378
  u2.getEditor()?.insertSnippet(t4.content), e3.closeFloat();
1381
1379
  }, i3 = [];
1382
1380
  for (let e4 = 0; e4 < s2.length; e4++) {
1383
1381
  const t4 = s2[e4];
1384
1382
  t4 && i3.push(z(Gn, { handleInsert: l3, snippet: t4 }, t4.path));
1385
1383
  }
1386
- const d3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [i3.length > 0 ? L(H, { children: [z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 }), z(Te, { orientation: "horizontal" })] }) : null, X(ve, { ...a3, key: "help", command: o2.getCommand("help") })] });
1387
- return Re({ ...e3, children: d3 });
1384
+ const d3 = L(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [i3.length > 0 ? L(H, { children: [z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 }), z(ve, { orientation: "horizontal" })] }) : null, X(ke, { ...a3, key: "help", command: o2.getCommand("help") })] });
1385
+ return Te({ ...e3, children: d3 });
1388
1386
  }, [r2, n2, a2, c2, u2]);
1389
- return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Insert Script", tooltip: "Inserts a script from a set of templates.", createPopupPanel: g2, icon: "ScriptInsert", ...i2 });
1390
- })), Un = $(O((e2, t2) => {
1391
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
1392
- const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1393
- return z(H, { children: L("div", { style: { display: "flex", flex: "1 1 100%" }, children: [z("div", { children: z(zn, { parentFloat: n2, style: {}, children: z(ve, { ...t3, command: o2?.getCommand("saveScripts") }) }) }), z("div", { style: { flex: "1 1 100%" } }), z("div", { children: z(zn, { parentFloat: n2, style: {}, children: z(_n, { ...t3, commands: o2 }) }) })] }) });
1387
+ return z(Re, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Insert Script", tooltip: "Inserts a script from a set of templates.", createPopupPanel: g2, icon: "ScriptInsert", ...i2 });
1388
+ })), _n = $(O((e2, t2) => {
1389
+ const { commands: o2, parentFloat: n2, propsCommandButton: a2, ...r2 } = e2, l2 = xt((e3) => {
1390
+ const { propsCommandButton: t3, propsCommandPopup: a3 } = e3;
1391
+ return z(H, { children: L("div", { style: { display: "flex", flex: "1 1 100%" }, children: [z("div", { children: z(zn, { parentFloat: n2, style: {}, children: z(ke, { ...t3, command: o2?.getCommand("saveScripts") }) }) }), z("div", { style: { flex: "1 1 100%" } }), z("div", { children: z(zn, { parentFloat: n2, style: {}, children: z(jn, { ...t3, commands: o2 }) }) })] }) });
1394
1392
  }, [o2]);
1395
- return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1393
+ return z(qe, { ref: t2, commands: o2, parentFloat: n2, propsCommandButton: a2, renderToolbarPalette: l2, ...r2 });
1396
1394
  }));
1397
- Un.displayName = "ScriptEditorToolbar";
1398
- const jn = $(O((e2, t2) => {
1399
- const { scriptPath: o2 = Wn, onScriptSelect: n2, sx: a2 = ht.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = _([]), [p2, u2] = _(true), [g2, h2] = _(null);
1400
- if (U(() => {
1395
+ _n.displayName = "ScriptEditorToolbar";
1396
+ const Un = $(O((e2, t2) => {
1397
+ const { scriptPath: o2 = Wn, onScriptSelect: n2, sx: a2 = bt.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = j([]), [p2, u2] = j(true), [g2, h2] = j(null);
1398
+ if (_(() => {
1401
1399
  (async () => {
1402
1400
  const e3 = [{ path: null, metadata: { title: "Blank Template...", summary: "Start with an empty script." }, content: "" }];
1403
1401
  try {
@@ -1408,24 +1406,24 @@ const jn = $(O((e2, t2) => {
1408
1406
  n3 && e3.push(n3);
1409
1407
  }
1410
1408
  } catch (e4) {
1411
- h2(e4 instanceof Error ? e4.message : "Failed to load scripts"), e4 instanceof qt || console.error("Error loading scripts:", e4);
1409
+ h2(e4 instanceof Error ? e4.message : "Failed to load scripts"), e4 instanceof Ut || console.error("Error loading scripts:", e4);
1412
1410
  } finally {
1413
1411
  m2(e3), u2(false);
1414
1412
  }
1415
1413
  })();
1416
- }, [o2]), p2) return z(J, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: mt(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, ...a2 }, ...d2, children: z(ge, {}) });
1414
+ }, [o2]), p2) return z(Q, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: gt(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})`, ...a2 }, ...d2, children: z(ue, {}) });
1417
1415
  let f2 = null;
1418
- g2 && (f2 = L(J, { display: "flex", justifyContent: "center", alignItems: "center", className: mt(r2, "script-select", "error-results"), sx: { background: (e3) => e3.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (e3) => e3.spacing(1), border: (e3) => `1px solid ${e3.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` }, ...d2, children: [z(ee, { color: "error", variant: "h6", component: "div", gutterBottom: true, children: "Error loading Templates" }), z(ee, { color: "error", component: "div", children: g2 })] }));
1416
+ g2 && (f2 = L(Q, { display: "flex", justifyContent: "center", alignItems: "center", className: gt(r2, "script-select", "error-results"), sx: { background: (e3) => e3.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (e3) => e3.spacing(1), border: (e3) => `1px solid ${e3.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})` }, ...d2, children: [z(J, { color: "error", variant: "h6", component: "div", gutterBottom: true, children: "Error loading Templates" }), z(J, { color: "error", component: "div", children: g2 })] }));
1419
1417
  const x2 = (e3) => {
1420
1418
  const t3 = e3.metadata?.icon;
1421
- return "macro" === t3 ? z(xt, { iconKey: "ScriptMacro", size: "1em" }) : "formula" === t3 ? z(xt, { iconKey: "ScriptFormula", size: "1em" }) : "autostart" === t3 ? z(xt, { iconKey: "ScriptAutoStart", size: "1em" }) : null;
1419
+ return "macro" === t3 ? z(wt, { iconKey: "ScriptMacro", size: "1em" }) : "formula" === t3 ? z(wt, { iconKey: "ScriptFormula", size: "1em" }) : "autostart" === t3 ? z(wt, { iconKey: "ScriptAutoStart", size: "1em" }) : null;
1422
1420
  };
1423
- return L(J, { ref: t2, className: mt(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, ...a2 }, ...d2, children: [L(J, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [z(ee, { variant: "h6", gutterBottom: true, children: "Script Template" }), z(ee, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), z(ee, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Templates provide a foundation to customize and meet your specific needs." }), z(J, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${l2}px, 1fr))`, gap: `${s2}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: c2.map((e3, t3) => L(ae, { variant: "outlined", sx: { minWidth: l2, minHeight: i2, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...0 === t3 && { borderStyle: "dashed", marginBottom: "8px" }, ...1 === t3 && { gridColumn: "1" } }, onClick: () => n2?.(e3), children: [L(J, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [z(ee, { variant: "subtitle2", component: "div", children: e3.metadata?.title || e3.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), x2(e3)] }), e3.metadata?.summary && z(ee, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: e3.metadata.summary })] }, `${e3.path}-${t3}`)) })] }), f2] });
1421
+ return L(Q, { ref: t2, className: gt(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})`, ...a2 }, ...d2, children: [L(Q, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [z(J, { variant: "h6", gutterBottom: true, children: "Script Template" }), z(J, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), z(J, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Templates provide a foundation to customize and meet your specific needs." }), z(Q, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${l2}px, 1fr))`, gap: `${s2}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: c2.map((e3, t3) => L(ne, { variant: "outlined", sx: { minWidth: l2, minHeight: i2, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...0 === t3 && { borderStyle: "dashed", marginBottom: "8px" }, ...1 === t3 && { gridColumn: "1" } }, onClick: () => n2?.(e3), children: [L(Q, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [z(J, { variant: "subtitle2", component: "div", children: e3.metadata?.title || e3.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), x2(e3)] }), e3.metadata?.summary && z(J, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: e3.metadata.summary })] }, `${e3.path}-${t3}`)) })] }), f2] });
1424
1422
  }));
1425
- jn.displayName = "TemplateSelectPanel";
1423
+ Un.displayName = "TemplateSelectPanel";
1426
1424
  const qn = $(O((e2, t2) => {
1427
- const { className: o2, sx: n2, editorProps: a2, commands: r2, readOnly: l2 = false, frame: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 = zt(), [u2, g2] = _(false), h2 = q(false), [f2, x2] = _({ message: "Loading", cursor: "", dirty: false }), [b2, y2] = _(null);
1428
- U(() => {
1425
+ const { className: o2, sx: n2, propsScriptEditor: a2, commands: r2, readOnly: l2 = false, frame: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 = ct(), [u2, g2] = j(false), h2 = q(false), [f2, x2] = j({ message: "Loading", cursor: "", dirty: false }), [b2, y2] = j(null);
1426
+ _(() => {
1429
1427
  let e3 = false;
1430
1428
  return y2(null), (async function() {
1431
1429
  if (c2 && (await c2.start(), !e3)) {
@@ -1438,36 +1436,36 @@ const qn = $(O((e2, t2) => {
1438
1436
  }, [c2]);
1439
1437
  const w2 = K((e3) => {
1440
1438
  x2((t3) => ({ ...t3, ...e3 }));
1441
- }, []), S2 = q(null), [k2, v2] = _(null), T2 = q(null), R2 = gt((e3) => {
1442
- if (k2) return k2.focus(e3), true;
1439
+ }, []), S2 = q(null), [C2, v2] = j(null), T2 = q(null), R2 = xt((e3) => {
1440
+ if (C2) return C2.focus(e3), true;
1443
1441
  if (s2) {
1444
1442
  const t3 = S2.current?.querySelectorAll?.(s2);
1445
1443
  if (t3 && t3.length > 0) return t3[0]?.focus?.(e3), true;
1446
1444
  }
1447
1445
  return S2.current?.focus?.(e3), false;
1448
- }, [k2, s2, d2]), P2 = V(() => z(Me, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), D2 = V(() => z(ue, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (e3) => e3.spacing(0.5), marginRight: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: z(Un, { commands: r2 }) }), [p2, r2]), F2 = V(() => z(J, { className: mt("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 ${p2.palette.divider}` }, children: L("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.message }), z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.dirty ? "Unsaved" : "" }), z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.cursor })] }) }), [f2]), M2 = V(() => L(J, { className: mt("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [D2, z(J, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: z(C, { ref: S2, loadingPanel: P2, readOnly: l2, frame: i2, autoFocus: d2, commands: r2, onStatusChange: w2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), F2] }), [p2, r2, D2, F2, u2, P2, l2, a2, d2, s2, i2, w2]), N2 = V(() => {
1446
+ }, [C2, s2, d2]), D2 = V(() => z(Me, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), F2 = V(() => z(pe, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (e3) => e3.spacing(0.5), marginRight: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: z(_n, { commands: r2 }) }), [p2, r2]), M2 = V(() => z(Q, { className: gt("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 ${p2.palette.divider}` }, children: L("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [z(J, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.message }), z(J, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.dirty ? "Unsaved" : "" }), z(J, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.cursor })] }) }), [f2]), N2 = V(() => L(Q, { className: gt("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [F2, z(Q, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: z(k, { ref: S2, loadingPanel: D2, readOnly: l2, frame: i2, autoFocus: d2, commands: r2, onStatusChange: w2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), M2] }), [p2, r2, F2, M2, u2, D2, l2, a2, d2, s2, i2, w2]), B2 = V(() => {
1449
1447
  let e3;
1450
- return null === b2 ? null : (null === b2.source && (e3 = z(jn, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
1448
+ return null === b2 ? null : (null === b2.source && (e3 = z(Un, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
1451
1449
  S2.current?.getEditor()?.insertSnippet(e4.content), y2({ source: e4.content ?? "" });
1452
- } })), z(J, { tabIndex: 0, className: mt("script-workspace", o2), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none" }, onPointerDown: (e4) => {
1450
+ } })), z(Q, { tabIndex: 0, className: gt("script-workspace", o2), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none" }, onPointerDown: (e4) => {
1453
1451
  e4.isDefaultPrevented() || S2.current?.focus();
1454
- }, children: L(J, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [M2, e3] }) }));
1455
- }, [D2, M2, o2, b2]), B2 = Ct(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
1452
+ }, children: L(Q, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [N2, e3] }) }));
1453
+ }, [F2, N2, o2, b2]), E2 = Rt(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
1456
1454
  R2(e3);
1457
1455
  } }), []);
1458
- return z(J, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: B2, ...m2, onFocus: (e3) => {
1459
- g2(true), h2.current = true, B2.current?.contains(e3.target) && e3.target !== B2.current && v2(e3.target), e3.relatedTarget && !T2.current && (T2.current = e3.relatedTarget), m2?.onFocus?.(e3);
1456
+ return z(Q, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: E2, ...m2, onFocus: (e3) => {
1457
+ g2(true), h2.current = true, E2.current?.contains(e3.target) && e3.target !== E2.current && v2(e3.target), e3.relatedTarget && !T2.current && (T2.current = e3.relatedTarget), m2?.onFocus?.(e3);
1460
1458
  }, onBlur: (e3) => {
1461
- B2?.current?.contains(e3.relatedTarget) || B2?.current === e3.relatedTarget || (T2.current = null, h2.current = false, g2(false)), m2?.onBlur?.(e3);
1462
- }, children: N2 });
1459
+ E2?.current?.contains(e3.relatedTarget) || E2?.current === e3.relatedTarget || (T2.current = null, h2.current = false, g2(false)), m2?.onBlur?.(e3);
1460
+ }, children: B2 });
1463
1461
  }));
1464
1462
  qn.displayName = "ScriptWorkspace";
1465
1463
  const Xn = (e2, t2) => {
1466
1464
  const { model: o2, commands: n2, entryKey: a2, frame: r2, ...l2 } = e2;
1467
1465
  return z(qn, { ref: t2, readOnly: false, commands: n2, frame: r2, scripts: o2?.getScripts(), ...l2 });
1468
1466
  }, Zn = $(O((e2, t2) => {
1469
- const { commands: o2, ...n2 } = e2, a2 = pt(o2, ["executeScript", "showScriptEditor"]), [r2, l2] = _([]), [i2, s2] = _(false), d2 = a2[0]?.context?.();
1470
- U(() => {
1467
+ const { commands: o2, ...n2 } = e2, a2 = ht(o2, ["executeScript", "showScriptEditor"]), [r2, l2] = j([]), [i2, s2] = j(false), d2 = a2[0]?.context?.();
1468
+ _(() => {
1471
1469
  const e3 = d2?.getScripts();
1472
1470
  if (!e3) return;
1473
1471
  (async () => {
@@ -1476,24 +1474,24 @@ const Xn = (e2, t2) => {
1476
1474
  l2(t3), s2(false);
1477
1475
  })();
1478
1476
  }, []);
1479
- const c2 = { variant: ut.Menuitem, parentFloat: e2.floatReference, scope: "scripts", shortcut: null }, m2 = [], p2 = r2.length;
1477
+ const c2 = { variant: ft.Menuitem, parentFloat: e2.floatReference, scope: "scripts", shortcut: null }, m2 = [], p2 = r2.length;
1480
1478
  for (let e3 = 0; e3 < p2; e3++) {
1481
1479
  const t3 = r2[e3];
1482
- m2.push(z(ve, { ...c2, command: o2.getCommand("executeScript"), commandState: { declaration: t3 }, tooltipProps: { description: `Execute ${t3.getName() ?? "macro"}` }, icon: z(xt, { iconKey: "ScriptMacro" }), label: t3.getName() ?? `Script '${t3.getName()}'` }, `macro-${t3.getName()}-${e3}`));
1480
+ m2.push(z(ke, { ...c2, command: o2.getCommand("executeScript"), commandState: { declaration: t3 }, propsTooltip: { description: `Execute ${t3.getName() ?? "macro"}` }, icon: z(wt, { iconKey: "ScriptMacro" }), label: t3.getName() ?? `Script '${t3.getName()}'` }, `macro-${t3.getName()}-${e3}`));
1483
1481
  }
1484
- const u2 = L(J, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [m2.length > 0 ? L(H, { children: [z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: m2 }), z(Te, { orientation: "horizontal" })] }) : null, X(ve, { ...c2, key: "show-editor", command: o2.getCommand("showScriptEditor") })] });
1485
- return Re({ ...n2, children: u2 });
1482
+ const u2 = L(Q, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [m2.length > 0 ? L(H, { children: [z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: m2 }), z(ve, { orientation: "horizontal" })] }) : null, X(ke, { ...c2, key: "show-editor", command: o2.getCommand("showScriptEditor") })] });
1483
+ return Te({ ...n2, children: u2 });
1486
1484
  }));
1487
1485
  Zn.displayName = "RunScriptPopupPanel";
1488
1486
  const Yn = $(O((e2, t2) => {
1489
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = "showScriptEditor", s2 = pt(o2, ["executeScript", "showScriptEditor"])[0].context(), d2 = K((e3, t3) => {
1487
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = "showScriptEditor", s2 = ht(o2, ["executeScript", "showScriptEditor"])[0].context(), d2 = K((e3, t3) => {
1490
1488
  const o3 = z(Zn, { ...e3, commands: t3 });
1491
- return Re({ ...e3, children: o3 });
1489
+ return Te({ ...e3, children: o3 });
1492
1490
  }, [r2, s2, n2, a2]);
1493
- return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, selected: o2.getCommand(i2).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: i2, ...l2 });
1494
- })), Qn = (e2) => z(ve, { ...e2 }), Jn = $(O((e2, t2) => {
1495
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, [l2, i2] = _(false), s2 = pt(o2, ["executeScript", "showScriptEditor"]), d2 = s2[0]?.context?.();
1496
- U(() => {
1491
+ return z(Re, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, selected: o2.getCommand(i2).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: i2, ...l2 });
1492
+ })), Qn = (e2) => z(ke, { ...e2 }), Jn = $(O((e2, t2) => {
1493
+ const { commands: o2, parentFloat: n2, propsCommandButton: a2, ...r2 } = e2, [l2, i2] = j(false), s2 = ht(o2, ["executeScript", "showScriptEditor"]), d2 = s2[0]?.context?.();
1494
+ _(() => {
1497
1495
  const e3 = d2?.getScripts();
1498
1496
  if (!e3) return;
1499
1497
  const t3 = s2[1], o3 = async () => {
@@ -1516,7 +1514,7 @@ const Yn = $(O((e2, t2) => {
1516
1514
  };
1517
1515
  }, [d2]);
1518
1516
  const c2 = T(), m2 = K((e3) => {
1519
- const { commandButtonProps: t3, commandPopupProps: a3 } = e3, r3 = v.findContributions("ribbon/home");
1517
+ const { propsCommandButton: t3, propsCommandPopup: a3 } = e3, r3 = v.findContributions("ribbon/home");
1520
1518
  let i3;
1521
1519
  const s3 = r3.length;
1522
1520
  if (s3 > 0) {
@@ -1528,112 +1526,112 @@ const Yn = $(O((e2, t2) => {
1528
1526
  i3.push(l3);
1529
1527
  }
1530
1528
  }
1531
- const d3 = z(Oo, { ...a3, command: o2.getCommand("formatFontColor"), isSplit: true, panelProps: { disableAlpha: true } }), m3 = z(Oo, { ...a3, command: o2.getCommand("formatFillColor"), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: mo.End } }), p2 = o2.getCommand("undo") ? z(H, { children: z(_o, { ...a3, quickCommand: "undo" }) }) : null, u2 = o2.getCommand("find") ? z(H, { children: z(Bo, { ...a3 }) }) : null;
1529
+ const d3 = z($o, { ...a3, command: o2.getCommand("formatFontColor"), isSplit: true, propsPanel: { disableAlpha: true } }), m3 = z($o, { ...a3, command: o2.getCommand("formatFillColor"), isSplit: true, propsPanel: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: co.End } }), p2 = o2.getCommand("undo") ? z(H, { children: z(Go, { ...a3, quickCommand: "undo" }) }) : null, u2 = o2.getCommand("find") ? z(H, { children: z(Bo, { ...a3 }) }) : null;
1532
1530
  let g2 = null;
1533
- l2 && (g2 = L(H, { children: [z(Te, {}), z(Yn, { ...a3 })] }));
1534
- return L(zn, { parentFloat: n2, children: [p2, null, p2 ? z(Te, {}) : null, z(Yo, { ...a3, command: o2.getCommand("paste") }), z(ve, { ...t3, command: o2.getCommand("formatPainterToggle") }), z(fa, { ...t3, command: o2.getCommand("copy") }), z(Te, {}), z(qo, { ...a3, command: o2.getCommand("formatFontFamily") }), z(Eo, { ...a3, command: o2.getCommand("formatFontSize") }), z(ve, { ...t3, command: o2.getCommand("formatBoldToggle") }), z(ve, { ...t3, command: o2.getCommand("formatItalicToggle") }), z(Zo, { ...a3 }), z(Xo, { ...a3 }), z(Fo, { ...a3 }), m3, d3, z(Te, {}), z(ro, { ...a3 }), z(lo, { ...a3 }), z(so, { ...a3 }), z(io, { ...a3 }), z(Mo, { ...a3 }), z(Te, {}), z(Ao, { ...a3 }), z(Te, {}), z(on, { command: o2.getCommand("formatCellStyle"), ...a3 }), z(Aa, { command: o2.getCommand("formatTableStyle"), ...a3 }), z(Te, {}), z(zo, { ...a3 }), z(Wo, { ...a3 }), z($o, { ...a3 }), z(Te, {}), z($a, { ...a3 }), z(Ho, { ...a3 }), z(Lo, { ...a3 }), z(Ko, { ...a3 }), u2, g2, i3] });
1531
+ l2 && (g2 = L(H, { children: [z(ve, {}), z(Yn, { ...a3 })] }));
1532
+ return L(zn, { parentFloat: n2, children: [p2, null, p2 ? z(ve, {}) : null, z(Zo, { ...a3, command: o2.getCommand("paste") }), z(ke, { ...t3, command: o2.getCommand("formatPainterToggle") }), z(da, { ...t3, command: o2.getCommand("copy") }), z(ve, {}), z(Uo, { ...a3, command: o2.getCommand("formatFontFamily") }), z(Eo, { ...a3, command: o2.getCommand("formatFontSize") }), z(ke, { ...t3, command: o2.getCommand("formatBoldToggle") }), z(ke, { ...t3, command: o2.getCommand("formatItalicToggle") }), z(Xo, { ...a3 }), z(qo, { ...a3 }), z(Fo, { ...a3 }), m3, d3, z(ve, {}), z(ao, { ...a3 }), z(ro, { ...a3 }), z(io, { ...a3 }), z(lo, { ...a3 }), z(Mo, { ...a3 }), z(ve, {}), z(Io, { ...a3 }), z(ve, {}), z(tn, { command: o2.getCommand("formatCellStyle"), ...a3 }), z(Ia, { command: o2.getCommand("formatTableStyle"), ...a3 }), z(ve, {}), z(Ho, { ...a3 }), z(zo, { ...a3 }), z(Wo, { ...a3 }), z(ve, {}), z(Wa, { ...a3 }), z(Lo, { ...a3 }), z(Ao, { ...a3 }), z(Vo, { ...a3 }), u2, g2, i3] });
1535
1533
  }, [o2, s2, l2, c2]);
1536
- return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: m2, ...r2 });
1534
+ return z(qe, { ref: t2, commands: o2, parentFloat: n2, propsCommandButton: a2, renderToolbarPalette: m2, ...r2 });
1537
1535
  }));
1538
1536
  Jn.displayName = "HomeToolbar";
1539
1537
  const ea = $(O((e2, t2) => {
1540
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
1541
- const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1542
- return L(zn, { parentFloat: n2, children: [z(ve, { ...t3, command: o2.getCommand("insertTable") }), z(Wa, { ...a3 }), null, z(ve, { ...t3, command: o2.getCommand("updateHyperlink") }), z(ve, { ...t3, command: o2.getCommand("updateComments") })] });
1538
+ const { commands: o2, parentFloat: n2, propsCommandButton: a2, ...r2 } = e2, l2 = xt((e3) => {
1539
+ const { propsCommandButton: t3, propsCommandPopup: a3 } = e3;
1540
+ return L(zn, { parentFloat: n2, children: [z(ke, { ...t3, command: o2.getCommand("insertTable") }), z(za, { ...a3 }), null, z(ke, { ...t3, command: o2.getCommand("updateHyperlink") }), z(ke, { ...t3, command: o2.getCommand("updateComments") })] });
1543
1541
  }, [o2]);
1544
- return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1542
+ return z(qe, { ref: t2, commands: o2, parentFloat: n2, propsCommandButton: a2, renderToolbarPalette: l2, ...r2 });
1545
1543
  }));
1546
1544
  ea.displayName = "InsertToolbar";
1547
1545
  const ta = $(O((e2, t2) => {
1548
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
1549
- const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1550
- return L(zn, { parentFloat: n2, children: [z(No, { ...a3 }), z(ve, { ...t3, command: o2.getCommand("protectionSheetToggle") }), z(Te, {}), z(Vo, { ...a3 }), z(Qo, { ...a3 }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view" }), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view" }), z(Te, {}), z(Jo, { ...a3 }), z(La, { command: o2.getCommand("selectTheme"), ...a3 }), z(Te, {}), z(Yn, { ...a3, scope: "view" }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view" })] });
1546
+ const { commands: o2, parentFloat: n2, propsCommandButton: a2, ...r2 } = e2, l2 = xt((e3) => {
1547
+ const { propsCommandButton: t3, propsCommandPopup: a3 } = e3;
1548
+ return L(zn, { parentFloat: n2, children: [z(No, { ...a3 }), z(ke, { ...a3, command: o2.getCommand("protectionSheetToggle") }), z(ve, {}), z(Oo, { ...a3 }), z(Yo, { ...a3 }), z(ve, {}), z(ke, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view" }), z(ke, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view" }), z(ve, {}), z(Qo, { ...a3 }), z(Aa, { command: o2.getCommand("selectTheme"), ...a3 }), z(ve, {}), z(Yn, { ...a3, scope: "view" }), z(ve, {}), z(ke, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view" })] });
1551
1549
  }, [o2]);
1552
- return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1550
+ return z(qe, { ref: t2, commands: o2, parentFloat: n2, propsCommandButton: a2, renderToolbarPalette: l2, ...r2 });
1553
1551
  }));
1554
1552
  ta.displayName = "ViewToolbar";
1555
1553
  const oa = (e2) => z(la, { ...e2 }), na = $((e2) => {
1556
1554
  const { sx: t2, ...o2 } = e2;
1557
- return L(J, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${Wt(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [z(xe, { disableRipple: true, onMouseDown: (e3) => {
1555
+ return L(Q, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${mt(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [z(fe, { disableRipple: true, onMouseDown: (e3) => {
1558
1556
  0 === e3.button && e3.preventDefault();
1559
- }, sx: { textTransform: "none", flex: "1 1 100%", fontWeight: (e3) => e3.typography.fontWeightRegular, padding: "2px 6px", minHeight: "0px", minWidth: "0px", marginRight: (e3) => e3.spacing(0.5), "&.Mui-selected": {}, "&.Mui-focusVisible": {}, ...t2 }, ...o2 }), z(J, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
1557
+ }, sx: { textTransform: "none", flex: "1 1 100%", fontWeight: (e3) => e3.typography.fontWeightRegular, padding: "2px 6px", minHeight: "0px", minWidth: "0px", marginRight: (e3) => e3.spacing(0.5), "&.Mui-selected": {}, "&.Mui-focusVisible": {}, ...t2 }, ...o2 }), z(Q, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
1560
1558
  }), aa = $((e2) => {
1561
1559
  const { toolbars: t2, value: o2, onToolbarChange: n2, sx: a2, ...r2 } = e2, l2 = V(() => {
1562
1560
  const e3 = [];
1563
1561
  for (let o3 = 0; o3 < t2.length; o3++) e3.push(z(na, { label: t2[o3].label }, t2[o3].label));
1564
1562
  return e3;
1565
1563
  }, [t2]);
1566
- return z(fe, { value: o2, onChange: (e3, t3) => {
1564
+ return z(he, { value: o2, onChange: (e3, t3) => {
1567
1565
  n2?.(t3);
1568
1566
  }, variant: "scrollable", scrollButtons: false, sx: { paddingLeft: (e3) => e3.spacing(1.5), paddingRight: (e3) => e3.spacing(1.5), paddingTop: (e3) => e3.spacing(0), paddingBottom: (e3) => e3.spacing(0), minHeight: "26px", alignItems: "center", "& .MuiTabs-indicator": { display: "flex", justifyContent: "center", backgroundColor: "transparent" }, "& .MuiTabs-indicatorSpan": { width: "90%", borderRadius: "4px", minWidth: "4px", backgroundColor: (e3) => e3.palette.primary.main }, "& .MuiTab-root": { marginRight: "0px" }, ...a2 }, slotProps: { indicator: { children: z("span", { className: "MuiTabs-indicatorSpan" }) } }, ...r2, children: l2 });
1569
1567
  }), ra = $((e2) => {
1570
- const { toolbars: t2, value: o2, onToolbarChange: n2, selectProps: a2, ...r2 } = e2, l2 = K((e3) => {
1568
+ const { toolbars: t2, value: o2, onToolbarChange: n2, propsSelect: a2, ...r2 } = e2, l2 = K((e3) => {
1571
1569
  n2?.(e3.target.value);
1572
1570
  }, [n2]), i2 = V(() => {
1573
1571
  const e3 = [];
1574
1572
  for (let n3 = 0; n3 < t2.length; n3++) {
1575
1573
  const a3 = t2[n3].label;
1576
- e3.push(z(oe, { value: n3, sx: { color: (e4) => {
1574
+ e3.push(z(te, { value: n3, sx: { color: (e4) => {
1577
1575
  if (o2 === n3) return e4.palette.primary.main;
1578
1576
  } }, children: a3 }, a3));
1579
1577
  }
1580
1578
  return e3;
1581
1579
  }, [t2, o2]);
1582
- return z(de, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (e3) => e3.spacing(0.5), paddingBottom: (e3) => e3.spacing(0.5), paddingLeft: (e3) => e3.spacing(2), color: (e3) => e3.palette.primary.main }, "& .MuiSelect-icon": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, ...a2 }, size: "small", children: z(he, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` }, ...r2, children: i2 }) });
1580
+ return z(se, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (e3) => e3.spacing(0.5), paddingBottom: (e3) => e3.spacing(0.5), paddingLeft: (e3) => e3.spacing(2), color: (e3) => e3.palette.primary.main }, "& .MuiSelect-icon": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, ...a2 }, size: "small", children: z(ge, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})` }, ...r2, children: i2 }) });
1583
1581
  }), la = $(O((e2, t2) => {
1584
- const { commands: o2, selectWrapper: n2, selectProps: a2 = {}, renderCompact: r2 = false, paletteWrapper: l2, toolbarsProps: i2, paletteProps: s2 = {}, workbook: d2, sx: c2, ...m2 } = e2, p2 = V(() => {
1585
- const e3 = [], { ref: t3, ...n3 } = i2?.Home || {};
1582
+ const { commands: o2, wrapperSelect: n2, propsSelect: a2 = _t.EmptyObject, isCompact: r2 = false, wrapperPalette: l2, propsToolbars: i2 = _t.EmptyObject, propsPalette: s2 = _t.EmptyObject, workbook: d2, sx: c2, ...m2 } = e2, p2 = V(() => {
1583
+ const e3 = [], { ref: t3, ...n3 } = i2?.Home || _t.EmptyObject;
1586
1584
  e3.push({ label: "Home", component: z(Jn, { commands: o2, ...n3 }) });
1587
- const { ref: a3, ...r3 } = i2?.Insert || {};
1585
+ const { ref: a3, ...r3 } = i2?.Insert || _t.EmptyObject;
1588
1586
  e3.push({ label: "Insert", component: z(ea, { commands: o2, ...r3 }) });
1589
- const { ref: l3, ...s3 } = i2?.View || {};
1587
+ const { ref: l3, ...s3 } = i2?.View || _t.EmptyObject;
1590
1588
  return e3.push({ label: "View", component: z(ta, { commands: o2, ...s3 }) }), e3;
1591
1589
  }, [o2, d2]), u2 = V(() => {
1592
1590
  const e3 = [];
1593
1591
  for (let t3 = 0; t3 < p2.length; t3++) e3.push(W.cloneElement(p2[t3].component, { ...p2[t3].component.props, key: p2[t3].key ?? p2[t3].label }));
1594
1592
  return e3;
1595
- }, [p2]), [g2, h2] = _(0), f2 = (e3) => {
1593
+ }, [p2]), [g2, h2] = j(0), f2 = (e3) => {
1596
1594
  h2(e3);
1597
- }, x2 = V(() => z(r2 ? ra : aa, { toolbars: p2, value: g2, onToolbarChange: f2, sx: a2 }), [p2, g2, a2, r2]), { sx: b2, ...y2 } = s2, w2 = z(ue, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1), marginTop: (e3) => e3.spacing(0.5), marginBottom: (e3) => e3.spacing(0.5), ...b2 }, ...y2, children: u2[g2] });
1598
- return L(J, { ref: t2, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (e3) => e3.spacing(0.5), "*": { userSelect: "none" }, ...c2 }, ...m2, children: [n2 ? n2(x2) : x2, l2 ? l2(w2) : w2] });
1595
+ }, x2 = V(() => z(r2 ? ra : aa, { toolbars: p2, value: g2, onToolbarChange: f2, sx: a2 }), [p2, g2, a2, r2]), { sx: b2, ...y2 } = s2, w2 = z(pe, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})`, marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1), marginTop: (e3) => e3.spacing(0.5), marginBottom: (e3) => e3.spacing(0.5), ...b2 }, ...y2, children: u2[g2] });
1596
+ return L(Q, { ref: t2, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (e3) => e3.spacing(0.5), "*": { userSelect: "none" }, ...c2 }, ...m2, children: [n2 ? n2(x2) : x2, l2 ? l2(w2) : w2] });
1599
1597
  }));
1600
1598
  la.displayName = "WorkbookToolbars";
1601
1599
  const ia = (e2) => {
1602
- const { workbook: t2, workbookElement: o2, target: n2, commands: a2, darkMode: r2, onNewWorkbook: l2 = sa } = e2, i2 = St(), [s2, d2] = _(t2?.getSelectedSheet()), [c2, m2] = _(t2?.getSheets().getItems()), p2 = gt(l2, [l2]), u2 = T(), h2 = V(() => [new Pt("activateTask", n2, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new Pt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Ft.Ctrl, Ft.Shift] } }), new Pt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Ft.Ctrl, Ft.Shift] } }), new Pt("showFormat", n2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [Ft.Ctrl, Ft.Shift] } }), new Dt("newCellStyle", n2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later.", icon: "NewPresetStyles" }), new Dt("deleteCellStyle", n2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new Dt("modifyCellStyle", n2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Pt("find", n2, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [Ft.Ctrl] }, { key: "F5", modifiers: [Ft.Shift] }] }), new Pt("findReplace", n2, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [Ft.Ctrl] }, { key: "H", modifiers: [Ft.Ctrl, Ft.Alt] }] }), new Pt("goto", n2, { label: "Go To", description: "Open the 'Go To' window.", icon: "GoTo", shortcut: [{ key: "G", modifiers: [Ft.Ctrl] }] }), new Pt("workbookViewToggleExpandFormulaBar", n2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [Ft.Ctrl, Ft.Shift] } }), new Pt("workbookViewToggleShowFormulaBar", n2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Pt("workbookViewToggleShowTabs", n2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Pt("workbookViewToggleShowStatusBar", n2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Pt("workbookViewToggleShowHorizontalScrollBar", n2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Pt("workbookViewToggleShowVerticalScrollBar", n2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new Dt("hideSheet", n2, { 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 Dt("deleteSheet", n2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new Dt("addSheet", n2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [Ft.Shift] }, { key: "F1", modifiers: [Ft.Alt, Ft.Shift] }] }), new Dt("duplicateSheet", n2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new Dt("nextSheet", n2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Ft.Ctrl] }] }), new Dt("previousSheet", n2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Ft.Ctrl] }] }), new Dt("selectNextSheet", n2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Ft.Ctrl, Ft.Shift] }] }), new Dt("selectPreviousSheet", n2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Ft.Ctrl, Ft.Shift] }] }), new Dt("selectTheme", n2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new Dt("selectNamed", n2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new Dt("addNamedReference", n2, { 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 Dt("editNamedReference", n2, { 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 Dt("deleteNamedReference", n2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "DeleteNamedRange" }), new Pt("activeNameBox", n2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [Ft.Alt] } }), new Pt("createNamedReferenceFromSelection", n2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [Ft.Ctrl, Ft.Shift] } }), new Pt("activeNameManager", n2, { label: "Activate Name Manager", description: "Create, edit, delete, and find all the names used in the workbook.\n\nNames can be used as a substitute for cell references.", shortcut: { key: "F3", modifiers: [Ft.Ctrl] } }), new Dt("fullScreenToggle", n2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new Dt("showScriptEditor", n2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [Ft.Alt] }] }), new Dt("executeScript", n2, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Dt("executeSelectedScript", n2, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Dt("saveScripts", n2, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new Dt("maximumWorkbookToggle", n2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [Ft.Ctrl] } }), new Dt("spellCheck", n2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new Dt("calculateAll", n2, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } }), new Pt("closeWorkbook", n2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [Ft.Ctrl] } }), new Pt("newWorkbook", n2, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []), f2 = V(() => {
1600
+ const { workbook: t2, workbookElement: o2, target: n2, commands: a2, darkMode: r2 } = e2, l2 = vt(), [i2, s2] = j(t2?.getSelectedSheet()), [d2, c2] = j(t2?.getSheets().getItems()), m2 = T(), p2 = V(() => [new Nt("activateTask", n2, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new Nt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Et.Ctrl, Et.Shift] } }), new Nt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Et.Ctrl, Et.Shift] } }), new Nt("showFormat", n2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [Et.Ctrl, Et.Shift] } }), new Bt("newCellStyle", n2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later.", icon: "NewPresetStyles" }), new Bt("deleteCellStyle", n2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new Bt("modifyCellStyle", n2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Nt("find", n2, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [Et.Ctrl] }, { key: "F5", modifiers: [Et.Shift] }] }), new Nt("findReplace", n2, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [Et.Ctrl] }, { key: "H", modifiers: [Et.Ctrl, Et.Alt] }] }), new Nt("goto", n2, { label: "Go To", description: "Open the 'Go To' window.", icon: "GoTo", shortcut: [{ key: "G", modifiers: [Et.Ctrl] }] }), new Nt("workbookViewToggleExpandFormulaBar", n2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [Et.Ctrl, Et.Shift] } }), new Nt("workbookViewToggleShowFormulaBar", n2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Nt("workbookViewToggleShowTabs", n2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Nt("workbookViewToggleShowStatusBar", n2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Nt("workbookViewToggleShowHorizontalScrollBar", n2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Nt("workbookViewToggleShowVerticalScrollBar", n2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new Bt("hideSheet", n2, { 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 Bt("deleteSheet", n2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new Bt("addSheet", n2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [Et.Shift] }, { key: "F1", modifiers: [Et.Alt, Et.Shift] }] }), new Bt("duplicateSheet", n2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new Bt("nextSheet", n2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Et.Ctrl] }] }), new Bt("previousSheet", n2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Et.Ctrl] }] }), new Bt("selectNextSheet", n2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Et.Ctrl, Et.Shift] }] }), new Bt("selectPreviousSheet", n2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Et.Ctrl, Et.Shift] }] }), new Bt("selectTheme", n2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new Bt("selectNamed", n2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new Bt("addNamedReference", n2, { 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 Bt("editNamedReference", n2, { 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 Bt("deleteNamedReference", n2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "DeleteNamedRange" }), new Nt("activeNameBox", n2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [Et.Alt] } }), new Nt("createNamedReferenceFromSelection", n2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [Et.Ctrl, Et.Shift] } }), new Nt("activeNameManager", n2, { label: "Activate Name Manager", description: "Create, edit, delete, and find all the names used in the workbook.\n\nNames can be used as a substitute for cell references.", shortcut: { key: "F3", modifiers: [Et.Ctrl] } }), new Bt("fullScreenToggle", n2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new Bt("showScriptEditor", n2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [Et.Alt] }] }), new Bt("executeScript", n2, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Bt("executeSelectedScript", n2, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Bt("saveScripts", n2, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new Bt("maximumWorkbookToggle", n2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [Et.Ctrl] } }), new Bt("spellCheck", n2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new Bt("calculateAll", n2, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } })], []), u2 = V(() => {
1603
1601
  let e3 = null;
1604
- return e3 = a2 ? a2.createChildGroup(n2, "workbook", false) : new Mt(n2, "workbook"), e3.addCommands(h2, true), e3;
1605
- }, [a2, h2]), x2 = wt(), b2 = W.useRef(null), y2 = gt(() => {
1602
+ return e3 = a2 ? a2.createChildGroup(n2, "workbook", false) : new Pt(n2, "workbook"), e3.addCommands(p2, true), e3;
1603
+ }, [a2, p2]), h2 = kt(), f2 = W.useRef(null), x2 = xt(() => {
1606
1604
  let e3, o3 = null;
1607
- const n3 = f2.getCommand("executeScript");
1605
+ const n3 = u2.getCommand("executeScript");
1608
1606
  if (n3.update({ disabled: false, context: { getScripts: () => t2.getScripts() } }), !n3) return;
1609
- const a3 = f2.getCommand("showScriptEditor");
1607
+ const a3 = u2.getCommand("showScriptEditor");
1610
1608
  a3.updateCallback(function(e4 = true) {
1611
- o3 ? o3.close() : u2.activateTaskPane("scriptEditor", {});
1609
+ o3 ? o3.close() : m2.activateTaskPane("scriptEditor", {});
1612
1610
  });
1613
- const r3 = f2.getCommand("executeSelectedScript");
1611
+ const r3 = u2.getCommand("executeSelectedScript");
1614
1612
  if (!r3) return;
1615
- const l3 = { saveSource: async (e4) => {
1613
+ const i3 = { saveSource: async (e4) => {
1616
1614
  let o4 = null, n4 = null;
1617
1615
  const a4 = t2.getScripts();
1618
1616
  try {
1619
1617
  if (e4) {
1620
- n4 = await i2.showBusy("Saving Scripts...");
1618
+ n4 = await l2.showBusy("Saving Scripts...");
1621
1619
  o4 = await a4.createModule({ source: e4 });
1622
1620
  }
1623
1621
  a4.addModule("scripts", o4, { replace: true }), n4?.();
1624
1622
  } catch (e5) {
1625
- n4?.(), console.warn("Unable to compile", e5), i2.showError(e5);
1623
+ n4?.(), console.warn("Unable to compile", e5), l2.showError(e5);
1626
1624
  }
1627
1625
  return o4;
1628
- }, addContainerListener: (e4) => (S2.current = e4, () => {
1629
- S2.current = null;
1626
+ }, addContainerListener: (e4) => (b2.current = e4, () => {
1627
+ b2.current = null;
1630
1628
  }), setSelectedFunction: (t3) => {
1631
- e3 = t3 ?? b2.current ?? null, Promise.resolve(e3).then((e4) => {
1629
+ e3 = t3 ?? f2.current ?? null, Promise.resolve(e3).then((e4) => {
1632
1630
  r3.update({ disabled: null === e4 });
1633
1631
  });
1634
1632
  }, quickInsertFunction: (e4) => {
1635
1633
  const t3 = `=${e4.toUpperCase()}(`, o4 = { text: t3 + ")", editMode: true, initialSelection: { start: t3.length, end: t3.length + 0 } };
1636
- x2.setMode((e5) => "edit" === e5?.key ? { ...e5, args: { ...e5.args } } : { key: "edit", args: { stateAndCoords: null, start: o4 } });
1634
+ h2.setMode((e5) => "edit" === e5?.key ? { ...e5, args: { ...e5.args } } : { key: "edit", args: { stateAndCoords: null, start: o4 } });
1637
1635
  }, getSelectedFunction: () => e3, setEditor: (e4) => {
1638
1636
  o3 = e4 ?? null, a3.update({ state: null !== o3 });
1639
1637
  }, getEditor: () => o3, getRanges: (e4) => {
@@ -1643,31 +1641,31 @@ const ia = (e2) => {
1643
1641
  }
1644
1642
  return null;
1645
1643
  }, getScripts: () => t2.getScripts() };
1646
- r3.update({ context: l3 });
1647
- }, [f2, t2, o2, i2]), S2 = W.useRef(null);
1644
+ r3.update({ context: i3 });
1645
+ }, [u2, t2, o2, l2]), b2 = W.useRef(null);
1648
1646
  w(t2, { onBeforeSave: async () => {
1649
- await S2.current?.onBeforeSave();
1647
+ await b2.current?.onBeforeSave();
1650
1648
  }, onProtectionChange: () => {
1651
- S2.current?.onReadonlyChange();
1649
+ b2.current?.onReadonlyChange();
1652
1650
  }, onLoad: () => {
1653
1651
  (async () => {
1654
- await t2.getCalculation().start(), t2.getScripts().start(), S2.current?.onScriptChange();
1652
+ await t2.getCalculation().start(), t2.getScripts().start(), b2.current?.onScriptChange();
1655
1653
  })();
1656
1654
  } }), w(t2, { onSheetsChange: (e3) => {
1657
- m2(e3.getSheets().getItems());
1655
+ c2(e3.getSheets().getItems());
1658
1656
  }, onViewChange(e3) {
1659
- d2(e3?.getSelectedSheet());
1657
+ s2(e3?.getSelectedSheet());
1660
1658
  }, onProtectionChange: (e3) => {
1661
1659
  const t3 = { disabled: !e3.getProtection().isStructureAllowed() };
1662
- f2.getCommand("hideSheet").update(t3), f2.getCommand("deleteSheet").update(t3), f2.getCommand("addSheet").update(t3), f2.getCommand("duplicateSheet").update(t3), f2.getCommand("selectTheme").update(t3), f2.getCommand("addNamedReference").update(t3), f2.getCommand("editNamedReference").update(t3), f2.getCommand("deleteNamedReference").update(t3);
1660
+ u2.getCommand("hideSheet").update(t3), u2.getCommand("deleteSheet").update(t3), u2.getCommand("addSheet").update(t3), u2.getCommand("duplicateSheet").update(t3), u2.getCommand("selectTheme").update(t3), u2.getCommand("addNamedReference").update(t3), u2.getCommand("editNamedReference").update(t3), u2.getCommand("deleteNamedReference").update(t3);
1663
1661
  }, onScriptsChange: (e3) => {
1664
- y2();
1662
+ x2();
1665
1663
  } });
1666
- const { isFullscreenAvailable: k2, isFullscreenEnabled: C2, toggleFullscreen: v2 } = eo({ target: { current: o2 ?? document.body } }), P2 = R();
1667
- U(() => {
1668
- f2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: P2, darkMode: r2 }) });
1664
+ const { isFullscreenAvailable: y2, isFullscreenEnabled: S2, toggleFullscreen: C2 } = Jt({ target: { current: o2 ?? document.body } }), k2 = R();
1665
+ _(() => {
1666
+ u2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: k2, darkMode: r2 }) });
1669
1667
  }, [t2?.getTheme(), r2]);
1670
- const D2 = gt(async function(e3, o3) {
1668
+ const v2 = xt(async function(e3, o3) {
1671
1669
  let n3 = null;
1672
1670
  const a3 = t2.getScripts();
1673
1671
  if (e3?.declaration || e3?.functionName) {
@@ -1676,14 +1674,14 @@ const ia = (e2) => {
1676
1674
  }
1677
1675
  if (n3) try {
1678
1676
  await a3.executeMacro(n3);
1679
- b2.current = Promise.resolve({ source: null, name: n3 });
1677
+ f2.current = Promise.resolve({ source: null, name: n3 });
1680
1678
  } catch (e4) {
1681
- return void i2.showError(e4);
1679
+ return void l2.showError(e4);
1682
1680
  }
1683
- }, [t2, i2]);
1684
- U(() => {
1685
- f2.getCommand("newCellStyle").updateCallback((e3) => {
1686
- i2.showInput({ initialValue: (() => {
1681
+ }, [t2, l2]);
1682
+ _(() => {
1683
+ u2.getCommand("newCellStyle").updateCallback((e3) => {
1684
+ l2.showInput({ initialValue: (() => {
1687
1685
  let e4 = 0;
1688
1686
  for (; ; ) {
1689
1687
  e4++;
@@ -1693,7 +1691,7 @@ const ia = (e2) => {
1693
1691
  } catch (e5) {
1694
1692
  }
1695
1693
  }
1696
- })(), title: f2.getCommand("newCellStyle")?.label("cellStyle"), description: "Enter a name for the new cell style.", inputLabel: "Style Name", inputProps: { style: { minWidth: "300px" } }, options: ["Ok", "Cancel"], defaultOption: "Ok", onValidateInput: async (e4, o3) => {
1694
+ })(), title: u2.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 (e4, o3) => {
1697
1695
  let n3 = null;
1698
1696
  try {
1699
1697
  t2.getStyles().validateStyleName(e4, false);
@@ -1708,59 +1706,55 @@ const ia = (e2) => {
1708
1706
  const a3 = t2.getStyles().setNamed({ name: e4, style: n3.getCell().getStyle() });
1709
1707
  n3.getStyle().update({ named: a3.getName() });
1710
1708
  });
1711
- }), f2.getCommand("deleteCellStyle").updateCallback((e3) => {
1709
+ }), u2.getCommand("deleteCellStyle").updateCallback((e3) => {
1712
1710
  e3.delete();
1713
- }), f2.getCommand("modifyCellStyle").updateCallback(({ named: e3 }) => {
1711
+ }), u2.getCommand("modifyCellStyle").updateCallback(({ named: e3 }) => {
1714
1712
  const o3 = t2.getSelectedSheet().getSelectedRange();
1715
1713
  t2.getStyles().setNamed({ name: e3.getName(), style: o3.getCell().getStyle() });
1716
- }), f2.getCommand("hideSheet").updateCallback((e3) => {
1714
+ }), u2.getCommand("hideSheet").updateCallback((e3) => {
1717
1715
  t2.getSheetAt(e3).setVisibility(g.Visibility.Hidden);
1718
- }), f2.getCommand("deleteSheet").updateCallback(async (e3) => {
1716
+ }), u2.getCommand("deleteSheet").updateCallback(async (e3) => {
1719
1717
  t2.getSheetAt(e3 ?? t2.getSelectedSheetIndex())?.delete();
1720
- }), f2.getCommand("addSheet").updateCallback((e3) => {
1718
+ }), u2.getCommand("addSheet").updateCallback((e3) => {
1721
1719
  t2.getSheets().add({ index: e3, autoSelect: true });
1722
- }), f2.getCommand("duplicateSheet").updateCallback(async (e3) => {
1720
+ }), u2.getCommand("duplicateSheet").updateCallback(async (e3) => {
1723
1721
  const o3 = await t2.getSheetAt(e3 ?? t2.getSelectedSheetIndex())?.duplicate();
1724
1722
  o3?.select();
1725
- }), f2.getCommand("nextSheet").updateCallback((e3) => {
1723
+ }), u2.getCommand("nextSheet").updateCallback((e3) => {
1726
1724
  t2.getNextSheet(e3 ?? t2.getSelectedSheetIndex()).select();
1727
- }), f2.getCommand("previousSheet").updateCallback((e3) => {
1725
+ }), u2.getCommand("previousSheet").updateCallback((e3) => {
1728
1726
  t2.getPreviousSheet(e3 ?? t2.getSelectedSheetIndex()).select();
1729
- }), f2.getCommand("selectNextSheet").updateCallback((e3) => {
1727
+ }), u2.getCommand("selectNextSheet").updateCallback((e3) => {
1730
1728
  t2.getNextSheet(e3 ?? t2.getSelectedSheetIndex()).select();
1731
- }), f2.getCommand("selectPreviousSheet").updateCallback((e3) => {
1729
+ }), u2.getCommand("selectPreviousSheet").updateCallback((e3) => {
1732
1730
  t2.getPreviousSheet(e3 ?? t2.getSelectedSheetIndex()).select();
1733
- }), f2.getCommand("selectTheme").updateCallback((e3) => {
1731
+ }), u2.getCommand("selectTheme").updateCallback((e3) => {
1734
1732
  t2.setTheme(e3);
1735
- }), f2.getCommand("calculateAll").updateCallback(() => {
1733
+ }), u2.getCommand("calculateAll").updateCallback(() => {
1736
1734
  t2.getSelectedSheet().getEntireRange().calculate(true);
1737
- }), f2.getCommand("closeWorkbook").updateCallback(async () => {
1738
- "Close" === await i2.showOptions({ title: "Confirm", description: "This will close the current workbook tab. Do you want to continue?", options: ["Close", "Cancel"], defaultOption: "Close" }) && window.close();
1739
- }), f2.getCommand("newWorkbook").updateCallback(() => {
1740
- p2?.();
1741
- }), f2.getCommand("executeScript").updateCallback(D2), f2.getCommand("executeSelectedScript").updateCallback(D2);
1742
- }, [t2, i2]);
1743
- const F2 = gt(async (e3) => {
1735
+ }), u2.getCommand("executeScript").updateCallback(v2), u2.getCommand("executeSelectedScript").updateCallback(v2);
1736
+ }, [t2, l2]);
1737
+ const D2 = xt(async (e3) => {
1744
1738
  let o3 = 0, n3 = null, a3 = "Find & Replace";
1745
1739
  e3?.replace && !e3?.replaceOptions?.maxCount && (a3 = "Replace All");
1746
- const r3 = await i2.showBusy(a3);
1740
+ const r3 = await l2.showBusy(a3);
1747
1741
  try {
1748
1742
  const a4 = e3?.scope ?? "sheet";
1749
- let l3 = null;
1743
+ let i3 = null;
1750
1744
  const s3 = t2.getSelectedSheet(), d3 = { from: s3.getSelectedCell(), ...e3.findOptions };
1751
- if (l3 = "sheet" === a4 ? t2.getSelectedSheet().find(d3) : t2.find(d3), e3.replace) {
1752
- const a5 = t2.replace(l3, e3.replaceText, e3.replaceOptions);
1745
+ if (i3 = "sheet" === a4 ? t2.getSelectedSheet().find(d3) : t2.find(d3), e3.replace) {
1746
+ const a5 = t2.replace(i3, e3.replaceText, e3.replaceOptions);
1753
1747
  o3 = a5.count, e3.replaceOptions.maxCount && (n3 = a5.last);
1754
1748
  } else {
1755
- let e4 = l3.next();
1749
+ let e4 = i3.next();
1756
1750
  e4.done || (o3++, n3 = e4.value);
1757
1751
  }
1758
- n3?.select({ autoFocus: false }), r3?.(), !e3.replaceOptions.maxCount && o3 > 1 && i2.showMessage(`We replaced ${o3} cells.`);
1752
+ n3?.select({ autoFocus: false }), r3?.(), !e3.replaceOptions.maxCount && o3 > 1 && l2.showMessage(`We replaced ${o3} cells.`);
1759
1753
  } catch (e4) {
1760
- r3?.(), i2.showError(e4);
1754
+ r3?.(), l2.showError(e4);
1761
1755
  }
1762
1756
  return o3;
1763
- }, [t2, o2]), M2 = gt((e3) => {
1757
+ }, [t2, o2]), F2 = xt((e3) => {
1764
1758
  const o3 = { selection: () => {
1765
1759
  const e4 = t2.getSelectedRanges(), o4 = e4.getCount(), n4 = new Array(o4);
1766
1760
  for (let t3 = 0; t3 < o4; t3++) {
@@ -1772,415 +1766,393 @@ const ia = (e2) => {
1772
1766
  try {
1773
1767
  await e4.select();
1774
1768
  } catch (e5) {
1775
- i2.showMessage(e5.message, { type: kt.Error });
1769
+ l2.showMessage(e5.message, { type: Tt.Error });
1776
1770
  }
1777
1771
  } };
1778
- return i2.showWindow("namedDetails", n3);
1779
- }, [i2, t2, o2]);
1780
- return U(() => {
1772
+ return l2.showWindow("namedDetails", n3);
1773
+ }, [l2, t2, o2]);
1774
+ return _(() => {
1781
1775
  const e3 = (e4 = false) => {
1782
- const o3 = { initialValue: { findOptions: { text: t2.getSelectedCell().toTextUnformatted(true) }, replace: e4 }, context: () => F2, onKeyDown: (e5) => {
1783
- f2.findCommandByEvent(e5) !== f2.getCommand("find") && f2.findCommandByEvent(e5) !== f2.getCommand("findReplace") || e5.preventDefault();
1776
+ const o3 = { initialValue: { findOptions: { text: t2.getSelectedCell().toTextUnformatted(true) }, replace: e4 }, context: () => D2, onKeyDown: (e5) => {
1777
+ u2.findCommandByEvent(e5) !== u2.getCommand("find") && u2.findCommandByEvent(e5) !== u2.getCommand("findReplace") || e5.preventDefault();
1784
1778
  }, autoFocus: true, disableAutoDestroy: true };
1785
- i2.showWindow("find", o3);
1779
+ l2.showWindow("find", o3);
1786
1780
  };
1787
- f2.getCommand("find")?.update({ disabled: !i2.showWindow }).updateCallback(() => {
1781
+ u2.getCommand("find")?.update({ disabled: !l2.showWindow }).updateCallback(() => {
1788
1782
  e3();
1789
- }), f2.getCommand("findReplace")?.update({ disabled: !i2.showWindow }).updateCallback(() => {
1783
+ }), u2.getCommand("findReplace")?.update({ disabled: !l2.showWindow }).updateCallback(() => {
1790
1784
  e3(true);
1791
- }), f2.getCommand("activateTask")?.update({ disabled: !i2 }).updateCallback(() => {
1785
+ }), u2.getCommand("activateTask")?.update({ disabled: !l2 }).updateCallback(() => {
1792
1786
  const e4 = { onInput: async (e5) => {
1793
1787
  try {
1794
- u2.activateTaskPane(e5);
1788
+ m2.activateTaskPane(e5);
1795
1789
  } catch (e6) {
1796
- i2.showError(e6.message);
1790
+ l2.showError(e6.message);
1797
1791
  }
1798
- }, title: f2.getCommand("activateTask")?.label(), inputLabel: "Task Name", options: ["Activate"] };
1799
- i2.showInput(e4);
1800
- }), f2.getCommand("goto")?.update({ disabled: !i2 }).updateCallback(() => {
1792
+ }, title: u2.getCommand("activateTask")?.label(), inputLabel: "Task Name", options: ["Activate"] };
1793
+ l2.showInput(e4);
1794
+ }), u2.getCommand("goto")?.update({ disabled: !l2 }).updateCallback(() => {
1801
1795
  const e4 = { onInput: async (e5) => {
1802
1796
  try {
1803
1797
  await t2.getRanges(e5).select();
1804
1798
  } catch (e6) {
1805
- i2.showMessage(e6.message, { type: kt.Error });
1799
+ l2.showMessage(e6.message, { type: Tt.Error });
1806
1800
  }
1807
- }, title: f2.getCommand("goto")?.label(), inputLabel: "Location", options: ["Go To"] };
1808
- i2.showInput(e4);
1809
- }), f2.getCommand("selectNamed")?.update({ disabled: !i2 }).updateCallback(async (e4) => {
1801
+ }, title: u2.getCommand("goto")?.label(), inputLabel: "Location", options: ["Go To"] };
1802
+ l2.showInput(e4);
1803
+ }), u2.getCommand("selectNamed")?.update({ disabled: !l2 }).updateCallback(async (e4) => {
1810
1804
  if (e4) try {
1811
1805
  await e4.select();
1812
1806
  } catch (e5) {
1813
- i2.showError(e5);
1807
+ l2.showError(e5);
1814
1808
  }
1815
- }), f2.getCommand("addNamedReference")?.updateCallback(async function(e4) {
1816
- M2(null);
1817
- }), f2.getCommand("editNamedReference")?.updateCallback(async function(e4) {
1818
- M2(e4);
1819
- }), f2.getCommand("deleteNamedReference")?.updateCallback(async function(e4) {
1809
+ }), u2.getCommand("addNamedReference")?.updateCallback(async function(e4) {
1810
+ F2(null);
1811
+ }), u2.getCommand("editNamedReference")?.updateCallback(async function(e4) {
1812
+ F2(e4);
1813
+ }), u2.getCommand("deleteNamedReference")?.updateCallback(async function(e4) {
1820
1814
  e4?.delete?.();
1821
- }), f2.getCommand("activeNameBox")?.updateCallback(async function() {
1815
+ }), u2.getCommand("activeNameBox")?.updateCallback(async function() {
1822
1816
  o2?.getFormulaBarElement()?.getNamedCollectionEditorElement()?.focus();
1823
1817
  });
1824
- }, [o2, t2, i2]), w(t2?.getView(), { onViewChange: (e3) => {
1825
- f2.getCommand("workbookViewToggleShowFormulaBar").update({ state: e3.isShowFormulaBar() }).updateCallback(() => {
1818
+ }, [o2, t2, l2]), w(t2?.getView(), { onViewChange: (e3) => {
1819
+ u2.getCommand("workbookViewToggleShowFormulaBar").update({ state: e3.isShowFormulaBar() }).updateCallback(() => {
1826
1820
  e3.setShowFormulaBar(!e3.isShowFormulaBar());
1827
- }), f2.getCommand("workbookViewToggleShowTabs").update({ state: e3.isShowTabs() }).updateCallback(() => {
1821
+ }), u2.getCommand("workbookViewToggleShowTabs").update({ state: e3.isShowTabs() }).updateCallback(() => {
1828
1822
  e3.setShowTabs(!e3.isShowTabs());
1829
- }), f2.getCommand("workbookViewToggleShowStatusBar").update({ state: e3.isShowStatusBar() }).updateCallback(() => {
1823
+ }), u2.getCommand("workbookViewToggleShowStatusBar").update({ state: e3.isShowStatusBar() }).updateCallback(() => {
1830
1824
  e3.setShowStatusBar(!e3.isShowStatusBar());
1831
- }), f2.getCommand("workbookViewToggleShowHorizontalScrollBar").update({ state: e3.isShowHorizontalScrollbar() }).updateCallback(() => {
1825
+ }), u2.getCommand("workbookViewToggleShowHorizontalScrollBar").update({ state: e3.isShowHorizontalScrollbar() }).updateCallback(() => {
1832
1826
  e3.setShowHorizontalScrollbar(!e3.isShowHorizontalScrollbar());
1833
- }), f2.getCommand("workbookViewToggleShowVerticalScrollBar").update({ state: e3.isShowVerticalScrollbar() }).updateCallback(() => {
1827
+ }), u2.getCommand("workbookViewToggleShowVerticalScrollBar").update({ state: e3.isShowVerticalScrollbar() }).updateCallback(() => {
1834
1828
  e3.setShowVerticalScrollbar(!e3.isShowVerticalScrollbar());
1835
1829
  });
1836
- } }), U(() => {
1837
- f2.getCommand("fullScreenToggle").update({ state: C2, disabled: !k2, icon: C2 ? "FullScreenOff" : "FullScreen" }).updateCallback(() => {
1838
- v2();
1830
+ } }), _(() => {
1831
+ u2.getCommand("fullScreenToggle").update({ state: S2, disabled: !y2, icon: S2 ? "FullScreenOff" : "FullScreen" }).updateCallback(() => {
1832
+ C2();
1839
1833
  });
1840
- }, [C2, k2]), U(() => {
1834
+ }, [S2, y2]), _(() => {
1841
1835
  const e3 = t2.getProtection().isStructureAllowed();
1842
- f2.getCommand("hideSheet").update({ disabled: c2.length <= 1 || !e3 }), f2.getCommand("deleteSheet").update({ disabled: c2.length <= 1 || !e3 });
1843
- }, [c2, s2]), f2;
1844
- }, sa = () => {
1845
- window.open(window.origin.toString(), "sheetxl-" + n.uuidV4(), "popup=true");
1846
- }, da = "_sheetxl-theme_4opcr_2", ca = "_sheetxl-workbook_g5t6x_5", ma = (e2) => z(Fn, { ...e2 }), pa = (e2) => z(Mn, { ...e2 }), ua = (e2) => z(Dn, { ...e2 }), ga = $(O((e2, t2) => {
1847
- const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = ma, sheetsAllProps: c2, renderSheetsAll: m2 = pa, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, sx: f2, borderWidth: x2, borderColor: b2, gridTheme: y2, gridStyle: S2, ...k2 } = e2, [C2, v2] = _(o2?.getSelectedSheetIndex()), [T2, R2] = _(o2?.getSheets().getItems()), [D2, F2] = _(o2?.getProtection());
1836
+ u2.getCommand("hideSheet").update({ disabled: d2.length <= 1 || !e3 }), u2.getCommand("deleteSheet").update({ disabled: d2.length <= 1 || !e3 });
1837
+ }, [d2, i2]), u2;
1838
+ }, sa = "_sheetxl-workbook_g5t6x_5", da = $(O((e2, t2) => {
1839
+ const { command: o2, ...n2 } = e2, a2 = kt(), [r2, l2] = j(false), [i2, s2] = j("info");
1840
+ return _(() => {
1841
+ const e3 = a2.getMode();
1842
+ l2("copy" === e3?.key || "cut" === e3?.key), s2("cut" === e3?.key ? "warn" : "accent");
1843
+ }, [a2]), z(ke, { ref: t2, command: o2, icon: z(wt, { iconKey: "copy.walking", propsSource: { isWalking: r2, themedType: i2 } }), ...n2 });
1844
+ })), ca = $(O((e2, t2) => {
1845
+ const { movable: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2;
1846
+ w(o2, { onAnyChange(e3) {
1847
+ } });
1848
+ const s2 = V(() => ({}), []), d2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1849
+ }, onError() {
1850
+ console.log("onError");
1851
+ } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = V(() => ({ variant: ft.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = V(() => ({ commands: n2, variant: ft.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = L(H, { children: [z(da, { command: n2.getCommand("copy"), ...c2, variant: ft.Menuitem }), [], z(ve, { orientation: "horizontal" }), z(We, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), z(We, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), z(ve, { orientation: "horizontal" }), z(ke, { ...c2, command: n2.getCommand("toggleLockAspectRatio") }), z(ve, { orientation: "horizontal" }), z(We, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: "DrawAlignLeft", tooltip: "Quickly change the placement of your drawings." }), z(ve, { orientation: "horizontal" }), z(We, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
1852
+ return z(Q, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: p2 });
1853
+ }));
1854
+ ca.displayName = "MovableContextMenu";
1855
+ const ma = $(O((e2, t2) => {
1856
+ const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, propsContextMenu: s2, renderContextMenu: d2 = Ca, propsSheetsAll: c2, renderSheetsAll: m2 = ka, propsSheetTab: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, sx: f2, borderWidth: x2, borderColor: b2, gridTheme: y2, gridStyle: S2, ...C2 } = e2, [k2, v2] = j(o2?.getSelectedSheetIndex()), [T2, R2] = j(o2?.getSheets().getItems()), [F2, M2] = j(o2?.getProtection());
1848
1857
  w(o2, { onViewChange(e3) {
1849
1858
  v2(e3?.getSelectedSheetIndex());
1850
1859
  }, onSheetsChange: (e3) => {
1851
1860
  R2(e3.getSheets().getItems());
1852
1861
  }, onProtectionChange: (e3) => {
1853
- F2(e3?.getProtection());
1862
+ M2(e3?.getProtection());
1854
1863
  } });
1855
- const M2 = i2 || !D2.isStructureAllowed(), N2 = V(() => {
1864
+ const N2 = i2 || !F2.isStructureAllowed(), B2 = V(() => {
1856
1865
  const e3 = [];
1857
1866
  for (let t3 = 0; t3 < T2.length; t3++) e3.push(T2[t3].getName());
1858
1867
  return e3;
1859
- }, [T2]), B2 = K((e3) => {
1868
+ }, [T2]), E2 = K((e3) => {
1860
1869
  false !== a2?.(e3) && (o2.getSheetAt(e3).select(), r2?.(e3));
1861
- }, [o2, a2, r2]), E2 = K((e3, t3) => {
1870
+ }, [o2, a2, r2]), P2 = K((e3, t3) => {
1862
1871
  o2.getSheetAt(e3).setName(t3), r2?.(e3);
1863
1872
  }, [o2, r2]), I2 = K((e3, t3) => {
1864
1873
  o2.getSheetAt(e3).setPosition(t3), r2?.(t3);
1865
- }, [o2, r2]), A2 = gt(() => {
1866
- if (false === a2?.(C2)) return;
1867
- const e3 = C2 + 1;
1874
+ }, [o2, r2]), A2 = xt(() => {
1875
+ if (false === a2?.(k2)) return;
1876
+ const e3 = k2 + 1;
1868
1877
  o2.getSheets().add({ name: void 0, autoSelect: true }), r2?.(e3);
1869
- }, [o2, a2, r2, C2]), H2 = V(() => ({ placement: "top-start" }), []), W2 = q(null), [$2, O2] = _(false), G2 = K((e3) => {
1878
+ }, [o2, a2, r2, k2]), H2 = V(() => ({ placement: "top-start" }), []), W2 = q(null), [$2, O2] = j(false), G2 = K((e3) => {
1870
1879
  const { closeFloatAll: t3, floatReference: n3 } = e3;
1871
1880
  return m2({ workbook: o2, gridStyle: S2, floatReference: n3, closeFloatAll: t3, ...c2 });
1872
- }, [m2, c2, l2, o2, S2]), { reference: j2, component: X2 } = je({ label: "allSheet", popperProps: H2, anchor: W2.current, onOpen: () => O2(true), onClose: () => O2(false), createPopupPanel: G2 }), Z2 = q(null), [Y2, Q2] = _(null), ee2 = K((e3) => {
1881
+ }, [m2, c2, l2, o2, S2]), { reference: U2, component: X2 } = _e({ label: "allSheet", propsPopper: H2, anchor: W2.current, onOpen: () => O2(true), onClose: () => O2(false), createPopupPanel: G2 }), Z2 = q(null), [Y2, J2] = j(null), te2 = K((e3) => {
1873
1882
  const { floatReference: t3 } = e3;
1874
1883
  return d2?.({ workbook: o2, index: Y2?.index, tabStripRef: Z2.current, commands: n2, disabled: l2, floatReference: t3, ...s2 });
1875
- }, [d2, s2, l2, o2, n2, Y2]), { reference: oe2, component: ne2 } = je({ label: "sheetTab", popperProps: H2, anchor: { getBoundingClientRect: () => new DOMRect(Y2?.left || 0, Y2?.top || 0, 0, 0) }, onClose: () => Q2(null), createPopupPanel: ee2 });
1876
- U(() => {
1884
+ }, [d2, s2, l2, o2, n2, Y2]), { reference: oe2, component: ne2 } = _e({ label: "sheetTab", propsPopper: H2, anchor: { getBoundingClientRect: () => new DOMRect(Y2?.left || 0, Y2?.top || 0, 0, 0) }, onClose: () => J2(null), createPopupPanel: te2 });
1885
+ _(() => {
1877
1886
  Y2 ? oe2.open(0) : oe2.close(0);
1878
1887
  }, [Y2]);
1879
1888
  const ae2 = K((e3, t3) => {
1880
- e3.preventDefault(), Q2({ left: e3.clientX - 2, top: e3.clientY - 4, index: t3 });
1881
- }, []), re2 = gt((e3) => {
1889
+ e3.preventDefault(), J2({ left: e3.clientX - 2, top: e3.clientY - 4, index: t3 });
1890
+ }, []), re2 = xt((e3) => {
1882
1891
  let t3;
1883
1892
  try {
1884
1893
  t3 = o2?.getSheetAt(e3.index);
1885
1894
  } catch (e4) {
1886
1895
  }
1887
1896
  if (!t3) return null;
1888
- return (u2 ?? ua)({ sheet: t3, gridTheme: y2, onContextMenu: (t4) => {
1889
- B2(e3.index), ae2(t4, e3.index);
1897
+ return (u2 ?? va)({ sheet: t3, gridTheme: y2, onContextMenu: (t4) => {
1898
+ E2(e3.index), ae2(t4, e3.index);
1890
1899
  }, ...e3, ...p2 });
1891
- }, [u2, p2, o2, y2]), le2 = V(() => M2 ? null : z(Fe, { disableInteractive: true, title: "New sheet", children: z(te, { disabled: l2, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, color: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (e3) => {
1900
+ }, [u2, p2, o2, y2]), le2 = V(() => N2 ? null : z(Fe, { disableInteractive: true, title: "New sheet", children: z(ee, { disabled: l2, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, color: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (e3) => {
1892
1901
  0 === e3.button && e3.preventDefault();
1893
- }, onClick: () => A2(), children: z(xt, { iconKey: "AddCircle" }) }) }), [l2, M2, A2]);
1894
- return L(J, { ref: t2, className: mt(h2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...f2 }, ...k2, children: [z(P, { ref: Z2, selectedTabIndex: C2, tabNames: N2, onSelectedTabIndexChange: B2, onTabNameChange: E2, onTabMove: I2, background: g2, borderColor: b2, borderWidth: x2, activeColor: null, disabled: l2, disableDrag: M2, createScrollStartButton: Qe, createScrollEndButton: Ye, createScrollEdgeButton: Ze, createTabButton: re2, createTabDivider: (e3) => {
1902
+ }, onClick: () => A2(), children: z(wt, { iconKey: "AddCircle" }) }) }), [l2, N2, A2]);
1903
+ return L(Q, { ref: t2, className: gt(h2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...f2 }, ...C2, children: [z(D, { ref: Z2, selectedTabIndex: k2, tabNames: B2, onSelectedTabIndexChange: E2, onTabNameChange: P2, onTabMove: I2, background: g2, borderColor: b2, borderWidth: x2, activeColor: null, disabled: l2, disableDrag: N2, renderScrollButtonStart: Ye, renderScrollButtonEnd: Ze, renderScrollButtonEdge: Xe, renderTabButton: re2, renderTabDivider: (e3) => {
1895
1904
  const { key: t3, ...o3 } = e3;
1896
- return z(Te, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => Wt(e4.palette.divider, 0.25) }, ...o3 }, t3);
1897
- }, editLabelProps: { readOnly: M2, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (e3) => {
1905
+ return z(ve, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => mt(e4.palette.divider, 0.25) }, ...o3 }, t3);
1906
+ }, propsEditLabel: { readOnly: N2, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (e3) => {
1898
1907
  o2.isValidSheetNameCharacter(e3.key) || e3.preventDefault();
1899
1908
  }, onCancel: () => {
1900
- r2?.(C2);
1901
- } }, children: z(Fe, { disableInteractive: true, title: $2 ? "" : "List all sheets", children: z(ze, { sx: { padding: "0px", ml: 0.5, mr: 0, mt: 0, mb: 0, "& svg": { transform: "scale(0.8, 1)" }, color: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, ref: W2, dense: true, outlined: false, selected: $2, color: "primary", "aria-label": "menu", onMouseDown: (e3) => {
1909
+ r2?.(k2);
1910
+ } }, children: z(Fe, { disableInteractive: true, title: $2 ? "" : "List all sheets", children: z(He, { sx: { padding: "0px", ml: 0.5, mr: 0, mt: 0, mb: 0, "& svg": { transform: "scale(0.8, 1)" }, color: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, ref: W2, dense: true, outlined: false, selected: $2, color: "primary", "aria-label": "menu", onMouseDown: (e3) => {
1902
1911
  0 === e3.button && e3.preventDefault();
1903
1912
  }, onClick: () => {
1904
- $2 ? j2.close(0) : j2.open(0);
1905
- }, icon: z(xt, { iconKey: "Menu" }) }) }) }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, minWidth: "4px" } }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, flex: "none", display: "flex", alignItems: "center" }, children: le2 }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, flex: 1, minWidth: "24px" } }), ne2, X2] });
1913
+ $2 ? U2.close(0) : U2.open(0);
1914
+ }, icon: z(wt, { iconKey: "Menu" }) }) }) }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, minWidth: "4px" } }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, flex: "none", display: "flex", alignItems: "center" }, children: le2 }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, flex: 1, minWidth: "24px" } }), ne2, X2] });
1906
1915
  }));
1907
- ga.displayName = "WorkbookStrip";
1908
- const ha = $(O((e2, t2) => {
1909
- const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = Z((e3) => e3 + 1, 0), [m2, p2] = _(o2.getSelectedSheet()), [u2, g2] = _(m2.getSelectedRanges()), [h2, f2] = _(m2.getSelectedCell());
1916
+ ma.displayName = "WorkbookStrip";
1917
+ const pa = $(O((e2, t2) => {
1918
+ const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = Z((e3) => e3 + 1, 0), [m2, p2] = j(o2.getSelectedSheet()), [u2, g2] = j(m2.getSelectedRanges()), [h2, f2] = j(m2.getSelectedCell());
1910
1919
  w(o2, { onSheetsChange() {
1911
1920
  p2(o2.getSelectedSheet());
1912
1921
  } }), w(m2.getSelection(), { onChange() {
1913
1922
  g2(m2.getSelectedRanges()), f2(m2.getSelectedCell());
1914
- } }), pt(n2, [], { onChange: () => {
1923
+ } }), ht(n2, [], { onChange: () => {
1915
1924
  c2();
1916
1925
  } });
1917
1926
  const x2 = V(() => ({}), []), b2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1918
1927
  }, onError() {
1919
1928
  console.log("onError");
1920
- } }, disabled: a2, scope: "contextMenu", parentFloat: l2 }), [a2, l2]), y2 = V(() => ({ ...x2, ...b2, variant: ut.Menuitem }), [x2, b2]), S2 = V(() => ({ commands: n2, variant: ut.Menuitem, parentFloat: l2, ...b2 }), [n2, b2, l2]), k2 = [];
1921
- let C2 = u2.isEntireRows(), v2 = u2.isEntireColumns();
1922
- u2 && (C2 && (k2.push(z(Te, { orientation: "horizontal" }, "context:" + k2.length)), k2.push(X(ve, { command: n2.getCommand("hideColumns"), ...y2, key: "context:" + k2.length })), k2.push(X(ve, { command: n2.getCommand("unhideColumns"), ...y2, key: "context:" + k2.length }))), v2 && (k2.push(z(Te, { orientation: "horizontal" }, "context:" + k2.length)), k2.push(X(ve, { command: n2.getCommand("hideRows"), ...y2, key: "context:" + k2.length })), k2.push(X(ve, { command: n2.getCommand("unhideRows"), ...y2, key: "context:" + k2.length }))), (C2 || v2) && k2.push(z(Te, { orientation: "horizontal" }, "context:" + k2.length)), C2 && (k2.push(X(ve, { command: n2.getCommand("autoFitColumns"), ...y2, key: "context:" + k2.length })), k2.push(X(ve, { ...y2, command: n2.getCommand("resizeColumns"), key: "context:" + k2.length }))), v2 && (k2.push(X(ve, { command: n2.getCommand("autoFitRows"), ...y2, key: "context:" + k2.length })), k2.push(X(ve, { ...y2, command: n2.getCommand("resizeRows"), key: "context:" + k2.length }))));
1923
- const T2 = [], R2 = n2.getCommand("formatTableStyle"), P2 = R2?.context()?.table();
1924
- if (bt(R2), !C2 && !v2) {
1925
- if (T2.push(z(Te, { orientation: "horizontal" }, "contextBefore:" + T2.length)), h2?.getHyperlink()) T2.push(X($e, { ...S2, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + T2.length, quickCommand: "openHyperlink" }));
1929
+ } }, disabled: a2, scope: "contextMenu", parentFloat: l2 }), [a2, l2]), y2 = V(() => ({ ...x2, ...b2, variant: ft.Menuitem }), [x2, b2]), S2 = V(() => ({ commands: n2, variant: ft.Menuitem, parentFloat: l2, ...b2 }), [n2, b2, l2]), C2 = [];
1930
+ let k2 = u2.isEntireRows(), v2 = u2.isEntireColumns();
1931
+ u2 && (k2 && (C2.push(z(ve, { orientation: "horizontal" }, "context:" + C2.length)), C2.push(X(ke, { command: n2.getCommand("hideColumns"), ...y2, key: "context:" + C2.length })), C2.push(X(ke, { command: n2.getCommand("unhideColumns"), ...y2, key: "context:" + C2.length }))), v2 && (C2.push(z(ve, { orientation: "horizontal" }, "context:" + C2.length)), C2.push(X(ke, { command: n2.getCommand("hideRows"), ...y2, key: "context:" + C2.length })), C2.push(X(ke, { command: n2.getCommand("unhideRows"), ...y2, key: "context:" + C2.length }))), (k2 || v2) && C2.push(z(ve, { orientation: "horizontal" }, "context:" + C2.length)), k2 && (C2.push(X(ke, { command: n2.getCommand("autoFitColumns"), ...y2, key: "context:" + C2.length })), C2.push(X(ke, { ...y2, command: n2.getCommand("resizeColumns"), key: "context:" + C2.length }))), v2 && (C2.push(X(ke, { command: n2.getCommand("autoFitRows"), ...y2, key: "context:" + C2.length })), C2.push(X(ke, { ...y2, command: n2.getCommand("resizeRows"), key: "context:" + C2.length }))));
1932
+ const T2 = [], R2 = n2.getCommand("formatTableStyle"), D2 = R2?.context()?.table();
1933
+ if (St(R2), !k2 && !v2) {
1934
+ if (T2.push(z(ve, { orientation: "horizontal" }, "contextBefore:" + T2.length)), h2?.getHyperlink()) T2.push(X(We, { ...S2, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + T2.length, quickCommand: "openHyperlink" }));
1926
1935
  else {
1927
1936
  const e3 = n2.getCommand("updateHyperlink");
1928
- T2.push(X(ve, { command: e3, ...y2, key: "contextBefore:" + T2.length }));
1937
+ T2.push(X(ke, { command: e3, ...y2, key: "contextBefore:" + T2.length }));
1929
1938
  }
1930
- if (h2?.getComments()) T2.push(X($e, { ...S2, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + T2.length, quickCommand: "updateComments" }));
1939
+ if (h2?.getComments()) T2.push(X(We, { ...S2, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + T2.length, quickCommand: "updateComments" }));
1931
1940
  else {
1932
1941
  const e3 = n2.getCommand("updateComments");
1933
- T2.push(X(ve, { command: e3, ...y2, key: "contextBefore:" + T2.length }));
1942
+ T2.push(X(ke, { command: e3, ...y2, key: "contextBefore:" + T2.length }));
1934
1943
  }
1935
- P2 ? T2.push(X($e, { ...S2, variant: ut.Menuitem, key: "contextBefore:" + T2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: P2, quickCommand: "editTable" })) : T2.push(X(ve, { command: n2.getCommand("insertTable"), ...y2, key: "context:" + k2.length })), T2.push(X(Wa, { ...S2, key: "contextBefore:" + T2.length }));
1944
+ D2 ? T2.push(X(We, { ...S2, variant: ft.Menuitem, key: "contextBefore:" + T2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: D2, quickCommand: "editTable" })) : T2.push(X(ke, { command: n2.getCommand("insertTable"), ...y2, key: "context:" + C2.length })), T2.push(X(za, { ...S2, key: "contextBefore:" + T2.length }));
1936
1945
  }
1937
- const D2 = L(H, { children: [z(ve, { command: n2.getCommand("cut"), ...y2 }), z(fa, { command: n2.getCommand("copy"), ...y2 }), z(Yo, { command: n2.getCommand("paste"), ...S2, includePasteAllInPopup: false }), z(Te, { orientation: "horizontal" }), z(Ko, { ...S2 }), z(Te, { orientation: "horizontal" }), z(zo, { commands: n2, ...S2, disableSheet: true }), z(Wo, { commands: n2, ...S2, disableSheet: true }), z(Lo, { ...S2 }), T2, k2] });
1938
- return z(J, { ref: t2, className: mt("menu", i2), sx: { ...r2 }, ...s2, children: D2 });
1946
+ const F2 = L(H, { children: [z(ke, { command: n2.getCommand("cut"), ...y2 }), z(da, { command: n2.getCommand("copy"), ...y2 }), z(Zo, { command: n2.getCommand("paste"), ...S2, includePasteAllInPopup: false }), z(ve, { orientation: "horizontal" }), z(Vo, { ...S2 }), z(ve, { orientation: "horizontal" }), z(Ho, { commands: n2, ...S2, disableSheet: true }), z(zo, { commands: n2, ...S2, disableSheet: true }), z(Ao, { ...S2 }), T2, C2] });
1947
+ return z(Q, { ref: t2, className: gt("menu", i2), sx: { ...r2 }, ...s2, children: F2 });
1939
1948
  }));
1940
- ha.displayName = "WorkbookContextMenu";
1941
- const fa = $(O((e2, t2) => {
1942
- const { command: o2, ...n2 } = e2, a2 = wt(), [r2, l2] = _(false), [i2, s2] = _("info");
1943
- return U(() => {
1944
- const e3 = a2.getMode();
1945
- l2("copy" === e3?.key || "cut" === e3?.key), s2("cut" === e3?.key ? "warn" : "accent");
1946
- }, [a2]), z(ve, { ref: t2, command: o2, icon: z(xt, { iconKey: "copy.walking", sourceProps: { isWalking: r2, themedType: i2 } }), ...n2 });
1947
- })), xa = $(O((e2, t2) => {
1948
- const { movable: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2;
1949
- w(o2, { onAnyChange(e3) {
1950
- } });
1951
- const s2 = V(() => ({}), []), d2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1952
- }, onError() {
1953
- console.log("onError");
1954
- } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = V(() => ({ variant: ut.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = V(() => ({ commands: n2, variant: ut.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = L(H, { children: [z(fa, { command: n2.getCommand("copy"), ...c2, variant: ut.Menuitem }), [], z(Te, { orientation: "horizontal" }), z($e, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), z($e, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), z(Te, { orientation: "horizontal" }), z(ve, { ...c2, command: n2.getCommand("toggleLockAspectRatio") }), z(Te, { orientation: "horizontal" }), z($e, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: "DrawAlignLeft", tooltip: "Quickly change the placement of your drawings." }), z(Te, { orientation: "horizontal" }), z($e, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
1955
- return z(J, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: p2 });
1956
- }));
1957
- xa.displayName = "MovableContextMenu";
1958
- const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) => z(Rn, { ...e2 }), Sa = (e2, t2) => z(Tn, { ref: t2, ...e2 }), ka = (e2) => z(Me, { ...e2 }), Ca = (e2, t2) => z(D, { ref: t2, ...e2 }), va = (e2) => z(kn, { ...e2 }), Ta = (e2) => z(ga, { ...e2 }), Ra = { fireOnModelChange: false }, Pa = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Da = $(O((e2, t2) => {
1959
- const { workbook: o2, createWorkbookOptions: n2, onNewWorkbook: a2, onElementLoad: r2, autoFocus: l2 = false, sx: i2, style: s2, className: d2, onFocus: c2, onBlur: m2, onKeyDown: p2, onRepeatCommandChange: u2, commands: g2, showFormulaBar: h2, formulaBarProps: b2, renderFormulaBar: y2 = Sa, showTabs: S2, tabsProps: k2, renderTabs: C2 = Ta, showStatusBar: v2, statusBarProps: T2, renderStatusBar: P2 = va, toolbarProps: D2, renderToolbar: E2 = oa, contextMenuSx: I2, renderContextMenu: A2 = ya, renderFilterMenu: $2 = wa, renderMovableMenu: O2 = ba, renderLoadingPanel: G2 = ka, loadingPanelProps: j2, sheetProps: X2, renderSheet: Y2 = Ca, mainWrapper: te2, showHorizontalScrollbar: oe2, showVerticalScrollbar: ne2, gridTheme: ae2, headersTheme: re2, enableDarkImages: le2, ...ie2 } = e2, se2 = zt(), de2 = R(), ce2 = V(() => {
1960
- const e3 = { theme: de2.getDefaultTheme(), ...n2 };
1961
- return o2 ?? new f(e3);
1962
- }, [o2]), me2 = q(null), [pe2, ge2] = _(false), he2 = q(null), fe2 = V(() => z(J, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: he2 }), []), [xe2, be2] = _(false), [ye2, we2] = _(false), Se2 = K(() => {
1963
- be2(true);
1964
- }, []), ke2 = q(null), Ce2 = Ct(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => ce2, getSheetElement: () => me2.current, getViewportElement: () => he2.current, getFormulaBarElement: () => ke2.current, focus() {
1965
- me2 && me2.current && me2.current.focus();
1966
- } }), [ce2]), ve2 = q(null);
1967
- Q(() => {
1968
- if (!xe2 || !Ce2.current) return;
1949
+ pa.displayName = "WorkbookContextMenu";
1950
+ const ua = (e2) => z(ca, { ...e2 }), ga = (e2) => z(pa, { ...e2 }), ha = (e2) => z(Tn, { ...e2 }), fa = (e2) => z(vn, { ...e2 }), xa = (e2) => z(Me, { transitionDelay: "160ms", transparentBackground: true, ...e2 }), ba = (e2) => z(Qe, { fullscreen: true, ...e2 }), ya = (e2) => z(F, { ...e2 }), wa = (e2) => z(Sn, { ...e2 }), Sa = (e2) => z(ma, { ...e2 }), Ca = (e2) => z(Fn, { ...e2 }), ka = (e2) => z(Mn, { ...e2 }), va = (e2) => z(Dn, { ...e2 }), Ta = { fireOnModelChange: false }, Ra = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Da = $(O((e2, t2) => {
1951
+ const { workbook: o2, onElementLoad: n2, autoFocus: a2 = false, style: r2, className: l2, onFocus: i2, onBlur: s2, onKeyDown: d2, onRepeatCommandChange: c2, commands: m2, showFormulaBar: p2, propsFormulaBar: u2, renderFormulaBar: g2 = fa, showTabs: h2, propsTabs: x2, renderTabs: b2 = Sa, showStatusBar: y2, propsStatusBar: S2, renderStatusBar: C2 = wa, propsToolbar: k2, renderToolbar: v2 = oa, propsContextMenu: T2, renderContextMenu: R2 = ga, renderFilterMenu: D2 = ha, renderMovableMenu: F2 = ua, renderLoading: P2 = xa, propsLoading: I2, propsSheet: A2, renderSheet: $2 = ya, wrapperMain: O2, showHorizontalScrollbar: G2, showVerticalScrollbar: U2, gridTheme: X2, headersTheme: ee2, enableDarkImages: te2, ...oe2 } = e2;
1952
+ if (!o2) throw new Error("IWorkbook must be provided.");
1953
+ const ne2 = ct(), ae2 = q(null), [re2, le2] = j(false), ie2 = q(null), se2 = V(() => z(Q, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: ie2 }), []), [de2, ce2] = j(false), [me2, pe2] = j(false), ue2 = K(() => {
1954
+ ce2(true);
1955
+ }, []), ge2 = q(null), he2 = Rt(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => o2, getSheetElement: () => ae2.current, getViewportElement: () => ie2.current, getFormulaBarElement: () => ge2.current, focus() {
1956
+ ae2 && ae2.current && ae2.current.focus();
1957
+ } }), [o2]), fe2 = q(null);
1958
+ Y(() => {
1959
+ if (!de2 || !he2.current) return;
1969
1960
  (async () => {
1970
- ve2.current !== r2 && (await r2?.({ source: Ce2.current }), ve2.current = r2), we2(true);
1961
+ fe2.current !== n2 && (await n2?.({ source: he2.current }), fe2.current = n2), pe2(true);
1971
1962
  })();
1972
- }, [xe2, Ce2.current]), In(Ce2.current);
1973
- const Te2 = K((e3) => (me2.current?.submitEdit(), true), []), Re2 = K(() => {
1963
+ }, [de2, he2.current]), Pn(he2.current);
1964
+ const xe2 = K((e3) => (ae2.current?.submitEdit(), true), []), be2 = K(() => {
1974
1965
  requestAnimationFrame(() => {
1975
- me2?.current?.focus();
1966
+ ae2?.current?.focus();
1976
1967
  });
1977
- }, []), [Pe2, De2] = _(ce2?.getSelectedSheet()), [Ne2, Be2] = _(ce2?.getProtection());
1978
- w(ce2, { onSheetsChange: (e3) => {
1979
- De2(e3?.getSelectedSheet());
1968
+ }, []), [ye2, we2] = j(o2.getSelectedSheet()), [Se2, Ce2] = j(o2.getProtection());
1969
+ w(o2, { onSheetsChange: (e3) => {
1970
+ we2(e3?.getSelectedSheet());
1980
1971
  }, onViewChange(e3) {
1981
- De2(e3?.getSelectedSheet());
1972
+ we2(e3?.getSelectedSheet());
1982
1973
  }, onProtectionChange: (e3) => {
1983
- Be2(e3?.getProtection());
1984
- } }), w(ce2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
1985
- me2.current.getSheet() !== t3 ? me2.current.getGridElement()?.onViewChangeOnce(() => {
1986
- me2.current.getSheet() !== t3 && e4(false), e4(true);
1974
+ Ce2(e3?.getProtection());
1975
+ } }), w(o2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
1976
+ ae2.current.getSheet() !== t3 ? ae2.current.getGridElement()?.onViewChangeOnce(() => {
1977
+ ae2.current.getSheet() !== t3 && e4(false), e4(true);
1987
1978
  }) : e4(true);
1988
- }) }, Ra);
1989
- const [Ee2, Ie2] = Z((e3) => e3 + 1, 0), Ae2 = ce2?.getView();
1990
- w(Ae2, { onViewChange: (e3) => {
1991
- Ie2();
1979
+ }) }, Ta);
1980
+ const [ke2, ve2] = Z((e3) => e3 + 1, 0), Te2 = o2.getView();
1981
+ w(Te2, { onViewChange: (e3) => {
1982
+ ve2();
1992
1983
  } });
1993
- const Le2 = ae2 ?? se2, He2 = V(() => Hn(se2, Le2), [se2, Le2]), ze2 = re2 ?? se2, We2 = V(() => Hn(se2, ze2), [se2, ze2]), [$e2, Oe2] = _(null);
1984
+ const Re2 = X2 ?? ne2, De2 = V(() => Ln(ne2, Re2), [ne2, Re2]), Ne2 = ee2 ?? ne2, Be2 = V(() => Ln(ne2, Ne2), [ne2, Ne2]), [Ee2, Pe2] = j(null);
1994
1985
  K(() => {
1995
- me2.current.focus();
1986
+ ae2.current.focus();
1996
1987
  }, []);
1997
- const Ve2 = ia({ workbook: ce2, workbookElement: Ce2.current, target: () => me2.current, commands: g2, darkMode: He2.body.darkMode, onNewWorkbook: a2 }), Ke2 = q(null), [Ge2, _e2] = _(false), [Ue2, qe2] = _(null), [Xe2, Ze2] = _(Nt.Top), [Ye2, Qe2] = _(x.EmptyBounds), et2 = K(() => {
1998
- _e2(false), qe2(null);
1999
- }, []), tt2 = K((e3, t3, o3 = Nt.Top) => {
2000
- Qe2(e3), Ze2(o3), qe2(t3), null !== Ke2.current && setTimeout(() => {
2001
- null !== Ke2.current && Ke2.current.update();
2002
- }, 160), _e2(true);
2003
- }, []), [ot2, nt2] = _("sheet"), at2 = S2 ?? Ae2?.isShowTabs(), rt2 = oe2 ?? Ae2?.isShowHorizontalScrollbar(), lt2 = h2 ?? Ae2?.isShowFormulaBar(), it2 = v2 ?? Ae2?.isShowStatusBar(), st2 = ne2 ?? Ae2?.isShowVerticalScrollbar(), dt2 = He2?.header?.edgeStrokeFill || "rgb(171,171,171)", ct2 = V(() => it2 ? P2({ sheet: Pe2, gridStyle: He2, ...T2 }) : null, [P2, T2, it2, He2, Pe2]), pt2 = V(() => E2({ commands: Ve2, workbook: Ce2.current, ...D2 }), [Ve2, E2, D2, se2]), [ut2, { width: ht2 }] = Ut(), ft2 = 0 === ht2 || ht2 > 560, xt2 = V(() => {
2004
- if (!at2) return null;
2005
- let e3 = C2({ background: He2.body.fill, borderWidth: 1, borderColor: dt2, gridTheme: Le2, gridStyle: He2, onBeforeUserChange: Te2, onUserChange: Re2, workbook: ce2, commands: Ve2, sheetTabProps: {}, ...k2 });
2006
- return ft2 || (e3 = z("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
2007
- }, [C2, k2, se2, ce2, Le2, ft2, Ve2, at2]), bt2 = K((e3) => {
2008
- const { style: t3, ...o3 } = e3;
2009
- let n3 = null, a3 = null, r3 = null;
2010
- if (rt2 && (a3 = z("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${dt2} 1px`, flexDirection: "column", justifyContent: "center" }, children: z(F, { ...o3, style: { paddingLeft: "4px", paddingRight: "4px", ...t3 }, touchThumbProps: { backgroundColor: Le2.palette.background.paper, borderColor: Le2.palette.primary.main, fillColor: "grey" }, endGap: 700, sheet: Pe2, onShowTooltip: (e4) => {
2011
- tt2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
2012
- }, onCloseTooltip: () => et2() }) })), at2 && ft2 && (r3 = xt2), at2 && ft2 && !rt2 && (r3 = L(J, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [r3, z(J, { sx: { borderTop: `solid ${dt2} 1px`, flex: "1" } })] })), r3 && rt2) n3 = z(vt, { position: ce2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
2013
- ce2.getView().setTabRatio(Math.round(10 * e4));
2014
- }, minBefore: "200px", minAfter: "180px", resizerProps: { 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='${se2.palette.text.icon ?? se2.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 ${dt2} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: r3, elementAfter: a3 });
2015
- else if (rt2) n3 = a3;
1988
+ const Ie2 = ia({ workbook: o2, workbookElement: he2.current, target: () => ae2.current, commands: m2, darkMode: De2.body.darkMode }), Ae2 = q(null), [Le2, He2] = j(false), [ze2, We2] = j(null), [$e2, Oe2] = j(It.Top), [Ve2, Ke2] = j(f.EmptyBounds), Ge2 = K(() => {
1989
+ He2(false), We2(null);
1990
+ }, []), je2 = K((e3, t3, o3 = It.Top) => {
1991
+ Ke2(e3), Oe2(o3), We2(t3), null !== Ae2.current && setTimeout(() => {
1992
+ null !== Ae2.current && Ae2.current.update();
1993
+ }, 160), He2(true);
1994
+ }, []), [Ue2, qe2] = j("sheet"), Xe2 = h2 ?? Te2?.isShowTabs(), Ze2 = G2 ?? Te2?.isShowHorizontalScrollbar(), Ye2 = p2 ?? Te2?.isShowFormulaBar(), Qe2 = y2 ?? Te2?.isShowStatusBar(), et2 = U2 ?? Te2?.isShowVerticalScrollbar(), tt2 = De2?.header?.edgeStrokeFill || "rgb(171,171,171)", ot2 = V(() => Qe2 ? C2({ sheet: ye2, gridStyle: De2, ...S2 }) : null, [C2, S2, Qe2, De2, ye2]), nt2 = V(() => v2({ commands: Ie2, workbook: he2.current, ...k2 }), [Ie2, v2, k2, ne2]), [at2, { width: rt2 }] = jt(), lt2 = 0 === rt2 || rt2 > 560, it2 = V(() => {
1995
+ if (!Xe2) return null;
1996
+ let e3 = b2({ background: De2.body.fill, borderWidth: 1, borderColor: tt2, gridTheme: Re2, gridStyle: De2, onBeforeUserChange: xe2, onUserChange: be2, workbook: o2, commands: Ie2, propsSheetTab: {}, ...x2 });
1997
+ return lt2 || (e3 = z("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
1998
+ }, [b2, x2, ne2, o2, Re2, lt2, Ie2, Xe2]), st2 = K((e3) => {
1999
+ const { style: t3, ...n3 } = e3;
2000
+ let a3 = null, r3 = null, l3 = null;
2001
+ if (Ze2 && (r3 = z("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${tt2} 1px`, flexDirection: "column", justifyContent: "center" }, children: z(M, { ...n3, style: { paddingLeft: "4px", paddingRight: "4px", ...t3 }, propsTouchThumb: { backgroundColor: Re2.palette.background.paper, borderColor: Re2.palette.primary.main, fillColor: "grey" }, endGap: 700, sheet: ye2, onShowTooltip: (e4) => {
2002
+ je2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
2003
+ }, onCloseTooltip: () => Ge2() }) })), Xe2 && lt2 && (l3 = it2), Xe2 && lt2 && !Ze2 && (l3 = L(Q, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [l3, z(Q, { sx: { borderTop: `solid ${tt2} 1px`, flex: "1" } })] })), l3 && Ze2) a3 = z(Dt, { position: o2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
2004
+ o2.getView().setTabRatio(Math.round(10 * e4));
2005
+ }, 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='${ne2.palette.text.icon ?? ne2.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 ${tt2} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: l3, elementAfter: r3 });
2006
+ else if (Ze2) a3 = r3;
2016
2007
  else {
2017
- if (!r3) return z(J, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: it2 ? null : `solid ${dt2} 1px` } });
2018
- n3 = r3;
2019
- }
2020
- return z(J, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: n3 });
2021
- }, [Pe2, Te2, ce2, He2, Le2, Ve2, at2, rt2, it2, ft2]), [yt2, wt2] = W.useState(null), St2 = V(() => ({ placement: "right-start", ...yt2?.popperProps }), [yt2?.popperProps]), { reference: kt2, component: Tt2 } = je({ label: "contextMenu", popperProps: St2, anchor: yt2?.anchor ?? { getBoundingClientRect: () => new DOMRect(yt2?.clientX || 0, yt2?.clientY || 0) }, onClose: () => wt2(null), createPopupPanel: yt2?.createPopupPanel });
2022
- U(() => {
2023
- yt2 ? kt2.open(0) : kt2.close(0);
2024
- }, [yt2]);
2025
- const Rt2 = gt((e3, t3) => {
2008
+ if (!l3) return z(Q, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: Qe2 ? null : `solid ${tt2} 1px` } });
2009
+ a3 = l3;
2010
+ }
2011
+ return z(Q, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: a3 });
2012
+ }, [ye2, xe2, o2, De2, Re2, Ie2, Xe2, Ze2, Qe2, lt2]), [dt2, ut2] = W.useState(null), ht2 = V(() => ({ placement: "right-start", ...dt2?.propsPopper }), [dt2?.propsPopper]), { reference: ft2, component: bt2 } = _e({ label: "contextMenu", propsPopper: ht2, anchor: dt2?.anchor ?? { getBoundingClientRect: () => new DOMRect(dt2?.clientX || 0, dt2?.clientY || 0) }, onClose: () => ut2(null), createPopupPanel: dt2?.createPopupPanel });
2013
+ _(() => {
2014
+ dt2 ? ft2.open(0) : ft2.close(0);
2015
+ }, [dt2]);
2016
+ const yt2 = xt((e3, t3) => {
2026
2017
  if (e3?.isDefaultPrevented()) return true;
2027
- e3.preventDefault(), yt2 && yt2.anchor === e3.currentTarget ? wt2(null) : wt2({ anchor: e3.currentTarget, popperProps: { offsets: [-4, 2] }, createPopupPanel: (e4) => {
2018
+ e3.preventDefault(), dt2 && dt2.anchor === e3.currentTarget ? ut2(null) : ut2({ anchor: e3.currentTarget, propsPopper: { offsets: [-4, 2] }, createPopupPanel: (e4) => {
2028
2019
  const { floatReference: o3 } = e4;
2029
- return $2({ filter: t3, commands: Ve2, floatReference: o3, sx: { ...I2 } });
2020
+ return D2({ filter: t3, commands: Ie2, floatReference: o3, ...T2 });
2030
2021
  } });
2031
- }, [$2, I2, Ve2, ce2, yt2]), Dt2 = gt((e3) => {
2022
+ }, [D2, T2, Ie2, o2, dt2]), wt2 = xt((e3) => {
2032
2023
  if (e3.originalEvent?.isDefaultPrevented()) return true;
2033
- e3.originalEvent?.preventDefault(), wt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2024
+ e3.originalEvent?.preventDefault(), ut2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2034
2025
  const { floatReference: t3 } = e4;
2035
- return A2({ commands: Ve2, workbook: ce2, floatReference: t3, sx: { ...I2 } });
2026
+ return R2({ commands: Ie2, workbook: o2, floatReference: t3, ...T2 });
2036
2027
  } });
2037
- }, [A2, I2, Ve2, ce2]), Mt2 = gt((e3, t3) => {
2028
+ }, [R2, T2, Ie2, o2]), St2 = xt((e3, t3) => {
2038
2029
  if (e3?.isDefaultPrevented()) return true;
2039
- e3.preventDefault(), wt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2030
+ e3.preventDefault(), ut2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2040
2031
  const { floatReference: o3 } = e4;
2041
- return O2({ movable: t3, commands: Ve2, floatReference: o3, sx: { ...I2 } });
2032
+ return F2({ movable: t3, commands: Ie2, floatReference: o3, ...T2 });
2042
2033
  } });
2043
- }, [O2, I2, Ve2]);
2034
+ }, [F2, T2, Ie2]);
2044
2035
  V(() => {
2045
- const e3 = [new Pt("openContextMenu", () => me2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [Ft.Shift] }, { key: "ContextMenu" }] })];
2046
- Ve2.addCommands(e3, true);
2047
- }, [Ve2]), U(() => {
2048
- Ve2.getCommand("openContextMenu").updateCallback(() => {
2049
- const e3 = Pe2.getSelection().getCoords().cell;
2050
- me2.current?.getGridElement()?.scrollCellCoordsIntoView(e3).then((t3) => {
2036
+ const e3 = [new Nt("openContextMenu", () => ae2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [Et.Shift] }, { key: "ContextMenu" }] })];
2037
+ Ie2.addCommands(e3, true);
2038
+ }, [Ie2]), _(() => {
2039
+ Ie2.getCommand("openContextMenu").updateCallback(() => {
2040
+ const e3 = ye2.getSelection().getCoords().cell;
2041
+ ae2.current?.getGridElement()?.scrollCellCoordsIntoView(e3).then((t3) => {
2051
2042
  requestAnimationFrame(() => {
2052
- const o3 = Pe2.getView().getZoomScale() / 100, n3 = Pe2.getColumnHeaders().findOffset(e3.colIndex + 1) * o3, a3 = Pe2.getRowHeaders().findOffset(e3.rowIndex + 1) * o3, r3 = me2.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
2053
- Dt2({ clientX: n3 - r3.x - t3.left + 6, clientY: a3 - r3.y - t3.top + 6 });
2043
+ const o3 = ye2.getView().getZoomScale() / 100, n3 = ye2.getColumnHeaders().findOffset(e3.colIndex + 1) * o3, a3 = ye2.getRowHeaders().findOffset(e3.rowIndex + 1) * o3, r3 = ae2.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
2044
+ wt2({ clientX: n3 - r3.x - t3.left + 6, clientY: a3 - r3.y - t3.top + 6 });
2054
2045
  });
2055
2046
  });
2056
2047
  });
2057
- }, [Pe2]);
2058
- const Et2 = gt((e3) => {
2059
- Ve2?.dispatchToFocusedCommand(e3);
2060
- }, [Ve2]), It2 = gt(() => {
2061
- In(Ce2.current);
2062
- }, [ce2, Ce2.current]), At2 = K(() => {
2063
- nt2("sheet");
2064
- }, []), Lt2 = K(() => {
2065
- nt2("formulaBar");
2066
- }, []), Ht2 = K((e3) => {
2048
+ }, [ye2]);
2049
+ const Ct2 = xt((e3) => {
2050
+ Ie2?.dispatchToFocusedCommand(e3);
2051
+ }, [Ie2]), kt2 = xt(() => {
2052
+ Pn(he2.current);
2053
+ }, []), vt2 = K(() => {
2054
+ qe2("sheet");
2055
+ }, []), Tt2 = K(() => {
2056
+ qe2("formulaBar");
2057
+ }, []), Ft2 = K((e3) => {
2067
2058
  const { style: t3, ...o3 } = e3;
2068
- return z(F, { ...o3, style: { ...t3, paddingTop: "4px", paddingBottom: "4px" }, touchThumbProps: { backgroundColor: Le2.palette.background.paper, borderColor: Le2.palette.primary.main, fillColor: "grey" }, sheet: Pe2, endGap: 700, onShowTooltip: (e4) => {
2069
- tt2(e4.anchor, e4.display, Nt.Left);
2070
- }, onCloseTooltip: () => et2() });
2071
- }, [Pe2, Le2]);
2072
- U(() => {
2073
- l2 && me2 && me2.current && me2.current.focus();
2059
+ return z(M, { ...o3, style: { ...t3, paddingTop: "4px", paddingBottom: "4px" }, propsTouchThumb: { backgroundColor: Re2.palette.background.paper, borderColor: Re2.palette.primary.main, fillColor: "grey" }, sheet: ye2, endGap: 700, onShowTooltip: (e4) => {
2060
+ je2(e4.anchor, e4.display, It.Left);
2061
+ }, onCloseTooltip: () => Ge2() });
2062
+ }, [ye2, Re2]);
2063
+ _(() => {
2064
+ a2 && ae2 && ae2.current && ae2.current.focus();
2074
2065
  }, []);
2075
- const [Ot2, Vt2] = W.useState(null), Kt2 = K((e3) => {
2076
- Ve2?.getCommand("openWorkbook") && ("dragenter" === e3.type || "dragover" === e3.type ? e3.dataTransfer?.types.includes("Files") ? e3.dataTransfer.files[0]?.type?.startsWith("image/") || e3.dataTransfer.items[0]?.type?.startsWith("image/") || 1 === e3.dataTransfer.types.length && Vt2("Drop to open") : (e3.dataTransfer?.types.includes("text/html") || e3.dataTransfer?.types.includes("text/plain"), e3.dataTransfer.effectAllowed = "none", e3.dataTransfer.dropEffect = "none") : "dragleave" === e3.type && Vt2(null), e3.preventDefault());
2077
- }, [Ve2]), Gt2 = gt((e3) => {
2078
- if (Ve2?.getCommand("openWorkbook") && (e3.preventDefault(), e3.stopPropagation(), Vt2(null), e3.dataTransfer.files && e3.dataTransfer.files.length > 0)) {
2079
- const t3 = e3.dataTransfer.files[0];
2080
- if (!t3) return;
2081
- if (t3?.type?.startsWith("image/")) {
2082
- const o3 = me2.current?.getGridElement().getViewFromClient(e3.clientX, e3.clientY);
2083
- if (!o3) return;
2084
- const n3 = o3.getRelativePointFromClient(e3.clientX, e3.clientY), a3 = o3.toAbsoluteBounds({ ...n3, width: 0, height: 0 }), r3 = o3.getCellCoordsFromClient(e3.clientX, e3.clientY);
2085
- if (!r3) return;
2086
- Ve2?.getCommand("insertImageFromFile")?.execute({ file: t3, options: { bounds: { x: a3.x, y: a3.y } }, goto: { range: { ...r3 } } });
2087
- } else Ve2?.getCommand("openWorkbook")?.execute(t3);
2088
- }
2089
- }, [Ve2, Ot2]), _t2 = V(() => Ot2 ? z(J, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: (e3) => e3.palette.divider, color: (e3) => e3.palette.primary.dark }, children: z(ee, { variant: "h4", children: Ot2 }) }) : null, [Ot2]), jt2 = q(null), qt2 = V(() => z(Jt, { in: !ye2, nodeRef: jt2, timeout: 500, classNames: "animating", unmountOnExit: true, children: z(J, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: ye2 ? "none" : i2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: G2({ ref: jt2, transitionDelay: "0", transparentBackground: false, sx: { opacity: ye2 ? 0 : i2?.opacity, pointerEvents: ye2 ? "none" : i2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...j2 } }) }) }), [ye2, G2, j2]), Xt2 = V(() => y2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: ce2, sheetElement: me2.current, gridStyle: He2, onFocus: Lt2, ...b2, NamedCollectionEditorProps: { restoreFocus: (e3) => me2.current.focus(e3), ...b2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Ve2, ...b2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, ke2), [y2, b2, ce2, He2, Ve2, ye2]), Zt2 = K((e3) => {
2066
+ const Mt2 = q(null), Bt2 = V(() => z(Qt, { in: !me2, nodeRef: Mt2, timeout: 500, classNames: "animating", unmountOnExit: true, children: z(Q, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", position: "absolute", boxSizing: "border-box", pointerEvents: me2 ? "none" : r2?.pointerEvents }, children: P2?.({ ref: Mt2, ...I2 }) }) }), [me2, P2, I2]), Pt2 = V(() => g2({ ref: ge2, sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: o2, sheetElement: ae2.current, gridStyle: De2, onFocus: Tt2, ...u2, propsNamedCollectionEditor: { restoreFocus: (e3) => ae2.current.focus(e3), ...u2?.propsNamedCollectionEditor, propsCommandPopupButton: { commands: Ie2, ...u2?.propsNamedCollectionEditor?.propsCommandPopupButton } } }), [g2, u2, o2, De2, Ie2, me2]), Lt2 = K((e3) => {
2090
2067
  const { movable: t3, ...o3 } = e3, n3 = { movable: t3, onContextMenuCapture: (e4) => {
2091
- Mt2(e4, t3);
2068
+ St2(e4, t3);
2092
2069
  }, ...o3 }, a3 = t3.getContent().getType();
2093
2070
  let r3 = null;
2094
- if ("picture" === a3) return z(M, { loadingPanel: z(Me, { transitionDelay: "100", style: { position: "absolute" }, sx: { border: (e4) => `solid 1px ${e4.palette.action.active}` } }), picture: t3.getContent(), description: t3.getDescription() ?? t3?.getName(), ...n3 });
2071
+ if ("picture" === a3) return z(N, { loadingPanel: z(Me, { style: { position: "absolute" }, transitionDelay: "100", sx: { border: (e4) => `solid 1px ${e4.palette.action.active}` } }), picture: t3.getContent(), description: t3.getDescription() ?? t3?.getName(), ...n3 });
2095
2072
  if ("chart" === a3) {
2096
2073
  const e4 = { ...n3, chart: t3.getContent() };
2097
- return z(N, { ...e4 });
2074
+ return z(B, { ...e4 });
2098
2075
  }
2099
2076
  if (r3 = `Float of type '${a3}'.`, "string" == typeof r3) {
2100
2077
  const e4 = { ...n3, description: r3 };
2101
- r3 = z(B, { ...e4 });
2078
+ r3 = z(E, { ...e4 });
2102
2079
  }
2103
2080
  return z("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: r3 }, t3.getUUID());
2104
- }, []), Yt2 = V(() => Y2({ style: Pa, onFocus: At2, gridStyle: He2, headersStyle: We2, sheet: Pe2, commands: Ve2, onSheetContextMenu: Dt2, onViewportChange: (e3) => {
2105
- Oe2(e3);
2106
- }, showScrollbars: false, viewportComponent: fe2, onRepeatCommandChange: u2, onElementLoad: Se2, onShowColumnTooltip: (e3) => {
2107
- tt2(e3.anchor, e3.display, Nt.Top);
2081
+ }, []), Ht2 = V(() => $2({ ref: ae2, style: Ra, onFocus: vt2, gridStyle: De2, headersStyle: Be2, sheet: ye2, commands: Ie2, onSheetContextMenu: wt2, onViewportChange: (e3) => {
2082
+ Pe2(e3);
2083
+ }, showScrollbars: false, viewportComponent: se2, onRepeatCommandChange: c2, onElementLoad: ue2, onShowColumnTooltip: (e3) => {
2084
+ je2(e3.anchor, e3.display, It.Top);
2108
2085
  }, onShowRowTooltip: (e3) => {
2109
- tt2(e3.anchor, e3.display, Nt.Right);
2086
+ je2(e3.anchor, e3.display, It.Right);
2110
2087
  }, onShowTooltip: (e3) => {
2111
- tt2({ x: e3.anchor.x, y: e3.anchor.y, width: 0, height: 0 }, e3.display, e3.placement);
2112
- }, onCloseTooltip: () => et2(), renderMovable: Zt2, ...X2, cellRenderProps: { onFilterButtonMouseDown: (e3, t3) => {
2113
- X2?.cellRenderProps?.onFilterButtonMouseDown(e3, t3), Rt2(e3, t3);
2114
- }, ...X2?.cellRenderProps } }, me2), [Ve2, X2, Pe2, He2, u2]), Qt2 = V(() => {
2115
- let e3 = z(Bt, { ref: ut2, style: Pa, viewport: $e2, touchElement: me2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2116
- me2.current?.getGridElement()?.scrollTo(e4);
2117
- }, showHorizontalScrollbar: rt2 || at2, showVerticalScrollbar: st2, createHorizontalScrollbar: bt2, createVerticalScrollbar: Ht2, children: Yt2 });
2118
- return ft2 || 0 === ht2 || (e3 = L(H, { children: [e3, xt2] })), te2 ? te2(e3) : e3;
2119
- }, [rt2, at2, bt2, st2, $e2, ft2, Yt2, xt2, se2, te2, Le2]), eo2 = V(() => z(Fe, { arrow: true, disableInteractive: true, open: Ge2, title: z(ee, { variant: "subtitle2", component: "div", children: Ue2 }), placement: Xe2, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: Ke2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ge2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Ye2.x, Ye2.y, Ye2.width, Ye2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: z(J, {}) }), [Ge2, Ue2, Xe2, Ye2, Ke2]), to2 = V(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? He2.header.fill : e3.palette.background.paper, "& *": { ...Je(se2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${dt2} 1px` }, ...i2 }), [i2, He2]), oo2 = V(() => z(J, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), []), no2 = V(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: ye2 ? void 0 : 0, "--sxl-app-color-high-contrast": se2.palette.primary.main, "--sxl-app-color-primary": se2.palette.primary.main, "--sxl-app-color-primary-dark": se2.palette.primary.dark, "--sxl-app-color-primary-light": se2.palette.primary.light, "--sxl-app-color-info": se2.palette.info.main, "--sxl-app-color-info-dark": se2.palette.info.dark, "--sxl-app-color-info-light": se2.palette.info.light, "--sxl-app-color-secondary": se2.palette.secondary.main, "--sxl-app-color-secondary-dark": se2.palette.secondary.dark, "--sxl-app-color-secondary-light": se2.palette.secondary.light, "--sxl-app-color-success": se2.palette.success.main, "--sxl-app-color-success-dark": se2.palette.success.dark, "--sxl-app-color-success-light": se2.palette.success.light, "--sxl-app-color-warning": se2.palette.warning.main, "--sxl-app-color-warning-dark": se2.palette.warning.dark, "--sxl-app-color-warning-light": se2.palette.warning.light, "--sxl-app-color-error": se2.palette.error.main, "--sxl-app-color-error-dark": se2.palette.error.dark, "--sxl-app-color-error-light": se2.palette.error.light, "--sxl-app-color-text": se2.palette.text.primary, "--sxl-app-color-text-secondary": se2.palette.text.secondary, "--sxl-app-color-text-disabled": se2.palette.text.disabled, "--sxl-app-color-background": se2.palette.background.paper, "--sxl-app-color-button-surface": se2.palette.grey[600], "--sxl-app-color-shadow": se2.palette.action.focus, "--sxl-app-color-grey": se2.palette.grey[500], "--sxl-app-filter-dark-invert": He2.body.darkMode && le2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": He2.body.darkMode ? `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` : void 0 }), [He2, se2, ye2]), ao2 = V(() => mt(nn), []);
2120
- return L(ue, { className: mt("sheetxl-workbook", ca, { "Mui-focusVisible": pe2 }, da, d2), sx: to2, style: s2, square: false, ...ie2, ref: Ce2, onFocus: (e3) => {
2121
- ge2(true), It2(), c2?.(e3);
2088
+ je2({ x: e3.anchor.x, y: e3.anchor.y, width: 0, height: 0 }, e3.display, e3.placement);
2089
+ }, onCloseTooltip: () => Ge2(), renderMovable: Lt2, ...A2, propsCellRender: { onFilterButtonMouseDown: (e3, t3) => {
2090
+ A2?.propsCellRender?.onFilterButtonMouseDown(e3, t3), yt2(e3, t3);
2091
+ }, ...A2?.propsCellRender } }), [Ie2, A2, ye2, De2, c2]), zt2 = V(() => {
2092
+ let e3 = z(At, { ref: at2, style: Ra, viewport: Ee2, touchElement: ae2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2093
+ ae2.current?.getGridElement()?.scrollTo(e4);
2094
+ }, showHorizontalScrollbar: Ze2 || Xe2, showVerticalScrollbar: et2, renderScrollbarHorizontal: st2, renderScrollbarVertical: Ft2, children: Ht2 });
2095
+ return lt2 || 0 === rt2 || (e3 = L(H, { children: [e3, it2] })), O2 ? O2(e3) : e3;
2096
+ }, [Ze2, Xe2, st2, et2, Ee2, lt2, Ht2, it2, ne2, O2, Re2]), Wt2 = V(() => z(Fe, { arrow: true, disableInteractive: true, open: Le2, title: z(J, { variant: "subtitle2", component: "div", children: ze2 }), placement: $e2, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: Ae2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Le2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Ve2.x, Ve2.y, Ve2.width, Ve2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: z(Q, {}) }), [Le2, ze2, $e2, Ve2, Ae2]), $t2 = V(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? De2.header.fill : e3.palette.background.paper, "& *": { ...Je(ne2), fontWeight: 400 }, "& .viewport-overlay": { borderRight: `solid ${tt2} 1px` }, ...r2 }), [r2, De2]), Ot2 = V(() => z(Q, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), []), Vt2 = V(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: me2 ? void 0 : 0, "--sxl-app-color-high-contrast": ne2.palette.primary.main, "--sxl-app-color-primary": ne2.palette.primary.main, "--sxl-app-color-primary-dark": ne2.palette.primary.dark, "--sxl-app-color-primary-light": ne2.palette.primary.light, "--sxl-app-color-info": ne2.palette.info.main, "--sxl-app-color-info-dark": ne2.palette.info.dark, "--sxl-app-color-info-light": ne2.palette.info.light, "--sxl-app-color-secondary": ne2.palette.secondary.main, "--sxl-app-color-secondary-dark": ne2.palette.secondary.dark, "--sxl-app-color-secondary-light": ne2.palette.secondary.light, "--sxl-app-color-success": ne2.palette.success.main, "--sxl-app-color-success-dark": ne2.palette.success.dark, "--sxl-app-color-success-light": ne2.palette.success.light, "--sxl-app-color-warning": ne2.palette.warning.main, "--sxl-app-color-warning-dark": ne2.palette.warning.dark, "--sxl-app-color-warning-light": ne2.palette.warning.light, "--sxl-app-color-error": ne2.palette.error.main, "--sxl-app-color-error-dark": ne2.palette.error.dark, "--sxl-app-color-error-light": ne2.palette.error.light, "--sxl-app-color-text": ne2.palette.text.primary, "--sxl-app-color-text-secondary": ne2.palette.text.secondary, "--sxl-app-color-text-disabled": ne2.palette.text.disabled, "--sxl-app-color-background": ne2.palette.background.paper, "--sxl-app-color-button-surface": ne2.palette.grey[600], "--sxl-app-color-shadow": ne2.palette.action.focus, "--sxl-app-color-grey": ne2.palette.grey[500], "--sxl-app-filter-dark-invert": De2.body.darkMode && te2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": De2.body.darkMode ? `linear-gradient(${mt("#fff", pt(5))}, ${mt("#fff", pt(5))})` : void 0 }), [De2, ne2, me2]), Kt2 = V(() => gt(on), []);
2097
+ return L(Q, { className: gt("sheetxl-workbook", sa, { "Mui-focusVisible": re2 }, Hn, l2), sx: $t2, style: r2, ...oe2, ref: he2, onFocus: (e3) => {
2098
+ le2(true), kt2(), i2?.(e3);
2122
2099
  }, onBlur: (e3) => {
2123
- ge2(false), m2?.(e3);
2100
+ le2(false), s2?.(e3);
2124
2101
  }, onKeyDown: (e3) => {
2125
- Et2(e3), p2?.(e3);
2126
- }, onDragStart: (e3) => {
2127
- if (e3.target.src) {
2128
- const t3 = new Image();
2129
- t3.src = e3.target.src, e3.dataTransfer.setDragImage(t3, 1, 1);
2130
- }
2131
- }, onDragEnter: Kt2, onDragLeave: Kt2, onDragOver: Kt2, onDrop: Gt2, children: [L("div", { className: ao2, style: no2, children: [pt2, lt2 ? Xt2 : null, oo2, Qt2, ct2, eo2, Tt2, _t2] }), qt2] });
2102
+ Ct2(e3), d2?.(e3);
2103
+ }, children: [L("div", { className: Kt2, style: Vt2, children: [nt2, Ye2 ? Pt2 : null, Ot2, zt2, ot2, Wt2, bt2] }), Bt2] });
2132
2104
  }));
2133
2105
  Da.displayName = "WorkbookElement";
2134
- const Fa = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => Wt(e3.palette.background.paper, 0.6), borderRadius: (e3) => `${e3.shape.borderRadius}px`, border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (e3) => e3.palette.background.paper }, "&:hover:not([disabled])": { border: (t3) => `solid ${e2 ? t3.palette.text?.primary : t3.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (e3) => `solid ${e3.palette.primary.main} 1px !important`, border: (e3) => `1px solid ${e3.palette?.primary?.main} !important` } }, Ma = $(O((e2, t2) => {
2135
- const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = _(false), [p2, u2] = _(false), [g2, h2] = _(a2 ?? ""), [f2, x2] = _(""), [b2, { width: y2 }] = Ut(), [w2, { width: S2 }] = Ut(), [k2, C2] = _(false), v2 = q(null), T2 = q(null), R2 = Ct(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2106
+ const Fa = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => mt(e3.palette.background.paper, 0.6), borderRadius: (e3) => `${e3.shape.borderRadius}px`, border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (e3) => e3.palette.background.paper }, "&:hover:not([disabled])": { border: (t3) => `solid ${e2 ? t3.palette.text?.primary : t3.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (e3) => `solid ${e3.palette.primary.main} 1px !important`, border: (e3) => `1px solid ${e3.palette?.primary?.main} !important` } }, Ma = $(O((e2, t2) => {
2107
+ const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = j(false), [p2, u2] = j(false), [g2, h2] = j(a2 ?? ""), [f2, x2] = j(""), [b2, { width: y2 }] = jt(), [w2, { width: S2 }] = jt(), [C2, k2] = j(false), v2 = q(null), T2 = q(null), R2 = Rt(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2136
2108
  T2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && v2.current?.select(), v2.current?.focus(t3);
2137
2109
  }, focus: (e3) => {
2138
2110
  v2.current?.focus(e3);
2139
2111
  } }), []);
2140
- return Q(() => {
2141
- C2(a2 !== g2), x2(a2), h2(a2);
2142
- }, [a2]), U(() => {
2143
- k2 && 0 !== y2 && jt.debounce(() => {
2144
- C2(false);
2112
+ return Y(() => {
2113
+ k2(a2 !== g2), x2(a2), h2(a2);
2114
+ }, [a2]), _(() => {
2115
+ C2 && 0 !== y2 && _t.debounce(() => {
2116
+ k2(false);
2145
2117
  }, 300)();
2146
- }, [k2, y2]), U(() => {
2147
- u2(g2 && !to.isValidWindowsFilename(g2));
2148
- }, [g2]), s2 ? null : z(J, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: k2 ? "0" : "1", transition: k2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: _t([R2, w2, t2]), ...d2, children: z(He, { label: T2.current?.requestReason ?? "Workbook Name", children: L(J, { className: mt({ "Mui-focusVisible": c2 }), sx: { visibility: 0 === y2 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...Fa(true, i2), ...o2 }, children: [i2 ? z(ee, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: g2 !== f2 ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (e3) => p2 ? e3.palette.error.dark : void 0 }, children: a2 ?? r2 }) : z(le, { sx: { width: `${Math.min(y2 + 3, Math.max(S2, R2.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (e3) => p2 ? e3.palette.error.dark : void 0, fontStyle: g2 !== f2 ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: true, fullWidth: false, multiline: false, readOnly: i2, spellCheck: false, placeholder: r2, onFocus: (e3) => {
2118
+ }, [C2, y2]), _(() => {
2119
+ u2(g2 && !eo.isValidWindowsFilename(g2));
2120
+ }, [g2]), s2 ? null : z(Q, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: C2 ? "0" : "1", transition: C2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Vt([R2, w2, t2]), ...d2, children: z(Le, { label: T2.current?.requestReason ?? "Workbook Name", children: L(Q, { className: gt({ "Mui-focusVisible": c2 }), sx: { visibility: 0 === y2 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...Fa(true, i2), ...o2 }, children: [i2 ? z(J, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: g2 !== f2 ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (e3) => p2 ? e3.palette.error.dark : void 0 }, children: a2 ?? r2 }) : z(re, { sx: { width: `${Math.min(y2 + 3, Math.max(S2, R2.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (e3) => p2 ? e3.palette.error.dark : void 0, fontStyle: g2 !== f2 ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: true, fullWidth: false, multiline: false, readOnly: i2, spellCheck: false, placeholder: r2, onFocus: (e3) => {
2149
2121
  m2(true), e3.target?.select();
2150
2122
  }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: v2 }, onBlur: () => {
2151
2123
  m2(false), p2 ? h2(f2) : (g2 !== f2 && (l2?.(g2), g2 && T2.current?.onAccept?.(g2, "blur")), T2.current = null);
2152
2124
  }, onChange: (e3) => {
2153
- if (e3.target.value.length > to.MAX_WORKBOOK_NAME_SIZE) return e3.stopPropagation(), void e3.preventDefault();
2125
+ if (e3.target.value.length > eo.MAX_WORKBOOK_NAME_SIZE) return e3.stopPropagation(), void e3.preventDefault();
2154
2126
  h2(e3.target.value);
2155
2127
  }, onKeyDown: (e3) => {
2156
- (to.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(e3.key) || e3.target?.value.length > to.MAX_WORKBOOK_NAME_SIZE) && e3.preventDefault(), e3.which === ft.Enter || e3.which === ft.Tab ? (p2 ? h2(f2) : (l2?.(g2), g2 && (T2.current?.onAccept?.(g2, "keydown"), T2.current = null)), e3.stopPropagation(), e3.preventDefault(), n2?.focus()) : e3.which === ft.Escape && (g2 === f2 ? n2?.focus() : (h2(f2), setTimeout(() => {
2128
+ (eo.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(e3.key) || e3.target?.value.length > eo.MAX_WORKBOOK_NAME_SIZE) && e3.preventDefault(), e3.which === yt.Enter || e3.which === yt.Tab ? (p2 ? h2(f2) : (l2?.(g2), g2 && (T2.current?.onAccept?.(g2, "keydown"), T2.current = null)), e3.stopPropagation(), e3.preventDefault(), n2?.focus()) : e3.which === yt.Escape && (g2 === f2 ? n2?.focus() : (h2(f2), setTimeout(() => {
2157
2129
  e3.target?.select();
2158
2130
  }, 0)), T2.current = null, e3.stopPropagation(), e3.preventDefault());
2159
- }, value: g2 }), z(J, { ref: b2, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: g2 !== f2 ? "italic" : void 0, fontFamily: (e3) => e3.typography.fontFamily, letterSpacing: "0.00938em" }, children: g2 || r2 })] }) }) });
2131
+ }, value: g2 }), z(Q, { ref: b2, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: g2 !== f2 ? "italic" : void 0, fontFamily: (e3) => e3.typography.fontFamily, letterSpacing: "0.00938em" }, children: g2 || r2 })] }) }) });
2160
2132
  }));
2161
2133
  Ma.displayName = "WorkbookTitle";
2162
2134
  const Na = $(O((e2, t2) => {
2163
- const { title: o2, commands: n2, className: a2, ...r2 } = e2, l2 = St(), [i2, s2] = _(false), [d2, c2] = _(false), m2 = q(null), [p2, u2] = Z((e3) => e3 + 1, 0), [g2, { width: h2 }] = Ut(), f2 = pt(n2, ["editTable"])[0].context(), x2 = f2.table(), [b2, y2] = _(() => x2 ? f2.getNames().getRanges(x2.getRange()) : null), S2 = V(() => x2?.getName() ?? "", [x2]);
2135
+ const { title: o2, commands: n2, className: a2, ...r2 } = e2, l2 = vt(), [i2, s2] = j(false), [d2, c2] = j(false), m2 = q(null), [p2, u2] = Z((e3) => e3 + 1, 0), [g2, { width: h2 }] = jt(), f2 = ht(n2, ["editTable"])[0].context(), x2 = f2.table(), [b2, y2] = j(() => x2 ? f2.getNames().getRanges(x2.getRange()) : null), S2 = V(() => x2?.getName() ?? "", [x2]);
2164
2136
  w(f2.table(), { onAnchorCoordsChange(e3) {
2165
2137
  y2(f2.getNames().getRanges(e3.getRange()));
2166
2138
  }, onProtectedChange(e3) {
2167
2139
  u2();
2168
2140
  } });
2169
- const k2 = gt((e3) => {
2141
+ const C2 = xt((e3) => {
2170
2142
  f2?.table().setName(e3);
2171
- }, [f2]), C2 = gt((e3) => {
2143
+ }, [f2]), k2 = xt((e3) => {
2172
2144
  f2?.table().resize(e3.at(0));
2173
2145
  }, [f2]);
2174
2146
  let v2 = null;
2175
- return f2.table() || (v2 = z(ee, { component: "div", style: { top: "0", left: "0", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center" }, children: "No table selected" })), z(ue, { square: true, onFocus: () => s2(true), onBlur: (e3) => {
2147
+ return f2.table() || (v2 = z(J, { component: "div", style: { top: "0", left: "0", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center" }, children: "No table selected" })), z(pe, { square: true, onFocus: () => s2(true), onBlur: (e3) => {
2176
2148
  m2?.current?.contains(e3.relatedTarget) || s2(false);
2177
- }, ref: _t([m2, g2, t2]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (e3) => e3.spacing(1.5), paddingRight: (e3) => e3.spacing(1.5), paddingTop: (e3) => e3.spacing(1.5), paddingBottom: (e3) => e3.spacing(1.5), boxSizing: "border-box" }, className: mt("sxl-table-details-panel", a2, { "sxl-has-focus": i2 }), ...r2, children: v2 || L(J, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: f2.table() ? 1 : 0 }, children: [z(J, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (e3) => e3.spacing(2), paddingLeft: (e3) => e3.spacing(2), paddingRight: (e3) => e3.spacing(2) }, children: L(J, { className: pn, children: [z(gn, { formName: "name", defaultInput: S2, value: x2?.getName() ?? "No table", onChangeInput: k2, onValidate: (e3) => {
2149
+ }, ref: Vt([m2, g2, t2]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (e3) => e3.spacing(1.5), paddingRight: (e3) => e3.spacing(1.5), paddingTop: (e3) => e3.spacing(1.5), paddingBottom: (e3) => e3.spacing(1.5), boxSizing: "border-box" }, className: gt("sxl-table-details-panel", a2, { "sxl-has-focus": i2 }), ...r2, children: v2 || L(Q, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: f2.table() ? 1 : 0 }, children: [z(Q, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (e3) => e3.spacing(2), paddingLeft: (e3) => e3.spacing(2), paddingRight: (e3) => e3.spacing(2) }, children: L(Q, { className: mn, children: [z(un, { formName: "name", defaultInput: S2, value: x2?.getName() ?? "No table", onChangeInput: C2, onValidate: (e3) => {
2178
2150
  x2 && x2.getName().toLowerCase() === e3.toLowerCase() || f2?.getNames().validateName(e3);
2179
2151
  }, disabled: x2?.isProtected() ?? true, onFocus: (e3) => {
2180
2152
  d2 || e3.target?.select(), c2(true);
2181
- } }), z(fn, { formName: "range", value: b2, onChangeInput: C2, resolvedAddress: f2.getNames().getRanges.bind(f2.getNames()), disabled: x2?.isProtected() ?? true, onFocus: (e3) => {
2153
+ } }), z(hn, { formName: "range", value: b2, onChangeInput: k2, resolvedAddress: f2.getNames().getRanges.bind(f2.getNames()), disabled: x2?.isProtected() ?? true, onFocus: (e3) => {
2182
2154
  d2 || e3.target?.select(), c2(true);
2183
- } })] }) }), L(J, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1) }, children: [z(Te, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(J, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: L("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [z(rn, { table: x2, styles: f2.styles(), bodyStyle: f2.bodyStyle(), cellHeight: 30, isLive: true }), z(Aa, { command: n2.getCommand("formatTableStyle"), commands: n2, disabledQuickKey: true })] }) }), z(Te, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(mn, { disabled: x2?.isProtected(), styleOptions: x2?.getStyleOptions() ?? null, onStyleOptionsChange: (e3) => {
2155
+ } })] }) }), L(Q, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1) }, children: [z(ve, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(Q, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: L("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [z(an, { table: x2, styles: f2.styles(), bodyStyle: f2.bodyStyle(), cellHeight: 30, isLive: true }), z(Ia, { command: n2.getCommand("formatTableStyle"), commands: n2, disabledQuickKey: true })] }) }), z(ve, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(cn, { disabled: x2?.isProtected(), styleOptions: x2?.getStyleOptions() ?? null, onStyleOptionsChange: (e3) => {
2184
2156
  x2.updateStyleOptions(e3);
2185
2157
  }, showHeaderRow: x2?.getShowHeaders(), onShowHeaderRowChange: (e3) => {
2186
2158
  try {
@@ -2200,52 +2172,52 @@ const Na = $(O((e2, t2) => {
2200
2172
  } catch (e4) {
2201
2173
  l2.showError(e4);
2202
2174
  }
2203
- } }), z(Te, { orientation: "horizontal" }), L(J, { className: un, children: [z(ve, { variant: ut.Menuitem, command: n2.getCommand("convertTableToRange"), commandState: x2 }), z(ve, { variant: ut.Menuitem, commandState: x2, command: n2.getCommand("deleteTable") })] })] })] }) });
2175
+ } }), z(ve, { orientation: "horizontal" }), L(Q, { className: pn, children: [z(ke, { variant: ft.Menuitem, command: n2.getCommand("convertTableToRange"), commandState: x2 }), z(ke, { variant: ft.Menuitem, commandState: x2, command: n2.getCommand("deleteTable") })] })] })] }) });
2204
2176
  })), Ba = (e2, t2) => {
2205
2177
  const { model: o2, commands: n2, entryKey: a2, frame: r2, ...l2 } = e2;
2206
2178
  return z(Na, { ref: t2, commands: n2, ...l2 });
2207
2179
  }, Ea = () => {
2208
- Rt.register("plugin-table", { icons: {} }), v.registerTaskPane({ key: "tableDetails", getTitle: () => "Table Details", getIcon: () => "Table", renderTaskPane: Ba }, true);
2209
- }, Ia = $((e2) => {
2180
+ Mt.register("plugin-table", { icons: {} }), v.registerTaskPane({ key: "tableDetails", getTitle: () => "Table Details", getIcon: () => "Table", renderTaskPane: Ba }, true);
2181
+ }, Pa = $((e2) => {
2210
2182
  const { table: t2, tableStyle: o2, selectedTableStyleName: n2, onSelectTableStyleName: a2, styles: r2, hasContextMenu: l2 = true, bodyStyle: i2, parentFloat: s2, commands: d2, disabled: c2, commandHook: m2, useCanvasPreview: p2 = true, canvas: u2, ...g2 } = e2, h2 = K((e3) => {
2211
- const t3 = { variant: ut.Menuitem, commandHook: m2, context: "table" }, n3 = L(H, { children: [z(ve, { ...t3, command: d2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: c2 }), z(ve, { ...t3, style: { fontWeight: 550 }, command: d2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: c2 }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: d2.getCommand("setDefaultTableStyle"), commandState: o2.getName(), disabled: c2 }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: d2.getCommand("deleteTableStyle"), commandState: o2?.getName(), disabled: c2 || !o2 || o2.isBuiltIn() })] });
2212
- return Re({ ...e3, children: z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
2183
+ const t3 = { variant: ft.Menuitem, commandHook: m2, context: "table" }, n3 = L(H, { children: [z(ke, { ...t3, command: d2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: c2 }), z(ke, { ...t3, style: { fontWeight: 550 }, command: d2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: c2 }), z(ve, { orientation: "horizontal" }), z(ke, { ...t3, command: d2.getCommand("setDefaultTableStyle"), commandState: o2.getName(), disabled: c2 }), z(ve, { orientation: "horizontal" }), z(ke, { ...t3, command: d2.getCommand("deleteTableStyle"), commandState: o2?.getName(), disabled: c2 || !o2 || o2.isBuiltIn() })] });
2184
+ return Te({ ...e3, children: z(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
2213
2185
  }, [d2]), f2 = o2?.getName() === n2, x2 = V(() => {
2214
2186
  const e3 = { table: t2, tableStyle: o2, styles: r2, bodyStyle: i2 };
2215
- return p2 ? z(sn, { canvas: u2, ...e3 }) : z(rn, { ...e3 });
2187
+ return p2 ? z(ln, { canvas: u2, ...e3 }) : z(an, { ...e3 });
2216
2188
  }, [t2, o2, r2, i2]);
2217
- let b2 = z(ze, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${f2 ? e3.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o2.getName() ?? "None", placement: "bottom-start" }, disabled: c2, icon: null, onClick: () => {
2189
+ let b2 = z(He, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${f2 ? e3.palette.primary.dark : "transparent"} 1px` }, propsTooltip: { label: o2.getName() ?? "None", placement: "bottom-start" }, disabled: c2, icon: null, onClick: () => {
2218
2190
  a2?.(o2?.getName());
2219
2191
  }, ...g2, children: x2 }, o2.getName());
2220
- return l2 && (b2 = z(Ge, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: b2 })), b2;
2221
- }), Aa = $(O((e2, t2) => {
2192
+ return l2 && (b2 = z(Ke, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: b2 })), b2;
2193
+ }), Ia = $(O((e2, t2) => {
2222
2194
  const { commands: o2, command: n2, commandHook: a2, selectedTable: r2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, disabledQuickKey: d2 = false, usePreviewIcon: c2 = false, ...p2 } = e2;
2223
- bt(n2);
2195
+ St(n2);
2224
2196
  const u2 = n2?.context(), g2 = u2?.styles, h2 = r2 ?? u2?.table?.();
2225
2197
  let f2 = "insertTable";
2226
2198
  h2 && (f2 = "editTable");
2227
2199
  const x2 = V(() => ((e3, t3) => {
2228
2200
  const o3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
2229
2201
  return new m({ initialAnchor: o3, styles: t3, json: { name: "PreviewTable", ref: o3, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: e3 } });
2230
- })(h2?.getStyleOptions(), g2?.()), [g2?.().getDefaultTableStyle(), h2?.getStyleOptions()]), b2 = h2 ?? x2, [y2, w2] = _(b2);
2231
- U(() => {
2202
+ })(h2?.getStyleOptions(), g2?.()), [g2?.().getDefaultTableStyle(), h2?.getStyleOptions()]), b2 = h2 ?? x2, [y2, w2] = j(b2);
2203
+ _(() => {
2232
2204
  w2(b2);
2233
2205
  }, [b2]);
2234
- const S2 = s2 ?? u2?.bodyStyle(), k2 = gt((e3) => {
2206
+ const S2 = s2 ?? u2?.bodyStyle(), C2 = xt((e3) => {
2235
2207
  l2?.(e3), n2?.execute({ name: e3 }, a2);
2236
- }, [n2, l2, a2]), C2 = q(null), v2 = K((e3, t3) => {
2237
- const o3 = { onSelectTableStyleName: k2, styles: g2(), parentFloat: e3.floatReference };
2238
- C2.current || (C2.current = document.createElement("canvas"));
2208
+ }, [n2, l2, a2]), k2 = q(null), v2 = K((e3, t3) => {
2209
+ const o3 = { onSelectTableStyleName: C2, styles: g2(), parentFloat: e3.floatReference };
2210
+ k2.current || (k2.current = document.createElement("canvas"));
2239
2211
  const n3 = (e4) => {
2240
2212
  const n4 = g2().getTableStyle(e4);
2241
- return n4 ? z(Ia, { table: y2, tableStyle: n4, selectedTableStyleName: y2.getStyleOptions().name, bodyStyle: u2.bodyStyle(), commands: t3, commandHook: a2, canvas: C2.current, ...o3 }, e4) : null;
2213
+ return n4 ? z(Pa, { table: y2, tableStyle: n4, selectedTableStyleName: y2.getStyleOptions().name, bodyStyle: u2.bodyStyle(), commands: t3, commandHook: a2, canvas: k2.current, ...o3 }, e4) : null;
2242
2214
  }, r3 = (e4, t4, o4 = true) => {
2243
2215
  const a3 = [];
2244
2216
  for (let e5 = 0; e5 < t4.length; e5++) {
2245
2217
  const o5 = n3(t4[e5]);
2246
2218
  o5 && a3.push(o5);
2247
2219
  }
2248
- return 0 === a3.length ? null : L(J, { children: [o4 ? z(Te, { orientation: "horizontal" }) : null, z(Ke, { children: e4 }, e4 + "-header"), z(J, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: a3 }, e4 + "-presets")] }, e4);
2220
+ return 0 === a3.length ? null : L(Q, { children: [o4 ? z(ve, { orientation: "horizontal" }) : null, z(Ve, { children: e4 }, e4 + "-header"), z(Q, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: a3 }, e4 + "-presets")] }, e4);
2249
2221
  }, l3 = [], s3 = g2().getCustomTableStyles(), d3 = [];
2250
2222
  if (s3.length > 0) {
2251
2223
  for (let e4 = 0; e4 < s3.length; e4++) s3[e4].isShownInTableStyles() && d3.push(s3[e4].getName());
@@ -2262,81 +2234,81 @@ const Na = $(O((e2, t2) => {
2262
2234
  for (let e4 = 0; e4 < 11; e4++) p3.push("TableStyleDark" + (e4 + 1));
2263
2235
  l3.push(r3("Dark", p3));
2264
2236
  let f3 = null;
2265
- return h2 && (f3 = L(H, { children: [z(Te, { orientation: "horizontal" }), z(ve, { variant: ut.Menuitem, command: t3.getCommand("formatTableStyleClearTableStyle"), commandHook: a2, disabled: i2 })] })), L(J, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [z(J, { onContextMenu: () => {
2237
+ return h2 && (f3 = L(H, { children: [z(ve, { orientation: "horizontal" }), z(ke, { variant: ft.Menuitem, command: t3.getCommand("formatTableStyleClearTableStyle"), commandHook: a2, disabled: i2 })] })), L(Q, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [z(Q, { onContextMenu: () => {
2266
2238
  }, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: l3 }), f3] });
2267
2239
  }, [g2, g2?.().getTheme(), S2, y2]), T2 = i2 || !n2 || n2.disabled(), R2 = V(() => {
2268
2240
  if (!u2 || !c2) return n2?.icon();
2269
2241
  }, [y2, S2, T2, n2]);
2270
- return z(Pe, { ref: t2, quickCommand: d2 ? void 0 : f2, createPopupPanel: v2, commands: o2, label: n2?.label(), commandState: h2, commandHook: a2, selected: null !== h2, createTooltip: ({ children: e3 }, t3) => z(He, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), disabled: T2, icon: R2, ...p2 });
2271
- })), La = $(O((e2, t2) => {
2242
+ return z(Re, { ref: t2, quickCommand: d2 ? void 0 : f2, createPopupPanel: v2, commands: o2, label: n2?.label(), commandState: h2, commandHook: a2, selected: null !== h2, createTooltip: ({ children: e3 }, t3) => z(Le, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), disabled: T2, icon: R2, ...p2 });
2243
+ })), Aa = $(O((e2, t2) => {
2272
2244
  const { command: o2, commandHook: n2, selectedTheme: a2, onSelectTheme: r2, disabled: l2 = false, darkMode: i2, label: s2, icon: d2, variant: c2, ...m2 } = e2;
2273
- bt(o2);
2274
- const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = gt((e3) => {
2245
+ St(o2);
2246
+ const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = xt((e3) => {
2275
2247
  r2?.(e3), o2?.execute(e3, n2);
2276
2248
  }, [r2, n2]), x2 = K((e3, t3) => {
2277
2249
  const { children: n3, title: a3, ...r3 } = e3;
2278
2250
  let l3 = e3.children;
2279
- return (h2 || t3) && (l3 = z("div", { children: l3 })), z(We, { command: o2, placement: c2 === ut.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...r3, children: l3 });
2251
+ return (h2 || t3) && (l3 = z("div", { children: l3 })), z(ze, { command: o2, placement: c2 === ft.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...r3, children: l3 });
2280
2252
  }, [o2, h2]);
2281
- return z(wn, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === ut.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: x2, disabled: h2, darkMode: g2, ...m2 });
2282
- })), Ha = $(O((e2, t2) => {
2283
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["themeMode"])[0], s2 = gt((e3, t3) => {
2284
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "appearance", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: i2 }), z(ve, { ...o3, command: t3.getCommand("defaultThemeMode") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("enableDarkGrid") }), z(ve, { ...o3, command: t3.getCommand("enableDarkImages") })] });
2285
- return Re({ ...e3, children: a3 });
2286
- }, [r2, i2, n2, a2]), d2 = i2?.state(), c2 = be("(prefers-color-scheme: dark)"), m2 = "dark" === d2 || null === d2 && c2, p2 = null !== i2?.state();
2287
- return z(Pe, { ref: t2, quickCommand: "themeMode", commands: o2, commandHook: n2, createPopupPanel: s2, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
2253
+ return z(yn, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === ft.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: x2, disabled: h2, darkMode: g2, ...m2 });
2254
+ })), La = $(O((e2, t2) => {
2255
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ht(o2, ["themeMode"])[0], s2 = xt((e3, t3) => {
2256
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: "appearance", disabled: r2 }, a3 = L(H, { children: [z(ke, { ...o3, command: i2 }), z(ke, { ...o3, command: t3.getCommand("defaultThemeMode") }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("enableDarkGrid") }), z(ke, { ...o3, command: t3.getCommand("enableDarkImages") })] });
2257
+ return Te({ ...e3, children: a3 });
2258
+ }, [r2, i2, n2, a2]), d2 = i2?.state(), c2 = xe("(prefers-color-scheme: dark)"), m2 = "dark" === d2 || null === d2 && c2, p2 = null !== i2?.state();
2259
+ return z(Re, { ref: t2, quickCommand: "themeMode", commands: o2, commandHook: n2, createPopupPanel: s2, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
2288
2260
  i2?.execute(m2 ? "light" : "dark", n2);
2289
2261
  }, selected: p2, ...l2 });
2290
- })), za = $(O((e2, t2) => {
2262
+ })), Ha = $(O((e2, t2) => {
2291
2263
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, sx: l2, ...i2 } = e2, s2 = K((e3, t3) => {
2292
- const o3 = { variant: ut.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
2264
+ const o3 = { variant: ft.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
2293
2265
  const a4 = n2?.beforeExecute?.(t4, o4);
2294
2266
  return false !== a4 && e3.floatReference.closeAll();
2295
- } }, disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("showKeyboardShortcuts") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("gotoUrlGithub") }), z(ve, { ...o3, command: t3.getCommand("gotoUrlDiscord") }), z(ve, { ...o3, command: t3.getCommand("gotoUrlDocumentation") }), z(ve, { ...o3, command: t3.getCommand("gotoUrlIssue") })] });
2296
- return Re({ ...e3, children: a3 });
2267
+ } }, disabled: r2 }, a3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("showKeyboardShortcuts") }), z(ve, { orientation: "horizontal" }), z(ke, { ...o3, command: t3.getCommand("gotoUrlGithub") }), z(ke, { ...o3, command: t3.getCommand("gotoUrlDiscord") }), z(ke, { ...o3, command: t3.getCommand("gotoUrlDocumentation") }), z(ke, { ...o3, command: t3.getCommand("gotoUrlIssue") })] });
2268
+ return Te({ ...e3, children: a3 });
2297
2269
  }, [r2, n2]);
2298
- return z(Pe, { ref: t2, sx: l2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: s2, icon: z(xt, { iconKey: "Help", style: { transform: "scale(0.75)" } }), ...i2 });
2299
- })), Wa = $(O((e2, t2) => {
2300
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = ut.Toolbar, ...d2 } = e2, c2 = pt(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = V(() => {
2270
+ return z(Re, { ref: t2, sx: l2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: s2, icon: z(wt, { iconKey: "Help", style: { transform: "scale(0.75)" } }), ...i2 });
2271
+ })), za = $(O((e2, t2) => {
2272
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = ft.Toolbar, ...d2 } = e2, c2 = ht(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = V(() => {
2301
2273
  let e3 = null, t3 = 0;
2302
- for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === ut.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
2274
+ for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === ft.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
2303
2275
  return { singleMenuCommand: e3, allDisabled: 0 === t3 };
2304
2276
  }, [c2]), u2 = K((e3, t3) => {
2305
- const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "insertImage", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("insertImageFromFile") }), z(ve, { ...o3, command: t3.getCommand("insertImageFromURL") })] });
2306
- return Re({ ...e3, children: a3 });
2277
+ const o3 = { variant: ft.Menuitem, commandHook: n2, scope: "insertImage", disabled: r2 }, a3 = L(H, { children: [z(ke, { ...o3, command: t3.getCommand("insertImageFromFile") }), z(ke, { ...o3, command: t3.getCommand("insertImageFromURL") })] });
2278
+ return Te({ ...e3, children: a3 });
2307
2279
  }, [r2, n2, a2]);
2308
- return m2 ? z(ve, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, ...d2 }) : z(Pe, { ref: t2, variant: s2, quickCommand: "insertImageFromFile", commands: o2, commandHook: n2, scope: a2, disabled: r2 || p2, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: u2, icon: "InsertImage", ...d2 });
2309
- })), $a = $(O((e2, t2) => {
2280
+ return m2 ? z(ke, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, ...d2 }) : z(Re, { ref: t2, variant: s2, quickCommand: "insertImageFromFile", commands: o2, commandHook: n2, scope: a2, disabled: r2 || p2, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: u2, icon: "InsertImage", ...d2 });
2281
+ })), Wa = $(O((e2, t2) => {
2310
2282
  const { ...o2 } = e2;
2311
- return z($e, { ref: t2, ...o2, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions." });
2283
+ return z(We, { ref: t2, ...o2, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions." });
2312
2284
  }));
2313
- $a.displayName = "InsertFunctionSumCommandPopupButton";
2314
- const Oa = 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((e2) => [e2.key, e2])), Va = $((e2) => {
2285
+ Wa.displayName = "InsertFunctionSumCommandPopupButton";
2286
+ const $a = 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((e2) => [e2.key, e2])), Oa = $((e2) => {
2315
2287
  const { command: t2, formulaFunction: o2, commandHook: n2, disabled: a2 = false, parentFloat: r2, handleInsert: l2, icon: i2, label: s2, sx: d2, ...c2 } = e2, m2 = new Promise((e3) => {
2316
2288
  o2.getDescriptor().then((t3) => {
2317
2289
  e3(t3.getSummary());
2318
2290
  });
2319
2291
  });
2320
- return z(Ie, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...d2 }, disabled: a2, tooltipProps: { label: m2, maxWidth: 1e3 }, onMouseDown: (e3) => {
2292
+ return z(Pe, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...d2 }, disabled: a2, propsTooltip: { label: m2, maxWidth: 1e3 }, onMouseDown: (e3) => {
2321
2293
  0 === e3.button && e3.preventDefault();
2322
2294
  }, onMouseUp: (e3) => {
2323
2295
  0 === e3.button && l2(o2);
2324
2296
  }, onKeyDown: (e3) => {
2325
- e3.keyCode === ft.Enter || (e3.keyCode, ft.Space);
2326
- }, ...c2, children: z(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: z(ee, { component: "div", children: o2.getName() }) }) });
2327
- }), Ka = $(O((e2, t2) => {
2328
- const { category: o2, commands: n2, commandHook: a2, scope: r2, sx: l2, disabled: i2 = false, parentFloat: s2, ...d2 } = e2, c2 = pt(n2, ["insertFunction"])[0], m2 = K((e3, t3) => {
2329
- const n3 = Oa.get(o2);
2297
+ e3.keyCode === yt.Enter || (e3.keyCode, yt.Space);
2298
+ }, ...c2, children: z(Q, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: z(J, { component: "div", children: o2.getName() }) }) });
2299
+ }), Va = $(O((e2, t2) => {
2300
+ const { category: o2, commands: n2, commandHook: a2, scope: r2, sx: l2, disabled: i2 = false, parentFloat: s2, ...d2 } = e2, c2 = ht(n2, ["insertFunction"])[0], m2 = K((e3, t3) => {
2301
+ const n3 = $a.get(o2);
2330
2302
  if (!n3) return console.warn("invalidate category", o2), null;
2331
- const r3 = { commandHook: a2, ...e3 }, l3 = z(Ga, { category: n3.label, ...r3, commands: t3 });
2332
- return Re({ ...e3, children: l3 });
2333
- }, [o2, c2, a2, r2]), p2 = Oa.get(o2);
2334
- return z(Pe, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: Oa.get(o2)?.icon ?? "FormulaGroup", ...d2 });
2303
+ const r3 = { commandHook: a2, ...e3 }, l3 = z(Ka, { category: n3.label, ...r3, commands: t3 });
2304
+ return Te({ ...e3, children: l3 });
2305
+ }, [o2, c2, a2, r2]), p2 = $a.get(o2);
2306
+ return z(Re, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: $a.get(o2)?.icon ?? "FormulaGroup", ...d2 });
2335
2307
  }));
2336
- Ka.displayName = "InsertFunctionCommandPopupButton";
2337
- const Ga = $(O((e2, t2) => {
2338
- const { commands: o2, category: n2, commandHook: a2, ...r2 } = e2, l2 = pt(o2, ["insertFunction"]), [i2, s2] = _([]), [d2, c2] = _(false);
2339
- U(() => {
2308
+ Va.displayName = "InsertFunctionCommandPopupButton";
2309
+ const Ka = $(O((e2, t2) => {
2310
+ const { commands: o2, category: n2, commandHook: a2, ...r2 } = e2, l2 = ht(o2, ["insertFunction"]), [i2, s2] = j([]), [d2, c2] = j(false);
2311
+ _(() => {
2340
2312
  (async () => {
2341
2313
  c2(true);
2342
2314
  const e3 = l2[0]?.context(), t3 = await e3.searchByCategory(n2);
@@ -2348,20 +2320,17 @@ const Ga = $(O((e2, t2) => {
2348
2320
  };
2349
2321
  for (let e3 = 0; e3 < m2; e3++) {
2350
2322
  const t3 = i2[e3];
2351
- p2[e3] = z(Va, { command: u2, formulaFunction: t3, handleInsert: g2 }, `formula-${t3.getName()}-${e3}`);
2323
+ p2[e3] = z(Oa, { command: u2, formulaFunction: t3, handleInsert: g2 }, `formula-${t3.getName()}-${e3}`);
2352
2324
  }
2353
- return Re({ ...r2, children: z(J, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: m2 > 0 ? z(H, { children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: p2 }) }) : null }) });
2354
- })), _a = $(O((e2, t2) => {
2355
- const { sx: o2, style: n2, className: a2, licenseKey: r2, renderLoadingPanel: l2, ...i2 } = e2;
2325
+ return Te({ ...r2, children: z(Q, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: m2 > 0 ? z(H, { children: z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: p2 }) }) : null }) });
2326
+ })), Ga = $(O((e2, t2) => {
2327
+ const { sx: o2, style: n2, className: a2, licenseKey: r2, renderLoading: l2 = xa, propsLoading: i2, ...s2 } = e2;
2356
2328
  r2 && h.setLicenseKey(r2);
2357
- const s2 = V(() => {
2358
- const e3 = { transitionDelay: "160ms", transparentBackground: true };
2359
- return z(J, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? z(Me, { ...e3 }) });
2360
- }, [o2, n2, l2]), d2 = V(() => W.lazy(async () => await Promise.resolve().then(() => ir)), []);
2361
- return z(H, { children: z(j, { fallback: s2, children: z(d2, { ...i2, className: a2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
2329
+ const d2 = V(() => l2 ? z(pe, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2({ ...i2 }) }) : null, [o2, n2, l2, i2]), c2 = V(() => W.lazy(async () => await Promise.resolve().then(() => ir)), []);
2330
+ return z(H, { children: z(U, { fallback: d2, children: z(c2, { ...s2, className: a2, renderLoading: l2, propsLoading: { ...i2, transitionDelay: "0ms" }, sx: o2, style: n2, ref: t2 }) }) });
2362
2331
  }));
2363
- _a.displayName = "Studio";
2364
- class Ua {
2332
+ Ga.displayName = "Studio";
2333
+ class ja {
2365
2334
  constructor() {
2366
2335
  this._loadedIO = null;
2367
2336
  }
@@ -2389,7 +2358,7 @@ class Ua {
2389
2358
  try {
2390
2359
  n2 = await t2?.showBusy?.(`Opening${e2.name ? ` ${e2.name}` : ""}...`);
2391
2360
  const a2 = await this._loadIO(), r2 = await a2.read({ ...e2, progress: { async onStart(n3) {
2392
- await e2?.progress?.onStart?.(n3), o2 = await t2?.showBusy?.(`Opening '${n3}'...`);
2361
+ await e2?.progress?.onStart?.(n3), o2 = await t2?.showBusy?.(`Opening '${n3.name}'...`);
2393
2362
  } } });
2394
2363
  return n2?.(), o2?.(), r2;
2395
2364
  } catch (e3) {
@@ -2414,177 +2383,224 @@ class Ua {
2414
2383
  return o2.join(", ");
2415
2384
  }
2416
2385
  }
2417
- const ja = new Ua(), qa = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, Xa = $(O((e2, t2) => {
2418
- const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = oo(), d2 = zt(), [c2, m2] = _(false), p2 = Xt.collectErrorChain(r2, true)?.[0]?.error, u2 = p2 && !(p2 instanceof Zt), g2 = K(() => {
2386
+ const _a = new ja(), Ua = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, qa = $(O((e2, t2) => {
2387
+ const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = to(), d2 = ct(), [c2, m2] = j(false), p2 = qt.collectErrorChain(r2, true)?.[0]?.error, u2 = p2 && !(p2 instanceof Xt), g2 = K(() => {
2419
2388
  m2((e3) => !e3);
2420
2389
  }, []), h2 = K(() => {
2421
2390
  s2(o2);
2422
2391
  }, [o2, s2]);
2423
2392
  let f2 = p2?.message;
2424
- return !f2 && G(n2) && (f2 = n2), f2 || "string" != typeof n2 || (f2 = n2), f2 || (f2 = `Unknown Error: ${n2}`), z(no, { ref: t2, className: mt(qa.root, "error-snackbar"), children: L(ye, { className: qa.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [L(we, { className: qa.actionRoot, children: [l2 ? null : a2?.error, z(ee, { variant: "body2", component: "div", className: qa.typography, children: f2 }), z("div", { style: { flex: "1 1 auto" } }), L("div", { className: qa.icons, children: [u2 ? z(te, { "aria-label": "Show more", size: "small", className: mt(qa.expand, { [qa.expandOpen]: c2 }), onClick: g2, children: z(xt, { iconKey: "ExpandMore" }) }) : null, z(te, { size: "small", className: qa.expand, onClick: h2, children: z(xt, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), u2 ? z(Se, { in: c2, timeout: "auto", children: z("div", { className: qa.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: z(et, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
2393
+ return !f2 && G(n2) && (f2 = n2), f2 || "string" != typeof n2 || (f2 = n2), f2 || (f2 = `Unknown Error: ${n2}`), z(oo, { ref: t2, className: gt(Ua.root, "error-snackbar"), children: L(be, { className: Ua.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [L(ye, { className: Ua.actionRoot, children: [l2 ? null : a2?.error, z(J, { variant: "body2", component: "div", className: Ua.typography, children: f2 }), z("div", { style: { flex: "1 1 auto" } }), L("div", { className: Ua.icons, children: [u2 ? z(ee, { "aria-label": "Show more", size: "small", className: gt(Ua.expand, { [Ua.expandOpen]: c2 }), onClick: g2, children: z(wt, { iconKey: "ExpandMore" }) }) : null, z(ee, { size: "small", className: Ua.expand, onClick: h2, children: z(wt, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), u2 ? z(we, { in: c2, timeout: "auto", children: z("div", { className: Ua.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: z(et, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
2425
2394
  }));
2426
- Xa.displayName = "ToastError";
2427
- const Za = $(O((e2, t2) => {
2428
- const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, [i2, s2] = _([]);
2429
- U(() => {
2395
+ qa.displayName = "ToastError";
2396
+ const Xa = $(O((e2, t2) => {
2397
+ const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, [i2, s2] = j([]);
2398
+ _(() => {
2430
2399
  let e3 = true;
2431
- return ja.getWriteFormats().then((t3) => {
2400
+ return _a.getWriteFormats().then((t3) => {
2432
2401
  e3 && s2(t3);
2433
2402
  }), () => {
2434
2403
  e3 = false;
2435
2404
  };
2436
2405
  }, []);
2437
- const d2 = gt((e3) => {
2438
- const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...t3, command: o2.getCommand("newWorkbook") }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: o2.getCommand("openWorkbook") }), z(Pe, { ...t3, commands: o2, quickCommand: "saveWorkbook", createPopupPanel: (e4) => {
2406
+ const d2 = xt((e3) => {
2407
+ const t3 = { variant: ft.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ke, { ...t3, command: o2.getCommand("newWorkbook") }), z(ve, { orientation: "horizontal" }), z(ke, { ...t3, command: o2.getCommand("openWorkbook") }), z(Re, { ...t3, commands: o2, quickCommand: "saveWorkbook", createPopupPanel: (e4) => {
2439
2408
  const n3 = { ...t3, parentFloat: e4.floatReference, scope: "saveWorkbook" }, a3 = [];
2440
2409
  return i2.forEach((e5) => {
2441
2410
  if (e5.isDefault) return;
2442
2411
  const t4 = e5.key, r3 = o2.getCommand(`saveWorkbookAs${t4}`);
2443
- r3 ? a3.push(X(ve, { ...n3, key: t4, command: r3 })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${t4}'`);
2444
- }), Re({ ...e4, children: a3, onClick: () => {
2412
+ r3 ? a3.push(X(ke, { ...n3, key: t4, command: r3 })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${t4}'`);
2413
+ }), Te({ ...e4, children: a3, onClick: () => {
2445
2414
  e4.closeFloatAll();
2446
2415
  } });
2447
2416
  } })] });
2448
- return Re({ ...e3, children: l3, onClick: (t4) => {
2417
+ return Te({ ...e3, children: l3, onClick: (t4) => {
2449
2418
  t4.isDefaultPrevented || e3.closeFloatAll();
2450
2419
  } });
2451
2420
  }, [r2, o2, n2, a2, i2]), c2 = "File";
2452
- return z(Pe, { commands: o2, disabled: r2, commandHook: n2, scope: a2, label: c2, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (e3) => `calc(1.25rem + ${e3.spacing(2)}px)` } }, ...l2, createPopupPanel: d2, icon: z(Ve, { className: "label", icon: null, label: c2 }) });
2421
+ return z(Re, { commands: o2, disabled: r2, commandHook: n2, scope: a2, label: c2, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (e3) => `calc(1.25rem + ${e3.spacing(2)}px)` } }, ...l2, createPopupPanel: d2, icon: z(Oe, { className: "label", icon: null, label: c2 }) });
2453
2422
  }));
2454
- Za.displayName = "StandaloneFileCommandButton";
2455
- const Ya = z(He, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: z(J, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: z(E, { onClick: () => {
2423
+ Xa.displayName = "StandaloneFileCommandButton";
2424
+ const Za = z(Le, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: z(Q, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: z(P, { onClick: () => {
2456
2425
  window?.open("https://www.sheetxl.com", "_blank");
2457
- }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Qa = $(O((e2, t2) => {
2458
- const { commands: o2, workbook: n2, logo: a2 = Ya, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = je(), [c2, { width: m2 }] = Ut(), p2 = m2 < 530, u2 = l2 ? z(Za, { commands: o2, commandHook: { beforeExecute() {
2426
+ }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Ya = $(O((e2, t2) => {
2427
+ const { commands: o2, workbook: n2, logo: a2 = Za, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = _e(), [c2, { width: m2 }] = jt(), p2 = m2 < 530, u2 = l2 ? z(Xa, { commands: o2, commandHook: { beforeExecute() {
2459
2428
  d2?.closeAll();
2460
2429
  }, onError(e3, t3, o3) {
2461
- } } }) : null, g2 = i2 ? z(Ha, { commands: o2, commandHook: { beforeExecute() {
2430
+ } } }) : null, g2 = i2 ? z(La, { commands: o2, commandHook: { beforeExecute() {
2462
2431
  d2?.closeAll();
2463
2432
  }, onError(e3, t3, o3) {
2464
2433
  } } }) : null, h2 = V(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = q(null);
2465
- return z(J, { ref: _t([f2, c2, t2]), ...s2, children: oa({ commands: o2, renderCompact: p2, workbook: n2, selectWrapper: (e3) => L(J, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (e4) => e4.spacing(1), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1) }, children: [L(J, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e4) => e4.spacing(0.5) }, children: [a2, L(J, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e4) => e4.spacing(0.25) }, children: [u2, e3] })] }), z(J, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: r2 }), z(J, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p2 && !g2 ? "0 0 auto" : "1 1 100%" }, children: g2 })] }), selectProps: h2, toolbarsProps: { Home: { sx: {} } } }) });
2434
+ return z(Q, { ref: Vt([f2, c2, t2]), ...s2, children: oa({ commands: o2, isCompact: p2, workbook: n2, wrapperSelect: (e3) => L(Q, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (e4) => e4.spacing(1), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1) }, children: [L(Q, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e4) => e4.spacing(0.5) }, children: [a2, L(Q, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e4) => e4.spacing(0.25) }, children: [u2, e3] })] }), z(Q, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: r2 }), z(Q, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p2 && !g2 ? "0 0 auto" : "1 1 100%" }, children: g2 })] }), propsSelect: h2, propsToolbars: { Home: { sx: {} } } }) });
2466
2435
  }));
2467
- Qa.displayName = "StudioToolbar";
2468
- const Ja = $((e2) => {
2469
- const { workbook: t2, setWorkbook: o2, refWorkbookTitle: n2, titleWorkbook: a2, setWorkbookTitle: r2, titlePlaceHolder: l2, children: i2, undoManager: s2, commands: d2, importExportDisabled: c2, themeOptions: m2 } = e2, p2 = ((e3) => {
2470
- const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, requestWorkbookTitle: l3, themeOptions: i3, undoManager: s3, commands: d3, onExecute: c3 } = e3, m3 = St(), p3 = gt(i3?.onModeChange, [i3?.onModeChange]), u3 = gt(i3?.onEnabledDarkGridChange, [i3?.onEnabledDarkGridChange]), g3 = gt(i3?.onEnabledDarkImagesChange, [i3?.onEnabledDarkImagesChange]), h2 = gt(async (e4 = null, t4 = null) => {
2471
- const o4 = [];
2472
- let n4, a4 = null, r4 = null;
2473
- if ("string" == typeof e4 ? r4 = e4 : a4 = e4, n4 = a4 ? e4 : await jt.openFileDialog(r4 ?? await ja.getAllReadFormatsAsString()), !n4) return null;
2474
- const l4 = { source: n4, createWorkbookOptions: t4, onWarning: (e5) => {
2475
- o4.push(e5);
2476
- } }, i4 = await ja.read(l4, m3);
2477
- return o4.length > 0 && (m3.showMessage("Some elements were not able to be imported. See console for details."), console.warn("Import warnings:\n" + o4.join("\n"))), i4;
2478
- }, [c3, m3, t3]), f2 = gt(async (e4, t4, o4) => {
2436
+ Ya.displayName = "StudioToolbar";
2437
+ const Qa = () => {
2438
+ window.open(window.origin.toString(), "sheetxl-" + _t.uuidV4(), "popup=true");
2439
+ }, Ja = $((e2) => {
2440
+ const { workbook: t2, setWorkbook: o2, refWorkbookTitle: n2, titleWorkbook: a2, setWorkbookTitle: r2, titlePlaceHolder: l2, undoManager: i2, commands: s2, importExportDisabled: d2, themeOptions: c2, renderWorkbook: m2 } = e2, p2 = ((e3) => {
2441
+ const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, requestWorkbookTitle: l3, themeOptions: i3, undoManager: s3, commands: d3, onExecute: c3 } = e3, m3 = vt(), p3 = xt(i3?.onModeChange, [i3?.onModeChange]), u3 = xt(i3?.onEnabledDarkGridChange, [i3?.onEnabledDarkGridChange]), g3 = xt(i3?.onEnabledDarkImagesChange, [i3?.onEnabledDarkImagesChange]), h3 = xt(async (e4 = null, t4 = null, o4 = null) => {
2442
+ const n4 = [];
2443
+ let a4, r4 = null, l4 = null;
2444
+ if ("string" == typeof e4 ? l4 = e4 : r4 = e4, a4 = r4 ? e4 : await _t.openFileDialog(l4 ?? await _a.getAllReadFormatsAsString()), !a4) return null;
2445
+ const i4 = { source: a4, typedCreateWorkbookOptions: t4, progress: { onWarning: (e5) => {
2446
+ n4.push(e5);
2447
+ } } };
2448
+ o4 && (i4.progress.onStart = o4);
2449
+ const s4 = await _a.read(i4, m3);
2450
+ return n4.length > 0 && (m3.showMessage("Some elements were not able to be imported. See console for details."), console.warn("Import warnings:\n" + n4.join("\n"))), s4;
2451
+ }, [c3, m3, t3]), f3 = xt(async (e4, t4, o4) => {
2479
2452
  if (!t4 && l3) {
2480
2453
  const t5 = await l3("Enter Workbook name to " + (o4?.isDefault ? "Save." : `Export as ${o4?.description}.`));
2481
- return null !== t5 && ja.writeFile(t5, e4, { format: o4.key });
2454
+ return null !== t5 && _a.writeFile(t5, e4, { format: o4.key });
2482
2455
  }
2483
- return ja.writeFile(t4, e4, { format: o4.key });
2484
- }, [m3, t3, l3]), x2 = K(() => ({ contains: (e4) => true, focus() {
2485
- } }), []), [b2, y2] = W.useState([]);
2486
- U(() => {
2487
- n3 ? y2([]) : (async () => {
2456
+ return _a.writeFile(t4, e4, { format: o4.key });
2457
+ }, [m3, t3, l3]), x3 = K(() => ({ contains: (e4) => true, focus() {
2458
+ } }), []), [b3, y3] = W.useState([]);
2459
+ _(() => {
2460
+ n3 ? y3([]) : (async () => {
2488
2461
  const e4 = [];
2489
- (await ja.getWriteFormats()).forEach((o4) => {
2462
+ (await _a.getWriteFormats()).forEach((o4) => {
2490
2463
  const n4 = o4.isDefault, r4 = { label: n4 ? "Save Workbook" : `Save Workbook as ${o4.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${o4.description}` }, tags: o4.tags, description: `Save the workbook to the desktop${n4 ? "" : ` as ${o4.description}`}.`, icon: "FileDownloadAsSheet" };
2491
- n4 && (r4.shortcut = { key: "S", modifiers: [Ft.Ctrl] }, e4.push(new Dt("saveWorkbookAs", x2, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Ft.Shift, Ft.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
2492
- f2(t3, null, o4).catch((e5) => {
2464
+ n4 && (r4.shortcut = { key: "S", modifiers: [Et.Ctrl] }, e4.push(new Bt("saveWorkbookAs", x3, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Et.Shift, Et.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
2465
+ f3(t3, null, o4).catch((e5) => {
2493
2466
  m3.showError(e5);
2494
2467
  });
2495
2468
  })));
2496
2469
  const l4 = o4.key, i4 = n4 ? "saveWorkbook" : `saveWorkbookAs${l4}`;
2497
- "CSV" === l4 ? r4.icon = "FileDownloadAsCSV" : "Excel" === l4 && (r4.icon = "FileDownloadAsExcel"), e4.push(new Dt(i4, x2, r4, (e5) => {
2498
- f2(t3, e5 ?? a3, o4).catch((e6) => {
2470
+ "CSV" === l4 ? r4.icon = "FileDownloadAsCSV" : "Excel" === l4 && (r4.icon = "FileDownloadAsExcel"), e4.push(new Bt(i4, x3, r4, (e5) => {
2471
+ f3(t3, e5 ?? a3, o4).catch((e6) => {
2499
2472
  m3.showError(e6);
2500
2473
  });
2501
2474
  }));
2502
- }), e4.push(new Dt("openWorkbook", x2, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", icon: "FileOpen", shortcut: { key: "O", modifiers: [Ft.Ctrl] } }, async (e5 = null) => {
2503
- const n4 = { date1904: t3.isDate1904(), ...t3.options };
2475
+ }), e4.push(new Bt("openWorkbook", x3, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", icon: "FileOpen", shortcut: { key: "O", modifiers: [Et.Ctrl] } }, async (e5 = null) => {
2476
+ const n4 = { csv: { date1904: t3.isDate1904(), ...t3.options } };
2504
2477
  try {
2505
- const a4 = await h2(e5, n4);
2506
- if (!a4) return;
2507
- const l4 = a4.title, i4 = a4.workbook, s4 = i4.getSelectedSheet();
2508
- if ("text/csv" === a4.format.mimeType) {
2509
- const e6 = t3.findValidSheetName(l4);
2478
+ let a4, l4 = null;
2479
+ const i4 = async (e6) => {
2480
+ l4 = e6.format, a4 = e6.name;
2481
+ }, s4 = await h3(e5, n4, i4);
2482
+ if (!s4) return;
2483
+ const d4 = s4.getSelectedSheet();
2484
+ if ("text/csv" === l4.mimeType) {
2485
+ const e6 = t3.findValidSheetName(a4);
2510
2486
  await t3.doBatch(async () => {
2511
2487
  const o4 = { colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 };
2512
- let n5 = s4.getUsedRange();
2488
+ let n5 = d4.getUsedRange();
2513
2489
  if (!n5) return void m3.showMessage("The file appears to be blank.");
2514
2490
  n5 = n5.getUnion(o4);
2515
2491
  const a5 = t3.getSheets().add({ name: e6, autoSelect: true }).getRange(o4);
2516
2492
  await a5.copyFrom(n5);
2517
- }, `Import CSV '${l4}'`);
2518
- } else t3?.close(), r3?.(l4), o3(i4);
2493
+ }, `Import CSV '${e6}'`);
2494
+ } else t3?.close(), r3?.(s4.getName() ?? ""), o3(s4);
2519
2495
  } catch (e6) {
2520
2496
  m3.showError(e6);
2521
2497
  }
2522
- })), e4.push(new Dt("openWorkbookFromUrl", x2, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
2498
+ })), e4.push(new Bt("openWorkbookFromUrl", x3, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
2523
2499
  if (!e5) {
2524
- const t4 = await m3.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", inputProps: { style: { minWidth: "440px" } }, options: ["Open"] });
2500
+ const t4 = await m3.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"] });
2525
2501
  if ("Open" !== t4.option) return;
2526
2502
  e5 = t4.input;
2527
2503
  }
2528
2504
  e5 && console.log("openWorkbookFromUrl", e5);
2529
- })), y2(e4);
2505
+ })), e4.push(new Nt("closeWorkbook", x3, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [Et.Ctrl, Et.Alt] } }, async function() {
2506
+ "Close" === await m3.showOptions({ title: "Confirm", description: "This will close the current workbook tab. Do you want to continue?", options: ["Close", "Cancel"], defaultOption: "Close" }) && window.close();
2507
+ })), e4.push(new Nt("newWorkbook", x3, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" }, async function() {
2508
+ Qa();
2509
+ })), y3(e4);
2530
2510
  })();
2531
2511
  }, [n3, m3, t3, a3]);
2532
- const w2 = V(() => {
2512
+ const w3 = V(() => {
2533
2513
  let e4 = [];
2534
- return i3 && (e4 = [new Dt("themeMode", x2, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new Dt("defaultThemeMode", x2, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new Dt("enableDarkGrid", x2, { label: "Enable Dark Grid", description: "Allow the grid to render in dark mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)." }), new Dt("enableDarkImages", x2, { label: "Enable Dark Images", description: "Allow the images to render in dark mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode." })]), [...e4, new Pt("help", x2, { label: "Show Help", description: "Provide Help.", icon: "Documentation", shortcut: { key: "F1" } }, () => {
2535
- }), new Pt("showKeyboardShortcuts", x2, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", icon: "Keyboard", shortcut: { key: "/", modifiers: [Ft.Ctrl] } }, () => {
2536
- }), new Dt("gotoUrlGithub", x2, { label: "Github", description: "Download examples, explore source code, and leave a star.", icon: "Github" }, () => {
2514
+ return i3 && (e4 = [new Bt("themeMode", x3, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new Bt("defaultThemeMode", x3, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new Bt("enableDarkGrid", x3, { label: "Enable Dark Grid", description: "Allow the grid to render in dark mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)." }), new Bt("enableDarkImages", x3, { label: "Enable Dark Images", description: "Allow the images to render in dark mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode." })]), [...e4, new Nt("help", x3, { label: "Show Help", description: "Provide Help.", icon: "Documentation", shortcut: { key: "F1" } }, () => {
2515
+ }), new Nt("showKeyboardShortcuts", x3, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", icon: "Keyboard", shortcut: { key: "/", modifiers: [Et.Ctrl] } }, () => {
2516
+ }), new Bt("gotoUrlGithub", x3, { label: "Github", description: "Download examples, explore source code, and leave a star.", icon: "Github" }, () => {
2537
2517
  window?.open("https://github.com/sheetxl/sheetxl");
2538
- }), new Dt("gotoUrlDiscord", x2, { label: "Discord", description: "Join our community on discord.", icon: "Discord" }, () => {
2518
+ }), new Bt("gotoUrlDiscord", x3, { label: "Discord", description: "Join our community on discord.", icon: "Discord" }, () => {
2539
2519
  window?.open("https://discord.gg/NTKdwUgK9p");
2540
- }), new Dt("gotoUrlDocumentation", x2, { label: "Documentation", description: "Read the documentation.", icon: "Documentation" }, () => {
2520
+ }), new Bt("gotoUrlDocumentation", x3, { label: "Documentation", description: "Read the documentation.", icon: "Documentation" }, () => {
2541
2521
  window?.open("https://www.sheetxl.com/docs");
2542
- }), new Dt("gotoUrlIssue", x2, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request.", icon: "Ticket" }, () => {
2522
+ }), new Bt("gotoUrlIssue", x3, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request.", icon: "Ticket" }, () => {
2543
2523
  window?.open("https://github.com/sheetxl/sheetxl/issues");
2544
2524
  })];
2545
- }, [t3, a3, m3, n3, i3]), S2 = V(() => [...w2, ...b2], [w2, b2]), k2 = V(() => {
2525
+ }, [t3, a3, m3, n3, i3]), S3 = V(() => [...w3, ...b3], [w3, b3]), C2 = V(() => {
2546
2526
  let e4 = null;
2547
- return e4 = d3 ? d3.createChildGroup(x2, "standaloneWorkbook", false) : new Mt(x2, "standaloneWorkbook"), e4.addCommands(S2, true), e4;
2548
- }, [d3, w2, b2]);
2549
- Et({ manager: s3, commands: k2 });
2550
- const C2 = be("(prefers-color-scheme: dark)"), { themeMode: v2 } = tt();
2551
- U(() => {
2552
- if (!i3 || !k2) return;
2527
+ return e4 = d3 ? d3.createChildGroup(x3, "standaloneWorkbook", false) : new Pt(x3, "standaloneWorkbook"), e4.addCommands(S3, true), e4;
2528
+ }, [d3, w3, b3]);
2529
+ Lt({ manager: s3, commands: C2 });
2530
+ const k2 = xe("(prefers-color-scheme: dark)"), { themeMode: v2 } = tt();
2531
+ _(() => {
2532
+ if (!i3 || !C2) return;
2553
2533
  const e4 = "dark" === i3.mode || !i3.mode && "dark" === v2;
2554
- k2.getCommand("themeMode").update({ state: i3.mode ?? null, label: e4 ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: e4 ? "Dark Mode" : "Light Mode" }, icon: e4 ? "DarkMode" : "LightMode" }).updateCallback(() => {
2534
+ C2.getCommand("themeMode").update({ state: i3.mode ?? null, label: e4 ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: e4 ? "Dark Mode" : "Light Mode" }, icon: e4 ? "DarkMode" : "LightMode" }).updateCallback(() => {
2555
2535
  p3(e4 ? ot.Light : ot.Dark);
2556
- }), k2.getCommand("defaultThemeMode").update({ state: !i3.mode, icon: C2 ? "SystemDefaultDarkMode" : "SystemDefaultLightMode" }).updateCallback(() => {
2536
+ }), C2.getCommand("defaultThemeMode").update({ state: !i3.mode, icon: k2 ? "SystemDefaultDarkMode" : "SystemDefaultLightMode" }).updateCallback(() => {
2557
2537
  p3(null);
2558
- }), k2.getCommand("enableDarkGrid").update({ state: i3.enableDarkGrid }).updateCallback(() => {
2538
+ }), C2.getCommand("enableDarkGrid").update({ state: i3.enableDarkGrid }).updateCallback(() => {
2559
2539
  u3(!i3.enableDarkGrid);
2560
- }), k2.getCommand("enableDarkImages").update({ state: i3.enableDarkImages }).updateCallback(() => {
2540
+ }), C2.getCommand("enableDarkImages").update({ state: i3.enableDarkImages }).updateCallback(() => {
2561
2541
  g3(!i3.enableDarkImages);
2562
2542
  });
2563
- }, [v2, i3, S2]);
2543
+ }, [v2, i3, S3]);
2564
2544
  const { showModal: T2 } = nt();
2565
- return U(() => {
2545
+ return _(() => {
2566
2546
  const e4 = () => new Promise((e5, t4) => {
2567
- const o4 = W.lazy(() => import("./BNP3QSlZuis44plx.mjs")), n4 = T2(o4, { title: "Shortcut Keys Reference", commands: k2, onDone: () => {
2547
+ const o4 = W.lazy(() => import("./DCngEQG4um0yTeoj.mjs")), n4 = T2(o4, { title: "Shortcut Keys Reference", commands: C2, onDone: () => {
2568
2548
  n4.hide();
2569
2549
  }, slotProps: { transition: { onExited: () => {
2570
2550
  e5(true);
2571
2551
  } } } });
2572
2552
  });
2573
- k2.getCommand("showKeyboardShortcuts").updateCallback(() => e4()), k2.getCommand("help").updateCallback(() => e4());
2574
- }, [S2, k2]), k2;
2575
- })({ workbook: t2, setWorkbook: o2, importExportDisabled: c2, workbookTitle: a2, setWorkbookTitle: r2, commands: d2, requestWorkbookTitle: (e3) => new Promise((t3) => {
2553
+ C2.getCommand("showKeyboardShortcuts").updateCallback(() => e4()), C2.getCommand("help").updateCallback(() => e4());
2554
+ }, [S3, C2]), C2;
2555
+ })({ workbook: t2, setWorkbook: o2, importExportDisabled: d2, workbookTitle: a2, setWorkbookTitle: r2, commands: s2, requestWorkbookTitle: (e3) => new Promise((t3) => {
2576
2556
  n2.current ? n2.current.requestWorkbookTitle((e4, o3) => {
2577
2557
  t3(e4);
2578
2558
  }, { selectAll: true, requestReason: e3 }) : t3(l2);
2579
- }), themeOptions: m2, undoManager: s2, onExecute: K(() => {
2580
- }, []) }), u2 = V(() => z(za, { commands: p2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [p2]), g2 = { commands: p2 };
2581
- return t2 && (g2.statusBarProps = { childrenEnd: u2 }), i2 ? W.cloneElement(i2, g2) : null;
2559
+ }), themeOptions: c2, undoManager: i2, onExecute: K(() => {
2560
+ }, []) }), u2 = V(() => z(Ha, { commands: p2, disableHover: true, sx: { padding: "0" }, propsButton: { sx: { maxHeight: "22px" } } }), [p2]), [g2, h2] = W.useState(null), f2 = K((e3) => {
2561
+ const t3 = e3.dataTransfer;
2562
+ if (p2?.getCommand("openWorkbook") && t3) {
2563
+ if ("dragenter" === e3.type || "dragover" === e3.type) {
2564
+ let e4 = null;
2565
+ e4 = ((e5) => {
2566
+ const o4 = t3.items, n4 = o4.length;
2567
+ for (let t4 = 0; t4 < n4; t4++) {
2568
+ const n5 = o4[t4];
2569
+ if (n5.type.startsWith(e5)) return n5;
2570
+ }
2571
+ return null;
2572
+ })("image/");
2573
+ const o3 = t3.types, n3 = t3.items;
2574
+ e4 ? h2({ item: e4, text: "" }) : o3.includes("Files") && n3.length > 0 ? h2({ item: n3[0], text: "Drop to open" }) : o3.includes("text/html") || o3.includes("text/plain") ? (h2({ item: n3[0], text: "" }), t3.effectAllowed = "none", t3.dropEffect = "none") : (t3.effectAllowed = "none", t3.dropEffect = "none");
2575
+ } else "dragleave" === e3.type && h2(null);
2576
+ e3.preventDefault();
2577
+ }
2578
+ }, [p2]), x2 = W.useRef(null), b2 = xt((e3) => {
2579
+ if (g2 && p2 && (e3.preventDefault(), e3.stopPropagation(), h2(null), e3.dataTransfer.files && e3.dataTransfer.files.length > 0)) {
2580
+ const t3 = e3.dataTransfer.files[0];
2581
+ if (!t3) return;
2582
+ if (t3?.type?.startsWith("image/")) {
2583
+ const o3 = x2.current?.getSheetElement()?.getGridElement().getViewFromClient(e3.clientX, e3.clientY);
2584
+ if (!o3) return;
2585
+ const n3 = o3.getRelativePointFromClient(e3.clientX, e3.clientY), a3 = o3.toAbsoluteBounds({ ...n3, width: 0, height: 0 }), r3 = o3.getCellCoordsFromClient(e3.clientX, e3.clientY);
2586
+ p2.getCommand("insertImageFromFile")?.execute({ file: t3, options: { bounds: { x: a3.x, y: a3.y } }, goto: { range: { ...r3 } } });
2587
+ } else p2.getCommand("openWorkbook")?.execute(t3);
2588
+ }
2589
+ }, [p2, g2]), y2 = V(() => g2 && g2.text ? z(Q, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: (e3) => e3.palette.divider, color: (e3) => e3.palette.primary.dark }, children: z(J, { variant: "h4", children: g2.text }) }) : null, [g2]), w2 = { ref: x2, commands: p2, onDragStart: (e3) => {
2590
+ if (e3.target.src) {
2591
+ const t3 = new Image();
2592
+ t3.src = e3.target.src, e3.dataTransfer.setDragImage(t3, 1, 1);
2593
+ }
2594
+ }, onDragEnter: f2, onDragLeave: f2, onDragOver: f2, onDrop: b2 };
2595
+ t2 && (w2.propsStatusBar = { childrenEnd: u2 });
2596
+ let S2 = m2(w2);
2597
+ return y2 ? L(H, { children: [S2, y2] }) : S2;
2582
2598
  });
2583
2599
  Ja.displayName = "CommandsWrapper";
2584
2600
  const er = $((e2) => {
2585
- const { children: t2 } = e2, o2 = oo(), n2 = o2 ? o2.enqueueSnackbar : () => {
2601
+ const { children: t2 } = e2, o2 = to(), n2 = o2 ? o2.enqueueSnackbar : () => {
2586
2602
  }, a2 = o2 ? o2.closeSnackbar : () => {
2587
- }, [r2, l2] = _({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), i2 = K(() => {
2603
+ }, [r2, l2] = j({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), i2 = K(() => {
2588
2604
  l2((e3) => ({ ...e3, isMounted: true }));
2589
2605
  }, []), s2 = K(() => {
2590
2606
  l2((e3) => ({ ...e3, isMounted: false }));
@@ -2595,7 +2611,7 @@ const er = $((e2) => {
2595
2611
  const e5 = new Set(u2.current);
2596
2612
  e5.add(t4.onceKey), u2.current = e5;
2597
2613
  }
2598
- const o4 = { variant: t4?.type ?? kt.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t4?.preventDuplicate, persist: t4?.persist ?? t4?.type === kt.Error, action: (e5) => z(te, { onClick: () => a2(e5), children: z(xt, { iconKey: "Cancel" }) }) };
2614
+ const o4 = { variant: t4?.type ?? Tt.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t4?.preventDuplicate, persist: t4?.persist ?? t4?.type === Tt.Error, action: (e5) => z(ee, { onClick: () => a2(e5), children: z(wt, { iconKey: "Cancel" }) }) };
2599
2615
  t4?.enqueueProps && Object.assign(o4, t4.enqueueProps), e4 || console.log("message is 'null'", t4), n2(e4 ?? "Alert", o4);
2600
2616
  }, t3 = { showMessage: e3, showBusy: (e4, t4) => {
2601
2617
  let o4 = null;
@@ -2612,14 +2628,14 @@ const er = $((e2) => {
2612
2628
  t4 = { ...t4, onKeyDown: (e5) => {
2613
2629
  e5.isDefaultPrevented() || e5.isPropagationStopped() || o4?.onKeyDown?.(e5);
2614
2630
  } };
2615
- return c2(e4, { sort: () => import("./eZ7cx2YnaEfXyfU8.mjs"), numberFormat: () => import("./DiTrdBQV2uxN3GKM.mjs"), hyperlink: () => import("./BEnfb2SK8bA4gTFW.mjs"), comments: () => import("./B8fe0e-2ZKPkjmUL.mjs"), find: () => import("./Id0KR5kK1ADVhWhD.mjs"), tableNew: () => import("./BZDELNZUW344wqXt.mjs"), namedDetails: () => import("./DNlKlusE8DeOTRuC.mjs"), resizeHeader: () => import("./D3_AGbvzQKHFYZxn.mjs") }[e4], t4);
2631
+ return c2(e4, { sort: () => import("./CACqTiBtxYlo1mu7.mjs"), numberFormat: () => import("./BYjJIMFsheqJcsEI.mjs"), hyperlink: () => import("./CS0OWM24rZpAGRKU.mjs"), comments: () => import("./CdUceTAldsMTIFnD.mjs"), find: () => import("./Do7ts-uMkQANfvhq.mjs"), tableNew: () => import("./oYh6joioOWhFd_R3.mjs"), namedDetails: () => import("./D6B7z_d11sd-U1fU.mjs"), resizeHeader: () => import("./CJU8jJhxtR3PEj2I.mjs") }[e4], t4);
2616
2632
  }, showOptions: m2, showInput: p2, showError: (t4) => {
2617
- let o4, n3 = kt.Error, a3 = "Unknown Error";
2618
- "string" == typeof t4 ? a3 = t4 : t4 instanceof Error && (o4 = t4, t4.message && (a3 = t4.message)), t4 instanceof Yt && (n3 = kt.Info), e3(a3, { type: n3, enqueueProps: { error: o4 } });
2619
- } }, o3 = new It();
2633
+ let o4, n3 = Tt.Error, a3 = "Unknown Error";
2634
+ "string" == typeof t4 ? a3 = t4 : t4 instanceof Error && (o4 = t4, t4.message && (a3 = t4.message)), t4 instanceof Zt && (n3 = Tt.Info), e3(a3, { type: n3, enqueueProps: { error: o4 } });
2635
+ } }, o3 = new Ht();
2620
2636
  return o3.setOverrides(t3), o3;
2621
2637
  }, []);
2622
- U(() => {
2638
+ _(() => {
2623
2639
  r2.starting.size <= 0 || !r2.isMounted || l2((e3) => {
2624
2640
  const t3 = new Map(e3.running);
2625
2641
  e3.starting.forEach((e4, o3) => {
@@ -2635,10 +2651,10 @@ const er = $((e2) => {
2635
2651
  return { ...e3, starting: /* @__PURE__ */ new Map(), running: t3 };
2636
2652
  });
2637
2653
  }, [r2]);
2638
- const [h2, f2] = _(null);
2639
- return U(() => {
2654
+ const [h2, f2] = j(null);
2655
+ return _(() => {
2640
2656
  0 !== r2.starting.size || 0 !== r2.running.size ? f2(z(Me, { icon: z(it, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: true, label: r2.label, onMount: i2, onUnmount: s2, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : f2(null);
2641
- }, [r2.starting, r2.running]), L(At, { notifier: g2, children: [h2, t2] });
2657
+ }, [r2.starting, r2.running]), L(zt, { notifier: g2, children: [h2, t2] });
2642
2658
  });
2643
2659
  er.displayName = "SnackbarWrapper";
2644
2660
  const tr = $(O((e2, t2) => {
@@ -2646,198 +2662,199 @@ const tr = $(O((e2, t2) => {
2646
2662
  const o3 = i2.getRegisteredTaskPane(t3);
2647
2663
  if (!o3) return null;
2648
2664
  let n3 = o3.getIcon?.();
2649
- n3 && ("string" == typeof n3 && (n3 = z(xt, { iconKey: n3 })), n3 = z("span", { style: { display: "inline-block", transform: "rotate(90deg)", transformOrigin: "center" }, children: n3 }));
2665
+ n3 && ("string" == typeof n3 && (n3 = z(wt, { iconKey: n3 })), n3 = z("span", { style: { display: "inline-block", transform: "rotate(90deg)", transformOrigin: "center" }, children: n3 }));
2650
2666
  const a3 = t3 === l2;
2651
- return z(xe, { value: t3, label: z(Fe, { disableInteractive: true, title: o3.getTitle() ?? "", placement: "left-start", children: L(J, { sx: { padding: "0px 0px", writingMode: "vertical-rl", textOrientation: "mixed", display: "flex", alignItems: "center", justifyContent: "space-between", minWidth: "0px", color: (e3) => e3.palette.text.secondary }, children: [n3 && z(J, { sx: { display: "inline-block", transformOrigin: "center", color: (e3) => e3.palette.text.secondary }, children: n3 }), d2 && n3 ? null : z(ee, { component: "div", textTransform: "none", sx: { padding: "4px 0px", color: (e3) => a3 ? e3.palette.primary.main : e3.palette.text.secondary }, children: o3.getTitle() })] }) }), sx: { padding: "4px 4px", minWidth: "0px", minHeight: "0px", borderRadius: "4px" }, className: mt("taskpane-strip-item", { "Mui-selected": a3 }), onClick: () => e2.onSelect(t3) }, t3);
2652
- }), [a2, l2, r2, i2]), u2 = Ct(t2, () => ({ isTaskPaneStrip: () => true }), []), g2 = V(() => mt("taskpane-strip", c2), [c2]);
2653
- return z(J, { ref: u2, className: g2, sx: { paddingLeft: "2px", paddingTop: "4px", ...s2 }, ...m2, children: z(fe, { orientation: "vertical", variant: "scrollable", value: l2, onChange: (e3, t3) => {
2667
+ return z(fe, { value: t3, label: z(Fe, { disableInteractive: true, title: o3.getTitle() ?? "", placement: "left-start", children: L(Q, { sx: { padding: "0px 0px", writingMode: "vertical-rl", textOrientation: "mixed", display: "flex", alignItems: "center", justifyContent: "space-between", minWidth: "0px", color: (e3) => e3.palette.text.secondary }, children: [n3 && z(Q, { sx: { display: "inline-block", transformOrigin: "center", color: (e3) => e3.palette.text.secondary }, children: n3 }), d2 && n3 ? null : z(J, { component: "div", textTransform: "none", sx: { padding: "4px 0px", color: (e3) => a3 ? e3.palette.primary.main : e3.palette.text.secondary }, children: o3.getTitle() })] }) }), sx: { padding: "4px 4px", minWidth: "0px", minHeight: "0px", borderRadius: "4px" }, className: gt("taskpane-strip-item", { "Mui-selected": a3 }), onClick: () => e2.onSelect(t3) }, t3);
2668
+ }), [a2, l2, r2, i2]), u2 = Rt(t2, () => ({ isTaskPaneStrip: () => true }), []), g2 = V(() => gt("taskpane-strip", c2), [c2]);
2669
+ return z(Q, { ref: u2, className: g2, sx: { paddingLeft: "2px", paddingTop: "4px", ...s2 }, ...m2, children: z(he, { orientation: "vertical", variant: "scrollable", value: l2, onChange: (e3, t3) => {
2654
2670
  r2(t3);
2655
2671
  }, slotProps: { list: { sx: { gap: "2px" } }, indicator: { sx: { left: "0px", right: "unset" } } }, children: p2 }) });
2656
- })), or = (e2, t2) => z(tr, { ref: t2, ...e2 }), nr = W.forwardRef((e2, t2) => {
2657
- const { commands: o2, model: n2, ...a2 } = e2, r2 = zt(), l2 = `solid ${Wt(r2.palette.divider, 0.2)} 1px`, i2 = `${r2.shape.borderRadius ?? 4}px`, s2 = `${r2.spacing?.(0.5) ?? 4}px`, d2 = q(null);
2658
- return z(I, { model: n2, ref: t2, frameProps: { style: { border: l2, borderRadius: i2, marginBottom: s2 } }, alwaysShowStrip: true, renderTaskPanelTitle: (e3, t3) => {
2659
- const { title: o3, icon: n3, onClose: a3, readOnly: r3, focused: l3, ...i3 } = e3;
2660
- return z(ke, { className: mt({ "Mui-selected": l3 }), sx: { display: "flex", flex: "1 1 %0", color: (e4) => e4.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e4) => `${e4.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e4) => e4.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e4) => Wt(e4.palette.action.hover, 0.03), borderBottom: (e4) => `solid ${Wt(e4.palette.divider, 0.2)} 1px` }, ...i3, children: L(J, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e4) => e4.spacing(0.25), marginBottom: (e4) => e4.spacing(0.25), marginLeft: (e4) => e4.spacing(1), marginRight: (e4) => e4.spacing(1) }, children: [z(J, { sx: { flex: "1 1 100%", paddingLeft: (e4) => e4.spacing(1) }, children: o3 }), z(He, { label: "Close", children: z(te, { "aria-label": "close", sx: { color: (e4) => e4.palette.text.icon ?? e4.palette.action.active }, touchRippleRef: d2, onPointerDown: (e4) => {
2672
+ })), or = (e2) => z(tr, { ...e2 }), nr = W.forwardRef((e2, t2) => {
2673
+ const { commands: o2, model: n2, ...a2 } = e2, r2 = ct(), l2 = `solid ${mt(r2.palette.divider, 0.2)} 1px`, i2 = `${r2.shape.borderRadius ?? 4}px`, s2 = `${r2.spacing?.(0.5) ?? 4}px`, d2 = q(null);
2674
+ return z(I, { model: n2, ref: t2, propsFrame: { style: { border: l2, borderRadius: i2, marginBottom: s2 } }, alwaysShowStrip: true, renderTaskPanelTitle: (e3) => {
2675
+ const { title: t3, icon: o3, onClose: n3, readOnly: a3, focused: r3, ...l3 } = e3;
2676
+ return z(Se, { className: gt({ "Mui-selected": r3 }), sx: { display: "flex", flex: "1 1 %0", color: (e4) => e4.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e4) => `${e4.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e4) => e4.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e4) => mt(e4.palette.action.hover, 0.03), borderBottom: (e4) => `solid ${mt(e4.palette.divider, 0.2)} 1px` }, ...l3, children: L(Q, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e4) => e4.spacing(0.25), marginBottom: (e4) => e4.spacing(0.25), marginLeft: (e4) => e4.spacing(1), marginRight: (e4) => e4.spacing(1) }, children: [z(Q, { sx: { flex: "1 1 100%", paddingLeft: (e4) => e4.spacing(1) }, children: t3 }), z(Le, { label: "Close", children: z(ee, { "aria-label": "close", sx: { color: (e4) => e4.palette.text.icon ?? e4.palette.action.active }, touchRippleRef: d2, onPointerDown: (e4) => {
2661
2677
  d2.current?.start(e4, { center: false }), e4.stopPropagation(), e4.preventDefault();
2662
2678
  }, onPointerUp: () => {
2663
- a3();
2664
- }, children: z(xt, { iconKey: "Close" }) }) })] }) });
2679
+ n3();
2680
+ }, children: z(wt, { iconKey: "Close" }) }) })] }) });
2665
2681
  }, renderTaskPaneStrip: or, ...e2, onOpen: () => {
2666
2682
  e2?.onOpen?.();
2667
2683
  }, onClose: () => {
2668
2684
  e2?.onClose?.();
2669
2685
  }, commands: o2, ...a2 });
2670
2686
  }), ar = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, rr = $(O((e2, t2) => {
2671
- const { mainElement: o2, sidebarElement: n2, className: a2, style: r2, ...l2 } = e2, i2 = zt(), [s2, { width: d2 }] = Ut(), c2 = d2 > 530 || 0 === d2, m2 = q(null);
2687
+ const { mainElement: o2, sidebarElement: n2, className: a2, style: r2, ...l2 } = e2, i2 = ct(), [s2, { width: d2 }] = jt(), c2 = d2 > 530 || 0 === d2, m2 = q(null);
2672
2688
  let p2 = null, u2 = 4, g2 = 13;
2673
- return c2 ? p2 = "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" : (p2 = "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", u2 = 13, g2 = 4), z(vt, { ref: _t([m2, s2, t2]), className: a2, style: r2 ? { ...ar, ...r2 } : ar, ...l2, fixedPane: "after", position: "40%", minAfter: c2 ? "280px" : "120px", splitDirection: c2 ? "row" : "column", resizerProps: { className: "styled-resizer", style: { minWidth: c2 ? "6px" : void 0, minHeight: c2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${u2}' height='${g2}' viewBox='0 0 ${u2} ${g2}' version='1.1' fill='${i2.palette.text.icon ?? i2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${p2}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: c2 ? "left center" : "top center" } }, elementBefore: o2, paneBeforeProps: { style: { flexDirection: "column", marginRight: n2 ? void 0 : "6px" } }, elementAfter: n2, paneAfterProps: { style: { marginLeft: c2 ? "0px" : "4px", marginRight: c2 ? "8px" : "4px" } } });
2689
+ return c2 ? p2 = "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" : (p2 = "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", u2 = 13, g2 = 4), z(Dt, { ref: Vt([m2, s2, t2]), className: a2, style: r2 ? { ...ar, ...r2 } : ar, ...l2, fixedPane: "after", position: "40%", minAfter: c2 ? "280px" : "120px", splitDirection: c2 ? "row" : "column", propsResizer: { className: "styled-resizer", style: { minWidth: c2 ? "6px" : void 0, minHeight: c2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${u2}' height='${g2}' viewBox='0 0 ${u2} ${g2}' version='1.1' fill='${i2.palette.text.icon ?? i2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${p2}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: c2 ? "left center" : "top center" } }, elementBefore: o2, propsPaneBefore: { style: { flexDirection: "column", marginRight: n2 ? void 0 : "6px" } }, elementAfter: n2, propsPaneAfter: { style: { marginLeft: c2 ? "0px" : "4px", marginRight: c2 ? "8px" : "4px" } } });
2674
2690
  }));
2675
- rr.displayName = "StudioSplitPane", Ea(), Rt.register("plugin-scripts", { icons: {} }), v.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: Xn }, true);
2691
+ rr.displayName = "StudioSplitPane", Ea(), Mt.register("plugin-scripts", { icons: {} }), v.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: Xn }, true);
2676
2692
  const lr = $(O((e2, t2) => {
2677
- const { className: o2, sx: n2, style: a2, onElementLoad: r2, onError: l2, undoManager: i2, errorPanel: s2 = st, onKeyDown: d2, workbook: c2, createWorkbookOptions: m2, onWorkbookChange: p2, logo: u2, importExportDisabled: g2 = false, themeOptions: h2, autoFocus: x2 = false, commands: b2, title: y2, onTitleChange: w2, titleProps: S2, renderLoadingPanel: k2, ...C2 } = e2, v2 = q(null), T2 = gt(p2, [p2]), P2 = gt(w2 ?? S2?.onTitleChange, [w2 ?? S2?.onTitleChange]), D2 = S2?.placeHolder ?? "Untitled", F2 = h2?.mode, { themeMode: M2, source: N2 } = tt({ mode: F2 }), B2 = V(() => ({ ...h2, light: dt(false, jt.deepMerge(h2?.theme ?? {}, h2?.light ?? {})), dark: dt(true, jt.deepMerge(h2?.theme ?? {}, h2?.dark ?? {})) }), [h2]), E2 = M2 === ot.Dark, [I2, H2] = _(null);
2678
- U(() => {
2679
- H2(i2 ?? new Qt());
2680
- }, [i2]);
2681
- const [W2, $2] = _(null), [O2, G2] = _(null), j2 = R();
2682
- Q(() => {
2683
- if (!c2 || 0 === Object.keys(c2).length && !jt.isPromiseLike(c2)) {
2684
- const e3 = { theme: j2.getDefaultTheme(), ...m2 };
2685
- G2(new f(e3));
2686
- } else G2(c2);
2687
- }, [c2]), Q(() => {
2688
- if (!O2) return;
2689
- if (O2 instanceof f) return $2({ workbook: O2 }), void (c2 !== O2 && T2?.(O2));
2693
+ const { className: o2, sx: n2, square: a2, elevation: r2, variant: l2, style: i2, onElementLoad: s2, onError: d2, undoManager: c2, renderWorkbookError: m2 = ba, onKeyDown: p2, workbook: u2, onWorkbookChange: g2, logo: h2, importExportDisabled: f2 = false, themeOptions: b2, autoFocus: y2 = false, commands: w2, title: S2, onWorkbookTitleChange: C2, propsWorkbookTitle: k2, renderLoading: v2 = xa, propsLoading: T2, ...D2 } = e2, F2 = q(null), M2 = xt(g2, [g2]), N2 = xt(C2 ?? k2?.onTitleChange, [C2 ?? k2?.onTitleChange]), B2 = k2?.placeHolder ?? "Untitled", E2 = b2?.mode, { themeMode: P2, source: I2 } = tt({ mode: E2 }), H2 = V(() => ({ ...b2, light: st(false, _t.deepMerge(b2?.theme ?? {}, b2?.light ?? {})), dark: st(true, _t.deepMerge(b2?.theme ?? {}, b2?.dark ?? {})) }), [b2]), W2 = P2 === ot.Dark, [$2, O2] = j(null);
2694
+ _(() => {
2695
+ O2(c2 ?? new Yt());
2696
+ }, [c2]);
2697
+ const [G2, U2] = j(null), [X2, Z2] = j(null), Q2 = R();
2698
+ Y(() => {
2699
+ if (!u2 || 0 === Object.keys(u2).length && !_t.isPromiseLike(u2)) {
2700
+ const e3 = { theme: Q2.getDefaultTheme() };
2701
+ Z2(new x(e3));
2702
+ } else Z2(u2);
2703
+ }, [u2]), Y(() => {
2704
+ if (!X2) return;
2705
+ if (X2 instanceof x) return U2({ workbook: X2 }), void (u2 !== X2 && M2?.(X2));
2690
2706
  (async () => {
2691
2707
  try {
2692
- let e3, t3 = await Promise.resolve(O2);
2693
- t3 && t3.source && (t3 = await ja.read(t3)), t3.workbook ? (te2(t3.title), e3 = t3.workbook) : e3 = t3, T2?.(e3), $2({ workbook: e3 });
2708
+ let e3 = await Promise.resolve(X2);
2709
+ e3 && e3.source && (e3 = await _a.read(e3));
2710
+ let t3 = e3;
2711
+ M2?.(t3), ne2(t3.getName() ?? ""), U2({ workbook: t3 });
2694
2712
  } catch (e3) {
2695
- T2?.(null), $2({ error: e3 });
2713
+ M2?.(null), U2({ error: e3 });
2696
2714
  }
2697
2715
  })();
2698
- }, [O2]);
2699
- const [X2, Z2] = _(null);
2700
- U(() => {
2701
- if (!I2 || !W2) return;
2702
- I2.clear();
2703
- const e3 = W2?.workbook?.getTransactions();
2716
+ }, [X2]);
2717
+ const [J2, ee2] = j(null);
2718
+ _(() => {
2719
+ if (!$2 || !G2) return;
2720
+ $2.clear();
2721
+ const e3 = G2?.workbook?.getTransactions();
2704
2722
  if (!e3) return;
2705
2723
  return e3.addListener({ onCommitEnd: (t3) => {
2706
- t3.getDescription() ? I2.addUndoOperation({ description: t3.getDescription(), undo: () => (e3.revert(t3.getId()), X2.source?.focus(), () => {
2707
- e3.restore(t3.getId()), X2.source?.focus();
2724
+ t3.getDescription() ? $2.addUndoOperation({ description: t3.getDescription(), undo: () => (e3.revert(t3.getId()), J2.source?.focus(), () => {
2725
+ e3.restore(t3.getId()), J2.source?.focus();
2708
2726
  }) }) : console.warn("commit has no description", t3);
2709
2727
  } });
2710
- }, [I2, W2, X2]);
2711
- const Y2 = gt((e3) => {
2712
- e3 ? I2.setRepeatableOperation({ description: e3.label(), repeat: async () => e3.execute() }) : I2.setRepeatableOperation(null);
2713
- }, [I2]), [ee2, te2] = _(y2 ?? S2?.title ?? "");
2714
- U(() => {
2715
- te2(y2 ?? S2?.title ?? "");
2716
- }, [y2 ?? S2?.title]), U(() => {
2717
- P2?.(ee2);
2718
- }, [ee2]);
2719
- const [oe2, ne2] = _(null), ae2 = V(() => {
2728
+ }, [$2, G2, J2]);
2729
+ const te2 = xt((e3) => {
2730
+ e3 ? $2.setRepeatableOperation({ description: e3.label(), repeat: async () => e3.execute() }) : $2.setRepeatableOperation(null);
2731
+ }, [$2]), [oe2, ne2] = j(S2 ?? k2?.title ?? "");
2732
+ _(() => {
2733
+ ne2(S2 ?? k2?.title ?? "");
2734
+ }, [S2 ?? k2?.title]), _(() => {
2735
+ N2?.(oe2);
2736
+ }, [oe2]);
2737
+ const [re2, le2] = j(null), ie2 = V(() => {
2720
2738
  const e3 = () => ({ contains: (e4) => true, focus() {
2721
2739
  } });
2722
- return b2 ? b2.createChildGroup(e3, "application", false) : new Mt(e3, "application");
2723
- }, [b2]), le2 = gt(async (e3) => {
2724
- ne2(e3.source.getViewportElement()), Z2(e3), ae2.activate("sheet"), await Rt.prefetch(), r2?.(e3);
2725
- }, [ae2]);
2726
- U(() => {
2727
- X2 && x2 && X2.source?.focus("object" == typeof x2 ? x2 : void 0);
2728
- }, [X2]);
2729
- const ie2 = q(null), se2 = K((e3) => {
2740
+ return w2 ? w2.createChildGroup(e3, "application", false) : new Pt(e3, "application");
2741
+ }, [w2]), se2 = xt(async (e3) => {
2742
+ le2(e3.source.getViewportElement()), ee2(e3), ie2.activate("sheet"), await Mt.prefetch(), s2?.(e3);
2743
+ }, [ie2]);
2744
+ _(() => {
2745
+ J2 && y2 && J2.source?.focus("object" == typeof y2 ? y2 : void 0);
2746
+ }, [J2, y2]);
2747
+ const de2 = q(null), ce2 = K((e3) => {
2730
2748
  let t3 = null;
2731
- return S2?.hidden || (t3 = z(Ma, { ...S2, style: { maxWidth: "100%", ...S2?.style }, workbook: v2.current, ref: ie2, title: ee2, placeHolder: D2, onTitleChange: (e4) => {
2732
- te2(e4);
2733
- } })), z(Qa, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(B2?.onEnabledDarkGridChange || B2?.onEnabledDarkImagesChange || B2?.onModeChange) });
2734
- }, [u2, ee2, S2, B2, g2, ae2]);
2735
- U(() => {
2749
+ return k2?.hidden || (t3 = z(Ma, { ...k2, style: { maxWidth: "100%", ...k2?.style }, workbook: F2.current, ref: de2, title: oe2, placeHolder: B2, onTitleChange: (e4) => {
2750
+ ne2(e4);
2751
+ } })), z(Ya, { ...e3, logo: h2, mainElement: t3, showFileMenu: !f2, showAppearanceMenu: !!(H2?.onEnabledDarkGridChange || H2?.onEnabledDarkImagesChange || H2?.onModeChange) });
2752
+ }, [h2, oe2, k2, H2, f2, ie2]);
2753
+ _(() => {
2736
2754
  const e3 = (e4) => e4.preventDefault();
2737
- return v2.current?.addEventListener("wheel", e3, { passive: false }), () => {
2738
- v2.current?.removeEventListener("wheel", e3);
2755
+ return F2.current?.addEventListener("wheel", e3, { passive: false }), () => {
2756
+ F2.current?.removeEventListener("wheel", e3);
2739
2757
  };
2740
2758
  }, []);
2741
- const de2 = V(() => {
2742
- const e3 = { transparentBackground: true };
2743
- return z(J, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...a2 }, children: k2?.(e3) ?? z(Me, { ...e3 }) });
2744
- }, [n2, a2, k2]), ce2 = K(({ error: e3 }) => (l2?.(e3), z(s2, { sx: n2, style: a2, error: e3 ?? "Unable to display empty workbook." })), [n2, a2, l2]), me2 = V(() => ({ ...n2, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (e3) => e3.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [n2]), [pe2, ue2] = _(null), ge2 = K((e3, t3) => z(nr, { ref: t3, model: O2, commands: ae2, ...e3 }), [ae2, O2]), he2 = K((e3) => z(rr, { mainElement: e3, sidebarElement: pe2 }), [pe2]), fe2 = _t([v2, t2]), xe2 = V(() => {
2745
- if (!W2) return de2;
2746
- if (W2.error || !W2.workbook) return ce2({ error: W2.error });
2747
- let e3 = null, t3 = null, n3 = false;
2748
- return B2 && (e3 = E2 ? B2.dark : B2.light, t3 = E2 && B2.enableDarkGrid ? B2.dark : B2.light, n3 = B2.enableDarkImages), z(Da, { sx: me2, style: a2, tabIndex: 0, autoFocus: true, workbook: W2.workbook, ref: fe2, renderToolbar: se2, onElementLoad: le2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
2749
- d2?.(e4);
2750
- }, renderLoadingPanel: k2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, mainWrapper: he2, className: mt(o2), onContextMenu: (e4) => e4.preventDefault(), ...C2 }, "WorkbookElement");
2751
- }, [W2, ee2, I2, de2, k2, B2, C2, se2, me2, he2]);
2752
- let be2 = z(ao, { maxSnack: 3, domRoot: oe2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2753
- v2.current?.focus();
2754
- }, Components: { error: Xa }, iconVariant: { success: z(re, { style: { marginRight: "8px" }, children: z("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: z(xt, { iconKey: "ErrorAlert", style: { marginRight: "8px" } }) }, children: z(A, { createArea: ge2, onUpdateArea: (e3) => {
2755
- ue2(e3);
2756
- }, children: z(ct, { children: z(er, { children: z(Lt, { children: z(Ht, { children: z(Ja, { workbook: W2?.workbook, setWorkbook: G2, importExportDisabled: g2, titlePlaceHolder: D2, titleWorkbook: ee2, setWorkbookTitle: te2, refWorkbookTitle: ie2, commands: ae2, undoManager: I2, themeOptions: B2, children: xe2 }) }) }) }) }) }) });
2757
- return B2 && (be2 = L(Ot, { theme: E2 ? B2.dark : B2.light, children: [B2.cssBaseline ? z(Ce, {}) : null, be2] })), be2;
2759
+ const me2 = V(() => ({ "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (e3) => e3.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" }, ...n2 }), [n2]), [ue2, ge2] = j(null), he2 = K((e3) => z(nr, { model: G2?.workbook, commands: ie2, ...e3 }), [ie2, G2]), fe2 = K((e3) => z(rr, { mainElement: e3, sidebarElement: ue2 }), [ue2]), xe2 = Vt([F2, t2]), be2 = K((e3) => {
2760
+ const { commands: t3, ref: s3, ...d3 } = e3;
2761
+ if (!G2) return z(pe, { sx: n2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...i2 }, children: v2({ ...T2 }) });
2762
+ if (G2.error) return z(pe, { sx: n2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "stretch", justifyContent: "stretch", ...i2 }, children: m2({ style: { width: "100%", height: "100%", ...i2 }, error: G2.error }) });
2763
+ let c3 = null, u3 = null, g3 = false;
2764
+ H2 && (c3 = W2 ? H2.dark : H2.light, u3 = W2 && H2.enableDarkGrid ? H2.dark : H2.light, g3 = H2.enableDarkImages);
2765
+ const h3 = z(Da, { tabIndex: 0, autoFocus: false, workbook: G2.workbook, ref: Vt([s3, xe2]), renderToolbar: ce2, onElementLoad: se2, onRepeatCommandChange: te2, onKeyDown: (e4) => {
2766
+ p2?.(e4);
2767
+ }, propsLoading: T2, renderLoading: v2, gridTheme: u3, headersTheme: c3, enableDarkImages: g3, wrapperMain: fe2, className: gt(o2), onContextMenu: (e4) => e4.preventDefault(), commands: t3, ...D2, ...d3 }, "WorkbookElement");
2768
+ return z(pe, { sx: me2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "stretch", justifyContent: "stretch", ...i2 }, square: a2, elevation: r2, variant: l2, children: h3 });
2769
+ }, [G2, oe2, $2, v2, T2, D2, a2, r2, l2, m2, H2, ce2, me2, fe2]);
2770
+ let ye2 = z(no, { maxSnack: 3, domRoot: re2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2771
+ F2.current?.focus();
2772
+ }, Components: { error: qa }, iconVariant: { success: z(ae, { style: { marginRight: "8px" }, children: z("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: z(wt, { iconKey: "ErrorAlert", style: { marginRight: "8px" } }) }, children: z(A, { renderArea: he2, onUpdateArea: (e3) => {
2773
+ ge2(e3);
2774
+ }, children: z(dt, { children: z(er, { children: z(Wt, { children: z($t, { children: z(Ja, { workbook: G2?.workbook, renderWorkbook: be2, setWorkbook: Z2, importExportDisabled: f2, titlePlaceHolder: B2, titleWorkbook: oe2, setWorkbookTitle: ne2, refWorkbookTitle: de2, commands: ie2, undoManager: $2, themeOptions: H2 }) }) }) }) }) }) });
2775
+ return H2 && (ye2 = L(ut, { theme: W2 ? H2.dark : H2.light, children: [H2.cssBaseline ? z(Ce, {}) : null, ye2] })), ye2;
2758
2776
  }));
2759
2777
  lr.displayName = "EagerStudio";
2760
2778
  const ir = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: lr, default: lr }, Symbol.toStringTag, { value: "Module" }));
2761
2779
  export {
2762
- Ha as AppearanceCommandButton,
2763
- mo as AutoColorPosition,
2780
+ La as AppearanceCommandButton,
2781
+ co as AutoColorPosition,
2764
2782
  Fo as BorderCommandButton,
2765
2783
  Do as BorderPopupButton,
2766
- Po as BorderStylePopupButton,
2767
- ho as C,
2768
- Wo as CellsDeleteCommandButton,
2769
- $o as CellsFormatCommandButton,
2770
- zo as CellsInsertCommandButton,
2771
- Lo as ClearCommandButton,
2772
- xo as ColorButton,
2773
- bo as ColorButtonList,
2774
- Oo as ColorCommandButton,
2775
- ko as ColorPanel,
2776
- co as ColorPanelType,
2777
- vo as ColorPopupButton,
2784
+ Ro as BorderStylePopupButton,
2785
+ go as C,
2786
+ zo as CellsDeleteCommandButton,
2787
+ Wo as CellsFormatCommandButton,
2788
+ Ho as CellsInsertCommandButton,
2789
+ Ao as ClearCommandButton,
2790
+ fo as ColorButton,
2791
+ xo as ColorButtonList,
2792
+ $o as ColorCommandButton,
2793
+ So as ColorPanel,
2794
+ so as ColorPanelType,
2795
+ ko as ColorPopupButton,
2778
2796
  DefaultTaskPaneRegistry,
2779
- La as DocThemeCommandButton,
2797
+ Aa as DocThemeCommandButton,
2780
2798
  lr as EagerStudio,
2781
- Ho as FillCommandButton,
2782
- Rn as FilterColumnMenu,
2783
- Go as FilterCommandButton,
2784
- Pn as Filters,
2799
+ Lo as FillCommandButton,
2800
+ Tn as FilterColumnMenu,
2801
+ Ko as FilterCommandButton,
2802
+ Rn as Filters,
2785
2803
  Bo as FindCommandButton,
2786
- qo as FontFamilyCommandButton,
2804
+ Uo as FontFamilyCommandButton,
2787
2805
  Eo as FontSizeCommandButton,
2788
- Tn as FormulaBar,
2806
+ vn as FormulaBar,
2789
2807
  No as FreezeCommandButton,
2790
- za as HelpCommandButton,
2791
- ro as HorizontalAlignCommandButton,
2792
- Ka as InsertFunctionCommandPopupButton,
2793
- $a as InsertFunctionSumCommandPopupButton,
2794
- Wa as InsertImageCommandButton,
2808
+ Ha as HelpCommandButton,
2809
+ ao as HorizontalAlignCommandButton,
2810
+ Va as InsertFunctionCommandPopupButton,
2811
+ Wa as InsertFunctionSumCommandPopupButton,
2812
+ za as InsertImageCommandButton,
2795
2813
  LicenseManager,
2796
2814
  Mo as MergeCommandButton,
2797
2815
  Cn as NamedCollectionEditor,
2798
- gn as NamedInput,
2799
- Ao as NumberFormatCommandButton,
2800
- Yo as PasteCommandButton,
2801
- on as PresetCellStylesCommandButton,
2802
- Aa as PresetTableStylesCommandButton,
2803
- fn as RangeInput,
2816
+ un as NamedInput,
2817
+ Io as NumberFormatCommandButton,
2818
+ Zo as PasteCommandButton,
2819
+ tn as PresetCellStylesCommandButton,
2820
+ Ia as PresetTableStylesCommandButton,
2821
+ hn as RangeInput,
2804
2822
  Dn as SheetTab,
2805
2823
  Fn as SheetTabMenu,
2806
- Sn as SheetZoomScale,
2824
+ wn as SheetZoomScale,
2807
2825
  Mn as SheetsAllMenu,
2808
- Ko as SortFilterCommandButton,
2809
- kn as StatusBar,
2810
- _a as Studio,
2811
- Ro as StyledStrokeIcon,
2826
+ Vo as SortFilterCommandButton,
2827
+ Sn as StatusBar,
2828
+ Ga as Studio,
2829
+ To as StyledStrokeIcon,
2812
2830
  Na as TableDetailsPanel,
2813
2831
  Ba as TableDetailsTaskPane,
2814
2832
  Ea as TablePlugin,
2815
- sn as TableStyleCanvasPreview,
2816
- mn as TableStyleOptionsPanel,
2817
- rn as TableStylePreview,
2818
- Xo as TextEffectsCommandButton,
2819
- io as TextOverflowCommandButton,
2820
- so as TextRotateCommandButton,
2821
- bn as ThemeSelectButton,
2822
- yn as ThemeSelectPanel,
2823
- wn as ThemeSelectPopupButton,
2824
- Zo as UnderlineCommandButton,
2825
- _o as UndoRedoCommandButton,
2826
- lo as VerticalAlignCommandButton,
2827
- Vo as ViewGridLinesCommandButton,
2828
- Qo as ViewHeadingsCommandButton,
2829
- fa as WalkingCopyCommandButton,
2830
- ha as WorkbookContextMenu,
2833
+ ln as TableStyleCanvasPreview,
2834
+ cn as TableStyleOptionsPanel,
2835
+ an as TableStylePreview,
2836
+ qo as TextEffectsCommandButton,
2837
+ lo as TextOverflowCommandButton,
2838
+ io as TextRotateCommandButton,
2839
+ xn as ThemeSelectButton,
2840
+ bn as ThemeSelectPanel,
2841
+ yn as ThemeSelectPopupButton,
2842
+ Xo as UnderlineCommandButton,
2843
+ Go as UndoRedoCommandButton,
2844
+ ro as VerticalAlignCommandButton,
2845
+ Oo as ViewGridLinesCommandButton,
2846
+ Yo as ViewHeadingsCommandButton,
2847
+ da as WalkingCopyCommandButton,
2848
+ pa as WorkbookContextMenu,
2831
2849
  Da as WorkbookElement,
2832
- ja as WorkbookIO,
2833
- ga as WorkbookStrip,
2850
+ _a as WorkbookIO,
2851
+ ma as WorkbookStrip,
2834
2852
  Ma as WorkbookTitle,
2835
- Jo as WorkbookViewCommandButton,
2836
- Ua as _WorkbookIO,
2837
- Hn as createGridStyleFromMUITheme,
2838
- _a as default,
2839
- sa as defaultNewWorkbook,
2840
- An as setPrintExamplesOnLoad,
2853
+ Qo as WorkbookViewCommandButton,
2854
+ ja as _WorkbookIO,
2855
+ Ln as createGridStyleFromMUITheme,
2856
+ Ga as default,
2857
+ In as setPrintExamplesOnLoad,
2841
2858
  useModelListener,
2842
2859
  useRangeListener,
2843
2860
  ia as useWorkbookCommands