@sheetxl/studio-mui 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{WYCmUJpGhaAzfJcr.cjs → B3Nq9-k4C81JRW0-.cjs} +2 -2
- package/browser/cjs/{Bp25JuCA2taK48lY.cjs → B9OI7qeWsNfm7WWs.cjs} +2 -2
- package/browser/cjs/BDPsSQkiNGdcc9zj.cjs +6 -0
- package/browser/cjs/{5lrQc6ebnKFysmq3.cjs → BHUBpopDsxgJctuH.cjs} +1 -1
- package/browser/cjs/{B-tcUZY3WwHVsjFC.cjs → BZaW-PdeBjHfdvxZ.cjs} +2 -2
- package/browser/cjs/{DP_7ozELxxlik0xI.cjs → BZjNI66KGz0-AFMY.cjs} +1 -1
- package/browser/cjs/{DEnkHWsu727igCDW.cjs → BgvazM1E2TaQeqFg.cjs} +1 -1
- package/browser/cjs/{DSOsPfZL9_kyL9ln.cjs → BiUiU6TKTTPgJKKW.cjs} +3 -3
- package/browser/cjs/{Bptt_-UuaRMKdwY9.cjs → Bj7bc5rWiCV5sJIL.cjs} +2 -2
- package/browser/cjs/{DY_2g7vioK75DWuW.cjs → BxjXKLZa_Y0R2I7r.cjs} +2 -2
- package/browser/cjs/{CgewvR53mvgndBYJ.cjs → CJJ1kbtYl1q8qsPl.cjs} +7 -7
- package/browser/cjs/{B063Nbr-uy6miEeW.cjs → CbpGgxuWRUkWjln2.cjs} +1 -1
- package/browser/cjs/{D_3Edl4zCIfGZD8s.cjs → CduVOrBoxiyJQKEi.cjs} +2 -2
- package/browser/cjs/{M0QSvCGTWhSO5dni.cjs → CpYQgGDSN4rVHWjV.cjs} +4 -4
- package/browser/cjs/{ZDbKPSGJ-yUI16Lb.cjs → CvpCn_KjkUT6BZAv.cjs} +1 -1
- package/browser/cjs/{tRx7tGimGNCQpr04.cjs → DLIQJmDVS6b5p-S4.cjs} +2 -2
- package/browser/cjs/{CQmIQDdsypx55cb8.cjs → DZ_v1PMRoOoYWbDK.cjs} +2 -2
- package/browser/cjs/{BveI4rysOlsRJvby.cjs → DyOOPZiQZw4ICA8x.cjs} +3 -3
- package/browser/cjs/{CBfo8BUCxQqr5EG7.cjs → FGsc_miCCy0dxROQ.cjs} +1 -1
- package/browser/cjs/{V5ipiTc5GTsPLIat.cjs → FaWUWyeHjIX3vt6y.cjs} +1 -1
- package/browser/cjs/{Br0gn69JbvyUYDMg.cjs → GaFeFbQqr2_-ecWJ.cjs} +2 -2
- package/browser/cjs/{BZIDHjX8evLBDbvt.cjs → J9P0vds4Dz3-o9Eo.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{DjwklvllCc5gCwOJ.cjs → tGTclGMDMD5lDymb.cjs} +2 -2
- package/browser/cjs/{DEeqvwGNuFw8w157.cjs → wVzpW-xTRvy_QyxS.cjs} +1 -1
- package/browser/cjs/{CPE8Vo584fYhmjso.cjs → xykhFeKgxejQkSxx.cjs} +2 -2
- package/browser/esm/{BrjzLQb3ECtQX_oE.mjs → 2352i63sbQK6nEX1.mjs} +2 -2
- package/browser/esm/{CpvBz72f-J2m43rR.mjs → 6jYYVFUwIgjd7iZR.mjs} +1 -1
- package/browser/esm/{C7Ks61IOWv5mxPi5.mjs → B2oeey92Cmz-k-Co.mjs} +2 -2
- package/browser/esm/{CvbzFydCbYFpqozz.mjs → BEFAil_EH0at9aXe.mjs} +1 -1
- package/browser/esm/{DzVmvHLdD-ek8bqb.mjs → BXU7a2ngf1dNCek7.mjs} +2 -2
- package/browser/esm/{Dr00OJODZaQoFOPH.mjs → B_zFQsCiaYHumsrn.mjs} +2 -2
- package/browser/esm/{BIM5Wii-WyRfiTCP.mjs → BrVHVLsQwsqNk8as.mjs} +2 -2
- package/browser/esm/{C_iaOAYxfBeQ_Eao.mjs → C2RcIj6_iefW5rML.mjs} +4 -4
- package/browser/esm/{CNHwFwsPDx506Pv1.mjs → C5IAD7hgfux-w0Li.mjs} +1 -1
- package/browser/esm/{DmMAkUHShQPrUYdy.mjs → CFeM-z9ekc9_gQbX.mjs} +9 -9
- package/browser/esm/{D9i2f_vC22Se56A1.mjs → CZJuqzijNCZUONYl.mjs} +2 -2
- package/browser/esm/{CfXsn2J2t5iZRq47.mjs → CiZBxhTKEWBM2LSH.mjs} +6 -6
- package/browser/esm/{CzYlxA9vwNmFQ8sE.mjs → D726_qXr87zv3keG.mjs} +2 -2
- package/browser/esm/{D90EhJlb6d3offOa.mjs → DZlU8XeUy5v0cS1Q.mjs} +2 -2
- package/browser/esm/{D5zMI93VuwbUlba7.mjs → DfX1ESXLAdP12UN3.mjs} +4 -4
- package/browser/esm/{CLwgNIcx1dXAlqFF.mjs → Dqbh_pDOioxHWUvd.mjs} +2 -2
- package/browser/esm/{B3Ij1XnTXKB8Ra6l.mjs → Dqp5ziVWiFGtGLSH.mjs} +1 -1
- package/browser/esm/{DyytGTk_wDfb9u5F.mjs → DsujMJpqUVvGM8Dp.mjs} +1 -1
- package/browser/esm/{DwF_wDqk6LJKkqHC.mjs → OeDJWtgYAoxVqxv8.mjs} +1 -1
- package/browser/esm/{EqfxPHEY1TqRj5Ux.mjs → OzQBVBdO0NltsvF6.mjs} +1 -1
- package/browser/esm/{BJoEILXGs-4dsOid.mjs → TMS_lQiiM4zfvGOH.mjs} +1 -1
- package/browser/esm/{CRxSFb6mxsdqaEWw.mjs → aGVC-jYU9PrknRog.mjs} +3 -3
- package/browser/esm/{BsNWvF5TK-6d7dXG.mjs → hylXy9mhyamZbTKj.mjs} +10 -10
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{jwJWVJb9gDdlQ0cW.mjs → jguqiBDjTZZuSD7M.mjs} +1 -1
- package/browser/esm/{_W9VYfMjuPSlrtP4.mjs → lu9XUAr8Ohc7NW-y.mjs} +2 -2
- package/licenses/dependencies.txt +6 -6
- package/node/esm/{BWyrDf4jgObFanXE.mjs → 7-4VkicKM1yZ-A65.mjs} +1 -1
- package/node/esm/{CUBSAaqg00w1oZse.mjs → 7T2wPfM4GevYgiWU.mjs} +1 -1
- package/node/esm/{C1B1mWQAcYHCdSs1.mjs → B1mfBzmzN40p6ehZ.mjs} +1 -1
- package/node/esm/{B0ES7zIqSifg8qCO.mjs → BA2WLCm6PtXKxN_W.mjs} +1 -1
- package/node/esm/{Bea8u6AT5GuuzREd.mjs → BD3xtI_GYioKR79L.mjs} +1 -1
- package/node/esm/{BEeB-u2zgjucbLGy.mjs → BVs9641LuhzFDmz3.mjs} +5 -5
- package/node/esm/{Bu4F0S4wnxFDgT0c.mjs → BfRiJIiL8ZtL2sm-.mjs} +1 -1
- package/node/esm/{RlDXWMx7VZdvm6v_.mjs → Blrvc5SrD0lzf5T4.mjs} +1 -1
- package/node/esm/{D_HsSmvAUM93hhV7.mjs → ByGJ2Nuh_qDS_Lyk.mjs} +1 -1
- package/node/esm/{SjEP8IGjTybFF3GO.mjs → C2NJhzXyYe7Mmulu.mjs} +1 -1
- package/node/esm/{txd-xYXneGIWdMTi.mjs → C3-ElO9mWh9wxJQX.mjs} +1 -1
- package/node/esm/{k29lAtxWgg2NJOmE.mjs → CEn_tDPhuN7EoMV2.mjs} +3 -3
- package/node/esm/{BNjGAhc55jrQ1g3j.mjs → CL22PHaVgqWovJsp.mjs} +1 -1
- package/node/esm/{sPH28U-9oXTmsgtc.mjs → CSqU8uSbqIBxQMVN.mjs} +1 -1
- package/node/esm/{DPeCPqMlSAhL24yo.mjs → CiaVEaNKmAYEFKge.mjs} +1 -1
- package/node/esm/{DSlqkNGniwMkptsL.mjs → CrpyZx1SildNzku_.mjs} +1 -1
- package/node/esm/{AR8Pu9U1TlCmFr4k.mjs → D7d3KDQYzEXC6snC.mjs} +1 -1
- package/node/esm/{zgQ7l8vqbi0BmUvJ.mjs → DZHcYrAAuulCcm4_.mjs} +1 -1
- package/node/esm/{ChUaw-6H_k-rQrin.mjs → D_vmjLrHDS_eJGLi.mjs} +1 -1
- package/node/esm/{5GES52ASlImUnxiG.mjs → DoBTgwhidb2Z9fhN.mjs} +3 -3
- package/node/esm/{DpUbzQzROf1E0IEX.mjs → NQlkAV4IBkuzEHzY.mjs} +19 -19
- package/node/esm/{CEg9fJasdT_kctZx.mjs → aEDho-iqG7BHUAqc.mjs} +1 -1
- package/node/esm/{-ufruJ1KO7sCgQCc.mjs → hkEO846NT8ILsVQc.mjs} +1 -1
- package/node/esm/index.mjs +9 -9
- package/package.json +8 -8
- package/browser/cjs/wfgBpIXW-R13NDRi.cjs +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -90,7 +90,7 @@ const Te = i(n((n2, i2) => {
|
|
|
90
90
|
const r2 = { ...o3, onKeyDown: (e3) => {
|
|
91
91
|
x2?.dispatchToFocusedCommand(e3), e3.isDefaultPrevented() || e3.isPropagationStopped() || o3?.onKeyDown?.(e3);
|
|
92
92
|
} };
|
|
93
|
-
return O2(e2, { sort: () => import("./
|
|
93
|
+
return O2(e2, { sort: () => import("./CrpyZx1SildNzku_.mjs"), numberFormat: () => import("./BD3xtI_GYioKR79L.mjs"), hyperlink: () => import("./BA2WLCm6PtXKxN_W.mjs"), comments: () => import("./7T2wPfM4GevYgiWU.mjs"), find: () => import("./hkEO846NT8ILsVQc.mjs"), tableDetails: () => import("./DZHcYrAAuulCcm4_.mjs"), tableNew: () => import("./D7d3KDQYzEXC6snC.mjs"), namedDetails: () => import("./ByGJ2Nuh_qDS_Lyk.mjs") }[e2], r2, t2);
|
|
94
94
|
}, showOptions: I2, showInputOptions: A2, showError: (e2) => {
|
|
95
95
|
let t2, r2 = ue.Error, n3 = "Unknown Error";
|
|
96
96
|
"string" == typeof e2 ? n3 = e2 : e2 instanceof Error && (t2 = e2, e2.message && (n3 = e2.message)), e2 instanceof D && (r2 = ue.Info), o2(n3, { type: r2, enqueueProps: { error: t2 } });
|
|
@@ -187,7 +187,7 @@ const Te = i(n((n2, i2) => {
|
|
|
187
187
|
const { showModal: v3 } = ie();
|
|
188
188
|
return p(() => {
|
|
189
189
|
const e3 = () => new Promise((e4, o3) => {
|
|
190
|
-
const t3 = r.lazy(() => import("./
|
|
190
|
+
const t3 = r.lazy(() => import("./aEDho-iqG7BHUAqc.mjs")), n4 = v3(t3, { title: "Shortcut Keys Reference", commands: M3, onDone: () => {
|
|
191
191
|
n4.hide();
|
|
192
192
|
}, TransitionProps: { onExited: () => {
|
|
193
193
|
e4(true);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
7
|
import { Workbook as e, IRange as t } from "@sheetxl/sdk";
|
|
8
8
|
const n = async (e2, t2) => {
|
|
9
|
-
const { trimLeadingBlankRow: n2 = true, trimLeadingBlankColumn: r2 = true, excludeHidden: o = false, sheetKey: s = null, papaParseConfig: a = {} } = t2 || {}, l = await import("./
|
|
9
|
+
const { trimLeadingBlankRow: n2 = true, trimLeadingBlankColumn: r2 = true, excludeHidden: o = false, sheetKey: s = null, papaParseConfig: a = {} } = t2 || {}, l = await import("./C3-ElO9mWh9wxJQX.mjs").then((e3) => e3.p);
|
|
10
10
|
if (!e2) throw new Error("workbook must be specified");
|
|
11
11
|
let i = null;
|
|
12
12
|
if (null === s ? i = e2.getSelectedSheet() : "number" == typeof s ? i = e2.getSheets().search()[s] : "string" == typeof s && (i = e2.getSheets().getByName(s)), !i) throw new Error("invalid sheetKey specified");
|
|
@@ -27,7 +27,7 @@ const n = async (e2, t2) => {
|
|
|
27
27
|
const f = { ...a }, g = l.unparse(d, f);
|
|
28
28
|
return new TextEncoder().encode(g);
|
|
29
29
|
}, r = async (n2, r2) => {
|
|
30
|
-
const { papaParseConfig: o, setValuesOptions: s, constructorOptions: a } = r2 ?? {}, l = await import("./
|
|
30
|
+
const { papaParseConfig: o, setValuesOptions: s, constructorOptions: a } = r2 ?? {}, l = await import("./C3-ElO9mWh9wxJQX.mjs").then((e2) => e2.p), i = new TextDecoder().decode(n2);
|
|
31
31
|
let c = -1;
|
|
32
32
|
const d = new e(a), p = d.getSelectedSheet().getEntireRange().startIncrementalUpdates({ orientation: t.Orientation.Row }), u = r2?.onProgress;
|
|
33
33
|
let f = 0;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
7
|
import { e as t } from "./index.mjs";
|
|
8
|
-
import { c as e, b as s, r, t as o, a as i, p as n, d as l } from "./
|
|
9
|
-
import { IFont as a, IAutoFilter as c, Sort as u, IRange as h, AddressUtils as p, IFill as g, IStyle as
|
|
8
|
+
import { c as e, b as s, r, t as o, a as i, p as n, d as l } from "./BVs9641LuhzFDmz3.mjs";
|
|
9
|
+
import { IFont as a, IAutoFilter as c, Sort as u, IRange as h, AddressUtils as p, IFill as g, IStyle as d, ITextFrame as m, FormulaError as b, IBorder as f } from "@sheetxl/sdk";
|
|
10
10
|
class A {
|
|
11
11
|
constructor(t2) {
|
|
12
12
|
this.list = t2;
|
|
@@ -234,7 +234,7 @@ class B {
|
|
|
234
234
|
return "ctr" === t2 ? "center" : t2;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
class
|
|
237
|
+
class j {
|
|
238
238
|
visit(t2, e2, s2) {
|
|
239
239
|
}
|
|
240
240
|
processStroke(t2, e2, s2) {
|
|
@@ -330,7 +330,7 @@ class _ {
|
|
|
330
330
|
return t2.hasAttribute("t") && (e2.t = i(t2.getAttribute("t"))), t2.hasAttribute("l") && (e2.l = i(t2.getAttribute("l"))), t2.hasAttribute("b") && (e2.b = i(t2.getAttribute("b"))), t2.hasAttribute("r") && (e2.r = i(t2.getAttribute("r"))), 0 === Object.keys(e2).length ? null : e2;
|
|
331
331
|
}
|
|
332
332
|
processImageFill(t2, e2) {
|
|
333
|
-
return { ref: "https://
|
|
333
|
+
return { ref: "https://www.sheetxl.com/logo-color-padded-white.jpg", tile: false };
|
|
334
334
|
}
|
|
335
335
|
processPatternFill(t2, e2) {
|
|
336
336
|
const s2 = {}, r2 = e2.getAttribute("prst");
|
|
@@ -398,7 +398,7 @@ class _ {
|
|
|
398
398
|
return i2 ? ` ${s2} ${!i2 || parseFloat(i2) / r2}` : ` ${s2}`;
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
class
|
|
401
|
+
class _ extends j {
|
|
402
402
|
visit(t2, s2, r2) {
|
|
403
403
|
try {
|
|
404
404
|
const o2 = t2.evaluate("xfrm", s2);
|
|
@@ -640,7 +640,7 @@ class W {
|
|
|
640
640
|
}
|
|
641
641
|
parseTextElement(t2, e2, s2, r2) {
|
|
642
642
|
const o2 = t2.evaluate("p/pPr/defRPr", e2) ?? t2.evaluate("defRPr", e2);
|
|
643
|
-
o2 && (this.parseTextProperties(t2, o2, s2), new
|
|
643
|
+
o2 && (this.parseTextProperties(t2, o2, s2), new _().visit(t2, o2, s2));
|
|
644
644
|
let i2 = [], n2 = t2.evaluate("p/r", e2) ?? t2.evaluate("r", e2);
|
|
645
645
|
const l2 = (e3) => {
|
|
646
646
|
const s3 = {};
|
|
@@ -686,7 +686,7 @@ class $ {
|
|
|
686
686
|
return V(t2, e2, r2, "overlay", "overlay"), T(t2, e2, r2, "legendPos", "position"), s2.legend = r2, r2;
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
|
-
class K extends
|
|
689
|
+
class K extends _ {
|
|
690
690
|
visit(t2, e2, s2) {
|
|
691
691
|
const r2 = this.processFill(t2, e2, s2);
|
|
692
692
|
Object.keys(r2).length > 0 && (s2.fillNegative = r2);
|
|
@@ -722,7 +722,7 @@ class H extends W {
|
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
class
|
|
725
|
+
class J {
|
|
726
726
|
visit(t2, e2, s2) {
|
|
727
727
|
const r2 = t2.evaluate("manualLayout", e2);
|
|
728
728
|
if (r2) {
|
|
@@ -732,12 +732,12 @@ class q {
|
|
|
732
732
|
return s2;
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
|
-
class
|
|
735
|
+
class q {
|
|
736
736
|
visit(t2, e2, s2) {
|
|
737
737
|
return s2.name = e2.getAttribute("name"), s2;
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
class Q extends
|
|
740
|
+
class Q extends j {
|
|
741
741
|
visit(t2, e2, s2) {
|
|
742
742
|
const r2 = {};
|
|
743
743
|
r2.name = e2.getAttribute("name");
|
|
@@ -1132,7 +1132,7 @@ class ot extends rt {
|
|
|
1132
1132
|
const l2 = e2.getAttribute("xfId");
|
|
1133
1133
|
if (l2 && i2) {
|
|
1134
1134
|
const t3 = i2.get(parseInt(l2));
|
|
1135
|
-
t3 && t3 !==
|
|
1135
|
+
t3 && t3 !== d.BuiltInName.Normal && (r2.named = t3);
|
|
1136
1136
|
}
|
|
1137
1137
|
const a2 = (t3) => !(!n2 && e2.hasAttribute(t3)) || s(e2.getAttribute("applyFont"));
|
|
1138
1138
|
if (a2("applyFont")) {
|
|
@@ -1165,13 +1165,13 @@ class ot extends rt {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
processAlignment(t2, e2, r2) {
|
|
1167
1167
|
const o2 = {};
|
|
1168
|
-
if (e2?.hasAttribute("horizontal") ? o2.horizontal = e2.getAttribute("horizontal") : o2.horizontal =
|
|
1168
|
+
if (e2?.hasAttribute("horizontal") ? o2.horizontal = e2.getAttribute("horizontal") : o2.horizontal = m.HorizontalAlignment.General, e2?.hasAttribute("vertical") ? o2.vertical = e2.getAttribute("vertical") : o2.vertical = m.VerticalAlignment.Bottom, e2?.hasAttribute("indent") ? o2.indent = parseInt(e2.getAttribute("indent")) : o2.indent = 0, e2?.hasAttribute("relativeIndent") ? o2.relativeIndent = parseInt(e2.getAttribute("relativeIndent")) : o2.relativeIndent = 0, s(e2?.getAttribute("wrapText")) ? o2.overflow = m.Overflow.Wrap : o2.overflow = m.Overflow.Visible, s(e2?.getAttribute("shrinkToFit")) && (o2.overflow = m.Overflow.Shrink), e2?.hasAttribute("textRotation")) {
|
|
1169
1169
|
let t3 = parseFloat(e2.getAttribute("textRotation"));
|
|
1170
1170
|
t3 > 0 && t3 <= 90 ? t3 = 360 - t3 : t3 > 90 && t3 <= 180 ? t3 -= 90 : 255 === t3 && (t3 = 0, o2.stacked = true), o2.rotation = t3;
|
|
1171
1171
|
} else o2.rotation = 0;
|
|
1172
1172
|
e2?.hasAttribute("justifyLastLine") && (o2.justifyLastLine = s(e2.getAttribute("justifyLastLine")));
|
|
1173
1173
|
const i2 = e2?.getAttribute("readingOrder");
|
|
1174
|
-
return i2 && ("0" === i2 ? o2.readingDirection =
|
|
1174
|
+
return i2 && ("0" === i2 ? o2.readingDirection = m.ReadingDirection.Auto : "1" === i2 ? o2.readingDirection = m.ReadingDirection.LeftToRight : "2" === i2 ? o2.readingDirection = m.ReadingDirection.RightToLeft : console.warn(`invalid readingOrder: ${i2}`)), Object.keys(o2).length > 0 && (r2.alignment = o2), r2;
|
|
1175
1175
|
}
|
|
1176
1176
|
processProtection(t2, e2, r2) {
|
|
1177
1177
|
if (!e2) return;
|
|
@@ -1479,7 +1479,7 @@ class gt extends ht {
|
|
|
1479
1479
|
return s2.content = { type: "grpSp", json: o2 }, o2;
|
|
1480
1480
|
}
|
|
1481
1481
|
}
|
|
1482
|
-
class
|
|
1482
|
+
class dt extends ht {
|
|
1483
1483
|
visit(t2, e2, s2) {
|
|
1484
1484
|
if (!e2) return;
|
|
1485
1485
|
s2 = super.visit(t2, e2, s2);
|
|
@@ -1497,11 +1497,11 @@ class mt extends ht {
|
|
|
1497
1497
|
return s2.content = { type: "cxnSp", json: o2 }, o2;
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
1500
|
-
const
|
|
1500
|
+
const mt = "richTypes";
|
|
1501
1501
|
class bt {
|
|
1502
1502
|
visit(t2, e2, s2) {
|
|
1503
|
-
let r2 = t2.getVisitorParamsState().get(
|
|
1504
|
-
r2 || (r2 = [], t2.getVisitorParamsState().set(
|
|
1503
|
+
let r2 = t2.getVisitorParamsState().get(mt);
|
|
1504
|
+
r2 || (r2 = [], t2.getVisitorParamsState().set(mt, r2));
|
|
1505
1505
|
const o2 = e2.childNodes, i2 = o2.length;
|
|
1506
1506
|
for (let e3 = 0; e3 < i2; e3++) {
|
|
1507
1507
|
const s3 = o2.item(e3);
|
|
@@ -1628,7 +1628,7 @@ class Nt {
|
|
|
1628
1628
|
}
|
|
1629
1629
|
class Ot {
|
|
1630
1630
|
constructor() {
|
|
1631
|
-
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new N()), this.registerVisitor("spPr", new
|
|
1631
|
+
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new N()), this.registerVisitor("spPr", new _()), this.registerVisitor("txBody", new W()), this.registerVisitor("txPr", new W()), this.registerVisitor("c:chartSpace", new k()), this.registerVisitor("c:chartSpace", new L(), "chart"), this.registerVisitor("c:plotArea", new I()), this.registerVisitor("c:barChart", new E()), this.registerVisitor("c:doughnutChart", new R()), this.registerVisitor("c:lineChart", new R()), this.registerVisitor("c:ofPieType", new R()), this.registerVisitor("c:pieChart", new R()), this.registerVisitor("c:scatterChart", new R()), this.registerVisitor("c:barChart", new Y("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new Y("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new Y("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new Y("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new Y("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new Y("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new M()), this.registerVisitor("c:dPt", new U()), this.registerVisitor("c:marker", new z()), this.registerVisitor("c:catAx", new G()), this.registerVisitor("c:valAx", new G()), this.registerVisitor("c:dateAx", new G()), this.registerVisitor("c:majorGridlines", new P("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new P("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new W("labels.text"), "txPr"), this.registerVisitor("c:valAx", new W("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new W("labels.text"), "txPr"), this.registerVisitor("c:legend", new $()), this.registerVisitor("c:legend", new W("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new X()), this.registerVisitor("c:ser", new K(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new Y("labels"), "dLbls"), this.registerVisitor("c:dLbl", new Y("points")), this.registerVisitor("c:title", new H()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new J()), this.registerVisitor("c:dispUnits", new P("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new H("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new W(), "tx/rich"), this.registerVisitor("a:theme", new q()), this.registerVisitor("a:theme", new Q(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new Z(), "themeElements/fontScheme"), this.registerVisitor("autoFilter", new et()), this.registerVisitor("sortState", new st()), this.registerVisitor("s:workbook", new it()), this.registerVisitor("styleSheet", new ot()), this.registerVisitor("table", new nt()), this.registerVisitor("hlinkClick", new tt()), this.registerVisitor("wsDr", new lt()), this.registerVisitor("twoCellAnchor", new at()), this.registerVisitor("oneCellAnchor", new at()), this.registerVisitor("absoluteAnchor", new at()), this.registerVisitor("graphicFrame", new ut()), this.registerVisitor("sp", new ht()), this.registerVisitor("grpSp", new gt()), this.registerVisitor("cxnSp", new dt()), this.registerVisitor("pic", new pt()), this.registerVisitor("rvStructures", new bt()), this.registerVisitor("rvData", new At()), this.registerVisitor("comments", new yt()), this.registerVisitor("commentList", new vt(), "comment"), this.registerVisitor("comment", new W("content"), "text"), this.registerVisitor("ThreadedComments", new Ft()), this.registerVisitor("threadedComment", new Ct()), this.registerVisitor("threadedComment", new W("content"), "text"), this.registerVisitor("personList", new wt());
|
|
1632
1632
|
}
|
|
1633
1633
|
registerVisitor(t2, e2, s2 = null) {
|
|
1634
1634
|
-1 === t2.indexOf(":") && (t2 = "*:" + t2);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
package/node/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.9
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -5257,7 +5257,7 @@ const _p = { x: 0, y: 0 }, Tp = z(N((e15, t2) => {
|
|
|
5257
5257
|
t2?.onDone?.(), o2.hide();
|
|
5258
5258
|
} });
|
|
5259
5259
|
});
|
|
5260
|
-
}, Op = L.lazy(() => import("./
|
|
5260
|
+
}, Op = L.lazy(() => import("./BfRiJIiL8ZtL2sm-.mjs")), Ap = () => {
|
|
5261
5261
|
const { showModal: e15 } = Wi();
|
|
5262
5262
|
return (t2) => {
|
|
5263
5263
|
const { defaultOption: n2 = t2.options?.[0], cancelOption: o2 = "Cancel", ...r2 } = t2;
|
|
@@ -11096,7 +11096,7 @@ const xx = (e15, t2, n2 = null) => {
|
|
|
11096
11096
|
ye2.current = true;
|
|
11097
11097
|
const e16 = L.lazy(async () => {
|
|
11098
11098
|
try {
|
|
11099
|
-
const e17 = await import("./
|
|
11099
|
+
const e17 = await import("./CiaVEaNKmAYEFKge.mjs");
|
|
11100
11100
|
return ye2.current = false, be2.current = true, C2([...S2]), e17;
|
|
11101
11101
|
} catch (e17) {
|
|
11102
11102
|
return console.warn(e17), ee2.current?.(false), null;
|
|
@@ -13066,7 +13066,7 @@ xS.displayName = "TabStrip";
|
|
|
13066
13066
|
const SS = (e15) => D("svg", { ...e15, viewBox: "0 0 48 48", children: [R("path", { d: "M 2.2827924,0 C 1.5038324,0 0.87090248,0.52603 0.87090248,1.17149 v 25.39667 h -0.01 v 20.2607 c 0,0.39663 0.24025002,0.74639 0.60481992,0.95852 v 0.18499 h 0.50664 c 0.0972,0.0173 0.19732,0.0276 0.30092,0.0276 h 15.5346916 16.7448 v 0 h 11.35822 c 0.10311,0 0.20276,-0.0104 0.29945,-0.0276 h 0.0696 v -0.0182 c 0.59938,-0.13566 1.04238,-0.58606 1.04238,-1.12526 V 26.96484 c 0.006,-0.0429 0.009,-0.0853 0.009,-0.12925 V 1.17154 c 0,-0.64586 -0.63293,-1.17149 -1.41189,-1.17149 h -15.7478 v 2e-4 h -2.06997 V 5e-5 Z", fill: "#547DBE" }), R("path", { d: "m 2.8338324,2.7184 v 9.0404 H 11.538484 V 2.7184 Z m 11.2334116,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.26696,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.33258,0 v 9.0404 h 8.70465 V 2.7184 Z M 2.8338324,14.32723 v 8.84046 h 8.7046516 v -8.84046 z m 11.2334116,0 v 8.84046 h 8.70465 v -8.84046 z m 11.26696,0 v 8.84046 h 8.70465 v -8.84046 z m 11.33258,0 v 8.84046 h 8.70465 V 14.32723 Z M 2.8338324,25.73691 v 8.67308 h 8.7046516 v -8.67308 z m 11.2334116,0 v 8.67308 h 8.73721 v -8.67308 z m 11.26696,0 v 8.67308 h 8.70465 v -8.67308 z m 11.33258,0 v 8.67308 h 8.70465 V 25.73691 Z M 2.8693424,36.61859 v 8.67357 h 8.7046616 v -8.67357 z m 11.2339116,0 v 8.67357 h 8.73771 v -8.67357 z m 11.26697,0 v 8.67357 h 8.70465 v -8.67357 z m 11.33257,0 v 8.67357 h 8.70465 v -8.67357 z", fill: "#FFFFFF" }), R("path", { d: "m 2.8254424,2.72091 v 9.04041 H 11.570544 V 2.72091 Z m 0,11.60889 v 8.84036 H 11.570544 V 14.3298 Z m 0,11.40958 v 8.67357 h 8.7451016 v -8.67357 z m 0.036,10.88167 v 8.67358 h 8.7451116 v -8.67358 z", fill: "#547DBE", fillOpacity: "0.4" }), R("path", { d: "m 30.820434,6.19497 c 1.85291,0 3.66241,0.29708 5.4285,0.89113 1.7656,0.5942 3.49568,1.50108 5.19073,2.72107 l -2.37584,3.25571 c -1.40941,-1.01391 -2.79515,-1.76647 -4.15721,-2.25759 -1.36206,-0.49111 -2.72412,-0.73667 -4.08618,-0.73667 -2.5817,0 -4.58902,0.53064 -6.02232,1.59218 -1.43334,1.06143 -2.14989,2.56661 -2.14989,4.51523 v 0.0237 c 0,1.36241 0.41177,2.40021 1.23532,3.11315 0.82355,0.71288 1.89253,1.24367 3.20703,1.59217 1.31446,0.3485 2.71608,0.67341 4.20493,0.97439 1.29842,0.26929 2.58944,0.58216 3.87257,0.9386 1.28263,0.3565 2.45032,0.8635 3.50356,1.52097 1.05324,0.65747 1.89288,1.5486 2.51841,2.6734 0.62553,1.12485 0.93829,2.59035 0.93829,4.39635 v 0.0477 c 0,3.18435 -1.10849,5.64817 -3.32597,7.39066 -2.21698,1.7425 -5.33724,2.61399 -9.35978,2.61399 -1.67882,0 -3.25863,-0.15841 -4.73958,-0.47523 -1.4808,-0.31681 -2.86644,-0.79204 -4.15737,-1.42617 -1.29077,-0.63363 -2.49827,-1.42567 -3.6227,-2.37612 l 2.54179,-3.20819 c 1.39383,1.204 2.91819,2.10717 4.57323,2.70928 1.6549,0.60205 3.45641,0.90307 5.40463,0.90307 2.73991,0 4.85823,-0.52704 6.35447,-1.58048 1.49674,-1.05359 2.24511,-2.53098 2.24511,-4.43213 v -0.0237 c 0,-1.37834 -0.37197,-2.43583 -1.11639,-3.17245 -0.74442,-0.73668 -1.71824,-1.2912 -2.92194,-1.66359 -1.2037,-0.37223 -2.51051,-0.6851 -3.91993,-0.9386 -1.34627,-0.23762 -2.69635,-0.51485 -4.05046,-0.83182 -1.35417,-0.31677 -2.59339,-0.7841 -3.71782,-1.40204 -1.12448,-0.61779 -2.03125,-1.49708 -2.72017,-2.63782 -0.68898,-1.14078 -1.03341,-2.66156 -1.03341,-4.5627 v -0.0237 c 0,-3.21623 1.06898,-5.70753 3.20718,-7.47386 2.13805,-1.76648 5.15506,-2.64981 9.05121,-2.64981 z", strokeWidth: "2.5", stroke: "#EB594D", fill: "#f9CECB" })] }), CS = j(null), ES = () => {
|
|
13067
13067
|
const e15 = q(CS), [t2] = O(() => new r());
|
|
13068
13068
|
return V(() => e15 || t2, [e15]);
|
|
13069
|
-
}, kS = L.lazy(() => import("./
|
|
13069
|
+
}, kS = L.lazy(() => import("./D_vmjLrHDS_eJGLi.mjs")), _S = { lightbulb: { enabled: false }, tabSize: 2, acceptSuggestionOnCommitCharacter: true, acceptSuggestionOnEnter: "on", accessibilitySupport: "auto", automaticLayout: true, autoIndent: false, codeLens: true, colorDecorators: true, contextmenu: true, cursorBlinking: "blink", cursorSmoothCaretAnimation: false, cursorStyle: "line", disableLayerHinting: false, disableMonospaceOptimizations: false, dragAndDrop: true, glyphMargin: true, fixedOverflowWidgets: false, folding: true, foldingStrategy: "auto", fontLigatures: false, formatOnPaste: true, formatOnType: false, hideCursorInOverviewRuler: false, highlightActiveIndentGuide: true, links: true, lineDecorationsWidth: 8, lineNumbersMinChars: 3, mouseWheelZoom: false, multiCursorMergeOverlapping: true, multiCursorModifier: "alt", overviewRulerBorder: true, overviewRulerLanes: 2, quickSuggestions: true, quickSuggestionsDelay: 100, readOnly: false, renderControlCharacters: false, renderFinalNewline: true, renderIndentGuides: true, renderLineHighlight: "all", renderWhitespace: "none", revealHorizontalRightPadding: 30, roundedSelection: true, rulers: [], scrollBeyondLastColumn: 5, scrollBeyondLastLine: true, selectOnLineNumbers: true, selectionClipboard: true, selectionHighlight: true, showLightbulbIconMode: false, showFoldingControls: "mouseover", smoothScrolling: true, suggestOnTriggerCharacters: true, wordBasedSuggestions: true, wordSeparators: `~!@#$%^&*()-=+[{]}|;:'",.<>/?`, wordWrap: "off", wordWrapBreakAfterCharacters: " })]?|&,;", wordWrapBreakBeforeCharacters: "{([+", wordWrapBreakObtrusiveCharacters: ".", wordWrapColumn: 80, wordWrapMinified: true, wrappingIndent: "none" }, TS = async (e15, t2, n2) => {
|
|
13070
13070
|
const o2 = e15.getModel();
|
|
13071
13071
|
if (!o2) return;
|
|
13072
13072
|
const r2 = await t2.languages.typescript.getTypeScriptWorker(), i2 = await r2(o2.uri), l2 = await i2.getNavigationTree(o2.uri.toString()), a2 = e15.getPosition();
|
|
@@ -13216,7 +13216,7 @@ const LS = z(N((e15, t2) => {
|
|
|
13216
13216
|
}, []), I2 = P(null), L2 = Eo((e16, t3) => {
|
|
13217
13217
|
h2.current = { monaco: t3, editor: e16 }, C2(true), T2("Loading Types");
|
|
13218
13218
|
const n3 = w2.getScripts().getModules().search()[0]?.getSource() ?? "";
|
|
13219
|
-
e16.setValue(n3), import("./
|
|
13219
|
+
e16.setValue(n3), import("./B1mfBzmzN40p6ehZ.mjs").then((e17) => e17.c).then((n4) => {
|
|
13220
13220
|
T2(""), n4.AutoTypings.create(e16, { shareCache: true, monaco: t3, onError: (e17) => {
|
|
13221
13221
|
"Not implemented yet" === e17 && (e17 = "Compile Errors"), console.warn("Error compiling types", e17);
|
|
13222
13222
|
} }).then(async (n5) => {
|
|
@@ -13273,7 +13273,7 @@ const LS = z(N((e15, t2) => {
|
|
|
13273
13273
|
let t3 = false;
|
|
13274
13274
|
try {
|
|
13275
13275
|
const n4 = await (async () => {
|
|
13276
|
-
const e18 = await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/
|
|
13276
|
+
const e18 = await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/scripting.d.ts");
|
|
13277
13277
|
return await e18.text();
|
|
13278
13278
|
})(), o3 = e17.Uri.parse('inmemory://model/"sheetxl-models".d.ts'), r3 = e17.editor.createModel(n4, "typescript", o3);
|
|
13279
13279
|
e17.editor.setModelMarkers(r3, "default", []), t3 = true;
|
|
@@ -13401,7 +13401,7 @@ const LS = z(N((e15, t2) => {
|
|
|
13401
13401
|
r2?.set(c2, s2);
|
|
13402
13402
|
const d2 = s2.toRGBA().toString();
|
|
13403
13403
|
l2?.set(d2, s2);
|
|
13404
|
-
}, jS = L.lazy(() => import("./
|
|
13404
|
+
}, jS = L.lazy(() => import("./7-4VkicKM1yZ-A65.mjs")), US = z(N((e15, t2) => {
|
|
13405
13405
|
const { selectedColor: n2 = null, previewColor: o2 = e15.selectedColor ?? null, recentColors: r2, schemeLookup: l2, disableAlpha: a2 = false, previewDebounceTime: s2 = 100, initialPanelType: c2, defaultButtonSize: d2 = 24, width: u2, onElementLoad: h2, onDone: p2, onEyeDropStart: m2, onEyeDropStop: g2, onPreviewColor: f2, onPreviewColorImmediate: y2, onSelectColor: b2, autoColor: w2, autoColorLabel: v2 = "Automatic", autoColorPosition: C2 = PS.Start, compareRGB: E2 = false, darkMode: k2 = false, ..._2 } = e15, T2 = o2 || n2, M2 = Eo(f2, [f2]), L2 = Eo(y2, [y2]), z2 = Eo(b2, [b2]), P2 = Eo(m2, [m2]), H2 = Eo(g2, [g2]), [N2, B2] = O(false), $2 = ct(), W2 = V(() => l2 || i.getDefaultSchemeLookup(), [l2]), j2 = V(() => {
|
|
13406
13406
|
const e16 = /* @__PURE__ */ new Map(), t3 = /* @__PURE__ */ new Map(), n3 = [];
|
|
13407
13407
|
WS("Primary Background", "bg1", W2, n3, e16, t3), WS("Primary Text", "tx1", W2, n3, e16, t3), WS("Secondary Background", "bg2", W2, n3, e16, t3), WS("Secondary Text", "tx2", W2, n3, e16, t3), WS("Accent 1", "accent1", W2, n3, e16, t3), WS("Accent 2", "accent2", W2, n3, e16, t3), WS("Accent 3", "accent3", W2, n3, e16, t3), WS("Accent 4", "accent4", W2, n3, e16, t3), WS("Accent 5", "accent5", W2, n3, e16, t3), WS("Accent 6", "accent6", W2, n3, e16, t3);
|
|
@@ -14699,7 +14699,7 @@ const sE = z(N((e15, t2) => {
|
|
|
14699
14699
|
return Wh({ ...e16, children: n3 });
|
|
14700
14700
|
}, [y2]);
|
|
14701
14701
|
return D(J, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...o2 }, ref: et([l2, a2, t2]), ...i2, children: [R(J, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%" }, children: g2 ?? p2 }), R(J, { sx: { display: null !== y2 && 0 === y2.length ? "none" : "flex", flex: "1 1 0" }, children: R(vp, { createPopupPanel: v2, ref: c2, parentFloat: w2, createTooltip: ({ children: e16 }, t3) => R(pp, { label: "More", description: "More toolbar options…", disabled: t3, children: e16 }), icon: R(Xs, { children: R(Ge, {}) }) }) })] });
|
|
14702
|
-
})), cE = "https://unpkg.com/@sheetxl/scripting-templates/dist", dE = [{ key: "SheetXL", description: "SheetXL", mimeType: ".sxl", exts: ["sxl"], isDefault: true, handler: async (e15, t2) => (await import("./
|
|
14702
|
+
})), cE = "https://unpkg.com/@sheetxl/scripting-templates/dist", dE = [{ key: "SheetXL", description: "SheetXL", mimeType: ".sxl", exts: ["sxl"], isDefault: true, handler: async (e15, t2) => (await import("./C2NJhzXyYe7Mmulu.mjs")).fromBufferJSON(e15, t2) }, { key: "CSV", description: "Comma Delimited", mimeType: "text/csv", exts: ["csv"], handler: async (e15, t2) => (await import("./DoBTgwhidb2Z9fhN.mjs")).fromBufferCSV(e15, t2) }, { key: "Excel", description: "Excel Workbook", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", exts: ["xlsx", "xls", "xlsm"], handler: async (e15, t2) => (await import("./BVs9641LuhzFDmz3.mjs").then((e16) => e16.i)).fromBufferXLSX(e15, t2) }], uE = [{ key: "SheetXL", mimeType: "application/vnd.sheetxl.sheet", description: "SheetXL", ext: "sxl", isDefault: true, handler: async (e15, t2) => (await import("./C2NJhzXyYe7Mmulu.mjs")).toBufferJSON(e15, t2) }, { key: "CSV", mimeType: "text/csv", description: "Comma Delimited", ext: "csv", handler: async (e15, t2) => (await import("./DoBTgwhidb2Z9fhN.mjs")).toBufferCSV(e15, t2) }, { key: "Excel", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", description: "Excel Workbook", ext: "xlsx", tags: ["SheetJS Pro"], handler: async (e15, t2) => (await import("./BVs9641LuhzFDmz3.mjs").then((e16) => e16.i)).toBufferXLSX(e15, t2) }];
|
|
14703
14703
|
class hE {
|
|
14704
14704
|
constructor(e15 = dE, t2 = uE) {
|
|
14705
14705
|
this._readFormatTypes = [], this._writeFormatType = [], this._readFormatTypes = Object.freeze([...e15]), this._writeFormatType = Object.freeze([...t2]);
|
|
@@ -15746,7 +15746,7 @@ const rk = (e15 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:
|
|
|
15746
15746
|
}, value: m2 }), R(J, { ref: b2, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: m2 !== f2 ? "italic" : void 0, fontFamily: (e16) => e16.typography.fontFamily, letterSpacing: "0.00938em" }, children: m2 || i2 })] }) }) });
|
|
15747
15747
|
}));
|
|
15748
15748
|
ik.displayName = "WorkbookTitle";
|
|
15749
|
-
const lk = L.lazy(() => import("./
|
|
15749
|
+
const lk = L.lazy(() => import("./CEn_tDPhuN7EoMV2.mjs")), ak = z(N((e15, t2) => {
|
|
15750
15750
|
const { sx: n2, style: o2, className: r2, licenseKey: i2, ...l2 } = e15;
|
|
15751
15751
|
return i2 && a.setLicenseKey(i2), R(I, { children: R(lk, { ...l2, className: r2, sx: n2, style: o2, ref: t2 }) });
|
|
15752
15752
|
}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/studio-mui",
|
|
3
3
|
"description": "Studio - Spreadsheet UI built with SheetXL SDK using React & MUI.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.9",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"charting"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@sheetxl/grid-react": "^0.3.
|
|
40
|
-
"@sheetxl/io": "^0.3.
|
|
41
|
-
"@sheetxl/react": "^0.3.
|
|
42
|
-
"@sheetxl/utils": "^0.3.
|
|
43
|
-
"@sheetxl/utils-mui": "^0.3.
|
|
44
|
-
"@sheetxl/utils-react": "^0.3.
|
|
39
|
+
"@sheetxl/grid-react": "^0.3.9",
|
|
40
|
+
"@sheetxl/io": "^0.3.9",
|
|
41
|
+
"@sheetxl/react": "^0.3.9",
|
|
42
|
+
"@sheetxl/utils": "^0.3.9",
|
|
43
|
+
"@sheetxl/utils-mui": "^0.3.9",
|
|
44
|
+
"@sheetxl/utils-react": "^0.3.9",
|
|
45
45
|
"clsx": "^2.1.1",
|
|
46
46
|
"csstype": "^3.1.3",
|
|
47
47
|
"file-saver": "^2.0.5",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"tinycolor2": "^1.6.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@sheetxl/sdk": "^0.3.
|
|
62
|
+
"@sheetxl/sdk": "^0.3.9",
|
|
63
63
|
"@emotion/cache": "^11.14.0",
|
|
64
64
|
"@emotion/react": "^11.14.0",
|
|
65
65
|
"@emotion/styled": "^11.14.0",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.7
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("./CgewvR53mvgndBYJ.cjs"),p=require("./DSOsPfZL9_kyL9ln.cjs"),d=require("@sheetxl/sdk");class G{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let s=0;s<this.list.length;s++)t(this.list[s],s,this)}}const W=u=>u===!0||u==="1"||u==="on"||u==="true"||u!==!1&&u!=="0"&&u!=="off"&&u!=="false"&&null,X=u=>{const t=parseInt(u);return isNaN(t)?null:t},$=u=>{const t=parseFloat(u);return isNaN(t)?null:t},K=new Map;class S{constructor(t,e,s,r,o,i=null,n){const l=(c,h,g)=>n?.getRef?.(c,h,g,n?.parsedRefs),a=c=>n?.getRefs?.(c,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??K}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let o=0;o<r.length;o++){const i=r[o];if(i===""||i===".")continue;let n=[];for(let l=0;l<s.length;l++){const a=s[l],c=a.childNodes;for(let h=0;c&&h<c.length;h++){const g=a.childNodes[h];g.localName!==i&&i!=="*"||n.push(g)}}s=n}return s.length===1?s[0]:s.length===0?null:new G(s)}getFromPath(t,e){return I.Yt.getFromPath(t,e)}setToPath(t,e,s){return I.Yt.setToPath(t,e,s)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return o==null?s:o==="1"||o==="on"||o==="true"||o!=="0"&&o!=="off"&&o!=="false"&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return W}get INT_COPY(){return X}get FLOAT_COPY(){return $}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o){if(Array.isArray(o)){for(let n=0;n<o.length;n++)if(i==null||(i=o[n](i),i==null))return}else if(i==null||(i=o(i),i==null))return}this.setToPath(s,r,i)}}class V{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class q{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);i.nodeType===1&&i.localName==="Relationship"&&this.processRelationship(t,i,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const D=(u,t)=>{if(u||!u.hasAttribute("rot"))return;const e=u.getAttribute("rot"),s=I.Yt.roundAccurately(p.p(e),2);s!==-1e3&&(t.rotation=s)},f=(u,t,e,s,r)=>{const o=u.getValAttrAsString(s,t);o!==null&&(e[r]=o)},A=(u,t,e,s,r=s,o=null)=>{const i=u.getValAttrAsBoolean(s,t,o);i!==null&&(e[r]=i)},C=(u,t,e,s,r)=>{const o=u.getValAttrAsInteger(s,t);o!==null&&(e[r]=o)},y=(u,t,e,s,r,o=1)=>{const i=u.getValAttrAsFloat(s,t);i!==null&&(e[r]=i*o)};class H{visit(t,e,s){return A(t,e,s,"roundedCorners","roundedCorners"),C(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let m=0;m<c.length;m++){const b=c[m];if(b.xAxisId){const v=b.xAxisId,P=a.get(v);o[m+""]=P,b.offsetXAxis=m,delete b.xAxisId,s.xAxes=o,o.length=++i}if(b.yAxisId){const v=b.yAxisId,P=a.get(v);n[m+""]=P,b.offsetYAxis=m,delete b.yAxisId,s.yAxes=n,n.length=++l}r[m+""]=b}r.length=c.length;const h=t.getVisitorParamsState().get("series");if(!h||h.length===0)return;const g={};s.series=g;for(let m=0;m<h.length;m++)g[m+""]=h[m];g.length=h.length}}class J{visit(t,e,s){return A(t,e,s,"plotVisOnly","plotVisOnly"),f(t,e,s,"dispBlanksAs","dispBlanksAs"),A(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),A(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(r===!0||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",i!==null)}catch(r){throw new Error("Unexpected Error parsing Chart: "+r)}}}class Q{visit(t,e,s){let r={};return s.plotArea=r,r}}class O{EnumMappings(){}static fromOoxmlGradientType(t){return t==="circle"?"radial":t}static fromOoxmlLineCap(t){if(t==="rnd")return"round";if(t==="flat")return"butt";if(t==="sq")return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return t==="sng"?"single":t}static fromOoxmlAlignment(t){return t==="ctr"?"center":t}}class M{visit(t,e,s){}processStroke(t,e,s){const r={},o=t.evaluate("ln",e);if(o){o.hasAttribute("algn")&&(r.align=O.fromOoxmlAlignment(o.getAttribute("algn"))),o.hasAttribute("cap")&&(r.lineCap=O.fromOoxmlLineCap(o.getAttribute("cap"))),o.hasAttribute("cmpd")&&(r.compound=O.fromOoxmlCompound(o.getAttribute("cmpd"))),o.hasAttribute("w")&&(r.width=p.t(o.getAttribute("w")));const i=t.evaluate("miter",o);i&&(r.lineJoin="miter",i.hasAttribute("lim")&&(r.miter=parseFloat(i.getAttribute("lim")))),t.evaluate("bevel",o)&&(r.lineJoin="bevel"),t.evaluate("round",o)&&(r.lineJoin="round");const n=t.evaluate("custDash",o);if(n){const c=t.evaluate("ds",n);if(c&&c.length>0){let h="";for(let g=0;g<c.length;g++){const m=c.item(g);h+=p.a(m.getAttribute("d"))+","+p.a(m.getAttribute("sp"))}r.dash=h}}const l=t.evaluate("prstDash",o);l&&l.hasAttribute("val")&&(r.dash=l.getAttribute("val")),this.parseEndElement(t,o,r,"headEnd","head"),this.parseEndElement(t,o,r,"tailEnd","tail");const a=this.processFill(t,o,s);r.fill=a}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const n=i.getAttribute("len")?i.getAttribute("len"):"med",l=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=n+"-"+l}}processFill(t,e,s){const r={};if(t.evaluate("noFill",e))return r.none=!0,r;const o=t.evaluate("solidFill",e);if(o){const a=this.processAdjColor(t,o);return a&&(r.solid=a),r}const i=t.evaluate("gradFill",e);if(i){i.hasAttribute("rotWithShape")&&(r.isRotated=i.getAttribute("rotWithShape")==="1");const a=this.processGradFill(t,i);return r.gradient=a,r}const n=t.evaluate("pattFill",e);if(n){const a=this.processPatternFill(t,n);return r.pattern=a,r}const l=t.evaluate("blipFill",e);if(l){l.hasAttribute("rotWithShape")&&(r.isRotated=p.b(l.getAttribute("rotWithShape"))),l.hasAttribute("dpi")&&(r.dpi=l.getAttribute("dpi"));const a=this.processImageFill(t,l);return r.image=a,r}return r.none=!0,r}processGradFill(t,e){const s={},r=t.evaluate("lin",e);if(r){if(s.type="linear",r.hasAttribute("ang")){const c=p.p(r.getAttribute("ang"));s.angle=c}if(r.hasAttribute("scaled")){const c=p.b(r.getAttribute("scaled"));s.scaled=c}}const o={};e.hasAttribute("flip")&&(o.mirror=e.getAttribute("flip")),Object.keys(o).length>0&&(s.tile=o);const i=t.evaluate("path",e);if(i){i.hasAttribute("path")&&(s.type=O.fromOoxmlGradientType(i.getAttribute("path")));const c=t.evaluate("fillToRect",i);c&&(s.fillTo=this.getRect(c))}const n=t.evaluate("tileRect",e);n&&(s.tile.bounds=this.getRect(n));const l=[],a=t.evaluate("gsLst/gs",e);for(let c=0;a&&c<a.length;c++){const h=a.item(c),g={offset:p.a(h.getAttribute("pos")),color:this.processAdjColor(t,h)};l.push(g)}return l.length>0&&(s.stops=l),s}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=p.a(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=p.a(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=p.a(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=p.a(t.getAttribute("r"))),Object.keys(e).length===0?null:e}processImageFill(t,e){return{ref:"https://cdn.sheetxl.com/public/logo-color-square-onwhite.png",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const n=this.processAdjColor(t,o);n&&(s.background=n)}const i=t.evaluate("fgClr",e);if(i){let n=this.processAdjColor(t,i);n&&(s.foreground=n)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+p.a(e.getAttribute("r"))+","+p.a(e.getAttribute("g"))+","+p.a(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+p.p(e.getAttribute("hue"))+","+p.a(e.getAttribute("sat"))+","+p.a(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1){let n=i.localName;s+=n==="hue"||n==="hueOff"||n==="hueMod"?this.processAdjustmentElement(t,e,n,6e4):n==="gray"||n==="comp"||n==="inv"||n==="gamma"||n==="invGamma"?this.processAdjustmentElement(t,e,n,1):this.processAdjustmentElement(t,e,n)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class L extends M{visit(t,e,s){try{const r=t.evaluate("xfrm",e);if(r){D(r,s);const l={x:0,y:0,width:0,height:0},a=t.evaluate("off",r);a&&(l.x=p.c(a.getAttribute("x"))??0,l.y=p.c(a.getAttribute("y"))??0);const c=t.evaluate("ext",r);a&&(l.width=p.c(c.getAttribute("cx"))??0,l.height=p.c(c.getAttribute("cy"))??0),s.bounds=l}const o=t.evaluate("prstGeom",e);o?.hasAttribute("prst")?s.geometry=o?.getAttribute("prst"):t.evaluate("customGeom",e)&&console.warn("customGeom not supported yet");const i=this.processFill(t,e,s);i&&Object.keys(i).length>0&&(s.fill=i);const n=this.processStroke(t,e,s);return n&&Object.keys(n).length>0&&(s.stroke=n),s}catch(r){throw console.warn(r),new Error("Unexpected Error parsing Shape Properties element")}}}class N{visit(t,e,s){let r={};if(f(t,e,r,"grouping","grouping"),A(t,e,r,"varyColors","varyColors"),y(t,e,r,"gapWidth","gapWidth",.01),y(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),C(t,e,r,"bubbleScale","bubbleScale"),A(t,e,r,"showNegBubbles","showNegativeBubbleValues"),A(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),C(t,e,r,"firstSliceAng","startAngle"),C(t,e,r,"holeSize","holeSize"),f(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let o=t.getVisitorParamsState().get("types");o||(o=[],t.getVisitorParamsState().set("types",o)),o.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(r.length===0)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class Z extends N{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type=r==="col"?"column":"bar")}}class w{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);i!==null&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),n===!0?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(A(t,e,r,"showBubbleSize","showBubbleSize"),A(t,e,r,"showCatName","showCatName"),A(t,e,r,"showLeaderLines","showLeaderLines"),A(t,e,r,"showPercent","showPercentage"),A(t,e,r,"showSerName","showSerName"),A(t,e,r,"showVal","showVal"),A(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return l!==null&&(r.separator=l.textContent),f(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const o=r.getAttribute("formatCode");s.formatCode=o,r.hasAttribute("sourceLinked")&&(s.sourceLinked=r.getAttribute("sourceLinked")==="1")}}}const U=(u,t,e)=>{if(u.getValAttrAsBoolean("invertIfNegative",t)===!0)if(u.evaluate("extLst/ext/invertSolidFillFmt",t)){if(e.fill&&e.fillNegative){const s=u.getFromPath(e,"fill.solid.adjs");s&&u.setToPath(e,"fillNegative.solid.adjs",s)}}else{const s={val:"FFFFFF"},r={};r.solid=s,e.fillNegative=r;const o={val:"000000"},i={};i.solid=o;const n={};n.fill=i,e.strokeNegative=n}};class tt{visit(t,e,s){const r={};C(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;o!==null&&o.firstChild!==null&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),i!==null&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),n!==null&&(l=this.parsePointsAsString(t,n))),l!==null&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),C(t,e,r,"idx","idx"),A(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(r!==null){const o=r.firstChild.nodeValue;t.setToPath(s,"title.range",o)}else{const o=t.evaluate("tx/v",e);o!==null&&t.setToPath(s,"title.text.simpleRun",o.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let n=0;o&&r&&n<r;n++){let l=null,a=t.evaluate("pt[@idx='"+n+"']/v",e);a instanceof Node&&(l=a.textContent),i[n]=l}for(let n=0;n<i.length;n++)n>0&&(s+=","),i[n]!==void 0&&(s+=i[n]);return s+="}",s}afterVisit(t,e,s){U(t,e,s);let r=t.getFromPath(s,"points");if(r){const o=Object.keys(r);for(let i=0;i<o.length;i++){const n=o[i],l=t.getFromPath(r,n);if(!l)continue;let a=t.getFromPath(l,"markers");a&&(t.setToPath(s,"markers.points."+n,a),delete l.markers)}}}}class et{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return n!==null&&(o[n]=i),A(t,e,i,"bubble3D","bubble3D"),C(t,e,i,"explosion","explosion"),U(t,e,i),i}}class rt{visit(t,e,s){const r=e.parentNode.localName;if(r==="ser"||r==="dPt"){const o={},i=t.getValAttrAsString("size",e);i!==null&&(o.size=i);const n=t.getValAttrAsString("symbol",e);return n&&(o.type=n),s.markers=o,o}return null}}class x{visit(t,e,s){let r={};this.parseScaling(t,e,r),y(t,e,r,"majorUnit","majorUnits"),y(t,e,r,"minorUnit","minorUnits"),A(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),f(t,e,r,"majorTickMark","majorTickMarks"),f(t,e,r,"minorTickMark","minorTickMarks"),f(t,e,r,"crosses","crosses"),y(t,e,r,"crossesAt","crosses"),f(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),C(t,e,r,"lblOffset","labelOffset"),f(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=o!==null&&o===0,C(t,e,r,"tickMarkSkip","tickMarkSkip"),C(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),f(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(l!==null){n.dem=l;let a=t.getValAttrAsString(i,e);n.amt=a}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);r!==null&&(r==="ctr"?s.labelAlign="center":r==="l"?s.labelAlign="left":r==="r"&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);r!==null&&(r==="b"?s.orientation="bottom":r==="l"?s.orientation="left":r==="r"?s.orientation="right":r==="t"&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);o!==null&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked=o.getAttribute("sourceLinked")==="1")),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);r!==null&&(s.inverted=r!=="minMax");const o=t.getValAttrAsFloat("scaling/logBase",e);o!==null&&(s.logBase=o,s.scaleType="log"),y(t,e,s,"scaling/max","max"),y(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);r!==null&&(t.setToPath(s,"labels.shown",r!==!0),t.setToPath(s,"shown",r!==!0));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",i!==null);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",n!==null);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",l!==null)}}class F{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),new L().visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=c=>{const h={};let g=t.evaluate("t",c);const m=t.evaluate("rPr",c);m&&this.parseTextProperties(t,m,h),g?h.text=g.firstChild.textContent??"":c.textContent&&(h.text=c.textContent??""),i.push(h)};if(n?.length!==void 0)for(let c=0;n&&c<n.length;c++)l(n.item(c));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&D(a,s)}parseTextProperties(t,e,s){if(!e)return;e.hasAttribute("sz")&&(s.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(s.weight=e.getAttribute("b")==="1"?700:400),e.hasAttribute("i")&&(s.italic=e.getAttribute("i")==="1"),e.hasAttribute("u")&&(s.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(s.strike=e.getAttribute("strike"));const r=t.evaluate("latin",e);if(r&&!r.getAttribute("typeface").startsWith("+")){const o=s.font??{};if(r.hasAttribute("typeface")&&(o.family=r.getAttribute("typeface")),r.hasAttribute("panose")){const i=r.getAttribute("panose");i&&(o.fallbacks=[d.IFont.getPanoseFallback(i)])}r.hasAttribute("pitchFamily")&&(o.pitch=r.getAttribute("pitchFamily")),r.hasAttribute("charset")&&(o.charset=r.getAttribute("charset")),Object.keys(o).length>0&&(s.font=o)}}}class st{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let o=t.getFromPath(r,"title");o||(o={},t.setToPath(r,"title",o));let i=o,n=t.getValAttrAsBoolean("delete",e);return n!==null&&(i.shown=!n),i}return s}}class ot{visit(t,e,s){const r={};return A(t,e,r,"overlay","overlay"),f(t,e,r,"legendPos","position"),s.legend=r,r}}class it extends L{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class j extends F{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const o=r.firstElementChild.nodeValue;t.setToPath(s,"range",o)}}visit(t,e,s){const r={};A(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const r=s.text?.rotation??null;r!==null&&(s.rotation=parseInt(r),delete s.title.rotation)}}}class nt{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let o={};y(t,r,o,"x","x"),y(t,r,o,"y","y"),y(t,r,o,"w","w"),y(t,r,o,"h","h"),f(t,r,o,"xMode","xMode"),f(t,r,o,"yMode","yMode"),f(t,r,o,"wMode","wMode"),f(t,r,o,"hMode","hMode"),Object.keys(o).length>0&&(s.manualLayout=o)}return s}}class lt{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class at extends M{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1){let l=n.localName;const a=t.evaluate(l,e),c=this.processAdjColor(t,a);r[l]=c}}return Object.keys(r).length>0&&(s.colors=r),r}}class ct{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,s){if(!e)return;const r=t.evaluate("latin",e);if(!r)return;const o=r.getAttribute("typeface");o&&(s.family=o);const i=r.getAttribute("panose");return i&&(s.fallbacks=[d.IFont.getPanoseFallback(i)]),s}}class ut{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const i=t.getRef(o);typeof i=="string"&&(r.address=i)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class ht{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const s={type:d.IAutoFilter.Type.Color};return t.copyFromAttribute(e,"cellColor",s,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",s,"styleId",t.INT_COPY),s}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const s={type:d.IAutoFilter.Type.Custom};t.copyFromAttribute(e,"and",s,"and",t.BOOLEAN_COPY);const r=e.childNodes;s.filters=[];for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType!==1)continue;let n=null;i.localName==="customFilter"&&(n=this.processCustomFilter(t,i)),n&&s.filters.push(n)}return s}processDynamicFilter(t,e){const s={type:d.IAutoFilter.Type.Dynamic};return t.copyFromAttribute(e,"type",s,"dynamicType"),t.copyFromAttribute(e,"val",s,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",s,"maxVal",t.INT_COPY),s}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const s={type:d.IAutoFilter.Type.Items};t.copyFromAttribute(e,"blank",s,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",s,"calendarType");let r=[],o=[];const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1){if(l.localName==="dateGroupItem"){const a=this.processDateGroupItem(t,l);a&&r.push(a)}else if(l.localName==="filter"){const a=this.processFilterItem(t,l);a!==void 0&&o.push(a)}}}return r.length>0&&(s.dateGroups=r),o.length>0&&(s.items=o),s}processIcon(t,e){const s={type:d.IAutoFilter.Type.Icon};return t.copyFromAttribute(e,"iconId",s,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",s),s}processTop10(t,e){const s={type:d.IAutoFilter.Type.Top10};return t.copyFromAttribute(e,"filterVal",s,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",s,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",s,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val",t.FLOAT_COPY),s}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType!==1)continue;let l=null;n.localName==="colorFilter"?l=this.processColorFilter(t,n):n.localName==="customFilters"?l=this.processCustomFilters(t,n):n.localName==="dynamicFilter"?l=this.processDynamicFilter(t,n):n.localName==="filters"?l=this.processFilters(t,n):n.localName==="iconFilter"?l=this.processIcon(t,n):n.localName==="top10"&&(l=this.processTop10(t,n)),l&&o.push(l)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,e){if(!e)return null;const s={};if(!e.hasAttribute("colId"))return;s.offset=parseInt(e.getAttribute("colId"));let r=!1;return e.hasAttribute("hiddenButton")&&(r=p.b(e.getAttribute("hiddenButton"))),r&&(s.hiddenButton=!0),e.hasAttribute("showButton")&&(s.showButton=p.b(e.getAttribute("showButton"))),this.processFilterCriteria(t,e,s),s}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="filterColumn"){const l=this.processFilterColumn(t,n);l&&o.push(l)}}return o.length>0&&(s.fields=o),o}}class pt{visit(t,e,s){if(!e)return;const r={};if(t.copyFromAttribute(e,"ref",r),e.hasAttribute("caseSensitive")){const n=p.b(e.getAttribute("caseSensitive"));r.collatorOptions=n?d.Sort.CaseSensitiveOptions:d.Sort.CaseInsensitiveOptions}const o=e.getAttribute("sortMethod");o!=null&&o!=="none"&&(o==="stroke"?r.collatorOptions={...r.collatorOptions,collation:"stroke"}:o==="pinYin"&&(r.collatorOptions={...r.collatorOptions,collation:"pinyin"})),e.hasAttribute("columnSort")&&p.b(e.getAttribute("columnSort"))&&(r.orientation=d.IRange.Orientation.Column);const i=d.AddressUtils.fastStringToRange(r.ref);return this.processSortConditions(t,e,r,i),Object.keys(r).length>0&&(s.sort=r),r}processSortCondition(t,e,s){if(!e)return null;const r={};if(e.hasAttribute("ref")){if(e.hasAttribute("ref")){const o=e.getAttribute("ref"),i=d.AddressUtils.fastStringToRange(o);r.offset=s?i.colStart-s.colStart:i.colStart}return r.reverse=!1,e.hasAttribute("descending")&&(r.reverse=p.b(e.getAttribute("descending"))),t.copyFromAttribute(e,"sortBy",r,"sortOn"),t.copyFromAttribute(e,"dxfId",r),t.copyFromAttribute(e,"iconSet",r),t.copyFromAttribute(e,"customList",r),r}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let n=0;n<o.length;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="sortCondition"){const a=this.processSortCondition(t,l,r);a&&i.push(a)}}return i.length>0&&(s.fields=i),i}}class z{visit(t,e,s){}processDataBarColor(t,e,s,r,o="dk1"){if(!e)return;const i=p.d(n=>e.getAttribute(n),o);return i&&(s[r]=i),s}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="font"){const l={};this.processFont(t,n,l),s[o++]=l}}return s}processFont(t,e,s){t.getValAttrAsBoolean("b",e,!0)&&(s.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(s.style=d.IFont.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(s.strike=!0);const r=t.evaluate("u",e);if(r){const n=r.getAttribute("val");s.underline=n||d.IFont.UnderlineStyle.Single}f(t,e,s,"vertAlign","verticalAlign"),s.verticalAlign==="superscript"?s.verticalAlign=d.IFont.VerticalAlignment.Super:s.verticalAlign==="subscript"&&(s.verticalAlign=d.IFont.VerticalAlignment.Sub),y(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),f(t,e,s,"name","family"),f(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const n=i.getAttribute("val");if(n)switch(n){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return f(t,e,s,"scheme","scheme"),A(t,e,s,"shadow","shadow",!0),A(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),f(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="fill"&&this.processFill(t,n,s,o++)}return s}processFill(t,e,s,r){const o={type:d.IFill.Type.None},i=e.childNodes;let n=!1;for(let l=0;!n&&l<i.length;l++){const a=i.item(l);a.nodeType===1&&(a.localName==="gradientFill"?(this.processGradientFill(t,a,o),n=!0):a.localName==="patternFill"&&(this.processPatternFill(t,a,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=d.IFill.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=l=>{if(!l)return 0;const a=parseFloat(l);return isNaN(a)?0:a};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="stop"){const c={};r.push(c);const h=parseFloat(a.getAttribute("position"));c.offset=h;const g=t.evaluate("color",a);this.processDataBarColor(t,g,c,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?d.IFill.BuiltInSheetPattern.Solid:d.IFill.BuiltInSheetPattern.None);if(o===d.IFill.BuiltInSheetPattern.None)return{none:!0};s.type=d.IFill.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===d.IFill.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const g=n;n=l,l=g}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const h=t.evaluate("bgColor",e);return this.processDataBarColor(t,h,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let n=0;n<o.length;n++){const l=o.item(n);l.nodeType===1&&l.localName==="border"&&this.processBorder(t,l,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,d.IBorder.Edge.Left),this.processBorderStroke(t,e,i,d.IBorder.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,d.IBorder.Edge.Vertical),this.processBorderStroke(t,e,i,d.IBorder.Edge.Top),this.processBorderStroke(t,e,i,d.IBorder.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,d.IBorder.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class gt extends z{visit(t,e,s){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const r={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),r.fonts),this.processFills(t,t.evaluate("fills",e),r.fills),this.processBorders(t,t.evaluate("borders",e),r.borders,!0),r.fills[0]={type:d.IFill.Type.None},r.fills[1]={type:d.IFill.Type.Pattern,patternType:d.IFill.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const a=[];this.processCellStyles(t,t.evaluate("cellStyles",e),a,o,i),s.named=a}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="rgbColor"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="color"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="numFmt"){const l=n.getAttribute("numFmtId"),a=n.getAttribute("formatCode");if(l&&a){const c=a.replace(/\\(.)/g,"$1");r.set(parseInt(l),c)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="xf"){const c={};this.processXF(t,a,c,r,o,i),s.push(c)}}}processXF(t,e,s,r,o,i){if(!e)return;const n=e.getAttribute("xfId");if(n&&o){const c=o.get(parseInt(n));c&&c!==d.IStyle.BuiltInName.Normal&&(s.named=c)}const l=c=>!(!i&&e.hasAttribute(c))||p.b(e.getAttribute("applyFont"));if(l("applyFont")){const c=r.fonts[e.getAttribute("fontId")];c&&(s.font=c)}if(l("applyFill")){const c=r.fills[e.getAttribute("fillId")];c&&Object.keys(c).length>0&&(s.fill=c)}if(l("applyBorder")){const c=r.borders[e.getAttribute("borderId")];c&&Object.keys(c).length>0&&(s.border=c)}if(l("applyNumberFormat")){const c=e.getAttribute("numFmtId");if(c){const h=parseInt(c);let g;const m=t.getVisitorParamsState();if(m){const b=m.get("numFmts");b&&(g=b.get(h)),s.numberFormat=g??h}else console.warn("no visitor params state")}}l("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",e),s),l("applyProtection")&&this.processProtection(t,t.evaluate("protection",e),s);const a=p.b(e.getAttribute("quotePrefix"));a&&(s.quotePrefix=a)}processAlignment(t,e,s){const r={};if(e?.hasAttribute("horizontal")?r.horizontal=e.getAttribute("horizontal"):r.horizontal=d.ITextFrame.HorizontalAlignment.General,e?.hasAttribute("vertical")?r.vertical=e.getAttribute("vertical"):r.vertical=d.ITextFrame.VerticalAlignment.Bottom,e?.hasAttribute("indent")?r.indent=parseInt(e.getAttribute("indent")):r.indent=0,e?.hasAttribute("relativeIndent")?r.relativeIndent=parseInt(e.getAttribute("relativeIndent")):r.relativeIndent=0,p.b(e?.getAttribute("wrapText"))?r.overflow=d.ITextFrame.Overflow.Wrap:r.overflow=d.ITextFrame.Overflow.Visible,p.b(e?.getAttribute("shrinkToFit"))&&(r.overflow=d.ITextFrame.Overflow.Shrink),e?.hasAttribute("textRotation")){let i=parseFloat(e.getAttribute("textRotation"));i>0&&i<=90?i=360-i:i>90&&i<=180?i-=90:i===255&&(i=0,r.stacked=!0),r.rotation=i}else r.rotation=0;e?.hasAttribute("justifyLastLine")&&(r.justifyLastLine=p.b(e.getAttribute("justifyLastLine")));const o=e?.getAttribute("readingOrder");return o&&(o==="0"?r.readingDirection=d.ITextFrame.ReadingDirection.Auto:o==="1"?r.readingDirection=d.ITextFrame.ReadingDirection.LeftToRight:o==="2"?r.readingDirection=d.ITextFrame.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${o}`)),Object.keys(r).length>0&&(s.alignment=r),s}processProtection(t,e,s){if(!e)return;const r={},o=e.getAttribute("locked");o&&!p.b(o)&&(r.edit=!0);const i=e.getAttribute("hidden");return i&&p.b(i)&&(r.formulaHidden=!0),Object.keys(r).length>0&&(s.protection=r),s}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="font"){const n={};this.processFont(t,i,n),s.font=n}else if(i.nodeType===1&&i.localName==="fill"){const n=[];this.processFill(t,i,n,0),n.length>0&&n[0]&&(s.fill=n[0])}else if(i.nodeType===1&&i.localName==="border"){const n=[];this.processBorder(t,i,n,0,!1),n.length>0&&n[0]&&(s.border=n[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="dxf"){const l={};this.processDXF(t,n,l);const a=s.length;r.set(a,l),s.push(l)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,e,s,r,o=!1){const i=e.getAttribute("name"),n={name:i};e.hasAttribute("table")&&(n.table=p.b(e.getAttribute("table"))),e.hasAttribute("pivot")&&(n.pivot=p.b(e.getAttribute("pivot"))),o&&!n.pivot&&r.unshift(null);const l=e.childNodes;for(let a=0;a<l.length;a++){const c=l.item(a);if(c.nodeType===1&&c.localName==="tableStyleElement"){const h=c.getAttribute("type"),g=c.getAttribute("dxfId");let m=r?.[g];m||(console.warn("invalid dfx id",g),m={}),n[h]=m;let b=null;c.hasAttribute("size")&&(b=parseInt(c.getAttribute("size"))),b&&!isNaN(b)&&(m.size=b)}}delete n.name,s[i]=n}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let h=0;h<a.length;h++){const g=a.item(h);g.nodeType===1&&g.localName==="tableStyle"&&this.processTableStyle(t,g,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,e,s,r,o){if(!e)return;const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1&&l.localName==="cellStyle"){const a=parseInt(l.getAttribute("xfId")),c=l.getAttribute("name");if(o.set(a,c),!r[a])continue;const h={name:c,style:r[a]};l.getAttribute("hidden")&&(h.hidden=p.b(l.getAttribute("hidden"))),l.getAttribute("iLevel")&&(h.iLevel=parseInt(l.getAttribute("iLevel"))),s.push(h)}}}afterVisit(t,e,s){}}class dt extends z{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=i=>i!==!0&&i!=="1"&&i!=="on"&&i!=="true"&&(i===!1||i==="0"||i==="off"||i==="false"||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="sheet"&&this.processSheetRef(t,n,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="workbookView"&&(this.processWorkbookView(t,n,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,o=>o+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,o=>o]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&i.nodeType===3&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const n=e.getAttribute("localSheetId");if(!r[n]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);o.scope=r[n].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="definedName"&&this.processDefineName(t,n,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class mt{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableStyleInfo"&&(t.copyFromAttribute(n,"name",o),t.copyFromAttribute(n,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="tableColumn"){const n={};t.copyFromAttribute(i,"name",n),t.copyFromAttribute(i,"uniqueName",n),s.push(n)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableColumns"&&this.processTableColumn(t,n,o)}o.length>0&&(s.columns=o)}}class bt{visit(t,e,s){return s}}class k{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,e,s,r){if(!e)return;const o={c:0,r:0,x:0,y:0};return t.evaluate("col",e)&&(o.c=parseInt(t.evaluate("col",e).textContent)),t.evaluate("row",e)&&(o.r=parseInt(t.evaluate("row",e).textContent)),t.evaluate("colOff",e)&&(o.x=p.c(t.evaluate("colOff",e).textContent)),t.evaluate("rowOff",e)&&(o.y=p.c(t.evaluate("rowOff",e).textContent)),r==="from"?s.tl=o:s.br=o,s}}class B{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class At extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const n=t.evaluate("graphicFrameLocks",r);if(n){n.hasAttribute("noChangeAspect")&&(s.lockAspect=n.getAttribute("noChangeAspect")==="1");const l={};Object.keys(l).length>0&&(s.locks=l)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1)try{let a=l.localName;a==="chart"&&(a="chart"),o.type=a;const c=l.getAttribute("r:id");c&&(o.json=t.getRef(c))}catch(a){console.warn("Unable to parse graphicFrame",a)}}return o&&(s.content=o),o}}class _ extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const i=t.evaluate("spLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class ft extends B{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const a=t.evaluate("picLocks",o);if(a){a.hasAttribute("noChangeAspect")&&(r.lockAspect=a.getAttribute("noChangeAspect")==="1");const c={};t.copyFromAttribute(a,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(c).length>0&&(r.locks=c)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const a=i.getAttribute("r:embed")??i.getAttribute("embed");if(!a)return void console.warn("no rId found for blip",i);n=t.getRef(a,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class yt extends _{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const i=t.evaluate("grpSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class vt extends _{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const i=t.evaluate("cxnSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const R="richTypes";class Ft{visit(t,e,s){let r=t.getVisitorParamsState().get(R);r||(r=[],t.getVisitorParamsState().set(R,r));const o=e.childNodes,i=o.length;for(let n=0;n<i;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="s"){const a={type:l.getAttribute("t")??"n",keys:[]};this.processKeys(t,l,a),r.push(a)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let n=0;n<o;n++){const l=r.item(n);if(l.nodeType===1&&l.localName==="k"){const a=l.getAttribute("n"),c=l.getAttribute("t");i.push([a,c])}}}}const E="richData";class Ct{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(E);o||(o=[],t.getVisitorParamsState().set(E,o));const i=e.childNodes,n=i.length;for(let l=0;l<n;l++){const a=i.item(l);if(a.nodeType===1&&a.localName==="rv"){const c=r[a.getAttribute("s")],h={type:c.type};this.processValues(t,a,h,c);const g=this.mapType(t,h);o.push(g)}}return s.richData=o,o}mapType(t,e){if(e.type==="_error"){const s=e.errorType;if(s)try{e=d.FormulaError.getBuiltInById(s+1)}catch{}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let l=0;l<i;l++){const a=o.item(l);if(a.nodeType===1&&a.localName==="v"){const c=n[l];if(!c)return void t.warn("Invalid richData");const h=c[0],g=c[1];let m=a.textContent;g==="i"&&(m=Number(m)),s[h]=m}}}}class wt{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="author"){const n=i.firstChild;n&&n.nodeType===3&&s.push(n.textContent)}}}}class Pt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Nt{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Ot{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"id",r,"id",p.r),t.copyFromAttribute(e,"personId",r,"personId",p.r),t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"parentId",r,"parentId",p.r),t.copyFromAttribute(e,"dT",r),e.hasAttribute("done")&&(r.done=p.b(e.getAttribute("done"))),s.push(r),r}}class Tt{visit(t,e,s){const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="person"){const l={};t.copyFromAttribute(n,"id",l,"id",p.r),t.copyFromAttribute(n,"displayName",l),t.copyFromAttribute(n,"userId",l,"userId",p.r),t.copyFromAttribute(n,"providerId",l),r.push(l)}}return r.length>0&&(s.persons=r),r}}const St={};class Vt{constructor(t,e){this.path=t,this.visitor=e}}class Y{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new q),this.registerVisitor("spPr",new L),this.registerVisitor("txBody",new F),this.registerVisitor("txPr",new F),this.registerVisitor("c:chartSpace",new H),this.registerVisitor("c:chartSpace",new J,"chart"),this.registerVisitor("c:plotArea",new Q),this.registerVisitor("c:barChart",new Z),this.registerVisitor("c:doughnutChart",new N),this.registerVisitor("c:lineChart",new N),this.registerVisitor("c:ofPieType",new N),this.registerVisitor("c:pieChart",new N),this.registerVisitor("c:scatterChart",new N),this.registerVisitor("c:barChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new w("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new tt),this.registerVisitor("c:dPt",new et),this.registerVisitor("c:marker",new rt),this.registerVisitor("c:catAx",new x),this.registerVisitor("c:valAx",new x),this.registerVisitor("c:dateAx",new x),this.registerVisitor("c:majorGridlines",new V("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new V("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new F("labels.text"),"txPr"),this.registerVisitor("c:valAx",new F("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new F("labels.text"),"txPr"),this.registerVisitor("c:legend",new ot),this.registerVisitor("c:legend",new F("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new st),this.registerVisitor("c:ser",new it,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new w("labels"),"dLbls"),this.registerVisitor("c:dLbl",new w("points")),this.registerVisitor("c:title",new j),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new nt),this.registerVisitor("c:dispUnits",new V("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new j("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new F,"tx/rich"),this.registerVisitor("a:theme",new lt),this.registerVisitor("a:theme",new at,"themeElements/clrScheme"),this.registerVisitor("a:theme",new ct,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new ht),this.registerVisitor("sortState",new pt),this.registerVisitor("s:workbook",new dt),this.registerVisitor("styleSheet",new gt),this.registerVisitor("table",new mt),this.registerVisitor("hlinkClick",new ut),this.registerVisitor("wsDr",new bt),this.registerVisitor("twoCellAnchor",new k),this.registerVisitor("oneCellAnchor",new k),this.registerVisitor("absoluteAnchor",new k),this.registerVisitor("graphicFrame",new At),this.registerVisitor("sp",new _),this.registerVisitor("grpSp",new yt),this.registerVisitor("cxnSp",new vt),this.registerVisitor("pic",new ft),this.registerVisitor("rvStructures",new Ft),this.registerVisitor("rvData",new Ct),this.registerVisitor("comments",new wt),this.registerVisitor("commentList",new Pt,"comment"),this.registerVisitor("comment",new F("content"),"text"),this.registerVisitor("ThreadedComments",new Nt),this.registerVisitor("threadedComment",new Ot),this.registerVisitor("threadedComment",new F("content"),"text"),this.registerVisitor("personList",new Tt)}registerVisitor(t,e,s=null){t.indexOf(":")===-1&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new Vt(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=St){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new S(null,this,n,r,o,e,s),a=[];this._doWalk(i,l,a,r,o,e,s);for(let c=0;c<a.length;c++){const h=a[c];try{h.visitor?.afterVisit?.(h.context,h.elemParent,h.jsonParent)}catch(g){console.warn(`Error in afterVisit: ${h.context.getPath()}`,g)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let a=0;l&&a<l.length;a++){const c=l[a];let h=null;try{h=e.evaluate(c.path,r)}catch{console.warn(`"Invalid path '${c.path}' for '${t}'.`)}if(!h)continue;const g=m=>{let b=m.localName,v=m.parentNode;for(;v&&v!==r;)b=v.localName+"/"+b,v=v.parentNode;const P=e.getPath()+"/"+b;if(c.visitor){const T=new S(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c.visitor,T,s,m,o,i,n)}};if(h.length>0){const m=h;for(let b=0;b<m.length;b++)g(m.item(b))}else g(h)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const a=r.localName;this._walkScoped(a,e,s,r,l,i,n);const c=r.childNodes;for(let h=0;h<c.length;h++){const g=c.item(h);if(g.nodeType===1){const m=g,b=m.localName,v=this.visitorsByXmlTagName.get(b),P=e.getPath()+"/"+b,T=new S(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(v,T,s,m,l??o,i,n)}}return l}}exports.FromOOXMLConverter=Y,exports.default=Y;
|