@sheetxl/io-xlsx 0.7.28-beta.3 → 0.8.0-beta.1
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/BAtEL-5TLyoaPFDP.cjs +2 -0
- package/browser/cjs/Bg0e53JZa8vhmm5a.cjs +1 -0
- package/browser/cjs/CK5FFUvet6FnIYO_.cjs +5 -0
- package/browser/cjs/{BZsKjlEe8ttWIao7.cjs → DV6LeTEiiFUrZoxj.cjs} +1 -1
- package/browser/cjs/Db8YjGM6TG34c8aT.cjs +1 -0
- package/browser/cjs/index.cjs +1 -1
- package/browser/esm/{Da4uZFnis4q5dMxA.mjs → 4BWLu134ABlCQEtM.mjs} +928 -890
- package/browser/esm/{uIgz_sO2ZTlIJryO.mjs → BkNXyG6NC-w5Xo92.mjs} +2 -2
- package/browser/esm/{9k07cBjQx8ZMNU1r.mjs → BzQ_lPzc8C4OTIGZ.mjs} +2 -2
- package/browser/esm/{BwSyMclyk-t3Qsxs.mjs → CJknI8BYGSZr-4zS.mjs} +5 -5
- package/browser/esm/{DmzsYgxDBYYWxQWu.mjs → CLWzJJyoSrykkVLX.mjs} +2 -2
- package/browser/esm/{BjKFtNZckTyELfHX.mjs → Cok_fBIUCHDSrKw0.mjs} +260 -242
- package/browser/esm/{C0ftqc3PDJkuDjFG.mjs → Ctqql4O-3xj2K8vv.mjs} +2 -2
- package/browser/esm/{DofvhgOWFHBSl9vH.mjs → D-m_kQLaewdwuXaF.mjs} +743 -681
- package/browser/esm/{Wg4pN30I3RZmpjIf.mjs → Dj7D2nVdAZ3TiUks.mjs} +1460 -1392
- package/browser/esm/{DatxS1drpnPiN0bA.mjs → Dz1Dp8DDJvhd09RR.mjs} +1 -1
- package/browser/esm/{B1HdC5n0VHTzJXno.mjs → ijQzHH-bvDfUHIi1.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{C9wIBQW-fwqlpFJm.mjs → CEAmv36xpTNgFwl_.mjs} +2 -2
- package/node/esm/{CUQy4BVE8DwTALUu.mjs → CEV7nKotMpeRRnQC.mjs} +1 -1
- package/node/esm/{BTiGUmPt1-zNmYTg.mjs → CF1R5ovFsRNu--Rw.mjs} +994 -950
- package/node/esm/{DWNfn3shRCVhbEOV.mjs → Ctcl4jN52INWpKWC.mjs} +197 -179
- package/node/esm/{BOF2zpi3fMaBFMe7.mjs → CvnRSooxEQdlJgMn.mjs} +741 -677
- package/node/esm/{zldOc2ba5Vlg1s2E.mjs → DQd0vxzTaPt2qSL-.mjs} +1 -1
- package/node/esm/{DYH_lfcyj9wTL8Er.mjs → fOnuUjpPCAzmuIXN.mjs} +2 -2
- package/node/esm/index.mjs +5 -5
- package/node/esm/{f9-SN-lQDdZGt0vO.mjs → ssSlRCbCqxvZ9IX8.mjs} +613 -545
- package/package.json +3 -3
- package/types/src/AutoFilterRules.d.ts +62 -0
- package/types/src/reader/dom/DOMTransformer.d.ts +10 -0
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +1 -1
- package/types/src/reader/sax/SaxVisitor.d.ts +14 -0
- package/types/src/writer/builder/EmitterRegistry.d.ts +7 -0
- package/types/src/writer/emitters/StylesEmitter.d.ts +13 -2
- package/types/src/writer/utils/AutoFilter.d.ts +3 -2
- package/browser/cjs/5QaWZ2tRVhz1rf3W.cjs +0 -1
- package/browser/cjs/Bi-WvoygX7yZzlxU.cjs +0 -5
- package/browser/cjs/D-8WoJkvdPf-79sB.cjs +0 -2
- package/browser/cjs/sEmMmxaNBSY_o-Zb.cjs +0 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.1
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { a as t, d as e, f as s, i as r, m as o, n as i, o as n, p as l, r as a, t as c } from "./
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
7
|
+
import { a as t, d as e, f as s, i as r, m as o, n as i, o as n, p as l, r as a, t as c } from "./DQd0vxzTaPt2qSL-.mjs";
|
|
8
|
+
import { o as u } from "./ssSlRCbCqxvZ9IX8.mjs";
|
|
9
|
+
import { CommonUtils as h } from "@sheetxl/utils";
|
|
10
|
+
import { AddressUtils as p, FormulaError as d, IBorder as g, ICondition as m, IEffect as b, IFill as A, IFont as f, IRange as y, IStyle as v, ITextFrame as N, Sort as F, Tuple as C } from "@sheetxl/sdk";
|
|
11
|
+
var w = class {
|
|
11
12
|
constructor(t) {
|
|
12
13
|
this.list = t;
|
|
13
14
|
}
|
|
@@ -33,14 +34,14 @@ var C = class {
|
|
|
33
34
|
[Symbol.iterator]() {
|
|
34
35
|
return this.list.values();
|
|
35
36
|
}
|
|
36
|
-
},
|
|
37
|
+
}, P = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t && "0" !== t && "off" !== t && "false" !== t && null, S = (t) => {
|
|
37
38
|
const e = parseInt(t);
|
|
38
39
|
return isNaN(e) ? null : e;
|
|
39
|
-
},
|
|
40
|
+
}, O = (t) => {
|
|
40
41
|
const e = parseFloat(t);
|
|
41
42
|
return isNaN(e) ? null : e;
|
|
42
|
-
}, T = /* @__PURE__ */ new Map(),
|
|
43
|
-
constructor(t, e, s, r, o, i = null, n =
|
|
43
|
+
}, T = /* @__PURE__ */ new Map(), x = class {
|
|
44
|
+
constructor(t, e, s, r, o, i = null, n = h.EmptyObject) {
|
|
44
45
|
this._fileLocation = "";
|
|
45
46
|
const l = (t, e, s) => n?.getRef?.(t, e, s, n?.parsedRefs), a = (t) => n?.getRefs?.(t, n?.parsedRefs);
|
|
46
47
|
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, this._serializeElement = t._serializeElement) : (i && (this._fileLocation = i), n?.getRef && (this._getRef = l), n?.getRefs && (this._getRefs = a), this._onWarning = n?.onWarning, this._addPerson = n?.addPerson, this._serializeElement = n?.serializeElement);
|
|
@@ -105,7 +106,7 @@ var C = class {
|
|
|
105
106
|
}
|
|
106
107
|
if (s = i, 0 === s.length) return null;
|
|
107
108
|
}
|
|
108
|
-
return 1 === s.length ? s[0] : 0 === s.length ? null : new
|
|
109
|
+
return 1 === s.length ? s[0] : 0 === s.length ? null : new w(s);
|
|
109
110
|
}
|
|
110
111
|
_matchesElementName(t, e) {
|
|
111
112
|
return e.includes(":") ? (t.tagName || t.nodeName) === e : t.localName === e;
|
|
@@ -121,10 +122,10 @@ var C = class {
|
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
getFromPath(t, e) {
|
|
124
|
-
return
|
|
125
|
+
return h.getFromPath(t, e);
|
|
125
126
|
}
|
|
126
127
|
setToPath(t, e, s) {
|
|
127
|
-
return
|
|
128
|
+
return h.setToPath(t, e, s);
|
|
128
129
|
}
|
|
129
130
|
getValAttrAsString(t, e) {
|
|
130
131
|
let s = this.evaluate(t, e);
|
|
@@ -145,13 +146,13 @@ var C = class {
|
|
|
145
146
|
return s && s.hasAttribute("val") ? parseFloat(s.getAttribute("val")) ?? null : null;
|
|
146
147
|
}
|
|
147
148
|
get BOOLEAN_COPY() {
|
|
148
|
-
return
|
|
149
|
+
return P;
|
|
149
150
|
}
|
|
150
151
|
get INT_COPY() {
|
|
151
152
|
return S;
|
|
152
153
|
}
|
|
153
154
|
get FLOAT_COPY() {
|
|
154
|
-
return
|
|
155
|
+
return O;
|
|
155
156
|
}
|
|
156
157
|
copyFromAttribute(t, e, s, r = e, o = null) {
|
|
157
158
|
if (!t || !s || !t.hasAttribute(e)) return;
|
|
@@ -168,32 +169,32 @@ var C = class {
|
|
|
168
169
|
}
|
|
169
170
|
this.setToPath(s, r, i);
|
|
170
171
|
}
|
|
171
|
-
},
|
|
172
|
-
isBlank: () =>
|
|
173
|
-
isNotBlank: () =>
|
|
174
|
-
length: () =>
|
|
175
|
-
parseRotation: () =>
|
|
176
|
-
parseValAttrAsBoolean: () =>
|
|
177
|
-
parseValAttrAsFloat: () =>
|
|
178
|
-
parseValAttrAsInteger: () =>
|
|
179
|
-
parseValAttrAsString: () =>
|
|
180
|
-
}),
|
|
172
|
+
}, k = o({
|
|
173
|
+
isBlank: () => E,
|
|
174
|
+
isNotBlank: () => R,
|
|
175
|
+
length: () => j,
|
|
176
|
+
parseRotation: () => V,
|
|
177
|
+
parseValAttrAsBoolean: () => L,
|
|
178
|
+
parseValAttrAsFloat: () => _,
|
|
179
|
+
parseValAttrAsInteger: () => B,
|
|
180
|
+
parseValAttrAsString: () => I
|
|
181
|
+
}), V = (t, e) => {
|
|
181
182
|
if (!t || !t.hasAttribute("rot")) return;
|
|
182
|
-
const s = t.getAttribute("rot"), r =
|
|
183
|
+
const s = t.getAttribute("rot"), r = h.roundAccurately(i(s), 2);
|
|
183
184
|
-1e3 !== r && (e.rotation = r);
|
|
184
|
-
},
|
|
185
|
+
}, I = (t, e, s, r, o) => {
|
|
185
186
|
const i = t.getValAttrAsString(r, e);
|
|
186
187
|
null !== i && (s[o] = i);
|
|
187
|
-
},
|
|
188
|
+
}, L = (t, e, s, r, o = r, i = null) => {
|
|
188
189
|
const n = t.getValAttrAsBoolean(r, e, i);
|
|
189
190
|
null !== n && (s[o] = n);
|
|
190
|
-
},
|
|
191
|
+
}, B = (t, e, s, r, o) => {
|
|
191
192
|
const i = t.getValAttrAsInteger(r, e);
|
|
192
193
|
null !== i && (s[o] = i);
|
|
193
|
-
},
|
|
194
|
+
}, _ = (t, e, s, r, o, i = 1) => {
|
|
194
195
|
const n = t.getValAttrAsFloat(r, e);
|
|
195
196
|
null !== n && (s[o] = n * i);
|
|
196
|
-
},
|
|
197
|
+
}, E = (t) => !t || 0 === t.trim().length, R = (t) => !E(t), j = (t) => t?.length ?? 0, Y = class {
|
|
197
198
|
constructor(t) {
|
|
198
199
|
this.jsonKey = t;
|
|
199
200
|
}
|
|
@@ -201,7 +202,7 @@ var C = class {
|
|
|
201
202
|
const r = {};
|
|
202
203
|
return s[this.jsonKey] = r, r;
|
|
203
204
|
}
|
|
204
|
-
},
|
|
205
|
+
}, D = class {
|
|
205
206
|
visit(t, e, s) {}
|
|
206
207
|
getStroke(t, e) {
|
|
207
208
|
const s = t.evaluate("ln", e);
|
|
@@ -209,7 +210,7 @@ var C = class {
|
|
|
209
210
|
}
|
|
210
211
|
parseLn(t, e) {
|
|
211
212
|
const s = {};
|
|
212
|
-
e.hasAttribute("algn") && (s.align = e.getAttribute("algn")), e.hasAttribute("cap") && (s.lineCap =
|
|
213
|
+
e.hasAttribute("algn") && (s.align = e.getAttribute("algn")), e.hasAttribute("cap") && (s.lineCap = z(e.getAttribute("cap"))), e.hasAttribute("cmpd") && (s.compound = e.getAttribute("cmpd")), e.hasAttribute("w") && (s.width = n(e.getAttribute("w")));
|
|
213
214
|
const o = t.evaluate("miter", e);
|
|
214
215
|
o && (s.lineJoin = "miter", o.hasAttribute("lim") && (s.miterLimit = parseFloat(o.getAttribute("lim")) / 1e5)), t.evaluate("bevel", e) && (s.lineJoin = "bevel"), t.evaluate("round", e) && (s.lineJoin = "round");
|
|
215
216
|
const i = t.evaluate("custDash", e);
|
|
@@ -253,21 +254,21 @@ var C = class {
|
|
|
253
254
|
switch (s) {
|
|
254
255
|
case "outerShdw": {
|
|
255
256
|
const s = {
|
|
256
|
-
type:
|
|
257
|
+
type: b.Type.OuterShadow,
|
|
257
258
|
color: this.processAdjColor(t, e)
|
|
258
259
|
};
|
|
259
260
|
return e.hasAttribute("dist") && (s.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (s.angle = i(e.getAttribute("dir"))), e.hasAttribute("blurRad") && (s.blur = n(e.getAttribute("blurRad"))), e.hasAttribute("algn") && (s.alignment = e.getAttribute("algn")), e.hasAttribute("rotWithShape") && (s.isRotatedWithShape = a(e.getAttribute("rotWithShape"))), e.hasAttribute("sx") && (s.scaleX = r(e.getAttribute("sx"))), e.hasAttribute("sy") && (s.scaleY = r(e.getAttribute("sy"))), e.hasAttribute("kx") && (s.skewX = i(e.getAttribute("kx"))), e.hasAttribute("ky") && (s.skewY = i(e.getAttribute("ky"))), s;
|
|
260
261
|
}
|
|
261
262
|
case "innerShdw": {
|
|
262
263
|
const s = {
|
|
263
|
-
type:
|
|
264
|
+
type: b.Type.InnerShadow,
|
|
264
265
|
color: this.processAdjColor(t, e)
|
|
265
266
|
};
|
|
266
267
|
return e.hasAttribute("dist") && (s.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (s.angle = i(e.getAttribute("dir"))), e.hasAttribute("blurRad") && (s.blur = n(e.getAttribute("blurRad"))), s;
|
|
267
268
|
}
|
|
268
269
|
case "prstShdw": {
|
|
269
270
|
const s = {
|
|
270
|
-
type:
|
|
271
|
+
type: b.Type.PresetShadow,
|
|
271
272
|
color: this.processAdjColor(t, e),
|
|
272
273
|
preset: e.getAttribute("prst") ?? void 0
|
|
273
274
|
};
|
|
@@ -275,29 +276,29 @@ var C = class {
|
|
|
275
276
|
}
|
|
276
277
|
case "glow": {
|
|
277
278
|
const s = {
|
|
278
|
-
type:
|
|
279
|
+
type: b.Type.Glow,
|
|
279
280
|
color: this.processAdjColor(t, e)
|
|
280
281
|
};
|
|
281
282
|
return e.hasAttribute("rad") && (s.radius = n(e.getAttribute("rad"))), s;
|
|
282
283
|
}
|
|
283
284
|
case "softEdge": {
|
|
284
|
-
const t = { type:
|
|
285
|
+
const t = { type: b.Type.SoftEdge };
|
|
285
286
|
return e.hasAttribute("rad") && (t.radius = n(e.getAttribute("rad"))), t;
|
|
286
287
|
}
|
|
287
288
|
case "reflection": {
|
|
288
|
-
const t = { type:
|
|
289
|
+
const t = { type: b.Type.Reflection };
|
|
289
290
|
return e.hasAttribute("blurRad") && (t.blur = n(e.getAttribute("blurRad"))), e.hasAttribute("dist") && (t.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (t.angle = i(e.getAttribute("dir"))), e.hasAttribute("fadeDir") && (t.fadeAngle = i(e.getAttribute("fadeDir"))), e.hasAttribute("stA") && (t.startAlpha = r(e.getAttribute("stA"))), e.hasAttribute("stPos") && (t.startPosition = r(e.getAttribute("stPos"))), e.hasAttribute("endA") && (t.endAlpha = r(e.getAttribute("endA"))), e.hasAttribute("endPos") && (t.endPosition = r(e.getAttribute("endPos"))), e.hasAttribute("sx") && (t.scaleX = r(e.getAttribute("sx"))), e.hasAttribute("sy") && (t.scaleY = r(e.getAttribute("sy"))), e.hasAttribute("kx") && (t.skewX = i(e.getAttribute("kx"))), e.hasAttribute("ky") && (t.skewY = i(e.getAttribute("ky"))), e.hasAttribute("algn") && (t.alignment = e.getAttribute("algn")), e.hasAttribute("rotWithShape") && (t.isRotatedWithShape = a(e.getAttribute("rotWithShape"))), t;
|
|
290
291
|
}
|
|
291
292
|
default: return;
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
295
|
getFill(t, e) {
|
|
295
|
-
if (t.evaluate("noFill", e)) return { type:
|
|
296
|
+
if (t.evaluate("noFill", e)) return { type: A.Type.None };
|
|
296
297
|
const s = t.evaluate("solidFill", e);
|
|
297
298
|
if (s) {
|
|
298
299
|
const e = this.processAdjColor(t, s);
|
|
299
300
|
if (e) return {
|
|
300
|
-
type:
|
|
301
|
+
type: A.Type.Solid,
|
|
301
302
|
color: e
|
|
302
303
|
};
|
|
303
304
|
}
|
|
@@ -309,15 +310,15 @@ var C = class {
|
|
|
309
310
|
return i ? this.processImageFill(t, i) : null;
|
|
310
311
|
}
|
|
311
312
|
processGradFill(t, e) {
|
|
312
|
-
const s = { type:
|
|
313
|
+
const s = { type: A.Type.Gradient };
|
|
313
314
|
e.hasAttribute("rotWithShape") && (s.isRotatedWithShape = "1" === e.getAttribute("rotWithShape"));
|
|
314
315
|
const o = t.evaluate("lin", e);
|
|
315
|
-
o && (s.gradientType =
|
|
316
|
+
o && (s.gradientType = A.GradientType.Linear, o.hasAttribute("ang") && (s.angle = i(o.getAttribute("ang"))), o.hasAttribute("scaled") && (s.scaled = a(o.getAttribute("scaled"))));
|
|
316
317
|
const n = {};
|
|
317
318
|
e.hasAttribute("flip") && (n.mirror = e.getAttribute("flip")), Object.keys(n).length > 0 && (s.tile = n);
|
|
318
319
|
const l = t.evaluate("path", e);
|
|
319
320
|
if (l) {
|
|
320
|
-
l.hasAttribute("path") && (s.gradientType =
|
|
321
|
+
l.hasAttribute("path") && (s.gradientType = M(l.getAttribute("path")));
|
|
321
322
|
const e = t.evaluate("fillToRect", l);
|
|
322
323
|
e && (s.focus = this.getRect(e));
|
|
323
324
|
}
|
|
@@ -338,11 +339,11 @@ var C = class {
|
|
|
338
339
|
return t.hasAttribute("t") && (e.t = r(t.getAttribute("t"))), t.hasAttribute("l") && (e.l = r(t.getAttribute("l"))), t.hasAttribute("b") && (e.b = r(t.getAttribute("b"))), t.hasAttribute("r") && (e.r = r(t.getAttribute("r"))), 0 === Object.keys(e).length ? null : e;
|
|
339
340
|
}
|
|
340
341
|
processImageFill(t, e) {
|
|
341
|
-
const s = { type:
|
|
342
|
+
const s = { type: A.Type.Image };
|
|
342
343
|
return e.hasAttribute("rotWithShape") && (s.isRotatedWithShape = a(e.getAttribute("rotWithShape"))), e.hasAttribute("dpi") && (s.dpi = e.getAttribute("dpi")), s.ref = "https://www.sheetxl.com/logo-color-padded-white.jpg", s.tile = !1, s;
|
|
343
344
|
}
|
|
344
345
|
processPatternFill(t, e) {
|
|
345
|
-
const s = { type:
|
|
346
|
+
const s = { type: A.Type.Pattern };
|
|
346
347
|
s.patternType = e.getAttribute("prst");
|
|
347
348
|
const r = t.evaluate("bgClr", e);
|
|
348
349
|
if (r) {
|
|
@@ -408,17 +409,17 @@ var C = class {
|
|
|
408
409
|
const o = e.getAttribute("val");
|
|
409
410
|
return o ? ` ${s} ${!o || parseFloat(o) / r}` : ` ${s}`;
|
|
410
411
|
}
|
|
411
|
-
},
|
|
412
|
+
}, M = (t) => "circle" === t ? "radial" : t, z = (t) => {
|
|
412
413
|
if ("rnd" === t) return "round";
|
|
413
414
|
if ("flat" === t) return "butt";
|
|
414
415
|
if ("sq" === t) return "square";
|
|
415
416
|
throw new Error("Invalid lineCap type: " + t);
|
|
416
|
-
},
|
|
417
|
+
}, U = class extends D {
|
|
417
418
|
visit(e, s, r) {
|
|
418
419
|
try {
|
|
419
420
|
const o = e.evaluate("xfrm", s);
|
|
420
421
|
if (o) {
|
|
421
|
-
|
|
422
|
+
V(o, r);
|
|
422
423
|
const s = {
|
|
423
424
|
x: 0,
|
|
424
425
|
y: 0,
|
|
@@ -439,10 +440,10 @@ var C = class {
|
|
|
439
440
|
console.warn(t);
|
|
440
441
|
}
|
|
441
442
|
}
|
|
442
|
-
},
|
|
443
|
+
}, W = class {
|
|
443
444
|
visit(t, e, s) {
|
|
444
445
|
let r = {};
|
|
445
|
-
if (
|
|
446
|
+
if (I(t, e, r, "grouping", "grouping"), L(t, e, r, "varyColors", "varyColors"), _(t, e, r, "gapWidth", "gapWidth", .01), _(t, e, r, "overlap", "overlap", .01), this.parseType(t, e, r), B(t, e, r, "bubbleScale", "bubbleScale"), L(t, e, r, "showNegBubbles", "showNegativeBubbleValues"), L(t, e, r, "sizeRepresents", "bubbleSizeRepresentsWidth"), B(t, e, r, "firstSliceAng", "startAngle"), B(t, e, r, "holeSize", "holeSize"), I(t, e, r, "scatterStyle", "scatterStyle"), this.parseAxisIds(t, e, r), Object.keys(r).length > 0) {
|
|
446
447
|
let e = t.getVisitorParamsState().get("types");
|
|
447
448
|
e || (console.warn("Uninitialized types array in ChartTypeVisitor"), e = [], t.getVisitorParamsState().set("types", e)), e.push(r);
|
|
448
449
|
}
|
|
@@ -471,7 +472,7 @@ var C = class {
|
|
|
471
472
|
const r = t.evaluate("axId", e);
|
|
472
473
|
r && 0 !== r.length && (s.xAxisId = r.item(0).getAttribute("val"), s.yAxisId = r.item(1).getAttribute("val"));
|
|
473
474
|
}
|
|
474
|
-
},
|
|
475
|
+
}, X = (t, e, s) => {
|
|
475
476
|
if (!0 === t.getValAttrAsBoolean("invertIfNegative", e)) if (t.evaluate("extLst/ext/invertSolidFillFmt", e)) {
|
|
476
477
|
if (s.fill && s.fillNegative) {
|
|
477
478
|
const e = t.getFromPath(s, "fill.solid.adjs");
|
|
@@ -485,7 +486,7 @@ var C = class {
|
|
|
485
486
|
const i = {};
|
|
486
487
|
i.fill = o, s.strokeNegative = i;
|
|
487
488
|
}
|
|
488
|
-
}, G = class extends
|
|
489
|
+
}, G = class extends D {
|
|
489
490
|
constructor(t = "text") {
|
|
490
491
|
super(), this._jsonKey = t;
|
|
491
492
|
}
|
|
@@ -498,7 +499,7 @@ var C = class {
|
|
|
498
499
|
}
|
|
499
500
|
parseTextElement(t, e, s, r) {
|
|
500
501
|
const o = t.evaluate("p/pPr/defRPr", e) ?? t.evaluate("defRPr", e);
|
|
501
|
-
o && (this.parseTextProperties(t, o, s), new
|
|
502
|
+
o && (this.parseTextProperties(t, o, s), new U().visit(t, o, s));
|
|
502
503
|
const i = s.runs ?? [], n = t.evaluate("p/r", e) ?? t.evaluate("r", e), l = (e) => {
|
|
503
504
|
const s = {};
|
|
504
505
|
let r = t.evaluate("t", e);
|
|
@@ -509,7 +510,7 @@ var C = class {
|
|
|
509
510
|
else l(n || e);
|
|
510
511
|
i.length > 0 && (s.runs = i);
|
|
511
512
|
const a = t.evaluate("bodyPr", e);
|
|
512
|
-
a &&
|
|
513
|
+
a && V(a, s);
|
|
513
514
|
}
|
|
514
515
|
parseTextProperties(t, e, s) {
|
|
515
516
|
if (!e) return;
|
|
@@ -521,12 +522,12 @@ var C = class {
|
|
|
521
522
|
const t = s.font ?? {};
|
|
522
523
|
if (o.hasAttribute("typeface") && (t.family = o.getAttribute("typeface")), o.hasAttribute("panose")) {
|
|
523
524
|
const e = o.getAttribute("panose");
|
|
524
|
-
e && (t.fallbacks = [
|
|
525
|
+
e && (t.fallbacks = [f.getPanoseFallback(e)]);
|
|
525
526
|
}
|
|
526
527
|
o.hasAttribute("pitchFamily") && (t.pitch = o.getAttribute("pitchFamily")), o.hasAttribute("charset") && (t.charset = o.getAttribute("charset")), Object.keys(t).length > 0 && (s.font = t);
|
|
527
528
|
}
|
|
528
529
|
}
|
|
529
|
-
},
|
|
530
|
+
}, $ = class {
|
|
530
531
|
visit(t, e, s) {}
|
|
531
532
|
processDataBarColor(t, s, r, o, i = "auto") {
|
|
532
533
|
if (!s) return;
|
|
@@ -548,11 +549,11 @@ var C = class {
|
|
|
548
549
|
return s;
|
|
549
550
|
}
|
|
550
551
|
processFont(t, e, s) {
|
|
551
|
-
t.getValAttrAsBoolean("b", e, !0) && (s.weight = 700), t.getValAttrAsBoolean("i", e, !0) && (s.style =
|
|
552
|
+
t.getValAttrAsBoolean("b", e, !0) && (s.weight = 700), t.getValAttrAsBoolean("i", e, !0) && (s.style = f.Style.Italic), t.getValAttrAsBoolean("strike", e, !0) && (s.strike = !0);
|
|
552
553
|
const r = t.evaluate("u", e);
|
|
553
|
-
r && (s.underline = r.getAttribute("val") ||
|
|
554
|
+
r && (s.underline = r.getAttribute("val") || f.UnderlineStyle.Single), I(t, e, s, "vertAlign", "verticalAlign"), "superscript" === s.verticalAlign ? s.verticalAlign = f.VerticalAlignment.Super : "subscript" === s.verticalAlign && (s.verticalAlign = f.VerticalAlignment.Sub), _(t, e, s, "sz", "size");
|
|
554
555
|
const o = t.evaluate("color", e);
|
|
555
|
-
this.processDataBarColor(t, o, s, "color"), s.color || (s.color = "auto"),
|
|
556
|
+
this.processDataBarColor(t, o, s, "color"), s.color || (s.color = "auto"), I(t, e, s, "name", "family"), I(t, e, s, "rFont", "family");
|
|
556
557
|
const i = t.evaluate("family", e);
|
|
557
558
|
if (i) {
|
|
558
559
|
const t = i.getAttribute("val");
|
|
@@ -572,7 +573,7 @@ var C = class {
|
|
|
572
573
|
case "5": s.fallbacks = ["fantasy"];
|
|
573
574
|
}
|
|
574
575
|
}
|
|
575
|
-
return
|
|
576
|
+
return I(t, e, s, "scheme", "scheme"), L(t, e, s, "shadow", "shadow", !0), L(t, e, s, "outline", "outline", !0), t.getValAttrAsBoolean("condense", e, !0) && (s.letterSpacing = -1), t.getValAttrAsBoolean("extend", e, !0) && (s.letterSpacing = 1), B(t, e, s, "charset", "charset"), s;
|
|
576
577
|
}
|
|
577
578
|
processFills(t, e, s) {
|
|
578
579
|
if (!e) return;
|
|
@@ -586,7 +587,7 @@ var C = class {
|
|
|
586
587
|
return s;
|
|
587
588
|
}
|
|
588
589
|
processFill(t, e, s, r) {
|
|
589
|
-
const o = { type:
|
|
590
|
+
const o = { type: A.Type.None }, i = e.childNodes;
|
|
590
591
|
let n = !1;
|
|
591
592
|
const l = i.length;
|
|
592
593
|
for (let e = 0; !n && e < l; e++) {
|
|
@@ -597,17 +598,17 @@ var C = class {
|
|
|
597
598
|
}
|
|
598
599
|
processGradientFill(t, e, s) {
|
|
599
600
|
if (!e) return;
|
|
600
|
-
s.type =
|
|
601
|
+
s.type = A.Type.Gradient;
|
|
601
602
|
const r = [];
|
|
602
603
|
s.stops = r;
|
|
603
604
|
const o = e.getAttribute("type");
|
|
604
605
|
o && (s.gradientType = o);
|
|
605
606
|
const i = e.hasAttribute("degree") ? parseFloat(e.getAttribute("degree")) : 0;
|
|
606
607
|
(i + 90) % 360 != 0 && (s.angle = (i + 90) % 360), (e.hasAttribute("left") || e.hasAttribute("top") || e.hasAttribute("right") || e.hasAttribute("bottom")) && (s.focus = {
|
|
607
|
-
left:
|
|
608
|
-
top:
|
|
609
|
-
right:
|
|
610
|
-
bottom:
|
|
608
|
+
left: K(e.getAttribute("left")),
|
|
609
|
+
top: K(e.getAttribute("top")),
|
|
610
|
+
right: K(e.getAttribute("right")),
|
|
611
|
+
bottom: K(e.getAttribute("bottom"))
|
|
611
612
|
});
|
|
612
613
|
const n = e.childNodes, l = n.length;
|
|
613
614
|
for (let e = 0; e < l; e++) {
|
|
@@ -623,11 +624,11 @@ var C = class {
|
|
|
623
624
|
}
|
|
624
625
|
processPatternFill(t, e, s) {
|
|
625
626
|
if (!e) return;
|
|
626
|
-
const r = t.getVisitorParamsState().get("processingDXFs"), o = e.getAttribute("patternType") || (r ?
|
|
627
|
-
if (o ===
|
|
628
|
-
s.type =
|
|
627
|
+
const r = t.getVisitorParamsState().get("processingDXFs"), o = e.getAttribute("patternType") || (r ? A.BuiltInSheetPattern.Solid : A.BuiltInSheetPattern.None);
|
|
628
|
+
if (o === A.BuiltInSheetPattern.None) return { none: !0 };
|
|
629
|
+
s.type = A.Type.Pattern, o && (s.patternType = o);
|
|
629
630
|
let i = "foreground", n = "background";
|
|
630
|
-
const l = s.patternType ===
|
|
631
|
+
const l = s.patternType === A.BuiltInSheetPattern.Solid && r;
|
|
631
632
|
let a = l ? "dk1" : "lt1", c = l ? "lt1" : "dk1";
|
|
632
633
|
if (l) {
|
|
633
634
|
const t = i;
|
|
@@ -652,28 +653,32 @@ var C = class {
|
|
|
652
653
|
processBorder(t, e, s, r, o) {
|
|
653
654
|
if (!e) return;
|
|
654
655
|
const i = {};
|
|
655
|
-
return this.processBorderStroke(t, e, i,
|
|
656
|
+
return this.processBorderStroke(t, e, i, g.Edge.Left), this.processBorderStroke(t, e, i, g.Edge.Right), o ? (i.right || i.left) && (i.right ? i.vertical = { ...i.right } : i.vertical = { ...i.left }) : this.processBorderStroke(t, e, i, g.Edge.Vertical), this.processBorderStroke(t, e, i, g.Edge.Top), this.processBorderStroke(t, e, i, g.Edge.Bottom), o ? (i.bottom || i.top) && (i.bottom ? i.horizontal = { ...i.bottom } : i.horizontal = { ...i.top }) : this.processBorderStroke(t, e, i, g.Edge.Horizontal), s[r] = i, s;
|
|
656
657
|
}
|
|
657
658
|
processBorderStroke(t, e, s, r) {
|
|
658
659
|
if (!e) return;
|
|
659
660
|
const o = t.evaluate(r, e);
|
|
660
661
|
if (!o) return;
|
|
661
662
|
const i = {};
|
|
662
|
-
o.hasAttribute("style") ? i.style = o.getAttribute("style") : t.getVisitorParamsState().get("processingDXFs") && (i.style =
|
|
663
|
+
o.hasAttribute("style") ? i.style = o.getAttribute("style") : t.getVisitorParamsState().get("processingDXFs") && (i.style = g.StrokeStyle.None);
|
|
663
664
|
const n = t.evaluate("color", o);
|
|
664
665
|
return n && this.processDataBarColor(t, n, i, "color"), Object.keys(i).length > 0 ? s[r] = i : null;
|
|
665
666
|
}
|
|
666
|
-
},
|
|
667
|
+
}, K = (t) => {
|
|
667
668
|
if (!t) return 0;
|
|
668
669
|
const e = parseFloat(t);
|
|
669
670
|
return isNaN(e) ? 0 : e;
|
|
670
|
-
},
|
|
671
|
+
}, H = {
|
|
672
|
+
auto: "auto",
|
|
673
|
+
autoNoTable: "automaticExceptTables",
|
|
674
|
+
manual: "manual"
|
|
675
|
+
}, q = class {
|
|
671
676
|
visit(t, e, s) {
|
|
672
677
|
if (!e) return;
|
|
673
678
|
let r = t.evaluate("*/cNvPr", e);
|
|
674
679
|
return r.item && (r = r.item(0)), r && (t.copyFromAttribute(r, "name", s), t.copyFromAttribute(r, "descr", s, "description"), t.copyFromAttribute(r, "hidden", s, "hidden", t.BOOLEAN_COPY), t.copyFromAttribute(r, "id", s)), s;
|
|
675
680
|
}
|
|
676
|
-
},
|
|
681
|
+
}, J = class extends q {
|
|
677
682
|
visit(t, e, s) {
|
|
678
683
|
if (!e) return;
|
|
679
684
|
if (t.getPath().includes("Fallback") && s.content) return s;
|
|
@@ -700,7 +705,7 @@ var C = class {
|
|
|
700
705
|
json: l
|
|
701
706
|
}, l;
|
|
702
707
|
}
|
|
703
|
-
},
|
|
708
|
+
}, Q = "richTypes", Z = "richData", tt = class {
|
|
704
709
|
visit(t, e, s) {
|
|
705
710
|
if (!e) return;
|
|
706
711
|
const r = e.childNodes, o = r.length;
|
|
@@ -715,7 +720,7 @@ var C = class {
|
|
|
715
720
|
t.copyFromAttribute(e, "Target", r, "target"), t.copyFromAttribute(e, "Type", r, "type"), t.copyFromAttribute(e, "TargetMode", r, "targetMode");
|
|
716
721
|
s[e.getAttribute("Id")] = r;
|
|
717
722
|
}
|
|
718
|
-
},
|
|
723
|
+
}, et = class {
|
|
719
724
|
visit(t, e, s) {
|
|
720
725
|
const r = [], o = e.childNodes, i = o.length;
|
|
721
726
|
for (let e = 0; e < i; e++) {
|
|
@@ -732,7 +737,7 @@ var C = class {
|
|
|
732
737
|
value: e.textContent || ""
|
|
733
738
|
};
|
|
734
739
|
}
|
|
735
|
-
},
|
|
740
|
+
}, st = class {
|
|
736
741
|
visit(t, e, s) {
|
|
737
742
|
const r = [], o = e.childNodes, i = o.length;
|
|
738
743
|
for (let e = 0; e < i; e++) {
|
|
@@ -749,9 +754,9 @@ var C = class {
|
|
|
749
754
|
value: e.textContent || ""
|
|
750
755
|
};
|
|
751
756
|
}
|
|
752
|
-
},
|
|
757
|
+
}, rt = class {
|
|
753
758
|
visit(t, e, s) {
|
|
754
|
-
return
|
|
759
|
+
return L(t, e, s, "roundedCorners", "roundedCorners"), B(t, e, s, ".//AlternateContent/Fallback/style", "styleId"), t.getVisitorParamsState().set("types", []), t.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), s.range = null, s;
|
|
755
760
|
}
|
|
756
761
|
afterVisit(t, e, s) {
|
|
757
762
|
let r = {};
|
|
@@ -779,17 +784,17 @@ var C = class {
|
|
|
779
784
|
for (let t = 0; t < d; t++) p[t + ""] = h[t];
|
|
780
785
|
p.length = d, t.getVisitorParamsState().delete("types"), t.getVisitorParamsState().delete("axes"), t.getVisitorParamsState().delete("series");
|
|
781
786
|
}
|
|
782
|
-
},
|
|
787
|
+
}, ot = class {
|
|
783
788
|
visit(t, e, s) {
|
|
784
789
|
let r = {};
|
|
785
790
|
return s.plotArea = r, r;
|
|
786
791
|
}
|
|
787
|
-
},
|
|
792
|
+
}, it = U, nt = class extends W {
|
|
788
793
|
parseType(t, e, s) {
|
|
789
794
|
const r = t.getValAttrAsString("barDir", e);
|
|
790
795
|
r && (s.type = "col" === r ? "column" : "bar");
|
|
791
796
|
}
|
|
792
|
-
},
|
|
797
|
+
}, lt = W, at = class {
|
|
793
798
|
constructor(t) {
|
|
794
799
|
this.jsonKey = t;
|
|
795
800
|
}
|
|
@@ -797,18 +802,18 @@ var C = class {
|
|
|
797
802
|
let r = {}, o = r, i = t.getValAttrAsString("idx", e);
|
|
798
803
|
null !== i && (o = {}, o[i] = r);
|
|
799
804
|
const n = t.getValAttrAsBoolean("delete", e);
|
|
800
|
-
this.parseNumFormat(t, e, r), !0 === n ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (
|
|
805
|
+
this.parseNumFormat(t, e, r), !0 === n ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (L(t, e, r, "showBubbleSize", "showBubbleSize"), L(t, e, r, "showCatName", "showCatName"), L(t, e, r, "showLeaderLines", "showLeaderLines"), L(t, e, r, "showPercent", "showPercentage"), L(t, e, r, "showSerName", "showSerName"), L(t, e, r, "showVal", "showVal"), L(t, e, r, "showLegendKey", "showLegendKey"));
|
|
801
806
|
const l = t.evaluate("separator", e);
|
|
802
|
-
return null !== l && (r.separator = l.textContent),
|
|
807
|
+
return null !== l && (r.separator = l.textContent), I(t, e, r, "dLblPos", "position"), s[this.jsonKey] = o, r;
|
|
803
808
|
}
|
|
804
809
|
parseNumFormat(t, e, s) {
|
|
805
810
|
const r = t.evaluate("numFmt", e);
|
|
806
811
|
r && (s.formatCode = r.getAttribute("formatCode"), r.hasAttribute("sourceLinked") && (s.sourceLinked = "1" === r.getAttribute("sourceLinked")));
|
|
807
812
|
}
|
|
808
|
-
},
|
|
813
|
+
}, ct = class {
|
|
809
814
|
visit(t, e, s) {
|
|
810
815
|
const r = {};
|
|
811
|
-
|
|
816
|
+
B(t, e, r, "explosion", "explosion");
|
|
812
817
|
let o = t.evaluate("cat/*/f", e);
|
|
813
818
|
o || (o = t.evaluate("xVal/*/f", e));
|
|
814
819
|
let i = null;
|
|
@@ -816,7 +821,7 @@ var C = class {
|
|
|
816
821
|
let n = t.evaluate("val/*/f", e);
|
|
817
822
|
n || (n = t.evaluate("yVal/*/f", e));
|
|
818
823
|
let l = null;
|
|
819
|
-
n && n.firstChild && (l = n.firstChild.nodeValue), n || (n = t.evaluate("val/numLit", e), null !== n && (l = this.parsePointsAsString(t, n))), null !== l && (r.valRange = l), this.parseTitleRangeOrValue(t, e, r),
|
|
824
|
+
n && n.firstChild && (l = n.firstChild.nodeValue), n || (n = t.evaluate("val/numLit", e), null !== n && (l = this.parsePointsAsString(t, n))), null !== l && (r.valRange = l), this.parseTitleRangeOrValue(t, e, r), B(t, e, r, "idx", "idx"), L(t, e, r, "smooth", "smooth"), r.offsetChart = t.getVisitorParamsState().get("types").length - 1;
|
|
820
825
|
let a = t.getVisitorParamsState().get("series");
|
|
821
826
|
return a || (a = [], t.getVisitorParamsState().set("series", a)), a.push(r), r;
|
|
822
827
|
}
|
|
@@ -842,7 +847,7 @@ var C = class {
|
|
|
842
847
|
return s += "}", s;
|
|
843
848
|
}
|
|
844
849
|
afterVisit(t, e, s) {
|
|
845
|
-
|
|
850
|
+
X(t, e, s);
|
|
846
851
|
let r = t.getFromPath(s, "points");
|
|
847
852
|
if (r) {
|
|
848
853
|
const e = Object.keys(r);
|
|
@@ -854,15 +859,15 @@ var C = class {
|
|
|
854
859
|
}
|
|
855
860
|
}
|
|
856
861
|
}
|
|
857
|
-
},
|
|
862
|
+
}, ut = class {
|
|
858
863
|
DataPointVisitor() {}
|
|
859
864
|
visit(t, e, s) {
|
|
860
865
|
let r = t.getFromPath(s, "points"), o = null;
|
|
861
866
|
r ? o = r : (o = {}, t.setToPath(s, "points", o));
|
|
862
867
|
let i = {}, n = t.getValAttrAsString("idx", e);
|
|
863
|
-
return null !== n && (o[n] = i),
|
|
868
|
+
return null !== n && (o[n] = i), L(t, e, i, "bubble3D", "bubble3D"), B(t, e, i, "explosion", "explosion"), X(t, e, i), i;
|
|
864
869
|
}
|
|
865
|
-
},
|
|
870
|
+
}, ht = class {
|
|
866
871
|
visit(t, e, s) {
|
|
867
872
|
const r = e.parentNode.localName;
|
|
868
873
|
if ("ser" === r || "dPt" === r) {
|
|
@@ -873,12 +878,12 @@ var C = class {
|
|
|
873
878
|
}
|
|
874
879
|
return null;
|
|
875
880
|
}
|
|
876
|
-
},
|
|
881
|
+
}, pt = class {
|
|
877
882
|
visit(t, e, s) {
|
|
878
883
|
let r = {};
|
|
879
|
-
this.parseScaling(t, e, r),
|
|
884
|
+
this.parseScaling(t, e, r), _(t, e, r, "majorUnit", "majorUnits"), _(t, e, r, "minorUnit", "minorUnits"), L(t, e, r, "delete", "shown"), this.parseOrientation(t, e, r), this.parseNumFormat(t, e, r), I(t, e, r, "majorTickMark", "majorTickMarks"), I(t, e, r, "minorTickMark", "minorTickMarks"), I(t, e, r, "crosses", "crosses"), _(t, e, r, "crossesAt", "crosses"), I(t, e, r, "crossBetween", "crossBetween"), this.parseLabelAlign(t, e, r), B(t, e, r, "lblOffset", "labelOffset"), I(t, e, r, "tickLblPos", "labelPosition");
|
|
880
885
|
const o = t.getValAttrAsInteger("noMultiLvlLbl", e);
|
|
881
|
-
r.labelMultiLevel = null !== o && 0 === o,
|
|
886
|
+
r.labelMultiLevel = null !== o && 0 === o, B(t, e, r, "tickMarkSkip", "tickMarkSkip"), B(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"), I(t, e, r, "baseTimeUnit", "baseUnitDates"), t.getVisitorParamsState().get("axes") || (console.warn("Uninitialized axes map in AxisVisitor"), t.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()));
|
|
882
887
|
const i = t.getValAttrAsString("axId", e);
|
|
883
888
|
return t.getVisitorParamsState().get("axes").set(i, r), r;
|
|
884
889
|
}
|
|
@@ -907,7 +912,7 @@ var C = class {
|
|
|
907
912
|
const r = t.getValAttrAsString("scaling/orientation", e);
|
|
908
913
|
null !== r && (s.inverted = "minMax" !== r);
|
|
909
914
|
const o = t.getValAttrAsFloat("scaling/logBase", e);
|
|
910
|
-
null !== o && (s.logBase = o, s.scaleType = "log"),
|
|
915
|
+
null !== o && (s.logBase = o, s.scaleType = "log"), _(t, e, s, "scaling/max", "max"), _(t, e, s, "scaling/min", "min");
|
|
911
916
|
}
|
|
912
917
|
afterVisit(t, e, s) {
|
|
913
918
|
s.fill && s.labels && (s.labels.fill = s.fill, delete s.fill);
|
|
@@ -922,7 +927,7 @@ var C = class {
|
|
|
922
927
|
const l = t.evaluate("majorGridlines", e);
|
|
923
928
|
t.setToPath(s, "gridLinesMajor.shown", null !== l);
|
|
924
929
|
}
|
|
925
|
-
},
|
|
930
|
+
}, dt = G, gt = class {
|
|
926
931
|
visit(t, e, s) {
|
|
927
932
|
const r = t.getVisitorParamsState().get("series");
|
|
928
933
|
let o = t.getValAttrAsInteger("idx", e), i = null !== o ? r[o] : void 0;
|
|
@@ -934,19 +939,19 @@ var C = class {
|
|
|
934
939
|
}
|
|
935
940
|
return s;
|
|
936
941
|
}
|
|
937
|
-
},
|
|
942
|
+
}, mt = class {
|
|
938
943
|
visit(t, e, s) {
|
|
939
944
|
const r = {};
|
|
940
|
-
return
|
|
945
|
+
return L(t, e, r, "overlay", "overlay"), I(t, e, r, "legendPos", "position"), s.legend = r, r;
|
|
941
946
|
}
|
|
942
|
-
},
|
|
947
|
+
}, bt = class extends U {
|
|
943
948
|
visit(t, e, s) {
|
|
944
949
|
const r = this.getFill(t, e);
|
|
945
950
|
Object.keys(r).length > 0 && (s.fillNegative = r);
|
|
946
951
|
const o = this.getStroke(t, e);
|
|
947
952
|
return Object.keys(o).length > 0 && (s.strokeNegative = o), s;
|
|
948
953
|
}
|
|
949
|
-
},
|
|
954
|
+
}, At = class extends G {
|
|
950
955
|
constructor(t = "title") {
|
|
951
956
|
super(t);
|
|
952
957
|
}
|
|
@@ -959,7 +964,7 @@ var C = class {
|
|
|
959
964
|
}
|
|
960
965
|
visit(t, e, s) {
|
|
961
966
|
const r = {};
|
|
962
|
-
|
|
967
|
+
L(t, e, r, "overlay", "overlay"), s[this._jsonKey] = r;
|
|
963
968
|
let o = t.getFromPath(r, this.getTextPath());
|
|
964
969
|
o || (o = {}), this.parseTitleRangeOrValue(t, e, r);
|
|
965
970
|
const i = t.evaluate("txPr", e);
|
|
@@ -973,20 +978,20 @@ var C = class {
|
|
|
973
978
|
null !== t && (s.rotation = parseInt(t), delete s.title.rotation);
|
|
974
979
|
}
|
|
975
980
|
}
|
|
976
|
-
},
|
|
981
|
+
}, ft = class {
|
|
977
982
|
visit(t, e, s) {
|
|
978
983
|
const r = t.evaluate("manualLayout", e);
|
|
979
984
|
if (r) {
|
|
980
985
|
let e = {};
|
|
981
|
-
|
|
986
|
+
_(t, r, e, "x", "x"), _(t, r, e, "y", "y"), _(t, r, e, "w", "w"), _(t, r, e, "h", "h"), I(t, r, e, "xMode", "xMode"), I(t, r, e, "yMode", "yMode"), I(t, r, e, "wMode", "wMode"), I(t, r, e, "hMode", "hMode"), Object.keys(e).length > 0 && (s.manualLayout = e);
|
|
982
987
|
}
|
|
983
988
|
return s;
|
|
984
989
|
}
|
|
985
|
-
},
|
|
990
|
+
}, yt = class {
|
|
986
991
|
visit(t, e, s) {
|
|
987
992
|
return s.name = e.getAttribute("name"), s;
|
|
988
993
|
}
|
|
989
|
-
},
|
|
994
|
+
}, vt = class extends D {
|
|
990
995
|
visit(t, e, s) {
|
|
991
996
|
const r = {};
|
|
992
997
|
r.name = e.getAttribute("name");
|
|
@@ -1001,7 +1006,7 @@ var C = class {
|
|
|
1001
1006
|
}
|
|
1002
1007
|
return Object.keys(r).length > 0 && (s.colors = r), r;
|
|
1003
1008
|
}
|
|
1004
|
-
},
|
|
1009
|
+
}, Nt = class {
|
|
1005
1010
|
visit(t, e, s) {
|
|
1006
1011
|
const r = {};
|
|
1007
1012
|
r.name = e.getAttribute("name");
|
|
@@ -1017,9 +1022,9 @@ var C = class {
|
|
|
1017
1022
|
const o = r.getAttribute("typeface");
|
|
1018
1023
|
o && (s.family = o);
|
|
1019
1024
|
const i = r.getAttribute("panose");
|
|
1020
|
-
return i && (s.fallbacks = [
|
|
1025
|
+
return i && (s.fallbacks = [f.getPanoseFallback(i)]), s;
|
|
1021
1026
|
}
|
|
1022
|
-
},
|
|
1027
|
+
}, Ft = class extends D {
|
|
1023
1028
|
visit(t, e, s) {
|
|
1024
1029
|
const r = this.parseFillList(t, e, "fillStyleLst"), o = this.parseLnList(t, e, "lnStyleLst"), i = this.parseEffectStyleList(t, e, "effectStyleLst"), n = this.parseFillList(t, e, "bgFillStyleLst");
|
|
1025
1030
|
if (r && o && i && n) return s.fillStyleLst = r, s.lnStyleLst = o, s.effectStyleLst = i, void (s.bgFillStyleLst = n);
|
|
@@ -1041,11 +1046,11 @@ var C = class {
|
|
|
1041
1046
|
}
|
|
1042
1047
|
parseFillListItem(t, e) {
|
|
1043
1048
|
switch (e.localName) {
|
|
1044
|
-
case "noFill": return { type:
|
|
1049
|
+
case "noFill": return { type: A.Type.None };
|
|
1045
1050
|
case "solidFill": {
|
|
1046
1051
|
const s = this.processAdjColor(t, e);
|
|
1047
1052
|
return s ? {
|
|
1048
|
-
type:
|
|
1053
|
+
type: A.Type.Solid,
|
|
1049
1054
|
color: s
|
|
1050
1055
|
} : void 0;
|
|
1051
1056
|
}
|
|
@@ -1081,7 +1086,7 @@ var C = class {
|
|
|
1081
1086
|
}
|
|
1082
1087
|
return o;
|
|
1083
1088
|
}
|
|
1084
|
-
},
|
|
1089
|
+
}, Ct = class {
|
|
1085
1090
|
visit(t, e, s) {
|
|
1086
1091
|
if (!e) return;
|
|
1087
1092
|
const r = {}, o = e.getAttribute("r:id");
|
|
@@ -1091,7 +1096,7 @@ var C = class {
|
|
|
1091
1096
|
}
|
|
1092
1097
|
return t.copyFromAttribute(e, "tooltip", r, "screenTip"), t.copyFromAttribute(e, "history", r, "history", t.BOOLEAN_COPY), t.copyFromAttribute(e, "tgtFrame", r, "target"), s.hyperlink = r, r;
|
|
1093
1098
|
}
|
|
1094
|
-
},
|
|
1099
|
+
}, wt = class {
|
|
1095
1100
|
visit(t, e, s) {
|
|
1096
1101
|
if (!e) return;
|
|
1097
1102
|
const r = {}, o = [];
|
|
@@ -1099,22 +1104,22 @@ var C = class {
|
|
|
1099
1104
|
}
|
|
1100
1105
|
processColorFilter(t, e) {
|
|
1101
1106
|
const s = {}, r = {
|
|
1102
|
-
operator:
|
|
1107
|
+
operator: m.BuiltInOperatorNames.Color,
|
|
1103
1108
|
param: s
|
|
1104
1109
|
};
|
|
1105
1110
|
return t.copyFromAttribute(e, "cellColor", s, "cellColor", t.BOOLEAN_COPY), t.copyFromAttribute(e, "dxfId", s, "styleId", t.INT_COPY), r;
|
|
1106
1111
|
}
|
|
1107
1112
|
processCustomFilter(t, e) {
|
|
1108
|
-
return {
|
|
1113
|
+
return u({
|
|
1109
1114
|
operator: e.getAttribute("operator"),
|
|
1110
|
-
|
|
1111
|
-
};
|
|
1115
|
+
val: e.getAttribute("val")
|
|
1116
|
+
});
|
|
1112
1117
|
}
|
|
1113
1118
|
processCustomFilters(t, e) {
|
|
1114
1119
|
const s = e.getAttribute("and"), r = "and" === s || "1" === s;
|
|
1115
1120
|
e.getAttribute("val");
|
|
1116
1121
|
const o = [], i = {
|
|
1117
|
-
operator: r ?
|
|
1122
|
+
operator: r ? m.BuiltInOperatorNames.And : m.BuiltInOperatorNames.Or,
|
|
1118
1123
|
param: o
|
|
1119
1124
|
}, n = e.childNodes, l = n.length;
|
|
1120
1125
|
for (let e = 0; e < l; e++) {
|
|
@@ -1123,15 +1128,15 @@ var C = class {
|
|
|
1123
1128
|
let r = null;
|
|
1124
1129
|
"customFilter" === s.localName && (r = this.processCustomFilter(t, s)), r && o.push(r);
|
|
1125
1130
|
}
|
|
1126
|
-
return i;
|
|
1131
|
+
return 1 === o.length ? o[0] : i;
|
|
1127
1132
|
}
|
|
1128
1133
|
processDynamicFilter(t, e) {
|
|
1129
1134
|
const s = {}, r = {
|
|
1130
|
-
operator:
|
|
1135
|
+
operator: m.BuiltInOperatorNames.TimePeriod,
|
|
1131
1136
|
param: s
|
|
1132
1137
|
};
|
|
1133
1138
|
let o = e.getAttribute("type");
|
|
1134
|
-
return "aboveAverage" === o ? o =
|
|
1139
|
+
return "aboveAverage" === o ? o = m.AverageType.Above : "belowAverage" === o && (o = m.AverageType.Below), Object.values(m.AverageType).includes(o) ? (r.operator = m.BuiltInOperatorNames.Average, t.copyFromAttribute(e, "val", s, "stdDevs", t.INT_COPY)) : t.copyFromAttribute(e, "val", s, "anchorDate", t.INT_COPY), t.copyFromAttribute(e, "type", s, "operator"), t.copyFromAttribute(e, "maxVal", s, "maxVal", t.INT_COPY), r;
|
|
1135
1140
|
}
|
|
1136
1141
|
processDateGroupItem(t, e) {
|
|
1137
1142
|
const s = {};
|
|
@@ -1142,7 +1147,7 @@ var C = class {
|
|
|
1142
1147
|
}
|
|
1143
1148
|
processFilters(t, e) {
|
|
1144
1149
|
const s = {}, r = {
|
|
1145
|
-
operator:
|
|
1150
|
+
operator: m.BuiltInOperatorNames.InSet,
|
|
1146
1151
|
param: s
|
|
1147
1152
|
};
|
|
1148
1153
|
t.copyFromAttribute(e, "blank", r, "blank", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calendarType", r, "calendarType");
|
|
@@ -1164,14 +1169,14 @@ var C = class {
|
|
|
1164
1169
|
}
|
|
1165
1170
|
processIcon(t, e) {
|
|
1166
1171
|
const s = {}, r = {
|
|
1167
|
-
operator:
|
|
1172
|
+
operator: m.BuiltInOperatorNames.Icon,
|
|
1168
1173
|
param: s
|
|
1169
1174
|
};
|
|
1170
1175
|
return t.copyFromAttribute(e, "iconId", s, "iconId", t.INT_COPY), t.copyFromAttribute(e, "iconSet", s), r;
|
|
1171
1176
|
}
|
|
1172
1177
|
processTop10(t, e) {
|
|
1173
1178
|
const s = {}, r = {
|
|
1174
|
-
operator:
|
|
1179
|
+
operator: m.BuiltInOperatorNames.TopN,
|
|
1175
1180
|
param: s
|
|
1176
1181
|
};
|
|
1177
1182
|
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), r;
|
|
@@ -1216,11 +1221,11 @@ var C = class {
|
|
|
1216
1221
|
}
|
|
1217
1222
|
return s;
|
|
1218
1223
|
}
|
|
1219
|
-
},
|
|
1224
|
+
}, Pt = class {
|
|
1220
1225
|
visit(t, e, s) {
|
|
1221
1226
|
if (!e) return;
|
|
1222
1227
|
const r = e.getAttribute("ref"), o = {};
|
|
1223
|
-
e.hasAttribute("caseSensitive") && (o.collatorOptions = a(e.getAttribute("caseSensitive")) ?
|
|
1228
|
+
e.hasAttribute("caseSensitive") && (o.collatorOptions = a(e.getAttribute("caseSensitive")) ? F.CaseSensitiveOptions : F.CaseInsensitiveOptions);
|
|
1224
1229
|
const i = e.getAttribute("sortMethod");
|
|
1225
1230
|
null != i && "none" !== i && ("stroke" === i ? o.collatorOptions = {
|
|
1226
1231
|
...o.collatorOptions,
|
|
@@ -1230,8 +1235,8 @@ var C = class {
|
|
|
1230
1235
|
collation: "pinyin"
|
|
1231
1236
|
}));
|
|
1232
1237
|
const n = {};
|
|
1233
|
-
e.hasAttribute("columnSort") && a(e.getAttribute("columnSort")) && (n.axis =
|
|
1234
|
-
const l =
|
|
1238
|
+
e.hasAttribute("columnSort") && a(e.getAttribute("columnSort")) && (n.axis = y.Axis.Column);
|
|
1239
|
+
const l = p.fastStringToRange(r), c = [];
|
|
1235
1240
|
return this.processSortConditions(t, e, c, l, o), c.length > 0 && (n.sorts = c), Object.keys(c).length > 0 && (s.sort = n), n;
|
|
1236
1241
|
}
|
|
1237
1242
|
processSortCondition(t, e, s, r) {
|
|
@@ -1239,7 +1244,7 @@ var C = class {
|
|
|
1239
1244
|
const o = {};
|
|
1240
1245
|
if (!e.hasAttribute("ref")) return void console.warn("no ref for sort conditional", t.getPath());
|
|
1241
1246
|
if (e.hasAttribute("ref")) {
|
|
1242
|
-
const t = e.getAttribute("ref"), r =
|
|
1247
|
+
const t = e.getAttribute("ref"), r = p.fastStringToRange(t);
|
|
1243
1248
|
o.index = s ? r.colStart - s.colStart : r.colStart;
|
|
1244
1249
|
}
|
|
1245
1250
|
const i = { ...r };
|
|
@@ -1256,7 +1261,7 @@ var C = class {
|
|
|
1256
1261
|
}
|
|
1257
1262
|
}
|
|
1258
1263
|
}
|
|
1259
|
-
},
|
|
1264
|
+
}, St = class extends $ {
|
|
1260
1265
|
visit(t, e, s) {
|
|
1261
1266
|
this.processNumFmts(t, t.evaluate("numFmts", e), null), t.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
|
|
1262
1267
|
const r = {
|
|
@@ -1264,14 +1269,14 @@ var C = class {
|
|
|
1264
1269
|
fonts: {},
|
|
1265
1270
|
borders: {}
|
|
1266
1271
|
};
|
|
1267
|
-
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:
|
|
1268
|
-
type:
|
|
1269
|
-
patternType:
|
|
1272
|
+
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: A.Type.None }, r.fills[1] = {
|
|
1273
|
+
type: A.Type.Pattern,
|
|
1274
|
+
patternType: A.BuiltInSheetPattern.Gray125
|
|
1270
1275
|
}, r.borders[0] = {
|
|
1271
|
-
bottom: { style:
|
|
1272
|
-
left: { style:
|
|
1273
|
-
right: { style:
|
|
1274
|
-
top: { style:
|
|
1276
|
+
bottom: { style: g.StrokeStyle.None },
|
|
1277
|
+
left: { style: g.StrokeStyle.None },
|
|
1278
|
+
right: { style: g.StrokeStyle.None },
|
|
1279
|
+
top: { style: g.StrokeStyle.None }
|
|
1275
1280
|
};
|
|
1276
1281
|
const o = [];
|
|
1277
1282
|
this.processXFs(t, t.evaluate("cellStyleXfs", e), o, r, null, !1);
|
|
@@ -1341,7 +1346,7 @@ var C = class {
|
|
|
1341
1346
|
const n = e.getAttribute("xfId");
|
|
1342
1347
|
if (n && o) {
|
|
1343
1348
|
const t = o.get(parseInt(n));
|
|
1344
|
-
t && t !==
|
|
1349
|
+
t && t !== v.BuiltInName.Normal && (s.named = t);
|
|
1345
1350
|
}
|
|
1346
1351
|
const l = (t) => !(!i && e.hasAttribute(t)) || a(e.getAttribute(t)), c = (t) => !i || e.hasAttribute(t) && a(e.getAttribute(t)), u = "0", h = i ? u : void 0;
|
|
1347
1352
|
if (l("applyFont")) {
|
|
@@ -1390,13 +1395,13 @@ var C = class {
|
|
|
1390
1395
|
}
|
|
1391
1396
|
processAlignment(t, e, s) {
|
|
1392
1397
|
const r = {};
|
|
1393
|
-
if (e?.hasAttribute("horizontal") ? r.horizontal = e.getAttribute("horizontal") : r.horizontal =
|
|
1398
|
+
if (e?.hasAttribute("horizontal") ? r.horizontal = e.getAttribute("horizontal") : r.horizontal = N.HorizontalAlignment.General, e?.hasAttribute("vertical") ? r.vertical = e.getAttribute("vertical") : r.vertical = N.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, a(e?.getAttribute("wrapText") ?? "") ? r.overflow = N.Overflow.Wrap : r.overflow = N.Overflow.Visible, a(e?.getAttribute("shrinkToFit") ?? "") && (r.overflow = N.Overflow.Shrink), e?.hasAttribute("textRotation")) {
|
|
1394
1399
|
let t = parseFloat(e.getAttribute("textRotation"));
|
|
1395
1400
|
t > 0 && t <= 90 ? t = 360 - t : t > 90 && t <= 180 ? t -= 90 : 255 === t && (t = 0, r.stacked = !0), r.rotation = t;
|
|
1396
1401
|
} else r.rotation = 0;
|
|
1397
1402
|
e?.hasAttribute("justifyLastLine") && (r.justifyLastLine = a(e.getAttribute("justifyLastLine")));
|
|
1398
1403
|
const o = e?.getAttribute("readingOrder");
|
|
1399
|
-
return o && ("0" === o ? r.readingDirection =
|
|
1404
|
+
return o && ("0" === o ? r.readingDirection = N.ReadingDirection.Auto : "1" === o ? r.readingDirection = N.ReadingDirection.LeftToRight : "2" === o ? r.readingDirection = N.ReadingDirection.RightToLeft : console.warn(`invalid readingOrder: ${o}`)), Object.keys(r).length > 0 && (s.alignment = r), s;
|
|
1400
1405
|
}
|
|
1401
1406
|
processProtection(t, e, s) {
|
|
1402
1407
|
if (!e) return;
|
|
@@ -1484,7 +1489,7 @@ var C = class {
|
|
|
1484
1489
|
const t = parseInt(e.getAttribute("xfId") ?? ""), i = e.getAttribute("name"), n = e.getAttribute("builtinId");
|
|
1485
1490
|
let l = i;
|
|
1486
1491
|
if (null !== n) {
|
|
1487
|
-
const t =
|
|
1492
|
+
const t = v.builtInNameFromId(parseInt(n));
|
|
1488
1493
|
void 0 !== t && (l = t);
|
|
1489
1494
|
}
|
|
1490
1495
|
if (o.set(t, l), !r[t]) continue;
|
|
@@ -1497,7 +1502,7 @@ var C = class {
|
|
|
1497
1502
|
}
|
|
1498
1503
|
}
|
|
1499
1504
|
afterVisit(t, e, s) {}
|
|
1500
|
-
},
|
|
1505
|
+
}, Ot = class extends $ {
|
|
1501
1506
|
visit(t, e, s) {
|
|
1502
1507
|
return this.processSheetRefs(t, t.evaluate("sheets", e), s), this.processExternalReferences(t, t.evaluate("externalReferences", 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;
|
|
1503
1508
|
}
|
|
@@ -1512,7 +1517,9 @@ var C = class {
|
|
|
1512
1517
|
return this.processPassword(t, e, r, "workbook", "password"), this.processPassword(t, e, r, "revisions", "revisionsPassword"), t.copyFromAttribute(e, "lockStructure", r, "structure", t.BOOLEAN_COPY), t.copyFromAttribute(e, "lockWindows", r, "windows", t.BOOLEAN_COPY), t.copyFromAttribute(e, "lockRevision", r, "revision", t.BOOLEAN_COPY), s.protection = r, s;
|
|
1513
1518
|
}
|
|
1514
1519
|
processCalcPr(t, e, s) {
|
|
1515
|
-
|
|
1520
|
+
if (!e) return;
|
|
1521
|
+
const r = {};
|
|
1522
|
+
t.copyFromAttribute(e, "calcMode", r, "calcMode", (t) => H[t] ?? null), t.copyFromAttribute(e, "fullCalcOnLoad", r, "fullCalcOnLoad", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calcOnSave", r, "calcOnSave", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calcCompleted", r, "calcCompleted", t.BOOLEAN_COPY), t.copyFromAttribute(e, "fullPrecision", r, "fullPrecision", t.BOOLEAN_COPY), t.copyFromAttribute(e, "forceFullCalc", r, "forceFullCalc", t.BOOLEAN_COPY), t.copyFromAttribute(e, "concurrentCalc", r, "concurrentCalc", t.BOOLEAN_COPY), t.copyFromAttribute(e, "refMode", r, "refMode"), t.copyFromAttribute(e, "iterate", r, "iterate", t.BOOLEAN_COPY), t.copyFromAttribute(e, "iterateCount", r, "maxIterations", t.INT_COPY), t.copyFromAttribute(e, "iterateDelta", r, "maxIterateChange", t.FLOAT_COPY), s.calc = r;
|
|
1516
1523
|
}
|
|
1517
1524
|
processSheetRefs(t, e, s) {
|
|
1518
1525
|
if (!e) return;
|
|
@@ -1579,7 +1586,7 @@ var C = class {
|
|
|
1579
1586
|
e && t.copyFromAttribute(e, "date1904", s, "date1904", t.BOOLEAN_COPY);
|
|
1580
1587
|
}
|
|
1581
1588
|
afterVisit(t, e, s) {}
|
|
1582
|
-
},
|
|
1589
|
+
}, Tt = class {
|
|
1583
1590
|
visit(t, e, s) {
|
|
1584
1591
|
const r = {};
|
|
1585
1592
|
return t.copyFromAttribute(e, "ref", s, "r"), t.getVisitorParamsState().set("ref", s.r), s.v = r, t.copyFromAttribute(e, "name", r), t.copyFromAttribute(e, "displayName", r), t.copyFromAttribute(e, "headerRowCount", r, "headerRowCount", t.INT_COPY), t.copyFromAttribute(e, "totalsRowCount", r, "totalsRowCount", t.INT_COPY), this.processTableColumns(t, e, r), this.processTableStyleInfo(t, e, r), t.copyFromAttribute(e, "id", r), t.copyFromAttribute(e, "comment", r, "description"), t.copyFromAttribute(e, "connectionId", r, "connectionId", t.INT_COPY), t.copyFromAttribute(e, "tableType", r), t.copyFromAttribute(e, "published", r, "published", t.BOOLEAN_COPY), t.copyFromAttribute(e, "insertRow", r, "insertRow", t.BOOLEAN_COPY), t.copyFromAttribute(e, "insertRowShift", r, "insertRowShift", t.BOOLEAN_COPY), t.copyFromAttribute(e, "totalsRowShown", r, "totalsRowShown", t.BOOLEAN_COPY), r;
|
|
@@ -1629,7 +1636,7 @@ var C = class {
|
|
|
1629
1636
|
}
|
|
1630
1637
|
o.length > 0 && (s.columns = o);
|
|
1631
1638
|
}
|
|
1632
|
-
},
|
|
1639
|
+
}, xt = class {
|
|
1633
1640
|
visit(t, e, s) {
|
|
1634
1641
|
const r = t.getVisitorParamsState().get("ref");
|
|
1635
1642
|
if (r) {
|
|
@@ -1638,7 +1645,7 @@ var C = class {
|
|
|
1638
1645
|
}
|
|
1639
1646
|
return t.copyFromAttribute(e, "altText", s), t.copyFromAttribute(e, "altTextSummary", s), s;
|
|
1640
1647
|
}
|
|
1641
|
-
},
|
|
1648
|
+
}, kt = class {
|
|
1642
1649
|
visit(t, e, s) {
|
|
1643
1650
|
const r = e.childNodes, o = r.length;
|
|
1644
1651
|
let i = null;
|
|
@@ -1692,7 +1699,7 @@ var C = class {
|
|
|
1692
1699
|
o.length > 0 && (s.sheetDataSet = o);
|
|
1693
1700
|
}
|
|
1694
1701
|
processSheetData(t, e) {
|
|
1695
|
-
const s = new
|
|
1702
|
+
const s = new C.Builder(), r = e.childNodes, o = r.length;
|
|
1696
1703
|
for (let t = 0; t < o; t++) {
|
|
1697
1704
|
const e = r.item(t);
|
|
1698
1705
|
if (1 !== e.nodeType || "row" !== e.localName) continue;
|
|
@@ -1702,7 +1709,7 @@ var C = class {
|
|
|
1702
1709
|
if (1 !== e.nodeType || "cell" !== e.localName) continue;
|
|
1703
1710
|
const r = e.getAttribute("r");
|
|
1704
1711
|
if (!r) continue;
|
|
1705
|
-
const i =
|
|
1712
|
+
const i = p.fastStringToCell(r);
|
|
1706
1713
|
if (void 0 === i?.rowIndex || void 0 === i?.colIndex) continue;
|
|
1707
1714
|
const n = this._readCellValue(e);
|
|
1708
1715
|
void 0 !== n && s.pushAt(i.rowIndex, i.colIndex, n);
|
|
@@ -1722,7 +1729,7 @@ var C = class {
|
|
|
1722
1729
|
case "str":
|
|
1723
1730
|
default: return e;
|
|
1724
1731
|
case "e": {
|
|
1725
|
-
const t =
|
|
1732
|
+
const t = d.getBuiltInByLabel(e);
|
|
1726
1733
|
return t ? {
|
|
1727
1734
|
t: "e",
|
|
1728
1735
|
v: t.getCode()
|
|
@@ -1738,13 +1745,13 @@ var C = class {
|
|
|
1738
1745
|
}
|
|
1739
1746
|
return null;
|
|
1740
1747
|
}
|
|
1741
|
-
},
|
|
1748
|
+
}, Vt = class {
|
|
1742
1749
|
visit(t, e, s) {
|
|
1743
1750
|
t.copyFromAttribute(e, "name", s), t.copyFromAttribute(e, "sourceName", s);
|
|
1744
1751
|
const r = t.evaluate("*/tableSlicerCache", e);
|
|
1745
1752
|
return r ? (t.copyFromAttribute(r, "tableId", s), t.copyFromAttribute(r, "column", s, "columnId"), t.copyFromAttribute(r, "crossFilter", s), s) : (console.warn("SlicerCacheDefinitionVisitor: missing tableSlicerCache element"), s);
|
|
1746
1753
|
}
|
|
1747
|
-
},
|
|
1754
|
+
}, It = class {
|
|
1748
1755
|
visit(t, e, s) {
|
|
1749
1756
|
let r = s.slicers;
|
|
1750
1757
|
r || (r = {}, s.slicers = r);
|
|
@@ -1766,11 +1773,11 @@ var C = class {
|
|
|
1766
1773
|
}
|
|
1767
1774
|
t.copyFromAttribute(e, "caption", r), t.copyFromAttribute(e, "startItem", r, "startItem", t.INT_COPY), t.copyFromAttribute(e, "columnCount", r, "columnCount", t.INT_COPY), t.copyFromAttribute(e, "showCaption", r, "showCaption", t.BOOLEAN_COPY), t.copyFromAttribute(e, "level", r, "level", t.INT_COPY), t.copyFromAttribute(e, "style", r), t.copyFromAttribute(e, "locked", r, "locked", t.BOOLEAN_COPY), t.copyFromAttribute(e, "rowHeight", r, "rowHeight", t.INT_COPY);
|
|
1768
1775
|
}
|
|
1769
|
-
},
|
|
1776
|
+
}, Lt = class {
|
|
1770
1777
|
visit(t, e, s) {
|
|
1771
1778
|
return s;
|
|
1772
1779
|
}
|
|
1773
|
-
},
|
|
1780
|
+
}, Bt = class {
|
|
1774
1781
|
visit(t, e, s) {
|
|
1775
1782
|
if (!e) return;
|
|
1776
1783
|
const r = {};
|
|
@@ -1794,7 +1801,7 @@ var C = class {
|
|
|
1794
1801
|
};
|
|
1795
1802
|
return e.evaluate("col", s) && (i.c = parseInt(e.evaluate("col", s).textContent)), e.evaluate("row", s) && (i.r = parseInt(e.evaluate("row", s).textContent)), e.evaluate("colOff", s) && (i.x = t(e.evaluate("colOff", s).textContent)), e.evaluate("rowOff", s) && (i.y = t(e.evaluate("rowOff", s).textContent)), "from" === o ? r.tl = i : r.br = i, r;
|
|
1796
1803
|
}
|
|
1797
|
-
},
|
|
1804
|
+
}, _t = class extends q {
|
|
1798
1805
|
visit(t, e, s) {
|
|
1799
1806
|
if (!e) return;
|
|
1800
1807
|
s = super.visit(t, e, s);
|
|
@@ -1840,7 +1847,7 @@ var C = class {
|
|
|
1840
1847
|
}
|
|
1841
1848
|
return o && (s.content = o), o;
|
|
1842
1849
|
}
|
|
1843
|
-
},
|
|
1850
|
+
}, Et = J, Rt = class extends q {
|
|
1844
1851
|
visit(t, e, s) {
|
|
1845
1852
|
if (!e) return;
|
|
1846
1853
|
const r = super.visit(t, e, s), o = t.evaluate("nvPicPr/cNvPicPr", e);
|
|
@@ -1865,7 +1872,7 @@ var C = class {
|
|
|
1865
1872
|
json: { resId: n }
|
|
1866
1873
|
}, r;
|
|
1867
1874
|
}
|
|
1868
|
-
},
|
|
1875
|
+
}, jt = class extends J {
|
|
1869
1876
|
visit(t, e, s) {
|
|
1870
1877
|
if (!e) return;
|
|
1871
1878
|
s = super.visit(t, e, s);
|
|
@@ -1885,7 +1892,7 @@ var C = class {
|
|
|
1885
1892
|
json: o
|
|
1886
1893
|
}, o;
|
|
1887
1894
|
}
|
|
1888
|
-
},
|
|
1895
|
+
}, Yt = class extends J {
|
|
1889
1896
|
visit(t, e, s) {
|
|
1890
1897
|
if (!e) return;
|
|
1891
1898
|
s = super.visit(t, e, s);
|
|
@@ -1911,7 +1918,7 @@ var C = class {
|
|
|
1911
1918
|
json: l
|
|
1912
1919
|
}, l;
|
|
1913
1920
|
}
|
|
1914
|
-
},
|
|
1921
|
+
}, Dt = class {
|
|
1915
1922
|
visit(t, e, s) {
|
|
1916
1923
|
const r = [], o = /* @__PURE__ */ new Map(), i = {
|
|
1917
1924
|
cells: [],
|
|
@@ -2018,10 +2025,10 @@ var C = class {
|
|
|
2018
2025
|
}
|
|
2019
2026
|
return s;
|
|
2020
2027
|
}
|
|
2021
|
-
},
|
|
2028
|
+
}, Mt = class {
|
|
2022
2029
|
visit(t, e, s) {
|
|
2023
|
-
let r = t.getVisitorParamsState().get(
|
|
2024
|
-
r || (r = [], t.getVisitorParamsState().set(
|
|
2030
|
+
let r = t.getVisitorParamsState().get(Q);
|
|
2031
|
+
r || (r = [], t.getVisitorParamsState().set(Q, r));
|
|
2025
2032
|
const o = e.childNodes, i = o.length;
|
|
2026
2033
|
for (let e = 0; e < i; e++) {
|
|
2027
2034
|
const s = o.item(e);
|
|
@@ -2045,12 +2052,12 @@ var C = class {
|
|
|
2045
2052
|
}
|
|
2046
2053
|
}
|
|
2047
2054
|
}
|
|
2048
|
-
},
|
|
2055
|
+
}, zt = class {
|
|
2049
2056
|
visit(t, e, s) {
|
|
2050
2057
|
let r = t.getVisitorParamsState().get("richTypes");
|
|
2051
2058
|
if (!r) return void t.warn("RichValueFound but not type.");
|
|
2052
|
-
let o = t.getVisitorParamsState().get(
|
|
2053
|
-
o || (o = [], t.getVisitorParamsState().set(
|
|
2059
|
+
let o = t.getVisitorParamsState().get(Z);
|
|
2060
|
+
o || (o = [], t.getVisitorParamsState().set(Z, o));
|
|
2054
2061
|
const i = e.childNodes, n = i.length;
|
|
2055
2062
|
for (let e = 0; e < n; e++) {
|
|
2056
2063
|
const s = i.item(e);
|
|
@@ -2067,7 +2074,7 @@ var C = class {
|
|
|
2067
2074
|
if ("_error" === e.type) {
|
|
2068
2075
|
const t = e.errorType;
|
|
2069
2076
|
if (t) try {
|
|
2070
|
-
e =
|
|
2077
|
+
e = d.getBuiltInByCode(t + 1) ?? d.BuiltIn.Unknown;
|
|
2071
2078
|
} catch (t) {}
|
|
2072
2079
|
}
|
|
2073
2080
|
return e;
|
|
@@ -2087,7 +2094,7 @@ var C = class {
|
|
|
2087
2094
|
}
|
|
2088
2095
|
}
|
|
2089
2096
|
}
|
|
2090
|
-
},
|
|
2097
|
+
}, Ut = class {
|
|
2091
2098
|
visit(t, e, s) {
|
|
2092
2099
|
if (!e) return;
|
|
2093
2100
|
const r = [];
|
|
@@ -2106,7 +2113,7 @@ var C = class {
|
|
|
2106
2113
|
}
|
|
2107
2114
|
}
|
|
2108
2115
|
}
|
|
2109
|
-
},
|
|
2116
|
+
}, Wt = class {
|
|
2110
2117
|
visit(t, e, s) {
|
|
2111
2118
|
if (!e) return;
|
|
2112
2119
|
const r = {}, o = e.getAttribute("ref");
|
|
@@ -2117,13 +2124,13 @@ var C = class {
|
|
|
2117
2124
|
};
|
|
2118
2125
|
return s.push(i), r;
|
|
2119
2126
|
}
|
|
2120
|
-
},
|
|
2127
|
+
}, Xt = class {
|
|
2121
2128
|
visit(t, e, s) {
|
|
2122
2129
|
if (!e) return;
|
|
2123
2130
|
const r = [];
|
|
2124
2131
|
return s.comments = r, r;
|
|
2125
2132
|
}
|
|
2126
|
-
},
|
|
2133
|
+
}, Gt = class {
|
|
2127
2134
|
visit(t, e, r) {
|
|
2128
2135
|
if (!e) return;
|
|
2129
2136
|
const o = {};
|
|
@@ -2136,7 +2143,7 @@ var C = class {
|
|
|
2136
2143
|
};
|
|
2137
2144
|
return r.push(n), o;
|
|
2138
2145
|
}
|
|
2139
|
-
},
|
|
2146
|
+
}, $t = class {
|
|
2140
2147
|
visit(t, e, r) {
|
|
2141
2148
|
const o = [], i = e.childNodes, n = i.length;
|
|
2142
2149
|
for (let e = 0; e < n; e++) {
|
|
@@ -2148,31 +2155,42 @@ var C = class {
|
|
|
2148
2155
|
}
|
|
2149
2156
|
return o.length > 0 && (r.persons = o), o;
|
|
2150
2157
|
}
|
|
2151
|
-
},
|
|
2158
|
+
}, Kt = class {
|
|
2152
2159
|
constructor(t, e) {
|
|
2153
2160
|
this.path = t, this.visitor = e;
|
|
2154
2161
|
}
|
|
2155
|
-
},
|
|
2162
|
+
}, Ht = class {
|
|
2156
2163
|
constructor() {
|
|
2157
|
-
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new
|
|
2164
|
+
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new tt()), this.registerVisitor("cp:coreProperties", new et()), this.registerVisitor("Properties", new st()), this.registerVisitor("spPr", new it()), this.registerVisitor("txBody", new dt()), this.registerVisitor("txPr", new dt()), this.registerVisitor("c:chartSpace", new rt()), this.registerVisitor("c:plotArea", new ot()), this.registerVisitor("c:barChart", new nt()), this.registerVisitor("c:doughnutChart", new lt()), this.registerVisitor("c:lineChart", new lt()), this.registerVisitor("c:ofPieType", new lt()), this.registerVisitor("c:pieChart", new lt()), this.registerVisitor("c:scatterChart", new lt()), this.registerVisitor("c:barChart", new at("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new at("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new at("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new at("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new at("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new at("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new ct()), this.registerVisitor("c:dPt", new ut()), this.registerVisitor("c:marker", new ht()), this.registerVisitor("c:catAx", new pt()), this.registerVisitor("c:valAx", new pt()), this.registerVisitor("c:dateAx", new pt()), this.registerVisitor("c:majorGridlines", new Y("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new Y("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new dt("labels.text"), "txPr"), this.registerVisitor("c:valAx", new dt("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new dt("labels.text"), "txPr"), this.registerVisitor("c:legend", new mt()), this.registerVisitor("c:legend", new dt("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new gt()), this.registerVisitor("c:ser", new bt(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new at("labels"), "dLbls"), this.registerVisitor("c:dLbl", new at("points")), this.registerVisitor("c:title", new At()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new ft()), this.registerVisitor("c:dispUnits", new Y("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new At("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new dt(), "tx/rich"), this.registerVisitor("a:theme", new yt()), this.registerVisitor("a:theme", new vt(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new Nt(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new Ft(), "themeElements/fmtScheme"), this.registerVisitor("autoFilter", new wt()), this.registerVisitor("sortState", new Pt()), this.registerVisitor("s:workbook", new Ot()), this.registerVisitor("styleSheet", new St()), this.registerVisitor("x14:table", new xt()), this.registerVisitor("table", new Tt()), this.registerVisitor("externalLink", new kt()), this.registerVisitor("hlinkClick", new Ct()), this.registerVisitor("wsDr", new Lt()), this.registerVisitor("twoCellAnchor", new Bt()), this.registerVisitor("oneCellAnchor", new Bt()), this.registerVisitor("absoluteAnchor", new Bt()), this.registerVisitor("graphicFrame", new _t()), this.registerVisitor("sp", new Et()), this.registerVisitor("grpSp", new jt()), this.registerVisitor("cxnSp", new Yt()), this.registerVisitor("pic", new Rt()), this.registerVisitor("metadata", new Dt()), this.registerVisitor("rvStructures", new Mt()), this.registerVisitor("rvData", new zt()), this.registerVisitor("comments", new Ut()), this.registerVisitor("comment", new Wt()), this.registerVisitor("comment", new dt("content"), "text"), this.registerVisitor("ThreadedComments", new Xt()), this.registerVisitor("threadedComment", new Gt()), this.registerVisitor("threadedComment", new dt("content"), "text"), this.registerVisitor("personList", new $t()), this.registerVisitor("slicerCacheDefinition", new Vt()), this.registerVisitor("slicers", new It());
|
|
2158
2165
|
}
|
|
2159
2166
|
registerVisitor(t, e, s = null) {
|
|
2160
2167
|
-1 === t.indexOf(":") && (t = "*:" + t);
|
|
2161
2168
|
const r = t.split(":"), o = r.length > 1 ? r[1] : r[0];
|
|
2162
2169
|
if (!s) return this.visitorsByXmlTagName.set(o, e), void this.visitorsByXmlTagName.set(t, e);
|
|
2163
2170
|
let i = this.scopedVisitorsByXmlTagName.get(o);
|
|
2164
|
-
i || (i = [], this.scopedVisitorsByXmlTagName.set(o, i), this.scopedVisitorsByXmlTagName.set(t, i)), i.push(new
|
|
2171
|
+
i || (i = [], this.scopedVisitorsByXmlTagName.set(o, i), this.scopedVisitorsByXmlTagName.set(t, i)), i.push(new Kt(s, e));
|
|
2172
|
+
}
|
|
2173
|
+
parseDxf(t, e = "") {
|
|
2174
|
+
this.visitorParamsState || (this.visitorParamsState = /* @__PURE__ */ new Map());
|
|
2175
|
+
const s = this.visitorParamsState, r = s.get("processingDXFs");
|
|
2176
|
+
s.set("processingDXFs", !0);
|
|
2177
|
+
try {
|
|
2178
|
+
const s = new x(null, this, "/dxf", t, {}, e), r = {};
|
|
2179
|
+
return new St().processDXF(s, t, r), r;
|
|
2180
|
+
} finally {
|
|
2181
|
+
void 0 === r ? s.delete("processingDXFs") : s.set("processingDXFs", r);
|
|
2182
|
+
}
|
|
2165
2183
|
}
|
|
2166
2184
|
getVisitorParamsState() {
|
|
2167
2185
|
return this.visitorParamsState;
|
|
2168
2186
|
}
|
|
2169
|
-
transform(t, e, s =
|
|
2187
|
+
transform(t, e, s = h.EmptyObject) {
|
|
2170
2188
|
const r = t.documentElement;
|
|
2171
2189
|
this.visitorParamsState && !s?.paramMap || (this.visitorParamsState = s?.paramMap ?? /* @__PURE__ */ new Map());
|
|
2172
2190
|
const o = {};
|
|
2173
2191
|
let i = this.visitorsByXmlTagName.get(r.nodeName);
|
|
2174
2192
|
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.`);
|
|
2175
|
-
const n = "/" + r.localName, l = new
|
|
2193
|
+
const n = "/" + r.localName, l = new x(null, this, n, r, o, e, s), a = [];
|
|
2176
2194
|
this._doWalk(i, l, a, r, o, e, s);
|
|
2177
2195
|
const c = a.length;
|
|
2178
2196
|
for (let t = 0; t < c; t++) {
|
|
@@ -2201,7 +2219,7 @@ var C = class {
|
|
|
2201
2219
|
for (; c && c !== r;) l = c.localName + "/" + l, c = c.parentNode;
|
|
2202
2220
|
const u = e.getPath() + "/" + l;
|
|
2203
2221
|
if (a.visitor) {
|
|
2204
|
-
const r = new
|
|
2222
|
+
const r = new x(e, this, u, e.getElemRoot(), e.getJsonRoot(), i, n);
|
|
2205
2223
|
this._doWalk(a.visitor, r, s, t, o, i, n);
|
|
2206
2224
|
}
|
|
2207
2225
|
};
|
|
@@ -2228,10 +2246,10 @@ var C = class {
|
|
|
2228
2246
|
const a = r;
|
|
2229
2247
|
let d = a.nodeName, g = c.get(d);
|
|
2230
2248
|
g || (d = a.localName, g = c.get(d));
|
|
2231
|
-
const m = e.getPath() + "/" + d, b = new
|
|
2249
|
+
const m = e.getPath() + "/" + d, b = new x(e, this, m, u, h, i, n);
|
|
2232
2250
|
this._doWalk(g, b, s, a, l ?? o, i, n);
|
|
2233
2251
|
}
|
|
2234
2252
|
return l;
|
|
2235
2253
|
}
|
|
2236
2254
|
};
|
|
2237
|
-
export {
|
|
2255
|
+
export { Ht as DOMTransformer, x as ExecutionContext, c as NumberUtils, k as VisitorUtils };
|