@sheetxl/io-xlsx 0.8.0-beta.20 → 0.8.0-beta.21
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/{D2872f7aTugYxhht.mjs → BCQs67LTVZ1xG82R.mjs} +2 -2
- package/browser/esm/{CSOuRlSN9bhykqDr.mjs → B_Jfq-O7tght6ixL.mjs} +683 -679
- package/browser/esm/{C16bEh6IrUpJONhS.mjs → BoTT_U96McOdkuId.mjs} +2 -2
- package/browser/esm/{S4Uq85YdUb6O5Pz0.mjs → CGQXv_OxqwXL3F8q.mjs} +1 -1
- package/browser/esm/{D8CQKL3Y3CMFOPqD.mjs → CNAv3IL7hhyvzLaF.mjs} +300 -296
- package/browser/esm/{DpPFQ7-tBwVyjvWr.mjs → CROAqUhKnVtkbBSm.mjs} +1 -1
- package/browser/esm/{CPK1-z95jtLOfCXG.mjs → D74i1p_CJmHw8HKb.mjs} +2 -2
- package/browser/esm/{Bw35-W8cnzxxvqQy.mjs → DPz0IeW70Nh4n8Wz.mjs} +4 -4
- package/browser/esm/{D7ogsrtXfjU5NW7r.mjs → D_5T8KKyirVCR3RO.mjs} +2 -2
- package/browser/esm/{RFSuXvJ9sgsaA2LC.mjs → cG4z0eDMlE49HJvD.mjs} +4 -4
- package/browser/esm/{PgUWs0pPSCSFYJtU.mjs → f-Z5vnvNnzj-0ujR.mjs} +2 -2
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{CPhiu1T7tl-leKh2.mjs → Bl5eH7YPk64NxkkI.mjs} +2 -2
- package/node/esm/{BOAucs-qLpjtUOcZ.mjs → C0q_ulF7hl9zoVQ8.mjs} +1 -1
- package/node/esm/{D2vDZOgLcv-YiWnB.mjs → CT1rO7_YWIvsG9hs.mjs} +272 -268
- package/node/esm/{C6eSWtTkyDQKbQdT.mjs → CUPNuRm5G47rulaW.mjs} +2 -2
- package/node/esm/{BSHqfcsR9hY-JB30.mjs → CoNllGglhnzJ6EJ4.mjs} +1 -1
- package/node/esm/{Qn2Bv4QG3mOLiJHh.mjs → CqhoZ8-FRZjS3p-D.mjs} +445 -441
- package/node/esm/{DGuQIj077oygCTGu.mjs → TN8KqnRPY-7Ln4Ez.mjs} +2 -2
- package/node/esm/{DFw0ibBUmPyd-wey.mjs → ZNTwnevSmMslvfiW.mjs} +4 -4
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.21
|
|
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, C as a, Cr as o, Ct as s, E as c, Er as l, Gt as u, In as d, Ir as f, It as p, Ln as m, Lt as h, Nn as g, Nr as _, Nt as v, Or as y, Pn as b, Qn as ee, Rn as te, Rr as x, Rt as
|
|
9
|
-
import { BufferUtils as
|
|
10
|
-
import { AddressUtils as
|
|
11
|
-
var
|
|
7
|
+
import { n as e, r as t } from "./CROAqUhKnVtkbBSm.mjs";
|
|
8
|
+
import { $ as n, $n as r, An as i, C as a, Cr as o, Ct as s, E as c, Er as l, Gt as u, In as d, Ir as f, It as p, Ln as m, Lt as h, Nn as g, Nr as _, Nt as v, Or as y, Pn as b, Qn as ee, Rn as te, Rr as x, Rt as S, St as ne, T as re, Tt as C, Ur as w, Ut as ie, Vn as ae, Wr as oe, Wt as T, Xn as E, Yn as se, Z as ce, Zn as le, _ as ue, _r as de, _t as fe, ar as pe, br as D, cr as O, ct as k, dn as A, dr as j, er as me, f as he, fn as M, fr as ge, ft as _e, gr as N, ht as P, in as F, ir as I, it as L, jn as ve, jt as ye, lt as be, mn as xe, mt as Se, n as Ce, nn as we, nr as R, nt as Te, o as Ee, or as De, ot as Oe, p as ke, pr as Ae, pt as je, qn as Me, rn as Ne, sr as Pe, t as Fe, tn as Ie, tr as z, ut as Le, vt as Re, wt as B, xr as ze, xt as Be, yn as V, yr as Ve, zr as He } from "./D_5T8KKyirVCR3RO.mjs";
|
|
9
|
+
import { BufferUtils as H, CommonUtils as Ue, ExpectedError as We, OverlappingRange as Ge, RangeAxis as Ke } from "@sheetxl/utils";
|
|
10
|
+
import { AddressUtils as U, BufferUtils as qe, CommonUtils as Je, CoordUtils as Ye, FormulaError as Xe, FormulaText as Ze, FunctionDeclarations as Qe, ICellStyle as $e, ICondition as et, IConditionalFormat as tt, ICustomProperty as W, IFont as nt, IRange as rt, ITextFrame as it, NumberFormat as at, OutOfBoundsError as ot, PersonCollection as st, ResourceCollection as ct, RichDataRegistry as lt, Scalar as ut, Sort as dt, Theme as ft, Tuple as pt, Workbook as mt, pivotCellFormatsOf as G } from "@sheetxl/sdk";
|
|
11
|
+
var ht = {
|
|
12
12
|
ascending: "ascending",
|
|
13
13
|
descending: "descending",
|
|
14
14
|
natural: "dataSource"
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function gt(e, t) {
|
|
17
17
|
let n = e.sheets ?? [], r = /* @__PURE__ */ new Map();
|
|
18
18
|
for (let e = 0; e < n.length; e++) {
|
|
19
19
|
let t = n[e], i = _(t)?.tables ?? [];
|
|
@@ -56,11 +56,11 @@ function _t(e, t) {
|
|
|
56
56
|
if (!u) continue;
|
|
57
57
|
if (!u.tableId) {
|
|
58
58
|
if (u.pivotBody === void 0) continue;
|
|
59
|
-
n.json =
|
|
59
|
+
n.json = yt(u, n.json), n.json.pivot = vt(u, i, a, o, s), c.add(l), u.cachePath && t.markAbsorbed(u.cachePath);
|
|
60
60
|
continue;
|
|
61
61
|
}
|
|
62
|
-
let p = r.get(String(u.tableId)), m = p ?
|
|
63
|
-
p && m ? (n.json =
|
|
62
|
+
let p = r.get(String(u.tableId)), m = p ? _t(p.columns, u.columnId) : null;
|
|
63
|
+
p && m ? (n.json = yt(u, n.json, Ze.structuredReference(p.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"), f.splice(e, 1));
|
|
64
64
|
}
|
|
65
65
|
delete u.slicers;
|
|
66
66
|
}
|
|
@@ -69,13 +69,13 @@ function _t(e, t) {
|
|
|
69
69
|
r.length > 0 && r.every((e) => c.has(e)) && t.markAbsorbed(n);
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function _t(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 vt(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 yt(e, t, n, r, i) {
|
|
|
98
98
|
body: e.timelineBody ?? ""
|
|
99
99
|
}), s;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function yt(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 ? ht[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 bt = "xl/richData/rdrichvaluestructure.xml", xt = "xl/richData/rdrichvalue.xml", St = "xl/richData/rdarray.xml", Ct = "xl/richData/rdsupportingpropertybagstructure.xml", wt = "xl/richData/rdsupportingpropertybag.xml", Tt = "xl/richData/rdRichValueTypes.xml", Et = "xl/richData/richStyles.xml", K = (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
|
+
}, Dt = (e) => K(e, "k").map((e) => [e.getAttribute("n") ?? "", e.getAttribute("t") || null]), Ot = (e) => K(e, "v").map((e) => ({
|
|
119
119
|
t: e.getAttribute("t") || null,
|
|
120
120
|
text: e.textContent ?? ""
|
|
121
|
-
})),
|
|
121
|
+
})), kt = (e) => {
|
|
122
122
|
let t = /* @__PURE__ */ new Map();
|
|
123
|
-
for (let n of
|
|
123
|
+
for (let n of K(e, "key")) {
|
|
124
124
|
let e = /* @__PURE__ */ new Map();
|
|
125
|
-
for (let t of
|
|
125
|
+
for (let t of K(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
|
+
}, At = /* @__PURE__ */ new Uint8Array(), jt = 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 xt = "xl/richData/rdrichvaluestructure.xml", St = "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 ? At : t instanceof Uint8Array ? t : new Uint8Array(t), r = t instanceof Blob ? new He(t) : new w(n), i = new x(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 xt = "xl/richData/rdrichvaluestructure.xml", St = "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 oe());
|
|
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 oe()).then((e) => {
|
|
161
161
|
this.buffers.set(n, e);
|
|
162
162
|
}));
|
|
163
163
|
await Promise.all(t);
|
|
@@ -200,18 +200,18 @@ var xt = "xl/richData/rdrichvaluestructure.xml", St = "xl/richData/rdrichvalue.x
|
|
|
200
200
|
async close() {
|
|
201
201
|
await this.zip.close();
|
|
202
202
|
}
|
|
203
|
-
},
|
|
203
|
+
}, Mt = class {
|
|
204
204
|
constructor(e) {
|
|
205
|
-
this._sink = e, this._samples = [], this._t0 =
|
|
205
|
+
this._sink = e, this._samples = [], this._t0 = Nt(), this._tPrev = this._t0, this._heapPrev = Pt();
|
|
206
206
|
}
|
|
207
207
|
mark(e) {
|
|
208
|
-
let t =
|
|
208
|
+
let t = Nt(), n = Pt(), 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: Ft()
|
|
215
215
|
};
|
|
216
216
|
this._tPrev = t, this._heapPrev = n, this._samples.push(r), this._sink?.(r);
|
|
217
217
|
}
|
|
@@ -223,51 +223,51 @@ var xt = "xl/richData/rdrichvaluestructure.xml", St = "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 ? "—" : It(e.heapBytes / 1048576),
|
|
227
|
+
dHeapMB: e.dHeapBytes === void 0 ? "—" : It(e.dHeapBytes / 1048576),
|
|
228
|
+
rssMB: e.rssBytes === void 0 ? "—" : It(e.rssBytes / 1048576)
|
|
229
229
|
}));
|
|
230
230
|
}
|
|
231
|
-
},
|
|
232
|
-
function
|
|
231
|
+
}, Nt = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
232
|
+
function Pt() {
|
|
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 Ft() {
|
|
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 It(e) {
|
|
243
243
|
return Math.round(10 * e) / 10;
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var Lt = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Rt = `-${Lt}.0-9·̀-ͯ‿-⁀`, zt = (RegExp(`^[${Lt}]$`, "u"), RegExp(`^[${Rt}]$`, "u"), RegExp(`^[${Lt}][${Rt}]*$`, "u")), Bt = (RegExp(`^[${Rt}]+$`, "u"), [
|
|
246
246
|
32,
|
|
247
247
|
10,
|
|
248
248
|
13,
|
|
249
249
|
9
|
|
250
250
|
]);
|
|
251
|
-
function
|
|
251
|
+
function Vt(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 Ht = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Ut = `-${Ht}.0-9·̀-ͯ‿-⁀`;
|
|
255
|
+
RegExp(`^[${Ht}]$`, "u"), RegExp(`^[${Ut}]$`, "u"), RegExp(`^[${Ht}][${Ut}]*$`, "u"), RegExp(`^[${Ut}]+$`, "u");
|
|
256
|
+
var Wt = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Gt = `-${Wt}.0-9·̀-ͯ‿-⁀`, Kt = (RegExp(`^[${Wt}]$`, "u"), RegExp(`^[${Gt}]$`, "u"), RegExp(`^[${Wt}][${Gt}]*$`, "u"));
|
|
257
|
+
function qt(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 Jt = 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
|
-
}, Xt =
|
|
265
|
-
return
|
|
266
|
-
}, Qt =
|
|
264
|
+
}, Xt = Vt, Zt = function(e) {
|
|
265
|
+
return Vt(e) || e >= 48 && e <= 57 || e === 45 || e === 46 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
266
|
+
}, Qt = Bt, $t = zt, en = function(e) {
|
|
267
267
|
return e >= 1 && e <= 55295 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
268
|
-
}, tn =
|
|
269
|
-
return
|
|
270
|
-
}, rn =
|
|
268
|
+
}, tn = qt, nn = function(e) {
|
|
269
|
+
return qt(e) || e === 45 || e === 46 || e >= 48 && e <= 57 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
270
|
+
}, rn = Kt, an = "http://www.w3.org/XML/1998/namespace", on = "http://www.w3.org/2000/xmlns/", sn = {
|
|
271
271
|
__proto__: null,
|
|
272
272
|
xml: an,
|
|
273
273
|
xmlns: on
|
|
@@ -520,7 +520,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
520
520
|
skipSpaces() {
|
|
521
521
|
for (;;) {
|
|
522
522
|
let e = this.getCodeNorm();
|
|
523
|
-
if (e === q || !
|
|
523
|
+
if (e === q || !Jt(e)) return e;
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
setXMLVersion(e) {
|
|
@@ -676,7 +676,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.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 || Jt(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;
|
|
@@ -686,7 +686,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
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 || Jt(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) => rn.test(e), wn = (e) => $t.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 : Jt(e) || (this.text = String.fromCodePoint(e));
|
|
698
698
|
} else this.captureToChar(X) && (this.state = 26);
|
|
699
699
|
}
|
|
700
700
|
sPIEnding() {
|
|
@@ -715,7 +715,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
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 (Jt(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,12 +731,12 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.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
|
+
Jt(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
|
+
Jt(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]);
|
|
@@ -759,7 +759,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.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 : (Jt(e) || (this.fail("whitespace required."), this.unGet()), this.state = 27);
|
|
763
763
|
}
|
|
764
764
|
sXMLDeclEnding() {
|
|
765
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;
|
|
@@ -778,7 +778,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
778
778
|
case 47:
|
|
779
779
|
this.state = 35;
|
|
780
780
|
break;
|
|
781
|
-
default:
|
|
781
|
+
default: Jt(e) || this.fail("disallowed character in tag name."), this.state = 36;
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
sOpenTagSlash() {
|
|
@@ -790,7 +790,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
790
790
|
}
|
|
791
791
|
sAttribName() {
|
|
792
792
|
let e = this.captureNameChars();
|
|
793
|
-
e === pn ? this.state = 39 :
|
|
793
|
+
e === pn ? this.state = 39 : Jt(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();
|
|
@@ -804,7 +804,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
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) : Jt(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;
|
|
@@ -830,7 +830,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
830
830
|
}
|
|
831
831
|
sAttribValueClosed() {
|
|
832
832
|
let e = this.getCodeNorm();
|
|
833
|
-
|
|
833
|
+
Jt(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);
|
|
@@ -847,7 +847,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
847
847
|
}
|
|
848
848
|
sCloseTag() {
|
|
849
849
|
let e = this.captureNameChars();
|
|
850
|
-
e === Y ? this.closeTag() :
|
|
850
|
+
e === Y ? this.closeTag() : Jt(e) ? this.state = 44 : e !== q && this.fail("disallowed character in closing tag.");
|
|
851
851
|
}
|
|
852
852
|
sCloseTagSawWhite() {
|
|
853
853
|
switch (this.skipSpaces()) {
|
|
@@ -916,7 +916,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
916
916
|
case q:
|
|
917
917
|
n !== void 0 && (this.text += t.slice(e));
|
|
918
918
|
break t;
|
|
919
|
-
default:
|
|
919
|
+
default: Jt(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));
|
|
@@ -1406,7 +1406,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1406
1406
|
onEnd: t
|
|
1407
1407
|
};
|
|
1408
1408
|
}
|
|
1409
|
-
}, Rn = `IFERROR(${
|
|
1409
|
+
}, Rn = `IFERROR(${S}(`, zn = Rn.toUpperCase(), Bn = h.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) => [U.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 = U.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) => U.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) ? nt.Style.Italic : nt.Style.Normal;
|
|
1543
1543
|
break;
|
|
1544
1544
|
case "strike":
|
|
1545
|
-
n.strike =
|
|
1545
|
+
n.strike = B(ar(t));
|
|
1546
1546
|
break;
|
|
1547
1547
|
case "outline":
|
|
1548
1548
|
n.outline = ar(t);
|
|
@@ -1557,10 +1557,10 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1557
1557
|
break;
|
|
1558
1558
|
}
|
|
1559
1559
|
case "u":
|
|
1560
|
-
n.underline =
|
|
1560
|
+
n.underline = C(t.val);
|
|
1561
1561
|
break;
|
|
1562
1562
|
case "vertAlign": {
|
|
1563
|
-
let e =
|
|
1563
|
+
let e = Be(t.val);
|
|
1564
1564
|
e !== void 0 && (n.baseline = e);
|
|
1565
1565
|
break;
|
|
1566
1566
|
}
|
|
@@ -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
|
+
ne(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 = me((e) => t[e]);
|
|
1597
1597
|
r && (n.color = r);
|
|
1598
1598
|
break;
|
|
1599
1599
|
}
|
|
@@ -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: nt.Style.Normal,
|
|
1630
|
+
underline: nt.UnderlineStyle.None,
|
|
1631
|
+
strike: nt.StrikeStyle.None,
|
|
1632
1632
|
baseline: 0
|
|
1633
1633
|
}, r = Array(e.length);
|
|
1634
1634
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -1674,12 +1674,12 @@ var ir = {
|
|
|
1674
1674
|
let d = new Ln(), p = (e) => {
|
|
1675
1675
|
let t = e.getAttribute("dxfId", Q);
|
|
1676
1676
|
return t === null ? void 0 : i?.get(t) || (s?.(`A color filter or sort names a format that does not exist (dxfId '${t}').`), {});
|
|
1677
|
-
}, m = !1, h = l?.get("parseInlineDxf"), g = l?.get(sr), _ = (e) => g && e ? g.readDetached(e) : e, y = new
|
|
1677
|
+
}, m = !1, h = l?.get("parseInlineDxf"), g = l?.get(sr), _ = (e) => g && e ? g.readDetached(e) : e, y = new pt.TransposedBuilder(), b = null, ee = "topLeft";
|
|
1678
1678
|
d.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 = U.fastStringToRange(t);
|
|
1683
1683
|
e.getSource().r = n, e.getSource().v = {};
|
|
1684
1684
|
},
|
|
1685
1685
|
closeTag: (e) => {
|
|
@@ -1727,11 +1727,14 @@ 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 = k(r, s);
|
|
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
|
-
let te = (e) => {
|
|
1734
|
+
let te = (e, t) => {
|
|
1735
|
+
let n = t.minLength ?? 10, r = t.maxLength ?? 90;
|
|
1736
|
+
n === 0 ? delete e.minLength : e.minLength = n, r === 100 ? delete e.maxLength : e.maxLength = r;
|
|
1737
|
+
}, x = (e) => {
|
|
1735
1738
|
let t = e.conditions ?? [], n = [];
|
|
1736
1739
|
for (let e = 0; e < t.length; e++) {
|
|
1737
1740
|
let r = t[e], i = {};
|
|
@@ -1744,10 +1747,10 @@ var ir = {
|
|
|
1744
1747
|
to: {},
|
|
1745
1748
|
openTag: (e) => {},
|
|
1746
1749
|
closeTag: (e) => {
|
|
1747
|
-
let t = e.getSource(), n = t.colors ?? [], r =
|
|
1750
|
+
let t = e.getSource(), n = t.colors ?? [], r = x(t);
|
|
1748
1751
|
for (let e = 0; e < r.length; e++) r[e].color = n[e];
|
|
1749
1752
|
e.getParent().scale = {
|
|
1750
|
-
type:
|
|
1753
|
+
type: tt.ScaleType.ColorScale,
|
|
1751
1754
|
stops: r
|
|
1752
1755
|
};
|
|
1753
1756
|
}
|
|
@@ -1759,10 +1762,11 @@ var ir = {
|
|
|
1759
1762
|
},
|
|
1760
1763
|
closeTag: (e) => {
|
|
1761
1764
|
let t = e.getSource(), n = {
|
|
1762
|
-
type:
|
|
1763
|
-
stops:
|
|
1765
|
+
type: tt.ScaleType.DataBar,
|
|
1766
|
+
stops: x(t),
|
|
1767
|
+
gradient: !0
|
|
1764
1768
|
}, r = t.colors?.[0];
|
|
1765
|
-
r && (n.color = r),
|
|
1769
|
+
r && (n.color = r), te(n, t), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1766
1770
|
}
|
|
1767
1771
|
}), d.registerVisitor({
|
|
1768
1772
|
from: "iconSet",
|
|
@@ -1772,8 +1776,8 @@ var ir = {
|
|
|
1772
1776
|
},
|
|
1773
1777
|
closeTag: (e) => {
|
|
1774
1778
|
let t = e.getSource(), n = {
|
|
1775
|
-
type:
|
|
1776
|
-
stops:
|
|
1779
|
+
type: tt.ScaleType.IconSet,
|
|
1780
|
+
stops: x(t)
|
|
1777
1781
|
};
|
|
1778
1782
|
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;
|
|
1779
1783
|
}
|
|
@@ -1791,7 +1795,7 @@ var ir = {
|
|
|
1791
1795
|
let t = e.getParent();
|
|
1792
1796
|
t.conditions ||= [];
|
|
1793
1797
|
let n = e.getSource();
|
|
1794
|
-
if (t.conditions.push(n), e.copyTo("type", $), n.type ===
|
|
1798
|
+
if (t.conditions.push(n), e.copyTo("type", $), n.type === tt.ColorStopType.Formula) {
|
|
1795
1799
|
let t = e.getAttribute("val");
|
|
1796
1800
|
t != null && (n.value = _(String(t)));
|
|
1797
1801
|
} else e.copyTo("value", Pn, "val");
|
|
@@ -1803,7 +1807,7 @@ var ir = {
|
|
|
1803
1807
|
openTag: (e) => {
|
|
1804
1808
|
let t = e.getParent();
|
|
1805
1809
|
t.colors ||= [];
|
|
1806
|
-
let n =
|
|
1810
|
+
let n = me((t) => e.getAttribute(t));
|
|
1807
1811
|
t.colors.push(n);
|
|
1808
1812
|
}
|
|
1809
1813
|
}), d.registerVisitor({
|
|
@@ -1829,7 +1833,7 @@ var ir = {
|
|
|
1829
1833
|
from: "colorFilter",
|
|
1830
1834
|
openTag: (e) => {
|
|
1831
1835
|
let t = e.getParent(), n = {};
|
|
1832
|
-
t.operator =
|
|
1836
|
+
t.operator = et.BuiltInOperatorNames.Color, t.param = n, e.copyToObject(n, "cellColor", Z);
|
|
1833
1837
|
let r = p(e);
|
|
1834
1838
|
r && (n.style = r);
|
|
1835
1839
|
}
|
|
@@ -1837,30 +1841,30 @@ var ir = {
|
|
|
1837
1841
|
from: "iconFilter",
|
|
1838
1842
|
openTag: (e) => {
|
|
1839
1843
|
let t = e.getParent(), n = {};
|
|
1840
|
-
t.operator =
|
|
1844
|
+
t.operator = et.BuiltInOperatorNames.Icon, t.param = n, e.copyToObject(n, "iconId", Q), e.copyToObject(n, "iconSet", $);
|
|
1841
1845
|
}
|
|
1842
1846
|
}), d.registerVisitor({
|
|
1843
1847
|
from: "top10",
|
|
1844
1848
|
openTag: (e) => {
|
|
1845
1849
|
let t = e.getParent(), n = {};
|
|
1846
|
-
t.operator =
|
|
1850
|
+
t.operator = et.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");
|
|
1847
1851
|
}
|
|
1848
1852
|
}), d.registerVisitor({
|
|
1849
1853
|
from: "dynamicFilter",
|
|
1850
1854
|
openTag: (e) => {
|
|
1851
|
-
let t = e.getParent(), n =
|
|
1855
|
+
let t = e.getParent(), n = A(e.getAttribute("type"), e.getAttribute("val"), e.getAttribute("maxVal"));
|
|
1852
1856
|
t.operator = n.operator, t.param = n.param;
|
|
1853
1857
|
}
|
|
1854
1858
|
});
|
|
1855
|
-
let
|
|
1859
|
+
let S = {
|
|
1856
1860
|
from: "filters",
|
|
1857
1861
|
to: {},
|
|
1858
1862
|
openTag: (e) => {
|
|
1859
1863
|
let t = e.getParent(), n = {};
|
|
1860
|
-
return t.selector =
|
|
1864
|
+
return t.selector = et.BuiltInSelectorNames.Display, t.operator = et.BuiltInOperatorNames.InSet, t.param = n, e.copyToObject(n, "blank", Z), e.copyToObject(n, "calendarType", $), n;
|
|
1861
1865
|
}
|
|
1862
1866
|
};
|
|
1863
|
-
d.registerVisitor(
|
|
1867
|
+
d.registerVisitor(S);
|
|
1864
1868
|
let ne = {
|
|
1865
1869
|
from: "filter",
|
|
1866
1870
|
openTag: (e) => {
|
|
@@ -1878,20 +1882,20 @@ var ir = {
|
|
|
1878
1882
|
}
|
|
1879
1883
|
};
|
|
1880
1884
|
d.registerVisitor(re);
|
|
1881
|
-
let
|
|
1882
|
-
|
|
1885
|
+
let C = /* @__PURE__ */ new Map();
|
|
1886
|
+
C.set("filterColumn", {
|
|
1883
1887
|
from: "filterColumn",
|
|
1884
1888
|
transparent: !0
|
|
1885
|
-
}),
|
|
1889
|
+
}), C.set("filters", S), C.set("filter", ne), C.set("dateGroupItem", re), d.registerVisitor({
|
|
1886
1890
|
from: "customFilters",
|
|
1887
1891
|
openTag: (e) => {
|
|
1888
1892
|
let t = e.getParent(), n = e.getAttribute("and"), r = n === "and" || n === "1", i = [];
|
|
1889
|
-
return t.operator = r ?
|
|
1893
|
+
return t.operator = r ? et.BuiltInOperatorNames.And : et.BuiltInOperatorNames.Or, t.param = i, e.setSource(t), i;
|
|
1890
1894
|
},
|
|
1891
1895
|
closeTag: (e) => {
|
|
1892
1896
|
let t = e.getSource(), n = t?.param;
|
|
1893
1897
|
if (!t || !n) return;
|
|
1894
|
-
let r = n.length === 1 ? n[0] :
|
|
1898
|
+
let r = n.length === 1 ? n[0] : M(t);
|
|
1895
1899
|
r !== t && (t.operator = r.operator, t.param = r.param);
|
|
1896
1900
|
}
|
|
1897
1901
|
}), d.registerVisitor({
|
|
@@ -1899,14 +1903,14 @@ var ir = {
|
|
|
1899
1903
|
openTag: (e) => {
|
|
1900
1904
|
let t = e.getParent(), n;
|
|
1901
1905
|
Array.isArray(t) ? (n = {}, t.push(n)) : n = t;
|
|
1902
|
-
let r =
|
|
1906
|
+
let r = V({
|
|
1903
1907
|
operator: e.getAttribute("operator"),
|
|
1904
1908
|
val: e.getAttribute("val")
|
|
1905
1909
|
}, (t) => e.warn(t));
|
|
1906
1910
|
r && (n.operator = r.operator, n.param = r.param);
|
|
1907
1911
|
}
|
|
1908
1912
|
});
|
|
1909
|
-
let
|
|
1913
|
+
let w = {}, ae = null;
|
|
1910
1914
|
d.registerVisitor({
|
|
1911
1915
|
from: "sortState",
|
|
1912
1916
|
to: {},
|
|
@@ -1914,16 +1918,16 @@ var ir = {
|
|
|
1914
1918
|
let t = e.getParent(), n = t.v;
|
|
1915
1919
|
if (!n) return;
|
|
1916
1920
|
let r = {};
|
|
1917
|
-
|
|
1921
|
+
w = {};
|
|
1918
1922
|
let i = e.getAttribute("caseSensitive", Z);
|
|
1919
|
-
i != null && (
|
|
1923
|
+
i != null && (w.collatorOptions = i ? dt.CaseSensitiveOptions : dt.CaseInsensitiveOptions);
|
|
1920
1924
|
let a = e.getAttribute("sortMethod");
|
|
1921
|
-
a !== "stroke" && a !== "pinYin" || (
|
|
1922
|
-
...
|
|
1925
|
+
a !== "stroke" && a !== "pinYin" || (w.collatorOptions = {
|
|
1926
|
+
...w.collatorOptions,
|
|
1923
1927
|
collation: a === "stroke" ? "stroke" : "pinyin"
|
|
1924
|
-
}), e.getAttribute("columnSort", Z) && (r.axis =
|
|
1928
|
+
}), e.getAttribute("columnSort", Z) && (r.axis = rt.Axis.Column);
|
|
1925
1929
|
let o = e.getAttribute("ref"), s = t.r;
|
|
1926
|
-
|
|
1930
|
+
ae = o && s ? U.fastStringToRange(o) : null, ae && (r.extent = { range: v(s, ae) }), n.sort = r, e.setSource(t);
|
|
1927
1931
|
}
|
|
1928
1932
|
}), d.registerVisitor({
|
|
1929
1933
|
from: "sortCondition",
|
|
@@ -1937,11 +1941,11 @@ var ir = {
|
|
|
1937
1941
|
i || (i = [], r.sorts = i);
|
|
1938
1942
|
let a = e.getAttribute("ref"), o = 0, s = null;
|
|
1939
1943
|
if (a) {
|
|
1940
|
-
let e =
|
|
1941
|
-
o = r ? n - i : n, r &&
|
|
1944
|
+
let e = U.fastStringToRange(a, gr), n = e.colStart, r = t.r, i = r.colStart;
|
|
1945
|
+
o = r ? n - i : n, r && ae && (s = ye(r, ae, e));
|
|
1942
1946
|
}
|
|
1943
1947
|
r.extent && (r.extent.sorts ??= []).push(s);
|
|
1944
|
-
let c = { ...
|
|
1948
|
+
let c = { ...w }, l = xe(e.getAttribute("sortBy"));
|
|
1945
1949
|
l && (c.sortOn = l);
|
|
1946
1950
|
let u = p(e);
|
|
1947
1951
|
u && (c.style = u), e.copyToObject(c, "iconSet", $), e.copyToObject(c, "customList", $), c.reverse = e.getAttribute("descending", Z) ?? !1;
|
|
@@ -1954,10 +1958,10 @@ var ir = {
|
|
|
1954
1958
|
});
|
|
1955
1959
|
let oe = (e) => {
|
|
1956
1960
|
b = e.getSource(), ee = "topLeft", e.copyTo("topLeft", $, "topLeftCell");
|
|
1957
|
-
let t =
|
|
1961
|
+
let t = ie(e.getAttribute("defaultGridColor")), n = e.getAttribute("colorId");
|
|
1958
1962
|
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");
|
|
1959
1963
|
let r = {};
|
|
1960
|
-
for (let [t, n] of
|
|
1964
|
+
for (let [t, n] of P) {
|
|
1961
1965
|
let i = e.getAttribute(n, Q);
|
|
1962
1966
|
i && (r[t] = Math.min(400, Math.max(10, i)));
|
|
1963
1967
|
}
|
|
@@ -1982,10 +1986,10 @@ var ir = {
|
|
|
1982
1986
|
from: "customSheetView",
|
|
1983
1987
|
to: [],
|
|
1984
1988
|
openTag: (e) => {
|
|
1985
|
-
|
|
1989
|
+
T = !0, oe(e);
|
|
1986
1990
|
},
|
|
1987
1991
|
closeTag: () => {
|
|
1988
|
-
|
|
1992
|
+
T = !1, b = null;
|
|
1989
1993
|
}
|
|
1990
1994
|
}), d.registerVisitor({
|
|
1991
1995
|
from: "selection",
|
|
@@ -2016,7 +2020,7 @@ var ir = {
|
|
|
2016
2020
|
if (t === "frozen" || t === "frozenSplit") {
|
|
2017
2021
|
let t = {};
|
|
2018
2022
|
b.freezePanes = t, e.copyToObject(t, "topLeft", $, "topLeftCell");
|
|
2019
|
-
let n = (b.topLeft ?
|
|
2023
|
+
let n = (b.topLeft ? U.fastStringToCell(b.topLeft) : void 0) ?? {
|
|
2020
2024
|
colIndex: 0,
|
|
2021
2025
|
rowIndex: 0
|
|
2022
2026
|
}, r = {
|
|
@@ -2028,7 +2032,7 @@ var ir = {
|
|
|
2028
2032
|
colIndex: n.colIndex + r.colIndex,
|
|
2029
2033
|
rowIndex: n.rowIndex + r.rowIndex
|
|
2030
2034
|
};
|
|
2031
|
-
t.coords =
|
|
2035
|
+
t.coords = U.cellToString(i);
|
|
2032
2036
|
}
|
|
2033
2037
|
}
|
|
2034
2038
|
}), d.registerVisitor({
|
|
@@ -2046,16 +2050,16 @@ var ir = {
|
|
|
2046
2050
|
from: "tabColor",
|
|
2047
2051
|
to: null,
|
|
2048
2052
|
openTag: (t) => {
|
|
2049
|
-
let n =
|
|
2053
|
+
let n = me((e) => t.getAttribute(e));
|
|
2050
2054
|
n && (e.tabColor = n);
|
|
2051
2055
|
}
|
|
2052
2056
|
});
|
|
2053
|
-
let
|
|
2057
|
+
let T = !1, E = () => e.pageLayout ??= {};
|
|
2054
2058
|
d.registerVisitor({
|
|
2055
2059
|
from: "pageSetUpPr",
|
|
2056
2060
|
to: null,
|
|
2057
2061
|
openTag: (e) => {
|
|
2058
|
-
!0 === e.getAttribute("fitToPage", Z) && (
|
|
2062
|
+
!0 === e.getAttribute("fitToPage", Z) && (E().fitToPage = !0), !1 === e.getAttribute("autoPageBreaks", Z) && (E().hideAutoPageBreaks = !0);
|
|
2059
2063
|
}
|
|
2060
2064
|
}), d.registerVisitor({
|
|
2061
2065
|
from: "outlinePr",
|
|
@@ -2074,7 +2078,7 @@ var ir = {
|
|
|
2074
2078
|
from: "pageMargins",
|
|
2075
2079
|
to: null,
|
|
2076
2080
|
openTag: (e) => {
|
|
2077
|
-
if (
|
|
2081
|
+
if (T) return;
|
|
2078
2082
|
let t = (t, n) => e.getAttribute(t, Pn) ?? n, n = {
|
|
2079
2083
|
left: t("left", .7),
|
|
2080
2084
|
right: t("right", .7),
|
|
@@ -2083,14 +2087,14 @@ var ir = {
|
|
|
2083
2087
|
header: t("header", .3),
|
|
2084
2088
|
footer: t("footer", .3)
|
|
2085
2089
|
};
|
|
2086
|
-
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (
|
|
2090
|
+
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (E().margins = n);
|
|
2087
2091
|
}
|
|
2088
2092
|
}), d.registerVisitor({
|
|
2089
2093
|
from: "pageSetup",
|
|
2090
2094
|
to: null,
|
|
2091
2095
|
openTag: (e) => {
|
|
2092
|
-
if (
|
|
2093
|
-
let n =
|
|
2096
|
+
if (T) return;
|
|
2097
|
+
let n = E(), r = (t) => e.getAttribute(t, Q) ?? void 0, i = (t) => e.getAttribute(t, Z), a = e.getAttribute("orientation");
|
|
2094
2098
|
a !== "landscape" && a !== "portrait" || (n.orientation = a);
|
|
2095
2099
|
for (let e of [
|
|
2096
2100
|
"paperSize",
|
|
@@ -2109,9 +2113,9 @@ var ir = {
|
|
|
2109
2113
|
o && (n.paperHeight = o);
|
|
2110
2114
|
let s = e.getAttribute("paperWidth");
|
|
2111
2115
|
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);
|
|
2112
|
-
let c = e.getAttribute("cellComments"), l =
|
|
2116
|
+
let c = e.getAttribute("cellComments"), l = _e.find(([e]) => e === c)?.[1];
|
|
2113
2117
|
l && (n.printComments = l);
|
|
2114
|
-
let u = e.getAttribute("errors"), d =
|
|
2118
|
+
let u = e.getAttribute("errors"), d = Se.find(([e]) => e === u)?.[1];
|
|
2115
2119
|
d && (n.printErrors = d);
|
|
2116
2120
|
let f = e.getAttribute("r:id"), p = f ? t(f, "part") : null;
|
|
2117
2121
|
p && (n.printerSettings = p);
|
|
@@ -2120,25 +2124,25 @@ var ir = {
|
|
|
2120
2124
|
from: "printOptions",
|
|
2121
2125
|
to: null,
|
|
2122
2126
|
openTag: (e) => {
|
|
2123
|
-
if (
|
|
2127
|
+
if (T) return;
|
|
2124
2128
|
let t = (t) => !0 === e.getAttribute(t, Z);
|
|
2125
|
-
t("horizontalCentered") && (
|
|
2129
|
+
t("horizontalCentered") && (E().centerHorizontally = !0), t("verticalCentered") && (E().centerVertically = !0), t("gridLines") && (E().printGridlines = !0), t("headings") && (E().printHeadings = !0);
|
|
2126
2130
|
}
|
|
2127
2131
|
}), d.registerVisitor({
|
|
2128
2132
|
from: "headerFooter",
|
|
2129
2133
|
to: {},
|
|
2130
2134
|
openTag: (e) => {
|
|
2131
|
-
if (
|
|
2135
|
+
if (T) return;
|
|
2132
2136
|
let t = {}, n = (t) => e.getAttribute(t, Z);
|
|
2133
|
-
!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 && (
|
|
2137
|
+
!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 && (E().headerFooter = t);
|
|
2134
2138
|
}
|
|
2135
2139
|
});
|
|
2136
|
-
for (let e of
|
|
2140
|
+
for (let e of je) d.registerVisitor({
|
|
2137
2141
|
from: e,
|
|
2138
2142
|
to: {},
|
|
2139
2143
|
text: (t, n) => {
|
|
2140
|
-
if (
|
|
2141
|
-
let r =
|
|
2144
|
+
if (T) return;
|
|
2145
|
+
let r = E(), i = r.headerFooter ??= {};
|
|
2142
2146
|
i[e] = (i[e] ?? "") + f(t);
|
|
2143
2147
|
}
|
|
2144
2148
|
});
|
|
@@ -2154,14 +2158,14 @@ var ir = {
|
|
|
2154
2158
|
from: "brk",
|
|
2155
2159
|
to: null,
|
|
2156
2160
|
openTag: (e) => {
|
|
2157
|
-
if (
|
|
2161
|
+
if (T) return;
|
|
2158
2162
|
let t = e.getAttribute("id", Q);
|
|
2159
2163
|
if (t == null) return;
|
|
2160
2164
|
let n = { index: t }, r = e.getAttribute("min", Q);
|
|
2161
2165
|
r != null && (n.min = r);
|
|
2162
2166
|
let i = e.getAttribute("max", Q);
|
|
2163
2167
|
i != null && (n.max = i), !0 !== e.getAttribute("man", Z) && (n.automatic = !0), !0 === e.getAttribute("pt", Z) && (n.pivot = !0);
|
|
2164
|
-
let a =
|
|
2168
|
+
let a = E();
|
|
2165
2169
|
(a[se] ??= []).push(n);
|
|
2166
2170
|
}
|
|
2167
2171
|
}), d.registerVisitor({
|
|
@@ -2202,7 +2206,7 @@ var ir = {
|
|
|
2202
2206
|
});
|
|
2203
2207
|
}
|
|
2204
2208
|
});
|
|
2205
|
-
let
|
|
2209
|
+
let le = {
|
|
2206
2210
|
from: "dataValidation",
|
|
2207
2211
|
to: [],
|
|
2208
2212
|
openTag: (e) => {
|
|
@@ -2221,23 +2225,23 @@ var ir = {
|
|
|
2221
2225
|
closeTag: (e) => {
|
|
2222
2226
|
let t = e.getSource();
|
|
2223
2227
|
if (!t?.rule) return;
|
|
2224
|
-
let n =
|
|
2228
|
+
let n = Oe(t.rule, s);
|
|
2225
2229
|
n && (e.getAttribute("allowBlank", Z) && (n.includeBlanks = !0), t.v.condition = n), delete t.rule;
|
|
2226
2230
|
}
|
|
2227
2231
|
};
|
|
2228
|
-
d.registerVisitor(
|
|
2232
|
+
d.registerVisitor(le), d.registerVisitor({
|
|
2229
2233
|
from: "formula1",
|
|
2230
2234
|
to: {},
|
|
2231
2235
|
text: (e, t) => {
|
|
2232
2236
|
let n = t.getParent().rule;
|
|
2233
|
-
n?.type && (n.formula1 =
|
|
2237
|
+
n?.type && (n.formula1 = L(_(e), n.type));
|
|
2234
2238
|
}
|
|
2235
2239
|
}), d.registerVisitor({
|
|
2236
2240
|
from: "formula2",
|
|
2237
2241
|
to: {},
|
|
2238
2242
|
text: (e, t) => {
|
|
2239
2243
|
let n = t.getParent().rule;
|
|
2240
|
-
n?.type && (n.formula2 =
|
|
2244
|
+
n?.type && (n.formula2 = L(_(e), n.type));
|
|
2241
2245
|
}
|
|
2242
2246
|
}), d.registerVisitor({
|
|
2243
2247
|
from: "picture",
|
|
@@ -2249,7 +2253,7 @@ var ir = {
|
|
|
2249
2253
|
e.getSource().resId = r;
|
|
2250
2254
|
}
|
|
2251
2255
|
});
|
|
2252
|
-
let
|
|
2256
|
+
let de = {
|
|
2253
2257
|
from: "slicer",
|
|
2254
2258
|
to: {},
|
|
2255
2259
|
openTag: (e) => {
|
|
@@ -2261,8 +2265,8 @@ var ir = {
|
|
|
2261
2265
|
for (let e of a) i.slicers[e] = r[e];
|
|
2262
2266
|
}
|
|
2263
2267
|
};
|
|
2264
|
-
d.registerVisitor(
|
|
2265
|
-
let
|
|
2268
|
+
d.registerVisitor(de);
|
|
2269
|
+
let he = {
|
|
2266
2270
|
from: "timelineRef",
|
|
2267
2271
|
to: {},
|
|
2268
2272
|
openTag: (e) => {
|
|
@@ -2272,7 +2276,7 @@ var ir = {
|
|
|
2272
2276
|
i.slicers ??= {};
|
|
2273
2277
|
for (let e of Object.keys(r)) i.slicers[e] = r[e];
|
|
2274
2278
|
}
|
|
2275
|
-
},
|
|
2279
|
+
}, F = (e, t) => ({
|
|
2276
2280
|
from: e,
|
|
2277
2281
|
to: {},
|
|
2278
2282
|
openTag: (e) => {
|
|
@@ -2284,8 +2288,8 @@ var ir = {
|
|
|
2284
2288
|
closeTag: (e) => {
|
|
2285
2289
|
t(String(e.getSource() ?? ""), e);
|
|
2286
2290
|
}
|
|
2287
|
-
}),
|
|
2288
|
-
|
|
2291
|
+
}), ve = /* @__PURE__ */ new Map();
|
|
2292
|
+
ve.set("dataValidations", {
|
|
2289
2293
|
from: "dataValidations",
|
|
2290
2294
|
to: "validations",
|
|
2291
2295
|
openTag: (e) => {
|
|
@@ -2295,15 +2299,15 @@ var ir = {
|
|
|
2295
2299
|
closeTag: (e) => {
|
|
2296
2300
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
2297
2301
|
}
|
|
2298
|
-
}),
|
|
2299
|
-
...
|
|
2302
|
+
}), ve.set("dataValidation", {
|
|
2303
|
+
...le,
|
|
2300
2304
|
closeTag: (e) => {
|
|
2301
|
-
|
|
2305
|
+
le.closeTag(e);
|
|
2302
2306
|
let t = e.getSource();
|
|
2303
2307
|
t && !t.r && (e.warn("x14 dataValidation with no xm:sqref was dropped."), e.setSource(void 0));
|
|
2304
2308
|
}
|
|
2305
2309
|
});
|
|
2306
|
-
let
|
|
2310
|
+
let be = (e) => ({
|
|
2307
2311
|
from: e,
|
|
2308
2312
|
to: {},
|
|
2309
2313
|
openTag: (t) => {
|
|
@@ -2313,18 +2317,18 @@ var ir = {
|
|
|
2313
2317
|
});
|
|
2314
2318
|
}
|
|
2315
2319
|
});
|
|
2316
|
-
|
|
2320
|
+
ve.set("formula1", be("formula1")), ve.set("formula2", be("formula2")), ve.set("f", F("f", (e, t) => {
|
|
2317
2321
|
let n = t.getParent(), r = n?.rule;
|
|
2318
|
-
r && (r[n.key] =
|
|
2319
|
-
})),
|
|
2322
|
+
r && (r[n.key] = L(_(e), r.type));
|
|
2323
|
+
})), ve.set("sqref", F("sqref", (e, t) => {
|
|
2320
2324
|
let n = t.getParent(), r = e.trim();
|
|
2321
2325
|
n && r && (n.r = r.split(/\s+/).join(","));
|
|
2322
2326
|
}));
|
|
2323
|
-
let
|
|
2324
|
-
|
|
2327
|
+
let Ce = /* @__PURE__ */ new Map(), we = [], R = /* @__PURE__ */ new Map();
|
|
2328
|
+
R.set("conditionalFormattings", {
|
|
2325
2329
|
from: "conditionalFormattings",
|
|
2326
2330
|
transparent: !0
|
|
2327
|
-
}),
|
|
2331
|
+
}), R.set("conditionalFormatting", {
|
|
2328
2332
|
from: "conditionalFormatting",
|
|
2329
2333
|
to: {},
|
|
2330
2334
|
openTag: (e) => {
|
|
@@ -2334,10 +2338,10 @@ var ir = {
|
|
|
2334
2338
|
let t = e.getSource(), n = t?.rules ?? [];
|
|
2335
2339
|
for (let e = 0; e < n.length; e++) {
|
|
2336
2340
|
let r = n[e];
|
|
2337
|
-
r.sqref = t.sqref, r.id ?
|
|
2341
|
+
r.sqref = t.sqref, r.id ? Ce.set(r.id, r) : we.push(r);
|
|
2338
2342
|
}
|
|
2339
2343
|
}
|
|
2340
|
-
}),
|
|
2344
|
+
}), R.set("cfRule", {
|
|
2341
2345
|
from: "cfRule",
|
|
2342
2346
|
to: {},
|
|
2343
2347
|
openTag: (e) => {
|
|
@@ -2347,10 +2351,10 @@ var ir = {
|
|
|
2347
2351
|
let t = e.getSource();
|
|
2348
2352
|
t && e.getParent()?.rules?.push(t);
|
|
2349
2353
|
}
|
|
2350
|
-
}),
|
|
2354
|
+
}), R.set("sqref", F("sqref", (e, t) => {
|
|
2351
2355
|
let n = t.getParent(), r = e.trim();
|
|
2352
2356
|
n && r && (n.sqref = r);
|
|
2353
|
-
})),
|
|
2357
|
+
})), R.set("dataBar", {
|
|
2354
2358
|
from: "dataBar",
|
|
2355
2359
|
to: {},
|
|
2356
2360
|
openTag: (e) => {
|
|
@@ -2359,7 +2363,7 @@ var ir = {
|
|
|
2359
2363
|
closeTag: (e) => {
|
|
2360
2364
|
e.getParent().dataBar = e.getSource();
|
|
2361
2365
|
}
|
|
2362
|
-
}),
|
|
2366
|
+
}), R.set("iconSet", {
|
|
2363
2367
|
from: "iconSet",
|
|
2364
2368
|
to: {},
|
|
2365
2369
|
openTag: (e) => {
|
|
@@ -2369,26 +2373,26 @@ var ir = {
|
|
|
2369
2373
|
e.getParent().iconSet = e.getSource();
|
|
2370
2374
|
}
|
|
2371
2375
|
});
|
|
2372
|
-
let
|
|
2373
|
-
|
|
2376
|
+
let Ee = /* @__PURE__ */ new Map();
|
|
2377
|
+
Ee.set("f", F("f", (e, t) => {
|
|
2374
2378
|
let n = t.getParent();
|
|
2375
2379
|
if (!n) return;
|
|
2376
2380
|
let r = e.trim(), i = Number(r);
|
|
2377
2381
|
n.value = r.length > 0 && Number.isFinite(i) ? i : _(e);
|
|
2378
|
-
})),
|
|
2382
|
+
})), R.set("cfvo", {
|
|
2379
2383
|
from: "cfvo",
|
|
2380
2384
|
to: {},
|
|
2381
|
-
scope: () =>
|
|
2385
|
+
scope: () => Ee,
|
|
2382
2386
|
openTag: (e) => {
|
|
2383
2387
|
let t = e.getParent();
|
|
2384
2388
|
t.conditions ||= [];
|
|
2385
2389
|
let n = e.getSource();
|
|
2386
2390
|
t.conditions.push(n), e.copyTo("type", $), !1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
2387
2391
|
}
|
|
2388
|
-
}),
|
|
2392
|
+
}), R.set("f", F("f", (e, t) => {
|
|
2389
2393
|
let n = t.getParent();
|
|
2390
2394
|
n && (n.formulas ??= []).push(_(e));
|
|
2391
|
-
})),
|
|
2395
|
+
})), R.set("dxf", {
|
|
2392
2396
|
from: "dxf",
|
|
2393
2397
|
to: {},
|
|
2394
2398
|
raw: !0,
|
|
@@ -2400,15 +2404,15 @@ var ir = {
|
|
|
2400
2404
|
n && (t.style = n);
|
|
2401
2405
|
}
|
|
2402
2406
|
});
|
|
2403
|
-
let
|
|
2407
|
+
let ke = (e) => ({
|
|
2404
2408
|
from: e,
|
|
2405
2409
|
to: {},
|
|
2406
2410
|
openTag: (t) => {
|
|
2407
|
-
let n =
|
|
2411
|
+
let n = me((e) => t.getAttribute(e));
|
|
2408
2412
|
n && (t.getParent()[e] = n);
|
|
2409
2413
|
}
|
|
2410
2414
|
});
|
|
2411
|
-
|
|
2415
|
+
R.set("borderColor", ke("borderColor")), R.set("negativeFillColor", ke("negativeFillColor")), R.set("negativeBorderColor", ke("negativeBorderColor")), R.set("axisColor", ke("axisColor")), R.set("cfIcon", {
|
|
2412
2416
|
from: "cfIcon",
|
|
2413
2417
|
to: {},
|
|
2414
2418
|
openTag: (e) => {
|
|
@@ -2421,8 +2425,8 @@ var ir = {
|
|
|
2421
2425
|
});
|
|
2422
2426
|
}
|
|
2423
2427
|
});
|
|
2424
|
-
let
|
|
2425
|
-
|
|
2428
|
+
let Me = /* @__PURE__ */ new Map();
|
|
2429
|
+
Me.set("id", F("id", (e, t) => {
|
|
2426
2430
|
let n = t.getParent(), r = e.trim();
|
|
2427
2431
|
n && r && (n.x14Id = r);
|
|
2428
2432
|
}));
|
|
@@ -2430,12 +2434,12 @@ var ir = {
|
|
|
2430
2434
|
Ne.set("slicerList", {
|
|
2431
2435
|
from: "slicerList",
|
|
2432
2436
|
transparent: !0
|
|
2433
|
-
}), Ne.set("slicer",
|
|
2434
|
-
let
|
|
2435
|
-
|
|
2437
|
+
}), Ne.set("slicer", de);
|
|
2438
|
+
let Fe = /* @__PURE__ */ new Map();
|
|
2439
|
+
Fe.set("timelineRefs", {
|
|
2436
2440
|
from: "timelineRefs",
|
|
2437
2441
|
transparent: !0
|
|
2438
|
-
}),
|
|
2442
|
+
}), Fe.set("timelineRef", he);
|
|
2439
2443
|
let Ie = /* @__PURE__ */ new Map();
|
|
2440
2444
|
Ie.set("sparklineGroups", {
|
|
2441
2445
|
from: "sparklineGroups",
|
|
@@ -2462,15 +2466,15 @@ var ir = {
|
|
|
2462
2466
|
});
|
|
2463
2467
|
},
|
|
2464
2468
|
closeTag: (e) => {
|
|
2465
|
-
let t = e.getSource(), n =
|
|
2469
|
+
let t = e.getSource(), n = Te(t.properties, t.entries);
|
|
2466
2470
|
n || e.warn("A sparkline group with no sparklines was dropped.", { onceKey: "xlsx.sheet.sparklineGroup.empty" }), e.setSource(n ?? void 0);
|
|
2467
2471
|
}
|
|
2468
2472
|
});
|
|
2469
|
-
for (let e of
|
|
2473
|
+
for (let e of ce) Ie.set(e, {
|
|
2470
2474
|
from: e,
|
|
2471
2475
|
to: {},
|
|
2472
2476
|
openTag: (t) => {
|
|
2473
|
-
let n =
|
|
2477
|
+
let n = me((e) => t.getAttribute(e));
|
|
2474
2478
|
n && (t.getParent().properties[e] = n);
|
|
2475
2479
|
}
|
|
2476
2480
|
});
|
|
@@ -2484,7 +2488,7 @@ var ir = {
|
|
|
2484
2488
|
e.setSource({ isSparkline: !0 });
|
|
2485
2489
|
},
|
|
2486
2490
|
closeTag: (e) => {
|
|
2487
|
-
let t = e.getSource(), n = e.getParent(), r = t?.sqref?.trim(), i = r ?
|
|
2491
|
+
let t = e.getSource(), n = e.getParent(), r = t?.sqref?.trim(), i = r ? U.fastStringToRange(r.split(/\s+/)[0]) : null;
|
|
2488
2492
|
i ? n.entries.push({
|
|
2489
2493
|
location: {
|
|
2490
2494
|
rowIndex: i.rowStart,
|
|
@@ -2493,24 +2497,24 @@ var ir = {
|
|
|
2493
2497
|
data: t.data ?? ""
|
|
2494
2498
|
}) : e.warn("A sparkline with no location was dropped.", { onceKey: "xlsx.sheet.sparkline.incomplete" });
|
|
2495
2499
|
}
|
|
2496
|
-
}), Ie.set("f",
|
|
2500
|
+
}), Ie.set("f", F("f", (e, t) => {
|
|
2497
2501
|
let n = t.getParent(), r = e.trim();
|
|
2498
2502
|
n && r && (n.isSparkline ? n.data = r : n.properties.dateRange = r);
|
|
2499
|
-
})), Ie.set("sqref",
|
|
2503
|
+
})), Ie.set("sqref", F("sqref", (e, t) => {
|
|
2500
2504
|
let n = t.getParent();
|
|
2501
2505
|
n?.isSparkline && (n.sqref = e);
|
|
2502
2506
|
}));
|
|
2503
|
-
let
|
|
2504
|
-
[o(
|
|
2505
|
-
[o(
|
|
2506
|
-
[o(
|
|
2507
|
-
[o(
|
|
2508
|
-
[o(
|
|
2509
|
-
[o(
|
|
2510
|
-
[o(
|
|
2511
|
-
[o(
|
|
2512
|
-
[o(
|
|
2513
|
-
]),
|
|
2507
|
+
let z = /* @__PURE__ */ new Map([
|
|
2508
|
+
[o(Ae), Ie],
|
|
2509
|
+
[o(Pe), ve],
|
|
2510
|
+
[o(pe), R],
|
|
2511
|
+
[o(De), R],
|
|
2512
|
+
[o(I), Me],
|
|
2513
|
+
[o(j), Ne],
|
|
2514
|
+
[o(ge), Ne],
|
|
2515
|
+
[o(N), Fe],
|
|
2516
|
+
[o(O), C]
|
|
2517
|
+
]), Le = /* @__PURE__ */ new Set();
|
|
2514
2518
|
d.registerVisitor({
|
|
2515
2519
|
from: "extLst",
|
|
2516
2520
|
transparent: !0
|
|
@@ -2518,11 +2522,11 @@ var ir = {
|
|
|
2518
2522
|
from: "ext",
|
|
2519
2523
|
transparent: !0,
|
|
2520
2524
|
scope: (e) => {
|
|
2521
|
-
let t = e.getAttribute("uri"), n = o(t), r =
|
|
2525
|
+
let t = e.getAttribute("uri"), n = o(t), r = z.get(n);
|
|
2522
2526
|
if (r) return r;
|
|
2523
|
-
if (!
|
|
2524
|
-
|
|
2525
|
-
let r =
|
|
2527
|
+
if (!D.has(n) && !Le.has(n)) {
|
|
2528
|
+
Le.add(n);
|
|
2529
|
+
let r = ze[n];
|
|
2526
2530
|
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.`);
|
|
2527
2531
|
}
|
|
2528
2532
|
return null;
|
|
@@ -2580,19 +2584,19 @@ var ir = {
|
|
|
2580
2584
|
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2581
2585
|
}
|
|
2582
2586
|
});
|
|
2583
|
-
let
|
|
2587
|
+
let B = null, Be = !1, Ve = /* @__PURE__ */ new Map(), He = {
|
|
2584
2588
|
from: "Fallback",
|
|
2585
2589
|
to: null
|
|
2586
|
-
},
|
|
2590
|
+
}, H = {
|
|
2587
2591
|
from: "Choice",
|
|
2588
2592
|
transparent: !0
|
|
2589
2593
|
};
|
|
2590
|
-
Ve.set("Fallback", He), Ve.set("Choice",
|
|
2594
|
+
Ve.set("Fallback", He), Ve.set("Choice", H), Ve.set("control", {
|
|
2591
2595
|
from: "control",
|
|
2592
2596
|
transparent: !0,
|
|
2593
2597
|
openTag: (e) => {
|
|
2594
2598
|
let n = e.getAttribute("name"), r = e.getAttribute("r:id"), i = r ? t(r, "formControl") : null;
|
|
2595
|
-
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (
|
|
2599
|
+
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (B = null);
|
|
2596
2600
|
let a = i.json, o = parseInt(e.getAttribute("shapeId") ?? "", 10);
|
|
2597
2601
|
isNaN(o) || (a.shapeId = o);
|
|
2598
2602
|
let s = {
|
|
@@ -2615,29 +2619,29 @@ var ir = {
|
|
|
2615
2619
|
json: a
|
|
2616
2620
|
}
|
|
2617
2621
|
};
|
|
2618
|
-
n && (s.content.name = n),
|
|
2622
|
+
n && (s.content.name = n), B = {
|
|
2619
2623
|
movable: s,
|
|
2620
2624
|
control: a
|
|
2621
2625
|
};
|
|
2622
2626
|
},
|
|
2623
2627
|
closeTag: () => {
|
|
2624
|
-
|
|
2628
|
+
B &&= (e.movables ||= [], e.movables.push(B.movable), null);
|
|
2625
2629
|
}
|
|
2626
2630
|
}), Ve.set("controlPr", {
|
|
2627
2631
|
from: "controlPr",
|
|
2628
2632
|
transparent: !0,
|
|
2629
2633
|
raw: !0,
|
|
2630
2634
|
openTag: (e) => {
|
|
2631
|
-
if (!
|
|
2635
|
+
if (!B) return;
|
|
2632
2636
|
let t = e.getFrom().attributes ?? {}, n = {};
|
|
2633
2637
|
for (let e in t) {
|
|
2634
2638
|
let r = t[e];
|
|
2635
2639
|
n[e] = typeof r == "string" ? r : r?.value ?? "";
|
|
2636
2640
|
}
|
|
2637
|
-
|
|
2641
|
+
ue(n, B.control);
|
|
2638
2642
|
},
|
|
2639
2643
|
closeTag: (e) => {
|
|
2640
|
-
if (!
|
|
2644
|
+
if (!B) return;
|
|
2641
2645
|
let t = ((e) => {
|
|
2642
2646
|
let t = /<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);
|
|
2643
2647
|
if (!t) return null;
|
|
@@ -2651,19 +2655,19 @@ var ir = {
|
|
|
2651
2655
|
rest: (e.slice(0, t.index) + e.slice(t.index + t[0].length)).trim()
|
|
2652
2656
|
};
|
|
2653
2657
|
})(e.getRawXml() ?? "");
|
|
2654
|
-
t ? (
|
|
2658
|
+
t ? (B.movable.anchor = t.anchor, t.anchorType !== "twoCell" && (B.movable.anchorType = t.anchorType), t.rest && (B.control.xml = t.rest)) : Be || (Be = !0, e.warn("A form control has no anchor; it is placed at the top left of the sheet."));
|
|
2655
2659
|
}
|
|
2656
2660
|
});
|
|
2657
|
-
let
|
|
2661
|
+
let Ue = {
|
|
2658
2662
|
from: "controls",
|
|
2659
2663
|
transparent: !0,
|
|
2660
2664
|
scope: () => Ve
|
|
2661
2665
|
};
|
|
2662
|
-
d.registerVisitor(
|
|
2666
|
+
d.registerVisitor(Ue);
|
|
2663
2667
|
let We = /* @__PURE__ */ new Map([
|
|
2664
|
-
["Choice",
|
|
2668
|
+
["Choice", H],
|
|
2665
2669
|
["Fallback", He],
|
|
2666
|
-
["controls",
|
|
2670
|
+
["controls", Ue]
|
|
2667
2671
|
]);
|
|
2668
2672
|
d.registerVisitor({
|
|
2669
2673
|
from: "AlternateContent",
|
|
@@ -2686,16 +2690,16 @@ var ir = {
|
|
|
2686
2690
|
}
|
|
2687
2691
|
});
|
|
2688
2692
|
let Ge = (e, t) => {
|
|
2689
|
-
t.conditions?.length && (e.stops =
|
|
2693
|
+
t.conditions?.length && (e.stops = x(t)), te(e, t), t.gradient ?? 1 ? e.gradient = !0 : delete e.gradient, 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);
|
|
2690
2694
|
}, Ke = (e, t) => {
|
|
2691
|
-
t.conditions?.length && (e.stops =
|
|
2695
|
+
t.conditions?.length && (e.stops = x(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);
|
|
2692
2696
|
}, qe = (e) => {
|
|
2693
2697
|
if (!e.sqref) return null;
|
|
2694
2698
|
let t = e.sqref.split(/\s+/).join(",");
|
|
2695
2699
|
if (e.type === "iconSet") {
|
|
2696
2700
|
if (!e.iconSet) return null;
|
|
2697
2701
|
let n = {
|
|
2698
|
-
type:
|
|
2702
|
+
type: tt.ScaleType.IconSet,
|
|
2699
2703
|
stops: []
|
|
2700
2704
|
};
|
|
2701
2705
|
return Ke(n, e.iconSet), {
|
|
@@ -2704,7 +2708,7 @@ var ir = {
|
|
|
2704
2708
|
priority: e.priority
|
|
2705
2709
|
};
|
|
2706
2710
|
}
|
|
2707
|
-
let n =
|
|
2711
|
+
let n = k(e, s);
|
|
2708
2712
|
if (!n) return null;
|
|
2709
2713
|
let r = { condition: n };
|
|
2710
2714
|
return e.style && (r.style = e.style), e.stopIfTrue && (r.stopIfTrue = !0), {
|
|
@@ -2723,13 +2727,13 @@ var ir = {
|
|
|
2723
2727
|
let t = n[e], r = t.x14Id;
|
|
2724
2728
|
if (!r) continue;
|
|
2725
2729
|
delete t.x14Id;
|
|
2726
|
-
let i =
|
|
2730
|
+
let i = Ce.get(r);
|
|
2727
2731
|
if (!i) continue;
|
|
2728
|
-
|
|
2732
|
+
Ce.delete(r);
|
|
2729
2733
|
let a = t.v?.scale;
|
|
2730
|
-
i.dataBar && a?.type ===
|
|
2734
|
+
i.dataBar && a?.type === tt.ScaleType.DataBar ? Ge(a, i.dataBar) : i.iconSet && a?.type === tt.ScaleType.IconSet && Ke(a, i.iconSet);
|
|
2731
2735
|
}
|
|
2732
|
-
let r = [...
|
|
2736
|
+
let r = [...Ce.values(), ...we], i = /* @__PURE__ */ new Set(), a = 0;
|
|
2733
2737
|
for (let e = 0; e < r.length; e++) {
|
|
2734
2738
|
let o = qe(r[e]);
|
|
2735
2739
|
o ? (n || (n = [], t.conditionals = n), n.push(o)) : (i.add(r[e].type ?? "unknown"), a++);
|
|
@@ -2769,9 +2773,9 @@ var ir = {
|
|
|
2769
2773
|
to: "protection",
|
|
2770
2774
|
openTag: (e) => {
|
|
2771
2775
|
let t = e.getSource();
|
|
2772
|
-
for (let n of
|
|
2776
|
+
for (let n of fe) {
|
|
2773
2777
|
let r = e.hasAttribute(n.attribute) ? e.getAttribute(n.attribute) : null;
|
|
2774
|
-
t[n.key] =
|
|
2778
|
+
t[n.key] = Re(n, r);
|
|
2775
2779
|
}
|
|
2776
2780
|
if (t.sheet) return;
|
|
2777
2781
|
let n = {};
|
|
@@ -2822,7 +2826,7 @@ var ir = {
|
|
|
2822
2826
|
to: [],
|
|
2823
2827
|
openTag: (e) => {
|
|
2824
2828
|
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;
|
|
2825
|
-
t.r =
|
|
2829
|
+
t.r = U.runToString(i, a, !0);
|
|
2826
2830
|
let o = {};
|
|
2827
2831
|
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");
|
|
2828
2832
|
}
|
|
@@ -2836,23 +2840,23 @@ var ir = {
|
|
|
2836
2840
|
let Je = !1, Ye = !1, Xe = 0, Ze = "", Qe = "", $e = (e) => {
|
|
2837
2841
|
let t = e.indexOf(":");
|
|
2838
2842
|
return t === -1 ? e : e.slice(t + 1);
|
|
2839
|
-
},
|
|
2843
|
+
}, W = new nr();
|
|
2840
2844
|
return vr(y, e, d.createEventHandler(e, a, s), s, c, {
|
|
2841
2845
|
onOpenTag: (e) => {
|
|
2842
2846
|
Je = !0;
|
|
2843
2847
|
let t = $e(e.name);
|
|
2844
|
-
t === "t" || t === "v" ? Xe === 0 && (Ye = !0) : t === "rPh" || t === "phoneticPr" ? Xe++ : Xe === 0 &&
|
|
2848
|
+
t === "t" || t === "v" ? Xe === 0 && (Ye = !0) : t === "rPh" || t === "phoneticPr" ? Xe++ : Xe === 0 && W.onOpenTag(t, e.attributes);
|
|
2845
2849
|
},
|
|
2846
2850
|
onText: (e) => {
|
|
2847
|
-
Ye && (Ze += e,
|
|
2851
|
+
Ye && (Ze += e, W.onText(e));
|
|
2848
2852
|
},
|
|
2849
2853
|
onCloseTag: (e) => {
|
|
2850
2854
|
let t = $e(e.name);
|
|
2851
|
-
t === "t" || t === "v" ? Ye = !1 : t === "rPh" || t === "phoneticPr" ? Xe > 0 && Xe-- :
|
|
2855
|
+
t === "t" || t === "v" ? Ye = !1 : t === "rPh" || t === "phoneticPr" ? Xe > 0 && Xe-- : W.onCloseTag(t);
|
|
2852
2856
|
},
|
|
2853
2857
|
onEnd: () => {
|
|
2854
2858
|
if (!Je) return;
|
|
2855
|
-
let e =
|
|
2859
|
+
let e = W.take();
|
|
2856
2860
|
Je = !1, Ye = !1, Xe = 0;
|
|
2857
2861
|
let t = f(Ze);
|
|
2858
2862
|
return Ze = "", Qe = t, e ? {
|
|
@@ -2904,25 +2908,25 @@ var ir = {
|
|
|
2904
2908
|
rowStart: 0,
|
|
2905
2909
|
rowEnd: 0
|
|
2906
2910
|
}, _r = (e) => e === "1" || e === "true", vr = (e, t, n, r, i, a, o, s, c, l) => {
|
|
2907
|
-
let u = !1, d = [], f = o?.get(ur), m = o?.get(dr), h = /* @__PURE__ */ new Map(), g = !1, _ = [], v = !1, y = null, b = null, ee = null, x = null,
|
|
2911
|
+
let u = !1, d = [], f = o?.get(ur), m = o?.get(dr), h = /* @__PURE__ */ new Map(), g = !1, _ = [], v = !1, y = null, b = null, ee = null, x = null, S = null, ne = null, re = o?.get("richData") ?? Je.EmptyArray, C = null, w = !1, ie = U.normalizeA1ToR1C1, ae = Ye.createConflatingRanges(), oe = /* @__PURE__ */ new Map(), T = [], E = [], se = !1, ce = !1, le = null, ue = (e) => {
|
|
2908
2912
|
let t = o?.get("metadata")?.values;
|
|
2909
2913
|
if (!t) return;
|
|
2910
2914
|
let n = parseInt(e, 10);
|
|
2911
2915
|
if (!Number.isFinite(n) || n < 1) return;
|
|
2912
2916
|
let r = t[n - 1]?.get("XLRICHVALUE");
|
|
2913
|
-
return r?.richValueIndex === void 0 ? void 0 :
|
|
2914
|
-
},
|
|
2917
|
+
return r?.richValueIndex === void 0 ? void 0 : re[r.richValueIndex];
|
|
2918
|
+
}, de = !1, fe = Ye.createConflatingRanges(), pe, D = !1, O = -1, k = -1, A = null, j = null, me = (e) => ({
|
|
2915
2919
|
t: "r",
|
|
2916
2920
|
v: {
|
|
2917
2921
|
type: "hyperlink",
|
|
2918
2922
|
data: {
|
|
2919
|
-
address:
|
|
2923
|
+
address: pe,
|
|
2920
2924
|
friendly: e
|
|
2921
2925
|
}
|
|
2922
2926
|
}
|
|
2923
|
-
}),
|
|
2927
|
+
}), he = null, M = [], ge = null, _e = -2, N = 0, P = "", F = "", I = "", L = "", ve = "", ye = "", be = "", xe = "", Se = "", Ce = "", we = "", R = "", Te = "", Ee = "", De = !0, Oe = null, ke = !1, Ae = !1, je = !1, Me = null, Ne = 0, Pe = (e) => {
|
|
2924
2928
|
let r = e.name, s = r.indexOf(":");
|
|
2925
|
-
if (s !== -1 && (r = r.slice(s + 1)),
|
|
2929
|
+
if (s !== -1 && (r = r.slice(s + 1)), Ne++, Ne % 196608 == 0 && i?.(Ne), j) {
|
|
2926
2930
|
let t = e.attributes;
|
|
2927
2931
|
switch (r) {
|
|
2928
2932
|
case "v":
|
|
@@ -2937,16 +2941,16 @@ var ir = {
|
|
|
2937
2941
|
b = t.ref, y = e;
|
|
2938
2942
|
break;
|
|
2939
2943
|
case "array":
|
|
2940
|
-
b = t.ref,
|
|
2944
|
+
b = t.ref, le = b;
|
|
2941
2945
|
break;
|
|
2942
2946
|
case "dataTable": {
|
|
2943
2947
|
let e = ((e, t, n) => {
|
|
2944
2948
|
let r = e.r1, i = _r(e.del1);
|
|
2945
2949
|
if (!r && !i) return null;
|
|
2946
|
-
let a = e.ref ??
|
|
2950
|
+
let a = e.ref ?? U.cellToString({
|
|
2947
2951
|
rowIndex: t,
|
|
2948
2952
|
colIndex: n
|
|
2949
|
-
}), o =
|
|
2953
|
+
}), o = U.fastStringToRange(a);
|
|
2950
2954
|
if (!o) return null;
|
|
2951
2955
|
let s = { ref: {
|
|
2952
2956
|
rowStart: o.rowStart,
|
|
@@ -2959,36 +2963,36 @@ var ir = {
|
|
|
2959
2963
|
t && (s.columnInput = t), _r(e.del2) && (s.columnInputDeleted = !0);
|
|
2960
2964
|
}
|
|
2961
2965
|
return s;
|
|
2962
|
-
})(t,
|
|
2963
|
-
e && (
|
|
2966
|
+
})(t, O, k);
|
|
2967
|
+
e && (E.push(e), _r(t.ca) && fe.append(O, k));
|
|
2964
2968
|
return;
|
|
2965
2969
|
}
|
|
2966
2970
|
}
|
|
2967
2971
|
let e = t.ca;
|
|
2968
|
-
e !== void 0 && (
|
|
2972
|
+
e !== void 0 && (de = e === "1");
|
|
2969
2973
|
break;
|
|
2970
2974
|
case "is":
|
|
2971
|
-
|
|
2975
|
+
D = !0;
|
|
2972
2976
|
return;
|
|
2973
2977
|
}
|
|
2974
|
-
|
|
2978
|
+
D && !v && a?.onOpenTag?.(e);
|
|
2975
2979
|
} else if (u) {
|
|
2976
2980
|
if (r === "c") {
|
|
2977
|
-
|
|
2981
|
+
j = e, pe = void 0;
|
|
2978
2982
|
let t = e.attributes, n = t.r;
|
|
2979
|
-
|
|
2983
|
+
k = n === void 0 ? k + 1 : U.fastStringToCol(n);
|
|
2980
2984
|
let r = t.t;
|
|
2981
|
-
r === void 0 ?
|
|
2985
|
+
r === void 0 ? he = null : (he = r, he === "str" && (D = !0));
|
|
2982
2986
|
let i = t.s;
|
|
2983
|
-
i === void 0 && (
|
|
2984
|
-
colStart:
|
|
2985
|
-
rowStart:
|
|
2986
|
-
colEnd:
|
|
2987
|
-
rowEnd:
|
|
2987
|
+
i === void 0 && (Me !== null || je) && (i = "0"), i !== void 0 && (i = parseInt(i), Oe && Oe.value === i && Oe.colEnd + 1 === k ? Oe.colEnd = k : (Oe = {
|
|
2988
|
+
colStart: k,
|
|
2989
|
+
rowStart: O,
|
|
2990
|
+
colEnd: k,
|
|
2991
|
+
rowEnd: O,
|
|
2988
2992
|
value: i
|
|
2989
|
-
}, _.push(
|
|
2993
|
+
}, _.push(Oe))), le = null, ce = !1, w = !1;
|
|
2990
2994
|
let a = t.cm;
|
|
2991
|
-
|
|
2995
|
+
se = a !== void 0 && ((e) => {
|
|
2992
2996
|
let t = o?.get("metadata")?.cells;
|
|
2993
2997
|
if (!t) return !1;
|
|
2994
2998
|
let n = parseInt(e, 10);
|
|
@@ -2996,57 +3000,57 @@ var ir = {
|
|
|
2996
3000
|
})(a);
|
|
2997
3001
|
let s = t.vm;
|
|
2998
3002
|
if (s !== void 0) {
|
|
2999
|
-
let e =
|
|
3000
|
-
if (
|
|
3003
|
+
let e = ue(s);
|
|
3004
|
+
if (Xe.isError(e)) {
|
|
3001
3005
|
let t = e.getCode();
|
|
3002
|
-
|
|
3006
|
+
A = {
|
|
3003
3007
|
t: "e",
|
|
3004
3008
|
v: t
|
|
3005
|
-
},
|
|
3009
|
+
}, se && t === Xe.Code.Spill && (ce = !0);
|
|
3006
3010
|
}
|
|
3007
3011
|
}
|
|
3008
3012
|
}
|
|
3009
3013
|
} else {
|
|
3010
|
-
if (
|
|
3014
|
+
if (Ae && r === "row") {
|
|
3011
3015
|
u = !0;
|
|
3012
3016
|
let t = e.attributes.r;
|
|
3013
|
-
if (
|
|
3017
|
+
if (O = t === void 0 ? O + 1 : parseInt(t) - 1, k = -1, c?.()) {
|
|
3014
3018
|
let e = d[d.length - 1];
|
|
3015
|
-
e && e.max + 1 ===
|
|
3016
|
-
min:
|
|
3017
|
-
max:
|
|
3019
|
+
e && e.max + 1 === O ? e.max = O : d.push({
|
|
3020
|
+
min: O,
|
|
3021
|
+
max: O
|
|
3018
3022
|
});
|
|
3019
3023
|
}
|
|
3020
|
-
if (
|
|
3021
|
-
if (
|
|
3022
|
-
let e =
|
|
3023
|
-
|
|
3024
|
-
min:
|
|
3025
|
-
max:
|
|
3024
|
+
if (N = 0, F = e.attributes.customHeight, F !== void 0 && (N |= pr.CustomHeight), F !== Se && (De = !0, Se = F), P = e.attributes.ht, P !== void 0 && (N |= pr.Ht), P !== xe && (De = !0, xe = P), I = e.attributes.hidden, I !== void 0 && (N |= pr.Hidden), I !== Ce && (De = !0, Ce = I), ve = e.attributes.s, ve !== void 0 && (N |= pr.S), ve !== R && (De = !0, R = ve), L = e.attributes.customFormat, L !== void 0 && (N |= pr.CustomFormat), L !== we && (De = !0, we = L), ye = e.attributes.outlineLevel, ye !== void 0 && (N |= pr.OutlineLevel), ye !== Te && (De = !0, Te = ye), be = e.attributes.collapsed, be !== void 0 && (N |= pr.Collapsed), be !== Ee && (De = !0, Ee = be), N !== 0) {
|
|
3025
|
+
if (_e + 1 !== O || De) {
|
|
3026
|
+
let e = F !== void 0 && (F === "1" || F === "true"), t = L !== void 0 && (L === "1" || L === "true");
|
|
3027
|
+
Me = t && ve !== void 0 ? ve : null, t && Me === null && (Me = "0"), ge = {
|
|
3028
|
+
min: O,
|
|
3029
|
+
max: O,
|
|
3026
3030
|
value: {
|
|
3027
|
-
sz:
|
|
3031
|
+
sz: P === void 0 ? -1 : parseFloat(P),
|
|
3028
3032
|
csz: e,
|
|
3029
|
-
h:
|
|
3030
|
-
s:
|
|
3031
|
-
l:
|
|
3032
|
-
cl:
|
|
3033
|
+
h: I !== void 0 && (I === "1" || I === "true"),
|
|
3034
|
+
s: Me === null ? void 0 : Me === "0" ? 0 : parseInt(Me),
|
|
3035
|
+
l: ye === void 0 || ye === "0" ? 0 : parseInt(ye),
|
|
3036
|
+
cl: be !== void 0 && (be === "1" || be === "true")
|
|
3033
3037
|
}
|
|
3034
|
-
},
|
|
3035
|
-
} else
|
|
3038
|
+
}, M.push(ge);
|
|
3039
|
+
} else ge.max = O;
|
|
3036
3040
|
}
|
|
3037
|
-
|
|
3041
|
+
_e = O, De = !1;
|
|
3038
3042
|
return;
|
|
3039
3043
|
}
|
|
3040
|
-
if (r === "sheetData" && (
|
|
3041
|
-
|
|
3044
|
+
if (r === "sheetData" && (Ae = !0), !ke && r === "sheetData") {
|
|
3045
|
+
ke = !0;
|
|
3042
3046
|
let e = t.cols, n = e ? e.length : 0;
|
|
3043
|
-
for (let t = 0; !
|
|
3047
|
+
for (let t = 0; !je && t < n; t++) e[t].v.s && (je = !0);
|
|
3044
3048
|
}
|
|
3045
3049
|
n?.onOpenTag?.(e);
|
|
3046
3050
|
}
|
|
3047
|
-
},
|
|
3051
|
+
}, Fe = (t) => {
|
|
3048
3052
|
let r = t.name;
|
|
3049
|
-
if (r === "sheetData" && (
|
|
3053
|
+
if (r === "sheetData" && (Ae = !1), !v || r !== "c" && r !== "f" || (y && (x = oe.get(y) ?? null), x && (pe = ((e) => {
|
|
3050
3054
|
if (e.length < 11 || (32 | e.charCodeAt(0)) != 104 || !/^HYPERLINK\(/i.test(e)) return;
|
|
3051
3055
|
let t = 1, n = !1, r = 10;
|
|
3052
3056
|
for (; r < e.length && t > 0; r++) {
|
|
@@ -3056,29 +3060,29 @@ var ir = {
|
|
|
3056
3060
|
if (t !== 0 || e.slice(r).trim().length > 0) return;
|
|
3057
3061
|
let i = /^HYPERLINK\(\s*"((?:[^"]|"")*)"\s*[,)]/i.exec(e);
|
|
3058
3062
|
return i ? i[1].replace(/""/g, "\"") : null;
|
|
3059
|
-
})(x[2]),
|
|
3063
|
+
})(x[2]), ae.append(O, k, x), de && fe.append(O, k)), le !== null && T.push([le, se ? ce ? "error" : "dynamic" : "fixed"]), v = !1, x = null, y = null, b = null, g = !1, de = !1, le = null, se = !1, ce = !1), j) {
|
|
3060
3064
|
let n = r.indexOf(":");
|
|
3061
|
-
if (n !== -1 && (r = r.slice(n + 1)),
|
|
3065
|
+
if (n !== -1 && (r = r.slice(n + 1)), D) {
|
|
3062
3066
|
if (r === "is" || r === "v") {
|
|
3063
3067
|
let t = a?.onEnd?.();
|
|
3064
|
-
t == null ||
|
|
3068
|
+
t == null || w && l?.() === "" || e.pushAt(O, k, pe !== void 0 && typeof t == "number" ? me(l?.() ?? "") : typeof t == "number" ? "" + t : t);
|
|
3065
3069
|
} else r !== "f" && a?.onCloseTag?.(t);
|
|
3066
3070
|
}
|
|
3067
|
-
g &&= !1, r === "c" && (
|
|
3071
|
+
g &&= !1, r === "c" && (j = null, D = !1);
|
|
3068
3072
|
} else {
|
|
3069
|
-
if (u) return u = !1, void (
|
|
3073
|
+
if (u) return u = !1, void (Oe = null);
|
|
3070
3074
|
n?.onCloseTag?.(t);
|
|
3071
3075
|
}
|
|
3072
|
-
},
|
|
3076
|
+
}, Ie = (t) => {
|
|
3073
3077
|
let i = t.trim();
|
|
3074
3078
|
if (g) {
|
|
3075
|
-
switch (
|
|
3079
|
+
switch (A = null, he) {
|
|
3076
3080
|
case null:
|
|
3077
3081
|
case "n":
|
|
3078
|
-
|
|
3082
|
+
A = ut.flushSubnormal(parseFloat(i));
|
|
3079
3083
|
break;
|
|
3080
3084
|
case "b":
|
|
3081
|
-
|
|
3085
|
+
A = i === "1" || i === "true";
|
|
3082
3086
|
break;
|
|
3083
3087
|
case "s": {
|
|
3084
3088
|
let e = parseInt(i, 10), t = h.get(e);
|
|
@@ -3086,7 +3090,7 @@ var ir = {
|
|
|
3086
3090
|
let n = f?.get(e);
|
|
3087
3091
|
t = n ? rr(n, m) : null, h.set(e, t);
|
|
3088
3092
|
}
|
|
3089
|
-
|
|
3093
|
+
A = t ? {
|
|
3090
3094
|
t: "r",
|
|
3091
3095
|
v: {
|
|
3092
3096
|
type: "richText",
|
|
@@ -3116,26 +3120,26 @@ var ir = {
|
|
|
3116
3120
|
}
|
|
3117
3121
|
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;
|
|
3118
3122
|
})(i, !0 === o?.get(lr));
|
|
3119
|
-
e === null ? s && (r?.(`Date '${i}' in cell ${
|
|
3120
|
-
colIndex:
|
|
3121
|
-
rowIndex:
|
|
3122
|
-
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"),
|
|
3123
|
+
e === null ? s && (r?.(`Date '${i}' in cell ${U.cellToString({
|
|
3124
|
+
colIndex: k,
|
|
3125
|
+
rowIndex: O
|
|
3126
|
+
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"), A = "" + s(i)) : A = e;
|
|
3123
3127
|
break;
|
|
3124
3128
|
}
|
|
3125
3129
|
case "e":
|
|
3126
3130
|
if (i === "#VALUE!") {
|
|
3127
|
-
let e =
|
|
3131
|
+
let e = j.attributes.vm;
|
|
3128
3132
|
if (e !== void 0) {
|
|
3129
|
-
let t =
|
|
3130
|
-
if (
|
|
3131
|
-
|
|
3133
|
+
let t = ue(e);
|
|
3134
|
+
if (Xe.isError(t)) {
|
|
3135
|
+
A = {
|
|
3132
3136
|
t: "e",
|
|
3133
3137
|
v: t.getCode()
|
|
3134
3138
|
};
|
|
3135
3139
|
break;
|
|
3136
3140
|
}
|
|
3137
|
-
if (
|
|
3138
|
-
|
|
3141
|
+
if (lt.isJSON(t)) {
|
|
3142
|
+
A = {
|
|
3139
3143
|
t: "r",
|
|
3140
3144
|
v: t
|
|
3141
3145
|
};
|
|
@@ -3143,33 +3147,33 @@ var ir = {
|
|
|
3143
3147
|
}
|
|
3144
3148
|
}
|
|
3145
3149
|
}
|
|
3146
|
-
let e =
|
|
3147
|
-
e ?
|
|
3150
|
+
let e = Xe.getBuiltInByLabel(i);
|
|
3151
|
+
e ? A = {
|
|
3148
3152
|
t: "e",
|
|
3149
3153
|
v: e.getCode()
|
|
3150
|
-
} : (
|
|
3151
|
-
colIndex:
|
|
3152
|
-
rowIndex:
|
|
3154
|
+
} : (A = i, r?.(`Unknown formula error '${i}' in cell ${U.cellToString({
|
|
3155
|
+
colIndex: k,
|
|
3156
|
+
rowIndex: O
|
|
3153
3157
|
})}`));
|
|
3154
3158
|
break;
|
|
3155
3159
|
case "str":
|
|
3156
|
-
case "inlineStr":
|
|
3160
|
+
case "inlineStr": D = !0;
|
|
3157
3161
|
}
|
|
3158
|
-
|
|
3162
|
+
A !== null && e.pushAt(O, k, pe === void 0 || typeof A != "number" && typeof A != "boolean" ? A : me(A));
|
|
3159
3163
|
}
|
|
3160
3164
|
let c = y !== null;
|
|
3161
3165
|
if (y) {
|
|
3162
|
-
if (
|
|
3166
|
+
if (S === y) x = ne;
|
|
3163
3167
|
else {
|
|
3164
|
-
if (x =
|
|
3168
|
+
if (x = oe.get(y) ?? null, !x) {
|
|
3165
3169
|
let e = [];
|
|
3166
|
-
ee =
|
|
3170
|
+
ee = ie(i, O, k, e), x = [
|
|
3167
3171
|
ee,
|
|
3168
3172
|
e,
|
|
3169
3173
|
i
|
|
3170
|
-
],
|
|
3174
|
+
], oe.set(y, x);
|
|
3171
3175
|
}
|
|
3172
|
-
|
|
3176
|
+
S = y, ne = x;
|
|
3173
3177
|
}
|
|
3174
3178
|
y = null;
|
|
3175
3179
|
}
|
|
@@ -3186,43 +3190,43 @@ var ir = {
|
|
|
3186
3190
|
formula: n
|
|
3187
3191
|
};
|
|
3188
3192
|
})(i);
|
|
3189
|
-
n.kind !== "none" && (
|
|
3193
|
+
n.kind !== "none" && (C ??= new Gn(t), n.kind === "spilled" ? w = C.placeholder(O, k) : C.anchor(O, k, n.formula) && (e = n.formula, de ||= ((e) => Wn(e).some((e) => te(e) || !0 === Qe.get(e)?.getDeclaration().getReturnType()?.isVolatile()))(e)));
|
|
3190
3194
|
}
|
|
3191
|
-
if (
|
|
3195
|
+
if (w) de = !1;
|
|
3192
3196
|
else {
|
|
3193
3197
|
let t = [];
|
|
3194
|
-
ee =
|
|
3198
|
+
ee = ie(e, O, k, t), x = [
|
|
3195
3199
|
ee,
|
|
3196
3200
|
t,
|
|
3197
3201
|
e
|
|
3198
3202
|
];
|
|
3199
3203
|
}
|
|
3200
3204
|
}
|
|
3201
|
-
|
|
3202
|
-
},
|
|
3205
|
+
D ? a?.onText?.(t) : u || n?.onText?.(i);
|
|
3206
|
+
}, z = {
|
|
3203
3207
|
r: void 0,
|
|
3204
3208
|
t: void 0,
|
|
3205
3209
|
s: void 0,
|
|
3206
3210
|
cm: void 0,
|
|
3207
3211
|
vm: void 0
|
|
3208
|
-
},
|
|
3212
|
+
}, Re = {
|
|
3209
3213
|
name: "c",
|
|
3210
|
-
attributes:
|
|
3214
|
+
attributes: z,
|
|
3211
3215
|
isSelfClosing: !1
|
|
3212
|
-
},
|
|
3216
|
+
}, B = {
|
|
3213
3217
|
t: void 0,
|
|
3214
3218
|
si: void 0,
|
|
3215
3219
|
ref: void 0,
|
|
3216
3220
|
ca: void 0
|
|
3217
|
-
},
|
|
3221
|
+
}, ze = {
|
|
3218
3222
|
name: "f",
|
|
3219
|
-
attributes:
|
|
3223
|
+
attributes: B,
|
|
3220
3224
|
isSelfClosing: !1
|
|
3221
|
-
},
|
|
3225
|
+
}, Be = {
|
|
3222
3226
|
name: "v",
|
|
3223
3227
|
attributes: {},
|
|
3224
3228
|
isSelfClosing: !1
|
|
3225
|
-
},
|
|
3229
|
+
}, V = {
|
|
3226
3230
|
r: void 0,
|
|
3227
3231
|
s: void 0,
|
|
3228
3232
|
ht: void 0,
|
|
@@ -3231,56 +3235,56 @@ var ir = {
|
|
|
3231
3235
|
customHeight: void 0,
|
|
3232
3236
|
customFormat: void 0,
|
|
3233
3237
|
outlineLevel: void 0
|
|
3234
|
-
},
|
|
3238
|
+
}, Ve = {
|
|
3235
3239
|
name: "row",
|
|
3236
|
-
attributes:
|
|
3240
|
+
attributes: V,
|
|
3237
3241
|
isSelfClosing: !1
|
|
3238
|
-
},
|
|
3242
|
+
}, He = Nn.NEED_MORE, H = Nn.NOT_HANDLED, Ue = Nn.decodeText, We = !1, Ge = (e, t, n, r) => {
|
|
3239
3243
|
for (;;) {
|
|
3240
3244
|
let i = 0;
|
|
3241
3245
|
for (; t < n && ((i = e.charCodeAt(t)) === 32 || i === 9 || i === 10 || i === 13);) t++;
|
|
3242
|
-
if (t >= n) return
|
|
3243
|
-
if (i === 62) return
|
|
3244
|
-
if (i === 47) return t + 1 >= n ?
|
|
3246
|
+
if (t >= n) return He;
|
|
3247
|
+
if (i === 62) return We = !1, t + 1;
|
|
3248
|
+
if (i === 47) return t + 1 >= n ? He : e.charCodeAt(t + 1) === 62 ? (We = !0, t + 2) : H;
|
|
3245
3249
|
let a = t;
|
|
3246
3250
|
for (; t < n && (i = e.charCodeAt(t)) !== 61;) {
|
|
3247
|
-
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return
|
|
3251
|
+
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return H;
|
|
3248
3252
|
t++;
|
|
3249
3253
|
}
|
|
3250
|
-
if (t + 1 >= n) return
|
|
3254
|
+
if (t + 1 >= n) return He;
|
|
3251
3255
|
let o = t - a, s = e.charCodeAt(t + 1);
|
|
3252
|
-
if (s !== 34 && s !== 39) return
|
|
3256
|
+
if (s !== 34 && s !== 39) return H;
|
|
3253
3257
|
let c = t + 2, l = c;
|
|
3254
3258
|
for (; l < n && (i = e.charCodeAt(l)) !== s;) {
|
|
3255
|
-
if (i === 38 || i < 32) return
|
|
3259
|
+
if (i === 38 || i < 32) return H;
|
|
3256
3260
|
l++;
|
|
3257
3261
|
}
|
|
3258
|
-
if (l >= n) return
|
|
3262
|
+
if (l >= n) return He;
|
|
3259
3263
|
t = l + 1;
|
|
3260
3264
|
let u = e.charCodeAt(a);
|
|
3261
3265
|
if (r === 2) switch (o) {
|
|
3262
3266
|
case 1:
|
|
3263
|
-
u === 114 ?
|
|
3267
|
+
u === 114 ? V.r = e.slice(c, l) : u === 115 && (V.s = e.slice(c, l));
|
|
3264
3268
|
break;
|
|
3265
3269
|
case 2:
|
|
3266
|
-
e.startsWith("ht", a) && (
|
|
3270
|
+
e.startsWith("ht", a) && (V.ht = e.slice(c, l));
|
|
3267
3271
|
break;
|
|
3268
3272
|
case 6:
|
|
3269
|
-
e.startsWith("hidden", a) && (
|
|
3273
|
+
e.startsWith("hidden", a) && (V.hidden = e.slice(c, l));
|
|
3270
3274
|
break;
|
|
3271
3275
|
case 9:
|
|
3272
|
-
e.startsWith("collapsed", a) && (
|
|
3276
|
+
e.startsWith("collapsed", a) && (V.collapsed = e.slice(c, l));
|
|
3273
3277
|
break;
|
|
3274
|
-
case 12: e.startsWith("customHeight", a) ?
|
|
3278
|
+
case 12: e.startsWith("customHeight", a) ? V.customHeight = e.slice(c, l) : e.startsWith("customFormat", a) ? V.customFormat = e.slice(c, l) : e.startsWith("outlineLevel", a) && (V.outlineLevel = e.slice(c, l));
|
|
3275
3279
|
}
|
|
3276
|
-
else if (r === 0) o === 1 ? u === 114 ?
|
|
3277
|
-
else if (o === 1) u === 116 && (
|
|
3280
|
+
else if (r === 0) o === 1 ? u === 114 ? z.r = e.slice(c, l) : u === 116 ? z.t = e.slice(c, l) : u === 115 && (z.s = e.slice(c, l)) : o === 2 && e.charCodeAt(a + 1) === 109 && (u === 99 ? z.cm = e.slice(c, l) : u === 118 && (z.vm = e.slice(c, l)));
|
|
3281
|
+
else if (o === 1) u === 116 && (B.t = e.slice(c, l));
|
|
3278
3282
|
else if (o === 2) {
|
|
3279
3283
|
let t = e.charCodeAt(a + 1);
|
|
3280
|
-
u === 115 && t === 105 ?
|
|
3281
|
-
} else o === 3 && e.startsWith("ref", a) && (
|
|
3284
|
+
u === 115 && t === 105 ? B.si = e.slice(c, l) : u === 99 && t === 97 && (B.ca = e.slice(c, l));
|
|
3285
|
+
} else o === 3 && e.startsWith("ref", a) && (B.ref = e.slice(c, l));
|
|
3282
3286
|
}
|
|
3283
|
-
},
|
|
3287
|
+
}, Ke = (e, t, n) => e.charCodeAt(t + 1) === 47 && e.charCodeAt(t + 2) === n && e.charCodeAt(t + 3) === 62;
|
|
3284
3288
|
return {
|
|
3285
3289
|
...n,
|
|
3286
3290
|
onEnd: () => {
|
|
@@ -3298,10 +3302,10 @@ var ir = {
|
|
|
3298
3302
|
}
|
|
3299
3303
|
});
|
|
3300
3304
|
for (let r of d) r.min > e && t.push(n(e, r.min - 1)), e = Math.max(e, r.max + 1);
|
|
3301
|
-
e <=
|
|
3305
|
+
e <= Le && t.push(n(e, Le)), t.length > 0 && (M.push(...t), M.sort((e, t) => e.min - t.min));
|
|
3302
3306
|
}
|
|
3303
|
-
|
|
3304
|
-
let r =
|
|
3307
|
+
M.length > 0 && (t.rows = U.runsToRefs(M, !1));
|
|
3308
|
+
let r = ae.done(mr);
|
|
3305
3309
|
r = ((e, t) => {
|
|
3306
3310
|
let n = null;
|
|
3307
3311
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -3325,50 +3329,50 @@ var ir = {
|
|
|
3325
3329
|
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);
|
|
3326
3330
|
}
|
|
3327
3331
|
if (a !== (i.rowEnd - i.rowStart + 1) * (i.colEnd - i.colStart + 1)) continue;
|
|
3328
|
-
let o = Xn(
|
|
3332
|
+
let o = Xn(U.resolveRelativeToA1(n.value[1], i.rowStart, i.colStart), i);
|
|
3329
3333
|
if (o) {
|
|
3330
3334
|
t.push(o);
|
|
3331
3335
|
for (let t = 0; t < e.length; t++) r.add(e[t]);
|
|
3332
3336
|
}
|
|
3333
3337
|
}
|
|
3334
3338
|
return r.size === 0 ? e : e.filter((e) => !r.has(e));
|
|
3335
|
-
})(r,
|
|
3339
|
+
})(r, E);
|
|
3336
3340
|
let i = r.length;
|
|
3337
|
-
if (i > 0 ||
|
|
3341
|
+
if (i > 0 || E.length > 0) {
|
|
3338
3342
|
let e = Array(i);
|
|
3339
3343
|
for (let t = 0; t < i; t++) {
|
|
3340
|
-
let n = r[t], i =
|
|
3344
|
+
let n = r[t], i = U.rangeToString(n), a = n.value[1], o = U.resolveRelativeToA1(a, n.rowStart, n.colStart);
|
|
3341
3345
|
e[t] = [i, o];
|
|
3342
3346
|
}
|
|
3343
|
-
for (let t = 0; t <
|
|
3344
|
-
let n =
|
|
3345
|
-
e.push([
|
|
3347
|
+
for (let t = 0; t < E.length; t++) {
|
|
3348
|
+
let n = E[t], r = n.ref;
|
|
3349
|
+
e.push([U.cellToString({
|
|
3346
3350
|
rowIndex: r.rowStart,
|
|
3347
3351
|
colIndex: r.colStart
|
|
3348
|
-
}), p(n)]), T.push([
|
|
3352
|
+
}), p(n)]), T.push([U.rangeToString(r), "dynamic"]);
|
|
3349
3353
|
}
|
|
3350
3354
|
t.formulas = e;
|
|
3351
3355
|
}
|
|
3352
|
-
let a =
|
|
3356
|
+
let a = fe.done(!0), o = a.length;
|
|
3353
3357
|
if (o > 0) {
|
|
3354
3358
|
let e = Array(o);
|
|
3355
3359
|
for (let t = 0; t < o; t++) {
|
|
3356
|
-
let n = a[t], r =
|
|
3360
|
+
let n = a[t], r = U.rangeToString(n);
|
|
3357
3361
|
e[t] = r;
|
|
3358
3362
|
}
|
|
3359
3363
|
t.volatile = e;
|
|
3360
3364
|
}
|
|
3361
|
-
|
|
3365
|
+
C && T.push(...C.getFormulaArray()), T.length > 0 && (t.formulaArray = [...T]);
|
|
3362
3366
|
let s = _.length;
|
|
3363
3367
|
if (s > 0) {
|
|
3364
|
-
_.sort(
|
|
3368
|
+
_.sort(Ye.createRangeComparator(rt.Axis.Column));
|
|
3365
3369
|
let e = _[0], n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value, o = [];
|
|
3366
3370
|
o.push(e);
|
|
3367
3371
|
let c = null;
|
|
3368
3372
|
for (let t = 1; t < s; t++) c = _[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);
|
|
3369
3373
|
let l = o.length, u = Array(l);
|
|
3370
3374
|
for (let e = 0; e < l; e++) {
|
|
3371
|
-
let t = o[e], n =
|
|
3375
|
+
let t = o[e], n = U.rangeToString(t);
|
|
3372
3376
|
u[e] = [n, t.value];
|
|
3373
3377
|
}
|
|
3374
3378
|
t.directStyles = u;
|
|
@@ -3376,57 +3380,57 @@ var ir = {
|
|
|
3376
3380
|
let l = e.build();
|
|
3377
3381
|
l && (t.data = l.tuples), n?.onEnd?.();
|
|
3378
3382
|
},
|
|
3379
|
-
onOpenTag:
|
|
3380
|
-
onCloseTag:
|
|
3381
|
-
onText:
|
|
3383
|
+
onOpenTag: Pe,
|
|
3384
|
+
onCloseTag: Fe,
|
|
3385
|
+
onText: Ie,
|
|
3382
3386
|
elementScanners: [{
|
|
3383
3387
|
name: "c",
|
|
3384
3388
|
scan: (e, t, n) => {
|
|
3385
|
-
if (!u ||
|
|
3386
|
-
|
|
3387
|
-
let r =
|
|
3389
|
+
if (!u || j !== null) return H;
|
|
3390
|
+
z.r = z.t = z.s = z.cm = z.vm = void 0;
|
|
3391
|
+
let r = Ge(e, t + 2, n, 0);
|
|
3388
3392
|
if (r < 0) return r;
|
|
3389
|
-
let i =
|
|
3390
|
-
if (
|
|
3393
|
+
let i = z.t;
|
|
3394
|
+
if (z.r === void 0 || i === "str" || i === "inlineStr") return H;
|
|
3391
3395
|
let a = !1, o = -1, s = -1, c = -1, l = -1, d = r;
|
|
3392
|
-
if (!
|
|
3396
|
+
if (!We) for (B.t = B.si = B.ref = B.ca = void 0;;) {
|
|
3393
3397
|
let t = e.indexOf("<", r);
|
|
3394
|
-
if (t === -1 || t + 3 >= n) return
|
|
3398
|
+
if (t === -1 || t + 3 >= n) return He;
|
|
3395
3399
|
for (let n = r; n < t; n++) {
|
|
3396
3400
|
let t = e.charCodeAt(n);
|
|
3397
|
-
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return
|
|
3401
|
+
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return H;
|
|
3398
3402
|
}
|
|
3399
3403
|
let i = e.charCodeAt(t + 1), u = e.charCodeAt(t + 2);
|
|
3400
3404
|
if (i === 47) {
|
|
3401
|
-
if (!
|
|
3405
|
+
if (!Ke(e, t, 99)) return H;
|
|
3402
3406
|
d = t + 4;
|
|
3403
3407
|
break;
|
|
3404
3408
|
}
|
|
3405
3409
|
if (i === 102 && !a && c === -1 && (u === 32 || u === 62 || u === 47)) {
|
|
3406
|
-
if (a = !0, r =
|
|
3407
|
-
if (
|
|
3408
|
-
if (
|
|
3410
|
+
if (a = !0, r = Ge(e, t + 2, n, 1), r < 0) return r;
|
|
3411
|
+
if (B.t === "dataTable") return H;
|
|
3412
|
+
if (We) continue;
|
|
3409
3413
|
let i = e.indexOf("<", r);
|
|
3410
|
-
if (i === -1 || i + 3 >= n) return
|
|
3411
|
-
if (!
|
|
3414
|
+
if (i === -1 || i + 3 >= n) return He;
|
|
3415
|
+
if (!Ke(e, i, 102)) return H;
|
|
3412
3416
|
o = r, s = i, r = i + 4;
|
|
3413
3417
|
} else if (i === 118 && u === 62 && c === -1) {
|
|
3414
3418
|
let i = e.indexOf("<", t + 3);
|
|
3415
|
-
if (i === -1 || i + 3 >= n) return
|
|
3416
|
-
if (!
|
|
3419
|
+
if (i === -1 || i + 3 >= n) return He;
|
|
3420
|
+
if (!Ke(e, i, 118)) return H;
|
|
3417
3421
|
c = t + 3, l = i, r = i + 4;
|
|
3418
|
-
} else return
|
|
3422
|
+
} else return H;
|
|
3419
3423
|
}
|
|
3420
|
-
return
|
|
3424
|
+
return Pe(Re), a && (Pe(ze), s > o && Ie(Ue(e.slice(o, s))), Fe(ze)), c !== -1 && (Pe(Be), l > c && Ie(Ue(e.slice(c, l))), Fe(Be)), Fe(Re), d;
|
|
3421
3425
|
}
|
|
3422
3426
|
}, {
|
|
3423
3427
|
name: "row",
|
|
3424
|
-
openTag:
|
|
3428
|
+
openTag: Ve,
|
|
3425
3429
|
scan: (e, t, n) => {
|
|
3426
|
-
if (!
|
|
3427
|
-
|
|
3428
|
-
let r =
|
|
3429
|
-
return r < 0 ? r :
|
|
3430
|
+
if (!Ae || u || j !== null) return H;
|
|
3431
|
+
V.r = V.s = V.ht = V.hidden = V.collapsed = V.customHeight = V.customFormat = V.outlineLevel = void 0;
|
|
3432
|
+
let r = Ge(e, t + 4, n, 2);
|
|
3433
|
+
return r < 0 ? r : We || V.r === void 0 ? H : (Pe(Ve), r);
|
|
3430
3434
|
}
|
|
3431
3435
|
}]
|
|
3432
3436
|
};
|
|
@@ -3509,42 +3513,42 @@ var Tr = {
|
|
|
3509
3513
|
Company: "company",
|
|
3510
3514
|
Manager: "manager"
|
|
3511
3515
|
}, Dr = {
|
|
3512
|
-
lpwstr:
|
|
3513
|
-
lpstr:
|
|
3514
|
-
bstr:
|
|
3515
|
-
i1:
|
|
3516
|
-
i2:
|
|
3517
|
-
i4:
|
|
3518
|
-
i8:
|
|
3519
|
-
int:
|
|
3520
|
-
ui1:
|
|
3521
|
-
ui2:
|
|
3522
|
-
ui4:
|
|
3523
|
-
ui8:
|
|
3524
|
-
uint:
|
|
3525
|
-
r4:
|
|
3526
|
-
r8:
|
|
3527
|
-
decimal:
|
|
3528
|
-
bool:
|
|
3529
|
-
filetime:
|
|
3530
|
-
date:
|
|
3516
|
+
lpwstr: W.Type.String,
|
|
3517
|
+
lpstr: W.Type.String,
|
|
3518
|
+
bstr: W.Type.String,
|
|
3519
|
+
i1: W.Type.Number,
|
|
3520
|
+
i2: W.Type.Number,
|
|
3521
|
+
i4: W.Type.Number,
|
|
3522
|
+
i8: W.Type.Number,
|
|
3523
|
+
int: W.Type.Number,
|
|
3524
|
+
ui1: W.Type.Number,
|
|
3525
|
+
ui2: W.Type.Number,
|
|
3526
|
+
ui4: W.Type.Number,
|
|
3527
|
+
ui8: W.Type.Number,
|
|
3528
|
+
uint: W.Type.Number,
|
|
3529
|
+
r4: W.Type.Float,
|
|
3530
|
+
r8: W.Type.Float,
|
|
3531
|
+
decimal: W.Type.Float,
|
|
3532
|
+
bool: W.Type.Boolean,
|
|
3533
|
+
filetime: W.Type.Date,
|
|
3534
|
+
date: W.Type.Date
|
|
3531
3535
|
}, Or = (e) => {
|
|
3532
3536
|
let t = e.kind ? Dr[e.kind] : void 0;
|
|
3533
3537
|
if (!t) return null;
|
|
3534
3538
|
let n = e.value.trim(), r;
|
|
3535
|
-
if (t ===
|
|
3539
|
+
if (t === W.Type.String) r = {
|
|
3536
3540
|
key: e.key,
|
|
3537
3541
|
type: t,
|
|
3538
3542
|
value: e.value
|
|
3539
3543
|
};
|
|
3540
|
-
else if (t ===
|
|
3544
|
+
else if (t === W.Type.Boolean) {
|
|
3541
3545
|
if (n !== "true" && n !== "false" && n !== "1" && n !== "0") return null;
|
|
3542
3546
|
r = {
|
|
3543
3547
|
key: e.key,
|
|
3544
3548
|
type: t,
|
|
3545
3549
|
value: n === "true" || n === "1"
|
|
3546
3550
|
};
|
|
3547
|
-
} else if (t ===
|
|
3551
|
+
} else if (t === W.Type.Date) {
|
|
3548
3552
|
let i = new Date(n);
|
|
3549
3553
|
if (!n || isNaN(i.getTime())) return null;
|
|
3550
3554
|
r = {
|
|
@@ -3555,22 +3559,22 @@ var Tr = {
|
|
|
3555
3559
|
} else {
|
|
3556
3560
|
let i = Number(n);
|
|
3557
3561
|
if (!n || !Number.isFinite(i)) return null;
|
|
3558
|
-
let a = t ===
|
|
3562
|
+
let a = t === W.Type.Number && i >= -2147483648 && i <= 2147483647;
|
|
3559
3563
|
r = {
|
|
3560
3564
|
key: e.key,
|
|
3561
|
-
type: a ? t :
|
|
3565
|
+
type: a ? t : W.Type.Float,
|
|
3562
3566
|
value: i
|
|
3563
3567
|
};
|
|
3564
3568
|
}
|
|
3565
3569
|
return e.linkTarget && (r.linkTarget = e.linkTarget), r;
|
|
3566
3570
|
}, kr = "hiddenXfs", Ar = (e) => (Array.isArray(e) ? e[1] : e?.v)?.s, jr = (e) => {
|
|
3567
3571
|
if (!e || e.length === 0) return !1;
|
|
3568
|
-
let t =
|
|
3572
|
+
let t = U.refsToRuns(e, !0), n = 0;
|
|
3569
3573
|
for (let e of t) {
|
|
3570
3574
|
if (e.min > n || e.value?.s === void 0) return !1;
|
|
3571
3575
|
n = Math.max(n, e.max + 1);
|
|
3572
3576
|
}
|
|
3573
|
-
return n >
|
|
3577
|
+
return n > be;
|
|
3574
3578
|
}, Mr = (e, t) => {
|
|
3575
3579
|
e.protection = {
|
|
3576
3580
|
...e.protection,
|
|
@@ -3581,7 +3585,7 @@ var Tr = {
|
|
|
3581
3585
|
if (!n || n.length === 0) return;
|
|
3582
3586
|
let r = null, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (e, o, s, c) => {
|
|
3583
3587
|
let l = "";
|
|
3584
|
-
c && (l = a.get(c) ??
|
|
3588
|
+
c && (l = a.get(c) ?? qe.JSONStableStringify(c), a.set(c, l));
|
|
3585
3589
|
let u = `${e}|${o ?? ""}|${s ?? ""}|${l}`, d = i.get(u);
|
|
3586
3590
|
if (d !== void 0) return d;
|
|
3587
3591
|
let f = n[e], p = f ? Ir(f, o, s, c) : null, m = t?.get(e);
|
|
@@ -3589,11 +3593,11 @@ var Tr = {
|
|
|
3589
3593
|
if (!r) {
|
|
3590
3594
|
r = /* @__PURE__ */ new Map();
|
|
3591
3595
|
for (let e = 0; e < n.length; e++) {
|
|
3592
|
-
let i =
|
|
3596
|
+
let i = qe.JSONStableStringify(n[e]), a = t?.get(e);
|
|
3593
3597
|
a !== void 0 && (i += `|${a}`), r.has(i) || r.set(i, e);
|
|
3594
3598
|
}
|
|
3595
3599
|
}
|
|
3596
|
-
let a =
|
|
3600
|
+
let a = qe.JSONStableStringify(e);
|
|
3597
3601
|
i !== void 0 && (a += `|${i}`);
|
|
3598
3602
|
let o = r.get(a);
|
|
3599
3603
|
return o === void 0 && (o = n.length, n.push(e), r.set(a, o), i !== void 0 && t.set(o, i)), o;
|
|
@@ -3608,17 +3612,17 @@ var Tr = {
|
|
|
3608
3612
|
if (!t) continue;
|
|
3609
3613
|
let n = [];
|
|
3610
3614
|
for (let e of i) {
|
|
3611
|
-
let r =
|
|
3615
|
+
let r = U.fastStringToRange(e[0]), i = Ur(r, t.coords);
|
|
3612
3616
|
if (!i) {
|
|
3613
3617
|
n.push(e);
|
|
3614
3618
|
continue;
|
|
3615
3619
|
}
|
|
3616
3620
|
a = !0;
|
|
3617
|
-
for (let t of Wr(r, i)) n.push([
|
|
3621
|
+
for (let t of Wr(r, i)) n.push([U.rangeToString(t), e[1]]);
|
|
3618
3622
|
let { rowIndex: s, colIndex: c } = t.origin;
|
|
3619
3623
|
for (let r = i.rowStart; r <= i.rowEnd; r++) {
|
|
3620
3624
|
let a = i.colStart, l = null, u = (e) => {
|
|
3621
|
-
l !== null && n.push([
|
|
3625
|
+
l !== null && n.push([U.rangeToString({
|
|
3622
3626
|
rowStart: r,
|
|
3623
3627
|
rowEnd: r,
|
|
3624
3628
|
colStart: a,
|
|
@@ -3637,9 +3641,9 @@ var Tr = {
|
|
|
3637
3641
|
a && (e.directStyles = i);
|
|
3638
3642
|
}
|
|
3639
3643
|
}, Fr = (e, t) => {
|
|
3640
|
-
let n =
|
|
3644
|
+
let n = G(e, t);
|
|
3641
3645
|
if (!n || !e.location) return null;
|
|
3642
|
-
let r =
|
|
3646
|
+
let r = U.fastStringToRange(e.location), i = {
|
|
3643
3647
|
rowIndex: r.rowStart - n.top,
|
|
3644
3648
|
colIndex: r.colStart
|
|
3645
3649
|
};
|
|
@@ -3660,7 +3664,7 @@ var Tr = {
|
|
|
3660
3664
|
i = t;
|
|
3661
3665
|
}
|
|
3662
3666
|
let o = i.alignment;
|
|
3663
|
-
if (n !== null && o?.horizontal ===
|
|
3667
|
+
if (n !== null && o?.horizontal === it.HorizontalAlignment.Left && (o.indent ?? 0) === n) {
|
|
3664
3668
|
let { horizontal: e, indent: t, ...n } = o, { alignment: r, ...a } = i;
|
|
3665
3669
|
i = Hr(n) ? a : {
|
|
3666
3670
|
...a,
|
|
@@ -3675,9 +3679,9 @@ var Tr = {
|
|
|
3675
3679
|
}
|
|
3676
3680
|
}
|
|
3677
3681
|
if (i === e) return e;
|
|
3678
|
-
for (let e of Object.keys(i)) if (i[e] !== void 0 && (e !== "named" || i.named !==
|
|
3682
|
+
for (let e of Object.keys(i)) if (i[e] !== void 0 && (e !== "named" || i.named !== $e.BuiltInName.Normal)) return i;
|
|
3679
3683
|
return null;
|
|
3680
|
-
}, Lr = (e, t) => e === t ||
|
|
3684
|
+
}, Lr = (e, t) => e === t || at.toBuiltInID(e) === at.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 : qe.JSONStableStringify(e) === qe.JSONStableStringify(t)), Br = (e, t) => {
|
|
3681
3685
|
let n = null, r = (t, r) => {
|
|
3682
3686
|
n ??= { ...e }, r === void 0 ? delete n[t] : n[t] = r;
|
|
3683
3687
|
};
|
|
@@ -3693,9 +3697,9 @@ var Tr = {
|
|
|
3693
3697
|
}
|
|
3694
3698
|
return n ?? e;
|
|
3695
3699
|
}, Vr = {
|
|
3696
|
-
vertical:
|
|
3700
|
+
vertical: it.VerticalAlignment.Bottom,
|
|
3697
3701
|
relativeIndent: 0,
|
|
3698
|
-
overflow:
|
|
3702
|
+
overflow: it.Overflow.Visible,
|
|
3699
3703
|
rotation: 0
|
|
3700
3704
|
}, Hr = (e) => Object.keys(e).every((t) => e[t] === void 0 || Vr[t] === e[t]), Ur = (e, t) => {
|
|
3701
3705
|
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);
|
|
@@ -3728,7 +3732,7 @@ var Tr = {
|
|
|
3728
3732
|
if (typeof e == "string") return void t.push(e);
|
|
3729
3733
|
let n = Array.isArray(e) ? e : [e];
|
|
3730
3734
|
for (let e = 0; e < n.length; e++) {
|
|
3731
|
-
let r =
|
|
3735
|
+
let r = U.rangeToString(n[e]);
|
|
3732
3736
|
r && t.push(r);
|
|
3733
3737
|
}
|
|
3734
3738
|
}, qr = (e) => {
|
|
@@ -3740,7 +3744,7 @@ var Tr = {
|
|
|
3740
3744
|
if (!e) return;
|
|
3741
3745
|
let i = t ? 2 : 1, a = t ? n.rowStart : n.colStart, o = t ? n.rowEnd : n.colEnd, s, c = -1;
|
|
3742
3746
|
for (let n of e) {
|
|
3743
|
-
let e =
|
|
3747
|
+
let e = U.refToRun(n, t), l = qr(n);
|
|
3744
3748
|
e && l !== void 0 ? l !== c || (t ? s.colEnd : s.rowEnd) + 1 !== e.min ? (s = {
|
|
3745
3749
|
colStart: t ? e.min : a,
|
|
3746
3750
|
rowStart: t ? a : e.min,
|
|
@@ -3796,51 +3800,51 @@ var Tr = {
|
|
|
3796
3800
|
225
|
|
3797
3801
|
], $r = /^xl\/worksheets\/[^/]+\.xml$/i, ei = (e) => typeof e == "string" ? e : (e?.runs ?? []).map((e) => e.text ?? "").join(""), ti = async (e, n) => {
|
|
3798
3802
|
let { password: o, onVBA: s, profile: u, calcOnLoad: p = "auto", createWorkbookOptions: h = {}, ...v } = n ?? {};
|
|
3799
|
-
await
|
|
3800
|
-
let te = !!h.origin && typeof h.origin != "string", x = u ? new
|
|
3801
|
-
|
|
3803
|
+
await Ze.load();
|
|
3804
|
+
let te = !!h.origin && typeof h.origin != "string", x = u ? new Mt(typeof u == "function" ? u : void 0) : null, S = [], ne = (e, t, n) => {
|
|
3805
|
+
S.push([
|
|
3802
3806
|
e,
|
|
3803
3807
|
t ?? "",
|
|
3804
3808
|
n
|
|
3805
3809
|
]);
|
|
3806
|
-
},
|
|
3810
|
+
}, C = { onWarning: ne }, w = n?.progress, ie = w?.onProgress ? w.onProgress.bind(w) : void 0, oe = e.byteLength, T = 0, ce = 0, ue = ie ? (e) => {
|
|
3807
3811
|
if (T <= 0) return;
|
|
3808
|
-
|
|
3809
|
-
let t = Math.min(
|
|
3810
|
-
|
|
3811
|
-
} : void 0,
|
|
3812
|
+
ce += e;
|
|
3813
|
+
let t = Math.min(oe, Math.round(ce / T * oe));
|
|
3814
|
+
ie(t, oe);
|
|
3815
|
+
} : void 0, fe = import("./cG4z0eDMlE49HJvD.mjs"), pe = null;
|
|
3812
3816
|
try {
|
|
3813
|
-
|
|
3817
|
+
pe = new DOMParser();
|
|
3814
3818
|
} catch {}
|
|
3815
|
-
let
|
|
3819
|
+
let D = null;
|
|
3816
3820
|
try {
|
|
3817
|
-
|
|
3821
|
+
D = new XMLSerializer();
|
|
3818
3822
|
} catch {}
|
|
3819
|
-
let
|
|
3820
|
-
|
|
3823
|
+
let O, k, A, j = null;
|
|
3824
|
+
pe || (j = import("./f-Z5vnvNnzj-0ujR.mjs").then((e) => t(e.default, 1)));
|
|
3821
3825
|
try {
|
|
3822
|
-
let [e, t] = await Promise.all([
|
|
3823
|
-
|
|
3826
|
+
let [e, t] = await Promise.all([j, fe]);
|
|
3827
|
+
O = new t.DOMTransformer(), k = pe ?? new e.DOMParser(), A = D ?? new e.XMLSerializer();
|
|
3824
3828
|
} catch (e) {
|
|
3825
3829
|
throw Error("Unable to load XLSX parser.", { cause: e });
|
|
3826
3830
|
}
|
|
3827
|
-
let
|
|
3831
|
+
let me = (e) => A.serializeToString(e);
|
|
3828
3832
|
if (((e) => {
|
|
3829
3833
|
if (e.byteLength < Qr.length) return !1;
|
|
3830
3834
|
let t = new Uint8Array(e, 0, Qr.length);
|
|
3831
3835
|
return Qr.every((e, n) => t[n] === e);
|
|
3832
|
-
})(e)) throw new
|
|
3833
|
-
let
|
|
3836
|
+
})(e)) throw new We("This is an Excel 97-2003 workbook (.xls), which cannot be read. Save it as '.xlsx' and try again.");
|
|
3837
|
+
let M;
|
|
3834
3838
|
try {
|
|
3835
|
-
|
|
3839
|
+
M = await jt.create(e);
|
|
3836
3840
|
} catch (e) {
|
|
3837
|
-
throw new
|
|
3841
|
+
throw new We("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.", { cause: e });
|
|
3838
3842
|
}
|
|
3839
3843
|
x?.mark("zip-open");
|
|
3840
3844
|
try {
|
|
3841
|
-
if (!
|
|
3845
|
+
if (!M.has("[Content_Types].xml")) throw new We("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3842
3846
|
let e = (e) => {
|
|
3843
|
-
let t =
|
|
3847
|
+
let t = M.getEntry(e);
|
|
3844
3848
|
return t ? { content: t } : void 0;
|
|
3845
3849
|
}, t = {
|
|
3846
3850
|
workbooks: [],
|
|
@@ -3890,23 +3894,23 @@ var Tr = {
|
|
|
3890
3894
|
t?.(`Error parsing content types: ${e?.message ?? e}`);
|
|
3891
3895
|
}
|
|
3892
3896
|
}))(t, (e) => {
|
|
3893
|
-
|
|
3894
|
-
}), n = await
|
|
3897
|
+
S.push([e, "[Content_Types].xml"]);
|
|
3898
|
+
}), n = await M.getTextStream("[Content_Types].xml");
|
|
3895
3899
|
if (!n) throw Error("Error parsing content types: '[Content_Types].xml'");
|
|
3896
3900
|
try {
|
|
3897
3901
|
await Sn.parseStream(n, e, { xmlns: !1 });
|
|
3898
3902
|
} catch (e) {
|
|
3899
3903
|
throw Error("Error parsing content types: '[Content_Types].xml'", { cause: e });
|
|
3900
3904
|
}
|
|
3901
|
-
te && await
|
|
3905
|
+
te && await M.getBuffer("[Content_Types].xml");
|
|
3902
3906
|
}
|
|
3903
3907
|
x?.mark("content-types");
|
|
3904
3908
|
let n = t.sst, o = /* @__PURE__ */ new Set();
|
|
3905
3909
|
for (let e of t.sheets) o.add(Zr(e));
|
|
3906
3910
|
n && o.add(Zr(n));
|
|
3907
|
-
for (let e of o) T +=
|
|
3908
|
-
if (await
|
|
3909
|
-
let n =
|
|
3911
|
+
for (let e of o) T += M.uncompressedSize(e);
|
|
3912
|
+
if (await M.prefetch((e) => !o.has(e) && !$r.test(e)), x?.mark("prefetch-side-parts"), t.workbooks.length === 0) {
|
|
3913
|
+
let n = E("_rels/.rels", e, k, O, C);
|
|
3910
3914
|
if (n) {
|
|
3911
3915
|
for (let e of n.values()) if (e.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" && e.target) {
|
|
3912
3916
|
t.workbooks.push(e.target);
|
|
@@ -3914,40 +3918,40 @@ var Tr = {
|
|
|
3914
3918
|
}
|
|
3915
3919
|
}
|
|
3916
3920
|
}
|
|
3917
|
-
if (t.workbooks.length === 0) throw new
|
|
3918
|
-
let v = h?.resources ?? new
|
|
3919
|
-
|
|
3921
|
+
if (t.workbooks.length === 0) throw new We("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3922
|
+
let v = h?.resources ?? new ct(), ce = v.beginPersist(), fe = {}, pe = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Map();
|
|
3923
|
+
D.set("parseInlineDxf", (e) => {
|
|
3920
3924
|
if (!e) return;
|
|
3921
|
-
let t =
|
|
3925
|
+
let t = k.parseFromString(`<dxf xmlns:x14="${de}" xmlns:xm="${Ve}">${e}</dxf>`, "text/xml")?.documentElement;
|
|
3922
3926
|
if (!t) return;
|
|
3923
|
-
let n =
|
|
3927
|
+
let n = O.parseDxf(t, "", C);
|
|
3924
3928
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
3925
3929
|
});
|
|
3926
|
-
let
|
|
3927
|
-
|
|
3928
|
-
let
|
|
3929
|
-
|
|
3930
|
-
},
|
|
3930
|
+
let A = r("metadata", t, e, k, O, C).entries().next()?.value?.[1]?.metadata;
|
|
3931
|
+
A && D.set("metadata", A), D.set(sr, d());
|
|
3932
|
+
let j = /* @__PURE__ */ new Map(), ge = [], _e = /* @__PURE__ */ new Set(), N = (e) => {
|
|
3933
|
+
_e.add(Zr(e));
|
|
3934
|
+
}, P = (t, n = j) => {
|
|
3931
3935
|
let r = t.lastIndexOf("/"), i = t.substring(0, r + 1) + "_rels/" + t.substring(r + 1, t.length) + ".rels", a = n.get(i);
|
|
3932
|
-
return a || (a =
|
|
3933
|
-
},
|
|
3934
|
-
let a =
|
|
3936
|
+
return a || (a = E(i, e, k, O, B), n.set(i, a)), a;
|
|
3937
|
+
}, I = (t, n, r, i = j) => {
|
|
3938
|
+
let a = P(n, i).get(t), o = a?.target;
|
|
3935
3939
|
if (!o) return null;
|
|
3936
3940
|
if (a.targetMode === "External") {
|
|
3937
3941
|
if (!r) return a.target;
|
|
3938
3942
|
let e = v.add({ source: { external: a.target } });
|
|
3939
|
-
return e.addReference(
|
|
3943
|
+
return e.addReference(fe), pe.add(e), ce.toResourceId(e);
|
|
3940
3944
|
}
|
|
3941
3945
|
let s = n.lastIndexOf("/"), c = n.substring(0, s + 1);
|
|
3942
|
-
o.startsWith("/") || (o = c + o), o =
|
|
3943
|
-
let l =
|
|
3946
|
+
o.startsWith("/") || (o = c + o), o = R(o);
|
|
3947
|
+
let l = O?.getVisitorParamsState().get("dxfs"), u = i.get(o);
|
|
3944
3948
|
if (!u) {
|
|
3945
3949
|
if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
3946
3950
|
let e = {};
|
|
3947
|
-
u = e,
|
|
3948
|
-
let t = fr(e, (e, t) => t === "legacyDrawing" ?
|
|
3949
|
-
|
|
3950
|
-
}, void 0,
|
|
3951
|
+
u = e, ge.push((async () => {
|
|
3952
|
+
let t = fr(e, (e, t) => t === "legacyDrawing" ? xe(e, o) : t === "formControl" ? Se(e, o) : t === "part" ? Te(e, o) : I(e, o, t === "resource") ?? null, Je, l, () => {}, (e, t, n) => {
|
|
3953
|
+
ne(e, t ? `${t} (${o})` : o, n);
|
|
3954
|
+
}, void 0, D), n = await M.getTextStream(o, ue);
|
|
3951
3955
|
if (n) try {
|
|
3952
3956
|
await Sn.parseStream(n, t, {
|
|
3953
3957
|
xmlns: !1,
|
|
@@ -3956,21 +3960,21 @@ var Tr = {
|
|
|
3956
3960
|
} catch (e) {
|
|
3957
3961
|
throw Error(`Error parsing sheet: '${o}'`, { cause: e });
|
|
3958
3962
|
}
|
|
3959
|
-
let r =
|
|
3963
|
+
let r = P(o, i);
|
|
3960
3964
|
if (r) {
|
|
3961
|
-
|
|
3965
|
+
ye(e, o, r, i), ke(e), he(e);
|
|
3962
3966
|
let t = [];
|
|
3963
3967
|
r.forEach((e, n) => {
|
|
3964
3968
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable") return;
|
|
3965
|
-
let r =
|
|
3969
|
+
let r = Te(n, o, e.type, (e) => e !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition");
|
|
3966
3970
|
if (!r?.xml) return;
|
|
3967
3971
|
let i = /<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0] ?? "", a = parseInt(/\scacheId="(\d+)"/.exec(i)?.[1] ?? "", 10);
|
|
3968
|
-
if (isNaN(a)) return void
|
|
3969
|
-
let s = /\sname="([^"]*)"/.exec(i)?.[1], c =
|
|
3970
|
-
if (!c) return void
|
|
3971
|
-
let l =
|
|
3972
|
+
if (isNaN(a)) return void S.push([`Pivot table '${r.name}' names no cache and was dropped.`, o]);
|
|
3973
|
+
let s = /\sname="([^"]*)"/.exec(i)?.[1], c = Ie(r.xml);
|
|
3974
|
+
if (!c) return void S.push([`Pivot table '${r.name}' states no location and was dropped.`, o]);
|
|
3975
|
+
let l = O?.getVisitorParamsState(), u = Ne(l?.get("numFmts"), l?.get("dxfs")), d = we(r.xml, u), f = d ? void 0 : F(r.xml, u);
|
|
3972
3976
|
t.push({
|
|
3973
|
-
...s ? { name:
|
|
3977
|
+
...s ? { name: ae(s) } : {},
|
|
3974
3978
|
cacheId: a,
|
|
3975
3979
|
location: c,
|
|
3976
3980
|
part: r,
|
|
@@ -3981,12 +3985,12 @@ var Tr = {
|
|
|
3981
3985
|
}
|
|
3982
3986
|
})());
|
|
3983
3987
|
} else if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink") {
|
|
3984
|
-
let t = ee(o, e,
|
|
3988
|
+
let t = ee(o, e, k, O, B);
|
|
3985
3989
|
if (t && Object.keys(t).length !== 0) {
|
|
3986
3990
|
let e = t, n = e.__bookRelId, r = e.__absoluteUrlRelId;
|
|
3987
3991
|
delete e.__bookRelId, delete e.__absoluteUrlRelId;
|
|
3988
3992
|
let a = [];
|
|
3989
|
-
|
|
3993
|
+
P(o, i)?.forEach((e, t) => {
|
|
3990
3994
|
if (e.targetMode === "External" && e.type && e.target) {
|
|
3991
3995
|
let i = {
|
|
3992
3996
|
type: e.type,
|
|
@@ -3994,25 +3998,25 @@ var Tr = {
|
|
|
3994
3998
|
};
|
|
3995
3999
|
t === n ? i.role = "book" : t === r && (i.role = "absoluteUrl"), a.push(i);
|
|
3996
4000
|
}
|
|
3997
|
-
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a,
|
|
4001
|
+
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a, N(o), u = e;
|
|
3998
4002
|
} else u = null;
|
|
3999
|
-
} else u = r ?
|
|
4003
|
+
} else u = r ? le(o, e, (e, t) => {
|
|
4000
4004
|
let n = v.add({ source: { buffer: e } });
|
|
4001
|
-
return n.addReference(
|
|
4002
|
-
},
|
|
4005
|
+
return n.addReference(fe), pe.add(n), ce.toResourceId(n);
|
|
4006
|
+
}, B) : ee(o, e, k, O, B);
|
|
4003
4007
|
}
|
|
4004
4008
|
return u;
|
|
4005
|
-
},
|
|
4009
|
+
}, L = (e, t) => {
|
|
4006
4010
|
if (!e) return null;
|
|
4007
|
-
let n =
|
|
4011
|
+
let n = P(t, j)?.get(e);
|
|
4008
4012
|
if (!n?.target || n.targetMode === "External") return null;
|
|
4009
4013
|
let r = n.target;
|
|
4010
|
-
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r),
|
|
4011
|
-
},
|
|
4014
|
+
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r), R(r);
|
|
4015
|
+
}, ye = (e, t, n, r) => {
|
|
4012
4016
|
let i = [], o = /* @__PURE__ */ new Map(), s = [];
|
|
4013
4017
|
n.forEach((e, n) => {
|
|
4014
4018
|
if (e.type !== "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment") return;
|
|
4015
|
-
let a =
|
|
4019
|
+
let a = I(n, t, !1, r)?.comments;
|
|
4016
4020
|
if (!a) return;
|
|
4017
4021
|
for (let e = 0; e < a.length; e++) {
|
|
4018
4022
|
let t = a[e];
|
|
@@ -4029,8 +4033,8 @@ var Tr = {
|
|
|
4029
4033
|
v: u
|
|
4030
4034
|
}));
|
|
4031
4035
|
}
|
|
4032
|
-
let c =
|
|
4033
|
-
c &&
|
|
4036
|
+
let c = L(n, t);
|
|
4037
|
+
c && N(c);
|
|
4034
4038
|
});
|
|
4035
4039
|
for (let e = 0; e < s.length; e++) {
|
|
4036
4040
|
let { parentId: t, json: n } = s[e], r = o.get(t);
|
|
@@ -4039,7 +4043,7 @@ var Tr = {
|
|
|
4039
4043
|
let l = [];
|
|
4040
4044
|
if (n.forEach((e, n) => {
|
|
4041
4045
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") return;
|
|
4042
|
-
let i =
|
|
4046
|
+
let i = I(n, t, !1, r), a = i?.comments;
|
|
4043
4047
|
if (!a) return;
|
|
4044
4048
|
let s = i?.authors;
|
|
4045
4049
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -4047,21 +4051,21 @@ var Tr = {
|
|
|
4047
4051
|
if (!t?.r) continue;
|
|
4048
4052
|
let n = s && t.v.authorId !== void 0 ? s[t.v.authorId] : void 0;
|
|
4049
4053
|
if (n && n.startsWith("tc=")) {
|
|
4050
|
-
if (o.has(
|
|
4054
|
+
if (o.has(z(n.substring(3)))) continue;
|
|
4051
4055
|
n = void 0;
|
|
4052
4056
|
}
|
|
4053
4057
|
let r = {
|
|
4054
|
-
id:
|
|
4058
|
+
id: Ue.uuidV4().toUpperCase(),
|
|
4055
4059
|
asNote: !0,
|
|
4056
4060
|
content: t.v.content ?? ""
|
|
4057
|
-
}, i = n ?
|
|
4061
|
+
}, i = n ? Re({ displayName: n }) : void 0;
|
|
4058
4062
|
i && (r.personId = i.id), l.push({
|
|
4059
4063
|
r: t.r,
|
|
4060
4064
|
v: r
|
|
4061
4065
|
});
|
|
4062
4066
|
}
|
|
4063
|
-
let c =
|
|
4064
|
-
c &&
|
|
4067
|
+
let c = L(n, t);
|
|
4068
|
+
c && N(c);
|
|
4065
4069
|
}), i.length === 0 && l.length === 0) return;
|
|
4066
4070
|
let u = [...i, ...l], d = e.legacyDrawing;
|
|
4067
4071
|
if (d?.xml) {
|
|
@@ -4070,7 +4074,7 @@ var Tr = {
|
|
|
4070
4074
|
let r = /* @__PURE__ */ new Map();
|
|
4071
4075
|
for (let e = 0; e < n.length; e++) {
|
|
4072
4076
|
let t = n[e];
|
|
4073
|
-
r.set(
|
|
4077
|
+
r.set(U.cellToString({
|
|
4074
4078
|
rowIndex: t.row,
|
|
4075
4079
|
colIndex: t.col
|
|
4076
4080
|
}), t);
|
|
@@ -4078,7 +4082,7 @@ var Tr = {
|
|
|
4078
4082
|
for (let e = 0; e < u.length; e++) {
|
|
4079
4083
|
let t = u[e], n = r.get(String(t.r).toUpperCase());
|
|
4080
4084
|
if (!n || (r.delete(String(t.r).toUpperCase()), !t.v.asNote)) continue;
|
|
4081
|
-
let i =
|
|
4085
|
+
let i = re(n.xml), a = {};
|
|
4082
4086
|
if (i.anchor) {
|
|
4083
4087
|
let [e, t, r, o, s, c, l, u] = i.anchor;
|
|
4084
4088
|
a.anchor = {
|
|
@@ -4107,29 +4111,29 @@ var Tr = {
|
|
|
4107
4111
|
}
|
|
4108
4112
|
}
|
|
4109
4113
|
e.comments = u;
|
|
4110
|
-
},
|
|
4111
|
-
let r =
|
|
4114
|
+
}, xe = (t, n) => {
|
|
4115
|
+
let r = L(t, n);
|
|
4112
4116
|
if (!r) return null;
|
|
4113
4117
|
let i = e(Zr(r));
|
|
4114
4118
|
if (!i) return null;
|
|
4115
4119
|
let a = { xml: wr(new TextDecoder("utf-8").decode(i.content)) }, o = [];
|
|
4116
|
-
return
|
|
4120
|
+
return P(r, j)?.forEach((e, t) => {
|
|
4117
4121
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") return;
|
|
4118
|
-
let n =
|
|
4122
|
+
let n = I(t, r, !0);
|
|
4119
4123
|
typeof n == "number" && o.push({
|
|
4120
4124
|
id: t,
|
|
4121
4125
|
resId: n
|
|
4122
4126
|
});
|
|
4123
|
-
}), o.length > 0 && (a.images = o),
|
|
4124
|
-
},
|
|
4125
|
-
let r =
|
|
4127
|
+
}), o.length > 0 && (a.images = o), N(r), a;
|
|
4128
|
+
}, Se = (t, n) => {
|
|
4129
|
+
let r = L(t, n);
|
|
4126
4130
|
if (!r) return null;
|
|
4127
|
-
let i = ee(r, e,
|
|
4128
|
-
return i &&
|
|
4129
|
-
},
|
|
4130
|
-
let s =
|
|
4131
|
+
let i = ee(r, e, k, O, B)?.formControl ?? null;
|
|
4132
|
+
return i && N(r), i;
|
|
4133
|
+
}, Te = (n, r, i, a, o = /* @__PURE__ */ new Set()) => {
|
|
4134
|
+
let s = L(n, r);
|
|
4131
4135
|
if (!s || o.has(s)) return null;
|
|
4132
|
-
let c = i ??
|
|
4136
|
+
let c = i ?? P(r, j)?.get(n)?.type;
|
|
4133
4137
|
if (!c) return null;
|
|
4134
4138
|
let l = e(Zr(s));
|
|
4135
4139
|
if (!l) return null;
|
|
@@ -4141,15 +4145,15 @@ var Tr = {
|
|
|
4141
4145
|
};
|
|
4142
4146
|
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);
|
|
4143
4147
|
else {
|
|
4144
|
-
let e =
|
|
4148
|
+
let e = I(n, r, !0);
|
|
4145
4149
|
if (typeof e != "number") return null;
|
|
4146
4150
|
f.resId = e;
|
|
4147
4151
|
}
|
|
4148
4152
|
let p = [];
|
|
4149
|
-
return
|
|
4153
|
+
return P(s, j)?.forEach((e, t) => {
|
|
4150
4154
|
if (!e?.type || a && !a(e.type)) return;
|
|
4151
4155
|
if (e.targetMode === "External") {
|
|
4152
|
-
let n =
|
|
4156
|
+
let n = I(t, s, !0);
|
|
4153
4157
|
typeof n == "number" && p.push({
|
|
4154
4158
|
id: t,
|
|
4155
4159
|
type: e.type,
|
|
@@ -4157,32 +4161,32 @@ var Tr = {
|
|
|
4157
4161
|
});
|
|
4158
4162
|
return;
|
|
4159
4163
|
}
|
|
4160
|
-
let n =
|
|
4164
|
+
let n = Te(t, s, e.type, a, o);
|
|
4161
4165
|
n && p.push(n);
|
|
4162
|
-
}), p.length > 0 && (f.parts = p),
|
|
4163
|
-
},
|
|
4164
|
-
|
|
4165
|
-
e?.custom &&
|
|
4166
|
+
}), p.length > 0 && (f.parts = p), N(s), f;
|
|
4167
|
+
}, De = r("coreprops", t, e, k, O, C), Oe = r("extprops", t, e, k, O, C), Ae = r("custprops", t, e, k, O, C);
|
|
4168
|
+
Ae.forEach((e, t) => {
|
|
4169
|
+
e?.custom && N(t);
|
|
4166
4170
|
});
|
|
4167
|
-
let
|
|
4168
|
-
if (
|
|
4169
|
-
let [e, t] =
|
|
4170
|
-
|
|
4171
|
-
}
|
|
4172
|
-
let
|
|
4173
|
-
if (e) return
|
|
4174
|
-
},
|
|
4175
|
-
paramMap:
|
|
4176
|
-
getRefs:
|
|
4177
|
-
getRef:
|
|
4178
|
-
parsedRefs:
|
|
4179
|
-
readEmbeddedPart: (e, t) =>
|
|
4180
|
-
addPerson:
|
|
4181
|
-
serializeElement:
|
|
4182
|
-
onWarning:
|
|
4183
|
-
},
|
|
4184
|
-
if (
|
|
4185
|
-
let e = await
|
|
4171
|
+
let je = new st(), Pe = r("people", t, e, k, O, C);
|
|
4172
|
+
if (Pe.size > 0) {
|
|
4173
|
+
let [e, t] = Pe.entries().next().value;
|
|
4174
|
+
je.fromJSON(t?.persons), N(e);
|
|
4175
|
+
}
|
|
4176
|
+
let Re = (e) => {
|
|
4177
|
+
if (e) return je.add(e).toJSON();
|
|
4178
|
+
}, B = {
|
|
4179
|
+
paramMap: D,
|
|
4180
|
+
getRefs: P,
|
|
4181
|
+
getRef: I,
|
|
4182
|
+
parsedRefs: j,
|
|
4183
|
+
readEmbeddedPart: (e, t) => Te(e, t),
|
|
4184
|
+
addPerson: Re,
|
|
4185
|
+
serializeElement: me,
|
|
4186
|
+
onWarning: ne
|
|
4187
|
+
}, ze = [], Be = /* @__PURE__ */ new Map();
|
|
4188
|
+
if (D.set(ur, Be), n) {
|
|
4189
|
+
let e = await M.getTextStream(n, ue);
|
|
4186
4190
|
if (e) {
|
|
4187
4191
|
let t = ((e, t) => {
|
|
4188
4192
|
let n = !1, r = !1, i = 0, a = "", o = new nr();
|
|
@@ -4203,9 +4207,9 @@ var Tr = {
|
|
|
4203
4207
|
}
|
|
4204
4208
|
};
|
|
4205
4209
|
})((e, t) => {
|
|
4206
|
-
t &&
|
|
4210
|
+
t && Be.set(ze.length, t), ze.push(e);
|
|
4207
4211
|
}, (e) => {
|
|
4208
|
-
|
|
4212
|
+
ne(e, n);
|
|
4209
4213
|
});
|
|
4210
4214
|
try {
|
|
4211
4215
|
await Sn.parseStream(e, t, { xmlns: !1 });
|
|
@@ -4215,37 +4219,37 @@ var Tr = {
|
|
|
4215
4219
|
}
|
|
4216
4220
|
}
|
|
4217
4221
|
x?.mark("shared-strings");
|
|
4218
|
-
let
|
|
4219
|
-
let t =
|
|
4222
|
+
let V = ze.length, He = /* @__PURE__ */ new Map(), qe = V, Je = (e) => {
|
|
4223
|
+
let t = He.get(e);
|
|
4220
4224
|
if (t !== void 0) return t;
|
|
4221
|
-
let n =
|
|
4222
|
-
return
|
|
4223
|
-
},
|
|
4224
|
-
t.slicersCache =
|
|
4225
|
-
let
|
|
4226
|
-
for (let e = 0; e <
|
|
4227
|
-
let t =
|
|
4228
|
-
t && (t.startsWith("xl/slicerCache") || t.startsWith("xl/timelineCaches/") && t.endsWith(".xml")) &&
|
|
4229
|
-
}
|
|
4230
|
-
let
|
|
4231
|
-
|
|
4232
|
-
e?.cacheName && (e.cachePath = t,
|
|
4233
|
-
}),
|
|
4234
|
-
let
|
|
4235
|
-
t.slicers =
|
|
4236
|
-
for (let e = 0; e <
|
|
4237
|
-
let t =
|
|
4238
|
-
t && (t.startsWith("xl/slicers/") || t.startsWith("xl/timelines/")) && t.endsWith(".xml") &&
|
|
4239
|
-
}
|
|
4240
|
-
let
|
|
4225
|
+
let n = qe;
|
|
4226
|
+
return He.set(e, qe++), ze.push(e), n;
|
|
4227
|
+
}, Ye = [];
|
|
4228
|
+
t.slicersCache = Ye;
|
|
4229
|
+
let Xe = M.getNames(), Ze = Xe.length;
|
|
4230
|
+
for (let e = 0; e < Ze; e++) {
|
|
4231
|
+
let t = Xe[e];
|
|
4232
|
+
t && (t.startsWith("xl/slicerCache") || t.startsWith("xl/timelineCaches/") && t.endsWith(".xml")) && Ye.push(`/${t}`);
|
|
4233
|
+
}
|
|
4234
|
+
let et = r("slicersCache", t, e, k, O, B), tt = /* @__PURE__ */ new Map();
|
|
4235
|
+
et.forEach((e, t) => {
|
|
4236
|
+
e?.cacheName && (e.cachePath = t, tt.set(e.cacheName, e));
|
|
4237
|
+
}), D.set("slicerCaches", tt);
|
|
4238
|
+
let W = [];
|
|
4239
|
+
t.slicers = W;
|
|
4240
|
+
for (let e = 0; e < Ze; e++) {
|
|
4241
|
+
let t = Xe[e];
|
|
4242
|
+
t && (t.startsWith("xl/slicers/") || t.startsWith("xl/timelines/")) && t.endsWith(".xml") && W.push(`/${t}`);
|
|
4243
|
+
}
|
|
4244
|
+
let nt = {
|
|
4241
4245
|
getFile: e,
|
|
4242
|
-
domParser:
|
|
4246
|
+
domParser: k,
|
|
4243
4247
|
getAddress: (e, t) => {
|
|
4244
|
-
let n =
|
|
4248
|
+
let n = I(t, e, !1);
|
|
4245
4249
|
return typeof n == "string" ? n : null;
|
|
4246
4250
|
},
|
|
4247
4251
|
getBytes: (t, n) => {
|
|
4248
|
-
let r =
|
|
4252
|
+
let r = L(n, t), i = r ? e(r.substring(1))?.content : void 0;
|
|
4249
4253
|
return i ? i.slice().buffer : null;
|
|
4250
4254
|
},
|
|
4251
4255
|
addFetched: (e, t) => {
|
|
@@ -4253,38 +4257,38 @@ var Tr = {
|
|
|
4253
4257
|
source: { buffer: e },
|
|
4254
4258
|
fetchedFrom: t
|
|
4255
4259
|
});
|
|
4256
|
-
return n.addReference(
|
|
4260
|
+
return n.addReference(fe), pe.add(n), ce.toResourceId(n);
|
|
4257
4261
|
},
|
|
4258
|
-
markAbsorbed:
|
|
4259
|
-
},
|
|
4260
|
-
for (let e of
|
|
4261
|
-
let
|
|
4262
|
+
markAbsorbed: N
|
|
4263
|
+
}, rt = /* @__PURE__ */ new Map();
|
|
4264
|
+
for (let e of se.getAll()) rt.set(e.structure, e.beginRead(nt));
|
|
4265
|
+
let it = ((e, t) => {
|
|
4262
4266
|
let n = (n) => {
|
|
4263
4267
|
let r = e(n);
|
|
4264
4268
|
return r ? t.parseFromString(new TextDecoder().decode(r.content), "text/xml").documentElement ?? null : null;
|
|
4265
|
-
}, r =
|
|
4269
|
+
}, r = K(n(bt), "s").map((e) => ({
|
|
4266
4270
|
t: e.getAttribute("t") ?? "",
|
|
4267
|
-
keys:
|
|
4268
|
-
})), i =
|
|
4269
|
-
let t =
|
|
4271
|
+
keys: Dt(e)
|
|
4272
|
+
})), i = K(n(xt), "rv").map((e) => {
|
|
4273
|
+
let t = K(e, "fb")[0];
|
|
4270
4274
|
return {
|
|
4271
4275
|
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
4272
|
-
values:
|
|
4276
|
+
values: K(e, "v").map((e) => e.textContent ?? ""),
|
|
4273
4277
|
fb: t ? t.textContent ?? "" : null
|
|
4274
4278
|
};
|
|
4275
|
-
}), a =
|
|
4276
|
-
let t =
|
|
4279
|
+
}), a = K(n(St), "a").map((e) => {
|
|
4280
|
+
let t = Ot(e), n = parseInt(e.getAttribute("r") ?? "", 10), r = parseInt(e.getAttribute("c") ?? "", 10), i = n > 0 ? n : t.length;
|
|
4277
4281
|
return {
|
|
4278
4282
|
rows: i,
|
|
4279
4283
|
columns: r > 0 ? r : Math.max(1, Math.ceil(t.length / Math.max(1, i))),
|
|
4280
4284
|
items: t
|
|
4281
4285
|
};
|
|
4282
|
-
}), o =
|
|
4286
|
+
}), o = K(n(Ct), "s").map(Dt), s = n(wt), c = K(K(s, "spbArrays")[0], "a").map(Ot), l = K(K(s, "spbData")[0], "spb").map((e) => ({
|
|
4283
4287
|
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
4284
|
-
values:
|
|
4285
|
-
})), u = n(
|
|
4286
|
-
for (let e of
|
|
4287
|
-
let p = n(
|
|
4288
|
+
values: K(e, "v").map((e) => e.textContent ?? "")
|
|
4289
|
+
})), u = n(Tt), d = kt(K(K(u, "global")[0], "keyFlags")[0]), f = /* @__PURE__ */ new Map();
|
|
4290
|
+
for (let e of K(K(u, "types")[0], "type")) f.set(e.getAttribute("name") ?? "", kt(K(e, "keyFlags")[0]));
|
|
4291
|
+
let p = n(Et), m = K(K(p, "dxfs")[0], "dxf").map((e) => K(e, "numFmt")[0]?.getAttribute("formatCode") ?? null), h = K(K(p, "richProperties")[0], "rPr").map((e) => e.getAttribute("n") ?? "");
|
|
4288
4292
|
return {
|
|
4289
4293
|
structures: r,
|
|
4290
4294
|
values: i,
|
|
@@ -4294,9 +4298,9 @@ var Tr = {
|
|
|
4294
4298
|
bags: l,
|
|
4295
4299
|
globalKeyFlags: d,
|
|
4296
4300
|
typeKeyFlags: f,
|
|
4297
|
-
richStyles:
|
|
4301
|
+
richStyles: K(K(p, "richStyles")[0], "rSty").map((e) => {
|
|
4298
4302
|
let t = /* @__PURE__ */ new Map();
|
|
4299
|
-
for (let n of
|
|
4303
|
+
for (let n of K(e, "rpv")) {
|
|
4300
4304
|
let e = h[parseInt(n.getAttribute("i") ?? "-1", 10)];
|
|
4301
4305
|
e && t.set(e, n.textContent ?? "");
|
|
4302
4306
|
}
|
|
@@ -4308,23 +4312,23 @@ var Tr = {
|
|
|
4308
4312
|
};
|
|
4309
4313
|
})
|
|
4310
4314
|
};
|
|
4311
|
-
})(e,
|
|
4312
|
-
|
|
4315
|
+
})(e, k), at = Me(it, rt, (e) => {
|
|
4316
|
+
ne(e, "/xl/richData/rdrichvalue.xml");
|
|
4313
4317
|
});
|
|
4314
|
-
|
|
4315
|
-
for (let e = 0; e <
|
|
4316
|
-
let t =
|
|
4317
|
-
t.startsWith("xl/richData/") && !t.includes("/_rels/") &&
|
|
4318
|
-
}
|
|
4319
|
-
let
|
|
4320
|
-
if (
|
|
4321
|
-
let e =
|
|
4322
|
-
e?.value?.[1] && (
|
|
4323
|
-
}
|
|
4324
|
-
let
|
|
4325
|
-
|
|
4326
|
-
let
|
|
4327
|
-
|
|
4318
|
+
D.set("richData", it.values.map((e, t) => at.cellValue(t)));
|
|
4319
|
+
for (let e = 0; e < Ze; e++) {
|
|
4320
|
+
let t = Xe[e];
|
|
4321
|
+
t.startsWith("xl/richData/") && !t.includes("/_rels/") && N(t);
|
|
4322
|
+
}
|
|
4323
|
+
let ot = r("themes", t, e, k, O, B), lt = null;
|
|
4324
|
+
if (ot && ot.entries) {
|
|
4325
|
+
let e = ot.entries().next();
|
|
4326
|
+
e?.value?.[1] && (lt = e.value[1]);
|
|
4327
|
+
}
|
|
4328
|
+
let ut = new ft(lt), dt = r("styles", t, e, k, O, B).entries().next()?.value?.[1];
|
|
4329
|
+
dt &&= JSON.parse(H.JSONStableStringify(dt));
|
|
4330
|
+
let pt = r("workbooks", t, e, k, O, B);
|
|
4331
|
+
D.set(lr, !0 === pt.entries().next().value?.[1]?.date1904), (h.calcOnLoad ?? p) !== "none" && D.set(cr, ((e, t) => {
|
|
4328
4332
|
let n = /* @__PURE__ */ new Set();
|
|
4329
4333
|
if (e) for (let t = 0; t < e.length; t++) n.add(String(e[t]?.name).toUpperCase());
|
|
4330
4334
|
if (t) for (let e = 0; e < t.length; e++) try {
|
|
@@ -4335,14 +4339,14 @@ var Tr = {
|
|
|
4335
4339
|
}, /* @__PURE__ */ new Map());
|
|
4336
4340
|
for (let e of r.keys()) n.add(e.toUpperCase());
|
|
4337
4341
|
} catch {}
|
|
4338
|
-
return (e) => n.has(e) ||
|
|
4339
|
-
})(
|
|
4342
|
+
return (e) => n.has(e) || Qe.has(e);
|
|
4343
|
+
})(pt.entries().next().value?.[1]?.names, h.functions)), x?.mark("side-parts-json"), await Promise.all(ge);
|
|
4340
4344
|
{
|
|
4341
|
-
let e =
|
|
4345
|
+
let e = pt.entries().next().value?.[1], t = d(e?.names), n = e?.sheets ?? [];
|
|
4342
4346
|
for (let e = 0; e < n.length; e++) {
|
|
4343
4347
|
let r = n[e], i = y(r);
|
|
4344
4348
|
if (r?.kind === "macro" && i?.part.xml) {
|
|
4345
|
-
i.part.xml = l(i.part.xml,
|
|
4349
|
+
i.part.xml = l(i.part.xml, ze);
|
|
4346
4350
|
continue;
|
|
4347
4351
|
}
|
|
4348
4352
|
let a = _(r);
|
|
@@ -4354,12 +4358,12 @@ var Tr = {
|
|
|
4354
4358
|
typeof n == "string" && (r[e].ref = t.readDetached(n));
|
|
4355
4359
|
}
|
|
4356
4360
|
}
|
|
4357
|
-
|
|
4358
|
-
let
|
|
4359
|
-
...
|
|
4360
|
-
styles:
|
|
4361
|
-
theme:
|
|
4362
|
-
},
|
|
4361
|
+
ie && T > 0 && (ie(oe, oe), await new Promise((e) => setTimeout(e, 0))), x?.mark("sheets");
|
|
4362
|
+
let G = {
|
|
4363
|
+
...pt.entries().next().value?.[1],
|
|
4364
|
+
styles: dt,
|
|
4365
|
+
theme: ut.toJSON()
|
|
4366
|
+
}, ht = ((e, t, n, r) => {
|
|
4363
4367
|
let i = {}, a = (e, t) => {
|
|
4364
4368
|
if (e) for (let { key: n, value: r } of e) {
|
|
4365
4369
|
let e = t[n];
|
|
@@ -4380,10 +4384,10 @@ var Tr = {
|
|
|
4380
4384
|
e.length > 0 && (i.custom = e);
|
|
4381
4385
|
}
|
|
4382
4386
|
return Object.keys(i).length > 0 ? i : void 0;
|
|
4383
|
-
})(
|
|
4384
|
-
|
|
4387
|
+
})(De.values().next().value?.properties, Oe.values().next().value?.properties, Ae.values().next().value?.custom, (e, t) => {
|
|
4388
|
+
ne(e, "docProps/custom.xml", t);
|
|
4385
4389
|
});
|
|
4386
|
-
|
|
4390
|
+
ht && (G.properties = ht), ((e, t) => {
|
|
4387
4391
|
if (!t || t.size === 0) return;
|
|
4388
4392
|
let n = e.styles;
|
|
4389
4393
|
if (!n) return;
|
|
@@ -4420,26 +4424,26 @@ var Tr = {
|
|
|
4420
4424
|
for (let e of r) e !== 0 && Mr(a[e] ?? (a[e] = {}), !0);
|
|
4421
4425
|
for (let e of i) e !== 0 && Mr(a[e] ?? (a[e] = {}), !1);
|
|
4422
4426
|
if (r.has(0)) {
|
|
4423
|
-
let e = n.named ??= [], t =
|
|
4427
|
+
let e = n.named ??= [], t = $e.BuiltInName.Normal.toLowerCase(), r = e.find((e) => e.name?.toLowerCase() === t);
|
|
4424
4428
|
r || (r = {
|
|
4425
|
-
name:
|
|
4429
|
+
name: $e.BuiltInName.Normal,
|
|
4426
4430
|
style: {}
|
|
4427
4431
|
}, e.push(r)), Mr(r.style, !0);
|
|
4428
4432
|
}
|
|
4429
|
-
})(
|
|
4433
|
+
})(G, D.get(kr)), ((e, t) => {
|
|
4430
4434
|
if (t && t.size !== 0) for (let n of e.sheets ?? []) {
|
|
4431
4435
|
let e = _(n), r = e?.pivotTables;
|
|
4432
4436
|
if (!e || !r || r.length === 0) continue;
|
|
4433
|
-
let i = r.map(
|
|
4437
|
+
let i = r.map(Ee), a = r.map(() => []);
|
|
4434
4438
|
for (let [n, r] of e.directStyles ?? []) {
|
|
4435
4439
|
if (!t.has(r)) continue;
|
|
4436
|
-
let e =
|
|
4440
|
+
let e = U.fastStringToRange(n);
|
|
4437
4441
|
for (let t = 0; t < i.length; t++) {
|
|
4438
4442
|
let n = i[t];
|
|
4439
4443
|
if (!n) continue;
|
|
4440
4444
|
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);
|
|
4441
4445
|
if (r > o || s > c) continue;
|
|
4442
|
-
let l =
|
|
4446
|
+
let l = U.rangeToString({
|
|
4443
4447
|
rowStart: r - n.rowStart,
|
|
4444
4448
|
rowEnd: o - n.rowStart,
|
|
4445
4449
|
colStart: s - n.colStart,
|
|
@@ -4450,14 +4454,14 @@ var Tr = {
|
|
|
4450
4454
|
}
|
|
4451
4455
|
for (let e = 0; e < r.length; e++) a[e].length > 0 && (r[e].buttons = a[e]);
|
|
4452
4456
|
}
|
|
4453
|
-
})(
|
|
4454
|
-
let
|
|
4455
|
-
Pr(
|
|
4457
|
+
})(G, D.get(Nr));
|
|
4458
|
+
let _t = D.get(Gr);
|
|
4459
|
+
Pr(G, _t), ((e) => {
|
|
4456
4460
|
let t = {
|
|
4457
4461
|
colStart: 0,
|
|
4458
4462
|
rowStart: 0,
|
|
4459
|
-
colEnd:
|
|
4460
|
-
rowEnd:
|
|
4463
|
+
colEnd: be,
|
|
4464
|
+
rowEnd: Le
|
|
4461
4465
|
};
|
|
4462
4466
|
for (let n of e.sheets ?? []) {
|
|
4463
4467
|
let e = _(n);
|
|
@@ -4466,14 +4470,14 @@ var Tr = {
|
|
|
4466
4470
|
if (Jr(e.cols, !0, t, r), Jr(e.rows, !1, t, r), r.length === 0) continue;
|
|
4467
4471
|
let i = [];
|
|
4468
4472
|
for (let [t, n] of e.directStyles ?? []) i.push({
|
|
4469
|
-
...
|
|
4473
|
+
...U.fastStringToRange(t),
|
|
4470
4474
|
value: {
|
|
4471
4475
|
kind: 0,
|
|
4472
4476
|
index: n
|
|
4473
4477
|
}
|
|
4474
4478
|
});
|
|
4475
4479
|
i.push(...r);
|
|
4476
|
-
let a = [], o = new
|
|
4480
|
+
let a = [], o = new Ge.IteratorInstance(i, { axis: Ke.Column });
|
|
4477
4481
|
for (let e = o.next(); !e.done; e = o.next()) {
|
|
4478
4482
|
let n = e.value.overlaps, r;
|
|
4479
4483
|
if (n.length === 1) {
|
|
@@ -4486,11 +4490,11 @@ var Tr = {
|
|
|
4486
4490
|
}
|
|
4487
4491
|
r = e ?? t ?? i;
|
|
4488
4492
|
}
|
|
4489
|
-
a.push([
|
|
4493
|
+
a.push([U.rangeToString(e.value.range, t), r.index]);
|
|
4490
4494
|
}
|
|
4491
4495
|
a.length > 0 ? e.directStyles = a : delete e.directStyles;
|
|
4492
4496
|
}
|
|
4493
|
-
})(
|
|
4497
|
+
})(G), _t && ((e, t, n) => {
|
|
4494
4498
|
if (!t || t.size === 0 || !n) return;
|
|
4495
4499
|
let r = (e) => {
|
|
4496
4500
|
if (e === void 0 || e === 0) return null;
|
|
@@ -4518,31 +4522,31 @@ var Tr = {
|
|
|
4518
4522
|
});
|
|
4519
4523
|
e.cellControls = i;
|
|
4520
4524
|
}
|
|
4521
|
-
})(
|
|
4525
|
+
})(G, _t, r("featurePropertyBag", t, e, k, O, B).values().next().value?.featurePropertyBag);
|
|
4522
4526
|
{
|
|
4523
4527
|
let n = /* @__PURE__ */ new Map();
|
|
4524
|
-
r("slicers", t, e,
|
|
4528
|
+
r("slicers", t, e, k, O, B).forEach((e, t) => {
|
|
4525
4529
|
e?.slicers && n.set(t, e.slicers);
|
|
4526
|
-
}),
|
|
4530
|
+
}), gt(G, {
|
|
4527
4531
|
warn: (e, t) => {
|
|
4528
|
-
|
|
4532
|
+
ne(e, "xl/slicers", t);
|
|
4529
4533
|
},
|
|
4530
|
-
markAbsorbed:
|
|
4534
|
+
markAbsorbed: N,
|
|
4531
4535
|
slicerParts: n
|
|
4532
4536
|
});
|
|
4533
4537
|
}
|
|
4534
|
-
|
|
4535
|
-
...
|
|
4538
|
+
G.calc = {
|
|
4539
|
+
...G.calc ?? {},
|
|
4536
4540
|
legacyIntersect: !0
|
|
4537
|
-
},
|
|
4538
|
-
let
|
|
4539
|
-
|
|
4540
|
-
let
|
|
4541
|
-
if (
|
|
4542
|
-
let { VBAProject: e } = await import("./
|
|
4541
|
+
}, ze.length > 0 && (G.strings = ze);
|
|
4542
|
+
let vt = je.toJSON();
|
|
4543
|
+
vt && vt.length > 0 && (G.people = vt);
|
|
4544
|
+
let yt = M.getEntry("xl/vbaProject.bin");
|
|
4545
|
+
if (yt) try {
|
|
4546
|
+
let { VBAProject: e } = await import("./BCQs67LTVZ1xG82R.mjs"), t = e.extract(yt);
|
|
4543
4547
|
if (t) {
|
|
4544
4548
|
let n = /* @__PURE__ */ new Map();
|
|
4545
|
-
for (let e of
|
|
4549
|
+
for (let e of G.sheets ?? []) {
|
|
4546
4550
|
let t = _(e), r = t?.codeName;
|
|
4547
4551
|
r && n.set(r, t);
|
|
4548
4552
|
}
|
|
@@ -4551,37 +4555,37 @@ var Tr = {
|
|
|
4551
4555
|
a && (t.source = a), i && (t.sourceHeader = i);
|
|
4552
4556
|
let o = r.type === "document" ? n.get(r.name) : void 0;
|
|
4553
4557
|
o || r.type !== "document" || (t.scope = "workbook");
|
|
4554
|
-
let s = o ? o.modules ??= {} :
|
|
4558
|
+
let s = o ? o.modules ??= {} : G.modules ??= {};
|
|
4555
4559
|
s[r.name] || (s[r.name] = t);
|
|
4556
4560
|
}
|
|
4557
4561
|
s?.(t);
|
|
4558
|
-
} else
|
|
4562
|
+
} else S.push(["Unable to parse VBA project.", "xl/vbaProject.bin"]);
|
|
4559
4563
|
} catch (e) {
|
|
4560
|
-
|
|
4564
|
+
S.push([`Error extracting VBA: ${e?.message ?? e}`, "xl/vbaProject.bin"]);
|
|
4561
4565
|
}
|
|
4562
|
-
let
|
|
4566
|
+
let At = D.get("calcId"), jt = At === void 0 || !(Number(At) >= 191029), Mt = h.calcOnLoad ?? (p === "auto" && jt ? "full" : p), Nt = {
|
|
4563
4567
|
...h,
|
|
4564
|
-
calcOnLoad:
|
|
4568
|
+
calcOnLoad: Mt,
|
|
4565
4569
|
resources: v,
|
|
4566
|
-
json:
|
|
4570
|
+
json: G
|
|
4567
4571
|
};
|
|
4568
|
-
if (
|
|
4569
|
-
let e =
|
|
4570
|
-
|
|
4572
|
+
if (Nt.disableLoadAutoFit === void 0) {
|
|
4573
|
+
let e = D.get(Fe);
|
|
4574
|
+
Nt.disableLoadAutoFit = !!e?.declared && e.normalIsThemeFont && await Ce(e.faces);
|
|
4571
4575
|
}
|
|
4572
4576
|
x?.mark("json-assembled");
|
|
4573
|
-
let
|
|
4574
|
-
if (x?.mark("workbook-constructed"),
|
|
4575
|
-
e.deleteReference(
|
|
4576
|
-
}),
|
|
4577
|
-
g(
|
|
4577
|
+
let Pt = new mt(Nt);
|
|
4578
|
+
if (x?.mark("workbook-constructed"), pe.forEach((e) => {
|
|
4579
|
+
e.deleteReference(fe);
|
|
4580
|
+
}), ce.endPersist(), te) {
|
|
4581
|
+
g(Pt);
|
|
4578
4582
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
4579
|
-
for (let n of
|
|
4580
|
-
let r =
|
|
4583
|
+
for (let n of M.getNames()) {
|
|
4584
|
+
let r = M.getEntry(n);
|
|
4581
4585
|
if (!r) continue;
|
|
4582
|
-
let i =
|
|
4586
|
+
let i = M.getRawEntry(n), a = i ? {
|
|
4583
4587
|
data: r,
|
|
4584
|
-
uncompressedSize:
|
|
4588
|
+
uncompressedSize: M.uncompressedSize(n),
|
|
4585
4589
|
raw: {
|
|
4586
4590
|
compressedData: i.data,
|
|
4587
4591
|
compressionMethod: i.compressionMethod,
|
|
@@ -4589,39 +4593,39 @@ var Tr = {
|
|
|
4589
4593
|
}
|
|
4590
4594
|
} : {
|
|
4591
4595
|
data: r,
|
|
4592
|
-
uncompressedSize:
|
|
4596
|
+
uncompressedSize: M.uncompressedSize(n)
|
|
4593
4597
|
};
|
|
4594
4598
|
e.set(n, a), t += r.byteLength;
|
|
4595
4599
|
}
|
|
4596
|
-
if (t > 67108864)
|
|
4600
|
+
if (t > 67108864) S.push([`Source package too large to retain (${t} bytes, limit ${i}); unmodeled parts will be dropped on save.`, "SourcePackage"]);
|
|
4597
4601
|
else if (e.size > 0) {
|
|
4598
|
-
let t = new
|
|
4599
|
-
b(
|
|
4600
|
-
let n =
|
|
4602
|
+
let t = new ve(e, _e);
|
|
4603
|
+
b(Pt, t);
|
|
4604
|
+
let n = Pt.getWorksheets().getItems(), r = Pt.getTransactions().addListener({ onCommitEnd: (e) => {
|
|
4601
4605
|
let n = e.getOperation()?.name;
|
|
4602
4606
|
n !== "insertCells" && n !== "deleteCells" || t.markStructuralChange();
|
|
4603
|
-
} }), i =
|
|
4604
|
-
let e =
|
|
4607
|
+
} }), i = Pt.addListeners({ onSheetsChange: () => {
|
|
4608
|
+
let e = Pt.getWorksheets().getItems();
|
|
4605
4609
|
(e.length !== n.length || e.some((e, t) => e !== n[t])) && t.markStructuralChange(), n = e;
|
|
4606
4610
|
} });
|
|
4607
|
-
|
|
4608
|
-
r(), i(), g(
|
|
4611
|
+
Pt.addListeners({ onClose: () => {
|
|
4612
|
+
r(), i(), g(Pt);
|
|
4609
4613
|
} });
|
|
4610
4614
|
}
|
|
4611
4615
|
}
|
|
4612
|
-
if (
|
|
4616
|
+
if (S.length && w?.onWarning) {
|
|
4613
4617
|
let e = /* @__PURE__ */ new Set();
|
|
4614
|
-
for (let t of
|
|
4618
|
+
for (let t of S) {
|
|
4615
4619
|
let [n, r, i] = t, a = i ?? n;
|
|
4616
|
-
e.has(a) || (e.add(a),
|
|
4620
|
+
e.has(a) || (e.add(a), w.onWarning(n, r));
|
|
4617
4621
|
}
|
|
4618
4622
|
}
|
|
4619
|
-
return x && !0 === u && console.table(x.toTable()), await
|
|
4623
|
+
return x && !0 === u && console.table(x.toTable()), await Pt.whenFontsReady(), Pt;
|
|
4620
4624
|
} catch (e) {
|
|
4621
4625
|
let t = "Unable to parse XLSX.";
|
|
4622
|
-
throw e instanceof
|
|
4626
|
+
throw e instanceof ot && (t = "Unable to open XLSX. There are too many rows or columns."), Error(t, { cause: e });
|
|
4623
4627
|
} finally {
|
|
4624
|
-
await
|
|
4628
|
+
await M.close().catch(() => {});
|
|
4625
4629
|
}
|
|
4626
4630
|
};
|
|
4627
4631
|
export { dr as a, kr as i, Gr as n, Nr as r, ti as readXLSX, Xr as t };
|