@sheetxl/studio-mui 0.7.6 → 0.7.8

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 (51) hide show
  1. package/LICENSE.md +1 -1
  2. package/browser/cjs/Bt0-HMKtnBRB6IpI.cjs +20 -0
  3. package/browser/cjs/CJW4-NCdaLzNEwgK.cjs +6 -0
  4. package/browser/cjs/{BdNRaXTgqRzPmg0L.cjs → D36j1nR6-lEwM7Ht.cjs} +2 -2
  5. package/browser/cjs/{DefYX_aeMZivbpEt.cjs → D9RcTPcL8Gcds6uC.cjs} +2 -2
  6. package/browser/cjs/DPenF_1mYgI8WaQf.cjs +6 -0
  7. package/browser/cjs/{B8-dSgXI2XZKFvtp.cjs → DQ1bXdi-D0uVKGFA.cjs} +2 -2
  8. package/browser/cjs/{7MV1n9Y0yXU0hKpM.cjs → Q234HX63V75h22HJ.cjs} +1 -1
  9. package/browser/cjs/{Ce6JLd3qejgMgM3r.cjs → UoOVKSpyeYQ3Z04Y.cjs} +3 -3
  10. package/browser/cjs/WN5FOSGC22Jy3dxz.cjs +7 -0
  11. package/browser/cjs/index.cjs +3 -3
  12. package/browser/cjs/rrppjlxhsrfwBStx.cjs +6 -0
  13. package/browser/cjs/{-u6vWH9DiYlO1rsa.cjs → zFlqPWNVl7CHv7Iw.cjs} +1 -1
  14. package/browser/esm/{BnVbG5kg41edf8oz.mjs → 5Fbp4sZTl6CHhmHk.mjs} +2 -2
  15. package/browser/esm/{Dg_NRblGOcetqhnC.mjs → BD3NSZsAOvF6yczu.mjs} +4 -4
  16. package/browser/esm/{miaBr4cu9WKLs8Is.mjs → BiazW77hCkbuJPiW.mjs} +1 -1
  17. package/browser/esm/CUiplQS9rUodJwPi.mjs +4455 -0
  18. package/browser/esm/CagpAQXgCxrJrdGJ.mjs +156 -0
  19. package/browser/esm/Ci4cqU4bR1IUSqrT.mjs +49 -0
  20. package/browser/esm/{CKLhWrNo1E4r3pG7.mjs → CoIXNZVIp9Q12qM2.mjs} +7 -7
  21. package/browser/esm/{YfJJd16cfjuXpb8G.mjs → Cp-QoTwVeQkQClpI.mjs} +1 -1
  22. package/browser/esm/{yQgfM4ehXrfnEoUK.mjs → D7PjwOCMi075qK5G.mjs} +2 -2
  23. package/browser/esm/{nwvZlIH9rheqctQz.mjs → Dx4t6SbPV2HSf_ub.mjs} +12 -12
  24. package/browser/esm/index.mjs +38 -37
  25. package/browser/esm/{DVSjscO7zuDsOD4v.mjs → wenu-h35nL2_uEZp.mjs} +2 -2
  26. package/licenses/dependencies.txt +75 -108
  27. package/node/assets/style.css +1 -1
  28. package/node/esm/B21Usvp_sTqMHAZ4.mjs +157 -0
  29. package/node/esm/{COoX8Ir66wNuWJ_m.mjs → BAgtosqQwtrUsOYl.mjs} +8 -8
  30. package/node/esm/{CN79Z_qqLiF3V5r0.mjs → CYU-oRRhaNiOTVNa.mjs} +14 -14
  31. package/node/esm/{BTp8XtWh47Y1g1MM.mjs → Cfzjf7vBs29sO_g3.mjs} +13 -13
  32. package/node/esm/{Dln5o1FP_HWPs0Uf.mjs → D1n7HgHfLVQZ0KhP.mjs} +1 -1
  33. package/node/esm/{CNCYE_ff8SnJJMPN.mjs → D60xUWK_BS-7PMLM.mjs} +4 -4
  34. package/node/esm/{CxbA2L1Ap9NSJcxm.mjs → DWhJA7EI9CmoBPDY.mjs} +1 -1
  35. package/node/esm/{B9TRK2jd_Ki2RifT.mjs → DmdldJQanZCNdfA5.mjs} +1 -1
  36. package/node/esm/{qpKmKMfv4DDofXKf.mjs → GzNLdpzukdCxYbbC.mjs} +1 -1
  37. package/node/esm/index.mjs +1310 -1264
  38. package/package.json +15 -16
  39. package/types/index.d.ts +18 -8
  40. package/browser/cjs/1-LY_VyMGQ9MfeNB.cjs +0 -20
  41. package/browser/cjs/BEmcHbiMOFhIa91S.cjs +0 -6
  42. package/browser/cjs/D7AH724IJJvos02e.cjs +0 -7
  43. package/browser/cjs/KOj1qev47_vzzRFV.cjs +0 -6
  44. package/browser/cjs/St8H4B5iT2fsqOb7.cjs +0 -6
  45. package/browser/cjs/TS1uQTjkemJ22p1Y.cjs +0 -6
  46. package/browser/esm/BNxVvFkY3b2mERJf.mjs +0 -64
  47. package/browser/esm/CJsYe8TqU6tqj4UH.mjs +0 -154
  48. package/browser/esm/DdLujAMc-Cefddif.mjs +0 -49
  49. package/browser/esm/beUKtp_qQMnuYcVk.mjs +0 -4452
  50. package/node/esm/BcB8nCbI5HW5jv5q.mjs +0 -65
  51. package/node/esm/C5WzmLTAphEQU3CU.mjs +0 -155
@@ -1,32 +1,31 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.6
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.8
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, IFont as r, NumberFormat as l, IFontCollection as i, IStyle as s, ITextFrame as d, Table as c, IFill as m, CoordUtils as p, ISheet as u, LicenseManager as h, Workbook as g, TypesUtils as f } from "@sheetxl/sdk";
7
+ import { Color as e, IColor as t, ITheme as o, CommonUtils as n, IBorder as a, IFont as r, NumberFormat as l, IFontCollection as i, IStyle as s, ITextFrame as d, Table as c, IFill as m, CoordUtils as p, ISheet as u, LicenseManager as g, Workbook as h, TypesUtils as f } from "@sheetxl/sdk";
8
8
  import { LicenseManager } from "@sheetxl/sdk";
9
- import { StyledStrokePath as x, StaticBorderRenderer as b, FontUtils as y, useModelListener as w, createCellEditStateFromCell as k, SheetCellEditor as S, ScriptEditor as C, useTaskPaneArea as v, DefaultTaskPaneRegistry as T, useDocThemes as P, TabStrip as R, SheetElement as D, SheetScrollbar as M, PictureEditor as F, ChartEditor as B, EmptyFrame as N, LogoNoPaddingIcon as E, TaskPaneArea as A, TaskPaneProvider as I } from "@sheetxl/react";
9
+ import { StyledStrokePath as x, StaticBorderRenderer as b, FontUtils as y, useModelListener as w, createCellEditStateFromCell as S, SheetCellEditor as k, ScriptEditor as C, useTaskPaneArea as v, DefaultTaskPaneRegistry as T, useDocThemes as R, TabStrip as P, SheetElement as D, SheetScrollbar as M, PictureEditor as F, ChartEditor as N, EmptyFrame as B, LogoNoPaddingIcon as E, TaskPaneArea as A, TaskPaneProvider as I } 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 G, isValidElement as K, useState as U, useEffect as j, Suspense as _, useRef as q, createElement as X, useReducer as Z, useImperativeHandle as Y, useLayoutEffect as J } from "react";
13
- import { Box as Q, 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, useMediaQuery as de, FormControl as ce, TextField as me, InputAdornment as pe, Slider as ue, Paper as he, CircularProgress as ge, Select as fe, Tabs as xe, Tab as be, Card as ye, CardActions as we, Collapse as ke, DialogTitle as Se, CssBaseline as Ce } from "@mui/material";
14
- import { CommandButton as ve, ExhibitDivider as Te, defaultCreatePopupPanel as Pe, CommandPopupButton as Re, InputCommandButton as De, SimpleTooltip as Me, LoadingPanel as Fe, PopupButtonType as Be, ExhibitPopupIconButton as Ne, ExhibitPopupMenuItem as Ee, ExhibitMenuItem as Ae, createStrokeShadowFilter as Ie, strokeShadowFilter as Le, ExhibitTooltip as He, ExhibitIconButton as ze, CommandTooltip as We, SelectedIcon as $e, LabelIcon as Oe, ExhibitMenuHeader as Ve, ContextMenu as Ge, SimpleCommandPopupButton as Ke, ExhibitOptionButton as Ue, hexToRGB as je, useFloatStack as _e, elevateColor as qe, CommandToolbar as Xe, createScrollEdgeButton as Ze, createScrollEndButton as Ye, createScrollStartButton as Je, scrollbarTheming as Qe, 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";
12
+ import W, { memo as $, forwardRef as O, useMemo as V, useCallback as K, isValidElement as G, useState as U, useEffect as _, 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 Me, LoadingPanel as Fe, PopupButtonType as Ne, ExhibitPopupIconButton as Be, ExhibitPopupMenuItem as Ee, ExhibitMenuItem as Ae, createStrokeShadowFilter as Ie, strokeShadowFilter as Le, ExhibitTooltip as He, ExhibitIconButton as ze, CommandTooltip as We, SelectedIcon as $e, LabelIcon as Oe, ExhibitMenuHeader as Ve, ContextMenu as Ke, ExhibitOptionButton as Ge, hexToRGB as Ue, useFloatStack as _e, SimpleCommandPopupButton 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
15
  import mt from "clsx";
16
- import { useCommands as pt, CommandButtonType as ut, useCallbackRef as ht, ReactUtils as gt, KeyCodes as ft, DynamicIcon as xt, useCommand as bt, useEditMode as yt, useMouseDownAndHoldListener as wt, useNotifier as kt, NotifierType as St, useImperativeElement as Ct, SplitPane as vt, RoundedTab as Tt, SimpleCommand as Pt, Command as Rt, KeyModifiers as Dt, CommandGroup as Mt, ToolTipPlacement as Ft, ScrollPane as Bt, useUndoManager as Nt, DefaultReactNotifier as Et, NotifierProvider as At, DefaultDynamicIconService as It } from "@sheetxl/utils-react";
17
- import { useTheme as Lt, alpha as Ht, getOverlayAlpha as zt, ThemeProvider as Wt } from "@mui/material/styles";
18
- import { alpha as $t } from "@mui/system";
19
- import { useFormContext as Ot } from "react-hook-form";
20
- import { ResizableBox as Vt } from "react-resizable";
21
- import { mergeRefs as Gt } from "react-merge-refs";
22
- import { CommonUtils as Kt, ChainedError as Ut, PartialError as jt, UndoManager as _t } from "@sheetxl/utils";
23
- import { useMeasure as qt } from "react-use";
24
- import { CSSTransition as Xt } from "react-transition-group";
25
- import { useFullscreen as Zt } from "rooks";
26
- import { IOUtils as Yt } from "@sheetxl/io";
27
- import { ErrorBoundary as Jt } from "react-error-boundary";
28
- import { useSnackbar as Qt, SnackbarContent as eo, SnackbarProvider as to } from "notistack";
29
- const oo = $(O((e2, t2) => {
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, SimpleCommand as Rt, Command as Pt, KeyModifiers as Dt, CommandGroup as Mt, ToolTipPlacement as Ft, ScrollPane as Nt, useUndoManager as Bt, DefaultReactNotifier as Et, NotifierProvider as At, DefaultDynamicIconService as It, 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 Ut } from "react-merge-refs";
22
+ import { useMeasure as _t } 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) => {
30
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(() => {
31
30
  for (let e3 = 0; e3 < s2.length; e3++) if (s2[e3]?.state()) return s2[e3];
32
31
  return s2[0];
@@ -34,30 +33,30 @@ const oo = $(O((e2, t2) => {
34
33
  if (!n2) return null;
35
34
  const e3 = { ...n2 };
36
35
  return delete e3.beforeExecute, e3;
37
- }, [n2]), m2 = G((e3, t3) => {
38
- 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(Q, { 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(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i2, children: [s3, z(Te, { orientation: "horizontal" }), z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l3 })] });
39
- return Pe({ ...e3, children: d3 });
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 });
40
39
  }, [r2, n2]);
41
- 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 });
42
- })), no = $(O((e2, t2) => {
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) => {
43
42
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), s2 = V(() => {
44
43
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3];
45
44
  return i2[0];
46
- }, [i2]), d2 = G((e3, t3) => {
45
+ }, [i2]), d2 = K((e3, t3) => {
47
46
  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") })] });
48
- return Pe({ ...e3, children: l3 });
47
+ return Re({ ...e3, children: l3 });
49
48
  }, [r2, n2]);
50
- return z(Re, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: s2?.icon() ?? "TextVerticalBottom", ...l2 });
51
- })), ao = $(O((e2, t2) => {
49
+ return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: s2?.icon() ?? "TextVerticalBottom", ...l2 });
50
+ })), io = $(O((e2, t2) => {
52
51
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), s2 = V(() => {
53
52
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3];
54
53
  return i2[0];
55
- }, [i2]), d2 = ht((e3, t3) => {
54
+ }, [i2]), d2 = gt((e3, t3) => {
56
55
  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") })] });
57
- return Pe({ ...e3, children: l3 });
56
+ return Re({ ...e3, children: l3 });
58
57
  }, [r2, n2, a2]);
59
- return z(Re, { ref: t2, commands: o2, commandHook: n2, scope: a2, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: d2, icon: s2?.icon() ?? "TextHorizontalOverflow", ...l2 });
60
- })), ro = $(O((e2, t2) => {
58
+ return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: d2, icon: s2?.icon() ?? "TextHorizontalOverflow", ...l2 });
59
+ })), so = $(O((e2, t2) => {
61
60
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = V(() => {
62
61
  const e3 = i2.length;
63
62
  for (let t3 = 0; t3 < e3; t3++) {
@@ -65,14 +64,14 @@ const oo = $(O((e2, t2) => {
65
64
  if (e4?.state()) return e4;
66
65
  }
67
66
  return i2[1];
68
- }, [i2]), d2 = G((e3, t3) => {
67
+ }, [i2]), d2 = K((e3, t3) => {
69
68
  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" })] });
70
- return Pe({ ...e3, children: l3 });
69
+ return Re({ ...e3, children: l3 });
71
70
  }, [r2, n2, a2, o2]), c2 = V(() => 0 !== (o2.getCommand("formatTextRotateCustom")?.state() ?? 0), [i2]);
72
- 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 });
73
- })), lo = { Preset: "preset", Custom: "custom" }, io = { Start: "start", End: "end" }, so = {}, co = (e2, t2, o2, n2) => {
71
+ 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 });
72
+ })), co = { Preset: "preset", Custom: "custom" }, mo = { Start: "start", End: "end" }, po = {}, uo = (e2, t2, o2, n2) => {
74
73
  const a2 = e2 + "-" + t2 + "-" + o2 + (n2 ? "-server" : "");
75
- if (so[a2]) return so[a2];
74
+ if (po[a2]) return po[a2];
76
75
  const r2 = ((e3, t3, o3, n3) => {
77
76
  if ("undefined" == typeof document && !n3) return null;
78
77
  const a3 = n3 ? new n3() : document.createElement("canvas");
@@ -80,45 +79,45 @@ const oo = $(O((e2, t2) => {
80
79
  const r3 = a3.getContext("2d");
81
80
  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;
82
81
  })(e2, t2, o2, n2);
83
- return so[a2] = r2, r2;
84
- }, mo = {}, po = $((e2) => {
85
- const { className: t2, style: o2 = gt.EmptyCssProperties, white: n2 = "transparent", grey: a2 = "grey", size: r2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = mo, 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(${co(n2, a2, r2, s2?.canvas)}) center left` }, o2), [n2, a2, r2, s2]);
86
- return K(d2) ? W.cloneElement(d2, { ...m2.props }) : z("div", { style: p2, ...c2 });
87
- }), uo = $((e2) => {
88
- const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: a2, onKeyDown: r2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 = gt.EmptyCssProperties, children: c2, alphaWhite: m2, alphaGrey: p2, darkMode: u2, alphaCheckSize: h2 = 7, ...g2 } = e2;
82
+ return po[a2] = r2, r2;
83
+ }, go = {}, ho = $((e2) => {
84
+ 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]);
85
+ return G(d2) ? W.cloneElement(d2, { ...m2.props }) : z("div", { style: p2, ...c2 });
86
+ }), fo = $((e2) => {
87
+ 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;
89
88
  if (!t2) throw new Error("a selectedColor is required");
90
- const f2 = G((e3) => {
89
+ const f2 = K((e3) => {
91
90
  a2?.(e3), e3.isDefaultPrevented() || (e3.ctrlKey ? n2?.(t2.toRGBA()) : o2?.(t2.toRGBA()));
92
- }, [o2, n2, a2, t2]), x2 = G((e3) => {
91
+ }, [o2, n2, a2, t2]), x2 = K((e3) => {
93
92
  l2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
94
- }, [n2, l2, t2]), b2 = G((e3) => {
93
+ }, [n2, l2, t2]), b2 = K((e3) => {
95
94
  i2?.(e3), e3.isDefaultPrevented();
96
- }, [n2, i2]), y2 = G((e3) => {
95
+ }, [n2, i2]), y2 = K((e3) => {
97
96
  s2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
98
- }, [n2, s2, t2]), w2 = G((e3) => {
97
+ }, [n2, s2, t2]), w2 = K((e3) => {
99
98
  r2?.(e3), e3.isDefaultPrevented() || e3.keyCode === ft.Enter && o2?.(t2.toRGBA());
100
- }, [o2, r2, t2]), k2 = V(() => 1 === t2.toRGBA().alpha ? null : z(po, { size: h2, 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]);
101
- return L("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d2 }, tabIndex: 0, ...g2, onClick: f2, onKeyDown: w2, onMouseOver: x2, onMouseLeave: b2, onFocus: y2, children: [k2, z("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: t2.toCSS(u2) }, children: c2 })] });
102
- }), ho = $((o2) => {
103
- 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, ...h2 } = o2, g2 = new e({ val: l2.definition.val, adjs: l2.definition.adjs }, (e2) => n2(e2)), f2 = p2 ? g2.toRGBA().toString() : g2.toString(), x2 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, b2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, y2 = [];
99
+ }, [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]);
100
+ 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 })] });
101
+ }), xo = $((o2) => {
102
+ 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 = [];
104
103
  y2.push({ [t.AdjustmentType.Inv]: true }), y2.push({ [t.AdjustmentType.Alpha]: 100 });
105
- const w2 = g2.adjust(y2), k2 = G(() => {
104
+ const w2 = h2.adjust(y2), S2 = K(() => {
106
105
  i2?.(l2);
107
- }, [i2, l2]), S2 = G((e2) => {
106
+ }, [i2, l2]), k2 = K((e2) => {
108
107
  s2?.(e2 ? l2 : null);
109
108
  }, [s2, l2]);
110
- return z(Me, { 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" }, ...h2, children: L(uo, { selectedColor: g2, title: null, onSelectColor: k2, onPreviewColor: S2, 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" } })] }) }) });
111
- }), go = $((e2) => {
112
- const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = gt.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, swatchProps: m2, ...p2 } = e2;
109
+ return z(Me, { 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" } })] }) }) });
110
+ }), bo = $((e2) => {
111
+ 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;
113
112
  let u2;
114
113
  if (Array.isArray(n2[0])) u2 = n2;
115
114
  else {
116
115
  u2 = [];
117
116
  for (let e3 = 0; e3 < n2.length; e3++) u2.push([n2[e3]]);
118
117
  }
119
- const h2 = G((e3) => {
118
+ const g2 = K((e3) => {
120
119
  l2?.(e3);
121
- }, [l2]), g2 = G((e3) => {
120
+ }, [l2]), h2 = K((e3) => {
122
121
  i2?.(e3);
123
122
  }, [i2]), f2 = V(() => {
124
123
  let e3 = [];
@@ -126,29 +125,29 @@ const oo = $(O((e2, t2) => {
126
125
  let n3 = [], l3 = u2[t3];
127
126
  for (let e4 = 0; e4 < l3.length; e4++) {
128
127
  let i4 = l3[e4];
129
- n3.push(z(ho, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: h2, onPreviewColorDef: g2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
128
+ n3.push(z(xo, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
130
129
  }
131
- 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);
130
+ 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);
132
131
  e3.push(i3);
133
132
  }
134
133
  return e3;
135
- }, [u2, a2, r2, h2, g2]), 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]);
136
- 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 })] });
137
- }), fo = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), xo = (t2, o2, n2, a2, r2, l2) => {
138
- const i2 = fo(t2, o2);
134
+ }, [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]);
135
+ 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 })] });
136
+ }), yo = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), wo = (t2, o2, n2, a2, r2, l2) => {
137
+ const i2 = yo(t2, o2);
139
138
  a2?.push(i2);
140
139
  const s2 = new e({ val: i2.definition.val, adjs: i2.definition.adjs }, n2), d2 = s2.toString();
141
140
  r2?.set(d2, s2);
142
141
  const c2 = s2.toRGBA().toString();
143
142
  l2?.set(c2, s2);
144
- }, bo = W.lazy(() => import("./Dln5o1FP_HWPs0Uf.mjs")), yo = $(O((t2, a2) => {
145
- 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: h2, onDone: g2, onEyeDropStart: f2, onEyeDropStop: x2, onPreviewColor: b2, onPreviewColorImmediate: y2, onSelectColor: w2, autoColor: k2, autoColorLabel: S2 = "Automatic", autoColorPosition: C2 = io.Start, compareRGB: v2 = false, darkMode: T2 = false, ...P2 } = t2, R2 = l2 || r2, D2 = ht(b2, [b2]), M2 = ht(y2, [y2]), F2 = ht(w2, [w2]), B2 = ht(f2, [f2]), N2 = ht(x2, [x2]), [E2, A2] = U(false), I2 = Lt(), W2 = V(() => s2 || e.getDefaultSchemeLookup(), [s2]), $2 = V(() => {
143
+ }, So = W.lazy(() => import("./D1n7HgHfLVQZ0KhP.mjs")), ko = $(O((t2, a2) => {
144
+ 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]), M2 = gt(y2, [y2]), F2 = gt(w2, [w2]), N2 = gt(f2, [f2]), B2 = gt(x2, [x2]), [E2, A2] = U(false), I2 = zt(), W2 = V(() => s2 || e.getDefaultSchemeLookup(), [s2]), $2 = V(() => {
146
145
  const e2 = /* @__PURE__ */ new Map(), t3 = /* @__PURE__ */ new Map(), n2 = [];
147
- xo("Primary Background", "bg1", W2, n2, e2, t3), xo("Primary Text", "tx1", W2, n2, e2, t3), xo("Secondary Background", "bg2", W2, n2, e2, t3), xo("Secondary Text", "tx2", W2, n2, e2, t3), xo("Accent 1", "accent1", W2, n2, e2, t3), xo("Accent 2", "accent2", W2, n2, e2, t3), xo("Accent 3", "accent3", W2, n2, e2, t3), xo("Accent 4", "accent4", W2, n2, e2, t3), xo("Accent 5", "accent5", W2, n2, e2, t3), xo("Accent 6", "accent6", W2, n2, e2, t3);
146
+ 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);
148
147
  const a3 = o.buildPalette(n2, W2, e2, t3), r3 = [];
149
- if (xo("Dark Red", "C00000", W2, r3, e2, t3), xo("Red", "FF0000", W2, r3, e2, t3), xo("Orange", "FFC000", W2, r3, e2, t3), xo("Yellow", "FFFF00", W2, r3, e2, t3), xo("Light Green", "92D050", W2, r3, e2, t3), xo("Green", "00B050", W2, r3, e2, t3), xo("Light Blue", "00B0F0", W2, r3, e2, t3), xo("Blue", "0070C0", W2, r3, e2, t3), xo("Dark Blue", "002060", W2, r3, e2, t3), d2 ? xo("Purple Is A Fruit", "7030A0", W2, r3, e2, t3) : xo("Transparent", "00000000", W2, r3, e2, t3), k2) {
150
- const t4 = k2.toString();
151
- e2.set(t4, k2);
148
+ 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) {
149
+ const t4 = S2.toString();
150
+ e2.set(t4, S2);
152
151
  }
153
152
  const l3 = /* @__PURE__ */ new Map(), s3 = "function" == typeof i2 ? i2() : i2, c3 = [];
154
153
  for (let e3 = 0; s3 && e3 < s3.length; e3++) {
@@ -156,53 +155,53 @@ const oo = $(O((e2, t2) => {
156
155
  l3.set(t4, s3[e3]), c3.push({ description: "Recent " + (e3 + 1), definition: { val: s3[e3].toString() } });
157
156
  }
158
157
  return { primaryColors: n2, modifiedPresets: a3, standardColors: r3, recentColorsLimited: c3, mapAllPresets: e2, mapAllPresetsRGB: t3, mapRecent: l3 };
159
- }, [W2, i2, d2, k2]);
160
- j(() => {
161
- h2?.();
158
+ }, [W2, i2, d2, S2]);
159
+ _(() => {
160
+ g2?.();
162
161
  }, []);
163
- const [O2, K2] = U(false), q2 = G(() => {
164
- K2((e2) => !e2);
162
+ const [O2, G2] = U(false), q2 = K(() => {
163
+ G2((e2) => !e2);
165
164
  }, []);
166
- j(() => {
167
- if (m2) K2(m2 === lo.Custom);
165
+ _(() => {
166
+ if (m2) G2(m2 === co.Custom);
168
167
  else if (r2) {
169
168
  let e2 = r2.toString(), t3 = $2.mapAllPresets.get(e2);
170
169
  t3 || (e2 = r2.toRGBA().toString(), t3 = $2.mapAllPresetsRGB.get(e2));
171
170
  const o2 = $2.mapRecent.get(e2);
172
- K2(!t3 && !o2);
171
+ G2(!t3 && !o2);
173
172
  }
174
173
  }, [r2, m2]);
175
- const X2 = G(n.debounce((e2) => {
174
+ const X2 = K(n.debounce((e2) => {
176
175
  D2?.(e2);
177
176
  }, c2), [D2, c2]), [Z2, Y2] = U();
178
- j(() => {
177
+ _(() => {
179
178
  Y2(l2 || r2);
180
179
  }, [l2, r2]);
181
- const J2 = ht((e2) => {
180
+ const Q2 = gt((e2) => {
182
181
  M2 && (M2(e2), X2(e2));
183
- }, [M2]), re2 = ht((t3) => {
184
- J2(t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, W2) : null);
185
- }, [W2]), le2 = G((e2) => {
186
- e2.ctrlKey && K2(true);
187
- }, []), ie2 = ht((e2) => {
182
+ }, [M2]), re2 = gt((t3) => {
183
+ Q2(t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, W2) : null);
184
+ }, [W2]), le2 = K((e2) => {
185
+ e2.ctrlKey && G2(true);
186
+ }, []), ie2 = gt((e2) => {
188
187
  let t3 = false;
189
188
  if (e2) {
190
189
  const o2 = e2.toString();
191
190
  t3 = !$2.mapAllPresets.has(o2);
192
191
  }
193
192
  F2?.(e2, t3);
194
- }, [F2, $2]), se2 = ht((t3) => {
193
+ }, [F2, $2]), se2 = gt((t3) => {
195
194
  const o2 = t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, W2) : null;
196
- Promise.resolve(g2?.()).then(() => {
195
+ Promise.resolve(h2?.()).then(() => {
197
196
  ie2(o2);
198
197
  });
199
- }, [W2, g2]), de2 = ht((t3) => {
200
- J2(t3 ? new e(t3, W2) : null);
198
+ }, [W2, h2]), de2 = gt((t3) => {
199
+ Q2(t3 ? new e(t3, W2) : null);
201
200
  }, [W2]), ce2 = V(() => {
202
201
  if (void 0 === window.EyeDropper) return z(H, {});
203
202
  return z(te, { "aria-label": "eye dropper", size: "small", sx: { color: (e2) => e2.palette.text.icon ?? e2.palette.action.active }, onClick: async () => {
204
- A2(true), B2?.(), await new EyeDropper().open().then((t3) => {
205
- A2(false), N2?.();
203
+ A2(true), N2?.(), await new EyeDropper().open().then((t3) => {
204
+ A2(false), B2?.();
206
205
  let o2 = new e(t3.sRGBHex), n2 = o2.toString(), a3 = $2.mapAllPresets.get(n2);
207
206
  if (a3 || (n2 = o2.toRGBA().toString(), a3 = $2.mapAllPresetsRGB.get(n2)), !a3) {
208
207
  const e2 = o2.toRGBA(), t4 = 3;
@@ -212,7 +211,7 @@ const oo = $(O((e2, t2) => {
212
211
  i3 < t4 && i3 < n3 && (a3 = o3);
213
212
  });
214
213
  }
215
- K2(!a3), J2(a3 || o2);
214
+ G2(!a3), Q2(a3 || o2);
216
215
  }).catch((e2) => {
217
216
  A2(false), "AbortError" !== e2?.name && console.error(e2);
218
217
  });
@@ -220,69 +219,69 @@ const oo = $(O((e2, t2) => {
220
219
  }, [$2, T2]), me2 = V(() => {
221
220
  if (!O2) return;
222
221
  const e2 = { opacity: O2 ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
223
- return z(_, { fallback: z("div", { style: e2, children: z(Fe, {}) }), children: z(bo, { style: e2, selectedColor: R2 ? R2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
224
- }, [O2, R2]), pe2 = V(() => ({ onClick: le2, alphaGrey: I2.palette.text.icon ?? I2.palette.action.active }), [le2, I2]), ue2 = V(() => {
225
- if (!k2) return null;
226
- const e2 = { description: S2, definition: { val: k2.getVal(), adjs: k2.getAdjustments() } };
222
+ return z(j, { fallback: z("div", { style: e2, children: z(Fe, {}) }), children: z(So, { style: e2, selectedColor: P2 ? P2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
223
+ }, [O2, P2]), pe2 = V(() => ({ onClick: le2, alphaGrey: I2.palette.text.icon ?? I2.palette.action.active }), [le2, I2]), ue2 = V(() => {
224
+ if (!S2) return null;
225
+ const e2 = { description: k2, definition: { val: S2.getVal(), adjs: S2.getAdjustments() } };
227
226
  return z(H, { children: L(oe, { sx: { display: "flex", color: (e3) => e3.palette.text.secondary }, onMouseOver: () => {
228
227
  re2(null);
229
228
  }, onClick: () => {
230
229
  se2(null);
231
- }, children: [z(Q, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: z(ho, { schemeColorLookup: W2, colorDef: e2, selectedColor: null === r2 ? k2 : r2, previewColor: null === l2 ? k2 : 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: S2 })] }) });
232
- }, [k2, S2, W2, r2, l2]);
233
- return L(Q, { ref: a2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...P2, children: [L("div", { style: { position: "relative", display: "flex" }, children: [L("div", { style: { opacity: O2 ? "0" : 1 }, children: [ue2 && C2 === io.Start ? L(H, { children: [ue2, z(ne, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, z(go, { 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(go, { 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(go, { 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(go, { 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 === io.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: () => {
230
+ }, 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 })] }) });
231
+ }, [S2, k2, W2, r2, l2]);
232
+ 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: () => {
234
233
  q2();
235
234
  }, children: z("div", O2 ? { children: "Preset" } : { children: "Custom" }) }), z(ae, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
236
- Promise.resolve(g2?.()).then(() => {
235
+ Promise.resolve(h2?.()).then(() => {
237
236
  ie2(Z2);
238
237
  });
239
238
  }, children: "Done" })] })] });
240
- })), wo = z(xt, { iconKey: "circle.colored" }), ko = $(O((e2, t2) => {
241
- const { selectedColor: o2, quickColor: n2, icon: a2 = wo, tooltip: r2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Be.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: h2 = false, ...g2 } = e2, f2 = ht(i2, [i2]), x2 = ht(s2, [s2]), b2 = ht(d2, [d2]), [y2, w2] = U(() => {
242
- }), k2 = n2 || (y2 || o2) || m2?.autoColor, S2 = q(false), C2 = G(() => {
243
- }, []), v2 = ht(() => {
239
+ })), Co = z(xt, { iconKey: "circle.colored" }), vo = $(O((e2, t2) => {
240
+ 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] = U(() => {
241
+ }), S2 = n2 || (y2 || o2) || m2?.autoColor, k2 = q(false), C2 = K(() => {
242
+ }, []), v2 = gt(() => {
244
243
  w2(o2);
245
- }, [o2]), T2 = ht((e3) => {
246
- S2.current || (w2(e3), f2?.(e3));
247
- }, [f2]), P2 = ht((e3) => {
248
- S2.current || (w2(e3), x2?.(e3));
249
- }, [x2]), R2 = ht((e3, t3) => {
250
- S2.current || (w2(void 0), b2?.(e3, t3));
251
- }, [b2]), D2 = V(() => z(Q, { className: "color-wrapper", sx: { lineHeight: "0", color: "inherit", "--sxl-color-active": `${k2?.toCSS(h2) ?? "transparent"}`, "& .activeColor": { fill: `${k2?.toCSS(h2) ?? "transparent"}` }, "& .style_grey": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, children: "function" == typeof a2 ? a2() : a2 }), [k2, a2, h2]), M2 = ht((e3) => {
244
+ }, [o2]), T2 = gt((e3) => {
245
+ k2.current || (w2(e3), f2?.(e3));
246
+ }, [f2]), R2 = gt((e3) => {
247
+ k2.current || (w2(e3), x2?.(e3));
248
+ }, [x2]), P2 = gt((e3, t3) => {
249
+ k2.current || (w2(void 0), b2?.(e3, t3));
250
+ }, [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]), M2 = gt((e3) => {
252
251
  b2?.(n2, false);
253
- }, [b2, n2]), [F2, B2] = U(false), N2 = G((e3) => {
252
+ }, [b2, n2]), [F2, N2] = U(false), B2 = K((e3) => {
254
253
  const { closeFloat: t3, closeFloatAll: n3 } = e3;
255
- return z(yo, { ...m2, selectedColor: o2, previewColor: y2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
254
+ return z(ko, { ...m2, selectedColor: o2, previewColor: y2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
256
255
  e4.which === ft.Enter && (p2 ? n3() : t3());
257
- }, onPreviewColorImmediate: P2, onPreviewColor: T2, onSelectColor: R2, onEyeDropStart: () => B2(true), onEyeDropStop: () => B2(false), compareRGB: u2, darkMode: h2 });
258
- }, [o2, y2, p2, k2, m2?.autoColor, h2]), E2 = { onQuickClick: n2 ? M2 : void 0, createPopupPanel: N2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: v2, onPopupClose: C2, tooltip: r2 || l2 || "Color", label: l2, icon: D2, ...g2 };
259
- return c2 === Be.Toolbar ? z(Ne, { ref: t2, ...E2 }) : z(Ee, { ref: t2, ...E2 });
260
- })), So = 82, Co = (e2) => {
261
- const { styleColor: t2, length: o2 = So, width: n2 = 1, dashArray: a2 = null, sx: r2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...d2 } = e2;
256
+ }, onPreviewColorImmediate: R2, onPreviewColor: T2, onSelectColor: P2, onEyeDropStart: () => N2(true), onEyeDropStop: () => N2(false), compareRGB: u2, darkMode: g2 });
257
+ }, [o2, y2, p2, S2, m2?.autoColor, g2]), E2 = { onQuickClick: n2 ? M2 : void 0, createPopupPanel: B2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: v2, onPopupClose: C2, tooltip: r2 || l2 || "Color", label: l2, icon: D2, ...h2 };
258
+ return c2 === Ne.Toolbar ? z(Be, { ref: t2, ...E2 }) : z(Ee, { ref: t2, ...E2 });
259
+ })), To = 82, Ro = (e2) => {
260
+ 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;
262
261
  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(x, { length: o2, width: n2, dashArray: a2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
263
- }, vo = $(O((e2, t2) => {
264
- 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, h2 = ht(d2, []), g2 = G((e3) => {
262
+ }, Po = $(O((e2, t2) => {
263
+ 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) => {
265
264
  const { popupContainer: t3, floatReference: o3, closeFloat: l3, ...d3 } = e3, p3 = [], u3 = a.BuiltInDefinitionsArray;
266
265
  for (let e4 = 0; e4 < u3.length; e4++) {
267
266
  const t4 = u3[e4];
268
267
  if ("None" === t4.description && !c2) continue;
269
- const a2 = z(Co, { styleColor: i2, length: So, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
268
+ 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") });
270
269
  let d4 = null;
271
- 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(Ae, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ie(4) }, paddingLeft: "16px", background: `linear-gradient(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})` }, tooltipProps: { description: n2 ? "" : t4.description }, icon: null, disabled: r2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
272
- l3(), h2(t4.style);
270
+ 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(Ae, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ie(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: () => {
271
+ l3(), g2(t4.style);
273
272
  }, onKeyDown: (e5) => {
274
273
  e5.which === ft.Enter && l3();
275
274
  }, selected: t4.style === s2, parentFloat: o3, children: d4 }, e4));
276
275
  }
277
- return z(Q, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: p3 });
276
+ return z(J, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: p3 });
278
277
  }, [r2, c2, i2, s2, m2]), f2 = V(() => {
279
278
  const e3 = a.BuiltInDefinitions.get(s2);
280
279
  let t3;
281
- return t3 = "None" === e3.description ? z(Q, { sx: { minWidth: `${So}px` }, children: "None" }) : z(Co, { styleColor: i2, length: So, 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 });
282
- }, [s2, i2]), x2 = V(() => a.BuiltInDefinitions.get(s2), [s2]), b2 = { disabled: r2, icon: f2, tooltip: "Border Style: " + x2.description, sx: { background: `linear-gradient(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})`, ...p2 }, createPopupPanel: g2, ...u2 };
283
- return o2 === Be.Toolbar ? z(Ne, { ...b2 }) : z(Ee, { ...b2 });
284
- })), To = $(O((t2, o2) => {
285
- 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, ...h2 } = t2, g2 = ht(c2, [c2]), f2 = ht(m2, [m2]), [x2, y2] = U(), [w2, k2] = U(), S2 = x2 ?? l2, C2 = w2 ?? n2, v2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, T2 = ht((e2) => {
280
+ 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: Ie() } }, children: t3 });
281
+ }, [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 };
282
+ return o2 === Ne.Toolbar ? z(Be, { ...b2 }) : z(Ee, { ...b2 });
283
+ })), Do = $(O((t2, o2) => {
284
+ 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, y2] = U(), [w2, S2] = U(), k2 = x2 ?? l2, C2 = w2 ?? n2, v2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, T2 = gt((e2) => {
286
285
  const t3 = {}, o3 = e2 ? Object.keys(e2) : [];
287
286
  let n3 = false;
288
287
  const r3 = o3.length;
@@ -292,13 +291,13 @@ const oo = $(O((e2, t2) => {
292
291
  }
293
292
  o3.length < 6 && (n3 = true);
294
293
  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;
295
- let h3 = "";
296
- return i3 || l3 || (h3 += "M 3,5 H 5 V 3 H 3 "), i3 || (h3 += "M 7,5 H 9 V 3 H 7 "), i3 || m3 || (h3 += "M 11,5 h 2 V 3 h -2 "), i3 || (h3 += "M 15,5 h 2 V 3 h -2 "), i3 || d3 || (h3 += "M 19,5 h 2 V 3 h -2 "), l3 || (h3 += "M 3,9 H 5 V 7 H 3 "), m3 || (h3 += "M 11,9 h 2 V 7 h -2 "), d3 || (h3 += "M 19,9 h 2 V 7 h -2 "), p3 || l3 || (h3 += "M 3,13 H 5 V 11 H 3 "), p3 || (h3 += "M 7,13 H 9 V 11 H 7 "), p3 || m3 || (h3 += "M 11,13 h 2 v -2 h -2 "), p3 || d3 || (h3 += "M 19,13 h 2 v -2 h -2 "), p3 || (h3 += "M 15,13 h 2 v -2 h -2 "), l3 || (h3 += "M 3,17 H 5 V 15 H 3 "), m3 || (h3 += "M 11,17 h 2 v -2 h -2 "), d3 || (h3 += "M 19,17 h 2 v -2 h -2 "), c3 || l3 || (h3 += "M 3,21 H 5 V 19 H 3 "), c3 || (h3 += "M 7,21 H 9 V 19 H 7 "), c3 || m3 || (h3 += "M 11,21 h 2 v -2 h -2 "), c3 || (h3 += "M 15,21 h 2 v -2 h -2 "), c3 || d3 || (h3 += "M 19,21 h 2 v -2 h -2 "), L(xt, { 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: h3 }) }), 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: Le } }, children: z(b, { getBorderAt: (e3, n4) => {
294
+ let g3 = "";
295
+ 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(b, { getBorderAt: (e3, n4) => {
297
296
  if (!u2 || 0 === o3.length) return null;
298
297
  const a2 = e3.rowIndex, r4 = e3.colIndex, l4 = {};
299
298
  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);
300
299
  }, darkMode: s2, style: { top: "2px", left: "2px", width: "calc(100% - 5px)", height: "calc(100% - 5px)", position: "absolute" } }) })] })] });
301
- }, [C2, S2, s2]), P2 = G((e2, t3, o3) => {
300
+ }, [C2, k2, s2]), R2 = K((e2, t3, o3) => {
302
301
  let n3 = null;
303
302
  if (e2 && e2.length > 0) {
304
303
  let a2 = null;
@@ -307,79 +306,79 @@ const oo = $(O((e2, t2) => {
307
306
  for (let t4 = 0; t4 < r3; t4++) n3[e2[t4]] = a2;
308
307
  }
309
308
  return n3;
310
- }, []), R2 = G((e2) => {
311
- g2?.(e2);
312
- }, []), D2 = G((e2) => {
309
+ }, []), P2 = K((e2) => {
310
+ h2?.(e2);
311
+ }, []), D2 = K((e2) => {
313
312
  f2?.(e2);
314
- }, []), M2 = G((t3) => {
313
+ }, []), M2 = K((t3) => {
315
314
  const { closeFloatAll: o3, floatReference: l3 } = t3, c3 = (e2, t4, n3 = "bottom", r3 = false) => {
316
- const l4 = P2(e2, C2 ?? null, r3 ? a.StrokeStyle.None : S2 ?? null), i3 = r3 ? P2([], C2 ?? null, S2 ?? null) : l4;
317
- return z(ze, { icon: T2(i3), sx: { background: `linear-gradient(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})` }, tooltipProps: { label: t4, simple: true, placement: n3 }, onClick: () => {
318
- o3(), D2(l4), R2(l4);
315
+ const l4 = R2(e2, C2 ?? null, r3 ? a.StrokeStyle.None : k2 ?? null), i3 = r3 ? R2([], C2 ?? null, k2 ?? null) : l4;
316
+ 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: () => {
317
+ o3(), D2(l4), P2(l4);
319
318
  } });
320
- }, 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: Be.Toolbar, icon: z(xt, { iconKey: "stroke.colored" }), selectedColor: S2 === a.StrokeStyle.None ? new e("transparent") : C2, onPreviewColor: (e2) => {
321
- k2(e2);
319
+ }, 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) => {
320
+ S2(e2);
322
321
  }, onSelectColor: (e2, t4) => {
323
- k2(e2);
324
- }, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || S2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), z(vo, { selectedStyle: S2, onSelectStyle: y2, styleColor: C2, darkMode: s2, variant: Be.Toolbar, parentFloat: l3 })] }) });
325
- return L(Q, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [d2 ? p3 : m3, z(Te, { orientation: "horizontal" }), d2 ? m3 : p3] });
326
- }, [S2, C2, n2, r2, s2]), F2 = V(() => T2(v2), [v2, s2]);
327
- return z(Ne, { ref: o2, createPopupPanel: M2, popupProps: { popperProps: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => z(He, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
328
- g2?.(v2);
329
- }, quickButtonProps: { sx: {} }, disabled: i2, icon: F2, ...h2 });
330
- })), Po = $(O((e2, t2) => {
331
- 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: h2, label: g2, ...f2 } = e2, x2 = pt(o2, ["formatBorder"]), b2 = n2 ?? x2[0], y2 = b2?.context() ?? null, w2 = y2?.autoColor ?? i2, k2 = y2?.autoStyle ?? s2, S2 = m2 ?? y2?.quickBorder, C2 = u2 ?? y2?.darkMode, v2 = c2 ?? y2?.createTemporaryBorder, T2 = d2 ?? y2?.schemeLookup, P2 = ht((e3) => {
322
+ S2(e2);
323
+ }, 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: y2, styleColor: C2, darkMode: s2, variant: Ne.Toolbar, parentFloat: l3 })] }) });
324
+ 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] });
325
+ }, [k2, C2, n2, r2, s2]), F2 = V(() => T2(v2), [v2, s2]);
326
+ return z(Be, { ref: o2, createPopupPanel: M2, popupProps: { popperProps: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => z(He, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
327
+ h2?.(v2);
328
+ }, quickButtonProps: { sx: {} }, disabled: i2, icon: F2, ...g2 });
329
+ })), Mo = $(O((e2, t2) => {
330
+ 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) => {
332
331
  y2?.onBorderSelect && y2.onBorderSelect(e3), p2?.(e3), b2?.execute(e3, a2);
333
- }, [b2, p2, a2]), R2 = G((e3, t3) => {
332
+ }, [b2, p2, a2]), P2 = K((e3, t3) => {
334
333
  const { children: o3, title: n3, ...a3 } = e3;
335
334
  let i3 = e3.children;
336
335
  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 });
337
336
  }, [b2, l2]);
338
- return z(To, { ref: t2, autoColor: w2, darkMode: C2, autoStrokeStyle: k2, createTemporaryBorder: v2, schemeLookup: T2, selectedBorder: S2, onSelectBorder: P2, createTooltip: R2, disabled: l2 || !b2 || b2.disabled(), ...f2 });
339
- })), Ro = $(O((e2, t2) => {
340
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = G((e3, t3) => {
337
+ 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 });
338
+ })), Fo = $(O((e2, t2) => {
339
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
341
340
  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") })] });
342
- return Pe({ ...e3, children: l3 });
341
+ return Re({ ...e3, children: l3 });
343
342
  }, [r2, n2, a2]);
344
- return z(Re, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: "MergeAll", ...l2 });
345
- })), Do = $(O((e2, t2) => {
346
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = G((e3, t3) => {
343
+ return z(Pe, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: "MergeAll", ...l2 });
344
+ })), No = $(O((e2, t2) => {
345
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
347
346
  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") })] });
348
- return Pe({ ...e3, children: l3 });
347
+ return Re({ ...e3, children: l3 });
349
348
  }, [r2, n2, a2]);
350
- 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 });
351
- })), Mo = $(O((e2, t2) => {
352
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = G((e3, t3) => {
349
+ 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 });
350
+ })), Bo = $(O((e2, t2) => {
351
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
353
352
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("find") }), z(ve, { ...o3, command: t3.getCommand("findReplace") }), z(ve, { ...o3, command: t3.getCommand("goto") })] });
354
- return Pe({ ...e3, children: l3 });
353
+ return Re({ ...e3, children: l3 });
355
354
  }, [r2, n2, a2]);
356
- return z(Re, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: i2, label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find", ...l2 });
357
- })), Fo = $(O((e2, t2) => {
355
+ return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: i2, label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find", ...l2 });
356
+ })), Eo = $(O((e2, t2) => {
358
357
  const { command: o2, commandHook: n2, showQuickButtons: a2 = !!e2.commands, commands: l2, fontSizes: i2 = y.DefaultFontSizes, disabled: s2 = false, parentFloat: d2, icon: c2, label: m2, sx: p2, ...u2 } = e2;
359
358
  bt(o2);
360
- const h2 = () => o2?.state()?.toString() || "11", [g2, f2] = U(h2), x2 = ht(() => {
361
- const e3 = parseFloat(g2);
362
- isNaN(e3) ? f2(h2()) : parseFloat(h2()) !== e3 && o2.execute(e3, n2);
363
- }, [h2, o2, g2, n2]);
364
- j(() => {
365
- f2(h2());
359
+ const g2 = () => o2?.state()?.toString() || "11", [h2, f2] = U(g2), x2 = gt(() => {
360
+ const e3 = parseFloat(h2);
361
+ isNaN(e3) ? f2(g2()) : parseFloat(g2()) !== e3 && o2.execute(e3, n2);
362
+ }, [g2, o2, h2, n2]);
363
+ _(() => {
364
+ f2(g2());
366
365
  }, [o2?.state()]);
367
366
  const b2 = V(() => {
368
367
  if (!n2) return null;
369
368
  const e3 = { ...n2 };
370
369
  return delete e3.beforeExecute, e3;
371
- }, [n2]), w2 = pt(l2, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), k2 = V(() => w2 ? L(Q, { className: mt("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e3) => e3.stopPropagation(), children: [z(ve, { command: w2[0], commandHook: b2 }), z(ve, { command: w2[1], commandHook: b2 })] }) : null, [w2]), S2 = Lt(), C2 = V(() => `${r.getSharedMeasurer()("12.3", Math.round(S2.typography.fontSize), S2.typography.fontFamily).width}px`, [S2]), v2 = G((e3) => {
370
+ }, [n2]), w2 = pt(l2, ["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: b2 }), z(ve, { command: w2[1], commandHook: b2 })] }) : null, [w2]), k2 = zt(), C2 = V(() => `${r.getSharedMeasurer()("12.3", Math.round(k2.typography.fontSize), k2.typography.fontFamily).width}px`, [k2]), v2 = K((e3) => {
372
371
  const { onMouseDown: t3, onMouseUp: n3, ...a3 } = e3;
373
- return z(te, { component: "div", ...a3, disableRipple: true, children: z(le, { inputMode: "numeric", disabled: s2 || !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: g2, onFocus: (e4) => {
372
+ return z(te, { component: "div", ...a3, disableRipple: true, children: z(le, { inputMode: "numeric", disabled: s2 || !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: h2, onFocus: (e4) => {
374
373
  e4.target?.select();
375
374
  }, onKeyDown: (e4) => {
376
- if (e4.which === ft.Enter) h2() !== g2 && (e4.stopPropagation(), e4.preventDefault(), x2());
377
- else if (e4.which === ft.Escape) h2() !== g2 && (f2(h2()), setTimeout(() => {
375
+ if (e4.which === ft.Enter) g2() !== h2 && (e4.stopPropagation(), e4.preventDefault(), x2());
376
+ else if (e4.which === ft.Escape) g2() !== h2 && (f2(g2()), setTimeout(() => {
378
377
  e4.target?.select();
379
378
  }, 0), e4.stopPropagation(), e4.preventDefault());
380
379
  else {
381
380
  if (e4.key.match("[-]")) return e4.stopPropagation(), void e4.preventDefault();
382
- if (e4.key.match("[0-9.]") && (g2 + e4.key).length > 4) return e4.stopPropagation(), void e4.preventDefault();
381
+ if (e4.key.match("[0-9.]") && (h2 + e4.key).length > 4) return e4.stopPropagation(), void e4.preventDefault();
383
382
  if (e4.which === ft.Space) return void e4.preventDefault();
384
383
  }
385
384
  }, onBlur: () => {
@@ -388,7 +387,7 @@ const oo = $(O((e2, t2) => {
388
387
  if (e4.target.value.length > 4) return e4.stopPropagation(), void e4.preventDefault();
389
388
  f2(e4.target.value);
390
389
  } }) });
391
- }, [g2, s2, o2]), T2 = G((e3) => {
390
+ }, [h2, s2, o2]), T2 = K((e3) => {
392
391
  const t3 = (e4) => {
393
392
  o2?.execute(e4, n2);
394
393
  }, a3 = o2?.state(), r2 = [];
@@ -400,13 +399,13 @@ const oo = $(O((e2, t2) => {
400
399
  0 === o3.button && t3(i2[e4]);
401
400
  }, onKeyDown: (o3) => {
402
401
  o3.keyCode !== ft.Enter && o3.keyCode !== ft.Space || t3(i2[e4]);
403
- }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: z(Q, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: i2[e4] }) }, "fontSize-" + e4));
402
+ }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: z(J, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: i2[e4] }) }, "fontSize-" + e4));
404
403
  }
405
- const l3 = L(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...u2, children: [k2, z(Te, { orientation: "horizontal" }), z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 })] });
406
- return Pe({ ...e3, children: l3 });
404
+ const l3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...u2, children: [S2, z(Te, { orientation: "horizontal" }), z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 })] });
405
+ return Re({ ...e3, children: l3 });
407
406
  }, [s2, o2?.state(), n2]);
408
- return z(Ne, { ref: t2, sx: { ...p2 }, tabIndex: -1, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: T2, createTooltip: ({ children: e3 }, t3) => z(He, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: v2, ...u2 });
409
- })), Bo = $((e2) => {
407
+ return z(Be, { ref: t2, sx: { ...p2 }, tabIndex: -1, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: T2, createTooltip: ({ children: e3 }, t3) => z(He, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: v2, ...u2 });
408
+ })), Ao = $((e2) => {
410
409
  const { selected: t2, disabled: o2, formattedValue: n2, handleSetFormat: a2, format: r2, sx: i2, ...s2 } = e2;
411
410
  return z(Ae, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...i2 }, disabled: o2, selected: t2, icon: t2 ? z($e, {}) : void 0, onMouseDown: (e3) => {
412
411
  0 === e3.button && e3.preventDefault();
@@ -414,13 +413,13 @@ const oo = $(O((e2, t2) => {
414
413
  0 === e3.button && a2(r2.numberFormat);
415
414
  }, onKeyDown: (e3) => {
416
415
  e3.keyCode !== ft.Enter && e3.keyCode !== ft.Space || a2(r2.numberFormat);
417
- }, ...s2, children: L(Q, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [L(ee, { component: "div", children: [r2.formatType, r2.formatType === l.Type.Custom ? "…" : ""] }), z(ee, { variant: "caption", component: "div", sx: { color: (e3) => $t(e3.palette.text.primary, 0.6), paddingTop: n2 && n2.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: n2 && n2.length > 0 ? n2 : " " })] }) });
418
- }), No = $(O((e2, t2) => {
416
+ }, ...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 === l.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 : " " })] }) });
417
+ }), Io = $(O((e2, t2) => {
419
418
  const { commands: o2, commandHook: n2, scope: a2, sx: i2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = pt(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? l.Styles.lookupStyle(m2?.state()).formatType : l.Type.General, u2 = V(() => {
420
419
  if (!n2) return null;
421
420
  const e3 = { ...n2 };
422
421
  return delete e3.beforeExecute, e3;
423
- }, [n2]), h2 = G((e3, t3) => {
422
+ }, [n2]), g2 = K((e3, t3) => {
424
423
  const o3 = (e4) => {
425
424
  n2?.beforeExecute?.(m2, m2?.state()), m2.execute(e4, n2), n2?.onExecute?.(m2, m2?.state());
426
425
  }, r2 = m2?.context()(), i3 = l.Styles.lookupPrimary(), d3 = [];
@@ -433,101 +432,101 @@ const oo = $(O((e2, t2) => {
433
432
  }
434
433
  "" === t4 && i3[e4].formatType === l.Type.General && (t4 = "No specific format");
435
434
  const n3 = i3[e4].formatType === p2;
436
- d3.push(z(Bo, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
435
+ d3.push(z(Ao, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
437
436
  }
438
- const h3 = { numberFormat: "", formatType: l.Type.Custom }, g3 = p2 === l.Type.Custom, f3 = z(Bo, { selected: g3, disabled: s2 || !m2 || m2.disabled(), formattedValue: g3 ? r2.getNumberFormat().displayText : "", handleSetFormat: () => {
437
+ const g3 = { numberFormat: "", formatType: l.Type.Custom }, h3 = p2 === l.Type.Custom, f3 = z(Ao, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? r2.getNumberFormat().displayText : "", handleSetFormat: () => {
439
438
  n2?.beforeExecute?.(m2, m2?.state()), t3.getCommand("formatNumberDialog")?.execute(m2?.state()), n2?.onExecute?.(m2, m2?.state());
440
- }, format: h3, sx: { flex: "0", width: "100%" } }, l.Type.Custom), x2 = L(Q, { 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(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...c2, children: [x2, z(Te, { orientation: "horizontal" }), z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(Te, { orientation: "horizontal" }), f3] });
441
- return Pe({ ...e3, children: b2 });
442
- }, [m2?.context(), m2?.state(), n2, a2]), g2 = Lt(), f2 = V(() => {
439
+ }, format: g3, sx: { flex: "0", width: "100%" } }, l.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] });
440
+ return Re({ ...e3, children: b2 });
441
+ }, [m2?.context(), m2?.state(), n2, a2]), h2 = zt(), f2 = V(() => {
443
442
  const e3 = l.Type.MediumTime;
444
- return `${r.getSharedMeasurer()(e3, Math.round(g2.typography.fontSize), g2.typography.fontFamily).width}px`;
445
- }, [g2]);
446
- return z(Re, { ref: t2, commands: o2, sx: i2, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: h2, createTooltip: ({ children: e3 }, t3) => z(He, { 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 });
447
- })), Eo = $(O((e2, t2) => {
448
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = G((e3, t3) => {
443
+ return `${r.getSharedMeasurer()(e3, Math.round(h2.typography.fontSize), h2.typography.fontFamily).width}px`;
444
+ }, [h2]);
445
+ return z(Pe, { ref: t2, commands: o2, sx: i2, 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 });
446
+ })), Lo = $(O((e2, t2) => {
447
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
449
448
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "clear", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("clearAll") }), z(ve, { ...o3, command: t3.getCommand("clearFormats") }), z(ve, { ...o3, command: t3.getCommand("clearContents") }), z(ve, { ...o3, command: t3.getCommand("clearComments") }), z(ve, { ...o3, command: t3.getCommand("clearHyperlinks") })] });
450
- return Pe({ ...e3, children: a3 });
449
+ return Re({ ...e3, children: a3 });
451
450
  }, [r2, n2, a2]);
452
- return z(Re, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", createPopupPanel: i2, icon: "ClearAll", ...l2 });
453
- })), Ao = $(O((e2, t2) => {
454
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = G((e3, t3) => {
451
+ return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", createPopupPanel: i2, icon: "ClearAll", ...l2 });
452
+ })), Ho = $(O((e2, t2) => {
453
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
455
454
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "fill", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("fillDown") }), z(ve, { ...o3, command: t3.getCommand("fillRight") }), z(ve, { ...o3, command: t3.getCommand("fillUp") }), z(ve, { ...o3, command: t3.getCommand("fillLeft") })] });
456
- return Pe({ ...e3, children: a3 });
455
+ return Re({ ...e3, children: a3 });
457
456
  }, [r2, n2, a2]);
458
- return z(Re, { ref: t2, commands: o2, disabled: r2, commandHook: n2, label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", createPopupPanel: i2, icon: "FillDown", ...l2 });
459
- })), Io = $(O((e2, t2) => {
457
+ return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", createPopupPanel: i2, icon: "FillDown", ...l2 });
458
+ })), zo = $(O((e2, t2) => {
460
459
  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 = pt(o2, ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"]), { singleCommand: p2, allDisabled: u2 } = V(() => {
461
460
  let e3 = null, t3 = 0;
462
461
  for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && d2 === ut.Menuitem && (e3 = 0 === t3 ? m2[o3] : null), t3++);
463
462
  return { singleCommand: e3, allDisabled: 0 === t3 };
464
- }, [m2]), h2 = G((e3, t3) => {
463
+ }, [m2]), g2 = K((e3, t3) => {
465
464
  let o3 = null;
466
465
  const a3 = { variant: ut.Menuitem, commandHook: n2, scope: "insertCells", disabled: r2 };
467
466
  l2 || (o3 = L(H, { children: [z(Te, { orientation: "horizontal" }), z(ve, { ...a3, command: t3.getCommand("addSheet") })] }));
468
467
  const i3 = L(H, { children: [z(ve, { ...a3, command: m2[0] }), z(ve, { ...a3, command: m2[1] }), z(Te, { orientation: "horizontal" }), z(ve, { ...a3, command: m2[2] }), z(ve, { ...a3, command: m2[3] }), o3] });
469
- return Pe({ ...e3, children: i3 });
468
+ return Re({ ...e3, children: i3 });
470
469
  }, [r2, m2, n2, a2]);
471
- return p2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: p2, ...c2 }) : z(Re, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || u2, 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 });
472
- })), Lo = $(O((e2, t2) => {
470
+ return p2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: p2, ...c2 }) : z(Pe, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || u2, 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: g2, ...c2 });
471
+ })), Wo = $(O((e2, t2) => {
473
472
  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 = pt(o2, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: p2, allDisabled: u2 } = V(() => {
474
473
  let e3 = null, t3 = 0;
475
474
  for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && d2 === ut.Menuitem && (e3 = 0 === t3 ? m2[o3] : null), t3++);
476
475
  return { singleCommand: e3, allDisabled: 0 === t3 };
477
- }, [m2]), h2 = G((e3, t3) => {
476
+ }, [m2]), g2 = K((e3, t3) => {
478
477
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "deleteCells", disabled: r2 };
479
478
  let a3 = null;
480
479
  l2 || (a3 = L(H, { children: [z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("deleteSheet") })] }));
481
480
  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] });
482
- return Pe({ ...e3, children: i3 });
481
+ return Re({ ...e3, children: i3 });
483
482
  }, [r2, n2, a2]);
484
- return p2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: p2, ...c2 }) : z(Re, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || u2, 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 });
485
- })), Ho = $(O((t2, o2) => {
486
- 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: h2, schemeLookup: g2, recentColors: f2, ...x2 } = d2;
483
+ return p2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: p2, ...c2 }) : z(Pe, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || u2, 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: g2, ...c2 });
484
+ })), $o = $(O((t2, o2) => {
485
+ 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;
487
486
  if (u2.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
488
487
  bt(n2);
489
488
  const b2 = n2?.context();
490
489
  let y2 = s2 ?? b2?.quickColor;
491
490
  c2 && !y2 && (y2 = new e("transparent"));
492
- const w2 = h2 ?? b2?.autoColor, k2 = g2 ?? b2?.schemeLookup, S2 = f2 ?? b2?.recentColors, C2 = m2 ?? b2?.darkMode, v2 = V(() => ({ autoColor: w2, schemeLookup: k2, recentColors: S2, darkMode: C2, ...x2 }), [w2, k2, S2, C2]), T2 = ht((e2, t3) => {
491
+ 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) => {
493
492
  e2 && t3 && b2?.addRecentColor && b2.addRecentColor(e2), b2?.onColorSelect && b2.onColorSelect(e2), r2?.(e2, t3), n2?.execute(e2, a2);
494
- }, [n2, r2, a2, b2]), P2 = G((e2, t3) => {
493
+ }, [n2, r2, a2, b2]), R2 = K((e2, t3) => {
495
494
  const { children: o3, title: a3, ...r3 } = e2;
496
495
  let s3 = e2.children;
497
496
  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 });
498
497
  }, [n2, l2]);
499
- return z(ko, { ref: o2, panelProps: v2, icon: p2, quickColor: y2, selectedColor: n2?.state(), onSelectColor: T2, variant: i2 === ut.Menuitem ? Be.Menuitem : Be.Toolbar, createTooltip: P2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: C2, ...u2 });
498
+ return z(vo, { ref: o2, panelProps: v2, icon: p2, 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 });
500
499
  }));
501
- Ho.displayName = "ColorCommandButton";
502
- const zo = $(O((e2, t2) => {
503
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = G((e3, t3) => {
504
- 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(Ho, { ...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") })] });
505
- return Pe({ ...e3, children: l3 });
500
+ $o.displayName = "ColorCommandButton";
501
+ const Oo = $(O((e2, t2) => {
502
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = K((e3, t3) => {
503
+ 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($o, { ...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") })] });
504
+ return Re({ ...e3, children: l3 });
506
505
  }, [r2, n2]);
507
- 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 });
508
- })), Wo = $(O((e2, t2) => {
509
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = G((e3, t3) => {
506
+ 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(Oe, { command: s2[0], scope: "view" }), ...i2 });
507
+ })), Vo = $(O((e2, t2) => {
508
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
510
509
  const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = t3.getCommand("sortCustom"), l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("sortAscending") }), z(ve, { ...o3, command: t3.getCommand("sortDescending") }), a3 ? z(ve, { ...o3, command: a3 }) : null, z(Te, { orientation: "horizontal" }), 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") })] });
511
- return Pe({ ...e3, children: l3 });
510
+ return Re({ ...e3, children: l3 });
512
511
  }, [r2, n2, a2]);
513
- return z(Re, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Sort", 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: "SortIncrease", ...l2 });
514
- })), $o = $(O((e2, t2) => {
515
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = G((e3, t3) => {
512
+ return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Sort", 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: "SortIncrease", ...l2 });
513
+ })), Ko = $(O((e2, t2) => {
514
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
516
515
  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") })] });
517
- return Pe({ ...e3, children: a3 });
516
+ return Re({ ...e3, children: a3 });
518
517
  }, [r2, n2, a2]);
519
- 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 });
520
- })), Oo = $(O((e2, t2) => {
518
+ 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 });
519
+ })), Go = $(O((e2, t2) => {
521
520
  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];
522
521
  !a2 && r2 && p2.push("redo");
523
- const u2 = pt(c2, p2), h2 = u2[0], g2 = u2[1], f2 = l2 ?? h2?.context?.()?.undoManager;
522
+ const u2 = pt(c2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
524
523
  let x2 = d2;
525
- d2 || (x2 = !h2 || h2.disabled(), g2 && !g2.disabled() && (x2 = false));
526
- const [b2, y2] = U(0), w2 = G((e3, t3) => {
527
- let o3 = 0 === b2 ? "Cancel" : `${h2.label()} ${b2} Action${1 === b2 ? "" : "s"}`, n3 = false;
524
+ d2 || (x2 = !g2 || g2.disabled(), h2 && !h2.disabled() && (x2 = false));
525
+ const [b2, y2] = U(0), w2 = K((e3, t3) => {
526
+ let o3 = 0 === b2 ? "Cancel" : `${g2.label()} ${b2} Action${1 === b2 ? "" : "s"}`, n3 = false;
528
527
  f2 || (n3 = true), n3 || (n3 = r2 ? !f2.hasRedo() && !f2.hasUndo() : !f2.hasRedo());
529
528
  const l3 = (e4) => {
530
- h2.execute(e4);
529
+ g2.execute(e4);
531
530
  }, i3 = z(Ae, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: n3 ? void 0 : "0 0", minWidth: "180px" }, icon: z(xt, {}), onMouseEnter: () => {
532
531
  y2(0);
533
532
  }, onMouseDown: (e4) => {
@@ -549,32 +548,32 @@ const zo = $(O((e2, t2) => {
549
548
  0 === t5.button && l3(e4 + 1);
550
549
  }, onKeyDown: (t5) => {
551
550
  t5.isDefaultPrevented() || t5.keyCode !== ft.Enter && t5.keyCode !== ft.Space || l3(e4 + 1);
552
- }, children: L(Q, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [z(ee, { component: "div", children: t4 }), z(xt, {})] }) }, `action:${e4}`));
551
+ }, 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}`));
553
552
  }
554
553
  let c3 = null;
555
554
  if (!a2 && r2) {
556
555
  const o4 = { scope: "undo", commands: t3, variant: ut.Menuitem, parentFloat: e3.floatReference };
557
- c3 = [], c3.push(z(Oo, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(z(Te, { orientation: "horizontal" }, "action:redo-div"));
556
+ c3 = [], c3.push(z(Go, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(z(Te, { orientation: "horizontal" }, "action:redo-div"));
558
557
  }
559
- const m3 = L(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
558
+ const m3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
560
559
  e3.closeFloatAll();
561
560
  }, onMouseLeave: () => {
562
561
  y2(0);
563
- }, children: [c3, z(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(Te, { orientation: "horizontal" }), i3] });
564
- return Pe({ ...e3, children: m3 });
565
- }, [h2?.context(), h2?.state(), i2, f2, b2, x2]);
566
- return z(Re, { ref: t2, commands: c2, quickCommand: o2, scope: i2, disabled: x2, label: h2?.label() ?? (a2 ? "Redo" : "Undo"), tooltip: z(H, { children: z("span", { children: `${h2?.label() ?? "No"} last actions.` }) }), createPopupPanel: w2, icon: n2 ?? (a2 ? "Redo" : "Undo"), selected: false, ...m2 });
567
- })), Vo = i.getFontList(), Go = /* @__PURE__ */ new Map();
568
- for (let e2 = 0; e2 < Vo.length; e2++) Go.set(Vo[e2].fontRef.getFamily(), Vo[e2]);
569
- const Ko = $(O((e2, t2) => {
562
+ }, children: [c3, z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(Te, { orientation: "horizontal" }), i3] });
563
+ return Re({ ...e3, children: m3 });
564
+ }, [g2?.context(), g2?.state(), i2, f2, b2, x2]);
565
+ 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 });
566
+ })), Uo = i.getFontList(), _o = /* @__PURE__ */ new Map();
567
+ for (let e2 = 0; e2 < Uo.length; e2++) _o.set(Uo[e2].fontRef.getFamily(), Uo[e2]);
568
+ const jo = $(O((e2, t2) => {
570
569
  const { command: o2, commandHook: n2, sx: a2, disabled: l2 = false, parentFloat: i2, icon: s2, label: d2, ...c2 } = e2;
571
570
  bt(o2);
572
- const m2 = o2?.state(), p2 = Lt(), u2 = V(() => `${r.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), h2 = G((e3) => {
571
+ const m2 = o2?.state(), p2 = zt(), u2 = V(() => `${r.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = K((e3) => {
573
572
  const t3 = (e4) => {
574
573
  o2?.execute(e4, n2);
575
574
  }, a3 = [];
576
- for (let e4 = 0; e4 < Vo.length; e4++) a3.push({ key: Vo[e4].fontRef.getFamily(), description: Vo[e4].fontRef.getFamily() });
577
- Go.get(m2) || a3.unshift({ key: m2, description: m2 });
575
+ for (let e4 = 0; e4 < Uo.length; e4++) a3.push({ key: Uo[e4].fontRef.getFamily(), description: Uo[e4].fontRef.getFamily() });
576
+ _o.get(m2) || a3.unshift({ key: m2, description: m2 });
578
577
  const r2 = [];
579
578
  for (let e4 = 0; e4 < a3.length; e4++) {
580
579
  const n3 = a3[e4].key === m2;
@@ -584,99 +583,99 @@ const Ko = $(O((e2, t2) => {
584
583
  0 === e5.button && e5.preventDefault();
585
584
  }, onKeyDown: (o3) => {
586
585
  o3.keyCode !== ft.Enter && o3.keyCode !== ft.Space || t3(a3[e4].key);
587
- }, children: z(Q, { 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));
586
+ }, 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));
588
587
  }
589
- 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: r2 }) });
590
- return Pe({ ...e3, children: i3 });
588
+ 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: r2 }) });
589
+ return Re({ ...e3, children: i3 });
591
590
  }, [l2, o2?.state()]);
592
- return z(Ne, { ref: t2, sx: { ...a2 }, outlined: true, disabled: l2, parentFloat: i2, createPopupPanel: h2, createTooltip: ({ children: e3 }, t3) => z(He, { 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 });
593
- })), Uo = $(O((e2, t2) => {
591
+ return z(Be, { ref: t2, sx: { ...a2 }, outlined: true, disabled: l2, 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 });
592
+ })), qo = $(O((e2, t2) => {
594
593
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), s2 = V(() => {
595
594
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3];
596
595
  return i2[0];
597
- }, [i2]), d2 = G((e3, t3) => {
596
+ }, [i2]), d2 = K((e3, t3) => {
598
597
  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") })] });
599
- return Pe({ ...e3, children: a3 });
598
+ return Re({ ...e3, children: a3 });
600
599
  }, [r2, n2, a2]);
601
- 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 });
602
- })), jo = $(O((e2, t2) => {
600
+ 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 });
601
+ })), Xo = $(O((e2, t2) => {
603
602
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = V(() => {
604
603
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3];
605
604
  return i2[0];
606
- }, [i2]), d2 = G((e3, t3) => {
605
+ }, [i2]), d2 = K((e3, t3) => {
607
606
  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") })] });
608
- return Pe({ ...e3, children: a3 });
607
+ return Re({ ...e3, children: a3 });
609
608
  }, [r2, n2, a2]);
610
- 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 });
611
- })), _o = $(O((e2, t2) => {
612
- const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = ht((e3, t3) => {
609
+ 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 });
610
+ })), Zo = $(O((e2, t2) => {
611
+ const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = gt((e3, t3) => {
613
612
  const o3 = { variant: ut.Menuitem, commandHook: a2, scope: "paste", disabled: i2 }, n3 = [];
614
- 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" })), Pe({ ...e3, children: n3 });
613
+ 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 });
615
614
  }, [i2, a2, r2, l2]);
616
- 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", icon: "paste", ...s2 });
617
- })), qo = $(O((e2, t2) => {
618
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = G((e3, t3) => {
615
+ 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", icon: "paste", ...s2 });
616
+ })), Yo = $(O((e2, t2) => {
617
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = K((e3, t3) => {
619
618
  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") })] });
620
- return Pe({ ...e3, children: l3 });
619
+ return Re({ ...e3, children: l3 });
621
620
  }, [r2, n2, a2]);
622
- 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 });
623
- })), Xo = $(O((e2, t2) => {
624
- const { commands: o2, commandHook: n2, scope: a2 = "view", disabled: r2 = false, ...l2 } = e2, i2 = G((e3) => {
621
+ 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(Oe, { command: s2[0], scope: "view" }), ...i2 });
622
+ })), Qo = $(O((e2, t2) => {
623
+ const { commands: o2, commandHook: n2, scope: a2 = "view", disabled: r2 = false, ...l2 } = e2, i2 = K((e3) => {
625
624
  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") })] });
626
- return Pe({ ...e3, children: l3 });
625
+ return Re({ ...e3, children: l3 });
627
626
  }, [r2, o2, n2, a2]);
628
- 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 });
629
- })), Zo = $(O((e2, t2) => {
630
- const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: c2, ...m2 } = e2, p2 = V(() => r2({ value: o2, style: n2 }), [o2, n2, r2]), u2 = V(() => p2.getStyle(), [p2, l2]), h2 = V(() => u2.getFill().toCSS(l2?.darkMode ?? false), [u2]), g2 = u2.getInsets(), f2 = u2.getFont(), x2 = G(() => u2.getBorder(), [u2]);
631
- return z(Q, { ref: t2, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter: c2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...h2 }, "& .text": { flex: "1 1 100%", ...f2.toCSS(l2?.darkMode ?? false, 1), boxSizing: "border-box", padding: `${g2.top}px ${g2.right}px ${g2.bottom}px ${g2.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: f2.toCSS().textDecoration, textAlign: d.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: z(b, { 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 }) }) }) });
632
- })), Yo = $((e2) => {
633
- const { styles: t2, namedStyle: o2, selectedNamed: n2, hasContextMenu: a2 = true, bodyStyle: r2, onSelectNamed: l2, createTemporaryCell: i2, parentFloat: d2, commands: c2, disabled: m2, commandHook: p2, ...u2 } = e2, h2 = G((e3) => {
627
+ 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(Oe, { icon: null, label: "Workbook View" }), ...l2 });
628
+ })), Jo = $(O((e2, t2) => {
629
+ const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: c2, ...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]);
630
+ return z(J, { ref: t2, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter: c2 ? "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: d.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: z(b, { 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 }) }) }) });
631
+ })), en = $((e2) => {
632
+ const { styles: t2, namedStyle: o2, selectedNamed: n2, hasContextMenu: a2 = true, bodyStyle: r2, onSelectNamed: l2, createTemporaryCell: i2, parentFloat: d2, commands: c2, disabled: m2, commandHook: p2, ...u2 } = e2, g2 = K((e3) => {
634
633
  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() === s.BuiltInName.Normal })] });
635
- return Pe({ ...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 }) }) });
636
- }, []), g2 = o2?.getName() === n2?.getName();
637
- let f2 = z(ze, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${g2 ? e3.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o2.getName(), placement: "bottom-start" }, disabled: m2, icon: null, onClick: () => {
634
+ 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 }) }) });
635
+ }, []), h2 = o2?.getName() === n2?.getName();
636
+ 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: () => {
638
637
  l2?.(o2);
639
- }, ...u2, children: z(Zo, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
640
- return a2 && (f2 = z(Ge, { label: o2.getName(), parentFloat: d2, createPopupPanel: h2, children: f2 })), f2;
641
- }), Jo = $(O((e2, t2) => {
638
+ }, ...u2, children: z(Jo, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
639
+ return a2 && (f2 = z(Ke, { label: o2.getName(), parentFloat: d2, createPopupPanel: g2, children: f2 })), f2;
640
+ }), tn = $(O((e2, t2) => {
642
641
  const { commands: o2, command: n2, commandHook: a2, selectedNamed: l2, onSelectNamed: i2, disabled: d2 = false, bodyStyle: c2, usePreviewIcon: m2 = true, ...p2 } = e2;
643
642
  bt(n2);
644
- const u2 = n2?.context(), h2 = u2?.styles, g2 = l2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), x2 = ht((e3) => {
643
+ const u2 = n2?.context(), g2 = u2?.styles, h2 = l2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), x2 = gt((e3) => {
645
644
  i2?.(e3), n2?.execute(e3, a2);
646
- }, [n2, i2, a2]), b2 = G((e3, t3) => {
647
- const n3 = { onSelectNamed: x2, styles: h2(), parentFloat: e3.floatReference }, r2 = h2().getCustomNamed(), l3 = /* @__PURE__ */ new Map(), i3 = [];
648
- for (let e4 = 0; e4 < r2.length; e4++) l3.set(r2[e4].getName(), r2[e4]), null === h2().getNamed(r2[e4].getName()).getBuiltInID() && i3.push(r2[e4].getName());
645
+ }, [n2, i2, a2]), b2 = K((e3, t3) => {
646
+ const n3 = { onSelectNamed: x2, styles: g2(), parentFloat: e3.floatReference }, r2 = g2().getCustomNamed(), l3 = /* @__PURE__ */ new Map(), i3 = [];
647
+ for (let e4 = 0; e4 < r2.length; e4++) l3.set(r2[e4].getName(), r2[e4]), null === g2().getNamed(r2[e4].getName()).getBuiltInID() && i3.push(r2[e4].getName());
649
648
  const c3 = (e4) => {
650
649
  let t4 = l3.get(e4);
651
- return t4 || (t4 = h2().getNamed(e4)), !t4 || t4.isHidden() ? null : z(Yo, { namedStyle: t4, selectedNamed: g2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: a2, ...n3 }, e4);
650
+ 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);
652
651
  }, m3 = (e4, t4, o3 = true) => {
653
652
  const n4 = [];
654
653
  for (let e5 = 0; e5 < t4.length; e5++) {
655
654
  const o4 = c3(t4[e5]);
656
655
  o4 && n4.push(o4);
657
656
  }
658
- return 0 === n4.length ? null : L(Q, { children: [o3 ? z(Te, { 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);
657
+ return 0 === n4.length ? null : L(J, { children: [o3 ? z(Te, { orientation: "horizontal" }) : null, z(Ve, { children: e4 }, e4 + "-header"), z(J, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: n4 }, e4 + "-presets")] }, e4);
659
658
  }, p3 = (e4, t4) => {
660
659
  const o3 = [];
661
660
  for (let e5 = 0; e5 < t4.length; e5++) {
662
661
  const n4 = c3(t4[e5]);
663
662
  n4 && o3.push(n4);
664
663
  }
665
- 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");
664
+ 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");
666
665
  }, f3 = [];
667
666
  f3.push(m3("Custom", i3, false)), f3.push(m3("Good, Bad and Neutral", [s.BuiltInName.Normal, s.BuiltInName.Bad, s.BuiltInName.Good, s.BuiltInName.Neutral], i3.length > 0)), f3.push(m3("Data and Model", [s.BuiltInName.Calculation, s.BuiltInName.CheckCell, s.BuiltInName.ExplanatoryText, s.BuiltInName.FollowedHyperlink, s.BuiltInName.Hyperlink, s.BuiltInName.Input, s.BuiltInName.LinkedCell, s.BuiltInName.Note, s.BuiltInName.Output, s.BuiltInName.WarningText])), f3.push(m3("Titles and Headings", [s.BuiltInName.Heading1, s.BuiltInName.Heading2, s.BuiltInName.Heading3, s.BuiltInName.Heading4, s.BuiltInName.Title, s.BuiltInName.Total]));
668
667
  let b3 = [];
669
668
  var y3, w3;
670
- return b3.push(p3("Accent 1", [s.BuiltInName.Accent1_20, s.BuiltInName.Accent1_40, s.BuiltInName.Accent1_60, s.BuiltInName.Accent1])), b3.push(p3("Accent 2", [s.BuiltInName.Accent2_20, s.BuiltInName.Accent2_40, s.BuiltInName.Accent2_60, s.BuiltInName.Accent2])), b3.push(p3("Accent 3", [s.BuiltInName.Accent3_20, s.BuiltInName.Accent3_40, s.BuiltInName.Accent3_60, s.BuiltInName.Accent3])), b3.push(p3("Accent 4", [s.BuiltInName.Accent4_20, s.BuiltInName.Accent4_40, s.BuiltInName.Accent4_60, s.BuiltInName.Accent4])), b3.push(p3("Accent 5", [s.BuiltInName.Accent5_20, s.BuiltInName.Accent5_40, s.BuiltInName.Accent5_60, s.BuiltInName.Accent5])), b3.push(p3("Accent 6", [s.BuiltInName.Accent6_20, s.BuiltInName.Accent6_40, s.BuiltInName.Accent6_60, s.BuiltInName.Accent6])), f3.push((y3 = "Themed Cell Styles", w3 = b3, L(Q, { children: [z(Te, { 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", [s.BuiltInName.Comma, s.BuiltInName.Comma0, s.BuiltInName.Currency, s.BuiltInName.Currency0, s.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: () => {
671
- }, 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: g2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: a2, disabled: d2 })] });
672
- }, [g2, h2?.().getTheme(), f2]), y2 = ht((e3) => {
669
+ return b3.push(p3("Accent 1", [s.BuiltInName.Accent1_20, s.BuiltInName.Accent1_40, s.BuiltInName.Accent1_60, s.BuiltInName.Accent1])), b3.push(p3("Accent 2", [s.BuiltInName.Accent2_20, s.BuiltInName.Accent2_40, s.BuiltInName.Accent2_60, s.BuiltInName.Accent2])), b3.push(p3("Accent 3", [s.BuiltInName.Accent3_20, s.BuiltInName.Accent3_40, s.BuiltInName.Accent3_60, s.BuiltInName.Accent3])), b3.push(p3("Accent 4", [s.BuiltInName.Accent4_20, s.BuiltInName.Accent4_40, s.BuiltInName.Accent4_60, s.BuiltInName.Accent4])), b3.push(p3("Accent 5", [s.BuiltInName.Accent5_20, s.BuiltInName.Accent5_40, s.BuiltInName.Accent5_60, s.BuiltInName.Accent5])), b3.push(p3("Accent 6", [s.BuiltInName.Accent6_20, s.BuiltInName.Accent6_40, s.BuiltInName.Accent6_60, s.BuiltInName.Accent6])), f3.push((y3 = "Themed Cell Styles", w3 = b3, L(J, { children: [z(Te, { orientation: "horizontal" }), z(Ve, { 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", [s.BuiltInName.Comma, s.BuiltInName.Comma0, s.BuiltInName.Currency, s.BuiltInName.Currency0, s.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: () => {
670
+ }, 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: d2 })] });
671
+ }, [h2, g2?.().getTheme(), f2]), y2 = gt((e3) => {
673
672
  const t3 = 18 / r.getDeviceScale(), o3 = u2?.createTemporaryCell(e3);
674
673
  return o3.getStyle().getFont().getSize() <= t3 ? o3 : o3.createTemporaryCell({ style: { font: { size: t3 } } });
675
- }, [u2?.createTemporaryCell]), w2 = d2 || !n2 || n2.disabled(), k2 = V(() => u2 && m2 ? z(Zo, { value: g2?.getName() ?? "Custom", cellStyle: g2 ? { named: g2.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(), [g2, f2, w2, n2]);
676
- return z(Re, { 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: k2, ...p2 });
677
- })), Qo = "_sheetxl-reset_11z3j_1", en = 10, tn = $(O((e2, t2) => {
678
- const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 = en, isLive: p2 = false, ...u2 } = e2, h2 = Math.ceil(1.3 * m2), [g2, f2] = Z((e3) => e3 + 1, 0);
679
- j(() => {
674
+ }, [u2?.createTemporaryCell]), w2 = d2 || !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}` }, borderProps: { style: { height: "calc(100% - 2px)", width: "calc(100% - 1px)" } } }) : n2?.icon(), [h2, f2, w2, n2]);
675
+ 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 });
676
+ })), on = "_sheetxl-reset_11z3j_1", nn = 10, an = $(O((e2, t2) => {
677
+ const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 = nn, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * m2), [h2, f2] = Z((e3) => e3 + 1, 0);
678
+ _(() => {
680
679
  if (p2 && n2) return n2.addListeners({ onAnyChange: () => {
681
680
  f2();
682
681
  } });
@@ -685,7 +684,7 @@ const Ko = $(O((e2, t2) => {
685
684
  let e3 = n2?.toJSON() ?? {};
686
685
  const t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
687
686
  return e3 && (e3.styleOptions = { ...e3.styleOptions, name: a2.getName() }), e3.ref = t3, new c({ initialAnchor: t3, json: e3, styles: o2 });
688
- }, [g2, n2, a2, o2]), y2 = V(() => {
687
+ }, [h2, n2, a2, o2]), y2 = V(() => {
689
688
  const e3 = [];
690
689
  for (let t3 = 0; t3 < 5; t3++) for (let o3 = 0; o3 < 5; o3++) {
691
690
  const n3 = x2.getStyleAt({ colIndex: o3, rowIndex: t3 });
@@ -695,8 +694,8 @@ const Ko = $(O((e2, t2) => {
695
694
  }, [x2]), w2 = V(() => {
696
695
  const e3 = (e4, t4, o3) => {
697
696
  let n3 = o3.getFill().toCSS(r2?.darkMode ?? false);
698
- const a3 = h2 - (t4 < 4 ? 1 : 0), l3 = m2 - (e4 < 4 ? 1 : 0), i3 = o3.getFont().getFill().toCSS(r2?.darkMode ?? false);
699
- return n3 = { ...n3, position: "absolute", boxSizing: "border-box", left: t4 * (h2 - 1), top: e4 * (m2 - 1), width: a3, height: l3 }, z("td", { className: `table-style-fill ${e4}-${t4}`, style: n3, children: z("div", { className: `table-style-text ${e4}-${t4}`, style: { position: "absolute", boxSizing: "border-box", width: "6px", left: (a3 - 6) / 2, top: (l3 - 1) / 2, borderTop: `1px solid ${i3}` } }) }, `${e4}-${t4}`);
697
+ const a3 = g2 - (t4 < 4 ? 1 : 0), l3 = m2 - (e4 < 4 ? 1 : 0), i3 = o3.getFont().getFill().toCSS(r2?.darkMode ?? false);
698
+ return n3 = { ...n3, position: "absolute", boxSizing: "border-box", left: t4 * (g2 - 1), top: e4 * (m2 - 1), width: a3, height: l3 }, z("td", { className: `table-style-fill ${e4}-${t4}`, style: n3, children: z("div", { className: `table-style-text ${e4}-${t4}`, style: { position: "absolute", boxSizing: "border-box", width: "6px", left: (a3 - 6) / 2, top: (l3 - 1) / 2, borderTop: `1px solid ${i3}` } }) }, `${e4}-${t4}`);
700
699
  }, t3 = [];
701
700
  for (let o3 = 0; o3 < 5; o3++) {
702
701
  const n3 = [];
@@ -707,22 +706,22 @@ const Ko = $(O((e2, t2) => {
707
706
  t3.push(z("tr", { children: n3 }, o3));
708
707
  }
709
708
  return t3;
710
- }, [x2, a2, r2]), k2 = G((e3, t3) => y2[t3].getBorder() ?? null, [y2]);
711
- 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(b, { getBorderAt: k2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (h2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: z("table", { className: mt(s2, "sheetxl-table-preview", Qo), style: { borderCollapse: "collapse", width: 5 * (h2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: z("tbody", { children: w2 }) }) }) });
712
- })), on = (e2, t2, o2, n2, a2) => {
709
+ }, [x2, a2, r2]), S2 = K((e3, t3) => y2[t3].getBorder() ?? null, [y2]);
710
+ 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(b, { getBorderAt: S2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: z("table", { className: mt(s2, "sheetxl-table-preview", on), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: z("tbody", { children: w2 }) }) }) });
711
+ })), rn = (e2, t2, o2, n2, a2) => {
713
712
  e2.beginPath(), e2.moveTo(t2 + 0.5, o2 + 0.5), e2.lineTo(n2 + 0.5, a2 + 0.5), e2.stroke();
714
- }, nn = $(O((e2, t2) => {
713
+ }, ln = $(O((e2, t2) => {
715
714
  const { table: o2, tableStyle: n2, styles: a2, bodyStyle: r2, disabled: l2, style: i2, className: s2, canvas: d2, ...p2 } = e2, u2 = V(() => {
716
715
  const e3 = o2.toJSON(), t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
717
716
  return e3.styleOptions = { ...e3.styleOptions, name: n2.getName() }, e3.ref = t3, new c({ initialAnchor: t3, json: e3, styles: a2 });
718
- }, [o2, n2, a2]), h2 = V(() => {
717
+ }, [o2, n2, a2]), g2 = V(() => {
719
718
  const e3 = [];
720
719
  for (let t3 = 0; t3 < 5; t3++) for (let o3 = 0; o3 < 5; o3++) {
721
720
  const n3 = u2.getStyleAt({ colIndex: o3, rowIndex: t3 });
722
721
  e3.push(n3);
723
722
  }
724
723
  return e3;
725
- }, [u2]), g2 = V(() => {
724
+ }, [u2]), h2 = V(() => {
726
725
  let e3 = d2;
727
726
  if (d2 || (e3 = document.createElement("canvas")), !e3) return null;
728
727
  61 !== e3.width && (e3.width = 61), 46 !== e3.height && (e3.height = 46);
@@ -730,7 +729,7 @@ const Ko = $(O((e2, t2) => {
730
729
  if (!t3) return null;
731
730
  const o3 = 12, n3 = r2?.darkMode ?? false;
732
731
  for (let e4 = 0; e4 < 5; e4++) for (let a3 = 0; a3 < 5; a3++) {
733
- const l3 = h2[5 * e4 + a3].getFill();
732
+ const l3 = g2[5 * e4 + a3].getFill();
734
733
  let i3 = r2?.fill;
735
734
  l3.getType() === m.Type.Solid ? i3 = l3.getColor().toCSS(n3, false) : l3.getType() === m.Type.Gradient ? i3 = l3.getStops[0]?.color.toCSS(n3, false) : l3.getType() === m.Type.Pattern && (i3 = l3.getForeground().toCSS(n3, false)), t3.fillStyle = i3;
736
735
  const s3 = a3 * o3, d3 = 9 * e4;
@@ -738,369 +737,218 @@ const Ko = $(O((e2, t2) => {
738
737
  }
739
738
  t3.lineWidth = 1;
740
739
  for (let e4 = 0; e4 < 5; e4++) for (let a3 = 0; a3 < 5; a3++) {
741
- const r3 = h2[5 * e4 + a3], l3 = a3 * o3, i3 = 9 * e4, s3 = r3.getBorder();
740
+ const r3 = g2[5 * e4 + a3], l3 = a3 * o3, i3 = 9 * e4, s3 = r3.getBorder();
742
741
  if (!s3.isEmpty()) {
743
742
  const a4 = s3.getLeft();
744
- a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false), on(t3, l3, i3, l3, i3 + 9));
743
+ a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false), rn(t3, l3, i3, l3, i3 + 9));
745
744
  const r4 = s3.getTop();
746
- r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), on(t3, l3, i3, l3 + o3, 9 * e4));
745
+ r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), rn(t3, l3, i3, l3 + o3, 9 * e4));
747
746
  const d4 = s3.getRight();
748
- d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), on(t3, l3 + o3, i3, l3 + o3, i3 + 9));
747
+ d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), rn(t3, l3 + o3, i3, l3 + o3, i3 + 9));
749
748
  const c3 = s3.getBottom();
750
- c3.isNone() || (t3.strokeStyle = c3.getColor().toCSS(n3, false), on(t3, l3, i3 + 9, l3 + o3, i3 + 9));
749
+ c3.isNone() || (t3.strokeStyle = c3.getColor().toCSS(n3, false), rn(t3, l3, i3 + 9, l3 + o3, i3 + 9));
751
750
  }
752
751
  t3.strokeStyle = r3.getFont().getFill().toCSS(n3, false);
753
752
  const d3 = 4, c2 = 2.5;
754
- on(t3, a3 * o3 + c2, 9 * e4 + d3, a3 * o3 + c2 + 7, 9 * e4 + d3);
753
+ rn(t3, a3 * o3 + c2, 9 * e4 + d3, a3 * o3 + c2 + 7, 9 * e4 + d3);
755
754
  }
756
755
  return `url(${e3.toDataURL()})`;
757
756
  }, [d2, u2, n2, r2]);
758
- return z("div", { ref: t2, className: mt("table-style-preview", s2), style: { backgroundImage: g2, width: 61, height: 46, ...i2 }, ...p2 });
759
- })), an = $(O((e2, t2) => {
760
- const { styleOptions: o2, onStyleOptionsChange: n2, showHeaderRow: a2, onShowHeaderRowChange: r2, showTotalRow: l2, onShowTotalRowChange: i2, showFilterButton: s2, onShowFilterButtonChange: d2, sx: c2, disabled: m2, ...p2 } = e2;
761
- return L(Q, { sx: { display: "flex", flexDirection: "column", flexWrap: "wrap", userSelect: "none", 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 }, ...p2, ref: t2, children: [r2 && z(ie, { control: z(se, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: m2 || null == a2 }), label: "Header Row", labelPlacement: "end" }), i2 && z(ie, { control: z(se, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: m2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
757
+ return z("div", { ref: t2, className: mt("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...p2 });
758
+ })), sn = "_table-style-options-container_1kfn2_1", dn = "_table-style-options_1kfn2_1", cn = $(O((e2, t2) => {
759
+ 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;
760
+ return z("div", { className: sn, 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, dn), 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: () => {
762
761
  n2?.({ ...o2, showRowStripes: !o2?.showRowStripes });
763
- } }), label: "Banded Rows", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showFirstColumn ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
762
+ } }), label: "Banded Rows", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showFirstColumn ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
764
763
  n2?.({ ...o2, showFirstColumn: !o2?.showFirstColumn });
765
- } }), label: "First Column", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showLastColumn ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
764
+ } }), label: "First Column", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showLastColumn ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
766
765
  n2?.({ ...o2, showLastColumn: !o2?.showLastColumn });
767
- } }), label: "Last Column", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showColumnStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
766
+ } }), label: "Last Column", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showColumnStripes ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
768
767
  n2?.({ ...o2, showColumnStripes: !o2?.showColumnStripes });
769
- } }), label: "Banded Columns", labelPlacement: "end" }), d2 && z(ie, { control: z(se, { checked: s2 ?? false, indeterminate: null == s2, disabled: m2 || !o2 || null == s2, onChange: () => d2(!s2) }), label: "Filter Button", labelPlacement: "end" })] });
770
- })), rn = $((e2) => {
771
- 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, ...h2 } = e2, g2 = G((e3) => {
772
- 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() })] });
773
- return Pe({ ...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 }) }) });
774
- }, [d2]), f2 = o2?.getName() === n2, x2 = V(() => {
775
- const e3 = { table: t2, tableStyle: o2, styles: r2, bodyStyle: i2 };
776
- return p2 ? z(nn, { canvas: u2, ...e3 }) : z(tn, { ...e3 });
777
- }, [t2, o2, r2, i2]);
778
- 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: () => {
779
- a2?.(o2?.getName());
780
- }, ...h2, children: x2 }, o2.getName());
781
- return l2 && (b2 = z(Ge, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: g2, children: b2 })), b2;
782
- }), ln = $(O((e2, t2) => {
783
- const { commands: o2, command: n2, commandHook: a2, selectedTable: r2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, usePreviewIcon: d2 = false, ...m2 } = e2;
784
- bt(n2);
785
- const p2 = n2?.context(), u2 = p2?.styles, h2 = r2 ?? p2?.table?.();
786
- let g2 = "insertTable";
787
- h2 && (g2 = "editTable");
788
- const f2 = V(() => ((e3, t3) => {
789
- const o3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
790
- return new c({ initialAnchor: o3, styles: t3, json: { name: "PreviewTable", ref: o3, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: e3 } });
791
- })(h2?.getStyleOptions(), u2?.()), [u2?.().getDefaultTableStyle(), h2?.getStyleOptions()]), x2 = h2 ?? f2, [b2, y2] = U(x2);
792
- j(() => {
793
- y2(x2);
794
- }, [x2]);
795
- const w2 = s2 ?? p2?.bodyStyle(), k2 = ht((e3) => {
796
- l2?.(e3), n2?.execute({ name: e3 }, a2);
797
- }, [n2, l2, a2]), S2 = q(null), C2 = G((e3, t3) => {
798
- const o3 = { onSelectTableStyleName: k2, styles: u2(), parentFloat: e3.floatReference };
799
- S2.current || (S2.current = document.createElement("canvas"));
800
- const n3 = (e4) => {
801
- const n4 = u2().getTableStyle(e4);
802
- return n4 ? z(rn, { table: b2, tableStyle: n4, selectedTableStyleName: b2.getStyleOptions().name, bodyStyle: p2.bodyStyle(), commands: t3, commandHook: a2, canvas: S2.current, ...o3 }, e4) : null;
803
- }, r3 = (e4, t4, o4 = true) => {
804
- const a3 = [];
805
- for (let e5 = 0; e5 < t4.length; e5++) {
806
- const o5 = n3(t4[e5]);
807
- o5 && a3.push(o5);
808
- }
809
- return 0 === a3.length ? null : L(Q, { children: [o4 ? z(Te, { 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);
810
- }, l3 = [], s3 = u2().getCustomTableStyles(), d3 = [];
811
- if (s3.length > 0) {
812
- for (let e4 = 0; e4 < s3.length; e4++) s3[e4].isShownInTableStyles() && d3.push(s3[e4].getName());
813
- l3.push(r3("Custom", d3, false));
814
- }
815
- const c2 = [];
816
- h2 && !h2.getStyleOptions().name && c2.push(null);
817
- for (let e4 = 0; e4 < 21; e4++) c2.push("TableStyleLight" + (e4 + 1));
818
- l3.push(r3("Light", c2, d3.length > 0));
819
- const m3 = [];
820
- for (let e4 = 0; e4 < 28; e4++) m3.push("TableStyleMedium" + (e4 + 1));
821
- l3.push(r3("Medium", m3));
822
- const g3 = [];
823
- for (let e4 = 0; e4 < 11; e4++) g3.push("TableStyleDark" + (e4 + 1));
824
- l3.push(r3("Dark", g3));
825
- let f3 = null;
826
- return h2 && (f3 = L(H, { children: [z(Te, { orientation: "horizontal" }), z(ve, { variant: ut.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: () => {
827
- }, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: l3 }), f3] });
828
- }, [u2, u2?.().getTheme(), w2, b2]), v2 = i2 || !n2 || n2.disabled(), T2 = V(() => {
829
- if (!p2 || !d2) return n2?.icon();
830
- }, [b2, w2, v2, n2]);
831
- return z(Re, { ref: t2, quickCommand: g2, createPopupPanel: C2, 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: v2, icon: T2, ...m2 });
832
- })), sn = [];
833
- sn.push(fo("Primary Background", "bg1")), sn.push(fo("Primary Text", "tx1")), sn.push(fo("Secondary Background", "bg2")), sn.push(fo("Secondary Text", "tx2")), sn.push(fo("Accent 1", "accent1")), sn.push(fo("Accent 2", "accent2")), sn.push(fo("Accent 3", "accent3")), sn.push(fo("Accent 4", "accent4")), sn.push(fo("Accent 5", "accent5")), sn.push(fo("Accent 6", "accent6"));
834
- const dn = (e2) => {
835
- const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 = Lt(), d2 = V(() => {
836
- let e3 = [];
837
- for (let o3 = 0; o3 < sn.length; o3++) {
838
- const a3 = sn[o3];
839
- e3.push(z(ho, { schemeColorLookup: t2.schemeLookup(), colorDef: a3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
840
- }
841
- return z(Q, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: z(Q, { sx: { display: "flex", boxShadow: (e4) => e4.shadows[2] }, children: e3 }) });
842
- }, [t2, s2]);
843
- 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(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(Me, { disableInteractive: true, PopperProps: { 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.
844
- The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: z("div", { children: t2.getFontScheme().getMinorFont() }) }) })] })] }) });
845
- }, cn = $(O((e2, t2) => {
846
- const { themes: o2, selectedTheme: n2, onSelectTheme: a2, sx: r2, disabled: l2 = false, darkMode: i2, ...s2 } = e2, d2 = V(() => {
847
- const e3 = o2?.getItems({ selected: n2 }) ?? [], t3 = [];
848
- if (0 === e3.length) return z(Ve, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
849
- const r3 = e3.length;
850
- for (let o3 = 0; o3 < r3; o3++) {
851
- const r4 = e3[o3], s3 = n2 && r4?.getName() === n2.getName(), d3 = e3[o3 + 1];
852
- d3 && d3.isCustom() !== r4.isCustom() && t3.push(z(Te, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(z(dn, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
853
- 0 === e4.button && e4.preventDefault();
854
- }, onMouseUp: (e4) => {
855
- 0 === e4.button && a2(r4);
856
- }, onKeyDown: (e4) => {
857
- e4.keyCode !== ft.Enter && e4.keyCode !== ft.Space || a2(r4);
858
- } }, r4.getName()));
859
- }
860
- return t3;
861
- }, [n2, a2, i2]);
862
- 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(Te, {}), z(Q, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: d2 })] }) });
863
- })), mn = $(O((e2, t2) => {
864
- const { themes: o2, selectedTheme: n2, onSelectTheme: a2, icon: r2, tooltip: l2, label: i2, variant: s2 = Be.Toolbar, darkMode: d2, panelProps: c2, ...m2 } = e2, p2 = r2 || z(xt, { iconKey: "Theme2" }), u2 = { createPopupPanel: G((e3) => {
865
- const { closeFloatAll: t3 } = e3;
866
- return z(cn, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: d2, onKeyDown: (e4) => {
867
- e4.which === ft.Enter && t3();
868
- } });
869
- }, [o2, n2, a2, c2, d2]), tooltip: l2 || i2 || "Theme", label: i2, icon: p2, ...m2 };
870
- return s2 === Be.Toolbar ? z(Ne, { ref: t2, ...u2 }) : z(Ee, { ref: t2, ...u2 });
871
- })), pn = $(O((e2, t2) => {
872
- const { command: o2, commandHook: n2, selectedTheme: a2, onSelectTheme: r2, disabled: l2 = false, darkMode: i2, label: s2, icon: d2, variant: c2, ...m2 } = e2;
873
- bt(o2);
874
- const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, h2 = i2 ?? o2?.context()?.darkMode, g2 = l2 || o2?.disabled(), f2 = ht((e3) => {
875
- r2?.(e3), o2?.execute(e3, n2);
876
- }, [r2, n2]), x2 = G((e3, t3) => {
877
- const { children: n3, title: a3, ...r3 } = e3;
878
- let l3 = e3.children;
879
- return (g2 || t3) && (l3 = z("div", { children: l3 })), z(We, { command: o2, placement: c2 === ut.Toolbar ? "bottom-start" : "right-start", disabled: g2 || t3, ...r3, children: l3 });
880
- }, [o2, g2]);
881
- return z(mn, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === ut.Menuitem ? Be.Menuitem : Be.Toolbar, createTooltip: x2, disabled: g2, darkMode: h2, ...m2 });
882
- })), un = $(O((e2, t2) => {
883
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["themeMode"])[0], s2 = ht((e3, t3) => {
884
- 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") })] });
885
- return Pe({ ...e3, children: a3 });
886
- }, [r2, i2, n2, a2]), d2 = i2?.state(), c2 = de("(prefers-color-scheme: dark)"), m2 = "dark" === d2 || null === d2 && c2, p2 = null !== i2?.state();
887
- 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: () => {
888
- i2?.execute(m2 ? "light" : "dark", n2);
889
- }, selected: p2, ...l2 });
890
- })), hn = $(O((e2, t2) => {
891
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, sx: l2, ...i2 } = e2, s2 = G((e3, t3) => {
892
- const o3 = { variant: ut.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
893
- const a4 = n2?.beforeExecute?.(t4, o4);
894
- return false !== a4 && e3.floatReference.closeAll();
895
- } }, 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") })] });
896
- return Pe({ ...e3, children: a3 });
897
- }, [r2, n2]);
898
- 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(xt, { iconKey: "Help", style: { transform: "scale(0.75)" } }), ...i2 });
899
- })), gn = $(O((e2, t2) => {
900
- 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(() => {
901
- let e3 = null, t3 = 0;
902
- for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === ut.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
903
- return { singleMenuCommand: e3, allDisabled: 0 === t3 };
904
- }, [c2]), u2 = G((e3, t3) => {
905
- 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") })] });
906
- return Pe({ ...e3, children: a3 });
907
- }, [r2, n2, a2]);
908
- return m2 ? z(ve, { 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 });
909
- })), fn = $(O((e2, t2) => {
910
- const { command: o2, ...n2 } = e2, a2 = yt(), [r2, l2] = U(false), [i2, s2] = U("info");
911
- return j(() => {
912
- const e3 = a2.getMode();
913
- l2("copy" === e3?.key || "cut" === e3?.key), s2("cut" === e3?.key ? "warn" : "accent");
914
- }, [a2]), z(ve, { ref: t2, command: o2, icon: z(xt, { iconKey: "copy.walking", sourceProps: { isWalking: r2, themedType: i2 } }), ...n2 });
915
- })), xn = $(O((e2, t2) => {
916
- const { ...o2 } = e2;
917
- return z(Ke, { ref: t2, ...o2, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions." });
918
- }));
919
- xn.displayName = "InsertFunctionSumCommandPopupButton";
920
- const bn = 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])), yn = $((e2) => {
921
- 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) => {
922
- o2.getDescriptor().then((t3) => {
923
- e3(t3.getSummary());
924
- });
925
- });
926
- return z(Ae, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...d2 }, disabled: a2, tooltipProps: { label: m2, maxWidth: 1e3 }, onMouseDown: (e3) => {
927
- 0 === e3.button && e3.preventDefault();
928
- }, onMouseUp: (e3) => {
929
- 0 === e3.button && l2(o2);
930
- }, onKeyDown: (e3) => {
931
- e3.keyCode === ft.Enter || (e3.keyCode, ft.Space);
932
- }, ...c2, children: z(Q, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: z(ee, { component: "div", children: o2.getName() }) }) });
933
- }), wn = $(O((e2, t2) => {
934
- const { category: o2, commands: n2, commandHook: a2, scope: r2, sx: l2, disabled: i2 = false, parentFloat: s2, ...d2 } = e2, c2 = pt(n2, ["insertFunction"])[0], m2 = G((e3, t3) => {
935
- const n3 = bn.get(o2);
936
- if (!n3) return console.warn("invalidate category", o2), null;
937
- const r3 = { commandHook: a2, ...e3 }, l3 = z(kn, { category: n3.label, ...r3, commands: t3 });
938
- return Pe({ ...e3, children: l3 });
939
- }, [o2, c2, a2, r2]), p2 = bn.get(o2);
940
- return z(Re, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: bn.get(o2)?.icon ?? "FormulaGroup", ...d2 });
941
- }));
942
- wn.displayName = "InsertFunctionCommandPopupButton";
943
- const kn = $(O((e2, t2) => {
944
- const { commands: o2, category: n2, commandHook: a2, ...r2 } = e2, l2 = pt(o2, ["insertFunction"]), [i2, s2] = U([]), [d2, c2] = U(false);
945
- j(() => {
946
- (async () => {
947
- c2(true);
948
- const e3 = l2[0]?.context(), t3 = await e3.searchByCategory(n2);
949
- s2(t3), c2(false);
950
- })();
951
- }, []);
952
- const m2 = i2.length, p2 = new Array(m2), u2 = o2.getCommand("insertFunction"), h2 = (e3) => {
953
- a2?.beforeExecute?.(u2, u2?.state()), u2.execute(e3), a2?.onExecute?.(u2, u2?.state());
954
- };
955
- for (let e3 = 0; e3 < m2; e3++) {
956
- const t3 = i2[e3];
957
- p2[e3] = z(yn, { command: u2, formulaFunction: t3, handleInsert: h2 }, `formula-${t3.getName()}-${e3}`);
958
- }
959
- return Pe({ ...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 }) });
960
- })), Sn = $(O((e2, t2) => {
961
- 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, h2 = Ot(), g2 = s2 && h2 ? h2.register(s2, d2) : null, [f2, x2] = U(""), [b2, y2] = U(""), [w2, k2] = U(i2);
962
- j(() => {
963
- k2(i2), y2("");
768
+ } }), 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" })] }) });
769
+ })), mn = "_range-row_akhf4_1", pn = "_action-row_akhf4_15", un = $(O((e2, t2) => {
770
+ 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] = U(""), [b2, y2] = U(""), [w2, S2] = U(i2);
771
+ _(() => {
772
+ S2(i2), y2("");
964
773
  }, [i2]);
965
- const S2 = ht((e3) => {
774
+ const k2 = gt((e3) => {
966
775
  let t3 = "";
967
776
  try {
968
- k2(e3), m2?.(e3), c2?.(e3);
777
+ S2(e3), m2?.(e3), c2?.(e3);
969
778
  } catch (e4) {
970
779
  t3 = e4.message ?? "Invalid Name";
971
780
  }
972
- s2 && h2 && (t3 ? h2.setError(s2, { message: t3 }) : h2.clearErrors(s2)), y2(t3);
973
- }, [i2, m2, c2]), C2 = ht(async (e3) => {
974
- e3.keyCode === ft.Escape && f2 !== i2 && (S2(f2), h2?.setValue(s2, f2), h2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
975
- }, [p2, f2, i2, h2]), v2 = ht((e3) => {
781
+ s2 && g2 && (t3 ? g2.setError(s2, { message: t3 }) : g2.clearErrors(s2)), y2(t3);
782
+ }, [i2, m2, c2]), C2 = gt(async (e3) => {
783
+ e3.keyCode === ft.Escape && f2 !== i2 && (k2(f2), g2?.setValue(s2, f2), g2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
784
+ }, [p2, f2, i2, g2]), v2 = gt((e3) => {
976
785
  x2(e3.target.value ?? "");
977
- }, []), T2 = ht((e3) => {
978
- x2(""), g2?.onBlur(e3);
979
- }, []), P2 = G((e3) => {
980
- S2(e3.target.value), g2?.onChange(e3);
981
- }, [g2]);
982
- return z(ce, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...r2 }, size: "small", ref: t2, className: mt("named-input", a2), ...u2, children: z(me, { label: "Name", placeholder: l2, onFocus: v2, onBlur: T2, inputRef: g2?.ref, disabled: o2, error: !!b2, helperText: b2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { 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(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})` } } }, value: w2 ?? "", onChange: P2, onKeyDownCapture: C2, onContextMenu: (e3) => {
786
+ }, []), T2 = gt((e3) => {
787
+ x2(""), h2?.onBlur(e3);
788
+ }, []), R2 = K((e3) => {
789
+ k2(e3.target.value), h2?.onChange(e3);
790
+ }, [h2]);
791
+ 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) => {
983
792
  e3.stopPropagation();
984
793
  } }) });
985
794
  }));
986
- Sn.displayName = "NamedInput";
987
- const Cn = (e2) => null === e2 ? "" : e2.toString(), vn = $(O((e2, t2) => {
988
- const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = Ot(), h2 = o2 && u2 ? u2.register(o2, n2) : null, [g2, f2] = U(""), [x2, b2] = U(false), [y2, w2] = U(() => Cn(d2));
989
- j(() => {
990
- w2(Cn(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), b2(false);
795
+ un.displayName = "NamedInput";
796
+ const gn = (e2) => null === e2 ? "" : e2.toString(), hn = $(O((e2, t2) => {
797
+ 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] = U(""), [x2, b2] = U(false), [y2, w2] = U(() => gn(d2));
798
+ _(() => {
799
+ w2(gn(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), b2(false);
991
800
  }, [d2]);
992
- const k2 = ht((e3) => {
801
+ const S2 = gt((e3) => {
993
802
  let t3 = "";
994
803
  try {
995
804
  w2(e3);
996
- const t4 = Cn(d2), o3 = m2(e3);
805
+ const t4 = gn(d2), o3 = m2(e3);
997
806
  o3.toString() !== t4 && c2?.(o3);
998
807
  } catch (e4) {
999
808
  t3 = "Invalid Range";
1000
809
  }
1001
810
  o2 && u2 && (t3 ? u2.setError(o2, { message: t3 }) : u2.clearErrors(o2)), f2(t3), b2(true);
1002
- }, [y2, c2, o2, u2]), S2 = ht(async (e3) => {
811
+ }, [y2, c2, o2, u2]), k2 = gt(async (e3) => {
1003
812
  if (x2 && e3.keyCode === ft.Escape) {
1004
- const t3 = Cn(d2);
813
+ const t3 = gn(d2);
1005
814
  w2(t3), f2(""), b2(false), e3.stopPropagation();
1006
815
  }
1007
816
  s2?.(e3);
1008
- }, [d2, c2, s2, x2]), C2 = ht((e3) => {
1009
- h2?.onBlur(e3);
1010
- }, [h2]), v2 = G((e3) => {
1011
- k2(e3.target.value), h2?.onChange(e3);
1012
- }, [h2]), [T2, P2] = U(false), R2 = V(() => z(pe, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: z(Ue, { disabled: true, selected: T2, onSelectToggle: (e3) => {
1013
- P2(e3);
817
+ }, [d2, c2, s2, x2]), C2 = gt((e3) => {
818
+ g2?.onBlur(e3);
819
+ }, [g2]), v2 = K((e3) => {
820
+ S2(e3.target.value), g2?.onChange(e3);
821
+ }, [g2]), [T2, R2] = U(false), P2 = V(() => z(me, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: z(Ge, { disabled: true, selected: T2, onSelectToggle: (e3) => {
822
+ R2(e3);
1014
823
  }, label: "Select Range", icon: z(xt, { iconKey: "SelectRangeMode" }) }) }), [T2]);
1015
- return z(ce, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className: mt("range-input", l2), ...p2, children: z(me, { label: "Range", placeholder: "Enter Range", onBlur: C2, disabled: a2, error: !!g2, inputRef: h2?.ref, helperText: g2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { spellCheck: false, autoComplete: "off", readOnly: a2, name: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75) } }, sx: { backgroundImage: `linear-gradient(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})` }, endAdornment: R2 }, value: y2 ?? "", onChange: v2, onKeyDownCapture: S2, onContextMenu: (e3) => {
824
+ 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) => {
1016
825
  e3.stopPropagation();
1017
826
  } }) });
1018
827
  }));
1019
- vn.displayName = "RangeInput";
1020
- const Tn = $(O((e2, t2) => {
828
+ hn.displayName = "RangeInput";
829
+ const fn = [];
830
+ fn.push(yo("Primary Background", "bg1")), fn.push(yo("Primary Text", "tx1")), fn.push(yo("Secondary Background", "bg2")), fn.push(yo("Secondary Text", "tx2")), fn.push(yo("Accent 1", "accent1")), fn.push(yo("Accent 2", "accent2")), fn.push(yo("Accent 3", "accent3")), fn.push(yo("Accent 4", "accent4")), fn.push(yo("Accent 5", "accent5")), fn.push(yo("Accent 6", "accent6"));
831
+ const xn = (e2) => {
832
+ const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 = zt(), d2 = V(() => {
833
+ let e3 = [];
834
+ for (let o3 = 0; o3 < fn.length; o3++) {
835
+ const a3 = fn[o3];
836
+ e3.push(z(xo, { schemeColorLookup: t2.schemeLookup(), colorDef: a3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
837
+ }
838
+ return z(J, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: z(J, { sx: { display: "flex", boxShadow: (e4) => e4.shadows[2] }, children: e3 }) });
839
+ }, [t2, s2]);
840
+ 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(Me, { 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.
841
+ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: z("div", { children: t2.getFontScheme().getMinorFont() }) }) })] })] }) });
842
+ }, bn = $(O((e2, t2) => {
843
+ const { themes: o2, selectedTheme: n2, onSelectTheme: a2, sx: r2, disabled: l2 = false, darkMode: i2, ...s2 } = e2, d2 = V(() => {
844
+ const e3 = o2?.getItems({ selected: n2 }) ?? [], t3 = [];
845
+ if (0 === e3.length) return z(Ve, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
846
+ const r3 = e3.length;
847
+ for (let o3 = 0; o3 < r3; o3++) {
848
+ const r4 = e3[o3], s3 = n2 && r4?.getName() === n2.getName(), d3 = e3[o3 + 1];
849
+ d3 && d3.isCustom() !== r4.isCustom() && t3.push(z(Te, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(z(xn, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
850
+ 0 === e4.button && e4.preventDefault();
851
+ }, onMouseUp: (e4) => {
852
+ 0 === e4.button && a2(r4);
853
+ }, onKeyDown: (e4) => {
854
+ e4.keyCode !== ft.Enter && e4.keyCode !== ft.Space || a2(r4);
855
+ } }, r4.getName()));
856
+ }
857
+ return t3;
858
+ }, [n2, a2, i2]);
859
+ 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(Ve, { 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 })] }) });
860
+ })), yn = $(O((e2, t2) => {
861
+ 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) => {
862
+ const { closeFloatAll: t3 } = e3;
863
+ return z(bn, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: d2, onKeyDown: (e4) => {
864
+ e4.which === ft.Enter && t3();
865
+ } });
866
+ }, [o2, n2, a2, c2, d2]), tooltip: l2 || i2 || "Theme", label: i2, icon: p2, ...m2 };
867
+ return s2 === Ne.Toolbar ? z(Be, { ref: t2, ...u2 }) : z(Ee, { ref: t2, ...u2 });
868
+ })), wn = $(O((e2, t2) => {
1021
869
  const { sheet: o2, className: a2, debounceDelay: l2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = U(() => o2.getView().getZoomScale()), [m2, p2] = U(null), u2 = q(0);
1022
870
  w(o2, { onViewChange: () => {
1023
871
  p2(true), 0 === u2.current && c2(o2.getView().getZoomScale());
1024
- } }), j(() => {
872
+ } }), _(() => {
1025
873
  u2.current = 0, p2(false), c2(o2.getView().getZoomScale());
1026
- }, [o2]), j(() => {
874
+ }, [o2]), _(() => {
1027
875
  0 !== u2.current && n.debounce(() => {
1028
876
  d2 === u2.current && (u2.current = 0, o2.getView().update({ zoomScale: d2 }));
1029
877
  }, l2)();
1030
878
  }, [d2, l2]);
1031
- const h2 = ht((e3) => {
879
+ const g2 = gt((e3) => {
1032
880
  let t3 = e3;
1033
881
  e3 < 100 ? t3 = Math.round(e3 / (10 / 9) + 10) : e3 > 100 && (t3 = Math.round(3 * e3 - 200)), u2.current = t3, p2(true), c2(t3);
1034
- }, [o2]), g2 = (e3) => {
882
+ }, [o2]), h2 = (e3) => {
1035
883
  let t3 = e3;
1036
884
  return e3 < 100 ? t3 = 10 / 9 * (e3 - 10) : e3 > 100 && (t3 = (e3 + 200) / 3), t3;
1037
- }, f2 = g2(d2), [x2, b2] = U(null), y2 = q(null), k2 = G(() => {
885
+ }, f2 = h2(d2), [x2, b2] = U(null), y2 = q(null), S2 = K(() => {
1038
886
  const e3 = x2;
1039
887
  e3 && requestAnimationFrame(() => {
1040
888
  y2.current?.contains(document.activeElement) && e3.focus();
1041
889
  });
1042
- }, []), S2 = wt(() => {
1043
- h2(g2(n.findNextStep(o2.getView().getZoomScale(), false, 10)));
1044
- }), C2 = wt(() => h2(g2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), v2 = Lt(), T2 = V(() => `${r.getSharedMeasurer()("100%", Math.round(v2.typography.fontSize), v2.typography.fontFamily).width}px`, [v2]);
1045
- return L(Q, { ref: t2, className: mt(a2), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (e3) => e3.palette.text.secondary, ...i2 }, onFocus: (e3) => {
890
+ }, []), k2 = yt(() => {
891
+ g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10)));
892
+ }), C2 = yt(() => g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), v2 = zt(), T2 = V(() => `${r.getSharedMeasurer()("100%", Math.round(v2.typography.fontSize), v2.typography.fontFamily).width}px`, [v2]);
893
+ 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) => {
1046
894
  e3.relatedTarget && !x2 && b2(e3.relatedTarget);
1047
895
  }, onBlur: (e3) => {
1048
896
  x2 && !y2?.current?.contains(e3.relatedTarget) && b2(null);
1049
897
  }, onMouseDown: (e3) => {
1050
898
  0 === e3.button && e3.preventDefault();
1051
899
  }, onMouseUp: (e3) => {
1052
- 0 === e3.button && k2();
900
+ 0 === e3.button && S2();
1053
901
  }, ...s2, children: [z(Me, { 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) => {
1054
- 0 !== e3.button ? e3.preventDefault() : S2(e3);
1055
- }, children: z(xt, { iconKey: "Remove" }) }) }), z(ue, { 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) => {
1056
- h2(g2(n.findNextStep(o2.getView().getZoomScale(), e3.deltaY < 0, 10)));
902
+ 0 !== e3.button ? e3.preventDefault() : k2(e3);
903
+ }, 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) => {
904
+ g2(h2(n.findNextStep(o2.getView().getZoomScale(), e3.deltaY < 0, 10)));
1057
905
  }, onKeyDown: (e3) => {
1058
- e3.which === ft.Down || e3.which === ft.Right ? (h2(g2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === ft.Up || e3.which === ft.Left ? (h2(g2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== ft.Enter && e3.which !== ft.Escape || k2();
906
+ 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();
1059
907
  }, onChange: (e3, t3) => {
1060
- Math.abs(t3 - 100) < 3 ? h2(100) : h2(t3);
908
+ Math.abs(t3 - 100) < 3 ? g2(100) : g2(t3);
1061
909
  }, valueLabelFormat: (e3, t3) => `Zoom: ${Math.round(d2)}%` }), z(Me, { 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) => {
1062
910
  0 !== e3.button ? e3.preventDefault() : C2(e3);
1063
- }, children: z(xt, { iconKey: "Add" }) }) }), L(Q, { sx: { display: "flex", flexDirection: "row" }, children: [z(Q, { sx: { minWidth: "8px" } }), z(ee, { noWrap: true, component: "div", onClick: () => {
1064
- h2(100);
911
+ }, 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: () => {
912
+ g2(100);
1065
913
  }, 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) + "%" }) })] })] });
1066
914
  }));
1067
- Tn.displayName = "SheetZoomScale";
1068
- const Pn = $(O((e2, t2) => {
915
+ wn.displayName = "SheetZoomScale";
916
+ const Sn = $(O((e2, t2) => {
1069
917
  const { sx: o2, sheet: n2, gridStyle: a2, children: r2, childrenEnd: l2, ...i2 } = e2;
1070
918
  Y(t2, () => ({}));
1071
919
  const s2 = q(null);
1072
- j(() => {
920
+ _(() => {
1073
921
  const e3 = (e4) => e4.preventDefault();
1074
922
  return s2.current?.addEventListener("wheel", e3, { passive: false }), () => {
1075
923
  s2.current?.removeEventListener("wheel", e3);
1076
924
  };
1077
925
  }, []);
1078
- const d2 = yt(), c2 = V(() => {
926
+ const d2 = wt(), c2 = V(() => {
1079
927
  const e3 = d2.getMode();
1080
928
  return e3?.description ? e3.description : "Ready";
1081
929
  }, [d2]), [m2, p2] = U(false);
1082
- return L(Q, { 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(Q, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, z(Te, { style: { marginTop: "6px", marginBottom: "6px" } }), z(Tn, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
930
+ 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(wn, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
1083
931
  }));
1084
- Pn.displayName = "StatusBar";
1085
- const Rn = $(O((e2, t2) => {
1086
- const { disabled: o2, names: a2, workbook: l2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, ...u2 } = e2, h2 = kt(), [g2, f2] = U(null), [x2, b2] = U(() => l2.getSelectedRanges().getCoords()), [y2, k2] = U(false), { reference: S2 } = _e({ parentFloat: c2?.parentFloat }), [C2, v2] = U(() => s2 || !l2.getProtection().isStructureAllowed()), T2 = () => g2?.text ?? "", [P2, R2] = U(T2), D2 = ht(() => {
1087
- if (S2?.closeAll(), !P2) {
932
+ Sn.displayName = "StatusBar";
933
+ const kn = $(O((e2, t2) => {
934
+ const { disabled: o2, names: a2, workbook: l2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, ...u2 } = e2, g2 = St(), [h2, f2] = U(null), [x2, b2] = U(() => l2.getSelectedRanges().getCoords()), [y2, S2] = U(false), { reference: k2 } = _e({ parentFloat: c2?.parentFloat }), [C2, v2] = U(() => s2 || !l2.getProtection().isStructureAllowed()), T2 = () => h2?.text ?? "", [R2, P2] = U(T2), D2 = gt(() => {
935
+ if (k2?.closeAll(), !R2) {
1088
936
  const e4 = T2();
1089
- return R2(T2()), e4;
937
+ return P2(T2()), e4;
1090
938
  }
1091
- if (T2() === P2) return P2;
1092
- const e3 = P2.trim().toLowerCase();
1093
- if ("r" === e3 || "c" === e3) return P2;
939
+ if (T2() === R2) return R2;
940
+ const e3 = R2.trim().toLowerCase();
941
+ if ("r" === e3 || "c" === e3) return R2;
1094
942
  try {
1095
- const e4 = l2.getRanges(P2);
943
+ const e4 = l2.getRanges(R2);
1096
944
  if (e4) return e4.toString();
1097
945
  } catch (e4) {
1098
946
  }
1099
- const t3 = a2.getByName(P2);
1100
- if (t3 && t3.getRanges()) return P2;
947
+ const t3 = a2.getByName(R2);
948
+ if (t3 && t3.getRanges()) return R2;
1101
949
  let o3 = null;
1102
950
  try {
1103
- const e4 = l2.getRanges(P2), t4 = e4.getCoords().map((e5) => ({ $colEnd: true, $rowEnd: true, $colStart: true, $rowStart: true, ...e5 }));
951
+ const e4 = l2.getRanges(R2), t4 = e4.getCoords().map((e5) => ({ $colEnd: true, $rowEnd: true, $colStart: true, $rowStart: true, ...e5 }));
1104
952
  o3 = l2.getRanges(t4);
1105
953
  } catch (e4) {
1106
954
  }
@@ -1109,13 +957,13 @@ const Rn = $(O((e2, t2) => {
1109
957
  o3 = l2.getRanges(e4);
1110
958
  }
1111
959
  try {
1112
- let e4 = a2.getByName(P2);
1113
- C2 || e4 || (e4 = a2.addReference(P2, o3)), e4 && f2({ text: e4.getName() });
960
+ let e4 = a2.getByName(R2);
961
+ C2 || e4 || (e4 = a2.addReference(R2, o3)), e4 && f2({ text: e4.getName() });
1114
962
  } catch (e4) {
1115
- R2(T2()), h2.showMessage?.(e4.message, { type: St.Error });
963
+ P2(T2()), g2.showMessage?.(e4.message, { type: kt.Error });
1116
964
  }
1117
965
  return null;
1118
- }, [P2, a2, S2, C2, h2]), M2 = ht(() => {
966
+ }, [R2, a2, k2, C2, g2]), M2 = gt(() => {
1119
967
  if (l2.isClosed()) return;
1120
968
  const e3 = [];
1121
969
  for (let t4 = 0; t4 < x2.length; t4++) {
@@ -1129,15 +977,15 @@ const Rn = $(O((e2, t2) => {
1129
977
  }
1130
978
  let o3 = null;
1131
979
  o3 = t3?.length > 0 ? t3[0].getName() : l2.getSelectedSheet().getSelectedRange().toString(), f2({ text: o3 });
1132
- }, [l2, x2]), [F2, B2] = U(() => a2?.getItems() ?? null);
980
+ }, [l2, x2]), [F2, N2] = U(() => a2?.getItems() ?? null);
1133
981
  w(a2, { onCollectionChange(e3) {
1134
- B2(a2.getItems()), M2();
982
+ N2(a2.getItems()), M2();
1135
983
  }, onClose(e3) {
1136
- B2([]);
1137
- } }), j(() => {
1138
- R2(T2());
1139
- }, [g2, x2]);
1140
- const [N2, E2] = U(l2?.getSelectedSheet());
984
+ N2([]);
985
+ } }), _(() => {
986
+ P2(T2());
987
+ }, [h2, x2]);
988
+ const [B2, E2] = U(l2?.getSelectedSheet());
1141
989
  w(l2, { onProtectionChange: (e3) => {
1142
990
  v2(s2 || !e3.getProtection().isStructureAllowed());
1143
991
  }, onSheetsChange: (e3) => {
@@ -1145,15 +993,15 @@ const Rn = $(O((e2, t2) => {
1145
993
  }, onViewChange(e3) {
1146
994
  E2(e3?.getSelectedSheet());
1147
995
  } });
1148
- const [A2, I2] = U(null), W2 = ht(n.debounce(M2, A2 ? 320 : 0), []);
1149
- w(N2.getSelection(), { onChange: () => {
996
+ const [A2, I2] = U(null), W2 = gt(n.debounce(M2, A2 ? 320 : 0), []);
997
+ w(B2.getSelection(), { onChange: () => {
1150
998
  b2((e3) => {
1151
999
  const t3 = l2.getSelectedRanges().getCoords();
1152
1000
  return p.isEqualRangesArrays(t3, e3) ? e3 : t3;
1153
1001
  });
1154
1002
  }, onAdjustingChange: (e3) => {
1155
1003
  I2(e3.getAdjusting());
1156
- } }), j(() => {
1004
+ } }), _(() => {
1157
1005
  if (A2) {
1158
1006
  const e3 = l2.getSelectedRange(), t3 = e3.getRowCount(), o3 = e3.getColumnCount();
1159
1007
  let n2 = `${t3}R x ${o3}C`;
@@ -1161,36 +1009,36 @@ const Rn = $(O((e2, t2) => {
1161
1009
  }
1162
1010
  f2({ text: l2.getSelectedSheet().getSelectedRange().toString() }), W2();
1163
1011
  }, [x2, l2, A2]);
1164
- const $2 = q(null), O2 = G((e3) => {
1012
+ const $2 = q(null), O2 = K((e3) => {
1165
1013
  const { onMouseDown: t3, onMouseUp: o3, ...n2 } = e3;
1166
- 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 * r.getDeviceScale(), fontStyle: g2?.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: P2, onFocus: (e4) => {
1014
+ 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 * r.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) => {
1167
1015
  e4.target?.select();
1168
1016
  }, onKeyDown: (e4) => {
1169
1017
  if (e4.which === ft.Enter || e4.which === ft.Tab) {
1170
- let t4 = P2;
1171
- T2() !== P2 && (e4.stopPropagation(), e4.preventDefault(), t4 = D2()), t4 ? V2(t4) : i2?.();
1172
- } else if (e4.which === ft.Escape) T2() !== P2 ? (R2(T2()), setTimeout(() => {
1018
+ let t4 = R2;
1019
+ T2() !== R2 && (e4.stopPropagation(), e4.preventDefault(), t4 = D2()), t4 ? V2(t4) : i2?.();
1020
+ } else if (e4.which === ft.Escape) T2() !== R2 ? (P2(T2()), setTimeout(() => {
1173
1021
  e4.target?.select();
1174
1022
  }, 0), e4.stopPropagation(), e4.preventDefault()) : i2?.();
1175
1023
  else if (e4.which === ft.Space) return void e4.stopPropagation();
1176
1024
  }, onBlur: () => {
1177
- R2(T2());
1025
+ P2(T2());
1178
1026
  }, onChange: (e4) => {
1179
- R2(e4.target.value);
1027
+ P2(e4.target.value);
1180
1028
  } }) });
1181
- }, [P2, g2]), V2 = ht(async (e3) => {
1029
+ }, [R2, h2]), V2 = gt(async (e3) => {
1182
1030
  try {
1183
- S2?.closeAll();
1031
+ k2?.closeAll();
1184
1032
  const t3 = a2.lookupByRanges(e3)?.[0];
1185
1033
  t3 && await t3?.select(), await l2.getRanges(e3)?.select();
1186
1034
  } catch (e4) {
1187
- h2.showMessage?.(e4.message, { type: St.Error });
1035
+ g2.showMessage?.(e4.message, { type: kt.Error });
1188
1036
  }
1189
- }, [a2, h2, l2]), K2 = G((e3) => {
1037
+ }, [a2, g2, l2]), G2 = K((e3) => {
1190
1038
  setTimeout(() => {
1191
- k2(true);
1039
+ S2(true);
1192
1040
  }, 0);
1193
- const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (S2?.closeAll(), c2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: c2?.scope, commands: c2?.commands };
1041
+ 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 };
1194
1042
  let o3 = a2.getItems({ scope: l2?.getSelectedSheet().getName() });
1195
1043
  o3 = o3.sort((e4, t4) => e4.getType() === t4.getType() ? e4.getName().localeCompare(t4.getName()) : "range" === e4.getType() ? -1 : 1);
1196
1044
  const n2 = C2 ? null : ["editNamedReference", "deleteNamedReference"], r2 = C2 ? null : ["editTable", null, "convertTableToRange", "deleteTable"], i3 = [], s3 = o3.length;
@@ -1198,46 +1046,46 @@ const Rn = $(O((e2, t2) => {
1198
1046
  const a3 = o3[e4], l3 = a3.getRanges();
1199
1047
  if (!l3 || a3.isHidden()) continue;
1200
1048
  const s4 = a3.getType();
1201
- s4 !== o3[e4 - 1]?.getType() && (e4 > 0 && i3.push(z(Te, { 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(Ke, { ...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(Ke, { ...t3, key: "namedItem-" + i3.length, popupCommandKeys: r2, popupScope: "namedItem", scope: "namedItem", commands: c2?.commands, commandState: a3, label: a3.getName(), quickCommand: "selectNamed", disabled: !l3 || d2, icon: "InsertTable" }));
1049
+ s4 !== o3[e4 - 1]?.getType() && (e4 > 0 && i3.push(z(Te, { 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(je, { ...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(je, { ...t3, key: "namedItem-" + i3.length, popupCommandKeys: r2, popupScope: "namedItem", scope: "namedItem", commands: c2?.commands, commandState: a3, label: a3.getName(), quickCommand: "selectNamed", disabled: !l3 || d2, icon: "InsertTable" }));
1202
1050
  }
1203
- const m3 = L(Q, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...u2, 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(Q, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 })] }) : null] });
1204
- return Pe({ ...e3, children: m3 });
1205
- }, [l2, F2, a2, g2, C2]), _2 = Ct(t2, () => ({ focus(e3) {
1051
+ const m3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...u2, 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] });
1052
+ return Re({ ...e3, children: m3 });
1053
+ }, [l2, F2, a2, h2, C2]), j2 = Ct(t2, () => ({ focus(e3) {
1206
1054
  $2.current?.focus(e3);
1207
1055
  } }), []);
1208
- return z(Q, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Gt([_2, t2]), ...u2, children: z(Ne, { 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(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : Ht(e3.palette.divider, 0.2) }, parentFloat: S2, createPopupPanel: K2, onPopupOpen: () => k2(true), onPopupClose: () => k2(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 }) });
1056
+ return z(J, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Ut([j2, t2]), ...u2, 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 }) });
1209
1057
  }));
1210
- Rn.displayName = "NamedCollectionEditor";
1211
- const Dn = (e2, t2) => z(Rn, { ref: t2, ...e2 }), Mn = $(O((e2, t2) => {
1212
- const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = Dn, disabled: c2, commands: m2, ...p2 } = e2, [u2, h2] = U(n2?.getSelectedSheet());
1058
+ kn.displayName = "NamedCollectionEditor";
1059
+ const Cn = (e2, t2) => z(kn, { ref: t2, ...e2 }), vn = $(O((e2, t2) => {
1060
+ const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = Cn, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = U(n2?.getSelectedSheet());
1213
1061
  w(n2, { onSheetsChange: (e3) => {
1214
- h2(e3?.getSelectedSheet());
1062
+ g2(e3?.getSelectedSheet());
1215
1063
  }, onViewChange(e3) {
1216
- h2(e3?.getSelectedSheet());
1064
+ g2(e3?.getSelectedSheet());
1217
1065
  } });
1218
- const [g2, f2] = U(u2.getSelection().getCoords().cell), x2 = u2.getRange(g2).getCell(), b2 = c2 || !x2.isEditAllowed(), y2 = q(null), C2 = V(() => ({ fontSize: 11 }), []);
1066
+ const [h2, f2] = U(u2.getSelection().getCoords().cell), x2 = u2.getRange(h2).getCell(), b2 = c2 || !x2.isEditAllowed(), y2 = q(null), C2 = V(() => ({ fontSize: 11 }), []);
1219
1067
  w(u2.getSelection(), { onChange: () => {
1220
1068
  f2(u2.getSelection().getCoords().cell);
1221
1069
  } }), w(u2, { onProtectionChange() {
1222
1070
  f2(u2.getSelection().getCoords().cell);
1223
1071
  } });
1224
- const v2 = y2.current?.getLineHeight() ?? 20, [T2, P2] = U(v2), [R2, D2] = U(5), [M2, F2] = U(1), B2 = ht((e3, { size: t3 }) => {
1072
+ const v2 = y2.current?.getLineHeight() ?? 20, [T2, R2] = U(v2), [P2, D2] = U(5), [M2, F2] = U(1), N2 = gt((e3, { size: t3 }) => {
1225
1073
  e3.preventDefault(), e3.stopPropagation();
1226
1074
  const o3 = Math.floor(t3.height / v2);
1227
- P2(o3 * v2 + 1), o3 > 1 && D2(o3);
1228
- }, [v2]), N2 = ht((e3, { size: t3 }) => {
1075
+ R2(o3 * v2 + 1), o3 > 1 && D2(o3);
1076
+ }, [v2]), B2 = gt((e3, { size: t3 }) => {
1229
1077
  const o3 = Math.floor(t3.height / v2);
1230
1078
  F2(o3);
1231
- }, [v2]), E2 = yt(), A2 = E2.getMode();
1079
+ }, [v2]), E2 = wt(), A2 = E2.getMode();
1232
1080
  let I2 = null;
1233
1081
  "edit" === A2?.key && (I2 = A2.args?.stateAndCoords);
1234
1082
  const W2 = V(() => {
1235
1083
  let e3 = I2?.editState;
1236
- return e3 || (e3 = k(() => u2.getRange(g2).getCell())), z(Q, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: z(S, { ref: y2, activeCoords: g2, sheet: u2, onFocus: () => {
1237
- a2?.startEdit({ autoFocus: false, editMode: true, cell: g2 });
1084
+ 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: y2, activeCoords: h2, sheet: u2, onFocus: () => {
1085
+ a2?.startEdit({ autoFocus: false, editMode: true, cell: h2 });
1238
1086
  }, defaultTextStyle: C2, useRichStyling: false, disabled: b2, onChangeEdit: (e4) => {
1239
1087
  if (void 0 !== e4.dirty) {
1240
- const t3 = { sheet: u2, coords: g2, editState: e4 };
1088
+ const t3 = { sheet: u2, coords: h2, editState: e4 };
1241
1089
  E2.setMode((e5) => ({ ...e5, args: { ...e5?.args, stateAndCoords: t3 } }));
1242
1090
  }
1243
1091
  }, editState: e3, commands: m2, onCancelEdit: () => {
@@ -1245,7 +1093,7 @@ const Dn = (e2, t2) => z(Rn, { ref: t2, ...e2 }), Mn = $(O((e2, t2) => {
1245
1093
  }, onSubmitEdit: () => {
1246
1094
  a2?.submitEdit(), a2?.focus();
1247
1095
  }, linesVisible: M2 }) });
1248
- }, [u2, I2, g2, M2, a2]), $2 = q(null), O2 = V(() => i2 ? d2({ names: n2.getNames(), workbook: n2, ...s2 }, $2) : null, [d2, s2, i2, u2, n2, b2]), G2 = V(() => L(he, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})`, border: (e3) => `solid ${b2 ? e3.palette.action.disabled : Ht(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: b2 || null === I2, onMouseDown: (e3) => {
1096
+ }, [u2, I2, h2, M2, a2]), $2 = q(null), O2 = V(() => i2 ? d2({ names: n2.getNames(), workbook: n2, ...s2 }, $2) : null, [d2, s2, i2, u2, n2, b2]), K2 = 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 ${b2 ? 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: b2 || null === I2, onMouseDown: (e3) => {
1249
1097
  0 === e3.button && e3.preventDefault();
1250
1098
  }, onClick: () => {
1251
1099
  a2.cancelEdit();
@@ -1255,70 +1103,70 @@ const Dn = (e2, t2) => z(Rn, { ref: t2, ...e2 }), Mn = $(O((e2, t2) => {
1255
1103
  a2.submitEdit();
1256
1104
  } }), 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) => {
1257
1105
  0 === e3.button && e3.preventDefault();
1258
- } })] }), [b2, I2]), K2 = Lt(), [j2, _2] = U(false), X2 = V(() => L(Q, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [G2, L(he, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 * r.getDeviceScale(), "& .editor-placement": { top: "2px !important" }, minHeight: "calc(100% - 2px)", boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})`, border: (e3) => `solid ${b2 ? e3.palette.action.disabled : Ht(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => b2 ? `${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: () => _2(true), onBlur: () => _2(false), onMouseDown: (e3) => {
1106
+ } })] }), [b2, I2]), G2 = zt(), [_2, j2] = U(false), X2 = V(() => L(J, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [K2, L(ue, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 * r.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 ${b2 ? e3.palette.action.disabled : Wt(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => b2 ? `${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: () => j2(true), onBlur: () => j2(false), onMouseDown: (e3) => {
1259
1107
  e3.target?.classList.contains("react-resizable-handle") && e3.preventDefault();
1260
- }, children: [z(Q, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignSelf: "baseline", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: z(Vt, { height: T2, draggableOpts: { grid: [v2, v2] }, minConstraints: [v2, v2], maxConstraints: [15 * v2, 15 * v2], onResize: N2, onResizeStop: B2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: W2 }) }), 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) => {
1108
+ }, children: [z(J, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignItems: "center", marginTop: "-1px", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: z(Gt, { height: T2, draggableOpts: { grid: [v2, v2] }, minConstraints: [v2, v2], maxConstraints: [15 * v2, 15 * v2], onResize: B2, onResizeStop: N2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: W2 }) }), 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) => {
1261
1109
  0 === e3.button && e3.preventDefault();
1262
1110
  }, onClick: () => {
1263
- const e3 = M2 > 1 ? 1 : R2;
1264
- P2(e3 * v2 + 1), F2(e3);
1265
- } }), z(Q, { 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, W2, j2, M2, v2]), Z2 = V(() => O2 || X2 ? !O2 && X2 ? X2 : O2 && !X2 ? O2 : 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='${K2.palette.text.icon ?? K2.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 6.5px", minWidth: "18px" } }, elementBefore: O2, elementAfter: X2 }) }) : null, [O2, X2]), Y2 = Ct(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => $2.current }), []);
1266
- return z(Q, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Y2, ...p2, children: Z2 });
1111
+ const e3 = M2 > 1 ? 1 : P2;
1112
+ R2(e3 * v2 + 1), F2(e3);
1113
+ } }), z(J, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: _2 ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (e3) => e3.palette.primary.main, borderRadius: (e3) => `${e3.shape.borderRadius}px` } })] })] }), [K2, W2, _2, M2, v2]), Z2 = V(() => O2 || X2 ? !O2 && X2 ? X2 : O2 && !X2 ? O2 : 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='${G2.palette.text.icon ?? G2.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 6.5px", minWidth: "18px" } }, elementBefore: O2, elementAfter: X2 }) }) : null, [O2, X2]), Y2 = Ct(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => $2.current }), []);
1114
+ return z(J, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Y2, ...p2, children: Z2 });
1267
1115
  }));
1268
- Mn.displayName = "FormulaBar";
1269
- const Fn = $(O((e2, t2) => {
1116
+ vn.displayName = "FormulaBar";
1117
+ const Tn = $(O((e2, t2) => {
1270
1118
  const { filter: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2, s2 = V(() => ({}), []), d2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1271
1119
  }, onError() {
1272
1120
  console.log("onError");
1273
1121
  } }, 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") }), []] });
1274
- return z(Q, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
1122
+ return z(J, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
1275
1123
  }));
1276
- Fn.displayName = "FilterColumnMenu";
1277
- const Bn = $(O((e2, t2) => {
1124
+ Tn.displayName = "FilterColumnMenu";
1125
+ const Rn = $(O((e2, t2) => {
1278
1126
  const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = Ct(t2, () => ({ isFilters: () => true }), []);
1279
1127
  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" })] }) });
1280
1128
  }));
1281
- Bn.displayName = "Filters";
1282
- const Nn = $(O((e2, t2) => {
1283
- 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: h2, activeColor: g2, background: f2 = "white", tabRadius: x2 = 4, gridTheme: b2, ...y2 } = e2, [k2, S2] = U(() => !!n2 && n2.getProtection().isLocked()), [C2, v2] = U(() => n2 ? n2.getTabColor() : null);
1129
+ Rn.displayName = "Filters";
1130
+ const Pn = $(O((e2, t2) => {
1131
+ 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] = U(() => !!n2 && n2.getProtection().isLocked()), [C2, v2] = U(() => n2 ? n2.getTabColor() : null);
1284
1132
  w(n2, { onProtectionChange: () => {
1285
- S2(n2.getProtection().isLocked());
1133
+ k2(n2.getProtection().isLocked());
1286
1134
  }, onTabColorChange: () => {
1287
1135
  v2(n2.getTabColor());
1288
1136
  }, onStyleChange: () => {
1289
1137
  v2(n2.getTabColor());
1290
1138
  } });
1291
- const T2 = Lt(), P2 = m2 === i2;
1292
- let R2 = null, D2 = null;
1139
+ const T2 = zt(), R2 = m2 === i2;
1140
+ let P2 = null, D2 = null;
1293
1141
  if (C2 || p2) {
1294
1142
  let e3 = f2;
1295
- C2 ? (D2 = C2.toBlackOrWhite().toCSS(), e3 = C2?.toCSS()) : P2 || (e3 = T2.palette.background.paper), R2 = z(Q, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: P2 ? "50%" : "100%", borderRadius: "4px", border: (e4) => P2 ? `${f2} solid 1px` : `${e4.palette.divider} solid 1px`, background: P2 && C2 ? `linear-gradient(0deg, ${e3} 0%, transparent)` : e3 } });
1143
+ 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 } });
1296
1144
  }
1297
1145
  let M2 = null;
1298
1146
  "string" == typeof u2 ? M2 = u2 : u2?.toCSS && (M2 = u2.toCSS());
1299
- const F2 = P2 ? z(Q, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
1300
- return z(Wt, { theme: P2 ? b2 ?? T2 : T2, children: z(Q, { ref: t2, className: mt(r2), sx: { ...a2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: P2 ? "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: P2 ? M2 : "transparent", children: z(ae, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: P2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: P2 ? "primary" : D2 || "text.secondary", backgroundColor: P2 ? f2 : "transparent", "&:hover:not([disabled])": { backgroundColor: P2 ? 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: [R2, 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: P2 ? void 0 : "1px" }, children: [o2, F2] }), k2 ? z(xt, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : z(Q, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1147
+ const F2 = R2 ? z(J, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
1148
+ 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 ? M2 : "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, F2] }), S2 ? z(xt, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : z(J, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1301
1149
  }));
1302
- Nn.displayName = "SheetTab";
1303
- const En = $(O((e2, t2) => {
1150
+ Pn.displayName = "SheetTab";
1151
+ const Dn = $(O((e2, t2) => {
1304
1152
  const { workbook: o2, index: n2, commands: a2, scope: r2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: d2, tabStripRef: c2, ...m2 } = e2, [p2, u2] = U(o2?.getProtection());
1305
1153
  w(o2, { onProtectionChange: (e3) => {
1306
1154
  u2(e3?.getProtection());
1307
1155
  } });
1308
- const h2 = V(() => ({}), []), g2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => i2.closeAll(), onExecute() {
1156
+ const g2 = V(() => ({}), []), h2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => i2.closeAll(), onExecute() {
1309
1157
  }, onError() {
1310
1158
  console.log("onError");
1311
- } }, scope: r2, commandState: n2, disabled: l2 || void 0 === n2, parentFloat: i2 }), [l2, i2]), f2 = V(() => ({ ...h2, ...g2 }), [h2, g2]), 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(Ae, { onMouseDown: (e3) => {
1159
+ } }, 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(Ae, { onMouseDown: (e3) => {
1312
1160
  0 === e3.button && e3.preventDefault();
1313
1161
  }, onMouseUp: () => {
1314
1162
  Promise.resolve(i2.closeAll()).then(() => {
1315
1163
  c2?.startEdit(n2);
1316
1164
  });
1317
- }, 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(Ho, { variant: ut.Menuitem, command: a2.getCommand("formatSheetTabColor"), icon: z(xt, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: io.End }, parentFloat: i2 }), z(Te, { orientation: "horizontal" }), z(ve, { command: a2.getCommand("hideSheet"), ...f2, variant: ut.Menuitem })] });
1318
- return z(Q, { ref: t2, className: mt("menu", d2), sx: { ...s2 }, ...m2, children: x2 });
1165
+ }, 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($o, { 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 })] });
1166
+ return z(J, { ref: t2, className: mt("menu", d2), sx: { ...s2 }, ...m2, children: x2 });
1319
1167
  }));
1320
- En.displayName = "SheetTabMenu";
1321
- const An = $(O((e2, t2) => {
1168
+ Dn.displayName = "SheetTabMenu";
1169
+ const Mn = $(O((e2, t2) => {
1322
1170
  const { workbook: o2, gridStyle: n2, floatReference: a2, closeFloatAll: r2, className: l2, ...i2 } = e2, [s2, d2] = U(o2?.getSheets().getItems()), [c2, m2] = U(o2?.getProtection());
1323
1171
  w(o2, { onSheetsChange: (e3) => {
1324
1172
  d2(e3.getSheets().getItems());
@@ -1331,12 +1179,12 @@ const An = $(O((e2, t2) => {
1331
1179
  const l3 = t3[o3], i3 = l3.getVisibility();
1332
1180
  if (i3 === u.Visibility.VeryHidden) continue;
1333
1181
  const s3 = r3 === l3, d3 = l3.getProtection().isLocked(), m3 = l3.getTabColor(), p3 = n2?.body.fill ?? "transparent";
1334
- let h2 = null, g2 = null, f2 = p3;
1335
- m3 && (f2 = m3.toCSS(), s3 || (g2 = m3.toBlackOrWhite().toCSS()), h2 = 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 === u.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" } }) }));
1182
+ let g2 = null, h2 = null, f2 = p3;
1183
+ m3 && (f2 = m3.toCSS(), s3 || (h2 = m3.toBlackOrWhite().toCSS()), g2 = 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 === u.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" } }) }));
1336
1184
  let x2 = null;
1337
- d3 && (x2 = z(xt, { iconKey: "Lock" })), i3 !== u.Visibility.Visible && (x2 = z(xt, { 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(Ae, { disabled: !c2.isStructureAllowed() && i3 === u.Visibility.Hidden, sx: { color: (e4) => {
1185
+ d3 && (x2 = z(xt, { iconKey: "Lock" })), i3 !== u.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(Ae, { disabled: !c2.isStructureAllowed() && i3 === u.Visibility.Hidden, sx: { color: (e4) => {
1338
1186
  let t4 = s3 ? e4.palette.primary.main : e4.palette.text.secondary;
1339
- return g2 && (t4 = g2), i3 === u.Visibility.Hidden && (t4 = $t(t4, e4.palette.action.disabledOpacity)), t4;
1187
+ return h2 && (t4 = h2), i3 === u.Visibility.Hidden && (t4 = Vt(t4, e4.palette.action.disabledOpacity)), t4;
1340
1188
  }, borderLeft: (e4) => `${s3 ? e4.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", fontWeight: s3 ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: s3 ? z($e, {}) : void 0, onMouseDown: (e4) => e4.preventDefault(), onMouseUp: () => {
1341
1189
  Promise.resolve(a2.closeAll()).then(() => {
1342
1190
  try {
@@ -1345,31 +1193,31 @@ const An = $(O((e2, t2) => {
1345
1193
  console.error(e4);
1346
1194
  }
1347
1195
  });
1348
- }, children: L(H, { children: [h2, 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));
1196
+ }, children: L(H, { children: [g2, 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));
1349
1197
  }
1350
1198
  return e3;
1351
1199
  }, [o2, c2, s2, a2, n2]);
1352
- return z(Q, { ref: t2, className: mt("menu", l2), ...i2, children: p2 });
1200
+ return z(J, { ref: t2, className: mt("menu", l2), ...i2, children: p2 });
1353
1201
  }));
1354
- An.displayName = "SheetsAllMenu";
1355
- let In = false, Ln = false;
1356
- let Hn = null;
1357
- const zn = async (e2) => {
1358
- const t2 = await h.getDetails();
1359
- if (Ln || t2.isEval()) {
1202
+ Mn.displayName = "SheetsAllMenu";
1203
+ let Fn = false, Nn = false;
1204
+ let Bn = null;
1205
+ const En = async (e2) => {
1206
+ const t2 = await g.getDetails();
1207
+ if (Nn || t2.isEval()) {
1360
1208
  try {
1361
1209
  const e3 = top ?? window;
1362
- e3.SheetXL || (e3.SheetXL = Object.freeze({ getSelectedWorkbook: () => Hn?.getWorkbook(), getSelectedSheet: () => Hn?.getWorkbook().getSelectedSheet(), getSelectedRange: () => Hn?.getWorkbook().getSelectedRange(), getRange: (e4) => Hn?.getWorkbook().getRange(e4), getSelectedWorkbookElement: () => Hn, getLicenseManager: () => h, moreExamples: () => {
1210
+ e3.SheetXL || (e3.SheetXL = Object.freeze({ getSelectedWorkbook: () => Bn?.getWorkbook(), getSelectedSheet: () => Bn?.getWorkbook().getSelectedSheet(), getSelectedRange: () => Bn?.getWorkbook().getSelectedRange(), getRange: (e4) => Bn?.getWorkbook().getRange(e4), getSelectedWorkbookElement: () => Bn, getLicenseManager: () => g, moreExamples: () => {
1363
1211
  const e4 = { "SheetXL.getRange('Sheet1!e5:f6').setValues([[110, 220], [210, 220]])": { Summary: "Set an array of values." }, "SheetXL.getRange('a1:e5').setValue(100)": { Summary: "Set a single repeating value to a range." }, "SheetXL.getRange('Sheet1!e5:f6').getValues()": { Summary: "Get the values as a 2d array (see forEach)." }, "SheetXL.getSelectedRange().setValue(new Date())": { Summary: "Set current date/time using Javascript Date." }, "SheetXL.getSelectedRange().setValue('10/23/95')": { Summary: "Set current date/time using string." }, "SheetXL.getSelectedSheet().getUsedRange().getValues()": { Summary: "Get all of the values in a sheet." }, "SheetXL.getSelectedRange().getStyle().update({ fill: 'accent4' })": { Summary: "Set fill to theme color 4." }, "SheetXL.getRange('E:L').getStyle().update({ fill: 'accent1 lumMod 90 lumOff 40' })": { Summary: "Set some columns to a modified theme color." }, "SheetXL.getRange('e5:f10').getStyle().update({ style: { border: 'double blue' }})": { Summary: "Set border." }, "SheetXL.getCell().getStyle().fill.toCSS()": { Summary: "Get the fill style as css for the selected cell." }, "SheetXL.getRange('a1:a3').autoFill('a1:a7')": { Summary: "Autofill down." }, "SheetXL.getRange('e7:i9').merge({ orientation: 'rows' })": { Summary: "Merge cells horizontally." }, "SheetXL.getSelectedRange().sort({ ascending: false, hasHeader: false })": { Summary: "Sort selected cells ascending with a header." }, "SheetXL.getSelectedRange().clear('all')": { Summary: "Clear the current range a different way." }, "SheetXL.getSelectedSheet().getTables().add('b2:e9')": { Summary: "Create a 4x8 table at b2 for current sheet." }, "SheetXL.getRange('a1:c3').copyFrom('e1:g3')": { Summary: "Copy cells." }, "SheetXL.getRange('c:t').getColumnHeaders().setSize(30)": { Summary: "Set the size of columns to 30 pixels." }, "SheetXL.getRange('2:3').delete()": { Summary: "Remove rows 2 and 3 and shift up." }, "SheetXL.getSelectedSheet().getMovables().addImage('https://www.sheetxl.com/logo-text.svg')": { Summary: "Add an image." }, "SheetXL.getSelectedSheet().getMovables().addImage('https://www.sheetxl.com/logo-text.svg', { bounds: { height: 100 } })": { Summary: "Add an image of height 100." }, "SheetXL.getSelectedRange().doBatch(() => { SheetXL.getSelectedRange().setValue(1.50).getStyle().update({ numberFormat: '0%' }).autoFit(); }, 'Enter 150%')": { Summary: "Set value to 100 and numberformat to 0% as a single." }, "SheetXL.getSelectedRange().doBatch(() => { SheetXL.getSelectedRange().setValue('Remind Me Later').getStyle().update({ namedStyle: 'Note'}).autoFit(); }, 'Set Reminder')": { Summary: "Set a value and style to Note style and autofit text." }, "SheetXL.getSelectedWorkbook().getNames().addReference('Small_Range', 'A2:E5');": { Summary: "Add a named range." }, "SheetXL.getSelectedWorkbook().getRange('a1:e5').addListener((e) => { console.log('got an update for:', e.getSource().toString()) })": { Summary: "Listen for updates at a range." } };
1364
1212
  console.table(e4);
1365
1213
  } }));
1366
1214
  } catch (e3) {
1367
- e3 instanceof DOMException || console.error(e3), In = true;
1215
+ e3 instanceof DOMException || console.error(e3), Fn = true;
1368
1216
  }
1369
- if (Hn !== e2 && (Hn = e2, !In)) try {
1370
- In = true;
1371
- (top ?? window).SheetXL && (await h._validate(true), h.wasPrinted() && (() => {
1372
- Kt.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;"), In = true;
1217
+ if (Bn !== e2 && (Bn = e2, !Fn)) try {
1218
+ Fn = true;
1219
+ (top ?? window).SheetXL && (await g._validate(true), g.wasPrinted() && (() => {
1220
+ 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;"), Fn = true;
1373
1221
  const e3 = document.getElementById("openEditorLink");
1374
1222
  e3 && e3.addEventListener("click", (e4) => {
1375
1223
  e4.preventDefault(), console.log("openScriptEditor called from console");
@@ -1379,32 +1227,32 @@ const zn = async (e2) => {
1379
1227
  e3 instanceof DOMException || console.error(e3);
1380
1228
  }
1381
1229
  }
1382
- }, Wn = (e2) => {
1383
- Ln = e2;
1384
- }, $n = 0.12, On = (e2, t2) => {
1230
+ }, An = (e2) => {
1231
+ Nn = e2;
1232
+ }, In = 0.12, Ln = (e2, t2) => {
1385
1233
  const o2 = {}, n2 = (e3) => {
1386
1234
  const t3 = e3.palette?.background.default ?? "rgba(255,255,255,1)";
1387
- 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, $n, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
1235
+ 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, In, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
1388
1236
  }, a2 = n2(t2);
1389
- o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: qe(o2.body.fill, $n, 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 } });
1237
+ o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: qe(o2.body.fill, In, 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 } });
1390
1238
  const r2 = qe("dark" !== e2.palette.mode ? e2.palette.primary.light : e2.palette.primary.main, 0.055, e2.palette?.mode);
1391
- o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill: $t(r2, 0.2), text: { ...o2.header.text, fill: e2.palette.primary.main }, dividerStrokeFill: $t(r2, 0.7) }, o2.headerSelectAll = { ...o2.headerSelect, fill: $t(r2, 0.9), text: { ...o2.headerSelect.text, fill: e2.palette.primary.contrastText }, edgeStrokeFill: o2.headerSelect.strokeFill }, o2.buttonSurface = { ...a2, strokeFill: qe(a2.fill, $n, 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 ? $t(e2.palette?.primary?.main, 0.1) : void 0, strokeFill: e2.palette?.primary?.main }, o2.headerSelectionInactive = { ...o2.headerSelection, fill: e2.palette?.divider ? $t(e2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
1239
+ 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, In, 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" };
1392
1240
  const l2 = t2 ?? e2, i2 = "dark" === l2.palette.mode;
1393
- return o2.selection = { fill: l2.palette?.primary?.main ? $t(l2.palette?.primary?.main, 0.1) : void 0, strokeFill: l2.palette?.primary?.main }, o2.selectionInactive = { ...o2.selection, fill: l2.palette?.divider ? $t(l2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, o2.selectionRemove = { ...o2.selection, fill: $t(l2.palette.warning.light, 0.05), strokeFill: l2.palette.warning.dark }, t2 && (o2.body = n2(t2)), o2.colorShadow = $t(l2.palette.action.active, 0.5), o2.colorGrey = l2.palette.action.active, o2.filterDarkInvert = i2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", o2;
1394
- }, Vn = $(O((e2, t2) => {
1395
- const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 = Ct(t2, () => ({}), []), [i2, s2] = qt(), d2 = q(null), c2 = q(null), [m2, p2] = W.useReducer((e3) => e3 + 1, 0), [u2, h2] = U(null), [g2, f2] = U(null), [x2, b2] = U(null), { reference: y2 } = _e({ parentFloat: a2, label: "overflow" });
1396
- J(() => {
1241
+ 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;
1242
+ }, Hn = $(O((e2, t2) => {
1243
+ const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 = Ct(t2, () => ({}), []), [i2, s2] = _t(), d2 = q(null), c2 = q(null), [m2, p2] = W.useReducer((e3) => e3 + 1, 0), [u2, g2] = U(null), [h2, f2] = U(null), [x2, b2] = U(null), { reference: y2 } = _e({ parentFloat: a2, label: "overflow" });
1244
+ Q(() => {
1397
1245
  c2.current = { refs: [] };
1398
1246
  const e3 = [], t3 = W.Children.toArray(o2);
1399
1247
  let n3 = 0;
1400
1248
  t3.forEach((o3, a3) => {
1401
- e3.push(z(Q, { sx: { display: "flex" }, ref: (e4) => {
1249
+ e3.push(z(J, { sx: { display: "flex" }, ref: (e4) => {
1402
1250
  n3++, n3 === t3.length && p2();
1403
1251
  const o4 = { current: null };
1404
1252
  o4.current = e4, c2.current.refs[a3] = o4;
1405
1253
  }, children: o3 }, a3));
1406
- }), h2(e3);
1407
- }, [o2, s2]), J(() => {
1254
+ }), g2(e3);
1255
+ }, [o2, s2]), Q(() => {
1408
1256
  if (!u2) return;
1409
1257
  const e3 = c2.current.refs, t3 = e3 ? e3.length : 0;
1410
1258
  if (!l2.current || 0 === t3) return f2(null), void b2(null);
@@ -1434,7 +1282,7 @@ const zn = async (e2) => {
1434
1282
  }
1435
1283
  f2(n3.length > 0 ? n3 : null), b2(a3.length > 0 ? a3 : null);
1436
1284
  }, [o2, u2, s2, y2, m2]);
1437
- const w2 = ht((e3) => {
1285
+ const w2 = gt((e3) => {
1438
1286
  const t3 = [], o3 = x2.length;
1439
1287
  for (let n4 = 0; n4 < o3; n4++) {
1440
1288
  const o4 = W.Children.toArray(x2[n4])[0];
@@ -1445,21 +1293,21 @@ const zn = async (e2) => {
1445
1293
  t3.push(i3);
1446
1294
  });
1447
1295
  }
1448
- 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 });
1449
- return Pe({ ...e3, children: n3 });
1296
+ 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 });
1297
+ return Re({ ...e3, children: n3 });
1450
1298
  }, [x2]);
1451
- return L(Q, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Gt([l2, i2, t2]), ...r2, children: [z(Q, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%", alignItems: "center" }, children: g2 ?? u2 }), z(Q, { className: "overflow-palette-popup-button", sx: { display: null !== x2 && 0 === x2.length ? "none" : "flex", flex: "1 1 0" }, children: z(Ne, { 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" }) }) })] });
1452
- })), Gn = "https://unpkg.com/@sheetxl/scripting-templates/dist", Kn = (e2) => {
1299
+ return L(J, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Ut([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" }) }) })] });
1300
+ })), zn = "https://unpkg.com/@sheetxl/scripting-templates/dist", Wn = (e2) => {
1453
1301
  if (e2.metadata?.name) return e2.metadata.name;
1454
1302
  let t2 = (e2.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
1455
1303
  if ("formula" === e2.metadata?.icon) return t2.toUpperCase();
1456
1304
  t2 = t2.replace(/([a-z])([A-Z])/g, "$1 $2");
1457
1305
  return t2.replace(/[-_]/g, " ").trim().split(/\s+/).map((e3) => e3.charAt(0).toUpperCase() + e3.slice(1)).join(" ");
1458
- }, Un = async (e2) => {
1459
- const t2 = Yt.relativePath(e2, "./manifest.json"), o2 = await fetch(t2);
1460
- if (!o2.ok) throw new Ut(`Failed to retrieve directory at '${e2}': ${o2.statusText}`);
1306
+ }, $n = async (e2) => {
1307
+ const t2 = to.relativePath(e2, "./manifest.json"), o2 = await fetch(t2);
1308
+ if (!o2.ok) throw new qt(`Failed to retrieve directory at '${e2}': ${o2.statusText}`);
1461
1309
  const n2 = await o2.text();
1462
- if (n2.trim().toLowerCase().startsWith("<!doctype html") || n2.trim().toLowerCase().startsWith("<html")) throw new Ut(`Failed to retrieve directory at '${e2}'`);
1310
+ if (n2.trim().toLowerCase().startsWith("<!doctype html") || n2.trim().toLowerCase().startsWith("<html")) throw new qt(`Failed to retrieve directory at '${e2}'`);
1463
1311
  let a2;
1464
1312
  try {
1465
1313
  a2 = JSON.parse(n2);
@@ -1468,11 +1316,11 @@ const zn = async (e2) => {
1468
1316
  }
1469
1317
  const r2 = a2.map(async (t3) => {
1470
1318
  try {
1471
- const o3 = Yt.relativePath(e2, t3.path), n3 = await fetch(o3);
1319
+ const o3 = to.relativePath(e2, t3.path), n3 = await fetch(o3);
1472
1320
  if (!n3.ok) throw new Error(`Failed to fetch file at '${t3.path}': ${n3.statusText}`);
1473
1321
  const a3 = await n3.text();
1474
1322
  let r3 = t3.metadata;
1475
- r3?.title || (r3 = { title: Kn(t3), ...r3 });
1323
+ r3?.title || (r3 = { title: Wn(t3), ...r3 });
1476
1324
  return { path: t3.path, content: a3, metadata: r3 };
1477
1325
  } catch (e3) {
1478
1326
  console.error(e3.message);
@@ -1480,23 +1328,23 @@ const zn = async (e2) => {
1480
1328
  return null;
1481
1329
  });
1482
1330
  return (await Promise.all(r2)).filter((e3) => null !== e3);
1483
- }, jn = { marginRight: "4px" }, _n = "1em", qn = $((e2) => {
1331
+ }, On = { marginRight: "4px" }, Vn = "1em", Kn = $((e2) => {
1484
1332
  const { disabled: t2, snippet: o2, description: n2, handleInsert: a2, sx: r2, ...l2 } = e2;
1485
1333
  let i2;
1486
1334
  const s2 = o2.metadata?.icon;
1487
- return i2 = z(xt, "formula" === s2 ? { iconKey: "ScriptFormula", size: _n, style: jn } : "macro" === s2 ? { iconKey: "ScriptMacro", size: _n, style: jn } : { iconKey: "ScriptAutoStart", size: _n, style: jn }), z(Ae, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...r2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
1335
+ return i2 = z(xt, "formula" === s2 ? { iconKey: "ScriptFormula", size: Vn, style: On } : "macro" === s2 ? { iconKey: "ScriptMacro", size: Vn, style: On } : { iconKey: "ScriptAutoStart", size: Vn, style: On }), z(Ae, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...r2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
1488
1336
  0 === e3.button && e3.preventDefault();
1489
1337
  }, onMouseUp: (e3) => {
1490
1338
  0 === e3.button && a2(o2);
1491
1339
  }, onKeyDown: (e3) => {
1492
1340
  e3.keyCode !== ft.Enter && e3.keyCode !== ft.Space || a2(o2);
1493
- }, ...l2, children: L(Q, { 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) => $t(e3.palette.text.secondary ?? e3.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o2.metadata?.summary })] }) });
1494
- }), Xn = $(O((e2, t2) => {
1495
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = Gn, ...i2 } = e2, [s2, d2] = U([]), [c2, m2] = U(true), p2 = pt(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1496
- j(() => {
1341
+ }, ...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 })] }) });
1342
+ }), Gn = $(O((e2, t2) => {
1343
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = zn, ...i2 } = e2, [s2, d2] = U([]), [c2, m2] = U(true), p2 = pt(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1344
+ _(() => {
1497
1345
  (async () => {
1498
1346
  try {
1499
- const e3 = await Un(l2);
1347
+ const e3 = await $n(l2);
1500
1348
  d2(e3);
1501
1349
  } catch (e3) {
1502
1350
  } finally {
@@ -1504,58 +1352,58 @@ const zn = async (e2) => {
1504
1352
  }
1505
1353
  })();
1506
1354
  }, [l2]);
1507
- const h2 = G((e3, t3) => {
1355
+ const g2 = K((e3, t3) => {
1508
1356
  if (c2) return z("div", { children: "Loading..." });
1509
1357
  const a3 = { variant: ut.Menuitem, commandHook: n2, scope: "scripts", disabled: r2 }, l3 = (t4) => {
1510
1358
  u2.getEditor()?.insertSnippet(t4.content), e3.closeFloat();
1511
1359
  }, i3 = [];
1512
1360
  for (let e4 = 0; e4 < s2.length; e4++) {
1513
1361
  const t4 = s2[e4];
1514
- t4 && i3.push(z(qn, { handleInsert: l3, snippet: t4 }, t4.path));
1362
+ t4 && i3.push(z(Kn, { handleInsert: l3, snippet: t4 }, t4.path));
1515
1363
  }
1516
- 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(Te, { orientation: "horizontal" })] }) : null, X(ve, { ...a3, key: "help", command: o2.getCommand("help") })] });
1517
- return Pe({ ...e3, children: d3 });
1364
+ 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") })] });
1365
+ return Re({ ...e3, children: d3 });
1518
1366
  }, [r2, n2, a2, c2, u2]);
1519
- 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: h2, icon: "ScriptNew", ...i2 });
1520
- })), Zn = $(O((e2, t2) => {
1521
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = ht((e3) => {
1367
+ 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: "ScriptNew", ...i2 });
1368
+ })), Un = $(O((e2, t2) => {
1369
+ const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
1522
1370
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1523
- return z(H, { children: L("div", { style: { display: "flex", flex: "1 1 100%" }, children: [z("div", { children: z(Vn, { parentFloat: n2, style: {}, children: z(ve, { ...t3, command: o2?.getCommand("saveScripts") }) }) }), z("div", { style: { flex: "1 1 100%" } }), z("div", { children: z(Vn, { parentFloat: n2, style: {}, children: z(Xn, { ...t3, commands: o2 }) }) })] }) });
1371
+ return z(H, { children: L("div", { style: { display: "flex", flex: "1 1 100%" }, children: [z("div", { children: z(Hn, { parentFloat: n2, style: {}, children: z(ve, { ...t3, command: o2?.getCommand("saveScripts") }) }) }), z("div", { style: { flex: "1 1 100%" } }), z("div", { children: z(Hn, { parentFloat: n2, style: {}, children: z(Gn, { ...t3, commands: o2 }) }) })] }) });
1524
1372
  }, [o2]);
1525
1373
  return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1526
1374
  }));
1527
- Zn.displayName = "ScriptEditorToolbar";
1528
- const Yn = $(O((e2, t2) => {
1529
- const { scriptPath: o2 = Gn, onScriptSelect: n2, sx: a2 = gt.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = U([]), [p2, u2] = U(true), [h2, g2] = U(null);
1530
- if (j(() => {
1375
+ Un.displayName = "ScriptEditorToolbar";
1376
+ const _n = $(O((e2, t2) => {
1377
+ const { scriptPath: o2 = zn, onScriptSelect: n2, sx: a2 = ht.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = U([]), [p2, u2] = U(true), [g2, h2] = U(null);
1378
+ if (_(() => {
1531
1379
  (async () => {
1532
1380
  const e3 = [{ path: null, metadata: { title: "Blank Template...", summary: "Start with an empty script." }, content: "" }];
1533
1381
  try {
1534
- u2(true), g2(null);
1535
- const t3 = await Un(o2);
1382
+ u2(true), h2(null);
1383
+ const t3 = await $n(o2);
1536
1384
  for (let o3 = 0; o3 < t3.length; o3++) {
1537
1385
  const n3 = t3[o3];
1538
1386
  n3 && e3.push(n3);
1539
1387
  }
1540
1388
  } catch (e4) {
1541
- g2(e4 instanceof Error ? e4.message : "Failed to load scripts"), e4 instanceof Ut || console.error("Error loading scripts:", e4);
1389
+ h2(e4 instanceof Error ? e4.message : "Failed to load scripts"), e4 instanceof qt || console.error("Error loading scripts:", e4);
1542
1390
  } finally {
1543
1391
  m2(e3), u2(false);
1544
1392
  }
1545
1393
  })();
1546
- }, [o2]), p2) return z(Q, { 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(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})`, ...a2 }, ...d2, children: z(ge, {}) });
1394
+ }, [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, {}) });
1547
1395
  let f2 = null;
1548
- h2 && (f2 = L(Q, { 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(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})` }, ...d2, children: [z(ee, { color: "error", variant: "h6", component: "div", gutterBottom: true, children: "Error loading Templates" }), z(ee, { color: "error", component: "div", children: h2 })] }));
1396
+ 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 })] }));
1549
1397
  const x2 = (e3) => {
1550
1398
  const t3 = e3.metadata?.icon;
1551
1399
  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;
1552
1400
  };
1553
- return L(Q, { ref: t2, className: mt(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})`, ...a2 }, ...d2, children: [L(Q, { 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(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(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(Q, { 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] });
1401
+ 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] });
1554
1402
  }));
1555
- Yn.displayName = "TemplateSelectPanel";
1556
- const Jn = $(O((e2, t2) => {
1557
- const { className: o2, sx: n2, editorProps: a2, commands: r2, readOnly: l2 = false, frame: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 = Lt(), [u2, h2] = U(false), g2 = q(false), [f2, x2] = U({ message: "Loading", cursor: "", dirty: false }), [b2, y2] = U(null);
1558
- j(() => {
1403
+ _n.displayName = "TemplateSelectPanel";
1404
+ const jn = $(O((e2, t2) => {
1405
+ 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] = U(false), h2 = q(false), [f2, x2] = U({ message: "Loading", cursor: "", dirty: false }), [b2, y2] = U(null);
1406
+ _(() => {
1559
1407
  let e3 = false;
1560
1408
  return y2(null), (async function() {
1561
1409
  if (c2 && (await c2.start(), !e3)) {
@@ -1566,38 +1414,38 @@ const Jn = $(O((e2, t2) => {
1566
1414
  e3 = true;
1567
1415
  };
1568
1416
  }, [c2]);
1569
- const w2 = G((e3) => {
1417
+ const w2 = K((e3) => {
1570
1418
  x2((t3) => ({ ...t3, ...e3 }));
1571
- }, []), k2 = q(null), [S2, v2] = U(null), T2 = q(null), P2 = ht((e3) => {
1572
- if (S2) return S2.focus(e3), true;
1419
+ }, []), S2 = q(null), [k2, v2] = U(null), T2 = q(null), R2 = gt((e3) => {
1420
+ if (k2) return k2.focus(e3), true;
1573
1421
  if (s2) {
1574
- const t3 = k2.current?.querySelectorAll?.(s2);
1422
+ const t3 = S2.current?.querySelectorAll?.(s2);
1575
1423
  if (t3 && t3.length > 0) return t3[0]?.focus?.(e3), true;
1576
1424
  }
1577
- return k2.current?.focus?.(e3), false;
1578
- }, [S2, s2, d2]), R2 = V(() => z(Fe, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), D2 = V(() => z(he, { 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(Zn, { commands: r2 }) }), [p2, r2]), M2 = V(() => z(Q, { 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]), F2 = V(() => L(Q, { className: mt("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [D2, z(Q, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: z(C, { ref: k2, loadingPanel: R2, readOnly: l2, frame: i2, autoFocus: d2, commands: r2, onStatusChange: w2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), M2] }), [p2, r2, D2, M2, u2, R2, l2, a2, d2, s2, i2, w2]), B2 = V(() => {
1425
+ return S2.current?.focus?.(e3), false;
1426
+ }, [k2, s2, d2]), P2 = V(() => z(Fe, { 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]), M2 = 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]), F2 = 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 }) }), M2] }), [p2, r2, D2, M2, u2, P2, l2, a2, d2, s2, i2, w2]), N2 = V(() => {
1579
1427
  let e3;
1580
- return null === b2 ? null : (null === b2.source && (e3 = z(Yn, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
1581
- k2.current?.getEditor()?.insertSnippet(e4.content), y2({ source: e4.content ?? "" });
1582
- } })), z(Q, { 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) => {
1583
- e4.isDefaultPrevented() || k2.current?.focus();
1584
- }, children: L(Q, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [F2, e3] }) }));
1585
- }, [D2, F2, o2, b2]), N2 = Ct(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
1586
- P2(e3);
1428
+ return null === b2 ? null : (null === b2.source && (e3 = z(_n, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
1429
+ S2.current?.getEditor()?.insertSnippet(e4.content), y2({ source: e4.content ?? "" });
1430
+ } })), 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) => {
1431
+ e4.isDefaultPrevented() || S2.current?.focus();
1432
+ }, children: L(J, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [F2, e3] }) }));
1433
+ }, [D2, F2, o2, b2]), B2 = Ct(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
1434
+ R2(e3);
1587
1435
  } }), []);
1588
- return z(Q, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: N2, ...m2, onFocus: (e3) => {
1589
- h2(true), g2.current = true, N2.current?.contains(e3.target) && e3.target !== N2.current && v2(e3.target), e3.relatedTarget && !T2.current && (T2.current = e3.relatedTarget), m2?.onFocus?.(e3);
1436
+ return z(J, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: B2, ...m2, onFocus: (e3) => {
1437
+ 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);
1590
1438
  }, onBlur: (e3) => {
1591
- N2?.current?.contains(e3.relatedTarget) || N2?.current === e3.relatedTarget || (T2.current = null, g2.current = false, h2(false)), m2?.onBlur?.(e3);
1592
- }, children: B2 });
1439
+ B2?.current?.contains(e3.relatedTarget) || B2?.current === e3.relatedTarget || (T2.current = null, h2.current = false, g2(false)), m2?.onBlur?.(e3);
1440
+ }, children: N2 });
1593
1441
  }));
1594
- Jn.displayName = "ScriptWorkspace";
1595
- const Qn = (e2, t2) => {
1442
+ jn.displayName = "ScriptWorkspace";
1443
+ const qn = (e2, t2) => {
1596
1444
  const { model: o2, commands: n2, entryKey: a2, frame: r2, ...l2 } = e2;
1597
- return z(Jn, { ref: t2, readOnly: false, commands: n2, frame: r2, scripts: o2?.getScripts(), ...l2 });
1598
- }, ea = $(O((e2, t2) => {
1445
+ return z(jn, { ref: t2, readOnly: false, commands: n2, frame: r2, scripts: o2?.getScripts(), ...l2 });
1446
+ }, Xn = $(O((e2, t2) => {
1599
1447
  const { commands: o2, ...n2 } = e2, a2 = pt(o2, ["executeScript", "showScriptEditor"]), [r2, l2] = U([]), [i2, s2] = U(false), d2 = a2[0]?.context?.();
1600
- j(() => {
1448
+ _(() => {
1601
1449
  const e3 = d2?.getScripts();
1602
1450
  if (!e3) return;
1603
1451
  (async () => {
@@ -1611,19 +1459,19 @@ const Qn = (e2, t2) => {
1611
1459
  const t3 = r2[e3];
1612
1460
  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}`));
1613
1461
  }
1614
- 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(Te, { orientation: "horizontal" })] }) : null, X(ve, { ...c2, key: "show-editor", command: o2.getCommand("showScriptEditor") })] });
1615
- return Pe({ ...n2, children: u2 });
1462
+ 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") })] });
1463
+ return Re({ ...n2, children: u2 });
1616
1464
  }));
1617
- ea.displayName = "RunScriptPopupPanel";
1618
- const ta = $(O((e2, t2) => {
1619
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = "showScriptEditor", s2 = pt(o2, ["executeScript", "showScriptEditor"])[0].context(), d2 = G((e3, t3) => {
1620
- const o3 = z(ea, { ...e3, commands: t3 });
1621
- return Pe({ ...e3, children: o3 });
1465
+ Xn.displayName = "RunScriptPopupPanel";
1466
+ const Zn = $(O((e2, t2) => {
1467
+ 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) => {
1468
+ const o3 = z(Xn, { ...e3, commands: t3 });
1469
+ return Re({ ...e3, children: o3 });
1622
1470
  }, [r2, s2, n2, a2]);
1623
- 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 });
1624
- })), oa = (e2) => z(ve, { ...e2 }), na = $(O((e2, t2) => {
1471
+ 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 });
1472
+ })), Yn = (e2) => z(ve, { ...e2 }), Qn = $(O((e2, t2) => {
1625
1473
  const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, [l2, i2] = U(false), s2 = pt(o2, ["executeScript", "showScriptEditor"]), d2 = s2[0]?.context?.();
1626
- j(() => {
1474
+ _(() => {
1627
1475
  const e3 = d2?.getScripts();
1628
1476
  if (!e3) return;
1629
1477
  const t3 = s2[1], o3 = async () => {
@@ -1645,7 +1493,7 @@ const ta = $(O((e2, t2) => {
1645
1493
  a3(), n3();
1646
1494
  };
1647
1495
  }, [d2]);
1648
- const c2 = v(), m2 = G((e3) => {
1496
+ const c2 = v(), m2 = K((e3) => {
1649
1497
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3, r3 = T.findContributions("ribbon/home");
1650
1498
  let i3;
1651
1499
  const s3 = r3.length;
@@ -1654,50 +1502,60 @@ const ta = $(O((e2, t2) => {
1654
1502
  for (let e4 = 0; e4 < s3; e4++) {
1655
1503
  const t4 = r3[e4], o3 = t4.createCommand?.(c2);
1656
1504
  if (!o3) continue;
1657
- const n3 = { command: o3, ...a3 }, l3 = (t4.createCommandButton ?? oa)(n3);
1505
+ const n3 = { command: o3, ...a3 }, l3 = (t4.createCommandButton ?? Yn)(n3);
1658
1506
  i3.push(l3);
1659
1507
  }
1660
1508
  }
1661
- const d3 = z(Ho, { ...a3, command: o2.getCommand("formatFontColor"), icon: z(xt, { iconKey: "text.colored" }), isSplit: true, panelProps: { disableAlpha: true } }), m3 = z(Ho, { ...a3, command: o2.getCommand("formatFillColor"), icon: z(xt, { iconKey: "fill.colored" }), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: io.End } }), p2 = o2.getCommand("undo") ? z(H, { children: z(Oo, { ...a3, quickCommand: "undo" }) }) : null, u2 = o2.getCommand("find") ? z(H, { children: z(Mo, { ...a3 }) }) : null;
1662
- let h2 = null;
1663
- l2 && (h2 = L(H, { children: [z(Te, {}), z(ta, { ...a3 })] }));
1664
- return L(Vn, { parentFloat: n2, children: [p2, null, p2 ? z(Te, {}) : null, z(_o, { ...a3, command: o2.getCommand("paste") }), z(ve, { ...t3, command: o2.getCommand("formatPainterToggle") }), z(fn, { ...t3, command: o2.getCommand("copy") }), z(Te, {}), z(Ko, { ...a3, command: o2.getCommand("formatFontFamily") }), z(Fo, { ...a3, command: o2.getCommand("formatFontSize") }), z(ve, { ...t3, command: o2.getCommand("formatBoldToggle") }), z(ve, { ...t3, command: o2.getCommand("formatItalicToggle") }), z(jo, { ...a3 }), z(Uo, { ...a3 }), z(Po, { ...a3 }), m3, d3, z(Te, {}), z(oo, { ...a3 }), z(no, { ...a3 }), z(ro, { ...a3 }), z(ao, { ...a3 }), z(Ro, { ...a3 }), z(Te, {}), z(No, { ...a3 }), z(Jo, { command: o2.getCommand("formatCellStyle"), ...a3 }), z(ln, { command: o2.getCommand("formatTableStyle"), ...a3 }), z(Te, {}), z(Io, { ...a3 }), z(Lo, { ...a3 }), z(Te, {}), z(Ao, { ...a3 }), null, z(Eo, { ...a3 }), z(Wo, { ...a3 }), u2, h2, i3] });
1509
+ const d3 = z($o, { ...a3, command: o2.getCommand("formatFontColor"), icon: z(xt, { iconKey: "text.colored" }), isSplit: true, panelProps: { disableAlpha: true } }), m3 = z($o, { ...a3, command: o2.getCommand("formatFillColor"), icon: z(xt, { iconKey: "fill.colored" }), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: mo.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;
1510
+ let g2 = null;
1511
+ l2 && (g2 = L(H, { children: [z(Te, {}), z(Zn, { ...a3 })] }));
1512
+ return L(Hn, { parentFloat: n2, children: [p2, null, p2 ? z(Te, {}) : null, z(Zo, { ...a3, command: o2.getCommand("paste") }), z(ve, { ...t3, command: o2.getCommand("formatPainterToggle") }), z(fa, { ...t3, command: o2.getCommand("copy") }), z(Te, {}), z(jo, { ...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(Xo, { ...a3 }), z(qo, { ...a3 }), z(Mo, { ...a3 }), m3, d3, z(Te, {}), z(ro, { ...a3 }), z(lo, { ...a3 }), z(so, { ...a3 }), z(io, { ...a3 }), z(Fo, { ...a3 }), z(Te, {}), z(Io, { ...a3 }), z(tn, { command: o2.getCommand("formatCellStyle"), ...a3 }), z(Ea, { command: o2.getCommand("formatTableStyle"), ...a3 }), z(Te, {}), z(zo, { ...a3 }), z(Wo, { ...a3 }), z(Te, {}), z(Ha, { ...a3 }), z(Ho, { ...a3 }), z(Lo, { ...a3 }), z(Vo, { ...a3 }), u2, g2, i3] });
1665
1513
  }, [o2, s2, l2, c2]);
1666
1514
  return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: m2, ...r2 });
1667
1515
  }));
1668
- na.displayName = "HomeToolbar";
1669
- const aa = $(O((e2, t2) => {
1670
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = ht((e3) => {
1516
+ Qn.displayName = "HomeToolbar";
1517
+ const Jn = $(O((e2, t2) => {
1518
+ 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(() => {
1519
+ let e3 = null, t3 = 0;
1520
+ for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === ut.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
1521
+ return { singleMenuCommand: e3, allDisabled: 0 === t3 };
1522
+ }, [c2]), u2 = K((e3, t3) => {
1523
+ 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") })] });
1524
+ return Re({ ...e3, children: a3 });
1525
+ }, [r2, n2, a2]);
1526
+ 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 });
1527
+ })), ea = $(O((e2, t2) => {
1528
+ const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
1671
1529
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1672
- return L(Vn, { parentFloat: n2, children: [z(ve, { ...t3, command: o2.getCommand("insertTable") }), z(gn, { ...a3 }), null, z(ve, { ...t3, command: o2.getCommand("updateHyperlink") }), z(ve, { ...t3, command: o2.getCommand("updateComments") })] });
1530
+ return L(Hn, { parentFloat: n2, children: [z(ve, { ...t3, command: o2.getCommand("insertTable") }), z(Jn, { ...a3 }), null, z(ve, { ...t3, command: o2.getCommand("updateHyperlink") }), z(ve, { ...t3, command: o2.getCommand("updateComments") })] });
1673
1531
  }, [o2]);
1674
1532
  return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1675
1533
  }));
1676
- aa.displayName = "InsertToolbar";
1677
- const ra = $(O((e2, t2) => {
1678
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = ht((e3) => {
1534
+ ea.displayName = "InsertToolbar";
1535
+ const ta = $(O((e2, t2) => {
1536
+ const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
1679
1537
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1680
- return L(Vn, { parentFloat: n2, children: [z(Do, { ...a3 }), z(ve, { ...t3, command: o2.getCommand("protectionSheetToggle") }), z(Te, {}), z(zo, { ...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(Xo, { ...a3 }), z(pn, { command: o2.getCommand("selectTheme"), ...a3 }), z(Te, {}), z(ta, { ...a3, scope: "view" }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view" })] });
1538
+ return L(Hn, { parentFloat: n2, children: [z(No, { ...a3 }), z(ve, { ...t3, command: o2.getCommand("protectionSheetToggle") }), z(Te, {}), z(Oo, { ...a3 }), z(Yo, { ...a3 }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view" }), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view" }), z(Te, {}), z(Qo, { ...a3 }), z(Aa, { command: o2.getCommand("selectTheme"), ...a3 }), z(Te, {}), z(Zn, { ...a3, scope: "view" }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view" })] });
1681
1539
  }, [o2]);
1682
1540
  return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1683
1541
  }));
1684
- ra.displayName = "ViewToolbar";
1685
- const la = (e2) => z(ca, { ...e2 }), ia = $((e2) => {
1542
+ ta.displayName = "ViewToolbar";
1543
+ const oa = (e2) => z(la, { ...e2 }), na = $((e2) => {
1686
1544
  const { sx: t2, ...o2 } = e2;
1687
- return L(Q, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${Ht(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [z(be, { disableRipple: true, onMouseDown: (e3) => {
1545
+ 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) => {
1688
1546
  0 === e3.button && e3.preventDefault();
1689
- }, 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" } })] });
1690
- }), sa = $((e2) => {
1547
+ }, 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" } })] });
1548
+ }), aa = $((e2) => {
1691
1549
  const { toolbars: t2, value: o2, onToolbarChange: n2, sx: a2, ...r2 } = e2, l2 = V(() => {
1692
1550
  const e3 = [];
1693
- for (let o3 = 0; o3 < t2.length; o3++) e3.push(z(ia, { label: t2[o3].label }, t2[o3].label));
1551
+ for (let o3 = 0; o3 < t2.length; o3++) e3.push(z(na, { label: t2[o3].label }, t2[o3].label));
1694
1552
  return e3;
1695
1553
  }, [t2]);
1696
- return z(xe, { value: o2, onChange: (e3, t3) => {
1554
+ return z(fe, { value: o2, onChange: (e3, t3) => {
1697
1555
  n2?.(t3);
1698
1556
  }, 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 });
1699
- }), da = $((e2) => {
1700
- const { toolbars: t2, value: o2, onToolbarChange: n2, selectProps: a2, ...r2 } = e2, l2 = G((e3) => {
1557
+ }), ra = $((e2) => {
1558
+ const { toolbars: t2, value: o2, onToolbarChange: n2, selectProps: a2, ...r2 } = e2, l2 = K((e3) => {
1701
1559
  n2?.(e3.target.value);
1702
1560
  }, [n2]), i2 = V(() => {
1703
1561
  const e3 = [];
@@ -1709,36 +1567,36 @@ const la = (e2) => z(ca, { ...e2 }), ia = $((e2) => {
1709
1567
  }
1710
1568
  return e3;
1711
1569
  }, [t2, o2]);
1712
- return z(ce, { 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(fe, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})` }, ...r2, children: i2 }) });
1713
- }), ca = $(O((e2, t2) => {
1570
+ 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 }) });
1571
+ }), la = $(O((e2, t2) => {
1714
1572
  const { commands: o2, selectWrapper: n2, selectProps: a2 = {}, renderCompact: r2 = false, paletteWrapper: l2, toolbarsProps: i2, paletteProps: s2 = {}, workbook: d2, sx: c2, ...m2 } = e2, p2 = V(() => {
1715
1573
  const e3 = [], { ref: t3, ...n3 } = i2?.Home || {};
1716
- e3.push({ label: "Home", component: z(na, { commands: o2, ...n3 }) });
1574
+ e3.push({ label: "Home", component: z(Qn, { commands: o2, ...n3 }) });
1717
1575
  const { ref: a3, ...r3 } = i2?.Insert || {};
1718
- e3.push({ label: "Insert", component: z(aa, { commands: o2, ...r3 }) });
1576
+ e3.push({ label: "Insert", component: z(ea, { commands: o2, ...r3 }) });
1719
1577
  const { ref: l3, ...s3 } = i2?.View || {};
1720
- return e3.push({ label: "View", component: z(ra, { commands: o2, ...s3 }) }), e3;
1578
+ return e3.push({ label: "View", component: z(ta, { commands: o2, ...s3 }) }), e3;
1721
1579
  }, [o2, d2]), u2 = V(() => {
1722
1580
  const e3 = [];
1723
1581
  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 }));
1724
1582
  return e3;
1725
- }, [p2]), [h2, g2] = U(0), f2 = (e3) => {
1726
- g2(e3);
1727
- }, x2 = V(() => z(r2 ? da : sa, { toolbars: p2, value: h2, onToolbarChange: f2, sx: a2 }), [p2, h2, a2, r2]), { sx: b2, ...y2 } = s2, w2 = z(he, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(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[h2] });
1728
- 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] });
1583
+ }, [p2]), [g2, h2] = U(0), f2 = (e3) => {
1584
+ h2(e3);
1585
+ }, 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] });
1586
+ 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] });
1729
1587
  }));
1730
- ca.displayName = "WorkbookToolbars";
1731
- const ma = (e2) => {
1732
- const { workbook: t2, workbookElement: o2, target: n2, commands: a2, darkMode: r2, onNewWorkbook: l2 = pa } = e2, i2 = kt(), [s2, d2] = U(t2?.getSelectedSheet()), [c2, m2] = U(t2?.getSheets().getItems()), p2 = ht(l2, [l2]), h2 = v(), g2 = 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: [Dt.Ctrl, Dt.Shift] } }), new Pt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Pt("showFormat", n2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("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 Rt("deleteCellStyle", n2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new Rt("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: [Dt.Ctrl] }, { key: "F5", modifiers: [Dt.Shift] }] }), new Pt("findReplace", n2, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [Dt.Ctrl] }, { key: "H", modifiers: [Dt.Ctrl, Dt.Alt] }] }), new Pt("goto", n2, { label: "Go To", description: "Open the 'Go To' window.", icon: "Goto", shortcut: [{ key: "G", modifiers: [Dt.Ctrl] }] }), new Pt("workbookViewToggleExpandFormulaBar", n2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [Dt.Ctrl, Dt.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 Rt("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 Rt("deleteSheet", n2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new Rt("addSheet", n2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [Dt.Shift] }, { key: "F1", modifiers: [Dt.Alt, Dt.Shift] }] }), new Rt("duplicateSheet", n2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new Rt("nextSheet", n2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Dt.Ctrl] }] }), new Rt("previousSheet", n2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Dt.Ctrl] }] }), new Rt("selectNextSheet", n2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Dt.Ctrl, Dt.Shift] }] }), new Rt("selectPreviousSheet", n2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Dt.Ctrl, Dt.Shift] }] }), new Rt("selectTheme", n2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new Rt("selectNamed", n2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new Rt("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: "NamedRangeInsert" }), new Rt("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 Rt("deleteNamedReference", n2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "NamedRangeRemove" }), new Pt("activeNameBox", n2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [Dt.Alt] } }), new Pt("createNamedReferenceFromSelection", n2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [Dt.Ctrl, Dt.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: [Dt.Ctrl] } }), new Rt("fullScreenToggle", n2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new Rt("showScriptEditor", n2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [Dt.Alt] }] }), new Rt("executeScript", n2, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Rt("executeSelectedScript", n2, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Rt("saveScripts", n2, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new Rt("maximumWorkbookToggle", n2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [Dt.Ctrl] } }), new Rt("spellCheck", n2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new Rt("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: [Dt.Ctrl] } }), new Pt("newWorkbook", n2, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []), f2 = V(() => {
1588
+ la.displayName = "WorkbookToolbars";
1589
+ const ia = (e2) => {
1590
+ const { workbook: t2, workbookElement: o2, target: n2, commands: a2, darkMode: r2, onNewWorkbook: l2 = sa } = e2, i2 = St(), [s2, d2] = U(t2?.getSelectedSheet()), [c2, m2] = U(t2?.getSheets().getItems()), p2 = gt(l2, [l2]), g2 = v(), h2 = V(() => [new Rt("activateTask", n2, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new Rt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("showFormat", n2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Pt("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 Pt("deleteCellStyle", n2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new Pt("modifyCellStyle", n2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Rt("find", n2, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [Dt.Ctrl] }, { key: "F5", modifiers: [Dt.Shift] }] }), new Rt("findReplace", n2, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [Dt.Ctrl] }, { key: "H", modifiers: [Dt.Ctrl, Dt.Alt] }] }), new Rt("goto", n2, { label: "Go To", description: "Open the 'Go To' window.", icon: "Goto", shortcut: [{ key: "G", modifiers: [Dt.Ctrl] }] }), new Rt("workbookViewToggleExpandFormulaBar", n2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("workbookViewToggleShowFormulaBar", n2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Rt("workbookViewToggleShowTabs", n2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Rt("workbookViewToggleShowStatusBar", n2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Rt("workbookViewToggleShowHorizontalScrollBar", n2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Rt("workbookViewToggleShowVerticalScrollBar", n2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new Pt("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 Pt("deleteSheet", n2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new Pt("addSheet", n2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [Dt.Shift] }, { key: "F1", modifiers: [Dt.Alt, Dt.Shift] }] }), new Pt("duplicateSheet", n2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new Pt("nextSheet", n2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Dt.Ctrl] }] }), new Pt("previousSheet", n2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Dt.Ctrl] }] }), new Pt("selectNextSheet", n2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Dt.Ctrl, Dt.Shift] }] }), new Pt("selectPreviousSheet", n2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Dt.Ctrl, Dt.Shift] }] }), new Pt("selectTheme", n2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new Pt("selectNamed", n2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new Pt("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: "NamedRangeInsert" }), new Pt("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 Pt("deleteNamedReference", n2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "NamedRangeRemove" }), new Rt("activeNameBox", n2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [Dt.Alt] } }), new Rt("createNamedReferenceFromSelection", n2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [Dt.Ctrl, Dt.Shift] } }), new Rt("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: [Dt.Ctrl] } }), new Pt("fullScreenToggle", n2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new Pt("showScriptEditor", n2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [Dt.Alt] }] }), new Pt("executeScript", n2, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Pt("executeSelectedScript", n2, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Pt("saveScripts", n2, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new Pt("maximumWorkbookToggle", n2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [Dt.Ctrl] } }), new Pt("spellCheck", n2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new Pt("calculateAll", n2, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } }), new Rt("closeWorkbook", n2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [Dt.Ctrl] } }), new Rt("newWorkbook", n2, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []), f2 = V(() => {
1733
1591
  let e3 = null;
1734
- return e3 = a2 ? a2.createChildGroup(n2, "workbook", false) : new Mt(n2, "workbook"), e3.addCommands(g2, true), e3;
1735
- }, [a2, g2]), x2 = yt(), b2 = W.useRef(null), y2 = ht(() => {
1592
+ return e3 = a2 ? a2.createChildGroup(n2, "workbook", false) : new Mt(n2, "workbook"), e3.addCommands(h2, true), e3;
1593
+ }, [a2, h2]), x2 = wt(), b2 = W.useRef(null), y2 = gt(() => {
1736
1594
  let e3, o3 = null;
1737
1595
  const n3 = f2.getCommand("executeScript");
1738
1596
  if (n3.update({ disabled: false, context: { getScripts: () => t2.getScripts() } }), !n3) return;
1739
1597
  const a3 = f2.getCommand("showScriptEditor");
1740
1598
  a3.updateCallback(function(e4 = true) {
1741
- o3 ? o3.close() : h2.activateTaskPane("scriptEditor", {});
1599
+ o3 ? o3.close() : g2.activateTaskPane("scriptEditor", {});
1742
1600
  });
1743
1601
  const r3 = f2.getCommand("executeSelectedScript");
1744
1602
  if (!r3) return;
@@ -1755,8 +1613,8 @@ const ma = (e2) => {
1755
1613
  n4?.(), console.warn("Unable to compile", e5), i2.showError(e5);
1756
1614
  }
1757
1615
  return o4;
1758
- }, addContainerListener: (e4) => (k2.current = e4, () => {
1759
- k2.current = null;
1616
+ }, addContainerListener: (e4) => (S2.current = e4, () => {
1617
+ S2.current = null;
1760
1618
  }), setSelectedFunction: (t3) => {
1761
1619
  e3 = t3 ?? b2.current ?? null, Promise.resolve(e3).then((e4) => {
1762
1620
  r3.update({ disabled: null === e4 });
@@ -1774,14 +1632,14 @@ const ma = (e2) => {
1774
1632
  return null;
1775
1633
  }, getScripts: () => t2.getScripts() };
1776
1634
  r3.update({ context: l3 });
1777
- }, [f2, t2, o2, i2]), k2 = W.useRef(null);
1635
+ }, [f2, t2, o2, i2]), S2 = W.useRef(null);
1778
1636
  w(t2, { onBeforeSave: async () => {
1779
- await k2.current?.onBeforeSave();
1637
+ await S2.current?.onBeforeSave();
1780
1638
  }, onProtectionChange: () => {
1781
- k2.current?.onReadonlyChange();
1639
+ S2.current?.onReadonlyChange();
1782
1640
  }, onLoad: () => {
1783
1641
  (async () => {
1784
- await t2.getCalculation().start(), t2.getScripts().start(), k2.current?.onScriptChange();
1642
+ await t2.getCalculation().start(), t2.getScripts().start(), S2.current?.onScriptChange();
1785
1643
  })();
1786
1644
  } }), w(t2, { onSheetsChange: (e3) => {
1787
1645
  m2(e3.getSheets().getItems());
@@ -1793,11 +1651,11 @@ const ma = (e2) => {
1793
1651
  }, onScriptsChange: (e3) => {
1794
1652
  y2();
1795
1653
  } });
1796
- const { isFullscreenAvailable: S2, isFullscreenEnabled: C2, toggleFullscreen: T2 } = Zt({ target: { current: o2 ?? document.body } }), R2 = P();
1797
- j(() => {
1798
- f2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: R2, darkMode: r2 }) });
1654
+ const { isFullscreenAvailable: k2, isFullscreenEnabled: C2, toggleFullscreen: T2 } = eo({ target: { current: o2 ?? document.body } }), P2 = R();
1655
+ _(() => {
1656
+ f2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: P2, darkMode: r2 }) });
1799
1657
  }, [t2?.getTheme(), r2]);
1800
- const D2 = ht(async function(e3, o3) {
1658
+ const D2 = gt(async function(e3, o3) {
1801
1659
  let n3 = null;
1802
1660
  const a3 = t2.getScripts();
1803
1661
  if (e3?.declaration || e3?.functionName) {
@@ -1811,7 +1669,7 @@ const ma = (e2) => {
1811
1669
  return void i2.showError(e4);
1812
1670
  }
1813
1671
  }, [t2, i2]);
1814
- j(() => {
1672
+ _(() => {
1815
1673
  f2.getCommand("newCellStyle").updateCallback((e3) => {
1816
1674
  i2.showInputOptions({ initialValue: (() => {
1817
1675
  let e4 = 0;
@@ -1870,7 +1728,7 @@ const ma = (e2) => {
1870
1728
  p2?.();
1871
1729
  }), f2.getCommand("executeScript").updateCallback(D2), f2.getCommand("executeSelectedScript").updateCallback(D2);
1872
1730
  }, [t2, i2]);
1873
- const M2 = ht(async (e3) => {
1731
+ const M2 = gt(async (e3) => {
1874
1732
  let o3 = 0, n3 = null, a3 = "Find & Replace";
1875
1733
  e3?.replace && !e3?.replaceOptions?.maxCount && (a3 = "Replace All");
1876
1734
  const r3 = await i2.showBusy(a3);
@@ -1878,7 +1736,7 @@ const ma = (e2) => {
1878
1736
  const a4 = e3?.scope ?? "sheet";
1879
1737
  let l3 = null;
1880
1738
  const s3 = t2.getSelectedSheet(), d3 = { from: s3.getSelectedCell(), ...e3.findOptions };
1881
- if (l3 = "sheet" === a4 ? t2.getSelectedSheet().find(e3.findText, d3) : t2.find(e3.findText, d3), e3.replace) {
1739
+ if (l3 = "sheet" === a4 ? t2.getSelectedSheet().find(d3) : t2.find(d3), e3.replace) {
1882
1740
  const a5 = t2.replace(l3, e3.replaceText, e3.replaceOptions);
1883
1741
  o3 = a5.count, e3.replaceOptions.maxCount && (n3 = a5.last);
1884
1742
  } else {
@@ -1890,7 +1748,7 @@ const ma = (e2) => {
1890
1748
  r3?.(), i2.showError(e4);
1891
1749
  }
1892
1750
  return o3;
1893
- }, [t2, o2]), F2 = ht((e3) => {
1751
+ }, [t2, o2]), F2 = gt((e3) => {
1894
1752
  const o3 = { value: e3, context: { selection: () => {
1895
1753
  const e4 = t2.getSelectedRanges(), o4 = [];
1896
1754
  for (let t3 = 0; t3 < e4.getCount(); t3++) {
@@ -1902,16 +1760,16 @@ const ma = (e2) => {
1902
1760
  try {
1903
1761
  await e4.select();
1904
1762
  } catch (e5) {
1905
- i2.showMessage(e5.message, { type: St.Error });
1763
+ i2.showMessage(e5.message, { type: kt.Error });
1906
1764
  }
1907
1765
  } };
1908
1766
  return i2.showWindow("namedDetails", o3);
1909
1767
  }, [i2, t2, o2]);
1910
- return j(() => {
1768
+ return _(() => {
1911
1769
  const e3 = (e4 = false) => {
1912
1770
  const o3 = t2.getSelectedCell(), n3 = { onFindOrReplace: M2, onKeyDown: (e5) => {
1913
1771
  f2.findCommandByEvent(e5) !== f2.getCommand("find") && f2.findCommandByEvent(e5) !== f2.getCommand("findReplace") || e5.preventDefault();
1914
- }, findOptions: {}, findText: o3.toTextUnformatted(true) };
1772
+ }, findOptions: { text: "" }, findText: o3.toTextUnformatted(true) };
1915
1773
  n3.replace = e4, i2.showWindow?.("find", n3, { disableAutoDestroy: true });
1916
1774
  };
1917
1775
  f2.getCommand("find")?.update({ disabled: !i2.showWindow }).updateCallback(() => {
@@ -1921,9 +1779,9 @@ const ma = (e2) => {
1921
1779
  }), f2.getCommand("activateTask")?.update({ disabled: !i2 }).updateCallback(() => {
1922
1780
  const e4 = { onInputOption: async (e5) => {
1923
1781
  try {
1924
- h2.activateTaskPane(e5);
1782
+ g2.activateTaskPane(e5);
1925
1783
  } catch (e6) {
1926
- i2.showMessage(e6.message, { type: St.Error });
1784
+ i2.showError(e6.message);
1927
1785
  }
1928
1786
  }, title: f2.getCommand("activateTask")?.label(), inputLabel: "Task Name", options: ["Activate"] };
1929
1787
  i2.showInputOptions(e4);
@@ -1932,7 +1790,7 @@ const ma = (e2) => {
1932
1790
  try {
1933
1791
  await t2.getRanges(e5).select();
1934
1792
  } catch (e6) {
1935
- i2.showMessage(e6.message, { type: St.Error });
1793
+ i2.showMessage(e6.message, { type: kt.Error });
1936
1794
  }
1937
1795
  }, onKeyDown: (e5) => {
1938
1796
  f2.findCommandByEvent(e5) === f2.getCommand("goto") && e5.preventDefault();
@@ -1965,67 +1823,67 @@ const ma = (e2) => {
1965
1823
  }), f2.getCommand("workbookViewToggleShowVerticalScrollBar").update({ state: e3.isShowVerticalScrollbar() }).updateCallback(() => {
1966
1824
  e3.setShowVerticalScrollbar(!e3.isShowVerticalScrollbar());
1967
1825
  });
1968
- } }), j(() => {
1969
- f2.getCommand("fullScreenToggle").update({ state: C2, disabled: !S2, icon: C2 ? "FullScreenOff" : "FullScreen" }).updateCallback(() => {
1826
+ } }), _(() => {
1827
+ f2.getCommand("fullScreenToggle").update({ state: C2, disabled: !k2, icon: C2 ? "FullScreenOff" : "FullScreen" }).updateCallback(() => {
1970
1828
  T2();
1971
1829
  });
1972
- }, [C2, S2]), j(() => {
1830
+ }, [C2, k2]), _(() => {
1973
1831
  const e3 = t2.getProtection().isStructureAllowed();
1974
1832
  f2.getCommand("hideSheet").update({ disabled: c2.length <= 1 || !e3 }), f2.getCommand("deleteSheet").update({ disabled: c2.length <= 1 || !e3 });
1975
1833
  }, [c2, s2]), f2;
1976
- }, pa = () => {
1834
+ }, sa = () => {
1977
1835
  window.open(window.origin.toString(), "sheetxl-" + n.uuidV4(), "popup=true");
1978
- }, ua = "_sheetxl-theme_4opcr_2", ha = "_sheetxl-workbook_g5t6x_5", ga = (e2) => z(En, { ...e2 }), fa = (e2) => z(An, { ...e2 }), xa = (e2) => z(Nn, { ...e2 }), ba = $(O((e2, t2) => {
1979
- const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = ga, sheetsAllProps: c2, renderSheetsAll: m2 = fa, sheetTabProps: p2, renderSheetTab: u2, background: h2 = "transparent", className: g2, sx: f2, borderWidth: x2, borderColor: b2, gridTheme: y2, gridStyle: k2, ...S2 } = e2, [C2, v2] = U(o2?.getSelectedSheetIndex()), [T2, P2] = U(o2?.getSheets().getItems()), [D2, M2] = U(o2?.getProtection());
1836
+ }, da = "_sheetxl-theme_4opcr_2", ca = "_sheetxl-workbook_g5t6x_5", ma = (e2) => z(Dn, { ...e2 }), pa = (e2) => z(Mn, { ...e2 }), ua = (e2) => z(Pn, { ...e2 }), ga = $(O((e2, t2) => {
1837
+ 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] = U(o2?.getSelectedSheetIndex()), [T2, R2] = U(o2?.getSheets().getItems()), [D2, M2] = U(o2?.getProtection());
1980
1838
  w(o2, { onViewChange(e3) {
1981
1839
  v2(e3?.getSelectedSheetIndex());
1982
1840
  }, onSheetsChange: (e3) => {
1983
- P2(e3.getSheets().getItems());
1841
+ R2(e3.getSheets().getItems());
1984
1842
  }, onProtectionChange: (e3) => {
1985
1843
  M2(e3?.getProtection());
1986
1844
  } });
1987
- const F2 = i2 || !D2.isStructureAllowed(), B2 = V(() => {
1845
+ const F2 = i2 || !D2.isStructureAllowed(), N2 = V(() => {
1988
1846
  const e3 = [];
1989
1847
  for (let t3 = 0; t3 < T2.length; t3++) e3.push(T2[t3].getName());
1990
1848
  return e3;
1991
- }, [T2]), N2 = G((e3) => {
1849
+ }, [T2]), B2 = K((e3) => {
1992
1850
  false !== a2?.(e3) && (o2.getSheetAt(e3).select(), r2?.(e3));
1993
- }, [o2, a2, r2]), E2 = G((e3, t3) => {
1851
+ }, [o2, a2, r2]), E2 = K((e3, t3) => {
1994
1852
  o2.getSheetAt(e3).setName(t3), r2?.(e3);
1995
- }, [o2, r2]), A2 = G((e3, t3) => {
1853
+ }, [o2, r2]), A2 = K((e3, t3) => {
1996
1854
  o2.getSheetAt(e3).setPosition(t3), r2?.(t3);
1997
- }, [o2, r2]), I2 = ht(() => {
1855
+ }, [o2, r2]), I2 = gt(() => {
1998
1856
  if (false === a2?.(C2)) return;
1999
1857
  const e3 = C2 + 1;
2000
1858
  o2.getSheets().add({ name: void 0, autoSelect: true }), r2?.(e3);
2001
- }, [o2, a2, r2, C2]), H2 = V(() => ({ placement: "top-start" }), []), W2 = q(null), [$2, O2] = U(false), K2 = G((e3) => {
1859
+ }, [o2, a2, r2, C2]), H2 = V(() => ({ placement: "top-start" }), []), W2 = q(null), [$2, O2] = U(false), G2 = K((e3) => {
2002
1860
  const { closeFloatAll: t3, floatReference: n3 } = e3;
2003
- return m2({ workbook: o2, gridStyle: k2, floatReference: n3, closeFloatAll: t3, ...c2 });
2004
- }, [m2, c2, l2, o2, k2]), { reference: _2, component: X2 } = _e({ label: "allSheet", popperProps: H2, anchor: W2.current, onOpen: () => O2(true), onClose: () => O2(false), createPopupPanel: K2 }), Z2 = q(null), [Y2, J2] = U(null), ee2 = G((e3) => {
1861
+ return m2({ workbook: o2, gridStyle: S2, floatReference: n3, closeFloatAll: t3, ...c2 });
1862
+ }, [m2, c2, l2, o2, S2]), { reference: j2, component: X2 } = _e({ label: "allSheet", popperProps: H2, anchor: W2.current, onOpen: () => O2(true), onClose: () => O2(false), createPopupPanel: G2 }), Z2 = q(null), [Y2, Q2] = U(null), ee2 = K((e3) => {
2005
1863
  const { floatReference: t3 } = e3;
2006
1864
  return d2?.({ workbook: o2, index: Y2?.index, tabStripRef: Z2.current, commands: n2, disabled: l2, floatReference: t3, ...s2 });
2007
- }, [d2, s2, l2, o2, n2, Y2]), { reference: oe2, component: ne2 } = _e({ label: "sheetTab", popperProps: H2, anchor: { getBoundingClientRect: () => new DOMRect(Y2?.left || 0, Y2?.top || 0, 0, 0) }, onClose: () => J2(null), createPopupPanel: ee2 });
2008
- j(() => {
1865
+ }, [d2, s2, l2, o2, n2, Y2]), { reference: oe2, component: ne2 } = _e({ label: "sheetTab", popperProps: H2, anchor: { getBoundingClientRect: () => new DOMRect(Y2?.left || 0, Y2?.top || 0, 0, 0) }, onClose: () => Q2(null), createPopupPanel: ee2 });
1866
+ _(() => {
2009
1867
  Y2 ? oe2.open(0) : oe2.close(0);
2010
1868
  }, [Y2]);
2011
- const ae2 = G((e3, t3) => {
2012
- e3.preventDefault(), J2({ left: e3.clientX - 2, top: e3.clientY - 4, index: t3 });
2013
- }, []), re2 = ht((e3) => {
1869
+ const ae2 = K((e3, t3) => {
1870
+ e3.preventDefault(), Q2({ left: e3.clientX - 2, top: e3.clientY - 4, index: t3 });
1871
+ }, []), re2 = gt((e3) => {
2014
1872
  let t3;
2015
1873
  try {
2016
1874
  t3 = o2?.getSheetAt(e3.index);
2017
1875
  } catch (e4) {
2018
1876
  }
2019
1877
  if (!t3) return null;
2020
- return (u2 ?? xa)({ sheet: t3, gridTheme: y2, onContextMenu: (t4) => {
2021
- N2(e3.index), ae2(t4, e3.index);
1878
+ return (u2 ?? ua)({ sheet: t3, gridTheme: y2, onContextMenu: (t4) => {
1879
+ B2(e3.index), ae2(t4, e3.index);
2022
1880
  }, ...e3, ...p2 });
2023
1881
  }, [u2, p2, o2, y2]), le2 = V(() => F2 ? null : z(Me, { 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) => {
2024
1882
  0 === e3.button && e3.preventDefault();
2025
1883
  }, onClick: () => I2(), children: z(xt, { iconKey: "AddCircle" }) }) }), [l2, F2, I2]);
2026
- return L(Q, { ref: t2, className: mt(g2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...f2 }, ...S2, children: [z(R, { ref: Z2, selectedTabIndex: C2, tabNames: B2, onSelectedTabIndexChange: N2, onTabNameChange: E2, onTabMove: A2, background: h2, borderColor: b2, borderWidth: x2, activeColor: null, disabled: l2, disableDrag: F2, createScrollStartButton: Je, createScrollEndButton: Ye, createScrollEdgeButton: Ze, createTabButton: re2, createTabDivider: (e3) => {
1884
+ 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: A2, background: g2, borderColor: b2, borderWidth: x2, activeColor: null, disabled: l2, disableDrag: F2, createScrollStartButton: Qe, createScrollEndButton: Ye, createScrollEdgeButton: Ze, createTabButton: re2, createTabDivider: (e3) => {
2027
1885
  const { key: t3, ...o3 } = e3;
2028
- return z(Te, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => Ht(e4.palette.divider, 0.25) }, ...o3 }, t3);
1886
+ return z(Te, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => Wt(e4.palette.divider, 0.25) }, ...o3 }, t3);
2029
1887
  }, editLabelProps: { readOnly: F2, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (e3) => {
2030
1888
  o2.isValidSheetNameCharacter(e3.key) || e3.preventDefault();
2031
1889
  }, onCancel: () => {
@@ -2033,277 +1891,454 @@ const ma = (e2) => {
2033
1891
  } }, children: z(Me, { 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) => {
2034
1892
  0 === e3.button && e3.preventDefault();
2035
1893
  }, onClick: () => {
2036
- $2 ? _2.close(0) : _2.open(0);
1894
+ $2 ? j2.close(0) : j2.open(0);
2037
1895
  }, 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] });
2038
1896
  }));
2039
- ba.displayName = "WorkbookStrip";
2040
- const ya = $(O((e2, t2) => {
2041
- const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = Z((e3) => e3 + 1, 0), [m2, p2] = U(o2.getSelectedSheet()), [u2, h2] = U(m2.getSelectedRanges()), [g2, f2] = U(m2.getSelectedCell());
1897
+ ga.displayName = "WorkbookStrip";
1898
+ const ha = $(O((e2, t2) => {
1899
+ const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = Z((e3) => e3 + 1, 0), [m2, p2] = U(o2.getSelectedSheet()), [u2, g2] = U(m2.getSelectedRanges()), [h2, f2] = U(m2.getSelectedCell());
2042
1900
  w(o2, { onSheetsChange() {
2043
1901
  p2(o2.getSelectedSheet());
2044
1902
  } }), w(m2.getSelection(), { onChange() {
2045
- h2(m2.getSelectedRanges()), f2(m2.getSelectedCell());
1903
+ g2(m2.getSelectedRanges()), f2(m2.getSelectedCell());
2046
1904
  } }), pt(n2, [], { onChange: () => {
2047
1905
  c2();
2048
1906
  } });
2049
1907
  const x2 = V(() => ({}), []), b2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
2050
1908
  }, onError() {
2051
1909
  console.log("onError");
2052
- } }, disabled: a2, scope: "contextMenu", parentFloat: l2 }), [a2, l2]), y2 = V(() => ({ ...x2, ...b2, variant: ut.Menuitem }), [x2, b2]), k2 = V(() => ({ commands: n2, variant: ut.Menuitem, parentFloat: l2, ...b2 }), [n2, b2, l2]), S2 = [];
1910
+ } }, 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 = [];
2053
1911
  let C2 = u2.isEntireRows(), v2 = u2.isEntireColumns();
2054
- u2 && (C2 && (S2.push(z(Te, { orientation: "horizontal" }, "context:" + S2.length)), S2.push(X(ve, { command: n2.getCommand("hideColumns"), ...y2, key: "context:" + S2.length })), S2.push(X(ve, { command: n2.getCommand("unhideColumns"), ...y2, key: "context:" + S2.length }))), v2 && (S2.push(z(Te, { orientation: "horizontal" }, "context:" + S2.length)), S2.push(X(ve, { command: n2.getCommand("hideRows"), ...y2, key: "context:" + S2.length })), S2.push(X(ve, { command: n2.getCommand("unhideRows"), ...y2, key: "context:" + S2.length }))), (C2 || v2) && S2.push(z(Te, { orientation: "horizontal" }, "context:" + S2.length)), C2 && S2.push(X(ve, { command: n2.getCommand("autoFitColumns"), ...y2, key: "context:" + S2.length })), v2 && S2.push(X(ve, { command: n2.getCommand("autoFitRows"), ...y2, key: "context:" + S2.length })));
2055
- const T2 = [], P2 = n2.getCommand("formatTableStyle"), R2 = P2?.context()?.table();
2056
- if (bt(P2), !C2 && !v2) {
2057
- if (T2.push(z(Te, { orientation: "horizontal" }, "contextBefore:" + T2.length)), g2?.getHyperlink()) T2.push(X(Ke, { ...k2, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + T2.length, quickCommand: "openHyperlink" }));
1912
+ 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 })), v2 && k2.push(X(ve, { command: n2.getCommand("autoFitRows"), ...y2, key: "context:" + k2.length })));
1913
+ const T2 = [], R2 = n2.getCommand("formatTableStyle"), P2 = R2?.context()?.table();
1914
+ if (bt(R2), !C2 && !v2) {
1915
+ if (T2.push(z(Te, { orientation: "horizontal" }, "contextBefore:" + T2.length)), h2?.getHyperlink()) T2.push(X(je, { ...S2, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + T2.length, quickCommand: "openHyperlink" }));
2058
1916
  else {
2059
1917
  const e3 = n2.getCommand("updateHyperlink");
2060
1918
  T2.push(X(ve, { command: e3, ...y2, key: "contextBefore:" + T2.length }));
2061
1919
  }
2062
- if (g2?.getComments()) T2.push(X(Ke, { ...k2, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + T2.length, quickCommand: "updateComments" }));
1920
+ if (h2?.getComments()) T2.push(X(je, { ...S2, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + T2.length, quickCommand: "updateComments" }));
2063
1921
  else {
2064
1922
  const e3 = n2.getCommand("updateComments");
2065
1923
  T2.push(X(ve, { command: e3, ...y2, key: "contextBefore:" + T2.length }));
2066
1924
  }
2067
- R2 ? T2.push(X(Ke, { ...k2, variant: ut.Menuitem, key: "contextBefore:" + T2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: R2, quickCommand: "editTable" })) : T2.push(X(ve, { command: n2.getCommand("insertTable"), ...y2, key: "context:" + S2.length })), T2.push(X(gn, { ...k2, key: "contextBefore:" + T2.length }));
1925
+ P2 ? T2.push(X(je, { ...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(Jn, { ...S2, key: "contextBefore:" + T2.length }));
2068
1926
  }
2069
- const D2 = L(H, { children: [z(ve, { command: n2.getCommand("cut"), ...y2 }), z(fn, { command: n2.getCommand("copy"), ...y2 }), z(_o, { command: n2.getCommand("paste"), ...k2, includePasteAllInPopup: false }), z(Te, { orientation: "horizontal" }), z(Wo, { ...k2 }), z(Te, { orientation: "horizontal" }), z(Io, { commands: n2, ...k2, disableSheet: true }), z(Lo, { commands: n2, ...k2, disableSheet: true }), z(Eo, { ...k2 }), T2, S2] });
2070
- return z(Q, { ref: t2, className: mt("menu", i2), sx: { ...r2 }, ...s2, children: D2 });
1927
+ const D2 = L(H, { children: [z(ve, { command: n2.getCommand("cut"), ...y2 }), z(fa, { command: n2.getCommand("copy"), ...y2 }), z(Zo, { command: n2.getCommand("paste"), ...S2, includePasteAllInPopup: false }), z(Te, { orientation: "horizontal" }), z(Vo, { ...S2 }), z(Te, { orientation: "horizontal" }), z(zo, { commands: n2, ...S2, disableSheet: true }), z(Wo, { commands: n2, ...S2, disableSheet: true }), z(Lo, { ...S2 }), T2, k2] });
1928
+ return z(J, { ref: t2, className: mt("menu", i2), sx: { ...r2 }, ...s2, children: D2 });
2071
1929
  }));
2072
- ya.displayName = "WorkbookContextMenu";
2073
- const wa = $(O((e2, t2) => {
1930
+ ha.displayName = "WorkbookContextMenu";
1931
+ const fa = $(O((e2, t2) => {
1932
+ const { command: o2, ...n2 } = e2, a2 = wt(), [r2, l2] = U(false), [i2, s2] = U("info");
1933
+ return _(() => {
1934
+ const e3 = a2.getMode();
1935
+ l2("copy" === e3?.key || "cut" === e3?.key), s2("cut" === e3?.key ? "warn" : "accent");
1936
+ }, [a2]), z(ve, { ref: t2, command: o2, icon: z(xt, { iconKey: "copy.walking", sourceProps: { isWalking: r2, themedType: i2 } }), ...n2 });
1937
+ })), xa = $(O((e2, t2) => {
2074
1938
  const { movable: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2;
2075
1939
  w(o2, { onAnyChange(e3) {
2076
1940
  } });
2077
1941
  const s2 = V(() => ({}), []), d2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
2078
1942
  }, onError() {
2079
1943
  console.log("onError");
2080
- } }, 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(fn, { command: n2.getCommand("copy"), ...c2, variant: ut.Menuitem }), [], z(Te, { orientation: "horizontal" }), z(Ke, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), z(Ke, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), z(Te, { orientation: "horizontal" }), z(ve, { ...c2, command: n2.getCommand("toggleLockAspectRatio") }), z(Te, { orientation: "horizontal" }), z(Ke, { ...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(Ke, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
2081
- return z(Q, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: p2 });
1944
+ } }, 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(je, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), z(je, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), z(Te, { orientation: "horizontal" }), z(ve, { ...c2, command: n2.getCommand("toggleLockAspectRatio") }), z(Te, { orientation: "horizontal" }), z(je, { ...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(je, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
1945
+ return z(J, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: p2 });
2082
1946
  }));
2083
- wa.displayName = "MovableContextMenu";
2084
- const ka = (e2) => z(wa, { ...e2 }), Sa = (e2) => z(ya, { ...e2 }), Ca = (e2) => z(Fn, { ...e2 }), va = (e2, t2) => z(Mn, { ref: t2, ...e2 }), Ta = (e2) => z(Fe, { ...e2 }), Pa = (e2, t2) => z(D, { ref: t2, ...e2 }), Ra = (e2) => z(Pn, { ...e2 }), Da = (e2) => z(ba, { ...e2 }), Ma = { fireOnModelChange: false }, Fa = { flex: "1 1 100%", display: "flex" }, Ba = $(O((e2, t2) => {
2085
- const { workbook: o2, createWorkbookOptions: a2, onNewWorkbook: r2, onElementLoad: l2, autoFocus: i2 = false, sx: s2, style: d2, className: c2, onFocus: m2, onBlur: p2, onKeyDown: u2, onRepeatCommandChange: h2, commands: x2, showFormulaBar: b2, formulaBarProps: y2, renderFormulaBar: k2 = va, showTabs: S2, tabsProps: C2, renderTabs: v2 = Da, showStatusBar: T2, statusBarProps: R2, renderStatusBar: D2 = Ra, toolbarProps: E2, renderToolbar: A2 = la, contextMenuSx: I2, renderContextMenu: $2 = Sa, renderFilterMenu: O2 = Ca, renderMovableMenu: K2 = ka, renderLoadingPanel: _2 = Ta, loadingPanelProps: X2, sheetProps: Y2, sheetWrapper: te2, renderSheet: oe2 = Pa, sideBarElement: ne2, showHorizontalScrollbar: ae2, showVerticalScrollbar: re2, gridTheme: le2, headersTheme: ie2, enableDarkImages: se2, ...de2 } = e2, ce2 = Lt(), me2 = P(), pe2 = V(() => {
2086
- const e3 = { theme: me2.getDefaultTheme(), ...a2 };
2087
- return o2 ?? new g(e3);
2088
- }, [o2]), ue2 = q(null), [ge2, fe2] = U(false), xe2 = q(null), be2 = 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: xe2 }), []), [ye2, we2] = U(false), [ke2, Se2] = U(false), Ce2 = G(() => {
2089
- we2(true);
2090
- }, []), ve2 = q(null), Te2 = Ct(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => pe2, getSheetElement: () => ue2.current, getViewportElement: () => xe2.current, getFormulaBarElement: () => ve2.current, focus() {
2091
- ue2 && ue2.current && ue2.current.focus();
2092
- } }), [pe2]), Pe2 = q(null);
2093
- J(() => {
2094
- if (!ye2 || !Te2.current) return;
1947
+ xa.displayName = "MovableContextMenu";
1948
+ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) => z(Tn, { ...e2 }), Sa = (e2, t2) => z(vn, { ref: t2, ...e2 }), ka = (e2) => z(Fe, { ...e2 }), Ca = (e2, t2) => z(D, { ref: t2, ...e2 }), va = (e2) => z(Sn, { ...e2 }), Ta = (e2) => z(ga, { ...e2 }), Ra = { fireOnModelChange: false }, Pa = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Da = $(O((e2, t2) => {
1949
+ const { workbook: o2, createWorkbookOptions: a2, onNewWorkbook: r2, onElementLoad: l2, autoFocus: i2 = false, sx: s2, style: d2, className: c2, onFocus: m2, onBlur: p2, onKeyDown: u2, onRepeatCommandChange: g2, commands: x2, showFormulaBar: b2, formulaBarProps: y2, renderFormulaBar: S2 = Sa, showTabs: k2, tabsProps: C2, renderTabs: v2 = Ta, showStatusBar: T2, statusBarProps: P2, renderStatusBar: D2 = va, toolbarProps: E2, renderToolbar: A2 = oa, contextMenuSx: I2, renderContextMenu: $2 = ya, renderFilterMenu: O2 = wa, renderMovableMenu: G2 = ba, renderLoadingPanel: j2 = ka, loadingPanelProps: X2, sheetProps: Y2, renderSheet: te2 = Ca, mainWrapper: oe2, showHorizontalScrollbar: ne2, showVerticalScrollbar: ae2, gridTheme: re2, headersTheme: le2, enableDarkImages: ie2, ...se2 } = e2, de2 = zt(), ce2 = R(), me2 = V(() => {
1950
+ const e3 = { theme: ce2.getDefaultTheme(), ...a2 };
1951
+ return o2 ?? new h(e3);
1952
+ }, [o2]), pe2 = q(null), [ge2, he2] = U(false), fe2 = q(null), xe2 = 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: fe2 }), []), [be2, ye2] = U(false), [we2, Se2] = U(false), ke2 = K(() => {
1953
+ ye2(true);
1954
+ }, []), Ce2 = q(null), ve2 = Ct(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => me2, getSheetElement: () => pe2.current, getViewportElement: () => fe2.current, getFormulaBarElement: () => Ce2.current, focus() {
1955
+ pe2 && pe2.current && pe2.current.focus();
1956
+ } }), [me2]), Te2 = q(null);
1957
+ Q(() => {
1958
+ if (!be2 || !ve2.current) return;
2095
1959
  (async () => {
2096
- Pe2.current !== l2 && (await l2?.({ source: Te2.current }), Pe2.current = l2), Se2(true);
1960
+ Te2.current !== l2 && (await l2?.({ source: ve2.current }), Te2.current = l2), Se2(true);
2097
1961
  })();
2098
- }, [ye2, Te2.current]), zn(Te2.current);
2099
- const Re2 = G((e3) => (ue2.current?.submitEdit(), true), []), De2 = G(() => {
1962
+ }, [be2, ve2.current]), En(ve2.current);
1963
+ const Re2 = K((e3) => (pe2.current?.submitEdit(), true), []), Pe2 = K(() => {
2100
1964
  requestAnimationFrame(() => {
2101
- ue2?.current?.focus();
1965
+ pe2?.current?.focus();
2102
1966
  });
2103
- }, []), [Be2, Ne2] = U(pe2?.getSelectedSheet()), [Ee2, Ae2] = U(pe2?.getProtection());
2104
- w(pe2, { onSheetsChange: (e3) => {
1967
+ }, []), [De2, Ne2] = U(me2?.getSelectedSheet()), [Be2, Ee2] = U(me2?.getProtection());
1968
+ w(me2, { onSheetsChange: (e3) => {
2105
1969
  Ne2(e3?.getSelectedSheet());
2106
1970
  }, onViewChange(e3) {
2107
1971
  Ne2(e3?.getSelectedSheet());
2108
1972
  }, onProtectionChange: (e3) => {
2109
- Ae2(e3?.getProtection());
2110
- } }), w(pe2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
2111
- ue2.current.getSheet() !== t3 ? ue2.current.getGridElement()?.onViewChangeOnce(() => {
2112
- ue2.current.getSheet() !== t3 && e4(false), e4(true);
1973
+ Ee2(e3?.getProtection());
1974
+ } }), w(me2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
1975
+ pe2.current.getSheet() !== t3 ? pe2.current.getGridElement()?.onViewChangeOnce(() => {
1976
+ pe2.current.getSheet() !== t3 && e4(false), e4(true);
2113
1977
  }) : e4(true);
2114
- }) }, Ma);
2115
- const [Ie2, Le2] = Z((e3) => e3 + 1, 0), He2 = pe2?.getView();
2116
- w(He2, { onViewChange: (e3) => {
2117
- Le2();
1978
+ }) }, Ra);
1979
+ const [Ae2, Ie2] = Z((e3) => e3 + 1, 0), Le2 = me2?.getView();
1980
+ w(Le2, { onViewChange: (e3) => {
1981
+ Ie2();
2118
1982
  } });
2119
- const ze2 = le2 ?? ce2, We2 = V(() => On(ce2, ze2), [ce2, ze2]), $e2 = ie2 ?? ce2, Oe2 = V(() => On(ce2, $e2), [ce2, $e2]), [Ve2, Ge2] = U(null);
2120
- G(() => {
2121
- ue2.current.focus();
1983
+ const He2 = re2 ?? de2, ze2 = V(() => Ln(de2, He2), [de2, He2]), We2 = le2 ?? de2, $e2 = V(() => Ln(de2, We2), [de2, We2]), [Oe2, Ve2] = U(null);
1984
+ K(() => {
1985
+ pe2.current.focus();
2122
1986
  }, []);
2123
- const Ke2 = ma({ workbook: pe2, workbookElement: Te2.current, target: () => ue2.current, commands: x2, darkMode: We2.body.darkMode, onNewWorkbook: r2 }), Ue2 = q(null), [je2, qe2] = U(false), [Xe2, Ze2] = U(null), [Ye2, Je2] = U(Ft.Top), [et2, tt2] = U(f.EmptyBounds), ot2 = G(() => {
2124
- qe2(false), Ze2(null);
2125
- }, []), nt2 = G((e3, t3, o3 = Ft.Top) => {
2126
- tt2(e3), Je2(o3), Ze2(t3), null !== Ue2.current && setTimeout(() => {
2127
- null !== Ue2.current && Ue2.current.update();
2128
- }, 160), qe2(true);
2129
- }, []), [at2, rt2] = U("sheet"), lt2 = S2 ?? He2?.isShowTabs(), it2 = ae2 ?? He2?.isShowHorizontalScrollbar(), st2 = b2 ?? He2?.isShowFormulaBar(), dt2 = T2 ?? He2?.isShowStatusBar(), ct2 = re2 ?? He2?.isShowVerticalScrollbar(), pt2 = We2?.header?.edgeStrokeFill || "rgb(171,171,171)", ut2 = V(() => dt2 ? D2({ sheet: Be2, gridStyle: We2, ...R2 }) : null, [D2, R2, dt2, We2, Be2]), gt2 = V(() => A2({ commands: Ke2, workbook: Te2.current, ...E2 }), [Ke2, A2, E2, ce2]), [ft2, { width: xt2 }] = qt(), bt2 = 0 === xt2 || xt2 > 560, yt2 = V(() => {
2130
- if (!lt2) return null;
2131
- let e3 = v2({ background: We2.body.fill, borderWidth: 1, borderColor: pt2, gridTheme: ze2, gridStyle: We2, onBeforeUserChange: Re2, onUserChange: De2, workbook: pe2, commands: Ke2, sheetTabProps: {}, ...C2 });
2132
- return bt2 || (e3 = z("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
2133
- }, [v2, C2, ce2, pe2, ze2, bt2, Ke2, lt2]), wt2 = G((e3) => {
1987
+ const Ke2 = ia({ workbook: me2, workbookElement: ve2.current, target: () => pe2.current, commands: x2, darkMode: ze2.body.darkMode, onNewWorkbook: r2 }), Ge2 = q(null), [Ue2, je2] = U(false), [qe2, Xe2] = U(null), [Ze2, Ye2] = U(Ft.Top), [Qe2, et2] = U(f.EmptyBounds), tt2 = K(() => {
1988
+ je2(false), Xe2(null);
1989
+ }, []), ot2 = K((e3, t3, o3 = Ft.Top) => {
1990
+ et2(e3), Ye2(o3), Xe2(t3), null !== Ge2.current && setTimeout(() => {
1991
+ null !== Ge2.current && Ge2.current.update();
1992
+ }, 160), je2(true);
1993
+ }, []), [nt2, at2] = U("sheet"), rt2 = k2 ?? Le2?.isShowTabs(), lt2 = ne2 ?? Le2?.isShowHorizontalScrollbar(), it2 = b2 ?? Le2?.isShowFormulaBar(), st2 = T2 ?? Le2?.isShowStatusBar(), dt2 = ae2 ?? Le2?.isShowVerticalScrollbar(), ct2 = ze2?.header?.edgeStrokeFill || "rgb(171,171,171)", pt2 = V(() => st2 ? D2({ sheet: De2, gridStyle: ze2, ...P2 }) : null, [D2, P2, st2, ze2, De2]), ut2 = V(() => A2({ commands: Ke2, workbook: ve2.current, ...E2 }), [Ke2, A2, E2, de2]), [ht2, { width: ft2 }] = _t(), xt2 = 0 === ft2 || ft2 > 560, bt2 = V(() => {
1994
+ if (!rt2) return null;
1995
+ let e3 = v2({ background: ze2.body.fill, borderWidth: 1, borderColor: ct2, gridTheme: He2, gridStyle: ze2, onBeforeUserChange: Re2, onUserChange: Pe2, workbook: me2, commands: Ke2, sheetTabProps: {}, ...C2 });
1996
+ return xt2 || (e3 = z("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
1997
+ }, [v2, C2, de2, me2, He2, xt2, Ke2, rt2]), yt2 = K((e3) => {
2134
1998
  const t3 = n.getOS() === n.OSType.Firefox;
2135
1999
  let o3 = null, a3 = null, r3 = null;
2136
- if (it2 && (a3 = z("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${pt2} 1px`, maxWidth: "100%" }, children: z(M, { style: { alignItems: "center", borderTop: (t3 ? 6 : 3) + "px solid transparent", borderBottom: (bt2 ? 6 : 3) + "px solid transparent", borderLeft: (t3 ? 3 : 0) + "px solid transparent", borderRight: (t3 ? 3 : 0) + "px solid transparent" }, ...e3, endGap: 700, sheet: Be2, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2137
- nt2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
2138
- }, onCloseTooltip: () => ot2() }) })), lt2 && bt2 && (r3 = yt2), lt2 && bt2 && !it2 && (r3 = L(Q, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [r3, z(Q, { sx: { borderTop: `solid ${pt2} 1px`, flex: "1" } })] })), r3 && it2) o3 = z(vt, { position: pe2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
2139
- pe2.getView().setTabRatio(Math.round(10 * e4));
2140
- }, 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='${ce2.palette.text.icon ?? ce2.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 ${pt2} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: r3, elementAfter: a3 });
2141
- else if (it2) o3 = a3;
2000
+ if (lt2 && (a3 = z("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${ct2} 1px`, maxWidth: "100%" }, children: z(M, { style: { alignItems: "center", borderTop: (t3 ? 6 : 3) + "px solid transparent", borderBottom: (xt2 ? 6 : 3) + "px solid transparent", borderLeft: (t3 ? 3 : 0) + "px solid transparent", borderRight: (t3 ? 3 : 0) + "px solid transparent" }, ...e3, endGap: 700, sheet: De2, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2001
+ ot2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
2002
+ }, onCloseTooltip: () => tt2() }) })), rt2 && xt2 && (r3 = bt2), rt2 && xt2 && !lt2 && (r3 = L(J, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [r3, z(J, { sx: { borderTop: `solid ${ct2} 1px`, flex: "1" } })] })), r3 && lt2) o3 = z(vt, { position: me2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
2003
+ me2.getView().setTabRatio(Math.round(10 * e4));
2004
+ }, 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='${de2.palette.text.icon ?? de2.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 ${ct2} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: r3, elementAfter: a3 });
2005
+ else if (lt2) o3 = a3;
2142
2006
  else {
2143
- if (!r3) return z(Q, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: dt2 ? null : `solid ${pt2} 1px` } });
2007
+ if (!r3) return z(J, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: st2 ? null : `solid ${ct2} 1px` } });
2144
2008
  o3 = r3;
2145
2009
  }
2146
- return z(Q, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: o3 });
2147
- }, [Be2, Re2, pe2, We2, ze2, Ke2, lt2, it2, dt2, bt2]), [kt2, St2] = W.useState(null), Tt2 = V(() => ({ placement: "right-start", ...kt2?.popperProps }), [kt2?.popperProps]), { reference: Rt2, component: Mt2 } = _e({ label: "contextMenu", popperProps: Tt2, anchor: kt2?.anchor ?? { getBoundingClientRect: () => new DOMRect(kt2?.clientX || 0, kt2?.clientY || 0) }, onClose: () => St2(null), createPopupPanel: kt2?.createPopupPanel });
2148
- j(() => {
2149
- kt2 ? Rt2.open(0) : Rt2.close(0);
2150
- }, [kt2]);
2151
- const Nt2 = ht((e3, t3) => {
2010
+ return z(J, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: o3 });
2011
+ }, [De2, Re2, me2, ze2, He2, Ke2, rt2, lt2, st2, xt2]), [wt2, St2] = W.useState(null), kt2 = V(() => ({ placement: "right-start", ...wt2?.popperProps }), [wt2?.popperProps]), { reference: Tt2, component: Pt2 } = _e({ label: "contextMenu", popperProps: kt2, anchor: wt2?.anchor ?? { getBoundingClientRect: () => new DOMRect(wt2?.clientX || 0, wt2?.clientY || 0) }, onClose: () => St2(null), createPopupPanel: wt2?.createPopupPanel });
2012
+ _(() => {
2013
+ wt2 ? Tt2.open(0) : Tt2.close(0);
2014
+ }, [wt2]);
2015
+ const Mt2 = gt((e3, t3) => {
2152
2016
  if (e3?.isDefaultPrevented()) return true;
2153
- e3.preventDefault(), kt2 && kt2.anchor === e3.currentTarget ? St2(null) : St2({ anchor: e3.currentTarget, popperProps: { offsets: [-4, 2] }, createPopupPanel: (e4) => {
2017
+ e3.preventDefault(), wt2 && wt2.anchor === e3.currentTarget ? St2(null) : St2({ anchor: e3.currentTarget, popperProps: { offsets: [-4, 2] }, createPopupPanel: (e4) => {
2154
2018
  const { floatReference: o3 } = e4;
2155
2019
  return O2({ filter: t3, commands: Ke2, floatReference: o3, sx: { ...I2 } });
2156
2020
  } });
2157
- }, [O2, I2, Ke2, pe2, kt2]), Et2 = ht((e3) => {
2021
+ }, [O2, I2, Ke2, me2, wt2]), Bt2 = gt((e3) => {
2158
2022
  if (e3.originalEvent?.isDefaultPrevented()) return true;
2159
2023
  e3.originalEvent?.preventDefault(), St2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2160
2024
  const { floatReference: t3 } = e4;
2161
- return $2({ commands: Ke2, workbook: pe2, floatReference: t3, sx: { ...I2 } });
2025
+ return $2({ commands: Ke2, workbook: me2, floatReference: t3, sx: { ...I2 } });
2162
2026
  } });
2163
- }, [$2, I2, Ke2, pe2]), At2 = ht((e3, t3) => {
2027
+ }, [$2, I2, Ke2, me2]), Et2 = gt((e3, t3) => {
2164
2028
  if (e3?.isDefaultPrevented()) return true;
2165
2029
  e3.preventDefault(), St2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2166
2030
  const { floatReference: o3 } = e4;
2167
- return K2({ movable: t3, commands: Ke2, floatReference: o3, sx: { ...I2 } });
2031
+ return G2({ movable: t3, commands: Ke2, floatReference: o3, sx: { ...I2 } });
2168
2032
  } });
2169
- }, [K2, I2, Ke2]);
2033
+ }, [G2, I2, Ke2]);
2170
2034
  V(() => {
2171
- const e3 = [new Pt("openContextMenu", () => ue2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [Dt.Shift] }, { key: "ContextMenu" }] })];
2035
+ const e3 = [new Rt("openContextMenu", () => pe2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [Dt.Shift] }, { key: "ContextMenu" }] })];
2172
2036
  Ke2.addCommands(e3, true);
2173
- }, [Ke2]), j(() => {
2037
+ }, [Ke2]), _(() => {
2174
2038
  Ke2.getCommand("openContextMenu").updateCallback(() => {
2175
- const e3 = Be2.getSelection().getCoords().cell;
2176
- ue2.current?.getGridElement()?.scrollCellCoordsIntoView(e3).then((t3) => {
2039
+ const e3 = De2.getSelection().getCoords().cell;
2040
+ pe2.current?.getGridElement()?.scrollCellCoordsIntoView(e3).then((t3) => {
2177
2041
  requestAnimationFrame(() => {
2178
- const o3 = Be2.getView().getZoomScale() / 100, n2 = Be2.getColumnHeaders().findOffset(e3.colIndex + 1) * o3, a3 = Be2.getRowHeaders().findOffset(e3.rowIndex + 1) * o3, r3 = ue2.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
2179
- Et2({ clientX: n2 - r3.x - t3.left + 6, clientY: a3 - r3.y - t3.top + 6 });
2042
+ const o3 = De2.getView().getZoomScale() / 100, n2 = De2.getColumnHeaders().findOffset(e3.colIndex + 1) * o3, a3 = De2.getRowHeaders().findOffset(e3.rowIndex + 1) * o3, r3 = pe2.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
2043
+ Bt2({ clientX: n2 - r3.x - t3.left + 6, clientY: a3 - r3.y - t3.top + 6 });
2180
2044
  });
2181
2045
  });
2182
2046
  });
2183
- }, [Be2]);
2184
- const It2 = ht((e3) => {
2047
+ }, [De2]);
2048
+ const At2 = gt((e3) => {
2185
2049
  Ke2?.dispatchToFocusedCommand(e3);
2186
- }, [Ke2]), Wt2 = ht(() => {
2187
- zn(Te2.current);
2188
- }, [pe2, Te2.current]), $t2 = G(() => {
2189
- rt2("sheet");
2190
- }, []), Ot2 = G(() => {
2191
- rt2("formulaBar");
2192
- }, []), Vt2 = ht((e3) => {
2050
+ }, [Ke2]), It2 = gt(() => {
2051
+ En(ve2.current);
2052
+ }, [me2, ve2.current]), Lt2 = K(() => {
2053
+ at2("sheet");
2054
+ }, []), Ht2 = K(() => {
2055
+ at2("formulaBar");
2056
+ }, []), Ot2 = gt((e3) => {
2193
2057
  const t3 = n.getOS() === n.OSType.Firefox;
2194
- return z(M, { style: { borderLeft: "3px solid transparent", borderRight: "0px solid transparent", borderTop: (t3 ? 3 : 0) + "px solid transparent", borderBottom: (t3 ? 3 : 0) + "px solid transparent", width: t3 ? "13px" : void 0 }, ...e3, sheet: Be2, endGap: 700, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2195
- nt2(e4.anchor, e4.display, Ft.Left);
2196
- }, onCloseTooltip: () => ot2() });
2197
- }, [Be2]);
2198
- j(() => {
2199
- i2 && ue2 && ue2.current && ue2.current.focus();
2058
+ return z(M, { style: { borderLeft: "3px solid transparent", borderRight: "0px solid transparent", borderTop: (t3 ? 3 : 0) + "px solid transparent", borderBottom: (t3 ? 3 : 0) + "px solid transparent", width: t3 ? "13px" : void 0 }, ...e3, sheet: De2, endGap: 700, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2059
+ ot2(e4.anchor, e4.display, Ft.Left);
2060
+ }, onCloseTooltip: () => tt2() });
2061
+ }, [De2]);
2062
+ _(() => {
2063
+ i2 && pe2 && pe2.current && pe2.current.focus();
2200
2064
  }, []);
2201
- const [Gt2, Kt2] = W.useState(null), Ut2 = G((e3) => {
2065
+ const [Vt2, Kt2] = W.useState(null), Gt2 = K((e3) => {
2202
2066
  Ke2?.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 && Kt2("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 && Kt2(null), e3.preventDefault());
2203
- }, [Ke2]), jt2 = ht((e3) => {
2067
+ }, [Ke2]), Ut2 = gt((e3) => {
2204
2068
  if (Ke2?.getCommand("openWorkbook") && (e3.preventDefault(), e3.stopPropagation(), Kt2(null), e3.dataTransfer.files && e3.dataTransfer.files.length > 0)) {
2205
2069
  const t3 = e3.dataTransfer.files[0];
2206
2070
  if (!t3) return;
2207
2071
  if (t3?.type?.startsWith("image/")) {
2208
- const o3 = ue2.current?.getGridElement().getViewFromClient(e3.clientX, e3.clientY);
2072
+ const o3 = pe2.current?.getGridElement().getViewFromClient(e3.clientX, e3.clientY);
2209
2073
  if (!o3) return;
2210
2074
  const n2 = o3.getRelativePointFromClient(e3.clientX, e3.clientY), a3 = o3.toAbsoluteBounds({ ...n2, width: 0, height: 0 }), r3 = o3.getCellCoordsFromClient(e3.clientX, e3.clientY);
2211
2075
  if (!r3) return;
2212
2076
  Ke2?.getCommand("insertImageFromFile")?.execute({ file: t3, options: { bounds: { x: a3.x, y: a3.y } }, goto: { range: { ...r3 } } });
2213
2077
  } else Ke2?.getCommand("openWorkbook")?.execute(t3);
2214
2078
  }
2215
- }, [Ke2, Gt2]), _t2 = V(() => Gt2 ? 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(ee, { variant: "h4", children: Gt2 }) }) : null, [Gt2]), Zt2 = q(null), Yt2 = V(() => z(Xt, { in: !ke2, nodeRef: Zt2, timeout: 500, classNames: "animating", unmountOnExit: true, children: z(Q, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: ke2 ? "none" : s2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: _2({ ref: Zt2, transitionDelay: "0", transparentBackground: false, sx: { opacity: ke2 ? 0 : s2?.opacity, pointerEvents: ke2 ? "none" : s2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...X2 } }) }) }), [ke2, _2, X2]), Jt2 = V(() => k2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: pe2, sheetElement: ue2.current, gridStyle: We2, onFocus: Ot2, ...y2, NamedCollectionEditorProps: { restoreFocus: (e3) => ue2.current.focus(e3), ...y2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Ke2, ...y2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, ve2), [k2, y2, pe2, We2, Ke2, ke2]), Qt2 = G((e3) => {
2079
+ }, [Ke2, Vt2]), jt2 = V(() => Vt2 ? 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: Vt2 }) }) : null, [Vt2]), qt2 = q(null), Xt2 = V(() => z(Jt, { in: !we2, nodeRef: qt2, 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: we2 ? "none" : s2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: j2({ ref: qt2, transitionDelay: "0", transparentBackground: false, sx: { opacity: we2 ? 0 : s2?.opacity, pointerEvents: we2 ? "none" : s2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...X2 } }) }) }), [we2, j2, X2]), Zt2 = V(() => S2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: me2, sheetElement: pe2.current, gridStyle: ze2, onFocus: Ht2, ...y2, NamedCollectionEditorProps: { restoreFocus: (e3) => pe2.current.focus(e3), ...y2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Ke2, ...y2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, Ce2), [S2, y2, me2, ze2, Ke2, we2]), Yt2 = K((e3) => {
2216
2080
  const { movable: t3, ...o3 } = e3, n2 = { movable: t3, onContextMenuCapture: (e4) => {
2217
- At2(e4, t3);
2081
+ Et2(e4, t3);
2218
2082
  }, ...o3 }, a3 = t3.getContent().getType();
2219
2083
  let r3 = null;
2220
2084
  if ("picture" === a3) return z(F, { loadingPanel: z(Fe, { transitionDelay: "100", style: { position: "absolute" }, sx: { border: (e4) => `solid 1px ${e4.palette.action.active}` } }), picture: t3.getContent(), description: t3.getDescription() ?? t3?.getName(), ...n2 });
2221
2085
  if ("chart" === a3) {
2222
2086
  const e4 = { ...n2, chart: t3.getContent() };
2223
- return z(B, { ...e4 });
2087
+ return z(N, { ...e4 });
2224
2088
  }
2225
2089
  if (r3 = `Float of type '${a3}'.`, "string" == typeof r3) {
2226
2090
  const e4 = { ...n2, description: r3 };
2227
- r3 = z(N, { ...e4 });
2091
+ r3 = z(B, { ...e4 });
2228
2092
  }
2229
2093
  return z("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: r3 }, t3.getUUID());
2230
- }, []), eo2 = V(() => {
2231
- const e3 = oe2({ style: Fa, onFocus: $t2, gridStyle: We2, headersStyle: Oe2, sheet: Be2, commands: Ke2, onSheetContextMenu: Et2, onViewportChange: (e4) => {
2232
- Ge2(e4);
2233
- }, showScrollbars: false, viewportComponent: be2, onRepeatCommandChange: h2, onElementLoad: Ce2, onShowColumnTooltip: (e4) => {
2234
- nt2(e4.anchor, e4.display, Ft.Top);
2235
- }, onShowRowTooltip: (e4) => {
2236
- nt2(e4.anchor, e4.display, Ft.Right);
2237
- }, onShowTooltip: (e4) => {
2238
- nt2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
2239
- }, onCloseTooltip: () => ot2(), renderMovable: Qt2, ...Y2, cellRenderProps: { onFilterButtonMouseDown: (e4, t3) => {
2240
- Y2?.cellRenderProps?.onFilterButtonMouseDown(e4, t3), Nt2(e4, t3);
2241
- }, ...Y2?.cellRenderProps } }, ue2);
2242
- return te2 ? te2(e3) : e3;
2243
- }, [oe2, te2, Ke2, Y2, Be2, We2, h2]), to2 = V(() => {
2244
- const e3 = z(Bt, { style: { ...Fa, marginRight: ne2 && bt2 ? "0px" : "6px" }, viewport: Ve2, touchElement: ue2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2245
- ue2.current?.getGridElement()?.scrollTo(e4);
2246
- }, showHorizontalScrollbar: it2 || lt2, showVerticalScrollbar: ct2, createHorizontalScrollbar: wt2, createVerticalScrollbar: Vt2, children: eo2 });
2247
- let t3 = e3;
2248
- bt2 || (t3 = L(H, { children: [e3, yt2] }));
2249
- let o3 = null, n2 = 4, a3 = 13;
2250
- return bt2 ? o3 = "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" : (o3 = "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", n2 = 13, a3 = 4), z(vt, { fixedPane: "after", position: "40%", minAfter: bt2 ? "280px" : "120px", splitDirection: bt2 ? "row" : "column", style: Fa, ref: ft2, resizerProps: { className: "styled-resizer", style: { minWidth: bt2 ? "6px" : void 0, minHeight: bt2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${n2}' height='${a3}' viewBox='0 0 ${n2} ${a3}' version='1.1' fill='${ce2.palette.text.icon ?? ce2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${o3}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: bt2 ? "left center" : "top center" } }, elementBefore: t3, paneBeforeProps: { style: { flexDirection: "column" } }, elementAfter: ne2, paneAfterProps: { style: { marginLeft: bt2 ? "0px" : "4px", marginRight: bt2 ? "8px" : "4px" } } });
2251
- }, [it2, lt2, wt2, ct2, Ve2, ne2, eo2, yt2, ce2, bt2]), oo2 = V(() => z(Me, { arrow: true, disableInteractive: true, open: je2, title: z(ee, { variant: "subtitle2", component: "div", children: Xe2 }), placement: Ye2, TransitionProps: { timeout: { exit: 0 } }, PopperProps: { popperRef: Ue2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: je2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(et2.x, et2.y, et2.width, et2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] }, children: z(Q, {}) }), [je2, Xe2, Ye2, et2, Ue2]), no2 = V(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? We2.header.fill : e3.palette.background.paper, "& *": { ...Qe(ce2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${pt2} 1px` }, ...s2 }), [s2, We2]), ao2 = V(() => z(Q, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), []), ro2 = V(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: ke2 ? void 0 : 0, "--sxl-app-color-high-contrast": ce2.palette.primary.main, "--sxl-app-color-primary": ce2.palette.primary.main, "--sxl-app-color-primary-dark": ce2.palette.primary.dark, "--sxl-app-color-primary-light": ce2.palette.primary.light, "--sxl-app-color-info": ce2.palette.info.main, "--sxl-app-color-info-dark": ce2.palette.info.dark, "--sxl-app-color-info-light": ce2.palette.info.light, "--sxl-app-color-secondary": ce2.palette.secondary.main, "--sxl-app-color-secondary-dark": ce2.palette.secondary.dark, "--sxl-app-color-secondary-light": ce2.palette.secondary.light, "--sxl-app-color-success": ce2.palette.success.main, "--sxl-app-color-success-dark": ce2.palette.success.dark, "--sxl-app-color-success-light": ce2.palette.success.light, "--sxl-app-color-warning": ce2.palette.warning.main, "--sxl-app-color-warning-dark": ce2.palette.warning.dark, "--sxl-app-color-warning-light": ce2.palette.warning.light, "--sxl-app-color-error": ce2.palette.error.main, "--sxl-app-color-error-dark": ce2.palette.error.dark, "--sxl-app-color-error-light": ce2.palette.error.light, "--sxl-app-color-text": ce2.palette.text.primary, "--sxl-app-color-text-secondary": ce2.palette.text.secondary, "--sxl-app-color-text-disabled": ce2.palette.text.disabled, "--sxl-app-color-background": ce2.palette.background.paper, "--sxl-app-color-button-surface": ce2.palette.grey[600], "--sxl-app-color-shadow": ce2.palette.action.focus, "--sxl-app-color-grey": ce2.palette.grey[500], "--sxl-app-filter-dark-invert": We2.body.darkMode && se2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": We2.body.darkMode ? `linear-gradient(${Ht("#fff", zt(5))}, ${Ht("#fff", zt(5))})` : void 0 }), [We2, ce2, ke2]), lo2 = V(() => mt(Qo), []);
2252
- return L(he, { className: mt("sheetxl-workbook", ha, { "Mui-focusVisible": ge2 }, ua, c2), sx: no2, style: d2, square: false, ...de2, ref: Te2, onFocus: (e3) => {
2253
- fe2(true), Wt2(), m2?.(e3);
2094
+ }, []), Qt2 = V(() => te2({ style: Pa, onFocus: Lt2, gridStyle: ze2, headersStyle: $e2, sheet: De2, commands: Ke2, onSheetContextMenu: Bt2, onViewportChange: (e3) => {
2095
+ Ve2(e3);
2096
+ }, showScrollbars: false, viewportComponent: xe2, onRepeatCommandChange: g2, onElementLoad: ke2, onShowColumnTooltip: (e3) => {
2097
+ ot2(e3.anchor, e3.display, Ft.Top);
2098
+ }, onShowRowTooltip: (e3) => {
2099
+ ot2(e3.anchor, e3.display, Ft.Right);
2100
+ }, onShowTooltip: (e3) => {
2101
+ ot2({ x: e3.anchor.x, y: e3.anchor.y, width: 0, height: 0 }, e3.display, e3.placement);
2102
+ }, onCloseTooltip: () => tt2(), renderMovable: Yt2, ...Y2, cellRenderProps: { onFilterButtonMouseDown: (e3, t3) => {
2103
+ Y2?.cellRenderProps?.onFilterButtonMouseDown(e3, t3), Mt2(e3, t3);
2104
+ }, ...Y2?.cellRenderProps } }, pe2), [Ke2, Y2, De2, ze2, g2]), eo2 = V(() => {
2105
+ let e3 = z(Nt, { ref: ht2, style: Pa, viewport: Oe2, touchElement: pe2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2106
+ pe2.current?.getGridElement()?.scrollTo(e4);
2107
+ }, showHorizontalScrollbar: lt2 || rt2, showVerticalScrollbar: dt2, createHorizontalScrollbar: yt2, createVerticalScrollbar: Ot2, children: Qt2 });
2108
+ return xt2 || 0 === ft2 || (e3 = L(H, { children: [e3, bt2] })), oe2 ? oe2(e3) : e3;
2109
+ }, [lt2, rt2, yt2, dt2, Oe2, xt2, Qt2, bt2, de2, oe2]), to2 = V(() => z(Me, { arrow: true, disableInteractive: true, open: Ue2, title: z(ee, { variant: "subtitle2", component: "div", children: qe2 }), placement: Ze2, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: Ge2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ue2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Qe2.x, Qe2.y, Qe2.width, Qe2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: z(J, {}) }), [Ue2, qe2, Ze2, Qe2, Ge2]), oo2 = V(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? ze2.header.fill : e3.palette.background.paper, "& *": { ...Je(de2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${ct2} 1px` }, ...s2 }), [s2, ze2]), no2 = V(() => z(J, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), []), ao2 = V(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: we2 ? void 0 : 0, "--sxl-app-color-high-contrast": de2.palette.primary.main, "--sxl-app-color-primary": de2.palette.primary.main, "--sxl-app-color-primary-dark": de2.palette.primary.dark, "--sxl-app-color-primary-light": de2.palette.primary.light, "--sxl-app-color-info": de2.palette.info.main, "--sxl-app-color-info-dark": de2.palette.info.dark, "--sxl-app-color-info-light": de2.palette.info.light, "--sxl-app-color-secondary": de2.palette.secondary.main, "--sxl-app-color-secondary-dark": de2.palette.secondary.dark, "--sxl-app-color-secondary-light": de2.palette.secondary.light, "--sxl-app-color-success": de2.palette.success.main, "--sxl-app-color-success-dark": de2.palette.success.dark, "--sxl-app-color-success-light": de2.palette.success.light, "--sxl-app-color-warning": de2.palette.warning.main, "--sxl-app-color-warning-dark": de2.palette.warning.dark, "--sxl-app-color-warning-light": de2.palette.warning.light, "--sxl-app-color-error": de2.palette.error.main, "--sxl-app-color-error-dark": de2.palette.error.dark, "--sxl-app-color-error-light": de2.palette.error.light, "--sxl-app-color-text": de2.palette.text.primary, "--sxl-app-color-text-secondary": de2.palette.text.secondary, "--sxl-app-color-text-disabled": de2.palette.text.disabled, "--sxl-app-color-background": de2.palette.background.paper, "--sxl-app-color-button-surface": de2.palette.grey[600], "--sxl-app-color-shadow": de2.palette.action.focus, "--sxl-app-color-grey": de2.palette.grey[500], "--sxl-app-filter-dark-invert": ze2.body.darkMode && ie2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": ze2.body.darkMode ? `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` : void 0 }), [ze2, de2, we2]), ro2 = V(() => mt(on), []);
2110
+ return L(ue, { className: mt("sheetxl-workbook", ca, { "Mui-focusVisible": ge2 }, da, c2), sx: oo2, style: d2, square: false, ...se2, ref: ve2, onFocus: (e3) => {
2111
+ he2(true), It2(), m2?.(e3);
2254
2112
  }, onBlur: (e3) => {
2255
- fe2(false), p2?.(e3);
2113
+ he2(false), p2?.(e3);
2256
2114
  }, onKeyDown: (e3) => {
2257
- It2(e3), u2?.(e3);
2115
+ At2(e3), u2?.(e3);
2258
2116
  }, onDragStart: (e3) => {
2259
2117
  if (e3.target.src) {
2260
2118
  const t3 = new Image();
2261
2119
  t3.src = e3.target.src, e3.dataTransfer.setDragImage(t3, 1, 1);
2262
2120
  }
2263
- }, onDragEnter: Ut2, onDragLeave: Ut2, onDragOver: Ut2, onDrop: jt2, children: [L("div", { className: lo2, style: ro2, children: [gt2, st2 ? Jt2 : null, ao2, to2, ut2, oo2, Mt2, _t2] }), Yt2] });
2121
+ }, onDragEnter: Gt2, onDragLeave: Gt2, onDragOver: Gt2, onDrop: Ut2, children: [L("div", { className: ro2, style: ao2, children: [ut2, it2 ? Zt2 : null, no2, eo2, pt2, to2, Pt2, jt2] }), Xt2] });
2264
2122
  }));
2265
- Ba.displayName = "WorkbookElement";
2266
- const Na = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => Ht(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` } }, Ea = $(O((e2, t2) => {
2267
- const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = U(false), [p2, u2] = U(false), [h2, g2] = U(a2 ?? ""), [f2, x2] = U(""), [b2, { width: y2 }] = qt(), [w2, { width: k2 }] = qt(), [S2, C2] = U(false), v2 = q(null), T2 = q(null), P2 = Ct(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2123
+ Da.displayName = "WorkbookElement";
2124
+ const Ma = (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` } }, Fa = $(O((e2, t2) => {
2125
+ const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = U(false), [p2, u2] = U(false), [g2, h2] = U(a2 ?? ""), [f2, x2] = U(""), [b2, { width: y2 }] = _t(), [w2, { width: S2 }] = _t(), [k2, C2] = U(false), v2 = q(null), T2 = q(null), R2 = Ct(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2268
2126
  T2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && v2.current?.select(), v2.current?.focus(t3);
2269
2127
  }, focus: (e3) => {
2270
2128
  v2.current?.focus(e3);
2271
2129
  } }), []);
2272
- return J(() => {
2273
- C2(a2 !== h2), x2(a2), g2(a2);
2274
- }, [a2]), j(() => {
2275
- S2 && 0 !== y2 && Kt.debounce(() => {
2130
+ return Q(() => {
2131
+ C2(a2 !== g2), x2(a2), h2(a2);
2132
+ }, [a2]), _(() => {
2133
+ k2 && 0 !== y2 && jt.debounce(() => {
2276
2134
  C2(false);
2277
2135
  }, 300)();
2278
- }, [S2, y2]), j(() => {
2279
- u2(h2 && !Yt.isValidWindowsFilename(h2));
2280
- }, [h2]), s2 ? null : z(Q, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: S2 ? "0" : "1", transition: S2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Gt([P2, w2, t2]), ...d2, children: z(He, { label: T2.current?.requestReason ?? "Workbook Name", children: L(Q, { 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", ...Na(true, i2), ...o2 }, children: [i2 ? z(ee, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: h2 !== 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(k2, P2.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: h2 !== 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) => {
2136
+ }, [k2, y2]), _(() => {
2137
+ u2(g2 && !to.isValidWindowsFilename(g2));
2138
+ }, [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: Ut([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", ...Ma(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) => {
2281
2139
  m2(true), e3.target?.select();
2282
2140
  }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: v2 }, onBlur: () => {
2283
- m2(false), p2 ? g2(f2) : (h2 !== f2 && (l2?.(h2), h2 && T2.current?.onAccept?.(h2, "blur")), T2.current = null);
2141
+ m2(false), p2 ? h2(f2) : (g2 !== f2 && (l2?.(g2), g2 && T2.current?.onAccept?.(g2, "blur")), T2.current = null);
2284
2142
  }, onChange: (e3) => {
2285
- if (e3.target.value.length > Yt.MAX_WORKBOOK_NAME_SIZE) return e3.stopPropagation(), void e3.preventDefault();
2286
- g2(e3.target.value);
2143
+ if (e3.target.value.length > to.MAX_WORKBOOK_NAME_SIZE) return e3.stopPropagation(), void e3.preventDefault();
2144
+ h2(e3.target.value);
2287
2145
  }, onKeyDown: (e3) => {
2288
- (Yt.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(e3.key) || e3.target?.value.length > Yt.MAX_WORKBOOK_NAME_SIZE) && e3.preventDefault(), e3.which === ft.Enter || e3.which === ft.Tab ? (p2 ? g2(f2) : (l2?.(h2), h2 && (T2.current?.onAccept?.(h2, "keydown"), T2.current = null)), e3.stopPropagation(), e3.preventDefault(), n2?.focus()) : e3.which === ft.Escape && (h2 === f2 ? n2?.focus() : (g2(f2), setTimeout(() => {
2146
+ (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(() => {
2289
2147
  e3.target?.select();
2290
2148
  }, 0)), T2.current = null, e3.stopPropagation(), e3.preventDefault());
2291
- }, value: h2 }), z(Q, { ref: b2, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: h2 !== f2 ? "italic" : void 0, fontFamily: (e3) => e3.typography.fontFamily, letterSpacing: "0.00938em" }, children: h2 || r2 })] }) }) });
2149
+ }, 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 })] }) }) });
2292
2150
  }));
2293
- Ea.displayName = "WorkbookTitle";
2294
- const Aa = $(O((e2, t2) => {
2151
+ Fa.displayName = "WorkbookTitle";
2152
+ const Na = $(O((e2, t2) => {
2153
+ const { title: o2, commands: n2, className: a2, ...r2 } = e2, l2 = St(), [i2, s2] = U(false), [d2, c2] = U(false), m2 = q(null), [p2, u2] = Z((e3) => e3 + 1, 0), [g2, { width: h2 }] = _t(), f2 = pt(n2, ["editTable"])[0].context(), x2 = f2.table(), [b2, y2] = U(() => x2 ? f2.getNames().getRanges(x2.getRange()) : null), S2 = V(() => x2?.getName() ?? "", [x2]);
2154
+ w(f2.table(), { onAnchorCoordsChange(e3) {
2155
+ y2(f2.getNames().getRanges(e3.getRange()));
2156
+ }, onProtectedChange(e3) {
2157
+ u2();
2158
+ } });
2159
+ const k2 = gt((e3) => {
2160
+ f2?.table().setName(e3);
2161
+ }, [f2]), C2 = gt((e3) => {
2162
+ f2?.table().resize(e3.at(0));
2163
+ }, [f2]);
2164
+ let v2 = null;
2165
+ 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) => {
2166
+ m2?.current?.contains(e3.relatedTarget) || s2(false);
2167
+ }, ref: Ut([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: mn, children: [z(un, { formName: "name", defaultInput: S2, value: x2?.getName() ?? "No table", onChangeInput: k2, onValidate: (e3) => {
2168
+ x2 && x2.getName().toLowerCase() === e3.toLowerCase() || f2?.getNames().validateName(e3);
2169
+ }, disabled: x2?.isProtected() ?? true, onFocus: (e3) => {
2170
+ d2 || e3.target?.select(), c2(true);
2171
+ } }), z(hn, { formName: "range", value: b2, onChangeInput: C2, resolvedAddress: f2.getNames().getRanges.bind(f2.getNames()), disabled: x2?.isProtected() ?? true, onFocus: (e3) => {
2172
+ d2 || e3.target?.select(), c2(true);
2173
+ } })] }) }), 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(cn, { disabled: x2?.isProtected(), styleOptions: x2?.getStyleOptions() ?? null, onStyleOptionsChange: (e3) => {
2174
+ x2.updateStyleOptions(e3);
2175
+ }, showHeaderRow: x2?.getShowHeaders(), onShowHeaderRowChange: (e3) => {
2176
+ try {
2177
+ x2.setShowHeaders(e3);
2178
+ } catch (e4) {
2179
+ l2.showError(e4);
2180
+ }
2181
+ }, showTotalRow: x2?.getShowTotals(), onShowTotalRowChange: (e3) => {
2182
+ try {
2183
+ x2.setShowTotals(e3);
2184
+ } catch (e4) {
2185
+ l2.showError(e4);
2186
+ }
2187
+ }, showFilterButton: x2?.getFilter() ? x2.getShowFilterButton() : null, onShowFilterButtonChange: (e3) => {
2188
+ try {
2189
+ x2.setShowFilterButton(e3);
2190
+ } catch (e4) {
2191
+ l2.showError(e4);
2192
+ }
2193
+ } }), 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(2), 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(Ea, { command: n2.getCommand("formatTableStyle"), commands: n2, disabledQuickKey: true })] }) }), z(Te, { orientation: "horizontal" }), L(J, { className: pn, children: [z(ve, { variant: ut.Menuitem, command: n2.getCommand("convertTableToRange"), commandState: x2 }), z(ve, { variant: ut.Menuitem, commandState: x2, command: n2.getCommand("deleteTable") })] })] })] }) });
2194
+ })), Ba = $((e2) => {
2195
+ 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) => {
2196
+ 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() })] });
2197
+ 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 }) }) });
2198
+ }, [d2]), f2 = o2?.getName() === n2, x2 = V(() => {
2199
+ const e3 = { table: t2, tableStyle: o2, styles: r2, bodyStyle: i2 };
2200
+ return p2 ? z(ln, { canvas: u2, ...e3 }) : z(an, { ...e3 });
2201
+ }, [t2, o2, r2, i2]);
2202
+ 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: () => {
2203
+ a2?.(o2?.getName());
2204
+ }, ...g2, children: x2 }, o2.getName());
2205
+ return l2 && (b2 = z(Ke, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: b2 })), b2;
2206
+ }), Ea = $(O((e2, t2) => {
2207
+ const { commands: o2, command: n2, commandHook: a2, selectedTable: r2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, disabledQuickKey: d2 = false, usePreviewIcon: m2 = false, ...p2 } = e2;
2208
+ bt(n2);
2209
+ const u2 = n2?.context(), g2 = u2?.styles, h2 = r2 ?? u2?.table?.();
2210
+ let f2 = "insertTable";
2211
+ h2 && (f2 = "editTable");
2212
+ const x2 = V(() => ((e3, t3) => {
2213
+ const o3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
2214
+ return new c({ initialAnchor: o3, styles: t3, json: { name: "PreviewTable", ref: o3, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: e3 } });
2215
+ })(h2?.getStyleOptions(), g2?.()), [g2?.().getDefaultTableStyle(), h2?.getStyleOptions()]), b2 = h2 ?? x2, [y2, w2] = U(b2);
2216
+ _(() => {
2217
+ w2(b2);
2218
+ }, [b2]);
2219
+ const S2 = s2 ?? u2?.bodyStyle(), k2 = gt((e3) => {
2220
+ l2?.(e3), n2?.execute({ name: e3 }, a2);
2221
+ }, [n2, l2, a2]), C2 = q(null), v2 = K((e3, t3) => {
2222
+ const o3 = { onSelectTableStyleName: k2, styles: g2(), parentFloat: e3.floatReference };
2223
+ C2.current || (C2.current = document.createElement("canvas"));
2224
+ const n3 = (e4) => {
2225
+ const n4 = g2().getTableStyle(e4);
2226
+ return n4 ? z(Ba, { table: y2, tableStyle: n4, selectedTableStyleName: y2.getStyleOptions().name, bodyStyle: u2.bodyStyle(), commands: t3, commandHook: a2, canvas: C2.current, ...o3 }, e4) : null;
2227
+ }, r3 = (e4, t4, o4 = true) => {
2228
+ const a3 = [];
2229
+ for (let e5 = 0; e5 < t4.length; e5++) {
2230
+ const o5 = n3(t4[e5]);
2231
+ o5 && a3.push(o5);
2232
+ }
2233
+ return 0 === a3.length ? null : L(J, { children: [o4 ? z(Te, { orientation: "horizontal" }) : null, z(Ve, { children: e4 }, e4 + "-header"), z(J, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: a3 }, e4 + "-presets")] }, e4);
2234
+ }, l3 = [], s3 = g2().getCustomTableStyles(), d3 = [];
2235
+ if (s3.length > 0) {
2236
+ for (let e4 = 0; e4 < s3.length; e4++) s3[e4].isShownInTableStyles() && d3.push(s3[e4].getName());
2237
+ l3.push(r3("Custom", d3, false));
2238
+ }
2239
+ const c2 = [];
2240
+ h2 && !h2.getStyleOptions().name && c2.push(null);
2241
+ for (let e4 = 0; e4 < 21; e4++) c2.push("TableStyleLight" + (e4 + 1));
2242
+ l3.push(r3("Light", c2, d3.length > 0));
2243
+ const m3 = [];
2244
+ for (let e4 = 0; e4 < 28; e4++) m3.push("TableStyleMedium" + (e4 + 1));
2245
+ l3.push(r3("Medium", m3));
2246
+ const p3 = [];
2247
+ for (let e4 = 0; e4 < 11; e4++) p3.push("TableStyleDark" + (e4 + 1));
2248
+ l3.push(r3("Dark", p3));
2249
+ let f3 = null;
2250
+ 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: () => {
2251
+ }, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: l3 }), f3] });
2252
+ }, [g2, g2?.().getTheme(), S2, y2]), T2 = i2 || !n2 || n2.disabled(), R2 = V(() => {
2253
+ if (!u2 || !m2) return n2?.icon();
2254
+ }, [y2, S2, T2, n2]);
2255
+ 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 });
2256
+ })), Aa = $(O((e2, t2) => {
2257
+ const { command: o2, commandHook: n2, selectedTheme: a2, onSelectTheme: r2, disabled: l2 = false, darkMode: i2, label: s2, icon: d2, variant: c2, ...m2 } = e2;
2258
+ bt(o2);
2259
+ const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = gt((e3) => {
2260
+ r2?.(e3), o2?.execute(e3, n2);
2261
+ }, [r2, n2]), x2 = K((e3, t3) => {
2262
+ const { children: n3, title: a3, ...r3 } = e3;
2263
+ let l3 = e3.children;
2264
+ 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 });
2265
+ }, [o2, h2]);
2266
+ return z(yn, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === ut.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: x2, disabled: h2, darkMode: g2, ...m2 });
2267
+ })), Ia = $(O((e2, t2) => {
2268
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["themeMode"])[0], s2 = gt((e3, t3) => {
2269
+ 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") })] });
2270
+ return Re({ ...e3, children: a3 });
2271
+ }, [r2, i2, n2, a2]), d2 = i2?.state(), c2 = be("(prefers-color-scheme: dark)"), m2 = "dark" === d2 || null === d2 && c2, p2 = null !== i2?.state();
2272
+ 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: () => {
2273
+ i2?.execute(m2 ? "light" : "dark", n2);
2274
+ }, selected: p2, ...l2 });
2275
+ })), La = $(O((e2, t2) => {
2276
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, sx: l2, ...i2 } = e2, s2 = K((e3, t3) => {
2277
+ const o3 = { variant: ut.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
2278
+ const a4 = n2?.beforeExecute?.(t4, o4);
2279
+ return false !== a4 && e3.floatReference.closeAll();
2280
+ } }, 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") })] });
2281
+ return Re({ ...e3, children: a3 });
2282
+ }, [r2, n2]);
2283
+ 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 });
2284
+ })), Ha = $(O((e2, t2) => {
2285
+ const { ...o2 } = e2;
2286
+ return z(je, { ref: t2, ...o2, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions." });
2287
+ }));
2288
+ Ha.displayName = "InsertFunctionSumCommandPopupButton";
2289
+ const za = 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])), Wa = $((e2) => {
2290
+ 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) => {
2291
+ o2.getDescriptor().then((t3) => {
2292
+ e3(t3.getSummary());
2293
+ });
2294
+ });
2295
+ return z(Ae, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...d2 }, disabled: a2, tooltipProps: { label: m2, maxWidth: 1e3 }, onMouseDown: (e3) => {
2296
+ 0 === e3.button && e3.preventDefault();
2297
+ }, onMouseUp: (e3) => {
2298
+ 0 === e3.button && l2(o2);
2299
+ }, onKeyDown: (e3) => {
2300
+ e3.keyCode === ft.Enter || (e3.keyCode, ft.Space);
2301
+ }, ...c2, children: z(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: z(ee, { component: "div", children: o2.getName() }) }) });
2302
+ }), $a = $(O((e2, t2) => {
2303
+ 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) => {
2304
+ const n3 = za.get(o2);
2305
+ if (!n3) return console.warn("invalidate category", o2), null;
2306
+ const r3 = { commandHook: a2, ...e3 }, l3 = z(Oa, { category: n3.label, ...r3, commands: t3 });
2307
+ return Re({ ...e3, children: l3 });
2308
+ }, [o2, c2, a2, r2]), p2 = za.get(o2);
2309
+ return z(Pe, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: za.get(o2)?.icon ?? "FormulaGroup", ...d2 });
2310
+ }));
2311
+ $a.displayName = "InsertFunctionCommandPopupButton";
2312
+ const Oa = $(O((e2, t2) => {
2313
+ const { commands: o2, category: n2, commandHook: a2, ...r2 } = e2, l2 = pt(o2, ["insertFunction"]), [i2, s2] = U([]), [d2, c2] = U(false);
2314
+ _(() => {
2315
+ (async () => {
2316
+ c2(true);
2317
+ const e3 = l2[0]?.context(), t3 = await e3.searchByCategory(n2);
2318
+ s2(t3), c2(false);
2319
+ })();
2320
+ }, []);
2321
+ const m2 = i2.length, p2 = new Array(m2), u2 = o2.getCommand("insertFunction"), g2 = (e3) => {
2322
+ a2?.beforeExecute?.(u2, u2?.state()), u2.execute(e3), a2?.onExecute?.(u2, u2?.state());
2323
+ };
2324
+ for (let e3 = 0; e3 < m2; e3++) {
2325
+ const t3 = i2[e3];
2326
+ p2[e3] = z(Wa, { command: u2, formulaFunction: t3, handleInsert: g2 }, `formula-${t3.getName()}-${e3}`);
2327
+ }
2328
+ 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 }) });
2329
+ })), Va = $(O((e2, t2) => {
2295
2330
  const { sx: o2, style: n2, className: a2, licenseKey: r2, renderLoadingPanel: l2, ...i2 } = e2;
2296
- r2 && h.setLicenseKey(r2);
2331
+ r2 && g.setLicenseKey(r2);
2297
2332
  const s2 = V(() => {
2298
2333
  const e3 = { transitionDelay: "160ms", transparentBackground: true };
2299
- return z(Q, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? z(Fe, { ...e3 }) });
2300
- }, [o2, n2, l2]), d2 = V(() => W.lazy(async () => await Promise.resolve().then(() => Xa)), []);
2301
- return z(H, { children: z(_, { fallback: s2, children: z(d2, { ...i2, className: a2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
2334
+ return z(J, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? z(Fe, { ...e3 }) });
2335
+ }, [o2, n2, l2]), d2 = V(() => W.lazy(async () => await Promise.resolve().then(() => lr)), []);
2336
+ return z(H, { children: z(j, { fallback: s2, children: z(d2, { ...i2, className: a2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
2302
2337
  }));
2303
- Aa.displayName = "Studio";
2304
- const Ia = [{ key: "SheetXL", description: "SheetXL", mimeType: ".sxl", exts: ["sxl"], handler: null, isDefault: true }, { key: "CSV", description: "Comma Delimited", mimeType: "text/csv", exts: ["csv"], handler: null }, { key: "Excel", description: "Excel Workbook", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", exts: ["xlsx", "xls", "xlsm"], handler: null }], La = [{ key: "SheetXL", mimeType: "application/vnd.sheetxl.sheet", description: "SheetXL", ext: "sxl", handler: null, isDefault: true }, { key: "CSV", mimeType: "text/csv", description: "Comma Delimited", ext: "csv", handler: null }, { key: "Excel", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", description: "Excel Workbook", ext: "xlsx", tags: ["SheetJS Pro"], handler: null }];
2305
- class Ha {
2306
- constructor(e2 = Ia, t2 = La) {
2338
+ Va.displayName = "Studio";
2339
+ const Ka = [{ key: "SheetXL", description: "SheetXL", mimeType: ".sxl", exts: ["sxl"], handler: null, isDefault: true }, { key: "CSV", description: "Comma Delimited", mimeType: "text/csv", exts: ["csv"], handler: null }, { key: "Excel", description: "Excel Workbook", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", exts: ["xlsx", "xls", "xlsm"], handler: null }], Ga = [{ key: "SheetXL", mimeType: "application/vnd.sheetxl.sheet", description: "SheetXL", ext: "sxl", handler: null, isDefault: true }, { key: "CSV", mimeType: "text/csv", description: "Comma Delimited", ext: "csv", handler: null }, { key: "Excel", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", description: "Excel Workbook", ext: "xlsx", tags: ["SheetJS Pro"], handler: null }];
2340
+ class Ua {
2341
+ constructor(e2 = Ka, t2 = Ga) {
2307
2342
  this._readFormatType = [], this._writeFormatType = [], this._readFormatType = Object.freeze([...e2]), this._writeFormatType = Object.freeze([...t2]);
2308
2343
  }
2309
2344
  getReadFormats() {
@@ -2344,195 +2379,202 @@ class Ha {
2344
2379
  }
2345
2380
  }
2346
2381
  }
2347
- const za = new Ha(), Wa = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, $a = O((e2, t2) => {
2348
- const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = Qt(), d2 = Lt(), [c2, m2] = U(false), p2 = G(() => {
2382
+ const _a = new Ua(), ja = { 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) => {
2383
+ const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = oo(), d2 = zt(), [c2, m2] = U(false), p2 = Xt.collectErrorChain(r2, true)?.[0]?.error, u2 = p2 && !(p2 instanceof Zt), g2 = K(() => {
2349
2384
  m2((e3) => !e3);
2350
- }, []), u2 = G(() => {
2385
+ }, []), h2 = K(() => {
2351
2386
  s2(o2);
2352
2387
  }, [o2, s2]);
2353
- let h2 = r2?.message;
2354
- return !h2 && K(n2) && (h2 = n2), h2 || "string" != typeof n2 || (h2 = n2), h2 || (h2 = `Unknown Error: ${n2}`), z(eo, { ref: t2, className: mt(Wa.root, "error-snackbar"), children: L(ye, { className: Wa.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [L(we, { className: Wa.actionRoot, children: [l2 ? null : a2?.error, z(ee, { variant: "body2", component: "div", className: Wa.typography, children: h2 }), z("div", { style: { flex: "1 1 auto" } }), L("div", { className: Wa.icons, children: [r2 ? z(te, { "aria-label": "Show more", size: "small", className: mt(Wa.expand, { [Wa.expandOpen]: c2 }), onClick: p2, children: z(xt, { iconKey: "ExpandMore" }) }) : null, z(te, { size: "small", className: Wa.expand, onClick: u2, children: z(xt, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), r2 ? z(ke, { in: c2, timeout: "auto", unmountOnExit: true, children: z("div", { className: Wa.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: z(et, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
2355
- });
2356
- $a.displayName = "ToastError";
2357
- const Oa = $(O((e2, t2) => {
2358
- const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, i2 = ht((e3) => {
2359
- 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(Re, { ...t3, commands: o2, quickCommand: "saveWorkbook", createPopupPanel: (e4) => {
2388
+ let f2 = p2?.message;
2389
+ return !f2 && G(n2) && (f2 = n2), f2 || "string" != typeof n2 || (f2 = n2), f2 || (f2 = `Unknown Error: ${n2}`), z(no, { ref: t2, className: mt(ja.root, "error-snackbar"), children: L(ye, { className: ja.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [L(we, { className: ja.actionRoot, children: [l2 ? null : a2?.error, z(ee, { variant: "body2", component: "div", className: ja.typography, children: f2 }), z("div", { style: { flex: "1 1 auto" } }), L("div", { className: ja.icons, children: [u2 ? z(te, { "aria-label": "Show more", size: "small", className: mt(ja.expand, { [ja.expandOpen]: c2 }), onClick: g2, children: z(xt, { iconKey: "ExpandMore" }) }) : null, z(te, { size: "small", className: ja.expand, onClick: h2, children: z(xt, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), u2 ? z(Se, { in: c2, timeout: "auto", children: z("div", { className: ja.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: z(et, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
2390
+ }));
2391
+ qa.displayName = "ToastError";
2392
+ const Xa = $(O((e2, t2) => {
2393
+ const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, i2 = gt((e3) => {
2394
+ 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) => {
2360
2395
  const n3 = { ...t3, parentFloat: e4.floatReference, scope: "saveWorkbook" }, a3 = [];
2361
- return za.getWriteFormats().forEach((e5) => {
2396
+ return _a.getWriteFormats().forEach((e5) => {
2362
2397
  if (e5.isDefault) return;
2363
2398
  const t4 = e5.key, r3 = o2.getCommand(`saveWorkbookAs${t4}`);
2364
2399
  r3 ? a3.push(X(ve, { ...n3, key: t4, command: r3 })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${t4}'`);
2365
- }), Pe({ ...e4, children: a3, onClick: () => {
2400
+ }), Re({ ...e4, children: a3, onClick: () => {
2366
2401
  e4.closeFloatAll();
2367
2402
  } });
2368
2403
  } })] });
2369
- return Pe({ ...e3, children: l3, onClick: (t4) => {
2404
+ return Re({ ...e3, children: l3, onClick: (t4) => {
2370
2405
  t4.isDefaultPrevented || e3.closeFloatAll();
2371
2406
  } });
2372
2407
  }, [r2, o2, n2, a2]), s2 = "File";
2373
- return z(Re, { commands: o2, disabled: r2, commandHook: n2, scope: a2, label: s2, 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: i2, icon: z(Oe, { className: "label", icon: null, label: s2 }) });
2408
+ return z(Pe, { commands: o2, disabled: r2, commandHook: n2, scope: a2, label: s2, 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: i2, icon: z(Oe, { className: "label", icon: null, label: s2 }) });
2374
2409
  }));
2375
- Oa.displayName = "StandaloneFileCommandButton";
2376
- const Va = z(He, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: z(Q, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: z(E, { onClick: () => {
2410
+ Xa.displayName = "StandaloneFileCommandButton";
2411
+ const Za = 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: () => {
2377
2412
  window?.open("https://www.sheetxl.com", "_blank");
2378
- }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Ga = $(O((e2, t2) => {
2379
- const { commands: o2, workbook: n2, logo: a2 = Va, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = _e(), [c2, { width: m2 }] = qt(), p2 = m2 < 530, u2 = l2 ? z(Oa, { commands: o2, commandHook: { beforeExecute() {
2413
+ }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Ya = $(O((e2, t2) => {
2414
+ const { commands: o2, workbook: n2, logo: a2 = Za, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = _e(), [c2, { width: m2 }] = _t(), p2 = m2 < 530, u2 = l2 ? z(Xa, { commands: o2, commandHook: { beforeExecute() {
2380
2415
  d2?.closeAll();
2381
2416
  }, onError(e3, t3, o3) {
2382
- } } }) : null, h2 = i2 ? z(un, { commands: o2, commandHook: { beforeExecute() {
2417
+ } } }) : null, g2 = i2 ? z(Ia, { commands: o2, commandHook: { beforeExecute() {
2383
2418
  d2?.closeAll();
2384
2419
  }, onError(e3, t3, o3) {
2385
- } } }) : null, g2 = V(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = q(null);
2386
- return z(Q, { ref: Gt([f2, c2, t2]), ...s2, children: la({ commands: o2, renderCompact: p2, workbook: n2, selectWrapper: (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 && !h2 ? "0 0 auto" : "1 1 100%" }, children: h2 })] }), selectProps: g2, toolbarsProps: { Home: { sx: {} } } }) });
2420
+ } } }) : null, h2 = V(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = q(null);
2421
+ return z(J, { ref: Ut([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: {} } } }) });
2387
2422
  }));
2388
- Ga.displayName = "StudioToolbar";
2389
- const Ka = $(O((e2, t2) => {
2390
- const { workbook: o2, setWorkbook: n2, refWorkbookTitle: a2, titleWorkbook: r2, setWorkbookTitle: l2, titlePlaceHolder: i2, children: s2, undoManager: d2, commands: c2, importExportDisabled: m2, themeOptions: p2 } = e2, u2 = Qt(), h2 = u2 ? u2.enqueueSnackbar : () => {
2391
- }, g2 = u2 ? u2.closeSnackbar : () => {
2392
- }, [f2, x2] = U({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), b2 = G(() => {
2393
- x2((e3) => ({ ...e3, isMounted: true }));
2394
- }, []), y2 = G(() => {
2395
- x2((e3) => ({ ...e3, isMounted: false }));
2396
- }, []), w2 = {}, k2 = at(w2), S2 = rt(w2), C2 = lt(w2), v2 = q(/* @__PURE__ */ new Set()), T2 = V(() => {
2397
- const e3 = (e4, t4) => {
2398
- if (t4?.onceKey) {
2399
- if (v2.current.has(t4.onceKey)) return;
2400
- const e5 = new Set(v2.current);
2401
- e5.add(t4.onceKey), v2.current = e5;
2402
- }
2403
- const o4 = { variant: t4?.type ?? St.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t4?.preventDuplicate, persist: t4?.persist ?? t4?.type === St.Error, action: (e5) => z(te, { onClick: () => g2(e5), children: z(xt, { iconKey: "Cancel" }) }) };
2404
- t4?.enqueueProps && Object.assign(o4, t4.enqueueProps), e4 || console.log("message is 'null'", t4), h2(e4 ?? "Alert", o4);
2405
- }, t3 = { showMessage: e3, showBusy: (e4, t4) => {
2406
- let o4 = null;
2407
- const n3 = new Promise((e5) => {
2408
- o4 = e5;
2409
- });
2410
- return x2((t5) => {
2411
- const a3 = new Map(t5.starting);
2412
- a3.set(n3, o4);
2413
- return { ...t5, label: e4, starting: a3 };
2414
- }), n3;
2415
- }, showWindow: (e4, t4, o4) => {
2416
- const n3 = { ...t4, onKeyDown: (e5) => {
2417
- c2?.dispatchToFocusedCommand(e5), e5.isDefaultPrevented() || e5.isPropagationStopped() || t4?.onKeyDown?.(e5);
2418
- } };
2419
- return k2(e4, { sort: () => import("./B9TRK2jd_Ki2RifT.mjs"), numberFormat: () => import("./COoX8Ir66wNuWJ_m.mjs"), hyperlink: () => import("./BTp8XtWh47Y1g1MM.mjs"), comments: () => import("./CN79Z_qqLiF3V5r0.mjs"), find: () => import("./C5WzmLTAphEQU3CU.mjs"), tableDetails: () => import("./BcB8nCbI5HW5jv5q.mjs"), tableNew: () => import("./qpKmKMfv4DDofXKf.mjs"), namedDetails: () => import("./CxbA2L1Ap9NSJcxm.mjs") }[e4], n3, o4);
2420
- }, showOptions: S2, showInputOptions: C2, showError: (t4) => {
2421
- let o4, n3 = St.Error, a3 = "Unknown Error";
2422
- "string" == typeof t4 ? a3 = t4 : t4 instanceof Error && (o4 = t4, t4.message && (a3 = t4.message)), t4 instanceof jt && (n3 = St.Info), e3(a3, { type: n3, enqueueProps: { error: o4 } });
2423
- } }, o3 = new Et();
2424
- return o3.setOverrides(t3), o3;
2425
- }, []), P2 = G(() => {
2426
- }, []), R2 = ((e3) => {
2427
- const { workbook: t3, setWorkbook: o3, notifier: n3, importExportDisabled: a3, workbookTitle: r3 = "export", setWorkbookTitle: l3, requestWorkbookTitle: i3, themeOptions: s3, undoManager: d3, commands: c3, onExecute: m3 } = e3, p3 = ht(s3?.onModeChange, [s3?.onModeChange]), u3 = ht(s3?.onEnabledDarkGridChange, [s3?.onEnabledDarkGridChange]), h3 = ht(s3?.onEnabledDarkImagesChange, [s3?.onEnabledDarkImagesChange]), g3 = ht(async (e4 = null, t4 = null) => {
2423
+ Ya.displayName = "StudioToolbar";
2424
+ const Qa = $((e2) => {
2425
+ 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) => {
2426
+ 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) => {
2428
2427
  const o4 = [];
2429
- let a4, r4 = null, l4 = null;
2430
- if ("string" == typeof e4 ? l4 = e4 : r4 = e4, a4 = r4 ? e4 : await Kt.openFileDialog(l4 ?? za.getAllReadFormatTypeAsString().join(",")), !a4) return null;
2431
- const i4 = { source: a4, createWorkbookOptions: t4, onWarning: (e5) => {
2428
+ let n4, a4 = null, r4 = null;
2429
+ if ("string" == typeof e4 ? r4 = e4 : a4 = e4, n4 = a4 ? e4 : await jt.openFileDialog(r4 ?? _a.getAllReadFormatTypeAsString().join(",")), !n4) return null;
2430
+ const l4 = { source: n4, createWorkbookOptions: t4, onWarning: (e5) => {
2432
2431
  o4.push(e5);
2433
- } }, s4 = await za.read(i4, n3);
2434
- return o4.length > 0 && (n3.showMessage("Some elements were not able to be imported. See console for details."), console.warn("Import warnings:\n" + o4.join("\n"))), s4;
2435
- }, [m3, n3, t3]), f3 = ht(async (e4, t4, o4) => {
2436
- if (!t4 && i3) {
2437
- const t5 = await i3("Enter Workbook name to " + (o4.isDefault ? "Save." : `Export as ${o4.description}.`));
2438
- return null !== t5 && za.writeFile(t5, e4, { formatType: o4.key });
2432
+ } }, i4 = await _a.read(l4, m3);
2433
+ 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;
2434
+ }, [c3, m3, t3]), f2 = gt(async (e4, t4, o4) => {
2435
+ if (!t4 && l3) {
2436
+ const t5 = await l3("Enter Workbook name to " + (o4.isDefault ? "Save." : `Export as ${o4.description}.`));
2437
+ return null !== t5 && _a.writeFile(t5, e4, { formatType: o4.key });
2439
2438
  }
2440
- return za.writeFile(t4, e4, { formatType: o4.key });
2441
- }, [n3, t3, i3]), x3 = G(() => ({ contains: (e4) => true, focus() {
2442
- } }), []), b3 = V(() => {
2439
+ return _a.writeFile(t4, e4, { formatType: o4.key });
2440
+ }, [m3, t3, l3]), x2 = K(() => ({ contains: (e4) => true, focus() {
2441
+ } }), []), b2 = V(() => {
2443
2442
  const e4 = [];
2444
- a3 || (za.getWriteFormats().forEach((o4) => {
2445
- const a4 = o4.isDefault, l4 = { label: a4 ? "Save Workbook" : `Save Workbook as ${o4.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${o4.description}` }, tags: o4.tags, description: `Save the workbook to the desktop${a4 ? "" : ` as ${o4.description}`}.`, icon: "FileDownloadAsSheet" };
2446
- a4 && (l4.shortcut = { key: "S", modifiers: [Dt.Ctrl] }, e4.push(new Rt("saveWorkbookAs", x3, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Dt.Shift, Dt.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
2447
- f3(t3, null, o4).catch((e5) => {
2448
- n3.showError(e5);
2443
+ n3 || (_a.getWriteFormats().forEach((o4) => {
2444
+ 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" };
2445
+ n4 && (r4.shortcut = { key: "S", modifiers: [Dt.Ctrl] }, e4.push(new Pt("saveWorkbookAs", x2, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Dt.Shift, Dt.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
2446
+ f2(t3, null, o4).catch((e5) => {
2447
+ m3.showError(e5);
2449
2448
  });
2450
2449
  })));
2451
- const i5 = o4.key, s4 = a4 ? "saveWorkbook" : `saveWorkbookAs${i5}`;
2452
- "CSV" === i5 ? l4.icon = "FileDownloadAsCSV" : "Excel" === i5 && (l4.icon = "FileDownloadAsExcel"), e4.push(new Rt(s4, x3, l4, (e5) => {
2453
- f3(t3, e5 ?? r3, o4).catch((e6) => {
2454
- n3.showError(e6);
2450
+ const l5 = o4.key, i4 = n4 ? "saveWorkbook" : `saveWorkbookAs${l5}`;
2451
+ "CSV" === l5 ? r4.icon = "FileDownloadAsCSV" : "Excel" === l5 && (r4.icon = "FileDownloadAsExcel"), e4.push(new Pt(i4, x2, r4, (e5) => {
2452
+ f2(t3, e5 ?? a3, o4).catch((e6) => {
2453
+ m3.showError(e6);
2455
2454
  });
2456
2455
  }));
2457
- }), e4.push(new Rt("openWorkbook", x3, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", icon: "FileOpen", shortcut: { key: "O", modifiers: [Dt.Ctrl] } }, async (e5 = null) => {
2458
- const a4 = { date1904: t3.isDate1904(), ...t3.options };
2456
+ }), e4.push(new Pt("openWorkbook", x2, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", icon: "FileOpen", shortcut: { key: "O", modifiers: [Dt.Ctrl] } }, async (e5 = null) => {
2457
+ const n4 = { date1904: t3.isDate1904(), ...t3.options };
2459
2458
  try {
2460
- const r4 = await g3(e5, a4);
2461
- if (!r4) return;
2462
- const i5 = r4.title, s4 = r4.workbook, d4 = s4.getSelectedSheet();
2463
- if ("text/csv" === r4.formatType.mimeType) {
2464
- const e6 = t3.findValidSheetName(i5);
2459
+ const a4 = await h2(e5, n4);
2460
+ if (!a4) return;
2461
+ const l5 = a4.title, i4 = a4.workbook, s4 = i4.getSelectedSheet();
2462
+ if ("text/csv" === a4.formatType.mimeType) {
2463
+ const e6 = t3.findValidSheetName(l5);
2465
2464
  await t3.doBatch(async () => {
2466
- const o4 = d4.getUsedRange();
2467
- if (!o4) return void n3.showMessage("The file appears to be blank.");
2468
- const a5 = t3.getSheets().add({ name: e6, autoSelect: true }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 });
2469
- await a5.copyFrom(o4);
2470
- }, `Import CSV '${i5}'`);
2471
- } else t3?.close(), l3?.(i5), o3(s4);
2465
+ const o4 = { colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 };
2466
+ let n5 = s4.getUsedRange();
2467
+ if (!n5) return void m3.showMessage("The file appears to be blank.");
2468
+ n5 = n5.getUnion(o4);
2469
+ const a5 = t3.getSheets().add({ name: e6, autoSelect: true }).getRange(o4);
2470
+ await a5.copyFrom(n5);
2471
+ }, `Import CSV '${l5}'`);
2472
+ } else t3?.close(), r3?.(l5), o3(i4);
2472
2473
  } catch (e6) {
2473
- n3.showError(e6);
2474
+ m3.showError(e6);
2474
2475
  }
2475
- })), e4.push(new Rt("openWorkbookFromUrl", x3, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
2476
+ })), e4.push(new Pt("openWorkbookFromUrl", x2, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
2476
2477
  if (!e5) {
2477
- const t4 = await n3.showInputOptions({ 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"] });
2478
+ const t4 = await m3.showInputOptions({ 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"] });
2478
2479
  if ("Open" !== t4.option) return;
2479
2480
  e5 = t4.input;
2480
2481
  }
2481
2482
  e5 && console.log("openWorkbookFromUrl", e5);
2482
2483
  })));
2483
- let i4 = [];
2484
- return s3 && (i4 = [new Rt("themeMode", x3, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new Rt("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 Rt("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 Rt("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, ...i4, new Pt("help", x3, { label: "Show Help", description: "Provide Help.", icon: "Documentation", shortcut: { key: "F1" } }, () => {
2485
- }), new Pt("showKeyboardShortcuts", x3, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", icon: "Keyboard", shortcut: { key: "/", modifiers: [Dt.Ctrl] } }, () => {
2486
- }), new Rt("gotoUrlGithub", x3, { label: "Github", description: "Download examples, explore source code, and leave a star.", icon: "Github" }, () => {
2484
+ let l4 = [];
2485
+ return i3 && (l4 = [new Pt("themeMode", x2, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new Pt("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 Pt("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 Pt("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, ...l4, new Rt("help", x2, { label: "Show Help", description: "Provide Help.", icon: "Documentation", shortcut: { key: "F1" } }, () => {
2486
+ }), new Rt("showKeyboardShortcuts", x2, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", icon: "Keyboard", shortcut: { key: "/", modifiers: [Dt.Ctrl] } }, () => {
2487
+ }), new Pt("gotoUrlGithub", x2, { label: "Github", description: "Download examples, explore source code, and leave a star.", icon: "Github" }, () => {
2487
2488
  window?.open("https://github.com/sheetxl/sheetxl");
2488
- }), new Rt("gotoUrlDiscord", x3, { label: "Discord", description: "Join our community on discord.", icon: "Discord" }, () => {
2489
+ }), new Pt("gotoUrlDiscord", x2, { label: "Discord", description: "Join our community on discord.", icon: "Discord" }, () => {
2489
2490
  window?.open("https://discord.gg/NTKdwUgK9p");
2490
- }), new Rt("gotoUrlDocumentation", x3, { label: "Documentation", description: "Read the documentation.", icon: "Documentation" }, () => {
2491
+ }), new Pt("gotoUrlDocumentation", x2, { label: "Documentation", description: "Read the documentation.", icon: "Documentation" }, () => {
2491
2492
  window?.open("https://www.sheetxl.com/docs");
2492
- }), new Rt("gotoUrlIssue", x3, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request.", icon: "Ticket" }, () => {
2493
+ }), new Pt("gotoUrlIssue", x2, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request.", icon: "Ticket" }, () => {
2493
2494
  window?.open("https://github.com/sheetxl/sheetxl/issues");
2494
2495
  })];
2495
- }, [t3, r3, n3, a3, s3, c3, d3]), y3 = V(() => {
2496
+ }, [t3, a3, m3, n3, i3, d3, s3]), y2 = V(() => {
2496
2497
  let e4 = null;
2497
- return e4 = c3 ? c3.createChildGroup(x3, "standaloneWorkbook", false) : new Mt(x3, "standaloneWorkbook"), e4.addCommands(b3, true), e4;
2498
- }, [c3, b3]);
2499
- Nt({ manager: d3, commands: y3 });
2500
- const w3 = de("(prefers-color-scheme: dark)"), { themeMode: k3 } = tt();
2501
- j(() => {
2502
- if (!s3 || !y3) return;
2503
- const e4 = "dark" === s3.mode || !s3.mode && "dark" === k3;
2504
- y3.getCommand("themeMode").update({ state: s3.mode ?? null, label: e4 ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: e4 ? "Dark Mode" : "Light Mode" }, icon: e4 ? "DarkMode" : "LightMode" }).updateCallback(() => {
2498
+ return e4 = d3 ? d3.createChildGroup(x2, "standaloneWorkbook", false) : new Mt(x2, "standaloneWorkbook"), e4.addCommands(b2, true), e4;
2499
+ }, [d3, b2]);
2500
+ Bt({ manager: s3, commands: y2 });
2501
+ const w2 = be("(prefers-color-scheme: dark)"), { themeMode: S2 } = tt();
2502
+ _(() => {
2503
+ if (!i3 || !y2) return;
2504
+ const e4 = "dark" === i3.mode || !i3.mode && "dark" === S2;
2505
+ y2.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(() => {
2505
2506
  p3(e4 ? ot.Light : ot.Dark);
2506
- }), y3.getCommand("defaultThemeMode").update({ state: !s3.mode, icon: w3 ? "SystemDefaultDarkMode" : "SystemDefaultLightMode" }).updateCallback(() => {
2507
+ }), y2.getCommand("defaultThemeMode").update({ state: !i3.mode, icon: w2 ? "SystemDefaultDarkMode" : "SystemDefaultLightMode" }).updateCallback(() => {
2507
2508
  p3(null);
2508
- }), y3.getCommand("enableDarkGrid").update({ state: s3.enableDarkGrid }).updateCallback(() => {
2509
- u3(!s3.enableDarkGrid);
2510
- }), y3.getCommand("enableDarkImages").update({ state: s3.enableDarkImages }).updateCallback(() => {
2511
- h3(!s3.enableDarkImages);
2509
+ }), y2.getCommand("enableDarkGrid").update({ state: i3.enableDarkGrid }).updateCallback(() => {
2510
+ u3(!i3.enableDarkGrid);
2511
+ }), y2.getCommand("enableDarkImages").update({ state: i3.enableDarkImages }).updateCallback(() => {
2512
+ g3(!i3.enableDarkImages);
2512
2513
  });
2513
- }, [k3, s3, b3]);
2514
- const { showModal: S3 } = nt();
2515
- return j(() => {
2514
+ }, [S2, i3, b2]);
2515
+ const { showModal: k2 } = nt();
2516
+ return _(() => {
2516
2517
  const e4 = () => new Promise((e5, t4) => {
2517
- const o4 = W.lazy(() => import("./CNCYE_ff8SnJJMPN.mjs")), n4 = S3(o4, { title: "Shortcut Keys Reference", commands: y3, onDone: () => {
2518
+ const o4 = W.lazy(() => import("./D60xUWK_BS-7PMLM.mjs")), n4 = k2(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
2518
2519
  n4.hide();
2519
- }, TransitionProps: { onExited: () => {
2520
+ }, slotProps: { transition: { onExited: () => {
2520
2521
  e5(true);
2521
- } } });
2522
+ } } } });
2522
2523
  });
2523
- y3.getCommand("showKeyboardShortcuts").updateCallback(() => e4()), y3.getCommand("help").updateCallback(() => e4());
2524
- }, [b3, y3]), y3;
2525
- })({ notifier: T2, workbook: o2, setWorkbook: n2, importExportDisabled: m2, workbookTitle: r2, setWorkbookTitle: l2, commands: c2, requestWorkbookTitle: (e3) => new Promise((t3) => {
2526
- a2.current ? a2.current.requestWorkbookTitle((e4, o3) => {
2524
+ y2.getCommand("showKeyboardShortcuts").updateCallback(() => e4()), y2.getCommand("help").updateCallback(() => e4());
2525
+ }, [b2, y2]), y2;
2526
+ })({ workbook: t2, setWorkbook: o2, importExportDisabled: c2, workbookTitle: a2, setWorkbookTitle: r2, commands: d2, requestWorkbookTitle: (e3) => new Promise((t3) => {
2527
+ n2.current ? n2.current.requestWorkbookTitle((e4, o3) => {
2527
2528
  t3(e4);
2528
- }, { selectAll: true, requestReason: e3 }) : t3(i2);
2529
- }), themeOptions: p2, undoManager: d2, onExecute: P2 });
2530
- j(() => {
2531
- f2.starting.size <= 0 || !f2.isMounted || x2((e3) => {
2529
+ }, { selectAll: true, requestReason: e3 }) : t3(l2);
2530
+ }), themeOptions: m2, undoManager: s2, onExecute: K(() => {
2531
+ }, []) }), u2 = V(() => z(La, { commands: p2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [p2]), g2 = { commands: p2 };
2532
+ return t2 && (g2.statusBarProps = { childrenEnd: u2 }), i2 ? W.cloneElement(i2, g2) : null;
2533
+ });
2534
+ Qa.displayName = "CommandsWrapper";
2535
+ const Ja = $((e2) => {
2536
+ const { children: t2 } = e2, o2 = oo(), n2 = o2 ? o2.enqueueSnackbar : () => {
2537
+ }, a2 = o2 ? o2.closeSnackbar : () => {
2538
+ }, [r2, l2] = U({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), i2 = K(() => {
2539
+ l2((e3) => ({ ...e3, isMounted: true }));
2540
+ }, []), s2 = K(() => {
2541
+ l2((e3) => ({ ...e3, isMounted: false }));
2542
+ }, []), d2 = {}, c2 = at(d2), m2 = rt(d2), p2 = lt(d2), u2 = q(/* @__PURE__ */ new Set()), g2 = V(() => {
2543
+ const e3 = (e4, t4) => {
2544
+ if (t4?.onceKey) {
2545
+ if (u2.current.has(t4.onceKey)) return;
2546
+ const e5 = new Set(u2.current);
2547
+ e5.add(t4.onceKey), u2.current = e5;
2548
+ }
2549
+ 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" }) }) };
2550
+ t4?.enqueueProps && Object.assign(o4, t4.enqueueProps), e4 || console.log("message is 'null'", t4), n2(e4 ?? "Alert", o4);
2551
+ }, t3 = { showMessage: e3, showBusy: (e4, t4) => {
2552
+ let o4 = null;
2553
+ const n3 = new Promise((e5) => {
2554
+ o4 = e5;
2555
+ });
2556
+ return l2((t5) => {
2557
+ const a3 = new Map(t5.starting);
2558
+ a3.set(n3, o4);
2559
+ return { ...t5, label: e4, starting: a3 };
2560
+ }), n3;
2561
+ }, showWindow: (e4, t4, o4) => {
2562
+ const n3 = { ...t4, onKeyDown: (e5) => {
2563
+ e5.isDefaultPrevented() || e5.isPropagationStopped() || t4?.onKeyDown?.(e5);
2564
+ } };
2565
+ return c2(e4, { sort: () => import("./DmdldJQanZCNdfA5.mjs"), numberFormat: () => import("./BAgtosqQwtrUsOYl.mjs"), hyperlink: () => import("./Cfzjf7vBs29sO_g3.mjs"), comments: () => import("./CYU-oRRhaNiOTVNa.mjs"), find: () => import("./B21Usvp_sTqMHAZ4.mjs"), tableNew: () => import("./GzNLdpzukdCxYbbC.mjs"), namedDetails: () => import("./DWhJA7EI9CmoBPDY.mjs") }[e4], n3, o4);
2566
+ }, showOptions: m2, showInputOptions: p2, showError: (t4) => {
2567
+ let o4, n3 = kt.Error, a3 = "Unknown Error";
2568
+ "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 } });
2569
+ } }, o3 = new Et();
2570
+ return o3.setOverrides(t3), o3;
2571
+ }, []);
2572
+ _(() => {
2573
+ r2.starting.size <= 0 || !r2.isMounted || l2((e3) => {
2532
2574
  const t3 = new Map(e3.running);
2533
2575
  e3.starting.forEach((e4, o3) => {
2534
2576
  const n3 = () => {
2535
- x2((e5) => {
2577
+ l2((e5) => {
2536
2578
  const t4 = new Map(e5.running);
2537
2579
  t4.delete(o3);
2538
2580
  return { ...e5, running: t4 };
@@ -2542,68 +2584,71 @@ const Ka = $(O((e2, t2) => {
2542
2584
  });
2543
2585
  return { ...e3, starting: /* @__PURE__ */ new Map(), running: t3 };
2544
2586
  });
2545
- }, [f2]);
2546
- const [D2, M2] = U(null);
2547
- j(() => {
2548
- 0 !== f2.starting.size || 0 !== f2.running.size ? M2(z(Fe, { icon: z(it, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: true, label: f2.label, onMount: b2, onUnmount: y2, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : M2(null);
2549
- }, [f2.starting, f2.running]);
2550
- const F2 = V(() => z(hn, { commands: R2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [R2]), B2 = { commands: R2 };
2551
- return o2 && (B2.statusBarProps = { childrenEnd: F2 }), L(At, { notifier: T2, children: [D2, s2 ? W.cloneElement(s2, B2) : null] });
2552
- }));
2553
- Ka.displayName = "SnackbarAndCommandsWrapper";
2554
- const Ua = $(O((e2, t2) => {
2587
+ }, [r2]);
2588
+ const [h2, f2] = U(null);
2589
+ return _(() => {
2590
+ 0 !== r2.starting.size || 0 !== r2.running.size ? f2(z(Fe, { 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);
2591
+ }, [r2.starting, r2.running]), L(At, { notifier: g2, children: [h2, t2] });
2592
+ });
2593
+ Ja.displayName = "SnackbarWrapper";
2594
+ const er = $(O((e2, t2) => {
2555
2595
  const { children: o2, title: n2, taskPanes: a2, onSelect: r2, selected: l2, registry: i2 = T, style: s2, iconsOnly: d2, className: c2, ...m2 } = e2, p2 = V(() => a2.map((t3) => {
2556
2596
  const o3 = i2.getRegisteredTaskPane(t3);
2557
2597
  if (!o3) return null;
2558
2598
  let n3 = o3.getIcon?.();
2559
2599
  n3 && ("string" == typeof n3 && (n3 = z(xt, { iconKey: n3 })), n3 = z("span", { style: { display: "inline-block", transform: "rotate(90deg)", transformOrigin: "center" }, children: n3 }));
2560
2600
  const a3 = t3 === l2;
2561
- return z(be, { value: t3, label: z(Me, { 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(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);
2562
- }), [a2, l2, r2, i2]), u2 = Ct(t2, () => ({ isTaskPaneStrip: () => true }), []), h2 = V(() => mt("taskpane-strip", c2), [c2]);
2563
- return z(Q, { ref: u2, className: h2, sx: { paddingLeft: "2px", paddingTop: "4px", ...s2 }, ...m2, children: z(xe, { orientation: "vertical", variant: "scrollable", value: l2, onChange: (e3, t3) => {
2601
+ return z(xe, { value: t3, label: z(Me, { 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);
2602
+ }), [a2, l2, r2, i2]), u2 = Ct(t2, () => ({ isTaskPaneStrip: () => true }), []), g2 = V(() => mt("taskpane-strip", c2), [c2]);
2603
+ 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) => {
2564
2604
  r2(t3);
2565
2605
  }, slotProps: { list: { sx: { gap: "2px" } }, indicator: { sx: { left: "0px", right: "unset" } } }, children: p2 }) });
2566
- })), ja = (e2, t2) => z(Ua, { ref: t2, ...e2 }), _a = W.forwardRef((e2, t2) => {
2567
- const { commands: o2, themeOptions: n2, model: a2, ...r2 } = e2, l2 = `solid ${Ht(n2.palette.divider, 0.2)} 1px`, i2 = `${n2.shape.borderRadius ?? 4}px`, s2 = `${n2.spacing?.(0.5) ?? 4}px`, d2 = q(null);
2568
- return z(A, { model: a2, ref: t2, frameProps: { style: { border: l2, borderRadius: i2, marginBottom: s2 } }, alwaysShowStrip: true, renderTaskPanelTitle: (e3, t3) => {
2606
+ })), tr = (e2, t2) => z(er, { ref: t2, ...e2 }), or = W.forwardRef((e2, t2) => {
2607
+ 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);
2608
+ return z(A, { model: n2, ref: t2, frameProps: { style: { border: l2, borderRadius: i2, marginBottom: s2 } }, alwaysShowStrip: true, renderTaskPanelTitle: (e3, t3) => {
2569
2609
  const { title: o3, icon: n3, onClose: a3, readOnly: r3, focused: l3, ...i3 } = e3;
2570
- return z(Se, { 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) => Ht(e4.palette.action.hover, 0.03), borderBottom: (e4) => `solid ${Ht(e4.palette.divider, 0.2)} 1px` }, ...i3, 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: 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) => {
2610
+ 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) => {
2571
2611
  d2.current?.start(e4, { center: false }), e4.stopPropagation(), e4.preventDefault();
2572
2612
  }, onPointerUp: () => {
2573
2613
  a3();
2574
2614
  }, children: z(xt, { iconKey: "Close" }) }) })] }) });
2575
- }, renderTaskPaneStrip: ja, ...e2, onOpen: () => {
2615
+ }, renderTaskPaneStrip: tr, ...e2, onOpen: () => {
2576
2616
  e2?.onOpen?.();
2577
2617
  }, onClose: () => {
2578
2618
  e2?.onClose?.();
2579
- }, commands: o2, ...r2 });
2580
- });
2581
- It.register("plugin-scripts", { icons: {} }), T.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: Qn }, true);
2582
- const qa = $(O((e2, t2) => {
2583
- 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: h2 = false, themeOptions: f2, autoFocus: x2 = false, commands: b2, title: y2, onTitleChange: w2, titleProps: k2, renderLoadingPanel: S2, ...C2 } = e2, v2 = q(null), T2 = ht(p2, [p2]), R2 = ht(w2 ?? k2?.onTitleChange, [w2 ?? k2?.onTitleChange]), D2 = k2?.placeHolder ?? "Untitled", M2 = f2?.mode, { themeMode: F2, source: B2 } = tt({ mode: M2 }), N2 = V(() => ({ ...f2, light: dt(false, Kt.deepMerge(f2?.theme ?? {}, f2?.light ?? {})), dark: dt(true, Kt.deepMerge(f2?.theme ?? {}, f2?.dark ?? {})) }), [f2]), E2 = F2 === ot.Dark, [A2, H2] = U(null);
2584
- j(() => {
2585
- H2(i2 ?? new _t());
2619
+ }, commands: o2, ...a2 });
2620
+ }), nr = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, ar = $(O((e2, t2) => {
2621
+ const { mainElement: o2, sidebarElement: n2, className: a2, style: r2, ...l2 } = e2, i2 = zt(), [s2, { width: d2 }] = _t(), c2 = d2 > 530 || 0 === d2, m2 = q(null);
2622
+ let p2 = null, u2 = 4, g2 = 13;
2623
+ 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: Ut([m2, s2, t2]), className: a2, style: r2 ? { ...nr, ...r2 } : nr, ...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" } } });
2624
+ }));
2625
+ ar.displayName = "StudioSplitPane";
2626
+ It.register("plugin-scripts", { icons: {} }), T.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: qn }, true);
2627
+ const rr = $(O((e2, t2) => {
2628
+ 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: f2, 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", M2 = f2?.mode, { themeMode: F2, source: N2 } = tt({ mode: M2 }), B2 = V(() => ({ ...f2, light: dt(false, jt.deepMerge(f2?.theme ?? {}, f2?.light ?? {})), dark: dt(true, jt.deepMerge(f2?.theme ?? {}, f2?.dark ?? {})) }), [f2]), E2 = F2 === ot.Dark, [A2, H2] = U(null);
2629
+ _(() => {
2630
+ H2(i2 ?? new Qt());
2586
2631
  }, [i2]);
2587
- const [W2, $2] = U(null), [O2, K2] = U(null), _2 = P();
2588
- J(() => {
2589
- if (!c2 || 0 === Object.keys(c2).length && !Kt.isPromiseLike(c2)) {
2590
- const e3 = { theme: _2.getDefaultTheme(), ...m2 };
2591
- K2(new g(e3));
2592
- } else K2(c2);
2593
- }, [c2]), J(() => {
2632
+ const [W2, $2] = U(null), [O2, G2] = U(null), j2 = R();
2633
+ Q(() => {
2634
+ if (!c2 || 0 === Object.keys(c2).length && !jt.isPromiseLike(c2)) {
2635
+ const e3 = { theme: j2.getDefaultTheme(), ...m2 };
2636
+ G2(new h(e3));
2637
+ } else G2(c2);
2638
+ }, [c2]), Q(() => {
2594
2639
  if (!O2) return;
2595
- if (O2 instanceof g) return $2({ workbook: O2 }), void (c2 !== O2 && T2?.(O2));
2640
+ if (O2 instanceof h) return $2({ workbook: O2 }), void (c2 !== O2 && T2?.(O2));
2596
2641
  (async () => {
2597
2642
  try {
2598
2643
  let e3, t3 = await Promise.resolve(O2);
2599
- t3 && t3.source && (t3 = await za.read(t3)), t3.workbook ? (te2(t3.title), e3 = t3.workbook) : e3 = t3, T2?.(e3), $2({ workbook: e3 });
2644
+ t3 && t3.source && (t3 = await _a.read(t3)), t3.workbook ? (te2(t3.title), e3 = t3.workbook) : e3 = t3, T2?.(e3), $2({ workbook: e3 });
2600
2645
  } catch (e3) {
2601
2646
  T2?.(null), $2({ error: e3 });
2602
2647
  }
2603
2648
  })();
2604
2649
  }, [O2]);
2605
2650
  const [X2, Z2] = U(null);
2606
- j(() => {
2651
+ _(() => {
2607
2652
  if (!A2 || !W2) return;
2608
2653
  A2.clear();
2609
2654
  const e3 = W2?.workbook?.getTransactions();
@@ -2614,31 +2659,31 @@ const qa = $(O((e2, t2) => {
2614
2659
  }) }) : console.warn("commit has no description", t3);
2615
2660
  } });
2616
2661
  }, [A2, W2, X2]);
2617
- const Y2 = ht((e3) => {
2662
+ const Y2 = gt((e3) => {
2618
2663
  e3 ? A2.setRepeatableOperation({ description: e3.label(), repeat: async () => e3.execute() }) : A2.setRepeatableOperation(null);
2619
- }, [A2]), [ee2, te2] = U(y2 ?? k2?.title ?? "");
2620
- j(() => {
2621
- te2(y2 ?? k2?.title ?? "");
2622
- }, [y2 ?? k2?.title]), j(() => {
2623
- R2?.(ee2);
2664
+ }, [A2]), [ee2, te2] = U(y2 ?? S2?.title ?? "");
2665
+ _(() => {
2666
+ te2(y2 ?? S2?.title ?? "");
2667
+ }, [y2 ?? S2?.title]), _(() => {
2668
+ P2?.(ee2);
2624
2669
  }, [ee2]);
2625
2670
  const [oe2, ne2] = U(null), ae2 = V(() => {
2626
2671
  const e3 = () => ({ contains: (e4) => true, focus() {
2627
2672
  } });
2628
2673
  return b2 ? b2.createChildGroup(e3, "application", false) : new Mt(e3, "application");
2629
- }, [b2]), le2 = ht(async (e3) => {
2674
+ }, [b2]), le2 = gt(async (e3) => {
2630
2675
  ne2(e3.source.getViewportElement()), Z2(e3), ae2.activate("sheet"), await It.prefetch(), r2?.(e3);
2631
2676
  }, [ae2]);
2632
- j(() => {
2677
+ _(() => {
2633
2678
  X2 && x2 && X2.source?.focus("object" == typeof x2 ? x2 : void 0);
2634
2679
  }, [X2]);
2635
- const ie2 = q(null), se2 = G((e3) => {
2680
+ const ie2 = q(null), se2 = K((e3) => {
2636
2681
  let t3 = null;
2637
- return k2?.hidden || (t3 = z(Ea, { ...k2, style: { maxWidth: "100%", ...k2?.style }, workbook: v2.current, ref: ie2, title: ee2, placeHolder: D2, onTitleChange: (e4) => {
2682
+ return S2?.hidden || (t3 = z(Fa, { ...S2, style: { maxWidth: "100%", ...S2?.style }, workbook: v2.current, ref: ie2, title: ee2, placeHolder: D2, onTitleChange: (e4) => {
2638
2683
  te2(e4);
2639
- } })), z(Ga, { ...e3, logo: u2, mainElement: t3, showFileMenu: !h2, showAppearanceMenu: !!(N2?.onEnabledDarkGridChange || N2?.onEnabledDarkImagesChange || N2?.onModeChange) });
2640
- }, [u2, ee2, k2, N2, h2, ae2]);
2641
- j(() => {
2684
+ } })), z(Ya, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(B2?.onEnabledDarkGridChange || B2?.onEnabledDarkImagesChange || B2?.onModeChange) });
2685
+ }, [u2, ee2, S2, B2, g2, ae2]);
2686
+ _(() => {
2642
2687
  const e3 = (e4) => e4.preventDefault();
2643
2688
  return v2.current?.addEventListener("wheel", e3, { passive: false }), () => {
2644
2689
  v2.current?.removeEventListener("wheel", e3);
@@ -2646,100 +2691,101 @@ const qa = $(O((e2, t2) => {
2646
2691
  }, []);
2647
2692
  const de2 = V(() => {
2648
2693
  const e3 = { transparentBackground: true };
2649
- return z(Q, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...a2 }, children: S2?.(e3) ?? z(Fe, { ...e3 }) });
2650
- }, [n2, a2, S2]), ce2 = G(({ 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] = U(null), he2 = G((e3, t3) => z(_a, { ref: t3, themeOptions: E2 ? N2.dark : N2.light, model: O2, commands: ae2, ...e3 }), [ae2, O2, E2, N2]), ge2 = Gt([v2, t2]), fe2 = V(() => {
2694
+ 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(Fe, { ...e3 }) });
2695
+ }, [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] = U(null), ge2 = K((e3, t3) => z(or, { ref: t3, model: O2, commands: ae2, ...e3 }), [ae2, O2]), he2 = K((e3) => z(ar, { mainElement: e3, sidebarElement: pe2 }), [pe2]), fe2 = Ut([v2, t2]), xe2 = V(() => {
2651
2696
  if (!W2) return de2;
2652
2697
  if (W2.error || !W2.workbook) return ce2({ error: W2.error });
2653
2698
  let e3 = null, t3 = null, n3 = false;
2654
- return N2 && (e3 = E2 ? N2.dark : N2.light, t3 = E2 && N2.enableDarkGrid ? N2.dark : N2.light, n3 = N2.enableDarkImages), z(Ba, { sx: me2, style: a2, tabIndex: 0, autoFocus: true, workbook: W2.workbook, ref: ge2, renderToolbar: se2, onElementLoad: le2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
2699
+ 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) => {
2655
2700
  d2?.(e4);
2656
- }, renderLoadingPanel: S2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, sideBarElement: pe2, className: mt(o2), onContextMenu: (e4) => e4.preventDefault(), ...C2 }, "WorkbookElement");
2657
- }, [W2, ee2, A2, de2, S2, N2, C2, se2, me2]);
2658
- let xe2 = z(Jt, { fallbackRender: ce2, children: z(to, { maxSnack: 3, domRoot: oe2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2701
+ }, renderLoadingPanel: k2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, mainWrapper: he2, className: mt(o2), onContextMenu: (e4) => e4.preventDefault(), ...C2 }, "WorkbookElement");
2702
+ }, [W2, ee2, A2, de2, k2, B2, C2, se2, me2, he2]);
2703
+ let be2 = z(ao, { maxSnack: 3, domRoot: oe2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2659
2704
  v2.current?.focus();
2660
- }, Components: { error: $a }, 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(I, { createArea: he2, onUpdateArea: (e3) => {
2705
+ }, Components: { error: qa }, 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(I, { createArea: ge2, onUpdateArea: (e3) => {
2661
2706
  ue2(e3);
2662
- }, children: z(ct, { children: z(Ka, { workbook: W2?.workbook, setWorkbook: K2, importExportDisabled: h2, titlePlaceHolder: D2, titleWorkbook: ee2, setWorkbookTitle: te2, refWorkbookTitle: ie2, commands: ae2, undoManager: A2, themeOptions: N2, children: fe2 }) }) }) }) });
2663
- return N2 && (xe2 = L(Wt, { theme: E2 ? N2.dark : N2.light, children: [N2.cssBaseline ? z(Ce, {}) : null, xe2] })), xe2;
2707
+ }, children: z(ct, { children: z(Ja, { children: z(Lt, { children: z(Ht, { children: z(Qa, { workbook: W2?.workbook, setWorkbook: G2, importExportDisabled: g2, titlePlaceHolder: D2, titleWorkbook: ee2, setWorkbookTitle: te2, refWorkbookTitle: ie2, commands: ae2, undoManager: A2, themeOptions: B2, children: xe2 }) }) }) }) }) }) });
2708
+ return B2 && (be2 = L(Ot, { theme: E2 ? B2.dark : B2.light, children: [B2.cssBaseline ? z(Ce, {}) : null, be2] })), be2;
2664
2709
  }));
2665
- qa.displayName = "EagerStudio";
2666
- const Xa = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: qa, default: qa }, Symbol.toStringTag, { value: "Module" }));
2710
+ rr.displayName = "EagerStudio";
2711
+ const lr = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: rr, default: rr }, Symbol.toStringTag, { value: "Module" }));
2667
2712
  export {
2668
- un as AppearanceCommandButton,
2669
- io as AutoColorPosition,
2670
- Po as BorderCommandButton,
2671
- To as BorderPopupButton,
2672
- vo as BorderStyleButton,
2673
- po as C,
2674
- Eo as ClearCommandButton,
2675
- ho as ColorButton,
2676
- Ho as ColorCommandButton,
2677
- yo as ColorPanel,
2678
- lo as ColorPanelType,
2679
- ko as ColorPopupButton,
2713
+ Ia as AppearanceCommandButton,
2714
+ mo as AutoColorPosition,
2715
+ Mo as BorderCommandButton,
2716
+ Do as BorderPopupButton,
2717
+ Po as BorderStyleButton,
2718
+ ho as C,
2719
+ Lo as ClearCommandButton,
2720
+ xo as ColorButton,
2721
+ $o as ColorCommandButton,
2722
+ ko as ColorPanel,
2723
+ co as ColorPanelType,
2724
+ vo as ColorPopupButton,
2680
2725
  DefaultTaskPaneRegistry,
2681
- Lo as DeleteCellsCommandButton,
2682
- pn as DocThemeCommandButton,
2683
- qa as EagerStudio,
2684
- Ao as FillCommandButton,
2685
- Fn as FilterColumnMenu,
2686
- $o as FilterCommandButton,
2687
- Bn as Filters,
2688
- Mo as FindCommandButton,
2689
- Ko as FontFamilyCommandButton,
2690
- Fo as FontSizeCommandButton,
2691
- Mn as FormulaBar,
2692
- Do as FreezeCommandButton,
2693
- hn as HelpCommandButton,
2694
- oo as HorizontalAlignCommandButton,
2695
- Io as InsertCellsCommandButton,
2696
- wn as InsertFunctionCommandPopupButton,
2697
- xn as InsertFunctionSumCommandPopupButton,
2698
- gn as InsertImageCommandButton,
2726
+ Wo as DeleteCellsCommandButton,
2727
+ Aa as DocThemeCommandButton,
2728
+ rr as EagerStudio,
2729
+ Ho as FillCommandButton,
2730
+ Tn as FilterColumnMenu,
2731
+ Ko as FilterCommandButton,
2732
+ Rn as Filters,
2733
+ Bo as FindCommandButton,
2734
+ jo as FontFamilyCommandButton,
2735
+ Eo as FontSizeCommandButton,
2736
+ vn as FormulaBar,
2737
+ No as FreezeCommandButton,
2738
+ La as HelpCommandButton,
2739
+ ro as HorizontalAlignCommandButton,
2740
+ zo as InsertCellsCommandButton,
2741
+ $a as InsertFunctionCommandPopupButton,
2742
+ Ha as InsertFunctionSumCommandPopupButton,
2743
+ Jn as InsertImageCommandButton,
2699
2744
  LicenseManager,
2700
- Ro as MergeCommandButton,
2701
- Rn as NamedCollectionEditor,
2702
- Sn as NamedInput,
2703
- No as NumberFormatCommandButton,
2704
- _o as PasteCommandButton,
2705
- Jo as PresetCellStylesCommandButton,
2706
- ln as PresetTableStylesCommandButton,
2707
- vn as RangeInput,
2708
- Nn as SheetTab,
2709
- En as SheetTabMenu,
2710
- Tn as SheetZoomScale,
2711
- An as SheetsAllMenu,
2712
- Wo as SortFilterCommandButton,
2713
- Pn as StatusBar,
2714
- Aa as Studio,
2715
- Co as StyledStrokeIcon,
2716
- nn as TableStyleCanvasPreview,
2717
- an as TableStyleOptionsPanel,
2718
- tn as TableStylePreview,
2719
- Uo as TextEffectsCommandButton,
2720
- ao as TextOverflowCommandButton,
2721
- ro as TextRotateCommandButton,
2722
- dn as ThemeSelectButton,
2723
- cn as ThemeSelectPanel,
2724
- mn as ThemeSelectPopupButton,
2725
- jo as UnderlineCommandButton,
2726
- Oo as UndoRedoCommandButton,
2727
- no as VerticalAlignCommandButton,
2728
- zo as ViewGridLinesCommandButton,
2729
- qo as ViewHeadingsCommandButton,
2730
- fn as WalkingCopyCommandButton,
2731
- ya as WorkbookContextMenu,
2732
- Ba as WorkbookElement,
2733
- za as WorkbookIO,
2734
- ba as WorkbookStrip,
2735
- Ea as WorkbookTitle,
2736
- Xo as WorkbookViewCommandButton,
2737
- Ha as _WorkbookIO,
2738
- On as createGridStyleFromMUITheme,
2739
- Aa as default,
2740
- pa as defaultNewWorkbook,
2741
- Wn as setPrintExamplesOnLoad,
2745
+ Fo as MergeCommandButton,
2746
+ kn as NamedCollectionEditor,
2747
+ un as NamedInput,
2748
+ Io as NumberFormatCommandButton,
2749
+ Zo as PasteCommandButton,
2750
+ tn as PresetCellStylesCommandButton,
2751
+ Ea as PresetTableStylesCommandButton,
2752
+ hn as RangeInput,
2753
+ Pn as SheetTab,
2754
+ Dn as SheetTabMenu,
2755
+ wn as SheetZoomScale,
2756
+ Mn as SheetsAllMenu,
2757
+ Vo as SortFilterCommandButton,
2758
+ Sn as StatusBar,
2759
+ Va as Studio,
2760
+ Ro as StyledStrokeIcon,
2761
+ Na as TableDetailsPanel,
2762
+ ln as TableStyleCanvasPreview,
2763
+ cn as TableStyleOptionsPanel,
2764
+ an as TableStylePreview,
2765
+ qo as TextEffectsCommandButton,
2766
+ io as TextOverflowCommandButton,
2767
+ so as TextRotateCommandButton,
2768
+ xn as ThemeSelectButton,
2769
+ bn as ThemeSelectPanel,
2770
+ yn as ThemeSelectPopupButton,
2771
+ Xo as UnderlineCommandButton,
2772
+ Go as UndoRedoCommandButton,
2773
+ lo as VerticalAlignCommandButton,
2774
+ Oo as ViewGridLinesCommandButton,
2775
+ Yo as ViewHeadingsCommandButton,
2776
+ fa as WalkingCopyCommandButton,
2777
+ ha as WorkbookContextMenu,
2778
+ Da as WorkbookElement,
2779
+ _a as WorkbookIO,
2780
+ ga as WorkbookStrip,
2781
+ Fa as WorkbookTitle,
2782
+ Qo as WorkbookViewCommandButton,
2783
+ Ua as _WorkbookIO,
2784
+ Ln as createGridStyleFromMUITheme,
2785
+ Va as default,
2786
+ sa as defaultNewWorkbook,
2787
+ An as setPrintExamplesOnLoad,
2742
2788
  useModelListener,
2743
2789
  useRangeListener,
2744
- ma as useWorkbookCommands
2790
+ ia as useWorkbookCommands
2745
2791
  };