@sheetxl/studio-mui 0.3.2 → 0.3.4
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/LICENSE.md +11 -11
- package/README.md +24 -24
- package/browser/cjs/B1DCwLSJMTHSgdcP.cjs +6 -0
- package/browser/cjs/{BtYvPg1MnEyGWx8E.cjs → BHC1oqfBYh7Xmx_G.cjs} +1 -1
- package/browser/cjs/{BBJ57oaa6vu0zEjI.cjs → BMUOX4KpmBu6GH8Q.cjs} +1 -1
- package/browser/cjs/BsXtNRaOhnjlXTcA.cjs +6 -0
- package/browser/cjs/{sxA11AN6vr9fiHaa.cjs → Bwk2L5ydEvoRIisp.cjs} +1 -1
- package/browser/cjs/{CEjq7KQ0zHIi69or.cjs → C0hVi0a9d9Sh_FgO.cjs} +2 -2
- package/browser/cjs/{CgaWzlL_p5dgqA4f.cjs → C0sbobSHWURMB8m0.cjs} +3 -3
- package/browser/cjs/{CsvjAXVeoKH34aZc.cjs → C1GrJth6YhBZDgvq.cjs} +2 -2
- package/browser/cjs/{BZfQo-wrdJc4xy1p.cjs → CB6TEerfGxS24WUy.cjs} +2 -2
- package/browser/cjs/CBIj9rqxh2ze9ckF.cjs +6 -0
- package/browser/cjs/CkdT8JSum0WmJ7Tn.cjs +87 -0
- package/browser/cjs/CtKfykOLBwpCtsPd.cjs +11 -0
- package/browser/cjs/D9t4mfnS94EkWCXT.cjs +6 -0
- package/browser/cjs/{BTSVJlDxWgqbdgwJ.cjs → DEa9UMmpvbiH_Dxm.cjs} +1 -1
- package/browser/cjs/{CJFKRBbjz7X-rEau.cjs → DY0yxZSYTOZvtIkB.cjs} +1 -1
- package/browser/cjs/DbczL66CNJYzHHvr.cjs +12 -0
- package/browser/cjs/{DLeOkdGvdWl5tqCl.cjs → DfPqfTiRAZ9i5RVA.cjs} +2 -2
- package/browser/cjs/{C-4fmxJxBM8ThtN5.cjs → Dpc0lG73ekHkTPOA.cjs} +2 -2
- package/browser/cjs/{ByKQeaRgOfTOn4P6.cjs → DzdnNJvBx5lkLTW-.cjs} +1 -1
- package/browser/cjs/EPoWWLrVLfRMaxvD.cjs +6 -0
- package/browser/cjs/_JBLryXFRVS5vFVX.cjs +12 -0
- package/browser/cjs/{CX6yLHEdmP8SVEfH.cjs → edAxlEEqzjJ_PaBv.cjs} +2 -2
- package/browser/cjs/{CMTXA4puzeAnzQwq.cjs → f1m-IERoDbQdUMNJ.cjs} +1 -1
- package/browser/cjs/index.cjs +3 -3
- package/browser/cjs/{vEKDv57iikwYjhOc.cjs → j8ba84pFnKx2xWvW.cjs} +2 -2
- package/browser/cjs/{DLcyf5qNRNueXSur.cjs → xRKATlLPCXjQqLyR.cjs} +1 -1
- package/browser/esm/{Bt8Hem_KC6UibnGm.mjs → B3E24eA0KrqZGcc6.mjs} +6 -6
- package/browser/esm/{ZwbkuvbehTjluIzn.mjs → B7spDz0f3MErGle0.mjs} +21 -20
- package/browser/esm/{AkfGEQyMAKNp1Ktw.mjs → BQSJPoCxw_CbM_GB.mjs} +11 -10
- package/browser/esm/{Dq2nqH2znDzDq0no.mjs → C0HMqAubZ7789bne.mjs} +1 -1
- package/browser/esm/{DoCwq6ipapKirQSJ.mjs → C72RDqmHBctKx6yu.mjs} +1 -1
- package/browser/esm/{C3dyK-h3mgD7XzKl.mjs → CSEDlIO1VyJbsJUh.mjs} +8 -8
- package/browser/esm/{_zJv_HkelROSMajR.mjs → Ca8SXunZNcPT82kM.mjs} +1 -1
- package/browser/esm/{Dvi6qc2t9c_bRvzo.mjs → Cbj_GBiwqMbV7xNp.mjs} +44 -43
- package/browser/esm/Cdr3G0s5DSG6bX6w.mjs +52 -0
- package/browser/esm/{DudPyyE63O5X5Tij.mjs → CoPf1k9QR8u7c9dJ.mjs} +10 -10
- package/browser/esm/{CRByH9Wf2wJ94di-.mjs → CyUxX9cLgslryjv5.mjs} +1 -1
- package/browser/esm/{FhyoG4Gyhb7gVRPB.mjs → D7kxhKOLn3UAkGzE.mjs} +13 -13
- package/browser/esm/{9vaTrJzQjSFA2egn.mjs → DGIZQy_4rgYfRKUt.mjs} +10 -10
- package/browser/esm/{BRPqw1D9DgPK_A6V.mjs → DJmEZGVO4DnLsMSK.mjs} +7 -7
- package/browser/esm/{TFr0V-rb-KYQeRVW.mjs → DTY6o1fHyy7Ldm2E.mjs} +1 -1
- package/browser/esm/DhuuaOVgVDtHsSft.mjs +1467 -0
- package/browser/esm/{ByYn00uYUmHj9zvS.mjs → Dig0J4i2Urjl9Z--.mjs} +171 -170
- package/browser/esm/{CdUwERsyanWuNPx8.mjs → DmqNGi-j-G64Ah3R.mjs} +2 -2
- package/browser/esm/{B-DwCBC-vYtRKiGS.mjs → DnH6tB6PvfbWK92p.mjs} +13 -13
- package/browser/esm/{D_LHNgrCc-7V6FjT.mjs → Sg5ukHMhDKaJmwC5.mjs} +65 -65
- package/browser/esm/{D645MdIazDB-hc3d.mjs → TfEcJxbuvenMTWzb.mjs} +1 -1
- package/browser/esm/{s-R04_lOf8TuzWvo.mjs → buSI99ehYQ3RDGh9.mjs} +1 -1
- package/browser/esm/index.mjs +75 -74
- package/browser/esm/{BNbDRm5P-Ha3rBv4.mjs → n91lwJODGYpl_0sb.mjs} +1 -1
- package/browser/esm/{BVDNIiq2e_loYVfc.mjs → oJzTpcQBF382AsoK.mjs} +16 -16
- package/browser/esm/tEvhefgL1pPAbBne.mjs +19828 -0
- package/licenses/dependencies.txt +203 -225
- package/node/assets/style.css +1 -1
- package/node/esm/{CI9F84m6LzoOkVfK.mjs → B794OzAyQ2S3DUvE.mjs} +2 -2
- package/node/esm/{N2xFXdAPXckWbqvN.mjs → B9eTznHjWdKEfnmd.mjs} +13 -13
- package/node/esm/{DjLSO4d4T2JddYG_.mjs → BA_RIYlnXvTDRdhy.mjs} +9 -9
- package/node/esm/{CYcFo_OeyApoGTg3.mjs → BBUuSB5DBjPGuwXm.mjs} +2 -2
- package/node/esm/{CWRpbP9nAT2yR2r6.mjs → BPAWh9TN2AA_qg8Q.mjs} +13 -12
- package/node/esm/{DYOAGczbRXmskyrr.mjs → BWxdcvg2Tp0Ysth3.mjs} +1 -1
- package/node/esm/{BX8KUYAnQx1vI-cS.mjs → BX8ZbzM8Zfe_MtDJ.mjs} +22 -22
- package/node/esm/{DuboCcThig3p0wzs.mjs → BdXN9t5_NDfrKA2E.mjs} +29 -29
- package/node/esm/CaySzQgftaLFVU-a.mjs +25 -0
- package/node/esm/{B5jFauUSFpo_iDkW.mjs → CrwtN-27La5MZ9yI.mjs} +1 -1
- package/node/esm/{BjIAi3GfBAjiRIja.mjs → Cug20O7hGugaeSka.mjs} +276 -275
- package/node/esm/{Bth10k64kFkk36Hy.mjs → CwZUEv9f0ywDMV-Z.mjs} +12 -12
- package/node/esm/{Bk7aoxfQtGp8id7D.mjs → D0fA-N8eAJVD4a_b.mjs} +1 -1
- package/node/esm/{ZVae6CkvsUOXzMKw.mjs → D1aU9ydYjq7iFVAr.mjs} +1 -1
- package/node/esm/{D95MPCm8ObgZN5_j.mjs → D2gUK2WMUbCR0-Kw.mjs} +24 -23
- package/node/esm/{B2Y6U5_PvKIFVtAh.mjs → D4HUF8JC55LqF87u.mjs} +86 -85
- package/node/esm/DOC-LvGYDU9FpsDS.mjs +553 -0
- package/node/esm/{BsSGinAqat7R8x_O.mjs → DXNmGNM6ItcTOZyo.mjs} +1 -1
- package/node/esm/{DfXVaugDnucoDGYk.mjs → DY3eG9Mfo_-xsWGD.mjs} +2 -2
- package/node/esm/{CwIlFXgoa_xv0Doi.mjs → Djc-gCpBoXNpI6yL.mjs} +2 -2
- package/node/esm/{CS138m7XyLHvzDPV.mjs → ILfHRiSFod9A2fKN.mjs} +1 -1
- package/node/esm/Sc5EyWF8aAI0xzOO.mjs +308 -0
- package/node/esm/{CradKrxfiGQucTZ3.mjs → dasEgLXLO2WWGkUm.mjs} +8 -8
- package/node/esm/index.mjs +12873 -41672
- package/package.json +8 -8
- package/browser/cjs/1C6nE8JXbR1K_yhw.cjs +0 -6
- package/browser/cjs/6denMJxSAR1JnvVP.cjs +0 -15
- package/browser/cjs/B-N31rKSrvqkcxZP.cjs +0 -6
- package/browser/cjs/BLHCySywMnqptSI9.cjs +0 -32
- package/browser/cjs/BbEnQfoP4EOJK3YQ.cjs +0 -6
- package/browser/cjs/BjaD6jFpWrhKL2dz.cjs +0 -6
- package/browser/cjs/BnaQy4xZm6MUD5Sg.cjs +0 -13
- package/browser/cjs/BszSSdQItUM3BnN1.cjs +0 -6
- package/browser/cjs/C0vPGOmkrEmgMUC8.cjs +0 -6
- package/browser/cjs/C19mJZkF3zJRRDNw.cjs +0 -11
- package/browser/cjs/C2kX273f3kTe7viA.cjs +0 -6
- package/browser/cjs/C6MOXXmZPlw53ARk.cjs +0 -6
- package/browser/cjs/CGxAeOIqbsFk97UV.cjs +0 -6
- package/browser/cjs/CLeyzaTKMMR0Hcac.cjs +0 -6
- package/browser/cjs/CM1UZZ4gfAch7cju.cjs +0 -7
- package/browser/cjs/CSiwPeW0XIEaw5qn.cjs +0 -6
- package/browser/cjs/CaH2ZbfCFFqmTqKi.cjs +0 -6
- package/browser/cjs/Cbffh394PX-rgpbL.cjs +0 -6
- package/browser/cjs/Ce6nJl_bhnr51GJ3.cjs +0 -238
- package/browser/cjs/ChVT2EzsTJjDsozn.cjs +0 -6
- package/browser/cjs/Cjs836g7b_ipAS4X.cjs +0 -6
- package/browser/cjs/CkxuzW8FWE8vKkSL.cjs +0 -6
- package/browser/cjs/Clh_-4NLLHCW3c-r.cjs +0 -6
- package/browser/cjs/CsxexX1uKSMjAryZ.cjs +0 -6
- package/browser/cjs/CwgzXfkSX0s-h_0a.cjs +0 -6
- package/browser/cjs/CxIFTPLgMN5VgKh1.cjs +0 -12
- package/browser/cjs/D0ByNhICkrbUC74Z.cjs +0 -6
- package/browser/cjs/DAnQwP6m2P_AUhZh.cjs +0 -6
- package/browser/cjs/DFIMAvLgAQfQm3Bx.cjs +0 -6
- package/browser/cjs/DI-wbtkuZm7yx_ek.cjs +0 -6
- package/browser/cjs/DUUZT0ElQBBkt4qe.cjs +0 -6
- package/browser/cjs/DfrXQdrMzJWgyX4S.cjs +0 -6
- package/browser/cjs/DkOOlgNR-NXixaQX.cjs +0 -6
- package/browser/cjs/DmZIqrySryidgnRl.cjs +0 -6
- package/browser/cjs/DscIvkrfig_mffwY.cjs +0 -6
- package/browser/cjs/Dz8coNXp80TEXSyH.cjs +0 -6
- package/browser/cjs/IaiQe7d-LGA2611T.cjs +0 -1501
- package/browser/cjs/KNduwqq-J9uyLgsC.cjs +0 -6
- package/browser/cjs/LTnky81SCDfvEiub.cjs +0 -6
- package/browser/cjs/_EleKbbhQWfp8mqy.cjs +0 -124
- package/browser/cjs/sNpLX232YHzUxZOr.cjs +0 -12
- package/browser/esm/26ozZ2-vj7N8rpiB.mjs +0 -10
- package/browser/esm/B1BxGO2lBpSxSvw1.mjs +0 -10
- package/browser/esm/B7mPpY5DOxEGMbPk.mjs +0 -3934
- package/browser/esm/B8le6PM3dfy1qSHY.mjs +0 -10
- package/browser/esm/BCIwvhxFiDXGEwES.mjs +0 -10
- package/browser/esm/BFtFjxXyhdNH6yAV.mjs +0 -10
- package/browser/esm/BMsToxhQy4cSxlz-.mjs +0 -10
- package/browser/esm/BSv1o1DpwfEAWYSy.mjs +0 -51
- package/browser/esm/Be1UWt41K_Sp7nbQ.mjs +0 -10
- package/browser/esm/Bqmme9ilyvrHA-e_.mjs +0 -1575
- package/browser/esm/BvPUue2e8_ByeP7c.mjs +0 -10
- package/browser/esm/C9uQaKOaImv5o9c3.mjs +0 -10
- package/browser/esm/CBFDGZ_aqeLV3IIt.mjs +0 -10
- package/browser/esm/CNdA2-u6_d2tqz5J.mjs +0 -10
- package/browser/esm/CV-D1e318ShLCDie.mjs +0 -10
- package/browser/esm/CXKMDzYsDLhyK3SV.mjs +0 -10
- package/browser/esm/CaFxIFV4dLSI4zDW.mjs +0 -472
- package/browser/esm/CpD505ep5Z3oX287.mjs +0 -1466
- package/browser/esm/Cz9BPykuRu_5ay57.mjs +0 -425
- package/browser/esm/D2yV2gASA--bjve5.mjs +0 -10
- package/browser/esm/D6mAWXETxAqf416J.mjs +0 -10
- package/browser/esm/DPw7ErLvgq_9jYHE.mjs +0 -24
- package/browser/esm/DRVlO95U75R3eY27.mjs +0 -10
- package/browser/esm/DWoRF-U96vWLWF5Q.mjs +0 -5582
- package/browser/esm/DX8AE4p9fLlmEdTJ.mjs +0 -10
- package/browser/esm/DYvwKUBbWi2NWsyf.mjs +0 -10
- package/browser/esm/Dxl5GgDFgUsBkg-b.mjs +0 -10
- package/browser/esm/Qq233O5gbpRAP6un.mjs +0 -29
- package/browser/esm/UC5M3Z5HmOzupzqQ.mjs +0 -21
- package/browser/esm/VchKQpT2_B7Ca113.mjs +0 -820
- package/browser/esm/_5B66awyRsaDd_Hv.mjs +0 -10
- package/browser/esm/cOX4zBcY0-H_8kAj.mjs +0 -43654
- package/browser/esm/iIqrOkF_gUf_5m0C.mjs +0 -10
- package/browser/esm/kjRF87FSQwIzB1KD.mjs +0 -12
- package/browser/esm/ob7IFBy7DLC-iS-g.mjs +0 -10
- package/node/esm/8OtdJtJIKyA4POih.mjs +0 -14
- package/node/esm/B1BxGO2lBpSxSvw1.mjs +0 -10
- package/node/esm/B7bDAwgd6OSbVJh_.mjs +0 -10
- package/node/esm/B8le6PM3dfy1qSHY.mjs +0 -10
- package/node/esm/BCIwvhxFiDXGEwES.mjs +0 -10
- package/node/esm/BFtFjxXyhdNH6yAV.mjs +0 -10
- package/node/esm/BK9EmmFbROJ0rZqB.mjs +0 -4002
- package/node/esm/BMsToxhQy4cSxlz-.mjs +0 -10
- package/node/esm/Be1UWt41K_Sp7nbQ.mjs +0 -10
- package/node/esm/BeyDW_Yk6iu1JB4v.mjs +0 -453
- package/node/esm/BpdsRwlUAUyUdrlR.mjs +0 -813
- package/node/esm/BwnMNGZmp-FGW86J.mjs +0 -13
- package/node/esm/C9uQaKOaImv5o9c3.mjs +0 -10
- package/node/esm/CBFDGZ_aqeLV3IIt.mjs +0 -10
- package/node/esm/CJiY4Wz9eiX2B9nv.mjs +0 -10
- package/node/esm/CM9lgZdHfhhL2cv-.mjs +0 -10
- package/node/esm/CNdA2-u6_d2tqz5J.mjs +0 -10
- package/node/esm/CV-D1e318ShLCDie.mjs +0 -10
- package/node/esm/CV4Y5e_kU8o_sXoX.mjs +0 -10
- package/node/esm/CXKMDzYsDLhyK3SV.mjs +0 -10
- package/node/esm/CYsd2qqC_WxLTKE1.mjs +0 -555
- package/node/esm/D5uKz7a9v8FUVx0k.mjs +0 -80
- package/node/esm/D61UbOtLixUCDQce.mjs +0 -307
- package/node/esm/DRVlO95U75R3eY27.mjs +0 -10
- package/node/esm/DYvwKUBbWi2NWsyf.mjs +0 -10
- package/node/esm/DdDxTsQsLWNqX7ee.mjs +0 -16
- package/node/esm/Do5a0pvRN3hayzdD.mjs +0 -10
- package/node/esm/_5B66awyRsaDd_Hv.mjs +0 -10
- package/node/esm/_Wieg3dqzHo6_Crg.mjs +0 -29
- package/node/esm/iIqrOkF_gUf_5m0C.mjs +0 -10
- package/node/esm/kTEpzGO5dC1M9dbV.mjs +0 -24
- package/node/esm/ob7IFBy7DLC-iS-g.mjs +0 -10
- package/node/esm/pTSFPHHLPzmAcEKW.mjs +0 -10
- package/node/esm/rF9x01iQv2EpxorW.mjs +0 -5642
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.2
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
let n = class {
|
|
8
|
-
constructor(n2) {
|
|
9
|
-
this._worker = null, this._nextId = 1, this._pendingRequests = /* @__PURE__ */ new Map(), this._workerFactory = n2;
|
|
10
|
-
}
|
|
11
|
-
start() {
|
|
12
|
-
if (typeof Worker > "u") throw new Error("Web Workers are not supported in this environment.");
|
|
13
|
-
return this._worker || (this._worker = this._workerFactory(), this._worker.onmessage = (n2) => {
|
|
14
|
-
const { id: e2, result: t2, error: r2 } = n2.data, o2 = this._pendingRequests.get(e2);
|
|
15
|
-
if (o2) if (this._pendingRequests.delete(e2), r2) {
|
|
16
|
-
const n3 = new Error(r2.message);
|
|
17
|
-
n3.stack = r2.stack, r2.cause && (n3.cause = r2.cause), o2.reject(n3);
|
|
18
|
-
} else o2.resolve(t2);
|
|
19
|
-
}, this._worker.onerror = (n2) => {
|
|
20
|
-
console.error("Worker error:", n2), this._pendingRequests.forEach((e2) => {
|
|
21
|
-
e2.reject(new Error(`Worker failed: ${n2.message}`));
|
|
22
|
-
}), this._pendingRequests.clear(), this._worker = null;
|
|
23
|
-
}), Promise.resolve();
|
|
24
|
-
}
|
|
25
|
-
execute(n2) {
|
|
26
|
-
if (!this._worker) throw new Error("Worker is not initialized. Call start() first.");
|
|
27
|
-
const e2 = this._nextId++;
|
|
28
|
-
return new Promise((t2, r2) => {
|
|
29
|
-
this._pendingRequests.set(e2, { resolve: t2, reject: r2 }), this._worker.postMessage({ id: e2, params: n2 });
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
terminate() {
|
|
33
|
-
this._worker && (this._worker.terminate(), this._worker = null);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
class e {
|
|
37
|
-
constructor(n2) {
|
|
38
|
-
this._onExecute = n2;
|
|
39
|
-
}
|
|
40
|
-
execute(n2) {
|
|
41
|
-
return this._onExecute(n2);
|
|
42
|
-
}
|
|
43
|
-
start() {
|
|
44
|
-
return Promise.resolve();
|
|
45
|
-
}
|
|
46
|
-
terminate() {
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const t = '/**\n * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.2\n *\n * (C) 2025-present SheetXL Inc. & Michael T. Ford\n * License: The license can be found at https://www.sheetxl.com/license.\n */\nconst W = { Number: "n", String: "s", Boolean: "b", Error: "e", Null: "z" };\nvar Re, ae, d;\n(ae = Re || (Re = {})).Orientation = { Column: "column", Row: "row" }, ae.Orientations = { ...ae.Orientation, Both: "both" }, ae.Direction = { Up: "up", Down: "down", Left: "left", Right: "right" }, ((e) => {\n e.Code = { Parse: 0, Null: 1, Div0: 2, Value: 3, Ref: 4, Name: 5, Num: 6, NA: 7, GettingData: 8, Spill: 9, Connect: 10, Blocked: 11, Unknown: 12, Field: 13, Calc: 14, Busy: 16, Python: 19, Timeout: 20 }, e.Label = { Parse: "#PARSE!", Null: "#NULL!", Div0: "#DIV/0!", Value: "#VALUE!", Ref: "#REF!", Name: "#NAME?", Num: "#NUM!", NA: "#N/A", GettingData: "#GETTING_DATA", Spill: "#SPILL!", Connect: "#CONNECT!", Blocked: "#BLOCKED!", Unknown: "#UNKNOWN!", Field: "#FIELD!", Calc: "#CALC!", Busy: "#BUSY!", Python: "#PYTHON!", Timeout: "#TIMEOUT!" };\n class t extends Error {\n constructor(c, m, fe, B) {\n super(fe, B), this._label = m, this._code = c, this.details = B;\n }\n static {\n this.code = e.Code.Unknown;\n }\n get isFormulaError() {\n return !0;\n }\n getLabel() {\n return this._label;\n }\n getCode() {\n return this._code;\n }\n equals(c) {\n return !!c && (this._code === c._code || this._code === c.code);\n }\n get [Symbol.toStringTag]() {\n return "[FormulaError]";\n }\n toString() {\n return this.message || this._label;\n }\n }\n e.Known = t;\n class r extends t {\n constructor(c, m) {\n super(e.Code.Parse, e.Label.Parse, c, m);\n }\n static {\n this.code = e.Code.Parse;\n }\n getDetails() {\n const c = this.details;\n return { line: c?.line ?? 1, column: c?.column ?? 1, offset: c?.offset ?? 0, length: c?.length ?? 0 };\n }\n }\n e.Parse = r;\n class n extends t {\n constructor(c, m) {\n super(e.Code.Null, e.Label.Null, c, m);\n }\n static {\n this.code = e.Code.Null;\n }\n }\n e.Null = n;\n class o extends t {\n constructor(c, m) {\n super(e.Code.Div0, e.Label.Div0, c, m);\n }\n static {\n this.code = e.Code.Div0;\n }\n }\n e.Div0 = o;\n class i extends t {\n constructor(c, m) {\n super(e.Code.Value, e.Label.Value, c, m);\n }\n static {\n this.code = e.Code.Value;\n }\n }\n e.Value = i;\n class a extends t {\n constructor(c, m) {\n super(e.Code.Ref, e.Label.Ref, c, m);\n }\n static {\n this.code = e.Code.Ref;\n }\n }\n e.Ref = a;\n class l extends t {\n constructor(c, m) {\n super(e.Code.Name, e.Label.Name, c, m);\n }\n static {\n this.code = e.Code.Name;\n }\n }\n e.Name = l;\n class u extends t {\n constructor(c, m) {\n super(e.Code.Num, e.Label.Num, c, m);\n }\n static {\n this.code = e.Code.Num;\n }\n }\n e.Num = u;\n class f extends t {\n constructor(c, m) {\n super(e.Code.NA, e.Label.NA, c, m);\n }\n static {\n this.code = e.Code.NA;\n }\n }\n e.NA = f;\n class h extends t {\n constructor(c, m) {\n super(e.Code.GettingData, e.Label.GettingData, c, m);\n }\n static {\n this.code = e.Code.GettingData;\n }\n }\n e.GettingData = h;\n class g extends t {\n constructor(c, m) {\n super(e.Code.Spill, e.Label.Spill, c, m);\n }\n static {\n this.code = e.Code.Spill;\n }\n }\n e.Spill = g;\n class p extends t {\n constructor(c, m) {\n super(e.Code.Connect, e.Label.Connect, c, m);\n }\n static {\n this.code = e.Code.Connect;\n }\n }\n e.Connect = p;\n class y extends t {\n constructor(c, m) {\n super(e.Code.Blocked, e.Label.Blocked, c, m);\n }\n static {\n this.code = e.Code.Blocked;\n }\n }\n e.Blocked = y;\n class T extends t {\n constructor(c, m) {\n super(e.Code.Unknown, e.Label.Unknown, c, m);\n }\n static {\n this.code = e.Code.Unknown;\n }\n }\n e.Unknown = T;\n class A extends t {\n constructor(c, m) {\n super(e.Code.Field, e.Label.Field, c, m);\n }\n static {\n this.code = e.Code.Field;\n }\n }\n e.Field = A;\n class D extends t {\n constructor(c, m) {\n super(e.Code.Calc, e.Label.Calc, c, m);\n }\n static {\n this.code = e.Code.Calc;\n }\n }\n e.Calc = D;\n class U extends t {\n constructor(c, m) {\n super(e.Code.Busy, e.Label.Busy, c, m);\n }\n static {\n this.code = e.Code.Busy;\n }\n }\n e.Busy = U;\n class I extends t {\n constructor(c, m) {\n super(e.Code.Python, e.Label.Python, c, m);\n }\n static {\n this.code = e.Code.Python;\n }\n }\n e.Python = I;\n class J extends t {\n constructor(c, m) {\n super(e.Code.Timeout, e.Label.Timeout, c, m);\n }\n static {\n this.code = e.Code.Timeout;\n }\n }\n e.Timeout = J;\n})(d || (d = {}));\nconst _ = {};\n_[d.Code.Parse] = d.Parse, _[d.Code.Null] = d.Null, _[d.Code.Div0] = d.Div0, _[d.Code.Value] = d.Value, _[d.Code.Ref] = d.Ref, _[d.Code.Name] = d.Name, _[d.Code.Num] = d.Num, _[d.Code.NA] = d.NA, _[d.Code.GettingData] = d.GettingData, _[d.Code.Spill] = d.Spill, _[d.Code.Connect] = d.Connect, _[d.Code.Blocked] = d.Blocked, _[d.Code.Unknown] = d.Unknown, _[d.Code.Field] = d.Field, _[d.Code.Calc] = d.Calc, _[d.Code.Busy] = d.Busy, _[d.Code.Python] = d.Python, _[d.Code.Timeout] = d.Timeout;\nconst et = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map(), tt = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Map(), ke = Object.keys(_);\nfor (let e = 0; e < ke.length; e++) {\n const t = ke[e], r = _[t];\n tt.set(d.Label[t], r), rt.set(d.Code[t], r);\n const n = new r();\n et.set(n.getLabel(), n), Te.set(n.getCode(), n);\n}\nconst Et = Te.get(d.Code.Unknown);\nvar v;\n(v = d || (d = {})).BuiltIn = { Parse: new v.Parse(), Null: new v.Null(), Div0: new v.Div0(), Value: new v.Value(), Ref: new v.Ref(), Name: new v.Name(), Num: new v.Num(), NA: new v.NA(), GettingData: new v.GettingData(), Spill: new v.Spill(), Connect: new v.Connect(), Blocked: new v.Blocked(), Unknown: new v.Unknown(), Field: new v.Field(), Calc: new v.Calc(), Busy: new v.Busy(), Python: new v.Python(), Timeout: new v.Timeout() }, v.getBuiltInByLabel = (e) => et.get(e), v.newTypedError = (e, t, r) => {\n let n;\n return n = typeof e == "string" ? tt.get(e) : rt.get(e), n || (n = v.Unknown), new n(t, r);\n}, v.getBuiltInById = (e) => Te.get(e) || Et;\n/**\n * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.2\n *\n * (C) 2025-present SheetXL Inc. & Michael T. Ford\n * License: The license can be found at https://www.sheetxl.com/license.\n */\nconst S = { html: "text/html", plain: "text/plain", png: "image/png" }, St = Object.freeze({ left: 0, top: 0 }), xt = Object.freeze({ left: 0, top: 0, bottom: 0, right: 0 }), Ct = Object.freeze({ x: 0, y: 0, width: 0, height: 0 });\nObject.freeze(Object.defineProperty({ __proto__: null, EmptyBounds: Ct, EmptyRect: xt, EmptyTopLeft: St }, Symbol.toStringTag, { value: "Module" }));\nconst j = { Column: "column", Row: "row" }, vt = Object.freeze({ colIndex: 0, rowIndex: 0 }), Tt = Object.freeze({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }), nt = (e, t) => e.colStart === t.colStart ? e.rowStart - t.rowStart : e.colStart - t.colStart, ot = (e, t) => e.rowStart === t.rowStart ? e.colStart - t.colStart : e.rowStart - t.rowStart, _t = (e, t) => e.rowEnd === t.rowEnd ? t.colEnd - e.colEnd : t.rowEnd - e.rowEnd, Ot = (e, t) => e.colEnd === t.colEnd ? t.rowEnd - e.rowEnd : t.colEnd - e.colEnd, Le = (e, t) => e.colIndex === t.colIndex ? e.rowIndex - t.rowIndex : e.colIndex - t.colIndex, Ae = (e, t) => e.rowIndex === t.rowIndex ? e.colIndex - t.colIndex : e.rowIndex - t.rowIndex, it = (e = j.Row, t = !1) => t ? e !== j.Column ? _t : Ot : e !== j.Column ? ot : nt, Me = (e, t) => e === t || !(!e || !t) && e.rowIndex === t.rowIndex && e.colIndex === t.colIndex, Se = (e, t) => e === t || !(!e || !t) && e.rowStart === t.rowStart && e.rowEnd === t.rowEnd && e.colStart === t.colStart && e.colEnd === t.colEnd, xe = (e, t) => !(!e || !t) && !(e.colStart > t.colEnd || t.colStart > e.colEnd) && !(e.rowStart > t.rowEnd || t.rowStart > e.rowEnd), je = (e, t) => {\n if (e === t) return !0;\n if (!e || !t || e.length !== t.length) return !1;\n for (let r = 0; r < e.length; r++) if (!Se(e[r], t[r])) return !1;\n return !0;\n}, he = (e, t, r) => {\n if (!e && !t) return null;\n if (!e) return r ? t : { ...t };\n if (!t) return r ? e : { ...e };\n const n = Math.min(e.colStart, t.colStart), o = Math.min(e.rowStart, t.rowStart), i = Math.max(e.colEnd, t.colEnd), a = Math.max(e.rowEnd, t.rowEnd);\n let l = r;\n return l ? (l.colStart = n, l.rowStart = o, l.colEnd = i, l.rowEnd = a) : l = { colStart: n, rowStart: o, colEnd: i, rowEnd: a }, l;\n}, Pe = (e, t) => {\n if (!t || t.length === 0) return e;\n const r = { ...e };\n for (let n = 0; n < t.length; n++) {\n const o = t[n];\n xe(r, o) && (r.rowStart = Math.min(r.rowStart, o.rowStart), r.colStart = Math.min(r.colStart, o.colStart), r.rowEnd = Math.max(r.rowEnd, o.rowEnd), r.colEnd = Math.max(r.colEnd, o.colEnd));\n }\n return r;\n}, It = [null, null], Nt = (e, t, r) => {\n if (e[0].value === e[1].value) return t;\n};\nfunction Fe(e, t = 2, r, n = j.Row, o) {\n let i = [...e];\n if (t <= 0 || e.length <= 1) return i;\n let a = n === j.Column, l = 0, u = !1;\n do {\n const f = i.sort(it(a ? j.Row : j.Column));\n i = [], i.push(f[0]);\n const h = f.length;\n let g = 0, p = f[0], y = p.colStart, T = p.rowStart, A = p.colEnd, D = p.rowEnd;\n for (let U = 1; U < h; U++) {\n const I = f[U];\n let J = !1;\n if (J = a ? p && T === I.rowStart && D === I.rowEnd && A + 1 === I.colStart : p && y === I.colStart && A === I.colEnd && D + 1 === I.rowStart, J) {\n let E = { colStart: y, rowStart: T, colEnd: a ? I.colEnd : A, rowEnd: a ? D : I.rowEnd };\n if (p.value !== void 0 && (E.value = p.value), r) {\n const c = o ?? [null, null];\n c[0] = p, c[1] = I, E = r(c, E, n);\n }\n if (E) {\n i[g] = E, u = !0, p = E, y = p.colStart, T = p.rowStart, A = p.colEnd, D = p.rowEnd;\n continue;\n }\n }\n i[++g] = I, p = I, y = p.colStart, T = p.rowStart, A = p.colEnd, D = p.rowEnd;\n }\n l++, a = !a, l === 1 && (u = !0);\n } while (l < t && u && i.length > 1);\n return i;\n}\nObject.freeze(Object.defineProperty({ __proto__: null, EmptyCell: vt, EmptyRange: Tt, cellToRange: (e, t) => {\n if (!e) return null;\n let r = t;\n return r || (r = { ...e }, delete r.colIndex, delete r.rowIndex), r.colStart = e.colIndex ?? 0, r.rowStart = e.rowIndex ?? 0, r.colEnd = e.colIndex ?? 0, r.rowEnd = e.rowIndex ?? 0, r;\n}, columnFirstCellComparator: Le, columnFirstRangeComparator: nt, createCellComparator: (e = j.Row, t = !1) => t ? e !== j.Column ? (r, n) => r.rowIndex === n.rowIndex ? n.colIndex - r.colIndex : n.rowIndex - r.rowIndex : (r, n) => r.colIndex === n.colIndex ? n.rowIndex - r.rowIndex : n.colIndex - r.colIndex : e !== j.Column ? Ae : Le, createConflatingRanges: (e, t = !1) => {\n const r = [];\n let n, o, i = Number.MIN_SAFE_INTEGER, a = Number.MIN_SAFE_INTEGER;\n return { append: (l, u, f) => {\n let h = !0;\n const g = f !== void 0;\n if (g) {\n const T = e ? e(o, f, t) : o === f ? f : void 0;\n T === void 0 ? h = !1 : f = T;\n }\n if (h && u === a + 1 && l === i) return t ? n.rowEnd = u : n.colEnd = u, a = u, void (o = f);\n n && r.push(n);\n const p = t ? l : u, y = t ? u : l;\n n = { colStart: p, rowStart: y, colEnd: p, rowEnd: y }, g && (n.value = f), i = l, a = u, o = f;\n }, done: (l) => (n && (r.push(n), n = null), l ? Fe(r, 3, l === !0 ? Nt : l, t ? j.Column : j.Row, It) : r) };\n}, createRangeComparator: it, defaultRange: (e, t, r) => e ? r ? (r.colStart = e.colStart ?? t.colStart, r.rowStart = e.rowStart ?? t.rowStart, r.colEnd = e.colEnd ?? t.colEnd, r.rowEnd = e.rowEnd ?? t.rowEnd, r) : { colStart: e.colStart ?? t.colStart, rowStart: e.rowStart ?? t.rowStart, colEnd: e.colEnd ?? t.colEnd, rowEnd: e.rowEnd ?? t.rowEnd } : t, extendRangeToIntersectingRanges: Pe, extendRangeToUnionRanges: (e, t) => {\n if (!t || t.length === 0) return e;\n let r = e, n = null;\n for (; !Se(r, n); ) n = r, r = Pe(n, t);\n return r;\n}, indexOfCoords: (e, t) => {\n const r = { colStart: e.colIndex, rowStart: e.rowIndex, colEnd: e.colIndex, rowEnd: e.rowIndex };\n for (let n = t.length - 1; n >= 0; n--) if (xe(r, t[n])) return n;\n return -1;\n}, intersectRanges: (e, t, r) => {\n if (!e) return r ? t : { ...t };\n if (!t) return r ? e : { ...e };\n if (!e && !t || e.rowStart > t.rowEnd || e.rowEnd < t.rowStart || e.colStart > t.colEnd || e.colEnd < t.colStart) return null;\n const n = Math.max(e.colStart, t.colStart), o = Math.max(e.rowStart, t.rowStart), i = Math.min(e.colEnd, t.colEnd), a = Math.min(e.rowEnd, t.rowEnd);\n let l = r;\n return l ? (l.colStart = n, l.rowStart = o, l.colEnd = i, l.rowEnd = a) : l = { colStart: n, rowStart: o, colEnd: i, rowEnd: a }, l;\n}, isCellWithinRange: (e, t) => !(!e || !t) && !(e.rowIndex < t.rowStart || e.rowIndex > t.rowEnd) && !(e.colIndex < t.colStart || e.colIndex > t.colEnd), isEqualCells: Me, isEqualRanges: Se, isEqualRangesArrays: je, isEqualSelectionCoords: (e, t) => e === t || !(!e || !t) && e.rangeIndex === t.rangeIndex && !!Me(e.cell, t.cell) && je(e.ranges, t.ranges), isRangeWithinRange: (e, t) => !(e.rowStart < t.rowStart || e.rowEnd > t.rowEnd) && !(e.colStart < t.colStart || e.colEnd > t.colEnd), isRangesIntersect: xe, isSingleCell: (e) => !!e && e.rowEnd === e.rowStart && e.colStart === e.colEnd, isValidRange: (e) => !!e && !(typeof e.colStart != "number" || e.colStart < 0) && !(typeof e.colEnd != "number" || e.colEnd < e.colStart) && !(typeof e.rowStart != "number" || e.rowStart < 0) && !(typeof e.rowEnd != "number" || e.rowEnd < e.rowStart), mergeRangedValues: Fe, rowFirstCellComparator: Ae, rowFirstRangeComparator: ot, sanitizeRange: (e) => e ? { colStart: e.colIndex ?? e.colStart ?? 0, rowStart: e.rowIndex ?? e.rowStart ?? 0, colEnd: e.colIndex ?? e.colEnd ?? 0, rowEnd: e.rowIndex ?? e.rowEnd ?? 0 } : null, translateRange: (e, t = -e.rowStart, r = -e.colStart, n) => n ? (n.colStart = e.colStart + r, n.rowStart = e.rowStart + t, n.colEnd = e.colEnd + r, n.rowEnd = e.rowEnd + t, n) : { colStart: e.colStart + r, rowStart: e.rowStart + t, colEnd: e.colEnd + r, rowEnd: e.rowEnd + t }, unionRanges: he, unionRangesArrays: (e, t, r) => {\n if (!e || e.length === 0) return null;\n if (e.length === 1 && !t) return e[0];\n let n = e[0];\n for (let o = 1; o < e.length; o++) n = he(n, e[o], r);\n return t && (n = he(n, t, r)), n;\n} }, Symbol.toStringTag, { value: "Module" }));\nfunction Rt(e) {\n const t = Object.prototype.toString.call(e);\n return t === "[object RegExp]" || t === "[object Date]" || function(r) {\n return r.$$typeof === kt;\n }(e);\n}\nconst kt = typeof Symbol == "function" && Symbol.for ? Symbol.for("react.element") : 60103;\nfunction Lt(e) {\n return /* @__PURE__ */ function(t) {\n return !!t && typeof t == "object";\n }(e) && !Rt(e);\n}\nfunction ne(e, t) {\n return t.clone !== !1 && t.isMergeableObject(e) ? Y((r = e, Array.isArray(r) ? [] : {}), e, t) : e;\n var r;\n}\nfunction At(e, t, r) {\n return e.concat(t).map(function(n) {\n return ne(n, r);\n });\n}\nfunction De(e) {\n return Object.keys(e).concat(function(t) {\n return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {\n return Object.propertyIsEnumerable.call(t, r);\n }) : [];\n }(e));\n}\nfunction Ue(e, t) {\n try {\n return t in e;\n } catch {\n return !1;\n }\n}\nfunction Mt(e, t, r) {\n const n = {};\n return r.isMergeableObject(e) && De(e).forEach(function(o) {\n n[o] = ne(e[o], r);\n }), De(t).forEach(function(o) {\n (function(i, a) {\n return Ue(i, a) && !(Object.hasOwnProperty.call(i, a) && Object.propertyIsEnumerable.call(i, a));\n })(e, o) || (Ue(e, o) && r.isMergeableObject(t[o]) ? n[o] = function(i, a) {\n if (!a.customMerge) return Y;\n const l = a.customMerge(i);\n return typeof l == "function" ? l : Y;\n }(o, r)(e[o], t[o], r) : n[o] = ne(t[o], r));\n }), n;\n}\nfunction Y(e, t, r) {\n (r = r || {}).arrayMerge = r.arrayMerge || At, r.isMergeableObject = r.isMergeableObject || Lt, r.cloneUnlessOtherwiseSpecified = ne;\n const n = Array.isArray(t);\n return n === Array.isArray(e) ? n ? r.arrayMerge(e, t, r) : Mt(e, t, r) : ne(t, r);\n}\nY.all = function(e, t) {\n if (!Array.isArray(e)) throw new Error("first argument should be an array");\n return e.reduce(function(r, n) {\n return Y(r, n, t);\n }, {});\n};\nconst jt = Object.freeze([]), Pt = Object.freeze({}), Be = (e) => e, de = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {\n let t = 16 * Math.random() | 0;\n return (e === "x" ? t : 3 & t | 8).toString(16);\n}), Ft = (e) => 1 * e, at = (e, t) => e === t || !(!Array.isArray(e) || !Array.isArray(t) || e.length !== t.length) && e.every((r, n) => r === t[n]), re = (e) => typeof e == "object" && !Array.isArray(e) && e !== null, lt = (e) => typeof e != "object" || Array.isArray(e) || e === null ? e : (Object.keys(e).forEach(function(t) {\n e[t] && typeof e[t] == "object" ? lt(e[t]) : e[t] !== null && e[t] !== void 0 || delete e[t], typeof e[t] == "object" && Object.keys(e[t]).length === 0 && delete e[t];\n}), Object.keys(e).length === 0 ? null : e), Dt = (e, t) => !(e !== t && !at(e, t)) || !!e.isEqual?.(t), st = (e, t, r = Dt) => {\n if (e == null || e === t) return null;\n if (!e || typeof e != "object" || Array.isArray(e) || e.isImmutable?.()) return r(e, t) ? null : e;\n const n = Object.keys(e);\n if (n.length === 0) return null;\n let o = !1;\n for (let i = 0; i < n.length; i++) {\n const a = n[i];\n st(e[a], t?.[a], r) === null && (o = !0, delete e[a]);\n }\n return o && Object.keys(e).length === 0 ? null : void 0;\n}, $e = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now(), ze = (e) => e == null, Ke = (e, t) => !(t.left > e.right || t.right < e.left || t.top > e.bottom || t.bottom < e.top), Ve = !(typeof window > "u" || !window.document || !window.document.createElement), k = { Windows: "windows", MacOS: "macos", IOS: "ios", Linux: "linux", Android: "android", Safari: "safari", Firefox: "firefox", Node: "node", Unknown: "unknown" }, oe = () => {\n if (ct()) return k.Node;\n const e = globalThis.navigator !== void 0 && globalThis.navigator.userAgent ? globalThis.navigator.userAgent.toLowerCase() : "";\n return e ? /(win32|win64|windows|wince)/i.test(e) ? k.Windows : /(macintosh|macintel|macppc|mac68k|macos)/i.test(e) ? k.MacOS : /(iphone|ipad|ipod)/i.test(e) ? k.IOS : /android/.test(e) ? k.Android : /linux/.test(e) ? k.Linux : /^((?!chrome|android|).)*safari/i.test(e) ? k.Safari : /^((?!chrome|android|Seamonkey).)*firefox/i.test(e) ? k.Firefox : k.Unknown : k.Unknown;\n};\nfunction ct() {\n return typeof process < "u" && process.release?.name === "node" || (typeof process < "u" && process.browser, !1);\n}\nconst qe = (e, t = !1) => (document.hasFocus() || t) && (e === document.activeElement || e?.contains(document.activeElement)), Ut = Object.freeze(Object.defineProperty({ __proto__: null, EmptyArray: jt, EmptyObject: Pt, OSType: k, arrayMove: function(e, t, r) {\n const n = e.slice();\n return n.splice(r < 0 ? n.length + r : r, 0, n.splice(t, 1)[0]), n;\n}, asNumber: (e) => {\n const t = Ft(e);\n return Number.isFinite(t) ? t : 0;\n}, camelToPrettyCase: (e) => e.length === 1 ? e.toUpperCase() : e.replace(/([A-Z])/g, " $1").replace(/^./, function(t) {\n return t.toUpperCase();\n}).trim(), canUseDOM: Ve, cancelTimeout: (e) => {\n cancelAnimationFrame(e.id);\n}, castToString: (e) => e == null || e === void 0 ? "" : typeof e != "string" ? "" + e : e, cloneObject: (e) => ze(e) ? e : JSON.parse(JSON.stringify(e)), consoleWithNoSource: (...e) => new Promise((t) => {\n setTimeout(() => {\n Function("console.log.apply(console, arguments)").apply(null, e), t();\n });\n}), debounce: function(e, t = 300, r = !1) {\n let n, o, i, a, l = 0;\n function u() {\n let h = Date.now() - l;\n h < t && h >= 0 ? n = setTimeout(u, t - h) : (n = null, r || (a = e.apply(i, o), i = o = null));\n }\n t == null && (t = 100);\n const f = function() {\n i = globalThis, o = arguments, l = Date.now();\n var h = r && !n;\n return n || (n = setTimeout(u, t)), h && (a = e.apply(i, o), i = o = null), a;\n };\n return f.clear = function() {\n n && (clearTimeout(n), n = null);\n }, f.flush = function() {\n n && (a = e.apply(i, o), i = o = null, clearTimeout(n), n = null);\n }, f;\n}, deepEqual: function e(t, r) {\n if (t === r) return !0;\n if (t && r && typeof t == "object" && typeof r == "object") {\n if (t.constructor !== r.constructor) return !1;\n let n, o, i;\n if (Array.isArray(t)) {\n if (n = t.length, n != r.length) return !1;\n for (o = n; o-- !== 0; ) if (!e(t[o], r[o])) return !1;\n return !0;\n }\n if (t instanceof Map && r instanceof Map) {\n if (t.size !== r.size) return !1;\n for (o of t.entries()) if (!r.has(o[0])) return !1;\n for (o of t.entries()) if (!e(o[1], r.get(o[0]))) return !1;\n return !0;\n }\n if (t instanceof Set && r instanceof Set) {\n if (t.size !== r.size) return !1;\n for (o of t.entries()) if (!r.has(o[0])) return !1;\n return !0;\n }\n if (ArrayBuffer.isView(t) && ArrayBuffer.isView(r)) {\n if (n = t.length, n != r.length) return !1;\n for (o = n; o-- !== 0; ) if (t[o] !== r[o]) return !1;\n return !0;\n }\n if (t.constructor === RegExp) return t.source === r.source && t.flags === r.flags;\n if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === r.valueOf();\n if (t.toString !== Object.prototype.toString) return t.toString() === r.toString();\n if (i = Object.keys(t), n = i.length, n !== Object.keys(r).length) return !1;\n for (o = n; o-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(r, i[o])) return !1;\n for (o = n; o-- !== 0; ) {\n let a = i[o];\n if ((a !== "_owner" || !t.$$typeof) && !e(t[a], r[a])) return !1;\n }\n return !0;\n }\n return t != t && r != r;\n}, deepFreeze: function e(t) {\n return Object.freeze(t), Object.keys(t).forEach((r) => {\n typeof t[r] != "object" || t[r] === null || Object.isFrozen(t[r]) || e(t[r]);\n }), t;\n}, deepMerge: Y, diffValues: (e, t) => {\n const r = {}, n = Object.keys(t), o = n.length;\n for (let i = 0; i < o; i++) {\n const a = n[i];\n e[a] !== t[a] && (e[a] === void 0 ? r[a] = t[a] : r[a] = e[a]);\n }\n return Object.keys(r).length === 0 ? null : r;\n}, findEqualOrGreater: function(e, t, r = Be) {\n let n = 0, o = e.length - 1;\n for (; n <= o; ) {\n let i = Math.floor((n + o) / 2), a = r(e[i]);\n if (a === t) return i;\n a < t ? n = i + 1 : o = i - 1;\n }\n return n;\n}, findEqualOrLesser: function(e, t, r = Be) {\n let n = e.length - 1, o = 0;\n for (; n >= o; ) {\n let i = Math.floor((n + o) / 2), a = r(e[i]);\n if (a === t) return i;\n a > t ? n = i - 1 : o = i + 1;\n }\n return n;\n}, findNextStep: (e, t = !0, r = 15, n = 10, o = 400) => {\n const i = Math.max(e - n, 0) + (t ? 1 : -1);\n return Math.min(o, Math[t ? "ceil" : "floor"](i / r) * r + n);\n}, getDPI: () => {\n let e = 1;\n return typeof window == "object" && (e = window.devicePixelRatio || 1), e;\n}, getFromPath: (e, t) => {\n const r = t.split(".");\n let n = e;\n for (let o = 0; o < r.length; o++) {\n const i = r[o];\n if (!n) return null;\n let a = n[i];\n if (typeof a == "function" && (a = a.bind(n)()), !a || !re(a)) return a;\n n = a;\n }\n return n ?? null;\n}, getOS: oe, hasFocus: qe, isDefined: (e) => e != null, isEmpty: (e) => e == null || e === "", isEqualArrays: at, isEqualBounds: (e, t) => e === t || !(e && !t || t && !e) && e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height, isEqualObjectKeys: (e, t) => {\n if (e === t) return !0;\n if (e && !t || t && !e) return !1;\n const r = Object.keys(e);\n if (r.length !== Object.keys(t).length) return !1;\n for (let n = 0; n < r.length; n++) if (e[r[n]] !== t[r[n]]) return !1;\n return !0;\n}, isNode: ct, isNullOrUndefined: ze, isNumeric: (e) => {\n const t = 1 * e;\n return Number.isFinite(t) && typeof t == "number";\n}, isObject: re, isPromiseLike: (e) => !!e && typeof e.then == "function", isRectInsideRect: (e, t) => e.top >= t.top && e.bottom <= t.bottom && e.left >= t.left && e.right <= t.right, isRectIntersect: Ke, mergeContentful: (...e) => {\n const t = e.length;\n if (t > 0 && e[t - 1] !== void 0 && !re(e[t - 1])) return e[t - 1];\n let r = e[0] || {};\n for (let n = 1; n < t; n++) r = Y(r, e[n] || {}, { arrayMerge: (o, i) => [...i] });\n return r;\n}, nextTick: (e) => {\n typeof window < "u" && typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame(() => {\n e();\n }) : (typeof setImmediate == "function" ? setImmediate : setTimeout)(() => {\n e();\n });\n}, openFileDialog: (e = "*.*") => new Promise((t, r) => {\n if (!Ve) return void r("Unable to open dialog with no dom.");\n const n = document.createElement("input");\n n.type = "file", n.accept = e;\n let o = null, i = !1;\n globalThis.addEventListener?.("focus", () => {\n setTimeout(() => {\n o || i || (i = !0, t(null));\n }, 1e3);\n }, { once: !0, passive: !0 }), n.onchange = () => {\n if (o = n.files[0], o) {\n if (i) return void console.warn("File open detected after faux cancel.", o);\n t(o);\n }\n }, n.autofocus = !0, n.click();\n}), rafThrottle: (e) => {\n let t, r = !1, n = function() {\n r = !1, e(t);\n };\n return function(o) {\n t = o, t && t.persist && t.persist(), r || (r = !0, requestAnimationFrame(n));\n };\n}, removeEmptyProperties: lt, removeEqualValues: st, removeListenerAll: (e) => {\n if (!e) return [];\n for (let t = 0; t < e.length; t++) e[t] && e[t]();\n return [];\n}, requestTimeout: (e, t) => {\n const r = $e(), n = { id: requestAnimationFrame(function o() {\n $e() - r >= t ? e.call(null) : n.id = requestAnimationFrame(o);\n }) };\n return n;\n}, roundAccurately: (e, t = 0) => {\n if (e == null || !isFinite(e)) return null;\n const r = 10 ** t;\n return Number(Math.round(e * r) / r);\n}, setToPath: (e, t, r) => {\n const n = t.split(".");\n let o = e;\n if (!o) throw new Error("Can not set path to a null path.");\n for (let i = 0; o && i < n.length - 1; i++) {\n const a = n[i];\n let l = o[a];\n if (l == null && (l = {}, o[a] = l), !re(l)) throw new Error("Can not set path to a non object path.");\n o = l;\n }\n if (typeof r != "number" && typeof r != "boolean" && typeof r != "string" && !re(r)) throw new Error(`Can not set path to ${r} that is not a a supported primitive.`);\n return o[n[n.length - 1]] = r, e;\n}, splitNumber: (e) => {\n let t = Math.abs(e);\n if (isNaN(t) || !isFinite(e)) return null;\n let r = 0 | t, n = t - r, o = 0, i = 0, a = 1;\n if (n > 5e-8) for (; i < 8 && Math.abs(o / a - n) > 5e-8; ) i++, a *= 10, o = Math.round(n * a);\n return { ip: Math.trunc(e), fp: o, ipLength: Math.ceil(Math.log10(r + 1)), fpLength: i };\n}, subtractRect: (e, t, r = !1) => {\n if (!t) return [e];\n if (!Ke(e, t)) return [];\n const n = [];\n let o = e;\n const i = () => {\n t.top > o.top && t.top < o.bottom && (n.push({ ...o, bottom: t.top }), o = { ...o, top: t.top });\n }, a = () => {\n t.bottom > o.top && t.bottom < o.bottom && (n.push({ ...o, top: t.bottom }), o = { ...o, bottom: t.bottom });\n }, l = () => {\n t.right > o.left && t.right < o.right && (n.push({ ...o, left: t.right }), o = { ...o, right: t.right });\n }, u = () => {\n t.left > o.left && t.left < o.right && (n.push({ ...o, right: t.left }), o = { ...o, left: t.left });\n };\n return r ? (u(), l(), i(), a()) : (i(), a(), l(), u()), n;\n}, textToKey: (e) => e.replace(/[^a-zA-Z0-9]/g, "").toLowerCase(), throttle: function(e, t) {\n let r = null;\n return (...n) => {\n const o = Date.now();\n (!r || o - r >= t) && (r = o, e(...n));\n };\n}, toSafeJSON: function e(t) {\n if (t === null || typeof t != "object") return t;\n if (typeof t.toJSON == "function") return t.toJSON();\n if (Array.isArray(t)) return t.map((n) => e(n));\n if (typeof t.toString == "function" && t.toString !== Object.prototype.toString) return t.toString();\n const r = {};\n for (const n in t) t.hasOwnProperty(n) && (r[n] = e(t[n]));\n return r;\n}, transpose: (e) => {\n if (!e) return e;\n const t = e.length, r = e[0].length, n = [];\n for (let o = 0; o < r; o++) n[o] = Array(t);\n for (let o = 0; o < t; o++) for (let i = 0; i < r; i++) n[i][o] = e[o][i];\n return n;\n}, uuidV4: de, validEnumValue: (e, t) => {\n if (!Object.values(e).includes(t)) throw new Error(`Invalid type: ${t ?? "null"}. Must be one of: ${Object.values(t).join(", ")}.`);\n}, whenFocus: async (e, t = !1) => new Promise((r) => {\n qe(e, t) ? r(!0) : e.addEventListener("focusin", () => {\n r(!0);\n }, { once: !0 }), e.focus();\n}) }, Symbol.toStringTag, { value: "Module" }));\nObject.freeze(Object.defineProperty({ __proto__: null, MESSAGE_ERROR_INVALID_ARG: (e) => `Invalid argument: \'${e}\'.` }, Symbol.toStringTag, { value: "Module" }));\nconst ut = (e) => {\n const t = new Uint8Array(e), r = t.byteLength;\n let n = "";\n for (let o = 0; o < r; o++) n += String.fromCharCode(t[o]);\n if (typeof window < "u" && typeof globalThis.btoa == "function") return globalThis.btoa(n);\n if (typeof Buffer < "u") return Buffer.from(n, "binary").toString("base64");\n throw new Error("Unsupported environment");\n}, Ce = (e) => new Promise((t, r) => {\n if (e) if (typeof FileReader < "u") {\n const n = new FileReader();\n n.onload = () => {\n t(n.result);\n }, n.onerror = () => {\n r(n.error);\n }, n.readAsText(e);\n } else if (typeof Buffer < "u") {\n const n = (o) => Buffer.from(o).toString("utf-8");\n e.arrayBuffer().then((o) => {\n t(n(o));\n }).catch((o) => {\n r(o);\n });\n } else r(new Error("Unsupported environment"));\n else t("");\n});\nObject.freeze(Object.defineProperty({ __proto__: null, DEFAULT_MIME_TYPE: "*/*", arrayBufferToBase64: ut, base64ToArrayBuffer: (e) => {\n const t = typeof window < "u" && typeof globalThis.atob == "function" ? globalThis.atob(e) : Buffer.from(e, "base64").toString("binary"), r = t.length, n = new Uint8Array(r);\n for (let o = 0; o < r; o++) n[o] = t.charCodeAt(o);\n return n.buffer;\n}, blobToString: Ce }, Symbol.toStringTag, { value: "Module" }));\nconst dt = "data:image/png;base64,", ft = "Unable to resolve image.", Ge = (e) => new Promise(async (t, r) => {\n let n = null;\n try {\n n = new Image(), n.src = e, n.addEventListener("load", function() {\n t({ width: n.naturalWidth, height: n.naturalHeight });\n }, { once: !0 }), n.addEventListener("error", function() {\n URL.revokeObjectURL(e), r("Invalid Image");\n }, { once: !0 }), await n.decode("sync");\n } catch {\n n?.src && URL.revokeObjectURL(n.src);\n }\n n || r(ft);\n}), we = "image/svg+xml";\nObject.freeze(Object.defineProperty({ __proto__: null, DATA_URL_PNG_PREFIX: dt, getImageDataUrl: (e, t = 1) => new Promise(async (r, n) => {\n let o = null;\n try {\n o = new Image(), o.src = e, o.addEventListener("load", function() {\n try {\n const i = document.createElement("canvas");\n i.width = o.naturalWidth, i.height = o.naturalHeight, i.getContext("2d").drawImage(o, 0, 0);\n const a = i.toDataURL("image/png", t);\n r({ elemImg: o, dataUrl: a });\n } catch (i) {\n URL.revokeObjectURL(e), n(i);\n }\n }, { once: !0 }), o.addEventListener("error", function() {\n URL.revokeObjectURL(e), n("Invalid Image");\n }, { once: !0 }), await o.decode("sync");\n } catch {\n o?.src && URL.revokeObjectURL(o.src);\n }\n o || n(ft);\n}), loadImageDetails: async (e, t = null) => {\n let r = null;\n const n = async () => {\n try {\n const i = t ?? "image/*", a = URL.createObjectURL(new Blob([e], { type: i })), l = await Ge(a);\n r = { mimeType: i, naturalDimensions: l, asUrl: a };\n } catch {\n }\n }, o = async () => {\n try {\n const i = new TextDecoder().decode(e), a = URL.createObjectURL(new Blob([i], { type: we })), l = await Ge(a);\n r = { mimeType: t ?? we, naturalDimensions: l, asUrl: a, asSVGText: i };\n } catch {\n }\n };\n if (t === we ? await o() : t.startsWith("image/") ? await n() : (await n(), r || await o()), !r) throw new Error("Failed to load image");\n return r;\n} }, Symbol.toStringTag, { value: "Module" }));\nvar We, Ye;\n(Ye = We || (We = {})).resolveTypedUpdates = (e, t, r, n) => {\n if (e === null) return e;\n if (e === void 0) return n;\n let o = e;\n if (t?.shorthand) {\n const u = t?.shorthand(e, r);\n u !== void 0 && (o = u);\n }\n if (o !== null && t?.getSubType) {\n const u = t.getSubType(o);\n u && (t = u);\n }\n const i = t?.properties, a = t?.arrayType ?? !1;\n let l = o;\n if (t && t.merge && l && n) l = t.merge(l, n, r);\n else if (!a && i) {\n const u = Object.keys({ ...o, ...n });\n l = null;\n for (let f = 0; f < u.length; f++) {\n const h = u[f];\n let g, p = o[h];\n if (p !== void 0) {\n const y = i[h];\n g = y ? (0, Ye.resolveTypedUpdates)(p, y, r, n?.[h]) : p;\n } else g = n?.[h];\n g != null && (l = l ?? {}, l[h] = g);\n }\n }\n return l;\n};\nconst Je = `The Safari browser does not support advanced copy and paste.\nCopy and paste will be limited to within the browser tab.\n\nPlease use Chrome or Edge if external copy and paste is required.`, ye = `You do not have permissions to access the clipboard.\nAll copy and paste operations will be limited to the browser tab.`, pt = { Safari: `The Safari browser does not support advanced copy and paste.\nCopy and paste will be limited to within the browser tab.\n\nPlease use Chrome or Edge if external copy and paste is required.`, Perms: ye, PermsWrite: oe() === k.Safari ? Je : ye, PermsRead: oe() === k.Safari ? Je : ye }, ge = async () => new Promise((e) => {\n document.hasFocus() ? e() : globalThis.addEventListener?.("focus", () => {\n e();\n }, { once: !0 }), document.activeElement.focus?.();\n}), be = async (e, t, r) => {\n if (oe() === k.Safari) return await r(new Error(pt.Safari));\n try {\n const n = async (a) => {\n try {\n return await a();\n } catch (l) {\n if (l.message?.includes("Document is not focused")) return !1;\n throw l;\n }\n }, o = await globalThis?.navigator?.permissions?.query({ name: e, allowWithoutGesture: !0, allowWithoutSanitization: !0 });\n let i = !1;\n if (o.state === "prompt" && (i = await n(t)), i || o.state !== "granted" || (i = await t()), !i) return await r(new Error(o.state));\n } catch (n) {\n return n.message === "No valid data on clipboard" || n.name === "DataError" ? void 0 : await r(n);\n }\n}, mt = async (e) => {\n try {\n return await e.read({ unsanitized: [S.html] });\n } catch {\n }\n return await e.read();\n}, Bt = async (e, t) => {\n if (!e) return null;\n const r = await mt(e);\n let n = !1;\n for (let o = 0; !n && r && o < r.length; o++) if (n = r[o].types.includes(t), n)\n return await r[o].getType(t);\n return n ? void 0 : null;\n};\nif (!globalThis.ClipboardItem) {\n const e = (r, n) => new Blob([n], { type: r });\n class t {\n constructor(n, o) {\n this._items = {}, this._types = Object.keys(n);\n const i = {}, a = Object.keys(n);\n for (let l = 0; l < a.length; l++) {\n const u = a[l];\n let f = n[u];\n i[u] = typeof f == "string" ? e(u, f) : f;\n }\n this._items = i, this._presentationStyle = o?.presentationStyle ?? "unspecified";\n }\n get types() {\n return this._types;\n }\n getType(n) {\n return Promise.resolve(this._items[n]);\n }\n supports(n) {\n return !0;\n }\n }\n globalThis.ClipboardItem = t;\n}\nconst ve = async (e, t = S.html) => new Promise(async (r, n) => {\n try {\n const o = await Bt(e, t);\n if (o) {\n const i = new FileReader();\n i.onload = () => {\n r(i.result);\n }, i.onerror = () => {\n r("");\n }, i.readAsText(o);\n } else r("");\n } catch (o) {\n n(o);\n }\n}), He = async (e, t = S.html) => {\n const r = await ve(e, t);\n if (!r) return null;\n let n = null;\n try {\n n = new DOMParser().parseFromString(r, S.html);\n } catch {\n console.warn("Can\'t parse html from clipboard.");\n }\n return n;\n}, $t = async (e) => {\n e && await e.writeText("");\n}, ie = "clipboard-uuid", Q = "web text/uuid", Xe = (e) => `<div style="display:none" ${ie}="${e}"/>`, zt = (e, t) => {\n let r = null;\n try {\n const n = new DOMParser().parseFromString(t, S.html);\n n.body.firstElementChild.setAttribute(ie, e), r = n.getElementsByTagName("body")[0].innerHTML;\n } catch (n) {\n console.warn("Can\'t embed uuid.", n);\n }\n return r;\n}, Ze = (e, t) => {\n if (!t || !e) return !1;\n try {\n const r = t.querySelectorAll(`[${ie}="${e}"]`);\n if (r && r.length === 1) return !0;\n if (t.querySelector("parsererror")) throw new Error("We are unable to parse node");\n return !1;\n } catch {\n return !1;\n }\n};\nclass Qe {\n constructor(t) {\n if (t?.nativeClipboard === void 0 || t?.nativeClipboard === !0) try {\n this._nativeClipboard = globalThis?.navigator.clipboard;\n } catch {\n t?.nativeClipboard === !0 && console.warn("NativeClipboard option set to true but no native clipboard available.");\n }\n else this._nativeClipboard = t?.nativeClipboard === !1 ? null : t?.nativeClipboard;\n this._disableCheckOnFocus = t?.disableCheckOnFocus ?? !1, this._init();\n }\n async _checkForChanges() {\n this._nativeClipboard && this._state && !this._disableCheckOnFocus && await be("clipboard-read", async () => {\n await ge();\n const t = await ve(this._nativeClipboard, Q);\n if (!this._state || t && t === this._state.uuid) return !0;\n const r = await He(this._nativeClipboard, S.html);\n return !this._state || (Ze(this._state.uuid, r) || this.clear(), !0);\n }, async (t) => {\n t?.message === "denied" || t.message?.includes("Document is not focused") || oe() === k.Safari || console.warn("Unable to detect clipboard changes: ", t);\n });\n }\n _init() {\n const t = this;\n this._listeners = /* @__PURE__ */ new Map(), this._listenersCapture = /* @__PURE__ */ new Map(), this._state = null, this._nativeClipboard && (this._onFocus = () => {\n t._checkForChanges();\n }, this._onBlur = () => {\n globalThis.addEventListener?.("focus", t._onFocus, { once: !0 });\n }, globalThis.addEventListener?.("blur", this._onBlur), this._nativeClipboard.addEventListener("clipboardchange", (r) => {\n t._checkForChanges();\n }));\n }\n async read() {\n if (!this._nativeClipboard) return this._state?.items ?? null;\n const t = this;\n return await be("clipboard-read", async () => {\n if (await ge(), this._state?.uuid) {\n const r = await ve(this._nativeClipboard, Q);\n if (r && r === t._state.uuid) return !0;\n const n = await He(this._nativeClipboard, S.html);\n if (Ze(t._state?.uuid, n)) return !0;\n }\n return t._state = { items: await mt(this._nativeClipboard), uuid: null, ref: null }, this.dispatchEvent(new Event("clipboardread")), !0;\n }, async (r) => {\n this.dispatchEvent(new Event("clipboarderrorread"));\n }), this._state?.items ?? [];\n }\n async write(t) {\n return this._write({ uuid: de(), items: t, ref: null });\n }\n async _write(t) {\n if (!this._nativeClipboard) return this._state = t, this.dispatchEvent(new Event("clipboardwrite")), this.dispatchEvent(new Event("clipboardchange")), null;\n const r = this, n = [], o = t.uuid;\n let i = t.items ?? [];\n const a = () => {\n r._state = { uuid: o, ref: t.ref, items: n }, r.dispatchEvent(new Event("clipboardwrite")), r.dispatchEvent(new Event("clipboardchange"));\n };\n await be("clipboard-write", async () => {\n await ge(), o && i.length === 0 && (i.push(new ClipboardItem({ [Q]: new Blob([o], { type: Q }) })), i.push(new ClipboardItem({ [S.html]: new Blob([Xe(o)], { type: S.html }) })));\n for (let l = 0; l < Math.min(1, i.length); l++) {\n const u = i[l];\n let f = u.types.indexOf(S.html), h = null;\n if (f !== -1) {\n const y = await u.getType(S.html);\n h = await Ce(y), h && (h = zt(o, h));\n }\n if (!h && u.types.includes(S.plain)) {\n const y = await u.getType(S.plain);\n if (y) {\n let T = null;\n typeof y == "string" ? (console.warn("text as string", y), T = y) : T = await Ce(y), T && (h = `<div ${ie}="${o}">${T}</div>`);\n }\n }\n if (!h && u.types.includes(S.png)) {\n const y = await u.getType(S.png), T = ut(await y.arrayBuffer());\n h = `<div ${ie}="${o}"><img src="${dt + T}"/></div>`;\n }\n !h && o && (h = Xe(o));\n const g = new Blob([h ?? ""], { type: S.html }), p = {};\n for (let y = 0; y < u.types.length; y++) {\n const T = u.types[y];\n p[T] = y === f ? g : u.getType(T);\n }\n h && f === -1 && (p[S.html] = g), o && (p[Q] = new Blob([o], { type: Q })), n.push(new ClipboardItem(p));\n }\n try {\n n && n.length !== 0 ? await this._nativeClipboard.write(n) : await $t(this._nativeClipboard);\n } catch (l) {\n l.message?.includes("Document is not focused") || console.warn("Unable to write to native clipboard: ", l);\n }\n return a(), !0;\n }, async (l) => {\n this.dispatchEvent(new Event("clipboarderrorwrite")), a();\n });\n }\n async writeReference(t) {\n if (!t) return void this.clear();\n let r = null;\n const n = {};\n try {\n const i = await t.toText?.() ?? null;\n i && (n[S.plain] = new Blob([i ?? ""], { type: S.plain }));\n } catch (i) {\n r = i;\n }\n try {\n const i = await t.toHtml?.() ?? null;\n i && (n[S.html] = new Blob([i], { type: S.html }));\n } catch (i) {\n r = i, console.warn("export to html", i);\n }\n try {\n const i = await t.toImage?.() ?? null;\n i && (n[S.png] = i);\n } catch (i) {\n r = i, console.warn("export to png", i);\n }\n const o = this._write({ uuid: de(), ref: t, items: Object.keys(n).length > 0 ? [new ClipboardItem(n)] : null });\n if (r) throw r;\n return o;\n }\n clear(t = !1) {\n this._state && (this._state = null, t && this._write({ uuid: null, ref: null, items: null }), this.dispatchEvent(new Event("clipboardwrite")), this.dispatchEvent(new Event("clipboardchange")));\n }\n async readReference() {\n return await this.read(), this._state?.ref ?? null;\n }\n readText() {\n return new Promise(async (t, r) => {\n const n = await this.read();\n let o = null;\n for (let a = 0; !o && n && a < n.length; a++) n[a].types.includes(S.plain) && (o = await n[a].getType(S.plain));\n if (!o) return void t("");\n const i = new FileReader();\n i.onload = () => {\n t(i.result);\n }, i.readAsText(o), i.onerror = (a) => {\n r(a);\n };\n });\n }\n async writeText(t) {\n const r = [new ClipboardItem({ [S.plain]: new Blob([t], { type: S.plain }) })];\n return this._write({ uuid: de(), items: r, ref: null });\n }\n addEventListener(t, r, n = {}) {\n const o = n?.capture ? this._listenersCapture : this._listeners;\n let i = o.get(t);\n i || (i = /* @__PURE__ */ new Map(), o.set(t, i)), i.set(r, typeof n == "boolean" ? {} : n);\n }\n dispatchEvent(t) {\n if (!t) return;\n const r = (n) => {\n const o = n.get(t.type);\n o && o.forEach((i, a) => {\n try {\n typeof a == "function" ? a(t) : a.handleEvent && a.handleEvent(t), i.once && o.delete(a);\n } catch (l) {\n console.warn(l);\n }\n });\n };\n return r(this._listenersCapture), r(this._listeners), !0;\n }\n removeEventListener(t, r, n) {\n const o = n?.capture ? this._listenersCapture : this._listeners, i = o.get(t);\n i && (i.delete(r), i.size === 0 && o.delete(t));\n }\n close() {\n globalThis.removeEventListener?.("focus", this._onFocus), globalThis.removeEventListener?.("blur", this._onBlur);\n }\n}\nvar Ee;\n(Ee = Qe || (Qe = {})).ErrorMessages = pt, Ee.Global = new Ee();\nconst Kt = "__SHEETXL";\nlet ee = null, le = null;\nasync function Vt() {\n if (ee)\n return ee;\n if (le) {\n if (await le, !ee)\n throw new Error("ESBuild initialization promise resolved, but instance is not available.");\n return ee;\n }\n let e, t;\n le = new Promise((r, n) => {\n e = r, t = n;\n });\n try {\n const { initialize: r } = await Promise.resolve().then(function() {\n return rr;\n });\n return ee = await r(), e(), ee;\n } catch (r) {\n throw console.error("Failed to import or initialize esbuild:", r), le = null, t(r), r;\n }\n}\nconst qt = {\n // ESBuild.TsconfigRaw =\n compilerOptions: {\n target: "esnext"\n }\n};\nasync function Gt(e, t, r = "/script.js", n = Kt) {\n try {\n const o = await Vt(), i = "@sheetxl/primitives", a = `\n export const FormulaContext = globalThis.${n}?.FormulaContext;\n export const ScalarType = globalThis.${n}?.ScalarType;\n export const Observable = globalThis.${n}?.Observable;\n export const IRange = globalThis.${n}?.IRange;\n export const FormulaError = globalThis.${n}?.FormulaError;\n // Add more exports as needed\n `, l = {\n // ESBuild.Plugin = {\n name: "sheetxl-esbuild-in-memory",\n setup(f) {\n const h = "sheetxl-" + (/* @__PURE__ */ new Date()).getTime();\n f.onResolve({ filter: new RegExp(`^(${r.replace("/", "\\\\/")}|${i})$`) }, (g) => ({\n path: g.path,\n namespace: h\n })), f.onResolve({ filter: /.*/ }, (g) => {\n if (g.namespace !== h)\n return console.warn(`esbuild: Treating import "${g.path}" as external.`), { path: g.path, external: !0 };\n }), f.onLoad({ filter: /.*/, namespace: h }, (g) => {\n let p;\n if (g.path === r)\n p = t;\n else if (g.path === i)\n p = a;\n else\n return {\n errors: [{ text: `Cannot load unknown path in ${h}: ${g.path}` }]\n };\n return {\n contents: p,\n loader: "ts"\n // leave this as \'ts\' so esbuild generates proper sourcemaps\n };\n });\n }\n }, u = await o.build({\n entryPoints: [r],\n // Use the virtual entry point\n bundle: !0,\n // IMPORTANT: Enable bundling\n write: !1,\n // IMPORTANT: Return result in memory\n format: "esm",\n // Output format\n plugins: [l],\n // TODO - later change to external and prepend when executing from ui\n sourcemap: "inline",\n // Generate separate source map string\n tsconfigRaw: qt,\n // Pass the mapped options\n minify: !0,\n // sourcemap: \'external\', // Generate separate source map string\n // Or use \'inline\' if you prefer data URLs embedded in the code\n // To suppress warnings about dynamic import() if esbuild complains:\n // supported: { \'dynamic-import\': true },\n platform: "neutral"\n // not really needed\n });\n if (u.outputFiles && u.outputFiles.length > 0)\n return u.outputFiles[0].text;\n throw u.errors && u.errors.length > 0 ? new Error(`esbuild bundling failed: ${u.errors.map((f) => f.text).join(`\n`)}`) : new Error("esbuild did not produce an output file.");\n } catch (o) {\n throw console.error("esbuild bundling process failed:", o), o;\n }\n}\nconst Wt = `\n/**\n * Represents the completion of an asynchronous operation\n */\ninterface Promise<T> {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise<T>;\n}\n`, Yt = `\n interface FirstTest {\n isTrue?: boolean;\n }\n`, Jt = async () => Yt, ht = /* @__PURE__ */ new Map([\n ["IReferenceRange", "r"],\n ["IRange", "l"]\n]), wt = /* @__PURE__ */ new Map([\n ["IWorkbook", "workbook"],\n ["ISheet", "sheet"],\n ["ICellRanges", "ranges"],\n ["ICellRange", "range"],\n ["IFormulaContext", "context"]\n]), _e = (e, t) => {\n Array.from(t.keys()).forEach((n) => {\n const o = t.get(n);\n t.set(`${e}.${n}`, o);\n });\n}, Ht = /* @__PURE__ */ new Map([\n ["Scalar", "*"],\n ["FormulaError.Known", W.Error],\n ["Date", "Date"],\n ["JSON", "JSON"]\n]), Xt = /* @__PURE__ */ new Map([\n // Repeating\n]), Oe = "SheetXL";\n_e(Oe, ht);\n_e(Oe, wt);\n_e(Oe, Xt);\nconst Zt = /* @__PURE__ */ new Map([\n ["Promise", () => ({ async: !0 })],\n // [\'PromiseLike\', (): Partial<IFunction.ReturnTypeJSON> => {\n // return { async: true };\n // }],\n ["Observable", () => ({ stream: !0 })]\n]);\nlet se = null;\nasync function Qt() {\n if (se)\n return se;\n try {\n return await (await Promise.resolve().then(function() {\n return or;\n })).initialize();\n } catch (e) {\n throw se = null, e;\n } finally {\n se = null;\n }\n}\nasync function er(e) {\n const t = e?.source ?? null;\n if (!t) return null;\n const r = (e.disableBundle || e.declarationsOnly) ?? !1, n = [\n Jt(),\n //import(\'typescript\'), // when bundled, but node check causes issues. We could bundle replace isNode but felt hacky\n Qt()\n ], o = await Promise.all(n), i = o[0], a = o[1];\n let l = "", u = null;\n const f = [], h = {\n allowJs: !0,\n declaration: !1,\n sourceMap: !1,\n // was true but now bundler will do this\n inlineSourceMap: !1,\n inlineSources: !1,\n isolatedModules: !0,\n preserveConstEnums: !1,\n // types: [\'WebWorker\'],\n module: 99,\n //"esNext",\n noResolve: !0,\n emitDeclarationOnly: !1,\n target: a.ScriptTarget.ES2020\n // lib: [\'webworker\', \'es2020\', \'esnext.asynciterable\'], // Use the webworker lib instead of dom\n }, g = "script", p = `${g}.ts`, y = "lib.d.ts", T = "global.d.ts", A = {\n [p]: t,\n [y]: Wt,\n [T]: i\n }, D = {\n getSourceFile: (s, w, L, P) => a.createSourceFile(s, A[s], a.ScriptTarget.Latest, !0),\n fileExists: (s) => A[s] !== void 0,\n readFile: (s) => A[s],\n writeFile: (s, w) => {\n A[s] = w;\n },\n // not used\n getCurrentDirectory: () => "./",\n getCanonicalFileName: (s) => s,\n useCaseSensitiveFileNames: () => !0,\n getDefaultLibFileName: (s) => y,\n getNewLine: () => `\n`\n }, U = a.createProgram([p, T], h, D), I = U.getTypeChecker(), J = U.getSourceFile(p), E = U.emit();\n E.diagnostics.length > 0 && console.warn(E.diagnostics), l = A[`${g}.js`];\n const c = (s, w, L, P) => {\n if (!s) {\n $(s, new Error(`Type is not defined for \'${w?.name ?? "return"}\'.`));\n return;\n }\n if (s.kind === a.SyntaxKind.NumberKeyword)\n w.scalar = W.Number;\n else if (s.kind === a.SyntaxKind.StringKeyword)\n w.scalar = W.String;\n else if (s.kind === a.SyntaxKind.BooleanKeyword)\n w.scalar = W.Boolean;\n else if (s.kind === a.SyntaxKind.UndefinedKeyword || s.kind === a.SyntaxKind.NullKeyword || s.kind === a.SyntaxKind.VoidKeyword) {\n if (P) {\n $(s, new Error(`\'undefined\' is not a valid type for input: \'${s?.parent?.name?.escapedText}\'.`));\n return;\n }\n w.scalar = W.Null;\n } else if (s.kind === a.SyntaxKind.BigIntKeyword)\n w.scalar = W.Number;\n else if (s.kind === a.SyntaxKind.AnyKeyword)\n w.scalar = W.Null;\n else if (s.kind === a.SyntaxKind.ArrayType) {\n const M = s.elementType;\n if (!M) {\n $(s, new Error(`\'Array\' must be typed: \'${s?.parent?.name?.escapedText}\'.`));\n return;\n }\n w.arrayDepth = (w.arrayDepth ?? 0) + 1, c(M, w, L, P);\n } else if (s.kind !== a.SyntaxKind.TupleType) {\n if (s.kind === a.SyntaxKind.TypeReference) {\n const M = s.typeName?.getText?.() ?? null, K = ht.get(M);\n let V = !1;\n K && (w.range = K, V = !0);\n const q = Ht.get(M);\n if (q && (w.scalar = q), q !== void 0 && (V = !0), P) {\n const R = wt.get(M);\n if (R)\n return R;\n } else {\n const R = Zt.get(M);\n if (R) {\n const b = { ...w, ...R() };\n let N = 0;\n if (b.async && N++, b.stream && N++, N > 1) {\n $(s, new Error(`\'${M}\' cannot have multiple modifiers: \'${s?.parent?.name?.escapedText}\'.`));\n return;\n }\n w = b, V = !0;\n }\n }\n if (!V) {\n $("node", new Error(`\'${M}\' is not a valid type: \'${s?.parent?.name?.escapedText}\'.`));\n return;\n }\n const H = s.typeArguments;\n if (H) {\n if (H.length !== 1) {\n $(s, new Error(`\'${M}\' must be typed with exactly 1 type: \'${s?.parent?.name?.escapedText}\'.`));\n return;\n }\n c(H[0], w, L, P);\n }\n }\n }\n }, m = (s) => (a.getCombinedModifierFlags(s) & a.ModifierFlags.Export) !== 0, fe = (s) => (a.getCombinedModifierFlags(s) & a.ModifierFlags.Default) !== 0, B = [], $ = (s, w) => {\n B.push(w);\n };\n if (a.forEachChild(J, (s) => {\n if (m(s) && a.isFunctionDeclaration(s)) {\n const w = {}, L = {\n parameters: {}\n }, P = s?.name?.getText();\n try {\n w.name = P;\n const K = I.getSymbolAtLocation(s.name).getDocumentationComment(I);\n if (K && K.length > 0 && K[0].text) {\n let R = K[0].text;\n R = R.replace(/[\\r\\n]+/g, "\\\\n").trim(), L.summary = R;\n }\n const V = {};\n c(s.type, V, w, !1), w.returnType = V;\n const q = {};\n fe(s) && (q.default = !0, u = P), Object.keys(q).length > 0 && (w.behavior = q), w.parameters = [];\n const H = /* @__PURE__ */ new Map();\n for (let R = 0; R < s.parameters.length; R++) {\n const b = s.parameters[R], N = {};\n N.name = b.name?.getText();\n const X = c(b.type, N, w, !0);\n if (X) {\n if (w.parameters.length !== 0) {\n const F = s?.parent?.name?.getText();\n $(s, new Error(`\'${w.name}\' contexts must be the first parameter: \'${F}\'.`));\n return;\n }\n w.context = X;\n continue;\n }\n const z = !((b.initializer === void 0 || b.initializer === null) && (b.questionToken === void 0 || b.questionToken === null));\n let C;\n if (z && (N.optional = !0, b.initializer))\n try {\n b.initializer.kind === a.SyntaxKind.StringLiteral ? C = b.initializer.text : b.initializer.kind === a.SyntaxKind.NumericLiteral ? C = parseFloat(b.initializer.text) : b.initializer.kind === a.SyntaxKind.TrueKeyword || b.initializer.kind === a.SyntaxKind.FalseKeyword ? C = b.initializer.kind === a.SyntaxKind.TrueKeyword : b.initializer.kind === a.SyntaxKind.NullKeyword ? C = null : b.initializer.kind === a.SyntaxKind.ObjectLiteralExpression || b.initializer.kind === a.SyntaxKind.ArrayLiteralExpression ? C = b.initializer.getText() : C = b.initializer.getText?.();\n } catch (O) {\n console.warn(`Couldn\'t extract default value for parameter \'${N.name}\'`, O);\n }\n b.dotDotDotToken && (N.rest = !0), w.parameters.push(N);\n const x = { description: "" };\n L.parameters[N.name] = x;\n const G = I.getSymbolAtLocation(b.name).getDocumentationComment(I);\n G && G.length > 0 && G[0].text && (x.description = G[0].text), C !== void 0 && (x.defaultValue = C), H.set(N.name, N);\n }\n if (s.jsDoc && s.jsDoc.length > 0) {\n const R = s.jsDoc;\n for (let b = 0; b < R.length; b++) {\n const N = R[b]?.tags;\n if (N)\n for (let X = 0; X < N.length; X++) {\n const z = N[X];\n let C = z?.tagName?.text;\n if (!C) continue;\n C = C.toLowerCase();\n let x = z.comment;\n const G = C === "hidden";\n if (!(typeof x != "string" && !G) && (typeof x == "string" && (x = x.replace(/[\\r\\n]+/g, "\\\\n").trim()), !(!G && x && (x = x.split(/\\\\n/)[0], !x || x.length === 0)))) {\n if (x && typeof x == "string") {\n const O = /\\{@link(code|plain)?\\s+([^}|]+)(?:\\s*\\|\\s*([^}]+))?\\}/g;\n let F, Z = x, te = [];\n for (; (F = O.exec(x)) !== null; ) {\n const [pe, me, gt, Ne] = F, bt = [gt.trim()];\n Ne && bt.push(Ne.trim());\n }\n x = Z, te.length > 0 && C === "see" && (L.links || (L.links = []), L.links.push(...te));\n }\n if (C === "name") {\n const O = x;\n O !== P && (L.name = O);\n } else if (C === "description") {\n const O = x;\n } else if (C === "summary") {\n const O = x;\n O && (L.summary = O);\n } else if (C === "param") {\n const O = z.name?.text, F = H.get(O);\n if (!F) {\n B.push(new Error(`Parameter \'${O}\' not found in function \'${P}\'.`));\n continue;\n }\n if (z.typeExpression && z.typeExpression.type)\n try {\n const Z = z.typeExpression.type;\n if (Z.kind === a.SyntaxKind.UnionType) {\n const te = [];\n F.enums = te, Z.types.forEach((pe) => {\n if (pe.kind === a.SyntaxKind.LiteralType) {\n const me = pe.literal.text;\n me && te.push(me);\n }\n });\n }\n } catch (Z) {\n console.warn("Error parsing JSDoc type expression:", Z);\n }\n } else if (C === "returns" || C === "return")\n w.returnType.description = x;\n else if (C === "category")\n L.category = x;\n else if (C === "hidden") {\n let O = !0;\n const F = x?.toLowerCase();\n F === "false" ? O = !1 : F !== "true" && (O = x), O !== !1 && (L.hidden = O ?? !0);\n }\n }\n }\n }\n }\n Object.keys(w.returnType).length === 0 && delete w.returnType, f.push([w, L]);\n } catch (M) {\n $(s, new Error(`\'${P}\': ${M.message}`));\n }\n }\n }), B.length > 0)\n throw console.warn(B), new Error("There were compilation errors.", { cause: B });\n if (f.length === 0)\n throw new Error("No exported functions.");\n const yt = `${Ut.uuidV4()}-script`;\n try {\n !r && B.length === 0 && (l = await Gt(a, l, g));\n } catch {\n console.warn("Error bundling script");\n }\n const Ie = {\n functions: f,\n commitId: yt,\n source: t,\n name: "Script",\n language: "typescript",\n // default\n compiled: l\n };\n return u && (Ie.autoRun = u), Ie;\n}\nself.addEventListener("message", async (e) => {\n const { id: t, params: r } = e.data;\n try {\n const n = await er(r);\n self.postMessage({ id: t, result: n, error: null });\n } catch (n) {\n self.postMessage({\n id: t,\n result: null,\n error: {\n message: n.message,\n stack: n.stack,\n cause: n.cause\n }\n });\n }\n});\nlet ce = null;\nasync function tr() {\n return ce || (ce = new Promise(async (e, t) => {\n try {\n const r = "0.20.2", n = `https://esm.sh/esbuild-wasm@${r}`, o = `https://esm.sh/esbuild-wasm@${r}/esbuild.wasm`, a = (await import(\n /* webpackIgnore: true */\n /* @vite-ignore */\n n\n )).default;\n await a.initialize({\n wasmURL: o,\n // Provide the specific WASM URL\n worker: !1\n // Keep processing on the current thread\n }), e(a);\n } catch (r) {\n console.error("Error initializing esbuild:", r), t(r);\n }\n }), ce);\n}\nvar rr = /* @__PURE__ */ Object.freeze({\n __proto__: null,\n initialize: tr\n});\nlet ue = null;\nasync function nr() {\n return ue || (ue = new Promise(async (e, t) => {\n let r = null;\n try {\n r = await import("https://esm.sh/typescript@5.7.2");\n } catch (n) {\n console.error("Error initializing Browser TypeScript module:", n);\n }\n r || console.log("use script fallback"), e(r);\n }), ue);\n}\nvar or = /* @__PURE__ */ Object.freeze({\n __proto__: null,\n initialize: nr\n});\n', r = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", t], { type: "text/javascript;charset=utf-8" });
|
|
50
|
-
function o(n2) {
|
|
51
|
-
let e2;
|
|
52
|
-
try {
|
|
53
|
-
if (e2 = r && (self.URL || self.webkitURL).createObjectURL(r), !e2) throw "";
|
|
54
|
-
const t2 = new Worker(e2, { type: "module", name: n2?.name });
|
|
55
|
-
return t2.addEventListener("error", () => {
|
|
56
|
-
(self.URL || self.webkitURL).revokeObjectURL(e2);
|
|
57
|
-
}), t2;
|
|
58
|
-
} catch {
|
|
59
|
-
return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(t), { type: "module", name: n2?.name });
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
async function i() {
|
|
63
|
-
if (typeof process < "u" && process.versions?.node && typeof Worker > "u") return await a();
|
|
64
|
-
if (typeof Worker < "u") {
|
|
65
|
-
const e2 = new n(() => new o());
|
|
66
|
-
try {
|
|
67
|
-
return await e2.start(), e2;
|
|
68
|
-
} catch (n2) {
|
|
69
|
-
console.error("Failed to start TypescriptCompiler worker reverting to fallback:", n2);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return await a();
|
|
73
|
-
}
|
|
74
|
-
const a = async () => {
|
|
75
|
-
const { compileModule: n2 } = await import("./BeyDW_Yk6iu1JB4v.mjs"), t2 = new e((e2) => n2(e2));
|
|
76
|
-
return await t2.start(), t2;
|
|
77
|
-
};
|
|
78
|
-
export {
|
|
79
|
-
i as createCompilerWorker
|
|
80
|
-
};
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.2
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { jsx as e, jsxs as o, Fragment as t } from "react/jsx-runtime";
|
|
8
|
-
import r, { forwardRef as n, useState as a, useCallback as s, memo as i, createElement as l, useMemo as c, useRef as d, useEffect as p, useLayoutEffect as m } from "react";
|
|
9
|
-
import u from "clsx";
|
|
10
|
-
import { mergeRefs as h } from "react-merge-refs";
|
|
11
|
-
import { ErrorBoundary as k } from "react-error-boundary";
|
|
12
|
-
import { useSnackbar as g, SnackbarContent as b, SnackbarProvider as w } from "notistack";
|
|
13
|
-
import { useTheme as f, ThemeProvider as y } from "@mui/material/styles/index.js";
|
|
14
|
-
import { Card as x, CardActions as C, Typography as M, IconButton as W, Collapse as v, Box as L, SvgIcon as S, CssBaseline as E } from "@mui/material";
|
|
15
|
-
import { _ as D, f as F, Z as T, q as O, t as I, F as P, h as A, W as N, T as R, WorkbookIO as j, X as _, U, j as H, k as K, N as G, Q as $, m as z, n as q, o as B, AppearanceCommandButton as V, u as J, v as X, E as Z, w as Q, x as Y, y as ee, useResolvedThemeMode as oe, ThemeMode as te, z as re, A as ne, H as ae, S as se, I as ie, K as le, HelpCommandButton as ce, L as de, M as pe, R as me, $ as ue, b as he, a0 as ke, a1 as ge, a2 as be, WorkbookTitle as we, WorkbookElement as fe, a3 as ye, a4 as xe } from "./index.mjs";
|
|
16
|
-
import { useMeasure as Ce } from "react-use";
|
|
17
|
-
import { ExpandMore as Me, Close as We, CancelOutlined as ve } from "@mui/icons-material";
|
|
18
|
-
const Le = { card: "_card_r6a8n_13", actionRoot: "_actionRoot_r6a8n_21", icons: "_icons_r6a8n_31", expand: "_expand_r6a8n_43", expandOpen: "_expandOpen_r6a8n_57", stackTraceContainer: "_stackTraceContainer_r6a8n_65" }, Se = n((t2, r2) => {
|
|
19
|
-
const { id: n2, message: i2, iconVariant: l2, error: c2, hideIconVariant: d2, ...p2 } = t2, { closeSnackbar: m2 } = g(), h2 = f(), [k2, w2] = a(false), y2 = s(() => {
|
|
20
|
-
w2((e2) => !e2);
|
|
21
|
-
}, []), L2 = s(() => {
|
|
22
|
-
m2(n2);
|
|
23
|
-
}, [n2, m2]), S2 = c2?.message || String(i2);
|
|
24
|
-
return e(b, { ref: r2, className: u(Le.root, "error-snackbar"), children: o(x, { className: Le.card, style: { backgroundColor: h2.palette.error.dark, border: `1px solid ${h2.palette.error.dark}` }, children: [o(C, { className: Le.actionRoot, children: [d2 ? null : l2?.error, e(M, { variant: "body2", component: "div", className: Le.typography, style: { color: h2.palette.text.primary }, children: S2 }), e("div", { style: { flex: "1 1 auto" } }), o("div", { className: Le.icons, children: [c2 ? e(W, { "aria-label": "Show more", size: "small", className: u(Le.expand, { [Le.expandOpen]: k2 }), style: { color: h2.palette.action.active }, onClick: y2, children: e(Me, {}) }) : null, e(W, { size: "small", className: Le.expand, style: { color: h2.palette.action.active }, onClick: L2, children: e(We, { fontSize: "small" }) })] })] }), c2 ? e(v, { in: k2, timeout: "auto", unmountOnExit: true, children: e("div", { className: Le.stackTraceContainer, style: { backgroundColor: h2.palette.error.light, borderTop: `1px solid ${h2.palette.error.main}` }, children: e(D, { error: c2, hideLineNumbers: true }) }) }) : null] }) });
|
|
25
|
-
});
|
|
26
|
-
Se.displayName = "ToastError";
|
|
27
|
-
const Ee = i(n((r2, n2) => {
|
|
28
|
-
const { commands: a2, commandHook: s2, scope: i2 = "workbook", disabled: c2 = false, ...d2 } = r2, p2 = F((r3) => {
|
|
29
|
-
const n3 = { variant: I.Menuitem, parentFloat: r3.floatReference, commandHook: s2, scope: i2, disabled: c2 }, d3 = o(t, { children: [e(T, { ...n3, command: a2.getCommand("newWorkbook"), icon: O(e(P, {})) }), e(A, { orientation: "horizontal" }), e(T, { ...n3, command: a2.getCommand("openWorkbook"), icon: O(e(N, {})) }), e(R, { ...n3, commands: a2, quickCommand: "saveWorkbook", icon: O(e(K, {})), createPopupPanel: (o2) => {
|
|
30
|
-
const t2 = { ...n3, parentFloat: o2.floatReference, scope: "saveWorkbook" }, r4 = [];
|
|
31
|
-
return j.getWriteFormats().forEach((o3) => {
|
|
32
|
-
if (o3.isDefault) return;
|
|
33
|
-
let n4 = null;
|
|
34
|
-
"CSV" === o3.key ? n4 = O(e(_, {})) : "Excel" === o3.key && (n4 = O(e(U, {})));
|
|
35
|
-
const s3 = a2.getCommand(`saveWorkbookAs${o3.key}`);
|
|
36
|
-
s3 ? r4.push(l(T, { ...t2, key: o3.key, command: s3, icon: n4 })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${o3.key}'`);
|
|
37
|
-
}), H({ ...o2, children: r4, onClick: () => {
|
|
38
|
-
o2.closeFloatAll();
|
|
39
|
-
} });
|
|
40
|
-
} })] });
|
|
41
|
-
return H({ ...r3, children: d3, onClick: (e2) => {
|
|
42
|
-
e2.isDefaultPrevented || r3.closeFloatAll();
|
|
43
|
-
} });
|
|
44
|
-
}, [c2, a2, s2, i2]), m2 = "File";
|
|
45
|
-
return e(R, { commands: a2, disabled: c2, commandHook: s2, scope: i2, label: m2, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (e2) => `calc(1.25rem + ${e2.spacing(2)}px)` } }, ...d2, createPopupPanel: p2, icon: e(G, { className: "label", icon: null, label: m2 }) });
|
|
46
|
-
}));
|
|
47
|
-
Ee.displayName = "StandaloneFileCommandButton";
|
|
48
|
-
const De = e(q, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: e(L, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: e(B, { onClick: () => {
|
|
49
|
-
window?.open("https://www.sheetxl.com", "_blank");
|
|
50
|
-
}, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Fe = i(n((t2, r2) => {
|
|
51
|
-
const { commands: n2, workbook: a2, logo: s2 = De, mainElement: i2, showFileMenu: l2 = true, showAppearanceMenu: p2 = true, ...m2 } = t2, { reference: u2 } = $(), [k2, { width: g2 }] = Ce(), b2 = g2 < 530, w2 = l2 ? e(Ee, { commands: n2, commandHook: { beforeExecute() {
|
|
52
|
-
u2?.closeAll();
|
|
53
|
-
}, onError(e2, o2, t3) {
|
|
54
|
-
} } }) : null, f2 = p2 ? e(V, { commands: n2, commandHook: { beforeExecute() {
|
|
55
|
-
u2?.closeAll();
|
|
56
|
-
}, onError(e2, o2, t3) {
|
|
57
|
-
} } }) : null, y2 = c(() => ({ paddingLeft: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1) }), []), x2 = d(null);
|
|
58
|
-
return e(L, { ref: h([x2, k2, r2]), ...m2, children: z({ commands: n2, renderCompact: b2, workbook: a2, selectWrapper: (t3) => o(L, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (e2) => e2.spacing(1), paddingLeft: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1) }, children: [o(L, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e2) => e2.spacing(0.5) }, children: [s2, o(L, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e2) => e2.spacing(0.25) }, children: [w2, t3] })] }), e(L, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: i2 }), e(L, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: b2 && !f2 ? "0 0 auto" : "1 1 100%" }, children: f2 })] }), selectProps: y2, toolbarsProps: { Home: { sx: {} } } }) });
|
|
59
|
-
}));
|
|
60
|
-
Fe.displayName = "StandaloneWorkbookToolbar";
|
|
61
|
-
const Te = i(n((n2, i2) => {
|
|
62
|
-
const { workbook: l2, setWorkbook: m2, refWorkbookTitle: u2, titleWorkbook: h2, setWorkbookTitle: k2, titlePlaceHolder: b2, children: w2, undoManager: f2, commands: y2, importExportDisabled: x2, themeModeOptions: C2 } = n2, M2 = g(), v2 = M2 ? M2.enqueueSnackbar : () => {
|
|
63
|
-
}, L2 = M2 ? M2.closeSnackbar : () => {
|
|
64
|
-
}, [S2, E2] = a({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), D2 = s(() => {
|
|
65
|
-
E2((e2) => ({ ...e2, isMounted: true }));
|
|
66
|
-
}, []), T2 = s(() => {
|
|
67
|
-
E2((e2) => ({ ...e2, isMounted: false }));
|
|
68
|
-
}, []), O2 = ne(), I2 = ae(), P2 = se(), A2 = d(/* @__PURE__ */ new Set()), N2 = c(() => {
|
|
69
|
-
const o2 = (o3, t2) => {
|
|
70
|
-
if (t2?.onceKey) {
|
|
71
|
-
if (A2.current.has(t2.onceKey)) return;
|
|
72
|
-
const e2 = new Set(A2.current);
|
|
73
|
-
e2.add(t2.onceKey), A2.current = e2;
|
|
74
|
-
}
|
|
75
|
-
const r2 = { variant: t2?.type ?? de.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t2?.preventDuplicate, persist: t2?.persist ?? t2?.type === de.Error, action: (o4) => e(W, { onClick: () => L2(o4), children: e(ve, {}) }) };
|
|
76
|
-
t2?.enqueueProps && Object.assign(r2, t2.enqueueProps), o3 || console.log("message is 'null'", t2), v2(o3 ?? "Alert", r2);
|
|
77
|
-
};
|
|
78
|
-
return { showMessage: o2, showBusy: (e2, o3) => {
|
|
79
|
-
let t2 = null;
|
|
80
|
-
const r2 = new Promise((e3) => {
|
|
81
|
-
t2 = e3;
|
|
82
|
-
});
|
|
83
|
-
return E2((o4) => {
|
|
84
|
-
const n3 = new Map(o4.starting);
|
|
85
|
-
n3.set(r2, t2);
|
|
86
|
-
return { ...o4, label: e2, starting: n3 };
|
|
87
|
-
}), r2;
|
|
88
|
-
}, showWindow: (e2, o3, t2) => {
|
|
89
|
-
const r2 = { ...o3, onKeyDown: (e3) => {
|
|
90
|
-
y2?.dispatchToFocusedCommand(e3), e3.isDefaultPrevented() || e3.isPropagationStopped() || o3?.onKeyDown?.(e3);
|
|
91
|
-
} };
|
|
92
|
-
return O2(e2, { sort: () => import("./kTEpzGO5dC1M9dbV.mjs"), numberFormat: () => import("./CWRpbP9nAT2yR2r6.mjs"), hyperlink: () => import("./CYcFo_OeyApoGTg3.mjs"), comments: () => import("./DfXVaugDnucoDGYk.mjs"), find: () => import("./D95MPCm8ObgZN5_j.mjs"), tableDetails: () => import("./DuboCcThig3p0wzs.mjs"), tableNew: () => import("./CradKrxfiGQucTZ3.mjs"), namedDetails: () => import("./N2xFXdAPXckWbqvN.mjs") }[e2], r2, t2);
|
|
93
|
-
}, showOptions: I2, showInputOptions: P2, showError: (e2) => {
|
|
94
|
-
let t2, r2 = de.Error, n3 = "Unknown Error";
|
|
95
|
-
"string" == typeof e2 ? n3 = e2 : e2 instanceof Error && (t2 = e2, e2.message && (n3 = e2.message)), e2 instanceof pe && (r2 = de.Info), o2(n3, { type: r2, enqueueProps: { error: t2 } });
|
|
96
|
-
} };
|
|
97
|
-
}, []), R2 = s(() => {
|
|
98
|
-
}, []), _2 = ((e2) => {
|
|
99
|
-
const { workbook: o2, setWorkbook: t2, importExportDisabled: n3, workbookTitle: a2 = "export", setWorkbookTitle: i3, notifier: l3, requestWorkbookTitle: d2, themeModeOptions: m3, undoManager: u3, commands: h3, onExecute: k3 } = e2, g2 = F(m3?.onForceModeChange, [m3?.onForceModeChange]), b3 = F(m3?.onForceLightGridChange, [m3?.onForceLightGridChange]), w3 = F(m3?.onForceLightImagesChange, [m3?.onForceLightImagesChange]), f3 = F(async (e3 = null, o3 = null) => {
|
|
100
|
-
const t3 = [];
|
|
101
|
-
let r2, n4 = null, a3 = null;
|
|
102
|
-
if ("string" == typeof e3 ? a3 = e3 : n4 = e3, r2 = n4 ? e3 : await J.openFileDialog(a3 ?? j.getAllReadFormatTypeAsString().join(",")), !r2) return null;
|
|
103
|
-
const s2 = { source: r2, constructorOptions: o3, onWarning: (e4) => {
|
|
104
|
-
t3.push(e4);
|
|
105
|
-
} }, i4 = await j.read(s2, l3);
|
|
106
|
-
return t3.length > 0 && (l3?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn("Import warnings:\n" + t3.join("\n"))), i4;
|
|
107
|
-
}, [k3, l3, o2]), y3 = F(async (e3, o3, t3) => {
|
|
108
|
-
if (!o3 && d2) {
|
|
109
|
-
const o4 = await d2("Enter Workbook name to " + (t3.isDefault ? "Save." : `Export as ${t3.description}.`));
|
|
110
|
-
return null !== o4 && j.writeFile(o4, e3, { formatType: t3.key });
|
|
111
|
-
}
|
|
112
|
-
return j.writeFile(o3, e3, { formatType: t3.key });
|
|
113
|
-
}, [l3, o2, d2]), x3 = s(() => ({ contains: (e3) => true, focus() {
|
|
114
|
-
} }), []), C3 = c(() => {
|
|
115
|
-
const e3 = [];
|
|
116
|
-
n3 || (j.getWriteFormats().forEach((t3) => {
|
|
117
|
-
const r3 = t3.isDefault, n4 = { label: r3 ? "Save Workbook" : `Save Workbook as ${t3.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${t3.description}` }, tags: t3.tags, description: `Save the workbook to the desktop${r3 ? "" : ` as ${t3.description}`}.` };
|
|
118
|
-
r3 && (n4.shortcut = { key: "S", modifiers: [Z.Ctrl] }, e3.push(new X("saveWorkbookAs", x3, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Z.Shift, Z.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
|
|
119
|
-
y3(o2, null, t3).catch((e4) => {
|
|
120
|
-
l3?.showError?.(e4);
|
|
121
|
-
});
|
|
122
|
-
})));
|
|
123
|
-
const s2 = r3 ? "saveWorkbook" : `saveWorkbookAs${t3.key}`;
|
|
124
|
-
e3.push(new X(s2, x3, n4, (e4) => {
|
|
125
|
-
y3(o2, e4 ?? a2, t3).catch((e5) => {
|
|
126
|
-
l3?.showError?.(e5);
|
|
127
|
-
});
|
|
128
|
-
}));
|
|
129
|
-
}), e3.push(new X("openWorkbook", x3, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [Z.Ctrl] } }, async (e4 = null) => {
|
|
130
|
-
const r3 = { date1904: o2.isDate1904(), ...o2.options };
|
|
131
|
-
try {
|
|
132
|
-
const n4 = await f3(e4, r3);
|
|
133
|
-
if (!n4) return;
|
|
134
|
-
const a3 = n4.title, s2 = n4.workbook, c2 = s2.getSelectedSheet();
|
|
135
|
-
if ("text/csv" === n4.formatType.mimeType) {
|
|
136
|
-
const e5 = o2.findValidSheetName(a3);
|
|
137
|
-
await o2.doBatch(async () => {
|
|
138
|
-
const t3 = c2.getUsedRange();
|
|
139
|
-
if (!t3) return void l3?.showMessage("The file appears to be blank.");
|
|
140
|
-
const r4 = o2.getSheets().add({ name: e5, autoSelect: true }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 });
|
|
141
|
-
await r4.copyFrom(t3);
|
|
142
|
-
}, `Import CSV '${a3}'`);
|
|
143
|
-
} else o2?.close(), i3?.(a3), t2(s2);
|
|
144
|
-
} catch (e5) {
|
|
145
|
-
l3?.showError?.(e5);
|
|
146
|
-
}
|
|
147
|
-
})), e3.push(new X("openWorkbookFromUrl", x3, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e4) {
|
|
148
|
-
if (!e4) {
|
|
149
|
-
const o3 = await l3?.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"] });
|
|
150
|
-
if ("Open" !== o3.option) return;
|
|
151
|
-
e4 = o3.input;
|
|
152
|
-
}
|
|
153
|
-
e4 && console.log("openWorkbookFromUrl", e4);
|
|
154
|
-
})));
|
|
155
|
-
let r2 = [];
|
|
156
|
-
return m3 && (r2 = [new X("themeMode", x3, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new X("defaultThemeMode", x3, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new X("forceLightGrid", x3, { label: "Force Light Grid", description: "Force the grid to always render in light 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 X("forceLightImages", x3, { label: "Force Light Images", description: "Force the images to always render in light 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." })]), [...e3, ...r2, new Q("help", x3, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
|
|
157
|
-
}), new Q("showKeyboardShortcuts", x3, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [Z.Ctrl] } }, () => {
|
|
158
|
-
}), new X("gotoUrlGithub", x3, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
|
|
159
|
-
window?.open("https://github.com/sheetxl/sheetxl");
|
|
160
|
-
}), new X("gotoUrlDiscord", x3, { label: "Discord", description: "Join our community on discord." }, () => {
|
|
161
|
-
window?.open("https://discord.gg/NTKdwUgK9p");
|
|
162
|
-
}), new X("gotoUrlDocumentation", x3, { label: "Documentation", description: "Read the documentation." }, () => {
|
|
163
|
-
window?.open("https://www.sheetxl.com/docs");
|
|
164
|
-
}), new X("gotoUrlIssue", x3, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
|
|
165
|
-
window?.open("https://github.com/sheetxl/sheetxl/issues");
|
|
166
|
-
})];
|
|
167
|
-
}, [o2, a2, l3, n3, m3, h3, u3]), M3 = c(() => {
|
|
168
|
-
let e3 = null;
|
|
169
|
-
return e3 = h3 ? h3.createChildGroup(x3, "standaloneWorkbook", false) : new Y(x3, "standaloneWorkbook"), e3.addCommands(C3, true), e3;
|
|
170
|
-
}, [h3, C3]);
|
|
171
|
-
ee({ manager: u3, commands: M3, notifier: l3 });
|
|
172
|
-
const { themeMode: W2 } = oe();
|
|
173
|
-
p(() => {
|
|
174
|
-
if (!m3 || !M3) return;
|
|
175
|
-
const e3 = "dark" === m3.forceMode || !m3.forceMode && "dark" === W2;
|
|
176
|
-
M3.getCommand("themeMode").update({ state: m3.forceMode ?? null, label: e3 ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: e3 ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
|
|
177
|
-
g2(e3 ? te.Light : te.Dark);
|
|
178
|
-
}), M3.getCommand("defaultThemeMode").update({ state: !m3.forceMode }).updateCallback(() => {
|
|
179
|
-
g2(null);
|
|
180
|
-
}), M3.getCommand("forceLightGrid").update({ state: m3.forceLightGrid }).updateCallback(() => {
|
|
181
|
-
b3(!m3.forceLightGrid);
|
|
182
|
-
}), M3.getCommand("forceLightImages").update({ state: m3.forceLightImages }).updateCallback(() => {
|
|
183
|
-
w3(!m3.forceLightImages);
|
|
184
|
-
});
|
|
185
|
-
}, [W2, m3, C3]);
|
|
186
|
-
const { showModal: v3 } = re();
|
|
187
|
-
return p(() => {
|
|
188
|
-
const e3 = () => new Promise((e4, o3) => {
|
|
189
|
-
const t3 = r.lazy(() => import("./Bth10k64kFkk36Hy.mjs")), n4 = v3(t3, { title: "Shortcut Keys Reference", commands: M3, onDone: () => {
|
|
190
|
-
n4.hide();
|
|
191
|
-
}, TransitionProps: { onExited: () => {
|
|
192
|
-
e4(true);
|
|
193
|
-
} } });
|
|
194
|
-
});
|
|
195
|
-
M3.getCommand("showKeyboardShortcuts").updateCallback(() => e3()), M3.getCommand("help").updateCallback(() => e3());
|
|
196
|
-
}, [C3, M3]), M3;
|
|
197
|
-
})({ workbook: l2, setWorkbook: m2, importExportDisabled: x2, workbookTitle: h2, setWorkbookTitle: k2, commands: y2, requestWorkbookTitle: (e2) => new Promise((o2) => {
|
|
198
|
-
u2.current ? u2.current.requestWorkbookTitle((e3, t2) => {
|
|
199
|
-
o2(e3);
|
|
200
|
-
}, { selectAll: true, requestReason: e2 }) : o2(b2);
|
|
201
|
-
}), themeModeOptions: C2, undoManager: f2, notifier: N2, onExecute: R2 });
|
|
202
|
-
p(() => {
|
|
203
|
-
S2.starting.size <= 0 || !S2.isMounted || E2((e2) => {
|
|
204
|
-
const o2 = new Map(e2.running);
|
|
205
|
-
e2.starting.forEach((e3, t2) => {
|
|
206
|
-
const r2 = () => {
|
|
207
|
-
E2((e4) => {
|
|
208
|
-
const o3 = new Map(e4.running);
|
|
209
|
-
o3.delete(t2);
|
|
210
|
-
return { ...e4, running: o3 };
|
|
211
|
-
});
|
|
212
|
-
};
|
|
213
|
-
o2.set(t2, r2), e3(r2);
|
|
214
|
-
});
|
|
215
|
-
return { ...e2, starting: /* @__PURE__ */ new Map(), running: o2 };
|
|
216
|
-
});
|
|
217
|
-
}, [S2]);
|
|
218
|
-
const [U2, H2] = a(null);
|
|
219
|
-
p(() => {
|
|
220
|
-
0 !== S2.starting.size || 0 !== S2.running.size ? H2(e(ie, { icon: e(le, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: true, label: S2.label, onMount: D2, onUnmount: T2, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : H2(null);
|
|
221
|
-
}, [S2.starting, S2.running]);
|
|
222
|
-
const K2 = c(() => e(ce, { commands: _2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [_2]), G2 = { notifier: N2, commands: _2 };
|
|
223
|
-
return l2 && (G2.statusBarProps = { childrenEnd: K2 }), o(t, { children: [U2, w2 ? r.cloneElement(w2, G2) : null] });
|
|
224
|
-
}));
|
|
225
|
-
Te.displayName = "SnackbarAndCommandsWrapper";
|
|
226
|
-
const Oe = i(n((t2, r2) => {
|
|
227
|
-
const { className: n2, sx: i2, style: l2, onElementLoad: g2, onError: b2, undoManager: f2, errorPanel: x2 = me, onKeyDown: C2, workbook: M2, createWorkbookOptions: W2, onWorkbookChange: v2, logo: L2, importExportDisabled: D2 = false, themeModeOptions: T2, autoFocus: O2 = false, commands: I2, title: P2, onTitleChange: A2, titleProps: N2, ...R2 } = t2, _2 = d(null), U2 = F(v2, [v2]), H2 = F(A2 ?? N2?.onTitleChange, [A2 ?? N2?.onTitleChange]), K2 = N2?.placeHolder ?? "Untitled", G2 = T2?.forceMode, { themeMode: $2, source: z2 } = oe({ mode: G2 }), q2 = c(() => ({ ...T2, light: ue(false, he.deepMerge(T2?.theme ?? {}, T2?.light ?? {})), dark: ue(true, he.deepMerge(T2?.theme ?? {}, T2?.dark ?? {})) }), [T2]), B2 = $2 === te.Dark, [V2, J2] = a(null);
|
|
228
|
-
p(() => {
|
|
229
|
-
J2(f2 ?? new ke());
|
|
230
|
-
}, [f2]);
|
|
231
|
-
const [X2, Z2] = a(null), [Q2, ee2] = a(null), re2 = ge();
|
|
232
|
-
m(() => {
|
|
233
|
-
if (!M2 || 0 === Object.keys(M2).length && !he.isPromiseLike(M2)) {
|
|
234
|
-
const e2 = { theme: re2.getDefaultTheme(), ...W2 };
|
|
235
|
-
ee2(new be(e2));
|
|
236
|
-
} else ee2(M2);
|
|
237
|
-
}, [M2]), m(() => {
|
|
238
|
-
if (!Q2) return;
|
|
239
|
-
if (Q2 instanceof be) return Z2({ workbook: Q2 }), void (M2 !== Q2 && U2?.(Q2));
|
|
240
|
-
(async () => {
|
|
241
|
-
try {
|
|
242
|
-
let e2, o2 = await Promise.resolve(Q2);
|
|
243
|
-
o2 && o2.source && (o2 = await j.read(o2)), o2.workbook ? (ce2(o2.title), e2 = o2.workbook) : e2 = o2, U2?.(e2), Z2({ workbook: e2 });
|
|
244
|
-
} catch (e2) {
|
|
245
|
-
U2?.(null), Z2({ error: e2 });
|
|
246
|
-
}
|
|
247
|
-
})();
|
|
248
|
-
}, [Q2]);
|
|
249
|
-
const [ne2, ae2] = a(null);
|
|
250
|
-
p(() => {
|
|
251
|
-
if (!V2 || !X2) return;
|
|
252
|
-
V2.clear();
|
|
253
|
-
const e2 = X2?.workbook?.getTransactions();
|
|
254
|
-
if (!e2) return;
|
|
255
|
-
return e2.addListener({ onCommitEnd: (o2) => {
|
|
256
|
-
o2.getDescription() ? V2.addUndoOperation({ description: o2.getDescription(), undo: () => (e2.revert(o2.getId()), ne2.source?.focus(), () => {
|
|
257
|
-
e2.restore(o2.getId()), ne2.source?.focus();
|
|
258
|
-
}) }) : console.warn("commit has no description", o2);
|
|
259
|
-
} });
|
|
260
|
-
}, [V2, X2, ne2]);
|
|
261
|
-
const se2 = F((e2) => {
|
|
262
|
-
e2 ? V2.setRepeatableOperation({ description: e2.label(), repeat: async () => e2.execute() }) : V2.setRepeatableOperation(null);
|
|
263
|
-
}, [V2]), [le2, ce2] = a(P2 ?? N2?.title ?? "");
|
|
264
|
-
p(() => {
|
|
265
|
-
ce2(P2 ?? N2?.title ?? "");
|
|
266
|
-
}, [P2 ?? N2?.title]), p(() => {
|
|
267
|
-
H2?.(le2);
|
|
268
|
-
}, [le2]);
|
|
269
|
-
const [de2, pe2] = a(null), Ce2 = c(() => {
|
|
270
|
-
const e2 = () => ({ contains: (e3) => true, focus() {
|
|
271
|
-
} });
|
|
272
|
-
return I2 ? I2.createChildGroup(e2, "application", false) : new Y(e2, "application");
|
|
273
|
-
}, [I2]), Me2 = F((e2) => {
|
|
274
|
-
pe2(e2.source.getViewportElement()), ae2(e2), Ce2.activate("sheet"), g2?.(e2);
|
|
275
|
-
}, [Ce2]);
|
|
276
|
-
p(() => {
|
|
277
|
-
ne2 && O2 && ne2.source?.focus("object" == typeof O2 ? O2 : void 0);
|
|
278
|
-
}, [ne2]);
|
|
279
|
-
const We2 = d(null), ve2 = s((o2) => {
|
|
280
|
-
let t3 = null;
|
|
281
|
-
return N2?.hidden || (t3 = e(we, { ...N2, style: { maxWidth: "100%", ...N2?.style }, workbook: _2.current, ref: We2, title: le2, placeHolder: K2, onTitleChange: (e2) => {
|
|
282
|
-
ce2(e2);
|
|
283
|
-
} })), e(Fe, { ...o2, logo: L2, mainElement: t3, showFileMenu: !D2, showAppearanceMenu: !!(q2?.onForceLightGridChange || q2?.onForceLightImagesChange || q2?.onForceModeChange) });
|
|
284
|
-
}, [L2, le2, N2, q2, D2, Ce2]);
|
|
285
|
-
p(() => {
|
|
286
|
-
const e2 = (e3) => e3.preventDefault();
|
|
287
|
-
return _2.current?.addEventListener("wheel", e2, { passive: false }), () => {
|
|
288
|
-
_2.current?.removeEventListener("wheel", e2);
|
|
289
|
-
};
|
|
290
|
-
}, []);
|
|
291
|
-
const Le2 = c(() => e(ie, { transparentBackground: true, sx: i2, style: l2 }), [i2, l2]), Ee2 = s(({ error: o2 }) => (b2?.(o2), e(x2, { sx: i2, style: l2, error: o2 ?? "Unable to display empty workbook." })), [i2, l2, b2]), De2 = c(() => ({ ...i2, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-MuiContent *": { fontFamily: (e2) => e2.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [i2]), Oe2 = h([_2, r2]), Ie = c(() => {
|
|
292
|
-
if (!X2) return Le2;
|
|
293
|
-
if (X2.error || !X2.workbook) return Ee2({ error: X2.error });
|
|
294
|
-
let o2 = null, t3 = null, r3 = false;
|
|
295
|
-
return q2 && (o2 = B2 ? q2.dark : q2.light, t3 = B2 && !q2.forceLightGrid ? q2.dark : q2.light, r3 = q2.forceLightImages), e(fe, { sx: De2, style: l2, tabIndex: 0, autoFocus: true, workbook: X2.workbook, ref: Oe2, renderToolbar: ve2, onElementLoad: Me2, onRepeatCommandChange: se2, onKeyDown: (e2) => {
|
|
296
|
-
C2?.(e2);
|
|
297
|
-
}, gridTheme: t3, headersTheme: o2, forceLightImages: r3, className: u(n2, "sheetxl-workbook"), onContextMenu: (e2) => e2.preventDefault(), ...R2 }, "WorkbookElement");
|
|
298
|
-
}, [X2, le2, V2, Le2, q2, R2, ve2, De2]);
|
|
299
|
-
let Pe = e(k, { fallbackRender: Ee2, children: e(w, { maxSnack: 3, domRoot: de2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e2, o2, t3) => {
|
|
300
|
-
_2.current?.focus();
|
|
301
|
-
}, Components: { error: Se }, iconVariant: { success: e(S, { style: { marginRight: "8px" }, children: e("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: e(xe, { style: { marginRight: "8px" } }) }, children: e(ye, { children: e(Te, { workbook: X2?.workbook, setWorkbook: ee2, importExportDisabled: D2, titlePlaceHolder: K2, titleWorkbook: le2, setWorkbookTitle: ce2, refWorkbookTitle: We2, commands: Ce2, undoManager: V2, themeModeOptions: q2, children: Ie }) }) }) });
|
|
302
|
-
return q2 && (Pe = o(y, { theme: B2 ? q2.dark : q2.light, children: [q2.cssBaseline ? e(E, {}) : null, Pe] })), Pe;
|
|
303
|
-
}));
|
|
304
|
-
Oe.displayName = "EagerStandaloneWorkbook";
|
|
305
|
-
export {
|
|
306
|
-
Oe as default
|
|
307
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.2
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
const e = { COMPLEX: { s: "Converts real and imaginary coefficients into a complex number", p: { realNum: { d: "is the real coefficient of the complex number" }, iNum: { d: "is the imaginary coefficient of the complex number" }, suffix: { d: "is the suffix for the imaginary component of the complex number", v: "i" } } }, IMABS: { s: "Returns the absolute value (modulus) of a complex number", p: { inumber: { d: "is a complex number for which you want the absolute value" } } }, IMAGINARY: { s: "Returns the imaginary coefficient of a complex number", p: { inumber: { d: "is a complex number for which you want the imaginary coefficient" } } }, IMARGUMENT: { s: "Returns the argument q, an angle expressed in radians", p: { inumber: { d: "is a complex number for which you want the argument" } } }, IMCONJUGATE: { s: "Returns the complex conjugate of a complex number", p: { inumber: { d: "is a complex number for which you want the conjugate" } } }, IMCOS: { s: "Returns the cosine of a complex number", p: { inumber: { d: "is a complex number for which you want the cosine" } } }, IMCOSH: { s: "Returns the hyperbolic cosine of a complex number", p: { inumber: { d: "is a complex number for which you want the hyperbolic cosine" } } }, IMCOT: { s: "Returns the cotangent of a complex number", p: { inumber: { d: "is a complex number for which you want the cotangent" } } }, IMCSC: { s: "Returns the cosecant of a complex number", p: { inumber: { d: "is a complex number for which you want the cosecant" } } }, IMCSCH: { s: "Returns the hyperbolic cosecant of a complex number", p: { inumber: { d: "is a complex number for which you want the hyperbolic cosecant" } } }, IMDIV: { s: "Returns the quotient of two complex numbers", p: { inumber1: { d: "is the complex numerator or dividend" }, inumber2: { d: "is the complex denominator or divisor" } } }, IMEXP: { s: "Returns the exponential of a complex number", p: { inumber: { d: "is a complex number for which you want the exponential" } } }, IMLN: { s: "Returns the exponential of a complex number", p: { inumber: { d: "is a complex number for which you want the exponential" } } }, IMLOG10: { s: "Returns the base-10 logarithm of a complex number", p: { inumber: { d: "is a complex number for which you want the common logarithm" } } }, IMLOG2: { s: "Returns the base-2 logarithm of a complex number", p: { inumber: { d: "is a complex number for which you want the base-2 logarithm" } } }, IMPOWER: { s: "Returns the base-2 logarithm of a complex number", p: { inumber: { d: "is a complex number for which you want the base-2 logarithm" }, number: {} } }, IMPRODUCT: { s: "Returns the product of 1 to 255 complex numbers", p: { inumber: { d: "inumber1,inumber2,... Inumber1, Inumber2,... are from 1 to 255 complex numbers to multiply." } } }, IMREAL: { s: "Returns the real coefficient of a complex number", p: { inumber: { d: "is a complex number for which you want the real coefficient" } } }, IMSEC: { s: "Returns the secant of a complex number", p: { inumber: { d: "is a complex number for which you want the secant" } } }, IMSECH: { s: "Returns the hyperbolic secant of a complex number", p: { inumber: { d: "is a complex number for which you want the hyperbolic secant" } } }, IMSIN: { s: "Returns the sine of a complex number", p: { inumber: { d: "is a complex number for which you want the sine" } } }, IMSINH: { s: "Returns the hyperbolic sine of a complex number", p: { inumber: { d: "is a complex number for which you want the hyperbolic sine" } } }, IMSQRT: { s: "Returns the square root of a complex number", p: { inumber: { d: "is a complex number for which you want the square root" } } }, IMSUB: { s: "Returns the difference of two complex numbers", p: { inumber1: { d: "is the complex number from which to subtract inumber2" }, inumber2: { d: "is the complex number to subtract from inumber1" } } }, IMSUM: { s: "Returns the sum of complex numbers", p: { inumber: { d: "inumber1,inumber2,... are from 1 to 255 complex numbers to add" } } }, IMTAN: { s: "Returns the tangent of a complex number", p: { inumber: { d: "is a complex number for which you want the tangent" } } } };
|
|
8
|
-
export {
|
|
9
|
-
e as default
|
|
10
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.2
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
const e = { ACOS: { s: "Returns the arccosine of a number, in radians in the range 0 to Pi. The arccosine is the angle whose cosine is Number", p: { number: { d: "is the cosine of the angle you want and must be from -1 to 1" } } }, ACOSH: { s: "Returns the inverse hyperbolic cosine of a number", p: { number: { d: "is any real number equal to or greater than 1" } } }, ACOT: { s: "Returns the arccotangent of a number, in radians in the range 0 to Pi.", p: { number: { d: "is the cotangent of the angle you want" } } }, ACOTH: { s: "Returns the inverse hyperbolic cotangent of a number", p: { number: { d: "is the hyperbolic cotangent of the angle that you want" } } }, ASIN: { s: "Returns the arcsine of a number in radians, in the range -Pi/2 to Pi/2", p: { number: { d: "is the sine of the angle you want and must be from -1 to 1" } } }, ASINH: { s: "Returns the inverse hyperbolic sine of a number", p: { number: { d: "is any real number equal to or greater than 1" } } }, ATAN: { s: "Returns the arctangent of a number in radians, in the range -Pi/2 to Pi/2", p: { number: { d: "is the tangent of the angle you want" } } }, ATAN2: { s: "Returns the arctangent of the specified x- and y- coordinates, in radians between -Pi and Pi, excluding -Pi", p: { x: { d: "is the x-coordinate of the point" }, y: { d: "is the y-coordinate of the point" } } }, ATANH: { s: "Returns the inverse hyperbolic tangent of a number", p: { number: { d: "is any real number between -1 and 1 excluding -1 and 1" } } }, COS: { s: "Returns the cosine of an angle", p: { number: { d: "is the angle in radians for which you want the cosine" } } }, COSH: { s: "Returns the hyperbolic cosine of a number", p: { number: { d: "is any real number" } } }, COT: { s: "Returns the cotangent of an angle", p: { number: { d: "is the angle in radians for which you want the cotangent" } } }, COTH: { s: "Returns the hyperbolic cotangent of a number", p: { number: { d: "is the angle in radians for which you want the hyperbolic cotangent" } } }, CSC: { s: "Returns the cosecant of an angle", p: { number: { d: "is the angle in radians for which you want the cosecant" } } }, CSCH: { s: "Returns the hyperbolic cosecant of an angle", p: { number: { d: "is the angle in radians for which you want the hyperbolic cosecant" } } }, SEC: { s: "Returns the secant of an angle", p: { number: { d: "is the angle in radians for which you want the secant" } } }, SECH: { s: "Returns the hyperbolic secant of an angle", p: { number: { d: "is the angle in radians for which you want the hyperbolic secant" } } }, SIN: { s: "Returns the sine of an angle", p: { number: { d: "is the angle in radians for which you want the sine. Degrees * PI()/180 = radians" } } }, SINH: { s: "Returns the hyperbolic sine of a number", p: { number: { d: "is any real number" } } }, TAN: { s: "Returns the tangent of an angle", p: { number: { d: "is the angle in radians for which you want the tangent. Degrees * PI()/180 = radians" } } }, TANH: { s: "Returns the hyperbolic tangent of a number", p: { number: { d: "is any real number" } } } };
|
|
8
|
-
export {
|
|
9
|
-
e as default
|
|
10
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.2
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
async function i() {
|
|
8
|
-
try {
|
|
9
|
-
return await import("typescript");
|
|
10
|
-
} catch (i2) {
|
|
11
|
-
throw console.error("Error initializing Node TypeScript module:", i2), i2;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
i as initialize
|
|
16
|
-
};
|