@sheetxl/io-xlsx 0.8.0-beta.1 → 0.8.0-beta.2

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.
Files changed (88) hide show
  1. package/browser/cjs/BzOEBR0jaxXg9wvt.cjs +5 -0
  2. package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +2 -0
  3. package/browser/cjs/Ca-xJDjg5bOpUPXX.cjs +1 -0
  4. package/browser/cjs/{D5Y4KQhKdukOkjvA.cjs → D3EWCPfCu-qMOIGd.cjs} +1 -2
  5. package/browser/cjs/{BAtEL-5TLyoaPFDP.cjs → DULsYP_GcPGLVYSE.cjs} +10 -1
  6. package/browser/cjs/DtBN3UOzNJjYBwJ6.cjs +1 -0
  7. package/browser/cjs/index.cjs +1 -1
  8. package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +1 -0
  9. package/browser/esm/B9q618XELV7uWJsA.mjs +67 -0
  10. package/browser/esm/{Dj7D2nVdAZ3TiUks.mjs → BwbMurFOptAFs7gC.mjs} +1595 -1124
  11. package/browser/esm/{CLWzJJyoSrykkVLX.mjs → CMHb6pUUmsCP9r_9.mjs} +2 -2
  12. package/browser/esm/{ijQzHH-bvDfUHIi1.mjs → CMzkLUwbgA73RvCb.mjs} +1 -1
  13. package/browser/esm/D75_rfogFUfXADKc.mjs +3324 -0
  14. package/browser/esm/{4BWLu134ABlCQEtM.mjs → DfuBawaydlvgZMR-.mjs} +1824 -1051
  15. package/browser/esm/{BkNXyG6NC-w5Xo92.mjs → DhqYgh9G2vLn7mIE.mjs} +28 -13
  16. package/browser/esm/DoMlKUCnMSlR2qX5.mjs +159 -0
  17. package/browser/esm/{Cok_fBIUCHDSrKw0.mjs → DtpWa7tZahylJ3HS.mjs} +446 -347
  18. package/browser/esm/{Ctqql4O-3xj2K8vv.mjs → IZf0hIeLYj3T0Xvu.mjs} +2 -2
  19. package/browser/esm/{Dz1Dp8DDJvhd09RR.mjs → _UDbQq5-pHbU1f82.mjs} +1 -1
  20. package/browser/esm/index.mjs +3 -3
  21. package/node/esm/{CF1R5ovFsRNu--Rw.mjs → BD03jrMQ_UKA196-.mjs} +1934 -1143
  22. package/node/esm/{fOnuUjpPCAzmuIXN.mjs → Bi_kZVtZams7taqa.mjs} +2 -2
  23. package/node/esm/{Ctcl4jN52INWpKWC.mjs → BxHvzSROx_N_7nJH.mjs} +607 -506
  24. package/node/esm/{CEAmv36xpTNgFwl_.mjs → CB1ijGbhl-e2l6Mm.mjs} +49 -35
  25. package/node/esm/CO1M1H1N6fB422K-.mjs +2959 -0
  26. package/node/esm/CWpezSa6TERGEv-B.mjs +3410 -0
  27. package/node/esm/{CEV7nKotMpeRRnQC.mjs → CY-pSutJLHskZfXZ.mjs} +1 -1
  28. package/node/esm/Dezt2uIDqlxjiuk5.mjs +170 -0
  29. package/node/esm/index.mjs +40 -25
  30. package/package.json +3 -3
  31. package/types/src/ConditionalFormatRules.d.ts +3 -3
  32. package/types/src/DataValidationRules.d.ts +18 -2
  33. package/types/src/ExcelCalcStamp.d.ts +39 -0
  34. package/types/src/ExcelCompat.d.ts +197 -42
  35. package/types/src/LegacyFormula.d.ts +28 -7
  36. package/types/src/Plugin.d.ts +16 -5
  37. package/types/src/ProtectionAttributes.d.ts +38 -0
  38. package/types/src/SourcePackage.d.ts +31 -12
  39. package/types/src/Types.d.ts +17 -0
  40. package/types/src/reader/HiddenFormulas.d.ts +16 -0
  41. package/types/src/reader/Warning.d.ts +29 -0
  42. package/types/src/reader/dom/DOMTransformer.d.ts +1 -1
  43. package/types/src/reader/dom/ExecutionContext.d.ts +16 -3
  44. package/types/src/reader/dom/Types.d.ts +19 -3
  45. package/types/src/reader/domVisitors/CommentVisitor.d.ts +18 -1
  46. package/types/src/reader/domVisitors/CommentsVisitor.d.ts +2 -2
  47. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +21 -3
  48. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  49. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +6 -1
  50. package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -1
  51. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  52. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +11 -1
  53. package/types/src/reader/sax/LeanSaxParser.d.ts +58 -0
  54. package/types/src/reader/sax/SaxParser.d.ts +11 -1
  55. package/types/src/reader/sax/SaxVisitor.d.ts +3 -2
  56. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +9 -0
  57. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +11 -4
  58. package/types/src/utils/VmlNoteShapes.d.ts +75 -0
  59. package/types/src/vba/VBAProject.d.ts +52 -4
  60. package/types/src/writer/builder/ContentTypes.d.ts +13 -0
  61. package/types/src/writer/builder/Emitter.d.ts +6 -6
  62. package/types/src/writer/builder/OpcXmlUtils.d.ts +2 -0
  63. package/types/src/writer/builder/PackageBuilder.d.ts +70 -22
  64. package/types/src/writer/builder/PartWriter.d.ts +5 -0
  65. package/types/src/writer/builder/RelationshipSet.d.ts +3 -0
  66. package/types/src/writer/builder/Types.d.ts +107 -38
  67. package/types/src/writer/builder/_Types.d.ts +17 -0
  68. package/types/src/writer/emitters/CommentsEmitter.d.ts +52 -0
  69. package/types/src/writer/emitters/EmbeddedPartEmitter.d.ts +60 -0
  70. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +19 -0
  71. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +18 -0
  72. package/types/src/writer/emitters/PersonsEmitter.d.ts +17 -0
  73. package/types/src/writer/emitters/PivotTableEmitter.d.ts +45 -0
  74. package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +21 -0
  75. package/types/src/writer/emitters/WorkbookEmitter.d.ts +16 -3
  76. package/types/src/writer/utils/DrawMLUtils.d.ts +16 -1
  77. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +28 -0
  78. package/browser/cjs/Bg0e53JZa8vhmm5a.cjs +0 -1
  79. package/browser/cjs/CK5FFUvet6FnIYO_.cjs +0 -5
  80. package/browser/cjs/DV6LeTEiiFUrZoxj.cjs +0 -1
  81. package/browser/cjs/DWkuoJSgvcXJTdN1.cjs +0 -1
  82. package/browser/cjs/Db8YjGM6TG34c8aT.cjs +0 -1
  83. package/browser/esm/BzQ_lPzc8C4OTIGZ.mjs +0 -99
  84. package/browser/esm/CJknI8BYGSZr-4zS.mjs +0 -52
  85. package/browser/esm/D-m_kQLaewdwuXaF.mjs +0 -2685
  86. package/node/esm/CvnRSooxEQdlJgMn.mjs +0 -2766
  87. package/node/esm/DQd0vxzTaPt2qSL-.mjs +0 -108
  88. package/node/esm/ssSlRCbCqxvZ9IX8.mjs +0 -2481
@@ -1,14 +1,14 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.1
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.2
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { n as e } from "./ijQzHH-bvDfUHIi1.mjs";
8
- import { o as t } from "./Dj7D2nVdAZ3TiUks.mjs";
9
- import { a as n, d as r, f as i, i as a, n as o, o as s, p as c, r as l, t as u } from "./BzQ_lPzc8C4OTIGZ.mjs";
10
- import { CommonUtils as d } from "@sheetxl/utils";
11
- import { AddressUtils as f, FormulaError as p, IBorder as m, ICondition as h, IEffect as g, IFill as _, IFont as v, IRange as y, IStyle as b, ITextFrame as x, Sort as S, Tuple as ee } from "@sheetxl/sdk";
7
+ import { n as e } from "./CMzkLUwbgA73RvCb.mjs";
8
+ import { b as t, g as n, x as r } from "./BwbMurFOptAFs7gC.mjs";
9
+ import { a as i, c as a, i as o, m as s, o as c, p as l, r as u, s as d, t as f } from "./DoMlKUCnMSlR2qX5.mjs";
10
+ import { CommonUtils as p } from "@sheetxl/utils";
11
+ import { AddressUtils as m, FormulaError as h, IBorders as g, ICondition as _, IEffect as v, IFill as y, IFont as b, IRange as x, IStyle as S, ITextFrame as C, Sort as w, Tuple as ee } from "@sheetxl/sdk";
12
12
  var te = class {
13
13
  constructor(e) {
14
14
  this.list = e;
@@ -41,15 +41,18 @@ var te = class {
41
41
  }, ie = (e) => {
42
42
  let t = parseFloat(e);
43
43
  return isNaN(t) ? null : t;
44
- }, ae = /* @__PURE__ */ new Map(), C = class {
45
- constructor(e, t, n, r, i, a = null, o = d.EmptyObject) {
44
+ }, ae = /* @__PURE__ */ new Map(), T = class {
45
+ constructor(e, t, n, r, i, a = null, o = p.EmptyObject) {
46
46
  this._fileLocation = "";
47
47
  let s = (e, t, n) => o?.getRef?.(e, t, n, o?.parsedRefs), c = (e) => o?.getRefs?.(e, o?.parsedRefs);
48
- this._parent = e, this.sharedShared = t, this.currentPath = n, this.elemRoot = r, this.jsonRoot = i, e ? (this._fileLocation = e._fileLocation, this._getRef = e._getRef, this._getRefs = e._getRefs, this._serializeElement = e._serializeElement) : (a && (this._fileLocation = a), o?.getRef && (this._getRef = s), o?.getRefs && (this._getRefs = c), this._onWarning = o?.onWarning, this._addPerson = o?.addPerson, this._serializeElement = o?.serializeElement);
48
+ this._parent = e, this.sharedShared = t, this.currentPath = n, this.elemRoot = r, this.jsonRoot = i, e ? (this._fileLocation = e._fileLocation, this._getRef = e._getRef, this._getRefs = e._getRefs, this._serializeElement = e._serializeElement, this._readEmbeddedPart = e._readEmbeddedPart) : (a && (this._fileLocation = a), o?.getRef && (this._getRef = s), o?.getRefs && (this._getRefs = c), this._onWarning = o?.onWarning, this._addPerson = o?.addPerson, this._serializeElement = o?.serializeElement, this._readEmbeddedPart = o?.readEmbeddedPart);
49
49
  }
50
50
  getRef(e, t = !1) {
51
51
  return this._getRef?.(e, this._fileLocation, t) ?? null;
52
52
  }
53
+ readEmbeddedPart(e) {
54
+ return this._readEmbeddedPart?.(e, this._fileLocation) ?? null;
55
+ }
53
56
  getRelationships() {
54
57
  return this._getRefs?.(this._fileLocation) ?? ae;
55
58
  }
@@ -65,8 +68,11 @@ var te = class {
65
68
  getJsonRoot() {
66
69
  return this.jsonRoot;
67
70
  }
68
- warn(e) {
69
- this._onWarning ? this._onWarning(e) : this._parent ? this._parent?.warn?.(e) : console.warn(e);
71
+ warn(e, t) {
72
+ this._raiseWarning(e, this.getFileLocation(), t?.onceKey);
73
+ }
74
+ _raiseWarning(e, t, n) {
75
+ this._onWarning ? this._onWarning(e, t, n) : this._parent ? this._parent._raiseWarning(e, t, n) : console.warn(e);
70
76
  }
71
77
  serializeElement(e) {
72
78
  return this._serializeElement?.(e) ?? null;
@@ -122,10 +128,10 @@ var te = class {
122
128
  }
123
129
  }
124
130
  getFromPath(e, t) {
125
- return d.getFromPath(e, t);
131
+ return p.getFromPath(e, t);
126
132
  }
127
133
  setToPath(e, t, n) {
128
- return d.setToPath(e, t, n);
134
+ return p.setToPath(e, t, n);
129
135
  }
130
136
  getValAttrAsString(e, t) {
131
137
  let n = this.evaluate(e, t);
@@ -165,32 +171,32 @@ var te = class {
165
171
  }
166
172
  this.setToPath(n, r, a);
167
173
  }
168
- }, w = e({
169
- isBlank: () => A,
170
- isNotBlank: () => j,
171
- length: () => M,
172
- parseRotation: () => T,
173
- parseValAttrAsBoolean: () => D,
174
- parseValAttrAsFloat: () => k,
175
- parseValAttrAsInteger: () => O,
176
- parseValAttrAsString: () => E
177
- }), T = (e, t) => {
174
+ }, oe = e({
175
+ isBlank: () => j,
176
+ isNotBlank: () => M,
177
+ length: () => N,
178
+ parseRotation: () => E,
179
+ parseValAttrAsBoolean: () => O,
180
+ parseValAttrAsFloat: () => A,
181
+ parseValAttrAsInteger: () => k,
182
+ parseValAttrAsString: () => D
183
+ }), E = (e, t) => {
178
184
  if (!e || !e.hasAttribute("rot")) return;
179
- let n = e.getAttribute("rot"), r = d.roundAccurately(o(n), 2);
185
+ let n = e.getAttribute("rot"), r = p.roundAccurately(o(n), 2);
180
186
  r !== -1e3 && (t.rotation = r);
181
- }, E = (e, t, n, r, i) => {
187
+ }, D = (e, t, n, r, i) => {
182
188
  let a = e.getValAttrAsString(r, t);
183
189
  a !== null && (n[i] = a);
184
- }, D = (e, t, n, r, i = r, a = null) => {
190
+ }, O = (e, t, n, r, i = r, a = null) => {
185
191
  let o = e.getValAttrAsBoolean(r, t, a);
186
192
  o !== null && (n[i] = o);
187
- }, O = (e, t, n, r, i) => {
193
+ }, k = (e, t, n, r, i) => {
188
194
  let a = e.getValAttrAsInteger(r, t);
189
195
  a !== null && (n[i] = a);
190
- }, k = (e, t, n, r, i, a = 1) => {
196
+ }, A = (e, t, n, r, i, a = 1) => {
191
197
  let o = e.getValAttrAsFloat(r, t);
192
198
  o !== null && (n[i] = o * a);
193
- }, A = (e) => !e || e.trim().length === 0, j = (e) => !A(e), M = (e) => e?.length ?? 0, N = class {
199
+ }, j = (e) => !e || e.trim().length === 0, M = (e) => !j(e), N = (e) => e?.length ?? 0, P = class {
194
200
  constructor(e) {
195
201
  this.jsonKey = e;
196
202
  }
@@ -198,7 +204,7 @@ var te = class {
198
204
  let r = {};
199
205
  return n[this.jsonKey] = r, r;
200
206
  }
201
- }, P = class {
207
+ }, F = class {
202
208
  visit(e, t, n) {}
203
209
  getStroke(e, t) {
204
210
  let n = e.evaluate("ln", t);
@@ -206,7 +212,7 @@ var te = class {
206
212
  }
207
213
  parseLn(e, t) {
208
214
  let n = {};
209
- t.hasAttribute("algn") && (n.align = t.getAttribute("algn")), t.hasAttribute("cap") && (n.lineCap = se(t.getAttribute("cap"))), t.hasAttribute("cmpd") && (n.compound = t.getAttribute("cmpd")), t.hasAttribute("w") && (n.width = s(t.getAttribute("w")));
215
+ t.hasAttribute("algn") && (n.align = t.getAttribute("algn")), t.hasAttribute("cap") && (n.lineCap = ce(t.getAttribute("cap"))), t.hasAttribute("cmpd") && (n.compound = t.getAttribute("cmpd")), t.hasAttribute("w") && (n.width = a(t.getAttribute("w")));
210
216
  let r = e.evaluate("miter", t);
211
217
  r && (n.lineJoin = "miter", r.hasAttribute("lim") && (n.miterLimit = parseFloat(r.getAttribute("lim")) / 1e5)), e.evaluate("bevel", t) && (n.lineJoin = "bevel"), e.evaluate("round", t) && (n.lineJoin = "round");
212
218
  let i = e.evaluate("custDash", t);
@@ -216,15 +222,15 @@ var te = class {
216
222
  let e = [];
217
223
  for (let n = 0; n < t.length; n++) {
218
224
  let r = t.item(n);
219
- e.push(a(r.getAttribute("d") ?? "")), e.push(a(r.getAttribute("sp") ?? ""));
225
+ e.push(c(r.getAttribute("d") ?? "")), e.push(c(r.getAttribute("sp") ?? ""));
220
226
  }
221
227
  n.dash = e;
222
228
  }
223
229
  }
224
230
  let o = e.evaluate("prstDash", t);
225
231
  o && o.hasAttribute("val") && (n.dash = o.getAttribute("val")), this.parseEndElement(e, t, n, "headEnd", "head"), this.parseEndElement(e, t, n, "tailEnd", "tail");
226
- let c = this.getFill(e, t);
227
- return c && (n.fill = c), n;
232
+ let s = this.getFill(e, t);
233
+ return s && (n.fill = s), n;
228
234
  }
229
235
  parseEndElement(e, t, n, r, i) {
230
236
  let a = e.evaluate(r, t);
@@ -250,51 +256,51 @@ var te = class {
250
256
  switch (n) {
251
257
  case "outerShdw": {
252
258
  let n = {
253
- type: g.Type.OuterShadow,
259
+ type: v.Type.OuterShadow,
254
260
  color: this.processAdjColor(e, t)
255
261
  };
256
- return t.hasAttribute("dist") && (n.distance = s(t.getAttribute("dist"))), t.hasAttribute("dir") && (n.angle = o(t.getAttribute("dir"))), t.hasAttribute("blurRad") && (n.blur = s(t.getAttribute("blurRad"))), t.hasAttribute("algn") && (n.alignment = t.getAttribute("algn")), t.hasAttribute("rotWithShape") && (n.isRotatedWithShape = l(t.getAttribute("rotWithShape"))), t.hasAttribute("sx") && (n.scaleX = a(t.getAttribute("sx"))), t.hasAttribute("sy") && (n.scaleY = a(t.getAttribute("sy"))), t.hasAttribute("kx") && (n.skewX = o(t.getAttribute("kx"))), t.hasAttribute("ky") && (n.skewY = o(t.getAttribute("ky"))), n;
262
+ return t.hasAttribute("dist") && (n.distance = a(t.getAttribute("dist"))), t.hasAttribute("dir") && (n.angle = o(t.getAttribute("dir"))), t.hasAttribute("blurRad") && (n.blur = a(t.getAttribute("blurRad"))), t.hasAttribute("algn") && (n.alignment = t.getAttribute("algn")), t.hasAttribute("rotWithShape") && (n.isRotatedWithShape = i(t.getAttribute("rotWithShape"))), t.hasAttribute("sx") && (n.scaleX = c(t.getAttribute("sx"))), t.hasAttribute("sy") && (n.scaleY = c(t.getAttribute("sy"))), t.hasAttribute("kx") && (n.skewX = o(t.getAttribute("kx"))), t.hasAttribute("ky") && (n.skewY = o(t.getAttribute("ky"))), n;
257
263
  }
258
264
  case "innerShdw": {
259
265
  let n = {
260
- type: g.Type.InnerShadow,
266
+ type: v.Type.InnerShadow,
261
267
  color: this.processAdjColor(e, t)
262
268
  };
263
- return t.hasAttribute("dist") && (n.distance = s(t.getAttribute("dist"))), t.hasAttribute("dir") && (n.angle = o(t.getAttribute("dir"))), t.hasAttribute("blurRad") && (n.blur = s(t.getAttribute("blurRad"))), n;
269
+ return t.hasAttribute("dist") && (n.distance = a(t.getAttribute("dist"))), t.hasAttribute("dir") && (n.angle = o(t.getAttribute("dir"))), t.hasAttribute("blurRad") && (n.blur = a(t.getAttribute("blurRad"))), n;
264
270
  }
265
271
  case "prstShdw": {
266
272
  let n = {
267
- type: g.Type.PresetShadow,
273
+ type: v.Type.PresetShadow,
268
274
  color: this.processAdjColor(e, t),
269
275
  preset: t.getAttribute("prst") ?? void 0
270
276
  };
271
- return t.hasAttribute("dist") && (n.distance = s(t.getAttribute("dist"))), t.hasAttribute("dir") && (n.angle = o(t.getAttribute("dir"))), n;
277
+ return t.hasAttribute("dist") && (n.distance = a(t.getAttribute("dist"))), t.hasAttribute("dir") && (n.angle = o(t.getAttribute("dir"))), n;
272
278
  }
273
279
  case "glow": {
274
280
  let n = {
275
- type: g.Type.Glow,
281
+ type: v.Type.Glow,
276
282
  color: this.processAdjColor(e, t)
277
283
  };
278
- return t.hasAttribute("rad") && (n.radius = s(t.getAttribute("rad"))), n;
284
+ return t.hasAttribute("rad") && (n.radius = a(t.getAttribute("rad"))), n;
279
285
  }
280
286
  case "softEdge": {
281
- let e = { type: g.Type.SoftEdge };
282
- return t.hasAttribute("rad") && (e.radius = s(t.getAttribute("rad"))), e;
287
+ let e = { type: v.Type.SoftEdge };
288
+ return t.hasAttribute("rad") && (e.radius = a(t.getAttribute("rad"))), e;
283
289
  }
284
290
  case "reflection": {
285
- let e = { type: g.Type.Reflection };
286
- return t.hasAttribute("blurRad") && (e.blur = s(t.getAttribute("blurRad"))), t.hasAttribute("dist") && (e.distance = s(t.getAttribute("dist"))), t.hasAttribute("dir") && (e.angle = o(t.getAttribute("dir"))), t.hasAttribute("fadeDir") && (e.fadeAngle = o(t.getAttribute("fadeDir"))), t.hasAttribute("stA") && (e.startAlpha = a(t.getAttribute("stA"))), t.hasAttribute("stPos") && (e.startPosition = a(t.getAttribute("stPos"))), t.hasAttribute("endA") && (e.endAlpha = a(t.getAttribute("endA"))), t.hasAttribute("endPos") && (e.endPosition = a(t.getAttribute("endPos"))), t.hasAttribute("sx") && (e.scaleX = a(t.getAttribute("sx"))), t.hasAttribute("sy") && (e.scaleY = a(t.getAttribute("sy"))), t.hasAttribute("kx") && (e.skewX = o(t.getAttribute("kx"))), t.hasAttribute("ky") && (e.skewY = o(t.getAttribute("ky"))), t.hasAttribute("algn") && (e.alignment = t.getAttribute("algn")), t.hasAttribute("rotWithShape") && (e.isRotatedWithShape = l(t.getAttribute("rotWithShape"))), e;
291
+ let e = { type: v.Type.Reflection };
292
+ return t.hasAttribute("blurRad") && (e.blur = a(t.getAttribute("blurRad"))), t.hasAttribute("dist") && (e.distance = a(t.getAttribute("dist"))), t.hasAttribute("dir") && (e.angle = o(t.getAttribute("dir"))), t.hasAttribute("fadeDir") && (e.fadeAngle = o(t.getAttribute("fadeDir"))), t.hasAttribute("stA") && (e.startAlpha = c(t.getAttribute("stA"))), t.hasAttribute("stPos") && (e.startPosition = c(t.getAttribute("stPos"))), t.hasAttribute("endA") && (e.endAlpha = c(t.getAttribute("endA"))), t.hasAttribute("endPos") && (e.endPosition = c(t.getAttribute("endPos"))), t.hasAttribute("sx") && (e.scaleX = c(t.getAttribute("sx"))), t.hasAttribute("sy") && (e.scaleY = c(t.getAttribute("sy"))), t.hasAttribute("kx") && (e.skewX = o(t.getAttribute("kx"))), t.hasAttribute("ky") && (e.skewY = o(t.getAttribute("ky"))), t.hasAttribute("algn") && (e.alignment = t.getAttribute("algn")), t.hasAttribute("rotWithShape") && (e.isRotatedWithShape = i(t.getAttribute("rotWithShape"))), e;
287
293
  }
288
294
  default: return;
289
295
  }
290
296
  }
291
297
  getFill(e, t) {
292
- if (e.evaluate("noFill", t)) return { type: _.Type.None };
298
+ if (e.evaluate("noFill", t)) return { type: y.Type.None };
293
299
  let n = e.evaluate("solidFill", t);
294
300
  if (n) {
295
301
  let t = this.processAdjColor(e, n);
296
302
  if (t) return {
297
- type: _.Type.Solid,
303
+ type: y.Type.Solid,
298
304
  color: t
299
305
  };
300
306
  }
@@ -306,24 +312,24 @@ var te = class {
306
312
  return a ? this.processImageFill(e, a) : null;
307
313
  }
308
314
  processGradFill(e, t) {
309
- let n = { type: _.Type.Gradient };
315
+ let n = { type: y.Type.Gradient };
310
316
  t.hasAttribute("rotWithShape") && (n.isRotatedWithShape = t.getAttribute("rotWithShape") === "1");
311
317
  let r = e.evaluate("lin", t);
312
- r && (n.gradientType = _.GradientType.Linear, r.hasAttribute("ang") && (n.angle = o(r.getAttribute("ang"))), r.hasAttribute("scaled") && (n.scaled = l(r.getAttribute("scaled"))));
313
- let i = {};
314
- t.hasAttribute("flip") && (i.mirror = t.getAttribute("flip")), Object.keys(i).length > 0 && (n.tile = i);
318
+ r && (n.gradientType = y.GradientType.Linear, r.hasAttribute("ang") && (n.angle = o(r.getAttribute("ang"))), r.hasAttribute("scaled") && (n.scaled = i(r.getAttribute("scaled"))));
319
+ let a = {};
320
+ t.hasAttribute("flip") && (a.mirror = t.getAttribute("flip")), Object.keys(a).length > 0 && (n.tile = a);
315
321
  let s = e.evaluate("path", t);
316
322
  if (s) {
317
- s.hasAttribute("path") && (n.gradientType = oe(s.getAttribute("path")));
323
+ s.hasAttribute("path") && (n.gradientType = se(s.getAttribute("path")));
318
324
  let t = e.evaluate("fillToRect", s);
319
325
  t && (n.focus = this.getRect(t));
320
326
  }
321
- let c = e.evaluate("tileRect", t);
322
- c && (n.tile ||= {}, n.tile.bounds = this.getRect(c));
327
+ let l = e.evaluate("tileRect", t);
328
+ l && (n.tile ||= {}, n.tile.bounds = this.getRect(l));
323
329
  let u = [], d = e.evaluate("gsLst/gs", t), f = d ? d.length : 0;
324
330
  for (let t = 0; t < f; t++) {
325
331
  let n = d.item(t), r = {
326
- offset: a(n.getAttribute("pos") ?? ""),
332
+ offset: c(n.getAttribute("pos") ?? ""),
327
333
  color: this.processAdjColor(e, n)
328
334
  };
329
335
  u.push(r);
@@ -332,14 +338,14 @@ var te = class {
332
338
  }
333
339
  getRect(e) {
334
340
  let t = {};
335
- return e.hasAttribute("t") && (t.t = a(e.getAttribute("t"))), e.hasAttribute("l") && (t.l = a(e.getAttribute("l"))), e.hasAttribute("b") && (t.b = a(e.getAttribute("b"))), e.hasAttribute("r") && (t.r = a(e.getAttribute("r"))), Object.keys(t).length === 0 ? null : t;
341
+ return e.hasAttribute("t") && (t.t = c(e.getAttribute("t"))), e.hasAttribute("l") && (t.l = c(e.getAttribute("l"))), e.hasAttribute("b") && (t.b = c(e.getAttribute("b"))), e.hasAttribute("r") && (t.r = c(e.getAttribute("r"))), Object.keys(t).length === 0 ? null : t;
336
342
  }
337
343
  processImageFill(e, t) {
338
- let n = { type: _.Type.Image };
339
- return t.hasAttribute("rotWithShape") && (n.isRotatedWithShape = l(t.getAttribute("rotWithShape"))), t.hasAttribute("dpi") && (n.dpi = t.getAttribute("dpi")), n.ref = "https://www.sheetxl.com/logo-color-padded-white.jpg", n.tile = !1, n;
344
+ let n = { type: y.Type.Image };
345
+ return t.hasAttribute("rotWithShape") && (n.isRotatedWithShape = i(t.getAttribute("rotWithShape"))), t.hasAttribute("dpi") && (n.dpi = t.getAttribute("dpi")), n.ref = "https://www.sheetxl.com/logo-color-padded-white.jpg", n.tile = !1, n;
340
346
  }
341
347
  processPatternFill(e, t) {
342
- let n = { type: _.Type.Pattern };
348
+ let n = { type: y.Type.Pattern };
343
349
  n.patternType = t.getAttribute("prst");
344
350
  let r = e.evaluate("bgClr", t);
345
351
  if (r) {
@@ -371,7 +377,7 @@ var te = class {
371
377
  return s ? this.processSrgbClrElement(e, s) : null;
372
378
  }
373
379
  processScrgbClrElement(e, t) {
374
- let n = "lrgba(" + a(t.getAttribute("r") ?? "") + "," + a(t.getAttribute("g") ?? "") + "," + a(t.getAttribute("b") ?? "") + ")";
380
+ let n = "lrgba(" + c(t.getAttribute("r") ?? "") + "," + c(t.getAttribute("g") ?? "") + "," + c(t.getAttribute("b") ?? "") + ")";
375
381
  return n += this.processAdjustments(e, t), n;
376
382
  }
377
383
  processSrgbClrElement(e, t) {
@@ -379,7 +385,7 @@ var te = class {
379
385
  return n += this.processAdjustments(e, t), n;
380
386
  }
381
387
  processHslClr(e, t) {
382
- let n = "hsl(" + o(t.getAttribute("hue") ?? "") + "," + a(t.getAttribute("sat") ?? "") + "," + a(t.getAttribute("lum") ?? "") + ")";
388
+ let n = "hsl(" + o(t.getAttribute("hue") ?? "") + "," + c(t.getAttribute("sat") ?? "") + "," + c(t.getAttribute("lum") ?? "") + ")";
383
389
  return n += this.processAdjustments(e, t), n;
384
390
  }
385
391
  processClrWithValAttribute(e, t) {
@@ -403,43 +409,43 @@ var te = class {
403
409
  let i = t.getAttribute("val");
404
410
  return i ? ` ${n} ${!i || parseFloat(i) / r}` : ` ${n}`;
405
411
  }
406
- }, oe = (e) => e === "circle" ? "radial" : e, se = (e) => {
412
+ }, se = (e) => e === "circle" ? "radial" : e, ce = (e) => {
407
413
  if (e === "rnd") return "round";
408
414
  if (e === "flat") return "butt";
409
415
  if (e === "sq") return "square";
410
416
  throw Error("Invalid lineCap type: " + e);
411
- }, F = class extends P {
412
- visit(e, t, r) {
417
+ }, I = class extends F {
418
+ visit(e, t, n) {
413
419
  try {
414
- let i = e.evaluate("xfrm", t);
415
- if (i) {
416
- T(i, r);
420
+ let r = e.evaluate("xfrm", t);
421
+ if (r) {
422
+ E(r, n);
417
423
  let t = {
418
424
  x: 0,
419
425
  y: 0,
420
426
  width: 0,
421
427
  height: 0
422
- }, a = e.evaluate("off", i);
423
- a && (t.x = n(a.getAttribute("x")) ?? 0, t.y = n(a.getAttribute("y")) ?? 0);
424
- let o = e.evaluate("ext", i);
425
- a && (t.width = n(o.getAttribute("cx")) ?? 0, t.height = n(o.getAttribute("cy")) ?? 0), r.bounds = t;
428
+ }, i = e.evaluate("off", r);
429
+ i && (t.x = d(i.getAttribute("x")) ?? 0, t.y = d(i.getAttribute("y")) ?? 0);
430
+ let a = e.evaluate("ext", r);
431
+ i && (t.width = d(a.getAttribute("cx")) ?? 0, t.height = d(a.getAttribute("cy")) ?? 0), n.bounds = t;
426
432
  }
427
- let a = e.evaluate("prstGeom", t);
428
- a?.hasAttribute("prst") ? r.geometry = a?.getAttribute("prst") : e.evaluate("customGeom", t) && console.warn("customGeom not supported yet");
429
- let o = this.getFill(e, t);
430
- o && Object.keys(o).length > 0 && (r.fill = o);
431
- let s = this.getStroke(e, t);
432
- return s && Object.keys(s).length > 0 && (r.stroke = s), r;
433
- } catch (e) {
434
- console.warn(e);
433
+ let i = e.evaluate("prstGeom", t);
434
+ i?.hasAttribute("prst") ? n.geometry = i?.getAttribute("prst") : e.evaluate("customGeom", t) && e.warn("Custom shape geometry is not supported; the shape keeps its bounds only.", { onceKey: "xlsx.shape.customGeometry" });
435
+ let a = this.getFill(e, t);
436
+ a && Object.keys(a).length > 0 && (n.fill = a);
437
+ let o = this.getStroke(e, t);
438
+ return o && Object.keys(o).length > 0 && (n.stroke = o), n;
439
+ } catch (t) {
440
+ e.warn(`Unable to read shape properties: ${t?.message ?? t}`, { onceKey: "xlsx.shape.unreadable" });
435
441
  }
436
442
  }
437
- }, I = class {
443
+ }, L = class {
438
444
  visit(e, t, n) {
439
445
  let r = {};
440
- if (E(e, t, r, "grouping", "grouping"), D(e, t, r, "varyColors", "varyColors"), k(e, t, r, "gapWidth", "gapWidth", .01), k(e, t, r, "overlap", "overlap", .01), this.parseType(e, t, r), O(e, t, r, "bubbleScale", "bubbleScale"), D(e, t, r, "showNegBubbles", "showNegativeBubbleValues"), D(e, t, r, "sizeRepresents", "bubbleSizeRepresentsWidth"), O(e, t, r, "firstSliceAng", "startAngle"), O(e, t, r, "holeSize", "holeSize"), E(e, t, r, "scatterStyle", "scatterStyle"), this.parseAxisIds(e, t, r), Object.keys(r).length > 0) {
446
+ if (D(e, t, r, "grouping", "grouping"), O(e, t, r, "varyColors", "varyColors"), A(e, t, r, "gapWidth", "gapWidth", .01), A(e, t, r, "overlap", "overlap", .01), this.parseType(e, t, r), k(e, t, r, "bubbleScale", "bubbleScale"), O(e, t, r, "showNegBubbles", "showNegativeBubbleValues"), O(e, t, r, "sizeRepresents", "bubbleSizeRepresentsWidth"), k(e, t, r, "firstSliceAng", "startAngle"), k(e, t, r, "holeSize", "holeSize"), D(e, t, r, "scatterStyle", "scatterStyle"), this.parseAxisIds(e, t, r), Object.keys(r).length > 0) {
441
447
  let t = e.getVisitorParamsState().get("types");
442
- t || (console.warn("Uninitialized types array in ChartTypeVisitor"), t = [], e.getVisitorParamsState().set("types", t)), t.push(r);
448
+ t || (e.warn("A chart type was read outside a chart; its types were started fresh.", { onceKey: "xlsx.chart.typesState" }), t = [], e.getVisitorParamsState().set("types", t)), t.push(r);
443
449
  }
444
450
  return r;
445
451
  }
@@ -466,7 +472,7 @@ var te = class {
466
472
  let r = e.evaluate("axId", t);
467
473
  r && r.length !== 0 && (n.xAxisId = r.item(0).getAttribute("val"), n.yAxisId = r.item(1).getAttribute("val"));
468
474
  }
469
- }, L = (e, t, n) => {
475
+ }, R = (e, t, n) => {
470
476
  if (!0 === e.getValAttrAsBoolean("invertIfNegative", t)) if (e.evaluate("extLst/ext/invertSolidFillFmt", t)) {
471
477
  if (n.fill && n.fillNegative) {
472
478
  let t = e.getFromPath(n, "fill.solid.adjs");
@@ -480,7 +486,7 @@ var te = class {
480
486
  let a = {};
481
487
  a.fill = i, n.strokeNegative = a;
482
488
  }
483
- }, R = class extends P {
489
+ }, z = class extends F {
484
490
  constructor(e = "text") {
485
491
  super(), this._jsonKey = e;
486
492
  }
@@ -492,17 +498,17 @@ var te = class {
492
498
  return r ||= {}, this.parseTextElement(e, t, r, !1), Object.keys(r).length > 0 && e.setToPath(n, this.getTextPath(), r), n;
493
499
  }
494
500
  parseTextElement(e, t, n, r) {
495
- let i = e.evaluate("p/pPr/defRPr", t) ?? e.evaluate("defRPr", t);
496
- i && (this.parseTextProperties(e, i, n), new F().visit(e, i, n));
497
- let a = n.runs ?? [], o = e.evaluate("p/r", t) ?? e.evaluate("r", t), s = (t) => {
501
+ let i = e.evaluate("p/pPr/defRPr", t) ?? e.evaluate("defRPr", t), a = i?.length === void 0 ? i : i.item(0);
502
+ a && (this.parseTextProperties(e, a, n), new I().visit(e, a, n));
503
+ let o = n.runs ?? [], s = e.evaluate("p/r", t) ?? e.evaluate("r", t), c = (t) => {
498
504
  let n = {}, r = e.evaluate("t", t), i = e.evaluate("rPr", t);
499
- i && this.parseTextProperties(e, i, n), r && r.firstChild ? n.text = r.firstChild.textContent ?? "" : t.textContent && (n.text = t.textContent ?? ""), Object.keys(n).length > 0 && a.push(n);
505
+ i && this.parseTextProperties(e, i, n), r && r.firstChild ? n.text = r.firstChild.textContent ?? "" : t.textContent && (n.text = t.textContent ?? ""), Object.keys(n).length > 0 && o.push(n);
500
506
  };
501
- if (o?.length !== void 0) for (let e = 0; o && e < o.length; e++) s(o.item(e));
502
- else s(o || t);
503
- a.length > 0 && (n.runs = a);
504
- let c = e.evaluate("bodyPr", t);
505
- c && T(c, n);
507
+ if (s?.length !== void 0) for (let e = 0; s && e < s.length; e++) c(s.item(e));
508
+ else c(s || t);
509
+ o.length > 0 && (n.runs = o);
510
+ let l = e.evaluate("bodyPr", t);
511
+ l && E(l, n);
506
512
  }
507
513
  parseTextProperties(e, t, n) {
508
514
  if (!t) return;
@@ -514,17 +520,17 @@ var te = class {
514
520
  let e = n.font ?? {};
515
521
  if (i.hasAttribute("typeface") && (e.family = i.getAttribute("typeface")), i.hasAttribute("panose")) {
516
522
  let t = i.getAttribute("panose");
517
- t && (e.fallbacks = [v.getPanoseFallback(t)]);
523
+ t && (e.fallbacks = [b.getPanoseFallback(t)]);
518
524
  }
519
525
  i.hasAttribute("pitchFamily") && (e.pitch = i.getAttribute("pitchFamily")), i.hasAttribute("charset") && (e.charset = i.getAttribute("charset")), Object.keys(e).length > 0 && (n.font = e);
520
526
  }
521
527
  }
522
- }, z = class {
528
+ }, B = class {
523
529
  visit(e, t, n) {}
524
- processDataBarColor(e, t, n, i, a = "auto") {
530
+ processDataBarColor(e, t, n, r, i = "auto") {
525
531
  if (!t) return;
526
- let o = r((e) => t.getAttribute(e), a);
527
- return o && (n[i] = o), n;
532
+ let a = l((e) => t.getAttribute(e), i);
533
+ return a && (n[r] = a), n;
528
534
  }
529
535
  processFonts(e, t, n) {
530
536
  if (!t) return;
@@ -539,11 +545,11 @@ var te = class {
539
545
  return n;
540
546
  }
541
547
  processFont(e, t, n) {
542
- e.getValAttrAsBoolean("b", t, !0) && (n.weight = 700), e.getValAttrAsBoolean("i", t, !0) && (n.style = v.Style.Italic), e.getValAttrAsBoolean("strike", t, !0) && (n.strike = !0);
548
+ e.getValAttrAsBoolean("b", t, !0) && (n.weight = 700), e.getValAttrAsBoolean("i", t, !0) && (n.style = b.Style.Italic), e.getValAttrAsBoolean("strike", t, !0) && (n.strike = !0);
543
549
  let r = e.evaluate("u", t);
544
- r && (n.underline = r.getAttribute("val") || v.UnderlineStyle.Single), E(e, t, n, "vertAlign", "verticalAlign"), n.verticalAlign === "superscript" ? n.verticalAlign = v.VerticalAlignment.Super : n.verticalAlign === "subscript" && (n.verticalAlign = v.VerticalAlignment.Sub), k(e, t, n, "sz", "size");
550
+ r && (n.underline = r.getAttribute("val") || b.UnderlineStyle.Single), D(e, t, n, "vertAlign", "verticalAlign"), n.verticalAlign === "superscript" ? n.verticalAlign = b.VerticalAlignment.Super : n.verticalAlign === "subscript" && (n.verticalAlign = b.VerticalAlignment.Sub), A(e, t, n, "sz", "size");
545
551
  let i = e.evaluate("color", t);
546
- this.processDataBarColor(e, i, n, "color"), n.color ||= "auto", E(e, t, n, "name", "family"), E(e, t, n, "rFont", "family");
552
+ this.processDataBarColor(e, i, n, "color"), n.color ||= "auto", D(e, t, n, "name", "family"), D(e, t, n, "rFont", "family");
547
553
  let a = e.evaluate("family", t);
548
554
  if (a) {
549
555
  let e = a.getAttribute("val");
@@ -563,7 +569,7 @@ var te = class {
563
569
  case "5": n.fallbacks = ["fantasy"];
564
570
  }
565
571
  }
566
- return E(e, t, n, "scheme", "scheme"), D(e, t, n, "shadow", "shadow", !0), D(e, t, n, "outline", "outline", !0), e.getValAttrAsBoolean("condense", t, !0) && (n.letterSpacing = -1), e.getValAttrAsBoolean("extend", t, !0) && (n.letterSpacing = 1), O(e, t, n, "charset", "charset"), n;
572
+ return D(e, t, n, "scheme", "scheme"), n.family !== void 0 && n.scheme === void 0 && (n.scheme = b.Scheme.None), O(e, t, n, "shadow", "shadow", !0), O(e, t, n, "outline", "outline", !0), e.getValAttrAsBoolean("condense", t, !0) && (n.letterSpacing = -1), e.getValAttrAsBoolean("extend", t, !0) && (n.letterSpacing = 1), k(e, t, n, "charset", "charset"), n;
567
573
  }
568
574
  processFills(e, t, n) {
569
575
  if (!t) return;
@@ -575,7 +581,7 @@ var te = class {
575
581
  return n;
576
582
  }
577
583
  processFill(e, t, n, r) {
578
- let i = { type: _.Type.None }, a = t.childNodes, o = !1, s = a.length;
584
+ let i = { type: y.Type.None }, a = t.childNodes, o = !1, s = a.length;
579
585
  for (let t = 0; !o && t < s; t++) {
580
586
  let n = a.item(t);
581
587
  n.nodeType === 1 && (n.localName === "gradientFill" ? (this.processGradientFill(e, n, i), o = !0) : n.localName === "patternFill" && (this.processPatternFill(e, n, i), o = !0));
@@ -584,17 +590,17 @@ var te = class {
584
590
  }
585
591
  processGradientFill(e, t, n) {
586
592
  if (!t) return;
587
- n.type = _.Type.Gradient;
593
+ n.type = y.Type.Gradient;
588
594
  let r = [];
589
595
  n.stops = r;
590
596
  let i = t.getAttribute("type");
591
597
  i && (n.gradientType = i);
592
598
  let a = t.hasAttribute("degree") ? parseFloat(t.getAttribute("degree")) : 0;
593
599
  (a + 90) % 360 != 0 && (n.angle = (a + 90) % 360), (t.hasAttribute("left") || t.hasAttribute("top") || t.hasAttribute("right") || t.hasAttribute("bottom")) && (n.focus = {
594
- left: B(t.getAttribute("left")),
595
- top: B(t.getAttribute("top")),
596
- right: B(t.getAttribute("right")),
597
- bottom: B(t.getAttribute("bottom"))
600
+ left: V(t.getAttribute("left")),
601
+ top: V(t.getAttribute("top")),
602
+ right: V(t.getAttribute("right")),
603
+ bottom: V(t.getAttribute("bottom"))
598
604
  });
599
605
  let o = t.childNodes, s = o.length;
600
606
  for (let t = 0; t < s; t++) {
@@ -610,10 +616,10 @@ var te = class {
610
616
  }
611
617
  processPatternFill(e, t, n) {
612
618
  if (!t) return;
613
- let r = e.getVisitorParamsState().get("processingDXFs"), i = t.getAttribute("patternType") || (r ? _.BuiltInSheetPattern.Solid : _.BuiltInSheetPattern.None);
614
- if (i === _.BuiltInSheetPattern.None) return { none: !0 };
615
- n.type = _.Type.Pattern, i && (n.patternType = i);
616
- let a = "foreground", o = "background", s = n.patternType === _.BuiltInSheetPattern.Solid && r, c = s ? "dk1" : "lt1", l = s ? "lt1" : "dk1";
619
+ let r = e.getVisitorParamsState().get("processingDXFs"), i = t.getAttribute("patternType") || (r ? y.BuiltInSheetPattern.Solid : y.BuiltInSheetPattern.None);
620
+ if (i === y.BuiltInSheetPattern.None) return { none: !0 };
621
+ n.type = y.Type.Pattern, i && (n.patternType = i);
622
+ let a = "foreground", o = "background", s = n.patternType === y.BuiltInSheetPattern.Solid && r, c = s ? "dk1" : "lt1", l = s ? "lt1" : "dk1";
617
623
  if (s) {
618
624
  let e = a;
619
625
  a = o, o = e;
@@ -635,35 +641,38 @@ var te = class {
635
641
  processBorder(e, t, n, r, i) {
636
642
  if (!t) return;
637
643
  let a = {};
638
- return this.processBorderStroke(e, t, a, m.Edge.Left), this.processBorderStroke(e, t, a, m.Edge.Right), i ? (a.right || a.left) && (a.right ? a.vertical = { ...a.right } : a.vertical = { ...a.left }) : this.processBorderStroke(e, t, a, m.Edge.Vertical), this.processBorderStroke(e, t, a, m.Edge.Top), this.processBorderStroke(e, t, a, m.Edge.Bottom), i ? (a.bottom || a.top) && (a.bottom ? a.horizontal = { ...a.bottom } : a.horizontal = { ...a.top }) : this.processBorderStroke(e, t, a, m.Edge.Horizontal), n[r] = a, n;
644
+ return this.processBorderStroke(e, t, a, g.Edge.Left), this.processBorderStroke(e, t, a, g.Edge.Right), i ? (a.right || a.left) && (a.right ? a.vertical = { ...a.right } : a.vertical = { ...a.left }) : this.processBorderStroke(e, t, a, g.Edge.Vertical), this.processBorderStroke(e, t, a, g.Edge.Top), this.processBorderStroke(e, t, a, g.Edge.Bottom), i ? (a.bottom || a.top) && (a.bottom ? a.horizontal = { ...a.bottom } : a.horizontal = { ...a.top }) : this.processBorderStroke(e, t, a, g.Edge.Horizontal), n[r] = a, n;
639
645
  }
640
646
  processBorderStroke(e, t, n, r) {
641
647
  if (!t) return;
642
648
  let i = e.evaluate(r, t);
643
649
  if (!i) return;
644
650
  let a = {};
645
- i.hasAttribute("style") ? a.style = i.getAttribute("style") : e.getVisitorParamsState().get("processingDXFs") && (a.style = m.StrokeStyle.None);
651
+ i.hasAttribute("style") ? a.style = i.getAttribute("style") : e.getVisitorParamsState().get("processingDXFs") && (a.style = g.StrokeStyle.None);
646
652
  let o = e.evaluate("color", i);
647
653
  return o && this.processDataBarColor(e, o, a, "color"), Object.keys(a).length > 0 ? n[r] = a : null;
648
654
  }
649
- }, B = (e) => {
655
+ }, V = (e) => {
650
656
  if (!e) return 0;
651
657
  let t = parseFloat(e);
652
658
  return isNaN(t) ? 0 : t;
653
- }, ce = {
659
+ }, le = {
654
660
  auto: "auto",
655
661
  autoNoTable: "automaticExceptTables",
656
662
  manual: "manual"
657
- }, V = class {
663
+ }, H = class {
658
664
  visit(e, t, n) {
659
665
  if (!t) return;
660
666
  let r = e.evaluate("*/cNvPr", t);
661
667
  return r.item && (r = r.item(0)), r && (e.copyFromAttribute(r, "name", n), e.copyFromAttribute(r, "descr", n, "description"), e.copyFromAttribute(r, "hidden", n, "hidden", e.BOOLEAN_COPY), e.copyFromAttribute(r, "id", n)), n;
662
668
  }
663
- }, H = class extends V {
669
+ }, U = class extends H {
664
670
  visit(e, t, n) {
665
671
  if (!t) return;
666
- if (e.getPath().includes("Fallback") && n.content) return n;
672
+ if (e.getPath().includes("Fallback") && n.content) {
673
+ let r = n.content.json;
674
+ return n.content.type === "sp" && r?.xml && r.fallbackXml === void 0 && (r.fallbackXml = e.serializeElement(t) ?? void 0), n;
675
+ }
667
676
  n = super.visit(e, t, n);
668
677
  let r = e.evaluate("nvSpPr/cNvSpPr", t);
669
678
  if (r) {
@@ -674,7 +683,6 @@ var te = class {
674
683
  Object.keys(e).length > 0 && (n.locks = e);
675
684
  }
676
685
  }
677
- e.warn(`'${n.name}' is not editable; imported as a fixed drawing.`);
678
686
  let i = e.evaluate("*/cNvPr", t);
679
687
  i?.item && (i = i.item(0));
680
688
  let a = i?.getAttribute?.("id"), o = a ? parseInt(a, 10) : void 0, s = {
@@ -687,7 +695,37 @@ var te = class {
687
695
  json: s
688
696
  }, s;
689
697
  }
690
- }, U = "richTypes", W = "richData", G = class {
698
+ }, W = "richTypes", G = "richData";
699
+ function ue(e, t) {
700
+ let n = e.childNodes;
701
+ for (let e = 0; e < n.length; e++) {
702
+ let r = n.item(e);
703
+ if (r.nodeType === 1) switch (r.localName) {
704
+ case "b":
705
+ t.bold = r.getAttribute("val") !== "0" && r.getAttribute("val") !== "false";
706
+ break;
707
+ case "i":
708
+ t.italic = r.getAttribute("val") !== "0" && r.getAttribute("val") !== "false";
709
+ break;
710
+ case "sz": {
711
+ let e = parseFloat(r.getAttribute("val") ?? "");
712
+ isNaN(e) || (t.size = e);
713
+ break;
714
+ }
715
+ case "rFont": {
716
+ let e = r.getAttribute("val");
717
+ e && (t.font = e);
718
+ break;
719
+ }
720
+ case "color": {
721
+ let e = r.getAttribute("rgb");
722
+ e && (t.color = "#" + (e.length === 8 ? e.substring(2) : e));
723
+ break;
724
+ }
725
+ }
726
+ }
727
+ }
728
+ var de = class {
691
729
  visit(e, t, n) {
692
730
  if (!t) return;
693
731
  let r = t.childNodes, i = r.length;
@@ -701,7 +739,7 @@ var te = class {
701
739
  let r = {};
702
740
  e.copyFromAttribute(t, "Target", r, "target"), e.copyFromAttribute(t, "Type", r, "type"), e.copyFromAttribute(t, "TargetMode", r, "targetMode"), n[t.getAttribute("Id")] = r;
703
741
  }
704
- }, le = class {
742
+ }, fe = class {
705
743
  visit(e, t, n) {
706
744
  let r = [], i = t.childNodes, a = i.length;
707
745
  for (let t = 0; t < a; t++) {
@@ -718,7 +756,7 @@ var te = class {
718
756
  value: t.textContent || ""
719
757
  };
720
758
  }
721
- }, ue = class {
759
+ }, pe = class {
722
760
  visit(e, t, n) {
723
761
  let r = [], i = t.childNodes, a = i.length;
724
762
  for (let t = 0; t < a; t++) {
@@ -735,9 +773,9 @@ var te = class {
735
773
  value: t.textContent || ""
736
774
  };
737
775
  }
738
- }, de = class {
776
+ }, me = class {
739
777
  visit(e, t, n) {
740
- return D(e, t, n, "roundedCorners", "roundedCorners"), O(e, t, n, ".//AlternateContent/Fallback/style", "styleId"), e.getVisitorParamsState().set("types", []), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), n.range = null, n;
778
+ return O(e, t, n, "roundedCorners", "roundedCorners"), k(e, t, n, ".//AlternateContent/Fallback/style", "styleId"), e.getVisitorParamsState().set("types", []), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), n.range = null, n;
741
779
  }
742
780
  afterVisit(e, t, n) {
743
781
  let r = {};
@@ -764,17 +802,17 @@ var te = class {
764
802
  for (let e = 0; e < p; e++) f[e + ""] = d[e];
765
803
  f.length = p, e.getVisitorParamsState().delete("types"), e.getVisitorParamsState().delete("axes"), e.getVisitorParamsState().delete("series");
766
804
  }
767
- }, fe = class {
805
+ }, he = class {
768
806
  visit(e, t, n) {
769
807
  let r = {};
770
808
  return n.plotArea = r, r;
771
809
  }
772
- }, pe = F, me = class extends I {
810
+ }, ge = I, _e = class extends L {
773
811
  parseType(e, t, n) {
774
812
  let r = e.getValAttrAsString("barDir", t);
775
813
  r && (n.type = r === "col" ? "column" : "bar");
776
814
  }
777
- }, K = I, q = class {
815
+ }, K = L, q = class {
778
816
  constructor(e) {
779
817
  this.jsonKey = e;
780
818
  }
@@ -782,18 +820,18 @@ var te = class {
782
820
  let r = {}, i = r, a = e.getValAttrAsString("idx", t);
783
821
  a !== null && (i = {}, i[a] = r);
784
822
  let o = e.getValAttrAsBoolean("delete", t);
785
- this.parseNumFormat(e, t, r), !0 === o ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (D(e, t, r, "showBubbleSize", "showBubbleSize"), D(e, t, r, "showCatName", "showCatName"), D(e, t, r, "showLeaderLines", "showLeaderLines"), D(e, t, r, "showPercent", "showPercentage"), D(e, t, r, "showSerName", "showSerName"), D(e, t, r, "showVal", "showVal"), D(e, t, r, "showLegendKey", "showLegendKey"));
823
+ this.parseNumFormat(e, t, r), !0 === o ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (O(e, t, r, "showBubbleSize", "showBubbleSize"), O(e, t, r, "showCatName", "showCatName"), O(e, t, r, "showLeaderLines", "showLeaderLines"), O(e, t, r, "showPercent", "showPercentage"), O(e, t, r, "showSerName", "showSerName"), O(e, t, r, "showVal", "showVal"), O(e, t, r, "showLegendKey", "showLegendKey"));
786
824
  let s = e.evaluate("separator", t);
787
- return s !== null && (r.separator = s.textContent), E(e, t, r, "dLblPos", "position"), n[this.jsonKey] = i, r;
825
+ return s !== null && (r.separator = s.textContent), D(e, t, r, "dLblPos", "position"), n[this.jsonKey] = i, r;
788
826
  }
789
827
  parseNumFormat(e, t, n) {
790
828
  let r = e.evaluate("numFmt", t);
791
829
  r && (n.formatCode = r.getAttribute("formatCode"), r.hasAttribute("sourceLinked") && (n.sourceLinked = r.getAttribute("sourceLinked") === "1"));
792
830
  }
793
- }, he = class {
831
+ }, ve = class {
794
832
  visit(e, t, n) {
795
833
  let r = {};
796
- O(e, t, r, "explosion", "explosion");
834
+ k(e, t, r, "explosion", "explosion");
797
835
  let i = e.evaluate("cat/*/f", t);
798
836
  i ||= e.evaluate("xVal/*/f", t);
799
837
  let a = null;
@@ -801,7 +839,7 @@ var te = class {
801
839
  let o = e.evaluate("val/*/f", t);
802
840
  o ||= e.evaluate("yVal/*/f", t);
803
841
  let s = null;
804
- o && o.firstChild && (s = o.firstChild.nodeValue), o || (o = e.evaluate("val/numLit", t), o !== null && (s = this.parsePointsAsString(e, o))), s !== null && (r.valRange = s), this.parseTitleRangeOrValue(e, t, r), O(e, t, r, "idx", "idx"), D(e, t, r, "smooth", "smooth"), r.offsetChart = e.getVisitorParamsState().get("types").length - 1;
842
+ o && o.firstChild && (s = o.firstChild.nodeValue), o || (o = e.evaluate("val/numLit", t), o !== null && (s = this.parsePointsAsString(e, o))), s !== null && (r.valRange = s), this.parseTitleRangeOrValue(e, t, r), k(e, t, r, "idx", "idx"), O(e, t, r, "smooth", "smooth"), r.offsetChart = e.getVisitorParamsState().get("types").length - 1;
805
843
  let c = e.getVisitorParamsState().get("series");
806
844
  return c || (c = [], e.getVisitorParamsState().set("series", c)), c.push(r), r;
807
845
  }
@@ -825,7 +863,7 @@ var te = class {
825
863
  return n += "}", n;
826
864
  }
827
865
  afterVisit(e, t, n) {
828
- L(e, t, n);
866
+ R(e, t, n);
829
867
  let r = e.getFromPath(n, "points");
830
868
  if (r) {
831
869
  let t = Object.keys(r);
@@ -837,15 +875,15 @@ var te = class {
837
875
  }
838
876
  }
839
877
  }
840
- }, ge = class {
878
+ }, ye = class {
841
879
  DataPointVisitor() {}
842
880
  visit(e, t, n) {
843
881
  let r = e.getFromPath(n, "points"), i = null;
844
882
  r ? i = r : (i = {}, e.setToPath(n, "points", i));
845
883
  let a = {}, o = e.getValAttrAsString("idx", t);
846
- return o !== null && (i[o] = a), D(e, t, a, "bubble3D", "bubble3D"), O(e, t, a, "explosion", "explosion"), L(e, t, a), a;
884
+ return o !== null && (i[o] = a), O(e, t, a, "bubble3D", "bubble3D"), k(e, t, a, "explosion", "explosion"), R(e, t, a), a;
847
885
  }
848
- }, _e = class {
886
+ }, be = class {
849
887
  visit(e, t, n) {
850
888
  let r = t.parentNode.localName;
851
889
  if (r === "ser" || r === "dPt") {
@@ -859,9 +897,9 @@ var te = class {
859
897
  }, J = class {
860
898
  visit(e, t, n) {
861
899
  let r = {};
862
- this.parseScaling(e, t, r), k(e, t, r, "majorUnit", "majorUnits"), k(e, t, r, "minorUnit", "minorUnits"), D(e, t, r, "delete", "shown"), this.parseOrientation(e, t, r), this.parseNumFormat(e, t, r), E(e, t, r, "majorTickMark", "majorTickMarks"), E(e, t, r, "minorTickMark", "minorTickMarks"), E(e, t, r, "crosses", "crosses"), k(e, t, r, "crossesAt", "crosses"), E(e, t, r, "crossBetween", "crossBetween"), this.parseLabelAlign(e, t, r), O(e, t, r, "lblOffset", "labelOffset"), E(e, t, r, "tickLblPos", "labelPosition");
900
+ this.parseScaling(e, t, r), A(e, t, r, "majorUnit", "majorUnits"), A(e, t, r, "minorUnit", "minorUnits"), O(e, t, r, "delete", "shown"), this.parseOrientation(e, t, r), this.parseNumFormat(e, t, r), D(e, t, r, "majorTickMark", "majorTickMarks"), D(e, t, r, "minorTickMark", "minorTickMarks"), D(e, t, r, "crosses", "crosses"), A(e, t, r, "crossesAt", "crosses"), D(e, t, r, "crossBetween", "crossBetween"), this.parseLabelAlign(e, t, r), k(e, t, r, "lblOffset", "labelOffset"), D(e, t, r, "tickLblPos", "labelPosition");
863
901
  let i = e.getValAttrAsInteger("noMultiLvlLbl", t);
864
- r.labelMultiLevel = i !== null && i === 0, O(e, t, r, "tickMarkSkip", "tickMarkSkip"), O(e, t, r, "tickLblSkip", "labelInterval"), this.parseDisplayCustOrBuiltInUnit(t, e, r), this.parseTimeUnits(e, t, r, "majorUnitDates", "majorTimeUnit", "majorUnit"), this.parseTimeUnits(e, t, r, "minorUnitDates", "minorTimeUnit", "minorUnit"), E(e, t, r, "baseTimeUnit", "baseUnitDates"), e.getVisitorParamsState().get("axes") || (console.warn("Uninitialized axes map in AxisVisitor"), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()));
902
+ r.labelMultiLevel = i !== null && i === 0, k(e, t, r, "tickMarkSkip", "tickMarkSkip"), k(e, t, r, "tickLblSkip", "labelInterval"), this.parseDisplayCustOrBuiltInUnit(t, e, r), this.parseTimeUnits(e, t, r, "majorUnitDates", "majorTimeUnit", "majorUnit"), this.parseTimeUnits(e, t, r, "minorUnitDates", "minorTimeUnit", "minorUnit"), D(e, t, r, "baseTimeUnit", "baseUnitDates"), e.getVisitorParamsState().get("axes") || (e.warn("An axis was read outside a chart; its axes were started fresh.", { onceKey: "xlsx.chart.axesState" }), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()));
865
903
  let a = e.getValAttrAsString("axId", t);
866
904
  return e.getVisitorParamsState().get("axes").set(a, r), r;
867
905
  }
@@ -889,7 +927,7 @@ var te = class {
889
927
  let r = e.getValAttrAsString("scaling/orientation", t);
890
928
  r !== null && (n.inverted = r !== "minMax");
891
929
  let i = e.getValAttrAsFloat("scaling/logBase", t);
892
- i !== null && (n.logBase = i, n.scaleType = "log"), k(e, t, n, "scaling/max", "max"), k(e, t, n, "scaling/min", "min");
930
+ i !== null && (n.logBase = i, n.scaleType = "log"), A(e, t, n, "scaling/max", "max"), A(e, t, n, "scaling/min", "min");
893
931
  }
894
932
  afterVisit(e, t, n) {
895
933
  n.fill && n.labels && (n.labels.fill = n.fill, delete n.fill);
@@ -904,7 +942,7 @@ var te = class {
904
942
  let s = e.evaluate("majorGridlines", t);
905
943
  e.setToPath(n, "gridLinesMajor.shown", s !== null);
906
944
  }
907
- }, Y = R, ve = class {
945
+ }, Y = z, xe = class {
908
946
  visit(e, t, n) {
909
947
  let r = e.getVisitorParamsState().get("series"), i = e.getValAttrAsInteger("idx", t), a = i === null ? void 0 : r[i];
910
948
  if (a) {
@@ -915,19 +953,19 @@ var te = class {
915
953
  }
916
954
  return n;
917
955
  }
918
- }, ye = class {
956
+ }, Se = class {
919
957
  visit(e, t, n) {
920
958
  let r = {};
921
- return D(e, t, r, "overlay", "overlay"), E(e, t, r, "legendPos", "position"), n.legend = r, r;
959
+ return O(e, t, r, "overlay", "overlay"), D(e, t, r, "legendPos", "position"), n.legend = r, r;
922
960
  }
923
- }, be = class extends F {
961
+ }, Ce = class extends I {
924
962
  visit(e, t, n) {
925
963
  let r = this.getFill(e, t);
926
964
  Object.keys(r).length > 0 && (n.fillNegative = r);
927
965
  let i = this.getStroke(e, t);
928
966
  return Object.keys(i).length > 0 && (n.strokeNegative = i), n;
929
967
  }
930
- }, X = class extends R {
968
+ }, X = class extends z {
931
969
  constructor(e = "title") {
932
970
  super(e);
933
971
  }
@@ -940,7 +978,7 @@ var te = class {
940
978
  }
941
979
  visit(e, t, n) {
942
980
  let r = {};
943
- D(e, t, r, "overlay", "overlay"), n[this._jsonKey] = r;
981
+ O(e, t, r, "overlay", "overlay"), n[this._jsonKey] = r;
944
982
  let i = e.getFromPath(r, this.getTextPath());
945
983
  i ||= {}, this.parseTitleRangeOrValue(e, t, r);
946
984
  let a = e.evaluate("txPr", t);
@@ -954,20 +992,20 @@ var te = class {
954
992
  e !== null && (n.rotation = parseInt(e), delete n.title.rotation);
955
993
  }
956
994
  }
957
- }, xe = class {
995
+ }, we = class {
958
996
  visit(e, t, n) {
959
997
  let r = e.evaluate("manualLayout", t);
960
998
  if (r) {
961
999
  let t = {};
962
- k(e, r, t, "x", "x"), k(e, r, t, "y", "y"), k(e, r, t, "w", "w"), k(e, r, t, "h", "h"), E(e, r, t, "xMode", "xMode"), E(e, r, t, "yMode", "yMode"), E(e, r, t, "wMode", "wMode"), E(e, r, t, "hMode", "hMode"), Object.keys(t).length > 0 && (n.manualLayout = t);
1000
+ A(e, r, t, "x", "x"), A(e, r, t, "y", "y"), A(e, r, t, "w", "w"), A(e, r, t, "h", "h"), D(e, r, t, "xMode", "xMode"), D(e, r, t, "yMode", "yMode"), D(e, r, t, "wMode", "wMode"), D(e, r, t, "hMode", "hMode"), Object.keys(t).length > 0 && (n.manualLayout = t);
963
1001
  }
964
1002
  return n;
965
1003
  }
966
- }, Se = class {
1004
+ }, Te = class {
967
1005
  visit(e, t, n) {
968
1006
  return n.name = t.getAttribute("name"), n;
969
1007
  }
970
- }, Ce = class extends P {
1008
+ }, Ee = class extends F {
971
1009
  visit(e, t, n) {
972
1010
  let r = {};
973
1011
  r.name = t.getAttribute("name");
@@ -981,7 +1019,7 @@ var te = class {
981
1019
  }
982
1020
  return Object.keys(r).length > 0 && (n.colors = r), r;
983
1021
  }
984
- }, we = class {
1022
+ }, De = class {
985
1023
  visit(e, t, n) {
986
1024
  let r = {};
987
1025
  r.name = t.getAttribute("name");
@@ -997,9 +1035,9 @@ var te = class {
997
1035
  let i = r.getAttribute("typeface");
998
1036
  i && (n.family = i);
999
1037
  let a = r.getAttribute("panose");
1000
- return a && (n.fallbacks = [v.getPanoseFallback(a)]), n;
1038
+ return a && (n.fallbacks = [b.getPanoseFallback(a)]), n;
1001
1039
  }
1002
- }, Te = class extends P {
1040
+ }, Oe = class extends F {
1003
1041
  visit(e, t, n) {
1004
1042
  let r = this.parseFillList(e, t, "fillStyleLst"), i = this.parseLnList(e, t, "lnStyleLst"), a = this.parseEffectStyleList(e, t, "effectStyleLst"), o = this.parseFillList(e, t, "bgFillStyleLst");
1005
1043
  if (r && i && a && o) return n.fillStyleLst = r, n.lnStyleLst = i, n.effectStyleLst = a, void (n.bgFillStyleLst = o);
@@ -1021,11 +1059,11 @@ var te = class {
1021
1059
  }
1022
1060
  parseFillListItem(e, t) {
1023
1061
  switch (t.localName) {
1024
- case "noFill": return { type: _.Type.None };
1062
+ case "noFill": return { type: y.Type.None };
1025
1063
  case "solidFill": {
1026
1064
  let n = this.processAdjColor(e, t);
1027
1065
  return n ? {
1028
- type: _.Type.Solid,
1066
+ type: y.Type.Solid,
1029
1067
  color: n
1030
1068
  } : void 0;
1031
1069
  }
@@ -1061,7 +1099,7 @@ var te = class {
1061
1099
  }
1062
1100
  return i;
1063
1101
  }
1064
- }, Ee = class {
1102
+ }, ke = class {
1065
1103
  visit(e, t, n) {
1066
1104
  if (!t) return;
1067
1105
  let r = {}, i = t.getAttribute("r:id");
@@ -1071,7 +1109,7 @@ var te = class {
1071
1109
  }
1072
1110
  return e.copyFromAttribute(t, "tooltip", r, "screenTip"), e.copyFromAttribute(t, "history", r, "history", e.BOOLEAN_COPY), e.copyFromAttribute(t, "tgtFrame", r, "target"), n.hyperlink = r, r;
1073
1111
  }
1074
- }, De = class {
1112
+ }, Ae = class {
1075
1113
  visit(e, t, n) {
1076
1114
  if (!t) return;
1077
1115
  let r = {}, i = [];
@@ -1079,22 +1117,22 @@ var te = class {
1079
1117
  }
1080
1118
  processColorFilter(e, t) {
1081
1119
  let n = {}, r = {
1082
- operator: h.BuiltInOperatorNames.Color,
1120
+ operator: _.BuiltInOperatorNames.Color,
1083
1121
  param: n
1084
1122
  };
1085
1123
  return e.copyFromAttribute(t, "cellColor", n, "cellColor", e.BOOLEAN_COPY), e.copyFromAttribute(t, "dxfId", n, "styleId", e.INT_COPY), r;
1086
1124
  }
1087
- processCustomFilter(e, n) {
1088
- return t({
1089
- operator: n.getAttribute("operator"),
1090
- val: n.getAttribute("val")
1125
+ processCustomFilter(e, t) {
1126
+ return n({
1127
+ operator: t.getAttribute("operator"),
1128
+ val: t.getAttribute("val")
1091
1129
  });
1092
1130
  }
1093
1131
  processCustomFilters(e, t) {
1094
1132
  let n = t.getAttribute("and"), r = n === "and" || n === "1";
1095
1133
  t.getAttribute("val");
1096
1134
  let i = [], a = {
1097
- operator: r ? h.BuiltInOperatorNames.And : h.BuiltInOperatorNames.Or,
1135
+ operator: r ? _.BuiltInOperatorNames.And : _.BuiltInOperatorNames.Or,
1098
1136
  param: i
1099
1137
  }, o = t.childNodes, s = o.length;
1100
1138
  for (let t = 0; t < s; t++) {
@@ -1107,10 +1145,10 @@ var te = class {
1107
1145
  }
1108
1146
  processDynamicFilter(e, t) {
1109
1147
  let n = {}, r = {
1110
- operator: h.BuiltInOperatorNames.TimePeriod,
1148
+ operator: _.BuiltInOperatorNames.TimePeriod,
1111
1149
  param: n
1112
1150
  }, i = t.getAttribute("type");
1113
- return i === "aboveAverage" ? i = h.AverageType.Above : i === "belowAverage" && (i = h.AverageType.Below), Object.values(h.AverageType).includes(i) ? (r.operator = h.BuiltInOperatorNames.Average, e.copyFromAttribute(t, "val", n, "stdDevs", e.INT_COPY)) : e.copyFromAttribute(t, "val", n, "anchorDate", e.INT_COPY), e.copyFromAttribute(t, "type", n, "operator"), e.copyFromAttribute(t, "maxVal", n, "maxVal", e.INT_COPY), r;
1151
+ return i === "aboveAverage" ? i = _.AverageType.Above : i === "belowAverage" && (i = _.AverageType.Below), Object.values(_.AverageType).includes(i) ? (r.operator = _.BuiltInOperatorNames.Average, e.copyFromAttribute(t, "val", n, "stdDevs", e.INT_COPY)) : e.copyFromAttribute(t, "val", n, "anchorDate", e.INT_COPY), e.copyFromAttribute(t, "type", n, "operator"), e.copyFromAttribute(t, "maxVal", n, "maxVal", e.INT_COPY), r;
1114
1152
  }
1115
1153
  processDateGroupItem(e, t) {
1116
1154
  let n = {};
@@ -1121,7 +1159,7 @@ var te = class {
1121
1159
  }
1122
1160
  processFilters(e, t) {
1123
1161
  let n = {}, r = {
1124
- operator: h.BuiltInOperatorNames.InSet,
1162
+ operator: _.BuiltInOperatorNames.InSet,
1125
1163
  param: n
1126
1164
  };
1127
1165
  e.copyFromAttribute(t, "blank", r, "blank", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calendarType", r, "calendarType");
@@ -1142,14 +1180,14 @@ var te = class {
1142
1180
  }
1143
1181
  processIcon(e, t) {
1144
1182
  let n = {}, r = {
1145
- operator: h.BuiltInOperatorNames.Icon,
1183
+ operator: _.BuiltInOperatorNames.Icon,
1146
1184
  param: n
1147
1185
  };
1148
1186
  return e.copyFromAttribute(t, "iconId", n, "iconId", e.INT_COPY), e.copyFromAttribute(t, "iconSet", n), r;
1149
1187
  }
1150
1188
  processTop10(e, t) {
1151
1189
  let n = {}, r = {
1152
- operator: h.BuiltInOperatorNames.TopN,
1190
+ operator: _.BuiltInOperatorNames.TopN,
1153
1191
  param: n
1154
1192
  };
1155
1193
  return e.copyFromAttribute(t, "filterVal", n, "filterVal", e.FLOAT_COPY), e.copyFromAttribute(t, "percent", n, "percent", e.BOOLEAN_COPY), e.copyFromAttribute(t, "top", n, "top", e.BOOLEAN_COPY), e.copyFromAttribute(t, "val", n, "val", e.FLOAT_COPY), r;
@@ -1166,18 +1204,18 @@ var te = class {
1166
1204
  processFilterColumn(e, t, n) {
1167
1205
  if (!t) return null;
1168
1206
  if (!t.hasAttribute("colId")) return;
1169
- let r = parseInt(t.getAttribute("colId")), i = !1;
1170
- if (t.hasAttribute("hiddenButton") && (i = l(t.getAttribute("hiddenButton"))), i && n) {
1207
+ let r = parseInt(t.getAttribute("colId")), a = !1;
1208
+ if (t.hasAttribute("hiddenButton") && (a = i(t.getAttribute("hiddenButton"))), a && n) {
1171
1209
  let e = n.hiddenButtons;
1172
1210
  e || (e = [], n.hiddenButtons = e), e.push(r);
1173
1211
  }
1174
- let a = !1;
1175
- if (t.hasAttribute("showButton") && (a = l(t.getAttribute("showButton"))), a && n) {
1212
+ let o = !1;
1213
+ if (t.hasAttribute("showButton") && (o = i(t.getAttribute("showButton"))), o && n) {
1176
1214
  let e = n.showButtons;
1177
1215
  !0 !== e && (e || (e = [], n.showButtons = e), e[r] = !0);
1178
1216
  }
1179
- let o = this.processFilterCriteria(e, t);
1180
- return o ? (o.index = r, o) : null;
1217
+ let s = this.processFilterCriteria(e, t);
1218
+ return s ? (s.index = r, s) : null;
1181
1219
  }
1182
1220
  processFilterColumns(e, t, n, r) {
1183
1221
  if (!t) return;
@@ -1191,34 +1229,34 @@ var te = class {
1191
1229
  }
1192
1230
  return n;
1193
1231
  }
1194
- }, Oe = class {
1232
+ }, je = class {
1195
1233
  visit(e, t, n) {
1196
1234
  if (!t) return;
1197
- let r = t.getAttribute("ref"), i = {};
1198
- t.hasAttribute("caseSensitive") && (i.collatorOptions = l(t.getAttribute("caseSensitive")) ? S.CaseSensitiveOptions : S.CaseInsensitiveOptions);
1199
- let a = t.getAttribute("sortMethod");
1200
- a != null && a !== "none" && (a === "stroke" ? i.collatorOptions = {
1201
- ...i.collatorOptions,
1235
+ let r = t.getAttribute("ref"), a = {};
1236
+ t.hasAttribute("caseSensitive") && (a.collatorOptions = i(t.getAttribute("caseSensitive")) ? w.CaseSensitiveOptions : w.CaseInsensitiveOptions);
1237
+ let o = t.getAttribute("sortMethod");
1238
+ o != null && o !== "none" && (o === "stroke" ? a.collatorOptions = {
1239
+ ...a.collatorOptions,
1202
1240
  collation: "stroke"
1203
- } : a === "pinYin" && (i.collatorOptions = {
1204
- ...i.collatorOptions,
1241
+ } : o === "pinYin" && (a.collatorOptions = {
1242
+ ...a.collatorOptions,
1205
1243
  collation: "pinyin"
1206
1244
  }));
1207
- let o = {};
1208
- t.hasAttribute("columnSort") && l(t.getAttribute("columnSort")) && (o.axis = y.Axis.Column);
1209
- let s = f.fastStringToRange(r), c = [];
1210
- return this.processSortConditions(e, t, c, s, i), c.length > 0 && (o.sorts = c), Object.keys(c).length > 0 && (n.sort = o), o;
1245
+ let s = {};
1246
+ t.hasAttribute("columnSort") && i(t.getAttribute("columnSort")) && (s.axis = x.Axis.Column);
1247
+ let c = m.fastStringToRange(r), l = [];
1248
+ return this.processSortConditions(e, t, l, c, a), l.length > 0 && (s.sorts = l), Object.keys(l).length > 0 && (n.sort = s), s;
1211
1249
  }
1212
1250
  processSortCondition(e, t, n, r) {
1213
1251
  if (!t) return null;
1214
- let i = {};
1215
- if (!t.hasAttribute("ref")) return void console.warn("no ref for sort conditional", e.getPath());
1252
+ let a = {};
1253
+ if (!t.hasAttribute("ref")) return void e.warn("A sort condition has no ref; it was dropped.", { onceKey: "xlsx.sheet.sort.noRef" });
1216
1254
  if (t.hasAttribute("ref")) {
1217
- let e = t.getAttribute("ref"), r = f.fastStringToRange(e);
1218
- i.index = n ? r.colStart - n.colStart : r.colStart;
1255
+ let e = t.getAttribute("ref"), r = m.fastStringToRange(e);
1256
+ a.index = n ? r.colStart - n.colStart : r.colStart;
1219
1257
  }
1220
- let a = { ...r };
1221
- return i.criteria = a, a.reverse = !1, t.hasAttribute("descending") && (a.reverse = l(t.getAttribute("descending"))), e.copyFromAttribute(t, "sortBy", a, "sortOn"), e.copyFromAttribute(t, "dxfId", a), e.copyFromAttribute(t, "iconSet", a), e.copyFromAttribute(t, "customList", a), i;
1258
+ let o = { ...r };
1259
+ return a.criteria = o, o.reverse = !1, t.hasAttribute("descending") && (o.reverse = i(t.getAttribute("descending"))), e.copyFromAttribute(t, "sortBy", o, "sortOn"), e.copyFromAttribute(t, "dxfId", o), e.copyFromAttribute(t, "iconSet", o), e.copyFromAttribute(t, "customList", o), a;
1222
1260
  }
1223
1261
  processSortConditions(e, t, n, r, i) {
1224
1262
  if (!t) return;
@@ -1231,7 +1269,7 @@ var te = class {
1231
1269
  }
1232
1270
  }
1233
1271
  }
1234
- }, Z = class extends z {
1272
+ }, Z = class extends B {
1235
1273
  visit(e, t, n) {
1236
1274
  this.processNumFmts(e, e.evaluate("numFmts", t), null), e.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
1237
1275
  let r = {
@@ -1239,14 +1277,14 @@ var te = class {
1239
1277
  fonts: {},
1240
1278
  borders: {}
1241
1279
  };
1242
- this.processFonts(e, e.evaluate("fonts", t), r.fonts), this.processFills(e, e.evaluate("fills", t), r.fills), this.processBorders(e, e.evaluate("borders", t), r.borders, !0), r.fills[0] = { type: _.Type.None }, r.fills[1] = {
1243
- type: _.Type.Pattern,
1244
- patternType: _.BuiltInSheetPattern.Gray125
1280
+ this.processFonts(e, e.evaluate("fonts", t), r.fonts), this.processFills(e, e.evaluate("fills", t), r.fills), this.processBorders(e, e.evaluate("borders", t), r.borders, !0), r.fills[0] = { type: y.Type.None }, r.fills[1] = {
1281
+ type: y.Type.Pattern,
1282
+ patternType: y.BuiltInSheetPattern.Gray125
1245
1283
  }, r.borders[0] = {
1246
- bottom: { style: m.StrokeStyle.None },
1247
- left: { style: m.StrokeStyle.None },
1248
- right: { style: m.StrokeStyle.None },
1249
- top: { style: m.StrokeStyle.None }
1284
+ bottom: { style: g.StrokeStyle.None },
1285
+ left: { style: g.StrokeStyle.None },
1286
+ right: { style: g.StrokeStyle.None },
1287
+ top: { style: g.StrokeStyle.None }
1250
1288
  };
1251
1289
  let i = [];
1252
1290
  this.processXFs(e, e.evaluate("cellStyleXfs", t), i, r, null, !1);
@@ -1257,8 +1295,10 @@ var te = class {
1257
1295
  }
1258
1296
  let o = [];
1259
1297
  this.processXFs(e, e.evaluate("cellXfs", t), o, r, a), Object.keys(o).length > 0 && (n.direct = o);
1260
- let s = [];
1261
- return this.processDXFs(e, e.evaluate("dxfs", t), s), this.processTableStyles(e, e.evaluate("tableStyles", t), n, s), this.processIndexColors(e, e.evaluate("colors/indexedColors", t), n), this.processMruColors(e, e.evaluate("colors/mruColors", t), n), n;
1298
+ let s = this.collectHiddenXfs(e.evaluate("cellXfs", t));
1299
+ s.size > 0 && e.getVisitorParamsState().set(f, s);
1300
+ let c = [];
1301
+ return this.processDXFs(e, e.evaluate("dxfs", t), c), this.processTableStyles(e, e.evaluate("tableStyles", t), n, c), this.processIndexColors(e, e.evaluate("colors/indexedColors", t), n), this.processMruColors(e, e.evaluate("colors/mruColors", t), n), n;
1262
1302
  }
1263
1303
  processIndexColors(e, t, n) {
1264
1304
  if (!t) return;
@@ -1311,72 +1351,86 @@ var te = class {
1311
1351
  }
1312
1352
  }
1313
1353
  }
1314
- processXF(e, t, n, r, i, a) {
1354
+ processXF(e, t, n, r, a, o) {
1315
1355
  if (!t) return;
1316
- let o = t.getAttribute("xfId");
1317
- if (o && i) {
1318
- let e = i.get(parseInt(o));
1319
- e && e !== b.BuiltInName.Normal && (n.named = e);
1356
+ let s = t.getAttribute("xfId");
1357
+ if (s && a) {
1358
+ let e = a.get(parseInt(s));
1359
+ e && e !== S.BuiltInName.Normal && (n.named = e);
1320
1360
  }
1321
- let s = (e) => !(!a && t.hasAttribute(e)) || l(t.getAttribute(e)), c = (e) => !a || t.hasAttribute(e) && l(t.getAttribute(e)), u = a ? "0" : void 0;
1322
- if (s("applyFont")) {
1361
+ let c = (e) => !(!o && t.hasAttribute(e)) || i(t.getAttribute(e)), l = (e) => !o || t.hasAttribute(e) && i(t.getAttribute(e)), u = o ? "0" : void 0;
1362
+ if (c("applyFont")) {
1323
1363
  let e = t.getAttribute("fontId") ?? u;
1324
- if (e !== void 0 && (e !== "0" || c("applyFont"))) {
1364
+ if (e !== void 0 && (e !== "0" || l("applyFont"))) {
1325
1365
  let t = r.fonts[e];
1326
1366
  t !== void 0 && (n.font = t);
1327
1367
  }
1328
1368
  }
1329
- if (s("applyFill")) {
1369
+ if (c("applyFill")) {
1330
1370
  let e = t.getAttribute("fillId") ?? u;
1331
- if (e !== void 0 && (e !== "0" || c("applyFill"))) {
1371
+ if (e !== void 0 && (e !== "0" || l("applyFill"))) {
1332
1372
  let t = r.fills[e];
1333
1373
  t !== void 0 && Object.keys(t).length > 0 && (n.fill = t);
1334
1374
  }
1335
1375
  }
1336
- if (s("applyBorder")) {
1376
+ if (c("applyBorder")) {
1337
1377
  let e = t.getAttribute("borderId") ?? u;
1338
- if (e !== void 0 && (e !== "0" || c("applyBorder"))) {
1378
+ if (e !== void 0 && (e !== "0" || l("applyBorder"))) {
1339
1379
  let t = r.borders[e];
1340
- t !== void 0 && (n.border = t);
1380
+ t !== void 0 && (n.borders = t);
1341
1381
  }
1342
1382
  }
1343
- if (s("applyNumberFormat")) {
1383
+ if (c("applyNumberFormat")) {
1344
1384
  let r = t.getAttribute("numFmtId") ?? u;
1345
- if (r !== void 0 && (r !== "0" || c("applyNumberFormat"))) {
1385
+ if (r !== void 0 && (r !== "0" || l("applyNumberFormat"))) {
1346
1386
  let t = parseInt(r), i, a = e.getVisitorParamsState();
1347
1387
  if (a) {
1348
1388
  let e = a.get("numFmts");
1349
1389
  e && (i = e.get(t)), n.numberFormat = i ?? t;
1350
- } else console.warn("no visitor params state");
1390
+ } else e.warn("Number formats were unavailable; a cell format was not read.", { onceKey: "xlsx.style.numberFormat.state" });
1351
1391
  }
1352
1392
  }
1353
- if (s("applyAlignment")) {
1393
+ if (c("applyAlignment")) {
1354
1394
  let r = e.evaluate("alignment", t);
1355
- (r || c("applyAlignment")) && this.processAlignment(e, r, n);
1395
+ (r || l("applyAlignment")) && this.processAlignment(e, r, n);
1356
1396
  }
1357
- if (s("applyProtection")) {
1397
+ if (c("applyProtection")) {
1358
1398
  let r = e.evaluate("protection", t);
1359
- (r || c("applyProtection")) && this.processProtection(e, r, n);
1399
+ (r || l("applyProtection")) && this.processProtection(e, r, n);
1360
1400
  }
1361
- let d = l(t.getAttribute("quotePrefix") ?? "");
1401
+ let d = i(t.getAttribute("quotePrefix") ?? "");
1362
1402
  d && (n.quotePrefix = d);
1363
1403
  }
1364
1404
  processAlignment(e, t, n) {
1365
1405
  let r = {};
1366
- if (t?.hasAttribute("horizontal") ? r.horizontal = t.getAttribute("horizontal") : r.horizontal = x.HorizontalAlignment.General, t?.hasAttribute("vertical") ? r.vertical = t.getAttribute("vertical") : r.vertical = x.VerticalAlignment.Bottom, t?.hasAttribute("indent") ? r.indent = parseInt(t.getAttribute("indent")) : r.indent = 0, t?.hasAttribute("relativeIndent") ? r.relativeIndent = parseInt(t.getAttribute("relativeIndent")) : r.relativeIndent = 0, l(t?.getAttribute("wrapText") ?? "") ? r.overflow = x.Overflow.Wrap : r.overflow = x.Overflow.Visible, l(t?.getAttribute("shrinkToFit") ?? "") && (r.overflow = x.Overflow.Shrink), t?.hasAttribute("textRotation")) {
1406
+ if (t?.hasAttribute("horizontal") ? r.horizontal = t.getAttribute("horizontal") : r.horizontal = C.HorizontalAlignment.General, t?.hasAttribute("vertical") ? r.vertical = t.getAttribute("vertical") : r.vertical = C.VerticalAlignment.Bottom, t?.hasAttribute("indent") ? r.indent = parseInt(t.getAttribute("indent")) : r.indent = 0, t?.hasAttribute("relativeIndent") ? r.relativeIndent = parseInt(t.getAttribute("relativeIndent")) : r.relativeIndent = 0, i(t?.getAttribute("wrapText") ?? "") ? r.overflow = C.Overflow.Wrap : r.overflow = C.Overflow.Visible, i(t?.getAttribute("shrinkToFit") ?? "") && (r.overflow = C.Overflow.Shrink), t?.hasAttribute("textRotation")) {
1367
1407
  let e = parseFloat(t.getAttribute("textRotation"));
1368
1408
  e > 0 && e <= 90 ? e = 360 - e : e > 90 && e <= 180 ? e -= 90 : e === 255 && (e = 0, r.stacked = !0), r.rotation = e;
1369
1409
  } else r.rotation = 0;
1370
- t?.hasAttribute("justifyLastLine") && (r.justifyLastLine = l(t.getAttribute("justifyLastLine")));
1371
- let i = t?.getAttribute("readingOrder");
1372
- return i && (i === "0" ? r.readingDirection = x.ReadingDirection.Auto : i === "1" ? r.readingDirection = x.ReadingDirection.LeftToRight : i === "2" ? r.readingDirection = x.ReadingDirection.RightToLeft : console.warn(`invalid readingOrder: ${i}`)), Object.keys(r).length > 0 && (n.alignment = r), n;
1410
+ t?.hasAttribute("justifyLastLine") && (r.justifyLastLine = i(t.getAttribute("justifyLastLine")));
1411
+ let a = t?.getAttribute("readingOrder");
1412
+ return a && (a === "0" ? r.readingDirection = C.ReadingDirection.Auto : a === "1" ? r.readingDirection = C.ReadingDirection.LeftToRight : a === "2" ? r.readingDirection = C.ReadingDirection.RightToLeft : e.warn(`Invalid readingOrder '${a}'; the direction was left automatic.`, { onceKey: "xlsx.style.readingOrder" })), Object.keys(r).length > 0 && (n.alignment = r), n;
1413
+ }
1414
+ collectHiddenXfs(e) {
1415
+ let t = /* @__PURE__ */ new Set();
1416
+ if (!e) return t;
1417
+ let n = e.childNodes, r = 0;
1418
+ for (let e = 0; e < n.length; e++) {
1419
+ let a = n.item(e);
1420
+ if (a.nodeType !== 1 || a.localName !== "xf") continue;
1421
+ let o = a.childNodes;
1422
+ for (let e = 0; e < o.length; e++) {
1423
+ let n = o.item(e);
1424
+ n.nodeType === 1 && n.localName === "protection" && i(n.getAttribute("hidden") ?? "") && t.add(r);
1425
+ }
1426
+ r++;
1427
+ }
1428
+ return t;
1373
1429
  }
1374
1430
  processProtection(e, t, n) {
1375
1431
  if (!t) return;
1376
- let r = {}, i = t.getAttribute("locked");
1377
- i && !l(i) && (r.edit = !0);
1378
- let a = t.getAttribute("hidden");
1379
- return a && l(a) && (r.formulaHidden = !0), Object.keys(r).length > 0 && (n.protection = r), n;
1432
+ let r = t.getAttribute("locked");
1433
+ return n.protection = { alwaysUnlocked: !!r && !i(r) }, n;
1380
1434
  }
1381
1435
  processDXF(e, t, n) {
1382
1436
  if (!t) return;
@@ -1391,7 +1445,7 @@ var te = class {
1391
1445
  this.processFill(e, i, t, 0), t.length > 0 && t[0] && (n.fill = t[0]);
1392
1446
  } else if (i.nodeType === 1 && i.localName === "border") {
1393
1447
  let t = [];
1394
- this.processBorder(e, i, t, 0, !1), t.length > 0 && t[0] && (n.border = t[0]);
1448
+ this.processBorder(e, i, t, 0, !1), t.length > 0 && t[0] && (n.borders = t[0]);
1395
1449
  } else if (i.nodeType === 1 && i.localName === "numFmt") {
1396
1450
  let e = i.getAttribute("formatCode");
1397
1451
  if (e) n.numberFormat = e;
@@ -1419,20 +1473,20 @@ var te = class {
1419
1473
  }
1420
1474
  e.getVisitorParamsState().delete("processingDXFs");
1421
1475
  }
1422
- processTableStyle(e, t, n, r, i = !1) {
1423
- let a = t.getAttribute("name"), o = { name: a };
1424
- t.hasAttribute("table") && (o.table = l(t.getAttribute("table"))), t.hasAttribute("pivot") && (o.pivot = l(t.getAttribute("pivot"))), i && !o.pivot && r.unshift(null);
1425
- let s = t.childNodes, c = s.length;
1426
- for (let e = 0; e < c; e++) {
1427
- let t = s.item(e);
1428
- if (t.nodeType === 1 && t.localName === "tableStyleElement") {
1429
- let e = t.getAttribute("type"), n = t.getAttribute("dxfId"), i = n == null ? void 0 : r?.[n];
1430
- i ||= (console.warn("invalid dfx id", n), {}), o[e] = i;
1431
- let a = null;
1432
- t.hasAttribute("size") && (a = parseInt(t.getAttribute("size"))), a && !isNaN(a) && (i.size = a);
1476
+ processTableStyle(e, t, n, r, a = !1) {
1477
+ let o = t.getAttribute("name"), s = { name: o };
1478
+ t.hasAttribute("table") && (s.table = i(t.getAttribute("table"))), t.hasAttribute("pivot") && (s.pivot = i(t.getAttribute("pivot"))), a && !s.pivot && r.unshift(null);
1479
+ let c = t.childNodes, l = c.length;
1480
+ for (let t = 0; t < l; t++) {
1481
+ let n = c.item(t);
1482
+ if (n.nodeType === 1 && n.localName === "tableStyleElement") {
1483
+ let t = n.getAttribute("type"), i = n.getAttribute("dxfId"), a = i == null ? void 0 : r?.[i];
1484
+ a ||= (e.warn(`A table style names a format that does not exist (dxfId '${i}').`, { onceKey: "xlsx.style.tableStyle.dxf" }), {}), s[t] = a;
1485
+ let o = null;
1486
+ n.hasAttribute("size") && (o = parseInt(n.getAttribute("size"))), o && !isNaN(o) && (a.size = o);
1433
1487
  }
1434
1488
  }
1435
- delete o.name, n[a] = o;
1489
+ delete s.name, n[o] = s;
1436
1490
  }
1437
1491
  processTableStyles(e, t, n, r, i) {
1438
1492
  if (!t) return;
@@ -1447,45 +1501,49 @@ var te = class {
1447
1501
  }
1448
1502
  return Object.keys(l).length > 0 && (a.styles = l), Object.keys(a).length > 0 && (n.tables = a), n;
1449
1503
  }
1450
- processCellStyles(e, t, n, r, i) {
1504
+ processCellStyles(e, t, n, r, a) {
1451
1505
  if (!t) return;
1452
- let a = t.childNodes, o = a.length;
1453
- for (let e = 0; e < o; e++) {
1454
- let t = a.item(e);
1506
+ let o = t.childNodes, s = o.length;
1507
+ for (let e = 0; e < s; e++) {
1508
+ let t = o.item(e);
1455
1509
  if (t.nodeType === 1 && t.localName === "cellStyle") {
1456
- let e = parseInt(t.getAttribute("xfId") ?? ""), a = t.getAttribute("name"), o = t.getAttribute("builtinId"), s = a;
1457
- if (o !== null) {
1458
- let e = b.builtInNameFromId(parseInt(o));
1459
- e !== void 0 && (s = e);
1510
+ let e = parseInt(t.getAttribute("xfId") ?? ""), o = t.getAttribute("name"), s = t.getAttribute("builtinId"), c = o;
1511
+ if (s !== null) {
1512
+ let e = S.builtInNameFromId(parseInt(s));
1513
+ e !== void 0 && (c = e);
1460
1514
  }
1461
- if (i.set(e, s), !r[e]) continue;
1462
- let c = {
1463
- name: s,
1515
+ if (a.set(e, c), !r[e]) continue;
1516
+ let l = {
1517
+ name: c,
1464
1518
  style: r[e]
1465
1519
  };
1466
- t.getAttribute("hidden") && (c.hidden = l(t.getAttribute("hidden"))), t.getAttribute("iLevel") && (c.iLevel = parseInt(t.getAttribute("iLevel"))), n.push(c);
1520
+ t.getAttribute("hidden") && (l.hidden = i(t.getAttribute("hidden"))), t.getAttribute("iLevel") && (l.iLevel = parseInt(t.getAttribute("iLevel"))), n.push(l);
1467
1521
  }
1468
1522
  }
1469
1523
  }
1470
1524
  afterVisit(e, t, n) {}
1471
- }, ke = class extends z {
1525
+ }, Me = class extends B {
1472
1526
  visit(e, t, n) {
1473
- return this.processSheetRefs(e, e.evaluate("sheets", t), n), this.processExternalReferences(e, e.evaluate("externalReferences", t), n), this.processBookViews(e, e.evaluate("bookViews", t), n), this.processDefinedNames(e, e.evaluate("definedNames", t), n), this.processCalcPr(e, e.evaluate("calcPr", t), n), this.processWorkbookProtection(e, e.evaluate("workbookProtection", t), n), this.processWorkbookPr(e, e.evaluate("workbookPr", t), n), n;
1527
+ return this.processSheetRefs(e, e.evaluate("sheets", t), n), this.processExternalReferences(e, e.evaluate("externalReferences", t), n), this.processBookViews(e, e.evaluate("bookViews", t), n), this.processDefinedNames(e, e.evaluate("definedNames", t), n), this.processCalcPr(e, e.evaluate("calcPr", t), n), this.processPivotCaches(e, e.evaluate("pivotCaches", t), n), this.processWorkbookProtection(e, e.evaluate("workbookProtection", t), n), this.processWorkbookPr(e, e.evaluate("workbookPr", t), n), n;
1474
1528
  }
1475
1529
  processPassword(e, t, n, r = "workbook", i = "password") {
1476
1530
  if (!t) return;
1477
1531
  let a = {};
1478
1532
  e.copyFromAttribute(t, `${r}AlgorithmName`, a, "algorithm"), e.copyFromAttribute(t, `${r}HashValue`, a, "hash"), e.copyFromAttribute(t, `${r}SaltValue`, a, "salt"), e.copyFromAttribute(t, `${r}SpinCount`, a, "spinCount", e.INT_COPY), Object.keys(a).length > 0 && (n[i] = a);
1479
1533
  }
1480
- processWorkbookProtection(e, t, n) {
1481
- if (!t) return;
1482
- let r = {};
1483
- return this.processPassword(e, t, r, "workbook", "password"), this.processPassword(e, t, r, "revisions", "revisionsPassword"), e.copyFromAttribute(t, "lockStructure", r, "structure", e.BOOLEAN_COPY), e.copyFromAttribute(t, "lockWindows", r, "windows", e.BOOLEAN_COPY), e.copyFromAttribute(t, "lockRevision", r, "revision", e.BOOLEAN_COPY), n.protection = r, n;
1534
+ processWorkbookProtection(e, n, i) {
1535
+ if (!n) return;
1536
+ let a = {};
1537
+ this.processPassword(e, n, a, "workbook", "password"), this.processPassword(e, n, a, "revisions", "revisionsPassword");
1538
+ for (let e of t) a[e.key] = r(e, n.getAttribute(e.attribute));
1539
+ return i.protection = a, i;
1484
1540
  }
1485
1541
  processCalcPr(e, t, n) {
1486
1542
  if (!t) return;
1487
1543
  let r = {};
1488
- e.copyFromAttribute(t, "calcMode", r, "calcMode", (e) => ce[e] ?? null), e.copyFromAttribute(t, "fullCalcOnLoad", r, "fullCalcOnLoad", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calcOnSave", r, "calcOnSave", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calcCompleted", r, "calcCompleted", e.BOOLEAN_COPY), e.copyFromAttribute(t, "fullPrecision", r, "fullPrecision", e.BOOLEAN_COPY), e.copyFromAttribute(t, "forceFullCalc", r, "forceFullCalc", e.BOOLEAN_COPY), e.copyFromAttribute(t, "concurrentCalc", r, "concurrentCalc", e.BOOLEAN_COPY), e.copyFromAttribute(t, "refMode", r, "refMode"), e.copyFromAttribute(t, "iterate", r, "iterate", e.BOOLEAN_COPY), e.copyFromAttribute(t, "iterateCount", r, "maxIterations", e.INT_COPY), e.copyFromAttribute(t, "iterateDelta", r, "maxIterateChange", e.FLOAT_COPY), n.calc = r;
1544
+ e.copyFromAttribute(t, "calcMode", r, "calcMode", (e) => le[e] ?? null), e.copyFromAttribute(t, "fullCalcOnLoad", r, "fullCalcOnLoad", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calcOnSave", r, "calcOnSave", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calcCompleted", r, "calcCompleted", e.BOOLEAN_COPY), e.copyFromAttribute(t, "fullPrecision", r, "fullPrecision", e.BOOLEAN_COPY), e.copyFromAttribute(t, "forceFullCalc", r, "forceFullCalc", e.BOOLEAN_COPY), e.copyFromAttribute(t, "concurrentCalc", r, "concurrentCalc", e.BOOLEAN_COPY), e.copyFromAttribute(t, "refMode", r, "refMode"), e.copyFromAttribute(t, "iterate", r, "iterate", e.BOOLEAN_COPY), e.copyFromAttribute(t, "iterateCount", r, "maxIteration", e.INT_COPY), e.copyFromAttribute(t, "iterateDelta", r, "maxIterateChange", e.FLOAT_COPY);
1545
+ let i = t.getAttribute("calcId");
1546
+ i !== null && e.getVisitorParamsState().set("calcId", i), n.calc = r;
1489
1547
  }
1490
1548
  processSheetRefs(e, t, n) {
1491
1549
  if (!t) return;
@@ -1498,7 +1556,7 @@ var te = class {
1498
1556
  }
1499
1557
  processSheetRef(e, t, n) {
1500
1558
  let r = {};
1501
- e.copyFromAttribute(t, "name", r, "name"), e.copyFromAttribute(t, "state", r, "visibility");
1559
+ e.copyFromAttribute(t, "name", r, "name"), e.copyFromAttribute(t, "state", r, "visibility"), e.copyFromAttribute(t, "sheetId", r, "sheetId", e.INT_COPY);
1502
1560
  let i = t.getAttribute("r:id"), a = e.getRef(i);
1503
1561
  a && (r.sheet = a), n.push(r);
1504
1562
  }
@@ -1514,6 +1572,22 @@ var te = class {
1514
1572
  }
1515
1573
  r.length > 0 && (n.externalBooks = r);
1516
1574
  }
1575
+ processPivotCaches(e, t, n) {
1576
+ if (!t) return;
1577
+ let r = [], i = t.childNodes, a = i.length;
1578
+ for (let t = 0; t < a; t++) {
1579
+ let n = i.item(t);
1580
+ if (n.nodeType !== 1 || n.localName !== "pivotCache") continue;
1581
+ let a = parseInt(n.getAttribute("cacheId") ?? "", 10), o = n.getAttribute("r:id");
1582
+ if (isNaN(a) || !o) continue;
1583
+ let s = e.readEmbeddedPart(o);
1584
+ s && r.push({
1585
+ cacheId: a,
1586
+ part: s
1587
+ });
1588
+ }
1589
+ r.length > 0 && (n.pivotCaches = r);
1590
+ }
1517
1591
  processBookViews(e, t, n) {
1518
1592
  if (!t) return;
1519
1593
  let r = t.childNodes, i = 0, a = r.length;
@@ -1531,9 +1605,9 @@ var te = class {
1531
1605
  if (!t) return;
1532
1606
  let i = {}, a = t.firstChild;
1533
1607
  if (a && a.nodeType === 3 && (i.ref = a.textContent), e.copyFromAttribute(t, "name", i), e.copyFromAttribute(t, "comment", i), e.copyFromAttribute(t, "hidden", i, "hidden", e.BOOLEAN_COPY), t.hasAttribute("localSheetId")) {
1534
- let e = t.getAttribute("localSheetId");
1535
- if (!r[e]?.name) return void console.warn(`Defined name '${t.getAttribute("name")}' references a sheet with localSheetId '${e}' which does not exist.`);
1536
- i.scope = r[e].name;
1608
+ let n = t.getAttribute("localSheetId");
1609
+ if (!r[n]?.name) return void e.warn(`Defined name '${t.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);
1610
+ i.scope = r[n].name;
1537
1611
  }
1538
1612
  e.copyFromAttribute(t, "customMenu", i), e.copyFromAttribute(t, "description", i), e.copyFromAttribute(t, "statusBar", i), e.copyFromAttribute(t, "help", i), e.copyFromAttribute(t, "shortcutKey", i), e.copyFromAttribute(t, "function", i, "function", e.BOOLEAN_COPY), e.copyFromAttribute(t, "functionGroupId", i, "functionGroupId", e.INT_COPY), e.copyFromAttribute(t, "publishToServer", i, "publishToServer", e.BOOLEAN_COPY), e.copyFromAttribute(t, "vbProcedure", i, "vbProcedure", e.BOOLEAN_COPY), e.copyFromAttribute(t, "xlm", i, "xlm", e.BOOLEAN_COPY), Object.keys(i).length > 0 && n.push(i);
1539
1613
  }
@@ -1547,13 +1621,13 @@ var te = class {
1547
1621
  r.length > 0 && (n.names = r);
1548
1622
  }
1549
1623
  processWorkbookPr(e, t, n) {
1550
- t && e.copyFromAttribute(t, "date1904", n, "date1904", e.BOOLEAN_COPY);
1624
+ t && (e.copyFromAttribute(t, "date1904", n, "date1904", e.BOOLEAN_COPY), e.copyFromAttribute(t, "codeName", n, "codeName"), e.copyFromAttribute(t, "updateLinks", n, "updateLinks"));
1551
1625
  }
1552
1626
  afterVisit(e, t, n) {}
1553
- }, Ae = class {
1627
+ }, Ne = class {
1554
1628
  visit(e, t, n) {
1555
1629
  let r = {};
1556
- return e.copyFromAttribute(t, "ref", n, "r"), e.getVisitorParamsState().set("ref", n.r), n.v = r, e.copyFromAttribute(t, "name", r), e.copyFromAttribute(t, "displayName", r), e.copyFromAttribute(t, "headerRowCount", r, "headerRowCount", e.INT_COPY), e.copyFromAttribute(t, "totalsRowCount", r, "totalsRowCount", e.INT_COPY), this.processTableColumns(e, t, r), this.processTableStyleInfo(e, t, r), e.copyFromAttribute(t, "id", r), e.copyFromAttribute(t, "comment", r, "description"), e.copyFromAttribute(t, "connectionId", r, "connectionId", e.INT_COPY), e.copyFromAttribute(t, "tableType", r), e.copyFromAttribute(t, "published", r, "published", e.BOOLEAN_COPY), e.copyFromAttribute(t, "insertRow", r, "insertRow", e.BOOLEAN_COPY), e.copyFromAttribute(t, "insertRowShift", r, "insertRowShift", e.BOOLEAN_COPY), e.copyFromAttribute(t, "totalsRowShown", r, "totalsRowShown", e.BOOLEAN_COPY), r;
1630
+ return e.copyFromAttribute(t, "ref", n, "r"), e.getVisitorParamsState().set("ref", n.r), n.v = r, e.copyFromAttribute(t, "name", r), e.copyFromAttribute(t, "displayName", r), e.copyFromAttribute(t, "headerRowCount", r, "headerRowCount", e.INT_COPY), e.copyFromAttribute(t, "totalsRowCount", r, "totalsRowCount", e.INT_COPY), this.processTableColumns(e, t, r), this.processTableStyleInfo(e, t, r), e.copyFromAttribute(t, "id", r), e.copyFromAttribute(t, "comment", r, "description"), e.copyFromAttribute(t, "connectionId", r, "connectionId", e.INT_COPY), e.copyFromAttribute(t, "tableType", r), e.copyFromAttribute(t, "published", r, "published", e.BOOLEAN_COPY), e.copyFromAttribute(t, "insertRow", r, "insertRow", e.BOOLEAN_COPY), e.copyFromAttribute(t, "insertRowShift", r, "insertRowShift", e.BOOLEAN_COPY), r.totalsRowShown = t.getAttribute("totalsRowShown") !== "0", r;
1557
1631
  }
1558
1632
  afterVisit(e, t, n) {
1559
1633
  let r = n.v;
@@ -1587,7 +1661,9 @@ var te = class {
1587
1661
  let n = e.evaluate("totalsRowFormula", i);
1588
1662
  n && (t.totalsRowFormula = n.textContent);
1589
1663
  } else t.totalsRowFormula = r;
1590
- e.copyFromAttribute(i, "totalsRowLabel", t), n.push(t);
1664
+ e.copyFromAttribute(i, "totalsRowLabel", t);
1665
+ let a = e.evaluate("calculatedColumnFormula", i);
1666
+ a?.textContent && (t.calculatedColumnFormula = a.textContent), n.push(t);
1591
1667
  }
1592
1668
  }
1593
1669
  return n;
@@ -1600,7 +1676,7 @@ var te = class {
1600
1676
  }
1601
1677
  i.length > 0 && (n.columns = i);
1602
1678
  }
1603
- }, je = class {
1679
+ }, Pe = class {
1604
1680
  visit(e, t, n) {
1605
1681
  let r = e.getVisitorParamsState().get("ref");
1606
1682
  if (r) {
@@ -1609,7 +1685,7 @@ var te = class {
1609
1685
  }
1610
1686
  return e.copyFromAttribute(t, "altText", n), e.copyFromAttribute(t, "altTextSummary", n), n;
1611
1687
  }
1612
- }, Me = class {
1688
+ }, Fe = class {
1613
1689
  visit(e, t, n) {
1614
1690
  let r = t.childNodes, i = r.length, a = null;
1615
1691
  for (let e = 0; e < i; e++) {
@@ -1619,7 +1695,12 @@ var te = class {
1619
1695
  break;
1620
1696
  }
1621
1697
  }
1622
- return a ? (t.getAttribute("mc:Ignorable") && (n.mceIgnorable = !0), n.sheetNames = [], this.processSheetNames(e, a, n), this.processDefinedNames(e, a, n), this.processSheetDataSet(e, a, n), n) : n;
1698
+ if (!a) return n;
1699
+ t.getAttribute("mc:Ignorable") && (n.mceIgnorable = !0);
1700
+ let o = a.getAttribute("r:id");
1701
+ o && (n.__bookRelId = o);
1702
+ let s = this._findAbsoluteUrlRelId(a);
1703
+ return s && (n.__absoluteUrlRelId = s), n.sheetNames = [], this.processSheetNames(e, a, n), this.processDefinedNames(e, a, n), this.processSheetDataSet(e, a, n), n;
1623
1704
  }
1624
1705
  processSheetNames(e, t, n) {
1625
1706
  let r = this._findChild(t, "sheetNames");
@@ -1672,7 +1753,7 @@ var te = class {
1672
1753
  if (t.nodeType !== 1 || t.localName !== "cell") continue;
1673
1754
  let r = t.getAttribute("r");
1674
1755
  if (!r) continue;
1675
- let a = f.fastStringToCell(r);
1756
+ let a = m.fastStringToCell(r);
1676
1757
  if (a?.rowIndex === void 0 || a?.colIndex === void 0) continue;
1677
1758
  let o = this._readCellValue(t);
1678
1759
  o !== void 0 && n.pushAt(a.rowIndex, a.colIndex, o);
@@ -1692,7 +1773,7 @@ var te = class {
1692
1773
  case "str":
1693
1774
  default: return t;
1694
1775
  case "e": {
1695
- let e = p.getBuiltInByLabel(t);
1776
+ let e = h.getBuiltInByLabel(t);
1696
1777
  return e ? {
1697
1778
  t: "e",
1698
1779
  v: e.getCode()
@@ -1708,13 +1789,17 @@ var te = class {
1708
1789
  }
1709
1790
  return null;
1710
1791
  }
1711
- }, Ne = class {
1792
+ _findAbsoluteUrlRelId(e) {
1793
+ let t = this._findChild(e, "alternateUrls");
1794
+ return t ? this._findChild(t, "absoluteUrl")?.getAttribute("r:id") ?? null : null;
1795
+ }
1796
+ }, Ie = class {
1712
1797
  visit(e, t, n) {
1713
1798
  e.copyFromAttribute(t, "name", n), e.copyFromAttribute(t, "sourceName", n);
1714
1799
  let r = e.evaluate("*/tableSlicerCache", t);
1715
- return r ? (e.copyFromAttribute(r, "tableId", n), e.copyFromAttribute(r, "column", n, "columnId"), e.copyFromAttribute(r, "crossFilter", n), n) : (console.warn("SlicerCacheDefinitionVisitor: missing tableSlicerCache element"), n);
1800
+ return r ? (e.copyFromAttribute(r, "tableId", n), e.copyFromAttribute(r, "column", n, "columnId"), e.copyFromAttribute(r, "crossFilter", n), n) : (e.warn("A slicer names no table; it was not imported.", { onceKey: "xlsx.slicer.cacheDefinition" }), n);
1716
1801
  }
1717
- }, Pe = class {
1802
+ }, Le = class {
1718
1803
  visit(e, t, n) {
1719
1804
  let r = n.slicers;
1720
1805
  r || (r = {}, n.slicers = r);
@@ -1736,7 +1821,7 @@ var te = class {
1736
1821
  }
1737
1822
  e.copyFromAttribute(t, "caption", r), e.copyFromAttribute(t, "startItem", r, "startItem", e.INT_COPY), e.copyFromAttribute(t, "columnCount", r, "columnCount", e.INT_COPY), e.copyFromAttribute(t, "showCaption", r, "showCaption", e.BOOLEAN_COPY), e.copyFromAttribute(t, "level", r, "level", e.INT_COPY), e.copyFromAttribute(t, "style", r), e.copyFromAttribute(t, "locked", r, "locked", e.BOOLEAN_COPY), e.copyFromAttribute(t, "rowHeight", r, "rowHeight", e.INT_COPY);
1738
1823
  }
1739
- }, Fe = class {
1824
+ }, Re = class {
1740
1825
  visit(e, t, n) {
1741
1826
  return n;
1742
1827
  }
@@ -1746,25 +1831,25 @@ var te = class {
1746
1831
  let r = {};
1747
1832
  return e.copyFromAttribute(t, "editAs", r, "anchorType"), r.anchor = {}, t.localName === "absoluteAnchor" ? (r.anchorType = "absolute", this.processAbsoluteCoord(e, e.evaluate("xdr:pos", t), r.anchor, "from", "x", "y"), this.processAbsoluteCoord(e, e.evaluate("xdr:ext", t), r.anchor, "to", "cx", "cy")) : t.localName === "oneCellAnchor" ? (this.processOffsetCoord(e, e.evaluate("from", t), r.anchor, "from"), this.processAbsoluteCoord(e, e.evaluate("xdr:ext", t), r.anchor, "to", "cx", "cy")) : (this.processOffsetCoord(e, e.evaluate("from", t), r.anchor, "from"), this.processOffsetCoord(e, e.evaluate("to", t), r.anchor, "to")), n.movables ||= [], n.movables.push(r), r;
1748
1833
  }
1749
- processAbsoluteCoord(e, t, r, i, a, o) {
1834
+ processAbsoluteCoord(e, t, n, r, i, a) {
1750
1835
  if (!t) return;
1751
- let s = {
1836
+ let o = {
1752
1837
  x: 0,
1753
1838
  y: 0
1754
1839
  };
1755
- return s.x = n(t.getAttribute(a)), s.y = n(t.getAttribute(o)), i === "from" ? r.tl = s : r.br = s, r;
1840
+ return o.x = d(t.getAttribute(i)), o.y = d(t.getAttribute(a)), r === "from" ? n.tl = o : n.br = o, n;
1756
1841
  }
1757
- processOffsetCoord(e, t, r, i) {
1842
+ processOffsetCoord(e, t, n, r) {
1758
1843
  if (!t) return;
1759
- let a = {
1844
+ let i = {
1760
1845
  c: 0,
1761
1846
  r: 0,
1762
1847
  x: 0,
1763
1848
  y: 0
1764
1849
  };
1765
- return e.evaluate("col", t) && (a.c = parseInt(e.evaluate("col", t).textContent)), e.evaluate("row", t) && (a.r = parseInt(e.evaluate("row", t).textContent)), e.evaluate("colOff", t) && (a.x = n(e.evaluate("colOff", t).textContent)), e.evaluate("rowOff", t) && (a.y = n(e.evaluate("rowOff", t).textContent)), i === "from" ? r.tl = a : r.br = a, r;
1850
+ return e.evaluate("col", t) && (i.c = parseInt(e.evaluate("col", t).textContent)), e.evaluate("row", t) && (i.r = parseInt(e.evaluate("row", t).textContent)), e.evaluate("colOff", t) && (i.x = d(e.evaluate("colOff", t).textContent)), e.evaluate("rowOff", t) && (i.y = d(e.evaluate("rowOff", t).textContent)), r === "from" ? n.tl = i : n.br = i, n;
1766
1851
  }
1767
- }, Ie = class extends V {
1852
+ }, ze = class extends H {
1768
1853
  visit(e, t, n) {
1769
1854
  if (!t) return;
1770
1855
  n = super.visit(e, t, n);
@@ -1790,25 +1875,20 @@ var te = class {
1790
1875
  if (n === "chart" && a) {
1791
1876
  let n = e.evaluate("*/cNvPr", t);
1792
1877
  n?.item && (n = n.item(0));
1793
- let r = n?.getAttribute?.("id"), o = r ? parseInt(r, 10) : void 0, s = e.getRelationships().get(a), l;
1794
- if (s?.target) {
1795
- let t = e.getFileLocation(), n = t.slice(0, t.lastIndexOf("/") + 1);
1796
- l = c(s.target.startsWith("/") ? s.target : n + s.target);
1797
- }
1878
+ let r = n?.getAttribute?.("id"), o = r ? parseInt(r, 10) : void 0;
1798
1879
  i.json = {
1799
1880
  xml: e.serializeElement(t) ?? void 0,
1800
1881
  sourceId: o === void 0 || isNaN(o) ? void 0 : o,
1801
- chartRelId: a,
1802
- chartTargetPath: l
1882
+ part: e.readEmbeddedPart(a) ?? void 0
1803
1883
  };
1804
1884
  } else a && (i.json = e.getRef(a));
1805
- } catch (e) {
1806
- console.warn("Unable to parse graphicFrame", e);
1885
+ } catch (t) {
1886
+ e.warn(`Unable to read a graphic frame: ${t?.message ?? t}`, { onceKey: "xlsx.drawing.graphicFrame" });
1807
1887
  }
1808
1888
  }
1809
1889
  return i && (n.content = i), i;
1810
1890
  }
1811
- }, Le = H, Re = class extends V {
1891
+ }, Be = U, Ve = class extends H {
1812
1892
  visit(e, t, n) {
1813
1893
  if (!t) return;
1814
1894
  let r = super.visit(e, t, n), i = e.evaluate("nvPicPr/cNvPicPr", t);
@@ -1824,7 +1904,7 @@ var te = class {
1824
1904
  let a = e.evaluate("blipFill/blip", t), o;
1825
1905
  if (a) {
1826
1906
  let t;
1827
- if (t = a.getAttribute("r:embed") ?? a.getAttribute("embed"), t ||= a.getAttribute("r:link") ?? a.getAttribute("link"), !t) return void console.warn("no rId found for blip", a);
1907
+ if (t = a.getAttribute("r:embed") ?? a.getAttribute("embed"), t ||= a.getAttribute("r:link") ?? a.getAttribute("link"), !t) return void e.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.drawing.picture.noRel" });
1828
1908
  o = e.getRef(t, !0);
1829
1909
  }
1830
1910
  return n.content = {
@@ -1832,7 +1912,7 @@ var te = class {
1832
1912
  json: { resId: o }
1833
1913
  }, r;
1834
1914
  }
1835
- }, ze = class extends H {
1915
+ }, He = class extends U {
1836
1916
  visit(e, t, n) {
1837
1917
  if (!t) return;
1838
1918
  n = super.visit(e, t, n);
@@ -1852,7 +1932,7 @@ var te = class {
1852
1932
  json: i
1853
1933
  }, i;
1854
1934
  }
1855
- }, Be = class extends H {
1935
+ }, Ue = class extends U {
1856
1936
  visit(e, t, n) {
1857
1937
  if (!t) return;
1858
1938
  n = super.visit(e, t, n);
@@ -1865,7 +1945,6 @@ var te = class {
1865
1945
  Object.keys(e).length > 0 && (n.locks = e);
1866
1946
  }
1867
1947
  }
1868
- e.warn(`'${n.name}' is not editable; imported as a fixed drawing.`);
1869
1948
  let i = e.evaluate("*/cNvPr", t);
1870
1949
  i?.item && (i = i.item(0));
1871
1950
  let a = i?.getAttribute?.("id"), o = a ? parseInt(a, 10) : void 0, s = {
@@ -1878,7 +1957,7 @@ var te = class {
1878
1957
  json: s
1879
1958
  }, s;
1880
1959
  }
1881
- }, Ve = class {
1960
+ }, We = class {
1882
1961
  visit(e, t, n) {
1883
1962
  let r = [], i = /* @__PURE__ */ new Map(), a = {
1884
1963
  cells: [],
@@ -1987,8 +2066,8 @@ var te = class {
1987
2066
  }
1988
2067
  }, $ = class {
1989
2068
  visit(e, t, n) {
1990
- let r = e.getVisitorParamsState().get(U);
1991
- r || (r = [], e.getVisitorParamsState().set(U, r));
2069
+ let r = e.getVisitorParamsState().get(W);
2070
+ r || (r = [], e.getVisitorParamsState().set(W, r));
1992
2071
  let i = t.childNodes, a = i.length;
1993
2072
  for (let t = 0; t < a; t++) {
1994
2073
  let n = i.item(t);
@@ -2012,12 +2091,12 @@ var te = class {
2012
2091
  }
2013
2092
  }
2014
2093
  }
2015
- }, He = class {
2094
+ }, Ge = class {
2016
2095
  visit(e, t, n) {
2017
2096
  let r = e.getVisitorParamsState().get("richTypes");
2018
2097
  if (!r) return void e.warn("RichValueFound but not type.");
2019
- let i = e.getVisitorParamsState().get(W);
2020
- i || (i = [], e.getVisitorParamsState().set(W, i));
2098
+ let i = e.getVisitorParamsState().get(G);
2099
+ i || (i = [], e.getVisitorParamsState().set(G, i));
2021
2100
  let a = t.childNodes, o = a.length;
2022
2101
  for (let t = 0; t < o; t++) {
2023
2102
  let n = a.item(t);
@@ -2034,7 +2113,7 @@ var te = class {
2034
2113
  if (t.type === "_error") {
2035
2114
  let e = t.errorType;
2036
2115
  if (e) try {
2037
- t = p.getBuiltInByCode(e + 1) ?? p.BuiltIn.Unknown;
2116
+ t = h.getBuiltInByCode(e + 1) ?? h.BuiltIn.Unknown;
2038
2117
  } catch {}
2039
2118
  }
2040
2119
  return t;
@@ -2053,7 +2132,7 @@ var te = class {
2053
2132
  }
2054
2133
  }
2055
2134
  }
2056
- }, Ue = class {
2135
+ }, Ke = class {
2057
2136
  visit(e, t, n) {
2058
2137
  if (!t) return;
2059
2138
  let r = [];
@@ -2072,83 +2151,103 @@ var te = class {
2072
2151
  }
2073
2152
  }
2074
2153
  }
2075
- }, We = class {
2154
+ }, qe = class {
2076
2155
  visit(e, t, n) {
2077
2156
  if (!t) return;
2078
- let r = {}, i = t.getAttribute("ref");
2079
- e.copyFromAttribute(t, "authorId", r, "personId", e.INT_COPY), r.asNote = !0;
2080
- let a = {
2081
- r: i,
2082
- v: r
2083
- };
2084
- return n.push(a), r;
2157
+ let r = t.getAttribute("ref");
2158
+ if (!r) return;
2159
+ let i = { content: "" };
2160
+ if (t.hasAttribute("authorId")) {
2161
+ let e = parseInt(t.getAttribute("authorId"), 10);
2162
+ isNaN(e) || (i.authorId = e);
2163
+ }
2164
+ return i.content = function(e) {
2165
+ if (!e) return "";
2166
+ let t = [], n = !0, r = e.childNodes;
2167
+ for (let e = 0; e < r.length; e++) {
2168
+ let i = r.item(e);
2169
+ if (i.nodeType === 1) {
2170
+ if (i.localName === "t") t.push({ text: i.textContent ?? "" });
2171
+ else if (i.localName === "r") {
2172
+ let e = { text: "" }, r = i.childNodes;
2173
+ for (let t = 0; t < r.length; t++) {
2174
+ let n = r.item(t);
2175
+ n.nodeType === 1 && (n.localName === "t" ? e.text += n.textContent ?? "" : n.localName === "rPr" && ue(n, e));
2176
+ }
2177
+ Object.keys(e).length > 1 && (n = !1), t.push(e);
2178
+ }
2179
+ }
2180
+ }
2181
+ return t.length === 0 ? e.textContent ?? "" : n ? t.map((e) => e.text).join("") : { runs: t };
2182
+ }(e.evaluate("text", t)), n.push({
2183
+ r,
2184
+ v: i
2185
+ }), i;
2085
2186
  }
2086
- }, Ge = class {
2187
+ }, Je = class {
2087
2188
  visit(e, t, n) {
2088
2189
  if (!t) return;
2089
2190
  let r = [];
2090
2191
  return n.comments = r, r;
2091
2192
  }
2092
- }, Ke = class {
2193
+ }, Ye = class {
2093
2194
  visit(e, t, n) {
2094
2195
  if (!t) return;
2095
2196
  let r = {};
2096
- e.copyFromAttribute(t, "id", r, "id", i);
2197
+ e.copyFromAttribute(t, "id", r, "id", s);
2097
2198
  let a = t.getAttribute("ref");
2098
- e.copyFromAttribute(t, "personId", r, "personId", i), e.copyFromAttribute(t, "parentId", r, "parentId", i), e.copyFromAttribute(t, "dT", r), t.hasAttribute("done") && (r.done = l(t.getAttribute("done")));
2099
- let o = {
2199
+ return e.copyFromAttribute(t, "personId", r, "personId", s), e.copyFromAttribute(t, "parentId", r, "parentId", s), e.copyFromAttribute(t, "dT", r, "dt"), t.hasAttribute("done") && (r.done = i(t.getAttribute("done"))), n.push({
2100
2200
  r: a,
2101
2201
  v: r
2102
- };
2103
- return n.push(o), r;
2202
+ }), r;
2104
2203
  }
2105
- }, qe = class {
2204
+ }, Xe = class {
2106
2205
  visit(e, t, n) {
2107
- let r = [], a = t.childNodes, o = a.length;
2108
- for (let t = 0; t < o; t++) {
2109
- let n = a.item(t);
2206
+ let r = [], i = t.childNodes, a = i.length;
2207
+ for (let t = 0; t < a; t++) {
2208
+ let n = i.item(t);
2110
2209
  if (n.nodeType === 1 && n.localName === "person") {
2111
2210
  let t = {};
2112
- e.copyFromAttribute(n, "id", t, "id", i), e.copyFromAttribute(n, "displayName", t), e.copyFromAttribute(n, "userId", t, "userId", i), e.copyFromAttribute(n, "providerId", t), r.push(t);
2211
+ e.copyFromAttribute(n, "id", t, "id", s), e.copyFromAttribute(n, "displayName", t), e.copyFromAttribute(n, "userId", t, "userId", s), e.copyFromAttribute(n, "providerId", t), r.push(t);
2113
2212
  }
2114
2213
  }
2115
2214
  return r.length > 0 && (n.persons = r), r;
2116
2215
  }
2117
- }, Je = class {
2216
+ }, Ze = class {
2118
2217
  constructor(e, t) {
2119
2218
  this.path = e, this.visitor = t;
2120
2219
  }
2121
- }, Ye = class {
2220
+ }, Qe = class {
2122
2221
  constructor() {
2123
- this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new G()), this.registerVisitor("cp:coreProperties", new le()), this.registerVisitor("Properties", new ue()), this.registerVisitor("spPr", new pe()), this.registerVisitor("txBody", new Y()), this.registerVisitor("txPr", new Y()), this.registerVisitor("c:chartSpace", new de()), this.registerVisitor("c:plotArea", new fe()), this.registerVisitor("c:barChart", new me()), this.registerVisitor("c:doughnutChart", new K()), this.registerVisitor("c:lineChart", new K()), this.registerVisitor("c:ofPieType", new K()), this.registerVisitor("c:pieChart", new K()), this.registerVisitor("c:scatterChart", new K()), this.registerVisitor("c:barChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new q("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new he()), this.registerVisitor("c:dPt", new ge()), this.registerVisitor("c:marker", new _e()), this.registerVisitor("c:catAx", new J()), this.registerVisitor("c:valAx", new J()), this.registerVisitor("c:dateAx", new J()), this.registerVisitor("c:majorGridlines", new N("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new N("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new Y("labels.text"), "txPr"), this.registerVisitor("c:valAx", new Y("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new Y("labels.text"), "txPr"), this.registerVisitor("c:legend", new ye()), this.registerVisitor("c:legend", new Y("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new ve()), this.registerVisitor("c:ser", new be(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new q("labels"), "dLbls"), this.registerVisitor("c:dLbl", new q("points")), this.registerVisitor("c:title", new X()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new xe()), this.registerVisitor("c:dispUnits", new N("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new X("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new Y(), "tx/rich"), this.registerVisitor("a:theme", new Se()), this.registerVisitor("a:theme", new Ce(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new we(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new Te(), "themeElements/fmtScheme"), this.registerVisitor("autoFilter", new De()), this.registerVisitor("sortState", new Oe()), this.registerVisitor("s:workbook", new ke()), this.registerVisitor("styleSheet", new Z()), this.registerVisitor("x14:table", new je()), this.registerVisitor("table", new Ae()), this.registerVisitor("externalLink", new Me()), this.registerVisitor("hlinkClick", new Ee()), this.registerVisitor("wsDr", new Fe()), this.registerVisitor("twoCellAnchor", new Q()), this.registerVisitor("oneCellAnchor", new Q()), this.registerVisitor("absoluteAnchor", new Q()), this.registerVisitor("graphicFrame", new Ie()), this.registerVisitor("sp", new Le()), this.registerVisitor("grpSp", new ze()), this.registerVisitor("cxnSp", new Be()), this.registerVisitor("pic", new Re()), this.registerVisitor("metadata", new Ve()), this.registerVisitor("rvStructures", new $()), this.registerVisitor("rvData", new He()), this.registerVisitor("comments", new Ue()), this.registerVisitor("comment", new We()), this.registerVisitor("comment", new Y("content"), "text"), this.registerVisitor("ThreadedComments", new Ge()), this.registerVisitor("threadedComment", new Ke()), this.registerVisitor("threadedComment", new Y("content"), "text"), this.registerVisitor("personList", new qe()), this.registerVisitor("slicerCacheDefinition", new Ne()), this.registerVisitor("slicers", new Pe());
2222
+ this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new de()), this.registerVisitor("cp:coreProperties", new fe()), this.registerVisitor("Properties", new pe()), this.registerVisitor("spPr", new ge()), this.registerVisitor("txBody", new Y()), this.registerVisitor("txPr", new Y()), this.registerVisitor("c:chartSpace", new me()), this.registerVisitor("c:plotArea", new he()), this.registerVisitor("c:barChart", new _e()), this.registerVisitor("c:doughnutChart", new K()), this.registerVisitor("c:lineChart", new K()), this.registerVisitor("c:ofPieType", new K()), this.registerVisitor("c:pieChart", new K()), this.registerVisitor("c:scatterChart", new K()), this.registerVisitor("c:barChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new q("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new ve()), this.registerVisitor("c:dPt", new ye()), this.registerVisitor("c:marker", new be()), this.registerVisitor("c:catAx", new J()), this.registerVisitor("c:valAx", new J()), this.registerVisitor("c:dateAx", new J()), this.registerVisitor("c:majorGridlines", new P("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new P("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new Y("labels.text"), "txPr"), this.registerVisitor("c:valAx", new Y("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new Y("labels.text"), "txPr"), this.registerVisitor("c:legend", new Se()), this.registerVisitor("c:legend", new Y("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new xe()), this.registerVisitor("c:ser", new Ce(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new q("labels"), "dLbls"), this.registerVisitor("c:dLbl", new q("points")), this.registerVisitor("c:title", new X()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new we()), this.registerVisitor("c:dispUnits", new P("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new X("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new Y(), "tx/rich"), this.registerVisitor("a:theme", new Te()), this.registerVisitor("a:theme", new Ee(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new De(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new Oe(), "themeElements/fmtScheme"), this.registerVisitor("autoFilter", new Ae()), this.registerVisitor("sortState", new je()), this.registerVisitor("s:workbook", new Me()), this.registerVisitor("styleSheet", new Z()), this.registerVisitor("x14:table", new Pe()), this.registerVisitor("table", new Ne()), this.registerVisitor("externalLink", new Fe()), this.registerVisitor("hlinkClick", new ke()), this.registerVisitor("wsDr", new Re()), this.registerVisitor("twoCellAnchor", new Q()), this.registerVisitor("oneCellAnchor", new Q()), this.registerVisitor("absoluteAnchor", new Q()), this.registerVisitor("graphicFrame", new ze()), this.registerVisitor("sp", new Be()), this.registerVisitor("grpSp", new He()), this.registerVisitor("cxnSp", new Ue()), this.registerVisitor("pic", new Ve()), this.registerVisitor("metadata", new We()), this.registerVisitor("rvStructures", new $()), this.registerVisitor("rvData", new Ge()), this.registerVisitor("comments", new Ke()), this.registerVisitor("comment", new qe()), this.registerVisitor("ThreadedComments", new Je()), this.registerVisitor("threadedComment", new Ye()), this.registerVisitor("threadedComment", new Y("content"), "text"), this.registerVisitor("personList", new Xe()), this.registerVisitor("slicerCacheDefinition", new Ie()), this.registerVisitor("slicers", new Le());
2124
2223
  }
2125
2224
  registerVisitor(e, t, n = null) {
2126
2225
  e.indexOf(":") === -1 && (e = "*:" + e);
2127
2226
  let r = e.split(":"), i = r.length > 1 ? r[1] : r[0];
2128
2227
  if (!n) return this.visitorsByXmlTagName.set(i, t), void this.visitorsByXmlTagName.set(e, t);
2129
2228
  let a = this.scopedVisitorsByXmlTagName.get(i);
2130
- a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new Je(n, t));
2229
+ a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new Ze(n, t));
2131
2230
  }
2132
- parseDxf(e, t = "") {
2231
+ parseDxf(e, t = "", n = p.EmptyObject) {
2133
2232
  this.visitorParamsState ||= /* @__PURE__ */ new Map();
2134
- let n = this.visitorParamsState, r = n.get("processingDXFs");
2135
- n.set("processingDXFs", !0);
2233
+ let r = this.visitorParamsState, i = r.get("processingDXFs");
2234
+ r.set("processingDXFs", !0);
2136
2235
  try {
2137
- let n = new C(null, this, "/dxf", e, {}, t), r = {};
2138
- return new Z().processDXF(n, e, r), r;
2236
+ let r = new T(null, this, "/dxf", e, {}, t, n), i = {};
2237
+ return new Z().processDXF(r, e, i), i;
2139
2238
  } finally {
2140
- r === void 0 ? n.delete("processingDXFs") : n.set("processingDXFs", r);
2239
+ i === void 0 ? r.delete("processingDXFs") : r.set("processingDXFs", i);
2141
2240
  }
2142
2241
  }
2143
2242
  getVisitorParamsState() {
2144
2243
  return this.visitorParamsState;
2145
2244
  }
2146
- transform(e, t, n = d.EmptyObject) {
2245
+ transform(e, t, n = p.EmptyObject) {
2147
2246
  let r = e.documentElement;
2148
2247
  this.visitorParamsState && !n?.paramMap || (this.visitorParamsState = n?.paramMap ?? /* @__PURE__ */ new Map());
2149
2248
  let i = {}, a = this.visitorsByXmlTagName.get(r.nodeName);
2150
2249
  if (a ||= this.visitorsByXmlTagName.get(r.localName), !a) throw Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);
2151
- let o = "/" + r.localName, s = new C(null, this, o, r, i, t, n), c = [];
2250
+ let o = "/" + r.localName, s = new T(null, this, o, r, i, t, n), c = [];
2152
2251
  this._doWalk(a, s, c, r, i, t, n);
2153
2252
  let l = c.length;
2154
2253
  for (let e = 0; e < l; e++) {
@@ -2156,7 +2255,7 @@ var te = class {
2156
2255
  try {
2157
2256
  t.visitor?.afterVisit?.(t.context, t.elemParent, t.jsonParent);
2158
2257
  } catch (e) {
2159
- console.warn(`Error in afterVisit: ${t.context.getPath()}`, e);
2258
+ t.context.warn(`Unable to finish reading '${t.context.getPath()}': ${e?.message ?? e}`, { onceKey: "xlsx.transform.afterVisit" });
2160
2259
  }
2161
2260
  }
2162
2261
  return i;
@@ -2168,7 +2267,7 @@ var te = class {
2168
2267
  try {
2169
2268
  u = t.evaluate(c.path, r);
2170
2269
  } catch {
2171
- console.warn(`"Invalid path '${c.path}' for '${e}'.`);
2270
+ t.warn(`Invalid path '${c.path}' for '${e}'.`, { onceKey: "xlsx.transform.invalidPath" });
2172
2271
  }
2173
2272
  if (!u) continue;
2174
2273
  let d = (e) => {
@@ -2176,7 +2275,7 @@ var te = class {
2176
2275
  for (; l && l !== r;) s = l.localName + "/" + s, l = l.parentNode;
2177
2276
  let u = t.getPath() + "/" + s;
2178
2277
  if (c.visitor) {
2179
- let r = new C(t, this, u, t.getElemRoot(), t.getJsonRoot(), a, o);
2278
+ let r = new T(t, this, u, t.getElemRoot(), t.getJsonRoot(), a, o);
2180
2279
  this._doWalk(c.visitor, r, n, e, i, a, o);
2181
2280
  }
2182
2281
  };
@@ -2202,10 +2301,10 @@ var te = class {
2202
2301
  if (r.nodeType !== 1) continue;
2203
2302
  let c = r, p = c.nodeName, m = l.get(p);
2204
2303
  m ||= (p = c.localName, l.get(p));
2205
- let h = t.getPath() + "/" + p, g = new C(t, this, h, u, d, a, o);
2304
+ let h = t.getPath() + "/" + p, g = new T(t, this, h, u, d, a, o);
2206
2305
  this._doWalk(m, g, n, c, s ?? i, a, o);
2207
2306
  }
2208
2307
  return s;
2209
2308
  }
2210
2309
  };
2211
- export { Ye as DOMTransformer, C as ExecutionContext, u as NumberUtils, w as VisitorUtils };
2310
+ export { Qe as DOMTransformer, T as ExecutionContext, u as NumberUtils, oe as VisitorUtils };