@fileverse-dev/dsheet 3.0.1 → 3.0.2-29July-1
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/editor/utils/apply-comment-markers.d.ts +22 -0
- package/dist/{index-Enuo_ZOm.js → index-B5OjJYA0.js} +10817 -10772
- package/dist/index.es.js +1 -1
- package/dist/{use-xlsx-import-impl-CyZXfYLs.js → use-xlsx-import-impl-CevfOsNi.js} +297 -278
- package/dist/xlsx-export-impl-CiWHN8hx.js +3138 -0
- package/package.json +2 -2
- package/dist/xlsx-export-impl-wtT-xTA3.js +0 -3126
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import * as
|
|
3
|
-
import { m as Qe, y as Ke, r as et } from "./index-
|
|
1
|
+
import { g as Je } from "./executeStringFunction-C5hEkx9z.js";
|
|
2
|
+
import * as Ue from "yjs";
|
|
3
|
+
import { m as Qe, y as Ke, r as et } from "./index-B5OjJYA0.js";
|
|
4
4
|
import { n as tt } from "./xlsx-hyperlink-inline-DzewAypN.js";
|
|
5
5
|
import { toast as Ie } from "@fileverse/ui";
|
|
6
|
-
var
|
|
6
|
+
var qe = { exports: {} };
|
|
7
7
|
(function(y) {
|
|
8
|
-
var
|
|
9
|
-
|
|
8
|
+
var s = {}, g = function(w) {
|
|
9
|
+
w.version = "0.11.2";
|
|
10
10
|
function v(t) {
|
|
11
11
|
for (var r = "", n = t.length - 1; n >= 0; ) r += t.charAt(n--);
|
|
12
12
|
return r;
|
|
@@ -23,7 +23,7 @@ var ze = { exports: {} };
|
|
|
23
23
|
var n = "" + t;
|
|
24
24
|
return n.length >= r ? n : $(" ", r - n.length) + n;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function U(t, r) {
|
|
27
27
|
var n = "" + t;
|
|
28
28
|
return n.length >= r ? n : n + $(" ", r - n.length);
|
|
29
29
|
}
|
|
@@ -36,7 +36,7 @@ var ze = { exports: {} };
|
|
|
36
36
|
return n.length >= r ? n : $("0", r - n.length) + n;
|
|
37
37
|
}
|
|
38
38
|
var ie = Math.pow(2, 32);
|
|
39
|
-
function
|
|
39
|
+
function ne(t, r) {
|
|
40
40
|
if (t > ie || t < -ie) return J(t, r);
|
|
41
41
|
var n = Math.round(t);
|
|
42
42
|
return F(n, r);
|
|
@@ -105,7 +105,7 @@ var ze = { exports: {} };
|
|
|
105
105
|
}
|
|
106
106
|
return f.y = a[0], f.m = a[1], f.d = a[2], f.S = e % 60, e = Math.floor(e / 60), f.M = e % 60, e = Math.floor(e / 60), f.H = e, f.q = d, f;
|
|
107
107
|
}
|
|
108
|
-
|
|
108
|
+
w.parse_date_code = ye;
|
|
109
109
|
var Se = new Date(1899, 11, 31, 0, 0, 0), Re = Se.getTime(), Le = new Date(1900, 2, 1, 0, 0, 0);
|
|
110
110
|
function Ne(t, r) {
|
|
111
111
|
var n = t.getTime();
|
|
@@ -114,7 +114,7 @@ var ze = { exports: {} };
|
|
|
114
114
|
function He(t) {
|
|
115
115
|
return t.toString(10);
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
w._general_int = He;
|
|
118
118
|
var Te = /* @__PURE__ */ function() {
|
|
119
119
|
var r = /(?:\.0*|(\.\d*[1-9])0+)$/;
|
|
120
120
|
function n(l) {
|
|
@@ -138,7 +138,7 @@ var ze = { exports: {} };
|
|
|
138
138
|
}
|
|
139
139
|
return C;
|
|
140
140
|
}();
|
|
141
|
-
|
|
141
|
+
w._general_num = Te;
|
|
142
142
|
function ge(t, r) {
|
|
143
143
|
switch (typeof t) {
|
|
144
144
|
case "string":
|
|
@@ -155,7 +155,7 @@ var ze = { exports: {} };
|
|
|
155
155
|
}
|
|
156
156
|
throw new Error("unsupported value in General format: " + t);
|
|
157
157
|
}
|
|
158
|
-
|
|
158
|
+
w._general = ge;
|
|
159
159
|
function Fe(t, r) {
|
|
160
160
|
r[0] -= 581;
|
|
161
161
|
var n = t.getDay();
|
|
@@ -268,15 +268,15 @@ var ze = { exports: {} };
|
|
|
268
268
|
for (var n = t.length % r, m = t.substr(0, n); n != t.length; n += r) m += (m.length > 0 ? "," : "") + t.substr(n, r);
|
|
269
269
|
return m;
|
|
270
270
|
}
|
|
271
|
-
var
|
|
271
|
+
var ae = /* @__PURE__ */ function() {
|
|
272
272
|
var r = /%/g;
|
|
273
273
|
function n(h, i, c) {
|
|
274
274
|
var k = i.replace(r, ""), o = i.length - k.length;
|
|
275
|
-
return
|
|
275
|
+
return ae(h, k, c * Math.pow(10, 2 * o)) + $("%", o);
|
|
276
276
|
}
|
|
277
277
|
function m(h, i, c) {
|
|
278
278
|
for (var k = i.length - 1; i.charCodeAt(k - 1) === 44; ) --k;
|
|
279
|
-
return
|
|
279
|
+
return ae(h, i.substr(0, k), c / Math.pow(10, 3 * (i.length - k)));
|
|
280
280
|
}
|
|
281
281
|
function e(h, i) {
|
|
282
282
|
var c, k = h.indexOf("E") - h.indexOf(".") - 1;
|
|
@@ -285,23 +285,23 @@ var ze = { exports: {} };
|
|
|
285
285
|
if (i < 0) return "-" + e(h, -i);
|
|
286
286
|
var o = h.indexOf(".");
|
|
287
287
|
o === -1 && (o = h.indexOf("E"));
|
|
288
|
-
var
|
|
289
|
-
if (
|
|
288
|
+
var u = Math.floor(Math.log(i) * Math.LOG10E) % o;
|
|
289
|
+
if (u < 0 && (u += o), c = (i / Math.pow(10, u)).toPrecision(k + 1 + (o + u) % o), c.indexOf("e") === -1) {
|
|
290
290
|
var E = Math.floor(Math.log(i) * Math.LOG10E);
|
|
291
|
-
for (c.indexOf(".") === -1 ? c = c.charAt(0) + "." + c.substr(1) + "E+" + (E - c.length +
|
|
291
|
+
for (c.indexOf(".") === -1 ? c = c.charAt(0) + "." + c.substr(1) + "E+" + (E - c.length + u) : c += "E+" + (E - u); c.substr(0, 2) === "0."; )
|
|
292
292
|
c = c.charAt(0) + c.substr(2, o) + "." + c.substr(2 + o), c = c.replace(/^0+([1-9])/, "$1").replace(/^0+\./, "0.");
|
|
293
293
|
c = c.replace(/\+-/, "-");
|
|
294
294
|
}
|
|
295
295
|
c = c.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function(H, j, W, S) {
|
|
296
|
-
return j + W + S.substr(0, (o +
|
|
296
|
+
return j + W + S.substr(0, (o + u) % o) + "." + S.substr(u) + "E";
|
|
297
297
|
});
|
|
298
298
|
} else c = i.toExponential(k);
|
|
299
299
|
return h.match(/E\+00$/) && c.match(/e[+-]\d$/) && (c = c.substr(0, c.length - 1) + "0" + c.charAt(c.length - 1)), h.match(/E\-/) && c.match(/e\+/) && (c = c.replace(/e\+/, "e")), c.replace("e", "E");
|
|
300
300
|
}
|
|
301
301
|
var d = /# (\?+)( ?)\/( ?)(\d+)/;
|
|
302
302
|
function a(h, i, c) {
|
|
303
|
-
var k = parseInt(h[4], 10), o = Math.round(i * k),
|
|
304
|
-
return c + (
|
|
303
|
+
var k = parseInt(h[4], 10), o = Math.round(i * k), u = Math.floor(o / k), E = o - u * k, H = k;
|
|
304
|
+
return c + (u === 0 ? "" : "" + u) + " " + (E === 0 ? $(" ", h[1].length + 1 + h[4].length) : R(E, h[1].length) + h[2] + "/" + h[3] + N(H, h[4].length));
|
|
305
305
|
}
|
|
306
306
|
function f(h, i, c) {
|
|
307
307
|
return c + (i === 0 ? "" : "" + i) + $(" ", h[1].length + 2 + h[4].length);
|
|
@@ -326,7 +326,7 @@ var ze = { exports: {} };
|
|
|
326
326
|
var c = Math.pow(10, i);
|
|
327
327
|
return "" + Math.round(h * c) / c;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function I(h, i) {
|
|
330
330
|
var c = h - Math.floor(h), k = Math.pow(10, i);
|
|
331
331
|
return i < ("" + Math.round(c * k)).length ? 0 : Math.round(c * k);
|
|
332
332
|
}
|
|
@@ -345,51 +345,51 @@ var ze = { exports: {} };
|
|
|
345
345
|
if (i.indexOf("%") !== -1) return n(h, i, c);
|
|
346
346
|
if (i.indexOf("E") !== -1) return e(i, c);
|
|
347
347
|
if (i.charCodeAt(0) === 36) return "$" + O(h, i.substr(i.charAt(1) == " " ? 2 : 1), c);
|
|
348
|
-
var o,
|
|
349
|
-
if (i.match(/^00+$/)) return W +
|
|
348
|
+
var o, u, E, H, j = Math.abs(c), W = c < 0 ? "-" : "";
|
|
349
|
+
if (i.match(/^00+$/)) return W + ne(j, i.length);
|
|
350
350
|
if (i.match(/^[#?]+$/))
|
|
351
|
-
return o =
|
|
352
|
-
if (
|
|
353
|
-
if (i.match(/^#+0+$/)) return W +
|
|
354
|
-
if (
|
|
355
|
-
return o = D(c,
|
|
356
|
-
return "." + pe + $("0", A(
|
|
351
|
+
return o = ne(c, 0), o === "0" && (o = ""), o.length > i.length ? o : A(i.substr(0, i.length - o.length)) + o;
|
|
352
|
+
if (u = i.match(d)) return a(u, j, W);
|
|
353
|
+
if (i.match(/^#+0+$/)) return W + ne(j, i.length - i.indexOf("0"));
|
|
354
|
+
if (u = i.match(C))
|
|
355
|
+
return o = D(c, u[1].length).replace(/^([^\.]+)$/, "$1." + A(u[1])).replace(/\.$/, "." + A(u[1])).replace(/\.(\d*)$/, function(z, pe) {
|
|
356
|
+
return "." + pe + $("0", A(u[1]).length - pe.length);
|
|
357
357
|
}), i.indexOf("0.") !== -1 ? o : o.replace(/^0\./, ".");
|
|
358
|
-
if (i = i.replace(/^#+([0.])/, "$1"),
|
|
359
|
-
return W + D(j,
|
|
360
|
-
if (
|
|
361
|
-
if (
|
|
362
|
-
return c < 0 ? "-" + O(h, i, -c) : oe("" + (Math.floor(c) + T(c,
|
|
363
|
-
if (
|
|
364
|
-
if (
|
|
358
|
+
if (i = i.replace(/^#+([0.])/, "$1"), u = i.match(/^(0*)\.(#*)$/))
|
|
359
|
+
return W + D(j, u[2].length).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, u[1].length ? "0." : ".");
|
|
360
|
+
if (u = i.match(/^#{1,3},##0(\.?)$/)) return W + oe(ne(j, 0));
|
|
361
|
+
if (u = i.match(/^#,##0\.([#0]*0)$/))
|
|
362
|
+
return c < 0 ? "-" + O(h, i, -c) : oe("" + (Math.floor(c) + T(c, u[1].length))) + "." + N(I(c, u[1].length), u[1].length);
|
|
363
|
+
if (u = i.match(/^#,#*,#0/)) return O(h, i.replace(/^#,#*,/, ""), c);
|
|
364
|
+
if (u = i.match(/^([0#]+)(\\?-([0#]+))+$/))
|
|
365
365
|
return o = v(O(h, i.replace(/[\\-]/g, ""), c)), E = 0, v(v(i.replace(/\\/g, "")).replace(/[0#]/g, function(z) {
|
|
366
366
|
return E < o.length ? o.charAt(E++) : z === "0" ? "0" : "";
|
|
367
367
|
}));
|
|
368
368
|
if (i.match(_))
|
|
369
369
|
return o = O(h, "##########", c), "(" + o.substr(0, 3) + ") " + o.substr(3, 3) + "-" + o.substr(6);
|
|
370
370
|
var S = "";
|
|
371
|
-
if (
|
|
372
|
-
return E = Math.min(
|
|
373
|
-
if (
|
|
374
|
-
return E = Math.min(Math.max(
|
|
375
|
-
if (
|
|
376
|
-
return o =
|
|
377
|
-
if (
|
|
378
|
-
o = "" + c.toFixed(Math.min(
|
|
371
|
+
if (u = i.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))
|
|
372
|
+
return E = Math.min(u[4].length, 7), H = we(j, Math.pow(10, E) - 1, !1), o = "" + W, S = ae("n", u[1], H[1]), S.charAt(S.length - 1) == " " && (S = S.substr(0, S.length - 1) + "0"), o += S + u[2] + "/" + u[3], S = U(H[2], E), S.length < u[4].length && (S = A(u[4].substr(u[4].length - S.length)) + S), o += S, o;
|
|
373
|
+
if (u = i.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))
|
|
374
|
+
return E = Math.min(Math.max(u[1].length, u[4].length), 7), H = we(j, Math.pow(10, E) - 1, !0), W + (H[0] || (H[1] ? "" : "0")) + " " + (H[1] ? R(H[1], E) + u[2] + "/" + u[3] + U(H[2], E) : $(" ", 2 * E + 1 + u[2].length + u[3].length));
|
|
375
|
+
if (u = i.match(/^[#0?]+$/))
|
|
376
|
+
return o = ne(c, 0), i.length <= o.length ? o : A(i.substr(0, i.length - o.length)) + o;
|
|
377
|
+
if (u = i.match(/^([#0?]+)\.([#0]+)$/)) {
|
|
378
|
+
o = "" + c.toFixed(Math.min(u[2].length, 10)).replace(/([^0])0+$/, "$1"), E = o.indexOf(".");
|
|
379
379
|
var be = i.indexOf(".") - E, ve = i.length - o.length - be;
|
|
380
380
|
return A(i.substr(0, be) + o + i.substr(i.length - ve));
|
|
381
381
|
}
|
|
382
|
-
if (
|
|
383
|
-
return E =
|
|
382
|
+
if (u = i.match(/^00,000\.([#0]*0)$/))
|
|
383
|
+
return E = I(c, u[1].length), c < 0 ? "-" + O(h, i, -c) : oe(L(c)).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(z) {
|
|
384
384
|
return "00," + (z.length < 3 ? N(0, 3 - z.length) : "") + z;
|
|
385
|
-
}) + "." + N(E,
|
|
385
|
+
}) + "." + N(E, u[1].length);
|
|
386
386
|
switch (i) {
|
|
387
387
|
case "###,##0.00":
|
|
388
388
|
return O(h, "#,##0.00", c);
|
|
389
389
|
case "###,###":
|
|
390
390
|
case "##,###":
|
|
391
391
|
case "#,###":
|
|
392
|
-
var me = oe(
|
|
392
|
+
var me = oe(ne(j, 0));
|
|
393
393
|
return me !== "0" ? W + me : "";
|
|
394
394
|
case "###,###.00":
|
|
395
395
|
return O(h, "###,##0.00", c).replace(/^0\./, ".");
|
|
@@ -400,11 +400,11 @@ var ze = { exports: {} };
|
|
|
400
400
|
}
|
|
401
401
|
function se(h, i, c) {
|
|
402
402
|
for (var k = i.length - 1; i.charCodeAt(k - 1) === 44; ) --k;
|
|
403
|
-
return
|
|
403
|
+
return ae(h, i.substr(0, k), c / Math.pow(10, 3 * (i.length - k)));
|
|
404
404
|
}
|
|
405
405
|
function ue(h, i, c) {
|
|
406
406
|
var k = i.replace(r, ""), o = i.length - k.length;
|
|
407
|
-
return
|
|
407
|
+
return ae(h, k, c * Math.pow(10, 2 * o)) + $("%", o);
|
|
408
408
|
}
|
|
409
409
|
function Z(h, i) {
|
|
410
410
|
var c, k = h.indexOf("E") - h.indexOf(".") - 1;
|
|
@@ -413,13 +413,13 @@ var ze = { exports: {} };
|
|
|
413
413
|
if (i < 0) return "-" + Z(h, -i);
|
|
414
414
|
var o = h.indexOf(".");
|
|
415
415
|
o === -1 && (o = h.indexOf("E"));
|
|
416
|
-
var
|
|
417
|
-
if (
|
|
416
|
+
var u = Math.floor(Math.log(i) * Math.LOG10E) % o;
|
|
417
|
+
if (u < 0 && (u += o), c = (i / Math.pow(10, u)).toPrecision(k + 1 + (o + u) % o), !c.match(/[Ee]/)) {
|
|
418
418
|
var E = Math.floor(Math.log(i) * Math.LOG10E);
|
|
419
|
-
c.indexOf(".") === -1 ? c = c.charAt(0) + "." + c.substr(1) + "E+" + (E - c.length +
|
|
419
|
+
c.indexOf(".") === -1 ? c = c.charAt(0) + "." + c.substr(1) + "E+" + (E - c.length + u) : c += "E+" + (E - u), c = c.replace(/\+-/, "-");
|
|
420
420
|
}
|
|
421
421
|
c = c.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function(H, j, W, S) {
|
|
422
|
-
return j + W + S.substr(0, (o +
|
|
422
|
+
return j + W + S.substr(0, (o + u) % o) + "." + S.substr(u) + "E";
|
|
423
423
|
});
|
|
424
424
|
} else c = i.toExponential(k);
|
|
425
425
|
return h.match(/E\+00$/) && c.match(/e[+-]\d$/) && (c = c.substr(0, c.length - 1) + "0" + c.charAt(c.length - 1)), h.match(/E\-/) && c.match(/e\+/) && (c = c.replace(/e\+/, "e")), c.replace("e", "E");
|
|
@@ -433,44 +433,44 @@ var ze = { exports: {} };
|
|
|
433
433
|
if (i.indexOf("%") !== -1) return ue(h, i, c);
|
|
434
434
|
if (i.indexOf("E") !== -1) return Z(i, c);
|
|
435
435
|
if (i.charCodeAt(0) === 36) return "$" + x(h, i.substr(i.charAt(1) == " " ? 2 : 1), c);
|
|
436
|
-
var o,
|
|
436
|
+
var o, u, E, H, j = Math.abs(c), W = c < 0 ? "-" : "";
|
|
437
437
|
if (i.match(/^00+$/)) return W + N(j, i.length);
|
|
438
438
|
if (i.match(/^[#?]+$/))
|
|
439
439
|
return o = "" + c, c === 0 && (o = ""), o.length > i.length ? o : A(i.substr(0, i.length - o.length)) + o;
|
|
440
|
-
if (
|
|
440
|
+
if (u = i.match(d)) return f(u, j, W);
|
|
441
441
|
if (i.match(/^#+0+$/)) return W + N(j, i.length - i.indexOf("0"));
|
|
442
|
-
if (
|
|
443
|
-
return o = ("" + c).replace(/^([^\.]+)$/, "$1." + A(
|
|
444
|
-
return "." + pe + $("0", A(
|
|
442
|
+
if (u = i.match(C))
|
|
443
|
+
return o = ("" + c).replace(/^([^\.]+)$/, "$1." + A(u[1])).replace(/\.$/, "." + A(u[1])), o = o.replace(/\.(\d*)$/, function(z, pe) {
|
|
444
|
+
return "." + pe + $("0", A(u[1]).length - pe.length);
|
|
445
445
|
}), i.indexOf("0.") !== -1 ? o : o.replace(/^0\./, ".");
|
|
446
|
-
if (i = i.replace(/^#+([0.])/, "$1"),
|
|
447
|
-
return W + ("" + j).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./,
|
|
448
|
-
if (
|
|
449
|
-
if (
|
|
450
|
-
return c < 0 ? "-" + x(h, i, -c) : oe("" + c) + "." + $("0",
|
|
451
|
-
if (
|
|
452
|
-
if (
|
|
446
|
+
if (i = i.replace(/^#+([0.])/, "$1"), u = i.match(/^(0*)\.(#*)$/))
|
|
447
|
+
return W + ("" + j).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, u[1].length ? "0." : ".");
|
|
448
|
+
if (u = i.match(/^#{1,3},##0(\.?)$/)) return W + oe("" + j);
|
|
449
|
+
if (u = i.match(/^#,##0\.([#0]*0)$/))
|
|
450
|
+
return c < 0 ? "-" + x(h, i, -c) : oe("" + c) + "." + $("0", u[1].length);
|
|
451
|
+
if (u = i.match(/^#,#*,#0/)) return x(h, i.replace(/^#,#*,/, ""), c);
|
|
452
|
+
if (u = i.match(/^([0#]+)(\\?-([0#]+))+$/))
|
|
453
453
|
return o = v(x(h, i.replace(/[\\-]/g, ""), c)), E = 0, v(v(i.replace(/\\/g, "")).replace(/[0#]/g, function(z) {
|
|
454
454
|
return E < o.length ? o.charAt(E++) : z === "0" ? "0" : "";
|
|
455
455
|
}));
|
|
456
456
|
if (i.match(_))
|
|
457
457
|
return o = x(h, "##########", c), "(" + o.substr(0, 3) + ") " + o.substr(3, 3) + "-" + o.substr(6);
|
|
458
458
|
var S = "";
|
|
459
|
-
if (
|
|
460
|
-
return E = Math.min(
|
|
461
|
-
if (
|
|
462
|
-
return E = Math.min(Math.max(
|
|
463
|
-
if (
|
|
459
|
+
if (u = i.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))
|
|
460
|
+
return E = Math.min(u[4].length, 7), H = we(j, Math.pow(10, E) - 1, !1), o = "" + W, S = ae("n", u[1], H[1]), S.charAt(S.length - 1) == " " && (S = S.substr(0, S.length - 1) + "0"), o += S + u[2] + "/" + u[3], S = U(H[2], E), S.length < u[4].length && (S = A(u[4].substr(u[4].length - S.length)) + S), o += S, o;
|
|
461
|
+
if (u = i.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))
|
|
462
|
+
return E = Math.min(Math.max(u[1].length, u[4].length), 7), H = we(j, Math.pow(10, E) - 1, !0), W + (H[0] || (H[1] ? "" : "0")) + " " + (H[1] ? R(H[1], E) + u[2] + "/" + u[3] + U(H[2], E) : $(" ", 2 * E + 1 + u[2].length + u[3].length));
|
|
463
|
+
if (u = i.match(/^[#0?]+$/))
|
|
464
464
|
return o = "" + c, i.length <= o.length ? o : A(i.substr(0, i.length - o.length)) + o;
|
|
465
|
-
if (
|
|
466
|
-
o = "" + c.toFixed(Math.min(
|
|
465
|
+
if (u = i.match(/^([#0]+)\.([#0]+)$/)) {
|
|
466
|
+
o = "" + c.toFixed(Math.min(u[2].length, 10)).replace(/([^0])0+$/, "$1"), E = o.indexOf(".");
|
|
467
467
|
var be = i.indexOf(".") - E, ve = i.length - o.length - be;
|
|
468
468
|
return A(i.substr(0, be) + o + i.substr(i.length - ve));
|
|
469
469
|
}
|
|
470
|
-
if (
|
|
470
|
+
if (u = i.match(/^00,000\.([#0]*0)$/))
|
|
471
471
|
return c < 0 ? "-" + x(h, i, -c) : oe("" + c).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(z) {
|
|
472
472
|
return "00," + (z.length < 3 ? N(0, 3 - z.length) : "") + z;
|
|
473
|
-
}) + "." + N(0,
|
|
473
|
+
}) + "." + N(0, u[1].length);
|
|
474
474
|
switch (i) {
|
|
475
475
|
case "###,###":
|
|
476
476
|
case "##,###":
|
|
@@ -505,7 +505,7 @@ var ze = { exports: {} };
|
|
|
505
505
|
if (r[r.length] = t.substr(e), n === !0) throw new Error("Format |" + t + "| unterminated string ");
|
|
506
506
|
return r;
|
|
507
507
|
}
|
|
508
|
-
|
|
508
|
+
w._split = ke;
|
|
509
509
|
var _e = /\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;
|
|
510
510
|
function xe(t) {
|
|
511
511
|
for (var r = 0, n = "", m = ""; r < t.length; )
|
|
@@ -596,7 +596,7 @@ var ze = { exports: {} };
|
|
|
596
596
|
}
|
|
597
597
|
return !1;
|
|
598
598
|
}
|
|
599
|
-
|
|
599
|
+
w.is_date = xe;
|
|
600
600
|
function $e(t, r, n, m) {
|
|
601
601
|
for (var e = [], d = "", a = 0, f = "", C = "t", l, _, A, D = "H"; a < t.length; )
|
|
602
602
|
switch (f = t.charAt(a)) {
|
|
@@ -609,8 +609,8 @@ var ze = { exports: {} };
|
|
|
609
609
|
e[e.length] = { t: "t", v: d }, ++a;
|
|
610
610
|
break;
|
|
611
611
|
case "\\":
|
|
612
|
-
var
|
|
613
|
-
e[e.length] = { t: T, v:
|
|
612
|
+
var I = t.charAt(++a), T = I === "(" || I === ")" ? I : "t";
|
|
613
|
+
e[e.length] = { t: T, v: I }, ++a;
|
|
614
614
|
break;
|
|
615
615
|
case "_":
|
|
616
616
|
e[e.length] = { t: "t", v: " " }, a += 2;
|
|
@@ -774,7 +774,7 @@ var ze = { exports: {} };
|
|
|
774
774
|
}
|
|
775
775
|
var h = "", i, c;
|
|
776
776
|
if (Z.length > 0) {
|
|
777
|
-
Z.charCodeAt(0) == 40 ? (i = r < 0 && Z.charCodeAt(0) === 45 ? -r : r, c =
|
|
777
|
+
Z.charCodeAt(0) == 40 ? (i = r < 0 && Z.charCodeAt(0) === 45 ? -r : r, c = ae("n", Z, i)) : (i = r < 0 && m > 1 ? -r : r, c = ae("n", Z, i), i < 0 && e[0] && e[0].t == "t" && (c = c.substr(1), e[0].v = "-" + e[0].v)), x = c.length - 1;
|
|
778
778
|
var k = e.length;
|
|
779
779
|
for (a = 0; a < e.length; ++a) if (e[a] != null && e[a].t != "t" && e[a].v.indexOf(".") > -1) {
|
|
780
780
|
k = a;
|
|
@@ -800,14 +800,14 @@ var ze = { exports: {} };
|
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
}
|
|
803
|
-
for (a = 0; a < e.length; ++a) e[a] != null && "n?".indexOf(e[a].t) > -1 && (i = m > 1 && r < 0 && a > 0 && e[a - 1].v === "-" ? -r : r, e[a].v =
|
|
804
|
-
var
|
|
805
|
-
for (a = 0; a !== e.length; ++a) e[a] != null && (
|
|
806
|
-
return
|
|
803
|
+
for (a = 0; a < e.length; ++a) e[a] != null && "n?".indexOf(e[a].t) > -1 && (i = m > 1 && r < 0 && a > 0 && e[a - 1].v === "-" ? -r : r, e[a].v = ae(e[a].t, e[a].v, i), e[a].t = "t");
|
|
804
|
+
var u = "";
|
|
805
|
+
for (a = 0; a !== e.length; ++a) e[a] != null && (u += e[a].v);
|
|
806
|
+
return u;
|
|
807
807
|
}
|
|
808
|
-
|
|
808
|
+
w._eval = $e;
|
|
809
809
|
var Me = /\[[=<>]/, X = /\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;
|
|
810
|
-
function
|
|
810
|
+
function ee(t, r) {
|
|
811
811
|
if (r == null) return !1;
|
|
812
812
|
var n = parseFloat(r[2]);
|
|
813
813
|
switch (r[1]) {
|
|
@@ -832,7 +832,7 @@ var ze = { exports: {} };
|
|
|
832
832
|
}
|
|
833
833
|
return !1;
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function te(t, r) {
|
|
836
836
|
var n = ke(t), m = n.length, e = n[m - 1].indexOf("@");
|
|
837
837
|
if (m < 4 && e > -1 && --m, n.length > 4) throw new Error("cannot find right format for |" + n.join("|") + "|");
|
|
838
838
|
if (typeof r != "number") return [4, n.length === 4 || e > -1 ? n[n.length - 1] : "@"];
|
|
@@ -851,7 +851,7 @@ var ze = { exports: {} };
|
|
|
851
851
|
if (n[0].indexOf("[") === -1 && n[1].indexOf("[") === -1) return [m, d];
|
|
852
852
|
if (n[0].match(Me) != null || n[1].match(Me) != null) {
|
|
853
853
|
var a = n[0].match(X), f = n[1].match(X);
|
|
854
|
-
return
|
|
854
|
+
return ee(r, a) ? [m, n[0]] : ee(r, f) ? [m, n[1]] : [m, n[a != null && f != null ? 2 : 1]];
|
|
855
855
|
}
|
|
856
856
|
return [m, d];
|
|
857
857
|
}
|
|
@@ -868,7 +868,7 @@ var ze = { exports: {} };
|
|
|
868
868
|
}
|
|
869
869
|
if (fe(m, 0)) return ge(r, n);
|
|
870
870
|
r instanceof Date && (r = Ne(r, n.date1904));
|
|
871
|
-
var e =
|
|
871
|
+
var e = te(m, r);
|
|
872
872
|
if (fe(e[1])) return ge(r, n);
|
|
873
873
|
if (r === !0) r = "TRUE";
|
|
874
874
|
else if (r === !1) r = "FALSE";
|
|
@@ -892,17 +892,17 @@ var ze = { exports: {} };
|
|
|
892
892
|
}
|
|
893
893
|
return ce[r] = t, r;
|
|
894
894
|
}
|
|
895
|
-
|
|
895
|
+
w.load = le, w._table = ce, w.get_table = function() {
|
|
896
896
|
return ce;
|
|
897
|
-
},
|
|
897
|
+
}, w.load_table = function(r) {
|
|
898
898
|
for (var n = 0; n != 392; ++n)
|
|
899
899
|
r[n] !== void 0 && le(r[n], n);
|
|
900
|
-
},
|
|
900
|
+
}, w.init_table = Ee, w.format = de;
|
|
901
901
|
};
|
|
902
|
-
g(
|
|
903
|
-
})(
|
|
904
|
-
var rt =
|
|
905
|
-
const Pe = /* @__PURE__ */
|
|
902
|
+
g(s), typeof DO_NOT_EXPORT_SSF > "u" && (y.exports = s);
|
|
903
|
+
})(qe);
|
|
904
|
+
var rt = qe.exports;
|
|
905
|
+
const Pe = /* @__PURE__ */ Je(rt), Be = [
|
|
906
906
|
"228, 232, 237",
|
|
907
907
|
// Light Gray
|
|
908
908
|
"219, 233, 236",
|
|
@@ -927,100 +927,107 @@ const Pe = /* @__PURE__ */ Ze(rt), Be = [
|
|
|
927
927
|
// Cyan
|
|
928
928
|
"244, 239, 234"
|
|
929
929
|
// Cream
|
|
930
|
-
],
|
|
930
|
+
], Ye = Be[0], nt = [
|
|
931
931
|
["true", "false"],
|
|
932
932
|
["yes", "no"],
|
|
933
933
|
["1", "0"]
|
|
934
934
|
];
|
|
935
|
-
function at(y,
|
|
936
|
-
const g = y.toLowerCase(),
|
|
937
|
-
return nt.some(([
|
|
935
|
+
function at(y, s) {
|
|
936
|
+
const g = y.toLowerCase(), p = s.toLowerCase();
|
|
937
|
+
return nt.some(([w, v]) => g === w && p === v);
|
|
938
938
|
}
|
|
939
939
|
const it = 200;
|
|
940
940
|
function ct() {
|
|
941
941
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `sheet-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
942
942
|
}
|
|
943
|
-
function ot(y) {
|
|
944
|
-
if (!
|
|
945
|
-
|
|
946
|
-
|
|
943
|
+
function ot(y, s) {
|
|
944
|
+
if (!s.has(y)) return y;
|
|
945
|
+
let g = 1, p = `${y} (${g})`;
|
|
946
|
+
for (; s.has(p); )
|
|
947
|
+
g += 1, p = `${y} (${g})`;
|
|
948
|
+
return p;
|
|
947
949
|
}
|
|
948
950
|
function lt(y) {
|
|
949
|
-
|
|
951
|
+
if (!Array.isArray(y) || y.length === 0) return null;
|
|
952
|
+
const s = y.map((p) => String((p == null ? void 0 : p.v) ?? "")).join("");
|
|
953
|
+
return s.trim() ? s : null;
|
|
950
954
|
}
|
|
951
955
|
function st(y) {
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
956
|
+
return y ? "TRUE" : "FALSE";
|
|
957
|
+
}
|
|
958
|
+
function ut(y) {
|
|
959
|
+
let s = !1, g = 0;
|
|
960
|
+
const p = () => {
|
|
961
|
+
if (s) return !0;
|
|
955
962
|
const v = y.current;
|
|
956
963
|
if (!(v != null && v.getWorkbookContext) || !v.recalculateAllFormulas) return !1;
|
|
957
964
|
const $ = v.getWorkbookContext(), N = $ == null ? void 0 : $.luckysheetfile;
|
|
958
965
|
return !(N != null && N.length) || !N.some(
|
|
959
|
-
(
|
|
960
|
-
) ? !1 : (v.recalculateAllFormulas(),
|
|
961
|
-
},
|
|
966
|
+
(U) => Array.isArray(U.data) && U.data.length > 0
|
|
967
|
+
) ? !1 : (v.recalculateAllFormulas(), s = !0, !0);
|
|
968
|
+
}, w = () => {
|
|
962
969
|
var v, $;
|
|
963
|
-
|
|
970
|
+
p() || (g += 1, g < it ? requestAnimationFrame(w) : (($ = (v = y.current) == null ? void 0 : v.recalculateAllFormulas) == null || $.call(v), s = !0));
|
|
964
971
|
};
|
|
965
|
-
requestAnimationFrame(() => requestAnimationFrame(
|
|
972
|
+
requestAnimationFrame(() => requestAnimationFrame(w));
|
|
966
973
|
for (const v of [120, 400, 1200])
|
|
967
974
|
window.setTimeout(() => {
|
|
968
|
-
|
|
975
|
+
s || p();
|
|
969
976
|
}, v);
|
|
970
977
|
}
|
|
971
|
-
function
|
|
972
|
-
return y <= 0 ?
|
|
978
|
+
function ht(y) {
|
|
979
|
+
return y <= 0 ? Ye : y > Be.length ? Array(y).fill(Ye).join(", ") : Be.slice(0, y).join(", ");
|
|
973
980
|
}
|
|
974
981
|
function je(y) {
|
|
975
|
-
const
|
|
976
|
-
if (!
|
|
977
|
-
const g =
|
|
978
|
-
let
|
|
982
|
+
const s = y.match(/^([A-Z]+)(\d+)$/i);
|
|
983
|
+
if (!s) return null;
|
|
984
|
+
const g = s[1].toUpperCase(), p = s[2];
|
|
985
|
+
let w = 0;
|
|
979
986
|
for (let N = 0; N < g.length; N++)
|
|
980
|
-
|
|
981
|
-
const v = parseInt(
|
|
987
|
+
w = w * 26 + (g.charCodeAt(N) - 64);
|
|
988
|
+
const v = parseInt(p, 10) - 1, $ = w - 1;
|
|
982
989
|
return { row: v, col: $ };
|
|
983
990
|
}
|
|
984
|
-
function
|
|
991
|
+
function ft(y, s) {
|
|
985
992
|
const g = je(y);
|
|
986
993
|
if (!g) return null;
|
|
987
|
-
const { row:
|
|
988
|
-
let R =
|
|
989
|
-
|
|
990
|
-
const F = R === "checkbox" ? 1 :
|
|
994
|
+
const { row: p, col: w } = g, v = `${p}_${w}`, $ = Array.isArray(s.formulae) && s.formulae.length > 0 ? String(s.formulae[0]).replace(/^["']|["']$/g, "").replace(/["']/g, "") : "", N = $.split(",").map((fe) => fe.trim()).filter(Boolean);
|
|
995
|
+
let R = s.type === "list" ? "dropdown" : s.type || "dropdown", U = $, J = "";
|
|
996
|
+
s.type === "list" && N.length === 2 && at(N[0], N[1]) && (R = "checkbox", U = N[0], J = N[1]);
|
|
997
|
+
const F = R === "checkbox" ? 1 : U ? U.split(",").length : 0, ie = ht(F || 1), ne = {
|
|
991
998
|
type: R,
|
|
992
999
|
type2: "",
|
|
993
1000
|
rangeTxt: y,
|
|
994
|
-
value1:
|
|
1001
|
+
value1: U,
|
|
995
1002
|
value2: J,
|
|
996
1003
|
validity: "",
|
|
997
1004
|
remote: !1,
|
|
998
|
-
prohibitInput:
|
|
999
|
-
hintShow: !!
|
|
1000
|
-
hintValue:
|
|
1005
|
+
prohibitInput: s.type === "list",
|
|
1006
|
+
hintShow: !!s.showInputMessage,
|
|
1007
|
+
hintValue: s.prompt ?? "",
|
|
1001
1008
|
color: ie,
|
|
1002
1009
|
checked: !1
|
|
1003
1010
|
};
|
|
1004
|
-
return { rowColKey: v, entry:
|
|
1011
|
+
return { rowColKey: v, entry: ne };
|
|
1005
1012
|
}
|
|
1006
|
-
function
|
|
1007
|
-
const
|
|
1013
|
+
function gt(y) {
|
|
1014
|
+
const s = y.split(":"), g = je(s[0].trim());
|
|
1008
1015
|
if (!g) return null;
|
|
1009
|
-
const
|
|
1010
|
-
return
|
|
1011
|
-
row: [Math.min(g.row,
|
|
1012
|
-
column: [Math.min(g.col,
|
|
1016
|
+
const p = s.length > 1 ? je(s[1].trim()) : g;
|
|
1017
|
+
return p ? {
|
|
1018
|
+
row: [Math.min(g.row, p.row), Math.max(g.row, p.row)],
|
|
1019
|
+
column: [Math.min(g.col, p.col), Math.max(g.col, p.col)]
|
|
1013
1020
|
} : null;
|
|
1014
1021
|
}
|
|
1015
|
-
function
|
|
1016
|
-
return String(y || "").split(/[,\s]+/).map((
|
|
1017
|
-
(
|
|
1022
|
+
function dt(y) {
|
|
1023
|
+
return String(y || "").split(/[,\s]+/).map((s) => s.trim()).filter(Boolean).map((s) => gt(s)).filter(
|
|
1024
|
+
(s) => !!s
|
|
1018
1025
|
);
|
|
1019
1026
|
}
|
|
1020
|
-
function
|
|
1021
|
-
const
|
|
1022
|
-
return
|
|
1023
|
-
const [
|
|
1027
|
+
function Ge(y) {
|
|
1028
|
+
const s = dt(y);
|
|
1029
|
+
return s.length ? s.map((g) => {
|
|
1030
|
+
const [p, w] = g.row, [v, $] = g.column;
|
|
1024
1031
|
return {
|
|
1025
1032
|
left: 0,
|
|
1026
1033
|
width: 104,
|
|
@@ -1030,17 +1037,17 @@ function Ye(y) {
|
|
|
1030
1037
|
width_move: 104,
|
|
1031
1038
|
top_move: 0,
|
|
1032
1039
|
height_move: 11999,
|
|
1033
|
-
row: [
|
|
1040
|
+
row: [p, w],
|
|
1034
1041
|
column: [v, $],
|
|
1035
|
-
row_focus:
|
|
1042
|
+
row_focus: p,
|
|
1036
1043
|
column_focus: v,
|
|
1037
1044
|
column_select: !0
|
|
1038
1045
|
};
|
|
1039
1046
|
}) : null;
|
|
1040
1047
|
}
|
|
1041
|
-
function
|
|
1048
|
+
function ze(y) {
|
|
1042
1049
|
var $, N;
|
|
1043
|
-
const
|
|
1050
|
+
const s = {
|
|
1044
1051
|
textColor: "#000000",
|
|
1045
1052
|
cellColor: "#ffffff",
|
|
1046
1053
|
bold: !1,
|
|
@@ -1048,19 +1055,19 @@ function Ge(y) {
|
|
|
1048
1055
|
underline: !1,
|
|
1049
1056
|
strikethrough: !1
|
|
1050
1057
|
};
|
|
1051
|
-
if (!y) return
|
|
1052
|
-
const g = y.font,
|
|
1053
|
-
let
|
|
1058
|
+
if (!y) return s;
|
|
1059
|
+
const g = y.font, p = y.fill;
|
|
1060
|
+
let w = s.textColor, v = s.cellColor;
|
|
1054
1061
|
if (($ = g == null ? void 0 : g.color) != null && $.argb) {
|
|
1055
1062
|
const R = g.color.argb;
|
|
1056
|
-
|
|
1063
|
+
w = "#" + (R.length >= 6 ? R.slice(-6) : R);
|
|
1057
1064
|
}
|
|
1058
|
-
if ((
|
|
1059
|
-
const R =
|
|
1065
|
+
if ((p == null ? void 0 : p.type) === "pattern" && p.pattern === "solid" && ((N = p.fgColor) != null && N.argb)) {
|
|
1066
|
+
const R = p.fgColor.argb;
|
|
1060
1067
|
v = "#" + (R.length >= 6 ? R.slice(-6) : R);
|
|
1061
1068
|
}
|
|
1062
1069
|
return {
|
|
1063
|
-
textColor:
|
|
1070
|
+
textColor: w,
|
|
1064
1071
|
cellColor: v,
|
|
1065
1072
|
bold: !!(g != null && g.bold),
|
|
1066
1073
|
italic: !!(g != null && g.italic),
|
|
@@ -1068,44 +1075,44 @@ function Ge(y) {
|
|
|
1068
1075
|
strikethrough: !1
|
|
1069
1076
|
};
|
|
1070
1077
|
}
|
|
1071
|
-
function
|
|
1078
|
+
function Xe(y) {
|
|
1072
1079
|
if (!y || typeof y != "string") return "";
|
|
1073
|
-
const
|
|
1080
|
+
const s = y.trim().replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&").replace(/^=/, ""), g = s.match(/(?:^|[^A-Z])SEARCH\s*\([\s(]*"((?:[^"]|"")*)"/i);
|
|
1074
1081
|
if (g) return (g[1] ?? "").replace(/""/g, '"');
|
|
1075
|
-
const
|
|
1076
|
-
return
|
|
1082
|
+
const p = s.match(/(?:^|[^A-Z])SEARCH\s*\([\s(]*'([^']*)'/i);
|
|
1083
|
+
return p ? p[1] ?? "" : "";
|
|
1077
1084
|
}
|
|
1078
1085
|
function De(y) {
|
|
1079
1086
|
if (!y || typeof y != "string") return "";
|
|
1080
|
-
const
|
|
1087
|
+
const s = y.trim().replace(/"/g, '"').replace(/'/g, "'").replace(/^=/, ""), g = s.match(/"((?:[^"]|"")*)"/);
|
|
1081
1088
|
if (g) return (g[1] ?? "").replace(/""/g, '"');
|
|
1082
|
-
const
|
|
1083
|
-
return
|
|
1089
|
+
const p = s.match(/'([^']*)'/);
|
|
1090
|
+
return p ? p[1] ?? "" : "";
|
|
1084
1091
|
}
|
|
1085
|
-
function
|
|
1092
|
+
function bt(y) {
|
|
1086
1093
|
if (!y || typeof y != "string") return null;
|
|
1087
|
-
const
|
|
1088
|
-
return g ?
|
|
1094
|
+
const s = y.trim().toUpperCase(), g = Xe(y) || De(y);
|
|
1095
|
+
return g ? s.includes("SEARCH(") ? s.includes("ISERROR(SEARCH(") || s.includes("NOTNUMBER(SEARCH(") ? { conditionName: "textDoesNotContain", conditionValue: [g] } : { conditionName: "textContains", conditionValue: [g] } : s.includes("LEFT(") ? { conditionName: "textStartsWith", conditionValue: [g] } : s.includes("RIGHT(") ? { conditionName: "textEndsWith", conditionValue: [g] } : s.includes("EXACT(") || s.includes('="') ? { conditionName: "textExactly", conditionValue: [g] } : null : null;
|
|
1089
1096
|
}
|
|
1090
|
-
function
|
|
1091
|
-
const
|
|
1092
|
-
if (
|
|
1093
|
-
const
|
|
1094
|
-
return
|
|
1097
|
+
function mt(y, s, g) {
|
|
1098
|
+
const p = (y || "").toLowerCase();
|
|
1099
|
+
if (p === "cellis") {
|
|
1100
|
+
const w = (s || "").toLowerCase();
|
|
1101
|
+
return w === "greaterthan" ? { conditionName: "greaterThan", conditionValue: [] } : w === "greaterthanorequal" ? { conditionName: "greaterThanOrEqual", conditionValue: [] } : w === "lessthan" ? { conditionName: "lessThan", conditionValue: [] } : w === "lessthanorequal" ? { conditionName: "lessThanOrEqual", conditionValue: [] } : w === "equal" ? { conditionName: "equal", conditionValue: [] } : w === "notequal" ? { conditionName: "notEqual", conditionValue: [] } : w === "between" ? { conditionName: "between", conditionValue: [] } : w === "notbetween" ? { conditionName: "notBetween", conditionValue: [] } : null;
|
|
1095
1102
|
}
|
|
1096
|
-
if (
|
|
1097
|
-
const
|
|
1098
|
-
if (
|
|
1103
|
+
if (p === "containstext" || p === "notcontainstext" || p === "beginswith" || p === "endswith" || p === "containsblanks" || p === "notcontainsblanks") {
|
|
1104
|
+
const w = (s ?? "").toLowerCase();
|
|
1105
|
+
if (p === "containsblanks" || w === "containsblanks")
|
|
1099
1106
|
return { conditionName: "empty", conditionValue: [""] };
|
|
1100
|
-
if (
|
|
1107
|
+
if (p === "notcontainsblanks" || w === "notcontainsblanks")
|
|
1101
1108
|
return { conditionName: "notEmpty", conditionValue: [""] };
|
|
1102
|
-
if (
|
|
1109
|
+
if (p === "notcontainstext" || w === "notcontainstext" || w === "notcontains")
|
|
1103
1110
|
return { conditionName: "textDoesNotContain", conditionValue: [] };
|
|
1104
|
-
if (
|
|
1111
|
+
if (p === "beginswith" || w === "beginswith")
|
|
1105
1112
|
return { conditionName: "textStartsWith", conditionValue: [] };
|
|
1106
|
-
if (
|
|
1113
|
+
if (p === "endswith" || w === "endswith")
|
|
1107
1114
|
return { conditionName: "textEndsWith", conditionValue: [] };
|
|
1108
|
-
if (
|
|
1115
|
+
if (w === "equal")
|
|
1109
1116
|
return { conditionName: "textExactly", conditionValue: [] };
|
|
1110
1117
|
const v = (g == null ? void 0 : g.text) ?? "";
|
|
1111
1118
|
return {
|
|
@@ -1113,48 +1120,48 @@ function bt(y, u, g) {
|
|
|
1113
1120
|
conditionValue: v ? [v] : []
|
|
1114
1121
|
};
|
|
1115
1122
|
}
|
|
1116
|
-
if (
|
|
1123
|
+
if (p === "duplicatevalues")
|
|
1117
1124
|
return { conditionName: "duplicateValue", conditionValue: ["0"] };
|
|
1118
|
-
if (
|
|
1125
|
+
if (p === "uniquevalues")
|
|
1119
1126
|
return { conditionName: "duplicateValue", conditionValue: ["1"] };
|
|
1120
|
-
if (
|
|
1121
|
-
const
|
|
1127
|
+
if (p === "top10") {
|
|
1128
|
+
const w = (g == null ? void 0 : g.rank) ?? 10;
|
|
1122
1129
|
return g != null && g.percent && (g != null && g.bottom) ? {
|
|
1123
1130
|
conditionName: "last10_percent",
|
|
1124
|
-
conditionValue: [String(
|
|
1125
|
-
} : g != null && g.percent ? { conditionName: "top10_percent", conditionValue: [String(
|
|
1131
|
+
conditionValue: [String(w)]
|
|
1132
|
+
} : g != null && g.percent ? { conditionName: "top10_percent", conditionValue: [String(w)] } : g != null && g.bottom ? { conditionName: "last10", conditionValue: [String(w)] } : { conditionName: "top10", conditionValue: [String(w)] };
|
|
1126
1133
|
}
|
|
1127
|
-
if (
|
|
1134
|
+
if (p === "aboveaverage")
|
|
1128
1135
|
return (g == null ? void 0 : g.aboveAverage) === !1 ? { conditionName: "belowAverage", conditionValue: [] } : { conditionName: "aboveAverage", conditionValue: [] };
|
|
1129
|
-
if (
|
|
1130
|
-
const
|
|
1131
|
-
return
|
|
1136
|
+
if (p === "timeperiod") {
|
|
1137
|
+
const w = ((g == null ? void 0 : g.timePeriod) ?? "").toLowerCase();
|
|
1138
|
+
return w === "today" || w === "tomorrow" || w === "yesterday" ? {
|
|
1132
1139
|
conditionName: "dateIs",
|
|
1133
|
-
conditionValue: [`preset:${
|
|
1134
|
-
} :
|
|
1140
|
+
conditionValue: [`preset:${w}`, "", "DD/MM/YYYY"]
|
|
1141
|
+
} : w === "last7days" ? {
|
|
1135
1142
|
conditionName: "dateIs",
|
|
1136
1143
|
conditionValue: ["preset:pastWeek", "", "DD/MM/YYYY"]
|
|
1137
|
-
} :
|
|
1144
|
+
} : w === "lastmonth" ? {
|
|
1138
1145
|
conditionName: "dateIs",
|
|
1139
1146
|
conditionValue: ["preset:pastMonth", "", "DD/MM/YYYY"]
|
|
1140
|
-
} :
|
|
1147
|
+
} : w === "lastyear" ? {
|
|
1141
1148
|
conditionName: "dateIs",
|
|
1142
1149
|
conditionValue: ["preset:pastYear", "", "DD/MM/YYYY"]
|
|
1143
1150
|
} : null;
|
|
1144
1151
|
}
|
|
1145
1152
|
return null;
|
|
1146
1153
|
}
|
|
1147
|
-
function
|
|
1148
|
-
if (!
|
|
1149
|
-
let g = (
|
|
1150
|
-
const
|
|
1151
|
-
if (
|
|
1152
|
-
const
|
|
1153
|
-
if (!
|
|
1154
|
-
const J =
|
|
1154
|
+
function pt(y, s) {
|
|
1155
|
+
if (!s.type) return null;
|
|
1156
|
+
let g = (s.text ?? "").trim();
|
|
1157
|
+
const p = Array.isArray(s.formulae) && s.formulae[0] ? String(s.formulae[0]) : void 0, w = (s.type.toLowerCase() === "expression" || s.type.toLowerCase() === "customformula") && bt(p);
|
|
1158
|
+
if (w) {
|
|
1159
|
+
const U = Ge(y);
|
|
1160
|
+
if (!U) return null;
|
|
1161
|
+
const J = ze(s.style);
|
|
1155
1162
|
return {
|
|
1156
1163
|
type: "default",
|
|
1157
|
-
cellrange:
|
|
1164
|
+
cellrange: U,
|
|
1158
1165
|
format: {
|
|
1159
1166
|
textColor: J.textColor,
|
|
1160
1167
|
cellColor: J.cellColor,
|
|
@@ -1163,28 +1170,28 @@ function mt(y, u) {
|
|
|
1163
1170
|
underline: J.underline,
|
|
1164
1171
|
strikethrough: J.strikethrough
|
|
1165
1172
|
},
|
|
1166
|
-
conditionName:
|
|
1173
|
+
conditionName: w.conditionName,
|
|
1167
1174
|
conditionRange: [],
|
|
1168
|
-
conditionValue:
|
|
1175
|
+
conditionValue: w.conditionValue
|
|
1169
1176
|
};
|
|
1170
1177
|
}
|
|
1171
|
-
(
|
|
1172
|
-
const v =
|
|
1173
|
-
percent:
|
|
1174
|
-
bottom:
|
|
1175
|
-
rank:
|
|
1176
|
-
aboveAverage:
|
|
1177
|
-
text: g ||
|
|
1178
|
-
timePeriod:
|
|
1178
|
+
(s.type === "containsText" || s.type === "notContainsText" || s.type === "beginsWith" || s.type === "endsWith") && !g && (g = Xe(p), g || (g = De(p)));
|
|
1179
|
+
const v = mt(s.type, s.operator, {
|
|
1180
|
+
percent: s.percent,
|
|
1181
|
+
bottom: s.bottom,
|
|
1182
|
+
rank: s.rank,
|
|
1183
|
+
aboveAverage: s.aboveAverage,
|
|
1184
|
+
text: g || s.text,
|
|
1185
|
+
timePeriod: s.timePeriod
|
|
1179
1186
|
});
|
|
1180
1187
|
if (!v) return null;
|
|
1181
1188
|
let $;
|
|
1182
|
-
|
|
1183
|
-
(
|
|
1189
|
+
s.type === "cellIs" && Array.isArray(s.formulae) && s.formulae.length > 0 ? $ = s.formulae.map((U) => String(U ?? "")) : v.conditionName === "empty" || v.conditionName === "notEmpty" ? $ = [""] : s.type === "containsText" || s.type === "notContainsText" || s.type === "beginsWith" || s.type === "endsWith" ? $ = g ? [g] : De(p) ? [De(p)] : [] : $ = v.conditionValue.map(
|
|
1190
|
+
(U) => U == null ? "" : String(U)
|
|
1184
1191
|
);
|
|
1185
|
-
const N =
|
|
1192
|
+
const N = Ge(y);
|
|
1186
1193
|
if (!N) return null;
|
|
1187
|
-
const R =
|
|
1194
|
+
const R = ze(s.style);
|
|
1188
1195
|
return {
|
|
1189
1196
|
type: "default",
|
|
1190
1197
|
cellrange: N,
|
|
@@ -1201,26 +1208,26 @@ function mt(y, u) {
|
|
|
1201
1208
|
conditionValue: $
|
|
1202
1209
|
};
|
|
1203
1210
|
}
|
|
1204
|
-
async function
|
|
1211
|
+
async function At({
|
|
1205
1212
|
sheetEditorRef: y,
|
|
1206
|
-
ydocRef:
|
|
1213
|
+
ydocRef: s,
|
|
1207
1214
|
setForceSheetRender: g,
|
|
1208
|
-
dsheetId:
|
|
1209
|
-
currentDataRef:
|
|
1215
|
+
dsheetId: p,
|
|
1216
|
+
currentDataRef: w,
|
|
1210
1217
|
updateDocumentTitle: v,
|
|
1211
1218
|
filterToastShown: $,
|
|
1212
1219
|
setFilterToastShown: N
|
|
1213
|
-
}, R,
|
|
1220
|
+
}, R, U, J, F) {
|
|
1214
1221
|
var Ee, ce;
|
|
1215
1222
|
const ie = R == null ? void 0 : R.target;
|
|
1216
|
-
if (!((Ee = ie == null ? void 0 : ie.files) != null && Ee.length) && !
|
|
1223
|
+
if (!((Ee = ie == null ? void 0 : ie.files) != null && Ee.length) && !U)
|
|
1217
1224
|
return Promise.resolve();
|
|
1218
|
-
const
|
|
1225
|
+
const ne = ((ce = ie == null ? void 0 : ie.files) == null ? void 0 : ce[0]) || U, fe = {}, Ce = {};
|
|
1219
1226
|
let Ae = !1;
|
|
1220
1227
|
return new Promise((Q, M) => {
|
|
1221
1228
|
const G = new FileReader();
|
|
1222
1229
|
G.onerror = () => M(new Error("Failed to read file")), G.onload = async (we) => {
|
|
1223
|
-
var Fe, Ve, oe,
|
|
1230
|
+
var Fe, Ve, oe, ae;
|
|
1224
1231
|
if (!we.target) {
|
|
1225
1232
|
console.error("FileReader event target is null"), M(new Error("FileReader event target is null"));
|
|
1226
1233
|
return;
|
|
@@ -1233,16 +1240,16 @@ async function _t({
|
|
|
1233
1240
|
]), Ne = Re.default.transformExcelToLucky, { extractImagesFromWorksheet: He, convertRawImagesToFortuneSheet: Te } = Le, ge = new Se();
|
|
1234
1241
|
try {
|
|
1235
1242
|
await ge.xlsx.load(ye);
|
|
1236
|
-
const ke = (
|
|
1237
|
-
ge.eachSheet((X,
|
|
1243
|
+
const ke = (ae = (oe = (Ve = (Fe = ge.model) == null ? void 0 : Fe.styles) == null ? void 0 : Ve.fonts) == null ? void 0 : oe[0]) == null ? void 0 : ae.size, _e = {}, xe = {}, $e = {}, Me = {};
|
|
1244
|
+
ge.eachSheet((X, ee) => {
|
|
1238
1245
|
var a, f, C;
|
|
1239
|
-
const
|
|
1246
|
+
const te = ee - 1, de = {}, le = X.views;
|
|
1240
1247
|
if (le && le.length > 0) {
|
|
1241
1248
|
const l = le[0];
|
|
1242
1249
|
if (l.state === "frozen") {
|
|
1243
1250
|
const _ = l.xSplit || 0, A = l.ySplit || 0;
|
|
1244
1251
|
let D = null;
|
|
1245
|
-
_ > 0 && A > 0 ? D = "rangeBoth" : A > 0 ? D = "rangeRow" : _ > 0 && (D = "rangeColumn"), D && (xe[
|
|
1252
|
+
_ > 0 && A > 0 ? D = "rangeBoth" : A > 0 ? D = "rangeRow" : _ > 0 && (D = "rangeColumn"), D && (xe[te] = {
|
|
1246
1253
|
type: D,
|
|
1247
1254
|
range: {
|
|
1248
1255
|
row_focus: A - 1,
|
|
@@ -1255,8 +1262,8 @@ async function _t({
|
|
|
1255
1262
|
X.eachRow({ includeEmpty: !1 }, (l, _) => {
|
|
1256
1263
|
l.eachCell({ includeEmpty: !1 }, (A, D) => {
|
|
1257
1264
|
var se, ue, Z;
|
|
1258
|
-
const
|
|
1259
|
-
A.hyperlink && (de[
|
|
1265
|
+
const I = `${_ - 1}_${D - 1}`;
|
|
1266
|
+
A.hyperlink && (de[I] = [
|
|
1260
1267
|
{
|
|
1261
1268
|
linkType: "webpage",
|
|
1262
1269
|
linkAddress: A.hyperlink
|
|
@@ -1275,11 +1282,11 @@ async function _t({
|
|
|
1275
1282
|
const x = L.fgColor.argb, h = "#" + x.substring(x.length - 6);
|
|
1276
1283
|
O.bg = h;
|
|
1277
1284
|
}
|
|
1278
|
-
Object.keys(O).length > 0 && (t[
|
|
1285
|
+
Object.keys(O).length > 0 && (t[I] = O);
|
|
1279
1286
|
});
|
|
1280
|
-
}), Object.keys(de).length > 0 && (_e[
|
|
1287
|
+
}), Object.keys(de).length > 0 && (_e[te] = de), Object.keys(t).length > 0 && ($e[te] = t);
|
|
1281
1288
|
const r = He(X, ge);
|
|
1282
|
-
r.length > 0 && (Me[
|
|
1289
|
+
r.length > 0 && (Me[te] = r);
|
|
1283
1290
|
const n = X.tables;
|
|
1284
1291
|
n && Object.keys(n).length > 0 && ((a = F == null ? void 0 : F.onWarning) == null || a.call(
|
|
1285
1292
|
F,
|
|
@@ -1295,18 +1302,18 @@ async function _t({
|
|
|
1295
1302
|
if (m && typeof m == "object") {
|
|
1296
1303
|
const l = {};
|
|
1297
1304
|
for (const [_, A] of Object.entries(m)) {
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1305
|
+
const I = ft(_, A);
|
|
1306
|
+
I && (l[I.rowColKey] = I.entry);
|
|
1300
1307
|
}
|
|
1301
|
-
Object.keys(l).length > 0 && (fe[
|
|
1308
|
+
Object.keys(l).length > 0 && (fe[te] = l);
|
|
1302
1309
|
}
|
|
1303
1310
|
const e = X.conditionalFormattings;
|
|
1304
1311
|
if (Array.isArray(e) && e.length > 0) {
|
|
1305
1312
|
const l = [];
|
|
1306
1313
|
for (const _ of e) {
|
|
1307
1314
|
const A = _.ref, D = _.rules || [];
|
|
1308
|
-
for (const
|
|
1309
|
-
const T =
|
|
1315
|
+
for (const I of D) {
|
|
1316
|
+
const T = I;
|
|
1310
1317
|
console.log("[XLSX CF RAW]", {
|
|
1311
1318
|
ref: A,
|
|
1312
1319
|
type: T.type,
|
|
@@ -1319,7 +1326,7 @@ async function _t({
|
|
|
1319
1326
|
rank: T.rank,
|
|
1320
1327
|
aboveAverage: T.aboveAverage
|
|
1321
1328
|
});
|
|
1322
|
-
const L = T.type ?
|
|
1329
|
+
const L = T.type ? pt(A, T) : null;
|
|
1323
1330
|
L ? console.log("[XLSX CF MAPPED] accepted", L) : console.log("[XLSX CF MAPPED] skipped", {
|
|
1324
1331
|
ref: A,
|
|
1325
1332
|
type: T.type,
|
|
@@ -1329,7 +1336,7 @@ async function _t({
|
|
|
1329
1336
|
}), L && l.push(L);
|
|
1330
1337
|
}
|
|
1331
1338
|
}
|
|
1332
|
-
l.length > 0 && (Ce[
|
|
1339
|
+
l.length > 0 && (Ce[te] = l);
|
|
1333
1340
|
}
|
|
1334
1341
|
X.autoFilter && (Ae || (Ae = !0, (C = F == null ? void 0 : F.onWarning) == null || C.call(
|
|
1335
1342
|
F,
|
|
@@ -1341,22 +1348,22 @@ async function _t({
|
|
|
1341
1348
|
duration: 30 * 1e3
|
|
1342
1349
|
})));
|
|
1343
1350
|
}), Ne(
|
|
1344
|
-
|
|
1351
|
+
ne,
|
|
1345
1352
|
function(X) {
|
|
1346
1353
|
var m;
|
|
1347
|
-
let
|
|
1348
|
-
if (
|
|
1354
|
+
let ee = X.sheets;
|
|
1355
|
+
if (ee.forEach((e, d) => {
|
|
1349
1356
|
const a = fe[d];
|
|
1350
1357
|
a && Object.keys(a).length > 0 && (e.dataVerification = a);
|
|
1351
1358
|
const f = Ce[d];
|
|
1352
1359
|
e.luckysheet_conditionformat_save = Array.isArray(f) && f.length > 0 ? f : [];
|
|
1353
|
-
}), !
|
|
1360
|
+
}), !s.current) {
|
|
1354
1361
|
console.error("ydocRef.current is null");
|
|
1355
1362
|
return;
|
|
1356
1363
|
}
|
|
1357
|
-
const
|
|
1358
|
-
|
|
1359
|
-
var T, L, O, se, ue, Z, x, h, i, c, k, o,
|
|
1364
|
+
const te = s.current.getArray(p), de = Array.from(te), le = /* @__PURE__ */ new Map();
|
|
1365
|
+
ee = ee.map((e, d) => {
|
|
1366
|
+
var T, L, O, se, ue, Z, x, h, i, c, k, o, u, E, H, j, W, S, be, ve, me, z, pe, We;
|
|
1360
1367
|
const a = (T = e == null ? void 0 : e.celldata) == null ? void 0 : T[e.celldata.length - 1], f = (a == null ? void 0 : a.r) ?? 0, C = (a == null ? void 0 : a.c) ?? 0;
|
|
1361
1368
|
if (e.row = Math.max(f, 500), e.column = Math.max(C, 36), e.id || (e.id = ((L = F == null ? void 0 : F.generateSheetId) == null ? void 0 : L.call(F)) ?? ((O = y.current) == null ? void 0 : O.getSettings().generateSheetId()) ?? ct()), xe[d] && (e.frozen = xe[d]), _e[d] && (e.hyperlink = {
|
|
1362
1369
|
...e.hyperlink || {},
|
|
@@ -1406,11 +1413,11 @@ async function _t({
|
|
|
1406
1413
|
D._seen == null && (D._seen = /* @__PURE__ */ new Set());
|
|
1407
1414
|
const Y = D._seen;
|
|
1408
1415
|
Y.has(V) || (Y.add(V), A.push({ r: b, c: P, id: e.id }));
|
|
1409
|
-
},
|
|
1416
|
+
}, I = (u = e.config) != null && u.merge ? /* @__PURE__ */ new Map() : null;
|
|
1410
1417
|
if (e.celldata)
|
|
1411
1418
|
for (const b of e.celldata) {
|
|
1412
1419
|
const P = `${b.r}_${b.c}`;
|
|
1413
|
-
if (
|
|
1420
|
+
if (I == null || I.set(
|
|
1414
1421
|
P,
|
|
1415
1422
|
b
|
|
1416
1423
|
), b.v) {
|
|
@@ -1421,8 +1428,8 @@ async function _t({
|
|
|
1421
1428
|
if (b.v.f && ((E = b.v.ct) == null ? void 0 : E.t) !== "d" && (b.v.ct = { ...b.v.ct ?? {}, t: "str" }, D(b.r, b.c)), _ != null && _[P]) {
|
|
1422
1429
|
const B = _[P];
|
|
1423
1430
|
if (!!(l != null && l[P])) {
|
|
1424
|
-
const { fc: K, un: Oe, ...
|
|
1425
|
-
Object.assign(b.v,
|
|
1431
|
+
const { fc: K, un: Oe, ...Ze } = B;
|
|
1432
|
+
Object.assign(b.v, Ze);
|
|
1426
1433
|
} else
|
|
1427
1434
|
Object.assign(b.v, B);
|
|
1428
1435
|
}
|
|
@@ -1433,7 +1440,7 @@ async function _t({
|
|
|
1433
1440
|
B
|
|
1434
1441
|
);
|
|
1435
1442
|
}
|
|
1436
|
-
const V = (H = b.v.ct) == null ? void 0 : H.fa, Y = typeof V == "string" ? V.trim().toLowerCase() : "",
|
|
1443
|
+
const V = (H = b.v.ct) == null ? void 0 : H.fa, Y = typeof V == "string" ? V.trim().toLowerCase() : "", re = Y === "general" || ((j = b.v.ct) == null ? void 0 : j.t) === "g", he = Y === "@" || ((W = b.v.ct) == null ? void 0 : W.t) === "s";
|
|
1437
1444
|
if (V && !le.has(V) && le.set(V, Pe.is_date(V)), !b.v.f && V && le.get(V)) {
|
|
1438
1445
|
const B = typeof b.v.v == "string" ? parseFloat(b.v.v) : b.v.v;
|
|
1439
1446
|
if (typeof B == "number" && !isNaN(B))
|
|
@@ -1441,7 +1448,7 @@ async function _t({
|
|
|
1441
1448
|
b.v.v = B, b.v.m = Pe.format(V, B), b.v.ct = { ...b.v.ct, t: "d" };
|
|
1442
1449
|
} catch {
|
|
1443
1450
|
}
|
|
1444
|
-
} else if (!b.v.f && typeof b.v.v == "string" && !he && !
|
|
1451
|
+
} else if (!b.v.f && typeof b.v.v == "string" && !he && !re) {
|
|
1445
1452
|
const B = b.v.v.trim();
|
|
1446
1453
|
if (/^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?$/.test(
|
|
1447
1454
|
B
|
|
@@ -1459,12 +1466,12 @@ async function _t({
|
|
|
1459
1466
|
}
|
|
1460
1467
|
} else !b.v.f && typeof b.v.v == "number" && isFinite(b.v.v) && ((S = b.v.ct) == null ? void 0 : S.t) !== "s" && ((be = b.v.ct) == null ? void 0 : be.t) !== "d" && b.v.ht == null && (b.v.ht = 2);
|
|
1461
1468
|
if (!b.v.f && (b.v.m === void 0 || b.v.m === null) && ((ve = b.v.ct) == null ? void 0 : ve.t) !== "d") {
|
|
1462
|
-
const B =
|
|
1469
|
+
const B = lt((me = b.v.ct) == null ? void 0 : me.s), q = b.v.v;
|
|
1463
1470
|
if (!(q == null || String(q).trim() === ""))
|
|
1464
1471
|
if (B != null)
|
|
1465
1472
|
b.v.m = B;
|
|
1466
1473
|
else if (typeof q == "boolean")
|
|
1467
|
-
b.v.m =
|
|
1474
|
+
b.v.m = st(q);
|
|
1468
1475
|
else if (typeof q == "number" && isFinite(q)) {
|
|
1469
1476
|
const Oe = (z = b.v.ct) == null ? void 0 : z.fa;
|
|
1470
1477
|
if (typeof Oe == "string" && Oe && le.get(Oe) === !1)
|
|
@@ -1485,41 +1492,53 @@ async function _t({
|
|
|
1485
1492
|
const V = b[P];
|
|
1486
1493
|
if (Array.isArray(V))
|
|
1487
1494
|
for (let Y = 0; Y < V.length; Y++) {
|
|
1488
|
-
const
|
|
1489
|
-
if (!
|
|
1490
|
-
const he = String(
|
|
1491
|
-
he.startsWith("=") || (
|
|
1495
|
+
const re = V[Y];
|
|
1496
|
+
if (!re || typeof re != "object" || !re.f) continue;
|
|
1497
|
+
const he = String(re.f);
|
|
1498
|
+
he.startsWith("=") || (re.f = `=${he}`), ((pe = re.ct) == null ? void 0 : pe.t) !== "d" && (re.ct = { ...re.ct ?? {}, t: "str" }, D(P, Y));
|
|
1492
1499
|
}
|
|
1493
1500
|
}
|
|
1494
1501
|
}
|
|
1495
|
-
if (e.calcChain = A,
|
|
1502
|
+
if (e.calcChain = A, I && ((We = e.config) != null && We.merge) && e.celldata)
|
|
1496
1503
|
for (const b of Object.values(e.config.merge)) {
|
|
1497
|
-
const { r: P, c: V, rs: Y, cs:
|
|
1504
|
+
const { r: P, c: V, rs: Y, cs: re } = b;
|
|
1498
1505
|
for (let he = 0; he < Y; he++)
|
|
1499
|
-
for (let B = 0; B <
|
|
1506
|
+
for (let B = 0; B < re; B++) {
|
|
1500
1507
|
const q = `${P + he}_${V + B}`;
|
|
1501
|
-
let K =
|
|
1502
|
-
K || (K = { r: P + he, c: V + B, v: {} }, e.celldata.push(K),
|
|
1508
|
+
let K = I.get(q);
|
|
1509
|
+
K || (K = { r: P + he, c: V + B, v: {} }, e.celldata.push(K), I.set(q, K)), K.v || (K.v = {}), K.v.mc = he === 0 && B === 0 ? { r: P, c: V, rs: Y, cs: re } : { r: P, c: V };
|
|
1503
1510
|
}
|
|
1504
1511
|
}
|
|
1505
1512
|
return e;
|
|
1506
1513
|
}), console.log("[xlsx-import] parsed sheets data", {
|
|
1507
|
-
fileName:
|
|
1508
|
-
sheetCount:
|
|
1509
|
-
sheets:
|
|
1514
|
+
fileName: ne.name,
|
|
1515
|
+
sheetCount: ee.length,
|
|
1516
|
+
sheets: ee
|
|
1510
1517
|
});
|
|
1511
1518
|
let t;
|
|
1512
|
-
if (J === "merge-current-dsheet"
|
|
1513
|
-
|
|
1514
|
-
|
|
1519
|
+
if (J === "merge-current-dsheet") {
|
|
1520
|
+
const e = new Set(
|
|
1521
|
+
de.map(
|
|
1522
|
+
(d) => d instanceof Ue.Map ? d.get("name") : d.name
|
|
1523
|
+
).filter(Boolean)
|
|
1524
|
+
);
|
|
1525
|
+
ee.forEach((d) => {
|
|
1526
|
+
const a = d.name ?? "", f = ot(a, e);
|
|
1527
|
+
f !== a && (d.name = f), e.add(f);
|
|
1528
|
+
}), t = [...de, ...ee];
|
|
1529
|
+
} else
|
|
1530
|
+
t = [...ee];
|
|
1531
|
+
if (t = t.map((e, d) => (e.order = d, e)), s.current.transact(() => {
|
|
1532
|
+
J !== "merge-current-dsheet" && te.delete(0, te.length), t.forEach((e) => {
|
|
1533
|
+
if (e instanceof Ue.Map) return;
|
|
1515
1534
|
const d = Qe(e);
|
|
1516
|
-
|
|
1535
|
+
te.push([d()]);
|
|
1517
1536
|
});
|
|
1518
|
-
}),
|
|
1519
|
-
const e =
|
|
1520
|
-
|
|
1537
|
+
}), s != null && s.current) {
|
|
1538
|
+
const e = s.current.getArray(p), d = Ke(e);
|
|
1539
|
+
w.current = d, g((a) => a + 1);
|
|
1521
1540
|
}
|
|
1522
|
-
F != null && F.headless ||
|
|
1541
|
+
F != null && F.headless || ut(y);
|
|
1523
1542
|
const n = et((m = X == null ? void 0 : X.info) == null ? void 0 : m.name);
|
|
1524
1543
|
v == null || v(n), Q();
|
|
1525
1544
|
}
|
|
@@ -1529,9 +1548,9 @@ async function _t({
|
|
|
1529
1548
|
"Error loading the workbook. Please ensure it is a valid .xlsx file."
|
|
1530
1549
|
), M(ke);
|
|
1531
1550
|
}
|
|
1532
|
-
}, G.readAsArrayBuffer(
|
|
1551
|
+
}, G.readAsArrayBuffer(ne);
|
|
1533
1552
|
});
|
|
1534
1553
|
}
|
|
1535
1554
|
export {
|
|
1536
|
-
|
|
1555
|
+
At as runXlsxFileUpload
|
|
1537
1556
|
};
|