@sheetxl/studio-mui 0.4.12 → 0.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/-zKDSjn55SCvCwk8.cjs +6 -0
- package/browser/cjs/AoLA7tfyPshG_mKt.cjs +6 -0
- package/browser/cjs/As7uhSEgY8VJ3I6f.cjs +90 -0
- package/browser/cjs/B1Eaz6PFZAmrWiyY.cjs +6 -0
- package/browser/cjs/B8ZfZXhvW4sSKKZs.cjs +42 -0
- package/browser/cjs/BAfNSJo7fktzFVJd.cjs +11 -0
- package/browser/cjs/BH0v7IIykugrFxaT.cjs +6 -0
- package/browser/cjs/BUwmvmcdC0xBQ97L.cjs +145 -0
- package/browser/cjs/BiBEmbWoJHdOB1li.cjs +12 -0
- package/browser/cjs/BkVtS9FZxWYNmrbU.cjs +6 -0
- package/browser/cjs/Bmifo5y7ZMJolUTY.cjs +15 -0
- package/browser/cjs/BpLu9-spCLcAFdwd.cjs +6 -0
- package/browser/cjs/BqOg0z4HGrbNaL1k.cjs +6 -0
- package/browser/cjs/C6Fk0jGWAOED60yf.cjs +161 -0
- package/browser/cjs/CRvxop0QcZL23Akb.cjs +6 -0
- package/browser/cjs/CS5USjyVh8DwPSri.cjs +7 -0
- package/browser/cjs/Chz3K3Qt8M2FNJwI.cjs +12 -0
- package/browser/cjs/D2gy3JDrJyGAMqsl.cjs +7 -0
- package/browser/cjs/DD8-ZSDUkRqk7l6y.cjs +11 -0
- package/browser/cjs/DNL88d5PGwk92LeD.cjs +6 -0
- package/browser/cjs/DTHMIHonHaHeJ0o1.cjs +18 -0
- package/browser/cjs/DZ8WTAzF6V2Tw1tW.cjs +6 -0
- package/browser/cjs/W7LR70ajtjR9Lmvl.cjs +6 -0
- package/browser/cjs/XGmQ2kUHM2qQkG1r.cjs +16 -0
- package/browser/cjs/d2jsgbPdf35xArnn.cjs +6 -0
- package/browser/cjs/index.cjs +4 -10
- package/browser/esm/4fzdzYhVH9eIXv-E.mjs +2410 -0
- package/browser/esm/B-rZWEIXFvB2W_mP.mjs +84 -0
- package/browser/esm/C4ORm_Up6Zxt92F_.mjs +1672 -0
- package/browser/esm/C5OCdRxcYIZViFzN.mjs +13391 -0
- package/browser/esm/C8po4rRYJ8127Rgb.mjs +44 -0
- package/browser/esm/CB7vnn7AtsGma4R6.mjs +3803 -0
- package/browser/esm/CBQZHZlKIiEz186r.mjs +2251 -0
- package/browser/esm/CCwOCTrf9Bira1-Y.mjs +424 -0
- package/browser/esm/CHovQU_R4AuKULmT.mjs +392 -0
- package/browser/esm/CIH3ADFJJmUiyA8p.mjs +864 -0
- package/browser/esm/CQiALmsycGGLFj1o.mjs +25 -0
- package/browser/esm/CS6uJp7phBvUmos6.mjs +1467 -0
- package/browser/esm/CSKgHJSTMvOEe2RH.mjs +19981 -0
- package/browser/esm/CYG1vk4AMMwqsul7.mjs +1366 -0
- package/browser/esm/ClmlhDf-0RC5GFV3.mjs +52 -0
- package/browser/esm/CmAnpd_SOxQuTQRL.mjs +1703 -0
- package/browser/esm/DWy4L2usallW0WdU.mjs +153 -0
- package/browser/esm/Dc1PmtvbeqsIQHq6.mjs +48 -0
- package/browser/esm/DgKsUQMTThBdEQds.mjs +59 -0
- package/browser/esm/Dk00kGaRJxiitO5-.mjs +23 -0
- package/browser/esm/FdSIHwC_mNRZpcgJ.mjs +43 -0
- package/browser/esm/Ks946bL2vmd4m743.mjs +52 -0
- package/browser/esm/TlZOl3Gt-d0Nc2a8.mjs +46 -0
- package/browser/esm/_FvE2-K7MOW_qWVS.mjs +1352 -0
- package/browser/esm/index.mjs +83 -8
- package/browser/esm/vgS9ixFRuZrPx6vq.mjs +640 -0
- package/licenses/dependencies.txt +134 -134
- package/node/esm/{B3M2CzPvK2oKOfg5.mjs → 762kbapO408ejsVC.mjs} +2 -2
- package/node/esm/{CryVonGjJnmo2dE_.mjs → B0gJGF9-J3L5yBEW.mjs} +5 -5
- package/node/esm/{CBGAl2mih9mHDt5w.mjs → BR9YJuwMP9nTMBE-.mjs} +1 -1
- package/node/esm/{D1xD8cOQDGcbjIlG.mjs → BTNBRzW8ZZbJY4GL.mjs} +1 -1
- package/node/esm/{C2P_M1JNT_WZZN3H.mjs → Bgtg4I8EL4M776SY.mjs} +8 -8
- package/node/esm/{DUfB1ollhqU-JIk5.mjs → Bi5br6yrYZqhLEiY.mjs} +4 -4
- package/node/esm/{M3UB6IrhVERZziiJ.mjs → CCygt4zw40-jO57G.mjs} +2 -2
- package/node/esm/{m8fyd2BoYkTOJlc1.mjs → CTpkd2r1aBS5d0yl.mjs} +1 -1
- package/node/esm/{kHsChOtl8GUkzj5Q.mjs → CY1qC_sXGD6av4yO.mjs} +2 -2
- package/node/esm/{Dx2vq1Hdt4pqmOF-.mjs → CZoMFCKJudiTl_Tf.mjs} +2 -2
- package/node/esm/{kIQFLB3nmEJdn_OT.mjs → CzWLA_IQgFbENkMq.mjs} +1 -1
- package/node/esm/{BJY8yNMmN_yyRtIG.mjs → D1GfRQ1jyFg-wmLD.mjs} +1 -1
- package/node/esm/{D1C8ifsmXsypL6pp.mjs → DC2dPUCWVgxEKzaS.mjs} +13 -13
- package/node/esm/{Bj8uU2shfkvN4LnE.mjs → DOUP6ynjlQE-UEJs.mjs} +6 -6
- package/node/esm/{BIRLX0-9t62Lqats.mjs → DUqIYzvmrCd67Dpx.mjs} +2 -2
- package/node/esm/{CVGxETc4rIE1gNAH.mjs → DWCxF-chq5dVi363.mjs} +38 -38
- package/node/esm/{Bt5y5wVaVAVjwHBl.mjs → DghPySv_2Ts78czJ.mjs} +1 -1
- package/node/esm/{PF5CCBvapZxEzc7k.mjs → DrujinnhlNDCosqb.mjs} +1 -1
- package/node/esm/DsD7O5j2cXyaECkB.mjs +313 -0
- package/node/esm/{wdtYNTNCynMMS4_P.mjs → VHY56h6xqQcPba6u.mjs} +1 -1
- package/node/esm/{h1y2hBFecTqRgUa-.mjs → dlEq3vDkIERtTn7Y.mjs} +25 -25
- package/node/esm/index.mjs +4999 -5264
- package/node/esm/{CKtVB9hMCfabQMxC.mjs → yB8OTWhDomxUy_SX.mjs} +2 -2
- package/node/esm/{bv_GA6NGCT0sJaXy.mjs → yP0whgIwVZApluLw.mjs} +2 -2
- package/package.json +8 -8
- package/types/index.d.ts +0 -11
- package/browser/cjs/B7qLzxylqOaybl3H.cjs +0 -7
- package/browser/cjs/BNGixOiIsu8jZlvn.cjs +0 -7
- package/browser/cjs/BUYxt7KgFkIIIMyc.cjs +0 -7
- package/browser/cjs/Bk6VhhWsnCRyBu2F.cjs +0 -7
- package/browser/cjs/BpiMMYip132x0r1O.cjs +0 -7
- package/browser/cjs/ByZ_Q-J7jgF7AoWR.cjs +0 -7
- package/browser/cjs/BzD7LV8VmFKLAJyW.cjs +0 -7
- package/browser/cjs/C6_zcNM0Efa11KEE.cjs +0 -7
- package/browser/cjs/C8Azx_ZaQa4WvAtR.cjs +0 -7
- package/browser/cjs/CITvaW7L_iZfIyAN.cjs +0 -7
- package/browser/cjs/CNDDYOoLCrGsUMYL.cjs +0 -7
- package/browser/cjs/CYbeY5OVZDqHGSOm.cjs +0 -7
- package/browser/cjs/C_SgucbRn-v9IkNO.cjs +0 -7
- package/browser/cjs/CeTd2nFbE5yFzf7T.cjs +0 -7
- package/browser/cjs/Cfe7IbPNI8-CgoDI.cjs +0 -7
- package/browser/cjs/Ctyk-ajkSsTDJuvY.cjs +0 -7
- package/browser/cjs/DBhTQLbjAtU-A1YA.cjs +0 -7
- package/browser/cjs/Dc2rbOjtcmSIm8D4.cjs +0 -7
- package/browser/cjs/DcsvUmoS8zGG5GB8.cjs +0 -7
- package/browser/cjs/DqAlQQIZIyF7HMib.cjs +0 -7
- package/browser/cjs/DuwawlAm4aRBNTBm.cjs +0 -7
- package/browser/cjs/Dx9UUJj-yeubDjm4.cjs +0 -7
- package/browser/cjs/IC19hB4Ntvw1158j.cjs +0 -7
- package/browser/cjs/reQ9miE5C5qMfbRJ.cjs +0 -7
- package/browser/esm/B1Ey4ZP8BHUzHW7G.mjs +0 -7
- package/browser/esm/B8dJHVZJta8QbNKG.mjs +0 -7
- package/browser/esm/BThbC01mtb7qq8_A.mjs +0 -7
- package/browser/esm/Bnt1M91BRyMvXrc4.mjs +0 -7
- package/browser/esm/BqN0SYrEO0RZQtv-.mjs +0 -7
- package/browser/esm/CHPXsEre3jry2-jF.mjs +0 -7
- package/browser/esm/CMCOU0nDlymDFS9l.mjs +0 -7
- package/browser/esm/Cc7y1nMDr5J8jWx-.mjs +0 -7
- package/browser/esm/CesL-3BNbMB1f_if.mjs +0 -7
- package/browser/esm/CfvNSnuQLa1SPbNL.mjs +0 -7
- package/browser/esm/CloqVDbJmTL4oFek.mjs +0 -7
- package/browser/esm/Cta0yn5UIrP2UoT4.mjs +0 -7
- package/browser/esm/CwRyQHiDoBLx5_1g.mjs +0 -7
- package/browser/esm/DI-ZGstUJFwkx4H6.mjs +0 -7
- package/browser/esm/DQTfmweCXjuIlITn.mjs +0 -7
- package/browser/esm/DUIfOO25d1fqtJzn.mjs +0 -7
- package/browser/esm/DhOXsRr8c7bDS1jM.mjs +0 -7
- package/browser/esm/JPwh2m5-pXkdPVzF.mjs +0 -7
- package/browser/esm/UkNAvQj0NVgeMpUl.mjs +0 -7
- package/browser/esm/ZUfck_LDsQb9gpvU.mjs +0 -7
- package/browser/esm/gHhqkr52cxXkga0T.mjs +0 -7
- package/browser/esm/obM68UOvA5HV7Lt1.mjs +0 -7
- package/browser/esm/x9MyDRdLE47dI9dF.mjs +0 -7
- package/browser/esm/yW9jxnamUqAhVQkJ.mjs +0 -7
|
@@ -0,0 +1,864 @@
|
|
|
1
|
+
import { jsx as f, jsxs as ae, Fragment as Ft } from "react/jsx-runtime";
|
|
2
|
+
import S, { Component as jt, createElement as le, createContext as sn, memo as ve, forwardRef as ne, useRef as te, useState as J, useCallback as X, useEffect as B, useMemo as Z, useContext as ln, isValidElement as Ht, cloneElement as cn, useLayoutEffect as it } from "react";
|
|
3
|
+
import { u as un, a as st, L as dn, T as ee, v as Ye, w as De, y as pn, M as mn, P as fn, z as hn, b as bt, W as me, d as gn, H as kn, e as xt, V as bn, f as xn, h as wn, j as yn, k as vn, m as Rt, n as En, l as Cn, A as Sn, Y as Dn, Q as $, Z as Te, X as wt, K as qt, o as Tn, p as Bt, q as lt, E as On, s as Ln, t as Mn, x as Wn, $ as _t, G as Pn, B as Nn, D as He, U as An, F as yt, R as In, I as Fn, J as jn, N as Hn, O as Rn, S as qn } from "./CSKgHJSTMvOEe2RH.mjs";
|
|
4
|
+
import { createPortal as Bn } from "react-dom";
|
|
5
|
+
import { Card as _n, CardActions as Vn, Typography as zn, IconButton as ct, Collapse as Un, Box as se, SvgIcon as Gn, CssBaseline as Kn } from "@mui/material";
|
|
6
|
+
import { PartialError as $n, CommonUtils as Je, UndoManager as Zn, Workbook as vt } from "@sheetxl/sdk";
|
|
7
|
+
import { ExpandMore as Xn, Close as Qn, CancelOutlined as Yn } from "@mui/icons-material";
|
|
8
|
+
/**
|
|
9
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
|
|
10
|
+
*
|
|
11
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
12
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
13
|
+
*/
|
|
14
|
+
const Jn = sn(null), et = { didCatch: !1, error: null };
|
|
15
|
+
class eo extends jt {
|
|
16
|
+
constructor(a) {
|
|
17
|
+
super(a), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = et;
|
|
18
|
+
}
|
|
19
|
+
static getDerivedStateFromError(a) {
|
|
20
|
+
return { didCatch: !0, error: a };
|
|
21
|
+
}
|
|
22
|
+
resetErrorBoundary() {
|
|
23
|
+
const { error: a } = this.state;
|
|
24
|
+
if (a !== null) {
|
|
25
|
+
for (var r, e, n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
|
|
26
|
+
(r = (e = this.props).onReset) === null || r === void 0 || r.call(e, { args: o, reason: "imperative-api" }), this.setState(et);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
componentDidCatch(a, r) {
|
|
30
|
+
var e, n;
|
|
31
|
+
(e = (n = this.props).onError) === null || e === void 0 || e.call(n, a, r);
|
|
32
|
+
}
|
|
33
|
+
componentDidUpdate(a, r) {
|
|
34
|
+
const { didCatch: e } = this.state, { resetKeys: n } = this.props;
|
|
35
|
+
var o, i;
|
|
36
|
+
e && r.error !== null && function() {
|
|
37
|
+
let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
38
|
+
return c.length !== s.length || c.some((l, u) => !Object.is(l, s[u]));
|
|
39
|
+
}(a.resetKeys, n) && ((o = (i = this.props).onReset) === null || o === void 0 || o.call(i, { next: n, prev: a.resetKeys, reason: "keys" }), this.setState(et));
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
const { children: a, fallbackRender: r, FallbackComponent: e, fallback: n } = this.props, { didCatch: o, error: i } = this.state;
|
|
43
|
+
let c = a;
|
|
44
|
+
if (o) {
|
|
45
|
+
const s = { error: i, resetErrorBoundary: this.resetErrorBoundary };
|
|
46
|
+
if (typeof r == "function") c = r(s);
|
|
47
|
+
else if (e) c = le(e, s);
|
|
48
|
+
else {
|
|
49
|
+
if (n === void 0) throw i;
|
|
50
|
+
c = n;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return le(Jn.Provider, { value: { didCatch: o, error: i, resetErrorBoundary: this.resetErrorBoundary } }, c);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function Vt(t) {
|
|
57
|
+
var a, r, e = "";
|
|
58
|
+
if (typeof t == "string" || typeof t == "number") e += t;
|
|
59
|
+
else if (typeof t == "object") if (Array.isArray(t)) for (a = 0; a < t.length; a++) t[a] && (r = Vt(t[a])) && (e && (e += " "), e += r);
|
|
60
|
+
else for (a in t) t[a] && (e && (e += " "), e += a);
|
|
61
|
+
return e;
|
|
62
|
+
}
|
|
63
|
+
function he() {
|
|
64
|
+
for (var t, a, r = 0, e = ""; r < arguments.length; ) (t = arguments[r++]) && (a = Vt(t)) && (e && (e += " "), e += a);
|
|
65
|
+
return e;
|
|
66
|
+
}
|
|
67
|
+
let to = { data: "" }, no = (t) => typeof window == "object" ? ((t ? t.querySelector("#_goober") : window._goober) || Object.assign((t || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : t || to, oo = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, ro = /\/\*[^]*?\*\/| +/g, Et = /\n+/g, fe = (t, a) => {
|
|
68
|
+
let r = "", e = "", n = "";
|
|
69
|
+
for (let o in t) {
|
|
70
|
+
let i = t[o];
|
|
71
|
+
o[0] == "@" ? o[1] == "i" ? r = o + " " + i + ";" : e += o[1] == "f" ? fe(i, o) : o + "{" + fe(i, o[1] == "k" ? "" : a) + "}" : typeof i == "object" ? e += fe(i, a ? a.replace(/([^,])+/g, (c) => o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (s) => /&/.test(s) ? s.replace(/&/g, c) : c ? c + " " + s : s)) : o) : i != null && (o = /^--/.test(o) ? o : o.replace(/[A-Z]/g, "-$&").toLowerCase(), n += fe.p ? fe.p(o, i) : o + ":" + i + ";");
|
|
72
|
+
}
|
|
73
|
+
return r + (a && n ? a + "{" + n + "}" : n) + e;
|
|
74
|
+
}, oe = {}, zt = (t) => {
|
|
75
|
+
if (typeof t == "object") {
|
|
76
|
+
let a = "";
|
|
77
|
+
for (let r in t) a += r + zt(t[r]);
|
|
78
|
+
return a;
|
|
79
|
+
}
|
|
80
|
+
return t;
|
|
81
|
+
}, ao = (t, a, r, e, n) => {
|
|
82
|
+
let o = zt(t), i = oe[o] || (oe[o] = ((s) => {
|
|
83
|
+
let l = 0, u = 11;
|
|
84
|
+
for (; l < s.length; ) u = 101 * u + s.charCodeAt(l++) >>> 0;
|
|
85
|
+
return "go" + u;
|
|
86
|
+
})(o));
|
|
87
|
+
if (!oe[i]) {
|
|
88
|
+
let s = o !== t ? t : ((l) => {
|
|
89
|
+
let u, d, m = [{}];
|
|
90
|
+
for (; u = oo.exec(l.replace(ro, "")); ) u[4] ? m.shift() : u[3] ? (d = u[3].replace(Et, " ").trim(), m.unshift(m[0][d] = m[0][d] || {})) : m[0][u[1]] = u[2].replace(Et, " ").trim();
|
|
91
|
+
return m[0];
|
|
92
|
+
})(t);
|
|
93
|
+
oe[i] = fe(n ? { ["@keyframes " + i]: s } : s, r ? "" : "." + i);
|
|
94
|
+
}
|
|
95
|
+
let c = r && oe.g ? oe.g : null;
|
|
96
|
+
return r && (oe.g = oe[i]), ((s, l, u, d) => {
|
|
97
|
+
d ? l.data = l.data.replace(d, s) : l.data.indexOf(s) === -1 && (l.data = u ? s + l.data : l.data + s);
|
|
98
|
+
})(oe[i], a, e, c), i;
|
|
99
|
+
};
|
|
100
|
+
function ut(t) {
|
|
101
|
+
let a = this || {}, r = t.call ? t(a.p) : t;
|
|
102
|
+
return ao(r.unshift ? r.raw ? ((e, n, o) => e.reduce((i, c, s) => {
|
|
103
|
+
let l = n[s];
|
|
104
|
+
if (l && l.call) {
|
|
105
|
+
let u = l(o), d = u && u.props && u.props.className || /^go/.test(u) && u;
|
|
106
|
+
l = d ? "." + d : u && typeof u == "object" ? u.props ? "" : fe(u, "") : u === !1 ? "" : u;
|
|
107
|
+
}
|
|
108
|
+
return i + c + (l ?? "");
|
|
109
|
+
}, ""))(r, [].slice.call(arguments, 1), a.p) : r.reduce((e, n) => Object.assign(e, n && n.call ? n(a.p) : n), {}) : r, no(a.target), a.g, a.o, a.k);
|
|
110
|
+
}
|
|
111
|
+
function Ut(t, a, r) {
|
|
112
|
+
return a && function(e, n) {
|
|
113
|
+
for (var o = 0; o < n.length; o++) {
|
|
114
|
+
var i = n[o];
|
|
115
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
|
|
116
|
+
}
|
|
117
|
+
}(t.prototype, a), t;
|
|
118
|
+
}
|
|
119
|
+
function T() {
|
|
120
|
+
return T = Object.assign || function(t) {
|
|
121
|
+
for (var a = 1; a < arguments.length; a++) {
|
|
122
|
+
var r = arguments[a];
|
|
123
|
+
for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && (t[e] = r[e]);
|
|
124
|
+
}
|
|
125
|
+
return t;
|
|
126
|
+
}, T.apply(this, arguments);
|
|
127
|
+
}
|
|
128
|
+
function Gt(t, a) {
|
|
129
|
+
t.prototype = Object.create(a.prototype), t.prototype.constructor = t, t.__proto__ = a;
|
|
130
|
+
}
|
|
131
|
+
function Ne(t, a) {
|
|
132
|
+
if (t == null) return {};
|
|
133
|
+
var r, e, n = {}, o = Object.keys(t);
|
|
134
|
+
for (e = 0; e < o.length; e++) r = o[e], a.indexOf(r) >= 0 || (n[r] = t[r]);
|
|
135
|
+
return n;
|
|
136
|
+
}
|
|
137
|
+
function Ct(t) {
|
|
138
|
+
if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
139
|
+
return t;
|
|
140
|
+
}
|
|
141
|
+
ut.bind({ g: 1 }), ut.bind({ k: 1 });
|
|
142
|
+
var St = function() {
|
|
143
|
+
return "";
|
|
144
|
+
}, Kt = S.createContext({ enqueueSnackbar: St, closeSnackbar: St }), tt = "@media (max-width:599.95px)", Ge = "@media (min-width:600px)", Dt = function(t) {
|
|
145
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
146
|
+
}, mt = function(t) {
|
|
147
|
+
return "" + Dt(t.vertical) + Dt(t.horizontal);
|
|
148
|
+
}, Re = function(t) {
|
|
149
|
+
return !!t || t === 0;
|
|
150
|
+
}, qe = "unmounted", be = "exited", xe = "entering", Oe = "entered", Tt = "exiting", ft = function(t) {
|
|
151
|
+
function a(e) {
|
|
152
|
+
var n;
|
|
153
|
+
n = t.call(this, e) || this;
|
|
154
|
+
var o, i = e.appear;
|
|
155
|
+
return n.appearStatus = null, e.in ? i ? (o = be, n.appearStatus = xe) : o = Oe : o = e.unmountOnExit || e.mountOnEnter ? qe : be, n.state = { status: o }, n.nextCallback = null, n;
|
|
156
|
+
}
|
|
157
|
+
Gt(a, t), a.getDerivedStateFromProps = function(e, n) {
|
|
158
|
+
return e.in && n.status === qe ? { status: be } : null;
|
|
159
|
+
};
|
|
160
|
+
var r = a.prototype;
|
|
161
|
+
return r.componentDidMount = function() {
|
|
162
|
+
this.updateStatus(!0, this.appearStatus);
|
|
163
|
+
}, r.componentDidUpdate = function(e) {
|
|
164
|
+
var n = null;
|
|
165
|
+
if (e !== this.props) {
|
|
166
|
+
var o = this.state.status;
|
|
167
|
+
this.props.in ? o !== xe && o !== Oe && (n = xe) : o !== xe && o !== Oe || (n = Tt);
|
|
168
|
+
}
|
|
169
|
+
this.updateStatus(!1, n);
|
|
170
|
+
}, r.componentWillUnmount = function() {
|
|
171
|
+
this.cancelNextCallback();
|
|
172
|
+
}, r.getTimeouts = function() {
|
|
173
|
+
var e = this.props.timeout, n = e, o = e;
|
|
174
|
+
return e != null && typeof e != "number" && typeof e != "string" && (o = e.exit, n = e.enter), { exit: o, enter: n };
|
|
175
|
+
}, r.updateStatus = function(e, n) {
|
|
176
|
+
e === void 0 && (e = !1), n !== null ? (this.cancelNextCallback(), n === xe ? this.performEnter(e) : this.performExit()) : this.props.unmountOnExit && this.state.status === be && this.setState({ status: qe });
|
|
177
|
+
}, r.performEnter = function(e) {
|
|
178
|
+
var n = this, o = this.props.enter, i = e, c = this.getTimeouts();
|
|
179
|
+
e || o ? (this.props.onEnter && this.props.onEnter(this.node, i), this.safeSetState({ status: xe }, function() {
|
|
180
|
+
n.props.onEntering && n.props.onEntering(n.node, i), n.onTransitionEnd(c.enter, function() {
|
|
181
|
+
n.safeSetState({ status: Oe }, function() {
|
|
182
|
+
n.props.onEntered && n.props.onEntered(n.node, i);
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
})) : this.safeSetState({ status: Oe }, function() {
|
|
186
|
+
n.props.onEntered && n.props.onEntered(n.node, i);
|
|
187
|
+
});
|
|
188
|
+
}, r.performExit = function() {
|
|
189
|
+
var e = this, n = this.props.exit, o = this.getTimeouts();
|
|
190
|
+
n ? (this.props.onExit && this.props.onExit(this.node), this.safeSetState({ status: Tt }, function() {
|
|
191
|
+
e.props.onExiting && e.props.onExiting(e.node), e.onTransitionEnd(o.exit, function() {
|
|
192
|
+
e.safeSetState({ status: be }, function() {
|
|
193
|
+
e.props.onExited && e.props.onExited(e.node);
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
})) : this.safeSetState({ status: be }, function() {
|
|
197
|
+
e.props.onExited && e.props.onExited(e.node);
|
|
198
|
+
});
|
|
199
|
+
}, r.cancelNextCallback = function() {
|
|
200
|
+
this.nextCallback !== null && this.nextCallback.cancel && (this.nextCallback.cancel(), this.nextCallback = null);
|
|
201
|
+
}, r.safeSetState = function(e, n) {
|
|
202
|
+
n = this.setNextCallback(n), this.setState(e, n);
|
|
203
|
+
}, r.setNextCallback = function(e) {
|
|
204
|
+
var n = this, o = !0;
|
|
205
|
+
return this.nextCallback = function() {
|
|
206
|
+
o && (o = !1, n.nextCallback = null, e());
|
|
207
|
+
}, this.nextCallback.cancel = function() {
|
|
208
|
+
o = !1;
|
|
209
|
+
}, this.nextCallback;
|
|
210
|
+
}, r.onTransitionEnd = function(e, n) {
|
|
211
|
+
this.setNextCallback(n);
|
|
212
|
+
var o = e == null && !this.props.addEndListener;
|
|
213
|
+
this.node && !o ? (this.props.addEndListener && this.props.addEndListener(this.node, this.nextCallback), e != null && setTimeout(this.nextCallback, e)) : setTimeout(this.nextCallback, 0);
|
|
214
|
+
}, r.render = function() {
|
|
215
|
+
var e = this.state.status;
|
|
216
|
+
if (e === qe) return null;
|
|
217
|
+
var n = this.props;
|
|
218
|
+
return (0, n.children)(e, Ne(n, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]));
|
|
219
|
+
}, Ut(a, [{ key: "node", get: function() {
|
|
220
|
+
var e, n = (e = this.props.nodeRef) === null || e === void 0 ? void 0 : e.current;
|
|
221
|
+
if (!n) throw new Error("notistack - Custom snackbar is not refForwarding");
|
|
222
|
+
return n;
|
|
223
|
+
} }]), a;
|
|
224
|
+
}(S.Component);
|
|
225
|
+
function we() {
|
|
226
|
+
}
|
|
227
|
+
function Ot(t, a) {
|
|
228
|
+
typeof t == "function" ? t(a) : t && (t.current = a);
|
|
229
|
+
}
|
|
230
|
+
function dt(t, a) {
|
|
231
|
+
return Z(function() {
|
|
232
|
+
return t == null && a == null ? null : function(r) {
|
|
233
|
+
Ot(t, r), Ot(a, r);
|
|
234
|
+
};
|
|
235
|
+
}, [t, a]);
|
|
236
|
+
}
|
|
237
|
+
function Ke(t) {
|
|
238
|
+
var a = t.timeout, r = t.style, e = r === void 0 ? {} : r, n = t.mode;
|
|
239
|
+
return { duration: typeof a == "object" ? a[n] || 0 : a, easing: e.transitionTimingFunction, delay: e.transitionDelay };
|
|
240
|
+
}
|
|
241
|
+
ft.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: we, onEntering: we, onEntered: we, onExit: we, onExiting: we, onExited: we };
|
|
242
|
+
var io = "cubic-bezier(0.4, 0, 0.2, 1)", so = "cubic-bezier(0.0, 0, 0.2, 1)", lo = "cubic-bezier(0.4, 0, 0.6, 1)", $t = function(t) {
|
|
243
|
+
t.scrollTop = t.scrollTop;
|
|
244
|
+
}, Lt = function(t) {
|
|
245
|
+
return Math.round(t) + "ms";
|
|
246
|
+
};
|
|
247
|
+
function ye(t, a) {
|
|
248
|
+
t === void 0 && (t = ["all"]);
|
|
249
|
+
var r = a || {}, e = r.duration, n = e === void 0 ? 300 : e, o = r.easing, i = o === void 0 ? io : o, c = r.delay, s = c === void 0 ? 0 : c;
|
|
250
|
+
return (Array.isArray(t) ? t : [t]).map(function(l) {
|
|
251
|
+
var u = typeof n == "string" ? n : Lt(n), d = typeof s == "string" ? s : Lt(s);
|
|
252
|
+
return l + " " + u + " " + i + " " + d;
|
|
253
|
+
}).join(",");
|
|
254
|
+
}
|
|
255
|
+
function Zt(t) {
|
|
256
|
+
var a = function(r) {
|
|
257
|
+
return r && r.ownerDocument || document;
|
|
258
|
+
}(t);
|
|
259
|
+
return a.defaultView || window;
|
|
260
|
+
}
|
|
261
|
+
function Be(t, a) {
|
|
262
|
+
if (a) {
|
|
263
|
+
var r = function(e, n) {
|
|
264
|
+
var o, i = n.getBoundingClientRect(), c = Zt(n);
|
|
265
|
+
if (n.fakeTransform) o = n.fakeTransform;
|
|
266
|
+
else {
|
|
267
|
+
var s = c.getComputedStyle(n);
|
|
268
|
+
o = s.getPropertyValue("-webkit-transform") || s.getPropertyValue("transform");
|
|
269
|
+
}
|
|
270
|
+
var l = 0, u = 0;
|
|
271
|
+
if (o && o !== "none" && typeof o == "string") {
|
|
272
|
+
var d = o.split("(")[1].split(")")[0].split(",");
|
|
273
|
+
l = parseInt(d[4], 10), u = parseInt(d[5], 10);
|
|
274
|
+
}
|
|
275
|
+
switch (e) {
|
|
276
|
+
case "left":
|
|
277
|
+
return "translateX(" + (c.innerWidth + l - i.left) + "px)";
|
|
278
|
+
case "right":
|
|
279
|
+
return "translateX(-" + (i.left + i.width - l) + "px)";
|
|
280
|
+
case "up":
|
|
281
|
+
return "translateY(" + (c.innerHeight + u - i.top) + "px)";
|
|
282
|
+
default:
|
|
283
|
+
return "translateY(-" + (i.top + i.height - u) + "px)";
|
|
284
|
+
}
|
|
285
|
+
}(t, a);
|
|
286
|
+
r && (a.style.webkitTransform = r, a.style.transform = r);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
var Xt = ne(function(t, a) {
|
|
290
|
+
var r = t.children, e = t.direction, n = e === void 0 ? "down" : e, o = t.in, i = t.style, c = t.timeout, s = c === void 0 ? 0 : c, l = t.onEnter, u = t.onEntered, d = t.onExit, m = t.onExited, x = Ne(t, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), g = te(null), w = dt(r.ref, g), v = dt(w, a), k = X(function() {
|
|
291
|
+
g.current && Be(n, g.current);
|
|
292
|
+
}, [n]);
|
|
293
|
+
return B(function() {
|
|
294
|
+
if (!o && n !== "down" && n !== "right") {
|
|
295
|
+
var h = function(E, U) {
|
|
296
|
+
var z;
|
|
297
|
+
function H() {
|
|
298
|
+
for (var R = this, G = arguments.length, q = new Array(G), Q = 0; Q < G; Q++) q[Q] = arguments[Q];
|
|
299
|
+
clearTimeout(z), z = setTimeout(function() {
|
|
300
|
+
E.apply(R, q);
|
|
301
|
+
}, U);
|
|
302
|
+
}
|
|
303
|
+
return U === void 0 && (U = 166), H.clear = function() {
|
|
304
|
+
clearTimeout(z);
|
|
305
|
+
}, H;
|
|
306
|
+
}(function() {
|
|
307
|
+
g.current && Be(n, g.current);
|
|
308
|
+
}), P = Zt(g.current);
|
|
309
|
+
return P.addEventListener("resize", h), function() {
|
|
310
|
+
h.clear(), P.removeEventListener("resize", h);
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
}, [n, o]), B(function() {
|
|
314
|
+
o || k();
|
|
315
|
+
}, [o, k]), le(ft, Object.assign({ appear: !0, nodeRef: g, onEnter: function(h, P) {
|
|
316
|
+
Be(n, h), $t(h), l && l(h, P);
|
|
317
|
+
}, onEntered: u, onEntering: function(h) {
|
|
318
|
+
var P = i?.transitionTimingFunction || so, E = Ke({ timeout: s, mode: "enter", style: T({}, i, { transitionTimingFunction: P }) });
|
|
319
|
+
h.style.webkitTransition = ye("-webkit-transform", E), h.style.transition = ye("transform", E), h.style.webkitTransform = "none", h.style.transform = "none";
|
|
320
|
+
}, onExit: function(h) {
|
|
321
|
+
var P = i?.transitionTimingFunction || lo, E = Ke({ timeout: s, mode: "exit", style: T({}, i, { transitionTimingFunction: P }) });
|
|
322
|
+
h.style.webkitTransition = ye("-webkit-transform", E), h.style.transition = ye("transform", E), Be(n, h), d && d(h);
|
|
323
|
+
}, onExited: function(h) {
|
|
324
|
+
h.style.webkitTransition = "", h.style.transition = "", m && m(h);
|
|
325
|
+
}, in: o, timeout: s }, x), function(h, P) {
|
|
326
|
+
return cn(r, T({ ref: v, style: T({ visibility: h !== "exited" || o ? void 0 : "hidden" }, i, {}, r.props.style) }, P));
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
Xt.displayName = "Slide";
|
|
330
|
+
var $e = function(t) {
|
|
331
|
+
return S.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 } }, t));
|
|
332
|
+
}, co = function() {
|
|
333
|
+
return S.createElement($e, null, S.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
|
|
334
|
+
10.59L10 14.17L17.59 6.58L19 8L10 17Z` }));
|
|
335
|
+
}, uo = function() {
|
|
336
|
+
return S.createElement($e, null, S.createElement("path", { d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z" }));
|
|
337
|
+
}, po = function() {
|
|
338
|
+
return S.createElement($e, null, S.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,
|
|
339
|
+
6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
|
|
340
|
+
13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z` }));
|
|
341
|
+
}, mo = function() {
|
|
342
|
+
return S.createElement($e, null, S.createElement("path", { d: `M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
|
|
343
|
+
0 22,12A10,10 0 0,0 12,2Z` }));
|
|
344
|
+
}, pe = { maxSnack: 3, persist: !1, hideIconVariant: !1, disableWindowBlurListener: !1, variant: "default", autoHideDuration: 5e3, iconVariant: { default: void 0, success: S.createElement(co, null), warning: S.createElement(uo, null), error: S.createElement(po, null), info: S.createElement(mo, null) }, anchorOrigin: { vertical: "bottom", horizontal: "left" }, TransitionComponent: Xt, transitionDuration: { enter: 225, exit: 195 } }, fo = function(t, a) {
|
|
345
|
+
return function(r, e) {
|
|
346
|
+
return e === void 0 && (e = !1), e ? T({}, pe[r], {}, a[r], {}, t[r]) : r === "autoHideDuration" ? (n = t.autoHideDuration, o = a.autoHideDuration, (i = function(c) {
|
|
347
|
+
return typeof c == "number" || c === null;
|
|
348
|
+
})(n) ? n : i(o) ? o : pe.autoHideDuration) : r === "transitionDuration" ? function(c, s) {
|
|
349
|
+
var l = function(u, d) {
|
|
350
|
+
return d.some(function(m) {
|
|
351
|
+
return typeof u === m;
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
return l(c, ["string", "number"]) ? c : l(c, ["object"]) ? T({}, pe.transitionDuration, {}, l(s, ["object"]) && s, {}, c) : l(s, ["string", "number"]) ? s : l(s, ["object"]) ? T({}, pe.transitionDuration, {}, s) : pe.transitionDuration;
|
|
355
|
+
}(t.transitionDuration, a.transitionDuration) : t[r] || a[r] || pe[r];
|
|
356
|
+
var n, o, i;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
function Ae(t) {
|
|
360
|
+
return Object.entries(t).reduce(function(a, r) {
|
|
361
|
+
var e, n = r[0], o = r[1];
|
|
362
|
+
return T({}, a, ((e = {})[n] = ut(o), e));
|
|
363
|
+
}, {});
|
|
364
|
+
}
|
|
365
|
+
var ho = "notistack-SnackbarContainer", go = "notistack-Snackbar", Qt = "notistack-CollapseWrapper", ko = "notistack-MuiContent", bo = function(t) {
|
|
366
|
+
return "notistack-MuiContent-" + t;
|
|
367
|
+
}, Mt = Ae({ root: { height: 0 }, entered: { height: "auto" } }), nt = "0px", Yt = ne(function(t, a) {
|
|
368
|
+
var r = t.children, e = t.in, n = t.onExited, o = te(null), i = te(null), c = dt(a, i), s = function() {
|
|
369
|
+
return o.current ? o.current.clientHeight : 0;
|
|
370
|
+
};
|
|
371
|
+
return le(ft, { in: e, unmountOnExit: !0, onEnter: function(l) {
|
|
372
|
+
l.style.height = nt;
|
|
373
|
+
}, onEntered: function(l) {
|
|
374
|
+
l.style.height = "auto";
|
|
375
|
+
}, onEntering: function(l) {
|
|
376
|
+
var u = s(), d = Ke({ timeout: 175, mode: "enter" }), m = d.duration, x = d.easing;
|
|
377
|
+
l.style.transitionDuration = typeof m == "string" ? m : m + "ms", l.style.height = u + "px", l.style.transitionTimingFunction = x || "";
|
|
378
|
+
}, onExit: function(l) {
|
|
379
|
+
l.style.height = s() + "px";
|
|
380
|
+
}, onExited: n, onExiting: function(l) {
|
|
381
|
+
$t(l);
|
|
382
|
+
var u = Ke({ timeout: 175, mode: "exit" }), d = u.duration, m = u.easing;
|
|
383
|
+
l.style.transitionDuration = typeof d == "string" ? d : d + "ms", l.style.height = nt, l.style.transitionTimingFunction = m || "";
|
|
384
|
+
}, nodeRef: i, timeout: 175 }, function(l, u) {
|
|
385
|
+
return le("div", Object.assign({ ref: c, className: he(Mt.root, l === "entered" && Mt.entered), style: T({ pointerEvents: "all", overflow: "hidden", minHeight: nt, transition: ye("height") }, l === "entered" && { overflow: "visible" }, {}, l === "exited" && !e && { visibility: "hidden" }) }, u), le("div", { ref: o, className: Qt, style: { display: "flex", width: "100%" } }, r));
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
Yt.displayName = "Collapse";
|
|
389
|
+
var Wt = { right: "left", left: "right", bottom: "up", top: "down" }, xo = function(t) {
|
|
390
|
+
return "anchorOrigin" + mt(t);
|
|
391
|
+
}, wo = function() {
|
|
392
|
+
};
|
|
393
|
+
function Pe(t, a) {
|
|
394
|
+
return t.reduce(function(r, e) {
|
|
395
|
+
return e == null ? r : function() {
|
|
396
|
+
for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
|
|
397
|
+
var c = [].concat(o);
|
|
398
|
+
a && c.indexOf(a) === -1 && c.push(a), r.apply(this, c), e.apply(this, c);
|
|
399
|
+
};
|
|
400
|
+
}, wo);
|
|
401
|
+
}
|
|
402
|
+
var yo = typeof window < "u" ? it : B;
|
|
403
|
+
function Pt(t) {
|
|
404
|
+
var a = te(t);
|
|
405
|
+
return yo(function() {
|
|
406
|
+
a.current = t;
|
|
407
|
+
}), X(function() {
|
|
408
|
+
return a.current.apply(void 0, arguments);
|
|
409
|
+
}, []);
|
|
410
|
+
}
|
|
411
|
+
var ot, Jt = ne(function(t, a) {
|
|
412
|
+
var r = t.children, e = t.className, n = t.autoHideDuration, o = t.disableWindowBlurListener, i = o !== void 0 && o, c = t.onClose, s = t.id, l = t.open, u = t.SnackbarProps, d = u === void 0 ? {} : u, m = te(), x = Pt(function() {
|
|
413
|
+
c && c.apply(void 0, arguments);
|
|
414
|
+
}), g = Pt(function(k) {
|
|
415
|
+
c && k != null && (m.current && clearTimeout(m.current), m.current = setTimeout(function() {
|
|
416
|
+
x(null, "timeout", s);
|
|
417
|
+
}, k));
|
|
418
|
+
});
|
|
419
|
+
B(function() {
|
|
420
|
+
return l && g(n), function() {
|
|
421
|
+
m.current && clearTimeout(m.current);
|
|
422
|
+
};
|
|
423
|
+
}, [l, n, g]);
|
|
424
|
+
var w = function() {
|
|
425
|
+
m.current && clearTimeout(m.current);
|
|
426
|
+
}, v = X(function() {
|
|
427
|
+
n != null && g(0.5 * n);
|
|
428
|
+
}, [n, g]);
|
|
429
|
+
return B(function() {
|
|
430
|
+
if (!i && l) return window.addEventListener("focus", v), window.addEventListener("blur", w), function() {
|
|
431
|
+
window.removeEventListener("focus", v), window.removeEventListener("blur", w);
|
|
432
|
+
};
|
|
433
|
+
}, [i, v, l]), le("div", Object.assign({ ref: a }, d, { className: he(go, e), onMouseEnter: function(k) {
|
|
434
|
+
d.onMouseEnter && d.onMouseEnter(k), w();
|
|
435
|
+
}, onMouseLeave: function(k) {
|
|
436
|
+
d.onMouseLeave && d.onMouseLeave(k), v();
|
|
437
|
+
} }), r);
|
|
438
|
+
});
|
|
439
|
+
Jt.displayName = "Snackbar";
|
|
440
|
+
var vo = Ae({ root: (ot = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, ot[Ge] = { flexGrow: "initial", minWidth: "288px" }, ot) }), ht = ne(function(t, a) {
|
|
441
|
+
var r = t.className, e = Ne(t, ["className"]);
|
|
442
|
+
return S.createElement("div", Object.assign({ ref: a, className: he(vo.root, r) }, e));
|
|
443
|
+
});
|
|
444
|
+
ht.displayName = "SnackbarContent";
|
|
445
|
+
var Le = Ae({ 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" } }), Nt = "notistack-snackbar", en = ne(function(t, a) {
|
|
446
|
+
var r = t.id, e = t.message, n = t.action, o = t.iconVariant, i = t.variant, c = t.hideIconVariant, s = t.style, l = t.className, u = o[i], d = n;
|
|
447
|
+
return typeof d == "function" && (d = d(r)), S.createElement(ht, { ref: a, role: "alert", "aria-describedby": Nt, style: s, className: he(ko, bo(i), Le.root, Le[i], l, !c && u && Le.lessPadding) }, S.createElement("div", { id: Nt, className: Le.message }, c ? null : u, e), d && S.createElement("div", { className: Le.action }, d));
|
|
448
|
+
});
|
|
449
|
+
en.displayName = "MaterialDesignContent";
|
|
450
|
+
var Me, rt, _e, Ve, at, Eo = ve(en), Co = Ae({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), So = function(t) {
|
|
451
|
+
var a = te(), r = J(!0), e = r[0], n = r[1], o = Pe([t.snack.onClose, t.onClose]), i = X(function() {
|
|
452
|
+
a.current = setTimeout(function() {
|
|
453
|
+
n(function(R) {
|
|
454
|
+
return !R;
|
|
455
|
+
});
|
|
456
|
+
}, 125);
|
|
457
|
+
}, []);
|
|
458
|
+
B(function() {
|
|
459
|
+
return function() {
|
|
460
|
+
a.current && clearTimeout(a.current);
|
|
461
|
+
};
|
|
462
|
+
}, []);
|
|
463
|
+
var c, s = t.snack, l = t.classes, u = t.Component, d = u === void 0 ? Eo : u, m = Z(function() {
|
|
464
|
+
return function(R) {
|
|
465
|
+
R === void 0 && (R = {});
|
|
466
|
+
var G = { containerRoot: !0, containerAnchorOriginTopCenter: !0, containerAnchorOriginBottomCenter: !0, containerAnchorOriginTopRight: !0, containerAnchorOriginBottomRight: !0, containerAnchorOriginTopLeft: !0, containerAnchorOriginBottomLeft: !0 };
|
|
467
|
+
return Object.keys(R).filter(function(q) {
|
|
468
|
+
return !G[q];
|
|
469
|
+
}).reduce(function(q, Q) {
|
|
470
|
+
var ce;
|
|
471
|
+
return T({}, q, ((ce = {})[Q] = R[Q], ce));
|
|
472
|
+
}, {});
|
|
473
|
+
}(l);
|
|
474
|
+
}, [l]), x = s.open, g = s.SnackbarProps, w = s.TransitionComponent, v = s.TransitionProps, k = s.transitionDuration, h = s.disableWindowBlurListener, P = s.content, E = Ne(s, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), U = T({ direction: (c = E.anchorOrigin, c.horizontal !== "center" ? Wt[c.horizontal] : Wt[c.vertical]), timeout: k }, v), z = P;
|
|
475
|
+
typeof z == "function" && (z = z(E.id, E.message));
|
|
476
|
+
var H = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(R, G) {
|
|
477
|
+
var q;
|
|
478
|
+
return T({}, R, ((q = {})[G] = Pe([t.snack[G], t[G]], E.id), q));
|
|
479
|
+
}, {});
|
|
480
|
+
return S.createElement(Yt, { in: e, onExited: H.onExited }, S.createElement(Jt, { open: x, id: E.id, disableWindowBlurListener: h, autoHideDuration: E.autoHideDuration, className: he(Co.wrappedRoot, m.root, m[xo(E.anchorOrigin)]), SnackbarProps: g, onClose: o }, S.createElement(w, Object.assign({}, U, { appear: !0, in: x, onExit: H.onExit, onExited: i, onEnter: H.onEnter, onEntered: Pe([H.onEntered, function() {
|
|
481
|
+
t.snack.requestClose && o(null, "instructed", t.snack.id);
|
|
482
|
+
}], E.id) }), z || S.createElement(d, Object.assign({}, E)))));
|
|
483
|
+
}, We = { default: 20 }, ze = { default: 6, dense: 2 }, At = "." + Qt, Ue = Ae({ root: (Me = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: ye(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, Me[At] = { padding: ze.default + "px 0px", transition: "padding 300ms ease 0ms" }, Me.maxWidth = "calc(100% - " + 2 * We.default + "px)", Me[tt] = { width: "100%", maxWidth: "calc(100% - 32px)" }, Me), rootDense: (rt = {}, rt[At] = { padding: ze.dense + "px 0px" }, rt), top: { top: We.default - ze.default + "px", flexDirection: "column" }, bottom: { bottom: We.default - ze.default + "px", flexDirection: "column-reverse" }, left: (_e = { left: We.default + "px" }, _e[Ge] = { alignItems: "flex-start" }, _e[tt] = { left: "16px" }, _e), right: (Ve = { right: We.default + "px" }, Ve[Ge] = { alignItems: "flex-end" }, Ve[tt] = { right: "16px" }, Ve), center: (at = { left: "50%", transform: "translateX(-50%)" }, at[Ge] = { alignItems: "center" }, at) }), Do = ve(function(t) {
|
|
484
|
+
var a = t.classes, r = a === void 0 ? {} : a, e = t.anchorOrigin, n = t.dense, o = t.children, i = he(ho, Ue[e.vertical], Ue[e.horizontal], Ue.root, r.containerRoot, r["containerAnchorOrigin" + mt(e)], n && Ue.rootDense);
|
|
485
|
+
return S.createElement("div", { className: i }, o);
|
|
486
|
+
}), It = function(t) {
|
|
487
|
+
return !(typeof t == "string" || Ht(t));
|
|
488
|
+
}, To = function(t) {
|
|
489
|
+
function a(r) {
|
|
490
|
+
var e;
|
|
491
|
+
return (e = t.call(this, r) || this).enqueueSnackbar = function(n, o) {
|
|
492
|
+
if (o === void 0 && (o = {}), n == null) throw new Error("enqueueSnackbar called with invalid argument");
|
|
493
|
+
var i = It(n) ? n : o, c = It(n) ? n.message : n, s = i.key, l = i.preventDuplicate, u = Ne(i, ["key", "preventDuplicate"]), d = Re(s), m = d ? s : (/* @__PURE__ */ new Date()).getTime() + Math.random(), x = fo(u, e.props), g = T({ id: m }, u, { message: c, open: !0, entered: !1, requestClose: !1, persist: x("persist"), action: x("action"), content: x("content"), variant: x("variant"), anchorOrigin: x("anchorOrigin"), disableWindowBlurListener: x("disableWindowBlurListener"), autoHideDuration: x("autoHideDuration"), hideIconVariant: x("hideIconVariant"), TransitionComponent: x("TransitionComponent"), transitionDuration: x("transitionDuration"), TransitionProps: x("TransitionProps", !0), iconVariant: x("iconVariant", !0), style: x("style", !0), SnackbarProps: x("SnackbarProps", !0), className: he(e.props.className, u.className) });
|
|
494
|
+
return g.persist && (g.autoHideDuration = void 0), e.setState(function(w) {
|
|
495
|
+
if (l === void 0 && e.props.preventDuplicate || l) {
|
|
496
|
+
var v = function(P) {
|
|
497
|
+
return d ? P.id === m : P.message === c;
|
|
498
|
+
}, k = w.queue.findIndex(v) > -1, h = w.snacks.findIndex(v) > -1;
|
|
499
|
+
if (k || h) return w;
|
|
500
|
+
}
|
|
501
|
+
return e.handleDisplaySnack(T({}, w, { queue: [].concat(w.queue, [g]) }));
|
|
502
|
+
}), m;
|
|
503
|
+
}, e.handleDisplaySnack = function(n) {
|
|
504
|
+
return n.snacks.length >= e.maxSnack ? e.handleDismissOldest(n) : e.processQueue(n);
|
|
505
|
+
}, e.processQueue = function(n) {
|
|
506
|
+
var o = n.queue, i = n.snacks;
|
|
507
|
+
return o.length > 0 ? T({}, n, { snacks: [].concat(i, [o[0]]), queue: o.slice(1, o.length) }) : n;
|
|
508
|
+
}, e.handleDismissOldest = function(n) {
|
|
509
|
+
if (n.snacks.some(function(s) {
|
|
510
|
+
return !s.open || s.requestClose;
|
|
511
|
+
})) return n;
|
|
512
|
+
var o = !1, i = !1;
|
|
513
|
+
n.snacks.reduce(function(s, l) {
|
|
514
|
+
return s + (l.open && l.persist ? 1 : 0);
|
|
515
|
+
}, 0) === e.maxSnack && (i = !0);
|
|
516
|
+
var c = n.snacks.map(function(s) {
|
|
517
|
+
return o || s.persist && !i ? T({}, s) : (o = !0, s.entered ? (s.onClose && s.onClose(null, "maxsnack", s.id), e.props.onClose && e.props.onClose(null, "maxsnack", s.id), T({}, s, { open: !1 })) : T({}, s, { requestClose: !0 }));
|
|
518
|
+
});
|
|
519
|
+
return T({}, n, { snacks: c });
|
|
520
|
+
}, e.handleEnteredSnack = function(n, o, i) {
|
|
521
|
+
if (!Re(i)) throw new Error("handleEnteredSnack Cannot be called with undefined key");
|
|
522
|
+
e.setState(function(c) {
|
|
523
|
+
return { snacks: c.snacks.map(function(s) {
|
|
524
|
+
return s.id === i ? T({}, s, { entered: !0 }) : T({}, s);
|
|
525
|
+
}) };
|
|
526
|
+
});
|
|
527
|
+
}, e.handleCloseSnack = function(n, o, i) {
|
|
528
|
+
e.props.onClose && e.props.onClose(n, o, i);
|
|
529
|
+
var c = i === void 0;
|
|
530
|
+
e.setState(function(s) {
|
|
531
|
+
var l = s.snacks, u = s.queue;
|
|
532
|
+
return { snacks: l.map(function(d) {
|
|
533
|
+
return c || d.id === i ? d.entered ? T({}, d, { open: !1 }) : T({}, d, { requestClose: !0 }) : T({}, d);
|
|
534
|
+
}), queue: u.filter(function(d) {
|
|
535
|
+
return d.id !== i;
|
|
536
|
+
}) };
|
|
537
|
+
});
|
|
538
|
+
}, e.closeSnackbar = function(n) {
|
|
539
|
+
var o = e.state.snacks.find(function(i) {
|
|
540
|
+
return i.id === n;
|
|
541
|
+
});
|
|
542
|
+
Re(n) && o && o.onClose && o.onClose(null, "instructed", n), e.handleCloseSnack(null, "instructed", n);
|
|
543
|
+
}, e.handleExitedSnack = function(n, o) {
|
|
544
|
+
if (!Re(o)) throw new Error("handleExitedSnack Cannot be called with undefined key");
|
|
545
|
+
e.setState(function(i) {
|
|
546
|
+
var c = e.processQueue(T({}, i, { snacks: i.snacks.filter(function(s) {
|
|
547
|
+
return s.id !== o;
|
|
548
|
+
}) }));
|
|
549
|
+
return c.queue.length === 0 ? c : e.handleDismissOldest(c);
|
|
550
|
+
});
|
|
551
|
+
}, e.enqueueSnackbar, e.closeSnackbar, e.state = { snacks: [], queue: [], contextValue: { enqueueSnackbar: e.enqueueSnackbar.bind(Ct(e)), closeSnackbar: e.closeSnackbar.bind(Ct(e)) } }, e;
|
|
552
|
+
}
|
|
553
|
+
return Gt(a, t), a.prototype.render = function() {
|
|
554
|
+
var r = this, e = this.state.contextValue, n = this.props, o = n.domRoot, i = n.children, c = n.dense, s = c !== void 0 && c, l = n.Components, u = l === void 0 ? {} : l, d = n.classes, m = this.state.snacks.reduce(function(g, w) {
|
|
555
|
+
var v, k = mt(w.anchorOrigin), h = g[k] || [];
|
|
556
|
+
return T({}, g, ((v = {})[k] = [].concat(h, [w]), v));
|
|
557
|
+
}, {}), x = Object.keys(m).map(function(g) {
|
|
558
|
+
var w = m[g], v = w[0];
|
|
559
|
+
return S.createElement(Do, { key: g, dense: s, anchorOrigin: v.anchorOrigin, classes: d }, w.map(function(k) {
|
|
560
|
+
return S.createElement(So, { key: k.id, snack: k, classes: d, Component: u[k.variant], onClose: r.handleCloseSnack, onEnter: r.props.onEnter, onExit: r.props.onExit, onExited: Pe([r.handleExitedSnack, r.props.onExited], k.id), onEntered: Pe([r.handleEnteredSnack, r.props.onEntered], k.id) });
|
|
561
|
+
}));
|
|
562
|
+
});
|
|
563
|
+
return S.createElement(Kt.Provider, { value: e }, i, o ? Bn(x, o) : x);
|
|
564
|
+
}, Ut(a, [{ key: "maxSnack", get: function() {
|
|
565
|
+
return this.props.maxSnack || pe.maxSnack;
|
|
566
|
+
} }]), a;
|
|
567
|
+
}(jt), tn = function() {
|
|
568
|
+
return ln(Kt);
|
|
569
|
+
};
|
|
570
|
+
const re = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, nn = ne((t, a) => {
|
|
571
|
+
const { id: r, message: e, iconVariant: n, error: o, hideIconVariant: i, ...c } = t, { closeSnackbar: s } = tn(), l = un(), [u, d] = J(!1), m = X(() => {
|
|
572
|
+
d((w) => !w);
|
|
573
|
+
}, []), x = X(() => {
|
|
574
|
+
s(r);
|
|
575
|
+
}, [r, s]);
|
|
576
|
+
let g = o?.message;
|
|
577
|
+
return !g && Ht(e) && (g = e), g || typeof e != "string" || (g = e), g || (g = `Unknown Error: ${e}`), f(ht, { ref: a, className: st(re.root, "error-snackbar"), children: ae(_n, { className: re.card, style: { backgroundColor: l.palette.error.dark, border: `1px solid ${l.palette.error.dark}` }, children: [ae(Vn, { className: re.actionRoot, children: [i ? null : n?.error, f(zn, { variant: "body2", component: "div", className: re.typography, style: { color: l.palette.text.primary }, children: g }), f("div", { style: { flex: "1 1 auto" } }), ae("div", { className: re.icons, children: [o ? f(ct, { "aria-label": "Show more", size: "small", className: st(re.expand, { [re.expandOpen]: u }), style: { color: l.palette.action.active }, onClick: m, children: f(Xn, {}) }) : null, f(ct, { size: "small", className: re.expand, style: { color: l.palette.action.active }, onClick: x, children: f(Qn, { fontSize: "small" }) })] })] }), o ? f(Un, { in: u, timeout: "auto", unmountOnExit: !0, children: f("div", { className: re.stackTraceContainer, style: { backgroundColor: l.palette.error.light, borderTop: `1px solid ${l.palette.error.main}` }, children: f(dn, { error: o, hideLineNumbers: !0 }) }) }) : null] }) });
|
|
578
|
+
});
|
|
579
|
+
nn.displayName = "ToastError";
|
|
580
|
+
const on = ve(ne((t, a) => {
|
|
581
|
+
const { commands: r, commandHook: e, scope: n = "workbook", disabled: o = !1, ...i } = t, c = ee((l) => {
|
|
582
|
+
const u = { variant: pn.Menuitem, parentFloat: l.floatReference, commandHook: e, scope: n, disabled: o }, d = ae(Ft, { children: [f(Ye, { ...u, command: r.getCommand("newWorkbook"), icon: De(f(mn, {})) }), f(fn, { orientation: "horizontal" }), f(Ye, { ...u, command: r.getCommand("openWorkbook"), icon: De(f(hn, {})) }), f(bt, { ...u, commands: r, quickCommand: "saveWorkbook", icon: De(f(bn, {})), createPopupPanel: (m) => {
|
|
583
|
+
const x = { ...u, parentFloat: m.floatReference, scope: "saveWorkbook" }, g = [];
|
|
584
|
+
return me.getWriteFormats().forEach((w) => {
|
|
585
|
+
if (w.isDefault) return;
|
|
586
|
+
let v = null;
|
|
587
|
+
w.key === "CSV" ? v = De(f(gn, {})) : w.key === "Excel" && (v = De(f(kn, {})));
|
|
588
|
+
const k = r.getCommand(`saveWorkbookAs${w.key}`);
|
|
589
|
+
k ? g.push(le(Ye, { ...x, key: w.key, command: k, icon: v })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${w.key}'`);
|
|
590
|
+
}), xt({ ...m, children: g, onClick: () => {
|
|
591
|
+
m.closeFloatAll();
|
|
592
|
+
} });
|
|
593
|
+
} })] });
|
|
594
|
+
return xt({ ...l, children: d, onClick: (m) => {
|
|
595
|
+
m.isDefaultPrevented || l.closeFloatAll();
|
|
596
|
+
} });
|
|
597
|
+
}, [o, r, e, n]), s = "File";
|
|
598
|
+
return f(bt, { commands: r, disabled: o, commandHook: e, scope: n, label: s, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (l) => `calc(1.25rem + ${l.spacing(2)}px)` } }, ...i, createPopupPanel: c, icon: f(xn, { className: "label", icon: null, label: s }) });
|
|
599
|
+
}));
|
|
600
|
+
on.displayName = "StandaloneFileCommandButton";
|
|
601
|
+
const Oo = f(En, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: f(se, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: f(Cn, { onClick: () => {
|
|
602
|
+
window?.open("https://www.sheetxl.com", "_blank");
|
|
603
|
+
}, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), rn = ve(ne((t, a) => {
|
|
604
|
+
const { commands: r, workbook: e, logo: n = Oo, mainElement: o, showFileMenu: i = !0, showAppearanceMenu: c = !0, ...s } = t, { reference: l } = wn(), [u, { width: d }] = yn(), m = d < 530, x = i ? f(on, { commands: r, commandHook: { beforeExecute() {
|
|
605
|
+
l?.closeAll();
|
|
606
|
+
}, onError(k, h, P) {
|
|
607
|
+
} } }) : null, g = c ? f(Sn, { commands: r, commandHook: { beforeExecute() {
|
|
608
|
+
l?.closeAll();
|
|
609
|
+
}, onError(k, h, P) {
|
|
610
|
+
} } }) : null, w = Z(() => ({ paddingLeft: (k) => k.spacing(1), paddingRight: (k) => k.spacing(1) }), []), v = te(null);
|
|
611
|
+
return f(se, { ref: Rt([v, u, a]), ...s, children: vn({ commands: r, renderCompact: m, workbook: e, selectWrapper: (k) => ae(se, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (h) => h.spacing(1), paddingLeft: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1) }, children: [ae(se, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (h) => h.spacing(0.5) }, children: [n, ae(se, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (h) => h.spacing(0.25) }, children: [x, k] })] }), f(se, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: o }), f(se, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: m && !g ? "0 0 auto" : "1 1 100%" }, children: g })] }), selectProps: w, toolbarsProps: { Home: { sx: {} } } }) });
|
|
612
|
+
}));
|
|
613
|
+
rn.displayName = "StudioToolbar";
|
|
614
|
+
const an = ve(ne((t, a) => {
|
|
615
|
+
const { workbook: r, setWorkbook: e, refWorkbookTitle: n, titleWorkbook: o, setWorkbookTitle: i, titlePlaceHolder: c, children: s, undoManager: l, commands: u, importExportDisabled: d, themeOptions: m } = t, x = tn(), g = x ? x.enqueueSnackbar : () => {
|
|
616
|
+
}, w = x ? x.closeSnackbar : () => {
|
|
617
|
+
}, [v, k] = J({ isMounted: !1, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), h = X(() => {
|
|
618
|
+
k((j) => ({ ...j, isMounted: !0 }));
|
|
619
|
+
}, []), P = X(() => {
|
|
620
|
+
k((j) => ({ ...j, isMounted: !1 }));
|
|
621
|
+
}, []), E = Ln(), U = Mn(), z = Wn(), H = te(/* @__PURE__ */ new Set()), R = Z(() => {
|
|
622
|
+
const j = (b, L) => {
|
|
623
|
+
if (L?.onceKey) {
|
|
624
|
+
if (H.current.has(L.onceKey)) return;
|
|
625
|
+
const W = new Set(H.current);
|
|
626
|
+
W.add(L.onceKey), H.current = W;
|
|
627
|
+
}
|
|
628
|
+
const D = { variant: L?.type ?? He.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: L?.preventDuplicate, persist: L?.persist ?? L?.type === He.Error, action: (W) => f(ct, { onClick: () => w(W), children: f(Yn, {}) }) };
|
|
629
|
+
L?.enqueueProps && Object.assign(D, L.enqueueProps), b || console.log("message is 'null'", L), g(b ?? "Alert", D);
|
|
630
|
+
};
|
|
631
|
+
return { showMessage: j, showBusy: (b, L) => {
|
|
632
|
+
let D = null;
|
|
633
|
+
const W = new Promise((N) => {
|
|
634
|
+
D = N;
|
|
635
|
+
});
|
|
636
|
+
return k((N) => {
|
|
637
|
+
const A = new Map(N.starting);
|
|
638
|
+
return A.set(W, D), { ...N, label: b, starting: A };
|
|
639
|
+
}), W;
|
|
640
|
+
}, showWindow: (b, L, D) => {
|
|
641
|
+
const W = { ...L, onKeyDown: (N) => {
|
|
642
|
+
u?.dispatchToFocusedCommand(N), N.isDefaultPrevented() || N.isPropagationStopped() || L?.onKeyDown?.(N);
|
|
643
|
+
} };
|
|
644
|
+
return E(b, { sort: () => import("./CQiALmsycGGLFj1o.mjs"), numberFormat: () => import("./ClmlhDf-0RC5GFV3.mjs"), hyperlink: () => import("./Dc1PmtvbeqsIQHq6.mjs"), comments: () => import("./Ks946bL2vmd4m743.mjs"), find: () => import("./DWy4L2usallW0WdU.mjs"), tableDetails: () => import("./DgKsUQMTThBdEQds.mjs"), tableNew: () => import("./Dk00kGaRJxiitO5-.mjs"), namedDetails: () => import("./C8po4rRYJ8127Rgb.mjs") }[b], W, D);
|
|
645
|
+
}, showOptions: U, showInputOptions: z, showError: (b) => {
|
|
646
|
+
let L, D = He.Error, W = "Unknown Error";
|
|
647
|
+
typeof b == "string" ? W = b : b instanceof Error && (L = b, b.message && (W = b.message)), b instanceof $n && (D = He.Info), j(W, { type: D, enqueueProps: { error: L } });
|
|
648
|
+
} };
|
|
649
|
+
}, []), G = X(() => {
|
|
650
|
+
}, []), q = ((j) => {
|
|
651
|
+
const { workbook: b, setWorkbook: L, importExportDisabled: D, workbookTitle: W = "export", setWorkbookTitle: N, notifier: A, requestWorkbookTitle: Ee, themeOptions: M, undoManager: Ie, commands: ge, onExecute: ie } = j, ue = ee(M?.onModeChange, [M?.onModeChange]), Ze = ee(M?.onEnabledDarkGridChange, [M?.onEnabledDarkGridChange]), Xe = ee(M?.onEnabledDarkImagesChange, [M?.onEnabledDarkImagesChange]), ke = ee(async (O = null, Y = null) => {
|
|
652
|
+
const C = [];
|
|
653
|
+
let p, y = null, V = null;
|
|
654
|
+
if (typeof O == "string" ? V = O : y = O, p = y ? O : await Dn.openFileDialog(V ?? me.getAllReadFormatTypeAsString().join(",")), !p) return null;
|
|
655
|
+
const K = { source: p, createWorkbookOptions: Y, onWarning: (Qe) => {
|
|
656
|
+
C.push(Qe);
|
|
657
|
+
} }, Se = await me.read(K, A);
|
|
658
|
+
return C.length > 0 && (A?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn(`Import warnings:
|
|
659
|
+
` + C.join(`
|
|
660
|
+
`))), Se;
|
|
661
|
+
}, [ie, A, b]), Fe = ee(async (O, Y, C) => {
|
|
662
|
+
if (!Y && Ee) {
|
|
663
|
+
const p = await Ee("Enter Workbook name to " + (C.isDefault ? "Save." : `Export as ${C.description}.`));
|
|
664
|
+
return p !== null && me.writeFile(p, O, { formatType: C.key });
|
|
665
|
+
}
|
|
666
|
+
return me.writeFile(Y, O, { formatType: C.key });
|
|
667
|
+
}, [A, b, Ee]), F = X(() => ({ contains: (O) => !0, focus() {
|
|
668
|
+
} }), []), de = Z(() => {
|
|
669
|
+
const O = [];
|
|
670
|
+
D || (me.getWriteFormats().forEach((C) => {
|
|
671
|
+
const p = C.isDefault, y = { label: p ? "Save Workbook" : `Save Workbook as ${C.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${C.description}` }, tags: C.tags, description: `Save the workbook to the desktop${p ? "" : ` as ${C.description}`}.` };
|
|
672
|
+
p && (y.shortcut = { key: "S", modifiers: [Te.Ctrl] }, O.push(new $("saveWorkbookAs", F, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Te.Shift, Te.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
|
|
673
|
+
Fe(b, null, C).catch((K) => {
|
|
674
|
+
A?.showError?.(K);
|
|
675
|
+
});
|
|
676
|
+
})));
|
|
677
|
+
const V = p ? "saveWorkbook" : `saveWorkbookAs${C.key}`;
|
|
678
|
+
O.push(new $(V, F, y, (K) => {
|
|
679
|
+
Fe(b, K ?? W, C).catch((Se) => {
|
|
680
|
+
A?.showError?.(Se);
|
|
681
|
+
});
|
|
682
|
+
}));
|
|
683
|
+
}), O.push(new $("openWorkbook", F, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [Te.Ctrl] } }, async (C = null) => {
|
|
684
|
+
const p = { date1904: b.isDate1904(), ...b.options };
|
|
685
|
+
try {
|
|
686
|
+
const y = await ke(C, p);
|
|
687
|
+
if (!y) return;
|
|
688
|
+
const V = y.title, K = y.workbook, Se = K.getSelectedSheet();
|
|
689
|
+
if (y.formatType.mimeType === "text/csv") {
|
|
690
|
+
const Qe = b.findValidSheetName(V);
|
|
691
|
+
await b.doBatch(async () => {
|
|
692
|
+
const kt = Se.getUsedRange();
|
|
693
|
+
if (!kt) return void A?.showMessage("The file appears to be blank.");
|
|
694
|
+
await b.getSheets().add({ name: Qe, autoSelect: !0 }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }).copyFrom(kt);
|
|
695
|
+
}, `Import CSV '${V}'`);
|
|
696
|
+
} else b?.close(), N?.(V), L(K);
|
|
697
|
+
} catch (y) {
|
|
698
|
+
A?.showError?.(y);
|
|
699
|
+
}
|
|
700
|
+
})), O.push(new $("openWorkbookFromUrl", F, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(C) {
|
|
701
|
+
if (!C) {
|
|
702
|
+
const p = await A?.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"] });
|
|
703
|
+
if (p.option !== "Open") return;
|
|
704
|
+
C = p.input;
|
|
705
|
+
}
|
|
706
|
+
C && console.log("openWorkbookFromUrl", C);
|
|
707
|
+
})));
|
|
708
|
+
let Y = [];
|
|
709
|
+
return M && (Y = [new $("themeMode", F, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new $("defaultThemeMode", F, { 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 $("enableDarkGrid", F, { 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 $("enableDarkImages", F, { 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." })]), [...O, ...Y, new wt("help", F, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
|
|
710
|
+
}), new wt("showKeyboardShortcuts", F, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [Te.Ctrl] } }, () => {
|
|
711
|
+
}), new $("gotoUrlGithub", F, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
|
|
712
|
+
window?.open("https://github.com/sheetxl/sheetxl");
|
|
713
|
+
}), new $("gotoUrlDiscord", F, { label: "Discord", description: "Join our community on discord." }, () => {
|
|
714
|
+
window?.open("https://discord.gg/NTKdwUgK9p");
|
|
715
|
+
}), new $("gotoUrlDocumentation", F, { label: "Documentation", description: "Read the documentation." }, () => {
|
|
716
|
+
window?.open("https://www.sheetxl.com/docs");
|
|
717
|
+
}), new $("gotoUrlIssue", F, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
|
|
718
|
+
window?.open("https://github.com/sheetxl/sheetxl/issues");
|
|
719
|
+
})];
|
|
720
|
+
}, [b, W, A, D, M, ge, Ie]), _ = Z(() => {
|
|
721
|
+
let O = null;
|
|
722
|
+
return O = ge ? ge.createChildGroup(F, "standaloneWorkbook", !1) : new qt(F, "standaloneWorkbook"), O.addCommands(de, !0), O;
|
|
723
|
+
}, [ge, de]);
|
|
724
|
+
Tn({ manager: Ie, commands: _, notifier: A });
|
|
725
|
+
const { themeMode: Ce } = Bt();
|
|
726
|
+
B(() => {
|
|
727
|
+
if (!M || !_) return;
|
|
728
|
+
const O = M.mode === "dark" || !M.mode && Ce === "dark";
|
|
729
|
+
_.getCommand("themeMode").update({ state: M.mode ?? null, label: O ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: O ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
|
|
730
|
+
ue(O ? lt.Light : lt.Dark);
|
|
731
|
+
}), _.getCommand("defaultThemeMode").update({ state: !M.mode }).updateCallback(() => {
|
|
732
|
+
ue(null);
|
|
733
|
+
}), _.getCommand("enableDarkGrid").update({ state: M.enableDarkGrid }).updateCallback(() => {
|
|
734
|
+
Ze(!M.enableDarkGrid);
|
|
735
|
+
}), _.getCommand("enableDarkImages").update({ state: M.enableDarkImages }).updateCallback(() => {
|
|
736
|
+
Xe(!M.enableDarkImages);
|
|
737
|
+
});
|
|
738
|
+
}, [Ce, M, de]);
|
|
739
|
+
const { showModal: je } = On();
|
|
740
|
+
return B(() => {
|
|
741
|
+
const O = () => new Promise((Y, C) => {
|
|
742
|
+
const p = S.lazy(() => import("./CBQZHZlKIiEz186r.mjs")), y = je(p, { title: "Shortcut Keys Reference", commands: _, onDone: () => {
|
|
743
|
+
y.hide();
|
|
744
|
+
}, TransitionProps: { onExited: () => {
|
|
745
|
+
Y(!0);
|
|
746
|
+
} } });
|
|
747
|
+
});
|
|
748
|
+
_.getCommand("showKeyboardShortcuts").updateCallback(() => O()), _.getCommand("help").updateCallback(() => O());
|
|
749
|
+
}, [de, _]), _;
|
|
750
|
+
})({ workbook: r, setWorkbook: e, importExportDisabled: d, workbookTitle: o, setWorkbookTitle: i, commands: u, requestWorkbookTitle: (j) => new Promise((b) => {
|
|
751
|
+
n.current ? n.current.requestWorkbookTitle((L, D) => {
|
|
752
|
+
b(L);
|
|
753
|
+
}, { selectAll: !0, requestReason: j }) : b(c);
|
|
754
|
+
}), themeOptions: m, undoManager: l, notifier: R, onExecute: G });
|
|
755
|
+
B(() => {
|
|
756
|
+
v.starting.size <= 0 || !v.isMounted || k((j) => {
|
|
757
|
+
const b = new Map(j.running);
|
|
758
|
+
return j.starting.forEach((L, D) => {
|
|
759
|
+
const W = () => {
|
|
760
|
+
k((N) => {
|
|
761
|
+
const A = new Map(N.running);
|
|
762
|
+
return A.delete(D), { ...N, running: A };
|
|
763
|
+
});
|
|
764
|
+
};
|
|
765
|
+
b.set(D, W), L(W);
|
|
766
|
+
}), { ...j, starting: /* @__PURE__ */ new Map(), running: b };
|
|
767
|
+
});
|
|
768
|
+
}, [v]);
|
|
769
|
+
const [Q, ce] = J(null);
|
|
770
|
+
B(() => {
|
|
771
|
+
v.starting.size !== 0 || v.running.size !== 0 ? ce(f(_t, { icon: f(Pn, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: !0, label: v.label, onMount: h, onUnmount: P, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : ce(null);
|
|
772
|
+
}, [v.starting, v.running]);
|
|
773
|
+
const gt = Z(() => f(Nn, { commands: q, disableHover: !0, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [q]), I = { notifier: R, commands: q };
|
|
774
|
+
return r && (I.statusBarProps = { childrenEnd: gt }), ae(Ft, { children: [Q, s ? S.cloneElement(s, I) : null] });
|
|
775
|
+
}));
|
|
776
|
+
an.displayName = "SnackbarAndCommandsWrapper";
|
|
777
|
+
const pt = ve(ne((t, a) => {
|
|
778
|
+
const { className: r, sx: e, style: n, onElementLoad: o, onError: i, undoManager: c, errorPanel: s = An, onKeyDown: l, workbook: u, createWorkbookOptions: d, onWorkbookChange: m, logo: x, importExportDisabled: g = !1, themeOptions: w, autoFocus: v = !1, commands: k, title: h, onTitleChange: P, titleProps: E, renderLoadingPanel: U, ...z } = t, H = te(null), R = ee(m, [m]), G = ee(P ?? E?.onTitleChange, [P ?? E?.onTitleChange]), q = E?.placeHolder ?? "Untitled", Q = w?.mode, { themeMode: ce, source: gt } = Bt({ mode: Q }), I = Z(() => ({ ...w, light: yt(!1, Je.deepMerge(w?.theme ?? {}, w?.light ?? {})), dark: yt(!0, Je.deepMerge(w?.theme ?? {}, w?.dark ?? {})) }), [w]), j = ce === lt.Dark, [b, L] = J(null);
|
|
779
|
+
B(() => {
|
|
780
|
+
L(c ?? new Zn());
|
|
781
|
+
}, [c]);
|
|
782
|
+
const [D, W] = J(null), [N, A] = J(null), Ee = In();
|
|
783
|
+
it(() => {
|
|
784
|
+
if (!u || Object.keys(u).length === 0 && !Je.isPromiseLike(u)) {
|
|
785
|
+
const p = { theme: Ee.getDefaultTheme(), ...d };
|
|
786
|
+
A(new vt(p));
|
|
787
|
+
} else A(u);
|
|
788
|
+
}, [u]), it(() => {
|
|
789
|
+
if (N) {
|
|
790
|
+
if (N instanceof vt) return W({ workbook: N }), void (u !== N && R?.(N));
|
|
791
|
+
(async () => {
|
|
792
|
+
try {
|
|
793
|
+
let p, y = await Promise.resolve(N);
|
|
794
|
+
y && y.source && (y = await me.read(y)), y.workbook ? (ue(y.title), p = y.workbook) : p = y, R?.(p), W({ workbook: p });
|
|
795
|
+
} catch (p) {
|
|
796
|
+
R?.(null), W({ error: p });
|
|
797
|
+
}
|
|
798
|
+
})();
|
|
799
|
+
}
|
|
800
|
+
}, [N]);
|
|
801
|
+
const [M, Ie] = J(null);
|
|
802
|
+
B(() => {
|
|
803
|
+
if (!b || !D) return;
|
|
804
|
+
b.clear();
|
|
805
|
+
const p = D?.workbook?.getTransactions();
|
|
806
|
+
if (p)
|
|
807
|
+
return p.addListener({ onCommitEnd: (y) => {
|
|
808
|
+
y.getDescription() ? b.addUndoOperation({ description: y.getDescription(), undo: () => (p.revert(y.getId()), M.source?.focus(), () => {
|
|
809
|
+
p.restore(y.getId()), M.source?.focus();
|
|
810
|
+
}) }) : console.warn("commit has no description", y);
|
|
811
|
+
} });
|
|
812
|
+
}, [b, D, M]);
|
|
813
|
+
const ge = ee((p) => {
|
|
814
|
+
p ? b.setRepeatableOperation({ description: p.label(), repeat: async () => p.execute() }) : b.setRepeatableOperation(null);
|
|
815
|
+
}, [b]), [ie, ue] = J(h ?? E?.title ?? "");
|
|
816
|
+
B(() => {
|
|
817
|
+
ue(h ?? E?.title ?? "");
|
|
818
|
+
}, [h ?? E?.title]), B(() => {
|
|
819
|
+
G?.(ie);
|
|
820
|
+
}, [ie]);
|
|
821
|
+
const [Ze, Xe] = J(null), ke = Z(() => {
|
|
822
|
+
const p = () => ({ contains: (y) => !0, focus() {
|
|
823
|
+
} });
|
|
824
|
+
return k ? k.createChildGroup(p, "application", !1) : new qt(p, "application");
|
|
825
|
+
}, [k]), Fe = ee((p) => {
|
|
826
|
+
Xe(p.source.getViewportElement()), Ie(p), ke.activate("sheet"), o?.(p);
|
|
827
|
+
}, [ke]);
|
|
828
|
+
B(() => {
|
|
829
|
+
M && v && M.source?.focus(typeof v == "object" ? v : void 0);
|
|
830
|
+
}, [M]);
|
|
831
|
+
const F = te(null), de = X((p) => {
|
|
832
|
+
let y = null;
|
|
833
|
+
return E?.hidden || (y = f(Fn, { ...E, style: { maxWidth: "100%", ...E?.style }, workbook: H.current, ref: F, title: ie, placeHolder: q, onTitleChange: (V) => {
|
|
834
|
+
ue(V);
|
|
835
|
+
} })), f(rn, { ...p, logo: x, mainElement: y, showFileMenu: !g, showAppearanceMenu: !!(I?.onEnabledDarkGridChange || I?.onEnabledDarkImagesChange || I?.onModeChange) });
|
|
836
|
+
}, [x, ie, E, I, g, ke]);
|
|
837
|
+
B(() => {
|
|
838
|
+
const p = (y) => y.preventDefault();
|
|
839
|
+
return H.current?.addEventListener("wheel", p, { passive: !1 }), () => {
|
|
840
|
+
H.current?.removeEventListener("wheel", p);
|
|
841
|
+
};
|
|
842
|
+
}, []);
|
|
843
|
+
const _ = Z(() => {
|
|
844
|
+
const p = { transparentBackground: !0 };
|
|
845
|
+
return f(se, { sx: e, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...n }, children: U?.(p) ?? f(_t, { ...p }) });
|
|
846
|
+
}, [e, n, U]), Ce = X(({ error: p }) => (i?.(p), f(s, { sx: e, style: n, error: p ?? "Unable to display empty workbook." })), [e, n, i]), je = Z(() => ({ ...e, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-MuiContent *": { fontFamily: (p) => p.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [e]), O = Rt([H, a]), Y = Z(() => {
|
|
847
|
+
if (!D) return _;
|
|
848
|
+
if (D.error || !D.workbook) return Ce({ error: D.error });
|
|
849
|
+
let p = null, y = null, V = !1;
|
|
850
|
+
return I && (p = j ? I.dark : I.light, y = j && I.enableDarkGrid ? I.dark : I.light, V = I.enableDarkImages), f(jn, { sx: je, style: n, tabIndex: 0, autoFocus: !0, workbook: D.workbook, ref: O, renderToolbar: de, onElementLoad: Fe, onRepeatCommandChange: ge, onKeyDown: (K) => {
|
|
851
|
+
l?.(K);
|
|
852
|
+
}, renderLoadingPanel: U, gridTheme: y, headersTheme: p, enableDarkImages: V, className: st(r, "sheetxl-workbook"), onContextMenu: (K) => K.preventDefault(), ...z }, "WorkbookElement");
|
|
853
|
+
}, [D, ie, b, _, U, I, z, de, je]);
|
|
854
|
+
let C = f(eo, { fallbackRender: Ce, children: f(To, { maxSnack: 3, domRoot: Ze, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (p, y, V) => {
|
|
855
|
+
H.current?.focus();
|
|
856
|
+
}, Components: { error: nn }, iconVariant: { success: f(Gn, { 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(Rn, { style: { marginRight: "8px" } }) }, children: f(Hn, { children: f(an, { workbook: D?.workbook, setWorkbook: A, importExportDisabled: g, titlePlaceHolder: q, titleWorkbook: ie, setWorkbookTitle: ue, refWorkbookTitle: F, commands: ke, undoManager: b, themeOptions: I, children: Y }) }) }) });
|
|
857
|
+
return I && (C = ae(qn, { theme: j ? I.dark : I.light, children: [I.cssBaseline ? f(Kn, {}) : null, C] })), C;
|
|
858
|
+
}));
|
|
859
|
+
pt.displayName = "EagerStudio";
|
|
860
|
+
const jo = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: pt, default: pt }, Symbol.toStringTag, { value: "Module" }));
|
|
861
|
+
export {
|
|
862
|
+
jo as E,
|
|
863
|
+
he as c
|
|
864
|
+
};
|