@sheetxl/io-xlsx 0.8.0-beta.9 → 1.0.0

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 (205) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/7rZlWcm56hn3Jmnk.mjs +7021 -0
  3. package/browser/esm/AZus_5slvoIVhf1u.mjs +10323 -0
  4. package/browser/esm/B9QfzGvsvg-V3utu.mjs +4632 -0
  5. package/browser/esm/{C-2KaUyV4gs-sDTZ.mjs → BIR_Si489gIkGOnc.mjs} +194 -144
  6. package/browser/esm/{DsSIg46AR7IFBN5N.mjs → BJFvc-i40R4rPZ5y.mjs} +939 -804
  7. package/browser/esm/{D-epcZSoKLbsAIaC.mjs → BX8Ebx4NC5zp7_3J.mjs} +3 -3
  8. package/browser/esm/{CxtFawTfwRTCC4Xr.mjs → Bnxw38IvtA04zXEE.mjs} +2 -2
  9. package/browser/esm/CfVhYH77KdrR3fEK.mjs +24 -0
  10. package/browser/esm/index.mjs +3 -4
  11. package/browser/esm/jIQks3Crw6jehdDU.mjs +2474 -0
  12. package/browser/esm/{CRrTMRdN_IcSA_pm.mjs → qc9hnuR2z-whY8YO.mjs} +3 -3
  13. package/browser/esm/wZGpmkMUubNjClhG.mjs +104 -0
  14. package/licenses/dependencies.txt +2 -2
  15. package/node/esm/{BsTMtvwpQoPNv95M.mjs → BNLHWJHyy5eB0P_4.mjs} +2 -2
  16. package/node/esm/CVtsY2F9A9NzEGLk.mjs +2478 -0
  17. package/node/esm/CoeQ0LO-nNXiowwv.mjs +7284 -0
  18. package/node/esm/CxY3iIYLXVhCebeV.mjs +4746 -0
  19. package/node/esm/D2CZy9TQM9h2uqBh.mjs +2562 -0
  20. package/node/esm/{BCr4lCI6qQXXN0K1.mjs → Dm0hvKcR4xb0TV_N.mjs} +3 -3
  21. package/node/esm/_IA1gQ-zFQYQSZSs.mjs +6957 -0
  22. package/node/esm/index.mjs +65 -28
  23. package/node/esm/{CBtj0-a4l2qux2hA.mjs → zZFe3mW0xjmobowq.mjs} +3 -3
  24. package/package.json +9 -10
  25. package/types/src/AutoFilterRules.d.ts +34 -44
  26. package/types/src/ConditionalFormatRules.d.ts +2 -2
  27. package/types/src/DataTableFormula.d.ts +26 -0
  28. package/types/src/DataValidationRules.d.ts +0 -5
  29. package/types/src/DefinedNameAttributes.d.ts +8 -0
  30. package/types/src/ExcelCalcStamp.d.ts +0 -36
  31. package/types/src/ExcelCompat.d.ts +15 -143
  32. package/types/src/ExcelFunctionFacts.d.ts +0 -272
  33. package/types/src/ExcelReservedNames.d.ts +0 -65
  34. package/types/src/KnownFonts.d.ts +37 -0
  35. package/types/src/LegacyFormula.d.ts +1 -46
  36. package/types/src/OOXMLExtensions.d.ts +24 -2
  37. package/types/src/PageLayoutAttributes.d.ts +8 -0
  38. package/types/src/Plugin.d.ts +15 -3
  39. package/types/src/ProtectionAttributes.d.ts +2 -2
  40. package/types/src/SheetKinds.d.ts +42 -0
  41. package/types/src/SheetViewAttributes.d.ts +4 -0
  42. package/types/src/SortExtent.d.ts +16 -0
  43. package/types/src/SourcePackage.d.ts +0 -44
  44. package/types/src/SparklineGroups.d.ts +52 -0
  45. package/types/src/Types.d.ts +13 -3
  46. package/types/src/XlsxHeader.d.ts +19 -0
  47. package/types/src/chart/ChartExXml.d.ts +38 -0
  48. package/types/src/chart/ChartPartXml.d.ts +47 -0
  49. package/types/src/chart/ChartSpaceXml.d.ts +37 -0
  50. package/types/src/chart/_XmlTree.d.ts +34 -0
  51. package/types/src/chart/_chartCodecs.d.ts +12 -0
  52. package/types/src/chart/_chartExCodecs.d.ts +7 -0
  53. package/types/src/chart/_chartExFold.d.ts +14 -0
  54. package/types/src/chart/_chartExMarkup.d.ts +236 -0
  55. package/types/src/chart/_chartExStyle.d.ts +13 -0
  56. package/types/src/chart/_codec.d.ts +78 -0
  57. package/types/src/chart/_drawingml.d.ts +10 -0
  58. package/types/src/chart/_xml.d.ts +70 -0
  59. package/types/src/pivot/PivotArea.d.ts +20 -0
  60. package/types/src/pivot/PivotCacheRead.d.ts +30 -0
  61. package/types/src/pivot/PivotCacheWrite.d.ts +23 -0
  62. package/types/src/pivot/PivotFilters.d.ts +29 -0
  63. package/types/src/pivot/PivotFormats.d.ts +60 -0
  64. package/types/src/pivot/PivotTableRead.d.ts +44 -0
  65. package/types/src/pivot/PivotTableWrite.d.ts +13 -0
  66. package/types/src/pivot/_PivotCacheXml.d.ts +48 -0
  67. package/types/src/pivot/_PivotTableXml.d.ts +23 -0
  68. package/types/src/reader/CellControls.d.ts +18 -0
  69. package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
  70. package/types/src/reader/DummyFunctionUnwrap.d.ts +43 -23
  71. package/types/src/reader/HeaderStyles.d.ts +15 -0
  72. package/types/src/reader/IsoDateCell.d.ts +20 -0
  73. package/types/src/reader/LibreOfficeDataTable.d.ts +12 -0
  74. package/types/src/reader/PivotButtons.d.ts +14 -0
  75. package/types/src/reader/PivotCellFormats.d.ts +22 -0
  76. package/types/src/reader/SlicerJoin.d.ts +26 -0
  77. package/types/src/reader/ZipReader.d.ts +1 -1
  78. package/types/src/reader/_SlicerRecord.d.ts +59 -0
  79. package/types/src/reader/dom/DOMTransformer.d.ts +2 -2
  80. package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
  81. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +3 -11
  82. package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +8 -1
  83. package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
  84. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +13 -6
  85. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +9 -0
  86. package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +10 -7
  87. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +22 -13
  88. package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +5 -5
  89. package/types/src/reader/domVisitors/DrawingVisitor.d.ts +4 -2
  90. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -11
  91. package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +18 -0
  92. package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +0 -11
  93. package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
  94. package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
  95. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  96. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +26 -5
  97. package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +11 -2
  98. package/types/src/reader/domVisitors/SlicersVisitor.d.ts +9 -3
  99. package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
  100. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  101. package/types/src/reader/domVisitors/TimelinesVisitor.d.ts +13 -0
  102. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +0 -9
  103. package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
  104. package/types/src/reader/domVisitors/index.d.ts +6 -34
  105. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
  106. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +31 -6
  107. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +26 -8
  108. package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
  109. package/types/src/richValue/IRichValueHandler.d.ts +109 -0
  110. package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
  111. package/types/src/richValue/RichDataParts.d.ts +69 -0
  112. package/types/src/richValue/RichRecordWriter.d.ts +61 -0
  113. package/types/src/richValue/RichValueHandlers.d.ts +25 -0
  114. package/types/src/richValue/RichValueResolver.d.ts +54 -0
  115. package/types/src/richValue/WebImageRichValueHandler.d.ts +37 -0
  116. package/types/src/richValue/index.d.ts +7 -0
  117. package/types/src/utils/DrawingMLText.d.ts +2 -2
  118. package/types/src/utils/FormControls.d.ts +79 -6
  119. package/types/src/utils/SharedNames.d.ts +13 -0
  120. package/types/src/utils/SpreadsheetFont.d.ts +38 -0
  121. package/types/src/utils/VmlNoteShapes.d.ts +25 -32
  122. package/types/src/utils/VmlNoteStyle.d.ts +25 -0
  123. package/types/src/utils/VmlPrefixes.d.ts +24 -0
  124. package/types/src/vba/VBAProject.d.ts +0 -19
  125. package/types/src/writer/EvaluationSheet.d.ts +5 -0
  126. package/types/src/writer/builder/OpcXmlUtils.d.ts +0 -8
  127. package/types/src/writer/builder/PackageBuilder.d.ts +2 -41
  128. package/types/src/writer/builder/Types.d.ts +18 -28
  129. package/types/src/writer/emitters/CommentsEmitter.d.ts +3 -3
  130. package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
  131. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +0 -11
  132. package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +8 -0
  133. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
  134. package/types/src/writer/emitters/PivotTableEmitter.d.ts +30 -1
  135. package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
  136. package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
  137. package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
  138. package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
  139. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
  140. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
  141. package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
  142. package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
  143. package/types/src/writer/emitters/SlicerEmitter.d.ts +132 -0
  144. package/types/src/writer/emitters/StylesEmitter.d.ts +35 -2
  145. package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
  146. package/types/src/writer/emitters/WorkbookEmitter.d.ts +24 -2
  147. package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
  148. package/types/src/writer/utils/AutoFilter.d.ts +3 -3
  149. package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
  150. package/types/src/writer/utils/DateSystem.d.ts +6 -0
  151. package/types/src/writer/utils/DefaultRows.d.ts +22 -0
  152. package/types/src/writer/utils/DrawMLUtils.d.ts +8 -6
  153. package/types/src/writer/utils/DummyFunction.d.ts +0 -25
  154. package/types/src/writer/utils/DxfCollector.d.ts +14 -11
  155. package/types/src/writer/utils/PrstGeomUtils.d.ts +11 -3
  156. package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
  157. package/types/src/writer/utils/SheetStyleLayout.d.ts +86 -0
  158. package/types/src/writer/utils/TextUtils.d.ts +6 -1
  159. package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
  160. package/types/src/writer/utils/XfVariants.d.ts +61 -0
  161. package/browser/cjs/B0Ugu_crqQYpdfQz.cjs +0 -1
  162. package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +0 -1
  163. package/browser/cjs/BHM3_D9PsNURVAVy.cjs +0 -1
  164. package/browser/cjs/BHWdwAQ322YA8JAZ.cjs +0 -6
  165. package/browser/cjs/CeuX8p1aBuKTuagi.cjs +0 -2
  166. package/browser/cjs/D3EWCPfCu-qMOIGd.cjs +0 -1
  167. package/browser/cjs/DSM4q1dhVVXvsgby.cjs +0 -30
  168. package/browser/cjs/DiAHwNv2I8RHE9GY.cjs +0 -1
  169. package/browser/cjs/index.cjs +0 -1
  170. package/browser/cjs/wrpXlaSBGEicQf6_.cjs +0 -6
  171. package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
  172. package/browser/esm/Bu64BYvRAlVftMr1.mjs +0 -67
  173. package/browser/esm/CWt4fDYEbj2hvsl_.mjs +0 -3346
  174. package/browser/esm/Ccnxz-y2WBEgfvvh.mjs +0 -6498
  175. package/browser/esm/Dx64JMAGwNNDBkC1.mjs +0 -4928
  176. package/browser/esm/Sv4twwEJDb9dZ91h.mjs +0 -149
  177. package/node/esm/BPn5XBizKkwaUqXB.mjs +0 -4285
  178. package/node/esm/BVV11IlqF6Lmlv8D.mjs +0 -154
  179. package/node/esm/BiJEEgltJzx94zIR.mjs +0 -3433
  180. package/node/esm/CkmZuMvRTpva7eQu.mjs +0 -5074
  181. package/node/esm/j0RE2usgdljRw_gr.mjs +0 -2345
  182. package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
  183. package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
  184. package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
  185. package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
  186. package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
  187. package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
  188. package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
  189. package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
  190. package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
  191. package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
  192. package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
  193. package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
  194. package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
  195. package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
  196. package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
  197. package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
  198. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
  199. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
  200. package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
  201. package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
  202. package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
  203. package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
  204. package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
  205. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +0 -28
@@ -1,14 +1,15 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.9
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v1.0.0
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { A as e, C as t, D as n, E as r, J as i, M as a, N as o, O as s, Qt as c, S as l, T as u, Y as d, _t as f, at as p, et as m, j as h, k as g, ot as ee, vt as _, w as v, x as y, y as b, yt as x } from "./Ccnxz-y2WBEgfvvh.mjs";
8
- import { c as S, s as C, t as te } from "./Sv4twwEJDb9dZ91h.mjs";
9
- import { CommonUtils as w } from "@sheetxl/utils";
10
- import { AddressUtils as T, FormulaError as E, IBorders as D, ICondition as O, IFill as k, IFont as A, IRange as ne, IShape as j, IStyle as M, ITextFrame as N, ShapeStyleUtils as re, Sort as P, Tuple as F } from "@sheetxl/sdk";
11
- var I = class {
7
+ import { A as e, B as t, Cr as n, Ct as r, Dt as i, F as a, Ht as o, I as s, L as c, M as l, Mr as u, N as d, Nt as f, P as p, R as m, St as h, Tt as g, Ut as _, V as ee, Wt as v, bt as te, dn as ne, er as y, fn as re, gt as ie, in as ae, j as b, jr as x, jt as oe, k as S, mn as se, r as ce, rn as le, t as ue, tr as C, v as de, vt as fe, wt as w, xt as T, yn as pe, z as me } from "./AZus_5slvoIVhf1u.mjs";
8
+ import { a as he, i as ge, n as _e, r as ve } from "./B9QfzGvsvg-V3utu.mjs";
9
+ import { c as ye, l as be, o as xe, r as Se, s as Ce } from "./jIQks3Crw6jehdDU.mjs";
10
+ import { CommonUtils as E } from "@sheetxl/utils";
11
+ import { AddressUtils as D, FormulaError as O, IBorders as k, ICellStyle as A, ICondition as j, IFill as M, IFont as N, IRange as we, IShape as P, ISlicerStyle as F, ITextFrame as I, ShapeStyleUtils as Te, Sort as L, Tuple as Ee } from "@sheetxl/sdk";
12
+ var De = class {
12
13
  constructor(e) {
13
14
  this.list = e;
14
15
  }
@@ -34,14 +35,14 @@ var I = class {
34
35
  [Symbol.iterator]() {
35
36
  return this.list.values();
36
37
  }
37
- }, L = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, R = (e) => {
38
+ }, Oe = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, ke = (e) => {
38
39
  let t = parseInt(e);
39
40
  return isNaN(t) ? null : t;
40
- }, z = (e) => {
41
+ }, Ae = (e) => {
41
42
  let t = parseFloat(e);
42
43
  return isNaN(t) ? null : t;
43
- }, B = /* @__PURE__ */ new Map(), V = class {
44
- constructor(e, t, n, r, i, a = null, o = w.EmptyObject) {
44
+ }, je = /* @__PURE__ */ new Map(), R = class {
45
+ constructor(e, t, n, r, i, a = null, o = E.EmptyObject) {
45
46
  this._fileLocation = "";
46
47
  let s = (e, t, n) => o?.getRef?.(e, t, n, o?.parsedRefs), c = (e) => o?.getRefs?.(e, o?.parsedRefs);
47
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);
@@ -53,7 +54,7 @@ var I = class {
53
54
  return this._readEmbeddedPart?.(e, this._fileLocation) ?? null;
54
55
  }
55
56
  getRelationships() {
56
- return this._getRefs?.(this._fileLocation) ?? B;
57
+ return this._getRefs?.(this._fileLocation) ?? je;
57
58
  }
58
59
  getPath() {
59
60
  return this.currentPath;
@@ -89,29 +90,31 @@ var I = class {
89
90
  let t = r[e];
90
91
  if (t === "" || t === ".") continue;
91
92
  let a = [], o = (t === "*" || t === "**") && e !== i - 1;
92
- for (let i of n) if (i) if (o) {
93
- let t = r[e + 1];
94
- t && t !== "" && t !== "." && (this._findDescendants(i, t, a), e++);
95
- } else if (t === "*" || t === "**") {
96
- if (!i.childNodes) continue;
97
- let e = i.childNodes, t = e.length;
98
- for (let n = 0; n < t; n++) {
99
- let t = e[n];
100
- t.nodeType === 1 && a.push(t);
101
- }
102
- } else {
103
- if (!i.childNodes) continue;
104
- let e = i.childNodes, n = e.length;
105
- for (let r = 0; r < n; r++) {
106
- let n = e[r];
107
- if (n.nodeType !== 1) continue;
108
- let i = n;
109
- this._matchesElementName(i, t) && a.push(i);
93
+ for (let i of n) if (i) {
94
+ if (o) {
95
+ let t = r[e + 1];
96
+ t && t !== "" && t !== "." && (this._findDescendants(i, t, a), e++);
97
+ } else if (t === "*" || t === "**") {
98
+ if (!i.childNodes) continue;
99
+ let e = i.childNodes, t = e.length;
100
+ for (let n = 0; n < t; n++) {
101
+ let t = e[n];
102
+ t.nodeType === 1 && a.push(t);
103
+ }
104
+ } else {
105
+ if (!i.childNodes) continue;
106
+ let e = i.childNodes, n = e.length;
107
+ for (let r = 0; r < n; r++) {
108
+ let n = e[r];
109
+ if (n.nodeType !== 1) continue;
110
+ let i = n;
111
+ this._matchesElementName(i, t) && a.push(i);
112
+ }
110
113
  }
111
114
  }
112
115
  if (n = a, n.length === 0) return null;
113
116
  }
114
- return n.length === 1 ? n[0] : n.length === 0 ? null : new I(n);
117
+ return n.length === 1 ? n[0] : n.length === 0 ? null : new De(n);
115
118
  }
116
119
  _matchesElementName(e, t) {
117
120
  return t.includes(":") ? (e.tagName || e.nodeName) === t : e.localName === t;
@@ -127,10 +130,10 @@ var I = class {
127
130
  }
128
131
  }
129
132
  getFromPath(e, t) {
130
- return w.getFromPath(e, t);
133
+ return E.getFromPath(e, t);
131
134
  }
132
135
  setToPath(e, t, n) {
133
- return w.setToPath(e, t, n);
136
+ return E.setToPath(e, t, n);
134
137
  }
135
138
  getValAttrAsString(e, t) {
136
139
  let n = this.evaluate(e, t);
@@ -151,13 +154,13 @@ var I = class {
151
154
  return n && n.hasAttribute("val") ? parseFloat(n.getAttribute("val")) ?? null : null;
152
155
  }
153
156
  get BOOLEAN_COPY() {
154
- return L;
157
+ return Oe;
155
158
  }
156
159
  get INT_COPY() {
157
- return R;
160
+ return ke;
158
161
  }
159
162
  get FLOAT_COPY() {
160
- return z;
163
+ return Ae;
161
164
  }
162
165
  copyFromAttribute(e, t, n, r = t, i = null) {
163
166
  if (!e || !n || !e.hasAttribute(t)) return;
@@ -170,65 +173,123 @@ var I = class {
170
173
  }
171
174
  this.setToPath(n, r, a);
172
175
  }
173
- }, H = class {
174
- constructor(e) {
175
- this.jsonKey = e;
176
+ }, z = (e, t) => {
177
+ let n = [], r = e.childNodes, i = r.length;
178
+ for (let e = 0; e < i; e++) {
179
+ let i = r.item(e);
180
+ i.nodeType === 1 && i.localName === t && n.push(i);
176
181
  }
182
+ return n;
183
+ }, Me = [
184
+ ["fillRef", "fill"],
185
+ ["lnRef", "stroke"],
186
+ ["effectRef", "effect"]
187
+ ], B = (e, t) => {
188
+ let n = new p(), r = {};
189
+ for (let [i, a] of Me) {
190
+ let o = e.evaluate(i, t);
191
+ if (!o) continue;
192
+ let s = { index: parseInt(o.getAttribute("idx") ?? "0", 10) || 0 }, c = n.processAdjColor(e, o);
193
+ c && (s.color = c), r[a] = s;
194
+ }
195
+ let i = e.evaluate("fontRef", t);
196
+ if (i) {
197
+ let t = { index: i.getAttribute("idx") ?? "none" }, a = n.processAdjColor(e, i);
198
+ a && (t.color = a), r.font = t;
199
+ }
200
+ return r;
201
+ }, V = class {
177
202
  visit(e, t, n) {
178
- let r = {};
179
- return n[this.jsonKey] = r, r;
203
+ if (!t) return;
204
+ let r = e.evaluate("*/cNvPr", t);
205
+ 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), this.readNonVisualDetails(e, r, n), e.copyFromAttribute(r, "id", n)), n;
180
206
  }
181
- }, U = class {
182
- visit(t, n, r) {
183
- let i = {};
184
- if (a(t, n, i, "grouping", "grouping"), g(t, n, i, "varyColors", "varyColors"), e(t, n, i, "gapWidth", "gapWidth", .01), e(t, n, i, "overlap", "overlap", .01), this.parseType(t, n, i), h(t, n, i, "bubbleScale", "bubbleScale"), g(t, n, i, "showNegBubbles", "showNegativeBubbleValues"), g(t, n, i, "sizeRepresents", "bubbleSizeRepresentsWidth"), h(t, n, i, "firstSliceAng", "startAngle"), h(t, n, i, "holeSize", "holeSize"), a(t, n, i, "scatterStyle", "scatterStyle"), this.parseAxisIds(t, n, i), Object.keys(i).length > 0) {
185
- let e = t.getVisitorParamsState().get("types");
186
- e || (t.warn("A chart type was read outside a chart; its types were started fresh.", { onceKey: "xlsx.chart.typesState" }), e = [], t.getVisitorParamsState().set("types", e)), e.push(i);
187
- }
188
- return i;
207
+ readNonVisualDetails(e, t, n) {
208
+ t.hasAttribute("title") && (n.title = t.getAttribute("title"));
209
+ let r = e.evaluate("hlinkClick", t);
210
+ r && (n.hyperlink = l(e, r));
211
+ let i = e.evaluate("hlinkHover", t);
212
+ i && (n.hoverHyperlink = l(e, i));
213
+ let a = e.evaluate("extLst", t), o = a ? e.serializeElement(a) : null;
214
+ o && (n.extLst = {
215
+ ...n.extLst,
216
+ nonVisual: o
217
+ });
189
218
  }
190
- parseType(e, t, n) {
191
- switch (t.localName) {
192
- case "areaChart":
193
- n.type = "area";
194
- break;
195
- case "bubbleChart":
196
- n.type = "bubble";
197
- break;
198
- case "doughnutChart":
199
- case "ofPieType":
200
- case "pieChart":
201
- n.type = "pie";
202
- break;
203
- case "lineChart":
204
- n.type = "line";
205
- break;
206
- case "scatterChart": n.type = "scatter";
207
- }
219
+ setContent(e, t) {
220
+ let n = e;
221
+ n.name !== void 0 && (t.name = n.name, delete n.name), n.description !== void 0 && (t.description = n.description, delete n.description);
222
+ for (let e of [
223
+ "title",
224
+ "hyperlink",
225
+ "hoverHyperlink",
226
+ "extLst"
227
+ ]) n[e] !== void 0 && (t.json && (t.json[e] = n[e]), delete n[e]);
228
+ e.content = t;
229
+ }
230
+ isGroupContent(e) {
231
+ return Array.isArray(e?.members);
232
+ }
233
+ readMemberHeader(e, t, n) {
234
+ let r = {}, i = {
235
+ anchor: void 0,
236
+ content: {
237
+ type: n,
238
+ json: r
239
+ }
240
+ }, a = e.evaluate("*/cNvPr", t);
241
+ if (a?.item && (a = a.item(0)), a) {
242
+ let n = a.getAttribute("name");
243
+ n !== null && (i.content.name = n);
244
+ let o = a.getAttribute("descr");
245
+ o && (i.content.description = o), e.copyFromAttribute(a, "hidden", i, "hidden", e.BOOLEAN_COPY), this.readNonVisualDetails(e, a, r);
246
+ let s = this.readSourceId(e, t);
247
+ s !== void 0 && (r.sourceId = s);
248
+ }
249
+ return {
250
+ movable: i,
251
+ content: r
252
+ };
208
253
  }
209
- parseAxisIds(e, t, n) {
210
- let r = e.evaluate("axId", t);
211
- r && r.length !== 0 && (n.xAxisId = r.item(0).getAttribute("val"), n.yAxisId = r.item(1).getAttribute("val"));
254
+ readStyleRefs(e, t, n) {
255
+ let r = e.evaluate("style", t);
256
+ if (!r) return void (n.style = null);
257
+ let i = B(e, r), a = Te.withoutDefaultStyleRefs({
258
+ ...n,
259
+ style: i
260
+ });
261
+ a && (n.style = a);
212
262
  }
213
- }, W = (e, t, n) => {
214
- if (!0 === e.getValAttrAsBoolean("invertIfNegative", t)) if (e.evaluate("extLst/ext/invertSolidFillFmt", t)) {
215
- if (n.fill && n.fillNegative) {
216
- let t = e.getFromPath(n, "fill.solid.adjs");
217
- t && e.setToPath(n, "fillNegative.solid.adjs", t);
263
+ readLocks(e) {
264
+ let t = e?.attributes;
265
+ if (!t || t.length === 0) return;
266
+ let n = {};
267
+ for (let e = 0; e < t.length; e++) {
268
+ let r = t.item(e);
269
+ r.name.startsWith("xmlns") || (n[r.localName ?? r.name] = _(r.value));
218
270
  }
219
- } else {
220
- let e = { val: "FFFFFF" }, t = {};
221
- t.solid = e, n.fillNegative = t;
222
- let r = { val: "000000" }, i = {};
223
- i.solid = r;
224
- let a = {};
225
- a.fill = i, n.strokeNegative = a;
271
+ return Object.keys(n).length > 0 ? n : void 0;
272
+ }
273
+ readSourceId(e, t) {
274
+ let n = e.evaluate("*/cNvPr", t);
275
+ n?.item && (n = n.item(0));
276
+ let r = n?.getAttribute?.("id"), i = r ? parseInt(r, 10) : void 0;
277
+ return i === void 0 || isNaN(i) ? void 0 : i;
226
278
  }
227
- }, G = class {
279
+ }, Ne = [
280
+ ["spDef", "shape"],
281
+ ["lnDef", "line"],
282
+ ["txDef", "text"]
283
+ ], H = (e, t) => {
284
+ let n = t.getAttribute("dxfId");
285
+ if (n === null) return;
286
+ let r = parseInt(n);
287
+ return e.getVisitorParamsState().get("dxfs")?.get(r) || (e.warn(`A color filter or sort names a format that does not exist (dxfId '${n}').`), {});
288
+ }, U = (e) => e === "1" || e === "true", W = class {
228
289
  visit(e, t, n) {}
229
290
  processDataBarColor(e, t, n, r, i = "auto") {
230
291
  if (!t) return;
231
- let a = C((e) => t.getAttribute(e), i);
292
+ let a = y((e) => t.getAttribute(e), i);
232
293
  return a && (n[r] = a), n;
233
294
  }
234
295
  processFonts(e, t, n) {
@@ -243,32 +304,42 @@ var I = class {
243
304
  }
244
305
  return n;
245
306
  }
246
- processFont(t, n, r) {
247
- t.getValAttrAsBoolean("b", n, !0) && (r.weight = 700), t.getValAttrAsBoolean("i", n, !0) && (r.style = A.Style.Italic), t.getValAttrAsBoolean("strike", n, !0) && (r.strike = !0);
248
- let i = t.evaluate("u", n);
249
- i && (r.underline = i.getAttribute("val") || A.UnderlineStyle.Single), a(t, n, r, "vertAlign", "verticalAlign"), r.verticalAlign === "superscript" ? r.verticalAlign = A.VerticalAlignment.Super : r.verticalAlign === "subscript" && (r.verticalAlign = A.VerticalAlignment.Sub), e(t, n, r, "sz", "size");
250
- let o = t.evaluate("color", n);
251
- this.processDataBarColor(t, o, r, "color"), r.color ||= "auto", a(t, n, r, "name", "family"), a(t, n, r, "rFont", "family");
252
- let s = t.evaluate("family", n);
253
- if (s) {
254
- let e = s.getAttribute("val");
307
+ processFont(e, n, i) {
308
+ e.getValAttrAsBoolean("b", n, !0) && (i.weight = 700), e.getValAttrAsBoolean("i", n, !0) && (i.style = N.Style.Italic), e.getValAttrAsBoolean("strike", n, !0) && (i.strike = w(!0));
309
+ let a = e.evaluate("u", n);
310
+ if (a) {
311
+ let e = a.getAttribute("val");
312
+ i.underline = g(e);
313
+ }
314
+ let o = T(e.evaluate("vertAlign", n)?.getAttribute("val"));
315
+ o !== void 0 && (i.baseline = o), m(e, n, i, "sz", "size");
316
+ let s = e.evaluate("color", n);
317
+ this.processDataBarColor(e, s, i, "color"), i.color ||= "auto", t(e, n, i, "name", "family"), t(e, n, i, "rFont", "family");
318
+ let l = e.evaluate("family", n);
319
+ if (l) {
320
+ let e = l.getAttribute("val");
255
321
  if (e) switch (e) {
256
322
  case "1":
257
- r.fallbacks = ["serif"];
323
+ i.fallbacks = ["serif"];
258
324
  break;
259
325
  case "2":
260
- r.fallbacks = ["sans-serif"];
326
+ i.fallbacks = ["sans-serif"];
261
327
  break;
262
328
  case "3":
263
- r.fallbacks = ["monospace"];
329
+ i.fallbacks = ["monospace"];
264
330
  break;
265
331
  case "4":
266
- r.fallbacks = ["cursive"];
332
+ i.fallbacks = ["cursive"];
267
333
  break;
268
- case "5": r.fallbacks = ["fantasy"];
334
+ case "5": i.fallbacks = ["fantasy"];
269
335
  }
270
336
  }
271
- return a(t, n, r, "scheme", "scheme"), r.family !== void 0 && r.scheme === void 0 && (r.scheme = A.Scheme.None), g(t, n, r, "shadow", "shadow", !0), g(t, n, r, "outline", "outline", !0), t.getValAttrAsBoolean("condense", n, !0) && (r.letterSpacing = -1), t.getValAttrAsBoolean("extend", n, !0) && (r.letterSpacing = 1), h(t, n, r, "charset", "charset"), r;
337
+ h(i, e.evaluate("scheme", n)?.getAttribute("val")), c(e, n, i, "shadow", "shadow", !0), c(e, n, i, "outline", "outline", !0);
338
+ for (let t of ["condense", "extend"]) {
339
+ let a = r(t, !!e.getValAttrAsBoolean(t, n, !0));
340
+ a !== void 0 && (i.letterSpacing = a);
341
+ }
342
+ return me(e, n, i, "charset", "charset"), i;
272
343
  }
273
344
  processFills(e, t, n) {
274
345
  if (!t) return;
@@ -280,7 +351,7 @@ var I = class {
280
351
  return n;
281
352
  }
282
353
  processFill(e, t, n, r) {
283
- let i = { type: k.Type.None }, a = t.childNodes, o = !1, s = a.length;
354
+ let i = { type: M.Type.None }, a = t.childNodes, o = !1, s = a.length;
284
355
  for (let t = 0; !o && t < s; t++) {
285
356
  let n = a.item(t);
286
357
  n.nodeType === 1 && (n.localName === "gradientFill" ? (this.processGradientFill(e, n, i), o = !0) : n.localName === "patternFill" && (this.processPatternFill(e, n, i), o = !0));
@@ -289,17 +360,17 @@ var I = class {
289
360
  }
290
361
  processGradientFill(e, t, n) {
291
362
  if (!t) return;
292
- n.type = k.Type.Gradient;
363
+ n.type = M.Type.Gradient;
293
364
  let r = [];
294
365
  n.stops = r;
295
366
  let i = t.getAttribute("type");
296
367
  i && (n.gradientType = i);
297
368
  let a = t.hasAttribute("degree") ? parseFloat(t.getAttribute("degree")) : 0;
298
369
  (a + 90) % 360 != 0 && (n.angle = (a + 90) % 360), (t.hasAttribute("left") || t.hasAttribute("top") || t.hasAttribute("right") || t.hasAttribute("bottom")) && (n.focus = {
299
- left: K(t.getAttribute("left")),
300
- top: K(t.getAttribute("top")),
301
- right: K(t.getAttribute("right")),
302
- bottom: K(t.getAttribute("bottom"))
370
+ left: G(t.getAttribute("left")),
371
+ top: G(t.getAttribute("top")),
372
+ right: G(t.getAttribute("right")),
373
+ bottom: G(t.getAttribute("bottom"))
303
374
  });
304
375
  let o = t.childNodes, s = o.length;
305
376
  for (let t = 0; t < s; t++) {
@@ -315,18 +386,18 @@ var I = class {
315
386
  }
316
387
  processPatternFill(e, t, n) {
317
388
  if (!t) return;
318
- let r = e.getVisitorParamsState().get("processingDXFs"), i = t.getAttribute("patternType") || (r ? k.BuiltInSheetPattern.Solid : k.BuiltInSheetPattern.None);
319
- if (i === k.BuiltInSheetPattern.None) return { none: !0 };
320
- n.type = k.Type.Pattern, i && (n.patternType = i);
321
- let a = "foreground", o = "background", s = n.patternType === k.BuiltInSheetPattern.Solid && r, c = s ? "dk1" : "lt1", l = s ? "lt1" : "dk1";
389
+ let r = e.getVisitorParamsState().get("processingDXFs"), i = t.getAttribute("patternType") || (r ? M.BuiltInSheetPattern.Solid : M.BuiltInSheetPattern.None);
390
+ if (i === M.BuiltInSheetPattern.None) return { none: !0 };
391
+ n.type = M.Type.Pattern, i && (n.patternType = i);
392
+ let a = "foreground", o = "background", s = n.patternType === M.BuiltInSheetPattern.Solid && r;
322
393
  if (s) {
323
394
  let e = a;
324
395
  a = o, o = e;
325
396
  }
326
- let u = e.evaluate("fgColor", t);
327
- this.processDataBarColor(e, u, n, a, c);
328
- let d = e.evaluate("bgColor", t);
329
- return this.processDataBarColor(e, d, n, o, l), s && (n.foreground ||= "lt1", n.background ||= "dk1"), n;
397
+ let c = e.evaluate("fgColor", t);
398
+ this.processDataBarColor(e, c, n, a, "dk1");
399
+ let l = e.evaluate("bgColor", t);
400
+ return this.processDataBarColor(e, l, n, o, "lt1"), s && (n.foreground ||= "lt1", n.background ||= "dk1"), n;
330
401
  }
331
402
  processBorders(e, t, n, r) {
332
403
  if (!t) return;
@@ -340,132 +411,103 @@ var I = class {
340
411
  processBorder(e, t, n, r, i) {
341
412
  if (!t) return;
342
413
  let a = {};
343
- return this.processBorderStroke(e, t, a, D.Edge.Left), this.processBorderStroke(e, t, a, D.Edge.Right), i ? (a.right || a.left) && (a.right ? a.vertical = { ...a.right } : a.vertical = { ...a.left }) : this.processBorderStroke(e, t, a, D.Edge.Vertical), this.processBorderStroke(e, t, a, D.Edge.Top), this.processBorderStroke(e, t, a, D.Edge.Bottom), i ? (a.bottom || a.top) && (a.bottom ? a.horizontal = { ...a.bottom } : a.horizontal = { ...a.top }) : this.processBorderStroke(e, t, a, D.Edge.Horizontal), n[r] = a, n;
414
+ this.processBorderStroke(e, t, a, k.Edge.Left), this.processBorderStroke(e, t, a, k.Edge.Right), i ? (a.right || a.left) && (a.vertical = a.right ? { ...a.right } : { ...a.left }) : this.processBorderStroke(e, t, a, k.Edge.Vertical), this.processBorderStroke(e, t, a, k.Edge.Top), this.processBorderStroke(e, t, a, k.Edge.Bottom), i ? (a.bottom || a.top) && (a.horizontal = a.bottom ? { ...a.bottom } : { ...a.top }) : this.processBorderStroke(e, t, a, k.Edge.Horizontal);
415
+ let o = this.processBorderStroke(e, t, {}, "diagonal");
416
+ return o && (U(t.getAttribute("diagonalUp")) && (a.diagonalUp = { ...o }), U(t.getAttribute("diagonalDown")) && (a.diagonalDown = { ...o })), n[r] = a, n;
344
417
  }
345
418
  processBorderStroke(e, t, n, r) {
346
419
  if (!t) return;
347
420
  let i = e.evaluate(r, t);
348
421
  if (!i) return;
349
422
  let a = {};
350
- i.hasAttribute("style") ? a.style = i.getAttribute("style") : e.getVisitorParamsState().get("processingDXFs") && (a.style = D.StrokeStyle.None);
423
+ i.hasAttribute("style") ? a.style = i.getAttribute("style") : e.getVisitorParamsState().get("processingDXFs") && (a.style = k.StrokeStyle.None);
351
424
  let o = e.evaluate("color", i);
352
425
  return o && this.processDataBarColor(e, o, a, "color"), Object.keys(a).length > 0 ? n[r] = a : null;
353
426
  }
354
- }, K = (e) => {
427
+ }, G = (e) => {
355
428
  if (!e) return 0;
356
429
  let t = parseFloat(e);
357
430
  return isNaN(t) ? 0 : t;
358
- }, ie = {
431
+ }, K = (e, t) => {
432
+ if (!e || e.nodeType !== 1) return null;
433
+ let n = e.childNodes;
434
+ for (let e = 0; e < n.length; e++) {
435
+ let r = n.item(e);
436
+ if (r.nodeType === 1 && r.localName === t) return r;
437
+ }
438
+ return null;
439
+ }, Pe = new Set(Object.values(F.ElementType).filter((e) => e !== F.ElementType.WholeTable && e !== F.ElementType.HeaderRow)), Fe = {
359
440
  auto: "auto",
360
441
  autoNoTable: "automaticExceptTables",
361
442
  manual: "manual"
362
- }, ae = [
363
- ["fillRef", "fill"],
364
- ["lnRef", "stroke"],
365
- ["effectRef", "effect"]
366
- ], q = class {
367
- visit(e, t, n) {
368
- if (!t) return;
369
- let r = e.evaluate("*/cNvPr", t);
370
- 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), this.readNonVisualDetails(e, r, n), e.copyFromAttribute(r, "id", n)), n;
371
- }
372
- readNonVisualDetails(e, t, n) {
373
- t.hasAttribute("title") && (n.title = t.getAttribute("title"));
374
- let r = e.evaluate("hlinkClick", t);
375
- r && (n.hyperlink = v(e, r));
376
- let i = e.evaluate("hlinkHover", t);
377
- i && (n.hoverHyperlink = v(e, i));
378
- let a = e.evaluate("extLst", t), o = a ? e.serializeElement(a) : null;
379
- o && (n.extLst = {
380
- ...n.extLst,
381
- nonVisual: o
382
- });
383
- }
384
- setContent(e, t) {
385
- let n = e;
386
- n.name !== void 0 && (t.name = n.name, delete n.name), n.description !== void 0 && (t.description = n.description, delete n.description);
387
- for (let e of [
388
- "title",
389
- "hyperlink",
390
- "hoverHyperlink",
391
- "extLst"
392
- ]) n[e] !== void 0 && (t.json && (t.json[e] = n[e]), delete n[e]);
393
- e.content = t;
394
- }
395
- isGroupContent(e) {
396
- return Array.isArray(e?.children);
397
- }
398
- readChildHeader(e, t, n) {
399
- let r = n === j.Type.Shape ? {} : { type: n }, i = e.evaluate("*/cNvPr", t);
400
- if (i?.item && (i = i.item(0)), i) {
401
- e.copyFromAttribute(i, "name", r), e.copyFromAttribute(i, "descr", r, "description"), e.copyFromAttribute(i, "hidden", r, "hidden", e.BOOLEAN_COPY), this.readNonVisualDetails(e, i, r);
402
- let n = this.readSourceId(e, t);
403
- n !== void 0 && (r.sourceId = n);
404
- }
405
- return r;
406
- }
407
- readStyleRefs(e, t, n) {
408
- let i = e.evaluate("style", t);
409
- if (!i) return void (n.style = null);
410
- let a = new r(), o = {};
411
- for (let [t, n] of ae) {
412
- let r = e.evaluate(t, i);
413
- if (!r) continue;
414
- let s = { index: parseInt(r.getAttribute("idx") ?? "0", 10) || 0 }, c = a.processAdjColor(e, r);
415
- c && (s.color = c), o[n] = s;
416
- }
417
- let s = e.evaluate("fontRef", i);
418
- if (s) {
419
- let t = { index: s.getAttribute("idx") ?? "none" }, n = a.processAdjColor(e, s);
420
- n && (t.color = n), o.font = t;
421
- }
422
- let c = re.withoutDefaultStyleRefs({
423
- ...n,
424
- style: o
425
- });
426
- c && (n.style = c);
427
- }
428
- readLocks(e) {
429
- let t = e?.attributes;
430
- if (!t || t.length === 0) return;
431
- let n = {};
432
- for (let e = 0; e < t.length; e++) {
433
- let r = t.item(e);
434
- r.name.startsWith("xmlns") || (n[r.localName ?? r.name] = _(r.value));
443
+ }, q = [
444
+ "tableId",
445
+ "columnId",
446
+ "cacheName",
447
+ "cachePath",
448
+ "sourceName",
449
+ "sortOrder",
450
+ "customListSort",
451
+ "crossFilter",
452
+ "pivotTables",
453
+ "pivotCacheId",
454
+ "pivotBody",
455
+ "tabular",
456
+ "pivotData",
457
+ "showMissing"
458
+ ], Ie = /* @__PURE__ */ new Set([
459
+ "name",
460
+ "xr10:uid",
461
+ "cache",
462
+ "caption"
463
+ ]), J = (e, t) => {
464
+ let n = e.content, r = n?.json;
465
+ if (r) {
466
+ if (n.type === "shape" || n.type === "picture") {
467
+ let { rotation: n, flipH: i, flipV: a, bounds: o } = r;
468
+ delete r.rotation, delete r.flipH, delete r.flipV, delete r.bounds, n !== void 0 && n !== 0 && (e.rotation = n), i && (e.flipH = !0), a && (e.flipV = !0), t && o && (e.anchor = {
469
+ tl: {
470
+ x: o.x,
471
+ y: o.y
472
+ },
473
+ br: {
474
+ x: o.width,
475
+ y: o.height
476
+ }
477
+ });
435
478
  }
436
- return Object.keys(n).length > 0 ? n : void 0;
437
- }
438
- readSourceId(e, t) {
439
- let n = e.evaluate("*/cNvPr", t);
440
- n?.item && (n = n.item(0));
441
- let r = n?.getAttribute?.("id"), i = r ? parseInt(r, 10) : void 0;
442
- return i === void 0 || isNaN(i) ? void 0 : i;
479
+ if (n.type === "group") for (let e of r.members ?? []) J(e, !0);
443
480
  }
444
- }, J = class extends q {
481
+ }, Y = class extends V {
445
482
  visit(e, t, n) {
446
483
  if (t) return this.visitShape(e, t, n, "sp", "nvSpPr/cNvSpPr/spLocks");
447
484
  }
448
- visitShape(e, t, n, r, i) {
449
- let a = o[r];
450
- if (this.isGroupContent(n)) {
451
- let o = this.readChildHeader(e, t, a);
452
- return this.readStyleRefs(e, t, o), this.readShapeDetails(e, t, r, i, o), n.children.push(o), o;
453
- }
454
- if (e.getPath().includes("Fallback") && n.content) {
455
- let r = n.content.json;
456
- if (n.content.type === "shape" && r && (r.type ?? j.Type.Shape) === a) {
457
- let n = e.evaluate("txBody", t), i = n ? new y().readTextBody(e, n) : null;
458
- i && l(i) !== "" && (r.text = i);
485
+ visitShape(t, n, r, i, a) {
486
+ let o = ee[i];
487
+ if (this.isGroupContent(r)) {
488
+ if (t.getPath().includes("Fallback")) return {};
489
+ let { movable: e, content: s } = this.readMemberHeader(t, n, "shape");
490
+ o !== P.Type.Shape && (s.type = o), this.readShapeDetails(t, n, i, a, s), this.readStyleRefs(t, n, s);
491
+ let c = t.evaluate(a, n);
492
+ c?.hasAttribute?.("noChangeAspect") && (e.lockAspect = c.getAttribute("noChangeAspect") === "1");
493
+ let l = this.readTwinOf(t, n);
494
+ return l !== void 0 && Object.assign(s, { twinOf: l }), r.members.push(e), s;
495
+ }
496
+ if (t.getPath().includes("Fallback") && r.content) {
497
+ let i = r.content.json;
498
+ if (r.content.type === "shape" && i && (i.type ?? P.Type.Shape) === o) {
499
+ let r = t.evaluate("txBody", n), a = r ? new S().readTextBody(t, r) : null;
500
+ a && e(a) !== "" && (i.text = a);
459
501
  }
460
502
  return {};
461
503
  }
462
- n = super.visit(e, t, n);
463
- let s = e.evaluate(i, t);
464
- s?.hasAttribute?.("noChangeAspect") && (n.lockAspect = s.getAttribute("noChangeAspect") === "1");
465
- let c = a === j.Type.Shape ? {} : { type: a }, u = this.readSourceId(e, t);
466
- u !== void 0 && (c.sourceId = u), this.readStyleRefs(e, t, c), this.readShapeDetails(e, t, r, i, c);
467
- let d = this.readTwinOf(e, t);
468
- return d !== void 0 && Object.assign(c, { twinOf: d }), this.setContent(n, {
504
+ r = super.visit(t, n, r);
505
+ let s = t.evaluate(a, n);
506
+ s?.hasAttribute?.("noChangeAspect") && (r.lockAspect = s.getAttribute("noChangeAspect") === "1");
507
+ let c = o === P.Type.Shape ? {} : { type: o }, l = this.readSourceId(t, n);
508
+ l !== void 0 && (c.sourceId = l), this.readShapeDetails(t, n, i, a, c), this.readStyleRefs(t, n, c);
509
+ let u = this.readTwinOf(t, n);
510
+ return u !== void 0 && Object.assign(c, { twinOf: u }), this.setContent(r, {
469
511
  type: "shape",
470
512
  json: c
471
513
  }), c;
@@ -477,18 +519,16 @@ var I = class {
477
519
  return r ? parseInt(r[1], 10) : void 0;
478
520
  }
479
521
  readShapeDetails(e, t, n, r, i) {
480
- if (n !== "grpSp") {
481
- let e = t.getAttribute("macro");
482
- e && (i.macro = e);
483
- let n = t.getAttribute("textlink");
484
- n && (i.textLink = n), t.hasAttribute("fLocksText") && (i.locksText = _(t.getAttribute("fLocksText"))), t.hasAttribute("fPublished") && (i.published = _(t.getAttribute("fPublished")));
485
- }
486
- let a = r.slice(0, r.lastIndexOf("/")), o = e.evaluate(a, t);
487
- o?.getAttribute?.("txBox") === "1" && (i.textBox = !0);
488
- let s = this.readLocks(e.evaluate(r, t));
489
- if (s && (i.locks = s), n === "cxnSp" && o) {
522
+ let a = t.getAttribute("macro");
523
+ a && (i.macro = a);
524
+ let o = t.getAttribute("textlink");
525
+ o && (i.textLink = o), t.hasAttribute("fLocksText") && (i.locksText = _(t.getAttribute("fLocksText"))), t.hasAttribute("fPublished") && (i.published = _(t.getAttribute("fPublished")));
526
+ let s = r.slice(0, r.lastIndexOf("/")), c = e.evaluate(s, t);
527
+ c?.getAttribute?.("txBox") === "1" && (i.textBox = !0);
528
+ let l = this.readLocks(e.evaluate(r, t));
529
+ if (l && (i.locks = l), n === "cxnSp" && c) {
490
530
  let t = (t) => {
491
- let n = e.evaluate(t, o);
531
+ let n = e.evaluate(t, c);
492
532
  if (n?.getAttribute) return {
493
533
  id: parseInt(n.getAttribute("id") ?? "0", 10) || 0,
494
534
  index: parseInt(n.getAttribute("idx") ?? "0", 10) || 0
@@ -497,87 +537,88 @@ var I = class {
497
537
  (n || r) && (i.connectorEnds = {}, n && (i.connectorEnds.start = n), r && (i.connectorEnds.end = r));
498
538
  }
499
539
  }
500
- }, Y = (e, t, n, r) => {
540
+ }, Le = /^<a:extLst(?:\s+xmlns:a="[^"]*")?><a:ext uri="\{28A0092B-C50C-407E-A947-70E740481C1C\}"><a14:useLocalDpi(?:\s+xmlns:a14="[^"]*")?\s+val="0"\s*\/><\/a:ext><\/a:extLst>$/, X = (e, t, n, r) => {
501
541
  let i = e.evaluate(n, t), a = e.evaluate(r, t);
502
542
  return i || a ? {
503
- x: x(i?.getAttribute("x") ?? null) ?? 0,
504
- y: x(i?.getAttribute("y") ?? null) ?? 0,
505
- width: x(a?.getAttribute("cx") ?? null) ?? 0,
506
- height: x(a?.getAttribute("cy") ?? null) ?? 0
543
+ x: v(i?.getAttribute("x") ?? null) ?? 0,
544
+ y: v(i?.getAttribute("y") ?? null) ?? 0,
545
+ width: v(a?.getAttribute("cx") ?? null) ?? 0,
546
+ height: v(a?.getAttribute("cy") ?? null) ?? 0
507
547
  } : null;
508
- }, X = "richTypes", Z = "richData", Q = (e) => {
548
+ }, Re = { Checkbox: "checkbox" }, Z = (e) => {
509
549
  let t = e.getAttribute("val");
510
550
  return t !== "0" && t !== "false";
511
- }, oe = {
551
+ }, Q = {
512
552
  1: "serif",
513
553
  2: "sans-serif",
514
554
  3: "monospace",
515
555
  4: "cursive",
516
556
  5: "fantasy"
517
557
  };
518
- function se(e) {
558
+ function ze(e) {
519
559
  let t = {}, n = e.childNodes;
520
560
  for (let e = 0; e < n.length; e++) {
521
- let r = n.item(e);
522
- if (r.nodeType === 1) switch (r.localName) {
561
+ let i = n.item(e);
562
+ if (i.nodeType === 1) switch (i.localName) {
523
563
  case "b":
524
- t.weight = Q(r) ? 700 : 400;
564
+ t.weight = Z(i) ? 700 : 400;
525
565
  break;
526
566
  case "i":
527
- t.style = Q(r) ? A.Style.Italic : A.Style.Normal;
567
+ t.style = Z(i) ? N.Style.Italic : N.Style.Normal;
528
568
  break;
529
569
  case "strike":
530
- t.strike = Q(r);
570
+ t.strike = w(Z(i));
531
571
  break;
532
572
  case "outline":
533
- t.outline = Q(r);
573
+ t.outline = Z(i);
534
574
  break;
535
575
  case "shadow":
536
- t.shadow = Q(r);
576
+ t.shadow = Z(i);
537
577
  break;
538
- case "extend":
539
- t.extend = Q(r);
578
+ case "condense":
579
+ case "extend": {
580
+ let e = r(i.localName, Z(i));
581
+ e !== void 0 && (t.letterSpacing = e);
540
582
  break;
583
+ }
541
584
  case "u":
542
- t.underline = r.getAttribute("val") || A.UnderlineStyle.Single;
585
+ t.underline = g(i.getAttribute("val"));
543
586
  break;
544
587
  case "vertAlign": {
545
- let e = r.getAttribute("val");
546
- e === "superscript" ? t.verticalAlign = A.VerticalAlignment.Super : e === "subscript" ? t.verticalAlign = A.VerticalAlignment.Sub : e === "baseline" && (t.verticalAlign = A.VerticalAlignment.Baseline);
588
+ let e = T(i.getAttribute("val"));
589
+ e !== void 0 && (t.baseline = e);
547
590
  break;
548
591
  }
549
592
  case "sz": {
550
- let e = parseFloat(r.getAttribute("val") ?? "");
593
+ let e = parseFloat(i.getAttribute("val") ?? "");
551
594
  isNaN(e) || (t.size = e);
552
595
  break;
553
596
  }
554
597
  case "rFont": {
555
- let e = r.getAttribute("val");
598
+ let e = i.getAttribute("val");
556
599
  e && (t.family = e);
557
600
  break;
558
601
  }
559
602
  case "family": {
560
- let e = oe[r.getAttribute("val") ?? ""];
603
+ let e = Q[i.getAttribute("val") ?? ""];
561
604
  e && (t.fallbacks = [e]);
562
605
  break;
563
606
  }
564
607
  case "charset": {
565
- let e = parseInt(r.getAttribute("val") ?? "", 10);
608
+ let e = parseInt(i.getAttribute("val") ?? "", 10);
566
609
  isNaN(e) || (t.charset = e);
567
610
  break;
568
611
  }
569
- case "scheme": {
570
- let e = r.getAttribute("val");
571
- e && (t.scheme = e);
612
+ case "scheme":
613
+ h(t, i.getAttribute("val"));
572
614
  break;
573
- }
574
615
  case "color": {
575
- let e = r.getAttribute("rgb");
576
- if (e && !r.hasAttribute("theme")) {
616
+ let e = i.getAttribute("rgb");
617
+ if (e && !i.hasAttribute("theme")) {
577
618
  t.color = "#" + (e.length === 8 ? e.substring(2) : e).toUpperCase();
578
619
  break;
579
620
  }
580
- let n = C((e) => r.getAttribute(e));
621
+ let n = y((e) => i.getAttribute(e));
581
622
  n && (t.color = n);
582
623
  break;
583
624
  }
@@ -621,14 +662,37 @@ var $ = {
621
662
  },
622
663
  AppPropertiesVisitor: class {
623
664
  visit(e, t, n) {
624
- let r = [], i = t.childNodes, a = i.length;
625
- for (let t = 0; t < a; t++) {
626
- let n = i.item(t);
665
+ let r = t.childNodes, i = r.length;
666
+ for (let e = 0; e < i; e++) if (r.item(e).localName === "property") return this.visitCustom(t, n);
667
+ let a = [];
668
+ for (let t = 0; t < i; t++) {
669
+ let n = r.item(t);
627
670
  if (n.nodeType !== 1) continue;
628
- let a = this.processProperty(e, n);
629
- a && r.push(a);
671
+ let i = this.processProperty(e, n);
672
+ i && a.push(i);
630
673
  }
631
- return r.length > 0 && (n.properties = r), r;
674
+ return a.length > 0 && (n.properties = a), a;
675
+ }
676
+ visitCustom(e, t) {
677
+ let n = [], r = e.childNodes, i = r.length;
678
+ for (let e = 0; e < i; e++) {
679
+ let t = r.item(e);
680
+ if (t.nodeType !== 1 || t.localName !== "property") continue;
681
+ let i = t.getAttribute("name");
682
+ if (!i) continue;
683
+ let a = null;
684
+ for (let e = 0; e < t.childNodes.length && !a; e++) {
685
+ let n = t.childNodes.item(e);
686
+ n.nodeType === 1 && (a = n);
687
+ }
688
+ let o = {
689
+ key: i,
690
+ kind: a?.localName ?? null,
691
+ value: a?.textContent ?? ""
692
+ }, s = t.getAttribute("linkTarget");
693
+ s && (o.linkTarget = s), n.push(o);
694
+ }
695
+ return n.length > 0 && (t.custom = n), n;
632
696
  }
633
697
  processProperty(e, t) {
634
698
  if (t) return {
@@ -637,272 +701,37 @@ var $ = {
637
701
  };
638
702
  }
639
703
  },
640
- ChartSpaceVisitor: class {
641
- visit(e, t, n) {
642
- return g(e, t, n, "roundedCorners", "roundedCorners"), h(e, t, n, ".//AlternateContent/Fallback/style", "styleId"), e.getVisitorParamsState().set("types", []), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), n.range = null, n;
643
- }
644
- afterVisit(e, t, n) {
645
- let r = {};
646
- n.types = r;
647
- let i = {}, a = 0, o = {}, s = 0, c = e.getVisitorParamsState().get("axes"), l = e.getVisitorParamsState().get("types"), u = l.length;
648
- for (let e = 0; e < u; e++) {
649
- let t = l[e];
650
- if (t.xAxisId) {
651
- let r = t.xAxisId, o = c.get(r);
652
- i[e + ""] = o, t.offsetXAxis = e, delete t.xAxisId, n.xAxes = i, i.length = ++a;
653
- }
654
- if (t.yAxisId) {
655
- let r = t.yAxisId, i = c.get(r);
656
- o[e + ""] = i, t.offsetYAxis = e, delete t.yAxisId, n.yAxes = o, o.length = ++s;
657
- }
658
- r[e + ""] = t;
659
- }
660
- r.length = l.length;
661
- let d = e.getVisitorParamsState().get("series");
662
- if (!d || d.length === 0) return;
663
- let f = {};
664
- n.series = f;
665
- let p = d.length;
666
- for (let e = 0; e < p; e++) f[e + ""] = d[e];
667
- f.length = p, e.getVisitorParamsState().delete("types"), e.getVisitorParamsState().delete("axes"), e.getVisitorParamsState().delete("series");
668
- }
669
- },
670
- ChartVisitor: class {
671
- visit(e, t, n) {
672
- return e.getVisitorParamsState().set("types", []), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), g(e, t, n, "plotVisOnly", "plotVisOnly"), a(e, t, n, "dispBlanksAs", "dispBlanksAs"), g(e, t, n, ".//extLst/ext/dataDisplayOptions16/dispNaAsBlank", "dispNaAsBlank"), g(e, t, n, "showDLblsOverMax", "showDLblsOverMax"), n;
673
- }
674
- afterVisit(e, t, n) {
675
- try {
676
- let r = e.getValAttrAsBoolean("autoTitleDeleted", t), i = e.evaluate("title", t);
677
- e.setToPath(n, "title.shown", !(!0 === r || !i));
678
- let a = e.evaluate("legend", t);
679
- e.setToPath(n, "legend.shown", a !== null);
680
- } catch (e) {
681
- throw Error("Unexpected Error parsing Chart: " + e);
682
- }
683
- }
684
- },
685
- PlotAreaVisitor: class {
686
- visit(e, t, n) {
687
- let r = {};
688
- return n.plotArea = r, r;
689
- }
690
- },
691
- ShapePropertiesVisitor: u,
692
- BarChartTypeVisitor: class extends U {
693
- parseType(e, t, n) {
694
- let r = e.getValAttrAsString("barDir", t);
695
- r && (n.type = r === "col" ? "column" : "bar");
696
- }
697
- },
698
- ChartTypeVisitor: U,
699
- DataLabelsVisitor: class {
700
- constructor(e) {
701
- this.jsonKey = e;
702
- }
703
- visit(e, t, n) {
704
- let r = {}, i = r, o = e.getValAttrAsString("idx", t);
705
- o !== null && (i = {}, i[o] = r);
706
- let s = e.getValAttrAsBoolean("delete", t);
707
- this.parseNumFormat(e, t, r), !0 === s ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (g(e, t, r, "showBubbleSize", "showBubbleSize"), g(e, t, r, "showCatName", "showCatName"), g(e, t, r, "showLeaderLines", "showLeaderLines"), g(e, t, r, "showPercent", "showPercentage"), g(e, t, r, "showSerName", "showSerName"), g(e, t, r, "showVal", "showVal"), g(e, t, r, "showLegendKey", "showLegendKey"));
708
- let c = e.evaluate("separator", t);
709
- return c !== null && (r.separator = c.textContent), a(e, t, r, "dLblPos", "position"), n[this.jsonKey] = i, r;
710
- }
711
- parseNumFormat(e, t, n) {
712
- let r = e.evaluate("numFmt", t);
713
- r && (n.formatCode = r.getAttribute("formatCode"), r.hasAttribute("sourceLinked") && (n.sourceLinked = r.getAttribute("sourceLinked") === "1"));
714
- }
715
- },
716
- SeriesVisitor: class {
704
+ ShapePropertiesVisitor: d,
705
+ TextPropertiesVisitor: b,
706
+ ShapeTextVisitor: S,
707
+ ThemeVisitor: class {
717
708
  visit(e, t, n) {
718
- let r = {};
719
- h(e, t, r, "explosion", "explosion");
720
- let i = e.evaluate("cat/*/f", t);
721
- i ||= e.evaluate("xVal/*/f", t);
722
- let a = null;
723
- i !== null && i.firstChild !== null && (a = i.firstChild.nodeValue), i || (i = e.evaluate("cat/strLit", t), i ||= e.evaluate("cat/numLit", t), i && (a = this.parsePointsAsString(e, i))), a !== null && (r.xRange = a);
724
- let o = e.evaluate("val/*/f", t);
725
- o ||= e.evaluate("yVal/*/f", t);
726
- let s = null;
727
- 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), h(e, t, r, "idx", "idx"), g(e, t, r, "smooth", "smooth"), r.offsetChart = e.getVisitorParamsState().get("types").length - 1;
728
- let c = e.getVisitorParamsState().get("series");
729
- return c || (c = [], e.getVisitorParamsState().set("series", c)), c.push(r), r;
730
- }
731
- parseTitleRangeOrValue(e, t, n) {
732
- let r = e.evaluate("tx/strRef/f", t);
733
- if (r !== null) {
734
- let t = r.firstChild.nodeValue;
735
- e.setToPath(n, "title.range", t);
736
- } else {
737
- let r = e.evaluate("tx/v", t);
738
- r !== null && e.setToPath(n, "title.text.simpleRun", r.firstChild.nodeValue);
739
- }
740
- }
741
- parsePointsAsString(e, t) {
742
- let n = "{", r = e.getValAttrAsInteger("ptCount", t), i = e.evaluate("pt", t), a = [];
743
- for (let n = 0; i && r && n < r; n++) {
744
- let r = null, i = e.evaluate("pt[@idx='" + n + "']/v", t);
745
- i && (r = i.textContent), a[n] = r;
746
- }
747
- for (let e = 0; e < a.length; e++) e > 0 && (n += ","), a[e] !== void 0 && (n += a[e]);
748
- return n += "}", n;
749
- }
750
- afterVisit(e, t, n) {
751
- W(e, t, n);
752
- let r = e.getFromPath(n, "points");
709
+ n.name = t.getAttribute("name"), n.objectDefaults = {};
710
+ let r = z(t, "custClrLst")[0];
753
711
  if (r) {
754
- let t = Object.keys(r);
755
- for (let i = 0; i < t.length; i++) {
756
- let a = t[i], o = e.getFromPath(r, a);
757
- if (!o) continue;
758
- let s = e.getFromPath(o, "markers");
759
- s && (e.setToPath(n, "markers.points." + a, s), delete o.markers);
712
+ let t = new p(), i = [];
713
+ for (let n of z(r, "custClr")) {
714
+ let r = t.processAdjColor(e, n);
715
+ if (!r) continue;
716
+ let a = { color: r }, o = n.getAttribute("name");
717
+ o && (a.name = o), i.push(a);
760
718
  }
761
- }
762
- }
763
- },
764
- DataPointVisitor: class {
765
- DataPointVisitor() {}
766
- visit(e, t, n) {
767
- let r = e.getFromPath(n, "points"), i = null;
768
- r ? i = r : (i = {}, e.setToPath(n, "points", i));
769
- let a = {}, o = e.getValAttrAsString("idx", t);
770
- return o !== null && (i[o] = a), g(e, t, a, "bubble3D", "bubble3D"), h(e, t, a, "explosion", "explosion"), W(e, t, a), a;
771
- }
772
- },
773
- MarkerVisitor: class {
774
- visit(e, t, n) {
775
- let r = t.parentNode.localName;
776
- if (r === "ser" || r === "dPt") {
777
- let r = {}, i = e.getValAttrAsString("size", t);
778
- i !== null && (r.size = i);
779
- let a = e.getValAttrAsString("symbol", t);
780
- return a && (r.type = a), n.markers = r, r;
781
- }
782
- return null;
783
- }
784
- },
785
- AxisVisitor: class {
786
- visit(t, n, r) {
787
- let i = {};
788
- this.parseScaling(t, n, i), e(t, n, i, "majorUnit", "majorUnits"), e(t, n, i, "minorUnit", "minorUnits"), g(t, n, i, "delete", "shown"), this.parseOrientation(t, n, i), this.parseNumFormat(t, n, i), a(t, n, i, "majorTickMark", "majorTickMarks"), a(t, n, i, "minorTickMark", "minorTickMarks"), a(t, n, i, "crosses", "crosses"), e(t, n, i, "crossesAt", "crosses"), a(t, n, i, "crossBetween", "crossBetween"), this.parseLabelAlign(t, n, i), h(t, n, i, "lblOffset", "labelOffset"), a(t, n, i, "tickLblPos", "labelPosition");
789
- let o = t.getValAttrAsInteger("noMultiLvlLbl", n);
790
- i.labelMultiLevel = o !== null && o === 0, h(t, n, i, "tickMarkSkip", "tickMarkSkip"), h(t, n, i, "tickLblSkip", "labelInterval"), this.parseDisplayCustOrBuiltInUnit(n, t, i), this.parseTimeUnits(t, n, i, "majorUnitDates", "majorTimeUnit", "majorUnit"), this.parseTimeUnits(t, n, i, "minorUnitDates", "minorTimeUnit", "minorUnit"), a(t, n, i, "baseTimeUnit", "baseUnitDates"), t.getVisitorParamsState().get("axes") || (t.warn("An axis was read outside a chart; its axes were started fresh.", { onceKey: "xlsx.chart.axesState" }), t.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()));
791
- let s = t.getValAttrAsString("axId", n);
792
- return t.getVisitorParamsState().get("axes").set(s, i), i;
793
- }
794
- parseTimeUnits(e, t, n, r, i, a) {
795
- let o = {}, s = e.getValAttrAsString(i, t);
796
- s !== null && (o.dem = s, o.amt = e.getValAttrAsString(a, t)), Object.keys(o).length > 0 && (n[r] = o);
797
- }
798
- parseDisplayCustOrBuiltInUnit(e, t, n) {
799
- let r = t.getValAttrAsString("dispUnits/builtInUnit", e);
800
- r ||= t.getValAttrAsString("dispUnits/custUnit", e), r && (n.displayUnits = r);
801
- }
802
- parseLabelAlign(e, t, n) {
803
- let r = e.getValAttrAsString("lblAlgn", t);
804
- r !== null && (r === "ctr" ? n.labelAlign = "center" : r === "l" ? n.labelAlign = "left" : r === "r" && (n.labelAlign = "right"));
805
- }
806
- parseOrientation(e, t, n) {
807
- let r = e.getValAttrAsString("AxPos", t);
808
- r !== null && (r === "b" ? n.orientation = "bottom" : r === "l" ? n.orientation = "left" : r === "r" ? n.orientation = "right" : r === "t" && (n.orientation = "top"));
809
- }
810
- parseNumFormat(e, t, n) {
811
- let r = {}, i = e.evaluate("numFmt", t);
812
- i !== null && (i.hasAttribute("formatCode") && (r.formatCode = i.getAttribute("formatCode")), i.hasAttribute("sourceLinked") && (r.sourceLinked = i.getAttribute("sourceLinked") === "1")), Object.keys(r).length > 0 && (n.labels = r);
813
- }
814
- parseScaling(t, n, r) {
815
- let i = t.getValAttrAsString("scaling/orientation", n);
816
- i !== null && (r.inverted = i !== "minMax");
817
- let a = t.getValAttrAsFloat("scaling/logBase", n);
818
- a !== null && (r.logBase = a, r.scaleType = "log"), e(t, n, r, "scaling/max", "max"), e(t, n, r, "scaling/min", "min");
819
- }
820
- afterVisit(e, t, n) {
821
- n.fill && n.labels && (n.labels.fill = n.fill, delete n.fill);
822
- let r = e.getValAttrAsBoolean("delete", t);
823
- r !== null && (e.setToPath(n, "labels.shown", !0 !== r), e.setToPath(n, "shown", !0 !== r));
824
- let i = e.getFromPath(n, "dispUnits.displayUnitsLabel");
825
- i && (e.setToPath(n, "displayUnitsLabel", i), delete n.dispUnits);
826
- let a = e.evaluate("title", t);
827
- e.setToPath(n, "title.shown", a !== null);
828
- let o = e.evaluate("minorGridlines", t);
829
- e.setToPath(n, "gridLinesMinor.shown", o !== null);
830
- let s = e.evaluate("majorGridlines", t);
831
- e.setToPath(n, "gridLinesMajor.shown", s !== null);
832
- }
833
- },
834
- TextPropertiesVisitor: t,
835
- ShapeTextVisitor: y,
836
- LegendEntryVisitor: class {
837
- visit(e, t, n) {
838
- let r = e.getVisitorParamsState().get("series"), i = e.getValAttrAsInteger("idx", t), a = i === null ? void 0 : r[i];
839
- if (a) {
840
- let n = e.getFromPath(a, "title");
841
- n || (n = {}, e.setToPath(a, "title", n));
842
- let r = n, i = e.getValAttrAsBoolean("delete", t);
843
- return i !== null && (r.shown = !i), r;
719
+ i.length && (n.customColors = i);
720
+ }
721
+ for (let e of z(t, "extLst")) for (let t of z(e, "ext")) {
722
+ if (t.getAttribute("uri") !== "{05A4C25C-085E-4340-85A3-A5531E510DB2}") continue;
723
+ let e = z(t, "themeFamily")[0], r = e?.getAttribute("id");
724
+ if (!r) continue;
725
+ let i = {
726
+ name: e.getAttribute("name") ?? "",
727
+ id: r
728
+ }, a = e.getAttribute("vid");
729
+ a && (i.vid = a), n.family = i;
844
730
  }
845
731
  return n;
846
732
  }
847
733
  },
848
- LegendVisitor: class {
849
- visit(e, t, n) {
850
- let r = {};
851
- return g(e, t, r, "overlay", "overlay"), a(e, t, r, "legendPos", "position"), n.legend = r, r;
852
- }
853
- },
854
- NegativeShapeVisitor: class extends u {
855
- visit(e, t, n) {
856
- let r = this.getFill(e, t);
857
- Object.keys(r).length > 0 && (n.fillNegative = r);
858
- let i = this.getStroke(e, t);
859
- return Object.keys(i).length > 0 && (n.strokeNegative = i), n;
860
- }
861
- },
862
- TitleVisitor: class extends t {
863
- constructor(e = "title") {
864
- super(e);
865
- }
866
- parseTitleRangeOrValue(e, t, n) {
867
- let r = e.evaluate("tx/strRef/f", t) ?? null;
868
- if (r) {
869
- let t = r.firstElementChild.nodeValue;
870
- e.setToPath(n, "range", t);
871
- }
872
- }
873
- visit(e, t, n) {
874
- let r = {};
875
- g(e, t, r, "overlay", "overlay"), n[this._jsonKey] = r;
876
- let i = e.getFromPath(r, this.getTextPath());
877
- i ||= {}, this.parseTitleRangeOrValue(e, t, r);
878
- let a = e.evaluate("txPr", t);
879
- a && this.parseTextElement(e, a, i, !1);
880
- let o = e.evaluate("tx/rich", t);
881
- return o && this.parseTextElement(e, o, i, !0), Object.keys(i).length > 0 && e.setToPath(r, "text", i), r;
882
- }
883
- afterVisit(e, t, n) {
884
- if (n?.text) {
885
- let e = n.text?.rotation ?? null;
886
- e !== null && (n.rotation = parseInt(e), delete n.title.rotation);
887
- }
888
- }
889
- },
890
- LayoutVisitor: class {
891
- visit(t, n, r) {
892
- let i = t.evaluate("manualLayout", n);
893
- if (i) {
894
- let n = {};
895
- e(t, i, n, "x", "x"), e(t, i, n, "y", "y"), e(t, i, n, "w", "w"), e(t, i, n, "h", "h"), a(t, i, n, "xMode", "xMode"), a(t, i, n, "yMode", "yMode"), a(t, i, n, "wMode", "wMode"), a(t, i, n, "hMode", "hMode"), Object.keys(n).length > 0 && (r.manualLayout = n);
896
- }
897
- return r;
898
- }
899
- },
900
- ThemeVisitor: class {
901
- visit(e, t, n) {
902
- return n.name = t.getAttribute("name"), n;
903
- }
904
- },
905
- ClrSchemeVisitor: class extends r {
734
+ ClrSchemeVisitor: class extends p {
906
735
  visit(e, t, n) {
907
736
  let r = {};
908
737
  r.name = t.getAttribute("name");
@@ -921,25 +750,53 @@ var $ = {
921
750
  visit(e, t, n) {
922
751
  let r = {};
923
752
  r.name = t.getAttribute("name");
924
- let i = e.evaluate("majorFont", t), a = this.processFontElement(e, i, {});
925
- a && (r.majorFont = a.family, a.fallbacks && (r.majorFallbacks = a.fallbacks));
926
- let o = e.evaluate("minorFont", t), s = this.processFontElement(e, o, {});
927
- return s && (r.minorFont = s.family, s.fallbacks && (r.minorFallbacks = s.fallbacks)), n.fonts = r, r;
753
+ let i = this.processFontCollection(e, e.evaluate("majorFont", t));
754
+ i && (r.major = i);
755
+ let a = this.processFontCollection(e, e.evaluate("minorFont", t));
756
+ return a && (r.minor = a), n.fonts = r, r;
928
757
  }
929
- processFontElement(e, t, n) {
758
+ processFontCollection(e, t) {
930
759
  if (!t) return;
931
- let r = e.evaluate("latin", t);
932
- if (!r) return;
933
- let i = r.getAttribute("typeface");
934
- i && (n.family = i);
935
- let a = r.getAttribute("panose");
936
- return a && (n.fallbacks = [A.getPanoseFallback(a)]), n;
760
+ let n = {}, r = e.evaluate("latin", t), i = r?.getAttribute("typeface");
761
+ i && (n.latin = i);
762
+ let a = r?.getAttribute("panose");
763
+ a && (n.panose = a);
764
+ let o = e.evaluate("ea", t)?.getAttribute("typeface");
765
+ o && (n.eastAsian = o);
766
+ let s = e.evaluate("cs", t)?.getAttribute("typeface"), c;
767
+ s && (n.complexScript = s);
768
+ let l = t.childNodes, u = l.length;
769
+ for (let e = 0; e < u; e++) {
770
+ let t = l.item(e);
771
+ if (t.nodeType !== 1 || t.localName !== "font") continue;
772
+ let n = t.getAttribute("script");
773
+ n && ((c ??= {})[n] = t.getAttribute("typeface") ?? "");
774
+ }
775
+ return c && (n.scripts = c), n;
776
+ }
777
+ },
778
+ ObjectDefaultsVisitor: class {
779
+ visit(e, t, n) {
780
+ let r = {};
781
+ for (let [n, i] of Ne) {
782
+ let a = e.evaluate(n, t);
783
+ a && (r[i] = this.processDefault(e, a));
784
+ }
785
+ return n.objectDefaults = r, {};
786
+ }
787
+ processDefault(e, t) {
788
+ let n = {}, r = e.evaluate("spPr", t);
789
+ r && new d().visit(e, r, n);
790
+ let i = new S().readTextBody(e, t);
791
+ (i.body || i.listStyle) && (n.text = i);
792
+ let a = e.evaluate("style", t);
793
+ return a && (n.style = B(e, a)), n;
937
794
  }
938
795
  },
939
- FmtSchemeVisitor: class extends r {
796
+ FmtSchemeVisitor: class extends p {
940
797
  visit(e, t, n) {
941
798
  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");
942
- if (r && i && a && o) return n.fillStyleLst = r, n.lnStyleLst = i, n.effectStyleLst = a, void (n.bgFillStyleLst = o);
799
+ if (r && (n.fillStyleLst = r), i && (n.lnStyleLst = i), a && (n.effectStyleLst = a), o && (n.bgFillStyleLst = o), r && i && a && o) return;
943
800
  let s = e.serializeElement(t);
944
801
  s && (n.formatSchemeXml = s);
945
802
  }
@@ -958,11 +815,11 @@ var $ = {
958
815
  }
959
816
  parseFillListItem(e, t) {
960
817
  switch (t.localName) {
961
- case "noFill": return { type: k.Type.None };
818
+ case "noFill": return { type: M.Type.None };
962
819
  case "solidFill": {
963
820
  let n = this.processAdjColor(e, t);
964
821
  return n ? {
965
- type: k.Type.Solid,
822
+ type: M.Type.Solid,
966
823
  color: n
967
824
  } : void 0;
968
825
  }
@@ -1000,17 +857,19 @@ var $ = {
1000
857
  visit(e, t, n) {
1001
858
  if (!t) return;
1002
859
  let r = {}, i = [];
1003
- return this.processFilterColumns(e, t, i, n), i.length > 0 && (r.conditions = i), Object.keys(r).length > 0 && (n.filter = r), r;
860
+ return this.processFilterColumns(e, t, i, n), i.length > 0 && (r.conditions = i), Object.keys(r).length > 0 && (n.filter = r), n;
1004
861
  }
1005
862
  processColorFilter(e, t) {
1006
863
  let n = {}, r = {
1007
- operator: O.BuiltInOperatorNames.Color,
864
+ operator: j.BuiltInOperatorNames.Color,
1008
865
  param: n
1009
866
  };
1010
- return e.copyFromAttribute(t, "cellColor", n, "cellColor", e.BOOLEAN_COPY), e.copyFromAttribute(t, "dxfId", n, "styleId", e.INT_COPY), r;
867
+ e.copyFromAttribute(t, "cellColor", n, "cellColor", e.BOOLEAN_COPY);
868
+ let i = H(e, t);
869
+ return i && (n.style = i), r;
1011
870
  }
1012
871
  processCustomFilter(e, t) {
1013
- return m({
872
+ return pe({
1014
873
  operator: t.getAttribute("operator"),
1015
874
  val: t.getAttribute("val")
1016
875
  }, (t) => e.warn(t));
@@ -1019,7 +878,7 @@ var $ = {
1019
878
  let n = t.getAttribute("and"), r = n === "and" || n === "1";
1020
879
  t.getAttribute("val");
1021
880
  let i = [], a = {
1022
- operator: r ? O.BuiltInOperatorNames.And : O.BuiltInOperatorNames.Or,
881
+ operator: r ? j.BuiltInOperatorNames.And : j.BuiltInOperatorNames.Or,
1023
882
  param: i
1024
883
  }, o = t.childNodes, s = o.length;
1025
884
  for (let t = 0; t < s; t++) {
@@ -1028,10 +887,10 @@ var $ = {
1028
887
  let r = null;
1029
888
  n.localName === "customFilter" && (r = this.processCustomFilter(e, n)), r && i.push(r);
1030
889
  }
1031
- return i.length === 1 ? i[0] : d(a);
890
+ return i.length === 1 ? i[0] : re(a);
1032
891
  }
1033
892
  processDynamicFilter(e, t) {
1034
- return i(t.getAttribute("type"));
893
+ return ne(t.getAttribute("type"), t.getAttribute("val"), t.getAttribute("maxVal"));
1035
894
  }
1036
895
  processDateGroupItem(e, t) {
1037
896
  let n = {};
@@ -1042,10 +901,10 @@ var $ = {
1042
901
  }
1043
902
  processFilters(e, t) {
1044
903
  let n = {}, r = {
1045
- operator: O.BuiltInOperatorNames.InSet,
904
+ operator: j.BuiltInOperatorNames.InSet,
1046
905
  param: n
1047
906
  };
1048
- n.byDisplay = !0, e.copyFromAttribute(t, "blank", n, "blank", e.BOOLEAN_COPY), n.blank && (r.includeBlanks = !0), e.copyFromAttribute(t, "calendarType", n, "calendarType");
907
+ r.selector = j.BuiltInSelectorNames.Display, e.copyFromAttribute(t, "blank", n, "blank", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calendarType", n, "calendarType");
1049
908
  let i = [], a = [], o = t.childNodes, s = o.length;
1050
909
  for (let t = 0; t < s; t++) {
1051
910
  let n = o.item(t);
@@ -1063,26 +922,26 @@ var $ = {
1063
922
  }
1064
923
  processIcon(e, t) {
1065
924
  let n = {}, r = {
1066
- operator: O.BuiltInOperatorNames.Icon,
925
+ operator: j.BuiltInOperatorNames.Icon,
1067
926
  param: n
1068
927
  };
1069
928
  return e.copyFromAttribute(t, "iconId", n, "iconId", e.INT_COPY), e.copyFromAttribute(t, "iconSet", n), r;
1070
929
  }
1071
930
  processTop10(e, t) {
1072
931
  let n = {}, r = {
1073
- operator: O.BuiltInOperatorNames.TopN,
932
+ operator: j.BuiltInOperatorNames.TopN,
1074
933
  param: n
1075
934
  };
1076
935
  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, "limit", e.FLOAT_COPY), r;
1077
936
  }
1078
937
  processFilterColumnExt(e, t) {
1079
- let n = t.childNodes;
1080
- for (let t = 0; t < n.length; t++) {
1081
- let r = n.item(t);
1082
- if (r.nodeType !== 1 || r.localName !== "ext" || c(r.getAttribute("uri")) !== c("{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}")) continue;
1083
- let i = r.childNodes;
1084
- for (let t = 0; t < i.length; t++) {
1085
- let n = i.item(t);
938
+ let r = t.childNodes;
939
+ for (let t = 0; t < r.length; t++) {
940
+ let i = r.item(t);
941
+ if (i.nodeType !== 1 || i.localName !== "ext" || n(i.getAttribute("uri")) !== n("{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}")) continue;
942
+ let a = i.childNodes;
943
+ for (let t = 0; t < a.length; t++) {
944
+ let n = a.item(t);
1086
945
  if (n.nodeType !== 1 || n.localName !== "filterColumn") continue;
1087
946
  let r = n.childNodes;
1088
947
  for (let t = 0; t < r.length; t++) {
@@ -1134,7 +993,7 @@ var $ = {
1134
993
  visit(e, t, n) {
1135
994
  if (!t) return;
1136
995
  let r = t.getAttribute("ref"), i = {};
1137
- t.hasAttribute("caseSensitive") && (i.collatorOptions = _(t.getAttribute("caseSensitive")) ? P.CaseSensitiveOptions : P.CaseInsensitiveOptions);
996
+ t.hasAttribute("caseSensitive") && (i.collatorOptions = _(t.getAttribute("caseSensitive")) ? L.CaseSensitiveOptions : L.CaseInsensitiveOptions);
1138
997
  let a = t.getAttribute("sortMethod");
1139
998
  a != null && a !== "none" && (a === "stroke" ? i.collatorOptions = {
1140
999
  ...i.collatorOptions,
@@ -1144,63 +1003,105 @@ var $ = {
1144
1003
  collation: "pinyin"
1145
1004
  }));
1146
1005
  let o = {};
1147
- t.hasAttribute("columnSort") && _(t.getAttribute("columnSort")) && (o.axis = ne.Axis.Column);
1148
- let s = T.fastStringToRange(r), c = [];
1149
- return this.processSortConditions(e, t, c, s, i), c.length > 0 && (o.sorts = c), Object.keys(c).length > 0 && (n.sort = o), o;
1006
+ t.hasAttribute("columnSort") && _(t.getAttribute("columnSort")) && (o.axis = we.Axis.Column);
1007
+ let s = D.fastStringToRange(r), c = [], l = [];
1008
+ this.processSortConditions(e, t, c, s, i, l), c.length > 0 && (o.sorts = c);
1009
+ let u = e.getVisitorParamsState().get("ref");
1010
+ if (u && r) {
1011
+ let e = D.fastStringToRange(u);
1012
+ o.extent = {
1013
+ range: f(e, s),
1014
+ sorts: l.map((t) => oe(e, s, t))
1015
+ };
1016
+ }
1017
+ return Object.keys(c).length > 0 && (n.sort = o), o;
1150
1018
  }
1151
- processSortCondition(e, t, n, r) {
1019
+ processSortCondition(e, t, n, r, i) {
1152
1020
  if (!t) return null;
1153
- let i = {};
1021
+ let a = {};
1154
1022
  if (!t.hasAttribute("ref")) return void e.warn("A sort condition has no ref; it was dropped.", { onceKey: "xlsx.sheet.sort.noRef" });
1155
1023
  if (t.hasAttribute("ref")) {
1156
- let e = t.getAttribute("ref"), r = T.fastStringToRange(e);
1157
- i.index = n ? r.colStart - n.colStart : r.colStart;
1024
+ let e = t.getAttribute("ref"), r = D.fastStringToRange(e);
1025
+ a.index = n ? r.colStart - n.colStart : r.colStart, i?.push(r);
1158
1026
  }
1159
- let a = { ...r };
1160
- return i.criteria = a, a.reverse = !1, t.hasAttribute("descending") && (a.reverse = _(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;
1027
+ let o = { ...r };
1028
+ a.criteria = o, o.reverse = !1, t.hasAttribute("descending") && (o.reverse = _(t.getAttribute("descending")));
1029
+ let s = se(t.getAttribute("sortBy"));
1030
+ s && (o.sortOn = s);
1031
+ let c = H(e, t);
1032
+ return c && (o.style = c), e.copyFromAttribute(t, "iconSet", o), e.copyFromAttribute(t, "customList", o), a;
1161
1033
  }
1162
- processSortConditions(e, t, n, r, i) {
1034
+ processSortConditions(e, t, n, r, i, a) {
1163
1035
  if (!t) return;
1164
- let a = t.childNodes, o = a.length;
1165
- for (let t = 0; t < o; t++) {
1166
- let o = a.item(t);
1167
- if (o.nodeType === 1 && o.localName === "sortCondition") {
1168
- let t = this.processSortCondition(e, o, r, i);
1036
+ let o = t.childNodes, s = o.length;
1037
+ for (let t = 0; t < s; t++) {
1038
+ let s = o.item(t);
1039
+ if (s.nodeType === 1 && s.localName === "sortCondition") {
1040
+ let t = this.processSortCondition(e, s, r, i, a);
1169
1041
  t && n.push(t);
1170
1042
  }
1171
1043
  }
1172
1044
  }
1173
1045
  },
1174
- SheetStyleVisitor: class extends G {
1046
+ SheetStyleVisitor: class extends W {
1175
1047
  visit(e, t, n) {
1176
1048
  this.processNumFmts(e, e.evaluate("numFmts", t), null), e.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
1177
1049
  let r = {
1178
1050
  fills: {},
1179
1051
  fonts: {},
1180
1052
  borders: {}
1053
+ }, a = e.evaluate("fonts", t);
1054
+ this.processFonts(e, a, r.fonts);
1055
+ let o = r.fonts[this.normalFontId(e, t)], s = {
1056
+ declared: ["1", "true"].includes(a?.getAttribute("x14ac:knownFonts") ?? ""),
1057
+ normalIsThemeFont: te(o?.family),
1058
+ faces: ce(Object.values(r.fonts).map((e) => ({
1059
+ ...e,
1060
+ family: i(e?.family, e?.fallbacks, null, !1).name
1061
+ })))
1181
1062
  };
1182
- 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: k.Type.None }, r.fills[1] = {
1183
- type: k.Type.Pattern,
1184
- patternType: k.BuiltInSheetPattern.Gray125
1063
+ e.getVisitorParamsState().set(ue, s), o && e.getVisitorParamsState().set(he, o), this.processFills(e, e.evaluate("fills", t), r.fills), this.processBorders(e, e.evaluate("borders", t), r.borders, !0), r.fills[0] = { type: M.Type.None }, r.fills[1] = {
1064
+ type: M.Type.Pattern,
1065
+ patternType: M.BuiltInSheetPattern.Gray125
1185
1066
  }, r.borders[0] = {
1186
- bottom: { style: D.StrokeStyle.None },
1187
- left: { style: D.StrokeStyle.None },
1188
- right: { style: D.StrokeStyle.None },
1189
- top: { style: D.StrokeStyle.None }
1067
+ bottom: { style: k.StrokeStyle.None },
1068
+ left: { style: k.StrokeStyle.None },
1069
+ right: { style: k.StrokeStyle.None },
1070
+ top: { style: k.StrokeStyle.None }
1190
1071
  };
1191
- let i = [];
1192
- this.processXFs(e, e.evaluate("cellStyleXfs", t), i, r, null, !1);
1193
- let a = /* @__PURE__ */ new Map();
1194
- if (i.length > 0) {
1072
+ let c = [];
1073
+ this.processXFs(e, e.evaluate("cellStyleXfs", t), c, r, null, !1);
1074
+ let l = /* @__PURE__ */ new Map();
1075
+ if (c.length > 0) {
1195
1076
  let r = [];
1196
- this.processCellStyles(e, e.evaluate("cellStyles", t), r, i, a), n.named = r;
1077
+ this.processCellStyles(e, e.evaluate("cellStyles", t), r, c, l), n.named = r;
1078
+ }
1079
+ let u = [];
1080
+ this.processXFs(e, e.evaluate("cellXfs", t), u, r, l), Object.keys(u).length > 0 && (n.direct = u);
1081
+ let d = this.collectHiddenXfs(e.evaluate("cellXfs", t));
1082
+ d.size > 0 && e.getVisitorParamsState().set(ge, d);
1083
+ let f = this.collectPivotButtonXfs(e.evaluate("cellXfs", t));
1084
+ f.size > 0 && e.getVisitorParamsState().set(ve, f);
1085
+ let p = this.collectXfComplements(e.evaluate("cellXfs", t));
1086
+ p.size > 0 && e.getVisitorParamsState().set(_e, p);
1087
+ let m = [];
1088
+ return this.processDXFs(e, e.evaluate("dxfs", t), m), this.processTableStyles(e, e.evaluate("tableStyles", t), n, m), this.processSlicerStyles(e, e.evaluate("extLst", t), n), this.processIndexColors(e, e.evaluate("colors/indexedColors", t), n), this.processMruColors(e, e.evaluate("colors/mruColors", t), n), n;
1089
+ }
1090
+ normalFontId(e, t) {
1091
+ let n = e.evaluate("cellStyles", t)?.childNodes, r = 0;
1092
+ for (let e = 0; e < (n?.length ?? 0); e++) {
1093
+ let t = n.item(e);
1094
+ if (t.nodeType === 1 && t.getAttribute("builtinId") === "0") {
1095
+ r = parseInt(t.getAttribute("xfId") ?? "0", 10) || 0;
1096
+ break;
1097
+ }
1197
1098
  }
1198
- let o = [];
1199
- this.processXFs(e, e.evaluate("cellXfs", t), o, r, a), Object.keys(o).length > 0 && (n.direct = o);
1200
- let s = this.collectHiddenXfs(e.evaluate("cellXfs", t));
1201
- s.size > 0 && e.getVisitorParamsState().set(te, s);
1202
- let c = [];
1203
- 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;
1099
+ let i = e.evaluate("cellStyleXfs", t)?.childNodes, a = 0;
1100
+ for (let e = 0; e < (i?.length ?? 0); e++) {
1101
+ let t = i.item(e);
1102
+ if (t.nodeType === 1 && a++ === r) return parseInt(t.getAttribute("fontId") ?? "0", 10) || 0;
1103
+ }
1104
+ return 0;
1204
1105
  }
1205
1106
  processIndexColors(e, t, n) {
1206
1107
  if (!t) return;
@@ -1258,7 +1159,7 @@ var $ = {
1258
1159
  let o = t.getAttribute("xfId");
1259
1160
  if (o && i) {
1260
1161
  let e = i.get(parseInt(o));
1261
- e && e !== M.BuiltInName.Normal && (n.named = e);
1162
+ e && e !== A.BuiltInName.Normal && (n.named = e);
1262
1163
  }
1263
1164
  let s = (e) => !(!a && t.hasAttribute(e)) || _(t.getAttribute(e)), c = (e) => !a || t.hasAttribute(e) && _(t.getAttribute(e)), l = a ? "0" : void 0;
1264
1165
  if (s("applyFont")) {
@@ -1305,13 +1206,13 @@ var $ = {
1305
1206
  }
1306
1207
  processAlignment(e, t, n) {
1307
1208
  let r = {};
1308
- if (t?.hasAttribute("horizontal") ? r.horizontal = t.getAttribute("horizontal") : r.horizontal = N.HorizontalAlignment.General, t?.hasAttribute("vertical") ? r.vertical = t.getAttribute("vertical") : r.vertical = N.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, _(t?.getAttribute("wrapText") ?? "") ? r.overflow = N.Overflow.Wrap : r.overflow = N.Overflow.Visible, _(t?.getAttribute("shrinkToFit") ?? "") && (r.overflow = N.Overflow.Shrink), t?.hasAttribute("textRotation")) {
1209
+ if (r.horizontal = t?.hasAttribute("horizontal") ? t.getAttribute("horizontal") : I.HorizontalAlignment.General, r.vertical = t?.hasAttribute("vertical") ? t.getAttribute("vertical") : I.VerticalAlignment.Bottom, r.indent = t?.hasAttribute("indent") ? parseInt(t.getAttribute("indent")) : 0, r.relativeIndent = t?.hasAttribute("relativeIndent") ? parseInt(t.getAttribute("relativeIndent")) : 0, r.overflow = _(t?.getAttribute("wrapText") ?? "") ? I.Overflow.Wrap : I.Overflow.Visible, _(t?.getAttribute("shrinkToFit") ?? "") && (r.overflow = I.Overflow.Shrink), t?.hasAttribute("textRotation")) {
1309
1210
  let e = parseFloat(t.getAttribute("textRotation"));
1310
1211
  e > 0 && e <= 90 ? e = 360 - e : e > 90 && e <= 180 ? e -= 90 : e === 255 && (e = 0, r.stacked = !0), r.rotation = e;
1311
1212
  } else r.rotation = 0;
1312
1213
  t?.hasAttribute("justifyLastLine") && (r.justifyLastLine = _(t.getAttribute("justifyLastLine")));
1313
1214
  let i = t?.getAttribute("readingOrder");
1314
- return i && (i === "0" ? r.readingDirection = N.ReadingDirection.Auto : i === "1" ? r.readingDirection = N.ReadingDirection.LeftToRight : i === "2" ? r.readingDirection = N.ReadingDirection.RightToLeft : e.warn(`Invalid readingOrder '${i}'; the direction was left automatic.`, { onceKey: "xlsx.style.readingOrder" })), Object.keys(r).length > 0 && (n.alignment = r), n;
1215
+ return i && (i === "0" ? r.readingDirection = I.ReadingDirection.Auto : i === "1" ? r.readingDirection = I.ReadingDirection.LeftToRight : i === "2" ? r.readingDirection = I.ReadingDirection.RightToLeft : e.warn(`Invalid readingOrder '${i}'; the direction was left automatic.`, { onceKey: "xlsx.style.readingOrder" })), Object.keys(r).length > 0 && (n.alignment = r), n;
1315
1216
  }
1316
1217
  collectHiddenXfs(e) {
1317
1218
  let t = /* @__PURE__ */ new Set();
@@ -1329,6 +1230,35 @@ var $ = {
1329
1230
  }
1330
1231
  return t;
1331
1232
  }
1233
+ collectPivotButtonXfs(e) {
1234
+ let t = /* @__PURE__ */ new Set();
1235
+ if (!e) return t;
1236
+ let n = e.childNodes, r = 0;
1237
+ for (let e = 0; e < n.length; e++) {
1238
+ let i = n.item(e);
1239
+ i.nodeType === 1 && i.localName === "xf" && (_(i.getAttribute("pivotButton") ?? "") && t.add(r), r++);
1240
+ }
1241
+ return t;
1242
+ }
1243
+ collectXfComplements(e) {
1244
+ let t = /* @__PURE__ */ new Map();
1245
+ if (!e) return t;
1246
+ let n = e.childNodes, r = 0;
1247
+ for (let e = 0; e < n.length; e++) {
1248
+ let i = n.item(e);
1249
+ if (i.nodeType !== 1 || i.localName !== "xf") continue;
1250
+ let a = K(i, "extLst");
1251
+ if (a) {
1252
+ let e = a.childNodes;
1253
+ for (let n = 0; n < e.length; n++) {
1254
+ let i = K(e.item(n), "xfComplement"), a = parseInt(i?.getAttribute("i") ?? "", 10);
1255
+ isNaN(a) || t.set(r, a);
1256
+ }
1257
+ }
1258
+ r++;
1259
+ }
1260
+ return t;
1261
+ }
1332
1262
  processProtection(e, t, n) {
1333
1263
  if (!t) return;
1334
1264
  let r = t.getAttribute("locked");
@@ -1375,9 +1305,57 @@ var $ = {
1375
1305
  }
1376
1306
  e.getVisitorParamsState().delete("processingDXFs");
1377
1307
  }
1308
+ processSlicerStyles(e, t, n) {
1309
+ if (!t) return;
1310
+ let r = null, i = null, a = t.childNodes;
1311
+ for (let e = 0; e < a.length; e++) {
1312
+ let t = a.item(e);
1313
+ if (t.nodeType !== 1 || t.localName !== "ext") continue;
1314
+ let n = t.childNodes;
1315
+ for (let e = 0; e < n.length; e++) {
1316
+ let t = n.item(e);
1317
+ t.nodeType === 1 && (t.localName === "dxfs" ? r = t : t.localName === "slicerStyles" && (i = t));
1318
+ }
1319
+ }
1320
+ if (!i) return;
1321
+ let o = [];
1322
+ if (r) {
1323
+ e.getVisitorParamsState().set("processingDXFs", !0);
1324
+ let t = r.childNodes;
1325
+ for (let n = 0; n < t.length; n++) {
1326
+ let r = t.item(n);
1327
+ if (r.nodeType !== 1 || r.localName !== "dxf") continue;
1328
+ let i = {};
1329
+ this.processDXF(e, r, i), o.push(i);
1330
+ }
1331
+ e.getVisitorParamsState().delete("processingDXFs");
1332
+ }
1333
+ let s = {}, c = i.getAttribute("defaultSlicerStyle");
1334
+ c && c !== "SlicerStyleLight1" && (s.defaultSlicerStyle = c);
1335
+ let l = n.tables?.styles, u = i.childNodes;
1336
+ for (let t = 0; t < u.length; t++) {
1337
+ let n = u.item(t);
1338
+ if (n.nodeType !== 1 || n.localName !== "slicerStyle") continue;
1339
+ let r = n.getAttribute("name");
1340
+ if (!r) continue;
1341
+ let i = {}, a = l?.[r];
1342
+ a && !1 === a.table && !a.pivot && (a.wholeTable && (i.wholeTable = a.wholeTable), a.headerRow && (i.headerRow = a.headerRow), delete l[r]);
1343
+ let c = e.evaluate("slicerStyleElements", n)?.childNodes, d = c?.length ?? 0;
1344
+ for (let t = 0; t < d; t++) {
1345
+ let n = c.item(t);
1346
+ if (n.nodeType !== 1 || n.localName !== "slicerStyleElement") continue;
1347
+ let r = n.getAttribute("type");
1348
+ if (!r || !Pe.has(r)) continue;
1349
+ let a = n.getAttribute("dxfId"), s = a == null ? void 0 : o[parseInt(a)];
1350
+ s ? i[r] = s : e.warn(`A slicer style names a format that does not exist (dxfId '${a}').`, { onceKey: "xlsx.style.slicerStyle.dxf" });
1351
+ }
1352
+ (s.styles ??= {})[r] = i;
1353
+ }
1354
+ l && Object.keys(l).length === 0 && (delete n.tables.styles, Object.keys(n.tables).length === 0 && delete n.tables), Object.keys(s).length > 0 && (n.slicers = s);
1355
+ }
1378
1356
  processTableStyle(e, t, n, r, i = !1) {
1379
1357
  let a = t.getAttribute("name"), o = { name: a };
1380
- t.hasAttribute("table") && (o.table = _(t.getAttribute("table"))), t.hasAttribute("pivot") && (o.pivot = _(t.getAttribute("pivot"))), i && !o.pivot && r.unshift(null);
1358
+ t.hasAttribute("table") && (o.table = _(t.getAttribute("table"))), o.pivot = !t.hasAttribute("pivot") || _(t.getAttribute("pivot")), i && !o.pivot && r.unshift(null);
1381
1359
  let s = t.childNodes, c = s.length;
1382
1360
  for (let t = 0; t < c; t++) {
1383
1361
  let n = s.item(t);
@@ -1411,7 +1389,7 @@ var $ = {
1411
1389
  if (t.nodeType === 1 && t.localName === "cellStyle") {
1412
1390
  let e = parseInt(t.getAttribute("xfId") ?? ""), a = t.getAttribute("name"), o = t.getAttribute("builtinId"), s = a;
1413
1391
  if (o !== null) {
1414
- let e = M.builtInNameFromId(parseInt(o));
1392
+ let e = A.builtInNameFromId(parseInt(o));
1415
1393
  e !== void 0 && (s = e);
1416
1394
  }
1417
1395
  if (i.set(e, s), !r[e]) continue;
@@ -1419,32 +1397,32 @@ var $ = {
1419
1397
  name: s,
1420
1398
  style: r[e]
1421
1399
  };
1422
- t.getAttribute("hidden") && (c.hidden = _(t.getAttribute("hidden"))), t.getAttribute("iLevel") && (c.iLevel = parseInt(t.getAttribute("iLevel"))), n.push(c);
1400
+ t.getAttribute("hidden") && (c.hidden = _(t.getAttribute("hidden"))), t.getAttribute("iLevel") && (c.iLevel = parseInt(t.getAttribute("iLevel"))), o !== null && _(t.getAttribute("customBuiltin") ?? "0") && (c.customized = !0), n.push(c);
1423
1401
  }
1424
1402
  }
1425
1403
  }
1426
1404
  afterVisit(e, t, n) {}
1427
1405
  },
1428
- WorkbookVisitor: class extends G {
1406
+ WorkbookVisitor: class extends W {
1429
1407
  visit(e, t, n) {
1430
1408
  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;
1431
1409
  }
1432
1410
  processPassword(e, t, n, r = "workbook", i = "password") {
1433
1411
  if (!t) return;
1434
1412
  let a = {};
1435
- 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);
1413
+ 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), e.copyFromAttribute(t, `${r}Password`, a, "legacyHash"), Object.keys(a).length > 0 && (n[i] = a);
1436
1414
  }
1437
1415
  processWorkbookProtection(e, t, n) {
1438
1416
  if (!t) return;
1439
1417
  let r = {};
1440
1418
  this.processPassword(e, t, r, "workbook", "password"), this.processPassword(e, t, r, "revisions", "revisionsPassword");
1441
- for (let e of p) r[e.key] = ee(e, t.getAttribute(e.attribute));
1419
+ for (let e of ie) r[e.key] = fe(e, t.getAttribute(e.attribute));
1442
1420
  return n.protection = r, n;
1443
1421
  }
1444
1422
  processCalcPr(e, t, n) {
1445
1423
  if (!t) return;
1446
1424
  let r = {};
1447
- e.copyFromAttribute(t, "calcMode", r, "calcMode", (e) => ie[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);
1425
+ e.copyFromAttribute(t, "calcMode", r, "calcMode", (e) => Fe[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, "concurrentManualCount", r, "concurrentManualCount", e.INT_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);
1448
1426
  let i = t.getAttribute("calcId");
1449
1427
  i !== null && e.getVisitorParamsState().set("calcId", i), n.calc = r;
1450
1428
  }
@@ -1460,8 +1438,19 @@ var $ = {
1460
1438
  processSheetRef(e, t, n) {
1461
1439
  let r = {};
1462
1440
  e.copyFromAttribute(t, "name", r, "name"), e.copyFromAttribute(t, "state", r, "visibility"), e.copyFromAttribute(t, "sheetId", r, "sheetId", e.INT_COPY);
1463
- let i = t.getAttribute("r:id"), a = e.getRef(i);
1464
- a && (r.sheet = a), n.push(r);
1441
+ let i = t.getAttribute("r:id"), a = i ? u(e.getRelationships().get(i)?.type) : null;
1442
+ if (a) {
1443
+ let t = e.readEmbeddedPart(i);
1444
+ if (t?.xml) {
1445
+ let e = { part: t }, i = x(t.xml), o = i ? y((e) => i.get(e)) : void 0;
1446
+ o && (e.tabColor = o), r.kind = a, r.sheet = e, n.push(r);
1447
+ return;
1448
+ }
1449
+ e.warn(`The ${a} sheet '${r.name}' could not be read and was loaded as an empty worksheet.`), n.push(r);
1450
+ return;
1451
+ }
1452
+ let o = i ? e.getRef(i) : null;
1453
+ o && (r.sheet = o), n.push(r);
1465
1454
  }
1466
1455
  processExternalReferences(e, t, n) {
1467
1456
  if (!t) return;
@@ -1477,16 +1466,21 @@ var $ = {
1477
1466
  }
1478
1467
  processPivotCaches(e, t, n) {
1479
1468
  if (!t) return;
1480
- let r = [], i = t.childNodes, a = i.length;
1481
- for (let t = 0; t < a; t++) {
1482
- let n = i.item(t);
1469
+ let r = [], i = e.evaluate("workbookPr", t.parentNode)?.getAttribute?.("date1904"), a = i === "1" || i === "true", o = le(e.getVisitorParamsState().get("numFmts"), void 0), s = t.childNodes, c = s.length;
1470
+ for (let t = 0; t < c; t++) {
1471
+ let n = s.item(t);
1483
1472
  if (n.nodeType !== 1 || n.localName !== "pivotCache") continue;
1484
- let a = parseInt(n.getAttribute("cacheId") ?? "", 10), o = n.getAttribute("r:id");
1485
- if (isNaN(a) || !o) continue;
1486
- let s = e.readEmbeddedPart(o);
1487
- s && r.push({
1488
- cacheId: a,
1489
- part: s
1473
+ let i = parseInt(n.getAttribute("cacheId") ?? "", 10), c = n.getAttribute("r:id");
1474
+ if (isNaN(i) || !c) continue;
1475
+ let l = e.readEmbeddedPart(c);
1476
+ if (!l) continue;
1477
+ let u = xe(l, a, (e) => o.numberFormat(e)), d = !u && l.xml ? ae(l.xml, o) : void 0, f = !u && l.xml ? Ce(l.xml) : void 0;
1478
+ r.push({
1479
+ cacheId: i,
1480
+ part: l,
1481
+ ...d ? { partFormats: d } : {},
1482
+ ...f ? { source: f } : {},
1483
+ ...u
1490
1484
  });
1491
1485
  }
1492
1486
  r.length > 0 && (n.pivotCaches = r);
@@ -1501,8 +1495,24 @@ var $ = {
1501
1495
  }
1502
1496
  processWorkbookView(e, t, n) {
1503
1497
  if (!t) return;
1504
- let r = {};
1505
- e.copyFromAttribute(t, "activeTab", r, "activeSheetId", [e.INT_COPY, (e) => e]), t.hasAttribute("activeTab") || (r.activeSheetId = 0), e.copyFromAttribute(t, "showHorizontalScroll", r, "showHorizontalScrollbar", e.BOOLEAN_COPY), e.copyFromAttribute(t, "showVerticalScroll", r, "showVerticalScrollbar", e.BOOLEAN_COPY), e.copyFromAttribute(t, "showSheetTabs", r, "showTabs", e.BOOLEAN_COPY), e.copyFromAttribute(t, "tabRatio", r, "tabRatio", [e.FLOAT_COPY, (e) => e]), Object.keys(r).length > 0 && (n.view = r);
1498
+ let r = {}, i = [
1499
+ "xWindow",
1500
+ "yWindow",
1501
+ "windowWidth",
1502
+ "windowHeight"
1503
+ ].map((e) => parseInt(t.getAttribute(e) ?? "", 10));
1504
+ if (i.some((e) => Number.isFinite(e))) {
1505
+ let [e, t, n, a] = i.map((e) => Number.isFinite(e) ? e : 0);
1506
+ r.windowBounds = {
1507
+ left: e,
1508
+ top: t,
1509
+ width: n,
1510
+ height: a
1511
+ };
1512
+ }
1513
+ e.copyFromAttribute(t, "activeTab", r, "activeSheetId", [e.INT_COPY, (e) => e]), t.hasAttribute("activeTab") || (r.activeSheetId = 0), e.copyFromAttribute(t, "showHorizontalScroll", r, "showHorizontalScrollbar", e.BOOLEAN_COPY), e.copyFromAttribute(t, "showVerticalScroll", r, "showVerticalScrollbar", e.BOOLEAN_COPY), e.copyFromAttribute(t, "showSheetTabs", r, "showTabs", e.BOOLEAN_COPY), e.copyFromAttribute(t, "tabRatio", r, "tabRatio", [e.FLOAT_COPY, (e) => e]), e.copyFromAttribute(t, "firstSheet", r, "firstTab", [e.INT_COPY, (e) => e]), e.copyFromAttribute(t, "minimized", r, "minimized", e.BOOLEAN_COPY), e.copyFromAttribute(t, "autoFilterDateGrouping", r, "autoFilterDateGrouping", e.BOOLEAN_COPY);
1514
+ let a = t.getAttribute("visibility");
1515
+ a !== "hidden" && a !== "veryHidden" || (r.visibility = a), Object.keys(r).length > 0 && (n.view = r);
1506
1516
  }
1507
1517
  processDefineName(e, t, n, r) {
1508
1518
  if (!t) return;
@@ -1512,7 +1522,13 @@ var $ = {
1512
1522
  if (!r[n]?.name) return void e.warn(`Defined name '${t.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);
1513
1523
  i.scope = r[n].name;
1514
1524
  }
1515
- 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);
1525
+ let o = {};
1526
+ for (let n of be) e.copyFromAttribute(t, n, o);
1527
+ for (let e of ye) {
1528
+ let n = t.getAttribute(e);
1529
+ n !== "1" && n !== "true" || (o[e] = !0);
1530
+ }
1531
+ e.copyFromAttribute(t, "functionGroupId", o, "functionGroupId", e.INT_COPY), Object.keys(o).length > 0 && (i.fileAttributes = o), Object.keys(i).length > 0 && n.push(i);
1516
1532
  }
1517
1533
  processDefinedNames(e, t, n) {
1518
1534
  if (!t) return;
@@ -1524,14 +1540,17 @@ var $ = {
1524
1540
  r.length > 0 && (n.names = r);
1525
1541
  }
1526
1542
  processWorkbookPr(e, t, n) {
1527
- t && (e.copyFromAttribute(t, "date1904", n, "date1904", e.BOOLEAN_COPY), e.copyFromAttribute(t, "codeName", n, "codeName"), e.copyFromAttribute(t, "updateLinks", n, "updateLinks"));
1543
+ if (!t) return;
1544
+ e.copyFromAttribute(t, "date1904", n, "date1904", e.BOOLEAN_COPY), e.copyFromAttribute(t, "codeName", n, "codeName"), e.copyFromAttribute(t, "updateLinks", n, "updateLinks");
1545
+ let r = t.getAttribute("hidePivotFieldList");
1546
+ r !== "1" && r !== "true" || (n.hiddenPivotFieldList = !0);
1528
1547
  }
1529
1548
  afterVisit(e, t, n) {}
1530
1549
  },
1531
1550
  TableVisitor: class {
1532
1551
  visit(e, t, n) {
1533
1552
  let r = {};
1534
- 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;
1553
+ 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, "name"), 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;
1535
1554
  }
1536
1555
  afterVisit(e, t, n) {
1537
1556
  let r = n.v;
@@ -1561,10 +1580,12 @@ var $ = {
1561
1580
  let t = {};
1562
1581
  e.copyFromAttribute(i, "name", t), e.copyFromAttribute(i, "id", t), e.copyFromAttribute(i, "uniqueName", t), e.copyFromAttribute(i, "queryTableFieldId", t), e.copyFromAttribute(i, "totalsRowLabel", t);
1563
1582
  let r = i.getAttribute("totalsRowFunction");
1564
- if (r !== null) if (r === "custom") {
1565
- let n = e.evaluate("totalsRowFormula", i);
1566
- n && (t.totalsRowFormula = n.textContent);
1567
- } else t.totalsRowFormula = r;
1583
+ if (r !== null) {
1584
+ if (r === "custom") {
1585
+ let n = e.evaluate("totalsRowFormula", i);
1586
+ n && (t.totalsRowFormula = n.textContent);
1587
+ } else t.totalsRowFormula = r;
1588
+ }
1568
1589
  e.copyFromAttribute(i, "totalsRowLabel", t);
1569
1590
  let a = e.evaluate("calculatedColumnFormula", i);
1570
1591
  a?.textContent && (t.calculatedColumnFormula = a.textContent), n.push(t);
@@ -1649,7 +1670,7 @@ var $ = {
1649
1670
  i.length > 0 && (n.sheetDataSet = i);
1650
1671
  }
1651
1672
  processSheetData(e, t) {
1652
- let n = new F.Builder(), r = t.childNodes, i = r.length;
1673
+ let n = new Ee.Builder(), r = t.childNodes, i = r.length;
1653
1674
  for (let e = 0; e < i; e++) {
1654
1675
  let t = r.item(e);
1655
1676
  if (t.nodeType !== 1 || t.localName !== "row") continue;
@@ -1659,7 +1680,7 @@ var $ = {
1659
1680
  if (t.nodeType !== 1 || t.localName !== "cell") continue;
1660
1681
  let r = t.getAttribute("r");
1661
1682
  if (!r) continue;
1662
- let a = T.fastStringToCell(r);
1683
+ let a = D.fastStringToCell(r);
1663
1684
  if (a?.rowIndex === void 0 || a?.colIndex === void 0) continue;
1664
1685
  let o = this._readCellValue(t);
1665
1686
  o !== void 0 && n.pushAt(a.rowIndex, a.colIndex, o);
@@ -1679,7 +1700,7 @@ var $ = {
1679
1700
  case "str":
1680
1701
  default: return t;
1681
1702
  case "e": {
1682
- let e = E.getBuiltInByLabel(t);
1703
+ let e = O.getBuiltInByLabel(t);
1683
1704
  return e ? {
1684
1705
  t: "e",
1685
1706
  v: e.getCode()
@@ -1702,9 +1723,49 @@ var $ = {
1702
1723
  },
1703
1724
  SlicerCacheDefinitionVisitor: class {
1704
1725
  visit(e, t, n) {
1705
- e.copyFromAttribute(t, "name", n), e.copyFromAttribute(t, "sourceName", n);
1726
+ e.copyFromAttribute(t, "name", n, "cacheName"), e.copyFromAttribute(t, "sourceName", n);
1706
1727
  let r = e.evaluate("*/tableSlicerCache", t);
1707
- 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);
1728
+ return r ? (e.copyFromAttribute(r, "tableId", n), e.copyFromAttribute(r, "column", n, "columnId"), e.copyFromAttribute(r, "sortOrder", n), e.copyFromAttribute(r, "customListSort", n, "customListSort", e.BOOLEAN_COPY), e.copyFromAttribute(r, "crossFilter", n), n) : (this.processPivot(e, t, n), n);
1729
+ }
1730
+ processPivot(e, t, n) {
1731
+ let r = [], i = "", a = t.childNodes;
1732
+ for (let t = 0; t < a.length; t++) {
1733
+ let o = a.item(t);
1734
+ if (o.nodeType !== 1) continue;
1735
+ if (o.localName === "pivotTables") {
1736
+ let e = o.childNodes;
1737
+ for (let t = 0; t < e.length; t++) {
1738
+ let n = e.item(t);
1739
+ n.nodeType === 1 && n.localName === "pivotTable" && r.push({
1740
+ tabId: n.getAttribute("tabId") ?? "",
1741
+ name: n.getAttribute("name") ?? ""
1742
+ });
1743
+ }
1744
+ continue;
1745
+ }
1746
+ let s = o.getAttribute("pivotCacheId");
1747
+ if (s && (n.pivotCacheId = s), o.localName === "state" || o.localName === "timelinePivotFilter") {
1748
+ n.tabular = !0, n.pivotData = (n.pivotData ?? "") + (e.serializeElement(o) ?? "");
1749
+ continue;
1750
+ }
1751
+ if (o.localName === "data") {
1752
+ let t = null, r = o.childNodes;
1753
+ for (let e = 0; e < r.length; e++) {
1754
+ let i = r.item(e);
1755
+ if (i.nodeType !== 1) continue;
1756
+ let a = i.getAttribute("pivotCacheId");
1757
+ a && (n.pivotCacheId = a), i.localName === "tabular" && (t = i);
1758
+ }
1759
+ if (t) {
1760
+ n.tabular = !0, e.copyFromAttribute(t, "sortOrder", n), e.copyFromAttribute(t, "customListSort", n, "customListSort", e.BOOLEAN_COPY), e.copyFromAttribute(t, "crossFilter", n), e.copyFromAttribute(t, "showMissing", n, "showMissing", e.BOOLEAN_COPY), n.pivotData = e.serializeElement(o) ?? void 0;
1761
+ continue;
1762
+ }
1763
+ }
1764
+ let c = e.serializeElement(o);
1765
+ if (c === null) return;
1766
+ i += c;
1767
+ }
1768
+ n.pivotTables = r, n.pivotBody = i;
1708
1769
  }
1709
1770
  },
1710
1771
  SlicersVisitor: class {
@@ -1721,13 +1782,47 @@ var $ = {
1721
1782
  processSlicer(e, t, n) {
1722
1783
  if (!t) return;
1723
1784
  let r = {};
1724
- n[t.getAttribute("name")] = r;
1725
- let i = t.getAttribute("cache"), a = e.getVisitorParamsState().get("slicerCaches");
1726
- if (i) {
1727
- let e = a.get(i);
1728
- e && (r.columnId = e.columnId, r.tableId = e.tableId);
1785
+ n[t.getAttribute("name")] = r, e.copyFromAttribute(t, "xr10:uid", r, "uid");
1786
+ let i = t.getAttribute("cache"), a = e.getVisitorParamsState().get("slicerCaches"), o = i ? a?.get(i) : void 0;
1787
+ if (o) for (let e = 0; e < q.length; e++) {
1788
+ let t = q[e];
1789
+ o[t] !== void 0 && (r[t] = o[t]);
1729
1790
  }
1730
- 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);
1791
+ 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, "lockedPosition", r, "lockedPosition", e.BOOLEAN_COPY), e.copyFromAttribute(t, "rowHeight", r, "rowHeight", e.INT_COPY);
1792
+ }
1793
+ },
1794
+ TimelinesVisitor: class {
1795
+ visit(e, t, n) {
1796
+ let r = n.slicers;
1797
+ r || (r = {}, n.slicers = r);
1798
+ let i = t.childNodes;
1799
+ for (let t = 0; t < i.length; t++) {
1800
+ let n = i.item(t);
1801
+ n.nodeType === 1 && n.localName === "timeline" && this.processTimeline(e, n, r);
1802
+ }
1803
+ return r;
1804
+ }
1805
+ processTimeline(e, t, n) {
1806
+ let r = {};
1807
+ n[t.getAttribute("name")] = r, e.copyFromAttribute(t, "xr10:uid", r, "uid");
1808
+ let i = t.getAttribute("cache"), a = e.getVisitorParamsState().get("slicerCaches"), o = i ? a?.get(i) : void 0;
1809
+ if (o) for (let e = 0; e < q.length; e++) {
1810
+ let t = q[e];
1811
+ o[t] !== void 0 && (r[t] = o[t]);
1812
+ }
1813
+ e.copyFromAttribute(t, "caption", r);
1814
+ let s = {};
1815
+ for (let e = 0; e < t.attributes.length; e++) {
1816
+ let n = t.attributes.item(e);
1817
+ Ie.has(n.name) || n.name.startsWith("xmlns") || (s[n.name] = n.value);
1818
+ }
1819
+ r.timelineAttributes = s;
1820
+ let c = "", l = t.childNodes;
1821
+ for (let t = 0; t < l.length; t++) {
1822
+ let n = l.item(t);
1823
+ n.nodeType === 1 && (c += e.serializeElement(n) ?? "");
1824
+ }
1825
+ r.timelineBody = c;
1731
1826
  }
1732
1827
  },
1733
1828
  FormControlPrVisitor: class {
@@ -1740,15 +1835,17 @@ var $ = {
1740
1835
  let a = [], o, s = t.childNodes;
1741
1836
  for (let t = 0; t < s.length; t++) {
1742
1837
  let n = s.item(t);
1743
- if (n.nodeType === 1) if (n.localName === "itemLst") {
1744
- let e = n.childNodes;
1745
- for (let t = 0; t < e.length; t++) {
1746
- let n = e.item(t);
1747
- n.nodeType === 1 && n.localName === "item" && a.push(n.getAttribute("val") ?? "");
1748
- }
1749
- } else n.localName === "extLst" && (o = e.serializeElement(n) ?? void 0);
1838
+ if (n.nodeType === 1) {
1839
+ if (n.localName === "itemLst") {
1840
+ let e = n.childNodes;
1841
+ for (let t = 0; t < e.length; t++) {
1842
+ let n = e.item(t);
1843
+ n.nodeType === 1 && n.localName === "item" && a.push(n.getAttribute("val") ?? "");
1844
+ }
1845
+ } else n.localName === "extLst" && (o = e.serializeElement(n) ?? void 0);
1846
+ }
1750
1847
  }
1751
- let c = b(r, a, o);
1848
+ let c = de(r, a, o);
1752
1849
  return n.formControl = c, c;
1753
1850
  }
1754
1851
  },
@@ -1757,19 +1854,19 @@ var $ = {
1757
1854
  return n;
1758
1855
  }
1759
1856
  afterVisit(e, t, n) {
1760
- for (let e of n?.movables ?? []) {
1761
- let t = e.content;
1762
- if (t?.type !== "shape" || !t.json) continue;
1763
- let n = t.json.rotation;
1764
- n !== void 0 && (delete t.json.rotation, n !== 0 && (e.rotation = n));
1765
- }
1857
+ for (let e of n?.movables ?? []) J(e, !1);
1766
1858
  }
1767
1859
  },
1768
1860
  DrawingAnchorVisitor: class {
1769
1861
  visit(e, t, n) {
1770
1862
  if (!t) return;
1771
1863
  let r = {};
1772
- 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;
1864
+ e.copyFromAttribute(t, "editAs", r, "anchorType"), r.anchor = {}, t.localName === "absoluteAnchor" ? (r.anchorType = "absolute", this.processAbsoluteCoord(e, e.evaluate("pos", t), r.anchor, "from", "x", "y"), this.processAbsoluteCoord(e, e.evaluate("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("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"));
1865
+ let i = e.evaluate("clientData", t), a = (e) => {
1866
+ let t = i?.getAttribute(e);
1867
+ return t === "0" || t === "false";
1868
+ };
1869
+ return a("fPrintsWithSheet") && (r.noPrint = !0), a("fLocksWithSheet") && (r.unlocked = !0), n.movables ||= [], n.movables.push(r), r;
1773
1870
  }
1774
1871
  processAbsoluteCoord(e, t, n, r, i, a) {
1775
1872
  if (!t) return;
@@ -1777,7 +1874,7 @@ var $ = {
1777
1874
  x: 0,
1778
1875
  y: 0
1779
1876
  };
1780
- return o.x = x(t.getAttribute(i)), o.y = x(t.getAttribute(a)), r === "from" ? n.tl = o : n.br = o, n;
1877
+ return o.x = v(t.getAttribute(i)), o.y = v(t.getAttribute(a)), r === "from" ? n.tl = o : n.br = o, n;
1781
1878
  }
1782
1879
  processOffsetCoord(e, t, n, r) {
1783
1880
  if (!t) return;
@@ -1787,116 +1884,182 @@ var $ = {
1787
1884
  x: 0,
1788
1885
  y: 0
1789
1886
  };
1790
- 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 = x(e.evaluate("colOff", t).textContent)), e.evaluate("rowOff", t) && (i.y = x(e.evaluate("rowOff", t).textContent)), r === "from" ? n.tl = i : n.br = i, n;
1887
+ 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 = v(e.evaluate("colOff", t).textContent)), e.evaluate("rowOff", t) && (i.y = v(e.evaluate("rowOff", t).textContent)), r === "from" ? n.tl = i : n.br = i, n;
1791
1888
  }
1792
1889
  },
1793
- DrawingGraphicFrameVisitor: class extends q {
1890
+ DrawingGraphicFrameVisitor: class extends V {
1794
1891
  visit(e, t, n) {
1795
1892
  if (!t) return;
1796
1893
  if (this.isGroupContent(n)) {
1797
- let r = this.readChildHeader(e, t, "graphicFrame");
1798
- return n.children.push(r), r;
1894
+ if (e.getPath().includes("Fallback")) return {};
1895
+ let { movable: r } = this.readMemberHeader(e, t, "graphicFrame"), i = e.evaluate("xfrm", t);
1896
+ if (i) {
1897
+ s(i, r);
1898
+ let t = e.evaluate("off", i), n = e.evaluate("ext", i);
1899
+ r.anchor = {
1900
+ tl: {
1901
+ x: v(t?.getAttribute("x") ?? null) ?? 0,
1902
+ y: v(t?.getAttribute("y") ?? null) ?? 0
1903
+ },
1904
+ br: {
1905
+ x: v(n?.getAttribute("cx") ?? null) ?? 0,
1906
+ y: v(n?.getAttribute("cy") ?? null) ?? 0
1907
+ }
1908
+ };
1909
+ }
1910
+ let a = this.readGraphic(e, t), o = a.type === "chart" ? {
1911
+ ...r.content.json,
1912
+ ...a.json
1913
+ } : a.json;
1914
+ return r.content = {
1915
+ ...r.content,
1916
+ type: a.type,
1917
+ json: o
1918
+ }, n.members.push(r), a.json;
1799
1919
  }
1800
1920
  n = super.visit(e, t, n);
1801
1921
  let r = e.evaluate("nvGraphicFramePr/cNvGraphicFramePr", t);
1802
1922
  if (r) {
1803
1923
  let t = e.evaluate("graphicFrameLocks", r);
1804
- if (t) {
1805
- t.hasAttribute("noChangeAspect") && (n.lockAspect = t.getAttribute("noChangeAspect") === "1");
1806
- let e = {};
1807
- Object.keys(e).length > 0 && (n.locks = e);
1808
- }
1924
+ t && t.hasAttribute("noChangeAspect") && (n.lockAspect = t.getAttribute("noChangeAspect") === "1");
1809
1925
  }
1810
- let i = {
1926
+ let i = this.readGraphic(e, t);
1927
+ return this.setContent(n, i), i;
1928
+ }
1929
+ readGraphic(e, t) {
1930
+ let n = e.evaluate("graphic/graphicData", t), r = {
1811
1931
  type: "graphicFrame",
1812
1932
  json: {}
1813
- }, a = e.evaluate("graphic/graphicData", t).childNodes, o = a.length;
1814
- for (let n = 0; n < o; n++) {
1815
- let r = a.item(n);
1816
- if (r.nodeType === 1) try {
1817
- let n = r.localName;
1818
- n === "chart" ? n = "chart" : n === "slicer" && (n = "slicer"), i.type = n;
1819
- let a = r.getAttribute("r:id");
1820
- if (n === "chart" && a) {
1821
- let n = e.evaluate("*/cNvPr", t);
1822
- n?.item && (n = n.item(0));
1823
- let r = n?.getAttribute?.("id"), o = r ? parseInt(r, 10) : void 0;
1824
- i.json = {
1825
- xml: e.serializeElement(t) ?? void 0,
1826
- sourceId: o === void 0 || isNaN(o) ? void 0 : o,
1827
- part: e.readEmbeddedPart(a) ?? void 0
1933
+ };
1934
+ if (!n) return r;
1935
+ let i = n.childNodes, a = i.length;
1936
+ for (let n = 0; n < a; n++) {
1937
+ let a = i.item(n);
1938
+ if (a.nodeType === 1) try {
1939
+ let n = a.localName;
1940
+ n === "chart" ? n = "chart" : n !== "slicer" && n !== "timeslicer" || (n = "slicer"), r.type = n;
1941
+ let i = a.getAttribute("r:id");
1942
+ if (n === "chart" && i) {
1943
+ let n = this.readSourceId(e, t), a = e.readEmbeddedPart(i) ?? void 0, o;
1944
+ try {
1945
+ let t = a?.xml ? Se(a.xml) : null;
1946
+ o = t?.model, t?.lossy && e.warn("A chart states something its model does not; it is saved as it was until it is changed.", { onceKey: "xlsx.chart.lossy" });
1947
+ } catch (t) {
1948
+ e.warn(`A chart could not be read into the chart model; it is kept as its markup: ${t?.message ?? t}`, { onceKey: "xlsx.chart.model" });
1949
+ }
1950
+ r.json = {
1951
+ sourceId: n,
1952
+ part: a,
1953
+ model: o
1828
1954
  };
1829
- } else a && (i.json = e.getRef(a));
1955
+ } else if (n === "slicer") {
1956
+ let n = this.readSourceId(e, t);
1957
+ n !== void 0 && (r.json = { sourceId: n });
1958
+ } else i && (r.json = e.getRef(i));
1830
1959
  } catch (t) {
1831
1960
  e.warn(`Unable to read a graphic frame: ${t?.message ?? t}`, { onceKey: "xlsx.drawing.graphicFrame" });
1832
1961
  }
1833
1962
  }
1834
- return i && this.setContent(n, i), i;
1963
+ return r;
1835
1964
  }
1836
1965
  },
1837
- DrawingSpVisitor: J,
1838
- DrawingPicVisitor: class extends q {
1839
- constructor(...e) {
1840
- super(...e), this._fills = new r();
1841
- }
1966
+ DrawingSpVisitor: Y,
1967
+ DrawingPicVisitor: class extends V {
1842
1968
  visit(e, t, n) {
1843
1969
  if (!t) return;
1844
1970
  if (this.isGroupContent(n)) {
1845
- let r = this.readChildHeader(e, t, j.Type.Picture);
1846
- return this.readPictureDetails(e, t, r), n.children.push(r), r;
1847
- }
1848
- let r = super.visit(e, t, n), i = e.evaluate("nvPicPr/cNvPicPr", t);
1849
- if (i) {
1850
- e.copyFromAttribute(t, "preferRelativeResize", r, "preferRelativeResize", e.BOOLEAN_COPY);
1851
- let n = e.evaluate("picLocks", i);
1852
- if (n) {
1853
- n.hasAttribute("noChangeAspect") && (r.lockAspect = n.getAttribute("noChangeAspect") === "1");
1854
- let t = {};
1855
- e.copyFromAttribute(n, "noChangeArrowheads", r, "noChangeArrowheads", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noChangeShapeType", r, "noChangeShapeType", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noEditPoints", r, "noEditPoints", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noAdjustHandles", r, "noAdjustHandles", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noCrop", r, "noCrop", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noGrp", r, "noGrp", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noMove", r, "noMove", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noResize", r, "noResize", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noRot", r, "noRot", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noSelect", r, "noSelect", e.BOOLEAN_COPY), Object.keys(t).length > 0 && (r.locks = t);
1856
- }
1857
- }
1858
- let a = this.readImageResource(e, t);
1859
- if (a === null) return;
1860
- let o = { resId: a };
1861
- return this.setContent(n, {
1971
+ if (e.getPath().includes("Fallback")) return {};
1972
+ let { movable: r, content: i } = this.readMemberHeader(e, t, "picture"), a = this.readImage(e, t);
1973
+ return a ? (this.readPictureDetails(e, t, a, r, i), n.members.push(r), i) : {};
1974
+ }
1975
+ let r = super.visit(e, t, n), i = this.readImage(e, t);
1976
+ if (i === null) return;
1977
+ let a = {}, o = this.readSourceId(e, t);
1978
+ return o !== void 0 && (a.sourceId = o), this.readPictureDetails(e, t, i, r, a), this.setContent(r, {
1862
1979
  type: "picture",
1863
- json: o
1864
- }), r;
1865
- }
1866
- readPictureDetails(e, t, n) {
1867
- let r = t.getAttribute("macro");
1868
- r && (n.macro = r), t.hasAttribute("fPublished") && (n.published = _(t.getAttribute("fPublished")));
1869
- let i = this.readLocks(e.evaluate("nvPicPr/cNvPicPr/picLocks", t));
1870
- i && (n.locks = i);
1871
- let a = e.evaluate("blipFill", t);
1872
- a && (n.fill = this._fills.processImageFill(e, a));
1873
- }
1874
- readImageResource(e, t) {
1875
- let n = e.evaluate("blipFill/blip", t);
1876
- if (!n) return;
1877
- let r = n.getAttribute("r:embed") ?? n.getAttribute("embed");
1878
- return r ||= n.getAttribute("r:link") ?? n.getAttribute("link"), r ? e.getRef(r, !0) : (e.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.drawing.picture.noRel" }), null);
1980
+ json: a
1981
+ }), a;
1982
+ }
1983
+ readPictureDetails(e, t, n, r, i) {
1984
+ n?.resId !== void 0 && (i.resId = n.resId), n?.image && (i.image = n.image);
1985
+ let a = t.getAttribute("macro");
1986
+ a && (i.macro = a), t.hasAttribute("fPublished") && (i.published = _(t.getAttribute("fPublished")));
1987
+ let o = e.evaluate("nvPicPr/cNvPicPr", t);
1988
+ if (o?.getAttribute) {
1989
+ o.getAttribute("preferRelativeResize") === "0" && (i.noRelativeResize = !0);
1990
+ let t = this.readLocks(e.evaluate("picLocks", o));
1991
+ t && (i.locks = t), r.lockAspect = t?.noChangeAspect ?? !1;
1992
+ }
1993
+ }
1994
+ readImage(e, t) {
1995
+ let n = e.evaluate("blipFill", t), r = n ? e.evaluate("blip", n) : null;
1996
+ if (!r) return;
1997
+ if (!(r.getAttribute("r:embed") ?? r.getAttribute("embed") ?? r.getAttribute("r:link") ?? r.getAttribute("link"))) return e.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.drawing.picture.noRel" }), null;
1998
+ let { type: i, resId: a, ...o } = new p().processImageFill(e, n);
1999
+ return !o.tile && o.stretch && Object.keys(o.stretch).length === 0 && delete o.stretch, o.extLst && Le.test(o.extLst) && delete o.extLst, {
2000
+ resId: a,
2001
+ image: Object.keys(o).length > 0 ? o : void 0
2002
+ };
1879
2003
  }
1880
2004
  },
1881
- DrawingGrpSpVisitor: class extends J {
2005
+ DrawingGrpSpVisitor: class extends V {
2006
+ constructor(...e) {
2007
+ super(...e), this._fills = new p();
2008
+ }
1882
2009
  visit(e, t, n) {
1883
2010
  if (!t) return;
1884
- let r = this.isGroupContent(n), i = this.visitShape(e, t, n, "grpSp", "nvGrpSpPr/cNvGrpSpPr/grpSpLocks");
1885
- if (i?.type === j.Type.Group) {
1886
- i.children = [];
1887
- let n = e.evaluate("grpSpPr/xfrm", t);
1888
- if (n) {
1889
- s(n, i), n.getAttribute("flipH") === "1" && (i.flipH = !0), n.getAttribute("flipV") === "1" && (i.flipV = !0);
1890
- let t = Y(e, n, "chOff", "chExt");
1891
- t && (i.childBounds = t);
1892
- let a = r || !t ? Y(e, n, "off", "ext") : null;
1893
- a && (i.bounds = a);
2011
+ let r = this.isGroupContent(n), i, a;
2012
+ if (r) {
2013
+ if (e.getPath().includes("Fallback")) return {};
2014
+ let r = this.readMemberHeader(e, t, "group");
2015
+ i = r.movable, a = r.content, n.members.push(i);
2016
+ } else {
2017
+ if (e.getPath().includes("Fallback") && n.content) return {};
2018
+ i = super.visit(e, t, n), a = {};
2019
+ let r = this.readSourceId(e, t);
2020
+ r !== void 0 && (a.sourceId = r), this.setContent(i, {
2021
+ type: "group",
2022
+ json: a
2023
+ });
2024
+ }
2025
+ a.members = [];
2026
+ let o = e.evaluate("nvGrpSpPr/cNvGrpSpPr/grpSpLocks", t);
2027
+ o?.hasAttribute?.("noChangeAspect") && (i.lockAspect = o.getAttribute("noChangeAspect") === "1");
2028
+ let c = this.readLocks(o);
2029
+ c && (a.locks = c);
2030
+ let l = e.evaluate("grpSpPr", t);
2031
+ if (l) {
2032
+ let t = e.evaluate("xfrm", l);
2033
+ if (t) {
2034
+ s(t, i), t.getAttribute("flipH") === "1" && (i.flipH = !0), t.getAttribute("flipV") === "1" && (i.flipV = !0);
2035
+ let n = X(e, t, "off", "ext"), o = X(e, t, "chOff", "chExt") ?? n;
2036
+ o && (a.childBounds = o), r && n && (i.anchor = {
2037
+ tl: {
2038
+ x: n.x,
2039
+ y: n.y
2040
+ },
2041
+ br: {
2042
+ x: n.width,
2043
+ y: n.height
2044
+ }
2045
+ });
1894
2046
  }
2047
+ let n = this._fills.getFill(e, l);
2048
+ n && Object.keys(n).length > 0 && (a.fill = n);
2049
+ let o = this._fills.getEffects(e, l);
2050
+ o && (a.effects = o);
2051
+ let c = e.evaluate("scene3d", l), u = c ? e.serializeElement(c) : null;
2052
+ u && (a.scene3d = u);
2053
+ let d = e.evaluate("extLst", l), f = d ? e.serializeElement(d) : null;
2054
+ f && (a.extLst = {
2055
+ ...a.extLst,
2056
+ properties: f
2057
+ });
1895
2058
  }
1896
- return i;
2059
+ return a;
1897
2060
  }
1898
2061
  },
1899
- DrawingCxnSpVisitor: class extends J {
2062
+ DrawingCxnSpVisitor: class extends Y {
1900
2063
  visit(e, t, n) {
1901
2064
  if (t) return this.visitShape(e, t, n, "cxnSp", "nvCxnSpPr/cNvCxnSpPr/cxnSpLocks");
1902
2065
  }
@@ -2009,75 +2172,47 @@ var $ = {
2009
2172
  return n;
2010
2173
  }
2011
2174
  },
2012
- RichValueStructureVisitor: class {
2175
+ FeaturePropertyBagVisitor: class {
2013
2176
  visit(e, t, n) {
2014
- let r = e.getVisitorParamsState().get(X);
2015
- r || (r = [], e.getVisitorParamsState().set(X, r));
2016
- let i = t.childNodes, a = i.length;
2017
- for (let t = 0; t < a; t++) {
2018
- let n = i.item(t);
2019
- if (n.nodeType === 1 && n.localName === "s") {
2020
- let t = {
2021
- type: n.getAttribute("t") ?? "n",
2022
- keys: []
2023
- };
2024
- this.processKeys(e, n, t), r.push(t);
2025
- }
2177
+ let r = [], i = t.childNodes;
2178
+ for (let e = 0; e < i.length; e++) {
2179
+ let t = i.item(e);
2180
+ t.nodeType === 1 && t.localName === "bag" && r.push(this._readBag(t));
2026
2181
  }
2027
- return n.richTypes = r, r;
2028
- }
2029
- processKeys(e, t, n) {
2030
- let r = t.childNodes, i = r.length, a = n.keys;
2031
- for (let e = 0; e < i; e++) {
2032
- let t = r.item(e);
2033
- if (t.nodeType === 1 && t.localName === "k") {
2034
- let e = t.getAttribute("n"), n = t.getAttribute("t");
2035
- a.push([e, n]);
2036
- }
2182
+ let a = [], o = r.find((e) => e.type === "XFComplements")?.arrays.get("MappedFeaturePropertyBags") ?? [];
2183
+ for (let t = 0; t < o.length; t++) {
2184
+ let n = r[o[t]]?.ids.get("XFControls"), i = n === void 0 ? void 0 : r[n]?.ids.get("CellControl"), s = i === void 0 ? void 0 : r[i]?.type, c = s ? Re[s] : void 0;
2185
+ c || e.warn(`A cell format's feature '${s ?? "unknown"}' is not read; its cells keep their values.`), a.push(c ? { type: c } : null);
2037
2186
  }
2187
+ let s = { controls: a };
2188
+ return n.featurePropertyBag = s, s;
2038
2189
  }
2039
- },
2040
- RichValueDataVisitor: class {
2041
- visit(e, t, n) {
2042
- let r = e.getVisitorParamsState().get("richTypes");
2043
- if (!r) return void e.warn("RichValueFound but not type.");
2044
- let i = e.getVisitorParamsState().get(Z);
2045
- i || (i = [], e.getVisitorParamsState().set(Z, i));
2046
- let a = t.childNodes, o = a.length;
2047
- for (let t = 0; t < o; t++) {
2048
- let n = a.item(t);
2049
- if (n.nodeType === 1 && n.localName === "rv") {
2050
- let t = r[n.getAttribute("s")], a = { type: t.type };
2051
- this.processValues(e, n, a, t);
2052
- let o = this.mapType(e, a);
2053
- i.push(o);
2190
+ _readBag(e) {
2191
+ let t = {
2192
+ type: e.getAttribute("type") ?? "",
2193
+ ids: /* @__PURE__ */ new Map(),
2194
+ arrays: /* @__PURE__ */ new Map()
2195
+ }, n = e.childNodes;
2196
+ for (let e = 0; e < n.length; e++) {
2197
+ let r = n.item(e);
2198
+ if (r.nodeType !== 1) continue;
2199
+ let i = r.getAttribute("k") ?? "";
2200
+ if (r.localName === "bagId") {
2201
+ let e = parseInt(r.textContent ?? "", 10);
2202
+ isNaN(e) || t.ids.set(i, e);
2203
+ } else if (r.localName === "a") {
2204
+ let e = [], n = r.childNodes;
2205
+ for (let t = 0; t < n.length; t++) {
2206
+ let r = n.item(t);
2207
+ if (r.nodeType !== 1 || r.localName !== "bagId") continue;
2208
+ let i = parseInt(r.textContent ?? "", 10);
2209
+ isNaN(i) || e.push(i);
2210
+ }
2211
+ t.arrays.set(i, e);
2054
2212
  }
2055
2213
  }
2056
- return n.richData = i, i;
2057
- }
2058
- mapType(e, t) {
2059
- if (t.type === "_error") {
2060
- let e = t.errorType;
2061
- if (e) try {
2062
- t = E.getBuiltInByCode(e + 1) ?? E.BuiltIn.Unknown;
2063
- } catch {}
2064
- }
2065
2214
  return t;
2066
2215
  }
2067
- processValues(e, t, n, r) {
2068
- let i = t.childNodes, a = i.length;
2069
- r.type;
2070
- let o = r.keys;
2071
- for (let t = 0; t < a; t++) {
2072
- let r = i.item(t);
2073
- if (r.nodeType === 1 && r.localName === "v") {
2074
- let i = o[t];
2075
- if (!i) return void e.warn("Invalid richData");
2076
- let a = i[0], s = i[1], c = r.textContent;
2077
- s === "i" && (c = Number(c)), n[a] = c;
2078
- }
2079
- }
2080
- }
2081
2216
  },
2082
2217
  CommentsVisitor: class {
2083
2218
  visit(e, t, n) {
@@ -2123,7 +2258,7 @@ var $ = {
2123
2258
  if (n.nodeType === 1) {
2124
2259
  if (n.localName === "t") e.text += n.textContent ?? "";
2125
2260
  else if (n.localName === "rPr") {
2126
- let t = se(n);
2261
+ let t = ze(n);
2127
2262
  t && (e.font = t);
2128
2263
  }
2129
2264
  }
@@ -2150,9 +2285,9 @@ var $ = {
2150
2285
  visit(e, t, n) {
2151
2286
  if (!t) return;
2152
2287
  let r = {};
2153
- e.copyFromAttribute(t, "id", r, "id", S);
2288
+ e.copyFromAttribute(t, "id", r, "id", C);
2154
2289
  let i = t.getAttribute("ref");
2155
- e.copyFromAttribute(t, "personId", r, "personId", S), e.copyFromAttribute(t, "parentId", r, "parentId", S);
2290
+ e.copyFromAttribute(t, "personId", r, "personId", C), e.copyFromAttribute(t, "parentId", r, "parentId", C);
2156
2291
  let a = t.getAttribute("dT");
2157
2292
  a && (r.dt = function(e) {
2158
2293
  let t = /^(.*T\d{2}:\d{2}:\d{2})(?:\.(\d+))?(Z|[+-]\d{2}:?\d{2})?$/i.exec(e.trim());
@@ -2172,8 +2307,8 @@ var $ = {
2172
2307
  let r = n.getAttribute("mentionId"), a = n.getAttribute("mentionpersonId");
2173
2308
  if (!r || !a) continue;
2174
2309
  let o = {
2175
- id: S(r),
2176
- personId: S(a)
2310
+ id: C(r),
2311
+ personId: C(a)
2177
2312
  }, s = parseInt(n.getAttribute("startIndex") ?? "", 10);
2178
2313
  isNaN(s) || (o.startIndex = s);
2179
2314
  let c = parseInt(n.getAttribute("length") ?? "", 10);
@@ -2195,33 +2330,33 @@ var $ = {
2195
2330
  let n = i.item(t);
2196
2331
  if (n.nodeType === 1 && n.localName === "person") {
2197
2332
  let t = {};
2198
- 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);
2333
+ e.copyFromAttribute(n, "id", t, "id", C), e.copyFromAttribute(n, "displayName", t), e.copyFromAttribute(n, "userId", t, "userId", C), e.copyFromAttribute(n, "providerId", t), r.push(t);
2199
2334
  }
2200
2335
  }
2201
2336
  return r.length > 0 && (n.persons = r), r;
2202
2337
  }
2203
2338
  }
2204
- }, ce = class {
2339
+ }, Be = class {
2205
2340
  constructor(e, t) {
2206
2341
  this.path = e, this.visitor = t;
2207
2342
  }
2208
- }, le = class {
2343
+ }, Ve = class {
2209
2344
  constructor() {
2210
- this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new $.RelsVisitor()), this.registerVisitor("cp:coreProperties", new $.CorePropertiesVisitor()), this.registerVisitor("Properties", new $.AppPropertiesVisitor()), this.registerVisitor("spPr", new $.ShapePropertiesVisitor()), this.registerVisitor("txBody", new $.ShapeTextVisitor()), this.registerVisitor("txPr", new $.TextPropertiesVisitor()), this.registerVisitor("c:chartSpace", new $.ChartSpaceVisitor()), this.registerVisitor("c:plotArea", new $.PlotAreaVisitor()), this.registerVisitor("c:barChart", new $.BarChartTypeVisitor()), this.registerVisitor("c:doughnutChart", new $.ChartTypeVisitor()), this.registerVisitor("c:lineChart", new $.ChartTypeVisitor()), this.registerVisitor("c:ofPieType", new $.ChartTypeVisitor()), this.registerVisitor("c:pieChart", new $.ChartTypeVisitor()), this.registerVisitor("c:scatterChart", new $.ChartTypeVisitor()), this.registerVisitor("c:barChart", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new $.SeriesVisitor()), this.registerVisitor("c:dPt", new $.DataPointVisitor()), this.registerVisitor("c:marker", new $.MarkerVisitor()), this.registerVisitor("c:catAx", new $.AxisVisitor()), this.registerVisitor("c:valAx", new $.AxisVisitor()), this.registerVisitor("c:dateAx", new $.AxisVisitor()), this.registerVisitor("c:majorGridlines", new H("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new H("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new $.TextPropertiesVisitor("labels.text"), "txPr"), this.registerVisitor("c:valAx", new $.TextPropertiesVisitor("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new $.TextPropertiesVisitor("labels.text"), "txPr"), this.registerVisitor("c:legend", new $.LegendVisitor()), this.registerVisitor("c:legend", new $.TextPropertiesVisitor("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new $.LegendEntryVisitor()), this.registerVisitor("c:ser", new $.NegativeShapeVisitor(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new $.DataLabelsVisitor("labels"), "dLbls"), this.registerVisitor("c:dLbl", new $.DataLabelsVisitor("points")), this.registerVisitor("c:title", new $.TitleVisitor()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new $.LayoutVisitor()), this.registerVisitor("c:dispUnits", new H("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new $.TitleVisitor("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new $.TextPropertiesVisitor(), "tx/rich"), this.registerVisitor("a:theme", new $.ThemeVisitor()), this.registerVisitor("a:theme", new $.ClrSchemeVisitor(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new $.FontSchemeVisitor(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new $.FmtSchemeVisitor(), "themeElements/fmtScheme"), this.registerVisitor("autoFilter", new $.AutoFilterVisitor()), this.registerVisitor("sortState", new $.SortStateVisitor()), this.registerVisitor("s:workbook", new $.WorkbookVisitor()), this.registerVisitor("styleSheet", new $.SheetStyleVisitor()), this.registerVisitor("x14:table", new $.TableX14Visitor()), this.registerVisitor("table", new $.TableVisitor()), this.registerVisitor("externalLink", new $.ExternalLinkVisitor()), this.registerVisitor("wsDr", new $.DrawingVisitor()), this.registerVisitor("twoCellAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("oneCellAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("absoluteAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("graphicFrame", new $.DrawingGraphicFrameVisitor()), this.registerVisitor("sp", new $.DrawingSpVisitor()), this.registerVisitor("grpSp", new $.DrawingGrpSpVisitor()), this.registerVisitor("cxnSp", new $.DrawingCxnSpVisitor()), this.registerVisitor("pic", new $.DrawingPicVisitor()), this.registerVisitor("metadata", new $.MetadataVisitor()), this.registerVisitor("rvStructures", new $.RichValueStructureVisitor()), this.registerVisitor("rvData", new $.RichValueDataVisitor()), this.registerVisitor("comments", new $.CommentsVisitor()), this.registerVisitor("comment", new $.CommentVisitor()), this.registerVisitor("ThreadedComments", new $.ThreadedCommentsVisitor()), this.registerVisitor("threadedComment", new $.ThreadedCommentVisitor()), this.registerVisitor("threadedComment", new $.TextPropertiesVisitor("content"), "text"), this.registerVisitor("personList", new $.PersonListVisitor()), this.registerVisitor("slicerCacheDefinition", new $.SlicerCacheDefinitionVisitor()), this.registerVisitor("slicers", new $.SlicersVisitor()), this.registerVisitor("formControlPr", new $.FormControlPrVisitor());
2345
+ this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new $.RelsVisitor()), this.registerVisitor("cp:coreProperties", new $.CorePropertiesVisitor()), this.registerVisitor("Properties", new $.AppPropertiesVisitor()), this.registerVisitor("spPr", new $.ShapePropertiesVisitor()), this.registerVisitor("txBody", new $.ShapeTextVisitor()), this.registerVisitor("txPr", new $.TextPropertiesVisitor()), this.registerVisitor("a:theme", new $.ThemeVisitor()), this.registerVisitor("a:theme", new $.ClrSchemeVisitor(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new $.FontSchemeVisitor(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new $.FmtSchemeVisitor(), "themeElements/fmtScheme"), this.registerVisitor("a:theme", new $.ObjectDefaultsVisitor(), "objectDefaults"), this.registerVisitor("autoFilter", new $.AutoFilterVisitor()), this.registerVisitor("sortState", new $.SortStateVisitor()), this.registerVisitor("s:workbook", new $.WorkbookVisitor()), this.registerVisitor("styleSheet", new $.SheetStyleVisitor()), this.registerVisitor("x14:table", new $.TableX14Visitor()), this.registerVisitor("table", new $.TableVisitor()), this.registerVisitor("externalLink", new $.ExternalLinkVisitor()), this.registerVisitor("wsDr", new $.DrawingVisitor()), this.registerVisitor("twoCellAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("oneCellAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("absoluteAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("graphicFrame", new $.DrawingGraphicFrameVisitor()), this.registerVisitor("sp", new $.DrawingSpVisitor()), this.registerVisitor("grpSp", new $.DrawingGrpSpVisitor()), this.registerVisitor("cxnSp", new $.DrawingCxnSpVisitor()), this.registerVisitor("pic", new $.DrawingPicVisitor()), this.registerVisitor("metadata", new $.MetadataVisitor()), this.registerVisitor("FeaturePropertyBags", new $.FeaturePropertyBagVisitor()), this.registerVisitor("comments", new $.CommentsVisitor()), this.registerVisitor("comment", new $.CommentVisitor()), this.registerVisitor("ThreadedComments", new $.ThreadedCommentsVisitor()), this.registerVisitor("threadedComment", new $.ThreadedCommentVisitor()), this.registerVisitor("threadedComment", new $.TextPropertiesVisitor("content"), "text"), this.registerVisitor("personList", new $.PersonListVisitor()), this.registerVisitor("slicerCacheDefinition", new $.SlicerCacheDefinitionVisitor()), this.registerVisitor("slicers", new $.SlicersVisitor()), this.registerVisitor("timelineCacheDefinition", new $.SlicerCacheDefinitionVisitor()), this.registerVisitor("timelines", new $.TimelinesVisitor()), this.registerVisitor("formControlPr", new $.FormControlPrVisitor());
2211
2346
  }
2212
2347
  registerVisitor(e, t, n = null) {
2213
2348
  e.indexOf(":") === -1 && (e = "*:" + e);
2214
2349
  let r = e.split(":"), i = r.length > 1 ? r[1] : r[0];
2215
2350
  if (!n) return this.visitorsByXmlTagName.set(i, t), void this.visitorsByXmlTagName.set(e, t);
2216
2351
  let a = this.scopedVisitorsByXmlTagName.get(i);
2217
- a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new ce(n, t));
2352
+ a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new Be(n, t));
2218
2353
  }
2219
- parseDxf(e, t = "", n = w.EmptyObject) {
2354
+ parseDxf(e, t = "", n = E.EmptyObject) {
2220
2355
  this.visitorParamsState ||= /* @__PURE__ */ new Map();
2221
2356
  let r = this.visitorParamsState, i = r.get("processingDXFs");
2222
2357
  r.set("processingDXFs", !0);
2223
2358
  try {
2224
- let r = new V(null, this, "/dxf", e, {}, t, n), i = {};
2359
+ let r = new R(null, this, "/dxf", e, {}, t, n), i = {};
2225
2360
  return new $.SheetStyleVisitor().processDXF(r, e, i), i;
2226
2361
  } finally {
2227
2362
  i === void 0 ? r.delete("processingDXFs") : r.set("processingDXFs", i);
@@ -2230,12 +2365,12 @@ var $ = {
2230
2365
  getVisitorParamsState() {
2231
2366
  return this.visitorParamsState;
2232
2367
  }
2233
- transform(e, t, n = w.EmptyObject) {
2368
+ transform(e, t, n = E.EmptyObject) {
2234
2369
  let r = e.documentElement;
2235
2370
  this.visitorParamsState && !n?.paramMap || (this.visitorParamsState = n?.paramMap ?? /* @__PURE__ */ new Map());
2236
2371
  let i = {}, a = this.visitorsByXmlTagName.get(r.nodeName);
2237
2372
  if (a ||= this.visitorsByXmlTagName.get(r.localName), !a) throw Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);
2238
- let o = "/" + r.localName, s = new V(null, this, o, r, i, t, n), c = [];
2373
+ let o = "/" + r.localName, s = new R(null, this, o, r, i, t, n), c = [];
2239
2374
  this._doWalk(a, s, c, r, i, t, n);
2240
2375
  let l = c.length;
2241
2376
  for (let e = 0; e < l; e++) {
@@ -2263,7 +2398,7 @@ var $ = {
2263
2398
  for (; l && l !== r;) s = l.localName + "/" + s, l = l.parentNode;
2264
2399
  let u = t.getPath() + "/" + s;
2265
2400
  if (c.visitor) {
2266
- let r = new V(t, this, u, t.getElemRoot(), t.getJsonRoot(), a, o);
2401
+ let r = new R(t, this, u, t.getElemRoot(), t.getJsonRoot(), a, o);
2267
2402
  this._doWalk(c.visitor, r, n, e, i, a, o);
2268
2403
  }
2269
2404
  };
@@ -2289,10 +2424,10 @@ var $ = {
2289
2424
  if (r.nodeType !== 1) continue;
2290
2425
  let c = r, p = c.nodeName, m = l.get(p);
2291
2426
  m ||= (p = c.localName, l.get(p));
2292
- let h = t.getPath() + "/" + p, g = new V(t, this, h, u, d, a, o);
2427
+ let h = t.getPath() + "/" + p, g = new R(t, this, h, u, d, a, o);
2293
2428
  this._doWalk(m, g, n, c, s ?? i, a, o);
2294
2429
  }
2295
2430
  return s;
2296
2431
  }
2297
2432
  };
2298
- export { le as DOMTransformer, V as ExecutionContext, f as NumberUtils, n as VisitorUtils };
2433
+ export { Ve as DOMTransformer, R as ExecutionContext, o as NumberUtils, a as VisitorUtils };