@factorialco/f0-react 8.32.0 → 8.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChatPdfThumbnail-BSSuwnX6.js → ChatPdfThumbnail-DtjnbxlK.js} +1 -1
- package/dist/{ChatPostComposerDialog-DT2qzJz7.js → ChatPostComposerDialog-BaTMTzP7.js} +3 -3
- package/dist/{ChatSheetThumbnail-CyiwSdZJ.js → ChatSheetThumbnail-P76Jt0_u.js} +1 -1
- package/dist/{DocumentToolbar-COZ7xCb5.js → DocumentToolbar-DmU2Z6yx.js} +2 -2
- package/dist/{DocxViewer-Cwm_Q0g6.js → DocxViewer-C54WGD1S.js} +2 -2
- package/dist/{F0AiProcessingOverlay-CLBRUF77.js → F0AiProcessingOverlay-DZi5LhAe.js} +958 -958
- package/dist/{F0CanvasPanel-j19rKA2q.js → F0CanvasPanel-WVtVnJRZ.js} +846 -817
- package/dist/{F0Map-BYEGbNFJ.js → F0Map-CNWfSFZ1.js} +4 -4
- package/dist/{F0VideoPlayer-DLC7folq.js → F0VideoPlayer-D7c3Yh3w.js} +2 -2
- package/dist/{MapProvider-wJjbpL-O.js → MapProvider-27XPHPiu.js} +3 -3
- package/dist/{SheetViewer-DMCfqh-D.js → SheetViewer-1drEsfd7.js} +4 -4
- package/dist/{TextViewer-D4X0yq0F.js → TextViewer-EXSsPDXE.js} +2 -2
- package/dist/ai.d.ts +9 -9
- package/dist/ai.js +2 -2
- package/dist/browser-DqC2vZ6l.js +765 -0
- package/dist/component-status.d.ts +8 -8
- package/dist/component-status.js +1 -1
- package/dist/{experimental-C3h3olmD.js → experimental-BVFSvDo0.js} +1828 -1838
- package/dist/experimental.d.ts +9 -9
- package/dist/experimental.js +88 -88
- package/dist/f0.d.ts +10 -10
- package/dist/f0.js +9390 -9393
- package/dist/i18n-provider-defaults.d.ts +8 -8
- package/dist/index-6YSyIntj.js +4 -0
- package/dist/{index-D0RZbFbo.js → index-BC3sRBhO.js} +3 -3
- package/dist/{index-DPzxBulj.js → index-C3NBN1Ds.js} +2 -2
- package/dist/index-D-dPYkJS.js +2332 -0
- package/dist/{index-XRldN0kV.js → index-P3wd7w_Q.js} +1 -1
- package/dist/{index-2cL0J9Pc.js → index-SaYqmPwO.js} +3 -3
- package/dist/papaparse.min-Bh1MVuzw.js +405 -0
- package/dist/{pdfWorker-CQHWwuw6.js → pdfWorker-Bt3dfOGU.js} +2 -2
- package/dist/sheetPreview-BiccmyTD.js +2377 -0
- package/package.json +6 -2
- package/dist/index-no2co85K.js +0 -4
- package/dist/sheetPreview-Bqj3xODH.js +0 -51
- package/dist/xlsx-CzlURDDb.js +0 -24525
|
@@ -0,0 +1,2332 @@
|
|
|
1
|
+
import { z as Mr, a as Xr } from "./browser-DqC2vZ6l.js";
|
|
2
|
+
function _r(e) {
|
|
3
|
+
return Hr(e).then(function(t) {
|
|
4
|
+
return t.buffer;
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
function Hr(e) {
|
|
8
|
+
return new Promise(function(t, r) {
|
|
9
|
+
Mr(e, function(n, o) {
|
|
10
|
+
n ? r(n) : t(o);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function Wr(e, t) {
|
|
15
|
+
var r = {};
|
|
16
|
+
return Promise.all(Object.keys(e).map(function(n) {
|
|
17
|
+
if (e[n] instanceof Uint8Array)
|
|
18
|
+
r[n] = e[n];
|
|
19
|
+
else if (typeof e[n] == "string")
|
|
20
|
+
r[n] = Gr(e[n]);
|
|
21
|
+
else
|
|
22
|
+
return t(e[n]).then(function(o) {
|
|
23
|
+
r[n] = o;
|
|
24
|
+
});
|
|
25
|
+
})).then(function() {
|
|
26
|
+
return r;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function Gr(e) {
|
|
30
|
+
return Xr(e);
|
|
31
|
+
}
|
|
32
|
+
function Kr(e, t) {
|
|
33
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
34
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
35
|
+
if (Array.isArray(e) || (r = qr(e)) || t) {
|
|
36
|
+
r && (e = r);
|
|
37
|
+
var n = 0;
|
|
38
|
+
return function() {
|
|
39
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
43
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
44
|
+
}
|
|
45
|
+
function qr(e, t) {
|
|
46
|
+
if (e) {
|
|
47
|
+
if (typeof e == "string") return Te(e, t);
|
|
48
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
49
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Te(e, t) : void 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function Te(e, t) {
|
|
53
|
+
(t == null || t > e.length) && (t = e.length);
|
|
54
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
55
|
+
return n;
|
|
56
|
+
}
|
|
57
|
+
function E(e, t, r, n) {
|
|
58
|
+
for (var o = "", a = Kr(t), s; !(s = a()).done; ) {
|
|
59
|
+
var l = s.value, i = l.files && l.files.transform && l.files.transform[e];
|
|
60
|
+
if (i && i.insert) {
|
|
61
|
+
var u = i.insert(r, n);
|
|
62
|
+
u && (o += u);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return o;
|
|
66
|
+
}
|
|
67
|
+
function Jr(e, t) {
|
|
68
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
69
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
70
|
+
if (Array.isArray(e) || (r = Yr(e)) || t) {
|
|
71
|
+
r && (e = r);
|
|
72
|
+
var n = 0;
|
|
73
|
+
return function() {
|
|
74
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
78
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
79
|
+
}
|
|
80
|
+
function Yr(e, t) {
|
|
81
|
+
if (e) {
|
|
82
|
+
if (typeof e == "string") return Oe(e, t);
|
|
83
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
84
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Oe(e, t) : void 0;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function Oe(e, t) {
|
|
88
|
+
(t == null || t > e.length) && (t = e.length);
|
|
89
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
90
|
+
return n;
|
|
91
|
+
}
|
|
92
|
+
function D(e, t, r, n, o) {
|
|
93
|
+
for (var a = Jr(r), s; !(s = a()).done; ) {
|
|
94
|
+
var l = s.value, i = l.files && l.files.transform && l.files.transform[t];
|
|
95
|
+
i && i.transform && (e = i.transform(e, n, o));
|
|
96
|
+
}
|
|
97
|
+
return e;
|
|
98
|
+
}
|
|
99
|
+
function ar(e, t) {
|
|
100
|
+
var r = t.isAttributeValue;
|
|
101
|
+
return e = V(e, "&", "&"), e = V(e, ">", ">"), e = V(e, "<", "<"), r && (e = V(e, "'", "'"), e = V(e, '"', """)), e;
|
|
102
|
+
}
|
|
103
|
+
function V(e, t, r) {
|
|
104
|
+
return e.replaceAll ? e.replaceAll(t, r) : e.replace(new RegExp(t, "g"), r);
|
|
105
|
+
}
|
|
106
|
+
var Zr = /((?:[\0-\x08\x0B\f\x0E-\x1F\uFFFD\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g, Qr = new RegExp("([\\x7F-\\x84]|[\\x86-\\x9F]|[\\uFDD0-\\uFDEF]|(?:\\uD83F[\\uDFFE\\uDFFF])|(?:\\uD87F[\\uDFFE\\uDFFF])|(?:\\uD8BF[\\uDFFE\\uDFFF])|(?:\\uD8FF[\\uDFFE\\uDFFF])|(?:\\uD93F[\\uDFFE\\uDFFF])|(?:\\uD97F[\\uDFFE\\uDFFF])|(?:\\uD9BF[\\uDFFE\\uDFFF])|(?:\\uD9FF[\\uDFFE\\uDFFF])|(?:\\uDA3F[\\uDFFE\\uDFFF])|(?:\\uDA7F[\\uDFFE\\uDFFF])|(?:\\uDABF[\\uDFFE\\uDFFF])|(?:\\uDAFF[\\uDFFE\\uDFFF])|(?:\\uDB3F[\\uDFFE\\uDFFF])|(?:\\uDB7F[\\uDFFE\\uDFFF])|(?:\\uDBBF[\\uDFFE\\uDFFF])|(?:\\uDBFF[\\uDFFE\\uDFFF])(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))", "g");
|
|
107
|
+
function ye(e) {
|
|
108
|
+
return e = e.replace(Zr, ""), e = e.replace(Qr, ""), e;
|
|
109
|
+
}
|
|
110
|
+
function A(e) {
|
|
111
|
+
if (typeof e != "string")
|
|
112
|
+
throw new TypeError("Argument must be a string");
|
|
113
|
+
return e = ye(e), ar(e, {
|
|
114
|
+
isAttributeValue: !0
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function et(e) {
|
|
118
|
+
if (typeof e != "string")
|
|
119
|
+
throw new TypeError("Argument must be a string");
|
|
120
|
+
return e = ye(e), e.replace(/[^a-zA-Z_0-9-.:]/g, "").replace(/^[^a-zA-Z_]+/, "");
|
|
121
|
+
}
|
|
122
|
+
function rt(e) {
|
|
123
|
+
return Object.keys(e).map(function(t) {
|
|
124
|
+
return "".concat(et(t), '="').concat(A(String(e[t])), '"');
|
|
125
|
+
}).reduce(function(t, r) {
|
|
126
|
+
return t + " " + r;
|
|
127
|
+
}, "");
|
|
128
|
+
}
|
|
129
|
+
function ae(e, t) {
|
|
130
|
+
return "<" + e + (t ? rt(t) : "") + ">";
|
|
131
|
+
}
|
|
132
|
+
function pe(e) {
|
|
133
|
+
return "</" + e + ">";
|
|
134
|
+
}
|
|
135
|
+
function ie(e, t) {
|
|
136
|
+
return ae(e, t).slice(0, -1) + "/>";
|
|
137
|
+
}
|
|
138
|
+
function tt(e, t) {
|
|
139
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
140
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
141
|
+
if (Array.isArray(e) || (r = nt(e)) || t) {
|
|
142
|
+
r && (e = r);
|
|
143
|
+
var n = 0;
|
|
144
|
+
return function() {
|
|
145
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
149
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
150
|
+
}
|
|
151
|
+
function nt(e, t) {
|
|
152
|
+
if (e) {
|
|
153
|
+
if (typeof e == "string") return Ee(e, t);
|
|
154
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
155
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ee(e, t) : void 0;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function Ee(e, t) {
|
|
159
|
+
(t == null || t > e.length) && (t = e.length);
|
|
160
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
161
|
+
return n;
|
|
162
|
+
}
|
|
163
|
+
function ir(e, t, r, n, o, a, s, l) {
|
|
164
|
+
for (var i = tt(l), u; !(u = i()).done; ) {
|
|
165
|
+
var c = u.value, d = c.files && c.files.transform && c.files.transform[e];
|
|
166
|
+
d && d.transformElementAttributes && (r = d.transformElementAttributes(t, r || ot, o, s, a));
|
|
167
|
+
}
|
|
168
|
+
return n ? ae(t, r) + n + pe(t) : ie(t, r);
|
|
169
|
+
}
|
|
170
|
+
var ot = {};
|
|
171
|
+
function at(e) {
|
|
172
|
+
var t = e.sheetIdsAndNames, r = e.features, n = e.sheetsOptions, o = function(l, i, u, c) {
|
|
173
|
+
return ir("xl/workbook.xml", l, i, u, c, it, n, r);
|
|
174
|
+
}, a = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mx="http://schemas.microsoft.com/office/mac/excel/2008/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main">' + // The order of elements is dictated by the XLSX spec.
|
|
175
|
+
//
|
|
176
|
+
// <workbookPr/>
|
|
177
|
+
o("workbookPr") + // <bookViews/>
|
|
178
|
+
o("bookViews", null, o("workbookView", null, null, 0)) + // <sheets/>
|
|
179
|
+
o("sheets", null, t.map(function(s, l) {
|
|
180
|
+
var i = s.sheetId, u = s.sheetName;
|
|
181
|
+
return o("sheet", {
|
|
182
|
+
"r:id": "rId".concat(i),
|
|
183
|
+
sheetId: i,
|
|
184
|
+
name: u
|
|
185
|
+
}, null, l);
|
|
186
|
+
}).join("")) + // <definedNames/>
|
|
187
|
+
o("definedNames") + // <calcPr/>
|
|
188
|
+
o("calcPr") + // Apply any plugins that insert additional content to this XML.
|
|
189
|
+
E("xl/workbook.xml", r, n) + "</workbook>";
|
|
190
|
+
return a = D(a, "xl/workbook.xml", r, n), a;
|
|
191
|
+
}
|
|
192
|
+
var it = {};
|
|
193
|
+
function lt(e) {
|
|
194
|
+
var t = e.sheetIds, r = e.features, n = e.sheetsOptions, o = '<?xml version="1.0" ?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + t.map(function(a) {
|
|
195
|
+
return '<Relationship Id="rId'.concat(a, '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet').concat(a, '.xml"/>');
|
|
196
|
+
}).join("") + '<Relationship Id="rId'.concat(t.length + 1, '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/>') + '<Relationship Id="rId'.concat(t.length + 2, '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>') + // Apply any plugins that insert additional content to this XML.
|
|
197
|
+
E("xl/_rels/workbook.xml.rels", r, n) + "</Relationships>";
|
|
198
|
+
return o = D(o, "xl/_rels/workbook.xml.rels", r, n), o;
|
|
199
|
+
}
|
|
200
|
+
function st(e) {
|
|
201
|
+
var t = e.features, r = e.sheetsOptions, n = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId-workbook-1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>' + // Apply any plugins that insert additional content to this XML.
|
|
202
|
+
E("_rels/.rels", t, r) + "</Relationships>";
|
|
203
|
+
return n = D(n, "_rels/.rels", t, r), n;
|
|
204
|
+
}
|
|
205
|
+
function ut(e) {
|
|
206
|
+
var t = e.sheetIds, r = e.features, n = e.sheetsOptions, o = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default ContentType="application/xml" Extension="xml"/><Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels"/><Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" PartName="/xl/workbook.xml"/><Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" PartName="/xl/sharedStrings.xml"/><Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" PartName="/xl/styles.xml"/>' + t.map(function(a) {
|
|
207
|
+
return '<Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" PartName="/xl/worksheets/sheet'.concat(a, '.xml"/>');
|
|
208
|
+
}).join("") + t.map(function(a) {
|
|
209
|
+
return lr(a);
|
|
210
|
+
}).join("") + // Apply any plugins that insert additional content to this XML.
|
|
211
|
+
E("[Content_Types].xml", r, n) + "</Types>";
|
|
212
|
+
return o = D(o, "[Content_Types].xml", r, n), o;
|
|
213
|
+
}
|
|
214
|
+
function lr(e) {
|
|
215
|
+
return '<Override ContentType="application/vnd.openxmlformats-officedocument.drawing+xml" PartName="/xl/drawings/drawing'.concat(e, '.xml"/>');
|
|
216
|
+
}
|
|
217
|
+
function ft(e) {
|
|
218
|
+
var t = e.sheetIndex, r = e.sheetId, n = e.sheetOptions, o = e.features, a = sr + // Apply any plugins that insert additional content to this XML.
|
|
219
|
+
E("xl/drawings/drawing{id}.xml", o, n, {
|
|
220
|
+
sheetIndex: t,
|
|
221
|
+
sheetId: r
|
|
222
|
+
}) + ur;
|
|
223
|
+
return a = D(a, "xl/drawings/drawing{id}.xml", o, n, {
|
|
224
|
+
sheetIndex: t,
|
|
225
|
+
sheetId: r
|
|
226
|
+
}), a;
|
|
227
|
+
}
|
|
228
|
+
var sr = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">', ur = "</xdr:wsDr>";
|
|
229
|
+
function ct(e) {
|
|
230
|
+
var t = e.sheetIndex, r = e.sheetId, n = e.sheetOptions, o = e.features, a = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + // Apply any plugins that insert additional content to this XML.
|
|
231
|
+
E("xl/drawings/_rels/drawing{id}.xml.rels", o, n, {
|
|
232
|
+
sheetIndex: t,
|
|
233
|
+
sheetId: r
|
|
234
|
+
}) + "</Relationships>";
|
|
235
|
+
return a = D(a, "xl/drawings/_rels/drawing{id}.xml.rels", o, n, {
|
|
236
|
+
sheetIndex: t,
|
|
237
|
+
sheetId: r
|
|
238
|
+
}), a;
|
|
239
|
+
}
|
|
240
|
+
function dt(e, t, r) {
|
|
241
|
+
if (!mt(t))
|
|
242
|
+
return "";
|
|
243
|
+
var n = t.showGridLines, o = t.rightToLeft, a = t.zoomScale, s = {
|
|
244
|
+
tabSelected: r === 0 ? 1 : 0,
|
|
245
|
+
// The first sheet is selected by default.
|
|
246
|
+
workbookViewId: 0
|
|
247
|
+
};
|
|
248
|
+
n === !1 && (s.showGridLines = !1), o && (s.rightToLeft = 1), typeof a == "number" && (s.zoomScale = Math.round(a * 100));
|
|
249
|
+
var l = e("sheetView", s, null, 0);
|
|
250
|
+
return e("sheetViews", null, l);
|
|
251
|
+
}
|
|
252
|
+
function mt(e) {
|
|
253
|
+
var t = e.showGridLines, r = e.rightToLeft, n = e.zoomScale;
|
|
254
|
+
return t === !1 || r || typeof n == "number";
|
|
255
|
+
}
|
|
256
|
+
function pt(e, t, r) {
|
|
257
|
+
if (!t)
|
|
258
|
+
return "";
|
|
259
|
+
var n = t.width;
|
|
260
|
+
if (!n)
|
|
261
|
+
return "";
|
|
262
|
+
var o = r + 1, a = {
|
|
263
|
+
min: o,
|
|
264
|
+
max: o,
|
|
265
|
+
width: n,
|
|
266
|
+
customWidth: 1
|
|
267
|
+
};
|
|
268
|
+
return e("col", a, null, r);
|
|
269
|
+
}
|
|
270
|
+
function gt(e, t) {
|
|
271
|
+
if (t) {
|
|
272
|
+
var r = t.map(function(n, o) {
|
|
273
|
+
return pt(e, n, o);
|
|
274
|
+
}).join("");
|
|
275
|
+
if (r)
|
|
276
|
+
return e("cols", null, r);
|
|
277
|
+
}
|
|
278
|
+
return "";
|
|
279
|
+
}
|
|
280
|
+
function M(e) {
|
|
281
|
+
if (typeof e != "string")
|
|
282
|
+
throw new TypeError("Argument must be a string");
|
|
283
|
+
return e = ye(e), ar(e, {
|
|
284
|
+
isAttributeValue: !1
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
function R(e, t) {
|
|
288
|
+
return "".concat(fr(t)).concat(e + 1);
|
|
289
|
+
}
|
|
290
|
+
var De = 26;
|
|
291
|
+
function fr(e) {
|
|
292
|
+
if (typeof e != "number")
|
|
293
|
+
return "";
|
|
294
|
+
var t = Math.floor(e / De), r = String.fromCharCode(97 + e % De).toUpperCase();
|
|
295
|
+
return t === 0 ? r : fr(t - 1) + r;
|
|
296
|
+
}
|
|
297
|
+
var ht = 70 * 365 + 19, yt = 3600 * 1e3, vt = 24 * yt;
|
|
298
|
+
function bt(e) {
|
|
299
|
+
return e.getTime() / vt + ht;
|
|
300
|
+
}
|
|
301
|
+
function xt(e, t) {
|
|
302
|
+
return It(e) || Ct(e, t) || St(e, t) || wt();
|
|
303
|
+
}
|
|
304
|
+
function wt() {
|
|
305
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
306
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
307
|
+
}
|
|
308
|
+
function St(e, t) {
|
|
309
|
+
if (e) {
|
|
310
|
+
if (typeof e == "string") return Be(e, t);
|
|
311
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
312
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Be(e, t) : void 0;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function Be(e, t) {
|
|
316
|
+
(t == null || t > e.length) && (t = e.length);
|
|
317
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
318
|
+
return n;
|
|
319
|
+
}
|
|
320
|
+
function Ct(e, t) {
|
|
321
|
+
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
322
|
+
if (r != null) {
|
|
323
|
+
var n, o, a, s, l = [], i = !0, u = !1;
|
|
324
|
+
try {
|
|
325
|
+
if (a = (r = r.call(e)).next, t !== 0) for (; !(i = (n = a.call(r)).done) && (l.push(n.value), l.length !== t); i = !0) ;
|
|
326
|
+
} catch (c) {
|
|
327
|
+
u = !0, o = c;
|
|
328
|
+
} finally {
|
|
329
|
+
try {
|
|
330
|
+
if (!i && r.return != null && (s = r.return(), Object(s) !== s)) return;
|
|
331
|
+
} finally {
|
|
332
|
+
if (u) throw o;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
return l;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
function It(e) {
|
|
339
|
+
if (Array.isArray(e)) return e;
|
|
340
|
+
}
|
|
341
|
+
function Ft(e, t, r, n) {
|
|
342
|
+
var o = t.value, a = t.type, s = t.cellStyleId, l = t.findOrCreateSharedString;
|
|
343
|
+
if (o === null && s === void 0)
|
|
344
|
+
return "";
|
|
345
|
+
var i = {
|
|
346
|
+
r: R(n, r)
|
|
347
|
+
};
|
|
348
|
+
if (s !== void 0 && (i.s = String(s)), o === null)
|
|
349
|
+
return e("c", i, null, r);
|
|
350
|
+
if (a === Date && s === void 0)
|
|
351
|
+
throw new Error("No `format` was specified for a `Date` value in a cell in row ".concat(n + 1, " column ").concat(r + 1, ". Either specify a `format` for this cell or specify a default global one by passing `dateFormat` option to `writeXlsxFile()` function"));
|
|
352
|
+
var u = Tt(a, o, l), c = At(a);
|
|
353
|
+
c && (i.t = c);
|
|
354
|
+
var d = Et(a), f = xt(d, 2), p = f[0], h = f[1], g = p + u + h;
|
|
355
|
+
return e("c", i, g, r);
|
|
356
|
+
}
|
|
357
|
+
function At(e) {
|
|
358
|
+
switch (e) {
|
|
359
|
+
case String:
|
|
360
|
+
return "s";
|
|
361
|
+
// I don't know why did I comment out the use of "inlineStr" XLSX type.
|
|
362
|
+
// Perhaps there were some issues with it. Or perhaps there weren't and everyone else just uses "s".
|
|
363
|
+
// // "inlineStr" type is used instead of "s" to avoid creating a "shared strings" index.
|
|
364
|
+
// return 'inlineStr'
|
|
365
|
+
case Number:
|
|
366
|
+
return;
|
|
367
|
+
case Date:
|
|
368
|
+
return;
|
|
369
|
+
case Boolean:
|
|
370
|
+
return "b";
|
|
371
|
+
case "Formula":
|
|
372
|
+
return;
|
|
373
|
+
default:
|
|
374
|
+
throw new Error("Unknown type: ".concat(e && e.name || e));
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
function Tt(e, t, r) {
|
|
378
|
+
switch (e) {
|
|
379
|
+
case String:
|
|
380
|
+
if (typeof t != "string")
|
|
381
|
+
throw new Error("Invalid cell value: ".concat(t, ". Expected a string"));
|
|
382
|
+
return r(t);
|
|
383
|
+
case Number:
|
|
384
|
+
if (typeof t != "number")
|
|
385
|
+
throw new Error("Invalid cell value: ".concat(t, ". Expected a number"));
|
|
386
|
+
return String(t);
|
|
387
|
+
case Date:
|
|
388
|
+
if (!(t instanceof Date))
|
|
389
|
+
throw new Error("Invalid cell value: ".concat(t, ". Expected a Date"));
|
|
390
|
+
return String(bt(t));
|
|
391
|
+
case Boolean:
|
|
392
|
+
if (typeof t != "boolean")
|
|
393
|
+
throw new Error("Invalid cell value: ".concat(t, ". Expected a boolean"));
|
|
394
|
+
return t ? "1" : "0";
|
|
395
|
+
case "Formula":
|
|
396
|
+
if (typeof t != "string")
|
|
397
|
+
throw new Error("Invalid cell value: ".concat(t, ". Expected a string"));
|
|
398
|
+
return M(t);
|
|
399
|
+
default:
|
|
400
|
+
throw new Error("Unknown type: ".concat(e && e.name || e));
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
var Ot = /</g;
|
|
404
|
+
function Et(e) {
|
|
405
|
+
var t = Dt(e), r = t.replace(Ot, "</");
|
|
406
|
+
return [t, r];
|
|
407
|
+
}
|
|
408
|
+
function Dt(e) {
|
|
409
|
+
return e === "Formula" ? "<f>" : "<v>";
|
|
410
|
+
}
|
|
411
|
+
function ge(e) {
|
|
412
|
+
var t = e.align, r = e.alignVertical, n = e.textRotation, o = e.indent, a = e.wrap;
|
|
413
|
+
return !!(t || r || typeof n == "number" || o || a);
|
|
414
|
+
}
|
|
415
|
+
function ve(e) {
|
|
416
|
+
var t = e.borderColor, r = e.borderStyle, n = e.leftBorderColor, o = e.leftBorderStyle, a = e.rightBorderColor, s = e.rightBorderStyle, l = e.topBorderColor, i = e.topBorderStyle, u = e.bottomBorderColor, c = e.bottomBorderStyle;
|
|
417
|
+
return !!(t || r || n || o || a || s || l || i || u || c);
|
|
418
|
+
}
|
|
419
|
+
function se(e) {
|
|
420
|
+
var t = e.backgroundColor, r = e.fillPatternStyle, n = e.fillPatternColor;
|
|
421
|
+
return !!(t || r && n);
|
|
422
|
+
}
|
|
423
|
+
function be(e) {
|
|
424
|
+
var t = e.fontFamily, r = e.fontSize, n = e.fontWeight, o = e.fontStyle, a = e.textDecoration, s = e.textColor;
|
|
425
|
+
return !!(t || typeof r == "number" || n || o || a && Object.keys(a).length > 0 || s);
|
|
426
|
+
}
|
|
427
|
+
function cr(e, t) {
|
|
428
|
+
var r = e.align, n = e.alignVertical, o = e.textRotation, a = e.indent, s = e.wrap, l = e.fontFamily, i = e.fontSize, u = e.fontWeight, c = e.fontStyle, d = e.textDecoration, f = e.textColor, p = e.backgroundColor, h = e.fillPatternStyle, g = e.fillPatternColor, m = e.borderColor, w = e.borderStyle, S = e.leftBorderColor, x = e.leftBorderStyle, y = e.rightBorderColor, v = e.rightBorderStyle, F = e.topBorderColor, b = e.topBorderStyle, C = e.bottomBorderColor, I = e.bottomBorderStyle;
|
|
429
|
+
if (ge({
|
|
430
|
+
align: r,
|
|
431
|
+
alignVertical: n,
|
|
432
|
+
textRotation: o,
|
|
433
|
+
indent: a,
|
|
434
|
+
wrap: s
|
|
435
|
+
}) || be({
|
|
436
|
+
fontFamily: l,
|
|
437
|
+
fontSize: i,
|
|
438
|
+
fontWeight: u,
|
|
439
|
+
fontStyle: c,
|
|
440
|
+
textDecoration: d,
|
|
441
|
+
textColor: f
|
|
442
|
+
}) || se({
|
|
443
|
+
backgroundColor: p,
|
|
444
|
+
fillPatternStyle: h,
|
|
445
|
+
fillPatternColor: g
|
|
446
|
+
}) || ve({
|
|
447
|
+
borderColor: m,
|
|
448
|
+
borderStyle: w,
|
|
449
|
+
leftBorderColor: S,
|
|
450
|
+
leftBorderStyle: x,
|
|
451
|
+
rightBorderColor: y,
|
|
452
|
+
rightBorderStyle: v,
|
|
453
|
+
topBorderColor: F,
|
|
454
|
+
topBorderStyle: b,
|
|
455
|
+
bottomBorderColor: C,
|
|
456
|
+
bottomBorderStyle: I
|
|
457
|
+
}))
|
|
458
|
+
return Bt({
|
|
459
|
+
// alignment
|
|
460
|
+
align: r,
|
|
461
|
+
alignVertical: n,
|
|
462
|
+
textRotation: o,
|
|
463
|
+
indent: a,
|
|
464
|
+
wrap: s,
|
|
465
|
+
// font
|
|
466
|
+
fontFamily: l,
|
|
467
|
+
fontSize: i,
|
|
468
|
+
fontWeight: u,
|
|
469
|
+
fontStyle: c,
|
|
470
|
+
textDecoration: d,
|
|
471
|
+
textColor: f,
|
|
472
|
+
// fill
|
|
473
|
+
backgroundColor: p,
|
|
474
|
+
fillPatternStyle: h,
|
|
475
|
+
fillPatternColor: g,
|
|
476
|
+
// border
|
|
477
|
+
borderColor: m,
|
|
478
|
+
borderStyle: w,
|
|
479
|
+
leftBorderColor: S,
|
|
480
|
+
leftBorderStyle: x,
|
|
481
|
+
rightBorderColor: y,
|
|
482
|
+
rightBorderStyle: v,
|
|
483
|
+
topBorderColor: F,
|
|
484
|
+
topBorderStyle: b,
|
|
485
|
+
bottomBorderColor: C,
|
|
486
|
+
bottomBorderStyle: I
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
function Bt(e) {
|
|
490
|
+
var t = {};
|
|
491
|
+
for (var r in e)
|
|
492
|
+
e[r] !== void 0 && (t[r] = e[r]);
|
|
493
|
+
return t;
|
|
494
|
+
}
|
|
495
|
+
var Pt = {}.constructor;
|
|
496
|
+
function te(e) {
|
|
497
|
+
return e != null && e.constructor === Pt;
|
|
498
|
+
}
|
|
499
|
+
function dr(e) {
|
|
500
|
+
return te(e);
|
|
501
|
+
}
|
|
502
|
+
function $(e) {
|
|
503
|
+
"@babel/helpers - typeof";
|
|
504
|
+
return $ = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
505
|
+
return typeof t;
|
|
506
|
+
} : function(t) {
|
|
507
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
508
|
+
}, $(e);
|
|
509
|
+
}
|
|
510
|
+
function Pe(e, t) {
|
|
511
|
+
var r = Object.keys(e);
|
|
512
|
+
if (Object.getOwnPropertySymbols) {
|
|
513
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
514
|
+
t && (n = n.filter(function(o) {
|
|
515
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
516
|
+
})), r.push.apply(r, n);
|
|
517
|
+
}
|
|
518
|
+
return r;
|
|
519
|
+
}
|
|
520
|
+
function kt(e) {
|
|
521
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
522
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
523
|
+
t % 2 ? Pe(Object(r), !0).forEach(function(n) {
|
|
524
|
+
jt(e, n, r[n]);
|
|
525
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Pe(Object(r)).forEach(function(n) {
|
|
526
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
return e;
|
|
530
|
+
}
|
|
531
|
+
function jt(e, t, r) {
|
|
532
|
+
return (t = Rt(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
533
|
+
}
|
|
534
|
+
function Rt(e) {
|
|
535
|
+
var t = $t(e, "string");
|
|
536
|
+
return $(t) == "symbol" ? t : t + "";
|
|
537
|
+
}
|
|
538
|
+
function $t(e, t) {
|
|
539
|
+
if ($(e) != "object" || !e) return e;
|
|
540
|
+
var r = e[Symbol.toPrimitive];
|
|
541
|
+
if (r !== void 0) {
|
|
542
|
+
var n = r.call(e, t);
|
|
543
|
+
if ($(n) != "object") return n;
|
|
544
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
545
|
+
}
|
|
546
|
+
return (t === "string" ? String : Number)(e);
|
|
547
|
+
}
|
|
548
|
+
function Lt(e, t) {
|
|
549
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
550
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
551
|
+
if (Array.isArray(e) || (r = Nt(e)) || t) {
|
|
552
|
+
r && (e = r);
|
|
553
|
+
var n = 0;
|
|
554
|
+
return function() {
|
|
555
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
559
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
560
|
+
}
|
|
561
|
+
function Nt(e, t) {
|
|
562
|
+
if (e) {
|
|
563
|
+
if (typeof e == "string") return ke(e, t);
|
|
564
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
565
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ke(e, t) : void 0;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
function ke(e, t) {
|
|
569
|
+
(t == null || t > e.length) && (t = e.length);
|
|
570
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
571
|
+
return n;
|
|
572
|
+
}
|
|
573
|
+
function Ut(e, t, r, n) {
|
|
574
|
+
for (var o, a = Lt(t), s; !(s = a()).done; ) {
|
|
575
|
+
var l = s.value;
|
|
576
|
+
dr(l) && l.height && (o === void 0 || o < l.height) && (o = l.height);
|
|
577
|
+
}
|
|
578
|
+
var i = r, u = t.map(function(d, f) {
|
|
579
|
+
return zt(e, d, f, i, n);
|
|
580
|
+
}).join(""), c = {
|
|
581
|
+
r: r + 1
|
|
582
|
+
};
|
|
583
|
+
return o && (c.ht = o, c.customHeight = 1), e("row", c, u, r);
|
|
584
|
+
}
|
|
585
|
+
function zt(e, t, r, n, o) {
|
|
586
|
+
var a = o.findOrCreateCellStyle, s = o.findOrCreateSharedString, l = o.hasDefaultFont, i = o.dateFormat;
|
|
587
|
+
if (t == null)
|
|
588
|
+
return "";
|
|
589
|
+
var u = dr(t) ? t : {
|
|
590
|
+
value: t
|
|
591
|
+
}, c = cr(u), d = u.type, f = u.value, p = u.format;
|
|
592
|
+
if (Vt(f) ? f = null : d === void 0 && (d = Mt(f), d === void 0 && (d = String, f = String(f))), p) {
|
|
593
|
+
if (d !== Date && d !== Number && d !== String && d !== "Formula")
|
|
594
|
+
throw new Error('`format` "'.concat(p, '" was specified on a cell of type `').concat(d, '`. `format` could only be specified on a cell of type `Date`, `Number`, `String` or `"Formula"`.'));
|
|
595
|
+
if (d === String && p !== "@")
|
|
596
|
+
throw new Error('`format` "'.concat(p, '" was specified on a cell of type `String`. The only supported `format` for a cell of type `String` is "@".'));
|
|
597
|
+
} else
|
|
598
|
+
d === Date && (p = i);
|
|
599
|
+
var h = !!p, g = !!c, m;
|
|
600
|
+
return (l || h || g) && (m = a(kt({
|
|
601
|
+
format: p
|
|
602
|
+
}, c))), Ft(e, {
|
|
603
|
+
value: f,
|
|
604
|
+
type: d,
|
|
605
|
+
cellStyleId: m,
|
|
606
|
+
findOrCreateSharedString: s
|
|
607
|
+
}, r, n);
|
|
608
|
+
}
|
|
609
|
+
function Vt(e) {
|
|
610
|
+
return e == null || e === "";
|
|
611
|
+
}
|
|
612
|
+
function Mt(e) {
|
|
613
|
+
switch ($(e)) {
|
|
614
|
+
case "string":
|
|
615
|
+
return String;
|
|
616
|
+
case "number":
|
|
617
|
+
return Number;
|
|
618
|
+
case "boolean":
|
|
619
|
+
return Boolean;
|
|
620
|
+
default:
|
|
621
|
+
if (e instanceof Date)
|
|
622
|
+
return Date;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
function Xt(e, t, r) {
|
|
626
|
+
var n = t.map(function(o, a) {
|
|
627
|
+
return Ut(e, o, a, r);
|
|
628
|
+
}).join("");
|
|
629
|
+
return e("sheetData", null, n);
|
|
630
|
+
}
|
|
631
|
+
function _t(e, t) {
|
|
632
|
+
for (var r = [], n = function() {
|
|
633
|
+
e = e.slice();
|
|
634
|
+
for (var f = 0; f < e.length; )
|
|
635
|
+
e[f] = e[f].slice(), f++;
|
|
636
|
+
return n = function() {
|
|
637
|
+
return e;
|
|
638
|
+
}, e;
|
|
639
|
+
}, o = 0; o < e.length; ) {
|
|
640
|
+
for (var a = e[o], s = 0; s < a.length; ) {
|
|
641
|
+
var l = a[s];
|
|
642
|
+
if (l) {
|
|
643
|
+
var i = l.rowSpan, u = i === void 0 ? 1 : i, c = typeof l.span == "number" ? l.span : l.columnSpan;
|
|
644
|
+
typeof c != "number" && (c = 1), (c > 1 || u > 1) && (Ht(e, o, s, c, u, n), r.push([[o, s], [o + (u ? u - 1 : 0), s + (c ? c - 1 : 0)]]));
|
|
645
|
+
}
|
|
646
|
+
s++;
|
|
647
|
+
}
|
|
648
|
+
o++;
|
|
649
|
+
}
|
|
650
|
+
return {
|
|
651
|
+
sheetData: e,
|
|
652
|
+
mergedCells: r
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
function Ht(e, t, r, n, o, a, s) {
|
|
656
|
+
var l = cr(e[t][r]);
|
|
657
|
+
l && (e = a());
|
|
658
|
+
for (var i = t; i <= t + (o - 1); ) {
|
|
659
|
+
for (var u = r; u <= r + (n - 1); ) {
|
|
660
|
+
var c = e[i][u];
|
|
661
|
+
if (i > t || u > r) {
|
|
662
|
+
if (c != null)
|
|
663
|
+
throw new Error("[write-excel-file] When using `columnSpan` or `rowSpan` parameters, all hidden overlapped cells should be represented by `null`s or `undefined`s. Cell at row ".concat(t + 1, " and column ").concat(r + 1, " is configured with `columnSpan` ").concat(n, " and `rowSpan` ").concat(o, ". Cell at row ").concat(i + 1, " and column ").concat(u + 1, " is neither `null` nor `undefined`: ").concat(JSON.stringify(c)));
|
|
664
|
+
l && (e[i][u] = l);
|
|
665
|
+
}
|
|
666
|
+
u++;
|
|
667
|
+
}
|
|
668
|
+
i++;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
function Wt(e, t) {
|
|
672
|
+
return Jt(e) || qt(e, t) || Kt(e, t) || Gt();
|
|
673
|
+
}
|
|
674
|
+
function Gt() {
|
|
675
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
676
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
677
|
+
}
|
|
678
|
+
function Kt(e, t) {
|
|
679
|
+
if (e) {
|
|
680
|
+
if (typeof e == "string") return je(e, t);
|
|
681
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
682
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? je(e, t) : void 0;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
function je(e, t) {
|
|
686
|
+
(t == null || t > e.length) && (t = e.length);
|
|
687
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
688
|
+
return n;
|
|
689
|
+
}
|
|
690
|
+
function qt(e, t) {
|
|
691
|
+
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
692
|
+
if (r != null) {
|
|
693
|
+
var n, o, a, s, l = [], i = !0, u = !1;
|
|
694
|
+
try {
|
|
695
|
+
if (a = (r = r.call(e)).next, t !== 0) for (; !(i = (n = a.call(r)).done) && (l.push(n.value), l.length !== t); i = !0) ;
|
|
696
|
+
} catch (c) {
|
|
697
|
+
u = !0, o = c;
|
|
698
|
+
} finally {
|
|
699
|
+
try {
|
|
700
|
+
if (!i && r.return != null && (s = r.return(), Object(s) !== s)) return;
|
|
701
|
+
} finally {
|
|
702
|
+
if (u) throw o;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
return l;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
function Jt(e) {
|
|
709
|
+
if (Array.isArray(e)) return e;
|
|
710
|
+
}
|
|
711
|
+
function Yt(e, t) {
|
|
712
|
+
if (t.length === 0)
|
|
713
|
+
return "";
|
|
714
|
+
var r = t.map(function(n, o) {
|
|
715
|
+
var a = Wt(n, 2), s = a[0], l = a[1], i = R(s[0], s[1]) + ":" + R(l[0], l[1]);
|
|
716
|
+
return e("mergeCell", {
|
|
717
|
+
ref: i
|
|
718
|
+
}, null, o);
|
|
719
|
+
}).join("");
|
|
720
|
+
return e("mergeCells", {
|
|
721
|
+
count: t.length
|
|
722
|
+
}, r);
|
|
723
|
+
}
|
|
724
|
+
function Zt(e, t) {
|
|
725
|
+
var r = t.orientation;
|
|
726
|
+
if (r) {
|
|
727
|
+
var n = 0.7, o = 0.7, a = 0.75, s = 0.75, l = 0.3, i = 0.3;
|
|
728
|
+
return e("pageMargins", {
|
|
729
|
+
left: n,
|
|
730
|
+
right: o,
|
|
731
|
+
top: a,
|
|
732
|
+
bottom: s,
|
|
733
|
+
header: l,
|
|
734
|
+
footer: i
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
return "";
|
|
738
|
+
}
|
|
739
|
+
function Qt(e, t) {
|
|
740
|
+
var r = t.orientation;
|
|
741
|
+
if (r) {
|
|
742
|
+
var n = 9;
|
|
743
|
+
return e("pageSetup", {
|
|
744
|
+
paperSize: n,
|
|
745
|
+
orientation: A(r)
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
return "";
|
|
749
|
+
}
|
|
750
|
+
function mr(e) {
|
|
751
|
+
return e("drawing", {
|
|
752
|
+
"r:id": "rId-drawing-1"
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
function en(e, t) {
|
|
756
|
+
var r = e.sheetData, n = e.sheetOptions, o = e.sheetIndex, a = e.sheetId, s = e.hasDefaultFont, l = e.findOrCreateCellStyle, i = e.findOrCreateSharedString, u = n.columns, c = n.dateFormat, d = n.orientation, f = n.showGridLines, p = n.rightToLeft, h = n.zoomScale, g = _t(r), m = g.sheetData, w = g.mergedCells, S = {
|
|
757
|
+
sheetIndex: o,
|
|
758
|
+
sheetId: a
|
|
759
|
+
}, x = function(F, b, C, I) {
|
|
760
|
+
return ir("xl/worksheets/sheet{id}.xml", F, b, C, I, S, n, t);
|
|
761
|
+
}, y = '<?xml version="1.0" ?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:mx="http://schemas.microsoft.com/office/mac/excel/2008/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main">' + // The order of elements is dictated by the XLSX spec.
|
|
762
|
+
//
|
|
763
|
+
// `<sheetViews/>`
|
|
764
|
+
dt(x, {
|
|
765
|
+
showGridLines: f,
|
|
766
|
+
rightToLeft: p,
|
|
767
|
+
zoomScale: h
|
|
768
|
+
}, o) + // `<cols/>`
|
|
769
|
+
gt(x, u) + // `<sheetData/>`
|
|
770
|
+
Xt(x, m, {
|
|
771
|
+
findOrCreateCellStyle: l,
|
|
772
|
+
findOrCreateSharedString: i,
|
|
773
|
+
hasDefaultFont: s,
|
|
774
|
+
dateFormat: c
|
|
775
|
+
}) + // `<mergeCells/>`
|
|
776
|
+
Yt(x, w) + // `<pageMargins/>`
|
|
777
|
+
Zt(x, {
|
|
778
|
+
orientation: d
|
|
779
|
+
}) + // `<pageSetup/>`
|
|
780
|
+
Qt(x, {
|
|
781
|
+
orientation: d
|
|
782
|
+
}) + // `<drawing/>`
|
|
783
|
+
mr(x) + // Apply any plugins that insert additional content to this XML.
|
|
784
|
+
E("xl/worksheets/sheet{id}.xml", t, n, {
|
|
785
|
+
sheetIndex: o,
|
|
786
|
+
sheetId: a
|
|
787
|
+
}) + "</worksheet>";
|
|
788
|
+
return y = D(y, "xl/worksheets/sheet{id}.xml", t, n, {
|
|
789
|
+
sheetIndex: o,
|
|
790
|
+
sheetId: a
|
|
791
|
+
}), y;
|
|
792
|
+
}
|
|
793
|
+
function rn(e) {
|
|
794
|
+
var t = e.sheetIndex, r = e.sheetId, n = e.sheetOptions, o = e.features, a = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + // Each sheet has at most one "drawing", so a globally-unique drawing ID is assumed to be the sheet ID.
|
|
795
|
+
pr(r) + // Apply any plugins that insert additional content to this XML.
|
|
796
|
+
E("xl/worksheets/_rels/sheet{id}.xml.rels", o, n, {
|
|
797
|
+
sheetIndex: t,
|
|
798
|
+
sheetId: r
|
|
799
|
+
}) + "</Relationships>";
|
|
800
|
+
return a = D(a, "xl/worksheets/_rels/sheet{id}.xml.rels", o, n, {
|
|
801
|
+
sheetIndex: t,
|
|
802
|
+
sheetId: r
|
|
803
|
+
}), a;
|
|
804
|
+
}
|
|
805
|
+
function pr(e) {
|
|
806
|
+
return '<Relationship Id="rId-drawing-1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing" Target="../drawings/drawing'.concat(e, '.xml"/>');
|
|
807
|
+
}
|
|
808
|
+
function tn(e, t) {
|
|
809
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
810
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
811
|
+
if (Array.isArray(e) || (r = nn(e)) || t) {
|
|
812
|
+
r && (e = r);
|
|
813
|
+
var n = 0;
|
|
814
|
+
return function() {
|
|
815
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
819
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
820
|
+
}
|
|
821
|
+
function nn(e, t) {
|
|
822
|
+
if (e) {
|
|
823
|
+
if (typeof e == "string") return Re(e, t);
|
|
824
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
825
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Re(e, t) : void 0;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
function Re(e, t) {
|
|
829
|
+
(t == null || t > e.length) && (t = e.length);
|
|
830
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
831
|
+
return n;
|
|
832
|
+
}
|
|
833
|
+
function on(e) {
|
|
834
|
+
var t = '<?xml version="1.0"?>';
|
|
835
|
+
t += '<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';
|
|
836
|
+
for (var r = tn(e), n; !(n = r()).done; ) {
|
|
837
|
+
var o = n.value, a = o.trim().length === o.length ? "" : ' xml:space="preserve"';
|
|
838
|
+
t += "<si><t".concat(a, ">"), t += M(o), t += "</t></si>";
|
|
839
|
+
}
|
|
840
|
+
return t += "</sst>", t;
|
|
841
|
+
}
|
|
842
|
+
function le(e) {
|
|
843
|
+
if (e[0] !== "#")
|
|
844
|
+
throw new Error('Color "'.concat(e, '" must start with a "#"'));
|
|
845
|
+
return "FF".concat(e.slice(1).toUpperCase());
|
|
846
|
+
}
|
|
847
|
+
function gr(e) {
|
|
848
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = t.conditionalFormatting, n = e.backgroundColor, o = e.fillPatternStyle, a = e.fillPatternColor, s = !o || o === "solid";
|
|
849
|
+
if (!se(e))
|
|
850
|
+
return '<fill><patternFill patternType="none"/></fill>';
|
|
851
|
+
var l = "<fill>";
|
|
852
|
+
return l += '<patternFill patternType="'.concat(s ? "solid" : o, '">'), l += '<fgColor rgb="'.concat(A(le(s ? n : a)), '"/>'), l += "<bgColor ".concat(s && !r ? 'indexed="64"' : 'rgb="' + A(le(n)) + '"', "/>"), l += "</patternFill>", l += "</fill>", l;
|
|
853
|
+
}
|
|
854
|
+
function hr(e) {
|
|
855
|
+
var t = e.borderColor, r = e.borderStyle, n = e.leftBorderColor, o = e.leftBorderStyle, a = e.rightBorderColor, s = e.rightBorderStyle, l = e.topBorderColor, i = e.topBorderStyle, u = e.bottomBorderColor, c = e.bottomBorderStyle, d = {
|
|
856
|
+
style: o || r,
|
|
857
|
+
color: n || t
|
|
858
|
+
}, f = {
|
|
859
|
+
style: s || r,
|
|
860
|
+
color: a || t
|
|
861
|
+
}, p = {
|
|
862
|
+
style: i || r,
|
|
863
|
+
color: l || t
|
|
864
|
+
}, h = {
|
|
865
|
+
style: c || r,
|
|
866
|
+
color: u || t
|
|
867
|
+
}, g = "<border>";
|
|
868
|
+
return g += Q("left", d), g += Q("right", f), g += Q("top", p), g += Q("bottom", h), g += "<diagonal/>", g += "</border>", g;
|
|
869
|
+
}
|
|
870
|
+
function Q(e, t) {
|
|
871
|
+
var r = t.style, n = t.color;
|
|
872
|
+
n && !r && (r = "thin");
|
|
873
|
+
var o = !!n;
|
|
874
|
+
return "<".concat(e) + (r ? ' style="'.concat(A(r), '"') : "") + (o ? ">" : "/>") + (n ? '<color rgb="'.concat(A(le(n)), '"/>') : "") + (o ? "</".concat(e, ">") : "");
|
|
875
|
+
}
|
|
876
|
+
function yr(e) {
|
|
877
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
878
|
+
t.isDefaultGenericFont;
|
|
879
|
+
var r = e.fontFamily, n = e.fontSize, o = e.fontWeight, a = e.fontStyle, s = e.textDecoration, l = e.textColor, i = "<font>";
|
|
880
|
+
return r && (i += '<name val="'.concat(A(r), '"/>')), typeof n == "number" && (i += '<sz val="'.concat(n, '"/>')), i += '<family val="2"/>', r || typeof n == "number" || (i += '<scheme val="minor"/>'), o === "bold" && (i += "<b/>"), a === "italic" && (i += "<i/>"), s && (s.strikethrough && (i += "<strike/>"), s.underline ? i += "<u/>" : s.doubleUnderline && (i += '<u val="double"/>')), l ? i += '<color rgb="'.concat(A(le(l)), '"/>') : i += '<color theme="1"/>', i += "</font>", i;
|
|
881
|
+
}
|
|
882
|
+
function an(e) {
|
|
883
|
+
var t = e.align, r = e.alignVertical, n = e.textRotation, o = e.indent, a = e.wrap;
|
|
884
|
+
return "<alignment" + (t ? ' horizontal="'.concat(A(t), '"') : "") + (r ? ' vertical="'.concat(A(r), '"') : "") + (n ? ' textRotation="'.concat(sn(ln(n)), '"') : "") + (o ? ' indent="'.concat(A(String(o)), '"') : "") + (a ? ' wrapText="1"' : "") + "/>";
|
|
885
|
+
}
|
|
886
|
+
function ln(e) {
|
|
887
|
+
if (!(e >= -90 && e <= 90))
|
|
888
|
+
throw new Error("Unsupported text rotation angle: ".concat(e, ". Values from -90 to 90 are supported."));
|
|
889
|
+
return e;
|
|
890
|
+
}
|
|
891
|
+
function sn(e) {
|
|
892
|
+
return e < 0 ? 90 - e : e;
|
|
893
|
+
}
|
|
894
|
+
function X(e) {
|
|
895
|
+
"@babel/helpers - typeof";
|
|
896
|
+
return X = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
897
|
+
return typeof t;
|
|
898
|
+
} : function(t) {
|
|
899
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
900
|
+
}, X(e);
|
|
901
|
+
}
|
|
902
|
+
function $e(e, t) {
|
|
903
|
+
var r = Object.keys(e);
|
|
904
|
+
if (Object.getOwnPropertySymbols) {
|
|
905
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
906
|
+
t && (n = n.filter(function(o) {
|
|
907
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
908
|
+
})), r.push.apply(r, n);
|
|
909
|
+
}
|
|
910
|
+
return r;
|
|
911
|
+
}
|
|
912
|
+
function Le(e) {
|
|
913
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
914
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
915
|
+
t % 2 ? $e(Object(r), !0).forEach(function(n) {
|
|
916
|
+
un(e, n, r[n]);
|
|
917
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : $e(Object(r)).forEach(function(n) {
|
|
918
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
return e;
|
|
922
|
+
}
|
|
923
|
+
function un(e, t, r) {
|
|
924
|
+
return (t = fn(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
925
|
+
}
|
|
926
|
+
function fn(e) {
|
|
927
|
+
var t = cn(e, "string");
|
|
928
|
+
return X(t) == "symbol" ? t : t + "";
|
|
929
|
+
}
|
|
930
|
+
function cn(e, t) {
|
|
931
|
+
if (X(e) != "object" || !e) return e;
|
|
932
|
+
var r = e[Symbol.toPrimitive];
|
|
933
|
+
if (r !== void 0) {
|
|
934
|
+
var n = r.call(e, t);
|
|
935
|
+
if (X(n) != "object") return n;
|
|
936
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
937
|
+
}
|
|
938
|
+
return (t === "string" ? String : Number)(e);
|
|
939
|
+
}
|
|
940
|
+
var vr = 100;
|
|
941
|
+
function dn(e) {
|
|
942
|
+
var t = [], r = {}, n = [], o = {}, a = [], s = {}, l = [], i = {}, u = [], c = {}, d = a.length;
|
|
943
|
+
s[B(e)] = d, a.push(e || {});
|
|
944
|
+
var f = {};
|
|
945
|
+
i[B(f)] = l.length, l.push(f);
|
|
946
|
+
var p = {};
|
|
947
|
+
c[B(p)] = u.length, u.push(p);
|
|
948
|
+
var h = {
|
|
949
|
+
gray125: !0
|
|
950
|
+
};
|
|
951
|
+
l.push(h);
|
|
952
|
+
function g(m) {
|
|
953
|
+
var w = m.format, S = m.align, x = m.alignVertical, y = m.textRotation, v = m.indent, F = m.wrap, b = m.fontFamily, C = m.fontSize, I = m.fontWeight, O = m.fontStyle, T = m.textDecoration, ue = m.textColor, G = m.backgroundColor, K = m.fillPatternStyle, q = m.fillPatternColor, J = m.borderColor, Y = m.borderStyle, Z = m.leftBorderColor, kr = m.leftBorderStyle, jr = m.rightBorderColor, Rr = m.rightBorderStyle, $r = m.topBorderColor, Lr = m.topBorderStyle, Nr = m.bottomBorderColor, Ur = m.bottomBorderStyle, L = {
|
|
954
|
+
fontFamily: b,
|
|
955
|
+
fontSize: C,
|
|
956
|
+
fontWeight: I,
|
|
957
|
+
fontStyle: O,
|
|
958
|
+
textDecoration: T,
|
|
959
|
+
textColor: ue
|
|
960
|
+
}, we = {
|
|
961
|
+
backgroundColor: G,
|
|
962
|
+
fillPatternStyle: K,
|
|
963
|
+
fillPatternColor: q
|
|
964
|
+
}, fe = {
|
|
965
|
+
borderColor: J,
|
|
966
|
+
borderStyle: Y,
|
|
967
|
+
leftBorderColor: Z,
|
|
968
|
+
leftBorderStyle: kr,
|
|
969
|
+
rightBorderColor: jr,
|
|
970
|
+
rightBorderStyle: Rr,
|
|
971
|
+
topBorderColor: $r,
|
|
972
|
+
topBorderStyle: Lr,
|
|
973
|
+
bottomBorderColor: Nr,
|
|
974
|
+
bottomBorderStyle: Ur
|
|
975
|
+
}, zr = {
|
|
976
|
+
align: S,
|
|
977
|
+
alignVertical: x,
|
|
978
|
+
textRotation: y,
|
|
979
|
+
indent: v,
|
|
980
|
+
wrap: F
|
|
981
|
+
}, Se = B(w), Ce = B(L), Ie = B(we), Fe = B(fe), ce = B(m), Vr = function() {
|
|
982
|
+
var N;
|
|
983
|
+
w && (N = r[Se], N === void 0 && (N = vr + t.length, r[Se] = N, t.push(w)));
|
|
984
|
+
var k;
|
|
985
|
+
be(L) ? (k = s[Ce], k === void 0 && (k = a.length, s[Ce] = k, a.push(Le(Le({}, L), {}, {
|
|
986
|
+
fontSize: L.fontSize || e && e.fontSize,
|
|
987
|
+
fontFamily: L.fontFamily || e && e.fontFamily
|
|
988
|
+
})))) : e && (k = d);
|
|
989
|
+
var U;
|
|
990
|
+
se(we) && (U = i[Ie], U === void 0 && (U = l.length, i[Ie] = U, l.push({
|
|
991
|
+
backgroundColor: G,
|
|
992
|
+
fillPatternStyle: K,
|
|
993
|
+
fillPatternColor: q
|
|
994
|
+
})));
|
|
995
|
+
var z;
|
|
996
|
+
ve(fe) && (z = c[Fe], z === void 0 && (z = u.length, c[Fe] = z, u.push(fe)));
|
|
997
|
+
var Ae = n.length;
|
|
998
|
+
return o[ce] = Ae, n.push({
|
|
999
|
+
formatId: N,
|
|
1000
|
+
fontId: k,
|
|
1001
|
+
fillId: U,
|
|
1002
|
+
borderId: z,
|
|
1003
|
+
alignment: zr
|
|
1004
|
+
}), Ae;
|
|
1005
|
+
};
|
|
1006
|
+
return o[ce] !== void 0 ? o[ce] : Vr();
|
|
1007
|
+
}
|
|
1008
|
+
return g({}), {
|
|
1009
|
+
getCellStyles: function() {
|
|
1010
|
+
return {
|
|
1011
|
+
formats: t,
|
|
1012
|
+
styles: n,
|
|
1013
|
+
fonts: a,
|
|
1014
|
+
fills: l,
|
|
1015
|
+
borders: u
|
|
1016
|
+
};
|
|
1017
|
+
},
|
|
1018
|
+
findOrCreateCellStyle: g
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
function B(e) {
|
|
1022
|
+
return JSON.stringify(e);
|
|
1023
|
+
}
|
|
1024
|
+
function ee(e, t) {
|
|
1025
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1026
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
1027
|
+
if (Array.isArray(e) || (r = mn(e)) || t) {
|
|
1028
|
+
r && (e = r);
|
|
1029
|
+
var n = 0;
|
|
1030
|
+
return function() {
|
|
1031
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1034
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1035
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1036
|
+
}
|
|
1037
|
+
function mn(e, t) {
|
|
1038
|
+
if (e) {
|
|
1039
|
+
if (typeof e == "string") return Ne(e, t);
|
|
1040
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
1041
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ne(e, t) : void 0;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
function Ne(e, t) {
|
|
1045
|
+
(t == null || t > e.length) && (t = e.length);
|
|
1046
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1047
|
+
return n;
|
|
1048
|
+
}
|
|
1049
|
+
function pn(e, t, r) {
|
|
1050
|
+
var n = e.formats, o = e.styles, a = e.fonts, s = e.fills, l = e.borders, i = '<?xml version="1.0" ?>';
|
|
1051
|
+
if (i += '<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">', n.length > 0) {
|
|
1052
|
+
i += '<numFmts count="'.concat(n.length, '">');
|
|
1053
|
+
for (var u = 0; u < n.length; u++)
|
|
1054
|
+
i += '<numFmt numFmtId="'.concat(vr + u, '" formatCode="').concat(A(n[u]), '"/>');
|
|
1055
|
+
i += "</numFmts>";
|
|
1056
|
+
}
|
|
1057
|
+
i += '<fonts count="'.concat(a.length, '">');
|
|
1058
|
+
for (var c = ee(a), d; !(d = c()).done; ) {
|
|
1059
|
+
var f = d.value;
|
|
1060
|
+
i += yr(f);
|
|
1061
|
+
}
|
|
1062
|
+
i += "</fonts>", i += '<fills count="'.concat(s.length, '">');
|
|
1063
|
+
for (var p = ee(s), h; !(h = p()).done; ) {
|
|
1064
|
+
var g = h.value;
|
|
1065
|
+
g.gray125 ? (i += "<fill>", i += '<patternFill patternType="gray125"/>', i += "</fill>") : i += gr(g);
|
|
1066
|
+
}
|
|
1067
|
+
i += "</fills>", i += '<borders count="'.concat(l.length, '">');
|
|
1068
|
+
for (var m = ee(l), w; !(w = m()).done; ) {
|
|
1069
|
+
var S = w.value;
|
|
1070
|
+
i += hr(S);
|
|
1071
|
+
}
|
|
1072
|
+
i += "</borders>", i += '<cellXfs count="'.concat(o.length, '">');
|
|
1073
|
+
for (var x = ee(o), y; !(y = x()).done; ) {
|
|
1074
|
+
var v = y.value, F = v.fontId, b = v.fillId, C = v.borderId, I = v.alignment, O = v.formatId;
|
|
1075
|
+
i += "<xf " + [
|
|
1076
|
+
O === void 0 ? void 0 : 'numFmtId="'.concat(O, '" applyNumberFormat="1"'),
|
|
1077
|
+
F === void 0 ? void 0 : 'fontId="'.concat(F, '" applyFont="1"'),
|
|
1078
|
+
b === void 0 ? void 0 : 'fillId="'.concat(b, '" applyFill="1"'),
|
|
1079
|
+
C === void 0 ? void 0 : 'borderId="'.concat(C, '" applyBorder="1"'),
|
|
1080
|
+
ge(I) ? 'applyAlignment="1"' : void 0
|
|
1081
|
+
// 'xfId="0"'
|
|
1082
|
+
].filter(function(T) {
|
|
1083
|
+
return T;
|
|
1084
|
+
}).join(" ") + ">" + // Possible horizontal alignment values:
|
|
1085
|
+
// left, center, right, fill, justify, center_across, distributed.
|
|
1086
|
+
// Possible vertical alignment values:
|
|
1087
|
+
// top, vcenter, bottom, vjustify, vdistributed.
|
|
1088
|
+
// https://xlsxwriter.readthedocs.io/format.html#set_align
|
|
1089
|
+
(ge(I) ? an(I) : "") + "</xf>";
|
|
1090
|
+
}
|
|
1091
|
+
return i += "</cellXfs>", i += E("xl/styles.xml", r, t), i += "</styleSheet>", i = D(i, "xl/styles.xml", r, t), i;
|
|
1092
|
+
}
|
|
1093
|
+
function br(e) {
|
|
1094
|
+
for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = t.tagName, n = t.stopAfterFirstMatch, o = new RegExp(xr(r), n ? void 0 : "g"), a = [], s; (s = o.exec(e)) !== null; ) {
|
|
1095
|
+
for (var l = s[0], i = r || s[1], u = {}, c = new RegExp('\\s+([^\\s=>]+)(?:="([^\\s=>]+)")', "g"), d = void 0; (d = c.exec(l)) !== null; )
|
|
1096
|
+
u[d[1]] = d[2];
|
|
1097
|
+
var f = {
|
|
1098
|
+
tagName: i,
|
|
1099
|
+
// openingTagMarkup: openingTag,
|
|
1100
|
+
openingTagStartIndex: s.index,
|
|
1101
|
+
openingTagEndIndex: s.index + l.length - 1,
|
|
1102
|
+
openingTagAttributes: u,
|
|
1103
|
+
selfClosingTag: !1,
|
|
1104
|
+
// closingTagMarkup: undefined,
|
|
1105
|
+
closingTagStartIndex: void 0,
|
|
1106
|
+
closingTagEndIndex: void 0
|
|
1107
|
+
};
|
|
1108
|
+
if (l[l.length - 2] === "/")
|
|
1109
|
+
f.selfClosingTag = !0;
|
|
1110
|
+
else {
|
|
1111
|
+
var p = gn(e, f.openingTagEndIndex + 1, i);
|
|
1112
|
+
if (!p)
|
|
1113
|
+
throw new Error("Invalid XML: opening tag was found but closing tag was not: </".concat(i, ">"));
|
|
1114
|
+
f.closingTagStartIndex = p[0], f.closingTagEndIndex = p[1];
|
|
1115
|
+
}
|
|
1116
|
+
if (a.push(f), n)
|
|
1117
|
+
break;
|
|
1118
|
+
f.selfClosingTag ? o.lastIndex = f.openingTagEndIndex + 1 : o.lastIndex = f.closingTagEndIndex + 1;
|
|
1119
|
+
}
|
|
1120
|
+
return a;
|
|
1121
|
+
}
|
|
1122
|
+
function gn(e, t, r) {
|
|
1123
|
+
var n = new RegExp("<(/)?" + r + "(?:\\s+[^>]+|/)?>", "g");
|
|
1124
|
+
n.lastIndex = t;
|
|
1125
|
+
for (var o = 0, a; (a = n.exec(e)) !== null; ) {
|
|
1126
|
+
var s = a[0], l = a[1];
|
|
1127
|
+
if (l)
|
|
1128
|
+
if (o > 0)
|
|
1129
|
+
o--;
|
|
1130
|
+
else
|
|
1131
|
+
return [a.index, a.index + s.length - 1];
|
|
1132
|
+
else
|
|
1133
|
+
o++;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
function xr(e) {
|
|
1137
|
+
return "<" + (e || "([^\\s/>]+)") + "(?:\\s+[^>]+|/)?>";
|
|
1138
|
+
}
|
|
1139
|
+
function P(e, t) {
|
|
1140
|
+
var r = br(e, {
|
|
1141
|
+
tagName: t,
|
|
1142
|
+
stopAfterFirstMatch: !0
|
|
1143
|
+
});
|
|
1144
|
+
return r[0];
|
|
1145
|
+
}
|
|
1146
|
+
function wr(e, t, r) {
|
|
1147
|
+
return r ? t.selfClosingTag ? e.slice(0, t.openingTagEndIndex - 1) + ">" + r + "</" + t.tagName + ">" + e.slice(t.openingTagEndIndex + 1) : e.slice(0, t.openingTagEndIndex + 1) + r + e.slice(t.closingTagStartIndex) : t.selfClosingTag ? e : e.slice(0, t.openingTagEndIndex) + "/>" + e.slice(t.closingTagEndIndex + 1);
|
|
1148
|
+
}
|
|
1149
|
+
function ne(e, t, r) {
|
|
1150
|
+
return t.selfClosingTag ? wr(e, t, r) : e.slice(0, t.closingTagStartIndex) + r + e.slice(t.closingTagStartIndex);
|
|
1151
|
+
}
|
|
1152
|
+
function Sr(e, t) {
|
|
1153
|
+
return t.selfClosingTag ? "" : e.substring(t.openingTagEndIndex + 1, t.closingTagStartIndex);
|
|
1154
|
+
}
|
|
1155
|
+
function Cr(e, t) {
|
|
1156
|
+
var r = t.openingTagEndIndex + 1;
|
|
1157
|
+
e.openingTagStartIndex += r, e.openingTagEndIndex += r, e.selfClosingTag || (e.closingTagStartIndex += r, e.closingTagEndIndex += r);
|
|
1158
|
+
}
|
|
1159
|
+
function hn(e, t) {
|
|
1160
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1161
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
1162
|
+
if (Array.isArray(e) || (r = yn(e)) || t) {
|
|
1163
|
+
r && (e = r);
|
|
1164
|
+
var n = 0;
|
|
1165
|
+
return function() {
|
|
1166
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1170
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1171
|
+
}
|
|
1172
|
+
function yn(e, t) {
|
|
1173
|
+
if (e) {
|
|
1174
|
+
if (typeof e == "string") return Ue(e, t);
|
|
1175
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
1176
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ue(e, t) : void 0;
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
function Ue(e, t) {
|
|
1180
|
+
(t == null || t > e.length) && (t = e.length);
|
|
1181
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1182
|
+
return n;
|
|
1183
|
+
}
|
|
1184
|
+
function ze(e, t) {
|
|
1185
|
+
for (var r = br(Sr(e, t)), n = hn(r), o; !(o = n()).done; ) {
|
|
1186
|
+
var a = o.value;
|
|
1187
|
+
Cr(a, t);
|
|
1188
|
+
}
|
|
1189
|
+
return r;
|
|
1190
|
+
}
|
|
1191
|
+
function Ir(e, t, r) {
|
|
1192
|
+
return t.selfClosingTag ? wr(e, t, r) : e.slice(0, t.openingTagEndIndex + 1) + r + e.slice(t.openingTagEndIndex + 1);
|
|
1193
|
+
}
|
|
1194
|
+
function Ve(e, t) {
|
|
1195
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1196
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
1197
|
+
if (Array.isArray(e) || (r = vn(e)) || t) {
|
|
1198
|
+
r && (e = r);
|
|
1199
|
+
var n = 0;
|
|
1200
|
+
return function() {
|
|
1201
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1205
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1206
|
+
}
|
|
1207
|
+
function vn(e, t) {
|
|
1208
|
+
if (e) {
|
|
1209
|
+
if (typeof e == "string") return Me(e, t);
|
|
1210
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
1211
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Me(e, t) : void 0;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
function Me(e, t) {
|
|
1215
|
+
(t == null || t > e.length) && (t = e.length);
|
|
1216
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1217
|
+
return n;
|
|
1218
|
+
}
|
|
1219
|
+
function Fr(e, t, r) {
|
|
1220
|
+
for (var n = arguments.length, o = new Array(n > 3 ? n - 3 : 0), a = 3; a < n; a++)
|
|
1221
|
+
o[a - 3] = arguments[a];
|
|
1222
|
+
if (o.length === 0)
|
|
1223
|
+
throw new Error("At least one parent element tag name is required");
|
|
1224
|
+
o = o.slice().reverse();
|
|
1225
|
+
for (var s, l = function() {
|
|
1226
|
+
var y = u.value;
|
|
1227
|
+
if (s ? s = ze(e, s).find(function(v) {
|
|
1228
|
+
return v.tagName === y;
|
|
1229
|
+
}) : s = P(e, y), !s)
|
|
1230
|
+
throw new Error("Element not found: <".concat(y, ">"));
|
|
1231
|
+
}, i = Ve(o), u; !(u = i()).done; )
|
|
1232
|
+
l();
|
|
1233
|
+
var c = t.match(bn);
|
|
1234
|
+
if (!c)
|
|
1235
|
+
throw new Error("Couldn't extract tag name from markup: ".concat(t));
|
|
1236
|
+
var d = c[1];
|
|
1237
|
+
if (!r || r.length < 2)
|
|
1238
|
+
return ne(e, s, t);
|
|
1239
|
+
var f = ze(e, s);
|
|
1240
|
+
if (f.length === 0)
|
|
1241
|
+
return ne(e, s, t);
|
|
1242
|
+
var p = r.indexOf(d);
|
|
1243
|
+
if (p < 0)
|
|
1244
|
+
return ne(e, s, t);
|
|
1245
|
+
for (var h = r.slice(0, p).reverse(), g = function() {
|
|
1246
|
+
var y = S.value, v = f.find(function(F) {
|
|
1247
|
+
return F.tagName === y;
|
|
1248
|
+
});
|
|
1249
|
+
if (v)
|
|
1250
|
+
return {
|
|
1251
|
+
v: e.slice(0, v.selfClosingTag ? v.openingTagEndIndex + 1 : v.closingTagEndIndex + 1) + t + e.slice(v.selfClosingTag ? v.openingTagEndIndex + 1 : v.closingTagEndIndex + 1)
|
|
1252
|
+
};
|
|
1253
|
+
}, m, w = Ve(h), S; !(S = w()).done; )
|
|
1254
|
+
if (m = g(), m) return m.v;
|
|
1255
|
+
return Ir(e, s, t);
|
|
1256
|
+
}
|
|
1257
|
+
var bn = new RegExp(xr());
|
|
1258
|
+
const xn = {
|
|
1259
|
+
// This is what Google AI returned for a search query: "xlsx workbook.xml elements order".
|
|
1260
|
+
// They say, this order is defined in `CT_Workbook` schema of ECMA-376 specification.
|
|
1261
|
+
"xl/workbook.xml": [["workbook", [
|
|
1262
|
+
"workbookPr",
|
|
1263
|
+
// (Workbook Properties)
|
|
1264
|
+
"bookViews",
|
|
1265
|
+
// (Book Views)
|
|
1266
|
+
"sheets",
|
|
1267
|
+
// (List of sheets)
|
|
1268
|
+
"pivotCaches",
|
|
1269
|
+
// (If applicable)
|
|
1270
|
+
"definedNames",
|
|
1271
|
+
// (Named ranges)
|
|
1272
|
+
"calcPr"
|
|
1273
|
+
// (Calculation properties)
|
|
1274
|
+
]]],
|
|
1275
|
+
// This is what Google AI returned for a search query: "xlsx styles.xml elements order".
|
|
1276
|
+
// They say, this order is defined in `CT_Stylesheet` schema of ECMA-376 specification.
|
|
1277
|
+
"xl/styles.xml": [["styleSheet", [
|
|
1278
|
+
"numFmts",
|
|
1279
|
+
// Defines custom number formats.
|
|
1280
|
+
"fonts",
|
|
1281
|
+
// Contains font definitions (font name, size, color).
|
|
1282
|
+
"fills",
|
|
1283
|
+
// Defines cell background colors/patterns.
|
|
1284
|
+
"borders",
|
|
1285
|
+
// Defines cell borders.
|
|
1286
|
+
"cellStyleXfs",
|
|
1287
|
+
// Master cell styles (usually style 0 is "Normal").
|
|
1288
|
+
"cellXfs",
|
|
1289
|
+
// Actual cell formatting definitions (<xf>) referenced by cells.
|
|
1290
|
+
"cellStyles",
|
|
1291
|
+
// Connects named styles to cellStyleXfs.
|
|
1292
|
+
"dxfs",
|
|
1293
|
+
// Differential formats (conditional formatting).
|
|
1294
|
+
"tableStyles"
|
|
1295
|
+
// Table-specific styles.
|
|
1296
|
+
]]],
|
|
1297
|
+
// This is what Google AI returned for a search query: "xlsx sheet.xml elements order".
|
|
1298
|
+
// They say, this order is defined in `CT_Worksheet` schema of ECMA-376 specification.
|
|
1299
|
+
"xl/worksheets/sheet{id}.xml": [["worksheet", [
|
|
1300
|
+
"sheetPr",
|
|
1301
|
+
// Sheet properties (e.g., tab color, filter configurations).
|
|
1302
|
+
"dimension",
|
|
1303
|
+
// Defines the range of used cells (e.g., ref="A1:C10").
|
|
1304
|
+
"sheetViews",
|
|
1305
|
+
// View settings like freeze panes, zoom level, and whether the sheet is selected.
|
|
1306
|
+
"sheetFormatPr",
|
|
1307
|
+
// Default row height and column width properties.
|
|
1308
|
+
"cols",
|
|
1309
|
+
// Defines column-specific properties (width, hidden status).
|
|
1310
|
+
"sheetData",
|
|
1311
|
+
// (Required) The main container for cell data, rows, and values.
|
|
1312
|
+
"sheetCalcPr",
|
|
1313
|
+
// Calculation properties.
|
|
1314
|
+
"sheetProtection",
|
|
1315
|
+
// Sheet-level security and locked status.
|
|
1316
|
+
"protectedRanges",
|
|
1317
|
+
// Specific ranges that are protected.
|
|
1318
|
+
"scenarios",
|
|
1319
|
+
// Worksheet scenarios.
|
|
1320
|
+
"autoFilter",
|
|
1321
|
+
// Filter range definitions.
|
|
1322
|
+
"sortState",
|
|
1323
|
+
// Current sort information.
|
|
1324
|
+
"dataConsolidate",
|
|
1325
|
+
// Data consolidation settings.
|
|
1326
|
+
"customSheetViews",
|
|
1327
|
+
// Custom view settings.
|
|
1328
|
+
"mergeCells",
|
|
1329
|
+
// Defines ranges of merged cells.
|
|
1330
|
+
"phoneticPr",
|
|
1331
|
+
// Phonetic information properties.
|
|
1332
|
+
"conditionalFormatting",
|
|
1333
|
+
// Rules for formatting based on cell values.
|
|
1334
|
+
"dataValidations",
|
|
1335
|
+
// Data entry rules and dropdowns.
|
|
1336
|
+
"hyperlinks",
|
|
1337
|
+
// Links to external sites or other sheet locations.
|
|
1338
|
+
"printOptions",
|
|
1339
|
+
// Defines specific printing preferences, such as centering, gridlines, and headings.
|
|
1340
|
+
"pageMargins",
|
|
1341
|
+
// Defines the white space between the worksheet data and the edges of the printed page.
|
|
1342
|
+
"pageSetup",
|
|
1343
|
+
// Printing and layout settings.
|
|
1344
|
+
"headerFooter",
|
|
1345
|
+
// Sheet header and footer content.
|
|
1346
|
+
"rowBreaks",
|
|
1347
|
+
// Manual page breaks.
|
|
1348
|
+
"colBreaks",
|
|
1349
|
+
// Manual page breaks.
|
|
1350
|
+
"drawing",
|
|
1351
|
+
// References to graphics or charts (points to drawing.xml).
|
|
1352
|
+
"legacyDrawing",
|
|
1353
|
+
// References to legacy objects like comments or form controls.
|
|
1354
|
+
"picture",
|
|
1355
|
+
// Background image properties.
|
|
1356
|
+
"oleObjects",
|
|
1357
|
+
// Embedded OLE objects.
|
|
1358
|
+
"controls",
|
|
1359
|
+
// Form or ActiveX controls.
|
|
1360
|
+
"tableParts",
|
|
1361
|
+
// Links to defined Excel tables within the sheet.
|
|
1362
|
+
"extLst"
|
|
1363
|
+
// Extension list for future-proofing and custom metadata.
|
|
1364
|
+
]]]
|
|
1365
|
+
};
|
|
1366
|
+
function Ar(e) {
|
|
1367
|
+
var t = xn[e];
|
|
1368
|
+
if (t) {
|
|
1369
|
+
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
|
|
1370
|
+
n[o - 1] = arguments[o];
|
|
1371
|
+
if (n.length === 0)
|
|
1372
|
+
throw new Error("At least one parent element tag name is required");
|
|
1373
|
+
for (var a = function() {
|
|
1374
|
+
var c = i[l], d = t.find(function(f) {
|
|
1375
|
+
return Array.isArray(f) ? f[0] === c : f === c;
|
|
1376
|
+
});
|
|
1377
|
+
if (!d)
|
|
1378
|
+
return {
|
|
1379
|
+
v: void 0
|
|
1380
|
+
};
|
|
1381
|
+
if (Array.isArray(d))
|
|
1382
|
+
t = d[1];
|
|
1383
|
+
else
|
|
1384
|
+
return {
|
|
1385
|
+
v: void 0
|
|
1386
|
+
};
|
|
1387
|
+
}, s, l = 0, i = n; l < i.length; l++)
|
|
1388
|
+
if (s = a(), s) return s.v;
|
|
1389
|
+
if (t)
|
|
1390
|
+
return t.map(function(u) {
|
|
1391
|
+
return Array.isArray(u) ? u[0] : u;
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
function oe(e, t) {
|
|
1396
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1397
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
1398
|
+
if (Array.isArray(e) || (r = wn(e)) || t) {
|
|
1399
|
+
r && (e = r);
|
|
1400
|
+
var n = 0;
|
|
1401
|
+
return function() {
|
|
1402
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1403
|
+
};
|
|
1404
|
+
}
|
|
1405
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1406
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1407
|
+
}
|
|
1408
|
+
function wn(e, t) {
|
|
1409
|
+
if (e) {
|
|
1410
|
+
if (typeof e == "string") return Xe(e, t);
|
|
1411
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
1412
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Xe(e, t) : void 0;
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
function Xe(e, t) {
|
|
1416
|
+
(t == null || t > e.length) && (t = e.length);
|
|
1417
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1418
|
+
return n;
|
|
1419
|
+
}
|
|
1420
|
+
const Sn = {
|
|
1421
|
+
files: {
|
|
1422
|
+
transform: {
|
|
1423
|
+
"xl/worksheets/sheet{id}.xml": {
|
|
1424
|
+
// For some weird reason, Excel 2007 demands `<conditionalFormatting/>` element to go before `<drawing/>` element.
|
|
1425
|
+
// Because `<drawing/>` element is added before any of the `insert()`s of any features,
|
|
1426
|
+
// this feature has to use a `transform()` function instead of an `insert()` function.
|
|
1427
|
+
transform: function(t, r, n) {
|
|
1428
|
+
n.sheetIndex, n.sheetId;
|
|
1429
|
+
var o = r.conditionalFormatting;
|
|
1430
|
+
if (o) {
|
|
1431
|
+
var a = Cn(o);
|
|
1432
|
+
return Fr(t, a, Ar("xl/worksheets/sheet{id}.xml", "worksheet"), "worksheet");
|
|
1433
|
+
}
|
|
1434
|
+
return t;
|
|
1435
|
+
}
|
|
1436
|
+
},
|
|
1437
|
+
"xl/styles.xml": {
|
|
1438
|
+
insert: function(t) {
|
|
1439
|
+
var r = t.map(function(n) {
|
|
1440
|
+
return n.conditionalFormatting;
|
|
1441
|
+
});
|
|
1442
|
+
if (r.some(Boolean))
|
|
1443
|
+
return In(r);
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
};
|
|
1449
|
+
function Cn(e) {
|
|
1450
|
+
for (var t = "", r = 0, n = oe(e), o; !(o = n()).done; ) {
|
|
1451
|
+
var a = o.value, s = a.cellRange, l = s.from, i = s.to, u = a.condition, c = u.formula, d = u.operator, f = u.value, p = u.value2, h = R(l.row - 1, l.column - 1) + ":" + R(i.row - 1, i.column - 1);
|
|
1452
|
+
t += '<conditionalFormatting sqref="'.concat(h, '">');
|
|
1453
|
+
var g = r + 1, m = a._globalIndex;
|
|
1454
|
+
if (c)
|
|
1455
|
+
t += '<cfRule type="expression" dxfId="'.concat(m, '" priority="').concat(g, '">'), t += "<formula>".concat(M(c), "</formula>"), t += "</cfRule>";
|
|
1456
|
+
else if (d)
|
|
1457
|
+
t += '<cfRule type="cellIs" operator="'.concat(He(d), '" dxfId="').concat(m, '" priority="').concat(g, '">'), t += "<formula>".concat(M(_e(f)), "</formula>"), He(d) === "between" && (t += "<formula>".concat(M(_e(p)), "</formula>")), t += "</cfRule>";
|
|
1458
|
+
else
|
|
1459
|
+
throw new Error(`Invalid conditional formatting rule:
|
|
1460
|
+
`.concat(JSON.stringify(a, null, 2)));
|
|
1461
|
+
t += "</conditionalFormatting>", r++;
|
|
1462
|
+
}
|
|
1463
|
+
return t;
|
|
1464
|
+
}
|
|
1465
|
+
function _e(e) {
|
|
1466
|
+
return typeof e == "string" ? '"' + e + '"' : String(e);
|
|
1467
|
+
}
|
|
1468
|
+
function He(e) {
|
|
1469
|
+
switch (e) {
|
|
1470
|
+
case "<":
|
|
1471
|
+
return "lessThan";
|
|
1472
|
+
case ">":
|
|
1473
|
+
return "greaterThan";
|
|
1474
|
+
case "<=":
|
|
1475
|
+
return "lessThanOrEqual";
|
|
1476
|
+
case ">=":
|
|
1477
|
+
return "greaterThanOrEqual";
|
|
1478
|
+
case "=":
|
|
1479
|
+
return "equal";
|
|
1480
|
+
case "!=":
|
|
1481
|
+
return "notEqual";
|
|
1482
|
+
case "...":
|
|
1483
|
+
return "between";
|
|
1484
|
+
default:
|
|
1485
|
+
throw new Error("Unknown conditional formatting operator: ".concat(e));
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
function In(e) {
|
|
1489
|
+
for (var t = 0, r = oe(e), n; !(n = r()).done; ) {
|
|
1490
|
+
var o = n.value;
|
|
1491
|
+
o && (t += o.length);
|
|
1492
|
+
}
|
|
1493
|
+
var a = "";
|
|
1494
|
+
a += '<dxfs count="'.concat(t, '">');
|
|
1495
|
+
for (var s = oe(e), l; !(l = s()).done; ) {
|
|
1496
|
+
var i = l.value;
|
|
1497
|
+
if (i)
|
|
1498
|
+
for (var u = oe(i), c; !(c = u()).done; ) {
|
|
1499
|
+
var d = c.value, f = d.style, p = f.fontFamily, h = f.fontSize, g = f.fontWeight, m = f.fontStyle, w = f.textDecoration, S = f.textColor, x = f.backgroundColor, y = f.fillPatternStyle, v = f.fillPatternColor, F = f.borderColor, b = f.borderStyle, C = f.leftBorderColor, I = f.leftBorderStyle, O = f.rightBorderColor, T = f.rightBorderStyle, ue = f.topBorderColor, G = f.topBorderStyle, K = f.bottomBorderColor, q = f.bottomBorderStyle;
|
|
1500
|
+
a += "<dxf>";
|
|
1501
|
+
var J = {
|
|
1502
|
+
fontFamily: p,
|
|
1503
|
+
fontSize: h,
|
|
1504
|
+
fontWeight: g,
|
|
1505
|
+
fontStyle: m,
|
|
1506
|
+
textDecoration: w,
|
|
1507
|
+
textColor: S
|
|
1508
|
+
};
|
|
1509
|
+
if (be(J)) {
|
|
1510
|
+
if (p)
|
|
1511
|
+
throw new Error("Conditional formatting can't be used to override font family");
|
|
1512
|
+
if (typeof h == "number")
|
|
1513
|
+
throw new Error("Conditional formatting can't be used to override font size");
|
|
1514
|
+
a += yr(J);
|
|
1515
|
+
}
|
|
1516
|
+
var Y = {
|
|
1517
|
+
backgroundColor: x,
|
|
1518
|
+
fillPatternStyle: y,
|
|
1519
|
+
fillPatternColor: v
|
|
1520
|
+
};
|
|
1521
|
+
se(Y) && (a += gr(Y, {
|
|
1522
|
+
conditionalFormatting: !0
|
|
1523
|
+
}));
|
|
1524
|
+
var Z = {
|
|
1525
|
+
borderColor: F,
|
|
1526
|
+
borderStyle: b,
|
|
1527
|
+
leftBorderColor: C,
|
|
1528
|
+
leftBorderStyle: I,
|
|
1529
|
+
rightBorderColor: O,
|
|
1530
|
+
rightBorderStyle: T,
|
|
1531
|
+
topBorderColor: ue,
|
|
1532
|
+
topBorderStyle: G,
|
|
1533
|
+
bottomBorderColor: K,
|
|
1534
|
+
bottomBorderStyle: q
|
|
1535
|
+
};
|
|
1536
|
+
ve(Z) && (a += hr(Z)), a += "</dxf>";
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
return a += "</dxfs>", a;
|
|
1540
|
+
}
|
|
1541
|
+
function Tr(e) {
|
|
1542
|
+
if (!e)
|
|
1543
|
+
throw new Error("`contentType` is required");
|
|
1544
|
+
var t = e.toLowerCase().replace(/.*\//, "");
|
|
1545
|
+
if (!t)
|
|
1546
|
+
throw new Error("Unsupported `contentType`: " + e);
|
|
1547
|
+
return t;
|
|
1548
|
+
}
|
|
1549
|
+
function _(e) {
|
|
1550
|
+
"@babel/helpers - typeof";
|
|
1551
|
+
return _ = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1552
|
+
return typeof t;
|
|
1553
|
+
} : function(t) {
|
|
1554
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1555
|
+
}, _(e);
|
|
1556
|
+
}
|
|
1557
|
+
function xe(e, t) {
|
|
1558
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1559
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
1560
|
+
if (Array.isArray(e) || (r = Or(e)) || t) {
|
|
1561
|
+
r && (e = r);
|
|
1562
|
+
var n = 0;
|
|
1563
|
+
return function() {
|
|
1564
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1565
|
+
};
|
|
1566
|
+
}
|
|
1567
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1568
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1569
|
+
}
|
|
1570
|
+
function We(e) {
|
|
1571
|
+
return Tn(e) || An(e) || Or(e) || Fn();
|
|
1572
|
+
}
|
|
1573
|
+
function Fn() {
|
|
1574
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1575
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1576
|
+
}
|
|
1577
|
+
function Or(e, t) {
|
|
1578
|
+
if (e) {
|
|
1579
|
+
if (typeof e == "string") return he(e, t);
|
|
1580
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
1581
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? he(e, t) : void 0;
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
function An(e) {
|
|
1585
|
+
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1586
|
+
}
|
|
1587
|
+
function Tn(e) {
|
|
1588
|
+
if (Array.isArray(e)) return he(e);
|
|
1589
|
+
}
|
|
1590
|
+
function he(e, t) {
|
|
1591
|
+
(t == null || t > e.length) && (t = e.length);
|
|
1592
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1593
|
+
return n;
|
|
1594
|
+
}
|
|
1595
|
+
function Ge(e, t) {
|
|
1596
|
+
var r = Object.keys(e);
|
|
1597
|
+
if (Object.getOwnPropertySymbols) {
|
|
1598
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
1599
|
+
t && (n = n.filter(function(o) {
|
|
1600
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
1601
|
+
})), r.push.apply(r, n);
|
|
1602
|
+
}
|
|
1603
|
+
return r;
|
|
1604
|
+
}
|
|
1605
|
+
function re(e) {
|
|
1606
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1607
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
1608
|
+
t % 2 ? Ge(Object(r), !0).forEach(function(n) {
|
|
1609
|
+
Er(e, n, r[n]);
|
|
1610
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ge(Object(r)).forEach(function(n) {
|
|
1611
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
return e;
|
|
1615
|
+
}
|
|
1616
|
+
function Er(e, t, r) {
|
|
1617
|
+
return (t = On(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1618
|
+
}
|
|
1619
|
+
function On(e) {
|
|
1620
|
+
var t = En(e, "string");
|
|
1621
|
+
return _(t) == "symbol" ? t : t + "";
|
|
1622
|
+
}
|
|
1623
|
+
function En(e, t) {
|
|
1624
|
+
if (_(e) != "object" || !e) return e;
|
|
1625
|
+
var r = e[Symbol.toPrimitive];
|
|
1626
|
+
if (r !== void 0) {
|
|
1627
|
+
var n = r.call(e, t);
|
|
1628
|
+
if (_(n) != "object") return n;
|
|
1629
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1630
|
+
}
|
|
1631
|
+
return (t === "string" ? String : Number)(e);
|
|
1632
|
+
}
|
|
1633
|
+
const Dn = {
|
|
1634
|
+
files: {
|
|
1635
|
+
transform: {
|
|
1636
|
+
"[Content_Types].xml": {
|
|
1637
|
+
insert: function(t) {
|
|
1638
|
+
var r = t.map(function(n) {
|
|
1639
|
+
return n.images;
|
|
1640
|
+
});
|
|
1641
|
+
if (r.some(Boolean))
|
|
1642
|
+
return Bn(r);
|
|
1643
|
+
}
|
|
1644
|
+
},
|
|
1645
|
+
"xl/drawings/drawing{id}.xml": {
|
|
1646
|
+
insert: function(t, r) {
|
|
1647
|
+
r.sheetIndex, r.sheetId;
|
|
1648
|
+
var n = t.images;
|
|
1649
|
+
if (n)
|
|
1650
|
+
return kn({
|
|
1651
|
+
images: n
|
|
1652
|
+
});
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
"xl/drawings/_rels/drawing{id}.xml.rels": {
|
|
1656
|
+
insert: function(t, r) {
|
|
1657
|
+
var n = r.sheetIndex;
|
|
1658
|
+
r.sheetId;
|
|
1659
|
+
var o = t.images;
|
|
1660
|
+
if (o)
|
|
1661
|
+
return jn({
|
|
1662
|
+
images: o,
|
|
1663
|
+
sheetIndex: n
|
|
1664
|
+
});
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
},
|
|
1668
|
+
write: {
|
|
1669
|
+
files: function(t, r) {
|
|
1670
|
+
r.read;
|
|
1671
|
+
var n = t.map(function(o) {
|
|
1672
|
+
return o.images;
|
|
1673
|
+
});
|
|
1674
|
+
if (n.some(Boolean))
|
|
1675
|
+
return n.map(function(o, a) {
|
|
1676
|
+
return o ? o.reduce(function(s, l, i) {
|
|
1677
|
+
return re(re({}, s), {}, Er({}, "xl/media/".concat(Dr(l, {
|
|
1678
|
+
sheetIndex: a,
|
|
1679
|
+
imageIndex: i
|
|
1680
|
+
})), l.content));
|
|
1681
|
+
}, {}) : {};
|
|
1682
|
+
}).reduce(function(o, a) {
|
|
1683
|
+
return re(re({}, o), a);
|
|
1684
|
+
}, {});
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
};
|
|
1689
|
+
function Bn(e) {
|
|
1690
|
+
for (var t = e.reduce(function(i, u) {
|
|
1691
|
+
return [].concat(We(i), We(u || []));
|
|
1692
|
+
}, []), r = "", n = xe(Pn(t)), o; !(o = n()).done; ) {
|
|
1693
|
+
var a = o.value, s = a.fileExtension, l = a.contentType;
|
|
1694
|
+
r += '<Default Extension="'.concat(s, '" ContentType="').concat(l, '"/>');
|
|
1695
|
+
}
|
|
1696
|
+
return r;
|
|
1697
|
+
}
|
|
1698
|
+
function Pn(e) {
|
|
1699
|
+
for (var t = [], r = function(l) {
|
|
1700
|
+
var i = Tr(l.contentType), u = t.find(function(c) {
|
|
1701
|
+
return c.fileExtension === i;
|
|
1702
|
+
});
|
|
1703
|
+
u || t.push({
|
|
1704
|
+
fileExtension: i,
|
|
1705
|
+
contentType: l.contentType
|
|
1706
|
+
});
|
|
1707
|
+
}, n = xe(e), o; !(o = n()).done; ) {
|
|
1708
|
+
var a = o.value;
|
|
1709
|
+
r(a);
|
|
1710
|
+
}
|
|
1711
|
+
return t;
|
|
1712
|
+
}
|
|
1713
|
+
function Dr(e, t) {
|
|
1714
|
+
var r = t.sheetIndex, n = t.imageIndex, o = r + 1, a = n + 1;
|
|
1715
|
+
return "sheet".concat(o, "-image").concat(a, ".").concat(Tr(e.contentType));
|
|
1716
|
+
}
|
|
1717
|
+
function kn(e) {
|
|
1718
|
+
for (var t = e.images, r = "", n = 0, o = function() {
|
|
1719
|
+
var i = s.value, u = n + 1, c = function(f) {
|
|
1720
|
+
return $n(f, i.dpi);
|
|
1721
|
+
};
|
|
1722
|
+
r += "<xdr:oneCellAnchor>", r += "<xdr:from>", r += "<xdr:col>".concat(i.anchor.column - 1, "</xdr:col>"), r += "<xdr:colOff>".concat(typeof i.offsetX == "number" ? c(i.offsetX) : 0, "</xdr:colOff>"), r += "<xdr:row>".concat(i.anchor.row - 1, "</xdr:row>"), r += "<xdr:rowOff>".concat(typeof i.offsetY == "number" ? c(i.offsetY) : 0, "</xdr:rowOff>"), r += "</xdr:from>", r += '<xdr:ext cx="'.concat(c(i.width), '" cy="').concat(c(i.height), '"/>'), r += "<xdr:pic>", r += "<xdr:nvPicPr>", r += '<xdr:cNvPr id="'.concat(u, '" name="').concat(i.title ? A(i.title) : "Picture " + u, '" descr="').concat(i.description ? A(i.description) : "", '"/>'), r += "<xdr:cNvPicPr>", r += '<a:picLocks noChangeAspect="1"/>', r += "</xdr:cNvPicPr>", r += "</xdr:nvPicPr>", r += "<xdr:blipFill>", r += '<a:blip xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:embed="rId-image-'.concat(u, '" cstate="print"/>'), r += "<a:stretch>", r += "<a:fillRect/>", r += "</a:stretch>", r += "</xdr:blipFill>", r += "<xdr:spPr>", r += '<a:prstGeom prst="rect">', r += "<a:avLst/>", r += "</a:prstGeom>", r += "</xdr:spPr>", r += "</xdr:pic>", r += "<xdr:clientData/>", r += "</xdr:oneCellAnchor>", n++;
|
|
1723
|
+
}, a = xe(t), s; !(s = a()).done; )
|
|
1724
|
+
o();
|
|
1725
|
+
return r;
|
|
1726
|
+
}
|
|
1727
|
+
function jn(e) {
|
|
1728
|
+
var t = e.images, r = e.sheetIndex;
|
|
1729
|
+
return t.map(function(n, o) {
|
|
1730
|
+
var a = o + 1;
|
|
1731
|
+
return '<Relationship Id="rId-image-'.concat(a, '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/').concat(Dr(n, {
|
|
1732
|
+
sheetIndex: r,
|
|
1733
|
+
imageIndex: o
|
|
1734
|
+
}), '"/>');
|
|
1735
|
+
}).join("");
|
|
1736
|
+
}
|
|
1737
|
+
var Ke = 96, Rn = 96;
|
|
1738
|
+
function $n(e, t) {
|
|
1739
|
+
var r = Ke;
|
|
1740
|
+
return Math.round(e * 9525 * (Ke / r) * (Rn / t));
|
|
1741
|
+
}
|
|
1742
|
+
function Ln(e, t, r) {
|
|
1743
|
+
return t.selfClosingTag ? e.slice(0, t.openingTagStartIndex) + r + e.slice(t.openingTagEndIndex + 1) : e.slice(0, t.openingTagStartIndex) + r + e.slice(t.closingTagEndIndex + 1);
|
|
1744
|
+
}
|
|
1745
|
+
function Nn(e, t, r) {
|
|
1746
|
+
var n = P(Sr(e, r), t);
|
|
1747
|
+
if (n)
|
|
1748
|
+
return Cr(n, r), n;
|
|
1749
|
+
}
|
|
1750
|
+
const Un = {
|
|
1751
|
+
files: {
|
|
1752
|
+
transform: {
|
|
1753
|
+
"xl/worksheets/sheet{id}.xml": {
|
|
1754
|
+
transform: function(t, r, n) {
|
|
1755
|
+
var o = n.sheetIndex, a = n.sheetId;
|
|
1756
|
+
if (qe(r)) {
|
|
1757
|
+
var s = r.stickyRowsCount, l = r.stickyColumnsCount, i = {
|
|
1758
|
+
// The vertical position of the split, in 1/20th of a point (twips),
|
|
1759
|
+
// or, when frozen, the number of visible rows in the top pane(s).
|
|
1760
|
+
ySplit: s || 0,
|
|
1761
|
+
// The horizontal position of the split, in 1/20th of a point (twips),
|
|
1762
|
+
// or, when frozen, the number of visible columns in the left pane(s).
|
|
1763
|
+
xSplit: l || 0,
|
|
1764
|
+
// The visible cell in the top-left corner of the bottom-right pane.
|
|
1765
|
+
topLeftCell: R(s || 0, l || 0),
|
|
1766
|
+
// `activePane` defines which pane is active in a "split" or "frozen" `state`.
|
|
1767
|
+
// Possible values: "bottomLeft", "bottomRight", "topLeft", "topRight".
|
|
1768
|
+
activePane: "bottomRight",
|
|
1769
|
+
// `state: "frozen"` indicates that the panes are frozen, meaning the split area
|
|
1770
|
+
// (usually top rows or leftmost columns) remains fixed while the rest of the sheet scrolls.
|
|
1771
|
+
// Other possible values:
|
|
1772
|
+
// "split" — Indicates that the window is split into separate panes that can be scrolled independently, but are not locked in place.
|
|
1773
|
+
// "frozenSplit" — A combination used in specific scenarios (often by Excel itself) to manage complex freezing.
|
|
1774
|
+
state: "frozen"
|
|
1775
|
+
}, u = P(t, "sheetView");
|
|
1776
|
+
if (u) {
|
|
1777
|
+
var c = Nn(t, "pane", u), d = ie("pane", i);
|
|
1778
|
+
c ? t = Ln(t, c, d) : t = ne(t, u, d);
|
|
1779
|
+
} else {
|
|
1780
|
+
var f = P(t, "sheetViews");
|
|
1781
|
+
if (f)
|
|
1782
|
+
throw new Error("xl/worksheets/sheet".concat(a, ".xml: <sheetViews/> element exists but it doesn't contain any <sheetView/> elements"));
|
|
1783
|
+
var p = {
|
|
1784
|
+
tabSelected: o === 0 ? 1 : 0,
|
|
1785
|
+
// The first sheet is selected by default.
|
|
1786
|
+
workbookViewId: 0
|
|
1787
|
+
}, h = ae("sheetViews") + ae("sheetView", p) + ie("pane", i) + pe("sheetView") + pe("sheetViews"), g = P(t, "worksheet");
|
|
1788
|
+
t = Ir(t, g, h);
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
return t;
|
|
1792
|
+
}
|
|
1793
|
+
},
|
|
1794
|
+
"xl/workbook.xml": {
|
|
1795
|
+
transform: function(t, r) {
|
|
1796
|
+
if (r.some(qe)) {
|
|
1797
|
+
var n = P(t, "workbookView");
|
|
1798
|
+
if (!n) {
|
|
1799
|
+
var o = P(t, "bookViews");
|
|
1800
|
+
if (o)
|
|
1801
|
+
throw new Error("xl/workbook.xml: <bookViews/> element exists but it doesn't contain any <workbookView/> elements");
|
|
1802
|
+
return Fr(t, "<bookViews><workbookView/></bookViews>", Ar("xl/workbook.xml", "workbook"), "workbook");
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
return t;
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
};
|
|
1811
|
+
function qe(e) {
|
|
1812
|
+
return !!e.stickyRowsCount || !!e.stickyColumnsCount;
|
|
1813
|
+
}
|
|
1814
|
+
function zn(e) {
|
|
1815
|
+
var t = [];
|
|
1816
|
+
return t.push(Sn), t.push(Dn), t.push(Un), e && (e.forEach(Mn), t = t.concat(e)), t;
|
|
1817
|
+
}
|
|
1818
|
+
var Vn = ["[Content_Types].xml", "_rels/.rels", "xl/styles.xml", "xl/workbook.xml", "xl/_rels/workbook.xml.rels", "xl/worksheets/sheet{id}.xml", "xl/worksheets/_rels/sheet{id}.xml.rels", "xl/drawings/drawing{id}.xml", "xl/drawings/_rels/drawing{id}.xml.rels"];
|
|
1819
|
+
function Mn(e) {
|
|
1820
|
+
if (e.files && e.files.transform)
|
|
1821
|
+
for (var t = 0, r = Object.keys(e.files.transform); t < r.length; t++) {
|
|
1822
|
+
var n = r[t];
|
|
1823
|
+
if (Vn.indexOf(n) < 0)
|
|
1824
|
+
throw new Error("Unknown file to transform: ".concat(n));
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
function Xn(e, t) {
|
|
1828
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1829
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
1830
|
+
if (Array.isArray(e) || (r = _n(e)) || t) {
|
|
1831
|
+
r && (e = r);
|
|
1832
|
+
var n = 0;
|
|
1833
|
+
return function() {
|
|
1834
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1835
|
+
};
|
|
1836
|
+
}
|
|
1837
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1838
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1839
|
+
}
|
|
1840
|
+
function _n(e, t) {
|
|
1841
|
+
if (e) {
|
|
1842
|
+
if (typeof e == "string") return Je(e, t);
|
|
1843
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
1844
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Je(e, t) : void 0;
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
function Je(e, t) {
|
|
1848
|
+
(t == null || t > e.length) && (t = e.length);
|
|
1849
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1850
|
+
return n;
|
|
1851
|
+
}
|
|
1852
|
+
function Ye(e) {
|
|
1853
|
+
if (!Array.isArray(e))
|
|
1854
|
+
throw new TypeError("Expected sheet data to be an array of rows");
|
|
1855
|
+
for (var t = Xn(e), r; !(r = t()).done; ) {
|
|
1856
|
+
var n = r.value;
|
|
1857
|
+
if (Array.isArray(n))
|
|
1858
|
+
return;
|
|
1859
|
+
throw new Error("Expected each sheet data row to be an array");
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
function Hn() {
|
|
1863
|
+
var e = [], t = {};
|
|
1864
|
+
return {
|
|
1865
|
+
getSharedStrings: function() {
|
|
1866
|
+
return e;
|
|
1867
|
+
},
|
|
1868
|
+
findOrCreateSharedString: function(n) {
|
|
1869
|
+
var o = t[n];
|
|
1870
|
+
return o === void 0 && (o = e.length, t[n] = o, e.push(n)), o;
|
|
1871
|
+
}
|
|
1872
|
+
};
|
|
1873
|
+
}
|
|
1874
|
+
var Wn = /[\[\]\/\\:*?]+/;
|
|
1875
|
+
function Gn(e) {
|
|
1876
|
+
if (!e)
|
|
1877
|
+
throw new Error("Sheet name can't be empty");
|
|
1878
|
+
if (e.length > 31)
|
|
1879
|
+
throw new Error('Sheet name "'.concat(e, `" can't be longer than 31 characters`));
|
|
1880
|
+
if (Wn.test(e))
|
|
1881
|
+
throw new Error('Sheet name "'.concat(e, '" contains illegal characters: []/\\:*?'));
|
|
1882
|
+
}
|
|
1883
|
+
function Kn(e, t) {
|
|
1884
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1885
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
1886
|
+
if (Array.isArray(e) || (r = qn(e)) || t) {
|
|
1887
|
+
r && (e = r);
|
|
1888
|
+
var n = 0;
|
|
1889
|
+
return function() {
|
|
1890
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
1891
|
+
};
|
|
1892
|
+
}
|
|
1893
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1894
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1895
|
+
}
|
|
1896
|
+
function qn(e, t) {
|
|
1897
|
+
if (e) {
|
|
1898
|
+
if (typeof e == "string") return Ze(e, t);
|
|
1899
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
1900
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ze(e, t) : void 0;
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
function Ze(e, t) {
|
|
1904
|
+
(t == null || t > e.length) && (t = e.length);
|
|
1905
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1906
|
+
return n;
|
|
1907
|
+
}
|
|
1908
|
+
function Jn(e, t, r) {
|
|
1909
|
+
for (var n = Hn(), o = n.getSharedStrings, a = n.findOrCreateSharedString, s = Yn(r), l = dn(s), i = l.getCellStyles, u = l.findOrCreateCellStyle, c = t.map(function(m) {
|
|
1910
|
+
return m.sheet;
|
|
1911
|
+
}), d = Kn(c), f; !(f = d()).done; ) {
|
|
1912
|
+
var p = f.value;
|
|
1913
|
+
Gn(p);
|
|
1914
|
+
}
|
|
1915
|
+
for (var h = [], g = 0; g < c.length; )
|
|
1916
|
+
h.push({
|
|
1917
|
+
sheetData: e[g],
|
|
1918
|
+
sheetOptions: t[g],
|
|
1919
|
+
sheetIndex: g,
|
|
1920
|
+
sheetId: Qe(g),
|
|
1921
|
+
hasDefaultFont: !!s,
|
|
1922
|
+
// hasDefaultFont: Boolean(sheetsDefaultFonts[sheetIndex]),
|
|
1923
|
+
// findOrCreateCellStyle: (style) => findOrCreateCellStyle(style, sheetIndex),
|
|
1924
|
+
findOrCreateCellStyle: u,
|
|
1925
|
+
findOrCreateSharedString: a
|
|
1926
|
+
}), g++;
|
|
1927
|
+
return {
|
|
1928
|
+
sheets: c.map(function(m, w) {
|
|
1929
|
+
var S = w;
|
|
1930
|
+
return {
|
|
1931
|
+
sheetId: Qe(S),
|
|
1932
|
+
sheetName: m,
|
|
1933
|
+
sheetXmlParameters: h[S]
|
|
1934
|
+
};
|
|
1935
|
+
}),
|
|
1936
|
+
getSharedStrings: o,
|
|
1937
|
+
getCellStyles: i
|
|
1938
|
+
};
|
|
1939
|
+
}
|
|
1940
|
+
function Qe(e) {
|
|
1941
|
+
return String(e + 1);
|
|
1942
|
+
}
|
|
1943
|
+
function Yn(e) {
|
|
1944
|
+
var t = e.fontFamily, r = e.fontSize;
|
|
1945
|
+
if (t || typeof r == "number")
|
|
1946
|
+
return {
|
|
1947
|
+
fontFamily: t,
|
|
1948
|
+
fontSize: r
|
|
1949
|
+
};
|
|
1950
|
+
}
|
|
1951
|
+
function Zn(e, t) {
|
|
1952
|
+
var r;
|
|
1953
|
+
return t.some(function(n) {
|
|
1954
|
+
return n.header;
|
|
1955
|
+
}) && (r = t.map(function(n) {
|
|
1956
|
+
var o = n.header;
|
|
1957
|
+
return o || null;
|
|
1958
|
+
})), (r ? [r] : []).concat(e.map(function(n, o) {
|
|
1959
|
+
return t.map(function(a) {
|
|
1960
|
+
var s = a.cell;
|
|
1961
|
+
return s(n, o);
|
|
1962
|
+
});
|
|
1963
|
+
}));
|
|
1964
|
+
}
|
|
1965
|
+
function H(e) {
|
|
1966
|
+
"@babel/helpers - typeof";
|
|
1967
|
+
return H = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1968
|
+
return typeof t;
|
|
1969
|
+
} : function(t) {
|
|
1970
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1971
|
+
}, H(e);
|
|
1972
|
+
}
|
|
1973
|
+
function er(e, t) {
|
|
1974
|
+
var r = Object.keys(e);
|
|
1975
|
+
if (Object.getOwnPropertySymbols) {
|
|
1976
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
1977
|
+
t && (n = n.filter(function(o) {
|
|
1978
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
1979
|
+
})), r.push.apply(r, n);
|
|
1980
|
+
}
|
|
1981
|
+
return r;
|
|
1982
|
+
}
|
|
1983
|
+
function rr(e) {
|
|
1984
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1985
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
1986
|
+
t % 2 ? er(Object(r), !0).forEach(function(n) {
|
|
1987
|
+
Qn(e, n, r[n]);
|
|
1988
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : er(Object(r)).forEach(function(n) {
|
|
1989
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1990
|
+
});
|
|
1991
|
+
}
|
|
1992
|
+
return e;
|
|
1993
|
+
}
|
|
1994
|
+
function Qn(e, t, r) {
|
|
1995
|
+
return (t = eo(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1996
|
+
}
|
|
1997
|
+
function eo(e) {
|
|
1998
|
+
var t = ro(e, "string");
|
|
1999
|
+
return H(t) == "symbol" ? t : t + "";
|
|
2000
|
+
}
|
|
2001
|
+
function ro(e, t) {
|
|
2002
|
+
if (H(e) != "object" || !e) return e;
|
|
2003
|
+
var r = e[Symbol.toPrimitive];
|
|
2004
|
+
if (r !== void 0) {
|
|
2005
|
+
var n = r.call(e, t);
|
|
2006
|
+
if (H(n) != "object") return n;
|
|
2007
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2008
|
+
}
|
|
2009
|
+
return (t === "string" ? String : Number)(e);
|
|
2010
|
+
}
|
|
2011
|
+
function to(e, t) {
|
|
2012
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
2013
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
2014
|
+
if (Array.isArray(e) || (r = no(e)) || t) {
|
|
2015
|
+
r && (e = r);
|
|
2016
|
+
var n = 0;
|
|
2017
|
+
return function() {
|
|
2018
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
2019
|
+
};
|
|
2020
|
+
}
|
|
2021
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2022
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2023
|
+
}
|
|
2024
|
+
function no(e, t) {
|
|
2025
|
+
if (e) {
|
|
2026
|
+
if (typeof e == "string") return tr(e, t);
|
|
2027
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
2028
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? tr(e, t) : void 0;
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
function tr(e, t) {
|
|
2032
|
+
(t == null || t > e.length) && (t = e.length);
|
|
2033
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
2034
|
+
return n;
|
|
2035
|
+
}
|
|
2036
|
+
function oo(e, t, r) {
|
|
2037
|
+
for (var n = r.read, o = {}, a = to(e), s; !(s = a()).done; ) {
|
|
2038
|
+
var l = s.value;
|
|
2039
|
+
if (l.files && l.files.write && l.files.write.files) {
|
|
2040
|
+
var i = l.files.write.files(t, {
|
|
2041
|
+
read: n
|
|
2042
|
+
});
|
|
2043
|
+
i && (o = rr(rr({}, o), i));
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
return o;
|
|
2047
|
+
}
|
|
2048
|
+
function W(e) {
|
|
2049
|
+
"@babel/helpers - typeof";
|
|
2050
|
+
return W = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2051
|
+
return typeof t;
|
|
2052
|
+
} : function(t) {
|
|
2053
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2054
|
+
}, W(e);
|
|
2055
|
+
}
|
|
2056
|
+
var ao = ["data"];
|
|
2057
|
+
function nr(e, t) {
|
|
2058
|
+
var r = Object.keys(e);
|
|
2059
|
+
if (Object.getOwnPropertySymbols) {
|
|
2060
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
2061
|
+
t && (n = n.filter(function(o) {
|
|
2062
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
2063
|
+
})), r.push.apply(r, n);
|
|
2064
|
+
}
|
|
2065
|
+
return r;
|
|
2066
|
+
}
|
|
2067
|
+
function j(e) {
|
|
2068
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
2069
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
2070
|
+
t % 2 ? nr(Object(r), !0).forEach(function(n) {
|
|
2071
|
+
io(e, n, r[n]);
|
|
2072
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : nr(Object(r)).forEach(function(n) {
|
|
2073
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
2074
|
+
});
|
|
2075
|
+
}
|
|
2076
|
+
return e;
|
|
2077
|
+
}
|
|
2078
|
+
function io(e, t, r) {
|
|
2079
|
+
return (t = lo(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
2080
|
+
}
|
|
2081
|
+
function lo(e) {
|
|
2082
|
+
var t = so(e, "string");
|
|
2083
|
+
return W(t) == "symbol" ? t : t + "";
|
|
2084
|
+
}
|
|
2085
|
+
function so(e, t) {
|
|
2086
|
+
if (W(e) != "object" || !e) return e;
|
|
2087
|
+
var r = e[Symbol.toPrimitive];
|
|
2088
|
+
if (r !== void 0) {
|
|
2089
|
+
var n = r.call(e, t);
|
|
2090
|
+
if (W(n) != "object") return n;
|
|
2091
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2092
|
+
}
|
|
2093
|
+
return (t === "string" ? String : Number)(e);
|
|
2094
|
+
}
|
|
2095
|
+
function uo(e, t) {
|
|
2096
|
+
if (e == null) return {};
|
|
2097
|
+
var r, n, o = fo(e, t);
|
|
2098
|
+
if (Object.getOwnPropertySymbols) {
|
|
2099
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
2100
|
+
for (n = 0; n < a.length; n++) r = a[n], t.indexOf(r) === -1 && {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
|
|
2101
|
+
}
|
|
2102
|
+
return o;
|
|
2103
|
+
}
|
|
2104
|
+
function fo(e, t) {
|
|
2105
|
+
if (e == null) return {};
|
|
2106
|
+
var r = {};
|
|
2107
|
+
for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
|
|
2108
|
+
if (t.indexOf(n) !== -1) continue;
|
|
2109
|
+
r[n] = e[n];
|
|
2110
|
+
}
|
|
2111
|
+
return r;
|
|
2112
|
+
}
|
|
2113
|
+
function Br(e, t) {
|
|
2114
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
2115
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
2116
|
+
if (Array.isArray(e) || (r = co(e)) || t) {
|
|
2117
|
+
r && (e = r);
|
|
2118
|
+
var n = 0;
|
|
2119
|
+
return function() {
|
|
2120
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
2121
|
+
};
|
|
2122
|
+
}
|
|
2123
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2124
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2125
|
+
}
|
|
2126
|
+
function co(e, t) {
|
|
2127
|
+
if (e) {
|
|
2128
|
+
if (typeof e == "string") return or(e, t);
|
|
2129
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
2130
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? or(e, t) : void 0;
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
function or(e, t) {
|
|
2134
|
+
(t == null || t > e.length) && (t = e.length);
|
|
2135
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
2136
|
+
return n;
|
|
2137
|
+
}
|
|
2138
|
+
function mo(e, t, r) {
|
|
2139
|
+
var n = Pr(e, t, r), o = n.sheets, a = n.options, s = o.map(function(b) {
|
|
2140
|
+
return b.data;
|
|
2141
|
+
}), l = o.map(function(b) {
|
|
2142
|
+
return b.options;
|
|
2143
|
+
});
|
|
2144
|
+
l = vo(l), l = bo(l);
|
|
2145
|
+
var i = zn(a.features), u = {}, c = function(C) {
|
|
2146
|
+
return u[C];
|
|
2147
|
+
}, d = function(C) {
|
|
2148
|
+
for (var I = 0, O = Object.keys(C); I < O.length; I++) {
|
|
2149
|
+
var T = O[I];
|
|
2150
|
+
ho(T), yo(T, C[T]), u[T] = C[T];
|
|
2151
|
+
}
|
|
2152
|
+
}, f = Jn(s, l, a), p = f.sheets, h = f.getSharedStrings, g = f.getCellStyles;
|
|
2153
|
+
u["[Content_Types].xml"] = ut({
|
|
2154
|
+
sheetIds: p.map(function(b) {
|
|
2155
|
+
return b.sheetId;
|
|
2156
|
+
}),
|
|
2157
|
+
features: i,
|
|
2158
|
+
sheetsOptions: l
|
|
2159
|
+
}), u["_rels/.rels"] = st({
|
|
2160
|
+
features: i,
|
|
2161
|
+
sheetsOptions: l
|
|
2162
|
+
}), u["xl/_rels/workbook.xml.rels"] = lt({
|
|
2163
|
+
sheetIds: p.map(function(b) {
|
|
2164
|
+
return b.sheetId;
|
|
2165
|
+
}),
|
|
2166
|
+
features: i,
|
|
2167
|
+
sheetsOptions: l
|
|
2168
|
+
}), u["xl/workbook.xml"] = at({
|
|
2169
|
+
sheetIdsAndNames: p.map(function(b) {
|
|
2170
|
+
var C = b.sheetId, I = b.sheetName;
|
|
2171
|
+
return {
|
|
2172
|
+
sheetId: C,
|
|
2173
|
+
sheetName: I
|
|
2174
|
+
};
|
|
2175
|
+
}),
|
|
2176
|
+
features: i,
|
|
2177
|
+
sheetsOptions: l
|
|
2178
|
+
});
|
|
2179
|
+
for (var m = 0, w = Br(p), S; !(S = w()).done; ) {
|
|
2180
|
+
var x = S.value, y = x.sheetId, v = x.sheetXmlParameters, F = l[m];
|
|
2181
|
+
u["xl/worksheets/sheet".concat(y, ".xml")] = en(v, i), u["xl/worksheets/_rels/sheet".concat(y, ".xml.rels")] = rn({
|
|
2182
|
+
sheetIndex: m,
|
|
2183
|
+
sheetId: y,
|
|
2184
|
+
sheetOptions: F,
|
|
2185
|
+
features: i
|
|
2186
|
+
}), u["xl/drawings/drawing".concat(y, ".xml")] = ft({
|
|
2187
|
+
sheetIndex: m,
|
|
2188
|
+
sheetId: y,
|
|
2189
|
+
sheetOptions: F,
|
|
2190
|
+
features: i
|
|
2191
|
+
}), u["xl/drawings/_rels/drawing".concat(y, ".xml.rels")] = ct({
|
|
2192
|
+
sheetIndex: m,
|
|
2193
|
+
sheetId: y,
|
|
2194
|
+
sheetOptions: F,
|
|
2195
|
+
features: i
|
|
2196
|
+
}), m++;
|
|
2197
|
+
}
|
|
2198
|
+
return d(oo(i, l, {
|
|
2199
|
+
read: c
|
|
2200
|
+
})), u["xl/styles.xml"] = pn(g(), l, i), u["xl/sharedStrings.xml"] = on(h()), po(u, p), u;
|
|
2201
|
+
}
|
|
2202
|
+
function po(e, t) {
|
|
2203
|
+
for (var r = Br(t), n; !(n = r()).done; ) {
|
|
2204
|
+
var o = n.value.sheetId;
|
|
2205
|
+
if (e["xl/drawings/drawing".concat(o, ".xml")] === sr + ur) {
|
|
2206
|
+
if (delete e["xl/drawings/drawing".concat(o, ".xml")], delete e["xl/drawings/_rels/drawing".concat(o, ".xml.rels")], !de(e, "xl/worksheets/sheet".concat(o, ".xml"), mr(ie)))
|
|
2207
|
+
throw new Error(go);
|
|
2208
|
+
de(e, "xl/worksheets/_rels/sheet".concat(o, ".xml.rels"), pr(o)), de(e, "[Content_Types].xml", lr(o));
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
var go = "Couldn't remove unused drawings";
|
|
2213
|
+
function de(e, t, r) {
|
|
2214
|
+
if (!e[t])
|
|
2215
|
+
throw new Error("File not found: ".concat(t));
|
|
2216
|
+
if (e[t].indexOf(r) < 0)
|
|
2217
|
+
throw new Error('Substring "'.concat(r, '" not found in "').concat(t, '"'));
|
|
2218
|
+
var n = e[t], o = n.replace(r, "");
|
|
2219
|
+
return e[t] = o, n !== o;
|
|
2220
|
+
}
|
|
2221
|
+
function ho(e) {
|
|
2222
|
+
if (e[0] === "/")
|
|
2223
|
+
throw new Error("File path must not start with a slash (/)");
|
|
2224
|
+
}
|
|
2225
|
+
function yo(e, t) {
|
|
2226
|
+
if (!t)
|
|
2227
|
+
throw new Error("File `content` not specified: ".concat(e));
|
|
2228
|
+
}
|
|
2229
|
+
function Pr(e, t, r) {
|
|
2230
|
+
if (Array.isArray(e))
|
|
2231
|
+
if (e.length === 0 || Array.isArray(e[0])) {
|
|
2232
|
+
if (Ye(e), Array.isArray(e[0]) && e.length > 0 && Array.isArray(e[0][0]))
|
|
2233
|
+
throw new Error("In order to write multiple sheets, pass an array of sheet objects");
|
|
2234
|
+
return {
|
|
2235
|
+
sheets: [{
|
|
2236
|
+
data: e,
|
|
2237
|
+
options: t || {}
|
|
2238
|
+
}],
|
|
2239
|
+
options: r || {}
|
|
2240
|
+
};
|
|
2241
|
+
} else if (te(e[0])) {
|
|
2242
|
+
if (te(t) && Array.isArray(t.schema))
|
|
2243
|
+
throw new Error("`schema` parameter was removed, use `columns` parameter instead");
|
|
2244
|
+
return te(t) && Array.isArray(t.columns) ? Pr(Zn(e, t.columns), t, r) : {
|
|
2245
|
+
sheets: e.map(function(n) {
|
|
2246
|
+
var o = n.data, a = uo(n, ao);
|
|
2247
|
+
if (!o)
|
|
2248
|
+
throw new Error("`data` property is required for each sheet");
|
|
2249
|
+
return Ye(o), {
|
|
2250
|
+
data: o,
|
|
2251
|
+
options: a || {}
|
|
2252
|
+
};
|
|
2253
|
+
}),
|
|
2254
|
+
options: t || {}
|
|
2255
|
+
};
|
|
2256
|
+
} else
|
|
2257
|
+
throw new Error("Invalid first argument: must be either sheet data — an array of arrays — or an array of sheet objects");
|
|
2258
|
+
else
|
|
2259
|
+
throw new Error("Invalid first argument: must be an array");
|
|
2260
|
+
}
|
|
2261
|
+
function vo(e) {
|
|
2262
|
+
return e.map(function(t, r) {
|
|
2263
|
+
return j(j({}, t), {}, {
|
|
2264
|
+
sheet: t.sheet || "Sheet".concat(r + 1)
|
|
2265
|
+
});
|
|
2266
|
+
});
|
|
2267
|
+
}
|
|
2268
|
+
function bo(e) {
|
|
2269
|
+
var t = 0;
|
|
2270
|
+
return e.map(function(r) {
|
|
2271
|
+
return j(j({}, r), {}, {
|
|
2272
|
+
conditionalFormatting: r.conditionalFormatting && r.conditionalFormatting.map(function(n) {
|
|
2273
|
+
return j(j({}, n), {}, {
|
|
2274
|
+
// `++` operator returns the value before the increment.
|
|
2275
|
+
_globalIndex: t++
|
|
2276
|
+
});
|
|
2277
|
+
})
|
|
2278
|
+
});
|
|
2279
|
+
});
|
|
2280
|
+
}
|
|
2281
|
+
function xo(e, t, r, n, o, a) {
|
|
2282
|
+
var s = mo(e, t, r);
|
|
2283
|
+
return Wr(s, n).then(function(l) {
|
|
2284
|
+
var i = o(l);
|
|
2285
|
+
return i.then(function(u) {
|
|
2286
|
+
return wo(u);
|
|
2287
|
+
});
|
|
2288
|
+
});
|
|
2289
|
+
}
|
|
2290
|
+
function wo(e) {
|
|
2291
|
+
return new Blob([e], {
|
|
2292
|
+
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
2293
|
+
});
|
|
2294
|
+
}
|
|
2295
|
+
function So(e, t, r, n) {
|
|
2296
|
+
return xo(e, t, r, n, _r);
|
|
2297
|
+
}
|
|
2298
|
+
function Co(e) {
|
|
2299
|
+
if (e instanceof File || e instanceof Blob)
|
|
2300
|
+
return e.arrayBuffer().then(me);
|
|
2301
|
+
if (e instanceof ArrayBuffer)
|
|
2302
|
+
return Promise.resolve(me(e));
|
|
2303
|
+
throw new Error("Unsupported file content type. Expected a `File`, a `Blob` or an `ArrayBuffer`");
|
|
2304
|
+
}
|
|
2305
|
+
function me(e) {
|
|
2306
|
+
return new Uint8Array(e);
|
|
2307
|
+
}
|
|
2308
|
+
function Io(e, t) {
|
|
2309
|
+
var r = URL.createObjectURL(e), n = document.createElement("a");
|
|
2310
|
+
n.style.display = "none", n.href = r, n.download = t, document.body.appendChild(n), n.click(), setTimeout(function() {
|
|
2311
|
+
URL.revokeObjectURL(r), document.body.removeChild(n);
|
|
2312
|
+
}, 100);
|
|
2313
|
+
}
|
|
2314
|
+
function To(e, t, r) {
|
|
2315
|
+
var n = function() {
|
|
2316
|
+
return So(e, t, r, Co);
|
|
2317
|
+
};
|
|
2318
|
+
return {
|
|
2319
|
+
toBlob: function() {
|
|
2320
|
+
return n();
|
|
2321
|
+
},
|
|
2322
|
+
toFile: function(a) {
|
|
2323
|
+
return n().then(function(s) {
|
|
2324
|
+
Io(s, a);
|
|
2325
|
+
});
|
|
2326
|
+
}
|
|
2327
|
+
};
|
|
2328
|
+
}
|
|
2329
|
+
export {
|
|
2330
|
+
To as default,
|
|
2331
|
+
Zn as getSheetData
|
|
2332
|
+
};
|