@sheetxl/studio-vanilla 0.4.10 → 0.4.11

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 (131) hide show
  1. package/browser/cjs/B0rdyyttE2Aibsag.cjs +7 -0
  2. package/browser/cjs/B2e7dDI-zKoqXpIW.cjs +107 -0
  3. package/browser/cjs/BAyEOOtO-9sHQQRW.cjs +7 -0
  4. package/browser/cjs/BPTHTRDvNOVkUJGa.cjs +7 -0
  5. package/browser/cjs/BlSFY6zLlebuejdV.cjs +7 -0
  6. package/browser/cjs/BplA5pDzOJpfTZuA.cjs +7 -0
  7. package/browser/cjs/BshvMtUxTJHj3JQN.cjs +7 -0
  8. package/browser/cjs/BuWtGFX0HiBezGjw.cjs +7 -0
  9. package/browser/cjs/C5FXOMLhAu_KTjVe.cjs +7 -0
  10. package/browser/cjs/C7EZCTczsC-gkRcq.cjs +7 -0
  11. package/browser/cjs/CFcjX5-nVsgzdZ4F.cjs +7 -0
  12. package/browser/cjs/CjZbhk41S1qO_74G.cjs +7 -0
  13. package/browser/cjs/CuTW2Pt-L5n-hNxV.cjs +7 -0
  14. package/browser/cjs/D3iOk-Q2tRdUeTcn.cjs +7 -0
  15. package/browser/cjs/DFspSkki779xN-Ey.cjs +7 -0
  16. package/browser/cjs/DFtyXc7YFh9dIp74.cjs +7 -0
  17. package/browser/cjs/Db_Ew1r6yOMYylvA.cjs +7 -0
  18. package/browser/cjs/DgBn3aW39yjgm0X_.cjs +7 -0
  19. package/browser/cjs/DiBy6-IxLscyMW2y.cjs +7 -0
  20. package/browser/cjs/DrlS1oz9Nea8Pm3j.cjs +7 -0
  21. package/browser/cjs/Dx-jp_LJxWbAScyA.cjs +7 -0
  22. package/browser/cjs/SzxJv7OUs5ojl8gx.cjs +7 -0
  23. package/browser/cjs/T4SHYo66xDT3l9JN.cjs +7 -0
  24. package/browser/cjs/index.cjs +4 -3
  25. package/browser/cjs/vfUix5Di0Ro8tEID.cjs +7 -0
  26. package/browser/esm/B5kkStdEkTczERyM.mjs +7 -0
  27. package/browser/esm/B905wKzTtod-jbsD.mjs +7 -0
  28. package/browser/esm/BALnKy2Fp7fyk-lc.mjs +7 -0
  29. package/browser/esm/BDVJ7eOPpW5FnEAP.mjs +7 -0
  30. package/browser/esm/BGpv6Kq7eBlJy43T.mjs +7 -0
  31. package/browser/esm/BUSR_OK5Qi6hRPfw.mjs +7 -0
  32. package/browser/esm/BXUGsC1Mo3FP8vnW.mjs +7 -0
  33. package/browser/esm/BlGoi1_x9rUMpWMd.mjs +7 -0
  34. package/browser/esm/Bo_ZPRrOQrqOVHAF.mjs +7 -0
  35. package/browser/esm/BuURCm92KsyGHG9e.mjs +7 -0
  36. package/browser/esm/CFFC0SNc24a0Dxnh.mjs +7 -0
  37. package/browser/esm/CGZ5MX7afzMxDkCe.mjs +7 -0
  38. package/browser/esm/Cc_VWd0wF5-39LsI.mjs +7 -0
  39. package/browser/esm/Cq8D_M0jeHLcnRjg.mjs +7 -0
  40. package/browser/esm/CzmNwV9tfFYUp_gS.mjs +7 -0
  41. package/browser/esm/De6RPxc4p_jXLlT5.mjs +7 -0
  42. package/browser/esm/DlVZFM9ZR5jGyG0_.mjs +7 -0
  43. package/browser/esm/DqXxZP6yKF4U1YfY.mjs +7 -0
  44. package/browser/esm/DtmE60AvstK9u0Ta.mjs +107 -0
  45. package/browser/esm/Dz2OVgq3kxi1TkfX.mjs +7 -0
  46. package/browser/esm/PS0cqYnlMVEGOQpI.mjs +7 -0
  47. package/browser/esm/QBGUD1XS5_pysBLL.mjs +7 -0
  48. package/browser/esm/index.mjs +2 -8
  49. package/browser/esm/tFhROdVSw9KLQfUN.mjs +7 -0
  50. package/browser/esm/uGDCdtqxjqRCo4Xn.mjs +7 -0
  51. package/cdn/index.js +40 -44
  52. package/cdn/loader.js +1 -1
  53. package/package.json +5 -5
  54. package/browser/cjs/B1UGqZP_7Z0Ewpog.cjs +0 -6
  55. package/browser/cjs/B6m9VXoFseD4zuZ5.cjs +0 -6
  56. package/browser/cjs/BKePSaEpM6Z063z-.cjs +0 -161
  57. package/browser/cjs/Bqn0ZeP_srNfL9rG.cjs +0 -6
  58. package/browser/cjs/C-izbj62pQuZjOrT.cjs +0 -304
  59. package/browser/cjs/C-w-GX8N54TxTjjf.cjs +0 -6
  60. package/browser/cjs/C1QGdcqJ-9sdGTQR.cjs +0 -6
  61. package/browser/cjs/C38aiRglHLxZ8KRY.cjs +0 -6
  62. package/browser/cjs/C4JMn_hMnlOnDpQO.cjs +0 -6
  63. package/browser/cjs/CApEj4LhhPUvQjIG.cjs +0 -16
  64. package/browser/cjs/CFcJbmmXjWjl6fQH.cjs +0 -6
  65. package/browser/cjs/CKiDbCZ6rGgXK7yN.cjs +0 -42
  66. package/browser/cjs/CM8btXQsJbnFKXUm.cjs +0 -6
  67. package/browser/cjs/Cb0K3Wzp7BAa4zni.cjs +0 -15
  68. package/browser/cjs/CiAUhPU7v1BK-8Bb.cjs +0 -7
  69. package/browser/cjs/CsXS-EN0N5SZHTnQ.cjs +0 -145
  70. package/browser/cjs/Cu2eUomoF0HToa4l.cjs +0 -6
  71. package/browser/cjs/Cy7ii9B_Vqx94pbu.cjs +0 -19
  72. package/browser/cjs/CzI4ZcsmzsyPBpWN.cjs +0 -12
  73. package/browser/cjs/DKHzUx2gKXwboKy1.cjs +0 -11
  74. package/browser/cjs/DKc8wAq8dwbDddQn.cjs +0 -11
  75. package/browser/cjs/DMyKApbUVRtNYC4e.cjs +0 -6
  76. package/browser/cjs/DROR08HMGyg7rizQ.cjs +0 -6
  77. package/browser/cjs/DfGDZlbFVknGyu_X.cjs +0 -6
  78. package/browser/cjs/OQdqVM_6m78kE5Aj.cjs +0 -7
  79. package/browser/cjs/v4OEtYXaUw_GeiXM.cjs +0 -12
  80. package/browser/esm/4uEr84M4w57AMyDg.mjs +0 -1703
  81. package/browser/esm/B8Ja5DlyKAy8xfQD.mjs +0 -1365
  82. package/browser/esm/B9bN60uAvy62vnwt.mjs +0 -22
  83. package/browser/esm/BAOzSQdzHl43K9Hd.mjs +0 -50
  84. package/browser/esm/BQYSD5Nb35y0WeeV.mjs +0 -421
  85. package/browser/esm/BVcaNvORp_uKPQgJ.mjs +0 -46
  86. package/browser/esm/BqXO_cQhrMJu7JoQ.mjs +0 -3756
  87. package/browser/esm/C18A_DcIEHNYBDvR.mjs +0 -46
  88. package/browser/esm/C7FoKZbSzjvuY3UB.mjs +0 -43
  89. package/browser/esm/CCIJpHSbFPjTEF8S.mjs +0 -1665
  90. package/browser/esm/CHNPjJxb0GY_naLa.mjs +0 -25025
  91. package/browser/esm/CKHsU9LUNYowimxS.mjs +0 -1346
  92. package/browser/esm/C_Zx1tYjI3n7KKZH.mjs +0 -21
  93. package/browser/esm/Cm-m3bZh0V44y0li.mjs +0 -390
  94. package/browser/esm/D1e_ccSgcNXvWHgy.mjs +0 -151
  95. package/browser/esm/D47D26mVYSAdb5C8.mjs +0 -2178
  96. package/browser/esm/D9CdO3PtV12RnK8K.mjs +0 -1467
  97. package/browser/esm/D9x-Q8y57gePf-tE.mjs +0 -944
  98. package/browser/esm/DHhXutXh7b5LsU1m.mjs +0 -2346
  99. package/browser/esm/DIGFi66CQPMV3HsL.mjs +0 -84
  100. package/browser/esm/DamiTeQsSMP2Cwld.mjs +0 -58
  101. package/browser/esm/DhD48oFrbrnZ6Zg5.mjs +0 -13208
  102. package/browser/esm/Ln2ZalJgj1CiJJue.mjs +0 -50
  103. package/browser/esm/S9fgUO7h8YgZxoKH.mjs +0 -633
  104. package/browser/esm/qVAHcpq07IhtAaQc.mjs +0 -24
  105. package/browser/esm/xrzJ8ILZHb118Oyt.mjs +0 -41
  106. package/cdn/assets/2-xJlw77WsCoyz09.js +0 -24872
  107. package/cdn/assets/B-9FcTf3xBEVGdjV.js +0 -1467
  108. package/cdn/assets/B-p1i2SNRMunPXCF.js +0 -43
  109. package/cdn/assets/B3J6oAmsS7oLNFPd.js +0 -46
  110. package/cdn/assets/B8Ja5DlyKAy8xfQD.js +0 -1365
  111. package/cdn/assets/BG3YTMAzNKPRGoLs.js +0 -50
  112. package/cdn/assets/BQYSD5Nb35y0WeeV.js +0 -421
  113. package/cdn/assets/BbzUpvQOkxsN-yIH.js +0 -2346
  114. package/cdn/assets/BqXO_cQhrMJu7JoQ.js +0 -3756
  115. package/cdn/assets/Bt1JSlSpWXDOBfq3.js +0 -1703
  116. package/cdn/assets/CCIJpHSbFPjTEF8S.js +0 -1665
  117. package/cdn/assets/CKHsU9LUNYowimxS.js +0 -1346
  118. package/cdn/assets/CWLJZwD2GVXljoWG.js +0 -46
  119. package/cdn/assets/Cm-m3bZh0V44y0li.js +0 -390
  120. package/cdn/assets/CtQlXGkNWgI-vtGy.js +0 -2178
  121. package/cdn/assets/DIGFi66CQPMV3HsL.js +0 -84
  122. package/cdn/assets/DK4S0DbayChkfTD6.js +0 -58
  123. package/cdn/assets/DQvsBz9F1GS_S7r9.js +0 -50
  124. package/cdn/assets/DTOgv_zwXSur-yCq.js +0 -151
  125. package/cdn/assets/DYZjOnD8WWQkCYuH.js +0 -944
  126. package/cdn/assets/DhD48oFrbrnZ6Zg5.js +0 -13208
  127. package/cdn/assets/DhyAyTCDkMBf392P.js +0 -21
  128. package/cdn/assets/P7HeVw5SHROLSWBz.js +0 -24
  129. package/cdn/assets/S4Z0SN8x6EltjsHT.js +0 -22
  130. package/cdn/assets/S9fgUO7h8YgZxoKH.js +0 -633
  131. package/cdn/assets/guYe4C_6pE93QsDV.js +0 -41
@@ -1,944 +0,0 @@
1
- import { jsx as f, jsxs as ie, Fragment as Kt } from "react/jsx-runtime";
2
- import * as we from "react";
3
- import L, { memo as Me, forwardRef as le, useRef as se, useMemo as te, useState as re, useEffect as G, useLayoutEffect as dt, useCallback as ne, Component as Gt, createElement as he, createContext as yn, isValidElement as Zt, useContext as wn, cloneElement as vn } from "react";
4
- import { g as xt, c as yt, u as et, d as En, e as Cn, f as Sn, h as Dn, j as Tn, s as je, l as wt, m as vt, n as Tt, o as Mn, p as On, q as Xt, r as Ln, _ as Wn, w as ae, K as Qt, A as Mt, X as pt, Q as Nn, x as xe, y as Jt, z as An, B as me, C as Yt, D as Rn, H as mt, J as en, L as In, N as Pn, S as Fn, O as jn, R as Hn, U as zn, W as _n, Z as qn, b as Bn, $ as $n, a0 as ht, a1 as Vn, a2 as Un, a3 as Kn, a4 as Gn, a5 as Zn, a6 as Xn, Y as Qn, a7 as ee, a8 as We, a9 as Ot, aa as Jn, ab as Yn, ac as eo, ad as to, ae as no, af as oo, ag as nt, ah as Ne, ai as ro, aj as ao, ak as io, al as so, am as Lt, an as Wt, ao as lo, ap as co, aq as uo, ar as po, as as Be } from "./CHNPjJxb0GY_naLa.mjs";
5
- import { createPortal as mo } from "react-dom";
6
- import { CommonUtils as ot, UndoManager as ho, Workbook as Nt, PartialError as fo } from "@sheetxl/sdk";
7
- /**
8
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.10
9
- *
10
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
- * License: The license can be found at https://www.sheetxl.com/license.
12
- */
13
- function go(e) {
14
- return xt("MuiCollapse", e);
15
- }
16
- yt("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
17
- const ko = je("div", { name: "MuiCollapse", slot: "Root", overridesResolver: (e, o) => {
18
- const { ownerState: r } = e;
19
- return [o.root, o[r.orientation], r.state === "entered" && o.entered, r.state === "exited" && !r.in && r.collapsedSize === "0px" && o.hidden];
20
- } })(Mn(({ theme: e }) => ({ height: 0, overflow: "hidden", transition: e.transitions.create("height"), variants: [{ props: { orientation: "horizontal" }, style: { height: "auto", width: 0, transition: e.transitions.create("width") } }, { props: { state: "entered" }, style: { height: "auto", overflow: "visible" } }, { props: { state: "entered", orientation: "horizontal" }, style: { width: "auto" } }, { props: ({ ownerState: o }) => o.state === "exited" && !o.in && o.collapsedSize === "0px", style: { visibility: "hidden" } }] }))), bo = je("div", { name: "MuiCollapse", slot: "Wrapper", overridesResolver: (e, o) => o.wrapper })({ display: "flex", width: "100%", variants: [{ props: { orientation: "horizontal" }, style: { width: "auto", height: "100%" } }] }), xo = je("div", { name: "MuiCollapse", slot: "WrapperInner", overridesResolver: (e, o) => o.wrapperInner })({ width: "100%", variants: [{ props: { orientation: "horizontal" }, style: { width: "auto", height: "100%" } }] }), ft = we.forwardRef(function(e, o) {
21
- const r = et({ props: e, name: "MuiCollapse" }), { addEndListener: t, children: n, className: a, collapsedSize: i = "0px", component: l, easing: s, in: c, onEnter: u, onEntered: p, onEntering: k, onExit: w, onExited: b, onExiting: g, orientation: y = "vertical", style: h, timeout: d = En.standard, TransitionComponent: S = Cn, ...v } = r, N = { ...r, orientation: y, collapsedSize: i }, D = ((E) => {
22
- const { orientation: B, classes: $ } = E;
23
- return vt({ root: ["root", `${B}`], entered: ["entered"], hidden: ["hidden"], wrapper: ["wrapper", `${B}`], wrapperInner: ["wrapperInner", `${B}`] }, go, $);
24
- })(N), j = Sn(), _ = Dn(), I = we.useRef(null), q = we.useRef(), K = typeof i == "number" ? `${i}px` : i, Q = y === "horizontal", de = Q ? "width" : "height", P = we.useRef(null), V = Tn(o, P), x = (E) => (B) => {
25
- if (E) {
26
- const $ = P.current;
27
- B === void 0 ? E($) : E($, B);
28
- }
29
- }, M = () => I.current ? I.current[Q ? "clientWidth" : "clientHeight"] : 0, T = x((E, B) => {
30
- I.current && Q && (I.current.style.position = "absolute"), E.style[de] = K, u && u(E, B);
31
- }), F = x((E, B) => {
32
- const $ = M();
33
- I.current && Q && (I.current.style.position = "");
34
- const { duration: J, easing: pe } = Tt({ style: h, timeout: d, easing: s }, { mode: "enter" });
35
- if (d === "auto") {
36
- const ve = j.transitions.getAutoHeightDuration($);
37
- E.style.transitionDuration = `${ve}ms`, q.current = ve;
38
- } else E.style.transitionDuration = typeof J == "string" ? J : `${J}ms`;
39
- E.style[de] = `${$}px`, E.style.transitionTimingFunction = pe, k && k(E, B);
40
- }), H = x((E, B) => {
41
- E.style[de] = "auto", p && p(E, B);
42
- }), z = x((E) => {
43
- E.style[de] = `${M()}px`, w && w(E);
44
- }), ge = x(b), A = x((E) => {
45
- const B = M(), { duration: $, easing: J } = Tt({ style: h, timeout: d, easing: s }, { mode: "exit" });
46
- if (d === "auto") {
47
- const pe = j.transitions.getAutoHeightDuration(B);
48
- E.style.transitionDuration = `${pe}ms`, q.current = pe;
49
- } else E.style.transitionDuration = typeof $ == "string" ? $ : `${$}ms`;
50
- E.style[de] = K, E.style.transitionTimingFunction = J, g && g(E);
51
- });
52
- return f(S, { in: c, onEnter: T, onEntered: H, onEntering: F, onExit: z, onExited: ge, onExiting: A, addEndListener: (E) => {
53
- d === "auto" && _.start(q.current || 0, E), t && t(P.current, E);
54
- }, nodeRef: P, timeout: d === "auto" ? null : d, ...v, children: (E, { ownerState: B, ...$ }) => f(ko, { as: l, className: wt(D.root, a, { entered: D.entered, exited: !c && K === "0px" && D.hidden }[E]), style: { [Q ? "minWidth" : "minHeight"]: K, ...h }, ref: V, ownerState: { ...N, state: E }, ...$, children: f(bo, { ownerState: { ...N, state: E }, className: D.wrapper, ref: I, children: f(xo, { ownerState: { ...N, state: E }, className: D.wrapperInner, children: n }) }) }) });
55
- });
56
- function yo(e) {
57
- return xt("MuiCard", e);
58
- }
59
- ft && (ft.muiSupportAuto = !0), yt("MuiCard", ["root"]);
60
- const wo = je(On, { name: "MuiCard", slot: "Root", overridesResolver: (e, o) => o.root })({ overflow: "hidden" }), vo = we.forwardRef(function(e, o) {
61
- const r = et({ props: e, name: "MuiCard" }), { className: t, raised: n = !1, ...a } = r, i = { ...r, raised: n }, l = ((s) => {
62
- const { classes: c } = s;
63
- return vt({ root: ["root"] }, yo, c);
64
- })(i);
65
- return f(wo, { className: wt(l.root, t), elevation: n ? 8 : void 0, ref: o, ownerState: i, ...a });
66
- });
67
- function Eo(e) {
68
- return xt("MuiCardActions", e);
69
- }
70
- yt("MuiCardActions", ["root", "spacing"]);
71
- const Co = je("div", { name: "MuiCardActions", slot: "Root", overridesResolver: (e, o) => {
72
- const { ownerState: r } = e;
73
- return [o.root, !r.disableSpacing && o.spacing];
74
- } })({ display: "flex", alignItems: "center", padding: 8, variants: [{ props: { disableSpacing: !1 }, style: { "& > :not(style) ~ :not(style)": { marginLeft: 8 } } }] }), So = we.forwardRef(function(e, o) {
75
- const r = et({ props: e, name: "MuiCardActions" }), { disableSpacing: t = !1, className: n, ...a } = r, i = { ...r, disableSpacing: t }, l = ((s) => {
76
- const { classes: c, disableSpacing: u } = s;
77
- return vt({ root: ["root", !u && "spacing"] }, Eo, c);
78
- })(i);
79
- return f(Co, { className: wt(l.root, n), ownerState: i, ref: o, ...a });
80
- }), gt = typeof Xt({}) == "function", Do = (e, o) => ({ WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale", boxSizing: "border-box", WebkitTextSizeAdjust: "100%", ...o && !e.vars && { colorScheme: e.palette.mode } }), To = (e) => ({ color: (e.vars || e).palette.text.primary, ...e.typography.body1, backgroundColor: (e.vars || e).palette.background.default, "@media print": { backgroundColor: (e.vars || e).palette.common.white } }), At = (e, o = !1) => {
81
- const r = {};
82
- o && e.colorSchemes && typeof e.getColorSchemeSelector == "function" && Object.entries(e.colorSchemes).forEach(([a, i]) => {
83
- const l = e.getColorSchemeSelector(a);
84
- l.startsWith("@") ? r[l] = { ":root": { colorScheme: i.palette?.mode } } : r[l.replace(/\s*&/, "")] = { colorScheme: i.palette?.mode };
85
- });
86
- let t = { html: Do(e, o), "*, *::before, *::after": { boxSizing: "inherit" }, "strong, b": { fontWeight: e.typography.fontWeightBold }, body: { margin: 0, ...To(e), "&::backdrop": { backgroundColor: (e.vars || e).palette.background.default } }, ...r };
87
- const n = e.components?.MuiCssBaseline?.styleOverrides;
88
- return n && (t = [t, n]), t;
89
- }, Qe = "mui-ecs", Mo = Xt(gt ? ({ theme: e, enableColorScheme: o }) => At(e, o) : ({ theme: e }) => ((o) => {
90
- const r = At(o, !1), t = Array.isArray(r) ? r[0] : r;
91
- return !o.vars && t && (t.html[`:root:has(${Qe})`] = { colorScheme: o.palette.mode }), o.colorSchemes && Object.entries(o.colorSchemes).forEach(([n, a]) => {
92
- const i = o.getColorSchemeSelector(n);
93
- i.startsWith("@") ? t[i] = { [`:root:not(:has(.${Qe}))`]: { colorScheme: a.palette?.mode } } : t[i.replace(/\s*&/, "")] = { [`&:not(:has(.${Qe}))`]: { colorScheme: a.palette?.mode } };
94
- }), r;
95
- })(e));
96
- function Oo(e) {
97
- const o = et({ props: e, name: "MuiCssBaseline" }), { children: r, enableColorScheme: t = !1 } = o;
98
- return ie(we.Fragment, { children: [gt && f(Mo, { enableColorScheme: t }), !gt && !t && f("span", { className: Qe, style: { display: "none" } }), r] });
99
- }
100
- const Lo = Ln(f("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z" }), "CancelOutlined"), Wo = yn(null), rt = { didCatch: !1, error: null };
101
- class No extends Gt {
102
- constructor(o) {
103
- super(o), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = rt;
104
- }
105
- static getDerivedStateFromError(o) {
106
- return { didCatch: !0, error: o };
107
- }
108
- resetErrorBoundary() {
109
- const { error: o } = this.state;
110
- if (o !== null) {
111
- for (var r, t, n = arguments.length, a = new Array(n), i = 0; i < n; i++) a[i] = arguments[i];
112
- (r = (t = this.props).onReset) === null || r === void 0 || r.call(t, { args: a, reason: "imperative-api" }), this.setState(rt);
113
- }
114
- }
115
- componentDidCatch(o, r) {
116
- var t, n;
117
- (t = (n = this.props).onError) === null || t === void 0 || t.call(n, o, r);
118
- }
119
- componentDidUpdate(o, r) {
120
- const { didCatch: t } = this.state, { resetKeys: n } = this.props;
121
- var a, i;
122
- t && r.error !== null && function() {
123
- let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
124
- return l.length !== s.length || l.some((c, u) => !Object.is(c, s[u]));
125
- }(o.resetKeys, n) && ((a = (i = this.props).onReset) === null || a === void 0 || a.call(i, { next: n, prev: o.resetKeys, reason: "keys" }), this.setState(rt));
126
- }
127
- render() {
128
- const { children: o, fallbackRender: r, FallbackComponent: t, fallback: n } = this.props, { didCatch: a, error: i } = this.state;
129
- let l = o;
130
- if (a) {
131
- const s = { error: i, resetErrorBoundary: this.resetErrorBoundary };
132
- if (typeof r == "function") l = r(s);
133
- else if (t) l = he(t, s);
134
- else {
135
- if (n === void 0) throw i;
136
- l = n;
137
- }
138
- }
139
- return he(Wo.Provider, { value: { didCatch: a, error: i, resetErrorBoundary: this.resetErrorBoundary } }, l);
140
- }
141
- }
142
- function tn(e) {
143
- var o, r, t = "";
144
- if (typeof e == "string" || typeof e == "number") t += e;
145
- else if (typeof e == "object") if (Array.isArray(e)) for (o = 0; o < e.length; o++) e[o] && (r = tn(e[o])) && (t && (t += " "), t += r);
146
- else for (o in e) e[o] && (t && (t += " "), t += o);
147
- return t;
148
- }
149
- function fe() {
150
- for (var e, o, r = 0, t = ""; r < arguments.length; ) (e = arguments[r++]) && (o = tn(e)) && (t && (t += " "), t += o);
151
- return t;
152
- }
153
- let Ao = { data: "" }, Ro = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, Io = /\/\*[^]*?\*\/| +/g, Rt = /\n+/g, ye = (e, o) => {
154
- let r = "", t = "", n = "";
155
- for (let a in e) {
156
- let i = e[a];
157
- a[0] == "@" ? a[1] == "i" ? r = a + " " + i + ";" : t += a[1] == "f" ? ye(i, a) : a + "{" + ye(i, a[1] == "k" ? "" : o) + "}" : typeof i == "object" ? t += ye(i, o ? o.replace(/([^,])+/g, (l) => a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (s) => /&/.test(s) ? s.replace(/&/g, l) : l ? l + " " + s : s)) : a) : i != null && (a = /^--/.test(a) ? a : a.replace(/[A-Z]/g, "-$&").toLowerCase(), n += ye.p ? ye.p(a, i) : a + ":" + i + ";");
158
- }
159
- return r + (o && n ? o + "{" + n + "}" : n) + t;
160
- }, ce = {}, nn = (e) => {
161
- if (typeof e == "object") {
162
- let o = "";
163
- for (let r in e) o += r + nn(e[r]);
164
- return o;
165
- }
166
- return e;
167
- };
168
- function kt(e) {
169
- let o = this || {}, r = e.call ? e(o.p) : e;
170
- return ((i, l, s, c, u) => {
171
- let p = nn(i), k = ce[p] || (ce[p] = ((d) => {
172
- let S = 0, v = 11;
173
- for (; S < d.length; ) v = 101 * v + d.charCodeAt(S++) >>> 0;
174
- return "go" + v;
175
- })(p));
176
- if (!ce[k]) {
177
- let d = p !== i ? i : ((S) => {
178
- let v, N, D = [{}];
179
- for (; v = Ro.exec(S.replace(Io, "")); ) v[4] ? D.shift() : v[3] ? (N = v[3].replace(Rt, " ").trim(), D.unshift(D[0][N] = D[0][N] || {})) : D[0][v[1]] = v[2].replace(Rt, " ").trim();
180
- return D[0];
181
- })(i);
182
- ce[k] = ye(u ? { ["@keyframes " + k]: d } : d, s ? "" : "." + k);
183
- }
184
- let w = s && ce.g ? ce.g : null;
185
- return s && (ce.g = ce[k]), b = ce[k], g = l, y = c, (h = w) ? g.data = g.data.replace(h, b) : g.data.indexOf(b) === -1 && (g.data = y ? b + g.data : g.data + b), k;
186
- var b, g, y, h;
187
- })(r.unshift ? r.raw ? (t = r, n = [].slice.call(arguments, 1), a = o.p, t.reduce((i, l, s) => {
188
- let c = n[s];
189
- if (c && c.call) {
190
- let u = c(a), p = u && u.props && u.props.className || /^go/.test(u) && u;
191
- c = p ? "." + p : u && typeof u == "object" ? u.props ? "" : ye(u, "") : u === !1 ? "" : u;
192
- }
193
- return i + l + (c ?? "");
194
- }, "")) : r.reduce((i, l) => Object.assign(i, l && l.call ? l(o.p) : l), {}) : r, ((i) => typeof window == "object" ? ((i ? i.querySelector("#_goober") : window._goober) || Object.assign((i || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : i || Ao)(o.target), o.g, o.o, o.k);
195
- var t, n, a;
196
- }
197
- function on(e, o, r) {
198
- return o && function(t, n) {
199
- for (var a = 0; a < n.length; a++) {
200
- var i = n[a];
201
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
202
- }
203
- }(e.prototype, o), e;
204
- }
205
- function W() {
206
- return W = Object.assign || function(e) {
207
- for (var o = 1; o < arguments.length; o++) {
208
- var r = arguments[o];
209
- for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
210
- }
211
- return e;
212
- }, W.apply(this, arguments);
213
- }
214
- function rn(e, o) {
215
- e.prototype = Object.create(o.prototype), e.prototype.constructor = e, e.__proto__ = o;
216
- }
217
- function He(e, o) {
218
- if (e == null) return {};
219
- var r, t, n = {}, a = Object.keys(e);
220
- for (t = 0; t < a.length; t++) r = a[t], o.indexOf(r) >= 0 || (n[r] = e[r]);
221
- return n;
222
- }
223
- function It(e) {
224
- if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
225
- return e;
226
- }
227
- kt.bind({ g: 1 }), kt.bind({ k: 1 });
228
- var Pt = function() {
229
- return "";
230
- }, an = L.createContext({ enqueueSnackbar: Pt, closeSnackbar: Pt }), at = "@media (max-width:599.95px)", Je = "@media (min-width:600px)", Ft = function(e) {
231
- return e.charAt(0).toUpperCase() + e.slice(1);
232
- }, Et = function(e) {
233
- return "" + Ft(e.vertical) + Ft(e.horizontal);
234
- }, $e = function(e) {
235
- return !!e || e === 0;
236
- }, Ve = "unmounted", Ce = "exited", Se = "entering", Ae = "entered", jt = "exiting", Ct = function(e) {
237
- function o(t) {
238
- var n;
239
- n = e.call(this, t) || this;
240
- var a, i = t.appear;
241
- return n.appearStatus = null, t.in ? i ? (a = Ce, n.appearStatus = Se) : a = Ae : a = t.unmountOnExit || t.mountOnEnter ? Ve : Ce, n.state = { status: a }, n.nextCallback = null, n;
242
- }
243
- rn(o, e), o.getDerivedStateFromProps = function(t, n) {
244
- return t.in && n.status === Ve ? { status: Ce } : null;
245
- };
246
- var r = o.prototype;
247
- return r.componentDidMount = function() {
248
- this.updateStatus(!0, this.appearStatus);
249
- }, r.componentDidUpdate = function(t) {
250
- var n = null;
251
- if (t !== this.props) {
252
- var a = this.state.status;
253
- this.props.in ? a !== Se && a !== Ae && (n = Se) : a !== Se && a !== Ae || (n = jt);
254
- }
255
- this.updateStatus(!1, n);
256
- }, r.componentWillUnmount = function() {
257
- this.cancelNextCallback();
258
- }, r.getTimeouts = function() {
259
- var t = this.props.timeout, n = t, a = t;
260
- return t != null && typeof t != "number" && typeof t != "string" && (a = t.exit, n = t.enter), { exit: a, enter: n };
261
- }, r.updateStatus = function(t, n) {
262
- t === void 0 && (t = !1), n !== null ? (this.cancelNextCallback(), n === Se ? this.performEnter(t) : this.performExit()) : this.props.unmountOnExit && this.state.status === Ce && this.setState({ status: Ve });
263
- }, r.performEnter = function(t) {
264
- var n = this, a = this.props.enter, i = t, l = this.getTimeouts();
265
- t || a ? (this.props.onEnter && this.props.onEnter(this.node, i), this.safeSetState({ status: Se }, function() {
266
- n.props.onEntering && n.props.onEntering(n.node, i), n.onTransitionEnd(l.enter, function() {
267
- n.safeSetState({ status: Ae }, function() {
268
- n.props.onEntered && n.props.onEntered(n.node, i);
269
- });
270
- });
271
- })) : this.safeSetState({ status: Ae }, function() {
272
- n.props.onEntered && n.props.onEntered(n.node, i);
273
- });
274
- }, r.performExit = function() {
275
- var t = this, n = this.props.exit, a = this.getTimeouts();
276
- n ? (this.props.onExit && this.props.onExit(this.node), this.safeSetState({ status: jt }, function() {
277
- t.props.onExiting && t.props.onExiting(t.node), t.onTransitionEnd(a.exit, function() {
278
- t.safeSetState({ status: Ce }, function() {
279
- t.props.onExited && t.props.onExited(t.node);
280
- });
281
- });
282
- })) : this.safeSetState({ status: Ce }, function() {
283
- t.props.onExited && t.props.onExited(t.node);
284
- });
285
- }, r.cancelNextCallback = function() {
286
- this.nextCallback !== null && this.nextCallback.cancel && (this.nextCallback.cancel(), this.nextCallback = null);
287
- }, r.safeSetState = function(t, n) {
288
- n = this.setNextCallback(n), this.setState(t, n);
289
- }, r.setNextCallback = function(t) {
290
- var n = this, a = !0;
291
- return this.nextCallback = function() {
292
- a && (a = !1, n.nextCallback = null, t());
293
- }, this.nextCallback.cancel = function() {
294
- a = !1;
295
- }, this.nextCallback;
296
- }, r.onTransitionEnd = function(t, n) {
297
- this.setNextCallback(n);
298
- var a = t == null && !this.props.addEndListener;
299
- this.node && !a ? (this.props.addEndListener && this.props.addEndListener(this.node, this.nextCallback), t != null && setTimeout(this.nextCallback, t)) : setTimeout(this.nextCallback, 0);
300
- }, r.render = function() {
301
- var t = this.state.status;
302
- if (t === Ve) return null;
303
- var n = this.props;
304
- return (0, n.children)(t, He(n, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]));
305
- }, on(o, [{ key: "node", get: function() {
306
- var t, n = (t = this.props.nodeRef) === null || t === void 0 ? void 0 : t.current;
307
- if (!n) throw new Error("notistack - Custom snackbar is not refForwarding");
308
- return n;
309
- } }]), o;
310
- }(L.Component);
311
- function De() {
312
- }
313
- function Ht(e, o) {
314
- typeof e == "function" ? e(o) : e && (e.current = o);
315
- }
316
- function bt(e, o) {
317
- return te(function() {
318
- return e == null && o == null ? null : function(r) {
319
- Ht(e, r), Ht(o, r);
320
- };
321
- }, [e, o]);
322
- }
323
- function Ye(e) {
324
- var o = e.timeout, r = e.style, t = r === void 0 ? {} : r, n = e.mode;
325
- return { duration: typeof o == "object" ? o[n] || 0 : o, easing: t.transitionTimingFunction, delay: t.transitionDelay };
326
- }
327
- Ct.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: De, onEntering: De, onEntered: De, onExit: De, onExiting: De, onExited: De };
328
- var sn = function(e) {
329
- e.scrollTop = e.scrollTop;
330
- }, zt = function(e) {
331
- return Math.round(e) + "ms";
332
- };
333
- function Te(e, o) {
334
- e === void 0 && (e = ["all"]);
335
- var r = o || {}, t = r.duration, n = t === void 0 ? 300 : t, a = r.easing, i = a === void 0 ? "cubic-bezier(0.4, 0, 0.2, 1)" : a, l = r.delay, s = l === void 0 ? 0 : l;
336
- return (Array.isArray(e) ? e : [e]).map(function(c) {
337
- var u = typeof n == "string" ? n : zt(n), p = typeof s == "string" ? s : zt(s);
338
- return c + " " + u + " " + i + " " + p;
339
- }).join(",");
340
- }
341
- function ln(e) {
342
- var o;
343
- return ((o = e) && o.ownerDocument || document).defaultView || window;
344
- }
345
- function Ue(e, o) {
346
- if (o) {
347
- var r = function(t, n) {
348
- var a, i = n.getBoundingClientRect(), l = ln(n);
349
- if (n.fakeTransform) a = n.fakeTransform;
350
- else {
351
- var s = l.getComputedStyle(n);
352
- a = s.getPropertyValue("-webkit-transform") || s.getPropertyValue("transform");
353
- }
354
- var c = 0, u = 0;
355
- if (a && a !== "none" && typeof a == "string") {
356
- var p = a.split("(")[1].split(")")[0].split(",");
357
- c = parseInt(p[4], 10), u = parseInt(p[5], 10);
358
- }
359
- switch (t) {
360
- case "left":
361
- return "translateX(" + (l.innerWidth + c - i.left) + "px)";
362
- case "right":
363
- return "translateX(-" + (i.left + i.width - c) + "px)";
364
- case "up":
365
- return "translateY(" + (l.innerHeight + u - i.top) + "px)";
366
- default:
367
- return "translateY(-" + (i.top + i.height - u) + "px)";
368
- }
369
- }(e, o);
370
- r && (o.style.webkitTransform = r, o.style.transform = r);
371
- }
372
- }
373
- var cn = le(function(e, o) {
374
- var r = e.children, t = e.direction, n = t === void 0 ? "down" : t, a = e.in, i = e.style, l = e.timeout, s = l === void 0 ? 0 : l, c = e.onEnter, u = e.onEntered, p = e.onExit, k = e.onExited, w = He(e, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), b = se(null), g = bt(r.ref, b), y = bt(g, o), h = ne(function() {
375
- b.current && Ue(n, b.current);
376
- }, [n]);
377
- return G(function() {
378
- if (!a && n !== "down" && n !== "right") {
379
- var d = function(v, N) {
380
- var D;
381
- function j() {
382
- for (var _ = this, I = arguments.length, q = new Array(I), K = 0; K < I; K++) q[K] = arguments[K];
383
- clearTimeout(D), D = setTimeout(function() {
384
- v.apply(_, q);
385
- }, N);
386
- }
387
- return N === void 0 && (N = 166), j.clear = function() {
388
- clearTimeout(D);
389
- }, j;
390
- }(function() {
391
- b.current && Ue(n, b.current);
392
- }), S = ln(b.current);
393
- return S.addEventListener("resize", d), function() {
394
- d.clear(), S.removeEventListener("resize", d);
395
- };
396
- }
397
- }, [n, a]), G(function() {
398
- a || h();
399
- }, [a, h]), he(Ct, Object.assign({ appear: !0, nodeRef: b, onEnter: function(d, S) {
400
- Ue(n, d), sn(d), c && c(d, S);
401
- }, onEntered: u, onEntering: function(d) {
402
- var S = Ye({ timeout: s, mode: "enter", style: W({}, i, { transitionTimingFunction: i?.transitionTimingFunction || "cubic-bezier(0.0, 0, 0.2, 1)" }) });
403
- d.style.webkitTransition = Te("-webkit-transform", S), d.style.transition = Te("transform", S), d.style.webkitTransform = "none", d.style.transform = "none";
404
- }, onExit: function(d) {
405
- var S = Ye({ timeout: s, mode: "exit", style: W({}, i, { transitionTimingFunction: i?.transitionTimingFunction || "cubic-bezier(0.4, 0, 0.6, 1)" }) });
406
- d.style.webkitTransition = Te("-webkit-transform", S), d.style.transition = Te("transform", S), Ue(n, d), p && p(d);
407
- }, onExited: function(d) {
408
- d.style.webkitTransition = "", d.style.transition = "", k && k(d);
409
- }, in: a, timeout: s }, w), function(d, S) {
410
- return vn(r, W({ ref: y, style: W({ visibility: d !== "exited" || a ? void 0 : "hidden" }, i, {}, r.props.style) }, S));
411
- });
412
- });
413
- cn.displayName = "Slide";
414
- var Ke = function(e) {
415
- return L.createElement("svg", Object.assign({ viewBox: "0 0 24 24", focusable: "false", style: { fontSize: 20, marginInlineEnd: 8, userSelect: "none", width: "1em", height: "1em", display: "inline-block", fill: "currentColor", flexShrink: 0 } }, e));
416
- }, be = { maxSnack: 3, persist: !1, hideIconVariant: !1, disableWindowBlurListener: !1, variant: "default", autoHideDuration: 5e3, iconVariant: { default: void 0, success: L.createElement(function() {
417
- return L.createElement(Ke, null, L.createElement("path", { d: `M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
418
- 10.59L10 14.17L17.59 6.58L19 8L10 17Z` }));
419
- }, null), warning: L.createElement(function() {
420
- return L.createElement(Ke, null, L.createElement("path", { d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z" }));
421
- }, null), error: L.createElement(function() {
422
- return L.createElement(Ke, null, L.createElement("path", { d: `M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
423
- 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
424
- 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z` }));
425
- }, null), info: L.createElement(function() {
426
- return L.createElement(Ke, null, L.createElement("path", { d: `M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
427
- 0 22,12A10,10 0 0,0 12,2Z` }));
428
- }, null) }, anchorOrigin: { vertical: "bottom", horizontal: "left" }, TransitionComponent: cn, transitionDuration: { enter: 225, exit: 195 } };
429
- function ze(e) {
430
- return Object.entries(e).reduce(function(o, r) {
431
- var t, n = r[0], a = r[1];
432
- return W({}, o, ((t = {})[n] = kt(a), t));
433
- }, {});
434
- }
435
- var un = "notistack-CollapseWrapper", Po = function(e) {
436
- return "notistack-MuiContent-" + e;
437
- }, _t = ze({ root: { height: 0 }, entered: { height: "auto" } }), it = "0px", dn = le(function(e, o) {
438
- var r = e.children, t = e.in, n = e.onExited, a = se(null), i = se(null), l = bt(o, i), s = function() {
439
- return a.current ? a.current.clientHeight : 0;
440
- };
441
- return he(Ct, { in: t, unmountOnExit: !0, onEnter: function(c) {
442
- c.style.height = it;
443
- }, onEntered: function(c) {
444
- c.style.height = "auto";
445
- }, onEntering: function(c) {
446
- var u = s(), p = Ye({ timeout: 175, mode: "enter" }), k = p.duration, w = p.easing;
447
- c.style.transitionDuration = typeof k == "string" ? k : k + "ms", c.style.height = u + "px", c.style.transitionTimingFunction = w || "";
448
- }, onExit: function(c) {
449
- c.style.height = s() + "px";
450
- }, onExited: n, onExiting: function(c) {
451
- sn(c);
452
- var u = Ye({ timeout: 175, mode: "exit" }), p = u.duration, k = u.easing;
453
- c.style.transitionDuration = typeof p == "string" ? p : p + "ms", c.style.height = it, c.style.transitionTimingFunction = k || "";
454
- }, nodeRef: i, timeout: 175 }, function(c, u) {
455
- return he("div", Object.assign({ ref: l, className: fe(_t.root, c === "entered" && _t.entered), style: W({ pointerEvents: "all", overflow: "hidden", minHeight: it, transition: Te("height") }, c === "entered" && { overflow: "visible" }, {}, c === "exited" && !t && { visibility: "hidden" }) }, u), he("div", { ref: a, className: un, style: { display: "flex", width: "100%" } }, r));
456
- });
457
- });
458
- dn.displayName = "Collapse";
459
- var qt = { right: "left", left: "right", bottom: "up", top: "down" }, Fo = function(e) {
460
- return "anchorOrigin" + Et(e);
461
- }, jo = function() {
462
- };
463
- function Fe(e, o) {
464
- return e.reduce(function(r, t) {
465
- return t == null ? r : function() {
466
- for (var n = arguments.length, a = new Array(n), i = 0; i < n; i++) a[i] = arguments[i];
467
- var l = [].concat(a);
468
- o && l.indexOf(o) === -1 && l.push(o), r.apply(this, l), t.apply(this, l);
469
- };
470
- }, jo);
471
- }
472
- var Ho = typeof window < "u" ? dt : G;
473
- function Bt(e) {
474
- var o = se(e);
475
- return Ho(function() {
476
- o.current = e;
477
- }), ne(function() {
478
- return o.current.apply(void 0, arguments);
479
- }, []);
480
- }
481
- var st, pn = le(function(e, o) {
482
- var r = e.children, t = e.className, n = e.autoHideDuration, a = e.disableWindowBlurListener, i = a !== void 0 && a, l = e.onClose, s = e.id, c = e.open, u = e.SnackbarProps, p = u === void 0 ? {} : u, k = se(), w = Bt(function() {
483
- l && l.apply(void 0, arguments);
484
- }), b = Bt(function(h) {
485
- l && h != null && (k.current && clearTimeout(k.current), k.current = setTimeout(function() {
486
- w(null, "timeout", s);
487
- }, h));
488
- });
489
- G(function() {
490
- return c && b(n), function() {
491
- k.current && clearTimeout(k.current);
492
- };
493
- }, [c, n, b]);
494
- var g = function() {
495
- k.current && clearTimeout(k.current);
496
- }, y = ne(function() {
497
- n != null && b(0.5 * n);
498
- }, [n, b]);
499
- return G(function() {
500
- if (!i && c) return window.addEventListener("focus", y), window.addEventListener("blur", g), function() {
501
- window.removeEventListener("focus", y), window.removeEventListener("blur", g);
502
- };
503
- }, [i, y, c]), he("div", Object.assign({ ref: o }, p, { className: fe("notistack-Snackbar", t), onMouseEnter: function(h) {
504
- p.onMouseEnter && p.onMouseEnter(h), g();
505
- }, onMouseLeave: function(h) {
506
- p.onMouseLeave && p.onMouseLeave(h), y();
507
- } }), r);
508
- });
509
- pn.displayName = "Snackbar";
510
- var zo = ze({ root: (st = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, st[Je] = { flexGrow: "initial", minWidth: "288px" }, st) }), St = le(function(e, o) {
511
- var r = e.className, t = He(e, ["className"]);
512
- return L.createElement("div", Object.assign({ ref: o, className: fe(zo.root, r) }, t));
513
- });
514
- St.displayName = "SnackbarContent";
515
- var Re = ze({ root: { backgroundColor: "#313131", fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", color: "#fff", alignItems: "center", padding: "6px 16px", borderRadius: "4px", boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)" }, lessPadding: { paddingLeft: "20px" }, default: { backgroundColor: "#313131" }, success: { backgroundColor: "#43a047" }, error: { backgroundColor: "#d32f2f" }, warning: { backgroundColor: "#ff9800" }, info: { backgroundColor: "#2196f3" }, message: { display: "flex", alignItems: "center", padding: "8px 0" }, action: { display: "flex", alignItems: "center", marginLeft: "auto", paddingLeft: "16px", marginRight: "-8px" } }), $t = "notistack-snackbar", mn = le(function(e, o) {
516
- var r = e.id, t = e.message, n = e.action, a = e.iconVariant, i = e.variant, l = e.hideIconVariant, s = e.style, c = e.className, u = a[i], p = n;
517
- return typeof p == "function" && (p = p(r)), L.createElement(St, { ref: o, role: "alert", "aria-describedby": $t, style: s, className: fe("notistack-MuiContent", Po(i), Re.root, Re[i], c, !l && u && Re.lessPadding) }, L.createElement("div", { id: $t, className: Re.message }, l ? null : u, t), p && L.createElement("div", { className: Re.action }, p));
518
- });
519
- mn.displayName = "MaterialDesignContent";
520
- var Ie, lt, Ge, Ze, ct, _o = Me(mn), qo = ze({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), Bo = function(e) {
521
- var o = se(), r = re(!0), t = r[0], n = r[1], a = Fe([e.snack.onClose, e.onClose]), i = ne(function() {
522
- o.current = setTimeout(function() {
523
- n(function(_) {
524
- return !_;
525
- });
526
- }, 125);
527
- }, []);
528
- G(function() {
529
- return function() {
530
- o.current && clearTimeout(o.current);
531
- };
532
- }, []);
533
- var l, s = e.snack, c = e.classes, u = e.Component, p = u === void 0 ? _o : u, k = te(function() {
534
- return function(_) {
535
- _ === void 0 && (_ = {});
536
- var I = { containerRoot: !0, containerAnchorOriginTopCenter: !0, containerAnchorOriginBottomCenter: !0, containerAnchorOriginTopRight: !0, containerAnchorOriginBottomRight: !0, containerAnchorOriginTopLeft: !0, containerAnchorOriginBottomLeft: !0 };
537
- return Object.keys(_).filter(function(q) {
538
- return !I[q];
539
- }).reduce(function(q, K) {
540
- var Q;
541
- return W({}, q, ((Q = {})[K] = _[K], Q));
542
- }, {});
543
- }(c);
544
- }, [c]), w = s.open, b = s.SnackbarProps, g = s.TransitionComponent, y = s.TransitionProps, h = s.transitionDuration, d = s.disableWindowBlurListener, S = s.content, v = He(s, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), N = W({ direction: (l = v.anchorOrigin, l.horizontal !== "center" ? qt[l.horizontal] : qt[l.vertical]), timeout: h }, y), D = S;
545
- typeof D == "function" && (D = D(v.id, v.message));
546
- var j = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(_, I) {
547
- var q;
548
- return W({}, _, ((q = {})[I] = Fe([e.snack[I], e[I]], v.id), q));
549
- }, {});
550
- return L.createElement(dn, { in: t, onExited: j.onExited }, L.createElement(pn, { open: w, id: v.id, disableWindowBlurListener: d, autoHideDuration: v.autoHideDuration, className: fe(qo.wrappedRoot, k.root, k[Fo(v.anchorOrigin)]), SnackbarProps: b, onClose: a }, L.createElement(g, Object.assign({}, N, { appear: !0, in: w, onExit: j.onExit, onExited: i, onEnter: j.onEnter, onEntered: Fe([j.onEntered, function() {
551
- e.snack.requestClose && a(null, "instructed", e.snack.id);
552
- }], v.id) }), D || L.createElement(p, Object.assign({}, v)))));
553
- }, Pe = 20, ut = 6, $o = 2, Vt = "." + un, Xe = ze({ root: (Ie = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: Te(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, Ie[Vt] = { padding: ut + "px 0px", transition: "padding 300ms ease 0ms" }, Ie.maxWidth = "calc(100% - " + 2 * Pe + "px)", Ie[at] = { width: "100%", maxWidth: "calc(100% - 32px)" }, Ie), rootDense: (lt = {}, lt[Vt] = { padding: $o + "px 0px" }, lt), top: { top: Pe - ut + "px", flexDirection: "column" }, bottom: { bottom: Pe - ut + "px", flexDirection: "column-reverse" }, left: (Ge = { left: Pe + "px" }, Ge[Je] = { alignItems: "flex-start" }, Ge[at] = { left: "16px" }, Ge), right: (Ze = { right: Pe + "px" }, Ze[Je] = { alignItems: "flex-end" }, Ze[at] = { right: "16px" }, Ze), center: (ct = { left: "50%", transform: "translateX(-50%)" }, ct[Je] = { alignItems: "center" }, ct) }), Vo = Me(function(e) {
554
- var o = e.classes, r = o === void 0 ? {} : o, t = e.anchorOrigin, n = e.dense, a = e.children, i = fe("notistack-SnackbarContainer", Xe[t.vertical], Xe[t.horizontal], Xe.root, r.containerRoot, r["containerAnchorOrigin" + Et(t)], n && Xe.rootDense);
555
- return L.createElement("div", { className: i }, a);
556
- }), Ut = function(e) {
557
- return !(typeof e == "string" || Zt(e));
558
- }, Uo = function(e) {
559
- function o(r) {
560
- var t;
561
- return (t = e.call(this, r) || this).enqueueSnackbar = function(n, a) {
562
- if (a === void 0 && (a = {}), n == null) throw new Error("enqueueSnackbar called with invalid argument");
563
- var i = Ut(n) ? n : a, l = Ut(n) ? n.message : n, s = i.key, c = i.preventDuplicate, u = He(i, ["key", "preventDuplicate"]), p = $e(s), k = p ? s : (/* @__PURE__ */ new Date()).getTime() + Math.random(), w = /* @__PURE__ */ function(g, y) {
564
- return function(h, d) {
565
- return d === void 0 && (d = !1), d ? W({}, be[h], {}, y[h], {}, g[h]) : h === "autoHideDuration" ? (D = g.autoHideDuration, j = y.autoHideDuration, (_ = function(I) {
566
- return typeof I == "number" || I === null;
567
- })(D) ? D : _(j) ? j : be.autoHideDuration) : h === "transitionDuration" ? (S = g.transitionDuration, v = y.transitionDuration, (N = function(I, q) {
568
- return q.some(function(K) {
569
- return typeof I === K;
570
- });
571
- })(S, ["string", "number"]) ? S : N(S, ["object"]) ? W({}, be.transitionDuration, {}, N(v, ["object"]) && v, {}, S) : N(v, ["string", "number"]) ? v : N(v, ["object"]) ? W({}, be.transitionDuration, {}, v) : be.transitionDuration) : g[h] || y[h] || be[h];
572
- var S, v, N, D, j, _;
573
- };
574
- }(u, t.props), b = W({ id: k }, u, { message: l, open: !0, entered: !1, requestClose: !1, persist: w("persist"), action: w("action"), content: w("content"), variant: w("variant"), anchorOrigin: w("anchorOrigin"), disableWindowBlurListener: w("disableWindowBlurListener"), autoHideDuration: w("autoHideDuration"), hideIconVariant: w("hideIconVariant"), TransitionComponent: w("TransitionComponent"), transitionDuration: w("transitionDuration"), TransitionProps: w("TransitionProps", !0), iconVariant: w("iconVariant", !0), style: w("style", !0), SnackbarProps: w("SnackbarProps", !0), className: fe(t.props.className, u.className) });
575
- return b.persist && (b.autoHideDuration = void 0), t.setState(function(g) {
576
- if (c === void 0 && t.props.preventDuplicate || c) {
577
- var y = function(S) {
578
- return p ? S.id === k : S.message === l;
579
- }, h = g.queue.findIndex(y) > -1, d = g.snacks.findIndex(y) > -1;
580
- if (h || d) return g;
581
- }
582
- return t.handleDisplaySnack(W({}, g, { queue: [].concat(g.queue, [b]) }));
583
- }), k;
584
- }, t.handleDisplaySnack = function(n) {
585
- return n.snacks.length >= t.maxSnack ? t.handleDismissOldest(n) : t.processQueue(n);
586
- }, t.processQueue = function(n) {
587
- var a = n.queue, i = n.snacks;
588
- return a.length > 0 ? W({}, n, { snacks: [].concat(i, [a[0]]), queue: a.slice(1, a.length) }) : n;
589
- }, t.handleDismissOldest = function(n) {
590
- if (n.snacks.some(function(s) {
591
- return !s.open || s.requestClose;
592
- })) return n;
593
- var a = !1, i = !1;
594
- n.snacks.reduce(function(s, c) {
595
- return s + (c.open && c.persist ? 1 : 0);
596
- }, 0) === t.maxSnack && (i = !0);
597
- var l = n.snacks.map(function(s) {
598
- return a || s.persist && !i ? W({}, s) : (a = !0, s.entered ? (s.onClose && s.onClose(null, "maxsnack", s.id), t.props.onClose && t.props.onClose(null, "maxsnack", s.id), W({}, s, { open: !1 })) : W({}, s, { requestClose: !0 }));
599
- });
600
- return W({}, n, { snacks: l });
601
- }, t.handleEnteredSnack = function(n, a, i) {
602
- if (!$e(i)) throw new Error("handleEnteredSnack Cannot be called with undefined key");
603
- t.setState(function(l) {
604
- return { snacks: l.snacks.map(function(s) {
605
- return s.id === i ? W({}, s, { entered: !0 }) : W({}, s);
606
- }) };
607
- });
608
- }, t.handleCloseSnack = function(n, a, i) {
609
- t.props.onClose && t.props.onClose(n, a, i);
610
- var l = i === void 0;
611
- t.setState(function(s) {
612
- var c = s.snacks, u = s.queue;
613
- return { snacks: c.map(function(p) {
614
- return l || p.id === i ? p.entered ? W({}, p, { open: !1 }) : W({}, p, { requestClose: !0 }) : W({}, p);
615
- }), queue: u.filter(function(p) {
616
- return p.id !== i;
617
- }) };
618
- });
619
- }, t.closeSnackbar = function(n) {
620
- var a = t.state.snacks.find(function(i) {
621
- return i.id === n;
622
- });
623
- $e(n) && a && a.onClose && a.onClose(null, "instructed", n), t.handleCloseSnack(null, "instructed", n);
624
- }, t.handleExitedSnack = function(n, a) {
625
- if (!$e(a)) throw new Error("handleExitedSnack Cannot be called with undefined key");
626
- t.setState(function(i) {
627
- var l = t.processQueue(W({}, i, { snacks: i.snacks.filter(function(s) {
628
- return s.id !== a;
629
- }) }));
630
- return l.queue.length === 0 ? l : t.handleDismissOldest(l);
631
- });
632
- }, t.enqueueSnackbar, t.closeSnackbar, t.state = { snacks: [], queue: [], contextValue: { enqueueSnackbar: t.enqueueSnackbar.bind(It(t)), closeSnackbar: t.closeSnackbar.bind(It(t)) } }, t;
633
- }
634
- return rn(o, e), o.prototype.render = function() {
635
- var r = this, t = this.state.contextValue, n = this.props, a = n.domRoot, i = n.children, l = n.dense, s = l !== void 0 && l, c = n.Components, u = c === void 0 ? {} : c, p = n.classes, k = this.state.snacks.reduce(function(b, g) {
636
- var y, h = Et(g.anchorOrigin), d = b[h] || [];
637
- return W({}, b, ((y = {})[h] = [].concat(d, [g]), y));
638
- }, {}), w = Object.keys(k).map(function(b) {
639
- var g = k[b], y = g[0];
640
- return L.createElement(Vo, { key: b, dense: s, anchorOrigin: y.anchorOrigin, classes: p }, g.map(function(h) {
641
- return L.createElement(Bo, { key: h.id, snack: h, classes: p, Component: u[h.variant], onClose: r.handleCloseSnack, onEnter: r.props.onEnter, onExit: r.props.onExit, onExited: Fe([r.handleExitedSnack, r.props.onExited], h.id), onEntered: Fe([r.handleEnteredSnack, r.props.onEntered], h.id) });
642
- }));
643
- });
644
- return L.createElement(an.Provider, { value: t }, i, a ? mo(w, a) : w);
645
- }, on(o, [{ key: "maxSnack", get: function() {
646
- return this.props.maxSnack || be.maxSnack;
647
- } }]), o;
648
- }(Gt), hn = function() {
649
- return wn(an);
650
- };
651
- const ue = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, fn = le((e, o) => {
652
- const { id: r, message: t, iconVariant: n, error: a, hideIconVariant: i, ...l } = e, { closeSnackbar: s } = hn(), c = Bn(), [u, p] = re(!1), k = ne(() => {
653
- p((g) => !g);
654
- }, []), w = ne(() => {
655
- s(r);
656
- }, [r, s]);
657
- let b = a?.message;
658
- return !b && Zt(t) && (b = t), b || typeof t != "string" || (b = t), b || (b = `Unknown Error: ${t}`), f(St, { ref: o, className: mt(ue.root, "error-snackbar"), children: ie(vo, { className: ue.card, style: { backgroundColor: c.palette.error.dark, border: `1px solid ${c.palette.error.dark}` }, children: [ie(So, { className: ue.actionRoot, children: [i ? null : n?.error, f($n, { variant: "body2", component: "div", className: ue.typography, style: { color: c.palette.text.primary }, children: b }), f("div", { style: { flex: "1 1 auto" } }), ie("div", { className: ue.icons, children: [a ? f(ht, { "aria-label": "Show more", size: "small", className: mt(ue.expand, { [ue.expandOpen]: u }), style: { color: c.palette.action.active }, onClick: k, children: f(Vn, {}) }) : null, f(ht, { size: "small", className: ue.expand, style: { color: c.palette.action.active }, onClick: w, children: f(Un, { fontSize: "small" }) })] })] }), a ? f(ft, { in: u, timeout: "auto", unmountOnExit: !0, children: f("div", { className: ue.stackTraceContainer, style: { backgroundColor: c.palette.error.light, borderTop: `1px solid ${c.palette.error.main}` }, children: f(Kn, { error: a, hideLineNumbers: !0 }) }) }) : null] }) });
659
- });
660
- fn.displayName = "ToastError";
661
- const gn = Me(le((e, o) => {
662
- const { commands: r, commandHook: t, scope: n = "workbook", disabled: a = !1, ...i } = e, l = ae((c) => {
663
- const u = { variant: ro.Menuitem, parentFloat: c.floatReference, commandHook: t, scope: n, disabled: a }, p = ie(Kt, { children: [f(nt, { ...u, command: r.getCommand("newWorkbook"), icon: Ne(f(ao, {})) }), f(io, { orientation: "horizontal" }), f(nt, { ...u, command: r.getCommand("openWorkbook"), icon: Ne(f(so, {})) }), f(Lt, { ...u, commands: r, quickCommand: "saveWorkbook", icon: Ne(f(uo, {})), createPopupPanel: (k) => {
664
- const w = { ...u, parentFloat: k.floatReference, scope: "saveWorkbook" }, b = [];
665
- return xe.getWriteFormats().forEach((g) => {
666
- if (g.isDefault) return;
667
- let y = null;
668
- g.key === "CSV" ? y = Ne(f(lo, {})) : g.key === "Excel" && (y = Ne(f(co, {})));
669
- const h = r.getCommand(`saveWorkbookAs${g.key}`);
670
- h ? b.push(he(nt, { ...w, key: g.key, command: h, icon: y })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${g.key}'`);
671
- }), Wt({ ...k, children: b, onClick: () => {
672
- k.closeFloatAll();
673
- } });
674
- } })] });
675
- return Wt({ ...c, children: p, onClick: (k) => {
676
- k.isDefaultPrevented || c.closeFloatAll();
677
- } });
678
- }, [a, r, t, n]), s = "File";
679
- return f(Lt, { commands: r, disabled: a, commandHook: t, scope: n, label: s, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (c) => `calc(1.25rem + ${c.spacing(2)}px)` } }, ...i, createPopupPanel: l, icon: f(po, { className: "label", icon: null, label: s }) });
680
- }));
681
- gn.displayName = "StandaloneFileCommandButton";
682
- const Ko = f(no, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: f(me, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: f(oo, { onClick: () => {
683
- window?.open("https://www.sheetxl.com", "_blank");
684
- }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), kn = Me(le((e, o) => {
685
- const { commands: r, workbook: t, logo: n = Ko, mainElement: a, showFileMenu: i = !0, showAppearanceMenu: l = !0, ...s } = e, { reference: c } = Hn(), [u, { width: p }] = zn(), k = p < 530, w = i ? f(gn, { commands: r, commandHook: { beforeExecute() {
686
- c?.closeAll();
687
- }, onError(h, d, S) {
688
- } } }) : null, b = l ? f(_n, { commands: r, commandHook: { beforeExecute() {
689
- c?.closeAll();
690
- }, onError(h, d, S) {
691
- } } }) : null, g = te(() => ({ paddingLeft: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1) }), []), y = se(null);
692
- return f(me, { ref: en([y, u, o]), ...s, children: qn({ commands: r, renderCompact: k, workbook: t, selectWrapper: (h) => ie(me, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (d) => d.spacing(1), paddingLeft: (d) => d.spacing(1), paddingRight: (d) => d.spacing(1) }, children: [ie(me, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (d) => d.spacing(0.5) }, children: [n, ie(me, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (d) => d.spacing(0.25) }, children: [w, h] })] }), f(me, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: a }), f(me, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: k && !b ? "0 0 auto" : "1 1 100%" }, children: b })] }), selectProps: g, toolbarsProps: { Home: { sx: {} } } }) });
693
- }));
694
- kn.displayName = "StudioToolbar";
695
- const bn = Me(le((e, o) => {
696
- const { workbook: r, setWorkbook: t, refWorkbookTitle: n, titleWorkbook: a, setWorkbookTitle: i, titlePlaceHolder: l, children: s, undoManager: c, commands: u, importExportDisabled: p, themeOptions: k } = e, w = hn(), b = w ? w.enqueueSnackbar : () => {
697
- }, g = w ? w.closeSnackbar : () => {
698
- }, [y, h] = re({ isMounted: !1, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), d = ne(() => {
699
- h((V) => ({ ...V, isMounted: !0 }));
700
- }, []), S = ne(() => {
701
- h((V) => ({ ...V, isMounted: !1 }));
702
- }, []), v = Gn(), N = Zn(), D = Xn(), j = se(/* @__PURE__ */ new Set()), _ = te(() => {
703
- const V = (x, M) => {
704
- if (M?.onceKey) {
705
- if (j.current.has(M.onceKey)) return;
706
- const F = new Set(j.current);
707
- F.add(M.onceKey), j.current = F;
708
- }
709
- const T = { variant: M?.type ?? Be.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: M?.preventDuplicate, persist: M?.persist ?? M?.type === Be.Error, action: (F) => f(ht, { onClick: () => g(F), children: f(Lo, {}) }) };
710
- M?.enqueueProps && Object.assign(T, M.enqueueProps), x || console.log("message is 'null'", M), b(x ?? "Alert", T);
711
- };
712
- return { showMessage: V, showBusy: (x, M) => {
713
- let T = null;
714
- const F = new Promise((H) => {
715
- T = H;
716
- });
717
- return h((H) => {
718
- const z = new Map(H.starting);
719
- return z.set(F, T), { ...H, label: x, starting: z };
720
- }), F;
721
- }, showWindow: (x, M, T) => {
722
- const F = { ...M, onKeyDown: (H) => {
723
- u?.dispatchToFocusedCommand(H), H.isDefaultPrevented() || H.isPropagationStopped() || M?.onKeyDown?.(H);
724
- } };
725
- return v(x, { sort: () => import("./qVAHcpq07IhtAaQc.mjs"), numberFormat: () => import("./BAOzSQdzHl43K9Hd.mjs"), hyperlink: () => import("./C18A_DcIEHNYBDvR.mjs"), comments: () => import("./Ln2ZalJgj1CiJJue.mjs"), find: () => import("./D1e_ccSgcNXvWHgy.mjs"), tableDetails: () => import("./DamiTeQsSMP2Cwld.mjs"), tableNew: () => import("./B9bN60uAvy62vnwt.mjs"), namedDetails: () => import("./C7FoKZbSzjvuY3UB.mjs") }[x], F, T);
726
- }, showOptions: N, showInputOptions: D, showError: (x) => {
727
- let M, T = Be.Error, F = "Unknown Error";
728
- typeof x == "string" ? F = x : x instanceof Error && (M = x, x.message && (F = x.message)), x instanceof fo && (T = Be.Info), V(F, { type: T, enqueueProps: { error: M } });
729
- } };
730
- }, []), I = ne(() => {
731
- }, []), q = ((V) => {
732
- const { workbook: x, setWorkbook: M, importExportDisabled: T, workbookTitle: F = "export", setWorkbookTitle: H, notifier: z, requestWorkbookTitle: ge, themeOptions: A, undoManager: E, commands: B, onExecute: $ } = V, J = ae(A?.onModeChange, [A?.onModeChange]), pe = ae(A?.onEnabledDarkGridChange, [A?.onEnabledDarkGridChange]), ve = ae(A?.onEnabledDarkImagesChange, [A?.onEnabledDarkImagesChange]), Ee = ae(async (R = null, oe = null) => {
733
- const O = [];
734
- let m, C = null, X = null;
735
- if (typeof R == "string" ? X = R : C = R, m = C ? R : await Qn.openFileDialog(X ?? xe.getAllReadFormatTypeAsString().join(",")), !m) return null;
736
- const Y = { source: m, createWorkbookOptions: oe, onWarning: (tt) => {
737
- O.push(tt);
738
- } }, Le = await xe.read(Y, z);
739
- return O.length > 0 && (z?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn(`Import warnings:
740
- ` + O.join(`
741
- `))), Le;
742
- }, [$, z, x]), _e = ae(async (R, oe, O) => {
743
- if (!oe && ge) {
744
- const m = await ge("Enter Workbook name to " + (O.isDefault ? "Save." : `Export as ${O.description}.`));
745
- return m !== null && xe.writeFile(m, R, { formatType: O.key });
746
- }
747
- return xe.writeFile(oe, R, { formatType: O.key });
748
- }, [z, x, ge]), U = ne(() => ({ contains: (R) => !0, focus() {
749
- } }), []), ke = te(() => {
750
- const R = [];
751
- T || (xe.getWriteFormats().forEach((O) => {
752
- const m = O.isDefault, C = { label: m ? "Save Workbook" : `Save Workbook as ${O.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${O.description}` }, tags: O.tags, description: `Save the workbook to the desktop${m ? "" : ` as ${O.description}`}.` };
753
- m && (C.shortcut = { key: "S", modifiers: [We.Ctrl] }, R.push(new ee("saveWorkbookAs", U, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [We.Shift, We.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
754
- _e(x, null, O).catch((Y) => {
755
- z?.showError?.(Y);
756
- });
757
- })));
758
- const X = m ? "saveWorkbook" : `saveWorkbookAs${O.key}`;
759
- R.push(new ee(X, U, C, (Y) => {
760
- _e(x, Y ?? F, O).catch((Le) => {
761
- z?.showError?.(Le);
762
- });
763
- }));
764
- }), R.push(new ee("openWorkbook", U, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [We.Ctrl] } }, async (O = null) => {
765
- const m = { date1904: x.isDate1904(), ...x.options };
766
- try {
767
- const C = await Ee(O, m);
768
- if (!C) return;
769
- const X = C.title, Y = C.workbook, Le = Y.getSelectedSheet();
770
- if (C.formatType.mimeType === "text/csv") {
771
- const tt = x.findValidSheetName(X);
772
- await x.doBatch(async () => {
773
- const Dt = Le.getUsedRange();
774
- Dt ? await x.getSheets().add({ name: tt, autoSelect: !0 }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }).copyFrom(Dt) : z?.showMessage("The file appears to be blank.");
775
- }, `Import CSV '${X}'`);
776
- } else x?.close(), H?.(X), M(Y);
777
- } catch (C) {
778
- z?.showError?.(C);
779
- }
780
- })), R.push(new ee("openWorkbookFromUrl", U, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(O) {
781
- if (!O) {
782
- const m = await z?.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"] });
783
- if (m.option !== "Open") return;
784
- O = m.input;
785
- }
786
- O && console.log("openWorkbookFromUrl", O);
787
- })));
788
- let oe = [];
789
- return A && (oe = [new ee("themeMode", U, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new ee("defaultThemeMode", U, { 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 ee("enableDarkGrid", U, { 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 ee("enableDarkImages", U, { 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." })]), [...R, ...oe, new Ot("help", U, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
790
- }), new Ot("showKeyboardShortcuts", U, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [We.Ctrl] } }, () => {
791
- }), new ee("gotoUrlGithub", U, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
792
- window?.open("https://github.com/sheetxl/sheetxl");
793
- }), new ee("gotoUrlDiscord", U, { label: "Discord", description: "Join our community on discord." }, () => {
794
- window?.open("https://discord.gg/NTKdwUgK9p");
795
- }), new ee("gotoUrlDocumentation", U, { label: "Documentation", description: "Read the documentation." }, () => {
796
- window?.open("https://www.sheetxl.com/docs");
797
- }), new ee("gotoUrlIssue", U, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
798
- window?.open("https://github.com/sheetxl/sheetxl/issues");
799
- })];
800
- }, [x, F, z, T, A, B, E]), Z = te(() => {
801
- let R = null;
802
- return R = B ? B.createChildGroup(U, "standaloneWorkbook", !1) : new Jt(U, "standaloneWorkbook"), R.addCommands(ke, !0), R;
803
- }, [B, ke]);
804
- Jn({ manager: E, commands: Z, notifier: z });
805
- const { themeMode: Oe } = Qt();
806
- G(() => {
807
- if (!A || !Z) return;
808
- const R = A.mode === "dark" || !A.mode && Oe === "dark";
809
- Z.getCommand("themeMode").update({ state: A.mode ?? null, label: R ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: R ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
810
- J(R ? pt.Light : pt.Dark);
811
- }), Z.getCommand("defaultThemeMode").update({ state: !A.mode }).updateCallback(() => {
812
- J(null);
813
- }), Z.getCommand("enableDarkGrid").update({ state: A.enableDarkGrid }).updateCallback(() => {
814
- pe(!A.enableDarkGrid);
815
- }), Z.getCommand("enableDarkImages").update({ state: A.enableDarkImages }).updateCallback(() => {
816
- ve(!A.enableDarkImages);
817
- });
818
- }, [Oe, A, ke]);
819
- const { showModal: qe } = Yn();
820
- return G(() => {
821
- const R = () => new Promise((oe, O) => {
822
- const m = L.lazy(() => import("./D47D26mVYSAdb5C8.mjs")), C = qe(m, { title: "Shortcut Keys Reference", commands: Z, onDone: () => {
823
- C.hide();
824
- }, TransitionProps: { onExited: () => {
825
- oe(!0);
826
- } } });
827
- });
828
- Z.getCommand("showKeyboardShortcuts").updateCallback(() => R()), Z.getCommand("help").updateCallback(() => R());
829
- }, [ke, Z]), Z;
830
- })({ workbook: r, setWorkbook: t, importExportDisabled: p, workbookTitle: a, setWorkbookTitle: i, commands: u, requestWorkbookTitle: (V) => new Promise((x) => {
831
- n.current ? n.current.requestWorkbookTitle((M, T) => {
832
- x(M);
833
- }, { selectAll: !0, requestReason: V }) : x(l);
834
- }), themeOptions: k, undoManager: c, notifier: _, onExecute: I });
835
- G(() => {
836
- y.starting.size <= 0 || !y.isMounted || h((V) => {
837
- const x = new Map(V.running);
838
- return V.starting.forEach((M, T) => {
839
- const F = () => {
840
- h((H) => {
841
- const z = new Map(H.running);
842
- return z.delete(T), { ...H, running: z };
843
- });
844
- };
845
- x.set(T, F), M(F);
846
- }), { ...V, starting: /* @__PURE__ */ new Map(), running: x };
847
- });
848
- }, [y]);
849
- const [K, Q] = re(null);
850
- G(() => {
851
- y.starting.size !== 0 || y.running.size !== 0 ? Q(f(Yt, { icon: f(eo, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: !0, label: y.label, onMount: d, onUnmount: S, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : Q(null);
852
- }, [y.starting, y.running]);
853
- const de = te(() => f(to, { commands: q, disableHover: !0, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [q]), P = { notifier: _, commands: q };
854
- return r && (P.statusBarProps = { childrenEnd: de }), ie(Kt, { children: [K, s ? L.cloneElement(s, P) : null] });
855
- }));
856
- bn.displayName = "SnackbarAndCommandsWrapper";
857
- const xn = Me(le((e, o) => {
858
- const { className: r, sx: t, style: n, onElementLoad: a, onError: i, undoManager: l, errorPanel: s = Wn, onKeyDown: c, workbook: u, createWorkbookOptions: p, onWorkbookChange: k, logo: w, importExportDisabled: b = !1, themeOptions: g, autoFocus: y = !1, commands: h, title: d, onTitleChange: S, titleProps: v, renderLoadingPanel: N, ...D } = e, j = se(null), _ = ae(k, [k]), I = ae(S ?? v?.onTitleChange, [S ?? v?.onTitleChange]), q = v?.placeHolder ?? "Untitled", K = g?.mode, { themeMode: Q, source: de } = Qt({ mode: K }), P = te(() => ({ ...g, light: Mt(!1, ot.deepMerge(g?.theme ?? {}, g?.light ?? {})), dark: Mt(!0, ot.deepMerge(g?.theme ?? {}, g?.dark ?? {})) }), [g]), V = Q === pt.Dark, [x, M] = re(null);
859
- G(() => {
860
- M(l ?? new ho());
861
- }, [l]);
862
- const [T, F] = re(null), [H, z] = re(null), ge = Nn();
863
- dt(() => {
864
- if (!u || Object.keys(u).length === 0 && !ot.isPromiseLike(u)) {
865
- const m = { theme: ge.getDefaultTheme(), ...p };
866
- z(new Nt(m));
867
- } else z(u);
868
- }, [u]), dt(() => {
869
- if (H) {
870
- if (H instanceof Nt) return F({ workbook: H }), void (u !== H && _?.(H));
871
- (async () => {
872
- try {
873
- let m, C = await Promise.resolve(H);
874
- C && C.source && (C = await xe.read(C)), C.workbook ? (J(C.title), m = C.workbook) : m = C, _?.(m), F({ workbook: m });
875
- } catch (m) {
876
- _?.(null), F({ error: m });
877
- }
878
- })();
879
- }
880
- }, [H]);
881
- const [A, E] = re(null);
882
- G(() => {
883
- if (!x || !T) return;
884
- x.clear();
885
- const m = T?.workbook?.getTransactions();
886
- return m ? m.addListener({ onCommitEnd: (C) => {
887
- C.getDescription() ? x.addUndoOperation({ description: C.getDescription(), undo: () => (m.revert(C.getId()), A.source?.focus(), () => {
888
- m.restore(C.getId()), A.source?.focus();
889
- }) }) : console.warn("commit has no description", C);
890
- } }) : void 0;
891
- }, [x, T, A]);
892
- const B = ae((m) => {
893
- m ? x.setRepeatableOperation({ description: m.label(), repeat: async () => m.execute() }) : x.setRepeatableOperation(null);
894
- }, [x]), [$, J] = re(d ?? v?.title ?? "");
895
- G(() => {
896
- J(d ?? v?.title ?? "");
897
- }, [d ?? v?.title]), G(() => {
898
- I?.($);
899
- }, [$]);
900
- const [pe, ve] = re(null), Ee = te(() => {
901
- const m = () => ({ contains: (C) => !0, focus() {
902
- } });
903
- return h ? h.createChildGroup(m, "application", !1) : new Jt(m, "application");
904
- }, [h]), _e = ae((m) => {
905
- ve(m.source.getViewportElement()), E(m), Ee.activate("sheet"), a?.(m);
906
- }, [Ee]);
907
- G(() => {
908
- A && y && A.source?.focus(typeof y == "object" ? y : void 0);
909
- }, [A]);
910
- const U = se(null), ke = ne((m) => {
911
- let C = null;
912
- return v?.hidden || (C = f(An, { ...v, style: { maxWidth: "100%", ...v?.style }, workbook: j.current, ref: U, title: $, placeHolder: q, onTitleChange: (X) => {
913
- J(X);
914
- } })), f(kn, { ...m, logo: w, mainElement: C, showFileMenu: !b, showAppearanceMenu: !!(P?.onEnabledDarkGridChange || P?.onEnabledDarkImagesChange || P?.onModeChange) });
915
- }, [w, $, v, P, b, Ee]);
916
- G(() => {
917
- const m = (C) => C.preventDefault();
918
- return j.current?.addEventListener("wheel", m, { passive: !1 }), () => {
919
- j.current?.removeEventListener("wheel", m);
920
- };
921
- }, []);
922
- const Z = te(() => {
923
- const m = { transparentBackground: !0 };
924
- return f(me, { sx: t, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...n }, children: N?.(m) ?? f(Yt, { ...m }) });
925
- }, [t, n, N]), Oe = ne(({ error: m }) => (i?.(m), f(s, { sx: t, style: n, error: m ?? "Unable to display empty workbook." })), [t, n, i]), qe = te(() => ({ ...t, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-MuiContent *": { fontFamily: (m) => m.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [t]), R = en([j, o]), oe = te(() => {
926
- if (!T) return Z;
927
- if (T.error || !T.workbook) return Oe({ error: T.error });
928
- let m = null, C = null, X = !1;
929
- return P && (m = V ? P.dark : P.light, C = V && P.enableDarkGrid ? P.dark : P.light, X = P.enableDarkImages), f(Rn, { sx: qe, style: n, tabIndex: 0, autoFocus: !0, workbook: T.workbook, ref: R, renderToolbar: ke, onElementLoad: _e, onRepeatCommandChange: B, onKeyDown: (Y) => {
930
- c?.(Y);
931
- }, renderLoadingPanel: N, gridTheme: C, headersTheme: m, enableDarkImages: X, className: mt(r, "sheetxl-workbook"), onContextMenu: (Y) => Y.preventDefault(), ...D }, "WorkbookElement");
932
- }, [T, $, x, Z, N, P, D, ke, qe]);
933
- let O = f(No, { fallbackRender: Oe, children: f(Uo, { maxSnack: 3, domRoot: pe, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (m, C, X) => {
934
- j.current?.focus();
935
- }, Components: { error: fn }, iconVariant: { success: f(Fn, { style: { marginRight: "8px" }, children: f("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: f(Pn, { style: { marginRight: "8px" } }) }, children: f(In, { children: f(bn, { workbook: T?.workbook, setWorkbook: z, importExportDisabled: b, titlePlaceHolder: q, titleWorkbook: $, setWorkbookTitle: J, refWorkbookTitle: U, commands: Ee, undoManager: x, themeOptions: P, children: oe }) }) }) });
936
- return P && (O = ie(jn, { theme: V ? P.dark : P.light, children: [P.cssBaseline ? f(Oo, {}) : null, O] })), O;
937
- }));
938
- xn.displayName = "EagerStudio";
939
- const Go = Object.freeze(Object.defineProperty({ __proto__: null, default: xn }, Symbol.toStringTag, { value: "Module" })), er = Object.freeze(Object.defineProperty({ __proto__: null, E: Go, c: fe }, Symbol.toStringTag, { value: "Module" }));
940
- export {
941
- ft as C,
942
- er as a,
943
- fe as h
944
- };