@sheetxl/io-xlsx 0.8.0-beta.21 → 0.8.0-beta.23
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/{B_Jfq-O7tght6ixL.mjs → 52H0Wvygd2sMM3vH.mjs} +733 -732
- package/browser/esm/{cG4z0eDMlE49HJvD.mjs → 5xm7nfQ3Kt7ylcIZ.mjs} +4 -4
- package/browser/esm/{BCQs67LTVZ1xG82R.mjs → BjukHV_w2B4gVPfj.mjs} +2 -2
- package/browser/esm/{f-Z5vnvNnzj-0ujR.mjs → BnCWTG7UwT7Fm6nL.mjs} +2 -2
- package/browser/esm/{BoTT_U96McOdkuId.mjs → Bym41nwgevvHcB7U.mjs} +2 -2
- package/browser/esm/{CNAv3IL7hhyvzLaF.mjs → CVcovxT9G1cUV2Ge.mjs} +281 -275
- package/browser/esm/{CROAqUhKnVtkbBSm.mjs → DI3Pl0pXT6pmcCbq.mjs} +1 -1
- package/browser/esm/{D74i1p_CJmHw8HKb.mjs → DRvUl1sSMeEX_8r1.mjs} +2 -2
- package/browser/esm/{D_5T8KKyirVCR3RO.mjs → DTKdWL8TRmkezKZz.mjs} +1426 -1415
- package/browser/esm/{DPz0IeW70Nh4n8Wz.mjs → IMd5YqwFQ8e18sJD.mjs} +4 -4
- package/browser/esm/{CGQXv_OxqwXL3F8q.mjs → UMLHSEnj0cKyG2cc.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/licenses/dependencies.txt +1 -1
- package/node/esm/{Bl5eH7YPk64NxkkI.mjs → ByZiWJWgYGn674pL.mjs} +2 -2
- package/node/esm/{CT1rO7_YWIvsG9hs.mjs → BytrxssP_swyxwsG.mjs} +310 -309
- package/node/esm/{CoNllGglhnzJ6EJ4.mjs → C72QNV7gTU1ArnHZ.mjs} +1 -1
- package/node/esm/{CqhoZ8-FRZjS3p-D.mjs → COrKP2cBlImkedp0.mjs} +324 -318
- package/node/esm/{CUPNuRm5G47rulaW.mjs → Duf9ZPbvMBvOkdGC.mjs} +2 -2
- package/node/esm/{C0q_ulF7hl9zoVQ8.mjs → Dy_FppR-FD7Btmtf.mjs} +1 -1
- package/node/esm/{TN8KqnRPY-7Ln4Ez.mjs → I3aOijzMs_q5p4nB.mjs} +2 -2
- package/node/esm/index.mjs +4 -4
- package/node/esm/{ZNTwnevSmMslvfiW.mjs → ump6WxRvNa1kG_Ek.mjs} +4 -4
- package/package.json +5 -5
|
@@ -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.23
|
|
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 S, St as ne, T as re, Tt as
|
|
9
|
-
import { BufferUtils as
|
|
10
|
-
import { AddressUtils as
|
|
11
|
-
var
|
|
7
|
+
import { n as e, r as t } from "./DI3Pl0pXT6pmcCbq.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 ie, Ur as ae, Ut as oe, Vn as se, Wr as ce, Wt as le, Xn as C, Yn as w, Z as ue, Zn as de, _ as fe, _r as pe, _t as me, ar as he, br as T, cr as E, ct as D, dn as O, dr as k, er as ge, f as _e, fn as A, fr as ve, ft as ye, gr as j, ht as M, in as be, ir as N, it as P, jn as F, jt as xe, lt as I, mn as Se, mt as Ce, n as we, nn as Te, nr as Ee, nt as De, o as L, or as Oe, ot as ke, p as Ae, pr as je, pt as Me, qn as Ne, rn as Pe, sr as Fe, t as Ie, tn as Le, tr as R, ut as Re, vt as ze, wt as z, xr as Be, xt as B, yn as V, yr as Ve, zr as H } from "./DTKdWL8TRmkezKZz.mjs";
|
|
9
|
+
import { BufferUtils as U, CommonUtils as He, ExpectedError as Ue, OverlappingRange as We, RangeAxis as Ge } from "@sheetxl/utils";
|
|
10
|
+
import { AddressUtils as W, BufferUtils as Ke, CommonUtils as qe, CoordUtils as Je, FormulaError as Ye, FormulaText as Xe, FunctionDeclarations as Ze, ICellStyle as Qe, ICondition as $e, IConditionalFormat as et, ICustomProperty as G, IFont as tt, IRange as nt, ITextFrame as rt, NumberFormat as it, OutOfBoundsError as at, PersonCollection as ot, ResourceCollection as st, RichDataRegistry as ct, Scalar as lt, Sort as ut, Theme as dt, Tuple as ft, Workbook as pt, pivotCellFormatsOf as K } from "@sheetxl/sdk";
|
|
11
|
+
var mt = {
|
|
12
12
|
ascending: "ascending",
|
|
13
13
|
descending: "descending",
|
|
14
14
|
natural: "dataSource"
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function ht(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 gt(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 = vt(u, n.json), n.json.pivot = _t(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 ? gt(p.columns, u.columnId) : null;
|
|
63
|
+
p && m ? (n.json = vt(u, n.json, Xe.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 gt(e, t) {
|
|
|
69
69
|
r.length > 0 && r.every((e) => c.has(e)) && t.markAbsorbed(n);
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function gt(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 _t(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 vt(e, t, n, r, i) {
|
|
|
98
98
|
body: e.timelineBody ?? ""
|
|
99
99
|
}), s;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function vt(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 ? mt[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 yt = "xl/richData/rdrichvaluestructure.xml", bt = "xl/richData/rdrichvalue.xml", xt = "xl/richData/rdarray.xml", St = "xl/richData/rdsupportingpropertybagstructure.xml", Ct = "xl/richData/rdsupportingpropertybag.xml", wt = "xl/richData/rdRichValueTypes.xml", Tt = "xl/richData/richStyles.xml", q = (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
|
+
}, Et = (e) => q(e, "k").map((e) => [e.getAttribute("n") ?? "", e.getAttribute("t") || null]), Dt = (e) => q(e, "v").map((e) => ({
|
|
119
119
|
t: e.getAttribute("t") || null,
|
|
120
120
|
text: e.textContent ?? ""
|
|
121
|
-
})),
|
|
121
|
+
})), Ot = (e) => {
|
|
122
122
|
let t = /* @__PURE__ */ new Map();
|
|
123
|
-
for (let n of
|
|
123
|
+
for (let n of q(e, "key")) {
|
|
124
124
|
let e = /* @__PURE__ */ new Map();
|
|
125
|
-
for (let t of
|
|
125
|
+
for (let t of q(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
|
+
}, kt = /* @__PURE__ */ new Uint8Array(), At = 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 bt = "xl/richData/rdrichvaluestructure.xml", xt = "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 ? kt : t instanceof Uint8Array ? t : new Uint8Array(t), r = t instanceof Blob ? new H(t) : new ae(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 bt = "xl/richData/rdrichvaluestructure.xml", xt = "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 ce());
|
|
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 ce()).then((e) => {
|
|
161
161
|
this.buffers.set(n, e);
|
|
162
162
|
}));
|
|
163
163
|
await Promise.all(t);
|
|
@@ -200,18 +200,18 @@ var bt = "xl/richData/rdrichvaluestructure.xml", xt = "xl/richData/rdrichvalue.x
|
|
|
200
200
|
async close() {
|
|
201
201
|
await this.zip.close();
|
|
202
202
|
}
|
|
203
|
-
},
|
|
203
|
+
}, jt = class {
|
|
204
204
|
constructor(e) {
|
|
205
|
-
this._sink = e, this._samples = [], this._t0 =
|
|
205
|
+
this._sink = e, this._samples = [], this._t0 = Mt(), this._tPrev = this._t0, this._heapPrev = Nt();
|
|
206
206
|
}
|
|
207
207
|
mark(e) {
|
|
208
|
-
let t =
|
|
208
|
+
let t = Mt(), n = Nt(), 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: Pt()
|
|
215
215
|
};
|
|
216
216
|
this._tPrev = t, this._heapPrev = n, this._samples.push(r), this._sink?.(r);
|
|
217
217
|
}
|
|
@@ -223,62 +223,62 @@ var bt = "xl/richData/rdrichvaluestructure.xml", xt = "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 ? "—" : Ft(e.heapBytes / 1048576),
|
|
227
|
+
dHeapMB: e.dHeapBytes === void 0 ? "—" : Ft(e.dHeapBytes / 1048576),
|
|
228
|
+
rssMB: e.rssBytes === void 0 ? "—" : Ft(e.rssBytes / 1048576)
|
|
229
229
|
}));
|
|
230
230
|
}
|
|
231
|
-
},
|
|
232
|
-
function
|
|
231
|
+
}, Mt = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
232
|
+
function Nt() {
|
|
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 Pt() {
|
|
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 Ft(e) {
|
|
243
243
|
return Math.round(10 * e) / 10;
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var It = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Lt = `-${It}.0-9·̀-ͯ‿-⁀`, Rt = (RegExp(`^[${It}]$`, "u"), RegExp(`^[${Lt}]$`, "u"), RegExp(`^[${It}][${Lt}]*$`, "u")), zt = (RegExp(`^[${Lt}]+$`, "u"), [
|
|
246
246
|
32,
|
|
247
247
|
10,
|
|
248
248
|
13,
|
|
249
249
|
9
|
|
250
250
|
]);
|
|
251
|
-
function
|
|
251
|
+
function Bt(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 Vt = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Ht = `-${Vt}.0-9·̀-ͯ‿-⁀`;
|
|
255
|
+
RegExp(`^[${Vt}]$`, "u"), RegExp(`^[${Ht}]$`, "u"), RegExp(`^[${Vt}][${Ht}]*$`, "u"), RegExp(`^[${Ht}]+$`, "u");
|
|
256
|
+
var Ut = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Wt = `-${Ut}.0-9·̀-ͯ‿-⁀`, Gt = (RegExp(`^[${Ut}]$`, "u"), RegExp(`^[${Wt}]$`, "u"), RegExp(`^[${Ut}][${Wt}]*$`, "u"));
|
|
257
|
+
function Kt(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 qt = function(e) {
|
|
261
261
|
return e === 32 || e === 10 || e === 13 || e === 9;
|
|
262
|
-
},
|
|
262
|
+
}, Jt = function(e) {
|
|
263
263
|
return e >= 32 && e <= 55295 || e === 10 || e === 13 || e === 9 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
264
|
-
},
|
|
265
|
-
return
|
|
266
|
-
},
|
|
264
|
+
}, Yt = Bt, Xt = function(e) {
|
|
265
|
+
return Bt(e) || e >= 48 && e <= 57 || e === 45 || e === 46 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
266
|
+
}, Zt = zt, Qt = Rt, $t = function(e) {
|
|
267
267
|
return e >= 1 && e <= 55295 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
268
|
-
},
|
|
269
|
-
return
|
|
270
|
-
},
|
|
268
|
+
}, en = Kt, tn = function(e) {
|
|
269
|
+
return Kt(e) || e === 45 || e === 46 || e >= 48 && e <= 57 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
270
|
+
}, nn = Gt, rn = "http://www.w3.org/XML/1998/namespace", an = "http://www.w3.org/2000/xmlns/", on = {
|
|
271
271
|
__proto__: null,
|
|
272
|
-
xml:
|
|
273
|
-
xmlns:
|
|
274
|
-
},
|
|
272
|
+
xml: rn,
|
|
273
|
+
xmlns: an
|
|
274
|
+
}, sn = {
|
|
275
275
|
__proto__: null,
|
|
276
276
|
amp: "&",
|
|
277
277
|
gt: ">",
|
|
278
278
|
lt: "<",
|
|
279
279
|
quot: "\"",
|
|
280
280
|
apos: "'"
|
|
281
|
-
},
|
|
281
|
+
}, J = -1, cn = -2, ln = 13, un = 33, dn = 10, fn = 60, pn = 61, Y = 62, X = 63, mn = 93, hn = (e) => e === 34 || e === 39, gn = [34, 39], _n = [
|
|
282
282
|
...gn,
|
|
283
283
|
91,
|
|
284
284
|
Y
|
|
@@ -289,9 +289,9 @@ var Jt = function(e) {
|
|
|
289
289
|
], yn = [
|
|
290
290
|
pn,
|
|
291
291
|
X,
|
|
292
|
-
...
|
|
292
|
+
...Zt
|
|
293
293
|
], bn = [
|
|
294
|
-
...
|
|
294
|
+
...Zt,
|
|
295
295
|
Y,
|
|
296
296
|
38,
|
|
297
297
|
fn
|
|
@@ -299,15 +299,15 @@ var Jt = function(e) {
|
|
|
299
299
|
function xn(e, t, n) {
|
|
300
300
|
switch (t) {
|
|
301
301
|
case "xml":
|
|
302
|
-
n !==
|
|
302
|
+
n !== rn && e.fail(`xml prefix must be bound to ${rn}.`);
|
|
303
303
|
break;
|
|
304
|
-
case "xmlns": n !==
|
|
304
|
+
case "xmlns": n !== an && e.fail(`xmlns prefix must be bound to ${an}.`);
|
|
305
305
|
}
|
|
306
306
|
switch (n) {
|
|
307
|
-
case
|
|
308
|
-
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${
|
|
307
|
+
case an:
|
|
308
|
+
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${an}.`);
|
|
309
309
|
break;
|
|
310
|
-
case
|
|
310
|
+
case rn: switch (t) {
|
|
311
311
|
case "xml": break;
|
|
312
312
|
case "":
|
|
313
313
|
e.fail(`the default namespace may not be set to ${n}.`);
|
|
@@ -316,7 +316,7 @@ function xn(e, t, n) {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
var Sn, Cn = (e) =>
|
|
319
|
+
var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
320
320
|
xmldecl: "xmlDeclHandler",
|
|
321
321
|
text: "textHandler",
|
|
322
322
|
processinginstruction: "piHandler",
|
|
@@ -338,15 +338,15 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
338
338
|
this.i = 0, this.prevI = 0, this.opt = e ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
339
339
|
let t = this.xmlnsOpt = !!this.opt.xmlns;
|
|
340
340
|
if (this.trackPosition = !1 !== this.opt.position, this.fileName = this.opt.fileName, t) {
|
|
341
|
-
this.nameStartCheck =
|
|
341
|
+
this.nameStartCheck = en, this.nameCheck = tn, this.isName = Cn, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = {
|
|
342
342
|
__proto__: null,
|
|
343
|
-
...
|
|
343
|
+
...on
|
|
344
344
|
};
|
|
345
345
|
let e = this.opt.additionalNamespaces;
|
|
346
346
|
e != null && (function(e, t) {
|
|
347
347
|
for (let n of Object.keys(t)) xn(e, n, t[n]);
|
|
348
348
|
}(this, e), Object.assign(this.ns, e));
|
|
349
|
-
} else this.nameStartCheck =
|
|
349
|
+
} else this.nameStartCheck = Yt, this.nameCheck = Xt, this.isName = wn, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
350
350
|
this.stateTable = [
|
|
351
351
|
this.sBegin,
|
|
352
352
|
this.sBeginWhitespace,
|
|
@@ -398,7 +398,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
398
398
|
_init() {
|
|
399
399
|
this.openWakaBang = "", this.text = "", this.name = "", this.piTarget = "", this.entity = "", this.q = null, this.tags = [], this.tag = null, this.topNS = null, this.chunk = "", this.chunkPosition = 0, this.i = 0, this.prevI = 0, this.carriedFromPrevious = void 0, this.forbiddenState = 0, this.attribList = [];
|
|
400
400
|
let { fragmentOpt: e } = this;
|
|
401
|
-
this.state = e ?
|
|
401
|
+
this.state = e ? ln : 0, this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot = this.sawRoot = e, this.xmlDeclPossible = !e, this.xmlDeclExpects = ["version"], this.entityReturnState = void 0;
|
|
402
402
|
let { defaultXMLVersion: t } = this.opt;
|
|
403
403
|
if (t === void 0) {
|
|
404
404
|
if (!0 === this.opt.forceXMLVersion) throw Error("forceXMLVersion set but defaultXMLVersion is not set");
|
|
@@ -408,7 +408,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
408
408
|
version: void 0,
|
|
409
409
|
encoding: void 0,
|
|
410
410
|
standalone: void 0
|
|
411
|
-
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(
|
|
411
|
+
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(sn), this.readyHandler?.();
|
|
412
412
|
}
|
|
413
413
|
get position() {
|
|
414
414
|
return this.chunkPosition + this.i;
|
|
@@ -446,13 +446,13 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
446
446
|
}
|
|
447
447
|
getCode10() {
|
|
448
448
|
let e = this.chunk, t = this.i;
|
|
449
|
-
if (this.prevI = t, this.i++, t >= e.length) return
|
|
449
|
+
if (this.prevI = t, this.i++, t >= e.length) return J;
|
|
450
450
|
let n = e.charCodeAt(t);
|
|
451
451
|
if (this.column++, n < 55296) {
|
|
452
452
|
if (n >= 32 || n === 9) return n;
|
|
453
453
|
switch (n) {
|
|
454
454
|
case dn: return this.line++, this.column = 0, this.positionAtNewLine = this.position, dn;
|
|
455
|
-
case 13: return e.charCodeAt(t + 1) === dn && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
455
|
+
case 13: return e.charCodeAt(t + 1) === dn && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, cn;
|
|
456
456
|
default: return this.fail("disallowed character."), n;
|
|
457
457
|
}
|
|
458
458
|
}
|
|
@@ -462,7 +462,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
462
462
|
}
|
|
463
463
|
getCode11() {
|
|
464
464
|
let { chunk: e, i: t } = this;
|
|
465
|
-
if (this.prevI = t, this.i = t + 1, t >= e.length) return
|
|
465
|
+
if (this.prevI = t, this.i = t + 1, t >= e.length) return J;
|
|
466
466
|
let n = e.charCodeAt(t);
|
|
467
467
|
if (this.column++, n < 55296) {
|
|
468
468
|
if (n > 31 && n < 127 || n > 159 && n !== 8232 || n === 9) return n;
|
|
@@ -473,7 +473,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
473
473
|
n !== dn && n !== 133 || (this.i = t + 2);
|
|
474
474
|
}
|
|
475
475
|
case 133:
|
|
476
|
-
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
476
|
+
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position, cn;
|
|
477
477
|
default: return this.fail("disallowed character."), n;
|
|
478
478
|
}
|
|
479
479
|
}
|
|
@@ -483,7 +483,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
483
483
|
}
|
|
484
484
|
getCodeNorm() {
|
|
485
485
|
let e = this.getCode();
|
|
486
|
-
return e ===
|
|
486
|
+
return e === cn ? dn : e;
|
|
487
487
|
}
|
|
488
488
|
unGet() {
|
|
489
489
|
this.i = this.prevI, this.column--;
|
|
@@ -491,8 +491,8 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
491
491
|
captureTo(e) {
|
|
492
492
|
let { i: t } = this, { chunk: n } = this;
|
|
493
493
|
for (;;) {
|
|
494
|
-
let r = this.getCode(), i = r ===
|
|
495
|
-
if (a ===
|
|
494
|
+
let r = this.getCode(), i = r === cn, a = i ? dn : r;
|
|
495
|
+
if (a === J || e.includes(a)) return this.text += n.slice(t, this.prevI), a;
|
|
496
496
|
i && (this.text += `${n.slice(t, this.prevI)}\n`, t = this.i);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
@@ -501,10 +501,10 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
501
501
|
for (;;) {
|
|
502
502
|
let r = this.getCode();
|
|
503
503
|
switch (r) {
|
|
504
|
-
case
|
|
504
|
+
case cn:
|
|
505
505
|
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r = dn;
|
|
506
506
|
break;
|
|
507
|
-
case
|
|
507
|
+
case J: return this.text += n.slice(t), !1;
|
|
508
508
|
}
|
|
509
509
|
if (r === e) return this.text += n.slice(t, this.prevI), !0;
|
|
510
510
|
}
|
|
@@ -513,18 +513,18 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
513
513
|
let { chunk: e, i: t } = this;
|
|
514
514
|
for (;;) {
|
|
515
515
|
let n = this.getCode();
|
|
516
|
-
if (n ===
|
|
517
|
-
if (!
|
|
516
|
+
if (n === J) return this.name += e.slice(t), J;
|
|
517
|
+
if (!Xt(n)) return this.name += e.slice(t, this.prevI), n === cn ? dn : n;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
skipSpaces() {
|
|
521
521
|
for (;;) {
|
|
522
522
|
let e = this.getCodeNorm();
|
|
523
|
-
if (e ===
|
|
523
|
+
if (e === J || !qt(e)) return e;
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
setXMLVersion(e) {
|
|
527
|
-
this.currentXMLVersion = e, e === "1.0" ? (this.isChar =
|
|
527
|
+
this.currentXMLVersion = e, e === "1.0" ? (this.isChar = Jt, this.getCode = this.getCode10) : (this.isChar = $t, this.getCode = this.getCode11);
|
|
528
528
|
}
|
|
529
529
|
sBegin() {
|
|
530
530
|
this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
|
|
@@ -535,17 +535,17 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
535
535
|
case fn:
|
|
536
536
|
if (this.state = 15, this.text.length !== 0) throw Error("no-empty text at start");
|
|
537
537
|
break;
|
|
538
|
-
case
|
|
539
|
-
default: this.unGet(), this.state =
|
|
538
|
+
case J: break;
|
|
539
|
+
default: this.unGet(), this.state = ln, this.xmlDeclPossible = !1;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
sDoctype() {
|
|
543
543
|
let e = this.captureTo(_n);
|
|
544
544
|
switch (e) {
|
|
545
545
|
case Y:
|
|
546
|
-
this.doctypeHandler?.(this.text), this.text = "", this.state =
|
|
546
|
+
this.doctypeHandler?.(this.text), this.text = "", this.state = ln, this.doctype = !0;
|
|
547
547
|
break;
|
|
548
|
-
case
|
|
548
|
+
case J: break;
|
|
549
549
|
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 : hn(e) && (this.state = 3, this.q = e);
|
|
550
550
|
}
|
|
551
551
|
}
|
|
@@ -555,7 +555,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
555
555
|
}
|
|
556
556
|
sDTD() {
|
|
557
557
|
let e = this.captureTo(vn);
|
|
558
|
-
e !==
|
|
558
|
+
e !== J && (this.text += String.fromCodePoint(e), e === mn ? this.state = 2 : e === fn ? this.state = 6 : hn(e) && (this.state = 5, this.q = e));
|
|
559
559
|
}
|
|
560
560
|
sDTDQuoted() {
|
|
561
561
|
let e = this.q;
|
|
@@ -601,22 +601,22 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
601
601
|
sEntity() {
|
|
602
602
|
let { i: e } = this, { chunk: t } = this;
|
|
603
603
|
t: for (;;) switch (this.getCode()) {
|
|
604
|
-
case
|
|
604
|
+
case cn:
|
|
605
605
|
this.entity += `${t.slice(e, this.prevI)}\n`, e = this.i;
|
|
606
606
|
break;
|
|
607
607
|
case 59: {
|
|
608
608
|
let { entityReturnState: n } = this, r = this.entity + t.slice(e, this.prevI), i;
|
|
609
|
-
this.state = n, r === "" ? (this.fail("empty entity name."), i = "&;") : (i = this.parseEntity(r), this.entity = ""), n ===
|
|
609
|
+
this.state = n, r === "" ? (this.fail("empty entity name."), i = "&;") : (i = this.parseEntity(r), this.entity = ""), n === ln && this.textHandler === void 0 || (this.text += i);
|
|
610
610
|
break t;
|
|
611
611
|
}
|
|
612
|
-
case
|
|
612
|
+
case J:
|
|
613
613
|
this.entity += t.slice(e);
|
|
614
614
|
break t;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
sOpenWaka() {
|
|
618
618
|
let e = this.getCode();
|
|
619
|
-
if (
|
|
619
|
+
if (Yt(e)) this.state = 34, this.unGet(), this.xmlDeclPossible = !1;
|
|
620
620
|
else switch (e) {
|
|
621
621
|
case 47:
|
|
622
622
|
this.state = 43, this.xmlDeclPossible = !1;
|
|
@@ -627,7 +627,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
627
627
|
case X:
|
|
628
628
|
this.state = 23;
|
|
629
629
|
break;
|
|
630
|
-
default: this.fail("disallowed character in tag name"), this.state =
|
|
630
|
+
default: this.fail("disallowed character in tag name"), this.state = ln, this.xmlDeclPossible = !1;
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
sOpenWakaBang() {
|
|
@@ -653,7 +653,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
653
653
|
}
|
|
654
654
|
sCommentEnded() {
|
|
655
655
|
let e = this.getCodeNorm();
|
|
656
|
-
e === Y ? this.state =
|
|
656
|
+
e === Y ? this.state = ln : (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(e)}`, this.state = 17);
|
|
657
657
|
}
|
|
658
658
|
sCData() {
|
|
659
659
|
this.captureToChar(mn) && (this.state = 21);
|
|
@@ -666,7 +666,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
666
666
|
let e = this.getCodeNorm();
|
|
667
667
|
switch (e) {
|
|
668
668
|
case Y:
|
|
669
|
-
this.cdataHandler?.(this.text), this.text = "", this.state =
|
|
669
|
+
this.cdataHandler?.(this.text), this.text = "", this.state = ln;
|
|
670
670
|
break;
|
|
671
671
|
case mn:
|
|
672
672
|
this.text += "]";
|
|
@@ -676,17 +676,17 @@ 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 || qt(e) ? (this.fail("processing instruction without a target."), this.state = e === X ? 26 : 25) : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(e), this.state = 24);
|
|
680
680
|
}
|
|
681
681
|
sPIRest() {
|
|
682
682
|
let { chunk: e, i: t } = this;
|
|
683
683
|
for (;;) {
|
|
684
684
|
let n = this.getCodeNorm();
|
|
685
|
-
if (n ===
|
|
685
|
+
if (n === J) return void (this.piTarget += e.slice(t));
|
|
686
686
|
if (!this.nameCheck(n)) {
|
|
687
687
|
this.piTarget += e.slice(t, this.prevI);
|
|
688
688
|
let r = n === X;
|
|
689
|
-
r ||
|
|
689
|
+
r || qt(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 : qt(e) || (this.text = String.fromCodePoint(e));
|
|
698
698
|
} else this.captureToChar(X) && (this.state = 26);
|
|
699
699
|
}
|
|
700
700
|
sPIEnding() {
|
|
@@ -704,18 +704,18 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
704
704
|
e.toLowerCase() === "xml" && this.fail("the XML declaration must appear at the start of the document."), this.piHandler?.({
|
|
705
705
|
target: e,
|
|
706
706
|
body: this.text
|
|
707
|
-
}), this.piTarget = this.text = "", this.state =
|
|
707
|
+
}), this.piTarget = this.text = "", this.state = ln;
|
|
708
708
|
} else e === X ? this.text += "?" : (this.text += `?${String.fromCodePoint(e)}`, this.state = 25);
|
|
709
709
|
this.xmlDeclPossible = !1;
|
|
710
710
|
}
|
|
711
711
|
sXMLDeclNameStart() {
|
|
712
712
|
let e = this.skipSpaces();
|
|
713
|
-
e === X ? this.state = un : e !==
|
|
713
|
+
e === X ? this.state = un : e !== J && (this.state = 28, this.name = String.fromCodePoint(e));
|
|
714
714
|
}
|
|
715
715
|
sXMLDeclName() {
|
|
716
716
|
let e = this.captureTo(yn);
|
|
717
717
|
if (e === X) return this.state = un, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
718
|
-
if (
|
|
718
|
+
if (qt(e) || e === pn) {
|
|
719
719
|
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
720
720
|
case 0:
|
|
721
721
|
this.fail("did not expect any more name/value pairs.");
|
|
@@ -731,17 +731,17 @@ var Sn, Cn = (e) => 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
|
+
qt(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
|
+
qt(e) || (hn(e) ? this.q = e : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
740
740
|
}
|
|
741
741
|
sXMLDeclValue() {
|
|
742
742
|
let e = this.captureTo([this.q, X]);
|
|
743
743
|
if (e === X) return this.state = un, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
744
|
-
if (e ===
|
|
744
|
+
if (e === J) return;
|
|
745
745
|
let t = this.text;
|
|
746
746
|
switch (this.text = "", this.name) {
|
|
747
747
|
case "version": {
|
|
@@ -759,14 +759,14 @@ var Sn, Cn = (e) => 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 : (qt(e) || (this.fail("whitespace required."), this.unGet()), this.state = 27);
|
|
763
763
|
}
|
|
764
764
|
sXMLDeclEnding() {
|
|
765
|
-
this.getCodeNorm() === Y ? (this.piTarget === "xml" ? this.name !== "version" && this.xmlDeclExpects.includes("version") && this.fail("XML declaration must contain a version.") : this.fail("processing instructions are not allowed before root."), this.xmlDeclHandler?.(this.xmlDecl), this.name = "", this.piTarget = this.text = "", this.state =
|
|
765
|
+
this.getCodeNorm() === Y ? (this.piTarget === "xml" ? this.name !== "version" && this.xmlDeclExpects.includes("version") && this.fail("XML declaration must contain a version.") : this.fail("processing instructions are not allowed before root."), this.xmlDeclHandler?.(this.xmlDecl), this.name = "", this.piTarget = this.text = "", this.state = ln) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1;
|
|
766
766
|
}
|
|
767
767
|
sOpenTag() {
|
|
768
768
|
let e = this.captureNameChars();
|
|
769
|
-
if (e ===
|
|
769
|
+
if (e === J) return;
|
|
770
770
|
let t = this.tag = {
|
|
771
771
|
name: this.name,
|
|
772
772
|
attributes: Object.create(null)
|
|
@@ -778,7 +778,7 @@ var Sn, Cn = (e) => 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: qt(e) || this.fail("disallowed character in tag name."), this.state = 36;
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
sOpenTagSlash() {
|
|
@@ -786,25 +786,25 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
786
786
|
}
|
|
787
787
|
sAttrib() {
|
|
788
788
|
let e = this.skipSpaces();
|
|
789
|
-
e !==
|
|
789
|
+
e !== J && (Yt(e) ? (this.unGet(), this.state = 37) : e === Y ? this.openTag() : e === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
790
790
|
}
|
|
791
791
|
sAttribName() {
|
|
792
792
|
let e = this.captureNameChars();
|
|
793
|
-
e === pn ? this.state = 39 :
|
|
793
|
+
e === pn ? this.state = 39 : qt(e) ? this.state = 38 : e === Y ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : e !== J && this.fail("disallowed character in attribute name.");
|
|
794
794
|
}
|
|
795
795
|
sAttribNameSawWhite() {
|
|
796
796
|
let e = this.skipSpaces();
|
|
797
797
|
switch (e) {
|
|
798
|
-
case
|
|
798
|
+
case J: return;
|
|
799
799
|
case pn:
|
|
800
800
|
this.state = 39;
|
|
801
801
|
break;
|
|
802
|
-
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() :
|
|
802
|
+
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() : Yt(e) ? (this.unGet(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
sAttribValue() {
|
|
806
806
|
let e = this.getCodeNorm();
|
|
807
|
-
hn(e) ? (this.q = e, this.state = 40) :
|
|
807
|
+
hn(e) ? (this.q = e, this.state = 40) : qt(e) || (this.fail("unquoted attribute value."), this.state = 42, this.unGet());
|
|
808
808
|
}
|
|
809
809
|
sAttribValueQuoted() {
|
|
810
810
|
let { q: e, chunk: t } = this, { i: n } = this;
|
|
@@ -816,21 +816,21 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
816
816
|
this.text += t.slice(n, this.prevI), this.state = 14, this.entityReturnState = 40;
|
|
817
817
|
return;
|
|
818
818
|
case dn:
|
|
819
|
-
case
|
|
819
|
+
case cn:
|
|
820
820
|
case 9:
|
|
821
821
|
this.text += `${t.slice(n, this.prevI)} `, n = this.i;
|
|
822
822
|
break;
|
|
823
823
|
case fn:
|
|
824
824
|
this.text += t.slice(n, this.prevI), this.fail("disallowed character.");
|
|
825
825
|
return;
|
|
826
|
-
case
|
|
826
|
+
case J:
|
|
827
827
|
this.text += t.slice(n);
|
|
828
828
|
return;
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
sAttribValueClosed() {
|
|
832
832
|
let e = this.getCodeNorm();
|
|
833
|
-
|
|
833
|
+
qt(e) ? this.state = 36 : e === Y ? this.openTag() : e === 47 ? this.state = 35 : Yt(e) ? (this.fail("no whitespace between attributes."), this.unGet(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
834
834
|
}
|
|
835
835
|
sAttribValueUnquoted() {
|
|
836
836
|
let e = this.captureTo(bn);
|
|
@@ -841,20 +841,20 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
841
841
|
case fn:
|
|
842
842
|
this.fail("disallowed character.");
|
|
843
843
|
break;
|
|
844
|
-
case
|
|
844
|
+
case J: break;
|
|
845
845
|
default: this.text.includes("]]>") && this.fail("the string \"]]>\" is disallowed in char data."), this.pushAttrib(this.name, this.text), this.name = this.text = "", e === Y ? this.openTag() : this.state = 36;
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
848
|
sCloseTag() {
|
|
849
849
|
let e = this.captureNameChars();
|
|
850
|
-
e === Y ? this.closeTag() :
|
|
850
|
+
e === Y ? this.closeTag() : qt(e) ? this.state = 44 : e !== J && this.fail("disallowed character in closing tag.");
|
|
851
851
|
}
|
|
852
852
|
sCloseTagSawWhite() {
|
|
853
853
|
switch (this.skipSpaces()) {
|
|
854
854
|
case Y:
|
|
855
855
|
this.closeTag();
|
|
856
856
|
break;
|
|
857
|
-
case
|
|
857
|
+
case J: break;
|
|
858
858
|
default: this.fail("disallowed character in closing tag.");
|
|
859
859
|
}
|
|
860
860
|
}
|
|
@@ -869,7 +869,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
869
869
|
t = 0;
|
|
870
870
|
break t;
|
|
871
871
|
case 38:
|
|
872
|
-
this.state = 14, this.entityReturnState =
|
|
872
|
+
this.state = 14, this.entityReturnState = ln, r !== void 0 && (this.text += n.slice(e, this.prevI)), t = 0;
|
|
873
873
|
break t;
|
|
874
874
|
case mn:
|
|
875
875
|
switch (t) {
|
|
@@ -886,10 +886,10 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
886
886
|
case Y:
|
|
887
887
|
t === 2 && this.fail("the string \"]]>\" is disallowed in char data."), t = 0;
|
|
888
888
|
break;
|
|
889
|
-
case
|
|
889
|
+
case cn:
|
|
890
890
|
r !== void 0 && (this.text += `${n.slice(e, this.prevI)}\n`), e = this.i, t = 0;
|
|
891
891
|
break;
|
|
892
|
-
case
|
|
892
|
+
case J:
|
|
893
893
|
r !== void 0 && (this.text += n.slice(e));
|
|
894
894
|
break t;
|
|
895
895
|
default: t = 0;
|
|
@@ -908,15 +908,15 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
908
908
|
}
|
|
909
909
|
break t;
|
|
910
910
|
case 38:
|
|
911
|
-
this.state = 14, this.entityReturnState =
|
|
911
|
+
this.state = 14, this.entityReturnState = ln, n !== void 0 && (this.text += t.slice(e, this.prevI)), r = !0;
|
|
912
912
|
break t;
|
|
913
|
-
case
|
|
913
|
+
case cn:
|
|
914
914
|
n !== void 0 && (this.text += `${t.slice(e, this.prevI)}\n`), e = this.i;
|
|
915
915
|
break;
|
|
916
|
-
case
|
|
916
|
+
case J:
|
|
917
917
|
n !== void 0 && (this.text += t.slice(e));
|
|
918
918
|
break t;
|
|
919
|
-
default:
|
|
919
|
+
default: qt(i) || (r = !0);
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
922
|
r && (this.sawRoot || this.reportedTextBeforeRoot || (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0));
|
|
@@ -950,7 +950,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
950
950
|
let t = e.pop();
|
|
951
951
|
this.fail(`unclosed tag: ${t.name}`);
|
|
952
952
|
}
|
|
953
|
-
this.state !== 0 && this.state !==
|
|
953
|
+
this.state !== 0 && this.state !== ln && this.fail("unexpected end.");
|
|
954
954
|
let { text: t } = this;
|
|
955
955
|
return t.length !== 0 && (this.textHandler?.(t), this.text = ""), this._closed = !0, this.endHandler?.(), this._init(), this;
|
|
956
956
|
}
|
|
@@ -985,7 +985,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
985
985
|
let { attributes: n } = t, r = /* @__PURE__ */ new Set();
|
|
986
986
|
for (let t of e) {
|
|
987
987
|
let { name: e, prefix: i, local: a } = t, o, s;
|
|
988
|
-
i === "" ? (o = e === "xmlns" ?
|
|
988
|
+
i === "" ? (o = e === "xmlns" ? an : "", s = e) : (o = this.resolve(i), o === void 0 && (this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`), o = i), s = `{${o}}${a}`), r.has(s) && this.fail(`duplicate attribute: ${s}.`), r.add(s), t.uri = o, n[e] = t;
|
|
989
989
|
}
|
|
990
990
|
this.attribList = [];
|
|
991
991
|
}
|
|
@@ -997,16 +997,16 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
997
997
|
openTag() {
|
|
998
998
|
this.processAttribs();
|
|
999
999
|
let { tags: e } = this, t = this.tag;
|
|
1000
|
-
t.isSelfClosing = !1, this.openTagHandler?.(t), e.push(t), this.state =
|
|
1000
|
+
t.isSelfClosing = !1, this.openTagHandler?.(t), e.push(t), this.state = ln, this.name = "";
|
|
1001
1001
|
}
|
|
1002
1002
|
openSelfClosingTag() {
|
|
1003
1003
|
this.processAttribs();
|
|
1004
1004
|
let { tags: e } = this, t = this.tag;
|
|
1005
|
-
t.isSelfClosing = !0, this.openTagHandler?.(t), this.closeTagHandler?.(t), (this.tag = e[e.length - 1] ?? null) === null && (this.closedRoot = !0), this.state =
|
|
1005
|
+
t.isSelfClosing = !0, this.openTagHandler?.(t), this.closeTagHandler?.(t), (this.tag = e[e.length - 1] ?? null) === null && (this.closedRoot = !0), this.state = ln, this.name = "";
|
|
1006
1006
|
}
|
|
1007
1007
|
closeTag() {
|
|
1008
1008
|
let { tags: e, name: t } = this;
|
|
1009
|
-
if (this.state =
|
|
1009
|
+
if (this.state = ln, this.name = "", t === "") return this.fail("weird empty close tag."), void (this.text += "</>");
|
|
1010
1010
|
let n = this.closeTagHandler, r = e.length;
|
|
1011
1011
|
for (; r-- > 0;) {
|
|
1012
1012
|
let r = this.tag = e.pop();
|
|
@@ -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) => [W.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 = W.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) => W.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) ? tt.Style.Italic : tt.Style.Normal;
|
|
1543
1543
|
break;
|
|
1544
1544
|
case "strike":
|
|
1545
|
-
n.strike =
|
|
1545
|
+
n.strike = z(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 = ie(t.val);
|
|
1561
1561
|
break;
|
|
1562
1562
|
case "vertAlign": {
|
|
1563
|
-
let e =
|
|
1563
|
+
let e = B(t.val);
|
|
1564
1564
|
e !== void 0 && (n.baseline = e);
|
|
1565
1565
|
break;
|
|
1566
1566
|
}
|
|
@@ -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 = ge((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: tt.Style.Normal,
|
|
1630
|
+
underline: tt.UnderlineStyle.None,
|
|
1631
|
+
strike: tt.StrikeStyle.None,
|
|
1632
1632
|
baseline: 0
|
|
1633
1633
|
}, r = Array(e.length);
|
|
1634
1634
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -1667,19 +1667,19 @@ var ir = {
|
|
|
1667
1667
|
return {
|
|
1668
1668
|
c: n(t("col")),
|
|
1669
1669
|
r: n(t("row")),
|
|
1670
|
-
x:
|
|
1671
|
-
y:
|
|
1670
|
+
x: le(t("colOff") ?? "0") ?? 0,
|
|
1671
|
+
y: le(t("rowOff") ?? "0") ?? 0
|
|
1672
1672
|
};
|
|
1673
1673
|
}, sr = "formulaDialect", cr = "isKnownFunction", lr = "date1904", ur = "richStrings", dr = "defaultFont", fr = (e, t, r, i, a, s, c, l) => {
|
|
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 ft.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 = W.fastStringToRange(t);
|
|
1683
1683
|
e.getSource().r = n, e.getSource().v = {};
|
|
1684
1684
|
},
|
|
1685
1685
|
closeTag: (e) => {
|
|
@@ -1727,14 +1727,17 @@ var ir = {
|
|
|
1727
1727
|
if (!t?.r) return;
|
|
1728
1728
|
let n = t.conditionals[t.conditionals.length - 1], r = n?.rule;
|
|
1729
1729
|
if (!r) return;
|
|
1730
|
-
let i = {}, a =
|
|
1730
|
+
let i = {}, a = D(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
1734
|
let te = (e, t) => {
|
|
1735
1735
|
let n = t.minLength ?? 10, r = t.maxLength ?? 90;
|
|
1736
1736
|
n === 0 ? delete e.minLength : e.minLength = n, r === 100 ? delete e.maxLength : e.maxLength = r;
|
|
1737
|
-
}, x = (e) => {
|
|
1737
|
+
}, x = (e, t) => {
|
|
1738
|
+
let n = (e, t) => !e || e.type === t && e.value === void 0 && !e.exclusive, [r, i] = t;
|
|
1739
|
+
n(r, et.ColorStopType.Min) ? delete e.minPoint : e.minPoint = r, n(i, et.ColorStopType.Max) ? delete e.maxPoint : e.maxPoint = i;
|
|
1740
|
+
}, S = (e) => {
|
|
1738
1741
|
let t = e.conditions ?? [], n = [];
|
|
1739
1742
|
for (let e = 0; e < t.length; e++) {
|
|
1740
1743
|
let r = t[e], i = {};
|
|
@@ -1747,10 +1750,10 @@ var ir = {
|
|
|
1747
1750
|
to: {},
|
|
1748
1751
|
openTag: (e) => {},
|
|
1749
1752
|
closeTag: (e) => {
|
|
1750
|
-
let t = e.getSource(), n = t.colors ?? [], r =
|
|
1753
|
+
let t = e.getSource(), n = t.colors ?? [], r = S(t);
|
|
1751
1754
|
for (let e = 0; e < r.length; e++) r[e].color = n[e];
|
|
1752
1755
|
e.getParent().scale = {
|
|
1753
|
-
type:
|
|
1756
|
+
type: et.ScaleType.ColorScale,
|
|
1754
1757
|
stops: r
|
|
1755
1758
|
};
|
|
1756
1759
|
}
|
|
@@ -1761,11 +1764,9 @@ var ir = {
|
|
|
1761
1764
|
e.copyTo("maxLength", Q), e.copyTo("minLength", Q), e.copyTo("showValue", Z);
|
|
1762
1765
|
},
|
|
1763
1766
|
closeTag: (e) => {
|
|
1764
|
-
let t = e.getSource(), n = {
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
gradient: !0
|
|
1768
|
-
}, r = t.colors?.[0];
|
|
1767
|
+
let t = e.getSource(), n = { type: et.ScaleType.DataBar };
|
|
1768
|
+
x(n, S(t));
|
|
1769
|
+
let r = t.colors?.[0];
|
|
1769
1770
|
r && (n.color = r), te(n, t), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1770
1771
|
}
|
|
1771
1772
|
}), d.registerVisitor({
|
|
@@ -1776,8 +1777,8 @@ var ir = {
|
|
|
1776
1777
|
},
|
|
1777
1778
|
closeTag: (e) => {
|
|
1778
1779
|
let t = e.getSource(), n = {
|
|
1779
|
-
type:
|
|
1780
|
-
stops:
|
|
1780
|
+
type: et.ScaleType.IconSet,
|
|
1781
|
+
stops: S(t)
|
|
1781
1782
|
};
|
|
1782
1783
|
t.iconSet !== void 0 && (n.iconSet = t.iconSet), t.reverse !== void 0 && (n.reverse = t.reverse), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1783
1784
|
}
|
|
@@ -1795,7 +1796,7 @@ var ir = {
|
|
|
1795
1796
|
let t = e.getParent();
|
|
1796
1797
|
t.conditions ||= [];
|
|
1797
1798
|
let n = e.getSource();
|
|
1798
|
-
if (t.conditions.push(n), e.copyTo("type", $), n.type ===
|
|
1799
|
+
if (t.conditions.push(n), e.copyTo("type", $), n.type === et.ColorStopType.Formula) {
|
|
1799
1800
|
let t = e.getAttribute("val");
|
|
1800
1801
|
t != null && (n.value = _(String(t)));
|
|
1801
1802
|
} else e.copyTo("value", Pn, "val");
|
|
@@ -1807,7 +1808,7 @@ var ir = {
|
|
|
1807
1808
|
openTag: (e) => {
|
|
1808
1809
|
let t = e.getParent();
|
|
1809
1810
|
t.colors ||= [];
|
|
1810
|
-
let n =
|
|
1811
|
+
let n = ge((t) => e.getAttribute(t));
|
|
1811
1812
|
t.colors.push(n);
|
|
1812
1813
|
}
|
|
1813
1814
|
}), d.registerVisitor({
|
|
@@ -1833,7 +1834,7 @@ var ir = {
|
|
|
1833
1834
|
from: "colorFilter",
|
|
1834
1835
|
openTag: (e) => {
|
|
1835
1836
|
let t = e.getParent(), n = {};
|
|
1836
|
-
t.operator =
|
|
1837
|
+
t.operator = $e.BuiltInOperatorNames.Color, t.param = n, e.copyToObject(n, "cellColor", Z);
|
|
1837
1838
|
let r = p(e);
|
|
1838
1839
|
r && (n.style = r);
|
|
1839
1840
|
}
|
|
@@ -1841,39 +1842,39 @@ var ir = {
|
|
|
1841
1842
|
from: "iconFilter",
|
|
1842
1843
|
openTag: (e) => {
|
|
1843
1844
|
let t = e.getParent(), n = {};
|
|
1844
|
-
t.operator =
|
|
1845
|
+
t.operator = $e.BuiltInOperatorNames.Icon, t.param = n, e.copyToObject(n, "iconId", Q), e.copyToObject(n, "iconSet", $);
|
|
1845
1846
|
}
|
|
1846
1847
|
}), d.registerVisitor({
|
|
1847
1848
|
from: "top10",
|
|
1848
1849
|
openTag: (e) => {
|
|
1849
1850
|
let t = e.getParent(), n = {};
|
|
1850
|
-
t.operator =
|
|
1851
|
+
t.operator = $e.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");
|
|
1851
1852
|
}
|
|
1852
1853
|
}), d.registerVisitor({
|
|
1853
1854
|
from: "dynamicFilter",
|
|
1854
1855
|
openTag: (e) => {
|
|
1855
|
-
let t = e.getParent(), n =
|
|
1856
|
+
let t = e.getParent(), n = O(e.getAttribute("type"), e.getAttribute("val"), e.getAttribute("maxVal"));
|
|
1856
1857
|
t.operator = n.operator, t.param = n.param;
|
|
1857
1858
|
}
|
|
1858
1859
|
});
|
|
1859
|
-
let
|
|
1860
|
+
let ne = {
|
|
1860
1861
|
from: "filters",
|
|
1861
1862
|
to: {},
|
|
1862
1863
|
openTag: (e) => {
|
|
1863
1864
|
let t = e.getParent(), n = {};
|
|
1864
|
-
return t.selector =
|
|
1865
|
+
return t.selector = $e.BuiltInSelectorNames.Display, t.operator = $e.BuiltInOperatorNames.InSet, t.param = n, e.copyToObject(n, "blank", Z), e.copyToObject(n, "calendarType", $), n;
|
|
1865
1866
|
}
|
|
1866
1867
|
};
|
|
1867
|
-
d.registerVisitor(
|
|
1868
|
-
let
|
|
1868
|
+
d.registerVisitor(ne);
|
|
1869
|
+
let re = {
|
|
1869
1870
|
from: "filter",
|
|
1870
1871
|
openTag: (e) => {
|
|
1871
1872
|
let t = e.getParent(), n = t.items;
|
|
1872
1873
|
n || (n = [], t.items = n), n.push(e.getAttribute("val", $));
|
|
1873
1874
|
}
|
|
1874
1875
|
};
|
|
1875
|
-
d.registerVisitor(
|
|
1876
|
-
let
|
|
1876
|
+
d.registerVisitor(re);
|
|
1877
|
+
let ie = {
|
|
1877
1878
|
from: "dateGroupItem",
|
|
1878
1879
|
to: {},
|
|
1879
1880
|
openTag: (e) => {
|
|
@@ -1881,21 +1882,21 @@ var ir = {
|
|
|
1881
1882
|
n || (n = [], t.dateGroups = n), n.push(e.getSource()), e.copyTo("group", $, "dateTimeGrouping"), e.copyTo("day", Q), e.copyTo("hour", Q), e.copyTo("minute", Q), e.copyTo("month", Q), e.copyTo("second", Q), e.copyTo("year", Q);
|
|
1882
1883
|
}
|
|
1883
1884
|
};
|
|
1884
|
-
d.registerVisitor(
|
|
1885
|
-
let
|
|
1886
|
-
|
|
1885
|
+
d.registerVisitor(ie);
|
|
1886
|
+
let ae = /* @__PURE__ */ new Map();
|
|
1887
|
+
ae.set("filterColumn", {
|
|
1887
1888
|
from: "filterColumn",
|
|
1888
1889
|
transparent: !0
|
|
1889
|
-
}),
|
|
1890
|
+
}), ae.set("filters", ne), ae.set("filter", re), ae.set("dateGroupItem", ie), d.registerVisitor({
|
|
1890
1891
|
from: "customFilters",
|
|
1891
1892
|
openTag: (e) => {
|
|
1892
1893
|
let t = e.getParent(), n = e.getAttribute("and"), r = n === "and" || n === "1", i = [];
|
|
1893
|
-
return t.operator = r ?
|
|
1894
|
+
return t.operator = r ? $e.BuiltInOperatorNames.And : $e.BuiltInOperatorNames.Or, t.param = i, e.setSource(t), i;
|
|
1894
1895
|
},
|
|
1895
1896
|
closeTag: (e) => {
|
|
1896
1897
|
let t = e.getSource(), n = t?.param;
|
|
1897
1898
|
if (!t || !n) return;
|
|
1898
|
-
let r = n.length === 1 ? n[0] :
|
|
1899
|
+
let r = n.length === 1 ? n[0] : A(t);
|
|
1899
1900
|
r !== t && (t.operator = r.operator, t.param = r.param);
|
|
1900
1901
|
}
|
|
1901
1902
|
}), d.registerVisitor({
|
|
@@ -1910,7 +1911,7 @@ var ir = {
|
|
|
1910
1911
|
r && (n.operator = r.operator, n.param = r.param);
|
|
1911
1912
|
}
|
|
1912
1913
|
});
|
|
1913
|
-
let
|
|
1914
|
+
let se = {}, ce = null;
|
|
1914
1915
|
d.registerVisitor({
|
|
1915
1916
|
from: "sortState",
|
|
1916
1917
|
to: {},
|
|
@@ -1918,16 +1919,16 @@ var ir = {
|
|
|
1918
1919
|
let t = e.getParent(), n = t.v;
|
|
1919
1920
|
if (!n) return;
|
|
1920
1921
|
let r = {};
|
|
1921
|
-
|
|
1922
|
+
se = {};
|
|
1922
1923
|
let i = e.getAttribute("caseSensitive", Z);
|
|
1923
|
-
i != null && (
|
|
1924
|
+
i != null && (se.collatorOptions = i ? ut.CaseSensitiveOptions : ut.CaseInsensitiveOptions);
|
|
1924
1925
|
let a = e.getAttribute("sortMethod");
|
|
1925
|
-
a !== "stroke" && a !== "pinYin" || (
|
|
1926
|
-
...
|
|
1926
|
+
a !== "stroke" && a !== "pinYin" || (se.collatorOptions = {
|
|
1927
|
+
...se.collatorOptions,
|
|
1927
1928
|
collation: a === "stroke" ? "stroke" : "pinyin"
|
|
1928
|
-
}), e.getAttribute("columnSort", Z) && (r.axis =
|
|
1929
|
+
}), e.getAttribute("columnSort", Z) && (r.axis = nt.Axis.Column);
|
|
1929
1930
|
let o = e.getAttribute("ref"), s = t.r;
|
|
1930
|
-
|
|
1931
|
+
ce = o && s ? W.fastStringToRange(o) : null, ce && (r.extent = { range: v(s, ce) }), n.sort = r, e.setSource(t);
|
|
1931
1932
|
}
|
|
1932
1933
|
}), d.registerVisitor({
|
|
1933
1934
|
from: "sortCondition",
|
|
@@ -1941,11 +1942,11 @@ var ir = {
|
|
|
1941
1942
|
i || (i = [], r.sorts = i);
|
|
1942
1943
|
let a = e.getAttribute("ref"), o = 0, s = null;
|
|
1943
1944
|
if (a) {
|
|
1944
|
-
let e =
|
|
1945
|
-
o = r ? n - i : n, r &&
|
|
1945
|
+
let e = W.fastStringToRange(a, gr), n = e.colStart, r = t.r, i = r.colStart;
|
|
1946
|
+
o = r ? n - i : n, r && ce && (s = xe(r, ce, e));
|
|
1946
1947
|
}
|
|
1947
1948
|
r.extent && (r.extent.sorts ??= []).push(s);
|
|
1948
|
-
let c = { ...
|
|
1949
|
+
let c = { ...se }, l = Se(e.getAttribute("sortBy"));
|
|
1949
1950
|
l && (c.sortOn = l);
|
|
1950
1951
|
let u = p(e);
|
|
1951
1952
|
u && (c.style = u), e.copyToObject(c, "iconSet", $), e.copyToObject(c, "customList", $), c.reverse = e.getAttribute("descending", Z) ?? !1;
|
|
@@ -1956,12 +1957,12 @@ var ir = {
|
|
|
1956
1957
|
i.push(d);
|
|
1957
1958
|
}
|
|
1958
1959
|
});
|
|
1959
|
-
let
|
|
1960
|
+
let le = (e) => {
|
|
1960
1961
|
b = e.getSource(), ee = "topLeft", e.copyTo("topLeft", $, "topLeftCell");
|
|
1961
|
-
let t =
|
|
1962
|
+
let t = oe(e.getAttribute("defaultGridColor")), n = e.getAttribute("colorId");
|
|
1962
1963
|
n === null || t || (e.getSource().gridLineColor = "index" + parseFloat(n)), e.copyTo("showZeros", Z), e.copyTo("showFormulas", Z), e.copyTo("zoomScale", Q), e.copyTo("viewMode", $, "view");
|
|
1963
1964
|
let r = {};
|
|
1964
|
-
for (let [t, n] of
|
|
1965
|
+
for (let [t, n] of M) {
|
|
1965
1966
|
let i = e.getAttribute(n, Q);
|
|
1966
1967
|
i && (r[t] = Math.min(400, Math.max(10, i)));
|
|
1967
1968
|
}
|
|
@@ -1971,7 +1972,7 @@ var ir = {
|
|
|
1971
1972
|
from: "sheetView",
|
|
1972
1973
|
to: "view",
|
|
1973
1974
|
openTag: (e) => {
|
|
1974
|
-
|
|
1975
|
+
le(e);
|
|
1975
1976
|
},
|
|
1976
1977
|
closeTag: () => {
|
|
1977
1978
|
b = null;
|
|
@@ -1986,10 +1987,10 @@ var ir = {
|
|
|
1986
1987
|
from: "customSheetView",
|
|
1987
1988
|
to: [],
|
|
1988
1989
|
openTag: (e) => {
|
|
1989
|
-
|
|
1990
|
+
C = !0, le(e);
|
|
1990
1991
|
},
|
|
1991
1992
|
closeTag: () => {
|
|
1992
|
-
|
|
1993
|
+
C = !1, b = null;
|
|
1993
1994
|
}
|
|
1994
1995
|
}), d.registerVisitor({
|
|
1995
1996
|
from: "selection",
|
|
@@ -2020,7 +2021,7 @@ var ir = {
|
|
|
2020
2021
|
if (t === "frozen" || t === "frozenSplit") {
|
|
2021
2022
|
let t = {};
|
|
2022
2023
|
b.freezePanes = t, e.copyToObject(t, "topLeft", $, "topLeftCell");
|
|
2023
|
-
let n = (b.topLeft ?
|
|
2024
|
+
let n = (b.topLeft ? W.fastStringToCell(b.topLeft) : void 0) ?? {
|
|
2024
2025
|
colIndex: 0,
|
|
2025
2026
|
rowIndex: 0
|
|
2026
2027
|
}, r = {
|
|
@@ -2032,7 +2033,7 @@ var ir = {
|
|
|
2032
2033
|
colIndex: n.colIndex + r.colIndex,
|
|
2033
2034
|
rowIndex: n.rowIndex + r.rowIndex
|
|
2034
2035
|
};
|
|
2035
|
-
t.coords =
|
|
2036
|
+
t.coords = W.cellToString(i);
|
|
2036
2037
|
}
|
|
2037
2038
|
}
|
|
2038
2039
|
}), d.registerVisitor({
|
|
@@ -2050,16 +2051,16 @@ var ir = {
|
|
|
2050
2051
|
from: "tabColor",
|
|
2051
2052
|
to: null,
|
|
2052
2053
|
openTag: (t) => {
|
|
2053
|
-
let n =
|
|
2054
|
+
let n = ge((e) => t.getAttribute(e));
|
|
2054
2055
|
n && (e.tabColor = n);
|
|
2055
2056
|
}
|
|
2056
2057
|
});
|
|
2057
|
-
let
|
|
2058
|
+
let C = !1, w = () => e.pageLayout ??= {};
|
|
2058
2059
|
d.registerVisitor({
|
|
2059
2060
|
from: "pageSetUpPr",
|
|
2060
2061
|
to: null,
|
|
2061
2062
|
openTag: (e) => {
|
|
2062
|
-
!0 === e.getAttribute("fitToPage", Z) && (
|
|
2063
|
+
!0 === e.getAttribute("fitToPage", Z) && (w().fitToPage = !0), !1 === e.getAttribute("autoPageBreaks", Z) && (w().hideAutoPageBreaks = !0);
|
|
2063
2064
|
}
|
|
2064
2065
|
}), d.registerVisitor({
|
|
2065
2066
|
from: "outlinePr",
|
|
@@ -2078,7 +2079,7 @@ var ir = {
|
|
|
2078
2079
|
from: "pageMargins",
|
|
2079
2080
|
to: null,
|
|
2080
2081
|
openTag: (e) => {
|
|
2081
|
-
if (
|
|
2082
|
+
if (C) return;
|
|
2082
2083
|
let t = (t, n) => e.getAttribute(t, Pn) ?? n, n = {
|
|
2083
2084
|
left: t("left", .7),
|
|
2084
2085
|
right: t("right", .7),
|
|
@@ -2087,14 +2088,14 @@ var ir = {
|
|
|
2087
2088
|
header: t("header", .3),
|
|
2088
2089
|
footer: t("footer", .3)
|
|
2089
2090
|
};
|
|
2090
|
-
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (
|
|
2091
|
+
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (w().margins = n);
|
|
2091
2092
|
}
|
|
2092
2093
|
}), d.registerVisitor({
|
|
2093
2094
|
from: "pageSetup",
|
|
2094
2095
|
to: null,
|
|
2095
2096
|
openTag: (e) => {
|
|
2096
|
-
if (
|
|
2097
|
-
let n =
|
|
2097
|
+
if (C) return;
|
|
2098
|
+
let n = w(), r = (t) => e.getAttribute(t, Q) ?? void 0, i = (t) => e.getAttribute(t, Z), a = e.getAttribute("orientation");
|
|
2098
2099
|
a !== "landscape" && a !== "portrait" || (n.orientation = a);
|
|
2099
2100
|
for (let e of [
|
|
2100
2101
|
"paperSize",
|
|
@@ -2113,9 +2114,9 @@ var ir = {
|
|
|
2113
2114
|
o && (n.paperHeight = o);
|
|
2114
2115
|
let s = e.getAttribute("paperWidth");
|
|
2115
2116
|
s && (n.paperWidth = s), e.getAttribute("pageOrder") === "overThenDown" && (n.printOrder = "overThenDown"), !0 === i("blackAndWhite") && (n.blackAndWhite = !0), !0 === i("draft") && (n.draftMode = !0), !0 === i("useFirstPageNumber") && (n.useFirstPageNumber = !0), !1 === i("usePrinterDefaults") && (n.ignorePrinterDefaults = !0);
|
|
2116
|
-
let c = e.getAttribute("cellComments"), l =
|
|
2117
|
+
let c = e.getAttribute("cellComments"), l = ye.find(([e]) => e === c)?.[1];
|
|
2117
2118
|
l && (n.printComments = l);
|
|
2118
|
-
let u = e.getAttribute("errors"), d =
|
|
2119
|
+
let u = e.getAttribute("errors"), d = Ce.find(([e]) => e === u)?.[1];
|
|
2119
2120
|
d && (n.printErrors = d);
|
|
2120
2121
|
let f = e.getAttribute("r:id"), p = f ? t(f, "part") : null;
|
|
2121
2122
|
p && (n.printerSettings = p);
|
|
@@ -2124,49 +2125,49 @@ var ir = {
|
|
|
2124
2125
|
from: "printOptions",
|
|
2125
2126
|
to: null,
|
|
2126
2127
|
openTag: (e) => {
|
|
2127
|
-
if (
|
|
2128
|
+
if (C) return;
|
|
2128
2129
|
let t = (t) => !0 === e.getAttribute(t, Z);
|
|
2129
|
-
t("horizontalCentered") && (
|
|
2130
|
+
t("horizontalCentered") && (w().centerHorizontally = !0), t("verticalCentered") && (w().centerVertically = !0), t("gridLines") && (w().printGridlines = !0), t("headings") && (w().printHeadings = !0);
|
|
2130
2131
|
}
|
|
2131
2132
|
}), d.registerVisitor({
|
|
2132
2133
|
from: "headerFooter",
|
|
2133
2134
|
to: {},
|
|
2134
2135
|
openTag: (e) => {
|
|
2135
|
-
if (
|
|
2136
|
+
if (C) return;
|
|
2136
2137
|
let t = {}, n = (t) => e.getAttribute(t, Z);
|
|
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 && (
|
|
2138
|
+
!0 === n("differentOddEven") && (t.differentOddEven = !0), !0 === n("differentFirst") && (t.differentFirst = !0), !1 === n("scaleWithDoc") && (t.ignoreSheetScale = !0), !1 === n("alignWithMargins") && (t.ignoreSheetMargins = !0), Object.keys(t).length > 0 && (w().headerFooter = t);
|
|
2138
2139
|
}
|
|
2139
2140
|
});
|
|
2140
|
-
for (let e of
|
|
2141
|
+
for (let e of Me) d.registerVisitor({
|
|
2141
2142
|
from: e,
|
|
2142
2143
|
to: {},
|
|
2143
2144
|
text: (t, n) => {
|
|
2144
|
-
if (
|
|
2145
|
-
let r =
|
|
2145
|
+
if (C) return;
|
|
2146
|
+
let r = w(), i = r.headerFooter ??= {};
|
|
2146
2147
|
i[e] = (i[e] ?? "") + f(t);
|
|
2147
2148
|
}
|
|
2148
2149
|
});
|
|
2149
|
-
let
|
|
2150
|
+
let de = "rowBreaks";
|
|
2150
2151
|
for (let [e, t] of [["rowBreaks", "rowBreaks"], ["colBreaks", "columnBreaks"]]) d.registerVisitor({
|
|
2151
2152
|
from: e,
|
|
2152
2153
|
to: {},
|
|
2153
2154
|
openTag: () => {
|
|
2154
|
-
|
|
2155
|
+
de = t;
|
|
2155
2156
|
}
|
|
2156
2157
|
});
|
|
2157
2158
|
d.registerVisitor({
|
|
2158
2159
|
from: "brk",
|
|
2159
2160
|
to: null,
|
|
2160
2161
|
openTag: (e) => {
|
|
2161
|
-
if (
|
|
2162
|
+
if (C) return;
|
|
2162
2163
|
let t = e.getAttribute("id", Q);
|
|
2163
2164
|
if (t == null) return;
|
|
2164
2165
|
let n = { index: t }, r = e.getAttribute("min", Q);
|
|
2165
2166
|
r != null && (n.min = r);
|
|
2166
2167
|
let i = e.getAttribute("max", Q);
|
|
2167
2168
|
i != null && (n.max = i), !0 !== e.getAttribute("man", Z) && (n.automatic = !0), !0 === e.getAttribute("pt", Z) && (n.pivot = !0);
|
|
2168
|
-
let a =
|
|
2169
|
-
(a[
|
|
2169
|
+
let a = w();
|
|
2170
|
+
(a[de] ??= []).push(n);
|
|
2170
2171
|
}
|
|
2171
2172
|
}), d.registerVisitor({
|
|
2172
2173
|
from: "ignoredErrors",
|
|
@@ -2206,7 +2207,7 @@ var ir = {
|
|
|
2206
2207
|
});
|
|
2207
2208
|
}
|
|
2208
2209
|
});
|
|
2209
|
-
let
|
|
2210
|
+
let pe = {
|
|
2210
2211
|
from: "dataValidation",
|
|
2211
2212
|
to: [],
|
|
2212
2213
|
openTag: (e) => {
|
|
@@ -2225,23 +2226,23 @@ var ir = {
|
|
|
2225
2226
|
closeTag: (e) => {
|
|
2226
2227
|
let t = e.getSource();
|
|
2227
2228
|
if (!t?.rule) return;
|
|
2228
|
-
let n =
|
|
2229
|
+
let n = ke(t.rule, s);
|
|
2229
2230
|
n && (e.getAttribute("allowBlank", Z) && (n.includeBlanks = !0), t.v.condition = n), delete t.rule;
|
|
2230
2231
|
}
|
|
2231
2232
|
};
|
|
2232
|
-
d.registerVisitor(
|
|
2233
|
+
d.registerVisitor(pe), d.registerVisitor({
|
|
2233
2234
|
from: "formula1",
|
|
2234
2235
|
to: {},
|
|
2235
2236
|
text: (e, t) => {
|
|
2236
2237
|
let n = t.getParent().rule;
|
|
2237
|
-
n?.type && (n.formula1 =
|
|
2238
|
+
n?.type && (n.formula1 = P(_(e), n.type));
|
|
2238
2239
|
}
|
|
2239
2240
|
}), d.registerVisitor({
|
|
2240
2241
|
from: "formula2",
|
|
2241
2242
|
to: {},
|
|
2242
2243
|
text: (e, t) => {
|
|
2243
2244
|
let n = t.getParent().rule;
|
|
2244
|
-
n?.type && (n.formula2 =
|
|
2245
|
+
n?.type && (n.formula2 = P(_(e), n.type));
|
|
2245
2246
|
}
|
|
2246
2247
|
}), d.registerVisitor({
|
|
2247
2248
|
from: "picture",
|
|
@@ -2253,7 +2254,7 @@ var ir = {
|
|
|
2253
2254
|
e.getSource().resId = r;
|
|
2254
2255
|
}
|
|
2255
2256
|
});
|
|
2256
|
-
let
|
|
2257
|
+
let _e = {
|
|
2257
2258
|
from: "slicer",
|
|
2258
2259
|
to: {},
|
|
2259
2260
|
openTag: (e) => {
|
|
@@ -2265,8 +2266,8 @@ var ir = {
|
|
|
2265
2266
|
for (let e of a) i.slicers[e] = r[e];
|
|
2266
2267
|
}
|
|
2267
2268
|
};
|
|
2268
|
-
d.registerVisitor(
|
|
2269
|
-
let
|
|
2269
|
+
d.registerVisitor(_e);
|
|
2270
|
+
let be = {
|
|
2270
2271
|
from: "timelineRef",
|
|
2271
2272
|
to: {},
|
|
2272
2273
|
openTag: (e) => {
|
|
@@ -2288,8 +2289,8 @@ var ir = {
|
|
|
2288
2289
|
closeTag: (e) => {
|
|
2289
2290
|
t(String(e.getSource() ?? ""), e);
|
|
2290
2291
|
}
|
|
2291
|
-
}),
|
|
2292
|
-
|
|
2292
|
+
}), I = /* @__PURE__ */ new Map();
|
|
2293
|
+
I.set("dataValidations", {
|
|
2293
2294
|
from: "dataValidations",
|
|
2294
2295
|
to: "validations",
|
|
2295
2296
|
openTag: (e) => {
|
|
@@ -2299,15 +2300,15 @@ var ir = {
|
|
|
2299
2300
|
closeTag: (e) => {
|
|
2300
2301
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
2301
2302
|
}
|
|
2302
|
-
}),
|
|
2303
|
-
...
|
|
2303
|
+
}), I.set("dataValidation", {
|
|
2304
|
+
...pe,
|
|
2304
2305
|
closeTag: (e) => {
|
|
2305
|
-
|
|
2306
|
+
pe.closeTag(e);
|
|
2306
2307
|
let t = e.getSource();
|
|
2307
2308
|
t && !t.r && (e.warn("x14 dataValidation with no xm:sqref was dropped."), e.setSource(void 0));
|
|
2308
2309
|
}
|
|
2309
2310
|
});
|
|
2310
|
-
let
|
|
2311
|
+
let we = (e) => ({
|
|
2311
2312
|
from: e,
|
|
2312
2313
|
to: {},
|
|
2313
2314
|
openTag: (t) => {
|
|
@@ -2317,18 +2318,18 @@ var ir = {
|
|
|
2317
2318
|
});
|
|
2318
2319
|
}
|
|
2319
2320
|
});
|
|
2320
|
-
|
|
2321
|
+
I.set("formula1", we("formula1")), I.set("formula2", we("formula2")), I.set("f", F("f", (e, t) => {
|
|
2321
2322
|
let n = t.getParent(), r = n?.rule;
|
|
2322
|
-
r && (r[n.key] =
|
|
2323
|
-
})),
|
|
2323
|
+
r && (r[n.key] = P(_(e), r.type));
|
|
2324
|
+
})), I.set("sqref", F("sqref", (e, t) => {
|
|
2324
2325
|
let n = t.getParent(), r = e.trim();
|
|
2325
2326
|
n && r && (n.r = r.split(/\s+/).join(","));
|
|
2326
2327
|
}));
|
|
2327
|
-
let
|
|
2328
|
-
|
|
2328
|
+
let Te = /* @__PURE__ */ new Map(), Ee = [], L = /* @__PURE__ */ new Map();
|
|
2329
|
+
L.set("conditionalFormattings", {
|
|
2329
2330
|
from: "conditionalFormattings",
|
|
2330
2331
|
transparent: !0
|
|
2331
|
-
}),
|
|
2332
|
+
}), L.set("conditionalFormatting", {
|
|
2332
2333
|
from: "conditionalFormatting",
|
|
2333
2334
|
to: {},
|
|
2334
2335
|
openTag: (e) => {
|
|
@@ -2338,10 +2339,10 @@ var ir = {
|
|
|
2338
2339
|
let t = e.getSource(), n = t?.rules ?? [];
|
|
2339
2340
|
for (let e = 0; e < n.length; e++) {
|
|
2340
2341
|
let r = n[e];
|
|
2341
|
-
r.sqref = t.sqref, r.id ?
|
|
2342
|
+
r.sqref = t.sqref, r.id ? Te.set(r.id, r) : Ee.push(r);
|
|
2342
2343
|
}
|
|
2343
2344
|
}
|
|
2344
|
-
}),
|
|
2345
|
+
}), L.set("cfRule", {
|
|
2345
2346
|
from: "cfRule",
|
|
2346
2347
|
to: {},
|
|
2347
2348
|
openTag: (e) => {
|
|
@@ -2351,10 +2352,10 @@ var ir = {
|
|
|
2351
2352
|
let t = e.getSource();
|
|
2352
2353
|
t && e.getParent()?.rules?.push(t);
|
|
2353
2354
|
}
|
|
2354
|
-
}),
|
|
2355
|
+
}), L.set("sqref", F("sqref", (e, t) => {
|
|
2355
2356
|
let n = t.getParent(), r = e.trim();
|
|
2356
2357
|
n && r && (n.sqref = r);
|
|
2357
|
-
})),
|
|
2358
|
+
})), L.set("dataBar", {
|
|
2358
2359
|
from: "dataBar",
|
|
2359
2360
|
to: {},
|
|
2360
2361
|
openTag: (e) => {
|
|
@@ -2363,7 +2364,7 @@ var ir = {
|
|
|
2363
2364
|
closeTag: (e) => {
|
|
2364
2365
|
e.getParent().dataBar = e.getSource();
|
|
2365
2366
|
}
|
|
2366
|
-
}),
|
|
2367
|
+
}), L.set("iconSet", {
|
|
2367
2368
|
from: "iconSet",
|
|
2368
2369
|
to: {},
|
|
2369
2370
|
openTag: (e) => {
|
|
@@ -2373,26 +2374,26 @@ var ir = {
|
|
|
2373
2374
|
e.getParent().iconSet = e.getSource();
|
|
2374
2375
|
}
|
|
2375
2376
|
});
|
|
2376
|
-
let
|
|
2377
|
-
|
|
2377
|
+
let Ae = /* @__PURE__ */ new Map();
|
|
2378
|
+
Ae.set("f", F("f", (e, t) => {
|
|
2378
2379
|
let n = t.getParent();
|
|
2379
2380
|
if (!n) return;
|
|
2380
2381
|
let r = e.trim(), i = Number(r);
|
|
2381
2382
|
n.value = r.length > 0 && Number.isFinite(i) ? i : _(e);
|
|
2382
|
-
})),
|
|
2383
|
+
})), L.set("cfvo", {
|
|
2383
2384
|
from: "cfvo",
|
|
2384
2385
|
to: {},
|
|
2385
|
-
scope: () =>
|
|
2386
|
+
scope: () => Ae,
|
|
2386
2387
|
openTag: (e) => {
|
|
2387
2388
|
let t = e.getParent();
|
|
2388
2389
|
t.conditions ||= [];
|
|
2389
2390
|
let n = e.getSource();
|
|
2390
2391
|
t.conditions.push(n), e.copyTo("type", $), !1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
2391
2392
|
}
|
|
2392
|
-
}),
|
|
2393
|
+
}), L.set("f", F("f", (e, t) => {
|
|
2393
2394
|
let n = t.getParent();
|
|
2394
2395
|
n && (n.formulas ??= []).push(_(e));
|
|
2395
|
-
})),
|
|
2396
|
+
})), L.set("dxf", {
|
|
2396
2397
|
from: "dxf",
|
|
2397
2398
|
to: {},
|
|
2398
2399
|
raw: !0,
|
|
@@ -2404,15 +2405,15 @@ var ir = {
|
|
|
2404
2405
|
n && (t.style = n);
|
|
2405
2406
|
}
|
|
2406
2407
|
});
|
|
2407
|
-
let
|
|
2408
|
+
let Ne = (e) => ({
|
|
2408
2409
|
from: e,
|
|
2409
2410
|
to: {},
|
|
2410
2411
|
openTag: (t) => {
|
|
2411
|
-
let n =
|
|
2412
|
+
let n = ge((e) => t.getAttribute(e));
|
|
2412
2413
|
n && (t.getParent()[e] = n);
|
|
2413
2414
|
}
|
|
2414
2415
|
});
|
|
2415
|
-
|
|
2416
|
+
L.set("borderColor", Ne("borderColor")), L.set("negativeFillColor", Ne("negativeFillColor")), L.set("negativeBorderColor", Ne("negativeBorderColor")), L.set("axisColor", Ne("axisColor")), L.set("cfIcon", {
|
|
2416
2417
|
from: "cfIcon",
|
|
2417
2418
|
to: {},
|
|
2418
2419
|
openTag: (e) => {
|
|
@@ -2425,23 +2426,23 @@ var ir = {
|
|
|
2425
2426
|
});
|
|
2426
2427
|
}
|
|
2427
2428
|
});
|
|
2428
|
-
let
|
|
2429
|
-
|
|
2429
|
+
let Pe = /* @__PURE__ */ new Map();
|
|
2430
|
+
Pe.set("id", F("id", (e, t) => {
|
|
2430
2431
|
let n = t.getParent(), r = e.trim();
|
|
2431
2432
|
n && r && (n.x14Id = r);
|
|
2432
2433
|
}));
|
|
2433
|
-
let
|
|
2434
|
-
|
|
2434
|
+
let Ie = /* @__PURE__ */ new Map();
|
|
2435
|
+
Ie.set("slicerList", {
|
|
2435
2436
|
from: "slicerList",
|
|
2436
2437
|
transparent: !0
|
|
2437
|
-
}),
|
|
2438
|
-
let
|
|
2439
|
-
|
|
2438
|
+
}), Ie.set("slicer", _e);
|
|
2439
|
+
let Le = /* @__PURE__ */ new Map();
|
|
2440
|
+
Le.set("timelineRefs", {
|
|
2440
2441
|
from: "timelineRefs",
|
|
2441
2442
|
transparent: !0
|
|
2442
|
-
}),
|
|
2443
|
-
let
|
|
2444
|
-
|
|
2443
|
+
}), Le.set("timelineRef", be);
|
|
2444
|
+
let R = /* @__PURE__ */ new Map();
|
|
2445
|
+
R.set("sparklineGroups", {
|
|
2445
2446
|
from: "sparklineGroups",
|
|
2446
2447
|
to: "sparklineGroups",
|
|
2447
2448
|
openTag: (e) => {
|
|
@@ -2451,7 +2452,7 @@ var ir = {
|
|
|
2451
2452
|
closeTag: (e) => {
|
|
2452
2453
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
2453
2454
|
}
|
|
2454
|
-
}),
|
|
2455
|
+
}), R.set("sparklineGroup", {
|
|
2455
2456
|
from: "sparklineGroup",
|
|
2456
2457
|
to: [],
|
|
2457
2458
|
openTag: (e) => {
|
|
@@ -2466,29 +2467,29 @@ var ir = {
|
|
|
2466
2467
|
});
|
|
2467
2468
|
},
|
|
2468
2469
|
closeTag: (e) => {
|
|
2469
|
-
let t = e.getSource(), n =
|
|
2470
|
+
let t = e.getSource(), n = De(t.properties, t.entries);
|
|
2470
2471
|
n || e.warn("A sparkline group with no sparklines was dropped.", { onceKey: "xlsx.sheet.sparklineGroup.empty" }), e.setSource(n ?? void 0);
|
|
2471
2472
|
}
|
|
2472
2473
|
});
|
|
2473
|
-
for (let e of
|
|
2474
|
+
for (let e of ue) R.set(e, {
|
|
2474
2475
|
from: e,
|
|
2475
2476
|
to: {},
|
|
2476
2477
|
openTag: (t) => {
|
|
2477
|
-
let n =
|
|
2478
|
+
let n = ge((e) => t.getAttribute(e));
|
|
2478
2479
|
n && (t.getParent().properties[e] = n);
|
|
2479
2480
|
}
|
|
2480
2481
|
});
|
|
2481
|
-
|
|
2482
|
+
R.set("sparklines", {
|
|
2482
2483
|
from: "sparklines",
|
|
2483
2484
|
transparent: !0
|
|
2484
|
-
}),
|
|
2485
|
+
}), R.set("sparkline", {
|
|
2485
2486
|
from: "sparkline",
|
|
2486
2487
|
to: {},
|
|
2487
2488
|
openTag: (e) => {
|
|
2488
2489
|
e.setSource({ isSparkline: !0 });
|
|
2489
2490
|
},
|
|
2490
2491
|
closeTag: (e) => {
|
|
2491
|
-
let t = e.getSource(), n = e.getParent(), r = t?.sqref?.trim(), i = r ?
|
|
2492
|
+
let t = e.getSource(), n = e.getParent(), r = t?.sqref?.trim(), i = r ? W.fastStringToRange(r.split(/\s+/)[0]) : null;
|
|
2492
2493
|
i ? n.entries.push({
|
|
2493
2494
|
location: {
|
|
2494
2495
|
rowIndex: i.rowStart,
|
|
@@ -2497,24 +2498,24 @@ var ir = {
|
|
|
2497
2498
|
data: t.data ?? ""
|
|
2498
2499
|
}) : e.warn("A sparkline with no location was dropped.", { onceKey: "xlsx.sheet.sparkline.incomplete" });
|
|
2499
2500
|
}
|
|
2500
|
-
}),
|
|
2501
|
+
}), R.set("f", F("f", (e, t) => {
|
|
2501
2502
|
let n = t.getParent(), r = e.trim();
|
|
2502
2503
|
n && r && (n.isSparkline ? n.data = r : n.properties.dateRange = r);
|
|
2503
|
-
})),
|
|
2504
|
+
})), R.set("sqref", F("sqref", (e, t) => {
|
|
2504
2505
|
let n = t.getParent();
|
|
2505
2506
|
n?.isSparkline && (n.sqref = e);
|
|
2506
2507
|
}));
|
|
2507
|
-
let
|
|
2508
|
-
[o(
|
|
2509
|
-
[o(
|
|
2510
|
-
[o(
|
|
2511
|
-
[o(
|
|
2512
|
-
[o(
|
|
2513
|
-
[o(
|
|
2514
|
-
[o(
|
|
2515
|
-
[o(
|
|
2516
|
-
[o(
|
|
2517
|
-
]),
|
|
2508
|
+
let Re = /* @__PURE__ */ new Map([
|
|
2509
|
+
[o(je), R],
|
|
2510
|
+
[o(Fe), I],
|
|
2511
|
+
[o(he), L],
|
|
2512
|
+
[o(Oe), L],
|
|
2513
|
+
[o(N), Pe],
|
|
2514
|
+
[o(k), Ie],
|
|
2515
|
+
[o(ve), Ie],
|
|
2516
|
+
[o(j), Le],
|
|
2517
|
+
[o(E), ae]
|
|
2518
|
+
]), z = /* @__PURE__ */ new Set();
|
|
2518
2519
|
d.registerVisitor({
|
|
2519
2520
|
from: "extLst",
|
|
2520
2521
|
transparent: !0
|
|
@@ -2522,11 +2523,11 @@ var ir = {
|
|
|
2522
2523
|
from: "ext",
|
|
2523
2524
|
transparent: !0,
|
|
2524
2525
|
scope: (e) => {
|
|
2525
|
-
let t = e.getAttribute("uri"), n = o(t), r =
|
|
2526
|
+
let t = e.getAttribute("uri"), n = o(t), r = Re.get(n);
|
|
2526
2527
|
if (r) return r;
|
|
2527
|
-
if (!
|
|
2528
|
-
|
|
2529
|
-
let r =
|
|
2528
|
+
if (!T.has(n) && !z.has(n)) {
|
|
2529
|
+
z.add(n);
|
|
2530
|
+
let r = Be[n];
|
|
2530
2531
|
e.warn(r ? `Extension content '${r}' (${t}) is not read; it will be lost on resave.` : `Unknown extension content (uri ${t}) is not read; it will be lost on resave.`);
|
|
2531
2532
|
}
|
|
2532
2533
|
return null;
|
|
@@ -2584,14 +2585,14 @@ var ir = {
|
|
|
2584
2585
|
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2585
2586
|
}
|
|
2586
2587
|
});
|
|
2587
|
-
let B = null,
|
|
2588
|
+
let B = null, Ve = !1, H = /* @__PURE__ */ new Map(), U = {
|
|
2588
2589
|
from: "Fallback",
|
|
2589
2590
|
to: null
|
|
2590
|
-
},
|
|
2591
|
+
}, He = {
|
|
2591
2592
|
from: "Choice",
|
|
2592
2593
|
transparent: !0
|
|
2593
2594
|
};
|
|
2594
|
-
|
|
2595
|
+
H.set("Fallback", U), H.set("Choice", He), H.set("control", {
|
|
2595
2596
|
from: "control",
|
|
2596
2597
|
transparent: !0,
|
|
2597
2598
|
openTag: (e) => {
|
|
@@ -2627,7 +2628,7 @@ var ir = {
|
|
|
2627
2628
|
closeTag: () => {
|
|
2628
2629
|
B &&= (e.movables ||= [], e.movables.push(B.movable), null);
|
|
2629
2630
|
}
|
|
2630
|
-
}),
|
|
2631
|
+
}), H.set("controlPr", {
|
|
2631
2632
|
from: "controlPr",
|
|
2632
2633
|
transparent: !0,
|
|
2633
2634
|
raw: !0,
|
|
@@ -2638,7 +2639,7 @@ var ir = {
|
|
|
2638
2639
|
let r = t[e];
|
|
2639
2640
|
n[e] = typeof r == "string" ? r : r?.value ?? "";
|
|
2640
2641
|
}
|
|
2641
|
-
|
|
2642
|
+
fe(n, B.control);
|
|
2642
2643
|
},
|
|
2643
2644
|
closeTag: (e) => {
|
|
2644
2645
|
if (!B) return;
|
|
@@ -2655,18 +2656,18 @@ var ir = {
|
|
|
2655
2656
|
rest: (e.slice(0, t.index) + e.slice(t.index + t[0].length)).trim()
|
|
2656
2657
|
};
|
|
2657
2658
|
})(e.getRawXml() ?? "");
|
|
2658
|
-
t ? (B.movable.anchor = t.anchor, t.anchorType !== "twoCell" && (B.movable.anchorType = t.anchorType), t.rest && (B.control.xml = t.rest)) :
|
|
2659
|
+
t ? (B.movable.anchor = t.anchor, t.anchorType !== "twoCell" && (B.movable.anchorType = t.anchorType), t.rest && (B.control.xml = t.rest)) : Ve || (Ve = !0, e.warn("A form control has no anchor; it is placed at the top left of the sheet."));
|
|
2659
2660
|
}
|
|
2660
2661
|
});
|
|
2661
2662
|
let Ue = {
|
|
2662
2663
|
from: "controls",
|
|
2663
2664
|
transparent: !0,
|
|
2664
|
-
scope: () =>
|
|
2665
|
+
scope: () => H
|
|
2665
2666
|
};
|
|
2666
2667
|
d.registerVisitor(Ue);
|
|
2667
2668
|
let We = /* @__PURE__ */ new Map([
|
|
2668
|
-
["Choice",
|
|
2669
|
-
["Fallback",
|
|
2669
|
+
["Choice", He],
|
|
2670
|
+
["Fallback", U],
|
|
2670
2671
|
["controls", Ue]
|
|
2671
2672
|
]);
|
|
2672
2673
|
d.registerVisitor({
|
|
@@ -2690,16 +2691,16 @@ var ir = {
|
|
|
2690
2691
|
}
|
|
2691
2692
|
});
|
|
2692
2693
|
let Ge = (e, t) => {
|
|
2693
|
-
t.conditions?.length && (e
|
|
2694
|
+
t.conditions?.length && x(e, S(t)), te(e, t), !1 === t.gradient ? e.solidFill = !0 : delete e.solidFill, t.border && t.borderColor && (e.borderColor = t.borderColor), !t.negativeBarColorSameAsPositive && t.negativeFillColor && (e.negativeFillColor = t.negativeFillColor), !(t.negativeBarBorderColorSameAsPositive ?? 1) && t.negativeBorderColor && (e.negativeBorderColor = t.negativeBorderColor), t.axisColor && (e.axisColor = t.axisColor), t.axisPosition !== "middle" && t.axisPosition !== "none" || (e.axisPosition = t.axisPosition), t.direction !== "leftToRight" && t.direction !== "rightToLeft" || (e.direction = t.direction);
|
|
2694
2695
|
}, Ke = (e, t) => {
|
|
2695
|
-
t.conditions?.length && (e.stops =
|
|
2696
|
+
t.conditions?.length && (e.stops = S(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);
|
|
2696
2697
|
}, qe = (e) => {
|
|
2697
2698
|
if (!e.sqref) return null;
|
|
2698
2699
|
let t = e.sqref.split(/\s+/).join(",");
|
|
2699
2700
|
if (e.type === "iconSet") {
|
|
2700
2701
|
if (!e.iconSet) return null;
|
|
2701
2702
|
let n = {
|
|
2702
|
-
type:
|
|
2703
|
+
type: et.ScaleType.IconSet,
|
|
2703
2704
|
stops: []
|
|
2704
2705
|
};
|
|
2705
2706
|
return Ke(n, e.iconSet), {
|
|
@@ -2708,7 +2709,7 @@ var ir = {
|
|
|
2708
2709
|
priority: e.priority
|
|
2709
2710
|
};
|
|
2710
2711
|
}
|
|
2711
|
-
let n =
|
|
2712
|
+
let n = D(e, s);
|
|
2712
2713
|
if (!n) return null;
|
|
2713
2714
|
let r = { condition: n };
|
|
2714
2715
|
return e.style && (r.style = e.style), e.stopIfTrue && (r.stopIfTrue = !0), {
|
|
@@ -2727,13 +2728,13 @@ var ir = {
|
|
|
2727
2728
|
let t = n[e], r = t.x14Id;
|
|
2728
2729
|
if (!r) continue;
|
|
2729
2730
|
delete t.x14Id;
|
|
2730
|
-
let i =
|
|
2731
|
+
let i = Te.get(r);
|
|
2731
2732
|
if (!i) continue;
|
|
2732
|
-
|
|
2733
|
+
Te.delete(r);
|
|
2733
2734
|
let a = t.v?.scale;
|
|
2734
|
-
i.dataBar && a?.type ===
|
|
2735
|
+
i.dataBar && a?.type === et.ScaleType.DataBar ? Ge(a, i.dataBar) : i.iconSet && a?.type === et.ScaleType.IconSet && Ke(a, i.iconSet);
|
|
2735
2736
|
}
|
|
2736
|
-
let r = [...
|
|
2737
|
+
let r = [...Te.values(), ...Ee], i = /* @__PURE__ */ new Set(), a = 0;
|
|
2737
2738
|
for (let e = 0; e < r.length; e++) {
|
|
2738
2739
|
let o = qe(r[e]);
|
|
2739
2740
|
o ? (n || (n = [], t.conditionals = n), n.push(o)) : (i.add(r[e].type ?? "unknown"), a++);
|
|
@@ -2773,9 +2774,9 @@ var ir = {
|
|
|
2773
2774
|
to: "protection",
|
|
2774
2775
|
openTag: (e) => {
|
|
2775
2776
|
let t = e.getSource();
|
|
2776
|
-
for (let n of
|
|
2777
|
+
for (let n of me) {
|
|
2777
2778
|
let r = e.hasAttribute(n.attribute) ? e.getAttribute(n.attribute) : null;
|
|
2778
|
-
t[n.key] =
|
|
2779
|
+
t[n.key] = ze(n, r);
|
|
2779
2780
|
}
|
|
2780
2781
|
if (t.sheet) return;
|
|
2781
2782
|
let n = {};
|
|
@@ -2826,7 +2827,7 @@ var ir = {
|
|
|
2826
2827
|
to: [],
|
|
2827
2828
|
openTag: (e) => {
|
|
2828
2829
|
let t = e.getSource(), n = e.getAttribute("min"), r = e.getAttribute("max"), i = n === void 0 ? 0 : parseInt(n) - 1, a = r === void 0 ? i : parseInt(r) - 1;
|
|
2829
|
-
t.r =
|
|
2830
|
+
t.r = W.runToString(i, a, !0);
|
|
2830
2831
|
let o = {};
|
|
2831
2832
|
t.v = o, e.copyToObject(o, "sz", Pn, "width"), e.copyToObject(o, "csz", Z, "customWidth"), e.copyToObject(o, "h", Z, "hidden"), e.copyToObject(o, "l", Q, "outlineLevel"), e.copyToObject(o, "cl", Z, "collapsed"), e.getAttribute("bestFit", Z) && (o.bf = !0), e.copyToObject(o, "s", Q, "style");
|
|
2832
2833
|
}
|
|
@@ -2837,26 +2838,26 @@ var ir = {
|
|
|
2837
2838
|
e.warn("'OLE Objects' are not supported.");
|
|
2838
2839
|
}
|
|
2839
2840
|
});
|
|
2840
|
-
let Je = !1, Ye = !1, Xe = 0, Ze = "", Qe = "",
|
|
2841
|
+
let Je = !1, Ye = !1, Xe = 0, Ze = "", Qe = "", G = (e) => {
|
|
2841
2842
|
let t = e.indexOf(":");
|
|
2842
2843
|
return t === -1 ? e : e.slice(t + 1);
|
|
2843
|
-
},
|
|
2844
|
+
}, tt = new nr();
|
|
2844
2845
|
return vr(y, e, d.createEventHandler(e, a, s), s, c, {
|
|
2845
2846
|
onOpenTag: (e) => {
|
|
2846
2847
|
Je = !0;
|
|
2847
|
-
let t =
|
|
2848
|
-
t === "t" || t === "v" ? Xe === 0 && (Ye = !0) : t === "rPh" || t === "phoneticPr" ? Xe++ : Xe === 0 &&
|
|
2848
|
+
let t = G(e.name);
|
|
2849
|
+
t === "t" || t === "v" ? Xe === 0 && (Ye = !0) : t === "rPh" || t === "phoneticPr" ? Xe++ : Xe === 0 && tt.onOpenTag(t, e.attributes);
|
|
2849
2850
|
},
|
|
2850
2851
|
onText: (e) => {
|
|
2851
|
-
Ye && (Ze += e,
|
|
2852
|
+
Ye && (Ze += e, tt.onText(e));
|
|
2852
2853
|
},
|
|
2853
2854
|
onCloseTag: (e) => {
|
|
2854
|
-
let t =
|
|
2855
|
-
t === "t" || t === "v" ? Ye = !1 : t === "rPh" || t === "phoneticPr" ? Xe > 0 && Xe-- :
|
|
2855
|
+
let t = G(e.name);
|
|
2856
|
+
t === "t" || t === "v" ? Ye = !1 : t === "rPh" || t === "phoneticPr" ? Xe > 0 && Xe-- : tt.onCloseTag(t);
|
|
2856
2857
|
},
|
|
2857
2858
|
onEnd: () => {
|
|
2858
2859
|
if (!Je) return;
|
|
2859
|
-
let e =
|
|
2860
|
+
let e = tt.take();
|
|
2860
2861
|
Je = !1, Ye = !1, Xe = 0;
|
|
2861
2862
|
let t = f(Ze);
|
|
2862
2863
|
return Ze = "", Qe = t, e ? {
|
|
@@ -2908,25 +2909,25 @@ var ir = {
|
|
|
2908
2909
|
rowStart: 0,
|
|
2909
2910
|
rowEnd: 0
|
|
2910
2911
|
}, _r = (e) => e === "1" || e === "true", vr = (e, t, n, r, i, a, o, s, c, l) => {
|
|
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") ??
|
|
2912
|
+
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") ?? qe.EmptyArray, ie = null, ae = !1, oe = W.normalizeA1ToR1C1, se = Je.createConflatingRanges(), ce = /* @__PURE__ */ new Map(), le = [], C = [], w = !1, ue = !1, de = null, fe = (e) => {
|
|
2912
2913
|
let t = o?.get("metadata")?.values;
|
|
2913
2914
|
if (!t) return;
|
|
2914
2915
|
let n = parseInt(e, 10);
|
|
2915
2916
|
if (!Number.isFinite(n) || n < 1) return;
|
|
2916
2917
|
let r = t[n - 1]?.get("XLRICHVALUE");
|
|
2917
2918
|
return r?.richValueIndex === void 0 ? void 0 : re[r.richValueIndex];
|
|
2918
|
-
},
|
|
2919
|
+
}, pe = !1, me = Je.createConflatingRanges(), he, T = !1, E = -1, D = -1, O = null, k = null, ge = (e) => ({
|
|
2919
2920
|
t: "r",
|
|
2920
2921
|
v: {
|
|
2921
2922
|
type: "hyperlink",
|
|
2922
2923
|
data: {
|
|
2923
|
-
address:
|
|
2924
|
+
address: he,
|
|
2924
2925
|
friendly: e
|
|
2925
2926
|
}
|
|
2926
2927
|
}
|
|
2927
|
-
}),
|
|
2928
|
+
}), _e = null, A = [], ve = null, ye = -2, j = 0, M = "", be = "", N = "", P = "", F = "", xe = "", I = "", Se = "", Ce = "", we = "", Te = "", Ee = "", De = "", L = "", Oe = !0, ke = null, Ae = !1, je = !1, Me = !1, Ne = null, Pe = 0, Fe = (e) => {
|
|
2928
2929
|
let r = e.name, s = r.indexOf(":");
|
|
2929
|
-
if (s !== -1 && (r = r.slice(s + 1)),
|
|
2930
|
+
if (s !== -1 && (r = r.slice(s + 1)), Pe++, Pe % 196608 == 0 && i?.(Pe), k) {
|
|
2930
2931
|
let t = e.attributes;
|
|
2931
2932
|
switch (r) {
|
|
2932
2933
|
case "v":
|
|
@@ -2941,16 +2942,16 @@ var ir = {
|
|
|
2941
2942
|
b = t.ref, y = e;
|
|
2942
2943
|
break;
|
|
2943
2944
|
case "array":
|
|
2944
|
-
b = t.ref,
|
|
2945
|
+
b = t.ref, de = b;
|
|
2945
2946
|
break;
|
|
2946
2947
|
case "dataTable": {
|
|
2947
2948
|
let e = ((e, t, n) => {
|
|
2948
2949
|
let r = e.r1, i = _r(e.del1);
|
|
2949
2950
|
if (!r && !i) return null;
|
|
2950
|
-
let a = e.ref ??
|
|
2951
|
+
let a = e.ref ?? W.cellToString({
|
|
2951
2952
|
rowIndex: t,
|
|
2952
2953
|
colIndex: n
|
|
2953
|
-
}), o =
|
|
2954
|
+
}), o = W.fastStringToRange(a);
|
|
2954
2955
|
if (!o) return null;
|
|
2955
2956
|
let s = { ref: {
|
|
2956
2957
|
rowStart: o.rowStart,
|
|
@@ -2963,36 +2964,36 @@ var ir = {
|
|
|
2963
2964
|
t && (s.columnInput = t), _r(e.del2) && (s.columnInputDeleted = !0);
|
|
2964
2965
|
}
|
|
2965
2966
|
return s;
|
|
2966
|
-
})(t,
|
|
2967
|
-
e && (
|
|
2967
|
+
})(t, E, D);
|
|
2968
|
+
e && (C.push(e), _r(t.ca) && me.append(E, D));
|
|
2968
2969
|
return;
|
|
2969
2970
|
}
|
|
2970
2971
|
}
|
|
2971
2972
|
let e = t.ca;
|
|
2972
|
-
e !== void 0 && (
|
|
2973
|
+
e !== void 0 && (pe = e === "1");
|
|
2973
2974
|
break;
|
|
2974
2975
|
case "is":
|
|
2975
|
-
|
|
2976
|
+
T = !0;
|
|
2976
2977
|
return;
|
|
2977
2978
|
}
|
|
2978
|
-
|
|
2979
|
+
T && !v && a?.onOpenTag?.(e);
|
|
2979
2980
|
} else if (u) {
|
|
2980
2981
|
if (r === "c") {
|
|
2981
|
-
|
|
2982
|
+
k = e, he = void 0;
|
|
2982
2983
|
let t = e.attributes, n = t.r;
|
|
2983
|
-
|
|
2984
|
+
D = n === void 0 ? D + 1 : W.fastStringToCol(n);
|
|
2984
2985
|
let r = t.t;
|
|
2985
|
-
r === void 0 ?
|
|
2986
|
+
r === void 0 ? _e = null : (_e = r, _e === "str" && (T = !0));
|
|
2986
2987
|
let i = t.s;
|
|
2987
|
-
i === void 0 && (
|
|
2988
|
-
colStart:
|
|
2989
|
-
rowStart:
|
|
2990
|
-
colEnd:
|
|
2991
|
-
rowEnd:
|
|
2988
|
+
i === void 0 && (Ne !== null || Me) && (i = "0"), i !== void 0 && (i = parseInt(i), ke && ke.value === i && ke.colEnd + 1 === D ? ke.colEnd = D : (ke = {
|
|
2989
|
+
colStart: D,
|
|
2990
|
+
rowStart: E,
|
|
2991
|
+
colEnd: D,
|
|
2992
|
+
rowEnd: E,
|
|
2992
2993
|
value: i
|
|
2993
|
-
}, _.push(
|
|
2994
|
+
}, _.push(ke))), de = null, ue = !1, ae = !1;
|
|
2994
2995
|
let a = t.cm;
|
|
2995
|
-
|
|
2996
|
+
w = a !== void 0 && ((e) => {
|
|
2996
2997
|
let t = o?.get("metadata")?.cells;
|
|
2997
2998
|
if (!t) return !1;
|
|
2998
2999
|
let n = parseInt(e, 10);
|
|
@@ -3000,57 +3001,57 @@ var ir = {
|
|
|
3000
3001
|
})(a);
|
|
3001
3002
|
let s = t.vm;
|
|
3002
3003
|
if (s !== void 0) {
|
|
3003
|
-
let e =
|
|
3004
|
-
if (
|
|
3004
|
+
let e = fe(s);
|
|
3005
|
+
if (Ye.isError(e)) {
|
|
3005
3006
|
let t = e.getCode();
|
|
3006
|
-
|
|
3007
|
+
O = {
|
|
3007
3008
|
t: "e",
|
|
3008
3009
|
v: t
|
|
3009
|
-
},
|
|
3010
|
+
}, w && t === Ye.Code.Spill && (ue = !0);
|
|
3010
3011
|
}
|
|
3011
3012
|
}
|
|
3012
3013
|
}
|
|
3013
3014
|
} else {
|
|
3014
|
-
if (
|
|
3015
|
+
if (je && r === "row") {
|
|
3015
3016
|
u = !0;
|
|
3016
3017
|
let t = e.attributes.r;
|
|
3017
|
-
if (
|
|
3018
|
+
if (E = t === void 0 ? E + 1 : parseInt(t) - 1, D = -1, c?.()) {
|
|
3018
3019
|
let e = d[d.length - 1];
|
|
3019
|
-
e && e.max + 1 ===
|
|
3020
|
-
min:
|
|
3021
|
-
max:
|
|
3020
|
+
e && e.max + 1 === E ? e.max = E : d.push({
|
|
3021
|
+
min: E,
|
|
3022
|
+
max: E
|
|
3022
3023
|
});
|
|
3023
3024
|
}
|
|
3024
|
-
if (
|
|
3025
|
-
if (
|
|
3026
|
-
let e =
|
|
3027
|
-
|
|
3028
|
-
min:
|
|
3029
|
-
max:
|
|
3025
|
+
if (j = 0, be = e.attributes.customHeight, be !== void 0 && (j |= pr.CustomHeight), be !== Ce && (Oe = !0, Ce = be), M = e.attributes.ht, M !== void 0 && (j |= pr.Ht), M !== Se && (Oe = !0, Se = M), N = e.attributes.hidden, N !== void 0 && (j |= pr.Hidden), N !== we && (Oe = !0, we = N), F = e.attributes.s, F !== void 0 && (j |= pr.S), F !== Ee && (Oe = !0, Ee = F), P = e.attributes.customFormat, P !== void 0 && (j |= pr.CustomFormat), P !== Te && (Oe = !0, Te = P), xe = e.attributes.outlineLevel, xe !== void 0 && (j |= pr.OutlineLevel), xe !== De && (Oe = !0, De = xe), I = e.attributes.collapsed, I !== void 0 && (j |= pr.Collapsed), I !== L && (Oe = !0, L = I), j !== 0) {
|
|
3026
|
+
if (ye + 1 !== E || Oe) {
|
|
3027
|
+
let e = be !== void 0 && (be === "1" || be === "true"), t = P !== void 0 && (P === "1" || P === "true");
|
|
3028
|
+
Ne = t && F !== void 0 ? F : null, t && Ne === null && (Ne = "0"), ve = {
|
|
3029
|
+
min: E,
|
|
3030
|
+
max: E,
|
|
3030
3031
|
value: {
|
|
3031
|
-
sz:
|
|
3032
|
+
sz: M === void 0 ? -1 : parseFloat(M),
|
|
3032
3033
|
csz: e,
|
|
3033
|
-
h:
|
|
3034
|
-
s:
|
|
3035
|
-
l:
|
|
3036
|
-
cl:
|
|
3034
|
+
h: N !== void 0 && (N === "1" || N === "true"),
|
|
3035
|
+
s: Ne === null ? void 0 : Ne === "0" ? 0 : parseInt(Ne),
|
|
3036
|
+
l: xe === void 0 || xe === "0" ? 0 : parseInt(xe),
|
|
3037
|
+
cl: I !== void 0 && (I === "1" || I === "true")
|
|
3037
3038
|
}
|
|
3038
|
-
},
|
|
3039
|
-
} else
|
|
3039
|
+
}, A.push(ve);
|
|
3040
|
+
} else ve.max = E;
|
|
3040
3041
|
}
|
|
3041
|
-
|
|
3042
|
+
ye = E, Oe = !1;
|
|
3042
3043
|
return;
|
|
3043
3044
|
}
|
|
3044
|
-
if (r === "sheetData" && (
|
|
3045
|
-
|
|
3045
|
+
if (r === "sheetData" && (je = !0), !Ae && r === "sheetData") {
|
|
3046
|
+
Ae = !0;
|
|
3046
3047
|
let e = t.cols, n = e ? e.length : 0;
|
|
3047
|
-
for (let t = 0; !
|
|
3048
|
+
for (let t = 0; !Me && t < n; t++) e[t].v.s && (Me = !0);
|
|
3048
3049
|
}
|
|
3049
3050
|
n?.onOpenTag?.(e);
|
|
3050
3051
|
}
|
|
3051
|
-
},
|
|
3052
|
+
}, Ie = (t) => {
|
|
3052
3053
|
let r = t.name;
|
|
3053
|
-
if (r === "sheetData" && (
|
|
3054
|
+
if (r === "sheetData" && (je = !1), !v || r !== "c" && r !== "f" || (y && (x = ce.get(y) ?? null), x && (he = ((e) => {
|
|
3054
3055
|
if (e.length < 11 || (32 | e.charCodeAt(0)) != 104 || !/^HYPERLINK\(/i.test(e)) return;
|
|
3055
3056
|
let t = 1, n = !1, r = 10;
|
|
3056
3057
|
for (; r < e.length && t > 0; r++) {
|
|
@@ -3060,29 +3061,29 @@ var ir = {
|
|
|
3060
3061
|
if (t !== 0 || e.slice(r).trim().length > 0) return;
|
|
3061
3062
|
let i = /^HYPERLINK\(\s*"((?:[^"]|"")*)"\s*[,)]/i.exec(e);
|
|
3062
3063
|
return i ? i[1].replace(/""/g, "\"") : null;
|
|
3063
|
-
})(x[2]),
|
|
3064
|
+
})(x[2]), se.append(E, D, x), pe && me.append(E, D)), de !== null && le.push([de, w ? ue ? "error" : "dynamic" : "fixed"]), v = !1, x = null, y = null, b = null, g = !1, pe = !1, de = null, w = !1, ue = !1), k) {
|
|
3064
3065
|
let n = r.indexOf(":");
|
|
3065
|
-
if (n !== -1 && (r = r.slice(n + 1)),
|
|
3066
|
+
if (n !== -1 && (r = r.slice(n + 1)), T) {
|
|
3066
3067
|
if (r === "is" || r === "v") {
|
|
3067
3068
|
let t = a?.onEnd?.();
|
|
3068
|
-
t == null ||
|
|
3069
|
+
t == null || ae && l?.() === "" || e.pushAt(E, D, he !== void 0 && typeof t == "number" ? ge(l?.() ?? "") : typeof t == "number" ? "" + t : t);
|
|
3069
3070
|
} else r !== "f" && a?.onCloseTag?.(t);
|
|
3070
3071
|
}
|
|
3071
|
-
g &&= !1, r === "c" && (
|
|
3072
|
+
g &&= !1, r === "c" && (k = null, T = !1);
|
|
3072
3073
|
} else {
|
|
3073
|
-
if (u) return u = !1, void (
|
|
3074
|
+
if (u) return u = !1, void (ke = null);
|
|
3074
3075
|
n?.onCloseTag?.(t);
|
|
3075
3076
|
}
|
|
3076
|
-
},
|
|
3077
|
+
}, Le = (t) => {
|
|
3077
3078
|
let i = t.trim();
|
|
3078
3079
|
if (g) {
|
|
3079
|
-
switch (
|
|
3080
|
+
switch (O = null, _e) {
|
|
3080
3081
|
case null:
|
|
3081
3082
|
case "n":
|
|
3082
|
-
|
|
3083
|
+
O = lt.flushSubnormal(parseFloat(i));
|
|
3083
3084
|
break;
|
|
3084
3085
|
case "b":
|
|
3085
|
-
|
|
3086
|
+
O = i === "1" || i === "true";
|
|
3086
3087
|
break;
|
|
3087
3088
|
case "s": {
|
|
3088
3089
|
let e = parseInt(i, 10), t = h.get(e);
|
|
@@ -3090,7 +3091,7 @@ var ir = {
|
|
|
3090
3091
|
let n = f?.get(e);
|
|
3091
3092
|
t = n ? rr(n, m) : null, h.set(e, t);
|
|
3092
3093
|
}
|
|
3093
|
-
|
|
3094
|
+
O = t ? {
|
|
3094
3095
|
t: "r",
|
|
3095
3096
|
v: {
|
|
3096
3097
|
type: "richText",
|
|
@@ -3120,26 +3121,26 @@ var ir = {
|
|
|
3120
3121
|
}
|
|
3121
3122
|
return s !== void 0 && (d += (3600 * parseInt(s, 10) + 60 * parseInt(c, 10) + (l === void 0 ? 0 : parseInt(l, 10)) + (u === void 0 ? 0 : parseFloat(u))) / 86400), d;
|
|
3122
3123
|
})(i, !0 === o?.get(lr));
|
|
3123
|
-
e === null ? s && (r?.(`Date '${i}' in cell ${
|
|
3124
|
-
colIndex:
|
|
3125
|
-
rowIndex:
|
|
3126
|
-
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"),
|
|
3124
|
+
e === null ? s && (r?.(`Date '${i}' in cell ${W.cellToString({
|
|
3125
|
+
colIndex: D,
|
|
3126
|
+
rowIndex: E
|
|
3127
|
+
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"), O = "" + s(i)) : O = e;
|
|
3127
3128
|
break;
|
|
3128
3129
|
}
|
|
3129
3130
|
case "e":
|
|
3130
3131
|
if (i === "#VALUE!") {
|
|
3131
|
-
let e =
|
|
3132
|
+
let e = k.attributes.vm;
|
|
3132
3133
|
if (e !== void 0) {
|
|
3133
|
-
let t =
|
|
3134
|
-
if (
|
|
3135
|
-
|
|
3134
|
+
let t = fe(e);
|
|
3135
|
+
if (Ye.isError(t)) {
|
|
3136
|
+
O = {
|
|
3136
3137
|
t: "e",
|
|
3137
3138
|
v: t.getCode()
|
|
3138
3139
|
};
|
|
3139
3140
|
break;
|
|
3140
3141
|
}
|
|
3141
|
-
if (
|
|
3142
|
-
|
|
3142
|
+
if (ct.isJSON(t)) {
|
|
3143
|
+
O = {
|
|
3143
3144
|
t: "r",
|
|
3144
3145
|
v: t
|
|
3145
3146
|
};
|
|
@@ -3147,31 +3148,31 @@ var ir = {
|
|
|
3147
3148
|
}
|
|
3148
3149
|
}
|
|
3149
3150
|
}
|
|
3150
|
-
let e =
|
|
3151
|
-
e ?
|
|
3151
|
+
let e = Ye.getBuiltInByLabel(i);
|
|
3152
|
+
e ? O = {
|
|
3152
3153
|
t: "e",
|
|
3153
3154
|
v: e.getCode()
|
|
3154
|
-
} : (
|
|
3155
|
-
colIndex:
|
|
3156
|
-
rowIndex:
|
|
3155
|
+
} : (O = i, r?.(`Unknown formula error '${i}' in cell ${W.cellToString({
|
|
3156
|
+
colIndex: D,
|
|
3157
|
+
rowIndex: E
|
|
3157
3158
|
})}`));
|
|
3158
3159
|
break;
|
|
3159
3160
|
case "str":
|
|
3160
|
-
case "inlineStr":
|
|
3161
|
+
case "inlineStr": T = !0;
|
|
3161
3162
|
}
|
|
3162
|
-
|
|
3163
|
+
O !== null && e.pushAt(E, D, he === void 0 || typeof O != "number" && typeof O != "boolean" ? O : ge(O));
|
|
3163
3164
|
}
|
|
3164
3165
|
let c = y !== null;
|
|
3165
3166
|
if (y) {
|
|
3166
3167
|
if (S === y) x = ne;
|
|
3167
3168
|
else {
|
|
3168
|
-
if (x =
|
|
3169
|
+
if (x = ce.get(y) ?? null, !x) {
|
|
3169
3170
|
let e = [];
|
|
3170
|
-
ee =
|
|
3171
|
+
ee = oe(i, E, D, e), x = [
|
|
3171
3172
|
ee,
|
|
3172
3173
|
e,
|
|
3173
3174
|
i
|
|
3174
|
-
],
|
|
3175
|
+
], ce.set(y, x);
|
|
3175
3176
|
}
|
|
3176
3177
|
S = y, ne = x;
|
|
3177
3178
|
}
|
|
@@ -3190,39 +3191,39 @@ var ir = {
|
|
|
3190
3191
|
formula: n
|
|
3191
3192
|
};
|
|
3192
3193
|
})(i);
|
|
3193
|
-
n.kind !== "none" && (
|
|
3194
|
+
n.kind !== "none" && (ie ??= new Gn(t), n.kind === "spilled" ? ae = ie.placeholder(E, D) : ie.anchor(E, D, n.formula) && (e = n.formula, pe ||= ((e) => Wn(e).some((e) => te(e) || !0 === Ze.get(e)?.getDeclaration().getReturnType()?.isVolatile()))(e)));
|
|
3194
3195
|
}
|
|
3195
|
-
if (
|
|
3196
|
+
if (ae) pe = !1;
|
|
3196
3197
|
else {
|
|
3197
3198
|
let t = [];
|
|
3198
|
-
ee =
|
|
3199
|
+
ee = oe(e, E, D, t), x = [
|
|
3199
3200
|
ee,
|
|
3200
3201
|
t,
|
|
3201
3202
|
e
|
|
3202
3203
|
];
|
|
3203
3204
|
}
|
|
3204
3205
|
}
|
|
3205
|
-
|
|
3206
|
-
},
|
|
3206
|
+
T ? a?.onText?.(t) : u || n?.onText?.(i);
|
|
3207
|
+
}, R = {
|
|
3207
3208
|
r: void 0,
|
|
3208
3209
|
t: void 0,
|
|
3209
3210
|
s: void 0,
|
|
3210
3211
|
cm: void 0,
|
|
3211
3212
|
vm: void 0
|
|
3212
|
-
},
|
|
3213
|
+
}, ze = {
|
|
3213
3214
|
name: "c",
|
|
3214
|
-
attributes:
|
|
3215
|
+
attributes: R,
|
|
3215
3216
|
isSelfClosing: !1
|
|
3216
|
-
},
|
|
3217
|
+
}, z = {
|
|
3217
3218
|
t: void 0,
|
|
3218
3219
|
si: void 0,
|
|
3219
3220
|
ref: void 0,
|
|
3220
3221
|
ca: void 0
|
|
3221
|
-
},
|
|
3222
|
+
}, Be = {
|
|
3222
3223
|
name: "f",
|
|
3223
|
-
attributes:
|
|
3224
|
+
attributes: z,
|
|
3224
3225
|
isSelfClosing: !1
|
|
3225
|
-
},
|
|
3226
|
+
}, B = {
|
|
3226
3227
|
name: "v",
|
|
3227
3228
|
attributes: {},
|
|
3228
3229
|
isSelfClosing: !1
|
|
@@ -3239,27 +3240,27 @@ var ir = {
|
|
|
3239
3240
|
name: "row",
|
|
3240
3241
|
attributes: V,
|
|
3241
3242
|
isSelfClosing: !1
|
|
3242
|
-
},
|
|
3243
|
+
}, H = Nn.NEED_MORE, U = Nn.NOT_HANDLED, He = Nn.decodeText, Ue = !1, We = (e, t, n, r) => {
|
|
3243
3244
|
for (;;) {
|
|
3244
3245
|
let i = 0;
|
|
3245
3246
|
for (; t < n && ((i = e.charCodeAt(t)) === 32 || i === 9 || i === 10 || i === 13);) t++;
|
|
3246
|
-
if (t >= n) return
|
|
3247
|
-
if (i === 62) return
|
|
3248
|
-
if (i === 47) return t + 1 >= n ?
|
|
3247
|
+
if (t >= n) return H;
|
|
3248
|
+
if (i === 62) return Ue = !1, t + 1;
|
|
3249
|
+
if (i === 47) return t + 1 >= n ? H : e.charCodeAt(t + 1) === 62 ? (Ue = !0, t + 2) : U;
|
|
3249
3250
|
let a = t;
|
|
3250
3251
|
for (; t < n && (i = e.charCodeAt(t)) !== 61;) {
|
|
3251
|
-
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return
|
|
3252
|
+
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return U;
|
|
3252
3253
|
t++;
|
|
3253
3254
|
}
|
|
3254
|
-
if (t + 1 >= n) return
|
|
3255
|
+
if (t + 1 >= n) return H;
|
|
3255
3256
|
let o = t - a, s = e.charCodeAt(t + 1);
|
|
3256
|
-
if (s !== 34 && s !== 39) return
|
|
3257
|
+
if (s !== 34 && s !== 39) return U;
|
|
3257
3258
|
let c = t + 2, l = c;
|
|
3258
3259
|
for (; l < n && (i = e.charCodeAt(l)) !== s;) {
|
|
3259
|
-
if (i === 38 || i < 32) return
|
|
3260
|
+
if (i === 38 || i < 32) return U;
|
|
3260
3261
|
l++;
|
|
3261
3262
|
}
|
|
3262
|
-
if (l >= n) return
|
|
3263
|
+
if (l >= n) return H;
|
|
3263
3264
|
t = l + 1;
|
|
3264
3265
|
let u = e.charCodeAt(a);
|
|
3265
3266
|
if (r === 2) switch (o) {
|
|
@@ -3277,14 +3278,14 @@ var ir = {
|
|
|
3277
3278
|
break;
|
|
3278
3279
|
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));
|
|
3279
3280
|
}
|
|
3280
|
-
else if (r === 0) o === 1 ? u === 114 ?
|
|
3281
|
-
else if (o === 1) u === 116 && (
|
|
3281
|
+
else if (r === 0) o === 1 ? u === 114 ? R.r = e.slice(c, l) : u === 116 ? R.t = e.slice(c, l) : u === 115 && (R.s = e.slice(c, l)) : o === 2 && e.charCodeAt(a + 1) === 109 && (u === 99 ? R.cm = e.slice(c, l) : u === 118 && (R.vm = e.slice(c, l)));
|
|
3282
|
+
else if (o === 1) u === 116 && (z.t = e.slice(c, l));
|
|
3282
3283
|
else if (o === 2) {
|
|
3283
3284
|
let t = e.charCodeAt(a + 1);
|
|
3284
|
-
u === 115 && t === 105 ?
|
|
3285
|
-
} else o === 3 && e.startsWith("ref", a) && (
|
|
3285
|
+
u === 115 && t === 105 ? z.si = e.slice(c, l) : u === 99 && t === 97 && (z.ca = e.slice(c, l));
|
|
3286
|
+
} else o === 3 && e.startsWith("ref", a) && (z.ref = e.slice(c, l));
|
|
3286
3287
|
}
|
|
3287
|
-
},
|
|
3288
|
+
}, Ge = (e, t, n) => e.charCodeAt(t + 1) === 47 && e.charCodeAt(t + 2) === n && e.charCodeAt(t + 3) === 62;
|
|
3288
3289
|
return {
|
|
3289
3290
|
...n,
|
|
3290
3291
|
onEnd: () => {
|
|
@@ -3302,10 +3303,10 @@ var ir = {
|
|
|
3302
3303
|
}
|
|
3303
3304
|
});
|
|
3304
3305
|
for (let r of d) r.min > e && t.push(n(e, r.min - 1)), e = Math.max(e, r.max + 1);
|
|
3305
|
-
e <=
|
|
3306
|
+
e <= Re && t.push(n(e, Re)), t.length > 0 && (A.push(...t), A.sort((e, t) => e.min - t.min));
|
|
3306
3307
|
}
|
|
3307
|
-
|
|
3308
|
-
let r =
|
|
3308
|
+
A.length > 0 && (t.rows = W.runsToRefs(A, !1));
|
|
3309
|
+
let r = se.done(mr);
|
|
3309
3310
|
r = ((e, t) => {
|
|
3310
3311
|
let n = null;
|
|
3311
3312
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -3329,50 +3330,50 @@ var ir = {
|
|
|
3329
3330
|
n.rowStart < i.rowStart && (i.rowStart = n.rowStart), n.colStart < i.colStart && (i.colStart = n.colStart), n.rowEnd > i.rowEnd && (i.rowEnd = n.rowEnd), n.colEnd > i.colEnd && (i.colEnd = n.colEnd), a += (n.rowEnd - n.rowStart + 1) * (n.colEnd - n.colStart + 1);
|
|
3330
3331
|
}
|
|
3331
3332
|
if (a !== (i.rowEnd - i.rowStart + 1) * (i.colEnd - i.colStart + 1)) continue;
|
|
3332
|
-
let o = Xn(
|
|
3333
|
+
let o = Xn(W.resolveRelativeToA1(n.value[1], i.rowStart, i.colStart), i);
|
|
3333
3334
|
if (o) {
|
|
3334
3335
|
t.push(o);
|
|
3335
3336
|
for (let t = 0; t < e.length; t++) r.add(e[t]);
|
|
3336
3337
|
}
|
|
3337
3338
|
}
|
|
3338
3339
|
return r.size === 0 ? e : e.filter((e) => !r.has(e));
|
|
3339
|
-
})(r,
|
|
3340
|
+
})(r, C);
|
|
3340
3341
|
let i = r.length;
|
|
3341
|
-
if (i > 0 ||
|
|
3342
|
+
if (i > 0 || C.length > 0) {
|
|
3342
3343
|
let e = Array(i);
|
|
3343
3344
|
for (let t = 0; t < i; t++) {
|
|
3344
|
-
let n = r[t], i =
|
|
3345
|
+
let n = r[t], i = W.rangeToString(n), a = n.value[1], o = W.resolveRelativeToA1(a, n.rowStart, n.colStart);
|
|
3345
3346
|
e[t] = [i, o];
|
|
3346
3347
|
}
|
|
3347
|
-
for (let t = 0; t <
|
|
3348
|
-
let n =
|
|
3349
|
-
e.push([
|
|
3348
|
+
for (let t = 0; t < C.length; t++) {
|
|
3349
|
+
let n = C[t], r = n.ref;
|
|
3350
|
+
e.push([W.cellToString({
|
|
3350
3351
|
rowIndex: r.rowStart,
|
|
3351
3352
|
colIndex: r.colStart
|
|
3352
|
-
}), p(n)]),
|
|
3353
|
+
}), p(n)]), le.push([W.rangeToString(r), "dynamic"]);
|
|
3353
3354
|
}
|
|
3354
3355
|
t.formulas = e;
|
|
3355
3356
|
}
|
|
3356
|
-
let a =
|
|
3357
|
+
let a = me.done(!0), o = a.length;
|
|
3357
3358
|
if (o > 0) {
|
|
3358
3359
|
let e = Array(o);
|
|
3359
3360
|
for (let t = 0; t < o; t++) {
|
|
3360
|
-
let n = a[t], r =
|
|
3361
|
+
let n = a[t], r = W.rangeToString(n);
|
|
3361
3362
|
e[t] = r;
|
|
3362
3363
|
}
|
|
3363
3364
|
t.volatile = e;
|
|
3364
3365
|
}
|
|
3365
|
-
|
|
3366
|
+
ie && le.push(...ie.getFormulaArray()), le.length > 0 && (t.formulaArray = [...le]);
|
|
3366
3367
|
let s = _.length;
|
|
3367
3368
|
if (s > 0) {
|
|
3368
|
-
_.sort(
|
|
3369
|
+
_.sort(Je.createRangeComparator(nt.Axis.Column));
|
|
3369
3370
|
let e = _[0], n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value, o = [];
|
|
3370
3371
|
o.push(e);
|
|
3371
3372
|
let c = null;
|
|
3372
3373
|
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);
|
|
3373
3374
|
let l = o.length, u = Array(l);
|
|
3374
3375
|
for (let e = 0; e < l; e++) {
|
|
3375
|
-
let t = o[e], n =
|
|
3376
|
+
let t = o[e], n = W.rangeToString(t);
|
|
3376
3377
|
u[e] = [n, t.value];
|
|
3377
3378
|
}
|
|
3378
3379
|
t.directStyles = u;
|
|
@@ -3380,57 +3381,57 @@ var ir = {
|
|
|
3380
3381
|
let l = e.build();
|
|
3381
3382
|
l && (t.data = l.tuples), n?.onEnd?.();
|
|
3382
3383
|
},
|
|
3383
|
-
onOpenTag:
|
|
3384
|
-
onCloseTag:
|
|
3385
|
-
onText:
|
|
3384
|
+
onOpenTag: Fe,
|
|
3385
|
+
onCloseTag: Ie,
|
|
3386
|
+
onText: Le,
|
|
3386
3387
|
elementScanners: [{
|
|
3387
3388
|
name: "c",
|
|
3388
3389
|
scan: (e, t, n) => {
|
|
3389
|
-
if (!u ||
|
|
3390
|
-
|
|
3391
|
-
let r =
|
|
3390
|
+
if (!u || k !== null) return U;
|
|
3391
|
+
R.r = R.t = R.s = R.cm = R.vm = void 0;
|
|
3392
|
+
let r = We(e, t + 2, n, 0);
|
|
3392
3393
|
if (r < 0) return r;
|
|
3393
|
-
let i =
|
|
3394
|
-
if (
|
|
3394
|
+
let i = R.t;
|
|
3395
|
+
if (R.r === void 0 || i === "str" || i === "inlineStr") return U;
|
|
3395
3396
|
let a = !1, o = -1, s = -1, c = -1, l = -1, d = r;
|
|
3396
|
-
if (!
|
|
3397
|
+
if (!Ue) for (z.t = z.si = z.ref = z.ca = void 0;;) {
|
|
3397
3398
|
let t = e.indexOf("<", r);
|
|
3398
|
-
if (t === -1 || t + 3 >= n) return
|
|
3399
|
+
if (t === -1 || t + 3 >= n) return H;
|
|
3399
3400
|
for (let n = r; n < t; n++) {
|
|
3400
3401
|
let t = e.charCodeAt(n);
|
|
3401
|
-
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return
|
|
3402
|
+
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return U;
|
|
3402
3403
|
}
|
|
3403
3404
|
let i = e.charCodeAt(t + 1), u = e.charCodeAt(t + 2);
|
|
3404
3405
|
if (i === 47) {
|
|
3405
|
-
if (!
|
|
3406
|
+
if (!Ge(e, t, 99)) return U;
|
|
3406
3407
|
d = t + 4;
|
|
3407
3408
|
break;
|
|
3408
3409
|
}
|
|
3409
3410
|
if (i === 102 && !a && c === -1 && (u === 32 || u === 62 || u === 47)) {
|
|
3410
|
-
if (a = !0, r =
|
|
3411
|
-
if (
|
|
3412
|
-
if (
|
|
3411
|
+
if (a = !0, r = We(e, t + 2, n, 1), r < 0) return r;
|
|
3412
|
+
if (z.t === "dataTable") return U;
|
|
3413
|
+
if (Ue) continue;
|
|
3413
3414
|
let i = e.indexOf("<", r);
|
|
3414
|
-
if (i === -1 || i + 3 >= n) return
|
|
3415
|
-
if (!
|
|
3415
|
+
if (i === -1 || i + 3 >= n) return H;
|
|
3416
|
+
if (!Ge(e, i, 102)) return U;
|
|
3416
3417
|
o = r, s = i, r = i + 4;
|
|
3417
3418
|
} else if (i === 118 && u === 62 && c === -1) {
|
|
3418
3419
|
let i = e.indexOf("<", t + 3);
|
|
3419
|
-
if (i === -1 || i + 3 >= n) return
|
|
3420
|
-
if (!
|
|
3420
|
+
if (i === -1 || i + 3 >= n) return H;
|
|
3421
|
+
if (!Ge(e, i, 118)) return U;
|
|
3421
3422
|
c = t + 3, l = i, r = i + 4;
|
|
3422
|
-
} else return
|
|
3423
|
+
} else return U;
|
|
3423
3424
|
}
|
|
3424
|
-
return
|
|
3425
|
+
return Fe(ze), a && (Fe(Be), s > o && Le(He(e.slice(o, s))), Ie(Be)), c !== -1 && (Fe(B), l > c && Le(He(e.slice(c, l))), Ie(B)), Ie(ze), d;
|
|
3425
3426
|
}
|
|
3426
3427
|
}, {
|
|
3427
3428
|
name: "row",
|
|
3428
3429
|
openTag: Ve,
|
|
3429
3430
|
scan: (e, t, n) => {
|
|
3430
|
-
if (!
|
|
3431
|
+
if (!je || u || k !== null) return U;
|
|
3431
3432
|
V.r = V.s = V.ht = V.hidden = V.collapsed = V.customHeight = V.customFormat = V.outlineLevel = void 0;
|
|
3432
|
-
let r =
|
|
3433
|
-
return r < 0 ? r :
|
|
3433
|
+
let r = We(e, t + 4, n, 2);
|
|
3434
|
+
return r < 0 ? r : Ue || V.r === void 0 ? U : (Fe(Ve), r);
|
|
3434
3435
|
}
|
|
3435
3436
|
}]
|
|
3436
3437
|
};
|
|
@@ -3513,42 +3514,42 @@ var Tr = {
|
|
|
3513
3514
|
Company: "company",
|
|
3514
3515
|
Manager: "manager"
|
|
3515
3516
|
}, Dr = {
|
|
3516
|
-
lpwstr:
|
|
3517
|
-
lpstr:
|
|
3518
|
-
bstr:
|
|
3519
|
-
i1:
|
|
3520
|
-
i2:
|
|
3521
|
-
i4:
|
|
3522
|
-
i8:
|
|
3523
|
-
int:
|
|
3524
|
-
ui1:
|
|
3525
|
-
ui2:
|
|
3526
|
-
ui4:
|
|
3527
|
-
ui8:
|
|
3528
|
-
uint:
|
|
3529
|
-
r4:
|
|
3530
|
-
r8:
|
|
3531
|
-
decimal:
|
|
3532
|
-
bool:
|
|
3533
|
-
filetime:
|
|
3534
|
-
date:
|
|
3517
|
+
lpwstr: G.Type.String,
|
|
3518
|
+
lpstr: G.Type.String,
|
|
3519
|
+
bstr: G.Type.String,
|
|
3520
|
+
i1: G.Type.Number,
|
|
3521
|
+
i2: G.Type.Number,
|
|
3522
|
+
i4: G.Type.Number,
|
|
3523
|
+
i8: G.Type.Number,
|
|
3524
|
+
int: G.Type.Number,
|
|
3525
|
+
ui1: G.Type.Number,
|
|
3526
|
+
ui2: G.Type.Number,
|
|
3527
|
+
ui4: G.Type.Number,
|
|
3528
|
+
ui8: G.Type.Number,
|
|
3529
|
+
uint: G.Type.Number,
|
|
3530
|
+
r4: G.Type.Float,
|
|
3531
|
+
r8: G.Type.Float,
|
|
3532
|
+
decimal: G.Type.Float,
|
|
3533
|
+
bool: G.Type.Boolean,
|
|
3534
|
+
filetime: G.Type.Date,
|
|
3535
|
+
date: G.Type.Date
|
|
3535
3536
|
}, Or = (e) => {
|
|
3536
3537
|
let t = e.kind ? Dr[e.kind] : void 0;
|
|
3537
3538
|
if (!t) return null;
|
|
3538
3539
|
let n = e.value.trim(), r;
|
|
3539
|
-
if (t ===
|
|
3540
|
+
if (t === G.Type.String) r = {
|
|
3540
3541
|
key: e.key,
|
|
3541
3542
|
type: t,
|
|
3542
3543
|
value: e.value
|
|
3543
3544
|
};
|
|
3544
|
-
else if (t ===
|
|
3545
|
+
else if (t === G.Type.Boolean) {
|
|
3545
3546
|
if (n !== "true" && n !== "false" && n !== "1" && n !== "0") return null;
|
|
3546
3547
|
r = {
|
|
3547
3548
|
key: e.key,
|
|
3548
3549
|
type: t,
|
|
3549
3550
|
value: n === "true" || n === "1"
|
|
3550
3551
|
};
|
|
3551
|
-
} else if (t ===
|
|
3552
|
+
} else if (t === G.Type.Date) {
|
|
3552
3553
|
let i = new Date(n);
|
|
3553
3554
|
if (!n || isNaN(i.getTime())) return null;
|
|
3554
3555
|
r = {
|
|
@@ -3559,22 +3560,22 @@ var Tr = {
|
|
|
3559
3560
|
} else {
|
|
3560
3561
|
let i = Number(n);
|
|
3561
3562
|
if (!n || !Number.isFinite(i)) return null;
|
|
3562
|
-
let a = t ===
|
|
3563
|
+
let a = t === G.Type.Number && i >= -2147483648 && i <= 2147483647;
|
|
3563
3564
|
r = {
|
|
3564
3565
|
key: e.key,
|
|
3565
|
-
type: a ? t :
|
|
3566
|
+
type: a ? t : G.Type.Float,
|
|
3566
3567
|
value: i
|
|
3567
3568
|
};
|
|
3568
3569
|
}
|
|
3569
3570
|
return e.linkTarget && (r.linkTarget = e.linkTarget), r;
|
|
3570
3571
|
}, kr = "hiddenXfs", Ar = (e) => (Array.isArray(e) ? e[1] : e?.v)?.s, jr = (e) => {
|
|
3571
3572
|
if (!e || e.length === 0) return !1;
|
|
3572
|
-
let t =
|
|
3573
|
+
let t = W.refsToRuns(e, !0), n = 0;
|
|
3573
3574
|
for (let e of t) {
|
|
3574
3575
|
if (e.min > n || e.value?.s === void 0) return !1;
|
|
3575
3576
|
n = Math.max(n, e.max + 1);
|
|
3576
3577
|
}
|
|
3577
|
-
return n >
|
|
3578
|
+
return n > I;
|
|
3578
3579
|
}, Mr = (e, t) => {
|
|
3579
3580
|
e.protection = {
|
|
3580
3581
|
...e.protection,
|
|
@@ -3585,7 +3586,7 @@ var Tr = {
|
|
|
3585
3586
|
if (!n || n.length === 0) return;
|
|
3586
3587
|
let r = null, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (e, o, s, c) => {
|
|
3587
3588
|
let l = "";
|
|
3588
|
-
c && (l = a.get(c) ??
|
|
3589
|
+
c && (l = a.get(c) ?? Ke.JSONStableStringify(c), a.set(c, l));
|
|
3589
3590
|
let u = `${e}|${o ?? ""}|${s ?? ""}|${l}`, d = i.get(u);
|
|
3590
3591
|
if (d !== void 0) return d;
|
|
3591
3592
|
let f = n[e], p = f ? Ir(f, o, s, c) : null, m = t?.get(e);
|
|
@@ -3593,11 +3594,11 @@ var Tr = {
|
|
|
3593
3594
|
if (!r) {
|
|
3594
3595
|
r = /* @__PURE__ */ new Map();
|
|
3595
3596
|
for (let e = 0; e < n.length; e++) {
|
|
3596
|
-
let i =
|
|
3597
|
+
let i = Ke.JSONStableStringify(n[e]), a = t?.get(e);
|
|
3597
3598
|
a !== void 0 && (i += `|${a}`), r.has(i) || r.set(i, e);
|
|
3598
3599
|
}
|
|
3599
3600
|
}
|
|
3600
|
-
let a =
|
|
3601
|
+
let a = Ke.JSONStableStringify(e);
|
|
3601
3602
|
i !== void 0 && (a += `|${i}`);
|
|
3602
3603
|
let o = r.get(a);
|
|
3603
3604
|
return o === void 0 && (o = n.length, n.push(e), r.set(a, o), i !== void 0 && t.set(o, i)), o;
|
|
@@ -3612,17 +3613,17 @@ var Tr = {
|
|
|
3612
3613
|
if (!t) continue;
|
|
3613
3614
|
let n = [];
|
|
3614
3615
|
for (let e of i) {
|
|
3615
|
-
let r =
|
|
3616
|
+
let r = W.fastStringToRange(e[0]), i = Ur(r, t.coords);
|
|
3616
3617
|
if (!i) {
|
|
3617
3618
|
n.push(e);
|
|
3618
3619
|
continue;
|
|
3619
3620
|
}
|
|
3620
3621
|
a = !0;
|
|
3621
|
-
for (let t of Wr(r, i)) n.push([
|
|
3622
|
+
for (let t of Wr(r, i)) n.push([W.rangeToString(t), e[1]]);
|
|
3622
3623
|
let { rowIndex: s, colIndex: c } = t.origin;
|
|
3623
3624
|
for (let r = i.rowStart; r <= i.rowEnd; r++) {
|
|
3624
3625
|
let a = i.colStart, l = null, u = (e) => {
|
|
3625
|
-
l !== null && n.push([
|
|
3626
|
+
l !== null && n.push([W.rangeToString({
|
|
3626
3627
|
rowStart: r,
|
|
3627
3628
|
rowEnd: r,
|
|
3628
3629
|
colStart: a,
|
|
@@ -3641,9 +3642,9 @@ var Tr = {
|
|
|
3641
3642
|
a && (e.directStyles = i);
|
|
3642
3643
|
}
|
|
3643
3644
|
}, Fr = (e, t) => {
|
|
3644
|
-
let n =
|
|
3645
|
+
let n = K(e, t);
|
|
3645
3646
|
if (!n || !e.location) return null;
|
|
3646
|
-
let r =
|
|
3647
|
+
let r = W.fastStringToRange(e.location), i = {
|
|
3647
3648
|
rowIndex: r.rowStart - n.top,
|
|
3648
3649
|
colIndex: r.colStart
|
|
3649
3650
|
};
|
|
@@ -3664,7 +3665,7 @@ var Tr = {
|
|
|
3664
3665
|
i = t;
|
|
3665
3666
|
}
|
|
3666
3667
|
let o = i.alignment;
|
|
3667
|
-
if (n !== null && o?.horizontal ===
|
|
3668
|
+
if (n !== null && o?.horizontal === rt.HorizontalAlignment.Left && (o.indent ?? 0) === n) {
|
|
3668
3669
|
let { horizontal: e, indent: t, ...n } = o, { alignment: r, ...a } = i;
|
|
3669
3670
|
i = Hr(n) ? a : {
|
|
3670
3671
|
...a,
|
|
@@ -3679,9 +3680,9 @@ var Tr = {
|
|
|
3679
3680
|
}
|
|
3680
3681
|
}
|
|
3681
3682
|
if (i === e) return e;
|
|
3682
|
-
for (let e of Object.keys(i)) if (i[e] !== void 0 && (e !== "named" || i.named !==
|
|
3683
|
+
for (let e of Object.keys(i)) if (i[e] !== void 0 && (e !== "named" || i.named !== Qe.BuiltInName.Normal)) return i;
|
|
3683
3684
|
return null;
|
|
3684
|
-
}, Lr = (e, t) => e === t ||
|
|
3685
|
+
}, Lr = (e, t) => e === t || it.toBuiltInID(e) === it.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 : Ke.JSONStableStringify(e) === Ke.JSONStableStringify(t)), Br = (e, t) => {
|
|
3685
3686
|
let n = null, r = (t, r) => {
|
|
3686
3687
|
n ??= { ...e }, r === void 0 ? delete n[t] : n[t] = r;
|
|
3687
3688
|
};
|
|
@@ -3697,9 +3698,9 @@ var Tr = {
|
|
|
3697
3698
|
}
|
|
3698
3699
|
return n ?? e;
|
|
3699
3700
|
}, Vr = {
|
|
3700
|
-
vertical:
|
|
3701
|
+
vertical: rt.VerticalAlignment.Bottom,
|
|
3701
3702
|
relativeIndent: 0,
|
|
3702
|
-
overflow:
|
|
3703
|
+
overflow: rt.Overflow.Visible,
|
|
3703
3704
|
rotation: 0
|
|
3704
3705
|
}, Hr = (e) => Object.keys(e).every((t) => e[t] === void 0 || Vr[t] === e[t]), Ur = (e, t) => {
|
|
3705
3706
|
let n = Math.max(e.rowStart, t.rowStart), r = Math.min(e.rowEnd, t.rowEnd), i = Math.max(e.colStart, t.colStart), a = Math.min(e.colEnd, t.colEnd);
|
|
@@ -3732,7 +3733,7 @@ var Tr = {
|
|
|
3732
3733
|
if (typeof e == "string") return void t.push(e);
|
|
3733
3734
|
let n = Array.isArray(e) ? e : [e];
|
|
3734
3735
|
for (let e = 0; e < n.length; e++) {
|
|
3735
|
-
let r =
|
|
3736
|
+
let r = W.rangeToString(n[e]);
|
|
3736
3737
|
r && t.push(r);
|
|
3737
3738
|
}
|
|
3738
3739
|
}, qr = (e) => {
|
|
@@ -3744,7 +3745,7 @@ var Tr = {
|
|
|
3744
3745
|
if (!e) return;
|
|
3745
3746
|
let i = t ? 2 : 1, a = t ? n.rowStart : n.colStart, o = t ? n.rowEnd : n.colEnd, s, c = -1;
|
|
3746
3747
|
for (let n of e) {
|
|
3747
|
-
let e =
|
|
3748
|
+
let e = W.refToRun(n, t), l = qr(n);
|
|
3748
3749
|
e && l !== void 0 ? l !== c || (t ? s.colEnd : s.rowEnd) + 1 !== e.min ? (s = {
|
|
3749
3750
|
colStart: t ? e.min : a,
|
|
3750
3751
|
rowStart: t ? a : e.min,
|
|
@@ -3800,51 +3801,51 @@ var Tr = {
|
|
|
3800
3801
|
225
|
|
3801
3802
|
], $r = /^xl\/worksheets\/[^/]+\.xml$/i, ei = (e) => typeof e == "string" ? e : (e?.runs ?? []).map((e) => e.text ?? "").join(""), ti = async (e, n) => {
|
|
3802
3803
|
let { password: o, onVBA: s, profile: u, calcOnLoad: p = "auto", createWorkbookOptions: h = {}, ...v } = n ?? {};
|
|
3803
|
-
await
|
|
3804
|
-
let te = !!h.origin && typeof h.origin != "string", x = u ? new
|
|
3804
|
+
await Xe.load();
|
|
3805
|
+
let te = !!h.origin && typeof h.origin != "string", x = u ? new jt(typeof u == "function" ? u : void 0) : null, S = [], ne = (e, t, n) => {
|
|
3805
3806
|
S.push([
|
|
3806
3807
|
e,
|
|
3807
3808
|
t ?? "",
|
|
3808
3809
|
n
|
|
3809
3810
|
]);
|
|
3810
|
-
},
|
|
3811
|
-
if (
|
|
3812
|
-
|
|
3813
|
-
let t = Math.min(
|
|
3814
|
-
|
|
3815
|
-
} : void 0,
|
|
3811
|
+
}, ie = { onWarning: ne }, ae = n?.progress, oe = ae?.onProgress ? ae.onProgress.bind(ae) : void 0, ce = e.byteLength, le = 0, ue = 0, fe = oe ? (e) => {
|
|
3812
|
+
if (le <= 0) return;
|
|
3813
|
+
ue += e;
|
|
3814
|
+
let t = Math.min(ce, Math.round(ue / le * ce));
|
|
3815
|
+
oe(t, ce);
|
|
3816
|
+
} : void 0, me = import("./5xm7nfQ3Kt7ylcIZ.mjs"), he = null;
|
|
3816
3817
|
try {
|
|
3817
|
-
|
|
3818
|
+
he = new DOMParser();
|
|
3818
3819
|
} catch {}
|
|
3819
|
-
let
|
|
3820
|
+
let T = null;
|
|
3820
3821
|
try {
|
|
3821
|
-
|
|
3822
|
+
T = new XMLSerializer();
|
|
3822
3823
|
} catch {}
|
|
3823
|
-
let
|
|
3824
|
-
|
|
3824
|
+
let E, D, O, k = null;
|
|
3825
|
+
he || (k = import("./BnCWTG7UwT7Fm6nL.mjs").then((e) => t(e.default, 1)));
|
|
3825
3826
|
try {
|
|
3826
|
-
let [e, t] = await Promise.all([
|
|
3827
|
-
|
|
3827
|
+
let [e, t] = await Promise.all([k, me]);
|
|
3828
|
+
E = new t.DOMTransformer(), D = he ?? new e.DOMParser(), O = T ?? new e.XMLSerializer();
|
|
3828
3829
|
} catch (e) {
|
|
3829
3830
|
throw Error("Unable to load XLSX parser.", { cause: e });
|
|
3830
3831
|
}
|
|
3831
|
-
let
|
|
3832
|
+
let ge = (e) => O.serializeToString(e);
|
|
3832
3833
|
if (((e) => {
|
|
3833
3834
|
if (e.byteLength < Qr.length) return !1;
|
|
3834
3835
|
let t = new Uint8Array(e, 0, Qr.length);
|
|
3835
3836
|
return Qr.every((e, n) => t[n] === e);
|
|
3836
|
-
})(e)) throw new
|
|
3837
|
-
let
|
|
3837
|
+
})(e)) throw new Ue("This is an Excel 97-2003 workbook (.xls), which cannot be read. Save it as '.xlsx' and try again.");
|
|
3838
|
+
let A;
|
|
3838
3839
|
try {
|
|
3839
|
-
|
|
3840
|
+
A = await At.create(e);
|
|
3840
3841
|
} catch (e) {
|
|
3841
|
-
throw new
|
|
3842
|
+
throw new Ue("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.", { cause: e });
|
|
3842
3843
|
}
|
|
3843
3844
|
x?.mark("zip-open");
|
|
3844
3845
|
try {
|
|
3845
|
-
if (!
|
|
3846
|
+
if (!A.has("[Content_Types].xml")) throw new Ue("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3846
3847
|
let e = (e) => {
|
|
3847
|
-
let t =
|
|
3848
|
+
let t = A.getEntry(e);
|
|
3848
3849
|
return t ? { content: t } : void 0;
|
|
3849
3850
|
}, t = {
|
|
3850
3851
|
workbooks: [],
|
|
@@ -3895,22 +3896,22 @@ var Tr = {
|
|
|
3895
3896
|
}
|
|
3896
3897
|
}))(t, (e) => {
|
|
3897
3898
|
S.push([e, "[Content_Types].xml"]);
|
|
3898
|
-
}), n = await
|
|
3899
|
+
}), n = await A.getTextStream("[Content_Types].xml");
|
|
3899
3900
|
if (!n) throw Error("Error parsing content types: '[Content_Types].xml'");
|
|
3900
3901
|
try {
|
|
3901
3902
|
await Sn.parseStream(n, e, { xmlns: !1 });
|
|
3902
3903
|
} catch (e) {
|
|
3903
3904
|
throw Error("Error parsing content types: '[Content_Types].xml'", { cause: e });
|
|
3904
3905
|
}
|
|
3905
|
-
te && await
|
|
3906
|
+
te && await A.getBuffer("[Content_Types].xml");
|
|
3906
3907
|
}
|
|
3907
3908
|
x?.mark("content-types");
|
|
3908
3909
|
let n = t.sst, o = /* @__PURE__ */ new Set();
|
|
3909
3910
|
for (let e of t.sheets) o.add(Zr(e));
|
|
3910
3911
|
n && o.add(Zr(n));
|
|
3911
|
-
for (let e of o)
|
|
3912
|
-
if (await
|
|
3913
|
-
let n =
|
|
3912
|
+
for (let e of o) le += A.uncompressedSize(e);
|
|
3913
|
+
if (await A.prefetch((e) => !o.has(e) && !$r.test(e)), x?.mark("prefetch-side-parts"), t.workbooks.length === 0) {
|
|
3914
|
+
let n = C("_rels/.rels", e, D, E, ie);
|
|
3914
3915
|
if (n) {
|
|
3915
3916
|
for (let e of n.values()) if (e.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" && e.target) {
|
|
3916
3917
|
t.workbooks.push(e.target);
|
|
@@ -3918,40 +3919,40 @@ var Tr = {
|
|
|
3918
3919
|
}
|
|
3919
3920
|
}
|
|
3920
3921
|
}
|
|
3921
|
-
if (t.workbooks.length === 0) throw new
|
|
3922
|
-
let v = h?.resources ?? new
|
|
3923
|
-
|
|
3922
|
+
if (t.workbooks.length === 0) throw new Ue("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3923
|
+
let v = h?.resources ?? new st(), ue = v.beginPersist(), me = {}, he = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Map();
|
|
3924
|
+
T.set("parseInlineDxf", (e) => {
|
|
3924
3925
|
if (!e) return;
|
|
3925
|
-
let t =
|
|
3926
|
+
let t = D.parseFromString(`<dxf xmlns:x14="${pe}" xmlns:xm="${Ve}">${e}</dxf>`, "text/xml")?.documentElement;
|
|
3926
3927
|
if (!t) return;
|
|
3927
|
-
let n =
|
|
3928
|
+
let n = E.parseDxf(t, "", ie);
|
|
3928
3929
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
3929
3930
|
});
|
|
3930
|
-
let
|
|
3931
|
-
|
|
3932
|
-
let
|
|
3933
|
-
|
|
3934
|
-
},
|
|
3931
|
+
let O = r("metadata", t, e, D, E, ie).entries().next()?.value?.[1]?.metadata;
|
|
3932
|
+
O && T.set("metadata", O), T.set(sr, d());
|
|
3933
|
+
let k = /* @__PURE__ */ new Map(), ve = [], ye = /* @__PURE__ */ new Set(), j = (e) => {
|
|
3934
|
+
ye.add(Zr(e));
|
|
3935
|
+
}, M = (t, n = k) => {
|
|
3935
3936
|
let r = t.lastIndexOf("/"), i = t.substring(0, r + 1) + "_rels/" + t.substring(r + 1, t.length) + ".rels", a = n.get(i);
|
|
3936
|
-
return a || (a =
|
|
3937
|
-
},
|
|
3938
|
-
let a =
|
|
3937
|
+
return a || (a = C(i, e, D, E, z), n.set(i, a)), a;
|
|
3938
|
+
}, N = (t, n, r, i = k) => {
|
|
3939
|
+
let a = M(n, i).get(t), o = a?.target;
|
|
3939
3940
|
if (!o) return null;
|
|
3940
3941
|
if (a.targetMode === "External") {
|
|
3941
3942
|
if (!r) return a.target;
|
|
3942
3943
|
let e = v.add({ source: { external: a.target } });
|
|
3943
|
-
return e.addReference(
|
|
3944
|
+
return e.addReference(me), he.add(e), ue.toResourceId(e);
|
|
3944
3945
|
}
|
|
3945
3946
|
let s = n.lastIndexOf("/"), c = n.substring(0, s + 1);
|
|
3946
|
-
o.startsWith("/") || (o = c + o), o =
|
|
3947
|
-
let l =
|
|
3947
|
+
o.startsWith("/") || (o = c + o), o = Ee(o);
|
|
3948
|
+
let l = E?.getVisitorParamsState().get("dxfs"), u = i.get(o);
|
|
3948
3949
|
if (!u) {
|
|
3949
3950
|
if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
3950
3951
|
let e = {};
|
|
3951
|
-
u = e,
|
|
3952
|
-
let t = fr(e, (e, t) => t === "legacyDrawing" ?
|
|
3952
|
+
u = e, ve.push((async () => {
|
|
3953
|
+
let t = fr(e, (e, t) => t === "legacyDrawing" ? Se(e, o) : t === "formControl" ? Ce(e, o) : t === "part" ? De(e, o) : N(e, o, t === "resource") ?? null, qe, l, () => {}, (e, t, n) => {
|
|
3953
3954
|
ne(e, t ? `${t} (${o})` : o, n);
|
|
3954
|
-
}, void 0,
|
|
3955
|
+
}, void 0, T), n = await A.getTextStream(o, fe);
|
|
3955
3956
|
if (n) try {
|
|
3956
3957
|
await Sn.parseStream(n, t, {
|
|
3957
3958
|
xmlns: !1,
|
|
@@ -3960,21 +3961,21 @@ var Tr = {
|
|
|
3960
3961
|
} catch (e) {
|
|
3961
3962
|
throw Error(`Error parsing sheet: '${o}'`, { cause: e });
|
|
3962
3963
|
}
|
|
3963
|
-
let r =
|
|
3964
|
+
let r = M(o, i);
|
|
3964
3965
|
if (r) {
|
|
3965
|
-
|
|
3966
|
+
xe(e, o, r, i), Ae(e), _e(e);
|
|
3966
3967
|
let t = [];
|
|
3967
3968
|
r.forEach((e, n) => {
|
|
3968
3969
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable") return;
|
|
3969
|
-
let r =
|
|
3970
|
+
let r = De(n, o, e.type, (e) => e !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition");
|
|
3970
3971
|
if (!r?.xml) return;
|
|
3971
3972
|
let i = /<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0] ?? "", a = parseInt(/\scacheId="(\d+)"/.exec(i)?.[1] ?? "", 10);
|
|
3972
3973
|
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 =
|
|
3974
|
+
let s = /\sname="([^"]*)"/.exec(i)?.[1], c = Le(r.xml);
|
|
3974
3975
|
if (!c) return void S.push([`Pivot table '${r.name}' states no location and was dropped.`, o]);
|
|
3975
|
-
let l =
|
|
3976
|
+
let l = E?.getVisitorParamsState(), u = Pe(l?.get("numFmts"), l?.get("dxfs")), d = Te(r.xml, u), f = d ? void 0 : be(r.xml, u);
|
|
3976
3977
|
t.push({
|
|
3977
|
-
...s ? { name:
|
|
3978
|
+
...s ? { name: se(s) } : {},
|
|
3978
3979
|
cacheId: a,
|
|
3979
3980
|
location: c,
|
|
3980
3981
|
part: r,
|
|
@@ -3985,12 +3986,12 @@ var Tr = {
|
|
|
3985
3986
|
}
|
|
3986
3987
|
})());
|
|
3987
3988
|
} else if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink") {
|
|
3988
|
-
let t = ee(o, e,
|
|
3989
|
+
let t = ee(o, e, D, E, z);
|
|
3989
3990
|
if (t && Object.keys(t).length !== 0) {
|
|
3990
3991
|
let e = t, n = e.__bookRelId, r = e.__absoluteUrlRelId;
|
|
3991
3992
|
delete e.__bookRelId, delete e.__absoluteUrlRelId;
|
|
3992
3993
|
let a = [];
|
|
3993
|
-
|
|
3994
|
+
M(o, i)?.forEach((e, t) => {
|
|
3994
3995
|
if (e.targetMode === "External" && e.type && e.target) {
|
|
3995
3996
|
let i = {
|
|
3996
3997
|
type: e.type,
|
|
@@ -3998,25 +3999,25 @@ var Tr = {
|
|
|
3998
3999
|
};
|
|
3999
4000
|
t === n ? i.role = "book" : t === r && (i.role = "absoluteUrl"), a.push(i);
|
|
4000
4001
|
}
|
|
4001
|
-
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a,
|
|
4002
|
+
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a, j(o), u = e;
|
|
4002
4003
|
} else u = null;
|
|
4003
|
-
} else u = r ?
|
|
4004
|
+
} else u = r ? de(o, e, (e, t) => {
|
|
4004
4005
|
let n = v.add({ source: { buffer: e } });
|
|
4005
|
-
return n.addReference(
|
|
4006
|
-
},
|
|
4006
|
+
return n.addReference(me), he.add(n), ue.toResourceId(n);
|
|
4007
|
+
}, z) : ee(o, e, D, E, z);
|
|
4007
4008
|
}
|
|
4008
4009
|
return u;
|
|
4009
|
-
},
|
|
4010
|
+
}, P = (e, t) => {
|
|
4010
4011
|
if (!e) return null;
|
|
4011
|
-
let n =
|
|
4012
|
+
let n = M(t, k)?.get(e);
|
|
4012
4013
|
if (!n?.target || n.targetMode === "External") return null;
|
|
4013
4014
|
let r = n.target;
|
|
4014
|
-
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r),
|
|
4015
|
-
},
|
|
4015
|
+
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r), Ee(r);
|
|
4016
|
+
}, xe = (e, t, n, r) => {
|
|
4016
4017
|
let i = [], o = /* @__PURE__ */ new Map(), s = [];
|
|
4017
4018
|
n.forEach((e, n) => {
|
|
4018
4019
|
if (e.type !== "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment") return;
|
|
4019
|
-
let a =
|
|
4020
|
+
let a = N(n, t, !1, r)?.comments;
|
|
4020
4021
|
if (!a) return;
|
|
4021
4022
|
for (let e = 0; e < a.length; e++) {
|
|
4022
4023
|
let t = a[e];
|
|
@@ -4033,8 +4034,8 @@ var Tr = {
|
|
|
4033
4034
|
v: u
|
|
4034
4035
|
}));
|
|
4035
4036
|
}
|
|
4036
|
-
let c =
|
|
4037
|
-
c &&
|
|
4037
|
+
let c = P(n, t);
|
|
4038
|
+
c && j(c);
|
|
4038
4039
|
});
|
|
4039
4040
|
for (let e = 0; e < s.length; e++) {
|
|
4040
4041
|
let { parentId: t, json: n } = s[e], r = o.get(t);
|
|
@@ -4043,7 +4044,7 @@ var Tr = {
|
|
|
4043
4044
|
let l = [];
|
|
4044
4045
|
if (n.forEach((e, n) => {
|
|
4045
4046
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") return;
|
|
4046
|
-
let i =
|
|
4047
|
+
let i = N(n, t, !1, r), a = i?.comments;
|
|
4047
4048
|
if (!a) return;
|
|
4048
4049
|
let s = i?.authors;
|
|
4049
4050
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -4051,21 +4052,21 @@ var Tr = {
|
|
|
4051
4052
|
if (!t?.r) continue;
|
|
4052
4053
|
let n = s && t.v.authorId !== void 0 ? s[t.v.authorId] : void 0;
|
|
4053
4054
|
if (n && n.startsWith("tc=")) {
|
|
4054
|
-
if (o.has(
|
|
4055
|
+
if (o.has(R(n.substring(3)))) continue;
|
|
4055
4056
|
n = void 0;
|
|
4056
4057
|
}
|
|
4057
4058
|
let r = {
|
|
4058
|
-
id:
|
|
4059
|
+
id: He.uuidV4().toUpperCase(),
|
|
4059
4060
|
asNote: !0,
|
|
4060
4061
|
content: t.v.content ?? ""
|
|
4061
|
-
}, i = n ?
|
|
4062
|
+
}, i = n ? ze({ displayName: n }) : void 0;
|
|
4062
4063
|
i && (r.personId = i.id), l.push({
|
|
4063
4064
|
r: t.r,
|
|
4064
4065
|
v: r
|
|
4065
4066
|
});
|
|
4066
4067
|
}
|
|
4067
|
-
let c =
|
|
4068
|
-
c &&
|
|
4068
|
+
let c = P(n, t);
|
|
4069
|
+
c && j(c);
|
|
4069
4070
|
}), i.length === 0 && l.length === 0) return;
|
|
4070
4071
|
let u = [...i, ...l], d = e.legacyDrawing;
|
|
4071
4072
|
if (d?.xml) {
|
|
@@ -4074,7 +4075,7 @@ var Tr = {
|
|
|
4074
4075
|
let r = /* @__PURE__ */ new Map();
|
|
4075
4076
|
for (let e = 0; e < n.length; e++) {
|
|
4076
4077
|
let t = n[e];
|
|
4077
|
-
r.set(
|
|
4078
|
+
r.set(W.cellToString({
|
|
4078
4079
|
rowIndex: t.row,
|
|
4079
4080
|
colIndex: t.col
|
|
4080
4081
|
}), t);
|
|
@@ -4111,29 +4112,29 @@ var Tr = {
|
|
|
4111
4112
|
}
|
|
4112
4113
|
}
|
|
4113
4114
|
e.comments = u;
|
|
4114
|
-
},
|
|
4115
|
-
let r =
|
|
4115
|
+
}, Se = (t, n) => {
|
|
4116
|
+
let r = P(t, n);
|
|
4116
4117
|
if (!r) return null;
|
|
4117
4118
|
let i = e(Zr(r));
|
|
4118
4119
|
if (!i) return null;
|
|
4119
4120
|
let a = { xml: wr(new TextDecoder("utf-8").decode(i.content)) }, o = [];
|
|
4120
|
-
return
|
|
4121
|
+
return M(r, k)?.forEach((e, t) => {
|
|
4121
4122
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") return;
|
|
4122
|
-
let n =
|
|
4123
|
+
let n = N(t, r, !0);
|
|
4123
4124
|
typeof n == "number" && o.push({
|
|
4124
4125
|
id: t,
|
|
4125
4126
|
resId: n
|
|
4126
4127
|
});
|
|
4127
|
-
}), o.length > 0 && (a.images = o),
|
|
4128
|
-
},
|
|
4129
|
-
let r =
|
|
4128
|
+
}), o.length > 0 && (a.images = o), j(r), a;
|
|
4129
|
+
}, Ce = (t, n) => {
|
|
4130
|
+
let r = P(t, n);
|
|
4130
4131
|
if (!r) return null;
|
|
4131
|
-
let i = ee(r, e,
|
|
4132
|
-
return i &&
|
|
4133
|
-
},
|
|
4134
|
-
let s =
|
|
4132
|
+
let i = ee(r, e, D, E, z)?.formControl ?? null;
|
|
4133
|
+
return i && j(r), i;
|
|
4134
|
+
}, De = (n, r, i, a, o = /* @__PURE__ */ new Set()) => {
|
|
4135
|
+
let s = P(n, r);
|
|
4135
4136
|
if (!s || o.has(s)) return null;
|
|
4136
|
-
let c = i ??
|
|
4137
|
+
let c = i ?? M(r, k)?.get(n)?.type;
|
|
4137
4138
|
if (!c) return null;
|
|
4138
4139
|
let l = e(Zr(s));
|
|
4139
4140
|
if (!l) return null;
|
|
@@ -4145,15 +4146,15 @@ var Tr = {
|
|
|
4145
4146
|
};
|
|
4146
4147
|
if (d && (f.contentType = d), ((e, t) => e ? e.endsWith("+xml") || e === "application/xml" : /\.(xml|rels|vml)$/i.test(t))(d, u)) f.xml = new TextDecoder("utf-8").decode(l.content);
|
|
4147
4148
|
else {
|
|
4148
|
-
let e =
|
|
4149
|
+
let e = N(n, r, !0);
|
|
4149
4150
|
if (typeof e != "number") return null;
|
|
4150
4151
|
f.resId = e;
|
|
4151
4152
|
}
|
|
4152
4153
|
let p = [];
|
|
4153
|
-
return
|
|
4154
|
+
return M(s, k)?.forEach((e, t) => {
|
|
4154
4155
|
if (!e?.type || a && !a(e.type)) return;
|
|
4155
4156
|
if (e.targetMode === "External") {
|
|
4156
|
-
let n =
|
|
4157
|
+
let n = N(t, s, !0);
|
|
4157
4158
|
typeof n == "number" && p.push({
|
|
4158
4159
|
id: t,
|
|
4159
4160
|
type: e.type,
|
|
@@ -4161,32 +4162,32 @@ var Tr = {
|
|
|
4161
4162
|
});
|
|
4162
4163
|
return;
|
|
4163
4164
|
}
|
|
4164
|
-
let n =
|
|
4165
|
+
let n = De(t, s, e.type, a, o);
|
|
4165
4166
|
n && p.push(n);
|
|
4166
|
-
}), p.length > 0 && (f.parts = p),
|
|
4167
|
-
},
|
|
4168
|
-
|
|
4169
|
-
e?.custom &&
|
|
4167
|
+
}), p.length > 0 && (f.parts = p), j(s), f;
|
|
4168
|
+
}, Oe = r("coreprops", t, e, D, E, ie), ke = r("extprops", t, e, D, E, ie), je = r("custprops", t, e, D, E, ie);
|
|
4169
|
+
je.forEach((e, t) => {
|
|
4170
|
+
e?.custom && j(t);
|
|
4170
4171
|
});
|
|
4171
|
-
let
|
|
4172
|
-
if (
|
|
4173
|
-
let [e, t] =
|
|
4174
|
-
|
|
4175
|
-
}
|
|
4176
|
-
let
|
|
4177
|
-
if (e) return
|
|
4178
|
-
},
|
|
4179
|
-
paramMap:
|
|
4180
|
-
getRefs:
|
|
4181
|
-
getRef:
|
|
4182
|
-
parsedRefs:
|
|
4183
|
-
readEmbeddedPart: (e, t) =>
|
|
4184
|
-
addPerson:
|
|
4185
|
-
serializeElement:
|
|
4172
|
+
let Me = new ot(), Fe = r("people", t, e, D, E, ie);
|
|
4173
|
+
if (Fe.size > 0) {
|
|
4174
|
+
let [e, t] = Fe.entries().next().value;
|
|
4175
|
+
Me.fromJSON(t?.persons), j(e);
|
|
4176
|
+
}
|
|
4177
|
+
let ze = (e) => {
|
|
4178
|
+
if (e) return Me.add(e).toJSON();
|
|
4179
|
+
}, z = {
|
|
4180
|
+
paramMap: T,
|
|
4181
|
+
getRefs: M,
|
|
4182
|
+
getRef: N,
|
|
4183
|
+
parsedRefs: k,
|
|
4184
|
+
readEmbeddedPart: (e, t) => De(e, t),
|
|
4185
|
+
addPerson: ze,
|
|
4186
|
+
serializeElement: ge,
|
|
4186
4187
|
onWarning: ne
|
|
4187
|
-
},
|
|
4188
|
-
if (
|
|
4189
|
-
let e = await
|
|
4188
|
+
}, Be = [], B = /* @__PURE__ */ new Map();
|
|
4189
|
+
if (T.set(ur, B), n) {
|
|
4190
|
+
let e = await A.getTextStream(n, fe);
|
|
4190
4191
|
if (e) {
|
|
4191
4192
|
let t = ((e, t) => {
|
|
4192
4193
|
let n = !1, r = !1, i = 0, a = "", o = new nr();
|
|
@@ -4207,7 +4208,7 @@ var Tr = {
|
|
|
4207
4208
|
}
|
|
4208
4209
|
};
|
|
4209
4210
|
})((e, t) => {
|
|
4210
|
-
t &&
|
|
4211
|
+
t && B.set(Be.length, t), Be.push(e);
|
|
4211
4212
|
}, (e) => {
|
|
4212
4213
|
ne(e, n);
|
|
4213
4214
|
});
|
|
@@ -4219,37 +4220,37 @@ var Tr = {
|
|
|
4219
4220
|
}
|
|
4220
4221
|
}
|
|
4221
4222
|
x?.mark("shared-strings");
|
|
4222
|
-
let V =
|
|
4223
|
-
let t =
|
|
4223
|
+
let V = Be.length, H = /* @__PURE__ */ new Map(), Ke = V, qe = (e) => {
|
|
4224
|
+
let t = H.get(e);
|
|
4224
4225
|
if (t !== void 0) return t;
|
|
4225
|
-
let n =
|
|
4226
|
-
return
|
|
4227
|
-
},
|
|
4228
|
-
t.slicersCache =
|
|
4229
|
-
let
|
|
4230
|
-
for (let e = 0; e <
|
|
4231
|
-
let t =
|
|
4232
|
-
t && (t.startsWith("xl/slicerCache") || t.startsWith("xl/timelineCaches/") && t.endsWith(".xml")) &&
|
|
4233
|
-
}
|
|
4234
|
-
let
|
|
4235
|
-
|
|
4236
|
-
e?.cacheName && (e.cachePath = t,
|
|
4237
|
-
}),
|
|
4238
|
-
let
|
|
4239
|
-
t.slicers =
|
|
4240
|
-
for (let e = 0; e <
|
|
4241
|
-
let t =
|
|
4242
|
-
t && (t.startsWith("xl/slicers/") || t.startsWith("xl/timelines/")) && t.endsWith(".xml") &&
|
|
4243
|
-
}
|
|
4244
|
-
let
|
|
4226
|
+
let n = Ke;
|
|
4227
|
+
return H.set(e, Ke++), Be.push(e), n;
|
|
4228
|
+
}, Je = [];
|
|
4229
|
+
t.slicersCache = Je;
|
|
4230
|
+
let Ye = A.getNames(), Xe = Ye.length;
|
|
4231
|
+
for (let e = 0; e < Xe; e++) {
|
|
4232
|
+
let t = Ye[e];
|
|
4233
|
+
t && (t.startsWith("xl/slicerCache") || t.startsWith("xl/timelineCaches/") && t.endsWith(".xml")) && Je.push(`/${t}`);
|
|
4234
|
+
}
|
|
4235
|
+
let $e = r("slicersCache", t, e, D, E, z), et = /* @__PURE__ */ new Map();
|
|
4236
|
+
$e.forEach((e, t) => {
|
|
4237
|
+
e?.cacheName && (e.cachePath = t, et.set(e.cacheName, e));
|
|
4238
|
+
}), T.set("slicerCaches", et);
|
|
4239
|
+
let G = [];
|
|
4240
|
+
t.slicers = G;
|
|
4241
|
+
for (let e = 0; e < Xe; e++) {
|
|
4242
|
+
let t = Ye[e];
|
|
4243
|
+
t && (t.startsWith("xl/slicers/") || t.startsWith("xl/timelines/")) && t.endsWith(".xml") && G.push(`/${t}`);
|
|
4244
|
+
}
|
|
4245
|
+
let tt = {
|
|
4245
4246
|
getFile: e,
|
|
4246
|
-
domParser:
|
|
4247
|
+
domParser: D,
|
|
4247
4248
|
getAddress: (e, t) => {
|
|
4248
|
-
let n =
|
|
4249
|
+
let n = N(t, e, !1);
|
|
4249
4250
|
return typeof n == "string" ? n : null;
|
|
4250
4251
|
},
|
|
4251
4252
|
getBytes: (t, n) => {
|
|
4252
|
-
let r =
|
|
4253
|
+
let r = P(n, t), i = r ? e(r.substring(1))?.content : void 0;
|
|
4253
4254
|
return i ? i.slice().buffer : null;
|
|
4254
4255
|
},
|
|
4255
4256
|
addFetched: (e, t) => {
|
|
@@ -4257,38 +4258,38 @@ var Tr = {
|
|
|
4257
4258
|
source: { buffer: e },
|
|
4258
4259
|
fetchedFrom: t
|
|
4259
4260
|
});
|
|
4260
|
-
return n.addReference(
|
|
4261
|
+
return n.addReference(me), he.add(n), ue.toResourceId(n);
|
|
4261
4262
|
},
|
|
4262
|
-
markAbsorbed:
|
|
4263
|
-
},
|
|
4264
|
-
for (let e of
|
|
4265
|
-
let
|
|
4263
|
+
markAbsorbed: j
|
|
4264
|
+
}, nt = /* @__PURE__ */ new Map();
|
|
4265
|
+
for (let e of w.getAll()) nt.set(e.structure, e.beginRead(tt));
|
|
4266
|
+
let rt = ((e, t) => {
|
|
4266
4267
|
let n = (n) => {
|
|
4267
4268
|
let r = e(n);
|
|
4268
4269
|
return r ? t.parseFromString(new TextDecoder().decode(r.content), "text/xml").documentElement ?? null : null;
|
|
4269
|
-
}, r =
|
|
4270
|
+
}, r = q(n(yt), "s").map((e) => ({
|
|
4270
4271
|
t: e.getAttribute("t") ?? "",
|
|
4271
|
-
keys:
|
|
4272
|
-
})), i =
|
|
4273
|
-
let t =
|
|
4272
|
+
keys: Et(e)
|
|
4273
|
+
})), i = q(n(bt), "rv").map((e) => {
|
|
4274
|
+
let t = q(e, "fb")[0];
|
|
4274
4275
|
return {
|
|
4275
4276
|
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
4276
|
-
values:
|
|
4277
|
+
values: q(e, "v").map((e) => e.textContent ?? ""),
|
|
4277
4278
|
fb: t ? t.textContent ?? "" : null
|
|
4278
4279
|
};
|
|
4279
|
-
}), a =
|
|
4280
|
-
let t =
|
|
4280
|
+
}), a = q(n(xt), "a").map((e) => {
|
|
4281
|
+
let t = Dt(e), n = parseInt(e.getAttribute("r") ?? "", 10), r = parseInt(e.getAttribute("c") ?? "", 10), i = n > 0 ? n : t.length;
|
|
4281
4282
|
return {
|
|
4282
4283
|
rows: i,
|
|
4283
4284
|
columns: r > 0 ? r : Math.max(1, Math.ceil(t.length / Math.max(1, i))),
|
|
4284
4285
|
items: t
|
|
4285
4286
|
};
|
|
4286
|
-
}), o =
|
|
4287
|
+
}), o = q(n(St), "s").map(Et), s = n(Ct), c = q(q(s, "spbArrays")[0], "a").map(Dt), l = q(q(s, "spbData")[0], "spb").map((e) => ({
|
|
4287
4288
|
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
4288
|
-
values:
|
|
4289
|
-
})), u = n(
|
|
4290
|
-
for (let e of
|
|
4291
|
-
let p = n(
|
|
4289
|
+
values: q(e, "v").map((e) => e.textContent ?? "")
|
|
4290
|
+
})), u = n(wt), d = Ot(q(q(u, "global")[0], "keyFlags")[0]), f = /* @__PURE__ */ new Map();
|
|
4291
|
+
for (let e of q(q(u, "types")[0], "type")) f.set(e.getAttribute("name") ?? "", Ot(q(e, "keyFlags")[0]));
|
|
4292
|
+
let p = n(Tt), m = q(q(p, "dxfs")[0], "dxf").map((e) => q(e, "numFmt")[0]?.getAttribute("formatCode") ?? null), h = q(q(p, "richProperties")[0], "rPr").map((e) => e.getAttribute("n") ?? "");
|
|
4292
4293
|
return {
|
|
4293
4294
|
structures: r,
|
|
4294
4295
|
values: i,
|
|
@@ -4298,9 +4299,9 @@ var Tr = {
|
|
|
4298
4299
|
bags: l,
|
|
4299
4300
|
globalKeyFlags: d,
|
|
4300
4301
|
typeKeyFlags: f,
|
|
4301
|
-
richStyles:
|
|
4302
|
+
richStyles: q(q(p, "richStyles")[0], "rSty").map((e) => {
|
|
4302
4303
|
let t = /* @__PURE__ */ new Map();
|
|
4303
|
-
for (let n of
|
|
4304
|
+
for (let n of q(e, "rpv")) {
|
|
4304
4305
|
let e = h[parseInt(n.getAttribute("i") ?? "-1", 10)];
|
|
4305
4306
|
e && t.set(e, n.textContent ?? "");
|
|
4306
4307
|
}
|
|
@@ -4312,23 +4313,23 @@ var Tr = {
|
|
|
4312
4313
|
};
|
|
4313
4314
|
})
|
|
4314
4315
|
};
|
|
4315
|
-
})(e,
|
|
4316
|
+
})(e, D), it = Ne(rt, nt, (e) => {
|
|
4316
4317
|
ne(e, "/xl/richData/rdrichvalue.xml");
|
|
4317
4318
|
});
|
|
4318
|
-
|
|
4319
|
-
for (let e = 0; e <
|
|
4320
|
-
let t =
|
|
4321
|
-
t.startsWith("xl/richData/") && !t.includes("/_rels/") &&
|
|
4322
|
-
}
|
|
4323
|
-
let
|
|
4324
|
-
if (
|
|
4325
|
-
let e =
|
|
4326
|
-
e?.value?.[1] && (
|
|
4327
|
-
}
|
|
4328
|
-
let
|
|
4329
|
-
|
|
4330
|
-
let
|
|
4331
|
-
|
|
4319
|
+
T.set("richData", rt.values.map((e, t) => it.cellValue(t)));
|
|
4320
|
+
for (let e = 0; e < Xe; e++) {
|
|
4321
|
+
let t = Ye[e];
|
|
4322
|
+
t.startsWith("xl/richData/") && !t.includes("/_rels/") && j(t);
|
|
4323
|
+
}
|
|
4324
|
+
let at = r("themes", t, e, D, E, z), ct = null;
|
|
4325
|
+
if (at && at.entries) {
|
|
4326
|
+
let e = at.entries().next();
|
|
4327
|
+
e?.value?.[1] && (ct = e.value[1]);
|
|
4328
|
+
}
|
|
4329
|
+
let lt = new dt(ct), ut = r("styles", t, e, D, E, z).entries().next()?.value?.[1];
|
|
4330
|
+
ut &&= JSON.parse(U.JSONStableStringify(ut));
|
|
4331
|
+
let ft = r("workbooks", t, e, D, E, z);
|
|
4332
|
+
T.set(lr, !0 === ft.entries().next().value?.[1]?.date1904), (h.calcOnLoad ?? p) !== "none" && T.set(cr, ((e, t) => {
|
|
4332
4333
|
let n = /* @__PURE__ */ new Set();
|
|
4333
4334
|
if (e) for (let t = 0; t < e.length; t++) n.add(String(e[t]?.name).toUpperCase());
|
|
4334
4335
|
if (t) for (let e = 0; e < t.length; e++) try {
|
|
@@ -4339,14 +4340,14 @@ var Tr = {
|
|
|
4339
4340
|
}, /* @__PURE__ */ new Map());
|
|
4340
4341
|
for (let e of r.keys()) n.add(e.toUpperCase());
|
|
4341
4342
|
} catch {}
|
|
4342
|
-
return (e) => n.has(e) ||
|
|
4343
|
-
})(
|
|
4343
|
+
return (e) => n.has(e) || Ze.has(e);
|
|
4344
|
+
})(ft.entries().next().value?.[1]?.names, h.functions)), x?.mark("side-parts-json"), await Promise.all(ve);
|
|
4344
4345
|
{
|
|
4345
|
-
let e =
|
|
4346
|
+
let e = ft.entries().next().value?.[1], t = d(e?.names), n = e?.sheets ?? [];
|
|
4346
4347
|
for (let e = 0; e < n.length; e++) {
|
|
4347
4348
|
let r = n[e], i = y(r);
|
|
4348
4349
|
if (r?.kind === "macro" && i?.part.xml) {
|
|
4349
|
-
i.part.xml = l(i.part.xml,
|
|
4350
|
+
i.part.xml = l(i.part.xml, Be);
|
|
4350
4351
|
continue;
|
|
4351
4352
|
}
|
|
4352
4353
|
let a = _(r);
|
|
@@ -4358,12 +4359,12 @@ var Tr = {
|
|
|
4358
4359
|
typeof n == "string" && (r[e].ref = t.readDetached(n));
|
|
4359
4360
|
}
|
|
4360
4361
|
}
|
|
4361
|
-
|
|
4362
|
-
let
|
|
4363
|
-
...
|
|
4364
|
-
styles:
|
|
4365
|
-
theme:
|
|
4366
|
-
},
|
|
4362
|
+
oe && le > 0 && (oe(ce, ce), await new Promise((e) => setTimeout(e, 0))), x?.mark("sheets");
|
|
4363
|
+
let K = {
|
|
4364
|
+
...ft.entries().next().value?.[1],
|
|
4365
|
+
styles: ut,
|
|
4366
|
+
theme: lt.toJSON()
|
|
4367
|
+
}, mt = ((e, t, n, r) => {
|
|
4367
4368
|
let i = {}, a = (e, t) => {
|
|
4368
4369
|
if (e) for (let { key: n, value: r } of e) {
|
|
4369
4370
|
let e = t[n];
|
|
@@ -4384,10 +4385,10 @@ var Tr = {
|
|
|
4384
4385
|
e.length > 0 && (i.custom = e);
|
|
4385
4386
|
}
|
|
4386
4387
|
return Object.keys(i).length > 0 ? i : void 0;
|
|
4387
|
-
})(
|
|
4388
|
+
})(Oe.values().next().value?.properties, ke.values().next().value?.properties, je.values().next().value?.custom, (e, t) => {
|
|
4388
4389
|
ne(e, "docProps/custom.xml", t);
|
|
4389
4390
|
});
|
|
4390
|
-
|
|
4391
|
+
mt && (K.properties = mt), ((e, t) => {
|
|
4391
4392
|
if (!t || t.size === 0) return;
|
|
4392
4393
|
let n = e.styles;
|
|
4393
4394
|
if (!n) return;
|
|
@@ -4424,26 +4425,26 @@ var Tr = {
|
|
|
4424
4425
|
for (let e of r) e !== 0 && Mr(a[e] ?? (a[e] = {}), !0);
|
|
4425
4426
|
for (let e of i) e !== 0 && Mr(a[e] ?? (a[e] = {}), !1);
|
|
4426
4427
|
if (r.has(0)) {
|
|
4427
|
-
let e = n.named ??= [], t =
|
|
4428
|
+
let e = n.named ??= [], t = Qe.BuiltInName.Normal.toLowerCase(), r = e.find((e) => e.name?.toLowerCase() === t);
|
|
4428
4429
|
r || (r = {
|
|
4429
|
-
name:
|
|
4430
|
+
name: Qe.BuiltInName.Normal,
|
|
4430
4431
|
style: {}
|
|
4431
4432
|
}, e.push(r)), Mr(r.style, !0);
|
|
4432
4433
|
}
|
|
4433
|
-
})(
|
|
4434
|
+
})(K, T.get(kr)), ((e, t) => {
|
|
4434
4435
|
if (t && t.size !== 0) for (let n of e.sheets ?? []) {
|
|
4435
4436
|
let e = _(n), r = e?.pivotTables;
|
|
4436
4437
|
if (!e || !r || r.length === 0) continue;
|
|
4437
|
-
let i = r.map(
|
|
4438
|
+
let i = r.map(L), a = r.map(() => []);
|
|
4438
4439
|
for (let [n, r] of e.directStyles ?? []) {
|
|
4439
4440
|
if (!t.has(r)) continue;
|
|
4440
|
-
let e =
|
|
4441
|
+
let e = W.fastStringToRange(n);
|
|
4441
4442
|
for (let t = 0; t < i.length; t++) {
|
|
4442
4443
|
let n = i[t];
|
|
4443
4444
|
if (!n) continue;
|
|
4444
4445
|
let r = Math.max(e.rowStart, n.rowStart), o = Math.min(e.rowEnd, n.rowEnd), s = Math.max(e.colStart, n.colStart), c = Math.min(e.colEnd, n.colEnd);
|
|
4445
4446
|
if (r > o || s > c) continue;
|
|
4446
|
-
let l =
|
|
4447
|
+
let l = W.rangeToString({
|
|
4447
4448
|
rowStart: r - n.rowStart,
|
|
4448
4449
|
rowEnd: o - n.rowStart,
|
|
4449
4450
|
colStart: s - n.colStart,
|
|
@@ -4454,14 +4455,14 @@ var Tr = {
|
|
|
4454
4455
|
}
|
|
4455
4456
|
for (let e = 0; e < r.length; e++) a[e].length > 0 && (r[e].buttons = a[e]);
|
|
4456
4457
|
}
|
|
4457
|
-
})(
|
|
4458
|
-
let
|
|
4459
|
-
Pr(
|
|
4458
|
+
})(K, T.get(Nr));
|
|
4459
|
+
let gt = T.get(Gr);
|
|
4460
|
+
Pr(K, gt), ((e) => {
|
|
4460
4461
|
let t = {
|
|
4461
4462
|
colStart: 0,
|
|
4462
4463
|
rowStart: 0,
|
|
4463
|
-
colEnd:
|
|
4464
|
-
rowEnd:
|
|
4464
|
+
colEnd: I,
|
|
4465
|
+
rowEnd: Re
|
|
4465
4466
|
};
|
|
4466
4467
|
for (let n of e.sheets ?? []) {
|
|
4467
4468
|
let e = _(n);
|
|
@@ -4470,14 +4471,14 @@ var Tr = {
|
|
|
4470
4471
|
if (Jr(e.cols, !0, t, r), Jr(e.rows, !1, t, r), r.length === 0) continue;
|
|
4471
4472
|
let i = [];
|
|
4472
4473
|
for (let [t, n] of e.directStyles ?? []) i.push({
|
|
4473
|
-
...
|
|
4474
|
+
...W.fastStringToRange(t),
|
|
4474
4475
|
value: {
|
|
4475
4476
|
kind: 0,
|
|
4476
4477
|
index: n
|
|
4477
4478
|
}
|
|
4478
4479
|
});
|
|
4479
4480
|
i.push(...r);
|
|
4480
|
-
let a = [], o = new
|
|
4481
|
+
let a = [], o = new We.IteratorInstance(i, { axis: Ge.Column });
|
|
4481
4482
|
for (let e = o.next(); !e.done; e = o.next()) {
|
|
4482
4483
|
let n = e.value.overlaps, r;
|
|
4483
4484
|
if (n.length === 1) {
|
|
@@ -4490,11 +4491,11 @@ var Tr = {
|
|
|
4490
4491
|
}
|
|
4491
4492
|
r = e ?? t ?? i;
|
|
4492
4493
|
}
|
|
4493
|
-
a.push([
|
|
4494
|
+
a.push([W.rangeToString(e.value.range, t), r.index]);
|
|
4494
4495
|
}
|
|
4495
4496
|
a.length > 0 ? e.directStyles = a : delete e.directStyles;
|
|
4496
4497
|
}
|
|
4497
|
-
})(
|
|
4498
|
+
})(K), gt && ((e, t, n) => {
|
|
4498
4499
|
if (!t || t.size === 0 || !n) return;
|
|
4499
4500
|
let r = (e) => {
|
|
4500
4501
|
if (e === void 0 || e === 0) return null;
|
|
@@ -4522,31 +4523,31 @@ var Tr = {
|
|
|
4522
4523
|
});
|
|
4523
4524
|
e.cellControls = i;
|
|
4524
4525
|
}
|
|
4525
|
-
})(
|
|
4526
|
+
})(K, gt, r("featurePropertyBag", t, e, D, E, z).values().next().value?.featurePropertyBag);
|
|
4526
4527
|
{
|
|
4527
4528
|
let n = /* @__PURE__ */ new Map();
|
|
4528
|
-
r("slicers", t, e,
|
|
4529
|
+
r("slicers", t, e, D, E, z).forEach((e, t) => {
|
|
4529
4530
|
e?.slicers && n.set(t, e.slicers);
|
|
4530
|
-
}),
|
|
4531
|
+
}), ht(K, {
|
|
4531
4532
|
warn: (e, t) => {
|
|
4532
4533
|
ne(e, "xl/slicers", t);
|
|
4533
4534
|
},
|
|
4534
|
-
markAbsorbed:
|
|
4535
|
+
markAbsorbed: j,
|
|
4535
4536
|
slicerParts: n
|
|
4536
4537
|
});
|
|
4537
4538
|
}
|
|
4538
|
-
|
|
4539
|
-
...
|
|
4539
|
+
K.calc = {
|
|
4540
|
+
...K.calc ?? {},
|
|
4540
4541
|
legacyIntersect: !0
|
|
4541
|
-
},
|
|
4542
|
-
let
|
|
4543
|
-
|
|
4544
|
-
let
|
|
4545
|
-
if (
|
|
4546
|
-
let { VBAProject: e } = await import("./
|
|
4542
|
+
}, Be.length > 0 && (K.strings = Be);
|
|
4543
|
+
let _t = Me.toJSON();
|
|
4544
|
+
_t && _t.length > 0 && (K.people = _t);
|
|
4545
|
+
let vt = A.getEntry("xl/vbaProject.bin");
|
|
4546
|
+
if (vt) try {
|
|
4547
|
+
let { VBAProject: e } = await import("./BjukHV_w2B4gVPfj.mjs"), t = e.extract(vt);
|
|
4547
4548
|
if (t) {
|
|
4548
4549
|
let n = /* @__PURE__ */ new Map();
|
|
4549
|
-
for (let e of
|
|
4550
|
+
for (let e of K.sheets ?? []) {
|
|
4550
4551
|
let t = _(e), r = t?.codeName;
|
|
4551
4552
|
r && n.set(r, t);
|
|
4552
4553
|
}
|
|
@@ -4555,7 +4556,7 @@ var Tr = {
|
|
|
4555
4556
|
a && (t.source = a), i && (t.sourceHeader = i);
|
|
4556
4557
|
let o = r.type === "document" ? n.get(r.name) : void 0;
|
|
4557
4558
|
o || r.type !== "document" || (t.scope = "workbook");
|
|
4558
|
-
let s = o ? o.modules ??= {} :
|
|
4559
|
+
let s = o ? o.modules ??= {} : K.modules ??= {};
|
|
4559
4560
|
s[r.name] || (s[r.name] = t);
|
|
4560
4561
|
}
|
|
4561
4562
|
s?.(t);
|
|
@@ -4563,29 +4564,29 @@ var Tr = {
|
|
|
4563
4564
|
} catch (e) {
|
|
4564
4565
|
S.push([`Error extracting VBA: ${e?.message ?? e}`, "xl/vbaProject.bin"]);
|
|
4565
4566
|
}
|
|
4566
|
-
let
|
|
4567
|
+
let kt = T.get("calcId"), At = kt === void 0 || !(Number(kt) >= 191029), jt = h.calcOnLoad ?? (p === "auto" && At ? "full" : p), Mt = {
|
|
4567
4568
|
...h,
|
|
4568
|
-
calcOnLoad:
|
|
4569
|
+
calcOnLoad: jt,
|
|
4569
4570
|
resources: v,
|
|
4570
|
-
json:
|
|
4571
|
+
json: K
|
|
4571
4572
|
};
|
|
4572
|
-
if (
|
|
4573
|
-
let e =
|
|
4574
|
-
|
|
4573
|
+
if (Mt.disableLoadAutoFit === void 0) {
|
|
4574
|
+
let e = T.get(Ie);
|
|
4575
|
+
Mt.disableLoadAutoFit = !!e?.declared && e.normalIsThemeFont && await we(e.faces);
|
|
4575
4576
|
}
|
|
4576
4577
|
x?.mark("json-assembled");
|
|
4577
|
-
let
|
|
4578
|
-
if (x?.mark("workbook-constructed"),
|
|
4579
|
-
e.deleteReference(
|
|
4580
|
-
}),
|
|
4581
|
-
g(
|
|
4578
|
+
let Nt = new pt(Mt);
|
|
4579
|
+
if (x?.mark("workbook-constructed"), he.forEach((e) => {
|
|
4580
|
+
e.deleteReference(me);
|
|
4581
|
+
}), ue.endPersist(), te) {
|
|
4582
|
+
g(Nt);
|
|
4582
4583
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
4583
|
-
for (let n of
|
|
4584
|
-
let r =
|
|
4584
|
+
for (let n of A.getNames()) {
|
|
4585
|
+
let r = A.getEntry(n);
|
|
4585
4586
|
if (!r) continue;
|
|
4586
|
-
let i =
|
|
4587
|
+
let i = A.getRawEntry(n), a = i ? {
|
|
4587
4588
|
data: r,
|
|
4588
|
-
uncompressedSize:
|
|
4589
|
+
uncompressedSize: A.uncompressedSize(n),
|
|
4589
4590
|
raw: {
|
|
4590
4591
|
compressedData: i.data,
|
|
4591
4592
|
compressionMethod: i.compressionMethod,
|
|
@@ -4593,39 +4594,39 @@ var Tr = {
|
|
|
4593
4594
|
}
|
|
4594
4595
|
} : {
|
|
4595
4596
|
data: r,
|
|
4596
|
-
uncompressedSize:
|
|
4597
|
+
uncompressedSize: A.uncompressedSize(n)
|
|
4597
4598
|
};
|
|
4598
4599
|
e.set(n, a), t += r.byteLength;
|
|
4599
4600
|
}
|
|
4600
4601
|
if (t > 67108864) S.push([`Source package too large to retain (${t} bytes, limit ${i}); unmodeled parts will be dropped on save.`, "SourcePackage"]);
|
|
4601
4602
|
else if (e.size > 0) {
|
|
4602
|
-
let t = new
|
|
4603
|
-
b(
|
|
4604
|
-
let n =
|
|
4603
|
+
let t = new F(e, ye);
|
|
4604
|
+
b(Nt, t);
|
|
4605
|
+
let n = Nt.getWorksheets().getItems(), r = Nt.getTransactions().addListener({ onCommitEnd: (e) => {
|
|
4605
4606
|
let n = e.getOperation()?.name;
|
|
4606
4607
|
n !== "insertCells" && n !== "deleteCells" || t.markStructuralChange();
|
|
4607
|
-
} }), i =
|
|
4608
|
-
let e =
|
|
4608
|
+
} }), i = Nt.addListeners({ onSheetsChange: () => {
|
|
4609
|
+
let e = Nt.getWorksheets().getItems();
|
|
4609
4610
|
(e.length !== n.length || e.some((e, t) => e !== n[t])) && t.markStructuralChange(), n = e;
|
|
4610
4611
|
} });
|
|
4611
|
-
|
|
4612
|
-
r(), i(), g(
|
|
4612
|
+
Nt.addListeners({ onClose: () => {
|
|
4613
|
+
r(), i(), g(Nt);
|
|
4613
4614
|
} });
|
|
4614
4615
|
}
|
|
4615
4616
|
}
|
|
4616
|
-
if (S.length &&
|
|
4617
|
+
if (S.length && ae?.onWarning) {
|
|
4617
4618
|
let e = /* @__PURE__ */ new Set();
|
|
4618
4619
|
for (let t of S) {
|
|
4619
4620
|
let [n, r, i] = t, a = i ?? n;
|
|
4620
|
-
e.has(a) || (e.add(a),
|
|
4621
|
+
e.has(a) || (e.add(a), ae.onWarning(n, r));
|
|
4621
4622
|
}
|
|
4622
4623
|
}
|
|
4623
|
-
return x && !0 === u && console.table(x.toTable()), await
|
|
4624
|
+
return x && !0 === u && console.table(x.toTable()), await Nt.whenFontsReady(), Nt;
|
|
4624
4625
|
} catch (e) {
|
|
4625
4626
|
let t = "Unable to parse XLSX.";
|
|
4626
|
-
throw e instanceof
|
|
4627
|
+
throw e instanceof at && (t = "Unable to open XLSX. There are too many rows or columns."), Error(t, { cause: e });
|
|
4627
4628
|
} finally {
|
|
4628
|
-
await
|
|
4629
|
+
await A.close().catch(() => {});
|
|
4629
4630
|
}
|
|
4630
4631
|
};
|
|
4631
4632
|
export { dr as a, kr as i, Gr as n, Nr as r, ti as readXLSX, Xr as t };
|