@sheetxl/io-xlsx 0.7.28-beta.4 → 0.8.0-beta.10

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 (127) hide show
  1. package/browser/esm/{BXCOn1XvLvYSfpzi.mjs → 2EOdn2WRK5y1L58S.mjs} +193 -143
  2. package/browser/esm/{BknJ4AeVeFJploh9.mjs → B-jb5SuiVh5NnBG_.mjs} +28 -13
  3. package/browser/esm/BKT8OBj-bhQwdg49.mjs +67 -0
  4. package/browser/esm/BLXcoiDAaOMjFuhw.mjs +8056 -0
  5. package/browser/esm/BPmehfSqdvgsLBsB.mjs +5153 -0
  6. package/browser/esm/CI_CZI5m5-KkiAK5.mjs +3559 -0
  7. package/browser/esm/{C3sYFBc7Tym8l12A.mjs → DXopGe8PrLWmwGaV.mjs} +1 -1
  8. package/browser/esm/NQIuOQIleHC4NUW6.mjs +2446 -0
  9. package/browser/esm/index.mjs +2 -3
  10. package/browser/esm/{BhohPLTubb_9rfrh.mjs → xc_LzCPgHn-acgFZ.mjs} +2 -2
  11. package/licenses/dependencies.txt +2 -2
  12. package/node/esm/{B6lQXVQjFT_OE3IA.mjs → BmdmvgO5Zdgx-RWo.mjs} +2 -2
  13. package/node/esm/BpxxiZ2oKPkUSfdB.mjs +2486 -0
  14. package/node/esm/{B9CUp-rqol5K1r1c.mjs → CHqRP_NjPpPd7m9L.mjs} +1 -1
  15. package/node/esm/CtAF486aZqYzMeLM.mjs +3651 -0
  16. package/node/esm/{CfIzBnObj09fDuUX.mjs → O5mti2R9drFOlXc7.mjs} +49 -35
  17. package/node/esm/QS_theNoeqNGLStj.mjs +5298 -0
  18. package/node/esm/index.mjs +40 -25
  19. package/node/esm/nNQ7MG89sGKwkjMA.mjs +4649 -0
  20. package/package.json +7 -8
  21. package/types/src/AutoFilterRules.d.ts +86 -10
  22. package/types/src/ConditionalFormatRules.d.ts +5 -5
  23. package/types/src/DataValidationRules.d.ts +18 -2
  24. package/types/src/ExcelCalcStamp.d.ts +39 -0
  25. package/types/src/ExcelCompat.d.ts +197 -42
  26. package/types/src/ExcelReservedNames.d.ts +3 -4
  27. package/types/src/LegacyFormula.d.ts +28 -7
  28. package/types/src/OOXMLExtensions.d.ts +14 -2
  29. package/types/src/Plugin.d.ts +16 -5
  30. package/types/src/ProtectionAttributes.d.ts +38 -0
  31. package/types/src/SourcePackage.d.ts +31 -12
  32. package/types/src/Types.d.ts +17 -0
  33. package/types/src/reader/HiddenFormulas.d.ts +16 -0
  34. package/types/src/reader/SlicerJoin.d.ts +24 -0
  35. package/types/src/reader/Warning.d.ts +29 -0
  36. package/types/src/reader/ZipReader.d.ts +1 -1
  37. package/types/src/reader/_SlicerRecord.d.ts +37 -0
  38. package/types/src/reader/dom/CustGeomUtils.d.ts +7 -0
  39. package/types/src/reader/dom/DOMTransformer.d.ts +2 -2
  40. package/types/src/reader/dom/ExecutionContext.d.ts +16 -3
  41. package/types/src/reader/dom/Types.d.ts +19 -3
  42. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +13 -0
  43. package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +15 -2
  44. package/types/src/reader/domVisitors/CommentVisitor.d.ts +24 -2
  45. package/types/src/reader/domVisitors/CommentsVisitor.d.ts +2 -2
  46. package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts +1 -0
  47. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +32 -1
  48. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +9 -0
  49. package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +14 -2
  50. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +13 -0
  51. package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +20 -1
  52. package/types/src/reader/domVisitors/DrawingVisitor.d.ts +10 -0
  53. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +21 -3
  54. package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +4 -4
  55. package/types/src/reader/domVisitors/FormControlPrVisitor.d.ts +9 -0
  56. package/types/src/reader/domVisitors/ShapeTextVisitor.d.ts +44 -0
  57. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  58. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +19 -6
  59. package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +7 -2
  60. package/types/src/reader/domVisitors/SlicersVisitor.d.ts +7 -3
  61. package/types/src/reader/domVisitors/TextPropertiesVisitor.d.ts +13 -1
  62. package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +18 -1
  63. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  64. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +11 -1
  65. package/types/src/reader/domVisitors/index.d.ts +4 -2
  66. package/types/src/reader/sax/LeanSaxParser.d.ts +58 -0
  67. package/types/src/reader/sax/SaxParser.d.ts +11 -1
  68. package/types/src/reader/sax/SaxVisitor.d.ts +3 -2
  69. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +9 -0
  70. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +11 -4
  71. package/types/src/utils/DrawingMLText.d.ts +39 -0
  72. package/types/src/utils/FormControls.d.ts +170 -0
  73. package/types/src/utils/VmlNoteShapes.d.ts +135 -0
  74. package/types/src/vba/VBAProject.d.ts +52 -4
  75. package/types/src/writer/builder/ContentTypes.d.ts +13 -0
  76. package/types/src/writer/builder/Emitter.d.ts +11 -6
  77. package/types/src/writer/builder/EmitterRegistry.d.ts +7 -0
  78. package/types/src/writer/builder/OpcXmlUtils.d.ts +2 -0
  79. package/types/src/writer/builder/PackageBuilder.d.ts +72 -22
  80. package/types/src/writer/builder/PartWriter.d.ts +5 -0
  81. package/types/src/writer/builder/RelationshipSet.d.ts +3 -0
  82. package/types/src/writer/builder/Types.d.ts +117 -38
  83. package/types/src/writer/builder/_Types.d.ts +17 -0
  84. package/types/src/writer/emitters/CommentsEmitter.d.ts +58 -0
  85. package/types/src/writer/emitters/EmbeddedPartEmitter.d.ts +60 -0
  86. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +19 -0
  87. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +18 -0
  88. package/types/src/writer/emitters/PersonsEmitter.d.ts +17 -0
  89. package/types/src/writer/emitters/PivotTableEmitter.d.ts +45 -0
  90. package/types/src/writer/emitters/SlicerEmitter.d.ts +66 -0
  91. package/types/src/writer/emitters/StylesEmitter.d.ts +2 -2
  92. package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
  93. package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +27 -0
  94. package/types/src/writer/emitters/WorkbookEmitter.d.ts +16 -3
  95. package/types/src/writer/utils/AutoFilter.d.ts +2 -2
  96. package/types/src/writer/utils/CustGeomUtils.d.ts +5 -0
  97. package/types/src/writer/utils/DrawMLUtils.d.ts +57 -3
  98. package/types/src/writer/utils/DummyFunction.d.ts +0 -2
  99. package/types/src/writer/utils/DxfCollector.d.ts +3 -3
  100. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +28 -0
  101. package/types/src/writer/utils/PrstGeomUtils.d.ts +6 -0
  102. package/types/src/writer/utils/TextUtils.d.ts +21 -2
  103. package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +0 -1
  104. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
  105. package/browser/cjs/Bhq8KfEhCnRykWeS.cjs +0 -1
  106. package/browser/cjs/BmG0GOcbuYvt3-R2.cjs +0 -1
  107. package/browser/cjs/CIpMN7SDVREKQUQE.cjs +0 -6
  108. package/browser/cjs/D3YH3tTndeltJsh5.cjs +0 -1
  109. package/browser/cjs/D5Y4KQhKdukOkjvA.cjs +0 -2
  110. package/browser/cjs/DK9GutW2zPbyNlfU.cjs +0 -2
  111. package/browser/cjs/DWkuoJSgvcXJTdN1.cjs +0 -1
  112. package/browser/cjs/Dmi-Tsz618B6vKpZ.cjs +0 -5
  113. package/browser/cjs/index.cjs +0 -1
  114. package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
  115. package/browser/esm/BcnofzmeeuCVzr_M.mjs +0 -52
  116. package/browser/esm/C7R1lFA0iv-1bZ9i.mjs +0 -99
  117. package/browser/esm/CV_L3E5OoPstI9lx.mjs +0 -2211
  118. package/browser/esm/D8qZcXzj_fdusd0Y.mjs +0 -4748
  119. package/browser/esm/DLEtaZiz_1cZH0dA.mjs +0 -2685
  120. package/browser/esm/DlBlJGlFQJrKovwJ.mjs +0 -3651
  121. package/browser/esm/saBnxecsRUpY6fGv.mjs +0 -24
  122. package/node/esm/BSrW-J3BEH4Tza_S.mjs +0 -2486
  123. package/node/esm/BYCpXFieBgL_cwTO.mjs +0 -2255
  124. package/node/esm/Bqi4c7-14v0oNgFN.mjs +0 -108
  125. package/node/esm/D0frS50CfyeuXcuz.mjs +0 -2766
  126. package/node/esm/DsZ19z4oXoL-d0Lk.mjs +0 -3740
  127. package/types/src/reader/domVisitors/HyperlinkVisitor.d.ts +0 -6
@@ -0,0 +1,4649 @@
1
+ /**
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.10
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { CommonUtils as e } from "@sheetxl/utils";
8
+ import { AddressUtils as t, Condition as r, FormulaError as n, FormulaText as o, FunctionDeclarations as a, ICalculation as s, ICondition as i, IEffect as l, IFill as c, IFont as u, IShape as p, IText as E, ITextFrame as f, RectAlignment as A, ShapeStyleUtils as T, parseFormulaLiteral as d } from "@sheetxl/sdk";
9
+ var S = Object.defineProperty, h = (e, t) => {
10
+ let r = {};
11
+ for (var n in e) S(r, n, {
12
+ get: e[n],
13
+ enumerable: !0
14
+ });
15
+ return t || S(r, Symbol.toStringTag, { value: "Module" }), r;
16
+ }, g = "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main", m = "http://schemas.microsoft.com/office/excel/2006/main", R = "{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}", O = "{78C0D931-6437-407d-A8EE-F0AAD7539E65}", I = "{78C0D931-6839-4c89-B8D6-976A2CC4E5B4}", x = "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}", b = "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main", y = "{A8765BA9-456A-4dab-B4F3-ACF838C121DE}", C = "{3A4CF648-6AED-40f4-86FF-DC5316D8AED3}", N = "{46BE6895-7355-4a93-B00E-2C351335B9C9}", L = "{2F2917AC-EB37-4324-AD4E-5DD8C200BD13}", v = "{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}", D = {
17
+ "{05C60535-1F16-4FD2-B633-F4F36F0B64E0}": "sparklines",
18
+ "{7E03D99C-DC04-49D9-9315-930204A7B6E9}": "timelines",
19
+ "{01252117-D84E-4E92-8308-4BE1C098FCBB}": "ignoredErrors",
20
+ "{F7C9EE02-42E1-4005-9D12-6889AFFD525C}": "workbook protection extensions"
21
+ }, P = /* @__PURE__ */ new Set(["{77BFE23E-C014-4D31-8A63-9C772DBF06B6}"]);
22
+ function M(e) {
23
+ return (e ?? "").toUpperCase();
24
+ }
25
+ function F(e) {
26
+ return `{${e().toUpperCase()}}`;
27
+ }
28
+ var B = /&(amp|lt|gt|quot|apos|#x[0-9a-fA-F]+|#[0-9]+);/g;
29
+ function w(e, t) {
30
+ switch (t) {
31
+ case "amp": return "&";
32
+ case "lt": return "<";
33
+ case "gt": return ">";
34
+ case "quot": return "\"";
35
+ case "apos": return "'";
36
+ default: return t.startsWith("#x") ? String.fromCodePoint(parseInt(t.slice(2), 16)) : t.startsWith("#") ? String.fromCodePoint(parseInt(t.slice(1), 10)) : e;
37
+ }
38
+ }
39
+ function U(e) {
40
+ return e.replace(B, w);
41
+ }
42
+ function k(e) {
43
+ const t = {}, r = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*"([^"]*)"/g;
44
+ let n;
45
+ for (; n = r.exec(e);) t[n[1]] = U(n[2]);
46
+ return t;
47
+ }
48
+ function V(e, t) {
49
+ const r = [], n = new RegExp(`<${t}\\b([^>]*)/?>`, "g");
50
+ let o;
51
+ for (; o = n.exec(e);) r.push(k(o[1]));
52
+ return r;
53
+ }
54
+ function G(e) {
55
+ const t = new TextDecoder("utf-8").decode(e), r = V(t, "Default").map((e) => ({
56
+ ext: (e.Extension ?? "").toLowerCase(),
57
+ contentType: e.ContentType ?? ""
58
+ })).filter((e) => e.ext && e.contentType), n = /* @__PURE__ */ new Map();
59
+ for (const e of V(t, "Override")) e.PartName && e.ContentType && n.set(e.PartName, e.ContentType);
60
+ return {
61
+ defaults: r,
62
+ overrides: n
63
+ };
64
+ }
65
+ function W(e) {
66
+ return V(new TextDecoder("utf-8").decode(e), "Relationship").filter((e) => e.Type && e.Target).map((e) => ({
67
+ id: e.Id ?? "",
68
+ type: e.Type,
69
+ target: e.Target,
70
+ external: "External" === e.TargetMode
71
+ }));
72
+ }
73
+ var H = "191029", $ = "<ext uri=\"{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}\" xmlns:xcalcf=\"http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures\"><xcalcf:calcFeatures><xcalcf:feature name=\"microsoft.com:RD\"/><xcalcf:feature name=\"microsoft.com:Single\"/><xcalcf:feature name=\"microsoft.com:FV\"/><xcalcf:feature name=\"microsoft.com:CNMTM\"/><xcalcf:feature name=\"microsoft.com:LET_WF\"/><xcalcf:feature name=\"microsoft.com:LAMBDA_WF\"/><xcalcf:feature name=\"microsoft.com:ARRAYTEXT_WF\"/></xcalcf:calcFeatures></ext>", Y = "_xlfn.", X = "_xlfn._xlws.", _ = /* @__PURE__ */ new Map([
74
+ ["ANCHORARRAY", {
75
+ prefix: Y,
76
+ unimplemented: !0
77
+ }],
78
+ ["SINGLE", {
79
+ prefix: Y,
80
+ unimplemented: !0
81
+ }],
82
+ ["_TRO_ALL", {
83
+ prefix: Y,
84
+ unimplemented: !0
85
+ }],
86
+ ["_TRO_LEADING", {
87
+ prefix: Y,
88
+ unimplemented: !0
89
+ }],
90
+ ["_TRO_TRAILING", {
91
+ prefix: Y,
92
+ unimplemented: !0
93
+ }],
94
+ ["COPILOT", {
95
+ prefix: Y,
96
+ unimplemented: !0
97
+ }],
98
+ ["LONGTEXT", {
99
+ prefix: Y,
100
+ unimplemented: !0
101
+ }],
102
+ ["_LONGTEXT", {
103
+ prefix: Y,
104
+ unimplemented: !0
105
+ }],
106
+ ["PQSOURCE", {
107
+ prefix: Y,
108
+ unimplemented: !0
109
+ }],
110
+ ["PY", {
111
+ prefix: X,
112
+ unimplemented: !0
113
+ }],
114
+ ["PYTHON_STR", {
115
+ prefix: Y,
116
+ unimplemented: !0
117
+ }],
118
+ ["PYTHON_TYPE", {
119
+ prefix: Y,
120
+ unimplemented: !0
121
+ }],
122
+ ["PYTHON_TYPENAME", {
123
+ prefix: Y,
124
+ unimplemented: !0
125
+ }],
126
+ ["QUERYSTRING", {
127
+ prefix: Y,
128
+ unimplemented: !0
129
+ }],
130
+ ["ACCRINT", { intersect: "never" }],
131
+ ["ACCRINTM", { intersect: "never" }],
132
+ ["AMORDEGRC", { intersect: "never" }],
133
+ ["AMORLINC", { intersect: "never" }],
134
+ ["BESSELI", { intersect: "never" }],
135
+ ["BESSELJ", { intersect: "never" }],
136
+ ["BESSELK", { intersect: "never" }],
137
+ ["BESSELY", { intersect: "never" }],
138
+ ["BIN2DEC", { intersect: "never" }],
139
+ ["BIN2HEX", { intersect: "never" }],
140
+ ["BIN2OCT", { intersect: "never" }],
141
+ ["COMPLEX", { intersect: "never" }],
142
+ ["CONVERT", { intersect: "never" }],
143
+ ["COUPDAYBS", { intersect: "never" }],
144
+ ["COUPDAYS", { intersect: "never" }],
145
+ ["COUPDAYSNC", { intersect: "never" }],
146
+ ["COUPNCD", { intersect: "never" }],
147
+ ["COUPNUM", { intersect: "never" }],
148
+ ["COUPPCD", { intersect: "never" }],
149
+ ["CUMIPMT", { intersect: "never" }],
150
+ ["CUMPRINC", { intersect: "never" }],
151
+ ["DAVERAGE", { intersect: "never" }],
152
+ ["DCOUNT", { intersect: "never" }],
153
+ ["DCOUNTA", { intersect: "never" }],
154
+ ["DEC2BIN", { intersect: "never" }],
155
+ ["DEC2HEX", { intersect: "never" }],
156
+ ["DEC2OCT", { intersect: "never" }],
157
+ ["DELTA", { intersect: "never" }],
158
+ ["DGET", { intersect: "never" }],
159
+ ["DISC", { intersect: "never" }],
160
+ ["DMAX", { intersect: "never" }],
161
+ ["DMIN", { intersect: "never" }],
162
+ ["DOLLARDE", { intersect: "never" }],
163
+ ["DOLLARFR", { intersect: "never" }],
164
+ ["DPRODUCT", { intersect: "never" }],
165
+ ["DSTDEV", { intersect: "never" }],
166
+ ["DSTDEVP", { intersect: "never" }],
167
+ ["DSUM", { intersect: "never" }],
168
+ ["DURATION", { intersect: "never" }],
169
+ ["DVAR", { intersect: "never" }],
170
+ ["DVARP", { intersect: "never" }],
171
+ ["EDATE", { intersect: "never" }],
172
+ ["EFFECT", { intersect: "never" }],
173
+ ["EOMONTH", { intersect: "never" }],
174
+ ["ERF", { intersect: "never" }],
175
+ ["ERF.PRECISE", {
176
+ prefix: Y,
177
+ intersect: "never"
178
+ }],
179
+ ["ERFC", { intersect: "never" }],
180
+ ["ERFC.PRECISE", {
181
+ prefix: Y,
182
+ intersect: "never"
183
+ }],
184
+ ["FACTDOUBLE", { intersect: "never" }],
185
+ ["GCD", {
186
+ intersect: "never",
187
+ arrayScope: "consumer"
188
+ }],
189
+ ["GESTEP", { intersect: "never" }],
190
+ ["HEX2BIN", { intersect: "never" }],
191
+ ["HEX2DEC", { intersect: "never" }],
192
+ ["HEX2OCT", { intersect: "never" }],
193
+ ["IMABS", { intersect: "never" }],
194
+ ["IMAGINARY", { intersect: "never" }],
195
+ ["IMARGUMENT", { intersect: "never" }],
196
+ ["IMCONJUGATE", { intersect: "never" }],
197
+ ["IMCOS", { intersect: "never" }],
198
+ ["IMCOSH", {
199
+ prefix: Y,
200
+ intersect: "never"
201
+ }],
202
+ ["IMCOT", {
203
+ prefix: Y,
204
+ intersect: "never"
205
+ }],
206
+ ["IMCSC", {
207
+ prefix: Y,
208
+ intersect: "never"
209
+ }],
210
+ ["IMCSCH", {
211
+ prefix: Y,
212
+ intersect: "never"
213
+ }],
214
+ ["IMDIV", { intersect: "never" }],
215
+ ["IMEXP", { intersect: "never" }],
216
+ ["IMLN", { intersect: "never" }],
217
+ ["IMLOG10", { intersect: "never" }],
218
+ ["IMLOG2", { intersect: "never" }],
219
+ ["IMPOWER", { intersect: "never" }],
220
+ ["IMPRODUCT", {
221
+ intersect: "never",
222
+ arrayScope: "consumer"
223
+ }],
224
+ ["IMREAL", { intersect: "never" }],
225
+ ["IMSEC", {
226
+ prefix: Y,
227
+ intersect: "never"
228
+ }],
229
+ ["IMSECH", {
230
+ prefix: Y,
231
+ intersect: "never"
232
+ }],
233
+ ["IMSIN", { intersect: "never" }],
234
+ ["IMSINH", {
235
+ prefix: Y,
236
+ intersect: "never"
237
+ }],
238
+ ["IMSQRT", { intersect: "never" }],
239
+ ["IMSUB", { intersect: "never" }],
240
+ ["IMSUM", {
241
+ intersect: "never",
242
+ arrayScope: "consumer"
243
+ }],
244
+ ["IMTAN", {
245
+ prefix: Y,
246
+ intersect: "never"
247
+ }],
248
+ ["INTRATE", { intersect: "never" }],
249
+ ["ISOMITTED", {
250
+ prefix: Y,
251
+ intersect: "never",
252
+ arrayScope: "consumer"
253
+ }],
254
+ ["LCM", {
255
+ intersect: "never",
256
+ arrayScope: "consumer"
257
+ }],
258
+ ["MDURATION", { intersect: "never" }],
259
+ ["MROUND", { intersect: "never" }],
260
+ ["MULTINOMIAL", {
261
+ intersect: "never",
262
+ arrayScope: "consumer"
263
+ }],
264
+ ["N", { intersect: "never" }],
265
+ ["NETWORKDAYS", {
266
+ intersect: "never",
267
+ arrayScope: "consumer"
268
+ }],
269
+ ["NOMINAL", { intersect: "never" }],
270
+ ["OCT2BIN", { intersect: "never" }],
271
+ ["OCT2DEC", { intersect: "never" }],
272
+ ["OCT2HEX", { intersect: "never" }],
273
+ ["ODDFPRICE", { intersect: "never" }],
274
+ ["ODDFYIELD", { intersect: "never" }],
275
+ ["ODDLPRICE", { intersect: "never" }],
276
+ ["ODDLYIELD", { intersect: "never" }],
277
+ ["PRICE", { intersect: "never" }],
278
+ ["PRICEDISC", { intersect: "never" }],
279
+ ["PRICEMAT", { intersect: "never" }],
280
+ ["QUOTIENT", { intersect: "never" }],
281
+ ["RANDBETWEEN", {
282
+ intersect: "never",
283
+ volatile: !0
284
+ }],
285
+ ["RECEIVED", { intersect: "never" }],
286
+ ["SERIESSUM", {
287
+ intersect: "never",
288
+ arrayScope: "consumer"
289
+ }],
290
+ ["SQRTPI", { intersect: "never" }],
291
+ ["T", { intersect: "never" }],
292
+ ["TBILLEQ", { intersect: "never" }],
293
+ ["TBILLPRICE", { intersect: "never" }],
294
+ ["TBILLYIELD", { intersect: "never" }],
295
+ ["WEEKNUM", { intersect: "never" }],
296
+ ["WORKDAY", {
297
+ intersect: "never",
298
+ arrayScope: "consumer"
299
+ }],
300
+ ["XIRR", {
301
+ intersect: "never",
302
+ arrayScope: "consumer"
303
+ }],
304
+ ["XNPV", {
305
+ intersect: "never",
306
+ arrayScope: "consumer"
307
+ }],
308
+ ["YEARFRAC", { intersect: "never" }],
309
+ ["YIELD", { intersect: "never" }],
310
+ ["YIELDDISC", { intersect: "never" }],
311
+ ["YIELDMAT", { intersect: "never" }],
312
+ ["CONCATENATE", { slotAlways: [0] }],
313
+ ["GETPIVOTDATA", {
314
+ slotNever: [0, 1],
315
+ slotAlways: [3]
316
+ }],
317
+ ["MAKEARRAY", {
318
+ prefix: Y,
319
+ slotNever: [2],
320
+ arrayScope: "consumer"
321
+ }],
322
+ ["MATCH", {
323
+ slotNever: [2],
324
+ scopeClears: [1]
325
+ }],
326
+ ["NETWORKDAYS.INTL", {
327
+ slotNever: [0, 1],
328
+ arrayScope: "consumer"
329
+ }],
330
+ ["NPV", { slotNever: [1] }],
331
+ ["SCAN", {
332
+ prefix: Y,
333
+ slotNever: [0],
334
+ arrayScope: "opens"
335
+ }],
336
+ ["TEXTJOIN", {
337
+ prefix: Y,
338
+ slotNever: [0],
339
+ arrayScope: "consumer"
340
+ }],
341
+ ["TEXTSPLIT", {
342
+ prefix: Y,
343
+ slotAlways: [1, 2],
344
+ arrayScope: "consumer"
345
+ }],
346
+ ["TRANSPOSE", {
347
+ slotAlways: [0],
348
+ arrayScope: "consumer"
349
+ }],
350
+ ["TYPE", {
351
+ slotAlways: [0],
352
+ arrayScope: "consumer"
353
+ }],
354
+ ["WORKDAY.INTL", {
355
+ slotNever: [0, 1],
356
+ arrayScope: "consumer"
357
+ }],
358
+ ["XMATCH", { prefix: Y }],
359
+ ["CELL", {
360
+ arrayReturn: !0,
361
+ arrayScope: "consumer",
362
+ volatile: !0
363
+ }],
364
+ ["COLUMN", { readsPerCell: 0 }],
365
+ ["FORMULATEXT", {
366
+ prefix: Y,
367
+ readsPerCell: 0
368
+ }],
369
+ ["ISFORMULA", {
370
+ prefix: Y,
371
+ readsPerCell: 0
372
+ }],
373
+ ["REDUCE", {
374
+ prefix: Y,
375
+ arrayReturn: !0,
376
+ arrayScope: "opens",
377
+ scopeClears: [0]
378
+ }],
379
+ ["ROW", { readsPerCell: 0 }],
380
+ ["AGGREGATE", {
381
+ prefix: Y,
382
+ arrayScope: "opens"
383
+ }],
384
+ ["FILTER", {
385
+ prefix: X,
386
+ slotAlways: [2],
387
+ arrayScope: "opens"
388
+ }],
389
+ ["INDEX", { arrayScope: "opens" }],
390
+ ["LOOKUP", { arrayScope: "opens" }],
391
+ ["MMULT", { arrayScope: "opens" }],
392
+ ["SORT", {
393
+ prefix: X,
394
+ arrayScope: "opens"
395
+ }],
396
+ ["SUMPRODUCT", { arrayScope: "opens" }],
397
+ ["XLOOKUP", {
398
+ prefix: Y,
399
+ slotNever: [3],
400
+ arrayScope: "opens",
401
+ scopeClears: [0]
402
+ }],
403
+ ["ARRAYTOTEXT", {
404
+ prefix: Y,
405
+ arrayScope: "opens"
406
+ }],
407
+ ["BYCOL", {
408
+ prefix: Y,
409
+ arrayScope: "opens"
410
+ }],
411
+ ["BYROW", {
412
+ prefix: Y,
413
+ arrayScope: "opens"
414
+ }],
415
+ ["CHOOSECOLS", {
416
+ prefix: Y,
417
+ arrayScope: "opens"
418
+ }],
419
+ ["CHOOSEROWS", {
420
+ prefix: Y,
421
+ arrayScope: "opens"
422
+ }],
423
+ ["COLUMNS", { arrayScope: "opens" }],
424
+ ["EXPAND", {
425
+ prefix: Y,
426
+ arrayScope: "opens"
427
+ }],
428
+ ["GROUPBY", {
429
+ prefix: Y,
430
+ arrayScope: "opens"
431
+ }],
432
+ ["HSTACK", {
433
+ prefix: Y,
434
+ arrayScope: "opens"
435
+ }],
436
+ ["IRR", { arrayScope: "opens" }],
437
+ ["MAP", {
438
+ prefix: Y,
439
+ arrayScope: "opens"
440
+ }],
441
+ ["MDETERM", { arrayScope: "opens" }],
442
+ ["MINVERSE", { arrayScope: "opens" }],
443
+ ["MIRR", { arrayScope: "opens" }],
444
+ ["PIVOTBY", {
445
+ prefix: Y,
446
+ arrayScope: "opens"
447
+ }],
448
+ ["ROWS", { arrayScope: "opens" }],
449
+ ["SHEETS", {
450
+ prefix: Y,
451
+ arrayScope: "opens"
452
+ }],
453
+ ["SORTBY", {
454
+ prefix: Y,
455
+ arrayScope: "opens"
456
+ }],
457
+ ["TAKE", {
458
+ prefix: Y,
459
+ arrayScope: "opens"
460
+ }],
461
+ ["TOCOL", {
462
+ prefix: Y,
463
+ arrayScope: "opens"
464
+ }],
465
+ ["TOROW", {
466
+ prefix: Y,
467
+ arrayScope: "opens"
468
+ }],
469
+ ["UNIQUE", {
470
+ prefix: Y,
471
+ arrayScope: "opens"
472
+ }],
473
+ ["VSTACK", {
474
+ prefix: Y,
475
+ arrayScope: "opens"
476
+ }],
477
+ ["WRAPCOLS", {
478
+ prefix: Y,
479
+ arrayScope: "opens"
480
+ }],
481
+ ["WRAPROWS", {
482
+ prefix: Y,
483
+ arrayScope: "opens"
484
+ }],
485
+ ["CHISQ.TEST", {
486
+ prefix: Y,
487
+ arrayScope: "opens"
488
+ }],
489
+ ["CORREL", { arrayScope: "opens" }],
490
+ ["COVAR", { arrayScope: "opens" }],
491
+ ["COVARIANCE.P", {
492
+ prefix: Y,
493
+ arrayScope: "opens"
494
+ }],
495
+ ["COVARIANCE.S", {
496
+ prefix: Y,
497
+ arrayScope: "opens"
498
+ }],
499
+ ["F.TEST", {
500
+ prefix: Y,
501
+ arrayScope: "opens"
502
+ }],
503
+ ["FORECAST", { arrayScope: "opens" }],
504
+ ["FORECAST.LINEAR", {
505
+ prefix: Y,
506
+ arrayScope: "opens"
507
+ }],
508
+ ["GROWTH", {
509
+ intersect: "never",
510
+ arrayScope: "opens"
511
+ }],
512
+ ["INTERCEPT", { arrayScope: "opens" }],
513
+ ["LINEST", {
514
+ intersect: "never",
515
+ arrayScope: "opens"
516
+ }],
517
+ ["LOGEST", {
518
+ intersect: "never",
519
+ arrayScope: "opens"
520
+ }],
521
+ ["PEARSON", { arrayScope: "opens" }],
522
+ ["PROB", { arrayScope: "opens" }],
523
+ ["RSQ", { arrayScope: "opens" }],
524
+ ["SLOPE", { arrayScope: "opens" }],
525
+ ["STEYX", { arrayScope: "opens" }],
526
+ ["SUMX2MY2", { arrayScope: "opens" }],
527
+ ["SUMX2PY2", { arrayScope: "opens" }],
528
+ ["SUMXMY2", { arrayScope: "opens" }],
529
+ ["T.TEST", {
530
+ prefix: Y,
531
+ arrayScope: "opens"
532
+ }],
533
+ ["TREND", {
534
+ intersect: "never",
535
+ arrayScope: "opens"
536
+ }],
537
+ ["CHITEST", { arrayScope: "opens" }],
538
+ ["FORECAST.ETS", {
539
+ prefix: Y,
540
+ arrayScope: "opens"
541
+ }],
542
+ ["FORECAST.ETS.CONFINT", {
543
+ prefix: Y,
544
+ arrayScope: "opens"
545
+ }],
546
+ ["FORECAST.ETS.SEASONALITY", {
547
+ prefix: Y,
548
+ arrayScope: "opens"
549
+ }],
550
+ ["FORECAST.ETS.STAT", {
551
+ prefix: Y,
552
+ arrayScope: "opens"
553
+ }],
554
+ ["FTEST", { arrayScope: "opens" }],
555
+ ["TTEST", { arrayScope: "opens" }],
556
+ ["FREQUENCY", { arrayScope: "opens" }],
557
+ ["MODE", { arrayScope: "opens" }],
558
+ ["MODE.MULT", {
559
+ prefix: Y,
560
+ arrayScope: "opens"
561
+ }],
562
+ ["MODE.SNGL", {
563
+ prefix: Y,
564
+ arrayScope: "opens"
565
+ }],
566
+ ["AVEDEV", { arrayScope: "consumer" }],
567
+ ["AVERAGE", { arrayScope: "consumer" }],
568
+ ["AVERAGEA", { arrayScope: "consumer" }],
569
+ ["CONCAT", {
570
+ prefix: Y,
571
+ arrayScope: "consumer"
572
+ }],
573
+ ["COUNT", { arrayScope: "consumer" }],
574
+ ["COUNTA", { arrayScope: "consumer" }],
575
+ ["DEVSQ", { arrayScope: "consumer" }],
576
+ ["GEOMEAN", { arrayScope: "consumer" }],
577
+ ["HARMEAN", { arrayScope: "consumer" }],
578
+ ["HLOOKUP", { arrayScope: "consumer" }],
579
+ ["KURT", { arrayScope: "consumer" }],
580
+ ["LARGE", { arrayScope: "consumer" }],
581
+ ["LET", {
582
+ prefix: Y,
583
+ arrayScope: "consumer"
584
+ }],
585
+ ["MAX", { arrayScope: "consumer" }],
586
+ ["MAXA", { arrayScope: "consumer" }],
587
+ ["MEDIAN", { arrayScope: "consumer" }],
588
+ ["MIN", { arrayScope: "consumer" }],
589
+ ["MINA", { arrayScope: "consumer" }],
590
+ ["PERCENTILE", { arrayScope: "consumer" }],
591
+ ["PERCENTILE.EXC", {
592
+ prefix: Y,
593
+ arrayScope: "consumer"
594
+ }],
595
+ ["PERCENTILE.INC", {
596
+ prefix: Y,
597
+ arrayScope: "consumer"
598
+ }],
599
+ ["PRODUCT", { arrayScope: "consumer" }],
600
+ ["QUARTILE", { arrayScope: "consumer" }],
601
+ ["QUARTILE.EXC", {
602
+ prefix: Y,
603
+ arrayScope: "consumer"
604
+ }],
605
+ ["QUARTILE.INC", {
606
+ prefix: Y,
607
+ arrayScope: "consumer"
608
+ }],
609
+ ["SKEW", { arrayScope: "consumer" }],
610
+ ["SKEW.P", {
611
+ prefix: Y,
612
+ arrayScope: "consumer"
613
+ }],
614
+ ["SMALL", { arrayScope: "consumer" }],
615
+ ["STDEV", { arrayScope: "consumer" }],
616
+ ["STDEV.P", {
617
+ prefix: Y,
618
+ arrayScope: "consumer"
619
+ }],
620
+ ["STDEV.S", {
621
+ prefix: Y,
622
+ arrayScope: "consumer"
623
+ }],
624
+ ["STDEVA", { arrayScope: "consumer" }],
625
+ ["STDEVP", { arrayScope: "consumer" }],
626
+ ["SUM", { arrayScope: "consumer" }],
627
+ ["SUMSQ", { arrayScope: "consumer" }],
628
+ ["TRIMMEAN", { arrayScope: "consumer" }],
629
+ ["VAR", { arrayScope: "consumer" }],
630
+ ["VAR.P", {
631
+ prefix: Y,
632
+ arrayScope: "consumer"
633
+ }],
634
+ ["VAR.S", {
635
+ prefix: Y,
636
+ arrayScope: "consumer"
637
+ }],
638
+ ["VARA", { arrayScope: "consumer" }],
639
+ ["VARP", { arrayScope: "consumer" }],
640
+ ["VARPA", { arrayScope: "consumer" }],
641
+ ["VLOOKUP", { arrayScope: "consumer" }],
642
+ ["AND", { arrayScope: "consumer" }],
643
+ ["CUBEVALUE", { arrayScope: "consumer" }],
644
+ ["FIELDVALUE", {
645
+ prefix: Y,
646
+ arrayScope: "consumer"
647
+ }],
648
+ ["FILTERXML", {
649
+ prefix: Y,
650
+ arrayScope: "consumer"
651
+ }],
652
+ ["FVSCHEDULE", {
653
+ intersect: "never",
654
+ arrayScope: "consumer"
655
+ }],
656
+ ["HYPERLINK", { arrayScope: "consumer" }],
657
+ ["ISREF", { arrayScope: "consumer" }],
658
+ ["MUNIT", {
659
+ prefix: Y,
660
+ arrayScope: "consumer"
661
+ }],
662
+ ["OR", { arrayScope: "consumer" }],
663
+ ["PERCENTOF", {
664
+ prefix: Y,
665
+ arrayScope: "consumer"
666
+ }],
667
+ ["PERCENTRANK", { arrayScope: "consumer" }],
668
+ ["PERCENTRANK.EXC", {
669
+ prefix: Y,
670
+ arrayScope: "consumer"
671
+ }],
672
+ ["PERCENTRANK.INC", {
673
+ prefix: Y,
674
+ arrayScope: "consumer"
675
+ }],
676
+ ["REGEXEXTRACT", {
677
+ prefix: Y,
678
+ arrayScope: "consumer"
679
+ }],
680
+ ["SEQUENCE", {
681
+ prefix: Y,
682
+ arrayScope: "consumer"
683
+ }],
684
+ ["SHEET", {
685
+ prefix: Y,
686
+ arrayScope: "consumer"
687
+ }],
688
+ ["STDEVPA", { arrayScope: "consumer" }],
689
+ ["STOCKHISTORY", {
690
+ prefix: Y,
691
+ arrayScope: "consumer"
692
+ }],
693
+ ["XOR", {
694
+ prefix: Y,
695
+ arrayScope: "consumer"
696
+ }],
697
+ ["Z.TEST", {
698
+ prefix: Y,
699
+ arrayScope: "consumer"
700
+ }],
701
+ ["ZTEST", { arrayScope: "consumer" }],
702
+ ["IF", { arrayScope: "lazy" }],
703
+ ["IFERROR", {
704
+ valueReturn: !0,
705
+ arrayScope: "lazy"
706
+ }],
707
+ ["IFNA", {
708
+ prefix: Y,
709
+ valueReturn: !0,
710
+ arrayScope: "lazy"
711
+ }],
712
+ ["IFS", {
713
+ prefix: Y,
714
+ arrayReturn: !0,
715
+ arrayScope: "lazy"
716
+ }],
717
+ ["SWITCH", {
718
+ prefix: Y,
719
+ arrayReturn: !0,
720
+ arrayScope: "lazy"
721
+ }],
722
+ ["CHOOSE", { scopeClears: [0, 1] }],
723
+ ["DROP", {
724
+ prefix: Y,
725
+ scopeClears: [1, 2]
726
+ }],
727
+ ["INDIRECT", { volatile: !0 }],
728
+ ["INFO", { volatile: !0 }],
729
+ ["NOW", { volatile: !0 }],
730
+ ["OFFSET", { volatile: !0 }],
731
+ ["RAND", { volatile: !0 }],
732
+ ["RANDARRAY", {
733
+ prefix: Y,
734
+ arrayScope: "consumer",
735
+ volatile: !0
736
+ }],
737
+ ["TODAY", { volatile: !0 }],
738
+ ["TRIMRANGE", {
739
+ prefix: Y,
740
+ arrayScope: "opens",
741
+ volatile: !0
742
+ }],
743
+ ["ABS", {}],
744
+ ["ACOS", {}],
745
+ ["ACOSH", {}],
746
+ ["ACOT", { prefix: Y }],
747
+ ["ACOTH", { prefix: Y }],
748
+ ["ADDRESS", {}],
749
+ ["ARABIC", { prefix: Y }],
750
+ ["AREAS", {}],
751
+ ["ASC", {}],
752
+ ["ASIN", {}],
753
+ ["ASINH", {}],
754
+ ["ATAN", {}],
755
+ ["ATAN2", {}],
756
+ ["ATANH", {}],
757
+ ["AVERAGEIF", {}],
758
+ ["AVERAGEIFS", {}],
759
+ ["BAHTTEXT", {}],
760
+ ["BASE", { prefix: Y }],
761
+ ["BETA.DIST", { prefix: Y }],
762
+ ["BETA.INV", { prefix: Y }],
763
+ ["BETADIST", {}],
764
+ ["BETAINV", {}],
765
+ ["BINOM.DIST", { prefix: Y }],
766
+ ["BINOM.DIST.RANGE", { prefix: Y }],
767
+ ["BINOM.INV", { prefix: Y }],
768
+ ["BINOMDIST", {}],
769
+ ["BITAND", { prefix: Y }],
770
+ ["BITLSHIFT", { prefix: Y }],
771
+ ["BITOR", { prefix: Y }],
772
+ ["BITRSHIFT", { prefix: Y }],
773
+ ["BITXOR", { prefix: Y }],
774
+ ["CEILING", {}],
775
+ ["CEILING.MATH", { prefix: Y }],
776
+ ["CEILING.PRECISE", { prefix: Y }],
777
+ ["CHAR", {}],
778
+ ["CHIDIST", {}],
779
+ ["CHIINV", {}],
780
+ ["CHISQ.DIST", { prefix: Y }],
781
+ ["CHISQ.DIST.RT", { prefix: Y }],
782
+ ["CHISQ.INV", { prefix: Y }],
783
+ ["CHISQ.INV.RT", { prefix: Y }],
784
+ ["CLEAN", {}],
785
+ ["CODE", {}],
786
+ ["COMBIN", {}],
787
+ ["COMBINA", { prefix: Y }],
788
+ ["CONFIDENCE", {}],
789
+ ["CONFIDENCE.NORM", { prefix: Y }],
790
+ ["CONFIDENCE.T", { prefix: Y }],
791
+ ["COS", {}],
792
+ ["COSH", {}],
793
+ ["COT", { prefix: Y }],
794
+ ["COTH", { prefix: Y }],
795
+ ["COUNTBLANK", {}],
796
+ ["COUNTIF", {}],
797
+ ["COUNTIFS", {}],
798
+ ["CRITBINOM", {}],
799
+ ["CSC", { prefix: Y }],
800
+ ["CSCH", { prefix: Y }],
801
+ ["CUBEKPIMEMBER", {}],
802
+ ["CUBEMEMBER", {}],
803
+ ["CUBEMEMBERPROPERTY", {}],
804
+ ["CUBERANKEDMEMBER", {}],
805
+ ["CUBESET", {}],
806
+ ["CUBESETCOUNT", {}],
807
+ ["DATE", {}],
808
+ ["DATEDIF", {}],
809
+ ["DATESTRING", {}],
810
+ ["DATEVALUE", {}],
811
+ ["DAY", {}],
812
+ ["DAYS", { prefix: Y }],
813
+ ["DAYS360", {}],
814
+ ["DB", {}],
815
+ ["DBCS", {}],
816
+ ["DDB", {}],
817
+ ["DECIMAL", { prefix: Y }],
818
+ ["DEGREES", {}],
819
+ ["DETECTLANGUAGE", { prefix: Y }],
820
+ ["DOLLAR", {}],
821
+ ["ECMA.CEILING", {}],
822
+ ["ENCODEURL", { prefix: Y }],
823
+ ["ERROR.TYPE", {}],
824
+ ["EVEN", {}],
825
+ ["EXACT", {}],
826
+ ["EXP", {}],
827
+ ["EXPON.DIST", { prefix: Y }],
828
+ ["EXPONDIST", {}],
829
+ ["F.DIST", { prefix: Y }],
830
+ ["F.DIST.RT", { prefix: Y }],
831
+ ["F.INV", { prefix: Y }],
832
+ ["F.INV.RT", { prefix: Y }],
833
+ ["FACT", {}],
834
+ ["FALSE", {}],
835
+ ["FDIST", {}],
836
+ ["FIND", {}],
837
+ ["FINDB", {}],
838
+ ["FINV", {}],
839
+ ["FISHER", {}],
840
+ ["FISHERINV", {}],
841
+ ["FIXED", {}],
842
+ ["FLOOR", {}],
843
+ ["FLOOR.MATH", { prefix: Y }],
844
+ ["FLOOR.PRECISE", { prefix: Y }],
845
+ ["FV", {}],
846
+ ["GAMMA", { prefix: Y }],
847
+ ["GAMMA.DIST", { prefix: Y }],
848
+ ["GAMMA.INV", { prefix: Y }],
849
+ ["GAMMADIST", {}],
850
+ ["GAMMAINV", {}],
851
+ ["GAMMALN", {}],
852
+ ["GAMMALN.PRECISE", { prefix: Y }],
853
+ ["GAUSS", { prefix: Y }],
854
+ ["HOUR", {}],
855
+ ["HYPGEOM.DIST", { prefix: Y }],
856
+ ["HYPGEOMDIST", {}],
857
+ ["IMAGE", { prefix: Y }],
858
+ ["INT", {}],
859
+ ["IPMT", {}],
860
+ ["ISBLANK", {}],
861
+ ["ISERR", {}],
862
+ ["ISERROR", {}],
863
+ ["ISEVEN", {}],
864
+ ["ISLOGICAL", {}],
865
+ ["ISNA", {}],
866
+ ["ISNONTEXT", {}],
867
+ ["ISNUMBER", {}],
868
+ ["ISO.CEILING", {}],
869
+ ["ISODD", {}],
870
+ ["ISOWEEKNUM", { prefix: Y }],
871
+ ["ISPMT", {}],
872
+ ["ISTEXT", {}],
873
+ ["LAMBDA", { prefix: Y }],
874
+ ["LEFT", {}],
875
+ ["LEFTB", {}],
876
+ ["LEN", {}],
877
+ ["LENB", {}],
878
+ ["LN", {}],
879
+ ["LOG", {}],
880
+ ["LOG10", {}],
881
+ ["LOGINV", {}],
882
+ ["LOGNORM.DIST", { prefix: Y }],
883
+ ["LOGNORM.INV", { prefix: Y }],
884
+ ["LOGNORMDIST", {}],
885
+ ["LOWER", {}],
886
+ ["MAXIFS", { prefix: Y }],
887
+ ["MID", {}],
888
+ ["MIDB", {}],
889
+ ["MINIFS", { prefix: Y }],
890
+ ["MINUTE", {}],
891
+ ["MOD", {}],
892
+ ["MONTH", {}],
893
+ ["NA", {}],
894
+ ["NEGBINOM.DIST", { prefix: Y }],
895
+ ["NEGBINOMDIST", {}],
896
+ ["NORM.DIST", { prefix: Y }],
897
+ ["NORM.INV", { prefix: Y }],
898
+ ["NORM.S.DIST", { prefix: Y }],
899
+ ["NORM.S.INV", { prefix: Y }],
900
+ ["NORMDIST", {}],
901
+ ["NORMINV", {}],
902
+ ["NORMSDIST", {}],
903
+ ["NORMSINV", {}],
904
+ ["NOT", {}],
905
+ ["NPER", {}],
906
+ ["NUMBERSTRING", {}],
907
+ ["NUMBERVALUE", { prefix: Y }],
908
+ ["ODD", {}],
909
+ ["PDURATION", { prefix: Y }],
910
+ ["PERMUT", {}],
911
+ ["PERMUTATIONA", { prefix: Y }],
912
+ ["PHI", { prefix: Y }],
913
+ ["PHONETIC", {}],
914
+ ["PI", {}],
915
+ ["PMT", {}],
916
+ ["POISSON", {}],
917
+ ["POISSON.DIST", { prefix: Y }],
918
+ ["POWER", {}],
919
+ ["PPMT", {}],
920
+ ["PROPER", {}],
921
+ ["PV", {}],
922
+ ["RADIANS", {}],
923
+ ["RANK", {}],
924
+ ["RANK.AVG", { prefix: Y }],
925
+ ["RANK.EQ", { prefix: Y }],
926
+ ["RATE", {}],
927
+ ["REGEXREPLACE", { prefix: Y }],
928
+ ["REGEXTEST", { prefix: Y }],
929
+ ["REPLACE", {}],
930
+ ["REPLACEB", {}],
931
+ ["REPT", {}],
932
+ ["RIGHT", {}],
933
+ ["RIGHTB", {}],
934
+ ["ROMAN", {}],
935
+ ["ROUND", {}],
936
+ ["ROUNDDOWN", {}],
937
+ ["ROUNDUP", {}],
938
+ ["RRI", { prefix: Y }],
939
+ ["RTD", {}],
940
+ ["SEARCH", {}],
941
+ ["SEARCHB", {}],
942
+ ["SEC", { prefix: Y }],
943
+ ["SECH", { prefix: Y }],
944
+ ["SECOND", {}],
945
+ ["SIGN", {}],
946
+ ["SIN", {}],
947
+ ["SINH", {}],
948
+ ["SLN", {}],
949
+ ["SPLIT", {}],
950
+ ["SQRT", {}],
951
+ ["STANDARDIZE", {}],
952
+ ["SUBSTITUTE", {}],
953
+ ["SUBTOTAL", {}],
954
+ ["SUMIF", {}],
955
+ ["SUMIFS", {}],
956
+ ["SYD", {}],
957
+ ["T.DIST", { prefix: Y }],
958
+ ["T.DIST.2T", { prefix: Y }],
959
+ ["T.DIST.RT", { prefix: Y }],
960
+ ["T.INV", { prefix: Y }],
961
+ ["T.INV.2T", { prefix: Y }],
962
+ ["TAN", {}],
963
+ ["TANH", {}],
964
+ ["TDIST", {}],
965
+ ["TEXT", {}],
966
+ ["TEXTAFTER", { prefix: Y }],
967
+ ["TEXTBEFORE", { prefix: Y }],
968
+ ["TIME", {}],
969
+ ["TIMEVALUE", {}],
970
+ ["TINV", {}],
971
+ ["TRANSLATE", { prefix: Y }],
972
+ ["TRIM", {}],
973
+ ["TRUE", {}],
974
+ ["TRUNC", {}],
975
+ ["UNICHAR", { prefix: Y }],
976
+ ["UNICODE", { prefix: Y }],
977
+ ["UPPER", {}],
978
+ ["VALUE", {}],
979
+ ["VALUETOTEXT", { prefix: Y }],
980
+ ["VDB", {}],
981
+ ["WAIT", {}],
982
+ ["WEBSERVICE", { prefix: Y }],
983
+ ["WEEKDAY", {}],
984
+ ["WEIBULL", {}],
985
+ ["WEIBULL.DIST", { prefix: Y }],
986
+ ["YEAR", {}]
987
+ ]), K = (e) => "never" === _.get(e)?.intersect, j = (e, t) => !0 === _.get(e)?.slotNever?.includes(t), z = (e, t) => !0 === _.get(e)?.slotAlways?.includes(t), q = (e) => !0 === _.get(e)?.valueReturn, Q = (e) => _.get(e)?.readsPerCell, Z = (e) => "opens" === _.get(e)?.arrayScope, J = (e, t) => ({
988
+ type: "function",
989
+ value: e,
990
+ inputs: t ?? null
991
+ });
992
+ function ee(e) {
993
+ return (t, r) => {
994
+ const n = t.type, o = t.value;
995
+ if ("function" === n) {
996
+ const e = String(o).toUpperCase(), r = (a = e, _.get(a)?.prefix), n = "LET" === e || "LAMBDA" === e ? ae(t, e) : void 0;
997
+ if (r || n) return {
998
+ ...t,
999
+ value: r ? r + o : o,
1000
+ inputs: n ?? t.inputs
1001
+ };
1002
+ } else if ("infix" === n) {
1003
+ let e;
1004
+ if (".:." === o ? e = "_TRO_ALL" : ".:" === o ? e = "_TRO_LEADING" : ":." === o && (e = "_TRO_TRAILING"), e) {
1005
+ const r = {
1006
+ type: "infix",
1007
+ value: ":",
1008
+ inputs: t.inputs,
1009
+ isReference: !0
1010
+ };
1011
+ return J(Y + e, [r]);
1012
+ }
1013
+ } else if ("postfix" === n) {
1014
+ if ("#" === o) return J(Y + "ANCHORARRAY", [t.inputs[0]]);
1015
+ } else if ("string" === n) {
1016
+ const e = String(o ?? "");
1017
+ if (e.length > 255) {
1018
+ const t = [];
1019
+ for (let r = 0; r < e.length; r += 255) t.push({
1020
+ type: "string",
1021
+ value: e.substring(r, r + 255),
1022
+ inputs: null
1023
+ });
1024
+ return J(Y + "_LONGTEXT", t);
1025
+ }
1026
+ } else if ("prefix" === n) {
1027
+ if ("@" === o && "tableReference" !== r?.type) return J(Y + "SINGLE", [t.inputs[0]]);
1028
+ } else if ("named" === n) {
1029
+ const r = o, n = r?.name;
1030
+ if (n && !r.scope) {
1031
+ const r = n.toUpperCase();
1032
+ if (((e) => {
1033
+ const t = _.get(e);
1034
+ return void 0 !== t && !0 !== t.unimplemented;
1035
+ })(r) && !e?.has(r)) return {
1036
+ ...t,
1037
+ value: {
1038
+ name: "_xleta." + n,
1039
+ scope: null
1040
+ }
1041
+ };
1042
+ }
1043
+ } else if ("tableReference" === n) return !t.inputs && t.value ? {
1044
+ ...t,
1045
+ inputs: []
1046
+ } : ue(t);
1047
+ var a;
1048
+ };
1049
+ }
1050
+ var te = (e, t) => e.length > t.length && e.substring(0, t.length).toLowerCase() === t, re = (e) => {
1051
+ if ("named" !== e?.type) return;
1052
+ const t = e.value, r = t?.name;
1053
+ return !r || t.scope || te(r, "_xlpm.") ? void 0 : te(r, "_xleta.") ? r.substring(7) : r;
1054
+ }, ne = (e, t) => ({
1055
+ ...e,
1056
+ value: {
1057
+ name: "_xlpm." + t,
1058
+ scope: null
1059
+ }
1060
+ }), oe = (e, t) => {
1061
+ const r = re(e);
1062
+ if (void 0 !== r) return r.toUpperCase() === t ? ne(e, r) : e;
1063
+ const n = e.inputs;
1064
+ if (!n) return e;
1065
+ let o;
1066
+ for (let e = 0; e < n.length; e++) {
1067
+ const r = n[e];
1068
+ if (!r) continue;
1069
+ const a = oe(r, t);
1070
+ a !== r && (o || (o = [...n]), o[e] = a);
1071
+ }
1072
+ return o ? {
1073
+ ...e,
1074
+ inputs: o
1075
+ } : e;
1076
+ }, ae = (e, t) => {
1077
+ const r = e.inputs, n = r?.length ?? 0;
1078
+ if (!r || n < 2) return;
1079
+ let o;
1080
+ const a = (e) => (o ?? r)[e], s = (e, t) => {
1081
+ t !== a(e) && (o || (o = [...r]), o[e] = t);
1082
+ }, i = [];
1083
+ if ("LAMBDA" === t) for (let e = 0; e < n - 1; e++) i.push([e, n - 1]);
1084
+ else for (let e = 0; e + 1 < n; e += 2) i.push([e, e + 2]);
1085
+ for (const [e, t] of i) {
1086
+ const r = a(e), o = re(r);
1087
+ if (void 0 === o) continue;
1088
+ s(e, !0 === r.value?.optional ? {
1089
+ ...r,
1090
+ value: {
1091
+ name: "_xlop." + o,
1092
+ scope: null
1093
+ }
1094
+ } : ne(r, o));
1095
+ const i = o.toUpperCase();
1096
+ for (let e = t; e < n; e++) {
1097
+ const t = a(e);
1098
+ t && s(e, oe(t, i));
1099
+ }
1100
+ }
1101
+ return o;
1102
+ }, se = [
1103
+ "_XLFN._XLWS.",
1104
+ "_XLFN.",
1105
+ "_XLWS.",
1106
+ "_XLETA.",
1107
+ "_XLPM."
1108
+ ], ie = (e) => {
1109
+ const t = e.toUpperCase();
1110
+ let r = 0, n = !0;
1111
+ for (; n;) {
1112
+ n = !1;
1113
+ for (const e of se) if (t.startsWith(e, r)) {
1114
+ r += e.length, n = !0;
1115
+ break;
1116
+ }
1117
+ }
1118
+ return 0 === r ? e : e.substring(r);
1119
+ }, le = /* @__PURE__ */ new Map([
1120
+ ["_TRO_ALL", ".:."],
1121
+ ["_TRO_LEADING", ".:"],
1122
+ ["_TRO_TRAILING", ":."]
1123
+ ]);
1124
+ function ce() {
1125
+ return (e) => {
1126
+ const t = e.type;
1127
+ if ("function" === t) {
1128
+ const t = String(e.value ?? ""), r = ie(t), n = r.toUpperCase(), o = e.inputs;
1129
+ if ("SINGLE" === n && 1 === o?.length) return {
1130
+ type: "prefix",
1131
+ value: "@",
1132
+ inputs: [o[0]],
1133
+ isReference: !0
1134
+ };
1135
+ if ("ANCHORARRAY" === n && 1 === o?.length) return {
1136
+ type: "postfix",
1137
+ value: "#",
1138
+ inputs: [o[0]],
1139
+ isReference: !0
1140
+ };
1141
+ const a = le.get(n);
1142
+ if (a && 1 === o?.length && 2 === o[0]?.inputs?.length) {
1143
+ const e = o[0];
1144
+ return {
1145
+ type: "infix",
1146
+ value: a,
1147
+ inputs: [e.inputs[0], e.inputs[1]],
1148
+ isReference: e.isReference ?? !0
1149
+ };
1150
+ }
1151
+ if ("_LONGTEXT" === n && o && o.length > 0 && o.every((e) => "string" === e?.type)) {
1152
+ let e = "";
1153
+ for (let t = 0; t < o.length; t++) e += String(o[t].value ?? "");
1154
+ return {
1155
+ type: "string",
1156
+ value: e,
1157
+ inputs: null
1158
+ };
1159
+ }
1160
+ if (r !== t) return {
1161
+ ...e,
1162
+ value: n
1163
+ };
1164
+ } else if ("named" === t) {
1165
+ const t = e.value, r = t?.name ?? "";
1166
+ if (te(r, "_xlop.")) {
1167
+ const n = ie(r.substring(6));
1168
+ return {
1169
+ ...e,
1170
+ value: {
1171
+ name: n,
1172
+ scope: t?.scope ?? null,
1173
+ optional: !0
1174
+ }
1175
+ };
1176
+ }
1177
+ const n = ie(r);
1178
+ if (n !== r) return {
1179
+ ...e,
1180
+ value: {
1181
+ name: n,
1182
+ scope: t?.scope ?? null
1183
+ }
1184
+ };
1185
+ }
1186
+ };
1187
+ }
1188
+ var ue = (e) => {
1189
+ const t = e.inputs;
1190
+ if (!t) return;
1191
+ let r = !1;
1192
+ const n = [];
1193
+ for (const e of t) if ("prefix" === e?.type && "@" === e.value) {
1194
+ n.push({
1195
+ type: "tableSpecifier",
1196
+ value: "#This Row",
1197
+ inputs: null,
1198
+ isReference: !0
1199
+ });
1200
+ const t = e.inputs?.[0];
1201
+ t && n.push("tableColumn" === t.type ? {
1202
+ type: "tableColumn",
1203
+ value: t.value,
1204
+ inputs: null,
1205
+ isReference: !0
1206
+ } : t), r = !0;
1207
+ } else n.push(e);
1208
+ return r ? {
1209
+ ...e,
1210
+ inputs: n
1211
+ } : void 0;
1212
+ }, pe = (e) => {
1213
+ if (!e) return !1;
1214
+ if ("function" === e.type && (t = he(e), !0 === _.get(t)?.volatile)) return !0;
1215
+ var t;
1216
+ const r = e.inputs;
1217
+ if (!r) return !1;
1218
+ for (let e = 0; e < r.length; e++) if (pe(r[e])) return !0;
1219
+ return !1;
1220
+ }, Ee = (e, t) => {
1221
+ if (!e) return !1;
1222
+ if (Ce(e, t)) return !0;
1223
+ const r = e.inputs;
1224
+ if (!r) return !1;
1225
+ for (let e = 0; e < r.length; e++) if (Ee(r[e], t)) return !0;
1226
+ return !1;
1227
+ }, fe = /* @__PURE__ */ new Set([
1228
+ "+",
1229
+ "-",
1230
+ "*",
1231
+ "/",
1232
+ "^",
1233
+ "&",
1234
+ "=",
1235
+ "<>",
1236
+ ">",
1237
+ "<",
1238
+ ">=",
1239
+ "<="
1240
+ ]), Ae = /* @__PURE__ */ new Set(["-", "+"]), Te = /* @__PURE__ */ new Set([
1241
+ ":",
1242
+ " ",
1243
+ ".:.",
1244
+ ".:",
1245
+ ":."
1246
+ ]), de = (e) => {
1247
+ if (!e) return null;
1248
+ if ("cell" === e.type) {
1249
+ const t = e.value;
1250
+ return t ? {
1251
+ rows: t.rowIndex === Number.MIN_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : 1,
1252
+ cols: t.colIndex === Number.MIN_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : 1
1253
+ } : null;
1254
+ }
1255
+ if ("infix" === e.type && ":" === e.value) {
1256
+ const t = e.inputs?.[0], r = e.inputs?.[1];
1257
+ if ("cell" !== t?.type || "cell" !== r?.type) return null;
1258
+ const n = t.value, o = r.value;
1259
+ return n && o ? n.rowIndex === Number.MIN_SAFE_INTEGER || o.rowIndex === Number.MIN_SAFE_INTEGER || n.colIndex === Number.MIN_SAFE_INTEGER || o.colIndex === Number.MIN_SAFE_INTEGER ? null : {
1260
+ rows: Math.abs(o.rowIndex - n.rowIndex) + 1,
1261
+ cols: Math.abs(o.colIndex - n.colIndex) + 1
1262
+ } : null;
1263
+ }
1264
+ return null;
1265
+ }, Se = (e) => {
1266
+ if (!e || "number" !== e.type) return null;
1267
+ const t = "number" == typeof e.value ? e.value : Number(e.value);
1268
+ return Number.isFinite(t) ? t : null;
1269
+ }, he = (e) => String(e.value ?? "").toUpperCase(), ge = /* @__PURE__ */ new WeakMap(), me = (e) => {
1270
+ let t = ge.get(e);
1271
+ return t || (t = ((e) => {
1272
+ const t = [], r = [], n = (e) => {
1273
+ t.push(null !== e.getRangeType() || e.getArrayDepth() > 0), r.push(null !== e.getScalarType());
1274
+ };
1275
+ let o = 0;
1276
+ for (const t of e.getDeclaration().getParameters()) {
1277
+ const e = t.getRepeatingTypes();
1278
+ if (e) {
1279
+ o = e.length;
1280
+ for (const t of e) n(t);
1281
+ break;
1282
+ }
1283
+ if (t.isRest()) {
1284
+ o = 1, n(t);
1285
+ break;
1286
+ }
1287
+ n(t);
1288
+ }
1289
+ return {
1290
+ accepts: t,
1291
+ valueTyped: r,
1292
+ period: o
1293
+ };
1294
+ })(e), ge.set(e, t)), t;
1295
+ }, Re = (e, t) => {
1296
+ const r = e.accepts.length;
1297
+ if (t < r) return t;
1298
+ if (e.period > 0) {
1299
+ const n = r - e.period;
1300
+ return n + (t - n) % e.period;
1301
+ }
1302
+ return -1;
1303
+ }, Oe = (e, t, r) => {
1304
+ const n = me(t), o = Re(n, r);
1305
+ return o < 0 ? null : !!z(e, o) || !K(e) && !j(e, o) && !n.accepts[o];
1306
+ }, Ie = (e, t) => t && "function" === e.type ? !((e) => {
1307
+ const t = _.get(e)?.arrayScope;
1308
+ return "consumer" === t || "lazy" === t;
1309
+ })(he(e)) : t, xe = (e, t, r) => {
1310
+ const n = Ie(e, r);
1311
+ if ("function" !== e.type) return () => n;
1312
+ const o = he(e), a = Z(o), s = n && void 0 !== ((e) => _.get(e))(o)?.scopeClears;
1313
+ if (!a && !s) return () => n;
1314
+ const i = t.getFunction(o);
1315
+ if (!i) return () => n;
1316
+ const l = me(i);
1317
+ return (e) => {
1318
+ const t = Re(l, e);
1319
+ return !(t >= 0 && ((e, t) => !0 === _.get(e)?.scopeClears?.includes(t))(o, t)) && (n || ((e, t, r) => {
1320
+ if (!Z(e) || !t.isBuiltIn()) return !1;
1321
+ const n = me(t), o = Re(n, r);
1322
+ return !(o < 0) && !z(e, o) && n.accepts[o];
1323
+ })(o, i, e));
1324
+ };
1325
+ }, be = (e, t, r) => {
1326
+ if (!r) return () => !1;
1327
+ const n = e.type;
1328
+ if ("paren" === n) return () => !0;
1329
+ if ("prefix" === n) return () => Ae.has(e.value);
1330
+ if ("infix" === n) return () => fe.has(e.value);
1331
+ if ("function" !== n) return () => !1;
1332
+ const o = t.getFunction(he(e));
1333
+ if (!o) return () => !1;
1334
+ const a = me(o);
1335
+ return (e) => {
1336
+ const t = Re(a, e);
1337
+ return t >= 0 && !a.accepts[t];
1338
+ };
1339
+ }, ye = (e, t, r, n) => {
1340
+ if (!e) return !1;
1341
+ const o = e.type;
1342
+ if ("prefix" === o) {
1343
+ const o = e.value;
1344
+ return "@" !== o && !!Ae.has(o) && ye(e.inputs?.[0], t, r, n);
1345
+ }
1346
+ if ("infix" === o && Te.has(e.value)) return !0;
1347
+ if ("postfix" === o && "#" === e.value) return !0;
1348
+ if ("tableReference" === o) return !0;
1349
+ if ("array" === o) return n;
1350
+ if ("paren" === o) return ye(e.inputs?.[0], t, r, n);
1351
+ if ("cell" === o) {
1352
+ const t = de(e);
1353
+ return null !== t && !(1 === t.rows && 1 === t.cols);
1354
+ }
1355
+ if ("named" === o) {
1356
+ const n = e.value, o = n?.name;
1357
+ if (!o) return !1;
1358
+ const a = `${n.scope ?? ""}!${o.toUpperCase()}`;
1359
+ if (r.has(a)) return !1;
1360
+ r.add(a);
1361
+ try {
1362
+ const e = t.getNamedRoot(o, n.scope);
1363
+ return !!e && ye(e, t, r, !0);
1364
+ } finally {
1365
+ r.delete(a);
1366
+ }
1367
+ }
1368
+ if ("infix" === o && fe.has(e.value)) return ye(e.inputs?.[0], t, r, n) || ye(e.inputs?.[1], t, r, n);
1369
+ if ("call" === o) return Ce(e, t);
1370
+ if ("function" === o) {
1371
+ const o = he(e), a = t.getFunction(o);
1372
+ if (!a) return t.hasFunctions();
1373
+ const s = ((e, t, r, n, o) => {
1374
+ if (!r.isBuiltIn()) return null;
1375
+ const a = e.inputs;
1376
+ if (!a) return null;
1377
+ const s = a[0];
1378
+ switch (t) {
1379
+ case "OFFSET": {
1380
+ const e = a[3], t = a[4];
1381
+ if (void 0 === e && void 0 === t) return ye(s, n, o, !0);
1382
+ const r = s ? de(s) : null, i = void 0 === e ? 1 === r?.rows : 1 === Se(e), l = void 0 === t ? 1 === r?.cols : 1 === Se(t);
1383
+ return !(i && l);
1384
+ }
1385
+ case "INDEX": {
1386
+ const e = a[1], t = a[2], r = s ? de(s) : null;
1387
+ if (1 === r?.rows && 1 === r?.cols) return !1;
1388
+ const n = (e, t) => {
1389
+ if (void 0 === e) return 1 === t;
1390
+ const r = Se(e);
1391
+ return null !== r && 0 !== r;
1392
+ };
1393
+ return !(n(e, r?.rows) && n(t, r?.cols));
1394
+ }
1395
+ case "XLOOKUP": {
1396
+ if (a[3] && ye(a[3], n, o, !0)) return !0;
1397
+ const e = a[1] ? de(a[1]) : null, t = a[2] ? de(a[2]) : null;
1398
+ return !(e && t && (1 === e.rows && 1 === e.cols ? 1 === t.rows && 1 === t.cols : 1 === e.cols ? 1 === t.cols : 1 === e.rows && 1 === t.rows));
1399
+ }
1400
+ default: return null;
1401
+ }
1402
+ })(e, o, a, t, r);
1403
+ if (null !== s) return s;
1404
+ const i = Q(o);
1405
+ if (void 0 !== i && a.isBuiltIn()) return ye(e.inputs?.[i], t, r, !0);
1406
+ if (a.isBuiltIn() && ((e) => !0 === _.get(e)?.arrayReturn)(o)) return !0;
1407
+ const l = a.getDeclaration().getReturnType();
1408
+ if (null !== l.getRangeType()) return !0;
1409
+ const c = a.isBuiltIn() && q(o);
1410
+ if (null !== l.getScalarType() && !c) return !1;
1411
+ const u = e.inputs;
1412
+ if (!u) return !1;
1413
+ const p = c || n;
1414
+ for (let e = 0; e < u.length; e++) if (ye(u[e], t, r, p)) return !0;
1415
+ return !1;
1416
+ }
1417
+ return !1;
1418
+ }, Ce = (e, t) => {
1419
+ const r = e.type;
1420
+ if ("function" === r) return t.hasFunctions() && null === t.getFunction(he(e));
1421
+ if ("call" === r) {
1422
+ const r = e.inputs?.[0];
1423
+ if ("named" !== r?.type) return !1;
1424
+ const n = r.value;
1425
+ return !!n?.name && t.hasFunctions() && null === t.getNamedRoot(n.name, n.scope);
1426
+ }
1427
+ return !1;
1428
+ }, Ne = (e, t, r) => {
1429
+ if (!e || "function" !== e.type) return !1;
1430
+ const n = he(e);
1431
+ return !(!q(n) && void 0 === Q(n)) && !!t.getFunction(n)?.isBuiltIn() && ye(e, t, r, !0);
1432
+ }, Le = (e, t, r, n = !1, o = !1) => {
1433
+ const a = e.inputs;
1434
+ if (!a) return null;
1435
+ if (Ie(e, n)) return null;
1436
+ const s = e.type, i = be(e, t, o);
1437
+ let l = null;
1438
+ if ("infix" === s && fe.has(e.value)) {
1439
+ for (let e = 0; e < 2; e++) ye(a[e], t, r, i(e)) && (l ??= []).push(e);
1440
+ return l;
1441
+ }
1442
+ if ("prefix" === s && Ae.has(e.value)) return ye(a[0], t, r, i(0)) && (l = [0]), l;
1443
+ if ("function" !== s) return null;
1444
+ const c = he(e), u = t.getFunction(c);
1445
+ if (!u) return null;
1446
+ const p = me(u);
1447
+ for (let e = 0; e < a.length; e++) {
1448
+ const n = Oe(c, u, e);
1449
+ if (null === n) break;
1450
+ if (n) {
1451
+ ye(a[e], t, r, i(e)) && (l ??= []).push(e);
1452
+ continue;
1453
+ }
1454
+ if (K(c)) continue;
1455
+ const o = Re(p, e);
1456
+ o < 0 || !p.valueTyped[o] || j(c, o) || Ne(a[e], t, r) && (l ??= []).push(e);
1457
+ }
1458
+ return l;
1459
+ }, ve = (e) => {
1460
+ const t = "paren" === e?.type ? e.inputs?.[0] : void 0;
1461
+ return t ? {
1462
+ ...e,
1463
+ inputs: [ve(t)]
1464
+ } : {
1465
+ type: "prefix",
1466
+ value: "@",
1467
+ inputs: [e],
1468
+ isReference: !0
1469
+ };
1470
+ }, De = (e, t) => {
1471
+ if (!e) return !1;
1472
+ const r = /* @__PURE__ */ new Set();
1473
+ if (ye(e, t, r, !0)) return !0;
1474
+ let n = !1;
1475
+ const o = (e, a, s) => {
1476
+ if (n || !e) return;
1477
+ if ("call" === e.type && !Ce(e, t)) return void (n = !0);
1478
+ if (Le(e, t, r, a, s)) return void (n = !0);
1479
+ const i = e.inputs;
1480
+ if (!i) return;
1481
+ const l = xe(e, t, a), c = be(e, t, s);
1482
+ for (let e = 0; e < i.length && !n; e++) i[e] && o(i[e], l(e), c(e));
1483
+ };
1484
+ return o(e, !1, !0), n;
1485
+ };
1486
+ function Pe(e) {
1487
+ const t = ce();
1488
+ return {
1489
+ base: (e, r) => {
1490
+ const n = t(e, r) ?? e;
1491
+ return n === e ? void 0 : n;
1492
+ },
1493
+ legacy: (r, n) => {
1494
+ const o = t(r, n) ?? r;
1495
+ if (void 0 !== n) return o === r ? void 0 : o;
1496
+ const a = ((e, t) => {
1497
+ if (!e) return e;
1498
+ const r = /* @__PURE__ */ new Set(), n = (e, o, a) => {
1499
+ const s = e.inputs;
1500
+ let i = e;
1501
+ if (s) {
1502
+ const r = xe(e, t, o), l = be(e, t, a);
1503
+ let c;
1504
+ for (let e = 0; e < s.length; e++) {
1505
+ const t = s[e];
1506
+ if (!t) continue;
1507
+ const o = n(t, r(e), l(e));
1508
+ o !== t && (c || (c = [...s]), c[e] = o);
1509
+ }
1510
+ c && (i = {
1511
+ ...e,
1512
+ inputs: c
1513
+ });
1514
+ }
1515
+ const l = Le(i, t, r, o, a);
1516
+ if (!l) return i;
1517
+ const c = [...i.inputs];
1518
+ for (const e of l) c[e] = ve(c[e]);
1519
+ return {
1520
+ ...i,
1521
+ inputs: c
1522
+ };
1523
+ }, o = n(e, !1, !0);
1524
+ return ye(o, t, r, !0) ? ve(o) : o;
1525
+ })(o, e);
1526
+ return a === r ? void 0 : a;
1527
+ }
1528
+ };
1529
+ }
1530
+ var Me = "xlsxFormulaDialect";
1531
+ function Fe(e, t) {
1532
+ const r = /* @__PURE__ */ new Set();
1533
+ if (t) for (let e = 0; e < t.length; e++) r.add(String(t[e]).toUpperCase());
1534
+ const n = /* @__PURE__ */ new Map();
1535
+ if (e) for (let t = 0; t < e.length; t++) {
1536
+ const r = e[t], o = String(r?.name ?? "").toUpperCase();
1537
+ if (!o) continue;
1538
+ let a = n.get(o);
1539
+ a || n.set(o, a = []), a.push(r);
1540
+ }
1541
+ const s = ce(), i = /* @__PURE__ */ new Map(), l = {
1542
+ getFunction: (e) => a.get(e),
1543
+ hasFunctions: () => !0,
1544
+ getNamedRoot: (e, t) => {
1545
+ const r = n.get(e.toUpperCase());
1546
+ if (!r) return null;
1547
+ const a = t ? t.toUpperCase() : null, l = a ? r.find((e) => String(e.scope ?? "").toUpperCase() === a) ?? r[0] : r.find((e) => !e.scope) ?? r[0], c = l?.ref;
1548
+ if ("string" != typeof c) return null;
1549
+ const u = `${String(l.scope ?? "").toUpperCase()}!${e.toUpperCase()}`, p = i.get(u);
1550
+ if (void 0 !== p) return p;
1551
+ const E = o.parse(c), f = E ? o.transform(E, s) : null;
1552
+ return i.set(u, f), f;
1553
+ }
1554
+ }, c = Pe(l), u = ee({ has: (e) => n.has(e.toUpperCase()) }), p = function(e, t) {
1555
+ const r = ce();
1556
+ return (n, o) => {
1557
+ const a = e(n, o) ?? n;
1558
+ if (void 0 !== o) return a === n ? void 0 : a;
1559
+ const s = /* @__PURE__ */ new Map(), i = ke(a, void 0, r, s);
1560
+ if (0 === s.size || De(i, t)) return a === n ? void 0 : a;
1561
+ const l = /* @__PURE__ */ new Set();
1562
+ for (const e of Ue(i, t)) {
1563
+ const t = s.get(e);
1564
+ t && l.add(t);
1565
+ }
1566
+ return 0 === l.size ? a === n ? void 0 : a : Ve(a, l);
1567
+ };
1568
+ }(u, l), E = (e, t, r) => {
1569
+ const n = o.parse(e, { anchor: t });
1570
+ if (!n) return e;
1571
+ const a = o.transform(n, r);
1572
+ return a === n ? e : o.image(a, { at: t });
1573
+ };
1574
+ return {
1575
+ parse: (e, t) => o.parse(e, {
1576
+ anchor: t,
1577
+ normalize: !0
1578
+ }),
1579
+ readText: (e, t, r) => E(e, t, r ? c.base : c.legacy),
1580
+ readDetached: (e) => E(e, void 0, c.base),
1581
+ annotate: (e) => {
1582
+ const t = De(e, l), r = pe(e) || Ee(e, l);
1583
+ if (!t && !r) return;
1584
+ const n = {};
1585
+ return t && (n.cm = !0), r && (n.ca = !0), n;
1586
+ },
1587
+ spell: (e, t, n) => {
1588
+ const a = n || r.size > 0 ? o.transform(e, ((e) => (t) => {
1589
+ const n = t.type;
1590
+ if ("tableReference" === n) return !t.value && e ? {
1591
+ ...t,
1592
+ value: e
1593
+ } : void 0;
1594
+ if ("named" === n && r.size > 0) {
1595
+ const e = t.value;
1596
+ if (e?.name && !e.scope && r.has(e.name.toUpperCase())) return {
1597
+ type: "tableReference",
1598
+ value: e.name,
1599
+ inputs: null,
1600
+ isReference: !0
1601
+ };
1602
+ }
1603
+ })(n)) : e;
1604
+ return o.transform(a, t ? u : p);
1605
+ },
1606
+ writeName: (e) => E(e, void 0, u)
1607
+ };
1608
+ }
1609
+ function Be(e, r) {
1610
+ (function(e, r) {
1611
+ const n = e.tables;
1612
+ if (!n) return;
1613
+ for (let e = 0; e < n.length; e++) {
1614
+ const o = n[e], a = Array.isArray(o) ? o[0] : o?.r, s = Array.isArray(o) ? o[1] : o?.v, i = s?.columns;
1615
+ if (!i || "string" != typeof a) continue;
1616
+ const l = t.fastStringToRange(a), c = l.rowStart + (s.headerRowCount ?? 1);
1617
+ for (let e = 0; e < i.length; e++) {
1618
+ const t = i[e];
1619
+ if (!t || "object" != typeof t) continue;
1620
+ const n = {
1621
+ rowIndex: c,
1622
+ colIndex: l.colStart + e
1623
+ }, o = t.calculatedColumnFormula;
1624
+ "string" == typeof o && o && (t.calculatedColumnFormula = r.readText(o, n, !1));
1625
+ const a = t.totalsRowFormula;
1626
+ "string" == typeof a && a && (t.totalsRowFormula = r.readText(a, n, !1));
1627
+ }
1628
+ }
1629
+ })(e, r);
1630
+ const n = e.formulas;
1631
+ if (!n || 0 === n.length) return;
1632
+ const o = /* @__PURE__ */ new Set(), a = e.formulaArray;
1633
+ if (a) for (let e = 0; e < a.length; e++) {
1634
+ const r = t.fastStringToRange(String(a[e][0]));
1635
+ o.add(`${r.rowStart},${r.colStart}`);
1636
+ }
1637
+ for (let e = 0; e < n.length; e++) {
1638
+ const a = n[e], s = a[1];
1639
+ if ("string" != typeof s) continue;
1640
+ const i = t.fastStringToRange(String(a[0])), l = {
1641
+ rowIndex: i.rowStart,
1642
+ colIndex: i.colStart
1643
+ }, c = r.readText(s, l, o.has(`${i.rowStart},${i.colStart}`));
1644
+ c !== s && (a[1] = c);
1645
+ }
1646
+ }
1647
+ var we = (e) => "prefix" === e?.type && "@" === e.value && !!e.inputs?.[0], Ue = (e, t) => {
1648
+ const r = /* @__PURE__ */ new Set();
1649
+ if (!e) return r;
1650
+ const n = /* @__PURE__ */ new Set(), o = (e, a, s) => {
1651
+ const i = e.inputs;
1652
+ if (!i) return;
1653
+ let l;
1654
+ for (let e = 0; e < i.length; e++) {
1655
+ const t = i[e];
1656
+ we(t) && "paren" !== t.inputs[0].type && (l || (l = [...i]), l[e] = t.inputs[0]);
1657
+ }
1658
+ if (l) {
1659
+ const o = Le({
1660
+ ...e,
1661
+ inputs: l
1662
+ }, t, n, a, s);
1663
+ if (o) for (const e of o) l[e] !== i[e] && r.add(i[e]);
1664
+ }
1665
+ const c = xe(e, t, a), u = be(e, t, s);
1666
+ for (let e = 0; e < i.length; e++) {
1667
+ const t = i[e];
1668
+ t && o(t, c(e), u(e));
1669
+ }
1670
+ };
1671
+ return o(e, !1, !0), we(e) && "paren" !== e.inputs[0].type && ye(e.inputs[0], t, n, !0) && r.add(e), r;
1672
+ }, ke = (e, t, r, n) => {
1673
+ const o = e.inputs;
1674
+ let a = e;
1675
+ if (o) {
1676
+ let t;
1677
+ for (let a = 0; a < o.length; a++) {
1678
+ const s = o[a];
1679
+ if (!s) continue;
1680
+ const i = ke(s, e, r, n);
1681
+ i !== s && (t || (t = [...o]), t[a] = i);
1682
+ }
1683
+ t && (a = {
1684
+ ...e,
1685
+ inputs: t
1686
+ });
1687
+ }
1688
+ const s = r(a, t);
1689
+ return s && s !== a ? (we(s) && "function" === a.type && n.set(s, e), s) : a;
1690
+ }, Ve = (e, t) => {
1691
+ if (t.has(e)) return Ve(e.inputs[0], t);
1692
+ const r = e.inputs;
1693
+ if (!r) return e;
1694
+ let n;
1695
+ for (let e = 0; e < r.length; e++) {
1696
+ const o = r[e];
1697
+ if (!o) continue;
1698
+ const a = Ve(o, t);
1699
+ a !== o && (n || (n = [...r]), n[e] = a);
1700
+ }
1701
+ return n ? {
1702
+ ...e,
1703
+ inputs: n
1704
+ } : e;
1705
+ };
1706
+ var Ge = 67108864, We = class {
1707
+ constructor(e, t) {
1708
+ this._structurallyChanged = !1, this._parts = e, this._absorbed = t ?? /* @__PURE__ */ new Set();
1709
+ let r = 0;
1710
+ for (const t of e.values()) r += t.data.byteLength;
1711
+ this._totalBytes = r;
1712
+ }
1713
+ getNames() {
1714
+ return [...this._parts.keys()];
1715
+ }
1716
+ has(e) {
1717
+ return this._parts.has(e);
1718
+ }
1719
+ getPart(e) {
1720
+ return this._parts.get(e) ?? null;
1721
+ }
1722
+ isAbsorbed(e) {
1723
+ return this._absorbed.has(e);
1724
+ }
1725
+ getTotalBytes() {
1726
+ return this._totalBytes;
1727
+ }
1728
+ hasStructuralChange() {
1729
+ return this._structurallyChanged;
1730
+ }
1731
+ markStructuralChange() {
1732
+ this._structurallyChanged = !0;
1733
+ }
1734
+ }, He = /* @__PURE__ */ new WeakMap();
1735
+ function $e(e) {
1736
+ return e ? He.get(e) ?? null : null;
1737
+ }
1738
+ function Ye(e, t) {
1739
+ He.set(e, t);
1740
+ }
1741
+ function Xe(e) {
1742
+ e && He.delete(e);
1743
+ }
1744
+ var _e = h({
1745
+ EMU_PER_PIXEL: () => je,
1746
+ EMU_PER_POINT: () => Ke,
1747
+ fixedPointToDouble: () => Qe,
1748
+ parseAngle: () => Je,
1749
+ parseAsBoolean: () => et,
1750
+ parsePercentage: () => Ze,
1751
+ toPixels: () => qe,
1752
+ toPoints: () => ze
1753
+ }), Ke = 12700, je = 9525, ze = (t) => t ? e.roundAccurately(parseFloat(t) / Ke, 4) : null, qe = (t) => t ? e.roundAccurately(parseFloat(t) / je, 1) : null, Qe = (e) => (e >> 16) + (65535 & e) / 65536, Ze = (e) => parseFloat(e) / 1e3, Je = (e) => parseFloat(e) / 6e4, et = (e) => "true" === e || "1" === e, tt = /* @__PURE__ */ new Set([
1754
+ "A1.R1C1",
1755
+ "ABSREF",
1756
+ "ACTIVATE",
1757
+ "ACTIVATE.NEXT",
1758
+ "ACTIVATE.NOTES",
1759
+ "ACTIVATE.PREV",
1760
+ "ACTIVE.CELL",
1761
+ "ACTIVE.CELL.FONT",
1762
+ "ADD.ARROW",
1763
+ "ADD.BAR",
1764
+ "ADD.CHART.AUTOFORMAT",
1765
+ "ADD.COMMAND",
1766
+ "ADD.LIST.ITEM",
1767
+ "ADD.MENU",
1768
+ "ADD.OVERLAY",
1769
+ "ADD.PRINT.AREA",
1770
+ "ADD.TOOL",
1771
+ "ADD.TOOLBAR",
1772
+ "ADDIN.MANAGER",
1773
+ "ALERT",
1774
+ "ALIGNMENT",
1775
+ "APP.ACTIVATE",
1776
+ "APP.ACTIVATE.MICROSOFT",
1777
+ "APP.MAXIMIZE",
1778
+ "APP.MINIMIZE",
1779
+ "APP.MOVE",
1780
+ "APP.RESTORE",
1781
+ "APP.SIZE",
1782
+ "APP.TITLE",
1783
+ "APPLY.NAMES",
1784
+ "APPLY.STYLE",
1785
+ "ARGUMENT",
1786
+ "ARRANGE.ALL",
1787
+ "ASSIGN.TO.OBJECT",
1788
+ "ASSIGN.TO.TOOL",
1789
+ "ATTACH.TEXT",
1790
+ "ATTACH.TOOLBARS",
1791
+ "ATTRIBUTES",
1792
+ "AUTO.OUTLINE",
1793
+ "AUTOCORRECT",
1794
+ "AXES",
1795
+ "BEEP",
1796
+ "BORDER",
1797
+ "BREAK",
1798
+ "BRING.TO.FRONT",
1799
+ "CALCULATE.DOCUMENT",
1800
+ "CALCULATE.NOW",
1801
+ "CALCULATION",
1802
+ "CALL",
1803
+ "CALLER",
1804
+ "CANCEL.COPY",
1805
+ "CANCEL.KEY",
1806
+ "CELL.PROTECTION",
1807
+ "CHANGE.LINK",
1808
+ "CHART.ADD.DATA",
1809
+ "CHART.TREND",
1810
+ "CHART.WIZARD",
1811
+ "CHECK.COMMAND",
1812
+ "CHECKBOX.PROPERTIES",
1813
+ "CLEAR",
1814
+ "CLEAR.OUTLINE",
1815
+ "CLEAR.PRINT.AREA",
1816
+ "CLEAR.ROUTING.SLIP",
1817
+ "CLOSE",
1818
+ "CLOSE.ALL",
1819
+ "COLOR.PALETTE",
1820
+ "COLUMN.WIDTH",
1821
+ "COMBINATION",
1822
+ "CONSOLIDATE",
1823
+ "CONSTRAIN.NUMERIC",
1824
+ "COPY",
1825
+ "COPY.CHART",
1826
+ "COPY.PICTURE",
1827
+ "COPY.TOOL",
1828
+ "CREATE.NAMES",
1829
+ "CREATE.OBJECT",
1830
+ "CREATE.PUBLISHER",
1831
+ "CUSTOM.REPEAT",
1832
+ "CUSTOM.UNDO",
1833
+ "CUSTOMIZE.TOOLBAR",
1834
+ "CUT",
1835
+ "DATA.DELETE",
1836
+ "DATA.FIND",
1837
+ "DATA.FIND.NEXT",
1838
+ "DATA.FIND.PREV",
1839
+ "DATA.FORM",
1840
+ "DATA.LABEL",
1841
+ "DATA.SERIES",
1842
+ "DEFINE.NAME",
1843
+ "DEFINE.STYLE",
1844
+ "DELETE.ARROW",
1845
+ "DELETE.BAR",
1846
+ "DELETE.CHART.AUTOFORMAT",
1847
+ "DELETE.COMMAND",
1848
+ "DELETE.FORMAT",
1849
+ "DELETE.MENU",
1850
+ "DELETE.NAME",
1851
+ "DELETE.NOTE",
1852
+ "DELETE.OVERLAY",
1853
+ "DELETE.STYLE",
1854
+ "DELETE.TOOL",
1855
+ "DELETE.TOOLBAR",
1856
+ "DEMOTE",
1857
+ "DEREF",
1858
+ "DIALOG.BOX",
1859
+ "DIRECTORY",
1860
+ "DISABLE.INPUT",
1861
+ "DISPLAY",
1862
+ "DOCUMENTS",
1863
+ "DUPLICATE",
1864
+ "ECHO",
1865
+ "EDIT.COLOR",
1866
+ "EDIT.DELETE",
1867
+ "EDIT.OBJECT",
1868
+ "EDIT.REPEAT",
1869
+ "EDIT.SERIES",
1870
+ "EDIT.TOOL",
1871
+ "EDITBOX.PROPERTIES",
1872
+ "EDITION.OPTIONS",
1873
+ "ELSE",
1874
+ "ELSE.IF",
1875
+ "ENABLE.COMMAND",
1876
+ "ENABLE.OBJECT",
1877
+ "ENABLE.TIPWIZARD",
1878
+ "ENABLE.TOOL",
1879
+ "END.IF",
1880
+ "ENTER.DATA",
1881
+ "ERROR",
1882
+ "ERRORBAR.X",
1883
+ "ERRORBAR.Y",
1884
+ "EVALUATE",
1885
+ "EXEC",
1886
+ "EXECUTE",
1887
+ "EXTEND.POLYGON",
1888
+ "EXTRACT",
1889
+ "FCLOSE",
1890
+ "FILE.CLOSE",
1891
+ "FILE.DELETE",
1892
+ "FILES",
1893
+ "FILL.AUTO",
1894
+ "FILL.DOWN",
1895
+ "FILL.GROUP",
1896
+ "FILL.LEFT",
1897
+ "FILL.RIGHT",
1898
+ "FILL.UP",
1899
+ "FILTER.ADVANCED",
1900
+ "FILTER.SHOW.ALL",
1901
+ "FIND.FILE",
1902
+ "FONT",
1903
+ "FONT.PROPERTIES",
1904
+ "FOPEN",
1905
+ "FOR",
1906
+ "FOR.CELL",
1907
+ "FORMAT.AUTO",
1908
+ "FORMAT.CHART",
1909
+ "FORMAT.CHARTTYPE",
1910
+ "FORMAT.FONT",
1911
+ "FORMAT.LEGEND",
1912
+ "FORMAT.MAIN",
1913
+ "FORMAT.MOVE",
1914
+ "FORMAT.NUMBER",
1915
+ "FORMAT.OVERLAY",
1916
+ "FORMAT.SHAPE",
1917
+ "FORMAT.SIZE",
1918
+ "FORMAT.TEXT",
1919
+ "FORMULA",
1920
+ "FORMULA.ARRAY",
1921
+ "FORMULA.CONVERT",
1922
+ "FORMULA.FILL",
1923
+ "FORMULA.FIND",
1924
+ "FORMULA.FIND.NEXT",
1925
+ "FORMULA.FIND.PREV",
1926
+ "FORMULA.GOTO",
1927
+ "FORMULA.REPLACE",
1928
+ "FPOS",
1929
+ "FREAD",
1930
+ "FREADLN",
1931
+ "FREEZE.PANES",
1932
+ "FSIZE",
1933
+ "FULL",
1934
+ "FULL.SCREEN",
1935
+ "FUNCTION.WIZARD",
1936
+ "FWRITE",
1937
+ "FWRITELN",
1938
+ "GALLERY.3D.AREA",
1939
+ "GALLERY.3D.BAR",
1940
+ "GALLERY.3D.COLUMN",
1941
+ "GALLERY.3D.LINE",
1942
+ "GALLERY.3D.PIE",
1943
+ "GALLERY.3D.SURFACE",
1944
+ "GALLERY.AREA",
1945
+ "GALLERY.BAR",
1946
+ "GALLERY.COLUMN",
1947
+ "GALLERY.CUSTOM",
1948
+ "GALLERY.DOUGHNUT",
1949
+ "GALLERY.LINE",
1950
+ "GALLERY.PIE",
1951
+ "GALLERY.RADAR",
1952
+ "GALLERY.SCATTER",
1953
+ "GET.BAR",
1954
+ "GET.CELL",
1955
+ "GET.CHART.ITEM",
1956
+ "GET.DEF",
1957
+ "GET.DOCUMENT",
1958
+ "GET.FORMULA",
1959
+ "GET.LINK.INFO",
1960
+ "GET.MOVIE",
1961
+ "GET.NAME",
1962
+ "GET.NOTE",
1963
+ "GET.OBJECT",
1964
+ "GET.TOOL",
1965
+ "GET.TOOLBAR",
1966
+ "GET.WINDOW",
1967
+ "GET.WORKBOOK",
1968
+ "GET.WORKSPACE",
1969
+ "GOAL.SEEK",
1970
+ "GOTO",
1971
+ "GRIDLINES",
1972
+ "GROUP",
1973
+ "HALT",
1974
+ "HELP",
1975
+ "HIDE",
1976
+ "HIDE.DIALOG",
1977
+ "HIDE.OBJECT",
1978
+ "HIDEALL.INKANNOTS",
1979
+ "HIDEALL.NOTES",
1980
+ "HIDECURR.NOTE",
1981
+ "HLINE",
1982
+ "HPAGE",
1983
+ "HSCROLL",
1984
+ "INITIATE",
1985
+ "INPUT",
1986
+ "INSERT",
1987
+ "INSERT.MAP.OBJECT",
1988
+ "INSERT.OBJECT",
1989
+ "INSERT.PICTURE",
1990
+ "INSERT.TITLE",
1991
+ "INSERTDATATABLE",
1992
+ "JUSTIFY",
1993
+ "LABEL.PROPERTIES",
1994
+ "LAST.ERROR",
1995
+ "LAYOUT",
1996
+ "LEGEND",
1997
+ "LINE.PRINT",
1998
+ "LINK.COMBO",
1999
+ "LINK.FORMAT",
2000
+ "LINKS",
2001
+ "LIST.NAMES",
2002
+ "LISTBOX.PROPERTIES",
2003
+ "MACRO.OPTIONS",
2004
+ "MAIL.ADD.MAILER",
2005
+ "MAIL.DELETE.MAILER",
2006
+ "MAIL.EDIT.MAILER",
2007
+ "MAIL.FORWARD",
2008
+ "MAIL.LOGOFF",
2009
+ "MAIL.LOGON",
2010
+ "MAIL.NEXT.LETTER",
2011
+ "MAIL.REPLY",
2012
+ "MAIL.REPLY.ALL",
2013
+ "MAIL.SEND.MAILER",
2014
+ "MAIN.CHART",
2015
+ "MAIN.CHART.TYPE",
2016
+ "MENU.EDITOR",
2017
+ "MERGE.STYLES",
2018
+ "MESSAGE",
2019
+ "MOVE.BRK",
2020
+ "MOVE.TOOL",
2021
+ "MOVIE.COMMAND",
2022
+ "MSOCHECKS",
2023
+ "NAMES",
2024
+ "NEW",
2025
+ "NEW.WINDOW",
2026
+ "NEWWEBQUERY",
2027
+ "NEXT",
2028
+ "NORMAL",
2029
+ "NOTE",
2030
+ "OBJECT.PROPERTIES",
2031
+ "OBJECT.PROTECTION",
2032
+ "ON.DATA",
2033
+ "ON.DOUBLECLICK",
2034
+ "ON.ENTRY",
2035
+ "ON.KEY",
2036
+ "ON.RECALC",
2037
+ "ON.SHEET",
2038
+ "ON.TIME",
2039
+ "ON.WINDOW",
2040
+ "OPEN",
2041
+ "OPEN.DIALOG",
2042
+ "OPEN.LINKS",
2043
+ "OPEN.MAIL",
2044
+ "OPEN.TEXT",
2045
+ "OPTIONS.CALCULATION",
2046
+ "OPTIONS.CHART",
2047
+ "OPTIONS.EDIT",
2048
+ "OPTIONS.GENERAL",
2049
+ "OPTIONS.LISTS.ADD",
2050
+ "OPTIONS.LISTS.DELETE",
2051
+ "OPTIONS.LISTS.GET",
2052
+ "OPTIONS.ME",
2053
+ "OPTIONS.MENONO",
2054
+ "OPTIONS.SAVE",
2055
+ "OPTIONS.SPELL",
2056
+ "OPTIONS.TRANSITION",
2057
+ "OPTIONS.VIEW",
2058
+ "OUTLINE",
2059
+ "OVERLAY",
2060
+ "OVERLAY.CHART.TYPE",
2061
+ "PAGE.SETUP",
2062
+ "PARSE",
2063
+ "PASTE",
2064
+ "PASTE.LINK",
2065
+ "PASTE.PICTURE",
2066
+ "PASTE.PICTURE.LINK",
2067
+ "PASTE.SPECIAL",
2068
+ "PASTE.TOOL",
2069
+ "PATTERNS",
2070
+ "PAUSE",
2071
+ "PICKLIST",
2072
+ "PIVOT.ADD.FIELDS",
2073
+ "PIVOT.FIELD",
2074
+ "PIVOT.FIELD.GROUP",
2075
+ "PIVOT.FIELD.PROPERTIES",
2076
+ "PIVOT.FIELD.UNGROUP",
2077
+ "PIVOT.ITEM",
2078
+ "PIVOT.ITEM.PROPERTIES",
2079
+ "PIVOT.REFRESH",
2080
+ "PIVOT.SHOW.PAGES",
2081
+ "PIVOT.TABLE.CHART",
2082
+ "PIVOT.TABLE.WIZARD",
2083
+ "POKE",
2084
+ "POST.DOCUMENT",
2085
+ "PRECISION",
2086
+ "PREFERRED",
2087
+ "PRESS.TOOL",
2088
+ "PRINT",
2089
+ "PRINT.PREVIEW",
2090
+ "PRINTER.SETUP",
2091
+ "PROMOTE",
2092
+ "PROTECT.DOCUMENT",
2093
+ "PROTECT.REVISIONS",
2094
+ "PUSHBUTTON.PROPERTIES",
2095
+ "QUIT",
2096
+ "REFTEXT",
2097
+ "REGISTER",
2098
+ "REGISTER.ID",
2099
+ "RELREF",
2100
+ "REMOVE.LIST.ITEM",
2101
+ "REMOVE.PAGE.BREAK",
2102
+ "RENAME.COMMAND",
2103
+ "RENAME.OBJECT",
2104
+ "REPLACE.FONT",
2105
+ "REQUEST",
2106
+ "RESET.TOOL",
2107
+ "RESET.TOOLBAR",
2108
+ "RESTART",
2109
+ "RESULT",
2110
+ "RESUME",
2111
+ "RETURN",
2112
+ "RM.PRINT.AREA",
2113
+ "ROUTE.DOCUMENT",
2114
+ "ROUTING.SLIP",
2115
+ "ROW.HEIGHT",
2116
+ "RUN",
2117
+ "SAVE",
2118
+ "SAVE.AS",
2119
+ "SAVE.COPY.AS",
2120
+ "SAVE.DIALOG",
2121
+ "SAVE.NEW.OBJECT",
2122
+ "SAVE.TOOLBAR",
2123
+ "SAVE.WORKBOOK",
2124
+ "SAVE.WORKSPACE",
2125
+ "SCALE",
2126
+ "SCENARIO.ADD",
2127
+ "SCENARIO.CELLS",
2128
+ "SCENARIO.DELETE",
2129
+ "SCENARIO.EDIT",
2130
+ "SCENARIO.GET",
2131
+ "SCENARIO.MERGE",
2132
+ "SCENARIO.SHOW",
2133
+ "SCENARIO.SHOW.NEXT",
2134
+ "SCENARIO.SUMMARY",
2135
+ "SCROLLBAR.PROPERTIES",
2136
+ "SELECT",
2137
+ "SELECT.ALL",
2138
+ "SELECT.CHART",
2139
+ "SELECT.END",
2140
+ "SELECT.LAST.CELL",
2141
+ "SELECT.LIST.ITEM",
2142
+ "SELECT.PLOT.AREA",
2143
+ "SELECT.SPECIAL",
2144
+ "SELECTION",
2145
+ "SERIES",
2146
+ "SEND.KEYS",
2147
+ "SEND.MAIL",
2148
+ "SEND.TO.BACK",
2149
+ "SERIES.AXES",
2150
+ "SERIES.ORDER",
2151
+ "SERIES.X",
2152
+ "SERIES.Y",
2153
+ "SET.CONTROL.VALUE",
2154
+ "SET.CRITERIA",
2155
+ "SET.DATABASE",
2156
+ "SET.DIALOG.DEFAULT",
2157
+ "SET.DIALOG.FOCUS",
2158
+ "SET.EXTRACT",
2159
+ "SET.LIST.ITEM",
2160
+ "SET.NAME",
2161
+ "SET.PAGE.BREAK",
2162
+ "SET.PREFERRED",
2163
+ "SET.PRINT.AREA",
2164
+ "SET.PRINT.TITLES",
2165
+ "SET.UPDATE.STATUS",
2166
+ "SET.VALUE",
2167
+ "SHARE",
2168
+ "SHARE.NAME",
2169
+ "SHEET.BACKGROUND",
2170
+ "SHORT.MENUS",
2171
+ "SHOW.ACTIVE.CELL",
2172
+ "SHOW.BAR",
2173
+ "SHOW.CLIPBOARD",
2174
+ "SHOW.DETAIL",
2175
+ "SHOW.DIALOG",
2176
+ "SHOW.INFO",
2177
+ "SHOW.LEVELS",
2178
+ "SHOW.TOOLBAR",
2179
+ "SORT.SPECIAL",
2180
+ "SOUND.NOTE",
2181
+ "SOUND.PLAY",
2182
+ "SPELLING",
2183
+ "SPELLING.CHECK",
2184
+ "SPLIT",
2185
+ "STANDARD.FONT",
2186
+ "STANDARD.WIDTH",
2187
+ "STEP",
2188
+ "STYLE",
2189
+ "SUBSCRIBE.TO",
2190
+ "SUBTOTAL.CREATE",
2191
+ "SUBTOTAL.REMOVE",
2192
+ "SUMMARY.INFO",
2193
+ "TAB.ORDER",
2194
+ "TABLE",
2195
+ "TERMINATE",
2196
+ "TEXT.BOX",
2197
+ "TEXT.TO.COLUMNS",
2198
+ "TEXTREF",
2199
+ "TRACER.CLEAR",
2200
+ "TRACER.DISPLAY",
2201
+ "TRACER.ERROR",
2202
+ "TRACER.NAVIGATE",
2203
+ "TRAVERSE.NOTES",
2204
+ "UNDO",
2205
+ "UNGROUP",
2206
+ "UNGROUP.SHEETS",
2207
+ "UNHIDE",
2208
+ "UNLOCKED.NEXT",
2209
+ "UNLOCKED.PREV",
2210
+ "UNPROTECT.REVISIONS",
2211
+ "UNREGISTER",
2212
+ "UPDATE.LINK",
2213
+ "VBA.INSERT.FILE",
2214
+ "VBA.MAKE.ADDIN",
2215
+ "VBA.PROCEDURE.DEFINITION",
2216
+ "VBAACTIVATE",
2217
+ "VIEW.3D",
2218
+ "VIEW.DEFINE",
2219
+ "VIEW.DELETE",
2220
+ "VIEW.GET",
2221
+ "VIEW.SHOW",
2222
+ "VLINE",
2223
+ "VOLATILE",
2224
+ "VPAGE",
2225
+ "VSCROLL",
2226
+ "WAIT",
2227
+ "WEB.PUBLISH",
2228
+ "WHILE",
2229
+ "WINDOW.MAXIMIZE",
2230
+ "WINDOW.MINIMIZE",
2231
+ "WINDOW.MOVE",
2232
+ "WINDOW.RESTORE",
2233
+ "WINDOW.SIZE",
2234
+ "WINDOW.TITLE",
2235
+ "WINDOWS",
2236
+ "WORKBOOK.ACTIVATE",
2237
+ "WORKBOOK.ADD",
2238
+ "WORKBOOK.COPY",
2239
+ "WORKBOOK.DELETE",
2240
+ "WORKBOOK.HIDE",
2241
+ "WORKBOOK.INSERT",
2242
+ "WORKBOOK.MOVE",
2243
+ "WORKBOOK.NAME",
2244
+ "WORKBOOK.NEW",
2245
+ "WORKBOOK.NEXT",
2246
+ "WORKBOOK.OPTIONS",
2247
+ "WORKBOOK.PREV",
2248
+ "WORKBOOK.PROTECT",
2249
+ "WORKBOOK.SCROLL",
2250
+ "WORKBOOK.SELECT",
2251
+ "WORKBOOK.TAB.SPLIT",
2252
+ "WORKBOOK.UNHIDE",
2253
+ "WORKGROUP",
2254
+ "WORKGROUP.OPTIONS",
2255
+ "WORKSPACE",
2256
+ "ZOOM"
2257
+ ]), rt = "__xludf.DUMMYFUNCTION", nt = "\"COMPUTED_VALUE\"", ot = (e) => `"${e.replace(/"/g, "\"\"")}"`, at = (e) => {
2258
+ if (null == e) return "\"\"";
2259
+ if ("number" == typeof e) return Number.isFinite(e) ? "" + e : null;
2260
+ if ("boolean" == typeof e) return e ? "TRUE" : "FALSE";
2261
+ if ("string" == typeof e) return ot(e);
2262
+ const t = e;
2263
+ if ("function" == typeof t?.getCode) {
2264
+ const e = t.getCode();
2265
+ return e < 1 ? null : e > 7 ? n.BuiltIn.Value.getLabel() : t.getLabel();
2266
+ }
2267
+ return null;
2268
+ }, st = (e, t) => {
2269
+ const r = at(t);
2270
+ return null === r ? null : `IFERROR(${rt}(${ot(e)}),${r})`;
2271
+ }, it = (e) => {
2272
+ const t = at(e);
2273
+ return null === t ? null : `IFERROR(${rt}(${ot(nt)}),${t})`;
2274
+ }, lt = async (e, t) => {
2275
+ const r = /* @__PURE__ */ new Set();
2276
+ if (0 === t.size) return r;
2277
+ const n = e.getCalculation();
2278
+ if (n.getStatus() !== s.Status.Running) return r;
2279
+ const o = n.getFunctions();
2280
+ for (const e of t) {
2281
+ const t = o.getByName(e);
2282
+ if (!t) {
2283
+ tt.has(e.toUpperCase()) && r.add(e.toUpperCase());
2284
+ continue;
2285
+ }
2286
+ if (!t.isBuiltIn()) {
2287
+ r.add(e.toUpperCase());
2288
+ continue;
2289
+ }
2290
+ const n = (await t.getDescriptor()).getCategory();
2291
+ "Sheets" !== n && "SheetXL" !== n || r.add(e.toUpperCase());
2292
+ }
2293
+ return r;
2294
+ }, ct = (e) => -1 === e.indexOf("_x") ? e : e.replace(/_x([0-9A-Fa-f]{4})_/g, (e, t) => String.fromCharCode(parseInt(t, 16))), ut = (e) => pt(e) ? e.replace(/(_x[0-9A-Fa-f]{4}_)/g, "_x005F$1").replace(/[\x00-\x08\x0B-\x1F]/g, (e) => `_x${e.charCodeAt(0).toString(16).toUpperCase().padStart(4, "0")}_`) : e, pt = (e) => {
2295
+ const t = e.length;
2296
+ for (let r = 0; r < t; r++) {
2297
+ const n = e.charCodeAt(r);
2298
+ if (n <= 8 || n >= 11 && n <= 31) return !0;
2299
+ if (95 === n && r + 6 < t && 120 === e.charCodeAt(r + 1) && 95 === e.charCodeAt(r + 6)) {
2300
+ const t = e.slice(r, r + 7);
2301
+ if (/^_x[0-9A-Fa-f]{4}_$/.test(t)) return !0;
2302
+ }
2303
+ }
2304
+ return !1;
2305
+ }, Et = /^\s|\s$/, ft = { "xml:space": "preserve" }, At = [
2306
+ {
2307
+ key: "sheet",
2308
+ attribute: "sheet",
2309
+ modelDefault: !1,
2310
+ ooxmlDefault: !1
2311
+ },
2312
+ {
2313
+ key: "objects",
2314
+ attribute: "objects",
2315
+ modelDefault: !1,
2316
+ ooxmlDefault: !1
2317
+ },
2318
+ {
2319
+ key: "scenarios",
2320
+ attribute: "scenarios",
2321
+ modelDefault: !1,
2322
+ ooxmlDefault: !1
2323
+ },
2324
+ {
2325
+ key: "formatCells",
2326
+ attribute: "formatCells",
2327
+ modelDefault: !1,
2328
+ ooxmlDefault: !0
2329
+ },
2330
+ {
2331
+ key: "formatColumns",
2332
+ attribute: "formatColumns",
2333
+ modelDefault: !1,
2334
+ ooxmlDefault: !0
2335
+ },
2336
+ {
2337
+ key: "formatRows",
2338
+ attribute: "formatRows",
2339
+ modelDefault: !1,
2340
+ ooxmlDefault: !0
2341
+ },
2342
+ {
2343
+ key: "insertColumns",
2344
+ attribute: "insertColumns",
2345
+ modelDefault: !1,
2346
+ ooxmlDefault: !0
2347
+ },
2348
+ {
2349
+ key: "insertRows",
2350
+ attribute: "insertRows",
2351
+ modelDefault: !1,
2352
+ ooxmlDefault: !0
2353
+ },
2354
+ {
2355
+ key: "insertHyperlinks",
2356
+ attribute: "insertHyperlinks",
2357
+ modelDefault: !1,
2358
+ ooxmlDefault: !0
2359
+ },
2360
+ {
2361
+ key: "deleteColumns",
2362
+ attribute: "deleteColumns",
2363
+ modelDefault: !1,
2364
+ ooxmlDefault: !0
2365
+ },
2366
+ {
2367
+ key: "deleteRows",
2368
+ attribute: "deleteRows",
2369
+ modelDefault: !1,
2370
+ ooxmlDefault: !0
2371
+ },
2372
+ {
2373
+ key: "selectLockedCells",
2374
+ attribute: "selectLockedCells",
2375
+ modelDefault: !0,
2376
+ ooxmlDefault: !1
2377
+ },
2378
+ {
2379
+ key: "sort",
2380
+ attribute: "sort",
2381
+ modelDefault: !1,
2382
+ ooxmlDefault: !0
2383
+ },
2384
+ {
2385
+ key: "autoTable",
2386
+ attribute: "autoFilter",
2387
+ modelDefault: !1,
2388
+ ooxmlDefault: !0
2389
+ },
2390
+ {
2391
+ key: "pivotTables",
2392
+ attribute: "pivotTables",
2393
+ modelDefault: !1,
2394
+ ooxmlDefault: !0
2395
+ },
2396
+ {
2397
+ key: "selectUnlockedCells",
2398
+ attribute: "selectUnlockedCells",
2399
+ modelDefault: !0,
2400
+ ooxmlDefault: !1
2401
+ }
2402
+ ], Tt = [
2403
+ {
2404
+ key: "structure",
2405
+ attribute: "lockStructure",
2406
+ modelDefault: !1,
2407
+ ooxmlDefault: !1
2408
+ },
2409
+ {
2410
+ key: "windows",
2411
+ attribute: "lockWindows",
2412
+ modelDefault: !1,
2413
+ ooxmlDefault: !1
2414
+ },
2415
+ {
2416
+ key: "revision",
2417
+ attribute: "lockRevision",
2418
+ modelDefault: !0,
2419
+ ooxmlDefault: !1
2420
+ }
2421
+ ], dt = (e, t) => {
2422
+ let r = e.ooxmlDefault;
2423
+ return "1" === t || "true" === t || "on" === t ? r = !0 : "0" !== t && "false" !== t && "off" !== t || (r = !1), !r;
2424
+ }, St = (e, t) => {
2425
+ const r = !(t ?? e.modelDefault);
2426
+ return r === e.ooxmlDefault ? null : r ? "1" : "0";
2427
+ };
2428
+ function ht(e) {
2429
+ if (void 0 === e) return;
2430
+ if (0 === e.trim().length) return e;
2431
+ const t = d(e);
2432
+ return void 0 !== t ? t : "=" + e;
2433
+ }
2434
+ function gt(e) {
2435
+ if (null == e) return;
2436
+ if ("number" == typeof e) return String(e);
2437
+ if ("boolean" == typeof e) return e ? "TRUE" : "FALSE";
2438
+ if (n.isError(e)) return e.getLabel();
2439
+ if ("string" == typeof e) return e.startsWith("=") ? e.slice(1) : mt(e);
2440
+ const t = e;
2441
+ if ("e" === t.t && "number" == typeof t.v) {
2442
+ const e = n.getBuiltInByCode(t.v);
2443
+ if (e) return e.getLabel();
2444
+ }
2445
+ return String(e);
2446
+ }
2447
+ function mt(e) {
2448
+ return `"${e.split("\"").join("\"\"")}"`;
2449
+ }
2450
+ var Rt = "aboveAverage", Ot = "beginsWith", It = "cellIs", xt = "colorScale", bt = "containsBlanks", yt = "containsErrors", Ct = "containsText", Nt = "dataBar", Lt = "duplicateValues", vt = "endsWith", Dt = "expression", Pt = "iconSet", Mt = "notContainsBlanks", Ft = "notContainsErrors", Bt = "notContainsText", wt = "timePeriod", Ut = "top10", kt = "uniqueValues", Vt = i.BuiltInOperatorNames, Gt = {
2451
+ equal: { operator: Vt.EqualTo },
2452
+ notEqual: {
2453
+ operator: Vt.EqualTo,
2454
+ negate: !0
2455
+ },
2456
+ greaterThan: { operator: Vt.GreaterThan },
2457
+ greaterThanOrEqual: { operator: Vt.GreaterThanEqualTo },
2458
+ lessThan: { operator: Vt.LessThan },
2459
+ lessThanOrEqual: { operator: Vt.LessThanEqualTo },
2460
+ between: { operator: Vt.Between },
2461
+ notBetween: {
2462
+ operator: Vt.Between,
2463
+ negate: !0
2464
+ }
2465
+ }, Wt = {
2466
+ [Vt.EqualTo]: {
2467
+ plain: "equal",
2468
+ negated: "notEqual"
2469
+ },
2470
+ [Vt.GreaterThan]: {
2471
+ plain: "greaterThan",
2472
+ negated: ""
2473
+ },
2474
+ [Vt.GreaterThanEqualTo]: {
2475
+ plain: "greaterThanOrEqual",
2476
+ negated: ""
2477
+ },
2478
+ [Vt.LessThan]: {
2479
+ plain: "lessThan",
2480
+ negated: ""
2481
+ },
2482
+ [Vt.LessThanEqualTo]: {
2483
+ plain: "lessThanOrEqual",
2484
+ negated: ""
2485
+ },
2486
+ [Vt.Between]: {
2487
+ plain: "between",
2488
+ negated: "notBetween"
2489
+ }
2490
+ }, Ht = /* @__PURE__ */ new Set([
2491
+ "today",
2492
+ "yesterday",
2493
+ "tomorrow",
2494
+ "last7Days",
2495
+ "thisMonth",
2496
+ "lastMonth",
2497
+ "nextMonth",
2498
+ "thisWeek",
2499
+ "lastWeek",
2500
+ "nextWeek"
2501
+ ]);
2502
+ function $t(e) {
2503
+ return ht(e);
2504
+ }
2505
+ function Yt(e) {
2506
+ return gt(e) ?? "";
2507
+ }
2508
+ function Xt(e, t) {
2509
+ return t ? {
2510
+ operator: Vt.Not,
2511
+ param: e
2512
+ } : e;
2513
+ }
2514
+ function _t(e, t) {
2515
+ const r = e.type;
2516
+ if (!r) return null;
2517
+ const n = e.formulas ?? [];
2518
+ switch (r) {
2519
+ case xt:
2520
+ case Nt:
2521
+ case Pt: return null;
2522
+ case It: {
2523
+ const r = e.operator ? Gt[e.operator] : void 0;
2524
+ if (!r) return t?.(`Conditional format operator '${e.operator}' is not a known cellIs operator.`), null;
2525
+ const o = r.operator === Vt.Between ? {
2526
+ from: $t(n[0]),
2527
+ to: $t(n[1])
2528
+ } : $t(n[0]);
2529
+ return Xt({
2530
+ operator: r.operator,
2531
+ param: o
2532
+ }, r.negate);
2533
+ }
2534
+ case Dt: return {
2535
+ operator: Vt.Expression,
2536
+ param: n[0] ?? ""
2537
+ };
2538
+ case Ct: return {
2539
+ operator: Vt.TextContains,
2540
+ param: e.text
2541
+ };
2542
+ case Bt: return Xt({
2543
+ operator: Vt.TextContains,
2544
+ param: e.text
2545
+ }, !0);
2546
+ case Ot: return {
2547
+ operator: Vt.TextStartsWith,
2548
+ param: e.text
2549
+ };
2550
+ case vt: return {
2551
+ operator: Vt.TextEndsWith,
2552
+ param: e.text
2553
+ };
2554
+ case bt: return { operator: Vt.Blank };
2555
+ case Mt: return Xt({ operator: Vt.Blank }, !0);
2556
+ case yt: return { operator: Vt.Error };
2557
+ case Ft: return Xt({ operator: Vt.Error }, !0);
2558
+ case kt: return { operator: Vt.Unique };
2559
+ case Lt: return Xt({ operator: Vt.Unique }, !0);
2560
+ case wt: {
2561
+ const t = {};
2562
+ return e.timePeriod && (t.type = e.timePeriod), {
2563
+ operator: Vt.TimePeriod,
2564
+ param: t
2565
+ };
2566
+ }
2567
+ case Ut: {
2568
+ const t = {
2569
+ top: !e.bottom,
2570
+ percent: e.percent ?? !1
2571
+ };
2572
+ return void 0 !== e.rank && (t.limit = e.rank), {
2573
+ operator: Vt.TopN,
2574
+ param: t
2575
+ };
2576
+ }
2577
+ case Rt: {
2578
+ const t = e.aboveAverage ?? !0, r = e.equalAverage ?? !1, n = { type: t ? r ? i.AverageType.AboveOrEqual : i.AverageType.Above : r ? i.AverageType.BelowOrEqual : i.AverageType.Below };
2579
+ return void 0 !== e.stdDev && (n.stdDevs = e.stdDev), {
2580
+ operator: Vt.Average,
2581
+ param: n
2582
+ };
2583
+ }
2584
+ default: return t?.(`Conditional format type '${r}' has no condition mapping.`), null;
2585
+ }
2586
+ }
2587
+ function Kt(e, t, r) {
2588
+ if (!e) return null;
2589
+ const n = e.operator === Vt.Not, o = (n ? e.param : e) ?? {}, a = o.operator, s = o.param;
2590
+ if (!a) return null;
2591
+ const l = Wt[a];
2592
+ if (l) {
2593
+ const e = n ? l.negated : l.plain;
2594
+ if (!e) return r?.(`Conditional format operator 'not(${a})' has no OOXML form.`), null;
2595
+ return {
2596
+ type: It,
2597
+ operator: e,
2598
+ formulas: a === Vt.Between ? [Yt(s?.from), Yt(s?.to)] : [Yt(s)]
2599
+ };
2600
+ }
2601
+ switch (a) {
2602
+ case Vt.Expression:
2603
+ if (n) break;
2604
+ return {
2605
+ type: Dt,
2606
+ formulas: [null == s ? "" : String(s)]
2607
+ };
2608
+ case Vt.TextContains: {
2609
+ const e = String(s ?? "");
2610
+ return n ? {
2611
+ type: Bt,
2612
+ text: e,
2613
+ formulas: [`ISERROR(SEARCH(${mt(e)},${t}))`]
2614
+ } : {
2615
+ type: Ct,
2616
+ text: e,
2617
+ formulas: [`NOT(ISERROR(SEARCH(${mt(e)},${t})))`]
2618
+ };
2619
+ }
2620
+ case Vt.TextStartsWith: {
2621
+ if (n) break;
2622
+ const e = String(s ?? "");
2623
+ return {
2624
+ type: Ot,
2625
+ text: e,
2626
+ formulas: [`LEFT(${t},LEN(${mt(e)}))=${mt(e)}`]
2627
+ };
2628
+ }
2629
+ case Vt.TextEndsWith: {
2630
+ if (n) break;
2631
+ const e = String(s ?? "");
2632
+ return {
2633
+ type: vt,
2634
+ text: e,
2635
+ formulas: [`RIGHT(${t},LEN(${mt(e)}))=${mt(e)}`]
2636
+ };
2637
+ }
2638
+ case Vt.Blank: return n ? {
2639
+ type: Mt,
2640
+ formulas: [`LEN(TRIM(${t}))>0`]
2641
+ } : {
2642
+ type: bt,
2643
+ formulas: [`LEN(TRIM(${t}))=0`]
2644
+ };
2645
+ case Vt.Error: return n ? {
2646
+ type: Ft,
2647
+ formulas: [`NOT(ISERROR(${t}))`]
2648
+ } : {
2649
+ type: yt,
2650
+ formulas: [`ISERROR(${t})`]
2651
+ };
2652
+ case Vt.Unique: return { type: n ? Lt : kt };
2653
+ case Vt.TimePeriod: {
2654
+ if (n) break;
2655
+ const e = s?.type;
2656
+ return e && !Ht.has(e) ? (r?.(`Conditional format time period '${e}' has no OOXML form; rule skipped.`), null) : {
2657
+ type: wt,
2658
+ timePeriod: e
2659
+ };
2660
+ }
2661
+ case Vt.TopN: {
2662
+ if (n) break;
2663
+ const e = s ?? {};
2664
+ return {
2665
+ type: Ut,
2666
+ bottom: !(e.top ?? 1),
2667
+ percent: e.percent ?? !1,
2668
+ rank: e.limit
2669
+ };
2670
+ }
2671
+ case Vt.Average: {
2672
+ if (n) break;
2673
+ const e = s ?? {}, t = e.type ?? i.AverageType.Above;
2674
+ return {
2675
+ type: Rt,
2676
+ aboveAverage: t === i.AverageType.Above || t === i.AverageType.AboveOrEqual,
2677
+ equalAverage: t === i.AverageType.AboveOrEqual || t === i.AverageType.BelowOrEqual,
2678
+ stdDev: e.stdDevs
2679
+ };
2680
+ }
2681
+ }
2682
+ return r?.(`Conditional format operator '${n ? `not(${a})` : a}' has no OOXML form.`), null;
2683
+ }
2684
+ var jt = /* @__PURE__ */ new Set([
2685
+ "today",
2686
+ "yesterday",
2687
+ "tomorrow",
2688
+ "thisWeek",
2689
+ "lastWeek",
2690
+ "nextWeek",
2691
+ "thisMonth",
2692
+ "lastMonth",
2693
+ "nextMonth",
2694
+ "thisQuarter",
2695
+ "lastQuarter",
2696
+ "nextQuarter",
2697
+ "thisYear",
2698
+ "lastYear",
2699
+ "nextYear",
2700
+ "yearToDate",
2701
+ "Q1",
2702
+ "Q2",
2703
+ "Q3",
2704
+ "Q4",
2705
+ "M1",
2706
+ "M2",
2707
+ "M3",
2708
+ "M4",
2709
+ "M5",
2710
+ "M6",
2711
+ "M7",
2712
+ "M8",
2713
+ "M9",
2714
+ "M10",
2715
+ "M11",
2716
+ "M12"
2717
+ ]);
2718
+ function zt(e) {
2719
+ return "aboveAverage" === e || "belowAverage" === e ? {
2720
+ operator: i.BuiltInOperatorNames.Average,
2721
+ param: { type: "aboveAverage" === e ? i.AverageType.Above : i.AverageType.Below }
2722
+ } : {
2723
+ operator: i.BuiltInOperatorNames.TimePeriod,
2724
+ param: { type: e ?? void 0 }
2725
+ };
2726
+ }
2727
+ var qt = "equal", Qt = "notEqual", Zt = "greaterThan", Jt = "greaterThanOrEqual", er = "lessThan", tr = "lessThanOrEqual", rr = i.BuiltInOperatorNames, nr = i.BuiltInSelectorNames.Display, or = (e) => {
2728
+ const t = e?.selector;
2729
+ return ("string" == typeof t ? t : t?.getName?.()) === nr;
2730
+ }, ar = {
2731
+ [qt]: { operator: rr.EqualTo },
2732
+ [Qt]: {
2733
+ operator: rr.EqualTo,
2734
+ negate: !0
2735
+ },
2736
+ [Zt]: { operator: rr.GreaterThan },
2737
+ [Jt]: { operator: rr.GreaterThanEqualTo },
2738
+ [er]: { operator: rr.LessThan },
2739
+ [tr]: { operator: rr.LessThanEqualTo }
2740
+ }, sr = {
2741
+ [rr.EqualTo]: {
2742
+ plain: qt,
2743
+ negated: Qt
2744
+ },
2745
+ [rr.GreaterThan]: {
2746
+ plain: Zt,
2747
+ negated: tr
2748
+ },
2749
+ [rr.GreaterThanEqualTo]: {
2750
+ plain: Jt,
2751
+ negated: er
2752
+ },
2753
+ [rr.LessThan]: {
2754
+ plain: er,
2755
+ negated: Jt
2756
+ },
2757
+ [rr.LessThanEqualTo]: {
2758
+ plain: tr,
2759
+ negated: Zt
2760
+ },
2761
+ [rr.After]: {
2762
+ plain: Zt,
2763
+ negated: tr
2764
+ },
2765
+ [rr.AfterEqualTo]: {
2766
+ plain: Jt,
2767
+ negated: er
2768
+ },
2769
+ [rr.Before]: {
2770
+ plain: er,
2771
+ negated: Jt
2772
+ },
2773
+ [rr.BeforeEqualTo]: {
2774
+ plain: tr,
2775
+ negated: Zt
2776
+ }
2777
+ }, ir = {
2778
+ [rr.TextStartsWith]: (e) => e + "*",
2779
+ [rr.TextEndsWith]: (e) => "*" + e,
2780
+ [rr.TextContains]: (e) => "*" + e + "*"
2781
+ };
2782
+ function lr(e) {
2783
+ if (!e) return !1;
2784
+ const t = e.operator === rr.Not, r = t ? e.param : e, n = r?.operator;
2785
+ return "string" == typeof n && (void 0 !== sr[n] || void 0 !== ir[n] || (n === rr.InSet ? null !== cr(r) : n === rr.Blank ? t : !t && void 0 !== ar[n]));
2786
+ }
2787
+ function cr(e) {
2788
+ if (!e || e.operator !== rr.InSet || e.includeBlanks || !or(e)) return null;
2789
+ const t = e.param;
2790
+ if (!t || t.blank || (t.dateGroups?.length ?? 0) > 0) return null;
2791
+ if (t.source || (t.additions?.length ?? 0) > 0 || (t.subtractions?.length ?? 0) > 0) return null;
2792
+ const r = t.items;
2793
+ return Array.isArray(r) && 1 === r.length && "string" == typeof r[0] ? r[0] : null;
2794
+ }
2795
+ function ur(e) {
2796
+ return e.replace(/[~*?]/g, "~$&");
2797
+ }
2798
+ function pr(e) {
2799
+ if (null == e || "" === e) return e ?? void 0;
2800
+ const t = Number(e);
2801
+ return Number.isFinite(t) ? t : e;
2802
+ }
2803
+ function Er(e) {
2804
+ if (null != e) return "boolean" == typeof e ? e ? "TRUE" : "FALSE" : "" + e;
2805
+ }
2806
+ function fr(e, t) {
2807
+ const r = e.val;
2808
+ if (null == r) return null;
2809
+ const n = e.operator ?? qt, o = ar[n];
2810
+ if (!o) return t?.(`AutoFilter operator '${n}' has no mapping; the rule is carried but inert.`), {
2811
+ operator: n,
2812
+ param: pr(r)
2813
+ };
2814
+ let a;
2815
+ if (o.operator === rr.EqualTo) {
2816
+ const e = ((e) => {
2817
+ const t = e.length;
2818
+ let r = "", n = !1, o = !1, a = !1;
2819
+ for (let s = 0; s < t; s++) {
2820
+ const i = e[s];
2821
+ if ("~" === i && s + 1 < t) {
2822
+ const t = e[s + 1];
2823
+ if ("*" === t || "?" === t || "~" === t) {
2824
+ r += t, s++;
2825
+ continue;
2826
+ }
2827
+ }
2828
+ "*" !== i ? "?" !== i ? r += i : a = !0 : 0 === s ? n = !0 : s === t - 1 ? o = !0 : a = !0;
2829
+ }
2830
+ return "" === r && (n || o) && (a = !0), {
2831
+ text: r,
2832
+ leading: n,
2833
+ trailing: o,
2834
+ other: a
2835
+ };
2836
+ })(r);
2837
+ if (e.other) return t?.(`AutoFilter pattern '${r}' has no operator; the rule is carried but inert.`), {
2838
+ operator: n,
2839
+ param: r
2840
+ };
2841
+ a = e.leading && e.trailing ? {
2842
+ operator: rr.TextContains,
2843
+ param: e.text
2844
+ } : e.leading ? {
2845
+ operator: rr.TextEndsWith,
2846
+ param: e.text
2847
+ } : e.trailing ? {
2848
+ operator: rr.TextStartsWith,
2849
+ param: e.text
2850
+ } : "" === e.text.trim() ? {
2851
+ selector: nr,
2852
+ operator: rr.Blank
2853
+ } : {
2854
+ selector: nr,
2855
+ operator: rr.EqualTo,
2856
+ param: e.text
2857
+ };
2858
+ } else a = {
2859
+ operator: o.operator,
2860
+ param: pr(r)
2861
+ };
2862
+ return o.negate ? {
2863
+ operator: rr.Not,
2864
+ param: a
2865
+ } : a;
2866
+ }
2867
+ function Ar(e) {
2868
+ const t = e?.operator;
2869
+ if (t !== rr.And && t !== rr.Or) return e;
2870
+ const r = e.param;
2871
+ if (!Array.isArray(r) || 2 !== r.length) return e;
2872
+ const [n, o] = r, a = n?.param;
2873
+ if ("number" != typeof a || o?.param !== a) return e;
2874
+ const s = [n.operator, o.operator], i = (e, t) => s.includes(e) && s.includes(t) && n.operator !== o.operator;
2875
+ return t === rr.And && i(rr.GreaterThanEqualTo, rr.LessThanEqualTo) ? {
2876
+ operator: rr.EqualTo,
2877
+ param: a
2878
+ } : t === rr.Or && i(rr.LessThan, rr.GreaterThan) ? {
2879
+ operator: rr.Not,
2880
+ param: {
2881
+ operator: rr.EqualTo,
2882
+ param: a
2883
+ }
2884
+ } : e;
2885
+ }
2886
+ function Tr(e) {
2887
+ if (!e) return null;
2888
+ const t = e.operator === rr.Not, r = (t ? e.param : e) ?? {};
2889
+ if (r.operator !== rr.EqualTo || "number" != typeof r.param || or(r)) return null;
2890
+ const n = Er(r.param);
2891
+ return t ? {
2892
+ and: !1,
2893
+ filters: [{
2894
+ operator: er,
2895
+ val: n
2896
+ }, {
2897
+ operator: Zt,
2898
+ val: n
2899
+ }]
2900
+ } : {
2901
+ and: !0,
2902
+ filters: [{
2903
+ operator: Jt,
2904
+ val: n
2905
+ }, {
2906
+ operator: tr,
2907
+ val: n
2908
+ }]
2909
+ };
2910
+ }
2911
+ function dr(e, t) {
2912
+ if (!e) return null;
2913
+ const r = e.operator === rr.Not, n = (r ? e.param : e) ?? {}, o = n.operator;
2914
+ if (!o) return null;
2915
+ const a = ir[o];
2916
+ if (a) return "string" != typeof n.param || "" === n.param ? (t?.(`AutoFilter operator '${o}' has no text; it was not written.`), null) : {
2917
+ operator: r ? Qt : qt,
2918
+ val: a(ur(n.param))
2919
+ };
2920
+ if (o === rr.EqualTo && or(n)) return "string" != typeof n.param ? (t?.("AutoFilter displays-as operand is not text; it was not written."), null) : {
2921
+ operator: r ? Qt : qt,
2922
+ val: ur(n.param)
2923
+ };
2924
+ if (o === rr.InSet) {
2925
+ const e = cr(n);
2926
+ return null === e ? (t?.("AutoFilter list with more than one item, date groups or blanks has no customFilter form."), null) : {
2927
+ operator: r ? Qt : qt,
2928
+ val: ur(e)
2929
+ };
2930
+ }
2931
+ if (o === rr.Blank) return r ? {
2932
+ operator: Qt,
2933
+ val: " "
2934
+ } : (t?.("AutoFilter blank criterion has no customFilter form; it is the blank attribute of a list."), null);
2935
+ const s = sr[o];
2936
+ if (!s) return !r && ar[o] ? {
2937
+ operator: o,
2938
+ val: Er(n.param)
2939
+ } : (t?.(`AutoFilter operator '${r ? `not(${o})` : o}' has no OOXML form.`), null);
2940
+ let i = Er(n.param);
2941
+ return o === rr.EqualTo && "string" == typeof n.param && (i = r && "" === n.param ? " " : ur(n.param)), {
2942
+ operator: r ? s.negated : s.plain,
2943
+ val: i
2944
+ };
2945
+ }
2946
+ function Sr(e) {
2947
+ if (!e || e.operator !== rr.EqualTo) return null;
2948
+ if (e.selector && !or(e)) return null;
2949
+ const t = e.param;
2950
+ return "string" == typeof t ? t.startsWith("=") ? null : t : "boolean" == typeof t ? Er(t) : null;
2951
+ }
2952
+ var hr = "custom", gr = "date", mr = "decimal", Rr = "list", Or = "none", Ir = "textLength", xr = "time", br = "whole", yr = i.BuiltInOperatorNames, Cr = i.BuiltInSelectorNames, Nr = {
2953
+ [br]: Cr.Whole,
2954
+ [mr]: Cr.Number,
2955
+ [gr]: Cr.Date,
2956
+ [xr]: Cr.Time,
2957
+ [Ir]: Cr.TextLength
2958
+ }, Lr = {
2959
+ [Cr.Whole]: br,
2960
+ [Cr.Number]: mr,
2961
+ [Cr.Date]: gr,
2962
+ [Cr.DateTime]: gr,
2963
+ [Cr.Time]: xr,
2964
+ [Cr.TextLength]: Ir
2965
+ }, vr = {
2966
+ between: { operator: yr.Between },
2967
+ notBetween: {
2968
+ operator: yr.Between,
2969
+ negate: !0
2970
+ },
2971
+ equal: { operator: yr.EqualTo },
2972
+ notEqual: {
2973
+ operator: yr.EqualTo,
2974
+ negate: !0
2975
+ },
2976
+ greaterThan: { operator: yr.GreaterThan },
2977
+ greaterThanOrEqual: { operator: yr.GreaterThanEqualTo },
2978
+ lessThan: { operator: yr.LessThan },
2979
+ lessThanOrEqual: { operator: yr.LessThanEqualTo }
2980
+ }, Dr = {
2981
+ [yr.GreaterThan]: yr.After,
2982
+ [yr.GreaterThanEqualTo]: yr.AfterEqualTo,
2983
+ [yr.LessThan]: yr.Before,
2984
+ [yr.LessThanEqualTo]: yr.BeforeEqualTo
2985
+ }, Pr = {
2986
+ [yr.Between]: {
2987
+ plain: "between",
2988
+ negated: "notBetween"
2989
+ },
2990
+ [yr.EqualTo]: {
2991
+ plain: "equal",
2992
+ negated: "notEqual"
2993
+ },
2994
+ [yr.GreaterThan]: {
2995
+ plain: "greaterThan",
2996
+ negated: ""
2997
+ },
2998
+ [yr.GreaterThanEqualTo]: {
2999
+ plain: "greaterThanOrEqual",
3000
+ negated: ""
3001
+ },
3002
+ [yr.LessThan]: {
3003
+ plain: "lessThan",
3004
+ negated: ""
3005
+ },
3006
+ [yr.LessThanEqualTo]: {
3007
+ plain: "lessThanOrEqual",
3008
+ negated: ""
3009
+ },
3010
+ [yr.After]: {
3011
+ plain: "greaterThan",
3012
+ negated: ""
3013
+ },
3014
+ [yr.AfterEqualTo]: {
3015
+ plain: "greaterThanOrEqual",
3016
+ negated: ""
3017
+ },
3018
+ [yr.Before]: {
3019
+ plain: "lessThan",
3020
+ negated: ""
3021
+ },
3022
+ [yr.BeforeEqualTo]: {
3023
+ plain: "lessThanOrEqual",
3024
+ negated: ""
3025
+ }
3026
+ };
3027
+ function Mr(e, t) {
3028
+ return t === Rr || t === hr ? e : ht(e);
3029
+ }
3030
+ function Fr(e) {
3031
+ return gt(e);
3032
+ }
3033
+ function Br(e, t, r) {
3034
+ if ("string" != typeof e || e.length <= 255) return e;
3035
+ let n = 255;
3036
+ const o = e.charCodeAt(n - 1);
3037
+ return o >= 55296 && o <= 56319 && n--, r?.(`DataValidation ${t} is ${e.length} characters; Excel opens no more than 255, so it is cut.`, `xlsx.dv.${t}.length`), e.substring(0, n);
3038
+ }
3039
+ function wr(e, t) {
3040
+ const n = e.type;
3041
+ if (!n || n === Or) return null;
3042
+ if (n === Rr) {
3043
+ const t = e.formula1;
3044
+ if (null == t) return {
3045
+ operator: yr.InSet,
3046
+ param: {}
3047
+ };
3048
+ const n = String(t), o = r.parseListLiteral(n);
3049
+ return {
3050
+ operator: yr.InSet,
3051
+ param: o ? { additions: o } : { source: n }
3052
+ };
3053
+ }
3054
+ if (n === hr) return {
3055
+ operator: yr.Expression,
3056
+ param: e.formula1
3057
+ };
3058
+ const o = Nr[n];
3059
+ if (!o) return t?.(`DataValidation type '${n}' has no selector mapping.`), null;
3060
+ const a = e.operator ?? "between", s = vr[a];
3061
+ if (!s) return t?.(`DataValidation operator '${a}' has no mapping; the rule is carried but inert.`), {
3062
+ selector: o,
3063
+ operator: a,
3064
+ param: e.formula1
3065
+ };
3066
+ const i = s.operator === yr.Between ? {
3067
+ from: e.formula1,
3068
+ to: e.formula2
3069
+ } : e.formula1, l = {
3070
+ operator: (n === gr || n === xr) && Dr[s.operator] || s.operator,
3071
+ param: i
3072
+ };
3073
+ return s.negate ? {
3074
+ selector: o,
3075
+ operator: yr.Not,
3076
+ param: l
3077
+ } : {
3078
+ selector: o,
3079
+ ...l
3080
+ };
3081
+ }
3082
+ function Ur(e, t) {
3083
+ if (!e) return null;
3084
+ const r = e.operator === yr.Not, n = (r ? e.param : e) ?? {}, o = n.operator, a = n.param;
3085
+ if (!o) return null;
3086
+ if (!r && (o === yr.InSet || o === Rr)) {
3087
+ e.selector && e.selector !== Cr.Display && t?.(`DataValidation list under a '${String(e.selector)}' selector has no OOXML form; it is written as a plain list.`, "xlsx.dv.listSelector");
3088
+ const r = function(e, t) {
3089
+ if ("string" == typeof e) return e;
3090
+ if (!e || "object" != typeof e) return;
3091
+ if ("string" == typeof e.items) return e.items;
3092
+ const r = e, n = [];
3093
+ for (const e of r.items ?? []) n.push("boolean" == typeof e ? e ? "TRUE" : "FALSE" : String(e ?? ""));
3094
+ for (const e of r.additions ?? []) n.push(e);
3095
+ (r.subtractions?.length ?? 0) > 0 && t?.("DataValidation list exclusions have no OOXML form; they are not written.", "xlsx.dv.listSubtractions");
3096
+ (r.dateGroups?.length ?? 0) > 0 && t?.("DataValidation list date groups have no OOXML form; they are not written.", "xlsx.dv.listDateGroups");
3097
+ const o = "string" == typeof r.source ? r.source : void 0;
3098
+ if (void 0 !== o && o.trim().length > 0) return n.length > 0 && t?.(`DataValidation list '${o}' also holds typed values, which OOXML cannot say beside a source; only the source is written.`, "xlsx.dv.listSourceAndTyped"), o;
3099
+ n.some((e) => e.includes(",")) && t?.("DataValidation list holds an item with a ',', which a list literal splits in two.", "xlsx.dv.listItemComma");
3100
+ return `"${n.join(",").replace(/"/g, "\"\"")}"`;
3101
+ }(a, t);
3102
+ return "string" == typeof r && function(e) {
3103
+ const t = e.startsWith("=") ? e.substring(1) : e, r = [];
3104
+ let n = !1;
3105
+ for (let e = 0; e < t.length; e++) {
3106
+ const o = t[e];
3107
+ if ("\"" !== o && "'" !== o) if ("{" !== o) if ("(" !== o) if (")" !== o) if ("," !== o) n = /[A-Za-z0-9_.$!\]]/.test(o);
3108
+ else {
3109
+ if (0 === r.length || !r[r.length - 1]) return !0;
3110
+ n = !1;
3111
+ }
3112
+ else r.pop(), n = !0;
3113
+ else r.push(n), n = !1;
3114
+ else {
3115
+ for (; e < t.length && "}" !== t[e];) e++;
3116
+ n = !1;
3117
+ }
3118
+ else {
3119
+ for (e++; e < t.length;) {
3120
+ if (t[e] === o) {
3121
+ if (t[e + 1] !== o) break;
3122
+ e++;
3123
+ }
3124
+ e++;
3125
+ }
3126
+ n = "'" === o;
3127
+ }
3128
+ }
3129
+ return !1;
3130
+ }(r) ? (t?.(`DataValidation list source '${r}' is a union, which Excel cannot open; the rule is written without its list.`, "xlsx.dv.listUnion"), null) : {
3131
+ type: Rr,
3132
+ formula1: r
3133
+ };
3134
+ }
3135
+ if (!r && (o === yr.Expression || o === hr)) return {
3136
+ type: hr,
3137
+ formula1: "string" == typeof a ? a : a?.formula ?? a?.formula1
3138
+ };
3139
+ const s = Pr[o];
3140
+ if (!s) return !r && vr[o] ? {
3141
+ type: kr(e.selector),
3142
+ operator: o,
3143
+ formula1: Fr(a?.from ?? a),
3144
+ formula2: Fr(a?.to)
3145
+ } : (t?.(`DataValidation operator '${r ? `not(${o})` : o}' has no OOXML form.`), null);
3146
+ const i = r ? s.negated : s.plain;
3147
+ return i ? {
3148
+ type: kr(e.selector),
3149
+ operator: i,
3150
+ formula1: Fr(o === yr.Between ? a?.from : a),
3151
+ formula2: o === yr.Between ? Fr(a?.to) : void 0
3152
+ } : (t?.(`DataValidation operator 'not(${o})' has no OOXML form.`), null);
3153
+ }
3154
+ function kr(e) {
3155
+ return (e ? Lr[e] : void 0) ?? mr;
3156
+ }
3157
+ var Vr = (e) => {
3158
+ const t = {};
3159
+ for (const [r, n] of Object.entries(e)) t[n] = r;
3160
+ return {
3161
+ read: (t) => e[t] ?? t,
3162
+ write: (e) => void 0 === e ? void 0 : t[e] ?? e
3163
+ };
3164
+ }, Gr = Object.freeze({
3165
+ sp: p.Type.Shape,
3166
+ cxnSp: p.Type.Connector
3167
+ }), Wr = Vr({
3168
+ l: E.ParagraphAlignment.Left,
3169
+ ctr: E.ParagraphAlignment.Center,
3170
+ r: E.ParagraphAlignment.Right,
3171
+ just: E.ParagraphAlignment.Justify,
3172
+ justLow: E.ParagraphAlignment.JustifyLow,
3173
+ dist: E.ParagraphAlignment.Distributed,
3174
+ thaiDist: E.ParagraphAlignment.ThaiDistributed
3175
+ }), Hr = Vr({
3176
+ auto: E.FontAlignment.Auto,
3177
+ t: E.FontAlignment.Top,
3178
+ ctr: E.FontAlignment.Center,
3179
+ base: E.FontAlignment.Baseline,
3180
+ b: E.FontAlignment.Bottom
3181
+ }), $r = Vr({
3182
+ t: f.VerticalAlignment.Top,
3183
+ ctr: f.VerticalAlignment.Center,
3184
+ b: f.VerticalAlignment.Bottom,
3185
+ just: f.VerticalAlignment.Justify,
3186
+ dist: f.VerticalAlignment.Distributed
3187
+ }), Yr = Vr({
3188
+ none: E.UnderlineStyle.None,
3189
+ words: E.UnderlineStyle.Words,
3190
+ sng: E.UnderlineStyle.Single,
3191
+ dbl: E.UnderlineStyle.Double,
3192
+ heavy: E.UnderlineStyle.Heavy,
3193
+ dotted: E.UnderlineStyle.Dotted,
3194
+ dottedHeavy: E.UnderlineStyle.DottedHeavy,
3195
+ dash: E.UnderlineStyle.Dash,
3196
+ dashHeavy: E.UnderlineStyle.DashHeavy,
3197
+ dashLong: E.UnderlineStyle.DashLong,
3198
+ dashLongHeavy: E.UnderlineStyle.DashLongHeavy,
3199
+ dotDash: E.UnderlineStyle.DotDash,
3200
+ dotDashHeavy: E.UnderlineStyle.DotDashHeavy,
3201
+ dotDotDash: E.UnderlineStyle.DotDotDash,
3202
+ dotDotDashHeavy: E.UnderlineStyle.DotDotDashHeavy,
3203
+ wavy: E.UnderlineStyle.Wavy,
3204
+ wavyHeavy: E.UnderlineStyle.WavyHeavy,
3205
+ wavyDbl: E.UnderlineStyle.WavyDouble
3206
+ }), Xr = Vr({
3207
+ noStrike: E.StrikeStyle.None,
3208
+ sngStrike: E.StrikeStyle.Single,
3209
+ dblStrike: E.StrikeStyle.Double
3210
+ }), _r = Vr({
3211
+ horz: f.WritingMode.Horizontal,
3212
+ vert: f.WritingMode.Vertical,
3213
+ vert270: f.WritingMode.Vertical270,
3214
+ wordArtVert: f.WritingMode.WordArtVertical,
3215
+ eaVert: f.WritingMode.EastAsianVertical,
3216
+ mongolianVert: f.WritingMode.MongolianVertical,
3217
+ wordArtVertRtl: f.WritingMode.WordArtVerticalRtl
3218
+ }), Kr = Vr({
3219
+ overflow: f.Overflow.Visible,
3220
+ ellipsis: f.Overflow.Ellipsis,
3221
+ clip: f.Overflow.Clip
3222
+ }), jr = Vr({
3223
+ l: f.TabStopAlignment.Left,
3224
+ ctr: f.TabStopAlignment.Center,
3225
+ r: f.TabStopAlignment.Right,
3226
+ dec: f.TabStopAlignment.Decimal
3227
+ }), zr = (e) => void 0 === e ? void 0 : String(e > 127 ? e - 256 : e), qr = h({
3228
+ isBlank: () => rn,
3229
+ isNotBlank: () => nn,
3230
+ length: () => on,
3231
+ parseRotation: () => Qr,
3232
+ parseValAttrAsBoolean: () => Jr,
3233
+ parseValAttrAsFloat: () => tn,
3234
+ parseValAttrAsInteger: () => en,
3235
+ parseValAttrAsString: () => Zr
3236
+ }), Qr = (t, r) => {
3237
+ if (!t || !t.hasAttribute("rot")) return;
3238
+ const n = t.getAttribute("rot"), o = e.roundAccurately(Je(n), 2);
3239
+ -1e3 !== o && (r.rotation = o);
3240
+ }, Zr = (e, t, r, n, o) => {
3241
+ const a = e.getValAttrAsString(n, t);
3242
+ null !== a && (r[o] = a);
3243
+ }, Jr = (e, t, r, n, o = n, a = null) => {
3244
+ const s = e.getValAttrAsBoolean(n, t, a);
3245
+ null !== s && (r[o] = s);
3246
+ }, en = (e, t, r, n, o) => {
3247
+ const a = e.getValAttrAsInteger(n, t);
3248
+ null !== a && (r[o] = a);
3249
+ }, tn = (e, t, r, n, o, a = 1) => {
3250
+ const s = e.getValAttrAsFloat(n, t);
3251
+ null !== s && (r[o] = s * a);
3252
+ }, rn = (e) => !e || 0 === e.trim().length, nn = (e) => !rn(e), on = (e) => e?.length ?? 0, an = (e) => {
3253
+ const t = [], r = e.childNodes;
3254
+ for (let e = 0; e < r.length; e++) {
3255
+ const n = r.item(e);
3256
+ 1 === n.nodeType && t.push(n);
3257
+ }
3258
+ return t;
3259
+ }, sn = (e, t) => an(e).find((e) => e.localName === t), ln = (e, t) => e ? an(e).filter((e) => e.localName === t) : [], cn = (e) => `${e.getAttribute("name") ?? ""} ${(e.getAttribute("fmla") ?? "").trim()}`.trim(), un = (e) => {
3260
+ const t = sn(e, "pos");
3261
+ return [t?.getAttribute("x") ?? "0", t?.getAttribute("y") ?? "0"];
3262
+ }, pn = (e, t) => e.getAttribute(t) ?? "_", En = (e, t) => {
3263
+ const r = t.map((t) => pn(e, t));
3264
+ return r.every((e) => "_" === e) ? "" : ` ${r.join(" ")}`;
3265
+ }, fn = {
3266
+ moveTo: "M",
3267
+ lnTo: "L",
3268
+ quadBezTo: "Q",
3269
+ cubicBezTo: "C",
3270
+ arcTo: "A",
3271
+ close: "Z"
3272
+ }, An = (e) => {
3273
+ const t = [];
3274
+ for (const r of an(e)) {
3275
+ const e = fn[r.localName];
3276
+ if (e) if ("A" === e) t.push(`A ${pn(r, "wR")} ${pn(r, "hR")} ${pn(r, "stAng")} ${pn(r, "swAng")}`);
3277
+ else if ("Z" === e) t.push("Z");
3278
+ else {
3279
+ const n = ln(r, "pt").map((e) => `${e.getAttribute("x") ?? "0"} ${e.getAttribute("y") ?? "0"}`);
3280
+ t.push(`${e} ${n.join(" ")}`);
3281
+ }
3282
+ }
3283
+ const r = { d: t.join(" ") }, n = e.getAttribute("fill");
3284
+ n && "norm" !== n && (r.f = n);
3285
+ const o = e.getAttribute("stroke");
3286
+ "0" !== o && "false" !== o || (r.s = 0);
3287
+ const a = e.getAttribute("w"), s = e.getAttribute("h");
3288
+ return null !== a && null !== s && (r.w = Number(a), r.h = Number(s)), r;
3289
+ }, Tn = class {
3290
+ visit(e, t, r) {}
3291
+ getStroke(e, t) {
3292
+ const r = e.evaluate("ln", t);
3293
+ return r ? this.parseLn(e, r) : {};
3294
+ }
3295
+ parseLn(e, t) {
3296
+ const r = {};
3297
+ t.hasAttribute("algn") && (r.align = t.getAttribute("algn")), t.hasAttribute("cap") && (r.lineCap = Sn(t.getAttribute("cap"))), t.hasAttribute("cmpd") && (r.compound = t.getAttribute("cmpd")), t.hasAttribute("w") && (r.width = ze(t.getAttribute("w")));
3298
+ const n = e.evaluate("miter", t);
3299
+ n && (r.lineJoin = "miter", n.hasAttribute("lim") && (r.miterLimit = parseFloat(n.getAttribute("lim")) / 1e5)), e.evaluate("bevel", t) && (r.lineJoin = "bevel"), e.evaluate("round", t) && (r.lineJoin = "round");
3300
+ const o = e.evaluate("custDash", t);
3301
+ if (o) {
3302
+ const t = e.evaluate("ds", o);
3303
+ if (t && t.length > 0) {
3304
+ const e = [];
3305
+ for (let r = 0; r < t.length; r++) {
3306
+ const n = t.item(r);
3307
+ e.push(Ze(n.getAttribute("d") ?? "")), e.push(Ze(n.getAttribute("sp") ?? ""));
3308
+ }
3309
+ r.dash = e;
3310
+ }
3311
+ }
3312
+ const a = e.evaluate("prstDash", t);
3313
+ a && a.hasAttribute("val") && (r.dash = a.getAttribute("val")), this.parseEndElement(e, t, r, "headEnd", "head"), this.parseEndElement(e, t, r, "tailEnd", "tail");
3314
+ const s = this.getFill(e, t);
3315
+ s && (r.fill = s);
3316
+ const i = e.evaluate("extLst", t), l = i ? e.serializeElement(i) : null;
3317
+ return l && (r.extLst = l), r;
3318
+ }
3319
+ parseEndElement(e, t, r, n, o) {
3320
+ const a = e.evaluate(n, t);
3321
+ a && (a.hasAttribute("type") && (r[o + "Type"] = a.getAttribute("type")), a.hasAttribute("w") && (r[o + "Width"] = a.getAttribute("w")), a.hasAttribute("len") && (r[o + "Length"] = a.getAttribute("len")));
3322
+ }
3323
+ getEffects(e, t) {
3324
+ const r = e.evaluate("effectLst", t);
3325
+ if (!r) return null;
3326
+ const n = [], o = r.childNodes, a = o.length;
3327
+ for (let t = 0; t < a; t++) {
3328
+ const r = o.item(t);
3329
+ if (1 !== r.nodeType) continue;
3330
+ const a = this.processEffectElement(e, r, r.localName);
3331
+ if (void 0 === a) return;
3332
+ n.push(a);
3333
+ }
3334
+ return n;
3335
+ }
3336
+ processEffectElement(e, t, r) {
3337
+ switch (r) {
3338
+ case "outerShdw": {
3339
+ const r = {
3340
+ type: l.Type.OuterShadow,
3341
+ color: this.processAdjColor(e, t)
3342
+ };
3343
+ t.hasAttribute("dist") && (r.distance = ze(t.getAttribute("dist"))), t.hasAttribute("dir") && (r.angle = Je(t.getAttribute("dir"))), t.hasAttribute("blurRad") && (r.blur = ze(t.getAttribute("blurRad")));
3344
+ const n = gn(t.getAttribute("algn"));
3345
+ return n && (r.alignment = n), t.hasAttribute("rotWithShape") && (r.isRotatedWithShape = et(t.getAttribute("rotWithShape"))), t.hasAttribute("sx") && (r.scaleX = Ze(t.getAttribute("sx"))), t.hasAttribute("sy") && (r.scaleY = Ze(t.getAttribute("sy"))), t.hasAttribute("kx") && (r.skewX = Je(t.getAttribute("kx"))), t.hasAttribute("ky") && (r.skewY = Je(t.getAttribute("ky"))), r;
3346
+ }
3347
+ case "innerShdw": {
3348
+ const r = {
3349
+ type: l.Type.InnerShadow,
3350
+ color: this.processAdjColor(e, t)
3351
+ };
3352
+ return t.hasAttribute("dist") && (r.distance = ze(t.getAttribute("dist"))), t.hasAttribute("dir") && (r.angle = Je(t.getAttribute("dir"))), t.hasAttribute("blurRad") && (r.blur = ze(t.getAttribute("blurRad"))), r;
3353
+ }
3354
+ case "prstShdw": {
3355
+ const r = {
3356
+ type: l.Type.PresetShadow,
3357
+ color: this.processAdjColor(e, t),
3358
+ preset: t.getAttribute("prst") ?? void 0
3359
+ };
3360
+ return t.hasAttribute("dist") && (r.distance = ze(t.getAttribute("dist"))), t.hasAttribute("dir") && (r.angle = Je(t.getAttribute("dir"))), r;
3361
+ }
3362
+ case "glow": {
3363
+ const r = {
3364
+ type: l.Type.Glow,
3365
+ color: this.processAdjColor(e, t)
3366
+ };
3367
+ return t.hasAttribute("rad") && (r.radius = ze(t.getAttribute("rad"))), r;
3368
+ }
3369
+ case "softEdge": {
3370
+ const e = { type: l.Type.SoftEdge };
3371
+ return t.hasAttribute("rad") && (e.radius = ze(t.getAttribute("rad"))), e;
3372
+ }
3373
+ case "reflection": {
3374
+ const e = { type: l.Type.Reflection };
3375
+ t.hasAttribute("blurRad") && (e.blur = ze(t.getAttribute("blurRad"))), t.hasAttribute("dist") && (e.distance = ze(t.getAttribute("dist"))), t.hasAttribute("dir") && (e.angle = Je(t.getAttribute("dir"))), t.hasAttribute("fadeDir") && (e.fadeAngle = Je(t.getAttribute("fadeDir"))), t.hasAttribute("stA") && (e.startAlpha = Ze(t.getAttribute("stA"))), t.hasAttribute("stPos") && (e.startPosition = Ze(t.getAttribute("stPos"))), t.hasAttribute("endA") && (e.endAlpha = Ze(t.getAttribute("endA"))), t.hasAttribute("endPos") && (e.endPosition = Ze(t.getAttribute("endPos"))), t.hasAttribute("sx") && (e.scaleX = Ze(t.getAttribute("sx"))), t.hasAttribute("sy") && (e.scaleY = Ze(t.getAttribute("sy"))), t.hasAttribute("kx") && (e.skewX = Je(t.getAttribute("kx"))), t.hasAttribute("ky") && (e.skewY = Je(t.getAttribute("ky")));
3376
+ const r = gn(t.getAttribute("algn"));
3377
+ return r && (e.alignment = r), t.hasAttribute("rotWithShape") && (e.isRotatedWithShape = et(t.getAttribute("rotWithShape"))), e;
3378
+ }
3379
+ default: return;
3380
+ }
3381
+ }
3382
+ getFill(e, t) {
3383
+ if (e.evaluate("noFill", t)) return { type: c.Type.None };
3384
+ const r = e.evaluate("solidFill", t);
3385
+ if (r) {
3386
+ const t = this.processAdjColor(e, r);
3387
+ if (t) return {
3388
+ type: c.Type.Solid,
3389
+ color: t
3390
+ };
3391
+ }
3392
+ const n = e.evaluate("gradFill", t);
3393
+ if (n) return this.processGradFill(e, n);
3394
+ const o = e.evaluate("pattFill", t);
3395
+ if (o) return this.processPatternFill(e, o);
3396
+ const a = e.evaluate("blipFill", t);
3397
+ return a ? this.processImageFill(e, a) : e.evaluate("grpFill", t) ? { type: c.Type.Group } : null;
3398
+ }
3399
+ processGradFill(e, t) {
3400
+ const r = { type: c.Type.Gradient };
3401
+ t.hasAttribute("rotWithShape") && (r.isRotatedWithShape = "1" === t.getAttribute("rotWithShape"));
3402
+ const n = e.evaluate("lin", t);
3403
+ n && (r.gradientType = c.GradientType.Linear, n.hasAttribute("ang") && (r.angle = (Je(n.getAttribute("ang")) + 90) % 360), n.hasAttribute("scaled") && (r.scaled = et(n.getAttribute("scaled"))));
3404
+ const o = Rn(t.getAttribute("flip"));
3405
+ o && (r.flip = o);
3406
+ const a = e.evaluate("path", t);
3407
+ if (a) {
3408
+ a.hasAttribute("path") && (r.gradientType = dn(a.getAttribute("path")));
3409
+ const t = e.evaluate("fillToRect", a);
3410
+ if (t) {
3411
+ const e = this.getFocus(t);
3412
+ e && (r.focus = e);
3413
+ }
3414
+ }
3415
+ const s = e.evaluate("tileRect", t);
3416
+ s && (r.tileRect = this.getRectInsets(s));
3417
+ const i = [], l = e.evaluate("gsLst/gs", t), u = l ? l.length : 0;
3418
+ for (let t = 0; t < u; t++) {
3419
+ const r = l.item(t), n = {
3420
+ offset: Ze(r.getAttribute("pos") ?? "") / 100,
3421
+ color: this.processAdjColor(e, r)
3422
+ };
3423
+ i.push(n);
3424
+ }
3425
+ return i.length > 0 && (r.stops = i), r;
3426
+ }
3427
+ getFocus(e) {
3428
+ const t = (t) => e.hasAttribute(t) ? Ze(e.getAttribute(t)) / 100 : 0;
3429
+ return [
3430
+ "l",
3431
+ "t",
3432
+ "r",
3433
+ "b"
3434
+ ].some((t) => e.hasAttribute(t)) ? {
3435
+ left: t("l"),
3436
+ top: t("t"),
3437
+ right: 1 - t("r"),
3438
+ bottom: 1 - t("b")
3439
+ } : null;
3440
+ }
3441
+ processImageFill(e, t) {
3442
+ const r = { type: c.Type.Image };
3443
+ if (t.hasAttribute("rotWithShape") && (r.isRotatedWithShape = et(t.getAttribute("rotWithShape"))), t.hasAttribute("dpi")) {
3444
+ const e = parseFloat(t.getAttribute("dpi"));
3445
+ isNaN(e) || (r.dpi = e);
3446
+ }
3447
+ const n = e.evaluate("blip", t);
3448
+ if (n) {
3449
+ const t = n.getAttribute("r:embed") ?? n.getAttribute("embed") ?? n.getAttribute("r:link") ?? n.getAttribute("link"), o = t ? e.getRef(t, !0) : null;
3450
+ "number" == typeof o ? r.resId = o : e.warn("An image fill names no image; the shape is filled with nothing.", { onceKey: "xlsx.drawing.imageFill.noRel" }), n.hasAttribute("cstate") && (r.compressionState = n.getAttribute("cstate"));
3451
+ const a = n.childNodes;
3452
+ for (let t = 0; t < a.length; t++) {
3453
+ const n = a.item(t);
3454
+ if (1 === n.nodeType) if ("extLst" === n.localName) {
3455
+ const t = e.serializeElement(n);
3456
+ t && (r.extLst = t);
3457
+ } else e.warn(`An image fill applies an effect to its image (${n.localName}), which is not modeled; it was not imported.`, { onceKey: "xlsx.drawing.imageFill.blipEffect" });
3458
+ }
3459
+ }
3460
+ const o = e.evaluate("srcRect", t);
3461
+ o && (r.sourceRect = this.getRectInsets(o));
3462
+ const a = e.evaluate("stretch", t);
3463
+ if (a) {
3464
+ const t = e.evaluate("fillRect", a);
3465
+ r.stretch = t ? this.getRectInsets(t) : {};
3466
+ }
3467
+ const s = e.evaluate("tile", t);
3468
+ if (s) {
3469
+ const e = {};
3470
+ s.hasAttribute("tx") && (e.offsetX = qe(s.getAttribute("tx")) ?? 0), s.hasAttribute("ty") && (e.offsetY = qe(s.getAttribute("ty")) ?? 0), s.hasAttribute("sx") && (e.scaleX = Ze(s.getAttribute("sx"))), s.hasAttribute("sy") && (e.scaleY = Ze(s.getAttribute("sy")));
3471
+ const t = Rn(s.getAttribute("flip"));
3472
+ t && (e.flip = t);
3473
+ const n = gn(s.getAttribute("algn"));
3474
+ n && (e.alignment = n), r.tile = e;
3475
+ }
3476
+ return r;
3477
+ }
3478
+ getRectInsets(e) {
3479
+ const t = {};
3480
+ for (const [r, n] of [
3481
+ ["l", "left"],
3482
+ ["t", "top"],
3483
+ ["r", "right"],
3484
+ ["b", "bottom"]
3485
+ ]) e.hasAttribute(r) && (t[n] = Ze(e.getAttribute(r)));
3486
+ return t;
3487
+ }
3488
+ processPatternFill(e, t) {
3489
+ const r = { type: c.Type.Pattern };
3490
+ r.patternType = t.getAttribute("prst");
3491
+ const n = e.evaluate("bgClr", t);
3492
+ if (n) {
3493
+ const t = this.processAdjColor(e, n);
3494
+ t && (r.background = t);
3495
+ }
3496
+ const o = e.evaluate("fgClr", t);
3497
+ if (o) {
3498
+ let t = this.processAdjColor(e, o);
3499
+ t && (r.foreground = t);
3500
+ }
3501
+ return r;
3502
+ }
3503
+ processAdjColor(e, t) {
3504
+ const r = e.evaluate("hslClr", t);
3505
+ if (r) return this.processHslClr(e, r);
3506
+ const n = e.evaluate("prstClr", t);
3507
+ if (n) return this.processClrWithValAttribute(e, n);
3508
+ const o = e.evaluate("schemeClr", t);
3509
+ if (o) return this.processClrWithValAttribute(e, o);
3510
+ const a = e.evaluate("sysClr", t);
3511
+ if (a) {
3512
+ let t = this.processClrWithValAttribute(e, a);
3513
+ const r = a.getAttribute("lastClr");
3514
+ return t && r && (t += ` lastClr ${r}`), t;
3515
+ }
3516
+ const s = e.evaluate("scrgbClr", t);
3517
+ if (s) return this.processScrgbClrElement(e, s);
3518
+ const i = e.evaluate("srgbClr", t);
3519
+ return i ? this.processSrgbClrElement(e, i) : null;
3520
+ }
3521
+ processScrgbClrElement(e, t) {
3522
+ let r = "lrgb(" + Ze(t.getAttribute("r") ?? "") + "," + Ze(t.getAttribute("g") ?? "") + "," + Ze(t.getAttribute("b") ?? "") + ")";
3523
+ return r += this.processAdjustments(e, t), r;
3524
+ }
3525
+ processSrgbClrElement(e, t) {
3526
+ let r = t.getAttribute("val");
3527
+ return r += this.processAdjustments(e, t), r;
3528
+ }
3529
+ processHslClr(e, t) {
3530
+ let r = "hsl(" + Je(t.getAttribute("hue") ?? "") + "," + Ze(t.getAttribute("sat") ?? "") + "," + Ze(t.getAttribute("lum") ?? "") + ")";
3531
+ return r += this.processAdjustments(e, t), r;
3532
+ }
3533
+ processClrWithValAttribute(e, t) {
3534
+ const r = t.getAttribute("val");
3535
+ if (!r) return null;
3536
+ let n = r;
3537
+ return n += this.processAdjustments(e, t), n;
3538
+ }
3539
+ processAdjustments(e, t) {
3540
+ let r = "";
3541
+ const n = t.childNodes, o = n.length;
3542
+ for (let t = 0; t < o; t++) {
3543
+ const o = n.item(t);
3544
+ if (1 === o.nodeType) {
3545
+ let t = o.localName;
3546
+ r += "hue" === t || "hueOff" === t || "hueMod" === t ? this.processAdjustmentElement(e, o, t, 6e4) : "gray" === t || "comp" === t || "inv" === t || "gamma" === t || "invGamma" === t ? this.processAdjustmentElement(e, o, t, 1) : "alpha" === t || "alphaOff" === t || "alphaMod" === t ? this.processAdjustmentElement(e, o, t, 1e5) : this.processAdjustmentElement(e, o, t);
3547
+ }
3548
+ }
3549
+ return r;
3550
+ }
3551
+ processAdjustmentElement(e, t, r, n = 1e3) {
3552
+ const o = t.getAttribute("val");
3553
+ return o ? ` ${r} ${!o || parseFloat(o) / n}` : ` ${r}`;
3554
+ }
3555
+ }, dn = (e) => "circle" === e ? c.GradientType.Path : e, Sn = (e) => {
3556
+ if ("rnd" === e) return "round";
3557
+ if ("flat" === e) return "butt";
3558
+ if ("sq" === e) return "square";
3559
+ throw new Error("Invalid lineCap type: " + e);
3560
+ }, hn = new Set(Object.values(A)), gn = (e) => null !== e && hn.has(e) ? e : void 0, mn = new Set(Object.values(c.TileFlip)), Rn = (e) => null !== e && mn.has(e) ? e : void 0, On = /\/(?:\w+:)?(?:sp|cxnSp)\/(?:\w+:)?spPr$/, In = /\/(?:\w+:)?grpSp\//, xn = class extends Tn {
3561
+ visit(e, t, r) {
3562
+ try {
3563
+ const n = e.evaluate("xfrm", t);
3564
+ if (n) {
3565
+ Qr(n, r), "1" === n.getAttribute("flipH") && (r.flipH = !0), "1" === n.getAttribute("flipV") && (r.flipV = !0);
3566
+ const t = {
3567
+ x: 0,
3568
+ y: 0,
3569
+ width: 0,
3570
+ height: 0
3571
+ }, o = e.evaluate("off", n);
3572
+ o && (t.x = qe(o.getAttribute("x")) ?? 0, t.y = qe(o.getAttribute("y")) ?? 0);
3573
+ const a = e.evaluate("ext", n);
3574
+ o && (t.width = qe(a.getAttribute("cx")) ?? 0, t.height = qe(a.getAttribute("cy")) ?? 0);
3575
+ const s = e.getPath();
3576
+ On.test(s) && !In.test(s) || (r.bounds = t);
3577
+ }
3578
+ const o = e.evaluate("prstGeom", t);
3579
+ if (o?.hasAttribute("prst")) {
3580
+ const t = o.getAttribute("prst");
3581
+ "rect" !== t && (r.geometry = t);
3582
+ const n = e.evaluate("avLst/gd", o), a = n ? "tagName" in n ? [n] : Array.from(n) : [];
3583
+ let s;
3584
+ for (const e of a) {
3585
+ const t = e.getAttribute("name"), r = /^\s*val\s+(-?\d+(?:\.\d+)?)\s*$/.exec(e.getAttribute("fmla") ?? "");
3586
+ t && r && ((s ??= {})[t] = Number(r[1]));
3587
+ }
3588
+ s && (r.adjustments = s);
3589
+ } else {
3590
+ const n = e.evaluate("custGeom", t);
3591
+ n && (r.geometry = ((e) => {
3592
+ const t = { paths: [] }, r = ln(sn(e, "avLst"), "gd").map(cn);
3593
+ r.length && (t.av = r);
3594
+ const n = ln(sn(e, "gdLst"), "gd").map(cn);
3595
+ n.length && (t.gd = n);
3596
+ const o = sn(e, "ahLst"), a = o ? an(o).map((e) => {
3597
+ const [t, r] = un(e);
3598
+ return "ahXY" === e.localName ? `xy ${pn(e, "gdRefX")} ${pn(e, "gdRefY")} ${t} ${r}${En(e, [
3599
+ "minX",
3600
+ "maxX",
3601
+ "minY",
3602
+ "maxY"
3603
+ ])}` : "ahPolar" === e.localName ? `polar ${pn(e, "gdRefR")} ${pn(e, "gdRefAng")} ${t} ${r}${En(e, [
3604
+ "minR",
3605
+ "maxR",
3606
+ "minAng",
3607
+ "maxAng"
3608
+ ])}` : null;
3609
+ }).filter((e) => null !== e) : [];
3610
+ a.length && (t.ah = a);
3611
+ const s = ln(sn(e, "cxnLst"), "cxn").map((e) => {
3612
+ const [t, r] = un(e);
3613
+ return `${e.getAttribute("ang") ?? "0"} ${t} ${r}`;
3614
+ });
3615
+ s.length && (t.cxn = s);
3616
+ const i = sn(e, "rect");
3617
+ return i && (t.rect = `${pn(i, "l")} ${pn(i, "t")} ${pn(i, "r")} ${pn(i, "b")}`), t.paths = ln(sn(e, "pathLst"), "path").map(An), t;
3618
+ })(n));
3619
+ }
3620
+ const a = this.getFill(e, t);
3621
+ a && Object.keys(a).length > 0 && (r.fill = a);
3622
+ const s = this.getStroke(e, t);
3623
+ s && Object.keys(s).length > 0 && (r.stroke = s);
3624
+ const i = this.getEffects(e, t);
3625
+ i ? r.effects = i : void 0 === i && e.warn("A shape states an effect that is not modeled; its effects were not imported.", { onceKey: "xlsx.shape.effects.unmodeled" });
3626
+ const l = e.evaluate("scene3d", t), c = l ? e.serializeElement(l) : null;
3627
+ c && (r.scene3d = c);
3628
+ const u = e.evaluate("sp3d", t), p = u ? e.serializeElement(u) : null;
3629
+ p && (r.shape3d = p);
3630
+ const E = e.evaluate("extLst", t), f = E ? e.serializeElement(E) : null;
3631
+ return f && (r.extLst = {
3632
+ ...r.extLst,
3633
+ properties: f
3634
+ }), r;
3635
+ } catch (t) {
3636
+ e.warn(`Unable to read shape properties: ${t?.message ?? t}`, { onceKey: "xlsx.shape.unreadable" });
3637
+ }
3638
+ }
3639
+ }, bn = [
3640
+ ["latin", "font"],
3641
+ ["ea", "eastAsianFont"],
3642
+ ["cs", "complexScriptFont"],
3643
+ ["sym", "symbolFont"]
3644
+ ], yn = (e) => {
3645
+ const t = {}, r = e.getAttribute("typeface");
3646
+ r && (r.startsWith("+mj") ? t.scheme = u.Scheme.Major : r.startsWith("+mn") ? t.scheme = u.Scheme.Minor : t.family = r);
3647
+ const n = e.getAttribute("panose");
3648
+ n && (t.panose = n, t.fallbacks = [u.getPanoseFallback(n)]), e.hasAttribute("pitchFamily") && (t.pitch = e.getAttribute("pitchFamily"));
3649
+ const o = e.hasAttribute("charset") ? ((e) => {
3650
+ const t = parseInt(e, 10);
3651
+ return Number.isNaN(t) ? void 0 : (t % 256 + 256) % 256;
3652
+ })(e.getAttribute("charset")) : void 0;
3653
+ return void 0 !== o && (t.charset = o), Object.keys(t).length > 0 ? t : void 0;
3654
+ }, Cn = (e, t) => {
3655
+ const r = {}, n = t.getAttribute("r:id") ?? t.getAttribute("id");
3656
+ if (n) {
3657
+ const t = e.getRelationships().get(n);
3658
+ if (t?.target?.startsWith("#")) r.address = t.target;
3659
+ else {
3660
+ const t = e.getRef(n);
3661
+ "string" == typeof t && (r.address = t);
3662
+ }
3663
+ }
3664
+ return t.hasAttribute("tooltip") && (r.screenTip = t.getAttribute("tooltip")), t.hasAttribute("tgtFrame") && (r.target = t.getAttribute("tgtFrame")), t.hasAttribute("action") && (r.action = t.getAttribute("action")), t.hasAttribute("history") && (r.history = et(t.getAttribute("history"))), r;
3665
+ }, Nn = class extends Tn {
3666
+ constructor(e = "text") {
3667
+ super(), this._jsonKey = e;
3668
+ }
3669
+ getTextPath() {
3670
+ return this._jsonKey;
3671
+ }
3672
+ visit(e, t, r) {
3673
+ let n = e.getFromPath(r, this.getTextPath());
3674
+ return n || (n = {}), this.parseTextElement(e, t, n, !1), Object.keys(n).length > 0 && e.setToPath(r, this.getTextPath(), n), r;
3675
+ }
3676
+ parseTextElement(e, t, r, n) {
3677
+ const o = e.evaluate("p/pPr/defRPr", t) ?? e.evaluate("defRPr", t), a = void 0 !== o?.length ? o.item(0) : o;
3678
+ a && (this.parseTextProperties(e, a, r), new xn().visit(e, a, r));
3679
+ const s = r.runs ?? [], i = e.evaluate("p/r", t) ?? e.evaluate("r", t), l = (t) => {
3680
+ const r = {};
3681
+ let n = e.evaluate("t", t);
3682
+ const o = e.evaluate("rPr", t);
3683
+ o && this.parseTextProperties(e, o, r), n && n.firstChild ? r.text = n.firstChild.textContent ?? "" : t.textContent && (r.text = t.textContent ?? ""), Object.keys(r).length > 0 && s.push(r);
3684
+ };
3685
+ if (void 0 !== i?.length) for (let e = 0; i && e < i.length; e++) l(i.item(e));
3686
+ else l(i || t);
3687
+ s.length > 0 && (r.runs = s);
3688
+ const c = e.evaluate("bodyPr", t);
3689
+ c && Qr(c, r);
3690
+ }
3691
+ parseTextProperties(e, t, r) {
3692
+ if (!t) return;
3693
+ t.hasAttribute("sz") && (r.size = parseFloat(t.getAttribute("sz")) / 100), t.hasAttribute("b") && (r.weight = "1" === t.getAttribute("b") ? 700 : 400), t.hasAttribute("i") && (r.style = "1" === t.getAttribute("i") ? u.Style.Italic : u.Style.Normal), t.hasAttribute("u") && (r.underline = Yr.read(t.getAttribute("u"))), t.hasAttribute("strike") && (r.strike = Xr.read(t.getAttribute("strike"))), t.hasAttribute("lang") && (r.language = t.getAttribute("lang")), t.hasAttribute("altLang") && (r.alternateLanguage = t.getAttribute("altLang")), t.hasAttribute("kern") && (r.kerning = parseFloat(t.getAttribute("kern")) / 100), t.hasAttribute("spc") && (r.letterSpacing = parseFloat(t.getAttribute("spc")) / 100), t.hasAttribute("baseline") && (r.baseline = Ze(t.getAttribute("baseline"))), t.hasAttribute("cap") && (r.capitals = t.getAttribute("cap")), t.hasAttribute("normalizeH") && (r.normalizeHeight = et(t.getAttribute("normalizeH")));
3694
+ const n = this.getFill(e, t);
3695
+ n && Object.keys(n).length > 0 && (r.color = n);
3696
+ const o = e.evaluate("ln", t);
3697
+ if (o) {
3698
+ const t = this.parseLn(e, o);
3699
+ t && Object.keys(t).length > 0 && (r.outline = t);
3700
+ }
3701
+ const a = this.getEffects(e, t);
3702
+ a && a.length > 0 && (r.effects = a);
3703
+ const s = e.evaluate("highlight", t);
3704
+ if (s) {
3705
+ const t = this.processAdjColor(e, s);
3706
+ t && (r.highlight = t);
3707
+ }
3708
+ const i = e.evaluate("hlinkClick", t);
3709
+ i && (r.hyperlink = this.readHyperlink(e, i));
3710
+ for (const [n, o] of bn) {
3711
+ const a = e.evaluate(n, t);
3712
+ if (!a) continue;
3713
+ const s = yn(a);
3714
+ s && (r[o] = s);
3715
+ }
3716
+ }
3717
+ readHyperlink(e, t) {
3718
+ return Cn(e, t);
3719
+ }
3720
+ }, Ln = /* @__PURE__ */ new Set([
3721
+ "pPr",
3722
+ "rPr",
3723
+ "endParaRPr",
3724
+ "bodyPr",
3725
+ "lstStyle"
3726
+ ]), vn = (e) => {
3727
+ const t = [], r = e.childNodes;
3728
+ for (let e = 0; e < r.length; e++) {
3729
+ const n = r.item(e);
3730
+ 1 === n.nodeType && t.push(n);
3731
+ }
3732
+ return t;
3733
+ }, Dn = (e, t) => vn(e).find((e) => e.localName === t), Pn = (e) => e.runs.map((e) => e.text ?? "").join(""), Mn = (e) => {
3734
+ const t = e.paragraphs.map(Pn);
3735
+ let r = 0, n = t.length;
3736
+ for (; r < n && "" === t[r].trim();) r++;
3737
+ for (; n > r && "" === t[n - 1].trim();) n--;
3738
+ return t.slice(r, n).join("\n");
3739
+ }, Fn = {
3740
+ anchor: f.VerticalAlignment.Top,
3741
+ anchorCenter: !1,
3742
+ wrap: "square",
3743
+ vertical: f.WritingMode.Horizontal,
3744
+ upright: !1,
3745
+ rightToLeftColumns: !1,
3746
+ columns: 1,
3747
+ columnSpacing: 0,
3748
+ fromWordArt: !1,
3749
+ forceAntiAlias: !1,
3750
+ compatibleLineSpacing: !1,
3751
+ spaceFirstLastParagraph: !1,
3752
+ autoFit: f.Autofit.None
3753
+ }, Bn = Object.freeze({
3754
+ verticalOverflow: f.Overflow.Visible,
3755
+ horizontalOverflow: f.Overflow.Visible,
3756
+ size: 18
3757
+ }), wn = {
3758
+ left: qe("91440") ?? 0,
3759
+ top: qe("45720") ?? 0,
3760
+ right: qe("91440") ?? 0,
3761
+ bottom: qe("45720") ?? 0
3762
+ }, Un = {
3763
+ align: E.ParagraphAlignment.Left,
3764
+ level: 0,
3765
+ marginLeft: 0,
3766
+ marginRight: 0,
3767
+ indent: 0,
3768
+ rightToLeft: !1,
3769
+ eastAsianLineBreak: !0,
3770
+ latinLineBreak: !1,
3771
+ hangingPunctuation: !0
3772
+ }, kn = {
3773
+ weight: 400,
3774
+ style: u.Style.Normal,
3775
+ underline: E.UnderlineStyle.None,
3776
+ strike: E.StrikeStyle.None,
3777
+ kerning: 0,
3778
+ letterSpacing: 0,
3779
+ baseline: 0,
3780
+ capitals: E.SmallCaps.None,
3781
+ normalizeHeight: !1
3782
+ }, Vn = (e, t) => {
3783
+ for (const r of Object.keys(t)) e[r] === t[r] && delete e[r];
3784
+ }, Gn = (e, t, r) => {
3785
+ if (void 0 !== T.inheritedTextSize(e, t)) return;
3786
+ const n = r.size ?? Bn.size;
3787
+ n === T.TEXT_DEFAULTS.size ? delete r.size : r.size = n;
3788
+ }, Wn = class extends Nn {
3789
+ visit(e, t, r) {
3790
+ return t ? (r.text = this.readTextBody(e, t), r) : r;
3791
+ }
3792
+ readTextBody(e, t) {
3793
+ const r = [];
3794
+ for (const n of vn(t)) "p" === n.localName && r.push(this.readParagraph(e, n));
3795
+ const n = { paragraphs: r }, o = Dn(t, "bodyPr");
3796
+ if (o) {
3797
+ Qr(o, n);
3798
+ const t = Yn(o), r = e ? Dn(o, "extLst") : null, a = r ? e.serializeElement(r) : null;
3799
+ a && (t.extLst = a), Object.keys(t).length > 0 && (n.body = t);
3800
+ }
3801
+ const a = Dn(t, "lstStyle");
3802
+ if (a && e) {
3803
+ const t = this.readListStyle(e, a);
3804
+ t && (n.listStyle = t);
3805
+ }
3806
+ return ((e) => {
3807
+ 0 === e.rotation && delete e.rotation;
3808
+ for (const t of ["verticalOverflow", "horizontalOverflow"]) {
3809
+ const r = e.body?.[t] ?? Bn[t];
3810
+ r === T.TEXT_DEFAULTS[t] ? e.body && delete e.body[t] : Object.assign(e.body ??= {}, { [t]: r });
3811
+ }
3812
+ for (const t of e.paragraphs) {
3813
+ for (const r of t.runs) "\n" !== r.text && Gn(e, t, r);
3814
+ 0 === t.runs.length && (t.endRun ??= {}), t.endRun && Gn(e, t, t.endRun);
3815
+ }
3816
+ const t = e.body;
3817
+ t && (Vn(t, Fn), t.insets && (Vn(t.insets, wn), 0 === Object.keys(t.insets).length && delete t.insets), 0 === Object.keys(t).length && delete e.body);
3818
+ for (const t of e.paragraphs) {
3819
+ if (!e.listStyle && (Vn(t, Un), !t.defaultRun)) {
3820
+ for (const e of t.runs) Vn(e, kn);
3821
+ t.endRun && Vn(t.endRun, kn);
3822
+ }
3823
+ t.endRun && 0 === Object.keys(t.endRun).length && delete t.endRun;
3824
+ }
3825
+ })(n), n;
3826
+ }
3827
+ readParagraph(e, t) {
3828
+ const r = { runs: [] }, n = (t) => {
3829
+ const o = t.localName;
3830
+ if ("pPr" === o) return void Object.assign(r, this.readParagraphProperties(e, t));
3831
+ if ("endParaRPr" === o) {
3832
+ const n = {};
3833
+ e && this.parseTextProperties(e, t, n), Object.keys(n).length > 0 && (r.endRun = n);
3834
+ return;
3835
+ }
3836
+ if (Ln.has(o)) return;
3837
+ if ("br" === o) return void r.runs.push({ text: "\n" });
3838
+ if ("r" === o || "fld" === o) {
3839
+ const n = { text: "" };
3840
+ for (const r of vn(t)) "rPr" === r.localName ? e && this.parseTextProperties(e, r, n) : "t" === r.localName && (n.text += r.textContent ?? "");
3841
+ if ("fld" === o) {
3842
+ const e = { id: t.getAttribute("id") ?? "" }, r = t.getAttribute("type");
3843
+ r && (e.type = r), n.field = e;
3844
+ }
3845
+ r.runs.push(n);
3846
+ return;
3847
+ }
3848
+ if ("t" === o) return void r.runs.push({ text: t.textContent ?? "" });
3849
+ const a = "AlternateContent" === o ? ((e) => {
3850
+ const t = Dn(e, "Fallback") ?? Dn(e, "Choice");
3851
+ return t ? vn(t) : [];
3852
+ })(t) : vn(t);
3853
+ for (const e of a) n(e);
3854
+ };
3855
+ for (const e of vn(t)) n(e);
3856
+ return r;
3857
+ }
3858
+ readParagraphProperties(e, t) {
3859
+ const r = {}, n = (e, n) => {
3860
+ const o = t.getAttribute(e);
3861
+ null !== o && (r[n] = qe(o) ?? 0);
3862
+ };
3863
+ n("marL", "marginLeft"), n("marR", "marginRight"), n("indent", "indent"), n("defTabSz", "defaultTabSize"), t.hasAttribute("lvl") && (r.level = parseInt(t.getAttribute("lvl"), 10)), t.hasAttribute("algn") && (r.align = Wr.read(t.getAttribute("algn"))), t.hasAttribute("fontAlgn") && (r.fontAlign = Hr.read(t.getAttribute("fontAlgn")));
3864
+ const o = (e, n) => {
3865
+ const o = t.getAttribute(e);
3866
+ null !== o && (r[n] = et(o));
3867
+ };
3868
+ let a;
3869
+ o("rtl", "rightToLeft"), o("eaLnBrk", "eastAsianLineBreak"), o("latinLnBrk", "latinLineBreak"), o("hangingPunct", "hangingPunctuation");
3870
+ const s = () => a ??= {};
3871
+ for (const n of vn(t)) switch (n.localName) {
3872
+ case "lnSpc":
3873
+ r.lineSpacing = Hn(n);
3874
+ break;
3875
+ case "spcBef":
3876
+ r.spaceBefore = Hn(n);
3877
+ break;
3878
+ case "spcAft":
3879
+ r.spaceAfter = Hn(n);
3880
+ break;
3881
+ case "buClrTx":
3882
+ s().colorFollowsText = !0;
3883
+ break;
3884
+ case "buClr": {
3885
+ const t = e ? this.processAdjColor(e, n) : null;
3886
+ t && (s().color = t);
3887
+ break;
3888
+ }
3889
+ case "buSzTx":
3890
+ s().sizeFollowsText = !0;
3891
+ break;
3892
+ case "buSzPct":
3893
+ s().size = { percent: Ze(n.getAttribute("val") ?? "0") };
3894
+ break;
3895
+ case "buSzPts":
3896
+ s().size = { points: parseFloat(n.getAttribute("val") ?? "0") / 100 };
3897
+ break;
3898
+ case "buFontTx":
3899
+ s().fontFollowsText = !0;
3900
+ break;
3901
+ case "buFont": {
3902
+ const e = yn(n);
3903
+ e && (s().font = e);
3904
+ break;
3905
+ }
3906
+ case "buNone":
3907
+ s().type = "none";
3908
+ break;
3909
+ case "buAutoNum": {
3910
+ const e = s();
3911
+ e.type = "auto";
3912
+ const t = n.getAttribute("type");
3913
+ t && (e.autoType = t), n.hasAttribute("startAt") && (e.startAt = parseInt(n.getAttribute("startAt"), 10));
3914
+ break;
3915
+ }
3916
+ case "buChar": {
3917
+ const e = s();
3918
+ e.type = "char", e.char = n.getAttribute("char") ?? "";
3919
+ break;
3920
+ }
3921
+ case "buBlip":
3922
+ s().type = "image";
3923
+ break;
3924
+ case "tabLst": {
3925
+ const e = [];
3926
+ for (const t of vn(n)) {
3927
+ if ("tab" !== t.localName) continue;
3928
+ const r = { position: qe(t.getAttribute("pos")) ?? 0 }, n = t.getAttribute("algn");
3929
+ n && (r.align = jr.read(n)), e.push(r);
3930
+ }
3931
+ r.tabs = e;
3932
+ break;
3933
+ }
3934
+ case "defRPr": {
3935
+ if (!e) break;
3936
+ const t = {};
3937
+ this.parseTextProperties(e, n, t), Object.keys(t).length > 0 && (r.defaultRun = t);
3938
+ break;
3939
+ }
3940
+ }
3941
+ return a && (r.bullet = a), r;
3942
+ }
3943
+ readListStyle(e, t) {
3944
+ const r = {};
3945
+ for (const n of vn(t)) {
3946
+ if ("defPPr" === n.localName) {
3947
+ r.default = this.readParagraphProperties(e, n);
3948
+ continue;
3949
+ }
3950
+ const t = /^lvl([1-9])pPr$/.exec(n.localName);
3951
+ t && ((r.levels ??= [])[parseInt(t[1], 10) - 1] = this.readParagraphProperties(e, n));
3952
+ }
3953
+ return r.default || r.levels ? r : void 0;
3954
+ }
3955
+ }, Hn = (e) => {
3956
+ const t = Dn(e, "spcPct");
3957
+ if (t) return { percent: Ze(t.getAttribute("val") ?? "0") };
3958
+ const r = Dn(e, "spcPts");
3959
+ return r ? { points: parseFloat(r.getAttribute("val") ?? "0") / 100 } : void 0;
3960
+ }, $n = (e) => {
3961
+ const t = Dn(e, "avLst");
3962
+ if (!t) return;
3963
+ let r;
3964
+ for (const e of vn(t)) {
3965
+ if ("gd" !== e.localName) continue;
3966
+ const t = e.getAttribute("name"), n = /^\s*val\s+(-?\d+(?:\.\d+)?)\s*$/.exec(e.getAttribute("fmla") ?? "");
3967
+ t && n && ((r ??= {})[t] = Number(n[1]));
3968
+ }
3969
+ return r;
3970
+ }, Yn = (e) => {
3971
+ const t = {}, r = (t) => e.getAttribute(t), n = (e, n) => {
3972
+ const o = r(e);
3973
+ null !== o && (t[n] = et(o));
3974
+ };
3975
+ null !== r("anchor") && (t.anchor = $r.read(r("anchor"))), n("anchorCtr", "anchorCenter"), null !== r("wrap") && (t.wrap = r("wrap"));
3976
+ const o = {};
3977
+ for (const [e, t] of [
3978
+ ["lIns", "left"],
3979
+ ["tIns", "top"],
3980
+ ["rIns", "right"],
3981
+ ["bIns", "bottom"]
3982
+ ]) {
3983
+ const n = r(e);
3984
+ null !== n && (o[t] = qe(n) ?? 0);
3985
+ }
3986
+ Object.keys(o).length > 0 && (t.insets = o), null !== r("vert") && (t.vertical = _r.read(r("vert"))), null !== r("vertOverflow") && (t.verticalOverflow = Kr.read(r("vertOverflow"))), null !== r("horzOverflow") && (t.horizontalOverflow = Kr.read(r("horzOverflow"))), n("upright", "upright"), n("rtlCol", "rightToLeftColumns"), null !== r("numCol") && (t.columns = parseInt(r("numCol"), 10)), null !== r("spcCol") && (t.columnSpacing = qe(r("spcCol")) ?? 0), n("fromWordArt", "fromWordArt"), n("forceAA", "forceAntiAlias"), n("compatLnSpc", "compatibleLineSpacing"), n("spcFirstLastPara", "spaceFirstLastParagraph");
3987
+ for (const r of vn(e)) switch (r.localName) {
3988
+ case "noAutofit":
3989
+ t.autoFit = f.Autofit.None;
3990
+ break;
3991
+ case "spAutoFit":
3992
+ t.autoFit = f.Autofit.Shape;
3993
+ break;
3994
+ case "normAutofit":
3995
+ t.autoFit = f.Autofit.Normal, r.hasAttribute("fontScale") && (t.fontScale = Ze(r.getAttribute("fontScale"))), r.hasAttribute("lnSpcReduction") && (t.lineSpacingReduction = Ze(r.getAttribute("lnSpcReduction")));
3996
+ break;
3997
+ case "prstTxWarp": {
3998
+ const e = { preset: r.getAttribute("prst") ?? "textNoShape" }, n = $n(r);
3999
+ n && (e.adjustments = n), t.warp = e;
4000
+ break;
4001
+ }
4002
+ }
4003
+ return t;
4004
+ }, Xn = /\s*<v:shape\b[\s\S]*?<\/v:shape>/g, _n = /<x:ClientData\b[^>]*\bObjectType="Note"/, Kn = /<x:Row>\s*(-?\d+)\s*<\/x:Row>/, jn = /<x:Column>\s*(-?\d+)\s*<\/x:Column>/, zn = /<x:Anchor>([\s\d,-]*)<\/x:Anchor>/, qn = /<x:Visible\s*(?:\/>|>([^<]*)<\/x:Visible>)/, Qn = /\s*<\/xml>\s*$/, Zn = /^\s*<v:shape\b((?:[^>"']|"[^"]*"|'[^']*')*)>/, Jn = /([\w:.-]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g, eo = /<o:idmap\b[^>]*\bdata="([^"]*)"/, to = /* @__PURE__ */ new Set([
4005
+ "position",
4006
+ "margin-left",
4007
+ "margin-top",
4008
+ "width",
4009
+ "height",
4010
+ "z-index",
4011
+ "visibility"
4012
+ ]), ro = /* @__PURE__ */ new Set([
4013
+ "id",
4014
+ "o:spid",
4015
+ "alt",
4016
+ "style"
4017
+ ]);
4018
+ function no(e) {
4019
+ const t = [];
4020
+ return {
4021
+ rest: e.replace(Xn, (e) => {
4022
+ if (!_n.test(e)) return e;
4023
+ const r = Kn.exec(e), n = jn.exec(e);
4024
+ return r && n ? (t.push({
4025
+ xml: e,
4026
+ row: parseInt(r[1], 10),
4027
+ col: parseInt(n[1], 10)
4028
+ }), "") : e;
4029
+ }),
4030
+ notes: t
4031
+ };
4032
+ }
4033
+ function oo(e) {
4034
+ return /<v:shape\b/.test(e);
4035
+ }
4036
+ var ao = (e) => e.replace(/&quot;/g, "\"").replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&"), so = (e) => {
4037
+ const t = [], r = e.split(";");
4038
+ for (let e = 0; e < r.length; e++) {
4039
+ const n = r[e].trim();
4040
+ if (!n) continue;
4041
+ const o = n.substring(0, n.indexOf(":")).trim().toLowerCase();
4042
+ to.has(o) || t.push(n.replace(/\s+/g, " "));
4043
+ }
4044
+ return t.join(";");
4045
+ }, io = (e) => {
4046
+ const t = Zn.exec(e);
4047
+ if (!t) return null;
4048
+ const r = [];
4049
+ let n, o = "", a = null;
4050
+ for (Jn.lastIndex = 0; null !== (n = Jn.exec(t[1]));) {
4051
+ const e = n[1], t = n[2] ?? n[3] ?? "";
4052
+ "style" === e ? o = so(t) : "alt" === e ? a = ao(t) || null : ro.has(e) || r.push(n[0].replace(/\s+/g, " "));
4053
+ }
4054
+ return {
4055
+ attributes: r,
4056
+ style: o,
4057
+ alt: a,
4058
+ end: t[0].length
4059
+ };
4060
+ };
4061
+ function lo(e) {
4062
+ const t = io(e);
4063
+ if (!t) return null;
4064
+ const r = t.attributes.slice();
4065
+ t.style && r.push(`style='${t.style}'`);
4066
+ const n = e.substring(t.end).replace(zn, "").replace(Kn, "").replace(jn, "").replace(qn, "").replace(/>\s+</g, "><").replace(/\s+/g, " ").trim();
4067
+ return `<v:shape${r.length > 0 ? " " + r.join(" ") : ""}>${n}`;
4068
+ }
4069
+ var co = lo("<v:shape type=\"#_x0000_t202\" fillcolor=\"infoBackground [80]\" strokecolor=\"none [81]\"\n o:insetmode=\"auto\">\n <v:fill color2=\"infoBackground [80]\"/>\n <v:shadow color=\"none [81]\" obscured=\"t\"/>\n <v:path o:connecttype=\"none\"/>\n <v:textbox style='mso-direction-alt:auto'>\n <div style='text-align:left'></div>\n </v:textbox>\n <x:ClientData ObjectType=\"Note\">\n <x:MoveWithCells/>\n <x:SizeWithCells/>\n <x:AutoFill>False</x:AutoFill>\n </x:ClientData>\n </v:shape>");
4070
+ function uo(e) {
4071
+ let t = null;
4072
+ const r = zn.exec(e);
4073
+ if (r) {
4074
+ const e = r[1].split(",").map((e) => parseInt(e.trim(), 10));
4075
+ 8 !== e.length || e.some((e) => isNaN(e)) || (t = e);
4076
+ }
4077
+ const n = qn.exec(e), o = !!n && !/^\s*f/i.test(n[1] ?? ""), a = lo(e);
4078
+ return {
4079
+ anchor: t,
4080
+ visible: o,
4081
+ alt: io(e)?.alt ?? null,
4082
+ xml: null === a || a === co ? null : a
4083
+ };
4084
+ }
4085
+ var po = (e) => Math.round(.75 * e * 100) / 100 + "pt";
4086
+ function Eo(e, t) {
4087
+ const r = (e ? lo(e) : null) ?? co, n = io(r), { bounds: o, anchor: a } = t;
4088
+ let s = `position:absolute;margin-left:${po(o.x)};margin-top:${po(o.y)};width:${po(o.width)};height:${po(o.height)};z-index:${t.zIndex};visibility:${t.visible ? "visible" : "hidden"}`;
4089
+ n.style && (s += `;${n.style}`);
4090
+ const i = n.attributes.slice(), l = i.findIndex((e) => e.startsWith("type="));
4091
+ var c;
4092
+ i.splice(l + 1, 0, `style='${s}'`), t.alt && i.splice(l + 1, 0, `alt="${c = t.alt, c.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;")}"`);
4093
+ let u = r.substring(n.end);
4094
+ const p = `<x:Anchor>${a.join(", ")}</x:Anchor>`, E = `<x:Row>${t.row}</x:Row><x:Column>${t.col}</x:Column>${t.visible ? "<x:Visible/>" : ""}`;
4095
+ return u = u.includes("<x:AutoFill") ? u.replace("<x:AutoFill", `${p}<x:AutoFill`).replace("</x:ClientData>", `${E}</x:ClientData>`) : u.replace("</x:ClientData>", `${p}${E}</x:ClientData>`), `<v:shape id="_x0000_s${t.shapeId}" ${i.join(" ")}>${u}`;
4096
+ }
4097
+ function fo(e) {
4098
+ const t = eo.exec(e), r = t ? parseInt(t[1], 10) : NaN;
4099
+ let n = 1024 * (isNaN(r) || r < 1 ? 1 : r);
4100
+ for (const t of e.matchAll(/\b(?:id|o:spid)="_x0000_s(\d+)"/g)) n = Math.max(n, parseInt(t[1], 10));
4101
+ return n;
4102
+ }
4103
+ function Ao(e, t, r, n = "<v:shapetype id=\"_x0000_t202\" coordsize=\"21600,21600\" o:spt=\"202\"\n path=\"m,l,21600r21600,l21600,xe\">\n <v:stroke joinstyle=\"miter\"/>\n <v:path gradientshapeok=\"t\" o:connecttype=\"rect\"/>\n </v:shapetype>") {
4104
+ const o = e && e.trim() ? e : "<xml xmlns:v=\"urn:schemas-microsoft-com:vml\"\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\">\n <o:shapelayout v:ext=\"edit\">\n <o:idmap v:ext=\"edit\" data=\"1\"/>\n </o:shapelayout></xml>";
4105
+ if (0 === t.length) return oo(o) ? o : null;
4106
+ let a = void 0 !== r ? ((e, t) => {
4107
+ const r = eo.exec(e);
4108
+ if (!r) return e;
4109
+ const n = /* @__PURE__ */ new Set(), o = r[1].split(",");
4110
+ for (let e = 0; e < o.length; e++) {
4111
+ const t = parseInt(o[e].trim(), 10);
4112
+ isNaN(t) || n.add(t);
4113
+ }
4114
+ const a = n.size > 0 ? Math.min(...n) : 1, s = Math.floor(t / 1024);
4115
+ let i = !1;
4116
+ for (let e = a; e <= s; e++) n.has(e) || (n.add(e), i = !0);
4117
+ if (!i) return e;
4118
+ const l = Array.from(n).sort((e, t) => e - t).join(",");
4119
+ return e.replace(eo, (e) => e.replace(/\bdata="[^"]*"/, `data="${l}"`));
4120
+ })(o, r) : o;
4121
+ const s = Qn.exec(a);
4122
+ if (!s) return null;
4123
+ const i = s[0];
4124
+ a = a.slice(0, s.index);
4125
+ const l = /\bid="([^"]*)"/.exec(n)?.[1];
4126
+ return l && new RegExp(`<v:shapetype\\b[^>]*\\bid="${l}"`).test(a) || (a += n), a + t.join("") + i;
4127
+ }
4128
+ var To = "application/vnd.ms-excel.controlproperties+xml", So = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp", ho = "http://schemas.microsoft.com/office/drawing/2010/main", go = {
4129
+ Button: "button",
4130
+ CheckBox: "checkBox",
4131
+ Radio: "optionButton",
4132
+ List: "listBox",
4133
+ Drop: "dropDown",
4134
+ Scroll: "scrollBar",
4135
+ Spin: "spinner",
4136
+ GBox: "groupBox",
4137
+ Label: "label",
4138
+ EditBox: "editBox",
4139
+ Dialog: "dialog"
4140
+ }, mo = {};
4141
+ for (const e in go) mo[go[e]] = e;
4142
+ var Ro = "formControl", Oo = /* @__PURE__ */ new Set([...Object.values(go), Ro]), Io = (e) => void 0 !== e && Oo.has(e), xo = {
4143
+ Button: "button",
4144
+ Checkbox: "checkBox",
4145
+ Radio: "optionButton",
4146
+ List: "listBox",
4147
+ Drop: "dropDown",
4148
+ Scroll: "scrollBar",
4149
+ Spin: "spinner",
4150
+ GBox: "groupBox",
4151
+ Label: "label",
4152
+ Edit: "editBox",
4153
+ Dialog: "dialog"
4154
+ }, bo = {};
4155
+ for (const e in xo) bo[xo[e]] = e;
4156
+ var yo = {
4157
+ combo: "combo",
4158
+ comboedit: "comboEdit",
4159
+ simple: "simple"
4160
+ }, Co = {
4161
+ combo: "combo",
4162
+ comboEdit: "comboedit",
4163
+ simple: "simple"
4164
+ }, No = /* @__PURE__ */ new Set([
4165
+ "macro",
4166
+ "linkedCell",
4167
+ "listFillRange"
4168
+ ]), Lo = (e) => "1" === e || "true" === e, vo = (e) => {
4169
+ if (void 0 === e) return;
4170
+ const t = Number(e);
4171
+ return isNaN(t) ? void 0 : t;
4172
+ }, Do = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
4173
+ function Po(e, t, r) {
4174
+ const n = {}, o = {};
4175
+ let a;
4176
+ for (const t in e) {
4177
+ const r = e[t];
4178
+ switch (t) {
4179
+ case "objectType":
4180
+ a = r;
4181
+ break;
4182
+ case "checked":
4183
+ "Checked" === r ? n.checked = !0 : "Mixed" === r && (n.mixed = !0);
4184
+ break;
4185
+ case "fmlaLink":
4186
+ n.linkedCell = r;
4187
+ break;
4188
+ case "fmlaRange":
4189
+ n.listFillRange = r;
4190
+ break;
4191
+ case "val":
4192
+ n.value = vo(r);
4193
+ break;
4194
+ case "min":
4195
+ n.min = vo(r);
4196
+ break;
4197
+ case "max":
4198
+ n.max = vo(r);
4199
+ break;
4200
+ case "inc":
4201
+ n.increment = vo(r);
4202
+ break;
4203
+ case "page":
4204
+ n.pageIncrement = vo(r);
4205
+ break;
4206
+ case "horiz":
4207
+ Lo(r) && (n.horizontal = !0);
4208
+ break;
4209
+ case "sel": {
4210
+ const e = vo(r);
4211
+ void 0 !== e && e > 0 && (n.selectedIndex = e - 1);
4212
+ break;
4213
+ }
4214
+ case "dropStyle": {
4215
+ const e = yo[r];
4216
+ e ? n.dropStyle = e : o[t] = r;
4217
+ break;
4218
+ }
4219
+ case "dropLines":
4220
+ n.dropLines = vo(r);
4221
+ break;
4222
+ default: o[t] = r;
4223
+ }
4224
+ }
4225
+ let s = a ? go[a] : void 0;
4226
+ return s || (s = Ro, a && (o.objectType = a)), Object.keys(o).length > 0 && (n.formProps = o), t.length > 0 && (n.items = [...t]), r && (n.extLst = r), {
4227
+ type: s,
4228
+ json: n
4229
+ };
4230
+ }
4231
+ function Mo(e, t) {
4232
+ const r = t, n = r.formProps, o = [["objectType", mo[e] ?? n?.objectType ?? "Unknown"]], a = (e, t) => {
4233
+ void 0 !== t && o.push([e, t]);
4234
+ };
4235
+ if (r.mixed ? a("checked", "Mixed") : r.checked && a("checked", "Checked"), a("dropLines", r.dropLines), a("dropStyle", r.dropStyle ? Co[r.dropStyle] : void 0), a("fmlaLink", r.linkedCell), a("fmlaRange", r.listFillRange), r.horizontal && a("horiz", "1"), a("inc", r.increment), a("max", r.max), a("min", r.min), a("page", r.pageIncrement), a("sel", void 0 !== r.selectedIndex ? r.selectedIndex + 1 : void 0), a("val", r.value), n) for (const e in n) "objectType" !== e && a(e, n[e]);
4236
+ let s = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<formControlPr xmlns=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"";
4237
+ for (const [e, t] of o) s += ` ${e}="${Do(String(t))}"`;
4238
+ const i = r.items, l = void 0 !== i && i.length > 0;
4239
+ if (!l && !r.extLst) return s + "/>";
4240
+ if (s += ">", l) {
4241
+ s += "<itemLst>";
4242
+ for (let e = 0; e < i.length; e++) s += `<item val="${Do(i[e])}"/>`;
4243
+ s += "</itemLst>";
4244
+ }
4245
+ return r.extLst && (s += r.extLst), s + "</formControlPr>";
4246
+ }
4247
+ function Fo(e, t) {
4248
+ const r = t, n = {};
4249
+ for (const t in e) {
4250
+ const o = e[t];
4251
+ "macro" === t ? r.macro = o : "linkedCell" === t ? void 0 === r.linkedCell && (r.linkedCell = o) : "listFillRange" === t ? void 0 === r.listFillRange && (r.listFillRange = o) : n[t] = o;
4252
+ }
4253
+ Object.keys(n).length > 0 ? r.props = n : delete r.props;
4254
+ }
4255
+ function Bo(e) {
4256
+ const t = e, r = {}, n = t.props;
4257
+ if (n) for (const e in n) No.has(e) || (r[e] = n[e]);
4258
+ return void 0 !== t.macro && (r.macro = t.macro), void 0 !== t.linkedCell && (r.linkedCell = t.linkedCell), void 0 !== t.listFillRange && (r.listFillRange = t.listFillRange), r;
4259
+ }
4260
+ function wo(e) {
4261
+ const t = {};
4262
+ if (!e) return t;
4263
+ const r = Mn(e);
4264
+ "" !== r && (t.caption = r);
4265
+ const n = e.paragraphs;
4266
+ for (let r = 0; r < n.length; r++) {
4267
+ const o = n[r], a = o.runs.find((e) => "" !== e.text && "\n" !== e.text);
4268
+ if (!a) continue;
4269
+ const s = {}, i = a.font?.family;
4270
+ i && (s.name = i), s.size = a.size ?? T.inheritedTextSize(e, o) ?? T.TEXT_DEFAULTS.size, void 0 !== a.weight && a.weight >= 700 && (s.bold = !0), a.style === u.Style.Italic && (s.italic = !0);
4271
+ const l = Uo(a.color);
4272
+ l && (s.color = l), t.font = s;
4273
+ break;
4274
+ }
4275
+ return t;
4276
+ }
4277
+ var Uo = (e) => {
4278
+ const t = "string" == typeof e ? e : e?.color;
4279
+ if ("string" != typeof t) return;
4280
+ const r = /^#?([0-9A-Fa-f]{6})$/.exec(t);
4281
+ return r ? `#${r[1].toUpperCase()}` : void 0;
4282
+ };
4283
+ function ko(e) {
4284
+ const t = e.movables;
4285
+ if (!t) return;
4286
+ const r = /* @__PURE__ */ new Map(), n = t.length;
4287
+ for (let e = 0; e < n; e++) {
4288
+ const n = t[e].content;
4289
+ if (!Io(n?.type)) continue;
4290
+ const o = n.json?.shapeId;
4291
+ "number" == typeof o && r.set(o, t[e]);
4292
+ }
4293
+ const o = /* @__PURE__ */ new Set(), a = (e) => {
4294
+ const t = (e.content?.json)?.members ?? [];
4295
+ for (let e = 0; e < t.length; e++) {
4296
+ const n = t[e];
4297
+ if ("group" === n.content?.type) {
4298
+ a(n);
4299
+ continue;
4300
+ }
4301
+ const s = "shape" === n.content?.type ? n.content.json : void 0, i = s?.twinOf;
4302
+ if ("number" != typeof i) continue;
4303
+ delete s.twinOf;
4304
+ const l = r.get(i);
4305
+ if (!l) continue;
4306
+ const c = l.content.json, u = wo(n.content.json.text);
4307
+ void 0 !== u.caption && void 0 === c.caption && (c.caption = u.caption), u.font && void 0 === c.font && (c.font = u.font), delete n.hidden, n.content = {
4308
+ ...l.content,
4309
+ name: l.content.name ?? n.content.name
4310
+ }, o.add(l);
4311
+ }
4312
+ };
4313
+ for (let e = 0; e < n; e++) "group" === t[e].content?.type && a(t[e]);
4314
+ const s = [];
4315
+ for (let e = 0; e < n; e++) {
4316
+ const n = t[e];
4317
+ if (o.has(n)) continue;
4318
+ const a = n.content, i = "shape" === a?.type ? a.json : void 0, l = i?.twinOf;
4319
+ if ("number" != typeof l) {
4320
+ s.push(n);
4321
+ continue;
4322
+ }
4323
+ delete i.twinOf;
4324
+ const c = r.get(l)?.content?.json;
4325
+ if (!c) {
4326
+ s.push(n);
4327
+ continue;
4328
+ }
4329
+ const u = wo(a.json.text);
4330
+ void 0 !== u.caption && void 0 === c.caption && (c.caption = u.caption), u.font && void 0 === c.font && (c.font = u.font);
4331
+ }
4332
+ s.length !== n && (e.movables = s);
4333
+ }
4334
+ function Vo(e, t, r, n) {
4335
+ const o = t.shapeId ?? 0, a = "button" === e;
4336
+ let s = `<xdr:sp macro="" textlink=""><xdr:nvSpPr><xdr:cNvPr id="${o}" name="${Do(r ?? "")}" hidden="1"><a:extLst><a:ext uri="{63B3BB69-23CF-44E3-9099-C40C66FF867C}"><a14:compatExt xmlns:a14="${ho}" spid="_x0000_s${o}"/></a:ext></a:extLst></xdr:cNvPr><xdr:cNvSpPr/></xdr:nvSpPr><xdr:spPr bwMode="auto">` + (n ? `<a:xfrm><a:off x="${Go(n.x)}" y="${Go(n.y)}"/><a:ext cx="${Go(n.width)}" cy="${Go(n.height)}"/></a:xfrm>` : "<a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"0\" cy=\"0\"/></a:xfrm>") + "<a:prstGeom prst=\"rect\"><a:avLst/></a:prstGeom><a:noFill/>" + (a ? "<a:ln w=\"9525\"><a:miter lim=\"800000\"/><a:headEnd/><a:tailEnd/></a:ln>" : "<a:ln><a:noFill/></a:ln>") + "</xdr:spPr>";
4337
+ const i = t.caption;
4338
+ if (void 0 !== i) {
4339
+ const e = t.font;
4340
+ let r = "<a:rPr lang=\"en-US\"";
4341
+ void 0 !== e?.size && (r += ` sz="${Math.round(100 * e.size)}"`), r += ` b="${e?.bold ? 1 : 0}" i="${e?.italic ? 1 : 0}" u="none" strike="noStrike" baseline="0">`, e?.color && (r += `<a:solidFill><a:srgbClr val="${e.color.replace("#", "").toUpperCase()}"/></a:solidFill>`), e?.name && (r += `<a:latin typeface="${Do(e.name)}"/>`), r += "</a:rPr>", s += "<xdr:txBody><a:bodyPr vertOverflow=\"clip\" wrap=\"square\" lIns=\"27432\" tIns=\"27432\" rIns=\"27432\" bIns=\"27432\" anchor=\"ctr\" upright=\"1\"/><a:lstStyle/>";
4342
+ const n = i.split("\n");
4343
+ for (let e = 0; e < n.length; e++) s += `<a:p><a:pPr algn="${a ? "ctr" : "l"}" rtl="0"><a:defRPr sz="1000"/></a:pPr><a:r>${r}<a:t>${Do(n[e])}</a:t></a:r></a:p>`;
4344
+ s += "</xdr:txBody>";
4345
+ }
4346
+ return s + "</xdr:sp>";
4347
+ }
4348
+ var Go = (e) => Math.round(9525 * e);
4349
+ function Wo(e, t) {
4350
+ const r = [], n = t.movables ?? [], o = e.getMovables().getItems().filter((e) => "note" !== e.getContent().getType()), a = (t, n, o) => {
4351
+ const s = (t.content?.json)?.members ?? [], i = n?.getMovables()?.getItems() ?? [];
4352
+ for (let t = 0; t < s.length; t++) {
4353
+ const n = s[t];
4354
+ if ("group" === n.content?.type) {
4355
+ a(n, i[t], o);
4356
+ continue;
4357
+ }
4358
+ if (!Io(n.content?.type)) continue;
4359
+ const l = i[t]?.getBounds();
4360
+ l && r.push({
4361
+ jsonMovable: n,
4362
+ anchor: Ho(e, l),
4363
+ anchorType: o
4364
+ });
4365
+ }
4366
+ };
4367
+ for (let e = 0; e < n.length; e++) {
4368
+ const t = n[e], s = t.anchorType ?? "twoCell";
4369
+ "group" === t.content?.type ? a(t, o[e], s) : Io(t.content?.type) && r.push({
4370
+ jsonMovable: t,
4371
+ anchor: t.anchor,
4372
+ anchorType: s
4373
+ });
4374
+ }
4375
+ return r;
4376
+ }
4377
+ var Ho = (e, t) => {
4378
+ const r = (t, r) => {
4379
+ const n = e.getRangeAtBounds({
4380
+ x: t,
4381
+ y: r,
4382
+ width: 0,
4383
+ height: 0
4384
+ }).getCoords(), o = e.getRange({
4385
+ rowStart: n.rowStart,
4386
+ colStart: n.colStart,
4387
+ rowEnd: n.rowStart,
4388
+ colEnd: n.colStart
4389
+ }).getBounds();
4390
+ return {
4391
+ c: n.colStart,
4392
+ r: n.rowStart,
4393
+ x: t - o.x,
4394
+ y: r - o.y
4395
+ };
4396
+ };
4397
+ return {
4398
+ tl: r(t.x, t.y),
4399
+ br: r(t.x + t.width, t.y + t.height)
4400
+ };
4401
+ }, $o = { "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006" }, Yo = {
4402
+ "xmlns:a14": ho,
4403
+ Requires: "a14"
4404
+ }, Xo = /\s*<v:shape\b[\s\S]*?<\/v:shape>/g, _o = /<x:ClientData\b[^>]*\bObjectType="([^"]*)"/, Ko = /\bo:spid="_x0000_s(\d+)"/, jo = /\bid="_x0000_s(\d+)"/;
4405
+ function zo(e, t) {
4406
+ return e.replace(Xo, (e) => function(e) {
4407
+ const t = _o.exec(e)?.[1];
4408
+ return void 0 !== t && void 0 !== xo[t];
4409
+ }(e) ? t(e, function(e) {
4410
+ const t = Ko.exec(e) ?? jo.exec(e);
4411
+ return t ? parseInt(t[1], 10) : null;
4412
+ }(e)) ?? "" : e);
4413
+ }
4414
+ var qo = "<v:shapetype id=\"_x0000_t201\" coordsize=\"21600,21600\" o:spt=\"201\"\n path=\"m,l,21600r21600,l21600,xe\">\n <v:stroke joinstyle=\"miter\"/>\n <v:path shadowok=\"f\" o:extrusionok=\"f\" strokeok=\"f\" fillok=\"f\" o:connecttype=\"rect\"/>\n <o:lock v:ext=\"edit\" shapetype=\"t\"/>\n </v:shapetype>", Qo = {
4415
+ attributes: "filled=\"f\" fillcolor=\"windowText [64]\" stroked=\"f\" strokecolor=\"window [65]\" strokeweight=\"3e-5mm\" o:insetmode=\"auto\"",
4416
+ children: "<v:fill color2=\"window [65]\"/><v:path shadowok=\"t\" strokeok=\"t\" fillok=\"t\"/><o:lock v:ext=\"edit\" rotation=\"t\"/>",
4417
+ align: "left"
4418
+ }, Zo = {
4419
+ attributes: "o:insetmode=\"auto\"",
4420
+ children: "<o:lock v:ext=\"edit\" rotation=\"t\" text=\"t\"/>"
4421
+ }, Jo = {
4422
+ attributes: "o:insetmode=\"auto\"",
4423
+ children: "<o:lock v:ext=\"edit\" rotation=\"t\"/>",
4424
+ align: "left"
4425
+ }, ea = {
4426
+ button: {
4427
+ attributes: "o:button=\"t\" fillcolor=\"buttonFace [67]\" o:insetmode=\"auto\"",
4428
+ children: "<v:fill color2=\"buttonFace [67]\" o:detectmouseclick=\"t\"/><o:lock v:ext=\"edit\" rotation=\"t\"/>",
4429
+ align: "center"
4430
+ },
4431
+ checkBox: Qo,
4432
+ optionButton: Qo,
4433
+ dropDown: {
4434
+ attributes: "filled=\"f\" fillcolor=\"windowText [64]\" strokecolor=\"windowText [64]\" o:insetmode=\"auto\"",
4435
+ children: "<v:fill color2=\"window [65]\"/><o:lock v:ext=\"edit\" rotation=\"t\" text=\"t\"/>"
4436
+ },
4437
+ listBox: {
4438
+ attributes: "fillcolor=\"window [65]\" strokecolor=\"windowText [64]\" o:insetmode=\"auto\"",
4439
+ children: "<v:fill color2=\"window [65]\"/><o:lock v:ext=\"edit\" rotation=\"t\" text=\"t\"/>"
4440
+ },
4441
+ scrollBar: Zo,
4442
+ spinner: Zo,
4443
+ groupBox: {
4444
+ attributes: "fillcolor=\"window [65]\" strokecolor=\"windowText [64]\" o:insetmode=\"auto\"",
4445
+ children: "<v:fill color2=\"window [65]\"/><o:lock v:ext=\"edit\" rotation=\"t\"/>",
4446
+ align: "left"
4447
+ },
4448
+ label: {
4449
+ attributes: "filled=\"f\" fillcolor=\"windowText [64]\" strokecolor=\"windowText [64]\" o:insetmode=\"auto\"",
4450
+ children: "<v:fill color2=\"window [65]\"/><o:lock v:ext=\"edit\" rotation=\"t\"/>",
4451
+ align: "left"
4452
+ }
4453
+ }, ta = (e) => "button" === e ? {
4454
+ h: "center",
4455
+ v: "center"
4456
+ } : "checkBox" === e || "optionButton" === e ? { v: "center" } : {}, ra = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), na = (e) => e.replace(/&quot;/g, "\"").replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&"), oa = (e) => e.charAt(0).toUpperCase() + e.slice(1);
4457
+ function aa(e, t, r) {
4458
+ const n = bo[e];
4459
+ if (!n) return null;
4460
+ const o = t, a = ea[e] ?? Jo, s = o.props ?? {}, i = o.formProps ?? {}, l = a.align ? o.caption : void 0, { bounds: c } = r;
4461
+ let u = `position:absolute;margin-left:${po(c.x)};margin-top:${po(c.y)};width:${po(c.width)};height:${po(c.height)};z-index:${r.zIndex}`;
4462
+ void 0 !== l && (u += ";mso-wrap-style:tight");
4463
+ let p = `<v:shape id="_x0000_s${r.shapeId}" type="#_x0000_t201" style='${u}' ${a.attributes}>` + a.children;
4464
+ void 0 !== l && (p += `<v:textbox style='mso-direction-alt:auto' o:singleclick="f"><div style='text-align:${a.align}'>${((e, t) => {
4465
+ let r = "<font";
4466
+ t?.name && (r += ` face="${Do(t.name)}"`), void 0 !== t?.size && (r += ` size="${Math.round(20 * t.size)}"`), r += ` color="${t?.color ?? "auto"}">`;
4467
+ let n = e.split("\n").map(ra).join("<br/>");
4468
+ return t?.bold && (n = `<b>${n}</b>`), t?.italic && (n = `<i>${n}</i>`), `${r}${n}</font>`;
4469
+ })(l, o.font)}</div></v:textbox>`);
4470
+ let E = "";
4471
+ const f = (e, t) => {
4472
+ E += void 0 === t ? `<x:${e}/>` : `<x:${e}>${ra(String(t))}</x:${e}>`;
4473
+ };
4474
+ "absolute" === r.anchorType && f("MoveWithCells"), "twoCell" !== r.anchorType && f("SizeWithCells"), f("Anchor", r.anchor.join(", ")), "0" === s.print && f("PrintObject", "False"), "0" === s.autoFill && f("AutoFill", "False"), "0" === s.autoLine && f("AutoLine", "False"), o.macro && f("FmlaMacro", o.macro);
4475
+ const A = ta(e), T = i.textHAlign ?? A.h, d = i.textVAlign ?? A.v;
4476
+ T && f("TextHAlign", oa(T)), d && f("TextVAlign", oa(d)), o.mixed ? f("Checked", 2) : o.checked && f("Checked", 1), o.linkedCell && f("FmlaLink", o.linkedCell);
4477
+ const S = "listBox" === e || "dropDown" === e;
4478
+ if ((S || "scrollBar" === e || "spinner" === e) && (f("Val", o.value ?? 0), f("Min", o.min ?? 0), f("Max", o.max ?? (S ? 0 : 100)), f("Inc", o.increment ?? 1), f("Page", o.pageIncrement ?? ("listBox" === e ? 5 : 10)), o.horizontal && f("Horiz"), void 0 !== i.dx && f("Dx", i.dx)), S) {
4479
+ o.listFillRange && f("FmlaRange", o.listFillRange), f("Sel", void 0 !== o.selectedIndex ? o.selectedIndex + 1 : 0), "1" === i.noThreeD && f("NoThreeD2"), f("SelType", oa(i.selType ?? "single")), f("LCT", oa(i.lct ?? "normal"));
4480
+ const t = o.items ?? [];
4481
+ for (let e = 0; e < t.length; e++) f("ListItem", t[e]);
4482
+ "dropDown" === e && (f("DropStyle", oa(Co[o.dropStyle ?? "combo"] ?? "combo")), f("DropLines", o.dropLines ?? 8));
4483
+ } else "1" === i.noThreeD && f("NoThreeD");
4484
+ return "1" === i.firstButton && f("FirstButton"), p += `<x:ClientData ObjectType="${n}">${E}</x:ClientData>`, p + "</v:shape>";
4485
+ }
4486
+ var sa = /<x:Anchor>([\s\d,-]*)<\/x:Anchor>/, ia = /<x:ClientData\b[^>]*>([\s\S]*?)<\/x:ClientData>/, la = /<x:(\w+)\s*(?:\/>|>([^<]*)<\/x:\1>)/g, ca = /<v:textbox\b[^>]*>([\s\S]*?)<\/v:textbox>/, ua = /<font\b([^>]*)>/;
4487
+ function pa(e, t) {
4488
+ const r = _o.exec(e)?.[1], n = r ? xo[r] : void 0;
4489
+ if (!n) return null;
4490
+ const o = sa.exec(e)?.[1]?.split(",").map((e) => parseInt(e.trim(), 10));
4491
+ if (!o || 8 !== o.length || o.some(isNaN)) return null;
4492
+ const a = {};
4493
+ null !== t && (a.shapeId = t);
4494
+ const s = {}, i = {}, l = [];
4495
+ let c = !0, u = !0;
4496
+ const p = ta(n), E = ia.exec(e)?.[1] ?? "";
4497
+ for (const e of E.matchAll(la)) {
4498
+ const t = na((e[2] ?? "").trim());
4499
+ switch (e[1]) {
4500
+ case "MoveWithCells":
4501
+ c = !1;
4502
+ break;
4503
+ case "SizeWithCells":
4504
+ u = !1;
4505
+ break;
4506
+ case "PrintObject":
4507
+ "False" === t && (s.print = "0");
4508
+ break;
4509
+ case "AutoFill":
4510
+ "False" === t && (s.autoFill = "0");
4511
+ break;
4512
+ case "AutoLine":
4513
+ "False" === t && (s.autoLine = "0");
4514
+ break;
4515
+ case "FmlaMacro":
4516
+ t && (a.macro = t);
4517
+ break;
4518
+ case "TextHAlign":
4519
+ t.toLowerCase() !== p.h && (i.textHAlign = t.toLowerCase());
4520
+ break;
4521
+ case "TextVAlign":
4522
+ t.toLowerCase() !== p.v && (i.textVAlign = t.toLowerCase());
4523
+ break;
4524
+ case "Checked":
4525
+ "1" === t ? a.checked = !0 : "2" === t && (a.mixed = !0);
4526
+ break;
4527
+ case "FmlaLink":
4528
+ t && (a.linkedCell = t);
4529
+ break;
4530
+ case "FmlaRange":
4531
+ t && (a.listFillRange = t);
4532
+ break;
4533
+ case "Val":
4534
+ a.value = vo(t);
4535
+ break;
4536
+ case "Min":
4537
+ a.min = vo(t);
4538
+ break;
4539
+ case "Max":
4540
+ a.max = vo(t);
4541
+ break;
4542
+ case "Inc":
4543
+ a.increment = vo(t);
4544
+ break;
4545
+ case "Page":
4546
+ a.pageIncrement = vo(t);
4547
+ break;
4548
+ case "Horiz":
4549
+ a.horizontal = !0;
4550
+ break;
4551
+ case "Dx":
4552
+ i.dx = t;
4553
+ break;
4554
+ case "Sel": {
4555
+ const e = vo(t);
4556
+ void 0 !== e && e > 0 && (a.selectedIndex = e - 1);
4557
+ break;
4558
+ }
4559
+ case "NoThreeD":
4560
+ case "NoThreeD2":
4561
+ i.noThreeD = "1";
4562
+ break;
4563
+ case "SelType":
4564
+ "single" !== t.toLowerCase() && (i.selType = t.toLowerCase());
4565
+ break;
4566
+ case "ListItem":
4567
+ l.push(t);
4568
+ break;
4569
+ case "DropStyle": {
4570
+ const e = yo[t.toLowerCase()];
4571
+ e && (a.dropStyle = e);
4572
+ break;
4573
+ }
4574
+ case "DropLines":
4575
+ a.dropLines = vo(t);
4576
+ break;
4577
+ case "FirstButton": i.firstButton = "1";
4578
+ }
4579
+ }
4580
+ if (l.length > 0 && (a.items = l), Object.keys(s).length > 0 && (a.props = s), Object.keys(i).length > 0 && (a.formProps = i), (ea[n] ?? Jo).align) {
4581
+ const { caption: t, font: r } = ((e) => {
4582
+ const t = ca.exec(e)?.[1];
4583
+ if (void 0 === t) return {};
4584
+ const r = t.replace(/\s+/g, " ").replace(/<br\s*\/?>/gi, "\n").replace(/<[^>]*>/g, "").split("\n").map((e) => na(e.trim())).join("\n").trim(), n = {};
4585
+ "" !== r && (n.caption = r);
4586
+ const o = ua.exec(t)?.[1];
4587
+ if (o) {
4588
+ const e = {}, r = /\bface="([^"]*)"/.exec(o)?.[1];
4589
+ r && (e.name = na(r));
4590
+ const a = vo(/\bsize="([^"]*)"/.exec(o)?.[1]);
4591
+ void 0 !== a && (e.size = a / 20);
4592
+ const s = /\bcolor="(#[0-9A-Fa-f]{6})"/.exec(o)?.[1];
4593
+ s && (e.color = s.toUpperCase()), /<b\b/i.test(t) && (e.bold = !0), /<i\b/i.test(t) && (e.italic = !0), Object.keys(e).length > 0 && (n.font = e);
4594
+ }
4595
+ return n;
4596
+ })(e);
4597
+ void 0 !== t && (a.caption = t), r && (a.font = r);
4598
+ }
4599
+ const f = {
4600
+ anchor: {
4601
+ tl: {
4602
+ c: o[0],
4603
+ x: o[1],
4604
+ r: o[2],
4605
+ y: o[3]
4606
+ },
4607
+ br: {
4608
+ c: o[4],
4609
+ x: o[5],
4610
+ r: o[6],
4611
+ y: o[7]
4612
+ }
4613
+ },
4614
+ content: {
4615
+ type: n,
4616
+ json: a
4617
+ }
4618
+ }, A = c ? u ? "twoCell" : "oneCell" : "absolute";
4619
+ return "twoCell" !== A && (f.anchorType = A), f;
4620
+ }
4621
+ function Ea(e) {
4622
+ const t = e.legacyDrawing;
4623
+ if (!t?.xml) return;
4624
+ const r = /* @__PURE__ */ new Set(), n = e.movables ?? [], o = (e) => {
4625
+ for (let t = 0; t < e.length; t++) {
4626
+ const n = e[t].content;
4627
+ if ("group" === n?.type && o(n.json?.members ?? []), !Io(n?.type)) continue;
4628
+ const a = n.json?.shapeId;
4629
+ "number" == typeof a && r.add(a);
4630
+ }
4631
+ };
4632
+ o(n);
4633
+ const a = [], s = zo(t.xml, (e, t) => {
4634
+ if (null !== t && r.has(t)) return null;
4635
+ const n = pa(e, t);
4636
+ return n ? (a.push(n), null) : e;
4637
+ });
4638
+ a.length > 0 && (e.movables = [...n, ...a]), s !== t.xml && (oo(s) ? t.xml = s : delete e.legacyDrawing);
4639
+ }
4640
+ var fa = "16.0000", Aa = 1048575, Ta = 16383;
4641
+ function da(e) {
4642
+ if (!e || "string" != typeof e) return fa;
4643
+ if ("local" === e || "dev" === e || "development" === e) return "00.0000";
4644
+ const t = e.match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?/);
4645
+ if (!t) return fa;
4646
+ const r = parseInt(t[1], 10), n = parseInt(t[2] || "0", 10);
4647
+ return r > 99 || n > 9999 ? fa : `${r.toString()}.${n.toString().padStart(4, "0")}`;
4648
+ }
4649
+ export { dr as $, qr as A, Be as At, Wr as B, v as Bt, Eo as C, Ge as Ct, Cn as D, Ye as Dt, Nn as E, Xe as Et, Zr as F, W as Ft, _r as G, g as Gt, jr as H, y as Ht, Gr as I, x as It, Ur as J, P as Jt, Br as K, b as Kt, $r as L, O as Lt, Jr as M, H as Mt, tn as N, U as Nt, xn as O, Me as Ot, en as P, G as Pt, Ar as Q, h as Qt, Hr as R, I as Rt, no as S, qe as St, Mn as T, $e as Tt, Yr as U, C as Ut, Xr as V, N as Vt, zr as W, L as Wt, jt as X, F as Xt, wr as Y, D as Yt, zt as Z, M as Zt, aa as _, lt as _t, qo as a, Kt as at, fo as b, _e as bt, Yo as c, Tt as ct, Bo as d, ft as dt, lr as et, Vo as f, Et as ft, Wo as g, rt as gt, Po as h, nt as ht, To as i, Sr as it, Qr as j, $ as jt, Tn as k, Fe as kt, Ea as l, dt as lt, Fo as m, ut as mt, Aa as n, Tr as nt, So as o, _t as ot, Io as p, ct as pt, Mr as q, m as qt, da as r, fr as rt, $o as s, At as st, Ta as t, Er as tt, ko as u, St as ut, Mo as v, st as vt, Wn as w, We as wt, uo as x, et as xt, Ao as y, it as yt, Kr as z, R as zt };