@sheetxl/io-xlsx 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{B8BxPvkHiX4hcIlm.mjs → BIeUFn93H9tpjB2P.mjs} +1290 -1289
- package/browser/esm/{-fdNB43HUPxYWJ_R.mjs → Bmltm5oHDjA46imK.mjs} +898 -898
- package/browser/esm/{vodnBCtDjw8qycsS.mjs → BpMP4fA1G0jq4ucP.mjs} +2 -2
- package/browser/esm/{BOq9DL07jEaKHuIM.mjs → CBiOsyxrSrCc2rHf.mjs} +4 -4
- package/browser/esm/{yHnVx36dSghP3233.mjs → CduDdZifUgpa31H9.mjs} +193 -174
- package/browser/esm/{BjtXA8Q58TjpX90f.mjs → D-8PUtpwA7w1Vztk.mjs} +2 -2
- package/browser/esm/{7zN_b2s0BRH9UClF.mjs → DCxH223FyOmHfLZy.mjs} +1443 -1426
- package/browser/esm/{CbR2WXJw8AmmbFY-.mjs → DHhBj-FyuFwtF1jS.mjs} +1 -1
- package/browser/esm/{DxkJJ65lFs0Fg6YW.mjs → DXQmnPbbopMZKuDi.mjs} +2 -2
- package/browser/esm/{CKeoydawnx6JqzIh.mjs → clofhk5-eCPDQW9E.mjs} +2 -2
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{DWL__gLKpzWgIAgP.mjs → n-8RFAhxWK4eYNVl.mjs} +1 -1
- package/node/esm/{B74b9YqT29KIKqCT.mjs → 0E9feQjQRVK4OUcL.mjs} +1 -1
- package/node/esm/{CJzOPo9n5d81oTwp.mjs → 0EFUOGDC3FYJxfgS.mjs} +221 -201
- package/node/esm/{Bun4U-VOiQ4A-B9o.mjs → B6_vyfcdvDh9N346.mjs} +2 -2
- package/node/esm/{CufzeuvvI4_JrCZt.mjs → BAkDqp4pgMeVrOzO.mjs} +370 -370
- package/node/esm/{DLq4doP565FaG1oh.mjs → CA_cU7nQp5uyXXb2.mjs} +2 -2
- package/node/esm/{DsfZ2R68TKJ5FFKz.mjs → DYrM7UZMaWo149eR.mjs} +1444 -1442
- package/node/esm/{BRjPLGDja5nIYqeX.mjs → UqobiqiwMs9REY7T.mjs} +2 -2
- package/node/esm/{BzKl-VdTNvl6702Y.mjs → Z9V0xb8AYE8CyoEL.mjs} +1521 -1505
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
- package/types/src/OOXMLExtensions.d.ts +7 -0
- package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +5 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v1.0.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v1.0.5
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
|
-
import { n as e, r as t } from "./
|
|
8
|
-
import { $ as n, $n as r, An as i,
|
|
9
|
-
import { BufferUtils as
|
|
10
|
-
import { AddressUtils as
|
|
11
|
-
var
|
|
7
|
+
import { n as e, r as t } from "./DHhBj-FyuFwtF1jS.mjs";
|
|
8
|
+
import { $ as n, $n as r, An as i, Ar as a, Br as o, C as s, Cr as c, Ct as l, E as u, Fr as d, Gr as f, Gt as p, In as m, It as ee, Kr as h, Ln as g, Lt as _, Nn as v, Nt as y, Or as te, Pn as b, Qn as ne, Rn as re, Rr as ie, Rt as ae, Sr as oe, St as se, T as ce, Tr as x, Tt as le, Ut as ue, Vn as de, Vr as fe, Wt as S, Xn as C, Yn as pe, Z as me, Zn as he, _ as w, _t as T, ar as E, cr as D, ct as O, dn as ge, er as k, f as _e, fn as ve, ft as ye, hr as A, ht as j, in as be, it as M, jn as N, jt as P, lr as xe, lt as F, mn as Se, mr as Ce, mt as we, n as Te, nn as Ee, nr as De, nt as Oe, o as I, ot as ke, p as Ae, pr as je, pt as Me, qn as Ne, rn as Pe, sr as Fe, t as Ie, tn as Le, tr as Re, ur as L, ut as ze, vr as R, vt as z, wt as Be, xr as Ve, xt as B, yn as He, yr as Ue } from "./DCxH223FyOmHfLZy.mjs";
|
|
9
|
+
import { BufferUtils as V, CommonUtils as We, ExpectedError as Ge, OverlappingRange as Ke, RangeAxis as qe } from "@sheetxl/utils";
|
|
10
|
+
import { AddressUtils as H, BufferUtils as Je, CommonUtils as Ye, CoordUtils as Xe, FormulaError as Ze, FormulaText as Qe, FunctionDeclarations as $e, ICellStyle as et, ICondition as tt, IConditionalFormat as nt, ICustomProperty as U, IFont as rt, IRange as it, ITextFrame as at, NumberFormat as ot, OutOfBoundsError as st, PersonCollection as ct, ResourceCollection as lt, RichDataRegistry as ut, Scalar as dt, Sort as ft, Theme as pt, Tuple as mt, Workbook as ht, pivotCellFormatsOf as W } from "@sheetxl/sdk";
|
|
11
|
+
var gt = {
|
|
12
12
|
ascending: "ascending",
|
|
13
13
|
descending: "descending",
|
|
14
14
|
natural: "dataSource"
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function _t(e, t) {
|
|
17
17
|
let n = e.sheets ?? [], r = /* @__PURE__ */ new Map();
|
|
18
18
|
for (let e = 0; e < n.length; e++) {
|
|
19
|
-
let t = n[e], i =
|
|
19
|
+
let t = n[e], i = d(t)?.tables ?? [];
|
|
20
20
|
for (let e = 0; e < i.length; e++) {
|
|
21
21
|
let t = i[e], n = Array.isArray(t) ? t[1] : t?.v;
|
|
22
22
|
if (!n?.id) continue;
|
|
@@ -41,26 +41,26 @@ function ht(e, t) {
|
|
|
41
41
|
return t;
|
|
42
42
|
}(e), o = /* @__PURE__ */ new Map();
|
|
43
43
|
for (let e = 0; e < n.length; e++) {
|
|
44
|
-
let t =
|
|
44
|
+
let t = d(n[e])?.pivotTables ?? [];
|
|
45
45
|
for (let r = 0; r < t.length; r++) o.set(`${n[e].name}\0${t[r].name}`, t[r]);
|
|
46
46
|
}
|
|
47
47
|
let s = new Set((e.pivotCaches ?? []).flatMap((e) => e.fields ? [e.cacheId] : [])), c = /* @__PURE__ */ new Set();
|
|
48
48
|
for (let e = 0; e < n.length; e++) {
|
|
49
|
-
let l = n[e], u =
|
|
49
|
+
let l = n[e], u = d(l);
|
|
50
50
|
if (!u) continue;
|
|
51
|
-
let
|
|
52
|
-
if (
|
|
53
|
-
let n =
|
|
51
|
+
let f = u.slicers, p = u.movables;
|
|
52
|
+
if (f && p) for (let e = p.length - 1; e >= 0; e--) {
|
|
53
|
+
let n = p[e].content;
|
|
54
54
|
if (n?.type !== "slicer" || n.json?.source) continue;
|
|
55
|
-
let l = n.name ?? "", u =
|
|
55
|
+
let l = n.name ?? "", u = f[l];
|
|
56
56
|
if (!u) continue;
|
|
57
57
|
if (!u.tableId) {
|
|
58
58
|
if (u.pivotBody === void 0) continue;
|
|
59
|
-
n.json =
|
|
59
|
+
n.json = bt(u, n.json), n.json.pivot = yt(u, i, a, o, s), c.add(l), u.cachePath && t.markAbsorbed(u.cachePath);
|
|
60
60
|
continue;
|
|
61
61
|
}
|
|
62
|
-
let
|
|
63
|
-
|
|
62
|
+
let d = r.get(String(u.tableId)), m = d ? vt(d.columns, u.columnId) : null;
|
|
63
|
+
d && m ? (n.json = bt(u, n.json, Qe.structuredReference(d.name, m.name)), c.add(l), u.cachePath && t.markAbsorbed(u.cachePath)) : (t.warn("A slicer names no table; it was not imported.", "xlsx.slicer.cacheDefinition"), p.splice(e, 1));
|
|
64
64
|
}
|
|
65
65
|
delete u.slicers;
|
|
66
66
|
}
|
|
@@ -69,13 +69,13 @@ function ht(e, t) {
|
|
|
69
69
|
r.length > 0 && r.every((e) => c.has(e)) && t.markAbsorbed(n);
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function vt(e, t) {
|
|
73
73
|
if (!t) return null;
|
|
74
74
|
for (let n = 0; n < e.length; n++) if (e[n].id !== void 0 && String(e[n].id) === t) return e[n];
|
|
75
75
|
let n = Number(t);
|
|
76
76
|
return Number.isInteger(n) && n >= 1 && n <= e.length ? e[n - 1] : null;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function yt(e, t, n, r, i) {
|
|
79
79
|
let a = [], o = e.pivotTables ?? [];
|
|
80
80
|
for (let e = 0; e < o.length; e++) {
|
|
81
81
|
let n = t.get(o[e].tabId);
|
|
@@ -98,35 +98,35 @@ function _t(e, t, n, r, i) {
|
|
|
98
98
|
body: e.timelineBody ?? ""
|
|
99
99
|
}), s;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function bt(e, t, n) {
|
|
102
102
|
let r = { ...t };
|
|
103
103
|
if (n !== void 0 && (r.source = n), e.caption !== void 0 && e.caption !== e.sourceName && (r.caption = e.caption), !1 === e.showCaption && (r.hiddenCaption = !0), e.columnCount !== void 0 && e.columnCount > 1 && (r.columnCount = e.columnCount), e.rowHeight !== void 0) {
|
|
104
104
|
let t = Math.round(e.rowHeight / 9525);
|
|
105
105
|
t > 0 && t !== 27 && (r.rowHeight = t);
|
|
106
106
|
}
|
|
107
107
|
e.style && e.style !== "SlicerStyleLight1" && (r.style = e.style);
|
|
108
|
-
let i = e.sortOrder ?
|
|
108
|
+
let i = e.sortOrder ? gt[e.sortOrder] : void 0;
|
|
109
109
|
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;
|
|
110
110
|
}
|
|
111
|
-
var
|
|
111
|
+
var xt = "xl/richData/rdrichvaluestructure.xml", St = "xl/richData/rdrichvalue.xml", Ct = "xl/richData/rdarray.xml", wt = "xl/richData/rdsupportingpropertybagstructure.xml", Tt = "xl/richData/rdsupportingpropertybag.xml", Et = "xl/richData/rdRichValueTypes.xml", Dt = "xl/richData/richStyles.xml", G = (e, t) => {
|
|
112
112
|
let n = [], r = e?.childNodes, i = r?.length ?? 0;
|
|
113
113
|
for (let e = 0; e < i; e++) {
|
|
114
114
|
let i = r.item(e);
|
|
115
115
|
i.nodeType !== 1 || t && i.localName !== t || n.push(i);
|
|
116
116
|
}
|
|
117
117
|
return n;
|
|
118
|
-
},
|
|
118
|
+
}, Ot = (e) => G(e, "k").map((e) => [e.getAttribute("n") ?? "", e.getAttribute("t") || null]), kt = (e) => G(e, "v").map((e) => ({
|
|
119
119
|
t: e.getAttribute("t") || null,
|
|
120
120
|
text: e.textContent ?? ""
|
|
121
|
-
})),
|
|
121
|
+
})), At = (e) => {
|
|
122
122
|
let t = /* @__PURE__ */ new Map();
|
|
123
|
-
for (let n of
|
|
123
|
+
for (let n of G(e, "key")) {
|
|
124
124
|
let e = /* @__PURE__ */ new Map();
|
|
125
|
-
for (let t of
|
|
125
|
+
for (let t of G(n, "flag")) e.set(t.getAttribute("name") ?? "", t.getAttribute("value") ?? "");
|
|
126
126
|
t.set(n.getAttribute("name") ?? "", e);
|
|
127
127
|
}
|
|
128
128
|
return t;
|
|
129
|
-
},
|
|
129
|
+
}, jt = /* @__PURE__ */ new Uint8Array(), Mt = class e {
|
|
130
130
|
constructor(e, t, n) {
|
|
131
131
|
this.buffers = /* @__PURE__ */ new Map(), this.zip = e, this.entries = t, this.rawBuffer = n;
|
|
132
132
|
}
|
|
@@ -134,7 +134,7 @@ var yt = "xl/richData/rdrichvaluestructure.xml", bt = "xl/richData/rdrichvalue.x
|
|
|
134
134
|
return e.startsWith("/") ? e.slice(1) : e;
|
|
135
135
|
}
|
|
136
136
|
static async create(t) {
|
|
137
|
-
let n = t instanceof Blob ?
|
|
137
|
+
let n = t instanceof Blob ? jt : t instanceof Uint8Array ? t : new Uint8Array(t), r = t instanceof Blob ? new fe(t) : new f(n), i = new o(r), a = /* @__PURE__ */ new Map();
|
|
138
138
|
for (let e of await i.getEntries()) e.directory || a.set(e.filename, e);
|
|
139
139
|
return new e(i, a, n);
|
|
140
140
|
}
|
|
@@ -152,12 +152,12 @@ var yt = "xl/richData/rdrichvaluestructure.xml", bt = "xl/richData/rdrichvalue.x
|
|
|
152
152
|
if (r) return r;
|
|
153
153
|
let i = this.entries.get(n);
|
|
154
154
|
if (!i) return null;
|
|
155
|
-
let a = await i.getData(new
|
|
155
|
+
let a = await i.getData(new h());
|
|
156
156
|
return this.buffers.set(n, a), a;
|
|
157
157
|
}
|
|
158
158
|
async prefetch(e) {
|
|
159
159
|
let t = [];
|
|
160
|
-
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new
|
|
160
|
+
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new h()).then((e) => {
|
|
161
161
|
this.buffers.set(n, e);
|
|
162
162
|
}));
|
|
163
163
|
await Promise.all(t);
|
|
@@ -200,18 +200,18 @@ var yt = "xl/richData/rdrichvaluestructure.xml", bt = "xl/richData/rdrichvalue.x
|
|
|
200
200
|
async close() {
|
|
201
201
|
await this.zip.close();
|
|
202
202
|
}
|
|
203
|
-
},
|
|
203
|
+
}, Nt = class {
|
|
204
204
|
constructor(e) {
|
|
205
|
-
this._sink = e, this._samples = [], this._t0 =
|
|
205
|
+
this._sink = e, this._samples = [], this._t0 = Pt(), this._tPrev = this._t0, this._heapPrev = Ft();
|
|
206
206
|
}
|
|
207
207
|
mark(e) {
|
|
208
|
-
let t =
|
|
208
|
+
let t = Pt(), n = Ft(), r = {
|
|
209
209
|
label: e,
|
|
210
210
|
tMs: t - this._t0,
|
|
211
211
|
dtMs: t - this._tPrev,
|
|
212
212
|
heapBytes: n,
|
|
213
213
|
dHeapBytes: n !== void 0 && this._heapPrev !== void 0 ? n - this._heapPrev : void 0,
|
|
214
|
-
rssBytes:
|
|
214
|
+
rssBytes: It()
|
|
215
215
|
};
|
|
216
216
|
this._tPrev = t, this._heapPrev = n, this._samples.push(r), this._sink?.(r);
|
|
217
217
|
}
|
|
@@ -223,62 +223,62 @@ var yt = "xl/richData/rdrichvaluestructure.xml", bt = "xl/richData/rdrichvalue.x
|
|
|
223
223
|
phase: e.label,
|
|
224
224
|
tMs: Math.round(e.tMs),
|
|
225
225
|
dtMs: Math.round(e.dtMs),
|
|
226
|
-
heapMB: e.heapBytes === void 0 ? "—" :
|
|
227
|
-
dHeapMB: e.dHeapBytes === void 0 ? "—" :
|
|
228
|
-
rssMB: e.rssBytes === void 0 ? "—" :
|
|
226
|
+
heapMB: e.heapBytes === void 0 ? "—" : Lt(e.heapBytes / 1048576),
|
|
227
|
+
dHeapMB: e.dHeapBytes === void 0 ? "—" : Lt(e.dHeapBytes / 1048576),
|
|
228
|
+
rssMB: e.rssBytes === void 0 ? "—" : Lt(e.rssBytes / 1048576)
|
|
229
229
|
}));
|
|
230
230
|
}
|
|
231
|
-
},
|
|
232
|
-
function
|
|
231
|
+
}, Pt = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
232
|
+
function Ft() {
|
|
233
233
|
let e = typeof performance == "object" ? performance.memory : void 0;
|
|
234
234
|
if (e && typeof e.usedJSHeapSize == "number") return e.usedJSHeapSize;
|
|
235
235
|
let t = globalThis.process;
|
|
236
236
|
return typeof t == "object" && typeof t.memoryUsage == "function" ? t.memoryUsage().heapUsed : void 0;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function It() {
|
|
239
239
|
let e = globalThis.process;
|
|
240
240
|
if (typeof e == "object" && typeof e.memoryUsage == "function") return e.memoryUsage().rss;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Lt(e) {
|
|
243
243
|
return Math.round(10 * e) / 10;
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var Rt = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", zt = `-${Rt}.0-9·̀-ͯ‿-⁀`, Bt = (RegExp(`^[${Rt}]$`, "u"), RegExp(`^[${zt}]$`, "u"), RegExp(`^[${Rt}][${zt}]*$`, "u")), Vt = (RegExp(`^[${zt}]+$`, "u"), [
|
|
246
246
|
32,
|
|
247
247
|
10,
|
|
248
248
|
13,
|
|
249
249
|
9
|
|
250
250
|
]);
|
|
251
|
-
function
|
|
251
|
+
function Ht(e) {
|
|
252
252
|
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;
|
|
253
253
|
}
|
|
254
|
-
var
|
|
255
|
-
RegExp(`^[${
|
|
256
|
-
var
|
|
257
|
-
function
|
|
254
|
+
var Ut = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Wt = `-${Ut}.0-9·̀-ͯ‿-⁀`;
|
|
255
|
+
RegExp(`^[${Ut}]$`, "u"), RegExp(`^[${Wt}]$`, "u"), RegExp(`^[${Ut}][${Wt}]*$`, "u"), RegExp(`^[${Wt}]+$`, "u");
|
|
256
|
+
var Gt = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Kt = `-${Gt}.0-9·̀-ͯ‿-⁀`, qt = (RegExp(`^[${Gt}]$`, "u"), RegExp(`^[${Kt}]$`, "u"), RegExp(`^[${Gt}][${Kt}]*$`, "u"));
|
|
257
|
+
function Jt(e) {
|
|
258
258
|
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;
|
|
259
259
|
}
|
|
260
|
-
var
|
|
260
|
+
var K = function(e) {
|
|
261
261
|
return e === 32 || e === 10 || e === 13 || e === 9;
|
|
262
|
-
},
|
|
262
|
+
}, Yt = function(e) {
|
|
263
263
|
return e >= 32 && e <= 55295 || e === 10 || e === 13 || e === 9 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
264
|
-
},
|
|
265
|
-
return
|
|
266
|
-
},
|
|
264
|
+
}, Xt = Ht, Zt = function(e) {
|
|
265
|
+
return Ht(e) || e >= 48 && e <= 57 || e === 45 || e === 46 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
266
|
+
}, Qt = Vt, $t = Bt, en = function(e) {
|
|
267
267
|
return e >= 1 && e <= 55295 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
268
|
-
},
|
|
269
|
-
return
|
|
270
|
-
},
|
|
268
|
+
}, tn = Jt, nn = function(e) {
|
|
269
|
+
return Jt(e) || e === 45 || e === 46 || e >= 48 && e <= 57 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
270
|
+
}, rn = qt, an = "http://www.w3.org/XML/1998/namespace", on = "http://www.w3.org/2000/xmlns/", sn = {
|
|
271
271
|
__proto__: null,
|
|
272
|
-
xml:
|
|
273
|
-
xmlns:
|
|
274
|
-
},
|
|
272
|
+
xml: an,
|
|
273
|
+
xmlns: on
|
|
274
|
+
}, cn = {
|
|
275
275
|
__proto__: null,
|
|
276
276
|
amp: "&",
|
|
277
277
|
gt: ">",
|
|
278
278
|
lt: "<",
|
|
279
279
|
quot: "\"",
|
|
280
280
|
apos: "'"
|
|
281
|
-
},
|
|
281
|
+
}, q = -1, ln = -2, J = 13, un = 33, dn = 10, fn = 60, pn = 61, Y = 62, X = 63, mn = 93, hn = (e) => e === 34 || e === 39, gn = [34, 39], _n = [
|
|
282
282
|
...gn,
|
|
283
283
|
91,
|
|
284
284
|
Y
|
|
@@ -289,9 +289,9 @@ var qt = function(e) {
|
|
|
289
289
|
], yn = [
|
|
290
290
|
pn,
|
|
291
291
|
X,
|
|
292
|
-
...
|
|
292
|
+
...Qt
|
|
293
293
|
], bn = [
|
|
294
|
-
...
|
|
294
|
+
...Qt,
|
|
295
295
|
Y,
|
|
296
296
|
38,
|
|
297
297
|
fn
|
|
@@ -299,15 +299,15 @@ var qt = function(e) {
|
|
|
299
299
|
function xn(e, t, n) {
|
|
300
300
|
switch (t) {
|
|
301
301
|
case "xml":
|
|
302
|
-
n !==
|
|
302
|
+
n !== an && e.fail(`xml prefix must be bound to ${an}.`);
|
|
303
303
|
break;
|
|
304
|
-
case "xmlns": n !==
|
|
304
|
+
case "xmlns": n !== on && e.fail(`xmlns prefix must be bound to ${on}.`);
|
|
305
305
|
}
|
|
306
306
|
switch (n) {
|
|
307
|
-
case
|
|
308
|
-
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${
|
|
307
|
+
case on:
|
|
308
|
+
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${on}.`);
|
|
309
309
|
break;
|
|
310
|
-
case
|
|
310
|
+
case an: switch (t) {
|
|
311
311
|
case "xml": break;
|
|
312
312
|
case "":
|
|
313
313
|
e.fail(`the default namespace may not be set to ${n}.`);
|
|
@@ -316,7 +316,7 @@ function xn(e, t, n) {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
var Sn, Cn = (e) =>
|
|
319
|
+
var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
320
320
|
xmldecl: "xmlDeclHandler",
|
|
321
321
|
text: "textHandler",
|
|
322
322
|
processinginstruction: "piHandler",
|
|
@@ -338,15 +338,15 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
338
338
|
this.i = 0, this.prevI = 0, this.opt = e ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
339
339
|
let t = this.xmlnsOpt = !!this.opt.xmlns;
|
|
340
340
|
if (this.trackPosition = !1 !== this.opt.position, this.fileName = this.opt.fileName, t) {
|
|
341
|
-
this.nameStartCheck =
|
|
341
|
+
this.nameStartCheck = tn, this.nameCheck = nn, this.isName = Cn, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = {
|
|
342
342
|
__proto__: null,
|
|
343
|
-
...
|
|
343
|
+
...sn
|
|
344
344
|
};
|
|
345
345
|
let e = this.opt.additionalNamespaces;
|
|
346
346
|
e != null && (function(e, t) {
|
|
347
347
|
for (let n of Object.keys(t)) xn(e, n, t[n]);
|
|
348
348
|
}(this, e), Object.assign(this.ns, e));
|
|
349
|
-
} else this.nameStartCheck =
|
|
349
|
+
} else this.nameStartCheck = Xt, this.nameCheck = Zt, this.isName = wn, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
350
350
|
this.stateTable = [
|
|
351
351
|
this.sBegin,
|
|
352
352
|
this.sBeginWhitespace,
|
|
@@ -398,7 +398,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
398
398
|
_init() {
|
|
399
399
|
this.openWakaBang = "", this.text = "", this.name = "", this.piTarget = "", this.entity = "", this.q = null, this.tags = [], this.tag = null, this.topNS = null, this.chunk = "", this.chunkPosition = 0, this.i = 0, this.prevI = 0, this.carriedFromPrevious = void 0, this.forbiddenState = 0, this.attribList = [];
|
|
400
400
|
let { fragmentOpt: e } = this;
|
|
401
|
-
this.state = e ?
|
|
401
|
+
this.state = e ? J : 0, this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot = this.sawRoot = e, this.xmlDeclPossible = !e, this.xmlDeclExpects = ["version"], this.entityReturnState = void 0;
|
|
402
402
|
let { defaultXMLVersion: t } = this.opt;
|
|
403
403
|
if (t === void 0) {
|
|
404
404
|
if (!0 === this.opt.forceXMLVersion) throw Error("forceXMLVersion set but defaultXMLVersion is not set");
|
|
@@ -408,7 +408,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
408
408
|
version: void 0,
|
|
409
409
|
encoding: void 0,
|
|
410
410
|
standalone: void 0
|
|
411
|
-
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(
|
|
411
|
+
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(cn), this.readyHandler?.();
|
|
412
412
|
}
|
|
413
413
|
get position() {
|
|
414
414
|
return this.chunkPosition + this.i;
|
|
@@ -446,13 +446,13 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
446
446
|
}
|
|
447
447
|
getCode10() {
|
|
448
448
|
let e = this.chunk, t = this.i;
|
|
449
|
-
if (this.prevI = t, this.i++, t >= e.length) return
|
|
449
|
+
if (this.prevI = t, this.i++, t >= e.length) return q;
|
|
450
450
|
let n = e.charCodeAt(t);
|
|
451
451
|
if (this.column++, n < 55296) {
|
|
452
452
|
if (n >= 32 || n === 9) return n;
|
|
453
453
|
switch (n) {
|
|
454
454
|
case dn: return this.line++, this.column = 0, this.positionAtNewLine = this.position, dn;
|
|
455
|
-
case 13: return e.charCodeAt(t + 1) === dn && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
455
|
+
case 13: return e.charCodeAt(t + 1) === dn && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, ln;
|
|
456
456
|
default: return this.fail("disallowed character."), n;
|
|
457
457
|
}
|
|
458
458
|
}
|
|
@@ -462,7 +462,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
462
462
|
}
|
|
463
463
|
getCode11() {
|
|
464
464
|
let { chunk: e, i: t } = this;
|
|
465
|
-
if (this.prevI = t, this.i = t + 1, t >= e.length) return
|
|
465
|
+
if (this.prevI = t, this.i = t + 1, t >= e.length) return q;
|
|
466
466
|
let n = e.charCodeAt(t);
|
|
467
467
|
if (this.column++, n < 55296) {
|
|
468
468
|
if (n > 31 && n < 127 || n > 159 && n !== 8232 || n === 9) return n;
|
|
@@ -473,7 +473,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
473
473
|
n !== dn && n !== 133 || (this.i = t + 2);
|
|
474
474
|
}
|
|
475
475
|
case 133:
|
|
476
|
-
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
476
|
+
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position, ln;
|
|
477
477
|
default: return this.fail("disallowed character."), n;
|
|
478
478
|
}
|
|
479
479
|
}
|
|
@@ -483,7 +483,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
483
483
|
}
|
|
484
484
|
getCodeNorm() {
|
|
485
485
|
let e = this.getCode();
|
|
486
|
-
return e ===
|
|
486
|
+
return e === ln ? dn : e;
|
|
487
487
|
}
|
|
488
488
|
unGet() {
|
|
489
489
|
this.i = this.prevI, this.column--;
|
|
@@ -491,8 +491,8 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
491
491
|
captureTo(e) {
|
|
492
492
|
let { i: t } = this, { chunk: n } = this;
|
|
493
493
|
for (;;) {
|
|
494
|
-
let r = this.getCode(), i = r ===
|
|
495
|
-
if (a ===
|
|
494
|
+
let r = this.getCode(), i = r === ln, a = i ? dn : r;
|
|
495
|
+
if (a === q || e.includes(a)) return this.text += n.slice(t, this.prevI), a;
|
|
496
496
|
i && (this.text += `${n.slice(t, this.prevI)}\n`, t = this.i);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
@@ -501,10 +501,10 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
501
501
|
for (;;) {
|
|
502
502
|
let r = this.getCode();
|
|
503
503
|
switch (r) {
|
|
504
|
-
case
|
|
504
|
+
case ln:
|
|
505
505
|
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r = dn;
|
|
506
506
|
break;
|
|
507
|
-
case
|
|
507
|
+
case q: return this.text += n.slice(t), !1;
|
|
508
508
|
}
|
|
509
509
|
if (r === e) return this.text += n.slice(t, this.prevI), !0;
|
|
510
510
|
}
|
|
@@ -513,18 +513,18 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
513
513
|
let { chunk: e, i: t } = this;
|
|
514
514
|
for (;;) {
|
|
515
515
|
let n = this.getCode();
|
|
516
|
-
if (n ===
|
|
517
|
-
if (!
|
|
516
|
+
if (n === q) return this.name += e.slice(t), q;
|
|
517
|
+
if (!Zt(n)) return this.name += e.slice(t, this.prevI), n === ln ? dn : n;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
skipSpaces() {
|
|
521
521
|
for (;;) {
|
|
522
522
|
let e = this.getCodeNorm();
|
|
523
|
-
if (e ===
|
|
523
|
+
if (e === q || !K(e)) return e;
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
setXMLVersion(e) {
|
|
527
|
-
this.currentXMLVersion = e, e === "1.0" ? (this.isChar =
|
|
527
|
+
this.currentXMLVersion = e, e === "1.0" ? (this.isChar = Yt, this.getCode = this.getCode10) : (this.isChar = en, this.getCode = this.getCode11);
|
|
528
528
|
}
|
|
529
529
|
sBegin() {
|
|
530
530
|
this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
|
|
@@ -535,17 +535,17 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
535
535
|
case fn:
|
|
536
536
|
if (this.state = 15, this.text.length !== 0) throw Error("no-empty text at start");
|
|
537
537
|
break;
|
|
538
|
-
case
|
|
539
|
-
default: this.unGet(), this.state =
|
|
538
|
+
case q: break;
|
|
539
|
+
default: this.unGet(), this.state = J, this.xmlDeclPossible = !1;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
sDoctype() {
|
|
543
543
|
let e = this.captureTo(_n);
|
|
544
544
|
switch (e) {
|
|
545
545
|
case Y:
|
|
546
|
-
this.doctypeHandler?.(this.text), this.text = "", this.state =
|
|
546
|
+
this.doctypeHandler?.(this.text), this.text = "", this.state = J, this.doctype = !0;
|
|
547
547
|
break;
|
|
548
|
-
case
|
|
548
|
+
case q: break;
|
|
549
549
|
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 : hn(e) && (this.state = 3, this.q = e);
|
|
550
550
|
}
|
|
551
551
|
}
|
|
@@ -555,7 +555,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
555
555
|
}
|
|
556
556
|
sDTD() {
|
|
557
557
|
let e = this.captureTo(vn);
|
|
558
|
-
e !==
|
|
558
|
+
e !== q && (this.text += String.fromCodePoint(e), e === mn ? this.state = 2 : e === fn ? this.state = 6 : hn(e) && (this.state = 5, this.q = e));
|
|
559
559
|
}
|
|
560
560
|
sDTDQuoted() {
|
|
561
561
|
let e = this.q;
|
|
@@ -601,22 +601,22 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
601
601
|
sEntity() {
|
|
602
602
|
let { i: e } = this, { chunk: t } = this;
|
|
603
603
|
t: for (;;) switch (this.getCode()) {
|
|
604
|
-
case
|
|
604
|
+
case ln:
|
|
605
605
|
this.entity += `${t.slice(e, this.prevI)}\n`, e = this.i;
|
|
606
606
|
break;
|
|
607
607
|
case 59: {
|
|
608
608
|
let { entityReturnState: n } = this, r = this.entity + t.slice(e, this.prevI), i;
|
|
609
|
-
this.state = n, r === "" ? (this.fail("empty entity name."), i = "&;") : (i = this.parseEntity(r), this.entity = ""), n ===
|
|
609
|
+
this.state = n, r === "" ? (this.fail("empty entity name."), i = "&;") : (i = this.parseEntity(r), this.entity = ""), n === J && this.textHandler === void 0 || (this.text += i);
|
|
610
610
|
break t;
|
|
611
611
|
}
|
|
612
|
-
case
|
|
612
|
+
case q:
|
|
613
613
|
this.entity += t.slice(e);
|
|
614
614
|
break t;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
sOpenWaka() {
|
|
618
618
|
let e = this.getCode();
|
|
619
|
-
if (
|
|
619
|
+
if (Xt(e)) this.state = 34, this.unGet(), this.xmlDeclPossible = !1;
|
|
620
620
|
else switch (e) {
|
|
621
621
|
case 47:
|
|
622
622
|
this.state = 43, this.xmlDeclPossible = !1;
|
|
@@ -627,7 +627,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
627
627
|
case X:
|
|
628
628
|
this.state = 23;
|
|
629
629
|
break;
|
|
630
|
-
default: this.fail("disallowed character in tag name"), this.state =
|
|
630
|
+
default: this.fail("disallowed character in tag name"), this.state = J, this.xmlDeclPossible = !1;
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
sOpenWakaBang() {
|
|
@@ -653,7 +653,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
653
653
|
}
|
|
654
654
|
sCommentEnded() {
|
|
655
655
|
let e = this.getCodeNorm();
|
|
656
|
-
e === Y ? this.state =
|
|
656
|
+
e === Y ? this.state = J : (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(e)}`, this.state = 17);
|
|
657
657
|
}
|
|
658
658
|
sCData() {
|
|
659
659
|
this.captureToChar(mn) && (this.state = 21);
|
|
@@ -666,7 +666,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
666
666
|
let e = this.getCodeNorm();
|
|
667
667
|
switch (e) {
|
|
668
668
|
case Y:
|
|
669
|
-
this.cdataHandler?.(this.text), this.text = "", this.state =
|
|
669
|
+
this.cdataHandler?.(this.text), this.text = "", this.state = J;
|
|
670
670
|
break;
|
|
671
671
|
case mn:
|
|
672
672
|
this.text += "]";
|
|
@@ -676,17 +676,17 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
676
676
|
}
|
|
677
677
|
sPIFirstChar() {
|
|
678
678
|
let e = this.getCodeNorm();
|
|
679
|
-
this.nameStartCheck(e) ? (this.piTarget += String.fromCodePoint(e), this.state = 24) : e === X ||
|
|
679
|
+
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);
|
|
680
680
|
}
|
|
681
681
|
sPIRest() {
|
|
682
682
|
let { chunk: e, i: t } = this;
|
|
683
683
|
for (;;) {
|
|
684
684
|
let n = this.getCodeNorm();
|
|
685
|
-
if (n ===
|
|
685
|
+
if (n === q) return void (this.piTarget += e.slice(t));
|
|
686
686
|
if (!this.nameCheck(n)) {
|
|
687
687
|
this.piTarget += e.slice(t, this.prevI);
|
|
688
688
|
let r = n === X;
|
|
689
|
-
r ||
|
|
689
|
+
r || K(n) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = r ? un : 27) : this.state = r ? 26 : 25 : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(n));
|
|
690
690
|
break;
|
|
691
691
|
}
|
|
692
692
|
}
|
|
@@ -694,7 +694,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
694
694
|
sPIBody() {
|
|
695
695
|
if (this.text.length === 0) {
|
|
696
696
|
let e = this.getCodeNorm();
|
|
697
|
-
e === X ? this.state = 26 :
|
|
697
|
+
e === X ? this.state = 26 : K(e) || (this.text = String.fromCodePoint(e));
|
|
698
698
|
} else this.captureToChar(X) && (this.state = 26);
|
|
699
699
|
}
|
|
700
700
|
sPIEnding() {
|
|
@@ -704,18 +704,18 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
704
704
|
e.toLowerCase() === "xml" && this.fail("the XML declaration must appear at the start of the document."), this.piHandler?.({
|
|
705
705
|
target: e,
|
|
706
706
|
body: this.text
|
|
707
|
-
}), this.piTarget = this.text = "", this.state =
|
|
707
|
+
}), this.piTarget = this.text = "", this.state = J;
|
|
708
708
|
} else e === X ? this.text += "?" : (this.text += `?${String.fromCodePoint(e)}`, this.state = 25);
|
|
709
709
|
this.xmlDeclPossible = !1;
|
|
710
710
|
}
|
|
711
711
|
sXMLDeclNameStart() {
|
|
712
712
|
let e = this.skipSpaces();
|
|
713
|
-
e === X ? this.state = un : e !==
|
|
713
|
+
e === X ? this.state = un : e !== q && (this.state = 28, this.name = String.fromCodePoint(e));
|
|
714
714
|
}
|
|
715
715
|
sXMLDeclName() {
|
|
716
716
|
let e = this.captureTo(yn);
|
|
717
717
|
if (e === X) return this.state = un, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
718
|
-
if (
|
|
718
|
+
if (K(e) || e === pn) {
|
|
719
719
|
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
720
720
|
case 0:
|
|
721
721
|
this.fail("did not expect any more name/value pairs.");
|
|
@@ -731,17 +731,17 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
731
731
|
sXMLDeclEq() {
|
|
732
732
|
let e = this.getCodeNorm();
|
|
733
733
|
if (e === X) return this.state = un, void this.fail("XML declaration is incomplete.");
|
|
734
|
-
|
|
734
|
+
K(e) || (e !== pn && this.fail("value required."), this.state = 30);
|
|
735
735
|
}
|
|
736
736
|
sXMLDeclValueStart() {
|
|
737
737
|
let e = this.getCodeNorm();
|
|
738
738
|
if (e === X) return this.state = un, void this.fail("XML declaration is incomplete.");
|
|
739
|
-
|
|
739
|
+
K(e) || (hn(e) ? this.q = e : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
740
740
|
}
|
|
741
741
|
sXMLDeclValue() {
|
|
742
742
|
let e = this.captureTo([this.q, X]);
|
|
743
743
|
if (e === X) return this.state = un, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
744
|
-
if (e ===
|
|
744
|
+
if (e === q) return;
|
|
745
745
|
let t = this.text;
|
|
746
746
|
switch (this.text = "", this.name) {
|
|
747
747
|
case "version": {
|
|
@@ -759,14 +759,14 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
759
759
|
}
|
|
760
760
|
sXMLDeclSeparator() {
|
|
761
761
|
let e = this.getCodeNorm();
|
|
762
|
-
e === X ? this.state = un : (
|
|
762
|
+
e === X ? this.state = un : (K(e) || (this.fail("whitespace required."), this.unGet()), this.state = 27);
|
|
763
763
|
}
|
|
764
764
|
sXMLDeclEnding() {
|
|
765
|
-
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 =
|
|
765
|
+
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;
|
|
766
766
|
}
|
|
767
767
|
sOpenTag() {
|
|
768
768
|
let e = this.captureNameChars();
|
|
769
|
-
if (e ===
|
|
769
|
+
if (e === q) return;
|
|
770
770
|
let t = this.tag = {
|
|
771
771
|
name: this.name,
|
|
772
772
|
attributes: Object.create(null)
|
|
@@ -778,7 +778,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
778
778
|
case 47:
|
|
779
779
|
this.state = 35;
|
|
780
780
|
break;
|
|
781
|
-
default:
|
|
781
|
+
default: K(e) || this.fail("disallowed character in tag name."), this.state = 36;
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
sOpenTagSlash() {
|
|
@@ -786,25 +786,25 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
786
786
|
}
|
|
787
787
|
sAttrib() {
|
|
788
788
|
let e = this.skipSpaces();
|
|
789
|
-
e !==
|
|
789
|
+
e !== q && (Xt(e) ? (this.unGet(), this.state = 37) : e === Y ? this.openTag() : e === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
790
790
|
}
|
|
791
791
|
sAttribName() {
|
|
792
792
|
let e = this.captureNameChars();
|
|
793
|
-
e === pn ? this.state = 39 :
|
|
793
|
+
e === pn ? 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.");
|
|
794
794
|
}
|
|
795
795
|
sAttribNameSawWhite() {
|
|
796
796
|
let e = this.skipSpaces();
|
|
797
797
|
switch (e) {
|
|
798
|
-
case
|
|
798
|
+
case q: return;
|
|
799
799
|
case pn:
|
|
800
800
|
this.state = 39;
|
|
801
801
|
break;
|
|
802
|
-
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() :
|
|
802
|
+
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() : Xt(e) ? (this.unGet(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
sAttribValue() {
|
|
806
806
|
let e = this.getCodeNorm();
|
|
807
|
-
hn(e) ? (this.q = e, this.state = 40) :
|
|
807
|
+
hn(e) ? (this.q = e, this.state = 40) : K(e) || (this.fail("unquoted attribute value."), this.state = 42, this.unGet());
|
|
808
808
|
}
|
|
809
809
|
sAttribValueQuoted() {
|
|
810
810
|
let { q: e, chunk: t } = this, { i: n } = this;
|
|
@@ -816,21 +816,21 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
816
816
|
this.text += t.slice(n, this.prevI), this.state = 14, this.entityReturnState = 40;
|
|
817
817
|
return;
|
|
818
818
|
case dn:
|
|
819
|
-
case
|
|
819
|
+
case ln:
|
|
820
820
|
case 9:
|
|
821
821
|
this.text += `${t.slice(n, this.prevI)} `, n = this.i;
|
|
822
822
|
break;
|
|
823
823
|
case fn:
|
|
824
824
|
this.text += t.slice(n, this.prevI), this.fail("disallowed character.");
|
|
825
825
|
return;
|
|
826
|
-
case
|
|
826
|
+
case q:
|
|
827
827
|
this.text += t.slice(n);
|
|
828
828
|
return;
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
sAttribValueClosed() {
|
|
832
832
|
let e = this.getCodeNorm();
|
|
833
|
-
|
|
833
|
+
K(e) ? this.state = 36 : e === Y ? this.openTag() : e === 47 ? this.state = 35 : Xt(e) ? (this.fail("no whitespace between attributes."), this.unGet(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
834
834
|
}
|
|
835
835
|
sAttribValueUnquoted() {
|
|
836
836
|
let e = this.captureTo(bn);
|
|
@@ -841,20 +841,20 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
841
841
|
case fn:
|
|
842
842
|
this.fail("disallowed character.");
|
|
843
843
|
break;
|
|
844
|
-
case
|
|
844
|
+
case q: break;
|
|
845
845
|
default: this.text.includes("]]>") && this.fail("the string \"]]>\" is disallowed in char data."), this.pushAttrib(this.name, this.text), this.name = this.text = "", e === Y ? this.openTag() : this.state = 36;
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
848
|
sCloseTag() {
|
|
849
849
|
let e = this.captureNameChars();
|
|
850
|
-
e === Y ? this.closeTag() :
|
|
850
|
+
e === Y ? this.closeTag() : K(e) ? this.state = 44 : e !== q && this.fail("disallowed character in closing tag.");
|
|
851
851
|
}
|
|
852
852
|
sCloseTagSawWhite() {
|
|
853
853
|
switch (this.skipSpaces()) {
|
|
854
854
|
case Y:
|
|
855
855
|
this.closeTag();
|
|
856
856
|
break;
|
|
857
|
-
case
|
|
857
|
+
case q: break;
|
|
858
858
|
default: this.fail("disallowed character in closing tag.");
|
|
859
859
|
}
|
|
860
860
|
}
|
|
@@ -869,7 +869,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
869
869
|
t = 0;
|
|
870
870
|
break t;
|
|
871
871
|
case 38:
|
|
872
|
-
this.state = 14, this.entityReturnState =
|
|
872
|
+
this.state = 14, this.entityReturnState = J, r !== void 0 && (this.text += n.slice(e, this.prevI)), t = 0;
|
|
873
873
|
break t;
|
|
874
874
|
case mn:
|
|
875
875
|
switch (t) {
|
|
@@ -886,10 +886,10 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
886
886
|
case Y:
|
|
887
887
|
t === 2 && this.fail("the string \"]]>\" is disallowed in char data."), t = 0;
|
|
888
888
|
break;
|
|
889
|
-
case
|
|
889
|
+
case ln:
|
|
890
890
|
r !== void 0 && (this.text += `${n.slice(e, this.prevI)}\n`), e = this.i, t = 0;
|
|
891
891
|
break;
|
|
892
|
-
case
|
|
892
|
+
case q:
|
|
893
893
|
r !== void 0 && (this.text += n.slice(e));
|
|
894
894
|
break t;
|
|
895
895
|
default: t = 0;
|
|
@@ -908,15 +908,15 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
908
908
|
}
|
|
909
909
|
break t;
|
|
910
910
|
case 38:
|
|
911
|
-
this.state = 14, this.entityReturnState =
|
|
911
|
+
this.state = 14, this.entityReturnState = J, n !== void 0 && (this.text += t.slice(e, this.prevI)), r = !0;
|
|
912
912
|
break t;
|
|
913
|
-
case
|
|
913
|
+
case ln:
|
|
914
914
|
n !== void 0 && (this.text += `${t.slice(e, this.prevI)}\n`), e = this.i;
|
|
915
915
|
break;
|
|
916
|
-
case
|
|
916
|
+
case q:
|
|
917
917
|
n !== void 0 && (this.text += t.slice(e));
|
|
918
918
|
break t;
|
|
919
|
-
default:
|
|
919
|
+
default: K(i) || (r = !0);
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
922
|
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));
|
|
@@ -950,7 +950,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
950
950
|
let t = e.pop();
|
|
951
951
|
this.fail(`unclosed tag: ${t.name}`);
|
|
952
952
|
}
|
|
953
|
-
this.state !== 0 && this.state !==
|
|
953
|
+
this.state !== 0 && this.state !== J && this.fail("unexpected end.");
|
|
954
954
|
let { text: t } = this;
|
|
955
955
|
return t.length !== 0 && (this.textHandler?.(t), this.text = ""), this._closed = !0, this.endHandler?.(), this._init(), this;
|
|
956
956
|
}
|
|
@@ -985,7 +985,7 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
985
985
|
let { attributes: n } = t, r = /* @__PURE__ */ new Set();
|
|
986
986
|
for (let t of e) {
|
|
987
987
|
let { name: e, prefix: i, local: a } = t, o, s;
|
|
988
|
-
i === "" ? (o = e === "xmlns" ?
|
|
988
|
+
i === "" ? (o = e === "xmlns" ? on : "", 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;
|
|
989
989
|
}
|
|
990
990
|
this.attribList = [];
|
|
991
991
|
}
|
|
@@ -997,16 +997,16 @@ var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
|
997
997
|
openTag() {
|
|
998
998
|
this.processAttribs();
|
|
999
999
|
let { tags: e } = this, t = this.tag;
|
|
1000
|
-
t.isSelfClosing = !1, this.openTagHandler?.(t), e.push(t), this.state =
|
|
1000
|
+
t.isSelfClosing = !1, this.openTagHandler?.(t), e.push(t), this.state = J, this.name = "";
|
|
1001
1001
|
}
|
|
1002
1002
|
openSelfClosingTag() {
|
|
1003
1003
|
this.processAttribs();
|
|
1004
1004
|
let { tags: e } = this, t = this.tag;
|
|
1005
|
-
t.isSelfClosing = !0, this.openTagHandler?.(t), this.closeTagHandler?.(t), (this.tag = e[e.length - 1] ?? null) === null && (this.closedRoot = !0), this.state =
|
|
1005
|
+
t.isSelfClosing = !0, this.openTagHandler?.(t), this.closeTagHandler?.(t), (this.tag = e[e.length - 1] ?? null) === null && (this.closedRoot = !0), this.state = J, this.name = "";
|
|
1006
1006
|
}
|
|
1007
1007
|
closeTag() {
|
|
1008
1008
|
let { tags: e, name: t } = this;
|
|
1009
|
-
if (this.state =
|
|
1009
|
+
if (this.state = J, this.name = "", t === "") return this.fail("weird empty close tag."), void (this.text += "</>");
|
|
1010
1010
|
let n = this.closeTagHandler, r = e.length;
|
|
1011
1011
|
for (; r-- > 0;) {
|
|
1012
1012
|
let r = this.tag = e.pop();
|
|
@@ -1302,7 +1302,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1302
1302
|
key: null,
|
|
1303
1303
|
source: e,
|
|
1304
1304
|
parent: null
|
|
1305
|
-
}, f = null, p = !1, m = null,
|
|
1305
|
+
}, f = null, p = !1, m = null, ee = null, h = null, g = (e, t) => {
|
|
1306
1306
|
let n = c.attributes[e];
|
|
1307
1307
|
if (t) {
|
|
1308
1308
|
if (Array.isArray(t)) {
|
|
@@ -1311,7 +1311,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1311
1311
|
} else if (n == null || (n = t(n), n == null)) return;
|
|
1312
1312
|
}
|
|
1313
1313
|
return n;
|
|
1314
|
-
},
|
|
1314
|
+
}, _ = {
|
|
1315
1315
|
getSource: () => f?.source ?? null,
|
|
1316
1316
|
setSource: (e) => {
|
|
1317
1317
|
f.source = e;
|
|
@@ -1320,8 +1320,8 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1320
1320
|
f.key = e;
|
|
1321
1321
|
},
|
|
1322
1322
|
getFrom: () => c,
|
|
1323
|
-
getAttribute: (e, t) =>
|
|
1324
|
-
hasAttribute: (e) =>
|
|
1323
|
+
getAttribute: (e, t) => g(e, t) ?? null,
|
|
1324
|
+
hasAttribute: (e) => _.getAttribute(e) !== null,
|
|
1325
1325
|
getParent: () => {
|
|
1326
1326
|
let e = u[u.length - 2];
|
|
1327
1327
|
return e.parent ?? e.source;
|
|
@@ -1331,14 +1331,14 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1331
1331
|
for (let n = 0; n < t; n++) e.push(a[n].local);
|
|
1332
1332
|
return e.join("\\");
|
|
1333
1333
|
},
|
|
1334
|
-
parseAttribute:
|
|
1335
|
-
getRawXml: () =>
|
|
1334
|
+
parseAttribute: g,
|
|
1335
|
+
getRawXml: () => h,
|
|
1336
1336
|
copyToObject: (e, t, n, r) => {
|
|
1337
|
-
let i =
|
|
1337
|
+
let i = g(r ?? t, n);
|
|
1338
1338
|
i !== void 0 && (e[t] = i);
|
|
1339
1339
|
},
|
|
1340
1340
|
copyTo: (e, t, n) => {
|
|
1341
|
-
let r =
|
|
1341
|
+
let r = g(n ?? e, t);
|
|
1342
1342
|
r !== void 0 && (f.source[e] = r);
|
|
1343
1343
|
},
|
|
1344
1344
|
warn: (e, t) => {
|
|
@@ -1360,53 +1360,53 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1360
1360
|
tag: e,
|
|
1361
1361
|
destination: null
|
|
1362
1362
|
}, a.push(o), s = t, void (c = e);
|
|
1363
|
-
let
|
|
1363
|
+
let h = (i.length > 0 ? i[i.length - 1] : r).get(t);
|
|
1364
1364
|
if (o = {
|
|
1365
1365
|
local: t,
|
|
1366
|
-
visitor:
|
|
1366
|
+
visitor: h,
|
|
1367
1367
|
tag: e,
|
|
1368
1368
|
destination: null
|
|
1369
1369
|
}, p) return a.push(o), s = t, void (c = e);
|
|
1370
1370
|
l = o?.visitor ?? null, s = t, c = e;
|
|
1371
|
-
let
|
|
1372
|
-
if (
|
|
1373
|
-
let e =
|
|
1374
|
-
e === null ?
|
|
1371
|
+
let g = !!h && h.to === null;
|
|
1372
|
+
if (h && !g && h.scope) {
|
|
1373
|
+
let e = h.scope(_);
|
|
1374
|
+
e === null ? g = !0 : e && (i.push(e), o.pushedScope = !0);
|
|
1375
1375
|
}
|
|
1376
|
-
|
|
1376
|
+
h && (a.length === 0 ? (f = d, o.destination = f, o.pushedDestination = !0, u.push(f)) : g ? (f = null, o.destination = null) : h.transparent ? o.destination = f : (f = {
|
|
1377
1377
|
key: null,
|
|
1378
1378
|
source: {},
|
|
1379
1379
|
parent: null
|
|
1380
|
-
}, o.destination = f, o.pushedDestination = !0, u.push(f))), a.push(o), p =
|
|
1381
|
-
let
|
|
1382
|
-
|
|
1380
|
+
}, o.destination = f, o.pushedDestination = !0, u.push(f))), a.push(o), p = g;
|
|
1381
|
+
let v = l?.openTag?.(_);
|
|
1382
|
+
v !== void 0 && (f.parent = v), h?.raw && !g && (m = [], ee = o);
|
|
1383
1383
|
},
|
|
1384
1384
|
onCloseTag: (e) => {
|
|
1385
1385
|
let t = e.name, r = t.indexOf(":");
|
|
1386
1386
|
if (r !== -1 && (t = t.slice(r + 1)), t !== s) throw Error(`mismatch open/close tag: '${t}'/'${s}'`);
|
|
1387
|
-
let
|
|
1387
|
+
let g = !1;
|
|
1388
1388
|
if (m) {
|
|
1389
|
-
if (a[a.length - 1] !==
|
|
1390
|
-
|
|
1389
|
+
if (a[a.length - 1] !== ee) return m.push(`</${e.name}>`), a.pop(), o = a[a.length - 1] ?? null, s = o?.local ?? null, void (c = o?.tag ?? null);
|
|
1390
|
+
h = m.join(""), m = null, ee = null, g = !0;
|
|
1391
1391
|
}
|
|
1392
|
-
p || l?.closeTag?.(
|
|
1393
|
-
let
|
|
1394
|
-
o = a[a.length - 1] ?? null,
|
|
1395
|
-
let
|
|
1396
|
-
if (
|
|
1392
|
+
p || l?.closeTag?.(_), g && (h = null);
|
|
1393
|
+
let v = a.pop() ?? null;
|
|
1394
|
+
o = a[a.length - 1] ?? null, v?.pushedScope && i.pop();
|
|
1395
|
+
let y = v?.destination;
|
|
1396
|
+
if (y && v.pushedDestination) {
|
|
1397
1397
|
u.pop(), f = u[u.length - 1] ?? d;
|
|
1398
|
-
let e =
|
|
1399
|
-
e && e.to &&
|
|
1400
|
-
} else
|
|
1398
|
+
let e = v.visitor;
|
|
1399
|
+
e && e.to && y.source !== void 0 && (Array.isArray(e.to) ? f.source.push ? f.source.push(y.source) : n?.(`Unable to parse array for ${e.from} at ${_.getPath()}`) : y.key ? f.source[y.key] = y.source : typeof e.to == "string" && (f.source[e.to] = y.source));
|
|
1400
|
+
} else y || (f = u[u.length - 1] ?? d);
|
|
1401
1401
|
s = o?.local ?? null, c = o?.tag ?? null, l = o?.visitor ?? null, p = !o?.destination;
|
|
1402
1402
|
},
|
|
1403
1403
|
onText: (e) => {
|
|
1404
|
-
m ? m.push(Fn(e)) : l?.text?.(e,
|
|
1404
|
+
m ? m.push(Fn(e)) : l?.text?.(e, _);
|
|
1405
1405
|
},
|
|
1406
1406
|
onEnd: t
|
|
1407
1407
|
};
|
|
1408
1408
|
}
|
|
1409
|
-
}, Rn = `IFERROR(${
|
|
1409
|
+
}, Rn = `IFERROR(${ae}(`, zn = Rn.toUpperCase(), Bn = _.toUpperCase(), Vn = { kind: "none" }, Hn = { kind: "spilled" }, Un = (e, t) => {
|
|
1410
1410
|
if (e.charCodeAt(t) !== 34) return null;
|
|
1411
1411
|
let n = "", r = t + 1;
|
|
1412
1412
|
for (; r < e.length;) if (e.charCodeAt(r) === 34) {
|
|
@@ -1466,19 +1466,19 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1466
1466
|
return !(!r || r.rowStart !== e || r.colEnd !== t - 1) && (r.colEnd = t, this._byColumn.set(t, r), r.restored);
|
|
1467
1467
|
}
|
|
1468
1468
|
getFormulaArray() {
|
|
1469
|
-
return this._restored.map((e) => [
|
|
1469
|
+
return this._restored.map((e) => [H.rangeToString(e), "dynamic"]);
|
|
1470
1470
|
}
|
|
1471
1471
|
}, Kn = /^\s*TABLE\s*\(([^()]*)\)\s*$/i, qn = /^\s*(\$?)([A-Za-z]{1,3})(\$?)(\d{1,7})\s*$/, Jn = (e) => {
|
|
1472
1472
|
let t = qn.exec(e);
|
|
1473
1473
|
if (!t) return null;
|
|
1474
|
-
let n =
|
|
1474
|
+
let n = H.fastStringToCol(t[2]), r = parseInt(t[4], 10) - 1;
|
|
1475
1475
|
return n < 0 || r < 0 ? null : {
|
|
1476
1476
|
row: r,
|
|
1477
1477
|
col: n,
|
|
1478
1478
|
colAbsolute: t[1] === "$",
|
|
1479
1479
|
rowAbsolute: t[3] === "$"
|
|
1480
1480
|
};
|
|
1481
|
-
}, Yn = (e) =>
|
|
1481
|
+
}, Yn = (e) => H.cellToString({
|
|
1482
1482
|
rowIndex: e.row,
|
|
1483
1483
|
colIndex: e.col
|
|
1484
1484
|
}), Xn = (e, t) => {
|
|
@@ -1539,10 +1539,10 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1539
1539
|
n.weight = ar(t) ? 700 : 400;
|
|
1540
1540
|
break;
|
|
1541
1541
|
case "i":
|
|
1542
|
-
n.style = ar(t) ?
|
|
1542
|
+
n.style = ar(t) ? rt.Style.Italic : rt.Style.Normal;
|
|
1543
1543
|
break;
|
|
1544
1544
|
case "strike":
|
|
1545
|
-
n.strike =
|
|
1545
|
+
n.strike = Be(ar(t));
|
|
1546
1546
|
break;
|
|
1547
1547
|
case "outline":
|
|
1548
1548
|
n.outline = ar(t);
|
|
@@ -1552,12 +1552,12 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1552
1552
|
break;
|
|
1553
1553
|
case "condense":
|
|
1554
1554
|
case "extend": {
|
|
1555
|
-
let r =
|
|
1555
|
+
let r = l(e, ar(t));
|
|
1556
1556
|
r !== void 0 && (n.letterSpacing = r);
|
|
1557
1557
|
break;
|
|
1558
1558
|
}
|
|
1559
1559
|
case "u":
|
|
1560
|
-
n.underline =
|
|
1560
|
+
n.underline = le(t.val);
|
|
1561
1561
|
break;
|
|
1562
1562
|
case "vertAlign": {
|
|
1563
1563
|
let e = B(t.val);
|
|
@@ -1585,7 +1585,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1585
1585
|
break;
|
|
1586
1586
|
}
|
|
1587
1587
|
case "scheme":
|
|
1588
|
-
|
|
1588
|
+
se(n, t.val);
|
|
1589
1589
|
break;
|
|
1590
1590
|
case "color": {
|
|
1591
1591
|
let e = t.rgb;
|
|
@@ -1593,7 +1593,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1593
1593
|
n.color = "#" + (e.length === 8 ? e.substring(2) : e).toUpperCase();
|
|
1594
1594
|
break;
|
|
1595
1595
|
}
|
|
1596
|
-
let r =
|
|
1596
|
+
let r = k((e) => t[e]);
|
|
1597
1597
|
r && (n.color = r);
|
|
1598
1598
|
break;
|
|
1599
1599
|
}
|
|
@@ -1606,7 +1606,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1606
1606
|
onCloseTag(e) {
|
|
1607
1607
|
if (e === "rPr") this._inRPr = !1, this._font ??= {};
|
|
1608
1608
|
else if (e === "r" && this._inRun) {
|
|
1609
|
-
let e =
|
|
1609
|
+
let e = ie(this._text), t = this._font;
|
|
1610
1610
|
this._runs.push(t ? {
|
|
1611
1611
|
text: e,
|
|
1612
1612
|
font: t
|
|
@@ -1626,9 +1626,9 @@ function rr(e, t) {
|
|
|
1626
1626
|
size: 11,
|
|
1627
1627
|
...t,
|
|
1628
1628
|
weight: 400,
|
|
1629
|
-
style:
|
|
1630
|
-
underline:
|
|
1631
|
-
strike:
|
|
1629
|
+
style: rt.Style.Normal,
|
|
1630
|
+
underline: rt.UnderlineStyle.None,
|
|
1631
|
+
strike: rt.StrikeStyle.None,
|
|
1632
1632
|
baseline: 0
|
|
1633
1633
|
}, r = Array(e.length);
|
|
1634
1634
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -1667,19 +1667,19 @@ var ir = {
|
|
|
1667
1667
|
return {
|
|
1668
1668
|
c: n(t("col")),
|
|
1669
1669
|
r: n(t("row")),
|
|
1670
|
-
x:
|
|
1671
|
-
y:
|
|
1670
|
+
x: S(t("colOff") ?? "0") ?? 0,
|
|
1671
|
+
y: S(t("rowOff") ?? "0") ?? 0
|
|
1672
1672
|
};
|
|
1673
|
-
}, sr = "formulaDialect", cr = "isKnownFunction", lr = "date1904", ur = "richStrings", dr = "defaultFont", fr = (e, t, r, i, a,
|
|
1674
|
-
let
|
|
1673
|
+
}, sr = "formulaDialect", cr = "isKnownFunction", lr = "date1904", ur = "richStrings", dr = "defaultFont", fr = (e, t, r, i, a, o, s, l) => {
|
|
1674
|
+
let u = new Ln(), d = (e) => {
|
|
1675
1675
|
let t = e.getAttribute("dxfId", Q);
|
|
1676
|
-
return t === null ? void 0 : i?.get(t) || (
|
|
1677
|
-
},
|
|
1678
|
-
|
|
1676
|
+
return t === null ? void 0 : i?.get(t) || (o?.(`A color filter or sort names a format that does not exist (dxfId '${t}').`), {});
|
|
1677
|
+
}, f = !1, m = l?.get("parseInlineDxf"), ee = l?.get(sr), h = (e) => ee && e ? ee.readDetached(e) : e, g = new mt.TransposedBuilder(), _ = null, v = "topLeft";
|
|
1678
|
+
u.registerVisitor({
|
|
1679
1679
|
from: "autoFilter",
|
|
1680
1680
|
to: "autoTable",
|
|
1681
1681
|
openTag: (e) => {
|
|
1682
|
-
let t = e.getAttribute("ref"), n =
|
|
1682
|
+
let t = e.getAttribute("ref"), n = H.fastStringToRange(t);
|
|
1683
1683
|
e.getSource().r = n, e.getSource().v = {};
|
|
1684
1684
|
},
|
|
1685
1685
|
closeTag: (e) => {
|
|
@@ -1689,7 +1689,7 @@ var ir = {
|
|
|
1689
1689
|
e === 0 ? n.hiddenButtons = !1 : e === a && (n.hiddenButtons = !0);
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
|
-
}),
|
|
1692
|
+
}), u.registerVisitor({
|
|
1693
1693
|
from: "conditionalFormatting",
|
|
1694
1694
|
to: {},
|
|
1695
1695
|
openTag: (e) => {
|
|
@@ -1703,7 +1703,7 @@ var ir = {
|
|
|
1703
1703
|
}, i = e.getAttribute("pivot", Z);
|
|
1704
1704
|
i !== null && (r.pivot = i), e.setSource(r);
|
|
1705
1705
|
}
|
|
1706
|
-
}),
|
|
1706
|
+
}), u.registerVisitor({
|
|
1707
1707
|
from: "cfRule",
|
|
1708
1708
|
to: {},
|
|
1709
1709
|
openTag: (e) => {
|
|
@@ -1718,7 +1718,7 @@ var ir = {
|
|
|
1718
1718
|
let r = e.getAttribute("dxfId", Q);
|
|
1719
1719
|
if (r !== null) {
|
|
1720
1720
|
let t = i?.get(r);
|
|
1721
|
-
t ||= (
|
|
1721
|
+
t ||= (o?.(`Unable to load conditional color. Invalid dxfI: '${r}' at '${e.getPath()}'.`), {}), n.style = t;
|
|
1722
1722
|
}
|
|
1723
1723
|
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", $);
|
|
1724
1724
|
},
|
|
@@ -1727,17 +1727,17 @@ var ir = {
|
|
|
1727
1727
|
if (!t?.r) return;
|
|
1728
1728
|
let n = t.conditionals[t.conditionals.length - 1], r = n?.rule;
|
|
1729
1729
|
if (!r) return;
|
|
1730
|
-
let i = {}, a =
|
|
1730
|
+
let i = {}, a = O(r, o);
|
|
1731
1731
|
a && (i.condition = a), r.style && (i.style = r.style), r.scale && (i.scale = r.scale), r.stopIfTrue && (i.stopIfTrue = !0), r.pivot && typeof r.priority == "number" && (i.pivotKey = r.priority), n.v = i, n.priority = r.priority, r.x14Id && (n.x14Id = r.x14Id), delete n.rule;
|
|
1732
1732
|
}
|
|
1733
1733
|
});
|
|
1734
1734
|
let te = (e, t) => {
|
|
1735
1735
|
let n = t.minLength ?? 10, r = t.maxLength ?? 90;
|
|
1736
1736
|
n === 0 ? delete e.minLength : e.minLength = n, r === 100 ? delete e.maxLength : e.maxLength = r;
|
|
1737
|
-
},
|
|
1737
|
+
}, b = (e, t) => {
|
|
1738
1738
|
let n = (e, t) => !e || e.type === t && e.value === void 0 && !e.exclusive, [r, i] = t;
|
|
1739
|
-
n(r,
|
|
1740
|
-
},
|
|
1739
|
+
n(r, nt.ColorStopType.Min) ? delete e.minPoint : e.minPoint = r, n(i, nt.ColorStopType.Max) ? delete e.maxPoint : e.maxPoint = i;
|
|
1740
|
+
}, ne = (e) => {
|
|
1741
1741
|
let t = e.conditions ?? [], n = [];
|
|
1742
1742
|
for (let e = 0; e < t.length; e++) {
|
|
1743
1743
|
let r = t[e], i = {};
|
|
@@ -1745,31 +1745,31 @@ var ir = {
|
|
|
1745
1745
|
}
|
|
1746
1746
|
return n;
|
|
1747
1747
|
};
|
|
1748
|
-
|
|
1748
|
+
u.registerVisitor({
|
|
1749
1749
|
from: "colorScale",
|
|
1750
1750
|
to: {},
|
|
1751
1751
|
openTag: (e) => {},
|
|
1752
1752
|
closeTag: (e) => {
|
|
1753
|
-
let t = e.getSource(), n = t.colors ?? [], r =
|
|
1753
|
+
let t = e.getSource(), n = t.colors ?? [], r = ne(t);
|
|
1754
1754
|
for (let e = 0; e < r.length; e++) r[e].color = n[e];
|
|
1755
1755
|
e.getParent().scale = {
|
|
1756
|
-
type:
|
|
1756
|
+
type: nt.ScaleType.ColorScale,
|
|
1757
1757
|
stops: r
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
1760
|
-
}),
|
|
1760
|
+
}), u.registerVisitor({
|
|
1761
1761
|
from: "dataBar",
|
|
1762
1762
|
to: {},
|
|
1763
1763
|
openTag: (e) => {
|
|
1764
1764
|
e.copyTo("maxLength", Q), e.copyTo("minLength", Q), e.copyTo("showValue", Z);
|
|
1765
1765
|
},
|
|
1766
1766
|
closeTag: (e) => {
|
|
1767
|
-
let t = e.getSource(), n = { type:
|
|
1768
|
-
|
|
1767
|
+
let t = e.getSource(), n = { type: nt.ScaleType.DataBar };
|
|
1768
|
+
b(n, ne(t));
|
|
1769
1769
|
let r = t.colors?.[0];
|
|
1770
1770
|
r && (n.color = r), te(n, t), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1771
1771
|
}
|
|
1772
|
-
}),
|
|
1772
|
+
}), u.registerVisitor({
|
|
1773
1773
|
from: "iconSet",
|
|
1774
1774
|
to: {},
|
|
1775
1775
|
openTag: (e) => {
|
|
@@ -1777,41 +1777,41 @@ var ir = {
|
|
|
1777
1777
|
},
|
|
1778
1778
|
closeTag: (e) => {
|
|
1779
1779
|
let t = e.getSource(), n = {
|
|
1780
|
-
type:
|
|
1781
|
-
stops:
|
|
1780
|
+
type: nt.ScaleType.IconSet,
|
|
1781
|
+
stops: ne(t)
|
|
1782
1782
|
};
|
|
1783
1783
|
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;
|
|
1784
1784
|
}
|
|
1785
|
-
}),
|
|
1785
|
+
}), u.registerVisitor({
|
|
1786
1786
|
from: "formula",
|
|
1787
1787
|
to: {},
|
|
1788
1788
|
text: (e, t) => {
|
|
1789
1789
|
let n = t.getParent(), r = n.formulas;
|
|
1790
|
-
r || (r = [], n.formulas = r), r.push(
|
|
1790
|
+
r || (r = [], n.formulas = r), r.push(h(e));
|
|
1791
1791
|
}
|
|
1792
|
-
}),
|
|
1792
|
+
}), u.registerVisitor({
|
|
1793
1793
|
from: "cfvo",
|
|
1794
1794
|
to: {},
|
|
1795
1795
|
openTag: (e) => {
|
|
1796
1796
|
let t = e.getParent();
|
|
1797
1797
|
t.conditions ||= [];
|
|
1798
1798
|
let n = e.getSource();
|
|
1799
|
-
if (t.conditions.push(n), e.copyTo("type", $), n.type ===
|
|
1799
|
+
if (t.conditions.push(n), e.copyTo("type", $), n.type === nt.ColorStopType.Formula) {
|
|
1800
1800
|
let t = e.getAttribute("val");
|
|
1801
|
-
t != null && (n.value =
|
|
1801
|
+
t != null && (n.value = h(String(t)));
|
|
1802
1802
|
} else e.copyTo("value", Pn, "val");
|
|
1803
1803
|
!1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
1804
1804
|
}
|
|
1805
|
-
}),
|
|
1805
|
+
}), u.registerVisitor({
|
|
1806
1806
|
from: "color",
|
|
1807
1807
|
to: {},
|
|
1808
1808
|
openTag: (e) => {
|
|
1809
1809
|
let t = e.getParent();
|
|
1810
1810
|
t.colors ||= [];
|
|
1811
|
-
let n =
|
|
1811
|
+
let n = k((t) => e.getAttribute(t));
|
|
1812
1812
|
t.colors.push(n);
|
|
1813
1813
|
}
|
|
1814
|
-
}),
|
|
1814
|
+
}), u.registerVisitor({
|
|
1815
1815
|
from: "filterColumn",
|
|
1816
1816
|
to: {},
|
|
1817
1817
|
openTag: (e) => {
|
|
@@ -1830,51 +1830,51 @@ var ir = {
|
|
|
1830
1830
|
}
|
|
1831
1831
|
return r;
|
|
1832
1832
|
}
|
|
1833
|
-
}),
|
|
1833
|
+
}), u.registerVisitor({
|
|
1834
1834
|
from: "colorFilter",
|
|
1835
1835
|
openTag: (e) => {
|
|
1836
1836
|
let t = e.getParent(), n = {};
|
|
1837
|
-
t.operator =
|
|
1838
|
-
let r =
|
|
1837
|
+
t.operator = tt.BuiltInOperatorNames.Color, t.param = n, e.copyToObject(n, "cellColor", Z);
|
|
1838
|
+
let r = d(e);
|
|
1839
1839
|
r && (n.style = r);
|
|
1840
1840
|
}
|
|
1841
|
-
}),
|
|
1841
|
+
}), u.registerVisitor({
|
|
1842
1842
|
from: "iconFilter",
|
|
1843
1843
|
openTag: (e) => {
|
|
1844
1844
|
let t = e.getParent(), n = {};
|
|
1845
|
-
t.operator =
|
|
1845
|
+
t.operator = tt.BuiltInOperatorNames.Icon, t.param = n, e.copyToObject(n, "iconId", Q), e.copyToObject(n, "iconSet", $);
|
|
1846
1846
|
}
|
|
1847
|
-
}),
|
|
1847
|
+
}), u.registerVisitor({
|
|
1848
1848
|
from: "top10",
|
|
1849
1849
|
openTag: (e) => {
|
|
1850
1850
|
let t = e.getParent(), n = {};
|
|
1851
|
-
t.operator =
|
|
1851
|
+
t.operator = tt.BuiltInOperatorNames.TopN, t.param = n, e.copyToObject(n, "filterVal", Pn), e.copyToObject(n, "percent", Z), e.copyToObject(n, "top", Z), e.copyToObject(n, "limit", Pn, "val");
|
|
1852
1852
|
}
|
|
1853
|
-
}),
|
|
1853
|
+
}), u.registerVisitor({
|
|
1854
1854
|
from: "dynamicFilter",
|
|
1855
1855
|
openTag: (e) => {
|
|
1856
|
-
let t = e.getParent(), n =
|
|
1856
|
+
let t = e.getParent(), n = ge(e.getAttribute("type"), e.getAttribute("val"), e.getAttribute("maxVal"));
|
|
1857
1857
|
t.operator = n.operator, t.param = n.param;
|
|
1858
1858
|
}
|
|
1859
1859
|
});
|
|
1860
|
-
let
|
|
1860
|
+
let re = {
|
|
1861
1861
|
from: "filters",
|
|
1862
1862
|
to: {},
|
|
1863
1863
|
openTag: (e) => {
|
|
1864
1864
|
let t = e.getParent(), n = {};
|
|
1865
|
-
return t.selector =
|
|
1865
|
+
return t.selector = tt.BuiltInSelectorNames.Display, t.operator = tt.BuiltInOperatorNames.InSet, t.param = n, e.copyToObject(n, "blank", Z), e.copyToObject(n, "calendarType", $), n;
|
|
1866
1866
|
}
|
|
1867
1867
|
};
|
|
1868
|
-
|
|
1869
|
-
let
|
|
1868
|
+
u.registerVisitor(re);
|
|
1869
|
+
let ae = {
|
|
1870
1870
|
from: "filter",
|
|
1871
1871
|
openTag: (e) => {
|
|
1872
1872
|
let t = e.getParent(), n = t.items;
|
|
1873
1873
|
n || (n = [], t.items = n), n.push(e.getAttribute("val", $));
|
|
1874
1874
|
}
|
|
1875
1875
|
};
|
|
1876
|
-
|
|
1877
|
-
let
|
|
1876
|
+
u.registerVisitor(ae);
|
|
1877
|
+
let se = {
|
|
1878
1878
|
from: "dateGroupItem",
|
|
1879
1879
|
to: {},
|
|
1880
1880
|
openTag: (e) => {
|
|
@@ -1882,55 +1882,55 @@ var ir = {
|
|
|
1882
1882
|
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);
|
|
1883
1883
|
}
|
|
1884
1884
|
};
|
|
1885
|
-
|
|
1886
|
-
let
|
|
1887
|
-
|
|
1885
|
+
u.registerVisitor(se);
|
|
1886
|
+
let ce = /* @__PURE__ */ new Map();
|
|
1887
|
+
ce.set("filterColumn", {
|
|
1888
1888
|
from: "filterColumn",
|
|
1889
1889
|
transparent: !0
|
|
1890
|
-
}),
|
|
1890
|
+
}), ce.set("filters", re), ce.set("filter", ae), ce.set("dateGroupItem", se), u.registerVisitor({
|
|
1891
1891
|
from: "customFilters",
|
|
1892
1892
|
openTag: (e) => {
|
|
1893
1893
|
let t = e.getParent(), n = e.getAttribute("and"), r = n === "and" || n === "1", i = [];
|
|
1894
|
-
return t.operator = r ?
|
|
1894
|
+
return t.operator = r ? tt.BuiltInOperatorNames.And : tt.BuiltInOperatorNames.Or, t.param = i, e.setSource(t), i;
|
|
1895
1895
|
},
|
|
1896
1896
|
closeTag: (e) => {
|
|
1897
1897
|
let t = e.getSource(), n = t?.param;
|
|
1898
1898
|
if (!t || !n) return;
|
|
1899
|
-
let r = n.length === 1 ? n[0] :
|
|
1899
|
+
let r = n.length === 1 ? n[0] : ve(t);
|
|
1900
1900
|
r !== t && (t.operator = r.operator, t.param = r.param);
|
|
1901
1901
|
}
|
|
1902
|
-
}),
|
|
1902
|
+
}), u.registerVisitor({
|
|
1903
1903
|
from: "customFilter",
|
|
1904
1904
|
openTag: (e) => {
|
|
1905
1905
|
let t = e.getParent(), n;
|
|
1906
1906
|
Array.isArray(t) ? (n = {}, t.push(n)) : n = t;
|
|
1907
|
-
let r =
|
|
1907
|
+
let r = He({
|
|
1908
1908
|
operator: e.getAttribute("operator"),
|
|
1909
1909
|
val: e.getAttribute("val")
|
|
1910
1910
|
}, (t) => e.warn(t));
|
|
1911
1911
|
r && (n.operator = r.operator, n.param = r.param);
|
|
1912
1912
|
}
|
|
1913
1913
|
});
|
|
1914
|
-
let
|
|
1915
|
-
|
|
1914
|
+
let le = {}, de = null;
|
|
1915
|
+
u.registerVisitor({
|
|
1916
1916
|
from: "sortState",
|
|
1917
1917
|
to: {},
|
|
1918
1918
|
openTag: (e) => {
|
|
1919
1919
|
let t = e.getParent(), n = t.v;
|
|
1920
1920
|
if (!n) return;
|
|
1921
1921
|
let r = {};
|
|
1922
|
-
|
|
1922
|
+
le = {};
|
|
1923
1923
|
let i = e.getAttribute("caseSensitive", Z);
|
|
1924
|
-
i != null && (
|
|
1924
|
+
i != null && (le.collatorOptions = i ? ft.CaseSensitiveOptions : ft.CaseInsensitiveOptions);
|
|
1925
1925
|
let a = e.getAttribute("sortMethod");
|
|
1926
|
-
a !== "stroke" && a !== "pinYin" || (
|
|
1927
|
-
...
|
|
1926
|
+
a !== "stroke" && a !== "pinYin" || (le.collatorOptions = {
|
|
1927
|
+
...le.collatorOptions,
|
|
1928
1928
|
collation: a === "stroke" ? "stroke" : "pinyin"
|
|
1929
|
-
}), e.getAttribute("columnSort", Z) && (r.axis =
|
|
1929
|
+
}), e.getAttribute("columnSort", Z) && (r.axis = it.Axis.Column);
|
|
1930
1930
|
let o = e.getAttribute("ref"), s = t.r;
|
|
1931
|
-
|
|
1931
|
+
de = o && s ? H.fastStringToRange(o) : null, de && (r.extent = { range: y(s, de) }), n.sort = r, e.setSource(t);
|
|
1932
1932
|
}
|
|
1933
|
-
}),
|
|
1933
|
+
}), u.registerVisitor({
|
|
1934
1934
|
from: "sortCondition",
|
|
1935
1935
|
to: {},
|
|
1936
1936
|
openTag: (e) => {
|
|
@@ -1942,64 +1942,64 @@ var ir = {
|
|
|
1942
1942
|
i || (i = [], r.sorts = i);
|
|
1943
1943
|
let a = e.getAttribute("ref"), o = 0, s = null;
|
|
1944
1944
|
if (a) {
|
|
1945
|
-
let e =
|
|
1946
|
-
o = r ? n - i : n, r &&
|
|
1945
|
+
let e = H.fastStringToRange(a, gr), n = e.colStart, r = t.r, i = r.colStart;
|
|
1946
|
+
o = r ? n - i : n, r && de && (s = P(r, de, e));
|
|
1947
1947
|
}
|
|
1948
1948
|
r.extent && (r.extent.sorts ??= []).push(s);
|
|
1949
|
-
let c = { ...
|
|
1949
|
+
let c = { ...le }, l = Se(e.getAttribute("sortBy"));
|
|
1950
1950
|
l && (c.sortOn = l);
|
|
1951
|
-
let u =
|
|
1951
|
+
let u = d(e);
|
|
1952
1952
|
u && (c.style = u), e.copyToObject(c, "iconSet", $), e.copyToObject(c, "customList", $), c.reverse = e.getAttribute("descending", Z) ?? !1;
|
|
1953
|
-
let
|
|
1953
|
+
let f = {
|
|
1954
1954
|
index: o,
|
|
1955
1955
|
criteria: c
|
|
1956
1956
|
};
|
|
1957
|
-
i.push(
|
|
1957
|
+
i.push(f);
|
|
1958
1958
|
}
|
|
1959
1959
|
});
|
|
1960
|
-
let
|
|
1961
|
-
|
|
1962
|
-
let t =
|
|
1960
|
+
let fe = (e) => {
|
|
1961
|
+
_ = e.getSource(), v = "topLeft", e.copyTo("topLeft", $, "topLeftCell");
|
|
1962
|
+
let t = ue(e.getAttribute("defaultGridColor")), n = e.getAttribute("colorId");
|
|
1963
1963
|
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");
|
|
1964
1964
|
let r = {};
|
|
1965
|
-
for (let [t, n] of
|
|
1965
|
+
for (let [t, n] of j) {
|
|
1966
1966
|
let i = e.getAttribute(n, Q);
|
|
1967
1967
|
i && (r[t] = Math.min(400, Math.max(10, i)));
|
|
1968
1968
|
}
|
|
1969
1969
|
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);
|
|
1970
1970
|
};
|
|
1971
|
-
|
|
1971
|
+
u.registerVisitor({
|
|
1972
1972
|
from: "sheetView",
|
|
1973
1973
|
to: "view",
|
|
1974
1974
|
openTag: (e) => {
|
|
1975
|
-
|
|
1975
|
+
fe(e);
|
|
1976
1976
|
},
|
|
1977
1977
|
closeTag: () => {
|
|
1978
|
-
|
|
1978
|
+
_ = null;
|
|
1979
1979
|
}
|
|
1980
|
-
}),
|
|
1980
|
+
}), u.registerVisitor({
|
|
1981
1981
|
from: "customSheetViews",
|
|
1982
1982
|
to: "customSheetViews",
|
|
1983
1983
|
openTag: (e) => {
|
|
1984
1984
|
e.setSource([]);
|
|
1985
1985
|
}
|
|
1986
|
-
}),
|
|
1986
|
+
}), u.registerVisitor({
|
|
1987
1987
|
from: "customSheetView",
|
|
1988
1988
|
to: [],
|
|
1989
1989
|
openTag: (e) => {
|
|
1990
|
-
|
|
1990
|
+
S = !0, fe(e);
|
|
1991
1991
|
},
|
|
1992
1992
|
closeTag: () => {
|
|
1993
|
-
|
|
1993
|
+
S = !1, _ = null;
|
|
1994
1994
|
}
|
|
1995
|
-
}),
|
|
1995
|
+
}), u.registerVisitor({
|
|
1996
1996
|
from: "selection",
|
|
1997
1997
|
to: null,
|
|
1998
1998
|
openTag: (e) => {
|
|
1999
|
-
if (!
|
|
1999
|
+
if (!_) return;
|
|
2000
2000
|
let t = e.getAttribute("activeCell")?.replace(/\$/g, ""), n = e.getAttribute("sqref")?.replace(/\$/g, ""), r = e.getAttribute("pane") ?? "topLeft";
|
|
2001
|
-
if (r !==
|
|
2002
|
-
let e =
|
|
2001
|
+
if (r !== v) {
|
|
2002
|
+
let e = _.freezePanes;
|
|
2003
2003
|
if (e && t) {
|
|
2004
2004
|
let i = { activeCell: t };
|
|
2005
2005
|
n && n !== t && (i.sqref = n), (e.paneSelections ??= {})[r] = i;
|
|
@@ -2009,19 +2009,19 @@ var ir = {
|
|
|
2009
2009
|
let i = {};
|
|
2010
2010
|
t && (i.cell = t);
|
|
2011
2011
|
let a = e.getAttribute("activeCellId", Q);
|
|
2012
|
-
a !== null && (i.rangeIndex = a), n && n !== t && (i.ranges = n.trim().split(/\s+/)),
|
|
2012
|
+
a !== null && (i.rangeIndex = a), n && n !== t && (i.ranges = n.trim().split(/\s+/)), _.selection = i;
|
|
2013
2013
|
}
|
|
2014
|
-
}),
|
|
2014
|
+
}), u.registerVisitor({
|
|
2015
2015
|
from: "pane",
|
|
2016
2016
|
to: null,
|
|
2017
2017
|
openTag: (e) => {
|
|
2018
|
-
if (!
|
|
2019
|
-
|
|
2018
|
+
if (!_) return;
|
|
2019
|
+
v = e.getAttribute("activePane") ?? "topLeft";
|
|
2020
2020
|
let t = e.getAttribute("state");
|
|
2021
2021
|
if (t === "frozen" || t === "frozenSplit") {
|
|
2022
2022
|
let t = {};
|
|
2023
|
-
|
|
2024
|
-
let n = (
|
|
2023
|
+
_.freezePanes = t, e.copyToObject(t, "topLeft", $, "topLeftCell");
|
|
2024
|
+
let n = (_.topLeft ? H.fastStringToCell(_.topLeft) : void 0) ?? {
|
|
2025
2025
|
colIndex: 0,
|
|
2026
2026
|
rowIndex: 0
|
|
2027
2027
|
}, r = {
|
|
@@ -2033,10 +2033,10 @@ var ir = {
|
|
|
2033
2033
|
colIndex: n.colIndex + r.colIndex,
|
|
2034
2034
|
rowIndex: n.rowIndex + r.rowIndex
|
|
2035
2035
|
};
|
|
2036
|
-
t.coords =
|
|
2036
|
+
t.coords = H.cellToString(i);
|
|
2037
2037
|
}
|
|
2038
2038
|
}
|
|
2039
|
-
}),
|
|
2039
|
+
}), u.registerVisitor({
|
|
2040
2040
|
from: "sheetPr",
|
|
2041
2041
|
transparent: !0,
|
|
2042
2042
|
openTag: (t) => {
|
|
@@ -2047,22 +2047,22 @@ var ir = {
|
|
|
2047
2047
|
let i = t.getAttribute("syncRef");
|
|
2048
2048
|
i && (r.anchor = i), Object.keys(r).length > 0 && (e.syncScroll = r);
|
|
2049
2049
|
}
|
|
2050
|
-
}),
|
|
2050
|
+
}), u.registerVisitor({
|
|
2051
2051
|
from: "tabColor",
|
|
2052
2052
|
to: null,
|
|
2053
2053
|
openTag: (t) => {
|
|
2054
|
-
let n =
|
|
2054
|
+
let n = k((e) => t.getAttribute(e));
|
|
2055
2055
|
n && (e.tabColor = n);
|
|
2056
2056
|
}
|
|
2057
2057
|
});
|
|
2058
|
-
let
|
|
2059
|
-
|
|
2058
|
+
let S = !1, C = () => e.pageLayout ??= {};
|
|
2059
|
+
u.registerVisitor({
|
|
2060
2060
|
from: "pageSetUpPr",
|
|
2061
2061
|
to: null,
|
|
2062
2062
|
openTag: (e) => {
|
|
2063
|
-
!0 === e.getAttribute("fitToPage", Z) && (
|
|
2063
|
+
!0 === e.getAttribute("fitToPage", Z) && (C().fitToPage = !0), !1 === e.getAttribute("autoPageBreaks", Z) && (C().hideAutoPageBreaks = !0);
|
|
2064
2064
|
}
|
|
2065
|
-
}),
|
|
2065
|
+
}), u.registerVisitor({
|
|
2066
2066
|
from: "outlinePr",
|
|
2067
2067
|
to: null,
|
|
2068
2068
|
openTag: (t) => {
|
|
@@ -2075,11 +2075,11 @@ var ir = {
|
|
|
2075
2075
|
return n === "1" || n === "true";
|
|
2076
2076
|
})("applyStyles") && (r.automaticStyles = !0), Object.keys(r).length > 0 && (e.outline = r);
|
|
2077
2077
|
}
|
|
2078
|
-
}),
|
|
2078
|
+
}), u.registerVisitor({
|
|
2079
2079
|
from: "pageMargins",
|
|
2080
2080
|
to: null,
|
|
2081
2081
|
openTag: (e) => {
|
|
2082
|
-
if (
|
|
2082
|
+
if (S) return;
|
|
2083
2083
|
let t = (t, n) => e.getAttribute(t, Pn) ?? n, n = {
|
|
2084
2084
|
left: t("left", .7),
|
|
2085
2085
|
right: t("right", .7),
|
|
@@ -2088,14 +2088,14 @@ var ir = {
|
|
|
2088
2088
|
header: t("header", .3),
|
|
2089
2089
|
footer: t("footer", .3)
|
|
2090
2090
|
};
|
|
2091
|
-
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (
|
|
2091
|
+
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (C().margins = n);
|
|
2092
2092
|
}
|
|
2093
|
-
}),
|
|
2093
|
+
}), u.registerVisitor({
|
|
2094
2094
|
from: "pageSetup",
|
|
2095
2095
|
to: null,
|
|
2096
2096
|
openTag: (e) => {
|
|
2097
|
-
if (
|
|
2098
|
-
let n =
|
|
2097
|
+
if (S) return;
|
|
2098
|
+
let n = C(), r = (t) => e.getAttribute(t, Q) ?? void 0, i = (t) => e.getAttribute(t, Z), a = e.getAttribute("orientation");
|
|
2099
2099
|
a !== "landscape" && a !== "portrait" || (n.orientation = a);
|
|
2100
2100
|
for (let e of [
|
|
2101
2101
|
"paperSize",
|
|
@@ -2116,82 +2116,82 @@ var ir = {
|
|
|
2116
2116
|
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);
|
|
2117
2117
|
let c = e.getAttribute("cellComments"), l = ye.find(([e]) => e === c)?.[1];
|
|
2118
2118
|
l && (n.printComments = l);
|
|
2119
|
-
let u = e.getAttribute("errors"), d =
|
|
2119
|
+
let u = e.getAttribute("errors"), d = we.find(([e]) => e === u)?.[1];
|
|
2120
2120
|
d && (n.printErrors = d);
|
|
2121
2121
|
let f = e.getAttribute("r:id"), p = f ? t(f, "part") : null;
|
|
2122
2122
|
p && (n.printerSettings = p);
|
|
2123
2123
|
}
|
|
2124
|
-
}),
|
|
2124
|
+
}), u.registerVisitor({
|
|
2125
2125
|
from: "printOptions",
|
|
2126
2126
|
to: null,
|
|
2127
2127
|
openTag: (e) => {
|
|
2128
|
-
if (
|
|
2128
|
+
if (S) return;
|
|
2129
2129
|
let t = (t) => !0 === e.getAttribute(t, Z);
|
|
2130
|
-
t("horizontalCentered") && (
|
|
2130
|
+
t("horizontalCentered") && (C().centerHorizontally = !0), t("verticalCentered") && (C().centerVertically = !0), t("gridLines") && (C().printGridlines = !0), t("headings") && (C().printHeadings = !0);
|
|
2131
2131
|
}
|
|
2132
|
-
}),
|
|
2132
|
+
}), u.registerVisitor({
|
|
2133
2133
|
from: "headerFooter",
|
|
2134
2134
|
to: {},
|
|
2135
2135
|
openTag: (e) => {
|
|
2136
|
-
if (
|
|
2136
|
+
if (S) return;
|
|
2137
2137
|
let t = {}, n = (t) => e.getAttribute(t, Z);
|
|
2138
|
-
!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 && (
|
|
2138
|
+
!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 && (C().headerFooter = t);
|
|
2139
2139
|
}
|
|
2140
2140
|
});
|
|
2141
|
-
for (let e of Me)
|
|
2141
|
+
for (let e of Me) u.registerVisitor({
|
|
2142
2142
|
from: e,
|
|
2143
2143
|
to: {},
|
|
2144
2144
|
text: (t, n) => {
|
|
2145
|
-
if (
|
|
2146
|
-
let r =
|
|
2147
|
-
i[e] = (i[e] ?? "") +
|
|
2145
|
+
if (S) return;
|
|
2146
|
+
let r = C(), i = r.headerFooter ??= {};
|
|
2147
|
+
i[e] = (i[e] ?? "") + ie(t);
|
|
2148
2148
|
}
|
|
2149
2149
|
});
|
|
2150
|
-
let
|
|
2151
|
-
for (let [e, t] of [["rowBreaks", "rowBreaks"], ["colBreaks", "columnBreaks"]])
|
|
2150
|
+
let pe = "rowBreaks";
|
|
2151
|
+
for (let [e, t] of [["rowBreaks", "rowBreaks"], ["colBreaks", "columnBreaks"]]) u.registerVisitor({
|
|
2152
2152
|
from: e,
|
|
2153
2153
|
to: {},
|
|
2154
2154
|
openTag: () => {
|
|
2155
|
-
|
|
2155
|
+
pe = t;
|
|
2156
2156
|
}
|
|
2157
2157
|
});
|
|
2158
|
-
|
|
2158
|
+
u.registerVisitor({
|
|
2159
2159
|
from: "brk",
|
|
2160
2160
|
to: null,
|
|
2161
2161
|
openTag: (e) => {
|
|
2162
|
-
if (
|
|
2162
|
+
if (S) return;
|
|
2163
2163
|
let t = e.getAttribute("id", Q);
|
|
2164
2164
|
if (t == null) return;
|
|
2165
2165
|
let n = { index: t }, r = e.getAttribute("min", Q);
|
|
2166
2166
|
r != null && (n.min = r);
|
|
2167
2167
|
let i = e.getAttribute("max", Q);
|
|
2168
2168
|
i != null && (n.max = i), !0 !== e.getAttribute("man", Z) && (n.automatic = !0), !0 === e.getAttribute("pt", Z) && (n.pivot = !0);
|
|
2169
|
-
let a =
|
|
2170
|
-
(a[
|
|
2169
|
+
let a = C();
|
|
2170
|
+
(a[pe] ??= []).push(n);
|
|
2171
2171
|
}
|
|
2172
|
-
}),
|
|
2172
|
+
}), u.registerVisitor({
|
|
2173
2173
|
from: "ignoredErrors",
|
|
2174
2174
|
transparent: !0
|
|
2175
|
-
}),
|
|
2175
|
+
}), u.registerVisitor({
|
|
2176
2176
|
from: "ignoredError",
|
|
2177
2177
|
to: null,
|
|
2178
2178
|
openTag: (t) => {
|
|
2179
2179
|
let n = t.getAttribute("sqref");
|
|
2180
2180
|
if (!n) return;
|
|
2181
2181
|
let r = [];
|
|
2182
|
-
for (let e of
|
|
2182
|
+
for (let e of p) !0 === t.getAttribute(e, Z) && r.push(e);
|
|
2183
2183
|
if (r.length !== 0) for (let t of n.trim().split(/\s+/)) (e.ignoredErrors ??= []).push({
|
|
2184
2184
|
r: t,
|
|
2185
2185
|
v: r
|
|
2186
2186
|
});
|
|
2187
2187
|
}
|
|
2188
|
-
}),
|
|
2188
|
+
}), u.registerVisitor({
|
|
2189
2189
|
from: "mergeCells",
|
|
2190
2190
|
to: "merges",
|
|
2191
2191
|
openTag: (e) => {
|
|
2192
2192
|
e.setSource([]);
|
|
2193
2193
|
}
|
|
2194
|
-
}),
|
|
2194
|
+
}), u.registerVisitor({
|
|
2195
2195
|
from: "dataValidations",
|
|
2196
2196
|
to: "validations",
|
|
2197
2197
|
openTag: (t) => {
|
|
@@ -2207,7 +2207,7 @@ var ir = {
|
|
|
2207
2207
|
});
|
|
2208
2208
|
}
|
|
2209
2209
|
});
|
|
2210
|
-
let
|
|
2210
|
+
let he = {
|
|
2211
2211
|
from: "dataValidation",
|
|
2212
2212
|
to: [],
|
|
2213
2213
|
openTag: (e) => {
|
|
@@ -2226,25 +2226,25 @@ var ir = {
|
|
|
2226
2226
|
closeTag: (e) => {
|
|
2227
2227
|
let t = e.getSource();
|
|
2228
2228
|
if (!t?.rule) return;
|
|
2229
|
-
let n = ke(t.rule,
|
|
2229
|
+
let n = ke(t.rule, o);
|
|
2230
2230
|
n && (e.getAttribute("allowBlank", Z) && (n.includeBlanks = !0), t.v.condition = n), delete t.rule;
|
|
2231
2231
|
}
|
|
2232
2232
|
};
|
|
2233
|
-
|
|
2233
|
+
u.registerVisitor(he), u.registerVisitor({
|
|
2234
2234
|
from: "formula1",
|
|
2235
2235
|
to: {},
|
|
2236
2236
|
text: (e, t) => {
|
|
2237
2237
|
let n = t.getParent().rule;
|
|
2238
|
-
n?.type && (n.formula1 =
|
|
2238
|
+
n?.type && (n.formula1 = M(h(e), n.type));
|
|
2239
2239
|
}
|
|
2240
|
-
}),
|
|
2240
|
+
}), u.registerVisitor({
|
|
2241
2241
|
from: "formula2",
|
|
2242
2242
|
to: {},
|
|
2243
2243
|
text: (e, t) => {
|
|
2244
2244
|
let n = t.getParent().rule;
|
|
2245
|
-
n?.type && (n.formula2 =
|
|
2245
|
+
n?.type && (n.formula2 = M(h(e), n.type));
|
|
2246
2246
|
}
|
|
2247
|
-
}),
|
|
2247
|
+
}), u.registerVisitor({
|
|
2248
2248
|
from: "picture",
|
|
2249
2249
|
to: "picture",
|
|
2250
2250
|
openTag: (e) => {
|
|
@@ -2266,7 +2266,7 @@ var ir = {
|
|
|
2266
2266
|
for (let e of a) i.slicers[e] = r[e];
|
|
2267
2267
|
}
|
|
2268
2268
|
};
|
|
2269
|
-
|
|
2269
|
+
u.registerVisitor(_e);
|
|
2270
2270
|
let be = {
|
|
2271
2271
|
from: "timelineRef",
|
|
2272
2272
|
to: {},
|
|
@@ -2277,7 +2277,7 @@ var ir = {
|
|
|
2277
2277
|
i.slicers ??= {};
|
|
2278
2278
|
for (let e of Object.keys(r)) i.slicers[e] = r[e];
|
|
2279
2279
|
}
|
|
2280
|
-
},
|
|
2280
|
+
}, N = (e, t) => ({
|
|
2281
2281
|
from: e,
|
|
2282
2282
|
to: {},
|
|
2283
2283
|
openTag: (e) => {
|
|
@@ -2289,8 +2289,8 @@ var ir = {
|
|
|
2289
2289
|
closeTag: (e) => {
|
|
2290
2290
|
t(String(e.getSource() ?? ""), e);
|
|
2291
2291
|
}
|
|
2292
|
-
}),
|
|
2293
|
-
|
|
2292
|
+
}), F = /* @__PURE__ */ new Map();
|
|
2293
|
+
F.set("dataValidations", {
|
|
2294
2294
|
from: "dataValidations",
|
|
2295
2295
|
to: "validations",
|
|
2296
2296
|
openTag: (e) => {
|
|
@@ -2300,15 +2300,15 @@ var ir = {
|
|
|
2300
2300
|
closeTag: (e) => {
|
|
2301
2301
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
2302
2302
|
}
|
|
2303
|
-
}),
|
|
2304
|
-
...
|
|
2303
|
+
}), F.set("dataValidation", {
|
|
2304
|
+
...he,
|
|
2305
2305
|
closeTag: (e) => {
|
|
2306
|
-
|
|
2306
|
+
he.closeTag(e);
|
|
2307
2307
|
let t = e.getSource();
|
|
2308
2308
|
t && !t.r && (e.warn("x14 dataValidation with no xm:sqref was dropped."), e.setSource(void 0));
|
|
2309
2309
|
}
|
|
2310
2310
|
});
|
|
2311
|
-
let
|
|
2311
|
+
let Te = (e) => ({
|
|
2312
2312
|
from: e,
|
|
2313
2313
|
to: {},
|
|
2314
2314
|
openTag: (t) => {
|
|
@@ -2318,18 +2318,18 @@ var ir = {
|
|
|
2318
2318
|
});
|
|
2319
2319
|
}
|
|
2320
2320
|
});
|
|
2321
|
-
|
|
2321
|
+
F.set("formula1", Te("formula1")), F.set("formula2", Te("formula2")), F.set("f", N("f", (e, t) => {
|
|
2322
2322
|
let n = t.getParent(), r = n?.rule;
|
|
2323
|
-
r && (r[n.key] =
|
|
2324
|
-
})),
|
|
2323
|
+
r && (r[n.key] = M(h(e), r.type));
|
|
2324
|
+
})), F.set("sqref", N("sqref", (e, t) => {
|
|
2325
2325
|
let n = t.getParent(), r = e.trim();
|
|
2326
2326
|
n && r && (n.r = r.split(/\s+/).join(","));
|
|
2327
2327
|
}));
|
|
2328
|
-
let
|
|
2329
|
-
|
|
2328
|
+
let Ee = /* @__PURE__ */ new Map(), De = [], I = /* @__PURE__ */ new Map();
|
|
2329
|
+
I.set("conditionalFormattings", {
|
|
2330
2330
|
from: "conditionalFormattings",
|
|
2331
2331
|
transparent: !0
|
|
2332
|
-
}),
|
|
2332
|
+
}), I.set("conditionalFormatting", {
|
|
2333
2333
|
from: "conditionalFormatting",
|
|
2334
2334
|
to: {},
|
|
2335
2335
|
openTag: (e) => {
|
|
@@ -2339,10 +2339,10 @@ var ir = {
|
|
|
2339
2339
|
let t = e.getSource(), n = t?.rules ?? [];
|
|
2340
2340
|
for (let e = 0; e < n.length; e++) {
|
|
2341
2341
|
let r = n[e];
|
|
2342
|
-
r.sqref = t.sqref, r.id ?
|
|
2342
|
+
r.sqref = t.sqref, r.id ? Ee.set(r.id, r) : De.push(r);
|
|
2343
2343
|
}
|
|
2344
2344
|
}
|
|
2345
|
-
}),
|
|
2345
|
+
}), I.set("cfRule", {
|
|
2346
2346
|
from: "cfRule",
|
|
2347
2347
|
to: {},
|
|
2348
2348
|
openTag: (e) => {
|
|
@@ -2352,10 +2352,10 @@ var ir = {
|
|
|
2352
2352
|
let t = e.getSource();
|
|
2353
2353
|
t && e.getParent()?.rules?.push(t);
|
|
2354
2354
|
}
|
|
2355
|
-
}),
|
|
2355
|
+
}), I.set("sqref", N("sqref", (e, t) => {
|
|
2356
2356
|
let n = t.getParent(), r = e.trim();
|
|
2357
2357
|
n && r && (n.sqref = r);
|
|
2358
|
-
})),
|
|
2358
|
+
})), I.set("dataBar", {
|
|
2359
2359
|
from: "dataBar",
|
|
2360
2360
|
to: {},
|
|
2361
2361
|
openTag: (e) => {
|
|
@@ -2364,7 +2364,7 @@ var ir = {
|
|
|
2364
2364
|
closeTag: (e) => {
|
|
2365
2365
|
e.getParent().dataBar = e.getSource();
|
|
2366
2366
|
}
|
|
2367
|
-
}),
|
|
2367
|
+
}), I.set("iconSet", {
|
|
2368
2368
|
from: "iconSet",
|
|
2369
2369
|
to: {},
|
|
2370
2370
|
openTag: (e) => {
|
|
@@ -2375,12 +2375,12 @@ var ir = {
|
|
|
2375
2375
|
}
|
|
2376
2376
|
});
|
|
2377
2377
|
let Ae = /* @__PURE__ */ new Map();
|
|
2378
|
-
Ae.set("f",
|
|
2378
|
+
Ae.set("f", N("f", (e, t) => {
|
|
2379
2379
|
let n = t.getParent();
|
|
2380
2380
|
if (!n) return;
|
|
2381
2381
|
let r = e.trim(), i = Number(r);
|
|
2382
|
-
n.value = r.length > 0 && Number.isFinite(i) ? i :
|
|
2383
|
-
})),
|
|
2382
|
+
n.value = r.length > 0 && Number.isFinite(i) ? i : h(e);
|
|
2383
|
+
})), I.set("cfvo", {
|
|
2384
2384
|
from: "cfvo",
|
|
2385
2385
|
to: {},
|
|
2386
2386
|
scope: () => Ae,
|
|
@@ -2390,18 +2390,18 @@ var ir = {
|
|
|
2390
2390
|
let n = e.getSource();
|
|
2391
2391
|
t.conditions.push(n), e.copyTo("type", $), !1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
2392
2392
|
}
|
|
2393
|
-
}),
|
|
2393
|
+
}), I.set("f", N("f", (e, t) => {
|
|
2394
2394
|
let n = t.getParent();
|
|
2395
|
-
n && (n.formulas ??= []).push(
|
|
2396
|
-
})),
|
|
2395
|
+
n && (n.formulas ??= []).push(h(e));
|
|
2396
|
+
})), I.set("dxf", {
|
|
2397
2397
|
from: "dxf",
|
|
2398
2398
|
to: {},
|
|
2399
2399
|
raw: !0,
|
|
2400
2400
|
closeTag: (e) => {
|
|
2401
|
-
if (!
|
|
2401
|
+
if (!m) return;
|
|
2402
2402
|
let t = e.getParent();
|
|
2403
2403
|
if (!t) return;
|
|
2404
|
-
let n =
|
|
2404
|
+
let n = m(e.getRawXml() ?? "");
|
|
2405
2405
|
n && (t.style = n);
|
|
2406
2406
|
}
|
|
2407
2407
|
});
|
|
@@ -2409,11 +2409,11 @@ var ir = {
|
|
|
2409
2409
|
from: e,
|
|
2410
2410
|
to: {},
|
|
2411
2411
|
openTag: (t) => {
|
|
2412
|
-
let n =
|
|
2412
|
+
let n = k((e) => t.getAttribute(e));
|
|
2413
2413
|
n && (t.getParent()[e] = n);
|
|
2414
2414
|
}
|
|
2415
2415
|
});
|
|
2416
|
-
|
|
2416
|
+
I.set("borderColor", Ne("borderColor")), I.set("negativeFillColor", Ne("negativeFillColor")), I.set("negativeBorderColor", Ne("negativeBorderColor")), I.set("axisColor", Ne("axisColor")), I.set("cfIcon", {
|
|
2417
2417
|
from: "cfIcon",
|
|
2418
2418
|
to: {},
|
|
2419
2419
|
openTag: (e) => {
|
|
@@ -2427,7 +2427,7 @@ var ir = {
|
|
|
2427
2427
|
}
|
|
2428
2428
|
});
|
|
2429
2429
|
let Pe = /* @__PURE__ */ new Map();
|
|
2430
|
-
Pe.set("id",
|
|
2430
|
+
Pe.set("id", N("id", (e, t) => {
|
|
2431
2431
|
let n = t.getParent(), r = e.trim();
|
|
2432
2432
|
n && r && (n.x14Id = r);
|
|
2433
2433
|
}));
|
|
@@ -2441,8 +2441,8 @@ var ir = {
|
|
|
2441
2441
|
from: "timelineRefs",
|
|
2442
2442
|
transparent: !0
|
|
2443
2443
|
}), Le.set("timelineRef", be);
|
|
2444
|
-
let
|
|
2445
|
-
|
|
2444
|
+
let Re = /* @__PURE__ */ new Map();
|
|
2445
|
+
Re.set("sparklineGroups", {
|
|
2446
2446
|
from: "sparklineGroups",
|
|
2447
2447
|
to: "sparklineGroups",
|
|
2448
2448
|
openTag: (e) => {
|
|
@@ -2452,7 +2452,7 @@ var ir = {
|
|
|
2452
2452
|
closeTag: (e) => {
|
|
2453
2453
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
2454
2454
|
}
|
|
2455
|
-
}),
|
|
2455
|
+
}), Re.set("sparklineGroup", {
|
|
2456
2456
|
from: "sparklineGroup",
|
|
2457
2457
|
to: [],
|
|
2458
2458
|
openTag: (e) => {
|
|
@@ -2467,29 +2467,29 @@ var ir = {
|
|
|
2467
2467
|
});
|
|
2468
2468
|
},
|
|
2469
2469
|
closeTag: (e) => {
|
|
2470
|
-
let t = e.getSource(), n =
|
|
2470
|
+
let t = e.getSource(), n = Oe(t.properties, t.entries);
|
|
2471
2471
|
n || e.warn("A sparkline group with no sparklines was dropped.", { onceKey: "xlsx.sheet.sparklineGroup.empty" }), e.setSource(n ?? void 0);
|
|
2472
2472
|
}
|
|
2473
2473
|
});
|
|
2474
|
-
for (let e of
|
|
2474
|
+
for (let e of me) Re.set(e, {
|
|
2475
2475
|
from: e,
|
|
2476
2476
|
to: {},
|
|
2477
2477
|
openTag: (t) => {
|
|
2478
|
-
let n =
|
|
2478
|
+
let n = k((e) => t.getAttribute(e));
|
|
2479
2479
|
n && (t.getParent().properties[e] = n);
|
|
2480
2480
|
}
|
|
2481
2481
|
});
|
|
2482
|
-
|
|
2482
|
+
Re.set("sparklines", {
|
|
2483
2483
|
from: "sparklines",
|
|
2484
2484
|
transparent: !0
|
|
2485
|
-
}),
|
|
2485
|
+
}), Re.set("sparkline", {
|
|
2486
2486
|
from: "sparkline",
|
|
2487
2487
|
to: {},
|
|
2488
2488
|
openTag: (e) => {
|
|
2489
2489
|
e.setSource({ isSparkline: !0 });
|
|
2490
2490
|
},
|
|
2491
2491
|
closeTag: (e) => {
|
|
2492
|
-
let t = e.getSource(), n = e.getParent(), r = t?.sqref?.trim(), i = r ?
|
|
2492
|
+
let t = e.getSource(), n = e.getParent(), r = t?.sqref?.trim(), i = r ? H.fastStringToRange(r.split(/\s+/)[0]) : null;
|
|
2493
2493
|
i ? n.entries.push({
|
|
2494
2494
|
location: {
|
|
2495
2495
|
rowIndex: i.rowStart,
|
|
@@ -2498,54 +2498,54 @@ var ir = {
|
|
|
2498
2498
|
data: t.data ?? ""
|
|
2499
2499
|
}) : e.warn("A sparkline with no location was dropped.", { onceKey: "xlsx.sheet.sparkline.incomplete" });
|
|
2500
2500
|
}
|
|
2501
|
-
}),
|
|
2501
|
+
}), Re.set("f", N("f", (e, t) => {
|
|
2502
2502
|
let n = t.getParent(), r = e.trim();
|
|
2503
2503
|
n && r && (n.isSparkline ? n.data = r : n.properties.dateRange = r);
|
|
2504
|
-
})),
|
|
2504
|
+
})), Re.set("sqref", N("sqref", (e, t) => {
|
|
2505
2505
|
let n = t.getParent();
|
|
2506
2506
|
n?.isSparkline && (n.sqref = e);
|
|
2507
2507
|
}));
|
|
2508
|
-
let
|
|
2509
|
-
[
|
|
2510
|
-
[
|
|
2511
|
-
[
|
|
2512
|
-
[
|
|
2513
|
-
[
|
|
2514
|
-
[
|
|
2515
|
-
[
|
|
2516
|
-
[
|
|
2517
|
-
[
|
|
2518
|
-
]),
|
|
2519
|
-
|
|
2508
|
+
let ze = /* @__PURE__ */ new Map([
|
|
2509
|
+
[x(A), Re],
|
|
2510
|
+
[x(xe), F],
|
|
2511
|
+
[x(Fe), I],
|
|
2512
|
+
[x(D), I],
|
|
2513
|
+
[x(E), Pe],
|
|
2514
|
+
[x(je), Ie],
|
|
2515
|
+
[x(Ce), Ie],
|
|
2516
|
+
[x(R), Le],
|
|
2517
|
+
[x(L), ce]
|
|
2518
|
+
]), Be = /* @__PURE__ */ new Set();
|
|
2519
|
+
u.registerVisitor({
|
|
2520
2520
|
from: "extLst",
|
|
2521
2521
|
transparent: !0
|
|
2522
|
-
}),
|
|
2522
|
+
}), u.registerVisitor({
|
|
2523
2523
|
from: "ext",
|
|
2524
2524
|
transparent: !0,
|
|
2525
2525
|
scope: (e) => {
|
|
2526
|
-
let t = e.getAttribute("uri"), n =
|
|
2526
|
+
let t = e.getAttribute("uri"), n = x(t), r = ze.get(n);
|
|
2527
2527
|
if (r) return r;
|
|
2528
|
-
if (!
|
|
2529
|
-
|
|
2530
|
-
let r =
|
|
2528
|
+
if (!oe.has(n) && !Be.has(n)) {
|
|
2529
|
+
Be.add(n);
|
|
2530
|
+
let r = c[n];
|
|
2531
2531
|
e.warn(r ? `Extension content '${r}' (${t}) is not read; it will be lost on resave.` : `Unknown extension content (uri ${t}) is not read; it will be lost on resave.`);
|
|
2532
2532
|
}
|
|
2533
2533
|
return null;
|
|
2534
2534
|
}
|
|
2535
|
-
}),
|
|
2535
|
+
}), u.registerVisitor({
|
|
2536
2536
|
from: "mergeCell",
|
|
2537
2537
|
to: [],
|
|
2538
2538
|
openTag: (e) => {
|
|
2539
2539
|
let t = e.getAttribute("ref");
|
|
2540
2540
|
e.setSource(t);
|
|
2541
2541
|
}
|
|
2542
|
-
}),
|
|
2542
|
+
}), u.registerVisitor({
|
|
2543
2543
|
from: "hyperlinks",
|
|
2544
2544
|
to: "hyperlinks",
|
|
2545
2545
|
openTag: (e) => {
|
|
2546
2546
|
e.setSource([]);
|
|
2547
2547
|
}
|
|
2548
|
-
}),
|
|
2548
|
+
}), u.registerVisitor({
|
|
2549
2549
|
from: "hyperlink",
|
|
2550
2550
|
to: [],
|
|
2551
2551
|
openTag: (e) => {
|
|
@@ -2563,7 +2563,7 @@ var ir = {
|
|
|
2563
2563
|
v: o
|
|
2564
2564
|
});
|
|
2565
2565
|
}
|
|
2566
|
-
}),
|
|
2566
|
+
}), u.registerVisitor({
|
|
2567
2567
|
from: "drawing",
|
|
2568
2568
|
to: "movables",
|
|
2569
2569
|
openTag: (e) => {
|
|
@@ -2572,32 +2572,32 @@ var ir = {
|
|
|
2572
2572
|
let r = t(n);
|
|
2573
2573
|
r ? e.setSource(r.movables) : e.warn("A drawing part is missing; its shapes were not imported.", { onceKey: "xlsx.sheet.drawing.missing" });
|
|
2574
2574
|
}
|
|
2575
|
-
}),
|
|
2575
|
+
}), u.registerVisitor({
|
|
2576
2576
|
from: "legacyDrawing",
|
|
2577
2577
|
to: "legacyDrawing",
|
|
2578
2578
|
openTag: (e) => {
|
|
2579
2579
|
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2580
2580
|
}
|
|
2581
|
-
}),
|
|
2581
|
+
}), u.registerVisitor({
|
|
2582
2582
|
from: "legacyDrawingHF",
|
|
2583
2583
|
to: "legacyDrawingHF",
|
|
2584
2584
|
openTag: (e) => {
|
|
2585
2585
|
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2586
2586
|
}
|
|
2587
2587
|
});
|
|
2588
|
-
let
|
|
2588
|
+
let Ve = null, B = !1, Ue = /* @__PURE__ */ new Map(), V = {
|
|
2589
2589
|
from: "Fallback",
|
|
2590
2590
|
to: null
|
|
2591
|
-
},
|
|
2591
|
+
}, We = {
|
|
2592
2592
|
from: "Choice",
|
|
2593
2593
|
transparent: !0
|
|
2594
2594
|
};
|
|
2595
|
-
|
|
2595
|
+
Ue.set("Fallback", V), Ue.set("Choice", We), Ue.set("control", {
|
|
2596
2596
|
from: "control",
|
|
2597
2597
|
transparent: !0,
|
|
2598
2598
|
openTag: (e) => {
|
|
2599
2599
|
let n = e.getAttribute("name"), r = e.getAttribute("r:id"), i = r ? t(r, "formControl") : null;
|
|
2600
|
-
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (
|
|
2600
|
+
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (Ve = null);
|
|
2601
2601
|
let a = i.json, o = parseInt(e.getAttribute("shapeId") ?? "", 10);
|
|
2602
2602
|
isNaN(o) || (a.shapeId = o);
|
|
2603
2603
|
let s = {
|
|
@@ -2620,29 +2620,29 @@ var ir = {
|
|
|
2620
2620
|
json: a
|
|
2621
2621
|
}
|
|
2622
2622
|
};
|
|
2623
|
-
n && (s.content.name = n),
|
|
2623
|
+
n && (s.content.name = n), Ve = {
|
|
2624
2624
|
movable: s,
|
|
2625
2625
|
control: a
|
|
2626
2626
|
};
|
|
2627
2627
|
},
|
|
2628
2628
|
closeTag: () => {
|
|
2629
|
-
|
|
2629
|
+
Ve &&= (e.movables ||= [], e.movables.push(Ve.movable), null);
|
|
2630
2630
|
}
|
|
2631
|
-
}),
|
|
2631
|
+
}), Ue.set("controlPr", {
|
|
2632
2632
|
from: "controlPr",
|
|
2633
2633
|
transparent: !0,
|
|
2634
2634
|
raw: !0,
|
|
2635
2635
|
openTag: (e) => {
|
|
2636
|
-
if (!
|
|
2636
|
+
if (!Ve) return;
|
|
2637
2637
|
let t = e.getFrom().attributes ?? {}, n = {};
|
|
2638
2638
|
for (let e in t) {
|
|
2639
2639
|
let r = t[e];
|
|
2640
2640
|
n[e] = typeof r == "string" ? r : r?.value ?? "";
|
|
2641
2641
|
}
|
|
2642
|
-
|
|
2642
|
+
w(n, Ve.control);
|
|
2643
2643
|
},
|
|
2644
2644
|
closeTag: (e) => {
|
|
2645
|
-
if (!
|
|
2645
|
+
if (!Ve) return;
|
|
2646
2646
|
let t = ((e) => {
|
|
2647
2647
|
let t = /<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);
|
|
2648
2648
|
if (!t) return null;
|
|
@@ -2656,31 +2656,31 @@ var ir = {
|
|
|
2656
2656
|
rest: (e.slice(0, t.index) + e.slice(t.index + t[0].length)).trim()
|
|
2657
2657
|
};
|
|
2658
2658
|
})(e.getRawXml() ?? "");
|
|
2659
|
-
t ? (
|
|
2659
|
+
t ? (Ve.movable.anchor = t.anchor, t.anchorType !== "twoCell" && (Ve.movable.anchorType = t.anchorType), t.rest && (Ve.control.xml = t.rest)) : B || (B = !0, e.warn("A form control has no anchor; it is placed at the top left of the sheet."));
|
|
2660
2660
|
}
|
|
2661
2661
|
});
|
|
2662
|
-
let
|
|
2662
|
+
let Ge = {
|
|
2663
2663
|
from: "controls",
|
|
2664
2664
|
transparent: !0,
|
|
2665
|
-
scope: () =>
|
|
2665
|
+
scope: () => Ue
|
|
2666
2666
|
};
|
|
2667
|
-
|
|
2668
|
-
let
|
|
2669
|
-
["Choice",
|
|
2670
|
-
["Fallback",
|
|
2671
|
-
["controls",
|
|
2667
|
+
u.registerVisitor(Ge);
|
|
2668
|
+
let Ke = /* @__PURE__ */ new Map([
|
|
2669
|
+
["Choice", We],
|
|
2670
|
+
["Fallback", V],
|
|
2671
|
+
["controls", Ge]
|
|
2672
2672
|
]);
|
|
2673
|
-
|
|
2673
|
+
u.registerVisitor({
|
|
2674
2674
|
from: "AlternateContent",
|
|
2675
2675
|
transparent: !0,
|
|
2676
|
-
scope: () =>
|
|
2677
|
-
}),
|
|
2676
|
+
scope: () => Ke
|
|
2677
|
+
}), u.registerVisitor({
|
|
2678
2678
|
from: "tableParts",
|
|
2679
2679
|
to: "tables",
|
|
2680
2680
|
openTag: (e) => {
|
|
2681
2681
|
e.setSource([]);
|
|
2682
2682
|
}
|
|
2683
|
-
}),
|
|
2683
|
+
}), u.registerVisitor({
|
|
2684
2684
|
from: "tablePart",
|
|
2685
2685
|
to: [],
|
|
2686
2686
|
openTag: (e) => {
|
|
@@ -2690,26 +2690,26 @@ var ir = {
|
|
|
2690
2690
|
r ? e.setSource(r) : e.warn("A table part is missing; the table was not imported.", { onceKey: "xlsx.sheet.table.missing" });
|
|
2691
2691
|
}
|
|
2692
2692
|
});
|
|
2693
|
-
let
|
|
2694
|
-
t.conditions?.length &&
|
|
2695
|
-
},
|
|
2696
|
-
t.conditions?.length && (e.stops =
|
|
2697
|
-
},
|
|
2693
|
+
let qe = (e, t) => {
|
|
2694
|
+
t.conditions?.length && b(e, ne(t)), te(e, t), !1 === t.gradient ? e.solidFill = !0 : delete e.solidFill, 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);
|
|
2695
|
+
}, Je = (e, t) => {
|
|
2696
|
+
t.conditions?.length && (e.stops = ne(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);
|
|
2697
|
+
}, Ye = (e) => {
|
|
2698
2698
|
if (!e.sqref) return null;
|
|
2699
2699
|
let t = e.sqref.split(/\s+/).join(",");
|
|
2700
2700
|
if (e.type === "iconSet") {
|
|
2701
2701
|
if (!e.iconSet) return null;
|
|
2702
2702
|
let n = {
|
|
2703
|
-
type:
|
|
2703
|
+
type: nt.ScaleType.IconSet,
|
|
2704
2704
|
stops: []
|
|
2705
2705
|
};
|
|
2706
|
-
return
|
|
2706
|
+
return Je(n, e.iconSet), {
|
|
2707
2707
|
r: t,
|
|
2708
2708
|
v: { scale: n },
|
|
2709
2709
|
priority: e.priority
|
|
2710
2710
|
};
|
|
2711
2711
|
}
|
|
2712
|
-
let n =
|
|
2712
|
+
let n = O(e, o);
|
|
2713
2713
|
if (!n) return null;
|
|
2714
2714
|
let r = { condition: n };
|
|
2715
2715
|
return e.style && (r.style = e.style), e.stopIfTrue && (r.stopIfTrue = !0), {
|
|
@@ -2718,7 +2718,7 @@ var ir = {
|
|
|
2718
2718
|
priority: e.priority
|
|
2719
2719
|
};
|
|
2720
2720
|
};
|
|
2721
|
-
|
|
2721
|
+
u.registerVisitor({
|
|
2722
2722
|
from: "worksheet",
|
|
2723
2723
|
to: {},
|
|
2724
2724
|
openTag: (e) => {},
|
|
@@ -2728,27 +2728,27 @@ var ir = {
|
|
|
2728
2728
|
let t = n[e], r = t.x14Id;
|
|
2729
2729
|
if (!r) continue;
|
|
2730
2730
|
delete t.x14Id;
|
|
2731
|
-
let i =
|
|
2731
|
+
let i = Ee.get(r);
|
|
2732
2732
|
if (!i) continue;
|
|
2733
|
-
|
|
2733
|
+
Ee.delete(r);
|
|
2734
2734
|
let a = t.v?.scale;
|
|
2735
|
-
i.dataBar && a?.type ===
|
|
2735
|
+
i.dataBar && a?.type === nt.ScaleType.DataBar ? qe(a, i.dataBar) : i.iconSet && a?.type === nt.ScaleType.IconSet && Je(a, i.iconSet);
|
|
2736
2736
|
}
|
|
2737
|
-
let r = [...
|
|
2737
|
+
let r = [...Ee.values(), ...De], i = /* @__PURE__ */ new Set(), a = 0;
|
|
2738
2738
|
for (let e = 0; e < r.length; e++) {
|
|
2739
|
-
let o =
|
|
2739
|
+
let o = Ye(r[e]);
|
|
2740
2740
|
o ? (n || (n = [], t.conditionals = n), n.push(o)) : (i.add(r[e].type ?? "unknown"), a++);
|
|
2741
2741
|
}
|
|
2742
2742
|
if (a > 0) {
|
|
2743
2743
|
let e = [...i].map((e) => `'${e}'`).join(", ");
|
|
2744
|
-
|
|
2744
|
+
o?.(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.`);
|
|
2745
2745
|
}
|
|
2746
2746
|
if (n) {
|
|
2747
2747
|
n.length > 1 && n.sort((e, t) => (e.priority ?? 1 / 0) - (t.priority ?? 1 / 0));
|
|
2748
2748
|
for (let e = 0; e < n.length; e++) delete n[e].priority;
|
|
2749
2749
|
}
|
|
2750
2750
|
}
|
|
2751
|
-
}),
|
|
2751
|
+
}), u.registerVisitor({
|
|
2752
2752
|
from: "customProperties",
|
|
2753
2753
|
to: "customProperties",
|
|
2754
2754
|
openTag: (e) => {
|
|
@@ -2758,7 +2758,7 @@ var ir = {
|
|
|
2758
2758
|
let t = e.getSource();
|
|
2759
2759
|
t.length > 0 && (e.getParent().customProperties = t);
|
|
2760
2760
|
}
|
|
2761
|
-
}),
|
|
2761
|
+
}), u.registerVisitor({
|
|
2762
2762
|
from: "customPr",
|
|
2763
2763
|
to: {},
|
|
2764
2764
|
openTag: (e) => {
|
|
@@ -2769,26 +2769,26 @@ var ir = {
|
|
|
2769
2769
|
let i = t(r, "resource"), a = e.getSource();
|
|
2770
2770
|
a.resId = i, n.push(a);
|
|
2771
2771
|
}
|
|
2772
|
-
}),
|
|
2772
|
+
}), u.registerVisitor({
|
|
2773
2773
|
from: "sheetProtection",
|
|
2774
2774
|
to: "protection",
|
|
2775
2775
|
openTag: (e) => {
|
|
2776
2776
|
let t = e.getSource();
|
|
2777
|
-
for (let n of
|
|
2777
|
+
for (let n of T) {
|
|
2778
2778
|
let r = e.hasAttribute(n.attribute) ? e.getAttribute(n.attribute) : null;
|
|
2779
|
-
t[n.key] =
|
|
2779
|
+
t[n.key] = z(n, r);
|
|
2780
2780
|
}
|
|
2781
2781
|
if (t.sheet) return;
|
|
2782
2782
|
let n = {};
|
|
2783
2783
|
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);
|
|
2784
2784
|
}
|
|
2785
|
-
}),
|
|
2785
|
+
}), u.registerVisitor({
|
|
2786
2786
|
from: "protectedRanges",
|
|
2787
2787
|
to: "protectedRanges",
|
|
2788
2788
|
openTag: (e) => {
|
|
2789
2789
|
e.setSource([]);
|
|
2790
2790
|
}
|
|
2791
|
-
}),
|
|
2791
|
+
}), u.registerVisitor({
|
|
2792
2792
|
from: "protectedRange",
|
|
2793
2793
|
to: [],
|
|
2794
2794
|
openTag: (e) => {
|
|
@@ -2806,7 +2806,7 @@ var ir = {
|
|
|
2806
2806
|
let t = e.getSource();
|
|
2807
2807
|
t?.r && t.v.name || e.setSource(void 0);
|
|
2808
2808
|
}
|
|
2809
|
-
}),
|
|
2809
|
+
}), u.registerVisitor({
|
|
2810
2810
|
from: "sheetFormatPr",
|
|
2811
2811
|
to: "sheetFormatPr",
|
|
2812
2812
|
openTag: (t) => {
|
|
@@ -2814,53 +2814,53 @@ var ir = {
|
|
|
2814
2814
|
let n = t.getAttribute("customHeight");
|
|
2815
2815
|
n !== "1" && n !== "true" || t.copyToObject(e, "defaultRowSize", Pn, "defaultRowHeight");
|
|
2816
2816
|
let r = t.getAttribute("baseColWidth", Q);
|
|
2817
|
-
r && r !== 8 && (e.baseColSize = r),
|
|
2817
|
+
r && r !== 8 && (e.baseColSize = r), f = !!t.getAttribute("zeroHeight", Z);
|
|
2818
2818
|
}
|
|
2819
|
-
}),
|
|
2819
|
+
}), u.registerVisitor({
|
|
2820
2820
|
from: "cols",
|
|
2821
2821
|
to: "cols",
|
|
2822
2822
|
openTag: (e) => {
|
|
2823
2823
|
e.setSource([]);
|
|
2824
2824
|
}
|
|
2825
|
-
}),
|
|
2825
|
+
}), u.registerVisitor({
|
|
2826
2826
|
from: "col",
|
|
2827
2827
|
to: [],
|
|
2828
2828
|
openTag: (e) => {
|
|
2829
2829
|
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;
|
|
2830
|
-
t.r =
|
|
2830
|
+
t.r = H.runToString(i, a, !0);
|
|
2831
2831
|
let o = {};
|
|
2832
2832
|
t.v = o, e.copyToObject(o, "sz", Pn, "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");
|
|
2833
2833
|
}
|
|
2834
|
-
}),
|
|
2834
|
+
}), u.registerVisitor({
|
|
2835
2835
|
from: "oleObjects",
|
|
2836
2836
|
to: null,
|
|
2837
2837
|
openTag: (e) => {
|
|
2838
2838
|
e.warn("'OLE Objects' are not supported.");
|
|
2839
2839
|
}
|
|
2840
2840
|
});
|
|
2841
|
-
let
|
|
2841
|
+
let Xe = !1, Ze = !1, Qe = 0, $e = "", et = "", U = (e) => {
|
|
2842
2842
|
let t = e.indexOf(":");
|
|
2843
2843
|
return t === -1 ? e : e.slice(t + 1);
|
|
2844
|
-
},
|
|
2845
|
-
return vr(
|
|
2844
|
+
}, rt = new nr();
|
|
2845
|
+
return vr(g, e, u.createEventHandler(e, a, o), o, s, {
|
|
2846
2846
|
onOpenTag: (e) => {
|
|
2847
|
-
|
|
2848
|
-
let t =
|
|
2849
|
-
t === "t" || t === "v" ?
|
|
2847
|
+
Xe = !0;
|
|
2848
|
+
let t = U(e.name);
|
|
2849
|
+
t === "t" || t === "v" ? Qe === 0 && (Ze = !0) : t === "rPh" || t === "phoneticPr" ? Qe++ : Qe === 0 && rt.onOpenTag(t, e.attributes);
|
|
2850
2850
|
},
|
|
2851
2851
|
onText: (e) => {
|
|
2852
|
-
|
|
2852
|
+
Ze && ($e += e, rt.onText(e));
|
|
2853
2853
|
},
|
|
2854
2854
|
onCloseTag: (e) => {
|
|
2855
|
-
let t =
|
|
2856
|
-
t === "t" || t === "v" ?
|
|
2855
|
+
let t = U(e.name);
|
|
2856
|
+
t === "t" || t === "v" ? Ze = !1 : t === "rPh" || t === "phoneticPr" ? Qe > 0 && Qe-- : rt.onCloseTag(t);
|
|
2857
2857
|
},
|
|
2858
2858
|
onEnd: () => {
|
|
2859
|
-
if (!
|
|
2860
|
-
let e =
|
|
2861
|
-
|
|
2862
|
-
let t =
|
|
2863
|
-
return
|
|
2859
|
+
if (!Xe) return;
|
|
2860
|
+
let e = rt.take();
|
|
2861
|
+
Xe = !1, Ze = !1, Qe = 0;
|
|
2862
|
+
let t = ie($e);
|
|
2863
|
+
return $e = "", et = t, e ? {
|
|
2864
2864
|
t: "r",
|
|
2865
2865
|
v: {
|
|
2866
2866
|
type: "richText",
|
|
@@ -2869,7 +2869,7 @@ var ir = {
|
|
|
2869
2869
|
} : r(t);
|
|
2870
2870
|
},
|
|
2871
2871
|
onError: (e) => {}
|
|
2872
|
-
}, l, r, () =>
|
|
2872
|
+
}, l, r, () => f, () => et);
|
|
2873
2873
|
}, pr = class {
|
|
2874
2874
|
static {
|
|
2875
2875
|
this.Collapsed = 1;
|
|
@@ -2909,49 +2909,49 @@ var ir = {
|
|
|
2909
2909
|
rowStart: 0,
|
|
2910
2910
|
rowEnd: 0
|
|
2911
2911
|
}, _r = (e) => e === "1" || e === "true", vr = (e, t, n, r, i, a, o, s, c, l) => {
|
|
2912
|
-
let u = !1, d = [], f = o?.get(ur),
|
|
2912
|
+
let u = !1, d = [], f = o?.get(ur), p = o?.get(dr), m = /* @__PURE__ */ new Map(), h = !1, g = [], _ = !1, v = null, y = null, te = null, b = null, ne = null, ie = null, ae = o?.get("richData") ?? Ye.EmptyArray, oe = null, se = !1, ce = H.normalizeA1ToR1C1, x = Xe.createConflatingRanges(), le = /* @__PURE__ */ new Map(), ue = [], de = [], fe = !1, S = !1, C = null, pe = (e) => {
|
|
2913
2913
|
let t = o?.get("metadata")?.values;
|
|
2914
2914
|
if (!t) return;
|
|
2915
2915
|
let n = parseInt(e, 10);
|
|
2916
2916
|
if (!Number.isFinite(n) || n < 1) return;
|
|
2917
2917
|
let r = t[n - 1]?.get("XLRICHVALUE");
|
|
2918
|
-
return r?.richValueIndex === void 0 ? void 0 :
|
|
2919
|
-
},
|
|
2918
|
+
return r?.richValueIndex === void 0 ? void 0 : ae[r.richValueIndex];
|
|
2919
|
+
}, me = !1, he = Xe.createConflatingRanges(), w, T = !1, E = -1, D = -1, O = null, ge = null, k = (e) => ({
|
|
2920
2920
|
t: "r",
|
|
2921
2921
|
v: {
|
|
2922
2922
|
type: "hyperlink",
|
|
2923
2923
|
data: {
|
|
2924
|
-
address:
|
|
2924
|
+
address: w,
|
|
2925
2925
|
friendly: e
|
|
2926
2926
|
}
|
|
2927
2927
|
}
|
|
2928
|
-
}), _e = null,
|
|
2928
|
+
}), _e = null, ve = [], ye = null, A = -2, j = 0, be = "", M = "", N = "", P = "", xe = "", F = "", Se = "", Ce = "", we = "", Te = "", Ee = "", De = "", Oe = "", I = "", ke = !0, Ae = null, je = !1, Me = !1, Ne = !1, Pe = null, Fe = 0, Ie = (e) => {
|
|
2929
2929
|
let r = e.name, s = r.indexOf(":");
|
|
2930
|
-
if (s !== -1 && (r = r.slice(s + 1)),
|
|
2930
|
+
if (s !== -1 && (r = r.slice(s + 1)), Fe++, Fe % 196608 == 0 && i?.(Fe), ge) {
|
|
2931
2931
|
let t = e.attributes;
|
|
2932
2932
|
switch (r) {
|
|
2933
2933
|
case "v":
|
|
2934
|
-
|
|
2934
|
+
h = !0;
|
|
2935
2935
|
break;
|
|
2936
2936
|
case "f":
|
|
2937
|
-
switch (
|
|
2937
|
+
switch (_ = !0, t.t ?? null) {
|
|
2938
2938
|
case null:
|
|
2939
2939
|
case "normal": break;
|
|
2940
2940
|
case "shared":
|
|
2941
2941
|
let e = t.si;
|
|
2942
|
-
|
|
2942
|
+
y = t.ref, v = e;
|
|
2943
2943
|
break;
|
|
2944
2944
|
case "array":
|
|
2945
|
-
|
|
2945
|
+
y = t.ref, C = y;
|
|
2946
2946
|
break;
|
|
2947
2947
|
case "dataTable": {
|
|
2948
2948
|
let e = ((e, t, n) => {
|
|
2949
2949
|
let r = e.r1, i = _r(e.del1);
|
|
2950
2950
|
if (!r && !i) return null;
|
|
2951
|
-
let a = e.ref ??
|
|
2951
|
+
let a = e.ref ?? H.cellToString({
|
|
2952
2952
|
rowIndex: t,
|
|
2953
2953
|
colIndex: n
|
|
2954
|
-
}), o =
|
|
2954
|
+
}), o = H.fastStringToRange(a);
|
|
2955
2955
|
if (!o) return null;
|
|
2956
2956
|
let s = { ref: {
|
|
2957
2957
|
rowStart: o.rowStart,
|
|
@@ -2965,35 +2965,35 @@ var ir = {
|
|
|
2965
2965
|
}
|
|
2966
2966
|
return s;
|
|
2967
2967
|
})(t, E, D);
|
|
2968
|
-
e && (
|
|
2968
|
+
e && (de.push(e), _r(t.ca) && he.append(E, D));
|
|
2969
2969
|
return;
|
|
2970
2970
|
}
|
|
2971
2971
|
}
|
|
2972
2972
|
let e = t.ca;
|
|
2973
|
-
e !== void 0 && (
|
|
2973
|
+
e !== void 0 && (me = e === "1");
|
|
2974
2974
|
break;
|
|
2975
2975
|
case "is":
|
|
2976
2976
|
T = !0;
|
|
2977
2977
|
return;
|
|
2978
2978
|
}
|
|
2979
|
-
T && !
|
|
2979
|
+
T && !_ && a?.onOpenTag?.(e);
|
|
2980
2980
|
} else if (u) {
|
|
2981
2981
|
if (r === "c") {
|
|
2982
|
-
|
|
2982
|
+
ge = e, w = void 0;
|
|
2983
2983
|
let t = e.attributes, n = t.r;
|
|
2984
|
-
D = n === void 0 ? D + 1 :
|
|
2984
|
+
D = n === void 0 ? D + 1 : H.fastStringToCol(n);
|
|
2985
2985
|
let r = t.t;
|
|
2986
2986
|
r === void 0 ? _e = null : (_e = r, _e === "str" && (T = !0));
|
|
2987
2987
|
let i = t.s;
|
|
2988
|
-
i === void 0 && (
|
|
2988
|
+
i === void 0 && (Pe !== null || Ne) && (i = "0"), i !== void 0 && (i = parseInt(i), Ae && Ae.value === i && Ae.colEnd + 1 === D ? Ae.colEnd = D : (Ae = {
|
|
2989
2989
|
colStart: D,
|
|
2990
2990
|
rowStart: E,
|
|
2991
2991
|
colEnd: D,
|
|
2992
2992
|
rowEnd: E,
|
|
2993
2993
|
value: i
|
|
2994
|
-
},
|
|
2994
|
+
}, g.push(Ae))), C = null, S = !1, se = !1;
|
|
2995
2995
|
let a = t.cm;
|
|
2996
|
-
|
|
2996
|
+
fe = a !== void 0 && ((e) => {
|
|
2997
2997
|
let t = o?.get("metadata")?.cells;
|
|
2998
2998
|
if (!t) return !1;
|
|
2999
2999
|
let n = parseInt(e, 10);
|
|
@@ -3001,18 +3001,18 @@ var ir = {
|
|
|
3001
3001
|
})(a);
|
|
3002
3002
|
let s = t.vm;
|
|
3003
3003
|
if (s !== void 0) {
|
|
3004
|
-
let e =
|
|
3005
|
-
if (
|
|
3004
|
+
let e = pe(s);
|
|
3005
|
+
if (Ze.isError(e)) {
|
|
3006
3006
|
let t = e.getCode();
|
|
3007
3007
|
O = {
|
|
3008
3008
|
t: "e",
|
|
3009
3009
|
v: t
|
|
3010
|
-
},
|
|
3010
|
+
}, fe && t === Ze.Code.Spill && (S = !0);
|
|
3011
3011
|
}
|
|
3012
3012
|
}
|
|
3013
3013
|
}
|
|
3014
3014
|
} else {
|
|
3015
|
-
if (
|
|
3015
|
+
if (Me && r === "row") {
|
|
3016
3016
|
u = !0;
|
|
3017
3017
|
let t = e.attributes.r;
|
|
3018
3018
|
if (E = t === void 0 ? E + 1 : parseInt(t) - 1, D = -1, c?.()) {
|
|
@@ -3022,36 +3022,36 @@ var ir = {
|
|
|
3022
3022
|
max: E
|
|
3023
3023
|
});
|
|
3024
3024
|
}
|
|
3025
|
-
if (j = 0,
|
|
3026
|
-
if (
|
|
3027
|
-
let e =
|
|
3028
|
-
|
|
3025
|
+
if (j = 0, M = e.attributes.customHeight, M !== void 0 && (j |= pr.CustomHeight), M !== we && (ke = !0, we = M), be = e.attributes.ht, be !== void 0 && (j |= pr.Ht), be !== Ce && (ke = !0, Ce = be), N = e.attributes.hidden, N !== void 0 && (j |= pr.Hidden), N !== Te && (ke = !0, Te = N), xe = e.attributes.s, xe !== void 0 && (j |= pr.S), xe !== De && (ke = !0, De = xe), P = e.attributes.customFormat, P !== void 0 && (j |= pr.CustomFormat), P !== Ee && (ke = !0, Ee = P), F = e.attributes.outlineLevel, F !== void 0 && (j |= pr.OutlineLevel), F !== Oe && (ke = !0, Oe = F), Se = e.attributes.collapsed, Se !== void 0 && (j |= pr.Collapsed), Se !== I && (ke = !0, I = Se), j !== 0) {
|
|
3026
|
+
if (A + 1 !== E || ke) {
|
|
3027
|
+
let e = M !== void 0 && (M === "1" || M === "true"), t = P !== void 0 && (P === "1" || P === "true");
|
|
3028
|
+
Pe = t && xe !== void 0 ? xe : null, t && Pe === null && (Pe = "0"), ye = {
|
|
3029
3029
|
min: E,
|
|
3030
3030
|
max: E,
|
|
3031
3031
|
value: {
|
|
3032
|
-
sz:
|
|
3032
|
+
sz: be === void 0 ? -1 : parseFloat(be),
|
|
3033
3033
|
csz: e,
|
|
3034
3034
|
h: N !== void 0 && (N === "1" || N === "true"),
|
|
3035
|
-
s:
|
|
3036
|
-
l:
|
|
3037
|
-
cl:
|
|
3035
|
+
s: Pe === null ? void 0 : Pe === "0" ? 0 : parseInt(Pe),
|
|
3036
|
+
l: F === void 0 || F === "0" ? 0 : parseInt(F),
|
|
3037
|
+
cl: Se !== void 0 && (Se === "1" || Se === "true")
|
|
3038
3038
|
}
|
|
3039
|
-
},
|
|
3040
|
-
} else
|
|
3039
|
+
}, ve.push(ye);
|
|
3040
|
+
} else ye.max = E;
|
|
3041
3041
|
}
|
|
3042
|
-
|
|
3042
|
+
A = E, ke = !1;
|
|
3043
3043
|
return;
|
|
3044
3044
|
}
|
|
3045
|
-
if (r === "sheetData" && (
|
|
3046
|
-
|
|
3045
|
+
if (r === "sheetData" && (Me = !0), !je && r === "sheetData") {
|
|
3046
|
+
je = !0;
|
|
3047
3047
|
let e = t.cols, n = e ? e.length : 0;
|
|
3048
|
-
for (let t = 0; !
|
|
3048
|
+
for (let t = 0; !Ne && t < n; t++) e[t].v.s && (Ne = !0);
|
|
3049
3049
|
}
|
|
3050
3050
|
n?.onOpenTag?.(e);
|
|
3051
3051
|
}
|
|
3052
|
-
},
|
|
3052
|
+
}, Le = (t) => {
|
|
3053
3053
|
let r = t.name;
|
|
3054
|
-
if (r === "sheetData" && (
|
|
3054
|
+
if (r === "sheetData" && (Me = !1), !_ || r !== "c" && r !== "f" || (v && (b = le.get(v) ?? null), b && (w = ((e) => {
|
|
3055
3055
|
if (e.length < 11 || (32 | e.charCodeAt(0)) != 104 || !/^HYPERLINK\(/i.test(e)) return;
|
|
3056
3056
|
let t = 1, n = !1, r = 10;
|
|
3057
3057
|
for (; r < e.length && t > 0; r++) {
|
|
@@ -3061,35 +3061,35 @@ var ir = {
|
|
|
3061
3061
|
if (t !== 0 || e.slice(r).trim().length > 0) return;
|
|
3062
3062
|
let i = /^HYPERLINK\(\s*"((?:[^"]|"")*)"\s*[,)]/i.exec(e);
|
|
3063
3063
|
return i ? i[1].replace(/""/g, "\"") : null;
|
|
3064
|
-
})(
|
|
3064
|
+
})(b[2]), x.append(E, D, b), me && he.append(E, D)), C !== null && ue.push([C, fe ? S ? "error" : "dynamic" : "fixed"]), _ = !1, b = null, v = null, y = null, h = !1, me = !1, C = null, fe = !1, S = !1), ge) {
|
|
3065
3065
|
let n = r.indexOf(":");
|
|
3066
3066
|
if (n !== -1 && (r = r.slice(n + 1)), T) {
|
|
3067
3067
|
if (r === "is" || r === "v") {
|
|
3068
3068
|
let t = a?.onEnd?.();
|
|
3069
|
-
t == null ||
|
|
3069
|
+
t == null || se && l?.() === "" || e.pushAt(E, D, w !== void 0 && typeof t == "number" ? k(l?.() ?? "") : typeof t == "number" ? "" + t : t);
|
|
3070
3070
|
} else r !== "f" && a?.onCloseTag?.(t);
|
|
3071
3071
|
}
|
|
3072
|
-
|
|
3072
|
+
h &&= !1, r === "c" && (ge = null, T = !1);
|
|
3073
3073
|
} else {
|
|
3074
|
-
if (u) return u = !1, void (
|
|
3074
|
+
if (u) return u = !1, void (Ae = null);
|
|
3075
3075
|
n?.onCloseTag?.(t);
|
|
3076
3076
|
}
|
|
3077
|
-
},
|
|
3077
|
+
}, Re = (t) => {
|
|
3078
3078
|
let i = t.trim();
|
|
3079
|
-
if (
|
|
3079
|
+
if (h) {
|
|
3080
3080
|
switch (O = null, _e) {
|
|
3081
3081
|
case null:
|
|
3082
3082
|
case "n":
|
|
3083
|
-
O =
|
|
3083
|
+
O = dt.flushSubnormal(parseFloat(i));
|
|
3084
3084
|
break;
|
|
3085
3085
|
case "b":
|
|
3086
3086
|
O = i === "1" || i === "true";
|
|
3087
3087
|
break;
|
|
3088
3088
|
case "s": {
|
|
3089
|
-
let e = parseInt(i, 10), t =
|
|
3089
|
+
let e = parseInt(i, 10), t = m.get(e);
|
|
3090
3090
|
if (t === void 0) {
|
|
3091
3091
|
let n = f?.get(e);
|
|
3092
|
-
t = n ? rr(n,
|
|
3092
|
+
t = n ? rr(n, p) : null, m.set(e, t);
|
|
3093
3093
|
}
|
|
3094
3094
|
O = t ? {
|
|
3095
3095
|
t: "r",
|
|
@@ -3121,7 +3121,7 @@ var ir = {
|
|
|
3121
3121
|
}
|
|
3122
3122
|
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;
|
|
3123
3123
|
})(i, !0 === o?.get(lr));
|
|
3124
|
-
e === null ? s && (r?.(`Date '${i}' in cell ${
|
|
3124
|
+
e === null ? s && (r?.(`Date '${i}' in cell ${H.cellToString({
|
|
3125
3125
|
colIndex: D,
|
|
3126
3126
|
rowIndex: E
|
|
3127
3127
|
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"), O = "" + s(i)) : O = e;
|
|
@@ -3129,17 +3129,17 @@ var ir = {
|
|
|
3129
3129
|
}
|
|
3130
3130
|
case "e":
|
|
3131
3131
|
if (i === "#VALUE!") {
|
|
3132
|
-
let e =
|
|
3132
|
+
let e = ge.attributes.vm;
|
|
3133
3133
|
if (e !== void 0) {
|
|
3134
|
-
let t =
|
|
3135
|
-
if (
|
|
3134
|
+
let t = pe(e);
|
|
3135
|
+
if (Ze.isError(t)) {
|
|
3136
3136
|
O = {
|
|
3137
3137
|
t: "e",
|
|
3138
3138
|
v: t.getCode()
|
|
3139
3139
|
};
|
|
3140
3140
|
break;
|
|
3141
3141
|
}
|
|
3142
|
-
if (
|
|
3142
|
+
if (ut.isJSON(t)) {
|
|
3143
3143
|
O = {
|
|
3144
3144
|
t: "r",
|
|
3145
3145
|
v: t
|
|
@@ -3148,11 +3148,11 @@ var ir = {
|
|
|
3148
3148
|
}
|
|
3149
3149
|
}
|
|
3150
3150
|
}
|
|
3151
|
-
let e =
|
|
3151
|
+
let e = Ze.getBuiltInByLabel(i);
|
|
3152
3152
|
e ? O = {
|
|
3153
3153
|
t: "e",
|
|
3154
3154
|
v: e.getCode()
|
|
3155
|
-
} : (O = i, r?.(`Unknown formula error '${i}' in cell ${
|
|
3155
|
+
} : (O = i, r?.(`Unknown formula error '${i}' in cell ${H.cellToString({
|
|
3156
3156
|
colIndex: D,
|
|
3157
3157
|
rowIndex: E
|
|
3158
3158
|
})}`));
|
|
@@ -3160,25 +3160,25 @@ var ir = {
|
|
|
3160
3160
|
case "str":
|
|
3161
3161
|
case "inlineStr": T = !0;
|
|
3162
3162
|
}
|
|
3163
|
-
O !== null && e.pushAt(E, D,
|
|
3163
|
+
O !== null && e.pushAt(E, D, w === void 0 || typeof O != "number" && typeof O != "boolean" ? O : k(O));
|
|
3164
3164
|
}
|
|
3165
|
-
let c =
|
|
3166
|
-
if (
|
|
3167
|
-
if (
|
|
3165
|
+
let c = v !== null;
|
|
3166
|
+
if (v) {
|
|
3167
|
+
if (ne === v) b = ie;
|
|
3168
3168
|
else {
|
|
3169
|
-
if (
|
|
3169
|
+
if (b = le.get(v) ?? null, !b) {
|
|
3170
3170
|
let e = [];
|
|
3171
|
-
|
|
3172
|
-
|
|
3171
|
+
te = ce(i, E, D, e), b = [
|
|
3172
|
+
te,
|
|
3173
3173
|
e,
|
|
3174
3174
|
i
|
|
3175
|
-
],
|
|
3175
|
+
], le.set(v, b);
|
|
3176
3176
|
}
|
|
3177
|
-
|
|
3177
|
+
ne = v, ie = b;
|
|
3178
3178
|
}
|
|
3179
|
-
|
|
3179
|
+
v = null;
|
|
3180
3180
|
}
|
|
3181
|
-
if (
|
|
3181
|
+
if (_) {
|
|
3182
3182
|
let e = i, t = c ? void 0 : o?.get(cr);
|
|
3183
3183
|
if (t) {
|
|
3184
3184
|
let n = ((e) => {
|
|
@@ -3191,28 +3191,28 @@ var ir = {
|
|
|
3191
3191
|
formula: n
|
|
3192
3192
|
};
|
|
3193
3193
|
})(i);
|
|
3194
|
-
n.kind !== "none" && (
|
|
3194
|
+
n.kind !== "none" && (oe ??= new Gn(t), n.kind === "spilled" ? se = oe.placeholder(E, D) : oe.anchor(E, D, n.formula) && (e = n.formula, me ||= ((e) => Wn(e).some((e) => re(e) || !0 === $e.get(e)?.getDeclaration().getReturnType()?.isVolatile()))(e)));
|
|
3195
3195
|
}
|
|
3196
|
-
if (
|
|
3196
|
+
if (se) me = !1;
|
|
3197
3197
|
else {
|
|
3198
3198
|
let t = [];
|
|
3199
|
-
|
|
3200
|
-
|
|
3199
|
+
te = ce(e, E, D, t), b = [
|
|
3200
|
+
te,
|
|
3201
3201
|
t,
|
|
3202
3202
|
e
|
|
3203
3203
|
];
|
|
3204
3204
|
}
|
|
3205
3205
|
}
|
|
3206
3206
|
T ? a?.onText?.(t) : u || n?.onText?.(i);
|
|
3207
|
-
},
|
|
3207
|
+
}, L = {
|
|
3208
3208
|
r: void 0,
|
|
3209
3209
|
t: void 0,
|
|
3210
3210
|
s: void 0,
|
|
3211
3211
|
cm: void 0,
|
|
3212
3212
|
vm: void 0
|
|
3213
|
-
},
|
|
3213
|
+
}, R = {
|
|
3214
3214
|
name: "c",
|
|
3215
|
-
attributes:
|
|
3215
|
+
attributes: L,
|
|
3216
3216
|
isSelfClosing: !1
|
|
3217
3217
|
}, z = {
|
|
3218
3218
|
t: void 0,
|
|
@@ -3223,11 +3223,11 @@ var ir = {
|
|
|
3223
3223
|
name: "f",
|
|
3224
3224
|
attributes: z,
|
|
3225
3225
|
isSelfClosing: !1
|
|
3226
|
-
},
|
|
3226
|
+
}, Ve = {
|
|
3227
3227
|
name: "v",
|
|
3228
3228
|
attributes: {},
|
|
3229
3229
|
isSelfClosing: !1
|
|
3230
|
-
},
|
|
3230
|
+
}, B = {
|
|
3231
3231
|
r: void 0,
|
|
3232
3232
|
s: void 0,
|
|
3233
3233
|
ht: void 0,
|
|
@@ -3236,56 +3236,56 @@ var ir = {
|
|
|
3236
3236
|
customHeight: void 0,
|
|
3237
3237
|
customFormat: void 0,
|
|
3238
3238
|
outlineLevel: void 0
|
|
3239
|
-
},
|
|
3239
|
+
}, He = {
|
|
3240
3240
|
name: "row",
|
|
3241
|
-
attributes:
|
|
3241
|
+
attributes: B,
|
|
3242
3242
|
isSelfClosing: !1
|
|
3243
|
-
},
|
|
3243
|
+
}, Ue = Nn.NEED_MORE, V = Nn.NOT_HANDLED, We = Nn.decodeText, Ge = !1, Ke = (e, t, n, r) => {
|
|
3244
3244
|
for (;;) {
|
|
3245
3245
|
let i = 0;
|
|
3246
3246
|
for (; t < n && ((i = e.charCodeAt(t)) === 32 || i === 9 || i === 10 || i === 13);) t++;
|
|
3247
|
-
if (t >= n) return
|
|
3248
|
-
if (i === 62) return
|
|
3249
|
-
if (i === 47) return t + 1 >= n ?
|
|
3247
|
+
if (t >= n) return Ue;
|
|
3248
|
+
if (i === 62) return Ge = !1, t + 1;
|
|
3249
|
+
if (i === 47) return t + 1 >= n ? Ue : e.charCodeAt(t + 1) === 62 ? (Ge = !0, t + 2) : V;
|
|
3250
3250
|
let a = t;
|
|
3251
3251
|
for (; t < n && (i = e.charCodeAt(t)) !== 61;) {
|
|
3252
|
-
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return
|
|
3252
|
+
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return V;
|
|
3253
3253
|
t++;
|
|
3254
3254
|
}
|
|
3255
|
-
if (t + 1 >= n) return
|
|
3255
|
+
if (t + 1 >= n) return Ue;
|
|
3256
3256
|
let o = t - a, s = e.charCodeAt(t + 1);
|
|
3257
|
-
if (s !== 34 && s !== 39) return
|
|
3257
|
+
if (s !== 34 && s !== 39) return V;
|
|
3258
3258
|
let c = t + 2, l = c;
|
|
3259
3259
|
for (; l < n && (i = e.charCodeAt(l)) !== s;) {
|
|
3260
|
-
if (i === 38 || i < 32) return
|
|
3260
|
+
if (i === 38 || i < 32) return V;
|
|
3261
3261
|
l++;
|
|
3262
3262
|
}
|
|
3263
|
-
if (l >= n) return
|
|
3263
|
+
if (l >= n) return Ue;
|
|
3264
3264
|
t = l + 1;
|
|
3265
3265
|
let u = e.charCodeAt(a);
|
|
3266
3266
|
if (r === 2) switch (o) {
|
|
3267
3267
|
case 1:
|
|
3268
|
-
u === 114 ?
|
|
3268
|
+
u === 114 ? B.r = e.slice(c, l) : u === 115 && (B.s = e.slice(c, l));
|
|
3269
3269
|
break;
|
|
3270
3270
|
case 2:
|
|
3271
|
-
e.startsWith("ht", a) && (
|
|
3271
|
+
e.startsWith("ht", a) && (B.ht = e.slice(c, l));
|
|
3272
3272
|
break;
|
|
3273
3273
|
case 6:
|
|
3274
|
-
e.startsWith("hidden", a) && (
|
|
3274
|
+
e.startsWith("hidden", a) && (B.hidden = e.slice(c, l));
|
|
3275
3275
|
break;
|
|
3276
3276
|
case 9:
|
|
3277
|
-
e.startsWith("collapsed", a) && (
|
|
3277
|
+
e.startsWith("collapsed", a) && (B.collapsed = e.slice(c, l));
|
|
3278
3278
|
break;
|
|
3279
|
-
case 12: e.startsWith("customHeight", a) ?
|
|
3279
|
+
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));
|
|
3280
3280
|
}
|
|
3281
|
-
else if (r === 0) o === 1 ? u === 114 ?
|
|
3281
|
+
else if (r === 0) o === 1 ? u === 114 ? L.r = e.slice(c, l) : u === 116 ? L.t = e.slice(c, l) : u === 115 && (L.s = e.slice(c, l)) : o === 2 && e.charCodeAt(a + 1) === 109 && (u === 99 ? L.cm = e.slice(c, l) : u === 118 && (L.vm = e.slice(c, l)));
|
|
3282
3282
|
else if (o === 1) u === 116 && (z.t = e.slice(c, l));
|
|
3283
3283
|
else if (o === 2) {
|
|
3284
3284
|
let t = e.charCodeAt(a + 1);
|
|
3285
3285
|
u === 115 && t === 105 ? z.si = e.slice(c, l) : u === 99 && t === 97 && (z.ca = e.slice(c, l));
|
|
3286
3286
|
} else o === 3 && e.startsWith("ref", a) && (z.ref = e.slice(c, l));
|
|
3287
3287
|
}
|
|
3288
|
-
},
|
|
3288
|
+
}, qe = (e, t, n) => e.charCodeAt(t + 1) === 47 && e.charCodeAt(t + 2) === n && e.charCodeAt(t + 3) === 62;
|
|
3289
3289
|
return {
|
|
3290
3290
|
...n,
|
|
3291
3291
|
onEnd: () => {
|
|
@@ -3303,10 +3303,10 @@ var ir = {
|
|
|
3303
3303
|
}
|
|
3304
3304
|
});
|
|
3305
3305
|
for (let r of d) r.min > e && t.push(n(e, r.min - 1)), e = Math.max(e, r.max + 1);
|
|
3306
|
-
e <=
|
|
3306
|
+
e <= ze && t.push(n(e, ze)), t.length > 0 && (ve.push(...t), ve.sort((e, t) => e.min - t.min));
|
|
3307
3307
|
}
|
|
3308
|
-
|
|
3309
|
-
let r =
|
|
3308
|
+
ve.length > 0 && (t.rows = H.runsToRefs(ve, !1));
|
|
3309
|
+
let r = x.done(mr);
|
|
3310
3310
|
r = ((e, t) => {
|
|
3311
3311
|
let n = null;
|
|
3312
3312
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -3330,50 +3330,50 @@ var ir = {
|
|
|
3330
3330
|
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);
|
|
3331
3331
|
}
|
|
3332
3332
|
if (a !== (i.rowEnd - i.rowStart + 1) * (i.colEnd - i.colStart + 1)) continue;
|
|
3333
|
-
let o = Xn(
|
|
3333
|
+
let o = Xn(H.resolveRelativeToA1(n.value[1], i.rowStart, i.colStart), i);
|
|
3334
3334
|
if (o) {
|
|
3335
3335
|
t.push(o);
|
|
3336
3336
|
for (let t = 0; t < e.length; t++) r.add(e[t]);
|
|
3337
3337
|
}
|
|
3338
3338
|
}
|
|
3339
3339
|
return r.size === 0 ? e : e.filter((e) => !r.has(e));
|
|
3340
|
-
})(r,
|
|
3340
|
+
})(r, de);
|
|
3341
3341
|
let i = r.length;
|
|
3342
|
-
if (i > 0 ||
|
|
3342
|
+
if (i > 0 || de.length > 0) {
|
|
3343
3343
|
let e = Array(i);
|
|
3344
3344
|
for (let t = 0; t < i; t++) {
|
|
3345
|
-
let n = r[t], i =
|
|
3345
|
+
let n = r[t], i = H.rangeToString(n), a = n.value[1], o = H.resolveRelativeToA1(a, n.rowStart, n.colStart);
|
|
3346
3346
|
e[t] = [i, o];
|
|
3347
3347
|
}
|
|
3348
|
-
for (let t = 0; t <
|
|
3349
|
-
let n =
|
|
3350
|
-
e.push([
|
|
3348
|
+
for (let t = 0; t < de.length; t++) {
|
|
3349
|
+
let n = de[t], r = n.ref;
|
|
3350
|
+
e.push([H.cellToString({
|
|
3351
3351
|
rowIndex: r.rowStart,
|
|
3352
3352
|
colIndex: r.colStart
|
|
3353
|
-
}),
|
|
3353
|
+
}), ee(n)]), ue.push([H.rangeToString(r), "dynamic"]);
|
|
3354
3354
|
}
|
|
3355
3355
|
t.formulas = e;
|
|
3356
3356
|
}
|
|
3357
|
-
let a =
|
|
3357
|
+
let a = he.done(!0), o = a.length;
|
|
3358
3358
|
if (o > 0) {
|
|
3359
3359
|
let e = Array(o);
|
|
3360
3360
|
for (let t = 0; t < o; t++) {
|
|
3361
|
-
let n = a[t], r =
|
|
3361
|
+
let n = a[t], r = H.rangeToString(n);
|
|
3362
3362
|
e[t] = r;
|
|
3363
3363
|
}
|
|
3364
3364
|
t.volatile = e;
|
|
3365
3365
|
}
|
|
3366
|
-
|
|
3367
|
-
let s =
|
|
3366
|
+
oe && ue.push(...oe.getFormulaArray()), ue.length > 0 && (t.formulaArray = [...ue]);
|
|
3367
|
+
let s = g.length;
|
|
3368
3368
|
if (s > 0) {
|
|
3369
|
-
|
|
3370
|
-
let e =
|
|
3369
|
+
g.sort(Xe.createRangeComparator(it.Axis.Column));
|
|
3370
|
+
let e = g[0], n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value, o = [];
|
|
3371
3371
|
o.push(e);
|
|
3372
3372
|
let c = null;
|
|
3373
|
-
for (let t = 1; t < s; t++) c =
|
|
3373
|
+
for (let t = 1; t < s; t++) c = g[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);
|
|
3374
3374
|
let l = o.length, u = Array(l);
|
|
3375
3375
|
for (let e = 0; e < l; e++) {
|
|
3376
|
-
let t = o[e], n =
|
|
3376
|
+
let t = o[e], n = H.rangeToString(t);
|
|
3377
3377
|
u[e] = [n, t.value];
|
|
3378
3378
|
}
|
|
3379
3379
|
t.directStyles = u;
|
|
@@ -3381,57 +3381,57 @@ var ir = {
|
|
|
3381
3381
|
let l = e.build();
|
|
3382
3382
|
l && (t.data = l.tuples), n?.onEnd?.();
|
|
3383
3383
|
},
|
|
3384
|
-
onOpenTag:
|
|
3385
|
-
onCloseTag:
|
|
3386
|
-
onText:
|
|
3384
|
+
onOpenTag: Ie,
|
|
3385
|
+
onCloseTag: Le,
|
|
3386
|
+
onText: Re,
|
|
3387
3387
|
elementScanners: [{
|
|
3388
3388
|
name: "c",
|
|
3389
3389
|
scan: (e, t, n) => {
|
|
3390
|
-
if (!u ||
|
|
3391
|
-
|
|
3392
|
-
let r =
|
|
3390
|
+
if (!u || ge !== null) return V;
|
|
3391
|
+
L.r = L.t = L.s = L.cm = L.vm = void 0;
|
|
3392
|
+
let r = Ke(e, t + 2, n, 0);
|
|
3393
3393
|
if (r < 0) return r;
|
|
3394
|
-
let i =
|
|
3395
|
-
if (
|
|
3394
|
+
let i = L.t;
|
|
3395
|
+
if (L.r === void 0 || i === "str" || i === "inlineStr") return V;
|
|
3396
3396
|
let a = !1, o = -1, s = -1, c = -1, l = -1, d = r;
|
|
3397
|
-
if (!
|
|
3397
|
+
if (!Ge) for (z.t = z.si = z.ref = z.ca = void 0;;) {
|
|
3398
3398
|
let t = e.indexOf("<", r);
|
|
3399
|
-
if (t === -1 || t + 3 >= n) return
|
|
3399
|
+
if (t === -1 || t + 3 >= n) return Ue;
|
|
3400
3400
|
for (let n = r; n < t; n++) {
|
|
3401
3401
|
let t = e.charCodeAt(n);
|
|
3402
|
-
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return
|
|
3402
|
+
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return V;
|
|
3403
3403
|
}
|
|
3404
3404
|
let i = e.charCodeAt(t + 1), u = e.charCodeAt(t + 2);
|
|
3405
3405
|
if (i === 47) {
|
|
3406
|
-
if (!
|
|
3406
|
+
if (!qe(e, t, 99)) return V;
|
|
3407
3407
|
d = t + 4;
|
|
3408
3408
|
break;
|
|
3409
3409
|
}
|
|
3410
3410
|
if (i === 102 && !a && c === -1 && (u === 32 || u === 62 || u === 47)) {
|
|
3411
|
-
if (a = !0, r =
|
|
3412
|
-
if (z.t === "dataTable") return
|
|
3413
|
-
if (
|
|
3411
|
+
if (a = !0, r = Ke(e, t + 2, n, 1), r < 0) return r;
|
|
3412
|
+
if (z.t === "dataTable") return V;
|
|
3413
|
+
if (Ge) continue;
|
|
3414
3414
|
let i = e.indexOf("<", r);
|
|
3415
|
-
if (i === -1 || i + 3 >= n) return
|
|
3416
|
-
if (!
|
|
3415
|
+
if (i === -1 || i + 3 >= n) return Ue;
|
|
3416
|
+
if (!qe(e, i, 102)) return V;
|
|
3417
3417
|
o = r, s = i, r = i + 4;
|
|
3418
3418
|
} else if (i === 118 && u === 62 && c === -1) {
|
|
3419
3419
|
let i = e.indexOf("<", t + 3);
|
|
3420
|
-
if (i === -1 || i + 3 >= n) return
|
|
3421
|
-
if (!
|
|
3420
|
+
if (i === -1 || i + 3 >= n) return Ue;
|
|
3421
|
+
if (!qe(e, i, 118)) return V;
|
|
3422
3422
|
c = t + 3, l = i, r = i + 4;
|
|
3423
|
-
} else return
|
|
3423
|
+
} else return V;
|
|
3424
3424
|
}
|
|
3425
|
-
return
|
|
3425
|
+
return Ie(R), a && (Ie(Be), s > o && Re(We(e.slice(o, s))), Le(Be)), c !== -1 && (Ie(Ve), l > c && Re(We(e.slice(c, l))), Le(Ve)), Le(R), d;
|
|
3426
3426
|
}
|
|
3427
3427
|
}, {
|
|
3428
3428
|
name: "row",
|
|
3429
|
-
openTag:
|
|
3429
|
+
openTag: He,
|
|
3430
3430
|
scan: (e, t, n) => {
|
|
3431
|
-
if (!
|
|
3432
|
-
|
|
3433
|
-
let r =
|
|
3434
|
-
return r < 0 ? r :
|
|
3431
|
+
if (!Me || u || ge !== null) return V;
|
|
3432
|
+
B.r = B.s = B.ht = B.hidden = B.collapsed = B.customHeight = B.customFormat = B.outlineLevel = void 0;
|
|
3433
|
+
let r = Ke(e, t + 4, n, 2);
|
|
3434
|
+
return r < 0 ? r : Ge || B.r === void 0 ? V : (Ie(He), r);
|
|
3435
3435
|
}
|
|
3436
3436
|
}]
|
|
3437
3437
|
};
|
|
@@ -3514,42 +3514,42 @@ var Tr = {
|
|
|
3514
3514
|
Company: "company",
|
|
3515
3515
|
Manager: "manager"
|
|
3516
3516
|
}, Dr = {
|
|
3517
|
-
lpwstr:
|
|
3518
|
-
lpstr:
|
|
3519
|
-
bstr:
|
|
3520
|
-
i1:
|
|
3521
|
-
i2:
|
|
3522
|
-
i4:
|
|
3523
|
-
i8:
|
|
3524
|
-
int:
|
|
3525
|
-
ui1:
|
|
3526
|
-
ui2:
|
|
3527
|
-
ui4:
|
|
3528
|
-
ui8:
|
|
3529
|
-
uint:
|
|
3530
|
-
r4:
|
|
3531
|
-
r8:
|
|
3532
|
-
decimal:
|
|
3533
|
-
bool:
|
|
3534
|
-
filetime:
|
|
3535
|
-
date:
|
|
3517
|
+
lpwstr: U.Type.String,
|
|
3518
|
+
lpstr: U.Type.String,
|
|
3519
|
+
bstr: U.Type.String,
|
|
3520
|
+
i1: U.Type.Number,
|
|
3521
|
+
i2: U.Type.Number,
|
|
3522
|
+
i4: U.Type.Number,
|
|
3523
|
+
i8: U.Type.Number,
|
|
3524
|
+
int: U.Type.Number,
|
|
3525
|
+
ui1: U.Type.Number,
|
|
3526
|
+
ui2: U.Type.Number,
|
|
3527
|
+
ui4: U.Type.Number,
|
|
3528
|
+
ui8: U.Type.Number,
|
|
3529
|
+
uint: U.Type.Number,
|
|
3530
|
+
r4: U.Type.Float,
|
|
3531
|
+
r8: U.Type.Float,
|
|
3532
|
+
decimal: U.Type.Float,
|
|
3533
|
+
bool: U.Type.Boolean,
|
|
3534
|
+
filetime: U.Type.Date,
|
|
3535
|
+
date: U.Type.Date
|
|
3536
3536
|
}, Or = (e) => {
|
|
3537
3537
|
let t = e.kind ? Dr[e.kind] : void 0;
|
|
3538
3538
|
if (!t) return null;
|
|
3539
3539
|
let n = e.value.trim(), r;
|
|
3540
|
-
if (t ===
|
|
3540
|
+
if (t === U.Type.String) r = {
|
|
3541
3541
|
key: e.key,
|
|
3542
3542
|
type: t,
|
|
3543
3543
|
value: e.value
|
|
3544
3544
|
};
|
|
3545
|
-
else if (t ===
|
|
3545
|
+
else if (t === U.Type.Boolean) {
|
|
3546
3546
|
if (n !== "true" && n !== "false" && n !== "1" && n !== "0") return null;
|
|
3547
3547
|
r = {
|
|
3548
3548
|
key: e.key,
|
|
3549
3549
|
type: t,
|
|
3550
3550
|
value: n === "true" || n === "1"
|
|
3551
3551
|
};
|
|
3552
|
-
} else if (t ===
|
|
3552
|
+
} else if (t === U.Type.Date) {
|
|
3553
3553
|
let i = new Date(n);
|
|
3554
3554
|
if (!n || isNaN(i.getTime())) return null;
|
|
3555
3555
|
r = {
|
|
@@ -3560,22 +3560,22 @@ var Tr = {
|
|
|
3560
3560
|
} else {
|
|
3561
3561
|
let i = Number(n);
|
|
3562
3562
|
if (!n || !Number.isFinite(i)) return null;
|
|
3563
|
-
let a = t ===
|
|
3563
|
+
let a = t === U.Type.Number && i >= -2147483648 && i <= 2147483647;
|
|
3564
3564
|
r = {
|
|
3565
3565
|
key: e.key,
|
|
3566
|
-
type: a ? t :
|
|
3566
|
+
type: a ? t : U.Type.Float,
|
|
3567
3567
|
value: i
|
|
3568
3568
|
};
|
|
3569
3569
|
}
|
|
3570
3570
|
return e.linkTarget && (r.linkTarget = e.linkTarget), r;
|
|
3571
3571
|
}, kr = "hiddenXfs", Ar = (e) => (Array.isArray(e) ? e[1] : e?.v)?.s, jr = (e) => {
|
|
3572
3572
|
if (!e || e.length === 0) return !1;
|
|
3573
|
-
let t =
|
|
3573
|
+
let t = H.refsToRuns(e, !0), n = 0;
|
|
3574
3574
|
for (let e of t) {
|
|
3575
3575
|
if (e.min > n || e.value?.s === void 0) return !1;
|
|
3576
3576
|
n = Math.max(n, e.max + 1);
|
|
3577
3577
|
}
|
|
3578
|
-
return n >
|
|
3578
|
+
return n > F;
|
|
3579
3579
|
}, Mr = (e, t) => {
|
|
3580
3580
|
e.protection = {
|
|
3581
3581
|
...e.protection,
|
|
@@ -3586,7 +3586,7 @@ var Tr = {
|
|
|
3586
3586
|
if (!n || n.length === 0) return;
|
|
3587
3587
|
let r = null, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (e, o, s, c) => {
|
|
3588
3588
|
let l = "";
|
|
3589
|
-
c && (l = a.get(c) ??
|
|
3589
|
+
c && (l = a.get(c) ?? Je.JSONStableStringify(c), a.set(c, l));
|
|
3590
3590
|
let u = `${e}|${o ?? ""}|${s ?? ""}|${l}`, d = i.get(u);
|
|
3591
3591
|
if (d !== void 0) return d;
|
|
3592
3592
|
let f = n[e], p = f ? Ir(f, o, s, c) : null, m = t?.get(e);
|
|
@@ -3594,18 +3594,18 @@ var Tr = {
|
|
|
3594
3594
|
if (!r) {
|
|
3595
3595
|
r = /* @__PURE__ */ new Map();
|
|
3596
3596
|
for (let e = 0; e < n.length; e++) {
|
|
3597
|
-
let i =
|
|
3597
|
+
let i = Je.JSONStableStringify(n[e]), a = t?.get(e);
|
|
3598
3598
|
a !== void 0 && (i += `|${a}`), r.has(i) || r.set(i, e);
|
|
3599
3599
|
}
|
|
3600
3600
|
}
|
|
3601
|
-
let a =
|
|
3601
|
+
let a = Je.JSONStableStringify(e);
|
|
3602
3602
|
i !== void 0 && (a += `|${i}`);
|
|
3603
3603
|
let o = r.get(a);
|
|
3604
3604
|
return o === void 0 && (o = n.length, n.push(e), r.set(a, o), i !== void 0 && t.set(o, i)), o;
|
|
3605
3605
|
})(p ?? {}, m) : null, i.set(u, d), d;
|
|
3606
3606
|
}, s = new Map((e.pivotCaches ?? []).map((e) => [e.cacheId, e.fields]));
|
|
3607
3607
|
for (let t of e.sheets ?? []) {
|
|
3608
|
-
let e =
|
|
3608
|
+
let e = d(t), n = e?.pivotTables, r = e?.directStyles;
|
|
3609
3609
|
if (!e || !n || n.length === 0 || !r || r.length === 0) continue;
|
|
3610
3610
|
let i = r, a = !1;
|
|
3611
3611
|
for (let e of n) {
|
|
@@ -3613,17 +3613,17 @@ var Tr = {
|
|
|
3613
3613
|
if (!t) continue;
|
|
3614
3614
|
let n = [];
|
|
3615
3615
|
for (let e of i) {
|
|
3616
|
-
let r =
|
|
3616
|
+
let r = H.fastStringToRange(e[0]), i = Ur(r, t.coords);
|
|
3617
3617
|
if (!i) {
|
|
3618
3618
|
n.push(e);
|
|
3619
3619
|
continue;
|
|
3620
3620
|
}
|
|
3621
3621
|
a = !0;
|
|
3622
|
-
for (let t of Wr(r, i)) n.push([
|
|
3622
|
+
for (let t of Wr(r, i)) n.push([H.rangeToString(t), e[1]]);
|
|
3623
3623
|
let { rowIndex: s, colIndex: c } = t.origin;
|
|
3624
3624
|
for (let r = i.rowStart; r <= i.rowEnd; r++) {
|
|
3625
3625
|
let a = i.colStart, l = null, u = (e) => {
|
|
3626
|
-
l !== null && n.push([
|
|
3626
|
+
l !== null && n.push([H.rangeToString({
|
|
3627
3627
|
rowStart: r,
|
|
3628
3628
|
rowEnd: r,
|
|
3629
3629
|
colStart: a,
|
|
@@ -3642,9 +3642,9 @@ var Tr = {
|
|
|
3642
3642
|
a && (e.directStyles = i);
|
|
3643
3643
|
}
|
|
3644
3644
|
}, Fr = (e, t) => {
|
|
3645
|
-
let n =
|
|
3645
|
+
let n = W(e, t);
|
|
3646
3646
|
if (!n || !e.location) return null;
|
|
3647
|
-
let r =
|
|
3647
|
+
let r = H.fastStringToRange(e.location), i = {
|
|
3648
3648
|
rowIndex: r.rowStart - n.top,
|
|
3649
3649
|
colIndex: r.colStart
|
|
3650
3650
|
};
|
|
@@ -3665,7 +3665,7 @@ var Tr = {
|
|
|
3665
3665
|
i = t;
|
|
3666
3666
|
}
|
|
3667
3667
|
let o = i.alignment;
|
|
3668
|
-
if (n !== null && o?.horizontal ===
|
|
3668
|
+
if (n !== null && o?.horizontal === at.HorizontalAlignment.Left && (o.indent ?? 0) === n) {
|
|
3669
3669
|
let { horizontal: e, indent: t, ...n } = o, { alignment: r, ...a } = i;
|
|
3670
3670
|
i = Hr(n) ? a : {
|
|
3671
3671
|
...a,
|
|
@@ -3680,9 +3680,9 @@ var Tr = {
|
|
|
3680
3680
|
}
|
|
3681
3681
|
}
|
|
3682
3682
|
if (i === e) return e;
|
|
3683
|
-
for (let e of Object.keys(i)) if (i[e] !== void 0 && (e !== "named" || i.named !==
|
|
3683
|
+
for (let e of Object.keys(i)) if (i[e] !== void 0 && (e !== "named" || i.named !== et.BuiltInName.Normal)) return i;
|
|
3684
3684
|
return null;
|
|
3685
|
-
}, Lr = (e, t) => e === t ||
|
|
3685
|
+
}, Lr = (e, t) => e === t || ot.toBuiltInID(e) === ot.toBuiltInID(t), Rr = (e) => typeof e == "object" && !!e && !Array.isArray(e), zr = (e, t) => !(!Rr(e) || !Rr(t)) && (e.patternType === "solid" && t.patternType === "solid" ? e.foreground === t.foreground : Je.JSONStableStringify(e) === Je.JSONStableStringify(t)), Br = (e, t) => {
|
|
3686
3686
|
let n = null, r = (t, r) => {
|
|
3687
3687
|
n ??= { ...e }, r === void 0 ? delete n[t] : n[t] = r;
|
|
3688
3688
|
};
|
|
@@ -3698,9 +3698,9 @@ var Tr = {
|
|
|
3698
3698
|
}
|
|
3699
3699
|
return n ?? e;
|
|
3700
3700
|
}, Vr = {
|
|
3701
|
-
vertical:
|
|
3701
|
+
vertical: at.VerticalAlignment.Bottom,
|
|
3702
3702
|
relativeIndent: 0,
|
|
3703
|
-
overflow:
|
|
3703
|
+
overflow: at.Overflow.Visible,
|
|
3704
3704
|
rotation: 0
|
|
3705
3705
|
}, Hr = (e) => Object.keys(e).every((t) => e[t] === void 0 || Vr[t] === e[t]), Ur = (e, t) => {
|
|
3706
3706
|
let n = Math.max(e.rowStart, t.rowStart), r = Math.min(e.rowEnd, t.rowEnd), i = Math.max(e.colStart, t.colStart), a = Math.min(e.colEnd, t.colEnd);
|
|
@@ -3733,7 +3733,7 @@ var Tr = {
|
|
|
3733
3733
|
if (typeof e == "string") return void t.push(e);
|
|
3734
3734
|
let n = Array.isArray(e) ? e : [e];
|
|
3735
3735
|
for (let e = 0; e < n.length; e++) {
|
|
3736
|
-
let r =
|
|
3736
|
+
let r = H.rangeToString(n[e]);
|
|
3737
3737
|
r && t.push(r);
|
|
3738
3738
|
}
|
|
3739
3739
|
}, qr = (e) => {
|
|
@@ -3745,7 +3745,7 @@ var Tr = {
|
|
|
3745
3745
|
if (!e) return;
|
|
3746
3746
|
let i = t ? 2 : 1, a = t ? n.rowStart : n.colStart, o = t ? n.rowEnd : n.colEnd, s, c = -1;
|
|
3747
3747
|
for (let n of e) {
|
|
3748
|
-
let e =
|
|
3748
|
+
let e = H.refToRun(n, t), l = qr(n);
|
|
3749
3749
|
e && l !== void 0 ? l !== c || (t ? s.colEnd : s.rowEnd) + 1 !== e.min ? (s = {
|
|
3750
3750
|
colStart: t ? e.min : a,
|
|
3751
3751
|
rowStart: t ? a : e.min,
|
|
@@ -3800,52 +3800,52 @@ var Tr = {
|
|
|
3800
3800
|
26,
|
|
3801
3801
|
225
|
|
3802
3802
|
], $r = /^xl\/worksheets\/[^/]+\.xml$/i, ei = (e) => typeof e == "string" ? e : (e?.runs ?? []).map((e) => e.text ?? "").join(""), ti = async (e, n) => {
|
|
3803
|
-
let { password: o, onVBA:
|
|
3804
|
-
await
|
|
3805
|
-
let
|
|
3806
|
-
|
|
3803
|
+
let { password: o, onVBA: c, profile: l, calcOnLoad: f = "auto", createWorkbookOptions: p = {}, ...ee } = n ?? {};
|
|
3804
|
+
await Qe.load();
|
|
3805
|
+
let h = !!p.origin && typeof p.origin != "string", _ = l ? new Nt(typeof l == "function" ? l : void 0) : null, y = [], re = (e, t, n) => {
|
|
3806
|
+
y.push([
|
|
3807
3807
|
e,
|
|
3808
3808
|
t ?? "",
|
|
3809
3809
|
n
|
|
3810
3810
|
]);
|
|
3811
|
-
},
|
|
3811
|
+
}, ae = { onWarning: re }, oe = n?.progress, se = oe?.onProgress ? oe.onProgress.bind(oe) : void 0, x = e.byteLength, le = 0, ue = 0, fe = se ? (e) => {
|
|
3812
3812
|
if (le <= 0) return;
|
|
3813
3813
|
ue += e;
|
|
3814
|
-
let t = Math.min(
|
|
3815
|
-
|
|
3816
|
-
} : void 0,
|
|
3814
|
+
let t = Math.min(x, Math.round(ue / le * x));
|
|
3815
|
+
se(t, x);
|
|
3816
|
+
} : void 0, S = import("./CduDdZifUgpa31H9.mjs"), me = null;
|
|
3817
3817
|
try {
|
|
3818
|
-
|
|
3818
|
+
me = new DOMParser();
|
|
3819
3819
|
} catch {}
|
|
3820
|
-
let
|
|
3820
|
+
let w = null;
|
|
3821
3821
|
try {
|
|
3822
|
-
|
|
3822
|
+
w = new XMLSerializer();
|
|
3823
3823
|
} catch {}
|
|
3824
|
-
let E, D, O
|
|
3825
|
-
|
|
3824
|
+
let T, E, D, O = null;
|
|
3825
|
+
me || (O = import("./clofhk5-eCPDQW9E.mjs").then((e) => t(e.default, 1)));
|
|
3826
3826
|
try {
|
|
3827
|
-
let [e, t] = await Promise.all([
|
|
3828
|
-
|
|
3827
|
+
let [e, t] = await Promise.all([O, S]);
|
|
3828
|
+
T = new t.DOMTransformer(), E = me ?? new e.DOMParser(), D = w ?? new e.XMLSerializer();
|
|
3829
3829
|
} catch (e) {
|
|
3830
3830
|
throw Error("Unable to load XLSX parser.", { cause: e });
|
|
3831
3831
|
}
|
|
3832
|
-
let ge = (e) =>
|
|
3832
|
+
let ge = (e) => D.serializeToString(e);
|
|
3833
3833
|
if (((e) => {
|
|
3834
3834
|
if (e.byteLength < Qr.length) return !1;
|
|
3835
3835
|
let t = new Uint8Array(e, 0, Qr.length);
|
|
3836
3836
|
return Qr.every((e, n) => t[n] === e);
|
|
3837
|
-
})(e)) throw new
|
|
3838
|
-
let
|
|
3837
|
+
})(e)) throw new Ge("This is an Excel 97-2003 workbook (.xls), which cannot be read. Save it as '.xlsx' and try again.");
|
|
3838
|
+
let k;
|
|
3839
3839
|
try {
|
|
3840
|
-
|
|
3840
|
+
k = await Mt.create(e);
|
|
3841
3841
|
} catch (e) {
|
|
3842
|
-
throw new
|
|
3842
|
+
throw new Ge("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.", { cause: e });
|
|
3843
3843
|
}
|
|
3844
|
-
|
|
3844
|
+
_?.mark("zip-open");
|
|
3845
3845
|
try {
|
|
3846
|
-
if (!
|
|
3846
|
+
if (!k.has("[Content_Types].xml")) throw new Ge("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3847
3847
|
let e = (e) => {
|
|
3848
|
-
let t =
|
|
3848
|
+
let t = k.getEntry(e);
|
|
3849
3849
|
return t ? { content: t } : void 0;
|
|
3850
3850
|
}, t = {
|
|
3851
3851
|
workbooks: [],
|
|
@@ -3895,23 +3895,23 @@ var Tr = {
|
|
|
3895
3895
|
t?.(`Error parsing content types: ${e?.message ?? e}`);
|
|
3896
3896
|
}
|
|
3897
3897
|
}))(t, (e) => {
|
|
3898
|
-
|
|
3899
|
-
}), n = await
|
|
3898
|
+
y.push([e, "[Content_Types].xml"]);
|
|
3899
|
+
}), n = await k.getTextStream("[Content_Types].xml");
|
|
3900
3900
|
if (!n) throw Error("Error parsing content types: '[Content_Types].xml'");
|
|
3901
3901
|
try {
|
|
3902
3902
|
await Sn.parseStream(n, e, { xmlns: !1 });
|
|
3903
3903
|
} catch (e) {
|
|
3904
3904
|
throw Error("Error parsing content types: '[Content_Types].xml'", { cause: e });
|
|
3905
3905
|
}
|
|
3906
|
-
|
|
3906
|
+
h && await k.getBuffer("[Content_Types].xml");
|
|
3907
3907
|
}
|
|
3908
|
-
|
|
3908
|
+
_?.mark("content-types");
|
|
3909
3909
|
let n = t.sst, o = /* @__PURE__ */ new Set();
|
|
3910
3910
|
for (let e of t.sheets) o.add(Zr(e));
|
|
3911
3911
|
n && o.add(Zr(n));
|
|
3912
|
-
for (let e of o) le +=
|
|
3913
|
-
if (await
|
|
3914
|
-
let n = C("_rels/.rels", e,
|
|
3912
|
+
for (let e of o) le += k.uncompressedSize(e);
|
|
3913
|
+
if (await k.prefetch((e) => !o.has(e) && !$r.test(e)), _?.mark("prefetch-side-parts"), t.workbooks.length === 0) {
|
|
3914
|
+
let n = C("_rels/.rels", e, E, T, ae);
|
|
3915
3915
|
if (n) {
|
|
3916
3916
|
for (let e of n.values()) if (e.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" && e.target) {
|
|
3917
3917
|
t.workbooks.push(e.target);
|
|
@@ -3919,40 +3919,40 @@ var Tr = {
|
|
|
3919
3919
|
}
|
|
3920
3920
|
}
|
|
3921
3921
|
}
|
|
3922
|
-
if (t.workbooks.length === 0) throw new
|
|
3923
|
-
let
|
|
3924
|
-
|
|
3922
|
+
if (t.workbooks.length === 0) throw new Ge("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3923
|
+
let ee = p?.resources ?? new lt(), ue = ee.beginPersist(), S = {}, me = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Map();
|
|
3924
|
+
w.set("parseInlineDxf", (e) => {
|
|
3925
3925
|
if (!e) return;
|
|
3926
|
-
let t =
|
|
3926
|
+
let t = E.parseFromString(`<dxf xmlns:x14="${Ue}" xmlns:xm="${Ve}">${e}</dxf>`, "text/xml")?.documentElement;
|
|
3927
3927
|
if (!t) return;
|
|
3928
|
-
let n =
|
|
3928
|
+
let n = T.parseDxf(t, "", ae);
|
|
3929
3929
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
3930
3930
|
});
|
|
3931
|
-
let
|
|
3932
|
-
|
|
3933
|
-
let
|
|
3931
|
+
let D = r("metadata", t, e, E, T, ae).entries().next()?.value?.[1]?.metadata;
|
|
3932
|
+
D && w.set("metadata", D), w.set(sr, m());
|
|
3933
|
+
let O = /* @__PURE__ */ new Map(), ve = [], ye = /* @__PURE__ */ new Set(), A = (e) => {
|
|
3934
3934
|
ye.add(Zr(e));
|
|
3935
|
-
},
|
|
3935
|
+
}, j = (t, n = O) => {
|
|
3936
3936
|
let r = t.lastIndexOf("/"), i = t.substring(0, r + 1) + "_rels/" + t.substring(r + 1, t.length) + ".rels", a = n.get(i);
|
|
3937
|
-
return a || (a = C(i, e,
|
|
3938
|
-
},
|
|
3939
|
-
let a =
|
|
3937
|
+
return a || (a = C(i, e, E, T, R), n.set(i, a)), a;
|
|
3938
|
+
}, M = (t, n, r, i = O) => {
|
|
3939
|
+
let a = j(n, i).get(t), o = a?.target;
|
|
3940
3940
|
if (!o) return null;
|
|
3941
3941
|
if (a.targetMode === "External") {
|
|
3942
3942
|
if (!r) return a.target;
|
|
3943
|
-
let e =
|
|
3944
|
-
return e.addReference(
|
|
3943
|
+
let e = ee.add({ source: { external: a.target } });
|
|
3944
|
+
return e.addReference(S), me.add(e), ue.toResourceId(e);
|
|
3945
3945
|
}
|
|
3946
3946
|
let s = n.lastIndexOf("/"), c = n.substring(0, s + 1);
|
|
3947
|
-
o.startsWith("/") || (o = c + o), o =
|
|
3948
|
-
let l =
|
|
3947
|
+
o.startsWith("/") || (o = c + o), o = De(o);
|
|
3948
|
+
let l = T?.getVisitorParamsState().get("dxfs"), u = i.get(o);
|
|
3949
3949
|
if (!u) {
|
|
3950
3950
|
if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
3951
3951
|
let e = {};
|
|
3952
3952
|
u = e, ve.push((async () => {
|
|
3953
|
-
let t = fr(e, (e, t) => t === "legacyDrawing" ? Se(e, o) : t === "formControl" ? Ce(e, o) : t === "part" ?
|
|
3954
|
-
|
|
3955
|
-
}, void 0,
|
|
3953
|
+
let t = fr(e, (e, t) => t === "legacyDrawing" ? Se(e, o) : t === "formControl" ? Ce(e, o) : t === "part" ? we(e, o) : M(e, o, t === "resource") ?? null, Ye, l, () => {}, (e, t, n) => {
|
|
3954
|
+
re(e, t ? `${t} (${o})` : o, n);
|
|
3955
|
+
}, void 0, w), n = await k.getTextStream(o, fe);
|
|
3956
3956
|
if (n) try {
|
|
3957
3957
|
await Sn.parseStream(n, t, {
|
|
3958
3958
|
xmlns: !1,
|
|
@@ -3961,21 +3961,21 @@ var Tr = {
|
|
|
3961
3961
|
} catch (e) {
|
|
3962
3962
|
throw Error(`Error parsing sheet: '${o}'`, { cause: e });
|
|
3963
3963
|
}
|
|
3964
|
-
let r =
|
|
3964
|
+
let r = j(o, i);
|
|
3965
3965
|
if (r) {
|
|
3966
3966
|
xe(e, o, r, i), Ae(e), _e(e);
|
|
3967
3967
|
let t = [];
|
|
3968
3968
|
r.forEach((e, n) => {
|
|
3969
3969
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable") return;
|
|
3970
|
-
let r =
|
|
3970
|
+
let r = we(n, o, e.type, (e) => e !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition");
|
|
3971
3971
|
if (!r?.xml) return;
|
|
3972
3972
|
let i = /<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0] ?? "", a = parseInt(/\scacheId="(\d+)"/.exec(i)?.[1] ?? "", 10);
|
|
3973
|
-
if (isNaN(a)) return void
|
|
3973
|
+
if (isNaN(a)) return void y.push([`Pivot table '${r.name}' names no cache and was dropped.`, o]);
|
|
3974
3974
|
let s = /\sname="([^"]*)"/.exec(i)?.[1], c = Le(r.xml);
|
|
3975
|
-
if (!c) return void
|
|
3976
|
-
let l =
|
|
3975
|
+
if (!c) return void y.push([`Pivot table '${r.name}' states no location and was dropped.`, o]);
|
|
3976
|
+
let l = T?.getVisitorParamsState(), u = Pe(l?.get("numFmts"), l?.get("dxfs")), d = Ee(r.xml, u), f = d ? void 0 : be(r.xml, u);
|
|
3977
3977
|
t.push({
|
|
3978
|
-
...s ? { name:
|
|
3978
|
+
...s ? { name: de(s) } : {},
|
|
3979
3979
|
cacheId: a,
|
|
3980
3980
|
location: c,
|
|
3981
3981
|
part: r,
|
|
@@ -3986,12 +3986,12 @@ var Tr = {
|
|
|
3986
3986
|
}
|
|
3987
3987
|
})());
|
|
3988
3988
|
} else if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink") {
|
|
3989
|
-
let t =
|
|
3989
|
+
let t = ne(o, e, E, T, R);
|
|
3990
3990
|
if (t && Object.keys(t).length !== 0) {
|
|
3991
3991
|
let e = t, n = e.__bookRelId, r = e.__absoluteUrlRelId;
|
|
3992
3992
|
delete e.__bookRelId, delete e.__absoluteUrlRelId;
|
|
3993
3993
|
let a = [];
|
|
3994
|
-
|
|
3994
|
+
j(o, i)?.forEach((e, t) => {
|
|
3995
3995
|
if (e.targetMode === "External" && e.type && e.target) {
|
|
3996
3996
|
let i = {
|
|
3997
3997
|
type: e.type,
|
|
@@ -3999,91 +3999,91 @@ var Tr = {
|
|
|
3999
3999
|
};
|
|
4000
4000
|
t === n ? i.role = "book" : t === r && (i.role = "absoluteUrl"), a.push(i);
|
|
4001
4001
|
}
|
|
4002
|
-
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a,
|
|
4002
|
+
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a, A(o), u = e;
|
|
4003
4003
|
} else u = null;
|
|
4004
|
-
} else u = r ?
|
|
4005
|
-
let n =
|
|
4006
|
-
return n.addReference(
|
|
4007
|
-
},
|
|
4004
|
+
} else u = r ? he(o, e, (e, t) => {
|
|
4005
|
+
let n = ee.add({ source: { buffer: e } });
|
|
4006
|
+
return n.addReference(S), me.add(n), ue.toResourceId(n);
|
|
4007
|
+
}, R) : ne(o, e, E, T, R);
|
|
4008
4008
|
}
|
|
4009
4009
|
return u;
|
|
4010
4010
|
}, P = (e, t) => {
|
|
4011
4011
|
if (!e) return null;
|
|
4012
|
-
let n =
|
|
4012
|
+
let n = j(t, O)?.get(e);
|
|
4013
4013
|
if (!n?.target || n.targetMode === "External") return null;
|
|
4014
4014
|
let r = n.target;
|
|
4015
|
-
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r),
|
|
4015
|
+
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r), De(r);
|
|
4016
4016
|
}, xe = (e, t, n, r) => {
|
|
4017
|
-
let i = [],
|
|
4017
|
+
let i = [], a = /* @__PURE__ */ new Map(), o = [];
|
|
4018
4018
|
n.forEach((e, n) => {
|
|
4019
4019
|
if (e.type !== "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment") return;
|
|
4020
|
-
let
|
|
4021
|
-
if (!
|
|
4022
|
-
for (let e = 0; e <
|
|
4023
|
-
let t =
|
|
4020
|
+
let s = M(n, t, !1, r)?.comments;
|
|
4021
|
+
if (!s) return;
|
|
4022
|
+
for (let e = 0; e < s.length; e++) {
|
|
4023
|
+
let t = s[e];
|
|
4024
4024
|
if (!t?.v?.id) continue;
|
|
4025
4025
|
let { parentId: n, done: r, content: c, ...l } = t.v, u = {
|
|
4026
4026
|
...l,
|
|
4027
4027
|
content: ei(c)
|
|
4028
4028
|
};
|
|
4029
|
-
n ?
|
|
4029
|
+
n ? o.push({
|
|
4030
4030
|
parentId: n,
|
|
4031
4031
|
json: u
|
|
4032
|
-
}) : (r && (u.done = !0),
|
|
4032
|
+
}) : (r && (u.done = !0), a.set(u.id, u), i.push({
|
|
4033
4033
|
r: t.r,
|
|
4034
4034
|
v: u
|
|
4035
4035
|
}));
|
|
4036
4036
|
}
|
|
4037
4037
|
let c = P(n, t);
|
|
4038
|
-
c &&
|
|
4038
|
+
c && A(c);
|
|
4039
4039
|
});
|
|
4040
|
-
for (let e = 0; e <
|
|
4041
|
-
let { parentId: t, json: n } =
|
|
4040
|
+
for (let e = 0; e < o.length; e++) {
|
|
4041
|
+
let { parentId: t, json: n } = o[e], r = a.get(t);
|
|
4042
4042
|
r && (r.replies ??= []).push(n);
|
|
4043
4043
|
}
|
|
4044
|
-
let
|
|
4044
|
+
let c = [];
|
|
4045
4045
|
if (n.forEach((e, n) => {
|
|
4046
4046
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") return;
|
|
4047
|
-
let i =
|
|
4048
|
-
if (!
|
|
4047
|
+
let i = M(n, t, !1, r), o = i?.comments;
|
|
4048
|
+
if (!o) return;
|
|
4049
4049
|
let s = i?.authors;
|
|
4050
|
-
for (let e = 0; e <
|
|
4051
|
-
let t =
|
|
4050
|
+
for (let e = 0; e < o.length; e++) {
|
|
4051
|
+
let t = o[e];
|
|
4052
4052
|
if (!t?.r) continue;
|
|
4053
4053
|
let n = s && t.v.authorId !== void 0 ? s[t.v.authorId] : void 0;
|
|
4054
4054
|
if (n && n.startsWith("tc=")) {
|
|
4055
|
-
if (
|
|
4055
|
+
if (a.has(Re(n.substring(3)))) continue;
|
|
4056
4056
|
n = void 0;
|
|
4057
4057
|
}
|
|
4058
4058
|
let r = {
|
|
4059
|
-
id:
|
|
4059
|
+
id: We.uuidV4().toUpperCase(),
|
|
4060
4060
|
asNote: !0,
|
|
4061
4061
|
content: t.v.content ?? ""
|
|
4062
|
-
}, i = n ?
|
|
4063
|
-
i && (r.personId = i.id),
|
|
4062
|
+
}, i = n ? L({ displayName: n }) : void 0;
|
|
4063
|
+
i && (r.personId = i.id), c.push({
|
|
4064
4064
|
r: t.r,
|
|
4065
4065
|
v: r
|
|
4066
4066
|
});
|
|
4067
4067
|
}
|
|
4068
|
-
let
|
|
4069
|
-
|
|
4070
|
-
}), i.length === 0 &&
|
|
4071
|
-
let
|
|
4068
|
+
let l = P(n, t);
|
|
4069
|
+
l && A(l);
|
|
4070
|
+
}), i.length === 0 && c.length === 0) return;
|
|
4071
|
+
let l = [...i, ...c], d = e.legacyDrawing;
|
|
4072
4072
|
if (d?.xml) {
|
|
4073
|
-
let { rest: t, notes: n } =
|
|
4073
|
+
let { rest: t, notes: n } = u(d.xml);
|
|
4074
4074
|
if (n.length > 0) {
|
|
4075
4075
|
let r = /* @__PURE__ */ new Map();
|
|
4076
4076
|
for (let e = 0; e < n.length; e++) {
|
|
4077
4077
|
let t = n[e];
|
|
4078
|
-
r.set(
|
|
4078
|
+
r.set(H.cellToString({
|
|
4079
4079
|
rowIndex: t.row,
|
|
4080
4080
|
colIndex: t.col
|
|
4081
4081
|
}), t);
|
|
4082
4082
|
}
|
|
4083
|
-
for (let e = 0; e <
|
|
4084
|
-
let t =
|
|
4083
|
+
for (let e = 0; e < l.length; e++) {
|
|
4084
|
+
let t = l[e], n = r.get(String(t.r).toUpperCase());
|
|
4085
4085
|
if (!n || (r.delete(String(t.r).toUpperCase()), !t.v.asNote)) continue;
|
|
4086
|
-
let i =
|
|
4086
|
+
let i = ce(n.xml), a = {};
|
|
4087
4087
|
if (i.anchor) {
|
|
4088
4088
|
let [e, t, r, o, s, c, l, u] = i.anchor;
|
|
4089
4089
|
a.anchor = {
|
|
@@ -4107,34 +4107,34 @@ var Tr = {
|
|
|
4107
4107
|
r.forEach((e) => {
|
|
4108
4108
|
i.push(e.xml);
|
|
4109
4109
|
});
|
|
4110
|
-
let
|
|
4111
|
-
|
|
4110
|
+
let a = s(t, i);
|
|
4111
|
+
a ? d.xml = a : delete e.legacyDrawing;
|
|
4112
4112
|
}
|
|
4113
4113
|
}
|
|
4114
|
-
e.comments =
|
|
4114
|
+
e.comments = l;
|
|
4115
4115
|
}, Se = (t, n) => {
|
|
4116
4116
|
let r = P(t, n);
|
|
4117
4117
|
if (!r) return null;
|
|
4118
4118
|
let i = e(Zr(r));
|
|
4119
4119
|
if (!i) return null;
|
|
4120
4120
|
let a = { xml: wr(new TextDecoder("utf-8").decode(i.content)) }, o = [];
|
|
4121
|
-
return
|
|
4121
|
+
return j(r, O)?.forEach((e, t) => {
|
|
4122
4122
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") return;
|
|
4123
|
-
let n =
|
|
4123
|
+
let n = M(t, r, !0);
|
|
4124
4124
|
typeof n == "number" && o.push({
|
|
4125
4125
|
id: t,
|
|
4126
4126
|
resId: n
|
|
4127
4127
|
});
|
|
4128
|
-
}), o.length > 0 && (a.images = o),
|
|
4128
|
+
}), o.length > 0 && (a.images = o), A(r), a;
|
|
4129
4129
|
}, Ce = (t, n) => {
|
|
4130
4130
|
let r = P(t, n);
|
|
4131
4131
|
if (!r) return null;
|
|
4132
|
-
let i =
|
|
4133
|
-
return i &&
|
|
4134
|
-
},
|
|
4132
|
+
let i = ne(r, e, E, T, R)?.formControl ?? null;
|
|
4133
|
+
return i && A(r), i;
|
|
4134
|
+
}, we = (n, r, i, a, o = /* @__PURE__ */ new Set()) => {
|
|
4135
4135
|
let s = P(n, r);
|
|
4136
4136
|
if (!s || o.has(s)) return null;
|
|
4137
|
-
let c = i ??
|
|
4137
|
+
let c = i ?? j(r, O)?.get(n)?.type;
|
|
4138
4138
|
if (!c) return null;
|
|
4139
4139
|
let l = e(Zr(s));
|
|
4140
4140
|
if (!l) return null;
|
|
@@ -4146,15 +4146,15 @@ var Tr = {
|
|
|
4146
4146
|
};
|
|
4147
4147
|
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);
|
|
4148
4148
|
else {
|
|
4149
|
-
let e =
|
|
4149
|
+
let e = M(n, r, !0);
|
|
4150
4150
|
if (typeof e != "number") return null;
|
|
4151
4151
|
f.resId = e;
|
|
4152
4152
|
}
|
|
4153
4153
|
let p = [];
|
|
4154
|
-
return
|
|
4154
|
+
return j(s, O)?.forEach((e, t) => {
|
|
4155
4155
|
if (!e?.type || a && !a(e.type)) return;
|
|
4156
4156
|
if (e.targetMode === "External") {
|
|
4157
|
-
let n =
|
|
4157
|
+
let n = M(t, s, !0);
|
|
4158
4158
|
typeof n == "number" && p.push({
|
|
4159
4159
|
id: t,
|
|
4160
4160
|
type: e.type,
|
|
@@ -4162,32 +4162,32 @@ var Tr = {
|
|
|
4162
4162
|
});
|
|
4163
4163
|
return;
|
|
4164
4164
|
}
|
|
4165
|
-
let n =
|
|
4165
|
+
let n = we(t, s, e.type, a, o);
|
|
4166
4166
|
n && p.push(n);
|
|
4167
|
-
}), p.length > 0 && (f.parts = p),
|
|
4168
|
-
}, Oe = r("coreprops", t, e,
|
|
4167
|
+
}), p.length > 0 && (f.parts = p), A(s), f;
|
|
4168
|
+
}, Oe = r("coreprops", t, e, E, T, ae), ke = r("extprops", t, e, E, T, ae), je = r("custprops", t, e, E, T, ae);
|
|
4169
4169
|
je.forEach((e, t) => {
|
|
4170
|
-
e?.custom &&
|
|
4170
|
+
e?.custom && A(t);
|
|
4171
4171
|
});
|
|
4172
|
-
let Me = new
|
|
4172
|
+
let Me = new ct(), Fe = r("people", t, e, E, T, ae);
|
|
4173
4173
|
if (Fe.size > 0) {
|
|
4174
4174
|
let [e, t] = Fe.entries().next().value;
|
|
4175
|
-
Me.fromJSON(t?.persons),
|
|
4175
|
+
Me.fromJSON(t?.persons), A(e);
|
|
4176
4176
|
}
|
|
4177
|
-
let
|
|
4177
|
+
let L = (e) => {
|
|
4178
4178
|
if (e) return Me.add(e).toJSON();
|
|
4179
|
-
},
|
|
4180
|
-
paramMap:
|
|
4181
|
-
getRefs:
|
|
4182
|
-
getRef:
|
|
4183
|
-
parsedRefs:
|
|
4184
|
-
readEmbeddedPart: (e, t) =>
|
|
4185
|
-
addPerson:
|
|
4179
|
+
}, R = {
|
|
4180
|
+
paramMap: w,
|
|
4181
|
+
getRefs: j,
|
|
4182
|
+
getRef: M,
|
|
4183
|
+
parsedRefs: O,
|
|
4184
|
+
readEmbeddedPart: (e, t) => we(e, t),
|
|
4185
|
+
addPerson: L,
|
|
4186
4186
|
serializeElement: ge,
|
|
4187
|
-
onWarning:
|
|
4188
|
-
},
|
|
4189
|
-
if (
|
|
4190
|
-
let e = await
|
|
4187
|
+
onWarning: re
|
|
4188
|
+
}, z = [], Be = /* @__PURE__ */ new Map();
|
|
4189
|
+
if (w.set(ur, Be), n) {
|
|
4190
|
+
let e = await k.getTextStream(n, fe);
|
|
4191
4191
|
if (e) {
|
|
4192
4192
|
let t = ((e, t) => {
|
|
4193
4193
|
let n = !1, r = !1, i = 0, a = "", o = new nr();
|
|
@@ -4201,16 +4201,16 @@ var Tr = {
|
|
|
4201
4201
|
},
|
|
4202
4202
|
onCloseTag: (t) => {
|
|
4203
4203
|
let s = tr(t.name);
|
|
4204
|
-
s === "t" ? r = !1 : s === "si" ? (e(
|
|
4204
|
+
s === "t" ? r = !1 : s === "si" ? (e(ie(a), o.take() ?? void 0), n = !1, a = "") : s === "rPh" || s === "phoneticPr" ? i > 0 && i-- : o.onCloseTag(s);
|
|
4205
4205
|
},
|
|
4206
4206
|
onError: (e) => {
|
|
4207
4207
|
t?.(`Error parsing shared strings: ${e?.message ?? e}`);
|
|
4208
4208
|
}
|
|
4209
4209
|
};
|
|
4210
4210
|
})((e, t) => {
|
|
4211
|
-
t &&
|
|
4211
|
+
t && Be.set(z.length, t), z.push(e);
|
|
4212
4212
|
}, (e) => {
|
|
4213
|
-
|
|
4213
|
+
re(e, n);
|
|
4214
4214
|
});
|
|
4215
4215
|
try {
|
|
4216
4216
|
await Sn.parseStream(e, t, { xmlns: !1 });
|
|
@@ -4219,34 +4219,34 @@ var Tr = {
|
|
|
4219
4219
|
}
|
|
4220
4220
|
}
|
|
4221
4221
|
}
|
|
4222
|
-
|
|
4223
|
-
let
|
|
4224
|
-
let t =
|
|
4222
|
+
_?.mark("shared-strings");
|
|
4223
|
+
let B = z.length, He = /* @__PURE__ */ new Map(), Je = B, Ye = (e) => {
|
|
4224
|
+
let t = He.get(e);
|
|
4225
4225
|
if (t !== void 0) return t;
|
|
4226
|
-
let n =
|
|
4227
|
-
return
|
|
4228
|
-
},
|
|
4229
|
-
t.slicersCache =
|
|
4230
|
-
let
|
|
4231
|
-
for (let e = 0; e <
|
|
4232
|
-
let t =
|
|
4233
|
-
t && (t.startsWith("xl/slicerCache") || t.startsWith("xl/timelineCaches/") && t.endsWith(".xml")) &&
|
|
4234
|
-
}
|
|
4235
|
-
let
|
|
4236
|
-
|
|
4237
|
-
e?.cacheName && (e.cachePath = t,
|
|
4238
|
-
}),
|
|
4239
|
-
let
|
|
4240
|
-
t.slicers =
|
|
4241
|
-
for (let e = 0; e <
|
|
4242
|
-
let t =
|
|
4243
|
-
t && (t.startsWith("xl/slicers/") || t.startsWith("xl/timelines/")) && t.endsWith(".xml") &&
|
|
4244
|
-
}
|
|
4245
|
-
let
|
|
4226
|
+
let n = Je;
|
|
4227
|
+
return He.set(e, Je++), z.push(e), n;
|
|
4228
|
+
}, Xe = [];
|
|
4229
|
+
t.slicersCache = Xe;
|
|
4230
|
+
let Ze = k.getNames(), Qe = Ze.length;
|
|
4231
|
+
for (let e = 0; e < Qe; e++) {
|
|
4232
|
+
let t = Ze[e];
|
|
4233
|
+
t && (t.startsWith("xl/slicerCache") || t.startsWith("xl/timelineCaches/") && t.endsWith(".xml")) && Xe.push(`/${t}`);
|
|
4234
|
+
}
|
|
4235
|
+
let tt = r("slicersCache", t, e, E, T, R), nt = /* @__PURE__ */ new Map();
|
|
4236
|
+
tt.forEach((e, t) => {
|
|
4237
|
+
e?.cacheName && (e.cachePath = t, nt.set(e.cacheName, e));
|
|
4238
|
+
}), w.set("slicerCaches", nt);
|
|
4239
|
+
let U = [];
|
|
4240
|
+
t.slicers = U;
|
|
4241
|
+
for (let e = 0; e < Qe; e++) {
|
|
4242
|
+
let t = Ze[e];
|
|
4243
|
+
t && (t.startsWith("xl/slicers/") || t.startsWith("xl/timelines/")) && t.endsWith(".xml") && U.push(`/${t}`);
|
|
4244
|
+
}
|
|
4245
|
+
let rt = {
|
|
4246
4246
|
getFile: e,
|
|
4247
|
-
domParser:
|
|
4247
|
+
domParser: E,
|
|
4248
4248
|
getAddress: (e, t) => {
|
|
4249
|
-
let n =
|
|
4249
|
+
let n = M(t, e, !1);
|
|
4250
4250
|
return typeof n == "string" ? n : null;
|
|
4251
4251
|
},
|
|
4252
4252
|
getBytes: (t, n) => {
|
|
@@ -4254,42 +4254,42 @@ var Tr = {
|
|
|
4254
4254
|
return i ? i.slice().buffer : null;
|
|
4255
4255
|
},
|
|
4256
4256
|
addFetched: (e, t) => {
|
|
4257
|
-
let n =
|
|
4257
|
+
let n = ee.add({
|
|
4258
4258
|
source: { buffer: e },
|
|
4259
4259
|
fetchedFrom: t
|
|
4260
4260
|
});
|
|
4261
|
-
return n.addReference(
|
|
4261
|
+
return n.addReference(S), me.add(n), ue.toResourceId(n);
|
|
4262
4262
|
},
|
|
4263
|
-
markAbsorbed:
|
|
4264
|
-
},
|
|
4265
|
-
for (let e of
|
|
4266
|
-
let
|
|
4263
|
+
markAbsorbed: A
|
|
4264
|
+
}, it = /* @__PURE__ */ new Map();
|
|
4265
|
+
for (let e of pe.getAll()) it.set(e.structure, e.beginRead(rt));
|
|
4266
|
+
let at = ((e, t) => {
|
|
4267
4267
|
let n = (n) => {
|
|
4268
4268
|
let r = e(n);
|
|
4269
4269
|
return r ? t.parseFromString(new TextDecoder().decode(r.content), "text/xml").documentElement ?? null : null;
|
|
4270
|
-
}, r =
|
|
4270
|
+
}, r = G(n(xt), "s").map((e) => ({
|
|
4271
4271
|
t: e.getAttribute("t") ?? "",
|
|
4272
|
-
keys:
|
|
4273
|
-
})), i =
|
|
4274
|
-
let t =
|
|
4272
|
+
keys: Ot(e)
|
|
4273
|
+
})), i = G(n(St), "rv").map((e) => {
|
|
4274
|
+
let t = G(e, "fb")[0];
|
|
4275
4275
|
return {
|
|
4276
4276
|
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
4277
|
-
values:
|
|
4277
|
+
values: G(e, "v").map((e) => e.textContent ?? ""),
|
|
4278
4278
|
fb: t ? t.textContent ?? "" : null
|
|
4279
4279
|
};
|
|
4280
|
-
}), a =
|
|
4281
|
-
let t =
|
|
4280
|
+
}), a = G(n(Ct), "a").map((e) => {
|
|
4281
|
+
let t = kt(e), n = parseInt(e.getAttribute("r") ?? "", 10), r = parseInt(e.getAttribute("c") ?? "", 10), i = n > 0 ? n : t.length;
|
|
4282
4282
|
return {
|
|
4283
4283
|
rows: i,
|
|
4284
4284
|
columns: r > 0 ? r : Math.max(1, Math.ceil(t.length / Math.max(1, i))),
|
|
4285
4285
|
items: t
|
|
4286
4286
|
};
|
|
4287
|
-
}), o =
|
|
4287
|
+
}), o = G(n(wt), "s").map(Ot), s = n(Tt), c = G(G(s, "spbArrays")[0], "a").map(kt), l = G(G(s, "spbData")[0], "spb").map((e) => ({
|
|
4288
4288
|
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
4289
|
-
values:
|
|
4290
|
-
})), u = n(
|
|
4291
|
-
for (let e of
|
|
4292
|
-
let p = n(
|
|
4289
|
+
values: G(e, "v").map((e) => e.textContent ?? "")
|
|
4290
|
+
})), u = n(Et), d = At(G(G(u, "global")[0], "keyFlags")[0]), f = /* @__PURE__ */ new Map();
|
|
4291
|
+
for (let e of G(G(u, "types")[0], "type")) f.set(e.getAttribute("name") ?? "", At(G(e, "keyFlags")[0]));
|
|
4292
|
+
let p = n(Dt), m = G(G(p, "dxfs")[0], "dxf").map((e) => G(e, "numFmt")[0]?.getAttribute("formatCode") ?? null), ee = G(G(p, "richProperties")[0], "rPr").map((e) => e.getAttribute("n") ?? "");
|
|
4293
4293
|
return {
|
|
4294
4294
|
structures: r,
|
|
4295
4295
|
values: i,
|
|
@@ -4299,10 +4299,10 @@ var Tr = {
|
|
|
4299
4299
|
bags: l,
|
|
4300
4300
|
globalKeyFlags: d,
|
|
4301
4301
|
typeKeyFlags: f,
|
|
4302
|
-
richStyles:
|
|
4302
|
+
richStyles: G(G(p, "richStyles")[0], "rSty").map((e) => {
|
|
4303
4303
|
let t = /* @__PURE__ */ new Map();
|
|
4304
|
-
for (let n of
|
|
4305
|
-
let e =
|
|
4304
|
+
for (let n of G(e, "rpv")) {
|
|
4305
|
+
let e = ee[parseInt(n.getAttribute("i") ?? "-1", 10)];
|
|
4306
4306
|
e && t.set(e, n.textContent ?? "");
|
|
4307
4307
|
}
|
|
4308
4308
|
let n = parseInt(e.getAttribute("dxfid") ?? "", 10);
|
|
@@ -4313,23 +4313,23 @@ var Tr = {
|
|
|
4313
4313
|
};
|
|
4314
4314
|
})
|
|
4315
4315
|
};
|
|
4316
|
-
})(e,
|
|
4317
|
-
|
|
4316
|
+
})(e, E), ot = Ne(at, it, (e) => {
|
|
4317
|
+
re(e, "/xl/richData/rdrichvalue.xml");
|
|
4318
4318
|
});
|
|
4319
|
-
|
|
4320
|
-
for (let e = 0; e <
|
|
4321
|
-
let t =
|
|
4322
|
-
t.startsWith("xl/richData/") && !t.includes("/_rels/") &&
|
|
4323
|
-
}
|
|
4324
|
-
let
|
|
4325
|
-
if (
|
|
4326
|
-
let e =
|
|
4327
|
-
e?.value?.[1] && (
|
|
4328
|
-
}
|
|
4329
|
-
let
|
|
4330
|
-
|
|
4331
|
-
let
|
|
4332
|
-
|
|
4319
|
+
w.set("richData", at.values.map((e, t) => ot.cellValue(t)));
|
|
4320
|
+
for (let e = 0; e < Qe; e++) {
|
|
4321
|
+
let t = Ze[e];
|
|
4322
|
+
t.startsWith("xl/richData/") && !t.includes("/_rels/") && A(t);
|
|
4323
|
+
}
|
|
4324
|
+
let st = r("themes", t, e, E, T, R), ut = null;
|
|
4325
|
+
if (st && st.entries) {
|
|
4326
|
+
let e = st.entries().next();
|
|
4327
|
+
e?.value?.[1] && (ut = e.value[1]);
|
|
4328
|
+
}
|
|
4329
|
+
let dt = new pt(ut), ft = r("styles", t, e, E, T, R).entries().next()?.value?.[1];
|
|
4330
|
+
ft &&= JSON.parse(V.JSONStableStringify(ft));
|
|
4331
|
+
let mt = r("workbooks", t, e, E, T, R);
|
|
4332
|
+
w.set(lr, !0 === mt.entries().next().value?.[1]?.date1904), (p.calcOnLoad ?? f) !== "none" && w.set(cr, ((e, t) => {
|
|
4333
4333
|
let n = /* @__PURE__ */ new Set();
|
|
4334
4334
|
if (e) for (let t = 0; t < e.length; t++) n.add(String(e[t]?.name).toUpperCase());
|
|
4335
4335
|
if (t) for (let e = 0; e < t.length; e++) try {
|
|
@@ -4340,18 +4340,18 @@ var Tr = {
|
|
|
4340
4340
|
}, /* @__PURE__ */ new Map());
|
|
4341
4341
|
for (let e of r.keys()) n.add(e.toUpperCase());
|
|
4342
4342
|
} catch {}
|
|
4343
|
-
return (e) => n.has(e) ||
|
|
4344
|
-
})(
|
|
4343
|
+
return (e) => n.has(e) || $e.has(e);
|
|
4344
|
+
})(mt.entries().next().value?.[1]?.names, p.functions)), _?.mark("side-parts-json"), await Promise.all(ve);
|
|
4345
4345
|
{
|
|
4346
|
-
let e =
|
|
4346
|
+
let e = mt.entries().next().value?.[1], t = m(e?.names), n = e?.sheets ?? [];
|
|
4347
4347
|
for (let e = 0; e < n.length; e++) {
|
|
4348
|
-
let r = n[e], i =
|
|
4348
|
+
let r = n[e], i = a(r);
|
|
4349
4349
|
if (r?.kind === "macro" && i?.part.xml) {
|
|
4350
|
-
i.part.xml =
|
|
4350
|
+
i.part.xml = te(i.part.xml, z);
|
|
4351
4351
|
continue;
|
|
4352
4352
|
}
|
|
4353
|
-
let
|
|
4354
|
-
|
|
4353
|
+
let o = d(r);
|
|
4354
|
+
o && g(o, t);
|
|
4355
4355
|
}
|
|
4356
4356
|
let r = e?.names;
|
|
4357
4357
|
if (r) for (let e = 0; e < r.length; e++) {
|
|
@@ -4359,12 +4359,12 @@ var Tr = {
|
|
|
4359
4359
|
typeof n == "string" && (r[e].ref = t.readDetached(n));
|
|
4360
4360
|
}
|
|
4361
4361
|
}
|
|
4362
|
-
|
|
4363
|
-
let
|
|
4364
|
-
...
|
|
4365
|
-
styles:
|
|
4366
|
-
theme:
|
|
4367
|
-
},
|
|
4362
|
+
se && le > 0 && (se(x, x), await new Promise((e) => setTimeout(e, 0))), _?.mark("sheets");
|
|
4363
|
+
let W = {
|
|
4364
|
+
...mt.entries().next().value?.[1],
|
|
4365
|
+
styles: ft,
|
|
4366
|
+
theme: dt.toJSON()
|
|
4367
|
+
}, gt = ((e, t, n, r) => {
|
|
4368
4368
|
let i = {}, a = (e, t) => {
|
|
4369
4369
|
if (e) for (let { key: n, value: r } of e) {
|
|
4370
4370
|
let e = t[n];
|
|
@@ -4386,15 +4386,15 @@ var Tr = {
|
|
|
4386
4386
|
}
|
|
4387
4387
|
return Object.keys(i).length > 0 ? i : void 0;
|
|
4388
4388
|
})(Oe.values().next().value?.properties, ke.values().next().value?.properties, je.values().next().value?.custom, (e, t) => {
|
|
4389
|
-
|
|
4389
|
+
re(e, "docProps/custom.xml", t);
|
|
4390
4390
|
});
|
|
4391
|
-
|
|
4391
|
+
gt && (W.properties = gt), ((e, t) => {
|
|
4392
4392
|
if (!t || t.size === 0) return;
|
|
4393
4393
|
let n = e.styles;
|
|
4394
4394
|
if (!n) return;
|
|
4395
4395
|
let r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
4396
4396
|
for (let n of e.sheets ?? []) {
|
|
4397
|
-
let e =
|
|
4397
|
+
let e = d(n);
|
|
4398
4398
|
if (!e) continue;
|
|
4399
4399
|
let a = /* @__PURE__ */ new Set();
|
|
4400
4400
|
jr(e.cols) || a.add(0);
|
|
@@ -4425,26 +4425,26 @@ var Tr = {
|
|
|
4425
4425
|
for (let e of r) e !== 0 && Mr(a[e] ?? (a[e] = {}), !0);
|
|
4426
4426
|
for (let e of i) e !== 0 && Mr(a[e] ?? (a[e] = {}), !1);
|
|
4427
4427
|
if (r.has(0)) {
|
|
4428
|
-
let e = n.named ??= [], t =
|
|
4428
|
+
let e = n.named ??= [], t = et.BuiltInName.Normal.toLowerCase(), r = e.find((e) => e.name?.toLowerCase() === t);
|
|
4429
4429
|
r || (r = {
|
|
4430
|
-
name:
|
|
4430
|
+
name: et.BuiltInName.Normal,
|
|
4431
4431
|
style: {}
|
|
4432
4432
|
}, e.push(r)), Mr(r.style, !0);
|
|
4433
4433
|
}
|
|
4434
|
-
})(
|
|
4434
|
+
})(W, w.get(kr)), ((e, t) => {
|
|
4435
4435
|
if (t && t.size !== 0) for (let n of e.sheets ?? []) {
|
|
4436
|
-
let e =
|
|
4436
|
+
let e = d(n), r = e?.pivotTables;
|
|
4437
4437
|
if (!e || !r || r.length === 0) continue;
|
|
4438
|
-
let i = r.map(
|
|
4438
|
+
let i = r.map(I), a = r.map(() => []);
|
|
4439
4439
|
for (let [n, r] of e.directStyles ?? []) {
|
|
4440
4440
|
if (!t.has(r)) continue;
|
|
4441
|
-
let e =
|
|
4441
|
+
let e = H.fastStringToRange(n);
|
|
4442
4442
|
for (let t = 0; t < i.length; t++) {
|
|
4443
4443
|
let n = i[t];
|
|
4444
4444
|
if (!n) continue;
|
|
4445
4445
|
let r = Math.max(e.rowStart, n.rowStart), o = Math.min(e.rowEnd, n.rowEnd), s = Math.max(e.colStart, n.colStart), c = Math.min(e.colEnd, n.colEnd);
|
|
4446
4446
|
if (r > o || s > c) continue;
|
|
4447
|
-
let l =
|
|
4447
|
+
let l = H.rangeToString({
|
|
4448
4448
|
rowStart: r - n.rowStart,
|
|
4449
4449
|
rowEnd: o - n.rowStart,
|
|
4450
4450
|
colStart: s - n.colStart,
|
|
@@ -4455,30 +4455,30 @@ var Tr = {
|
|
|
4455
4455
|
}
|
|
4456
4456
|
for (let e = 0; e < r.length; e++) a[e].length > 0 && (r[e].buttons = a[e]);
|
|
4457
4457
|
}
|
|
4458
|
-
})(
|
|
4459
|
-
let
|
|
4460
|
-
Pr(
|
|
4458
|
+
})(W, w.get(Nr));
|
|
4459
|
+
let vt = w.get(Gr);
|
|
4460
|
+
Pr(W, vt), ((e) => {
|
|
4461
4461
|
let t = {
|
|
4462
4462
|
colStart: 0,
|
|
4463
4463
|
rowStart: 0,
|
|
4464
|
-
colEnd:
|
|
4465
|
-
rowEnd:
|
|
4464
|
+
colEnd: F,
|
|
4465
|
+
rowEnd: ze
|
|
4466
4466
|
};
|
|
4467
4467
|
for (let n of e.sheets ?? []) {
|
|
4468
|
-
let e =
|
|
4468
|
+
let e = d(n);
|
|
4469
4469
|
if (!e) continue;
|
|
4470
4470
|
let r = [];
|
|
4471
4471
|
if (Jr(e.cols, !0, t, r), Jr(e.rows, !1, t, r), r.length === 0) continue;
|
|
4472
4472
|
let i = [];
|
|
4473
4473
|
for (let [t, n] of e.directStyles ?? []) i.push({
|
|
4474
|
-
...
|
|
4474
|
+
...H.fastStringToRange(t),
|
|
4475
4475
|
value: {
|
|
4476
4476
|
kind: 0,
|
|
4477
4477
|
index: n
|
|
4478
4478
|
}
|
|
4479
4479
|
});
|
|
4480
4480
|
i.push(...r);
|
|
4481
|
-
let a = [], o = new
|
|
4481
|
+
let a = [], o = new Ke.IteratorInstance(i, { axis: qe.Column });
|
|
4482
4482
|
for (let e = o.next(); !e.done; e = o.next()) {
|
|
4483
4483
|
let n = e.value.overlaps, r;
|
|
4484
4484
|
if (n.length === 1) {
|
|
@@ -4491,11 +4491,11 @@ var Tr = {
|
|
|
4491
4491
|
}
|
|
4492
4492
|
r = e ?? t ?? i;
|
|
4493
4493
|
}
|
|
4494
|
-
a.push([
|
|
4494
|
+
a.push([H.rangeToString(e.value.range, t), r.index]);
|
|
4495
4495
|
}
|
|
4496
4496
|
a.length > 0 ? e.directStyles = a : delete e.directStyles;
|
|
4497
4497
|
}
|
|
4498
|
-
})(
|
|
4498
|
+
})(W), vt && ((e, t, n) => {
|
|
4499
4499
|
if (!t || t.size === 0 || !n) return;
|
|
4500
4500
|
let r = (e) => {
|
|
4501
4501
|
if (e === void 0 || e === 0) return null;
|
|
@@ -4503,7 +4503,7 @@ var Tr = {
|
|
|
4503
4503
|
return r === void 0 ? null : n.controls[r] ?? null;
|
|
4504
4504
|
};
|
|
4505
4505
|
for (let t of e.sheets ?? []) {
|
|
4506
|
-
let e =
|
|
4506
|
+
let e = d(t);
|
|
4507
4507
|
if (!e) continue;
|
|
4508
4508
|
let n = /* @__PURE__ */ new Map();
|
|
4509
4509
|
for (let t of e.directStyles ?? []) {
|
|
@@ -4523,32 +4523,32 @@ var Tr = {
|
|
|
4523
4523
|
});
|
|
4524
4524
|
e.cellControls = i;
|
|
4525
4525
|
}
|
|
4526
|
-
})(
|
|
4526
|
+
})(W, vt, r("featurePropertyBag", t, e, E, T, R).values().next().value?.featurePropertyBag);
|
|
4527
4527
|
{
|
|
4528
4528
|
let n = /* @__PURE__ */ new Map();
|
|
4529
|
-
r("slicers", t, e,
|
|
4529
|
+
r("slicers", t, e, E, T, R).forEach((e, t) => {
|
|
4530
4530
|
e?.slicers && n.set(t, e.slicers);
|
|
4531
|
-
}),
|
|
4531
|
+
}), _t(W, {
|
|
4532
4532
|
warn: (e, t) => {
|
|
4533
|
-
|
|
4533
|
+
re(e, "xl/slicers", t);
|
|
4534
4534
|
},
|
|
4535
|
-
markAbsorbed:
|
|
4535
|
+
markAbsorbed: A,
|
|
4536
4536
|
slicerParts: n
|
|
4537
4537
|
});
|
|
4538
4538
|
}
|
|
4539
|
-
|
|
4540
|
-
...
|
|
4539
|
+
W.calc = {
|
|
4540
|
+
...W.calc ?? {},
|
|
4541
4541
|
legacyIntersect: !0
|
|
4542
|
-
},
|
|
4543
|
-
let
|
|
4544
|
-
|
|
4545
|
-
let
|
|
4546
|
-
if (
|
|
4547
|
-
let { VBAProject: e } = await import("./
|
|
4542
|
+
}, z.length > 0 && (W.strings = z);
|
|
4543
|
+
let yt = Me.toJSON();
|
|
4544
|
+
yt && yt.length > 0 && (W.people = yt);
|
|
4545
|
+
let bt = k.getEntry("xl/vbaProject.bin");
|
|
4546
|
+
if (bt) try {
|
|
4547
|
+
let { VBAProject: e } = await import("./D-8PUtpwA7w1Vztk.mjs"), t = e.extract(bt);
|
|
4548
4548
|
if (t) {
|
|
4549
4549
|
let n = /* @__PURE__ */ new Map();
|
|
4550
|
-
for (let e of
|
|
4551
|
-
let t =
|
|
4550
|
+
for (let e of W.sheets ?? []) {
|
|
4551
|
+
let t = d(e), r = t?.codeName;
|
|
4552
4552
|
r && n.set(r, t);
|
|
4553
4553
|
}
|
|
4554
4554
|
for (let r of t.modules) {
|
|
@@ -4556,37 +4556,37 @@ var Tr = {
|
|
|
4556
4556
|
a && (t.source = a), i && (t.sourceHeader = i);
|
|
4557
4557
|
let o = r.type === "document" ? n.get(r.name) : void 0;
|
|
4558
4558
|
o || r.type !== "document" || (t.scope = "workbook");
|
|
4559
|
-
let s = o ? o.modules ??= {} :
|
|
4559
|
+
let s = o ? o.modules ??= {} : W.modules ??= {};
|
|
4560
4560
|
s[r.name] || (s[r.name] = t);
|
|
4561
4561
|
}
|
|
4562
|
-
|
|
4563
|
-
} else
|
|
4562
|
+
c?.(t);
|
|
4563
|
+
} else y.push(["Unable to parse VBA project.", "xl/vbaProject.bin"]);
|
|
4564
4564
|
} catch (e) {
|
|
4565
|
-
|
|
4565
|
+
y.push([`Error extracting VBA: ${e?.message ?? e}`, "xl/vbaProject.bin"]);
|
|
4566
4566
|
}
|
|
4567
|
-
let
|
|
4568
|
-
...
|
|
4569
|
-
calcOnLoad:
|
|
4570
|
-
resources:
|
|
4571
|
-
json:
|
|
4567
|
+
let jt = w.get("calcId"), Mt = jt === void 0 || !(Number(jt) >= 191029), Nt = p.calcOnLoad ?? (f === "auto" && Mt ? "full" : f), Pt = {
|
|
4568
|
+
...p,
|
|
4569
|
+
calcOnLoad: Nt,
|
|
4570
|
+
resources: ee,
|
|
4571
|
+
json: W
|
|
4572
4572
|
};
|
|
4573
|
-
if (
|
|
4574
|
-
let e =
|
|
4575
|
-
|
|
4576
|
-
}
|
|
4577
|
-
|
|
4578
|
-
let
|
|
4579
|
-
if (
|
|
4580
|
-
e.deleteReference(
|
|
4581
|
-
}), ue.endPersist(),
|
|
4582
|
-
|
|
4573
|
+
if (Pt.disableLoadAutoFit === void 0) {
|
|
4574
|
+
let e = w.get(Ie);
|
|
4575
|
+
Pt.disableLoadAutoFit = !!e?.declared && e.normalIsThemeFont && await Te(e.faces);
|
|
4576
|
+
}
|
|
4577
|
+
_?.mark("json-assembled");
|
|
4578
|
+
let Ft = new ht(Pt);
|
|
4579
|
+
if (_?.mark("workbook-constructed"), me.forEach((e) => {
|
|
4580
|
+
e.deleteReference(S);
|
|
4581
|
+
}), ue.endPersist(), h) {
|
|
4582
|
+
v(Ft);
|
|
4583
4583
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
4584
|
-
for (let n of
|
|
4585
|
-
let r =
|
|
4584
|
+
for (let n of k.getNames()) {
|
|
4585
|
+
let r = k.getEntry(n);
|
|
4586
4586
|
if (!r) continue;
|
|
4587
|
-
let i =
|
|
4587
|
+
let i = k.getRawEntry(n), a = i ? {
|
|
4588
4588
|
data: r,
|
|
4589
|
-
uncompressedSize:
|
|
4589
|
+
uncompressedSize: k.uncompressedSize(n),
|
|
4590
4590
|
raw: {
|
|
4591
4591
|
compressedData: i.data,
|
|
4592
4592
|
compressionMethod: i.compressionMethod,
|
|
@@ -4594,39 +4594,39 @@ var Tr = {
|
|
|
4594
4594
|
}
|
|
4595
4595
|
} : {
|
|
4596
4596
|
data: r,
|
|
4597
|
-
uncompressedSize:
|
|
4597
|
+
uncompressedSize: k.uncompressedSize(n)
|
|
4598
4598
|
};
|
|
4599
4599
|
e.set(n, a), t += r.byteLength;
|
|
4600
4600
|
}
|
|
4601
|
-
if (t > 67108864)
|
|
4601
|
+
if (t > 67108864) y.push([`Source package too large to retain (${t} bytes, limit ${i}); unmodeled parts will be dropped on save.`, "SourcePackage"]);
|
|
4602
4602
|
else if (e.size > 0) {
|
|
4603
|
-
let t = new
|
|
4604
|
-
b(
|
|
4605
|
-
let n =
|
|
4603
|
+
let t = new N(e, ye);
|
|
4604
|
+
b(Ft, t);
|
|
4605
|
+
let n = Ft.getWorksheets().getItems(), r = Ft.getTransactions().addListener({ onCommitEnd: (e) => {
|
|
4606
4606
|
let n = e.getOperation()?.name;
|
|
4607
4607
|
n !== "insertCells" && n !== "deleteCells" || t.markStructuralChange();
|
|
4608
|
-
} }), i =
|
|
4609
|
-
let e =
|
|
4608
|
+
} }), i = Ft.addListeners({ onSheetsChange: () => {
|
|
4609
|
+
let e = Ft.getWorksheets().getItems();
|
|
4610
4610
|
(e.length !== n.length || e.some((e, t) => e !== n[t])) && t.markStructuralChange(), n = e;
|
|
4611
4611
|
} });
|
|
4612
|
-
|
|
4613
|
-
r(), i(),
|
|
4612
|
+
Ft.addListeners({ onClose: () => {
|
|
4613
|
+
r(), i(), v(Ft);
|
|
4614
4614
|
} });
|
|
4615
4615
|
}
|
|
4616
4616
|
}
|
|
4617
|
-
if (
|
|
4617
|
+
if (y.length && oe?.onWarning) {
|
|
4618
4618
|
let e = /* @__PURE__ */ new Set();
|
|
4619
|
-
for (let t of
|
|
4619
|
+
for (let t of y) {
|
|
4620
4620
|
let [n, r, i] = t, a = i ?? n;
|
|
4621
|
-
e.has(a) || (e.add(a),
|
|
4621
|
+
e.has(a) || (e.add(a), oe.onWarning(n, r));
|
|
4622
4622
|
}
|
|
4623
4623
|
}
|
|
4624
|
-
return
|
|
4624
|
+
return _ && !0 === l && console.table(_.toTable()), await Ft.whenFontsReady(), Ft;
|
|
4625
4625
|
} catch (e) {
|
|
4626
4626
|
let t = "Unable to parse XLSX.";
|
|
4627
|
-
throw e instanceof
|
|
4627
|
+
throw e instanceof st && (t = "Unable to open XLSX. There are too many rows or columns."), Error(t, { cause: e });
|
|
4628
4628
|
} finally {
|
|
4629
|
-
await
|
|
4629
|
+
await k.close().catch(() => {});
|
|
4630
4630
|
}
|
|
4631
4631
|
};
|
|
4632
4632
|
export { dr as a, kr as i, Gr as n, Nr as r, ti as readXLSX, Xr as t };
|