@sheetxl/io-xlsx 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{B8BxPvkHiX4hcIlm.mjs → B7FIgKFyHincEoTQ.mjs} +1290 -1289
- package/browser/esm/{-fdNB43HUPxYWJ_R.mjs → BDkqo2SKzINJJB0-.mjs} +898 -898
- package/browser/esm/{BOq9DL07jEaKHuIM.mjs → BP2eZDr6dZ7gP02Z.mjs} +4 -4
- package/browser/esm/{vodnBCtDjw8qycsS.mjs → BQw8xcZ6k06Tq6lY.mjs} +2 -2
- package/browser/esm/{CbR2WXJw8AmmbFY-.mjs → BUaKY12tmPZDwfZx.mjs} +1 -1
- package/browser/esm/{CKeoydawnx6JqzIh.mjs → Ck5-R8xrLh89G56Q.mjs} +2 -2
- package/browser/esm/{DWL__gLKpzWgIAgP.mjs → CvaZql_oqszNei5v.mjs} +1 -1
- package/browser/esm/{yHnVx36dSghP3233.mjs → CzWmtWMV9HfkBne5.mjs} +193 -174
- package/browser/esm/{DxkJJ65lFs0Fg6YW.mjs → Di9ttuWnx0eCbSUA.mjs} +2 -2
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{BjtXA8Q58TjpX90f.mjs → lqWdqDnIKZxyet1d.mjs} +2 -2
- package/browser/esm/{7zN_b2s0BRH9UClF.mjs → vlyPCdsYGtutUTnn.mjs} +1443 -1426
- package/node/esm/{CufzeuvvI4_JrCZt.mjs → B2uSae_kN-7PrVjI.mjs} +370 -370
- package/node/esm/{DsfZ2R68TKJ5FFKz.mjs → BO3IZgkfKGIGMKYd.mjs} +1444 -1442
- package/node/esm/{Bun4U-VOiQ4A-B9o.mjs → CLdbYG5SCBndfk-q.mjs} +2 -2
- package/node/esm/{BzKl-VdTNvl6702Y.mjs → CtKLRPHWl5-_lwfr.mjs} +1521 -1505
- package/node/esm/{DLq4doP565FaG1oh.mjs → CzEwnjXK_YIWXQQh.mjs} +2 -2
- package/node/esm/{BRjPLGDja5nIYqeX.mjs → D4thYKlDAXXgB-tC.mjs} +2 -2
- package/node/esm/{CJzOPo9n5d81oTwp.mjs → DmYe7T4XtIyt-qdA.mjs} +221 -201
- package/node/esm/{B74b9YqT29KIKqCT.mjs → bUN-BbKU7oHGJmVh.mjs} +1 -1
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
- package/types/src/OOXMLExtensions.d.ts +7 -0
- package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +5 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v1.0.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v1.0.4
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
|
-
import { A as e, B as t,
|
|
8
|
-
import { a as
|
|
9
|
-
import { c as
|
|
7
|
+
import { A as e, B as t, Ct as n, Dt as r, F as i, Ht as a, I as o, L as s, M as c, N as l, Nr as u, Nt as d, P as f, Pr as p, R as m, St as h, Tr as g, Tt as _, Ut as v, V as ee, Wt as y, bt as te, dn as ne, er as b, fn as re, gt as ie, in as ae, j as oe, jt as se, k as x, mn as ce, or as S, r as le, rn as ue, t as de, tr as C, v as fe, vt as pe, wt as w, xt as T, yn as me, z as he } from "./vlyPCdsYGtutUTnn.mjs";
|
|
8
|
+
import { a as ge, i as _e, n as ve, r as ye } from "./BDkqo2SKzINJJB0-.mjs";
|
|
9
|
+
import { c as be, l as xe, o as Se, r as Ce, s as we } from "./BQw8xcZ6k06Tq6lY.mjs";
|
|
10
10
|
import { CommonUtils as E } from "@sheetxl/utils";
|
|
11
|
-
import { AddressUtils as D, FormulaError as O, IBorders as k, ICellStyle as A, ICondition as j, IFill as M, IFont as N, IRange as
|
|
12
|
-
var
|
|
11
|
+
import { AddressUtils as D, FormulaError as O, IBorders as k, ICellStyle as A, ICondition as j, IFill as M, IFont as N, IRange as Te, IShape as P, ISlicerStyle as F, ITextFrame as I, ShapeStyleUtils as Ee, Sort as L, Tuple as De } from "@sheetxl/sdk";
|
|
12
|
+
var Oe = class {
|
|
13
13
|
constructor(e) {
|
|
14
14
|
this.list = e;
|
|
15
15
|
}
|
|
@@ -35,13 +35,13 @@ var De = class {
|
|
|
35
35
|
[Symbol.iterator]() {
|
|
36
36
|
return this.list.values();
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, ke = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, R = (e) => {
|
|
39
39
|
let t = parseInt(e);
|
|
40
40
|
return isNaN(t) ? null : t;
|
|
41
41
|
}, Ae = (e) => {
|
|
42
42
|
let t = parseFloat(e);
|
|
43
43
|
return isNaN(t) ? null : t;
|
|
44
|
-
}, je = /* @__PURE__ */ new Map(),
|
|
44
|
+
}, je = /* @__PURE__ */ new Map(), z = class {
|
|
45
45
|
constructor(e, t, n, r, i, a = null, o = E.EmptyObject) {
|
|
46
46
|
this._fileLocation = "";
|
|
47
47
|
let s = (e, t, n) => o?.getRef?.(e, t, n, o?.parsedRefs), c = (e) => o?.getRefs?.(e, o?.parsedRefs);
|
|
@@ -114,7 +114,7 @@ var De = class {
|
|
|
114
114
|
}
|
|
115
115
|
if (n = a, n.length === 0) return null;
|
|
116
116
|
}
|
|
117
|
-
return n.length === 1 ? n[0] : n.length === 0 ? null : new
|
|
117
|
+
return n.length === 1 ? n[0] : n.length === 0 ? null : new Oe(n);
|
|
118
118
|
}
|
|
119
119
|
_matchesElementName(e, t) {
|
|
120
120
|
return t.includes(":") ? (e.tagName || e.nodeName) === t : e.localName === t;
|
|
@@ -154,10 +154,10 @@ var De = class {
|
|
|
154
154
|
return n && n.hasAttribute("val") ? parseFloat(n.getAttribute("val")) ?? null : null;
|
|
155
155
|
}
|
|
156
156
|
get BOOLEAN_COPY() {
|
|
157
|
-
return
|
|
157
|
+
return ke;
|
|
158
158
|
}
|
|
159
159
|
get INT_COPY() {
|
|
160
|
-
return
|
|
160
|
+
return R;
|
|
161
161
|
}
|
|
162
162
|
get FLOAT_COPY() {
|
|
163
163
|
return Ae;
|
|
@@ -173,7 +173,7 @@ var De = class {
|
|
|
173
173
|
}
|
|
174
174
|
this.setToPath(n, r, a);
|
|
175
175
|
}
|
|
176
|
-
},
|
|
176
|
+
}, B = (e, t) => {
|
|
177
177
|
let n = [], r = e.childNodes, i = r.length;
|
|
178
178
|
for (let e = 0; e < i; e++) {
|
|
179
179
|
let i = r.item(e);
|
|
@@ -184,8 +184,8 @@ var De = class {
|
|
|
184
184
|
["fillRef", "fill"],
|
|
185
185
|
["lnRef", "stroke"],
|
|
186
186
|
["effectRef", "effect"]
|
|
187
|
-
],
|
|
188
|
-
let n = new
|
|
187
|
+
], V = (e, t) => {
|
|
188
|
+
let n = new f(), r = {};
|
|
189
189
|
for (let [i, a] of Me) {
|
|
190
190
|
let o = e.evaluate(i, t);
|
|
191
191
|
if (!o) continue;
|
|
@@ -198,7 +198,7 @@ var De = class {
|
|
|
198
198
|
a && (t.color = a), r.font = t;
|
|
199
199
|
}
|
|
200
200
|
return r;
|
|
201
|
-
},
|
|
201
|
+
}, H = class {
|
|
202
202
|
visit(e, t, n) {
|
|
203
203
|
if (!t) return;
|
|
204
204
|
let r = e.evaluate("*/cNvPr", t);
|
|
@@ -207,9 +207,9 @@ var De = class {
|
|
|
207
207
|
readNonVisualDetails(e, t, n) {
|
|
208
208
|
t.hasAttribute("title") && (n.title = t.getAttribute("title"));
|
|
209
209
|
let r = e.evaluate("hlinkClick", t);
|
|
210
|
-
r && (n.hyperlink =
|
|
210
|
+
r && (n.hyperlink = c(e, r));
|
|
211
211
|
let i = e.evaluate("hlinkHover", t);
|
|
212
|
-
i && (n.hoverHyperlink =
|
|
212
|
+
i && (n.hoverHyperlink = c(e, i));
|
|
213
213
|
let a = e.evaluate("extLst", t), o = a ? e.serializeElement(a) : null;
|
|
214
214
|
o && (n.extLst = {
|
|
215
215
|
...n.extLst,
|
|
@@ -254,7 +254,7 @@ var De = class {
|
|
|
254
254
|
readStyleRefs(e, t, n) {
|
|
255
255
|
let r = e.evaluate("style", t);
|
|
256
256
|
if (!r) return void (n.style = null);
|
|
257
|
-
let i =
|
|
257
|
+
let i = V(e, r), a = Ee.withoutDefaultStyleRefs({
|
|
258
258
|
...n,
|
|
259
259
|
style: i
|
|
260
260
|
});
|
|
@@ -266,7 +266,7 @@ var De = class {
|
|
|
266
266
|
let n = {};
|
|
267
267
|
for (let e = 0; e < t.length; e++) {
|
|
268
268
|
let r = t.item(e);
|
|
269
|
-
r.name.startsWith("xmlns") || (n[r.localName ?? r.name] =
|
|
269
|
+
r.name.startsWith("xmlns") || (n[r.localName ?? r.name] = v(r.value));
|
|
270
270
|
}
|
|
271
271
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
272
272
|
}
|
|
@@ -280,16 +280,16 @@ var De = class {
|
|
|
280
280
|
["spDef", "shape"],
|
|
281
281
|
["lnDef", "line"],
|
|
282
282
|
["txDef", "text"]
|
|
283
|
-
],
|
|
283
|
+
], U = (e, t) => {
|
|
284
284
|
let n = t.getAttribute("dxfId");
|
|
285
285
|
if (n === null) return;
|
|
286
286
|
let r = parseInt(n);
|
|
287
287
|
return e.getVisitorParamsState().get("dxfs")?.get(r) || (e.warn(`A color filter or sort names a format that does not exist (dxfId '${n}').`), {});
|
|
288
|
-
},
|
|
288
|
+
}, W = (e) => e === "1" || e === "true", G = class {
|
|
289
289
|
visit(e, t, n) {}
|
|
290
290
|
processDataBarColor(e, t, n, r, i = "auto") {
|
|
291
291
|
if (!t) return;
|
|
292
|
-
let a =
|
|
292
|
+
let a = b((e) => t.getAttribute(e), i);
|
|
293
293
|
return a && (n[r] = a), n;
|
|
294
294
|
}
|
|
295
295
|
processFonts(e, t, n) {
|
|
@@ -304,18 +304,18 @@ var De = class {
|
|
|
304
304
|
}
|
|
305
305
|
return n;
|
|
306
306
|
}
|
|
307
|
-
processFont(e,
|
|
308
|
-
e.getValAttrAsBoolean("b",
|
|
309
|
-
let a = e.evaluate("u",
|
|
307
|
+
processFont(e, r, i) {
|
|
308
|
+
e.getValAttrAsBoolean("b", r, !0) && (i.weight = 700), e.getValAttrAsBoolean("i", r, !0) && (i.style = N.Style.Italic), e.getValAttrAsBoolean("strike", r, !0) && (i.strike = w(!0));
|
|
309
|
+
let a = e.evaluate("u", r);
|
|
310
310
|
if (a) {
|
|
311
311
|
let e = a.getAttribute("val");
|
|
312
|
-
i.underline =
|
|
312
|
+
i.underline = _(e);
|
|
313
313
|
}
|
|
314
|
-
let o = T(e.evaluate("vertAlign",
|
|
315
|
-
o !== void 0 && (i.baseline = o), m(e,
|
|
316
|
-
let
|
|
317
|
-
this.processDataBarColor(e,
|
|
318
|
-
let l = e.evaluate("family",
|
|
314
|
+
let o = T(e.evaluate("vertAlign", r)?.getAttribute("val"));
|
|
315
|
+
o !== void 0 && (i.baseline = o), m(e, r, i, "sz", "size");
|
|
316
|
+
let c = e.evaluate("color", r);
|
|
317
|
+
this.processDataBarColor(e, c, i, "color"), i.color ||= "auto", t(e, r, i, "name", "family"), t(e, r, i, "rFont", "family");
|
|
318
|
+
let l = e.evaluate("family", r);
|
|
319
319
|
if (l) {
|
|
320
320
|
let e = l.getAttribute("val");
|
|
321
321
|
if (e) switch (e) {
|
|
@@ -334,12 +334,12 @@ var De = class {
|
|
|
334
334
|
case "5": i.fallbacks = ["fantasy"];
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
h(i, e.evaluate("scheme",
|
|
337
|
+
h(i, e.evaluate("scheme", r)?.getAttribute("val")), s(e, r, i, "shadow", "shadow", !0), s(e, r, i, "outline", "outline", !0);
|
|
338
338
|
for (let t of ["condense", "extend"]) {
|
|
339
|
-
let a =
|
|
339
|
+
let a = n(t, !!e.getValAttrAsBoolean(t, r, !0));
|
|
340
340
|
a !== void 0 && (i.letterSpacing = a);
|
|
341
341
|
}
|
|
342
|
-
return
|
|
342
|
+
return he(e, r, i, "charset", "charset"), i;
|
|
343
343
|
}
|
|
344
344
|
processFills(e, t, n) {
|
|
345
345
|
if (!t) return;
|
|
@@ -367,10 +367,10 @@ var De = class {
|
|
|
367
367
|
i && (n.gradientType = i);
|
|
368
368
|
let a = t.hasAttribute("degree") ? parseFloat(t.getAttribute("degree")) : 0;
|
|
369
369
|
(a + 90) % 360 != 0 && (n.angle = (a + 90) % 360), (t.hasAttribute("left") || t.hasAttribute("top") || t.hasAttribute("right") || t.hasAttribute("bottom")) && (n.focus = {
|
|
370
|
-
left:
|
|
371
|
-
top:
|
|
372
|
-
right:
|
|
373
|
-
bottom:
|
|
370
|
+
left: K(t.getAttribute("left")),
|
|
371
|
+
top: K(t.getAttribute("top")),
|
|
372
|
+
right: K(t.getAttribute("right")),
|
|
373
|
+
bottom: K(t.getAttribute("bottom"))
|
|
374
374
|
});
|
|
375
375
|
let o = t.childNodes, s = o.length;
|
|
376
376
|
for (let t = 0; t < s; t++) {
|
|
@@ -413,7 +413,7 @@ var De = class {
|
|
|
413
413
|
let a = {};
|
|
414
414
|
this.processBorderStroke(e, t, a, k.Edge.Left), this.processBorderStroke(e, t, a, k.Edge.Right), i ? (a.right || a.left) && (a.vertical = a.right ? { ...a.right } : { ...a.left }) : this.processBorderStroke(e, t, a, k.Edge.Vertical), this.processBorderStroke(e, t, a, k.Edge.Top), this.processBorderStroke(e, t, a, k.Edge.Bottom), i ? (a.bottom || a.top) && (a.horizontal = a.bottom ? { ...a.bottom } : { ...a.top }) : this.processBorderStroke(e, t, a, k.Edge.Horizontal);
|
|
415
415
|
let o = this.processBorderStroke(e, t, {}, "diagonal");
|
|
416
|
-
return o && (
|
|
416
|
+
return o && (W(t.getAttribute("diagonalUp")) && (a.diagonalUp = { ...o }), W(t.getAttribute("diagonalDown")) && (a.diagonalDown = { ...o })), n[r] = a, n;
|
|
417
417
|
}
|
|
418
418
|
processBorderStroke(e, t, n, r) {
|
|
419
419
|
if (!t) return;
|
|
@@ -424,11 +424,11 @@ var De = class {
|
|
|
424
424
|
let o = e.evaluate("color", i);
|
|
425
425
|
return o && this.processDataBarColor(e, o, a, "color"), Object.keys(a).length > 0 ? n[r] = a : null;
|
|
426
426
|
}
|
|
427
|
-
},
|
|
427
|
+
}, K = (e) => {
|
|
428
428
|
if (!e) return 0;
|
|
429
429
|
let t = parseFloat(e);
|
|
430
430
|
return isNaN(t) ? 0 : t;
|
|
431
|
-
},
|
|
431
|
+
}, q = (e, t) => {
|
|
432
432
|
if (!e || e.nodeType !== 1) return null;
|
|
433
433
|
let n = e.childNodes;
|
|
434
434
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -440,7 +440,7 @@ var De = class {
|
|
|
440
440
|
auto: "auto",
|
|
441
441
|
autoNoTable: "automaticExceptTables",
|
|
442
442
|
manual: "manual"
|
|
443
|
-
},
|
|
443
|
+
}, J = [
|
|
444
444
|
"tableId",
|
|
445
445
|
"columnId",
|
|
446
446
|
"cacheName",
|
|
@@ -460,7 +460,7 @@ var De = class {
|
|
|
460
460
|
"xr10:uid",
|
|
461
461
|
"cache",
|
|
462
462
|
"caption"
|
|
463
|
-
]),
|
|
463
|
+
]), Y = (e, t) => {
|
|
464
464
|
let n = e.content, r = n?.json;
|
|
465
465
|
if (r) {
|
|
466
466
|
if (n.type === "shape" || n.type === "picture") {
|
|
@@ -476,9 +476,9 @@ var De = class {
|
|
|
476
476
|
}
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
|
-
if (n.type === "group") for (let e of r.members ?? [])
|
|
479
|
+
if (n.type === "group") for (let e of r.members ?? []) Y(e, !0);
|
|
480
480
|
}
|
|
481
|
-
},
|
|
481
|
+
}, X = class extends H {
|
|
482
482
|
visit(e, t, n) {
|
|
483
483
|
if (t) return this.visitShape(e, t, n, "sp", "nvSpPr/cNvSpPr/spLocks");
|
|
484
484
|
}
|
|
@@ -496,7 +496,7 @@ var De = class {
|
|
|
496
496
|
if (t.getPath().includes("Fallback") && r.content) {
|
|
497
497
|
let i = r.content.json;
|
|
498
498
|
if (r.content.type === "shape" && i && (i.type ?? P.Type.Shape) === o) {
|
|
499
|
-
let r = t.evaluate("txBody", n), a = r ? new
|
|
499
|
+
let r = t.evaluate("txBody", n), a = r ? new x().readTextBody(t, r) : null;
|
|
500
500
|
a && e(a) !== "" && (i.text = a);
|
|
501
501
|
}
|
|
502
502
|
return {};
|
|
@@ -522,7 +522,7 @@ var De = class {
|
|
|
522
522
|
let a = t.getAttribute("macro");
|
|
523
523
|
a && (i.macro = a);
|
|
524
524
|
let o = t.getAttribute("textlink");
|
|
525
|
-
o && (i.textLink = o), t.hasAttribute("fLocksText") && (i.locksText =
|
|
525
|
+
o && (i.textLink = o), t.hasAttribute("fLocksText") && (i.locksText = v(t.getAttribute("fLocksText"))), t.hasAttribute("fPublished") && (i.published = v(t.getAttribute("fPublished")));
|
|
526
526
|
let s = r.slice(0, r.lastIndexOf("/")), c = e.evaluate(s, t);
|
|
527
527
|
c?.getAttribute?.("txBox") === "1" && (i.textBox = !0);
|
|
528
528
|
let l = this.readLocks(e.evaluate(r, t));
|
|
@@ -537,52 +537,52 @@ var De = class {
|
|
|
537
537
|
(n || r) && (i.connectorEnds = {}, n && (i.connectorEnds.start = n), r && (i.connectorEnds.end = r));
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
|
-
}, Le = /^<a:extLst(?:\s+xmlns:a="[^"]*")?><a:ext uri="\{28A0092B-C50C-407E-A947-70E740481C1C\}"><a14:useLocalDpi(?:\s+xmlns:a14="[^"]*")?\s+val="0"\s*\/><\/a:ext><\/a:extLst>$/,
|
|
540
|
+
}, Le = /^<a:extLst(?:\s+xmlns:a="[^"]*")?><a:ext uri="\{28A0092B-C50C-407E-A947-70E740481C1C\}"><a14:useLocalDpi(?:\s+xmlns:a14="[^"]*")?\s+val="0"\s*\/><\/a:ext><\/a:extLst>$/, Z = (e, t, n, r) => {
|
|
541
541
|
let i = e.evaluate(n, t), a = e.evaluate(r, t);
|
|
542
542
|
return i || a ? {
|
|
543
|
-
x:
|
|
544
|
-
y:
|
|
545
|
-
width:
|
|
546
|
-
height:
|
|
543
|
+
x: y(i?.getAttribute("x") ?? null) ?? 0,
|
|
544
|
+
y: y(i?.getAttribute("y") ?? null) ?? 0,
|
|
545
|
+
width: y(a?.getAttribute("cx") ?? null) ?? 0,
|
|
546
|
+
height: y(a?.getAttribute("cy") ?? null) ?? 0
|
|
547
547
|
} : null;
|
|
548
|
-
}, Re = { Checkbox: "checkbox" },
|
|
548
|
+
}, Re = { Checkbox: "checkbox" }, Q = (e) => {
|
|
549
549
|
let t = e.getAttribute("val");
|
|
550
550
|
return t !== "0" && t !== "false";
|
|
551
|
-
},
|
|
551
|
+
}, ze = {
|
|
552
552
|
1: "serif",
|
|
553
553
|
2: "sans-serif",
|
|
554
554
|
3: "monospace",
|
|
555
555
|
4: "cursive",
|
|
556
556
|
5: "fantasy"
|
|
557
557
|
};
|
|
558
|
-
function
|
|
559
|
-
let t = {},
|
|
560
|
-
for (let e = 0; e <
|
|
561
|
-
let i =
|
|
558
|
+
function Be(e) {
|
|
559
|
+
let t = {}, r = e.childNodes;
|
|
560
|
+
for (let e = 0; e < r.length; e++) {
|
|
561
|
+
let i = r.item(e);
|
|
562
562
|
if (i.nodeType === 1) switch (i.localName) {
|
|
563
563
|
case "b":
|
|
564
|
-
t.weight =
|
|
564
|
+
t.weight = Q(i) ? 700 : 400;
|
|
565
565
|
break;
|
|
566
566
|
case "i":
|
|
567
|
-
t.style =
|
|
567
|
+
t.style = Q(i) ? N.Style.Italic : N.Style.Normal;
|
|
568
568
|
break;
|
|
569
569
|
case "strike":
|
|
570
|
-
t.strike = w(
|
|
570
|
+
t.strike = w(Q(i));
|
|
571
571
|
break;
|
|
572
572
|
case "outline":
|
|
573
|
-
t.outline =
|
|
573
|
+
t.outline = Q(i);
|
|
574
574
|
break;
|
|
575
575
|
case "shadow":
|
|
576
|
-
t.shadow =
|
|
576
|
+
t.shadow = Q(i);
|
|
577
577
|
break;
|
|
578
578
|
case "condense":
|
|
579
579
|
case "extend": {
|
|
580
|
-
let e =
|
|
580
|
+
let e = n(i.localName, Q(i));
|
|
581
581
|
e !== void 0 && (t.letterSpacing = e);
|
|
582
582
|
break;
|
|
583
583
|
}
|
|
584
584
|
case "u":
|
|
585
|
-
t.underline =
|
|
585
|
+
t.underline = _(i.getAttribute("val"));
|
|
586
586
|
break;
|
|
587
587
|
case "vertAlign": {
|
|
588
588
|
let e = T(i.getAttribute("val"));
|
|
@@ -600,7 +600,7 @@ function ze(e) {
|
|
|
600
600
|
break;
|
|
601
601
|
}
|
|
602
602
|
case "family": {
|
|
603
|
-
let e =
|
|
603
|
+
let e = ze[i.getAttribute("val") ?? ""];
|
|
604
604
|
e && (t.fallbacks = [e]);
|
|
605
605
|
break;
|
|
606
606
|
}
|
|
@@ -618,7 +618,7 @@ function ze(e) {
|
|
|
618
618
|
t.color = "#" + (e.length === 8 ? e.substring(2) : e).toUpperCase();
|
|
619
619
|
break;
|
|
620
620
|
}
|
|
621
|
-
let n =
|
|
621
|
+
let n = b((e) => i.getAttribute(e));
|
|
622
622
|
n && (t.color = n);
|
|
623
623
|
break;
|
|
624
624
|
}
|
|
@@ -701,16 +701,16 @@ var $ = {
|
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
703
|
},
|
|
704
|
-
ShapePropertiesVisitor:
|
|
705
|
-
TextPropertiesVisitor:
|
|
706
|
-
ShapeTextVisitor:
|
|
704
|
+
ShapePropertiesVisitor: l,
|
|
705
|
+
TextPropertiesVisitor: oe,
|
|
706
|
+
ShapeTextVisitor: x,
|
|
707
707
|
ThemeVisitor: class {
|
|
708
708
|
visit(e, t, n) {
|
|
709
709
|
n.name = t.getAttribute("name"), n.objectDefaults = {};
|
|
710
|
-
let r =
|
|
710
|
+
let r = B(t, "custClrLst")[0];
|
|
711
711
|
if (r) {
|
|
712
|
-
let t = new
|
|
713
|
-
for (let n of
|
|
712
|
+
let t = new f(), i = [];
|
|
713
|
+
for (let n of B(r, "custClr")) {
|
|
714
714
|
let r = t.processAdjColor(e, n);
|
|
715
715
|
if (!r) continue;
|
|
716
716
|
let a = { color: r }, o = n.getAttribute("name");
|
|
@@ -718,9 +718,9 @@ var $ = {
|
|
|
718
718
|
}
|
|
719
719
|
i.length && (n.customColors = i);
|
|
720
720
|
}
|
|
721
|
-
for (let e of
|
|
721
|
+
for (let e of B(t, "extLst")) for (let t of B(e, "ext")) {
|
|
722
722
|
if (t.getAttribute("uri") !== "{05A4C25C-085E-4340-85A3-A5531E510DB2}") continue;
|
|
723
|
-
let e =
|
|
723
|
+
let e = B(t, "themeFamily")[0], r = e?.getAttribute("id");
|
|
724
724
|
if (!r) continue;
|
|
725
725
|
let i = {
|
|
726
726
|
name: e.getAttribute("name") ?? "",
|
|
@@ -731,7 +731,7 @@ var $ = {
|
|
|
731
731
|
return n;
|
|
732
732
|
}
|
|
733
733
|
},
|
|
734
|
-
ClrSchemeVisitor: class extends
|
|
734
|
+
ClrSchemeVisitor: class extends f {
|
|
735
735
|
visit(e, t, n) {
|
|
736
736
|
let r = {};
|
|
737
737
|
r.name = t.getAttribute("name");
|
|
@@ -786,14 +786,14 @@ var $ = {
|
|
|
786
786
|
}
|
|
787
787
|
processDefault(e, t) {
|
|
788
788
|
let n = {}, r = e.evaluate("spPr", t);
|
|
789
|
-
r && new
|
|
790
|
-
let i = new
|
|
789
|
+
r && new l().visit(e, r, n);
|
|
790
|
+
let i = new x().readTextBody(e, t);
|
|
791
791
|
(i.body || i.listStyle) && (n.text = i);
|
|
792
792
|
let a = e.evaluate("style", t);
|
|
793
|
-
return a && (n.style =
|
|
793
|
+
return a && (n.style = V(e, a)), n;
|
|
794
794
|
}
|
|
795
795
|
},
|
|
796
|
-
FmtSchemeVisitor: class extends
|
|
796
|
+
FmtSchemeVisitor: class extends f {
|
|
797
797
|
visit(e, t, n) {
|
|
798
798
|
let r = this.parseFillList(e, t, "fillStyleLst"), i = this.parseLnList(e, t, "lnStyleLst"), a = this.parseEffectStyleList(e, t, "effectStyleLst"), o = this.parseFillList(e, t, "bgFillStyleLst");
|
|
799
799
|
if (r && (n.fillStyleLst = r), i && (n.lnStyleLst = i), a && (n.effectStyleLst = a), o && (n.bgFillStyleLst = o), r && i && a && o) return;
|
|
@@ -865,11 +865,11 @@ var $ = {
|
|
|
865
865
|
param: n
|
|
866
866
|
};
|
|
867
867
|
e.copyFromAttribute(t, "cellColor", n, "cellColor", e.BOOLEAN_COPY);
|
|
868
|
-
let i =
|
|
868
|
+
let i = U(e, t);
|
|
869
869
|
return i && (n.style = i), r;
|
|
870
870
|
}
|
|
871
871
|
processCustomFilter(e, t) {
|
|
872
|
-
return
|
|
872
|
+
return me({
|
|
873
873
|
operator: t.getAttribute("operator"),
|
|
874
874
|
val: t.getAttribute("val")
|
|
875
875
|
}, (t) => e.warn(t));
|
|
@@ -935,13 +935,13 @@ var $ = {
|
|
|
935
935
|
return e.copyFromAttribute(t, "filterVal", n, "filterVal", e.FLOAT_COPY), e.copyFromAttribute(t, "percent", n, "percent", e.BOOLEAN_COPY), e.copyFromAttribute(t, "top", n, "top", e.BOOLEAN_COPY), e.copyFromAttribute(t, "val", n, "limit", e.FLOAT_COPY), r;
|
|
936
936
|
}
|
|
937
937
|
processFilterColumnExt(e, t) {
|
|
938
|
-
let
|
|
939
|
-
for (let t = 0; t <
|
|
940
|
-
let
|
|
941
|
-
if (
|
|
942
|
-
let
|
|
943
|
-
for (let t = 0; t <
|
|
944
|
-
let n =
|
|
938
|
+
let n = t.childNodes;
|
|
939
|
+
for (let t = 0; t < n.length; t++) {
|
|
940
|
+
let r = n.item(t);
|
|
941
|
+
if (r.nodeType !== 1 || r.localName !== "ext" || g(r.getAttribute("uri")) !== g("{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}")) continue;
|
|
942
|
+
let i = r.childNodes;
|
|
943
|
+
for (let t = 0; t < i.length; t++) {
|
|
944
|
+
let n = i.item(t);
|
|
945
945
|
if (n.nodeType !== 1 || n.localName !== "filterColumn") continue;
|
|
946
946
|
let r = n.childNodes;
|
|
947
947
|
for (let t = 0; t < r.length; t++) {
|
|
@@ -964,12 +964,12 @@ var $ = {
|
|
|
964
964
|
if (!t) return null;
|
|
965
965
|
if (!t.hasAttribute("colId")) return;
|
|
966
966
|
let r = parseInt(t.getAttribute("colId")), i = !1;
|
|
967
|
-
if (t.hasAttribute("hiddenButton") && (i =
|
|
967
|
+
if (t.hasAttribute("hiddenButton") && (i = v(t.getAttribute("hiddenButton"))), i && n) {
|
|
968
968
|
let e = n.hiddenButtons;
|
|
969
969
|
e || (e = [], n.hiddenButtons = e), e.push(r);
|
|
970
970
|
}
|
|
971
971
|
let a = !1;
|
|
972
|
-
if (t.hasAttribute("showButton") && (a =
|
|
972
|
+
if (t.hasAttribute("showButton") && (a = v(t.getAttribute("showButton"))), a && n) {
|
|
973
973
|
let e = n.showButtons;
|
|
974
974
|
!0 !== e && (e || (e = [], n.showButtons = e), e[r] = !0);
|
|
975
975
|
}
|
|
@@ -993,7 +993,7 @@ var $ = {
|
|
|
993
993
|
visit(e, t, n) {
|
|
994
994
|
if (!t) return;
|
|
995
995
|
let r = t.getAttribute("ref"), i = {};
|
|
996
|
-
t.hasAttribute("caseSensitive") && (i.collatorOptions =
|
|
996
|
+
t.hasAttribute("caseSensitive") && (i.collatorOptions = v(t.getAttribute("caseSensitive")) ? L.CaseSensitiveOptions : L.CaseInsensitiveOptions);
|
|
997
997
|
let a = t.getAttribute("sortMethod");
|
|
998
998
|
a != null && a !== "none" && (a === "stroke" ? i.collatorOptions = {
|
|
999
999
|
...i.collatorOptions,
|
|
@@ -1003,15 +1003,15 @@ var $ = {
|
|
|
1003
1003
|
collation: "pinyin"
|
|
1004
1004
|
}));
|
|
1005
1005
|
let o = {};
|
|
1006
|
-
t.hasAttribute("columnSort") &&
|
|
1006
|
+
t.hasAttribute("columnSort") && v(t.getAttribute("columnSort")) && (o.axis = Te.Axis.Column);
|
|
1007
1007
|
let s = D.fastStringToRange(r), c = [], l = [];
|
|
1008
1008
|
this.processSortConditions(e, t, c, s, i, l), c.length > 0 && (o.sorts = c);
|
|
1009
1009
|
let u = e.getVisitorParamsState().get("ref");
|
|
1010
1010
|
if (u && r) {
|
|
1011
1011
|
let e = D.fastStringToRange(u);
|
|
1012
1012
|
o.extent = {
|
|
1013
|
-
range:
|
|
1014
|
-
sorts: l.map((t) =>
|
|
1013
|
+
range: d(e, s),
|
|
1014
|
+
sorts: l.map((t) => se(e, s, t))
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
1017
|
return Object.keys(c).length > 0 && (n.sort = o), o;
|
|
@@ -1025,10 +1025,10 @@ var $ = {
|
|
|
1025
1025
|
a.index = n ? r.colStart - n.colStart : r.colStart, i?.push(r);
|
|
1026
1026
|
}
|
|
1027
1027
|
let o = { ...r };
|
|
1028
|
-
a.criteria = o, o.reverse = !1, t.hasAttribute("descending") && (o.reverse =
|
|
1029
|
-
let s =
|
|
1028
|
+
a.criteria = o, o.reverse = !1, t.hasAttribute("descending") && (o.reverse = v(t.getAttribute("descending")));
|
|
1029
|
+
let s = ce(t.getAttribute("sortBy"));
|
|
1030
1030
|
s && (o.sortOn = s);
|
|
1031
|
-
let c =
|
|
1031
|
+
let c = U(e, t);
|
|
1032
1032
|
return c && (o.style = c), e.copyFromAttribute(t, "iconSet", o), e.copyFromAttribute(t, "customList", o), a;
|
|
1033
1033
|
}
|
|
1034
1034
|
processSortConditions(e, t, n, r, i, a) {
|
|
@@ -1043,47 +1043,47 @@ var $ = {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
1045
|
},
|
|
1046
|
-
SheetStyleVisitor: class extends
|
|
1046
|
+
SheetStyleVisitor: class extends G {
|
|
1047
1047
|
visit(e, t, n) {
|
|
1048
1048
|
this.processNumFmts(e, e.evaluate("numFmts", t), null), e.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
|
|
1049
|
-
let
|
|
1049
|
+
let i = {
|
|
1050
1050
|
fills: {},
|
|
1051
1051
|
fonts: {},
|
|
1052
1052
|
borders: {}
|
|
1053
1053
|
}, a = e.evaluate("fonts", t);
|
|
1054
|
-
this.processFonts(e, a,
|
|
1055
|
-
let o =
|
|
1054
|
+
this.processFonts(e, a, i.fonts);
|
|
1055
|
+
let o = i.fonts[this.normalFontId(e, t)], s = {
|
|
1056
1056
|
declared: ["1", "true"].includes(a?.getAttribute("x14ac:knownFonts") ?? ""),
|
|
1057
1057
|
normalIsThemeFont: te(o?.family),
|
|
1058
|
-
faces:
|
|
1058
|
+
faces: le(Object.values(i.fonts).map((e) => ({
|
|
1059
1059
|
...e,
|
|
1060
|
-
family:
|
|
1060
|
+
family: r(e?.family, e?.fallbacks, null, !1).name
|
|
1061
1061
|
})))
|
|
1062
1062
|
};
|
|
1063
|
-
e.getVisitorParamsState().set(
|
|
1063
|
+
e.getVisitorParamsState().set(de, s), o && e.getVisitorParamsState().set(ge, o), this.processFills(e, e.evaluate("fills", t), i.fills), this.processBorders(e, e.evaluate("borders", t), i.borders, !0), i.fills[0] = { type: M.Type.None }, i.fills[1] = {
|
|
1064
1064
|
type: M.Type.Pattern,
|
|
1065
1065
|
patternType: M.BuiltInSheetPattern.Gray125
|
|
1066
|
-
},
|
|
1066
|
+
}, i.borders[0] = {
|
|
1067
1067
|
bottom: { style: k.StrokeStyle.None },
|
|
1068
1068
|
left: { style: k.StrokeStyle.None },
|
|
1069
1069
|
right: { style: k.StrokeStyle.None },
|
|
1070
1070
|
top: { style: k.StrokeStyle.None }
|
|
1071
1071
|
};
|
|
1072
1072
|
let c = [];
|
|
1073
|
-
this.processXFs(e, e.evaluate("cellStyleXfs", t), c,
|
|
1073
|
+
this.processXFs(e, e.evaluate("cellStyleXfs", t), c, i, null, !1);
|
|
1074
1074
|
let l = /* @__PURE__ */ new Map();
|
|
1075
1075
|
if (c.length > 0) {
|
|
1076
1076
|
let r = [];
|
|
1077
1077
|
this.processCellStyles(e, e.evaluate("cellStyles", t), r, c, l), n.named = r;
|
|
1078
1078
|
}
|
|
1079
1079
|
let u = [];
|
|
1080
|
-
this.processXFs(e, e.evaluate("cellXfs", t), u,
|
|
1080
|
+
this.processXFs(e, e.evaluate("cellXfs", t), u, i, l), Object.keys(u).length > 0 && (n.direct = u);
|
|
1081
1081
|
let d = this.collectHiddenXfs(e.evaluate("cellXfs", t));
|
|
1082
|
-
d.size > 0 && e.getVisitorParamsState().set(
|
|
1082
|
+
d.size > 0 && e.getVisitorParamsState().set(_e, d);
|
|
1083
1083
|
let f = this.collectPivotButtonXfs(e.evaluate("cellXfs", t));
|
|
1084
|
-
f.size > 0 && e.getVisitorParamsState().set(
|
|
1084
|
+
f.size > 0 && e.getVisitorParamsState().set(ye, f);
|
|
1085
1085
|
let p = this.collectXfComplements(e.evaluate("cellXfs", t));
|
|
1086
|
-
p.size > 0 && e.getVisitorParamsState().set(
|
|
1086
|
+
p.size > 0 && e.getVisitorParamsState().set(ve, p);
|
|
1087
1087
|
let m = [];
|
|
1088
1088
|
return this.processDXFs(e, e.evaluate("dxfs", t), m), this.processTableStyles(e, e.evaluate("tableStyles", t), n, m), this.processSlicerStyles(e, e.evaluate("extLst", t), n), this.processIndexColors(e, e.evaluate("colors/indexedColors", t), n), this.processMruColors(e, e.evaluate("colors/mruColors", t), n), n;
|
|
1089
1089
|
}
|
|
@@ -1161,7 +1161,7 @@ var $ = {
|
|
|
1161
1161
|
let e = i.get(parseInt(o));
|
|
1162
1162
|
e && e !== A.BuiltInName.Normal && (n.named = e);
|
|
1163
1163
|
}
|
|
1164
|
-
let s = (e) => !(!a && t.hasAttribute(e)) ||
|
|
1164
|
+
let s = (e) => !(!a && t.hasAttribute(e)) || v(t.getAttribute(e)), c = (e) => !a || t.hasAttribute(e) && v(t.getAttribute(e)), l = a ? "0" : void 0;
|
|
1165
1165
|
if (s("applyFont")) {
|
|
1166
1166
|
let e = t.getAttribute("fontId") ?? l;
|
|
1167
1167
|
if (e !== void 0 && (e !== "0" || c("applyFont"))) {
|
|
@@ -1201,16 +1201,16 @@ var $ = {
|
|
|
1201
1201
|
let r = e.evaluate("protection", t);
|
|
1202
1202
|
(r || c("applyProtection")) && this.processProtection(e, r, n);
|
|
1203
1203
|
}
|
|
1204
|
-
let u =
|
|
1204
|
+
let u = v(t.getAttribute("quotePrefix") ?? "");
|
|
1205
1205
|
u && (n.quotePrefix = u);
|
|
1206
1206
|
}
|
|
1207
1207
|
processAlignment(e, t, n) {
|
|
1208
1208
|
let r = {};
|
|
1209
|
-
if (r.horizontal = t?.hasAttribute("horizontal") ? t.getAttribute("horizontal") : I.HorizontalAlignment.General, r.vertical = t?.hasAttribute("vertical") ? t.getAttribute("vertical") : I.VerticalAlignment.Bottom, r.indent = t?.hasAttribute("indent") ? parseInt(t.getAttribute("indent")) : 0, r.relativeIndent = t?.hasAttribute("relativeIndent") ? parseInt(t.getAttribute("relativeIndent")) : 0, r.overflow =
|
|
1209
|
+
if (r.horizontal = t?.hasAttribute("horizontal") ? t.getAttribute("horizontal") : I.HorizontalAlignment.General, r.vertical = t?.hasAttribute("vertical") ? t.getAttribute("vertical") : I.VerticalAlignment.Bottom, r.indent = t?.hasAttribute("indent") ? parseInt(t.getAttribute("indent")) : 0, r.relativeIndent = t?.hasAttribute("relativeIndent") ? parseInt(t.getAttribute("relativeIndent")) : 0, r.overflow = v(t?.getAttribute("wrapText") ?? "") ? I.Overflow.Wrap : I.Overflow.Visible, v(t?.getAttribute("shrinkToFit") ?? "") && (r.overflow = I.Overflow.Shrink), t?.hasAttribute("textRotation")) {
|
|
1210
1210
|
let e = parseFloat(t.getAttribute("textRotation"));
|
|
1211
1211
|
e > 0 && e <= 90 ? e = 360 - e : e > 90 && e <= 180 ? e -= 90 : e === 255 && (e = 0, r.stacked = !0), r.rotation = e;
|
|
1212
1212
|
} else r.rotation = 0;
|
|
1213
|
-
t?.hasAttribute("justifyLastLine") && (r.justifyLastLine =
|
|
1213
|
+
t?.hasAttribute("justifyLastLine") && (r.justifyLastLine = v(t.getAttribute("justifyLastLine")));
|
|
1214
1214
|
let i = t?.getAttribute("readingOrder");
|
|
1215
1215
|
return i && (i === "0" ? r.readingDirection = I.ReadingDirection.Auto : i === "1" ? r.readingDirection = I.ReadingDirection.LeftToRight : i === "2" ? r.readingDirection = I.ReadingDirection.RightToLeft : e.warn(`Invalid readingOrder '${i}'; the direction was left automatic.`, { onceKey: "xlsx.style.readingOrder" })), Object.keys(r).length > 0 && (n.alignment = r), n;
|
|
1216
1216
|
}
|
|
@@ -1224,7 +1224,7 @@ var $ = {
|
|
|
1224
1224
|
let a = i.childNodes;
|
|
1225
1225
|
for (let e = 0; e < a.length; e++) {
|
|
1226
1226
|
let n = a.item(e);
|
|
1227
|
-
n.nodeType === 1 && n.localName === "protection" &&
|
|
1227
|
+
n.nodeType === 1 && n.localName === "protection" && v(n.getAttribute("hidden") ?? "") && t.add(r);
|
|
1228
1228
|
}
|
|
1229
1229
|
r++;
|
|
1230
1230
|
}
|
|
@@ -1236,7 +1236,7 @@ var $ = {
|
|
|
1236
1236
|
let n = e.childNodes, r = 0;
|
|
1237
1237
|
for (let e = 0; e < n.length; e++) {
|
|
1238
1238
|
let i = n.item(e);
|
|
1239
|
-
i.nodeType === 1 && i.localName === "xf" && (
|
|
1239
|
+
i.nodeType === 1 && i.localName === "xf" && (v(i.getAttribute("pivotButton") ?? "") && t.add(r), r++);
|
|
1240
1240
|
}
|
|
1241
1241
|
return t;
|
|
1242
1242
|
}
|
|
@@ -1247,11 +1247,11 @@ var $ = {
|
|
|
1247
1247
|
for (let e = 0; e < n.length; e++) {
|
|
1248
1248
|
let i = n.item(e);
|
|
1249
1249
|
if (i.nodeType !== 1 || i.localName !== "xf") continue;
|
|
1250
|
-
let a =
|
|
1250
|
+
let a = q(i, "extLst");
|
|
1251
1251
|
if (a) {
|
|
1252
1252
|
let e = a.childNodes;
|
|
1253
1253
|
for (let n = 0; n < e.length; n++) {
|
|
1254
|
-
let i =
|
|
1254
|
+
let i = q(e.item(n), "xfComplement"), a = parseInt(i?.getAttribute("i") ?? "", 10);
|
|
1255
1255
|
isNaN(a) || t.set(r, a);
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
@@ -1262,7 +1262,7 @@ var $ = {
|
|
|
1262
1262
|
processProtection(e, t, n) {
|
|
1263
1263
|
if (!t) return;
|
|
1264
1264
|
let r = t.getAttribute("locked");
|
|
1265
|
-
return n.protection = { alwaysUnlocked: !!r && !
|
|
1265
|
+
return n.protection = { alwaysUnlocked: !!r && !v(r) }, n;
|
|
1266
1266
|
}
|
|
1267
1267
|
processDXF(e, t, n) {
|
|
1268
1268
|
if (!t) return;
|
|
@@ -1355,7 +1355,7 @@ var $ = {
|
|
|
1355
1355
|
}
|
|
1356
1356
|
processTableStyle(e, t, n, r, i = !1) {
|
|
1357
1357
|
let a = t.getAttribute("name"), o = { name: a };
|
|
1358
|
-
t.hasAttribute("table") && (o.table =
|
|
1358
|
+
t.hasAttribute("table") && (o.table = v(t.getAttribute("table"))), o.pivot = !t.hasAttribute("pivot") || v(t.getAttribute("pivot")), i && !o.pivot && r.unshift(null);
|
|
1359
1359
|
let s = t.childNodes, c = s.length;
|
|
1360
1360
|
for (let t = 0; t < c; t++) {
|
|
1361
1361
|
let n = s.item(t);
|
|
@@ -1397,15 +1397,15 @@ var $ = {
|
|
|
1397
1397
|
name: s,
|
|
1398
1398
|
style: r[e]
|
|
1399
1399
|
};
|
|
1400
|
-
t.getAttribute("hidden") && (c.hidden =
|
|
1400
|
+
t.getAttribute("hidden") && (c.hidden = v(t.getAttribute("hidden"))), t.getAttribute("iLevel") && (c.iLevel = parseInt(t.getAttribute("iLevel"))), o !== null && v(t.getAttribute("customBuiltin") ?? "0") && (c.customized = !0), n.push(c);
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
1403
|
}
|
|
1404
1404
|
afterVisit(e, t, n) {}
|
|
1405
1405
|
},
|
|
1406
|
-
WorkbookVisitor: class extends
|
|
1406
|
+
WorkbookVisitor: class extends G {
|
|
1407
1407
|
visit(e, t, n) {
|
|
1408
|
-
return this.processSheetRefs(e, e.evaluate("sheets", t), n), this.processExternalReferences(e, e.evaluate("externalReferences", t), n), this.processBookViews(e, e.evaluate("bookViews", t), n), this.processDefinedNames(e, e.evaluate("definedNames", t), n), this.processCalcPr(e, e.evaluate("calcPr", t), n), this.processPivotCaches(e, e.evaluate("pivotCaches", t), n), this.processWorkbookProtection(e, e.evaluate("workbookProtection", t), n), this.processWorkbookPr(e, e.evaluate("workbookPr", t), n), n;
|
|
1408
|
+
return this.processSheetRefs(e, e.evaluate("sheets", t), n), this.processExternalReferences(e, e.evaluate("externalReferences", t), n), this.processBookViews(e, e.evaluate("bookViews", t), n), this.processDefinedNames(e, e.evaluate("definedNames", t), n), this.processCalcPr(e, e.evaluate("calcPr", t), n), this.processPivotCaches(e, e.evaluate("pivotCaches", t), n), this.processWorkbookProtection(e, e.evaluate("workbookProtection", t), n), this.processWorkbookPr(e, e.evaluate("workbookPr", t), n), this.processCompatibilityVersion(t, n), n;
|
|
1409
1409
|
}
|
|
1410
1410
|
processPassword(e, t, n, r = "workbook", i = "password") {
|
|
1411
1411
|
if (!t) return;
|
|
@@ -1416,7 +1416,7 @@ var $ = {
|
|
|
1416
1416
|
if (!t) return;
|
|
1417
1417
|
let r = {};
|
|
1418
1418
|
this.processPassword(e, t, r, "workbook", "password"), this.processPassword(e, t, r, "revisions", "revisionsPassword");
|
|
1419
|
-
for (let e of ie) r[e.key] =
|
|
1419
|
+
for (let e of ie) r[e.key] = pe(e, t.getAttribute(e.attribute));
|
|
1420
1420
|
return n.protection = r, n;
|
|
1421
1421
|
}
|
|
1422
1422
|
processCalcPr(e, t, n) {
|
|
@@ -1438,11 +1438,11 @@ var $ = {
|
|
|
1438
1438
|
processSheetRef(e, t, n) {
|
|
1439
1439
|
let r = {};
|
|
1440
1440
|
e.copyFromAttribute(t, "name", r, "name"), e.copyFromAttribute(t, "state", r, "visibility"), e.copyFromAttribute(t, "sheetId", r, "sheetId", e.INT_COPY);
|
|
1441
|
-
let i = t.getAttribute("r:id"), a = i ?
|
|
1441
|
+
let i = t.getAttribute("r:id"), a = i ? p(e.getRelationships().get(i)?.type) : null;
|
|
1442
1442
|
if (a) {
|
|
1443
1443
|
let t = e.readEmbeddedPart(i);
|
|
1444
1444
|
if (t?.xml) {
|
|
1445
|
-
let e = { part: t }, i =
|
|
1445
|
+
let e = { part: t }, i = u(t.xml), o = i ? b((e) => i.get(e)) : void 0;
|
|
1446
1446
|
o && (e.tabColor = o), r.kind = a, r.sheet = e, n.push(r);
|
|
1447
1447
|
return;
|
|
1448
1448
|
}
|
|
@@ -1466,7 +1466,7 @@ var $ = {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
processPivotCaches(e, t, n) {
|
|
1468
1468
|
if (!t) return;
|
|
1469
|
-
let r = [], i = e.evaluate("workbookPr", t.parentNode)?.getAttribute?.("date1904"), a = i === "1" || i === "true", o =
|
|
1469
|
+
let r = [], i = e.evaluate("workbookPr", t.parentNode)?.getAttribute?.("date1904"), a = i === "1" || i === "true", o = ue(e.getVisitorParamsState().get("numFmts"), void 0), s = t.childNodes, c = s.length;
|
|
1470
1470
|
for (let t = 0; t < c; t++) {
|
|
1471
1471
|
let n = s.item(t);
|
|
1472
1472
|
if (n.nodeType !== 1 || n.localName !== "pivotCache") continue;
|
|
@@ -1474,7 +1474,7 @@ var $ = {
|
|
|
1474
1474
|
if (isNaN(i) || !c) continue;
|
|
1475
1475
|
let l = e.readEmbeddedPart(c);
|
|
1476
1476
|
if (!l) continue;
|
|
1477
|
-
let u =
|
|
1477
|
+
let u = Se(l, a, (e) => o.numberFormat(e)), d = !u && l.xml ? ae(l.xml, o) : void 0, f = !u && l.xml ? we(l.xml) : void 0;
|
|
1478
1478
|
r.push({
|
|
1479
1479
|
cacheId: i,
|
|
1480
1480
|
part: l,
|
|
@@ -1523,8 +1523,8 @@ var $ = {
|
|
|
1523
1523
|
i.scope = r[n].name;
|
|
1524
1524
|
}
|
|
1525
1525
|
let o = {};
|
|
1526
|
-
for (let n of
|
|
1527
|
-
for (let e of
|
|
1526
|
+
for (let n of xe) e.copyFromAttribute(t, n, o);
|
|
1527
|
+
for (let e of be) {
|
|
1528
1528
|
let n = t.getAttribute(e);
|
|
1529
1529
|
n !== "1" && n !== "true" || (o[e] = !0);
|
|
1530
1530
|
}
|
|
@@ -1539,6 +1539,25 @@ var $ = {
|
|
|
1539
1539
|
}
|
|
1540
1540
|
r.length > 0 && (n.names = r);
|
|
1541
1541
|
}
|
|
1542
|
+
processCompatibilityVersion(e, t) {
|
|
1543
|
+
let n = 1, r = g(S), i = e.childNodes;
|
|
1544
|
+
for (let e = i.length - 1; e >= 0; e--) {
|
|
1545
|
+
let t = i.item(e);
|
|
1546
|
+
if (t.nodeType !== 1 || t.localName !== "extLst") continue;
|
|
1547
|
+
let a = t.childNodes;
|
|
1548
|
+
for (let e = 0; e < a.length; e++) {
|
|
1549
|
+
let t = a.item(e);
|
|
1550
|
+
if (t.nodeType !== 1 || g(t.getAttribute("uri")) !== r) continue;
|
|
1551
|
+
let i = t.childNodes;
|
|
1552
|
+
for (let e = 0; e < i.length; e++) {
|
|
1553
|
+
let t = i.item(e);
|
|
1554
|
+
t.nodeType === 1 && t.localName === "version" && Number(t.getAttribute("setVersion")) >= 2 && (n = 2);
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
break;
|
|
1558
|
+
}
|
|
1559
|
+
n === 1 && (t.compatibilityVersion = 1);
|
|
1560
|
+
}
|
|
1542
1561
|
processWorkbookPr(e, t, n) {
|
|
1543
1562
|
if (!t) return;
|
|
1544
1563
|
e.copyFromAttribute(t, "date1904", n, "date1904", e.BOOLEAN_COPY), e.copyFromAttribute(t, "codeName", n, "codeName"), e.copyFromAttribute(t, "updateLinks", n, "updateLinks");
|
|
@@ -1670,7 +1689,7 @@ var $ = {
|
|
|
1670
1689
|
i.length > 0 && (n.sheetDataSet = i);
|
|
1671
1690
|
}
|
|
1672
1691
|
processSheetData(e, t) {
|
|
1673
|
-
let n = new
|
|
1692
|
+
let n = new De.Builder(), r = t.childNodes, i = r.length;
|
|
1674
1693
|
for (let e = 0; e < i; e++) {
|
|
1675
1694
|
let t = r.item(e);
|
|
1676
1695
|
if (t.nodeType !== 1 || t.localName !== "row") continue;
|
|
@@ -1784,8 +1803,8 @@ var $ = {
|
|
|
1784
1803
|
let r = {};
|
|
1785
1804
|
n[t.getAttribute("name")] = r, e.copyFromAttribute(t, "xr10:uid", r, "uid");
|
|
1786
1805
|
let i = t.getAttribute("cache"), a = e.getVisitorParamsState().get("slicerCaches"), o = i ? a?.get(i) : void 0;
|
|
1787
|
-
if (o) for (let e = 0; e <
|
|
1788
|
-
let t =
|
|
1806
|
+
if (o) for (let e = 0; e < J.length; e++) {
|
|
1807
|
+
let t = J[e];
|
|
1789
1808
|
o[t] !== void 0 && (r[t] = o[t]);
|
|
1790
1809
|
}
|
|
1791
1810
|
e.copyFromAttribute(t, "caption", r), e.copyFromAttribute(t, "startItem", r, "startItem", e.INT_COPY), e.copyFromAttribute(t, "columnCount", r, "columnCount", e.INT_COPY), e.copyFromAttribute(t, "showCaption", r, "showCaption", e.BOOLEAN_COPY), e.copyFromAttribute(t, "level", r, "level", e.INT_COPY), e.copyFromAttribute(t, "style", r), e.copyFromAttribute(t, "lockedPosition", r, "lockedPosition", e.BOOLEAN_COPY), e.copyFromAttribute(t, "rowHeight", r, "rowHeight", e.INT_COPY);
|
|
@@ -1806,8 +1825,8 @@ var $ = {
|
|
|
1806
1825
|
let r = {};
|
|
1807
1826
|
n[t.getAttribute("name")] = r, e.copyFromAttribute(t, "xr10:uid", r, "uid");
|
|
1808
1827
|
let i = t.getAttribute("cache"), a = e.getVisitorParamsState().get("slicerCaches"), o = i ? a?.get(i) : void 0;
|
|
1809
|
-
if (o) for (let e = 0; e <
|
|
1810
|
-
let t =
|
|
1828
|
+
if (o) for (let e = 0; e < J.length; e++) {
|
|
1829
|
+
let t = J[e];
|
|
1811
1830
|
o[t] !== void 0 && (r[t] = o[t]);
|
|
1812
1831
|
}
|
|
1813
1832
|
e.copyFromAttribute(t, "caption", r);
|
|
@@ -1845,7 +1864,7 @@ var $ = {
|
|
|
1845
1864
|
} else n.localName === "extLst" && (o = e.serializeElement(n) ?? void 0);
|
|
1846
1865
|
}
|
|
1847
1866
|
}
|
|
1848
|
-
let c =
|
|
1867
|
+
let c = fe(r, a, o);
|
|
1849
1868
|
return n.formControl = c, c;
|
|
1850
1869
|
}
|
|
1851
1870
|
},
|
|
@@ -1854,7 +1873,7 @@ var $ = {
|
|
|
1854
1873
|
return n;
|
|
1855
1874
|
}
|
|
1856
1875
|
afterVisit(e, t, n) {
|
|
1857
|
-
for (let e of n?.movables ?? [])
|
|
1876
|
+
for (let e of n?.movables ?? []) Y(e, !1);
|
|
1858
1877
|
}
|
|
1859
1878
|
},
|
|
1860
1879
|
DrawingAnchorVisitor: class {
|
|
@@ -1874,7 +1893,7 @@ var $ = {
|
|
|
1874
1893
|
x: 0,
|
|
1875
1894
|
y: 0
|
|
1876
1895
|
};
|
|
1877
|
-
return o.x =
|
|
1896
|
+
return o.x = y(t.getAttribute(i)), o.y = y(t.getAttribute(a)), r === "from" ? n.tl = o : n.br = o, n;
|
|
1878
1897
|
}
|
|
1879
1898
|
processOffsetCoord(e, t, n, r) {
|
|
1880
1899
|
if (!t) return;
|
|
@@ -1884,37 +1903,37 @@ var $ = {
|
|
|
1884
1903
|
x: 0,
|
|
1885
1904
|
y: 0
|
|
1886
1905
|
};
|
|
1887
|
-
return e.evaluate("col", t) && (i.c = parseInt(e.evaluate("col", t).textContent)), e.evaluate("row", t) && (i.r = parseInt(e.evaluate("row", t).textContent)), e.evaluate("colOff", t) && (i.x =
|
|
1906
|
+
return e.evaluate("col", t) && (i.c = parseInt(e.evaluate("col", t).textContent)), e.evaluate("row", t) && (i.r = parseInt(e.evaluate("row", t).textContent)), e.evaluate("colOff", t) && (i.x = y(e.evaluate("colOff", t).textContent)), e.evaluate("rowOff", t) && (i.y = y(e.evaluate("rowOff", t).textContent)), r === "from" ? n.tl = i : n.br = i, n;
|
|
1888
1907
|
}
|
|
1889
1908
|
},
|
|
1890
|
-
DrawingGraphicFrameVisitor: class extends
|
|
1909
|
+
DrawingGraphicFrameVisitor: class extends H {
|
|
1891
1910
|
visit(e, t, n) {
|
|
1892
1911
|
if (!t) return;
|
|
1893
1912
|
if (this.isGroupContent(n)) {
|
|
1894
1913
|
if (e.getPath().includes("Fallback")) return {};
|
|
1895
1914
|
let { movable: r } = this.readMemberHeader(e, t, "graphicFrame"), i = e.evaluate("xfrm", t);
|
|
1896
1915
|
if (i) {
|
|
1897
|
-
|
|
1916
|
+
o(i, r);
|
|
1898
1917
|
let t = e.evaluate("off", i), n = e.evaluate("ext", i);
|
|
1899
1918
|
r.anchor = {
|
|
1900
1919
|
tl: {
|
|
1901
|
-
x:
|
|
1902
|
-
y:
|
|
1920
|
+
x: y(t?.getAttribute("x") ?? null) ?? 0,
|
|
1921
|
+
y: y(t?.getAttribute("y") ?? null) ?? 0
|
|
1903
1922
|
},
|
|
1904
1923
|
br: {
|
|
1905
|
-
x:
|
|
1906
|
-
y:
|
|
1924
|
+
x: y(n?.getAttribute("cx") ?? null) ?? 0,
|
|
1925
|
+
y: y(n?.getAttribute("cy") ?? null) ?? 0
|
|
1907
1926
|
}
|
|
1908
1927
|
};
|
|
1909
1928
|
}
|
|
1910
|
-
let a = this.readGraphic(e, t),
|
|
1929
|
+
let a = this.readGraphic(e, t), s = a.type === "chart" ? {
|
|
1911
1930
|
...r.content.json,
|
|
1912
1931
|
...a.json
|
|
1913
1932
|
} : a.json;
|
|
1914
1933
|
return r.content = {
|
|
1915
1934
|
...r.content,
|
|
1916
1935
|
type: a.type,
|
|
1917
|
-
json:
|
|
1936
|
+
json: s
|
|
1918
1937
|
}, n.members.push(r), a.json;
|
|
1919
1938
|
}
|
|
1920
1939
|
n = super.visit(e, t, n);
|
|
@@ -1942,7 +1961,7 @@ var $ = {
|
|
|
1942
1961
|
if (n === "chart" && i) {
|
|
1943
1962
|
let n = this.readSourceId(e, t), a = e.readEmbeddedPart(i) ?? void 0, o;
|
|
1944
1963
|
try {
|
|
1945
|
-
let t = a?.xml ?
|
|
1964
|
+
let t = a?.xml ? Ce(a.xml) : null;
|
|
1946
1965
|
o = t?.model, t?.lossy && e.warn("A chart states something its model does not; it is saved as it was until it is changed.", { onceKey: "xlsx.chart.lossy" });
|
|
1947
1966
|
} catch (t) {
|
|
1948
1967
|
e.warn(`A chart could not be read into the chart model; it is kept as its markup: ${t?.message ?? t}`, { onceKey: "xlsx.chart.model" });
|
|
@@ -1963,8 +1982,8 @@ var $ = {
|
|
|
1963
1982
|
return r;
|
|
1964
1983
|
}
|
|
1965
1984
|
},
|
|
1966
|
-
DrawingSpVisitor:
|
|
1967
|
-
DrawingPicVisitor: class extends
|
|
1985
|
+
DrawingSpVisitor: X,
|
|
1986
|
+
DrawingPicVisitor: class extends H {
|
|
1968
1987
|
visit(e, t, n) {
|
|
1969
1988
|
if (!t) return;
|
|
1970
1989
|
if (this.isGroupContent(n)) {
|
|
@@ -1983,7 +2002,7 @@ var $ = {
|
|
|
1983
2002
|
readPictureDetails(e, t, n, r, i) {
|
|
1984
2003
|
n?.resId !== void 0 && (i.resId = n.resId), n?.image && (i.image = n.image);
|
|
1985
2004
|
let a = t.getAttribute("macro");
|
|
1986
|
-
a && (i.macro = a), t.hasAttribute("fPublished") && (i.published =
|
|
2005
|
+
a && (i.macro = a), t.hasAttribute("fPublished") && (i.published = v(t.getAttribute("fPublished")));
|
|
1987
2006
|
let o = e.evaluate("nvPicPr/cNvPicPr", t);
|
|
1988
2007
|
if (o?.getAttribute) {
|
|
1989
2008
|
o.getAttribute("preferRelativeResize") === "0" && (i.noRelativeResize = !0);
|
|
@@ -1995,16 +2014,16 @@ var $ = {
|
|
|
1995
2014
|
let n = e.evaluate("blipFill", t), r = n ? e.evaluate("blip", n) : null;
|
|
1996
2015
|
if (!r) return;
|
|
1997
2016
|
if (!(r.getAttribute("r:embed") ?? r.getAttribute("embed") ?? r.getAttribute("r:link") ?? r.getAttribute("link"))) return e.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.drawing.picture.noRel" }), null;
|
|
1998
|
-
let { type: i, resId: a, ...o } = new
|
|
2017
|
+
let { type: i, resId: a, ...o } = new f().processImageFill(e, n);
|
|
1999
2018
|
return !o.tile && o.stretch && Object.keys(o.stretch).length === 0 && delete o.stretch, o.extLst && Le.test(o.extLst) && delete o.extLst, {
|
|
2000
2019
|
resId: a,
|
|
2001
2020
|
image: Object.keys(o).length > 0 ? o : void 0
|
|
2002
2021
|
};
|
|
2003
2022
|
}
|
|
2004
2023
|
},
|
|
2005
|
-
DrawingGrpSpVisitor: class extends
|
|
2024
|
+
DrawingGrpSpVisitor: class extends H {
|
|
2006
2025
|
constructor(...e) {
|
|
2007
|
-
super(...e), this._fills = new
|
|
2026
|
+
super(...e), this._fills = new f();
|
|
2008
2027
|
}
|
|
2009
2028
|
visit(e, t, n) {
|
|
2010
2029
|
if (!t) return;
|
|
@@ -2023,17 +2042,17 @@ var $ = {
|
|
|
2023
2042
|
});
|
|
2024
2043
|
}
|
|
2025
2044
|
a.members = [];
|
|
2026
|
-
let
|
|
2027
|
-
|
|
2028
|
-
let c = this.readLocks(
|
|
2045
|
+
let s = e.evaluate("nvGrpSpPr/cNvGrpSpPr/grpSpLocks", t);
|
|
2046
|
+
s?.hasAttribute?.("noChangeAspect") && (i.lockAspect = s.getAttribute("noChangeAspect") === "1");
|
|
2047
|
+
let c = this.readLocks(s);
|
|
2029
2048
|
c && (a.locks = c);
|
|
2030
2049
|
let l = e.evaluate("grpSpPr", t);
|
|
2031
2050
|
if (l) {
|
|
2032
2051
|
let t = e.evaluate("xfrm", l);
|
|
2033
2052
|
if (t) {
|
|
2034
|
-
|
|
2035
|
-
let n =
|
|
2036
|
-
|
|
2053
|
+
o(t, i), t.getAttribute("flipH") === "1" && (i.flipH = !0), t.getAttribute("flipV") === "1" && (i.flipV = !0);
|
|
2054
|
+
let n = Z(e, t, "off", "ext"), s = Z(e, t, "chOff", "chExt") ?? n;
|
|
2055
|
+
s && (a.childBounds = s), r && n && (i.anchor = {
|
|
2037
2056
|
tl: {
|
|
2038
2057
|
x: n.x,
|
|
2039
2058
|
y: n.y
|
|
@@ -2046,8 +2065,8 @@ var $ = {
|
|
|
2046
2065
|
}
|
|
2047
2066
|
let n = this._fills.getFill(e, l);
|
|
2048
2067
|
n && Object.keys(n).length > 0 && (a.fill = n);
|
|
2049
|
-
let
|
|
2050
|
-
|
|
2068
|
+
let s = this._fills.getEffects(e, l);
|
|
2069
|
+
s && (a.effects = s);
|
|
2051
2070
|
let c = e.evaluate("scene3d", l), u = c ? e.serializeElement(c) : null;
|
|
2052
2071
|
u && (a.scene3d = u);
|
|
2053
2072
|
let d = e.evaluate("extLst", l), f = d ? e.serializeElement(d) : null;
|
|
@@ -2059,7 +2078,7 @@ var $ = {
|
|
|
2059
2078
|
return a;
|
|
2060
2079
|
}
|
|
2061
2080
|
},
|
|
2062
|
-
DrawingCxnSpVisitor: class extends
|
|
2081
|
+
DrawingCxnSpVisitor: class extends X {
|
|
2063
2082
|
visit(e, t, n) {
|
|
2064
2083
|
if (t) return this.visitShape(e, t, n, "cxnSp", "nvCxnSpPr/cNvCxnSpPr/cxnSpLocks");
|
|
2065
2084
|
}
|
|
@@ -2258,7 +2277,7 @@ var $ = {
|
|
|
2258
2277
|
if (n.nodeType === 1) {
|
|
2259
2278
|
if (n.localName === "t") e.text += n.textContent ?? "";
|
|
2260
2279
|
else if (n.localName === "rPr") {
|
|
2261
|
-
let t =
|
|
2280
|
+
let t = Be(n);
|
|
2262
2281
|
t && (e.font = t);
|
|
2263
2282
|
}
|
|
2264
2283
|
}
|
|
@@ -2294,7 +2313,7 @@ var $ = {
|
|
|
2294
2313
|
if (!t) return e;
|
|
2295
2314
|
let [, n, r, i] = t;
|
|
2296
2315
|
return `${n}${r ? `.${(r + "00").substring(0, 3)}` : ""}${i ?? "Z"}`;
|
|
2297
|
-
}(a)), t.hasAttribute("done") && (r.done =
|
|
2316
|
+
}(a)), t.hasAttribute("done") && (r.done = v(t.getAttribute("done")));
|
|
2298
2317
|
let o = function(e) {
|
|
2299
2318
|
let t, n = e.childNodes;
|
|
2300
2319
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -2336,11 +2355,11 @@ var $ = {
|
|
|
2336
2355
|
return r.length > 0 && (n.persons = r), r;
|
|
2337
2356
|
}
|
|
2338
2357
|
}
|
|
2339
|
-
},
|
|
2358
|
+
}, Ve = class {
|
|
2340
2359
|
constructor(e, t) {
|
|
2341
2360
|
this.path = e, this.visitor = t;
|
|
2342
2361
|
}
|
|
2343
|
-
},
|
|
2362
|
+
}, He = class {
|
|
2344
2363
|
constructor() {
|
|
2345
2364
|
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new $.RelsVisitor()), this.registerVisitor("cp:coreProperties", new $.CorePropertiesVisitor()), this.registerVisitor("Properties", new $.AppPropertiesVisitor()), this.registerVisitor("spPr", new $.ShapePropertiesVisitor()), this.registerVisitor("txBody", new $.ShapeTextVisitor()), this.registerVisitor("txPr", new $.TextPropertiesVisitor()), this.registerVisitor("a:theme", new $.ThemeVisitor()), this.registerVisitor("a:theme", new $.ClrSchemeVisitor(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new $.FontSchemeVisitor(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new $.FmtSchemeVisitor(), "themeElements/fmtScheme"), this.registerVisitor("a:theme", new $.ObjectDefaultsVisitor(), "objectDefaults"), this.registerVisitor("autoFilter", new $.AutoFilterVisitor()), this.registerVisitor("sortState", new $.SortStateVisitor()), this.registerVisitor("s:workbook", new $.WorkbookVisitor()), this.registerVisitor("styleSheet", new $.SheetStyleVisitor()), this.registerVisitor("x14:table", new $.TableX14Visitor()), this.registerVisitor("table", new $.TableVisitor()), this.registerVisitor("externalLink", new $.ExternalLinkVisitor()), this.registerVisitor("wsDr", new $.DrawingVisitor()), this.registerVisitor("twoCellAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("oneCellAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("absoluteAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("graphicFrame", new $.DrawingGraphicFrameVisitor()), this.registerVisitor("sp", new $.DrawingSpVisitor()), this.registerVisitor("grpSp", new $.DrawingGrpSpVisitor()), this.registerVisitor("cxnSp", new $.DrawingCxnSpVisitor()), this.registerVisitor("pic", new $.DrawingPicVisitor()), this.registerVisitor("metadata", new $.MetadataVisitor()), this.registerVisitor("FeaturePropertyBags", new $.FeaturePropertyBagVisitor()), this.registerVisitor("comments", new $.CommentsVisitor()), this.registerVisitor("comment", new $.CommentVisitor()), this.registerVisitor("ThreadedComments", new $.ThreadedCommentsVisitor()), this.registerVisitor("threadedComment", new $.ThreadedCommentVisitor()), this.registerVisitor("threadedComment", new $.TextPropertiesVisitor("content"), "text"), this.registerVisitor("personList", new $.PersonListVisitor()), this.registerVisitor("slicerCacheDefinition", new $.SlicerCacheDefinitionVisitor()), this.registerVisitor("slicers", new $.SlicersVisitor()), this.registerVisitor("timelineCacheDefinition", new $.SlicerCacheDefinitionVisitor()), this.registerVisitor("timelines", new $.TimelinesVisitor()), this.registerVisitor("formControlPr", new $.FormControlPrVisitor());
|
|
2346
2365
|
}
|
|
@@ -2349,14 +2368,14 @@ var $ = {
|
|
|
2349
2368
|
let r = e.split(":"), i = r.length > 1 ? r[1] : r[0];
|
|
2350
2369
|
if (!n) return this.visitorsByXmlTagName.set(i, t), void this.visitorsByXmlTagName.set(e, t);
|
|
2351
2370
|
let a = this.scopedVisitorsByXmlTagName.get(i);
|
|
2352
|
-
a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new
|
|
2371
|
+
a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new Ve(n, t));
|
|
2353
2372
|
}
|
|
2354
2373
|
parseDxf(e, t = "", n = E.EmptyObject) {
|
|
2355
2374
|
this.visitorParamsState ||= /* @__PURE__ */ new Map();
|
|
2356
2375
|
let r = this.visitorParamsState, i = r.get("processingDXFs");
|
|
2357
2376
|
r.set("processingDXFs", !0);
|
|
2358
2377
|
try {
|
|
2359
|
-
let r = new
|
|
2378
|
+
let r = new z(null, this, "/dxf", e, {}, t, n), i = {};
|
|
2360
2379
|
return new $.SheetStyleVisitor().processDXF(r, e, i), i;
|
|
2361
2380
|
} finally {
|
|
2362
2381
|
i === void 0 ? r.delete("processingDXFs") : r.set("processingDXFs", i);
|
|
@@ -2370,7 +2389,7 @@ var $ = {
|
|
|
2370
2389
|
this.visitorParamsState && !n?.paramMap || (this.visitorParamsState = n?.paramMap ?? /* @__PURE__ */ new Map());
|
|
2371
2390
|
let i = {}, a = this.visitorsByXmlTagName.get(r.nodeName);
|
|
2372
2391
|
if (a ||= this.visitorsByXmlTagName.get(r.localName), !a) throw Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);
|
|
2373
|
-
let o = "/" + r.localName, s = new
|
|
2392
|
+
let o = "/" + r.localName, s = new z(null, this, o, r, i, t, n), c = [];
|
|
2374
2393
|
this._doWalk(a, s, c, r, i, t, n);
|
|
2375
2394
|
let l = c.length;
|
|
2376
2395
|
for (let e = 0; e < l; e++) {
|
|
@@ -2398,7 +2417,7 @@ var $ = {
|
|
|
2398
2417
|
for (; l && l !== r;) s = l.localName + "/" + s, l = l.parentNode;
|
|
2399
2418
|
let u = t.getPath() + "/" + s;
|
|
2400
2419
|
if (c.visitor) {
|
|
2401
|
-
let r = new
|
|
2420
|
+
let r = new z(t, this, u, t.getElemRoot(), t.getJsonRoot(), a, o);
|
|
2402
2421
|
this._doWalk(c.visitor, r, n, e, i, a, o);
|
|
2403
2422
|
}
|
|
2404
2423
|
};
|
|
@@ -2424,10 +2443,10 @@ var $ = {
|
|
|
2424
2443
|
if (r.nodeType !== 1) continue;
|
|
2425
2444
|
let c = r, p = c.nodeName, m = l.get(p);
|
|
2426
2445
|
m ||= (p = c.localName, l.get(p));
|
|
2427
|
-
let h = t.getPath() + "/" + p, g = new
|
|
2446
|
+
let h = t.getPath() + "/" + p, g = new z(t, this, h, u, d, a, o);
|
|
2428
2447
|
this._doWalk(m, g, n, c, s ?? i, a, o);
|
|
2429
2448
|
}
|
|
2430
2449
|
return s;
|
|
2431
2450
|
}
|
|
2432
2451
|
};
|
|
2433
|
-
export {
|
|
2452
|
+
export { He as DOMTransformer, z as ExecutionContext, a as NumberUtils, i as VisitorUtils };
|