@sheetxl/io-xlsx 0.8.0-beta.10 → 0.8.0-beta.11
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/{NQIuOQIleHC4NUW6.mjs → BiDqExNXiY7ykk8E.mjs} +527 -646
- package/browser/esm/{2EOdn2WRK5y1L58S.mjs → Bs0EzhdU8WgGfPzf.mjs} +2 -2
- package/browser/esm/CLWsOc6DO8l1G_LF.mjs +2213 -0
- package/browser/esm/{xc_LzCPgHn-acgFZ.mjs → CZ9I80og75SDRjv0.mjs} +2 -2
- package/browser/esm/{DXopGe8PrLWmwGaV.mjs → CuAXx5i4uqTz-mMY.mjs} +1 -1
- package/browser/esm/{BLXcoiDAaOMjFuhw.mjs → Cv3R6fGatARKedSn.mjs} +2531 -1952
- package/browser/esm/{B-jb5SuiVh5NnBG_.mjs → CzFYJPxmLyKgEKF0.mjs} +2 -2
- package/browser/esm/{BKT8OBj-bhQwdg49.mjs → DICL6ecj9BdJv8aX.mjs} +47 -10
- package/browser/esm/DatIA9fZbEPjW4bh.mjs +5638 -0
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{CI_CZI5m5-KkiAK5.mjs → yveeVJ6hKDI5KDEz.mjs} +1599 -990
- package/node/esm/B9Zn6H1RV07Ob377.mjs +2294 -0
- package/node/esm/Bpqm_PpGLpdjL47-.mjs +2368 -0
- package/node/esm/{BmdmvgO5Zdgx-RWo.mjs → CAJxmJdobUbzpUz5.mjs} +2 -2
- package/node/esm/{CHqRP_NjPpPd7m9L.mjs → CxlSbH7mmnEEsqmX.mjs} +1 -1
- package/node/esm/DD-yXSBzvDYy0TX5.mjs +5842 -0
- package/node/esm/{nNQ7MG89sGKwkjMA.mjs → DScqM1V4wPntNP6-.mjs} +1672 -1086
- package/node/esm/{O5mti2R9drFOlXc7.mjs → fopiRR7OiVoEiF7B.mjs} +2 -2
- package/node/esm/index.mjs +64 -27
- package/node/esm/{CtAF486aZqYzMeLM.mjs → ipiyzn5Pfohw2afB.mjs} +1777 -1157
- package/package.json +3 -3
- package/types/src/AutoFilterRules.d.ts +8 -1
- package/types/src/DefinedNameAttributes.d.ts +8 -0
- package/types/src/ExcelCompat.d.ts +15 -3
- package/types/src/KnownFonts.d.ts +50 -0
- package/types/src/LegacyFormula.d.ts +13 -0
- package/types/src/PageLayoutAttributes.d.ts +8 -0
- package/types/src/Plugin.d.ts +12 -0
- package/types/src/ProtectionAttributes.d.ts +2 -2
- package/types/src/SheetKinds.d.ts +57 -0
- package/types/src/SheetViewAttributes.d.ts +4 -0
- package/types/src/SortExtent.d.ts +16 -0
- package/types/src/Types.d.ts +11 -0
- package/types/src/XlsxHeader.d.ts +19 -0
- package/types/src/chart/ChartExXml.d.ts +38 -0
- package/types/src/chart/ChartPartXml.d.ts +47 -0
- package/types/src/chart/ChartSpaceXml.d.ts +36 -0
- package/types/src/chart/_XmlTree.d.ts +34 -0
- package/types/src/chart/_chartCodecs.d.ts +10 -0
- package/types/src/chart/_chartExCodecs.d.ts +7 -0
- package/types/src/chart/_chartExFold.d.ts +14 -0
- package/types/src/chart/_chartExMarkup.d.ts +236 -0
- package/types/src/chart/_chartExStyle.d.ts +22 -0
- package/types/src/chart/_codec.d.ts +78 -0
- package/types/src/chart/_drawingml.d.ts +10 -0
- package/types/src/chart/_xml.d.ts +70 -0
- package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
- package/types/src/reader/DummyFunctionUnwrap.d.ts +2 -2
- package/types/src/reader/HeaderStyles.d.ts +15 -0
- package/types/src/reader/IsoDateCell.d.ts +20 -0
- package/types/src/reader/LibreOfficeDataTable.d.ts +11 -0
- package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +3 -3
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +3 -1
- package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +23 -8
- package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
- package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
- package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +2 -0
- package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
- package/types/src/reader/domVisitors/index.d.ts +2 -30
- package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +46 -6
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +16 -11
- package/types/src/utils/DrawingMLText.d.ts +2 -2
- package/types/src/utils/FormControls.d.ts +4 -4
- package/types/src/utils/SharedNames.d.ts +13 -0
- package/types/src/utils/SpreadsheetFont.d.ts +38 -0
- package/types/src/utils/VmlNoteShapes.d.ts +16 -23
- package/types/src/utils/VmlNoteStyle.d.ts +44 -0
- package/types/src/utils/VmlPrefixes.d.ts +24 -0
- package/types/src/writer/builder/PackageBuilder.d.ts +2 -0
- package/types/src/writer/builder/Types.d.ts +7 -0
- package/types/src/writer/emitters/CommentsEmitter.d.ts +3 -3
- package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
- package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
- package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
- package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
- package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
- package/types/src/writer/emitters/SlicerEmitter.d.ts +3 -3
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +5 -0
- package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
- package/types/src/writer/utils/AutoFilter.d.ts +1 -1
- package/types/src/writer/utils/DefaultRows.d.ts +38 -0
- package/types/src/writer/utils/DxfCollector.d.ts +11 -8
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +1 -1
- package/types/src/writer/utils/SheetStyleLayout.d.ts +73 -0
- package/types/src/writer/utils/TextUtils.d.ts +6 -1
- package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
- package/browser/esm/BPmehfSqdvgsLBsB.mjs +0 -5153
- package/node/esm/BpxxiZ2oKPkUSfdB.mjs +0 -2486
- package/node/esm/QS_theNoeqNGLStj.mjs +0 -5298
- package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
- package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
- package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
- package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
- package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
- package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
- package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
- package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
- package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
- package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.11
|
|
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 { $t as e,
|
|
8
|
-
import { BufferUtils as
|
|
9
|
-
import { AddressUtils as
|
|
10
|
-
var
|
|
7
|
+
import { $t as e, C as t, Cn as n, Dn as r, Dt as i, En as a, Et as o, Gn as s, Gt as c, Hn as l, It as u, Jn as d, Jt as f, Lt as p, Mn as m, Ot as h, Pn as g, Pt as _, Q as v, Qn as y, Rt as b, Tn as ee, Tt as x, Ut as te, Wn as ne, Wt as re, X as ie, Xt as ae, Yn as oe, Zn as se, Zt as ce, _n as le, _t as S, bn as C, bt as w, cn as T, d as E, dn as D, dt as O, en as ue, et as de, fn as k, ft as A, gn as j, gt as M, h as fe, hn as pe, ht as N, kn as P, ln as me, mn as F, n as he, pn as ge, pt as _e, qt as ve, rn as ye, rt as be, sn as xe, st as Se, t as Ce, tt as we, u as I, un as L, vn as Te, vt as Ee, w as De, wt as Oe, x as ke, xn as Ae, xt as je, zn as R } from "./Cv3R6fGatARKedSn.mjs";
|
|
8
|
+
import { BufferUtils as Me, CommonUtils as z, ExpectedError as Ne, OverlappingRange as Pe, RangeAxis as B } from "@sheetxl/utils";
|
|
9
|
+
import { AddressUtils as V, CommonUtils as Fe, CoordUtils as Ie, FormulaError as Le, FormulaText as Re, ICellStyle as ze, ICondition as H, IConditionalFormat as U, ICustomProperty as W, IFont as Be, IRange as Ve, OutOfBoundsError as He, PersonCollection as Ue, ResourceCollection as We, Sort as Ge, Theme as Ke, Tuple as qe, Workbook as Je } from "@sheetxl/sdk";
|
|
10
|
+
var Ye = {
|
|
11
11
|
ascending: "ascending",
|
|
12
12
|
descending: "descending",
|
|
13
13
|
natural: "dataSource"
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function Xe(e, t) {
|
|
16
16
|
if (!t) return null;
|
|
17
17
|
for (let n = 0; n < e.length; n++) if (e[n].id !== void 0 && String(e[n].id) === t) return e[n];
|
|
18
18
|
let n = Number(t);
|
|
19
19
|
return Number.isInteger(n) && n >= 1 && n <= e.length ? e[n - 1] : null;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Ze(e, t, n) {
|
|
22
22
|
let r = {
|
|
23
23
|
...t,
|
|
24
24
|
source: n
|
|
@@ -28,117 +28,50 @@ function De(e, t, n) {
|
|
|
28
28
|
t > 0 && t !== 27 && (r.rowHeight = t);
|
|
29
29
|
}
|
|
30
30
|
e.style && e.style !== "SlicerStyleLight1" && (r.style = e.style);
|
|
31
|
-
let i = e.sortOrder ?
|
|
31
|
+
let i = e.sortOrder ? Ye[e.sortOrder] : void 0;
|
|
32
32
|
return i && i !== "ascending" && (r.sortOrder = i), e.crossFilter && e.crossFilter !== "showItemsWithDataAtTop" && (r.crossFilter = e.crossFilter), e.lockedPosition && (r.lockedPosition = !0), !1 === e.customListSort && (r.disabledCustomListSort = !0), e.cacheName && (r.cacheName = e.cacheName), e.startItem && (r.startItem = e.startItem), e.level !== void 0 && (r.level = e.level), e.uid && (r.uid = e.uid), r;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
35
|
-
let r = `Unable to read '${e}': ${t?.message ?? t}`;
|
|
36
|
-
n?.onWarning ? n.onWarning(r, e) : console.warn(r);
|
|
37
|
-
}, Oe = (e, t, n, r, i = null) => {
|
|
38
|
-
if (!e) return null;
|
|
39
|
-
let a = e;
|
|
40
|
-
a.startsWith("/") && (a = a.substring(1));
|
|
41
|
-
let o = i?.parsedRefs?.get(e);
|
|
42
|
-
if (o !== void 0) return o;
|
|
43
|
-
let s = t(a);
|
|
44
|
-
if (!s) return null;
|
|
45
|
-
let c = s.content;
|
|
46
|
-
try {
|
|
47
|
-
let t = new TextDecoder().decode(c), a = n.parseFromString(t, "text/xml"), o = r.transform(a, e, i ?? pe.EmptyObject);
|
|
48
|
-
return i?.parsedRefs?.set(e, o), o;
|
|
49
|
-
} catch (t) {
|
|
50
|
-
z(e, t, i);
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}, B = (e, t, n, r, i = null) => {
|
|
54
|
-
if (!e) return null;
|
|
55
|
-
let a = Oe(e, t, n, r, i);
|
|
56
|
-
if (!a) return null;
|
|
57
|
-
let o = /* @__PURE__ */ new Map(), s = Object.keys(a), c = s.length;
|
|
58
|
-
for (let e = 0; e < c; e++) {
|
|
59
|
-
let t = s[e], n = a[t];
|
|
60
|
-
o.set(t, n);
|
|
61
|
-
}
|
|
62
|
-
return o;
|
|
63
|
-
}, V = (e, t, n, r, i, a = null) => {
|
|
64
|
-
let o = /* @__PURE__ */ new Map(), s = t[e], c = s ? s.length : 0;
|
|
65
|
-
for (let e = 0; e < c; e++) {
|
|
66
|
-
let t = s[e];
|
|
67
|
-
if (!t) continue;
|
|
68
|
-
let c = t;
|
|
69
|
-
c.startsWith("/") && (c = c.substring(1));
|
|
70
|
-
let l = Oe(c, n, r, i, a);
|
|
71
|
-
o.set(c, l);
|
|
72
|
-
}
|
|
73
|
-
return o;
|
|
74
|
-
}, ke = (e) => {
|
|
75
|
-
let t = e.split(/\/+/);
|
|
76
|
-
return t.reduce((e, t, n) => (t === "." ? e.splice(n, 1) : t === ".." && e.splice(n - 1, 2), e), t).join("/");
|
|
77
|
-
}, H = Object.freeze([
|
|
78
|
-
"lt1",
|
|
79
|
-
"dk1",
|
|
80
|
-
"lt2",
|
|
81
|
-
"dk2",
|
|
82
|
-
"accent1",
|
|
83
|
-
"accent2",
|
|
84
|
-
"accent3",
|
|
85
|
-
"accent4",
|
|
86
|
-
"accent5",
|
|
87
|
-
"accent6",
|
|
88
|
-
"hlink",
|
|
89
|
-
"folHlink"
|
|
90
|
-
]), Ae = (e, t = "auto") => {
|
|
91
|
-
let n, r = e("auto");
|
|
92
|
-
r === void 0 || r !== "1" && r !== "true" || (n = t);
|
|
93
|
-
let i = e("indexed");
|
|
94
|
-
i && (n = i === "64" ? "auto" : `index${i}`);
|
|
95
|
-
let a = e("rgb");
|
|
96
|
-
a && (n = a.toLowerCase(), a.length !== 8 || a.startsWith("FF") || (n = "FF" + a.substring(2, a.length)));
|
|
97
|
-
let o = e("theme");
|
|
98
|
-
o && (n = H[Number(o)]);
|
|
99
|
-
let s = e("tint");
|
|
100
|
-
if (s && (n += ` ${ve.AdjustmentType.ETint} ${parseFloat(s)}`), n) return n;
|
|
101
|
-
}, je = (e) => e && e.replace(/^\{([\s\S]+)\}$/, "$1"), U = /* @__PURE__ */ new Uint8Array(), W = class t {
|
|
34
|
+
var Qe = /* @__PURE__ */ new Uint8Array(), $e = class e {
|
|
102
35
|
constructor(e, t, n) {
|
|
103
36
|
this.buffers = /* @__PURE__ */ new Map(), this.zip = e, this.entries = t, this.rawBuffer = n;
|
|
104
37
|
}
|
|
105
38
|
static normalize(e) {
|
|
106
39
|
return e.startsWith("/") ? e.slice(1) : e;
|
|
107
40
|
}
|
|
108
|
-
static async create(
|
|
109
|
-
let
|
|
110
|
-
for (let e of await
|
|
111
|
-
return new
|
|
41
|
+
static async create(t) {
|
|
42
|
+
let n = t instanceof Blob ? Qe : t instanceof Uint8Array ? t : new Uint8Array(t), r = t instanceof Blob ? new s(t) : new d(n), i = new ne(r), a = /* @__PURE__ */ new Map();
|
|
43
|
+
for (let e of await i.getEntries()) e.directory || a.set(e.filename, e);
|
|
44
|
+
return new e(i, a, n);
|
|
112
45
|
}
|
|
113
46
|
getNames() {
|
|
114
47
|
return [...this.entries.keys()];
|
|
115
48
|
}
|
|
116
|
-
has(
|
|
117
|
-
return this.entries.has(
|
|
49
|
+
has(t) {
|
|
50
|
+
return this.entries.has(e.normalize(t));
|
|
118
51
|
}
|
|
119
|
-
uncompressedSize(
|
|
120
|
-
return this.entries.get(
|
|
52
|
+
uncompressedSize(t) {
|
|
53
|
+
return this.entries.get(e.normalize(t))?.uncompressedSize ?? 0;
|
|
121
54
|
}
|
|
122
|
-
async getBuffer(
|
|
123
|
-
let n =
|
|
55
|
+
async getBuffer(t) {
|
|
56
|
+
let n = e.normalize(t), r = this.buffers.get(n);
|
|
124
57
|
if (r) return r;
|
|
125
58
|
let i = this.entries.get(n);
|
|
126
59
|
if (!i) return null;
|
|
127
|
-
let a = await i.getData(new
|
|
60
|
+
let a = await i.getData(new oe());
|
|
128
61
|
return this.buffers.set(n, a), a;
|
|
129
62
|
}
|
|
130
63
|
async prefetch(e) {
|
|
131
64
|
let t = [];
|
|
132
|
-
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new
|
|
65
|
+
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new oe()).then((e) => {
|
|
133
66
|
this.buffers.set(n, e);
|
|
134
67
|
}));
|
|
135
68
|
await Promise.all(t);
|
|
136
69
|
}
|
|
137
|
-
getEntry(
|
|
138
|
-
return this.buffers.get(
|
|
70
|
+
getEntry(t) {
|
|
71
|
+
return this.buffers.get(e.normalize(t)) ?? null;
|
|
139
72
|
}
|
|
140
|
-
async getTextStream(
|
|
141
|
-
let r = this.entries.get(
|
|
73
|
+
async getTextStream(t, n) {
|
|
74
|
+
let r = this.entries.get(e.normalize(t));
|
|
142
75
|
if (!r) return null;
|
|
143
76
|
let i = new TransformStream();
|
|
144
77
|
r.getData(i.writable).catch(() => {});
|
|
@@ -155,8 +88,8 @@ var z = (e, t, n) => {
|
|
|
155
88
|
i && e.enqueue(i);
|
|
156
89
|
} }).getReader();
|
|
157
90
|
}
|
|
158
|
-
getRawEntry(
|
|
159
|
-
let n = this.entries.get(
|
|
91
|
+
getRawEntry(t) {
|
|
92
|
+
let n = this.entries.get(e.normalize(t));
|
|
160
93
|
if (!n || n.encrypted || n.crc32 === void 0) return null;
|
|
161
94
|
let r = n.offset;
|
|
162
95
|
if (r + 30 > this.rawBuffer.byteLength) return null;
|
|
@@ -172,18 +105,18 @@ var z = (e, t, n) => {
|
|
|
172
105
|
async close() {
|
|
173
106
|
await this.zip.close();
|
|
174
107
|
}
|
|
175
|
-
},
|
|
108
|
+
}, et = class {
|
|
176
109
|
constructor(e) {
|
|
177
|
-
this._sink = e, this._samples = [], this._t0 =
|
|
110
|
+
this._sink = e, this._samples = [], this._t0 = tt(), this._tPrev = this._t0, this._heapPrev = nt();
|
|
178
111
|
}
|
|
179
112
|
mark(e) {
|
|
180
|
-
let t =
|
|
113
|
+
let t = tt(), n = nt(), r = {
|
|
181
114
|
label: e,
|
|
182
115
|
tMs: t - this._t0,
|
|
183
116
|
dtMs: t - this._tPrev,
|
|
184
117
|
heapBytes: n,
|
|
185
118
|
dHeapBytes: n !== void 0 && this._heapPrev !== void 0 ? n - this._heapPrev : void 0,
|
|
186
|
-
rssBytes:
|
|
119
|
+
rssBytes: rt()
|
|
187
120
|
};
|
|
188
121
|
this._tPrev = t, this._heapPrev = n, this._samples.push(r), this._sink?.(r);
|
|
189
122
|
}
|
|
@@ -195,91 +128,91 @@ var z = (e, t, n) => {
|
|
|
195
128
|
phase: e.label,
|
|
196
129
|
tMs: Math.round(e.tMs),
|
|
197
130
|
dtMs: Math.round(e.dtMs),
|
|
198
|
-
heapMB: e.heapBytes === void 0 ? "—" :
|
|
199
|
-
dHeapMB: e.dHeapBytes === void 0 ? "—" :
|
|
200
|
-
rssMB: e.rssBytes === void 0 ? "—" :
|
|
131
|
+
heapMB: e.heapBytes === void 0 ? "—" : it(e.heapBytes / 1048576),
|
|
132
|
+
dHeapMB: e.dHeapBytes === void 0 ? "—" : it(e.dHeapBytes / 1048576),
|
|
133
|
+
rssMB: e.rssBytes === void 0 ? "—" : it(e.rssBytes / 1048576)
|
|
201
134
|
}));
|
|
202
135
|
}
|
|
203
|
-
},
|
|
204
|
-
function
|
|
136
|
+
}, tt = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
137
|
+
function nt() {
|
|
205
138
|
let e = typeof performance == "object" ? performance.memory : void 0;
|
|
206
139
|
if (e && typeof e.usedJSHeapSize == "number") return e.usedJSHeapSize;
|
|
207
140
|
let t = globalThis.process;
|
|
208
141
|
return typeof t == "object" && typeof t.memoryUsage == "function" ? t.memoryUsage().heapUsed : void 0;
|
|
209
142
|
}
|
|
210
|
-
function
|
|
143
|
+
function rt() {
|
|
211
144
|
let e = globalThis.process;
|
|
212
145
|
if (typeof e == "object" && typeof e.memoryUsage == "function") return e.memoryUsage().rss;
|
|
213
146
|
}
|
|
214
|
-
function
|
|
147
|
+
function it(e) {
|
|
215
148
|
return Math.round(10 * e) / 10;
|
|
216
149
|
}
|
|
217
|
-
var
|
|
150
|
+
var at = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", ot = `-${at}.0-9·̀-ͯ‿-⁀`, st = (RegExp(`^[${at}]$`, "u"), RegExp(`^[${ot}]$`, "u"), RegExp(`^[${at}][${ot}]*$`, "u")), ct = (RegExp(`^[${ot}]+$`, "u"), [
|
|
218
151
|
32,
|
|
219
152
|
10,
|
|
220
153
|
13,
|
|
221
154
|
9
|
|
222
155
|
]);
|
|
223
|
-
function
|
|
156
|
+
function lt(e) {
|
|
224
157
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 58 || e === 95 || e === 8204 || e === 8205 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 767 || e >= 880 && e <= 893 || e >= 895 && e <= 8191 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
225
158
|
}
|
|
226
|
-
var
|
|
227
|
-
RegExp(`^[${
|
|
228
|
-
var
|
|
229
|
-
function
|
|
159
|
+
var ut = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", dt = `-${ut}.0-9·̀-ͯ‿-⁀`;
|
|
160
|
+
RegExp(`^[${ut}]$`, "u"), RegExp(`^[${dt}]$`, "u"), RegExp(`^[${ut}][${dt}]*$`, "u"), RegExp(`^[${dt}]+$`, "u");
|
|
161
|
+
var ft = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", pt = `-${ft}.0-9·̀-ͯ‿-⁀`, mt = (RegExp(`^[${ft}]$`, "u"), RegExp(`^[${pt}]$`, "u"), RegExp(`^[${ft}][${pt}]*$`, "u"));
|
|
162
|
+
function G(e) {
|
|
230
163
|
return e >= 65 && e <= 90 || e === 95 || e >= 97 && e <= 122 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 767 || e >= 880 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
231
164
|
}
|
|
232
|
-
var
|
|
165
|
+
var K = function(e) {
|
|
233
166
|
return e === 32 || e === 10 || e === 13 || e === 9;
|
|
234
|
-
},
|
|
167
|
+
}, ht = function(e) {
|
|
235
168
|
return e >= 32 && e <= 55295 || e === 10 || e === 13 || e === 9 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
236
|
-
},
|
|
237
|
-
return
|
|
238
|
-
},
|
|
169
|
+
}, gt = lt, _t = function(e) {
|
|
170
|
+
return lt(e) || e >= 48 && e <= 57 || e === 45 || e === 46 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
171
|
+
}, vt = ct, yt = st, bt = function(e) {
|
|
239
172
|
return e >= 1 && e <= 55295 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
240
|
-
},
|
|
241
|
-
return
|
|
242
|
-
},
|
|
173
|
+
}, xt = G, St = function(e) {
|
|
174
|
+
return G(e) || e === 45 || e === 46 || e >= 48 && e <= 57 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
175
|
+
}, Ct = mt, wt = "http://www.w3.org/XML/1998/namespace", Tt = "http://www.w3.org/2000/xmlns/", Et = {
|
|
243
176
|
__proto__: null,
|
|
244
|
-
xml:
|
|
245
|
-
xmlns:
|
|
246
|
-
},
|
|
177
|
+
xml: wt,
|
|
178
|
+
xmlns: Tt
|
|
179
|
+
}, Dt = {
|
|
247
180
|
__proto__: null,
|
|
248
181
|
amp: "&",
|
|
249
182
|
gt: ">",
|
|
250
183
|
lt: "<",
|
|
251
184
|
quot: "\"",
|
|
252
185
|
apos: "'"
|
|
253
|
-
}, q = -1,
|
|
254
|
-
...
|
|
186
|
+
}, q = -1, Ot = -2, J = 13, kt = 33, At = 10, jt = 60, Mt = 61, Y = 62, X = 63, Nt = 93, Pt = (e) => e === 34 || e === 39, Ft = [34, 39], It = [
|
|
187
|
+
...Ft,
|
|
255
188
|
91,
|
|
256
189
|
Y
|
|
257
|
-
],
|
|
258
|
-
...
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
],
|
|
262
|
-
|
|
190
|
+
], Lt = [
|
|
191
|
+
...Ft,
|
|
192
|
+
jt,
|
|
193
|
+
Nt
|
|
194
|
+
], Rt = [
|
|
195
|
+
Mt,
|
|
263
196
|
X,
|
|
264
|
-
...
|
|
265
|
-
],
|
|
266
|
-
...
|
|
197
|
+
...vt
|
|
198
|
+
], zt = [
|
|
199
|
+
...vt,
|
|
267
200
|
Y,
|
|
268
201
|
38,
|
|
269
|
-
|
|
202
|
+
jt
|
|
270
203
|
];
|
|
271
|
-
function
|
|
204
|
+
function Bt(e, t, n) {
|
|
272
205
|
switch (t) {
|
|
273
206
|
case "xml":
|
|
274
|
-
n !==
|
|
207
|
+
n !== wt && e.fail(`xml prefix must be bound to ${wt}.`);
|
|
275
208
|
break;
|
|
276
|
-
case "xmlns": n !==
|
|
209
|
+
case "xmlns": n !== Tt && e.fail(`xmlns prefix must be bound to ${Tt}.`);
|
|
277
210
|
}
|
|
278
211
|
switch (n) {
|
|
279
|
-
case
|
|
280
|
-
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${
|
|
212
|
+
case Tt:
|
|
213
|
+
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${Tt}.`);
|
|
281
214
|
break;
|
|
282
|
-
case
|
|
215
|
+
case wt: switch (t) {
|
|
283
216
|
case "xml": break;
|
|
284
217
|
case "":
|
|
285
218
|
e.fail(`the default namespace may not be set to ${n}.`);
|
|
@@ -288,7 +221,7 @@ function vt(e, t, n) {
|
|
|
288
221
|
}
|
|
289
222
|
}
|
|
290
223
|
}
|
|
291
|
-
var
|
|
224
|
+
var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
292
225
|
xmldecl: "xmlDeclHandler",
|
|
293
226
|
text: "textHandler",
|
|
294
227
|
processinginstruction: "piHandler",
|
|
@@ -302,7 +235,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
302
235
|
error: "errorHandler",
|
|
303
236
|
end: "endHandler",
|
|
304
237
|
ready: "readyHandler"
|
|
305
|
-
},
|
|
238
|
+
}, Gt = class {
|
|
306
239
|
get closed() {
|
|
307
240
|
return this._closed;
|
|
308
241
|
}
|
|
@@ -310,15 +243,15 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
310
243
|
this.i = 0, this.prevI = 0, this.opt = e ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
311
244
|
let t = this.xmlnsOpt = !!this.opt.xmlns;
|
|
312
245
|
if (this.trackPosition = !1 !== this.opt.position, this.fileName = this.opt.fileName, t) {
|
|
313
|
-
this.nameStartCheck =
|
|
246
|
+
this.nameStartCheck = xt, this.nameCheck = St, this.isName = Ht, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = {
|
|
314
247
|
__proto__: null,
|
|
315
|
-
...
|
|
248
|
+
...Et
|
|
316
249
|
};
|
|
317
250
|
let e = this.opt.additionalNamespaces;
|
|
318
251
|
e != null && (function(e, t) {
|
|
319
|
-
for (let n of Object.keys(t))
|
|
252
|
+
for (let n of Object.keys(t)) Bt(e, n, t[n]);
|
|
320
253
|
}(this, e), Object.assign(this.ns, e));
|
|
321
|
-
} else this.nameStartCheck =
|
|
254
|
+
} else this.nameStartCheck = gt, this.nameCheck = _t, this.isName = Ut, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
322
255
|
this.stateTable = [
|
|
323
256
|
this.sBegin,
|
|
324
257
|
this.sBeginWhitespace,
|
|
@@ -380,7 +313,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
380
313
|
version: void 0,
|
|
381
314
|
encoding: void 0,
|
|
382
315
|
standalone: void 0
|
|
383
|
-
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(
|
|
316
|
+
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(Dt), this.readyHandler?.();
|
|
384
317
|
}
|
|
385
318
|
get position() {
|
|
386
319
|
return this.chunkPosition + this.i;
|
|
@@ -389,10 +322,10 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
389
322
|
return this.position - this.positionAtNewLine;
|
|
390
323
|
}
|
|
391
324
|
on(e, t) {
|
|
392
|
-
this[
|
|
325
|
+
this[Wt[e]] = t;
|
|
393
326
|
}
|
|
394
327
|
off(e) {
|
|
395
|
-
this[
|
|
328
|
+
this[Wt[e]] = void 0;
|
|
396
329
|
}
|
|
397
330
|
makeError(e) {
|
|
398
331
|
let t = this.fileName ?? "";
|
|
@@ -423,8 +356,8 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
423
356
|
if (this.column++, n < 55296) {
|
|
424
357
|
if (n >= 32 || n === 9) return n;
|
|
425
358
|
switch (n) {
|
|
426
|
-
case
|
|
427
|
-
case 13: return e.charCodeAt(t + 1) ===
|
|
359
|
+
case At: return this.line++, this.column = 0, this.positionAtNewLine = this.position, At;
|
|
360
|
+
case 13: return e.charCodeAt(t + 1) === At && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, Ot;
|
|
428
361
|
default: return this.fail("disallowed character."), n;
|
|
429
362
|
}
|
|
430
363
|
}
|
|
@@ -439,13 +372,13 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
439
372
|
if (this.column++, n < 55296) {
|
|
440
373
|
if (n > 31 && n < 127 || n > 159 && n !== 8232 || n === 9) return n;
|
|
441
374
|
switch (n) {
|
|
442
|
-
case
|
|
375
|
+
case At: return this.line++, this.column = 0, this.positionAtNewLine = this.position, At;
|
|
443
376
|
case 13: {
|
|
444
377
|
let n = e.charCodeAt(t + 1);
|
|
445
|
-
n !==
|
|
378
|
+
n !== At && n !== 133 || (this.i = t + 2);
|
|
446
379
|
}
|
|
447
380
|
case 133:
|
|
448
|
-
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
381
|
+
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position, Ot;
|
|
449
382
|
default: return this.fail("disallowed character."), n;
|
|
450
383
|
}
|
|
451
384
|
}
|
|
@@ -455,7 +388,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
455
388
|
}
|
|
456
389
|
getCodeNorm() {
|
|
457
390
|
let e = this.getCode();
|
|
458
|
-
return e ===
|
|
391
|
+
return e === Ot ? At : e;
|
|
459
392
|
}
|
|
460
393
|
unGet() {
|
|
461
394
|
this.i = this.prevI, this.column--;
|
|
@@ -463,7 +396,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
463
396
|
captureTo(e) {
|
|
464
397
|
let { i: t } = this, { chunk: n } = this;
|
|
465
398
|
for (;;) {
|
|
466
|
-
let r = this.getCode(), i = r ===
|
|
399
|
+
let r = this.getCode(), i = r === Ot, a = i ? At : r;
|
|
467
400
|
if (a === q || e.includes(a)) return this.text += n.slice(t, this.prevI), a;
|
|
468
401
|
i && (this.text += `${n.slice(t, this.prevI)}\n`, t = this.i);
|
|
469
402
|
}
|
|
@@ -473,8 +406,8 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
473
406
|
for (;;) {
|
|
474
407
|
let r = this.getCode();
|
|
475
408
|
switch (r) {
|
|
476
|
-
case
|
|
477
|
-
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r =
|
|
409
|
+
case Ot:
|
|
410
|
+
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r = At;
|
|
478
411
|
break;
|
|
479
412
|
case q: return this.text += n.slice(t), !1;
|
|
480
413
|
}
|
|
@@ -486,17 +419,17 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
486
419
|
for (;;) {
|
|
487
420
|
let n = this.getCode();
|
|
488
421
|
if (n === q) return this.name += e.slice(t), q;
|
|
489
|
-
if (!
|
|
422
|
+
if (!_t(n)) return this.name += e.slice(t, this.prevI), n === Ot ? At : n;
|
|
490
423
|
}
|
|
491
424
|
}
|
|
492
425
|
skipSpaces() {
|
|
493
426
|
for (;;) {
|
|
494
427
|
let e = this.getCodeNorm();
|
|
495
|
-
if (e === q || !
|
|
428
|
+
if (e === q || !K(e)) return e;
|
|
496
429
|
}
|
|
497
430
|
}
|
|
498
431
|
setXMLVersion(e) {
|
|
499
|
-
this.currentXMLVersion = e, e === "1.0" ? (this.isChar =
|
|
432
|
+
this.currentXMLVersion = e, e === "1.0" ? (this.isChar = ht, this.getCode = this.getCode10) : (this.isChar = bt, this.getCode = this.getCode11);
|
|
500
433
|
}
|
|
501
434
|
sBegin() {
|
|
502
435
|
this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
|
|
@@ -504,7 +437,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
504
437
|
sBeginWhitespace() {
|
|
505
438
|
let e = this.i, t = this.skipSpaces();
|
|
506
439
|
switch (this.prevI !== e && (this.xmlDeclPossible = !1), t) {
|
|
507
|
-
case
|
|
440
|
+
case jt:
|
|
508
441
|
if (this.state = 15, this.text.length !== 0) throw Error("no-empty text at start");
|
|
509
442
|
break;
|
|
510
443
|
case q: break;
|
|
@@ -512,13 +445,13 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
512
445
|
}
|
|
513
446
|
}
|
|
514
447
|
sDoctype() {
|
|
515
|
-
let e = this.captureTo(
|
|
448
|
+
let e = this.captureTo(It);
|
|
516
449
|
switch (e) {
|
|
517
450
|
case Y:
|
|
518
451
|
this.doctypeHandler?.(this.text), this.text = "", this.state = J, this.doctype = !0;
|
|
519
452
|
break;
|
|
520
453
|
case q: break;
|
|
521
|
-
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 :
|
|
454
|
+
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 : Pt(e) && (this.state = 3, this.q = e);
|
|
522
455
|
}
|
|
523
456
|
}
|
|
524
457
|
sDoctypeQuote() {
|
|
@@ -526,8 +459,8 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
526
459
|
this.captureToChar(e) && (this.text += String.fromCodePoint(e), this.q = null, this.state = 2);
|
|
527
460
|
}
|
|
528
461
|
sDTD() {
|
|
529
|
-
let e = this.captureTo(
|
|
530
|
-
e !== q && (this.text += String.fromCodePoint(e), e ===
|
|
462
|
+
let e = this.captureTo(Lt);
|
|
463
|
+
e !== q && (this.text += String.fromCodePoint(e), e === Nt ? this.state = 2 : e === jt ? this.state = 6 : Pt(e) && (this.state = 5, this.q = e));
|
|
531
464
|
}
|
|
532
465
|
sDTDQuoted() {
|
|
533
466
|
let e = this.q;
|
|
@@ -573,7 +506,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
573
506
|
sEntity() {
|
|
574
507
|
let { i: e } = this, { chunk: t } = this;
|
|
575
508
|
t: for (;;) switch (this.getCode()) {
|
|
576
|
-
case
|
|
509
|
+
case Ot:
|
|
577
510
|
this.entity += `${t.slice(e, this.prevI)}\n`, e = this.i;
|
|
578
511
|
break;
|
|
579
512
|
case 59: {
|
|
@@ -588,7 +521,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
588
521
|
}
|
|
589
522
|
sOpenWaka() {
|
|
590
523
|
let e = this.getCode();
|
|
591
|
-
if (
|
|
524
|
+
if (gt(e)) this.state = 34, this.unGet(), this.xmlDeclPossible = !1;
|
|
592
525
|
else switch (e) {
|
|
593
526
|
case 47:
|
|
594
527
|
this.state = 43, this.xmlDeclPossible = !1;
|
|
@@ -628,11 +561,11 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
628
561
|
e === Y ? this.state = J : (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(e)}`, this.state = 17);
|
|
629
562
|
}
|
|
630
563
|
sCData() {
|
|
631
|
-
this.captureToChar(
|
|
564
|
+
this.captureToChar(Nt) && (this.state = 21);
|
|
632
565
|
}
|
|
633
566
|
sCDataEnding() {
|
|
634
567
|
let e = this.getCodeNorm();
|
|
635
|
-
e ===
|
|
568
|
+
e === Nt ? this.state = 22 : (this.text += `]${String.fromCodePoint(e)}`, this.state = 20);
|
|
636
569
|
}
|
|
637
570
|
sCDataEnding2() {
|
|
638
571
|
let e = this.getCodeNorm();
|
|
@@ -640,7 +573,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
640
573
|
case Y:
|
|
641
574
|
this.cdataHandler?.(this.text), this.text = "", this.state = J;
|
|
642
575
|
break;
|
|
643
|
-
case
|
|
576
|
+
case Nt:
|
|
644
577
|
this.text += "]";
|
|
645
578
|
break;
|
|
646
579
|
default: this.text += `]]${String.fromCodePoint(e)}`, this.state = 20;
|
|
@@ -648,7 +581,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
648
581
|
}
|
|
649
582
|
sPIFirstChar() {
|
|
650
583
|
let e = this.getCodeNorm();
|
|
651
|
-
this.nameStartCheck(e) ? (this.piTarget += String.fromCodePoint(e), this.state = 24) : e === X ||
|
|
584
|
+
this.nameStartCheck(e) ? (this.piTarget += String.fromCodePoint(e), this.state = 24) : e === X || K(e) ? (this.fail("processing instruction without a target."), this.state = e === X ? 26 : 25) : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(e), this.state = 24);
|
|
652
585
|
}
|
|
653
586
|
sPIRest() {
|
|
654
587
|
let { chunk: e, i: t } = this;
|
|
@@ -658,7 +591,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
658
591
|
if (!this.nameCheck(n)) {
|
|
659
592
|
this.piTarget += e.slice(t, this.prevI);
|
|
660
593
|
let r = n === X;
|
|
661
|
-
r ||
|
|
594
|
+
r || K(n) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = r ? kt : 27) : this.state = r ? 26 : 25 : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(n));
|
|
662
595
|
break;
|
|
663
596
|
}
|
|
664
597
|
}
|
|
@@ -666,7 +599,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
666
599
|
sPIBody() {
|
|
667
600
|
if (this.text.length === 0) {
|
|
668
601
|
let e = this.getCodeNorm();
|
|
669
|
-
e === X ? this.state = 26 :
|
|
602
|
+
e === X ? this.state = 26 : K(e) || (this.text = String.fromCodePoint(e));
|
|
670
603
|
} else this.captureToChar(X) && (this.state = 26);
|
|
671
604
|
}
|
|
672
605
|
sPIEnding() {
|
|
@@ -682,12 +615,12 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
682
615
|
}
|
|
683
616
|
sXMLDeclNameStart() {
|
|
684
617
|
let e = this.skipSpaces();
|
|
685
|
-
e === X ? this.state =
|
|
618
|
+
e === X ? this.state = kt : e !== q && (this.state = 28, this.name = String.fromCodePoint(e));
|
|
686
619
|
}
|
|
687
620
|
sXMLDeclName() {
|
|
688
|
-
let e = this.captureTo(
|
|
689
|
-
if (e === X) return this.state =
|
|
690
|
-
if (
|
|
621
|
+
let e = this.captureTo(Rt);
|
|
622
|
+
if (e === X) return this.state = kt, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
623
|
+
if (K(e) || e === Mt) {
|
|
691
624
|
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
692
625
|
case 0:
|
|
693
626
|
this.fail("did not expect any more name/value pairs.");
|
|
@@ -697,22 +630,22 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
697
630
|
break;
|
|
698
631
|
default: this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`);
|
|
699
632
|
}
|
|
700
|
-
this.state = e ===
|
|
633
|
+
this.state = e === Mt ? 30 : 29;
|
|
701
634
|
}
|
|
702
635
|
}
|
|
703
636
|
sXMLDeclEq() {
|
|
704
637
|
let e = this.getCodeNorm();
|
|
705
|
-
if (e === X) return this.state =
|
|
706
|
-
|
|
638
|
+
if (e === X) return this.state = kt, void this.fail("XML declaration is incomplete.");
|
|
639
|
+
K(e) || (e !== Mt && this.fail("value required."), this.state = 30);
|
|
707
640
|
}
|
|
708
641
|
sXMLDeclValueStart() {
|
|
709
642
|
let e = this.getCodeNorm();
|
|
710
|
-
if (e === X) return this.state =
|
|
711
|
-
|
|
643
|
+
if (e === X) return this.state = kt, void this.fail("XML declaration is incomplete.");
|
|
644
|
+
K(e) || (Pt(e) ? this.q = e : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
712
645
|
}
|
|
713
646
|
sXMLDeclValue() {
|
|
714
647
|
let e = this.captureTo([this.q, X]);
|
|
715
|
-
if (e === X) return this.state =
|
|
648
|
+
if (e === X) return this.state = kt, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
716
649
|
if (e === q) return;
|
|
717
650
|
let t = this.text;
|
|
718
651
|
switch (this.text = "", this.name) {
|
|
@@ -731,7 +664,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
731
664
|
}
|
|
732
665
|
sXMLDeclSeparator() {
|
|
733
666
|
let e = this.getCodeNorm();
|
|
734
|
-
e === X ? this.state =
|
|
667
|
+
e === X ? this.state = kt : (K(e) || (this.fail("whitespace required."), this.unGet()), this.state = 27);
|
|
735
668
|
}
|
|
736
669
|
sXMLDeclEnding() {
|
|
737
670
|
this.getCodeNorm() === Y ? (this.piTarget === "xml" ? this.name !== "version" && this.xmlDeclExpects.includes("version") && this.fail("XML declaration must contain a version.") : this.fail("processing instructions are not allowed before root."), this.xmlDeclHandler?.(this.xmlDecl), this.name = "", this.piTarget = this.text = "", this.state = J) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1;
|
|
@@ -750,7 +683,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
750
683
|
case 47:
|
|
751
684
|
this.state = 35;
|
|
752
685
|
break;
|
|
753
|
-
default:
|
|
686
|
+
default: K(e) || this.fail("disallowed character in tag name."), this.state = 36;
|
|
754
687
|
}
|
|
755
688
|
}
|
|
756
689
|
sOpenTagSlash() {
|
|
@@ -758,25 +691,25 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
758
691
|
}
|
|
759
692
|
sAttrib() {
|
|
760
693
|
let e = this.skipSpaces();
|
|
761
|
-
e !== q && (
|
|
694
|
+
e !== q && (gt(e) ? (this.unGet(), this.state = 37) : e === Y ? this.openTag() : e === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
762
695
|
}
|
|
763
696
|
sAttribName() {
|
|
764
697
|
let e = this.captureNameChars();
|
|
765
|
-
e ===
|
|
698
|
+
e === Mt ? this.state = 39 : K(e) ? this.state = 38 : e === Y ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : e !== q && this.fail("disallowed character in attribute name.");
|
|
766
699
|
}
|
|
767
700
|
sAttribNameSawWhite() {
|
|
768
701
|
let e = this.skipSpaces();
|
|
769
702
|
switch (e) {
|
|
770
703
|
case q: return;
|
|
771
|
-
case
|
|
704
|
+
case Mt:
|
|
772
705
|
this.state = 39;
|
|
773
706
|
break;
|
|
774
|
-
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() :
|
|
707
|
+
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() : gt(e) ? (this.unGet(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
775
708
|
}
|
|
776
709
|
}
|
|
777
710
|
sAttribValue() {
|
|
778
711
|
let e = this.getCodeNorm();
|
|
779
|
-
|
|
712
|
+
Pt(e) ? (this.q = e, this.state = 40) : K(e) || (this.fail("unquoted attribute value."), this.state = 42, this.unGet());
|
|
780
713
|
}
|
|
781
714
|
sAttribValueQuoted() {
|
|
782
715
|
let { q: e, chunk: t } = this, { i: n } = this;
|
|
@@ -787,12 +720,12 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
787
720
|
case 38:
|
|
788
721
|
this.text += t.slice(n, this.prevI), this.state = 14, this.entityReturnState = 40;
|
|
789
722
|
return;
|
|
790
|
-
case
|
|
791
|
-
case
|
|
723
|
+
case At:
|
|
724
|
+
case Ot:
|
|
792
725
|
case 9:
|
|
793
726
|
this.text += `${t.slice(n, this.prevI)} `, n = this.i;
|
|
794
727
|
break;
|
|
795
|
-
case
|
|
728
|
+
case jt:
|
|
796
729
|
this.text += t.slice(n, this.prevI), this.fail("disallowed character.");
|
|
797
730
|
return;
|
|
798
731
|
case q:
|
|
@@ -802,15 +735,15 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
802
735
|
}
|
|
803
736
|
sAttribValueClosed() {
|
|
804
737
|
let e = this.getCodeNorm();
|
|
805
|
-
|
|
738
|
+
K(e) ? this.state = 36 : e === Y ? this.openTag() : e === 47 ? this.state = 35 : gt(e) ? (this.fail("no whitespace between attributes."), this.unGet(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
806
739
|
}
|
|
807
740
|
sAttribValueUnquoted() {
|
|
808
|
-
let e = this.captureTo(
|
|
741
|
+
let e = this.captureTo(zt);
|
|
809
742
|
switch (e) {
|
|
810
743
|
case 38:
|
|
811
744
|
this.state = 14, this.entityReturnState = 42;
|
|
812
745
|
break;
|
|
813
|
-
case
|
|
746
|
+
case jt:
|
|
814
747
|
this.fail("disallowed character.");
|
|
815
748
|
break;
|
|
816
749
|
case q: break;
|
|
@@ -819,7 +752,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
819
752
|
}
|
|
820
753
|
sCloseTag() {
|
|
821
754
|
let e = this.captureNameChars();
|
|
822
|
-
e === Y ? this.closeTag() :
|
|
755
|
+
e === Y ? this.closeTag() : K(e) ? this.state = 44 : e !== q && this.fail("disallowed character in closing tag.");
|
|
823
756
|
}
|
|
824
757
|
sCloseTagSawWhite() {
|
|
825
758
|
switch (this.skipSpaces()) {
|
|
@@ -833,7 +766,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
833
766
|
handleTextInRoot() {
|
|
834
767
|
let { i: e, forbiddenState: t } = this, { chunk: n, textHandler: r } = this;
|
|
835
768
|
t: for (;;) switch (this.getCode()) {
|
|
836
|
-
case
|
|
769
|
+
case jt:
|
|
837
770
|
if (this.state = 15, r !== void 0) {
|
|
838
771
|
let { text: t } = this, i = n.slice(e, this.prevI);
|
|
839
772
|
t.length === 0 ? i.length !== 0 && r(i) : (r(t + i), this.text = "");
|
|
@@ -843,7 +776,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
843
776
|
case 38:
|
|
844
777
|
this.state = 14, this.entityReturnState = J, r !== void 0 && (this.text += n.slice(e, this.prevI)), t = 0;
|
|
845
778
|
break t;
|
|
846
|
-
case
|
|
779
|
+
case Nt:
|
|
847
780
|
switch (t) {
|
|
848
781
|
case 0:
|
|
849
782
|
t = 1;
|
|
@@ -858,7 +791,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
858
791
|
case Y:
|
|
859
792
|
t === 2 && this.fail("the string \"]]>\" is disallowed in char data."), t = 0;
|
|
860
793
|
break;
|
|
861
|
-
case
|
|
794
|
+
case Ot:
|
|
862
795
|
r !== void 0 && (this.text += `${n.slice(e, this.prevI)}\n`), e = this.i, t = 0;
|
|
863
796
|
break;
|
|
864
797
|
case q:
|
|
@@ -873,7 +806,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
873
806
|
t: for (;;) {
|
|
874
807
|
let i = this.getCode();
|
|
875
808
|
switch (i) {
|
|
876
|
-
case
|
|
809
|
+
case jt:
|
|
877
810
|
if (this.state = 15, n !== void 0) {
|
|
878
811
|
let { text: r } = this, i = t.slice(e, this.prevI);
|
|
879
812
|
r.length === 0 ? i.length !== 0 && n(i) : (n(r + i), this.text = "");
|
|
@@ -882,13 +815,13 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
882
815
|
case 38:
|
|
883
816
|
this.state = 14, this.entityReturnState = J, n !== void 0 && (this.text += t.slice(e, this.prevI)), r = !0;
|
|
884
817
|
break t;
|
|
885
|
-
case
|
|
818
|
+
case Ot:
|
|
886
819
|
n !== void 0 && (this.text += `${t.slice(e, this.prevI)}\n`), e = this.i;
|
|
887
820
|
break;
|
|
888
821
|
case q:
|
|
889
822
|
n !== void 0 && (this.text += t.slice(e));
|
|
890
823
|
break t;
|
|
891
|
-
default:
|
|
824
|
+
default: K(i) || (r = !0);
|
|
892
825
|
}
|
|
893
826
|
}
|
|
894
827
|
r && (this.sawRoot || this.reportedTextBeforeRoot || (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0));
|
|
@@ -902,10 +835,10 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
902
835
|
};
|
|
903
836
|
if (this.attribList.push(i), this.attributeHandler?.(i), n === "xmlns") {
|
|
904
837
|
let e = t.trim();
|
|
905
|
-
this.currentXMLVersion === "1.0" && e === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[r] = e,
|
|
838
|
+
this.currentXMLVersion === "1.0" && e === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[r] = e, Bt(this, r, e);
|
|
906
839
|
} else if (e === "xmlns") {
|
|
907
840
|
let e = t.trim();
|
|
908
|
-
this.topNS[""] = e,
|
|
841
|
+
this.topNS[""] = e, Bt(this, "", e);
|
|
909
842
|
}
|
|
910
843
|
}
|
|
911
844
|
pushAttribPlain(e, t) {
|
|
@@ -957,7 +890,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
957
890
|
let { attributes: n } = t, r = /* @__PURE__ */ new Set();
|
|
958
891
|
for (let t of e) {
|
|
959
892
|
let { name: e, prefix: i, local: a } = t, o, s;
|
|
960
|
-
i === "" ? (o = e === "xmlns" ?
|
|
893
|
+
i === "" ? (o = e === "xmlns" ? Tt : "", s = e) : (o = this.resolve(i), o === void 0 && (this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`), o = i), s = `{${o}}${a}`), r.has(s) && this.fail(`duplicate attribute: ${s}.`), r.add(s), t.uri = o, n[e] = t;
|
|
961
894
|
}
|
|
962
895
|
this.attribList = [];
|
|
963
896
|
}
|
|
@@ -995,21 +928,21 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
995
928
|
let t = NaN;
|
|
996
929
|
return e[1] === "x" && /^#x[0-9a-f]+$/i.test(e) ? t = parseInt(e.slice(2), 16) : /^#[0-9]+$/.test(e) && (t = parseInt(e.slice(1), 10)), this.isChar(t) ? String.fromCodePoint(t) : (this.fail("malformed character entity."), `&${e};`);
|
|
997
930
|
}
|
|
998
|
-
},
|
|
931
|
+
}, Kt = /&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g, qt = {
|
|
999
932
|
amp: "&",
|
|
1000
933
|
lt: "<",
|
|
1001
934
|
gt: ">",
|
|
1002
935
|
quot: "\"",
|
|
1003
936
|
apos: "'"
|
|
1004
|
-
},
|
|
1005
|
-
let n =
|
|
937
|
+
}, Jt = (e, t) => {
|
|
938
|
+
let n = qt[t];
|
|
1006
939
|
if (n !== void 0) return n;
|
|
1007
940
|
let r = t.charCodeAt(1) === 120 ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10);
|
|
1008
941
|
return r > 0 && r <= 1114111 ? String.fromCodePoint(r) : e;
|
|
1009
|
-
},
|
|
942
|
+
}, Yt = (e) => {
|
|
1010
943
|
let t = e;
|
|
1011
|
-
return t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, "\n")), t.indexOf("&") !== -1 && (t = t.replace(
|
|
1012
|
-
},
|
|
944
|
+
return t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, "\n")), t.indexOf("&") !== -1 && (t = t.replace(Kt, Jt)), t;
|
|
945
|
+
}, Xt = (e) => {
|
|
1013
946
|
let t = e, n = t.length;
|
|
1014
947
|
for (let e = 0; e < n; e++) {
|
|
1015
948
|
let n = t.charCodeAt(e);
|
|
@@ -1018,8 +951,8 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
1018
951
|
break;
|
|
1019
952
|
}
|
|
1020
953
|
}
|
|
1021
|
-
return t.indexOf("&") !== -1 && (t = t.replace(
|
|
1022
|
-
},
|
|
954
|
+
return t.indexOf("&") !== -1 && (t = t.replace(Kt, Jt)), t;
|
|
955
|
+
}, Zt = (e) => e === 32 || e === 9 || e === 10 || e === 13, Qt = class e {
|
|
1023
956
|
constructor() {
|
|
1024
957
|
this._openTagHandler = void 0, this._closeTagHandler = void 0, this._textHandler = void 0, this._cdataHandler = void 0, this._errorHandler = void 0, this._endHandler = void 0, this._scanners = null, this._carry = "", this._text = "", this._tags = [], this._sawRoot = !1, this._closed = !1;
|
|
1025
958
|
}
|
|
@@ -1030,7 +963,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
1030
963
|
this.NOT_HANDLED = -2;
|
|
1031
964
|
}
|
|
1032
965
|
static decodeText(e) {
|
|
1033
|
-
return
|
|
966
|
+
return Yt(e);
|
|
1034
967
|
}
|
|
1035
968
|
on(e, t) {
|
|
1036
969
|
switch (e) {
|
|
@@ -1096,7 +1029,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
1096
1029
|
if (e.length === 0) return;
|
|
1097
1030
|
this._text = "";
|
|
1098
1031
|
let t = this._textHandler;
|
|
1099
|
-
t !== void 0 && this._tags.length !== 0 && t(
|
|
1032
|
+
t !== void 0 && this._tags.length !== 0 && t(Yt(e));
|
|
1100
1033
|
}
|
|
1101
1034
|
_markup(t, n, r) {
|
|
1102
1035
|
if (n + 1 >= r) return -1;
|
|
@@ -1135,7 +1068,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
1135
1068
|
let i = n + 1 + o.name.length;
|
|
1136
1069
|
if (i >= r) return -1;
|
|
1137
1070
|
let a = t.charCodeAt(i);
|
|
1138
|
-
if (a === 62 || a === 47 ||
|
|
1071
|
+
if (a === 62 || a === 47 || Zt(a)) {
|
|
1139
1072
|
this._flushText();
|
|
1140
1073
|
let i = o.scan(t, n, r);
|
|
1141
1074
|
if (i !== e.NOT_HANDLED) {
|
|
@@ -1153,11 +1086,11 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
1153
1086
|
}
|
|
1154
1087
|
_openTag(e, t, n) {
|
|
1155
1088
|
let r = t + 1, i = 0;
|
|
1156
|
-
for (; r < n && (i = e.charCodeAt(r), i !== 62 && i !== 47 && !
|
|
1089
|
+
for (; r < n && (i = e.charCodeAt(r), i !== 62 && i !== 47 && !Zt(i));) r++;
|
|
1157
1090
|
if (r >= n) return -1;
|
|
1158
1091
|
let a = e.slice(t + 1, r), o = {}, s = !1;
|
|
1159
1092
|
for (;;) {
|
|
1160
|
-
for (; r < n &&
|
|
1093
|
+
for (; r < n && Zt(i = e.charCodeAt(r));) r++;
|
|
1161
1094
|
if (r >= n) return -1;
|
|
1162
1095
|
if (i === 62) {
|
|
1163
1096
|
r++;
|
|
@@ -1173,16 +1106,16 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
1173
1106
|
break;
|
|
1174
1107
|
}
|
|
1175
1108
|
let t = r;
|
|
1176
|
-
for (; r < n && (i = e.charCodeAt(r), i !== 61 && i !== 62 && i !== 47 && !
|
|
1109
|
+
for (; r < n && (i = e.charCodeAt(r), i !== 61 && i !== 62 && i !== 47 && !Zt(i));) r++;
|
|
1177
1110
|
if (r >= n) return -1;
|
|
1178
1111
|
let a = e.slice(t, r);
|
|
1179
|
-
for (; r < n &&
|
|
1112
|
+
for (; r < n && Zt(i = e.charCodeAt(r));) r++;
|
|
1180
1113
|
if (r >= n) return -1;
|
|
1181
1114
|
if (i !== 61) {
|
|
1182
1115
|
this.fail("attribute without value.");
|
|
1183
1116
|
continue;
|
|
1184
1117
|
}
|
|
1185
|
-
for (r++; r < n &&
|
|
1118
|
+
for (r++; r < n && Zt(i = e.charCodeAt(r));) r++;
|
|
1186
1119
|
if (r >= n) return -1;
|
|
1187
1120
|
if (i !== 34 && i !== 39) {
|
|
1188
1121
|
this.fail("unquoted attribute value.");
|
|
@@ -1190,7 +1123,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
1190
1123
|
}
|
|
1191
1124
|
let c = e.indexOf(i === 34 ? "\"" : "'", r + 1);
|
|
1192
1125
|
if (c === -1) return -1;
|
|
1193
|
-
a !== "__proto__" && (o[a] =
|
|
1126
|
+
a !== "__proto__" && (o[a] = Xt(e.slice(r + 1, c))), r = c + 1;
|
|
1194
1127
|
}
|
|
1195
1128
|
this._flushText(), this._sawRoot = !0;
|
|
1196
1129
|
let c = {
|
|
@@ -1228,7 +1161,7 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
1228
1161
|
Ready: "ready"
|
|
1229
1162
|
}, e.parseStream = async (e, t, n) => {
|
|
1230
1163
|
if (n?.lean) return (async (e, t) => {
|
|
1231
|
-
let n = new
|
|
1164
|
+
let n = new Qt(), r;
|
|
1232
1165
|
t.elementScanners && n.setElementScanners(t.elementScanners), t.onOpenTag && n.on("opentag", t.onOpenTag), t.onCloseTag && n.on("closetag", t.onCloseTag), t.onText && n.on("text", t.onText), t.onError && n.on("error", t.onError);
|
|
1233
1166
|
let i = t.onEnd;
|
|
1234
1167
|
for (i && n.on("end", () => {
|
|
@@ -1240,13 +1173,13 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
1240
1173
|
}
|
|
1241
1174
|
return n.close(), r;
|
|
1242
1175
|
})(e, t);
|
|
1243
|
-
let r = new
|
|
1176
|
+
let r = new Gt({
|
|
1244
1177
|
position: !1,
|
|
1245
1178
|
...n
|
|
1246
1179
|
}), i;
|
|
1247
|
-
t.onOpenTagStart && r.on(
|
|
1180
|
+
t.onOpenTagStart && r.on(Vt.Events.OpenTagStart, t.onOpenTagStart), t.onOpenTag && r.on(Vt.Events.OpenTag, t.onOpenTag), t.onCloseTag && r.on(Vt.Events.CloseTag, t.onCloseTag), t.onAttribute && r.on(Vt.Events.Attribute, t.onAttribute), t.onText && r.on(Vt.Events.Text, t.onText), t.onError && r.on(Vt.Events.Error, t.onError);
|
|
1248
1181
|
let a = t.onEnd;
|
|
1249
|
-
for (a && r.on(
|
|
1182
|
+
for (a && r.on(Vt.Events.End, () => {
|
|
1250
1183
|
i = a();
|
|
1251
1184
|
});;) {
|
|
1252
1185
|
let { value: t, done: n } = await e.read();
|
|
@@ -1255,14 +1188,14 @@ var yt, bt = (e) => tt.test(e), xt = (e) => Qe.test(e), St = {
|
|
|
1255
1188
|
}
|
|
1256
1189
|
return r.close(), i;
|
|
1257
1190
|
};
|
|
1258
|
-
})(
|
|
1191
|
+
})(Vt ||= {});
|
|
1259
1192
|
var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, Q = (e) => {
|
|
1260
1193
|
let t = parseInt(e);
|
|
1261
1194
|
return isNaN(t) ? null : t;
|
|
1262
|
-
},
|
|
1195
|
+
}, $t = (e) => {
|
|
1263
1196
|
let t = parseFloat(e);
|
|
1264
1197
|
return isNaN(t) ? null : t;
|
|
1265
|
-
}, $ = null,
|
|
1198
|
+
}, $ = null, en = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), tn = (e) => en(e).replace(/"/g, """), nn = class {
|
|
1266
1199
|
constructor() {
|
|
1267
1200
|
this._registeredVisitors = /* @__PURE__ */ new Map();
|
|
1268
1201
|
}
|
|
@@ -1274,7 +1207,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1274
1207
|
key: null,
|
|
1275
1208
|
source: e,
|
|
1276
1209
|
parent: null
|
|
1277
|
-
}, f = null, p = !1, m = null,
|
|
1210
|
+
}, f = null, p = !1, m = null, h = null, g = null, _ = (e, t) => {
|
|
1278
1211
|
let n = c.attributes[e];
|
|
1279
1212
|
if (t) {
|
|
1280
1213
|
if (Array.isArray(t)) {
|
|
@@ -1283,7 +1216,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1283
1216
|
} else if (n == null || (n = t(n), n == null)) return;
|
|
1284
1217
|
}
|
|
1285
1218
|
return n;
|
|
1286
|
-
},
|
|
1219
|
+
}, v = {
|
|
1287
1220
|
getSource: () => f?.source ?? null,
|
|
1288
1221
|
setSource: (e) => {
|
|
1289
1222
|
f.source = e;
|
|
@@ -1292,8 +1225,8 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1292
1225
|
f.key = e;
|
|
1293
1226
|
},
|
|
1294
1227
|
getFrom: () => c,
|
|
1295
|
-
getAttribute: (e, t) =>
|
|
1296
|
-
hasAttribute: (e) =>
|
|
1228
|
+
getAttribute: (e, t) => _(e, t) ?? null,
|
|
1229
|
+
hasAttribute: (e) => v.getAttribute(e) !== null,
|
|
1297
1230
|
getParent: () => {
|
|
1298
1231
|
let e = u[u.length - 2];
|
|
1299
1232
|
return e.parent ?? e.source;
|
|
@@ -1303,14 +1236,14 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1303
1236
|
for (let n = 0; n < t; n++) e.push(a[n].local);
|
|
1304
1237
|
return e.join("\\");
|
|
1305
1238
|
},
|
|
1306
|
-
parseAttribute:
|
|
1307
|
-
getRawXml: () =>
|
|
1239
|
+
parseAttribute: _,
|
|
1240
|
+
getRawXml: () => g,
|
|
1308
1241
|
copyToObject: (e, t, n, r) => {
|
|
1309
|
-
let i =
|
|
1242
|
+
let i = _(r ?? t, n);
|
|
1310
1243
|
i !== void 0 && (e[t] = i);
|
|
1311
1244
|
},
|
|
1312
1245
|
copyTo: (e, t, n) => {
|
|
1313
|
-
let r =
|
|
1246
|
+
let r = _(n ?? e, t);
|
|
1314
1247
|
r !== void 0 && (f.source[e] = r);
|
|
1315
1248
|
},
|
|
1316
1249
|
warn: (e, t) => {
|
|
@@ -1324,7 +1257,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1324
1257
|
let t = e.attributes ?? {}, n = `<${e.name}`;
|
|
1325
1258
|
for (let e in t) {
|
|
1326
1259
|
let r = t[e];
|
|
1327
|
-
n += ` ${e}="${
|
|
1260
|
+
n += ` ${e}="${tn(typeof r == "string" ? r : r?.value ?? "")}"`;
|
|
1328
1261
|
}
|
|
1329
1262
|
return n + ">";
|
|
1330
1263
|
})(e)), o = {
|
|
@@ -1332,53 +1265,53 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1332
1265
|
tag: e,
|
|
1333
1266
|
destination: null
|
|
1334
1267
|
}, a.push(o), s = t, void (c = e);
|
|
1335
|
-
let
|
|
1268
|
+
let g = (i.length > 0 ? i[i.length - 1] : r).get(t);
|
|
1336
1269
|
if (o = {
|
|
1337
1270
|
local: t,
|
|
1338
|
-
visitor:
|
|
1271
|
+
visitor: g,
|
|
1339
1272
|
tag: e,
|
|
1340
1273
|
destination: null
|
|
1341
1274
|
}, p) return a.push(o), s = t, void (c = e);
|
|
1342
1275
|
l = o?.visitor ?? null, s = t, c = e;
|
|
1343
|
-
let
|
|
1344
|
-
if (
|
|
1345
|
-
let e =
|
|
1346
|
-
e === null ?
|
|
1276
|
+
let _ = !!g && g.to === null;
|
|
1277
|
+
if (g && !_ && g.scope) {
|
|
1278
|
+
let e = g.scope(v);
|
|
1279
|
+
e === null ? _ = !0 : e && (i.push(e), o.pushedScope = !0);
|
|
1347
1280
|
}
|
|
1348
|
-
|
|
1281
|
+
g && (a.length === 0 ? (f = d, o.destination = f, o.pushedDestination = !0, u.push(f)) : _ ? (f = null, o.destination = null) : g.transparent ? o.destination = f : (f = {
|
|
1349
1282
|
key: null,
|
|
1350
1283
|
source: {},
|
|
1351
1284
|
parent: null
|
|
1352
|
-
}, o.destination = f, o.pushedDestination = !0, u.push(f))), a.push(o), p =
|
|
1353
|
-
let
|
|
1354
|
-
|
|
1285
|
+
}, o.destination = f, o.pushedDestination = !0, u.push(f))), a.push(o), p = _;
|
|
1286
|
+
let y = l?.openTag?.(v);
|
|
1287
|
+
y !== void 0 && (f.parent = y), g?.raw && !_ && (m = [], h = o);
|
|
1355
1288
|
},
|
|
1356
1289
|
onCloseTag: (e) => {
|
|
1357
1290
|
let t = e.name, r = t.indexOf(":");
|
|
1358
1291
|
if (r !== -1 && (t = t.slice(r + 1)), t !== s) throw Error(`mismatch open/close tag: '${t}'/'${s}'`);
|
|
1359
|
-
let
|
|
1292
|
+
let _ = !1;
|
|
1360
1293
|
if (m) {
|
|
1361
|
-
if (a[a.length - 1] !==
|
|
1362
|
-
|
|
1294
|
+
if (a[a.length - 1] !== h) return m.push(`</${e.name}>`), a.pop(), o = a[a.length - 1] ?? null, s = o?.local ?? null, void (c = o?.tag ?? null);
|
|
1295
|
+
g = m.join(""), m = null, h = null, _ = !0;
|
|
1363
1296
|
}
|
|
1364
|
-
p || l?.closeTag?.(
|
|
1365
|
-
let
|
|
1366
|
-
o = a[a.length - 1] ?? null,
|
|
1367
|
-
let
|
|
1368
|
-
if (
|
|
1297
|
+
p || l?.closeTag?.(v), _ && (g = null);
|
|
1298
|
+
let y = a.pop() ?? null;
|
|
1299
|
+
o = a[a.length - 1] ?? null, y?.pushedScope && i.pop();
|
|
1300
|
+
let b = y?.destination;
|
|
1301
|
+
if (b && y.pushedDestination) {
|
|
1369
1302
|
u.pop(), f = u[u.length - 1] ?? d;
|
|
1370
|
-
let e =
|
|
1371
|
-
e && e.to &&
|
|
1372
|
-
} else
|
|
1303
|
+
let e = y.visitor;
|
|
1304
|
+
e && e.to && b.source !== void 0 && (Array.isArray(e.to) ? f.source.push ? f.source.push(b.source) : n?.(`Unable to parse array for ${e.from} at ${v.getPath()}`) : b.key ? f.source[b.key] = b.source : typeof e.to == "string" && (f.source[e.to] = b.source));
|
|
1305
|
+
} else b || (f = u[u.length - 1] ?? d);
|
|
1373
1306
|
s = o?.local ?? null, c = o?.tag ?? null, l = o?.visitor ?? null, p = !o?.destination;
|
|
1374
1307
|
},
|
|
1375
1308
|
onText: (e) => {
|
|
1376
|
-
m ? m.push(
|
|
1309
|
+
m ? m.push(en(e)) : l?.text?.(e, v);
|
|
1377
1310
|
},
|
|
1378
1311
|
onEnd: t
|
|
1379
1312
|
};
|
|
1380
1313
|
}
|
|
1381
|
-
},
|
|
1314
|
+
}, rn = `IFERROR(${b}(`, an = rn.toUpperCase(), on = p.toUpperCase(), sn = { kind: "none" }, cn = { kind: "spilled" }, ln = (e, t) => {
|
|
1382
1315
|
if (e.charCodeAt(t) !== 34) return null;
|
|
1383
1316
|
let n = "", r = t + 1;
|
|
1384
1317
|
for (; r < e.length;) if (e.charCodeAt(r) === 34) {
|
|
@@ -1389,12 +1322,12 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1389
1322
|
n += "\"", r += 2;
|
|
1390
1323
|
} else n += e[r], r++;
|
|
1391
1324
|
return null;
|
|
1392
|
-
},
|
|
1325
|
+
}, un = (e) => {
|
|
1393
1326
|
let t = [], n = 0;
|
|
1394
1327
|
for (; n < e.length;) {
|
|
1395
1328
|
let r = e.charCodeAt(n);
|
|
1396
1329
|
if (r === 34) {
|
|
1397
|
-
let t =
|
|
1330
|
+
let t = ln(e, n);
|
|
1398
1331
|
if (t === null) break;
|
|
1399
1332
|
n = t.end;
|
|
1400
1333
|
continue;
|
|
@@ -1412,7 +1345,191 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1412
1345
|
e.charCodeAt(i) === 40 && t.push(e.slice(n, i).toUpperCase().replace(/^_XLFN\./, "").replace(/^_XLWS\./, "")), n = i;
|
|
1413
1346
|
}
|
|
1414
1347
|
return t;
|
|
1415
|
-
},
|
|
1348
|
+
}, dn = /^\s*TABLE\s*\(([^()]*)\)\s*$/i, fn = /^\s*(\$?)([A-Za-z]{1,3})(\$?)(\d{1,7})\s*$/, pn = (e) => {
|
|
1349
|
+
let t = fn.exec(e);
|
|
1350
|
+
if (!t) return null;
|
|
1351
|
+
let n = V.fastStringToCol(t[2]), r = parseInt(t[4], 10) - 1;
|
|
1352
|
+
return n < 0 || r < 0 ? null : {
|
|
1353
|
+
row: r,
|
|
1354
|
+
col: n,
|
|
1355
|
+
colAbsolute: t[1] === "$",
|
|
1356
|
+
rowAbsolute: t[3] === "$"
|
|
1357
|
+
};
|
|
1358
|
+
}, mn = (e) => V.cellToString({
|
|
1359
|
+
rowIndex: e.row,
|
|
1360
|
+
colIndex: e.col
|
|
1361
|
+
}), hn = (e, t) => {
|
|
1362
|
+
let n = dn.exec(e);
|
|
1363
|
+
if (!n) return null;
|
|
1364
|
+
let r = n[1].split(",");
|
|
1365
|
+
if (r.length !== 3 && r.length !== 5) return null;
|
|
1366
|
+
let i = [];
|
|
1367
|
+
for (let e = 0; e < r.length; e++) {
|
|
1368
|
+
let t = pn(r[e]);
|
|
1369
|
+
if (!t) return null;
|
|
1370
|
+
i.push(t);
|
|
1371
|
+
}
|
|
1372
|
+
let a = t.rowStart, o = t.colStart, s = (e) => e.colAbsolute && !e.rowAbsolute && e.col === o - 1 && e.row === a, c = (e) => e.rowAbsolute && !e.colAbsolute && e.row === a - 1 && e.col === o, l = V.rangeToString(t), u = i[0];
|
|
1373
|
+
if (i.length === 3) {
|
|
1374
|
+
let [, e, t] = i;
|
|
1375
|
+
return s(t) && c(u) ? {
|
|
1376
|
+
ref: l,
|
|
1377
|
+
columnInput: mn(e)
|
|
1378
|
+
} : c(t) && s(u) ? {
|
|
1379
|
+
ref: l,
|
|
1380
|
+
rowInput: mn(e)
|
|
1381
|
+
} : null;
|
|
1382
|
+
}
|
|
1383
|
+
if (!u.rowAbsolute || !u.colAbsolute || u.row !== a - 1 || u.col !== o - 1) return null;
|
|
1384
|
+
let [, d, f, p, m] = i;
|
|
1385
|
+
return s(f) && c(m) ? {
|
|
1386
|
+
ref: l,
|
|
1387
|
+
rowInput: mn(p),
|
|
1388
|
+
columnInput: mn(d)
|
|
1389
|
+
} : c(f) && s(m) ? {
|
|
1390
|
+
ref: l,
|
|
1391
|
+
rowInput: mn(d),
|
|
1392
|
+
columnInput: mn(p)
|
|
1393
|
+
} : null;
|
|
1394
|
+
}, gn = /^(?:(\d{4})-(\d{2})-(\d{2}))?T?(?:(\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?)?(?:Z|[+-]\d{2}:?\d{2})?$/, _n = /^PT(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?$/, vn = (e, t, n) => {
|
|
1395
|
+
let r = Math.floor((14 - t) / 12), i = e + 4800 - r, a = t + 12 * r - 3;
|
|
1396
|
+
return n + Math.floor((153 * a + 2) / 5) + 365 * i + Math.floor(i / 4) - Math.floor(i / 100) + Math.floor(i / 400) - 32045;
|
|
1397
|
+
}, yn = vn(1899, 12, 30), bn = (e) => {
|
|
1398
|
+
let t = e.indexOf(":");
|
|
1399
|
+
return t === -1 ? e : e.slice(t + 1);
|
|
1400
|
+
}, xn = class {
|
|
1401
|
+
constructor() {
|
|
1402
|
+
this._runs = null, this._text = "", this._font = null, this._inRun = !1, this._inRPr = !1;
|
|
1403
|
+
}
|
|
1404
|
+
reset() {
|
|
1405
|
+
this._runs = null, this._inRun = !1, this._inRPr = !1;
|
|
1406
|
+
}
|
|
1407
|
+
onOpenTag(e, t) {
|
|
1408
|
+
e === "r" ? (this._inRun = !0, this._text = "", this._font = null, this._runs ??= []) : e === "rPr" ? this._inRun && (this._inRPr = !0) : this._inRPr && function(e, t, n) {
|
|
1409
|
+
switch (e) {
|
|
1410
|
+
case "b":
|
|
1411
|
+
n.weight = wn(t) ? 700 : 400;
|
|
1412
|
+
break;
|
|
1413
|
+
case "i":
|
|
1414
|
+
n.style = wn(t) ? Be.Style.Italic : Be.Style.Normal;
|
|
1415
|
+
break;
|
|
1416
|
+
case "strike":
|
|
1417
|
+
n.strike = i(wn(t));
|
|
1418
|
+
break;
|
|
1419
|
+
case "outline":
|
|
1420
|
+
n.outline = wn(t);
|
|
1421
|
+
break;
|
|
1422
|
+
case "shadow":
|
|
1423
|
+
n.shadow = wn(t);
|
|
1424
|
+
break;
|
|
1425
|
+
case "condense":
|
|
1426
|
+
case "extend": {
|
|
1427
|
+
let r = o(e, wn(t));
|
|
1428
|
+
r !== void 0 && (n.letterSpacing = r);
|
|
1429
|
+
break;
|
|
1430
|
+
}
|
|
1431
|
+
case "u":
|
|
1432
|
+
n.underline = h(t.val);
|
|
1433
|
+
break;
|
|
1434
|
+
case "vertAlign": {
|
|
1435
|
+
let e = Oe(t.val);
|
|
1436
|
+
e !== void 0 && (n.baseline = e);
|
|
1437
|
+
break;
|
|
1438
|
+
}
|
|
1439
|
+
case "sz": {
|
|
1440
|
+
let e = parseFloat(t.val ?? "");
|
|
1441
|
+
isNaN(e) || (n.size = e);
|
|
1442
|
+
break;
|
|
1443
|
+
}
|
|
1444
|
+
case "rFont": {
|
|
1445
|
+
let e = t.val;
|
|
1446
|
+
e && (n.family = e);
|
|
1447
|
+
break;
|
|
1448
|
+
}
|
|
1449
|
+
case "family": {
|
|
1450
|
+
let e = Cn[t.val ?? ""];
|
|
1451
|
+
e && (n.fallbacks = [e]);
|
|
1452
|
+
break;
|
|
1453
|
+
}
|
|
1454
|
+
case "charset": {
|
|
1455
|
+
let e = parseInt(t.val ?? "", 10);
|
|
1456
|
+
isNaN(e) || (n.charset = e);
|
|
1457
|
+
break;
|
|
1458
|
+
}
|
|
1459
|
+
case "scheme":
|
|
1460
|
+
x(n, t.val);
|
|
1461
|
+
break;
|
|
1462
|
+
case "color": {
|
|
1463
|
+
let e = t.rgb;
|
|
1464
|
+
if (e && t.theme === void 0) {
|
|
1465
|
+
n.color = "#" + (e.length === 8 ? e.substring(2) : e).toUpperCase();
|
|
1466
|
+
break;
|
|
1467
|
+
}
|
|
1468
|
+
let r = D((e) => t[e]);
|
|
1469
|
+
r && (n.color = r);
|
|
1470
|
+
break;
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
}(e, t, this._font ??= {});
|
|
1474
|
+
}
|
|
1475
|
+
onText(e) {
|
|
1476
|
+
this._inRun && (this._text += e);
|
|
1477
|
+
}
|
|
1478
|
+
onCloseTag(e) {
|
|
1479
|
+
if (e === "rPr") this._inRPr = !1, this._font ??= {};
|
|
1480
|
+
else if (e === "r" && this._inRun) {
|
|
1481
|
+
let e = l(this._text), t = this._font;
|
|
1482
|
+
this._runs.push(t ? {
|
|
1483
|
+
text: e,
|
|
1484
|
+
font: t
|
|
1485
|
+
} : { text: e }), this._inRun = !1;
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
take() {
|
|
1489
|
+
let e = this._runs;
|
|
1490
|
+
if (this.reset(), !e) return null;
|
|
1491
|
+
for (let t = 0; t < e.length; t++) if (e[t].font) return e;
|
|
1492
|
+
return null;
|
|
1493
|
+
}
|
|
1494
|
+
};
|
|
1495
|
+
function Sn(e, t) {
|
|
1496
|
+
let n = {
|
|
1497
|
+
family: "Calibri",
|
|
1498
|
+
size: 11,
|
|
1499
|
+
...t,
|
|
1500
|
+
weight: 400,
|
|
1501
|
+
style: Be.Style.Normal,
|
|
1502
|
+
underline: Be.UnderlineStyle.None,
|
|
1503
|
+
strike: Be.StrikeStyle.None,
|
|
1504
|
+
baseline: 0
|
|
1505
|
+
}, r = Array(e.length);
|
|
1506
|
+
for (let t = 0; t < e.length; t++) {
|
|
1507
|
+
let i = e[t];
|
|
1508
|
+
if (!i.font) {
|
|
1509
|
+
r[t] = i;
|
|
1510
|
+
continue;
|
|
1511
|
+
}
|
|
1512
|
+
let a = {
|
|
1513
|
+
...n,
|
|
1514
|
+
...i.font
|
|
1515
|
+
};
|
|
1516
|
+
r[t] = {
|
|
1517
|
+
text: i.text,
|
|
1518
|
+
font: a
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
return r;
|
|
1522
|
+
}
|
|
1523
|
+
var Cn = {
|
|
1524
|
+
1: "serif",
|
|
1525
|
+
2: "sans-serif",
|
|
1526
|
+
3: "monospace",
|
|
1527
|
+
4: "cursive",
|
|
1528
|
+
5: "fantasy"
|
|
1529
|
+
}, wn = (e) => {
|
|
1530
|
+
let t = e.val;
|
|
1531
|
+
return t === void 0 || t === "1" || t === "true";
|
|
1532
|
+
}, Tn = (e) => {
|
|
1416
1533
|
let t = (t) => {
|
|
1417
1534
|
if (e) return RegExp(`<(?:[\\w.-]+:)?${t}\\b[^>]*>([^<]*)<`).exec(e)?.[1];
|
|
1418
1535
|
}, n = (e) => {
|
|
@@ -1422,16 +1539,19 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1422
1539
|
return {
|
|
1423
1540
|
c: n(t("col")),
|
|
1424
1541
|
r: n(t("row")),
|
|
1425
|
-
x:
|
|
1426
|
-
y:
|
|
1542
|
+
x: re(t("colOff") ?? "0") ?? 0,
|
|
1543
|
+
y: re(t("rowOff") ?? "0") ?? 0
|
|
1427
1544
|
};
|
|
1428
|
-
},
|
|
1429
|
-
let p = new
|
|
1545
|
+
}, En = "formulaDialect", Dn = "date1904", On = "richStrings", kn = "defaultFont", An = (e, t, n, i, o, s, d, f) => {
|
|
1546
|
+
let p = new nn(), m = (e) => {
|
|
1547
|
+
let t = e.getAttribute("dxfId", Q);
|
|
1548
|
+
return t === null ? void 0 : i?.get(t) || (s?.(`A color filter or sort names a format that does not exist (dxfId '${t}').`), {});
|
|
1549
|
+
}, h = !1, g = f?.get("parseInlineDxf"), y = f?.get(En), b = (e) => y && e ? y.readDetached(e) : e, ee = new qe.TransposedBuilder(), x = null, ne = "topLeft";
|
|
1430
1550
|
p.registerVisitor({
|
|
1431
1551
|
from: "autoFilter",
|
|
1432
1552
|
to: "autoTable",
|
|
1433
1553
|
openTag: (e) => {
|
|
1434
|
-
let t = e.getAttribute("ref"), n =
|
|
1554
|
+
let t = e.getAttribute("ref"), n = V.fastStringToRange(t);
|
|
1435
1555
|
e.getSource().r = n, e.getSource().v = {};
|
|
1436
1556
|
},
|
|
1437
1557
|
closeTag: (e) => {
|
|
@@ -1470,7 +1590,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1470
1590
|
let r = e.getAttribute("dxfId", Q);
|
|
1471
1591
|
if (r !== null) {
|
|
1472
1592
|
let t = i?.get(r);
|
|
1473
|
-
t ||= (
|
|
1593
|
+
t ||= (s?.(`Unable to load conditional color. Invalid dxfI: '${r}' at '${e.getPath()}'.`), {}), n.style = t;
|
|
1474
1594
|
}
|
|
1475
1595
|
e.copyToObject(n, "aboveAverage", Z), e.copyToObject(n, "equalAverage", Z), e.copyToObject(n, "stdDev", Q), e.copyToObject(n, "bottom", Z), e.copyToObject(n, "percent", Z), e.copyToObject(n, "rank", Q), e.copyToObject(n, "operator", $), e.copyToObject(n, "text", $), e.copyToObject(n, "timePeriod", $);
|
|
1476
1596
|
},
|
|
@@ -1479,11 +1599,11 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1479
1599
|
if (!t?.r) return;
|
|
1480
1600
|
let n = t.conditionals[t.conditionals.length - 1], r = n?.rule;
|
|
1481
1601
|
if (!r) return;
|
|
1482
|
-
let i = {}, a =
|
|
1602
|
+
let i = {}, a = O(r, s);
|
|
1483
1603
|
a && (i.condition = a), r.style && (i.style = r.style), r.scale && (i.scale = r.scale), r.stopIfTrue && (i.stopIfTrue = !0), r.pivot && (i.pivot = !0), n.v = i, n.priority = r.priority, r.x14Id && (n.x14Id = r.x14Id), delete n.rule;
|
|
1484
1604
|
}
|
|
1485
1605
|
});
|
|
1486
|
-
let
|
|
1606
|
+
let re = (e) => {
|
|
1487
1607
|
let t = e.conditions ?? [], n = [];
|
|
1488
1608
|
for (let e = 0; e < t.length; e++) {
|
|
1489
1609
|
let r = t[e], i = {};
|
|
@@ -1496,10 +1616,10 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1496
1616
|
to: {},
|
|
1497
1617
|
openTag: (e) => {},
|
|
1498
1618
|
closeTag: (e) => {
|
|
1499
|
-
let t = e.getSource(), n = t.colors ?? [], r =
|
|
1619
|
+
let t = e.getSource(), n = t.colors ?? [], r = re(t);
|
|
1500
1620
|
for (let e = 0; e < r.length; e++) r[e].color = n[e];
|
|
1501
1621
|
e.getParent().scale = {
|
|
1502
|
-
type:
|
|
1622
|
+
type: U.ScaleType.ColorScale,
|
|
1503
1623
|
stops: r
|
|
1504
1624
|
};
|
|
1505
1625
|
}
|
|
@@ -1511,8 +1631,8 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1511
1631
|
},
|
|
1512
1632
|
closeTag: (e) => {
|
|
1513
1633
|
let t = e.getSource(), n = {
|
|
1514
|
-
type:
|
|
1515
|
-
stops:
|
|
1634
|
+
type: U.ScaleType.DataBar,
|
|
1635
|
+
stops: re(t)
|
|
1516
1636
|
}, r = t.colors?.[0];
|
|
1517
1637
|
r && (n.color = r), t.minLength !== void 0 && (n.minLength = t.minLength), t.maxLength !== void 0 && (n.maxLength = t.maxLength), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1518
1638
|
}
|
|
@@ -1524,8 +1644,8 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1524
1644
|
},
|
|
1525
1645
|
closeTag: (e) => {
|
|
1526
1646
|
let t = e.getSource(), n = {
|
|
1527
|
-
type:
|
|
1528
|
-
stops:
|
|
1647
|
+
type: U.ScaleType.IconSet,
|
|
1648
|
+
stops: re(t)
|
|
1529
1649
|
};
|
|
1530
1650
|
t.iconSet !== void 0 && (n.iconSet = t.iconSet), t.reverse !== void 0 && (n.reverse = t.reverse), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1531
1651
|
}
|
|
@@ -1543,10 +1663,10 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1543
1663
|
let t = e.getParent();
|
|
1544
1664
|
t.conditions ||= [];
|
|
1545
1665
|
let n = e.getSource();
|
|
1546
|
-
if (t.conditions.push(n), e.copyTo("type", $), n.type ===
|
|
1666
|
+
if (t.conditions.push(n), e.copyTo("type", $), n.type === U.ColorStopType.Formula) {
|
|
1547
1667
|
let t = e.getAttribute("val");
|
|
1548
1668
|
t != null && (n.value = b(String(t)));
|
|
1549
|
-
} else e.copyTo("value",
|
|
1669
|
+
} else e.copyTo("value", $t, "val");
|
|
1550
1670
|
!1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
1551
1671
|
}
|
|
1552
1672
|
}), p.registerVisitor({
|
|
@@ -1555,7 +1675,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1555
1675
|
openTag: (e) => {
|
|
1556
1676
|
let t = e.getParent();
|
|
1557
1677
|
t.colors ||= [];
|
|
1558
|
-
let n =
|
|
1678
|
+
let n = D((t) => e.getAttribute(t));
|
|
1559
1679
|
t.colors.push(n);
|
|
1560
1680
|
}
|
|
1561
1681
|
}), p.registerVisitor({
|
|
@@ -1581,24 +1701,26 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1581
1701
|
from: "colorFilter",
|
|
1582
1702
|
openTag: (e) => {
|
|
1583
1703
|
let t = e.getParent(), n = {};
|
|
1584
|
-
t.operator =
|
|
1704
|
+
t.operator = H.BuiltInOperatorNames.Color, t.param = n, e.copyToObject(n, "cellColor", Z);
|
|
1705
|
+
let r = m(e);
|
|
1706
|
+
r && (n.style = r);
|
|
1585
1707
|
}
|
|
1586
1708
|
}), p.registerVisitor({
|
|
1587
1709
|
from: "iconFilter",
|
|
1588
1710
|
openTag: (e) => {
|
|
1589
1711
|
let t = e.getParent(), n = {};
|
|
1590
|
-
t.operator =
|
|
1712
|
+
t.operator = H.BuiltInOperatorNames.Icon, t.param = n, e.copyToObject(n, "iconId", Q), e.copyToObject(n, "iconSet", $);
|
|
1591
1713
|
}
|
|
1592
1714
|
}), p.registerVisitor({
|
|
1593
1715
|
from: "top10",
|
|
1594
1716
|
openTag: (e) => {
|
|
1595
1717
|
let t = e.getParent(), n = {};
|
|
1596
|
-
t.operator =
|
|
1718
|
+
t.operator = H.BuiltInOperatorNames.TopN, t.param = n, e.copyToObject(n, "filterVal", $t), e.copyToObject(n, "percent", Z), e.copyToObject(n, "top", Z), e.copyToObject(n, "limit", $t, "val");
|
|
1597
1719
|
}
|
|
1598
1720
|
}), p.registerVisitor({
|
|
1599
1721
|
from: "dynamicFilter",
|
|
1600
1722
|
openTag: (e) => {
|
|
1601
|
-
let t = e.getParent(), n =
|
|
1723
|
+
let t = e.getParent(), n = de(e.getAttribute("type"));
|
|
1602
1724
|
t.operator = n.operator, t.param = n.param;
|
|
1603
1725
|
}
|
|
1604
1726
|
});
|
|
@@ -1607,19 +1729,19 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1607
1729
|
to: {},
|
|
1608
1730
|
openTag: (e) => {
|
|
1609
1731
|
let t = e.getParent(), n = {};
|
|
1610
|
-
return t.selector =
|
|
1732
|
+
return t.selector = H.BuiltInSelectorNames.Display, t.operator = H.BuiltInOperatorNames.InSet, t.param = n, e.copyToObject(n, "blank", Z), e.copyToObject(n, "calendarType", $), n;
|
|
1611
1733
|
}
|
|
1612
1734
|
};
|
|
1613
1735
|
p.registerVisitor(ae);
|
|
1614
|
-
let
|
|
1736
|
+
let oe = {
|
|
1615
1737
|
from: "filter",
|
|
1616
1738
|
openTag: (e) => {
|
|
1617
1739
|
let t = e.getParent(), n = t.items;
|
|
1618
1740
|
n || (n = [], t.items = n), n.push(e.getAttribute("val", $));
|
|
1619
1741
|
}
|
|
1620
1742
|
};
|
|
1621
|
-
p.registerVisitor(
|
|
1622
|
-
let
|
|
1743
|
+
p.registerVisitor(oe);
|
|
1744
|
+
let se = {
|
|
1623
1745
|
from: "dateGroupItem",
|
|
1624
1746
|
to: {},
|
|
1625
1747
|
openTag: (e) => {
|
|
@@ -1627,21 +1749,21 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1627
1749
|
n || (n = [], t.dateGroups = n), n.push(e.getSource()), e.copyTo("group", $, "dateTimeGrouping"), e.copyTo("day", Q), e.copyTo("hour", Q), e.copyTo("minute", Q), e.copyTo("month", Q), e.copyTo("second", Q), e.copyTo("year", Q);
|
|
1628
1750
|
}
|
|
1629
1751
|
};
|
|
1630
|
-
p.registerVisitor(
|
|
1752
|
+
p.registerVisitor(se);
|
|
1631
1753
|
let ce = /* @__PURE__ */ new Map();
|
|
1632
1754
|
ce.set("filterColumn", {
|
|
1633
1755
|
from: "filterColumn",
|
|
1634
1756
|
transparent: !0
|
|
1635
|
-
}), ce.set("filters", ae), ce.set("filter",
|
|
1757
|
+
}), ce.set("filters", ae), ce.set("filter", oe), ce.set("dateGroupItem", se), p.registerVisitor({
|
|
1636
1758
|
from: "customFilters",
|
|
1637
1759
|
openTag: (e) => {
|
|
1638
1760
|
let t = e.getParent(), n = e.getAttribute("and"), r = n === "and" || n === "1", i = [];
|
|
1639
|
-
return t.operator = r ?
|
|
1761
|
+
return t.operator = r ? H.BuiltInOperatorNames.And : H.BuiltInOperatorNames.Or, t.param = i, e.setSource(t), i;
|
|
1640
1762
|
},
|
|
1641
1763
|
closeTag: (e) => {
|
|
1642
1764
|
let t = e.getSource(), n = t?.param;
|
|
1643
1765
|
if (!t || !n) return;
|
|
1644
|
-
let r = n.length === 1 ? n[0] :
|
|
1766
|
+
let r = n.length === 1 ? n[0] : we(t);
|
|
1645
1767
|
r !== t && (t.operator = r.operator, t.param = r.param);
|
|
1646
1768
|
}
|
|
1647
1769
|
}), p.registerVisitor({
|
|
@@ -1649,18 +1771,31 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1649
1771
|
openTag: (e) => {
|
|
1650
1772
|
let t = e.getParent(), n;
|
|
1651
1773
|
Array.isArray(t) ? (n = {}, t.push(n)) : n = t;
|
|
1652
|
-
let r =
|
|
1774
|
+
let r = Se({
|
|
1653
1775
|
operator: e.getAttribute("operator"),
|
|
1654
1776
|
val: e.getAttribute("val")
|
|
1655
1777
|
}, (t) => e.warn(t));
|
|
1656
1778
|
r && (n.operator = r.operator, n.param = r.param);
|
|
1657
1779
|
}
|
|
1658
|
-
})
|
|
1780
|
+
});
|
|
1781
|
+
let T = {}, E = null;
|
|
1782
|
+
p.registerVisitor({
|
|
1659
1783
|
from: "sortState",
|
|
1660
1784
|
to: {},
|
|
1661
1785
|
openTag: (e) => {
|
|
1662
1786
|
let t = e.getParent(), n = t.v;
|
|
1663
|
-
|
|
1787
|
+
if (!n) return;
|
|
1788
|
+
let r = {};
|
|
1789
|
+
T = {};
|
|
1790
|
+
let i = e.getAttribute("caseSensitive", Z);
|
|
1791
|
+
i != null && (T.collatorOptions = i ? Ge.CaseSensitiveOptions : Ge.CaseInsensitiveOptions);
|
|
1792
|
+
let a = e.getAttribute("sortMethod");
|
|
1793
|
+
a !== "stroke" && a !== "pinYin" || (T.collatorOptions = {
|
|
1794
|
+
...T.collatorOptions,
|
|
1795
|
+
collation: a === "stroke" ? "stroke" : "pinyin"
|
|
1796
|
+
}), e.getAttribute("columnSort", Z) && (r.axis = Ve.Axis.Column);
|
|
1797
|
+
let o = e.getAttribute("ref"), s = t.r;
|
|
1798
|
+
E = o && s ? V.fastStringToRange(o) : null, E && (r.extent = { range: u(s, E) }), n.sort = r, e.setSource(t);
|
|
1664
1799
|
}
|
|
1665
1800
|
}), p.registerVisitor({
|
|
1666
1801
|
from: "sortCondition",
|
|
@@ -1672,30 +1807,39 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1672
1807
|
if (!r) return;
|
|
1673
1808
|
let i = r.sorts;
|
|
1674
1809
|
i || (i = [], r.sorts = i);
|
|
1675
|
-
let a = e.getAttribute("ref"), o = 0;
|
|
1810
|
+
let a = e.getAttribute("ref"), o = 0, s = null;
|
|
1676
1811
|
if (a) {
|
|
1677
|
-
let e =
|
|
1678
|
-
o =
|
|
1812
|
+
let e = V.fastStringToRange(a, Pn), n = e.colStart, r = t.r, i = r.colStart;
|
|
1813
|
+
o = r ? n - i : n, r && E && (s = _(r, E, e));
|
|
1679
1814
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1815
|
+
r.extent && (r.extent.sorts ??= []).push(s);
|
|
1816
|
+
let c = { ...T }, l = be(e.getAttribute("sortBy"));
|
|
1817
|
+
l && (c.sortOn = l);
|
|
1818
|
+
let u = m(e);
|
|
1819
|
+
u && (c.style = u), e.copyToObject(c, "iconSet", $), e.copyToObject(c, "customList", $), c.reverse = e.getAttribute("descending", Z) ?? !1;
|
|
1820
|
+
let d = {
|
|
1683
1821
|
index: o,
|
|
1684
|
-
criteria:
|
|
1822
|
+
criteria: c
|
|
1685
1823
|
};
|
|
1686
|
-
i.push(
|
|
1824
|
+
i.push(d);
|
|
1687
1825
|
}
|
|
1688
1826
|
});
|
|
1689
|
-
let
|
|
1690
|
-
x = e.getSource(), e.copyTo("topLeft", $, "topLeftCell");
|
|
1691
|
-
let t =
|
|
1692
|
-
n === null || t || (e.getSource().gridLineColor = "index" + parseFloat(n)), e.copyTo("showZeros", Z), e.copyTo("showFormulas", Z), e.copyTo("zoomScale", Q), e.copyTo("
|
|
1827
|
+
let ue = (e) => {
|
|
1828
|
+
x = e.getSource(), ne = "topLeft", e.copyTo("topLeft", $, "topLeftCell");
|
|
1829
|
+
let t = te(e.getAttribute("defaultGridColor")), n = e.getAttribute("colorId");
|
|
1830
|
+
n === null || t || (e.getSource().gridLineColor = "index" + parseFloat(n)), e.copyTo("showZeros", Z), e.copyTo("showFormulas", Z), e.copyTo("zoomScale", Q), e.copyTo("viewMode", $, "view");
|
|
1831
|
+
let r = {};
|
|
1832
|
+
for (let [t, n] of Ee) {
|
|
1833
|
+
let i = e.getAttribute(n, Q);
|
|
1834
|
+
i && (r[t] = Math.min(400, Math.max(10, i)));
|
|
1835
|
+
}
|
|
1836
|
+
Object.keys(r).length > 0 && (e.getSource().zoomScales = r), e.copyTo("showRuler", Z), e.copyTo("showWhitespace", Z, "showWhiteSpace"), e.copyTo("windowProtection", Z), e.copyTo("showRowHeaders", Z, "showRowColHeaders"), e.copyTo("showColumnHeaders", Z, "showRowColHeaders"), e.copyTo("showRowGridlines", Z, "showGridLines"), e.copyTo("showColumnGridlines", Z, "showGridLines"), e.copyTo("rightToLeft", Z), e.copyTo("showOutlineSymbols", Z);
|
|
1693
1837
|
};
|
|
1694
1838
|
p.registerVisitor({
|
|
1695
1839
|
from: "sheetView",
|
|
1696
1840
|
to: "view",
|
|
1697
1841
|
openTag: (e) => {
|
|
1698
|
-
|
|
1842
|
+
ue(e);
|
|
1699
1843
|
},
|
|
1700
1844
|
closeTag: () => {
|
|
1701
1845
|
x = null;
|
|
@@ -1710,28 +1854,41 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1710
1854
|
from: "customSheetView",
|
|
1711
1855
|
to: [],
|
|
1712
1856
|
openTag: (e) => {
|
|
1713
|
-
|
|
1857
|
+
k = !0, ue(e);
|
|
1714
1858
|
},
|
|
1715
1859
|
closeTag: () => {
|
|
1716
|
-
x = null;
|
|
1860
|
+
k = !1, x = null;
|
|
1717
1861
|
}
|
|
1718
1862
|
}), p.registerVisitor({
|
|
1719
1863
|
from: "selection",
|
|
1720
|
-
to:
|
|
1864
|
+
to: null,
|
|
1721
1865
|
openTag: (e) => {
|
|
1722
1866
|
if (!x) return;
|
|
1723
|
-
e.
|
|
1724
|
-
|
|
1725
|
-
|
|
1867
|
+
let t = e.getAttribute("activeCell")?.replace(/\$/g, ""), n = e.getAttribute("sqref")?.replace(/\$/g, ""), r = e.getAttribute("pane") ?? "topLeft";
|
|
1868
|
+
if (r !== ne) {
|
|
1869
|
+
let e = x.freezePanes;
|
|
1870
|
+
if (e && t) {
|
|
1871
|
+
let i = { activeCell: t };
|
|
1872
|
+
n && n !== t && (i.sqref = n), (e.paneSelections ??= {})[r] = i;
|
|
1873
|
+
}
|
|
1874
|
+
return;
|
|
1875
|
+
}
|
|
1876
|
+
let i = {};
|
|
1877
|
+
t && (i.cell = t);
|
|
1878
|
+
let a = e.getAttribute("activeCellId", Q);
|
|
1879
|
+
a !== null && (i.rangeIndex = a), n && n !== t && (i.ranges = n.trim().split(/\s+/)), x.selection = i;
|
|
1726
1880
|
}
|
|
1727
1881
|
}), p.registerVisitor({
|
|
1728
1882
|
from: "pane",
|
|
1729
1883
|
to: null,
|
|
1730
1884
|
openTag: (e) => {
|
|
1731
|
-
if (x
|
|
1885
|
+
if (!x) return;
|
|
1886
|
+
ne = e.getAttribute("activePane") ?? "topLeft";
|
|
1887
|
+
let t = e.getAttribute("state");
|
|
1888
|
+
if (t === "frozen" || t === "frozenSplit") {
|
|
1732
1889
|
let t = {};
|
|
1733
1890
|
x.freezePanes = t, e.copyToObject(t, "topLeft", $, "topLeftCell");
|
|
1734
|
-
let n = (x.topLeft ?
|
|
1891
|
+
let n = (x.topLeft ? V.fastStringToCell(x.topLeft) : void 0) ?? {
|
|
1735
1892
|
colIndex: 0,
|
|
1736
1893
|
rowIndex: 0
|
|
1737
1894
|
}, r = {
|
|
@@ -1743,7 +1900,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1743
1900
|
colIndex: n.colIndex + r.colIndex,
|
|
1744
1901
|
rowIndex: n.rowIndex + r.rowIndex
|
|
1745
1902
|
};
|
|
1746
|
-
t.coords =
|
|
1903
|
+
t.coords = V.cellToString(i);
|
|
1747
1904
|
}
|
|
1748
1905
|
}
|
|
1749
1906
|
}), p.registerVisitor({
|
|
@@ -1751,19 +1908,27 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1751
1908
|
transparent: !0,
|
|
1752
1909
|
openTag: (t) => {
|
|
1753
1910
|
let n = t.getAttribute("codeName");
|
|
1754
|
-
n && (e.codeName = n), !1 === t.getAttribute("enableFormatConditionsCalculation", Z) && (e.conditionalFormatCalculation = !1);
|
|
1911
|
+
n && (e.codeName = n), !1 === t.getAttribute("enableFormatConditionsCalculation", Z) && (e.conditionalFormatCalculation = !1), !0 === t.getAttribute("transitionEvaluation", Z) && (e.transitionFormulaEvaluation = !0), !0 === t.getAttribute("transitionEntry", Z) && (e.transitionFormulaEntry = !0), !1 === t.getAttribute("published", Z) && (e.excludeFromPublishing = !0);
|
|
1912
|
+
let r = {};
|
|
1913
|
+
!0 === t.getAttribute("syncHorizontal", Z) && (r.horizontal = !0), !0 === t.getAttribute("syncVertical", Z) && (r.vertical = !0);
|
|
1914
|
+
let i = t.getAttribute("syncRef");
|
|
1915
|
+
i && (r.anchor = i), Object.keys(r).length > 0 && (e.syncScroll = r);
|
|
1755
1916
|
}
|
|
1756
1917
|
}), p.registerVisitor({
|
|
1757
1918
|
from: "tabColor",
|
|
1758
1919
|
to: null,
|
|
1759
1920
|
openTag: (t) => {
|
|
1760
|
-
let n =
|
|
1921
|
+
let n = D((e) => t.getAttribute(e));
|
|
1761
1922
|
n && (e.tabColor = n);
|
|
1762
1923
|
}
|
|
1763
|
-
})
|
|
1924
|
+
});
|
|
1925
|
+
let k = !1, A = () => e.pageLayout ??= {};
|
|
1926
|
+
p.registerVisitor({
|
|
1764
1927
|
from: "pageSetUpPr",
|
|
1765
|
-
to:
|
|
1766
|
-
openTag: (e) => {
|
|
1928
|
+
to: null,
|
|
1929
|
+
openTag: (e) => {
|
|
1930
|
+
!0 === e.getAttribute("fitToPage", Z) && (A().fitToPage = !0), !1 === e.getAttribute("autoPageBreaks", Z) && (A().hideAutoPageBreaks = !0);
|
|
1931
|
+
}
|
|
1767
1932
|
}), p.registerVisitor({
|
|
1768
1933
|
from: "outlinePr",
|
|
1769
1934
|
to: null,
|
|
@@ -1779,26 +1944,114 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1779
1944
|
}
|
|
1780
1945
|
}), p.registerVisitor({
|
|
1781
1946
|
from: "pageMargins",
|
|
1782
|
-
to:
|
|
1947
|
+
to: null,
|
|
1783
1948
|
openTag: (e) => {
|
|
1784
|
-
|
|
1949
|
+
if (k) return;
|
|
1950
|
+
let t = (t, n) => e.getAttribute(t, $t) ?? n, n = {
|
|
1951
|
+
left: t("left", .7),
|
|
1952
|
+
right: t("right", .7),
|
|
1953
|
+
top: t("top", .75),
|
|
1954
|
+
bottom: t("bottom", .75),
|
|
1955
|
+
header: t("header", .3),
|
|
1956
|
+
footer: t("footer", .3)
|
|
1957
|
+
};
|
|
1958
|
+
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (A().margins = n);
|
|
1785
1959
|
}
|
|
1786
1960
|
}), p.registerVisitor({
|
|
1787
1961
|
from: "pageSetup",
|
|
1788
|
-
to:
|
|
1962
|
+
to: null,
|
|
1789
1963
|
openTag: (e) => {
|
|
1790
|
-
|
|
1964
|
+
if (k) return;
|
|
1965
|
+
let n = A(), r = (t) => e.getAttribute(t, Q) ?? void 0, i = (t) => e.getAttribute(t, Z), a = e.getAttribute("orientation");
|
|
1966
|
+
a !== "landscape" && a !== "portrait" || (n.orientation = a);
|
|
1967
|
+
for (let e of [
|
|
1968
|
+
"paperSize",
|
|
1969
|
+
"scale",
|
|
1970
|
+
"fitToWidth",
|
|
1971
|
+
"fitToHeight",
|
|
1972
|
+
"firstPageNumber",
|
|
1973
|
+
"horizontalDpi",
|
|
1974
|
+
"verticalDpi",
|
|
1975
|
+
"copies"
|
|
1976
|
+
]) {
|
|
1977
|
+
let t = r(e);
|
|
1978
|
+
t !== void 0 && (n[e] = t);
|
|
1979
|
+
}
|
|
1980
|
+
let o = e.getAttribute("paperHeight");
|
|
1981
|
+
o && (n.paperHeight = o);
|
|
1982
|
+
let s = e.getAttribute("paperWidth");
|
|
1983
|
+
s && (n.paperWidth = s), e.getAttribute("pageOrder") === "overThenDown" && (n.printOrder = "overThenDown"), !0 === i("blackAndWhite") && (n.blackAndWhite = !0), !0 === i("draft") && (n.draftMode = !0), !0 === i("useFirstPageNumber") && (n.useFirstPageNumber = !0), !1 === i("usePrinterDefaults") && (n.ignorePrinterDefaults = !0);
|
|
1984
|
+
let c = e.getAttribute("cellComments"), l = N.find(([e]) => e === c)?.[1];
|
|
1985
|
+
l && (n.printComments = l);
|
|
1986
|
+
let u = e.getAttribute("errors"), d = S.find(([e]) => e === u)?.[1];
|
|
1987
|
+
d && (n.printErrors = d);
|
|
1988
|
+
let f = e.getAttribute("r:id"), p = f ? t(f, "part") : null;
|
|
1989
|
+
p && (n.printerSettings = p);
|
|
1791
1990
|
}
|
|
1792
1991
|
}), p.registerVisitor({
|
|
1793
1992
|
from: "printOptions",
|
|
1794
|
-
to:
|
|
1993
|
+
to: null,
|
|
1994
|
+
openTag: (e) => {
|
|
1995
|
+
if (k) return;
|
|
1996
|
+
let t = (t) => !0 === e.getAttribute(t, Z);
|
|
1997
|
+
t("horizontalCentered") && (A().centerHorizontally = !0), t("verticalCentered") && (A().centerVertically = !0), t("gridLines") && (A().printGridlines = !0), t("headings") && (A().printHeadings = !0);
|
|
1998
|
+
}
|
|
1999
|
+
}), p.registerVisitor({
|
|
2000
|
+
from: "headerFooter",
|
|
2001
|
+
to: {},
|
|
2002
|
+
openTag: (e) => {
|
|
2003
|
+
if (k) return;
|
|
2004
|
+
let t = {}, n = (t) => e.getAttribute(t, Z);
|
|
2005
|
+
!0 === n("differentOddEven") && (t.differentOddEven = !0), !0 === n("differentFirst") && (t.differentFirst = !0), !1 === n("scaleWithDoc") && (t.ignoreSheetScale = !0), !1 === n("alignWithMargins") && (t.ignoreSheetMargins = !0), Object.keys(t).length > 0 && (A().headerFooter = t);
|
|
2006
|
+
}
|
|
2007
|
+
});
|
|
2008
|
+
for (let e of M) p.registerVisitor({
|
|
2009
|
+
from: e,
|
|
2010
|
+
to: {},
|
|
2011
|
+
text: (t, n) => {
|
|
2012
|
+
if (k) return;
|
|
2013
|
+
let r = A(), i = r.headerFooter ??= {};
|
|
2014
|
+
i[e] = (i[e] ?? "") + l(t);
|
|
2015
|
+
}
|
|
2016
|
+
});
|
|
2017
|
+
let me = "rowBreaks";
|
|
2018
|
+
for (let [e, t] of [["rowBreaks", "rowBreaks"], ["colBreaks", "columnBreaks"]]) p.registerVisitor({
|
|
2019
|
+
from: e,
|
|
2020
|
+
to: {},
|
|
2021
|
+
openTag: () => {
|
|
2022
|
+
me = t;
|
|
2023
|
+
}
|
|
2024
|
+
});
|
|
2025
|
+
p.registerVisitor({
|
|
2026
|
+
from: "brk",
|
|
2027
|
+
to: null,
|
|
1795
2028
|
openTag: (e) => {
|
|
1796
|
-
|
|
2029
|
+
if (k) return;
|
|
2030
|
+
let t = e.getAttribute("id", Q);
|
|
2031
|
+
if (t == null) return;
|
|
2032
|
+
let n = { index: t }, r = e.getAttribute("min", Q);
|
|
2033
|
+
r != null && (n.min = r);
|
|
2034
|
+
let i = e.getAttribute("max", Q);
|
|
2035
|
+
i != null && (n.max = i), !0 !== e.getAttribute("man", Z) && (n.automatic = !0), !0 === e.getAttribute("pt", Z) && (n.pivot = !0);
|
|
2036
|
+
let a = A();
|
|
2037
|
+
(a[me] ??= []).push(n);
|
|
1797
2038
|
}
|
|
1798
2039
|
}), p.registerVisitor({
|
|
1799
|
-
from: "
|
|
1800
|
-
|
|
1801
|
-
|
|
2040
|
+
from: "ignoredErrors",
|
|
2041
|
+
transparent: !0
|
|
2042
|
+
}), p.registerVisitor({
|
|
2043
|
+
from: "ignoredError",
|
|
2044
|
+
to: null,
|
|
2045
|
+
openTag: (t) => {
|
|
2046
|
+
let n = t.getAttribute("sqref");
|
|
2047
|
+
if (!n) return;
|
|
2048
|
+
let r = [];
|
|
2049
|
+
for (let e of c) !0 === t.getAttribute(e, Z) && r.push(e);
|
|
2050
|
+
if (r.length !== 0) for (let t of n.trim().split(/\s+/)) (e.ignoredErrors ??= []).push({
|
|
2051
|
+
r: t,
|
|
2052
|
+
v: r
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
1802
2055
|
}), p.registerVisitor({
|
|
1803
2056
|
from: "mergeCells",
|
|
1804
2057
|
to: "merges",
|
|
@@ -1808,11 +2061,20 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1808
2061
|
}), p.registerVisitor({
|
|
1809
2062
|
from: "dataValidations",
|
|
1810
2063
|
to: "validations",
|
|
1811
|
-
openTag: (
|
|
1812
|
-
|
|
2064
|
+
openTag: (t) => {
|
|
2065
|
+
t.setSource([]);
|
|
2066
|
+
let n = {};
|
|
2067
|
+
!0 === t.getAttribute("disablePrompts", Z) && (n.disablePrompts = !0);
|
|
2068
|
+
let r = t.getAttribute("xWindow", Q);
|
|
2069
|
+
r !== null && (n.windowX = r);
|
|
2070
|
+
let i = t.getAttribute("yWindow", Q);
|
|
2071
|
+
i !== null && (n.windowY = i), Object.keys(n).length > 0 && (e.validationSettings = {
|
|
2072
|
+
...e.validationSettings,
|
|
2073
|
+
...n
|
|
2074
|
+
});
|
|
1813
2075
|
}
|
|
1814
2076
|
});
|
|
1815
|
-
let
|
|
2077
|
+
let he = {
|
|
1816
2078
|
from: "dataValidation",
|
|
1817
2079
|
to: [],
|
|
1818
2080
|
openTag: (e) => {
|
|
@@ -1831,23 +2093,23 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1831
2093
|
closeTag: (e) => {
|
|
1832
2094
|
let t = e.getSource();
|
|
1833
2095
|
if (!t?.rule) return;
|
|
1834
|
-
let n = v(t.rule,
|
|
2096
|
+
let n = v(t.rule, s);
|
|
1835
2097
|
n && (e.getAttribute("allowBlank", Z) && (n.includeBlanks = !0), t.v.condition = n), delete t.rule;
|
|
1836
2098
|
}
|
|
1837
2099
|
};
|
|
1838
|
-
p.registerVisitor(
|
|
2100
|
+
p.registerVisitor(he), p.registerVisitor({
|
|
1839
2101
|
from: "formula1",
|
|
1840
2102
|
to: {},
|
|
1841
2103
|
text: (e, t) => {
|
|
1842
2104
|
let n = t.getParent().rule;
|
|
1843
|
-
n?.type && (n.formula1 =
|
|
2105
|
+
n?.type && (n.formula1 = ie(b(e), n.type));
|
|
1844
2106
|
}
|
|
1845
2107
|
}), p.registerVisitor({
|
|
1846
2108
|
from: "formula2",
|
|
1847
2109
|
to: {},
|
|
1848
2110
|
text: (e, t) => {
|
|
1849
2111
|
let n = t.getParent().rule;
|
|
1850
|
-
n?.type && (n.formula2 =
|
|
2112
|
+
n?.type && (n.formula2 = ie(b(e), n.type));
|
|
1851
2113
|
}
|
|
1852
2114
|
}), p.registerVisitor({
|
|
1853
2115
|
from: "picture",
|
|
@@ -1859,7 +2121,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1859
2121
|
e.getSource().resId = r;
|
|
1860
2122
|
}
|
|
1861
2123
|
});
|
|
1862
|
-
let
|
|
2124
|
+
let ge = {
|
|
1863
2125
|
from: "slicer",
|
|
1864
2126
|
to: {},
|
|
1865
2127
|
openTag: (e) => {
|
|
@@ -1871,8 +2133,8 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1871
2133
|
for (let e of a) i.slicers[e] = r[e];
|
|
1872
2134
|
}
|
|
1873
2135
|
};
|
|
1874
|
-
p.registerVisitor(
|
|
1875
|
-
let
|
|
2136
|
+
p.registerVisitor(ge);
|
|
2137
|
+
let _e = (e, t) => ({
|
|
1876
2138
|
from: e,
|
|
1877
2139
|
to: {},
|
|
1878
2140
|
openTag: (e) => {
|
|
@@ -1884,8 +2146,8 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1884
2146
|
closeTag: (e) => {
|
|
1885
2147
|
t(String(e.getSource() ?? ""), e);
|
|
1886
2148
|
}
|
|
1887
|
-
}),
|
|
1888
|
-
|
|
2149
|
+
}), ve = /* @__PURE__ */ new Map();
|
|
2150
|
+
ve.set("dataValidations", {
|
|
1889
2151
|
from: "dataValidations",
|
|
1890
2152
|
to: "validations",
|
|
1891
2153
|
openTag: (e) => {
|
|
@@ -1895,15 +2157,15 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1895
2157
|
closeTag: (e) => {
|
|
1896
2158
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
1897
2159
|
}
|
|
1898
|
-
}),
|
|
1899
|
-
...
|
|
2160
|
+
}), ve.set("dataValidation", {
|
|
2161
|
+
...he,
|
|
1900
2162
|
closeTag: (e) => {
|
|
1901
|
-
|
|
2163
|
+
he.closeTag(e);
|
|
1902
2164
|
let t = e.getSource();
|
|
1903
2165
|
t && !t.r && (e.warn("x14 dataValidation with no xm:sqref was dropped."), e.setSource(void 0));
|
|
1904
2166
|
}
|
|
1905
2167
|
});
|
|
1906
|
-
let
|
|
2168
|
+
let ye = (e) => ({
|
|
1907
2169
|
from: e,
|
|
1908
2170
|
to: {},
|
|
1909
2171
|
openTag: (t) => {
|
|
@@ -1913,18 +2175,18 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1913
2175
|
});
|
|
1914
2176
|
}
|
|
1915
2177
|
});
|
|
1916
|
-
|
|
2178
|
+
ve.set("formula1", ye("formula1")), ve.set("formula2", ye("formula2")), ve.set("f", _e("f", (e, t) => {
|
|
1917
2179
|
let n = t.getParent(), r = n?.rule;
|
|
1918
|
-
r && (r[n.key] =
|
|
1919
|
-
})),
|
|
2180
|
+
r && (r[n.key] = ie(b(e), r.type));
|
|
2181
|
+
})), ve.set("sqref", _e("sqref", (e, t) => {
|
|
1920
2182
|
let n = t.getParent(), r = e.trim();
|
|
1921
2183
|
n && r && (n.r = r.split(/\s+/).join(","));
|
|
1922
2184
|
}));
|
|
1923
|
-
let
|
|
1924
|
-
|
|
2185
|
+
let xe = /* @__PURE__ */ new Map(), Ce = [], I = /* @__PURE__ */ new Map();
|
|
2186
|
+
I.set("conditionalFormattings", {
|
|
1925
2187
|
from: "conditionalFormattings",
|
|
1926
2188
|
transparent: !0
|
|
1927
|
-
}),
|
|
2189
|
+
}), I.set("conditionalFormatting", {
|
|
1928
2190
|
from: "conditionalFormatting",
|
|
1929
2191
|
to: {},
|
|
1930
2192
|
openTag: (e) => {
|
|
@@ -1934,10 +2196,10 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1934
2196
|
let t = e.getSource(), n = t?.rules ?? [];
|
|
1935
2197
|
for (let e = 0; e < n.length; e++) {
|
|
1936
2198
|
let r = n[e];
|
|
1937
|
-
r.sqref = t.sqref, r.id ?
|
|
2199
|
+
r.sqref = t.sqref, r.id ? xe.set(r.id, r) : Ce.push(r);
|
|
1938
2200
|
}
|
|
1939
2201
|
}
|
|
1940
|
-
}),
|
|
2202
|
+
}), I.set("cfRule", {
|
|
1941
2203
|
from: "cfRule",
|
|
1942
2204
|
to: {},
|
|
1943
2205
|
openTag: (e) => {
|
|
@@ -1947,10 +2209,10 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1947
2209
|
let t = e.getSource();
|
|
1948
2210
|
t && e.getParent()?.rules?.push(t);
|
|
1949
2211
|
}
|
|
1950
|
-
}),
|
|
2212
|
+
}), I.set("sqref", _e("sqref", (e, t) => {
|
|
1951
2213
|
let n = t.getParent(), r = e.trim();
|
|
1952
2214
|
n && r && (n.sqref = r);
|
|
1953
|
-
})),
|
|
2215
|
+
})), I.set("dataBar", {
|
|
1954
2216
|
from: "dataBar",
|
|
1955
2217
|
to: {},
|
|
1956
2218
|
openTag: (e) => {
|
|
@@ -1959,7 +2221,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1959
2221
|
closeTag: (e) => {
|
|
1960
2222
|
e.getParent().dataBar = e.getSource();
|
|
1961
2223
|
}
|
|
1962
|
-
}),
|
|
2224
|
+
}), I.set("iconSet", {
|
|
1963
2225
|
from: "iconSet",
|
|
1964
2226
|
to: {},
|
|
1965
2227
|
openTag: (e) => {
|
|
@@ -1969,46 +2231,46 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1969
2231
|
e.getParent().iconSet = e.getSource();
|
|
1970
2232
|
}
|
|
1971
2233
|
});
|
|
1972
|
-
let
|
|
1973
|
-
|
|
2234
|
+
let L = /* @__PURE__ */ new Map();
|
|
2235
|
+
L.set("f", _e("f", (e, t) => {
|
|
1974
2236
|
let n = t.getParent();
|
|
1975
2237
|
if (!n) return;
|
|
1976
2238
|
let r = e.trim(), i = Number(r);
|
|
1977
2239
|
n.value = r.length > 0 && Number.isFinite(i) ? i : b(e);
|
|
1978
|
-
})),
|
|
2240
|
+
})), I.set("cfvo", {
|
|
1979
2241
|
from: "cfvo",
|
|
1980
2242
|
to: {},
|
|
1981
|
-
scope: () =>
|
|
2243
|
+
scope: () => L,
|
|
1982
2244
|
openTag: (e) => {
|
|
1983
2245
|
let t = e.getParent();
|
|
1984
2246
|
t.conditions ||= [];
|
|
1985
2247
|
let n = e.getSource();
|
|
1986
2248
|
t.conditions.push(n), e.copyTo("type", $), !1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
1987
2249
|
}
|
|
1988
|
-
}),
|
|
2250
|
+
}), I.set("f", _e("f", (e, t) => {
|
|
1989
2251
|
let n = t.getParent();
|
|
1990
2252
|
n && (n.formulas ??= []).push(b(e));
|
|
1991
|
-
})),
|
|
2253
|
+
})), I.set("dxf", {
|
|
1992
2254
|
from: "dxf",
|
|
1993
2255
|
to: {},
|
|
1994
2256
|
raw: !0,
|
|
1995
2257
|
closeTag: (e) => {
|
|
1996
|
-
if (!
|
|
2258
|
+
if (!g) return;
|
|
1997
2259
|
let t = e.getParent();
|
|
1998
2260
|
if (!t) return;
|
|
1999
|
-
let n =
|
|
2261
|
+
let n = g(e.getRawXml() ?? "");
|
|
2000
2262
|
n && (t.style = n);
|
|
2001
2263
|
}
|
|
2002
2264
|
});
|
|
2003
|
-
let
|
|
2265
|
+
let De = (e) => ({
|
|
2004
2266
|
from: e,
|
|
2005
2267
|
to: {},
|
|
2006
2268
|
openTag: (t) => {
|
|
2007
|
-
let n =
|
|
2269
|
+
let n = D((e) => t.getAttribute(e));
|
|
2008
2270
|
n && (t.getParent()[e] = n);
|
|
2009
2271
|
}
|
|
2010
2272
|
});
|
|
2011
|
-
|
|
2273
|
+
I.set("borderColor", De("borderColor")), I.set("negativeFillColor", De("negativeFillColor")), I.set("negativeBorderColor", De("negativeBorderColor")), I.set("axisColor", De("axisColor")), I.set("cfIcon", {
|
|
2012
2274
|
from: "cfIcon",
|
|
2013
2275
|
to: {},
|
|
2014
2276
|
openTag: (e) => {
|
|
@@ -2021,25 +2283,25 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2021
2283
|
});
|
|
2022
2284
|
}
|
|
2023
2285
|
});
|
|
2024
|
-
let
|
|
2025
|
-
|
|
2286
|
+
let Oe = /* @__PURE__ */ new Map();
|
|
2287
|
+
Oe.set("id", _e("id", (e, t) => {
|
|
2026
2288
|
let n = t.getParent(), r = e.trim();
|
|
2027
2289
|
n && r && (n.x14Id = r);
|
|
2028
2290
|
}));
|
|
2029
|
-
let
|
|
2030
|
-
|
|
2291
|
+
let ke = /* @__PURE__ */ new Map();
|
|
2292
|
+
ke.set("slicerList", {
|
|
2031
2293
|
from: "slicerList",
|
|
2032
2294
|
transparent: !0
|
|
2033
|
-
}),
|
|
2034
|
-
let
|
|
2035
|
-
[
|
|
2036
|
-
[
|
|
2037
|
-
[
|
|
2038
|
-
[
|
|
2039
|
-
[
|
|
2040
|
-
[
|
|
2041
|
-
[
|
|
2042
|
-
]),
|
|
2295
|
+
}), ke.set("slicer", ge);
|
|
2296
|
+
let R = /* @__PURE__ */ new Map([
|
|
2297
|
+
[P(le), ve],
|
|
2298
|
+
[P(pe), I],
|
|
2299
|
+
[P(j), I],
|
|
2300
|
+
[P(F), Oe],
|
|
2301
|
+
[P(C), ke],
|
|
2302
|
+
[P(Ae), ke],
|
|
2303
|
+
[P(Te), ce]
|
|
2304
|
+
]), Me = /* @__PURE__ */ new Set();
|
|
2043
2305
|
p.registerVisitor({
|
|
2044
2306
|
from: "extLst",
|
|
2045
2307
|
transparent: !0
|
|
@@ -2047,12 +2309,12 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2047
2309
|
from: "ext",
|
|
2048
2310
|
transparent: !0,
|
|
2049
2311
|
scope: (e) => {
|
|
2050
|
-
let t = e.getAttribute("uri"), n =
|
|
2051
|
-
if (
|
|
2052
|
-
if (!
|
|
2053
|
-
|
|
2054
|
-
let
|
|
2055
|
-
e.warn(
|
|
2312
|
+
let t = e.getAttribute("uri"), n = P(t), i = R.get(n);
|
|
2313
|
+
if (i) return i;
|
|
2314
|
+
if (!a.has(n) && !Me.has(n)) {
|
|
2315
|
+
Me.add(n);
|
|
2316
|
+
let i = r[n];
|
|
2317
|
+
e.warn(i ? `Extension content '${i}' (${t}) is not read; it will be lost on resave.` : `Unknown extension content (uri ${t}) is not read; it will be lost on resave.`);
|
|
2056
2318
|
}
|
|
2057
2319
|
return null;
|
|
2058
2320
|
}
|
|
@@ -2081,11 +2343,8 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2081
2343
|
i.endsWith("\\") && (i = i.substring(0, i.length - 1));
|
|
2082
2344
|
let a = e.getAttribute("location");
|
|
2083
2345
|
if (a && (i += "#" + a), !i) return void e.warn("A hyperlink has no address; it was dropped.", { onceKey: "xlsx.sheet.hyperlink.address" });
|
|
2084
|
-
let o, s = e.getAttribute("tooltip");
|
|
2085
|
-
o = s
|
|
2086
|
-
address: i,
|
|
2087
|
-
screenTip: s
|
|
2088
|
-
} : i, e.setSource({
|
|
2346
|
+
let o, s = e.getAttribute("tooltip"), c = e.getAttribute("display");
|
|
2347
|
+
s || c ? (o = { address: i }, s && (o.screenTip = s), c && (o.display = c)) : o = i, e.setSource({
|
|
2089
2348
|
r,
|
|
2090
2349
|
v: o
|
|
2091
2350
|
});
|
|
@@ -2112,19 +2371,19 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2112
2371
|
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2113
2372
|
}
|
|
2114
2373
|
});
|
|
2115
|
-
let
|
|
2374
|
+
let z = null, Ne = !1, Pe = /* @__PURE__ */ new Map(), B = {
|
|
2116
2375
|
from: "Fallback",
|
|
2117
2376
|
to: null
|
|
2118
|
-
},
|
|
2377
|
+
}, Fe = {
|
|
2119
2378
|
from: "Choice",
|
|
2120
2379
|
transparent: !0
|
|
2121
2380
|
};
|
|
2122
|
-
|
|
2381
|
+
Pe.set("Fallback", B), Pe.set("Choice", Fe), Pe.set("control", {
|
|
2123
2382
|
from: "control",
|
|
2124
2383
|
transparent: !0,
|
|
2125
2384
|
openTag: (e) => {
|
|
2126
2385
|
let n = e.getAttribute("name"), r = e.getAttribute("r:id"), i = r ? t(r, "formControl") : null;
|
|
2127
|
-
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (
|
|
2386
|
+
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (z = null);
|
|
2128
2387
|
let a = i.json, o = parseInt(e.getAttribute("shapeId") ?? "", 10);
|
|
2129
2388
|
isNaN(o) || (a.shapeId = o);
|
|
2130
2389
|
let s = {
|
|
@@ -2147,60 +2406,60 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2147
2406
|
json: a
|
|
2148
2407
|
}
|
|
2149
2408
|
};
|
|
2150
|
-
n && (s.content.name = n),
|
|
2409
|
+
n && (s.content.name = n), z = {
|
|
2151
2410
|
movable: s,
|
|
2152
2411
|
control: a
|
|
2153
2412
|
};
|
|
2154
2413
|
},
|
|
2155
2414
|
closeTag: () => {
|
|
2156
|
-
|
|
2415
|
+
z &&= (e.movables ||= [], e.movables.push(z.movable), null);
|
|
2157
2416
|
}
|
|
2158
|
-
}),
|
|
2417
|
+
}), Pe.set("controlPr", {
|
|
2159
2418
|
from: "controlPr",
|
|
2160
2419
|
transparent: !0,
|
|
2161
2420
|
raw: !0,
|
|
2162
2421
|
openTag: (e) => {
|
|
2163
|
-
if (!
|
|
2422
|
+
if (!z) return;
|
|
2164
2423
|
let t = e.getFrom().attributes ?? {}, n = {};
|
|
2165
2424
|
for (let e in t) {
|
|
2166
2425
|
let r = t[e];
|
|
2167
2426
|
n[e] = typeof r == "string" ? r : r?.value ?? "";
|
|
2168
2427
|
}
|
|
2169
|
-
|
|
2428
|
+
fe(n, z.control);
|
|
2170
2429
|
},
|
|
2171
2430
|
closeTag: (e) => {
|
|
2172
|
-
if (!
|
|
2431
|
+
if (!z) return;
|
|
2173
2432
|
let t = ((e) => {
|
|
2174
2433
|
let t = /<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);
|
|
2175
2434
|
if (!t) return null;
|
|
2176
2435
|
let n = t[2], r = (e) => RegExp(`<(?:[\\w.-]+:)?${e}\\b[^>]*>([\\s\\S]*?)<\\/(?:[\\w.-]+:)?${e}>`).exec(n)?.[1], i = t[1], a = /\bmoveWithCells="(?:1|true)"/.test(i), o = /\bsizeWithCells="(?:1|true)"/.test(i);
|
|
2177
2436
|
return {
|
|
2178
2437
|
anchor: {
|
|
2179
|
-
tl:
|
|
2180
|
-
br:
|
|
2438
|
+
tl: Tn(r("from")),
|
|
2439
|
+
br: Tn(r("to"))
|
|
2181
2440
|
},
|
|
2182
2441
|
anchorType: a ? o ? "twoCell" : "oneCell" : "absolute",
|
|
2183
2442
|
rest: (e.slice(0, t.index) + e.slice(t.index + t[0].length)).trim()
|
|
2184
2443
|
};
|
|
2185
2444
|
})(e.getRawXml() ?? "");
|
|
2186
|
-
t ? (
|
|
2445
|
+
t ? (z.movable.anchor = t.anchor, t.anchorType !== "twoCell" && (z.movable.anchorType = t.anchorType), t.rest && (z.control.xml = t.rest)) : Ne || (Ne = !0, e.warn("A form control has no anchor; it is placed at the top left of the sheet."));
|
|
2187
2446
|
}
|
|
2188
2447
|
});
|
|
2189
|
-
let
|
|
2448
|
+
let Ie = {
|
|
2190
2449
|
from: "controls",
|
|
2191
2450
|
transparent: !0,
|
|
2192
|
-
scope: () =>
|
|
2451
|
+
scope: () => Pe
|
|
2193
2452
|
};
|
|
2194
|
-
p.registerVisitor(
|
|
2195
|
-
let
|
|
2196
|
-
["Choice",
|
|
2197
|
-
["Fallback",
|
|
2198
|
-
["controls",
|
|
2453
|
+
p.registerVisitor(Ie);
|
|
2454
|
+
let Le = /* @__PURE__ */ new Map([
|
|
2455
|
+
["Choice", Fe],
|
|
2456
|
+
["Fallback", B],
|
|
2457
|
+
["controls", Ie]
|
|
2199
2458
|
]);
|
|
2200
2459
|
p.registerVisitor({
|
|
2201
2460
|
from: "AlternateContent",
|
|
2202
2461
|
transparent: !0,
|
|
2203
|
-
scope: () =>
|
|
2462
|
+
scope: () => Le
|
|
2204
2463
|
}), p.registerVisitor({
|
|
2205
2464
|
from: "tableParts",
|
|
2206
2465
|
to: "tables",
|
|
@@ -2217,26 +2476,26 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2217
2476
|
r ? e.setSource(r) : e.warn("A table part is missing; the table was not imported.", { onceKey: "xlsx.sheet.table.missing" });
|
|
2218
2477
|
}
|
|
2219
2478
|
});
|
|
2220
|
-
let
|
|
2221
|
-
t.conditions?.length && (e.stops =
|
|
2222
|
-
},
|
|
2223
|
-
t.conditions?.length && (e.stops =
|
|
2224
|
-
},
|
|
2479
|
+
let Re = (e, t) => {
|
|
2480
|
+
t.conditions?.length && (e.stops = re(t)), t.minLength !== void 0 && (e.minLength = t.minLength), t.maxLength !== void 0 && (e.maxLength = t.maxLength), (t.gradient ?? 1) && (e.gradient = !0), t.border && t.borderColor && (e.borderColor = t.borderColor), !t.negativeBarColorSameAsPositive && t.negativeFillColor && (e.negativeFillColor = t.negativeFillColor), !(t.negativeBarBorderColorSameAsPositive ?? 1) && t.negativeBorderColor && (e.negativeBorderColor = t.negativeBorderColor), t.axisColor && (e.axisColor = t.axisColor), t.axisPosition !== "middle" && t.axisPosition !== "none" || (e.axisPosition = t.axisPosition), t.direction !== "leftToRight" && t.direction !== "rightToLeft" || (e.direction = t.direction);
|
|
2481
|
+
}, ze = (e, t) => {
|
|
2482
|
+
t.conditions?.length && (e.stops = re(t)), t.iconSet && t.iconSet !== e.iconSet && (e.iconSet = t.iconSet), t.icons?.length && (e.icon = t.icons), t.reverse !== void 0 && (e.reverse = t.reverse), t.showValue !== void 0 && (e.showValue = t.showValue);
|
|
2483
|
+
}, W = (e) => {
|
|
2225
2484
|
if (!e.sqref) return null;
|
|
2226
2485
|
let t = e.sqref.split(/\s+/).join(",");
|
|
2227
2486
|
if (e.type === "iconSet") {
|
|
2228
2487
|
if (!e.iconSet) return null;
|
|
2229
2488
|
let n = {
|
|
2230
|
-
type:
|
|
2489
|
+
type: U.ScaleType.IconSet,
|
|
2231
2490
|
stops: []
|
|
2232
2491
|
};
|
|
2233
|
-
return
|
|
2492
|
+
return ze(n, e.iconSet), {
|
|
2234
2493
|
r: t,
|
|
2235
2494
|
v: { scale: n },
|
|
2236
2495
|
priority: e.priority
|
|
2237
2496
|
};
|
|
2238
2497
|
}
|
|
2239
|
-
let n =
|
|
2498
|
+
let n = O(e, s);
|
|
2240
2499
|
if (!n) return null;
|
|
2241
2500
|
let r = { condition: n };
|
|
2242
2501
|
return e.style && (r.style = e.style), e.stopIfTrue && (r.stopIfTrue = !0), {
|
|
@@ -2255,20 +2514,20 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2255
2514
|
let t = n[e], r = t.x14Id;
|
|
2256
2515
|
if (!r) continue;
|
|
2257
2516
|
delete t.x14Id;
|
|
2258
|
-
let i =
|
|
2517
|
+
let i = xe.get(r);
|
|
2259
2518
|
if (!i) continue;
|
|
2260
|
-
|
|
2519
|
+
xe.delete(r);
|
|
2261
2520
|
let a = t.v?.scale;
|
|
2262
|
-
i.dataBar && a?.type ===
|
|
2521
|
+
i.dataBar && a?.type === U.ScaleType.DataBar ? Re(a, i.dataBar) : i.iconSet && a?.type === U.ScaleType.IconSet && ze(a, i.iconSet);
|
|
2263
2522
|
}
|
|
2264
|
-
let r = [...
|
|
2523
|
+
let r = [...xe.values(), ...Ce], i = /* @__PURE__ */ new Set(), a = 0;
|
|
2265
2524
|
for (let e = 0; e < r.length; e++) {
|
|
2266
|
-
let o =
|
|
2525
|
+
let o = W(r[e]);
|
|
2267
2526
|
o ? (n || (n = [], t.conditionals = n), n.push(o)) : (i.add(r[e].type ?? "unknown"), a++);
|
|
2268
2527
|
}
|
|
2269
2528
|
if (a > 0) {
|
|
2270
2529
|
let e = [...i].map((e) => `'${e}'`).join(", ");
|
|
2271
|
-
|
|
2530
|
+
s?.(a === 1 ? `An x14-only conditional formatting rule (type ${e}) is not read and will be lost on resave.` : `${a} x14-only conditional formatting rules (types ${e}) are not read and will be lost on resave.`);
|
|
2272
2531
|
}
|
|
2273
2532
|
if (n) {
|
|
2274
2533
|
n.length > 1 && n.sort((e, t) => (e.priority ?? 1 / 0) - (t.priority ?? 1 / 0));
|
|
@@ -2301,13 +2560,13 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2301
2560
|
to: "protection",
|
|
2302
2561
|
openTag: (e) => {
|
|
2303
2562
|
let t = e.getSource();
|
|
2304
|
-
for (let n of
|
|
2563
|
+
for (let n of w) {
|
|
2305
2564
|
let r = e.hasAttribute(n.attribute) ? e.getAttribute(n.attribute) : null;
|
|
2306
|
-
t[n.key] =
|
|
2565
|
+
t[n.key] = je(n, r);
|
|
2307
2566
|
}
|
|
2308
2567
|
if (t.sheet) return;
|
|
2309
2568
|
let n = {};
|
|
2310
|
-
e.copyToObject(n, "hash", $, "hashValue"), e.copyToObject(n, "algorithm", $, "algorithmName"), e.copyToObject(n, "salt", $, "saltValue"), e.copyToObject(n, "spinCount", Q), Object.keys(n).length > 0 && (e.getSource().password = n);
|
|
2569
|
+
e.copyToObject(n, "hash", $, "hashValue"), e.copyToObject(n, "algorithm", $, "algorithmName"), e.copyToObject(n, "salt", $, "saltValue"), e.copyToObject(n, "spinCount", Q), e.copyToObject(n, "legacyHash", $, "password"), Object.keys(n).length > 0 && (e.getSource().password = n);
|
|
2311
2570
|
}
|
|
2312
2571
|
}), p.registerVisitor({
|
|
2313
2572
|
from: "protectedRanges",
|
|
@@ -2327,7 +2586,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2327
2586
|
};
|
|
2328
2587
|
e.copyToObject(n, "name"), e.copyToObject(n, "securityDescriptor");
|
|
2329
2588
|
let i = {};
|
|
2330
|
-
e.copyToObject(i, "hash", $, "hashValue"), e.copyToObject(i, "algorithm", $, "algorithmName"), e.copyToObject(i, "salt", $, "saltValue"), e.copyToObject(i, "spinCount", Q), Object.keys(i).length > 0 && (n.password = i), e.setSource(r);
|
|
2589
|
+
e.copyToObject(i, "hash", $, "hashValue"), e.copyToObject(i, "algorithm", $, "algorithmName"), e.copyToObject(i, "salt", $, "saltValue"), e.copyToObject(i, "spinCount", Q), e.copyToObject(i, "legacyHash", $, "password"), Object.keys(i).length > 0 && (n.password = i), e.setSource(r);
|
|
2331
2590
|
},
|
|
2332
2591
|
closeTag: (e) => {
|
|
2333
2592
|
let t = e.getSource();
|
|
@@ -2337,9 +2596,11 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2337
2596
|
from: "sheetFormatPr",
|
|
2338
2597
|
to: "sheetFormatPr",
|
|
2339
2598
|
openTag: (t) => {
|
|
2340
|
-
t.copyToObject(e, "defaultColSize",
|
|
2599
|
+
t.copyToObject(e, "defaultColSize", $t, "defaultColWidth");
|
|
2341
2600
|
let n = t.getAttribute("customHeight");
|
|
2342
|
-
n !== "1" && n !== "true" || t.copyToObject(e, "defaultRowSize",
|
|
2601
|
+
n !== "1" && n !== "true" || t.copyToObject(e, "defaultRowSize", $t, "defaultRowHeight");
|
|
2602
|
+
let r = t.getAttribute("baseColWidth", Q);
|
|
2603
|
+
r && r !== 8 && (e.baseColSize = r), h = !!t.getAttribute("zeroHeight", Z);
|
|
2343
2604
|
}
|
|
2344
2605
|
}), p.registerVisitor({
|
|
2345
2606
|
from: "cols",
|
|
@@ -2352,9 +2613,9 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2352
2613
|
to: [],
|
|
2353
2614
|
openTag: (e) => {
|
|
2354
2615
|
let t = e.getSource(), n = e.getAttribute("min"), r = e.getAttribute("max"), i = n === void 0 ? 0 : parseInt(n) - 1, a = r === void 0 ? i : parseInt(r) - 1;
|
|
2355
|
-
t.r =
|
|
2616
|
+
t.r = V.runToString(i, a, !0);
|
|
2356
2617
|
let o = {};
|
|
2357
|
-
t.v = o, e.copyToObject(o, "sz",
|
|
2618
|
+
t.v = o, e.copyToObject(o, "sz", $t, "width"), e.copyToObject(o, "csz", Z, "customWidth"), e.copyToObject(o, "h", Z, "hidden"), e.copyToObject(o, "l", Q, "outlineLevel"), e.copyToObject(o, "cl", Z, "collapsed"), e.getAttribute("bestFit", Z) && (o.bf = !0), e.copyToObject(o, "s", Q, "style");
|
|
2358
2619
|
}
|
|
2359
2620
|
}), p.registerVisitor({
|
|
2360
2621
|
from: "oleObjects",
|
|
@@ -2363,31 +2624,39 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2363
2624
|
e.warn("'OLE Objects' are not supported.");
|
|
2364
2625
|
}
|
|
2365
2626
|
});
|
|
2366
|
-
let
|
|
2627
|
+
let Be = !1, He = !1, Ue = 0, We = "", Ke = (e) => {
|
|
2367
2628
|
let t = e.indexOf(":");
|
|
2368
2629
|
return t === -1 ? e : e.slice(t + 1);
|
|
2369
|
-
};
|
|
2370
|
-
return
|
|
2630
|
+
}, Je = new xn();
|
|
2631
|
+
return In(ee, e, p.createEventHandler(e, o, s), s, d, {
|
|
2371
2632
|
onOpenTag: (e) => {
|
|
2372
|
-
|
|
2373
|
-
let t =
|
|
2374
|
-
t === "t" || t === "v" ?
|
|
2633
|
+
Be = !0;
|
|
2634
|
+
let t = Ke(e.name);
|
|
2635
|
+
t === "t" || t === "v" ? Ue === 0 && (He = !0) : t === "rPh" || t === "phoneticPr" ? Ue++ : Ue === 0 && Je.onOpenTag(t, e.attributes);
|
|
2375
2636
|
},
|
|
2376
2637
|
onText: (e) => {
|
|
2377
|
-
|
|
2638
|
+
He && (We += e, Je.onText(e));
|
|
2378
2639
|
},
|
|
2379
2640
|
onCloseTag: (e) => {
|
|
2380
|
-
let t =
|
|
2381
|
-
t === "t" || t === "v" ?
|
|
2641
|
+
let t = Ke(e.name);
|
|
2642
|
+
t === "t" || t === "v" ? He = !1 : t === "rPh" || t === "phoneticPr" ? Ue > 0 && Ue-- : Je.onCloseTag(t);
|
|
2382
2643
|
},
|
|
2383
2644
|
onEnd: () => {
|
|
2384
|
-
if (!
|
|
2385
|
-
let e =
|
|
2386
|
-
|
|
2645
|
+
if (!Be) return;
|
|
2646
|
+
let e = Je.take();
|
|
2647
|
+
Be = !1, He = !1, Ue = 0;
|
|
2648
|
+
let t = l(We);
|
|
2649
|
+
return We = "", e ? {
|
|
2650
|
+
t: "r",
|
|
2651
|
+
v: {
|
|
2652
|
+
type: "richText",
|
|
2653
|
+
data: { runs: Sn(e, f?.get(kn)) }
|
|
2654
|
+
}
|
|
2655
|
+
} : n(t);
|
|
2387
2656
|
},
|
|
2388
2657
|
onError: (e) => {}
|
|
2389
|
-
},
|
|
2390
|
-
},
|
|
2658
|
+
}, f, n, () => h);
|
|
2659
|
+
}, jn = class {
|
|
2391
2660
|
static {
|
|
2392
2661
|
this.Collapsed = 1;
|
|
2393
2662
|
}
|
|
@@ -2418,66 +2687,84 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2418
2687
|
static {
|
|
2419
2688
|
this.Spans = 512;
|
|
2420
2689
|
}
|
|
2421
|
-
|
|
2422
|
-
this.ThickBot = 1024;
|
|
2423
|
-
}
|
|
2424
|
-
static {
|
|
2425
|
-
this.ThickTop = 2048;
|
|
2426
|
-
}
|
|
2427
|
-
}, Kt = (e, t, n) => {
|
|
2690
|
+
}, Mn = (e, t, n) => {
|
|
2428
2691
|
if (e[0].value[0] === e[1].value[0]) return t;
|
|
2429
|
-
},
|
|
2692
|
+
}, Nn = /^\s*TABLE\s*\(/i, Pn = {
|
|
2430
2693
|
colStart: 0,
|
|
2431
2694
|
colEnd: 0,
|
|
2432
2695
|
rowStart: 0,
|
|
2433
2696
|
rowEnd: 0
|
|
2434
|
-
},
|
|
2435
|
-
let
|
|
2436
|
-
let
|
|
2437
|
-
if (
|
|
2438
|
-
|
|
2697
|
+
}, Fn = (e) => e === "1" || e === "true", In = (e, t, n, r, i, a, o, s, c) => {
|
|
2698
|
+
let l = !1, u = [], d = o?.get(On), f = o?.get(kn), p = /* @__PURE__ */ new Map(), m = !1, h = [], g = !1, _ = null, v = null, y = null, b = null, ee = null, x = null, te = o?.get("richData") ?? Fe.EmptyArray, ne = o?.get("dummyWrapped") ?? null, re = V.normalizeA1ToR1C1, ie = Ie.createConflatingRanges(), ae = /* @__PURE__ */ new Map(), oe = [], se = !1, ce = !1, le = null, S = (e) => {
|
|
2699
|
+
let t = o?.get("metadata")?.values;
|
|
2700
|
+
if (!t) return;
|
|
2701
|
+
let n = parseInt(e, 10);
|
|
2702
|
+
if (!Number.isFinite(n) || n < 1) return;
|
|
2703
|
+
let r = t[n - 1]?.get("XLRICHVALUE");
|
|
2704
|
+
return r?.richValueIndex === void 0 ? void 0 : te[r.richValueIndex];
|
|
2705
|
+
}, C = !1, w = Ie.createConflatingRanges(), T = !1, E = -1, D = -1, O = null, ue = null, de = null, k = [], A = null, j = -2, M = 0, fe = "", pe = "", N = "", P = "", me = "", F = "", he = "", ge = "", ve = "", ye = "", be = "", xe = "", Se = "", Ce = "", we = !0, I = null, L = !1, Te = !1, Ee = !1, De = null, Oe = 0, ke = (e) => {
|
|
2706
|
+
let r = e.name, s = r.indexOf(":");
|
|
2707
|
+
if (s !== -1 && (r = r.slice(s + 1)), Oe++, Oe % 196608 == 0 && i?.(Oe), ue) {
|
|
2708
|
+
let n = e.attributes;
|
|
2439
2709
|
switch (r) {
|
|
2440
2710
|
case "v":
|
|
2441
|
-
|
|
2711
|
+
m = !0;
|
|
2442
2712
|
break;
|
|
2443
2713
|
case "f":
|
|
2444
|
-
switch (
|
|
2714
|
+
switch (g = !0, n.t ?? null) {
|
|
2445
2715
|
case null:
|
|
2446
2716
|
case "normal": break;
|
|
2447
2717
|
case "shared":
|
|
2448
|
-
let e =
|
|
2449
|
-
|
|
2718
|
+
let e = n.si;
|
|
2719
|
+
v = n.ref, _ = e;
|
|
2450
2720
|
break;
|
|
2451
2721
|
case "array":
|
|
2452
|
-
|
|
2722
|
+
v = n.ref, le = v;
|
|
2453
2723
|
break;
|
|
2454
|
-
case "dataTable":
|
|
2724
|
+
case "dataTable": {
|
|
2725
|
+
let e = ((e, t, n) => {
|
|
2726
|
+
let r = e.r1;
|
|
2727
|
+
if (!r) return null;
|
|
2728
|
+
let i = { ref: e.ref ?? V.cellToString({
|
|
2729
|
+
rowIndex: t,
|
|
2730
|
+
colIndex: n
|
|
2731
|
+
}) }, a = Fn(e.del1);
|
|
2732
|
+
if (Fn(e.dt2D)) {
|
|
2733
|
+
i.rowInput = r, a && (i.rowInputDeleted = !0);
|
|
2734
|
+
let t = e.r2;
|
|
2735
|
+
t && (i.columnInput = t, Fn(e.del2) && (i.columnInputDeleted = !0));
|
|
2736
|
+
} else Fn(e.dtr) ? (i.rowInput = r, a && (i.rowInputDeleted = !0)) : (i.columnInput = r, a && (i.columnInputDeleted = !0));
|
|
2737
|
+
return Fn(e.ca) && (i.calculateAlways = !0), i;
|
|
2738
|
+
})(n, E, D);
|
|
2739
|
+
e && (t.dataTables ??= []).push(e);
|
|
2740
|
+
return;
|
|
2741
|
+
}
|
|
2455
2742
|
}
|
|
2456
|
-
let e =
|
|
2457
|
-
e !== void 0 && (
|
|
2743
|
+
let e = n.ca;
|
|
2744
|
+
e !== void 0 && (C = e === "1");
|
|
2458
2745
|
break;
|
|
2459
2746
|
case "is":
|
|
2460
|
-
|
|
2747
|
+
T = !0;
|
|
2461
2748
|
return;
|
|
2462
2749
|
}
|
|
2463
|
-
|
|
2464
|
-
} else if (
|
|
2750
|
+
T && !g && a?.onOpenTag?.(e);
|
|
2751
|
+
} else if (l) {
|
|
2465
2752
|
if (r === "c") {
|
|
2466
|
-
|
|
2753
|
+
ue = e;
|
|
2467
2754
|
let t = e.attributes, n = t.r;
|
|
2468
|
-
|
|
2755
|
+
D = n === void 0 ? D + 1 : V.fastStringToCol(n);
|
|
2469
2756
|
let r = t.t;
|
|
2470
|
-
r === void 0 ?
|
|
2757
|
+
r === void 0 ? de = null : (de = r, de === "str" && (T = !0));
|
|
2471
2758
|
let i = t.s;
|
|
2472
|
-
i === void 0 && (
|
|
2473
|
-
colStart:
|
|
2474
|
-
rowStart:
|
|
2475
|
-
colEnd:
|
|
2476
|
-
rowEnd:
|
|
2759
|
+
i === void 0 && (De !== null || Ee) && (i = "0"), i !== void 0 && (i = parseInt(i), I && I.value === i && I.colEnd + 1 === D ? I.colEnd = D : (I = {
|
|
2760
|
+
colStart: D,
|
|
2761
|
+
rowStart: E,
|
|
2762
|
+
colEnd: D,
|
|
2763
|
+
rowEnd: E,
|
|
2477
2764
|
value: i
|
|
2478
|
-
},
|
|
2765
|
+
}, h.push(I))), le = null, ce = !1;
|
|
2479
2766
|
let a = t.cm;
|
|
2480
|
-
|
|
2767
|
+
se = a !== void 0 && ((e) => {
|
|
2481
2768
|
let t = o?.get("metadata")?.cells;
|
|
2482
2769
|
if (!t) return !1;
|
|
2483
2770
|
let n = parseInt(e, 10);
|
|
@@ -2485,83 +2772,129 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2485
2772
|
})(a);
|
|
2486
2773
|
let s = t.vm;
|
|
2487
2774
|
if (s !== void 0) {
|
|
2488
|
-
let e =
|
|
2489
|
-
if (
|
|
2775
|
+
let e = S(s);
|
|
2776
|
+
if (Le.isError(e)) {
|
|
2490
2777
|
let t = e.getCode();
|
|
2491
|
-
|
|
2778
|
+
O = {
|
|
2492
2779
|
t: "e",
|
|
2493
2780
|
v: t
|
|
2494
|
-
},
|
|
2781
|
+
}, se && t === Le.Code.Spill && (ce = !0);
|
|
2495
2782
|
}
|
|
2496
2783
|
}
|
|
2497
2784
|
}
|
|
2498
2785
|
} else {
|
|
2499
|
-
if (
|
|
2500
|
-
|
|
2786
|
+
if (Te && r === "row") {
|
|
2787
|
+
l = !0;
|
|
2501
2788
|
let t = e.attributes.r;
|
|
2502
|
-
if (
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2789
|
+
if (E = t === void 0 ? E + 1 : parseInt(t) - 1, D = -1, c?.()) {
|
|
2790
|
+
let e = u[u.length - 1];
|
|
2791
|
+
e && e.max + 1 === E ? e.max = E : u.push({
|
|
2792
|
+
min: E,
|
|
2793
|
+
max: E
|
|
2794
|
+
});
|
|
2795
|
+
}
|
|
2796
|
+
if (M = 0, pe = e.attributes.customHeight, pe !== void 0 && (M |= jn.CustomHeight), pe !== ve && (we = !0, ve = pe), fe = e.attributes.ht, fe !== void 0 && (M |= jn.Ht), fe !== ge && (we = !0, ge = fe), N = e.attributes.hidden, N !== void 0 && (M |= jn.Hidden), N !== ye && (we = !0, ye = N), me = e.attributes.s, me !== void 0 && (M |= jn.S), me !== xe && (we = !0, xe = me), P = e.attributes.customFormat, P !== void 0 && (M |= jn.CustomFormat), P !== be && (we = !0, be = P), F = e.attributes.outlineLevel, F !== void 0 && (M |= jn.OutlineLevel), F !== Se && (we = !0, Se = F), he = e.attributes.collapsed, he !== void 0 && (M |= jn.Collapsed), he !== Ce && (we = !0, Ce = he), M !== 0) {
|
|
2797
|
+
if (j + 1 !== E || we) {
|
|
2798
|
+
let e = pe !== void 0 && (pe === "1" || pe === "true"), t = P !== void 0 && (P === "1" || P === "true");
|
|
2799
|
+
De = t && me !== void 0 ? me : null, t && De === null && (De = "0"), A = {
|
|
2800
|
+
min: E,
|
|
2801
|
+
max: E,
|
|
2508
2802
|
value: {
|
|
2509
|
-
sz:
|
|
2803
|
+
sz: fe === void 0 ? -1 : parseFloat(fe),
|
|
2510
2804
|
csz: e,
|
|
2511
|
-
h:
|
|
2512
|
-
s:
|
|
2513
|
-
l:
|
|
2514
|
-
cl:
|
|
2805
|
+
h: N !== void 0 && (N === "1" || N === "true"),
|
|
2806
|
+
s: De === null ? void 0 : De === "0" ? 0 : parseInt(De),
|
|
2807
|
+
l: F === void 0 || F === "0" ? 0 : parseInt(F),
|
|
2808
|
+
cl: he !== void 0 && (he === "1" || he === "true")
|
|
2515
2809
|
}
|
|
2516
|
-
},
|
|
2517
|
-
} else
|
|
2810
|
+
}, k.push(A);
|
|
2811
|
+
} else A.max = E;
|
|
2518
2812
|
}
|
|
2519
|
-
|
|
2813
|
+
j = E, we = !1;
|
|
2520
2814
|
return;
|
|
2521
2815
|
}
|
|
2522
|
-
if (r === "sheetData" && (
|
|
2523
|
-
|
|
2816
|
+
if (r === "sheetData" && (Te = !0), !L && r === "sheetData") {
|
|
2817
|
+
L = !0;
|
|
2524
2818
|
let e = t.cols, n = e ? e.length : 0;
|
|
2525
|
-
for (let t = 0; !
|
|
2819
|
+
for (let t = 0; !Ee && t < n; t++) e[t].v.s && (Ee = !0);
|
|
2526
2820
|
}
|
|
2527
2821
|
n?.onOpenTag?.(e);
|
|
2528
2822
|
}
|
|
2529
|
-
},
|
|
2823
|
+
}, Ae = (t) => {
|
|
2530
2824
|
let r = t.name;
|
|
2531
|
-
if (r === "sheetData" && (
|
|
2825
|
+
if (r === "sheetData" && (Te = !1), !g || r !== "c" && r !== "f" || (_ && (b = ae.get(_) ?? null), b && (ie.append(E, D, b), C && w.append(E, D)), le !== null && oe.push([le, se ? ce ? "error" : "dynamic" : "fixed"]), g = !1, b = null, _ = null, v = null, m = !1, C = !1, le = null, se = !1, ce = !1), ue) {
|
|
2532
2826
|
let n = r.indexOf(":");
|
|
2533
|
-
if (n !== -1 && (r = r.slice(n + 1)),
|
|
2827
|
+
if (n !== -1 && (r = r.slice(n + 1)), T) {
|
|
2534
2828
|
if (r === "is" || r === "v") {
|
|
2535
2829
|
let t = a?.onEnd?.();
|
|
2536
|
-
t != null && e.pushAt(
|
|
2830
|
+
t != null && e.pushAt(E, D, typeof t == "number" ? "" + t : t);
|
|
2537
2831
|
} else r !== "f" && a?.onCloseTag?.(t);
|
|
2538
2832
|
}
|
|
2539
|
-
|
|
2833
|
+
m &&= !1, r === "c" && (ue = null, T = !1);
|
|
2540
2834
|
} else {
|
|
2541
|
-
if (
|
|
2835
|
+
if (l) return l = !1, void (I = null);
|
|
2542
2836
|
n?.onCloseTag?.(t);
|
|
2543
2837
|
}
|
|
2544
|
-
},
|
|
2545
|
-
let
|
|
2546
|
-
if (
|
|
2547
|
-
switch (
|
|
2838
|
+
}, je = (i) => {
|
|
2839
|
+
let c = i.trim();
|
|
2840
|
+
if (m) {
|
|
2841
|
+
switch (O = null, de) {
|
|
2548
2842
|
case null:
|
|
2549
2843
|
case "n":
|
|
2550
|
-
|
|
2844
|
+
O = parseFloat(c);
|
|
2551
2845
|
break;
|
|
2552
2846
|
case "b":
|
|
2553
|
-
|
|
2847
|
+
O = c === "1" || c === "true";
|
|
2554
2848
|
break;
|
|
2555
|
-
case "s":
|
|
2556
|
-
|
|
2849
|
+
case "s": {
|
|
2850
|
+
let e = parseInt(c, 10), t = p.get(e);
|
|
2851
|
+
if (t === void 0) {
|
|
2852
|
+
let n = d?.get(e);
|
|
2853
|
+
t = n ? Sn(n, f) : null, p.set(e, t);
|
|
2854
|
+
}
|
|
2855
|
+
O = t ? {
|
|
2856
|
+
t: "r",
|
|
2857
|
+
v: {
|
|
2858
|
+
type: "richText",
|
|
2859
|
+
data: { runs: t }
|
|
2860
|
+
}
|
|
2861
|
+
} : c;
|
|
2862
|
+
break;
|
|
2863
|
+
}
|
|
2864
|
+
case "d": {
|
|
2865
|
+
let e = ((e, t = !1) => {
|
|
2866
|
+
if (!e) return null;
|
|
2867
|
+
let n = _n.exec(e);
|
|
2868
|
+
if (n) {
|
|
2869
|
+
let [, e, t, r] = n;
|
|
2870
|
+
return e === void 0 && t === void 0 && r === void 0 ? null : (3600 * parseFloat(e ?? "0") + 60 * parseFloat(t ?? "0") + parseFloat(r ?? "0")) / 86400;
|
|
2871
|
+
}
|
|
2872
|
+
let r = gn.exec(e);
|
|
2873
|
+
if (!r) return null;
|
|
2874
|
+
let [, i, a, o, s, c, l, u] = r;
|
|
2875
|
+
if (i === void 0 && s === void 0) return null;
|
|
2876
|
+
let d = 0;
|
|
2877
|
+
if (i !== void 0) {
|
|
2878
|
+
let e = parseInt(i, 10), n = parseInt(a, 10), r = parseInt(o, 10);
|
|
2879
|
+
if (n < 1 || n > 12 || r < 1 || r > 31) return null;
|
|
2880
|
+
let s = vn(e, n, r) - yn;
|
|
2881
|
+
if (d = s <= 60 ? s - 1 : s, t && (d -= 1462), d < 0) return null;
|
|
2882
|
+
}
|
|
2883
|
+
return s !== void 0 && (d += (3600 * parseInt(s, 10) + 60 * parseInt(c, 10) + (l === void 0 ? 0 : parseInt(l, 10)) + (u === void 0 ? 0 : parseFloat(u))) / 86400), d;
|
|
2884
|
+
})(c, !0 === o?.get(Dn));
|
|
2885
|
+
e === null ? s && (r?.(`Date '${c}' in cell ${V.cellToString({
|
|
2886
|
+
colIndex: D,
|
|
2887
|
+
rowIndex: E
|
|
2888
|
+
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"), O = "" + s(c)) : O = e;
|
|
2557
2889
|
break;
|
|
2890
|
+
}
|
|
2558
2891
|
case "e":
|
|
2559
|
-
if (
|
|
2560
|
-
let e =
|
|
2892
|
+
if (c === "#VALUE!") {
|
|
2893
|
+
let e = ue.attributes.vm;
|
|
2561
2894
|
if (e !== void 0) {
|
|
2562
|
-
let t =
|
|
2563
|
-
if (
|
|
2564
|
-
|
|
2895
|
+
let t = S(e);
|
|
2896
|
+
if (Le.isError(t)) {
|
|
2897
|
+
O = {
|
|
2565
2898
|
t: "e",
|
|
2566
2899
|
v: t.getCode()
|
|
2567
2900
|
};
|
|
@@ -2569,86 +2902,86 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2569
2902
|
}
|
|
2570
2903
|
}
|
|
2571
2904
|
}
|
|
2572
|
-
let e =
|
|
2573
|
-
e ?
|
|
2905
|
+
let e = Le.getBuiltInByLabel(c);
|
|
2906
|
+
e ? O = {
|
|
2574
2907
|
t: "e",
|
|
2575
2908
|
v: e.getCode()
|
|
2576
|
-
} : (
|
|
2577
|
-
colIndex:
|
|
2578
|
-
rowIndex:
|
|
2909
|
+
} : (O = c, r?.(`Unknown formula error '${c}' in cell ${V.cellToString({
|
|
2910
|
+
colIndex: D,
|
|
2911
|
+
rowIndex: E
|
|
2579
2912
|
})}`));
|
|
2580
2913
|
break;
|
|
2581
2914
|
case "str":
|
|
2582
|
-
case "inlineStr":
|
|
2915
|
+
case "inlineStr": T = !0;
|
|
2583
2916
|
}
|
|
2584
|
-
|
|
2917
|
+
O !== null && e.pushAt(E, D, O);
|
|
2585
2918
|
}
|
|
2586
|
-
if (
|
|
2587
|
-
if (ee ===
|
|
2919
|
+
if (_) {
|
|
2920
|
+
if (ee === _) b = x;
|
|
2588
2921
|
else {
|
|
2589
|
-
if (
|
|
2922
|
+
if (b = ae.get(_) ?? null, !b) {
|
|
2590
2923
|
let e = [];
|
|
2591
|
-
|
|
2592
|
-
|
|
2924
|
+
y = re(c, E, D, e), b = [
|
|
2925
|
+
y,
|
|
2593
2926
|
e,
|
|
2594
|
-
|
|
2595
|
-
],
|
|
2927
|
+
c
|
|
2928
|
+
], ae.set(_, b);
|
|
2596
2929
|
}
|
|
2597
|
-
ee =
|
|
2930
|
+
ee = _, x = b;
|
|
2598
2931
|
}
|
|
2599
|
-
|
|
2932
|
+
_ = null;
|
|
2600
2933
|
}
|
|
2601
|
-
if (
|
|
2602
|
-
if (
|
|
2934
|
+
if (g) {
|
|
2935
|
+
if (ne !== null) {
|
|
2603
2936
|
let e = ((e) => {
|
|
2604
|
-
if (e.length <
|
|
2605
|
-
let t =
|
|
2606
|
-
if (t === null || e.charCodeAt(t.end) !== 41 || e.charCodeAt(t.end + 1) !== 44 || e.charCodeAt(e.length - 1) !== 41) return
|
|
2937
|
+
if (e.length < rn.length || e.slice(0, rn.length).toUpperCase() !== an) return sn;
|
|
2938
|
+
let t = ln(e, rn.length);
|
|
2939
|
+
if (t === null || e.charCodeAt(t.end) !== 41 || e.charCodeAt(t.end + 1) !== 44 || e.charCodeAt(e.length - 1) !== 41) return sn;
|
|
2607
2940
|
let n = t.value;
|
|
2608
|
-
return n.toUpperCase() ===
|
|
2941
|
+
return n.toUpperCase() === on ? cn : n.length === 0 ? sn : {
|
|
2609
2942
|
kind: "formula",
|
|
2610
2943
|
formula: n
|
|
2611
2944
|
};
|
|
2612
|
-
})(
|
|
2613
|
-
e.kind !== "none" &&
|
|
2945
|
+
})(c);
|
|
2946
|
+
e.kind !== "none" && ne.push({
|
|
2614
2947
|
sheet: t,
|
|
2615
|
-
rowIndex:
|
|
2616
|
-
colIndex:
|
|
2948
|
+
rowIndex: E,
|
|
2949
|
+
colIndex: D,
|
|
2617
2950
|
formula: e.kind === "formula" ? e.formula : null
|
|
2618
2951
|
});
|
|
2619
2952
|
}
|
|
2620
2953
|
let e = [];
|
|
2621
|
-
|
|
2622
|
-
|
|
2954
|
+
y = re(c, E, D, e), b = [
|
|
2955
|
+
y,
|
|
2623
2956
|
e,
|
|
2624
|
-
|
|
2957
|
+
c
|
|
2625
2958
|
];
|
|
2626
2959
|
}
|
|
2627
|
-
|
|
2628
|
-
},
|
|
2960
|
+
T ? a?.onText?.(i) : l || n?.onText?.(c);
|
|
2961
|
+
}, R = {
|
|
2629
2962
|
r: void 0,
|
|
2630
2963
|
t: void 0,
|
|
2631
2964
|
s: void 0,
|
|
2632
2965
|
cm: void 0,
|
|
2633
2966
|
vm: void 0
|
|
2634
|
-
},
|
|
2967
|
+
}, Me = {
|
|
2635
2968
|
name: "c",
|
|
2636
|
-
attributes:
|
|
2969
|
+
attributes: R,
|
|
2637
2970
|
isSelfClosing: !1
|
|
2638
|
-
},
|
|
2971
|
+
}, z = {
|
|
2639
2972
|
t: void 0,
|
|
2640
2973
|
si: void 0,
|
|
2641
2974
|
ref: void 0,
|
|
2642
2975
|
ca: void 0
|
|
2643
|
-
},
|
|
2976
|
+
}, Ne = {
|
|
2644
2977
|
name: "f",
|
|
2645
|
-
attributes:
|
|
2978
|
+
attributes: z,
|
|
2646
2979
|
isSelfClosing: !1
|
|
2647
|
-
},
|
|
2980
|
+
}, Pe = {
|
|
2648
2981
|
name: "v",
|
|
2649
2982
|
attributes: {},
|
|
2650
2983
|
isSelfClosing: !1
|
|
2651
|
-
},
|
|
2984
|
+
}, B = {
|
|
2652
2985
|
r: void 0,
|
|
2653
2986
|
s: void 0,
|
|
2654
2987
|
ht: void 0,
|
|
@@ -2657,177 +2990,379 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2657
2990
|
customHeight: void 0,
|
|
2658
2991
|
customFormat: void 0,
|
|
2659
2992
|
outlineLevel: void 0
|
|
2660
|
-
},
|
|
2993
|
+
}, Re = {
|
|
2661
2994
|
name: "row",
|
|
2662
|
-
attributes:
|
|
2995
|
+
attributes: B,
|
|
2663
2996
|
isSelfClosing: !1
|
|
2664
|
-
},
|
|
2997
|
+
}, ze = Qt.NEED_MORE, H = Qt.NOT_HANDLED, U = Qt.decodeText, W = !1, Be = (e, t, n, r) => {
|
|
2665
2998
|
for (;;) {
|
|
2666
2999
|
let i = 0;
|
|
2667
3000
|
for (; t < n && ((i = e.charCodeAt(t)) === 32 || i === 9 || i === 10 || i === 13);) t++;
|
|
2668
|
-
if (t >= n) return
|
|
2669
|
-
if (i === 62) return
|
|
2670
|
-
if (i === 47) return t + 1 >= n ?
|
|
3001
|
+
if (t >= n) return ze;
|
|
3002
|
+
if (i === 62) return W = !1, t + 1;
|
|
3003
|
+
if (i === 47) return t + 1 >= n ? ze : e.charCodeAt(t + 1) === 62 ? (W = !0, t + 2) : H;
|
|
2671
3004
|
let a = t;
|
|
2672
3005
|
for (; t < n && (i = e.charCodeAt(t)) !== 61;) {
|
|
2673
|
-
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return
|
|
3006
|
+
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return H;
|
|
2674
3007
|
t++;
|
|
2675
3008
|
}
|
|
2676
|
-
if (t + 1 >= n) return
|
|
3009
|
+
if (t + 1 >= n) return ze;
|
|
2677
3010
|
let o = t - a, s = e.charCodeAt(t + 1);
|
|
2678
|
-
if (s !== 34 && s !== 39) return
|
|
3011
|
+
if (s !== 34 && s !== 39) return H;
|
|
2679
3012
|
let c = t + 2, l = c;
|
|
2680
3013
|
for (; l < n && (i = e.charCodeAt(l)) !== s;) {
|
|
2681
|
-
if (i === 38 || i < 32) return
|
|
3014
|
+
if (i === 38 || i < 32) return H;
|
|
2682
3015
|
l++;
|
|
2683
3016
|
}
|
|
2684
|
-
if (l >= n) return
|
|
3017
|
+
if (l >= n) return ze;
|
|
2685
3018
|
t = l + 1;
|
|
2686
3019
|
let u = e.charCodeAt(a);
|
|
2687
3020
|
if (r === 2) switch (o) {
|
|
2688
3021
|
case 1:
|
|
2689
|
-
u === 114 ?
|
|
3022
|
+
u === 114 ? B.r = e.slice(c, l) : u === 115 && (B.s = e.slice(c, l));
|
|
2690
3023
|
break;
|
|
2691
3024
|
case 2:
|
|
2692
|
-
e.startsWith("ht", a) && (
|
|
3025
|
+
e.startsWith("ht", a) && (B.ht = e.slice(c, l));
|
|
2693
3026
|
break;
|
|
2694
3027
|
case 6:
|
|
2695
|
-
e.startsWith("hidden", a) && (
|
|
3028
|
+
e.startsWith("hidden", a) && (B.hidden = e.slice(c, l));
|
|
2696
3029
|
break;
|
|
2697
3030
|
case 9:
|
|
2698
|
-
e.startsWith("collapsed", a) && (
|
|
3031
|
+
e.startsWith("collapsed", a) && (B.collapsed = e.slice(c, l));
|
|
2699
3032
|
break;
|
|
2700
|
-
case 12: e.startsWith("customHeight", a) ?
|
|
3033
|
+
case 12: e.startsWith("customHeight", a) ? B.customHeight = e.slice(c, l) : e.startsWith("customFormat", a) ? B.customFormat = e.slice(c, l) : e.startsWith("outlineLevel", a) && (B.outlineLevel = e.slice(c, l));
|
|
2701
3034
|
}
|
|
2702
|
-
else if (r === 0) o === 1 ? u === 114 ?
|
|
2703
|
-
else if (o === 1) u === 116 && (
|
|
3035
|
+
else if (r === 0) o === 1 ? u === 114 ? R.r = e.slice(c, l) : u === 116 ? R.t = e.slice(c, l) : u === 115 && (R.s = e.slice(c, l)) : o === 2 && e.charCodeAt(a + 1) === 109 && (u === 99 ? R.cm = e.slice(c, l) : u === 118 && (R.vm = e.slice(c, l)));
|
|
3036
|
+
else if (o === 1) u === 116 && (z.t = e.slice(c, l));
|
|
2704
3037
|
else if (o === 2) {
|
|
2705
3038
|
let t = e.charCodeAt(a + 1);
|
|
2706
|
-
u === 115 && t === 105 ?
|
|
2707
|
-
} else o === 3 && e.startsWith("ref", a) && (
|
|
3039
|
+
u === 115 && t === 105 ? z.si = e.slice(c, l) : u === 99 && t === 97 && (z.ca = e.slice(c, l));
|
|
3040
|
+
} else o === 3 && e.startsWith("ref", a) && (z.ref = e.slice(c, l));
|
|
2708
3041
|
}
|
|
2709
|
-
},
|
|
3042
|
+
}, He = (e, t, n) => e.charCodeAt(t + 1) === 47 && e.charCodeAt(t + 2) === n && e.charCodeAt(t + 3) === 62;
|
|
2710
3043
|
return {
|
|
2711
3044
|
...n,
|
|
2712
3045
|
onEnd: () => {
|
|
2713
|
-
|
|
2714
|
-
|
|
3046
|
+
if (c?.()) {
|
|
3047
|
+
let e = 0, t = [], n = (e, t) => ({
|
|
3048
|
+
min: e,
|
|
3049
|
+
max: t,
|
|
3050
|
+
value: {
|
|
3051
|
+
sz: -1,
|
|
3052
|
+
csz: !1,
|
|
3053
|
+
h: !0,
|
|
3054
|
+
s: void 0,
|
|
3055
|
+
l: 0,
|
|
3056
|
+
cl: !1
|
|
3057
|
+
}
|
|
3058
|
+
});
|
|
3059
|
+
for (let r of u) r.min > e && t.push(n(e, r.min - 1)), e = Math.max(e, r.max + 1);
|
|
3060
|
+
e <= _e && t.push(n(e, _e)), t.length > 0 && (k.push(...t), k.sort((e, t) => e.min - t.min));
|
|
3061
|
+
}
|
|
3062
|
+
k.length > 0 && (t.rows = V.runsToRefs(k, !1));
|
|
3063
|
+
let r = ie.done(Mn);
|
|
3064
|
+
r = ((e, t) => {
|
|
3065
|
+
let n = null;
|
|
3066
|
+
for (let t = 0; t < e.length; t++) {
|
|
3067
|
+
let r = e[t];
|
|
3068
|
+
if (!Nn.test(r.value[2])) continue;
|
|
3069
|
+
n ??= /* @__PURE__ */ new Map();
|
|
3070
|
+
let i = r.value[0], a = n.get(i);
|
|
3071
|
+
a ? a.push(r) : n.set(i, [r]);
|
|
3072
|
+
}
|
|
3073
|
+
if (n === null) return e;
|
|
3074
|
+
let r = /* @__PURE__ */ new Set();
|
|
3075
|
+
for (let e of n.values()) {
|
|
3076
|
+
let n = e[0], i = {
|
|
3077
|
+
rowStart: n.rowStart,
|
|
3078
|
+
colStart: n.colStart,
|
|
3079
|
+
rowEnd: n.rowEnd,
|
|
3080
|
+
colEnd: n.colEnd
|
|
3081
|
+
}, a = 0;
|
|
3082
|
+
for (let t = 0; t < e.length; t++) {
|
|
3083
|
+
let n = e[t];
|
|
3084
|
+
n.rowStart < i.rowStart && (i.rowStart = n.rowStart), n.colStart < i.colStart && (i.colStart = n.colStart), n.rowEnd > i.rowEnd && (i.rowEnd = n.rowEnd), n.colEnd > i.colEnd && (i.colEnd = n.colEnd), a += (n.rowEnd - n.rowStart + 1) * (n.colEnd - n.colStart + 1);
|
|
3085
|
+
}
|
|
3086
|
+
if (a !== (i.rowEnd - i.rowStart + 1) * (i.colEnd - i.colStart + 1)) continue;
|
|
3087
|
+
let o = hn(V.resolveRelativeToA1(n.value[1], i.rowStart, i.colStart), i);
|
|
3088
|
+
if (o) {
|
|
3089
|
+
(t.dataTables ??= []).push(o);
|
|
3090
|
+
for (let t = 0; t < e.length; t++) r.add(e[t]);
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
return r.size === 0 ? e : e.filter((e) => !r.has(e));
|
|
3094
|
+
})(r, t);
|
|
3095
|
+
let i = r.length;
|
|
2715
3096
|
if (i > 0) {
|
|
2716
3097
|
let e = Array(i);
|
|
2717
3098
|
for (let t = 0; t < i; t++) {
|
|
2718
|
-
let n = r[t], i =
|
|
3099
|
+
let n = r[t], i = V.rangeToString(n), a = n.value[1], o = V.resolveRelativeToA1(a, n.rowStart, n.colStart);
|
|
2719
3100
|
e[t] = [i, o];
|
|
2720
3101
|
}
|
|
2721
3102
|
t.formulas = e;
|
|
2722
3103
|
}
|
|
2723
|
-
let a =
|
|
3104
|
+
let a = w.done(!0), o = a.length;
|
|
2724
3105
|
if (o > 0) {
|
|
2725
3106
|
let e = Array(o);
|
|
2726
3107
|
for (let t = 0; t < o; t++) {
|
|
2727
|
-
let n = a[t], r =
|
|
3108
|
+
let n = a[t], r = V.rangeToString(n);
|
|
2728
3109
|
e[t] = r;
|
|
2729
3110
|
}
|
|
2730
3111
|
t.volatile = e;
|
|
2731
3112
|
}
|
|
2732
|
-
|
|
2733
|
-
let s =
|
|
3113
|
+
oe.length > 0 && (t.formulaArray = [...oe]);
|
|
3114
|
+
let s = h.length;
|
|
2734
3115
|
if (s > 0) {
|
|
2735
|
-
|
|
2736
|
-
let e =
|
|
3116
|
+
h.sort(Ie.createRangeComparator(Ve.Axis.Column));
|
|
3117
|
+
let e = h[0], n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value, o = [];
|
|
2737
3118
|
o.push(e);
|
|
2738
3119
|
let c = null;
|
|
2739
|
-
for (let t = 1; t < s; t++) c =
|
|
2740
|
-
let
|
|
2741
|
-
for (let e = 0; e <
|
|
2742
|
-
let t = o[e], n =
|
|
2743
|
-
|
|
3120
|
+
for (let t = 1; t < s; t++) c = h[t], a !== c.value || n !== c.colStart || r !== c.colEnd || i + 1 !== c.rowEnd ? (o.push(c), e = c, n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value) : (i = c.rowEnd, e.rowEnd = i);
|
|
3121
|
+
let l = o.length, u = Array(l);
|
|
3122
|
+
for (let e = 0; e < l; e++) {
|
|
3123
|
+
let t = o[e], n = V.rangeToString(t);
|
|
3124
|
+
u[e] = [n, t.value];
|
|
2744
3125
|
}
|
|
2745
|
-
t.directStyles =
|
|
3126
|
+
t.directStyles = u;
|
|
2746
3127
|
}
|
|
2747
|
-
let
|
|
2748
|
-
|
|
3128
|
+
let l = e.build();
|
|
3129
|
+
l && (t.data = l.tuples), n?.onEnd?.();
|
|
2749
3130
|
},
|
|
2750
|
-
onOpenTag:
|
|
2751
|
-
onCloseTag:
|
|
2752
|
-
onText:
|
|
3131
|
+
onOpenTag: ke,
|
|
3132
|
+
onCloseTag: Ae,
|
|
3133
|
+
onText: je,
|
|
2753
3134
|
elementScanners: [{
|
|
2754
3135
|
name: "c",
|
|
2755
3136
|
scan: (e, t, n) => {
|
|
2756
|
-
if (!
|
|
2757
|
-
|
|
2758
|
-
let r =
|
|
3137
|
+
if (!l || ue !== null) return H;
|
|
3138
|
+
R.r = R.t = R.s = R.cm = R.vm = void 0;
|
|
3139
|
+
let r = Be(e, t + 2, n, 0);
|
|
2759
3140
|
if (r < 0) return r;
|
|
2760
|
-
let i =
|
|
2761
|
-
if (
|
|
2762
|
-
let a = !1, o = -1,
|
|
2763
|
-
if (!
|
|
3141
|
+
let i = R.t;
|
|
3142
|
+
if (R.r === void 0 || i === "str" || i === "inlineStr") return H;
|
|
3143
|
+
let a = !1, o = -1, s = -1, c = -1, u = -1, d = r;
|
|
3144
|
+
if (!W) for (z.t = z.si = z.ref = z.ca = void 0;;) {
|
|
2764
3145
|
let t = e.indexOf("<", r);
|
|
2765
|
-
if (t === -1 || t + 3 >= n) return
|
|
3146
|
+
if (t === -1 || t + 3 >= n) return ze;
|
|
2766
3147
|
for (let n = r; n < t; n++) {
|
|
2767
3148
|
let t = e.charCodeAt(n);
|
|
2768
|
-
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return
|
|
3149
|
+
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return H;
|
|
2769
3150
|
}
|
|
2770
|
-
let i = e.charCodeAt(t + 1),
|
|
3151
|
+
let i = e.charCodeAt(t + 1), l = e.charCodeAt(t + 2);
|
|
2771
3152
|
if (i === 47) {
|
|
2772
|
-
if (!
|
|
3153
|
+
if (!He(e, t, 99)) return H;
|
|
2773
3154
|
d = t + 4;
|
|
2774
3155
|
break;
|
|
2775
3156
|
}
|
|
2776
|
-
if (i === 102 && !a &&
|
|
2777
|
-
if (a = !0, r =
|
|
2778
|
-
if (
|
|
3157
|
+
if (i === 102 && !a && c === -1 && (l === 32 || l === 62 || l === 47)) {
|
|
3158
|
+
if (a = !0, r = Be(e, t + 2, n, 1), r < 0) return r;
|
|
3159
|
+
if (z.t === "dataTable") return H;
|
|
3160
|
+
if (W) continue;
|
|
2779
3161
|
let i = e.indexOf("<", r);
|
|
2780
|
-
if (i === -1 || i + 3 >= n) return
|
|
2781
|
-
if (!
|
|
2782
|
-
o = r,
|
|
2783
|
-
} else if (i === 118 &&
|
|
3162
|
+
if (i === -1 || i + 3 >= n) return ze;
|
|
3163
|
+
if (!He(e, i, 102)) return H;
|
|
3164
|
+
o = r, s = i, r = i + 4;
|
|
3165
|
+
} else if (i === 118 && l === 62 && c === -1) {
|
|
2784
3166
|
let i = e.indexOf("<", t + 3);
|
|
2785
|
-
if (i === -1 || i + 3 >= n) return
|
|
2786
|
-
if (!
|
|
2787
|
-
|
|
2788
|
-
} else return
|
|
3167
|
+
if (i === -1 || i + 3 >= n) return ze;
|
|
3168
|
+
if (!He(e, i, 118)) return H;
|
|
3169
|
+
c = t + 3, u = i, r = i + 4;
|
|
3170
|
+
} else return H;
|
|
2789
3171
|
}
|
|
2790
|
-
return
|
|
3172
|
+
return ke(Me), a && (ke(Ne), s > o && je(U(e.slice(o, s))), Ae(Ne)), c !== -1 && (ke(Pe), u > c && je(U(e.slice(c, u))), Ae(Pe)), Ae(Me), d;
|
|
2791
3173
|
}
|
|
2792
3174
|
}, {
|
|
2793
3175
|
name: "row",
|
|
2794
|
-
openTag:
|
|
3176
|
+
openTag: Re,
|
|
2795
3177
|
scan: (e, t, n) => {
|
|
2796
|
-
if (!
|
|
2797
|
-
|
|
2798
|
-
let r =
|
|
2799
|
-
return r < 0 ? r :
|
|
3178
|
+
if (!Te || l || ue !== null) return H;
|
|
3179
|
+
B.r = B.s = B.ht = B.hidden = B.collapsed = B.customHeight = B.customFormat = B.outlineLevel = void 0;
|
|
3180
|
+
let r = Be(e, t + 4, n, 2);
|
|
3181
|
+
return r < 0 ? r : W || B.r === void 0 ? H : (ke(Re), r);
|
|
2800
3182
|
}
|
|
2801
3183
|
}]
|
|
2802
3184
|
};
|
|
2803
|
-
},
|
|
3185
|
+
}, Ln = /* @__PURE__ */ new Map([
|
|
3186
|
+
["urn:schemas-microsoft-com:vml", "v"],
|
|
3187
|
+
["urn:schemas-microsoft-com:office:office", "o"],
|
|
3188
|
+
["urn:schemas-microsoft-com:office:excel", "x"]
|
|
3189
|
+
]), Rn = [...Ln].map(([e, t]) => ` xmlns:${t}="${e}"`).join(""), zn = /<(\/?)([A-Za-z_][\w.-]*(?::[\w.-]+)?)((?:[^>"']|"[^"]*"|'[^']*')*?)(\/?)>/g, Bn = /(\s+)([A-Za-z_][\w.-]*(?::[\w.-]+)?)(\s*=\s*)("[^"]*"|'[^']*')/g, Vn = /\sxmlns(?::([\w.-]+))?\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
|
|
3190
|
+
function Hn(e) {
|
|
3191
|
+
if (!e || !((e) => {
|
|
3192
|
+
let t;
|
|
3193
|
+
for (Vn.lastIndex = 0; (t = Vn.exec(e)) !== null;) {
|
|
3194
|
+
let e = Ln.get(t[2] ?? t[3] ?? "");
|
|
3195
|
+
if (e && e !== (t[1] ?? "")) return !0;
|
|
3196
|
+
}
|
|
3197
|
+
return !1;
|
|
3198
|
+
})(e)) return e;
|
|
3199
|
+
let t = [], n = (e, n, r) => {
|
|
3200
|
+
let i = e.indexOf(":");
|
|
3201
|
+
if (i === -1 && r) return null;
|
|
3202
|
+
let a = i === -1 ? "" : e.substring(0, i);
|
|
3203
|
+
if (a === "xmlns") return null;
|
|
3204
|
+
let o = ((e, n) => {
|
|
3205
|
+
let r = n?.get(e);
|
|
3206
|
+
if (r !== void 0) return r;
|
|
3207
|
+
for (let n = t.length - 1; n >= 0; n--) {
|
|
3208
|
+
let r = t[n].bindings.get(e);
|
|
3209
|
+
if (r !== void 0) return r;
|
|
3210
|
+
}
|
|
3211
|
+
})(a, n), s = o === void 0 ? void 0 : Ln.get(o);
|
|
3212
|
+
return s ? `${s}:${i === -1 ? e : e.substring(i + 1)}` : null;
|
|
3213
|
+
}, r = !1, i = !1, a = e.replace(zn, (e, a, o, s, c) => {
|
|
3214
|
+
if (a) {
|
|
3215
|
+
let r = t[t.length - 1], i = n(o, null, !1);
|
|
3216
|
+
return r && r.name === o && (r.nested > 0 ? r.nested-- : t.pop()), i ? `</${i}>` : e;
|
|
3217
|
+
}
|
|
3218
|
+
let l = ((e) => {
|
|
3219
|
+
let t, n = null;
|
|
3220
|
+
for (Vn.lastIndex = 0; (t = Vn.exec(e)) !== null;) (n ??= /* @__PURE__ */ new Map()).set(t[1] ?? "", t[2] ?? t[3] ?? "");
|
|
3221
|
+
return n;
|
|
3222
|
+
})(s);
|
|
3223
|
+
l?.forEach((e, t) => {
|
|
3224
|
+
let n = [...Ln].find(([, e]) => e === t)?.[0];
|
|
3225
|
+
n && n !== e && (r = !0);
|
|
3226
|
+
});
|
|
3227
|
+
let u = n(o, l, !1), d = s.replace(Bn, (e, t, r, i, a) => {
|
|
3228
|
+
if (r === "xmlns" || r.startsWith("xmlns:")) {
|
|
3229
|
+
let t = a.slice(1, -1);
|
|
3230
|
+
return Ln.has(t) ? "" : e;
|
|
3231
|
+
}
|
|
3232
|
+
let o = n(r, l, !0);
|
|
3233
|
+
return o ? `${t}${o}${i}${a}` : e;
|
|
3234
|
+
});
|
|
3235
|
+
if (i || (i = !0, d = d.replace(/\s+$/, "") + Rn), !c) {
|
|
3236
|
+
let e = t[t.length - 1];
|
|
3237
|
+
l ? t.push({
|
|
3238
|
+
name: o,
|
|
3239
|
+
bindings: l,
|
|
3240
|
+
nested: 0
|
|
3241
|
+
}) : e && e.name === o && e.nested++;
|
|
3242
|
+
}
|
|
3243
|
+
return `<${u ?? o}${d}${c}>`;
|
|
3244
|
+
});
|
|
3245
|
+
return r ? e : a;
|
|
3246
|
+
}
|
|
3247
|
+
var Un = {
|
|
3248
|
+
creator: "author",
|
|
3249
|
+
category: "category",
|
|
3250
|
+
description: "comments",
|
|
3251
|
+
contentStatus: "contentStatus",
|
|
3252
|
+
created: "creationDate",
|
|
3253
|
+
keywords: "keywords",
|
|
3254
|
+
lastModifiedBy: "lastAuthor",
|
|
3255
|
+
modified: "lastModifiedDate",
|
|
3256
|
+
lastPrinted: "lastPrinted",
|
|
3257
|
+
revision: "revisionNumber",
|
|
3258
|
+
subject: "subject",
|
|
3259
|
+
title: "title"
|
|
3260
|
+
}, Wn = {
|
|
3261
|
+
Company: "company",
|
|
3262
|
+
Manager: "manager"
|
|
3263
|
+
}, Gn = {
|
|
3264
|
+
lpwstr: W.Type.String,
|
|
3265
|
+
lpstr: W.Type.String,
|
|
3266
|
+
bstr: W.Type.String,
|
|
3267
|
+
i1: W.Type.Number,
|
|
3268
|
+
i2: W.Type.Number,
|
|
3269
|
+
i4: W.Type.Number,
|
|
3270
|
+
i8: W.Type.Number,
|
|
3271
|
+
int: W.Type.Number,
|
|
3272
|
+
ui1: W.Type.Number,
|
|
3273
|
+
ui2: W.Type.Number,
|
|
3274
|
+
ui4: W.Type.Number,
|
|
3275
|
+
ui8: W.Type.Number,
|
|
3276
|
+
uint: W.Type.Number,
|
|
3277
|
+
r4: W.Type.Float,
|
|
3278
|
+
r8: W.Type.Float,
|
|
3279
|
+
decimal: W.Type.Float,
|
|
3280
|
+
bool: W.Type.Boolean,
|
|
3281
|
+
filetime: W.Type.Date,
|
|
3282
|
+
date: W.Type.Date
|
|
3283
|
+
}, Kn = (e) => {
|
|
3284
|
+
let t = e.kind ? Gn[e.kind] : void 0;
|
|
3285
|
+
if (!t) return null;
|
|
3286
|
+
let n = e.value.trim(), r;
|
|
3287
|
+
if (t === W.Type.String) r = {
|
|
3288
|
+
key: e.key,
|
|
3289
|
+
type: t,
|
|
3290
|
+
value: e.value
|
|
3291
|
+
};
|
|
3292
|
+
else if (t === W.Type.Boolean) {
|
|
3293
|
+
if (n !== "true" && n !== "false" && n !== "1" && n !== "0") return null;
|
|
3294
|
+
r = {
|
|
3295
|
+
key: e.key,
|
|
3296
|
+
type: t,
|
|
3297
|
+
value: n === "true" || n === "1"
|
|
3298
|
+
};
|
|
3299
|
+
} else if (t === W.Type.Date) {
|
|
3300
|
+
let i = new Date(n);
|
|
3301
|
+
if (!n || isNaN(i.getTime())) return null;
|
|
3302
|
+
r = {
|
|
3303
|
+
key: e.key,
|
|
3304
|
+
type: t,
|
|
3305
|
+
value: i.toISOString()
|
|
3306
|
+
};
|
|
3307
|
+
} else {
|
|
3308
|
+
let i = Number(n);
|
|
3309
|
+
if (!n || !Number.isFinite(i)) return null;
|
|
3310
|
+
let a = t === W.Type.Number && i >= -2147483648 && i <= 2147483647;
|
|
3311
|
+
r = {
|
|
3312
|
+
key: e.key,
|
|
3313
|
+
type: a ? t : W.Type.Float,
|
|
3314
|
+
value: i
|
|
3315
|
+
};
|
|
3316
|
+
}
|
|
3317
|
+
return e.linkTarget && (r.linkTarget = e.linkTarget), r;
|
|
3318
|
+
}, qn = "hiddenXfs", Jn = (e) => (Array.isArray(e) ? e[1] : e?.v)?.s, Yn = (e) => {
|
|
2804
3319
|
if (!e || e.length === 0) return !1;
|
|
2805
|
-
let t =
|
|
3320
|
+
let t = V.refsToRuns(e, !0), n = 0;
|
|
2806
3321
|
for (let e of t) {
|
|
2807
3322
|
if (e.min > n || e.value?.s === void 0) return !1;
|
|
2808
3323
|
n = Math.max(n, e.max + 1);
|
|
2809
3324
|
}
|
|
2810
|
-
return n >
|
|
2811
|
-
},
|
|
3325
|
+
return n > A;
|
|
3326
|
+
}, Xn = (e, t) => {
|
|
2812
3327
|
e.protection = {
|
|
2813
3328
|
...e.protection,
|
|
2814
3329
|
showFormulas: t
|
|
2815
3330
|
};
|
|
2816
|
-
},
|
|
2817
|
-
let t =
|
|
2818
|
-
|
|
2819
|
-
|
|
3331
|
+
}, Zn = (e) => {
|
|
3332
|
+
let t = Array.isArray(e) ? e[1] : e.v;
|
|
3333
|
+
if (!t || !("s" in t)) return;
|
|
3334
|
+
let n = t.s;
|
|
3335
|
+
return delete t.s, n;
|
|
3336
|
+
}, Qn = (e, t, n, r) => {
|
|
3337
|
+
if (!e) return;
|
|
3338
|
+
let i = t ? 2 : 1, a = t ? n.rowStart : n.colStart, o = t ? n.rowEnd : n.colEnd, s, c = -1;
|
|
3339
|
+
for (let n of e) {
|
|
3340
|
+
let e = V.refToRun(n, t), l = Zn(n);
|
|
3341
|
+
e && l !== void 0 ? l !== c || (t ? s.colEnd : s.rowEnd) + 1 !== e.min ? (s = {
|
|
3342
|
+
colStart: t ? e.min : a,
|
|
3343
|
+
rowStart: t ? a : e.min,
|
|
3344
|
+
colEnd: t ? e.max : o,
|
|
3345
|
+
rowEnd: t ? o : e.max,
|
|
3346
|
+
value: {
|
|
3347
|
+
kind: i,
|
|
3348
|
+
index: l
|
|
3349
|
+
}
|
|
3350
|
+
}, c = l, r.push(s)) : t ? s.colEnd = e.max : s.rowEnd = e.max : c = -1;
|
|
3351
|
+
}
|
|
3352
|
+
}, $n = {
|
|
2820
3353
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": "workbooks",
|
|
2821
3354
|
"application/vnd.ms-excel.sheet.macroEnabled.main+xml": "workbooks",
|
|
2822
3355
|
"application/vnd.ms-excel.sheet.binary.macroEnabled.main": "workbooks",
|
|
2823
3356
|
"application/vnd.ms-excel.addin.macroEnabled.main+xml": "workbooks",
|
|
2824
3357
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": "workbooks",
|
|
3358
|
+
"application/vnd.ms-excel.template.macroEnabled.main+xml": "workbooks",
|
|
2825
3359
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": "sheets",
|
|
2826
3360
|
"application/vnd.ms-excel.worksheet": "sheets",
|
|
2827
3361
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": "charts",
|
|
2828
3362
|
"application/vnd.ms-excel.chartsheet": "charts",
|
|
2829
3363
|
"application/vnd.ms-excel.macrosheet+xml": "macros",
|
|
2830
3364
|
"application/vnd.ms-excel.macrosheet": "macros",
|
|
3365
|
+
"application/vnd.ms-excel.intlmacrosheet+xml": "macros",
|
|
2831
3366
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": "dialogs",
|
|
2832
3367
|
"application/vnd.ms-excel.dialogsheet": "dialogs",
|
|
2833
3368
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml": "strs",
|
|
@@ -2846,47 +3381,64 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2846
3381
|
"application/vnd.ms-excel.externalLink": "links",
|
|
2847
3382
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml": "links",
|
|
2848
3383
|
"application/vnd.openxmlformats-officedocument.theme+xml": "themes"
|
|
2849
|
-
},
|
|
2850
|
-
|
|
3384
|
+
}, er = se({ readXLSX: () => ar }), tr = (e) => e.startsWith("/") ? e.slice(1) : e, nr = [
|
|
3385
|
+
208,
|
|
3386
|
+
207,
|
|
3387
|
+
17,
|
|
3388
|
+
224,
|
|
3389
|
+
161,
|
|
3390
|
+
177,
|
|
3391
|
+
26,
|
|
3392
|
+
225
|
|
3393
|
+
], rr = /^xl\/worksheets\/[^/]+\.xml$/i, ir = (e) => typeof e == "string" ? e : (e?.runs ?? []).map((e) => e.text ?? "").join(""), ar = async (r, i) => {
|
|
3394
|
+
let { password: a, onVBA: o, profile: s, calcOnLoad: c = "auto", createWorkbookOptions: u = {}, ...d } = i ?? {};
|
|
3395
|
+
await Re.load();
|
|
3396
|
+
let p = !!u.origin && typeof u.origin != "string", h = s ? new et(typeof s == "function" ? s : void 0) : null, _ = [], v = (e, t, n) => {
|
|
2851
3397
|
_.push([
|
|
2852
3398
|
e,
|
|
2853
3399
|
t ?? "",
|
|
2854
3400
|
n
|
|
2855
3401
|
]);
|
|
2856
|
-
},
|
|
3402
|
+
}, b = { onWarning: v }, x = i?.progress, te = x?.onProgress ? x.onProgress.bind(x) : void 0, ne = r.byteLength, re = 0, ie = 0, oe = te ? (e) => {
|
|
2857
3403
|
if (re <= 0) return;
|
|
2858
|
-
|
|
2859
|
-
let t = Math.min(
|
|
2860
|
-
|
|
2861
|
-
} : void 0,
|
|
3404
|
+
ie += e;
|
|
3405
|
+
let t = Math.min(ne, Math.round(ie / re * ne));
|
|
3406
|
+
te(t, ne);
|
|
3407
|
+
} : void 0, se = import("./BiDqExNXiY7ykk8E.mjs"), le = null;
|
|
2862
3408
|
try {
|
|
2863
|
-
|
|
3409
|
+
le = new DOMParser();
|
|
2864
3410
|
} catch {}
|
|
2865
|
-
let
|
|
3411
|
+
let S = null;
|
|
2866
3412
|
try {
|
|
2867
|
-
|
|
3413
|
+
S = new XMLSerializer();
|
|
2868
3414
|
} catch {}
|
|
2869
|
-
let
|
|
2870
|
-
|
|
3415
|
+
let C, w, D, O = null;
|
|
3416
|
+
le || (O = import("./Bs0EzhdU8WgGfPzf.mjs").then((e) => y(e.default, 1)));
|
|
2871
3417
|
try {
|
|
2872
|
-
let [e, t] = await Promise.all([O,
|
|
2873
|
-
|
|
3418
|
+
let [e, t] = await Promise.all([O, se]);
|
|
3419
|
+
C = new t.DOMTransformer(), w = le ?? new e.DOMParser(), D = S ?? new e.XMLSerializer();
|
|
2874
3420
|
} catch (e) {
|
|
2875
3421
|
throw Error("Unable to load XLSX parser.", { cause: e });
|
|
2876
3422
|
}
|
|
2877
|
-
let
|
|
3423
|
+
let de = (e) => D.serializeToString(e);
|
|
3424
|
+
if (((e) => {
|
|
3425
|
+
if (e.byteLength < nr.length) return !1;
|
|
3426
|
+
let t = new Uint8Array(e, 0, nr.length);
|
|
3427
|
+
return nr.every((e, n) => t[n] === e);
|
|
3428
|
+
})(r)) throw new Ne("This is an Excel 97-2003 workbook (.xls), which cannot be read. Save it as '.xlsx' and try again.");
|
|
3429
|
+
let j;
|
|
2878
3430
|
try {
|
|
2879
|
-
|
|
3431
|
+
j = await $e.create(r);
|
|
2880
3432
|
} catch (e) {
|
|
2881
|
-
throw new
|
|
3433
|
+
throw new Ne("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.", { cause: e });
|
|
2882
3434
|
}
|
|
2883
|
-
|
|
3435
|
+
h?.mark("zip-open");
|
|
2884
3436
|
try {
|
|
2885
|
-
if (!
|
|
2886
|
-
let
|
|
2887
|
-
let t =
|
|
3437
|
+
if (!j.has("[Content_Types].xml")) throw new Ne("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3438
|
+
let r = (e) => {
|
|
3439
|
+
let t = j.getEntry(e);
|
|
2888
3440
|
return t ? { content: t } : void 0;
|
|
2889
|
-
},
|
|
3441
|
+
}, i = {
|
|
2890
3442
|
workbooks: [],
|
|
2891
3443
|
sheets: [],
|
|
2892
3444
|
charts: [],
|
|
@@ -2919,7 +3471,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2919
3471
|
let t = r.ContentType, n = r.PartName;
|
|
2920
3472
|
if (!t || !n) return;
|
|
2921
3473
|
e.overrides[n.startsWith("/") ? n.slice(1) : n] = t;
|
|
2922
|
-
let i =
|
|
3474
|
+
let i = $n[t], a = i ? e[i] : void 0;
|
|
2923
3475
|
Array.isArray(a) && a.push(n);
|
|
2924
3476
|
} else if (n === "Default") {
|
|
2925
3477
|
let t = r.Extension, n = r.ContentType;
|
|
@@ -2932,89 +3484,89 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2932
3484
|
onError: (e) => {
|
|
2933
3485
|
t?.(`Error parsing content types: ${e?.message ?? e}`);
|
|
2934
3486
|
}
|
|
2935
|
-
}))(
|
|
3487
|
+
}))(i, (e) => {
|
|
2936
3488
|
_.push([e, "[Content_Types].xml"]);
|
|
2937
|
-
}), t = await
|
|
3489
|
+
}), t = await j.getTextStream("[Content_Types].xml");
|
|
2938
3490
|
if (!t) throw Error("Error parsing content types: '[Content_Types].xml'");
|
|
2939
3491
|
try {
|
|
2940
|
-
await
|
|
3492
|
+
await Vt.parseStream(t, e, { xmlns: !1 });
|
|
2941
3493
|
} catch (e) {
|
|
2942
3494
|
throw Error("Error parsing content types: '[Content_Types].xml'", { cause: e });
|
|
2943
3495
|
}
|
|
2944
|
-
|
|
2945
|
-
}
|
|
2946
|
-
|
|
2947
|
-
let
|
|
2948
|
-
for (let e of
|
|
2949
|
-
|
|
2950
|
-
for (let e of
|
|
2951
|
-
if (await
|
|
2952
|
-
let
|
|
2953
|
-
if (
|
|
2954
|
-
for (let
|
|
2955
|
-
|
|
3496
|
+
p && await j.getBuffer("[Content_Types].xml");
|
|
3497
|
+
}
|
|
3498
|
+
h?.mark("content-types");
|
|
3499
|
+
let a = i.sst, d = /* @__PURE__ */ new Set();
|
|
3500
|
+
for (let e of i.sheets) d.add(tr(e));
|
|
3501
|
+
a && d.add(tr(a));
|
|
3502
|
+
for (let e of d) re += j.uncompressedSize(e);
|
|
3503
|
+
if (await j.prefetch((e) => !d.has(e) && !rr.test(e)), h?.mark("prefetch-side-parts"), i.workbooks.length === 0) {
|
|
3504
|
+
let e = xe("_rels/.rels", r, w, C, b);
|
|
3505
|
+
if (e) {
|
|
3506
|
+
for (let t of e.values()) if (t.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" && t.target) {
|
|
3507
|
+
i.workbooks.push(t.target);
|
|
2956
3508
|
break;
|
|
2957
3509
|
}
|
|
2958
3510
|
}
|
|
2959
3511
|
}
|
|
2960
|
-
if (
|
|
2961
|
-
|
|
2962
|
-
let
|
|
2963
|
-
|
|
3512
|
+
if (i.workbooks.length === 0) throw new Ne("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3513
|
+
i.richstructure = ["/xl/richData/rdrichvaluestructure.xml"], i.richdata = ["/xl/richData/rdrichvalue.xml"];
|
|
3514
|
+
let y = u?.resources ?? new We(), ie = y.beginPersist(), se = {}, le = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Map();
|
|
3515
|
+
S.set("richTypes", []), S.set("parseInlineDxf", (e) => {
|
|
2964
3516
|
if (!e) return;
|
|
2965
|
-
let t =
|
|
3517
|
+
let t = w.parseFromString(`<dxf xmlns:x14="${n}" xmlns:xm="${ee}">${e}</dxf>`, "text/xml")?.documentElement;
|
|
2966
3518
|
if (!t) return;
|
|
2967
|
-
let
|
|
2968
|
-
return Object.keys(
|
|
3519
|
+
let r = C.parseDxf(t, "", b);
|
|
3520
|
+
return Object.keys(r).length > 0 ? r : void 0;
|
|
2969
3521
|
});
|
|
2970
|
-
let
|
|
2971
|
-
|
|
2972
|
-
let O =
|
|
2973
|
-
O &&
|
|
2974
|
-
let M = /* @__PURE__ */ new Map(),
|
|
2975
|
-
|
|
2976
|
-
},
|
|
2977
|
-
let
|
|
2978
|
-
return a || (a =
|
|
2979
|
-
},
|
|
2980
|
-
let a =
|
|
3522
|
+
let D = [];
|
|
3523
|
+
S.set("dummyWrapped", D);
|
|
3524
|
+
let O = L("metadata", i, r, w, C, b).entries().next()?.value?.[1]?.metadata;
|
|
3525
|
+
O && S.set("metadata", O), S.set(En, e());
|
|
3526
|
+
let M = /* @__PURE__ */ new Map(), fe = [], pe = /* @__PURE__ */ new Set(), N = (e) => {
|
|
3527
|
+
pe.add(tr(e));
|
|
3528
|
+
}, P = (e, t = M) => {
|
|
3529
|
+
let n = e.lastIndexOf("/"), i = e.substring(0, n + 1) + "_rels/" + e.substring(n + 1, e.length) + ".rels", a = t.get(i);
|
|
3530
|
+
return a || (a = xe(i, r, w, C, H), t.set(i, a)), a;
|
|
3531
|
+
}, F = (e, t, n, i = M) => {
|
|
3532
|
+
let a = P(t, i).get(e), o = a?.target;
|
|
2981
3533
|
if (!o) return null;
|
|
2982
3534
|
if (a.targetMode === "External") {
|
|
2983
|
-
if (!
|
|
2984
|
-
let e =
|
|
2985
|
-
return e.addReference(
|
|
2986
|
-
}
|
|
2987
|
-
let s =
|
|
2988
|
-
o.startsWith("/") || (o = c + o), o =
|
|
2989
|
-
let
|
|
2990
|
-
if (!
|
|
3535
|
+
if (!n) return a.target;
|
|
3536
|
+
let e = y.add({ source: { external: a.target } });
|
|
3537
|
+
return e.addReference(se), le.add(e), ie.toResourceId(e);
|
|
3538
|
+
}
|
|
3539
|
+
let s = t.lastIndexOf("/"), c = t.substring(0, s + 1);
|
|
3540
|
+
o.startsWith("/") || (o = c + o), o = ge(o);
|
|
3541
|
+
let l = C?.getVisitorParamsState().get("dxfs"), u = i.get(o);
|
|
3542
|
+
if (!u) {
|
|
2991
3543
|
if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
2992
3544
|
let e = {};
|
|
2993
|
-
|
|
2994
|
-
let t =
|
|
3545
|
+
u = e, fe.push((async () => {
|
|
3546
|
+
let t = An(e, (e, t) => t === "legacyDrawing" ? we(e, o) : t === "formControl" ? Te(e, o) : t === "part" ? Ee(e, o) : F(e, o, t === "resource") ?? null, Ge, l, () => {}, (e, t, n) => {
|
|
2995
3547
|
v(e, t ? `${t} (${o})` : o, n);
|
|
2996
|
-
}, void 0,
|
|
3548
|
+
}, void 0, S), n = await j.getTextStream(o, oe);
|
|
2997
3549
|
if (n) try {
|
|
2998
|
-
await
|
|
3550
|
+
await Vt.parseStream(n, t, {
|
|
2999
3551
|
xmlns: !1,
|
|
3000
3552
|
lean: !0
|
|
3001
3553
|
});
|
|
3002
3554
|
} catch (e) {
|
|
3003
3555
|
throw Error(`Error parsing sheet: '${o}'`, { cause: e });
|
|
3004
3556
|
}
|
|
3005
|
-
let r =
|
|
3557
|
+
let r = P(o, i);
|
|
3006
3558
|
if (r) {
|
|
3007
|
-
|
|
3559
|
+
Se(e, o, r, i), E(e), I(e);
|
|
3008
3560
|
let t = [];
|
|
3009
3561
|
r.forEach((e, n) => {
|
|
3010
3562
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable") return;
|
|
3011
|
-
let r =
|
|
3563
|
+
let r = Ee(n, o, e.type, (e) => e !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition");
|
|
3012
3564
|
if (!r?.xml) return;
|
|
3013
3565
|
let i = /<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0] ?? "", a = parseInt(/\scacheId="(\d+)"/.exec(i)?.[1] ?? "", 10);
|
|
3014
3566
|
if (isNaN(a)) return void _.push([`Pivot table '${r.name}' names no cache and was dropped.`, o]);
|
|
3015
3567
|
let s = /\sname="([^"]*)"/.exec(i)?.[1];
|
|
3016
3568
|
t.push({
|
|
3017
|
-
...s ? { name:
|
|
3569
|
+
...s ? { name: ye(s) } : {},
|
|
3018
3570
|
cacheId: a,
|
|
3019
3571
|
part: r
|
|
3020
3572
|
});
|
|
@@ -3022,12 +3574,12 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3022
3574
|
}
|
|
3023
3575
|
})());
|
|
3024
3576
|
} else if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink") {
|
|
3025
|
-
let
|
|
3026
|
-
if (
|
|
3027
|
-
let
|
|
3028
|
-
delete
|
|
3577
|
+
let e = me(o, r, w, C, H);
|
|
3578
|
+
if (e && Object.keys(e).length !== 0) {
|
|
3579
|
+
let t = e, n = t.__bookRelId, r = t.__absoluteUrlRelId;
|
|
3580
|
+
delete t.__bookRelId, delete t.__absoluteUrlRelId;
|
|
3029
3581
|
let a = [];
|
|
3030
|
-
|
|
3582
|
+
P(o, i)?.forEach((e, t) => {
|
|
3031
3583
|
if (e.targetMode === "External" && e.type && e.target) {
|
|
3032
3584
|
let i = {
|
|
3033
3585
|
type: e.type,
|
|
@@ -3035,177 +3587,162 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3035
3587
|
};
|
|
3036
3588
|
t === n ? i.role = "book" : t === r && (i.role = "absoluteUrl"), a.push(i);
|
|
3037
3589
|
}
|
|
3038
|
-
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)),
|
|
3039
|
-
} else
|
|
3040
|
-
} else
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
if (!o) return null;
|
|
3048
|
-
let s = o.content;
|
|
3049
|
-
try {
|
|
3050
|
-
n && (s = n(s, e));
|
|
3051
|
-
} catch (t) {
|
|
3052
|
-
z(e, t, r);
|
|
3053
|
-
}
|
|
3054
|
-
return r?.parsedRefs?.set(e, s), s;
|
|
3055
|
-
})(o, e, (e, t) => {
|
|
3056
|
-
let n = x.add({ source: { buffer: e } });
|
|
3057
|
-
return n.addReference(C), w.add(n), S.toResourceId(n);
|
|
3058
|
-
}, W) : Oe(o, e, E, T, W);
|
|
3059
|
-
}
|
|
3060
|
-
return d;
|
|
3061
|
-
}, L = (e, t) => {
|
|
3590
|
+
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), t.sources = a, N(o), u = t;
|
|
3591
|
+
} else u = null;
|
|
3592
|
+
} else u = n ? T(o, r, (e, t) => {
|
|
3593
|
+
let n = y.add({ source: { buffer: e } });
|
|
3594
|
+
return n.addReference(se), le.add(n), ie.toResourceId(n);
|
|
3595
|
+
}, H) : me(o, r, w, C, H);
|
|
3596
|
+
}
|
|
3597
|
+
return u;
|
|
3598
|
+
}, be = (e, t) => {
|
|
3062
3599
|
if (!e) return null;
|
|
3063
|
-
let n =
|
|
3600
|
+
let n = P(t, M)?.get(e);
|
|
3064
3601
|
if (!n?.target || n.targetMode === "External") return null;
|
|
3065
3602
|
let r = n.target;
|
|
3066
|
-
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r),
|
|
3067
|
-
},
|
|
3068
|
-
let
|
|
3069
|
-
|
|
3603
|
+
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r), ge(r);
|
|
3604
|
+
}, Se = (e, n, r, i) => {
|
|
3605
|
+
let a = [], o = /* @__PURE__ */ new Map(), s = [];
|
|
3606
|
+
r.forEach((e, t) => {
|
|
3070
3607
|
if (e.type !== "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment") return;
|
|
3071
|
-
let
|
|
3072
|
-
if (!
|
|
3073
|
-
for (let e = 0; e <
|
|
3074
|
-
let t =
|
|
3608
|
+
let r = F(t, n, !1, i)?.comments;
|
|
3609
|
+
if (!r) return;
|
|
3610
|
+
for (let e = 0; e < r.length; e++) {
|
|
3611
|
+
let t = r[e];
|
|
3075
3612
|
if (!t?.v?.id) continue;
|
|
3076
|
-
let { parentId: n, done:
|
|
3613
|
+
let { parentId: n, done: i, content: c, ...l } = t.v, u = {
|
|
3077
3614
|
...l,
|
|
3078
|
-
content:
|
|
3615
|
+
content: ir(c)
|
|
3079
3616
|
};
|
|
3080
|
-
n ?
|
|
3617
|
+
n ? s.push({
|
|
3081
3618
|
parentId: n,
|
|
3082
3619
|
json: u
|
|
3083
|
-
}) : (
|
|
3620
|
+
}) : (i && (u.done = !0), o.set(u.id, u), a.push({
|
|
3084
3621
|
r: t.r,
|
|
3085
3622
|
v: u
|
|
3086
3623
|
}));
|
|
3087
3624
|
}
|
|
3088
|
-
let c =
|
|
3089
|
-
c &&
|
|
3625
|
+
let c = be(t, n);
|
|
3626
|
+
c && N(c);
|
|
3090
3627
|
});
|
|
3091
|
-
for (let e = 0; e <
|
|
3092
|
-
let { parentId: t, json: n } =
|
|
3628
|
+
for (let e = 0; e < s.length; e++) {
|
|
3629
|
+
let { parentId: t, json: n } = s[e], r = o.get(t);
|
|
3093
3630
|
r && (r.replies ??= []).push(n);
|
|
3094
3631
|
}
|
|
3095
|
-
let
|
|
3096
|
-
if (
|
|
3632
|
+
let c = [];
|
|
3633
|
+
if (r.forEach((e, t) => {
|
|
3097
3634
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") return;
|
|
3098
|
-
let
|
|
3099
|
-
if (!
|
|
3100
|
-
let
|
|
3101
|
-
for (let e = 0; e <
|
|
3102
|
-
let t =
|
|
3635
|
+
let r = F(t, n, !1, i), a = r?.comments;
|
|
3636
|
+
if (!a) return;
|
|
3637
|
+
let s = r?.authors;
|
|
3638
|
+
for (let e = 0; e < a.length; e++) {
|
|
3639
|
+
let t = a[e];
|
|
3103
3640
|
if (!t?.r) continue;
|
|
3104
|
-
let n =
|
|
3641
|
+
let n = s && t.v.authorId !== void 0 ? s[t.v.authorId] : void 0;
|
|
3105
3642
|
if (n && n.startsWith("tc=")) {
|
|
3106
|
-
if (
|
|
3643
|
+
if (o.has(k(n.substring(3)))) continue;
|
|
3107
3644
|
n = void 0;
|
|
3108
3645
|
}
|
|
3109
3646
|
let r = {
|
|
3110
|
-
id:
|
|
3647
|
+
id: z.uuidV4().toUpperCase(),
|
|
3111
3648
|
asNote: !0,
|
|
3112
3649
|
content: t.v.content ?? ""
|
|
3113
|
-
}, i = n ?
|
|
3114
|
-
i && (r.personId = i.id),
|
|
3650
|
+
}, i = n ? Le({ displayName: n }) : void 0;
|
|
3651
|
+
i && (r.personId = i.id), c.push({
|
|
3115
3652
|
r: t.r,
|
|
3116
3653
|
v: r
|
|
3117
3654
|
});
|
|
3118
3655
|
}
|
|
3119
|
-
let l =
|
|
3120
|
-
l &&
|
|
3121
|
-
}),
|
|
3122
|
-
let
|
|
3123
|
-
if (
|
|
3124
|
-
let { rest:
|
|
3125
|
-
if (
|
|
3126
|
-
let
|
|
3127
|
-
for (let e = 0; e <
|
|
3128
|
-
let t =
|
|
3129
|
-
|
|
3656
|
+
let l = be(t, n);
|
|
3657
|
+
l && N(l);
|
|
3658
|
+
}), a.length === 0 && c.length === 0) return;
|
|
3659
|
+
let l = [...a, ...c], u = e.legacyDrawing;
|
|
3660
|
+
if (u?.xml) {
|
|
3661
|
+
let { rest: n, notes: r } = De(u.xml);
|
|
3662
|
+
if (r.length > 0) {
|
|
3663
|
+
let i = /* @__PURE__ */ new Map();
|
|
3664
|
+
for (let e = 0; e < r.length; e++) {
|
|
3665
|
+
let t = r[e];
|
|
3666
|
+
i.set(V.cellToString({
|
|
3130
3667
|
rowIndex: t.row,
|
|
3131
3668
|
colIndex: t.col
|
|
3132
3669
|
}), t);
|
|
3133
3670
|
}
|
|
3134
|
-
for (let e = 0; e <
|
|
3135
|
-
let
|
|
3136
|
-
if (!
|
|
3137
|
-
let
|
|
3138
|
-
if (
|
|
3139
|
-
let [e, t,
|
|
3140
|
-
|
|
3671
|
+
for (let e = 0; e < l.length; e++) {
|
|
3672
|
+
let n = l[e], r = i.get(String(n.r).toUpperCase());
|
|
3673
|
+
if (!r || (i.delete(String(n.r).toUpperCase()), !n.v.asNote)) continue;
|
|
3674
|
+
let a = t(r.xml), o = {};
|
|
3675
|
+
if (a.anchor) {
|
|
3676
|
+
let [e, t, n, i, s, c, l, u] = a.anchor;
|
|
3677
|
+
o.anchor = {
|
|
3141
3678
|
tl: {
|
|
3142
|
-
c: e -
|
|
3679
|
+
c: e - r.col,
|
|
3143
3680
|
x: t,
|
|
3144
|
-
r:
|
|
3145
|
-
y:
|
|
3681
|
+
r: n - r.row,
|
|
3682
|
+
y: i
|
|
3146
3683
|
},
|
|
3147
3684
|
br: {
|
|
3148
|
-
c: s -
|
|
3685
|
+
c: s - r.col,
|
|
3149
3686
|
x: c,
|
|
3150
|
-
r: l -
|
|
3687
|
+
r: l - r.row,
|
|
3151
3688
|
y: u
|
|
3152
3689
|
}
|
|
3153
3690
|
};
|
|
3154
|
-
}
|
|
3155
|
-
|
|
3691
|
+
} else a.bounds && (o.bounds = a.bounds);
|
|
3692
|
+
a.style.fill && (o.fill = a.style.fill), a.style.stroke && (o.stroke = a.style.stroke), a.xml && (o.xml = a.xml), (o.anchor || o.bounds || o.fill || o.stroke || o.xml) && (n.v.box = o), a.visible && (n.v.shown = !0), a.alt && (n.v.description = a.alt);
|
|
3156
3693
|
}
|
|
3157
|
-
let
|
|
3158
|
-
|
|
3159
|
-
|
|
3694
|
+
let a = [];
|
|
3695
|
+
i.forEach((e) => {
|
|
3696
|
+
a.push(e.xml);
|
|
3160
3697
|
});
|
|
3161
|
-
let
|
|
3162
|
-
|
|
3698
|
+
let o = ke(n, a);
|
|
3699
|
+
o ? u.xml = o : delete e.legacyDrawing;
|
|
3163
3700
|
}
|
|
3164
3701
|
}
|
|
3165
|
-
e.comments =
|
|
3166
|
-
},
|
|
3167
|
-
let
|
|
3168
|
-
if (!
|
|
3169
|
-
let i =
|
|
3702
|
+
e.comments = l;
|
|
3703
|
+
}, we = (e, t) => {
|
|
3704
|
+
let n = be(e, t);
|
|
3705
|
+
if (!n) return null;
|
|
3706
|
+
let i = r(tr(n));
|
|
3170
3707
|
if (!i) return null;
|
|
3171
|
-
let a = { xml: new TextDecoder("utf-8").decode(i.content) }, o = [];
|
|
3172
|
-
return
|
|
3708
|
+
let a = { xml: Hn(new TextDecoder("utf-8").decode(i.content)) }, o = [];
|
|
3709
|
+
return P(n, M)?.forEach((e, t) => {
|
|
3173
3710
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") return;
|
|
3174
|
-
let
|
|
3175
|
-
typeof
|
|
3711
|
+
let r = F(t, n, !0);
|
|
3712
|
+
typeof r == "number" && o.push({
|
|
3176
3713
|
id: t,
|
|
3177
|
-
resId:
|
|
3714
|
+
resId: r
|
|
3178
3715
|
});
|
|
3179
|
-
}), o.length > 0 && (a.images = o),
|
|
3180
|
-
},
|
|
3181
|
-
let
|
|
3182
|
-
if (!
|
|
3183
|
-
let i =
|
|
3184
|
-
return i &&
|
|
3185
|
-
},
|
|
3186
|
-
let s =
|
|
3716
|
+
}), o.length > 0 && (a.images = o), N(n), a;
|
|
3717
|
+
}, Te = (e, t) => {
|
|
3718
|
+
let n = be(e, t);
|
|
3719
|
+
if (!n) return null;
|
|
3720
|
+
let i = me(n, r, w, C, H)?.formControl ?? null;
|
|
3721
|
+
return i && N(n), i;
|
|
3722
|
+
}, Ee = (e, t, n, a, o = /* @__PURE__ */ new Set()) => {
|
|
3723
|
+
let s = be(e, t);
|
|
3187
3724
|
if (!s || o.has(s)) return null;
|
|
3188
|
-
let c =
|
|
3725
|
+
let c = n ?? P(t, M)?.get(e)?.type;
|
|
3189
3726
|
if (!c) return null;
|
|
3190
|
-
let l =
|
|
3727
|
+
let l = r(tr(s));
|
|
3191
3728
|
if (!l) return null;
|
|
3192
3729
|
o.add(s);
|
|
3193
|
-
let u = s.substring(s.lastIndexOf("/") + 1), d =
|
|
3194
|
-
id:
|
|
3730
|
+
let u = s.substring(s.lastIndexOf("/") + 1), d = i.overrides[tr(s)] ?? i.defaults[u.substring(u.lastIndexOf(".") + 1).toLowerCase()], f = {
|
|
3731
|
+
id: e,
|
|
3195
3732
|
type: c,
|
|
3196
3733
|
name: u
|
|
3197
3734
|
};
|
|
3198
3735
|
if (d && (f.contentType = d), ((e, t) => e ? e.endsWith("+xml") || e === "application/xml" : /\.(xml|rels|vml)$/i.test(t))(d, u)) f.xml = new TextDecoder("utf-8").decode(l.content);
|
|
3199
3736
|
else {
|
|
3200
|
-
let
|
|
3201
|
-
if (typeof
|
|
3202
|
-
f.resId =
|
|
3737
|
+
let n = F(e, t, !0);
|
|
3738
|
+
if (typeof n != "number") return null;
|
|
3739
|
+
f.resId = n;
|
|
3203
3740
|
}
|
|
3204
3741
|
let p = [];
|
|
3205
|
-
return
|
|
3742
|
+
return P(s, M)?.forEach((e, t) => {
|
|
3206
3743
|
if (!e?.type || a && !a(e.type)) return;
|
|
3207
3744
|
if (e.targetMode === "External") {
|
|
3208
|
-
let n =
|
|
3745
|
+
let n = F(t, s, !0);
|
|
3209
3746
|
typeof n == "number" && p.push({
|
|
3210
3747
|
id: t,
|
|
3211
3748
|
type: e.type,
|
|
@@ -3213,129 +3750,159 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3213
3750
|
});
|
|
3214
3751
|
return;
|
|
3215
3752
|
}
|
|
3216
|
-
let n =
|
|
3753
|
+
let n = Ee(t, s, e.type, a, o);
|
|
3217
3754
|
n && p.push(n);
|
|
3218
|
-
}), p.length > 0 && (f.parts = p),
|
|
3219
|
-
};
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3755
|
+
}), p.length > 0 && (f.parts = p), N(s), f;
|
|
3756
|
+
}, Oe = L("coreprops", i, r, w, C, b), Ae = L("extprops", i, r, w, C, b), je = L("custprops", i, r, w, C, b);
|
|
3757
|
+
je.forEach((e, t) => {
|
|
3758
|
+
e?.custom && N(t);
|
|
3759
|
+
});
|
|
3760
|
+
let Fe = new Ue(), Ie = L("people", i, r, w, C, b);
|
|
3761
|
+
if (Ie.size > 0) {
|
|
3762
|
+
let [e, t] = Ie.entries().next().value;
|
|
3763
|
+
Fe.fromJSON(t?.persons), N(e);
|
|
3764
|
+
}
|
|
3765
|
+
let Le = (e) => {
|
|
3766
|
+
if (e) return Fe.add(e).toJSON();
|
|
3767
|
+
}, H = {
|
|
3768
|
+
paramMap: S,
|
|
3769
|
+
getRefs: P,
|
|
3770
|
+
getRef: F,
|
|
3232
3771
|
parsedRefs: M,
|
|
3233
|
-
readEmbeddedPart: (e, t) =>
|
|
3234
|
-
addPerson:
|
|
3235
|
-
serializeElement:
|
|
3772
|
+
readEmbeddedPart: (e, t) => Ee(e, t),
|
|
3773
|
+
addPerson: Le,
|
|
3774
|
+
serializeElement: de,
|
|
3236
3775
|
onWarning: v
|
|
3237
|
-
},
|
|
3238
|
-
if (
|
|
3239
|
-
let e = await
|
|
3776
|
+
}, U = [], W = /* @__PURE__ */ new Map();
|
|
3777
|
+
if (S.set(On, W), a) {
|
|
3778
|
+
let e = await j.getTextStream(a, oe);
|
|
3240
3779
|
if (e) {
|
|
3241
3780
|
let t = ((e, t) => {
|
|
3242
|
-
let n = !1, r = !1, i = 0, a = "";
|
|
3781
|
+
let n = !1, r = !1, i = 0, a = "", o = new xn();
|
|
3243
3782
|
return {
|
|
3244
3783
|
onOpenTag: (e) => {
|
|
3245
|
-
let t =
|
|
3246
|
-
t === "t" ? n && i === 0 && (r = !0) : t === "si" ? (n = !0, a = "", i = 0) : t
|
|
3784
|
+
let t = bn(e.name);
|
|
3785
|
+
t === "t" ? n && i === 0 && (r = !0) : t === "si" ? (n = !0, a = "", o.reset(), i = 0) : t === "rPh" || t === "phoneticPr" ? i++ : n && i === 0 && o.onOpenTag(t, e.attributes);
|
|
3247
3786
|
},
|
|
3248
3787
|
onText: (e) => {
|
|
3249
|
-
r && (a += e);
|
|
3788
|
+
r && (a += e, o.onText(e));
|
|
3250
3789
|
},
|
|
3251
3790
|
onCloseTag: (t) => {
|
|
3252
|
-
let
|
|
3253
|
-
|
|
3791
|
+
let s = bn(t.name);
|
|
3792
|
+
s === "t" ? r = !1 : s === "si" ? (e(l(a), o.take() ?? void 0), n = !1, a = "") : s === "rPh" || s === "phoneticPr" ? i > 0 && i-- : o.onCloseTag(s);
|
|
3254
3793
|
},
|
|
3255
3794
|
onError: (e) => {
|
|
3256
3795
|
t?.(`Error parsing shared strings: ${e?.message ?? e}`);
|
|
3257
3796
|
}
|
|
3258
3797
|
};
|
|
3259
|
-
})((e) => {
|
|
3260
|
-
|
|
3798
|
+
})((e, t) => {
|
|
3799
|
+
t && W.set(U.length, t), U.push(e);
|
|
3261
3800
|
}, (e) => {
|
|
3262
|
-
v(e,
|
|
3801
|
+
v(e, a);
|
|
3263
3802
|
});
|
|
3264
3803
|
try {
|
|
3265
|
-
await
|
|
3804
|
+
await Vt.parseStream(e, t, { xmlns: !1 });
|
|
3266
3805
|
} catch (e) {
|
|
3267
|
-
throw Error(`Error parsing shared strings: '${
|
|
3806
|
+
throw Error(`Error parsing shared strings: '${a}'`, { cause: e });
|
|
3268
3807
|
}
|
|
3269
3808
|
}
|
|
3270
3809
|
}
|
|
3271
|
-
|
|
3272
|
-
let
|
|
3273
|
-
let t =
|
|
3810
|
+
h?.mark("shared-strings");
|
|
3811
|
+
let Be = U.length, Ve = /* @__PURE__ */ new Map(), He = Be, Ge = (e) => {
|
|
3812
|
+
let t = Ve.get(e);
|
|
3274
3813
|
if (t !== void 0) return t;
|
|
3275
|
-
let n =
|
|
3276
|
-
return
|
|
3277
|
-
},
|
|
3278
|
-
|
|
3279
|
-
let
|
|
3280
|
-
for (let e = 0; e <
|
|
3281
|
-
let t =
|
|
3282
|
-
t && t.startsWith("xl/slicerCache") &&
|
|
3283
|
-
}
|
|
3284
|
-
let
|
|
3285
|
-
|
|
3286
|
-
e?.cacheName && (e.cachePath = t,
|
|
3287
|
-
}),
|
|
3288
|
-
let
|
|
3289
|
-
|
|
3290
|
-
for (let e = 0; e <
|
|
3291
|
-
let t =
|
|
3292
|
-
t && t.startsWith("xl/slicers/") && t.endsWith(".xml") &&
|
|
3293
|
-
}
|
|
3294
|
-
|
|
3295
|
-
let
|
|
3296
|
-
if (
|
|
3297
|
-
let e =
|
|
3298
|
-
e?.value?.[1] && (
|
|
3299
|
-
}
|
|
3300
|
-
let
|
|
3301
|
-
|
|
3302
|
-
let
|
|
3303
|
-
|
|
3814
|
+
let n = He;
|
|
3815
|
+
return Ve.set(e, He++), U.push(e), n;
|
|
3816
|
+
}, qe = [];
|
|
3817
|
+
i.slicersCache = qe;
|
|
3818
|
+
let Ye = j.getNames(), Qe = Ye.length;
|
|
3819
|
+
for (let e = 0; e < Qe; e++) {
|
|
3820
|
+
let t = Ye[e];
|
|
3821
|
+
t && t.startsWith("xl/slicerCache") && qe.push(`/${t}`);
|
|
3822
|
+
}
|
|
3823
|
+
let $e = L("slicersCache", i, r, w, C, H), et = /* @__PURE__ */ new Map();
|
|
3824
|
+
$e.forEach((e, t) => {
|
|
3825
|
+
e?.cacheName && (e.cachePath = t, et.set(e.cacheName, e));
|
|
3826
|
+
}), S.set("slicerCaches", et);
|
|
3827
|
+
let tt = [];
|
|
3828
|
+
i.slicers = tt;
|
|
3829
|
+
for (let e = 0; e < Qe; e++) {
|
|
3830
|
+
let t = Ye[e];
|
|
3831
|
+
t && t.startsWith("xl/slicers/") && t.endsWith(".xml") && tt.push(`/${t}`);
|
|
3832
|
+
}
|
|
3833
|
+
L("richstructure", i, r, w, C, H), L("richdata", i, r, w, C, H);
|
|
3834
|
+
let nt = L("themes", i, r, w, C, H), rt = null;
|
|
3835
|
+
if (nt && nt.entries) {
|
|
3836
|
+
let e = nt.entries().next();
|
|
3837
|
+
e?.value?.[1] && (rt = e.value[1]);
|
|
3838
|
+
}
|
|
3839
|
+
let it = new Ke(rt), at = L("styles", i, r, w, C, H).entries().next()?.value?.[1];
|
|
3840
|
+
at &&= JSON.parse(Me.JSONStableStringify(at));
|
|
3841
|
+
let ot = L("workbooks", i, r, w, C, H);
|
|
3842
|
+
S.set(Dn, !0 === ot.entries().next().value?.[1]?.date1904), h?.mark("side-parts-json"), await Promise.all(fe);
|
|
3304
3843
|
{
|
|
3305
|
-
let
|
|
3844
|
+
let t = ot.entries().next().value?.[1], n = e(t?.names), r = t?.sheets ?? [];
|
|
3306
3845
|
for (let e = 0; e < r.length; e++) {
|
|
3307
|
-
let
|
|
3308
|
-
|
|
3846
|
+
let t = r[e], i = g(t);
|
|
3847
|
+
if (t?.kind === "macro" && i?.part.xml) {
|
|
3848
|
+
i.part.xml = m(i.part.xml, U);
|
|
3849
|
+
continue;
|
|
3850
|
+
}
|
|
3851
|
+
let a = R(t);
|
|
3852
|
+
a && ue(a, n);
|
|
3309
3853
|
}
|
|
3310
|
-
let i =
|
|
3854
|
+
let i = t?.names;
|
|
3311
3855
|
if (i) for (let e = 0; e < i.length; e++) {
|
|
3312
3856
|
let t = i[e]?.ref;
|
|
3313
3857
|
typeof t == "string" && (i[e].ref = n.readDetached(t));
|
|
3314
3858
|
}
|
|
3315
3859
|
}
|
|
3316
|
-
|
|
3317
|
-
let
|
|
3318
|
-
...
|
|
3319
|
-
styles:
|
|
3320
|
-
theme:
|
|
3321
|
-
}
|
|
3322
|
-
|
|
3860
|
+
te && re > 0 && (te(ne, ne), await new Promise((e) => setTimeout(e, 0))), h?.mark("sheets");
|
|
3861
|
+
let st = {
|
|
3862
|
+
...ot.entries().next().value?.[1],
|
|
3863
|
+
styles: at,
|
|
3864
|
+
theme: it.toJSON()
|
|
3865
|
+
}, ct = ((e, t, n, r) => {
|
|
3866
|
+
let i = {}, a = (e, t) => {
|
|
3867
|
+
if (e) for (let { key: n, value: r } of e) {
|
|
3868
|
+
let e = t[n];
|
|
3869
|
+
if (e && r) {
|
|
3870
|
+
if (e === "revisionNumber") {
|
|
3871
|
+
let e = parseInt(r, 10);
|
|
3872
|
+
Number.isFinite(e) && (i.revisionNumber = e);
|
|
3873
|
+
} else i[e] = r;
|
|
3874
|
+
}
|
|
3875
|
+
}
|
|
3876
|
+
};
|
|
3877
|
+
if (a(e, Un), a(t, Wn), n) {
|
|
3878
|
+
let e = [];
|
|
3879
|
+
for (let t of n) {
|
|
3880
|
+
let n = Kn(t);
|
|
3881
|
+
n ? e.push(n) : r?.(`The custom document property '${t.key}' holds a value of a kind that is not read (${t.kind ? "vt:" + t.kind : "none"}); it was dropped.`, "xlsx.docProps.custom.kind");
|
|
3882
|
+
}
|
|
3883
|
+
e.length > 0 && (i.custom = e);
|
|
3884
|
+
}
|
|
3885
|
+
return Object.keys(i).length > 0 ? i : void 0;
|
|
3886
|
+
})(Oe.values().next().value?.properties, Ae.values().next().value?.properties, je.values().next().value?.custom, (e, t) => {
|
|
3887
|
+
v(e, "docProps/custom.xml", t);
|
|
3888
|
+
});
|
|
3889
|
+
ct && (st.properties = ct), ((e, t) => {
|
|
3323
3890
|
if (!t || t.size === 0) return;
|
|
3324
3891
|
let n = e.styles;
|
|
3325
3892
|
if (!n) return;
|
|
3326
3893
|
let r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
3327
3894
|
for (let n of e.sheets ?? []) {
|
|
3328
|
-
let e = n
|
|
3895
|
+
let e = R(n);
|
|
3329
3896
|
if (!e) continue;
|
|
3330
3897
|
let a = /* @__PURE__ */ new Set();
|
|
3331
|
-
|
|
3898
|
+
Yn(e.cols) || a.add(0);
|
|
3332
3899
|
for (let t of e.directStyles ?? []) a.add(Array.isArray(t) ? t[1] : t.v);
|
|
3333
3900
|
for (let t of e.rows ?? []) {
|
|
3334
|
-
let e =
|
|
3901
|
+
let e = Jn(t);
|
|
3335
3902
|
e !== void 0 && a.add(e);
|
|
3336
3903
|
}
|
|
3337
3904
|
for (let t of e.cols ?? []) {
|
|
3338
|
-
let e =
|
|
3905
|
+
let e = Jn(t);
|
|
3339
3906
|
e !== void 0 && a.add(e);
|
|
3340
3907
|
}
|
|
3341
3908
|
let o = !1;
|
|
@@ -3353,103 +3920,145 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3353
3920
|
}
|
|
3354
3921
|
if (r.size === 0) return;
|
|
3355
3922
|
let a = n.direct ??= [];
|
|
3356
|
-
for (let e of r) e !== 0 &&
|
|
3357
|
-
for (let e of i) e !== 0 &&
|
|
3923
|
+
for (let e of r) e !== 0 && Xn(a[e] ?? (a[e] = {}), !0);
|
|
3924
|
+
for (let e of i) e !== 0 && Xn(a[e] ?? (a[e] = {}), !1);
|
|
3358
3925
|
if (r.has(0)) {
|
|
3359
|
-
let e = n.named ??= [], t =
|
|
3926
|
+
let e = n.named ??= [], t = ze.BuiltInName.Normal.toLowerCase(), r = e.find((e) => e.name?.toLowerCase() === t);
|
|
3360
3927
|
r || (r = {
|
|
3361
|
-
name:
|
|
3928
|
+
name: ze.BuiltInName.Normal,
|
|
3362
3929
|
style: {}
|
|
3363
|
-
}, e.push(r)),
|
|
3930
|
+
}, e.push(r)), Xn(r.style, !0);
|
|
3931
|
+
}
|
|
3932
|
+
})(st, S.get(qn)), ((e) => {
|
|
3933
|
+
let t = {
|
|
3934
|
+
colStart: 0,
|
|
3935
|
+
rowStart: 0,
|
|
3936
|
+
colEnd: A,
|
|
3937
|
+
rowEnd: _e
|
|
3938
|
+
};
|
|
3939
|
+
for (let n of e.sheets ?? []) {
|
|
3940
|
+
let e = R(n);
|
|
3941
|
+
if (!e) continue;
|
|
3942
|
+
let r = [];
|
|
3943
|
+
if (Qn(e.cols, !0, t, r), Qn(e.rows, !1, t, r), r.length === 0) continue;
|
|
3944
|
+
let i = [];
|
|
3945
|
+
for (let [t, n] of e.directStyles ?? []) i.push({
|
|
3946
|
+
...V.fastStringToRange(t),
|
|
3947
|
+
value: {
|
|
3948
|
+
kind: 0,
|
|
3949
|
+
index: n
|
|
3950
|
+
}
|
|
3951
|
+
});
|
|
3952
|
+
i.push(...r);
|
|
3953
|
+
let a = [], o = new Pe.IteratorInstance(i, { axis: B.Column });
|
|
3954
|
+
for (let e = o.next(); !e.done; e = o.next()) {
|
|
3955
|
+
let n = e.value.overlaps, r;
|
|
3956
|
+
if (n.length === 1) {
|
|
3957
|
+
if (r = n[0].value, r.index === 0) continue;
|
|
3958
|
+
} else {
|
|
3959
|
+
let e, t, i;
|
|
3960
|
+
for (let r = 0; !e && r < n.length; r++) {
|
|
3961
|
+
let a = n[r].value;
|
|
3962
|
+
a.kind === 0 ? e = a : a.kind === 1 ? t = a : i = a;
|
|
3963
|
+
}
|
|
3964
|
+
r = e ?? t ?? i;
|
|
3965
|
+
}
|
|
3966
|
+
a.push([V.rangeToString(e.value.range, t), r.index]);
|
|
3967
|
+
}
|
|
3968
|
+
a.length > 0 ? e.directStyles = a : delete e.directStyles;
|
|
3364
3969
|
}
|
|
3365
|
-
})(
|
|
3970
|
+
})(st);
|
|
3366
3971
|
{
|
|
3367
|
-
let
|
|
3368
|
-
|
|
3369
|
-
|
|
3972
|
+
let e = /* @__PURE__ */ new Map();
|
|
3973
|
+
L("slicers", i, r, w, C, H).forEach((t, n) => {
|
|
3974
|
+
t?.slicers && e.set(n, t.slicers);
|
|
3370
3975
|
}), function(e, t) {
|
|
3371
3976
|
let n = e.sheets ?? [], r = /* @__PURE__ */ new Map();
|
|
3372
3977
|
for (let e = 0; e < n.length; e++) {
|
|
3373
|
-
let t = n[e]?.
|
|
3374
|
-
for (let e = 0; e <
|
|
3375
|
-
let
|
|
3376
|
-
if (!
|
|
3377
|
-
let a = (
|
|
3378
|
-
r.set(String(
|
|
3379
|
-
name:
|
|
3978
|
+
let t = n[e], i = R(t)?.tables ?? [];
|
|
3979
|
+
for (let e = 0; e < i.length; e++) {
|
|
3980
|
+
let t = i[e], n = Array.isArray(t) ? t[1] : t?.v;
|
|
3981
|
+
if (!n?.id) continue;
|
|
3982
|
+
let a = (n.columns ?? []).map((e) => typeof e == "string" ? { name: e } : e);
|
|
3983
|
+
r.set(String(n.id), {
|
|
3984
|
+
name: n.name ?? "",
|
|
3380
3985
|
columns: a
|
|
3381
3986
|
});
|
|
3382
3987
|
}
|
|
3383
3988
|
}
|
|
3384
3989
|
let i = /* @__PURE__ */ new Set();
|
|
3385
3990
|
for (let e = 0; e < n.length; e++) {
|
|
3386
|
-
let a = n[e]
|
|
3387
|
-
if (!
|
|
3388
|
-
let
|
|
3389
|
-
if (
|
|
3390
|
-
let n =
|
|
3991
|
+
let a = n[e], o = R(a);
|
|
3992
|
+
if (!o) continue;
|
|
3993
|
+
let s = o.slicers, c = o.movables;
|
|
3994
|
+
if (s && c) for (let e = c.length - 1; e >= 0; e--) {
|
|
3995
|
+
let n = c[e].content;
|
|
3391
3996
|
if (n?.type !== "slicer" || n.json?.source) continue;
|
|
3392
|
-
let a = n.name ?? "",
|
|
3393
|
-
if (!
|
|
3394
|
-
let l = r.get(String(
|
|
3395
|
-
l && u ? (n.json =
|
|
3997
|
+
let a = n.name ?? "", o = s[a];
|
|
3998
|
+
if (!o?.tableId) continue;
|
|
3999
|
+
let l = r.get(String(o.tableId)), u = l ? Xe(l.columns, o.columnId) : null;
|
|
4000
|
+
l && u ? (n.json = Ze(o, n.json, Re.structuredReference(l.name, u.name)), i.add(a), o.cachePath && t.markAbsorbed(o.cachePath)) : (t.warn("A slicer names no table; it was not imported.", "xlsx.slicer.cacheDefinition"), c.splice(e, 1));
|
|
3396
4001
|
}
|
|
3397
|
-
delete
|
|
4002
|
+
delete o.slicers;
|
|
3398
4003
|
}
|
|
3399
4004
|
t.slicerParts.forEach((e, n) => {
|
|
3400
4005
|
let r = Object.keys(e);
|
|
3401
4006
|
r.length > 0 && r.every((e) => i.has(e)) && t.markAbsorbed(n);
|
|
3402
4007
|
});
|
|
3403
|
-
}(
|
|
4008
|
+
}(st, {
|
|
3404
4009
|
warn: (e, t) => {
|
|
3405
4010
|
v(e, "xl/slicers", t);
|
|
3406
4011
|
},
|
|
3407
|
-
markAbsorbed:
|
|
3408
|
-
slicerParts:
|
|
4012
|
+
markAbsorbed: N,
|
|
4013
|
+
slicerParts: e
|
|
3409
4014
|
});
|
|
3410
4015
|
}
|
|
3411
|
-
|
|
3412
|
-
...
|
|
4016
|
+
st.calc = {
|
|
4017
|
+
...st.calc ?? {},
|
|
3413
4018
|
legacyIntersect: !0
|
|
3414
|
-
},
|
|
3415
|
-
let
|
|
3416
|
-
|
|
3417
|
-
let
|
|
3418
|
-
if (
|
|
3419
|
-
let { VBAProject: e } = await import("./
|
|
4019
|
+
}, U.length > 0 && (st.strings = U);
|
|
4020
|
+
let lt = Fe.toJSON();
|
|
4021
|
+
lt && lt.length > 0 && (st.people = lt);
|
|
4022
|
+
let ut = j.getEntry("xl/vbaProject.bin");
|
|
4023
|
+
if (ut) try {
|
|
4024
|
+
let { VBAProject: e } = await import("./CzFYJPxmLyKgEKF0.mjs"), t = e.extract(ut);
|
|
3420
4025
|
if (t) {
|
|
3421
4026
|
let n = /* @__PURE__ */ new Map();
|
|
3422
|
-
for (let e of
|
|
3423
|
-
let t = e?.
|
|
3424
|
-
|
|
4027
|
+
for (let e of st.sheets ?? []) {
|
|
4028
|
+
let t = R(e), r = t?.codeName;
|
|
4029
|
+
r && n.set(r, t);
|
|
3425
4030
|
}
|
|
3426
4031
|
for (let r of t.modules) {
|
|
3427
4032
|
let t = { language: "vba" }, { header: i, body: a } = e.splitAttributes(r.code);
|
|
3428
4033
|
a && (t.source = a), i && (t.sourceHeader = i);
|
|
3429
4034
|
let o = r.type === "document" ? n.get(r.name) : void 0;
|
|
3430
4035
|
o || r.type !== "document" || (t.scope = "workbook");
|
|
3431
|
-
let s = o ? o.modules ??= {} :
|
|
4036
|
+
let s = o ? o.modules ??= {} : st.modules ??= {};
|
|
3432
4037
|
s[r.name] || (s[r.name] = t);
|
|
3433
4038
|
}
|
|
3434
|
-
|
|
4039
|
+
o?.(t);
|
|
3435
4040
|
} else _.push(["Unable to parse VBA project.", "xl/vbaProject.bin"]);
|
|
3436
4041
|
} catch (e) {
|
|
3437
4042
|
_.push([`Error extracting VBA: ${e?.message ?? e}`, "xl/vbaProject.bin"]);
|
|
3438
4043
|
}
|
|
3439
|
-
let
|
|
3440
|
-
...
|
|
3441
|
-
calcOnLoad:
|
|
3442
|
-
resources:
|
|
3443
|
-
json:
|
|
4044
|
+
let dt = S.get("calcId"), ft = dt === void 0 || !(Number(dt) >= 191029), pt = u.calcOnLoad ?? (c === "auto" && ft ? "full" : c), mt = {
|
|
4045
|
+
...u,
|
|
4046
|
+
calcOnLoad: pt,
|
|
4047
|
+
resources: y,
|
|
4048
|
+
json: st
|
|
3444
4049
|
};
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
4050
|
+
if (mt.disableLoadAutoFit === void 0) {
|
|
4051
|
+
let e = S.get(Ce);
|
|
4052
|
+
mt.disableLoadAutoFit = !!e?.declared && e.normalIsThemeFont && await he(e.faces);
|
|
4053
|
+
}
|
|
4054
|
+
h?.mark("json-assembled");
|
|
4055
|
+
let G = new Je(mt);
|
|
4056
|
+
if (h?.mark("workbook-constructed"), D.length > 0 && pt !== "none") {
|
|
4057
|
+
await G.whenCalculationReady();
|
|
4058
|
+
let e = /* @__PURE__ */ new Map(), t = st.sheets ?? [], n = G.getSheets({ visibility: "veryHidden" });
|
|
3450
4059
|
for (let r = 0; r < t.length; r++) {
|
|
3451
|
-
let i = t[r]
|
|
3452
|
-
|
|
4060
|
+
let i = t[r], a = n[r], o = R(i);
|
|
4061
|
+
o && a?.isIWorksheet && e.set(o, a);
|
|
3453
4062
|
}
|
|
3454
4063
|
((e, t, n) => {
|
|
3455
4064
|
if (t.length === 0) return;
|
|
@@ -3468,7 +4077,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3468
4077
|
for (let e of t) e.formula === null && o.add(i(e.rowIndex, e.colIndex));
|
|
3469
4078
|
for (let e of t) {
|
|
3470
4079
|
if (e.formula === null) continue;
|
|
3471
|
-
let t =
|
|
4080
|
+
let t = un(e.formula), n = !0;
|
|
3472
4081
|
for (let e of t) if (!a(e)) {
|
|
3473
4082
|
n = !1;
|
|
3474
4083
|
break;
|
|
@@ -3501,19 +4110,19 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3501
4110
|
}).setValue("=" + e.formula);
|
|
3502
4111
|
}
|
|
3503
4112
|
}
|
|
3504
|
-
})(
|
|
4113
|
+
})(G, D, e);
|
|
3505
4114
|
}
|
|
3506
|
-
if (
|
|
3507
|
-
e.deleteReference(
|
|
3508
|
-
}),
|
|
3509
|
-
|
|
4115
|
+
if (le.forEach((e) => {
|
|
4116
|
+
e.deleteReference(se);
|
|
4117
|
+
}), ie.endPersist(), p) {
|
|
4118
|
+
ae(G);
|
|
3510
4119
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
3511
|
-
for (let n of
|
|
3512
|
-
let r =
|
|
4120
|
+
for (let n of j.getNames()) {
|
|
4121
|
+
let r = j.getEntry(n);
|
|
3513
4122
|
if (!r) continue;
|
|
3514
|
-
let i =
|
|
4123
|
+
let i = j.getRawEntry(n), a = i ? {
|
|
3515
4124
|
data: r,
|
|
3516
|
-
uncompressedSize:
|
|
4125
|
+
uncompressedSize: j.uncompressedSize(n),
|
|
3517
4126
|
raw: {
|
|
3518
4127
|
compressedData: i.data,
|
|
3519
4128
|
compressionMethod: i.compressionMethod,
|
|
@@ -3521,39 +4130,39 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3521
4130
|
}
|
|
3522
4131
|
} : {
|
|
3523
4132
|
data: r,
|
|
3524
|
-
uncompressedSize:
|
|
4133
|
+
uncompressedSize: j.uncompressedSize(n)
|
|
3525
4134
|
};
|
|
3526
4135
|
e.set(n, a), t += r.byteLength;
|
|
3527
4136
|
}
|
|
3528
|
-
if (t > 67108864) _.push([`Source package too large to retain (${t} bytes, limit ${
|
|
4137
|
+
if (t > 67108864) _.push([`Source package too large to retain (${t} bytes, limit ${ve}); unmodeled parts will be dropped on save.`, "SourcePackage"]);
|
|
3529
4138
|
else if (e.size > 0) {
|
|
3530
|
-
let t = new
|
|
3531
|
-
|
|
3532
|
-
let n =
|
|
4139
|
+
let t = new f(e, pe);
|
|
4140
|
+
ce(G, t);
|
|
4141
|
+
let n = G.getWorksheets().getItems(), r = G.getTransactions().addListener({ onCommitEnd: (e) => {
|
|
3533
4142
|
let n = e.getOperation()?.name;
|
|
3534
4143
|
n !== "insertCells" && n !== "deleteCells" || t.markStructuralChange();
|
|
3535
|
-
} }),
|
|
3536
|
-
let e =
|
|
4144
|
+
} }), i = G.addListeners({ onSheetsChange: () => {
|
|
4145
|
+
let e = G.getWorksheets().getItems();
|
|
3537
4146
|
(e.length !== n.length || e.some((e, t) => e !== n[t])) && t.markStructuralChange(), n = e;
|
|
3538
4147
|
} });
|
|
3539
|
-
|
|
3540
|
-
r(),
|
|
4148
|
+
G.addListeners({ onClose: () => {
|
|
4149
|
+
r(), i(), ae(G);
|
|
3541
4150
|
} });
|
|
3542
4151
|
}
|
|
3543
4152
|
}
|
|
3544
|
-
if (_.length &&
|
|
4153
|
+
if (_.length && x?.onWarning) {
|
|
3545
4154
|
let e = /* @__PURE__ */ new Set();
|
|
3546
4155
|
for (let t of _) {
|
|
3547
4156
|
let [n, r, i] = t, a = i ?? n;
|
|
3548
|
-
e.has(a) || (e.add(a),
|
|
4157
|
+
e.has(a) || (e.add(a), x.onWarning(n, r));
|
|
3549
4158
|
}
|
|
3550
4159
|
}
|
|
3551
|
-
return
|
|
4160
|
+
return h && !0 === s && console.table(h.toTable()), await G.whenFontsReady(), G;
|
|
3552
4161
|
} catch (e) {
|
|
3553
4162
|
let t = "Unable to parse XLSX.";
|
|
3554
|
-
throw e instanceof
|
|
4163
|
+
throw e instanceof He && (t = "Unable to open XLSX. There are too many rows or columns."), Error(t, { cause: e });
|
|
3555
4164
|
} finally {
|
|
3556
|
-
await
|
|
4165
|
+
await j.close().catch(() => {});
|
|
3557
4166
|
}
|
|
3558
4167
|
};
|
|
3559
|
-
export {
|
|
4168
|
+
export { qn as n, kn as r, ar as readXLSX, er as t };
|